commit 98f7e32f20d28ec452afb208f9cffc08448a2652 Author: Linus Torvalds Date: Sun Sep 15 16:57:56 2024 +0200 Linux 6.11 commit d42f7708e27cc68d080ac9d3803d27e86821d775 Merge: 0babf683783dd 9d70f3fec1442 Author: Linus Torvalds Date: Sun Sep 15 09:35:50 2024 +0200 Merge tag 'for-linus-6.11' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fix from Paolo Bonzini: "Do not always honor guest PAT on CPUs that support self-snoop. This triggers an issue in the bochsdrm driver, which used ioremap() instead of ioremap_wc() to map the video RAM. The revert lets video RAM use the WB memory type instead of the slower UC memory type" * tag 'for-linus-6.11' of git://git.kernel.org/pub/scm/virt/kvm/kvm: Revert "KVM: VMX: Always honor guest PAT on CPUs that support self-snoop" commit 9d70f3fec14421e793ffbc0ec2f739b24e534900 Author: Paolo Bonzini Date: Sun Sep 15 02:49:33 2024 -0400 Revert "KVM: VMX: Always honor guest PAT on CPUs that support self-snoop" This reverts commit 377b2f359d1f71c75f8cc352b5c81f2210312d83. This caused a regression with the bochsdrm driver, which used ioremap() instead of ioremap_wc() to map the video RAM. After the commit, the WB memory type is used without the IGNORE_PAT, resulting in the slower UC memory type. In fact, UC is slow enough to basically cause guests to not boot... but only on new processors such as Sapphire Rapids and Cascade Lake. Coffee Lake for example works properly, though that might also be an effect of being on a larger, more NUMA system. The driver has been fixed but that does not help older guests. Until we figure out whether Cascade Lake and newer processors are working as intended, revert the commit. Long term we might add a quirk, but the details depend on whether the processors are working as intended: for example if they are, the quirk might reference bochs-compatible devices, e.g. in the name and documentation, so that userspace can disable the quirk by default and only leave it enabled if such a device is being exposed to the guest. If instead this is actually a bug in CLX+, then the actions we need to take are different and depend on the actual cause of the bug. Signed-off-by: Paolo Bonzini commit 0babf683783ddca06551537c6781e413cfe8d27b Merge: 57719771a244f 71e4001a0455e Author: Linus Torvalds Date: Sat Sep 14 16:58:02 2024 +0200 Merge tag 'pinctrl-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - One Intel patch that I mistakenly merged into for-next despite it belonging in fixes: add Arrow Lake-H/U ACPI ID so this Arrow Lake chip probes. - One fix making the CY895x0 reg cache work, which is good because it makes the device work too. * tag 'pinctrl-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: pinctrl-cy8c95x0: Fix regcache pinctrl: meteorlake: Add Arrow Lake-H/U ACPI ID commit 57719771a244ffa0c2e41968ba3d454eb1f15ac8 Merge: d9bc226584fa1 134536c21275b Author: Linus Torvalds Date: Sat Sep 14 11:54:24 2024 +0200 Merge tag 'sound-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few last-minute ASoC fixes and MAINTAINERS update. All look small, obvious and nice-to-have fixes for 6.11-final" * tag 'sound-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: meson: axg-card: fix 'use-after-free' ASoC: codecs: avoid possible garbage value in peb2466_reg_read() MAINTAINERS: update Pierre Bossart's email and role ASoC: tas2781: fix to save the dsp bin file name into the correct array in case name_prefix is not NULL ASoC: Intel: soc-acpi-intel-mtl-match: add missing empty item ASoC: Intel: soc-acpi-intel-lnl-match: add missing empty item commit d9bc226584fa1a9319f4f26882f046e94cfa032a Merge: b7718454f937f 5a20b7cb0d8d3 Author: Linus Torvalds Date: Sat Sep 14 11:43:24 2024 +0200 Merge tag '6.11-rc7-SMB3-client-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fix from Steve French: "Fix for packet signing of write" * tag '6.11-rc7-SMB3-client-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix signature miscalculation commit 134536c21275bb3410cd1f10c5e369d30702741d Merge: c491b044cf5f8 4f9a71435953f Author: Takashi Iwai Date: Sat Sep 14 09:09:11 2024 +0200 Merge tag 'asoc-fix-v6.11-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.11 A few last minute fixes, plus an update for Pierre's contact details and status. It'd be good to get these into v6.11 (especially the MAINTAINERS update) but it wouldn't be the end of the world if they waited for the merge window, none of them are super remarkable and it's just a question of timing that they're last minute. commit b7718454f937f50f44f98c1222f5135eaef29132 Merge: e936e7d4a83b5 fc8c818e75699 Author: Linus Torvalds Date: Fri Sep 13 14:10:17 2024 -0700 Merge tag 'pci-v6.11-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fix from Bjorn Helgaas: - Prevent a possible deadlock (reported by lockdep) when a driver relinquishes a pci_dev, another driver claims it, and one uses managed pcim_enable_device() and the other doesn't (Philipp Stanner) * tag 'pci-v6.11-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Fix potential deadlock in pcim_intx() commit e936e7d4a83b5ff6b7a685722f0ba348383af68c Merge: 1136ced48b684 2a8787c1cdc7b Author: Linus Torvalds Date: Fri Sep 13 11:46:05 2024 -0700 Merge tag 'spi-fix-v6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few last minute fixes for v6.11, they're all individually unremarkable and only last minute due to when they came in" * tag 'spi-fix-v6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: nxp-fspi: fix the KASAN report out-of-bounds bug spi: geni-qcom: Fix incorrect free_irq() sequence spi: geni-qcom: Undo runtime PM changes at driver exit time commit 1136ced48b6842065064ff28d2955cdf01cece8b Merge: 46040ea8a6a58 233a95fd574fd Author: Linus Torvalds Date: Fri Sep 13 11:23:58 2024 -0700 Merge tag 'soundwire-6.11-fixes_2' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire fix from Vinod Koul: - Revert of earlier fix sent for non-continuous port map programming which caused regression on Intel platforms * tag 'soundwire-6.11-fixes_2' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" commit 46040ea8a6a58e5645d91ffa3ead7ed8fd633d56 Merge: 196145c606d0f 135be1dc46c64 Author: Linus Torvalds Date: Fri Sep 13 10:55:59 2024 -0700 Merge tag 'drm-fixes-2024-09-13' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Regular fixes pull, the amdgpu JPEG engine fixes are probably the biggest, they look to block some register accessing, otherwise there are just minor fixes and regression fixes all over. nouveau had a regression report going back a few kernels that finally got fixed, Not entirely happy with so many changes so late, but they all seem quite benign apart from the jpeg one. dma-buf/heaps: - fix off by one in CMA heap fault handler syncobj: - fix syncobj leak in drm_syncobj_eventfd_ioctl amdgpu: - Avoid races between set_drr() functions and dc_state_destruct() - Fix regerssion related to zpos - Fix regression related to overlay cursor - SMU 14.x updates - JPEG fixes - Silence an UBSAN warning amdkfd: - Fetch cacheline size from IP discovery i915: - Prevent a possible int overflow in wq offsets xe: - Remove a double include - Fix null checks and UAF - Fix access_ok check in user_fence_create - Fix compat IS_DISPLAY_STEP() range - OA fix - Fixes in show_meminfo nouveau: - fix GP10x regression on boot stm: - add COMMON_CLK dep rockchip: - iommu api change tegra: - iommu api change" * tag 'drm-fixes-2024-09-13' of https://gitlab.freedesktop.org/drm/kernel: (25 commits) drm/xe/client: add missing bo locking in show_meminfo() drm/xe/client: fix deadlock in show_meminfo() drm/xe/oa: Enable Xe2+ PES disaggregation drm/xe/display: fix compat IS_DISPLAY_STEP() range end drm/xe: Fix access_ok check in user_fence_create drm/xe: Fix possible UAF in guc_exec_queue_process_msg drm/xe: Remove fence check from send_tlb_invalidation drm/xe/gt: Remove double include drm/amd/display: Add all planes on CRTC to state for overlay cursor drm/amdgpu/atomfirmware: Silence UBSAN warning drm/amd/amdgpu: apply command submission parser for JPEG v1 drm/amd/amdgpu: apply command submission parser for JPEG v2+ drm/amd/pm: fix the pp_dpm_pcie issue on smu v14.0.2/3 drm/amd/pm: update the features set on smu v14.0.2/3 drm/amd/display: Do not reset planes based on crtc zpos_changed drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct() drm/amd/display: Avoid race between dcn10_set_drr() and dc_state_destruct() drm/amdkfd: Add cache line size info drm/tegra: Use iommu_paging_domain_alloc() drm/rockchip: Use iommu_paging_domain_alloc() ... commit 71e4001a0455ec2b6218715c81f374f1ab8b1b12 Author: Patrick Rudolph Date: Mon Sep 2 09:28:58 2024 +0200 pinctrl: pinctrl-cy8c95x0: Fix regcache The size of the mux stride was off by one, which could result in invalid pin configuration on the device side or invalid state readings on the software side. While on it also update the code and: - Increase the mux stride size to 16 - Align the virtual muxed regmap range to 16 - Start the regmap window at the selector - Mark reserved registers as not-readable Fixes: 8670de9fae49 ("pinctrl: cy8c95x0: Use regmap ranges") Signed-off-by: Patrick Rudolph Reported-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/20240902072859.583490-1-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit d7c9ec3b07d73cf8a77b44a17f1819c079026ded Merge: da3ea35007d0a a366e46da10d7 Author: Linus Walleij Date: Fri Sep 13 13:09:05 2024 +0200 Merge tag 'intel-pinctrl-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into fixes intel-pinctrl for v6.11-1 This includes a new ACPI ID that is added to the Intel Meteor Lake driver to support recent Intel Arrow Lake hardware. Signed-off-by: Linus Walleij commit 135be1dc46c64c454f2828dbb7f239d035f47180 Merge: 690e516e98697 94c4aa2661112 Author: Dave Airlie Date: Fri Sep 13 15:18:15 2024 +1000 Merge tag 'drm-xe-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Remove a double include (Lucas) - Fix null checks and UAF (Brost) - Fix access_ok check in user_fence_create (Nirmoy) - Fix compat IS_DISPLAY_STEP() range (Jani) - OA fix (Ashutosh) - Fixes in show_meminfo (Auld) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZuL-sORu54zfz1Lf@intel.com commit 690e516e9869791bcac00ad5a351d953a928044b Merge: bb7e19bd6cb68 45c690aea8ee5 Author: Dave Airlie Date: Fri Sep 13 14:47:49 2024 +1000 Merge tag 'drm-misc-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes An off-by-one fix for the CMA DMA-buf heap, An init fix for nouveau, a config dependency fix for stm, a syncobj leak fix, and two iommu fixes for tegra and rockchip. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240912-phenomenal-upbeat-grouse-a26781@houat commit bb7e19bd6cb68e08272e08acb814b9342ad5a43d Merge: f5d6c413b112e d3d37f74683e2 Author: Dave Airlie Date: Fri Sep 13 12:18:12 2024 +1000 Merge tag 'drm-intel-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Prevent a possible int overflow in wq offsets [guc] (Nikita Zhandarovich) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/ZuKTN2XngNhBB3z3@linux commit f5d6c413b112e08578aabf97137ca26a3b6ab394 Merge: da3ea35007d0a 2a2a865aee43d Author: Dave Airlie Date: Fri Sep 13 11:33:37 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-09-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-09-11: amdgpu: - Avoid races between set_drr() functions and dc_state_destruct() - Fix regerssion related to zpos - Fix regression related to overlay cursor - SMU 14.x updates - JPEG fixes - Silence an UBSAN warning amdkfd: - Fetch cacheline size from IP discovery Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240911170528.838655-1-alexander.deucher@amd.com commit 5a20b7cb0d8d3ee490a8e088dc2584aa782e3355 Author: David Howells Date: Thu Sep 12 16:58:48 2024 +0100 cifs: Fix signature miscalculation Fix the calculation of packet signatures by adding the offset into a page in the read or write data payload when hashing the pages from it. Fixes: 39bc58203f04 ("cifs: Add a function to Hash the contents of an iterator") Signed-off-by: David Howells Reviewed-by: Tom Talpey Reviewed-by: Paulo Alcantara (Red Hat) cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 196145c606d0f816fd3926483cb1ff87e09c2c0b Merge: b8e7cd09ae543 a4d89b11aca3f Author: Linus Torvalds Date: Thu Sep 12 16:32:32 2024 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One build fix for 32-bit arches using the Qualcomm PLL driver. It's cheaper to use a comparison here instead of a division so we just do that to fix the build" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val() commit b8e7cd09ae543c1d384677b3d43e009a0e8647ca Merge: fdf042df04634 734e1a8603128 Author: Linus Torvalds Date: Thu Sep 12 16:02:57 2024 -0700 Merge tag 'block-6.11-20240912' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "Just a single fix for a deadlock issue that can happen if someone attempts to change the root disk IO scheduler with a module that requires loading from disk. Changing the scheduler freezes the queue while that operation is happening, hence causing a deadlock" * tag 'block-6.11-20240912' of git://git.kernel.dk/linux: block: Prevent deadlocks when switching elevators commit fdf042df04634248b65dc88dc4913026a9d1776f Merge: 5da028864fde4 20471071f198c Author: Linus Torvalds Date: Thu Sep 12 14:27:47 2024 -0700 Merge tag 'hwmon-for-v6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: - Fix clearing status register bits for chips supporting older PMBus versions * tag 'hwmon-for-v6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2 commit 5da028864fde4856398f9dfb922aa0545dbad271 Merge: 8581ae1ea0d20 73613840a8896 Author: Linus Torvalds Date: Thu Sep 12 13:11:10 2024 -0700 Merge tag 'wq-for-6.11-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "A fix for a NULL worker->pool deref bug which can be triggered when a worker is created and then destroyed immediately" * tag 'wq-for-6.11-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Clear worker->pool in the worker thread context commit 8581ae1ea0d203a71851b21455c2d5167ba00e50 Merge: 5abfdfd402699 7c1e5b9690b0e Author: Linus Torvalds Date: Thu Sep 12 13:03:45 2024 -0700 Merge tag 'riscv-for-linus-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - Two fixes for smp_processor_id() calls in preemptible sections: one if the perf driver, and one in the fence.i prctl. * tag 'riscv-for-linus-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF drivers: perf: Fix smp_processor_id() use in preemptible code commit 5abfdfd402699ce7c1e81d1a25bc37f60f7741ff Merge: 42c5b51949882 3e705251d998c Author: Linus Torvalds Date: Thu Sep 12 12:45:24 2024 -0700 Merge tag 'net-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter. There is a recently notified BT regression with no fix yet. I do not think a fix will land in the next week. Current release - regressions: - core: tighten bad gso csum offset check in virtio_net_hdr - netfilter: move nf flowtable bpf initialization in nf_flow_table_module_init() - eth: ice: stop calling pci_disable_device() as we use pcim - eth: fou: fix null-ptr-deref in GRO. Current release - new code bugs: - hsr: prevent NULL pointer dereference in hsr_proxy_announce() Previous releases - regressions: - hsr: remove seqnr_lock - netfilter: nft_socket: fix sk refcount leaks - mptcp: pm: fix uaf in __timer_delete_sync - phy: dp83822: fix NULL pointer dereference on DP83825 devices - eth: revert "virtio_net: rx enable premapped mode by default" - eth: octeontx2-af: Modify SMQ flush sequence to drop packets Previous releases - always broken: - eth: mlx5: fix bridge mode operations when there are no VFs - eth: igb: Always call igb_xdp_ring_update_tail() under Tx lock" * tag 'net-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (36 commits) net: netfilter: move nf flowtable bpf initialization in nf_flow_table_module_init() net: tighten bad gso csum offset check in virtio_net_hdr netlink: specs: mptcp: fix port endianness net: dpaa: Pad packets to ETH_ZLEN mptcp: pm: Fix uaf in __timer_delete_sync net: libwx: fix number of Rx and Tx descriptors net: dsa: felix: ignore pending status of TAS module when it's disabled net: hsr: prevent NULL pointer dereference in hsr_proxy_announce() selftests: mptcp: include net_helper.sh file selftests: mptcp: include lib.sh file selftests: mptcp: join: restrict fullmesh endp on 1st sf netfilter: nft_socket: make cgroupsv2 matching work with namespaces netfilter: nft_socket: fix sk refcount leaks MAINTAINERS: Add ethtool pse-pd to PSE NETWORK DRIVER dt-bindings: net: tja11xx: fix the broken binding selftests: net: csum: Fix checksums for packets with non-zero padding net: phy: dp83822: Fix NULL pointer dereference on DP83825 devices virtio_net: disable premapped mode by default Revert "virtio_net: big mode skip the unmap check" Revert "virtio_net: rx remove premapped failover code" ... commit 42c5b519498820e95d96311b1200eb4b854fc2bd Merge: 79a61cc3fc046 d6de45e3c6f37 Author: Linus Torvalds Date: Thu Sep 12 12:34:39 2024 -0700 Merge tag 'platform-drivers-x86-v6.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - asus-wmi: Disable OOBE that interferes with backlight control - panasonic-laptop: Two fixes to SINF array handling * tag 'platform-drivers-x86-v6.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: asus-wmi: Disable OOBE experience on Zenbook S 16 platform/x86: panasonic-laptop: Allocate 1 entry extra in the sinf array platform/x86: panasonic-laptop: Fix SINF array out of bounds accesses commit 79a61cc3fc0466ad2b7b89618a6157785f0293b3 Author: Linus Torvalds Date: Wed Sep 11 17:11:23 2024 -0700 mm: avoid leaving partial pfn mappings around in error case As Jann points out, PFN mappings are special, because unlike normal memory mappings, there is no lifetime information associated with the mapping - it is just a raw mapping of PFNs with no reference counting of a 'struct page'. That's all very much intentional, but it does mean that it's easy to mess up the cleanup in case of errors. Yes, a failed mmap() will always eventually clean up any partial mappings, but without any explicit lifetime in the page table mapping itself, it's very easy to do the error handling in the wrong order. In particular, it's easy to mistakenly free the physical backing store before the page tables are actually cleaned up and (temporarily) have stale dangling PTE entries. To make this situation less error-prone, just make sure that any partial pfn mapping is torn down early, before any other error handling. Reported-and-tested-by: Jann Horn Cc: Andrew Morton Cc: Jason Gunthorpe Cc: Simona Vetter Signed-off-by: Linus Torvalds commit 94c4aa266111262c96c98f822d1bccc494786fee Author: Matthew Auld Date: Wed Sep 11 16:55:28 2024 +0100 drm/xe/client: add missing bo locking in show_meminfo() bo_meminfo() wants to inspect bo state like tt and the ttm resource, however this state can change at any point leading to stuff like NPD and UAF, if the bo lock is not held. Grab the bo lock when calling bo_meminfo(), ensuring we drop any spinlocks first. In the case of object_idr we now also need to hold a ref. v2 (MattB) - Also add xe_bo_assert_held() Fixes: 0845233388f8 ("drm/xe: Implement fdinfo memory stats printing") Signed-off-by: Matthew Auld Cc: Himal Prasad Ghimiray Cc: Tejas Upadhyay Cc: "Thomas Hellström" Cc: # v6.8+ Reviewed-by: Matthew Brost Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20240911155527.178910-6-matthew.auld@intel.com (cherry picked from commit 4f63d712fa104c3ebefcb289d1e733e86d8698c7) Signed-off-by: Rodrigo Vivi commit 9bd7ff293fc84792514aeafa06c5a17f05cb5f4b Author: Matthew Auld Date: Wed Sep 11 16:55:27 2024 +0100 drm/xe/client: fix deadlock in show_meminfo() There is a real deadlock as well as sleeping in atomic() bug in here, if the bo put happens to be the last ref, since bo destruction wants to grab the same spinlock and sleeping locks. Fix that by dropping the ref using xe_bo_put_deferred(), and moving the final commit outside of the lock. Dropping the lock around the put is tricky since the bo can go out of scope and delete itself from the list, making it difficult to navigate to the next list entry. Fixes: 0845233388f8 ("drm/xe: Implement fdinfo memory stats printing") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2727 Signed-off-by: Matthew Auld Cc: Himal Prasad Ghimiray Cc: Tejas Upadhyay Cc: "Thomas Hellström" Cc: # v6.8+ Reviewed-by: Matthew Brost Reviewed-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20240911155527.178910-5-matthew.auld@intel.com (cherry picked from commit 0083b8e6f11d7662283a267d4ce7c966812ffd8a) Signed-off-by: Rodrigo Vivi commit a262cc8d554217fbe67e083159584beee3ea9b11 Author: Ashutosh Dixit Date: Mon Sep 9 09:59:33 2024 -0700 drm/xe/oa: Enable Xe2+ PES disaggregation Enable Xe2+ PES disaggregation (for OAG) to retrieve disaggregated metrics when disaggregated data is needed. Userspace can select whether to receive aggregated or disaggregated metrics via the particular OA configuration it uses (programmed via DRM_XE_OBSERVATION_OP_ADD_CONFIG). Bspec: 61101 Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Signed-off-by: Ashutosh Dixit Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240909165933.2638765-1-ashutosh.dixit@intel.com Cc: stable@vger.kernel.org (cherry picked from commit fb2551a0e93897aec7fb3d4f473ebc06b146d160) Signed-off-by: Rodrigo Vivi commit dd10595c3232d362f5a01e5d616434b2371ae8d4 Author: Jani Nikula Date: Tue Aug 20 22:00:34 2024 +0300 drm/xe/display: fix compat IS_DISPLAY_STEP() range end It's supposed to be an open range at the end like in i915. Fingers crossed that nobody relies on this definition. Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Reviewed-by: Lucas De Marchi Reviewed-by: Matt Roper Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/fe8743770694e429f6902491cdb306c97bdf701a.1724180287.git.jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit 453afb1a439994deeacb8d9ecbb48c1f2348ea0a) Signed-off-by: Rodrigo Vivi commit 062d59eb96b24990429c13706cb74ef09cec7e99 Author: Nirmoy Das Date: Tue Aug 6 13:07:22 2024 +0200 drm/xe: Fix access_ok check in user_fence_create Check size of the data not size of the pointer. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407300421.IBkAja96-lkp@intel.com/ Fixes: ddeb7989a98f ("drm/xe: Validate user fence during creation") Cc: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Auld Reviewed-by: Tejas Upadhyay Reviewed-by: Apoorva Singh Link: https://patchwork.freedesktop.org/patch/msgid/20240806110722.28661-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das (cherry picked from commit e102b5ed6e283a144793cab8fcd95f61d0ddbadb) Signed-off-by: Rodrigo Vivi commit 5e2d1d4dc1c15da3e1e3dc09dc3c1276274439b2 Author: Matthew Brost Date: Wed Jul 24 09:43:41 2024 -0700 drm/xe: Fix possible UAF in guc_exec_queue_process_msg Store xe_device ahead of processing message as message can be free'd in some cases. v2: - Including missing local changes v3: - Resend for CI Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202407231445.rpisd1vA-lkp@intel.com/ Fixes: 55ea73aacfb9 ("drm/xe: Build PM into GuC CT layer") Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240724164341.1848954-1-matthew.brost@intel.com (cherry picked from commit 1a394b4f504f33eac8c38b6f42ba025105c7e869) Signed-off-by: Rodrigo Vivi commit 572239f7f15223e4cf22a8233677b9a080c3d873 Author: Matthew Brost Date: Tue Jul 23 12:07:14 2024 -0700 drm/xe: Remove fence check from send_tlb_invalidation 'fence' argument in send_tlb_invalidation cannot be NULL, remove non-NULL check from send_tlb_invalidation. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202407231049.esig0Fkb-lkp@intel.com/ Fixes: 58bfe6674467 ("drm/xe: Drop xe_gt_tlb_invalidation_wait") Signed-off-by: Matthew Brost Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240723190714.1744653-1-matthew.brost@intel.com Signed-off-by: Nirmoy Das (cherry picked from commit 6482253e6e1ad1c3a76645a3899d3cfdb5b918cb) Signed-off-by: Rodrigo Vivi commit a2655358cbda38d53d4a443c7edc7951d91c3043 Author: Lucas De Marchi Date: Mon Jul 8 10:33:01 2024 -0700 drm/xe/gt: Remove double include The header generated/xe_wa_oob.h is included twice. Remove one. Fixes: 27cb2b7fec2a ("drm/xe/bmg: implement Wa_16023588340") Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202407052122.AzuWSPuo-lkp@intel.com/ Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240708173301.1543871-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 3d122660dc70029d9cccb4e8670125f0affa959e) Signed-off-by: Rodrigo Vivi commit 3e705251d998c9688be0e7e0526c250fec24d233 Author: Lorenzo Bianconi Date: Wed Sep 11 17:37:30 2024 +0200 net: netfilter: move nf flowtable bpf initialization in nf_flow_table_module_init() Move nf flowtable bpf initialization in nf_flow_table module load routine since nf_flow_table_bpf is part of nf_flow_table module and not nf_flow_table_inet one. This patch allows to avoid the following kernel warning running the reproducer below: $modprobe nf_flow_table_inet $rmmod nf_flow_table_inet $modprobe nf_flow_table_inet modprobe: ERROR: could not insert 'nf_flow_table_inet': Invalid argument [ 184.081501] ------------[ cut here ]------------ [ 184.081527] WARNING: CPU: 0 PID: 1362 at kernel/bpf/btf.c:8206 btf_populate_kfunc_set+0x23c/0x330 [ 184.081550] CPU: 0 UID: 0 PID: 1362 Comm: modprobe Kdump: loaded Not tainted 6.11.0-0.rc5.22.el10.x86_64 #1 [ 184.081553] Hardware name: Red Hat OpenStack Compute, BIOS 1.14.0-1.module+el8.4.0+8855+a9e237a9 04/01/2014 [ 184.081554] RIP: 0010:btf_populate_kfunc_set+0x23c/0x330 [ 184.081558] RSP: 0018:ff22cfb38071fc90 EFLAGS: 00010202 [ 184.081559] RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000000 [ 184.081560] RDX: 000000000000006e RSI: ffffffff95c00000 RDI: ff13805543436350 [ 184.081561] RBP: ffffffffc0e22180 R08: ff13805543410808 R09: 000000000001ec00 [ 184.081562] R10: ff13805541c8113c R11: 0000000000000010 R12: ff13805541b83c00 [ 184.081563] R13: ff13805543410800 R14: 0000000000000001 R15: ffffffffc0e2259a [ 184.081564] FS: 00007fa436c46740(0000) GS:ff1380557ba00000(0000) knlGS:0000000000000000 [ 184.081569] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 184.081570] CR2: 000055e7b3187000 CR3: 0000000100c48003 CR4: 0000000000771ef0 [ 184.081571] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 184.081572] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 184.081572] PKRU: 55555554 [ 184.081574] Call Trace: [ 184.081575] [ 184.081578] ? show_trace_log_lvl+0x1b0/0x2f0 [ 184.081580] ? show_trace_log_lvl+0x1b0/0x2f0 [ 184.081582] ? __register_btf_kfunc_id_set+0x199/0x200 [ 184.081585] ? btf_populate_kfunc_set+0x23c/0x330 [ 184.081586] ? __warn.cold+0x93/0xed [ 184.081590] ? btf_populate_kfunc_set+0x23c/0x330 [ 184.081592] ? report_bug+0xff/0x140 [ 184.081594] ? handle_bug+0x3a/0x70 [ 184.081596] ? exc_invalid_op+0x17/0x70 [ 184.081597] ? asm_exc_invalid_op+0x1a/0x20 [ 184.081601] ? btf_populate_kfunc_set+0x23c/0x330 [ 184.081602] __register_btf_kfunc_id_set+0x199/0x200 [ 184.081605] ? __pfx_nf_flow_inet_module_init+0x10/0x10 [nf_flow_table_inet] [ 184.081607] do_one_initcall+0x58/0x300 [ 184.081611] do_init_module+0x60/0x230 [ 184.081614] __do_sys_init_module+0x17a/0x1b0 [ 184.081617] do_syscall_64+0x7d/0x160 [ 184.081620] ? __count_memcg_events+0x58/0xf0 [ 184.081623] ? handle_mm_fault+0x234/0x350 [ 184.081626] ? do_user_addr_fault+0x347/0x640 [ 184.081630] ? clear_bhb_loop+0x25/0x80 [ 184.081633] ? clear_bhb_loop+0x25/0x80 [ 184.081634] ? clear_bhb_loop+0x25/0x80 [ 184.081637] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 184.081639] RIP: 0033:0x7fa43652e4ce [ 184.081647] RSP: 002b:00007ffe8213be18 EFLAGS: 00000246 ORIG_RAX: 00000000000000af [ 184.081649] RAX: ffffffffffffffda RBX: 000055e7b3176c20 RCX: 00007fa43652e4ce [ 184.081650] RDX: 000055e7737fde79 RSI: 0000000000003990 RDI: 000055e7b3185380 [ 184.081651] RBP: 000055e7737fde79 R08: 0000000000000007 R09: 000055e7b3179bd0 [ 184.081651] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000040000 [ 184.081652] R13: 000055e7b3176fa0 R14: 0000000000000000 R15: 000055e7b3179b80 Fixes: 391bb6594fd3 ("netfilter: Add bpf_xdp_flow_lookup kfunc") Signed-off-by: Lorenzo Bianconi Acked-by: Florian Westphal Acked-by: Pablo Neira Ayuso Link: https://patch.msgid.link/20240911-nf-flowtable-bpf-modprob-fix-v1-1-f9fc075aafc3@kernel.org Signed-off-by: Paolo Abeni commit 87009709717f144c5581fdad3a5e479fe4c364c6 Merge: 6513eb3d31915 7f3287db65439 Author: Paolo Abeni Date: Thu Sep 12 15:26:18 2024 +0200 Merge tag 'nf-24-09-12' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following batch contains two fixes from Florian Westphal: Patch #1 fixes a sk refcount leak in nft_socket on mismatch. Patch #2 fixes cgroupsv2 matching from containers due to incorrect level in subtree. netfilter pull request 24-09-12 * tag 'nf-24-09-12' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_socket: make cgroupsv2 matching work with namespaces netfilter: nft_socket: fix sk refcount leaks ==================== Link: https://patch.msgid.link/20240911222520.3606-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit fc8c818e756991f5f50b8dfab07f970a18da2556 Author: Philipp Stanner Date: Thu Sep 5 09:25:57 2024 +0200 PCI: Fix potential deadlock in pcim_intx() 25216afc9db5 ("PCI: Add managed pcim_intx()") moved the allocation step for pci_intx()'s device resource from pcim_enable_device() to pcim_intx(). As before, pcim_enable_device() sets pci_dev.is_managed to true; and it is never set to false again. Due to the lifecycle of a struct pci_dev, it can happen that a second driver obtains the same pci_dev after a first driver ran. If one driver uses pcim_enable_device() and the other doesn't, this causes the other driver to run into managed pcim_intx(), which will try to allocate when called for the first time. Allocations might sleep, so calling pci_intx() while holding spinlocks becomes then invalid, which causes lockdep warnings and could cause deadlocks: ======================================================== WARNING: possible irq lock inversion dependency detected 6.11.0-rc6+ #59 Tainted: G W -------------------------------------------------------- CPU 0/KVM/1537 just changed the state of lock: ffffa0f0cff965f0 (&vdev->irqlock){-...}-{2:2}, at: vfio_intx_handler+0x21/0xd0 [vfio_pci_core] but this lock took another, HARDIRQ-unsafe lock in the past: (fs_reclaim){+.+.}-{0:0} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); local_irq_disable(); lock(&vdev->irqlock); lock(fs_reclaim); lock(&vdev->irqlock); *** DEADLOCK *** Have pcim_enable_device()'s release function, pcim_disable_device(), set pci_dev.is_managed to false so that subsequent drivers using the same struct pci_dev do not implicitly run into managed code. Link: https://lore.kernel.org/r/20240905072556.11375-2-pstanner@redhat.com Fixes: 25216afc9db5 ("PCI: Add managed pcim_intx()") Reported-by: Alex Williamson Closes: https://lore.kernel.org/all/20240903094431.63551744.alex.williamson@redhat.com/ Suggested-by: Alex Williamson Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Tested-by: Alex Williamson Reviewed-by: Damien Le Moal commit 73613840a8896f4f859eea489cb4a7a656939e70 Author: Lai Jiangshan Date: Thu Sep 12 11:23:29 2024 +0800 workqueue: Clear worker->pool in the worker thread context Marc Hartmayer reported: [ 23.133876] Unable to handle kernel pointer dereference in virtual kernel address space [ 23.133950] Failing address: 0000000000000000 TEID: 0000000000000483 [ 23.133954] Fault in home space mode while using kernel ASCE. [ 23.133957] AS:000000001b8f0007 R3:0000000056cf4007 S:0000000056cf3800 P:000000000000003d [ 23.134207] Oops: 0004 ilc:2 [#1] SMP (snip) [ 23.134516] Call Trace: [ 23.134520] [<0000024e326caf28>] worker_thread+0x48/0x430 [ 23.134525] ([<0000024e326caf18>] worker_thread+0x38/0x430) [ 23.134528] [<0000024e326d3a3e>] kthread+0x11e/0x130 [ 23.134533] [<0000024e3264b0dc>] __ret_from_fork+0x3c/0x60 [ 23.134536] [<0000024e333fb37a>] ret_from_fork+0xa/0x38 [ 23.134552] Last Breaking-Event-Address: [ 23.134553] [<0000024e333f4c04>] mutex_unlock+0x24/0x30 [ 23.134562] Kernel panic - not syncing: Fatal exception: panic_on_oops With debuging and analysis, worker_thread() accesses to the nullified worker->pool when the newly created worker is destroyed before being waken-up, in which case worker_thread() can see the result detach_worker() reseting worker->pool to NULL at the begining. Move the code "worker->pool = NULL;" out from detach_worker() to fix the problem. worker->pool had been designed to be constant for regular workers and changeable for rescuer. To share attaching/detaching code for regular and rescuer workers and to avoid worker->pool being accessed inadvertently when the worker has been detached, worker->pool is reset to NULL when detached no matter the worker is rescuer or not. To maintain worker->pool being reset after detached, move the code "worker->pool = NULL;" in the worker thread context after detached. It is either be in the regular worker thread context after PF_WQ_WORKER is cleared or in rescuer worker thread context with wq_pool_attach_mutex held. So it is safe to do so. Cc: Marc Hartmayer Link: https://lore.kernel.org/lkml/87wmjj971b.fsf@linux.ibm.com/ Reported-by: Marc Hartmayer Fixes: f4b7b53c94af ("workqueue: Detach workers directly in idle_cull_fn()") Cc: stable@vger.kernel.org # v6.11+ Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 6513eb3d3191574b58859ef2d6dc26c0277c6f81 Author: Willem de Bruijn Date: Tue Sep 10 17:35:35 2024 -0400 net: tighten bad gso csum offset check in virtio_net_hdr The referenced commit drops bad input, but has false positives. Tighten the check to avoid these. The check detects illegal checksum offload requests, which produce csum_start/csum_off beyond end of packet after segmentation. But it is based on two incorrect assumptions: 1. virtio_net_hdr_to_skb with VIRTIO_NET_HDR_GSO_TCP[46] implies GSO. True in callers that inject into the tx path, such as tap. But false in callers that inject into rx, like virtio-net. Here, the flags indicate GRO, and CHECKSUM_UNNECESSARY or CHECKSUM_NONE without VIRTIO_NET_HDR_F_NEEDS_CSUM is normal. 2. TSO requires checksum offload, i.e., ip_summed == CHECKSUM_PARTIAL. False, as tcp[46]_gso_segment will fix up csum_start and offset for all other ip_summed by calling __tcp_v4_send_check. Because of 2, we can limit the scope of the fix to virtio_net_hdr that do try to set these fields, with a bogus value. Link: https://lore.kernel.org/netdev/20240909094527.GA3048202@port70.net/ Fixes: 89add40066f9 ("net: drop bad gso csum_start and offset in virtio_net_hdr") Signed-off-by: Willem de Bruijn Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20240910213553.839926-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 09a45a5553792bbf20beba0a1ac90b4692324d06 Author: Asbjørn Sloth Tønnesen Date: Wed Sep 11 09:10:02 2024 +0000 netlink: specs: mptcp: fix port endianness The MPTCP port attribute is in host endianness, but was documented as big-endian in the ynl specification. Below are two examples from net/mptcp/pm_netlink.c showing that the attribute is converted to/from host endianness for use with netlink. Import from netlink: addr->port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT])) Export to netlink: nla_put_u16(skb, MPTCP_PM_ADDR_ATTR_PORT, ntohs(addr->port)) Where addr->port is defined as __be16. No functional change intended. Fixes: bc8aeb2045e2 ("Documentation: netlink: add a YAML spec for mptcp") Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Davide Caratti Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240911091003.1112179-1-ast@fiberby.net Signed-off-by: Jakub Kicinski commit cbd7ec083413c6a2e0c326d49e24ec7d12c7a9e0 Author: Sean Anderson Date: Tue Sep 10 10:31:44 2024 -0400 net: dpaa: Pad packets to ETH_ZLEN When sending packets under 60 bytes, up to three bytes of the buffer following the data may be leaked. Avoid this by extending all packets to ETH_ZLEN, ensuring nothing is leaked in the padding. This bug can be reproduced by running $ ping -s 11 destination Fixes: 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet") Suggested-by: Eric Dumazet Signed-off-by: Sean Anderson Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240910143144.1439910-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit b4cd80b0338945a94972ac3ed54f8338d2da2076 Author: Edward Adam Davis Date: Tue Sep 10 17:58:56 2024 +0800 mptcp: pm: Fix uaf in __timer_delete_sync There are two paths to access mptcp_pm_del_add_timer, result in a race condition: CPU1 CPU2 ==== ==== net_rx_action napi_poll netlink_sendmsg __napi_poll netlink_unicast process_backlog netlink_unicast_kernel __netif_receive_skb genl_rcv __netif_receive_skb_one_core netlink_rcv_skb NF_HOOK genl_rcv_msg ip_local_deliver_finish genl_family_rcv_msg ip_protocol_deliver_rcu genl_family_rcv_msg_doit tcp_v4_rcv mptcp_pm_nl_flush_addrs_doit tcp_v4_do_rcv mptcp_nl_remove_addrs_list tcp_rcv_established mptcp_pm_remove_addrs_and_subflows tcp_data_queue remove_anno_list_by_saddr mptcp_incoming_options mptcp_pm_del_add_timer mptcp_pm_del_add_timer kfree(entry) In remove_anno_list_by_saddr(running on CPU2), after leaving the critical zone protected by "pm.lock", the entry will be released, which leads to the occurrence of uaf in the mptcp_pm_del_add_timer(running on CPU1). Keeping a reference to add_timer inside the lock, and calling sk_stop_timer_sync() with this reference, instead of "entry->add_timer". Move list_del(&entry->list) to mptcp_pm_del_add_timer and inside the pm lock, do not directly access any members of the entry outside the pm lock, which can avoid similar "entry->x" uaf. Fixes: 00cfd77b9063 ("mptcp: retransmit ADD_ADDR when timeout") Cc: stable@vger.kernel.org Reported-and-tested-by: syzbot+f3a31fb909db9b2a5c4d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f3a31fb909db9b2a5c4d Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Edward Adam Davis Acked-by: Paolo Abeni Link: https://patch.msgid.link/tencent_7142963A37944B4A74EF76CD66EA3C253609@qq.com Signed-off-by: Jakub Kicinski commit 077ee7e6b13a2b6668196ed01a22023549e19381 Author: Jiawen Wu Date: Tue Sep 10 17:56:29 2024 +0800 net: libwx: fix number of Rx and Tx descriptors The number of transmit and receive descriptors must be a multiple of 128 due to the hardware limitation. If it is set to a multiple of 8 instead of a multiple 128, the queues will easily be hung. Cc: stable@vger.kernel.org Fixes: 883b5984a5d2 ("net: wangxun: add ethtool_ops for ring parameters") Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240910095629.570674-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 70654f4c212e83898feced125d91ebb3695950d8 Author: Xiaoliang Yang Date: Fri Sep 6 17:35:50 2024 +0800 net: dsa: felix: ignore pending status of TAS module when it's disabled The TAS module could not be configured when it's running in pending status. We need disable the module and configure it again. However, the pending status is not cleared after the module disabled. TC taprio set will always return busy even it's disabled. For example, a user uses tc-taprio to configure Qbv and a future basetime. The TAS module will run in a pending status. There is no way to reconfigure Qbv, it always returns busy. Actually the TAS module can be reconfigured when it's disabled. So it doesn't need to check the pending status if the TAS module is disabled. After the patch, user can delete the tc taprio configuration to disable Qbv and reconfigure it again. Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload") Signed-off-by: Xiaoliang Yang Link: https://patch.msgid.link/20240906093550.29985-1-xiaoliang.yang_1@nxp.com Signed-off-by: Jakub Kicinski commit a7789fd4caaf96ecfed5e28c4cddb927e6bebadb Author: Jeongjun Park Date: Sun Sep 8 04:03:41 2024 +0900 net: hsr: prevent NULL pointer dereference in hsr_proxy_announce() In the function hsr_proxy_annouance() added in the previous commit 5f703ce5c981 ("net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data"), the return value of the hsr_port_get_hsr() function is not checked to be a NULL pointer, which causes a NULL pointer dereference. To solve this, we need to add code to check whether the return value of hsr_port_get_hsr() is NULL. Reported-by: syzbot+02a42d9b1bd395cbcab4@syzkaller.appspotmail.com Fixes: 5f703ce5c981 ("net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data") Signed-off-by: Jeongjun Park Reviewed-by: Simon Horman Acked-by: Lukasz Majewski Link: https://patch.msgid.link/20240907190341.162289-1-aha310510@gmail.com Signed-off-by: Jakub Kicinski commit 62540317771138c34dc87448366741bd7658681f Merge: d1aaaa2e0a674 c66c08e51b55c Author: Jakub Kicinski Date: Wed Sep 11 15:18:23 2024 -0700 Merge branch 'selftests-mptcp-misc-small-fixes' Matthieu Baerts says: ==================== selftests: mptcp: misc. small fixes Here are some various fixes for the MPTCP selftests. Patch 1 fixes a recently modified test to continue to work as expected on older kernels. This is a fix for a recent fix that can be backported up to v5.15. Patch 2 and 3 include dependences when exporting or installing the tests. Two fixes for v6.11-rc1. ==================== Link: https://patch.msgid.link/20240910-net-selftests-mptcp-fix-install-v1-0-8f124aa9156d@kernel.org Signed-off-by: Jakub Kicinski commit c66c08e51b55c30ae333d6027e4dfda209710d46 Author: Matthieu Baerts (NGI0) Date: Tue Sep 10 21:06:38 2024 +0200 selftests: mptcp: include net_helper.sh file Similar to the previous commit, the net_helper.sh file from the parent directory is used by the MPTCP selftests and it needs to be present when running the tests. This file then needs to be listed in the Makefile to be included when exporting or installing the tests, e.g. with: make -C tools/testing/selftests \ TARGETS=net/mptcp \ install INSTALL_PATH=$KSFT_INSTALL_PATH cd $KSFT_INSTALL_PATH ./run_kselftest.sh -c net/mptcp Fixes: 1af3bc912eac ("selftests: mptcp: lib: use wait_local_port_listen helper") Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240910-net-selftests-mptcp-fix-install-v1-3-8f124aa9156d@kernel.org Signed-off-by: Jakub Kicinski commit 1a5a2d19e827447e6a4d768504866e6820819cee Author: Matthieu Baerts (NGI0) Date: Tue Sep 10 21:06:37 2024 +0200 selftests: mptcp: include lib.sh file The lib.sh file from the parent directory is used by the MPTCP selftests and it needs to be present when running the tests. This file then needs to be listed in the Makefile to be included when exporting or installing the tests, e.g. with: make -C tools/testing/selftests \ TARGETS=net/mptcp \ install INSTALL_PATH=$KSFT_INSTALL_PATH cd $KSFT_INSTALL_PATH ./run_kselftest.sh -c net/mptcp Fixes: f265d3119a29 ("selftests: mptcp: lib: use setup/cleanup_ns helpers") Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240910-net-selftests-mptcp-fix-install-v1-2-8f124aa9156d@kernel.org Signed-off-by: Jakub Kicinski commit 49ac6f05ace5bb0070c68a0193aa05d3c25d4c83 Author: Matthieu Baerts (NGI0) Date: Tue Sep 10 21:06:36 2024 +0200 selftests: mptcp: join: restrict fullmesh endp on 1st sf A new endpoint using the IP of the initial subflow has been recently added to increase the code coverage. But it breaks the test when using old kernels not having commit 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk"), e.g. on v5.15. Similar to commit d4c81bbb8600 ("selftests: mptcp: join: support local endpoint being tracked or not"), it is possible to add the new endpoint conditionally, by checking if "mptcp_pm_subflow_check_next" is present in kallsyms: this is not directly linked to the commit introducing this symbol but for the parent one which is linked anyway. So we can know in advance what will be the expected behaviour, and add the new endpoint only when it makes sense to do so. Fixes: 4878f9f8421f ("selftests: mptcp: join: validate fullmesh endp on 1st sf") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240910-net-selftests-mptcp-fix-install-v1-1-8f124aa9156d@kernel.org Signed-off-by: Jakub Kicinski commit 7f3287db654395f9c5ddd246325ff7889f550286 Author: Florian Westphal Date: Sat Sep 7 16:07:49 2024 +0200 netfilter: nft_socket: make cgroupsv2 matching work with namespaces When running in container environmment, /sys/fs/cgroup/ might not be the real root node of the sk-attached cgroup. Example: In container: % stat /sys//fs/cgroup/ Device: 0,21 Inode: 2214 .. % stat /sys/fs/cgroup/foo Device: 0,21 Inode: 2264 .. The expectation would be for: nft add rule .. socket cgroupv2 level 1 "foo" counter to match traffic from a process that got added to "foo" via "echo $pid > /sys/fs/cgroup/foo/cgroup.procs". However, 'level 3' is needed to make this work. Seen from initial namespace, the complete hierarchy is: % stat /sys/fs/cgroup/system.slice/docker-.../foo Device: 0,21 Inode: 2264 .. i.e. hierarchy is 0 1 2 3 / -> system.slice -> docker-1... -> foo ... but the container doesn't know that its "/" is the "docker-1.." cgroup. Current code will retrieve the 'system.slice' cgroup node and store its kn->id in the destination register, so compare with 2264 ("foo" cgroup id) will not match. Fetch "/" cgroup from ->init() and add its level to the level we try to extract. cgroup root-level is 0 for the init-namespace or the level of the ancestor that is exposed as the cgroup root inside the container. In the above case, cgrp->level of "/" resolved in the container is 2 (docker-1...scope/) and request for 'level 1' will get adjusted to fetch the actual level (3). v2: use CONFIG_SOCK_CGROUP_DATA, eval function depends on it. (kernel test robot) Cc: cgroups@vger.kernel.org Fixes: e0bb96db96f8 ("netfilter: nft_socket: add support for cgroupsv2") Reported-by: Nadia Pinaeva Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8b26ff7af8c32cb4148b3e147c52f9e4c695209c Author: Florian Westphal Date: Thu Sep 5 12:54:46 2024 +0200 netfilter: nft_socket: fix sk refcount leaks We must put 'sk' reference before returning. Fixes: 039b1f4f24ec ("netfilter: nft_socket: fix erroneous socket assignment") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2a8787c1cdc7be24fdd8953ecd1a8743a1006235 Author: Han Xu Date: Wed Sep 11 16:11:45 2024 -0500 spi: nxp-fspi: fix the KASAN report out-of-bounds bug Change the memcpy length to fix the out-of-bounds issue when writing the data that is not 4 byte aligned to TX FIFO. To reproduce the issue, write 3 bytes data to NOR chip. dd if=3b of=/dev/mtd0 [ 36.926103] ================================================================== [ 36.933409] BUG: KASAN: slab-out-of-bounds in nxp_fspi_exec_op+0x26ec/0x2838 [ 36.940514] Read of size 4 at addr ffff00081037c2a0 by task dd/455 [ 36.946721] [ 36.948235] CPU: 3 UID: 0 PID: 455 Comm: dd Not tainted 6.11.0-rc5-gc7b0e37c8434 #1070 [ 36.956185] Hardware name: Freescale i.MX8QM MEK (DT) [ 36.961260] Call trace: [ 36.963723] dump_backtrace+0x90/0xe8 [ 36.967414] show_stack+0x18/0x24 [ 36.970749] dump_stack_lvl+0x78/0x90 [ 36.974451] print_report+0x114/0x5cc [ 36.978151] kasan_report+0xa4/0xf0 [ 36.981670] __asan_report_load_n_noabort+0x1c/0x28 [ 36.986587] nxp_fspi_exec_op+0x26ec/0x2838 [ 36.990800] spi_mem_exec_op+0x8ec/0xd30 [ 36.994762] spi_mem_no_dirmap_read+0x190/0x1e0 [ 36.999323] spi_mem_dirmap_write+0x238/0x32c [ 37.003710] spi_nor_write_data+0x220/0x374 [ 37.007932] spi_nor_write+0x110/0x2e8 [ 37.011711] mtd_write_oob_std+0x154/0x1f0 [ 37.015838] mtd_write_oob+0x104/0x1d0 [ 37.019617] mtd_write+0xb8/0x12c [ 37.022953] mtdchar_write+0x224/0x47c [ 37.026732] vfs_write+0x1e4/0x8c8 [ 37.030163] ksys_write+0xec/0x1d0 [ 37.033586] __arm64_sys_write+0x6c/0x9c [ 37.037539] invoke_syscall+0x6c/0x258 [ 37.041327] el0_svc_common.constprop.0+0x160/0x22c [ 37.046244] do_el0_svc+0x44/0x5c [ 37.049589] el0_svc+0x38/0x78 [ 37.052681] el0t_64_sync_handler+0x13c/0x158 [ 37.057077] el0t_64_sync+0x190/0x194 [ 37.060775] [ 37.062274] Allocated by task 455: [ 37.065701] kasan_save_stack+0x2c/0x54 [ 37.069570] kasan_save_track+0x20/0x3c [ 37.073438] kasan_save_alloc_info+0x40/0x54 [ 37.077736] __kasan_kmalloc+0xa0/0xb8 [ 37.081515] __kmalloc_noprof+0x158/0x2f8 [ 37.085563] mtd_kmalloc_up_to+0x120/0x154 [ 37.089690] mtdchar_write+0x130/0x47c [ 37.093469] vfs_write+0x1e4/0x8c8 [ 37.096901] ksys_write+0xec/0x1d0 [ 37.100332] __arm64_sys_write+0x6c/0x9c [ 37.104287] invoke_syscall+0x6c/0x258 [ 37.108064] el0_svc_common.constprop.0+0x160/0x22c [ 37.112972] do_el0_svc+0x44/0x5c [ 37.116319] el0_svc+0x38/0x78 [ 37.119401] el0t_64_sync_handler+0x13c/0x158 [ 37.123788] el0t_64_sync+0x190/0x194 [ 37.127474] [ 37.128977] The buggy address belongs to the object at ffff00081037c2a0 [ 37.128977] which belongs to the cache kmalloc-8 of size 8 [ 37.141177] The buggy address is located 0 bytes inside of [ 37.141177] allocated 3-byte region [ffff00081037c2a0, ffff00081037c2a3) [ 37.153465] [ 37.154971] The buggy address belongs to the physical page: [ 37.160559] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x89037c [ 37.168596] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 37.175149] page_type: 0xfdffffff(slab) [ 37.179021] raw: 0bfffe0000000000 ffff000800002500 dead000000000122 0000000000000000 [ 37.186788] raw: 0000000000000000 0000000080800080 00000001fdffffff 0000000000000000 [ 37.194553] page dumped because: kasan: bad access detected [ 37.200144] [ 37.201647] Memory state around the buggy address: [ 37.206460] ffff00081037c180: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc [ 37.213701] ffff00081037c200: fa fc fc fc 05 fc fc fc 03 fc fc fc 02 fc fc fc [ 37.220946] >ffff00081037c280: 06 fc fc fc 03 fc fc fc fc fc fc fc fc fc fc fc [ 37.228186] ^ [ 37.232473] ffff00081037c300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.239718] ffff00081037c380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.246962] ================================================================== [ 37.254394] Disabling lock debugging due to kernel taint 0+1 records in 0+1 records out 3 bytes copied, 0.335911 s, 0.0 kB/s Fixes: a5356aef6a90 ("spi: spi-mem: Add driver for NXP FlexSPI controller") Cc: stable@kernel.org Signed-off-by: Han Xu Link: https://patch.msgid.link/20240911211146.3337068-1-han.xu@nxp.com Signed-off-by: Mark Brown commit 77f587896757708780a7e8792efe62939f25a5ab Merge: 3857c7b0411a4 0e7af99aef5f5 Author: Linus Torvalds Date: Wed Sep 11 11:26:56 2024 -0700 Merge tag 'arm-fixes-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "The bulk of the changes this time are for device tree files in the rockchips platform, addressing correctness issues on individual boards, plus one change in the rk356x SoC file to make it match the binding. The only other changes that came in are - a CPU frequencey scaling fix for JH7110 (RISC-V) - a build fix for the cznic hwrandom driver - a fix for a deadlock in qualcomm uefi secure application firmware driver" * tag 'arm-fixes-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency riscv: dts: starfive: jh7110-common: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHz firmware: qcom: uefisecapp: Fix deadlock in qcuefi_acquire() arm64: dts: rockchip: Fix compatibles for RK3588 VO{0,1}_GRF dt-bindings: soc: rockchip: Fix compatibles for RK3588 VO{0,1}_GRF arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma arm64: dts: rockchip: fix PMIC interrupt pin in pinctrl for ROCK Pi E arm64: dts: rockchip: Remove broken tsadc pinctrl binding for rk356x commit 3857c7b0411a4e726fb943d41f38676c5ea992ee Merge: 914413e3eecba f8e1ca92e35e9 Author: Linus Torvalds Date: Wed Sep 11 11:21:50 2024 -0700 Merge tag 'for-6.11/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fix from Mikulas Patocka: - fix a race condition in dm-integrity * tag 'for-6.11/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-integrity: fix a race condition when accessing recalc_sector commit 914413e3eecbaca5124fcff6286e61182532e7b9 Merge: 7c6a3a65ace70 2c83ded8aeec8 Author: Linus Torvalds Date: Wed Sep 11 11:13:20 2024 -0700 Merge tag 'printk-for-6.11-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fix from Petr Mladek: - Fix build of serial_core as a module * tag 'printk-for-6.11-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: Export match_devname_and_update_preferred_console() commit 7c6a3a65ace70f12b27b1a27c9a69cb791dc6e91 Author: Lorenzo Stoakes Date: Wed Sep 11 18:51:11 2024 +0100 minmax: reduce min/max macro expansion in atomisp driver Avoid unnecessary nested min()/max() which results in egregious macro expansion. Use clamp_t() as this introduces the least possible expansion, and turn the {s,u}DIGIT_FITTING() macros into inline functions to avoid the nested expansion. This resolves an issue with slackware 15.0 32-bit compilation as reported by Richard Narron. Presumably the min/max fixups would be difficult to backport, this patch should be easier and fix's Richard's problem in 5.15. Reported-by: Richard Narron Reviewed-by: Hans de Goede Closes: https://lore.kernel.org/all/4a5321bd-b1f-1832-f0c-cea8694dc5aa@aaazen.com/ Fixes: 867046cc7027 ("minmax: relax check to allow comparison between unsigned arguments and signed constants") Cc: stable@vger.kernel.org Signed-off-by: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit 4f9a71435953f941969a4f017e2357db62d85a86 Author: Arseniy Krasnov Date: Wed Sep 11 17:24:25 2024 +0300 ASoC: meson: axg-card: fix 'use-after-free' Buffer 'card->dai_link' is reallocated in 'meson_card_reallocate_links()', so move 'pad' pointer initialization after this function when memory is already reallocated. Kasan bug report: ================================================================== BUG: KASAN: slab-use-after-free in axg_card_add_link+0x76c/0x9bc Read of size 8 at addr ffff000000e8b260 by task modprobe/356 CPU: 0 PID: 356 Comm: modprobe Tainted: G O 6.9.12-sdkernel #1 Call trace: dump_backtrace+0x94/0xec show_stack+0x18/0x24 dump_stack_lvl+0x78/0x90 print_report+0xfc/0x5c0 kasan_report+0xb8/0xfc __asan_load8+0x9c/0xb8 axg_card_add_link+0x76c/0x9bc [snd_soc_meson_axg_sound_card] meson_card_probe+0x344/0x3b8 [snd_soc_meson_card_utils] platform_probe+0x8c/0xf4 really_probe+0x110/0x39c __driver_probe_device+0xb8/0x18c driver_probe_device+0x108/0x1d8 __driver_attach+0xd0/0x25c bus_for_each_dev+0xe0/0x154 driver_attach+0x34/0x44 bus_add_driver+0x134/0x294 driver_register+0xa8/0x1e8 __platform_driver_register+0x44/0x54 axg_card_pdrv_init+0x20/0x1000 [snd_soc_meson_axg_sound_card] do_one_initcall+0xdc/0x25c do_init_module+0x10c/0x334 load_module+0x24c4/0x26cc init_module_from_file+0xd4/0x128 __arm64_sys_finit_module+0x1f4/0x41c invoke_syscall+0x60/0x188 el0_svc_common.constprop.0+0x78/0x13c do_el0_svc+0x30/0x40 el0_svc+0x38/0x78 el0t_64_sync_handler+0x100/0x12c el0t_64_sync+0x190/0x194 Fixes: 7864a79f37b5 ("ASoC: meson: add axg sound card support") Cc: Stable@vger.kernel.org Signed-off-by: Arseniy Krasnov Reviewed-by: Jerome Brunet Link: https://patch.msgid.link/20240911142425.598631-1-avkrasnov@salutedevices.com Signed-off-by: Mark Brown commit 2a2a865aee43dd6f1ddbb0581c2a2cc205beb768 Author: Leo Li Date: Wed Sep 11 09:06:50 2024 -0400 drm/amd/display: Add all planes on CRTC to state for overlay cursor [Why] DC has a special commit path for native cursor, which use the built-in cursor pipe within DCN planes. This update path does not require all enabled planes to be added to the list of surface updates sent to DC. This is not the case for overlay cursor; it uses the same path as MPO commits. This update path requires all enabled planes to be added to the list of surface updates sent to DC. Otherwise, DC will disable planes not inside the list. [How] If overlay cursor is needed, add all planes on the same CRTC as this cursor to the atomic state. This is already done for non-cursor planes (MPO), just before the added lines. Fixes: 1b04dcca4fb1 ("drm/amd/display: Introduce overlay cursor mode") Closes: https://lore.kernel.org/lkml/f68020a3-c413-482d-beb2-5432d98a1d3e@amd.com Reviewed-by: Harry Wentland Signed-off-by: Leo Li Tested-by: Mikhail Gavrilov Signed-off-by: Alex Deucher (cherry picked from commit 0c8c5bdd7eaf291b6f727e98506fb68acee3a4cc) commit 38cc0334baabc5baf08a1db753de521e016c0432 Author: Su Hui Date: Wed Sep 11 19:54:50 2024 +0800 ASoC: codecs: avoid possible garbage value in peb2466_reg_read() Clang static checker (scan-build) warning: sound/soc/codecs/peb2466.c:232:8: Assigned value is garbage or undefined [core.uninitialized.Assign] 232 | *val = tmp; | ^ ~~~ When peb2466_read_byte() fails, 'tmp' will have a garbage value. Add a judgemnet to avoid this problem. Fixes: 227f609c7c0e ("ASoC: codecs: Add support for the Infineon PEB2466 codec") Signed-off-by: Su Hui Link: https://patch.msgid.link/20240911115448.277828-1-suhui@nfschina.com Signed-off-by: Mark Brown commit 0e7af99aef5f58b4bae00e45fd1c2626a987f7bb Merge: b97acde6f9840 61f2e8a3a9417 Author: Arnd Bergmann Date: Wed Sep 11 08:54:37 2024 +0000 Merge tag 'riscv-soc-fixes-for-v6.11-final' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V soc fixes for v6.11-final StarFive: A fix to return one of the clocks on the JH7110 from 1 GHz to 1.5 GHz Signed-off-by: Conor Dooley * tag 'riscv-soc-fixes-for-v6.11-final' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: jh7110-common: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHz Link: https://lore.kernel.org/r/20240909-hybrid-groovy-601a33b5b309@spud Signed-off-by: Arnd Bergmann commit b97acde6f9840edbac5c7ea07cba6f10308d24ee Author: Arnd Bergmann Date: Mon Sep 9 11:04:09 2024 +0000 platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency There is still a build failure when the rwrng support is in a loadable module but the mcu driver is built-in: arm-linux-gnueabi-ld: drivers/platform/cznic/turris-omnia-mcu-trng.o: in function `omnia_mcu_register_trng': turris-omnia-mcu-trng.c:(.text.omnia_mcu_register_trng+0x11c): undefined reference to `devm_hwrng_register' Change the dependency to explicitly disallow the broken configuration. Fixes: 41bb142a4028 ("platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG") Reviewed-by: Marek Behún Link: https://lore.kernel.org/r/20240909110417.247453-1-arnd@kernel.org Signed-off-by: Arnd Bergmann commit 233a95fd574fde1c375c486540a90304a2d2d49f Author: Krzysztof Kozlowski Date: Mon Sep 9 18:47:46 2024 +0200 soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" This reverts commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 because it breaks codecs using non-continuous masks in source and sink ports. The commit missed the point that port numbers are not used as indices for iterating over prop.sink_ports or prop.source_ports. Soundwire core and existing codecs expect that the array passed as prop.sink_ports and prop.source_ports is continuous. The port mask still might be non-continuous, but that's unrelated. Reported-by: Bard Liao Closes: https://lore.kernel.org/all/b6c75eee-761d-44c8-8413-2a5b34ee2f98@linux.intel.com/ Fixes: ab8d66d132bc ("soundwire: stream: fix programming slave ports for non-continous port maps") Acked-by: Bard Liao Reviewed-by: Charles Keepax Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20240909164746.136629-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 2c83ded8aeec85702571b7955c654278380b2b6d Merge: b0da640826ba3 3e5b2e81f17f1 Author: Petr Mladek Date: Wed Sep 11 09:30:22 2024 +0200 Merge branch 'for-6.11-fixup' into for-linus commit 7c1e5b9690b0e14acead4ff98d8a6c40f2dff54b Author: Charlie Jenkins Date: Tue Sep 3 15:52:34 2024 -0700 riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF The icache will be flushed in switch_to() if force_icache_flush is true, or in flush_icache_deferred() if icache_stale_mask is set. Between setting force_icache_flush to false and calculating the new icache_stale_mask, preemption needs to be disabled. There are two reasons for this: 1. If CPU migration happens between force_icache_flush = false, and the icache_stale_mask is set, an icache flush will not be emitted. 2. smp_processor_id() is used in set_icache_stale_mask() to mark the current CPU as not needing another flush since a flush will have happened either by userspace or by the kernel when performing the migration. smp_processor_id() is currently called twice with preemption enabled which causes a race condition. It allows icache_stale_mask to be populated with inconsistent CPU ids. Resolve these two issues by setting the icache_stale_mask before setting force_icache_flush to false, and using get_cpu()/put_cpu() to obtain the smp_processor_id(). Signed-off-by: Charlie Jenkins Fixes: 6b9391b581fd ("riscv: Include riscv_set_icache_flush_ctx prctl") Link: https://lore.kernel.org/r/20240903-fix_fencei_optimization-v2-1-8025f20171fc@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2840dadf0dde92638d13b97998026c5fcddbdceb Author: Alexandre Ghiti Date: Mon Aug 26 18:52:10 2024 +0200 drivers: perf: Fix smp_processor_id() use in preemptible code As reported in [1], the use of smp_processor_id() in pmu_sbi_device_probe() must be protected by disabling the preemption, so simple use get_cpu()/put_cpu() instead. Reported-by: Nam Cao Closes: https://lore.kernel.org/linux-riscv/20240820074925.ReMKUPP3@linutronix.de/ [1] Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Tested-by: Nam Cao Fixes: a8625217a054 ("drivers/perf: riscv: Implement SBI PMU snapshot function") Reported-by: Andrea Parri Tested-by: Andrea Parri Link: https://lore.kernel.org/r/20240826165210.124696-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit d1aaaa2e0a6742b2bc4d851eb1a2b6390dbde2d9 Merge: 3d731dc9b1236 27717f8b17c09 Author: Jakub Kicinski Date: Tue Sep 10 20:15:10 2024 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-09-09 (ice, igb) This series contains updates to ice and igb drivers. Martyna moves LLDP rule removal to the proper uninitialization function for ice. Jake corrects accounting logic for FWD_TO_VSI_LIST switch filters on ice. Przemek removes incorrect, explicit calls to pci_disable_device() for ice. Michal Schmidt stops incorrect use of VSI list for VLAN use on ice. Sriram Yagnaraman adjusts igb_xdp_ring_update_tail() to be called under Tx lock on igb. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igb: Always call igb_xdp_ring_update_tail() under Tx lock ice: fix VSI lists confusion when adding VLANs ice: stop calling pci_disable_device() as we use pcim ice: fix accounting for filters shared by multiple VSIs ice: Fix lldp packets dropping after changing the number of channels ==================== Link: https://patch.msgid.link/20240909203842.3109822-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3d731dc9b123610bb7a25c7e13c38666a1069e8c Merge: 330dadacc59c2 b1d305abef464 Author: Jakub Kicinski Date: Tue Sep 10 20:11:40 2024 -0700 Merge tag 'mlx5-fixes-2024-09-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2024-09-09 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2024-09-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Fix bridge mode operations when there are no VFs net/mlx5: Verify support for scheduling element and TSAR type net/mlx5: Add missing masks and QoS bit masks for scheduling elements net/mlx5: Explicitly set scheduling element and TSAR type net/mlx5e: Add missing link mode to ptys2ext_ethtool_map net/mlx5e: Add missing link modes to ptys2ethtool_map net/mlx5: Update the list of the PCI supported devices ==================== Link: https://patch.msgid.link/20240909194505.69715-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 330dadacc59c2290e0fae47736ccd26b74aa1fd9 Author: Kory Maincent Date: Mon Sep 9 13:43:36 2024 +0200 MAINTAINERS: Add ethtool pse-pd to PSE NETWORK DRIVER Add net/ethtool/pse-pd.c to PSE NETWORK DRIVER to receive emails concerning modifications to the ethtool part. Reviewed-by: Oleksij Rempel Signed-off-by: Kory Maincent Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240909114336.362174-1-kory.maincent@bootlin.com Signed-off-by: Jakub Kicinski commit 2f9caba9b2f68639047d67d7cbfa98f7f2ac3180 Author: Wei Fang Date: Mon Sep 9 09:21:52 2024 +0800 dt-bindings: net: tja11xx: fix the broken binding As Rob pointed in another mail thread [1], the binding of tja11xx PHY is completely broken, the schema cannot catch the error in the DTS. A compatiable string must be needed if we want to add a custom propety. So extract known PHY IDs from the tja11xx PHY drivers and convert them into supported compatible string list to fix the broken binding issue. Fixes: 52b2fe4535ad ("dt-bindings: net: tja11xx: add nxp,refclk_in property") Link: https://lore.kernel.org/31058f49-bac5-49a9-a422-c43b121bf049@kernel.org # [1] Signed-off-by: Wei Fang Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240909012152.431647-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit e8a63d473b49011a68a748aea1c8aefa046ebacf Author: Sean Anderson Date: Fri Sep 6 17:07:43 2024 -0400 selftests: net: csum: Fix checksums for packets with non-zero padding Padding is not included in UDP and TCP checksums. Therefore, reduce the length of the checksummed data to include only the data in the IP payload. This fixes spurious reported checksum failures like rx: pkt: sport=33000 len=26 csum=0xc850 verify=0xf9fe pkt: bad csum Technically it is possible for there to be trailing bytes after the UDP data but before the Ethernet padding (e.g. if sizeof(ip) + sizeof(udp) + udp.len < ip.len). However, we don't generate such packets. Fixes: 91a7de85600d ("selftests/net: add csum offload test") Signed-off-by: Sean Anderson Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240906210743.627413-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit 3f62ea572b3e8e3f10c39a9cb4f04ca9ae5f2952 Author: Tomas Paukrt Date: Fri Sep 6 12:52:40 2024 +0200 net: phy: dp83822: Fix NULL pointer dereference on DP83825 devices The probe() function is only used for DP83822 and DP83826 PHY, leaving the private data pointer uninitialized for the DP83825 models which causes a NULL pointer dereference in the recently introduced/changed functions dp8382x_config_init() and dp83822_set_wol(). Add the dp8382x_probe() function, so all PHY models will have a valid private data pointer to fix this issue and also prevent similar issues in the future. Fixes: 9ef9ecfa9e9f ("net: phy: dp8382x: keep WOL settings across suspends") Signed-off-by: Tomas Paukrt Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/66w.ZbGt.65Ljx42yHo5.1csjxu@seznam.cz Signed-off-by: Jakub Kicinski commit 17ea4383649fdeaff3181ddcf1ff03350d42e591 Author: Alex Deucher Date: Fri Sep 6 10:42:45 2024 -0400 drm/amdgpu/atomfirmware: Silence UBSAN warning Per the comments, these are variable sized arrays. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher (cherry picked from commit 81f7804ba84ee617ed594de934ed87bcc4f83531) Cc: stable@vger.kernel.org commit 8409fb50ce48d66cf9dc5391f03f05c56c430605 Author: David (Ming Qiang) Wu Date: Thu Sep 5 16:57:28 2024 -0400 drm/amd/amdgpu: apply command submission parser for JPEG v1 Similar to jpeg_v2_dec_ring_parse_cs() but it has different register ranges and a few other registers access. Acked-by: Alex Deucher Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher (cherry picked from commit 3d5adbdf1d01708777f2eda375227cbf7a98b9fe) Cc: stable@vger.kernel.org commit 3a23aa0b9c24c682c506121e2e0f6cbcfdae9076 Author: David (Ming Qiang) Wu Date: Fri Aug 16 11:43:05 2024 -0400 drm/amd/amdgpu: apply command submission parser for JPEG v2+ This patch extends the same cs parser from JPEG v4.0.3 to other JPEG versions (v2 and above). Rename to more common name as jpeg_v2_dec_ring_parse_cs() from jpeg_v4_0_3_dec_ring_parse_cs(). Acked-by: Alex Deucher Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher (cherry picked from commit 88dcad2d07c8d82e6a097c8e74239eb67333bcf7) Cc: stable@vger.kernel.org commit 7a0982523cf3ff00f35b210fc3405c528a2ce7af Author: Kenneth Feng Date: Fri Sep 6 20:46:54 2024 +0800 drm/amd/pm: fix the pp_dpm_pcie issue on smu v14.0.2/3 fix the pp_dpm_pcie issue on smu v14.0.2/3 as below: 0: 2.5GT/s, x4 250Mhz 1: 8.0GT/s, x4 616Mhz * 2: 8.0GT/s, x4 1143Mhz * the middle level can be removed since it is always skipped on smu v14.0.2/3 Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit fedf6db3ea9dc5eda0b78cfbbb8f7a88b97e5b24) commit 612e3bacf8009e329342934ce403fd4ca553beba Author: Kenneth Feng Date: Thu Sep 5 15:38:18 2024 +0800 drm/amd/pm: update the features set on smu v14.0.2/3 update the features set on smu v14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit 25d48f2eb0af1f0e6f09f54a1a1716f48c0722c9) commit c5b1a06697eae4d365691195ab2e0b45539bc2a9 Author: Leo Li Date: Thu Sep 5 18:45:04 2024 -0400 drm/amd/display: Do not reset planes based on crtc zpos_changed [Why] drm_normalize_zpos will set the crtc_state->zpos_changed to 1 if any of it's assigned planes changes zpos, or is removed/added from it. To have amdgpu_dm request a plane reset on this is too broad. For example, if only the cursor plane was moved from one crtc to another, the crtc's zpos_changed will be set to true. But that does not mean that the underlying primary plane requires a reset. [How] Narrow it down so that only the plane that has a change in zpos will require a reset. As a future TODO, we can further optimize this by only requiring a reset on z-order change. Z-order is different from z-pos, since a zpos change doesn't necessarily mean the z-ordering changed, and DC should only require a reset if the z-ordering changed. For example, the following zpos update does not change z-ordering: Plane A: zpos 2 -> 3 Plane B: zpos 1 -> 2 => Plane A is still on top of plane B: no reset needed Whereas this one does change z-ordering: Plane A: zpos 2 -> 1 Plane B: zpos 1 -> 2 => Plane A changed from on top, to below plane B: reset needed Fixes: 38e0c3df6dbd ("drm/amd/display: Move PRIMARY plane zpos higher") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3569 Signed-off-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher (cherry picked from commit 578aab4ecc73476393389440724b7a391cc0cea9) commit e835d5144f5ef78e4f8828c63e2f0d61144f283a Author: Tobias Jakobi Date: Mon Sep 2 11:40:27 2024 +0200 drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct() dc_state_destruct() nulls the resource context of the DC state. The pipe context passed to dcn35_set_drr() is a member of this resource context. If dc_state_destruct() is called parallel to the IRQ processing (which calls dcn35_set_drr() at some point), we can end up using already nulled function callback fields of struct stream_resource. The logic in dcn35_set_drr() already tries to avoid this, by checking tg against NULL. But if the nulling happens exactly after the NULL check and before the next access, then we get a race. Avoid this by copying tg first to a local variable, and then use this variable for all the operations. This should work, as long as nobody frees the resource pool where the timing generators live. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3142 Fixes: 06ad7e164256 ("drm/amd/display: Destroy DC context while keeping DML and DML2") Signed-off-by: Tobias Jakobi Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher (cherry picked from commit 0607a50c004798a96e62c089a4c34c220179dcb5) Cc: stable@vger.kernel.org commit a7aeb03888b92304e2fc7d4d1c242f54a312561b Author: Tobias Jakobi Date: Mon Sep 2 11:40:26 2024 +0200 drm/amd/display: Avoid race between dcn10_set_drr() and dc_state_destruct() dc_state_destruct() nulls the resource context of the DC state. The pipe context passed to dcn10_set_drr() is a member of this resource context. If dc_state_destruct() is called parallel to the IRQ processing (which calls dcn10_set_drr() at some point), we can end up using already nulled function callback fields of struct stream_resource. The logic in dcn10_set_drr() already tries to avoid this, by checking tg against NULL. But if the nulling happens exactly after the NULL check and before the next access, then we get a race. Avoid this by copying tg first to a local variable, and then use this variable for all the operations. This should work, as long as nobody frees the resource pool where the timing generators live. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3142 Fixes: 06ad7e164256 ("drm/amd/display: Destroy DC context while keeping DML and DML2") Signed-off-by: Tobias Jakobi Tested-by: Raoul van Rüschen Tested-by: Christopher Snowhill Reviewed-by: Harry Wentland Tested-by: Sefa Eyeoglu Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher (cherry picked from commit a3cc326a43bdc48fbdf53443e1027a03e309b643) Cc: stable@vger.kernel.org commit 02c132166993c8f8ca1b319665181f72f22ebc6b Author: David Belanger Date: Fri Aug 23 13:50:03 2024 -0400 drm/amdkfd: Add cache line size info Populate cache line size info in topology based on information from IP discovery table. Signed-off-by: David Belanger Reviewed-by: Sreekant Somasekharan Signed-off-by: Alex Deucher (cherry picked from commit 4e9fadacddca96a2e6fcee9cc9488b78eb7a6953) commit 734e1a8603128ac31526c477a39456be5f4092b6 Author: Damien Le Moal Date: Sun Sep 8 09:07:04 2024 +0900 block: Prevent deadlocks when switching elevators Commit af2814149883 ("block: freeze the queue in queue_attr_store") changed queue_attr_store() to always freeze a sysfs attribute queue before calling the attribute store() method, to ensure that no IOs are in-flight when an attribute value is being updated. However, this change created a potential deadlock situation for the scheduler queue attribute as changing the queue elevator with elv_iosched_store() can result in a call to request_module() if the user requested module is not already registered. If the file of the requested module is stored on the block device of the frozen queue, a deadlock will happen as the read operations triggered by request_module() will wait for the queue freeze to end. Solve this issue by introducing the load_module method in struct queue_sysfs_entry, and to calling this method function in queue_attr_store() before freezing the attribute queue. The macro definition QUEUE_RW_LOAD_MODULE_ENTRY() is added to define a queue sysfs attribute that needs loading a module. The definition of the scheduler atrribute is changed to using QUEUE_RW_LOAD_MODULE_ENTRY(), with the function elv_iosched_load_module() defined as the load_module method. elv_iosched_store() can then be simplified to remove the call to request_module(). Reported-by: Richard W.M. Jones Reported-by: Jiri Jaburek Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219166 Fixes: af2814149883 ("block: freeze the queue in queue_attr_store") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Tested-by: Richard W.M. Jones Link: https://lore.kernel.org/r/20240908000704.414538-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 45c690aea8ee5b7d012cd593bd288540a4bfdbf0 Author: Lu Baolu Date: Mon Sep 2 09:47:00 2024 +0800 drm/tegra: Use iommu_paging_domain_alloc() Commit <17de3f5fdd35> ("iommu: Retire bus ops") removes iommu ops from the bus structure. The iommu subsystem no longer relies on bus for operations. So iommu_domain_alloc() interface is no longer relevant. Replace iommu_domain_alloc() with iommu_paging_domain_alloc() which takes the physical device from which the host1x_device virtual device was instantiated. This physical device is a common parent to all physical devices that are part of the virtual device. Suggested-by: Thierry Reding Signed-off-by: Lu Baolu Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20240902014700.66095-4-baolu.lu@linux.intel.com commit d8c07bee1e636db7ee6ab64b958f7bfdd9ff8c1e Author: Lu Baolu Date: Mon Sep 2 09:46:59 2024 +0800 drm/rockchip: Use iommu_paging_domain_alloc() Commit <421be3ee36a4> ("drm/rockchip: Refactor IOMMU initialisation") has refactored rockchip_drm_init_iommu() to pass a device that the domain is allocated for. Replace iommu_domain_alloc() with iommu_paging_domain_alloc() to retire the former. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Acked-by: Andy Yan Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20240902014700.66095-3-baolu.lu@linux.intel.com commit 8d8d276ba2fb5f9ac4984f5c10ae60858090babc Merge: bc83b4d1f0869 4e378158e5c15 Author: Linus Torvalds Date: Tue Sep 10 09:05:20 2024 -0700 Merge tag 'trace-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Move declaration of interface_lock outside of CONFIG_TIMERLAT_TRACER The fix to some locking races moved the declaration of the interface_lock up in the file, but also moved it into the CONFIG_TIMERLAT_TRACER #ifdef block, breaking the build when that wasn't set. Move it further up and out of that #ifdef block. - Remove unused function run_tracer_selftest() stub When CONFIG_FTRACE_STARTUP_TEST is not set the stub function run_tracer_selftest() is not used and clang is warning about it. Remove the function stub as it is not needed. * tag 'trace-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Drop unused helper function to fix the build tracing/osnoise: Fix build when timerlat is not enabled commit 48aa361c5db0b380c2b75c24984c0d3e7c1e8c09 Merge: fef2843bb49f4 111fc9f517cb2 Author: Jakub Kicinski Date: Tue Sep 10 09:01:08 2024 -0700 Merge branch 'revert-virtio_net-rx-enable-premapped-mode-by-default' Xuan Zhuo says: ==================== Revert "virtio_net: rx enable premapped mode by default" Regression: http://lore.kernel.org/8b20cc28-45a9-4643-8e87-ba164a540c0a@oracle.com ==================== Link: https://patch.msgid.link/20240906123137.108741-1-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 111fc9f517cb293c4213673733b980123c3b0209 Author: Xuan Zhuo Date: Fri Sep 6 20:31:37 2024 +0800 virtio_net: disable premapped mode by default Now, the premapped mode encounters some problem. http://lore.kernel.org/all/8b20cc28-45a9-4643-8e87-ba164a540c0a@oracle.com So we disable the premapped mode by default. We can re-enable it in the future. Fixes: f9dac92ba908 ("virtio_ring: enable premapped mode whatever use_dma_api") Reported-by: "Si-Wei Liu" Closes: http://lore.kernel.org/all/8b20cc28-45a9-4643-8e87-ba164a540c0a@oracle.com Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Tested-by: Takero Funaki Link: https://patch.msgid.link/20240906123137.108741-4-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 38eef112a8e547b8c207b2a521ad4b077d792100 Author: Xuan Zhuo Date: Fri Sep 6 20:31:36 2024 +0800 Revert "virtio_net: big mode skip the unmap check" This reverts commit a377ae542d8d0a20a3173da3bbba72e045bea7a9. Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Tested-by: Takero Funaki Link: https://patch.msgid.link/20240906123137.108741-3-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit dc4547fbba874718af76e5c28c815fcef5c13c6c Author: Xuan Zhuo Date: Fri Sep 6 20:31:35 2024 +0800 Revert "virtio_net: rx remove premapped failover code" This reverts commit defd28aa5acb0fd7c15adc6bc40a8ac277d04dea. Recover the code to disable premapped mode. Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Tested-by: Takero Funaki Link: https://patch.msgid.link/20240906123137.108741-2-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 8c7c44be57672e1474bf15a451011c291e85fda4 Author: T.J. Mercier Date: Mon Sep 9 20:53:59 2024 +0000 drm/syncobj: Fix syncobj leak in drm_syncobj_eventfd_ioctl A syncobj reference is taken in drm_syncobj_find, but not released if eventfd_ctx_fdget or kzalloc fails. Put the reference in these error paths. Reported-by: Xingyu Jin Fixes: c7a472297169 ("drm/syncobj: add IOCTL to register an eventfd") Signed-off-by: T.J. Mercier Reviewed-by: Tvrtko Ursulin Reviewed-by. Christian König CC: stable@vger.kernel.org # 6.6+ Link: https://patchwork.freedesktop.org/patch/msgid/20240909205400.3498337-1-tjmercier@google.com Signed-off-by: Christian König commit c6b9a92225d1365197effcb3afc56ddd62fc36aa Author: Pierre-Louis Bossart Date: Tue Sep 10 22:30:21 2024 +0800 MAINTAINERS: update Pierre Bossart's email and role Update to permanent address and Reviewer role. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20240910143021.261261-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit d6de45e3c6f3713d3825d3e2860c11d24e0f941f Author: Bas Nieuwenhuizen Date: Tue Sep 10 00:35:03 2024 +0200 platform/x86: asus-wmi: Disable OOBE experience on Zenbook S 16 The OOBE experience fades the keyboard backlight in & out continuously, and make the backlight uncontrollable using its device. Workaround taken from https://wiki.archlinux.org/index.php?title=ASUS_Zenbook_UM5606&diff=next&oldid=815547 Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Luke D. Jones Link: https://lore.kernel.org/r/20240909223503.1445779-1-bas@basnieuwenhuizen.nl Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 7b565174492699fed52c5e4ef1326f948a74b466 Author: Arnd Bergmann Date: Fri Jul 19 09:54:41 2024 +0200 drm/stm: add COMMON_CLK dependency The added lvds driver and a change in the dsi driver resulted in failed builds when COMMON_CLK is disabled: x86_64-linux-ld: drivers/gpu/drm/stm/dw_mipi_dsi-stm.o: in function `dw_mipi_dsi_stm_remove': dw_mipi_dsi-stm.c:(.text+0x51e): undefined reference to `clk_hw_unregister' x86_64-linux-ld: drivers/gpu/drm/stm/lvds.o: in function `lvds_remove': lvds.c:(.text+0xe3): undefined reference to `of_clk_del_provider' x86_64-linux-ld: lvds.c:(.text+0xec): undefined reference to `clk_hw_unregister' x86_64-linux-ld: drivers/gpu/drm/stm/lvds.o: in function `lvds_pll_config': lvds.c:(.text+0xb5d): undefined reference to `clk_hw_get_rate' x86_64-linux-ld: drivers/gpu/drm/stm/lvds.o: in function `lvds_probe': lvds.c:(.text+0x1476): undefined reference to `clk_hw_register' x86_64-linux-ld: lvds.c:(.text+0x148b): undefined reference to `of_clk_hw_simple_get' x86_64-linux-ld: lvds.c:(.text+0x1493): undefined reference to `of_clk_add_hw_provider' x86_64-linux-ld: lvds.c:(.text+0x1535): undefined reference to `clk_hw_unregister' Add this as a dependency for the stm driver itself, since it will be required in practice anyway. Fixes: 185f99b61442 ("drm/stm: dsi: expose DSI PHY internal clock") Fixes: aca1cbc1c986 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver") Signed-off-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/20240719075454.3595358-1-arnd@kernel.org Signed-off-by: Raphael Gallais-Pou (cherry picked from commit 26dbffb2a4c4d4639c7b336f6b74a437c23dadd4) Signed-off-by: Maxime Ripard commit fef2843bb49f414d1523ca007d088071dee0e055 Author: Jacky Chou Date: Fri Sep 6 14:28:31 2024 +0800 net: ftgmac100: Enable TX interrupt to avoid TX timeout Currently, the driver only enables RX interrupt to handle RX packets and TX resources. Sometimes there is not RX traffic, so the TX resource needs to wait for RX interrupt to free. This situation will toggle the TX timeout watchdog when the MAC TX ring has no more resources to transmit packets. Therefore, enable TX interrupt to release TX resources at any time. When I am verifying iperf3 over UDP, the network hangs. Like the log below. root# iperf3 -c 192.168.100.100 -i1 -t10 -u -b0 Connecting to host 192.168.100.100, port 5201 [ 4] local 192.168.100.101 port 35773 connected to 192.168.100.100 port 5201 [ ID] Interval Transfer Bandwidth Total Datagrams [ 4] 0.00-20.42 sec 160 KBytes 64.2 Kbits/sec 20 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 [ 4] 20.42-20.42 sec 0.00 Bytes 0.00 bits/sec 0 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 4] 0.00-20.42 sec 160 KBytes 64.2 Kbits/sec 0.000 ms 0/20 (0%) [ 4] Sent 20 datagrams iperf3: error - the server has terminated The network topology is FTGMAC connects directly to a PC. UDP does not need to wait for ACK, unlike TCP. Therefore, FTGMAC needs to enable TX interrupt to release TX resources instead of waiting for the RX interrupt. Fixes: 10cbd6407609 ("ftgmac100: Rework NAPI & interrupts handling") Signed-off-by: Jacky Chou Link: https://patch.msgid.link/20240906062831.2243399-1-jacky_chou@aspeedtech.com Signed-off-by: Paolo Abeni commit 6db9df4f7055eb4ea339e7b83ca676edd9ec1277 Author: Ben Skeggs Date: Thu Sep 5 09:24:18 2024 +1000 drm/nouveau/fb: restore init() for ramgp102 init() was removed from ramgp102 when reworking the memory detection, as it was thought that the code was only necessary when the driver performs mclk changes, which nouveau doesn't support on pascal. However, it turns out that we still need to execute this on some GPUs to restore settings after DEVINIT, so revert to the original behaviour. v2: fix tags in commit message, cc stable Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/319 Fixes: 2c0c15a22fa0 ("drm/nouveau/fb/gp102-ga100: switch to simpler vram size detection method") Cc: stable@vger.kernel.org # 6.6+ Signed-off-by: Ben Skeggs Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240904232418.8590-1-bskeggs@nvidia.com commit 019aba04f08c2102b35ce7fee9d4628d349f56c0 Author: Naveen Mamindlapalli Date: Fri Sep 6 10:28:38 2024 +0530 octeontx2-af: Modify SMQ flush sequence to drop packets The current implementation of SMQ flush sequence waits for the packets in the TM pipeline to be transmitted out of the link. This sequence doesn't succeed in HW when there is any issue with link such as lack of link credits, link down or any other traffic that is fully occupying the link bandwidth (QoS). This patch modifies the SMQ flush sequence to drop the packets after TL1 level (SQM) instead of polling for the packets to be sent out of RPM/CGX link. Fixes: 5d9b976d4480 ("octeontx2-af: Support fixed transmit scheduler topology") Signed-off-by: Naveen Mamindlapalli Reviewed-by: Sunil Kovvuri Goutham Link: https://patch.msgid.link/20240906045838.1620308-1-naveenm@marvell.com Signed-off-by: Paolo Abeni commit d3d37f74683e2f16f2635ee265884f7ca69350ae Author: Nikita Zhandarovich Date: Thu Jul 25 08:59:25 2024 -0700 drm/i915/guc: prevent a possible int overflow in wq offsets It may be possible for the sum of the values derived from i915_ggtt_offset() and __get_parent_scratch_offset()/ i915_ggtt_offset() to go over the u32 limit before being assigned to wq offsets of u64 type. Mitigate these issues by expanding one of the right operands to u64 to avoid any overflow issues just in case. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: c2aa552ff09d ("drm/i915/guc: Add multi-lrc context registration") Cc: Matthew Brost Cc: John Harrison Signed-off-by: Nikita Zhandarovich Link: https://patchwork.freedesktop.org/patch/msgid/20240725155925.14707-1-n.zhandarovich@fintech.ru Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi (cherry picked from commit 1f1c1bd56620b80ae407c5790743e17caad69cec) Signed-off-by: Tvrtko Ursulin commit 4c8002277167125078e6b9b90137bdf443ebaa08 Author: Muhammad Usama Anjum Date: Fri Sep 6 15:28:39 2024 +0500 fou: fix initialization of grc The grc must be initialize first. There can be a condition where if fou is NULL, goto out will be executed and grc would be used uninitialized. Fixes: 7e4196935069 ("fou: Fix null-ptr-deref in GRO.") Signed-off-by: Muhammad Usama Anjum Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20240906102839.202798-1-usama.anjum@collabora.com Signed-off-by: Jakub Kicinski commit a4d89b11aca3ffa73e234f06685261ce85e5fb41 Author: Satya Priya Kakitapalli Date: Fri Sep 6 17:09:05 2024 +0530 clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val() In zonda_pll_adjust_l_val() replace the divide operator with comparison operator to fix below build error and smatch warning. drivers/clk/qcom/clk-alpha-pll.o: In function `clk_zonda_pll_set_rate': clk-alpha-pll.c:(.text+0x45dc): undefined reference to `__aeabi_uldivmod' smatch warnings: drivers/clk/qcom/clk-alpha-pll.c:2129 zonda_pll_adjust_l_val() warn: replace divide condition '(remainder * 2) / prate' with '(remainder * 2) >= prate' Fixes: f4973130d255 ("clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL") Reported-by: Jon Hunter Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202408110724.8pqbpDiD-lkp@intel.com/ Signed-off-by: Satya Priya Kakitapalli Link: https://lore.kernel.org/r/20240906113905.641336-1-quic_skakitap@quicinc.com Reviewed-by: Vladimir Zapolskiy Tested-by: Jon Hunter Signed-off-by: Stephen Boyd commit 4e378158e5c15bd237a6ff44b7abb9184d61208c Author: Andy Shevchenko Date: Mon Sep 9 13:53:14 2024 +0300 tracing: Drop unused helper function to fix the build A helper function defined but not used. This, in particular, prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: kernel/trace/trace.c:2229:19: error: unused function 'run_tracer_selftest' [-Werror,-Wunused-function] 2229 | static inline int run_tracer_selftest(struct tracer *type) | ^~~~~~~~~~~~~~~~~~~ Fix this by dropping unused functions. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Link: https://lore.kernel.org/20240909105314.928302-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Steven Rostedt (Google) commit af178143343028fdec9d5960a22d17f5587fd3f5 Author: Steven Rostedt Date: Mon Sep 9 10:32:31 2024 -0400 tracing/osnoise: Fix build when timerlat is not enabled To fix some critical section races, the interface_lock was added to a few locations. One of those locations was above where the interface_lock was declared, so the declaration was moved up before that usage. Unfortunately, where it was placed was inside a CONFIG_TIMERLAT_TRACER ifdef block. As the interface_lock is used outside that config, this broke the build when CONFIG_OSNOISE_TRACER was enabled but CONFIG_TIMERLAT_TRACER was not. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: "Helena Anna" Cc: "Luis Claudio R. Goncalves" Cc: Tomas Glozar Link: https://lore.kernel.org/20240909103231.23a289e2@gandalf.local.home Fixes: e6a53481da29 ("tracing/timerlat: Only clear timer if a kthread exists") Reported-by: "Bityutskiy, Artem" Signed-off-by: Steven Rostedt (Google) commit b1d305abef4640af1b4f1b4774d513cd81b10cfc Author: Benjamin Poirier Date: Fri Aug 30 08:39:27 2024 -0400 net/mlx5: Fix bridge mode operations when there are no VFs Currently, trying to set the bridge mode attribute when numvfs=0 leads to a crash: bridge link set dev eth2 hwmode vepa [ 168.967392] BUG: kernel NULL pointer dereference, address: 0000000000000030 [...] [ 168.969989] RIP: 0010:mlx5_add_flow_rules+0x1f/0x300 [mlx5_core] [...] [ 168.976037] Call Trace: [ 168.976188] [ 168.978620] _mlx5_eswitch_set_vepa_locked+0x113/0x230 [mlx5_core] [ 168.979074] mlx5_eswitch_set_vepa+0x7f/0xa0 [mlx5_core] [ 168.979471] rtnl_bridge_setlink+0xe9/0x1f0 [ 168.979714] rtnetlink_rcv_msg+0x159/0x400 [ 168.980451] netlink_rcv_skb+0x54/0x100 [ 168.980675] netlink_unicast+0x241/0x360 [ 168.980918] netlink_sendmsg+0x1f6/0x430 [ 168.981162] ____sys_sendmsg+0x3bb/0x3f0 [ 168.982155] ___sys_sendmsg+0x88/0xd0 [ 168.985036] __sys_sendmsg+0x59/0xa0 [ 168.985477] do_syscall_64+0x79/0x150 [ 168.987273] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 168.987773] RIP: 0033:0x7f8f7950f917 (esw->fdb_table.legacy.vepa_fdb is null) The bridge mode is only relevant when there are multiple functions per port. Therefore, prevent setting and getting this setting when there are no VFs. Note that after this change, there are no settings to change on the PF interface using `bridge link` when there are no VFs, so the interface no longer appears in the `bridge link` output. Fixes: 4b89251de024 ("net/mlx5: Support ndo bridge_setlink and getlink") Signed-off-by: Benjamin Poirier Reviewed-by: Cosmin Ratiu Signed-off-by: Saeed Mahameed commit 861cd9b9cb62feb244b8d77e68fd6ddedbbf66e9 Author: Carolina Jubran Date: Mon Aug 5 13:13:03 2024 +0300 net/mlx5: Verify support for scheduling element and TSAR type Before creating a scheduling element in a NIC or E-Switch scheduler, ensure that the requested element type is supported. If the element is of type Transmit Scheduling Arbiter (TSAR), also verify that the specific TSAR type is supported. Fixes: 214baf22870c ("net/mlx5e: Support HTB offload") Fixes: 85c5f7c9200e ("net/mlx5: E-switch, Create QoS on demand") Fixes: 0fe132eac38c ("net/mlx5: E-switch, Allow to add vports to rate groups") Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Saeed Mahameed commit 452ef7f86036392005940de54228d42ca0044192 Author: Carolina Jubran Date: Mon Aug 5 10:03:20 2024 +0300 net/mlx5: Add missing masks and QoS bit masks for scheduling elements Add the missing masks for supported element types and Transmit Scheduling Arbiter (TSAR) types in scheduling elements. Also, add the corresponding bit masks for these types in the QoS capabilities of a NIC scheduler. Fixes: 214baf22870c ("net/mlx5e: Support HTB offload") Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Saeed Mahameed commit c88146abe4d0f8cf659b2b8883fdc33936d2e3b8 Author: Carolina Jubran Date: Mon Sep 2 11:46:14 2024 +0300 net/mlx5: Explicitly set scheduling element and TSAR type Ensure the scheduling element type and TSAR type are explicitly initialized in the QoS rate group creation. This prevents potential issues due to default values. Fixes: 1ae258f8b343 ("net/mlx5: E-switch, Introduce rate limiting groups API") Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Saeed Mahameed commit 80bf474242b21d64a514fd2bb65faa7a17ca8d8d Author: Shahar Shitrit Date: Sun Aug 11 13:58:04 2024 +0300 net/mlx5e: Add missing link mode to ptys2ext_ethtool_map Add MLX5E_400GAUI_8_400GBASE_CR8 to the extended modes in ptys2ext_ethtool_table, since it was missing. Fixes: 6a897372417e ("net/mlx5: ethtool, Add ethtool support for 50Gbps per lane link modes") Signed-off-by: Shahar Shitrit Reviewed-by: Tariq Toukan Reviewed-by: Carolina Jubran Signed-off-by: Saeed Mahameed commit 7617d62cba4a8a3ff3ed3fda0171c43f135c142e Author: Shahar Shitrit Date: Sun Aug 11 13:56:13 2024 +0300 net/mlx5e: Add missing link modes to ptys2ethtool_map Add MLX5E_1000BASE_T and MLX5E_100BASE_TX to the legacy modes in ptys2legacy_ethtool_table, since they were missing. Fixes: 665bc53969d7 ("net/mlx5e: Use new ethtool get/set link ksettings API") Signed-off-by: Shahar Shitrit Reviewed-by: Tariq Toukan Reviewed-by: Carolina Jubran Signed-off-by: Saeed Mahameed commit 7472d157cb8014103105433bcc0705af2e6f7184 Author: Maher Sanalla Date: Thu Aug 15 11:02:34 2024 +0300 net/mlx5: Update the list of the PCI supported devices Add the upcoming ConnectX-9 device ID to the table of supported PCI device IDs. Fixes: f908a35b2218 ("net/mlx5: Update the list of the PCI supported devices") Signed-off-by: Maher Sanalla Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 27717f8b17c098c4373ddb8fe89e1a1899c7779d Author: Sriram Yagnaraman Date: Thu Aug 22 09:42:07 2024 +0200 igb: Always call igb_xdp_ring_update_tail() under Tx lock Always call igb_xdp_ring_update_tail() under __netif_tx_lock, add a comment and lockdep assert to indicate that. This is needed to share the same TX ring between XDP, XSK and slow paths. Furthermore, the current XDP implementation is racy on tail updates. Fixes: 9cbc948b5a20 ("igb: add XDP support") Signed-off-by: Sriram Yagnaraman [Kurt: Add lockdep assert and fixes tag] Signed-off-by: Kurt Kanzenbach Acked-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit d2940002b0aa42898de815a1453b29d440292386 Author: Michal Schmidt Date: Wed Sep 4 11:39:22 2024 +0200 ice: fix VSI lists confusion when adding VLANs The description of function ice_find_vsi_list_entry says: Search VSI list map with VSI count 1 However, since the blamed commit (see Fixes below), the function no longer checks vsi_count. This causes a problem in ice_add_vlan_internal, where the decision to share VSI lists between filter rules relies on the vsi_count of the found existing VSI list being 1. The reproducing steps: 1. Have a PF and two VFs. There will be a filter rule for VLAN 0, referring to a VSI list containing VSIs: 0 (PF), 2 (VF#0), 3 (VF#1). 2. Add VLAN 1234 to VF#0. ice will make the wrong decision to share the VSI list with the new rule. The wrong behavior may not be immediately apparent, but it can be observed with debug prints. 3. Add VLAN 1234 to VF#1. ice will unshare the VSI list for the VLAN 1234 rule. Due to the earlier bad decision, the newly created VSI list will contain VSIs 0 (PF) and 3 (VF#1), instead of expected 2 (VF#0) and 3 (VF#1). 4. Try pinging a network peer over the VLAN interface on VF#0. This fails. Reproducer script at: https://gitlab.com/mschmidt2/repro/-/blob/master/RHEL-46814/test-vlan-vsi-list-confusion.sh Commented debug trace: https://gitlab.com/mschmidt2/repro/-/blob/master/RHEL-46814/ice-vlan-vsi-lists-debug.txt Patch adding the debug prints: https://gitlab.com/mschmidt2/linux/-/commit/f8a8814623944a45091a77c6094c40bfe726bfdb (Unsafe, by the way. Lacks rule_lock when dumping in ice_remove_vlan.) Michal Swiatkowski added to the explanation that the bug is caused by reusing a VSI list created for VLAN 0. All created VFs' VSIs are added to VLAN 0 filter. When a non-zero VLAN is created on a VF which is already in VLAN 0 (normal case), the VSI list from VLAN 0 is reused. It leads to a problem because all VFs (VSIs to be specific) that are subscribed to VLAN 0 will now receive a new VLAN tag traffic. This is one bug, another is the bug described above. Removing filters from one VF will remove VLAN filter from the previous VF. It happens a VF is reset. Example: - creation of 3 VFs - we have VSI list (used for VLAN 0) [0 (pf), 2 (vf1), 3 (vf2), 4 (vf3)] - we are adding VLAN 100 on VF1, we are reusing the previous list because 2 is there - VLAN traffic works fine, but VLAN 100 tagged traffic can be received on all VSIs from the list (for example broadcast or unicast) - trust is turning on VF2, VF2 is resetting, all filters from VF2 are removed; the VLAN 100 filter is also removed because 3 is on the list - VLAN traffic to VF1 isn't working anymore, there is a need to recreate VLAN interface to readd VLAN filter One thing I'm not certain about is the implications for the LAG feature, which is another caller of ice_find_vsi_list_entry. I don't have a LAG-capable card at hand to test. Fixes: 23ccae5ce15f ("ice: changes to the interface with the HW and FW for SRIOV_VF+LAG") Reviewed-by: Michal Swiatkowski Signed-off-by: Michal Schmidt Reviewed-by: Dave Ertman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit e6501fc38a7590fc014d7bb5c406974d32c0530f Author: Przemek Kitszel Date: Fri Aug 30 15:44:11 2024 +0200 ice: stop calling pci_disable_device() as we use pcim Our driver uses devres to manage resources, in particular we call pcim_enable_device(), what also means we express the intent to get automatic pci_disable_device() call at driver removal. Manual calls to pci_disable_device() misuse the API. Recent commit (see "Fixes" tag) has changed the removal action from conditional (silent ignore of double call to pci_disable_device()) to unconditional, but able to catch unwanted redundant calls; see cited "Fixes" commit for details. Since that, unloading the driver yields following warn+splat: [70633.628490] ice 0000:af:00.7: disabling already-disabled device [70633.628512] WARNING: CPU: 52 PID: 33890 at drivers/pci/pci.c:2250 pci_disable_device+0xf4/0x100 ... [70633.628744] ? pci_disable_device+0xf4/0x100 [70633.628752] release_nodes+0x4a/0x70 [70633.628759] devres_release_all+0x8b/0xc0 [70633.628768] device_unbind_cleanup+0xe/0x70 [70633.628774] device_release_driver_internal+0x208/0x250 [70633.628781] driver_detach+0x47/0x90 [70633.628786] bus_remove_driver+0x80/0x100 [70633.628791] pci_unregister_driver+0x2a/0xb0 [70633.628799] ice_module_exit+0x11/0x3a [ice] Note that this is the only Intel ethernet driver that needs such fix. Fixes: f748a07a0b64 ("PCI: Remove legacy pcim_release()") Reviewed-by: Larysa Zaremba Reviewed-by: Philipp Stanner Signed-off-by: Przemek Kitszel Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit e843cf7b34fe2e0c1afc55e1f3057375c9b77a14 Author: Jacob Keller Date: Wed Jul 31 09:55:55 2024 -0700 ice: fix accounting for filters shared by multiple VSIs When adding a switch filter (such as a MAC or VLAN filter), it is expected that the driver will detect the case where the filter already exists, and return -EEXIST. This is used by calling code such as ice_vc_add_mac_addr, and ice_vsi_add_vlan to avoid incrementing the accounting fields such as vsi->num_vlan or vf->num_mac. This logic works correctly for the case where only a single VSI has added a given switch filter. When a second VSI adds the same switch filter, the driver converts the existing filter from an ICE_FWD_TO_VSI filter into an ICE_FWD_TO_VSI_LIST filter. This saves switch resources, by ensuring that multiple VSIs can re-use the same filter. The ice_add_update_vsi_list() function is responsible for doing this conversion. When first converting a filter from the FWD_TO_VSI into FWD_TO_VSI_LIST, it checks if the VSI being added is the same as the existing rule's VSI. In such a case it returns -EEXIST. However, when the switch rule has already been converted to a FWD_TO_VSI_LIST, the logic is different. Adding a new VSI in this case just requires extending the VSI list entry. The logic for checking if the rule already exists in this case returns 0 instead of -EEXIST. This breaks the accounting logic mentioned above, so the counters for how many MAC and VLAN filters exist for a given VF or VSI no longer accurately reflect the actual count. This breaks other code which relies on these counts. In typical usage this primarily affects such filters generally shared by multiple VSIs such as VLAN 0, or broadcast and multicast MAC addresses. Fix this by correctly reporting -EEXIST in the case of adding the same VSI to a switch rule already converted to ICE_FWD_TO_VSI_LIST. Fixes: 9daf8208dd4d ("ice: Add support for switch filter programming") Signed-off-by: Jacob Keller Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 9debb703e14939dfafa5d403f27c4feb2e9f6501 Author: Martyna Szapar-Mudlaw Date: Wed Jun 26 11:43:42 2024 +0200 ice: Fix lldp packets dropping after changing the number of channels After vsi setup refactor commit 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") ice_cfg_sw_lldp function which removes rx rule directing LLDP packets to vsi is moved from ice_vsi_release to ice_vsi_decfg function. ice_vsi_decfg is used in more cases than just in vsi_release resulting in unnecessary removal of rx lldp packets handling switch rule. This leads to lldp packets being dropped after a change number of channels via ethtool. This patch moves ice_cfg_sw_lldp function that removes rx lldp sw rule back to ice_vsi_release function. Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") Reported-by: Matěj Grégr Closes: https://lore.kernel.org/intel-wired-lan/1be45a76-90af-4813-824f-8398b69745a9@netx.as/T/#u Reviewed-by: Przemek Kitszel Signed-off-by: Martyna Szapar-Mudlaw Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 20471071f198c8626dbe3951ac9834055b387844 Author: Patryk Biel Date: Mon Sep 9 11:30:28 2024 +0200 hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2 The current implementation of pmbus_show_boolean assumes that all devices support write-back operation of status register to clear pending warnings or faults. Since clearing individual bits in the status registers was only introduced in PMBus specification 1.2, this operation may not be supported by some older devices. This can result in an error while reading boolean attributes such as temp1_max_alarm. Fetch PMBus revision supported by the device and modify pmbus_show_boolean so that it only tries to clear individual status bits if the device is compliant with PMBus specs >= 1.2. Otherwise clear all fault indicators on the current page after a fault status was reported. Fixes: 35f165f08950a ("hwmon: (pmbus) Clear pmbus fault/warning bits after read") Signed-off-by: Patryk Biel Message-ID: <20240909-pmbus-status-reg-clearing-v1-1-f1c0d68c6408@gmail.com> [groeck: Rewrote description Moved revision detection code ahead of clear faults command Assigned revision if return value from PMBUS_REVISION command is 0 Improved return value check from calling _pmbus_write_byte_data()] Signed-off-by: Guenter Roeck commit 33297cef3101d950cec0033a0dce0a2d2bd59999 Author: Hans de Goede Date: Mon Sep 9 13:32:26 2024 +0200 platform/x86: panasonic-laptop: Allocate 1 entry extra in the sinf array Some DSDT-s have an off-by-one bug where the SINF package count is one higher than the SQTY reported value, allocate 1 entry extra. Also make the SQTY <-> SINF package count mismatch error more verbose to help debugging similar issues in the future. This fixes the panasonic-laptop driver failing to probe() on some devices with the following errors: [ 3.958887] SQTY reports bad SINF length SQTY: 37 SINF-pkg-count: 38 [ 3.958892] Couldn't retrieve BIOS data [ 3.983685] Panasonic Laptop Support - With Macros: probe of MAT0019:00 failed with error -5 Fixes: 709ee531c153 ("panasonic-laptop: add Panasonic Let's Note laptop extras driver v0.94") Cc: stable@vger.kernel.org Tested-by: James Harmison Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240909113227.254470-2-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f52e98d16e9bd7dd2b3aef8e38db5cbc9899d6a4 Author: Hans de Goede Date: Mon Sep 9 13:32:25 2024 +0200 platform/x86: panasonic-laptop: Fix SINF array out of bounds accesses The panasonic laptop code in various places uses the SINF array with index values of 0 - SINF_CUR_BRIGHT(0x0d) without checking that the SINF array is big enough. Not all panasonic laptops have this many SINF array entries, for example the Toughbook CF-18 model only has 10 SINF array entries. So it only supports the AC+DC brightness entries and mute. Check that the SINF array has a minimum size which covers all AC+DC brightness entries and refuse to load if the SINF array is smaller. For higher SINF indexes hide the sysfs attributes when the SINF array does not contain an entry for that attribute, avoiding show()/store() accessing the array out of bounds and add bounds checking to the probe() and resume() code accessing these. Fixes: e424fb8cc4e6 ("panasonic-laptop: avoid overflow in acpi_pcc_hotkey_add()") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240909113227.254470-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit bc83b4d1f08695e85e85d36f7b803da58010161d Merge: fb92a1ffc121e 16005147cca41 Author: Linus Torvalds Date: Mon Sep 9 09:49:23 2024 -0700 Merge tag 'bcachefs-2024-09-09' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - fix ca->io_ref usage; analagous to previous patch doing that for main discard path - cond_resched() in __journal_keys_sort(), cutting down on "hung task" warnings when journal is big - rest of basic BCH_SB_MEMBER_INVALID support - and the critical one: don't delete open files in online fsck, this was causing the "dirent points to inode that doesn't point back" inconsistencies some users were seeing * tag 'bcachefs-2024-09-09' of git://evilpiepirate.org/bcachefs: bcachefs: Don't delete open files in online fsck bcachefs: fix btree_key_cache sysfs knob bcachefs: More BCH_SB_MEMBER_INVALID support bcachefs: Simplify bch2_bkey_drop_ptrs() bcachefs: Add a cond_resched() to __journal_keys_sort() bcachefs: Fix ca->io_ref usage commit fb92a1ffc121e65ffed13c6bfe01c190487d791e Merge: da3ea35007d0a 895384881ec96 Author: Linus Torvalds Date: Mon Sep 9 09:31:55 2024 -0700 Merge tag 'hyperv-fixes-signed-20240908' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Add a documentation overview of Confidential Computing VM support (Michael Kelley) - Use lapic timer in a TDX VM without paravisor (Dexuan Cui) - Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency (Michael Kelley) - Fix a kexec crash due to VP assist page corruption (Anirudh Rayabharam) - Python3 compatibility fix for lsvmbus (Anthony Nandaa) - Misc fixes (Rachel Menge, Roman Kisel, zhang jiao, Hongbo Li) * tag 'hyperv-fixes-signed-20240908' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: hv: vmbus: Constify struct kobj_type and struct attribute_group tools: hv: rm .*.cmd when make clean x86/hyperv: fix kexec crash due to VP assist page corruption Drivers: hv: vmbus: Fix the misplaced function description tools: hv: lsvmbus: change shebang to use python3 x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency Documentation: hyperv: Add overview of Confidential Computing VM support clocksource: hyper-v: Use lapic timer in a TDX VM without paravisor Drivers: hv: Remove deprecated hv_fcopy declarations commit 3e5b2e81f17f176a4d451c1dd1794e64644319c4 Author: Yu Liao Date: Mon Sep 9 15:56:52 2024 +0800 printk: Export match_devname_and_update_preferred_console() When building serial_base as a module, modpost fails with the following error message: ERROR: modpost: "match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined! Export the symbol to allow using it from modules. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202409071312.qlwtTOS1-lkp@intel.com/ Fixes: 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()") Signed-off-by: Yu Liao Link: https://lore.kernel.org/r/20240909075652.747370-1-liaoyu15@huawei.com Signed-off-by: Petr Mladek commit 16005147cca41a0f67b5def2a4656286f8c0db4a Author: Kent Overstreet Date: Sun Sep 8 01:06:57 2024 -0400 bcachefs: Don't delete open files in online fsck If a file is unlinked but still open, we don't want online fsck to delete it - or fun inconsistencies will happen. https://github.com/koverstreet/bcachefs/issues/727 Signed-off-by: Kent Overstreet commit 2c377d8a71db32d4125d30b3641f2bc51c6850ca Author: Kent Overstreet Date: Thu Sep 5 21:18:57 2024 -0400 bcachefs: fix btree_key_cache sysfs knob Signed-off-by: Kent Overstreet commit 52df04f03994217aa5f98eb83255e85ee60b5e29 Author: Kent Overstreet Date: Wed Sep 4 17:50:20 2024 -0400 bcachefs: More BCH_SB_MEMBER_INVALID support Signed-off-by: Kent Overstreet commit df88febc2065ae64779f295df0a5d4f52e5591e6 Author: Kent Overstreet Date: Wed Sep 4 17:49:20 2024 -0400 bcachefs: Simplify bch2_bkey_drop_ptrs() bch2_bkey_drop_ptrs() had a some complicated machinery for avoiding O(n^2) when dropping multiple pointers - but when n is only going to be ~4, it's not worth it. Signed-off-by: Kent Overstreet commit ec36573dcd7b160bb9c5e6b20a43d484bc761d2e Author: Kent Overstreet Date: Thu Sep 5 15:43:03 2024 -0400 bcachefs: Add a cond_resched() to __journal_keys_sort() Without this, we'd potentially sort multiple times without a cond_resched(), leading to hung task warnings on larger systems. Signed-off-by: Kent Overstreet commit 5a6e43af1e5341a11a719270cef9d846b0bbfaa5 Author: Kent Overstreet Date: Wed Sep 4 15:48:59 2024 -0400 bcachefs: Fix ca->io_ref usage ca->io_ref does not protect against the filesystem going way, c->write_ref does. Much like 0b50b7313ef2 bcachefs: Fix refcounting in discard path the other async paths need fixing. Signed-off-by: Kent Overstreet commit b787a33864121a565aeb0e88561bf6062a19f99c Author: Jinjie Ruan Date: Mon Sep 9 15:31:40 2024 +0800 spi: geni-qcom: Fix incorrect free_irq() sequence In spi_geni_remove(), the free_irq() sequence is different from that on the probe error path. And the IRQ will still remain and it's interrupt handler may use the dma channel after release dma channel and before free irq, which is not secure, fix it. Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma") Signed-off-by: Jinjie Ruan Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240909073141.951494-3-ruanjinjie@huawei.com Signed-off-by: Mark Brown commit 89e362c883c65ff94b76b9862285f63545fb5274 Author: Jinjie Ruan Date: Mon Sep 9 15:31:39 2024 +0800 spi: geni-qcom: Undo runtime PM changes at driver exit time It's important to undo pm_runtime_use_autosuspend() with pm_runtime_dont_use_autosuspend() at driver exit time unless driver initially enabled pm_runtime with devm_pm_runtime_enable() (which handles it for you). Hence, switch to devm_pm_runtime_enable() to fix it, so the pm_runtime_disable() in probe error path and remove function can be removed. Fixes: cfdab2cd85ec ("spi: spi-geni-qcom: Set an autosuspend delay of 250 ms") Signed-off-by: Jinjie Ruan Suggested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240909073141.951494-2-ruanjinjie@huawei.com Signed-off-by: Mark Brown commit af5e317175858603f950e51fe6377027fdd6eb79 Author: Shenghao Ding Date: Sat Sep 7 08:15:36 2024 +0800 ASoC: tas2781: fix to save the dsp bin file name into the correct array in case name_prefix is not NULL fix to save the dsp bin file name into the correct array, coef_binaryname, instead of rca_binaryname, in case name_prefix is not NULL. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240907001540.944-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit ea5ff5d351b520524019f7ff7f9ce418de2dad87 Author: T.J. Mercier Date: Fri Aug 30 19:26:26 2024 +0000 dma-buf: heaps: Fix off-by-one in CMA heap fault handler Until VM_DONTEXPAND was added in commit 1c1914d6e8c6 ("dma-buf: heaps: Don't track CMA dma-buf pages under RssFile") it was possible to obtain a mapping larger than the buffer size via mremap and bypass the overflow check in dma_buf_mmap_internal. When using such a mapping to attempt to fault past the end of the buffer, the CMA heap fault handler also checks the fault offset against the buffer size, but gets the boundary wrong by 1. Fix the boundary check so that we don't read off the end of the pages array and insert an arbitrary page in the mapping. Reported-by: Xingyu Jin Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation") Cc: stable@vger.kernel.org # Applicable >= 5.10. Needs adjustments only for 5.10. Signed-off-by: T.J. Mercier Acked-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20240830192627.2546033-1-tjmercier@google.com commit b3c9e65eb227269ed72a115ba22f4f51b4e62b4d Author: Eric Dumazet Date: Wed Sep 4 13:37:25 2024 +0000 net: hsr: remove seqnr_lock syzbot found a new splat [1]. Instead of adding yet another spin_lock_bh(&hsr->seqnr_lock) / spin_unlock_bh(&hsr->seqnr_lock) pair, remove seqnr_lock and use atomic_t for hsr->sequence_nr and hsr->sup_sequence_nr. This also avoid a race in hsr_fill_info(). Also remove interlink_sequence_nr which is unused. [1] WARNING: CPU: 1 PID: 9723 at net/hsr/hsr_forward.c:602 handle_std_frame+0x247/0x2c0 net/hsr/hsr_forward.c:602 Modules linked in: CPU: 1 UID: 0 PID: 9723 Comm: syz.0.1657 Not tainted 6.11.0-rc6-syzkaller-00026-g88fac17500f4 #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:handle_std_frame+0x247/0x2c0 net/hsr/hsr_forward.c:602 Code: 49 8d bd b0 01 00 00 be ff ff ff ff e8 e2 58 25 00 31 ff 89 c5 89 c6 e8 47 53 a8 f6 85 ed 0f 85 5a ff ff ff e8 fa 50 a8 f6 90 <0f> 0b 90 e9 4c ff ff ff e8 cc e7 06 f7 e9 8f fe ff ff e8 52 e8 06 RSP: 0018:ffffc90000598598 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffc90000598670 RCX: ffffffff8ae2c919 RDX: ffff888024e94880 RSI: ffffffff8ae2c926 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003 R13: ffff8880627a8cc0 R14: 0000000000000000 R15: ffff888012b03c3a FS: 0000000000000000(0000) GS:ffff88802b700000(0063) knlGS:00000000f5696b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000020010000 CR3: 00000000768b4000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hsr_fill_frame_info+0x2c8/0x360 net/hsr/hsr_forward.c:630 fill_frame_info net/hsr/hsr_forward.c:700 [inline] hsr_forward_skb+0x7df/0x25c0 net/hsr/hsr_forward.c:715 hsr_handle_frame+0x603/0x850 net/hsr/hsr_slave.c:70 __netif_receive_skb_core.constprop.0+0xa3d/0x4330 net/core/dev.c:5555 __netif_receive_skb_list_core+0x357/0x950 net/core/dev.c:5737 __netif_receive_skb_list net/core/dev.c:5804 [inline] netif_receive_skb_list_internal+0x753/0xda0 net/core/dev.c:5896 gro_normal_list include/net/gro.h:515 [inline] gro_normal_list include/net/gro.h:511 [inline] napi_complete_done+0x23f/0x9a0 net/core/dev.c:6247 gro_cell_poll+0x162/0x210 net/core/gro_cells.c:66 __napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:6772 napi_poll net/core/dev.c:6841 [inline] net_rx_action+0xa92/0x1010 net/core/dev.c:6963 handle_softirqs+0x216/0x8f0 kernel/softirq.c:554 do_softirq kernel/softirq.c:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 Fixes: 06afd2c31d33 ("hsr: Synchronize sending frames to have always incremented outgoing seq nr.") Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Sebastian Andrzej Siewior Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 61f2e8a3a94175dbbaad6a54f381b2a505324610 Author: Xingyu Wu Date: Mon Aug 26 16:04:30 2024 +0800 riscv: dts: starfive: jh7110-common: Fix lower rate of CPUfreq by setting PLL0 rate to 1.5GHz CPUfreq supports 4 cpu frequency loads on 375/500/750/1500MHz. But now PLL0 rate is 1GHz and the cpu frequency loads become 250/333/500/1000MHz in fact. The PLL0 rate should be default set to 1.5GHz and set the cpu_core rate to 500MHz in safe. Fixes: e2c510d6d630 ("riscv: dts: starfive: Add cpu scaling for JH7110 SoC") Signed-off-by: Xingyu Wu Reviewed-by: Hal Feng Signed-off-by: Conor Dooley commit da3ea35007d0af457a0afc87e84fddaebc4e0b63 Author: Linus Torvalds Date: Sun Sep 8 14:50:28 2024 -0700 Linux 6.11-rc7 commit 89f5e14d05b4852db5ecdf222dc6a13edc633658 Merge: e20398877b621 342123d6913c6 Author: Linus Torvalds Date: Sun Sep 8 10:25:25 2024 -0700 Merge tag 'timers_urgent_for_v6.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Borislav Petkov: - Remove percpu irq related code in the timer-of initialization routine as it is broken but also unused (Daniel Lezcano) - Fix return -ETIME when delta exceeds INT_MAX and the next event not taking effect sometimes (Jacky Bai) * tag 'timers_urgent_for_v6.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/imx-tpm: Fix next event not taking effect sometime clocksource/drivers/imx-tpm: Fix return -ETIME when delta exceeds INT_MAX clocksource/drivers/timer-of: Remove percpu irq related code commit e20398877b6216023ac311053baf2f50965cbf27 Merge: 5dadc1be8fc53 2ab9d830262c1 Author: Linus Torvalds Date: Sun Sep 8 10:20:44 2024 -0700 Merge tag 'perf_urgent_for_v6.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Fix perf's AUX buffer serialization - Prevent uninitialized struct members in perf's uprobes handling * tag 'perf_urgent_for_v6.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/aux: Fix AUX buffer serialization uprobes: Use kzalloc to allocate xol area commit 5dadc1be8fc5355034a8515e021ed557acf5fd17 Merge: 51c4d5f10da44 48b9a8dabcc3c Author: Linus Torvalds Date: Sun Sep 8 10:13:39 2024 -0700 Merge tag 'char-misc-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc/other driver fixes for 6.11-rc7. It's nothing huge, just a bunch of small fixes of reported problems, including: - lots of tiny iio driver fixes - nvmem driver fixex - binder UAF bugfix - uio driver crash fix - other small fixes All of these have been in linux-next this week with no reported problems" * tag 'char-misc-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits) VMCI: Fix use-after-free when removing resource in vmci_resource_remove() Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind misc: keba: Fix sysfs group creation dt-bindings: nvmem: Use soc-nvmem node name instead of nvmem nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc nvmem: u-boot-env: error if NVMEM device is too small misc: fastrpc: Fix double free of 'buf' in error path binder: fix UAF caused by offsets overwrite iio: imu: inv_mpu6050: fix interrupt status read for old buggy chips iio: adc: ad7173: fix GPIO device info iio: adc: ad7124: fix DT configuration parsing iio: adc: ad_sigma_delta: fix irq_flags on irq request iio: adc: ads1119: Fix IRQ flags iio: fix scale application in iio_convert_raw_to_processed_unlocked iio: adc: ad7124: fix config comparison iio: adc: ad7124: fix chip ID mismatch iio: adc: ad7173: Fix incorrect compatible string iio: buffer-dmaengine: fix releasing dma channel on error iio: adc: ad7606: remove frstdata check for serial mode ... commit 51c4d5f10da4434d63790a679f54e68abc7170e7 Merge: d1f2d51b711a3 87eb3cb4ec619 Author: Linus Torvalds Date: Sun Sep 8 10:07:28 2024 -0700 Merge tag 'usb-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a handful of small USB fixes for 6.11-rc7. Included in here are: - dwc3 driver fixes for two reported problems - two typec ucsi driver fixes - cdns2 controller reset fix All of these have been in linux-next this week with no reported problems" * tag 'usb-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: ucsi: Fix cable registration usb: typec: ucsi: Fix the partner PD revision usb: cdns2: Fix controller reset issue usb: dwc3: core: update LC timer as per USB Spec V3.2 usb: dwc3: Avoid waking up gadget during startxfer commit d1f2d51b711a3b7f1ae1b46701c769c1d580fa7f Merge: 37d4cc69876f6 71c03a8cb213d Author: Linus Torvalds Date: Sat Sep 7 11:29:13 2024 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A pile of Qualcomm clk driver fixes with two main themes: the alpha PLL driver and shared RCGs, and one fix for the Starfive JH7110 SoC. - The Alpha PLL clk_ops had multiple problems around setting rates. There are a handful of patches here that fix masks and skip enabling the clk from set_rate() when the PLL is disabled. The PLLs are crucial to operation of the system as almost all frequencies in the system are derived from them. - Parking shared RCGs at a slow always on clk at registration time breaks stuff. USB host mode can't handle such a slow frequency and the serial console gets all garbled when the UART clk is handed over to the kernel. There's a few patches that don't use the shared clk_ops for the UART clks and another one to skip parking the USB clk at registration time. - The Starfive PLL driver used for the CPU was busted causing cpufreq to fail because the clk didn't change to a safe parent during set_rate(). The fix is to register a notifier and switch to a safe parent so the PLL can change rate in a glitch free manner" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: gcc-sc8280xp: don't use parking clk_ops for QUPs clk: starfive: jh7110-sys: Add notifier for PLL0 clock clk: qcom: gcc-sm8650: Don't use shared clk_ops for QUPs clk: qcom: gcc-sm8550: Don't park the USB RCG at registration time clk: qcom: gcc-sm8550: Don't use parking clk_ops for QUPs clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs clk: qcom: ipq9574: Update the alpha PLL type for GPLLs clk: qcom: gcc-x1e80100: Fix USB 0 and 1 PHY GDSC pwrsts flags clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL clk: qcom: clk-alpha-pll: Fix zonda set_rate failure when PLL is disabled clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API clk: qcom: clk-alpha-pll: Fix the pll post div mask commit 37d4cc69876f6ed981b54b07f0d07fc4d4bd9f13 Merge: 8727656207816 0f9592ae26ffe Author: Linus Torvalds Date: Sat Sep 7 10:25:39 2024 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "Single ufs driver fix quirking around another device spec violation" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: ufs-mediatek: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP commit 872765620781607809fddbfdc2823ab7f769b698 Merge: b31c449288425 602cb14e310a7 Author: Linus Torvalds Date: Sat Sep 7 09:59:57 2024 -0700 Merge tag 'pinctrl-v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fix from Linus Walleij: "A single fix for Qualcomm laptops that are affected by missing wakeup IRQs" * tag 'pinctrl-v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: x1e80100: Bypass PDC wakeup parent for now commit b31c4492884252a8360f312a0ac2049349ddf603 Merge: 487ee43bac846 12cb32a52eb60 Author: Linus Torvalds Date: Fri Sep 6 17:48:24 2024 -0700 Merge tag 'linux_kselftest-kunit-fixes-6.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest PullKUnit fix from Shuah Khan: "Fix to a missing function parameter warning found during documentation build in linux-next" * tag 'linux_kselftest-kunit-fixes-6.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: Fix missing kerneldoc comment commit 487ee43bac846446fb3e832436bdedd7acb4fe46 Merge: a86b83f77797a 8f62819aaace7 Author: Linus Torvalds Date: Fri Sep 6 17:38:50 2024 -0700 Merge tag 'pci-v6.11-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Unregister platform devices for child nodes when stopping a PCI device, even if the PCI core has already cleared the OF_POPULATED bit and of_platform_depopulate() doesn't do anything (Bartosz Golaszewski) - Rescan the bus from a separate thread so we don't deadlock when triggering rescan from sysfs (Bartosz Golaszewski) * tag 'pci-v6.11-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/pwrctl: Rescan bus on a separate thread PCI: Don't rely on of_platform_depopulate() for reused OF-nodes commit a86b83f77797ad1289601beb9a9ea61ad9f593cc Merge: 9d4c304001cf4 ab85218910729 Author: Linus Torvalds Date: Fri Sep 6 17:30:33 2024 -0700 Merge tag 'v6.11-rc6-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - fix potential mount hang - fix retry problem in two types of compound operations - important netfs integration fix in SMB1 read paths - fix potential uninitialized zero point of inode - minor patch to improve debugging for potential crediting problems * tag 'v6.11-rc6-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: netfs, cifs: Improve some debugging bits cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3 cifs: Fix zero_point init on inode initialisation smb: client: fix double put of @cfile in smb2_set_path_size() smb: client: fix double put of @cfile in smb2_rename_path() smb: client: fix hang in wait_for_response() for negproto commit 9d4c304001cf44d24c643211a1673cf49ecaf287 Author: Linus Torvalds Date: Fri Sep 6 15:23:33 2024 -0700 KVM: x86: don't fall through case statements without annotations clang warns on this because it has an unannotated fall-through between cases: arch/x86/kvm/x86.c:4819:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] and while we could annotate it as a fallthrough, the proper fix is to just add the break for this case, instead of falling through to the default case and the break there. gcc also has that warning, but it looks like gcc only warns for the cases where they fall through to "real code", rather than to just a break. Odd. Fixes: d30d9ee94cc0 ("KVM: x86: Only advertise KVM_CAP_READONLY_MEM when supported by VM") Cc: Paolo Bonzini Cc: Tom Dohrmann Signed-off-by: Linus Torvalds commit 6b8ff511e412af4a367a8d3d4f323715a9357aa0 Merge: 890daedec4f48 c060f93253cad Author: Linus Torvalds Date: Fri Sep 6 13:08:38 2024 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Fix the arm64 usage of ftrace_graph_ret_addr() to pass the &state->graph_idx pointer instead of NULL, otherwise this function just returns early" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: stacktrace: fix the usage of ftrace_graph_ret_addr() commit 890daedec4f483bcb5cea0a4ce290830d12d78b2 Merge: a78d7dce1e712 1ff95eb2bebda Author: Linus Torvalds Date: Fri Sep 6 13:00:59 2024 -0700 Merge tag 'riscv-for-linus-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A revert for the mmap() change that ties the allocation range to the hint adress, as what we tried to do ended up regressing on other userspace workloads. - A fix to avoid a kernel memory leak when emulating misaligned accesses from userspace. - A Kconfig fix for toolchain vector detection, which now correctly detects vector support on toolchains where the V extension depends on the M extension. - A fix to avoid failing the linear mapping bootmem bounds check on NOMMU systems. - A fix for early alternatives on relocatable kernels. * tag 'riscv-for-linus-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix RISCV_ALTERNATIVE_EARLY riscv: Do not restrict memory size because of linear mapping on nommu riscv: Fix toolchain vector detection riscv: misaligned: Restrict user access to kernel memory riscv: mm: Do not restrict mmap address based on hint riscv: selftests: Remove mmap hint address checks Revert "RISC-V: mm: Document mmap changes" commit a78d7dce1e71231cef671ccf5ab48b31606fe352 Merge: d45111e52b81e 734ad0af36094 Author: Linus Torvalds Date: Fri Sep 6 12:50:03 2024 -0700 Merge tag 'powerpc-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix a deadlock in the powerpc qspinlock MCS queue logic - Fix the return type of pgd_val() to not truncate 64-bit PTEs on 85xx - Allow the check for dynamic relocations in the VDSO to work correctly - Make mmu_pte_psize static to fix a build error Thanks to Christophe Leroy, Nysal Jan K.A., Nicholas Piggin, Geetika Moolchandani, Jijo Varghese, and Vaishnavi Bhat. * tag 'powerpc-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/qspinlock: Fix deadlock in MCS queue powerpc/mm: Fix return type of pgd_val() powerpc/vdso: Don't discard rela sections powerpc/64e: Define mmu_pte_psize static commit d45111e52b81e0da6307bde9de8f2a5ac72d9ca9 Merge: 788220eee30d6 59cbd4eea48fd Author: Linus Torvalds Date: Fri Sep 6 12:45:43 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull x86 kvm fixes from Paolo Bonzini: "Many small fixes that accumulated while I was on vacation... - Fixup missed comments from the REMOVED_SPTE => FROZEN_SPTE rename - Ensure a root is successfully loaded when pre-faulting SPTEs - Grab kvm->srcu when handling KVM_SET_VCPU_EVENTS to guard against accessing memslots if toggling SMM happens to force a VM-Exit - Emulate MSR_{FS,GS}_BASE on SVM even though interception is always disabled, so that KVM does the right thing if KVM's emulator encounters {RD,WR}MSR - Explicitly clear BUS_LOCK_DETECT from KVM's caps on AMD, as KVM doesn't yet virtualize BUS_LOCK_DETECT on AMD - Cleanup the help message for CONFIG_KVM_AMD_SEV, and call out that KVM now supports SEV-SNP too - Specialize return value of KVM_CHECK_EXTENSION(KVM_CAP_READONLY_MEM), based on VM type - Remove unnecessary dependency on CONFIG_HIGH_RES_TIMERS - Note an RCU quiescent state on guest exit. This avoids a call to rcu_core() if there was a grace period request while guest was running" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Remove HIGH_RES_TIMERS dependency kvm: Note an RCU quiescent state on guest exit KVM: x86: Only advertise KVM_CAP_READONLY_MEM when supported by VM KVM: SEV: Update KVM_AMD_SEV Kconfig entry and mention SEV-SNP KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing KVM: SVM: fix emulation of msr reads/writes of MSR_FS_BASE and MSR_GS_BASE KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS KVM: x86/mmu: Check that root is valid/loaded when pre-faulting SPTEs KVM: x86/mmu: Fixup comments missed by the REMOVED_SPTE=>FROZEN_SPTE rename commit 788220eee30d67a485a13c34c02f51a82485f337 Merge: b66f0b119c96d b02d2cf5b2208 Author: Linus Torvalds Date: Fri Sep 6 12:17:44 2024 -0700 Merge tag 'pm-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix an incorrect warning emitted by the amd-pstate driver on processors that don't support X86_FEATURE_CPPC (Gautham Shenoy)" * tag 'pm-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq/amd-pstate: Remove warning for X86_FEATURE_CPPC on certain Zen models commit b66f0b119c96dbb6b976f1d75b7bf69960069bde Merge: 703896be3015d 4ba032bc71dad Author: Linus Torvalds Date: Fri Sep 6 12:04:06 2024 -0700 Merge tag 'block-6.11-20240906' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Mostly just some fixlets for NVMe, but also a bug fix for the ublk driver and an integrity fix" * tag 'block-6.11-20240906' of git://git.kernel.dk/linux: bio-integrity: don't restrict the size of integrity metadata ublk_drv: fix NULL pointer dereference in ublk_ctrl_start_recovery() nvmet: Identify-Active Namespace ID List command should reject invalid nsid nvme: set BLK_FEAT_ZONED for ZNS multipath disks nvme-pci: Add sleep quirk for Samsung 990 Evo nvme-pci: allocate tagset on reset if necessary nvmet-tcp: fix kernel crash if commands allocation fails nvme: use better description for async reset reason nvmet: Make nvmet_debugfs static commit 703896be3015db7f8fd8822b18909a5914209a70 Merge: c3af2256adda2 c491b044cf5f8 Author: Linus Torvalds Date: Fri Sep 6 11:56:03 2024 -0700 Merge tag 'sound-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Hopefully the last PR for 6.11, at least for this level of amount. In addition to the usual HD-audio quirks, there are more changes in ASoC, but all look small and device-specific fixes, and nothing stands out. The only slightly big change is sunxi I2S fix, which looks quite safe to apply, too" * tag 'sound-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits) ALSA: hda/realtek - Fix inactive headset mic jack for ASUS Vivobook 15 X1504VAP ALSA: hda/realtek: Support mute LED on HP Laptop 14-dq2xxx ALSA: hda/realtek: Enable Mute Led for HP Victus 15-fb1xxx ALSA: hda/realtek: extend quirks for Clevo V5[46]0 ASoC: codecs: lpass-va-macro: set the default codec version for sm8250 ALSA: hda: add HDMI codec ID for Intel PTL ALSA: hda/realtek: add patch for internal mic in Lenovo V145 ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode ASoC: amd: yc: Add a quirk for MSI Bravo 17 (D7VEK) ASoC: mediatek: mt8188-mt6359: Modify key ASoc: SOF: topology: Clear SOF link platform name upon unload ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices ASoC: SOF: ipc: replace "enum sof_comp_type" field with "uint32_t" ASoC: fix module autoloading ASoC: tda7419: fix module autoloading ASoC: google: fix module autoloading ASoC: intel: fix module autoloading ASoC: tegra: Fix CBB error during probe() ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object ASoC: Intel: soc-acpi-cht: Make Lenovo Yoga Tab 3 X90F DMI match less strict ... commit c3af2256adda212e3c3ff4773623a19a972eaf39 Merge: 0de82f0dc433a aea62c744a9ae Author: Linus Torvalds Date: Fri Sep 6 11:50:55 2024 -0700 Merge tag 'mmc-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Apply SD quirks earlier during probe so they become relevant MMC host: - cqhci: Fix checking of CQHCI_HALT state - dw_mmc: Fix IDMAC operation with pages bigger than 4K - sdhci-of-aspeed: Fix module autoloading" * tag 'mmc-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: cqhci: Fix checking of CQHCI_HALT state mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K mmc: sdhci-of-aspeed: fix module autoloading mmc: core: apply SD quirks earlier during probe commit 0de82f0dc433a89841c3f6ffe0e496d580ad43af Merge: 2125a725545fb a5135526426df Author: Linus Torvalds Date: Fri Sep 6 11:40:42 2024 -0700 Merge tag 'gpio-fixes-for-v6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix an OF node reference leak in gpio-rockchip - add the missing module device table to gpio-modepin * tag 'gpio-fixes-for-v6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: modepin: Enable module autoloading gpio: rockchip: fix OF node leak in probe() commit 2125a725545fbfcbda3f99d4bb4849a04e7c07a9 Merge: 8654fa5ca3514 9ec87c5957ea9 Author: Linus Torvalds Date: Fri Sep 6 11:32:30 2024 -0700 Merge tag 'pmdomain-v6.11-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain fix from Ulf Hansson: - Fix support for required OPPs for multiple PM domains * tag 'pmdomain-v6.11-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: OPP: Fix support for required OPPs for multiple PM domains commit 8654fa5ca3514263a079886b57521bcb20ee7cfd Merge: ea462f0fa4383 10c48e9a8fd5e Author: Linus Torvalds Date: Fri Sep 6 11:28:14 2024 -0700 Merge tag 'pwm/for-6.11-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm fix from Uwe Kleine-König: "Fix an off-by-one in the stm32 driver. Hardware engineers tend to start counting at 1 while the software guys usually start with 0. This isn't so nice because that results in drivers where pwm device #2 needs to use the hardware registers with index 3. This was noticed by Fabrice Gasnier. A small patch fixing that mismatch is the only change included here" * tag 'pwm/for-6.11-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable() commit ea462f0fa438381e0d420f94193c075e2a114894 Merge: 4e32c25b58b94 141bb6bc73cf4 Author: Linus Torvalds Date: Fri Sep 6 11:15:40 2024 -0700 Merge tag 'drm-fixes-2024-09-06' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "This has a fair few patches in it, but I reviewed them all and they seem like real things, amdgpu, i915 and xe each have a bunch of fixes for various things, then there is a some bridge suspend/resume ordering fixes for a recent rework, and then some single driver changes in a few others. Nothing looks too serious, hopefully next week is quiet. amdgpu: - IPS workaround - Fix compatibility with older MES firmware - Fix CPU spikes when clearing VRAM - Backlight fix - PMO fix - Revert SWSMU change to fix regression xe: - GSC loading fix - PCODE mutex fix - Suspend/Resume fixes - RPM fixes i915: - Do not attempt to load the GSC multiple times - Fix readout degamma_lut mismatch on ilk/snb - Mark debug_fence_init_onstack() with __maybe_unused - fence: Mark debug_fence_free() with __maybe_unused - display: Add mechanism to use sink model when applying quirk - display: Increase Fast Wake Sync length as a quirk komeda: - zpos normalization fix nouveau: - incorrect register fix imagination: - memory leak fix bridge: - hdmi/bridge rework fixes panthor: - cache coherency fix - hi priority access fix panel: - change of compatible string fbdev: - deferred-io init with no struct page fix" * tag 'drm-fixes-2024-09-06' of https://gitlab.freedesktop.org/drm/kernel: (29 commits) Revert "drm/amdgpu: align pp_power_profile_mode with kernel docs" drm/fbdev-dma: Only install deferred I/O if necessary drm/panthor: flush FW AS caches in slow reset path drm: panel: nv3052c: Correct WL-355608-A8 panel compatible dt-bindings: display: panel: Rename WL-355608-A8 panel to rg35xx-*-panel drm/panthor: Restrict high priorities on group_create drm/xe/display: Avoid encoder_suspend at runtime suspend drm/xe: Suspend/resume user access only during system s/r drm/xe/display: Match i915 driver suspend/resume sequences better drm/xe: Add missing runtime reference to wedged upon gt_reset drm/xe/pcode: Treat pcode as per-tile rather than per-GT drm/xe/gsc: Do not attempt to load the GSC multiple times drm/bridge-connector: reset the HDMI connector state drm/bridge-connector: move to DRM_DISPLAY_HELPER module drm/display: stop depending on DRM_DISPLAY_HELPER drm/i915/display: Increase Fast Wake Sync length as a quirk drm/i915/display: Add mechanism to use sink model when applying quirk drm/amd/display: Block timing sync for different signals in PMO drm/amd/display: Lock DC and exit IPS when changing backlight drm/amdgpu: always allocate cleared VRAM for GEM allocations ... commit 4e32c25b58b945f976435bbe51f39b32d714052e Author: Christian Brauner Date: Fri Sep 6 18:22:22 2024 +0200 libfs: fix get_stashed_dentry() get_stashed_dentry() tries to optimistically retrieve a stashed dentry from a provided location. It needs to ensure to hold rcu lock before it dereference the stashed location to prevent UAF issues. Use rcu_dereference() instead of READ_ONCE() it's effectively equivalent with some lockdep bells and whistles and it communicates clearly that this expects rcu protection. Link: https://lore.kernel.org/r/20240906-vfs-hotfix-5959800ffa68@brauner Fixes: 07fd7c329839 ("libfs: add path_from_stashed()") Reported-by: syzbot+f82b36bffae7ef78b6a7@syzkaller.appspotmail.com Fixes: syzbot+f82b36bffae7ef78b6a7@syzkaller.appspotmail.com Reported-by: syzbot+cbe4b96e1194b0e34db6@syzkaller.appspotmail.com Fixes: syzbot+cbe4b96e1194b0e34db6@syzkaller.appspotmail.com Signed-off-by: Christian Brauner Signed-off-by: Linus Torvalds commit bf6d7a44a144aa9c476dee83c23faf3151181bab Author: Bard Liao Date: Fri Sep 6 06:02:24 2024 +0000 ASoC: Intel: soc-acpi-intel-mtl-match: add missing empty item There is no links_num in struct snd_soc_acpi_mach {}, and we test !link->num_adr as a condition to end the loop in hda_sdw_machine_select(). So an empty item in struct snd_soc_acpi_link_adr array is required. Fixes: f77ae7fcdc4763 ("ASoC: Intel: soc-acpi-intel-mtl-match: add cs42l43 only support") Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20240906060224.2241212-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit c4246f1fe9f24f8dcd97887ed67d8fcfd91f4796 Author: Bard Liao Date: Fri Sep 6 06:02:23 2024 +0000 ASoC: Intel: soc-acpi-intel-lnl-match: add missing empty item There is no links_num in struct snd_soc_acpi_mach {}, and we test !link->num_adr as a condition to end the loop in hda_sdw_machine_select(). So an empty item in struct snd_soc_acpi_link_adr array is required. Fixes: dd3bd9dc4708 ("ASoC: Intel: soc-acpi-intel-lnl-match: add cs42l43 only support") Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20240906060224.2241212-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit f8e1ca92e35e9041cc0a1bc226ef07a853a22de4 Author: Mikulas Patocka Date: Thu Sep 5 20:27:25 2024 +0200 dm-integrity: fix a race condition when accessing recalc_sector There's a race condition when accessing the variable ic->sb->recalc_sector. The function integrity_recalc writes to this variable when it makes some progress and the function dm_integrity_map_continue may read this variable concurrently. One problem is that on 32-bit architectures the 64-bit variable is not read and written atomically - it may be possible to read garbage if read races with write. Another problem is that memory accesses to this variable are not guarded with memory barriers. This commit fixes the race - it moves reading ic->sb->recalc_sector to an earlier place where we hold &ic->endio_wait.lock. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org commit c491b044cf5f8236742887ba59b30032036e4ac8 Merge: a83e4c97ddd74 77212f300bfd6 Author: Takashi Iwai Date: Fri Sep 6 08:24:56 2024 +0200 Merge tag 'asoc-fix-v6.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.11 A larger set of fixes than I'd like at this point, but mainly due to people working on fixing module autoloading by adding missing exports of ID tables rather than anything particularly concerning. There are some other runtime fixes and quirks, and a tweak to the ABI definition for SOF which ensures that a struct layout doesn't vary depending on the architecture of the host. commit b831f83e40a24f07c8dcba5be408d93beedc820f Merge: d759ee240d3c0 5390f315fc8c9 Author: Linus Torvalds Date: Thu Sep 5 20:10:53 2024 -0700 Merge tag 'bpf-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull bpf fixes from Alexei Starovoitov: - Fix crash when btf_parse_base() returns an error (Martin Lau) - Fix out of bounds access in btf_name_valid_section() (Jeongjun Park) * tag 'bpf-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Add a selftest to check for incorrect names bpf: add check for invalid name in btf_name_valid_section() bpf: Fix a crash when btf_parse_base() returns an error pointer commit 141bb6bc73cf45e8b742d6fafa6734b6d5f82b77 Merge: ca10367a5abe5 1a8d845470941 Author: Dave Airlie Date: Fri Sep 6 11:30:53 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-09-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-09-05: amdgpu: - IPS workaround - Fix compatibility with older MES firmware - Fix CPU spikes when clearing VRAM - Backlight fix - PMO fix - Revert SWSMU change to fix regression Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240905190533.854116-1-alexander.deucher@amd.com commit ca10367a5abe5f04df1374b227a10439ef686b90 Merge: 4de4a0f160cf8 5a498d4d06d6d Author: Dave Airlie Date: Fri Sep 6 11:25:38 2024 +1000 Merge tag 'drm-misc-fixes-2024-09-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A zpos normalization fix for komeda, a register bitmask fix for nouveau, a memory leak fix for imagination, three fixes for the recent bridge HDMI work, a potential DoS fix and a cache coherency for panthor, a change of panel compatible and a deferred-io fix when used with non-highmem memory. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240905-original-radical-guan-e7a2ae@houat commit 4de4a0f160cf8ccf29a9a70f00403e6948e7e108 Merge: f2064ae33e2a6 4bfc9c553f5ea Author: Dave Airlie Date: Fri Sep 6 11:12:42 2024 +1000 Merge tag 'drm-xe-fixes-2024-09-05' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - GSC loading fix (Daniele) - PCODE mutex fix (Matt) - Suspend/Resume fixes (Maarten, Imre) - RPM fixes (Rodrigo) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZtmyFvDfFLPbuf6A@intel.com commit d759ee240d3c0c4a19f4d984eb21c36da76bc6ce Merge: f95359996ac35 031ae72825cef Author: Linus Torvalds Date: Thu Sep 5 17:08:01 2024 -0700 Merge tag 'net-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from can, bluetooth and wireless. No known regressions at this point. Another calm week, but chances are that has more to do with vacation season than the quality of our work. Current release - new code bugs: - smc: prevent NULL pointer dereference in txopt_get - eth: ti: am65-cpsw: number of XDP-related fixes Previous releases - regressions: - Revert "Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE", it breaks existing user space - Bluetooth: qca: if memdump doesn't work, re-enable IBS to avoid later problems with suspend - can: mcp251x: fix deadlock if an interrupt occurs during mcp251x_open - eth: r8152: fix the firmware communication error due to use of bulk write - ptp: ocp: fix serial port information export - eth: igb: fix not clearing TimeSync interrupts for 82580 - Revert "wifi: ath11k: support hibernation", fix suspend on Lenovo Previous releases - always broken: - eth: intel: fix crashes and bugs when reconfiguration and resets happening in parallel - wifi: ath11k: fix NULL dereference in ath11k_mac_get_eirp_power() Misc: - docs: netdev: document guidance on cleanup.h" * tag 'net-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (61 commits) ila: call nf_unregister_net_hooks() sooner tools/net/ynl: fix cli.py --subscribe feature MAINTAINERS: fix ptp ocp driver maintainers address selftests: net: enable bind tests net: dsa: vsc73xx: fix possible subblocks range of CAPT block sched: sch_cake: fix bulk flow accounting logic for host fairness docs: netdev: document guidance on cleanup.h net: xilinx: axienet: Fix race in axienet_stop net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN r8152: fix the firmware doesn't work fou: Fix null-ptr-deref in GRO. bareudp: Fix device stats updates. net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup bpf, net: Fix a potential race in do_sock_getsockopt() net: dqs: Do not use extern for unused dql_group sch/netem: fix use after free in netem_dequeue usbnet: modern method to get random MAC MAINTAINERS: wifi: cw1200: add net-cw1200.h ice: do not bring the VSI up, if it was down before the XDP setup ice: remove ICE_CFG_BUSY locking from AF_XDP code ... commit f95359996ac35206ff24e378052ce564d5bfdc94 Merge: 2a66044754a7b c9ca76e823981 Author: Linus Torvalds Date: Thu Sep 5 16:49:10 2024 -0700 Merge tag 'spi-fix-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few small driver specific fixes (including some of the widespread work on fixing missing ID tables for module autoloading and the revert of some problematic PM work in spi-rockchip), some improvements to the MAINTAINERS information for the NXP drivers and the addition of a new device ID to spidev" * tag 'spi-fix-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: MAINTAINERS: SPI: Add mailing list imx@lists.linux.dev for nxp spi drivers MAINTAINERS: SPI: Add freescale lpspi maintainer information spi: spi-fsl-lpspi: Fix off-by-one in prescale max spi: spidev: Add missing spi_device_id for jg10309-01 spi: bcm63xx: Enable module autoloading spi: intel: Add check devm_kasprintf() returned value spi: spidev: Add an entry for elgin,jg10309-01 spi: rockchip: Resolve unbalanced runtime PM / system PM handling commit f2064ae33e2a6781a6b2049dc63b9cb216abe796 Merge: 431c1646e1f86 a13494de53258 Author: Dave Airlie Date: Fri Sep 6 09:45:52 2024 +1000 Merge tag 'drm-intel-fixes-2024-09-05' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - drm/i915: Do not attempt to load the GSC multiple times (Daniele Ceraolo Spurio) - drm/i915: Fix readout degamma_lut mismatch on ilk/snb (Ville Syrjälä) - drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused (Andy Shevchenko) - drm/i915/fence: Mark debug_fence_free() with __maybe_unused (Andy Shevchenko) - drm/i915/display: Add mechanism to use sink model when applying quirk [display] (Jouni Högander) - drm/i915/display: Increase Fast Wake Sync length as a quirk [display] (Jouni Högander) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/Ztlo2hVO4SBvfAnq@linux commit 2a66044754a7b1f2784031f679fb25ba465595b2 Merge: 6c5b3e30e5854 1a5caec7f80ca Author: Linus Torvalds Date: Thu Sep 5 16:41:16 2024 -0700 Merge tag 'regulator-fix-v6.11-stub' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "A fix from Doug Anderson for a missing stub, required to fix the build for some newly added users of devm_regulator_bulk_get_const() in !REGULATOR configurations" * tag 'regulator-fix-v6.11-stub' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR commit 6c5b3e30e5854f121d2e2cbb2d5ff7350ef7fdfb Merge: e4b42053b788a cff56ff737e2d Author: Linus Torvalds Date: Thu Sep 5 16:35:57 2024 -0700 Merge tag 'rust-fixes-6.11-2' of https://github.com/Rust-for-Linux/linux Pull Rust fixes from Miguel Ojeda: "Toolchain and infrastructure: - Fix builds for nightly compiler users now that 'new_uninit' was split into new features by using an alternative approach for the code that used what is now called the 'box_uninit_write' feature - Allow the 'stable_features' lint to preempt upcoming warnings about them, since soon there will be unstable features that will become stable in nightly compilers - Export bss symbols too 'kernel' crate: - 'block' module: fix wrong usage of lockdep API 'macros' crate: - Provide correct provenance when constructing 'THIS_MODULE' Documentation: - Remove unintended indentation (blockquotes) in generated output - Fix a couple typos MAINTAINERS: - Remove Wedson as Rust maintainer - Update Andreas' email" * tag 'rust-fixes-6.11-2' of https://github.com/Rust-for-Linux/linux: MAINTAINERS: update Andreas Hindborg's email address MAINTAINERS: Remove Wedson as Rust maintainer rust: macros: provide correct provenance when constructing THIS_MODULE rust: allow `stable_features` lint docs: rust: remove unintended blockquote in Quick Start rust: alloc: eschew `Box>::write` rust: kernel: fix typos in code comments docs: rust: remove unintended blockquote in Coding Guidelines rust: block: fix wrong usage of lockdep API rust: kbuild: fix export of bss symbols commit e4b42053b788a81bfec7455308c5c1ead4a171cd Merge: ad618736883b8 5bfbcd1ee57b6 Author: Linus Torvalds Date: Thu Sep 5 16:29:41 2024 -0700 Merge tag 'trace-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix adding a new fgraph callback after function graph tracing has already started. If the new caller does not initialize its hash before registering the fgraph_ops, it can cause a NULL pointer dereference. Fix this by adding a new parameter to ftrace_graph_enable_direct() passing in the newly added gops directly and not rely on using the fgraph_array[], as entries in the fgraph_array[] must be initialized. Assign the new gops to the fgraph_array[] after it goes through ftrace_startup_subops() as that will properly initialize the gops->ops and initialize its hashes. - Fix a memory leak in fgraph storage memory test. If the "multiple fgraph storage on a function" boot up selftest fails in the registering of the function graph tracer, it will not free the memory it allocated for the filter. Break the loop up into two where it allocates the filters first and then registers the functions where any errors will do the appropriate clean ups. - Only clear the timerlat timers if it has an associated kthread. In the rtla tool that uses timerlat, if it was killed just as it was shutting down, the signals can free the kthread and the timer. But the closing of the timerlat files could cause the hrtimer_cancel() to be called on the already freed timer. As the kthread variable is is set to NULL when the kthreads are stopped and the timers are freed it can be used to know not to call hrtimer_cancel() on the timer if the kthread variable is NULL. - Use a cpumask to keep track of osnoise/timerlat kthreads The timerlat tracer can use user space threads for its analysis. With the killing of the rtla tool, the kernel can get confused between if it is using a user space thread to analyze or one of its own kernel threads. When this confusion happens, kthread_stop() can be called on a user space thread and bad things happen. As the kernel threads are per-cpu, a bitmask can be used to know when a kernel thread is used or when a user space thread is used. - Add missing interface_lock to osnoise/timerlat stop_kthread() The stop_kthread() function in osnoise/timerlat clears the osnoise kthread variable, and if it was a user space thread does a put_task on it. But this can race with the closing of the timerlat files that also does a put_task on the kthread, and if the race happens the task will have put_task called on it twice and oops. - Add cond_resched() to the tracing_iter_reset() loop. The latency tracers keep writing to the ring buffer without resetting when it issues a new "start" event (like interrupts being disabled). When reading the buffer with an iterator, the tracing_iter_reset() sets its pointer to that start event by walking through all the events in the buffer until it gets to the time stamp of the start event. In the case of a very large buffer, the loop that looks for the start event has been reported taking a very long time with a non preempt kernel that it can trigger a soft lock up warning. Add a cond_resched() into that loop to make sure that doesn't happen. - Use list_del_rcu() for eventfs ei->list variable It was reported that running loops of creating and deleting kprobe events could cause a crash due to the eventfs list iteration hitting a LIST_POISON variable. This is because the list is protected by SRCU but when an item is deleted from the list, it was using list_del() which poisons the "next" pointer. This is what list_del_rcu() was to prevent. * tag 'trace-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/timerlat: Add interface_lock around clearing of kthread in stop_kthread() tracing/timerlat: Only clear timer if a kthread exists tracing/osnoise: Use a cpumask to know what threads are kthreads eventfs: Use list_del_rcu() for SRCU protected list variable tracing: Avoid possible softlockup in tracing_iter_reset() tracing: Fix memory leak in fgraph storage selftest tracing: fgraph: Fix to add new fgraph_ops to array after ftrace_startup_subops() commit 031ae72825cef43e4650140b800ad58bf7a6a466 Author: Eric Dumazet Date: Wed Sep 4 14:44:18 2024 +0000 ila: call nf_unregister_net_hooks() sooner syzbot found an use-after-free Read in ila_nf_input [1] Issue here is that ila_xlat_exit_net() frees the rhashtable, then call nf_unregister_net_hooks(). It should be done in the reverse way, with a synchronize_rcu(). This is a good match for a pre_exit() method. [1] BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:159 [inline] BUG: KASAN: use-after-free in __rhashtable_lookup include/linux/rhashtable.h:604 [inline] BUG: KASAN: use-after-free in rhashtable_lookup include/linux/rhashtable.h:646 [inline] BUG: KASAN: use-after-free in rhashtable_lookup_fast+0x77a/0x9b0 include/linux/rhashtable.h:672 Read of size 4 at addr ffff888064620008 by task ksoftirqd/0/16 CPU: 0 UID: 0 PID: 16 Comm: ksoftirqd/0 Not tainted 6.11.0-rc4-syzkaller-00238-g2ad6d23f465a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 rht_key_hashfn include/linux/rhashtable.h:159 [inline] __rhashtable_lookup include/linux/rhashtable.h:604 [inline] rhashtable_lookup include/linux/rhashtable.h:646 [inline] rhashtable_lookup_fast+0x77a/0x9b0 include/linux/rhashtable.h:672 ila_lookup_wildcards net/ipv6/ila/ila_xlat.c:132 [inline] ila_xlat_addr net/ipv6/ila/ila_xlat.c:652 [inline] ila_nf_input+0x1fe/0x3c0 net/ipv6/ila/ila_xlat.c:190 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc3/0x220 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] NF_HOOK+0x29e/0x450 include/linux/netfilter.h:312 __netif_receive_skb_one_core net/core/dev.c:5661 [inline] __netif_receive_skb+0x1ea/0x650 net/core/dev.c:5775 process_backlog+0x662/0x15b0 net/core/dev.c:6108 __napi_poll+0xcb/0x490 net/core/dev.c:6772 napi_poll net/core/dev.c:6841 [inline] net_rx_action+0x89b/0x1240 net/core/dev.c:6963 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 run_ksoftirqd+0xca/0x130 kernel/softirq.c:928 smpboot_thread_fn+0x544/0xa30 kernel/smpboot.c:164 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 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x64620 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xbfffffff(buddy) raw: 00fff00000000000 ffffea0000959608 ffffea00019d9408 0000000000000000 raw: 0000000000000000 0000000000000003 00000000bfffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52dc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_ZERO), pid 5242, tgid 5242 (syz-executor), ts 73611328570, free_ts 618981657187 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3439 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4695 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] ___kmalloc_large_node+0x8b/0x1d0 mm/slub.c:4103 __kmalloc_large_node_noprof+0x1a/0x80 mm/slub.c:4130 __do_kmalloc_node mm/slub.c:4146 [inline] __kmalloc_node_noprof+0x2d2/0x440 mm/slub.c:4164 __kvmalloc_node_noprof+0x72/0x190 mm/util.c:650 bucket_table_alloc lib/rhashtable.c:186 [inline] rhashtable_init_noprof+0x534/0xa60 lib/rhashtable.c:1071 ila_xlat_init_net+0xa0/0x110 net/ipv6/ila/ila_xlat.c:613 ops_init+0x359/0x610 net/core/net_namespace.c:139 setup_net+0x515/0xca0 net/core/net_namespace.c:343 copy_net_ns+0x4e2/0x7b0 net/core/net_namespace.c:508 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x619/0xc10 kernel/fork.c:3328 __do_sys_unshare kernel/fork.c:3399 [inline] __se_sys_unshare kernel/fork.c:3397 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3397 page last free pid 11846 tgid 11846 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2612 __folio_put+0x2c8/0x440 mm/swap.c:128 folio_put include/linux/mm.h:1486 [inline] free_large_kmalloc+0x105/0x1c0 mm/slub.c:4565 kfree+0x1c4/0x360 mm/slub.c:4588 rhashtable_free_and_destroy+0x7c6/0x920 lib/rhashtable.c:1169 ila_xlat_exit_net+0x55/0x110 net/ipv6/ila/ila_xlat.c:626 ops_exit_list net/core/net_namespace.c:173 [inline] cleanup_net+0x802/0xcc0 net/core/net_namespace.c:640 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 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 Memory state around the buggy address: ffff88806461ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806461ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888064620000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888064620080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888064620100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Fixes: 7f00feaf1076 ("ila: Add generic ILA translation facility") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Tom Herbert Reviewed-by: Florian Westphal Link: https://patch.msgid.link/20240904144418.1162839-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 6fda63c45fe8a0870226c13dcce1cc21b7c4d508 Author: Arkadiusz Kubalewski Date: Wed Sep 4 15:50:34 2024 +0200 tools/net/ynl: fix cli.py --subscribe feature Execution of command: ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml / --subscribe "monitor" --sleep 10 fails with: File "/repo/./tools/net/ynl/cli.py", line 109, in main ynl.check_ntf() File "/repo/tools/net/ynl/lib/ynl.py", line 924, in check_ntf op = self.rsp_by_value[nl_msg.cmd()] KeyError: 19 Parsing Generic Netlink notification messages performs lookup for op in the message. The message was not yet decoded, and is not yet considered GenlMsg, thus msg.cmd() returns Generic Netlink family id (19) instead of proper notification command id (i.e.: DPLL_CMD_PIN_CHANGE_NTF=13). Allow the op to be obtained within NetlinkProtocol.decode(..) itself if the op was not passed to the decode function, thus allow parsing of Generic Netlink notifications without causing the failure. Suggested-by: Donald Hunter Link: https://lore.kernel.org/netdev/m2le0n5xpn.fsf@gmail.com/ Fixes: 0a966d606c68 ("tools/net/ynl: Fix extack decoding for directional ops") Signed-off-by: Arkadiusz Kubalewski Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20240904135034.316033-1-arkadiusz.kubalewski@intel.com Signed-off-by: Jakub Kicinski commit 20d664ebd212a85ad9c134e557619402bee6987f Author: Vadim Fedorenko Date: Wed Sep 4 13:18:55 2024 +0000 MAINTAINERS: fix ptp ocp driver maintainers address While checking the latest series for ptp_ocp driver I realised that MAINTAINERS file has wrong item about email on linux.dev domain. Fixes: 795fd9342c62 ("ptp_ocp: adjust MAINTAINERS and mailmap") Signed-off-by: Vadim Fedorenko Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240904131855.559078-1-vadim.fedorenko@linux.dev Signed-off-by: Jakub Kicinski commit e4af74a53b7aa865e7fcc104630ebb7a9129b71f Author: Jamie Bainbridge Date: Wed Sep 4 16:12:26 2024 +1000 selftests: net: enable bind tests bind_wildcard is compiled but not run, bind_timewait is not compiled. These two tests complete in a very short time, use the test harness properly, and seem reasonable to enable. The author of the tests confirmed via email that these were intended to be run. Enable these two tests. Fixes: 13715acf8ab5 ("selftest: Add test for bind() conflicts.") Fixes: 2c042e8e54ef ("tcp: Add selftest for bind() and TIME_WAIT.") Signed-off-by: Jamie Bainbridge Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/5a009b26cf5fb1ad1512d89c61b37e2fac702323.1725430322.git.jamie.bainbridge@gmail.com Signed-off-by: Jakub Kicinski commit 12cb32a52eb607dc4d0e45fe6f4cf946d08da0fd Author: David Gow Date: Thu Sep 5 10:47:55 2024 +0800 kunit: Fix missing kerneldoc comment Add a missing kerneldoc comment for the 'test' test context parameter, fixing the following warning: include/kunit/test.h:492: warning: Function parameter or struct member 'test' not described in 'kunit_kfree_const' Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/lkml/20240827160631.67e121ed@canb.auug.org.au/ Fixes: f2c6dbd22017 ("kunit: Device wrappers should also manage driver name") Signed-off-by: David Gow Reviewed-by: Kees Cook Signed-off-by: Shuah Khan commit 1a8d845470941f1b6de1b392227530c097dc5e0c Author: Alex Deucher Date: Thu Sep 5 14:24:38 2024 -0400 Revert "drm/amdgpu: align pp_power_profile_mode with kernel docs" This reverts commit 8f614469de248a4bc55fb07e55d5f4c340c75b11. This breaks some manual setting of the profile mode in certain cases. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3600 Signed-off-by: Alex Deucher (cherry picked from commit 7a199557643e993d4e7357860624b8aa5d8f4340) Cc: stable@vger.kernel.org commit c9ca76e8239810ccb08825a7b847c39d367410a6 Author: Frank Li Date: Thu Sep 5 11:52:30 2024 -0400 MAINTAINERS: SPI: Add mailing list imx@lists.linux.dev for nxp spi drivers Add mailing list imx@lists.linux.dev for nxp spi drivers(qspi, fspi and dspi). Signed-off-by: Frank Li Reviewed-by: Stefan Wahren Link: https://patch.msgid.link/20240905155230.1901787-1-Frank.Li@nxp.com Signed-off-by: Mark Brown commit fb9820c550cfc58684b612471cc50e4b5c305404 Author: Frank Li Date: Thu Sep 5 11:41:24 2024 -0400 MAINTAINERS: SPI: Add freescale lpspi maintainer information Add imx@lists.linux.dev and NXP maintainer information for lpspi driver (drivers/spi/spi-fsl-lpspi.c). Signed-off-by: Frank Li Reviewed-by: Stefan Wahren Link: https://patch.msgid.link/20240905154124.1901311-1-Frank.Li@nxp.com Signed-off-by: Mark Brown commit ad618736883b8970f66af799e34007475fe33a68 Merge: 120434e5b305d d34af755a5332 Author: Linus Torvalds Date: Thu Sep 5 09:57:50 2024 -0700 Merge tag 'platform-drivers-x86-v6.11-6' 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: ASUS GA403 quirk matching tweak - dell-smbios: Fix to the init function rollback path * tag 'platform-drivers-x86-v6.11-6' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd: pmf: Make ASUS GA403 quirk generic platform/x86: dell-smbios: Fix error path in dell_smbios_init() commit 120434e5b305defa1fb1e7a38421ed08f93243d5 Merge: c763c43396883 f2c6dbd220170 Author: Linus Torvalds Date: Thu Sep 5 09:43:38 2024 -0700 Merge tag 'linux_kselftest-kunit-fixes-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit fix fromShuah Khan: "One single fix to a use-after-free bug resulting from kunit_driver_create() failing to copy the driver name leaving it on the stack or freeing it" * tag 'linux_kselftest-kunit-fixes-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: Device wrappers should also manage driver name commit 59cbd4eea48fdbc68fc17a29ad71188fea74b28b Author: Steven Rostedt Date: Wed Aug 21 09:51:27 2024 -0400 KVM: Remove HIGH_RES_TIMERS dependency Commit 92b5265d38f6a ("KVM: Depend on HIGH_RES_TIMERS") added a dependency to high resolution timers with the comment: KVM lapic timer and tsc deadline timer based on hrtimer, setting a leftmost node to rb tree and then do hrtimer reprogram. If hrtimer not configured as high resolution, hrtimer_enqueue_reprogram do nothing and then make kvm lapic timer and tsc deadline timer fail. That was back in 2012, where hrtimer_start_range_ns() would do the reprogramming with hrtimer_enqueue_reprogram(). But as that was a nop with high resolution timers disabled, this did not work. But a lot has changed in the last 12 years. For example, commit 49a2a07514a3a ("hrtimer: Kick lowres dynticks targets on timer enqueue") modifies __hrtimer_start_range_ns() to work with low res timers. There's been lots of other changes that make low res work. ChromeOS has tested this before as well, and it hasn't seen any issues with running KVM with high res timers disabled. There could be problems, especially at low HZ, for guests that do not support kvmclock and rely on precise delivery of periodic timers to keep their clock running. This can be the APIC timer (provided by the kernel), the RTC (provided by userspace), or the i8254 (choice of kernel/userspace). These guests are few and far between these days, and in the case of the APIC timer + Intel hosts we can use the preemption timer (which is TSC-based and has better latency _and_ accuracy). In KVM, only x86 is requiring CONFIG_HIGH_RES_TIMERS; perhaps a "depends on HIGH_RES_TIMERS || EXPERT" could be added to virt/kvm, or a pr_warn could be added to kvm_init if HIGH_RES_TIMERS are not enabled. But in general, it seems that there must be other code in the kernel (maybe sound/?) that is relying on having high-enough HZ or hrtimers but that's not documented anywhere. Whenever you disable it you probably need to know what you're doing and what your workload is; so the dependency is not particularly interesting, and we can just remove it. Signed-off-by: Steven Rostedt (Google) Message-ID: <20240821095127.45d17b19@gandalf.local.home> [Added the last two paragraphs to the commit message. - Paolo] Signed-off-by: Paolo Bonzini commit 5bfbcd1ee57b607fd29e4645c7f350dd385dd9ad Author: Steven Rostedt Date: Thu Sep 5 11:33:59 2024 -0400 tracing/timerlat: Add interface_lock around clearing of kthread in stop_kthread() The timerlat interface will get and put the task that is part of the "kthread" field of the osn_var to keep it around until all references are released. But here's a race in the "stop_kthread()" code that will call put_task_struct() on the kthread if it is not a kernel thread. This can race with the releasing of the references to that task struct and the put_task_struct() can be called twice when it should have been called just once. Take the interface_lock() in stop_kthread() to synchronize this change. But to do so, the function stop_per_cpu_kthreads() needs to change the loop from for_each_online_cpu() to for_each_possible_cpu() and remove the cpu_read_lock(), as the interface_lock can not be taken while the cpu locks are held. The only side effect of this change is that it may do some extra work, as the per_cpu variables of the offline CPUs would not be set anyway, and would simply be skipped in the loop. Remove unneeded "return;" in stop_kthread(). Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Tomas Glozar Cc: John Kacur Cc: "Luis Claudio R. Goncalves" Link: https://lore.kernel.org/20240905113359.2b934242@gandalf.local.home Fixes: e88ed227f639e ("tracing/timerlat: Add user-space interface") Signed-off-by: Steven Rostedt (Google) commit e6a53481da292d970d1edf0d8831121d1c5e2f0d Author: Steven Rostedt Date: Thu Sep 5 08:53:30 2024 -0400 tracing/timerlat: Only clear timer if a kthread exists The timerlat tracer can use user space threads to check for osnoise and timer latency. If the program using this is killed via a SIGTERM, the threads are shutdown one at a time and another tracing instance can start up resetting the threads before they are fully closed. That causes the hrtimer assigned to the kthread to be shutdown and freed twice when the dying thread finally closes the file descriptors, causing a use-after-free bug. Only cancel the hrtimer if the associated thread is still around. Also add the interface_lock around the resetting of the tlat_var->kthread. Note, this is just a quick fix that can be backported to stable. A real fix is to have a better synchronization between the shutdown of old threads and the starting of new ones. Link: https://lore.kernel.org/all/20240820130001.124768-1-tglozar@redhat.com/ Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: "Luis Claudio R. Goncalves" Link: https://lore.kernel.org/20240905085330.45985730@gandalf.local.home Fixes: e88ed227f639e ("tracing/timerlat: Add user-space interface") Reported-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) commit 177e1cc2f41235c145041eed03ef5bab18f32328 Author: Steven Rostedt Date: Wed Sep 4 10:34:28 2024 -0400 tracing/osnoise: Use a cpumask to know what threads are kthreads The start_kthread() and stop_thread() code was not always called with the interface_lock held. This means that the kthread variable could be unexpectedly changed causing the kthread_stop() to be called on it when it should not have been, leading to: while true; do rtla timerlat top -u -q & PID=$!; sleep 5; kill -INT $PID; sleep 0.001; kill -TERM $PID; wait $PID; done Causing the following OOPS: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 5 UID: 0 PID: 885 Comm: timerlatu/5 Not tainted 6.11.0-rc4-test-00002-gbc754cc76d1b-dirty #125 a533010b71dab205ad2f507188ce8c82203b0254 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:hrtimer_active+0x58/0x300 Code: 48 c1 ee 03 41 54 48 01 d1 48 01 d6 55 53 48 83 ec 20 80 39 00 0f 85 30 02 00 00 49 8b 6f 30 4c 8d 75 10 4c 89 f0 48 c1 e8 03 <0f> b6 3c 10 4c 89 f0 83 e0 07 83 c0 03 40 38 f8 7c 09 40 84 ff 0f RSP: 0018:ffff88811d97f940 EFLAGS: 00010202 RAX: 0000000000000002 RBX: ffff88823c6b5b28 RCX: ffffed10478d6b6b RDX: dffffc0000000000 RSI: ffffed10478d6b6c RDI: ffff88823c6b5b28 RBP: 0000000000000000 R08: ffff88823c6b5b58 R09: ffff88823c6b5b60 R10: ffff88811d97f957 R11: 0000000000000010 R12: 00000000000a801d R13: ffff88810d8b35d8 R14: 0000000000000010 R15: ffff88823c6b5b28 FS: 0000000000000000(0000) GS:ffff88823c680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000561858ad7258 CR3: 000000007729e001 CR4: 0000000000170ef0 Call Trace: ? die_addr+0x40/0xa0 ? exc_general_protection+0x154/0x230 ? asm_exc_general_protection+0x26/0x30 ? hrtimer_active+0x58/0x300 ? __pfx_mutex_lock+0x10/0x10 ? __pfx_locks_remove_file+0x10/0x10 hrtimer_cancel+0x15/0x40 timerlat_fd_release+0x8e/0x1f0 ? security_file_release+0x43/0x80 __fput+0x372/0xb10 task_work_run+0x11e/0x1f0 ? _raw_spin_lock+0x85/0xe0 ? __pfx_task_work_run+0x10/0x10 ? poison_slab_object+0x109/0x170 ? do_exit+0x7a0/0x24b0 do_exit+0x7bd/0x24b0 ? __pfx_migrate_enable+0x10/0x10 ? __pfx_do_exit+0x10/0x10 ? __pfx_read_tsc+0x10/0x10 ? ktime_get+0x64/0x140 ? _raw_spin_lock_irq+0x86/0xe0 do_group_exit+0xb0/0x220 get_signal+0x17ba/0x1b50 ? vfs_read+0x179/0xa40 ? timerlat_fd_read+0x30b/0x9d0 ? __pfx_get_signal+0x10/0x10 ? __pfx_timerlat_fd_read+0x10/0x10 arch_do_signal_or_restart+0x8c/0x570 ? __pfx_arch_do_signal_or_restart+0x10/0x10 ? vfs_read+0x179/0xa40 ? ksys_read+0xfe/0x1d0 ? __pfx_ksys_read+0x10/0x10 syscall_exit_to_user_mode+0xbc/0x130 do_syscall_64+0x74/0x110 ? __pfx___rseq_handle_notify_resume+0x10/0x10 ? __pfx_ksys_read+0x10/0x10 ? fpregs_restore_userregs+0xdb/0x1e0 ? fpregs_restore_userregs+0xdb/0x1e0 ? syscall_exit_to_user_mode+0x116/0x130 ? do_syscall_64+0x74/0x110 ? do_syscall_64+0x74/0x110 ? do_syscall_64+0x74/0x110 entry_SYSCALL_64_after_hwframe+0x71/0x79 RIP: 0033:0x7ff0070eca9c Code: Unable to access opcode bytes at 0x7ff0070eca72. RSP: 002b:00007ff006dff8c0 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007ff0070eca9c RDX: 0000000000000400 RSI: 00007ff006dff9a0 RDI: 0000000000000003 RBP: 00007ff006dffde0 R08: 0000000000000000 R09: 00007ff000000ba0 R10: 00007ff007004b08 R11: 0000000000000246 R12: 0000000000000003 R13: 00007ff006dff9a0 R14: 0000000000000007 R15: 0000000000000008 Modules linked in: snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hwdep snd_hda_core ---[ end trace 0000000000000000 ]--- This is because it would mistakenly call kthread_stop() on a user space thread making it "exit" before it actually exits. Since kthreads are created based on global behavior, use a cpumask to know when kthreads are running and that they need to be shutdown before proceeding to do new work. Link: https://lore.kernel.org/all/20240820130001.124768-1-tglozar@redhat.com/ This was debugged by using the persistent ring buffer: Link: https://lore.kernel.org/all/20240823013902.135036960@goodmis.org/ Note, locking was originally used to fix this, but that proved to cause too many deadlocks to work around: https://lore.kernel.org/linux-trace-kernel/20240823102816.5e55753b@gandalf.local.home/ Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: "Luis Claudio R. Goncalves" Link: https://lore.kernel.org/20240904103428.08efdf4c@gandalf.local.home Fixes: e88ed227f639e ("tracing/timerlat: Add user-space interface") Reported-by: Tomas Glozar Signed-off-by: Steven Rostedt (Google) commit 895384881ec960aa4c602397a69f0a44a8169405 Author: Hongbo Li Date: Wed Sep 4 09:15:53 2024 +0800 hv: vmbus: Constify struct kobj_type and struct attribute_group vmbus_chan_group and vmbus_chan_type are not modified. They are only used in the helpers which take a const type parameter. Constifying these structures and moving them to a read-only section can increase over all security. ``` [Before] text data bss dec hex filename 20568 4699 48 25315 62e3 drivers/hv/vmbus_drv.o [After] text data bss dec hex filename 20696 4571 48 25315 62e3 drivers/hv/vmbus_drv.o ``` Signed-off-by: Hongbo Li Reviewed-by: Naman Jain Link: https://lore.kernel.org/r/20240904011553.2010203-1-lihongbo22@huawei.com Signed-off-by: Wei Liu Message-ID: <20240904011553.2010203-1-lihongbo22@huawei.com> commit 4ba032bc71dad8d604d308afffaa16b81816c751 Merge: b858a36fe9a12 899d2e5a4e3d3 Author: Jens Axboe Date: Thu Sep 5 08:45:54 2024 -0600 Merge tag 'nvme-6.11-2024-09-05' of git://git.infradead.org/nvme into block-6.11 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.11 - Sparse fix on static symbol (Jinjie) - Misleading warning message fix (Keith) - TCP command allocation handling fix (Maurizio) - PCI tagset allocation handling fix (Keith) - Low-power quirk for Samsung (Georg) - Queue limits fix for zone devices (Christoph) - Target protocol behavior fix (Maurizio)" * tag 'nvme-6.11-2024-09-05' of git://git.infradead.org/nvme: nvmet: Identify-Active Namespace ID List command should reject invalid nsid nvme: set BLK_FEAT_ZONED for ZNS multipath disks nvme-pci: Add sleep quirk for Samsung 990 Evo nvme-pci: allocate tagset on reset if necessary nvmet-tcp: fix kernel crash if commands allocation fails nvme: use better description for async reset reason nvmet: Make nvmet_debugfs static commit a83e4c97ddd7473406ec5e1df8d5e7b24bd7e892 Author: Vasiliy Kovalev Date: Thu Sep 5 17:02:11 2024 +0300 ALSA: hda/realtek - Fix inactive headset mic jack for ASUS Vivobook 15 X1504VAP When the headset is connected, there is no automatic switching of the capture source - you can only manually select the headset microphone in pavucontrol. This patch fixes/activates the inactive microphone of the headset. Signed-off-by: Vasiliy Kovalev Cc: Link: https://patch.msgid.link/20240905140211.937385-1-kovalev@altlinux.org Signed-off-by: Takashi Iwai commit d2603279c7d645bf0d11fa253b23f1ab48fc8d3c Author: Steven Rostedt Date: Wed Sep 4 13:16:05 2024 -0400 eventfs: Use list_del_rcu() for SRCU protected list variable Chi Zhiling reported: We found a null pointer accessing in tracefs[1], the reason is that the variable 'ei_child' is set to LIST_POISON1, that means the list was removed in eventfs_remove_rec. so when access the ei_child->is_freed, the panic triggered. by the way, the following script can reproduce this panic loop1 (){ while true do echo "p:kp submit_bio" > /sys/kernel/debug/tracing/kprobe_events echo "" > /sys/kernel/debug/tracing/kprobe_events done } loop2 (){ while true do tree /sys/kernel/debug/tracing/events/kprobes/ done } loop1 & loop2 [1]: [ 1147.959632][T17331] Unable to handle kernel paging request at virtual address dead000000000150 [ 1147.968239][T17331] Mem abort info: [ 1147.971739][T17331] ESR = 0x0000000096000004 [ 1147.976172][T17331] EC = 0x25: DABT (current EL), IL = 32 bits [ 1147.982171][T17331] SET = 0, FnV = 0 [ 1147.985906][T17331] EA = 0, S1PTW = 0 [ 1147.989734][T17331] FSC = 0x04: level 0 translation fault [ 1147.995292][T17331] Data abort info: [ 1147.998858][T17331] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 1148.005023][T17331] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 1148.010759][T17331] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 1148.016752][T17331] [dead000000000150] address between user and kernel address ranges [ 1148.024571][T17331] Internal error: Oops: 0000000096000004 [#1] SMP [ 1148.030825][T17331] Modules linked in: team_mode_loadbalance team nlmon act_gact cls_flower sch_ingress bonding tls macvlan dummy ib_core bridge stp llc veth amdgpu amdxcp mfd_core gpu_sched drm_exec drm_buddy radeon crct10dif_ce video drm_suballoc_helper ghash_ce drm_ttm_helper sha2_ce ttm sha256_arm64 i2c_algo_bit sha1_ce sbsa_gwdt cp210x drm_display_helper cec sr_mod cdrom drm_kms_helper binfmt_misc sg loop fuse drm dm_mod nfnetlink ip_tables autofs4 [last unloaded: tls] [ 1148.072808][T17331] CPU: 3 PID: 17331 Comm: ls Tainted: G W ------- ---- 6.6.43 #2 [ 1148.081751][T17331] Source Version: 21b3b386e948bedd29369af66f3e98ab01b1c650 [ 1148.088783][T17331] Hardware name: Greatwall GW-001M1A-FTF/GW-001M1A-FTF, BIOS KunLun BIOS V4.0 07/16/2020 [ 1148.098419][T17331] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1148.106060][T17331] pc : eventfs_iterate+0x2c0/0x398 [ 1148.111017][T17331] lr : eventfs_iterate+0x2fc/0x398 [ 1148.115969][T17331] sp : ffff80008d56bbd0 [ 1148.119964][T17331] x29: ffff80008d56bbf0 x28: ffff001ff5be2600 x27: 0000000000000000 [ 1148.127781][T17331] x26: ffff001ff52ca4e0 x25: 0000000000009977 x24: dead000000000100 [ 1148.135598][T17331] x23: 0000000000000000 x22: 000000000000000b x21: ffff800082645f10 [ 1148.143415][T17331] x20: ffff001fddf87c70 x19: ffff80008d56bc90 x18: 0000000000000000 [ 1148.151231][T17331] x17: 0000000000000000 x16: 0000000000000000 x15: ffff001ff52ca4e0 [ 1148.159048][T17331] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 [ 1148.166864][T17331] x11: 0000000000000000 x10: 0000000000000000 x9 : ffff8000804391d0 [ 1148.174680][T17331] x8 : 0000000180000000 x7 : 0000000000000018 x6 : 0000aaab04b92862 [ 1148.182498][T17331] x5 : 0000aaab04b92862 x4 : 0000000080000000 x3 : 0000000000000068 [ 1148.190314][T17331] x2 : 000000000000000f x1 : 0000000000007ea8 x0 : 0000000000000001 [ 1148.198131][T17331] Call trace: [ 1148.201259][T17331] eventfs_iterate+0x2c0/0x398 [ 1148.205864][T17331] iterate_dir+0x98/0x188 [ 1148.210036][T17331] __arm64_sys_getdents64+0x78/0x160 [ 1148.215161][T17331] invoke_syscall+0x78/0x108 [ 1148.219593][T17331] el0_svc_common.constprop.0+0x48/0xf0 [ 1148.224977][T17331] do_el0_svc+0x24/0x38 [ 1148.228974][T17331] el0_svc+0x40/0x168 [ 1148.232798][T17331] el0t_64_sync_handler+0x120/0x130 [ 1148.237836][T17331] el0t_64_sync+0x1a4/0x1a8 [ 1148.242182][T17331] Code: 54ffff6c f9400676 910006d6 f9000676 (b9405300) [ 1148.248955][T17331] ---[ end trace 0000000000000000 ]--- The issue is that list_del() is used on an SRCU protected list variable before the synchronization occurs. This can poison the list pointers while there is a reader iterating the list. This is simply fixed by using list_del_rcu() that is specifically made for this purpose. Link: https://lore.kernel.org/linux-trace-kernel/20240829085025.3600021-1-chizhiling@163.com/ Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20240904131605.640d42b1@gandalf.local.home Fixes: 43aa6f97c2d03 ("eventfs: Get rid of dentry pointers without refcounts") Reported-by: Chi Zhiling Tested-by: Chi Zhiling Signed-off-by: Steven Rostedt (Google) commit 49aa8a1f4d6800721c7971ed383078257f12e8f9 Author: Zheng Yejian Date: Tue Aug 27 20:46:54 2024 +0800 tracing: Avoid possible softlockup in tracing_iter_reset() In __tracing_open(), when max latency tracers took place on the cpu, the time start of its buffer would be updated, then event entries with timestamps being earlier than start of the buffer would be skipped (see tracing_iter_reset()). Softlockup will occur if the kernel is non-preemptible and too many entries were skipped in the loop that reset every cpu buffer, so add cond_resched() to avoid it. Cc: stable@vger.kernel.org Fixes: 2f26ebd549b9a ("tracing: use timestamp to determine start of latency traces") Link: https://lore.kernel.org/20240827124654.3817443-1-zhengyejian@huaweicloud.com Suggested-by: Steven Rostedt Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) commit c060f93253cad63ea9d41b5b1186a1da32541dec Author: Puranjay Mohan Date: Tue Jun 18 16:23:42 2024 +0000 arm64: stacktrace: fix the usage of ftrace_graph_ret_addr() ftrace_graph_ret_addr() takes an 'idx' integer pointer that is used to optimize the stack unwinding process. arm64 currently passes `NULL` for this parameter which stops it from utilizing these optimizations. Further, the current code for ftrace_graph_ret_addr() will just return the passed in return address if it is NULL which will break this usage. Pass a valid integer pointer to ftrace_graph_ret_addr() similar to x86_64's stack unwinder. Signed-off-by: Puranjay Mohan Fixes: 29c1c24a2707 ("function_graph: Fix up ftrace_graph_ret_addr()") Acked-by: Steven Rostedt (Google) Acked-by: Will Deacon Reviewed-by: Mark Rutland Tested-by: Mark Rutland Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20240618162342.28275-1-puranjay@kernel.org Signed-off-by: Catalin Marinas commit ff949d981c775332be94be70397ee1df20bc68e5 Author: Stefan Wahren Date: Thu Sep 5 13:15:37 2024 +0200 spi: spi-fsl-lpspi: Fix off-by-one in prescale max The commit 783bf5d09f86 ("spi: spi-fsl-lpspi: limit PRESCALE bit in TCR register") doesn't implement the prescaler maximum as intended. The maximum allowed value for i.MX93 should be 1 and for i.MX7ULP it should be 7. So this needs also a adjustment of the comparison in the scldiv calculation. Fixes: 783bf5d09f86 ("spi: spi-fsl-lpspi: limit PRESCALE bit in TCR register") Signed-off-by: Stefan Wahren Link: https://patch.msgid.link/20240905111537.90389-1-wahrenst@gmx.net Signed-off-by: Mark Brown commit b02d2cf5b220872cd10afe610348b9ec41b9ac05 Merge: 431c1646e1f86 9c68a3b03e810 Author: Rafael J. Wysocki Date: Thu Sep 5 12:41:41 2024 +0200 Merge tag 'amd-pstate-v6.11-2024-09-04' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Pull an amd-pstate fix for 6.11 from Mario Limonciello: "second round of amd-pstate fixes for 6.11: * Fix an incorrect warning emitted on processors that don't support X86_FEATURE_CPPC." * tag 'amd-pstate-v6.11-2024-09-04' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Remove warning for X86_FEATURE_CPPC on certain Zen models commit 8e69c96df771ab469cec278edb47009351de4da6 Author: Pawel Dembicki Date: Tue Sep 3 22:33:41 2024 +0200 net: dsa: vsc73xx: fix possible subblocks range of CAPT block CAPT block (CPU Capture Buffer) have 7 sublocks: 0-3, 4, 6, 7. Function 'vsc73xx_is_addr_valid' allows to use only block 0 at this moment. This patch fix it. Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver") Signed-off-by: Pawel Dembicki Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240903203340.1518789-1-paweldembicki@gmail.com Signed-off-by: Paolo Abeni commit 546ea84d07e3e324644025e2aae2d12ea4c5896e Author: Toke Høiland-Jørgensen Date: Tue Sep 3 18:08:45 2024 +0200 sched: sch_cake: fix bulk flow accounting logic for host fairness In sch_cake, we keep track of the count of active bulk flows per host, when running in dst/src host fairness mode, which is used as the round-robin weight when iterating through flows. The count of active bulk flows is updated whenever a flow changes state. This has a peculiar interaction with the hash collision handling: when a hash collision occurs (after the set-associative hashing), the state of the hash bucket is simply updated to match the new packet that collided, and if host fairness is enabled, that also means assigning new per-host state to the flow. For this reason, the bulk flow counters of the host(s) assigned to the flow are decremented, before new state is assigned (and the counters, which may not belong to the same host anymore, are incremented again). Back when this code was introduced, the host fairness mode was always enabled, so the decrement was unconditional. When the configuration flags were introduced the *increment* was made conditional, but the *decrement* was not. Which of course can lead to a spurious decrement (and associated wrap-around to U16_MAX). AFAICT, when host fairness is disabled, the decrement and wrap-around happens as soon as a hash collision occurs (which is not that common in itself, due to the set-associative hashing). However, in most cases this is harmless, as the value is only used when host fairness mode is enabled. So in order to trigger an array overflow, sch_cake has to first be configured with host fairness disabled, and while running in this mode, a hash collision has to occur to cause the overflow. Then, the qdisc has to be reconfigured to enable host fairness, which leads to the array out-of-bounds because the wrapped-around value is retained and used as an array index. It seems that syzbot managed to trigger this, which is quite impressive in its own right. This patch fixes the issue by introducing the same conditional check on decrement as is used on increment. The original bug predates the upstreaming of cake, but the commit listed in the Fixes tag touched that code, meaning that this patch won't apply before that. Fixes: 712639929912 ("sch_cake: Make the dual modes fairer") Reported-by: syzbot+7fe7b81d602cc1e6b94d@syzkaller.appspotmail.com Signed-off-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20240903160846.20909-1-toke@redhat.com Signed-off-by: Paolo Abeni commit 2650fd867929355bb39912c2fe603fe959234224 Merge: 95fe795c24462 5956ee09c8254 Author: Arnd Bergmann Date: Thu Sep 5 09:25:45 2024 +0000 Merge tag 'v6.11-rockchip-dtsfixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes A number of pin fixes for Puma, Rock-Pi-E and rk356x, and as it turns out the VO0 and VO1 general register files are not identical as suggested by their original compatible. As there are no users of those yet, everybody agreed that we should fix the compatibles. * tag 'v6.11-rockchip-dtsfixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Fix compatibles for RK3588 VO{0,1}_GRF dt-bindings: soc: rockchip: Fix compatibles for RK3588 VO{0,1}_GRF arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma arm64: dts: rockchip: fix PMIC interrupt pin in pinctrl for ROCK Pi E arm64: dts: rockchip: Remove broken tsadc pinctrl binding for rk356x Link: https://lore.kernel.org/r/7602696.A5hrfCrGMc@diego Signed-off-by: Arnd Bergmann commit 95fe795c2446287e62ac9ee55d795f37f45246f4 Merge: 9cc7b1705141d db213b0cfe326 Author: Arnd Bergmann Date: Thu Sep 5 09:24:17 2024 +0000 Merge tag 'qcom-drivers-fixes-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes One more Qualcomm driver fix for v6.11 This resolves a deadlock in the Qualcomm uefisecapp driver following the attempt to acquire global context is acquired in the case the device isn't probed. * tag 'qcom-drivers-fixes-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: firmware: qcom: uefisecapp: Fix deadlock in qcuefi_acquire() Link: https://lore.kernel.org/r/20240904145214.4089-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 10c48e9a8fd5e524d37559cf4a06039b4c25db48 Author: Uwe Kleine-König Date: Thu Sep 5 11:06:24 2024 +0200 pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable() The pwm devices for a pwm_chip are numbered starting at 0, the first hw channel however has the number 1. While introducing a parametrised macro to simplify register bit usage and making that offset explicit, one of the usages was converted wrongly. This is fixed here. Fixes: 7cea05ae1d4e ("pwm-stm32: Make use of parametrised register definitions") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240905090627.197536-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 5a498d4d06d6d9bad76d8a50a7f8fe01670ad46f Author: Thomas Zimmermann Date: Wed Sep 4 14:36:54 2024 +0200 drm/fbdev-dma: Only install deferred I/O if necessary Deferred I/O requires struct page for framebuffer memory, which is not guaranteed for all DMA ranges. We thus only install deferred I/O if we have a framebuffer that requires it. A reported bug affected the ipu-v3 and pl111 drivers, which have video memory in either Normal or HighMem zones [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000010000000-0x000000003fffffff] [ 0.000000] HighMem [mem 0x0000000040000000-0x000000004fffffff] where deferred I/O only works correctly with HighMem. See the Closes tags for bug reports. v2: - test if screen_buffer supports deferred I/O (Sima) Signed-off-by: Thomas Zimmermann Fixes: 808a40b69468 ("drm/fbdev-dma: Implement damage handling and deferred I/O") Reported-by: Alexander Stein Closes: https://lore.kernel.org/all/23636953.6Emhk5qWAg@steina-w/ Reported-by: Linus Walleij Closes: https://lore.kernel.org/dri-devel/CACRpkdb+hb9AGavbWpY-=uQQ0apY9en_tWJioPKf_fAbXMP4Hg@mail.gmail.com/ Tested-by: Alexander Stein Tested-by: Linus Walleij Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Reviewed-by: Simona Vetter Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20240904123750.31206-1-tzimmermann@suse.de commit c82299fbbccecf5866bdc3fa9cc46d5c6f5005ad Author: Jakub Kicinski Date: Fri Aug 30 10:14:42 2024 -0700 docs: netdev: document guidance on cleanup.h Document what was discussed multiple times on list and various virtual / in-person conversations. guard() being okay in functions <= 20 LoC is a bit of my own invention. If the function is trivial it should be fine, but feel free to disagree :) We'll obviously revisit this guidance as time passes and we and other subsystems get more experience. Reviewed-by: Eric Dumazet Reviewed-by: Nikolay Aleksandrov Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20240830171443.3532077-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 7de295d1a1a1b84e57b348e8bfd0fab5aab3ce69 Author: Adrián Larumbe Date: Mon Sep 2 14:02:35 2024 +0100 drm/panthor: flush FW AS caches in slow reset path In the off-chance that waiting for the firmware to signal its booted status timed out in the fast reset path, one must flush the cache lines for the entire FW VM address space before reloading the regions, otherwise stale values eventually lead to a scheduler job timeout. Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") Cc: stable@vger.kernel.org Signed-off-by: Adrián Larumbe Acked-by: Liviu Dudau Reviewed-by: Steven Price Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20240902130237.3440720-1-adrian.larumbe@collabora.com commit 76dce2a96c0f48295e92acf7a8f3fa46ea0ee524 Author: Ryan Walklin Date: Wed Sep 4 13:23:22 2024 +1200 drm: panel: nv3052c: Correct WL-355608-A8 panel compatible As per the previous dt-binding commit, update the WL-355608-A8 panel compatible to reflect the the integrating device vendor and name as the panel OEM is unknown. Fixes: 62ea2eeba7bf ("drm: panel: nv3052c: Add WL-355608-A8 panel") Signed-off-by: Ryan Walklin Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240904012456.35429-3-ryan@testtoast.com commit d682eef93ebfbcd107c1a339ef24a0dcc4681fbc Author: Ryan Walklin Date: Wed Sep 4 13:23:21 2024 +1200 dt-bindings: display: panel: Rename WL-355608-A8 panel to rg35xx-*-panel The WL-355608-A8 is a 3.5" 640x480@60Hz RGB LCD display from an unknown OEM used in a number of handheld gaming devices made by Anbernic. Previously committed using the OEM serial without a vendor prefix, however following subsequent discussion the preference is to use the integrating device vendor and name where the OEM is unknown. There are 4 RG35XX series devices from Anbernic based on an Allwinner H700 SoC using this panel, with the -Plus variant introduced first. Therefore the -Plus is used as the fallback for the subsequent -H, -2024, and -SP devices. Alter the filename and compatible string to reflect the convention. Fixes: 45b888a8980a ("dt-bindings: display: panel: Add WL-355608-A8 panel") Signed-off-by: Ryan Walklin Acked-by: Rob Herring (Arm) Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240904012456.35429-2-ryan@testtoast.com commit 5f7762042f8a5377bd8a32844db353c0311a7369 Author: Mary Guillemard Date: Tue Sep 3 16:49:55 2024 +0200 drm/panthor: Restrict high priorities on group_create We were allowing any users to create a high priority group without any permission checks. As a result, this was allowing possible denial of service. We now only allow the DRM master or users with the CAP_SYS_NICE capability to set higher priorities than PANTHOR_GROUP_PRIORITY_MEDIUM. As the sole user of that uAPI lives in Mesa and hardcode a value of MEDIUM [1], this should be safe to do. Additionally, as those checks are performed at the ioctl level, panthor_group_create now only check for priority level validity. [1]https://gitlab.freedesktop.org/mesa/mesa/-/blob/f390835074bdf162a63deb0311d1a6de527f9f89/src/gallium/drivers/panfrost/pan_csf.c#L1038 Signed-off-by: Mary Guillemard Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") Cc: stable@vger.kernel.org Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20240903144955.144278-2-mary.guillemard@collabora.com commit 5e5cc1eb65256e6017e3deec04f9806f2f317853 Author: zhang jiao Date: Mon Sep 2 12:21:03 2024 +0800 tools: hv: rm .*.cmd when make clean rm .*.cmd when make clean Signed-off-by: zhang jiao Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20240902042103.5867-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: Wei Liu Message-ID: <20240902042103.5867-1-zhangjiao2@cmss.chinamobile.com> commit b9af6418279c4cf73ca073f8ea024992b38be8ab Author: Anirudh Rayabharam (Microsoft) Date: Wed Aug 28 16:51:56 2024 +0530 x86/hyperv: fix kexec crash due to VP assist page corruption commit 9636be85cc5b ("x86/hyperv: Fix hyperv_pcpu_input_arg handling when CPUs go online/offline") introduces a new cpuhp state for hyperv initialization. cpuhp_setup_state() returns the state number if state is CPUHP_AP_ONLINE_DYN or CPUHP_BP_PREPARE_DYN and 0 for all other states. For the hyperv case, since a new cpuhp state was introduced it would return 0. However, in hv_machine_shutdown(), the cpuhp_remove_state() call is conditioned upon "hyperv_init_cpuhp > 0". This will never be true and so hv_cpu_die() won't be called on all CPUs. This means the VP assist page won't be reset. When the kexec kernel tries to setup the VP assist page again, the hypervisor corrupts the memory region of the old VP assist page causing a panic in case the kexec kernel is using that memory elsewhere. This was originally fixed in commit dfe94d4086e4 ("x86/hyperv: Fix kexec panic/hang issues"). Get rid of hyperv_init_cpuhp entirely since we are no longer using a dynamic cpuhp state and use CPUHP_AP_HYPERV_ONLINE directly with cpuhp_remove_state(). Cc: stable@vger.kernel.org Fixes: 9636be85cc5b ("x86/hyperv: Fix hyperv_pcpu_input_arg handling when CPUs go online/offline") Signed-off-by: Anirudh Rayabharam (Microsoft) Reviewed-by: Vitaly Kuznetsov Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20240828112158.3538342-1-anirudh@anirudhrb.com Signed-off-by: Wei Liu Message-ID: <20240828112158.3538342-1-anirudh@anirudhrb.com> commit f0417c50fddd628e534c336d87932e7e1e883df3 Merge: 2603d3152b1f6 04c7e14e5b0b6 Author: Jakub Kicinski Date: Wed Sep 4 17:37:37 2024 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== ice: fix synchronization between .ndo_bpf() and reset Larysa Zaremba says: PF reset can be triggered asynchronously, by tx_timeout or by a user. With some unfortunate timings both ice_vsi_rebuild() and .ndo_bpf will try to access and modify XDP rings at the same time, causing system crash. The first patch factors out rtnl-locked code from VSI rebuild code to avoid deadlock. The following changes lock rebuild and .ndo_bpf() critical sections with an internal mutex as well and provide complementary fixes. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: do not bring the VSI up, if it was down before the XDP setup ice: remove ICE_CFG_BUSY locking from AF_XDP code ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset ice: check for XDP rings instead of bpf program when unconfiguring ice: protect XDP configuration with a mutex ice: move netif_queue_set_napi to rtnl-protected sections ==================== Link: https://patch.msgid.link/20240903183034.3530411-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 2603d3152b1f646b0ef81a748fb703b799fcf9c3 Merge: 858430db28a5f 5872b47ce18ef Author: Jakub Kicinski Date: Wed Sep 4 17:14:11 2024 -0700 Merge tag 'wireless-2024-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.11 Hopefully final fixes for v6.11 and this time only fixes to ath11k driver. We need to revert hibernation support due to reported regressions and we have a fix for kernel crash introduced in v6.11-rc1. * tag 'wireless-2024-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: MAINTAINERS: wifi: cw1200: add net-cw1200.h Revert "wifi: ath11k: support hibernation" Revert "wifi: ath11k: restore country code during resume" wifi: ath11k: fix NULL pointer dereference in ath11k_mac_get_eirp_power() ==================== Link: https://patch.msgid.link/20240904135906.5986EC4CECA@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 858430db28a5f5a11f8faa3a6fa805438e6f0851 Author: Sean Anderson Date: Tue Sep 3 13:51:41 2024 -0400 net: xilinx: axienet: Fix race in axienet_stop axienet_dma_err_handler can race with axienet_stop in the following manner: CPU 1 CPU 2 ====================== ================== axienet_stop() napi_disable() axienet_dma_stop() axienet_dma_err_handler() napi_disable() axienet_dma_stop() axienet_dma_start() napi_enable() cancel_work_sync() free_irq() Fix this by setting a flag in axienet_stop telling axienet_dma_err_handler not to bother doing anything. I chose not to use disable_work_sync to allow for easier backporting. Signed-off-by: Sean Anderson Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Link: https://patch.msgid.link/20240903175141.4132898-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit bee2ef946d3184e99077be526567d791c473036f Author: Jonas Gorski Date: Tue Sep 3 10:19:57 2024 +0200 net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN When userspace wants to take over a fdb entry by setting it as EXTERN_LEARNED, we set both flags BR_FDB_ADDED_BY_EXT_LEARN and BR_FDB_ADDED_BY_USER in br_fdb_external_learn_add(). If the bridge updates the entry later because its port changed, we clear the BR_FDB_ADDED_BY_EXT_LEARN flag, but leave the BR_FDB_ADDED_BY_USER flag set. If userspace then wants to take over the entry again, br_fdb_external_learn_add() sees that BR_FDB_ADDED_BY_USER and skips setting the BR_FDB_ADDED_BY_EXT_LEARN flags, thus silently ignores the update. Fix this by always allowing to set BR_FDB_ADDED_BY_EXT_LEARN regardless if this was a user fdb entry or not. Fixes: 710ae7287737 ("net: bridge: Mark FDB entries that were added by user as such") Signed-off-by: Jonas Gorski Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20240903081958.29951-1-jonas.gorski@bisdn.de Signed-off-by: Jakub Kicinski commit 8487b4af59d4d7feda4b119dc2d92c67ca25c27e Author: Hayes Wang Date: Tue Sep 3 14:33:33 2024 +0800 r8152: fix the firmware doesn't work generic_ocp_write() asks the parameter "size" must be 4 bytes align. Therefore, write the bp would fail, if the mac->bp_num is odd. Align the size to 4 for fixing it. The way may write an extra bp, but the rtl8152_is_fw_mac_ok() makes sure the value must be 0 for the bp whose index is more than mac->bp_num. That is, there is no influence for the firmware. Besides, I check the return value of generic_ocp_write() to make sure everything is correct. Fixes: e5c266a61186 ("r8152: set bp in bulk") Signed-off-by: Hayes Wang Link: https://patch.msgid.link/20240903063333.4502-1-hayeswang@realtek.com Signed-off-by: Jakub Kicinski commit 7e4196935069947d8b70b09c1660b67b067e75cb Author: Kuniyuki Iwashima Date: Mon Sep 2 10:39:27 2024 -0700 fou: Fix null-ptr-deref in GRO. We observed a null-ptr-deref in fou_gro_receive() while shutting down a host. [0] The NULL pointer is sk->sk_user_data, and the offset 8 is of protocol in struct fou. When fou_release() is called due to netns dismantle or explicit tunnel teardown, udp_tunnel_sock_release() sets NULL to sk->sk_user_data. Then, the tunnel socket is destroyed after a single RCU grace period. So, in-flight udp4_gro_receive() could find the socket and execute the FOU GRO handler, where sk->sk_user_data could be NULL. Let's use rcu_dereference_sk_user_data() in fou_from_sock() and add NULL checks in FOU GRO handlers. [0]: BUG: kernel NULL pointer dereference, address: 0000000000000008 PF: supervisor read access in kernel mode PF: error_code(0x0000) - not-present page PGD 80000001032f4067 P4D 80000001032f4067 PUD 103240067 PMD 0 SMP PTI CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.216-204.855.amzn2.x86_64 #1 Hardware name: Amazon EC2 c5.large/, BIOS 1.0 10/16/2017 RIP: 0010:fou_gro_receive (net/ipv4/fou.c:233) [fou] Code: 41 5f c3 cc cc cc cc e8 e7 2e 69 f4 0f 1f 80 00 00 00 00 0f 1f 44 00 00 49 89 f8 41 54 48 89 f7 48 89 d6 49 8b 80 88 02 00 00 <0f> b6 48 08 0f b7 42 4a 66 25 fd fd 80 cc 02 66 89 42 4a 0f b6 42 RSP: 0018:ffffa330c0003d08 EFLAGS: 00010297 RAX: 0000000000000000 RBX: ffff93d9e3a6b900 RCX: 0000000000000010 RDX: ffff93d9e3a6b900 RSI: ffff93d9e3a6b900 RDI: ffff93dac2e24d08 RBP: ffff93d9e3a6b900 R08: ffff93dacbce6400 R09: 0000000000000002 R10: 0000000000000000 R11: ffffffffb5f369b0 R12: ffff93dacbce6400 R13: ffff93dac2e24d08 R14: 0000000000000000 R15: ffffffffb4edd1c0 FS: 0000000000000000(0000) GS:ffff93daee800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 0000000102140001 CR4: 00000000007706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? show_trace_log_lvl (arch/x86/kernel/dumpstack.c:259) ? __die_body.cold (arch/x86/kernel/dumpstack.c:478 arch/x86/kernel/dumpstack.c:420) ? no_context (arch/x86/mm/fault.c:752) ? exc_page_fault (arch/x86/include/asm/irqflags.h:49 arch/x86/include/asm/irqflags.h:89 arch/x86/mm/fault.c:1435 arch/x86/mm/fault.c:1483) ? asm_exc_page_fault (arch/x86/include/asm/idtentry.h:571) ? fou_gro_receive (net/ipv4/fou.c:233) [fou] udp_gro_receive (include/linux/netdevice.h:2552 net/ipv4/udp_offload.c:559) udp4_gro_receive (net/ipv4/udp_offload.c:604) inet_gro_receive (net/ipv4/af_inet.c:1549 (discriminator 7)) dev_gro_receive (net/core/dev.c:6035 (discriminator 4)) napi_gro_receive (net/core/dev.c:6170) ena_clean_rx_irq (drivers/amazon/net/ena/ena_netdev.c:1558) [ena] ena_io_poll (drivers/amazon/net/ena/ena_netdev.c:1742) [ena] napi_poll (net/core/dev.c:6847) net_rx_action (net/core/dev.c:6917) __do_softirq (arch/x86/include/asm/jump_label.h:25 include/linux/jump_label.h:200 include/trace/events/irq.h:142 kernel/softirq.c:299) asm_call_irq_on_stack (arch/x86/entry/entry_64.S:809) do_softirq_own_stack (arch/x86/include/asm/irq_stack.h:27 arch/x86/include/asm/irq_stack.h:77 arch/x86/kernel/irq_64.c:77) irq_exit_rcu (kernel/softirq.c:393 kernel/softirq.c:423 kernel/softirq.c:435) common_interrupt (arch/x86/kernel/irq.c:239) asm_common_interrupt (arch/x86/include/asm/idtentry.h:626) RIP: 0010:acpi_idle_do_entry (arch/x86/include/asm/irqflags.h:49 arch/x86/include/asm/irqflags.h:89 drivers/acpi/processor_idle.c:114 drivers/acpi/processor_idle.c:575) Code: 8b 15 d1 3c c4 02 ed c3 cc cc cc cc 65 48 8b 04 25 40 ef 01 00 48 8b 00 a8 08 75 eb 0f 1f 44 00 00 0f 00 2d d5 09 55 00 fb f4 c3 cc cc cc cc e9 be fc ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 RSP: 0018:ffffffffb5603e58 EFLAGS: 00000246 RAX: 0000000000004000 RBX: ffff93dac0929c00 RCX: ffff93daee833900 RDX: ffff93daee800000 RSI: ffff93daee87dc00 RDI: ffff93daee87dc64 RBP: 0000000000000001 R08: ffffffffb5e7b6c0 R09: 0000000000000044 R10: ffff93daee831b04 R11: 00000000000001cd R12: 0000000000000001 R13: ffffffffb5e7b740 R14: 0000000000000001 R15: 0000000000000000 ? sched_clock_cpu (kernel/sched/clock.c:371) acpi_idle_enter (drivers/acpi/processor_idle.c:712 (discriminator 3)) cpuidle_enter_state (drivers/cpuidle/cpuidle.c:237) cpuidle_enter (drivers/cpuidle/cpuidle.c:353) cpuidle_idle_call (kernel/sched/idle.c:158 kernel/sched/idle.c:239) do_idle (kernel/sched/idle.c:302) cpu_startup_entry (kernel/sched/idle.c:395 (discriminator 1)) start_kernel (init/main.c:1048) secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:310) Modules linked in: udp_diag tcp_diag inet_diag nft_nat ipip tunnel4 dummy fou ip_tunnel nft_masq nft_chain_nat nf_nat wireguard nft_ct curve25519_x86_64 libcurve25519_generic nf_conntrack libchacha20poly1305 nf_defrag_ipv6 nf_defrag_ipv4 nft_objref chacha_x86_64 nft_counter nf_tables nfnetlink poly1305_x86_64 ip6_udp_tunnel udp_tunnel libchacha crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd glue_helper mousedev psmouse button ena ptp pps_core crc32c_intel CR2: 0000000000000008 Fixes: d92283e338f6 ("fou: change to use UDP socket GRO") Reported-by: Alphonse Kurian Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20240902173927.62706-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 4963d2343af81f493519f9c3ea9f2169eaa7353a Author: Guillaume Nault Date: Fri Aug 30 17:31:07 2024 +0200 bareudp: Fix device stats updates. Bareudp devices update their stats concurrently. Therefore they need proper atomic increments. Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Signed-off-by: Guillaume Nault Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/04b7b9d0b480158eb3ab4366ec80aa2ab7e41fcb.1725031794.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit c763c43396883456ef57e5e78b64d3c259c4babc Merge: 2adad548f74c3 53f6619554fb1 Author: Linus Torvalds Date: Wed Sep 4 13:54:47 2024 -0700 Merge tag 'bcachefs-2024-09-04' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - Fix a typo in the rebalance accounting changes - BCH_SB_MEMBER_INVALID: small on disk format feature which will be needed for full erasure coding support; this is only the minimum so that 6.11 can handle future versions without barfing. * tag 'bcachefs-2024-09-04' of git://evilpiepirate.org/bcachefs: bcachefs: BCH_SB_MEMBER_INVALID bcachefs: fix rebalance accounting commit 5390f315fc8c9b9f48105a0d88b56bc59fa2b3e0 Merge: b408473ea01b2 743070894724b Author: Alexei Starovoitov Date: Wed Sep 4 11:56:34 2024 -0700 Merge branch 'bpf-fix-incorrect-name-check-pass-logic-in-btf_name_valid_section' Jeongjun Park says: ==================== bpf: fix incorrect name check pass logic in btf_name_valid_section This patch was written to fix an issue where btf_name_valid_section() would not properly check names with certain conditions and would throw an OOB vuln. And selftest was added to verify this patch. ==================== Link: https://lore.kernel.org/r/20240831054525.364353-1-aha310510@gmail.com Signed-off-by: Alexei Starovoitov commit 743070894724bf5ee0b2c77a28f838f6244d19bd Author: Jeongjun Park Date: Sat Aug 31 14:47:42 2024 +0900 selftests/bpf: Add a selftest to check for incorrect names Add selftest for cases where btf_name_valid_section() does not properly check for certain types of names. Suggested-by: Eduard Zingerman Signed-off-by: Jeongjun Park Link: https://lore.kernel.org/r/20240831054742.364585-1-aha310510@gmail.com Signed-off-by: Alexei Starovoitov Acked-by: Eduard Zingerman commit 2adad548f74c30739c35994da419eb2318e6fbd1 Merge: 14a244a9095e9 e162cb25c410a Author: Linus Torvalds Date: Wed Sep 4 12:10:19 2024 -0700 Merge tag 'perf-tools-fixes-for-v6.11-2024-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Namhyung Kim: "A number of small fixes for the late cycle: - Two more build fixes on 32-bit archs - Fixed a segfault during perf test - Fixed spinlock/rwlock accounting bug in perf lock contention" * tag 'perf-tools-fixes-for-v6.11-2024-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf daemon: Fix the build on more 32-bit architectures perf python: include "util/sample.h" perf lock contention: Fix spinlock and rwlock accounting perf test pmu: Set uninitialized PMU alias to null commit 14a244a9095e9034339c1c9a7b435f238f7d49df Merge: 1263a7bf8a0e7 a54da9df75cd1 Author: Linus Torvalds Date: Wed Sep 4 12:07:31 2024 -0700 Merge tag 'hwmon-for-v6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - hp-wmi-sensors: Check if WMI event data exists before accessing it - ltc2991: fix register bits defines * tag 'hwmon-for-v6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (hp-wmi-sensors) Check if WMI event data exists hwmon: ltc2991: fix register bits defines commit bb6705c3f93bed2af03d43691743d4c43e3c8e6f Author: Jeongjun Park Date: Sat Aug 31 14:47:02 2024 +0900 bpf: add check for invalid name in btf_name_valid_section() If the length of the name string is 1 and the value of name[0] is NULL byte, an OOB vulnerability occurs in btf_name_valid_section() and the return value is true, so the invalid name passes the check. To solve this, you need to check if the first position is NULL byte and if the first character is printable. Suggested-by: Eduard Zingerman Fixes: bd70a8fb7ca4 ("bpf: Allow all printable characters in BTF DATASEC names") Signed-off-by: Jeongjun Park Link: https://lore.kernel.org/r/20240831054702.364455-1-aha310510@gmail.com Signed-off-by: Alexei Starovoitov Acked-by: Eduard Zingerman commit 1263a7bf8a0e77c6cda8f5a40509d99829216a45 Merge: d8abb73f58477 cd9253c23aedd Author: Linus Torvalds Date: Wed Sep 4 11:53:47 2024 -0700 Merge tag 'for-6.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - followup fix for direct io and fsync under some conditions, reported by QEMU users - fix a potential leak when disabling quotas while some extent tracking work can still happen - in zoned mode handle unexpected change of zone write pointer in RAID1-like block groups, turn the zones to read-only * tag 'for-6.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix race between direct IO write and fsync when using same fd btrfs: zoned: handle broken write pointer on zones btrfs: qgroup: don't use extent changeset when not needed commit d8abb73f584772eaafa95a447c90f1c02dba0dec Merge: 4356ab331c8f0 844436e045ac2 Author: Linus Torvalds Date: Wed Sep 4 09:41:51 2024 -0700 Merge tag 'v6.11-rc6-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - Fix crash in session setup - Fix locking bug - Improve access bounds checking * tag 'v6.11-rc6-server-fixes' of git://git.samba.org/ksmbd: ksmbd: Unlock on in ksmbd_tcp_set_interfaces() ksmbd: unset the binding mark of a reused connection smb: Annotate struct xattr_smb_acl with __counted_by() commit 4356ab331c8f0dbed0f683abde345cd5503db1e4 Merge: c7fb1692dc013 72a6e22c604c9 Author: Linus Torvalds Date: Wed Sep 4 09:33:57 2024 -0700 Merge tag 'vfs-6.11-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "Two netfs fixes for this merge window: - Ensure that fscache_cookie_lru_time is deleted when the fscache module is removed to prevent UAF - Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() Before it used truncate_inode_pages_partial() which causes copy_file_range() to fail on cifs" * tag 'vfs-6.11-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF mm: Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() commit 4bfc9c553f5ea8cbfe085824f3283885cf173c20 Author: Rodrigo Vivi Date: Fri Aug 30 14:35:07 2024 -0400 drm/xe/display: Avoid encoder_suspend at runtime suspend Fix circular locking dependency on runtime suspend. <4> [74.952215] ====================================================== <4> [74.952217] WARNING: possible circular locking dependency detected <4> [74.952219] 6.10.0-rc7-xe #1 Not tainted <4> [74.952221] ------------------------------------------------------ <4> [74.952223] kworker/7:1/82 is trying to acquire lock: <4> [74.952226] ffff888120548488 (&dev->mode_config.mutex){+.+.}-{3:3}, at: drm_modeset_lock_all+0x40/0x1e0 [drm] <4> [74.952260] but task is already holding lock: <4> [74.952262] ffffffffa0ae59c0 (xe_pm_runtime_lockdep_map){+.+.}-{0:0}, at: xe_pm_runtime_suspend+0x2f/0x340 [xe] <4> [74.952322] which lock already depends on the new lock. The commit 'b1d90a86 ("drm/xe: Use the encoder suspend helper also used by the i915 driver")' didn't do anything wrong. It actually fixed a critical bug, because the encoder_suspend was never getting actually called because it was returning if (has_display(xe)) instead of if (!has_display(xe)). However, this ended up introducing the encoder suspend calls in the runtime routines as well, causing the circular locking dependency. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2304 Fixes: b1d90a862c89 ("drm/xe: Use the encoder suspend helper also used by the i915 driver") Cc: Imre Deak Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240830183507.298351-2-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 8da19441d0a02b53e362df81843bb20db3a8006a) Signed-off-by: Rodrigo Vivi commit 880b398288487029ef5062ec5d7fcfc90672f782 Author: Imre Deak Date: Fri Aug 23 14:21:46 2024 +0300 drm/xe: Suspend/resume user access only during system s/r Enable/Disable user access only during system suspend/resume. This should not happen during runtime s/r v2: rebased Reviewed-by: Arun R Murthy Signed-off-by: Imre Deak Signed-off-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20240823112148.327015-2-vinod.govindapillai@intel.com (cherry picked from commit a64e7e5b05e014dad9ae5858c9644d61400ec6ef) Signed-off-by: Rodrigo Vivi commit 269a3f60843b9d2045e0c09d4bd34a91ed4222aa Author: Maarten Lankhorst Date: Tue Aug 6 12:50:43 2024 +0200 drm/xe/display: Match i915 driver suspend/resume sequences better Suspend fbdev sooner, and disable user access before suspending to prevent some races. I've noticed this when comparing xe suspend to i915's. Matches the following commits from i915: 24b412b1bfeb ("drm/i915: Disable intel HPD poll after DRM poll init/enable") 1ef28d86bea9 ("drm/i915: Suspend the framebuffer console earlier during system suspend") bd738d859e71 ("drm/i915: Prevent modesets during driver init/shutdown") Thanks to Imre for pointing me to those commits. Driver shutdown is currently missing, but I have some idea how to implement it next. Signed-off-by: Maarten Lankhorst Cc: Imre Deak Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240806105044.596842-2-maarten.lankhorst@linux.intel.com Signed-off-by: Maarten Lankhorst,,, (cherry picked from commit 492be2a070f023c66aaef6ebd664567fda28c2a6) Signed-off-by: Rodrigo Vivi commit 2ab9d830262c132ab5db2f571003d80850d56b2a Author: Peter Zijlstra Date: Mon Sep 2 10:14:24 2024 +0200 perf/aux: Fix AUX buffer serialization Ole reported that event->mmap_mutex is strictly insufficient to serialize the AUX buffer, add a per RB mutex to fully serialize it. Note that in the lock order comment the perf_event::mmap_mutex order was already wrong, that is, it nesting under mmap_lock is not new with this patch. Fixes: 45bfb2e50471 ("perf: Add AUX area to ring buffer for raw data streams") Reported-by: Ole Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar commit c7fb1692dc0139f95bd4131d3d5fa5eba2ba569e Merge: 962da4d1be828 0d437918fb647 Author: Linus Torvalds Date: Wed Sep 4 09:17:33 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux Pull ARM fix from Russell King: - Fix a build issue with older binutils with LD dead code elimination disabled * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9414/1: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION commit 82122d1f54ec2244fb9c367ee2390b51ce08cf44 Author: Rodrigo Vivi Date: Fri Aug 30 14:35:06 2024 -0400 drm/xe: Add missing runtime reference to wedged upon gt_reset Fixes this missed case: xe 0000:00:02.0: [drm] Missing outer runtime PM protection WARNING: CPU: 99 PID: 1455 at drivers/gpu/drm/xe/xe_pm.c:564 xe_pm_runtime_get_noresume+0x48/0x60 [xe] Call Trace: ? show_regs+0x67/0x70 ? __warn+0x94/0x1b0 ? xe_pm_runtime_get_noresume+0x48/0x60 [xe] ? report_bug+0x1b7/0x1d0 ? handle_bug+0x46/0x80 ? exc_invalid_op+0x19/0x70 ? asm_exc_invalid_op+0x1b/0x20 ? xe_pm_runtime_get_noresume+0x48/0x60 [xe] xe_device_declare_wedged+0x91/0x280 [xe] gt_reset_worker+0xa2/0x250 [xe] v2: Also move get and get the right Fixes tag (Himal, Brost) Fixes: fb74b205cdd2 ("drm/xe: Introduce a simple wedged state") Cc: Himal Prasad Ghimiray Cc: Matthew Brost Reviewed-by: Jonathan Cavitt Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240830183507.298351-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit bc947d9a8c3ebd207e52c0e35cfc88f3e1abe54f) Signed-off-by: Rodrigo Vivi commit 962da4d1be82889af5b9cc0f718e5eccfd93cd2d Merge: 76c0f27d06307 213aa670153ed Author: Linus Torvalds Date: Wed Sep 4 09:11:57 2024 -0700 Merge tag 'parisc-for-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fix from Helge Deller: - Fix boot issue where boot memory is marked read-only too early * tag 'parisc-for-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Delay write-protection until mark_rodata_ro() call commit 76c0f27d063079ce2c6e7fa971a185a38905d844 Merge: 88fac17500f4e 052a45c1cb1b3 Author: Linus Torvalds Date: Wed Sep 4 08:37:33 2024 -0700 Merge tag 'mm-hotfixes-stable-2024-09-03-20-19' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "17 hotfixes, 15 of which are cc:stable. Mostly MM, no identifiable theme. And a few nilfs2 fixups" * tag 'mm-hotfixes-stable-2024-09-03-20-19' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: alloc_tag: fix allocation tag reporting when CONFIG_MODULES=n mm: vmalloc: optimize vmap_lazy_nr arithmetic when purging each vmap_area mailmap: update entry for Jan Kuliga codetag: debug: mark codetags for poisoned page as empty mm/memcontrol: respect zswap.writeback setting from parent cg too scripts: fix gfp-translate after ___GFP_*_BITS conversion to an enum Revert "mm: skip CMA pages when they are not available" maple_tree: remove rcu_read_lock() from mt_validate() kexec_file: fix elfcorehdr digest exclusion when CONFIG_CRASH_HOTPLUG=y mm/slub: add check for s->flags in the alloc_tagging_slab_free_hook nilfs2: fix state management in error path of log writing function nilfs2: fix missing cleanup on rollforward recovery error nilfs2: protect references to superblock parameters exposed in sysfs userfaultfd: don't BUG_ON() if khugepaged yanks our page table userfaultfd: fix checks for huge PMDs mm: vmalloc: ensure vmap_block is initialised before adding to queue selftests: mm: fix build errors on armhf commit 593377036e50de89132bc1222800174fde0780ec Author: Leonardo Bras Date: Fri May 10 23:05:56 2024 -0300 kvm: Note an RCU quiescent state on guest exit As of today, KVM notes a quiescent state only in guest entry, which is good as it avoids the guest being interrupted for current RCU operations. While the guest vcpu runs, it can be interrupted by a timer IRQ that will check for any RCU operations waiting for this CPU. In case there are any of such, it invokes rcu_core() in order to sched-out the current thread and note a quiescent state. This occasional schedule work will introduce tens of microsseconds of latency, which is really bad for vcpus running latency-sensitive applications, such as real-time workloads. So, note a quiescent state in guest exit, so the interrupted guests is able to deal with any pending RCU operations before being required to invoke rcu_core(), and thus avoid the overhead of related scheduler work. Signed-off-by: Leonardo Bras Acked-by: Paul E. McKenney Acked-by: Sean Christopherson Message-ID: <20240511020557.1198200-1-leobras@redhat.com> Signed-off-by: Paolo Bonzini commit 0d437918fb6473d25fb83188c2d6040f47acfbcd Author: Yuntao Liu Date: Wed Aug 21 07:34:41 2024 +0100 ARM: 9414/1: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION There is a build issue with LD segmentation fault, while CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is not enabled, as bellow. scripts/link-vmlinux.sh: line 49: 3796 Segmentation fault (core dumped) ${ld} ${ldflags} -o ${output} ${wl}--whole-archive ${objs} ${wl}--no-whole-archive ${wl}--start-group ${libs} ${wl}--end-group ${kallsymso} ${btf_vmlinux_bin_o} ${ldlibs} The error occurs in older versions of the GNU ld with version earlier than 2.36. It makes most sense to have a minimum LD version as a dependency for HAVE_LD_DEAD_CODE_DATA_ELIMINATION and eliminate the impact of ".reloc .text, R_ARM_NONE, ." when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is not enabled. Fixes: ed0f94102251 ("ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION") Reported-by: Harith George Tested-by: Harith George Suggested-by: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: Yuntao Liu Link: https://lore.kernel.org/all/14e9aefb-88d1-4eee-8288-ef15d4a9b059@gmail.com/ Signed-off-by: Russell King (Oracle) commit b858a36fe9a1261dfd097aec855161ad135bed60 Author: Mikulas Patocka Date: Tue Sep 3 21:47:59 2024 +0200 bio-integrity: don't restrict the size of integrity metadata bio_integrity_add_page restricts the size of the integrity metadata to queue_max_hw_sectors(q). This restriction is not needed because oversized bios are split automatically. This restriction causes problems with dm-integrity 'inline' mode - if we send a large bio to dm-integrity and the bio's metadata are larger than queue_max_hw_sectors(q), bio_integrity_add_page fails and the bio is ended with BLK_STS_RESOURCE error. An example that triggers it: dd: error writing '/dev/mapper/in2': Cannot allocate memory 1+0 records in 0+0 records out 0 bytes copied, 0.00169291 s, 0.0 kB/s Signed-off-by: Mikulas Patocka Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode") Fixes: 0ece1d649b6d ("bio-integrity: create multi-page bvecs in bio_integrity_add_page()") Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Tested-by: Anuj Gupta Link: https://lore.kernel.org/r/e41b3b8e-16c2-70cb-97cb-881234bb200d@redhat.com Signed-off-by: Jens Axboe commit e58f5142f88320a5b1449f96a146f2f24615c5c7 Author: Li Nan Date: Wed Sep 4 11:13:48 2024 +0800 ublk_drv: fix NULL pointer dereference in ublk_ctrl_start_recovery() When two UBLK_CMD_START_USER_RECOVERY commands are submitted, the first one sets 'ubq->ubq_daemon' to NULL, and the second one triggers WARN in ublk_queue_reinit() and subsequently a NULL pointer dereference issue. Fix it by adding the check in ublk_ctrl_start_recovery() and return immediately in case of zero 'ub->nr_queues_ready'. BUG: kernel NULL pointer dereference, address: 0000000000000028 RIP: 0010:ublk_ctrl_start_recovery.constprop.0+0x82/0x180 Call Trace: ? __die+0x20/0x70 ? page_fault_oops+0x75/0x170 ? exc_page_fault+0x64/0x140 ? asm_exc_page_fault+0x22/0x30 ? ublk_ctrl_start_recovery.constprop.0+0x82/0x180 ublk_ctrl_uring_cmd+0x4f7/0x6c0 ? pick_next_task_idle+0x26/0x40 io_uring_cmd+0x9a/0x1b0 io_issue_sqe+0x193/0x3f0 io_wq_submit_work+0x9b/0x390 io_worker_handle_work+0x165/0x360 io_wq_worker+0xcb/0x2f0 ? finish_task_switch.isra.0+0x203/0x290 ? finish_task_switch.isra.0+0x203/0x290 ? __pfx_io_wq_worker+0x10/0x10 ret_from_fork+0x2d/0x50 ? __pfx_io_wq_worker+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Fixes: c732a852b419 ("ublk_drv: add START_USER_RECOVERY and END_USER_RECOVERY support") Reported-and-tested-by: Changhui Zhong Closes: https://lore.kernel.org/all/CAGVVp+UvLiS+bhNXV-h2icwX1dyybbYHeQUuH7RYqUvMQf6N3w@mail.gmail.com Reviewed-by: Ming Lei Signed-off-by: Li Nan Link: https://lore.kernel.org/r/20240904031348.4139545-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 47a9e8dbb8d4713a9aac7cc6ce3c82dcc94217d8 Author: Maximilien Perreault Date: Tue Sep 3 20:10:13 2024 -0700 ALSA: hda/realtek: Support mute LED on HP Laptop 14-dq2xxx The mute LED on this HP laptop uses ALC236 and requires a quirk to function. This patch enables the existing quirk for the device. Signed-off-by: Maximilien Perreault Cc: Link: https://patch.msgid.link/20240904031013.21220-1-maximilienperreault@gmail.com Signed-off-by: Takashi Iwai commit b474f60f6a0c90f560190ac2cc6f20805f35d2c1 Author: Adam Queler Date: Tue Sep 3 16:24:19 2024 -0400 ALSA: hda/realtek: Enable Mute Led for HP Victus 15-fb1xxx The mute led is controlled by ALC245. This patch enables the already existing quirk for this device. Signed-off-by: Adam Queler Cc: Link: https://patch.msgid.link/20240903202419.31433-1-queler+k@gmail.com Signed-off-by: Takashi Iwai commit b6ecc662037694488bfff7c9fd21c405df8411f2 Author: Souradeep Chakrabarti Date: Mon Sep 2 05:43:47 2024 -0700 net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup Currently napi_disable() gets called during rxq and txq cleanup, even before napi is enabled and hrtimer is initialized. It causes kernel panic. ? page_fault_oops+0x136/0x2b0 ? page_counter_cancel+0x2e/0x80 ? do_user_addr_fault+0x2f2/0x640 ? refill_obj_stock+0xc4/0x110 ? exc_page_fault+0x71/0x160 ? asm_exc_page_fault+0x27/0x30 ? __mmdrop+0x10/0x180 ? __mmdrop+0xec/0x180 ? hrtimer_active+0xd/0x50 hrtimer_try_to_cancel+0x2c/0xf0 hrtimer_cancel+0x15/0x30 napi_disable+0x65/0x90 mana_destroy_rxq+0x4c/0x2f0 mana_create_rxq.isra.0+0x56c/0x6d0 ? mana_uncfg_vport+0x50/0x50 mana_alloc_queues+0x21b/0x320 ? skb_dequeue+0x5f/0x80 Cc: stable@vger.kernel.org Fixes: e1b5683ff62e ("net: mana: Move NAPI from EQ to CQ") Signed-off-by: Souradeep Chakrabarti Reviewed-by: Haiyang Zhang Reviewed-by: Shradha Gupta Signed-off-by: David S. Miller commit 53f6619554fb1edf8d7599b560d44dbea085c730 Author: Kent Overstreet Date: Sun Sep 1 18:09:18 2024 -0400 bcachefs: BCH_SB_MEMBER_INVALID Create a sentinal value for "invalid device". This is needed for removing devices that have stripes on them (force removing, without evacuating); we need a sentinal value for the stripe pointers to the device being removed. Signed-off-by: Kent Overstreet commit 8f62819aaace77dd85037ae766eb767f8c4417ce Author: Bartosz Golaszewski Date: Fri Aug 23 11:33:23 2024 +0200 PCI/pwrctl: Rescan bus on a separate thread If we trigger the bus rescan from sysfs, we'll try to lock the PCI rescan mutex recursively and deadlock - the platform device will be populated and probed on the same thread that handles the sysfs write. Add a workqueue to the pwrctl code on which we schedule the rescan for controlled PCI devices. While at it: add a new interface for initializing the pwrctl context where we'd now assign the parent device address and initialize the workqueue. Link: https://lore.kernel.org/r/20240823093323.33450-3-brgl@bgdev.pl Fixes: 4565d2652a37 ("PCI/pwrctl: Add PCI power control core code") Reported-by: Konrad Dybcio Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit f1536585588ba630c533b6ffbca8ad8424aa5c39 Author: Bartosz Golaszewski Date: Fri Aug 23 11:33:22 2024 +0200 PCI: Don't rely on of_platform_depopulate() for reused OF-nodes of_platform_depopulate() doesn't play nicely with reused OF nodes - it ignores the ones that are not marked explicitly as populated and it may happen that the PCI device goes away before the platform device in which case the PCI core clears the OF_POPULATED bit. Unconditionally unregister the platform devices for child nodes when stopping the PCI device. Link: https://lore.kernel.org/r/20240823093323.33450-2-brgl@bgdev.pl Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node") Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Helgaas Acked-by: Manivannan Sadhasivam commit cff56ff737e2da095ca9f228e2c5afc903bfca69 Author: Andreas Hindborg Date: Tue Sep 3 22:09:48 2024 +0200 MAINTAINERS: update Andreas Hindborg's email address Move away from corporate infrastructure for upstream work. Also update mailmap. Signed-off-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240903200956.68231-1-a.hindborg@kernel.org [ Reworded title slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 71c03a8cb213d267853e0d9f520c972480960544 Author: Johan Hovold Date: Mon Sep 2 09:08:30 2024 +0200 clk: qcom: gcc-sc8280xp: don't use parking clk_ops for QUPs A recent change started parking the RCG at an always on parent during registration, something which specifically breaks handover from an early serial console. Quoting Stephen Boyd who fixed this issue for SM8550 [1]: The QUPs aren't shared in a way that requires parking the RCG at an always on parent in case some other entity turns on the clk. The hardware is capable of setting a new frequency itself with the DFS mode, so parking is unnecessary. Furthermore, there aren't any GDSCs for these devices, so there isn't a possibility of the GDSC turning on the clks for housekeeping purposes. This wasn't a problem to mark these 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 you'll see garbage on the serial console until the driver can probe and actually set a proper frequency. Fixes: 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration") Fixes: d65d005f9a6c ("clk: qcom: add sc8280xp GCC driver") Link: https://lore.kernel.org/all/20240819233628.2074654-2-swboyd@chromium.org/ [1] Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240902070830.8535-1-johan+linaro@kernel.org Signed-off-by: Stephen Boyd commit 88fac17500f4ea49c7bac136cf1b27e7b9980075 Merge: 67784a74e258a 3ab394b363c5f Author: Linus Torvalds Date: Tue Sep 3 12:32:00 2024 -0700 Merge tag 'fuse-fixes-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: - Fix EIO if splice and page stealing are enabled on the fuse device - Disable problematic combination of passthrough and writeback-cache - Other bug fixes found by code review * tag 'fuse-fixes-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: disable the combination of passthrough and writeback cache fuse: update stats for pages in dropped aux writeback list fuse: clear PG_uptodate when using a stolen page fuse: fix memory leak in fuse_create_open fuse: check aborted connection before adding requests to pending list for resending fuse: use unsigned type for getxattr/listxattr size truncation commit 33f339a1ba54e56bba57ee9a77c71e385ab4825c Author: Tze-nan Wu Date: Fri Aug 30 16:25:17 2024 +0800 bpf, net: Fix a potential race in do_sock_getsockopt() There's a potential race when `cgroup_bpf_enabled(CGROUP_GETSOCKOPT)` is false during the execution of `BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN`, but becomes true when `BPF_CGROUP_RUN_PROG_GETSOCKOPT` is called. This inconsistency can lead to `BPF_CGROUP_RUN_PROG_GETSOCKOPT` receiving an "-EFAULT" from `__cgroup_bpf_run_filter_getsockopt(max_optlen=0)`. Scenario shown as below: `process A` `process B` ----------- ------------ BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN enable CGROUP_GETSOCKOPT BPF_CGROUP_RUN_PROG_GETSOCKOPT (-EFAULT) To resolve this, remove the `BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN` macro and directly uses `copy_from_sockptr` to ensure that `max_optlen` is always set before `BPF_CGROUP_RUN_PROG_GETSOCKOPT` is invoked. Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") Co-developed-by: Yanghui Li Signed-off-by: Yanghui Li Co-developed-by: Cheng-Jui Wang Signed-off-by: Cheng-Jui Wang Signed-off-by: Tze-nan Wu Acked-by: Stanislav Fomichev Acked-by: Alexei Starovoitov Link: https://patch.msgid.link/20240830082518.23243-1-Tze-nan.Wu@mediatek.com Signed-off-by: Jakub Kicinski commit 77461c10819103eaee7b33c744174b32a8c78b40 Author: Breno Leitao Date: Mon Sep 2 03:17:30 2024 -0700 net: dqs: Do not use extern for unused dql_group When CONFIG_DQL is not enabled, dql_group should be treated as a dead declaration. However, its current extern declaration assumes the linker will ignore it, which is generally true across most compiler and architecture combinations. But in certain cases, the linker still attempts to resolve the extern struct, even when the associated code is dead, resulting in a linking error. For instance the following error in loongarch64: >> loongarch64-linux-ld: net-sysfs.c:(.text+0x589c): undefined reference to `dql_group' Modify the declaration of the dead object to be an empty declaration instead of an extern. This change will prevent the linker from attempting to resolve an undefined reference. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202409012047.eCaOdfQJ-lkp@intel.com/ Fixes: 74293ea1c4db ("net: sysfs: Do not create sysfs for non BQL device") Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Tested-by: Simon Horman # build-tested Link: https://patch.msgid.link/20240902101734.3260455-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 3b3a2a9c6349e25a025d2330f479bc33a6ccb54a Author: Stephen Hemminger Date: Sun Sep 1 11:16:07 2024 -0700 sch/netem: fix use after free in netem_dequeue If netem_dequeue() enqueues packet to inner qdisc and that qdisc returns __NET_XMIT_STOLEN. The packet is dropped but qdisc_tree_reduce_backlog() is not called to update the parent's q.qlen, leading to the similar use-after-free as Commit e04991a48dbaf382 ("netem: fix return value if duplicate enqueue fails") Commands to trigger KASAN UaF: ip link add type dummy ip link set lo up ip link set dummy0 up tc qdisc add dev lo parent root handle 1: drr tc filter add dev lo parent 1: basic classid 1:1 tc class add dev lo classid 1:1 drr tc qdisc add dev lo parent 1:1 handle 2: netem tc qdisc add dev lo parent 2: handle 3: drr tc filter add dev lo parent 3: basic classid 3:1 action mirred egress redirect dev dummy0 tc class add dev lo classid 3:1 drr ping -c1 -W0.01 localhost # Trigger bug tc class del dev lo classid 1:1 tc class add dev lo classid 1:1 drr ping -c1 -W0.01 localhost # UaF Fixes: 50612537e9ab ("netem: fix classful handling") Reported-by: Budimir Markovic Signed-off-by: Stephen Hemminger Link: https://patch.msgid.link/20240901182438.4992-1-stephen@networkplumber.org Signed-off-by: Jakub Kicinski commit bab8eb0dd4cb995caa4a0529d5655531c2ec5e8e Author: Oliver Neukum Date: Thu Aug 29 19:50:55 2024 +0200 usbnet: modern method to get random MAC The driver generates a random MAC once on load and uses it over and over, including on two devices needing a random MAC at the same time. Jakub suggested revamping the driver to the modern API for setting a random MAC rather than fixing the old stuff. The bug is as old as the driver. Signed-off-by: Oliver Neukum Reviewed-by: Simon Horman Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://patch.msgid.link/20240829175201.670718-1-oneukum@suse.com Signed-off-by: Jakub Kicinski commit 5872b47ce18efad5862b74ad334cbdfffa7f8a0c Author: Simon Horman Date: Mon Sep 2 10:09:37 2024 +0100 MAINTAINERS: wifi: cw1200: add net-cw1200.h This is part of an effort [1] to assign a section in MAINTAINERS to header files that relate to Networking. In this case the files with "net" in their name. [1] https://lore.kernel.org/netdev/20240821-net-mnt-v2-0-59a5af38e69d@kernel.org/ It seems that net-cw1200.h is part of the CW1200 WLAN driver and this it is appropriate to add it to the section for that driver. Signed-off-by: Simon Horman Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240902-wifi-mnt-v2-1-f5ad1f36e993@kernel.org commit cd9253c23aedd61eb5ff11f37a36247cd46faf86 Author: Filipe Manana Date: Thu Aug 29 18:25:49 2024 +0100 btrfs: fix race between direct IO write and fsync when using same fd If we have 2 threads that are using the same file descriptor and one of them is doing direct IO writes while the other is doing fsync, we have a race where we can end up either: 1) Attempt a fsync without holding the inode's lock, triggering an assertion failures when assertions are enabled; 2) Do an invalid memory access from the fsync task because the file private points to memory allocated on stack by the direct IO task and it may be used by the fsync task after the stack was destroyed. The race happens like this: 1) A user space program opens a file descriptor with O_DIRECT; 2) The program spawns 2 threads using libpthread for example; 3) One of the threads uses the file descriptor to do direct IO writes, while the other calls fsync using the same file descriptor. 4) Call task A the thread doing direct IO writes and task B the thread doing fsyncs; 5) Task A does a direct IO write, and at btrfs_direct_write() sets the file's private to an on stack allocated private with the member 'fsync_skip_inode_lock' set to true; 6) Task B enters btrfs_sync_file() and sees that there's a private structure associated to the file which has 'fsync_skip_inode_lock' set to true, so it skips locking the inode's VFS lock; 7) Task A completes the direct IO write, and resets the file's private to NULL since it had no prior private and our private was stack allocated. Then it unlocks the inode's VFS lock; 8) Task B enters btrfs_get_ordered_extents_for_logging(), then the assertion that checks the inode's VFS lock is held fails, since task B never locked it and task A has already unlocked it. The stack trace produced is the following: assertion failed: inode_is_locked(&inode->vfs_inode), in fs/btrfs/ordered-data.c:983 ------------[ cut here ]------------ kernel BUG at fs/btrfs/ordered-data.c:983! Oops: invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 9 PID: 5072 Comm: worker Tainted: G U OE 6.10.5-1-default #1 openSUSE Tumbleweed 69f48d427608e1c09e60ea24c6c55e2ca1b049e8 Hardware name: Acer Predator PH315-52/Covini_CFS, BIOS V1.12 07/28/2020 RIP: 0010:btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs] Code: 50 d6 86 c0 e8 (...) RSP: 0018:ffff9e4a03dcfc78 EFLAGS: 00010246 RAX: 0000000000000054 RBX: ffff9078a9868e98 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff907dce4a7800 RDI: ffff907dce4a7800 RBP: ffff907805518800 R08: 0000000000000000 R09: ffff9e4a03dcfb38 R10: ffff9e4a03dcfb30 R11: 0000000000000003 R12: ffff907684ae7800 R13: 0000000000000001 R14: ffff90774646b600 R15: 0000000000000000 FS: 00007f04b96006c0(0000) GS:ffff907dce480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f32acbfc000 CR3: 00000001fd4fa005 CR4: 00000000003726f0 Call Trace: ? __die_body.cold+0x14/0x24 ? die+0x2e/0x50 ? do_trap+0xca/0x110 ? do_error_trap+0x6a/0x90 ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? exc_invalid_op+0x50/0x70 ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? asm_exc_invalid_op+0x1a/0x20 ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] btrfs_sync_file+0x21a/0x4d0 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? __seccomp_filter+0x31d/0x4f0 __x64_sys_fdatasync+0x4f/0x90 do_syscall_64+0x82/0x160 ? do_futex+0xcb/0x190 ? __x64_sys_futex+0x10e/0x1d0 ? switch_fpu_return+0x4f/0xd0 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e Another problem here is if task B grabs the private pointer and then uses it after task A has finished, since the private was allocated in the stack of task A, it results in some invalid memory access with a hard to predict result. This issue, triggering the assertion, was observed with QEMU workloads by two users in the Link tags below. Fix this by not relying on a file's private to pass information to fsync that it should skip locking the inode and instead pass this information through a special value stored in current->journal_info. This is safe because in the relevant section of the direct IO write path we are not holding a transaction handle, so current->journal_info is NULL. The following C program triggers the issue: $ cat repro.c /* Get the O_DIRECT definition. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include #include #include #include #include #include #include static int fd; static ssize_t do_write(int fd, const void *buf, size_t count, off_t offset) { while (count > 0) { ssize_t ret; ret = pwrite(fd, buf, count, offset); if (ret < 0) { if (errno == EINTR) continue; return ret; } count -= ret; buf += ret; } return 0; } static void *fsync_loop(void *arg) { while (1) { int ret; ret = fsync(fd); if (ret != 0) { perror("Fsync failed"); exit(6); } } } int main(int argc, char *argv[]) { long pagesize; void *write_buf; pthread_t fsyncer; int ret; if (argc != 2) { fprintf(stderr, "Use: %s \n", argv[0]); return 1; } fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC | O_DIRECT, 0666); if (fd == -1) { perror("Failed to open/create file"); return 1; } pagesize = sysconf(_SC_PAGE_SIZE); if (pagesize == -1) { perror("Failed to get page size"); return 2; } ret = posix_memalign(&write_buf, pagesize, pagesize); if (ret) { perror("Failed to allocate buffer"); return 3; } ret = pthread_create(&fsyncer, NULL, fsync_loop, NULL); if (ret != 0) { fprintf(stderr, "Failed to create writer thread: %d\n", ret); return 4; } while (1) { ret = do_write(fd, write_buf, pagesize, 0); if (ret != 0) { perror("Write failed"); exit(5); } } return 0; } $ mkfs.btrfs -f /dev/sdi $ mount /dev/sdi /mnt/sdi $ timeout 10 ./repro /mnt/sdi/foo Usually the race is triggered within less than 1 second. A test case for fstests will follow soon. Reported-by: Paulo Dias Link: https://bugzilla.kernel.org/show_bug.cgi?id=219187 Reported-by: Andreas Jahn Link: https://bugzilla.kernel.org/show_bug.cgi?id=219199 Reported-by: syzbot+4704b3cc972bd76024f1@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/00000000000044ff540620d7dee2@google.com/ Fixes: 939b656bc8ab ("btrfs: fix corruption after buffer fault in during direct IO append write") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 87eb3cb4ec619299cd5572e1d5eb68aef4074ac2 Author: Heikki Krogerus Date: Tue Sep 3 16:09:44 2024 +0300 usb: typec: ucsi: Fix cable registration The Cable PD Revision field in GET_CABLE_PROPERTY was introduced in UCSI v2.1, so adding check for that. The cable properties are also not used anywhere after the cable is registered, so removing the cable_prop member from struct ucsi_connector while at it. Fixes: 38ca416597b0 ("usb: typec: ucsi: Register cables based on GET_CABLE_PROPERTY") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240903130945.3395291-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 899d2e5a4e3d36689e8938e152f4b69a4bcc6b4d Author: Maurizio Lombardi Date: Thu Aug 29 11:52:14 2024 +0200 nvmet: Identify-Active Namespace ID List command should reject invalid nsid nsid values of 0xFFFFFFFE and 0XFFFFFFFF should be rejected with a status code of "Invalid Namespace or Format". See NVMe Base Specification, Active Namespace ID list (CNS 02h). Fixes: a07b4970f464 ("nvmet: add a generic NVMe target") Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 28982ad73d6a9605708631dc49a0c763cc398aa2 Author: Christoph Hellwig Date: Thu Aug 29 09:24:37 2024 +0300 nvme: set BLK_FEAT_ZONED for ZNS multipath disks The new stricter limits validation doesn't like a max_append_sectors value to be set without BLK_FEAT_ZONED. Set it before allocation the disk to fix this instead of just inheriting it later. Fixes: d690cb8ae14b ("block: add an API to atomically update queue limits") Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch commit e88b9ed3e03a6471bee131f201f6f2f87383e898 Merge: 094513f8a2fbd 2f833e8948d6c Author: Kalle Valo Date: Tue Sep 3 19:54:15 2024 +0300 Merge tag 'ath-current-20240903' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath ath.git patches for v6.11-rc7 We have three patch which address two issues in the ath11k driver which should be addressed for 6.11-rc7: One patch fixes a NULL pointer dereference while parsing transmit power envelope (TPE) information, and the other two patches revert the hibernation support since it is interfering with suspend on some platforms. Note the cause of the suspend wakeups is still being investigated, and it is hoped this can be addressed and hibernation support can be restored in the near future. commit 04c7e14e5b0b6227e7b00d7a96ca2f2426ab9171 Author: Larysa Zaremba Date: Fri Aug 23 11:59:31 2024 +0200 ice: do not bring the VSI up, if it was down before the XDP setup After XDP configuration is completed, we bring the interface up unconditionally, regardless of its state before the call to .ndo_bpf(). Preserve the information whether the interface had to be brought down and later bring it up only in such case. Fixes: efc2214b6047 ("ice: Add support for XDP") Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Tested-by: Chandan Kumar Rout Acked-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Signed-off-by: Tony Nguyen commit 562755501d44cfbbe82703a62cb41502bd067bd1 Author: Marek Marczykowski-Górecki Date: Tue Sep 3 14:49:31 2024 +0200 ALSA: hda/realtek: extend quirks for Clevo V5[46]0 The mic in those laptops suffers too high gain resulting in mostly (fan or else) noise being recorded. In addition to the existing fixup about mic detection, apply also limiting its boost. While at it, extend the quirk to also V5[46]0TNE models, which have the same issue. Signed-off-by: Marek Marczykowski-Górecki Cc: Link: https://patch.msgid.link/20240903124939.6213-1-marmarek@invisiblethingslab.com Signed-off-by: Takashi Iwai commit 7e3b407ccbea3259b8583ccc34807622025e390f Author: Larysa Zaremba Date: Fri Aug 23 11:59:30 2024 +0200 ice: remove ICE_CFG_BUSY locking from AF_XDP code Locking used in ice_qp_ena() and ice_qp_dis() does pretty much nothing, because ICE_CFG_BUSY is a state flag that is supposed to be set in a PF state, not VSI one. Therefore it does not protect the queue pair from e.g. reset. Remove ICE_CFG_BUSY locking from ice_qp_dis() and ice_qp_ena(). Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Tested-by: Chandan Kumar Rout Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Signed-off-by: Tony Nguyen commit d8c40b9d3a6cef61eb5a0c58c34a3090ea938d89 Author: Larysa Zaremba Date: Fri Aug 23 11:59:29 2024 +0200 ice: check ICE_VSI_DOWN under rtnl_lock when preparing for reset Consider the following scenario: .ndo_bpf() | ice_prepare_for_reset() | ________________________|_______________________________________| rtnl_lock() | | ice_down() | | | test_bit(ICE_VSI_DOWN) - true | | ice_dis_vsi() returns | ice_up() | | | proceeds to rebuild a running VSI | .ndo_bpf() is not the only rtnl-locked callback that toggles the interface to apply new configuration. Another example is .set_channels(). To avoid the race condition above, act only after reading ICE_VSI_DOWN under rtnl_lock. Fixes: 0f9d5027a749 ("ice: Refactor VSI allocation, deletion and rebuild flow") Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Tested-by: Chandan Kumar Rout Signed-off-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit f50c68763436bc8f805712a7c5ceaf58cfcf5f07 Author: Larysa Zaremba Date: Fri Aug 23 11:59:28 2024 +0200 ice: check for XDP rings instead of bpf program when unconfiguring If VSI rebuild is pending, .ndo_bpf() can attach/detach the XDP program on VSI without applying new ring configuration. When unconfiguring the VSI, we can encounter the state in which there is an XDP program but no XDP rings to destroy or there will be XDP rings that need to be destroyed, but no XDP program to indicate their presence. When unconfiguring, rely on the presence of XDP rings rather then XDP program, as they better represent the current state that has to be destroyed. Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Tested-by: Chandan Kumar Rout Acked-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Signed-off-by: Tony Nguyen commit 2504b8405768a57a71e660dbfd5abd59f679a03f Author: Larysa Zaremba Date: Fri Aug 23 11:59:27 2024 +0200 ice: protect XDP configuration with a mutex The main threat to data consistency in ice_xdp() is a possible asynchronous PF reset. It can be triggered by a user or by TX timeout handler. XDP setup and PF reset code access the same resources in the following sections: * ice_vsi_close() in ice_prepare_for_reset() - already rtnl-locked * ice_vsi_rebuild() for the PF VSI - not protected * ice_vsi_open() - already rtnl-locked With an unfortunate timing, such accesses can result in a crash such as the one below: [ +1.999878] ice 0000:b1:00.0: Registered XDP mem model MEM_TYPE_XSK_BUFF_POOL on Rx ring 14 [ +2.002992] ice 0000:b1:00.0: Registered XDP mem model MEM_TYPE_XSK_BUFF_POOL on Rx ring 18 [Mar15 18:17] ice 0000:b1:00.0 ens801f0np0: NETDEV WATCHDOG: CPU: 38: transmit queue 14 timed out 80692736 ms [ +0.000093] ice 0000:b1:00.0 ens801f0np0: tx_timeout: VSI_num: 6, Q 14, NTC: 0x0, HW_HEAD: 0x0, NTU: 0x0, INT: 0x4000001 [ +0.000012] ice 0000:b1:00.0 ens801f0np0: tx_timeout recovery level 1, txqueue 14 [ +0.394718] ice 0000:b1:00.0: PTP reset successful [ +0.006184] BUG: kernel NULL pointer dereference, address: 0000000000000098 [ +0.000045] #PF: supervisor read access in kernel mode [ +0.000023] #PF: error_code(0x0000) - not-present page [ +0.000023] PGD 0 P4D 0 [ +0.000018] Oops: 0000 [#1] PREEMPT SMP NOPTI [ +0.000023] CPU: 38 PID: 7540 Comm: kworker/38:1 Not tainted 6.8.0-rc7 #1 [ +0.000031] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0014.082620210524 08/26/2021 [ +0.000036] Workqueue: ice ice_service_task [ice] [ +0.000183] RIP: 0010:ice_clean_tx_ring+0xa/0xd0 [ice] [...] [ +0.000013] Call Trace: [ +0.000016] [ +0.000014] ? __die+0x1f/0x70 [ +0.000029] ? page_fault_oops+0x171/0x4f0 [ +0.000029] ? schedule+0x3b/0xd0 [ +0.000027] ? exc_page_fault+0x7b/0x180 [ +0.000022] ? asm_exc_page_fault+0x22/0x30 [ +0.000031] ? ice_clean_tx_ring+0xa/0xd0 [ice] [ +0.000194] ice_free_tx_ring+0xe/0x60 [ice] [ +0.000186] ice_destroy_xdp_rings+0x157/0x310 [ice] [ +0.000151] ice_vsi_decfg+0x53/0xe0 [ice] [ +0.000180] ice_vsi_rebuild+0x239/0x540 [ice] [ +0.000186] ice_vsi_rebuild_by_type+0x76/0x180 [ice] [ +0.000145] ice_rebuild+0x18c/0x840 [ice] [ +0.000145] ? delay_tsc+0x4a/0xc0 [ +0.000022] ? delay_tsc+0x92/0xc0 [ +0.000020] ice_do_reset+0x140/0x180 [ice] [ +0.000886] ice_service_task+0x404/0x1030 [ice] [ +0.000824] process_one_work+0x171/0x340 [ +0.000685] worker_thread+0x277/0x3a0 [ +0.000675] ? preempt_count_add+0x6a/0xa0 [ +0.000677] ? _raw_spin_lock_irqsave+0x23/0x50 [ +0.000679] ? __pfx_worker_thread+0x10/0x10 [ +0.000653] kthread+0xf0/0x120 [ +0.000635] ? __pfx_kthread+0x10/0x10 [ +0.000616] ret_from_fork+0x2d/0x50 [ +0.000612] ? __pfx_kthread+0x10/0x10 [ +0.000604] ret_from_fork_asm+0x1b/0x30 [ +0.000604] The previous way of handling this through returning -EBUSY is not viable, particularly when destroying AF_XDP socket, because the kernel proceeds with removal anyway. There is plenty of code between those calls and there is no need to create a large critical section that covers all of them, same as there is no need to protect ice_vsi_rebuild() with rtnl_lock(). Add xdp_state_lock mutex to protect ice_vsi_rebuild() and ice_xdp(). Leaving unprotected sections in between would result in two states that have to be considered: 1. when the VSI is closed, but not yet rebuild 2. when VSI is already rebuild, but not yet open The latter case is actually already handled through !netif_running() case, we just need to adjust flag checking a little. The former one is not as trivial, because between ice_vsi_close() and ice_vsi_rebuild(), a lot of hardware interaction happens, this can make adding/deleting rings exit with an error. Luckily, VSI rebuild is pending and can apply new configuration for us in a managed fashion. Therefore, add an additional VSI state flag ICE_VSI_REBUILD_PENDING to indicate that ice_xdp() can just hot-swap the program. Also, as ice_vsi_rebuild() flow is touched in this patch, make it more consistent by deconfiguring VSI when coalesce allocation fails. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Fixes: efc2214b6047 ("ice: Add support for XDP") Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Tested-by: Chandan Kumar Rout Signed-off-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 2a5dc090b92cfa5270e20056074241c6db5c9cdd Author: Larysa Zaremba Date: Fri Aug 23 11:59:26 2024 +0200 ice: move netif_queue_set_napi to rtnl-protected sections Currently, netif_queue_set_napi() is called from ice_vsi_rebuild() that is not rtnl-locked when called from the reset. This creates the need to take the rtnl_lock just for a single function and complicates the synchronization with .ndo_bpf. At the same time, there no actual need to fill napi-to-queue information at this exact point. Fill napi-to-queue information when opening the VSI and clear it when the VSI is being closed. Those routines are already rtnl-locked. Also, rewrite napi-to-queue assignment in a way that prevents inclusion of XDP queues, as this leads to out-of-bounds writes, such as one below. [ +0.000004] BUG: KASAN: slab-out-of-bounds in netif_queue_set_napi+0x1c2/0x1e0 [ +0.000012] Write of size 8 at addr ffff889881727c80 by task bash/7047 [ +0.000006] CPU: 24 PID: 7047 Comm: bash Not tainted 6.10.0-rc2+ #2 [ +0.000004] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0014.082620210524 08/26/2021 [ +0.000003] Call Trace: [ +0.000003] [ +0.000002] dump_stack_lvl+0x60/0x80 [ +0.000007] print_report+0xce/0x630 [ +0.000007] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ +0.000007] ? __virt_addr_valid+0x1c9/0x2c0 [ +0.000005] ? netif_queue_set_napi+0x1c2/0x1e0 [ +0.000003] kasan_report+0xe9/0x120 [ +0.000004] ? netif_queue_set_napi+0x1c2/0x1e0 [ +0.000004] netif_queue_set_napi+0x1c2/0x1e0 [ +0.000005] ice_vsi_close+0x161/0x670 [ice] [ +0.000114] ice_dis_vsi+0x22f/0x270 [ice] [ +0.000095] ice_pf_dis_all_vsi.constprop.0+0xae/0x1c0 [ice] [ +0.000086] ice_prepare_for_reset+0x299/0x750 [ice] [ +0.000087] pci_dev_save_and_disable+0x82/0xd0 [ +0.000006] pci_reset_function+0x12d/0x230 [ +0.000004] reset_store+0xa0/0x100 [ +0.000006] ? __pfx_reset_store+0x10/0x10 [ +0.000002] ? __pfx_mutex_lock+0x10/0x10 [ +0.000004] ? __check_object_size+0x4c1/0x640 [ +0.000007] kernfs_fop_write_iter+0x30b/0x4a0 [ +0.000006] vfs_write+0x5d6/0xdf0 [ +0.000005] ? fd_install+0x180/0x350 [ +0.000005] ? __pfx_vfs_write+0x10/0xA10 [ +0.000004] ? do_fcntl+0x52c/0xcd0 [ +0.000004] ? kasan_save_track+0x13/0x60 [ +0.000003] ? kasan_save_free_info+0x37/0x60 [ +0.000006] ksys_write+0xfa/0x1d0 [ +0.000003] ? __pfx_ksys_write+0x10/0x10 [ +0.000002] ? __x64_sys_fcntl+0x121/0x180 [ +0.000004] ? _raw_spin_lock+0x87/0xe0 [ +0.000005] do_syscall_64+0x80/0x170 [ +0.000007] ? _raw_spin_lock+0x87/0xe0 [ +0.000004] ? __pfx__raw_spin_lock+0x10/0x10 [ +0.000003] ? file_close_fd_locked+0x167/0x230 [ +0.000005] ? syscall_exit_to_user_mode+0x7d/0x220 [ +0.000005] ? do_syscall_64+0x8c/0x170 [ +0.000004] ? do_syscall_64+0x8c/0x170 [ +0.000003] ? do_syscall_64+0x8c/0x170 [ +0.000003] ? fput+0x1a/0x2c0 [ +0.000004] ? filp_close+0x19/0x30 [ +0.000004] ? do_dup2+0x25a/0x4c0 [ +0.000004] ? __x64_sys_dup2+0x6e/0x2e0 [ +0.000002] ? syscall_exit_to_user_mode+0x7d/0x220 [ +0.000004] ? do_syscall_64+0x8c/0x170 [ +0.000003] ? __count_memcg_events+0x113/0x380 [ +0.000005] ? handle_mm_fault+0x136/0x820 [ +0.000005] ? do_user_addr_fault+0x444/0xa80 [ +0.000004] ? clear_bhb_loop+0x25/0x80 [ +0.000004] ? clear_bhb_loop+0x25/0x80 [ +0.000002] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000005] RIP: 0033:0x7f2033593154 Fixes: 080b0c8d6d26 ("ice: Fix ASSERT_RTNL() warning during certain scenarios") Fixes: 91fdbce7e8d6 ("ice: Add support in the driver for associating queue with napi") Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Reviewed-by: Amritha Nambiar Signed-off-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit ab85218910729b95f9b0acfebab55c2cab5f8ee7 Author: David Howells Date: Fri Aug 23 14:36:39 2024 +0100 netfs, cifs: Improve some debugging bits Improve some debugging bits: (1) The netfslib _debug() macro doesn't need a newline in its format string. (2) Display the request debug ID and subrequest index in messages emitted in smb2_adjust_credits() to make it easier to reference in traces. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit a68c74865f517e26728735aba0ae05055eaff76c Author: David Howells Date: Tue Sep 3 11:15:41 2024 +0100 cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3 Port a number of SMB2/3 async readv/writev fixes to the SMB1 transport: commit a88d60903696c01de577558080ec4fc738a70475 cifs: Don't advance the I/O iterator before terminating subrequest commit ce5291e56081730ec7d87bc9aa41f3de73ff3256 cifs: Defer read completion commit 1da29f2c39b67b846b74205c81bf0ccd96d34727 netfs, cifs: Fix handling of short DIO read Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib") Signed-off-by: David Howells Reported-by: Steve French Reviewed-by: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 517b58c1f9242a6b4ac9443d95569dee58bf6b8b Author: David Howells Date: Tue Sep 3 15:11:18 2024 +0100 cifs: Fix zero_point init on inode initialisation Fix cifs_fattr_to_inode() such that the ->zero_point tracking variable is initialised when the inode is initialised. Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib") Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (Red Hat) cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Steve French commit f9c169b51b6ce20394594ef674d6b10efba31220 Author: Paulo Alcantara Date: Tue Sep 3 10:53:24 2024 -0300 smb: client: fix double put of @cfile in smb2_set_path_size() If smb2_compound_op() is called with a valid @cfile and returned -EINVAL, we need to call cifs_get_writable_path() before retrying it as the reference of @cfile was already dropped by previous call. This fixes the following KASAN splat when running fstests generic/013 against Windows Server 2022: CIFS: Attempting to mount //w22-fs0/scratch run fstests generic/013 at 2024-09-02 19:48:59 ================================================================== BUG: KASAN: slab-use-after-free in detach_if_pending+0xab/0x200 Write of size 8 at addr ffff88811f1a3730 by task kworker/3:2/176 CPU: 3 UID: 0 PID: 176 Comm: kworker/3:2 Not tainted 6.11.0-rc6 #2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 Workqueue: cifsoplockd cifs_oplock_break [cifs] Call Trace: dump_stack_lvl+0x5d/0x80 ? detach_if_pending+0xab/0x200 print_report+0x156/0x4d9 ? detach_if_pending+0xab/0x200 ? __virt_addr_valid+0x145/0x300 ? __phys_addr+0x46/0x90 ? detach_if_pending+0xab/0x200 kasan_report+0xda/0x110 ? detach_if_pending+0xab/0x200 detach_if_pending+0xab/0x200 timer_delete+0x96/0xe0 ? __pfx_timer_delete+0x10/0x10 ? rcu_is_watching+0x20/0x50 try_to_grab_pending+0x46/0x3b0 __cancel_work+0x89/0x1b0 ? __pfx___cancel_work+0x10/0x10 ? kasan_save_track+0x14/0x30 cifs_close_deferred_file+0x110/0x2c0 [cifs] ? __pfx_cifs_close_deferred_file+0x10/0x10 [cifs] ? __pfx_down_read+0x10/0x10 cifs_oplock_break+0x4c1/0xa50 [cifs] ? __pfx_cifs_oplock_break+0x10/0x10 [cifs] ? lock_is_held_type+0x85/0xf0 ? mark_held_locks+0x1a/0x90 process_one_work+0x4c6/0x9f0 ? find_held_lock+0x8a/0xa0 ? __pfx_process_one_work+0x10/0x10 ? lock_acquired+0x220/0x550 ? __list_add_valid_or_report+0x37/0x100 worker_thread+0x2e4/0x570 ? __kthread_parkme+0xd1/0xf0 ? __pfx_worker_thread+0x10/0x10 kthread+0x17f/0x1c0 ? kthread+0xda/0x1c0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x31/0x60 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Allocated by task 1118: kasan_save_stack+0x30/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 cifs_new_fileinfo+0xc8/0x9d0 [cifs] cifs_atomic_open+0x467/0x770 [cifs] lookup_open.isra.0+0x665/0x8b0 path_openat+0x4c3/0x1380 do_filp_open+0x167/0x270 do_sys_openat2+0x129/0x160 __x64_sys_creat+0xad/0xe0 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 83: kasan_save_stack+0x30/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x70 poison_slab_object+0xe9/0x160 __kasan_slab_free+0x32/0x50 kfree+0xf2/0x300 process_one_work+0x4c6/0x9f0 worker_thread+0x2e4/0x570 kthread+0x17f/0x1c0 ret_from_fork+0x31/0x60 ret_from_fork_asm+0x1a/0x30 Last potentially related work creation: kasan_save_stack+0x30/0x50 __kasan_record_aux_stack+0xad/0xc0 insert_work+0x29/0xe0 __queue_work+0x5ea/0x760 queue_work_on+0x6d/0x90 _cifsFileInfo_put+0x3f6/0x770 [cifs] smb2_compound_op+0x911/0x3940 [cifs] smb2_set_path_size+0x228/0x270 [cifs] cifs_set_file_size+0x197/0x460 [cifs] cifs_setattr+0xd9c/0x14b0 [cifs] notify_change+0x4e3/0x740 do_truncate+0xfa/0x180 vfs_truncate+0x195/0x200 __x64_sys_truncate+0x109/0x150 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 71f15c90e785 ("smb: client: retry compound request without reusing lease") Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (Red Hat) Cc: David Howells Signed-off-by: Steve French commit 1ff95eb2bebda50c4c5406caaf201e0fcb24cc8f Author: Alexandre Ghiti Date: Thu Aug 29 18:50:48 2024 +0200 riscv: Fix RISCV_ALTERNATIVE_EARLY RISCV_ALTERNATIVE_EARLY will issue sbi_ecall() very early in the boot process, before the first memory mapping is setup so we can't have any instrumentation happening here. In addition, when the kernel is relocatable, we must also not issue any relocation this early since they would have been patched virtually only. So, instead of disabling instrumentation for the whole kernel/sbi.c file and compiling it with -fno-pie, simply move __sbi_ecall() and __sbi_base_ecall() into their own file where this is fixed. Reported-by: Conor Dooley Closes: https://lore.kernel.org/linux-riscv/20240813-pony-truck-3e7a83e9759e@spud/ Reported-by: syzbot+cfbcb82adf6d7279fd35@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-riscv/00000000000065062c061fcec37b@google.com/ Fixes: 1745cfafebdf ("riscv: don't use global static vars to store alternative data") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240829165048.49756-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5f771088a2b5edd6f2c5c9f34484ca18dc389f3e Author: Alexandre Ghiti Date: Tue Aug 27 08:52:30 2024 +0200 riscv: Do not restrict memory size because of linear mapping on nommu It makes no sense to restrict physical memory size because of linear mapping size constraints when there is no linear mapping, so only do that when mmu is enabled. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/linux-riscv/CAMuHMdW0bnJt5GMRtOZGkTiM7GK4UaLJCDMF_Ouq++fnDKi3_A@mail.gmail.com/ Fixes: 3b6564427aea ("riscv: Fix linear mapping checks for non-contiguous memory regions") Signed-off-by: Alexandre Ghiti Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240827065230.145021-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5ba7a75a53dffbf727e842b5847859bb482ac4aa Author: Anton Blanchard Date: Mon Aug 19 00:11:31 2024 +0000 riscv: Fix toolchain vector detection A recent change to gcc flags rv64iv as no longer valid: cc1: sorry, unimplemented: Currently the 'V' implementation requires the 'M' extension and as a result vector support is disabled. Fix this by adding m to our toolchain vector detection code. Signed-off-by: Anton Blanchard Fixes: fa8e7cce55da ("riscv: Enable Vector code to be built") Link: https://lore.kernel.org/r/20240819001131.1738806-1-antonb@tenstorrent.com Signed-off-by: Palmer Dabbelt commit e240b0fde52f33670d1336697c22d90a4fe33c84 Author: Sven Schnelle Date: Tue Sep 3 12:23:12 2024 +0200 uprobes: Use kzalloc to allocate xol area To prevent unitialized members, use kzalloc to allocate the xol area. Fixes: b059a453b1cf1 ("x86/vdso: Add mremap hook to vm_special_mapping") Signed-off-by: Sven Schnelle Signed-off-by: Peter Zijlstra (Intel) Acked-by: Oleg Nesterov Link: https://lore.kernel.org/r/20240903102313.3402529-1-svens@linux.ibm.com commit 3523a3df03c6f04f7ea9c2e7050102657e331a4f Author: Paulo Alcantara Date: Tue Sep 3 10:53:23 2024 -0300 smb: client: fix double put of @cfile in smb2_rename_path() If smb2_set_path_attr() is called with a valid @cfile and returned -EINVAL, we need to call cifs_get_writable_path() again as the reference of @cfile was already dropped by previous smb2_compound_op() call. Fixes: 71f15c90e785 ("smb: client: retry compound request without reusing lease") Signed-off-by: Paulo Alcantara (Red Hat) Cc: David Howells Signed-off-by: Steve French commit fe13fd68337512da4b7aee6326c397e817a943c7 Author: Matt Roper Date: Thu Aug 29 15:06:21 2024 -0700 drm/xe/pcode: Treat pcode as per-tile rather than per-GT There's only one instance of the pcode per tile, and for GT-related accesses both the primary and media GT share the same register interface. Since Xe was using per-GT locking, the pcode mutex wasn't actually protecting everything that it should since concurrent accesses related to a tile's primary GT and media GT were possible. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240829220619.789159-5-matthew.d.roper@intel.com (cherry picked from commit 3034cc8107b8d0c7d1b56584394e215dab57f8a3) Signed-off-by: Rodrigo Vivi commit 529bf8d1118bbaa1aa835563a22b0b5c64ca9d68 Author: Daniele Ceraolo Spurio Date: Wed Aug 28 14:51:54 2024 -0700 drm/xe/gsc: Do not attempt to load the GSC multiple times The GSC HW is only reset by driver FLR or D3cold entry. We don't support the former at runtime, while the latter is only supported on DGFX, for which we don't support GSC. Therefore, if GSC failed to load previously there is no need to try again because the HW is stuck in the error state. An assert has been added so that if we ever add DGFX support we'll know we need to handle the D3 case. v2: use "< 0" instead of "!= 0" in the FW state error check (Julia). Fixes: dd0e89e5edc2 ("drm/xe/gsc: GSC FW load") Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Cc: # v6.8+ Reviewed-by: Julia Filipchuk Link: https://patchwork.freedesktop.org/patch/msgid/20240828215158.2743994-2-daniele.ceraolospurio@intel.com (cherry picked from commit 2160f6f6e3cf6893a83357c3b82ff8589bdc0f08) Signed-off-by: Rodrigo Vivi commit d34af755a533271f39cc7d86e49c0e74fde63a37 Author: Luke D. Jones Date: Sat Aug 31 12:39:05 2024 +1200 platform/x86/amd: pmf: Make ASUS GA403 quirk generic The original quirk should match to GA403U so that the full range of GA403U models can benefit. Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20240831003905.1060977-1-luke@ljones.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit cfd433cecef929b4d92685f570f1a480762ec260 Merge: 2560db6ede1aa 40bec579d4c71 Author: Paolo Abeni Date: Tue Sep 3 15:37:49 2024 +0200 Merge branch 'ptp-ocp-fix-serial-port-information-export' Vadim Fedorenko says: ==================== ptp: ocp: fix serial port information export Starting v6.8 the serial port subsystem changed the hierarchy of devices and symlinks are not working anymore. Previous discussion made it clear that the idea of symlinks for tty devices was wrong by design [1]. This series implements additional attributes to expose the information and removes symlinks for tty devices. [1] https://lore.kernel.org/netdev/2024060503-subsonic-pupil-bbee@gregkh/ v6 -> v7: - fix issues with applying patches v5 -> v6: - split conversion to array to separate patch per Jiri's feedback - move changelog to cover letter v4 -> v5: - remove unused variable in ptp_ocp_tty_show v3 -> v4: - re-organize info printing to use ptp_ocp_tty_port_name() - keep uintptr_t to be consistent with other code v2 -> v3: - replace serial ports definitions with array and enum for index - replace pointer math with direct array access - nit in documentation spelling v1 -> v2: - add Documentation/ABI changes ==================== Link: https://patch.msgid.link/20240829183603.1156671-1-vadfed@meta.com Signed-off-by: Paolo Abeni commit 40bec579d4c718dabc3e3baf7d84c93a89e6bcce Author: Vadim Fedorenko Date: Thu Aug 29 11:36:03 2024 -0700 docs: ABI: update OCP TimeCard sysfs entries Update documentation according to the changes in the driver. New attributes group tty is exposed and ttyGNSS, ttyGNSS2, ttyMAC and ttyNMEA are moved to this group. Also, these attributes are no more links to the devices but rather simple text files containing names of tty devices. Signed-off-by: Vadim Fedorenko Reviewed-by: Greg Kroah-Hartman Signed-off-by: Paolo Abeni commit 82ace0c8fe9b025eaa273365e27057402cdaeb02 Author: Vadim Fedorenko Date: Thu Aug 29 11:36:02 2024 -0700 ptp: ocp: adjust sysfs entries to expose tty information Implement additional attribute group to expose serial port information. Fixes tag points to the commit which introduced the change in serial port subsystem and made it impossible to use symlinks. Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") Signed-off-by: Vadim Fedorenko Reviewed-by: Greg Kroah-Hartman Signed-off-by: Paolo Abeni commit d7875b4b078f7e2d862e88aed99c3ea0381aa189 Author: Vadim Fedorenko Date: Thu Aug 29 11:36:01 2024 -0700 ptp: ocp: convert serial ports to array Simplify serial port management code by using array of ports and helpers to get the name of the port. This change is needed to make the next patch simplier. Signed-off-by: Vadim Fedorenko Reviewed-by: Greg Kroah-Hartman Signed-off-by: Paolo Abeni commit 5478a4f7b94414def7b56d2f18bc2ed9b0f3f1f2 Author: Geert Uytterhoeven Date: Tue Sep 3 14:32:27 2024 +0200 spi: spidev: Add missing spi_device_id for jg10309-01 When the of_device_id entry for "elgin,jg10309-01" was added, the corresponding spi_device_id was forgotten, causing a warning message during boot-up: SPI driver spidev has no spi_device_id for elgin,jg10309-01 Fix module autoloading and shut up the warning by adding the missing entry. Fixes: 5f3eee1eef5d0edd ("spi: spidev: Add an entry for elgin,jg10309-01") Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/54bbb9d8a8db7e52d13e266f2d4a9bcd8b42a98a.1725366625.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit aea62c744a9ae2a8247c54ec42138405216414da Author: Seunghwan Baek Date: Thu Aug 29 15:18:22 2024 +0900 mmc: cqhci: Fix checking of CQHCI_HALT state To check if mmc cqe is in halt state, need to check set/clear of CQHCI_HALT bit. At this time, we need to check with &, not &&. Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host") Cc: stable@vger.kernel.org Signed-off-by: Seunghwan Baek Reviewed-by: Ritesh Harjani Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240829061823.3718-2-sh8267.baek@samsung.com Signed-off-by: Ulf Hansson commit 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7 Author: David Fernandez Gonzalez Date: Wed Aug 28 15:43:37 2024 +0000 VMCI: Fix use-after-free when removing resource in vmci_resource_remove() When removing a resource from vmci_resource_table in vmci_resource_remove(), the search is performed using the resource handle by comparing context and resource fields. It is possible though to create two resources with different types but same handle (same context and resource fields). When trying to remove one of the resources, vmci_resource_remove() may not remove the intended one, but the object will still be freed as in the case of the datagram type in vmci_datagram_destroy_handle(). vmci_resource_table will still hold a pointer to this freed resource leading to a use-after-free vulnerability. BUG: KASAN: use-after-free in vmci_handle_is_equal include/linux/vmw_vmci_defs.h:142 [inline] BUG: KASAN: use-after-free in vmci_resource_remove+0x3a1/0x410 drivers/misc/vmw_vmci/vmci_resource.c:147 Read of size 4 at addr ffff88801c16d800 by task syz-executor197/1592 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x82/0xa9 lib/dump_stack.c:106 print_address_description.constprop.0+0x21/0x366 mm/kasan/report.c:239 __kasan_report.cold+0x7f/0x132 mm/kasan/report.c:425 kasan_report+0x38/0x51 mm/kasan/report.c:442 vmci_handle_is_equal include/linux/vmw_vmci_defs.h:142 [inline] vmci_resource_remove+0x3a1/0x410 drivers/misc/vmw_vmci/vmci_resource.c:147 vmci_qp_broker_detach+0x89a/0x11b9 drivers/misc/vmw_vmci/vmci_queue_pair.c:2182 ctx_free_ctx+0x473/0xbe1 drivers/misc/vmw_vmci/vmci_context.c:444 kref_put include/linux/kref.h:65 [inline] vmci_ctx_put drivers/misc/vmw_vmci/vmci_context.c:497 [inline] vmci_ctx_destroy+0x170/0x1d6 drivers/misc/vmw_vmci/vmci_context.c:195 vmci_host_close+0x125/0x1ac drivers/misc/vmw_vmci/vmci_host.c:143 __fput+0x261/0xa34 fs/file_table.c:282 task_work_run+0xf0/0x194 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x184/0x189 kernel/entry/common.c:187 exit_to_user_mode_prepare+0x11b/0x123 kernel/entry/common.c:220 __syscall_exit_to_user_mode_work kernel/entry/common.c:302 [inline] syscall_exit_to_user_mode+0x18/0x42 kernel/entry/common.c:313 do_syscall_64+0x41/0x85 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x6e/0x0 This change ensures the type is also checked when removing the resource from vmci_resource_table in vmci_resource_remove(). Fixes: bc63dedb7d46 ("VMCI: resource object implementation.") Cc: stable@vger.kernel.org Reported-by: George Kennedy Signed-off-by: David Fernandez Gonzalez Link: https://lore.kernel.org/r/20240828154338.754746-1-david.fernandez.gonzalez@oracle.com Signed-off-by: Greg Kroah-Hartman commit 213aa670153ed675a007c1f35c5db544b0fefc94 Author: Helge Deller Date: Sat Aug 31 14:02:06 2024 +0200 parisc: Delay write-protection until mark_rodata_ro() call Do not write-protect the kernel read-only and __ro_after_init sections earlier than before mark_rodata_ro() is called. This fixes a boot issue on parisc which is triggered by commit 91a1d97ef482 ("jump_label,module: Don't alloc static_key_mod for __ro_after_init keys"). That commit may modify static key contents in the __ro_after_init section at bootup, so this section needs to be writable at least until mark_rodata_ro() is called. Signed-off-by: Helge Deller Reported-by: matoro Reported-by: Christoph Biedl Tested-by: Christoph Biedl Link: https://lore.kernel.org/linux-parisc/096cad5aada514255cd7b0b9dbafc768@matoro.tk/#r Fixes: 91a1d97ef482 ("jump_label,module: Don't alloc static_key_mod for __ro_after_init keys") Cc: stable@vger.kernel.org # v6.10+ commit 2560db6ede1aaf162a73b2df43e0b6c5ed8819f7 Author: Jinjie Ruan Date: Fri Aug 30 10:20:25 2024 +0800 net: phy: Fix missing of_node_put() for leds The call of of_get_child_by_name() will cause refcount incremented for leds, if it succeeds, it should call of_node_put() to decrease it, fix it. Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs") Reviewed-by: Jonathan Cameron Signed-off-by: Jinjie Ruan Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240830022025.610844-1-ruanjinjie@huawei.com Signed-off-by: Paolo Abeni commit 6fd28941447bf2c8ca0f26fda612a1cabc41663f Author: Naman Jain Date: Thu Aug 29 12:43:12 2024 +0530 Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic Rescind offer handling relies on rescind callbacks for some of the resources cleanup, if they are registered. It does not unregister vmbus device for the primary channel closure, when callback is registered. Without it, next onoffer does not come, rescind flag remains set and device goes to unusable state. Add logic to unregister vmbus for the primary channel in rescind callback to ensure channel removal and relid release, and to ensure that next onoffer can be received and handled properly. Cc: stable@vger.kernel.org Fixes: ca3cda6fcf1e ("uio_hv_generic: add rescind support") Signed-off-by: Naman Jain Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20240829071312.1595-3-namjain@linux.microsoft.com Signed-off-by: Greg Kroah-Hartman commit fb1adbd7e50f3d2de56d0a2bb0700e2e819a329e Author: Saurabh Sengar Date: Thu Aug 29 12:43:11 2024 +0530 uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind For primary VM Bus channels, primary_channel pointer is always NULL. This pointer is valid only for the secondary channels. Also, rescind callback is meant for primary channels only. Fix NULL pointer dereference by retrieving the device_obj from the parent for the primary channel. Cc: stable@vger.kernel.org Fixes: ca3cda6fcf1e ("uio_hv_generic: add rescind support") Signed-off-by: Saurabh Sengar Signed-off-by: Naman Jain Link: https://lore.kernel.org/r/20240829071312.1595-2-namjain@linux.microsoft.com Signed-off-by: Greg Kroah-Hartman commit 7d32e779eb9add47bfdb4731c4d4ff443a7f7fa6 Author: Gerhard Engleder Date: Mon Aug 19 21:26:45 2024 +0200 misc: keba: Fix sysfs group creation sysfs_create_group() races with userspace. Use dev_groups instead which prevents all the problems of sysfs_create_group(). Fixes: a1944676767e ("misc: keba: Add basic KEBA CP500 system FPGA support") Suggested-by: Greg Kroah-Hartman Signed-off-by: Gerhard Engleder Link: https://lore.kernel.org/r/20240819192645.50171-1-gerhard@engleder-embedded.com Signed-off-by: Greg Kroah-Hartman commit a759d1f25182f51210c8831d71ce7ee81e0930f4 Author: Michal Simek Date: Mon Sep 2 15:25:10 2024 +0100 dt-bindings: nvmem: Use soc-nvmem node name instead of nvmem Based on commit d8764d347bd7 ("dt-bindings: firmware: xilinx: Describe soc-nvmem subnode") soc-nvmem should be used instead of simple nvmem that's why also update example to have it described correctly everywhere. Fixes: c7f99cd8fb6b ("dt-bindings: nvmem: Convert xlnx,zynqmp-nvmem.txt to yaml") Cc: stable Signed-off-by: Michal Simek Acked-by: Rob Herring (Arm) Signed-off-by: Srinivas Kandagatla Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240902142510.71096-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c69f37f6559a8948d70badd2b179db7714dedd62 Author: Geert Uytterhoeven Date: Mon Sep 2 15:25:09 2024 +0100 nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc devm_nvmem_device_get() returns an nvmem device, not an nvmem cell. Fixes: e2a5402ec7c6d044 ("nvmem: Add nvmem_device based consumer apis.") Cc: stable Signed-off-by: Geert Uytterhoeven Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240902142510.71096-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8679e8b4a1ebdb40c4429e49368d29353e07b601 Author: John Thomson Date: Mon Sep 2 15:25:08 2024 +0100 nvmem: u-boot-env: error if NVMEM device is too small Verify data size before trying to parse it to avoid reading out of buffer. This could happen in case of problems at MTD level or invalid DT bindings. Signed-off-by: John Thomson Cc: stable Fixes: d5542923f200 ("nvmem: add driver handling U-Boot environment variables") [rmilecki: simplify commit description & rebase] Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240902142510.71096-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e8c276d4dc0e19ee48385f74426aebc855b49aaf Author: Sukrut Bellary Date: Mon Sep 2 15:14:09 2024 +0100 misc: fastrpc: Fix double free of 'buf' in error path smatch warning: drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf' In fastrpc_req_mmap() error path, the fastrpc buffer is freed in fastrpc_req_munmap_impl() if unmap is successful. But in the end, there is an unconditional call to fastrpc_buf_free(). So the above case triggers the double free of fastrpc buf. Fixes: 72fa6f7820c4 ("misc: fastrpc: Rework fastrpc_req_munmap") Reviewed-by: Shuah Khan Reviewed-by: Dan Carpenter Reviewed-by: Srinivas Kandagatla Signed-off-by: Sukrut Bellary Signed-off-by: Srinivas Kandagatla Cc: stable Link: https://lore.kernel.org/r/20240902141409.70371-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4df153652cc46545722879415937582028c18af5 Author: Carlos Llamas Date: Thu Aug 22 18:23:52 2024 +0000 binder: fix UAF caused by offsets overwrite Binder objects are processed and copied individually into the target buffer during transactions. Any raw data in-between these objects is copied as well. However, this raw data copy lacks an out-of-bounds check. If the raw data exceeds the data section size then the copy overwrites the offsets section. This eventually triggers an error that attempts to unwind the processed objects. However, at this point the offsets used to index these objects are now corrupted. Unwinding with corrupted offsets can result in decrements of arbitrary nodes and lead to their premature release. Other users of such nodes are left with a dangling pointer triggering a use-after-free. This issue is made evident by the following KASAN report (trimmed): ================================================================== BUG: KASAN: slab-use-after-free in _raw_spin_lock+0xe4/0x19c Write of size 4 at addr ffff47fc91598f04 by task binder-util/743 CPU: 9 UID: 0 PID: 743 Comm: binder-util Not tainted 6.11.0-rc4 #1 Hardware name: linux,dummy-virt (DT) Call trace: _raw_spin_lock+0xe4/0x19c binder_free_buf+0x128/0x434 binder_thread_write+0x8a4/0x3260 binder_ioctl+0x18f0/0x258c [...] Allocated by task 743: __kmalloc_cache_noprof+0x110/0x270 binder_new_node+0x50/0x700 binder_transaction+0x413c/0x6da8 binder_thread_write+0x978/0x3260 binder_ioctl+0x18f0/0x258c [...] Freed by task 745: kfree+0xbc/0x208 binder_thread_read+0x1c5c/0x37d4 binder_ioctl+0x16d8/0x258c [...] ================================================================== To avoid this issue, let's check that the raw data copy is within the boundaries of the data section. Fixes: 6d98eb95b450 ("binder: avoid potential data leakage when copying txn") Cc: Todd Kjos Cc: stable@vger.kernel.org Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20240822182353.2129600-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 8cbec539593a7dc1cbcc2d839333353a47342c06 Merge: 47ac09b91befb 0a3b517c8089a Author: Greg Kroah-Hartman Date: Tue Sep 3 12:17:10 2024 +0200 Merge tag 'iio-fixes-for-6.11a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: IIO: 1st set of fixes for 6.11 The usual mixed bag of new issues and ancient ones. The fact so many are ADI is probably due to an uptick in upstreaming effort from Analog + Baylibre meaning existing code is getting more eyes on it. Hence it's a good sign not a reflection of inherent high bug incidence! Core and helper related ----------------------- in kernel interfaces - Fix missing application of scale to the integer part of IIO_INT_PLUS_XXX value pairs when using the iio_convert_raw_to_processed*() helper. buffer-dmaengine - Make sure to release DMA channel in error path. Driver related -------------- adi,ad-sigma-delta library - Check irq-flags for the correct irq if multiple are provided. adi,ad7124 - Wait after reset before reading the chip ID register. - Compare only the relevant field when looking for an existing config to reuse for a new channel. - Fix an off by one in which channel config is being filled from firmware. adi,ad7173 - Fix missing vendor prefix in compatible strings. - Fix wrong info for GPIO related bit positions for ad4114,ad4115 and ad4116. adi,ad7606 - Drop incorrect check on frstdata when in serial mode, it only applies to parallel mode. adi,ad9834 - Check userspace input for frequency parameter to avoid div by zero. invensense,mpu6050 - Avoid reading interrupt status on some older chips as it seems there is a hardware problem that surfaces as a result of adding wake on motion support to the driver (which these chips don't support). ti,ads1119 - Fix incorrect IRQ flag (new driver so no firmware compatibility regression issues with fixing this now). * tag 'iio-fixes-for-6.11a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: imu: inv_mpu6050: fix interrupt status read for old buggy chips iio: adc: ad7173: fix GPIO device info iio: adc: ad7124: fix DT configuration parsing iio: adc: ad_sigma_delta: fix irq_flags on irq request iio: adc: ads1119: Fix IRQ flags iio: fix scale application in iio_convert_raw_to_processed_unlocked iio: adc: ad7124: fix config comparison iio: adc: ad7124: fix chip ID mismatch iio: adc: ad7173: Fix incorrect compatible string iio: buffer-dmaengine: fix releasing dma channel on error iio: adc: ad7606: remove frstdata check for serial mode staging: iio: frequency: ad9834: Validate frequency parameter value commit c2eb0626536f49f25e544d9d178c047b544340bb Merge: 5517ae241919e 624d3291484f9 Author: Paolo Abeni Date: Tue Sep 3 10:43:50 2024 +0200 Merge branch 'net-ethernet-ti-am65-cpsw-fix-xdp-implementation' Roger Quadros says: ==================== net: ethernet: ti: am65-cpsw: Fix XDP implementation The XDP implementation on am65-cpsw driver is broken in many ways and this series fixes it. Below are the current issues that are being fixed: 1) The following XDP_DROP test from [1] stalls the interface after 250 packets. ~# xdb-bench drop -m native eth0 This is because new RX requests are never queued. Fix that. 2) The below XDP_TX test from [1] fails with a warning [ 499.947381] XDP_WARN: xdp_update_frame_from_buff(line:277): Driver BUG: missing reserved tailroom ~# xdb-bench tx -m native eth0 Fix that by using PAGE_SIZE during xdp_init_buf(). 3) In XDP_REDIRECT case only 1 packet was processed in rx_poll. Fix it to process up to budget packets. ~# ./xdp-bench redirect -m native eth0 eth0 4) If number of TX queues are set to 1 we get a NULL pointer dereference during XDP_TX. ~# ethtool -L eth0 tx 1 ~# ./xdp-trafficgen udp -A -a eth0 -t 2 Transmitting on eth0 (ifindex 2) [ 241.135257] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030 5) Net statistics is broken for XDP_TX and XDP_REDIRECT [1] xdp-tools suite https://github.com/xdp-project/xdp-tools Signed-off-by: Roger Quadros Reviewed-by: Jacob Keller Acked-by: Julien Panis Reviewed-by: MD Danish Anwar --- ==================== Link: https://patch.msgid.link/20240829-am65-cpsw-xdp-v1-0-ff3c81054a5e@kernel.org Signed-off-by: Paolo Abeni commit 624d3291484f9cada10660f820db926c0bce7741 Author: Roger Quadros Date: Thu Aug 29 15:03:21 2024 +0300 net: ethernet: ti: am65-cpsw: Fix RX statistics for XDP_TX and XDP_REDIRECT We are not using ndev->stats for rx_packets and rx_bytes anymore. Instead, we use per CPU stats which are collated in am65_cpsw_nuss_ndo_get_stats(). Fix RX statistics for XDP_TX and XDP_REDIRECT cases. Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Signed-off-by: Roger Quadros Reviewed-by: Jacob Keller Acked-by: Julien Panis Reviewed-by: MD Danish Anwar Signed-off-by: Paolo Abeni commit 0a50c35277f96481a5a6ed5faf347f282040c57d Author: Roger Quadros Date: Thu Aug 29 15:03:20 2024 +0300 net: ethernet: ti: am65-cpsw: Fix NULL dereference on XDP_TX If number of TX queues are set to 1 we get a NULL pointer dereference during XDP_TX. ~# ethtool -L eth0 tx 1 ~# ./xdp-trafficgen udp -A -a eth0 -t 2 Transmitting on eth0 (ifindex 2) [ 241.135257] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030 Fix this by using actual TX queues instead of max TX queues when picking the TX channel in am65_cpsw_ndo_xdp_xmit(). Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Signed-off-by: Roger Quadros Reviewed-by: Jacob Keller Acked-by: Julien Panis Reviewed-by: MD Danish Anwar Signed-off-by: Paolo Abeni commit 5e24db550bd6f484d2c7687ee488708260e1f84a Author: Roger Quadros Date: Thu Aug 29 15:03:19 2024 +0300 net: ethernet: ti: am65-cpsw: fix XDP_DROP, XDP_TX and XDP_REDIRECT The following XDP_DROP test from [1] stalls the interface after 250 packets. ~# xdb-bench drop -m native eth0 This is because new RX requests are never queued. Fix that. The below XDP_TX test from [1] fails with a warning [ 499.947381] XDP_WARN: xdp_update_frame_from_buff(line:277): Driver BUG: missing reserved tailroom ~# xdb-bench tx -m native eth0 Fix that by using PAGE_SIZE during xdp_init_buf(). In XDP_REDIRECT case only 1 packet was processed in rx_poll. Fix it to process up to budget packets. Fix all XDP error cases to call trace_xdp_exception() and drop the packet in am65_cpsw_run_xdp(). [1] xdp-tools suite https://github.com/xdp-project/xdp-tools Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Signed-off-by: Roger Quadros Reviewed-by: Jacob Keller Acked-by: Julien Panis Reviewed-by: MD Danish Anwar Signed-off-by: Paolo Abeni commit 9a71cf8b6fa433a8f243626ba9930a3870584e38 Author: Dmitry Baryshkov Date: Tue Sep 3 05:01:58 2024 +0300 drm/bridge-connector: reset the HDMI connector state On HDMI connectors which use drm_bridge_connector and DRM_BRIDGE_OP_HDMI IGT chokes on the max_bpc property in several kms_properties tests due to the drm_bridge_connector failing to reset HDMI-related properties. Call __drm_atomic_helper_connector_hdmi_reset() if the drm_bridge_connector has bridge_hdmi. It is impossible to call this function from HDMI bridges, none of the bridge callbacks correspond to the drm_connector_funcs::reset(). Fixes: 6b4468b0c6ba ("drm/bridge-connector: implement glue code for HDMI connector") Reviewed-by: Maxime Ripard Acked-by: Maxime Ripard Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240903-drm-bridge-connector-fix-hdmi-reset-v5-3-daebde6d9857@linaro.org Signed-off-by: Maxime Ripard commit 9da7ec9b19d8c1ad4f44e459fa5f93ad7a117dcd Author: Dmitry Baryshkov Date: Tue Sep 3 05:01:57 2024 +0300 drm/bridge-connector: move to DRM_DISPLAY_HELPER module drm_bridge_connector is a "leaf" driver, belonging to the display helper, rather than the "CRTC" drm_kms_helper module. Move the driver to the drm/display and add necessary Kconfig selection clauses. Suggested-by: Maxime Ripard Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240903-drm-bridge-connector-fix-hdmi-reset-v5-2-daebde6d9857@linaro.org Signed-off-by: Maxime Ripard commit 466cb3c630a51b04995c6247d2fb73b5ce7bfd7f Author: Dmitry Baryshkov Date: Tue Sep 3 05:01:56 2024 +0300 drm/display: stop depending on DRM_DISPLAY_HELPER Kconfig symbols should not declare dependency on DRM_DISPLAY_HELPER. Move all parts of DRM_DISPLAY_HELPER to an if DRM_DISPLAY_HELPER block. It is not possible to make those symbols select DRM_DISPLAY_HELPER because of the link issues when a part of the helper is selected to be built-in, while other part is selected to be as module. In such a case the modular part doesn't get built at all, leading to undefined symbols. The only viable alternative is to split drm_display_helper.ko into several small modules, each of them having their own dependencies. Suggested-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240903-drm-bridge-connector-fix-hdmi-reset-v5-1-daebde6d9857@linaro.org Signed-off-by: Maxime Ripard commit de3d7969f6a80aa5abbbc0f39897495ae35548d0 Author: Heikki Krogerus Date: Fri Aug 30 14:16:45 2024 +0300 usb: typec: ucsi: Fix the partner PD revision The Partner PD Revision field in GET_CONNECTOR_CAPABILITY data structure was introduced in UCSI v2.1. In ucsi_check_connector_capability() the version was assumed to be 2.0, and in ucsi_register_partner() the field is accessed completely unconditionally. Fixing the version in ucsi_check_connector_capability(), and replacing the unconditional pd_revision assignment with a direct call to ucsi_check_connector_capability() in ucsi_register_port(). After this the revision is also checked only if there is a PD contract. Fixes: b9fccfdb4ebb ("usb: typec: ucsi: Get PD revision for partner") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240830111645.2134301-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e2940928115e83d707b21bf00b0db7d6c15f8341 Author: Pawel Laszczak Date: Mon Sep 2 11:09:16 2024 +0000 usb: cdns2: Fix controller reset issue Patch fixes the procedure of resetting controller. The CPUCTRL register is write only and reading returns 0. Waiting for reset to complite is incorrect. Fixes: 3eb1f1efe204 ("usb: cdns2: Add main part of Cadence USBHS driver") cc: stable@vger.kernel.org Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/PH7PR07MB9538D56D75F1F399D0BB96F0DD922@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 9149c9b0c7e046273141e41eebd8a517416144ac Author: Faisal Hassan Date: Thu Aug 29 15:15:02 2024 +0530 usb: dwc3: core: update LC timer as per USB Spec V3.2 This fix addresses STAR 9001285599, which only affects DWC_usb3 version 3.20a. The timer value for PM_LC_TIMER in DWC_usb3 3.20a for the Link ECN changes is incorrect. If the PM TIMER ECN is enabled via GUCTL2[19], the link compliance test (TD7.21) may fail. If the ECN is not enabled (GUCTL2[19] = 0), the controller will use the old timer value (5us), which is still acceptable for the link compliance test. Therefore, clear GUCTL2[19] to pass the USB link compliance test: TD 7.21. Cc: stable@vger.kernel.org Signed-off-by: Faisal Hassan Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240829094502.26502-1-quic_faisalh@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 00dcf2fa449f23a263343d7fe051741bdde65d0b Author: Prashanth K Date: Wed Aug 28 12:13:02 2024 +0530 usb: dwc3: Avoid waking up gadget during startxfer When operating in High-Speed, it is observed that DSTS[USBLNKST] doesn't update link state immediately after receiving the wakeup interrupt. Since wakeup event handler calls the resume callbacks, there is a chance that function drivers can perform an ep queue, which in turn tries to perform remote wakeup from send_gadget_ep_cmd(STARTXFER). This happens because DSTS[[21:18] wasn't updated to U0 yet, it's observed that the latency of DSTS can be in order of milli-seconds. Hence avoid calling gadget_wakeup during startxfer to prevent unnecessarily issuing remote wakeup to host. Fixes: c36d8e947a56 ("usb: dwc3: gadget: put link to U0 before Start Transfer") Cc: stable@vger.kernel.org Suggested-by: Thinh Nguyen Signed-off-by: Prashanth K Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240828064302.3796315-1-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit a13494de53258d8cf82ed3bcd69176bbf7f2640e Author: Jouni Högander Date: Mon Sep 2 09:42:41 2024 +0300 drm/i915/display: Increase Fast Wake Sync length as a quirk In commit "drm/i915/display: Increase number of fast wake precharge pulses" we were increasing Fast Wake sync pulse length to fix problems observed on Dell Precision 5490 laptop with AUO panel. Later we have observed this is causing problems on other panels. Fix these problems by increasing Fast Wake sync pulse length as a quirk applied for Dell Precision 5490 with problematic panel. Fixes: f77772866385 ("drm/i915/display: Increase number of fast wake precharge pulses") Cc: Ville Syrjälä Closes: http://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9739 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2246 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11762 Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula Cc: # v6.10+ Link: https://patchwork.freedesktop.org/patch/msgid/20240902064241.1020965-3-jouni.hogander@intel.com (cherry picked from commit fcba2ed66b39252210f4e739722ebcc5398c2197) Requires: 43cf50eb1408 ("drm/i915/display: Add mechanism to use sink model when applying quirk") Signed-off-by: Joonas Lahtinen commit 43cf50eb1408ccb99cab01521263e8cb4cfdc023 Author: Jouni Högander Date: Mon Sep 2 09:42:40 2024 +0300 drm/i915/display: Add mechanism to use sink model when applying quirk Currently there is no way to apply quirk on device only if certain panel model is installed. This patch implements such mechanism by adding new quirk type intel_dpcd_quirk which contains also sink_oui and sink_device_id fields and using also them to figure out if applying quirk is needed. New intel_init_dpcd_quirks is added and called after drm_dp_read_desc with proper sink device identity read from dpcdc. v3: - !mem_is_zero fixed to mem_is_zero v2: - instead of using struct intel_quirk add new struct intel_dpcd_quirk Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240902064241.1020965-2-jouni.hogander@intel.com (cherry picked from commit b3b91369908ac63be6f64905448b8ba5cd151875) Signed-off-by: Joonas Lahtinen commit 5517ae241919e0208b077c910b0a369b9dce3c11 Merge: 646f49684622d 1e9683c9b6ca8 Author: Jakub Kicinski Date: Mon Sep 2 19:08:51 2024 -0700 Merge tag 'for-net-2024-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - qca: If memdump doesn't work, re-enable IBS - MGMT: Fix not generating command complete for MGMT_OP_DISCONNECT - Revert "Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE" - MGMT: Ignore keys being loaded with invalid type * tag 'for-net-2024-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: MGMT: Ignore keys being loaded with invalid type Revert "Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE" Bluetooth: MGMT: Fix not generating command complete for MGMT_OP_DISCONNECT Bluetooth: hci_sync: Introduce hci_cmd_sync_run/hci_cmd_sync_run_once Bluetooth: qca: If memdump doesn't work, re-enable IBS ==================== Link: https://patch.msgid.link/20240830220300.1316772-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 646f49684622d0eb87bbbff4313a453421dc4e3d Merge: ef4a99a0164e3 dd885d90c047d Author: Jakub Kicinski Date: Mon Sep 2 19:06:05 2024 -0700 Merge tag 'linux-can-fixes-for-6.11-20240830' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2024-08-30 The first patch is by Kuniyuki Iwashima for the CAN BCM protocol that adds a missing proc entry removal when a device unregistered. Simon Horman fixes the cleanup in the error cleanup path of the m_can driver's open function. Markus Schneider-Pargmann contributes 7 fixes for the m_can driver, all related to the recently added IRQ coalescing support. The next 2 patches are by me, target the mcp251xfd driver and fix ring and coalescing configuration problems when switching from CAN-CC to CAN-FD mode. Simon Arlott's patch fixes a possible deadlock in the mcp251x driver. The last patch is by Martin Jocic for the kvaser_pciefd driver and fixes a problem with lost IRQs, which result in starvation, under high load situations. * tag 'linux-can-fixes-for-6.11-20240830' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: kvaser_pciefd: Use a single write when releasing RX buffers can: mcp251x: fix deadlock if an interrupt occurs during mcp251x_open can: mcp251xfd: mcp251xfd_ring_init(): check TX-coalescing configuration can: mcp251xfd: fix ring configuration when switching from CAN-CC to CAN-FD mode can: m_can: Limit coalescing to peripheral instances can: m_can: Reset cached active_interrupts on start can: m_can: disable_all_interrupts, not clear active_interrupts can: m_can: Do not cancel timer from within timer can: m_can: Remove m_can_rx_peripheral indirection can: m_can: Remove coalesing disable in isr during suspend can: m_can: Reset coalescing during suspend/resume can: m_can: Release irq on error in m_can_open can: bcm: Remove proc entry when dev is unregistered. ==================== Link: https://patch.msgid.link/20240830215914.1610393-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 7ccc1465465d78e6411b7bd730d06e7435802b5c Author: Paulo Alcantara Date: Sat Aug 31 21:40:28 2024 -0300 smb: client: fix hang in wait_for_response() for negproto Call cifs_reconnect() to wake up processes waiting on negotiate protocol to handle the case where server abruptly shut down and had no chance to properly close the socket. Simple reproducer: ssh 192.168.2.100 pkill -STOP smbd mount.cifs //192.168.2.100/test /mnt -o ... [never returns] Cc: Rickard Andersson Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit b1934cd6069538db2255dc94ba573771ecf3b560 Author: Naohiro Aota Date: Sat Aug 31 01:32:49 2024 +0900 btrfs: zoned: handle broken write pointer on zones Btrfs rejects to mount a FS if it finds a block group with a broken write pointer (e.g, unequal write pointers on two zones of RAID1 block group). Since such case can happen easily with a power-loss or crash of a system, we need to handle the case more gently. Handle such block group by making it unallocatable, so that there will be no writes into it. That can be done by setting the allocation pointer at the end of allocating region (= block_group->zone_capacity). Then, existing code handle zone_unusable properly. Having proper zone_capacity is necessary for the change. So, set it as fast as possible. We cannot handle RAID0 and RAID10 case like this. But, they are anyway unable to read because of a missing stripe. Fixes: 265f7237dd25 ("btrfs: zoned: allow DUP on meta-data block groups") Fixes: 568220fa9657 ("btrfs: zoned: support RAID0/1/10 on top of raid stripe tree") CC: stable@vger.kernel.org # 6.1+ Reported-by: HAN Yuwei Cc: Xuefer Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit e162cb25c410afc42051a582c46a47dde597f51c Author: Arnaldo Carvalho de Melo Date: Mon Aug 19 21:43:01 2024 -0300 perf daemon: Fix the build on more 32-bit architectures FYI: I'm carrying this on perf-tools-next. The previous attempt fixed the build on debian:experimental-x-mipsel, but when building on a larger set of containers I noticed it broke the build on some other 32-bit architectures such as: 42 7.87 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) builtin-daemon.c: In function 'cmd_session_list': builtin-daemon.c:692:16: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'long int' [-Werror=format=] fprintf(out, "%c%" PRIu64, ^~~~~ builtin-daemon.c:694:13: csv_sep, (curr - daemon->start) / 60); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from builtin-daemon.c:3:0: /usr/arm-linux-gnueabihf/include/inttypes.h:105:34: note: format string is defined here # define PRIu64 __PRI64_PREFIX "u" So lets cast that time_t (32-bit/64-bit) to uint64_t to make sure it builds everywhere. Fixes: 4bbe6002931954bb ("perf daemon: Fix the build on 32-bit architectures") Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/ZsPmldtJ0D9Cua9_@x1 Signed-off-by: Namhyung Kim commit aee1d55922977bf9282398283a72d38fc5514540 Author: Xu Yang Date: Mon Aug 19 10:34:03 2024 +0800 perf python: include "util/sample.h" The 32-bit arm build system will complain: tools/perf/util/python.c:75:28: error: field ‘sample’ has incomplete type 75 | struct perf_sample sample; However, arm64 build system doesn't complain this. The root cause is arm64 define "HAVE_KVM_STAT_SUPPORT := 1" in tools/perf/arch/arm64/Makefile, but arm arch doesn't define this. This will lead to kvm-stat.h include other header files on arm64 build system, especially "util/sample.h" for util/python.c. This will try to directly include "util/sample.h" for "util/python.c" to avoid such build issue on arm platform. Signed-off-by: Xu Yang Cc: imx@lists.linux.dev Link: https://lore.kernel.org/r/20240819023403.201324-1-xu.yang_2@nxp.com Signed-off-by: Namhyung Kim commit 287bd5cf06e0f2c02293ce942777ad1f18059ed3 Author: Namhyung Kim Date: Tue Aug 27 22:29:53 2024 -0700 perf lock contention: Fix spinlock and rwlock accounting The spinlock and rwlock use a single-element per-cpu array to track current locks due to performance reason. But this means the key is always available and it cannot simply account lock stats in the array because some of them are invalid. In fact, the contention_end() program in the BPF invalidates the entry by setting the 'lock' value to 0 instead of deleting the entry for the hashmap. So it should skip entries with the lock value of 0 in the account_end_timestamp(). Otherwise, it'd have spurious high contention on an idle machine: $ sudo perf lock con -ab -Y spinlock sleep 3 contended total wait max wait avg wait type caller 8 4.72 s 1.84 s 590.46 ms spinlock rcu_core+0xc7 8 1.87 s 1.87 s 233.48 ms spinlock process_one_work+0x1b5 2 1.87 s 1.87 s 933.92 ms spinlock worker_thread+0x1a2 3 1.81 s 1.81 s 603.93 ms spinlock tmigr_update_events+0x13c 2 1.72 s 1.72 s 861.98 ms spinlock tick_do_update_jiffies64+0x25 6 42.48 us 13.02 us 7.08 us spinlock futex_q_lock+0x2a 1 13.03 us 13.03 us 13.03 us spinlock futex_wake+0xce 1 11.61 us 11.61 us 11.61 us spinlock rcu_core+0xc7 I don't believe it has contention on a spinlock longer than 1 second. After this change, it only reports some small contentions. $ sudo perf lock con -ab -Y spinlock sleep 3 contended total wait max wait avg wait type caller 4 133.51 us 43.29 us 33.38 us spinlock tick_do_update_jiffies64+0x25 4 69.06 us 31.82 us 17.27 us spinlock process_one_work+0x1b5 2 50.66 us 25.77 us 25.33 us spinlock rcu_core+0xc7 1 28.45 us 28.45 us 28.45 us spinlock rcu_core+0xc7 1 24.77 us 24.77 us 24.77 us spinlock tmigr_update_events+0x13c 1 23.34 us 23.34 us 23.34 us spinlock raw_spin_rq_lock_nested+0x15 Fixes: b5711042a1c8 ("perf lock contention: Use per-cpu array map for spinlocks") Reported-by: Xi Wang Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20240828052953.1445862-1-namhyung@kernel.org Signed-off-by: Namhyung Kim commit 1c7fb536e899a2f66f9b1719a0234570dda2e634 Author: Veronika Molnarova Date: Thu Aug 8 12:37:49 2024 +0200 perf test pmu: Set uninitialized PMU alias to null Commit 3e0bf9fde2984469 ("perf pmu: Restore full PMU name wildcard support") adds a test case "PMU cmdline match" that covers PMU name wildcard support provided by function perf_pmu__match(). The test works with a wide range of supported combinations of PMU name matching but omits the case that if the perf_pmu__match() cannot match the PMU name to the wildcard, it tries to match its alias. However, this variable is not set up, causing the test case to fail when run with subprocesses or to segfault if run as a single process. ./perf test -vv 9 9: Sysfs PMU tests : 9.1: Parsing with PMU format directory : Ok 9.2: Parsing with PMU event : Ok 9.3: PMU event names : Ok 9.4: PMU name combining : Ok 9.5: PMU name comparison : Ok 9.6: PMU cmdline match : FAILED! ./perf test -F 9 9.1: Parsing with PMU format directory : Ok 9.2: Parsing with PMU event : Ok 9.3: PMU event names : Ok 9.4: PMU name combining : Ok 9.5: PMU name comparison : Ok Segmentation fault (core dumped) Initialize the PMU alias to null for all tests of perf_pmu__match() as this functionality is not being tested and the alias matching works exactly the same as the matching of the PMU name. ./perf test -F 9 9.1: Parsing with PMU format directory : Ok 9.2: Parsing with PMU event : Ok 9.3: PMU event names : Ok 9.4: PMU name combining : Ok 9.5: PMU name comparison : Ok 9.6: PMU cmdline match : Ok Fixes: 3e0bf9fde2984469 ("perf pmu: Restore full PMU name wildcard support") Signed-off-by: Veronika Molnarova Cc: james.clark@arm.com Cc: mpetlan@redhat.com Cc: rstoyano@redhat.com Link: https://lore.kernel.org/r/20240808103749.9356-1-vmolnaro@redhat.com Signed-off-by: Namhyung Kim commit c346c629765ab982967017e2ae859156d0e235cf Author: Fedor Pchelkin Date: Wed Aug 28 19:14:11 2024 +0300 btrfs: qgroup: don't use extent changeset when not needed The local extent changeset is passed to clear_record_extent_bits() where it may have some additional memory dynamically allocated for ulist. When qgroup is disabled, the memory is leaked because in this case the changeset is not released upon __btrfs_qgroup_release_data() return. Since the recorded contents of the changeset are not used thereafter, just don't pass it. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Reported-by: syzbot+81670362c283f3dd889c@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/000000000000aa8c0c060ade165e@google.com Fixes: af0e2aab3b70 ("btrfs: qgroup: flush reservations during quota disable") CC: stable@vger.kernel.org # 6.10+ Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Fedor Pchelkin Signed-off-by: David Sterba commit 38e3285dbd07db44487bbaca8c383a5d7f3c11f3 Author: Dillon Varone Date: Thu Aug 22 17:52:57 2024 -0400 drm/amd/display: Block timing sync for different signals in PMO PMO assumes that like timings can be synchronized, but DC only allows this if the signal types match. Reviewed-by: Austin Zheng Signed-off-by: Dillon Varone Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher (cherry picked from commit 29d3d6af43135de7bec677f334292ca8dab53d67) Cc: stable@vger.kernel.org commit 53c3685f5307967a62517ace10e69d66520d0fc5 Author: Leo Li Date: Tue Aug 20 14:34:15 2024 -0400 drm/amd/display: Lock DC and exit IPS when changing backlight Backlight updates require aux and/or register access. Therefore, driver needs to disallow IPS beforehand. So, acquire the dc lock before calling into dc to update backlight - we should be doing this regardless of IPS. Then, while the lock is held, disallow IPS before calling into dc, then allow IPS afterwards (if it was previously allowed). Reviewed-by: Aurabindo Pillai Reviewed-by: Roman Li Signed-off-by: Leo Li Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher (cherry picked from commit 988fe2862635c1b1b40e41c85c24db44ab337c13) Cc: stable@vger.kernel.org # 6.10+ commit 4de34b04783628f14614badb0a1aa67ce3fcef5d Author: Alex Deucher Date: Tue Mar 26 11:28:29 2024 -0400 drm/amdgpu: always allocate cleared VRAM for GEM allocations This adds allocation latency, but aligns better with user expectations. The latency should improve with the drm buddy clearing patches that Arun has been working on. In addition this fixes the high CPU spikes seen when doing wipe on release. v2: always set AMDGPU_GEM_CREATE_VRAM_CLEARED (Christian) Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3528 Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") Acked-by: Arunpravin Paneer Selvam Reviewed-by: Michel Dänzer (v1) Signed-off-by: Alex Deucher Cc: Arunpravin Paneer Selvam Cc: Christian König (cherry picked from commit 6c0a7c3c693ac84f8b50269a9088af8f37446863) Cc: stable@vger.kernel.org # 6.10.x commit 34c36a77f431b67803c68786fe41a05d007a9306 Author: Jack Xiao Date: Thu Aug 22 18:18:51 2024 +0800 drm/amdgpu/mes: add mes mapping legacy queue switch For mes11 old firmware has issue to map legacy queue, add a flag to switch mes to map legacy queue. Fixes: f9d8c5c7855d ("drm/amdgpu/gfx: enable mes to map legacy queue support") Reported-by: Andrew Worsley Link: https://lists.freedesktop.org/archives/amd-gfx/2024-August/112773.html Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 52491d97aadcde543986d596ed55f70bf2142851) commit 65444581a4aecf0e96b4691bb20fc75c602f5863 Author: Leo Li Date: Tue Aug 27 11:29:53 2024 -0400 drm/amd/display: Determine IPS mode by ASIC and PMFW versions [Why] DCN IPS interoperates with other system idle power features, such as Zstates. On DCN35, there is a known issue where system Z8 + DCN IPS2 causes a hard hang. We observe this on systems where the SBIOS allows Z8. Though there is a SBIOS fix, there's no guarantee that users will get it any time soon, or even install it. A workaround is needed to prevent this from rearing its head in the wild. [How] For DCN35, check the pmfw version to determine whether the SBIOS has the fix. If not, set IPS1+RCG as the deepest possible state in all cases except for s0ix and display off (DPMS). Otherwise, enable all IPS Signed-off-by: Leo Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher (cherry picked from commit 28d43d0895896f84c038d906d244e0a95eb243ec) Cc: stable@vger.kernel.org commit 2f833e8948d6c88a3a257d4e426c9897b4907d5a Author: Baochen Qiang Date: Fri Aug 30 15:34:20 2024 +0800 Revert "wifi: ath11k: support hibernation" This reverts commit 166a490f59ac10340ee5330e51c15188ce2a7f8f. There are several reports that this commit breaks system suspend on some specific Lenovo platforms. Since there is no fix available, for now revert this commit to make suspend work again on those platforms. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219196 Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2301921 Cc: # 6.10.x: d3e154d7776b: Revert "wifi: ath11k: restore country code during resume" Cc: # 6.10.x Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240830073420.5790-3-quic_bqiang@quicinc.com commit d3e154d7776ba57ab679fb816fb87b627fba21c9 Author: Baochen Qiang Date: Fri Aug 30 15:34:19 2024 +0800 Revert "wifi: ath11k: restore country code during resume" This reverts commit 7f0343b7b8710436c1e6355c71782d32ada47e0c. We are going to revert commit 166a490f59ac ("wifi: ath11k: support hibernation"), on which this commit depends. With that commit reverted, this one is not needed any more, so revert this commit first. Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240830073420.5790-2-quic_bqiang@quicinc.com commit d30d9ee94cc0e7ae91da7251d9c280b8cf7e5e4d Author: Tom Dohrmann Date: Mon Sep 2 14:42:19 2024 +0000 KVM: x86: Only advertise KVM_CAP_READONLY_MEM when supported by VM Until recently, KVM_CAP_READONLY_MEM was unconditionally supported on x86, but this is no longer the case for SEV-ES and SEV-SNP VMs. When KVM_CHECK_EXTENSION is invoked on a VM, only advertise KVM_CAP_READONLY_MEM when it's actually supported. Fixes: 66155de93bcf ("KVM: x86: Disallow read-only memslots for SEV-ES and SEV-SNP (and TDX)") Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Michael Roth Signed-off-by: Tom Dohrmann Message-ID: <20240902144219.3716974-1-erbse.13@gmx.de> Signed-off-by: Paolo Bonzini commit 1ae99594fb7a7e78de7b1adf0feb4f681937a28e Merge: 66155de93bcf4 5fa9f0480c798 Author: Paolo Bonzini Date: Mon Sep 2 10:55:27 2024 -0400 Merge tag 'kvm-x86-fixes-6.11-rcN' of https://github.com/kvm-x86/linux into kvm-master KVM x86 fixes for 6.11 - Fixup missed comments from the REMOVED_SPTE=>FROZEN_SPTE rename. - Ensure a root is successfully loaded when pre-faulting SPTEs. - Grab kvm->srcu when handling KVM_SET_VCPU_EVENTS to guard against accessing memslots if toggling SMM happens to force a VM-Exit. - Emulate MSR_{FS,GS}_BASE on SVM even though interception is always disabled, so that KVM does the right thing if KVM's emulator encounters {RD,WR}MSR. - Explicitly clear BUS_LOCK_DETECT from KVM's caps on AMD, as KVM doesn't yet virtualize BUS_LOCK_DETECT on AMD. - Cleanup the help message for CONFIG_KVM_AMD_SEV, and call out that KVM now supports SEV-SNP too. commit a54da9df75cd1b4b5028f6c60f9a211532680585 Author: Armin Wolf Date: Sun Sep 1 05:10:51 2024 +0200 hwmon: (hp-wmi-sensors) Check if WMI event data exists The BIOS can choose to return no event data in response to a WMI event, so the ACPI object passed to the WMI notify handler can be NULL. Check for such a situation and ignore the event in such a case. Fixes: 23902f98f8d4 ("hwmon: add HP WMI Sensors driver") Signed-off-by: Armin Wolf Reviewed-by: Ilpo Järvinen Message-ID: <20240901031055.3030-2-W_Armin@gmx.de> Signed-off-by: Guenter Roeck commit a5135526426df5319d5f4bcd15ae57c45a97714b Author: Liao Chen Date: Mon Sep 2 11:58:48 2024 +0000 gpio: modepin: Enable module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Fixes: 7687a5b0ee93 ("gpio: modepin: Add driver support for modepin GPIO controller") Signed-off-by: Liao Chen Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20240902115848.904227-1-liaochen4@huawei.com Signed-off-by: Bartosz Golaszewski commit ef4a99a0164e3972abb421cbb1b09ea6c61414df Author: Dan Carpenter Date: Thu Aug 29 22:22:45 2024 +0300 igc: Unlock on error in igc_io_resume() Call rtnl_unlock() on this error path, before returning. Fixes: bc23aa949aeb ("igc: Add pcie error handler support") Signed-off-by: Dan Carpenter Reviewed-by: Gerhard Engleder Signed-off-by: David S. Miller commit adad2e460e505a556f5ea6f0dc16fe95e62d5d76 Author: Krzysztof Kozlowski Date: Mon Aug 26 17:08:32 2024 +0200 gpio: rockchip: fix OF node leak in probe() Driver code is leaking OF node reference from of_get_parent() in probe(). Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner Reviewed-by: Shawn Lin Link: https://lore.kernel.org/r/20240826150832.65657-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bartosz Golaszewski commit 709df70a20e990d262c473ad9899314039e8ec82 Author: Liao Chen Date: Sat Aug 31 09:42:31 2024 +0000 spi: bcm63xx: Enable module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Link: https://patch.msgid.link/20240831094231.795024-1-liaochen4@huawei.com Signed-off-by: Mark Brown commit f99999536128b14b5d765a9982763b5134efdd79 Author: Andy Shevchenko Date: Thu Aug 29 18:58:38 2024 +0300 drm/i915/fence: Mark debug_fence_free() with __maybe_unused When debug_fence_free() is unused (CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS=n), it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: .../i915_sw_fence.c:118:20: error: unused function 'debug_fence_free' [-Werror,-Wunused-function] 118 | static inline void debug_fence_free(struct i915_sw_fence *fence) | ^~~~~~~~~~~~~~~~ Fix this by marking debug_fence_free() with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Fixes: fc1584059d6c ("drm/i915: Integrate i915_sw_fence with debugobjects") Signed-off-by: Andy Shevchenko Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240829155950.1141978-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jani Nikula (cherry picked from commit 8be4dce5ea6f2368cc25edc71989c4690fa66964) Signed-off-by: Joonas Lahtinen commit fcd9e8afd546f6ced378d078345a89bf346d065e Author: Andy Shevchenko Date: Thu Aug 29 18:58:37 2024 +0300 drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused When debug_fence_init_onstack() is unused (CONFIG_DRM_I915_SELFTEST=n), it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: .../i915_sw_fence.c:97:20: error: unused function 'debug_fence_init_onstack' [-Werror,-Wunused-function] 97 | static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) | ^~~~~~~~~~~~~~~~~~~~~~~~ Fix this by marking debug_fence_init_onstack() with __maybe_unused. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Fixes: 214707fc2ce0 ("drm/i915/selftests: Wrap a timer into a i915_sw_fence") Signed-off-by: Andy Shevchenko Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240829155950.1141978-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jani Nikula (cherry picked from commit 5bf472058ffb43baf6a4cdfe1d7f58c4c194c688) Signed-off-by: Joonas Lahtinen commit e8705632435ae2f2253b65d3786da389982e8813 Author: Ville Syrjälä Date: Wed Jul 10 15:41:37 2024 +0300 drm/i915: Fix readout degamma_lut mismatch on ilk/snb On ilk/snb the pipe may be configured to place the LUT before or after the CSC depending on various factors, but as there is only one LUT (no split mode like on IVB+) we only advertise a gamma_lut and no degamma_lut in the uapi to avoid confusing userspace. This can cause a problem during readout if the VBIOS/GOP enabled the LUT in the pre CSC configuration. The current code blindly assigns the results of the readout to the degamma_lut, which will cause a failure during the next atomic_check() as we aren't expecting anything to be in degamma_lut since it's not visible to userspace. Fix the problem by assigning whatever LUT we read out from the hardware into gamma_lut. Cc: stable@vger.kernel.org Fixes: d2559299d339 ("drm/i915: Make ilk_read_luts() capable of degamma readout") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11608 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240710124137.16773-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar (cherry picked from commit 33eca84db6e31091cef63584158ab64704f78462) Signed-off-by: Joonas Lahtinen commit 59d3cfdd7f9655a0400ac453bf92199204f8b2a1 Author: Daniele Ceraolo Spurio Date: Tue Aug 20 14:59:52 2024 -0700 drm/i915: Do not attempt to load the GSC multiple times If the GSC FW fails to load the GSC HW hangs permanently; the only ways to recover it are FLR or D3cold entry, with the former only being supported on driver unload and the latter only on DGFX, for which we don't need to load the GSC. Therefore, if GSC fails to load there is no need to try again because the HW is stuck in the error state and the submission to load the FW would just hang the GSCCS. Note that, due to wa_14015076503, on MTL the GuC escalates all GSCCS hangs to full GT resets, which would trigger a new attempt to load the GSC FW in the post-reset HW re-init; this issue is also fixed by not attempting to load the GSC FW after an error. Fixes: 15bd4a67e914 ("drm/i915/gsc: GSC firmware loading") Signed-off-by: Daniele Ceraolo Spurio Cc: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Rodrigo Vivi Cc: # v6.3+ Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240820215952.2290807-1-daniele.ceraolospurio@intel.com (cherry picked from commit 03ded4d432a1fb7bb6c44c5856d14115f6f6c3b9) Signed-off-by: Joonas Lahtinen commit 342123d6913c62be17e5ca1bb325758c5fd0db34 Merge: 5916be8a53de6 3d5c2f8e75a55 Author: Thomas Gleixner Date: Mon Sep 2 11:56:59 2024 +0200 Merge tag 'timers-v6.11-rc7' of https://git.linaro.org/people/daniel.lezcano/linux into timers/urgent Pull clocksource driver fixes from Daniel Lezcano: - Remove percpu irq related code in the timer-of initialization routine as it is broken but also unused (Daniel Lezcano) - Fix return -ETIME when delta exceeds INT_MAX and the next event not taking effect sometimes (Jacky Bai) Link: https://lore.kernel.org/all/d0e93dbd-b796-4726-b38c-089b685591c9@linaro.org commit a3c1e45156ad39f225cd7ddae0f81230a3b1e657 Author: Jens Emil Schulz Østergaard Date: Thu Aug 29 11:52:54 2024 +0200 net: microchip: vcap: Fix use-after-free error in kunit test This is a clear use-after-free error. We remove it, and rely on checking the return code of vcap_del_rule. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/kernel-janitors/7bffefc6-219a-4f71-baa0-ad4526e5c198@kili.mountain/ Fixes: c956b9b318d9 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API") Signed-off-by: Jens Emil Schulz Østergaard Signed-off-by: David S. Miller commit 376174f5a49ac8701df15a68e9d3269c5b62abed Author: Wedson Almeida Filho Date: Wed Aug 28 18:11:17 2024 -0300 MAINTAINERS: Remove Wedson as Rust maintainer I am retiring from the project, so removing myself from MAINTAINERS as I won't have time to dedicate to it. Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20240828211117.9422-2-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit 602cb14e310a7a32c4f27d1f16c4614c790c7f6f Author: Stephan Gerhold Date: Fri Aug 30 11:09:07 2024 +0200 pinctrl: qcom: x1e80100: Bypass PDC wakeup parent for now On X1E80100, GPIO interrupts for wakeup-capable pins have been broken since the introduction of the pinctrl driver. This prevents keyboard and touchpad from working on most of the X1E laptops. So far we have worked around this by manually building a kernel with the "wakeup-parent" removed from the pinctrl node in the device tree, but we cannot expect all users to do that. Implement a similar workaround in the driver by clearing the wakeirq_map for X1E80100. This avoids using the PDC wakeup parent for all GPIOs and handles the interrupts directly in the pinctrl driver instead. The PDC driver needs additional changes to support X1E80100 properly. Adding a workaround separately first allows to land the necessary PDC changes through the normal release cycle, while still solving the more critical problem with keyboard and touchpad on the current stable kernel versions. Bypassing the PDC is enough for now, because we have not yet enabled the deep idle states where using the PDC becomes necessary. Cc: stable@vger.kernel.org Fixes: 05e4941d97ef ("pinctrl: qcom: Add X1E80100 pinctrl driver") Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Tested-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/20240830-x1e80100-bypass-pdc-v1-1-d4c00be0c3e3@linaro.org Signed-off-by: Linus Walleij commit 3f6b2f60b4631cd0c368da6a1587ab55a696164d Author: Matt Coster Date: Mon Sep 2 09:48:48 2024 +0100 drm/imagination: Free pvr_vm_gpuva after unlink This caused a measurable memory leak. Although the individual allocations are small, the leaks occurs in a high-usage codepath (remapping or unmapping device memory) so they add up quickly. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Cc: stable@vger.kernel.org Reviewed-by: Frank Binns Link: https://patchwork.freedesktop.org/patch/msgid/35867394-d8ce-4698-a8fd-919a018f1583@imgtec.com Signed-off-by: Matt Coster commit 3d5c2f8e75a55cfb11a85086c71996af0354a1fb Author: Jacky Bai Date: Thu Jul 25 15:33:55 2024 -0400 clocksource/drivers/imx-tpm: Fix next event not taking effect sometime The value written into the TPM CnV can only be updated into the hardware when the counter increases. Additional writes to the CnV write buffer are ignored until the register has been updated. Therefore, we need to check if the CnV has been updated before continuing. This may require waiting for 1 counter cycle in the worst case. Cc: stable@vger.kernel.org Fixes: 059ab7b82eec ("clocksource/drivers/imx-tpm: Add imx tpm timer support") Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Reviewed-by: Ye Li Reviewed-by: Jason Liu Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240725193355.1436005-2-Frank.Li@nxp.com Signed-off-by: Daniel Lezcano commit 5b8843fcd49827813da80c0f590a17ae4ce93c5d Author: Jacky Bai Date: Thu Jul 25 15:33:54 2024 -0400 clocksource/drivers/imx-tpm: Fix return -ETIME when delta exceeds INT_MAX In tpm_set_next_event(delta), return -ETIME by wrong cast to int when delta is larger than INT_MAX. For example: tpm_set_next_event(delta = 0xffff_fffe) { ... next = tpm_read_counter(); // assume next is 0x10 next += delta; // next will 0xffff_fffe + 0x10 = 0x1_0000_000e now = tpm_read_counter(); // now is 0x10 ... return (int)(next - now) <= 0 ? -ETIME : 0; ^^^^^^^^^^ 0x1_0000_000e - 0x10 = 0xffff_fffe, which is -2 when cast to int. So return -ETIME. } To fix this, introduce a 'prev' variable and check if 'now - prev' is larger than delta. Cc: stable@vger.kernel.org Fixes: 059ab7b82eec ("clocksource/drivers/imx-tpm: Add imx tpm timer support") Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Reviewed-by: Ye Li Reviewed-by: Jason Liu Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240725193355.1436005-1-Frank.Li@nxp.com Signed-off-by: Daniel Lezcano commit 471ef0b5a8aaca4296108e756b970acfc499ede4 Author: Daniel Lezcano Date: Mon Aug 19 12:03:35 2024 +0200 clocksource/drivers/timer-of: Remove percpu irq related code GCC's named address space checks errors out with: drivers/clocksource/timer-of.c: In function ‘timer_of_irq_exit’: drivers/clocksource/timer-of.c:29:46: error: passing argument 2 of ‘free_percpu_irq’ from pointer to non-enclosed address space 29 | free_percpu_irq(of_irq->irq, clkevt); | ^~~~~~ In file included from drivers/clocksource/timer-of.c:8: ./include/linux/interrupt.h:201:43: note: expected ‘__seg_gs void *’ but argument is of type ‘struct clock_event_device *’ 201 | extern void free_percpu_irq(unsigned int, void __percpu *); | ^~~~~~~~~~~~~~~ drivers/clocksource/timer-of.c: In function ‘timer_of_irq_init’: drivers/clocksource/timer-of.c:74:51: error: passing argument 4 of ‘request_percpu_irq’ from pointer to non-enclosed address space 74 | np->full_name, clkevt) : | ^~~~~~ ./include/linux/interrupt.h:190:56: note: expected ‘__seg_gs void *’ but argument is of type ‘struct clock_event_device *’ 190 | const char *devname, void __percpu *percpu_dev_id) Sparse warns about: timer-of.c:29:46: warning: incorrect type in argument 2 (different address spaces) timer-of.c:29:46: expected void [noderef] __percpu * timer-of.c:29:46: got struct clock_event_device *clkevt timer-of.c:74:51: warning: incorrect type in argument 4 (different address spaces) timer-of.c:74:51: expected void [noderef] __percpu *percpu_dev_id timer-of.c:74:51: got struct clock_event_device *clkevt It appears the code is incorrect as reported by Uros Bizjak: "The referred code is questionable as it tries to reuse the clkevent pointer once as percpu pointer and once as generic pointer, which should be avoided." This change removes the percpu related code as no drivers is using it. [Daniel: Fixed the description] Fixes: dc11bae785295 ("clocksource/drivers: Add timer-of common init routine") Reported-by: Uros Bizjak Tested-by: Uros Bizjak Link: https://lore.kernel.org/r/20240819100335.2394751-1-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano commit a5a3c952e82c1ada12bf8c55b73af26f1a454bd2 Author: Boqun Feng Date: Wed Aug 28 11:01:29 2024 -0700 rust: macros: provide correct provenance when constructing THIS_MODULE Currently while defining `THIS_MODULE` symbol in `module!()`, the pointer used to construct `ThisModule` is derived from an immutable reference of `__this_module`, which means the pointer doesn't have the provenance for writing, and that means any write to that pointer is UB regardless of data races or not. However, the usage of `THIS_MODULE` includes passing this pointer to functions that may write to it (probably in unsafe code), and this will create soundness issues. One way to fix this is using `addr_of_mut!()` but that requires the unstable feature "const_mut_refs". So instead of `addr_of_mut()!`, an extern static `Opaque` is used here: since `Opaque` is transparent to `T`, an extern static `Opaque` will just wrap the C symbol (defined in a C compile unit) in an `Opaque`, which provides a pointer with writable provenance via `Opaque::get()`. This fix the potential UBs because of pointer provenance unmatched. Reported-by: Alice Ryhl Signed-off-by: Boqun Feng Reviewed-by: Alice Ryhl Reviewed-by: Trevor Gross Reviewed-by: Benno Lossin Reviewed-by: Gary Guo Closes: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/465412664 Fixes: 1fbde52bde73 ("rust: add `macros` crate") Cc: stable@vger.kernel.org # 6.6.x: be2ca1e03965: ("rust: types: Make Opaque::get const") Link: https://lore.kernel.org/r/20240828180129.4046355-1-boqun.feng@gmail.com [ Fixed two typos, reworded title. - Miguel ] Signed-off-by: Miguel Ojeda commit 67784a74e258a467225f0e68335df77acd67b7ab Merge: c9f016e72b5cc 284b75a3d83c7 Author: Linus Torvalds Date: Sun Sep 1 19:59:59 2024 -0700 Merge tag 'ata-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fix from Damien Le Moal: - Fix a potential memory leak in the ata host initialization code (from Zheng) * tag 'ata-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata: Fix memory leak for error path in ata_host_alloc() commit 052a45c1cb1b32f05dd63a295d65496d8b403283 Author: Suren Baghdasaryan Date: Wed Aug 28 16:15:36 2024 -0700 alloc_tag: fix allocation tag reporting when CONFIG_MODULES=n codetag_module_init() is used to initialize sections containing allocation tags. This function is used to initialize module sections as well as core kernel sections, in which case the module parameter is set to NULL. This function has to be called even when CONFIG_MODULES=n to initialize core kernel allocation tag sections. When CONFIG_MODULES=n, this function is a NOP, which is wrong. This leads to /proc/allocinfo reported as empty. Fix this by making it independent of CONFIG_MODULES. Link: https://lkml.kernel.org/r/20240828231536.1770519-1-surenb@google.com Fixes: 916cc5167cc6 ("lib: code tagging framework") Signed-off-by: Suren Baghdasaryan Cc: David Hildenbrand Cc: Kees Cook Cc: Kent Overstreet Cc: Pasha Tatashin Cc: Sourav Panda Cc: Vlastimil Babka Cc: [6.10+] Signed-off-by: Andrew Morton commit 409faf8c97d5abb0597ea43e99c8b3dd8dbe99e3 Author: Adrian Huang Date: Thu Aug 29 21:06:33 2024 +0800 mm: vmalloc: optimize vmap_lazy_nr arithmetic when purging each vmap_area When running the vmalloc stress on a 448-core system, observe the average latency of purge_vmap_node() is about 2 seconds by using the eBPF/bcc 'funclatency.py' tool [1]. # /your-git-repo/bcc/tools/funclatency.py -u purge_vmap_node & pid1=$! && sleep 8 && modprobe test_vmalloc nr_threads=$(nproc) run_test_mask=0x7; kill -SIGINT $pid1 usecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 29 | | 4 -> 7 : 19 | | 8 -> 15 : 56 | | 16 -> 31 : 483 |**** | 32 -> 63 : 1548 |************ | 64 -> 127 : 2634 |********************* | 128 -> 255 : 2535 |********************* | 256 -> 511 : 1776 |************** | 512 -> 1023 : 1015 |******** | 1024 -> 2047 : 573 |**** | 2048 -> 4095 : 488 |**** | 4096 -> 8191 : 1091 |********* | 8192 -> 16383 : 3078 |************************* | 16384 -> 32767 : 4821 |****************************************| 32768 -> 65535 : 3318 |*************************** | 65536 -> 131071 : 1718 |************** | 131072 -> 262143 : 2220 |****************** | 262144 -> 524287 : 1147 |********* | 524288 -> 1048575 : 1179 |********* | 1048576 -> 2097151 : 822 |****** | 2097152 -> 4194303 : 906 |******* | 4194304 -> 8388607 : 2148 |***************** | 8388608 -> 16777215 : 4497 |************************************* | 16777216 -> 33554431 : 289 |** | avg = 2041714 usecs, total: 78381401772 usecs, count: 38390 The worst case is over 16-33 seconds, so soft lockup is triggered [2]. [Root Cause] 1) Each purge_list has the long list. The following shows the number of vmap_area is purged. crash> p vmap_nodes vmap_nodes = $27 = (struct vmap_node *) 0xff2de5a900100000 crash> vmap_node 0xff2de5a900100000 128 | grep nr_purged nr_purged = 663070 ... nr_purged = 821670 nr_purged = 692214 nr_purged = 726808 ... 2) atomic_long_sub() employs the 'lock' prefix to ensure the atomic operation when purging each vmap_area. However, the iteration is over 600000 vmap_area (See 'nr_purged' above). Here is objdump output: $ objdump -D vmlinux ffffffff813e8c80 : ... ffffffff813e8d70: f0 48 29 2d 68 0c bb lock sub %rbp,0x2bb0c68(%rip) ... Quote from "Instruction tables" pdf file [3]: Instructions with a LOCK prefix have a long latency that depends on cache organization and possibly RAM speed. If there are multiple processors or cores or direct memory access (DMA) devices, then all locked instructions will lock a cache line for exclusive access, which may involve RAM access. A LOCK prefix typically costs more than a hundred clock cycles, even on single-processor systems. That's why the latency of purge_vmap_node() dramatically increases on a many-core system: One core is busy on purging each vmap_area of the *long* purge_list and executing atomic_long_sub() for each vmap_area, while other cores free vmalloc allocations and execute atomic_long_add_return() in free_vmap_area_noflush(). [Solution] Employ a local variable to record the total purged pages, and execute atomic_long_sub() after the traversal of the purge_list is done. The experiment result shows the latency improvement is 99%. [Experiment Result] 1) System Configuration: Three servers (with HT-enabled) are tested. * 72-core server: 3rd Gen Intel Xeon Scalable Processor*1 * 192-core server: 5th Gen Intel Xeon Scalable Processor*2 * 448-core server: AMD Zen 4 Processor*2 2) Kernel Config * CONFIG_KASAN is disabled 3) The data in column "w/o patch" and "w/ patch" * Unit: micro seconds (us) * Each data is the average of 3-time measurements System w/o patch (us) w/ patch (us) Improvement (%) --------------- -------------- ------------- ------------- 72-core server 2194 14 99.36% 192-core server 143799 1139 99.21% 448-core server 1992122 6883 99.65% [1] https://github.com/iovisor/bcc/blob/master/tools/funclatency.py [2] https://gist.github.com/AdrianHuang/37c15f67b45407b83c2d32f918656c12 [3] https://www.agner.org/optimize/instruction_tables.pdf Link: https://lkml.kernel.org/r/20240829130633.2184-1-ahuang12@lenovo.com Signed-off-by: Adrian Huang Reviewed-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton commit 4f295229b279145bdc667c58f62e89f5968e12fb Author: Jan Kuliga Date: Fri Aug 30 11:56:58 2024 +0200 mailmap: update entry for Jan Kuliga Soon I won't be able to use my current email address. Link: https://lkml.kernel.org/r/20240830095658.1203198-1-jankul@alatek.krakow.pl Signed-off-by: Jan Kuliga Cc: David S. Miller Cc: Matthieu Baerts (NGI0) Signed-off-by: Andrew Morton commit 5e9784e997620af7c1399029282f5d6964b41942 Author: Hao Ge Date: Mon Aug 26 00:36:49 2024 +0800 codetag: debug: mark codetags for poisoned page as empty When PG_hwpoison pages are freed they are treated differently in free_pages_prepare() and instead of being released they are isolated. Page allocation tag counters are decremented at this point since the page is considered not in use. Later on when such pages are released by unpoison_memory(), the allocation tag counters will be decremented again and the following warning gets reported: [ 113.930443][ T3282] ------------[ cut here ]------------ [ 113.931105][ T3282] alloc_tag was not set [ 113.931576][ T3282] WARNING: CPU: 2 PID: 3282 at ./include/linux/alloc_tag.h:130 pgalloc_tag_sub.part.66+0x154/0x164 [ 113.932866][ T3282] Modules linked in: hwpoison_inject fuse ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute ip6table_nat ip6table_man4 [ 113.941638][ T3282] CPU: 2 UID: 0 PID: 3282 Comm: madvise11 Kdump: loaded Tainted: G W 6.11.0-rc4-dirty #18 [ 113.943003][ T3282] Tainted: [W]=WARN [ 113.943453][ T3282] Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 [ 113.944378][ T3282] pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 113.945319][ T3282] pc : pgalloc_tag_sub.part.66+0x154/0x164 [ 113.946016][ T3282] lr : pgalloc_tag_sub.part.66+0x154/0x164 [ 113.946706][ T3282] sp : ffff800087093a10 [ 113.947197][ T3282] x29: ffff800087093a10 x28: ffff0000d7a9d400 x27: ffff80008249f0a0 [ 113.948165][ T3282] x26: 0000000000000000 x25: ffff80008249f2b0 x24: 0000000000000000 [ 113.949134][ T3282] x23: 0000000000000001 x22: 0000000000000001 x21: 0000000000000000 [ 113.950597][ T3282] x20: ffff0000c08fcad8 x19: ffff80008251e000 x18: ffffffffffffffff [ 113.952207][ T3282] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800081746210 [ 113.953161][ T3282] x14: 0000000000000000 x13: 205d323832335420 x12: 5b5d353031313339 [ 113.954120][ T3282] x11: ffff800087093500 x10: 000000000000005d x9 : 00000000ffffffd0 [ 113.955078][ T3282] x8 : 7f7f7f7f7f7f7f7f x7 : ffff80008236ba90 x6 : c0000000ffff7fff [ 113.956036][ T3282] x5 : ffff000b34bf4dc8 x4 : ffff8000820aba90 x3 : 0000000000000001 [ 113.956994][ T3282] x2 : ffff800ab320f000 x1 : 841d1e35ac932e00 x0 : 0000000000000000 [ 113.957962][ T3282] Call trace: [ 113.958350][ T3282] pgalloc_tag_sub.part.66+0x154/0x164 [ 113.959000][ T3282] pgalloc_tag_sub+0x14/0x1c [ 113.959539][ T3282] free_unref_page+0xf4/0x4b8 [ 113.960096][ T3282] __folio_put+0xd4/0x120 [ 113.960614][ T3282] folio_put+0x24/0x50 [ 113.961103][ T3282] unpoison_memory+0x4f0/0x5b0 [ 113.961678][ T3282] hwpoison_unpoison+0x30/0x48 [hwpoison_inject] [ 113.962436][ T3282] simple_attr_write_xsigned.isra.34+0xec/0x1cc [ 113.963183][ T3282] simple_attr_write+0x38/0x48 [ 113.963750][ T3282] debugfs_attr_write+0x54/0x80 [ 113.964330][ T3282] full_proxy_write+0x68/0x98 [ 113.964880][ T3282] vfs_write+0xdc/0x4d0 [ 113.965372][ T3282] ksys_write+0x78/0x100 [ 113.965875][ T3282] __arm64_sys_write+0x24/0x30 [ 113.966440][ T3282] invoke_syscall+0x7c/0x104 [ 113.966984][ T3282] el0_svc_common.constprop.1+0x88/0x104 [ 113.967652][ T3282] do_el0_svc+0x2c/0x38 [ 113.968893][ T3282] el0_svc+0x3c/0x1b8 [ 113.969379][ T3282] el0t_64_sync_handler+0x98/0xbc [ 113.969980][ T3282] el0t_64_sync+0x19c/0x1a0 [ 113.970511][ T3282] ---[ end trace 0000000000000000 ]--- To fix this, clear the page tag reference after the page got isolated and accounted for. Link: https://lkml.kernel.org/r/20240825163649.33294-1-hao.ge@linux.dev Fixes: d224eb0287fb ("codetag: debug: mark codetags for reserved pages as empty") Signed-off-by: Hao Ge Reviewed-by: Miaohe Lin Acked-by: Suren Baghdasaryan Cc: David Hildenbrand Cc: Hao Ge Cc: Kent Overstreet Cc: Naoya Horiguchi Cc: Pasha Tatashin Cc: [6.10+] Signed-off-by: Andrew Morton commit e399257349098bf7c84343f99efb2bc9c22eb9fd Author: Mike Yuan Date: Fri Aug 23 16:27:06 2024 +0000 mm/memcontrol: respect zswap.writeback setting from parent cg too Currently, the behavior of zswap.writeback wrt. the cgroup hierarchy seems a bit odd. Unlike zswap.max, it doesn't honor the value from parent cgroups. This surfaced when people tried to globally disable zswap writeback, i.e. reserve physical swap space only for hibernation [1] - disabling zswap.writeback only for the root cgroup results in subcgroups with zswap.writeback=1 still performing writeback. The inconsistency became more noticeable after I introduced the MemoryZSwapWriteback= systemd unit setting [2] for controlling the knob. The patch assumed that the kernel would enforce the value of parent cgroups. It could probably be workarounded from systemd's side, by going up the slice unit tree and inheriting the value. Yet I think it's more sensible to make it behave consistently with zswap.max and friends. [1] https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Disable_zswap_writeback_to_use_the_swap_space_only_for_hibernation [2] https://github.com/systemd/systemd/pull/31734 Link: https://lkml.kernel.org/r/20240823162506.12117-1-me@yhndnzj.com Fixes: 501a06fe8e4c ("zswap: memcontrol: implement zswap writeback disabling") Signed-off-by: Mike Yuan Reviewed-by: Nhat Pham Acked-by: Yosry Ahmed Cc: Johannes Weiner Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Signed-off-by: Andrew Morton commit a3f6a89c834a4cba0f881da21307b26de3796133 Author: Marc Zyngier Date: Fri Aug 23 17:38:50 2024 +0100 scripts: fix gfp-translate after ___GFP_*_BITS conversion to an enum Richard reports that since 772dd0342727c ("mm: enumerate all gfp flags"), gfp-translate is broken, as the bit numbers are implicit, leaving the shell script unable to extract them. Even more, some bits are now at a variable location, making it double extra hard to parse using a simple shell script. Use a brute-force approach to the problem by generating a small C stub that will use the enum to dump the interesting bits. As an added bonus, we are now able to identify invalid bits for a given configuration. As an added drawback, we cannot parse include files that predate this change anymore. Tough luck. Link: https://lkml.kernel.org/r/20240823163850.3791201-1-maz@kernel.org Fixes: 772dd0342727 ("mm: enumerate all gfp flags") Signed-off-by: Marc Zyngier Reported-by: Richard Weinberger Cc: Petr Tesařík Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit bfe0857c20c663fcc1592fa4e3a61ca12b07dac9 Author: Usama Arif Date: Wed Aug 21 20:26:07 2024 +0100 Revert "mm: skip CMA pages when they are not available" This reverts commit 5da226dbfce3 ("mm: skip CMA pages when they are not available") and b7108d66318a ("Multi-gen LRU: skip CMA pages when they are not eligible"). lruvec->lru_lock is highly contended and is held when calling isolate_lru_folios. If the lru has a large number of CMA folios consecutively, while the allocation type requested is not MIGRATE_MOVABLE, isolate_lru_folios can hold the lock for a very long time while it skips those. For FIO workload, ~150million order=0 folios were skipped to isolate a few ZONE_DMA folios [1]. This can cause lockups [1] and high memory pressure for extended periods of time [2]. Remove skipping CMA for MGLRU as well, as it was introduced in sort_folio for the same resaon as 5da226dbfce3a2f44978c2c7cf88166e69a6788b. [1] https://lore.kernel.org/all/CAOUHufbkhMZYz20aM_3rHZ3OcK4m2puji2FGpUpn_-DevGk3Kg@mail.gmail.com/ [2] https://lore.kernel.org/all/ZrssOrcJIDy8hacI@gmail.com/ [usamaarif642@gmail.com: also revert b7108d66318a, per Johannes] Link: https://lkml.kernel.org/r/9060a32d-b2d7-48c0-8626-1db535653c54@gmail.com Link: https://lkml.kernel.org/r/357ac325-4c61-497a-92a3-bdbd230d5ec9@gmail.com Link: https://lkml.kernel.org/r/9060a32d-b2d7-48c0-8626-1db535653c54@gmail.com Fixes: 5da226dbfce3 ("mm: skip CMA pages when they are not available") Signed-off-by: Usama Arif Acked-by: Johannes Weiner Cc: Bharata B Rao Cc: Breno Leitao Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Rik van Riel Cc: Vlastimil Babka Cc: Yu Zhao Cc: Zhaoyang Huang Cc: Zhaoyang Huang Cc: Signed-off-by: Andrew Morton commit f806de88d8f7f8191afd0fd9b94db4cd058e7d4f Author: Liam R. Howlett Date: Tue Aug 20 13:54:17 2024 -0400 maple_tree: remove rcu_read_lock() from mt_validate() The write lock should be held when validating the tree to avoid updates racing with checks. Holding the rcu read lock during a large tree validation may also cause a prolonged rcu read window and "rcu_preempt detected stalls" warnings. Link: https://lore.kernel.org/all/0000000000001d12d4062005aea1@google.com/ Link: https://lkml.kernel.org/r/20240820175417.2782532-1-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: syzbot+036af2f0c7338a33b0cd@syzkaller.appspotmail.com Cc: Hillf Danton Cc: Matthew Wilcox Cc: "Paul E. McKenney" Cc: Signed-off-by: Andrew Morton commit 6dacd79d28842ff01f18b4900d897741aac5999e Author: Petr Tesarik Date: Mon Aug 5 17:07:50 2024 +0200 kexec_file: fix elfcorehdr digest exclusion when CONFIG_CRASH_HOTPLUG=y Fix the condition to exclude the elfcorehdr segment from the SHA digest calculation. The j iterator is an index into the output sha_regions[] array, not into the input image->segment[] array. Once it reaches image->elfcorehdr_index, all subsequent segments are excluded. Besides, if the purgatory segment precedes the elfcorehdr segment, the elfcorehdr may be wrongly included in the calculation. Link: https://lkml.kernel.org/r/20240805150750.170739-1-petr.tesarik@suse.com Fixes: f7cc804a9fd4 ("kexec: exclude elfcorehdr from the segment digest") Signed-off-by: Petr Tesarik Acked-by: Baoquan He Cc: Eric Biederman Cc: Hari Bathini Cc: Sourabh Jain Cc: Eric DeVolder Cc: Signed-off-by: Andrew Morton commit ab7ca09520e9c41c219a4427fe0dae24024bfe7f Author: Hao Ge Date: Fri Aug 16 09:33:36 2024 +0800 mm/slub: add check for s->flags in the alloc_tagging_slab_free_hook When enable CONFIG_MEMCG & CONFIG_KFENCE & CONFIG_KMEMLEAK, the following warning always occurs,This is because the following call stack occurred: mem_pool_alloc kmem_cache_alloc_noprof slab_alloc_node kfence_alloc Once the kfence allocation is successful,slab->obj_exts will not be empty, because it has already been assigned a value in kfence_init_pool. Since in the prepare_slab_obj_exts_hook function,we perform a check for s->flags & (SLAB_NO_OBJ_EXT | SLAB_NOLEAKTRACE),the alloc_tag_add function will not be called as a result.Therefore,ref->ct remains NULL. However,when we call mem_pool_free,since obj_ext is not empty, it eventually leads to the alloc_tag_sub scenario being invoked. This is where the warning occurs. So we should add corresponding checks in the alloc_tagging_slab_free_hook. For __GFP_NO_OBJ_EXT case,I didn't see the specific case where it's using kfence,so I won't add the corresponding check in alloc_tagging_slab_free_hook for now. [ 3.734349] ------------[ cut here ]------------ [ 3.734807] alloc_tag was not set [ 3.735129] WARNING: CPU: 4 PID: 40 at ./include/linux/alloc_tag.h:130 kmem_cache_free+0x444/0x574 [ 3.735866] Modules linked in: autofs4 [ 3.736211] CPU: 4 UID: 0 PID: 40 Comm: ksoftirqd/4 Tainted: G W 6.11.0-rc3-dirty #1 [ 3.736969] Tainted: [W]=WARN [ 3.737258] Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022 [ 3.737875] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 3.738501] pc : kmem_cache_free+0x444/0x574 [ 3.738951] lr : kmem_cache_free+0x444/0x574 [ 3.739361] sp : ffff80008357bb60 [ 3.739693] x29: ffff80008357bb70 x28: 0000000000000000 x27: 0000000000000000 [ 3.740338] x26: ffff80008207f000 x25: ffff000b2eb2fd60 x24: ffff0000c0005700 [ 3.740982] x23: ffff8000804229e4 x22: ffff800082080000 x21: ffff800081756000 [ 3.741630] x20: fffffd7ff8253360 x19: 00000000000000a8 x18: ffffffffffffffff [ 3.742274] x17: ffff800ab327f000 x16: ffff800083398000 x15: ffff800081756df0 [ 3.742919] x14: 0000000000000000 x13: 205d344320202020 x12: 5b5d373038343337 [ 3.743560] x11: ffff80008357b650 x10: 000000000000005d x9 : 00000000ffffffd0 [ 3.744231] x8 : 7f7f7f7f7f7f7f7f x7 : ffff80008237bad0 x6 : c0000000ffff7fff [ 3.744907] x5 : ffff80008237ba78 x4 : ffff8000820bbad0 x3 : 0000000000000001 [ 3.745580] x2 : 68d66547c09f7800 x1 : 68d66547c09f7800 x0 : 0000000000000000 [ 3.746255] Call trace: [ 3.746530] kmem_cache_free+0x444/0x574 [ 3.746931] mem_pool_free+0x44/0xf4 [ 3.747306] free_object_rcu+0xc8/0xdc [ 3.747693] rcu_do_batch+0x234/0x8a4 [ 3.748075] rcu_core+0x230/0x3e4 [ 3.748424] rcu_core_si+0x14/0x1c [ 3.748780] handle_softirqs+0x134/0x378 [ 3.749189] run_ksoftirqd+0x70/0x9c [ 3.749560] smpboot_thread_fn+0x148/0x22c [ 3.749978] kthread+0x10c/0x118 [ 3.750323] ret_from_fork+0x10/0x20 [ 3.750696] ---[ end trace 0000000000000000 ]--- Link: https://lkml.kernel.org/r/20240816013336.17505-1-hao.ge@linux.dev Fixes: 4b8736964640 ("mm/slab: add allocation accounting into slab allocation and free paths") Signed-off-by: Hao Ge Cc: Christoph Lameter Cc: David Rientjes Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Kees Cook Cc: Kent Overstreet Cc: Pekka Enberg Cc: Roman Gushchin Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 6576dd6695f2afca3f4954029ac4a64f82ba60ab Author: Ryusuke Konishi Date: Wed Aug 14 19:11:19 2024 +0900 nilfs2: fix state management in error path of log writing function After commit a694291a6211 ("nilfs2: separate wait function from nilfs_segctor_write") was applied, the log writing function nilfs_segctor_do_construct() was able to issue I/O requests continuously even if user data blocks were split into multiple logs across segments, but two potential flaws were introduced in its error handling. First, if nilfs_segctor_begin_construction() fails while creating the second or subsequent logs, the log writing function returns without calling nilfs_segctor_abort_construction(), so the writeback flag set on pages/folios will remain uncleared. This causes page cache operations to hang waiting for the writeback flag. For example, truncate_inode_pages_final(), which is called via nilfs_evict_inode() when an inode is evicted from memory, will hang. Second, the NILFS_I_COLLECTED flag set on normal inodes remain uncleared. As a result, if the next log write involves checkpoint creation, that's fine, but if a partial log write is performed that does not, inodes with NILFS_I_COLLECTED set are erroneously removed from the "sc_dirty_files" list, and their data and b-tree blocks may not be written to the device, corrupting the block mapping. Fix these issues by uniformly calling nilfs_segctor_abort_construction() on failure of each step in the loop in nilfs_segctor_do_construct(), having it clean up logs and segment usages according to progress, and correcting the conditions for calling nilfs_redirty_inodes() to ensure that the NILFS_I_COLLECTED flag is cleared. Link: https://lkml.kernel.org/r/20240814101119.4070-1-konishi.ryusuke@gmail.com Fixes: a694291a6211 ("nilfs2: separate wait function from nilfs_segctor_write") Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 5787fcaab9eb5930f5378d6a1dd03d916d146622 Author: Ryusuke Konishi Date: Sat Aug 10 15:52:42 2024 +0900 nilfs2: fix missing cleanup on rollforward recovery error In an error injection test of a routine for mount-time recovery, KASAN found a use-after-free bug. It turned out that if data recovery was performed using partial logs created by dsync writes, but an error occurred before starting the log writer to create a recovered checkpoint, the inodes whose data had been recovered were left in the ns_dirty_files list of the nilfs object and were not freed. Fix this issue by cleaning up inodes that have read the recovery data if the recovery routine fails midway before the log writer starts. Link: https://lkml.kernel.org/r/20240810065242.3701-1-konishi.ryusuke@gmail.com Fixes: 0f3e1c7f23f8 ("nilfs2: recovery functions") Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 683408258917541bdb294cd717c210a04381931e Author: Ryusuke Konishi Date: Sun Aug 11 19:03:20 2024 +0900 nilfs2: protect references to superblock parameters exposed in sysfs The superblock buffers of nilfs2 can not only be overwritten at runtime for modifications/repairs, but they are also regularly swapped, replaced during resizing, and even abandoned when degrading to one side due to backing device issues. So, accessing them requires mutual exclusion using the reader/writer semaphore "nilfs->ns_sem". Some sysfs attribute show methods read this superblock buffer without the necessary mutual exclusion, which can cause problems with pointer dereferencing and memory access, so fix it. Link: https://lkml.kernel.org/r/20240811100320.9913-1-konishi.ryusuke@gmail.com Fixes: da7141fb78db ("nilfs2: add /sys/fs/nilfs2/ group") Signed-off-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 4828d207dc5161dc7ddf9a4f6dcfd80c7dd7d20a Author: Jann Horn Date: Tue Aug 13 22:25:22 2024 +0200 userfaultfd: don't BUG_ON() if khugepaged yanks our page table Since khugepaged was changed to allow retracting page tables in file mappings without holding the mmap lock, these BUG_ON()s are wrong - get rid of them. We could also remove the preceding "if (unlikely(...))" block, but then we could reach pte_offset_map_lock() with transhuge pages not just for file mappings but also for anonymous mappings - which would probably be fine but I think is not necessarily expected. Link: https://lkml.kernel.org/r/20240813-uffd-thp-flip-fix-v2-2-5efa61078a41@google.com Fixes: 1d65b771bc08 ("mm/khugepaged: retract_page_tables() without mmap or vma lock") Signed-off-by: Jann Horn Reviewed-by: Qi Zheng Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Pavel Emelyanov Cc: Signed-off-by: Andrew Morton commit 71c186efc1b2cf1aeabfeff3b9bd5ac4c5ac14d8 Author: Jann Horn Date: Tue Aug 13 22:25:21 2024 +0200 userfaultfd: fix checks for huge PMDs Patch series "userfaultfd: fix races around pmd_trans_huge() check", v2. The pmd_trans_huge() code in mfill_atomic() is wrong in three different ways depending on kernel version: 1. The pmd_trans_huge() check is racy and can lead to a BUG_ON() (if you hit the right two race windows) - I've tested this in a kernel build with some extra mdelay() calls. See the commit message for a description of the race scenario. On older kernels (before 6.5), I think the same bug can even theoretically lead to accessing transhuge page contents as a page table if you hit the right 5 narrow race windows (I haven't tested this case). 2. As pointed out by Qi Zheng, pmd_trans_huge() is not sufficient for detecting PMDs that don't point to page tables. On older kernels (before 6.5), you'd just have to win a single fairly wide race to hit this. I've tested this on 6.1 stable by racing migration (with a mdelay() patched into try_to_migrate()) against UFFDIO_ZEROPAGE - on my x86 VM, that causes a kernel oops in ptlock_ptr(). 3. On newer kernels (>=6.5), for shmem mappings, khugepaged is allowed to yank page tables out from under us (though I haven't tested that), so I think the BUG_ON() checks in mfill_atomic() are just wrong. I decided to write two separate fixes for these (one fix for bugs 1+2, one fix for bug 3), so that the first fix can be backported to kernels affected by bugs 1+2. This patch (of 2): This fixes two issues. I discovered that the following race can occur: mfill_atomic other thread ============ ============ pmdp_get_lockless() [reads none pmd] __pte_alloc [no-op] BUG_ON(pmd_none(*dst_pmd)) I have experimentally verified this in a kernel with extra mdelay() calls; the BUG_ON(pmd_none(*dst_pmd)) triggers. On kernels newer than commit 0d940a9b270b ("mm/pgtable: allow pte_offset_map[_lock]() to fail"), this can't lead to anything worse than a BUG_ON(), since the page table access helpers are actually designed to deal with page tables concurrently disappearing; but on older kernels (<=6.4), I think we could probably theoretically race past the two BUG_ON() checks and end up treating a hugepage as a page table. The second issue is that, as Qi Zheng pointed out, there are other types of huge PMDs that pmd_trans_huge() can't catch: devmap PMDs and swap PMDs (in particular, migration PMDs). On <=6.4, this is worse than the first issue: If mfill_atomic() runs on a PMD that contains a migration entry (which just requires winning a single, fairly wide race), it will pass the PMD to pte_offset_map_lock(), which assumes that the PMD points to a page table. Breakage follows: First, the kernel tries to take the PTE lock (which will crash or maybe worse if there is no "struct page" for the address bits in the migration entry PMD - I think at least on X86 there usually is no corresponding "struct page" thanks to the PTE inversion mitigation, amd64 looks different). If that didn't crash, the kernel would next try to write a PTE into what it wrongly thinks is a page table. As part of fixing these issues, get rid of the check for pmd_trans_huge() before __pte_alloc() - that's redundant, we're going to have to check for that after the __pte_alloc() anyway. Backport note: pmdp_get_lockless() is pmd_read_atomic() in older kernels. Link: https://lkml.kernel.org/r/20240813-uffd-thp-flip-fix-v2-0-5efa61078a41@google.com Link: https://lkml.kernel.org/r/20240813-uffd-thp-flip-fix-v2-1-5efa61078a41@google.com Fixes: c1a4de99fada ("userfaultfd: mcopy_atomic|mfill_zeropage: UFFDIO_COPY|UFFDIO_ZEROPAGE preparation") Signed-off-by: Jann Horn Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jann Horn Cc: Pavel Emelyanov Cc: Qi Zheng Cc: Signed-off-by: Andrew Morton commit 3e3de7947c751509027d26b679ecd243bc9db255 Author: Will Deacon Date: Mon Aug 12 18:16:06 2024 +0100 mm: vmalloc: ensure vmap_block is initialised before adding to queue Commit 8c61291fd850 ("mm: fix incorrect vbq reference in purge_fragmented_block") extended the 'vmap_block' structure to contain a 'cpu' field which is set at allocation time to the id of the initialising CPU. When a new 'vmap_block' is being instantiated by new_vmap_block(), the partially initialised structure is added to the local 'vmap_block_queue' xarray before the 'cpu' field has been initialised. If another CPU is concurrently walking the xarray (e.g. via vm_unmap_aliases()), then it may perform an out-of-bounds access to the remote queue thanks to an uninitialised index. This has been observed as UBSAN errors in Android: | Internal error: UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP | | Call trace: | purge_fragmented_block+0x204/0x21c | _vm_unmap_aliases+0x170/0x378 | vm_unmap_aliases+0x1c/0x28 | change_memory_common+0x1dc/0x26c | set_memory_ro+0x18/0x24 | module_enable_ro+0x98/0x238 | do_init_module+0x1b0/0x310 Move the initialisation of 'vb->cpu' in new_vmap_block() ahead of the addition to the xarray. Link: https://lkml.kernel.org/r/20240812171606.17486-1-will@kernel.org Fixes: 8c61291fd850 ("mm: fix incorrect vbq reference in purge_fragmented_block") Signed-off-by: Will Deacon Reviewed-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Cc: Zhaoyang Huang Cc: Hailong.Liu Cc: Christoph Hellwig Cc: Lorenzo Stoakes Cc: Thomas Gleixner Cc: Signed-off-by: Andrew Morton commit b808f629215685c1941b1cd567c7b7ccb3c90278 Author: Muhammad Usama Anjum Date: Fri Aug 9 13:25:11 2024 +0500 selftests: mm: fix build errors on armhf The __NR_mmap isn't found on armhf. The mmap() is commonly available system call and its wrapper is present on all architectures. So it should be used directly. It solves problem for armhf and doesn't create problem for other architectures. Remove sys_mmap() functions as they aren't doing anything else other than calling mmap(). There is no need to set errno = 0 manually as glibc always resets it. For reference errors are as following: CC seal_elf seal_elf.c: In function 'sys_mmap': seal_elf.c:39:33: error: '__NR_mmap' undeclared (first use in this function) 39 | sret = (void *) syscall(__NR_mmap, addr, len, prot, | ^~~~~~~~~ mseal_test.c: In function 'sys_mmap': mseal_test.c:90:33: error: '__NR_mmap' undeclared (first use in this function) 90 | sret = (void *) syscall(__NR_mmap, addr, len, prot, | ^~~~~~~~~ Link: https://lkml.kernel.org/r/20240809082511.497266-1-usama.anjum@collabora.com Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing") Signed-off-by: Muhammad Usama Anjum Cc: Jeff Xu Cc: Kees Cook Cc: Liam R. Howlett Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton commit c9f016e72b5cc7d4d68fac51f8e72c8c7a69c06e Merge: 3df9427f351a9 a547a5880cba6 Author: Linus Torvalds Date: Sun Sep 1 14:43:08 2024 -0700 Merge tag 'x86-urgent-2024-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: - x2apic_disable() clears x2apic_state and x2apic_mode unconditionally, even when the state is X2APIC_ON_LOCKED, which prevents the kernel to disable it thereby creating inconsistent state. Reorder the logic so it actually works correctly - The XSTATE logic for handling LBR is incorrect as it assumes that XSAVES supports LBR when the CPU supports LBR. In fact both conditions need to be true. Otherwise the enablement of LBR in the IA32_XSS MSR fails and subsequently the machine crashes on the next XRSTORS operation because IA32_XSS is not initialized. Cache the XSTATE support bit during init and make the related functions use this cached information and the LBR CPU feature bit to cure this. - Cure a long standing bug in KASLR KASLR uses the full address space between PAGE_OFFSET and vaddr_end to randomize the starting points of the direct map, vmalloc and vmemmap regions. It thereby limits the size of the direct map by using the installed memory size plus an extra configurable margin for hot-plug memory. This limitation is done to gain more randomization space because otherwise only the holes between the direct map, vmalloc, vmemmap and vaddr_end would be usable for randomizing. The limited direct map size is not exposed to the rest of the kernel, so the memory hot-plug and resource management related code paths still operate under the assumption that the available address space can be determined with MAX_PHYSMEM_BITS. request_free_mem_region() allocates from (1 << MAX_PHYSMEM_BITS) - 1 downwards. That means the first allocation happens past the end of the direct map and if unlucky this address is in the vmalloc space, which causes high_memory to become greater than VMALLOC_START and consequently causes iounmap() to fail for valid ioremap addresses. Cure this by exposing the end of the direct map via PHYSMEM_END and use that for the memory hot-plug and resource management related places instead of relying on MAX_PHYSMEM_BITS. In the KASLR case PHYSMEM_END maps to a variable which is initialized by the KASLR initialization and otherwise it is based on MAX_PHYSMEM_BITS as before. - Prevent a data leak in mmio_read(). The TDVMCALL exposes the value of an initialized variabled on the stack to the VMM. The variable is only required as output value, so it does not have to exposed to the VMM in the first place. - Prevent an array overrun in the resource control code on systems with Sub-NUMA Clustering enabled because the code failed to adjust the index by the number of SNC nodes per L3 cache. * tag 'x86-urgent-2024-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Fix arch_mbm_* array overrun on SNC x86/tdx: Fix data leak in mmio_read() x86/kaslr: Expose and use the end of the physical memory address space x86/fpu: Avoid writing LBR bit to IA32_XSS unless supported x86/apic: Make x2apic_disable() work correctly commit 3df9427f351a9cb8aee0eea13d185f0d78340a70 Merge: 51859c5aa6daa 25dfc9e357af8 Author: Linus Torvalds Date: Sun Sep 1 14:33:31 2024 -0700 Merge tag 'perf-urgent-2024-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Thomas Gleixner: "A single fix for x86 performance monitoring. Haswell PMUs suffer from several errata and require a limit the minimal period for counter events, otherwise they suffer from endless loops in the PMU interrupt" * tag 'perf-urgent-2024-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Limit the period on Haswell commit 51859c5aa6daa96340a81a1ea2de1b48ccadccf1 Merge: 9a754292e88f8 d33d26036a027 Author: Linus Torvalds Date: Sun Sep 1 14:26:33 2024 -0700 Merge tag 'locking-urgent-2024-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "A single fix for rt_mutex. The deadlock detection code drops into an infinite scheduling loop while still holding rt_mutex::wait_lock, which rightfully triggers a 'scheduling in atomic' warning. Unlock it before that" * tag 'locking-urgent-2024-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtmutex: Drop rt_mutex::wait_lock before scheduling commit 9a754292e88f81acaf26cc5e0cec56b3276029de Merge: 431c1646e1f86 880799fc7a3a1 Author: Linus Torvalds Date: Sun Sep 1 14:19:00 2024 -0700 Merge tag 'irq-urgent-2024-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A set of fixes for interrupt chip drivers: - Unbreak the PLIC driver for Allwinner D1 systems The recent conversion of the PLIC driver to a platform driver broke Allwinnder D1 systems due to the deferred probing of platform drivers. Due to that the only timer available on D1 systems cannot get an interrupt, which causes the system to hang at boot. Other RISCV platforms are not affected because they provide the architected SBI timer which uses the built in core interrupt controller. Cure this by probing PLIC early on D1 systems - Cure a regression in ARM/GIC-V3 on 32-bit ARM systems caused by the recent addition of a initialization function, which accesses system registers before they are enabled. On 64-bit ARM they are enabled prior to that by sheer luck. Ensure they are enabled. - Cure a use before check problem in the MSI library. The existing NULL pointer check is too late. - Cure a lock order inversion in the ARM/GIC-V4 driver - Fix a IS_ERR() vs. NULL pointer check issue in the RISCV APLIC driver - Plug a reference count leak in the ARM/GIC-V2 driver" * tag 'irq-urgent-2024-08-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-msi-lib: Check for NULL ops in msi_lib_irq_domain_select() irqchip/gic-v3: Init SRE before poking sysregs irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init() irqchip/riscv-aplic: Fix an IS_ERR() vs NULL bug in probe() irqchip/gic-v4: Fix ordering between vmapp and vpe locks irqchip/sifive-plic: Probe plic driver early for Allwinner D1 platform commit 7f12a963b65872fda1219f065c1cc1b1b9a806e8 Author: Kent Overstreet Date: Sun Sep 1 15:53:03 2024 -0400 bcachefs: fix rebalance accounting Fixes: 49aa7830396b ("bcachefs: Fix rebalance_work accounting") Signed-off-by: Kent Overstreet commit 9b0874286768d7f380b08e4f1fa9b96c526b0bad Merge: fe1910f9337bd f962e8361adfa Author: David S. Miller Date: Sun Sep 1 18:14:02 2024 +0100 Merge branch 'mctp-serial-tx-escapes' Matt Johnston says: ==================== net: mctp-serial: Fix for missing tx escapes The mctp-serial code to add escape characters was incorrect due to an off-by-one error. This series adds a test for the chunking which splits by escape characters, and fixes the bug. v2: Fix kunit param const pointer ==================== Signed-off-by: David S. Miller commit f962e8361adfa84e8252d3fc3e5e6bb879f029b1 Author: Matt Johnston Date: Thu Aug 29 15:43:46 2024 +0800 net: mctp-serial: Fix missing escapes on transmit 0x7d and 0x7e bytes are meant to be escaped in the data portion of frames, but this didn't occur since next_chunk_len() had an off-by-one error. That also resulted in the final byte of a payload being written as a separate tty write op. The chunk prior to an escaped byte would be one byte short, and the next call would never test the txpos+1 case, which is where the escaped byte was located. That meant it never hit the escaping case in mctp_serial_tx_work(). Example Input: 01 00 08 c8 7e 80 02 Previous incorrect chunks from next_chunk_len(): 01 00 08 c8 7e 80 02 With this fix: 01 00 08 c8 7e 80 02 Cc: stable@vger.kernel.org Fixes: a0c2ccd9b5ad ("mctp: Add MCTP-over-serial transport binding") Signed-off-by: Matt Johnston Signed-off-by: David S. Miller commit 4fa9c5181cfe083d0beefb5157a643560e7bd152 Author: Matt Johnston Date: Thu Aug 29 15:43:45 2024 +0800 net: mctp-serial: Add kunit test for next_chunk_len() Test various edge cases of inputs that contain characters that need escaping. This adds a new kunit suite for mctp-serial. Signed-off-by: Matt Johnston Signed-off-by: David S. Miller commit 6a422a96bc84cf9b9f0ff741f293a1f9059e0883 Author: Pawel Dembicki Date: Fri Aug 30 13:13:50 2024 +0200 hwmon: ltc2991: fix register bits defines In the LTC2991, V5 and V6 channels use the low nibble of the "V5, V6, V7, and V8 Control Register" for configuration, but currently, the high nibble is defined. This patch changes the defines to use the low nibble. Fixes: 2b9ea4262ae9 ("hwmon: Add driver for ltc2991") Signed-off-by: Pawel Dembicki Message-ID: <20240830111349.30531-1-paweldembicki@gmail.com> Signed-off-by: Guenter Roeck commit 72a6e22c604c95ddb3b10b5d3bb85b6ff4dbc34f Author: Baokun Li Date: Mon Aug 26 19:20:56 2024 +0800 fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF The fscache_cookie_lru_timer is initialized when the fscache module is inserted, but is not deleted when the fscache module is removed. If timer_reduce() is called before removing the fscache module, the fscache_cookie_lru_timer will be added to the timer list of the current cpu. Afterwards, a use-after-free will be triggered in the softIRQ after removing the fscache module, as follows: ================================================================== BUG: unable to handle page fault for address: fffffbfff803c9e9 PF: supervisor read access in kernel mode PF: error_code(0x0000) - not-present page PGD 21ffea067 P4D 21ffea067 PUD 21ffe6067 PMD 110a7c067 PTE 0 Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G W 6.11.0-rc3 #855 Tainted: [W]=WARN RIP: 0010:__run_timer_base.part.0+0x254/0x8a0 Call Trace: tmigr_handle_remote_up+0x627/0x810 __walk_groups.isra.0+0x47/0x140 tmigr_handle_remote+0x1fa/0x2f0 handle_softirqs+0x180/0x590 irq_exit_rcu+0x84/0xb0 sysvec_apic_timer_interrupt+0x6e/0x90 asm_sysvec_apic_timer_interrupt+0x1a/0x20 RIP: 0010:default_idle+0xf/0x20 default_idle_call+0x38/0x60 do_idle+0x2b5/0x300 cpu_startup_entry+0x54/0x60 start_secondary+0x20d/0x280 common_startup_64+0x13e/0x148 Modules linked in: [last unloaded: netfs] ================================================================== Therefore delete fscache_cookie_lru_timer when removing the fscahe module. Fixes: 12bb21a29c19 ("fscache: Implement cookie user counting and resource pinning") Cc: stable@kernel.org Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20240826112056.2458299-1-libaokun@huaweicloud.com Acked-by: David Howells Signed-off-by: Christian Brauner commit 431c1646e1f86b949fa3685efc50b660a364c2b6 Author: Linus Torvalds Date: Sun Sep 1 19:46:02 2024 +1200 Linux 6.11-rc6 commit 6b9ffc4595ab936b10834167037acb992ebac34a Merge: a4c763129fbcc 91d1dfae46498 Author: Linus Torvalds Date: Sun Sep 1 15:49:26 2024 +1200 Merge tag 'v6.11-rc5-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - copy_file_range fix - two read fixes including read past end of file rc fix and read retry crediting fix - falloc zero range fix * tag 'v6.11-rc5-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target region cifs: Fix copy offload to flush destination region netfs, cifs: Fix handling of short DIO read cifs: Fix lack of credit renegotiation on read retry commit a4c763129fbcc7da5d3134ea95f9577f25bc637d Merge: 6cd90e5ea72f3 3d3020c461936 Author: Linus Torvalds Date: Sun Sep 1 15:23:20 2024 +1200 Merge tag 'bcachefs-2024-08-21' of https://github.com/koverstreet/bcachefs Push bcachefs fixes from Kent Overstreet: "The data corruption in the buffered write path is troubling; inode lock should not have been able to cause that... - Fix a rare data corruption in the rebalance path, caught as a nonce inconsistency on encrypted filesystems - Revert lockless buffered write path - Mark more errors as autofix" * tag 'bcachefs-2024-08-21' of https://github.com/koverstreet/bcachefs: bcachefs: Mark more errors as autofix bcachefs: Revert lockless buffered IO path bcachefs: Fix bch2_extents_match() false positive bcachefs: Fix failure to return error in data_update_index_update() commit b686ecdeacf6658e1348c1a32a08e2e72f7c0f00 Author: Samuel Holland Date: Wed Aug 14 17:57:03 2024 -0700 riscv: misaligned: Restrict user access to kernel memory raw_copy_{to,from}_user() do not call access_ok(), so this code allowed userspace to access any virtual memory address. Cc: stable@vger.kernel.org Fixes: 7c83232161f6 ("riscv: add support for misaligned trap handling in S-mode") Fixes: 441381506ba7 ("riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code") Signed-off-by: Samuel Holland Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240815005714.1163136-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 3d3020c461936009dc58702e267ff67b0076cbf2 Author: Kent Overstreet Date: Thu Aug 22 11:47:32 2024 -0400 bcachefs: Mark more errors as autofix errors that are known to always be safe to fix should be autofix: this should be most errors even at this point, but that will need some thorough review. note that errors are still logged in the superblock, so we'll still know that they happened. Signed-off-by: Kent Overstreet commit e3e6940940910c2287fe962bdf72015efd4fee81 Author: Kent Overstreet Date: Sat Aug 31 17:44:51 2024 -0400 bcachefs: Revert lockless buffered IO path We had a report of data corruption on nixos when building installer images. https://github.com/NixOS/nixpkgs/pull/321055#issuecomment-2184131334 It seems that writes are being dropped, but only when issued by QEMU, and possibly only in snapshot mode. It's undetermined if it's write calls are being dropped or dirty folios. Further testing, via minimizing the original patch to just the change that skips the inode lock on non appends/truncates, reveals that it really is just not taking the inode lock that causes the corruption: it has nothing to do with the other logic changes for preserving write atomicity in corner cases. It's also kernel config dependent: it doesn't reproduce with the minimal kernel config that ktest uses, but it does reproduce with nixos's distro config. Bisection the kernel config initially pointer the finger at page migration or compaction, but it appears that was erroneous; we haven't yet determined what kernel config option actually triggers it. Sadly it appears this will have to be reverted since we're getting too close to release and my plate is full, but we'd _really_ like to fully debug it. My suspicion is that this patch is exposing a preexisting bug - the inode lock actually covers very little in IO paths, and we have a different lock (the pagecache add lock) that guards against races with truncate here. Fixes: 7e64c86cdc6c ("bcachefs: Buffered write path now can avoid the inode lock") Signed-off-by: Kent Overstreet commit 6cd90e5ea72f35fa40f971c419e16142cd8272bf Merge: 8463be84486c1 98c0cc48e27e9 Author: Linus Torvalds Date: Sun Sep 1 09:18:48 2024 +1200 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull misc fixes from Guenter Roeck. These are fixes for regressions that Guenther has been reporting, and the maintainers haven't picked up and sent in. With rc6 fairly imminent, I'm taking them directly from Guenter. * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: apparmor: fix policy_unpack_test on big endian systems Revert "MIPS: csrc-r4k: Apply verification clocksource flags" microblaze: don't treat zero reserved memory regions as error commit 8463be84486c19221198a76436d9177f395bb2eb Merge: e8784b0aef62c d8b762070c3fd Author: Linus Torvalds Date: Sun Sep 1 09:07:44 2024 +1200 Merge tag 'pwrseq-fixes-for-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull power sequencing fix from Bartosz Golaszewski: "A follow-up fix for the power sequencing subsystem. It turned out the previous fix for this driver was incomplete and broke the WLAN support on some platforms. This addresses the issue. - set the direction of the wlan-enable GPIO to output after requesting it as-is" * tag 'pwrseq-fixes-for-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: power: sequencing: qcom-wcn: set the wlan-enable GPIO to output commit d8b762070c3fde224f8b9ea3cf59bc41a5a3eb57 Author: Bartosz Golaszewski Date: Fri Aug 23 13:55:00 2024 +0200 power: sequencing: qcom-wcn: set the wlan-enable GPIO to output Commit a9aaf1ff88a8 ("power: sequencing: request the WLAN enable GPIO as-is") broke WLAN on boards on which the wlan-enable GPIO enabling the wifi module isn't in output mode by default. We need to set direction to output while retaining the value that was already set to keep the ath module on if it's already started. Fixes: a9aaf1ff88a8 ("power: sequencing: request the WLAN enable GPIO as-is") Link: https://lore.kernel.org/r/20240823115500.37280-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit e8784b0aef62cd6117e1c93c64d060e4c7314a1f Merge: 770b0ffe28b4f 58c2fa54257d6 Author: Linus Torvalds Date: Sun Sep 1 07:06:28 2024 +1200 Merge tag 'usb-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 6.11-rc6. Included in here are: - dwc3 driver fixes for reported issues - MAINTAINER file update, marking a driver as unsupported :( - cdnsp driver fixes - USB gadget driver fix - USB sysfs fix - other tiny fixes - new device ids for usb serial driver All of these have been in linux-next this week with no reported issues" * tag 'usb-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: option: add MeiG Smart SRM825L usb: cdnsp: fix for Link TRB with TC usb: dwc3: st: add missing depopulate in probe error path usb: dwc3: st: fix probed platform device ref count on probe error path usb: dwc3: ep0: Don't reset resource alloc flag (including ep0) usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() usb: typec: fsa4480: Relax CHIP_ID check usb: dwc3: xilinx: add missing depopulate in probe error path usb: dwc3: omap: add missing depopulate in probe error path dt-bindings: usb: microchip,usb2514: Fix reference USB device schema usb: gadget: uvc: queue pump work in uvcg_video_enable() cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function usb: dwc3: core: Prevent USB core invalid event buffer address access MAINTAINERS: Mark UVC gadget driver as orphan commit 770b0ffe28b4f1a18a90e9093148b8a74bdfdd84 Merge: 6a2fcc51a7a1e 4f9eedfa27ae5 Author: Linus Torvalds Date: Sun Sep 1 07:00:38 2024 +1200 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Minor fixes only. The sd.c one ignores a sync cache request if format is in progress which can happen if formatting a drive across suspend/resume" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Ignore command SYNCHRONIZE CACHE error if format in progress scsi: aacraid: Fix double-free on probe failure scsi: lpfc: Fix overflow build issue commit 6a2fcc51a7a1e92984350e7dd94122db5b8927f2 Merge: 0efdc097965bc 40927f3d0972b Author: Linus Torvalds Date: Sun Sep 1 06:55:47 2024 +1200 Merge tag 'nfsd-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - One more write delegation fix * tag 'nfsd-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: fix nfsd4_deleg_getattr_conflict in presence of third party lease commit 0efdc097965bcf60d1db62f100ef544714714e88 Merge: 35667a2969d80 a24cae8fc1f13 Author: Linus Torvalds Date: Sun Sep 1 06:48:37 2024 +1200 Merge tag 'xfs-6.11-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Chandan Babu: - Do not call out v1 inodes with non-zero di_nlink field as being corrupt - Change xfs_finobt_count_blocks() to count "free inode btree" blocks rather than "inode btree" blocks - Don't report the number of trimmed bytes via FITRIM because the underlying storage isn't required to do anything and failed discard IOs aren't reported to the caller anyway - Fix incorrect setting of rm_owner field in an rmap query - Report missing disk offset range in an fsmap query - Obtain m_growlock when extending realtime section of the filesystem - Reset rootdir extent size hint after extending realtime section of the filesystem * tag 'xfs-6.11-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: reset rootdir extent size hint after growfsrt xfs: take m_growlock when running growfsrt xfs: Fix missing interval for missing_owner in xfs fsmap xfs: use XFS_BUF_DADDR_NULL for daddrs in getfsmap code xfs: Fix the owner setting issue for rmap query in xfs fsmap xfs: don't bother reporting blocks trimmed via FITRIM xfs: xfs_finobt_count_blocks() walks the wrong btree xfs: fix folio dirtying for XFILE_ALLOC callers xfs: fix di_onlink checking for V1/V2 inodes commit 35667a2969d80a08b1df4066cbf282fc5d875cc4 Merge: 1934261d89746 9cc7b1705141d Author: Linus Torvalds Date: Sun Sep 1 06:42:13 2024 +1200 Merge tag 'arm-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "There is a fairly large number of bug fixes for Qualcomm platforms, most of them addressing issues with the devicetree files for the newly added Snapdragon X1 based laptops to make them more reliable. The Qualcomm driver changes address a few build-time issues as well as runtime problems in the tzmem and scm firmware, the USB Type-C driver, and the cmd-db and pmic_glink soc drivers. The NXP i.MX usually gets a bunch of devicetree fixes that is proportional to the number of supported machines. This includes both warning fixes and correctness for the 64-bit i.MX9, i.MX8 and layerscape platforms, as well as a single fix for a 32-bit i.MX6 based board. The other changes are the usual minor changes, including an update to the MAINTAINERS file, an omap3 dts file and a SoC driver for mpfs (risc-v)" * tag 'arm-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (50 commits) firmware: microchip: fix incorrect error report of programming:timeout on success soc: qcom: pd-mapper: Fix singleton refcount firmware: qcom: tzmem: disable sdm670 platform soc: qcom: pmic_glink: Actually communicate when remote goes down usb: typec: ucsi: Move unregister out of atomic section soc: qcom: pmic_glink: Fix race during initialization firmware: qcom: qseecom: remove unused functions firmware: qcom: tzmem: fix virtual-to-physical address conversion firmware: qcom: scm: Mark get_wq_ctx() as atomic call arm64: dts: qcom: x1e80100: Fix Adreno SMMU global interrupt arm64: dts: qcom: disable GPU on x1e80100 by default arm64: dts: imx8mm-phygate: fix typo pinctrcl-0 arm64: dts: imx95: correct L3Cache cache-sets arm64: dts: imx95: correct a55 power-domains arm64: dts: freescale: imx93-tqma9352-mba93xxla: fix typo arm64: dts: freescale: imx93-tqma9352: fix CMA alloc-ranges ARM: dts: imx6dl-yapp43: Increase LED current to match the yapp4 HW design arm64: dts: imx93: update default value for snps,clk-csr arm64: dts: freescale: tqma9352: Fix watchdog reset arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962 ... commit 1934261d897467a924e2afd1181a74c1cbfa2c1d Merge: 8101b2766d5bf c472d33bcbf7a Author: Linus Torvalds Date: Sat Aug 31 15:32:38 2024 +1200 Merge tag 'input-for-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: - a fix for Cypress PS/2 touchpad for regression introduced in 6.11 merge window where a timeout condition is incorrectly reported for all extended Cypress commands * tag 'input-for-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cypress_ps2 - fix waiting for command response commit db213b0cfe3268d8b1d382b3bcc999c687a2567f Author: Dan Carpenter Date: Thu Aug 29 22:23:04 2024 +0300 firmware: qcom: uefisecapp: Fix deadlock in qcuefi_acquire() If the __qcuefi pointer is not set, then in the original code, we would hold onto the lock. That means that if we tried to set it later, then it would cause a deadlock. Drop the lock on the error path. That's what all the callers are expecting. Fixes: 759e7a2b62eb ("firmware: Add support for Qualcomm UEFI Secure Application") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/19829bc4-1b6f-47f7-847a-e90c25749e40@stanley.mountain Signed-off-by: Bjorn Andersson commit 8101b2766d5bfee43a4de737107b9592db251470 Merge: 216d163165a93 150b572a7c1df Author: Linus Torvalds Date: Sat Aug 31 14:54:11 2024 +1200 Merge tag 'pci-v6.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Add Manivannan Sadhasivam as PCI native host bridge and endpoint driver reviewer (Manivannan Sadhasivam) - Disable MHI RAM data parity error interrupt for qcom SA8775P SoC to work around hardware erratum that causes a constant stream of interrupts (Manivannan Sadhasivam) - Don't try to fall back to qcom Operating Performance Points (OPP) support unless the platform actually supports OPP (Manivannan Sadhasivam) - Add imx@lists.linux.dev mailing list to MAINTAINERS for NXP layerscape and imx6 PCI controller drivers (Frank Li) * tag 'pci-v6.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: PCI: Add NXP PCI controller mailing list imx@lists.linux.dev PCI: qcom: Use OPP only if the platform supports it PCI: qcom-ep: Disable MHI RAM data parity error interrupt for SA8775P SoC MAINTAINERS: Add Manivannan Sadhasivam as Reviewer for PCI native host bridge and endpoint drivers commit 216d163165a937ee9c1d0e9c26fe7a6f7d27ac4c Merge: ad246d9f04aa0 e33a97a830b23 Author: Linus Torvalds Date: Sat Aug 31 13:54:05 2024 +1200 Merge tag 'block-6.11-20240830' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "Fix for a single regression for WRITE_SAME introduced in the 6.11 merge window" * tag 'block-6.11-20240830' of git://git.kernel.dk/linux: block: fix detection of unsupported WRITE SAME in blkdev_issue_write_zeroes commit ad246d9f04aa037f8e8bbf8573c9af527114cead Merge: fb24560f31f9d f274495aea7b1 Author: Linus Torvalds Date: Sat Aug 31 13:51:27 2024 +1200 Merge tag 'io_uring-6.11-20240830' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - A fix for a regression that happened in 6.11 merge window, where the copying of iovecs for compat mode applications got broken for certain cases. - Fix for a bug introduced in 6.10, where if using recv/send bundles with classic provided buffers, the recv/send would fail to set the right iovec count. This caused 0 byte send/recv results. Found via code coverage testing and writing a test case to exercise it. * tag 'io_uring-6.11-20240830' of git://git.kernel.dk/linux: io_uring/kbuf: return correct iovec count from classic buffer peek io_uring/rsrc: ensure compat iovecs are copied correctly commit f33b9ab0495b7e3bb01bf6d76045f078e20ada65 Author: Dave Airlie Date: Wed Aug 28 12:37:19 2024 +1000 nouveau: fix the fwsec sb verification register. This aligns with what open gpu does, the 0x15 hex is just to trick you. Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240828023720.1596602-1-airlied@gmail.com commit 1e9683c9b6ca88cc9340cdca85edd6134c8cffe3 Author: Luiz Augusto von Dentz Date: Tue Aug 27 15:01:34 2024 -0400 Bluetooth: MGMT: Ignore keys being loaded with invalid type Due to 59b047bc98084f8af2c41483e4d68a5adf2fa7f7 there could be keys stored with the wrong address type so this attempt to detect it and ignore them instead of just failing to load all keys. Cc: stable@vger.kernel.org Link: https://github.com/bluez/bluez/issues/875 Fixes: 59b047bc9808 ("Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE") Signed-off-by: Luiz Augusto von Dentz commit 532f8bcd1c2c4e8112f62e1922fd1703bc0ffce0 Author: Luiz Augusto von Dentz Date: Tue Aug 27 14:37:22 2024 -0400 Revert "Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE" This reverts commit 59b047bc98084f8af2c41483e4d68a5adf2fa7f7 which breaks compatibility with commands like: bluetoothd[46328]: @ MGMT Command: Load.. (0x0013) plen 74 {0x0001} [hci0] Keys: 2 BR/EDR Address: C0:DC:DA:A5:E5:47 (Samsung Electronics Co.,Ltd) Key type: Authenticated key from P-256 (0x03) Central: 0x00 Encryption size: 16 Diversifier[2]: 0000 Randomizer[8]: 0000000000000000 Key[16]: 6ed96089bd9765be2f2c971b0b95f624 LE Address: D7:2A:DE:1E:73:A2 (Static) Key type: Unauthenticated key from P-256 (0x02) Central: 0x00 Encryption size: 16 Diversifier[2]: 0000 Randomizer[8]: 0000000000000000 Key[16]: 87dd2546ededda380ffcdc0a8faa4597 @ MGMT Event: Command Status (0x0002) plen 3 {0x0001} [hci0] Load Long Term Keys (0x0013) Status: Invalid Parameters (0x0d) Cc: stable@vger.kernel.org Link: https://github.com/bluez/bluez/issues/875 Fixes: 59b047bc9808 ("Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE") Signed-off-by: Luiz Augusto von Dentz commit 227a0cdf4a028a73dc256d0f5144b4808d718893 Author: Luiz Augusto von Dentz Date: Mon Aug 26 16:14:04 2024 -0400 Bluetooth: MGMT: Fix not generating command complete for MGMT_OP_DISCONNECT MGMT_OP_DISCONNECT can be called while mgmt_device_connected has not been called yet, which will cause the connection procedure to be aborted, so mgmt_device_disconnected shall still respond with command complete to MGMT_OP_DISCONNECT and just not emit MGMT_EV_DEVICE_DISCONNECTED since MGMT_EV_DEVICE_CONNECTED was never sent. To fix this MGMT_OP_DISCONNECT is changed to work similarly to other command which do use hci_cmd_sync_queue and then use hci_conn_abort to disconnect and returns the result, in order for hci_conn_abort to be used from hci_cmd_sync context it now uses hci_cmd_sync_run_once. Link: https://github.com/bluez/bluez/issues/932 Fixes: 12d4a3b2ccb3 ("Bluetooth: Move check for MGMT_CONNECTED flag into mgmt.c") Signed-off-by: Luiz Augusto von Dentz commit c898f6d7b093bd71e66569cd6797c87d4056f44b Author: Luiz Augusto von Dentz Date: Mon Aug 26 15:47:30 2024 -0400 Bluetooth: hci_sync: Introduce hci_cmd_sync_run/hci_cmd_sync_run_once This introduces hci_cmd_sync_run/hci_cmd_sync_run_once which acts like hci_cmd_sync_queue/hci_cmd_sync_queue_once but runs immediately when already on hdev->cmd_sync_work context. Signed-off-by: Luiz Augusto von Dentz commit 8ae22de9d2eae3c432de64bf2b3a5a69cf1d1124 Author: Douglas Anderson Date: Wed Aug 21 15:43:40 2024 -0700 Bluetooth: qca: If memdump doesn't work, re-enable IBS On systems in the field, we are seeing this sometimes in the kernel logs: Bluetooth: qca_controller_memdump() hci0: hci_devcd_init Return:-95 This means that _something_ decided that it wanted to get a memdump but then hci_devcd_init() returned -EOPNOTSUPP (AKA -95). The cleanup code in qca_controller_memdump() when we get back an error from hci_devcd_init() undoes most things but forgets to clear QCA_IBS_DISABLED. One side effect of this is that, during the next suspend, qca_suspend() will always get a timeout. Let's fix it so that we clear the bit. Fixes: 06d3fdfcdf5c ("Bluetooth: hci_qca: Add qcom devcoredump support") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Signed-off-by: Luiz Augusto von Dentz commit dd885d90c047dbdd2773c1d33954cbd8747d81e2 Author: Martin Jocic Date: Fri Aug 30 17:31:13 2024 +0200 can: kvaser_pciefd: Use a single write when releasing RX buffers Kvaser's PCIe cards uses the KCAN FPGA IP block which has dual 4K buffers for incoming messages shared by all (currently up to eight) channels. While the driver processes messages in one buffer, new incoming messages are stored in the other and so on. The design of KCAN is such that a buffer must be fully read and then released. Releasing a buffer will make the FPGA switch buffers. If the other buffer contains at least one incoming message the FPGA will also instantly issue a new interrupt, if not the interrupt will be issued after receiving the first new message. With IRQx interrupts, it takes a little time for the interrupt to happen, enough for any previous ISR call to do it's business and return, but MSI interrupts are way faster so this time is reduced to almost nothing. So with MSI, releasing the buffer HAS to be the very last action of the ISR before returning, otherwise the new interrupt might be "masked" by the kernel because the previous ISR call hasn't returned. And the interrupts are edge-triggered so we cannot loose one, or the ping-pong reading process will stop. This is why this patch modifies the driver to use a single write to the SRB_CMD register before returning. Signed-off-by: Martin Jocic Reviewed-by: Vincent Mailhol Link: https://patch.msgid.link/20240830153113.2081440-1-martin.jocic@kvaser.com Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Marc Kleine-Budde commit 9cc7b1705141d1a077493dc107ed626e8dc84681 Merge: 3536c01d6577c e9408fa234fb2 Author: Arnd Bergmann Date: Fri Aug 30 19:52:28 2024 +0000 Merge tag 'at91-fixes-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes Microchip AT91 fixes for v6.11 It contains: - DTS directory update to match all entries not only those starting with at91 or sama commit fb24560f31f9dff2c97707cfed6029bfebebaf1c Merge: fb1a804535adf 76a0e79bc84f4 Author: Linus Torvalds Date: Sat Aug 31 06:33:59 2024 +1200 Merge tag 'lsm-pr-20240830' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm fix from Paul Moore: "One small patch to correct a NFS permissions problem with SELinux and Smack" * tag 'lsm-pr-20240830' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: selinux,smack: don't bypass permissions check in inode_setsecctx hook commit fb1a804535adf538532a2f6a27b1c7775efe5368 Merge: 922842a3bfbef 15d75184a86fd Author: Linus Torvalds Date: Sat Aug 31 06:25:34 2024 +1200 Merge tag 'pm-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix three issues in the amd-pstate cpufreq driver. Specifics: - Remove checks for highest performance match on preferred cores when updating preferred core ranking in amd-pstate (Mario Limonciello) - Make amd-pstate call topology_logical_package_id() instead of logical_die_id() to get a socked ID for a CPU (Gautham Shenoy) - Fix uninitialized variable in amd_pstate_cpu_boost_update() (Dan Carpenter)" * tag 'pm-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore cpufreq/amd-pstate: Use topology_logical_package_id() instead of logical_die_id() cpufreq: amd-pstate: Fix uninitialized variable in amd_pstate_cpu_boost_update() commit 922842a3bfbeff64dfebe7f01ce1f2ab01e4509d Merge: 32fafaf2ab185 9f646ff25c09c Author: Linus Torvalds Date: Sat Aug 31 06:20:48 2024 +1200 Merge tag 'dmaengine-fix-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: - A bunch of dw driver changes to fix the src/dst addr width config - Omap driver fix for sglen initialization - stm32-dma3 driver lli_size init fix - dw edma driver fixes for watermark interrupts and unmasking STOP and ABORT interrupts * tag 'dmaengine-fix-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: dw-edma: Do not enable watermark interrupts for HDMA dmaengine: dw-edma: Fix unmasking STOP and ABORT interrupts for HDMA dmaengine: stm32-dma3: Set lli_size after allocation dmaengine: ti: omap-dma: Initialize sglen after allocation dmaengine: dw: Unify ret-val local variables naming dmaengine: dw: Simplify max-burst calculation procedure dmaengine: dw: Define encode_maxburst() above prepare_ctllo() callbacks dmaengine: dw: Simplify prepare CTL_LO methods dmaengine: dw: Add memory bus width verification dmaengine: dw: Add peripheral bus width verification commit 32fafaf2ab185d26337f79d3ae558b4cb2b4a5d4 Merge: 8d80c9903e3f6 5af9b304bc601 Author: Linus Torvalds Date: Sat Aug 31 06:18:07 2024 +1200 Merge tag 'phy-fixes-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - Qualcomm QMP X1E80100 PCIe Gen4 PHY initialisation fix - Freescale imx8mq tuning parameter name fix - Samsung exynos5 fir for error code in probe() - Xilinx Zynqmp SGMII linkup failure fix * tag 'phy-fixes-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: xilinx: phy-zynqmp: Fix SGMII linkup failure on resume phy: exynos5-usbdrd: fix error code in probe() phy: fsl-imx8mq-usb: fix tuning parameter name phy: qcom: qmp-pcie: Fix X1E80100 PCIe Gen4 PHY initialisation commit 8d80c9903e3f6f9a99e8fd4374c2cf0745d0b708 Merge: 13c6bba601ac2 ab8d66d132bc8 Author: Linus Torvalds Date: Sat Aug 31 06:15:02 2024 +1200 Merge tag 'soundwire-6.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire fix from Vinod Koul: - Single fix for non-continous port map programming * tag 'soundwire-6.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: stream: fix programming slave ports for non-continous port maps commit 13c6bba601ac2928e330e14e178c7ebfabb19392 Merge: 20371ba120635 51eeef9a482bc Author: Linus Torvalds Date: Sat Aug 31 06:11:34 2024 +1200 Merge tag 'iommu-fixes-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - Fix a device-stall problem in bad io-page-fault setups (faults received from devices with no supporting domain attached). - Context flush fix for Intel VT-d. - Do not allow non-read+non-write mapping through iommufd as most implementations can not handle that. - Fix a possible infinite-loop issue in map_pages() path. - Add Jean-Philippe as reviewer for SMMUv3 SVA support * tag 'iommu-fixes-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: MAINTAINERS: Add Jean-Philippe as SMMUv3 SVA reviewer iommu: Do not return 0 from map_pages if it doesn't do anything iommufd: Do not allow creating areas without READ or WRITE iommu/vt-d: Fix incorrect domain ID in context flush helper iommu: Handle iommu faults for a bad iopf setup commit fe1910f9337bd46a9343967b547ccab26b4b2c6e Author: Cong Wang Date: Tue Aug 20 20:07:44 2024 -0700 tcp_bpf: fix return value of tcp_bpf_sendmsg() When we cork messages in psock->cork, the last message triggers the flushing will result in sending a sk_msg larger than the current message size. In this case, in tcp_bpf_send_verdict(), 'copied' becomes negative at least in the following case: 468 case __SK_DROP: 469 default: 470 sk_msg_free_partial(sk, msg, tosend); 471 sk_msg_apply_bytes(psock, tosend); 472 *copied -= (tosend + delta); // <==== HERE 473 return -EACCES; Therefore, it could lead to the following BUG with a proper value of 'copied' (thanks to syzbot). We should not use negative 'copied' as a return value here. ------------[ cut here ]------------ kernel BUG at net/socket.c:733! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 0 UID: 0 PID: 3265 Comm: syz-executor510 Not tainted 6.11.0-rc3-syzkaller-00060-gd07b43284ab3 #0 Hardware name: linux,dummy-virt (DT) pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : sock_sendmsg_nosec net/socket.c:733 [inline] pc : sock_sendmsg_nosec net/socket.c:728 [inline] pc : __sock_sendmsg+0x5c/0x60 net/socket.c:745 lr : sock_sendmsg_nosec net/socket.c:730 [inline] lr : __sock_sendmsg+0x54/0x60 net/socket.c:745 sp : ffff800088ea3b30 x29: ffff800088ea3b30 x28: fbf00000062bc900 x27: 0000000000000000 x26: ffff800088ea3bc0 x25: ffff800088ea3bc0 x24: 0000000000000000 x23: f9f00000048dc000 x22: 0000000000000000 x21: ffff800088ea3d90 x20: f9f00000048dc000 x19: ffff800088ea3d90 x18: 0000000000000001 x17: 0000000000000000 x16: 0000000000000000 x15: 000000002002ffaf x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: ffff8000815849c0 x9 : ffff8000815b49c0 x8 : 0000000000000000 x7 : 000000000000003f x6 : 0000000000000000 x5 : 00000000000007e0 x4 : fff07ffffd239000 x3 : fbf00000062bc900 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 00000000fffffdef Call trace: sock_sendmsg_nosec net/socket.c:733 [inline] __sock_sendmsg+0x5c/0x60 net/socket.c:745 ____sys_sendmsg+0x274/0x2ac net/socket.c:2597 ___sys_sendmsg+0xac/0x100 net/socket.c:2651 __sys_sendmsg+0x84/0xe0 net/socket.c:2680 __do_sys_sendmsg net/socket.c:2689 [inline] __se_sys_sendmsg net/socket.c:2687 [inline] __arm64_sys_sendmsg+0x24/0x30 net/socket.c:2687 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x48/0x110 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:151 el0_svc+0x34/0xec arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:598 Code: f9404463 d63f0060 3108441f 54fffe81 (d4210000) ---[ end trace 0000000000000000 ]--- Fixes: 4f738adba30a ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data") Reported-by: syzbot+58c03971700330ce14d8@syzkaller.appspotmail.com Cc: Jakub Sitnicki Signed-off-by: Cong Wang Reviewed-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://patch.msgid.link/20240821030744.320934-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit 150b572a7c1df30f5d32d87ad96675200cca7b80 Author: Frank Li Date: Mon Aug 26 16:27:39 2024 -0400 MAINTAINERS: PCI: Add NXP PCI controller mailing list imx@lists.linux.dev Add imx mailing list imx@lists.linux.dev for PCI controller of NXP chips (Layerscape and iMX). Link: https://lore.kernel.org/r/20240826202740.970015-1-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Bjorn Helgaas Acked-by: Richard Zhu commit b408473ea01b2e499d23503e2bf898416da9d7ac Author: Martin KaFai Lau Date: Thu Aug 29 18:22:14 2024 -0700 bpf: Fix a crash when btf_parse_base() returns an error pointer The pointer returned by btf_parse_base could be an error pointer. IS_ERR() check is needed before calling btf_free(base_btf). Fixes: 8646db238997 ("libbpf,bpf: Share BTF relocate-related code with kernel") Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240830012214.1646005-1-martin.lau@linux.dev commit f274495aea7b15225b3d83837121b22ef96e560c Author: Jens Axboe Date: Fri Aug 30 10:45:54 2024 -0600 io_uring/kbuf: return correct iovec count from classic buffer peek io_provided_buffers_select() returns 0 to indicate success, but it should be returning 1 to indicate that 1 vec was mapped. This causes peeking to fail with classic provided buffers, and while that's not a use case that anyone should use, it should still work correctly. The end result is that no buffer will be selected, and hence a completion with '0' as the result will be posted, without a buffer attached. Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers") Signed-off-by: Jens Axboe commit 40927f3d0972bf86357a32a5749be71a551241b6 Author: NeilBrown Date: Thu Aug 29 09:06:28 2024 +1000 nfsd: fix nfsd4_deleg_getattr_conflict in presence of third party lease It is not safe to dereference fl->c.flc_owner without first confirming fl->fl_lmops is the expected manager. nfsd4_deleg_getattr_conflict() tests fl_lmops but largely ignores the result and assumes that flc_owner is an nfs4_delegation anyway. This is wrong. With this patch we restore the "!= &nfsd_lease_mng_ops" case to behave as it did before the change mentioned below. This is the same as the current code, but without any reference to a possible delegation. Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 1a5caec7f80ca2e659c03f45378ee26915f4eda2 Author: Douglas Anderson Date: Fri Aug 30 07:35:12 2024 -0700 regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR When adding devm_regulator_bulk_get_const() I missed adding a stub for when CONFIG_REGULATOR is not enabled. Under certain conditions (like randconfig testing) this can cause the compiler to reports errors like: error: implicit declaration of function 'devm_regulator_bulk_get_const'; did you mean 'devm_regulator_bulk_get_enable'? Add the stub. Fixes: 1de452a0edda ("regulator: core: Allow drivers to define their init data as const") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408301813.TesFuSbh-lkp@intel.com/ Cc: Neil Armstrong Signed-off-by: Douglas Anderson Link: https://patch.msgid.link/20240830073511.1.Ib733229a8a19fad8179213c05e1af01b51e42328@changeid Signed-off-by: Mark Brown commit 1c47c0d6014c832ad8e2ba04fc2c5b7070d999f7 Author: Jens Axboe Date: Wed Aug 28 09:42:33 2024 -0600 io_uring/rsrc: ensure compat iovecs are copied correctly For buffer registration (or updates), a userspace iovec is copied in and updated. If the application is within a compat syscall, then the iovec type is compat_iovec rather than iovec. However, the type used in __io_sqe_buffers_update() and io_sqe_buffers_register() is always struct iovec, and hence the source is incremented by the size of a non-compat iovec in the loop. This misses every other iovec in the source, and will run into garbage half way through the copies and return -EFAULT to the application. Maintain the source address separately and assign to our user vec pointer, so that copies always happen from the right source address. While in there, correct a bad placement of __user which triggered the following sparse warning prior to this fix: io_uring/rsrc.c:981:33: warning: cast removes address space '__user' of expression io_uring/rsrc.c:981:30: warning: incorrect type in assignment (different address spaces) io_uring/rsrc.c:981:30: expected struct iovec const [noderef] __user *uvec io_uring/rsrc.c:981:30: got struct iovec *[noderef] __user Fixes: f4eaf8eda89e ("io_uring/rsrc: Drop io_copy_iov in favor of iovec API") Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Jens Axboe commit 58c2fa54257d640c83137b44e12c174fd660a485 Merge: 740f2e2791b98 9a471de516c35 Author: Greg Kroah-Hartman Date: Fri Aug 30 15:41:18 2024 +0200 Merge tag 'usb-serial-6.11-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial device id for 6.11-rc6 Here's a new modem device id. This one has been in linux-next with no reported issues. * tag 'usb-serial-6.11-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add MeiG Smart SRM825L commit c26096ee0278c5e765009c5eee427bbafe6dc090 Author: David Howells Date: Wed Aug 28 22:02:45 2024 +0100 mm: Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() Fix filemap_invalidate_inode() to use invalidate_inode_pages2_range() rather than truncate_inode_pages_range(). The latter clears the invalidated bit of a partial pages rather than discarding it entirely. This causes copy_file_range() to fail on cifs because the partial pages at either end of the destination range aren't evicted and reread, but rather just partly cleared. This causes generic/075 and generic/112 xfstests to fail. Fixes: 74e797d79cf1 ("mm: Provide a means of invalidation without using launder_folio") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240828210249.1078637-5-dhowells@redhat.com cc: Matthew Wilcox cc: Miklos Szeredi cc: Trond Myklebust cc: Christoph Hellwig cc: Andrew Morton cc: Alexander Viro cc: Christian Brauner cc: Jeff Layton cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org cc: netfs@lists.linux.dev cc: v9fs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: ceph-devel@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: devel@lists.orangefs.org Signed-off-by: Christian Brauner commit 77212f300bfd6fb3edaabd1daf863cabb521854a Author: Srinivas Kandagatla Date: Fri Aug 16 10:12:10 2024 +0100 ASoC: codecs: lpass-va-macro: set the default codec version for sm8250 sm8250 and sc7280 have lpass codec version 1.0, as these are very old platforms, they do not have a reliable way to get the codec version from core_id registers. On codec versions below 2.0, even though the core_id registers are available to read, the values of these registers are not unique to be able to determine the version of the codec dynamically. Add the version info into of_data, so that driver does not need to use core_id registers to get version number for such situations. Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version") Signed-off-by: Srinivas Kandagatla Tested-by: Amit Pundir Reviewed-by: Dmitry Baryshkov Tested-by: Bryan O'Donoghue Link: https://patch.msgid.link/20240816091210.50172-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 258905cb9a6414be5c9ca4aa20ef855f8dc894d4 Author: hongchi.peng Date: Mon Aug 26 10:45:17 2024 +0800 drm: komeda: Fix an issue related to normalized zpos We use komeda_crtc_normalize_zpos to normalize zpos of affected planes to their blending zorder in CU. If there's only one slave plane in affected planes and its layer_split property is enabled, order++ for its split layer, so that when calculating the normalized_zpos of master planes, the split layer of the slave plane is included, but the max_slave_zorder does not include the split layer and keep zero because there's only one slave plane in affacted planes, although we actually use two slave layers in this commit. In most cases, this bug does not result in a commit failure, but assume the following situation: slave_layer 0: zpos = 0, layer split enabled, normalized_zpos = 0;(use slave_layer 2 as its split layer) master_layer 0: zpos = 2, layer_split enabled, normalized_zpos = 2;(use master_layer 2 as its split layer) master_layer 1: zpos = 4, normalized_zpos = 4; master_layer 3: zpos = 5, normalized_zpos = 5; kcrtc_st->max_slave_zorder = 0; When we use master_layer 3 as a input of CU in function komeda_compiz_set_input and check it with function komeda_component_check_input, the parameter idx is equal to normailzed_zpos minus max_slave_zorder, the value of idx is 5 and is euqal to CU's max_active_inputs, so that komeda_component_check_input returns a -EINVAL value. To fix the bug described above, when calculating the max_slave_zorder with the layer_split enabled, count the split layer in this calculation directly. Signed-off-by: hongchi.peng Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240826024517.3739-1-hongchi.peng@siengine.com commit 98d4435efcbf37801a3246fb53856c4b934a2613 Author: Jeongjun Park Date: Thu Aug 29 12:56:48 2024 +0900 net/smc: prevent NULL pointer dereference in txopt_get Since smc_inet6_prot does not initialize ipv6_pinfo_offset, inet6_create() copies an incorrect address value, sk + 0 (offset), to inet_sk(sk)->pinet6. In addition, since inet_sk(sk)->pinet6 and smc_sk(sk)->clcsock practically point to the same address, when smc_create_clcsk() stores the newly created clcsock in smc_sk(sk)->clcsock, inet_sk(sk)->pinet6 is corrupted into clcsock. This causes NULL pointer dereference and various other memory corruptions. To solve this problem, you need to initialize ipv6_pinfo_offset, add a smc6_sock structure, and then add ipv6_pinfo as the second member of the smc_sock structure. Reported-by: syzkaller Fixes: d25a92ccae6b ("net/smc: Introduce IPPROTO_SMC") Signed-off-by: Jeongjun Park Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 2920294686ec23211637998f3ec386dfd3d784a6 Author: Charles Han Date: Fri Aug 30 15:41:06 2024 +0800 spi: intel: Add check devm_kasprintf() returned value intel_spi_populate_chip() use devm_kasprintf() to set pdata->name. This can return a NULL pointer on failure but this returned value is not checked. Fixes: e58db3bcd93b ("spi: intel: Add default partition and name to the second chip") Signed-off-by: Charles Han Reviewed-by: Mika Westerberg Link: https://patch.msgid.link/20240830074106.8744-1-hanchunchao@inspur.com Signed-off-by: Mark Brown commit ffc17e1479e8e9459b7afa80e5d9d40d0dd78abb Author: Aleksandr Mishin Date: Fri Aug 30 09:54:28 2024 +0300 platform/x86: dell-smbios: Fix error path in dell_smbios_init() In case of error in build_tokens_sysfs(), all the memory that has been allocated is freed at end of this function. But then free_group() is called which performs memory deallocation again. Also, instead of free_group() call, there should be exit_dell_smbios_smm() and exit_dell_smbios_wmi() calls, since there is initialization, but there is no release of resources in case of an error. Fix these issues by replacing free_group() call with exit_dell_smbios_wmi() and exit_dell_smbios_smm(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens") Signed-off-by: Aleksandr Mishin Link: https://lore.kernel.org/r/20240830065428.9544-1-amishin@t-argos.ru Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e9481d9b83f8d9b3251aa428b02d8eba89d839ff Author: Kai Vehmanen Date: Fri Aug 30 15:24:58 2024 +0800 ALSA: hda: add HDMI codec ID for Intel PTL Add HDMI codec ID for Intel Panther Lake platform. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://patch.msgid.link/20240830072458.110831-1-yung-chuan.liao@linux.intel.com Signed-off-by: Takashi Iwai commit ef27e89e7f3015be2b3c124833fbd6d2e4686561 Author: Terry Cheong Date: Fri Aug 30 04:11:53 2024 +0800 ALSA: hda/realtek: add patch for internal mic in Lenovo V145 Lenovo V145 is having phase inverted dmic but simply applying inverted dmic fixups does not work. Chaining up verb fixes for ALC283 enables inverting dmic fixup to work properly. Signed-off-by: Terry Cheong Cc: Link: https://patch.msgid.link/20240830-lenovo-v145-fixes-v3-1-f7b7265068fa@chromium.org Signed-off-by: Takashi Iwai commit 20371ba120635d9ab7fc7670497105af8f33eb08 Merge: 1b5fe53681d9c 27f5b729cb56e Author: Linus Torvalds Date: Fri Aug 30 14:17:30 2024 +1200 Merge tag 'drm-fixes-2024-08-30' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Another week, another set of GPU fixes. amdgpu and vmwgfx leading the charge, then i915 and xe changes along with v3d and some other bits. The TTM revert is due to some stuttering graphical apps probably due to longer stalls while prefaulting. Seems pretty much where I'd expect things, ttm: - revert prefault change, caused stutters aperture: - handle non-VGA devices bettter amdgpu: - SWSMU gaming stability fix - SMU 13.0.7 fix - SWSMU documentation alignment fix - SMU 14.0.x fixes - GC 12.x fix - Display fix - IP discovery fix - SMU 13.0.6 fix i915: - Fix #11195: The external display connect via USB type-C dock stays blank after re-connect the dock - Make DSI backlight work for 2G version of Lenovo Yoga Tab 3 X90F - Move ARL GuC firmware to correct version xe: - Invalidate media_gt TLBs - Fix HWMON i1 power setup write command vmwgfx: - prevent unmapping active read buffers - fix prime with external buffers - disable coherent dumb buffers without 3d v3d: - disable preemption while updating GPU stats" * tag 'drm-fixes-2024-08-30' of https://gitlab.freedesktop.org/drm/kernel: drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 drm/v3d: Disable preemption while updating GPU stats drm/amd/pm: Drop unsupported features on smu v14_0_2 drm/amd/pm: Add support for new P2S table revision drm/amdgpu: support for gc_info table v1.3 drm/amd/display: avoid using null object of framebuffer drm/amdgpu/gfx12: set UNORD_DISPATCH in compute MQDs drm/amd/pm: update message interface for smu v14.0.2/3 drm/amdgpu/swsmu: always force a state reprogram on init drm/amdgpu/smu13.0.7: print index for profiles drm/amdgpu: align pp_power_profile_mode with kernel docs drm/i915/dp_mst: Fix MST state after a sink reset drm/xe: Invalidate media_gt TLBs drm/i915: ARL requires a newer GSC firmware drm/i915/dsi: Make Lenovo Yoga Tab 3 X90F DMI match less strict video/aperture: optionally match the device in sysfb_disable() drm/vmwgfx: Disable coherent dumb buffers without 3d drm/vmwgfx: Fix prime with external buffers drm/vmwgfx: Prevent unmapping active read buffers Revert "drm/ttm: increase ttm pre-fault value to PMD size" commit 1bb3c548e4e3567749d7313e037a934cbadec8ee Merge: b57d643a673ce d11a67634227f Author: Jakub Kicinski Date: Thu Aug 29 19:13:30 2024 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-08-28 (igb, ice) This series contains updates to igb and ice drivers. Daiwei Li restores writing the TSICR (TimeSync Interrupt Cause) register on 82850 devices to workaround a hardware issue for igb. Dawid detaches netdev device for reset to avoid ethtool accesses during reset causing NULL pointer dereferences on ice. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Add netif_device_attach/detach into PF reset flow igb: Fix not clearing TimeSync interrupts for 82580 ==================== Link: https://patch.msgid.link/20240828225444.645154-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 844436e045ac2ab7895d8b281cb784a24de1d14d Author: Dan Carpenter Date: Thu Aug 29 22:22:35 2024 +0300 ksmbd: Unlock on in ksmbd_tcp_set_interfaces() Unlock before returning an error code if this allocation fails. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Dan Carpenter Acked-by: Namjae Jeon Signed-off-by: Steve French commit 78c5a6f1f630172b19af4912e755e1da93ef0ab5 Author: Namjae Jeon Date: Tue Aug 27 21:44:41 2024 +0900 ksmbd: unset the binding mark of a reused connection Steve French reported null pointer dereference error from sha256 lib. cifs.ko can send session setup requests on reused connection. If reused connection is used for binding session, conn->binding can still remain true and generate_preauth_hash() will not set sess->Preauth_HashValue and it will be NULL. It is used as a material to create an encryption key in ksmbd_gen_smb311_encryptionkey. ->Preauth_HashValue cause null pointer dereference error from crypto_shash_update(). 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: 0000 [#1] PREEMPT SMP PTI CPU: 8 PID: 429254 Comm: kworker/8:39 Hardware name: LENOVO 20MAS08500/20MAS08500, BIOS N2CET69W (1.52 ) Workqueue: ksmbd-io handle_ksmbd_work [ksmbd] RIP: 0010:lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] ? show_regs+0x6d/0x80 ? __die+0x24/0x80 ? page_fault_oops+0x99/0x1b0 ? do_user_addr_fault+0x2ee/0x6b0 ? exc_page_fault+0x83/0x1b0 ? asm_exc_page_fault+0x27/0x30 ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] _sha256_update+0x77/0xa0 [sha256_ssse3] sha256_avx2_update+0x15/0x30 [sha256_ssse3] crypto_shash_update+0x1e/0x40 hmac_update+0x12/0x20 crypto_shash_update+0x1e/0x40 generate_key+0x234/0x380 [ksmbd] generate_smb3encryptionkey+0x40/0x1c0 [ksmbd] ksmbd_gen_smb311_encryptionkey+0x72/0xa0 [ksmbd] ntlm_authenticate.isra.0+0x423/0x5d0 [ksmbd] smb2_sess_setup+0x952/0xaa0 [ksmbd] __process_request+0xa3/0x1d0 [ksmbd] __handle_ksmbd_work+0x1c4/0x2f0 [ksmbd] handle_ksmbd_work+0x2d/0xa0 [ksmbd] process_one_work+0x16c/0x350 worker_thread+0x306/0x440 ? __pfx_worker_thread+0x10/0x10 kthread+0xef/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x44/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 Fixes: f5a544e3bab7 ("ksmbd: add support for SMB3 multichannel") Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 8d8d244726c8436c50f84092616c92bf551ea89a Author: Thorsten Blum Date: Fri Aug 23 13:47:05 2024 +0200 smb: Annotate struct xattr_smb_acl with __counted_by() Add the __counted_by compiler attribute to the flexible array member entries to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum Acked-by: Namjae Jeon Signed-off-by: Steve French commit 27f5b729cb56e46d8beca47c227c0edf1e958fbb Merge: dde72a5d4fdf2 9d824c7fce58f Author: Dave Airlie Date: Fri Aug 30 11:28:00 2024 +1000 Merge tag 'drm-misc-fixes-2024-08-29' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A revert for a previous TTM commit causing stuttering, 3 fixes for vmwgfx related to buffer operations, a fix for video/aperture with non-VGA primary devices, and a preemption status fix for v3d Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240829-efficient-swift-from-lemuria-f60c05@houat commit dde72a5d4fdf2e18fedb4b2abfba5f7e86bcb7c8 Merge: 9941b5bcfeb25 59d237c8a2411 Author: Dave Airlie Date: Fri Aug 30 11:07:55 2024 +1000 Merge tag 'drm-xe-fixes-2024-08-29' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Invalidate media_gt TLBs (Brost) - Fix HWMON i1 power setup write command (Karthik) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZtB-t5f4uXMrKgnV@intel.com commit 1b5fe53681d9c388f1600310fe3488091701d4d0 Merge: 04c8abae1b7b2 c6a09e342f8e6 Author: Linus Torvalds Date: Fri Aug 30 12:32:53 2024 +1200 Merge tag 'execve-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve fix from Kees Cook: - binfmt_elf_fdpic: fix AUXV size with ELF_HWCAP2 (Max Filippov) * tag 'execve-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: binfmt_elf_fdpic: fix AUXV size calculation when ELF_HWCAP2 is defined commit 04c8abae1b7b2abeb638a3d5d5950fa2a031c244 Author: Stephen Brennan Date: Thu Aug 29 11:20:49 2024 -0700 dcache: keep dentry_hashtable or d_hash_shift even when not used The runtime constant feature removes all the users of these variables, allowing the compiler to optimize them away. It's quite difficult to extract their values from the kernel text, and the memory saved by removing them is tiny, and it was never the point of this optimization. Since the dentry_hashtable is a core data structure, it's valuable for debugging tools to be able to read it easily. For instance, scripts built on drgn, like the dentrycache script[1], rely on it to be able to perform diagnostics on the contents of the dcache. Annotate it as used, so the compiler doesn't discard it. Link: https://github.com/oracle-samples/drgn-tools/blob/3afc56146f54d09dfd1f6d3c1b7436eda7e638be/drgn_tools/dentry.py#L325-L355 [1] Fixes: e3c92e81711d ("runtime constants: add x86 architecture support") Signed-off-by: Stephen Brennan Signed-off-by: Linus Torvalds commit 9941b5bcfeb25c5192c8d4c8307d3680c04d4021 Merge: bd3755c1cf2a6 a2ccc33b88e29 Author: Dave Airlie Date: Fri Aug 30 09:02:27 2024 +1000 Merge tag 'drm-intel-fixes-2024-08-29' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix #11195: The external display connect via USB type-C dock stays blank after re-connect the dock - Make DSI backlight work for 2G version of Lenovo Yoga Tab 3 X90F . Move ARL GuC firmware to correct version - Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZtAd8WTw1xiSu_TS@jlahtine-mobl.ger.corp.intel.com commit b57d643a673ce54bc1437d1cca25e1909f553a7e Author: Jakub Kicinski Date: Wed Aug 28 10:58:21 2024 -0700 MAINTAINERS: exclude bluetooth and wireless DT bindings from netdev ML We exclude wireless drivers from the netdev@ traffic, to delegate it to linux-wireless@, and avoid overwhelming netdev@. Bluetooth drivers are implicitly excluded because they live under drivers/bluetooth, not drivers/net. In both cases DT bindings sit under Documentation/devicetree/bindings/net/ and aren't excluded. So if a patch series touches DT bindings netdev@ ends up getting CCed, and these are usually fairly boring series. Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240828175821.2960423-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 538d5477b25289ac5d46ca37b9e5b4d685cbe019 Author: Xingyu Wu Date: Mon Aug 26 16:04:29 2024 +0800 clk: starfive: jh7110-sys: Add notifier for PLL0 clock Add notifier function for PLL0 clock. In the function, the cpu_root clock should be operated by saving its current parent and setting a new safe parent (osc clock) before setting the PLL0 clock rate. After setting PLL0 rate, it should be switched back to the original parent clock. Fixes: e2c510d6d630 ("riscv: dts: starfive: Add cpu scaling for JH7110 SoC") Cc: stable@vger.kernel.org Reviewed-by: Emil Renner Berthing Signed-off-by: Xingyu Wu Link: https://lore.kernel.org/r/20240826080430.179788-2-xingyu.wu@starfivetech.com Reviewed-by: Hal Feng Tested-by: Michael Jeanson Signed-off-by: Stephen Boyd commit 3b9dfd9e59367eff5f65ef2a850f2df674f1f1c5 Merge: 0dd5dd63ba91d 7bbc079531fc3 Author: Linus Torvalds Date: Fri Aug 30 06:22:35 2024 +1200 Merge tag 'hwmon-for-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - pt5161l: Fix invalid temperature reading of bad ADC values - asus-ec-sensors: Remove unsupported VRM temperature from X570-E GAMING * tag 'hwmon-for-v6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pt5161l) Fix invalid temperature reading hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING commit 0dd5dd63ba91d7bee9d0fbc2a6dc73e595391b4c Merge: d5d547aa7b514 febccb39255f9 Author: Linus Torvalds Date: Fri Aug 30 06:14:39 2024 +1200 Merge tag 'net-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth, wireless and netfilter. No known outstanding regressions. Current release - regressions: - wifi: iwlwifi: fix hibernation - eth: ionic: prevent tx_timeout due to frequent doorbell ringing Previous releases - regressions: - sched: fix sch_fq incorrect behavior for small weights - wifi: - iwlwifi: take the mutex before running link selection - wfx: repair open network AP mode - netfilter: restore IP sanity checks for netdev/egress - tcp: fix forever orphan socket caused by tcp_abort - mptcp: close subflow when receiving TCP+FIN - bluetooth: fix random crash seen while removing btnxpuart driver Previous releases - always broken: - mptcp: more fixes for the in-kernel PM - eth: bonding: change ipsec_lock from spin lock to mutex - eth: mana: fix race of mana_hwc_post_rx_wqe and new hwc response Misc: - documentation: drop special comment style for net code" * tag 'net-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (57 commits) nfc: pn533: Add poll mod list filling check mailmap: update entry for Sriram Yagnaraman selftests: mptcp: join: check re-re-adding ID 0 signal mptcp: pm: ADD_ADDR 0 is not a new address selftests: mptcp: join: validate event numbers mptcp: avoid duplicated SUB_CLOSED events selftests: mptcp: join: check re-re-adding ID 0 endp mptcp: pm: fix ID 0 endp usage after multiple re-creations mptcp: pm: do not remove already closed subflows selftests: mptcp: join: no extra msg if no counter selftests: mptcp: join: check re-adding init endp with != id mptcp: pm: reset MPC endp ID when re-added mptcp: pm: skip connecting to already established sf mptcp: pm: send ACK on an active subflow selftests: mptcp: join: check removing ID 0 endpoint mptcp: pm: fix RM_ADDR ID for the initial subflow mptcp: pm: reuse ID 0 after delete and re-add net: busy-poll: use ktime_get_ns() instead of local_clock() sctp: fix association labeling in the duplicate COOKIE-ECHO case mptcp: pr_debug: add missing \n at the end ... commit aa2eb2c4356affa2799efd95a4ee2d239ca630f8 Author: Neil Armstrong Date: Thu Aug 29 10:44:30 2024 +0200 clk: qcom: gcc-sm8650: Don't use shared clk_ops for QUPs The QUPs aren't shared in a way that requires parking the RCG at an always on parent in case some other entity turns on the clk. The hardware is capable of setting a new frequency itself with the DFS mode, so parking is unnecessary. Furthermore, there aren't any GDSCs for these devices, so there isn't a possibility of the GDSC turning on the clks for housekeeping purposes. Like for the SM8550 GCC QUP clocks at [1], do not use shared clk_ops for QUPs. [1] https://lore.kernel.org/all/20240827231237.1014813-3-swboyd@chromium.org/ Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240829-topic-sm8650-upstream-fix-qup-clk-rcg-shared-v1-1-7ecdbc672187@linaro.org Signed-off-by: Stephen Boyd commit 7b6dfa1bbe7f727315d2e05a2fc8e4cfeb779156 Author: Stephen Boyd Date: Mon Aug 19 16:36:27 2024 -0700 clk: qcom: gcc-sm8550: Don't park the USB RCG at registration time Amit Pundir reports that audio and USB-C host mode stops working if the gcc_usb30_prim_master_clk_src clk is registered and clk_rcg2_shared_init() parks it on XO. Skip parking this clk at registration time to fix those issues. Partially revert commit 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration") by skipping the parking bit for this clk, but keep the part where we cache the config register. That's still necessary to figure out the true parent of the clk at registration time. Fixes: 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration") Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable") Cc: Konrad Dybcio Cc: Bjorn Andersson Cc: Taniya Das Reported-by: Amit Pundir Closes: https://lore.kernel.org/CAMi1Hd1KQBE4kKUdAn8E5FV+BiKzuv+8FoyWQrrTHPDoYTuhgA@mail.gmail.com Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20240819233628.2074654-3-swboyd@chromium.org Tested-by: Amit Pundir Signed-off-by: Stephen Boyd commit d10eeb75168b84ed9559c58efe2756c2e0bc052a Author: Stephen Boyd Date: Mon Aug 19 16:36:26 2024 -0700 clk: qcom: gcc-sm8550: Don't use parking clk_ops for QUPs The QUPs aren't shared in a way that requires parking the RCG at an always on parent in case some other entity turns on the clk. The hardware is capable of setting a new frequency itself with the DFS mode, so parking is unnecessary. Furthermore, there aren't any GDSCs for these devices, so there isn't a possibility of the GDSC turning on the clks for housekeeping purposes. This wasn't a problem to mark these 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 you'll see garbage on the serial console until the driver can probe and actually set a proper frequency. Revert the QUP part of commit 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable") so that the QUPs don't get parked during clk registration and break UART operations. Fixes: 01a0a6cc8cfd ("clk: qcom: Park shared RCGs upon registration") Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable") Cc: Konrad Dybcio Cc: Bjorn Andersson Cc: Taniya Das Reported-by: Amit Pundir Closes: https://lore.kernel.org/CAMi1Hd1KQBE4kKUdAn8E5FV+BiKzuv+8FoyWQrrTHPDoYTuhgA@mail.gmail.com Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20240819233628.2074654-2-swboyd@chromium.org Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Stephen Boyd commit c472d33bcbf7a1ed3710efe93822b5e94eabe18c Author: Dmitry Torokhov Date: Thu Aug 29 08:38:54 2024 -0700 Input: cypress_ps2 - fix waiting for command response Commit 8bccf667f62a ("Input: cypress_ps2 - report timeouts when reading command status") uncovered an existing problem with cypress_ps2 driver: it tries waiting on a PS/2 device waitqueue without using the rest of libps2. Unfortunately without it nobody signals wakeup for the waiting process, and each "extended" command was timing out. But the rest of the code simply did not notice it. Fix this by switching from homegrown way of sending request to get command response and reading it to standard ps2_command() which does the right thing. Reported-by: Woody Suwalski Tested-by: Woody Suwalski Fixes: 8bccf667f62a ("Input: cypress_ps2 - report timeouts when reading command status") Link: https://lore.kernel.org/r/a8252e0f-dab4-ef5e-2aa1-407a6f4c7204@gmail.com Signed-off-by: Dmitry Torokhov commit 3e83957e8dd7433a69116780d9bad217b00913ea Author: Matteo Martelli Date: Thu Aug 1 14:07:19 2024 +0200 ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode This fixes the LRCLK polarity for sun8i-h3 and sun50i-h6 in i2s mode which was wrongly inverted. The LRCLK was being set in reversed logic compared to the DAI format: inverted LRCLK for SND_SOC_DAIFMT_IB_NF and SND_SOC_DAIFMT_NB_NF; normal LRCLK for SND_SOC_DAIFMT_IB_IF and SND_SOC_DAIFMT_NB_IF. Such reversed logic applies properly for DSP_A, DSP_B, LEFT_J and RIGHT_J modes but not for I2S mode, for which the LRCLK signal results reversed to what expected on the bus. The issue is due to a misinterpretation of the LRCLK polarity bit of the H3 and H6 i2s controllers. Such bit in this case does not mean "0 => normal" or "1 => inverted" according to the expected bus operation, but it means "0 => frame starts on low edge" and "1 => frame starts on high edge" (from the User Manuals). This commit fixes the LRCLK polarity by setting the LRCLK polarity bit according to the selected bus mode and renames the LRCLK polarity bit definition to avoid further confusion. Fixes: dd657eae8164 ("ASoC: sun4i-i2s: Fix the LRCK polarity") Fixes: 73adf87b7a58 ("ASoC: sun4i-i2s: Add support for H6 I2S") Signed-off-by: Matteo Martelli Link: https://patch.msgid.link/20240801-asoc-fix-sun4i-i2s-v2-1-a8e4e9daa363@gmail.com Signed-off-by: Mark Brown commit 59d237c8a241168c7ae34c48244059b7bafaff38 Author: Karthik Poosa Date: Tue Aug 27 21:23:01 2024 +0530 drm/xe/hwmon: Fix WRITE_I1 param from u32 to u16 WRITE_I1 sub-command of the POWER_SETUP pcode command accepts a u16 parameter instead of u32. This change prevents potential illegal sub-command errors. v2: Mask uval instead of changing the prototype. (Badal) v3: Rephrase commit message. (Badal) Signed-off-by: Karthik Poosa Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power") Reviewed-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20240827155301.183383-1-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit a7f657097e96d8fa745c74bb1a239ebd5a8c971c) Signed-off-by: Rodrigo Vivi commit 84cfab9a1805f8e300e945f26e3fdff6d125bc20 Merge: 32d5f7add080a 2116988d5372a Author: Palmer Dabbelt Date: Thu Aug 29 06:03:32 2024 -0700 Merge patch series "riscv: mm: Do not restrict mmap address based on hint" Charlie Jenkins says: There have been a couple of reports that using the hint address to restrict the address returned by mmap hint address has caused issues in applications. A different solution for restricting addresses returned by mmap is necessary to avoid breakages. [Palmer: This also just wasn't doing the right thing in the first place, as it didn't handle the sv39 cases we were trying to deal with.] * b4-shazam-merge: riscv: mm: Do not restrict mmap address based on hint riscv: selftests: Remove mmap hint address checks Revert "RISC-V: mm: Document mmap changes" Link: https://lore.kernel.org/r/20240826-riscv_mmap-v1-0-cd8962afe47f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 283844c35529300c8e10f7a263e35e3c5d3580ac Author: Markuss Broks Date: Thu Aug 29 16:03:05 2024 +0300 ASoC: amd: yc: Add a quirk for MSI Bravo 17 (D7VEK) MSI Bravo 17 (D7VEK), like other laptops from the family, has broken ACPI tables and needs a quirk for internal mic to work. Signed-off-by: Markuss Broks Link: https://patch.msgid.link/20240829130313.338508-1-markuss.broks@gmail.com Signed-off-by: Mark Brown commit 2116988d5372aec51f8c4fb85bf8e305ecda47a0 Author: Charlie Jenkins Date: Mon Aug 26 09:36:47 2024 -0700 riscv: mm: Do not restrict mmap address based on hint The hint address should not forcefully restrict the addresses returned by mmap as this causes mmap to report ENOMEM when there is memory still available. Signed-off-by: Charlie Jenkins Fixes: b5b4287accd7 ("riscv: mm: Use hint address in mmap if available") Fixes: add2cc6b6515 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") Closes: https://lore.kernel.org/linux-kernel/ZbxTNjQPFKBatMq+@ghost/T/#mccb1890466bf5a488c9ce7441e57e42271895765 Link: https://lore.kernel.org/r/20240826-riscv_mmap-v1-3-cd8962afe47f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 83dae72ac0382693540a055ec6210dd3691a8df6 Author: Charlie Jenkins Date: Mon Aug 26 09:36:46 2024 -0700 riscv: selftests: Remove mmap hint address checks The mmap behavior that restricts the addresses returned by mmap caused unexpected behavior, so get rid of the test cases that check that behavior. Signed-off-by: Charlie Jenkins Fixes: 73d05262a2ca ("selftests: riscv: Generalize mm selftests") Link: https://lore.kernel.org/r/20240826-riscv_mmap-v1-2-cd8962afe47f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 954260ff5a4657eb97ad7e1618505074f1610acc Author: Charlie Jenkins Date: Mon Aug 26 09:36:45 2024 -0700 Revert "RISC-V: mm: Document mmap changes" This mmap behavior caused unintended breakages so the behavior has been changed. Signed-off-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240826-riscv_mmap-v1-1-cd8962afe47f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5f3eee1eef5d0edd23d8ac0974f56283649a1512 Author: Fabio Estevam Date: Wed Aug 28 15:00:56 2024 -0300 spi: spidev: Add an entry for elgin,jg10309-01 The rv1108-elgin-r1 board has an LCD controlled via SPI in userspace. The marking on the LCD is JG10309-01. Add the "elgin,jg10309-01" compatible string. Signed-off-by: Fabio Estevam Reviewed-by: Heiko Stuebner Link: https://patch.msgid.link/20240828180057.3167190-2-festevam@gmail.com Signed-off-by: Mark Brown commit 5956ee09c8254273c587b07f5b4d42da59a0325c Author: Cristian Ciocaltea Date: Wed Aug 28 15:40:09 2024 +0300 arm64: dts: rockchip: Fix compatibles for RK3588 VO{0,1}_GRF RK3588 VO0 and VO1 GRFs are not identical (though quite similar in terms of layout) and, therefore, incorrectly shared the compatible string. Since the related binding document has been updated to use dedicated strings, update the compatibles for vo{0,1}_grf DT nodes accordingly. Additionally, for consistency, set the full region size (16KB) for VO1_GRF. Reported-by: Conor Dooley Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240828-rk3588-vo-grf-compat-v2-2-4db2f791593f@collabora.com Signed-off-by: Heiko Stuebner commit 11746c33909b082cb3b2183dd4164eb8bdcfc3df Author: Cristian Ciocaltea Date: Wed Aug 28 15:40:08 2024 +0300 dt-bindings: soc: rockchip: Fix compatibles for RK3588 VO{0,1}_GRF According to RK3588 TRM, VO0_GRF and VO1_GRF have a similar layout, but definitely not an identical one, therefore sharing the compatible is not really justified. Since currently there is no user of this, hence no ABI break, let's fix it by providing dedicated compatibles while deprecating the old one. Reported-by: Conor Dooley Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240828-rk3588-vo-grf-compat-v2-1-4db2f791593f@collabora.com Signed-off-by: Heiko Stuebner commit febccb39255f9df35527b88c953b2e0deae50e53 Author: Aleksandr Mishin Date: Tue Aug 27 11:48:22 2024 +0300 nfc: pn533: Add poll mod list filling check In case of im_protocols value is 1 and tm_protocols value is 0 this combination successfully passes the check 'if (!im_protocols && !tm_protocols)' in the nfc_start_poll(). But then after pn533_poll_create_mod_list() call in pn533_start_poll() poll mod list will remain empty and dev->poll_mod_count will remain 0 which lead to division by zero. Normally no im protocol has value 1 in the mask, so this combination is not expected by driver. But these protocol values actually come from userspace via Netlink interface (NFC_CMD_START_POLL operation). So a broken or malicious program may pass a message containing a "bad" combination of protocol parameter values so that dev->poll_mod_count is not incremented inside pn533_poll_create_mod_list(), thus leading to division by zero. Call trace looks like: nfc_genl_start_poll() nfc_start_poll() ->start_poll() pn533_start_poll() Add poll mod list filling check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: dfccd0f58044 ("NFC: pn533: Add some polling entropy") Signed-off-by: Aleksandr Mishin Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240827084822.18785-1-amishin@t-argos.ru Signed-off-by: Paolo Abeni commit 3ab394b363c5fd14b231e335fb6746ddfb93aaaa Author: Bernd Schubert Date: Wed Jul 3 19:30:20 2024 +0200 fuse: disable the combination of passthrough and writeback cache Current design and handling of passthrough is without fuse caching and with that FUSE_WRITEBACK_CACHE is conflicting. Fixes: 7dc4e97a4f9a ("fuse: introduce FUSE_PASSTHROUGH capability") Cc: stable@kernel.org # v6.9 Signed-off-by: Bernd Schubert Acked-by: Amir Goldstein Reviewed-by: Josef Bacik Signed-off-by: Miklos Szeredi commit 0240bceb0dd567d8e129d965f57a40dccef8c953 Merge: 6213dcc752f5d 70c261d500951 Author: Paolo Abeni Date: Thu Aug 29 11:35:54 2024 +0200 Merge tag 'nf-24-08-28' 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: Patch #1 sets on NFT_PKTINFO_L4PROTO for UDP packets less than 4 bytes payload from netdev/egress by subtracting skb_network_offset() when validating IPv4 packet length, otherwise 'meta l4proto udp' never matches. Patch #2 subtracts skb_network_offset() when validating IPv6 packet length for netdev/egress. netfilter pull request 24-08-28 * tag 'nf-24-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables_ipv6: consider network offset in netdev/egress validation netfilter: nf_tables: restore IP sanity checks for netdev/egress ==================== Link: https://patch.msgid.link/20240828214708.619261-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 6213dcc752f5d605cc50e08597f47fcbe658a40e Author: Sriram Yagnaraman Date: Wed Aug 28 09:24:17 2024 +0200 mailmap: update entry for Sriram Yagnaraman Link my old est.tech address to my active mail address Signed-off-by: Sriram Yagnaraman Reviewed-by: Kurt Kanzenbach Link: https://patch.msgid.link/20240828072417.4111996-1-sriram.yagnaraman@ericsson.com Signed-off-by: Paolo Abeni commit b666a651d0db4b5a50616a52ac5d00adc858d9d7 Merge: 0870b0d8b393d f18fa2abf8109 Author: Paolo Abeni Date: Thu Aug 29 10:39:52 2024 +0200 Merge branch 'mptcp-more-fixes-for-the-in-kernel-pm' Matthieu Baerts says: ==================== mptcp: more fixes for the in-kernel PM Here is a new batch of fixes for the MPTCP in-kernel path-manager: Patch 1 ensures the address ID is set to 0 when the path-manager sends an ADD_ADDR for the address of the initial subflow. The same fix is applied when a new subflow is created re-using this special address. A fix for v6.0. Patch 2 is similar, but for the case where an endpoint is removed: if this endpoint was used for the initial address, it is important to send a RM_ADDR with this ID set to 0, and look for existing subflows with the ID set to 0. A fix for v6.0 as well. Patch 3 validates the two previous patches. Patch 4 makes the PM selecting an "active" path to send an address notification in an ACK, instead of taking the first path in the list. A fix for v5.11. Patch 5 fixes skipping the establishment of a new subflow if a previous subflow using the same pair of addresses is being closed. A fix for v5.13. Patch 6 resets the ID linked to the initial subflow when the linked endpoint is re-added, possibly with a different ID. A fix for v6.0. Patch 7 validates the three previous patches. Patch 8 is a small fix for the MPTCP Join selftest, when being used with older subflows not supporting all MIB counters. A fix for a commit introduced in v6.4, but backported up to v5.10. Patch 9 avoids the PM to try to close the initial subflow multiple times, and increment counters while nothing happened. A fix for v5.10. Patch 10 stops incrementing local_addr_used and add_addr_accepted counters when dealing with the address ID 0, because these counters are not taking into account the initial subflow, and are then not decremented when the linked addresses are removed. A fix for v6.0. Patch 11 validates the previous patch. Patch 12 avoids the PM to send multiple SUB_CLOSED events for the initial subflow. A fix for v5.12. Patch 13 validates the previous patch. Patch 14 stops treating the ADD_ADDR 0 as a new address, and accepts it in order to re-create the initial subflow if it has been closed, even if the limit for *new* addresses -- not taking into account the address of the initial subflow -- has been reached. A fix for v5.10. Patch 15 validates the previous patch. Signed-off-by: Matthieu Baerts (NGI0) --- Matthieu Baerts (NGI0) (15): mptcp: pm: reuse ID 0 after delete and re-add mptcp: pm: fix RM_ADDR ID for the initial subflow selftests: mptcp: join: check removing ID 0 endpoint mptcp: pm: send ACK on an active subflow mptcp: pm: skip connecting to already established sf mptcp: pm: reset MPC endp ID when re-added selftests: mptcp: join: check re-adding init endp with != id selftests: mptcp: join: no extra msg if no counter mptcp: pm: do not remove already closed subflows mptcp: pm: fix ID 0 endp usage after multiple re-creations selftests: mptcp: join: check re-re-adding ID 0 endp mptcp: avoid duplicated SUB_CLOSED events selftests: mptcp: join: validate event numbers mptcp: pm: ADD_ADDR 0 is not a new address selftests: mptcp: join: check re-re-adding ID 0 signal net/mptcp/pm.c | 4 +- net/mptcp/pm_netlink.c | 87 ++++++++++---- net/mptcp/protocol.c | 6 + net/mptcp/protocol.h | 5 +- tools/testing/selftests/net/mptcp/mptcp_join.sh | 153 ++++++++++++++++++++---- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 4 + 6 files changed, 209 insertions(+), 50 deletions(-) --- base-commit: 3a0504d54b3b57f0d7bf3d9184a00c9f8887f6d7 change-id: 20240826-net-mptcp-more-pm-fix-ffa61a36f817 Best regards, ==================== Link: https://patch.msgid.link/20240828-net-mptcp-more-pm-fix-v2-0-7f11b283fff7@kernel.org Signed-off-by: Paolo Abeni commit f18fa2abf81099d822d842a107f8c9889c86043c Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:38 2024 +0200 selftests: mptcp: join: check re-re-adding ID 0 signal This test extends "delete re-add signal" to validate the previous commit: when the 'signal' endpoint linked to the initial subflow (ID 0) is re-added multiple times, it will re-send the ADD_ADDR with id 0. The client should still be able to re-create this subflow, even if the add_addr_accepted limit has been reached as this special address is not considered as a new address. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: d0876b2284cf ("mptcp: add the incoming RM_ADDR support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 57f86203b41c98b322119dfdbb1ec54ce5e3369b Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:37 2024 +0200 mptcp: pm: ADD_ADDR 0 is not a new address The ADD_ADDR 0 with the address from the initial subflow should not be considered as a new address: this is not something new. If the host receives it, it simply means that the address is available again. When receiving an ADD_ADDR for the ID 0, the PM already doesn't consider it as new by not incrementing the 'add_addr_accepted' counter. But the 'accept_addr' might not be set if the limit has already been reached: this can be bypassed in this case. But before, it is important to check that this ADD_ADDR for the ID 0 is for the same address as the initial subflow. If not, it is not something that should happen, and the ADD_ADDR can be ignored. Note that if an ADD_ADDR is received while there is already a subflow opened using the same address, this ADD_ADDR is ignored as well. It means that if multiple ADD_ADDR for ID 0 are received, there will not be any duplicated subflows created by the client. Fixes: d0876b2284cf ("mptcp: add the incoming RM_ADDR support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 20ccc7c5f7a3aa48092441a4b182f9f40418392e Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:36 2024 +0200 selftests: mptcp: join: validate event numbers This test extends "delete and re-add" and "delete re-add signal" to validate the previous commit: the number of MPTCP events are checked to make sure there are no duplicated or unexpected ones. A new helper has been introduced to easily check these events. The missing events have been added to the lib. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: b911c97c7dc7 ("mptcp: add netlink event support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit d82809b6c5f2676b382f77a5cbeb1a5d91ed2235 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:35 2024 +0200 mptcp: avoid duplicated SUB_CLOSED events The initial subflow might have already been closed, but still in the connection list. When the worker is instructed to close the subflows that have been marked as closed, it might then try to close the initial subflow again. A consequence of that is that the SUB_CLOSED event can be seen twice: # ip mptcp endpoint 1.1.1.1 id 1 subflow dev eth0 2.2.2.2 id 2 subflow dev eth1 # ip mptcp monitor & [ CREATED] remid=0 locid=0 saddr4=1.1.1.1 daddr4=9.9.9.9 [ ESTABLISHED] remid=0 locid=0 saddr4=1.1.1.1 daddr4=9.9.9.9 [ SF_ESTABLISHED] remid=0 locid=2 saddr4=2.2.2.2 daddr4=9.9.9.9 # ip mptcp endpoint delete id 1 [ SF_CLOSED] remid=0 locid=0 saddr4=1.1.1.1 daddr4=9.9.9.9 [ SF_CLOSED] remid=0 locid=0 saddr4=1.1.1.1 daddr4=9.9.9.9 The first one is coming from mptcp_pm_nl_rm_subflow_received(), and the second one from __mptcp_close_subflow(). To avoid doing the post-closed processing twice, the subflow is now marked as closed the first time. Note that it is not enough to check if we are dealing with the first subflow and check its sk_state: the subflow might have been reset or closed before calling mptcp_close_ssk(). Fixes: b911c97c7dc7 ("mptcp: add netlink event support") Cc: stable@vger.kernel.org Tested-by: Arınç ÜNAL Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit d397d7246c11ca36c33c932bc36d38e3a79e9aa0 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:34 2024 +0200 selftests: mptcp: join: check re-re-adding ID 0 endp This test extends "delete and re-add" to validate the previous commit: when the endpoint linked to the initial subflow (ID 0) is re-added multiple times, it was no longer being used, because the internal linked counters are not decremented for this special endpoint: it is not an additional endpoint. Here, the "del/add id 0" steps are done 3 times to unsure this case is validated. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 9366922adc6a71378ca01f898c41be295309f044 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:33 2024 +0200 mptcp: pm: fix ID 0 endp usage after multiple re-creations 'local_addr_used' and 'add_addr_accepted' are decremented for addresses not related to the initial subflow (ID0), because the source and destination addresses of the initial subflows are known from the beginning: they don't count as "additional local address being used" or "ADD_ADDR being accepted". It is then required not to increment them when the entrypoint used by the initial subflow is removed and re-added during a connection. Without this modification, this entrypoint cannot be removed and re-added more than once. Reported-by: Arınç ÜNAL Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/512 Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Reported-by: syzbot+455d38ecd5f655fc45cf@syzkaller.appspotmail.com Closes: https://lore.kernel.org/00000000000049861306209237f4@google.com Cc: stable@vger.kernel.org Tested-by: Arınç ÜNAL Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 58e1b66b4e4b8a602d3f2843e8eba00a969ecce2 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:32 2024 +0200 mptcp: pm: do not remove already closed subflows It is possible to have in the list already closed subflows, e.g. the initial subflow has been already closed, but still in the list. No need to try to close it again, and increments the related counters again. Fixes: 0ee4261a3681 ("mptcp: implement mptcp_pm_remove_subflow") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 76a2d8394cc183df872adf04bf636eaf42746449 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:31 2024 +0200 selftests: mptcp: join: no extra msg if no counter The checksum and fail counters might not be available. Then no need to display an extra message with missing info. While at it, fix the indentation around, which is wrong since the same commit. Fixes: 47867f0a7e83 ("selftests: mptcp: join: skip check if MIB counter not supported") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 1c2326fcae4f0c5de8ad0d734ced43a8e5f17dac Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:30 2024 +0200 selftests: mptcp: join: check re-adding init endp with != id The initial subflow has a special local ID: 0. It is specific per connection. When a global endpoint is deleted and re-added later, it can have a different ID, but the kernel should still use the ID 0 if it corresponds to the initial address. This test validates this behaviour: the endpoint linked to the initial subflow is removed, and re-added with a different ID. Note that removing the initial subflow will not decrement the 'subflows' counters, which corresponds to the *additional* subflows. On the other hand, when the same endpoint is re-added, it will increment this counter, as it will be seen as an additional subflow this time. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit dce1c6d1e92535f165219695a826caedcca4e9b9 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:29 2024 +0200 mptcp: pm: reset MPC endp ID when re-added The initial subflow has a special local ID: 0. It is specific per connection. When a global endpoint is deleted and re-added later, it can have a different ID -- most services managing the endpoints automatically don't force the ID to be the same as before. It is then important to track these modifications to be consistent with the ID being used for the address used by the initial subflow, not to confuse the other peer or to send the ID 0 for the wrong address. Now when removing an endpoint, msk->mpc_endpoint_id is reset if it corresponds to this endpoint. When adding a new endpoint, the same variable is updated if the address match the one of the initial subflow. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit bc19ff57637ff563d2bdf2b385b48c41e6509e0d Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:28 2024 +0200 mptcp: pm: skip connecting to already established sf The lookup_subflow_by_daddr() helper checks if there is already a subflow connected to this address. But there could be a subflow that is closing, but taking time due to some reasons: latency, losses, data to process, etc. If an ADD_ADDR is received while the endpoint is being closed, it is better to try connecting to it, instead of rejecting it: the peer which has sent the ADD_ADDR will not be notified that the ADD_ADDR has been rejected for this reason, and the expected subflow will not be created at the end. This helper should then only look for subflows that are established, or going to be, but not the ones being closed. Fixes: d84ad04941c3 ("mptcp: skip connecting the connected address") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit c07cc3ed895f9bfe0c53b5ed6be710c133b4271c Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:27 2024 +0200 mptcp: pm: send ACK on an active subflow Taking the first one on the list doesn't work in some cases, e.g. if the initial subflow is being removed. Pick another one instead of not sending anything. Fixes: 84dfe3677a6f ("mptcp: send out dedicated ADD_ADDR packet") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 5f94b08c001290acda94d9d8868075590931c198 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:26 2024 +0200 selftests: mptcp: join: check removing ID 0 endpoint Removing the endpoint linked to the initial subflow should trigger a RM_ADDR for the right ID, and the removal of the subflow. That's what is now being verified in the "delete and re-add" test. Note that removing the initial subflow will not decrement the 'subflows' counters, which corresponds to the *additional* subflows. On the other hand, when the same endpoint is re-added, it will increment this counter, as it will be seen as an additional subflow this time. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 87b5896f3f7848130095656739b05881904e2697 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:25 2024 +0200 mptcp: pm: fix RM_ADDR ID for the initial subflow The initial subflow has a special local ID: 0. When an endpoint is being deleted, it is then important to check if its address is not linked to the initial subflow to send the right ID. If there was an endpoint linked to the initial subflow, msk's mpc_endpoint_id field will be set. We can then use this info when an endpoint is being removed to see if it is linked to the initial subflow. So now, the correct IDs are passed to mptcp_pm_nl_rm_addr_or_subflow(), it is no longer needed to use mptcp_local_id_match(). Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 8b8ed1b429f8fa7ebd5632555e7b047bc0620075 Author: Matthieu Baerts (NGI0) Date: Wed Aug 28 08:14:24 2024 +0200 mptcp: pm: reuse ID 0 after delete and re-add When the endpoint used by the initial subflow is removed and re-added later, the PM has to force the ID 0, it is a special case imposed by the MPTCP specs. Note that the endpoint should then need to be re-added reusing the same ID. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit bd3755c1cf2a605604b0d7630ab84d083b9bc5d7 Merge: 5be63fc19fcaa 849f0d5880b74 Author: Dave Airlie Date: Thu Aug 29 15:32:03 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-08-28' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-08-28: amdgpu: - SWSMU gaming stability fix - SMU 13.0.7 fix - SWSMU documentation alignment fix - SMU 14.0.x fixes - GC 12.x fix - Display fix - IP discovery fix - SMU 13.0.6 fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240828184908.125387-1-alexander.deucher@amd.com commit 734ad0af3609464f8f93e00b6c0de1e112f44559 Author: Nysal Jan K.A. Date: Thu Aug 29 07:58:27 2024 +0530 powerpc/qspinlock: Fix deadlock in MCS queue If an interrupt occurs in queued_spin_lock_slowpath() after we increment qnodesp->count and before node->lock is initialized, another CPU might see stale lock values in get_tail_qnode(). If the stale lock value happens to match the lock on that CPU, then we write to the "next" pointer of the wrong qnode. This causes a deadlock as the former CPU, once it becomes the head of the MCS queue, will spin indefinitely until it's "next" pointer is set by its successor in the queue. Running stress-ng on a 16 core (16EC/16VP) shared LPAR, results in occasional lockups similar to the following: $ stress-ng --all 128 --vm-bytes 80% --aggressive \ --maximize --oomable --verify --syslog \ --metrics --times --timeout 5m watchdog: CPU 15 Hard LOCKUP ...... NIP [c0000000000b78f4] queued_spin_lock_slowpath+0x1184/0x1490 LR [c000000001037c5c] _raw_spin_lock+0x6c/0x90 Call Trace: 0xc000002cfffa3bf0 (unreliable) _raw_spin_lock+0x6c/0x90 raw_spin_rq_lock_nested.part.135+0x4c/0xd0 sched_ttwu_pending+0x60/0x1f0 __flush_smp_call_function_queue+0x1dc/0x670 smp_ipi_demux_relaxed+0xa4/0x100 xive_muxed_ipi_action+0x20/0x40 __handle_irq_event_percpu+0x80/0x240 handle_irq_event_percpu+0x2c/0x80 handle_percpu_irq+0x84/0xd0 generic_handle_irq+0x54/0x80 __do_irq+0xac/0x210 __do_IRQ+0x74/0xd0 0x0 do_IRQ+0x8c/0x170 hardware_interrupt_common_virt+0x29c/0x2a0 --- interrupt: 500 at queued_spin_lock_slowpath+0x4b8/0x1490 ...... NIP [c0000000000b6c28] queued_spin_lock_slowpath+0x4b8/0x1490 LR [c000000001037c5c] _raw_spin_lock+0x6c/0x90 --- interrupt: 500 0xc0000029c1a41d00 (unreliable) _raw_spin_lock+0x6c/0x90 futex_wake+0x100/0x260 do_futex+0x21c/0x2a0 sys_futex+0x98/0x270 system_call_exception+0x14c/0x2f0 system_call_vectored_common+0x15c/0x2ec The following code flow illustrates how the deadlock occurs. For the sake of brevity, assume that both locks (A and B) are contended and we call the queued_spin_lock_slowpath() function. CPU0 CPU1 ---- ---- spin_lock_irqsave(A) | spin_unlock_irqrestore(A) | spin_lock(B) | | | ▼ | id = qnodesp->count++; | (Note that nodes[0].lock == A) | | | ▼ | Interrupt | (happens before "nodes[0].lock = B") | | | ▼ | spin_lock_irqsave(A) | | | ▼ | id = qnodesp->count++ | nodes[1].lock = A | | | ▼ | Tail of MCS queue | | spin_lock_irqsave(A) ▼ | Head of MCS queue ▼ | CPU0 is previous tail ▼ | Spin indefinitely ▼ (until "nodes[1].next != NULL") prev = get_tail_qnode(A, CPU0) | ▼ prev == &qnodes[CPU0].nodes[0] (as qnodes[CPU0].nodes[0].lock == A) | ▼ WRITE_ONCE(prev->next, node) | ▼ Spin indefinitely (until nodes[0].locked == 1) Thanks to Saket Kumar Bhaskar for help with recreating the issue Fixes: 84990b169557 ("powerpc/qspinlock: add mcs queueing for contended waiters") Cc: stable@vger.kernel.org # v6.2+ Reported-by: Geetika Moolchandani Reported-by: Vaishnavi Bhat Reported-by: Jijo Varghese Signed-off-by: Nysal Jan K.A. Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20240829022830.1164355-1-nysal@linux.ibm.com commit d5d547aa7b51467b15d9caa86b116f8c2507c72a Merge: 928f79a188aac 28f5df210d06b Author: Linus Torvalds Date: Thu Aug 29 13:59:18 2024 +1200 Merge tag 'random-6.11-rc6-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random Pull random number generator fix from Jason Donenfeld: "Reject invalid flags passed to vgetrandom() in the same way that getrandom() does, so that the behavior is the same, from Yann. The flags argument to getrandom() only has a behavioral effect on the function if the RNG isn't initialized yet, so vgetrandom() falls back to the syscall in that case. But if the RNG is initialized, all of the flags behave the same way, so vgetrandom() didn't bother checking them, and just ignored them entirely. But that doesn't account for invalid flags passed in, which need to be rejected so we can use them later" * tag 'random-6.11-rc6-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: random: vDSO: reject unknown getrandom() flags commit 0f9592ae26ffe044cfb2b2d071ccf4427be57ed4 Author: Mary Guillemard Date: Mon Aug 19 00:24:42 2024 +0200 scsi: ufs: ufs-mediatek: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP MT8183 implements the UFSHCI 2.1 spec but reports a bogus value of 1 in the reserved part for the Legacy Single Doorbell Support (LSDBS) capability. Set UFSHCD_QUIRK_BROKEN_LSDBS_CAP when MCQ support is explicitly disabled, allowing the device to be properly registered. Signed-off-by: Mary Guillemard Link: https://lore.kernel.org/r/20240818222442.44990-3-mary@mary.zone Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen commit 0870b0d8b393dde53106678a1e2cec9dfa52f9b7 Author: Eric Dumazet Date: Tue Aug 27 11:49:16 2024 +0000 net: busy-poll: use ktime_get_ns() instead of local_clock() Typically, busy-polling durations are below 100 usec. When/if the busy-poller thread migrates to another cpu, local_clock() can be off by +/-2msec or more for small values of HZ, depending on the platform. Use ktimer_get_ns() to ensure deterministic behavior, which is the whole point of busy-polling. Fixes: 060212928670 ("net: add low latency socket poll") Fixes: 9a3c71aa8024 ("net: convert low latency sockets to sched_clock()") Fixes: 37089834528b ("sched, net: Fixup busy_loop_us_clock()") Signed-off-by: Eric Dumazet Cc: Mina Almasry Cc: Willem de Bruijn Reviewed-by: Joe Damato Link: https://patch.msgid.link/20240827114916.223377-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 41901c227e00ca6cd1a42d1d59a51f3a5af1621b Merge: 3a0504d54b3b5 094513f8a2fbd Author: Jakub Kicinski Date: Wed Aug 28 16:54:44 2024 -0700 Merge tag 'wireless-2024-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Regressions: * wfx: fix for open network connection * iwlwifi: fix for hibernate (due to fast resume feature) * iwlwifi: fix for a few warnings that were recently added (had previously been messages not warnings) Previously broken: * mwifiex: fix static structures used for per-device data * iwlwifi: some harmless FW related messages were tagged too high priority * iwlwifi: scan buffers weren't checked correctly * mac80211: SKB leak on beacon error path * iwlwifi: fix ACPI table interop with certain BIOSes * iwlwifi: fix locking for link selection * mac80211: fix SSID comparison in beacon validation * tag 'wireless-2024-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: clear trans->state earlier upon error wifi: wfx: repair open network AP mode wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap() wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead wifi: iwlwifi: mvm: allow 6 GHz channels in MLO scan wifi: iwlwifi: mvm: pause TCM when the firmware is stopped wifi: iwlwifi: fw: fix wgds rev 3 exact size wifi: iwlwifi: mvm: take the mutex before running link selection wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation wifi: iwlwifi: lower message level for FW buffer destination wifi: iwlwifi: mvm: fix hibernation wifi: mac80211: fix beacon SSID mismatch handling wifi: mwifiex: duplicate static structs used in driver instances ==================== Link: https://patch.msgid.link/20240828100151.23662-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 76a0e79bc84f466999fa501fce5bf7a07641b8a7 Author: Scott Mayhew Date: Wed Aug 28 15:51:29 2024 -0400 selinux,smack: don't bypass permissions check in inode_setsecctx hook Marek Gresko reports that the root user on an NFS client is able to change the security labels on files on an NFS filesystem that is exported with root squashing enabled. The end of the kerneldoc comment for __vfs_setxattr_noperm() states: * This function requires the caller to lock the inode's i_mutex before it * is executed. It also assumes that the caller will make the appropriate * permission checks. nfsd_setattr() does do permissions checking via fh_verify() and nfsd_permission(), but those don't do all the same permissions checks that are done by security_inode_setxattr() and its related LSM hooks do. Since nfsd_setattr() is the only consumer of security_inode_setsecctx(), simplest solution appears to be to replace the call to __vfs_setxattr_noperm() with a call to __vfs_setxattr_locked(). This fixes the above issue and has the added benefit of causing nfsd to recall conflicting delegations on a file when a client tries to change its security label. Cc: stable@kernel.org Reported-by: Marek Gresko Link: https://bugzilla.kernel.org/show_bug.cgi?id=218809 Signed-off-by: Scott Mayhew Tested-by: Stephen Smalley Reviewed-by: Stephen Smalley Reviewed-by: Chuck Lever Reviewed-by: Jeff Layton Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit d11a67634227f9f9da51938af085fb41a733848f Author: Dawid Osuchowski Date: Wed Aug 21 18:06:40 2024 +0200 ice: Add netif_device_attach/detach into PF reset flow Ethtool callbacks can be executed while reset is in progress and try to access deleted resources, e.g. getting coalesce settings can result in a NULL pointer dereference seen below. Reproduction steps: Once the driver is fully initialized, trigger reset: # echo 1 > /sys/class/net//device/reset when reset is in progress try to get coalesce settings using ethtool: # ethtool -c BUG: kernel NULL pointer dereference, address: 0000000000000020 PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP PTI CPU: 11 PID: 19713 Comm: ethtool Tainted: G S 6.10.0-rc7+ #7 RIP: 0010:ice_get_q_coalesce+0x2e/0xa0 [ice] RSP: 0018:ffffbab1e9bcf6a8 EFLAGS: 00010206 RAX: 000000000000000c RBX: ffff94512305b028 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff9451c3f2e588 RDI: ffff9451c3f2e588 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffff9451c3f2e580 R11: 000000000000001f R12: ffff945121fa9000 R13: ffffbab1e9bcf760 R14: 0000000000000013 R15: ffffffff9e65dd40 FS: 00007faee5fbe740(0000) GS:ffff94546fd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000020 CR3: 0000000106c2e005 CR4: 00000000001706f0 Call Trace: ice_get_coalesce+0x17/0x30 [ice] coalesce_prepare_data+0x61/0x80 ethnl_default_doit+0xde/0x340 genl_family_rcv_msg_doit+0xf2/0x150 genl_rcv_msg+0x1b3/0x2c0 netlink_rcv_skb+0x5b/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x19c/0x290 netlink_sendmsg+0x222/0x490 __sys_sendto+0x1df/0x1f0 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x82/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7faee60d8e27 Calling netif_device_detach() before reset makes the net core not call the driver when ethtool command is issued, the attempt to execute an ethtool command during reset will result in the following message: netlink error: No such device instead of NULL pointer dereference. Once reset is done and ice_rebuild() is executing, the netif_device_attach() is called to allow for ethtool operations to occur again in a safe manner. Fixes: fcea6f3da546 ("ice: Add stats and ethtool support") Suggested-by: Jakub Kicinski Reviewed-by: Igor Bagnucki Signed-off-by: Dawid Osuchowski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Reviewed-by: Michal Schmidt Signed-off-by: Tony Nguyen commit ba8cf80724dbc09825b52498e4efacb563935408 Author: Daiwei Li Date: Tue Aug 13 21:55:53 2024 -0700 igb: Fix not clearing TimeSync interrupts for 82580 82580 NICs have a hardware bug that makes it necessary to write into the TSICR (TimeSync Interrupt Cause) register to clear it: https://lore.kernel.org/all/CDCB8BE0.1EC2C%25matthew.vick@intel.com/ Add a conditional so only for 82580 we write into the TSICR register, so we don't risk losing events for other models. Without this change, when running ptp4l with an Intel 82580 card, I get the following output: > timed out while polling for tx timestamp increasing tx_timestamp_timeout or > increasing kworker priority may correct this issue, but a driver bug likely > causes it This goes away with this change. This (partially) reverts commit ee14cc9ea19b ("igb: Fix missing time sync events"). Fixes: ee14cc9ea19b ("igb: Fix missing time sync events") Closes: https://lore.kernel.org/intel-wired-lan/CAN0jFd1kO0MMtOh8N2Ztxn6f7vvDKp2h507sMryobkBKe=xk=w@mail.gmail.com/ Tested-by: Daiwei Li Suggested-by: Vinicius Costa Gomes Signed-off-by: Daiwei Li Acked-by: Vinicius Costa Gomes Reviewed-by: Kurt Kanzenbach Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 91d1dfae464987aaf6c79ff51d8674880fb3be77 Author: David Howells Date: Wed Aug 28 21:08:25 2024 +0100 cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target region Under certain conditions, the range to be cleared by FALLOC_FL_ZERO_RANGE may only be buffered locally and not yet have been flushed to the server. For example: xfs_io -f -t -c "pwrite -S 0x41 0 4k" \ -c "pwrite -S 0x42 4k 4k" \ -c "fzero 0 4k" \ -c "pread -v 0 8k" /xfstest.test/foo will write two 4KiB blocks of data, which get buffered in the pagecache, and then fallocate() is used to clear the first 4KiB block on the server - but we don't flush the data first, which means the EOF position on the server is wrong, and so the FSCTL_SET_ZERO_DATA RPC fails (and xfs_io ignores the error), but then when we try to read it, we see the old data. Fix this by preflushing any part of the target region that above the server's idea of the EOF position to force the server to update its EOF position. Note, however, that we don't want to simply expand the file by moving the EOF before doing the FSCTL_SET_ZERO_DATA[*] because someone else might see the zeroed region or if the RPC fails we then have to try to clean it up or risk getting corruption. [*] And we have to move the EOF first otherwise FSCTL_SET_ZERO_DATA won't do what we want. This fixes the generic/008 xfstest. [!] Note: A better way to do this might be to split the operation into two parts: we only do FSCTL_SET_ZERO_DATA for the part of the range below the server's EOF and then, if that worked, invalidate the buffered pages for the part above the range. Fixes: 6b69040247e1 ("cifs/smb3: Fix data inconsistent when zero file range") Signed-off-by: David Howells cc: Steve French cc: Zhang Xiaoxu cc: Pavel Shilovsky cc: Paulo Alcantara cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Steve French commit 5325b96769a5b282e330023e1d0881018e89e266 Author: Zhang Yi Date: Fri Aug 16 19:49:21 2024 +0800 ASoC: mediatek: mt8188-mt6359: Modify key In order to get the correct keys when using the ES8326.We will associate SND_JACK_BTN_1 to KEY_VOLUMEUP and SND_JACK_BTN_2 to KEY_VOLUMEDOWN when the ES8326 flag is recognized. Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20240816114921.48913-1-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 3536c01d6577ce4612617ced32dbc891f39f9d64 Merge: ec57571b5dda1 591940e22e287 Author: Arnd Bergmann Date: Wed Aug 28 20:28:51 2024 +0000 Merge tag 'riscv-soc-fixes-for-v6.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V soc fixes for v6.11-rc6 Prevent an erroneous unconditional report of a timeout during firmware upload in the mpfs-auto-update driver. Signed-off-by: Conor Dooley * tag 'riscv-soc-fixes-for-v6.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: firmware: microchip: fix incorrect error report of programming:timeout on success Link: https://lore.kernel.org/r/20240828-fidelity-almighty-18d5434aaef0@spud Signed-off-by: Arnd Bergmann commit ec57571b5dda1fdd68b572e1e980c52d1edb0b0d Merge: 015a00ef55e78 dfbe93f32c12f Author: Arnd Bergmann Date: Wed Aug 28 20:28:15 2024 +0000 Merge tag 'qcom-arm64-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm Arm64 DeviceTree fixes for v6.11 On X1E the GPU node is disabled by default, to be enabled in the individual devices once the developers install the required firmware. The generic EDP panel driver used on the X1E CRD is replaced with the Samsung ATNA45AF01 driver, in order to ensure backlight is brought back up after being turned off. The pin configuration for PCIe-related pins are corrected across all the X1E targets. The PCIe controllers gain a minimum OPP vote, and PCIe domain numbers are corrected. WiFi calibration variant information is added to the Lenovo Yoga Slim 7x, to pick the right data from the firmware packages. The incorrect Adreno SMMU global interrupt is corrected. For IPQ5332, the IRQ triggers for the USB controller are corrected. * tag 'qcom-arm64-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (23 commits) arm64: dts: qcom: x1e80100: Fix Adreno SMMU global interrupt arm64: dts: qcom: disable GPU on x1e80100 by default arm64: dts: qcom: x1e80100-crd: Fix backlight arm64: dts: qcom: x1e80100-yoga-slim7x: fix missing PCIe4 gpios arm64: dts: qcom: x1e80100-yoga-slim7x: disable PCIe6a perst pull down arm64: dts: qcom: x1e80100-yoga-slim7x: fix up PCIe6a pinctrl node arm64: dts: qcom: x1e80100-yoga-slim7x: fix PCIe4 PHY supply arm64: dts: qcom: x1e80100-vivobook-s15: fix missing PCIe4 gpios arm64: dts: qcom: x1e80100-vivobook-s15: disable PCIe6a perst pull down arm64: dts: qcom: x1e80100-vivobook-s15: fix up PCIe6a pinctrl node arm64: dts: qcom: x1e80100-vivobook-s15: fix PCIe4 PHY supply arm64: dts: qcom: x1e80100-qcp: fix missing PCIe4 gpios arm64: dts: qcom: x1e80100-qcp: disable PCIe6a perst pull down arm64: dts: qcom: x1e80100-qcp: fix up PCIe6a pinctrl node arm64: dts: qcom: x1e80100-qcp: fix PCIe4 PHY supply arm64: dts: qcom: x1e80100-crd: fix missing PCIe4 gpios arm64: dts: qcom: x1e80100-crd: disable PCIe6a perst pull down arm64: dts: qcom: x1e80100-crd: fix up PCIe6a pinctrl node arm64: dts: qcom: x1e80100: add missing PCIe minimum OPP arm64: dts: qcom: x1e80100: fix PCIe domain numbers ... Link: https://lore.kernel.org/r/20240826152426.1648383-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 015a00ef55e78470d7a0d190ecfe89c4590a3035 Merge: d8f2638b835c9 10f98bb9d9813 Author: Arnd Bergmann Date: Wed Aug 28 20:28:00 2024 +0000 Merge tag 'qcom-arm64-defconfig-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm Arm64 defconfig fix for 6.11 Enable the Samsung ATNA33XC20 display panel driver, as we switched from the generic EDP panel for some of the X1E devices in v6.11. * tag 'qcom-arm64-defconfig-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Add CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 Link: https://lore.kernel.org/r/20240826145736.1646729-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit d8f2638b835c9c7fd40c64828b576d3b809b399e Merge: 27795c50160d3 c158ceb826068 Author: Arnd Bergmann Date: Wed Aug 28 20:27:37 2024 +0000 Merge tag 'qcom-drivers-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm driver fixes for v6.11 This corrects the tzmem virt-to-phys conversion, which caused issues for the uefisecapp implementation of EFI variable access. SDM670 is excluded from tzmem usage due to reported issues. The SCM get wait queue context call is corrected to be marked ATOMIC and some dead code in qseecom, following the tzmem conversion, is removed. The memory backing command DB is remapped writecombined, to avoid XPU violations when Linux runs without the Qualcomm hypervisor. Two compile fixes are added for pd-mapper, and the broken reference count is corrected, to make pd-mapper deal with remoteprocs going away. In pmic_glink a race condition where the client callbacks might be called before we returned the client handle is corrected. The broken conditions for when to signal that the firmware is going down is also corrected. In the pmic_glink UCSI driver, the ucsi_unregister() is moved out of the pdr callback, as this is being invoked in atomic context. Konrad's email address is updated in MAINTAINERS, and related mailmap entries are added. * tag 'qcom-drivers-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: pd-mapper: Fix singleton refcount firmware: qcom: tzmem: disable sdm670 platform soc: qcom: pmic_glink: Actually communicate when remote goes down usb: typec: ucsi: Move unregister out of atomic section soc: qcom: pmic_glink: Fix race during initialization firmware: qcom: qseecom: remove unused functions firmware: qcom: tzmem: fix virtual-to-physical address conversion firmware: qcom: scm: Mark get_wq_ctx() as atomic call MAINTAINERS: Update Konrad Dybcio's email address mailmap: Add an entry for Konrad Dybcio soc: qcom: pd-mapper: mark qcom_pdm_domains as __maybe_unused soc: qcom: cmd-db: Map shared memory as WC, not WB soc: qcom: pd-mapper: Depend on ARCH_QCOM || COMPILE_TEST Link: https://lore.kernel.org/r/20240826145209.1646159-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 27795c50160d34b7503dd61d0644374a952cfea4 Merge: 0351a9841ba1c f149be46e4c13 Author: Arnd Bergmann Date: Wed Aug 28 20:27:24 2024 +0000 Merge tag 'imx-fixes-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.11: - One imx8mp-beacon-kit change from Adam Ford to fix the broken WM8962 audio support - One pinctrl property typo fix for imx8mm-phygate - One layerscape fix from Krzysztof Kozlowski to get thermal nodes correct name length - A couple of imx93-tqma9352 fixes from Markus Niebel, one on CMA alloc-ranges and the other on SD-Card cd-gpios typo - One change from Michal Vokáč to fix imx6dl-yapp43 LED current to match the HW design - A couple of imx95 fixes from Peng Fan, one to correct a55 power domains and the other to correct L3Cache cache-sets - One tqma9352 watchdog reset fix from Sascha Hauer - One imx93 change from Shenwei Wang to fix the default value for STMMAC EQOS snps,clk-csr * tag 'imx-fixes-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mm-phygate: fix typo pinctrcl-0 arm64: dts: imx95: correct L3Cache cache-sets arm64: dts: imx95: correct a55 power-domains arm64: dts: freescale: imx93-tqma9352-mba93xxla: fix typo arm64: dts: freescale: imx93-tqma9352: fix CMA alloc-ranges ARM: dts: imx6dl-yapp43: Increase LED current to match the yapp4 HW design arm64: dts: imx93: update default value for snps,clk-csr arm64: dts: freescale: tqma9352: Fix watchdog reset arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962 arm64: dts: layerscape: fix thermal node names length Link: https://lore.kernel.org/r/ZrtsTO1+jXhJ6GSM@dragon Signed-off-by: Arnd Bergmann commit 0351a9841ba1c8e299a9350e7e57668079dcf158 Merge: 47ac09b91befb 5062d9c0cbbc2 Author: Arnd Bergmann Date: Wed Aug 28 20:27:11 2024 +0000 Merge tag 'omap-for-v6.11/fixes-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into arm/fixes OMAP fixes for v6.11-rc - omap3-n900: fix accelerometer orientation * tag 'omap-for-v6.11/fixes-signed' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap: ARM: dts: omap3-n900: correct the accelerometer orientation Link: https://lore.kernel.org/r/7h4j7eyhyh.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit be721b451affbecc4ba4eaac3b71cdbdcade1b1b Author: Brian Norris Date: Tue Aug 27 10:11:16 2024 -0700 spi: rockchip: Resolve unbalanced runtime PM / system PM handling Commit e882575efc77 ("spi: rockchip: Suspend and resume the bus during NOIRQ_SYSTEM_SLEEP_PM ops") stopped respecting runtime PM status and simply disabled clocks unconditionally when suspending the system. This causes problems when the device is already runtime suspended when we go to sleep -- in which case we double-disable clocks and produce a WARNing. Switch back to pm_runtime_force_{suspend,resume}(), because that still seems like the right thing to do, and the aforementioned commit makes no explanation why it stopped using it. Also, refactor some of the resume() error handling, because it's not actually a good idea to re-disable clocks on failure. Fixes: e882575efc77 ("spi: rockchip: Suspend and resume the bus during NOIRQ_SYSTEM_SLEEP_PM ops") Cc: stable@vger.kernel.org Reported-by: Ondřej Jirman Closes: https://lore.kernel.org/lkml/20220621154218.sau54jeij4bunf56@core/ Signed-off-by: Brian Norris Link: https://patch.msgid.link/20240827171126.1115748-1-briannorris@chromium.org Signed-off-by: Mark Brown commit 928f79a188aacc057ba36c85b36b6d1e99c8f595 Merge: f9a59dd09749c 4956e07f05e23 Author: Linus Torvalds Date: Thu Aug 29 07:15:41 2024 +1200 Merge tag 'loongarch-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Remove the unused dma-direct.h, and some bug & warning fixes" * tag 'loongarch-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Invalidate guest steal time address on vCPU reset LoongArch: Add ifdefs to fix LSX and LASX related warnings LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE LoongArch: Remove the unused dma-direct.h commit f9a59dd09749c6303821e5d6cdff1affdb5917dd Merge: a18093afa393d a3379eca24a7d Author: Linus Torvalds Date: Thu Aug 29 07:12:02 2024 +1200 Merge tag 'platform-drivers-x86-v6.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform drivers fixes from Ilpo Järvinen: - platform/x86/amd/pmc: AMD 1Ah model 60h series support (2nd attempt) - asus-wmi: Prevent spurious rfkill on Asus Zenbook Duo - x86-android-tablets: Relax DMI match to cover another model * tag 'platform-drivers-x86-v6.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: x86-android-tablets: Make Lenovo Yoga Tab 3 X90F DMI match less strict platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA platform/x86/amd/pmc: Extend support for PMC features on new AMD platform platform/x86/amd/pmc: Fix SMU command submission path on new AMD platform commit a18093afa393d03599cbe42da2eb00d84a1c9a34 Merge: 2840526875c7e 7e8ae8486e447 Author: Linus Torvalds Date: Thu Aug 29 06:20:44 2024 +1200 Merge tag 'nfsd-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix a number of crashers - Update email address for an NFSD reviewer * tag 'nfsd-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: fs/nfsd: fix update of inode attrs in CB_GETATTR nfsd: fix potential UAF in nfsd4_cb_getattr_release nfsd: hold reference to delegation when updating it for cb_getattr MAINTAINERS: Update Olga Kornievskaia's email address nfsd: prevent panic for nfsv4.0 closed files in nfs4_show_open nfsd: ensure that nfsd4_fattr_args.context is zeroed out commit 2840526875c7e3bcfb3364420b70efa203bad428 Merge: 86987d84b968b ecb54277cb63c Author: Linus Torvalds Date: Thu Aug 29 06:17:46 2024 +1200 Merge tag 'for-6.11-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix use-after-free when submitting bios for read, after an error and partially submitted bio the original one is freed while it can be still be accessed again - fix fstests case btrfs/301, with enabled quotas wait for delayed iputs when flushing delalloc - fix periodic block group reclaim, an unitialized value can be returned if there are no block groups to reclaim - fix build warning (-Wmaybe-uninitialized) * tag 'for-6.11-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix uninitialized return value from btrfs_reclaim_sweep() btrfs: fix a use-after-free when hitting errors inside btrfs_submit_chunk() btrfs: initialize last_extent_end to fix -Wmaybe-uninitialized warning in extent_fiemap() btrfs: run delayed iputs when flushing delalloc commit f7790d67785302b3116bbbfda62a5a44524601a3 Author: Joanne Koong Date: Mon Aug 26 14:19:04 2024 -0700 fuse: update stats for pages in dropped aux writeback list In the case where the aux writeback list is dropped (e.g. the pages have been truncated or the connection is broken), the stats for its pages and backing device info need to be updated as well. Fixes: e2653bd53a98 ("fuse: fix leaked aux requests") Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Cc: # v5.1 Signed-off-by: Miklos Szeredi commit 76a51ac00ca2a72fe3e168b7fb0e70f75ba6f512 Author: Miklos Szeredi Date: Wed Aug 28 15:55:17 2024 +0200 fuse: clear PG_uptodate when using a stolen page Originally when a stolen page was inserted into fuse's page cache by fuse_try_move_page(), it would be marked uptodate. Then fuse_readpages_end() would call SetPageUptodate() again on the already uptodate page. Commit 413e8f014c8b ("fuse: Convert fuse_readpages_end() to use folio_end_read()") changed that by replacing the SetPageUptodate() + unlock_page() combination with folio_end_read(), which does mostly the same, except it sets the uptodate flag with an xor operation, which in the above scenario resulted in the uptodate flag being cleared, which in turn resulted in EIO being returned on the read. Fix by clearing PG_uptodate instead of setting it in fuse_try_move_page(), conforming to the expectation of folio_end_read(). Reported-by: Jürg Billeter Debugged-by: Matthew Wilcox Fixes: 413e8f014c8b ("fuse: Convert fuse_readpages_end() to use folio_end_read()") Cc: # v6.10 Signed-off-by: Miklos Szeredi commit 3002240d16494d798add0575e8ba1f284258ab34 Author: yangyun Date: Fri Aug 23 16:51:46 2024 +0800 fuse: fix memory leak in fuse_create_open The memory of struct fuse_file is allocated but not freed when get_create_ext return error. Fixes: 3e2b6fdbdc9a ("fuse: send security context of inode on file") Cc: stable@vger.kernel.org # v5.17 Signed-off-by: yangyun Signed-off-by: Miklos Szeredi commit 97f30876c94382d1b01d45c2c76be8911b196527 Author: Joanne Koong Date: Thu Jul 25 10:53:34 2024 -0700 fuse: check aborted connection before adding requests to pending list for resending There is a race condition where inflight requests will not be aborted if they are in the middle of being re-sent when the connection is aborted. If fuse_resend has already moved all the requests in the fpq->processing lists to its private queue ("to_queue") and then the connection starts and finishes aborting, these requests will be added to the pending queue and remain on it indefinitely. Fixes: 760eac73f9f6 ("fuse: Introduce a new notification type for resend pending requests") Signed-off-by: Joanne Koong Reviewed-by: Josef Bacik Reviewed-by: Jingbo Xu Cc: # v6.9 Signed-off-by: Miklos Szeredi commit b18915248a15eae7d901262f108d6ff0ffb4ffc1 Author: Jann Horn Date: Mon Aug 19 19:52:30 2024 +0200 fuse: use unsigned type for getxattr/listxattr size truncation The existing code uses min_t(ssize_t, outarg.size, XATTR_LIST_MAX) when parsing the FUSE daemon's response to a zero-length getxattr/listxattr request. On 32-bit kernels, where ssize_t and outarg.size are the same size, this is wrong: The min_t() will pass through any size values that are negative when interpreted as signed. fuse_listxattr() will then return this userspace-supplied negative value, which callers will treat as an error value. This kind of bug pattern can lead to fairly bad security bugs because of how error codes are used in the Linux kernel. If a caller were to convert the numeric error into an error pointer, like so: struct foo *func(...) { int len = fuse_getxattr(..., NULL, 0); if (len < 0) return ERR_PTR(len); ... } then it would end up returning this userspace-supplied negative value cast to a pointer - but the caller of this function wouldn't recognize it as an error pointer (IS_ERR_VALUE() only detects values in the narrow range in which legitimate errno values are), and so it would just be treated as a kernel pointer. I think there is at least one theoretical codepath where this could happen, but that path would involve virtio-fs with submounts plus some weird SELinux configuration, so I think it's probably not a concern in practice. Cc: stable@vger.kernel.org # v4.9 Fixes: 63401ccdb2ca ("fuse: limit xattr returned size") Signed-off-by: Jann Horn Signed-off-by: Miklos Szeredi commit 8396c793ffdf28bb8aee7cfe0891080f8cab7890 Author: Sam Protsenko Date: Wed Mar 6 17:20:52 2024 -0600 mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K Commit 616f87661792 ("mmc: pass queue_limits to blk_mq_alloc_disk") [1] revealed the long living issue in dw_mmc.c driver, existing since the time when it was first introduced in commit f95f3850f7a9 ("mmc: dw_mmc: Add Synopsys DesignWare mmc host driver."), also making kernel boot broken on platforms using dw_mmc driver with 16K or 64K pages enabled, with this message in dmesg: mmcblk: probe of mmc0:0001 failed with error -22 That's happening because mmc_blk_probe() fails when it calls blk_validate_limits() consequently, which returns the error due to failed max_segment_size check in this code: /* * The maximum segment size has an odd historic 64k default that * drivers probably should override. Just like the I/O size we * require drivers to at least handle a full page per segment. */ ... if (WARN_ON_ONCE(lim->max_segment_size < PAGE_SIZE)) return -EINVAL; In case when IDMAC (Internal DMA Controller) is used, dw_mmc.c always sets .max_seg_size to 4 KiB: mmc->max_seg_size = 0x1000; The comment in the code above explains why it's incorrect. Arnd suggested setting .max_seg_size to .max_req_size to fix it, which is also what some other drivers are doing: $ grep -rl 'max_seg_size.*=.*max_req_size' drivers/mmc/host/ | \ wc -l 18 This change is not only fixing the boot with 16K/64K pages, but also leads to a better MMC performance. The linear write performance was tested on E850-96 board (eMMC only), before commit [1] (where it's possible to boot with 16K/64K pages without this fix, to be able to do a comparison). It was tested with this command: # dd if=/dev/zero of=somefile bs=1M count=500 oflag=sync Test results are as follows: - 4K pages, .max_seg_size = 4 KiB: 94.2 MB/s - 4K pages, .max_seg_size = .max_req_size = 512 KiB: 96.9 MB/s - 16K pages, .max_seg_size = 4 KiB: 126 MB/s - 16K pages, .max_seg_size = .max_req_size = 2 MiB: 128 MB/s - 64K pages, .max_seg_size = 4 KiB: 138 MB/s - 64K pages, .max_seg_size = .max_req_size = 8 MiB: 138 MB/s Unfortunately, SD card controller is not enabled in E850-96 yet, so it wasn't possible for me to run the test on some cheap SD cards to check this patch's impact on those. But it's possible that this change might also reduce the writes count, thus improving SD/eMMC longevity. All credit for the analysis and the suggested solution goes to Arnd. [1] https://lore.kernel.org/all/20240215070300.2200308-18-hch@lst.de/ Fixes: f95f3850f7a9 ("mmc: dw_mmc: Add Synopsys DesignWare mmc host driver.") Suggested-by: Arnd Bergmann Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/all/CA+G9fYtddf2Fd3be+YShHP6CmSDNcn0ptW8qg+stUKW+Cn0rjQ@mail.gmail.com/ Signed-off-by: Sam Protsenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240306232052.21317-1-semen.protsenko@linaro.org Signed-off-by: Ulf Hansson commit 9c68a3b03e8109f3917fd35f39043499897d4a79 Author: Gautham R. Shenoy Date: Wed Aug 28 15:40:35 2024 +0530 cpufreq/amd-pstate: Remove warning for X86_FEATURE_CPPC on certain Zen models commit bff7d13c190a ("cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS") issues a warning on plaforms where the X86_FEATURE_CPPC is expected to be enabled, but is not due to it being disabled in the BIOS. This feature bit corresponds to CPUID 0x80000008.ebx[27] which is a reserved bit on the Zen1 processors and a reserved bit on Zen2 based models 0x70-0x7F, and is expected to be cleared on these platforms. Thus printing the warning message for these models when X86_FEATURE_CPPC is unavailable is incorrect. Fix this. Modify some of the comments, and use switch-case for model range checking for improved readability while at it. Fixes: bff7d13c190a ("cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS") Cc: Xiaojian Du Reported-by: David Wang <00107082@163.com> Closes: https://lore.kernel.org/lkml/20240730140111.4491-1-00107082@163.com/ Signed-off-by: Gautham R. Shenoy Acked-by: Mario Limonciello Signed-off-by: Mario Limonciello commit 6e540da4c1db7b840e347c4dfe48359b18b7e376 Author: Liao Chen Date: Mon Aug 26 12:48:51 2024 +0000 mmc: sdhci-of-aspeed: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Acked-by: Andrew Jeffery Fixes: bb7b8ec62dfb ("mmc: sdhci-of-aspeed: Add support for the ASPEED SD controller") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240826124851.379759-1-liaochen4@huawei.com Signed-off-by: Ulf Hansson commit e33a97a830b230b79a98dbbb4121d4741a2be619 Author: Darrick J. Wong Date: Tue Aug 27 10:53:40 2024 -0700 block: fix detection of unsupported WRITE SAME in blkdev_issue_write_zeroes On error, blkdev_issue_write_zeroes used to recheck the block device's WRITE SAME queue limits after submitting WRITE SAME bios. As stated in the comment, the purpose of this was to collapse all IO errors to EOPNOTSUPP if the effect of issuing bios was that WRITE SAME got turned off in the queue limits. Therefore, it does not make sense to reuse the zeroes limit that was read earlier in the function because we only care about the queue limit *now*, not what it was at the start of the function. Found by running generic/351 from fstests. Fixes: 64b582ca88ca1 ("block: Read max write zeroes once for __blkdev_issue_write_zeroes()") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20240827175340.GB1977952@frogsfrogsfrogs Signed-off-by: Jens Axboe commit 9d824c7fce58f59982228aa85b0376b113cdfa35 Author: Tvrtko Ursulin Date: Tue Aug 13 11:25:04 2024 +0100 drm/v3d: Disable preemption while updating GPU stats We forgot to disable preemption around the write_seqcount_begin/end() pair while updating GPU stats: [ ] WARNING: CPU: 2 PID: 12 at include/linux/seqlock.h:221 __seqprop_assert.isra.0+0x128/0x150 [v3d] [ ] Workqueue: v3d_bin drm_sched_run_job_work [gpu_sched] <...snip...> [ ] Call trace: [ ] __seqprop_assert.isra.0+0x128/0x150 [v3d] [ ] v3d_job_start_stats.isra.0+0x90/0x218 [v3d] [ ] v3d_bin_job_run+0x23c/0x388 [v3d] [ ] drm_sched_run_job_work+0x520/0x6d0 [gpu_sched] [ ] process_one_work+0x62c/0xb48 [ ] worker_thread+0x468/0x5b0 [ ] kthread+0x1c4/0x1e0 [ ] ret_from_fork+0x10/0x20 Fix it. Cc: Maíra Canal Cc: stable@vger.kernel.org # v6.10+ Fixes: 6abe93b621ab ("drm/v3d: Fix race-condition between sysfs/fdinfo and interrupt handler") Signed-off-by: Tvrtko Ursulin Acked-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240813102505.80512-1-tursulin@igalia.com commit 849f0d5880b7494030c4ee1e4fbaf2ca5422bca9 Author: Candice Li Date: Wed Aug 21 13:10:58 2024 +0800 drm/amd/pm: Drop unsupported features on smu v14_0_2 Drop unsupported features on smu v14_0_2. Signed-off-by: Candice Li Reviewed-by: Yang Wang Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 3376f922bfe070eff762164b3fc66981e3079417) commit badfdc6211f27803bc805fb56629f7d418670870 Author: Lijo Lazar Date: Fri Aug 16 14:34:17 2024 +0530 drm/amd/pm: Add support for new P2S table revision Add p2s table support for a new revision of SMUv13.0.6. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 010cc730ace807c6d267481b5fb6ff99acc35c46) commit 6d5064c379557d92832b51d247b385bb8bd6aa5b Author: Likun Gao Date: Thu Aug 22 11:44:12 2024 +0800 drm/amdgpu: support for gc_info table v1.3 Add gc_info table v1.3 for IP discovery. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 875ff9a7ee8824200885384effa7743892a34ed6) commit 3b9a33235c773c7a3768060cf1d2cf8a9153bc37 Author: Ma Ke Date: Wed Aug 21 12:27:24 2024 +0800 drm/amd/display: avoid using null object of framebuffer Instead of using state->fb->obj[0] directly, get object from framebuffer by calling drm_gem_fb_get_obj() and return error code when object is null to avoid using null object of framebuffer. Fixes: 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes") Signed-off-by: Ma Ke Signed-off-by: Alex Deucher (cherry picked from commit 73dd0ad9e5dad53766ea3e631303430116f834b3) commit 959fc102ff4c39f5ab021da311c2cfd1d5602a0c Author: Alex Deucher Date: Tue Aug 20 13:11:22 2024 -0400 drm/amdgpu/gfx12: set UNORD_DISPATCH in compute MQDs This needs to be set to 1 to avoid a potential deadlock in the GC 10.x and newer. On GC 9.x and older, this needs to be set to 0. This can lead to hangs in some mixed graphics and compute workloads. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3575 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 40318a2406bd426c6f4591269669c04e8eda571d) commit 37a45fb8db2619e03d26de59dbdb4ae2b0b02d7d Author: Kenneth Feng Date: Tue Aug 20 08:57:15 2024 +0800 drm/amd/pm: update message interface for smu v14.0.2/3 update message interface for smu v14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit 01bfabc2d1d8aaffe5268f8df0843a6d916dcbaa) commit d420c857d85777663e8d16adfc24463f5d5c2dbc Author: Alex Deucher Date: Thu Aug 22 21:54:24 2024 -0400 drm/amdgpu/swsmu: always force a state reprogram on init Always reprogram the hardware state on init. This ensures the PMFW state is explicitly programmed and we are not relying on the default PMFW state. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3131 Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher (cherry picked from commit c50fe289ed7207f71df3b5f1720512a9620e84fb) Cc: stable@vger.kernel.org commit 948f279dc48a6db17204f9b23f76b67abcd5d702 Author: Alex Deucher Date: Thu Aug 22 16:20:10 2024 -0400 drm/amdgpu/smu13.0.7: print index for profiles Print the index for the profiles. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3543 Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher (cherry picked from commit b86a6a57b8ad1699ba8b1c270a79678383baf632) commit 8f614469de248a4bc55fb07e55d5f4c340c75b11 Author: Alex Deucher Date: Wed Aug 21 14:32:02 2024 -0400 drm/amdgpu: align pp_power_profile_mode with kernel docs The kernel doc says you need to select manual mode to adjust this, but the code only allows you to adjust it when manual mode is not selected. Remove the manual mode check. Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher (cherry picked from commit bbb05f8a9cd87f5046d05a0c596fddfb714ee457) Cc: stable@vger.kernel.org commit 9f646ff25c09c52cebe726601db27a60f876f15e Author: Mrinmay Sarkar Date: Mon Aug 26 17:41:01 2024 +0530 dmaengine: dw-edma: Do not enable watermark interrupts for HDMA DW_HDMA_V0_LIE and DW_HDMA_V0_RIE are initialized as BIT(3) and BIT(4) respectively in dw_hdma_control enum. But as per HDMA register these bits are corresponds to LWIE and RWIE bit i.e local watermark interrupt enable and remote watermarek interrupt enable. In linked list mode LWIE and RWIE bits only enable the local and remote watermark interrupt. Since the watermark interrupts are not used but enabled, this leads to spurious interrupts getting generated. So remove the code that enables them to avoid generating spurious watermark interrupts. And also rename DW_HDMA_V0_LIE to DW_HDMA_V0_LWIE and DW_HDMA_V0_RIE to DW_HDMA_V0_RWIE as there is no LIE and RIE bits in HDMA and those bits are corresponds to LWIE and RWIE bits. Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") cc: stable@vger.kernel.org Signed-off-by: Mrinmay Sarkar Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/1724674261-3144-3-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Vinod Koul commit 383baf5c8f062091af34c63f28d37642a8f188ae Author: Mrinmay Sarkar Date: Mon Aug 26 17:41:00 2024 +0530 dmaengine: dw-edma: Fix unmasking STOP and ABORT interrupts for HDMA The current logic is enabling both STOP_INT_MASK and ABORT_INT_MASK bit. This is apparently masking those particular interrupts rather than unmasking the same. If the interrupts are masked, they would never get triggered. So fix the issue by unmasking the STOP and ABORT interrupts properly. Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") cc: stable@vger.kernel.org Signed-off-by: Mrinmay Sarkar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1724674261-3144-2-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Vinod Koul commit 8101d6e112e2524e967368f920c404ae445a9757 Author: David Howells Date: Tue Aug 27 15:47:27 2024 +0100 cifs: Fix copy offload to flush destination region Fix cifs_file_copychunk_range() to flush the destination region before invalidating it to avoid potential loss of data should the copy fail, in whole or in part, in some way. Fixes: 7b2404a886f8 ("cifs: Fix flushing, invalidation and file size with copy_file_range()") Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Shyam Prasad N cc: Rohith Surabattula cc: Matthew Wilcox cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 1da29f2c39b67b846b74205c81bf0ccd96d34727 Author: David Howells Date: Thu Aug 22 23:06:49 2024 +0100 netfs, cifs: Fix handling of short DIO read Short DIO reads, particularly in relation to cifs, are not being handled correctly by cifs and netfslib. This can be tested by doing a DIO read of a file where the size of read is larger than the size of the file. When it crosses the EOF, it gets a short read and this gets retried, and in the case of cifs, the retry read fails, with the failure being translated to ENODATA. Fix this by the following means: (1) Add a flag, NETFS_SREQ_HIT_EOF, for the filesystem to set when it detects that the read did hit the EOF. (2) Make the netfslib read assessment stop processing subrequests when it encounters one with that flag set. (3) Return rreq->transferred, the accumulated contiguous amount read to that point, to userspace for a DIO read. (4) Make cifs set the flag and clear the error if the read RPC returned ENODATA. (5) Make cifs set the flag and clear the error if a short read occurred without error and the read-to file position is now at the remote inode size. Fixes: 69c3c023af25 ("cifs: Implement netfslib hooks") Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 6a5dcd487791e0c2d86622064602a5c7459941ed Author: David Howells Date: Thu Aug 22 23:06:48 2024 +0100 cifs: Fix lack of credit renegotiation on read retry When netfslib asks cifs to issue a read operation, it prefaces this with a call to ->clamp_length() which cifs uses to negotiate credits, providing receive capacity on the server; however, in the event that a read op needs reissuing, netfslib doesn't call ->clamp_length() again as that could shorten the subrequest, leaving a gap. This causes the retried read to be done with zero credits which causes the server to reject it with STATUS_INVALID_PARAMETER. This is a problem for a DIO read that is requested that would go over the EOF. The short read will be retried, causing EINVAL to be returned to the user when it fails. Fix this by making cifs_req_issue_read() negotiate new credits if retrying (NETFS_SREQ_RETRYING now gets set in the read side as well as the write side in this instance). This isn't sufficient, however: the new credits might not be sufficient to complete the remainder of the read, so also add an additional field, rreq->actual_len, that holds the actual size of the op we want to perform without having to alter subreq->len. We then rely on repeated short reads being retried until we finish the read or reach the end of file and make a zero-length read. Also fix a couple of places where the subrequest start and length need to be altered by the amount so far transferred when being used. Fixes: 69c3c023af25 ("cifs: Implement netfslib hooks") Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 5fa9f0480c7985e44e6ec32def0a395b768599cc Author: Vitaly Kuznetsov Date: Wed Aug 28 14:21:11 2024 +0200 KVM: SEV: Update KVM_AMD_SEV Kconfig entry and mention SEV-SNP SEV-SNP support is present since commit 1dfe571c12cf ("KVM: SEV: Add initial SEV-SNP support") but Kconfig entry wasn't updated and still mentions SEV and SEV-ES only. Add SEV-SNP there and, while on it, expand 'SEV' in the description as 'Encrypted VMs' is not what 'SEV' stands for. No functional change. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240828122111.160273-1-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit e0be875c5bf03a9676a6bfed9e0f1766922a7dbd Author: Chen-Yu Tsai Date: Wed Aug 21 12:10:04 2024 +0800 ASoc: SOF: topology: Clear SOF link platform name upon unload The SOF topology loading function sets the device name for the platform component link. This should be unset when unloading the topology, otherwise a machine driver unbind/bind or reprobe would complain about an invalid component as having both its component name and of_node set: mt8186_mt6366 sound: ASoC: Both Component name/of_node are set for AFE_SOF_DL1 mt8186_mt6366 sound: error -EINVAL: Cannot register card mt8186_mt6366 sound: probe with driver mt8186_mt6366 failed with error -22 This happens with machine drivers that set the of_node separately. Clear the SOF link platform name in the topology unload callback. Fixes: 311ce4fe7637 ("ASoC: SOF: Add support for loading topologies") Signed-off-by: Chen-Yu Tsai Link: https://patch.msgid.link/20240821041006.2618855-1-wenst@chromium.org Signed-off-by: Mark Brown commit a547a5880cba6f287179135381f1b484b251be31 Author: Peter Newman Date: Thu Aug 22 12:02:11 2024 -0700 x86/resctrl: Fix arch_mbm_* array overrun on SNC When using resctrl on systems with Sub-NUMA Clustering enabled, monitoring groups may be allocated RMID values which would overrun the arch_mbm_{local,total} arrays. This is due to inconsistencies in whether the SNC-adjusted num_rmid value or the unadjusted value in resctrl_arch_system_num_rmid_idx() is used. The num_rmid value for the L3 resource is currently: resctrl_arch_system_num_rmid_idx() / snc_nodes_per_l3_cache As a simple fix, make resctrl_arch_system_num_rmid_idx() return the SNC-adjusted, L3 num_rmid value on x86. Fixes: e13db55b5a0d ("x86/resctrl: Introduce snc_nodes_per_l3_cache") Signed-off-by: Peter Newman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20240822190212.1848788-1-peternewman@google.com commit a2ccc33b88e2953a6bf0b309e7e8849cc5320018 Author: Imre Deak Date: Fri Aug 23 19:29:18 2024 +0300 drm/i915/dp_mst: Fix MST state after a sink reset In some cases the sink can reset itself after it was configured into MST mode, without the driver noticing the disconnected state. For instance the reset may happen in the middle of a modeset, or the (long) HPD pulse generated may be not long enough for the encoder detect handler to observe the HPD's deasserted state. In this case the sink's DPCD register programmed to enable MST will be reset, while the driver still assumes MST is still enabled. Detect this condition, which will tear down and recreate/re-enable the MST topology. v2: - Add a code comment about adjusting the expected DP_MSTM_CTRL register value for SST + SideBand. (Suraj, Jani) - Print a debug message about detecting the link reset. (Jani) - Verify the DPCD MST state only if it wasn't already determined that the sink is disconnected. Cc: stable@vger.kernel.org Cc: Jani Nikula Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11195 Reviewed-by: Suraj Kandpal (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240823162918.1211875-1-imre.deak@intel.com (cherry picked from commit 594cf78dc36f31c0c7e0de4567e644f406d46bae) Signed-off-by: Joonas Lahtinen commit 4178d78cd7a86510ba68d203f26fc01113c7f126 Author: Christoffer Sandberg Date: Tue Aug 27 12:25:40 2024 +0200 ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices The Sirius notebooks have two sets of speakers 0x17 (sides) and 0x1d (top center). The side speakers are active by default but the top speakers aren't. This patch provides a pincfg quirk to activate the top speakers. Signed-off-by: Christoffer Sandberg Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20240827102540.9480-1-wse@tuxedocomputers.com Signed-off-by: Takashi Iwai commit 86987d84b968b69a610fd00ab9006c13db193b4e Merge: 46d22bfdf0bc7 416871f4fb84b Author: Linus Torvalds Date: Wed Aug 28 15:05:02 2024 +1200 Merge tag 'v6.11-rc5-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - two RDMA/smbdirect fixes and a minor cleanup - punch hole fix * tag 'v6.11-rc5-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix FALLOC_FL_PUNCH_HOLE support smb/client: fix rdma usage in smb2_async_writev() smb/client: remove unused rq_iter_size from struct smb_rqst smb/client: avoid dereferencing rdata=NULL in smb2_new_read_req() commit 46d22bfdf0bc76429f596c58ca74a8f67d0f6251 Merge: 3ec3f5fc4a91e 08d08e2e9f0ad Author: Linus Torvalds Date: Wed Aug 28 14:55:48 2024 +1200 Merge tag 'tpmdd-next-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull TPM fix from Jarkko Sakkinen: "A bug fix for tpm_ibmvtpm driver so that it will take the bus encryption into use" * tag 'tpmdd-next-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: ibmvtpm: Call tpm2_sessions_init() to initialize session support commit 3a0504d54b3b57f0d7bf3d9184a00c9f8887f6d7 Author: Ondrej Mosnacek Date: Mon Aug 26 15:07:11 2024 +0200 sctp: fix association labeling in the duplicate COOKIE-ECHO case sctp_sf_do_5_2_4_dupcook() currently calls security_sctp_assoc_request() on new_asoc, but as it turns out, this association is always discarded and the LSM labels never get into the final association (asoc). This can be reproduced by having two SCTP endpoints try to initiate an association with each other at approximately the same time and then peel off the association into a new socket, which exposes the unitialized labels and triggers SELinux denials. Fix it by calling security_sctp_assoc_request() on asoc instead of new_asoc. Xin Long also suggested limit calling the hook only to cases A, B, and D, since in cases C and E the COOKIE ECHO chunk is discarded and the association doesn't enter the ESTABLISHED state, so rectify that as well. One related caveat with SELinux and peer labeling: When an SCTP connection is set up simultaneously in this way, we will end up with an association that is initialized with security_sctp_assoc_request() on both sides, so the MLS component of the security context of the association will get swapped between the peers, instead of just one side setting it to the other's MLS component. However, at that point security_sctp_assoc_request() had already been called on both sides in sctp_sf_do_unexpected_init() (on a temporary association) and thus if the exchange didn't fail before due to MLS, it won't fail now either (most likely both endpoints have the same MLS range). Tested by: - reproducer from https://src.fedoraproject.org/tests/selinux/pull-request/530 - selinux-testsuite (https://github.com/SELinuxProject/selinux-testsuite/) - sctp-tests (https://github.com/sctp/sctp-tests) - no tests failed that wouldn't fail also without the patch applied Fixes: c081d53f97a1 ("security: pass asoc to sctp_assoc_request and sctp_sk_clone") Suggested-by: Xin Long Signed-off-by: Ondrej Mosnacek Acked-by: Xin Long Acked-by: Paul Moore (LSM/SELinux) Link: https://patch.msgid.link/20240826130711.141271-1-omosnace@redhat.com Signed-off-by: Jakub Kicinski commit 237c3851dc81f418ef735bb71ef482e126f78ea0 Merge: bac76cf89816b cb41b195e634d Author: Jakub Kicinski Date: Tue Aug 27 14:45:18 2024 -0700 Merge branch 'mptcp-close-subflow-when-receiving-tcp-fin-and-misc' Matthieu Baerts says: ==================== mptcp: close subflow when receiving TCP+FIN and misc. Here are different fixes: Patch 1 closes the subflow after having received a FIN, instead of leaving it half-closed until the end of the MPTCP connection. A fix for v5.12. Patch 2 validates the previous patch. Patch 3 is a fix for a recent fix to check both directions for the backup flag. It can follow the 'Fixes' commit and be backported up to v5.7. Patch 4 adds a missing \n at the end of pr_debug(), causing debug messages to be displayed with a delay, which confuses the debugger. A fix for v5.6. ==================== Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-0-905199fe1172@kernel.org Signed-off-by: Jakub Kicinski commit cb41b195e634d3f1ecfcd845314e64fd4bb3c7aa Author: Matthieu Baerts (NGI0) Date: Mon Aug 26 19:11:21 2024 +0200 mptcp: pr_debug: add missing \n at the end pr_debug() have been added in various places in MPTCP code to help developers to debug some situations. With the dynamic debug feature, it is easy to enable all or some of them, and asks users to reproduce issues with extra debug. Many of these pr_debug() don't end with a new line, while no 'pr_cont()' are used in MPTCP code. So the goal was not to display multiple debug messages on one line: they were then not missing the '\n' on purpose. Not having the new line at the end causes these messages to be printed with a delay, when something else needs to be printed. This issue is not visible when many messages need to be printed, but it is annoying and confusing when only specific messages are expected, e.g. # echo "func mptcp_pm_add_addr_echoed +fmp" \ > /sys/kernel/debug/dynamic_debug/control # ./mptcp_join.sh "signal address"; \ echo "$(awk '{print $1}' /proc/uptime) - end"; \ sleep 5s; \ echo "$(awk '{print $1}' /proc/uptime) - restart"; \ ./mptcp_join.sh "signal address" 013 signal address (...) 10.75 - end 15.76 - restart 013 signal address [ 10.367935] mptcp:mptcp_pm_add_addr_echoed: MPTCP: msk=(...) (...) => a delay of 5 seconds: printed with a 10.36 ts, but after 'restart' which was printed at the 15.76 ts. The 'Fixes' tag here below points to the first pr_debug() used without '\n' in net/mptcp. This patch could be split in many small ones, with different Fixes tag, but it doesn't seem worth it, because it is easy to re-generate this patch with this simple 'sed' command: git grep -l pr_debug -- net/mptcp | xargs sed -i "s/\(pr_debug(\".*[^n]\)\(\"[,)]\)/\1\\\n\2/g" So in case of conflicts, simply drop the modifications, and launch this command. Fixes: f870fa0b5768 ("mptcp: Add MPTCP socket stubs") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-4-905199fe1172@kernel.org Signed-off-by: Jakub Kicinski commit 2a1f596ebb23eadc0f9b95a8012e18ef76295fc8 Author: Matthieu Baerts (NGI0) Date: Mon Aug 26 19:11:20 2024 +0200 mptcp: sched: check both backup in retrans The 'mptcp_subflow_context' structure has two items related to the backup flags: - 'backup': the subflow has been marked as backup by the other peer - 'request_bkup': the backup flag has been set by the host Looking only at the 'backup' flag can make sense in some cases, but it is not the behaviour of the default packet scheduler when selecting paths. As explained in the commit b6a66e521a20 ("mptcp: sched: check both directions for backup"), the packet scheduler should look at both flags, because that was the behaviour from the beginning: the 'backup' flag was set by accident instead of the 'request_bkup' one. Now that the latter has been fixed, get_retrans() needs to be adapted as well. Fixes: b6a66e521a20 ("mptcp: sched: check both directions for backup") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-3-905199fe1172@kernel.org Signed-off-by: Jakub Kicinski commit e93681afcb96864ec26c3b2ce94008ce93577373 Author: Matthieu Baerts (NGI0) Date: Mon Aug 26 19:11:19 2024 +0200 selftests: mptcp: join: cannot rm sf if closed Thanks to the previous commit, the MPTCP subflows are now closed on both directions even when only the MPTCP path-manager of one peer asks for their closure. In the two tests modified here -- "userspace pm add & remove address" and "userspace pm create destroy subflow" -- one peer is controlled by the userspace PM, and the other one by the in-kernel PM. When the userspace PM sends a RM_ADDR notification, the in-kernel PM will automatically react by closing all subflows using this address. Now, thanks to the previous commit, the subflows are properly closed on both directions, the userspace PM can then no longer closes the same subflows if they are already closed. Before, it was OK to do that, because the subflows were still half-opened, still OK to send a RM_ADDR. In other words, thanks to the previous commit closing the subflows, an error will be returned to the userspace if it tries to close a subflow that has already been closed. So no need to run this command, which mean that the linked counters will then not be incremented. These tests are then no longer sending both a RM_ADDR, then closing the linked subflow just after. The test with the userspace PM on the server side is now removing one subflow linked to one address, then sending a RM_ADDR for another address. The test with the userspace PM on the client side is now only removing the subflow that was previously created. Fixes: 4369c198e599 ("selftests: mptcp: test userspace pm out of transfer") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-2-905199fe1172@kernel.org Signed-off-by: Jakub Kicinski commit f09b0ad55a1196f5891663f8888463c0541059cb Author: Matthieu Baerts (NGI0) Date: Mon Aug 26 19:11:18 2024 +0200 mptcp: close subflow when receiving TCP+FIN When a peer decides to close one subflow in the middle of a connection having multiple subflows, the receiver of the first FIN should accept that, and close the subflow on its side as well. If not, the subflow will stay half closed, and would even continue to be used until the end of the MPTCP connection or a reset from the network. The issue has not been seen before, probably because the in-kernel path-manager always sends a RM_ADDR before closing the subflow. Upon the reception of this RM_ADDR, the other peer will initiate the closure on its side as well. On the other hand, if the RM_ADDR is lost, or if the path-manager of the other peer only closes the subflow without sending a RM_ADDR, the subflow would switch to TCP_CLOSE_WAIT, but that's it, leaving the subflow half-closed. So now, when the subflow switches to the TCP_CLOSE_WAIT state, and if the MPTCP connection has not been closed before with a DATA_FIN, the kernel owning the subflow schedules its worker to initiate the closure on its side as well. This issue can be easily reproduced with packetdrill, as visible in [1], by creating an additional subflow, injecting a FIN+ACK before sending the DATA_FIN, and expecting a FIN+ACK in return. Fixes: 40947e13997a ("mptcp: schedule worker when subflow is closed") Cc: stable@vger.kernel.org Link: https://github.com/multipath-tcp/packetdrill/pull/154 [1] Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-1-905199fe1172@kernel.org Signed-off-by: Jakub Kicinski commit bac76cf89816bff06c4ec2f3df97dc34e150a1c4 Author: Xueming Feng Date: Mon Aug 26 18:23:27 2024 +0800 tcp: fix forever orphan socket caused by tcp_abort We have some problem closing zero-window fin-wait-1 tcp sockets in our environment. This patch come from the investigation. Previously tcp_abort only sends out reset and calls tcp_done when the socket is not SOCK_DEAD, aka orphan. For orphan socket, it will only purging the write queue, but not close the socket and left it to the timer. While purging the write queue, tp->packets_out and sk->sk_write_queue is cleared along the way. However tcp_retransmit_timer have early return based on !tp->packets_out and tcp_probe_timer have early return based on !sk->sk_write_queue. This caused ICSK_TIME_RETRANS and ICSK_TIME_PROBE0 not being resched and socket not being killed by the timers, converting a zero-windowed orphan into a forever orphan. This patch removes the SOCK_DEAD check in tcp_abort, making it send reset to peer and close the socket accordingly. Preventing the timer-less orphan from happening. According to Lorenzo's email in the v1 thread, the check was there to prevent force-closing the same socket twice. That situation is handled by testing for TCP_CLOSE inside lock, and returning -ENOENT if it is already closed. The -ENOENT code comes from the associate patch Lorenzo made for iproute2-ss; link attached below, which also conform to RFC 9293. At the end of the patch, tcp_write_queue_purge(sk) is removed because it was already called in tcp_done_with_error(). p.s. This is the same patch with v2. Resent due to mis-labeled "changes requested" on patchwork.kernel.org. Link: https://patchwork.ozlabs.org/project/netdev/patch/1450773094-7978-3-git-send-email-lorenzo@google.com/ Fixes: c1e64e298b8c ("net: diag: Support destroying TCP sockets.") Signed-off-by: Xueming Feng Tested-by: Lorenzo Colitti Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240826102327.1461482-1-kuro@kuroa.me Signed-off-by: Jakub Kicinski commit defd8b3c37b0f9cb3e0f60f47d3d78d459d57fda Author: Cong Wang Date: Sun Aug 25 12:16:38 2024 -0700 gtp: fix a potential NULL pointer dereference When sockfd_lookup() fails, gtp_encap_enable_socket() returns a NULL pointer, but its callers only check for error pointers thus miss the NULL pointer case. Fix it by returning an error pointer with the error code carried from sockfd_lookup(). (I found this bug during code inspection.) Fixes: 1e3a3abd8b28 ("gtp: make GTP sockets in gtp_newlink optional") Cc: Andreas Schultz Cc: Harald Welte Signed-off-by: Cong Wang Reviewed-by: Simon Horman Reviewed-by: Pablo Neira Ayuso Link: https://patch.msgid.link/20240825191638.146748-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit 8e95e53ca379a03d7f5bfc567a610baa85e15424 Author: Miguel Ojeda Date: Tue Aug 27 12:04:03 2024 +0200 rust: allow `stable_features` lint Support for several Rust compiler versions started in commit 63b27f4a0074 ("rust: start supporting several compiler versions"). Since we currently need to use a number of unstable features in the kernel, it is a matter of time until one gets stabilized and the `stable_features` lint warns. For instance, the `new_uninit` feature may become stable soon, which would give us multiple warnings like the following: warning: the feature `new_uninit` has been stable since 1.82.0-dev and no longer requires an attribute to enable --> rust/kernel/lib.rs:17:12 | 17 | #![feature(new_uninit)] | ^^^^^^^^^^ | = note: `#[warn(stable_features)]` on by default Thus allow the `stable_features` lint to avoid such warnings. This is the simplest approach -- we do not have that many cases (and the goal is to stop using unstable features anyway) and cleanups can be easily done when we decide to update the minimum version. An alternative would be to conditionally enable them based on the compiler version (with the upcoming `RUSTC_VERSION` or maybe with the unstable `cfg(version(...))`, but that one apparently will not work for the nightly case). However, doing so is more complex and may not work well for different nightlies of the same version, unless we do not care about older nightlies. Another alternative is using explicit tests of the feature calling `rustc`, but that is also more complex and slower. Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20240827100403.376389-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 7d2fc5a4038df307393769e198a8b1bf189fd6e5 Author: Jon Mulder Date: Mon Aug 26 17:10:32 2024 -0400 docs: rust: remove unintended blockquote in Quick Start Remove indentation within the "Hacking" section of the Rust Quick Start guide, i.e. remove a `
` HTML element from the rendered documentation. Reported-by: Miguel Ojeda Closes: https://github.com/Rust-for-Linux/linux/issues/1103 Fixes: d07479b211b7 ("docs: add Rust documentation") Signed-off-by: Jon Mulder Link: https://lore.kernel.org/r/20240826-pr-docs-rust-remove-quickstart-blockquote-v1-1-c51317d8d71a@gmail.com [ Added Fixes tag, reworded slightly and matched title to a previous, similar commit. - Miguel ] Signed-off-by: Miguel Ojeda commit 2fecbf75c40aca51ae35accbaa6ea051bb2340c4 Merge: 65a3cce43d5b4 2aeeef906d5a5 Author: Jakub Kicinski Date: Tue Aug 27 13:11:39 2024 -0700 Merge branch 'fixes-for-ipsec-over-bonding' Jianbo Liu says: ==================== Fixes for IPsec over bonding This patchset provides bug fixes for IPsec over bonding driver. It adds the missing xdo_dev_state_free API, and fixes "scheduling while atomic" by using mutex lock instead. Series generated against: commit c07ff8592d57 ("netem: fix return value if duplicate enqueue fails") ==================== Link: https://patch.msgid.link/20240823031056.110999-1-jianbol@nvidia.com Signed-off-by: Jakub Kicinski commit 2aeeef906d5a526dc60cf4af92eda69836c39b1f Author: Jianbo Liu Date: Fri Aug 23 06:10:56 2024 +0300 bonding: change ipsec_lock from spin lock to mutex In the cited commit, bond->ipsec_lock is added to protect ipsec_list, hence xdo_dev_state_add and xdo_dev_state_delete are called inside this lock. As ipsec_lock is a spin lock and such xfrmdev ops may sleep, "scheduling while atomic" will be triggered when changing bond's active slave. [ 101.055189] BUG: scheduling while atomic: bash/902/0x00000200 [ 101.055726] Modules linked in: [ 101.058211] CPU: 3 PID: 902 Comm: bash Not tainted 6.9.0-rc4+ #1 [ 101.058760] Hardware name: [ 101.059434] Call Trace: [ 101.059436] [ 101.060873] dump_stack_lvl+0x51/0x60 [ 101.061275] __schedule_bug+0x4e/0x60 [ 101.061682] __schedule+0x612/0x7c0 [ 101.062078] ? __mod_timer+0x25c/0x370 [ 101.062486] schedule+0x25/0xd0 [ 101.062845] schedule_timeout+0x77/0xf0 [ 101.063265] ? asm_common_interrupt+0x22/0x40 [ 101.063724] ? __bpf_trace_itimer_state+0x10/0x10 [ 101.064215] __wait_for_common+0x87/0x190 [ 101.064648] ? usleep_range_state+0x90/0x90 [ 101.065091] cmd_exec+0x437/0xb20 [mlx5_core] [ 101.065569] mlx5_cmd_do+0x1e/0x40 [mlx5_core] [ 101.066051] mlx5_cmd_exec+0x18/0x30 [mlx5_core] [ 101.066552] mlx5_crypto_create_dek_key+0xea/0x120 [mlx5_core] [ 101.067163] ? bonding_sysfs_store_option+0x4d/0x80 [bonding] [ 101.067738] ? kmalloc_trace+0x4d/0x350 [ 101.068156] mlx5_ipsec_create_sa_ctx+0x33/0x100 [mlx5_core] [ 101.068747] mlx5e_xfrm_add_state+0x47b/0xaa0 [mlx5_core] [ 101.069312] bond_change_active_slave+0x392/0x900 [bonding] [ 101.069868] bond_option_active_slave_set+0x1c2/0x240 [bonding] [ 101.070454] __bond_opt_set+0xa6/0x430 [bonding] [ 101.070935] __bond_opt_set_notify+0x2f/0x90 [bonding] [ 101.071453] bond_opt_tryset_rtnl+0x72/0xb0 [bonding] [ 101.071965] bonding_sysfs_store_option+0x4d/0x80 [bonding] [ 101.072567] kernfs_fop_write_iter+0x10c/0x1a0 [ 101.073033] vfs_write+0x2d8/0x400 [ 101.073416] ? alloc_fd+0x48/0x180 [ 101.073798] ksys_write+0x5f/0xe0 [ 101.074175] do_syscall_64+0x52/0x110 [ 101.074576] entry_SYSCALL_64_after_hwframe+0x4b/0x53 As bond_ipsec_add_sa_all and bond_ipsec_del_sa_all are only called from bond_change_active_slave, which requires holding the RTNL lock. And bond_ipsec_add_sa and bond_ipsec_del_sa are xfrm state xdo_dev_state_add and xdo_dev_state_delete APIs, which are in user context. So ipsec_lock doesn't have to be spin lock, change it to mutex, and thus the above issue can be resolved. Fixes: 9a5605505d9c ("bonding: Add struct bond_ipesc to manage SA") Signed-off-by: Jianbo Liu Signed-off-by: Tariq Toukan Reviewed-by: Hangbin Liu Acked-by: Jay Vosburgh Link: https://patch.msgid.link/20240823031056.110999-4-jianbol@nvidia.com Signed-off-by: Jakub Kicinski commit 907ed83a7583e8ffede88c5ac088392701a7d458 Author: Jianbo Liu Date: Fri Aug 23 06:10:55 2024 +0300 bonding: extract the use of real_device into local variable Add a local variable for slave->dev, to prepare for the lock change in the next patch. There is no functionality change. Fixes: 9a5605505d9c ("bonding: Add struct bond_ipesc to manage SA") Signed-off-by: Jianbo Liu Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Reviewed-by: Hangbin Liu Acked-by: Jay Vosburgh Link: https://patch.msgid.link/20240823031056.110999-3-jianbol@nvidia.com Signed-off-by: Jakub Kicinski commit ec13009472f4a756288eb4e18e20a7845da98d10 Author: Jianbo Liu Date: Fri Aug 23 06:10:54 2024 +0300 bonding: implement xdo_dev_state_free and call it after deletion Add this implementation for bonding, so hardware resources can be freed from the active slave after xfrm state is deleted. The netdev used to invoke xdo_dev_state_free callback, is saved in the xfrm state (xs->xso.real_dev), which is also the bond's active slave. To prevent it from being freed, acquire netdev reference before leaving RCU read-side critical section, and release it after callback is done. And call it when deleting all SAs from old active real interface while switching current active slave. Fixes: 9a5605505d9c ("bonding: Add struct bond_ipesc to manage SA") Signed-off-by: Jianbo Liu Signed-off-by: Tariq Toukan Reviewed-by: Hangbin Liu Acked-by: Jay Vosburgh Link: https://patch.msgid.link/20240823031056.110999-2-jianbol@nvidia.com Signed-off-by: Jakub Kicinski commit 65a3cce43d5b4c53cf16b0be1a03991f665a0806 Author: Petr Machata Date: Mon Aug 26 19:15:11 2024 +0200 selftests: forwarding: local_termination: Down ports on cleanup This test neglects to put ports down on cleanup. Fix it. Fixes: 90b9566aa5cd ("selftests: forwarding: add a test for local_termination.sh") Signed-off-by: Petr Machata Link: https://patch.msgid.link/bf9b79f45de378f88344d44550f0a5052b386199.1724692132.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit e8497d6951ee8541d73784f9aac9942a7f239980 Author: Petr Machata Date: Fri Aug 23 18:25:37 2024 +0200 selftests: forwarding: no_forwarding: Down ports on cleanup This test neglects to put ports down on cleanup. Fix it. Fixes: 476a4f05d9b8 ("selftests: forwarding: add a no_forwarding.sh test") Signed-off-by: Petr Machata Reviewed-by: Simon Horman Link: https://patch.msgid.link/0baf91dc24b95ae0cadfdf5db05b74888e6a228a.1724430120.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 61aa894e7a2fda4ee026523b01d07e83ce2abb72 Author: Georg Gottleuber Date: Tue Aug 27 12:41:33 2024 +0200 nvme-pci: Add sleep quirk for Samsung 990 Evo On some TUXEDO platforms, a Samsung 990 Evo NVMe leads to a high power consumption in s2idle sleep (2-3 watts). This patch applies 'Force No Simple Suspend' quirk to achieve a sleep with a lower power consumption, typically around 0.5 watts. Signed-off-by: Georg Gottleuber Signed-off-by: Werner Sembach Cc: Signed-off-by: Keith Busch commit 15d75184a86fdd8ba56e17606c3088ac60150ab3 Merge: 5be63fc19fcaa 9983a9cd4d429 Author: Rafael J. Wysocki Date: Tue Aug 27 20:40:10 2024 +0200 Merge tag 'amd-pstate-v6.11-2024-08-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge amd-pstate driver fixes for 6.11-rc6 from Mario Limonciello: "amd-pstate fixes for 6.11-rc - Fix to unit test coverage - Fix bug with enabling CPPC on hetero designs - Fix uninitialized variable" * tag 'amd-pstate-v6.11-2024-08-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore cpufreq/amd-pstate: Use topology_logical_package_id() instead of logical_die_id() cpufreq: amd-pstate: Fix uninitialized variable in amd_pstate_cpu_boost_update() commit 3ec3f5fc4a91e389ea56b111a73d97ffc94f19c6 Merge: 41594663c3fb5 052f3951640fd Author: Linus Torvalds Date: Wed Aug 28 06:34:08 2024 +1200 Merge tag 'livepatching-for-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching fix from Petr Mladek: "Selftest regression fix" * tag 'livepatching-for-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests/livepatch: wait for atomic replace to occur commit 41594663c3fb565940ec2b947bd7e623e3f0e600 Merge: 6ace1c7ea2972 128f71fe014fc Author: Linus Torvalds Date: Wed Aug 28 06:26:32 2024 +1200 Merge tag 'pinctrl-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Fix the hwirq map and pin offsets in the Qualcomm X1E80100 driver - Fix the pin range handling in the AT91 driver so it works again - Fix a NULL-dereference risk in pinctrl single - Fix a serious biasing bug in the Mediatek driver - Fix the level trigged IRQ in the StarFive JH7110 - Fix the iomux width in the Rockchip GPIO2-B pin handling * tag 'pinctrl-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register pinctrl: qcom: x1e80100: Fix special pin offsets pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE pinctrl: single: fix potential NULL dereference in pcs_get_function() pinctrl: at91: make it work with current gpiolib pinctrl: qcom: x1e80100: Update PDC hwirq map commit 6ace1c7ea2972bb3d8bfd5ca3d1a1b2bbc41687e Merge: 3e9bff3bbe135 28b329f431cef Author: Linus Torvalds Date: Wed Aug 28 06:24:22 2024 +1200 Merge tag 'sound-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "It became a bit larger collection of fixes than wished at this time, but all changes are small and mostly device-specific fixes that should be fairly safe to apply. Majority of fixes are about ASoC for AMD SOF, Cirrus codecs, lpass, etc, in addition to the usual HD-audio quirks / fixes" * tag 'sound-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (22 commits) ALSA: hda: hda_component: Fix mutex crash if nothing ever binds ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book3 Ultra ASoC: cs-amp-lib: Ignore empty UEFI calibration entries ASoC: cs-amp-lib-test: Force test calibration blob entries to be valid ALSA: hda/realtek - FIxed ALC285 headphone no sound ALSA: hda/realtek - Fixed ALC256 headphone no sound ASoC: allow module autoloading for table board_ids ASoC: allow module autoloading for table db1200_pids ALSA: hda: cs35l56: Don't use the device index as a calibration index ALSA: seq: Skip event type filtering for UMP events ALSA: hda/realtek: Enable mute/micmute LEDs on HP Laptop 14-ey0xxx ASoC: SOF: amd: Fix for acp init sequence ASoC: amd: acp: fix module autoloading ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile ASoC: codecs: wcd937x: Fix missing de-assert of reset GPIO ASoC: SOF: mediatek: Add missing board compatible ASoC: MAINTAINERS: Drop Banajit Goswami from Qualcomm sound drivers ASoC: SOF: amd: Fix for incorrect acp error register offsets ASoC: SOF: amd: move iram-dram fence register programming sequence ... commit 08d08e2e9f0ad1af0044e4747723f66677c35ee9 Author: Stefan Berger Date: Mon Jul 29 09:29:34 2024 -0400 tpm: ibmvtpm: Call tpm2_sessions_init() to initialize session support Commit d2add27cf2b8 ("tpm: Add NULL primary creation") introduced CONFIG_TCG_TPM2_HMAC. When this option is enabled on ppc64 then the following message appears in the kernel log due to a missing call to tpm2_sessions_init(). [ 2.654549] tpm tpm0: auth session is not active Add the missing call to tpm2_session_init() to the ibmvtpm driver to resolve this issue. Cc: stable@vger.kernel.org # v6.10+ Fixes: d2add27cf2b8 ("tpm: Add NULL primary creation") Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit ca082333b4356688be715ed9cc762fc5d3d5f4c5 Author: Bryan O'Donoghue Date: Fri Aug 23 13:58:56 2024 +0100 clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs Per Stephen Boyd's explanation in the link below, QUP RCG clocks do not need to be parked when switching frequency. A side-effect in parking to a lower frequency can be a momentary invalid clock driven on an in-use serial peripheral. This can cause "junk" to spewed out of a UART as a low-impact example. On the x1e80100-crd this serial port junk can be observed on linux-next. Apply a similar fix to the x1e80100 Global Clock controller to remediate. Link: https://lore.kernel.org/all/20240819233628.2074654-3-swboyd@chromium.org/ Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100") Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable") Suggested-by: Neil Armstrong Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20240823-x1e80100-clk-fix-v1-1-0b1b4f5a96e8@linaro.org Reviewed-by: Konrad Dybcio Signed-off-by: Stephen Boyd commit 0f6eaf125e73fecb6a864fd22b131f23423bd0a7 Merge: 39a3396558fb9 6357efe3abead Author: Stephen Boyd Date: Tue Aug 27 10:28:39 2024 -0700 Merge tag 'qcom-clk-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-fixes Pull Qualcomm clk driver fixes from Bjorn Andersson: This corrects several issues with the Alpha PLL clock driver. It updates IPQ9574 GCC driver to correctly use the EVO PLL registers for GPLL clocks. X1E USB GDSC flags are corrected to leave these in retention as the controllers are suspended. * tag 'qcom-clk-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: clk: qcom: ipq9574: Update the alpha PLL type for GPLLs clk: qcom: gcc-x1e80100: Fix USB 0 and 1 PHY GDSC pwrsts flags clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL clk: qcom: clk-alpha-pll: Fix zonda set_rate failure when PLL is disabled clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API clk: qcom: clk-alpha-pll: Fix the pll post div mask commit 70c261d500951cf3ea0fcf32651aab9a65a91471 Author: Pablo Neira Ayuso Date: Mon Aug 26 15:03:23 2024 +0200 netfilter: nf_tables_ipv6: consider network offset in netdev/egress validation From netdev/egress, skb->len can include the ethernet header, therefore, subtract network offset from skb->len when validating IPv6 packet length. Fixes: 42df6e1d221d ("netfilter: Introduce egress hook") Signed-off-by: Pablo Neira Ayuso commit bc21000e99f92a6b5540d7267c6b22806c5c33d3 Author: Eric Dumazet Date: Sat Aug 24 18:19:01 2024 +0000 net_sched: sch_fq: fix incorrect behavior for small weights fq_dequeue() has a complex logic to find packets in one of the 3 bands. As Neal found out, it is possible that one band has a deficit smaller than its weight. fq_dequeue() can return NULL while some packets are elligible for immediate transmit. In this case, more than one iteration is needed to refill pband->credit. With default parameters (weights 589824 196608 65536) bug can trigger if large BIG TCP packets are sent to the lowest priority band. Bisected-by: John Sperbeck Diagnosed-by: Neal Cardwell Fixes: 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") Signed-off-by: Eric Dumazet Reviewed-by: Neal Cardwell Link: https://patch.msgid.link/20240824181901.953776-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 6f01bdbfef3b62955cf6503a8425d527b3a5cf94 Author: Keith Busch Date: Mon Aug 26 11:20:57 2024 -0700 nvme-pci: allocate tagset on reset if necessary If a drive is unable to create IO queues on the initial probe, a subsequent reset will need to allocate the tagset if IO queue creation is successful. Without this, blk_mq_update_nr_hw_queues will crash on a bad pointer due to the invalid tagset. Fixes: eac3ef262941f62 ("nvme-pci: split the initial probe from the rest path") Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit ecb54277cb63c273e8d74272e5b9bfd80c2185d9 Author: Filipe Manana Date: Tue Aug 27 11:30:10 2024 +0100 btrfs: fix uninitialized return value from btrfs_reclaim_sweep() The return variable 'ret' at btrfs_reclaim_sweep() is never assigned if none of the space infos is reclaimable (for example if periodic reclaim is disabled, which is the default), so we return an undefined value. This can be fixed my making btrfs_reclaim_sweep() not return any value as well as do_reclaim_sweep() because: 1) do_reclaim_sweep() always returns 0, so we can make it return void; 2) The only caller of btrfs_reclaim_sweep() (btrfs_reclaim_bgs()) doesn't care about its return value, and in its context there's nothing to do about any errors anyway. Therefore remove the return value from btrfs_reclaim_sweep() and do_reclaim_sweep(). Fixes: e4ca3932ae90 ("btrfs: periodic block_group reclaim") Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1eb52589a299f8b29df0f214206da6616e33a8b6 Author: Matthew Brost Date: Tue Aug 20 09:01:29 2024 -0700 drm/xe: Invalidate media_gt TLBs Testing on LNL has shown media TLBs need to be invalidated via the GuC, update xe_vm_invalidate_vma appropriately. v2: Fix 2 tile case v3: Include missing local change Fixes: 3330361543fc ("drm/xe/lnl: Add LNL platform definition") Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240820160129.986889-1-matthew.brost@intel.com (cherry picked from commit 77cc3f6c58b1b28cee73904946c46a1415187d04) Signed-off-by: Rodrigo Vivi commit a24cae8fc1f13f6f6929351309f248fd2e9351ce Author: Darrick J. Wong Date: Thu Aug 22 17:01:07 2024 -0700 xfs: reset rootdir extent size hint after growfsrt If growfsrt is run on a filesystem that doesn't have a rt volume, it's possible to change the rt extent size. If the root directory was previously set up with an inherited extent size hint and rtinherit, it's possible that the hint is no longer a multiple of the rt extent size. Although the verifiers don't complain about this, xfs_repair will, so if we detect this situation, log the root directory to clean it up. This is still racy, but it's better than nothing. Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 16e1fbdce9c8d084863fd63cdaff8fb2a54e2f88 Author: Darrick J. Wong Date: Thu Aug 22 17:00:51 2024 -0700 xfs: take m_growlock when running growfsrt Take the grow lock when we're expanding the realtime volume, like we do for the other growfs calls. Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit ca6448aed4f10ad88eba79055f181eb9a589a7b3 Author: Zizhi Wo Date: Thu Aug 22 17:00:35 2024 -0700 xfs: Fix missing interval for missing_owner in xfs fsmap In the fsmap query of xfs, there is an interval missing problem: [root@fedora ~]# xfs_io -c 'fsmap -vvvv' /mnt EXT: DEV BLOCK-RANGE OWNER FILE-OFFSET AG AG-OFFSET TOTAL 0: 253:16 [0..7]: static fs metadata 0 (0..7) 8 1: 253:16 [8..23]: per-AG metadata 0 (8..23) 16 2: 253:16 [24..39]: inode btree 0 (24..39) 16 3: 253:16 [40..47]: per-AG metadata 0 (40..47) 8 4: 253:16 [48..55]: refcount btree 0 (48..55) 8 5: 253:16 [56..103]: per-AG metadata 0 (56..103) 48 6: 253:16 [104..127]: free space 0 (104..127) 24 ...... BUG: [root@fedora ~]# xfs_io -c 'fsmap -vvvv -d 104 107' /mnt [root@fedora ~]# Normally, we should be able to get [104, 107), but we got nothing. The problem is caused by shifting. The query for the problem-triggered scenario is for the missing_owner interval (e.g. freespace in rmapbt/ unknown space in bnobt), which is obtained by subtraction (gap). For this scenario, the interval is obtained by info->last. However, rec_daddr is calculated based on the start_block recorded in key[1], which is converted by calling XFS_BB_TO_FSBT. Then if rec_daddr does not exceed info->next_daddr, which means keys[1].fmr_physical >> (mp)->m_blkbb_log <= info->next_daddr, no records will be displayed. In the above example, 104 >> (mp)->m_blkbb_log = 12 and 107 >> (mp)->m_blkbb_log = 12, so the two are reduced to 0 and the gap is ignored: before calculate ----------------> after shifting 104(st) 107(ed) 12(st/ed) |---------| | sector size block size Resolve this issue by introducing the "end_daddr" field in xfs_getfsmap_info. This records |key[1].fmr_physical + key[1].length| at the granularity of sector. If the current query is the last, the rec_daddr is end_daddr to prevent missing interval problems caused by shifting. We only need to focus on the last query, because xfs disks are internally aligned with disk blocksize that are powers of two and minimum 512, so there is no problem with shifting in previous queries. After applying this patch, the above problem have been solved: [root@fedora ~]# xfs_io -c 'fsmap -vvvv -d 104 107' /mnt EXT: DEV BLOCK-RANGE OWNER FILE-OFFSET AG AG-OFFSET TOTAL 0: 253:16 [104..106]: free space 0 (104..106) 3 Fixes: e89c041338ed ("xfs: implement the GETFSMAP ioctl") Signed-off-by: Zizhi Wo Reviewed-by: Darrick J. Wong [djwong: limit the range of end_addr correctly] Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 6b35cc8d9239569700cc7cc737c8ed40b8b9cfdb Author: Darrick J. Wong Date: Thu Aug 22 17:00:20 2024 -0700 xfs: use XFS_BUF_DADDR_NULL for daddrs in getfsmap code Use XFS_BUF_DADDR_NULL (instead of a magic sentinel value) to mean "this field is null" like the rest of xfs. Cc: wozizhi@huawei.com Fixes: e89c041338ed6 ("xfs: implement the GETFSMAP ioctl") Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 4786fe29f5a0dd74d9ccdce8c734bde1fb88cf37 Author: Brett Creeley Date: Thu Aug 22 12:25:57 2024 -0700 ionic: Prevent tx_timeout due to frequent doorbell ringing With recent work to the doorbell workaround code a small hole was introduced that could cause a tx_timeout. This happens if the rx dbell_deadline goes beyond the netdev watchdog timeout set by the driver (i.e. 2 seconds). Fix this by changing the netdev watchdog timeout to 5 seconds and reduce the max rx dbell_deadline to 4 seconds. The test that can reproduce the issue being fixed is a multi-queue send test via pktgen with the "burst" setting to 1. This causes the queue's doorbell to be rung on every packet sent to the driver, which may result in the device missing doorbells due to the high doorbell rate. Cc: stable@vger.kernel.org Fixes: 4ded136c78f8 ("ionic: add work item for missed-doorbell check") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Link: https://patch.msgid.link/20240822192557.9089-1-brett.creeley@amd.com Signed-off-by: Paolo Abeni commit 2955ae8186c8a6f029e429f7890e0c7e5f6e215e Author: John Harrison Date: Thu Aug 1 20:10:51 2024 -0700 drm/i915: ARL requires a newer GSC firmware ARL and MTL share a single GSC firmware blob. However, ARL requires a newer version of it. So add differentiate of the PCI ids for ARL from MTL and create ARL as a sub-platform of MTL. That way, all the existing workarounds and such still treat ARL as MTL exactly as before. However, now the GSC code can check for ARL and do an extra version check on the firmware before committing to it. Also, the version extraction code has various ways of failing but the return code was being ignore and so the firmware load would attempt to continue anyway. Fix that by propagating the return code to the next level out. Signed-off-by: John Harrison Fixes: 213c43676beb ("drm/i915/mtl: Remove the 'force_probe' requirement for Meteor Lake") Reviewed-by: Daniele Ceraolo Spurio Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240802031051.3816392-1-John.C.Harrison@Intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 67733d7a71503fd3e32eeada371f8aa2516c5c95) Signed-off-by: Joonas Lahtinen commit 7d058e6bac9afab6a406e34344ebbfd3068bb2d5 Author: Hans de Goede Date: Fri Aug 23 09:50:55 2024 +0200 drm/i915/dsi: Make Lenovo Yoga Tab 3 X90F DMI match less strict There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary. Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version. Fixes: f6f4a0862bde ("drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo Yoga Tab 3 (v2)") Cc: stable@vger.kernel.org Acked-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20240823075055.17198-1-hdegoede@redhat.com (cherry picked from commit a4dbe45c4c14edc316ae94b9af86a28f8c5d8123) Signed-off-by: Joonas Lahtinen commit 094513f8a2fbddee51b055d8035f995551f98fce Author: Emmanuel Grumbach Date: Sun Aug 25 19:17:01 2024 +0300 wifi: iwlwifi: clear trans->state earlier upon error When the firmware crashes, we first told the op_mode and only then, changed the transport's state. This is a problem if the op_mode's nic_error() handler needs to send a host command: it'll see that the transport's state still reflects that the firmware is alive. Today, this has no consequences since we set the STATUS_FW_ERROR bit and that will prevent sending host commands. iwl_fw_dbg_stop_restart_recording looks at this bit to know not to send a host command for example. To fix the hibernation, we needed to reset the firmware without having an error and checking STATUS_FW_ERROR to see whether the firmware is alive will no longer hold, so this change is necessary as well. Change the flow a bit. Change trans->state before calling the op_mode's nic_error() method and check trans->state instead of STATUS_FW_ERROR. This will keep the current behavior of iwl_fw_dbg_stop_restart_recording upon firmware error, and it'll allow us to call iwl_fw_dbg_stop_restart_recording safely even if STATUS_FW_ERROR is clear, but yet, the firmware is not alive. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.9d7427fbdfd7.Ia056ca57029a382c921d6f7b6a6b28fc480f2f22@changeid [I missed this was a dependency for the hibernation fix, changed the commit message a bit accordingly] Signed-off-by: Johannes Berg commit 6d30bb88f623526197c0e18a366e68a4254a2c83 Author: Alexander Sverdlin Date: Fri Aug 23 15:15:20 2024 +0200 wifi: wfx: repair open network AP mode RSN IE missing in beacon is normal in open networks. Avoid returning -EINVAL in this case. Steps to reproduce: $ cat /etc/wpa_supplicant.conf network={ ssid="testNet" mode=2 key_mgmt=NONE } $ wpa_supplicant -iwlan0 -c /etc/wpa_supplicant.conf nl80211: Beacon set failed: -22 (Invalid argument) Failed to set beacon parameters Interface initialization failed wlan0: interface state UNINITIALIZED->DISABLED wlan0: AP-DISABLED wlan0: Unable to setup interface. Failed to initialize AP interface After the change: $ wpa_supplicant -iwlan0 -c /etc/wpa_supplicant.conf Successfully initialized wpa_supplicant wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED Cc: stable@vger.kernel.org Fixes: fe0a7776d4d1 ("wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap()") Signed-off-by: Alexander Sverdlin Reviewed-by: Jérôme Pouiller Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240823131521.3309073-1-alexander.sverdlin@siemens.com commit 9a471de516c35219d1722c13367191ce1f120fe9 Author: ZHANG Yuntian Date: Sat Aug 3 15:46:07 2024 +0800 USB: serial: option: add MeiG Smart SRM825L Add support for MeiG Smart SRM825L which is based on Qualcomm 315 chip. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 P: Vendor=2dee ProdID=4d22 Rev= 4.14 S: Manufacturer=MEIG S: Product=LTE-A Module S: SerialNumber=6f345e48 C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=896mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=88(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms Signed-off-by: ZHANG Yuntian Link: https://lore.kernel.org/0041DFA5200EFB1B+20240803074619.563116-1-yt@radxa.com/ Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 3e9bff3bbe1355805de919f688bef4baefbfd436 Merge: 5be63fc19fcaa e00e99ba6c6b8 Author: Linus Torvalds Date: Tue Aug 27 16:57:35 2024 +1200 Merge tag 'vfs-6.11-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "VFS: - Ensure that backing files uses file->f_ops->splice_write() for splice netfs: - Revert the removal of PG_private_2 from netfs_release_folio() as cephfs still relies on this - When AS_RELEASE_ALWAYS is set on a mapping the folio needs to always be invalidated during truncation - Fix losing untruncated data in a folio by making letting netfs_release_folio() return false if the folio is dirty - Fix trimming of streaming-write folios in netfs_inval_folio() - Reset iterator before retrying a short read - Fix interaction of streaming writes with zero-point tracker afs: - During truncation afs currently calls truncate_setsize() which sets i_size, expands the pagecache and truncates it. The first two operations aren't needed because they will have already been done. So call truncate_pagecache() instead and skip the redundant parts overlayfs: - Fix checking of the number of allowed lower layers so 500 layers can actually be used instead of just 499 - Add missing '\n' to pr_err() output - Pass string to ovl_parse_layer() and thus allow it to be used for Opt_lowerdir as well pidfd: - Revert blocking the creation of pidfds for kthread as apparently userspace relies on this. Specifically, it breaks systemd during shutdown romfs: - Fix romfs_read_folio() to use the correct offset with folio_zero_tail()" * tag 'vfs-6.11-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: netfs: Fix interaction of streaming writes with zero-point tracker netfs: Fix missing iterator reset on retry of short read netfs: Fix trimming of streaming-write folios in netfs_inval_folio() netfs: Fix netfs_release_folio() to say no if folio dirty afs: Fix post-setattr file edit to do truncation correctly mm: Fix missing folio invalidation calls during truncation ovl: ovl_parse_param_lowerdir: Add missed '\n' for pr_err ovl: fix wrong lowerdir number check for parameter Opt_lowerdir ovl: pass string to ovl_parse_layer() backing-file: convert to using fops->splice_write Revert "pidfd: prevent creation of pidfds for kthreads" romfs: fix romfs_read_folio() netfs, ceph: Partially revert "netfs: Replace PG_fscache by setting folio->private and marking dirty" commit 7bbc079531fc38d401e1c4088d4981435a8828e3 Author: Cosmo Chou Date: Mon Aug 19 18:46:30 2024 +0800 hwmon: (pt5161l) Fix invalid temperature reading The temperature reading function was using a signed long for the ADC code, which could lead to mishandling of invalid codes on 32-bit platforms. This allowed out-of-range ADC codes to be incorrectly interpreted as valid values and used in temperature calculations. Change adc_code to u32 to ensure that invalid ADC codes are correctly identified on all platforms. Fixes: 1b2ca93cd059 ("hwmon: Add driver for Astera Labs PT5161L retimer") Signed-off-by: Cosmo Chou Message-ID: <20240819104630.2375441-1-chou.cosmo@gmail.com> Signed-off-by: Guenter Roeck commit d26935690c03fe8159d42358bed1c56252700cd1 Author: Kent Overstreet Date: Mon Aug 26 19:11:00 2024 -0400 bcachefs: Fix bch2_extents_match() false positive This was caught as a very rare nonce inconsistency, on systems with encryption and replication (and tiering, or some form of rebalance operation running): [Wed Jul 17 13:30:03 2024] about to insert invalid key in data update path [Wed Jul 17 13:30:03 2024] old: u64s 10 type extent 671283510:6392:U32_MAX len 16 ver 106595503: durability: 2 crc: c_size 8 size 16 offset 0 nonce 0 csum chacha20_poly1305_80 compress zstd ptr: 3:355968:104 gen 7 ptr: 4:513244:48 gen 6 rebalance: target hdd compression zstd [Wed Jul 17 13:30:03 2024] k: u64s 10 type extent 671283510:6400:U32_MAX len 16 ver 106595508: durability: 2 crc: c_size 8 size 16 offset 0 nonce 0 csum chacha20_poly1305_80 compress zstd ptr: 3:355968:112 gen 7 ptr: 4:513244:56 gen 6 rebalance: target hdd compression zstd [Wed Jul 17 13:30:03 2024] new: u64s 14 type extent 671283510:6392:U32_MAX len 8 ver 106595508: durability: 2 crc: c_size 8 size 16 offset 0 nonce 0 csum chacha20_poly1305_80 compress zstd ptr: 3:355968:112 gen 7 cached ptr: 4:513244:56 gen 6 cached rebalance: target hdd compression zstd crc: c_size 8 size 16 offset 8 nonce 0 csum chacha20_poly1305_80 compress zstd ptr: 1:10860085:32 gen 0 ptr: 0:17285918:408 gen 0 [Wed Jul 17 13:30:03 2024] bcachefs (cca5bc65-fe77-409d-a9fa-465a6e7f4eae): fatal error - emergency read only bch2_extents_match() was reporting true for extents that did not actually point to the same data. bch2_extent_match() iterates over pairs of pointers, looking for pointers that point to the same location on disk (with matching generation numbers). However one or both extents may have been trimmed (or merged) and they might not have the same disk offset: it corrects for this by subtracting the key offset and the checksum entry offset. However, this failed when an extent was immediately partially overwritten, and the new overwrite was allocated the next adjacent disk space. Normally, with compression off, this would never cause a bug, since the new extent would have to be immediately after the old extent for the pointer offsets to match, and the rebalance index update path is not looking for an extent outside the range of the extent it moved. However with compression enabled, extents take up less space on disk than they do in the btree index space - and spuriously matching after partial overwrite is possible. To fix this, add a secondary check, that strictly checks that the regions pointed to on disk overlap. https://github.com/koverstreet/bcachefs/issues/717 Signed-off-by: Kent Overstreet commit 66927b89289974dab6d3b3cdd7706d0376034114 Author: Kent Overstreet Date: Mon Aug 26 15:11:38 2024 -0400 bcachefs: Fix failure to return error in data_update_index_update() This fixes an assertion pop in io_write.c - if we don't return an error we're supposed to have completed all the btree updates. Signed-off-by: Kent Overstreet commit 10d9d8c3512f16cad47b2ff81ec6fc4b27d8ee10 Author: Qu Wenruo Date: Sat Aug 17 18:34:30 2024 +0930 btrfs: fix a use-after-free when hitting errors inside btrfs_submit_chunk() [BUG] There is an internal report that KASAN is reporting use-after-free, with the following backtrace: BUG: KASAN: slab-use-after-free in btrfs_check_read_bio+0xa68/0xb70 [btrfs] Read of size 4 at addr ffff8881117cec28 by task kworker/u16:2/45 CPU: 1 UID: 0 PID: 45 Comm: kworker/u16:2 Not tainted 6.11.0-rc2-next-20240805-default+ #76 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 Workqueue: btrfs-endio btrfs_end_bio_work [btrfs] Call Trace: dump_stack_lvl+0x61/0x80 print_address_description.constprop.0+0x5e/0x2f0 print_report+0x118/0x216 kasan_report+0x11d/0x1f0 btrfs_check_read_bio+0xa68/0xb70 [btrfs] process_one_work+0xce0/0x12a0 worker_thread+0x717/0x1250 kthread+0x2e3/0x3c0 ret_from_fork+0x2d/0x70 ret_from_fork_asm+0x11/0x20 Allocated by task 20917: kasan_save_stack+0x37/0x60 kasan_save_track+0x10/0x30 __kasan_slab_alloc+0x7d/0x80 kmem_cache_alloc_noprof+0x16e/0x3e0 mempool_alloc_noprof+0x12e/0x310 bio_alloc_bioset+0x3f0/0x7a0 btrfs_bio_alloc+0x2e/0x50 [btrfs] submit_extent_page+0x4d1/0xdb0 [btrfs] btrfs_do_readpage+0x8b4/0x12a0 [btrfs] btrfs_readahead+0x29a/0x430 [btrfs] read_pages+0x1a7/0xc60 page_cache_ra_unbounded+0x2ad/0x560 filemap_get_pages+0x629/0xa20 filemap_read+0x335/0xbf0 vfs_read+0x790/0xcb0 ksys_read+0xfd/0x1d0 do_syscall_64+0x6d/0x140 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Freed by task 20917: kasan_save_stack+0x37/0x60 kasan_save_track+0x10/0x30 kasan_save_free_info+0x37/0x50 __kasan_slab_free+0x4b/0x60 kmem_cache_free+0x214/0x5d0 bio_free+0xed/0x180 end_bbio_data_read+0x1cc/0x580 [btrfs] btrfs_submit_chunk+0x98d/0x1880 [btrfs] btrfs_submit_bio+0x33/0x70 [btrfs] submit_one_bio+0xd4/0x130 [btrfs] submit_extent_page+0x3ea/0xdb0 [btrfs] btrfs_do_readpage+0x8b4/0x12a0 [btrfs] btrfs_readahead+0x29a/0x430 [btrfs] read_pages+0x1a7/0xc60 page_cache_ra_unbounded+0x2ad/0x560 filemap_get_pages+0x629/0xa20 filemap_read+0x335/0xbf0 vfs_read+0x790/0xcb0 ksys_read+0xfd/0x1d0 do_syscall_64+0x6d/0x140 entry_SYSCALL_64_after_hwframe+0x4b/0x53 [CAUSE] Although I cannot reproduce the error, the report itself is good enough to pin down the cause. The call trace is the regular endio workqueue context, but the free-by-task trace is showing that during btrfs_submit_chunk() we already hit a critical error, and is calling btrfs_bio_end_io() to error out. And the original endio function called bio_put() to free the whole bio. This means a double freeing thus causing use-after-free, e.g.: 1. Enter btrfs_submit_bio() with a read bio The read bio length is 128K, crossing two 64K stripes. 2. The first run of btrfs_submit_chunk() 2.1 Call btrfs_map_block(), which returns 64K 2.2 Call btrfs_split_bio() Now there are two bios, one referring to the first 64K, the other referring to the second 64K. 2.3 The first half is submitted. 3. The second run of btrfs_submit_chunk() 3.1 Call btrfs_map_block(), which by somehow failed Now we call btrfs_bio_end_io() to handle the error 3.2 btrfs_bio_end_io() calls the original endio function Which is end_bbio_data_read(), and it calls bio_put() for the original bio. Now the original bio is freed. 4. The submitted first 64K bio finished Now we call into btrfs_check_read_bio() and tries to advance the bio iter. But since the original bio (thus its iter) is already freed, we trigger the above use-after free. And even if the memory is not poisoned/corrupted, we will later call the original endio function, causing a double freeing. [FIX] Instead of calling btrfs_bio_end_io(), call btrfs_orig_bbio_end_io(), which has the extra check on split bios and do the proper refcounting for cloned bios. Furthermore there is already one extra btrfs_cleanup_bio() call, but that is duplicated to btrfs_orig_bbio_end_io() call, so remove that label completely. Reported-by: David Sterba Fixes: 852eee62d31a ("btrfs: allow btrfs_submit_bio to split bios") CC: stable@vger.kernel.org # 6.6+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b49420d6a1aeb399e5b107fc6eb8584d0860fbd7 Author: Alex Deucher Date: Wed Aug 21 15:11:35 2024 -0400 video/aperture: optionally match the device in sysfb_disable() In aperture_remove_conflicting_pci_devices(), we currently only call sysfb_disable() on vga class devices. This leads to the following problem when the pimary device is not VGA compatible: 1. A PCI device with a non-VGA class is the boot display 2. That device is probed first and it is not a VGA device so sysfb_disable() is not called, but the device resources are freed by aperture_detach_platform_device() 3. Non-primary GPU has a VGA class and it ends up calling sysfb_disable() 4. NULL pointer dereference via sysfb_disable() since the resources have already been freed by aperture_detach_platform_device() when it was called by the other device. Fix this by passing a device pointer to sysfb_disable() and checking the device to determine if we should execute it or not. v2: Fix build when CONFIG_SCREEN_INFO is not set v3: Move device check into the mutex Drop primary variable in aperture_remove_conflicting_pci_devices() Drop __init on pci sysfb_pci_dev_is_enabled() Fixes: 5ae3716cfdcd ("video/aperture: Only remove sysfb on the default vga pci device") Cc: Javier Martinez Canillas Cc: Thomas Zimmermann Cc: Helge Deller Cc: Sam Ravnborg Cc: Daniel Vetter Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240821191135.829765-1-alexander.deucher@amd.com commit 7e8ae8486e4471513e2111aba6ac29f2357bed2a Author: Jeff Layton Date: Mon Aug 26 10:32:34 2024 -0400 fs/nfsd: fix update of inode attrs in CB_GETATTR Currently, we copy the mtime and ctime to the in-core inode and then mark the inode dirty. This is fine for certain types of filesystems, but not all. Some require a real setattr to properly change these values (e.g. ceph or reexported NFS). Fix this code to call notify_change() instead, which is the proper way to effect a setattr. There is one problem though: In this case, the client is holding a write delegation and has sent us attributes to update our cache. We don't want to break the delegation for this since that would defeat the purpose. Add a new ATTR_DELEG flag that makes notify_change bypass the try_break_deleg call. Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation") Reviewed-by: Christian Brauner Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 5572a55a6f830ee3f3a994b6b962a5c327d28cb3 Author: Maurizio Lombardi Date: Wed Aug 21 16:28:26 2024 +0200 nvmet-tcp: fix kernel crash if commands allocation fails If the commands allocation fails in nvmet_tcp_alloc_cmds() the kernel crashes in nvmet_tcp_release_queue_work() because of a NULL pointer dereference. nvmet: failed to install queue 0 cntlid 1 ret 6 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Fix the bug by setting queue->nr_cmds to zero in case nvmet_tcp_alloc_cmd() fails. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Signed-off-by: Maurizio Lombardi Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit e846be0fba85603d2ad6fc8db6810958d7b6bed1 Author: MD Danish Anwar Date: Fri Aug 23 17:34:12 2024 +0530 net: ti: icssg-prueth: Fix 10M Link issue on AM64x Crash is seen on AM64x 10M link when connecting / disconnecting multiple times. The fix for this is to enable quirk_10m_link_issue for AM64x. Fixes: b256e13378a9 ("net: ti: icssg-prueth: Add AM64x icssg support") Signed-off-by: MD Danish Anwar Reviewed-by: Roger Quadros Link: https://patch.msgid.link/20240823120412.1262536-1-danishanwar@ti.com Signed-off-by: Jakub Kicinski commit 0903b9e2a46cb6252a13d6b19d0502da9be191cf Author: Jubilee Young Date: Thu Aug 22 22:03:59 2024 -0700 rust: alloc: eschew `Box>::write` Upstream Rust's libs-api team has consensus for stabilizing some of `feature(new_uninit)`, but not for `Box>::write`. Instead, we can use `MaybeUninit::write`, so Rust for Linux can drop the feature after stabilization. That will happen after merging, as the FCP has completed [1]. This is required before stabilization because remaining-unstable API will be divided into new features. This code doesn't know about those yet. It can't: they haven't landed, as the relevant PR is blocked on rustc's CI testing Rust-for-Linux without this patch. [ The PR has landed [2] and will be released in Rust 1.82.0 (expected on 2024-10-17), so we could conditionally enable the new unstable feature (`box_uninit_write` [3]) instead, but just for a single `unsafe` block it is probably not worth it. For the time being, I added it to the "nice to have" section of our unstable features list. - Miguel ] Link: https://github.com/rust-lang/rust/issues/63291#issuecomment-2183022955 [1] Link: https://github.com/rust-lang/rust/pull/129416 [2] Link: https://github.com/rust-lang/rust/issues/129397 [3] Signed-off-by: Jubilee Young Reviewed-by: Alice Ryhl Reviewed-by: Trevor Gross [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 284b75a3d83c7631586d98f6dede1d90f128f0db Author: Zheng Qixing Date: Thu Aug 22 11:30:50 2024 +0800 ata: libata: Fix memory leak for error path in ata_host_alloc() In ata_host_alloc(), if devres_alloc() fails to allocate the device host resource data pointer, the already allocated ata_host structure is not freed before returning from the function. This results in a potential memory leak. Call kfree(host) before jumping to the error handling path to ensure that the ata_host structure is properly freed if devres_alloc() fails. Fixes: 2623c7a5f279 ("libata: add refcounting to ata_host") Cc: stable@vger.kernel.org Signed-off-by: Zheng Qixing Reviewed-by: Yu Kuai Signed-off-by: Damien Le Moal commit a699781c79ecf6cfe67fb00a0331b4088c7c8466 Author: Jamie Bainbridge Date: Fri Aug 23 16:26:58 2024 +1000 ethtool: check device is present when getting link settings A sysfs reader can race with a device reset or removal, attempting to read device state when the device is not actually present. eg: [exception RIP: qed_get_current_link+17] #8 [ffffb9e4f2907c48] qede_get_link_ksettings at ffffffffc07a994a [qede] #9 [ffffb9e4f2907cd8] __rh_call_get_link_ksettings at ffffffff992b01a3 #10 [ffffb9e4f2907d38] __ethtool_get_link_ksettings at ffffffff992b04e4 #11 [ffffb9e4f2907d90] duplex_show at ffffffff99260300 #12 [ffffb9e4f2907e38] dev_attr_show at ffffffff9905a01c #13 [ffffb9e4f2907e50] sysfs_kf_seq_show at ffffffff98e0145b #14 [ffffb9e4f2907e68] seq_read at ffffffff98d902e3 #15 [ffffb9e4f2907ec8] vfs_read at ffffffff98d657d1 #16 [ffffb9e4f2907f00] ksys_read at ffffffff98d65c3f #17 [ffffb9e4f2907f38] do_syscall_64 at ffffffff98a052fb crash> struct net_device.state ffff9a9d21336000 state = 5, state 5 is __LINK_STATE_START (0b1) and __LINK_STATE_NOCARRIER (0b100). The device is not present, note lack of __LINK_STATE_PRESENT (0b10). This is the same sort of panic as observed in commit 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show"). There are many other callers of __ethtool_get_link_ksettings() which don't have a device presence check. Move this check into ethtool to protect all callers. Fixes: d519e17e2d01 ("net: export device speed and duplex via sysfs") Fixes: 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show") Signed-off-by: Jamie Bainbridge Link: https://patch.msgid.link/8bae218864beaa44ed01628140475b9bf641c5b0.1724393671.git.jamie.bainbridge@gmail.com Signed-off-by: Jakub Kicinski commit 1165e70a4a5d8b4da77002ac22b4c5397f30e00d Merge: 22652022c7eef 6ba20539ac6b1 Author: Mark Brown Date: Mon Aug 26 21:36:52 2024 +0100 ASoC: fix module autoloading Merge series from Liao Chen : This patchset aims to enable autoloading of some use modules. By registering MDT, the kernel is allowed to automatically bind modules to devices that match the specified compatible strings. commit c6a09e342f8e6d3cac7f7c5c14085236aca284b9 Author: Max Filippov Date: Sun Aug 25 20:27:45 2024 -0700 binfmt_elf_fdpic: fix AUXV size calculation when ELF_HWCAP2 is defined create_elf_fdpic_tables() does not correctly account the space for the AUX vector when an architecture has ELF_HWCAP2 defined. Prior to the commit 10e29251be0e ("binfmt_elf_fdpic: fix /proc//auxv") it resulted in the last entry of the AUX vector being set to zero, but with that change it results in a kernel BUG. Fix that by adding one to the number of AUXV entries (nitems) when ELF_HWCAP2 is defined. Fixes: 10e29251be0e ("binfmt_elf_fdpic: fix /proc//auxv") Cc: stable@vger.kernel.org Reported-by: Greg Ungerer Closes: https://lore.kernel.org/lkml/5b51975f-6d0b-413c-8b38-39a6a45e8821@westnet.com.au/ Signed-off-by: Max Filippov Tested-by: Greg Ungerer Link: https://lore.kernel.org/r/20240826032745.3423812-1-jcmvbkbc@gmail.com Signed-off-by: Kees Cook commit b6fb565a2d15277896583d471b21bc14a0c99661 Author: Kirill A. Shutemov Date: Mon Aug 26 15:53:04 2024 +0300 x86/tdx: Fix data leak in mmio_read() The mmio_read() function makes a TDVMCALL to retrieve MMIO data for an address from the VMM. Sean noticed that mmio_read() unintentionally exposes the value of an initialized variable (val) on the stack to the VMM. This variable is only needed as an output value. It did not need to be passed to the VMM in the first place. Do not send the original value of *val to the VMM. [ dhansen: clarify what 'val' is used for. ] Fixes: 31d58c4e557d ("x86/tdx: Handle in-kernel MMIO") Reported-by: Sean Christopherson Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20240826125304.1566719-1-kirill.shutemov%40linux.intel.com commit 22652022c7eef3c4ad6ab5f13a6dfc7f25f853d4 Author: Laurentiu Mihalcea Date: Mon Aug 26 14:24:42 2024 -0400 ASoC: SOF: ipc: replace "enum sof_comp_type" field with "uint32_t" Normally, the type of enums is "unsigned int" or "int". GCC has the "-fshort-enums" option, which instructs the compiler to use the smallest data type that can hold all the values in the enum (i.e: char, short, int or their unsigned variants). According to the GCC documentation, "-fshort-enums" may be default on some targets. This seems to be the case for SOF when built for a certain 32-bit ARM platform. On Linux, this is not the case (tested with "aarch64-linux-gnu-gcc") which means enums such as "enum sof_comp_type" will end up having different sizes on Linux and SOF. Since "enum sof_comp_type" is used in IPC-related structures such as "struct sof_ipc_comp", this means the fields of the structures will end up being placed at different offsets. This, in turn, leads to SOF not being able to properly interpret data passed from Linux. With this in mind, replace "enum sof_comp_type" from "struct sof_ipc_comp" with "uint32_t". Signed-off-by: Laurentiu Mihalcea Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Daniel Baluta Link: https://patch.msgid.link/20240826182442.6191-1-laurentiumihalcea111@gmail.com Signed-off-by: Mark Brown commit 31a972959ae57691a1e4f539399b2674ae576086 Merge: 4186c8d9e6af5 18b3256db76bd Author: Jakub Kicinski Date: Mon Aug 26 08:53:44 2024 -0700 Merge tag 'for-net-2024-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btintel: Allow configuring drive strength of BRI - hci_core: Fix not handling hibernation actions - btnxpuart: Fix random crash seen while removing driver * tag 'for-net-2024-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_core: Fix not handling hibernation actions Bluetooth: btnxpuart: Fix random crash seen while removing driver Bluetooth: btintel: Allow configuring drive strength of BRI ==================== Link: https://patch.msgid.link/20240823200008.65241-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 1116e0e372eb16dd907ec571ce5d4af325c55c10 Author: Jeff Layton Date: Fri Aug 23 18:27:39 2024 -0400 nfsd: fix potential UAF in nfsd4_cb_getattr_release Once we drop the delegation reference, the fields embedded in it are no longer safe to access. Do that last. Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation") Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit da05ba23d4c8d3e8a45846b952e53dd76c4b5e36 Author: Jeff Layton Date: Fri Aug 23 18:27:38 2024 -0400 nfsd: hold reference to delegation when updating it for cb_getattr Once we've dropped the flc_lock, there is nothing that ensures that the delegation that was found will still be around later. Take a reference to it while holding the lock and then drop it when we've finished with the delegation. Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation") Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit f25d1b5f1be13a6de341b1d26e0cf4275e5908d2 Author: Chuck Lever Date: Sat Aug 17 11:33:27 2024 -0400 MAINTAINERS: Update Olga Kornievskaia's email address Signed-off-by: Chuck Lever commit 786c5be9ac29a39b6f37f1fdd2ea59d0fe35d525 Author: Dmitry Antipov Date: Mon Aug 5 17:20:35 2024 +0300 wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap() In 'ieee80211_beacon_get_ap()', free allocated skb in case of error returned by 'ieee80211_beacon_protect()'. Compile tested only. Signed-off-by: Dmitry Antipov Link: https://patch.msgid.link/20240805142035.227847-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit 3a84454f5204718ca5b4ad2c1f0bf2031e2403d1 Author: Emmanuel Grumbach Date: Sun Aug 25 19:17:04 2024 +0300 wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead There is a WARNING in iwl_trans_wait_tx_queues_empty() (that was recently converted from just a message), that can be hit if we wait for TX queues to become empty after firmware died. Clearly, we can't expect anything from the firmware after it's declared dead. Don't call iwl_trans_wait_tx_queues_empty() in this case. While it could be a good idea to stop the flow earlier, the flush functions do some maintenance work that is not related to the firmware, so keep that part of the code running even when the firmware is not running. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.a7cbd794cee9.I44a739fbd4ffcc46b83844dd1c7b2eb0c7b270f6@changeid [edit commit message] Signed-off-by: Johannes Berg commit 454f6306a31248cf972f5f16d4c145ad5b33bfdc Author: Avraham Stern Date: Sun Aug 25 19:17:12 2024 +0300 wifi: iwlwifi: mvm: allow 6 GHz channels in MLO scan MLO internal scan may include 6 GHz channels. Since the 6 GHz scan indication is not set, the channel flags are set incorrectly, which leads to a firmware assert. Since the MLO scan may include 6 GHz and non 6 GHz channels in one request, add support for non-PSC 6 GHz channels (PSC channels are already supported) when the 6 GHz indication is not set. Fixes: 38b3998dfba3 ("wifi: iwlwifi: mvm: Introduce internal MLO passive scan") Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.04807f8213b2.Idd09d4366df92a74853649c1a520b7f0f752d1ac@changeid Signed-off-by: Johannes Berg commit 0668ebc8c2282ca1e7eb96092a347baefffb5fe7 Author: Emmanuel Grumbach Date: Sun Aug 25 19:17:10 2024 +0300 wifi: iwlwifi: mvm: pause TCM when the firmware is stopped Not doing so will make us send a host command to the transport while the firmware is not alive, which will trigger a WARNING. bad state = 0 WARNING: CPU: 2 PID: 17434 at drivers/net/wireless/intel/iwlwifi/iwl-trans.c:115 iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi] RIP: 0010:iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi] Call Trace: iwl_mvm_send_cmd+0x40/0xc0 [iwlmvm] iwl_mvm_config_scan+0x198/0x260 [iwlmvm] iwl_mvm_recalc_tcm+0x730/0x11d0 [iwlmvm] iwl_mvm_tcm_work+0x1d/0x30 [iwlmvm] process_one_work+0x29e/0x640 worker_thread+0x2df/0x690 ? rescuer_thread+0x540/0x540 kthread+0x192/0x1e0 ? set_kthread_struct+0x90/0x90 ret_from_fork+0x22/0x30 Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.5abe71ca1b6b.I97a968cb8be1f24f94652d9b110ecbf6af73f89e@changeid Signed-off-by: Johannes Berg commit 3ee22f07a35b76939c5b8d17d6af292f5fafb509 Author: Anjaneyulu Date: Sun Aug 25 19:17:08 2024 +0300 wifi: iwlwifi: fw: fix wgds rev 3 exact size Check size of WGDS revision 3 is equal to 8 entries size with some header, but doesn't depend on the number of used entries. Check that used entries are between min and max but allow more to be present than are used to fix operation with some BIOSes that have such data. Fixes: 97f8a3d1610b ("iwlwifi: ACPI: support revision 3 WGDS tables") Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.cc71dfc67ec3.Ic27ee15ac6128b275c210b6de88f2145bd83ca7b@changeid [edit commit message] Signed-off-by: Johannes Berg commit cd6f46c2fdb82e80ca248549c1f3ebe08b4a63ab Author: Emmanuel Grumbach Date: Sun Aug 25 19:17:07 2024 +0300 wifi: iwlwifi: mvm: take the mutex before running link selection iwl_mvm_select_links is called by the link selection worker and it requires the mutex. Take it in the link selection worker. This logic used to run from iwl_mvm_rx_umac_scan_complete_notif which had the mvm->mutex held. This was changed to run in a worker holding the wiphy mutex, but we also need the mvm->mutex. Fixes: 2e194efa3809 ("wifi: iwlwifi: mvm: Fix race in scan completion") Signed-off-by: Emmanuel Grumbach Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.0cacecd5db1e.Iaca38a078592b69bdd06549daf63408ccf1810e4@changeid Signed-off-by: Johannes Berg commit 916a5d9c5354c426220a0a6533a5e8ea1287d6ea Author: Daniel Gabay Date: Sun Aug 25 19:17:06 2024 +0300 wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() Driver creates also the WFA TPC element, consider that in the calculation. Signed-off-by: Daniel Gabay Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.e710ce446b7f.I2715c6742e9c3d160e2ba41bc4b35de370d2ce34@changeid Signed-off-by: Johannes Berg commit d44162280899c3fc2c6700e21e491e71c3c96e3d Author: Daniel Gabay Date: Sun Aug 25 19:17:05 2024 +0300 wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation The calculation should consider also the 6GHz IE's len, fix that. In addition, in iwl_mvm_sched_scan_start() the scan_fits helper is called only in case non_psc_incldued is true, but it should be called regardless, fix that as well. Signed-off-by: Daniel Gabay Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.7db825442fd2.I99f4d6587709de02072fd57957ec7472331c6b1d@changeid Signed-off-by: Johannes Berg commit f8a129c1e10256c785164ed5efa5d17d45fbd81b Author: Benjamin Berg Date: Sun Aug 25 19:17:13 2024 +0300 wifi: iwlwifi: lower message level for FW buffer destination An invalid buffer destination is not a problem for the driver and it does not make sense to report it with the KERN_ERR message level. As such, change the message to use IWL_DEBUG_FW. Reported-by: Len Brown Closes: https://lore.kernel.org/r/CAJvTdKkcxJss=DM2sxgv_MR5BeZ4_OC-3ad6tA40TYH2yqHCWw@mail.gmail.com Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.20abf78f05bc.Ifbcecc2ae9fb40b9698302507dcba8b922c8d856@changeid Signed-off-by: Johannes Berg commit cb347bd29d0d106213a0cf4f86b72dffd08d3454 Author: Emmanuel Grumbach Date: Sun Aug 25 19:17:02 2024 +0300 wifi: iwlwifi: mvm: fix hibernation Fast resume is a feature that was recently introduced to speed up the resume time. It basically keeps the firmware alive while the system is suspended and that avoids starting again the whole device. This flow can't work for hibernation, since when the system boots, before the frozen image is loaded, the kernel may touch the device. As a result, we can't assume the device is in the exact same state as before the hibernation. Detect that we are resuming from hibernation through the PCI device and forbid the fast resume flow. We also need to shut down the device cleanly when that happens. In addition, in case the device is power gated during S3, we won't be able to keep the device alive. Detect this situation with BE200 at least with the help of the CSR_FUNC_SCRATCH register and reset the device upon resume if it was power gated during S3. Fixes: e8bb19c1d590 ("wifi: iwlwifi: support fast resume") Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.24eb3b19e74f.I3837810318dbef0a0a773cf4c4fcf89cdc6fdbd3@changeid Signed-off-by: Johannes Berg commit 3e9b4021fedf92c11233ae1a8615327d0cbbecd5 Author: Daniel Gabay Date: Fri Aug 23 10:55:46 2024 +0200 wifi: mac80211: fix beacon SSID mismatch handling Return false when memcmp with zero_ssid returns 0 to correctly handle hidden SSIDs case. Fixes: 9cc88678db5b ("wifi: mac80211: check SSID in beacon") Reviewed-by: Andrei Otcheretianski Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Daniel Gabay Link: https://patch.msgid.link/20240823105546.7ab29ae287a6.I7f98e57e1ab6597614703fdd138cc88ad253d986@changeid Signed-off-by: Johannes Berg commit 4956e07f05e239b274d042618a250c9fa3e92629 Author: Bibo Mao Date: Mon Aug 26 23:11:32 2024 +0800 LoongArch: KVM: Invalidate guest steal time address on vCPU reset If ParaVirt steal time feature is enabled, there is a percpu gpa address passed from guest vCPU and host modifies guest memory space with this gpa address. When vCPU is reset normally, it will notify host and invalidate gpa address. However if VM is crashed and VMM reboots VM forcely, the vCPU reboot notification callback will not be called in VM. Host needs invalidate the gpa address, else host will modify guest memory during VM reboots. Here it is invalidated from the vCPU KVM_REG_LOONGARCH_VCPU_RESET ioctl interface. Also funciton kvm_reset_timer() is removed at vCPU reset stage, since SW emulated timer is only used in vCPU block state. When a vCPU is removed from the block waiting queue, kvm_restore_timer() is called and SW timer is cancelled. And the timer register is also cleared at VMM when a vCPU is reset. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 80376323e2b6a4559f86b2b4d864848ac25cb054 Author: Tiezhu Yang Date: Mon Aug 26 23:11:32 2024 +0800 LoongArch: Add ifdefs to fix LSX and LASX related warnings There exist some warnings when building kernel if CONFIG_CPU_HAS_LBT is set but CONFIG_CPU_HAS_LSX and CONFIG_CPU_HAS_LASX are not set. In this case, there are no definitions of _restore_lsx & _restore_lasx and there are also no definitions of kvm_restore_lsx & kvm_restore_lasx in fpu.S and switch.S respectively, just add some ifdefs to fix these warnings. AS arch/loongarch/kernel/fpu.o arch/loongarch/kernel/fpu.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0 arch/loongarch/kernel/fpu.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0 AS [M] arch/loongarch/kvm/switch.o arch/loongarch/kvm/switch.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0 arch/loongarch/kvm/switch.o: warning: objtool: unexpected relocation symbol type in .rela.discard.func_stack_frame_non_standard: 0 MODPOST Module.symvers ERROR: modpost: "kvm_restore_lsx" [arch/loongarch/kvm/kvm.ko] undefined! ERROR: modpost: "kvm_restore_lasx" [arch/loongarch/kvm/kvm.ko] undefined! Cc: stable@vger.kernel.org # 6.9+ Fixes: cb8a2ef0848c ("LoongArch: Add ORC stack unwinder support") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408120955.qls5oNQY-lkp@intel.com/ Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 274ea3563e5ab9f468c15bfb9d2492803a66d9be Author: Huacai Chen Date: Mon Aug 26 23:11:32 2024 +0800 LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE Currently we call irq_set_noprobe() in a loop for all IRQs, but indeed it only works for IRQs below NR_IRQS_LEGACY because at init_IRQ() only legacy interrupts have been allocated. Instead, we can define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE in asm/hwirq.h and the core will automatically set the flag for all interrupts. Reviewed-by: Thomas Gleixner Signed-off-by: Huacai Chen Signed-off-by: Tianyang Zhang commit 33f58a0480bb9e2479ccdf556f61363723a50d47 Author: David Sterba Date: Wed Aug 21 01:19:57 2024 +0200 btrfs: initialize last_extent_end to fix -Wmaybe-uninitialized warning in extent_fiemap() There's a warning (probably on some older compiler version): fs/btrfs/fiemap.c: warning: 'last_extent_end' may be used uninitialized in this function [-Wmaybe-uninitialized]: => 822:19 Initialize the variable to 0 although it's not necessary as it's either properly set or not used after an error. The called function is in the same file so this is a false alert but we want to fix all -Wmaybe-uninitialized reports. Link: https://lore.kernel.org/all/20240819070639.2558629-1-geert@linux-m68k.org/ Reported-by: Geert Uytterhoeven Signed-off-by: David Sterba commit 6ba20539ac6b12ea757b3bfe11adf8de1672d7b8 Author: Liao Chen Date: Mon Aug 26 08:49:24 2024 +0000 ASoC: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Link: https://patch.msgid.link/20240826084924.368387-5-liaochen4@huawei.com Signed-off-by: Mark Brown commit 934b44589da9aa300201a00fe139c5c54f421563 Author: Liao Chen Date: Mon Aug 26 08:49:23 2024 +0000 ASoC: tda7419: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Link: https://patch.msgid.link/20240826084924.368387-4-liaochen4@huawei.com Signed-off-by: Mark Brown commit 8e1bb4a41aa78d6105e59186af3dcd545fc66e70 Author: Liao Chen Date: Mon Aug 26 08:49:22 2024 +0000 ASoC: google: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Link: https://patch.msgid.link/20240826084924.368387-3-liaochen4@huawei.com Signed-off-by: Mark Brown commit ae61a3391088d29aa8605c9f2db84295ab993a49 Author: Liao Chen Date: Mon Aug 26 08:49:21 2024 +0000 ASoC: intel: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen Link: https://patch.msgid.link/20240826084924.368387-2-liaochen4@huawei.com Signed-off-by: Mark Brown commit 4186c8d9e6af57bab0687b299df10ebd47534a0a Author: Jacky Chou Date: Thu Aug 22 15:30:06 2024 +0800 net: ftgmac100: Ensure tx descriptor updates are visible The driver must ensure TX descriptor updates are visible before updating TX pointer and TX clear pointer. This resolves TX hangs observed on AST2600 when running iperf3. Signed-off-by: Jacky Chou Signed-off-by: David S. Miller commit f2c6dbd220170c2396fb019ead67fbada1e23ebd Author: David Gow Date: Fri Aug 16 12:51:22 2024 +0800 kunit: Device wrappers should also manage driver name kunit_driver_create() accepts a name for the driver, but does not copy it, so if that name is either on the stack, or otherwise freed, we end up with a use-after-free when the driver is cleaned up. Instead, strdup() the name, and manage it as another KUnit allocation. As there was no existing kunit_kstrdup(), we add one. Further, add a kunit_ variant of strdup_const() and kfree_const(), so we don't need to allocate and manage the string in the majority of cases where it's a constant. However, these are inline functions, and is_kernel_rodata() only works for built-in code. This causes problems in two cases: - If kunit is built as a module, __{start,end}_rodata is not defined. - If a kunit test using these functions is built as a module, it will suffer the same fate. This fixes a KASAN splat with overflow.overflow_allocation_test, when built as a module. Restrict the is_kernel_rodata() case to when KUnit is built as a module, which fixes the first case, at the cost of losing the optimisation. Also, make kunit_{kstrdup,kfree}_const non-inline, so that other modules using them will not accidentally depend on is_kernel_rodata(). If KUnit is built-in, they'll benefit from the optimisation, if KUnit is not, they won't, but the string will be properly duplicated. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Reported-by: Nico Pache Closes: https://groups.google.com/g/kunit-dev/c/81V9b9QYON0 Reviewed-by: Kees Cook Reviewed-by: Maxime Ripard Reviewed-by: Rae Moar Signed-off-by: David Gow Tested-by: Rae Moar Signed-off-by: Shuah Khan commit 052f3951640fd96d2e777b3272a925ec6c0c8100 Author: Ryan Sullivan Date: Thu Aug 22 13:31:22 2024 -0400 selftests/livepatch: wait for atomic replace to occur On some machines with a large number of CPUs there is a sizable delay between an atomic replace occurring and when sysfs updates accordingly. This fix uses 'loop_until' to wait for the atomic replace to unload all previous livepatches. Reported-by: CKI Project Closes: https://datawarehouse.cki-project.org/kcidb/tests/redhat:1413102084-x86_64-kernel_upt_28 Signed-off-by: Ryan Sullivan Reviewed-by: Petr Mladek Acked-by: Joe Lawrence Link: https://lore.kernel.org/r/20240822173122.14760-1-rysulliv@redhat.com Signed-off-by: Petr Mladek commit a3379eca24a7da5118a7d090da6f8eb8611acac8 Author: Hans de Goede Date: Sun Aug 25 15:24:15 2024 +0200 platform/x86: x86-android-tablets: Make Lenovo Yoga Tab 3 X90F DMI match less strict There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary. Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240825132415.8307-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9286dfd5735b9cceb6a14bdf15e13400ccb60fe7 Author: Mathieu Fenniak Date: Fri Aug 23 15:56:28 2024 +0200 platform/x86: asus-wmi: Fix spurious rfkill on UX8406MA The Asus Zenbook Duo (UX8406MA) has a keyboard which can be placed on the laptop to connect it via USB, or can be removed from the laptop to reveal a hidden secondary display in which case the keyboard operates via Bluetooth. When it is placed on the secondary display to connect via USB, it emits a keypress for a wireless disable. This causes the rfkill system to be activated disconnecting the current wifi connection, which doesn't reflect the user's true intention. Detect this hardware and suppress any wireless switches from the keyboard; this keyboard does not have a wireless toggle capability so these presses are always spurious. Signed-off-by: Mathieu Fenniak Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240823135630.128447-1-mathieu@fenniak.net Signed-off-by: Ilpo Järvinen commit 469e5e4713989fdd5e3e502b922e7be0da2464b9 Author: Jonathan Bell Date: Wed Aug 21 08:06:31 2024 +0900 mmc: core: apply SD quirks earlier during probe Applying MMC_QUIRK_BROKEN_SD_CACHE is broken, as the card's SD quirks are referenced in sd_parse_ext_reg_perf() prior to the quirks being initialized in mmc_blk_probe(). To fix this problem, let's split out an SD-specific list of quirks and apply in mmc_sd_init_card() instead. In this way, sd_read_ext_regs() to has the available information for not assigning the SD_EXT_PERF_CACHE as one of the (un)supported features, which in turn allows mmc_sd_init_card() to properly skip execution of sd_enable_cache(). Fixes: c467c8f08185 ("mmc: Add MMC_QUIRK_BROKEN_SD_CACHE for Kingston Canvas Go Plus from 11/2019") Signed-off-by: Jonathan Bell Co-developed-by: Keita Aihara Signed-off-by: Keita Aihara Reviewed-by: Dragan Simic Reviewed-by: Avri Altman Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240820230631.GA436523@sony.com Signed-off-by: Ulf Hansson commit 5fd0628918977a0afdc2e6bc562d8751b5d3b8c5 Author: Pablo Neira Ayuso Date: Mon Aug 26 12:45:22 2024 +0200 netfilter: nf_tables: restore IP sanity checks for netdev/egress Subtract network offset to skb->len before performing IPv4 header sanity checks, then adjust transport offset from offset from mac header. Jorge Ortiz says: When small UDP packets (< 4 bytes payload) are sent from eth0, `meta l4proto udp` condition is not met because `NFT_PKTINFO_L4PROTO` is not set. This happens because there is a comparison that checks if the transport header offset exceeds the total length. This comparison does not take into account the fact that the skb network offset might be non-zero in egress mode (e.g., 14 bytes for Ethernet header). Fixes: 0ae8e4cca787 ("netfilter: nf_tables: set transport offset from mac header for netdev/egress") Reported-by: Jorge Ortiz Signed-off-by: Pablo Neira Ayuso commit 28b329f431cef840fddd9a9b493bc3eff1aa06c0 Author: Richard Fitzgerald Date: Mon Aug 26 10:49:40 2024 +0100 ALSA: hda: hda_component: Fix mutex crash if nothing ever binds Move the initialization of parent->mutex into hda_component_manager_init() so that it is always valid. In hda_component_manager_bind() do not clear the parent information. Only zero-fill the per-component data ready for it to be filled in by the components as they bind. Previously parent->mutex was being initialized only in hda_component_manager_bind(). This meant that it was only initialized if all components appeared and there was a bind callback. If there wasn't a bind the mutex object was not valid when the Realtek driver called any of the other functions. Signed-off-by: Richard Fitzgerald Fixes: 047b9cbbaa8e ("ALSA: hda: hda_component: Protect shared data with a mutex") Link: https://patch.msgid.link/20240826094940.45563-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 2dc43c5e212036458ed7c5586fb82ee183fee504 Author: Hendrik Borghorst Date: Sun Aug 25 19:43:47 2024 +0200 ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED This patch adds the HP Pavilion Aero 13 (13-bg0xxx) (year 2024) to list of quirks for keyboard LED mute indication. The laptop has two LEDs (one for speaker and one for mic mute). The pre-existing quirk ALC245_FIXUP_HP_X360_MUTE_LEDS chains both the quirk for mic and speaker mute. Tested on 6.11.0-rc4 with the aforementioned laptop. Signed-off-by: Hendrik Borghorst Cc: Link: https://patch.msgid.link/20240825174351.5687-1-hendrikborghorst@gmail.com Signed-off-by: Takashi Iwai commit 28f5df210d06beb5920cf80446f1c27456c14b92 Author: Yann Droneaud Date: Sun Aug 25 16:47:50 2024 +0200 random: vDSO: reject unknown getrandom() flags Like the getrandom() syscall, vDSO getrandom() must also reject unknown flags. [1] It would be possible to return -EINVAL from vDSO itself, but in the possible case that a new flag is added to getrandom() syscall in the future, it would be easier to get the behavior from the syscall, instead of erroring until the vDSO is extended to support the new flag or explicitly falling back. [1] Designing the API: Planning for Extension https://docs.kernel.org/process/adding-syscalls.html#designing-the-api-planning-for-extension Signed-off-by: Yann Droneaud [Jason: reworded commit message] Signed-off-by: Jason A. Donenfeld commit 51eeef9a482bcb00f6f75eda4de9bd013092b76f Author: Will Deacon Date: Fri Aug 23 17:54:54 2024 +0100 MAINTAINERS: Add Jean-Philippe as SMMUv3 SVA reviewer Add Jean-Philippe as a reviewer for the Arm SMMUv3 SVA support, since he's been a consistent contributor to that code over the years and understands the relevant parts of the architecture much better than me. Cc: Robin Murphy Cc: Jean-Philippe Brucker Cc: Mostafa Saleh Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20240823165454.1064-1-will@kernel.org Signed-off-by: Joerg Roedel commit 6093cd582f8e027117a8d4ad5d129a1aacdc53d2 Author: Jason Gunthorpe Date: Thu Aug 22 11:45:55 2024 -0300 iommu: Do not return 0 from map_pages if it doesn't do anything These three implementations of map_pages() all succeed if a mapping is requested with no read or write. Since they return back to __iommu_map() leaving the mapped output as 0 it triggers an infinite loop. Therefore nothing is using no-access protection bits. Further, VFIO and iommufd rely on iommu_iova_to_phys() to get back PFNs stored by map, if iommu_map() succeeds but iommu_iova_to_phys() fails that will create serious bugs. Thus remove this never used "nothing to do" concept and just fail map immediately. Fixes: e5fc9753b1a8 ("iommu/io-pgtable: Add ARMv7 short descriptor support") Fixes: e1d3c0fd701d ("iommu: add ARM LPAE page table allocator") Fixes: 745ef1092bcf ("iommu/io-pgtable: Move Apple DART support to its own file") Signed-off-by: Jason Gunthorpe Acked-by: Will Deacon Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/2-v1-1211e1294c27+4b1-iommu_no_prot_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 996dc53ac289b81957aa70d62ccadc6986d26a87 Author: Jason Gunthorpe Date: Thu Aug 22 11:45:54 2024 -0300 iommufd: Do not allow creating areas without READ or WRITE This results in passing 0 or just IOMMU_CACHE to iommu_map(). Most of the page table formats don't like this: amdv1 - -EINVAL armv7s - returns 0, doesn't update mapped arm-lpae - returns 0 doesn't update mapped dart - returns 0, doesn't update mapped VT-D - returns -EINVAL Unfortunately the three formats that return 0 cause serious problems: - Returning ret = but not uppdating mapped from domain->map_pages() causes an infinite loop in __iommu_map() - Not writing ioptes means that VFIO/iommufd have no way to recover them and we will have memory leaks and worse during unmap Since almost nothing can support this, and it is a useless thing to do, block it early in iommufd. Cc: stable@kernel.org Fixes: aad37e71d5c4 ("iommufd: IOCTLs for the io_pagetable") Signed-off-by: Jason Gunthorpe Reviewed-by: Nicolin Chen Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/1-v1-1211e1294c27+4b1-iommu_no_prot_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 7af6c720417f21f015f46baa33e182f349ddc93b Author: Lu Baolu Date: Thu Aug 15 20:48:57 2024 +0800 iommu/vt-d: Fix incorrect domain ID in context flush helper The helper intel_context_flush_present() is designed to flush all related caches when a context entry with the present bit set is modified. It currently retrieves the domain ID from the context entry and uses it to flush the IOTLB and context caches. This is incorrect when the context entry transitions from present to non-present, as the domain ID field is cleared before calling the helper. Fix it by passing the domain ID programmed in the context entry before the change to intel_context_flush_present(). This ensures that the correct domain ID is used for cache invalidation. Fixes: f90584f4beb8 ("iommu/vt-d: Add helper to flush caches for context change") Reported-by: Alex Williamson Closes: https://lore.kernel.org/linux-iommu/20240814162726.5efe1a6e.alex.williamson@redhat.com/ Signed-off-by: Lu Baolu Tested-by: Alex Williamson Reviewed-by: Alex Williamson Reviewed-by: Jerry Snitselaar Reviewed-by: Jacob Pan Link: https://lore.kernel.org/r/20240815124857.70038-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 68415b349f3f16904f006275757f4fcb34b8ee43 Author: Zizhi Wo Date: Thu Aug 22 17:00:04 2024 -0700 xfs: Fix the owner setting issue for rmap query in xfs fsmap I notice a rmap query bug in xfs_io fsmap: [root@fedora ~]# xfs_io -c 'fsmap -vvvv' /mnt EXT: DEV BLOCK-RANGE OWNER FILE-OFFSET AG AG-OFFSET TOTAL 0: 253:16 [0..7]: static fs metadata 0 (0..7) 8 1: 253:16 [8..23]: per-AG metadata 0 (8..23) 16 2: 253:16 [24..39]: inode btree 0 (24..39) 16 3: 253:16 [40..47]: per-AG metadata 0 (40..47) 8 4: 253:16 [48..55]: refcount btree 0 (48..55) 8 5: 253:16 [56..103]: per-AG metadata 0 (56..103) 48 6: 253:16 [104..127]: free space 0 (104..127) 24 ...... Bug: [root@fedora ~]# xfs_io -c 'fsmap -vvvv -d 0 3' /mnt [root@fedora ~]# Normally, we should be able to get one record, but we got nothing. The root cause of this problem lies in the incorrect setting of rm_owner in the rmap query. In the case of the initial query where the owner is not set, __xfs_getfsmap_datadev() first sets info->high.rm_owner to ULLONG_MAX. This is done to prevent any omissions when comparing rmap items. However, if the current ag is detected to be the last one, the function sets info's high_irec based on the provided key. If high->rm_owner is not specified, it should continue to be set to ULLONG_MAX; otherwise, there will be issues with interval omissions. For example, consider "start" and "end" within the same block. If high->rm_owner == 0, it will be smaller than the founded record in rmapbt, resulting in a query with no records. The main call stack is as follows: xfs_ioc_getfsmap xfs_getfsmap xfs_getfsmap_datadev_rmapbt __xfs_getfsmap_datadev info->high.rm_owner = ULLONG_MAX if (pag->pag_agno == end_ag) xfs_fsmap_owner_to_rmap // set info->high.rm_owner = 0 because fmr_owner == -1ULL dest->rm_owner = 0 // get nothing xfs_getfsmap_datadev_rmapbt_query The problem can be resolved by simply modify the xfs_fsmap_owner_to_rmap function internal logic to achieve. After applying this patch, the above problem have been solved: [root@fedora ~]# xfs_io -c 'fsmap -vvvv -d 0 3' /mnt EXT: DEV BLOCK-RANGE OWNER FILE-OFFSET AG AG-OFFSET TOTAL 0: 253:16 [0..7]: static fs metadata 0 (0..7) 8 Fixes: e89c041338ed ("xfs: implement the GETFSMAP ioctl") Signed-off-by: Zizhi Wo Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 410e8a18f8e9311c6bf29ae47f32ad46f0219569 Author: Darrick J. Wong Date: Thu Aug 22 16:59:48 2024 -0700 xfs: don't bother reporting blocks trimmed via FITRIM Don't bother reporting the number of bytes that we "trimmed" because the underlying storage isn't required to do anything(!) and failed discard IOs aren't reported to the caller anyway. It's not like userspace can use the reported value for anything useful like adjusting the offset parameter of the next call, and it's not like anyone ever wrote a manpage about FITRIM's out parameters. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Tested-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 95179935beadccaf0f0bb461adb778731e293da4 Author: Dave Chinner Date: Thu Aug 22 16:59:33 2024 -0700 xfs: xfs_finobt_count_blocks() walks the wrong btree As a result of the factoring in commit 14dd46cf31f4 ("xfs: split xfs_inobt_init_cursor"), mount started taking a long time on a user's filesystem. For Anders, this made mount times regress from under a second to over 15 minutes for a filesystem with only 30 million inodes in it. Anders bisected it down to the above commit, but even then the bug was not obvious. In this commit, over 20 calls to xfs_inobt_init_cursor() were modified, and some we modified to call a new function named xfs_finobt_init_cursor(). If that takes you a moment to reread those function names to see what the rename was, then you have realised why this bug wasn't spotted during review. And it wasn't spotted on inspection even after the bisect pointed at this commit - a single missing "f" isn't the easiest thing for a human eye to notice.... The result is that xfs_finobt_count_blocks() now incorrectly calls xfs_inobt_init_cursor() so it is now walking the inobt instead of the finobt. Hence when there are lots of allocated inodes in a filesystem, mount takes a -long- time run because it now walks a massive allocated inode btrees instead of the small, nearly empty free inode btrees. It also means all the finobt space reservations are wrong, so mount could potentially given ENOSPC on kernel upgrade. In hindsight, commit 14dd46cf31f4 should have been two commits - the first to convert the finobt callers to the new API, the second to modify the xfs_inobt_init_cursor() API for the inobt callers. That would have made the bug very obvious during review. Fixes: 14dd46cf31f4 ("xfs: split xfs_inobt_init_cursor") Reported-by: Anders Blomdell Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 5335affcff91b53cfc45694171f911cb23257c8b Author: Darrick J. Wong Date: Thu Aug 22 16:59:17 2024 -0700 xfs: fix folio dirtying for XFILE_ALLOC callers willy pointed out that folio_mark_dirty is the correct function to use to mark an xfile folio dirty because it calls out to the mapping's aops to mark it dirty. For tmpfs this likely doesn't matter much since it currently uses nop_dirty_folio, but let's use the abstractions properly. Reported-by: willy@infradead.org Fixes: 6907e3c00a40 ("xfs: add file_{get,put}_folio") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit e21fea4ac3cf12eba1921fbbf7764bf69c6d4b2c Author: Darrick J. Wong Date: Thu Aug 22 16:59:01 2024 -0700 xfs: fix di_onlink checking for V1/V2 inodes "KjellR" complained on IRC that an old V4 filesystem suddenly stopped mounting after upgrading from 6.9.11 to 6.10.3, with the following splat when trying to read the rt bitmap inode: 00000000: 49 4e 80 00 01 02 00 01 00 00 00 00 00 00 00 00 IN.............. 00000010: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020: 00 00 00 00 00 00 00 00 43 d2 a9 da 21 0f d6 30 ........C...!..0 00000030: 43 d2 a9 da 21 0f d6 30 00 00 00 00 00 00 00 00 C...!..0........ 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000050: 00 00 00 02 00 00 00 00 00 00 00 04 00 00 00 00 ................ 00000060: ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ As Dave Chinner points out, this is a V1 inode with both di_onlink and di_nlink set to 1 and di_flushiter == 0. In other words, this inode was formatted this way by mkfs and hasn't been touched since then. Back in the old days of xfsprogs 3.2.3, I observed that libxfs_ialloc would set di_nlink, but if the filesystem didn't have NLINK, it would then set di_version = 1. libxfs_iflush_int later sees the V1 inode and copies the value of di_nlink to di_onlink without zeroing di_onlink. Eventually this filesystem must have been upgraded to support NLINK because 6.10 doesn't support !NLINK filesystems, which is how we tripped over this old behavior. The filesystem doesn't have a realtime section, so that's why the rtbitmap inode has never been touched. Fix this by removing the di_onlink/di_nlink checking for all V1/V2 inodes because this is a muddy mess. The V3 inode handling code has always supported NLINK and written di_onlink==0 so keep that check. The removal of the V1 inode handling code when we dropped support for !NLINK obscured this old behavior. Reported-by: kjell.m.randa@gmail.com Fixes: 40cb8613d612 ("xfs: check unused nlink fields in the ondisk inode") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit e9fd436bb8fb9b9d31fdf07bbcdba6d30290c5e4 Author: Zack Rusin Date: Fri Aug 16 14:32:07 2024 -0400 drm/vmwgfx: Disable coherent dumb buffers without 3d Coherent surfaces make only sense if the host renders to them using accelerated apis. Without 3d the entire content of dumb buffers stays in the guest making all of the extra work they're doing to synchronize between guest and host useless. Configurations without 3d also tend to run with very low graphics memory limits. The pinned console fb, mob cursors and graphical login manager tend to run out of 16MB graphics memory that those guests use. Fix it by making sure the coherent dumb buffers are only used on configs with 3d enabled. Signed-off-by: Zack Rusin Fixes: d6667f0ddf46 ("drm/vmwgfx: Fix handling of dumb buffers") Reported-by: Christian Heusel Closes: https://lore.kernel.org/all/0d0330f3-2ac0-4cd5-8075-7f1cbaf72a8e@heusel.eu Cc: Broadcom internal kernel review list Cc: dri-devel@lists.freedesktop.org Cc: # v6.9+ Link: https://patchwork.freedesktop.org/patch/msgid/20240816183332.31961-4-zack.rusin@broadcom.com Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Tested-by: Benjamin Coddington commit 50f1199250912568606b3778dc56646c10cb7b04 Author: Zack Rusin Date: Fri Aug 16 14:32:06 2024 -0400 drm/vmwgfx: Fix prime with external buffers Make sure that for external buffers mapping goes through the dma_buf interface instead of trying to access pages directly. External buffers might not provide direct access to readable/writable pages so to make sure the bo's created from external dma_bufs can be read dma_buf interface has to be used. Fixes crashes in IGT's kms_prime with vgem. Regular desktop usage won't trigger this due to the fact that virtual machines will not have multiple GPUs but it enables better test coverage in IGT. Signed-off-by: Zack Rusin Fixes: b32233acceff ("drm/vmwgfx: Fix prime import/export") Cc: # v6.6+ Cc: Broadcom internal kernel review list Cc: dri-devel@lists.freedesktop.org Cc: # v6.9+ Link: https://patchwork.freedesktop.org/patch/msgid/20240816183332.31961-3-zack.rusin@broadcom.com Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala commit aba07b9a0587f50e5d3346eaa19019cf3f86c0ea Author: Zack Rusin Date: Fri Aug 16 14:32:05 2024 -0400 drm/vmwgfx: Prevent unmapping active read buffers The kms paths keep a persistent map active to read and compare the cursor buffer. These maps can race with each other in simple scenario where: a) buffer "a" mapped for update b) buffer "a" mapped for compare c) do the compare d) unmap "a" for compare e) update the cursor f) unmap "a" for update At step "e" the buffer has been unmapped and the read contents is bogus. Prevent unmapping of active read buffers by simply keeping a count of how many paths have currently active maps and unmap only when the count reaches 0. Fixes: 485d98d472d5 ("drm/vmwgfx: Add support for CursorMob and CursorBypass 4") Cc: Broadcom internal kernel review list Cc: dri-devel@lists.freedesktop.org Cc: # v5.19+ Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20240816183332.31961-2-zack.rusin@broadcom.com Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala commit 98c0cc48e27e9d269a3e4db2acd72b486c88ec77 Author: Guenter Roeck Date: Thu Aug 8 08:50:03 2024 -0700 apparmor: fix policy_unpack_test on big endian systems policy_unpack_test fails on big endian systems because data byte order is expected to be little endian but is generated in host byte order. This results in test failures such as: # policy_unpack_test_unpack_array_with_null_name: EXPECTATION FAILED at security/apparmor/policy_unpack_test.c:150 Expected array_size == (u16)16, but array_size == 4096 (0x1000) (u16)16 == 16 (0x10) # policy_unpack_test_unpack_array_with_null_name: pass:0 fail:1 skip:0 total:1 not ok 3 policy_unpack_test_unpack_array_with_null_name # policy_unpack_test_unpack_array_with_name: EXPECTATION FAILED at security/apparmor/policy_unpack_test.c:164 Expected array_size == (u16)16, but array_size == 4096 (0x1000) (u16)16 == 16 (0x10) # policy_unpack_test_unpack_array_with_name: pass:0 fail:1 skip:0 total:1 Add the missing endianness conversions when generating test data. Fixes: 4d944bcd4e73 ("apparmor: add AppArmor KUnit tests for policy unpack") Cc: Brendan Higgins Cc: Kees Cook Signed-off-by: Guenter Roeck commit 5a4c785905fd9361d067127b42564c08893f2a6f Author: Guenter Roeck Date: Mon Aug 5 18:13:41 2024 -0700 Revert "MIPS: csrc-r4k: Apply verification clocksource flags" This reverts commit 7190401fc56fb5f02ee3d04476778ab000bbaf32. Verifying the clock source sometimes deems the MIPS clock to be unstable, at least in qemu. clocksource: timekeeping watchdog on CPU0: Marking clocksource 'MIPS' as unstable because the skew is too large: clocksource: 'jiffies' wd_nsec: 500000000 wd_now: ffff8bde wd_last: ffff8bac mask: ffffffff clocksource: 'MIPS' cs_nsec: 940634468 cs_now: 310181c4 cs_last: 28090a09 mask: ffffffff clocksource: Clocksource 'MIPS' skewed 440634468 ns (440 ms) over watchdog 'jiffies' interval of 500000000 ns (500 ms) clocksource: 'MIPS' is current clocksource. If this happens, network interfaces fail to come online. Signed-off-by: Guenter Roeck commit 0075df288dd8a7abfe03b3766176c393063591dd Author: Mike Rapoport Date: Mon Jul 29 08:33:27 2024 +0300 microblaze: don't treat zero reserved memory regions as error Before commit 721f4a6526da ("mm/memblock: remove empty dummy entry") the check for non-zero of memblock.reserved.cnt in mmu_init() would always be true either because memblock.reserved.cnt is initialized to 1 or because there were memory reservations earlier. The removal of dummy empty entry in memblock caused this check to fail because now memblock.reserved.cnt is initialized to 0. Remove the check for non-zero of memblock.reserved.cnt because it's perfectly fine to have an empty memblock.reserved array that early in boot. Reported-by: Guenter Roeck Signed-off-by: Mike Rapoport Reviewed-by: Wei Yang Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20240729053327.4091459-1-rppt@kernel.org Signed-off-by: Guenter Roeck commit 9efaebc0072b8e95505544bf385c20ee8a29d799 Author: Ross Brown Date: Tue Jul 30 08:21:42 2024 +0200 hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING X570-E GAMING does not have VRM temperature sensor. Signed-off-by: Ross Brown Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20240730062320.5188-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit 2d3447261031503b181dacc549fe65ffe2d93d65 Author: Josef Bacik Date: Wed Aug 21 15:53:18 2024 -0400 btrfs: run delayed iputs when flushing delalloc We have transient failures with btrfs/301, specifically in the part where we do for i in $(seq 0 10); do write 50m to file rm -f file done Sometimes this will result in a transient quota error, and it's because sometimes we start writeback on the file which results in a delayed iput, and thus the rm doesn't actually clean the file up. When we're flushing the quota space we need to run the delayed iputs to make sure all the unlinks that we think have completed have actually completed. This removes the small window where we could fail to find enough space in our quota. CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 25dfc9e357af8aed1ca79b318a73f2c59c1f0b2b Author: Kan Liang Date: Mon Aug 19 11:30:04 2024 -0700 perf/x86/intel: Limit the period on Haswell Running the ltp test cve-2015-3290 concurrently reports the following warnings. perfevents: irq loop stuck! WARNING: CPU: 31 PID: 32438 at arch/x86/events/intel/core.c:3174 intel_pmu_handle_irq+0x285/0x370 Call Trace: ? __warn+0xa4/0x220 ? intel_pmu_handle_irq+0x285/0x370 ? __report_bug+0x123/0x130 ? intel_pmu_handle_irq+0x285/0x370 ? __report_bug+0x123/0x130 ? intel_pmu_handle_irq+0x285/0x370 ? report_bug+0x3e/0xa0 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x50 ? asm_exc_invalid_op+0x1a/0x20 ? irq_work_claim+0x1e/0x40 ? intel_pmu_handle_irq+0x285/0x370 perf_event_nmi_handler+0x3d/0x60 nmi_handle+0x104/0x330 Thanks to Thomas Gleixner's analysis, the issue is caused by the low initial period (1) of the frequency estimation algorithm, which triggers the defects of the HW, specifically erratum HSW11 and HSW143. (For the details, please refer https://lore.kernel.org/lkml/87plq9l5d2.ffs@tglx/) The HSW11 requires a period larger than 100 for the INST_RETIRED.ALL event, but the initial period in the freq mode is 1. The erratum is the same as the BDM11, which has been supported in the kernel. A minimum period of 128 is enforced as well on HSW. HSW143 is regarding that the fixed counter 1 may overcount 32 with the Hyper-Threading is enabled. However, based on the test, the hardware has more issues than it tells. Besides the fixed counter 1, the message 'interrupt took too long' can be observed on any counter which was armed with a period < 32 and two events expired in the same NMI. A minimum period of 32 is enforced for the rest of the events. The recommended workaround code of the HSW143 is not implemented. Because it only addresses the issue for the fixed counter. It brings extra overhead through extra MSR writing. No related overcounting issue has been reported so far. Fixes: 3a632cb229bf ("perf/x86/intel: Add simple Haswell PMU support") Reported-by: Li Huafei Suggested-by: Thomas Gleixner Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240819183004.3132920-1-kan.liang@linux.intel.com Closes: https://lore.kernel.org/lkml/20240729223328.327835-1-lihuafei1@huawei.com/ commit 44ceabdec12f4e5938f5668c5a691aa3aac703d7 Author: YOUNGJIN JOO Date: Sun Aug 25 18:25:15 2024 +0900 ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book3 Ultra 144d:c1cc requires the same workaround to enable the speaker amp as other Samsung models with the ALC298 codec. Signed-off-by: YOUNGJIN JOO Cc: Link: https://patch.msgid.link/20240825092515.28728-1-neoelec@gmail.com Signed-off-by: Takashi Iwai commit 58aec91efb93338d1cc7acc0a93242613a2a4e5f Author: Miao Wang Date: Sun Aug 25 22:17:39 2024 +0800 LoongArch: Remove the unused dma-direct.h dma-direct.h is introduced in commit d4b6f1562a3c3284 ("LoongArch: Add Non-Uniform Memory Access (NUMA) support"). In commit c78c43fe7d42524c ("LoongArch: Use acpi_arch_dma_setup() and remove ARCH_HAS_PHYS_TO_DMA"), ARCH_HAS_PHYS_TO_DMA was deselected and the coresponding phys_to_dma()/ dma_to_phys() functions were removed. However, the unused dma-direct.h was left behind, which is removed by this patch. Cc: Fixes: c78c43fe7d42 ("LoongArch: Use acpi_arch_dma_setup() and remove ARCH_HAS_PHYS_TO_DMA") Signed-off-by: Miao Wang Signed-off-by: Huacai Chen commit 416871f4fb84bc96822562e654941d5625a25bf8 Author: David Howells Date: Fri Aug 23 14:22:42 2024 +0100 cifs: Fix FALLOC_FL_PUNCH_HOLE support The cifs filesystem doesn't quite emulate FALLOC_FL_PUNCH_HOLE correctly (note that due to lack of protocol support, it can't actually implement it directly). Whilst it will (partially) invalidate dirty folios in the pagecache, it doesn't write them back first, and so the EOF marker on the server may be lower than inode->i_size. This presents a problem, however, as if the punched hole invalidates the tail of the locally cached dirty data, writeback won't know it needs to move the EOF over to account for the hole punch (which isn't supposed to move the EOF). We could just write zeroes over the punched out region of the pagecache and write that back - but this is supposed to be a deallocatory operation. Fix this by manually moving the EOF over on the server after the operation if the hole punched would corrupt it. Note that the FSCTL_SET_ZERO_DATA RPC and the setting of the EOF should probably be compounded to stop a third party interfering (or, at least, massively reduce the chance). This was reproducible occasionally by using fsx with the following script: truncate 0x0 0x375e2 0x0 punch_hole 0x2f6d3 0x6ab5 0x375e2 truncate 0x0 0x3a71f 0x375e2 mapread 0xee05 0xcf12 0x3a71f write 0x2078e 0x5604 0x3a71f write 0x3ebdf 0x1421 0x3a71f * punch_hole 0x379d0 0x8630 0x40000 * mapread 0x2aaa2 0x85b 0x40000 fallocate 0x1b401 0x9ada 0x40000 read 0x15f2 0x7d32 0x40000 read 0x32f37 0x7a3b 0x40000 * The second "write" should extend the EOF to 0x40000, and the "punch_hole" should operate inside of that - but that depends on whether the VM gets in and writes back the data first. If it doesn't, the file ends up 0x3a71f in size, not 0x40000. Fixes: 31742c5a3317 ("enable fallocate punch hole ("fallocate -p") for SMB3") Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Shyam Prasad N cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev Signed-off-by: Steve French commit 017d1701743657fbfaea74397727a9d2b81846b7 Author: Stefan Metzmacher Date: Wed Aug 21 16:31:39 2024 +0200 smb/client: fix rdma usage in smb2_async_writev() rqst.rq_iter needs to be truncated otherwise we'll also send the bytes into the stream socket... This is the logic behind rqst.rq_npages = 0, which was removed in "cifs: Change the I/O paths to use an iterator rather than a page list" (d08089f649a0cfb2099c8551ac47eef0cc23fdf2). Cc: stable@vger.kernel.org Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Reviewed-by: David Howells Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit b608e2c318789aeba49055747166e13bee57df4a Author: Stefan Metzmacher Date: Wed Aug 21 15:59:12 2024 +0200 smb/client: remove unused rq_iter_size from struct smb_rqst Reviewed-by: David Howells Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit c724b2ab6a46435b4e7d58ad2fbbdb7a318823cf Author: Stefan Metzmacher Date: Wed Aug 21 17:18:23 2024 +0200 smb/client: avoid dereferencing rdata=NULL in smb2_new_read_req() This happens when called from SMB2_read() while using rdma and reaching the rdma_readwrite_threshold. Cc: stable@vger.kernel.org Fixes: a6559cc1d35d ("cifs: split out smb3_use_rdma_offload() helper") Reviewed-by: David Howells Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French commit 5be63fc19fcaa4c236b307420483578a56986a37 Author: Linus Torvalds Date: Sun Aug 25 19:07:11 2024 +1200 Linux 6.11-rc5 commit 72bea05cb1ad486b1a850f584cc93b651579ad2f Merge: 780bdc1ba7764 49aa7830396bc Author: Linus Torvalds Date: Sun Aug 25 17:20:48 2024 +1200 Merge tag 'bcachefs-2024-08-24' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: - assorted syzbot fixes - some upgrade fixes for old (pre 1.0) filesystems - fix for moving data off a device that was switched to durability=0 after data had been written to it. - nocow deadlock fix - fix for new rebalance_work accounting * tag 'bcachefs-2024-08-24' of git://evilpiepirate.org/bcachefs: (28 commits) bcachefs: Fix rebalance_work accounting bcachefs: Fix failure to flush moves before sleeping in copygc bcachefs: don't use rht_bucket() in btree_key_cache_scan() bcachefs: add missing inode_walker_exit() bcachefs: clear path->should_be_locked in bch2_btree_key_cache_drop() bcachefs: Fix double assignment in check_dirent_to_subvol() bcachefs: Fix refcounting in discard path bcachefs: Fix compat issue with old alloc_v4 keys bcachefs: Fix warning in bch2_fs_journal_stop() fs/super.c: improve get_tree() error message bcachefs: Fix missing validation in bch2_sb_journal_v2_validate() bcachefs: Fix replay_now_at() assert bcachefs: Fix locking in bch2_ioc_setlabel() bcachefs: fix failure to relock in btree_node_fill() bcachefs: fix failure to relock in bch2_btree_node_mem_alloc() bcachefs: unlock_long() before resort in journal replay bcachefs: fix missing bch2_err_str() bcachefs: fix time_stats_to_text() bcachefs: Fix bch2_bucket_gens_init() bcachefs: Fix bch2_trigger_alloc assert ... commit 780bdc1ba77646c3461f1988b12c42c60f836d77 Merge: 48fb4b3d9b43e 2b7e0573a4906 Author: Linus Torvalds Date: Sun Aug 25 12:15:04 2024 +1200 Merge tag '6.11-rc5-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - query directory flex array fix - fix potential null ptr reference in open - fix error message in some open cases - two minor cleanups * tag '6.11-rc5-server-fixes' of git://git.samba.org/ksmbd: smb/server: update misguided comment of smb2_allocate_rsp_buf() smb/server: remove useless assignment of 'file_present' in smb2_open() smb/server: fix potential null-ptr-deref of lease_ctx_info in smb2_open() smb/server: fix return value of smb2_open() ksmbd: the buffer of smb2 query dir response has at least 1 byte commit 48fb4b3d9b43ea8f81de06f12f83912f8c1d5a15 Merge: 891e811ad6048 1642285e511c2 Author: Linus Torvalds Date: Sun Aug 25 12:05:23 2024 +1200 Merge tag 's390-6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix KASLR base offset to account for symbol offsets in the vmlinux ELF file, preventing tool breakages like the drgn debugger - Fix potential memory corruption of physmem_info during kernel physical address randomization - Fix potential memory corruption due to overlap between the relocated lowcore and identity mapping by correctly reserving lowcore memory - Fix performance regression and avoid randomizing identity mapping base by default - Fix unnecessary delay of AP bus binding complete uevent to prevent startup lag in KVM guests using AP * tag 's390-6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/boot: Fix KASLR base offset off by __START_KERNEL bytes s390/boot: Avoid possible physmem_info segment corruption s390/ap: Refine AP bus bindings complete processing s390/mm: Pin identity mapping base to zero s390/mm: Prevent lowcore vs identity mapping overlap commit 891e811ad604805b2c706f85480e38961b706a70 Merge: d2bafcf224f39 cbaac68987b86 Author: Linus Torvalds Date: Sun Aug 25 12:00:16 2024 +1200 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "The important core fix is another tweak to our discard discovery issues. The off by 512 in logical block count seems bad, but in fact the inline was only ever used in debug prints, which is why no-one noticed" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Do not attempt to configure discard unless LBPME is set scsi: MAINTAINERS: Add header files to SCSI SUBSYSTEM scsi: ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC scsi: ufs: core: Add a quirk for handling broken LSDBS field in controller capabilities register scsi: core: Fix the return value of scsi_logical_block_count() scsi: MAINTAINERS: Update HiSilicon SAS controller driver maintainer commit 128f71fe014fc91efa1407ce549f94a9a9f1072c Author: Huang-Huang Bao Date: Tue Jul 9 18:54:28 2024 +0800 pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins The base iomux offsets for each GPIO pin line are accumulatively calculated based off iomux width flag in rockchip_pinctrl_get_soc_data. If the iomux width flag is one of IOMUX_WIDTH_4BIT, IOMUX_WIDTH_3BIT or IOMUX_WIDTH_2BIT, the base offset for next pin line would increase by 8 bytes, otherwise it would increase by 4 bytes. Despite most of GPIO2-B iomux have 2-bit data width, which can be fit into 4 bytes space with write mask, it actually take 8 bytes width for whole GPIO2-B line. Commit e8448a6c817c ("pinctrl: rockchip: fix pinmux bits for RK3328 GPIO2-B pins") wrongly set iomux width flag to 0, causing all base iomux offset for line after GPIO2-B to be calculated wrong. Fix the iomux width flag to IOMUX_WIDTH_2BIT so the offset after GPIO2-B is correctly increased by 8, matching the actual width of GPIO2-B iomux. Fixes: e8448a6c817c ("pinctrl: rockchip: fix pinmux bits for RK3328 GPIO2-B pins") Cc: stable@vger.kernel.org Reported-by: Richard Kojedzinszky Closes: https://lore.kernel.org/linux-rockchip/4f29b743202397d60edfb3c725537415@kojedz.in/ Tested-by: Richard Kojedzinszky Signed-off-by: Huang-Huang Bao Reviewed-by: Heiko Stuebner Tested-by: Daniel Golle Tested-by: Trevor Woerner Link: https://lore.kernel.org/20240709105428.1176375-1-i@eh5.me Signed-off-by: Linus Walleij commit 49aa7830396bce33b00fa7ee734c35de36521138 Author: Kent Overstreet Date: Fri Aug 23 15:35:22 2024 -0400 bcachefs: Fix rebalance_work accounting rebalance_work was keying off of the presence of rebelance_opts in the extent - but that was incorrect, we keep those around after rebalance for indirect extents since the inode's options are not directly available Fixes: 20ac515a9cc7 ("bcachefs: bch_acct_rebalance_work") Signed-off-by: Kent Overstreet commit d3204616a67e53fdcad14c7026869330fb382fd4 Author: Kent Overstreet Date: Fri Aug 23 17:38:41 2024 -0400 bcachefs: Fix failure to flush moves before sleeping in copygc This fixes an apparent deadlock - rebalance would get stuck trying to take nocow locks because they weren't being released by copygc. Signed-off-by: Kent Overstreet commit e00e99ba6c6b8e5239e75cd6684a6827d93c39a2 Author: David Howells Date: Sat Aug 24 12:56:53 2024 +0100 netfs: Fix interaction of streaming writes with zero-point tracker When a folio that is marked for streaming write (dirty, but not uptodate, with partial content specified in the private data) is written back, the folio is effectively switched to the blank state upon completion of the write. This means that if we want to read it in future, we need to reread the whole folio. However, if the folio is above the zero_point position, when it is read back, it will just be cleared and the read skipped, leading to apparent local corruption. Fix this by increasing the zero_point to the end of the dirty data in the folio when clearing the folio state after writeback. This is analogous to the folio having ->release_folio() called upon it. This was causing the config.log generated by configuring a cpython tree on a cifs share to get corrupted because the scripts involved were appending text to the file in small pieces. Fixes: 288ace2f57c9 ("netfs: New writeback implementation") Signed-off-by: David Howells Link: https://lore.kernel.org/r/563286.1724500613@warthog.procyon.org.uk cc: Steve French cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 950b03d0f664a54389a555d79215348ed413161f Author: David Howells Date: Fri Aug 23 21:08:13 2024 +0100 netfs: Fix missing iterator reset on retry of short read Fix netfs_rreq_perform_resubmissions() to reset before retrying a short read, otherwise the wrong part of the output buffer will be used. Fixes: 92b6cc5d1e7c ("netfs: Add iov_iters to (sub)requests to describe various buffers") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240823200819.532106-6-dhowells@redhat.com cc: Steve French cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit cce6bfa6ca0e30af9927b0074c97fe6a92f28092 Author: David Howells Date: Fri Aug 23 21:08:12 2024 +0100 netfs: Fix trimming of streaming-write folios in netfs_inval_folio() When netfslib writes to a folio that it doesn't have data for, but that data exists on the server, it will make a 'streaming write' whereby it stores data in a folio that is marked dirty, but not uptodate. When it does this, it attaches a record to folio->private to track the dirty region. When truncate() or fallocate() wants to invalidate part of such a folio, it will call into ->invalidate_folio(), specifying the part of the folio that is to be invalidated. netfs_invalidate_folio(), on behalf of the filesystem, must then determine how to trim the streaming write record. In a couple of cases, however, it does this incorrectly (the reduce-length and move-start cases are switched over and don't, in any case, calculate the value correctly). Fix this by making the logic tree more obvious and fixing the cases. Fixes: 9ebff83e6481 ("netfs: Prep to use folio->private for write grouping and streaming write") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240823200819.532106-5-dhowells@redhat.com cc: Matthew Wilcox (Oracle) cc: Pankaj Raghav cc: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 7dfc8f0c6144c290dbeb01835a67e81b34dda8cd Author: David Howells Date: Fri Aug 23 21:08:11 2024 +0100 netfs: Fix netfs_release_folio() to say no if folio dirty Fix netfs_release_folio() to say no (ie. return false) if the folio is dirty (analogous with iomap's behaviour). Without this, it will say yes to the release of a dirty page by split_huge_page_to_list_to_order(), which will result in the loss of untruncated data in the folio. Without this, the generic/075 and generic/112 xfstests (both fsx-based tests) fail with minimum folio size patches applied[1]. Fixes: c1ec4d7c2e13 ("netfs: Provide invalidate_folio and release_folio calls") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240815090849.972355-1-kernel@pankajraghav.com/ [1] Link: https://lore.kernel.org/r/20240823200819.532106-4-dhowells@redhat.com cc: Matthew Wilcox (Oracle) cc: Pankaj Raghav cc: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit a74ee0e878e262c0276966528d72d4e887174410 Author: David Howells Date: Fri Aug 23 21:08:10 2024 +0100 afs: Fix post-setattr file edit to do truncation correctly At the end of an kAFS RPC operation, there is an "edit" phase (originally intended for post-directory modification ops to edit the local image) that the setattr VFS op uses to fix up the pagecache if the RPC that requested truncation of a file was successful. afs_setattr_edit_file() calls truncate_setsize() which sets i_size, expands the pagecache if needed and truncates the pagecache. The first two of those, however, are redundant as they've already been done by afs_setattr_success() under the io_lock and the first is also done under the callback lock (cb_lock). Fix afs_setattr_edit_file() to call truncate_pagecache() instead (which is called by truncate_setsize(), thereby skipping the redundant parts. Fixes: 100ccd18bb41 ("netfs: Optimise away reads above the point at which there can be no data") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240823200819.532106-3-dhowells@redhat.com cc: Matthew Wilcox (Oracle) cc: Pankaj Raghav cc: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 0aa2e1b2fb7a75aa4b5b4347055ccfea6f091769 Author: David Howells Date: Fri Aug 23 21:08:09 2024 +0100 mm: Fix missing folio invalidation calls during truncation When AS_RELEASE_ALWAYS is set on a mapping, the ->release_folio() and ->invalidate_folio() calls should be invoked even if PG_private and PG_private_2 aren't set. This is used by netfslib to keep track of the point above which reads can be skipped in favour of just zeroing pagecache locally. There are a couple of places in truncation in which invalidation is only called when folio_has_private() is true. Fix these to check folio_needs_release() instead. Without this, the generic/075 and generic/112 xfstests (both fsx-based tests) fail with minimum folio size patches applied[1]. Fixes: b4fa966f03b7 ("mm, netfs, fscache: stop read optimisation when folio removed from pagecache") Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240815090849.972355-1-kernel@pankajraghav.com/ [1] Link: https://lore.kernel.org/r/20240823200819.532106-2-dhowells@redhat.com Reviewed-by: Matthew Wilcox (Oracle) cc: Matthew Wilcox (Oracle) cc: Pankaj Raghav cc: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netfs@lists.linux.dev cc: linux-mm@kvack.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit d10771d51b28f73aeb4e533207a294c1c1d45690 Merge: 996b37da1e0f5 441e36ef5b347 Author: Christian Brauner Date: Fri Aug 23 19:57:13 2024 +0200 Merge patch series "ovl: simplify ovl_parse_param_lowerdir()" Simplify and fix overlayfs layer parsing so the maximum of 500 layers can be used. * patches from https://lore.kernel.org/r/20240705011510.794025-1-chengzhihao1@huawei.com: ovl: ovl_parse_param_lowerdir: Add missed '\n' for pr_err ovl: fix wrong lowerdir number check for parameter Opt_lowerdir ovl: pass string to ovl_parse_layer() Link: https://lore.kernel.org/r/20240705011510.794025-1-chengzhihao1@huawei.com Signed-off-by: Christian Brauner commit d2bafcf224f3911b183113b2fcb536c9e90684a3 Merge: cb2c84b38082f ff0ce721ec213 Author: Linus Torvalds Date: Sat Aug 24 10:39:18 2024 +0800 Merge tag 'cgroup-for-6.11-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Three patches addressing cpuset corner cases" * tag 'cgroup-for-6.11-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: Eliminate unncessary sched domains rebuilds in hotplug cgroup/cpuset: Clear effective_xcpus on cpus_allowed clearing only if cpus.exclusive not set cgroup/cpuset: fix panic caused by partcmd_update commit cb2c84b38082f8bd052bf909c7da344b83578ace Merge: 5bd6cf0074076 c4c8f369b6a6d Author: Linus Torvalds Date: Sat Aug 24 10:35:57 2024 +0800 Merge tag 'wq-for-6.11-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixes from Tejun Heo: "Nothing too interesting. One patch to remove spurious warning and others to address static checker warnings" * tag 'wq-for-6.11-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Correct declaration of cpu_pwq in struct workqueue_struct workqueue: Fix spruious data race in __flush_work() workqueue: Remove incorrect "WARN_ON_ONCE(!list_empty(&worker->entry));" from dying worker workqueue: Fix UBSAN 'subtraction overflow' error in shift_and_mask() workqueue: doc: Fix function name, remove markers commit 5bd6cf00740765c47b5684e2d75ac90d3371659a Merge: a8a8dcbd679e2 50f2b98dc83de Author: Linus Torvalds Date: Sat Aug 24 10:10:43 2024 +0800 Merge tag 'mips-fixes_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - Set correct timer mode on Loongson64 - Only request r4k clockevent interrupt on one CPU * tag 'mips-fixes_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed MIPS: Loongson64: Set timer mode in cpu-probe commit 740f2e2791b98e47288b3814c83a3f566518fed2 Author: Pawel Laszczak Date: Wed Aug 21 06:07:42 2024 +0000 usb: cdnsp: fix for Link TRB with TC Stop Endpoint command on LINK TRB with TC bit set to 1 causes that internal cycle bit can have incorrect state after command complete. In consequence empty transfer ring can be incorrectly detected when EP is resumed. NOP TRB before LINK TRB avoid such scenario. Stop Endpoint command is then on NOP TRB and internal cycle bit is not changed and have correct value. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") cc: Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/PH7PR07MB953878279F375CCCE6C6F40FDD8E2@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit a8a8dcbd679e223cfdfec304d55287e07e4d0054 Merge: 60f0560f53e39 75c8f387dd160 Author: Linus Torvalds Date: Sat Aug 24 10:03:03 2024 +0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 kvm fixes from Catalin Marinas: - Don't drop references on LPIs that weren't visited by the vgic-debug iterator - Cure lock ordering issue when unregistering vgic redistributors - Fix for misaligned stage-2 mappings when VMs are backed by hugetlb pages - Treat SGI registers as UNDEFINED if a VM hasn't been configured for GICv3 * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 KVM: arm64: Ensure canonical IPA is hugepage-aligned when handling fault KVM: arm64: vgic: Don't hold config_lock while unregistering redistributors KVM: arm64: vgic-debug: Don't put unmarked LPIs commit 60f0560f53e395adf4bce7282d8d4bc94a4952ac Merge: 66ace9a8f9b4d f92214e4c312f Author: Linus Torvalds Date: Sat Aug 24 09:03:25 2024 +0800 Merge tag 'nfs-for-6.11-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: - Fix rpcrdma refcounting in xa_alloc - Fix rpcrdma usage of XA_FLAGS_ALLOC - Fix requesting FATTR4_WORD2_OPEN_ARGUMENTS - Fix attribute bitmap decoder to handle a 3rd word - Add reschedule points when returning delegations to avoid soft lockups - Fix clearing layout segments in layoutreturn - Avoid unnecessary rescanning of the per-server delegation list * tag 'nfs-for-6.11-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS: Avoid unnecessary rescanning of the per-server delegation list NFSv4: Fix clearing of layout segments in layoutreturn NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations nfs: fix bitmap decoder to handle a 3rd word nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS rpcrdma: Trace connection registration and unregistration rpcrdma: Use XA_FLAGS_ALLOC instead of XA_FLAGS_ALLOC1 rpcrdma: Device kref is over-incremented on error from xa_alloc commit 66ace9a8f9b4dedc44045c1e47accf148c7cb5fa Merge: 7eb61cc674ee0 5e51224d2afbd Author: Linus Torvalds Date: Sat Aug 24 08:50:21 2024 +0800 Merge tag 'v6.11-rc4-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - fix refcount leak (can cause rmmod fail) - fix byte range locking problem with cached reads - fix for mount failure if reparse point unrecognized - minor typo * tag 'v6.11-rc4-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb/client: fix typo: GlobalMid_Sem -> GlobalMid_Lock smb: client: ignore unhandled reparse tags smb3: fix problem unloading module due to leaked refcount on shutdown smb3: fix broken cached reads when posix locks commit 7eb61cc674ee0f597e7954d38e4e08fe8c5b19ba Merge: 79a899e3d643a 4e870e6bbec5c Author: Linus Torvalds Date: Sat Aug 24 08:15:21 2024 +0800 Merge tag 'input-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a tweak to uinput interface to reject requests with abnormally large number of slots. 100 slots/contacts should be enough for real devices - support for FocalTech FT8201 added to the edt-ft5x06 driver - tweaks to i8042 to handle more devices that have issue with its emulation - Synaptics touchpad switched to native SMbus/RMI mode on HP Elitebook 840 G2 - other minor fixes * tag 'input-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: himax_hx83112b - fix incorrect size when reading product ID Input: i8042 - use new forcenorestore quirk to replace old buggy quirk combination Input: i8042 - add forcenorestore quirk to leave controller untouched even on s3 Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table Input: uinput - reject requests with unreasonable number of slots Input: edt-ft5x06 - add support for FocalTech FT8201 dt-bindings: input: touchscreen: edt-ft5x06: Document FT8201 support Input: adc-joystick - fix optional value handling Input: synaptics - enable SMBus for HP Elitebook 840 G2 Input: ads7846 - ratelimit the spi_sync error message commit 79a899e3d643a256b120d3e9cbf518b55e6f3686 Merge: d5afaf917e802 76f461867800f Author: Linus Torvalds Date: Sat Aug 24 08:10:17 2024 +0800 Merge tag 'drm-fixes-2024-08-24' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Weekly fixes. xe and msm are the major groups, with amdgpu/i915/nouveau having smaller bits. xe has a bunch of hw workaround fixes that were found to be missing, so that is why there are a bunch of scattered fixes, and one larger one. But overall size doesn't look too out of the ordinary. msm: - virtual plane fixes: - drop yuv on hw where not supported - csc vs yuv format fix - rotation fix - fix fb cleanup on close - reset phy before link training - fix visual corruption at 4K - fix NULL ptr crash on hotplug - simplify debug macros - sc7180 fix - adreno firmware name error path fix amdgpu: - GFX10 firmware loading fix - SDMA 5.2 fix - Debugfs parameter validation fix - eGPU hotplug fix i915: - fix HDCP timeouts nouveau: - fix SG_DEBUG crash xe: - Fix OA format masks which were breaking build with gcc-5 - Fix opregion leak (Lucas) - Fix OA sysfs entry (Ashutosh) - Fix VM dma-resv lock (Brost) - Fix tile fini sequence (Brost) - Prevent UAF around preempt fence (Auld) - Fix DGFX display suspend/resume (Maarten) - Many Xe/Xe2 critical workarounds (Auld, Ngai-Mint, Bommu, Tejas, Daniele) - Fix devm/drmm issues (Daniele) - Fix missing workqueue destroy in xe_gt_pagefault (Stuart) - Drop HW fence pointer to HW fence ctx (Brost) - Free job before xe_exec_queue_put (Brost)" * tag 'drm-fixes-2024-08-24' of https://gitlab.freedesktop.org/drm/kernel: (35 commits) drm/xe: Free job before xe_exec_queue_put drm/xe: Drop HW fence pointer to HW fence ctx drm/xe: Fix missing workqueue destroy in xe_gt_pagefault drm/amdgpu: fix eGPU hotplug regression drm/amdgpu: Validate TA binary size drm/amdgpu/sdma5.2: limit wptr workaround to sdma 5.2.1 drm/amdgpu: fixing rlc firmware loading failure issue drm/xe/uc: Use devm to register cleanup that includes exec_queues drm/xe: use devm instead of drmm for managed bo drm/xe/xe2hpg: Add Wa_14021821874 drm/xe: fix WA 14018094691 drm/xe/xe2: Add Wa_15015404425 drm/xe/xe2: Make subsequent L2 flush sequential drm/xe/xe2lpg: Extend workaround 14021402888 drm/xe/xe2lpm: Extend Wa_16021639441 drm/xe/bmg: implement Wa_16023588340 drm/xe/oa/uapi: Make bit masks unsigned drm/xe/display: Make display suspend/resume work on discrete drm/xe: prevent UAF around preempt fence drm/xe: Fix tile fini sequence ... commit d5afaf917e802665d67673991974f5bc204dfa11 Merge: 489270f44c3fc e6b09a1738707 Author: Linus Torvalds Date: Sat Aug 24 07:49:14 2024 +0800 Merge tag 'block-6.11-20240823' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith - Remove unused struct field (Nilay) - Fix fabrics keep-alive teardown order (Ming) - Write zeroes fixes (John) * tag 'block-6.11-20240823' of git://git.kernel.dk/linux: nvme: Remove unused field nvme: move stopping keep-alive into nvme_uninit_ctrl() block: Drop NULL check in bdev_write_zeroes_sectors() block: Read max write zeroes once for __blkdev_issue_write_zeroes() commit 489270f44c3fc2fb8d0e5d102ea08a90e93ca135 Merge: b09f6ca99c46e e0ee967630c8e Author: Linus Torvalds Date: Sat Aug 24 07:45:08 2024 +0800 Merge tag 'io_uring-6.11-20240823' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix for provided buffer validation" * tag 'io_uring-6.11-20240823' of git://git.kernel.dk/linux: io_uring/kbuf: sanitize peek buffer setup commit b09f6ca99c46e4a561ac943253aca9beae8c1146 Merge: 6ae4e48b67eaf 5c7bb62cb8f53 Author: Linus Torvalds Date: Sat Aug 24 07:39:35 2024 +0800 Merge tag 'acpi-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix backlight control on a Dell All In One system where a backlight controller board is attached to a UART port and the dell-uart backlight driver binds to it, but the backlight is actually controlled by other means (Hans de Goede)" * tag 'acpi-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: video: Add backlight=native quirk for Dell OptiPlex 7760 AIO platform/x86: dell-uart-backlight: Use acpi_video_get_backlight_type() ACPI: video: Add Dell UART backlight controller detection commit 6ae4e48b67eaf8a140ac3a6f0f8ea2627a174aca Merge: f76a30a96cb85 c0a1ef9c5be72 Author: Linus Torvalds Date: Sat Aug 24 07:26:28 2024 +0800 Merge tag 'thermal-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "These fix error handling in the thermal debug code and OF node reference leaks in the thermal OF driver. Specifics: - Use IS_ERR() in checks of debugfs_create_dir() return value instead of checking it against NULL in the thermal debug code (Yang Ruibin) - Fix three OF node reference leaks in thermal_of (Krzysztof Kozlowski)" * tag 'thermal-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: of: Fix OF node leak in of_thermal_zone_find() error paths thermal: of: Fix OF node leak in thermal_of_zone_register() thermal: of: Fix OF node leak in thermal_of_trips_init() error path thermal/debugfs: Fix the NULL vs IS_ERR() confusion in debugfs_create_dir() commit f76a30a96cb855e025c5f15f3ed939950828c136 Merge: c2a905a6d6faa a1e627af32ed6 Author: Linus Torvalds Date: Sat Aug 24 06:58:04 2024 +0800 Merge tag 'mmc-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull mmc fixes from Ulf Hansson: "MMC core: - Fix NULL dereference for mmc_test on allocation failure MMC host: - dw_mmc: Fix support for deferred probe for biu/ciu clocks - mtk-sd: Fix CMD8 support when fragile tuning settings" * tag 'mmc-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mmc_test: Fix NULL dereference on allocation failure mmc: dw_mmc: allow biu and ciu clocks to defer mmc: mtk-sd: receive cmd8 data when hs400 tuning fail commit c2a905a6d6faa34991c993a321a01e8454934622 Merge: 3d5f968a177d4 e17465f78eb92 Author: Linus Torvalds Date: Sat Aug 24 06:56:06 2024 +0800 Merge tag 'spi-fix-v6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of fixes here, all driver specific and none of them too serious. For whatever reason runtime PM seems to have been causing a bunch of issues recently" * tag 'spi-fix-v6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: pxa2xx: Move PM runtime handling to the glue drivers spi: pxa2xx: Do not override dev->platform_data on probe spi: spi-fsl-lpspi: limit PRESCALE bit in TCR register spi: spi-cadence-quadspi: Fix OSPI NOR failures during system resume spi: zynqmp-gqspi: Scale timeout by data size commit 6781b962d97bc52715a8db8cc17278cc3c23ebe8 Author: Mohan Kumar Date: Fri Aug 23 14:43:42 2024 +0000 ASoC: tegra: Fix CBB error during probe() When Tegra audio drivers are built as part of the kernel image, TIMEOUT_ERR is observed from cbb-fabric. Following is seen on Jetson AGX Orin during boot: [ 8.012482] ************************************** [ 8.017423] CPU:0, Error:cbb-fabric, Errmon:2 [ 8.021922] Error Code : TIMEOUT_ERR [ 8.025966] Overflow : Multiple TIMEOUT_ERR [ 8.030644] [ 8.032175] Error Code : TIMEOUT_ERR [ 8.036217] MASTER_ID : CCPLEX [ 8.039722] Address : 0x290a0a8 [ 8.043318] Cache : 0x1 -- Bufferable [ 8.047630] Protection : 0x2 -- Unprivileged, Non-Secure, Data Access [ 8.054628] Access_Type : Write [ 8.106130] WARNING: CPU: 0 PID: 124 at drivers/soc/tegra/cbb/tegra234-cbb.c:604 tegra234_cbb_isr+0x134/0x178 [ 8.240602] Call trace: [ 8.243126] tegra234_cbb_isr+0x134/0x178 [ 8.247261] __handle_irq_event_percpu+0x60/0x238 [ 8.252132] handle_irq_event+0x54/0xb8 These errors happen when MVC device, which is a child of AHUB device, tries to access its device registers. This happens as part of call tegra210_mvc_reset_vol_settings() in MVC device probe(). The root cause of this problem is, the child MVC device gets probed before the AHUB clock gets enabled. The AHUB clock is enabled in runtime PM resume of parent AHUB device and due to the wrong sequence of pm_runtime_enable() in AHUB driver, runtime PM resume doesn't happen for AHUB device when MVC makes register access. Fix this by calling pm_runtime_enable() for parent AHUB device before of_platform_populate() in AHUB driver. This ensures that clock becomes available when MVC makes register access. Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver") Signed-off-by: Mohan Kumar Signed-off-by: Ritu Chaudhary Signed-off-by: Sameer Pujar Link: https://patch.msgid.link/20240823144342.4123814-3-spujar@nvidia.com Signed-off-by: Mark Brown commit b4a90b543d9f62d3ac34ec1ab97fc5334b048565 Author: robelin Date: Fri Aug 23 14:43:41 2024 +0000 ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object When using kernel with the following extra config, - CONFIG_KASAN=y - CONFIG_KASAN_GENERIC=y - CONFIG_KASAN_INLINE=y - CONFIG_KASAN_VMALLOC=y - CONFIG_FRAME_WARN=4096 kernel detects that snd_pcm_suspend_all() access a freed 'snd_soc_pcm_runtime' object when the system is suspended, which leads to a use-after-free bug: [ 52.047746] BUG: KASAN: use-after-free in snd_pcm_suspend_all+0x1a8/0x270 [ 52.047765] Read of size 1 at addr ffff0000b9434d50 by task systemd-sleep/2330 [ 52.047785] Call trace: [ 52.047787] dump_backtrace+0x0/0x3c0 [ 52.047794] show_stack+0x34/0x50 [ 52.047797] dump_stack_lvl+0x68/0x8c [ 52.047802] print_address_description.constprop.0+0x74/0x2c0 [ 52.047809] kasan_report+0x210/0x230 [ 52.047815] __asan_report_load1_noabort+0x3c/0x50 [ 52.047820] snd_pcm_suspend_all+0x1a8/0x270 [ 52.047824] snd_soc_suspend+0x19c/0x4e0 The snd_pcm_sync_stop() has a NULL check on 'substream->runtime' before making any access. So we need to always set 'substream->runtime' to NULL everytime we kfree() it. Fixes: a72706ed8208 ("ASoC: codec2codec: remove ephemeral variables") Signed-off-by: robelin Signed-off-by: Sameer Pujar Link: https://patch.msgid.link/20240823144342.4123814-2-spujar@nvidia.com Signed-off-by: Mark Brown commit 18b3256db76bd1130965acd99fbd38f87c3e6950 Author: Luiz Augusto von Dentz Date: Wed Aug 21 14:41:52 2024 -0400 Bluetooth: hci_core: Fix not handling hibernation actions This fixes not handling hibernation actions on suspend notifier so they are treated in the same way as regular suspend actions. Fixes: 9952d90ea288 ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND") Signed-off-by: Luiz Augusto von Dentz commit 35237475384ab3622f63c3c09bdf6af6dacfe9c3 Author: Neeraj Sanjay Kale Date: Fri Aug 16 15:51:13 2024 +0530 Bluetooth: btnxpuart: Fix random crash seen while removing driver This fixes the random kernel crash seen while removing the driver, when running the load/unload test over multiple iterations. 1) modprobe btnxpuart 2) hciconfig hci0 reset 3) hciconfig (check hci0 interface up with valid BD address) 4) modprobe -r btnxpuart Repeat steps 1 to 4 The ps_wakeup() call in btnxpuart_close() schedules the psdata->work(), which gets scheduled after module is removed, causing a kernel crash. This hidden issue got highlighted after enabling Power Save by default in 4183a7be7700 (Bluetooth: btnxpuart: Enable Power Save feature on startup) The new ps_cleanup() deasserts UART break immediately while closing serdev device, cancels any scheduled ps_work and destroys the ps_lock mutex. [ 85.884604] Unable to handle kernel paging request at virtual address ffffd4a61638f258 [ 85.884624] Mem abort info: [ 85.884625] ESR = 0x0000000086000007 [ 85.884628] EC = 0x21: IABT (current EL), IL = 32 bits [ 85.884633] SET = 0, FnV = 0 [ 85.884636] EA = 0, S1PTW = 0 [ 85.884638] FSC = 0x07: level 3 translation fault [ 85.884642] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041dd0000 [ 85.884646] [ffffd4a61638f258] pgd=1000000095fff003, p4d=1000000095fff003, pud=100000004823d003, pmd=100000004823e003, pte=0000000000000000 [ 85.884662] Internal error: Oops: 0000000086000007 [#1] PREEMPT SMP [ 85.890932] Modules linked in: algif_hash algif_skcipher af_alg overlay fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic snd_soc_imx_spdif snd_soc_imx_card snd_soc_ak5558 snd_soc_ak4458 caam secvio error snd_soc_fsl_spdif snd_soc_fsl_micfil snd_soc_fsl_sai snd_soc_fsl_utils gpio_ir_recv rc_core fuse [last unloaded: btnxpuart(O)] [ 85.927297] CPU: 1 PID: 67 Comm: kworker/1:3 Tainted: G O 6.1.36+g937b1be4345a #1 [ 85.936176] Hardware name: FSL i.MX8MM EVK board (DT) [ 85.936182] Workqueue: events 0xffffd4a61638f380 [ 85.936198] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 85.952817] pc : 0xffffd4a61638f258 [ 85.952823] lr : 0xffffd4a61638f258 [ 85.952827] sp : ffff8000084fbd70 [ 85.952829] x29: ffff8000084fbd70 x28: 0000000000000000 x27: 0000000000000000 [ 85.963112] x26: ffffd4a69133f000 x25: ffff4bf1c8540990 x24: ffff4bf215b87305 [ 85.963119] x23: ffff4bf215b87300 x22: ffff4bf1c85409d0 x21: ffff4bf1c8540970 [ 85.977382] x20: 0000000000000000 x19: ffff4bf1c8540880 x18: 0000000000000000 [ 85.977391] x17: 0000000000000000 x16: 0000000000000133 x15: 0000ffffe2217090 [ 85.977399] x14: 0000000000000001 x13: 0000000000000133 x12: 0000000000000139 [ 85.977407] x11: 0000000000000001 x10: 0000000000000a60 x9 : ffff8000084fbc50 [ 85.977417] x8 : ffff4bf215b7d000 x7 : ffff4bf215b83b40 x6 : 00000000000003e8 [ 85.977424] x5 : 00000000410fd030 x4 : 0000000000000000 x3 : 0000000000000000 [ 85.977432] x2 : 0000000000000000 x1 : ffff4bf1c4265880 x0 : 0000000000000000 [ 85.977443] Call trace: [ 85.977446] 0xffffd4a61638f258 [ 85.977451] 0xffffd4a61638f3e8 [ 85.977455] process_one_work+0x1d4/0x330 [ 85.977464] worker_thread+0x6c/0x430 [ 85.977471] kthread+0x108/0x10c [ 85.977476] ret_from_fork+0x10/0x20 [ 85.977488] Code: bad PC value [ 85.977491] ---[ end trace 0000000000000000 ]--- Preset since v6.9.11 Fixes: 86d55f124b52 ("Bluetooth: btnxpuart: Deasset UART break before closing serdev device") Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz commit eb9e749c0182affafadfbe5ded4503c4b5a9b57c Author: Kiran K Date: Thu Jul 18 20:18:04 2024 +0530 Bluetooth: btintel: Allow configuring drive strength of BRI BRI (Bluetooth Radio Interface) traffic from CNVr to CNVi was found causing cross talk step errors to WiFi. To avoid this potential issue OEM platforms can replace BRI resistor to adjust the BRI response line drive strength. During the *setup*, driver reads the drive strength value from uefi variable and passes it to the controller via vendor specific command with opcode 0xfc0a. dmesg: .. [21.982720] Bluetooth: hci0: Bootloader timestamp 2023.33 buildtype 1 build 45995 [21.984250] Bluetooth: hci0: Found device firmware: intel/ibt-0190-0291-iml.sfi [21.984255] Bluetooth: hci0: Boot Address: 0x30099000 [21.984256] Bluetooth: hci0: Firmware Version: 160-24.24 [22.011501] Bluetooth: hci0: Waiting for firmware download to complete [22.011518] Bluetooth: hci0: Firmware loaded in 26624 usecs [22.011584] Bluetooth: hci0: Waiting for device to boot [22.013546] Bluetooth: hci0: Malformed MSFT vendor event: 0x02 [22.013552] Bluetooth: hci0: Device booted in 1967 usecs ... [22.013792] Bluetooth: hci0: dsbr: enable: 0x01 value: 0x0b ... [22.015027] Bluetooth: hci0: Found device firmware: intel/ibt-0190-0291.sfi [22.015041] Bluetooth: hci0: Boot Address: 0x10000800 [22.015043] Bluetooth: hci0: Firmware Version: 160-24.24 [22.395821] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [22.395828] Bluetooth: BNEP filters: protocol multicast ... Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 441e36ef5b347d9ab4f54f7b54853266be687556 Author: Zhihao Cheng Date: Fri Jul 5 09:15:10 2024 +0800 ovl: ovl_parse_param_lowerdir: Add missed '\n' for pr_err Add '\n' for pr_err in function ovl_parse_param_lowerdir(), which ensures that error message is displayed at once. Fixes: b36a5780cb44 ("ovl: modify layer parameter parsing") Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20240705011510.794025-4-chengzhihao1@huawei.com Signed-off-by: Christian Brauner commit ca76ac36bb6068866feca185045e7edf2a8f392f Author: Zhihao Cheng Date: Fri Jul 5 09:15:09 2024 +0800 ovl: fix wrong lowerdir number check for parameter Opt_lowerdir The max count of lowerdir is OVL_MAX_STACK[500], which is broken by commit 37f32f526438("ovl: fix memory leak in ovl_parse_param()") for parameter Opt_lowerdir. Since commit 819829f0319a("ovl: refactor layer parsing helpers") and commit 24e16e385f22("ovl: add support for appending lowerdirs one by one") added check ovl_mount_dir_check() in function ovl_parse_param_lowerdir(), the 'ctx->nr' should be smaller than OVL_MAX_STACK, after commit 37f32f526438("ovl: fix memory leak in ovl_parse_param()") is applied, the 'ctx->nr' is updated before the check ovl_mount_dir_check(), which leads the max count of lowerdir to become 499 for parameter Opt_lowerdir. Fix it by replacing lower layers parsing code with the existing helper function ovl_parse_layer(). Fixes: 37f32f526438 ("ovl: fix memory leak in ovl_parse_param()") Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20240705011510.794025-3-chengzhihao1@huawei.com Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner commit 7eff3453cbd7e0bfc7524d59694119b5ca844778 Author: Christian Brauner Date: Fri Jul 5 09:15:08 2024 +0800 ovl: pass string to ovl_parse_layer() So it can be used for parsing the Opt_lowerdir. Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20240705011510.794025-2-chengzhihao1@huawei.com Signed-off-by: Christian Brauner commit 5a6d3a638c93881b7a7c13df870238b91399578a Author: Keith Busch Date: Thu Aug 22 08:18:08 2024 -0700 nvme: use better description for async reset reason The NVMe AER notification of a persistent internal error triggers a reset. The existing warning message just says "due to AER", which can be confused with the unrelated PCIe AER condition. Just say what the event was instead of the generic overloaded acronym. Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit f4bd3139933da65c2daa402b2a4d5fe469133aec Author: Jinjie Ruan Date: Thu Aug 22 15:19:16 2024 +0800 nvmet: Make nvmet_debugfs static The sparse tool complains as follows: drivers/nvme/target/debugfs.c:16:15: warning: symbol 'nvmet_debugfs' was not declared. Should it be static? This symbol is not used outside debugfs.c, so marks it static. Signed-off-by: Jinjie Ruan Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit a204501e1743d695ca2930ed25a2be9f8ced96d3 Author: Olga Kornievskaia Date: Fri Aug 23 11:51:08 2024 -0400 nfsd: prevent panic for nfsv4.0 closed files in nfs4_show_open Prior to commit 3f29cc82a84c ("nfsd: split sc_status out of sc_type") states_show() relied on sc_type field to be of valid type before calling into a subfunction to show content of a particular stateid. From that commit, we split the validity of the stateid into sc_status and no longer changed sc_type to 0 while unhashing the stateid. This resulted in kernel oopsing for nfsv4.0 opens that stay around and in nfs4_show_open() would derefence sc_file which was NULL. Instead, for closed open stateids forgo displaying information that relies of having a valid sc_file. To reproduce: mount the server with 4.0, read and close a file and then on the server cat /proc/fs/nfsd/clients/2/states [ 513.590804] Call trace: [ 513.590925] _raw_spin_lock+0xcc/0x160 [ 513.591119] nfs4_show_open+0x78/0x2c0 [nfsd] [ 513.591412] states_show+0x44c/0x488 [nfsd] [ 513.591681] seq_read_iter+0x5d8/0x760 [ 513.591896] seq_read+0x188/0x208 [ 513.592075] vfs_read+0x148/0x470 [ 513.592241] ksys_read+0xcc/0x178 Fixes: 3f29cc82a84c ("nfsd: split sc_status out of sc_type") Signed-off-by: Olga Kornievskaia Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 639766ca10d1e218e257ae7eabe76814bae6ab89 Author: Hal Feng Date: Mon Aug 12 15:01:08 2024 +0800 pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register A mistake was made in level trigger register configuration. Correct it. Fixes: 447976ab62c5 ("pinctrl: starfive: Add StarFive JH7110 sys controller driver") Signed-off-by: Hal Feng Link: https://lore.kernel.org/20240812070108.100923-1-hal.feng@starfivetech.com Signed-off-by: Linus Walleij commit d3692d95cc4d88114b070ee63cffc976f00f207f Author: Konrad Dybcio Date: Fri Aug 9 02:22:04 2024 +0200 pinctrl: qcom: x1e80100: Fix special pin offsets Remove the erroneus 0x100000 offset to prevent the boards from crashing on pin state setting, as well as for the intended state changes to take effect. Fixes: 05e4941d97ef ("pinctrl: qcom: Add X1E80100 pinctrl driver") Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/20240809-topic-h_sdc-v1-1-bb421532c531@quicinc.com Signed-off-by: Linus Walleij commit 9983a9cd4d429dc9ca01770083c4c1f366214b65 Author: Mario Limonciello Date: Tue Jul 2 12:15:14 2024 -0500 cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore If a system is using preferred cores the highest perf will be inconsistent as it can change from system events. Skip the checks for it. Fixes: e571a5e2068e ("cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically") Reviewed-by: Gautham R. Shenoy Signed-off-by: Mario Limonciello commit 166bf8af91225576f85208a31eaedbadd182d1ea Author: Nícolas F. R. A. Prado Date: Thu Aug 8 19:27:09 2024 -0400 pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE Despite its name, commit fed74d75277d ("pinctrl: mediatek: common-v2: Fix bias-disable for PULL_PU_PD_RSEL_TYPE") actually broke bias-disable for PULL_PU_PD_RSEL_TYPE. mtk_pinconf_bias_set_combo() tries every bias method supported by the pin until one succeeds. For PULL_PU_PD_RSEL_TYPE pins, before the breaking commit, mtk_pinconf_bias_set_rsel() would be called first to try and set the RSEL value (as well as PU and PD), and if that failed, the only other valid option was that bias-disable was specified, which would then be handled by calling mtk_pinconf_bias_set_pu_pd() and disabling both PU and PD. The breaking commit misunderstood this logic and added an early "return 0" in mtk_pinconf_bias_set_rsel(). The result was that in the bias-disable case, the bias was left unchanged, since by returning success, mtk_pinconf_bias_set_combo() no longer tried calling mtk_pinconf_bias_set_pu_pd() to disable the bias. Since the logic for configuring bias-disable on PULL_PU_PD_RSEL_TYPE pins required mtk_pinconf_bias_set_rsel() to fail first, in that case, an error was printed to the log, eg: mt8195-pinctrl 10005000.pinctrl: Not support rsel value 0 Ohm for pin = 29 (GPIO29) This is what the breaking commit actually got rid of, and likely part of the reason why that commit was thought to be fixing functionality, while in reality it was breaking it. Instead of simply reverting that commit, restore the functionality but in a way that avoids the error from being printed and makes the code less confusing: * Return 0 explicitly if a bias method was successful * Introduce an extra function mtk_pinconf_bias_set_pu_pd_rsel() that calls both mtk_pinconf_bias_set_rsel() (only if needed) and mtk_pinconf_bias_set_pu_pd() * And analogously for the corresponding getters Fixes: fed74d75277d ("pinctrl: mediatek: common-v2: Fix bias-disable for PULL_PU_PD_RSEL_TYPE") Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/20240808-mtk-rsel-bias-disable-fix-v1-1-1b4e85bf596c@collabora.com Signed-off-by: Linus Walleij commit 1c38a62f15e595346a1106025722869e87ffe044 Author: Ma Ke Date: Thu Aug 8 12:13:55 2024 +0800 pinctrl: single: fix potential NULL dereference in pcs_get_function() pinmux_generic_get_function() can return NULL and the pointer 'function' was dereferenced without checking against NULL. Add checking of pointer 'function' in pcs_get_function(). Found by code review. Cc: stable@vger.kernel.org Fixes: 571aec4df5b7 ("pinctrl: single: Use generic pinmux helpers for managing functions") Signed-off-by: Ma Ke Link: https://lore.kernel.org/20240808041355.2766009-1-make24@iscas.ac.cn Signed-off-by: Linus Walleij commit 752f387faaae0ae2e84d3f496922524785e77d60 Author: Thomas Blocher Date: Wed Jul 31 01:16:26 2024 +0200 pinctrl: at91: make it work with current gpiolib pinctrl-at91 currently does not support the gpio-groups devicetree property and has no pin-range. Because of this at91 gpios stopped working since patch commit 2ab73c6d8323fa1e ("gpio: Support GPIO controllers without pin-ranges") This was discussed in the patches commit fc328a7d1fcce263 ("gpio: Revert regression in sysfs-gpio (gpiolib.c)") commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") As a workaround manually set pin-range via gpiochip_add_pin_range() until a) pinctrl-at91 is reworked to support devicetree gpio-groups b) another solution as mentioned in commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") is found Signed-off-by: Thomas Blocher Link: https://lore.kernel.org/5b992862-355d-f0de-cd3d-ff99e67a4ff1@ek-dev.de Signed-off-by: Linus Walleij commit c358a809cb58af944d496944391a240e02f5837a Author: Alex Deucher Date: Tue Aug 20 09:46:00 2024 -0400 Revert "drm/ttm: increase ttm pre-fault value to PMD size" This reverts commit 0ddd2ae586d28e521d37393364d989ce118802e0. This patch causes sluggishness and stuttering in graphical apps. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3564 Link: https://www.spinics.net/lists/dri-devel/msg457005.html Signed-off-by: Alex Deucher Cc: Zhu Lingshan Cc: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240820134600.1909370-1-alexander.deucher@amd.com commit 8af174ea863c72f25ce31cee3baad8a301c0cf0f Author: Haiyang Zhang Date: Wed Aug 21 13:42:29 2024 -0700 net: mana: Fix race of mana_hwc_post_rx_wqe and new hwc response The mana_hwc_rx_event_handler() / mana_hwc_handle_resp() calls complete(&ctx->comp_event) before posting the wqe back. It's possible that other callers, like mana_create_txq(), start the next round of mana_hwc_send_request() before the posting of wqe. And if the HW is fast enough to respond, it can hit no_wqe error on the HW channel, then the response message is lost. The mana driver may fail to create queues and open, because of waiting for the HW response and timed out. Sample dmesg: [ 528.610840] mana 39d4:00:02.0: HWC: Request timed out! [ 528.614452] mana 39d4:00:02.0: Failed to send mana message: -110, 0x0 [ 528.618326] mana 39d4:00:02.0 enP14804s2: Failed to create WQ object: -110 To fix it, move posting of rx wqe before complete(&ctx->comp_event). Cc: stable@vger.kernel.org Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Signed-off-by: Haiyang Zhang Reviewed-by: Long Li Signed-off-by: David S. Miller commit a24cd5cfd1d07712a9f192401af638e3c6cc1491 Author: Shyam Sundar S K Date: Thu Aug 22 15:23:57 2024 +0530 platform/x86/amd/pmc: Extend support for PMC features on new AMD platform PMC driver has capability to get the idle mask values and STB data from the PMFW. Extend this support to the platforms that belong to family 1Ah model 60h series. Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240822095357.395808-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit ba7b6633e9afa6b5a788efd533c4bdc6fb1c606d Author: Shyam Sundar S K Date: Thu Aug 22 15:23:56 2024 +0530 platform/x86/amd/pmc: Fix SMU command submission path on new AMD platform The commit 426463d94d45 ("platform/x86/amd/pmc: Send OS_HINT command for new AMD platform") was introduced to enable sending mailbox commands to PMFW on newer platforms. However, it was later discovered that the commit did not configure the correct message port ID (i.e., S2D or PMC). Without this configuration, all command submissions to PMFW are treated as invalid, leading to command failures. To address this issue, the CPU ID association for the new platform needs to be added in amd_pmc_get_ip_info(). This ensures that the correct SMU port IDs are selected. Fixes: 426463d94d45 ("platform/x86/amd/pmc: Send OS_HINT command for new AMD platform") Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240822095357.395808-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 880799fc7a3a127c43143935c1a8767d77c19cae Author: Maxime Chevallier Date: Fri Aug 23 12:07:12 2024 +0200 irqchip/irq-msi-lib: Check for NULL ops in msi_lib_irq_domain_select() The irq_domain passed to msi_lib_irq_domain_select() may not have msi_parent_ops set. There is a NULL pointer check for it, but unfortunately there is a dereference of the parent ops pointer before that. Move the NULL pointer test before the first use of that pointer. This was found on a MacchiatoBin (Marvell Armada 8K SoC), which uses the irq-mvebu-sei driver. Fixes: 72e257c6f058 ("irqchip: Provide irq-msi-lib") Signed-off-by: Maxime Chevallier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20240823100733.1900666-1-maxime.chevallier@bootlin.com Closes: https://lore.kernel.org/all/20240821165034.1af97bad@fedora-3.home/ commit 996b37da1e0f51314d4186b326742c2a95a9f0dd Author: Ed Tsai Date: Mon Jul 8 15:22:06 2024 +0800 backing-file: convert to using fops->splice_write Filesystems may define their own splice write. Therefore, use the file fops instead of invoking iter_file_splice_write() directly. Signed-off-by: Ed Tsai Link: https://lore.kernel.org/r/20240708072208.25244-1-ed.tsai@mediatek.com Fixes: 5ca73468612d ("fuse: implement splice read/write passthrough") Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner commit 71c8e2a7c822ee557b07d9bb49028dd269c87b2e Author: Mark Rutland Date: Thu Aug 22 11:23:08 2024 +0100 irqchip/gic-v3: Init SRE before poking sysregs The GICv3 driver pokes GICv3 system registers in gic_prio_init() before gic_cpu_sys_reg_init() ensures that GICv3 system registers have been enabled by writing to ICC_SRE_EL1.SRE. On arm64 this is benign as has_useable_gicv3_cpuif() runs earlier during cpufeature detection, and this enables the GICv3 system registers. On 32-bit arm when booting on an FVP using the boot-wrapper, the accesses in gic_prio_init() end up being UNDEFINED and crashes the kernel during boot. This is a regression introduced by the addition of gic_prio_init(). Fix this by factoring out the SRE initialization into a new function and calling it early in the three paths where SRE may not have been initialized: (1) gic_init_bases(), before the primary CPU pokes GICv3 sysregs in gic_prio_init(). (2) gic_starting_cpu(), before secondary CPUs initialize GICv3 sysregs in gic_cpu_init(). (3) gic_cpu_pm_notifier(), before CPUs re-initialize GICv3 sysregs in gic_cpu_sys_reg_init(). Fixes: d447bf09a4013541 ("irqchip/gic-v3: Detect GICD_CTRL.DS and SCR_EL3.FIQ earlier") Signed-off-by: Mark Rutland Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org commit 839a4ec06f75cec8fec2cc5fc14e921d0c3f7369 Author: Hans de Goede Date: Fri Aug 23 09:43:05 2024 +0200 ASoC: Intel: soc-acpi-cht: Make Lenovo Yoga Tab 3 X90F DMI match less strict There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary. Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version. Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240823074305.16873-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 0cc65482f5b03ac2b1c240bc34665e43ea2d71bb Author: Hans de Goede Date: Fri Aug 23 09:42:17 2024 +0200 ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards harder Since commit 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") dummy codecs declared like this: SND_SOC_DAILINK_DEF(dummy, DAILINK_COMP_ARRAY(COMP_DUMMY())); expand to: static struct snd_soc_dai_link_component dummy[] = { }; Which means that dummy is a zero sized array and thus dais[i].codecs should not be dereferenced *at all* since it points to the address of the next variable stored in the data section as the "dummy" variable has an address but no size, so even dereferencing dais[0] is already an out of bounds array reference. Which means that the if (dais[i].codecs->name) check added in commit 7d99a70b6595 ("ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards") relies on that the part of the next variable which the name member maps to just happens to be NULL. Which apparently so far it usually is, except when it isn't and then it results in crashes like this one: [ 28.795659] BUG: unable to handle page fault for address: 0000000000030011 ... [ 28.795780] Call Trace: [ 28.795787] ... [ 28.795862] ? strcmp+0x18/0x40 [ 28.795872] 0xffffffffc150c605 [ 28.795887] platform_probe+0x40/0xa0 ... [ 28.795979] ? __pfx_init_module+0x10/0x10 [snd_soc_sst_bytcr_wm5102] Really fix things this time around by checking dais.num_codecs != 0. Fixes: 7d99a70b6595 ("ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240823074217.14653-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 9ec87c5957ea9bf68d36f5e098605b585b2571e4 Author: Ulf Hansson Date: Fri Aug 23 00:45:38 2024 +0200 OPP: Fix support for required OPPs for multiple PM domains It has turned out that having _set_required_opps() to recursively call dev_pm_opp_set_opp() to set the required OPPs, doesn't really work as well as we expected. More precisely, at each recursive call to dev_pm_opp_set_opp() we are changing an OPP for a required_dev that belongs to a required-OPP table. The problem with this, is that we may have several devices sharing the same required-OPP table, which leads to an incorrect behaviour in regards to aggregating the per device votes. To fix the problem for a required-OPP table belonging to a PM domain, which is the only existing usecase for now, let's simply replace the call to dev_pm_opp_set_opp() in _set_required_opps() by a call to _set_opp_level(). Moving forward we may potentially need to add support for other types of required-OPP tables. In this case, the aggregation needs to be thought of. Fixes: e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20240822224547.385095-2-ulf.hansson@linaro.org commit 3d5f968a177d468cd13568ef901c5be84d83d32b Merge: 3902f60b58101 a9aaf1ff88a8c Author: Linus Torvalds Date: Fri Aug 23 17:48:27 2024 +0800 Merge tag 'pwrseq-fixes-for-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull power sequencing fix from Bartosz Golaszewski: - request the wlan-enable GPIO "as-is" to fix an issue with the wifi module being already powered up before linux boots * tag 'pwrseq-fixes-for-v6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: power: sequencing: request the WLAN enable GPIO as-is commit 3902f60b58101b67e01072f561d4e85eed8e47a1 Merge: b78b25f69a1df 52dd070c62e4a Author: Linus Torvalds Date: Fri Aug 23 17:43:34 2024 +0800 Merge tag 'pmdomain-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain fixes from Ulf Hansson: - imx: Remove duplicated clocks for scu power domain - imx: Wait for SSAR to complete power-on for i.MX93 power domain * tag 'pmdomain-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain: imx: wait SSAR when i.MX93 power domain on pmdomain: imx: scu-pd: Remove duplicated clocks commit 82b8000c28b56b014ce52a1f1581bef4af148681 Author: Johannes Berg Date: Mon Aug 19 11:09:43 2024 +0200 net: drop special comment style As we discussed in the room at netdevconf earlier this week, drop the requirement for special comment style for netdev. For checkpatch, the general check accepts both right now, so simply drop the special request there as well. Acked-by: Stephen Hemminger Signed-off-by: Johannes Berg Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit b58b133e680b20d219940e0fdb6f6132c2b60f38 Author: Pranjal Shrivastava Date: Fri Aug 16 10:49:06 2024 +0000 iommu: Handle iommu faults for a bad iopf setup The iommu_report_device_fault function was updated to return void while assuming that drivers only need to call iommu_report_device_fault() for reporting an iopf. This implementation causes following problems: 1. The drivers rely on the core code to call it's page_reponse, however, when a fault is received and no fault capable domain is attached / iopf_param is NULL, the ops->page_response is NOT called causing the device to stall in case the fault type was PAGE_REQ. 2. The arm_smmu_v3 driver relies on the returned value to log errors returning void from iommu_report_device_fault causes these events to be missed while logging. Modify the iommu_report_device_fault function to return -EINVAL for cases where no fault capable domain is attached or iopf_param was NULL and calls back to the driver (ops->page_response) in case the fault type was IOMMU_FAULT_PAGE_REQ. The returned value can be used by the drivers to log the fault/event as needed. Reported-by: Kunkun Jiang Closes: https://lore.kernel.org/all/6147caf0-b9a0-30ca-795e-a1aa502a5c51@huawei.com/ Fixes: 3dfa64aecbaf ("iommu: Make iommu_report_device_fault() return void") Signed-off-by: Jason Gunthorpe Signed-off-by: Pranjal Shrivastava Reviewed-by: Jason Gunthorpe Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20240816104906.1010626-1-praan@google.com Signed-off-by: Joerg Roedel commit 75c8f387dd16066a90c0928d00851edad0c8c519 Merge: f75c235565f90 3e6245ebe7ef3 Author: Catalin Marinas Date: Fri Aug 23 09:47:39 2024 +0100 Merge tag 'kvmarm-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into for-next/fixes KVM/arm64 fixes for 6.11, round #2 - Don't drop references on LPIs that weren't visited by the vgic-debug iterator - Cure lock ordering issue when unregistering vgic redistributors - Fix for misaligned stage-2 mappings when VMs are backed by hugetlb pages - Treat SGI registers as UNDEFINED if a VM hasn't been configured for GICv3 * tag 'kvmarm-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm: KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 KVM: arm64: Ensure canonical IPA is hugepage-aligned when handling fault KVM: arm64: vgic: Don't hold config_lock while unregistering redistributors KVM: arm64: vgic-debug: Don't put unmarked LPIs KVM: arm64: vgic: Hold config_lock while tearing down a CPU interface KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list KVM: arm64: Tidying up PAuth code in KVM KVM: arm64: vgic-debug: Exit the iterator properly w/o LPI KVM: arm64: Enforce dependency on an ARMv8.4-aware toolchain docs: KVM: Fix register ID of SPSR_FIQ KVM: arm64: vgic: fix unexpected unlock sparse warnings KVM: arm64: fix kdoc warnings in W=1 builds KVM: arm64: fix override-init warnings in W=1 builds KVM: arm64: free kvm->arch.nested_mmus with kvfree() commit b3c18a55e1a6cab791727fc91f798239f95e6bad Merge: 1fa7b099d60ad bb4485562f590 Author: Takashi Iwai Date: Fri Aug 23 08:26:08 2024 +0200 Merge tag 'asoc-fix-v6.11-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.11 A relatively large collection of fixes here, all driver specific and none of them particularly major, plus one MAINTAINERS update. There's been a bunch of work on module autoloading from several people. commit b78b25f69a1dfa79798f684ad34707b1da10a48f Merge: aa0743a229366 d4bc0a264fb48 Author: Linus Torvalds Date: Fri Aug 23 10:25:29 2024 +0800 Merge tag 'ata-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fixes from Damien Le Moal: - Fix the max segment size and max number of segments supported by the pata_macio driver to fix issues with BIO splitting leading to an overflow of the adapter DMA table (from Michael) - Related to the previous fix, change BUG_ON() calls for incorrect command buffer segmentation into WARN_ON() and an error return (from Michael) * tag 'ata-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: pata_macio: Use WARN instead of BUG ata: pata_macio: Fix DMA table overflow commit 4f9eedfa27ae5806ed10906bcceee7bae49c8941 Author: Yihang Li Date: Mon Aug 19 17:09:34 2024 +0800 scsi: sd: Ignore command SYNCHRONIZE CACHE error if format in progress If formatting a suspended disk (such as formatting with different DIF type), the disk will be resuming first, and then the format command will submit to the disk through SG_IO ioctl. When the disk is processing the format command, the system does not submit other commands to the disk. Therefore, the system attempts to suspend the disk again and sends the SYNCHRONIZE CACHE command. However, the SYNCHRONIZE CACHE command will fail because the disk is in the formatting process. This will cause the runtime_status of the disk to error and it is difficult for user to recover it. Error info like: [ 669.925325] sd 6:0:6:0: [sdg] Synchronizing SCSI cache [ 670.202371] sd 6:0:6:0: [sdg] Synchronize Cache(10) failed: Result: hostbyte=0x00 driverbyte=DRIVER_OK [ 670.216300] sd 6:0:6:0: [sdg] Sense Key : 0x2 [current] [ 670.221860] sd 6:0:6:0: [sdg] ASC=0x4 ASCQ=0x4 To solve the issue, ignore the error and return success/0 when format is in progress. Cc: stable@vger.kernel.org Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20240819090934.2130592-1-liyihang9@huawei.com Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 919ddf8336f0b84c0453bac583808c9f165a85c2 Author: Ben Hutchings Date: Thu Aug 22 00:51:42 2024 +0200 scsi: aacraid: Fix double-free on probe failure aac_probe_one() calls hardware-specific init functions through the aac_driver_ident::init pointer, all of which eventually call down to aac_init_adapter(). If aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear that member. After the hardware-specific init function returns an error, aac_probe_one() goes down an error path that frees the memory pointed to by aac_dev::queues, resulting.in a double-free. Reported-by: Michael Gordon Link: https://bugs.debian.org/1075855 Fixes: 8e0c5ebde82b ("[SCSI] aacraid: Newer adapter communication iterface support") Signed-off-by: Ben Hutchings Link: https://lore.kernel.org/r/ZsZvfqlQMveoL5KQ@decadent.org.uk Signed-off-by: Martin K. Petersen commit 3417c9574e368f0330637505f00d3814ca8854d2 Author: Sherry Yang Date: Tue Aug 20 23:51:31 2024 -0700 scsi: lpfc: Fix overflow build issue Build failed while enabling "CONFIG_GCOV_KERNEL=y" and "CONFIG_GCOV_PROFILE_ALL=y" with following error: BUILDSTDERR: drivers/scsi/lpfc/lpfc_bsg.c: In function 'lpfc_get_cgnbuf_info': BUILDSTDERR: ./include/linux/fortify-string.h:114:33: error: '__builtin_memcpy' accessing 18446744073709551615 bytes at offsets 0 and 0 overlaps 9223372036854775807 bytes at offset -9223372036854775808 [-Werror=restrict] BUILDSTDERR: 114 | #define __underlying_memcpy __builtin_memcpy BUILDSTDERR: | ^ BUILDSTDERR: ./include/linux/fortify-string.h:637:9: note: in expansion of macro '__underlying_memcpy' BUILDSTDERR: 637 | __underlying_##op(p, q, __fortify_size); \ BUILDSTDERR: | ^~~~~~~~~~~~~ BUILDSTDERR: ./include/linux/fortify-string.h:682:26: note: in expansion of macro '__fortify_memcpy_chk' BUILDSTDERR: 682 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: drivers/scsi/lpfc/lpfc_bsg.c:5468:9: note: in expansion of macro 'memcpy' BUILDSTDERR: 5468 | memcpy(cgn_buff, cp, cinfosz); BUILDSTDERR: | ^~~~~~ This happens from the commit 06bb7fc0feee ("kbuild: turn on -Wrestrict by default"). Address this issue by using size_t type. Signed-off-by: Sherry Yang Link: https://lore.kernel.org/r/20240821065131.1180791-1-sherry.yang@oracle.com Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit 979b581e4c69257acab1af415ddad6b2d78a2fa5 Author: Eric Dumazet Date: Wed Aug 21 17:53:39 2024 +0000 pktgen: use cpus_read_lock() in pg_net_init() I have seen the WARN_ON(smp_processor_id() != cpu) firing in pktgen_thread_worker() during tests. We must use cpus_read_lock()/cpus_read_unlock() around the for_each_online_cpu(cpu) loop. While we are at it use WARN_ON_ONCE() to avoid a possible syslog flood. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20240821175339.1191779-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit aa0743a229366e8c1963f1b72a1c974a9d15f08f Merge: 3f44ae972ae5c 0124fb0ebf3b0 Author: Linus Torvalds Date: Fri Aug 23 07:47:01 2024 +0800 Merge tag 'net-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth and netfilter. Current release - regressions: - virtio_net: avoid crash on resume - move netdev_tx_reset_queue() call before RX napi enable Current release - new code bugs: - net/mlx5e: fix page leak and incorrect header release w/ HW GRO Previous releases - regressions: - udp: fix receiving fraglist GSO packets - tcp: prevent refcount underflow due to concurrent execution of tcp_sk_exit_batch() Previous releases - always broken: - ipv6: fix possible UAF when incrementing error counters on output - ip6: tunnel: prevent merging of packets with different L2 - mptcp: pm: fix IDs not being reusable - bonding: fix potential crashes in IPsec offload handling - Bluetooth: HCI: - MGMT: add error handling to pair_device() to avoid a crash - invert LE State quirk to be opt-out rather then opt-in - fix LE quote calculation - drv: dsa: VLAN fixes for Ocelot driver - drv: igb: cope with large MAX_SKB_FRAGS Kconfig settings - drv: ice: fi Rx data path on architectures with PAGE_SIZE >= 8192 Misc: - netpoll: do not export netpoll_poll_[disable|enable]() - MAINTAINERS: update the list of networking headers" * tag 'net-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (82 commits) s390/iucv: Fix vargs handling in iucv_alloc_device() net: ovs: fix ovs_drop_reasons error net: xilinx: axienet: Fix dangling multicast addresses net: xilinx: axienet: Always disable promiscuous mode MAINTAINERS: Mark JME Network Driver as Odd Fixes MAINTAINERS: Add header files to NETWORKING sections MAINTAINERS: Add limited globs for Networking headers MAINTAINERS: Add net_tstamp.h to SOCKET TIMESTAMPING section MAINTAINERS: Add sonet.h to ATM section of MAINTAINERS octeontx2-af: Fix CPT AF register offset calculation net: phy: realtek: Fix setting of PHY LEDs Mode B bit on RTL8211F net: ngbe: Fix phy mode set to external phy netfilter: flowtable: validate vlan header bnxt_en: Fix double DMA unmapping for XDP_REDIRECT ipv6: prevent possible UAF in ip6_xmit() ipv6: fix possible UAF in ip6_finish_output2() ipv6: prevent UAF in ip6_send_skb() netpoll: do not export netpoll_poll_[disable|enable]() selftests: mlxsw: ethtool_lanes: Source ethtool lib from correct path udp: fix receiving fraglist GSO packets ... commit 3f44ae972ae5cf6a75eb40314a6a81bd694d0f53 Merge: 872cf28b8df9c 8fb4ac1cee88a Author: Linus Torvalds Date: Fri Aug 23 07:43:15 2024 +0800 Merge tag 'kbuild-fixes-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Eliminate the fdtoverlay command duplication in scripts/Makefile.lib - Fix 'make compile_commands.json' for external modules - Ensure scripts/kconfig/merge_config.sh handles missing newlines - Fix some build errors on macOS * tag 'kbuild-fixes-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: fix typos "prequisites" to "prerequisites" Documentation/llvm: turn make command for ccache into code block kbuild: avoid scripts/kallsyms parsing /dev/null treewide: remove unnecessary inclusion scripts: kconfig: merge_config: config files: add a trailing newline Makefile: add $(srctree) to dependency of compile_commands.json target kbuild: clean up code duplication in cmd_fdtoverlay commit 76f461867800fa9421d26a70a1640eed55dff0cd Merge: 5159b9dcfa4b7 9e7f30563677f Author: Dave Airlie Date: Fri Aug 23 09:11:52 2024 +1000 Merge tag 'drm-xe-fixes-2024-08-22' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: - Fix OA format masks which were breaking build with gcc-5 (Geert) Driver Changes: - Fix opregion leak (Lucas) - Fix OA sysfs entry (Ashutosh) - Fix VM dma-resv lock (Brost) - Fix tile fini sequence (Brost) - Prevent UAF around preempt fence (Auld) - Fix DGFX display suspend/resume (Maarten) - Many Xe/Xe2 critical workarounds (Auld, Ngai-Mint, Bommu, Tejas, Daniele) - Fix devm/drmm issues (Daniele) - Fix missing workqueue destroy in xe_gt_pagefault (Stuart) - Drop HW fence pointer to HW fence ctx (Brost) - Free job before xe_exec_queue_put (Brost) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZsdVe0XI2Pq8C-ON@intel.com commit 5159b9dcfa4b79658543465f6370cdd514cdc6d9 Merge: b069f6315c2d9 9b340aeb26d50 Author: Dave Airlie Date: Fri Aug 23 09:08:18 2024 +1000 Merge tag 'drm-misc-fixes-2024-08-22' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: nouveau: - firmware: use dma non-coherent allocator Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240822123907.GA234335@localhost.localdomain commit b069f6315c2d99b32cb0e1adca7ab4d99bccf410 Merge: 424a98a68feac 5d41eeb6725e3 Author: Dave Airlie Date: Fri Aug 23 09:05:11 2024 +1000 Merge tag 'drm-intel-fixes-2024-08-22' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Fix for HDCP timeouts Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZsbPMm6XfzimmZW0@jlahtine-mobl.ger.corp.intel.com commit 424a98a68feac20de626e307e09c7ced6585a658 Merge: 5d34b050c7290 9cead81eff635 Author: Dave Airlie Date: Fri Aug 23 08:58:17 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-08-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-08-21: amdgpu: - GFX10 firmware loading fix - SDMA 5.2 fix - Debugfs parameter validation fix - eGPU hotplug fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240821172810.302416-1-alexander.deucher@amd.com commit e6b09a173870720e4d4c6fd755803970015ac043 Merge: 81475beb1b599 fe01751347359 Author: Jens Axboe Date: Thu Aug 22 16:20:24 2024 -0600 Merge tag 'nvme-6.11-2024-08-22' of git://git.infradead.org/nvme into block-6.11 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.11 - Remove unused struct field (Nilay) - Fix fabrics keep-alive teardown order (Ming)" * tag 'nvme-6.11-2024-08-22' of git://git.infradead.org/nvme: nvme: Remove unused field nvme: move stopping keep-alive into nvme_uninit_ctrl() commit f92214e4c312f6ea9d78650cc6291d200f17abb6 Author: Trond Myklebust Date: Wed Aug 21 14:05:02 2024 -0400 NFS: Avoid unnecessary rescanning of the per-server delegation list If the call to nfs_delegation_grab_inode() fails, we will not have dropped any locks that require us to rescan the list. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit d72b7963115bea971a28eaa2cb76722c023f9fdf Author: Trond Myklebust Date: Wed Aug 21 14:05:01 2024 -0400 NFSv4: Fix clearing of layout segments in layoutreturn Make sure that we clear the layout segments in cases where we see a fatal error, and also in the case where the layout is invalid. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit a017ad1313fc91bdf235097fd0a02f673fc7bb11 Author: Trond Myklebust Date: Wed Aug 21 14:05:00 2024 -0400 NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations We're seeing reports of soft lockups when iterating through the loops, so let's add rescheduling points. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 95832998fb6edc50d4f2f6a958d9f90142d4be48 Author: Jeff Layton Date: Wed Aug 21 08:28:25 2024 -0400 nfs: fix bitmap decoder to handle a 3rd word It only decodes the first two words at this point. Have it decode the third word as well. Without this, the client doesn't send delegated timestamps in the CB_GETATTR response. With this change we also need to expand the on-stack bitmap in decode_recallany_args to 3 elements, in case the server sends a larger bitmap than expected. Fixes: 43df7110f4a9 ("NFSv4: Add CB_GETATTR support for delegated attributes") Signed-off-by: Jeff Layton Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit cb78f9b7d0c0c9f86d8c0ac9c46b8b684d8785a9 Author: Jeff Layton Date: Thu Aug 15 10:18:41 2024 -0400 nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the initial SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the initial request. Fixes: 707f13b3d081 (NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute) Signed-off-by: Jeff Layton Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 5d34b050c7290af2723dd728dffb08d38df9c096 Merge: 47ac09b91befb 624ab9cde26a9 Author: Dave Airlie Date: Fri Aug 23 06:46:28 2024 +1000 Merge tag 'drm-msm-fixes-2024-08-19' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.11-rc5 1) Fixes from the virtual plane series, namely - fix the list of formats for QCM2290 since it has no YUV support - minor fix in dpu_plane_atomic_check_pipe() to check only for csc and not csc and scaler while allowing yuv formats - take rotation into account while allocating virtual planes 2) Fix to cleanup FB if dpu_format_populate_layout() fails. This fixes the warning splat during DRM file closure 3) Fix to reset the phy link params before re-starting link training. This fixes the 100% link training failure when someone starts modetest while cable is connected 4) Long pending fix to fix a visual corruption seen for 4k modes. Root-cause was we cannot support 4k@30 with 30bpp with 2 lanes so this is a critical fix to use 24bpp for such cases 5) Fix to move dpu encoder's connector assignment to atomic_enable(). This fixes the NULL ptr crash for cases when there is an atomic_enable() without atomic_modeset() after atomic_disable() . This happens for connectors_changed case of crtc. It fixes a NULL ptr crash reported during hotplug. 6) Fix to simplify DPU's debug macros without which dynamic debug does not work as expected 7) Fix the highest bank bit setting for sc7180 8) adreno: fix error return if missing firmware-name Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvxF2p3-AsjUydmSYrA0Vb+Ea7nh3VtNX0pT0Ae_Me-Kw@mail.gmail.com commit 5e51224d2afbda57f33f47485871ee5532145e18 Author: ChenXiaoSong Date: Tue Aug 20 14:33:15 2024 +0000 smb/client: fix typo: GlobalMid_Sem -> GlobalMid_Lock The comments have typos, fix that to not confuse readers. Signed-off-by: ChenXiaoSong Reviewed-by: Namjae Jeon commit 0d8584d288a9b4132e945d76bcc04395d158b2e7 Author: Gautham R. Shenoy Date: Tue Aug 13 15:21:14 2024 +0530 cpufreq/amd-pstate: Use topology_logical_package_id() instead of logical_die_id() After the commit 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf"), the topolgy_logical_die_id() function returns the logical Core Chiplet Die (CCD) ID instead of the logical socket ID. Since this is currently used to set MSR_AMD_CPPC_ENABLE, which needs to be set on any one of the threads of the socket, it is prudent to use topology_logical_package_id() in place of topology_logical_die_id(). Fixes: 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf") cc: stable@vger.kernel.org # 6.10 Signed-off-by: Gautham R. Shenoy Tested-by: Dhananjay Ugwekar Link: https://lore.kernel.org/lkml/20240801124509.3650-1-Dhananjay.Ugwekar@amd.com/ Signed-off-by: Dhananjay Ugwekar Signed-off-by: Mario Limonciello commit 67d95303c84732c2e1de5730756281f648dbefaf Author: Dan Carpenter Date: Tue Aug 13 15:21:13 2024 +0530 cpufreq: amd-pstate: Fix uninitialized variable in amd_pstate_cpu_boost_update() Smatch complains that "ret" could be uninitialized: drivers/cpufreq/amd-pstate.c:734 amd_pstate_cpu_boost_update() error: uninitialized symbol 'ret'. This seems like it probably is a real issue. Initialize "ret" to zero to be safe. Fixes: c8c68c38b56f ("cpufreq: amd-pstate: initialize core precision boost state") Signed-off-by: Dan Carpenter Reviewed-by: Perry Yuan Acked-by: Gautham R. Shenoy Link: https://lore.kernel.org/lkml/7ff53543-6c04-48a0-8d99-7dc010b93b3a@stanley.mountain/T/ Signed-off-by: Gautham R. Shenoy Signed-off-by: Mario Limonciello commit fe01751347359862c65c715d51c0b3f4fa8ee2f0 Author: Nilay Shroff Date: Wed Aug 14 19:26:50 2024 +0530 nvme: Remove unused field The "name" field in struct nvme_ctrl is unsued so removing it. This would help save 12 bytes of space for each nvme_ctrl instance created. Signed-off-by: Nilay Shroff Reviewed-by: Kanchan Joshi Signed-off-by: Keith Busch commit a54a93d0e3599b05856971734e15418ac551a14c Author: Ming Lei Date: Tue Aug 13 09:35:27 2024 +0800 nvme: move stopping keep-alive into nvme_uninit_ctrl() Commit 4733b65d82bd ("nvme: start keep-alive after admin queue setup") moves starting keep-alive from nvme_start_ctrl() into nvme_init_ctrl_finish(), but don't move stopping keep-alive into nvme_uninit_ctrl(), so keep-alive work can be started and keep pending after failing to start controller, finally use-after-free is triggered if nvme host driver is unloaded. This patch fixes kernel panic when running nvme/004 in case that connection failure is triggered, by moving stopping keep-alive into nvme_uninit_ctrl(). This way is reasonable because keep-alive is now started in nvme_init_ctrl_finish(). Fixes: 3af755a46881 ("nvme: move nvme_stop_keep_alive() back to original position") Cc: Hannes Reinecke Cc: Mark O'Donovan Reported-by: Changhui Zhong Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Keith Busch commit 0124fb0ebf3b0ef89892d42147c9387be3105318 Author: Alexandra Winter Date: Wed Aug 21 11:13:37 2024 +0200 s390/iucv: Fix vargs handling in iucv_alloc_device() iucv_alloc_device() gets a format string and a varying number of arguments. This is incorrectly forwarded by calling dev_set_name() with the format string and a va_list, while dev_set_name() expects also a varying number of arguments. Symptoms: Corrupted iucv device names, which can result in log messages like: sysfs: cannot create duplicate filename '/devices/iucv/hvc_iucv1827699952' Fixes: 4452e8ef8c36 ("s390/iucv: Provide iucv_alloc_device() / iucv_release_device()") Link: https://bugzilla.suse.com/show_bug.cgi?id=1228425 Signed-off-by: Alexandra Winter Reviewed-by: Thorsten Winkler Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/20240821091337.3627068-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski commit 57fb67783c4011581882f32e656d738da1f82042 Author: Menglong Dong Date: Wed Aug 21 20:32:52 2024 +0800 net: ovs: fix ovs_drop_reasons error There is something wrong with ovs_drop_reasons. ovs_drop_reasons[0] is "OVS_DROP_LAST_ACTION", but OVS_DROP_LAST_ACTION == __OVS_DROP_REASON + 1, which means that ovs_drop_reasons[1] should be "OVS_DROP_LAST_ACTION". And as Adrian tested, without the patch, adding flow to drop packets results in: drop at: do_execute_actions+0x197/0xb20 [openvsw (0xffffffffc0db6f97) origin: software input port ifindex: 8 timestamp: Tue Aug 20 10:19:17 2024 859853461 nsec protocol: 0x800 length: 98 original length: 98 drop reason: OVS_DROP_ACTION_ERROR With the patch, the same results in: drop at: do_execute_actions+0x197/0xb20 [openvsw (0xffffffffc0db6f97) origin: software input port ifindex: 8 timestamp: Tue Aug 20 10:16:13 2024 475856608 nsec protocol: 0x800 length: 98 original length: 98 drop reason: OVS_DROP_LAST_ACTION Fix this by initializing ovs_drop_reasons with index. Fixes: 9d802da40b7c ("net: openvswitch: add last-action drop reason") Signed-off-by: Menglong Dong Tested-by: Adrian Moreno Reviewed-by: Adrian Moreno Link: https://patch.msgid.link/20240821123252.186305-1-dongml2@chinatelecom.cn Signed-off-by: Jakub Kicinski commit 3ddbf7b6966d8a679bd2a6f8104734face6de4a1 Merge: 2696c15ce0652 6ea14ccb60c8a Author: Jakub Kicinski Date: Thu Aug 22 13:06:24 2024 -0700 Merge tag 'nf-24-08-22' 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: Patch #1 disable BH when collecting stats via hardware offload to ensure concurrent updates from packet path do not result in losing stats. From Sebastian Andrzej Siewior. Patch #2 uses write seqcount to reset counters serialize against reader. Also from Sebastian Andrzej Siewior. Patch #3 ensures vlan header is in place before accessing its fields, according to KMSAN splat triggered by syzbot. * tag 'nf-24-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: flowtable: validate vlan header netfilter: nft_counter: Synchronize nft_counter_reset() against reader. netfilter: nft_counter: Disable BH in nft_counter_offload_stats(). ==================== Link: https://patch.msgid.link/20240822101842.4234-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 2696c15ce065252fe53d4a38b847383153cdfd71 Merge: a812a3f45cae7 797a68c9de0f5 Author: Jakub Kicinski Date: Thu Aug 22 13:03:59 2024 -0700 Merge branch 'net-xilinx-axienet-multicast-fixes-and-improvements' Sean Anderson says: ==================== net: xilinx: axienet: Multicast fixes and improvements [part] ==================== First two patches of the series which are fixes. Link: https://patch.msgid.link/20240822154059.1066595-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit 797a68c9de0f5a5447baf4bd3bb9c10a3993435b Author: Sean Anderson Date: Thu Aug 22 11:40:56 2024 -0400 net: xilinx: axienet: Fix dangling multicast addresses If a multicast address is removed but there are still some multicast addresses, that address would remain programmed into the frame filter. Fix this by explicitly setting the enable bit for each filter. Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240822154059.1066595-3-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit 4ae738dfef2c0323752ab81786e2d298c9939321 Author: Sean Anderson Date: Thu Aug 22 11:40:55 2024 -0400 net: xilinx: axienet: Always disable promiscuous mode If promiscuous mode is disabled when there are fewer than four multicast addresses, then it will not be reflected in the hardware. Fix this by always clearing the promiscuous mode flag even when we program multicast addresses. Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240822154059.1066595-2-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit 591940e22e287fb64ac07be275e343d860cb72d6 Author: Steve Wilkins Date: Fri Aug 9 14:47:44 2024 +0100 firmware: microchip: fix incorrect error report of programming:timeout on success After successfully programming the SPI flash with an MFPS auto update image, the error sysfs attribute reports programming:timeout. This is caused by an incorrect check on the return value from wait_for_completion_timeout() in mpfs_auto_update_poll_complete(). Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support") Signed-off-by: Steve Wilkins Signed-off-by: Conor Dooley commit 54950bfe2b69cdc06ef753872b5225e54eb73506 Author: Ravi Bangoria Date: Thu Aug 8 06:29:36 2024 +0000 KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing If host supports Bus Lock Detect, KVM advertises it to guests even if SVM support is absent. Additionally, guest wouldn't be able to use it despite guest CPUID bit being set. Fix it by unconditionally clearing the feature bit in KVM cpu capability. Reported-by: Jim Mattson Closes: https://lore.kernel.org/r/CALMp9eRet6+v8Y1Q-i6mqPm4hUow_kJNhmVHfOV8tMfuSS=tVg@mail.gmail.com Fixes: 76ea438b4afc ("KVM: X86: Expose bus lock debug exception to guest") Cc: stable@vger.kernel.org Signed-off-by: Ravi Bangoria Reviewed-by: Jim Mattson Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20240808062937.1149-4-ravi.bangoria@amd.com Signed-off-by: Sean Christopherson commit c0a1ef9c5be72ff28a5413deb1b3e1a066593c13 Author: Krzysztof Kozlowski Date: Wed Aug 14 21:58:23 2024 +0200 thermal: of: Fix OF node leak in of_thermal_zone_find() error paths Terminating for_each_available_child_of_node() loop requires dropping OF node reference, so bailing out on errors misses this. Solve the OF node reference leak with scoped for_each_available_child_of_node_scoped(). Fixes: 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai Reviewed-by: Daniel Lezcano Link: https://patch.msgid.link/20240814195823.437597-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rafael J. Wysocki commit 662b52b761bfe0ba970e5823759798faf809b896 Author: Krzysztof Kozlowski Date: Wed Aug 14 21:58:22 2024 +0200 thermal: of: Fix OF node leak in thermal_of_zone_register() thermal_of_zone_register() calls of_thermal_zone_find() which will iterate over OF nodes with for_each_available_child_of_node() to find matching thermal zone node. When it finds such, it exits the loop and returns the node. Prematurely ending for_each_available_child_of_node() loops requires dropping OF node reference, thus success of of_thermal_zone_find() means that caller must drop the reference. Fixes: 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") Cc: All applicable Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai Reviewed-by: Daniel Lezcano Link: https://patch.msgid.link/20240814195823.437597-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rafael J. Wysocki commit afc954fd223ded70b1fa000767e2531db55cce58 Author: Krzysztof Kozlowski Date: Wed Aug 14 21:58:21 2024 +0200 thermal: of: Fix OF node leak in thermal_of_trips_init() error path Terminating for_each_child_of_node() loop requires dropping OF node reference, so bailing out after thermal_of_populate_trip() error misses this. Solve the OF node reference leak with scoped for_each_child_of_node_scoped(). Fixes: d0c75fa2c17f ("thermal/of: Initialize trip points separately") Cc: All applicable Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai Reviewed-by: Daniel Lezcano Link: https://patch.msgid.link/20240814195823.437597-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rafael J. Wysocki commit f58bab6fd4063913bd8321e99874b8239e9ba726 Author: Jeff Layton Date: Thu Aug 22 14:47:01 2024 -0400 nfsd: ensure that nfsd4_fattr_args.context is zeroed out If nfsd4_encode_fattr4 ends up doing a "goto out" before we get to checking for the security label, then args.context will be set to uninitialized junk on the stack, which we'll then try to free. Initialize it early. Fixes: f59388a579c6 ("NFSD: Add nfsd4_encode_fattr4_sec_label()") Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit dad1613e0533b380318281c1519e1a3477c2d0d2 Author: Maxim Levitsky Date: Fri Aug 2 18:16:08 2024 +0300 KVM: SVM: fix emulation of msr reads/writes of MSR_FS_BASE and MSR_GS_BASE If these msrs are read by the emulator (e.g due to 'force emulation' prefix), SVM code currently fails to extract the corresponding segment bases, and return them to the emulator. Fix that. Cc: stable@vger.kernel.org Signed-off-by: Maxim Levitsky Link: https://lore.kernel.org/r/20240802151608.72896-3-mlevitsk@redhat.com Signed-off-by: Sean Christopherson commit 4bcdd831d9d01e0fb64faea50732b59b2ee88da1 Author: Sean Christopherson Date: Tue Jul 23 16:20:55 2024 -0700 KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS Grab kvm->srcu when processing KVM_SET_VCPU_EVENTS, as KVM will forcibly leave nested VMX/SVM if SMM mode is being toggled, and leaving nested VMX reads guest memory. Note, kvm_vcpu_ioctl_x86_set_vcpu_events() can also be called from KVM_RUN via sync_regs(), which already holds SRCU. I.e. trying to precisely use kvm_vcpu_srcu_read_lock() around the problematic SMM code would cause problems. Acquiring SRCU isn't all that expensive, so for simplicity, grab it unconditionally for KVM_SET_VCPU_EVENTS. ============================= WARNING: suspicious RCU usage 6.10.0-rc7-332d2c1d713e-next-vm #552 Not tainted ----------------------------- include/linux/kvm_host.h:1027 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by repro/1071: #0: ffff88811e424430 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x7d/0x970 [kvm] stack backtrace: CPU: 15 PID: 1071 Comm: repro Not tainted 6.10.0-rc7-332d2c1d713e-next-vm #552 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Call Trace: dump_stack_lvl+0x7f/0x90 lockdep_rcu_suspicious+0x13f/0x1a0 kvm_vcpu_gfn_to_memslot+0x168/0x190 [kvm] kvm_vcpu_read_guest+0x3e/0x90 [kvm] nested_vmx_load_msr+0x6b/0x1d0 [kvm_intel] load_vmcs12_host_state+0x432/0xb40 [kvm_intel] vmx_leave_nested+0x30/0x40 [kvm_intel] kvm_vcpu_ioctl_x86_set_vcpu_events+0x15d/0x2b0 [kvm] kvm_arch_vcpu_ioctl+0x1107/0x1750 [kvm] ? mark_held_locks+0x49/0x70 ? kvm_vcpu_ioctl+0x7d/0x970 [kvm] ? kvm_vcpu_ioctl+0x497/0x970 [kvm] kvm_vcpu_ioctl+0x497/0x970 [kvm] ? lock_acquire+0xba/0x2d0 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x40c/0x6f0 ? lock_release+0xb7/0x270 __x64_sys_ioctl+0x82/0xb0 do_syscall_64+0x6c/0x170 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7ff11eb1b539 Fixes: f7e570780efc ("KVM: x86: Forcibly leave nested virt when SMM state is toggled") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240723232055.3643811-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 28cec7f08b8b41b9b082f1dcc6a94656f125063f Author: Sean Christopherson Date: Mon Jul 22 17:02:11 2024 -0700 KVM: x86/mmu: Check that root is valid/loaded when pre-faulting SPTEs Error out if kvm_mmu_reload() fails when pre-faulting memory, as trying to fault-in SPTEs will fail miserably due to root.hpa pointing at garbage. Note, kvm_mmu_reload() can return -EIO and thus trigger the WARN on -EIO in kvm_vcpu_pre_fault_memory(), but all such paths also WARN, i.e. the WARN isn't user-triggerable and won't run afoul of warn-on-panic because the kernel would already be panicking. BUG: unable to handle page fault for address: 000029ffffffffe8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP CPU: 22 PID: 1069 Comm: pre_fault_memor Not tainted 6.10.0-rc7-332d2c1d713e-next-vm #548 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:is_page_fault_stale+0x3e/0xe0 [kvm] RSP: 0018:ffffc9000114bd48 EFLAGS: 00010206 RAX: 00003fffffffffc0 RBX: ffff88810a07c080 RCX: ffffc9000114bd78 RDX: ffff88810a07c080 RSI: ffffea0000000000 RDI: ffff88810a07c080 RBP: ffffc9000114bd78 R08: 00007fa3c8c00000 R09: 8000000000000225 R10: ffffea00043d7d80 R11: 0000000000000000 R12: ffff88810a07c080 R13: 0000000100000000 R14: ffffc9000114be58 R15: 0000000000000000 FS: 00007fa3c9da0740(0000) GS:ffff888277d80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000029ffffffffe8 CR3: 000000011d698000 CR4: 0000000000352eb0 Call Trace: kvm_tdp_page_fault+0xcc/0x160 [kvm] kvm_mmu_do_page_fault+0xfb/0x1f0 [kvm] kvm_arch_vcpu_pre_fault_memory+0xd0/0x1a0 [kvm] kvm_vcpu_ioctl+0x761/0x8c0 [kvm] __x64_sys_ioctl+0x82/0xb0 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Modules linked in: kvm_intel kvm CR2: 000029ffffffffe8 ---[ end trace 0000000000000000 ]--- Fixes: 6e01b7601dfe ("KVM: x86: Implement kvm_arch_vcpu_pre_fault_memory()") Reported-by: syzbot+23786faffb695f17edaa@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/0000000000002b84dc061dd73544@google.com Reviewed-by: Kai Huang Tested-by: xingwei lee Tested-by: yuxin wang Link: https://lore.kernel.org/r/20240723000211.3352304-1-seanjc@google.com Signed-off-by: Sean Christopherson commit e03a7caa5335c41e39991cfa73bb037872d1e2cb Author: Yan Zhao Date: Fri Jul 12 16:34:38 2024 -0700 KVM: x86/mmu: Fixup comments missed by the REMOVED_SPTE=>FROZEN_SPTE rename Replace "removed" with "frozen" in comments as appropriate to complete the rename of REMOVED_SPTE to FROZEN_SPTE. Fixes: 964cea817196 ("KVM: x86/tdp_mmu: Rename REMOVED_SPTE to FROZEN_SPTE") Signed-off-by: Yan Zhao Signed-off-by: Rick Edgecombe Link: https://lore.kernel.org/r/20240712233438.518591-1-rick.p.edgecombe@intel.com [sean: write changelog] Signed-off-by: Sean Christopherson commit 8fb4ac1cee88a57e7a56faba49b408a41a4af4db Author: Masahiro Yamada Date: Sun Aug 18 16:07:11 2024 +0900 kbuild: fix typos "prequisites" to "prerequisites" This typo in scripts/Makefile.build has been present for more than 20 years. It was accidentally copy-pasted to other scripts/Makefile.* files. Fix them all. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit ec686804117a0421cf31d54427768aaf93aa0069 Author: Paulo Alcantara Date: Wed Aug 21 00:45:03 2024 -0300 smb: client: ignore unhandled reparse tags Just ignore reparse points that the client can't parse rather than bailing out and not opening the file or directory. Reported-by: Marc <1marc1@gmail.com> Closes: https://lore.kernel.org/r/CAMHwNVv-B+Q6wa0FEXrAuzdchzcJRsPKDDRrNaYZJd6X-+iJzw@mail.gmail.com Fixes: 539aad7f14da ("smb: client: introduce ->parse_reparse_point()") Tested-by: Anthony Nandaa (Microsoft) Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 15179cf2806f91685410e598f82813a7fcf90f6c Author: Steve French Date: Fri Aug 16 16:47:39 2024 -0500 smb3: fix problem unloading module due to leaked refcount on shutdown The shutdown ioctl can leak a refcount on the tlink which can prevent rmmod (unloading the cifs.ko) module from working. Found while debugging xfstest generic/043 Fixes: 69ca1f57555f ("smb3: add dynamic tracepoints for shutdown ioctl") Reviewed-by: Meetakshi Setiya Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 1642285e511c2a40b14e87a41aa8feace6123036 Author: Alexander Gordeev Date: Wed Aug 21 18:55:07 2024 +0200 s390/boot: Fix KASLR base offset off by __START_KERNEL bytes Symbol offsets to the KASLR base do not match symbol address in the vmlinux image. That is the result of setting the KASLR base to the beginning of .text section as result of an optimization. Revert that optimization and allocate virtual memory for the whole kernel image including __START_KERNEL bytes as per the linker script. That allows keeping the semantics of the KASLR base offset in sync with other architectures. Rename __START_KERNEL to TEXT_OFFSET, since it represents the offset of the .text section within the kernel image, rather than a virtual address. Still skip mapping TEXT_OFFSET bytes to save memory on pgtables and provoke exceptions in case an attempt to access this area is made, as no kernel symbol may reside there. In case CONFIG_KASAN is enabled the location counter might exceed the value of TEXT_OFFSET, while the decompressor linker script forcefully resets it to TEXT_OFFSET, which leads to a sections overlap link failure. Use MAX() expression to avoid that. Reported-by: Omar Sandoval Closes: https://lore.kernel.org/linux-s390/ZnS8dycxhtXBZVky@telecaster.dhcp.thefacebook.com/ Fixes: 56b1069c40c7 ("s390/boot: Rework deployment of the kernel image") Signed-off-by: Alexander Gordeev Acked-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit d7fd2941ae9a67423d1c7bee985f240e4686634f Author: Alexander Gordeev Date: Wed Aug 21 18:55:06 2024 +0200 s390/boot: Avoid possible physmem_info segment corruption When physical memory for the kernel image is allocated it does not consider extra memory required for offsetting the image start to match it with the lower 20 bits of KASLR virtual base address. That might lead to kernel access beyond its memory range. Suggested-by: Vasily Gorbik Fixes: 693d41f7c938 ("s390/mm: Restore mapping of kernel image using large pages") Signed-off-by: Alexander Gordeev Acked-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit bb4485562f5907708f1c218b5d70dce04165d1e1 Author: Richard Fitzgerald Date: Thu Aug 22 14:35:44 2024 +0100 ASoC: cs-amp-lib: Ignore empty UEFI calibration entries If the timestamp of a calibration entry is 0 it is an unused entry and must be ignored. Some end-products reserve EFI space for calibration entries by shipping with a zero-filled EFI file. When searching the file for calibration data the driver must skip the empty entries. The timestamp of a valid entry is always non-zero. Signed-off-by: Richard Fitzgerald Fixes: 1cad8725f2b9 ("ASoC: cs-amp-lib: Add helpers for factory calibration data") Link: https://patch.msgid.link/20240822133544.304421-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 2b7e0573a49064d9c94c114b4471327cd96ae39c Author: ChenXiaoSong Date: Thu Aug 22 08:20:54 2024 +0000 smb/server: update misguided comment of smb2_allocate_rsp_buf() smb2_allocate_rsp_buf() will return other error code except -ENOMEM. Signed-off-by: ChenXiaoSong Acked-by: Namjae Jeon Signed-off-by: Steve French commit 0dd771b7d60b8281f10f6721783c60716d22075f Author: ChenXiaoSong Date: Thu Aug 22 08:20:52 2024 +0000 smb/server: remove useless assignment of 'file_present' in smb2_open() The variable is already true here. Signed-off-by: ChenXiaoSong Acked-by: Namjae Jeon Signed-off-by: Steve French commit 4e8771a3666c8f216eefd6bd2fd50121c6c437db Author: ChenXiaoSong Date: Thu Aug 22 08:20:51 2024 +0000 smb/server: fix potential null-ptr-deref of lease_ctx_info in smb2_open() null-ptr-deref will occur when (req_op_level == SMB2_OPLOCK_LEVEL_LEASE) and parse_lease_state() return NULL. Fix this by check if 'lease_ctx_info' is NULL. Additionally, remove the redundant parentheses in parse_durable_handle_context(). Signed-off-by: ChenXiaoSong Signed-off-by: Steve French commit 2186a116538a715b20e15f84fdd3545e5fe0a39b Author: ChenXiaoSong Date: Thu Aug 22 08:20:50 2024 +0000 smb/server: fix return value of smb2_open() In most error cases, error code is not returned in smb2_open(), __process_request() will not print error message. Fix this by returning the correct value at the end of smb2_open(). Signed-off-by: ChenXiaoSong Acked-by: Namjae Jeon Signed-off-by: Steve French commit ce61b605a00502c59311d0a4b1f58d62b48272d0 Author: Namjae Jeon Date: Tue Aug 20 22:07:38 2024 +0900 ksmbd: the buffer of smb2 query dir response has at least 1 byte When STATUS_NO_MORE_FILES status is set to smb2 query dir response, ->StructureSize is set to 9, which mean buffer has 1 byte. This issue occurs because ->Buffer[1] in smb2_query_directory_rsp to flex-array. Fixes: eb3e28c1e89b ("smb3: Replace smb2pdu 1-element arrays with flex-arrays") Cc: stable@vger.kernel.org # v6.1+ Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit a592cdf5164d3feb821085df71f63e70e8b8b08c Author: Kent Overstreet Date: Mon Aug 19 16:41:00 2024 -0400 bcachefs: don't use rht_bucket() in btree_key_cache_scan() rht_bucket() does strange complicated things when a rehash is in progress. Instead, just skip scanning when a rehash is in progress: scanning is going to be more expensive (many more empty slots to cover), and some sort of infinite loop is being observed Signed-off-by: Kent Overstreet commit 3e878fe5a0b139838a65f50a3df3caf3299dbc24 Author: Kent Overstreet Date: Thu Aug 22 03:57:39 2024 -0400 bcachefs: add missing inode_walker_exit() fix a small leak Signed-off-by: Kent Overstreet commit a812a3f45cae787abe29567749a0acc879d2df37 Merge: af688a99eb1fc 46097a9266249 Author: Paolo Abeni Date: Thu Aug 22 15:24:07 2024 +0200 Merge branch 'maintainers-networking-updates' Simon Horman says: ==================== MAINTAINERS: Networking updates This series includes Networking-related updates to MAINTAINERS. * Patches 1-4 aim to assign header files with "*net*' and '*skbuff*' in their name to Networking-related sections within Maintainers. There are a few such files left over after this patches. I have to sent separate patches to add them to SCSI SUBSYSTEM and NETWORKING DRIVERS (WIRELESS) sections [1][2]. [1] https://lore.kernel.org/linux-scsi/20240816-scsi-mnt-v1-1-439af8b1c28b@kernel.org/ [2] https://lore.kernel.org/linux-wireless/20240816-wifi-mnt-v1-1-3fb3bf5d44aa@kernel.org/ * Patch 5 updates the status of the JME driver to 'Odd Fixes' ==================== Link: https://patch.msgid.link/20240821-net-mnt-v2-0-59a5af38e69d@kernel.org Signed-off-by: Paolo Abeni commit 46097a92662496394628cb41138e681d6074cce7 Author: Simon Horman Date: Wed Aug 21 09:46:48 2024 +0100 MAINTAINERS: Mark JME Network Driver as Odd Fixes This driver only appears to have received sporadic clean-ups, typically part of some tree-wide activity, and fixes for quite some time. And according to the maintainer, Guo-Fu Tseng, the device has been EOLed for a long time (see Link). Accordingly, it seems appropriate to mark this driver as odd fixes. Cc: Moon Yeounsu Cc: Guo-Fu Tseng Link: https://lore.kernel.org/netdev/20240805003139.M94125@cooldavid.org/ Signed-off-by: Simon Horman Signed-off-by: Paolo Abeni commit f2d20c9b97f0df64841b89fa1ad3e9c92f7377ae Author: Simon Horman Date: Wed Aug 21 09:46:47 2024 +0100 MAINTAINERS: Add header files to NETWORKING sections This is part of an effort to assign a section in MAINTAINERS to header files that relate to Networking. In this case the files with "net" or "skbuff" in their name. This patch adds a number of such files to the NETWORKING DRIVERS and NETWORKING [GENERAL] sections. Signed-off-by: Simon Horman Signed-off-by: Paolo Abeni commit 8cb0a938d90b25f123fcb2e24bbda9eaabd79c9e Author: Simon Horman Date: Wed Aug 21 09:46:46 2024 +0100 MAINTAINERS: Add limited globs for Networking headers This aims to add limited globs to improve the coverage of header files in the NETWORKING DRIVERS and NETWORKING [GENERAL] sections. It is done so in a minimal way to exclude overlap with other sections. And so as not to require "X" entries to exclude files otherwise matched by these new globs. While imperfect, due to it's limited nature, this does extend coverage of header files by these sections. And aims to automatically cover new files that seem very likely belong to these sections. The include/linux/netdev* glob (both sections) + Subsumes the entries for: - include/linux/netdevice.h + Extends the sections to cover - include/linux/netdevice_xmit.h - include/linux/netdev_features.h The include/uapi/linux/netdev* globs: (both sections) + Subsumes the entries for: - include/linux/netdevice.h + Extends the sections to cover - include/linux/netdev.h The include/linux/skbuff* glob (NETWORKING [GENERAL] section only): + Subsumes the entry for: - include/linux/skbuff.h + Extends the section to cover - include/linux/skbuff_ref.h A include/uapi/linux/net_* glob was not added to the NETWORKING [GENERAL] section. Although it would subsume the entry for include/uapi/linux/net_namespace.h, which is fine, it would also extend coverage to: - include/uapi/linux/net_dropmon.h, which belongs to the NETWORK DROP MONITOR section - include/uapi/linux/net_tstamp.h which, as per an earlier patch in this series, belongs to the SOCKET TIMESTAMPING section Signed-off-by: Simon Horman Signed-off-by: Paolo Abeni commit eb208fecd77d898709c25af680487289fd5f3e16 Author: Simon Horman Date: Wed Aug 21 09:46:45 2024 +0100 MAINTAINERS: Add net_tstamp.h to SOCKET TIMESTAMPING section This is part of an effort to assign a section in MAINTAINERS to header files that relate to Networking. In this case the files with "net" in their name. Cc: Richard Cochran Cc: Willem de Bruijn Signed-off-by: Simon Horman Acked-by: Willem de Bruijn Signed-off-by: Paolo Abeni commit 1ac66c4960e1c735eb6edfd3e6d52bebb2aa347e Author: Simon Horman Date: Wed Aug 21 09:46:44 2024 +0100 MAINTAINERS: Add sonet.h to ATM section of MAINTAINERS This is part of an effort to assign a section in MAINTAINERS to header files that relate to Networking. In this case the files with "net" in their name. It seems that sonet.h is included in ATM related source files, and thus that ATM is the most relevant section for these files. Cc: Chas Williams <3chas3@gmail.com> Signed-off-by: Simon Horman Signed-off-by: Paolo Abeni commit 3b1f7a46977fe2ff9384d08651a6e0d272ae6a60 Author: Christophe Leroy Date: Thu Aug 22 09:58:42 2024 +0200 powerpc/mm: Fix return type of pgd_val() Commit 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)") switched PGD entries to 64 bits, but pgd_val() returns an unsigned long which is 32 bits on PPC32. This is not a problem for regular PMD entries because the upper part is always NULL, but when PMD entries are leaf they contain 64 bits values, so pgd_val() must return an unsigned long long instead of an unsigned long. Also change the condition to CONFIG_PPC_85xx instead of CONFIG_PPC_E500 as the change was meant for 32 bits only. Allthough this should be harmless on PPC64, it generates a warning with pgd_ERROR print. Fixes: 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/45f8fdf298ec3df7573b66d21b03a5cda92e2cb1.1724313510.git.christophe.leroy@csgroup.eu commit 6114139c3bdde992f4a19264e4f9bfc100d8d776 Author: Christophe Leroy Date: Tue Aug 20 13:28:07 2024 +0200 powerpc/vdso: Don't discard rela sections After building the VDSO, there is a verification that it contains no dynamic relocation, see commit aff69273af61 ("vdso: Improve cmd_vdso_check to check all dynamic relocations"). This verification uses readelf -r and doesn't work if rela sections are discarded. Fixes: 8ad57add77d3 ("powerpc/build: vdso linker warning for orphan sections") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/45c3e6fc76cad05ad2cac0f5b5dfb4fae86dc9d6.1724153239.git.christophe.leroy@csgroup.eu commit d92b5cc29c792f1d3f0aaa3b29dddfe816c03e88 Author: Christophe Leroy Date: Tue Aug 20 14:42:38 2024 +0200 powerpc/64e: Define mmu_pte_psize static mmu_pte_psize is only used in the tlb_64e.c, define it static. Fixes: 25d21ad6e799 ("powerpc: Add TLB management code for 64-bit Book3E") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408011256.1O99IB0s-lkp@intel.com/ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/beb30d280eaa5d857c38a0834b147dffd6b28aa9.1724157750.git.christophe.leroy@csgroup.eu commit bff980d8d9ca537fd5f3c0e9a99876c1e3713e81 Author: Richard Fitzgerald Date: Thu Aug 22 12:57:25 2024 +0100 ASoC: cs-amp-lib-test: Force test calibration blob entries to be valid For a normal calibration blob the calTarget values must be non-zero and unique, and the calTime values must be non-zero. Don't rely on get_random_bytes() to be random enough to guarantee this. Force the calTarget and calTime values to be valid while retaining randomness in the values. Signed-off-by: Richard Fitzgerald Fixes: 177862317a98 ("ASoC: cs-amp-lib: Add KUnit test for calibration helpers") Link: https://patch.msgid.link/20240822115725.259568-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit e17465f78eb92ebb4be17e35d6c0584406f643a0 Author: Andy Shevchenko Date: Thu Aug 22 14:30:54 2024 +0300 spi: pxa2xx: Move PM runtime handling to the glue drivers PCI and platform buses have different defaults for runtime PM. In particular PCI probe is assumed to be called when PM runtime is enabled by the PCI core. In this case if we try enable it again the PM runtime complaints with pxa2xx_spi_pci 0000:00:07.0: Unbalanced pm_runtime_enable! Fix this by moving PM runtime handling from the SPI PXA2xx core to the glue drivers. Fixes: cc160697a576 ("spi: pxa2xx: Convert PCI driver to use spi-pxa2xx code directly") Fixes: 3d8f037fbcab ("spi: pxa2xx: Move platform driver to a separate file") Fixes: 20ade9b9771c ("spi: pxa2xx: Extract pxa2xx_spi_platform_*() callbacks") Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20240822113408.750831-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9a8fc292dd93b93db30e01c94c0da4c944852f28 Author: Andy Shevchenko Date: Thu Aug 22 14:30:53 2024 +0300 spi: pxa2xx: Do not override dev->platform_data on probe The platform_data field may be supplied by legacy board code. In other cases we override it, and module remove and probe cycle will crash the kernel since it will carry a stale pointer. Fix this by supplying a third argument to the pxa2xx_spi_probe() and avoid overriding dev->platform_data. Reported-by: Hao Ma Fixes: cc160697a576 ("spi: pxa2xx: Convert PCI driver to use spi-pxa2xx code directly") Fixes: 3d8f037fbcab ("spi: pxa2xx: Move platform driver to a separate file") Fixes: 20ade9b9771c ("spi: pxa2xx: Extract pxa2xx_spi_platform_*() callbacks") Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20240822113408.750831-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9abf199943a6469a71f6ce5c2266e9364d310f8b Author: Baochen Qiang Date: Tue Aug 13 16:38:08 2024 +0800 wifi: ath11k: fix NULL pointer dereference in ath11k_mac_get_eirp_power() Commit 39dc8b8ea387 ("wifi: mac80211: pass parsed TPE data to drivers") breaks ath11k, leading to kernel crash: BUG: kernel NULL pointer dereference, address: 0000000000000018 RIP: 0010:ath11k_mac_get_eirp_power.isra.0+0x5b/0x80 [ath11k] Call Trace: ath11k_mac_fill_reg_tpc_info+0x3d6/0x800 [ath11k] ath11k_mac_vdev_start_restart+0x412/0x4d0 [ath11k] ath11k_mac_op_sta_state+0x7bc/0xbb0 [ath11k] drv_sta_state+0xf1/0x5f0 [mac80211] sta_info_insert_rcu+0x28d/0x530 [mac80211] sta_info_insert+0xf/0x20 [mac80211] ieee80211_prep_connection+0x3b4/0x4c0 [mac80211] ieee80211_mgd_auth+0x363/0x600 [mac80211] The issue scenario is, AP advertises power spectral density (PSD) values in its transmit power envelope (TPE) IE and supports 160 MHz bandwidth in 6 GHz. When connecting to this AP, in ath11k_mac_parse_tx_pwr_env(), the local variable psd is true and then reg_tpc_info.num_pwr_levels is set to 8 due to 160 MHz bandwidth. Note here ath11k fails to set reg_tpc_info.is_psd_power as TRUE due to above commit. Then in ath11k_mac_fill_reg_tpc_info(), for each of the 8 power levels, for a PSD channel, ath11k_mac_get_psd_channel() is expected to be called to get required information. However due to invalid reg_tpc_info.is_psd_power, it is ath11k_mac_get_eirp_power() that gets called and passed with pwr_lvl_idx as one of the arguments. Note this function implicitly requires pwr_lvl_idx to be no more than 3. So when pwr_lvl_idx is larger than that ath11k_mac_get_seg_freq() returns invalid center frequency, with which as the input ieee80211_get_channel() returns NULL, then kernel crashes due to NULL pointer dereference. Fix it by setting reg_tpc_info.is_psd_power properly. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Fixes: 39dc8b8ea387 ("wifi: mac80211: pass parsed TPE data to drivers") Reported-by: Mikko Tiihonen Tested-by: Mikko Tiihonen Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219131 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240813083808.9224-1-quic_bqiang@quicinc.com commit af688a99eb1fc7ef69774665d61e6be51cea627a Author: Bharat Bhushan Date: Wed Aug 21 12:35:58 2024 +0530 octeontx2-af: Fix CPT AF register offset calculation Some CPT AF registers are per LF and others are global. Translation of PF/VF local LF slot number to actual LF slot number is required only for accessing perf LF registers. CPT AF global registers access do not require any LF slot number. Also, there is no reason CPT PF/VF to know actual lf's register offset. Without this fix microcode loading will fail, VFs cannot be created and hardware is not usable. Fixes: bc35e28af789 ("octeontx2-af: replace cpt slot with lf id on reg write") Signed-off-by: Bharat Bhushan Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240821070558.1020101-1-bbhushan2@marvell.com Signed-off-by: Paolo Abeni commit a2f5c505b4378cd6fc7c4a44ff3665ccef2037db Author: Sava Jakovljev Date: Wed Aug 21 04:16:57 2024 +0200 net: phy: realtek: Fix setting of PHY LEDs Mode B bit on RTL8211F The current implementation incorrectly sets the mode bit of the PHY chip. Bit 15 (RTL8211F_LEDCR_MODE) should not be shifted together with the configuration nibble of a LED- it should be set independently of the index of the LED being configured. As a consequence, the RTL8211F LED control is actually operating in Mode A. Fix the error by or-ing final register value to write with a const-value of RTL8211F_LEDCR_MODE, thus setting Mode bit explicitly. Fixes: 17784801d888 ("net: phy: realtek: Add support for PHY LEDs on RTL8211F") Signed-off-by: Sava Jakovljev Reviewed-by: Marek Vasut Link: https://patch.msgid.link/PAWP192MB21287372F30C4E55B6DF6158C38E2@PAWP192MB2128.EURP192.PROD.OUTLOOK.COM Signed-off-by: Paolo Abeni commit f2916c83d746eb99f50f42c15cf4c47c2ea5f3b3 Author: Mengyuan Lou Date: Tue Aug 20 11:04:25 2024 +0800 net: ngbe: Fix phy mode set to external phy The MAC only has add the TX delay and it can not be modified. MAC and PHY are both set the TX delay cause transmission problems. So just disable TX delay in PHY, when use rgmii to attach to external phy, set PHY_INTERFACE_MODE_RGMII_RXID to phy drivers. And it is does not matter to internal phy. Fixes: bc2426d74aa3 ("net: ngbe: convert phylib to phylink") Signed-off-by: Mengyuan Lou Cc: stable@vger.kernel.org # 6.3+ Reviewed-by: Jacob Keller Link: https://patch.msgid.link/E6759CF1387CF84C+20240820030425.93003-1-mengyuanlou@net-swift.com Signed-off-by: Paolo Abeni commit 1fa7b099d60ad64f559bd3b8e3f0d94b2e015514 Author: Kailang Yang Date: Thu Aug 22 16:46:56 2024 +0800 ALSA: hda/realtek - FIxed ALC285 headphone no sound Dell platform with ALC215 ALC285 ALC289 ALC225 ALC295 ALC299, plug headphone or headset. It had a chance to get no sound from headphone. Replace depop procedure will solve this issue. Signed-off-by: Kailang Yang Link: https://lore.kernel.org/d0de1b03fd174520945dde216d765223@realtek.com Signed-off-by: Takashi Iwai commit 6ea14ccb60c8ab829349979b22b58a941ec4a3ee Author: Pablo Neira Ayuso Date: Tue Aug 13 12:39:46 2024 +0200 netfilter: flowtable: validate vlan header Ensure there is sufficient room to access the protocol field of the VLAN header, validate it once before the flowtable lookup. ===================================================== BUG: KMSAN: uninit-value in nf_flow_offload_inet_hook+0x45a/0x5f0 net/netfilter/nf_flow_table_inet.c:32 nf_flow_offload_inet_hook+0x45a/0x5f0 net/netfilter/nf_flow_table_inet.c:32 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626 nf_hook_ingress include/linux/netfilter_netdev.h:34 [inline] nf_ingress net/core/dev.c:5440 [inline] Fixes: 4cd91f7c290f ("netfilter: flowtable: add vlan support") Reported-by: syzbot+8407d9bb88cd4c6bf61a@syzkaller.appspotmail.com Signed-off-by: Pablo Neira Ayuso commit cd4897bfd14f6a5388b21ba45a066541a0425199 Author: Krzysztof Kozlowski Date: Wed Aug 14 11:39:57 2024 +0200 usb: dwc3: st: add missing depopulate in probe error path Depopulate device in probe error paths to fix leak of children resources. Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: Patrice Chotard Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240814093957.37940-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit ddfcfeba891064b88bb844208b43bef2ef970f0c Author: Krzysztof Kozlowski Date: Wed Aug 14 11:39:56 2024 +0200 usb: dwc3: st: fix probed platform device ref count on probe error path The probe function never performs any paltform device allocation, thus error path "undo_platform_dev_alloc" is entirely bogus. It drops the reference count from the platform device being probed. If error path is triggered, this will lead to unbalanced device reference counts and premature release of device resources, thus possible use-after-free when releasing remaining devm-managed resources. Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Thinh Nguyen Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20240814093957.37940-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 72fca8371f205d654f95b09cd023a71fd5307041 Author: Michael Grzeschik Date: Thu Aug 15 08:40:29 2024 +0200 usb: dwc3: ep0: Don't reset resource alloc flag (including ep0) The DWC3_EP_RESOURCE_ALLOCATED flag ensures that the resource of an endpoint is only assigned once. Unless the endpoint is reset, don't clear this flag. Otherwise we may set endpoint resource again, which prevents the driver from initiate transfer after handling a STALL or endpoint halt to the control endpoint. Commit f2e0eee47038 ("usb: dwc3: ep0: Don't reset resource alloc flag") was fixing the initial issue, but did this only for physical ep1. Since the function dwc3_ep0_stall_and_restart is resetting the flags for both physical endpoints, this also has to be done for ep0. Cc: stable@vger.kernel.org Fixes: b311048c174d ("usb: dwc3: gadget: Rewrite endpoint allocation flow") Acked-by: Thinh Nguyen Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20240814-dwc3hwep0reset-v2-1-29e1d7d923ea@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 3a8839bbb86da7968a792123ed2296d063871a52 Author: Zijun Hu Date: Tue Aug 20 19:01:27 2024 +0800 usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() Device attribute group @usb3_hardware_lpm_attr_group is merged by add_power_attributes(), but it is not unmerged explicitly, fixed by unmerging it in remove_power_attributes(). Fixes: 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20240820-sysfs_fix-v2-1-a9441487077e@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 4f83cae0edb2b13aabb82e8a4852092844d320aa Author: Luca Weiss Date: Sun Aug 18 22:21:01 2024 +0200 usb: typec: fsa4480: Relax CHIP_ID check Some FSA4480-compatible chips like the OCP96011 used on Fairphone 5 return 0x00 from the CHIP_ID register. Handle that gracefully and only fail probe when the I2C read has failed. With this the dev_dbg will print 0 but otherwise continue working. [ 0.251581] fsa4480 1-0042: Found FSA4480 v0.0 (Vendor ID = 0) Cc: stable@vger.kernel.org Fixes: e885f5f1f2b4 ("usb: typec: fsa4480: Check if the chip is really there") Signed-off-by: Luca Weiss Reviewed-by: Heikki Krogerus Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240818-fsa4480-chipid-fix-v1-1-17c239435cf7@fairphone.com Signed-off-by: Greg Kroah-Hartman commit 16f2a21d9d7e48e1af02654fe3d926c0ce6cb3e5 Author: Krzysztof Kozlowski Date: Fri Aug 16 09:54:09 2024 +0200 usb: dwc3: xilinx: add missing depopulate in probe error path Depopulate device in probe error paths to fix leak of children resources. Fixes: 53b5ff83d893 ("usb: dwc3: xilinx: improve error handling for PM APIs") Cc: stable@vger.kernel.org Reviewed-by: Radhey Shyam Pandey Signed-off-by: Krzysztof Kozlowski Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240816075409.23080-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2aa765a43817ec8add990f83c8e54a9a5d87aa9c Author: Krzysztof Kozlowski Date: Fri Aug 16 09:54:08 2024 +0200 usb: dwc3: omap: add missing depopulate in probe error path Depopulate device in probe error paths to fix leak of children resources. Fixes: ee249b455494 ("usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq") Cc: stable@vger.kernel.org Acked-by: Thinh Nguyen Signed-off-by: Krzysztof Kozlowski Reviewed-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/20240816075409.23080-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5b235693ed2a1e4963625717a1598becf97759cc Author: Alexander Stein Date: Thu Aug 15 13:31:31 2024 +0200 dt-bindings: usb: microchip,usb2514: Fix reference USB device schema An USB hub is not a HCD, but an USB device. Fix the referenced schema accordingly. Fixes: bfbf2e4b77e2 ("dt-bindings: usb: Document the Microchip USB2514 hub") Cc: stable@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20240815113132.372542-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit b52a07e07dead777517af3cbda851bb2cc157c9d Author: Xu Yang Date: Wed Aug 14 19:25:37 2024 +0800 usb: gadget: uvc: queue pump work in uvcg_video_enable() Since commit "6acba0345b68 usb:gadget:uvc Do not use worker thread to pump isoc usb requests", pump work could only be queued in uvc_video_complete() and uvc_v4l2_qbuf(). If VIDIOC_QBUF is executed before VIDIOC_STREAMON, we can only depend on uvc_video_complete() to queue pump work. However, this requires some free requests in req_ready list. If req_ready list is empty all the time, pump work will never be queued and video datas will never be pumped to usb controller. Actually, this situation could happen when run uvc-gadget with static image: $ ./uvc-gadget -i 1080p.jpg uvc.0 When capture image from this device, the user app will always block there. The issue is uvc driver has queued video buffer before streamon, but the req_ready list is empty all the time after streamon. This will queue pump work in uvcg_video_enable() to fill some request to req_ready list so the uvc device could work properly. Fixes: 6acba0345b68 ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests") Cc: stable@vger.kernel.org Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240814112537.2608949-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 0b00583ecacb0b51712a5ecd34cf7e6684307c67 Author: Ian Ray Date: Wed Aug 14 10:29:05 2024 +0300 cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller USB_DEVICE(0x1901, 0x0006) may send data before cdc_acm is ready, which may be misinterpreted in the default N_TTY line discipline. Signed-off-by: Ian Ray Acked-by: Oliver Neuku Cc: stable Link: https://lore.kernel.org/r/20240814072905.2501-1-ian.ray@gehealthcare.com Signed-off-by: Greg Kroah-Hartman commit 0497a356d3c498221eb0c1edc1e8985816092f12 Author: Pawel Laszczak Date: Tue Aug 20 08:21:19 2024 +0000 usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function Patch fixes the incorrect "stream_id" table index instead of "ep_index" used in cdnsp_get_hw_deq function. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") cc: stable@vger.kernel.org Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/PH7PR07MB95381F2182688811D5C711CEDD8D2@PH7PR07MB9538.namprd07.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 14e497183df28c006603cc67fd3797a537eef7b9 Author: Selvarasu Ganesan Date: Thu Aug 15 12:18:31 2024 +0530 usb: dwc3: core: Prevent USB core invalid event buffer address access This commit addresses an issue where the USB core could access an invalid event buffer address during runtime suspend, potentially causing SMMU faults and other memory issues in Exynos platforms. The problem arises from the following sequence. 1. In dwc3_gadget_suspend, there is a chance of a timeout when moving the USB core to the halt state after clearing the run/stop bit by software. 2. In dwc3_core_exit, the event buffer is cleared regardless of the USB core's status, which may lead to an SMMU faults and other memory issues. if the USB core tries to access the event buffer address. To prevent this hardware quirk on Exynos platforms, this commit ensures that the event buffer address is not cleared by software when the USB core is active during runtime suspend by checking its status before clearing the buffer address. Cc: stable Signed-off-by: Selvarasu Ganesan Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240815064836.1491-1-selvarasu.g@samsung.com Signed-off-by: Greg Kroah-Hartman commit 3e6245ebe7ef341639e9a7e402b3ade8ad45a19f Author: Marc Zyngier Date: Tue Aug 20 11:03:38 2024 +0100 KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 On a system with a GICv3, if a guest hasn't been configured with GICv3 and that the host is not capable of GICv2 emulation, a write to any of the ICC_*SGI*_EL1 registers is trapped to EL2. We therefore try to emulate the SGI access, only to hit a NULL pointer as no private interrupt is allocated (no GIC, remember?). The obvious fix is to give the guest what it deserves, in the shape of a UNDEF exception. Reported-by: Alexander Potapenko Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240820100349.3544850-2-maz@kernel.org Signed-off-by: Oliver Upton commit 6e95097b6bb20f0021180b150f41ad9962dcdcc9 Author: Laurent Pinchart Date: Tue Aug 13 13:44:47 2024 +0300 MAINTAINERS: Mark UVC gadget driver as orphan I haven't had time to maintain the UVC gadget driver for a long while. Dan Scally confirmed he is also in a similar -ENOTIME situation with no short term hope of fixing that. Being listed as maintainers doesn't help progress, so mark the driver as orphan to reflect the current state. Signed-off-by: Laurent Pinchart Acked-by: Daniel Scally Link: https://lore.kernel.org/r/20240813104447.25821-1-laurent.pinchart@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 7dd9c26bd6cf679bcfdef01a8659791aa6487a29 Author: Simon Arlott Date: Thu Aug 22 08:25:07 2024 +0100 can: mcp251x: fix deadlock if an interrupt occurs during mcp251x_open The mcp251x_hw_wake() function is called with the mpc_lock mutex held and disables the interrupt handler so that no interrupts can be processed while waking the device. If an interrupt has already occurred then waiting for the interrupt handler to complete will deadlock because it will be trying to acquire the same mutex. CPU0 CPU1 ---- ---- mcp251x_open() mutex_lock(&priv->mcp_lock) request_threaded_irq() mcp251x_can_ist() mutex_lock(&priv->mcp_lock) mcp251x_hw_wake() disable_irq() <-- deadlock Use disable_irq_nosync() instead because the interrupt handler does everything while holding the mutex so it doesn't matter if it's still running. Fixes: 8ce8c0abcba3 ("can: mcp251x: only reset hardware as required") Signed-off-by: Simon Arlott Reviewed-by: Przemek Kitszel Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/4fc08687-1d80-43fe-9f0d-8ef8475e75f6@0882a8b5-c6c3-11e9-b005-00805fc181fe.uuid.home.arpa Signed-off-by: Marc Kleine-Budde commit 1d8c3c23a6bc1527e253b305b4b68c03d833b824 Author: Oliver Upton Date: Thu Aug 22 07:17:09 2024 +0000 KVM: arm64: Ensure canonical IPA is hugepage-aligned when handling fault Zenghui reports that VMs backed by hugetlb pages are no longer booting after commit fd276e71d1e7 ("KVM: arm64: nv: Handle shadow stage 2 page faults"). Support for shadow stage-2 MMUs introduced the concept of a fault IPA and canonical IPA to stage-2 fault handling. These are identical in the non-nested case, as the hardware stage-2 context is always that of the canonical IPA space. Both addresses need to be hugepage-aligned when preparing to install a hugepage mapping to ensure that KVM uses the correct GFN->PFN translation and installs that at the correct IPA for the current stage-2. And now I'm feeling thirsty after all this talk of IPAs... Fixes: fd276e71d1e7 ("KVM: arm64: nv: Handle shadow stage 2 page faults") Reported-by: Zenghui Yu Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240822071710.2291690-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 9b82ff1362f50914c8292902e07be98a9f59d33d Author: Kailang Yang Date: Thu Aug 22 10:54:19 2024 +0800 ALSA: hda/realtek - Fixed ALC256 headphone no sound Dell platform, plug headphone or headset, it had a chance to get no sound from headphone. Replace depop procedure will solve this issue. Signed-off-by: Kailang Yang Link: https://lore.kernel.org/bb8e2de30d294dc287944efa0667685a@realtek.com Signed-off-by: Takashi Iwai commit 87313ac1f134d6ee1e7c858da8bdea9147b537a9 Author: Kent Overstreet Date: Thu Aug 22 02:13:02 2024 -0400 bcachefs: clear path->should_be_locked in bch2_btree_key_cache_drop() bch2_btree_key_cache_drop() evicts the key cache entry - it's used when we're doing an update that bypasses the key cache, because for cache coherency reasons a key can't be in the key cache unless it also exists in the btree - i.e. creates have to bypass the cache. After evicting, the path no longer points to a key cache key, and relock() will always fail if should_be_locked is true. Prep for improving path->should_be_locked assertions Signed-off-by: Kent Overstreet commit dedb2fe37574857c84e9598b9f5272505dedf7af Author: Yuesong Li Date: Thu Aug 22 14:21:58 2024 +0800 bcachefs: Fix double assignment in check_dirent_to_subvol() ret was assigned twice in check_dirent_to_subvol(). Reported by cocci. Signed-off-by: Yuesong Li Signed-off-by: Kent Overstreet commit 0b50b7313ef2494926df30ce8e2ce284f1b847fc Author: Kent Overstreet Date: Wed Aug 21 23:21:52 2024 -0400 bcachefs: Fix refcounting in discard path bch_dev->io_ref does not protect against the filesystem going away; bch_fs->writes does. Thus the filesystem write ref needs to be the last ref we release. Reported-by: syzbot+9e0404b505e604f67e41@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 8ed823b19214e403ca485532f48c0e02035021ae Author: Kent Overstreet Date: Wed Aug 21 22:57:56 2024 -0400 bcachefs: Fix compat issue with old alloc_v4 keys we allow new fields to be added to existing key types, and new versions should treat them as being zeroed; this was not handled in alloc_v4_validate. Reported-by: syzbot+3b2968fa4953885dd66a@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 7f2de6947f92cfa4be8e5eaa1237e962bb8ee65f Author: Kent Overstreet Date: Wed Aug 21 22:27:45 2024 -0400 bcachefs: Fix warning in bch2_fs_journal_stop() j->last_empty_seq needs to match j->seq when the journal is empty Reported-by: syzbot+4093905737cf289b6b38@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 06f67437ab356e3140f51aea272d33ce28421f66 Author: Kent Overstreet Date: Wed Aug 21 22:06:44 2024 -0400 fs/super.c: improve get_tree() error message seeing an odd bug where we fail to correctly return an error from .get_tree(): https://syzkaller.appspot.com/bug?extid=c0360e8367d6d8d04a66 we need to be able to distinguish between accidently returning a positive error (as implied by the log) and no error. Cc: David Howells Signed-off-by: Kent Overstreet commit bdbdd4759f081ca2d0a5d9e8af21d742ffaf8439 Author: Kent Overstreet Date: Wed Aug 21 21:10:45 2024 -0400 bcachefs: Fix missing validation in bch2_sb_journal_v2_validate() Reported-by: syzbot+47ecc948aadfb2ab3efc@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit cab18be6957b6af8cbe3502fd5f6d7b9f02ccceb Author: Kent Overstreet Date: Wed Aug 21 20:49:07 2024 -0400 bcachefs: Fix replay_now_at() assert Journal replay, in the slowpath where we insert keys in journal order, was inserting keys in the wrong order; keys from early repair come last. Reported-by: syzbot+2c4fcb257ce2b6a29d0e@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 6575b8c9877c3dd1f7db1d0d61bd250a0bf18b6d Author: Kent Overstreet Date: Tue Aug 20 19:31:20 2024 -0400 bcachefs: Fix locking in bch2_ioc_setlabel() Fixes: 7a254053a590 ("bcachefs: support FS_IOC_SETFSLABEL") Reported-by: syzbot+7e9efdfec27fbde0141d@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 5dbfc4ef72f15508882aff58c307b8425cf037a8 Author: Kent Overstreet Date: Tue Aug 20 15:04:15 2024 -0400 bcachefs: fix failure to relock in btree_node_fill() Signed-off-by: Kent Overstreet commit 3c5d0b72a8e8c19c960e8fefb7463067e58b6bc4 Author: Kent Overstreet Date: Mon Aug 19 15:22:55 2024 -0400 bcachefs: fix failure to relock in bch2_btree_node_mem_alloc() We weren't always so strict about trans->locked state - but now we are, and new assertions are shaking some bugs out. Signed-off-by: Kent Overstreet commit 1dceae4cc12aa6389d9a8706f0d2a94d1679e79d Author: Kent Overstreet Date: Tue Aug 20 12:10:33 2024 -0400 bcachefs: unlock_long() before resort in journal replay Fix another SRCU splat - this one pretty harmless. Signed-off-by: Kent Overstreet commit cecc328240609df17395dfd0ea03cc813d8be36d Author: Kent Overstreet Date: Tue Aug 20 11:25:39 2024 -0400 bcachefs: fix missing bch2_err_str() Signed-off-by: Kent Overstreet commit b8db1bd8020d5fecb3bf46cd8b954a657c20ba14 Author: Kent Overstreet Date: Mon Aug 19 16:13:16 2024 -0400 bcachefs: fix time_stats_to_text() Fixes: 7423330e30ab ("bcachefs: prt_printf() now respects \r\n\t") Signed-off-by: Kent Overstreet commit c2a503f3e98e191d86738f5438a3a2b69575c830 Author: Kent Overstreet Date: Sun Aug 18 20:38:49 2024 -0400 bcachefs: Fix bch2_bucket_gens_init() Comparing the wrong bpos - this was missed because normally bucket_gens_init() runs on brand new filesystems, but this bug caused it to overwrite bucket_gens keys with 0s when upgrading ancient filesystems. Signed-off-by: Kent Overstreet commit e150a7e89c4727176d07f5a0a8966fc2af05821c Author: Kent Overstreet Date: Sun Aug 18 20:18:34 2024 -0400 bcachefs: Fix bch2_trigger_alloc assert On testing on an old mangled filesystem, we missed a case. Fixes: bd864bc2d907 ("bcachefs: Fix bch2_trigger_alloc when upgrading from old versions") Signed-off-by: Kent Overstreet commit 49203a6b9d12bfd1a223a67847a631a78f1cd782 Author: Kent Overstreet Date: Sun Aug 18 15:08:12 2024 -0400 bcachefs: Fix failure to relock in btree_node_get() discovered by new trans->locked asserts Signed-off-by: Kent Overstreet commit 548e7f51679bf0ec3cdc2027d780c5d06a2a7ac6 Author: Kent Overstreet Date: Sun Aug 18 13:24:26 2024 -0400 bcachefs: setting bcachefs_effective.* xattrs is a noop bcachefs_effective.* xattrs show the options inherited from parent directories (as well as explicitly set); this namespace is not for setting bcachefs options. Change the .set() handler to a noop so that if e.g. rsync is copying xattrs it'll do the right thing, and only copy xattrs in the bcachefs.* namespace. We don't want to return an error, because that will cause rsync to bail out or get spammy. Signed-off-by: Kent Overstreet commit 8cc0e50614520c6c609c6ae32a65d0591b7865a1 Author: Kent Overstreet Date: Sun Aug 18 13:13:39 2024 -0400 bcachefs: Fix "trying to move an extent, but nr_replicas=0" data_update_init() does a bunch of complicated stuff to decide how many replicas to add, since we only want to increase an extent's durability on an explicit rereplicate, but extent pointers may be on devices with different durability settings. There was a corner case when evacuating a device that had been set to durability=0 after data had been written to it, and extents on that device had already been rereplicated - then evacuate only needs to drop pointers on that device, not move them. So the assert for !m->op.nr_replicas was spurious; this was a perfectly legitimate case that needed to be handled. Signed-off-by: Kent Overstreet commit 3f53d050416e88122d53aabbadb1fede998004da Author: Kent Overstreet Date: Sun Aug 18 12:22:23 2024 -0400 bcachefs: bch2_data_update_init() cleanup Factor out some helpers - this function has gotten much too big. Signed-off-by: Kent Overstreet commit a0b4a80ed6ce2cf8140fe926303ba609884b5d9b Merge: 8baeef7616d51 503ab6ee40fc1 Author: Jakub Kicinski Date: Wed Aug 21 18:05:24 2024 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-08-20 (ice) This series contains updates to ice driver only. Maciej fixes issues with Rx data path on architectures with PAGE_SIZE >= 8192; correcting page reuse usage and calculations for last offset and truesize. Michal corrects assignment of devlink port number to use PF id. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: use internal pf id instead of function number ice: fix truesize operations for PAGE_SIZE >= 8192 ice: fix ICE_LAST_OFFSET formula ice: fix page reuse when PAGE_SIZE is over 8k ==================== Link: https://patch.msgid.link/20240820215620.1245310-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 8baeef7616d5194045c5a6b97fd1246b87c55b13 Author: Somnath Kotur Date: Tue Aug 20 13:34:15 2024 -0700 bnxt_en: Fix double DMA unmapping for XDP_REDIRECT Remove the dma_unmap_page_attrs() call in the driver's XDP_REDIRECT code path. This should have been removed when we let the page pool handle the DMA mapping. This bug causes the warning: WARNING: CPU: 7 PID: 59 at drivers/iommu/dma-iommu.c:1198 iommu_dma_unmap_page+0xd5/0x100 CPU: 7 PID: 59 Comm: ksoftirqd/7 Tainted: G W 6.8.0-1010-gcp #11-Ubuntu Hardware name: Dell Inc. PowerEdge R7525/0PYVT1, BIOS 2.15.2 04/02/2024 RIP: 0010:iommu_dma_unmap_page+0xd5/0x100 Code: 89 ee 48 89 df e8 cb f2 69 ff 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 31 d2 31 c9 31 f6 31 ff 45 31 c0 e9 ab 17 71 00 <0f> 0b 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 31 d2 31 c9 RSP: 0018:ffffab1fc0597a48 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff99ff838280c8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffab1fc0597a78 R08: 0000000000000002 R09: ffffab1fc0597c1c R10: ffffab1fc0597cd3 R11: ffff99ffe375acd8 R12: 00000000e65b9000 R13: 0000000000000050 R14: 0000000000001000 R15: 0000000000000002 FS: 0000000000000000(0000) GS:ffff9a06efb80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000565c34c37210 CR3: 00000005c7e3e000 CR4: 0000000000350ef0 ? show_regs+0x6d/0x80 ? __warn+0x89/0x150 ? iommu_dma_unmap_page+0xd5/0x100 ? report_bug+0x16a/0x190 ? handle_bug+0x51/0xa0 ? exc_invalid_op+0x18/0x80 ? iommu_dma_unmap_page+0xd5/0x100 ? iommu_dma_unmap_page+0x35/0x100 dma_unmap_page_attrs+0x55/0x220 ? bpf_prog_4d7e87c0d30db711_xdp_dispatcher+0x64/0x9f bnxt_rx_xdp+0x237/0x520 [bnxt_en] bnxt_rx_pkt+0x640/0xdd0 [bnxt_en] __bnxt_poll_work+0x1a1/0x3d0 [bnxt_en] bnxt_poll+0xaa/0x1e0 [bnxt_en] __napi_poll+0x33/0x1e0 net_rx_action+0x18a/0x2f0 Fixes: 578fcfd26e2a ("bnxt_en: Let the page pool manage the DMA mapping") Reviewed-by: Andy Gospodarek Reviewed-by: Kalesh AP Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20240820203415.168178-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 58652e2422a7407e77ee50fcaaf4bf1885de8753 Merge: 007d4271a5f10 2d5ff7e339d04 Author: Jakub Kicinski Date: Wed Aug 21 17:35:51 2024 -0700 Merge branch 'ipv6-fix-possible-uaf-in-output-paths' Eric Dumazet says: ==================== ipv6: fix possible UAF in output paths First patch fixes an issue spotted by syzbot, and the two other patches fix error paths after skb_expand_head() adoption. ==================== Link: https://patch.msgid.link/20240820160859.3786976-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 2d5ff7e339d04622d8282661df36151906d0e1c7 Author: Eric Dumazet Date: Tue Aug 20 16:08:59 2024 +0000 ipv6: prevent possible UAF in ip6_xmit() If skb_expand_head() returns NULL, skb has been freed and the associated dst/idev could also have been freed. We must use rcu_read_lock() to prevent a possible UAF. Fixes: 0c9f227bee11 ("ipv6: use skb_expand_head in ip6_xmit") Signed-off-by: Eric Dumazet Cc: Vasily Averin Reviewed-by: David Ahern Link: https://patch.msgid.link/20240820160859.3786976-4-edumazet@google.com Signed-off-by: Jakub Kicinski commit da273b377ae0d9bd255281ed3c2adb228321687b Author: Eric Dumazet Date: Tue Aug 20 16:08:58 2024 +0000 ipv6: fix possible UAF in ip6_finish_output2() If skb_expand_head() returns NULL, skb has been freed and associated dst/idev could also have been freed. We need to hold rcu_read_lock() to make sure the dst and associated idev are alive. Fixes: 5796015fa968 ("ipv6: allocate enough headroom in ip6_finish_output2()") Signed-off-by: Eric Dumazet Cc: Vasily Averin Reviewed-by: David Ahern Link: https://patch.msgid.link/20240820160859.3786976-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit faa389b2fbaaec7fd27a390b4896139f9da662e3 Author: Eric Dumazet Date: Tue Aug 20 16:08:57 2024 +0000 ipv6: prevent UAF in ip6_send_skb() syzbot reported an UAF in ip6_send_skb() [1] After ip6_local_out() has returned, we no longer can safely dereference rt, unless we hold rcu_read_lock(). A similar issue has been fixed in commit a688caa34beb ("ipv6: take rcu lock in rawv6_send_hdrinc()") Another potential issue in ip6_finish_output2() is handled in a separate patch. [1] BUG: KASAN: slab-use-after-free in ip6_send_skb+0x18d/0x230 net/ipv6/ip6_output.c:1964 Read of size 8 at addr ffff88806dde4858 by task syz.1.380/6530 CPU: 1 UID: 0 PID: 6530 Comm: syz.1.380 Not tainted 6.11.0-rc3-syzkaller-00306-gdf6cbc62cc9b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ip6_send_skb+0x18d/0x230 net/ipv6/ip6_output.c:1964 rawv6_push_pending_frames+0x75c/0x9e0 net/ipv6/raw.c:588 rawv6_sendmsg+0x19c7/0x23c0 net/ipv6/raw.c:926 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 sock_write_iter+0x2dd/0x400 net/socket.c:1160 do_iter_readv_writev+0x60a/0x890 vfs_writev+0x37c/0xbb0 fs/read_write.c:971 do_writev+0x1b1/0x350 fs/read_write.c:1018 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:0x7f936bf79e79 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:00007f936cd7f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f936c115f80 RCX: 00007f936bf79e79 RDX: 0000000000000001 RSI: 0000000020000040 RDI: 0000000000000004 RBP: 00007f936bfe7916 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f936c115f80 R15: 00007fff2860a7a8 Allocated by task 6530: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3988 [inline] slab_alloc_node mm/slub.c:4037 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4044 dst_alloc+0x12b/0x190 net/core/dst.c:89 ip6_blackhole_route+0x59/0x340 net/ipv6/route.c:2670 make_blackhole net/xfrm/xfrm_policy.c:3120 [inline] xfrm_lookup_route+0xd1/0x1c0 net/xfrm/xfrm_policy.c:3313 ip6_dst_lookup_flow+0x13e/0x180 net/ipv6/ip6_output.c:1257 rawv6_sendmsg+0x1283/0x23c0 net/ipv6/raw.c:898 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680 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 45: 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:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2252 [inline] slab_free mm/slub.c:4473 [inline] kmem_cache_free+0x145/0x350 mm/slub.c:4548 dst_destroy+0x2ac/0x460 net/core/dst.c:124 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2843 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3106 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3210 refdst_drop include/net/dst.h:263 [inline] skb_dst_drop include/net/dst.h:275 [inline] nf_ct_frag6_queue net/ipv6/netfilter/nf_conntrack_reasm.c:306 [inline] nf_ct_frag6_gather+0xb9a/0x2080 net/ipv6/netfilter/nf_conntrack_reasm.c:485 ipv6_defrag+0x2c8/0x3c0 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:67 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc3/0x220 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] __ip6_local_out+0x6fa/0x800 net/ipv6/output_core.c:143 ip6_local_out+0x26/0x70 net/ipv6/output_core.c:153 ip6_send_skb+0x112/0x230 net/ipv6/ip6_output.c:1959 rawv6_push_pending_frames+0x75c/0x9e0 net/ipv6/raw.c:588 rawv6_sendmsg+0x19c7/0x23c0 net/ipv6/raw.c:926 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 sock_write_iter+0x2dd/0x400 net/socket.c:1160 do_iter_readv_writev+0x60a/0x890 Fixes: 0625491493d9 ("ipv6: ip6_push_pending_frames() should increment IPSTATS_MIB_OUTDISCARDS") Signed-off-by: Eric Dumazet Reported-by: syzbot Reviewed-by: David Ahern Link: https://patch.msgid.link/20240820160859.3786976-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit 007d4271a5f10638cba6f0b99698557ef30014b9 Author: Eric Dumazet Date: Tue Aug 20 16:20:53 2024 +0000 netpoll: do not export netpoll_poll_[disable|enable]() netpoll_poll_disable() and netpoll_poll_enable() are only used from core networking code, there is no need to export them. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240820162053.3870927-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit f8669d7b5f5d2d88959456ae9123d8bb6fdc1ebe Author: Ido Schimmel Date: Tue Aug 20 12:53:47 2024 +0200 selftests: mlxsw: ethtool_lanes: Source ethtool lib from correct path Source the ethtool library from the correct path and avoid the following error: ./ethtool_lanes.sh: line 14: ./../../../net/forwarding/ethtool_lib.sh: No such file or directory Fixes: 40d269c000bd ("selftests: forwarding: Move several selftests") Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Simon Horman Link: https://patch.msgid.link/2112faff02e536e1ac14beb4c2be09c9574b90ae.1724150067.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit b128ed5ab27330deeeaf51ea8bb69f1442a96f7f Author: Felix Fietkau Date: Mon Aug 19 17:06:21 2024 +0200 udp: fix receiving fraglist GSO packets When assembling fraglist GSO packets, udp4_gro_complete does not set skb->csum_start, which makes the extra validation in __udp_gso_segment fail. Fixes: 89add40066f9 ("net: drop bad gso csum_start and offset in virtio_net_hdr") Signed-off-by: Felix Fietkau Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240819150621.59833-1-nbd@nbd.name Signed-off-by: Jakub Kicinski commit 872cf28b8df9c5c3a1e71a88ee750df7c2513971 Merge: 5c6154ffd40c5 46ee21e9f5920 Author: Linus Torvalds Date: Thu Aug 22 06:34:27 2024 +0800 Merge tag 'platform-drivers-x86-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - ISST: Fix an error-handling corner case - platform/surface: aggregator: Minor corner case fix and new HW support * tag 'platform-drivers-x86-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: ISST: Fix return value on last invalid resource platform/surface: aggregator: Fix warning when controller is destroyed in probe platform/surface: aggregator_registry: Add support for Surface Laptop 6 platform/surface: aggregator_registry: Add fan and thermal sensor support for Surface Laptop 5 platform/surface: aggregator_registry: Add support for Surface Laptop Studio 2 platform/surface: aggregator_registry: Add support for Surface Laptop Go 3 platform/surface: aggregator_registry: Add Support for Surface Pro 10 platform/x86: asus-wmi: Add quirk for ROG Ally X commit 5c6154ffd40c5bca1eb01f9bf5a4d2b6d18d55bd Merge: b311c1b497e51 0005e01e1e875 Author: Linus Torvalds Date: Thu Aug 22 06:06:09 2024 +0800 Merge tag 'erofs-for-6.11-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "As I mentioned in the merge window pull request, there is a regression which could cause system hang due to page migration. The corresponding fix landed upstream through MM tree last week (commit 2e6506e1c4ee: "mm/migrate: fix deadlock in migrate_pages_batch() on large folios"), therefore large folios can be safely allowed for compressed inodes and stress tests have been running on my fleet for over 20 days without any regression. Users have explicitly requested this for months, so let's allow large folios for EROFS full cases now for wider testing. Additionally, there is a fix which addresses invalid memory accesses on a failure path triggered by fault injection and two minor cleanups to simplify the codebase. Summary: - Allow large folios on compressed inodes - Fix invalid memory accesses if z_erofs_gbuf_growsize() partially fails - Two minor cleanups" * tag 'erofs-for-6.11-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails erofs: allow large folios for compressed files erofs: get rid of check_layout_compatibility() erofs: simplify readdir operation commit db1ec60fba4a995975dc1dc837b408db0d666801 Author: Manivannan Sadhasivam Date: Mon Jul 22 18:41:28 2024 +0530 PCI: qcom: Use OPP only if the platform supports it With commit 5b6272e0efd5 ("PCI: qcom: Add OPP support to scale performance"), OPP was used to control the interconnect and power domains if the platform supported OPP. Also to maintain the backward compatibility with platforms not supporting OPP but just ICC, the above mentioned commit assumed that if ICC was not available on the platform, it would resort to OPP. Unfortunately, some old platforms don't support either ICC or OPP. On those platforms, resorting to OPP in the absence of ICC throws below errors from OPP core during suspend and resume: qcom-pcie 1c08000.pcie: dev_pm_opp_set_opp: device opp doesn't exist qcom-pcie 1c08000.pcie: _find_key: OPP table not found (-19) Also, it doesn't make sense to invoke the OPP APIs when OPP is not supported by the platform at all. Add a "use_pm_opp" flag to identify whether OPP is supported and use it to control invoking the OPP APIs. Fixes: 5b6272e0efd5 ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240722131128.32470-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Mayank Rana commit 5d6a6c7454ebaefba518e334750b05700131923b Author: Manivannan Sadhasivam Date: Thu Aug 8 12:00:57 2024 +0530 PCI: qcom-ep: Disable MHI RAM data parity error interrupt for SA8775P SoC SA8775P SoC has support for the hardware parity check feature on the MHI RAM (entity that holds MHI registers, etc.) But due to a hardware bug in the parity check logic, the data parity error interrupt is getting generated all the time when using MHI. So the hardware team has suggested disabling the parity check error to work around the hardware bug. Mask the parity error interrupt in PARF_INT_ALL_5_MASK register. Fixes: 58d0d3e032b3 ("PCI: qcom-ep: Add support for SA8775P SOC") Link: https://lore.kernel.org/linux-pci/20240808063057.7394-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 232590ea7fc125986a526e03081b98e5783f70d2 Author: Christian Brauner Date: Mon Aug 19 10:38:23 2024 +0200 Revert "pidfd: prevent creation of pidfds for kthreads" This reverts commit 3b5bbe798b2451820e74243b738268f51901e7d0. Eric reported that systemd-shutdown gets broken by blocking the creating of pidfds for kthreads as older versions seems to rely on being able to create a pidfd for any process in /proc. Reported-by: Eric Biggers Link: https://lore.kernel.org/r/20240818035818.GA1929@sol.localdomain Signed-off-by: Christian Brauner commit 524b2c6dc80d735be9ebcd2decffe2889baab65d Author: Christian Brauner Date: Thu Aug 15 14:39:33 2024 +0200 romfs: fix romfs_read_folio() Add the correct offset to folio_zero_tail(). Fixes: d86f2de026c5 ("romfs: Convert romfs_read_folio() to use a folio") Reported-by: Greg Ungerer Link: https://lore.kernel.org/r/Zr0GTnPHfeA0P8nb@casper.infradead.org Signed-off-by: Christian Brauner commit 92764e8822d4e7f8efb5ad959fac195a7f8ea0c6 Author: David Howells Date: Wed Aug 14 21:38:21 2024 +0100 netfs, ceph: Partially revert "netfs: Replace PG_fscache by setting folio->private and marking dirty" This partially reverts commit 2ff1e97587f4d398686f52c07afde3faf3da4e5c. In addition to reverting the removal of PG_private_2 wrangling from the buffered read code[1][2], the removal of the waits for PG_private_2 from netfs_release_folio() and netfs_invalidate_folio() need reverting too. It also adds a wait into ceph_evict_inode() to wait for netfs read and copy-to-cache ops to complete. Fixes: 2ff1e97587f4 ("netfs: Replace PG_fscache by setting folio->private and marking dirty") Signed-off-by: David Howells Link: https://lore.kernel.org/r/3575457.1722355300@warthog.procyon.org.uk [1] Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e5ced7804cb9184c4a23f8054551240562a8eda [2] Link: https://lore.kernel.org/r/20240814203850.2240469-2-dhowells@redhat.com cc: Max Kellermann cc: Ilya Dryomov cc: Xiubo Li cc: Jeff Layton cc: Matthew Wilcox cc: ceph-devel@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Christian Brauner commit bc754cc76d1bbc87be5d8b7eee05ceb0ae613bce Author: Masami Hiramatsu (Google) Date: Tue Aug 20 09:56:38 2024 +0900 tracing: Fix memory leak in fgraph storage selftest With ftrace boot-time selftest, kmemleak reported some memory leaks in the new test case for function graph storage for multiple tracers. unreferenced object 0xffff888005060080 (size 32): comm "swapper/0", pid 1, jiffies 4294676440 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 20 10 06 05 80 88 ff ff ........ ....... 54 0c 1e 81 ff ff ff ff 00 00 00 00 00 00 00 00 T............... backtrace (crc 7c93416c): [<000000000238ee6f>] __kmalloc_cache_noprof+0x11f/0x2a0 [<0000000033d2b6c5>] enter_record+0xe8/0x150 [<0000000054c38424>] match_records+0x1cd/0x230 [<00000000c775b63d>] ftrace_set_hash+0xff/0x380 [<000000007bf7208c>] ftrace_set_filter+0x70/0x90 [<00000000a5c08dda>] test_graph_storage_multi+0x2e/0xf0 [<000000006ba028ca>] trace_selftest_startup_function_graph+0x1e8/0x260 [<00000000a715d3eb>] run_tracer_selftest+0x111/0x190 [<00000000395cbf90>] register_tracer+0xdf/0x1f0 [<0000000093e67f7b>] do_one_initcall+0x141/0x3b0 [<00000000c591b682>] do_initcall_level+0x82/0xa0 [<000000004e4c6600>] do_initcalls+0x43/0x70 [<0000000034f3c4e4>] kernel_init_freeable+0x170/0x1f0 [<00000000c7a5dab2>] kernel_init+0x1a/0x1a0 [<00000000ea105947>] ret_from_fork+0x3a/0x50 [<00000000a1932e84>] ret_from_fork_asm+0x1a/0x30 ... This means filter hash allocated for the fixtures are not correctly released after the test. Free those hash lists after tests are done and split the loop for initialize fixture and register fixture for rollback. Fixes: dd120af2d5f8 ("ftrace: Add multiple fgraph storage selftest") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/172411539857.28895.13119957560263401102.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 57df60e1f981fa8c288a49012a4bbb02ae0ecdbc Author: Yang Ruibin <11162571@vivo.com> Date: Wed Aug 21 03:59:33 2024 -0400 thermal/debugfs: Fix the NULL vs IS_ERR() confusion in debugfs_create_dir() The debugfs_create_dir() return value is never NULL, it is either a valid pointer or an error one. Use IS_ERR() to check it. Fixes: 7ef01f228c9f ("thermal/debugfs: Add thermal debugfs information for mitigation episodes") Fixes: 755113d76786 ("thermal/debugfs: Add thermal cooling device debugfs information") Signed-off-by: Yang Ruibin <11162571@vivo.com> Link: https://patch.msgid.link/20240821075934.12145-1-11162571@vivo.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit a069a22f391019e84390f4e8c1a9c531ba4fb28f Author: Masami Hiramatsu (Google) Date: Sun Aug 18 21:48:03 2024 +0900 tracing: fgraph: Fix to add new fgraph_ops to array after ftrace_startup_subops() Since the register_ftrace_graph() assigns a new fgraph_ops to fgraph_array before registring it by ftrace_startup_subops(), the new fgraph_ops can be used in function_graph_enter(). In most cases, it is still OK because those fgraph_ops's hashtable is already initialized by ftrace_set_filter*() etc. But if a user registers a new fgraph_ops which does not initialize the hash list, ftrace_ops_test() in function_graph_enter() causes a NULL pointer dereference BUG because fgraph_ops->ops.func_hash is NULL. This can be reproduced by the below commands because function profiler's fgraph_ops does not initialize the hash list; # cd /sys/kernel/tracing # echo function_graph > current_tracer # echo 1 > function_profile_enabled To fix this problem, add a new fgraph_ops to fgraph_array after ftrace_startup_subops(). Thus, until the new fgraph_ops is initialized, we will see fgraph_stub on the corresponding fgraph_array entry. Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Link: https://lore.kernel.org/172398528350.293426.8347220120333730248.stgit@devnote2 Fixes: c132be2c4fcc ("function_graph: Have the instances use their own ftrace_ops for filtering") Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 9e7f30563677fbeff62d368d5d2a5ac7aaa9746a Author: Matthew Brost Date: Tue Aug 20 13:23:09 2024 -0700 drm/xe: Free job before xe_exec_queue_put Free job depends on job->vm being valid, the last xe_exec_queue_put can destroy the VM. Prevent UAF by freeing job before xe_exec_queue_put. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Nirmoy Das Reviewed-by: Jagmeet Randhawa Link: https://patchwork.freedesktop.org/patch/msgid/20240820202309.1260755-1-matthew.brost@intel.com (cherry picked from commit 32a42c93b74c8ca6d0915ea3eba21bceff53042f) Signed-off-by: Rodrigo Vivi commit dd3e840a33b57b92812fbec26273b3f0b4eb5ae3 Author: Matthew Brost Date: Thu Aug 15 12:35:22 2024 -0700 drm/xe: Drop HW fence pointer to HW fence ctx The HW fence ctx objects are not ref counted rather tied to the life of an LRC object. HW fences reference the HW fence ctx, HW fences can outlive LRCs thus resulting in UAF. Drop the HW fence pointer to HW fence ctx rather just store what is needed directly in HW fence. v2: - Fix typo in commit (Ashutosh) - Use snprintf (Ashutosh) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240815193522.16008-1-matthew.brost@intel.com (cherry picked from commit 60db6f540af9f93144d5039140aa2ed17171d168) Signed-off-by: Rodrigo Vivi commit a6f78359ac75f24cac3c1bdd753c49c1877bcd82 Author: Stuart Summers Date: Sat Aug 17 02:47:30 2024 +0000 drm/xe: Fix missing workqueue destroy in xe_gt_pagefault On driver reload we never free up the memory for the pagefault and access counter workqueues. Add those destroy calls here. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Stuart Summers Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/c9a951505271dc3a7aee76de7656679f69c11518.1723862633.git.stuart.summers@intel.com (cherry picked from commit 7586fc52b14e0b8edd0d1f8a434e0de2078b7b2b) Signed-off-by: Rodrigo Vivi commit 5f7c98b7519a3a847d9182bd99d57ea250032ca1 Author: Hongbo Li Date: Wed Aug 21 14:19:55 2024 +0800 ASoC: allow module autoloading for table board_ids Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table. Signed-off-by: Hongbo Li Link: https://patch.msgid.link/20240821061955.2273782-3-lihongbo22@huawei.com Signed-off-by: Mark Brown commit 0e9fdab1e8df490354562187cdbb8dec643eae2c Author: Hongbo Li Date: Wed Aug 21 14:19:54 2024 +0800 ASoC: allow module autoloading for table db1200_pids Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table. Signed-off-by: Hongbo Li Link: https://patch.msgid.link/20240821061955.2273782-2-lihongbo22@huawei.com Signed-off-by: Mark Brown commit c158ceb826068a8bbe3c9e78df420f47ba53c8a8 Author: Bjorn Andersson Date: Tue Aug 20 15:59:34 2024 -0700 soc: qcom: pd-mapper: Fix singleton refcount The Qualcomm pd-mapper is a refcounted singleton, but the refcount is never incremented, which means the as soon as any remoteproc instance stops the count will hit 0. At this point the pd-mapper QMI service is stopped, leaving firmware without access to the PD information. Stopping any other remoteproc instances will result in a use-after-free, which best case manifest itself as a refcount underflow: refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 354 at lib/refcount.c:87 refcount_dec_and_mutex_lock+0xc4/0x148 ... Call trace: refcount_dec_and_mutex_lock+0xc4/0x148 qcom_pdm_remove+0x40/0x118 [qcom_pd_mapper] ... Fix this by incrementing the refcount, so that the pd-mapper is only torn down when the last remoteproc stops, as intended. Fixes: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation") Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240820-pd-mapper-refcount-fix-v1-1-03ea65c0309b@quicinc.com Signed-off-by: Bjorn Andersson commit b4f5bd60d558f6ba451d7e76aa05782c07a182a3 Author: Harald Freudenberger Date: Tue Aug 6 12:06:23 2024 +0200 s390/ap: Refine AP bus bindings complete processing With the rework of the AP bus scan and the introduction of a bindings complete completion also the timing until the userspace finally receives a AP bus binding complete uevent had increased. Unfortunately this event triggers some important jobs for preparation of KVM guests, for example the modification of card/queue masks to reassign AP resources to the alternate AP queue device driver (vfio_ap) which is the precondition for building mediated devices which may be a precondition for starting KVM guests using AP resources. This small fix now triggers the check for binding complete each time an AP device driver has registered. With this patch the bindings complete may be posted up to 30s earlier as there is no need to wait for the next AP bus scan any more. Fixes: 778412ab915d ("s390/ap: rearm APQNs bindings complete completion") Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Cc: stable@vger.kernel.org Acked-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 32db401965f165f7c44447d0508097f070c8f576 Author: Alexander Gordeev Date: Fri Aug 9 08:47:16 2024 +0200 s390/mm: Pin identity mapping base to zero SIE instruction performs faster when the virtual address of SIE block matches the physical one. Pin the identity mapping base to zero for the benefit of SIE and other instructions that have similar performance impact. Still, randomize the base when DEBUG_VM kernel configuration option is enabled. Suggested-by: Vasily Gorbik Reviewed-by: Christian Borntraeger Signed-off-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit a3ca27c405faad584af6e8e38cdafe5be73230a1 Author: Alexander Gordeev Date: Fri Aug 9 08:47:15 2024 +0200 s390/mm: Prevent lowcore vs identity mapping overlap The identity mapping position in virtual memory is randomized together with the kernel mapping. That position can never overlap with the lowcore even when the lowcore is relocated. Prevent overlapping with the lowcore to allow independent positioning of the identity mapping. With the current value of the alternative lowcore address of 0x70000 the overlap could happen in case the identity mapping is placed at zero. This is a prerequisite for uncoupling of randomization base of kernel image and identity mapping in virtual memory. Acked-by: Vasily Gorbik Signed-off-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 8342009efa2a5e75dce56173d7de026bcc6666d8 Author: Richard Acayan Date: Mon Jul 29 21:38:35 2024 -0400 firmware: qcom: tzmem: disable sdm670 platform The Pixel 3a returns 4291821499 (-3145797 or 0xFFCFFFBB) when attempting to load the GPU firmware if tzmem is allowed. Disable it on SDM670 so the GPU can successfully probe. Signed-off-by: Richard Acayan Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240730013834.41840-2-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit ad51126037a43c05f5f4af5eb262734e3e88ca59 Author: Bjorn Andersson Date: Tue Aug 20 13:29:32 2024 -0700 soc: qcom: pmic_glink: Actually communicate when remote goes down When the pmic_glink state is UP and we either receive a protection- domain (PD) notification indicating that the PD is going down, or that the whole remoteproc is going down, it's expected that the pmic_glink client instances are notified that their function has gone DOWN. This is not what the code does, which results in the client state either not updating, or being wrong in many cases. So let's fix the conditions. Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Tested-by: Amit Pundir Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240820-pmic-glink-v6-11-races-v3-3-eec53c750a04@quicinc.com Signed-off-by: Bjorn Andersson commit 11bb2ffb679399f99041540cf662409905179e3a Author: Bjorn Andersson Date: Tue Aug 20 13:29:31 2024 -0700 usb: typec: ucsi: Move unregister out of atomic section Commit '9329933699b3 ("soc: qcom: pmic_glink: Make client-lock non-sleeping")' moved the pmic_glink client list under a spinlock, as it is accessed by the rpmsg/glink callback, which in turn is invoked from IRQ context. This means that ucsi_unregister() is now called from atomic context, which isn't feasible as it's expecting a sleepable context. An effort is under way to get GLINK to invoke its callbacks in a sleepable context, but until then lets schedule the unregistration. A side effect of this is that ucsi_unregister() can now happen after the remote processor, and thereby the communication link with it, is gone. pmic_glink_send() is amended with a check to avoid the resulting NULL pointer dereference. This does however result in the user being informed about this error by the following entry in the kernel log: ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: failed to send UCSI write request: -5 Fixes: 9329933699b3 ("soc: qcom: pmic_glink: Make client-lock non-sleeping") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Tested-by: Amit Pundir Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240820-pmic-glink-v6-11-races-v3-2-eec53c750a04@quicinc.com Signed-off-by: Bjorn Andersson commit 3568affcddd68743e25aa3ec1647d9b82797757b Author: Bjorn Andersson Date: Tue Aug 20 13:29:30 2024 -0700 soc: qcom: pmic_glink: Fix race during initialization As pointed out by Stephen Boyd it is possible that during initialization of the pmic_glink child drivers, the protection-domain notifiers fires, and the associated work is scheduled, before the client registration returns and as a result the local "client" pointer has been initialized. The outcome of this is a NULL pointer dereference as the "client" pointer is blindly dereferenced. Timeline provided by Stephen: CPU0 CPU1 ---- ---- ucsi->client = NULL; devm_pmic_glink_register_client() client->pdr_notify(client->priv, pg->client_state) pmic_glink_ucsi_pdr_notify() schedule_work(&ucsi->register_work) pmic_glink_ucsi_register() ucsi_register() pmic_glink_ucsi_read_version() pmic_glink_ucsi_read() pmic_glink_ucsi_read() pmic_glink_send(ucsi->client) ucsi->client = client // Too late! This code is identical across the altmode, battery manager and usci child drivers. Resolve this by splitting the allocation of the "client" object and the registration thereof into two operations. This only happens if the protection domain registry is populated at the time of registration, which by the introduction of commit '1ebcde047c54 ("soc: qcom: add pd-mapper implementation")' became much more likely. Reported-by: Amit Pundir Closes: https://lore.kernel.org/all/CAMi1Hd2_a7TjA7J9ShrAbNOd_CoZ3D87twmO5t+nZxC9sX18tA@mail.gmail.com/ Reported-by: Johan Hovold Closes: https://lore.kernel.org/all/ZqiyLvP0gkBnuekL@hovoldconsulting.com/ Reported-by: Stephen Boyd Closes: https://lore.kernel.org/all/CAE-0n52JgfCBWiFQyQWPji8cq_rCsviBpW-m72YitgNfdaEhQg@mail.gmail.com/ Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Reviewed-by: Neil Armstrong Tested-by: Amit Pundir Reviewed-by: Johan Hovold Acked-by: Sebastian Reichel Tested-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240820-pmic-glink-v6-11-races-v3-1-eec53c750a04@quicinc.com Signed-off-by: Bjorn Andersson commit 91191a6e50a2ff752da244493171037663536768 Author: Simon Trimmer Date: Wed Aug 21 12:47:11 2024 +0000 ALSA: hda: cs35l56: Don't use the device index as a calibration index The HDA driver cannot assume that the order that the devices are specified in the cirrus,dev-index matches the order of calibration entries. Only a calibration entry with a matching silicon id will be used. Fixes: cfa43aaa7948 ("ALSA: hda: cs35l56: Apply amp calibration from EFI data") Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/20240821124711.44325-1-simont@opensource.cirrus.com Signed-off-by: Takashi Iwai commit e0ee967630c8ee67bb47a5b38d235cd5a8789c48 Author: Jens Axboe Date: Tue Aug 20 18:31:58 2024 -0600 io_uring/kbuf: sanitize peek buffer setup Harden the buffer peeking a bit, by adding a sanity check for it having a valid size. Outside of that, arg->max_len is a size_t, though it's only ever set to a 32-bit value (as it's governed by MAX_RW_COUNT). Bump our needed check to a size_t so we know it fits. Finally, cap the calculated needed iov value to the PEEK_MAX_IMPORT, which is the maximum number of segments that should be peeked. Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers") Signed-off-by: Jens Axboe commit 0ff8f3f0979559b0d7494d580f2597beab3f159b Author: Michael Vetter Date: Mon Aug 19 22:57:31 2024 +0200 rust: kernel: fix typos in code comments Fix spelling mistakes in code comments. Signed-off-by: Michael Vetter Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20240819205731.2163-1-jubalh@iodoru.org [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 5d88f98b2e73b2928cab7f8bd3d67777cb9ea1e7 Author: Vincent Woltmann Date: Fri Aug 16 20:01:42 2024 +0000 docs: rust: remove unintended blockquote in Coding Guidelines An unordered list in coding-guidelines.rst was indented, producing a blockquote around it and making it look more indented than expected. Remove the indentation to only output an unordered list. Reported-by: Miguel Ojeda Closes: https://github.com/Rust-for-Linux/linux/issues/1063 Fixes: d07479b211b7 ("docs: add Rust documentation") Signed-off-by: Vincent Woltmann Link: https://lore.kernel.org/r/20240816200339.2495875-1-vincent@woltmann.art [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda commit fd764e74e5b75512be1b55ec9680a6c35885cc63 Author: Andreas Hindborg Date: Thu Aug 15 07:49:43 2024 +0000 rust: block: fix wrong usage of lockdep API When allocating `struct gendisk`, `GenDiskBuilder` is using a dynamic lock class key without registering the key. This is an incorrect use of the API, which causes a `WARN` trace. Fix the issue by using a static lock class key, which is more appropriate for the situation anyway. Fixes: 3253aba3408a ("rust: block: introduce `kernel::block::mq` module") Reported-by: Behme Dirk (XC-CP/ESB5) Closes: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/457090036 Signed-off-by: Andreas Hindborg Reviewed-by: Benno Lossin Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Tested-by: Dirk Behme Link: https://lore.kernel.org/r/20240815074519.2684107-3-nmi@metaspace.dk [ Applied `rustfmt`, reworded slightly and made Zulip link a permalink. - Miguel ] Signed-off-by: Miguel Ojeda commit d4bc0a264fb482b019c84fbc7202dd3cab059087 Author: Michael Ellerman Date: Tue Aug 20 13:04:07 2024 +1000 ata: pata_macio: Use WARN instead of BUG The overflow/underflow conditions in pata_macio_qc_prep() should never happen. But if they do there's no need to kill the system entirely, a WARN and failing the IO request should be sufficient and might allow the system to keep running. Signed-off-by: Michael Ellerman Signed-off-by: Damien Le Moal commit 822c8020aebcf5804a143b891e34f29873fee5e2 Author: Michael Ellerman Date: Tue Aug 20 13:03:58 2024 +1000 ata: pata_macio: Fix DMA table overflow Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K"). For example: kernel BUG at drivers/ata/pata_macio.c:544! Oops: Exception in kernel mode, sig: 5 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 DEBUG_PAGEALLOC PowerMac ... NIP pata_macio_qc_prep+0xf4/0x190 LR pata_macio_qc_prep+0xfc/0x190 Call Trace: 0xc1421660 (unreliable) ata_qc_issue+0x14c/0x2d4 __ata_scsi_queuecmd+0x200/0x53c ata_scsi_queuecmd+0x50/0xe0 scsi_queue_rq+0x788/0xb1c __blk_mq_issue_directly+0x58/0xf4 blk_mq_plug_issue_direct+0x8c/0x1b4 blk_mq_flush_plug_list.part.0+0x584/0x5e0 __blk_flush_plug+0xf8/0x194 __submit_bio+0x1b8/0x2e0 submit_bio_noacct_nocheck+0x230/0x304 btrfs_work_helper+0x200/0x338 process_one_work+0x1a8/0x338 worker_thread+0x364/0x4c0 kthread+0x100/0x104 start_kernel_thread+0x10/0x14 That commit increased max_segment_size to 64KB, with the justification that the SCSI core was already using that size when PAGE_SIZE == 64KB, and that there was existing logic to split over-sized requests. However with a sufficiently large request, the splitting logic causes each sg to be split into two commands in the DMA table, leading to overflow of the DMA table, triggering the BUG_ON(). With default settings the bug doesn't trigger, because the request size is limited by max_sectors_kb == 1280, however max_sectors_kb can be increased, and apparently some distros do that by default using udev rules. Fix the bug for 4KB kernels by reverting to the old max_segment_size. For 64KB kernels the sg_tablesize needs to be halved, to allow for the possibility that each sg will be split into two. Fixes: 09fe2bfa6b83 ("ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K") Cc: stable@vger.kernel.org # v6.10+ Reported-by: Kolbjørn Barmen Closes: https://lore.kernel.org/all/62d248bb-e97a-25d2-bcf2-9160c518cae5@kolla.no/ Reported-by: Jonáš Vidra Closes: https://lore.kernel.org/all/3b6441b8-06e6-45da-9e55-f92f2c86933e@ufal.mff.cuni.cz/ Tested-by: Kolbjørn Barmen Signed-off-by: Michael Ellerman Signed-off-by: Damien Le Moal commit 9cead81eff635e3b3cbce51b40228f3bdc6f2b8c Author: Alex Deucher Date: Mon Aug 19 11:14:29 2024 -0400 drm/amdgpu: fix eGPU hotplug regression The driver needs to wait for the on board firmware to finish its initialization before probing the card. Commit 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan") switched from using msleep() to using usleep_range() which seems to have caused init failures on some navi1x boards. Switch back to msleep(). Fixes: 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3559 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3500 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: Ma Jun (cherry picked from commit c69b07f7bbc905022491c45097923d3487479529) Cc: stable@vger.kernel.org # 6.10.x commit c99769bceab4ecb6a067b9af11f9db281eea3e2a Author: Candice Li Date: Thu Aug 15 11:37:28 2024 +0800 drm/amdgpu: Validate TA binary size Add TA binary size validation to avoid OOB write. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit c0a04e3570d72aaf090962156ad085e37c62e442) Cc: stable@vger.kernel.org commit e3e4bf58bad1576ac732a1429f53e3d4bfb82b4b Author: Alex Deucher Date: Wed Aug 14 10:28:24 2024 -0400 drm/amdgpu/sdma5.2: limit wptr workaround to sdma 5.2.1 The workaround seems to cause stability issues on other SDMA 5.2.x IPs. Fixes: a03ebf116303 ("drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3556 Acked-by: Ruijing Dong Signed-off-by: Alex Deucher (cherry picked from commit 2dc3851ef7d9c5439ea8e9623fc36878f3b40649) Cc: stable@vger.kernel.org commit 0b43312902d165c4c8429cd49e8c91479f52b7c4 Author: Yang Wang Date: Tue Aug 13 13:51:48 2024 +0800 drm/amdgpu: fixing rlc firmware loading failure issue Skip rlc firmware validation to ignore firmware header size mismatch issues. This restores the workaround added in commit 849e133c973c ("drm/amdgpu: Fix the null pointer when load rlc firmware") Fixes: 3af2c80ae2f5 ("drm/amdgpu: refine gfx10 firmware loading") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3551 Signed-off-by: Yang Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 89ec85d16eb8110d88c273d1d34f1fe5a70ba8cc) commit b311c1b497e51a628aa89e7cb954481e5f9dced2 Merge: 0108b7be2a18d 7c525dddbee71 Author: Linus Torvalds Date: Tue Aug 20 19:03:07 2024 -0700 Merge tag '6.11-rc4-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - important reconnect fix - fix for memcpy issues on mount - two minor cleanup patches * tag '6.11-rc4-server-fixes' of git://git.samba.org/ksmbd: ksmbd: Replace one-element arrays with flexible-array members ksmbd: fix spelling mistakes in documentation ksmbd: fix race condition between destroy_previous_session() and smb2 operations() ksmbd: Use unsafe_memcpy() for ntlm_negotiate commit 0d76fc7e27b2097e18ee128e484d107ed6d45e88 Merge: c07ff8592d57e 48e50dcbcbaaf Author: Jakub Kicinski Date: Tue Aug 20 17:40:15 2024 -0700 Merge branch 'mptcp-pm-fix-ids-not-being-reusable' Matthieu Baerts says: ==================== mptcp: pm: fix IDs not being reusable Here are more fixes for the MPTCP in-kernel path-manager. In this series, the fixes are around the endpoint IDs not being reusable for on-going connections when re-creating endpoints with previously used IDs. - Patch 1 fixes this case for endpoints being used to send ADD_ADDR. Patch 2 validates this fix. The issue is present since v5.10. - Patch 3 fixes this case for endpoints being used to establish new subflows. Patch 4 validates this fix. The issue is present since v5.10. - Patch 5 fixes this case when all endpoints are flushed. Patch 6 validates this fix. The issue is present since v5.13. - Patch 7 removes a helper that is confusing, and introduced in v5.10. It helps simplifying the next patches. - Patch 8 makes sure a 'subflow' counter is only decremented when removing a 'subflow' endpoint. Can be backported up to v5.13. - Patch 9 is similar, but for a 'signal' counter. Can be backported up to v5.10. - Patch 10 checks the last max accepted ADD_ADDR limit before accepting new ADD_ADDR. For v5.10 as well. - Patch 11 removes a wrong restriction for the userspace PM, added during a refactoring in v6.5. - Patch 12 makes sure the fullmesh mode sets the ID 0 when a new subflow using the source address of the initial subflow is created. Patch 13 covers this case. This issue is present since v5.15. - Patch 14 avoid possible UaF when selecting an address from the endpoints list. ==================== Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-0-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 48e50dcbcbaaf713d82bf2da5c16aeced94ad07d Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:32 2024 +0200 mptcp: pm: avoid possible UaF when selecting endp select_local_address() and select_signal_address() both select an endpoint entry from the list inside an RCU protected section, but return a reference to it, to be read later on. If the entry is dereferenced after the RCU unlock, reading info could cause a Use-after-Free. A simple solution is to copy the required info while inside the RCU protected section to avoid any risk of UaF later. The address ID might need to be modified later to handle the ID0 case later, so a copy seems OK to deal with. Reported-by: Paolo Abeni Closes: https://lore.kernel.org/45cd30d3-7710-491c-ae4d-a1368c00beb1@redhat.com Fixes: 01cacb00b35c ("mptcp: add netlink-based PM") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-14-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 4878f9f8421f4587bee7b232c1c8a9d3a7d4d782 Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:31 2024 +0200 selftests: mptcp: join: validate fullmesh endp on 1st sf This case was not covered, and the wrong ID was set before the previous commit. The rest is not modified, it is just that it will increase the code coverage. The right address ID can be verified by looking at the packet traces. We could automate that using Netfilter with some cBPF code for example, but that's always a bit cryptic. Packetdrill seems better fitted for that. Fixes: 4f49d63352da ("selftests: mptcp: add fullmesh testcases") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-13-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 09355f7abb9fbfc1a240be029837921ea417bf4f Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:30 2024 +0200 mptcp: pm: fullmesh: select the right ID later When reacting upon the reception of an ADD_ADDR, the in-kernel PM first looks for fullmesh endpoints. If there are some, it will pick them, using their entry ID. It should set the ID 0 when using the endpoint corresponding to the initial subflow, it is a special case imposed by the MPTCP specs. Note that msk->mpc_endpoint_id might not be set when receiving the first ADD_ADDR from the server. So better to compare the addresses. Fixes: 1a0d6136c5f0 ("mptcp: local addresses fullmesh") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-12-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit ca6e55a703ca2894611bb5c5bca8bfd2290fd91e Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:29 2024 +0200 mptcp: pm: only in-kernel cannot have entries with ID 0 The ID 0 is specific per MPTCP connections. The per netns entries cannot have this special ID 0 then. But that's different for the userspace PM where the entries are per connection, they can then use this special ID 0. Fixes: f40be0db0b76 ("mptcp: unify pm get_flags_and_ifindex_by_id") Cc: stable@vger.kernel.org Acked-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-11-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 0137a3c7c2ea3f9df8ebfc65d78b4ba712a187bb Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:28 2024 +0200 mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR The limits might have changed in between, it is best to check them before accepting new ADD_ADDR. Fixes: d0876b2284cf ("mptcp: add the incoming RM_ADDR support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-10-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 1c1f721375989579e46741f59523e39ec9b2a9bd Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:27 2024 +0200 mptcp: pm: only decrement add_addr_accepted for MPJ req Adding the following warning ... WARN_ON_ONCE(msk->pm.add_addr_accepted == 0) ... before decrementing the add_addr_accepted counter helped to find a bug when running the "remove single subflow" subtest from the mptcp_join.sh selftest. Removing a 'subflow' endpoint will first trigger a RM_ADDR, then the subflow closure. Before this patch, and upon the reception of the RM_ADDR, the other peer will then try to decrement this add_addr_accepted. That's not correct because the attached subflows have not been created upon the reception of an ADD_ADDR. A way to solve that is to decrement the counter only if the attached subflow was an MP_JOIN to a remote id that was not 0, and initiated by the host receiving the RM_ADDR. Fixes: d0876b2284cf ("mptcp: add the incoming RM_ADDR support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-9-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 322ea3778965da72862cca2a0c50253aacf65fe6 Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:26 2024 +0200 mptcp: pm: only mark 'subflow' endp as available Adding the following warning ... WARN_ON_ONCE(msk->pm.local_addr_used == 0) ... before decrementing the local_addr_used counter helped to find a bug when running the "remove single address" subtest from the mptcp_join.sh selftests. Removing a 'signal' endpoint will trigger the removal of all subflows linked to this endpoint via mptcp_pm_nl_rm_addr_or_subflow() with rm_type == MPTCP_MIB_RMSUBFLOW. This will decrement the local_addr_used counter, which is wrong in this case because this counter is linked to 'subflow' endpoints, and here it is a 'signal' endpoint that is being removed. Now, the counter is decremented, only if the ID is being used outside of mptcp_pm_nl_rm_addr_or_subflow(), only for 'subflow' endpoints, and if the ID is not 0 -- local_addr_used is not taking into account these ones. This marking of the ID as being available, and the decrement is done no matter if a subflow using this ID is currently available, because the subflow could have been closed before. Fixes: 06faa2271034 ("mptcp: remove multi addresses and subflows in PM") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-8-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit f448451aa62d54be16acb0034223c17e0d12bc69 Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:25 2024 +0200 mptcp: pm: remove mptcp_pm_remove_subflow() This helper is confusing. It is in pm.c, but it is specific to the in-kernel PM and it cannot be used by the userspace one. Also, it simply calls one in-kernel specific function with the PM lock, while the similar mptcp_pm_remove_addr() helper requires the PM lock. What's left is the pr_debug(), which is not that useful, because a similar one is present in the only function called by this helper: mptcp_pm_nl_rm_subflow_received() After these modifications, this helper can be marked as 'static', and the lock can be taken only once in mptcp_pm_flush_addrs_and_subflows(). Note that it is not a bug fix, but it will help backporting the following commits. Fixes: 0ee4261a3681 ("mptcp: implement mptcp_pm_remove_subflow") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-7-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit e06959e9eebdfea4654390f53b65cff57691872e Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:24 2024 +0200 selftests: mptcp: join: test for flush/re-add endpoints After having flushed endpoints that didn't cause the creation of new subflows, it is important to check endpoints can be re-created, re-using previously used IDs. Before the previous commit, the client would not have been able to re-create the subflow that was previously rejected. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 06faa2271034 ("mptcp: remove multi addresses and subflows in PM") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-6-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit ef34a6ea0cab1800f4b3c9c3c2cefd5091e03379 Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:23 2024 +0200 mptcp: pm: re-using ID of unused flushed subflows If no subflows are attached to the 'subflow' endpoints that are being flushed, the corresponding addr IDs will not be marked as available again. Mark all ID as being available when flushing all the 'subflow' endpoints, and reset local_addr_used counter to cover these cases. Note that mptcp_pm_remove_addrs_and_subflows() helper is only called for flushing operations, not to remove a specific set of addresses and subflows. Fixes: 06faa2271034 ("mptcp: remove multi addresses and subflows in PM") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-5-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 65fb58afa341ad68e71e5c4d816b407e6a683a66 Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:22 2024 +0200 selftests: mptcp: join: check re-using ID of closed subflow This test extends "delete and re-add" to validate the previous commit. A new 'subflow' endpoint is added, but the subflow request will be rejected. The result is that no subflow will be established from this address. Later, the endpoint is removed and re-added after having cleared the firewall rule. Before the previous commit, the client would not have been able to create this new subflow. While at it, extra checks have been added to validate the expected numbers of MPJ and RM_ADDR. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-4-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit edd8b5d868a4d459f3065493001e293901af758d Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:21 2024 +0200 mptcp: pm: re-using ID of unused removed subflows If no subflow is attached to the 'subflow' endpoint that is being removed, the addr ID will not be marked as available again. Mark the linked ID as available when removing the 'subflow' endpoint if no subflow is attached to it. While at it, the local_addr_used counter is decremented if the ID was marked as being used to reflect the reality, but also to allow adding new endpoints after that. Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-3-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit a13d5aad4dd9a309eecdc33cfd75045bd5f376a3 Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:20 2024 +0200 selftests: mptcp: join: check re-using ID of unused ADD_ADDR This test extends "delete re-add signal" to validate the previous commit. An extra address is announced by the server, but this address cannot be used by the client. The result is that no subflow will be established to this address. Later, the server will delete this extra endpoint, and set a new one, with a valid address, but re-using the same ID. Before the previous commit, the server would not have been able to announce this new address. While at it, extra checks have been added to validate the expected numbers of MPJ, ADD_ADDR and RM_ADDR. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-2-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit e255683c06df572ead96db5efb5d21be30c0efaa Author: Matthieu Baerts (NGI0) Date: Mon Aug 19 21:45:19 2024 +0200 mptcp: pm: re-using ID of unused removed ADD_ADDR If no subflow is attached to the 'signal' endpoint that is being removed, the addr ID will not be marked as available again. Mark the linked ID as available when removing the address entry from the list to cover this case. Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-1-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski commit 0005e01e1e875c5e27130c5e2ed0189749d1e08a Author: Gao Xiang Date: Tue Aug 20 16:56:19 2024 +0800 erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails If z_erofs_gbuf_growsize() partially fails on a global buffer due to memory allocation failure or fault injection (as reported by syzbot [1]), new pages need to be freed by comparing to the existing pages to avoid memory leaks. However, the old gbuf->pages[] array may not be large enough, which can lead to null-ptr-deref or out-of-bound access. Fix this by checking against gbuf->nrpages in advance. [1] https://lore.kernel.org/r/000000000000f7b96e062018c6e3@google.com Reported-by: syzbot+242ee56aaa9585553766@syzkaller.appspotmail.com Fixes: d6db47e571dc ("erofs: do not use pagepool in z_erofs_gbuf_growsize()") Cc: # 6.10+ Reviewed-by: Chunhai Guo Reviewed-by: Sandeep Dhavale Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240820085619.1375963-1-hsiangkao@linux.alibaba.com commit c07ff8592d57ed258afee5a5e04991a48dbaf382 Author: Stephen Hemminger Date: Mon Aug 19 10:56:45 2024 -0700 netem: fix return value if duplicate enqueue fails There is a bug in netem_enqueue() introduced by commit 5845f706388a ("net: netem: fix skb length BUG_ON in __skb_to_sgvec") that can lead to a use-after-free. This commit made netem_enqueue() always return NET_XMIT_SUCCESS when a packet is duplicated, which can cause the parent qdisc's q.qlen to be mistakenly incremented. When this happens qlen_notify() may be skipped on the parent during destruction, leaving a dangling pointer for some classful qdiscs like DRR. There are two ways for the bug happen: - If the duplicated packet is dropped by rootq->enqueue() and then the original packet is also dropped. - If rootq->enqueue() sends the duplicated packet to a different qdisc and the original packet is dropped. In both cases NET_XMIT_SUCCESS is returned even though no packets are enqueued at the netem qdisc. The fix is to defer the enqueue of the duplicate packet until after the original packet has been guaranteed to return NET_XMIT_SUCCESS. Fixes: 5845f706388a ("net: netem: fix skb length BUG_ON in __skb_to_sgvec") Reported-by: Budimir Markovic Signed-off-by: Stephen Hemminger Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240819175753.5151-1-stephen@networkplumber.org Signed-off-by: Jakub Kicinski commit 528876d867a23b5198022baf2e388052ca67c952 Author: Joseph Huang Date: Mon Aug 19 19:52:50 2024 -0400 net: dsa: mv88e6xxx: Fix out-of-bound access If an ATU violation was caused by a CPU Load operation, the SPID could be larger than DSA_MAX_PORTS (the size of mv88e6xxx_chip.ports[] array). Fixes: 75c05a74e745 ("net: dsa: mv88e6xxx: Fix counting of ATU violations") Signed-off-by: Joseph Huang Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240819235251.1331763-1-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit b8673d56935c32a4e0a1a0b40951fdd313dbf340 Author: Andreas Hindborg Date: Thu Aug 15 07:49:30 2024 +0000 rust: kbuild: fix export of bss symbols Symbols in the bss segment are not currently exported. This is a problem for Rust modules that link against statics, that are resident in the kernel image. Thus export symbols in the bss segment. Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") Signed-off-by: Andreas Hindborg Reviewed-by: Alice Ryhl Tested-by: Alice Ryhl Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20240815074519.2684107-2-nmi@metaspace.dk [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda commit 0108b7be2a18d85face1e10c68ecc0138f1bed58 Merge: 521b1e7f4cf0b cf1e515c9a40c Author: Linus Torvalds Date: Tue Aug 20 16:06:39 2024 -0700 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd fixes from Jason Gunthorpe: - Incorrect error unwind in iommufd_device_do_replace() - Correct a sparse warning missing static * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommufd/selftest: Make dirty_ops static iommufd/device: Fix hwpt at err_unresv in iommufd_device_do_replace() commit 6efea5135417ae8194485d1d05ea79a21cf1a11c Author: Martin Whitaker Date: Sat Aug 17 10:41:41 2024 +0100 net: dsa: microchip: fix PTP config failure when using multiple ports When performing the port_hwtstamp_set operation, ptp_schedule_worker() will be called if hardware timestamoing is enabled on any of the ports. When using multiple ports for PTP, port_hwtstamp_set is executed for each port. When called for the first time ptp_schedule_worker() returns 0. On subsequent calls it returns 1, indicating the worker is already scheduled. Currently the ksz driver treats 1 as an error and fails to complete the port_hwtstamp_set operation, thus leaving the timestamping configuration for those ports unchanged. This patch fixes this by ignoring the ptp_schedule_worker() return value. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/7aae307a-35ca-4209-a850-7b2749d40f90@martin-whitaker.me.uk Fixes: bb01ad30570b0 ("net: dsa: microchip: ptp: manipulating absolute time using ptp hw clock") Signed-off-by: Martin Whitaker Reviewed-by: Andrew Lunn Acked-by: Arun Ramadoss Link: https://patch.msgid.link/20240817094141.3332-1-foss@martin-whitaker.me.uk Signed-off-by: Jakub Kicinski commit 8aba27c4a5020abdf60149239198297f88338a8d Author: Paolo Abeni Date: Fri Aug 16 17:20:34 2024 +0200 igb: cope with large MAX_SKB_FRAGS Sabrina reports that the igb driver does not cope well with large MAX_SKB_FRAG values: setting MAX_SKB_FRAG to 45 causes payload corruption on TX. An easy reproducer is to run ssh to connect to the machine. With MAX_SKB_FRAGS=17 it works, with MAX_SKB_FRAGS=45 it fails. This has been reported originally in https://bugzilla.redhat.com/show_bug.cgi?id=2265320 The root cause of the issue is that the driver does not take into account properly the (possibly large) shared info size when selecting the ring layout, and will try to fit two packets inside the same 4K page even when the 1st fraglist will trump over the 2nd head. Address the issue by checking if 2K buffers are insufficient. Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") Reported-by: Jan Tluka Reported-by: Jirka Hladky Reported-by: Sabrina Dubroca Tested-by: Sabrina Dubroca Tested-by: Corinna Vinschen Signed-off-by: Paolo Abeni Signed-off-by: Corinna Vinschen Link: https://patch.msgid.link/20240816152034.1453285-1-vinschen@redhat.com Signed-off-by: Jakub Kicinski commit 80a1e7b83bb1834b5568a3872e64c05795d88f31 Author: Nikolay Kuratov Date: Mon Aug 19 10:54:08 2024 +0300 cxgb4: add forgotten u64 ivlan cast before shift It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match() There is no reason it should not be done here Found by Linux Verification Center (linuxtesting.org) with SVACE Signed-off-by: Nikolay Kuratov Cc: stable@vger.kernel.org Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Reviewed-by: Simon Horman Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20240819075408.92378-1-kniv@yandex-team.ru Signed-off-by: Jakub Kicinski commit c50e7475961c36ec4d21d60af055b32f9436b431 Author: Dan Carpenter Date: Sat Aug 17 09:52:46 2024 +0300 dpaa2-switch: Fix error checking in dpaa2_switch_seed_bp() The dpaa2_switch_add_bufs() function returns the number of bufs that it was able to add. It returns BUFS_PER_CMD (7) for complete success or a smaller number if there are not enough pages available. However, the error checking is looking at the total number of bufs instead of the number which were added on this iteration. Thus the error checking only works correctly for the first iteration through the loop and subsequent iterations are always counted as a success. Fix this by checking only the bufs added in the current iteration. Fixes: 0b1b71370458 ("staging: dpaa2-switch: handle Rx path on control interface") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei Link: https://patch.msgid.link/eec27f30-b43f-42b6-b8ee-04a6f83423b6@stanley.mountain Signed-off-by: Jakub Kicinski commit 503ab6ee40fc103ea55cc9e50bb879e571d65aac Author: Michal Swiatkowski Date: Mon Aug 19 09:17:42 2024 +0200 ice: use internal pf id instead of function number Use always the same pf id in devlink port number. When doing pass-through the PF to VM bus info func number can be any value. Fixes: 2ae0aa4758b0 ("ice: Move devlink port to PF/VF struct") Reviewed-by: Wojciech Drewek Suggested-by: Jiri Pirko Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit d53d4dcce69be5773e2d0878c9899ebfbf58c393 Author: Maciej Fijalkowski Date: Wed Aug 7 12:53:26 2024 +0200 ice: fix truesize operations for PAGE_SIZE >= 8192 When working on multi-buffer packet on arch that has PAGE_SIZE >= 8192, truesize is calculated and stored in xdp_buff::frame_sz per each processed Rx buffer. This means that frame_sz will contain the truesize based on last received buffer, but commit 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling") assumed this value will be constant for each buffer, which breaks the page recycling scheme and mess up the way we update the page::page_offset. To fix this, let us work on constant truesize when PAGE_SIZE >= 8192 instead of basing this on size of a packet read from Rx descriptor. This way we can simplify the code and avoid calculating truesize per each received frame and on top of that when using xdp_update_skb_shared_info(), current formula for truesize update will be valid. This means ice_rx_frame_truesize() can be removed altogether. Furthermore, first call to it within ice_clean_rx_irq() for 4k PAGE_SIZE was redundant as xdp_buff::frame_sz is initialized via xdp_init_buff() in ice_vsi_cfg_rxq(). This should have been removed at the point where xdp_buff struct started to be a member of ice_rx_ring and it was no longer a stack based variable. There are two fixes tags as my understanding is that the first one exposed us to broken truesize and page_offset handling and then second introduced broken skb_shared_info update in ice_{construct,build}_skb(). Reported-and-tested-by: Luiz Capitulino Closes: https://lore.kernel.org/netdev/8f9e2a5c-fd30-4206-9311-946a06d031bb@redhat.com/ Fixes: 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling") Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit b966ad832942b5a11e002f9b5ef102b08425b84a Author: Maciej Fijalkowski Date: Wed Aug 7 12:53:25 2024 +0200 ice: fix ICE_LAST_OFFSET formula For bigger PAGE_SIZE archs, ice driver works on 3k Rx buffers. Therefore, ICE_LAST_OFFSET should take into account ICE_RXBUF_3072, not ICE_RXBUF_2048. Fixes: 7237f5b0dba4 ("ice: introduce legacy Rx flag") Suggested-by: Luiz Capitulino Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 50b2143356e888777fc5bca023c39f34f404613a Author: Maciej Fijalkowski Date: Wed Aug 7 12:53:24 2024 +0200 ice: fix page reuse when PAGE_SIZE is over 8k Architectures that have PAGE_SIZE >= 8192 such as arm64 should act the same as x86 currently, meaning reuse of a page should only take place when no one else is busy with it. Do two things independently of underlying PAGE_SIZE: - store the page count under ice_rx_buf::pgcnt - then act upon its value vs ice_rx_buf::pagecnt_bias when making the decision regarding page reuse Fixes: 2b245cb29421 ("ice: Implement transmit and NAPI support") Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 521b1e7f4cf0b05a47995b103596978224b380a8 Merge: 6e4436539ae18 2c402bd2e85b4 Author: Linus Torvalds Date: Tue Aug 20 08:37:08 2024 -0700 Merge tag 'cxl-fixes-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl fixes from Dave Jiang: "Check for RCH dport before accessing pci_host_bridge and a fix to address a KASAN warning for the cxl regression test suite cxl-test" * tag 'cxl-fixes-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/test: Skip cxl_setup_parent_dport() for emulated dports cxl/pci: Get AER capability address from RCRB only for RCH dport commit c5af2c90ba5629f0424a8d315f75fb8d91713c3c Author: Ma Ke Date: Tue Aug 20 17:28:43 2024 +0800 irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init() gicv2m_of_init() fails to perform an of_node_put() when of_address_to_resource() fails, leading to a refcount leak. Address this by moving the error handling path outside of the loop and making it common to all failure modes. Fixes: 4266ab1a8ff5 ("irqchip/gic-v2m: Refactor to prepare for ACPI support") Signed-off-by: Ma Ke Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240820092843.1219933-1-make24@iscas.ac.cn commit efe81b7bdf7d882d0ce3d183f1571321046da8f1 Author: Dan Carpenter Date: Tue Aug 20 11:42:40 2024 +0300 irqchip/riscv-aplic: Fix an IS_ERR() vs NULL bug in probe() The devm_platform_ioremap_resource() function doesn't return NULL, it returns error pointers. Fix the error handling to match. Fixes: 2333df5ae51e ("irqchip: Add RISC-V advanced PLIC driver for direct-mode") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Gleixner Reviewed-by: Jinjie Ruan Reviewed-by: Anup Patel Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/a5a628d6-81d8-4933-81a8-64aad4743ec4@stanley.mountain commit f97fd458763a4801d04dbb4a79d9ca6282d293ec Author: Marc Zyngier Date: Sun Aug 18 18:16:25 2024 +0100 irqchip/gic-v4: Fix ordering between vmapp and vpe locks The recently established lock ordering mandates that the per-VM vmapp_lock is acquired before taking the per-VPE lock. As it turns out, its_vpe_set_affinity() takes the VPE lock, and then calls into its_send_vmovp(), which itself takes the vmapp lock. Obviously, this is a lock order violation. As its_send_vmovp() is only called from its_vpe_set_affinity(), hoist the vmapp locking from the former into the latter, restoring the expected order. Fixes: f0eb154c39471 ("irqchip/gic-v4: Substitute vmovp_lock for a per-VM lock") Reported-by: Zhou Wang Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20240818171625.3030584-1-maz@kernel.org commit 4d936f10ff80274841537a26d1fbfe9984de0ef9 Author: Anup Patel Date: Tue Aug 20 09:18:50 2024 +0530 irqchip/sifive-plic: Probe plic driver early for Allwinner D1 platform The latest Linux RISC-V no longer boots on the Allwinner D1 platform because the sun4i_timer driver fails to get an interrupt from PLIC due to the recent conversion of the PLIC to a platform driver. Converting the sun4i timer to a platform driver does not work either because the D1 does not have a SBI timer available so early boot hangs. See the 'Closes:' link for deeper analysis. The real fix requires enabling the SBI time extension in the platform firmware (OpenSBI) and convert sun4i_timer into platform driver. Unfortunately, the real fix involves changing multiple places and can't be achieved in a short duration and aside of that requires users to update firmware. As a work-around, retrofit PLIC probing such that the PLIC is probed early only for the Allwinner D1 platform and probed as a regular platform driver for rest of the RISC-V platforms. In the process, partially revert some of the previous changes because the PLIC device pointer is not available in all probing paths. Fixes: e306a894bd51 ("irqchip/sifive-plic: Chain to parent IRQ after handlers are ready") Fixes: 8ec99b033147 ("irqchip/sifive-plic: Convert PLIC driver into a platform driver") Suggested-by: Thomas Gleixner Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Tested-by: Samuel Holland Tested-by: Emil Renner Berthing Tested-by: Charlie Jenkins Reviewed-by: Samuel Holland Reviewed-by: Charlie Jenkins Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240820034850.3189912-1-apatel@ventanamicro.com Closes: https://lore.kernel.org/lkml/20240814145642.344485-1-emil.renner.berthing@canonical.com/ commit 7565c39da89dc6ac9b1b0733bd70276bc66612b1 Merge: 4b3e33fcc38f7 c4c5c5d2ef40a Author: Paolo Abeni Date: Tue Aug 20 15:30:37 2024 +0200 Merge branch 'bonding-fix-xfrm-offload-bugs' Nikolay Aleksandrov says: ==================== bonding: fix xfrm offload bugs I noticed these problems while reviewing a bond xfrm patch recently. The fixes are straight-forward, please review carefully the last one because it has side-effects. This set has passed bond's selftests and my custom bond stress tests which crash without these fixes. Note the first patch is not critical, but it simplifies the next fix. ==================== Link: https://patch.msgid.link/20240816114813.326645-1-razor@blackwall.org Signed-off-by: Paolo Abeni commit c4c5c5d2ef40a9f67a9241dc5422eac9ffe19547 Author: Nikolay Aleksandrov Date: Fri Aug 16 14:48:13 2024 +0300 bonding: fix xfrm state handling when clearing active slave If the active slave is cleared manually the xfrm state is not flushed. This leads to xfrm add/del imbalance and adding the same state multiple times. For example when the device cannot handle anymore states we get: [ 1169.884811] bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA because it's filled with the same state after multiple active slave clearings. This change also has a few nice side effects: user-space gets a notification for the change, the old device gets its mac address and promisc/mcast adjusted properly. Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Nikolay Aleksandrov Reviewed-by: Hangbin Liu Signed-off-by: Paolo Abeni commit f8cde9805981c50d0c029063dc7d82821806fc44 Author: Nikolay Aleksandrov Date: Fri Aug 16 14:48:12 2024 +0300 bonding: fix xfrm real_dev null pointer dereference We shouldn't set real_dev to NULL because packets can be in transit and xfrm might call xdo_dev_offload_ok() in parallel. All callbacks assume real_dev is set. Example trace: kernel: BUG: unable to handle page fault for address: 0000000000001030 kernel: bond0: (slave eni0np1): making interface the new active one kernel: #PF: supervisor write access in kernel mode kernel: #PF: error_code(0x0002) - not-present page kernel: PGD 0 P4D 0 kernel: Oops: 0002 [#1] PREEMPT SMP kernel: CPU: 4 PID: 2237 Comm: ping Not tainted 6.7.7+ #12 kernel: Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 kernel: RIP: 0010:nsim_ipsec_offload_ok+0xc/0x20 [netdevsim] kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: Code: e0 0f 0b 48 83 7f 38 00 74 de 0f 0b 48 8b 47 08 48 8b 37 48 8b 78 40 e9 b2 e5 9a d7 66 90 0f 1f 44 00 00 48 8b 86 80 02 00 00 <83> 80 30 10 00 00 01 b8 01 00 00 00 c3 0f 1f 80 00 00 00 00 0f 1f kernel: bond0: (slave eni0np1): making interface the new active one kernel: RSP: 0018:ffffabde81553b98 EFLAGS: 00010246 kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: kernel: RAX: 0000000000000000 RBX: ffff9eb404e74900 RCX: ffff9eb403d97c60 kernel: RDX: ffffffffc090de10 RSI: ffff9eb404e74900 RDI: ffff9eb3c5de9e00 kernel: RBP: ffff9eb3c0a42000 R08: 0000000000000010 R09: 0000000000000014 kernel: R10: 7974203030303030 R11: 3030303030303030 R12: 0000000000000000 kernel: R13: ffff9eb3c5de9e00 R14: ffffabde81553cc8 R15: ffff9eb404c53000 kernel: FS: 00007f2a77a3ad00(0000) GS:ffff9eb43bd00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000001030 CR3: 00000001122ab000 CR4: 0000000000350ef0 kernel: bond0: (slave eni0np1): making interface the new active one kernel: Call Trace: kernel: kernel: ? __die+0x1f/0x60 kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: ? page_fault_oops+0x142/0x4c0 kernel: ? do_user_addr_fault+0x65/0x670 kernel: ? kvm_read_and_reset_apf_flags+0x3b/0x50 kernel: bond0: (slave eni0np1): making interface the new active one kernel: ? exc_page_fault+0x7b/0x180 kernel: ? asm_exc_page_fault+0x22/0x30 kernel: ? nsim_bpf_uninit+0x50/0x50 [netdevsim] kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: ? nsim_ipsec_offload_ok+0xc/0x20 [netdevsim] kernel: bond0: (slave eni0np1): making interface the new active one kernel: bond_ipsec_offload_ok+0x7b/0x90 [bonding] kernel: xfrm_output+0x61/0x3b0 kernel: bond0: (slave eni0np1): bond_ipsec_add_sa_all: failed to add SA kernel: ip_push_pending_frames+0x56/0x80 Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Nikolay Aleksandrov Reviewed-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 95c90e4ad89d493a7a14fa200082e466e2548f9d Author: Nikolay Aleksandrov Date: Fri Aug 16 14:48:11 2024 +0300 bonding: fix null pointer deref in bond_ipsec_offload_ok We must check if there is an active slave before dereferencing the pointer. Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Nikolay Aleksandrov Reviewed-by: Hangbin Liu Reviewed-by: Eric Dumazet Signed-off-by: Paolo Abeni commit fc59b9a5f7201b9f7272944596113a82cc7773d5 Author: Nikolay Aleksandrov Date: Fri Aug 16 14:48:10 2024 +0300 bonding: fix bond_ipsec_offload_ok return type Fix the return type which should be bool. Fixes: 955b785ec6b3 ("bonding: fix suspicious RCU usage in bond_ipsec_offload_ok()") Signed-off-by: Nikolay Aleksandrov Reviewed-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 783bf5d09f86b9736605f3e01a3472e55ef98ff8 Author: Carlos Song Date: Tue Aug 20 15:06:58 2024 +0800 spi: spi-fsl-lpspi: limit PRESCALE bit in TCR register Referring to the errata ERR051608 of I.MX93, LPSPI TCR[PRESCALE] can only be configured to be 0 or 1, other values are not valid and will cause LPSPI to not work. Add the prescale limitation for LPSPI in I.MX93. Other platforms are not affected. Signed-off-by: Carlos Song Link: https://patch.msgid.link/20240820070658.672127-1-carlos.song@nxp.com Signed-off-by: Mark Brown commit a1e627af32ed60713941cbfc8075d44cad07f6dd Author: Dan Carpenter Date: Tue Aug 20 11:44:08 2024 +0300 mmc: mmc_test: Fix NULL dereference on allocation failure If the "test->highmem = alloc_pages()" allocation fails then calling __free_pages(test->highmem) will result in a NULL dereference. Also change the error code to -ENOMEM instead of returning success. Fixes: 2661081f5ab9 ("mmc_test: highmem tests") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/8c90be28-67b4-4b0d-a105-034dc72a0b31@stanley.mountain Signed-off-by: Ulf Hansson commit ea72ce5da22806d5713f3ffb39a6d5ae73841f93 Author: Thomas Gleixner Date: Wed Aug 14 00:29:36 2024 +0200 x86/kaslr: Expose and use the end of the physical memory address space iounmap() on x86 occasionally fails to unmap because the provided valid ioremap address is not below high_memory. It turned out that this happens due to KASLR. KASLR uses the full address space between PAGE_OFFSET and vaddr_end to randomize the starting points of the direct map, vmalloc and vmemmap regions. It thereby limits the size of the direct map by using the installed memory size plus an extra configurable margin for hot-plug memory. This limitation is done to gain more randomization space because otherwise only the holes between the direct map, vmalloc, vmemmap and vaddr_end would be usable for randomizing. The limited direct map size is not exposed to the rest of the kernel, so the memory hot-plug and resource management related code paths still operate under the assumption that the available address space can be determined with MAX_PHYSMEM_BITS. request_free_mem_region() allocates from (1 << MAX_PHYSMEM_BITS) - 1 downwards. That means the first allocation happens past the end of the direct map and if unlucky this address is in the vmalloc space, which causes high_memory to become greater than VMALLOC_START and consequently causes iounmap() to fail for valid ioremap addresses. MAX_PHYSMEM_BITS cannot be changed for that because the randomization does not align with address bit boundaries and there are other places which actually require to know the maximum number of address bits. All remaining usage sites of MAX_PHYSMEM_BITS have been analyzed and found to be correct. Cure this by exposing the end of the direct map via PHYSMEM_END and use that for the memory hot-plug and resource management related places instead of relying on MAX_PHYSMEM_BITS. In the KASLR case PHYSMEM_END maps to a variable which is initialized by the KASLR initialization and otherwise it is based on MAX_PHYSMEM_BITS as before. To prevent future hickups add a check into add_pages() to catch callers trying to add memory above PHYSMEM_END. Fixes: 0483e1fa6e09 ("x86/mm: Implement ASLR for kernel memory regions") Reported-by: Max Ramanouski Reported-by: Alistair Popple Signed-off-by: Thomas Gleixner Tested-By: Max Ramanouski Tested-by: Alistair Popple Reviewed-by: Dan Williams Reviewed-by: Alistair Popple Reviewed-by: Kees Cook Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/87ed6soy3z.ffs@tglx commit 6275c7bc8dd07644ea8142a1773d826800f0f3f7 Author: Ben Whitten Date: Sun Aug 11 22:22:11 2024 +0100 mmc: dw_mmc: allow biu and ciu clocks to defer Fix a race condition if the clock provider comes up after mmc is probed, this causes mmc to fail without retrying. When given the DEFER error from the clk source, pass it on up the chain. Fixes: f90a0612f0e1 ("mmc: dw_mmc: lookup for optional biu and ciu clocks") Signed-off-by: Ben Whitten Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240811212212.123255-1-ben.whitten@gmail.com Signed-off-by: Ulf Hansson commit 4b3e33fcc38f7750604b065c55a43e94c5bc3145 Author: Thomas Bogendoerfer Date: Thu Aug 15 17:14:16 2024 +0200 ip6_tunnel: Fix broken GRO GRO code checks for matching layer 2 headers to see, if packet belongs to the same flow and because ip6 tunnel set dev->hard_header_len this check fails in cases, where it shouldn't. To fix this don't set hard_header_len, but use needed_headroom like ipv4/ip_tunnel.c does. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Thomas Bogendoerfer Link: https://patch.msgid.link/20240815151419.109864-1-tbogendoerfer@suse.de Signed-off-by: Paolo Abeni commit 46ee21e9f59205e54943dfe51b2dc8a9352ca37d Author: Srinivas Pandruvada Date: Fri Aug 16 09:36:26 2024 -0700 platform/x86: ISST: Fix return value on last invalid resource When only the last resource is invalid, tpmi_sst_dev_add() is returing error even if there are other valid resources before. This function should return error when there are no valid resources. Here tpmi_sst_dev_add() is returning "ret" variable. But this "ret" variable contains the failure status of last call to sst_main(), which failed for the invalid resource. But there may be other valid resources before the last entry. To address this, do not update "ret" variable for sst_main() return status. If there are no valid resources, it is already checked for by !inst below the loop and -ENODEV is returned. Fixes: 9d1d36268f3d ("platform/x86: ISST: Support partitioned systems") Signed-off-by: Srinivas Pandruvada Cc: stable@vger.kernel.org # 6.10+ Link: https://lore.kernel.org/r/20240816163626.415762-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a0b39e2dc7017ac667b70bdeee5293e410fab2fb Author: Sebastian Andrzej Siewior Date: Tue Aug 20 09:54:31 2024 +0200 netfilter: nft_counter: Synchronize nft_counter_reset() against reader. nft_counter_reset() resets the counter by subtracting the previously retrieved value from the counter. This is a write operation on the counter and as such it requires to be performed with a write sequence of nft_counter_seq to serialize against its possible reader. Update the packets/ bytes within write-sequence of nft_counter_seq. Fixes: d84701ecbcd6a ("netfilter: nft_counter: rework atomic dump and reset") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1eacdd71b3436b54d5fc8218c4bb0187d92a6892 Author: Sebastian Andrzej Siewior Date: Tue Aug 20 09:54:30 2024 +0200 netfilter: nft_counter: Disable BH in nft_counter_offload_stats(). The sequence counter nft_counter_seq is a per-CPU counter. There is no lock associated with it. nft_counter_do_eval() is using the same counter and disables BH which suggest that it can be invoked from a softirq. This in turn means that nft_counter_offload_stats(), which disables only preemption, can be interrupted by nft_counter_do_eval() leading to two writer for one seqcount_t. This can lead to loosing stats or reading statistics while they are updated. Disable BH during stats update in nft_counter_offload_stats() to ensure one writer at a time. Fixes: b72920f6e4a9d ("netfilter: nftables: counter hardware offload support") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 50f2b98dc83de7809a5c5bf0ccf9af2e75c37c13 Author: Jiaxun Yang Date: Tue Aug 13 10:59:08 2024 +0100 MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed This avoids warning: [ 0.118053] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 Caused by get_c0_compare_int on secondary CPU. We also skipped saving IRQ number to struct clock_event_device *cd as it's never used by clockevent core, as per comments it's only meant for "non CPU local devices". Reported-by: Serge Semin Closes: https://lore.kernel.org/linux-mips/6szkkqxpsw26zajwysdrwplpjvhl5abpnmxgu2xuj3dkzjnvsf@4daqrz4mf44k/ Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Serge Semin Tested-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit 2102bdac67b55bf2d1df4ff757bced74e94a5f74 Author: Kent Overstreet Date: Sat Aug 17 21:03:07 2024 -0400 bcachefs: Extra debug for data move path We don't have sufficient information to debug: https://github.com/koverstreet/bcachefs/issues/726 - print out durability of extent ptrs, when non default - print the number of replicas we need in data_update_to_text() Signed-off-by: Kent Overstreet commit 807067bf014d4a3ae2cc55bd3de16f22a01eb580 Author: Kuniyuki Iwashima Date: Thu Aug 15 15:04:37 2024 -0700 kcm: Serialise kcm_sendmsg() for the same socket. syzkaller reported UAF in kcm_release(). [0] The scenario is 1. Thread A builds a skb with MSG_MORE and sets kcm->seq_skb. 2. Thread A resumes building skb from kcm->seq_skb but is blocked by sk_stream_wait_memory() 3. Thread B calls sendmsg() concurrently, finishes building kcm->seq_skb and puts the skb to the write queue 4. Thread A faces an error and finally frees skb that is already in the write queue 5. kcm_release() does double-free the skb in the write queue When a thread is building a MSG_MORE skb, another thread must not touch it. Let's add a per-sk mutex and serialise kcm_sendmsg(). [0]: BUG: KASAN: slab-use-after-free in __skb_unlink include/linux/skbuff.h:2366 [inline] BUG: KASAN: slab-use-after-free in __skb_dequeue include/linux/skbuff.h:2385 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge_reason include/linux/skbuff.h:3175 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge include/linux/skbuff.h:3181 [inline] BUG: KASAN: slab-use-after-free in kcm_release+0x170/0x4c8 net/kcm/kcmsock.c:1691 Read of size 8 at addr ffff0000ced0fc80 by task syz-executor329/6167 CPU: 1 PID: 6167 Comm: syz-executor329 Tainted: G B 6.8.0-rc5-syzkaller-g9abbc24128bc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x178/0x518 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 __skb_unlink include/linux/skbuff.h:2366 [inline] __skb_dequeue include/linux/skbuff.h:2385 [inline] __skb_queue_purge_reason include/linux/skbuff.h:3175 [inline] __skb_queue_purge include/linux/skbuff.h:3181 [inline] kcm_release+0x170/0x4c8 net/kcm/kcmsock.c:1691 __sock_release net/socket.c:659 [inline] sock_close+0xa4/0x1e8 net/socket.c:1421 __fput+0x30c/0x738 fs/file_table.c:376 ____fput+0x20/0x30 fs/file_table.c:404 task_work_run+0x230/0x2e0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x618/0x1f64 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1020 get_signal+0x1500/0x15ec kernel/signal.c:2893 do_signal+0x23c/0x3b44 arch/arm64/kernel/signal.c:1249 do_notify_resume+0x74/0x1f4 arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Allocated by task 6166: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x70/0x84 mm/kasan/generic.c:626 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x204/0x4c0 mm/slub.c:3903 __alloc_skb+0x19c/0x3d8 net/core/skbuff.c:641 alloc_skb include/linux/skbuff.h:1296 [inline] kcm_sendmsg+0x1d3c/0x2124 net/kcm/kcmsock.c:783 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] sock_sendmsg+0x220/0x2c0 net/socket.c:768 splice_to_socket+0x7cc/0xd58 fs/splice.c:889 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0xec/0x1d8 fs/splice.c:1164 splice_direct_to_actor+0x438/0xa0c fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x1e4/0x304 fs/splice.c:1233 do_sendfile+0x460/0xb3c fs/read_write.c:1295 __do_sys_sendfile64 fs/read_write.c:1362 [inline] __se_sys_sendfile64 fs/read_write.c:1348 [inline] __arm64_sys_sendfile64+0x160/0x3b4 fs/read_write.c:1348 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Freed by task 6167: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x5c/0x74 mm/kasan/generic.c:640 poison_slab_object+0x124/0x18c mm/kasan/common.c:241 __kasan_slab_free+0x3c/0x78 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x15c/0x3d4 mm/slub.c:4363 kfree_skbmem+0x10c/0x19c __kfree_skb net/core/skbuff.c:1109 [inline] kfree_skb_reason+0x240/0x6f4 net/core/skbuff.c:1144 kfree_skb include/linux/skbuff.h:1244 [inline] kcm_release+0x104/0x4c8 net/kcm/kcmsock.c:1685 __sock_release net/socket.c:659 [inline] sock_close+0xa4/0x1e8 net/socket.c:1421 __fput+0x30c/0x738 fs/file_table.c:376 ____fput+0x20/0x30 fs/file_table.c:404 task_work_run+0x230/0x2e0 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x618/0x1f64 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1020 get_signal+0x1500/0x15ec kernel/signal.c:2893 do_signal+0x23c/0x3b44 arch/arm64/kernel/signal.c:1249 do_notify_resume+0x74/0x1f4 arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000ced0fc80 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 0 bytes inside of freed 240-byte region [ffff0000ced0fc80, ffff0000ced0fd70) The buggy address belongs to the physical page: page:00000000d35f4ae4 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ed0f flags: 0x5ffc00000000800(slab|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000800 ffff0000c1cbf640 fffffdffc3423100 dead000000000004 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ced0fb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ced0fc00: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff0000ced0fc80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000ced0fd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff0000ced0fd80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Reported-by: syzbot+b72d86aa5df17ce74c60@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b72d86aa5df17ce74c60 Tested-by: syzbot+b72d86aa5df17ce74c60@syzkaller.appspotmail.com Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240815220437.69511-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit ce335db0621648472f9bb4b7191eb2e13a5793cf Author: Jeremy Kerr Date: Fri Aug 16 18:29:17 2024 +0800 net: mctp: test: Use correct skb for route input check In the MCTP route input test, we're routing one skb, then (when delivery is expected) checking the resulting routed skb. However, we're currently checking the original skb length, rather than the routed skb. Check the routed skb instead; the original will have been freed at this point. Fixes: 8892c0490779 ("mctp: Add route input to socket tests") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/kernel-janitors/4ad204f0-94cf-46c5-bdab-49592addf315@kili.mountain/ Signed-off-by: Jeremy Kerr Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240816-mctp-kunit-skb-fix-v1-1-3c367ac89c27@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit 4e870e6bbec5c41c0d8b253282dca9465fbf5044 Author: Dmitry Torokhov Date: Mon Aug 19 17:04:42 2024 -0700 Input: himax_hx83112b - fix incorrect size when reading product ID We need to read a u32 value (4 bytes), not size of a pointer to that value. Also, himax_read_mcu() wrapper is an overkill, remove it and use himax_bus_read() directly. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408200301.Ujpj7Vov-lkp@intel.com/ Fixes: 0944829d491e ("Input: himax_hx83112b - implement MCU register reading") Tested-by: Felix Kaechele Link: https://lore.kernel.org/r/ZsPdmtfC54R7JVxR@google.com Signed-off-by: Dmitry Torokhov commit 6e4436539ae182dc86d57d13849862bcafaa4709 Merge: b0da640826ba3 1b8f9c1fb4649 Author: Linus Torvalds Date: Mon Aug 19 11:02:13 2024 -0700 Merge tag 'hid-for-linus-2024081901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - memory corruption fixes for hid-cougar (Camila Alvarez) and hid-amd_sfh (Olivier Sobrie) - fix for regression in Wacom driver of twist gesture handling (Jason Gerecke) - two new device IDs for hid-multitouch (Dmitry Savin) and hid-asus (Luke D. Jones) * tag 'hid-for-linus-2024081901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: wacom: Defer calculation of resolution until resolution_code is known HID: multitouch: Add support for GT7868Q HID: amd_sfh: free driver_data after destroying hid device hid-asus: add ROG Ally X prod ID to quirk list HID: cougar: fix slab-out-of-bounds Read in cougar_report_fixup commit a06a7b3429e2548a28bb661f17347b8ffe4a8a15 Author: Daniele Ceraolo Spurio Date: Thu Aug 15 16:05:40 2024 -0700 drm/xe/uc: Use devm to register cleanup that includes exec_queues Exec_queue cleanup requires HW access, so we need to use devm instead of drmm for it. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240815230541.3828206-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 5a891a0e69f134f53cc91b409f38e5ea1cafaf0a) Signed-off-by: Rodrigo Vivi commit 8636a5c29be1f05b5162a5c82c874338b6717759 Author: Daniele Ceraolo Spurio Date: Fri Aug 9 16:12:35 2024 -0700 drm/xe: use devm instead of drmm for managed bo The BO cleanup touches the GGTT and therefore requires the HW to be available, so we need to use devm instead of drmm. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1160 Signed-off-by: Daniele Ceraolo Spurio Cc: Lucas De Marchi Cc: Matthew Auld Reviewed-by: Matthew Auld Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240809231237.1503796-2-daniele.ceraolospurio@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 8d3a2d3d766a823c7510cdc17e6ff7c042c63b61) Signed-off-by: Rodrigo Vivi commit 8776b0234e1d008d8f19b26f6c3af1cfa6187070 Author: Tejas Upadhyay Date: Mon Aug 12 19:11:17 2024 +0530 drm/xe/xe2hpg: Add Wa_14021821874 Wa_14021821874 applies to xe2_hpg V2(Himal): - Use space after define Cc: Matt Roper Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240812134117.813670-1-tejas.upadhyay@intel.com (cherry picked from commit 21ff3a16e92e2fa4f906a61d148aca1423c58298) Signed-off-by: Rodrigo Vivi commit f5cb1275c8ce56c7583cb323cfa08a820a7ef6b4 Author: Daniele Ceraolo Spurio Date: Wed Aug 7 16:53:32 2024 -0700 drm/xe: fix WA 14018094691 This WA is applied while initializing the media GT, but it a primary GT WA (because it modifies a register on the primary GT), so the XE_WA macro is returning false even when the WA should be applied. Fix this by using the primary GT in the macro. Note that this WA only applies to PXP and we don't yet support that in Xe, so there are no negative effects to this bug, which is why we didn't see any errors in testing. v2: use the primary GT in the macro instead of marking the WA as platform-wide (Lucas, Matt). Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: Lucas De Marchi Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240807235333.1370915-1-daniele.ceraolospurio@intel.com (cherry picked from commit e422c0bfd9e47e399e86bcc483f49d8b54064fc2) Signed-off-by: Rodrigo Vivi commit cbc6e98ab11bea52789d2835e45e8816c39407e1 Author: Tejas Upadhyay Date: Tue Jul 9 21:26:06 2024 +0530 drm/xe/xe2: Add Wa_15015404425 Wa_15015404425 asks us to perform four "dummy" writes to a non-existent register offset before every real register read. Although the specific offset of the writes doesn't directly matter, the workaround suggests offset 0x130030 as a good target so that these writes will be easy to recognize and filter out in debugging traces. V5(MattR): - Avoid negating an equality comparison V4(MattR): - Use writel and remove xe_reg usage V3(MattR): - Define dummy reg local to function - Avoid tracing dummy writes - Update commit message V2: - Add WA to 8/16/32bit reads also - MattR - Corrected dummy reg address - MattR - Use for loop to avoid mental pause - JaniN Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240709155606.2998941-1-tejas.upadhyay@intel.com (cherry picked from commit 86c5b70a9c0c3f05f7002ef8b789460c96b54e27) Signed-off-by: Rodrigo Vivi commit 7e81285380743aa5759bb29a388f056c3d326a2c Author: Tejas Upadhyay Date: Wed Jul 10 10:57:50 2024 +0530 drm/xe/xe2: Make subsequent L2 flush sequential Issuing the flush on top of an ongoing flush is not desirable. Lets use lock to make it sequential. Reviewed-by: Nirmoy Das Signed-off-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20240710052750.3031586-1-tejas.upadhyay@intel.com Signed-off-by: Nirmoy Das (cherry picked from commit 71733b8d7f50b61403f940c6c9745fb3a9b98dcb) Signed-off-by: Rodrigo Vivi commit b196e6fcc71186134b4cfe756067d87ae41b1ed9 Author: Bommu Krishnaiah Date: Wed Jul 3 14:37:54 2024 +0530 drm/xe/xe2lpg: Extend workaround 14021402888 workaround 14021402888 also applies to Xe2_LPG. Replicate the existing entry to one specific for Xe2_LPG. Signed-off-by: Bommu Krishnaiah Cc: Tejas Upadhyay Cc: Matt Roper Cc: Himal Prasad Ghimiray Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240703090754.1323647-1-krishnaiah.bommu@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 56ab6986992ba143aee0bda33e15a764343e271d) Signed-off-by: Rodrigo Vivi commit 03a2dc84f5c4ef31ac0112b29d51ff103f7c8dd4 Author: Ngai-Mint Kwan Date: Mon Jul 1 11:46:37 2024 -0700 drm/xe/xe2lpm: Extend Wa_16021639441 Wa_16021639441 applies to Xe2_LPM. Signed-off-by: Ngai-Mint Kwan Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240701184637.531794-1-ngai-mint.kwan@linux.intel.com (cherry picked from commit 74e3076800067c6dc0dcff5b75344cec064c20eb) Signed-off-by: Rodrigo Vivi commit 27cb2b7fec2abf310e4128137979124ead920ccb Author: Matthew Auld Date: Wed Jul 3 13:43:38 2024 +0100 drm/xe/bmg: implement Wa_16023588340 This involves enabling l2 caching of host side memory access to VRAM through the CPU BAR. The main fallout here is with display since VRAM writes from CPU can now be cached in GPU l2, and display is never coherent with caches, so needs various manual flushing. In the case of fbc we disable it due to complications in getting this to work correctly (in a later patch). Signed-off-by: Matthew Auld Cc: Jonathan Cavitt Cc: Matt Roper Cc: Lucas De Marchi Cc: Vinod Govindapillai Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240703124338.208220-3-matthew.auld@intel.com (cherry picked from commit 01570b446939c3538b1aa3d059837f49fa14a3ae) Signed-off-by: Rodrigo Vivi commit f616506754d34bcfdbfbc7508b562e5c98461e9a Author: Marc Zyngier Date: Mon Aug 19 13:50:45 2024 +0100 KVM: arm64: vgic: Don't hold config_lock while unregistering redistributors We recently moved the teardown of the vgic part of a vcpu inside a critical section guarded by the config_lock. This teardown phase involves calling into kvm_io_bus_unregister_dev(), which takes the kvm->srcu lock. However, this violates the established order where kvm->srcu is taken on a memory fault (such as an MMIO access), possibly followed by taking the config_lock if the GIC emulation requires mutual exclusion from the other vcpus. It therefore results in a bad lockdep splat, as reported by Zenghui. Fix this by moving the call to kvm_io_bus_unregister_dev() outside of the config_lock critical section. At this stage, there shouln't be any need to hold the config_lock. As an additional bonus, document the ordering between kvm->slots_lock, kvm->srcu and kvm->arch.config_lock so that I cannot pretend I didn't know about those anymore. Fixes: 9eb18136af9f ("KVM: arm64: vgic: Hold config_lock while tearing down a CPU interface") Reported-by: Zenghui Yu Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Tested-by: Zenghui Yu Link: https://lore.kernel.org/r/20240819125045.3474845-1-maz@kernel.org Signed-off-by: Oliver Upton commit 2240a50e6294214de791729e9dcba6880fa7e44e Author: Zenghui Yu Date: Sat Aug 17 18:15:41 2024 +0800 KVM: arm64: vgic-debug: Don't put unmarked LPIs If there were LPIs being mapped behind our back (i.e., between .start() and .stop()), we would put them at iter_unmark_lpis() without checking if they were actually *marked*, which is obviously not good. Switch to use the xa_for_each_marked() iterator to fix it. Cc: stable@vger.kernel.org Fixes: 85d3ccc8b75b ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator") Signed-off-by: Zenghui Yu Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240817101541.1664-1-yuzenghui@huawei.com Signed-off-by: Oliver Upton commit b0da640826ba3b6506b4996a6b23a429235e6923 Merge: 47ac09b91befb bcc954c6caba0 Author: Linus Torvalds Date: Mon Aug 19 09:26:35 2024 -0700 Merge tag 'printk-for-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fix from Petr Mladek: - Do not block printk on non-panic CPUs when they are dumping backtraces * tag 'printk-for-6.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk/panic: Allow cpu backtraces to be written into ringbuffer during panic commit dc0112e6d8b42b39f9d283bab489a757e9d284f0 Author: Chuck Lever Date: Mon Aug 12 11:47:59 2024 -0400 rpcrdma: Trace connection registration and unregistration These new trace points record xarray indices and the time of endpoint registration and unregistration, to co-ordinate with device removal events. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6b3b023e2d0c130235c0e494f77df2a9a64ab6a2 Author: Chuck Lever Date: Mon Aug 12 11:47:58 2024 -0400 rpcrdma: Use XA_FLAGS_ALLOC instead of XA_FLAGS_ALLOC1 Nit: The built-in xa_limit_32b range starts at 0, but XA_FLAGS_ALLOC1 configures the xarray's allocator to start at 1. Adopt the more conventional XA_FLAGS_ALLOC because there's no mechanical reason to skip 0. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit de48aad2a8e80ba026ca91c383f590f0bf97b3c0 Author: Chuck Lever Date: Mon Aug 12 11:47:57 2024 -0400 rpcrdma: Device kref is over-incremented on error from xa_alloc If the device's reference count is too high, the device completion callback never fires. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 81475beb1b5996505a39cd1d9316ce1e668932a2 Author: John Garry Date: Thu Aug 15 16:32:28 2024 +0000 block: Drop NULL check in bdev_write_zeroes_sectors() Function bdev_get_queue() must not return NULL, so drop the check in bdev_write_zeroes_sectors(). Reviewed-by: Christoph Hellwig Signed-off-by: John Garry Reviewed-by: Martin K. Petersen Reviewed-by: Nitesh Shetty Link: https://lore.kernel.org/r/20240815163228.216051-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 64b582ca88ca11400467b282d5fa3b870ded1c11 Author: John Garry Date: Thu Aug 15 16:32:27 2024 +0000 block: Read max write zeroes once for __blkdev_issue_write_zeroes() As reported in [0], we may get a hang when formatting a XFS FS on a RAID0 drive. Commit 73a768d5f955 ("block: factor out a blk_write_zeroes_limit helper") changed __blkdev_issue_write_zeroes() to read the max write zeroes value in the loop. This is not safe as max write zeroes may change in value. Specifically for the case of [0], the value goes to 0, and we get an infinite loop. Lift the limit reading out of the loop. [0] https://lore.kernel.org/linux-xfs/4d31268f-310b-4220-88a2-e191c3932a82@oracle.com/T/#t Fixes: 73a768d5f955 ("block: factor out a blk_write_zeroes_limit helper") Reviewed-by: Christoph Hellwig Signed-off-by: John Garry Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240815163228.216051-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 565d121b69980637f040eb4d84289869cdaabedf Author: Florian Westphal Date: Tue Aug 13 00:28:25 2024 +0200 tcp: prevent concurrent execution of tcp_sk_exit_batch Its possible that two threads call tcp_sk_exit_batch() concurrently, once from the cleanup_net workqueue, once from a task that failed to clone a new netns. In the latter case, error unwinding calls the exit handlers in reverse order for the 'failed' netns. tcp_sk_exit_batch() calls tcp_twsk_purge(). Problem is that since commit b099ce2602d8 ("net: Batch inet_twsk_purge"), this function picks up twsk in any dying netns, not just the one passed in via exit_batch list. This means that the error unwind of setup_net() can "steal" and destroy timewait sockets belonging to the exiting netns. This allows the netns exit worker to proceed to call WARN_ON_ONCE(!refcount_dec_and_test(&net->ipv4.tcp_death_row.tw_refcount)); without the expected 1 -> 0 transition, which then splats. At same time, error unwind path that is also running inet_twsk_purge() will splat as well: WARNING: .. at lib/refcount.c:31 refcount_warn_saturate+0x1ed/0x210 ... refcount_dec include/linux/refcount.h:351 [inline] inet_twsk_kill+0x758/0x9c0 net/ipv4/inet_timewait_sock.c:70 inet_twsk_deschedule_put net/ipv4/inet_timewait_sock.c:221 inet_twsk_purge+0x725/0x890 net/ipv4/inet_timewait_sock.c:304 tcp_sk_exit_batch+0x1c/0x170 net/ipv4/tcp_ipv4.c:3522 ops_exit_list+0x128/0x180 net/core/net_namespace.c:178 setup_net+0x714/0xb40 net/core/net_namespace.c:375 copy_net_ns+0x2f0/0x670 net/core/net_namespace.c:508 create_new_namespaces+0x3ea/0xb10 kernel/nsproxy.c:110 ... because refcount_dec() of tw_refcount unexpectedly dropped to 0. This doesn't seem like an actual bug (no tw sockets got lost and I don't see a use-after-free) but as erroneous trigger of debug check. Add a mutex to force strict ordering: the task that calls tcp_twsk_purge() blocks other task from doing final _dec_and_test before mutex-owner has removed all tw sockets of dying netns. Fixes: e9bd0cca09d1 ("tcp: Don't allocate tcp_death_row outside of struct netns_ipv4.") Reported-by: syzbot+8ea26396ff85d23a8929@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/0000000000003a5292061f5e4e19@google.com/ Link: https://lore.kernel.org/netdev/20240812140104.GA21559@breakpoint.cc/ Signed-off-by: Florian Westphal Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240812222857.29837-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit ad614a706b1ac83b95b333f44b8f5e70bcb37dc5 Author: Geert Uytterhoeven Date: Mon Jul 29 11:26:34 2024 +0200 drm/xe/oa/uapi: Make bit masks unsigned When building with gcc-5: In function ‘decode_oa_format.isra.26’, inlined from ‘xe_oa_set_prop_oa_format’ at drivers/gpu/drm/xe/xe_oa.c:1664:6: ././include/linux/compiler_types.h:510:38: error: call to ‘__compiletime_assert_1336’ declared with attribute error: FIELD_GET: mask is not constant [...] ./include/linux/bitfield.h:155:3: note: in expansion of macro ‘__BF_FIELD_CHECK’ __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ ^ drivers/gpu/drm/xe/xe_oa.c:1573:18: note: in expansion of macro ‘FIELD_GET’ u32 bc_report = FIELD_GET(DRM_XE_OA_FORMAT_MASK_BC_REPORT, fmt); ^ Fixes: b6fd51c62119 ("drm/xe/oa/uapi: Define and parse OA stream properties") Signed-off-by: Geert Uytterhoeven Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240729092634.2227611-1-geert+renesas@glider.be Signed-off-by: Lucas De Marchi (cherry picked from commit f2881dfdaaa9ec873dbd383ef5512fc31e576cbb) Signed-off-by: Rodrigo Vivi commit ddf6492e0e508b7c2b42c8d5a4ac82bd38ef0dd5 Author: Maarten Lankhorst Date: Tue Aug 6 12:50:44 2024 +0200 drm/xe/display: Make display suspend/resume work on discrete We should unpin before evicting all memory, and repin after GT resume. This way, we preserve the contents of the framebuffers, and won't hang on resume due to migration engine not being restored yet. Signed-off-by: Maarten Lankhorst Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240806105044.596842-3-maarten.lankhorst@linux.intel.com Signed-off-by: Maarten Lankhorst,,, (cherry picked from commit cb8f81c1753187995b7a43e79c12959f14eb32d3) Signed-off-by: Rodrigo Vivi commit 730b72480e29f63fd644f5fa57c9d46109428953 Author: Matthew Auld Date: Wed Aug 14 12:01:30 2024 +0100 drm/xe: prevent UAF around preempt fence The fence lock is part of the queue, therefore in the current design anything locking the fence should then also hold a ref to the queue to prevent the queue from being freed. However, currently it looks like we signal the fence and then drop the queue ref, but if something is waiting on the fence, the waiter is kicked to wake up at some later point, where upon waking up it first grabs the lock before checking the fence state. But if we have already dropped the queue ref, then the lock might already be freed as part of the queue, leading to uaf. To prevent this, move the fence lock into the fence itself so we don't run into lifetime issues. Alternative might be to have device level lock, or only release the queue in the fence release callback, however that might require pushing to another worker to avoid locking issues. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2454 References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2342 References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2020 Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: # v6.8+ Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240814110129.825847-2-matthew.auld@intel.com (cherry picked from commit 7116c35aacedc38be6d15bd21b2fc936eed0008b) Signed-off-by: Rodrigo Vivi commit 15939ca77d4424f736e1e4953b4da2351cc9689d Author: Matthew Brost Date: Fri Aug 9 16:28:30 2024 -0700 drm/xe: Fix tile fini sequence Only set tile->mmio.regs to NULL if not the root tile in tile_fini. The root tile mmio regs is setup ealier in MMIO init thus it should be set to NULL in mmio_fini. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Lucas De Marchi Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240809232830.3302251-1-matthew.brost@intel.com (cherry picked from commit 3396900aa273903639a1792afa4d23dc09bec291) Signed-off-by: Rodrigo Vivi commit 7090d7fc969fcc9985d7e538cfcd8a69a5f9c616 Author: Matthew Brost Date: Wed Jul 24 08:28:31 2024 -0700 drm/xe: Move VM dma-resv lock from xe_exec_queue_create to __xe_exec_queue_init The critical section which requires the VM dma-resv is the call xe_lrc_create in __xe_exec_queue_init. Move this lock to __xe_exec_queue_init holding it just around xe_lrc_create. Not only is good practice, this also fixes a locking double of the VM dma-resv in the error paths of __xe_exec_queue_init as xe_lrc_put tries to acquire this too resulting in a deadlock. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Maarten Lankhorst Signed-off-by: Matthew Brost Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240724152831.1848325-1-matthew.brost@intel.com (cherry picked from commit 549dd786b61cd3db903f5d94d07fc5a89ccdbeb9) Signed-off-by: Rodrigo Vivi commit c621f70539cae731d9749c1900cd00bb70ea5c72 Author: Ashutosh Dixit Date: Sun Aug 4 23:20:57 2024 -0700 drm/xe/observation: Drop empty sysctl table entry An empty sysctl table entry was inadvertently left behind for observation sysctl. The breaks on 6.11 with the following errors: [ 219.654850] sysctl table check failed: dev/xe/(null) procname is null [ 219.654862] sysctl table check failed: dev/xe/(null) No proc_handler Drop the empty entry. Fixes: 63347fe031e3 ("drm/xe/uapi: Rename xe perf layer as xe observation layer") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2419 Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20240805062057.3547560-1-ashutosh.dixit@intel.com (cherry picked from commit be1dec570b6f5a29ce9c99334c52bea94c28914b) Signed-off-by: Rodrigo Vivi commit f4b2a0ae1a31fd3d1b5ca18ee08319b479cf9b5f Author: Lucas De Marchi Date: Wed Jul 24 14:53:09 2024 -0700 drm/xe: Fix opregion leak Being part o the display, ideally the setup and cleanup would be done by display itself. However this is a bigger refactor that needs to be done on both i915 and xe. For now, just fix the leak: unreferenced object 0xffff8881a0300008 (size 192): comm "modprobe", pid 4354, jiffies 4295647021 hex dump (first 32 bytes): 00 00 87 27 81 88 ff ff 18 80 9b 00 00 c9 ff ff ...'............ 18 81 9b 00 00 c9 ff ff 00 00 00 00 00 00 00 00 ................ backtrace (crc 99260e31): [] kmemleak_alloc+0x4b/0x80 [] kmalloc_trace_noprof+0x312/0x3d0 [] intel_opregion_setup+0x89/0x700 [xe] [] xe_display_init_noirq+0x2f/0x90 [xe] [] xe_device_probe+0x7a3/0xbf0 [xe] [] xe_pci_probe+0x333/0x5b0 [xe] [] local_pci_probe+0x48/0xb0 [] pci_device_probe+0xc8/0x280 [] really_probe+0xf8/0x390 [] __driver_probe_device+0x8a/0x170 [] driver_probe_device+0x23/0xb0 [] __driver_attach+0xc7/0x190 [] bus_for_each_dev+0x7d/0xd0 [] driver_attach+0x1e/0x30 [] bus_add_driver+0x117/0x250 Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240724215309.644423-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 6f4e43a2f771b737d991142ec4f6d4b7ff31fbb4) Signed-off-by: Rodrigo Vivi commit 5c7bb62cb8f53de71d8ab3d619be22740da0b837 Author: Hans de Goede Date: Wed Aug 14 21:01:59 2024 +0200 ACPI: video: Add backlight=native quirk for Dell OptiPlex 7760 AIO Dell All In One (AIO) models released after 2017 may use a backlight controller board connected to an UART. In DSDT this uart port will be defined as: Name (_HID, "DELL0501") Name (_CID, EisaId ("PNP0501") The Dell OptiPlex 7760 AIO has an ACPI device for one if its UARTs with the above _HID + _CID. Loading the dell-uart-backlight driver shows that there actually is a backlight controller board attached to the UART, which reports a firmware version of "G&MX01-V15". But the backlight controller board does not actually control the backlight brightness and the GPU's native backlight control method does work. Add a quirk to use the GPU's native backlight control method on this model. Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver") Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2303936 Cc: All applicable Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20240814190159.15650-4-hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki commit b5f0943001339c4d324a1af10470ce0bdd79f966 Author: Hans de Goede Date: Wed Aug 14 21:01:58 2024 +0200 platform/x86: dell-uart-backlight: Use acpi_video_get_backlight_type() The dell-uart-backlight driver supports backlight control on Dell All In One (AIO) models using a backlight controller board connected to an UART. In DSDT this uart port will be defined as: Name (_HID, "DELL0501") Name (_CID, EisaId ("PNP0501") Now the first AIO has turned up which has not only the DSDT bits for this, but also an actual controller attached to the UART, yet it is not using this controller for backlight control. Use the acpi_video_get_backlight_type() function from the ACPI video-detect code to check if the dell-uart-backlight driver should actually be used. This allows reusing the existing ACPI video-detect infra to override the backlight control method on the commandline or with DMI quirks. Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver") Cc: All applicable Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20240814190159.15650-3-hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki commit cd8e468efb4fb2742e06328a75b282c35c1abf8d Author: Hans de Goede Date: Wed Aug 14 21:01:57 2024 +0200 ACPI: video: Add Dell UART backlight controller detection Dell All In One (AIO) models released after 2017 use a backlight controller board connected to an UART. In DSDT this uart port will be defined as: Name (_HID, "DELL0501") Name (_CID, EisaId ("PNP0501") Commit 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver") has added support for this, but I neglected to tie this into acpi_video_get_backlight_type(). Now the first AIO has turned up which has not only the DSDT bits for this, but also an actual controller attached to the UART, yet it is not using this controller for backlight control. Add support to acpi_video_get_backlight_type() for a new dell_uart backlight type. So that the existing infra to override the backlight control method on the commandline or with DMI quirks can be used. Fixes: 484bae9e4d6a ("platform/x86: Add new Dell UART backlight driver") Cc: All applicable Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20240814190159.15650-2-hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki commit cf1e515c9a40caa8bddb920970d3257bb01c1421 Author: Jinjie Ruan Date: Mon Aug 19 20:00:07 2024 +0800 iommufd/selftest: Make dirty_ops static The sparse tool complains as follows: drivers/iommu/iommufd/selftest.c:277:30: warning: symbol 'dirty_ops' was not declared. Should it be static? This symbol is not used outside of selftest.c, so marks it static. Fixes: 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") Link: https://patch.msgid.link/r/20240819120007.3884868-1-ruanjinjie@huawei.com Signed-off-by: Jinjie Ruan Reviewed-by: Yi Liu Signed-off-by: Jason Gunthorpe commit 1e557246f8dbdb476f7112ab58d2de947f22acc5 Merge: 2d7423040b7cc d7818402b1d80 Author: David S. Miller Date: Mon Aug 19 09:54:24 2024 +0100 Merge branch 'selftests-udpgro-fixes' Hangbin Liu says: ==================== selftests: Fix udpgro failures There are 2 issues for the current udpgro test. The first one is the testing doesn't record all the failures, which may report pass but the test actually failed. e.g. https://netdev-3.bots.linux.dev/vmksft-net/results/725661/45-udpgro-sh/stdout The other one is after commit d7db7775ea2e ("net: veth: do not manipulate GRO when using XDP"), there is no need to load xdp program to enable GRO on veth device. ==================== Signed-off-by: David S. Miller commit d7818402b1d80347c764001583f6d63fa68c2e1a Author: Hangbin Liu Date: Thu Aug 15 15:59:51 2024 +0800 selftests: udpgro: no need to load xdp for gro After commit d7db7775ea2e ("net: veth: do not manipulate GRO when using XDP"), there is no need to load XDP program to enable GRO. On the other hand, the current test is failed due to loading the XDP program. e.g. # selftests: net: udpgro.sh # ipv4 # no GRO ok # no GRO chk cmsg ok # GRO ./udpgso_bench_rx: recv: bad packet len, got 1472, expected 14720 # # failed [...] # bad GRO lookup ok # multiple GRO socks ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 # # ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 # # failed ok 1 selftests: net: udpgro.sh After fix, all the test passed. # ./udpgro.sh ipv4 no GRO ok [...] multiple GRO socks ok Fixes: d7db7775ea2e ("net: veth: do not manipulate GRO when using XDP") Reported-by: Yi Chen Closes: https://issues.redhat.com/browse/RHEL-53858 Reviewed-by: Toke Høiland-Jørgensen Acked-by: Paolo Abeni Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 7167395a4be7930ecac6a33b4e54d7e3dd9ee209 Author: Hangbin Liu Date: Thu Aug 15 15:59:50 2024 +0800 selftests: udpgro: report error when receive failed Currently, we only check the latest senders's exit code. If the receiver report failed, it is not recoreded. Fix it by checking the exit code of all the involved processes. Before: bad GRO lookup ok multiple GRO socks ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 failed $ echo $? 0 After: bad GRO lookup ok multiple GRO socks ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 failed $ echo $? 1 Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Suggested-by: Paolo Abeni Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 32108c22ac619c32dd6db594319e259b63bfb387 Author: Takashi Iwai Date: Mon Aug 19 10:41:53 2024 +0200 ALSA: seq: Skip event type filtering for UMP events UMP events don't use the event type field, hence it's invalid to apply the filter, which may drop the events unexpectedly. Skip the event filtering for UMP events, instead. Fixes: 46397622a3fa ("ALSA: seq: Add UMP support") Cc: Link: https://patch.msgid.link/20240819084156.10286-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 56314c0d78d6f5a60c8804c517167991a879e14a Author: John Sweeney Date: Sun Aug 18 11:30:15 2024 -0400 ALSA: hda/realtek: Enable mute/micmute LEDs on HP Laptop 14-ey0xxx HP Pavilion Plus 14-ey0xxx needs existing quirk ALC245_FIXUP_HP_X360_MUTE_LEDS to enable its mute/micmute LEDs. Signed-off-by: John Sweeney Cc: Link: https://patch.msgid.link/E1sfhrD-0007TA-HC@rmmprod05.runbox Signed-off-by: Takashi Iwai commit e080a26725fb36f535f22ea42694c60ab005fb2e Author: Gao Xiang Date: Mon Aug 19 10:52:07 2024 +0800 erofs: allow large folios for compressed files As commit 2e6506e1c4ee ("mm/migrate: fix deadlock in migrate_pages_batch() on large folios") has landed upstream, large folios can be safely enabled for compressed inodes since all prerequisites have already landed in 6.11-rc1. Stress tests has been running on my fleet for over 20 days without any regression. Additionally, users [1] have requested it for months. Let's allow large folios for EROFS full cases upstream now for wider testing. [1] https://lore.kernel.org/r/CAGsJ_4wtE8OcpinuqVwG4jtdx6Qh5f+TON6wz+4HMCq=A2qFcA@mail.gmail.com Cc: Barry Song <21cnbao@gmail.com> Cc: Matthew Wilcox (Oracle) [ Gao Xiang: minor commit typo fixes. ] Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240819025207.3808649-1-hsiangkao@linux.alibaba.com commit a9aaf1ff88a8cb99a1335c9eb76de637f0cf8c10 Author: Bartosz Golaszewski Date: Tue Aug 13 21:07:50 2024 +0200 power: sequencing: request the WLAN enable GPIO as-is If the WCN module is powered up before linux boots and the ath11k driver probes at the same time as the power sequencing driver, we may end up driving the wlan-enable GPIO low in the latter, breaking the start-up of the WLAN module. Request the wlan-enable GPIO as-is so that if the WLAN module is already starting/started, we leave it alone. Fixes: 2f1630f437df ("power: pwrseq: add a driver for the PMU module on the QCom WCN chipsets") Reported-by: Stephan Gerhold Link: https://lore.kernel.org/r/20240813190751.155035-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit aaa4ca873d3da768896ffc909795359a01e853ef Author: Werner Sembach Date: Thu Jan 4 19:31:18 2024 +0100 Input: i8042 - use new forcenorestore quirk to replace old buggy quirk combination The old quirk combination sometimes cause a laggy keyboard after boot. With the new quirk the initial issue of an unresponsive keyboard after s3 resume is also fixed, but it doesn't have the negative side effect of the sometimes laggy keyboard. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240104183118.779778-3-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov commit 3d765ae2daccc570b3f4fbcb57eb321b12cdded2 Author: Werner Sembach Date: Thu Jan 4 19:31:17 2024 +0100 Input: i8042 - add forcenorestore quirk to leave controller untouched even on s3 On s3 resume the i8042 driver tries to restore the controller to a known state by reinitializing things, however this can confuse the controller with different effects. Mostly occasionally unresponsive keyboards after resume. These issues do not rise on s0ix resume as here the controller is assumed to preserved its state from before suspend. This patch adds a quirk for devices where the reinitialization on s3 resume is not needed and might be harmful as described above. It does this by using the s0ix resume code path at selected locations. This new quirk goes beyond what the preexisting reset=never quirk does, which only skips some reinitialization steps. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240104183118.779778-2-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov commit 5d41eeb6725e3e24853629e5d7635e4bc45d736e Author: Suraj Kandpal Date: Fri Aug 9 17:11:28 2024 +0530 drm/i915/hdcp: Use correct cp_irq_count We are checking cp_irq_count from the wrong hdcp structure which ends up giving timed out errors. We only increment the cp_irq_count of the primary connector's hdcp structure but here in case of multidisplay setup we end up checking the secondary connector's hdcp structure, which will not have its cp_irq_count incremented. This leads to a timed out at CP_IRQ error even though a CP_IRQ was raised. Extract it from the correct intel_hdcp structure. --v2 -Explain why it was the wrong hdcp structure [Jani] Fixes: 8c9e4f68b861 ("drm/i915/hdcp: Use per-device debugs") Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20240809114127.3940699-2-suraj.kandpal@intel.com (cherry picked from commit dd925902634def895690426bf10e0a8b3e56f56d) Signed-off-by: Joonas Lahtinen commit 7ce7c2283fa6843ab3c2adfeb83dcc504a107858 Author: Takashi Iwai Date: Wed Aug 14 12:06:19 2024 +0200 Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table Yet another quirk entry for Fujitsu laptop. Lifebook E756 requires i8041.nomux for keeping the touchpad working after suspend/resume. Link: https://bugzilla.suse.com/show_bug.cgi?id=1229056 Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20240814100630.2048-1-tiwai@suse.de Signed-off-by: Dmitry Torokhov commit 2c534624ae70100aeea0b5800b0f3768b2fd3cf0 Author: Hongzhen Luo Date: Tue Aug 6 19:22:08 2024 +0800 erofs: get rid of check_layout_compatibility() Simple enough to just open-code it. Signed-off-by: Hongzhen Luo Reviewed-by: Sandeep Dhavale Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20240806112208.150323-1-hongzhen@linux.alibaba.com Signed-off-by: Gao Xiang commit 5b5c96c63d5b6e91c622611e04b2b156bbae53f5 Author: Hongzhen Luo Date: Thu Aug 1 19:26:22 2024 +0800 erofs: simplify readdir operation - Use i_size instead of i_size_read() due to immutable fses; - Get rid of an unneeded goto since erofs_fill_dentries() also works; - Remove unnecessary lines. Signed-off-by: Hongzhen Luo Link: https://lore.kernel.org/r/20240801112622.2164029-1-hongzhen@linux.alibaba.com Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang commit 47cdc7b14417a40af6a5d5909f1d28a5a23fc11d Author: Kent Overstreet Date: Sat Aug 17 17:38:43 2024 -0400 bcachefs: Fix incorrect gfp flags fixes: 00488 WARNING: CPU: 9 PID: 194 at mm/page_alloc.c:4410 __alloc_pages_noprof+0x1818/0x1888 00488 Modules linked in: 00488 CPU: 9 UID: 0 PID: 194 Comm: kworker/u66:1 Not tainted 6.11.0-rc1-ktest-g18fa10d6495f #2931 00488 Hardware name: linux,dummy-virt (DT) 00488 Workqueue: writeback wb_workfn (flush-bcachefs-2) 00488 pstate: 20001005 (nzCv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--) 00488 pc : __alloc_pages_noprof+0x1818/0x1888 00488 lr : __alloc_pages_noprof+0x5f4/0x1888 00488 sp : ffffff80ccd8ed00 00488 x29: ffffff80ccd8ed00 x28: 0000000000000000 x27: dfffffc000000000 00488 x26: 0000000000000010 x25: 0000000000000002 x24: 0000000000000000 00488 x23: 0000000000000000 x22: 1ffffff0199b1dbe x21: ffffff80cc680900 00488 x20: 0000000000000000 x19: ffffff80ccd8eed0 x18: 0000000000000000 00488 x17: ffffff80cc58a010 x16: dfffffc000000000 x15: 1ffffff00474e518 00488 x14: 1ffffff00474e518 x13: 1ffffff00474e518 x12: ffffffb8104701b9 00488 x11: 1ffffff8104701b8 x10: ffffffb8104701b8 x9 : ffffffc08043cde8 00488 x8 : 00000047efb8fe48 x7 : ffffff80ccd8ee20 x6 : 0000000000048000 00488 x5 : 1ffffff810470138 x4 : 0000000000000050 x3 : 1ffffff0199b1d94 00488 x2 : ffffffb0199b1d94 x1 : 0000000000000001 x0 : ffffffc082387448 00488 Call trace: 00488 __alloc_pages_noprof+0x1818/0x1888 00488 new_slab+0x284/0x2f0 00488 ___slab_alloc+0x208/0x8e0 00488 __kmalloc_noprof+0x328/0x340 00488 __bch2_writepage+0x106c/0x1830 00488 write_cache_pages+0xa0/0xe8 due to __GFP_NOFAIL without allowing reclaim Signed-off-by: Kent Overstreet commit d9f49c3106e404776afcf6c5682357f4fe088beb Author: Kent Overstreet Date: Sat Aug 17 16:41:39 2024 -0400 bcachefs: fix field-spanning write warning attempts to retrofit memory safety onto C are increasingly annoying ------------[ cut here ]------------ memcpy: detected field-spanning write (size 4) of single field "&k.replicas" at fs/bcachefs/replicas.c:454 (size 3) WARNING: CPU: 5 PID: 6525 at fs/bcachefs/replicas.c:454 bch2_replicas_gc2+0x2cb/0x400 [bcachefs] bch2_replicas_gc2+0x2cb/0x400: bch2_replicas_gc2 at /home/ojab/src/bcachefs/fs/bcachefs/replicas.c:454 (discriminator 3) Modules linked in: dm_mod tun nf_conntrack_netlink nfnetlink xt_addrtype br_netfilter overlay msr sctp bcachefs lz4hc_compress lz4_compress libcrc32c xor raid6_pq lz4_decompress pps_ldisc pps_core wireguard libchacha20poly1305 chacha_x86_64 poly1305_x86_64 ip6_udp_tunnel udp_tunnel curve25519_x86_64 libcurve25519_generic libchacha sit tunnel4 ip_tunnel af_packet bridge stp llc ip6table_nat ip6table_filter ip6_tables xt_MASQUERADE xt_conntrack iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter ip_tables x_tables tcp_bbr sch_fq_codel efivarfs nls_iso8859_1 nls_cp437 vfat fat cdc_mbim cdc_wdm cdc_ncm cdc_ether usbnet r8152 input_leds joydev mii amdgpu mousedev hid_generic usbhid hid ath10k_pci amd_atl edac_mce_amd ath10k_core kvm_amd ath kvm mac80211 bfq crc32_pclmul crc32c_intel polyval_clmulni polyval_generic sha512_ssse3 sha256_ssse3 sha1_ssse3 snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg i2c_algo_bit drm_exec snd_hda_codec r8169 drm_suballoc_helper aesni_intel gf128mul crypto_simd amdxcp realtek mfd_core tpm_crb drm_buddy snd_hwdep mdio_devres libarc4 cryptd tpm_tis wmi_bmof cfg80211 evdev libphy snd_hda_core tpm_tis_core gpu_sched rapl xhci_pci xhci_hcd snd_pcm drm_display_helper snd_timer tpm sp5100_tco rfkill efi_pstore mpt3sas drm_ttm_helper ahci usbcore libaescfb ccp snd ttm 8250 libahci watchdog soundcore raid_class sha1_generic acpi_cpufreq k10temp 8250_base usb_common scsi_transport_sas i2c_piix4 hwmon video serial_mctrl_gpio serial_base ecdh_generic wmi rtc_cmos backlight ecc gpio_amdpt rng_core gpio_generic button CPU: 5 UID: 0 PID: 6525 Comm: bcachefs Tainted: G W 6.11.0-rc1-ojab-00058-g224bc118aec9 #6 6d5debde398d2a84851f42ab300dae32c2992027 Tainted: [W]=WARN RIP: 0010:bch2_replicas_gc2+0x2cb/0x400 [bcachefs] Code: c7 c2 60 91 d1 c1 48 89 c6 48 c7 c7 98 91 d1 c1 4c 89 14 24 44 89 5c 24 08 48 89 44 24 20 c6 05 fa 68 04 00 01 e8 05 a3 40 e4 <0f> 0b 4c 8b 14 24 44 8b 5c 24 08 48 8b 44 24 20 e9 55 fe ff ff 8b RSP: 0018:ffffb434c9263d60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff9a8efa79cc00 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffb434c9263de0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000005 R13: ffff9a8efa73c300 R14: ffff9a8d9e880000 R15: ffff9a8d9e8806f8 FS: 0000000000000000(0000) GS:ffff9a9410c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000565423373090 CR3: 0000000164e30000 CR4: 00000000003506f0 Call Trace: ? __warn+0x97/0x150 ? bch2_replicas_gc2+0x2cb/0x400 [bcachefs 9803eca5e131ef28f26250ede34072d5b50d98b3] bch2_replicas_gc2+0x2cb/0x400: bch2_replicas_gc2 at /home/ojab/src/bcachefs/fs/bcachefs/replicas.c:454 (discriminator 3) ? report_bug+0x196/0x1c0 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x17/0x80 ? __wake_up_klogd.part.0+0x4c/0x80 ? asm_exc_invalid_op+0x16/0x20 ? bch2_replicas_gc2+0x2cb/0x400 [bcachefs 9803eca5e131ef28f26250ede34072d5b50d98b3] bch2_replicas_gc2+0x2cb/0x400: bch2_replicas_gc2 at /home/ojab/src/bcachefs/fs/bcachefs/replicas.c:454 (discriminator 3) ? bch2_dev_usage_read+0xa0/0xa0 [bcachefs 9803eca5e131ef28f26250ede34072d5b50d98b3] bch2_dev_usage_read+0xa0/0xa0: discard_in_flight_remove at /home/ojab/src/bcachefs/fs/bcachefs/alloc_background.c:1712 Signed-off-by: Kent Overstreet commit d6d539c9a7ad0655e5ad46b5e869f1b20bce8953 Author: Kent Overstreet Date: Sat Aug 17 19:51:13 2024 -0400 bcachefs: Reallocate table when we're increasing size Fixes: c2f6e16a6771 ("bcachefs: Increase size of cuckoo hash table on too many rehashes") Signed-off-by: Kent Overstreet commit 7c525dddbee71880e654ad44f3917787a4f6042c Author: Thorsten Blum Date: Fri Aug 16 19:33:39 2024 +0200 ksmbd: Replace one-element arrays with flexible-array members Replace the deprecated one-element arrays with flexible-array members in the structs filesystem_attribute_info and filesystem_device_info. There are no binary differences after this conversion. Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Thorsten Blum Reviewed-by: Gustavo A. R. Silva Acked-by: Namjae Jeon Signed-off-by: Steve French commit 4fdd8664c8a94411a01d11d5ed2f083f105f570a Author: Victor Timofei Date: Fri Aug 16 22:24:52 2024 +0300 ksmbd: fix spelling mistakes in documentation There are a couple of spelling mistakes in the documentation. This patch fixes them. Signed-off-by: Victor Timofei Acked-by: Namjae Jeon Signed-off-by: Steve French commit 76e98a158b207771a6c9a0de0a60522a446a3447 Author: Namjae Jeon Date: Sat Aug 17 14:03:49 2024 +0900 ksmbd: fix race condition between destroy_previous_session() and smb2 operations() If there is ->PreviousSessionId field in the session setup request, The session of the previous connection should be destroyed. During this, if the smb2 operation requests in the previous session are being processed, a racy issue could happen with ksmbd_destroy_file_table(). This patch sets conn->status to KSMBD_SESS_NEED_RECONNECT to block incoming operations and waits until on-going operations are complete (i.e. idle) before desctorying the previous session. Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2") Cc: stable@vger.kernel.org # v6.6+ Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-25040 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit dfd046d0ced19b6ff5f11ec4ceab0a83de924771 Author: Namjae Jeon Date: Thu Aug 15 08:56:35 2024 +0900 ksmbd: Use unsafe_memcpy() for ntlm_negotiate rsp buffer is allocated larger than spnego_blob from smb2_allocate_rsp_buf(). Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit e4be320eeca842a3d7648258ee3673f1755a5a59 Author: Steve French Date: Thu Aug 15 18:31:36 2024 -0500 smb3: fix broken cached reads when posix locks Mandatory locking is enforced for cached reads, which violates default posix semantics, and also it is enforced inconsistently. This affected recent versions of libreoffice, and can be demonstrated by opening a file twice from the same client, locking it from handle one and trying to read from it from handle two (which fails, returning EACCES). There is already a mount option "forcemandatorylock" (which defaults to off), so with this change only when the user intentionally specifies "forcemandatorylock" on mount will we break posix semantics on read to a locked range (ie we will only fail in this case, if the user mounts with "forcemandatorylock"). An earlier patch fixed the write path. Fixes: 85160e03a79e ("CIFS: Implement caching mechanism for mandatory brlocks") Cc: stable@vger.kernel.org Cc: Pavel Shilovsky Reviewed-by: David Howells Reported-by: abartlet@samba.org Reported-by: Kevin Ottens Signed-off-by: Steve French commit 47ac09b91befbb6a235ab620c32af719f8208399 Author: Linus Torvalds Date: Sun Aug 18 13:17:27 2024 -0700 Linux 6.11-rc4 commit ccdbf91fdf5a71881ef32b41797382c4edd6f670 Merge: e1bc113215ab2 cdd1fa91a6b8c Author: Linus Torvalds Date: Sun Aug 18 10:19:49 2024 -0700 Merge tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver fixes for regressions from 6.11-rc1 due to the driver core change making a structure in a driver core callback const. These were missed by all testing EXCEPT for what Bart happened to be running, so I appreciate the fixes provided here for some odd/not-often-used driver subsystems that nothing else happened to catch. Both of these fixes have been in linux-next all week with no reported issues" * tag 'driver-core-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: mips: sgi-ip22: Fix the build ARM: riscpc: ecard: Fix the build commit e1bc113215ab2875ab52fbbd76a54b5583f67e61 Merge: 394f33f9b3f40 2374bf7558de9 Author: Linus Torvalds Date: Sun Aug 18 10:16:34 2024 -0700 Merge tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc fixes from Greg KH: "Here are some small char/misc fixes for 6.11-rc4 to resolve reported problems. Included in here are: - fastrpc revert of a change that broke userspace - xillybus fixes for reported issues Half of these have been in linux-next this week with no reported problems, I don't know if the last bit of xillybus driver changes made it in, but they are 'obviously correct' so will be safe :)" * tag 'char-misc-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: char: xillybus: Check USB endpoints when probing device char: xillybus: Refine workqueue handling Revert "misc: fastrpc: Restrict untrusted app to attach to privileged PD" char: xillybus: Don't destroy workqueue from work item running on it commit 394f33f9b3f40dcdd0304f17186d28a0342e8763 Merge: 3d9061d22bef2 0863bffda1131 Author: Linus Torvalds Date: Sun Aug 18 10:10:48 2024 -0700 Merge tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial fixes from Greg KH: "Here are some small tty and serial driver fixes for 6.11-rc4 to resolve some reported problems. Included in here are: - conmakehash.c userspace build issues - fsl_lpuart driver fix - 8250_omap revert for reported regression - atmel_serial rts flag fix All of these have been in linux-next this week with no reported issues" * tag 'tty-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "serial: 8250_omap: Set the console genpd always on if no console suspend" tty: atmel_serial: use the correct RTS flag. tty: vt: conmakehash: remove non-portable code printing comment header tty: serial: fsl_lpuart: mark last busy before uart_add_one_port commit 3d9061d22bef282dfd993f9481a1f0cb755bd7f6 Merge: 57b14823ea685 af8e119f52e9c Author: Linus Torvalds Date: Sun Aug 18 09:59:06 2024 -0700 Merge tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt driver fixes from Greg KH: "Here are some small USB and Thunderbolt driver fixes for 6.11-rc4 to resolve some reported issues. Included in here are: - thunderbolt driver fixes for reported problems - typec driver fixes - xhci fixes - new device id for ljca usb driver All of these have been in linux-next this week with no reported issues" * tag 'usb-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration usb: misc: ljca: Add Lunar Lake ljca GPIO HID to ljca_gpio_hids[] Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET" usb: typec: ucsi: Fix the return value of ucsi_run_command() usb: xhci: fix duplicate stall handling in handle_tx_event() usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup() thunderbolt: Mark XDomain as unplugged when router is removed thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write() commit 57b14823ea68592bd67e4992a2bf0dd67abb68d6 Merge: 3c0da3d163eb3 534f7eff9239c Author: Linus Torvalds Date: Sun Aug 18 08:50:36 2024 -0700 Merge tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull more btrfs fixes from David Sterba: "A more fixes. We got reports that shrinker added in 6.10 still causes latency spikes and the fixes don't handle all corner cases. Due to summer holidays we're taking a shortcut to disable it for release builds and will fix it in the near future. - only enable extent map shrinker for DEBUG builds, temporary quick fix to avoid latency spikes for regular builds - update target inode's ctime on unlink, mandated by POSIX - properly take lock to read/update block group's zoned variables - add counted_by() annotations" * tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: only enable extent map shrinker for DEBUG builds btrfs: zoned: properly take lock to read/update block group's zoned variables btrfs: tree-checker: add dev extent item checks btrfs: update target inode's ctime on unlink btrfs: send: annotate struct name_cache_entry with __counted_by() commit 3c0da3d163eb32f1f91891efaade027fa9b245b9 Author: Jann Horn Date: Tue Aug 6 21:51:42 2024 +0200 fuse: Initialize beyond-EOF page contents before setting uptodate fuse_notify_store(), unlike fuse_do_readpage(), does not enable page zeroing (because it can be used to change partial page contents). So fuse_notify_store() must be more careful to fully initialize page contents (including parts of the page that are beyond end-of-file) before marking the page uptodate. The current code can leave beyond-EOF page contents uninitialized, which makes these uninitialized page contents visible to userspace via mmap(). This is an information leak, but only affects systems which do not enable init-on-alloc (via CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y or the corresponding kernel command line parameter). Link: https://bugs.chromium.org/p/project-zero/issues/detail?id=2574 Cc: stable@kernel.org Fixes: a1d75f258230 ("fuse: add store request") Signed-off-by: Jann Horn Signed-off-by: Linus Torvalds commit c3f2d783a459980eafd24c5af94ccd56a615961f Merge: 810996a36309a 2e6506e1c4eed Author: Linus Torvalds Date: Sat Aug 17 19:50:16 2024 -0700 Merge tag 'mm-hotfixes-stable-2024-08-17-19-34' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "16 hotfixes. All except one are for MM. 10 of these are cc:stable and the others pertain to post-6.10 issues. As usual with these merges, singletons and doubletons all over the place, no identifiable-by-me theme. Please see the lovingly curated changelogs to get the skinny" * tag 'mm-hotfixes-stable-2024-08-17-19-34' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm/migrate: fix deadlock in migrate_pages_batch() on large folios alloc_tag: mark pages reserved during CMA activation as not tagged alloc_tag: introduce clear_page_tag_ref() helper function crash: fix riscv64 crash memory reserve dead loop selftests: memfd_secret: don't build memfd_secret test on unsupported arches mm: fix endless reclaim on machines with unaccepted memory selftests/mm: compaction_test: fix off by one in check_compaction() mm/numa: no task_numa_fault() call if PMD is changed mm/numa: no task_numa_fault() call if PTE is changed mm/vmalloc: fix page mapping if vm_area_alloc_pages() with high order fallback to order 0 mm/memory-failure: use raw_spinlock_t in struct memory_failure_cpu mm: don't account memmap per-node mm: add system wide stats items category mm: don't account memmap on failure mm/hugetlb: fix hugetlb vs. core-mm PT locking mseal: fix is_madv_discard() commit 810996a36309a56a39b406d9ad2903115714228f Merge: e0fac5fc8b765 227bbaabe64b6 Author: Linus Torvalds Date: Sat Aug 17 19:23:02 2024 -0700 Merge tag 'powerpc-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix crashes on 85xx with some configs since the recent hugepd rework. - Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL on some platforms. - Don't enable offline cores when changing SMT modes, to match existing userspace behaviour. Thanks to Christophe Leroy, Dr. David Alan Gilbert, Guenter Roeck, Nysal Jan K.A, Shrikanth Hegde, Thomas Gleixner, and Tyrel Datwyler. * tag 'powerpc-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/topology: Check if a core is online cpu/SMT: Enable SMT only if a core is online powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL powerpc/mm: Fix size of allocated PGDIR soc: fsl: qbman: remove unused struct 'cgr_comp' commit e0fac5fc8b7657ee82a7d23eeac564182dbf51fd Merge: 98a1b2d71f9fa 5b4f3af39b658 Author: Linus Torvalds Date: Sat Aug 17 16:31:12 2024 -0700 Merge tag 'v6.11-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - fix for clang warning - additional null check - fix for cached write with posix locks - flexible structure fix * tag 'v6.11-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: smb2pdu.h: Use static_assert() to check struct sizes smb3: fix lock breakage for cached writes smb/client: avoid possible NULL dereference in cifs_free_subrequest() commit 98a1b2d71f9fac01c7aba80f30235b1b2e8234da Merge: df6cbc62cc9b3 87cea484951eb Author: Linus Torvalds Date: Sat Aug 17 16:23:05 2024 -0700 Merge tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C core fix replacing IS_ENABLED() with IS_REACHABLE() For host drivers, there are two fixes: - Tegra I2C Controller: Addresses a potential double-locking issue during probe. ACPI devices are not IRQ-safe when invoking runtime suspend and resume functions, so the irq_safe flag should not be set. - Qualcomm GENI I2C Controller: Fixes an oversight in the exit path of the runtime_resume() function, which was missed in the previous release" * tag 'i2c-for-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: tegra: Do not mark ACPI devices as irq safe i2c: Use IS_REACHABLE() for substituting empty ACPI functions i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 Author: Krzysztof Kozlowski Date: Mon Jul 29 16:01:57 2024 +0200 soundwire: stream: fix programming slave ports for non-continous port maps Two bitmasks in 'struct sdw_slave_prop' - 'source_ports' and 'sink_ports' - define which ports to program in sdw_program_slave_port_params(). The masks are used to get the appropriate data port properties ('struct sdw_get_slave_dpn_prop') from an array. Bitmasks can be non-continuous or can start from index different than 0, thus when looking for matching port property for given port, we must iterate over mask bits, not from 0 up to number of ports. This fixes allocation and programming slave ports, when a source or sink masks start from further index. Fixes: f8101c74aa54 ("soundwire: Add Master and Slave port programming") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20240729140157.326450-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit df6cbc62cc9b3bcf593d13400dd58cd339a0f56d Merge: d09840f8b362d 8c6b808c8c2a9 Author: Linus Torvalds Date: Sat Aug 17 10:04:01 2024 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes to the mpi3mr driver. One to avoid oversize allocations in tracing and the other to fix an uninitialized spinlock in the user to driver feature request code (used to trigger dumps and the like)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpi3mr: Avoid MAX_PAGE_ORDER WARNING for buffer allocations scsi: mpi3mr: Add missing spin_lock_init() for mrioc->trigger_lock commit d09840f8b362d16a0722d300a6c7c8cca626e628 Merge: b71817585383d 8d16762047c62 Author: Linus Torvalds Date: Sat Aug 17 09:51:28 2024 -0700 Merge tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Chandan Babu: - Check for presence of only 'attr' feature before scrubbing an inode's attribute fork. - Restore the behaviour of setting AIL thread to TASK_INTERRUPTIBLE for long (i.e. 50ms) sleep durations to prevent high load averages. - Do not allow users to change the realtime flag of a file unless the datadev and rtdev both support fsdax access modes. * tag 'xfs-6.11-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: conditionally allow FS_XFLAG_REALTIME changes if S_DAX is set xfs: revert AIL TASK_KILLABLE threshold xfs: attr forks require attr, not attr2 commit b71817585383d96ddc51ebd126f6253fdb9a8568 Merge: e5fa841af679c 0e49d3ff12501 Author: Linus Torvalds Date: Sat Aug 17 09:46:10 2024 -0700 Merge tag 'bcachefs-2024-08-16' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent OverstreetL - New on disk format version, bcachefs_metadata_version_disk_accounting_inum This adds one more disk accounting counter, which counts disk usage and number of extents per inode number. This lets us track fragmentation, for implementing defragmentation later, and it also counts disk usage per inode in all snapshots, which will be a useful thing to expose to users. - One performance issue we've observed is threads spinning when they should be waiting for dirty keys in the key cache to be flushed by journal reclaim, so we now have hysteresis for the waiting thread, as well as improving the tracepoint and a new time_stat, for tracking time blocked waiting on key cache flushing. ... and various assorted smaller fixes. * tag 'bcachefs-2024-08-16' of git://evilpiepirate.org/bcachefs: bcachefs: Fix locking in __bch2_trans_mark_dev_sb() bcachefs: fix incorrect i_state usage bcachefs: avoid overflowing LRU_TIME_BITS for cached data lru bcachefs: Fix forgetting to pass trans to fsck_err() bcachefs: Increase size of cuckoo hash table on too many rehashes bcachefs: bcachefs_metadata_version_disk_accounting_inum bcachefs: Kill __bch2_accounting_mem_mod() bcachefs: Make bkey_fsck_err() a wrapper around fsck_err() bcachefs: Fix warning in __bch2_fsck_err() for trans not passed in bcachefs: Add a time_stat for blocked on key cache flush bcachefs: Improve trans_blocked_journal_reclaim tracepoint bcachefs: Add hysteresis to waiting on btree key cache flush lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc() bcachefs: Convert for_each_btree_node() to lockrestart_do() bcachefs: Add missing downgrade table entry bcachefs: disk accounting: ignore unknown types bcachefs: bch2_accounting_invalid() fixup bcachefs: Fix bch2_trigger_alloc when upgrading from old versions bcachefs: delete faulty fastpath in bch2_btree_path_traverse_cached() commit 0a3b517c8089aa4cf339f41460d542c681409386 Author: Jean-Baptiste Maneyrol Date: Wed Aug 14 14:37:35 2024 +0000 iio: imu: inv_mpu6050: fix interrupt status read for old buggy chips Interrupt status read seems to be broken on some old MPU-6050 like chips. Fix by reverting to previous driver behavior bypassing interrupt status read. This is working because these chips are not supporting WoM and data ready is the only interrupt source. Fixes: 5537f653d9be ("iio: imu: inv_mpu6050: add new interrupt handler for WoM events") Cc: stable@vger.kernel.org Signed-off-by: Jean-Baptiste Maneyrol Tested-by: Svyatoslav Ryhel # LG P895 Tested-by: Andreas Westman Dorcsak # LG P880 Link: https://patch.msgid.link/20240814143735.327302-1-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit f242967f4d1c024ac42bb47ea50b6360b4cb4556 Author: Dumitru Ceclan Date: Fri Aug 9 16:49:08 2024 +0300 iio: adc: ad7173: fix GPIO device info Models AD4114/5/6 have .higher_gpio_bits = true. This is not correct as the only models that have the GPIO bits to a higher position are AD4111/2. Fix by removing the higher_gpio_bits = true from the AD4114/5/6 models. Fixes: 13d12e3ad12d ("iio: adc: ad7173: Add support for AD411x devices") Signed-off-by: Dumitru Ceclan Link: https://patch.msgid.link/20240809134909.26829-1-dumitru.ceclan@analog.com Cc: Signed-off-by: Jonathan Cameron commit 2d7423040b7cca0beb385e67b660ca524c670ff9 Merge: a0c9fe5eecc97 538fd3921afac Author: Jakub Kicinski Date: Fri Aug 16 19:07:30 2024 -0700 Merge tag 'for-net-2024-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - MGMT: Add error handling to pair_device() - HCI: Invert LE State quirk to be opt-out rather then opt-in - hci_core: Fix LE quote calculation - SMP: Fix assumption of Central always being Initiator * tag 'for-net-2024-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: MGMT: Add error handling to pair_device() Bluetooth: SMP: Fix assumption of Central always being Initiator Bluetooth: hci_core: Fix LE quote calculation Bluetooth: HCI: Invert LE State quirk to be opt-out rather then opt-in ==================== Link: https://patch.msgid.link/20240815171950.1082068-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit cbaac68987b8699397df29413b33bd51f5255255 Author: Martin K. Petersen Date: Fri Aug 16 20:53:10 2024 -0400 scsi: sd: Do not attempt to configure discard unless LBPME is set Commit f874d7210d88 ("scsi: sd: Keep the discard mode stable") attempted to address an issue where one mode of discard operation got configured prior to the device completing full discovery. Unfortunately this change assumed discard was always enabled on the device. Do not attempt to configure discard unless LBPME is enabled. Link: https://lore.kernel.org/r/20240817005325.3319384-1-martin.petersen@oracle.com Fixes: f874d7210d88 ("scsi: sd: Keep the discard mode stable") Reported-by: Chris Bainbridge Tested-by: Chris Bainbridge Tested-by: Shin'ichiro Kawasaki Tested-by: John Garry Signed-off-by: Martin K. Petersen commit cd612b57c3672487ae8565855eaf9e83862eccc5 Author: Simon Horman Date: Fri Aug 16 13:59:56 2024 +0100 scsi: MAINTAINERS: Add header files to SCSI SUBSYSTEM This is part of an effort to assign a section in MAINTAINERS to header files that relate to Networking [1]. In this case the files with "net" in their name. [1] https://lore.kernel.org/netdev/20240816-net-mnt-v1-0-ef946b47ced4@kernel.org/ As part of that effort these files came up: * include/uapi/scsi/scsi_netlink_fc.h * include/uapi/scsi/scsi_netlink.h Unlike all the other matching files, these one seem to relate more closely to SCSI than Networking, so I have added them to the SCSI SUBSYSTEM section. In order to simplify things, and for consistency, I have added the entire include/uapi/scsi rather than the individual files. Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20240816-scsi-mnt-v1-1-439af8b1c28b@kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit ea593e028a9cc523557b4084a61d87ae69e2f270 Author: Manivannan Sadhasivam Date: Fri Aug 16 11:55:11 2024 +0530 scsi: ufs: qcom: Add UFSHCD_QUIRK_BROKEN_LSDBS_CAP for SM8550 SoC SM8550 SoC has the UFSHCI 4.0 compliant UFS controller and only supports legacy single doorbell mode without MCQ. But due to a hardware bug, it reports 1 in the 'Legacy Queue & Single Doorbell Support (LSDBS)' field of the Controller Capabilities register. This field is supposed to read as 0 if legacy single doorbell mode is supported and 1 otherwise. Starting with commit 0c60eb0cc320 ("scsi: ufs: core: Check LSDBS cap when !mcq"), ufshcd driver is now relying on the LSDBS field to decide when to use the legacy doorbell mode if MCQ is not supported. And this ends up breaking UFS on SM8550: ufshcd-qcom 1d84000.ufs: ufshcd_init: failed to initialize (legacy doorbell mode not supported) ufshcd-qcom 1d84000.ufs: error -EINVAL: Initialization failed with error -22 So use the UFSHCD_QUIRK_BROKEN_LSDBS_CAP quirk for SM8550 SoC so that the ufshcd driver could use legacy doorbell mode correctly. Fixes: 0c60eb0cc320 ("scsi: ufs: core: Check LSDBS cap when !mcq") Tested-by: Amit Pundir Reviewed-by: Bart Van Assche Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240816-ufs-bug-fix-v3-2-e6fe0e18e2a3@linaro.org Signed-off-by: Martin K. Petersen commit cd06b713a6880997ca5aecac8e33d5f9c541749e Author: Manivannan Sadhasivam Date: Fri Aug 16 11:55:10 2024 +0530 scsi: ufs: core: Add a quirk for handling broken LSDBS field in controller capabilities register 'Legacy Queue & Single Doorbell Support (LSDBS)' field in the controller capabilities register is supposed to report whether the legacy single doorbell mode is supported in the controller or not. But some controllers report '1' in this field which corresponds to 'LSDB not supported', but they indeed support LSDB. So let's add a quirk to handle those controllers. If the quirk is enabled by the controller driver, then LSDBS register field will be ignored and legacy single doorbell mode is assumed to be enabled always. Tested-by: Amit Pundir Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240816-ufs-bug-fix-v3-1-e6fe0e18e2a3@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a0c9fe5eecc97680323ee83780ea3eaf440ba1b7 Author: Simon Horman Date: Thu Aug 15 16:37:13 2024 +0100 tc-testing: don't access non-existent variable on exception Since commit 255c1c7279ab ("tc-testing: Allow test cases to be skipped") the variable test_ordinal doesn't exist in call_pre_case(). So it should not be accessed when an exception occurs. This resolves the following splat: ... During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".../tdc.py", line 1028, in main() File ".../tdc.py", line 1022, in main set_operation_mode(pm, parser, args, remaining) File ".../tdc.py", line 966, in set_operation_mode catresults = test_runner_serial(pm, args, alltests) File ".../tdc.py", line 642, in test_runner_serial (index, tsr) = test_runner(pm, args, alltests) File ".../tdc.py", line 536, in test_runner res = run_one_test(pm, args, index, tidx) File ".../tdc.py", line 419, in run_one_test pm.call_pre_case(tidx) File ".../tdc.py", line 146, in call_pre_case print('test_ordinal is {}'.format(test_ordinal)) NameError: name 'test_ordinal' is not defined Fixes: 255c1c7279ab ("tc-testing: Allow test cases to be skipped") Signed-off-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://patch.msgid.link/20240815-tdc-test-ordinal-v1-1-0255c122a427@kernel.org Signed-off-by: Jakub Kicinski commit f03e94f23b04c2b71c0044c1534921b3975ef10c Author: Chaotian Jing Date: Tue Aug 13 13:34:10 2024 +0800 scsi: core: Fix the return value of scsi_logical_block_count() scsi_logical_block_count() should return the block count of a given SCSI command. The original implementation ended up shifting twice, leading to an incorrect count being returned. Fix the conversion between bytes and logical blocks. Cc: stable@vger.kernel.org Fixes: 6a20e21ae1e2 ("scsi: core: Add helper to return number of logical blocks in a request") Signed-off-by: Chaotian Jing Link: https://lore.kernel.org/r/20240813053534.7720-1-chaotian.jing@mediatek.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2fa62ce91a52e704716d08f9a8eb3f9e7e04710d Author: Yihang Li Date: Wed Aug 14 12:01:24 2024 +0800 scsi: MAINTAINERS: Update HiSilicon SAS controller driver maintainer Add Yihang Li as the maintainer of the HiSilicon SAS controller driver, replacing Xiang Chen. Signed-off-by: Yihang Li Link: https://lore.kernel.org/r/20240814040124.1376195-1-liyihang9@huawei.com Signed-off-by: Martin K. Petersen commit 0e49d3ff12501adaafaf6fdb19699f021d1eda1c Author: Kent Overstreet Date: Sat May 4 23:48:58 2024 -0400 bcachefs: Fix locking in __bch2_trans_mark_dev_sb() We run this in full RW mode now, so we have to guard against the superblock buffer being reallocated. Signed-off-by: Kent Overstreet commit e5fa841af679cb830da6c609c740a37bdc0b8b35 Merge: c2cdb13a34d95 046667c4d3196 Author: Linus Torvalds Date: Fri Aug 16 17:08:02 2024 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull memcg-v1 fix from Al Viro: "memcg_write_event_control() oops fix" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: memcg_write_event_control(): fix a user-triggerable oops commit c2cdb13a34d950e61e3b53af0c5f9eb828710beb Merge: 216595b708dac f75c235565f90 Author: Linus Torvalds Date: Fri Aug 16 17:02:32 2024 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Fix the arm64 __get_mem_asm() to use the _ASM_EXTABLE_##type##ACCESS() macro instead of the *_ERR() one in order to avoid writing -EFAULT to the value register in case of a fault - Initialise all elements of the acpi_early_node_map[] to NUMA_NO_NODE. Prior to this fix, only the first element was initialised - Move the KASAN random tag seed initialisation after the per-CPU areas have been initialised (prng_state is __percpu) * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix KASAN random tag seed initialization arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE arm64: uaccess: correct thinko in __get_mem_asm() commit 216595b708dac1707fc68d48042738d6d559ddd5 Merge: 85652baa895b5 39a3396558fb9 Author: Linus Torvalds Date: Fri Aug 16 16:59:05 2024 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One fix for the new T-Head TH1520 clk driver that marks a bus clk critical so that it isn't turned off during late init which breaks emmc-sdio" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: thead: fix dependency on clk_ignore_unused commit 0373d71215a2062fb9eaf82ab0ac09c87d067f9f Merge: 3d93a1448ed01 607e1df7bd47f Author: Jakub Kicinski Date: Fri Aug 16 16:15:58 2024 -0700 Merge branch 'mlx5-misc-fixes-2024-08-15' Tariq Toukan says: ==================== mlx5 misc fixes 2024-08-15 This patchset provides misc bug fixes from the team to the mlx5 driver. ==================== Link: https://patch.msgid.link/20240815071611.2211873-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 607e1df7bd47fe91cab85a97f57870a26d066137 Author: Patrisious Haddad Date: Thu Aug 15 10:16:11 2024 +0300 net/mlx5: Fix IPsec RoCE MPV trace call Prevent the call trace below from happening, by not allowing IPsec creation over a slave, if master device doesn't support IPsec. WARNING: CPU: 44 PID: 16136 at kernel/locking/rwsem.c:240 down_read+0x75/0x94 Modules linked in: esp4_offload esp4 act_mirred act_vlan cls_flower sch_ingress mlx5_vdpa vringh vhost_iotlb vdpa mst_pciconf(OE) nfsv3 nfs_acl nfs lockd grace fscache netfs xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 rfkill cuse fuse rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_target_mod target_core_mod ib_umad ib_iser libiscsi scsi_transport_iscsi rdma_cm ib_ipoib iw_cm ib_cm ipmi_ssif intel_rapl_msr intel_rapl_common amd64_edac edac_mce_amd kvm_amd kvm irqbypass crct10dif_pclmul crc32_pclmul mlx5_ib ghash_clmulni_intel sha1_ssse3 dell_smbios ib_uverbs aesni_intel crypto_simd dcdbas wmi_bmof dell_wmi_descriptor cryptd pcspkr ib_core acpi_ipmi sp5100_tco ccp i2c_piix4 ipmi_si ptdma k10temp ipmi_devintf ipmi_msghandler acpi_power_meter acpi_cpufreq ext4 mbcache jbd2 sd_mod t10_pi sg mgag200 drm_kms_helper syscopyarea sysfillrect mlx5_core sysimgblt fb_sys_fops cec ahci libahci mlxfw drm pci_hyperv_intf libata tg3 sha256_ssse3 tls megaraid_sas i2c_algo_bit psample wmi dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mst_pci] CPU: 44 PID: 16136 Comm: kworker/44:3 Kdump: loaded Tainted: GOE 5.15.0-20240509.el8uek.uek7_u3_update_v6.6_ipsec_bf.x86_64 #2 Hardware name: Dell Inc. PowerEdge R7525/074H08, BIOS 2.0.3 01/15/2021 Workqueue: events xfrm_state_gc_task RIP: 0010:down_read+0x75/0x94 Code: 00 48 8b 45 08 65 48 8b 14 25 80 fc 01 00 83 e0 02 48 09 d0 48 83 c8 01 48 89 45 08 5d 31 c0 89 c2 89 c6 89 c7 e9 cb 88 3b 00 <0f> 0b 48 8b 45 08 a8 01 74 b2 a8 02 75 ae 48 89 c2 48 83 ca 02 f0 RSP: 0018:ffffb26387773da8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffa08b658af900 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ff886bc5e1366f2f RDI: 0000000000000000 RBP: ffffa08b658af940 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffa0a9bfb31540 R13: ffffa0a9bfb37900 R14: 0000000000000000 R15: ffffa0a9bfb37905 FS: 0000000000000000(0000) GS:ffffa0a9bfb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a45ed814e8 CR3: 000000109038a000 CR4: 0000000000350ee0 Call Trace: ? show_trace_log_lvl+0x1d6/0x2f9 ? show_trace_log_lvl+0x1d6/0x2f9 ? mlx5_devcom_for_each_peer_begin+0x29/0x60 [mlx5_core] ? down_read+0x75/0x94 ? __warn+0x80/0x113 ? down_read+0x75/0x94 ? report_bug+0xa4/0x11d ? handle_bug+0x35/0x8b ? exc_invalid_op+0x14/0x75 ? asm_exc_invalid_op+0x16/0x1b ? down_read+0x75/0x94 ? down_read+0xe/0x94 mlx5_devcom_for_each_peer_begin+0x29/0x60 [mlx5_core] mlx5_ipsec_fs_roce_tx_destroy+0xb1/0x130 [mlx5_core] tx_destroy+0x1b/0xc0 [mlx5_core] tx_ft_put+0x53/0xc0 [mlx5_core] mlx5e_xfrm_free_state+0x45/0x90 [mlx5_core] ___xfrm_state_destroy+0x10f/0x1a2 xfrm_state_gc_task+0x81/0xa9 process_one_work+0x1f1/0x3c6 worker_thread+0x53/0x3e4 ? process_one_work.cold+0x46/0x3c kthread+0x127/0x144 ? set_kthread_struct+0x60/0x52 ret_from_fork+0x22/0x2d ---[ end trace 5ef7896144d398e1 ]--- Fixes: dfbd229abeee ("net/mlx5: Configure IPsec steering for egress RoCEv2 MPV traffic") Reviewed-by: Leon Romanovsky Signed-off-by: Patrisious Haddad Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240815071611.2211873-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit a07e953dafe5ebd88942dc861dfb06eaf055fb07 Author: Carolina Jubran Date: Thu Aug 15 10:16:10 2024 +0300 net/mlx5e: XPS, Fix oversight of Multi-PF Netdev changes The offending commit overlooked the Multi-PF Netdev changes. Revert mlx5e_set_default_xps_cpumasks to incorporate Multi-PF Netdev changes. Fixes: bcee093751f8 ("net/mlx5e: Modifying channels number and updating TX queues") Signed-off-by: Carolina Jubran Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240815071611.2211873-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 94e521937839475b83bac46e4d3ccba332e12064 Author: Dragos Tatulea Date: Thu Aug 15 10:16:09 2024 +0300 net/mlx5e: SHAMPO, Release in progress headers The change in the fixes tag cleaned up too much: it removed the part that was releasing header pages that were posted via UMR but haven't been acknowledged yet on the ICOSQ. This patch corrects this omission by setting the bits between pi and ci to on when shutting down a queue with SHAMPO. To be consistent with the Striding RQ code, this action is done in mlx5e_free_rx_missing_descs(). Fixes: e839ac9a89cb ("net/mlx5e: SHAMPO, Simplify header page release in teardown") Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240815071611.2211873-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit f232de7cdb4b99adb2c7f2bc5e0b7e4e1292873b Author: Dragos Tatulea Date: Thu Aug 15 10:16:08 2024 +0300 net/mlx5e: SHAMPO, Fix page leak When SHAMPO is used, a receive queue currently almost always leaks one page on shutdown. A page has MLX5E_SHAMPO_WQ_HEADER_PER_PAGE (8) headers. These headers are tracked in the SHAMPO bitmap. Each page is released when the last header index in the group is processed. During header allocation, there can be leftovers from a page that will be used in a subsequent allocation. This is normally fine, except for the following scenario (simplified a bit): 1) Allocate N new page fragments, showing only the relevant last 4 fragments: 0: new page 1: new page 2: new page 3: new page 4: page from previous allocation 5: page from previous allocation 6: page from previous allocation 7: page from previous allocation 2) NAPI processes header indices 4-7 because they are the oldest allocated. Bit 7 will be set to 0. 3) Receive queue shutdown occurs. All the remaining bits are being iterated on to release the pages. But the page assigned to header indices 0-3 will not be freed due to what happened in step 2. This patch fixes the issue by making sure that on allocation, header fragments are always allocated in groups of MLX5E_SHAMPO_WQ_HEADER_PER_PAGE so that there is never a partial page left over between allocations. A more appropriate fix would be a refactoring of mlx5e_alloc_rx_hd_mpwqe() and mlx5e_build_shampo_hd_umr(). But this refactoring is too big for net. It will be targeted for net-next. Fixes: e839ac9a89cb ("net/mlx5e: SHAMPO, Simplify header page release in teardown") Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240815071611.2211873-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 85652baa895b59b94bea29c77cb9b51cf7120deb Merge: c5ac744cdddae b313a8c835516 Author: Linus Torvalds Date: Fri Aug 16 14:03:31 2024 -0700 Merge tag 'block-6.11-20240824' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fix corruption issues with s390/dasd (Eric, Stefan) - Fix a misuse of non irq locking grab of a lock (Li) - MD pull request with a single data corruption fix for raid1 (Yu) * tag 'block-6.11-20240824' of git://git.kernel.dk/linux: block: Fix lockdep warning in blk_mq_mark_tag_wait md/raid1: Fix data corruption for degraded array with slow disk s390/dasd: fix error recovery leading to data corruption on ESE devices s390/dasd: Remove DMA alignment commit c5ac744cdddae82916d4cd35d962d3f47065e68a Merge: 2731835f3f2e5 1fc2ac428ef7d Author: Linus Torvalds Date: Fri Aug 16 14:00:05 2024 -0700 Merge tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix a comment in the uapi header using the wrong member name (Caleb) - Fix KCSAN warning for a debug check in sqpoll (me) - Two more NAPI tweaks (Olivier) * tag 'io_uring-6.11-20240824' of git://git.kernel.dk/linux: io_uring: fix user_data field name in comment io_uring/sqpoll: annotate debug task == current with data_race() io_uring/napi: remove duplicate io_napi_entry timeout assignation io_uring/napi: check napi_enabled in io_napi_add() before proceeding commit 2731835f3f2e5b0642ad82a3a0265c98a552283e Merge: 296c871d2904c b739dffa5d570 Author: Linus Torvalds Date: Fri Aug 16 13:50:33 2024 -0700 Merge tag 'devicetree-fixes-for-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix a possible (but unlikely) out-of-bounds read in interrupts parsing code - Add AT25 EEPROM "fujitsu,mb85rs256" compatible - Update Konrad Dybcio's email * tag 'devicetree-fixes-for-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of/irq: Prevent device address out-of-bounds read in interrupt map walk dt-bindings: eeprom: at25: add fujitsu,mb85rs256 compatible dt-bindings: Batch-update Konrad Dybcio's email commit 534f7eff9239c1b0af852fc33f5af2b62c00eddf Author: Qu Wenruo Date: Fri Aug 16 10:40:38 2024 +0930 btrfs: only enable extent map shrinker for DEBUG builds Although there are several patches improving the extent map shrinker, there are still reports of too frequent shrinker behavior, taking too much CPU for the kswapd process. So let's only enable extent shrinker for now, until we got more comprehensive understanding and a better solution. Link: https://lore.kernel.org/linux-btrfs/3df4acd616a07ef4d2dc6bad668701504b412ffc.camel@intelfx.name/ Link: https://lore.kernel.org/linux-btrfs/c30fd6b3-ca7a-4759-8a53-d42878bf84f7@gmail.com/ Fixes: 956a17d9d050 ("btrfs: add a shrinker for extent maps") CC: stable@vger.kernel.org # 6.10+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 296c871d2904cff2b4742702ef94512ab467a8e3 Merge: 64ab5e4039cd7 6e6f58a170ea9 Author: Linus Torvalds Date: Fri Aug 16 11:49:07 2024 -0700 Merge tag 'thermal-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Fix a Bang-bang thermal governor issue causing it to fail to reset the state of cooling devices if they are 'on' to start with, but the thermal zone temperature is always below the corresponding trip point (Rafael Wysocki)" * tag 'thermal-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: gov_bang_bang: Use governor_data to reduce overhead thermal: gov_bang_bang: Add .manage() callback thermal: gov_bang_bang: Split bang_bang_control() thermal: gov_bang_bang: Call __thermal_cdev_update() directly commit 64ab5e4039cd713afdb7c1b1d6a693efdd2050d8 Merge: e4a55b555db6d 71bf41b8e913e Author: Linus Torvalds Date: Fri Aug 16 11:43:54 2024 -0700 Merge tag 'acpi-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix an issue related to the ACPI EC device handling that causes the _REG control method to be evaluated for EC operation regions that are not expected to be used. This confuses the platform firmware and provokes various types of misbehavior on some systems (Rafael Wysocki)" * tag 'acpi-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: EC: Evaluate _REG outside the EC scope more carefully ACPICA: Add a depth argument to acpi_execute_reg_methods() Revert "ACPI: EC: Evaluate orphan _REG under EC device" commit e4a55b555db6d2a006551605ef4404529e878cd2 Merge: 60cb1da6ed4a6 d5240fa65db07 Author: Linus Torvalds Date: Fri Aug 16 11:36:40 2024 -0700 Merge tag 'libnvdimm-fixes-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Ira Weiny: "Commit f467fee48da4 ("block: move the dax flag to queue_limits") broke the DAX tests by skipping over the legacy pmem mapping pages case. Set the DAX flag in this case as well" * tag 'libnvdimm-fixes-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases commit 1fc2ac428ef7d2ab9e8e19efe7ec3e58aea51bf3 Author: Caleb Sander Mateos Date: Fri Aug 16 12:15:23 2024 -0600 io_uring: fix user_data field name in comment io_uring_cqe's user_data field refers to `sqe->data`, but io_uring_sqe does not have a data field. Fix the comment to say `sqe->user_data`. Signed-off-by: Caleb Sander Mateos Link: https://github.com/axboe/liburing/pull/1206 Link: https://lore.kernel.org/r/20240816181526.3642732-1-csander@purestorage.com Signed-off-by: Jens Axboe commit 60cb1da6ed4a62ec8331e25ad4be87115cd28feb Merge: 5b179fe052334 0eba65f0310d3 Author: Linus Torvalds Date: Fri Aug 16 11:24:06 2024 -0700 Merge tag 'rust-fixes-6.11' of https://github.com/Rust-for-Linux/linux Pull rust fixes from Miguel Ojeda: - Fix '-Os' Rust 1.80.0+ builds adding more intrinsics (also tweaked in upstream Rust for the upcoming 1.82.0). - Fix support for the latest version of rust-analyzer due to a change on rust-analyzer config file semantics (considered a fix since most developers use the latest version of the tool, which is the only one actually supported by upstream). I am discussing stability of the config file with upstream -- they may be able to start versioning it. - Fix GCC 14 builds due to '-fmin-function-alignment' not skipped for libclang (bindgen). - A couple Kconfig fixes around '{RUSTC,BINDGEN}_VERSION_TEXT' to suppress error messages in a foreign architecture chroot and to use a proper default format. - Clean 'rust-analyzer' target warning due to missing recursive make invocation mark. - Clean Clippy warning due to missing indentation in docs. - Clean LLVM 19 build warning due to removed 3dnow feature upstream. * tag 'rust-fixes-6.11' of https://github.com/Rust-for-Linux/linux: rust: x86: remove `-3dnow{,a}` from target features kbuild: rust-analyzer: mark `rust_is_available.sh` invocation as recursive rust: add intrinsics to fix `-Os` builds kbuild: rust: skip -fmin-function-alignment in bindgen flags rust: Support latest version of `rust-analyzer` rust: macros: indent list item in `module!`'s docs rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT commit 5b179fe052334ea81c9f1841bf782bb0878b61d2 Merge: 4a621e291000c 32d5f7add080a Author: Linus Torvalds Date: Fri Aug 16 11:18:09 2024 -0700 Merge tag 'riscv-for-linus-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - reintroduce the text patching global icache flush - fix syscall entry code to correctly initialize a0, which manifested as a strace bug - XIP kernels now map the entire kernel, which fixes boot under at least DEBUG_VIRTUAL=y - initialize all nodes in the acpi_early_node_map initializer - fix OOB access in the Andes vendor extension probing code - A new key for scalar misaligned access performance in hwprobe, which correctly treat the values as an enum (as opposed to a bitmap) * tag 'riscv-for-linus-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix out-of-bounds when accessing Andes per hart vendor extension array RISC-V: hwprobe: Add SCALAR to misaligned perf defines RISC-V: hwprobe: Add MISALIGNED_PERF key RISC-V: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE riscv: change XIP's kernel_map.size to be size of the entire kernel riscv: entry: always initialize regs->a0 to -ENOSYS riscv: Re-introduce global icache flush in patch_text_XXX() commit 4a621e291000c3756c353c5671ade4837ba68e3e Merge: 1486141ad8e79 90574d2a67594 Author: Linus Torvalds Date: Fri Aug 16 11:12:29 2024 -0700 Merge tag 'trace-v6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: "A couple of fixes for tracing: - Prevent a NULL pointer dereference in the error path of RTLA tool - Fix an infinite loop bug when reading from the ring buffer when closed. If there's a thread trying to read the ring buffer and it gets closed by another thread, the one reading will go into an infinite loop when the buffer is empty instead of exiting back to user space" * tag 'trace-v6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rtla/osnoise: Prevent NULL dereference in error handling tracing: Return from tracing_buffers_read() if the file has been closed commit 1486141ad8e79956e393f9af0ce076a5942e8feb Merge: 670c12ce09a81 0e28bf61a5f9a Author: Linus Torvalds Date: Fri Aug 16 11:05:25 2024 -0700 Merge tag 'keys-trusted-next-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull key fixes from Jarkko Sakkinen: "Two bug fixes for a memory corruption bug and a memory leak bug in the DCP trusted keys type. Just as a reminder DCP was a crypto coprocessor in i.MX SoCs" * tag 'keys-trusted-next-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: KEYS: trusted: dcp: fix leak of blob encryption key KEYS: trusted: fix DCP blob payload length assignment commit 99c87fe0f584f8d778a323141504d1ba5c89a4a5 Author: Kent Overstreet Date: Fri Aug 16 12:44:49 2024 -0400 bcachefs: fix incorrect i_state usage Reported-by: syzbot+95e40eae71609e40d851@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 9482f3b05332a624508a91c2ab2cf3527328a6a4 Author: Kent Overstreet Date: Fri Aug 16 12:41:46 2024 -0400 bcachefs: avoid overflowing LRU_TIME_BITS for cached data lru Reported-by: syzbot+510b0b28f8e6de64d307@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit 075cabf324c3fd790d6ba39ff9db33a30b954fe2 Author: Kent Overstreet Date: Fri Aug 16 12:31:29 2024 -0400 bcachefs: Fix forgetting to pass trans to fsck_err() Reported-by: syzbot+e3938cd6d761b78750e6@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet commit c2f6e16a6771eaefba6bb35f6803fe7217822d41 Author: Kent Overstreet Date: Thu Aug 15 13:02:55 2024 -0400 bcachefs: Increase size of cuckoo hash table on too many rehashes Also, improve the calculation of the new table size, so that it can shrink when needed. Signed-off-by: Kent Overstreet commit 670c12ce09a8180ebe0c608d8a789a7e58fe7d8e Merge: de53959e001b7 faada2174c086 Author: Linus Torvalds Date: Fri Aug 16 09:07:34 2024 -0700 Merge tag 'for-6.11/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mikulas Patocka: - fix misbehavior if suspend or resume is interrupted by a signal - fix wrong indentation in dm-crypt.rst - fix memory allocation failure in dm-persistent-data * tag 'for-6.11/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm persistent data: fix memory allocation failure Documentation: dm-crypt.rst warning + error fix dm resume: don't return EINVAL when signalled dm suspend: return -ERESTARTSYS instead of -EINTR commit de53959e001b73ceeb631e04491b473157e1b1a2 Merge: 9bd40f824a7fe 92567a5f92bc9 Author: Linus Torvalds Date: Fri Aug 16 08:56:45 2024 -0700 Merge tag 'iommu-fixes-v6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - Bring back a lost return statement in io-page-fault code - Remove an unused function declaration * tag 'iommu-fixes-v6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu: Remove unused declaration iommu_sva_unbind_gpasid() iommu: Restore lost return in iommu_report_device_fault() commit 9bd40f824a7fed9ffdd1660ea7567f4133f8b672 Merge: d58c542a33e71 aad4183232672 Author: Linus Torvalds Date: Fri Aug 16 08:47:50 2024 -0700 Merge tag 'gpio-fixes-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fix from Bartosz Golaszewski: - add the shutdown() callback to gpio-mlxbf3 in order to disable interrupts during graceful reboot * tag 'gpio-fixes-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: mlxbf3: Support shutdown() function commit d58c542a33e719029ae3fc1343b4cb09c125cb09 Merge: 37b20e9a5810e 829e2a23121fb Author: Linus Torvalds Date: Fri Aug 16 08:39:41 2024 -0700 Merge tag 'sound-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All small fixes, mostly for usual suspects, HD-audio and USB-audio device-specific fixes / quirks. The Cirrus codec support took the update of SPI header as well. Other than that, there is a regression fix in the sanity check of ALSA timer code" * tag 'sound-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/tas2781: Use correct endian conversion ALSA: usb-audio: Support Yamaha P-125 quirk entry ALSA: hda: cs35l41: Remove redundant call to hda_cs_dsp_control_remove() ALSA: hda: cs35l56: Remove redundant call to hda_cs_dsp_control_remove() ALSA: hda/tas2781: fix wrong calibrated data order ALSA: usb-audio: Add delay quirk for VIVO USB-C-XE710 HEADSET ALSA: hda/realtek: Add support for new HP G12 laptops ALSA: hda/realtek: Fix noise from speakers on Lenovo IdeaPad 3 15IAU7 ALSA: timer: Relax start tick time check for slave timer elements spi: Add empty versions of ACPI functions commit 37b20e9a5810e132a21c54f858043b22671396dd Merge: d7a5aa4b3c007 fee9d135e2fd5 Author: Linus Torvalds Date: Fri Aug 16 08:35:50 2024 -0700 Merge tag 'drm-fixes-2024-08-16' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Weekly drm fixes, mostly amdgpu and xe. The larger amdgpu fix is for a new IP block introduced in rc1, so should be fine. The xe fixes contain some missed fixes from the end of the previous round along with some fixes which required precursor changes, but otherwise everything seems fine, mediatek: - fix cursor crash amdgpu: - Fix MES ring buffer overflow - DCN 3.5 fix - DCN 3.2.1 fix - DP MST fix - Cursor fixes - JPEG fixes - Context ops validation - MES 12 fixes - VCN 5.0 fix - HDP fix panel: - dt bindings style fix - orientation quirks rockchip: - inno-hdmi: fix infoframe upload v3d: - fix OOB access in v3d_csd_job_run() xe: - Validate user fence during creation - Fix use after free when client stats are captured - SRIOV fixes - Runtime PM fixes" * tag 'drm-fixes-2024-08-16' of https://gitlab.freedesktop.org/drm/kernel: (37 commits) drm/xe: Hold a PM ref when GT TLB invalidations are inflight drm/xe: Drop xe_gt_tlb_invalidation_wait drm/xe: Add xe_gt_tlb_invalidation_fence_init helper drm/xe/pf: Fix VF config validation on multi-GT platforms drm/xe: Build PM into GuC CT layer drm/xe/vf: Fix register value lookup drm/xe: Fix use after free when client stats are captured drm/xe: Take a ref to xe file when user creates a VM drm/xe: Add ref counting for xe_file drm/xe: Move part of xe_file cleanup to a helper drm/xe: Validate user fence during creation drm/rockchip: inno-hdmi: Fix infoframe upload drm/amd/amdgpu: add HDP_SD support on gc 12.0.0/1 drm/amdgpu: Update kmd_fw_shared for VCN5 drm/amd/amdgpu: command submission parser for JPEG drm/amdgpu/mes12: fix suspend issue drm/amdgpu/mes12: sw/hw fini for unified mes drm/amdgpu/mes12: configure two pipes hardware resources drm/amdgpu/mes12: adjust mes12 sw/hw init for multiple pipes drm/amdgpu/mes12: add mes pipe switch support ... commit 87cea484951eba1d0342033241f80e49303d802c Merge: 71833e79a4217 14d069d92951a Author: Wolfram Sang Date: Fri Aug 16 16:23:51 2024 +0200 Merge tag 'i2c-host-fixes-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current Two fixes in this update: Tegra I2C Controller: Addresses a potential double-locking issue during probe. ACPI devices are not IRQ-safe when invoking runtime suspend and resume functions, so the irq_safe flag should not be set. Qualcomm GENI I2C Controller: Fixes an oversight in the exit path of the runtime_resume() function, which was missed in the previous release. commit 145082ebfcf08f4fd254c467abf4aa58b4d38505 Author: Javier Carrasco Date: Mon Aug 12 14:17:21 2024 +0200 Documentation/llvm: turn make command for ccache into code block The command provided to use ccache with clang is not a literal code block. Once built, the documentation displays the '' symbols as a " character, which is wrong, and the command can not be applied as provided. Turn the command into a literal code block. Signed-off-by: Javier Carrasco Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit a42db293e5983aa1508d12644f23d73f0553b32c Author: Vijendar Mukunda Date: Fri Aug 16 12:33:28 2024 +0530 ASoC: SOF: amd: Fix for acp init sequence When ACP is not powered on by default, acp power on sequence explicitly invoked by programming pgfsm control mask. The existing implementation checks the same PGFSM status mask and programs the same PGFSM control mask in all ACP variants which breaks acp power on sequence for ACP6.0 and ACP6.3 variants. So to fix this issue, update ACP pgfsm control mask and status mask based on acp descriptor rev field, which will vary based on acp variant. Fixes: 846aef1d7cc0 ("ASoC: SOF: amd: Add Renoir ACP HW support") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240816070328.610360-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 6e6f58a170ea98e44075b761f2da42a5aec47dfb Author: Rafael J. Wysocki Date: Tue Aug 13 16:29:11 2024 +0200 thermal: gov_bang_bang: Use governor_data to reduce overhead After running once, the for_each_trip_desc() loop in bang_bang_manage() is pure needless overhead because it is not going to make any changes unless a new cooling device has been bound to one of the trips in the thermal zone or the system is resuming from sleep. For this reason, make bang_bang_manage() set governor_data for the thermal zone and check it upfront to decide whether or not it needs to do anything. However, governor_data needs to be reset in some cases to let bang_bang_manage() know that it should walk the trips again, so add an .update_tz() callback to the governor and make the core additionally invoke it during system resume. To avoid affecting the other users of that callback unnecessarily, add a special notification reason for system resume, THERMAL_TZ_RESUME, and also pass it to __thermal_zone_device_update() called during system resume for consistency. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Kästle Reviewed-by: Zhang Rui Cc: 6.10+ # 6.10+ Link: https://patch.msgid.link/2285575.iZASKD2KPV@rjwysocki.net commit 5f64b4a1ab1b0412446d42e1fc2964c2cdb60b27 Author: Rafael J. Wysocki Date: Tue Aug 13 16:27:33 2024 +0200 thermal: gov_bang_bang: Add .manage() callback After recent changes, the Bang-bang governor may not adjust the initial configuration of cooling devices to the actual situation. Namely, if a cooling device bound to a certain trip point starts in the "on" state and the thermal zone temperature is below the threshold of that trip point, the trip point may never be crossed on the way up in which case the state of the cooling device will never be adjusted because the thermal core will never invoke the governor's .trip_crossed() callback. [Note that there is no issue if the zone temperature is at the trip threshold or above it to start with because .trip_crossed() will be invoked then to indicate the start of thermal mitigation for the given trip.] To address this, add a .manage() callback to the Bang-bang governor and use it to ensure that all of the thermal instances managed by the governor have been initialized properly and the states of all of the cooling devices involved have been adjusted to the current zone temperature as appropriate. Fixes: 530c932bdf75 ("thermal: gov_bang_bang: Use .trip_crossed() instead of .throttle()") Link: https://lore.kernel.org/linux-pm/1bfbbae5-42b0-4c7d-9544-e98855715294@piie.net/ Cc: 6.10+ # 6.10+ Signed-off-by: Rafael J. Wysocki Acked-by: Peter Kästle Reviewed-by: Zhang Rui Link: https://patch.msgid.link/8419356.T7Z3S40VBb@rjwysocki.net commit 84248e35d9b60e03df7276627e4e91fbaf80f73d Author: Rafael J. Wysocki Date: Tue Aug 13 16:26:42 2024 +0200 thermal: gov_bang_bang: Split bang_bang_control() Move the setting of the thermal instance target state from bang_bang_control() into a separate function that will be also called in a different place going forward. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Kästle Reviewed-by: Zhang Rui Cc: 6.10+ # 6.10+ Link: https://patch.msgid.link/3313587.aeNJFYEL58@rjwysocki.net commit b9b6ee6fe258ce4d89592593efcd3d798c418859 Author: Rafael J. Wysocki Date: Tue Aug 13 16:25:19 2024 +0200 thermal: gov_bang_bang: Call __thermal_cdev_update() directly Instead of clearing the "updated" flag for each cooling device affected by the trip point crossing in bang_bang_control() and walking all thermal instances to run thermal_cdev_update() for all of the affected cooling devices, call __thermal_cdev_update() directly for each of them. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Peter Kästle Reviewed-by: Zhang Rui Cc: 6.10+ # 6.10+ Link: https://patch.msgid.link/13583081.uLZWGnKmhe@rjwysocki.net commit 27ec3c57fcadb43c79ed05b2ea31bc18c72d798a Author: Sascha Hauer Date: Fri Aug 9 10:11:33 2024 +0200 wifi: mwifiex: duplicate static structs used in driver instances mwifiex_band_2ghz and mwifiex_band_5ghz are statically allocated, but used and modified in driver instances. Duplicate them before using them in driver instances so that different driver instances do not influence each other. This was observed on a board which has one PCIe and one SDIO mwifiex adapter. It blew up in mwifiex_setup_ht_caps(). This was called with the statically allocated struct which is modified in this function. Cc: stable@vger.kernel.org Fixes: d6bffe8bb520 ("mwifiex: support for creation of AP interface") Signed-off-by: Sascha Hauer Reviewed-by: Francesco Dolcini Acked-by: Brian Norris Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240809-mwifiex-duplicate-static-structs-v1-1-6837b903b1a4@pengutronix.de commit 3d93a1448ed017f3536319a2445568b5f3969547 Merge: b153b3c747003 36dd1141be70b Author: David S. Miller Date: Fri Aug 16 09:59:33 2024 +0100 Merge branch 'vln-ocelot-fixes' Vladimir Oltean says: ==================== VLAN fixes for Ocelot driver This is a collection of patches I've gathered over the past several months. Patches 1-6/14 are supporting patches for selftests. Patch 9/14 fixes PTP TX from a VLAN upper of a VLAN-aware bridge port when using the "ocelot-8021q" tagging protocol. Patch 7/14 is its supporting selftest. Patch 10/14 fixes the QoS class used by PTP in the same case as above. It is hard to quantify - there is no selftest. Patch 11/14 fixes potential data corruption during PTP TX in the same case as above. Again, there is no selftest. Patch 13/14 fixes RX in the same case as above - 8021q upper of a VLAN-aware bridge port, with the "ocelot-8021q" tagging protocol. Patch 12/14 is a supporting patch for this in the DSA core, and 7/14 is also its selftest. Patch 14/14 ensures that VLAN-aware bridges offloaded to Ocelot only react to the ETH_P_8021Q TPID, and treat absolutely everything else as VLAN-untagged, including ETH_P_8021AD. Patch 8/14 is the supporting selftest. ==================== Signed-off-by: David S. Miller commit 36dd1141be70b5966906919714dc504a24c65ddf Author: Vladimir Oltean Date: Thu Aug 15 03:07:07 2024 +0300 net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged I was revisiting the topic of 802.1ad treatment in the Ocelot switch [0] and realized that not only is its basic VLAN classification pipeline improper for offloading vlan_protocol 802.1ad bridges, but also improper for offloading regular 802.1Q bridges already. Namely, 802.1ad-tagged traffic should be treated as VLAN-untagged by bridged ports, but this switch treats it as if it was 802.1Q-tagged with the same VID as in the 802.1ad header. This is markedly different to what the Linux bridge expects; see the "other_tpid()" function in tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh. An idea came to me that the VCAP IS1 TCAM is more powerful than I'm giving it credit for, and that it actually overwrites the classified VID before the VLAN Table lookup takes place. In other words, it can be used even to save a packet from being dropped on ingress due to VLAN membership. Add a sophisticated TCAM rule hardcoded into the driver to force the switch to behave like a Linux bridge with vlan_filtering 1 vlan_protocol 802.1Q. Regarding the lifetime of the filter: eventually the bridge will disappear, and vlan_filtering on the port will be restored to 0 for standalone mode. Then the filter will be deleted. [0]: https://lore.kernel.org/netdev/20201009122947.nvhye4hvcha3tljh@skbuf/ Fixes: 7142529f1688 ("net: mscc: ocelot: add VLAN filtering") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f1288fd7293b91442ad7420394c252a252ecaa30 Author: Vladimir Oltean Date: Thu Aug 15 03:07:06 2024 +0300 net: dsa: felix: fix VLAN tag loss on CPU reception with ocelot-8021q There is a major design bug with ocelot-8021q, which is that it expects more of the hardware than the hardware can actually do. The short summary of the issue is that when a port is under a VLAN-aware bridge and we use this tagging protocol, VLAN upper interfaces of this port do not see RX traffic. We use VCAP ES0 (egress rewriter) rules towards the tag_8021q CPU port to encapsulate packets with an outer tag, later stripped by software, that depends on the source user port. We do this so that packets can be identified in ocelot_rcv(). To be precise, we create rules with push_outer_tag = OCELOT_ES0_TAG and push_inner_tag = 0. With this configuration, we expect the switch to keep the inner tag configuration as found in the packet (if it was untagged on user port ingress, keep it untagged, otherwise preserve the VLAN tag unmodified as the inner tag towards the tag_8021q CPU port). But this is not what happens. Instead, table "Tagging Combinations" from the user manual suggests that when the ES0 action is "PUSH_OUTER_TAG=1 and PUSH_INNER_TAG=0", there will be "no inner tag". Experimentation further clarifies what this means. It appears that this "inner tag" which is not pushed into the packet on its egress towards the CPU is none other than the classified VLAN. When the ingress user port is standalone or under a VLAN-unaware bridge, the classified VLAN is a discardable quantity: it is a fixed value - the result of ocelot_vlan_unaware_pvid()'s configuration, and actually independent of the VID from any 802.1Q header that may be in the frame. It is actually preferable to discard the "inner tag" in this case. The problem is when the ingress port is under a VLAN-aware bridge. Then, the classified VLAN is taken from the frame's 802.1Q header, with a fallback on the bridge port's PVID. It would be very good to not discard the "inner tag" here, because if we do, we break communication with any 8021q VLAN uppers that the port might have. These have a processing path outside the bridge. There seems to be nothing else we can do except to change the configuration for VCAP ES0 rules, to actually push the inner VLAN into the frame. There are 2 options for that, first is to push a fixed value specified in the rule, and second is to push a fixed value, plus (aka arithmetic +) the classified VLAN. We choose the second option, and we select that fixed value as 0. Thus, what is pushed in the inner tag is just the classified VLAN. From there, we need to perform software untagging, in the receive path, of stuff that was untagged on the wire. Fixes: 7c83a7c539ab ("net: dsa: add a second tagger for Ocelot switches based on tag_8021q") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 93e4649efa964201c73b0a03c35c04a0d6fc809f Author: Vladimir Oltean Date: Thu Aug 15 03:07:05 2024 +0300 net: dsa: provide a software untagging function on RX for VLAN-aware bridges Through code analysis, I realized that the ds->untag_bridge_pvid logic is contradictory - see the newly added FIXME above the kernel-doc for dsa_software_untag_vlan_unaware_bridge(). Moreover, for the Felix driver, I need something very similar, but which is actually _not_ contradictory: untag the bridge PVID on RX, but for VLAN-aware bridges. The existing logic does it for VLAN-unaware bridges. Since I don't want to change the functionality of drivers which were supposedly properly tested with the ds->untag_bridge_pvid flag, I have introduced a new one: ds->untag_vlan_aware_bridge_pvid, and I have refactored the DSA reception code into a common path for both flags. TODO: both flags should be unified under a single ds->software_vlan_untag, which users of both current flags should set. This is not something that can be carried out right away. It needs very careful examination of all drivers which make use of this functionality, since some of them actually get this wrong in the first place. For example, commit 9130c2d30c17 ("net: dsa: microchip: ksz8795: Use software untagging on CPU port") uses this in a driver which has ds->configure_vlan_while_not_filtering = true. The latter mechanism has been known for many years to be broken by design: https://lore.kernel.org/netdev/CABumfLzJmXDN_W-8Z=p9KyKUVi_HhS7o_poBkeKHS2BkAiyYpw@mail.gmail.com/ and we have the situation of 2 bugs canceling each other. There is no private VLAN, and the port follows the PVID of the VLAN-unaware bridge. So, it's kinda ok for that driver to use the ds->untag_bridge_pvid mechanism, in a broken way. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c5e12ac3beb0dd3a718296b2d8af5528e9ab728e Author: Vladimir Oltean Date: Thu Aug 15 03:07:04 2024 +0300 net: mscc: ocelot: serialize access to the injection/extraction groups As explained by Horatiu Vultur in commit 603ead96582d ("net: sparx5: Add spinlock for frame transmission from CPU") which is for a similar hardware design, multiple CPUs can simultaneously perform injection or extraction. There are only 2 register groups for injection and 2 for extraction, and the driver only uses one of each. So we'd better serialize access using spin locks, otherwise frame corruption is possible. Note that unlike in sparx5, FDMA in ocelot does not have this issue because struct ocelot_fdma_tx_ring already contains an xmit_lock. I guess this is mostly a problem for NXP LS1028A, as that is dual core. I don't think VSC7514 is. So I'm blaming the commit where LS1028A (aka the felix DSA driver) started using register-based packet injection and extraction. Fixes: 0a6f17c6ae21 ("net: dsa: tag_ocelot_8021q: add support for PTP timestamping") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e1b9e80236c540fa85d76e2d510d1b38e1968c5d Author: Vladimir Oltean Date: Thu Aug 15 03:07:03 2024 +0300 net: mscc: ocelot: fix QoS class for injected packets with "ocelot-8021q" There are 2 distinct code paths (listed below) in the source code which set up an injection header for Ocelot(-like) switches. Code path (2) lacks the QoS class and source port being set correctly. Especially the improper QoS classification is a problem for the "ocelot-8021q" alternative DSA tagging protocol, because we support tc-taprio and each packet needs to be scheduled precisely through its time slot. This includes PTP, which is normally assigned to a traffic class other than 0, but would be sent through TC 0 nonetheless. The code paths are: (1) ocelot_xmit_common() from net/dsa/tag_ocelot.c - called only by the standard "ocelot" DSA tagging protocol which uses NPI-based injection - sets up bit fields in the tag manually to account for a small difference (destination port offset) between Ocelot and Seville. Namely, ocelot_ifh_set_dest() is omitted out of ocelot_xmit_common(), because there's also seville_ifh_set_dest(). (2) ocelot_ifh_set_basic(), called by: - ocelot_fdma_prepare_skb() for FDMA transmission of the ocelot switchdev driver - ocelot_port_xmit() -> ocelot_port_inject_frame() for register-based transmission of the ocelot switchdev driver - felix_port_deferred_xmit() -> ocelot_port_inject_frame() for the DSA tagger ocelot-8021q when it must transmit PTP frames (also through register-based injection). sets the bit fields according to its own logic. The problem is that (2) doesn't call ocelot_ifh_set_qos_class(). Copying that logic from ocelot_xmit_common() fixes that. Unfortunately, although desirable, it is not easily possible to de-duplicate code paths (1) and (2), and make net/dsa/tag_ocelot.c directly call ocelot_ifh_set_basic()), because of the ocelot/seville difference. This is the "minimal" fix with some logic duplicated (but at least more consolidated). Fixes: 0a6f17c6ae21 ("net: dsa: tag_ocelot_8021q: add support for PTP timestamping") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 67c3ca2c5cfe6a50772514e3349b5e7b3b0fac03 Author: Vladimir Oltean Date: Thu Aug 15 03:07:02 2024 +0300 net: mscc: ocelot: use ocelot_xmit_get_vlan_info() also for FDMA and register injection Problem description ------------------- On an NXP LS1028A (felix DSA driver) with the following configuration: - ocelot-8021q tagging protocol - VLAN-aware bridge (with STP) spanning at least swp0 and swp1 - 8021q VLAN upper interfaces on swp0 and swp1: swp0.700, swp1.700 - ptp4l on swp0.700 and swp1.700 we see that the ptp4l instances do not see each other's traffic, and they all go to the grand master state due to the ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES condition. Jumping to the conclusion for the impatient ------------------------------------------- There is a zero-day bug in the ocelot switchdev driver in the way it handles VLAN-tagged packet injection. The correct logic already exists in the source code, in function ocelot_xmit_get_vlan_info() added by commit 5ca721c54d86 ("net: dsa: tag_ocelot: set the classified VLAN during xmit"). But it is used only for normal NPI-based injection with the DSA "ocelot" tagging protocol. The other injection code paths (register-based and FDMA-based) roll their own wrong logic. This affects and was noticed on the DSA "ocelot-8021q" protocol because it uses register-based injection. By moving ocelot_xmit_get_vlan_info() to a place that's common for both the DSA tagger and the ocelot switch library, it can also be called from ocelot_port_inject_frame() in ocelot.c. We need to touch the lines with ocelot_ifh_port_set()'s prototype anyway, so let's rename it to something clearer regarding what it does, and add a kernel-doc. ocelot_ifh_set_basic() should do. Investigation notes ------------------- Debugging reveals that PTP event (aka those carrying timestamps, like Sync) frames injected into swp0.700 (but also swp1.700) hit the wire with two VLAN tags: 00000000: 01 1b 19 00 00 00 00 01 02 03 04 05 81 00 02 bc ~~~~~~~~~~~ 00000010: 81 00 02 bc 88 f7 00 12 00 2c 00 00 02 00 00 00 ~~~~~~~~~~~ 00000020: 00 00 00 00 00 00 00 00 00 00 00 01 02 ff fe 03 00000030: 04 05 00 01 00 04 00 00 00 00 00 00 00 00 00 00 00000040: 00 00 The second (unexpected) VLAN tag makes felix_check_xtr_pkt() -> ptp_classify_raw() fail to see these as PTP packets at the link partner's receiving end, and return PTP_CLASS_NONE (because the BPF classifier is not written to expect 2 VLAN tags). The reason why packets have 2 VLAN tags is because the transmission code treats VLAN incorrectly. Neither ocelot switchdev, nor felix DSA, declare the NETIF_F_HW_VLAN_CTAG_TX feature. Therefore, at xmit time, all VLANs should be in the skb head, and none should be in the hwaccel area. This is done by: static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb, netdev_features_t features) { if (skb_vlan_tag_present(skb) && !vlan_hw_offload_capable(features, skb->vlan_proto)) skb = __vlan_hwaccel_push_inside(skb); return skb; } But ocelot_port_inject_frame() handles things incorrectly: ocelot_ifh_port_set(ifh, port, rew_op, skb_vlan_tag_get(skb)); void ocelot_ifh_port_set(struct sk_buff *skb, void *ifh, int port, u32 rew_op) { (...) if (vlan_tag) ocelot_ifh_set_vlan_tci(ifh, vlan_tag); (...) } The way __vlan_hwaccel_push_inside() pushes the tag inside the skb head is by calling: static inline void __vlan_hwaccel_clear_tag(struct sk_buff *skb) { skb->vlan_present = 0; } which does _not_ zero out skb->vlan_tci as seen by skb_vlan_tag_get(). This means that ocelot, when it calls skb_vlan_tag_get(), sees (and uses) a residual skb->vlan_tci, while the same VLAN tag is _already_ in the skb head. The trivial fix for double VLAN headers is to replace the content of ocelot_ifh_port_set() with: if (skb_vlan_tag_present(skb)) ocelot_ifh_set_vlan_tci(ifh, skb_vlan_tag_get(skb)); but this would not be correct either, because, as mentioned, vlan_hw_offload_capable() is false for us, so we'd be inserting dead code and we'd always transmit packets with VID=0 in the injection frame header. I can't actually test the ocelot switchdev driver and rely exclusively on code inspection, but I don't think traffic from 8021q uppers has ever been injected properly, and not double-tagged. Thus I'm blaming the introduction of VLAN fields in the injection header - early driver code. As hinted at in the early conclusion, what we _want_ to happen for VLAN transmission was already described once in commit 5ca721c54d86 ("net: dsa: tag_ocelot: set the classified VLAN during xmit"). ocelot_xmit_get_vlan_info() intends to ensure that if the port through which we're transmitting is under a VLAN-aware bridge, the outer VLAN tag from the skb head is stripped from there and inserted into the injection frame header (so that the packet is processed in hardware through that actual VLAN). And in all other cases, the packet is sent with VID=0 in the injection frame header, since the port is VLAN-unaware and has logic to strip this VID on egress (making it invisible to the wire). Fixes: 08d02364b12f ("net: mscc: fix the injection header") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e29b82ef27616777e21c07dc263a8769cbdaa358 Author: Vladimir Oltean Date: Thu Aug 15 03:07:01 2024 +0300 selftests: net: bridge_vlan_aware: test that other TPIDs are seen as untagged The bridge VLAN implementation w.r.t. VLAN protocol is described in merge commit 1a0b20b25732 ("Merge branch 'bridge-next'"). We are only sensitive to those VLAN tags whose TPID is equal to the bridge's vlan_protocol. Thus, an 802.1ad VLAN should be treated as 802.1Q-untagged. Add 3 tests which validate that: - 802.1ad-tagged traffic is learned into the PVID of an 802.1Q-aware bridge - Double-tagged traffic is forwarded when just the PVID of the port is present in the VLAN group of the ports - Double-tagged traffic is not forwarded when the PVID of the port is absent from the VLAN group of the ports The test passes with both veth and ocelot. Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 237979504264912a9797dabc0db35126e705fe0d Author: Vladimir Oltean Date: Thu Aug 15 03:07:00 2024 +0300 selftests: net: local_termination: add PTP frames to the mix A breakage in the felix DSA driver shows we do not have enough test coverage. More generally, it is sufficiently special that it is likely drivers will treat it differently. This is not meant to be a full PTP test, it just makes sure that PTP packets sent to the different addresses corresponding to their profiles are received correctly. The local_termination selftest seemed like the most appropriate place for this addition. PTP RX/TX in some cases makes no sense (over a bridge) and this is why $skip_ptp exists. And in others - PTP over a bridge port - the IP stack needs convincing through the available bridge netfilter hooks to leave the PTP packets alone and not stolen by the bridge rx_handler. It is safe to assume that users have that figured out already. This is a driver level test, and by using tcpdump, all that extra setup is out of scope here. send_non_ip() was an unfinished idea; written but never used. Replace it with a more generic send_raw(), and send 3 PTP packet types times 3 transports. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9aa3749ca4a880c1a59720aab3eacf344ed8d68d Author: Vladimir Oltean Date: Thu Aug 15 03:06:59 2024 +0300 selftests: net: local_termination: don't use xfail_on_veth() xfail_on_veth() for this test is an incorrect approximation which gives false positives and false negatives. When local_termination fails with "reception succeeded, but should have failed", it is because the DUT ($h2) accepts packets even when not configured as promiscuous. This is not something specific to veth; even the bridge behaves that way, but this is not captured by the xfail_on_veth test. The IFF_UNICAST_FLT flag is not explicitly exported to user space, but it can somewhat be determined from the interface's behavior. We have to create a macvlan upper with a different MAC address. This forces a dev_uc_add() call in the kernel. When the unicast filtering list is not empty, but the device doesn't support IFF_UNICAST_FLT, __dev_set_rx_mode() force-enables promiscuity on the interface, to ensure correct behavior (that the requested address is received). We can monitor the change in the promiscuity flag and infer from it whether the device supports unicast filtering. There is no equivalent thing for allmulti, unfortunately. We never know what's hiding behind a device which has allmulti=off. Whether it will actually perform RX multicast filtering of unknown traffic is a strong "maybe". The bridge driver, for example, completely ignores the flag. We'll have to keep the xfail behavior, but instead of XFAIL on just veth, always XFAIL. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5fea8bb009744bbb90b3f6ca41c558429ee4c849 Author: Vladimir Oltean Date: Thu Aug 15 03:06:58 2024 +0300 selftests: net: local_termination: introduce new tests which capture VLAN behavior Add more coverage to the local termination selftest as follows: - 8021q upper of $h2 - 8021q upper of $h2, where $h2 is a port of a VLAN-unaware bridge - 8021q upper of $h2, where $h2 is a port of a VLAN-aware bridge - 8021q upper of VLAN-unaware br0, which is the upper of $h2 - 8021q upper of VLAN-aware br0, which is the upper of $h2 Especially the cases with traffic sent through the VLAN upper of a VLAN-aware bridge port will be immediately relevant when we will start transmitting PTP packets as an additional kind of traffic. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5b8e74182ed3d4f1c38c626e6120275ca9d92bee Author: Vladimir Oltean Date: Thu Aug 15 03:06:57 2024 +0300 selftests: net: local_termination: add one more test for VLAN-aware bridges The current bridge() test is for packet reception on a VLAN-unaware bridge. Some things are different enough with VLAN-aware bridges that it's worth renaming this test into vlan_unaware_bridge(), and add a new vlan_aware_bridge() test. The two will share the same implementation: bridge() becomes a common function, which receives $vlan_filtering as an argument. Rename it to test_bridge() at the same time, because just bridge() pollutes the global namespace and we cannot invoke the binary with the same name from the iproute2 package currently. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit df7cf5cc551c7c0a92520e91e1184993784c6386 Author: Vladimir Oltean Date: Thu Aug 15 03:06:56 2024 +0300 selftests: net: local_termination: parameterize test name There are upcoming tests which verify the RX filtering of a bridge (or bridge port), but under differing vlan_filtering conditions. Since we currently print $h2 (the DUT) in the log_test() output, it becomes necessary to make a further distinction between tests, to not give the user the impression that the exact same thing is run twice. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4261fa35185c0112acca0496d3732c8fcfe1dcf2 Author: Vladimir Oltean Date: Thu Aug 15 03:06:55 2024 +0300 selftests: net: local_termination: parameterize sending interface In future changes we will want to subject the DUT, $h2, to additional VLAN-tagged traffic. For that, we need to run the tests using $h1.100 as a sending interface, rather than the currently hardcoded $h1. Add a parameter to run_test() and modify its 2 callers to explicitly pass $h1, as was implicit before. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8d019b15ddd55d6dc5685b1f51902c4aa8e01939 Author: Vladimir Oltean Date: Thu Aug 15 03:06:54 2024 +0300 selftests: net: local_termination: refactor macvlan creation/deletion This will be used in other subtests as well; make new macvlan_create() and macvlan_destroy() functions. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2374bf7558de915edc6ec8cb10ec3291dfab9594 Author: Eli Billauer Date: Fri Aug 16 10:02:00 2024 +0300 char: xillybus: Check USB endpoints when probing device Ensure, as the driver probes the device, that all endpoints that the driver may attempt to access exist and are of the correct type. All XillyUSB devices must have a Bulk IN and Bulk OUT endpoint at address 1. This is verified in xillyusb_setup_base_eps(). On top of that, a XillyUSB device may have additional Bulk OUT endpoints. The information about these endpoints' addresses is deduced from a data structure (the IDT) that the driver fetches from the device while probing it. These endpoints are checked in setup_channels(). A XillyUSB device never has more than one IN endpoint, as all data towards the host is multiplexed in this single Bulk IN endpoint. This is why setup_channels() only checks OUT endpoints. Reported-by: syzbot+eac39cba052f2e750dbe@syzkaller.appspotmail.com Cc: stable Closes: https://lore.kernel.org/all/0000000000001d44a6061f7a54ee@google.com/T/ Fixes: a53d1202aef1 ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)"). Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20240816070200.50695-2-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit ad899c301c880766cc709aad277991b3ab671b66 Author: Eli Billauer Date: Fri Aug 16 10:01:59 2024 +0300 char: xillybus: Refine workqueue handling As the wakeup work item now runs on a separate workqueue, it needs to be flushed separately along with flushing the device's workqueue. Also, move the destroy_workqueue() call to the end of the exit method, so that deinitialization is done in the opposite order of initialization. Fixes: ccbde4b128ef ("char: xillybus: Don't destroy workqueue from work item running on it") Cc: stable Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20240816070200.50695-1-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2e6506e1c4eed2676a8412231046f31e10e240da Author: Gao Xiang Date: Mon Jul 29 10:13:06 2024 +0800 mm/migrate: fix deadlock in migrate_pages_batch() on large folios Currently, migrate_pages_batch() can lock multiple locked folios with an arbitrary order. Although folio_trylock() is used to avoid deadlock as commit 2ef7dbb26990 ("migrate_pages: try migrate in batch asynchronously firstly") mentioned, it seems try_split_folio() is still missing. It was found by compaction stress test when I explicitly enable EROFS compressed files to use large folios, which case I cannot reproduce with the same workload if large folio support is off (current mainline). Typically, filesystem reads (with locked file-backed folios) could use another bdev/meta inode to load some other I/Os (e.g. inode extent metadata or caching compressed data), so the locking order will be: file-backed folios (A) bdev/meta folios (B) The following calltrace shows the deadlock: Thread 1 takes (B) lock and tries to take folio (A) lock Thread 2 takes (A) lock and tries to take folio (B) lock [Thread 1] INFO: task stress:1824 blocked for more than 30 seconds. Tainted: G OE 6.10.0-rc7+ #6 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:stress state:D stack:0 pid:1824 tgid:1824 ppid:1822 flags:0x0000000c Call trace: __switch_to+0xec/0x138 __schedule+0x43c/0xcb0 schedule+0x54/0x198 io_schedule+0x44/0x70 folio_wait_bit_common+0x184/0x3f8 <-- folio mapping ffff00036d69cb18 index 996 (**) __folio_lock+0x24/0x38 migrate_pages_batch+0x77c/0xea0 // try_split_folio (mm/migrate.c:1486:2) // migrate_pages_batch (mm/migrate.c:1734:16) <--- LIST_HEAD(unmap_folios) has .. folio mapping 0xffff0000d184f1d8 index 1711; (*) folio mapping 0xffff0000d184f1d8 index 1712; .. migrate_pages+0xb28/0xe90 compact_zone+0xa08/0x10f0 compact_node+0x9c/0x180 sysctl_compaction_handler+0x8c/0x118 proc_sys_call_handler+0x1a8/0x280 proc_sys_write+0x1c/0x30 vfs_write+0x240/0x380 ksys_write+0x78/0x118 __arm64_sys_write+0x24/0x38 invoke_syscall+0x78/0x108 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x3c/0x148 el0t_64_sync_handler+0x100/0x130 el0t_64_sync+0x190/0x198 [Thread 2] INFO: task stress:1825 blocked for more than 30 seconds. Tainted: G OE 6.10.0-rc7+ #6 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:stress state:D stack:0 pid:1825 tgid:1825 ppid:1822 flags:0x0000000c Call trace: __switch_to+0xec/0x138 __schedule+0x43c/0xcb0 schedule+0x54/0x198 io_schedule+0x44/0x70 folio_wait_bit_common+0x184/0x3f8 <-- folio = 0xfffffdffc6b503c0 (mapping == 0xffff0000d184f1d8 index == 1711) (*) __folio_lock+0x24/0x38 z_erofs_runqueue+0x384/0x9c0 [erofs] z_erofs_readahead+0x21c/0x350 [erofs] <-- folio mapping 0xffff00036d69cb18 range from [992, 1024] (**) read_pages+0x74/0x328 page_cache_ra_order+0x26c/0x348 ondemand_readahead+0x1c0/0x3a0 page_cache_sync_ra+0x9c/0xc0 filemap_get_pages+0xc4/0x708 filemap_read+0x104/0x3a8 generic_file_read_iter+0x4c/0x150 vfs_read+0x27c/0x330 ksys_pread64+0x84/0xd0 __arm64_sys_pread64+0x28/0x40 invoke_syscall+0x78/0x108 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x3c/0x148 el0t_64_sync_handler+0x100/0x130 el0t_64_sync+0x190/0x198 Link: https://lkml.kernel.org/r/20240729021306.398286-1-hsiangkao@linux.alibaba.com Fixes: 5dfab109d519 ("migrate_pages: batch _unmap and _move") Signed-off-by: Gao Xiang Reviewed-by: "Huang, Ying" Acked-by: David Hildenbrand Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 766c163c2068b45330664fb67df67268e588a22d Author: Suren Baghdasaryan Date: Tue Aug 13 08:07:57 2024 -0700 alloc_tag: mark pages reserved during CMA activation as not tagged During CMA activation, pages in CMA area are prepared and then freed without being allocated. This triggers warnings when memory allocation debug config (CONFIG_MEM_ALLOC_PROFILING_DEBUG) is enabled. Fix this by marking these pages not tagged before freeing them. Link: https://lkml.kernel.org/r/20240813150758.855881-2-surenb@google.com Fixes: d224eb0287fb ("codetag: debug: mark codetags for reserved pages as empty") Signed-off-by: Suren Baghdasaryan Acked-by: David Hildenbrand Cc: Kees Cook Cc: Kent Overstreet Cc: Pasha Tatashin Cc: Sourav Panda Cc: Vlastimil Babka Cc: [6.10] Signed-off-by: Andrew Morton commit a8fc28dad6d574582cdf2f7e78c73c59c623df30 Author: Suren Baghdasaryan Date: Tue Aug 13 08:07:56 2024 -0700 alloc_tag: introduce clear_page_tag_ref() helper function In several cases we are freeing pages which were not allocated using common page allocators. For such cases, in order to keep allocation accounting correct, we should clear the page tag to indicate that the page being freed is expected to not have a valid allocation tag. Introduce clear_page_tag_ref() helper function to be used for this. Link: https://lkml.kernel.org/r/20240813150758.855881-1-surenb@google.com Fixes: d224eb0287fb ("codetag: debug: mark codetags for reserved pages as empty") Signed-off-by: Suren Baghdasaryan Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Reviewed-by: Pasha Tatashin Cc: Kees Cook Cc: Kent Overstreet Cc: Sourav Panda Cc: Vlastimil Babka Cc: [6.10] Signed-off-by: Andrew Morton commit edb907a6133323e19311901a39dee68b1c6a2ef8 Author: Jinjie Ruan Date: Mon Aug 12 14:20:17 2024 +0800 crash: fix riscv64 crash memory reserve dead loop On RISCV64 Qemu machine with 512MB memory, cmdline "crashkernel=500M,high" will cause system stall as below: Zone ranges: DMA32 [mem 0x0000000080000000-0x000000009fffffff] Normal empty Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000080000000-0x000000008005ffff] node 0: [mem 0x0000000080060000-0x000000009fffffff] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff] (stall here) commit 5d99cadf1568 ("crash: fix x86_32 crash memory reserve dead loop bug") fix this on 32-bit architecture. However, the problem is not completely solved. If `CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX` on 64-bit architecture, for example, when system memory is equal to CRASH_ADDR_LOW_MAX on RISCV64, the following infinite loop will also occur: -> reserve_crashkernel_generic() and high is true -> alloc at [CRASH_ADDR_LOW_MAX, CRASH_ADDR_HIGH_MAX] fail -> alloc at [0, CRASH_ADDR_LOW_MAX] fail and repeatedly (because CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX). As Catalin suggested, do not remove the ",high" reservation fallback to ",low" logic which will change arm64's kdump behavior, but fix it by skipping the above situation similar to commit d2f32f23190b ("crash: fix x86_32 crash memory reserve dead loop"). After this patch, it print: cannot allocate crashkernel (size:0x1f400000) Link: https://lkml.kernel.org/r/20240812062017.2674441-1-ruanjinjie@huawei.com Signed-off-by: Jinjie Ruan Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Acked-by: Baoquan He Cc: Albert Ou Cc: Dave Young Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Vivek Goyal Signed-off-by: Andrew Morton commit 7c5e8d212d7d81991a580e7de3904ea213d9a852 Author: Muhammad Usama Anjum Date: Fri Aug 9 12:56:42 2024 +0500 selftests: memfd_secret: don't build memfd_secret test on unsupported arches [1] mentions that memfd_secret is only supported on arm64, riscv, x86 and x86_64 for now. It doesn't support other architectures. I found the build error on arm and decided to send the fix as it was creating noise on KernelCI: memfd_secret.c: In function 'memfd_secret': memfd_secret.c:42:24: error: '__NR_memfd_secret' undeclared (first use in this function); did you mean 'memfd_secret'? 42 | return syscall(__NR_memfd_secret, flags); | ^~~~~~~~~~~~~~~~~ | memfd_secret Hence I'm adding condition that memfd_secret should only be compiled on supported architectures. Also check in run_vmtests script if memfd_secret binary is present before executing it. Link: https://lkml.kernel.org/r/20240812061522.1933054-1-usama.anjum@collabora.com Link: https://lore.kernel.org/all/20210518072034.31572-7-rppt@kernel.org/ [1] Link: https://lkml.kernel.org/r/20240809075642.403247-1-usama.anjum@collabora.com Fixes: 76fe17ef588a ("secretmem: test: add basic selftest for memfd_secret(2)") Signed-off-by: Muhammad Usama Anjum Reviewed-by: Shuah Khan Acked-by: Mike Rapoport (Microsoft) Cc: Albert Ou Cc: James Bottomley Cc: Mike Rapoport (Microsoft) Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Signed-off-by: Andrew Morton commit 807174a93d24c456503692dc3f5af322ee0b640a Author: Kirill A. Shutemov Date: Fri Aug 9 14:48:47 2024 +0300 mm: fix endless reclaim on machines with unaccepted memory Unaccepted memory is considered unusable free memory, which is not counted as free on the zone watermark check. This causes get_page_from_freelist() to accept more memory to hit the high watermark, but it creates problems in the reclaim path. The reclaim path encounters a failed zone watermark check and attempts to reclaim memory. This is usually successful, but if there is little or no reclaimable memory, it can result in endless reclaim with little to no progress. This can occur early in the boot process, just after start of the init process when the only reclaimable memory is the page cache of the init executable and its libraries. Make unaccepted memory free from watermark check point of view. This way unaccepted memory will never be the trigger of memory reclaim. Accept more memory in the get_page_from_freelist() if needed. Link: https://lkml.kernel.org/r/20240809114854.3745464-2-kirill.shutemov@linux.intel.com Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory") Signed-off-by: Kirill A. Shutemov Reported-by: Jianxiong Gao Acked-by: David Hildenbrand Tested-by: Jianxiong Gao Cc: Borislav Petkov Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Mel Gorman Cc: Mike Rapoport (Microsoft) Cc: Tom Lendacky Cc: Vlastimil Babka Cc: [6.5+] Signed-off-by: Andrew Morton commit af3b7d09a9934220a8136065a0e6985fe0b67a1b Author: Dan Carpenter Date: Fri Aug 9 15:32:30 2024 +0300 selftests/mm: compaction_test: fix off by one in check_compaction() The "initial_nr_hugepages" variable is unsigned long so it takes up to 20 characters to print, plus 1 more character for the NUL terminator. Unfortunately, this buffer is not quite large enough for the terminator to fit. Also use snprintf() for a belt and suspenders approach. Link: https://lkml.kernel.org/r/87470c06-b45a-4e83-92ff-aac2e7b9c6ba@stanley.mountain Fixes: fb9293b6b015 ("selftests/mm: compaction_test: fix bogus test success and reduce probability of OOM-killer invocation") Signed-off-by: Dan Carpenter Cc: Shuah Khan Signed-off-by: Andrew Morton commit fd8c35a92910f4829b7c99841f39b1b952c259d5 Author: Zi Yan Date: Fri Aug 9 10:59:05 2024 -0400 mm/numa: no task_numa_fault() call if PMD is changed When handling a numa page fault, task_numa_fault() should be called by a process that restores the page table of the faulted folio to avoid duplicated stats counting. Commit c5b5a3dd2c1f ("mm: thp: refactor NUMA fault handling") restructured do_huge_pmd_numa_page() and did not avoid task_numa_fault() call in the second page table check after a numa migration failure. Fix it by making all !pmd_same() return immediately. This issue can cause task_numa_fault() being called more than necessary and lead to unexpected numa balancing results (It is hard to tell whether the issue will cause positive or negative performance impact due to duplicated numa fault counting). Link: https://lkml.kernel.org/r/20240809145906.1513458-3-ziy@nvidia.com Fixes: c5b5a3dd2c1f ("mm: thp: refactor NUMA fault handling") Reported-by: "Huang, Ying" Closes: https://lore.kernel.org/linux-mm/87zfqfw0yw.fsf@yhuang6-desk2.ccr.corp.intel.com/ Signed-off-by: Zi Yan Acked-by: David Hildenbrand Cc: Baolin Wang Cc: "Huang, Ying" Cc: Kefeng Wang Cc: Mel Gorman Cc: Yang Shi Cc: Signed-off-by: Andrew Morton commit 40b760cfd44566bca791c80e0720d70d75382b84 Author: Zi Yan Date: Fri Aug 9 10:59:04 2024 -0400 mm/numa: no task_numa_fault() call if PTE is changed When handling a numa page fault, task_numa_fault() should be called by a process that restores the page table of the faulted folio to avoid duplicated stats counting. Commit b99a342d4f11 ("NUMA balancing: reduce TLB flush via delaying mapping on hint page fault") restructured do_numa_page() and did not avoid task_numa_fault() call in the second page table check after a numa migration failure. Fix it by making all !pte_same() return immediately. This issue can cause task_numa_fault() being called more than necessary and lead to unexpected numa balancing results (It is hard to tell whether the issue will cause positive or negative performance impact due to duplicated numa fault counting). Link: https://lkml.kernel.org/r/20240809145906.1513458-2-ziy@nvidia.com Fixes: b99a342d4f11 ("NUMA balancing: reduce TLB flush via delaying mapping on hint page fault") Signed-off-by: Zi Yan Reported-by: "Huang, Ying" Closes: https://lore.kernel.org/linux-mm/87zfqfw0yw.fsf@yhuang6-desk2.ccr.corp.intel.com/ Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Kefeng Wang Cc: Mel Gorman Cc: Yang Shi Cc: Signed-off-by: Andrew Morton commit 61ebe5a747da649057c37be1c37eb934b4af79ca Author: Hailong Liu Date: Thu Aug 8 20:19:56 2024 +0800 mm/vmalloc: fix page mapping if vm_area_alloc_pages() with high order fallback to order 0 The __vmap_pages_range_noflush() assumes its argument pages** contains pages with the same page shift. However, since commit e9c3cda4d86e ("mm, vmalloc: fix high order __GFP_NOFAIL allocations"), if gfp_flags includes __GFP_NOFAIL with high order in vm_area_alloc_pages() and page allocation failed for high order, the pages** may contain two different page shifts (high order and order-0). This could lead __vmap_pages_range_noflush() to perform incorrect mappings, potentially resulting in memory corruption. Users might encounter this as follows (vmap_allow_huge = true, 2M is for PMD_SIZE): kvmalloc(2M, __GFP_NOFAIL|GFP_X) __vmalloc_node_range_noprof(vm_flags=VM_ALLOW_HUGE_VMAP) vm_area_alloc_pages(order=9) ---> order-9 allocation failed and fallback to order-0 vmap_pages_range() vmap_pages_range_noflush() __vmap_pages_range_noflush(page_shift = 21) ----> wrong mapping happens We can remove the fallback code because if a high-order allocation fails, __vmalloc_node_range_noprof() will retry with order-0. Therefore, it is unnecessary to fallback to order-0 here. Therefore, fix this by removing the fallback code. Link: https://lkml.kernel.org/r/20240808122019.3361-1-hailong.liu@oppo.com Fixes: e9c3cda4d86e ("mm, vmalloc: fix high order __GFP_NOFAIL allocations") Signed-off-by: Hailong Liu Reported-by: Tangquan Zheng Reviewed-by: Baoquan He Reviewed-by: Uladzislau Rezki (Sony) Acked-by: Barry Song Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton commit d75abd0d0bc29e6ebfebbf76d11b4067b35844af Author: Waiman Long Date: Tue Aug 6 12:41:07 2024 -0400 mm/memory-failure: use raw_spinlock_t in struct memory_failure_cpu The memory_failure_cpu structure is a per-cpu structure. Access to its content requires the use of get_cpu_var() to lock in the current CPU and disable preemption. The use of a regular spinlock_t for locking purpose is fine for a non-RT kernel. Since the integration of RT spinlock support into the v5.15 kernel, a spinlock_t in a RT kernel becomes a sleeping lock and taking a sleeping lock in a preemption disabled context is illegal resulting in the following kind of warning. [12135.732244] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 [12135.732248] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 270076, name: kworker/0:0 [12135.732252] preempt_count: 1, expected: 0 [12135.732255] RCU nest depth: 2, expected: 2 : [12135.732420] Hardware name: Dell Inc. PowerEdge R640/0HG0J8, BIOS 2.10.2 02/24/2021 [12135.732423] Workqueue: kacpi_notify acpi_os_execute_deferred [12135.732433] Call Trace: [12135.732436] [12135.732450] dump_stack_lvl+0x57/0x81 [12135.732461] __might_resched.cold+0xf4/0x12f [12135.732479] rt_spin_lock+0x4c/0x100 [12135.732491] memory_failure_queue+0x40/0xe0 [12135.732503] ghes_do_memory_failure+0x53/0x390 [12135.732516] ghes_do_proc.constprop.0+0x229/0x3e0 [12135.732575] ghes_proc+0xf9/0x1a0 [12135.732591] ghes_notify_hed+0x6a/0x150 [12135.732602] notifier_call_chain+0x43/0xb0 [12135.732626] blocking_notifier_call_chain+0x43/0x60 [12135.732637] acpi_ev_notify_dispatch+0x47/0x70 [12135.732648] acpi_os_execute_deferred+0x13/0x20 [12135.732654] process_one_work+0x41f/0x500 [12135.732695] worker_thread+0x192/0x360 [12135.732715] kthread+0x111/0x140 [12135.732733] ret_from_fork+0x29/0x50 [12135.732779] Fix it by using a raw_spinlock_t for locking instead. Also move the pr_err() out of the lock critical section and after put_cpu_ptr() to avoid indeterminate latency and the possibility of sleep with this call. [longman@redhat.com: don't hold percpu ref across pr_err(), per Miaohe] Link: https://lkml.kernel.org/r/20240807181130.1122660-1-longman@redhat.com Link: https://lkml.kernel.org/r/20240806164107.1044956-1-longman@redhat.com Fixes: 0f383b6dc96e ("locking/spinlock: Provide RT variant") Signed-off-by: Waiman Long Acked-by: Miaohe Lin Cc: "Huang, Ying" Cc: Juri Lelli Cc: Len Brown Cc: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton commit 9d85731110241fb8ca9445ea4177d816041a8825 Author: Pasha Tatashin Date: Thu Aug 8 21:34:36 2024 +0000 mm: don't account memmap per-node Fix invalid access to pgdat during hot-remove operation: ndctl users reported a GPF when trying to destroy a namespace: $ ndctl destroy-namespace all -r all -f Segmentation fault dmesg: Oops: general protection fault, probably for non-canonical address 0xdffffc0000005650: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: probably user-memory-access in range [0x000000000002b280-0x000000000002b287] CPU: 26 UID: 0 PID: 1868 Comm: ndctl Not tainted 6.11.0-rc1 #1 Hardware name: Dell Inc. PowerEdge R640/08HT8T, BIOS 2.20.1 09/13/2023 RIP: 0010:mod_node_page_state+0x2a/0x110 cxl-test users report a GPF when trying to unload the test module: $ modrpobe -r cxl-test dmesg BUG: unable to handle page fault for address: 0000000000004200 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] PREEMPT SMP PTI CPU: 0 UID: 0 PID: 1076 Comm: modprobe Tainted: G O N 6.11.0-rc1 #197 Tainted: [O]=OOT_MODULE, [N]=TEST Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/15 RIP: 0010:mod_node_page_state+0x6/0x90 Currently, when memory is hot-plugged or hot-removed the accounting is done based on the assumption that memmap is allocated from the same node as the hot-plugged/hot-removed memory, which is not always the case. In addition, there are challenges with keeping the node id of the memory that is being remove to the time when memmap accounting is actually performed: since this is done after remove_pfn_range_from_zone(), and also after remove_memory_block_devices(). Meaning that we cannot use pgdat nor walking though memblocks to get the nid. Given all of that, account the memmap overhead system wide instead. For this we are going to be using global atomic counters, but given that memmap size is rarely modified, and normally is only modified either during early boot when there is only one CPU, or under a hotplug global mutex lock, therefore there is no need for per-cpu optimizations. Also, while we are here rename nr_memmap to nr_memmap_pages, and nr_memmap_boot to nr_memmap_boot_pages to be self explanatory that the units are in page count. [pasha.tatashin@soleen.com: address a few nits from David Hildenbrand] Link: https://lkml.kernel.org/r/20240809191020.1142142-4-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20240809191020.1142142-4-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20240808213437.682006-4-pasha.tatashin@soleen.com Fixes: 15995a352474 ("mm: report per-page metadata information") Signed-off-by: Pasha Tatashin Reported-by: Yi Zhang Closes: https://lore.kernel.org/linux-cxl/CAHj4cs9Ax1=CoJkgBGP_+sNu6-6=6v=_L-ZBZY0bVLD3wUWZQg@mail.gmail.com Reported-by: Alison Schofield Closes: https://lore.kernel.org/linux-mm/Zq0tPd2h6alFz8XF@aschofie-mobl2/#t Tested-by: Dan Williams Tested-by: Alison Schofield Acked-by: David Hildenbrand Acked-by: David Rientjes Tested-by: Yi Zhang Cc: Domenico Cerasuolo Cc: Fan Ni Cc: Joel Granados Cc: Johannes Weiner Cc: Li Zhijian Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Muchun Song Cc: Nhat Pham Cc: Sourav Panda Cc: Vlastimil Babka Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit f4cb78af91e3b2b7aa76dbf8213b898fa8811b12 Author: Pasha Tatashin Date: Thu Aug 8 21:34:35 2024 +0000 mm: add system wide stats items category /proc/vmstat contains events and stats, events can only grow, but stats can grow and shrink. vmstat has the following: ------------------------- NR_VM_ZONE_STAT_ITEMS: per-zone stats NR_VM_NUMA_EVENT_ITEMS: per-numa events NR_VM_NODE_STAT_ITEMS: per-numa stats NR_VM_WRITEBACK_STAT_ITEMS: system-wide background-writeback and dirty-throttling tresholds. NR_VM_EVENT_ITEMS: system-wide events ------------------------- Rename NR_VM_WRITEBACK_STAT_ITEMS to NR_VM_STAT_ITEMS, to track the system-wide stats, we are going to add per-page metadata stats to this category in the next patch. Also delete unused writeback_stat_name(). Link: https://lkml.kernel.org/r/20240809191020.1142142-2-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20240808213437.682006-3-pasha.tatashin@soleen.com Fixes: 15995a352474 ("mm: report per-page metadata information") Signed-off-by: Pasha Tatashin Suggested-by: Yosry Ahmed Tested-by: Alison Schofield Acked-by: David Hildenbrand Acked-by: David Rientjes Cc: Dan Williams Cc: Domenico Cerasuolo Cc: Joel Granados Cc: Johannes Weiner Cc: Li Zhijian Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Muchun Song Cc: Nhat Pham Cc: Sourav Panda Cc: Vlastimil Babka Cc: Yi Zhang Cc: Fan Ni Signed-off-by: Andrew Morton commit ace0741a55e453c265cbf3d965eea7f687cd6d45 Author: Pasha Tatashin Date: Thu Aug 8 21:34:34 2024 +0000 mm: don't account memmap on failure Patch series "Fixes for memmap accounting", v4. Memmap accounting provides us with observability of how much memory is used for per-page metadata: i.e. "struct page"'s and "struct page_ext". It also provides with information of how much was allocated using boot allocator (i.e. not part of MemTotal), and how much was allocated using buddy allocated (i.e. part of MemTotal). This small series fixes a few problems that were discovered with the original patch. This patch (of 3): When we fail to allocate the mmemmap in alloc_vmemmap_page_list(), do not account any already-allocated pages: we're going to free all them before we return from the function. Link: https://lkml.kernel.org/r/20240809191020.1142142-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20240808213437.682006-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20240808213437.682006-2-pasha.tatashin@soleen.com Fixes: 15995a352474 ("mm: report per-page metadata information") Signed-off-by: Pasha Tatashin Reviewed-by: Fan Ni Reviewed-by: Yosry Ahmed Acked-by: David Hildenbrand Tested-by: Alison Schofield Reviewed-by: Muchun Song Acked-by: David Rientjes Cc: Dan Williams Cc: Domenico Cerasuolo Cc: Joel Granados Cc: Johannes Weiner Cc: Li Zhijian Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport Cc: Nhat Pham Cc: Sourav Panda Cc: Vlastimil Babka Cc: Yi Zhang Signed-off-by: Andrew Morton commit 5f75cfbd6bb02295ddaed48adf667b6c828ce07b Author: David Hildenbrand Date: Thu Aug 1 22:47:48 2024 +0200 mm/hugetlb: fix hugetlb vs. core-mm PT locking We recently made GUP's common page table walking code to also walk hugetlb VMAs without most hugetlb special-casing, preparing for the future of having less hugetlb-specific page table walking code in the codebase. Turns out that we missed one page table locking detail: page table locking for hugetlb folios that are not mapped using a single PMD/PUD. Assume we have hugetlb folio that spans multiple PTEs (e.g., 64 KiB hugetlb folios on arm64 with 4 KiB base page size). GUP, as it walks the page tables, will perform a pte_offset_map_lock() to grab the PTE table lock. However, hugetlb that concurrently modifies these page tables would actually grab the mm->page_table_lock: with USE_SPLIT_PTE_PTLOCKS, the locks would differ. Something similar can happen right now with hugetlb folios that span multiple PMDs when USE_SPLIT_PMD_PTLOCKS. This issue can be reproduced [1], for example triggering: [ 3105.936100] ------------[ cut here ]------------ [ 3105.939323] WARNING: CPU: 31 PID: 2732 at mm/gup.c:142 try_grab_folio+0x11c/0x188 [ 3105.944634] Modules linked in: [...] [ 3105.974841] CPU: 31 PID: 2732 Comm: reproducer Not tainted 6.10.0-64.eln141.aarch64 #1 [ 3105.980406] Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20240524-4.fc40 05/24/2024 [ 3105.986185] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 3105.991108] pc : try_grab_folio+0x11c/0x188 [ 3105.994013] lr : follow_page_pte+0xd8/0x430 [ 3105.996986] sp : ffff80008eafb8f0 [ 3105.999346] x29: ffff80008eafb900 x28: ffffffe8d481f380 x27: 00f80001207cff43 [ 3106.004414] x26: 0000000000000001 x25: 0000000000000000 x24: ffff80008eafba48 [ 3106.009520] x23: 0000ffff9372f000 x22: ffff7a54459e2000 x21: ffff7a546c1aa978 [ 3106.014529] x20: ffffffe8d481f3c0 x19: 0000000000610041 x18: 0000000000000001 [ 3106.019506] x17: 0000000000000001 x16: ffffffffffffffff x15: 0000000000000000 [ 3106.024494] x14: ffffb85477fdfe08 x13: 0000ffff9372ffff x12: 0000000000000000 [ 3106.029469] x11: 1fffef4a88a96be1 x10: ffff7a54454b5f0c x9 : ffffb854771b12f0 [ 3106.034324] x8 : 0008000000000000 x7 : ffff7a546c1aa980 x6 : 0008000000000080 [ 3106.038902] x5 : 00000000001207cf x4 : 0000ffff9372f000 x3 : ffffffe8d481f000 [ 3106.043420] x2 : 0000000000610041 x1 : 0000000000000001 x0 : 0000000000000000 [ 3106.047957] Call trace: [ 3106.049522] try_grab_folio+0x11c/0x188 [ 3106.051996] follow_pmd_mask.constprop.0.isra.0+0x150/0x2e0 [ 3106.055527] follow_page_mask+0x1a0/0x2b8 [ 3106.058118] __get_user_pages+0xf0/0x348 [ 3106.060647] faultin_page_range+0xb0/0x360 [ 3106.063651] do_madvise+0x340/0x598 Let's make huge_pte_lockptr() effectively use the same PT locks as any core-mm page table walker would. Add ptep_lockptr() to obtain the PTE page table lock using a pte pointer -- unfortunately we cannot convert pte_lockptr() because virt_to_page() doesn't work with kmap'ed page tables we can have with CONFIG_HIGHPTE. Handle CONFIG_PGTABLE_LEVELS correctly by checking in reverse order, such that when e.g., CONFIG_PGTABLE_LEVELS==2 with PGDIR_SIZE==P4D_SIZE==PUD_SIZE==PMD_SIZE will work as expected. Document why that works. There is one ugly case: powerpc 8xx, whereby we have an 8 MiB hugetlb folio being mapped using two PTE page tables. While hugetlb wants to take the PMD table lock, core-mm would grab the PTE table lock of one of both PTE page tables. In such corner cases, we have to make sure that both locks match, which is (fortunately!) currently guaranteed for 8xx as it does not support SMP and consequently doesn't use split PT locks. [1] https://lore.kernel.org/all/1bbfcc7f-f222-45a5-ac44-c5a1381c596d@redhat.com/ Link: https://lkml.kernel.org/r/20240801204748.99107-1-david@redhat.com Fixes: 9cb28da54643 ("mm/gup: handle hugetlb in the generic follow_page_mask code") Signed-off-by: David Hildenbrand Acked-by: Peter Xu Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: Peter Xu Cc: Oscar Salvador Cc: Muchun Song Cc: Signed-off-by: Andrew Morton commit e46bc2e7eb90a370bc27fa2fd98cb8251e7da1ec Author: Pedro Falcato Date: Wed Aug 7 18:33:35 2024 +0100 mseal: fix is_madv_discard() is_madv_discard did its check wrong. MADV_ flags are not bitwise, they're normal sequential numbers. So, for instance: behavior & (/* ... */ | MADV_REMOVE) tagged both MADV_REMOVE and MADV_RANDOM (bit 0 set) as discard operations. As a result the kernel could erroneously block certain madvises (e.g MADV_RANDOM or MADV_HUGEPAGE) on sealed VMAs due to them sharing bits with blocked MADV operations (e.g REMOVE or WIPEONFORK). This is obviously incorrect, so use a switch statement instead. Link: https://lkml.kernel.org/r/20240807173336.2523757-1-pedro.falcato@gmail.com Link: https://lkml.kernel.org/r/20240807173336.2523757-2-pedro.falcato@gmail.com Fixes: 8be7258aad44 ("mseal: add mseal syscall") Signed-off-by: Pedro Falcato Tested-by: Jeff Xu Reviewed-by: Jeff Xu Cc: Kees Cook Cc: Liam R. Howlett Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton commit fee9d135e2fd5963a7f466cd1ef2060731a1ab29 Merge: f8e170a3dd723 042b8711a0bea Author: Dave Airlie Date: Fri Aug 16 13:16:43 2024 +1000 Merge tag 'mediatek-drm-fixes-20240805' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes - 20240805 1. Set sensible cursor width/height values to fix crash Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20240810084605.3435-1-chunkuang.hu@kernel.org commit b153b3c747003e1ce312ba205e552db4bd9e8df7 Author: Jakub Kicinski Date: Wed Aug 14 07:28:32 2024 -0700 MAINTAINERS: add selftests to network drivers tools/testing/selftests/drivers/net/ is not listed under networking entries. Add it to NETWORKING DRIVERS. Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240814142832.3473685-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c948c0973df5db9314459da621342e1170bd9e8e Author: Pavan Chebbi Date: Wed Aug 14 15:54:29 2024 -0700 bnxt_en: Don't clear ntuple filters and rss contexts during ethtool ops The driver currently blindly deletes its cache of RSS cotexts and ntuple filters when the ethtool channel count is changing. It also deletes the ntuple filters cache when the default indirection table is changing. The core will not allow ethtool channels to drop below any that have been configured as ntuple destinations since this commit from 2022: 47f3ecf4763d ("ethtool: Fail number of channels change when it conflicts with rxnfc") So there is absolutely no need to delete the ntuple filters and RSS contexts when changing ethtool channels. It is also unnecessary to delete ntuple filters when the default RSS indirection table is changing. Remove bnxt_clear_usr_fltrs() and bnxt_clear_rss_ctxis() from the ethtool ops and change them to static functions. This bug will cause confusion to the end user and causes failure when running the rss_ctx.py selftest. Fixes: 1018319f949c ("bnxt_en: Invalidate user filters when needed") Reported-by: Jakub Kicinski Closes: https://lore.kernel.org/netdev/20240725111912.7bc17cf6@kernel.org/ Reviewed-by: Andy Gospodarek Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://patch.msgid.link/20240814225429.199280-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit b96ed2c97c791954abc881ef384e773010945aec Author: Jiri Pirko Date: Wed Aug 14 14:25:00 2024 +0200 virtio_net: move netdev_tx_reset_queue() call before RX napi enable During suspend/resume the following BUG was hit: ------------[ cut here ]------------ kernel BUG at lib/dynamic_queue_limits.c:99! Internal error: Oops - BUG: 0 [#1] SMP ARM Modules linked in: bluetooth ecdh_generic ecc libaes CPU: 1 PID: 1282 Comm: rtcwake Not tainted 6.10.0-rc3-00732-gc8bd1f7f3e61 #15240 Hardware name: Generic DT based system PC is at dql_completed+0x270/0x2cc LR is at __free_old_xmit+0x120/0x198 pc : []    lr : []    psr: 80000013 ... Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none Control: 10c5387d  Table: 43a4406a  DAC: 00000051 ... Process rtcwake (pid: 1282, stack limit = 0xfbc21278) Stack: (0xe0805e80 to 0xe0806000) ... Call trace:  dql_completed from __free_old_xmit+0x120/0x198  __free_old_xmit from free_old_xmit+0x44/0xe4  free_old_xmit from virtnet_poll_tx+0x88/0x1b4  virtnet_poll_tx from __napi_poll+0x2c/0x1d4  __napi_poll from net_rx_action+0x140/0x2b4  net_rx_action from handle_softirqs+0x11c/0x350  handle_softirqs from call_with_stack+0x18/0x20  call_with_stack from do_softirq+0x48/0x50  do_softirq from __local_bh_enable_ip+0xa0/0xa4  __local_bh_enable_ip from virtnet_open+0xd4/0x21c  virtnet_open from virtnet_restore+0x94/0x120  virtnet_restore from virtio_device_restore+0x110/0x1f4  virtio_device_restore from dpm_run_callback+0x3c/0x100  dpm_run_callback from device_resume+0x12c/0x2a8  device_resume from dpm_resume+0x12c/0x1e0  dpm_resume from dpm_resume_end+0xc/0x18  dpm_resume_end from suspend_devices_and_enter+0x1f0/0x72c  suspend_devices_and_enter from pm_suspend+0x270/0x2a0  pm_suspend from state_store+0x68/0xc8  state_store from kernfs_fop_write_iter+0x10c/0x1cc  kernfs_fop_write_iter from vfs_write+0x2b0/0x3dc  vfs_write from ksys_write+0x5c/0xd4  ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xe8bf1fa8 to 0xe8bf1ff0) ... ---[ end trace 0000000000000000 ]--- After virtnet_napi_enable() is called, the following path is hit: __napi_poll() -> virtnet_poll() -> virtnet_poll_cleantx() -> netif_tx_wake_queue() That wakes the TX queue and allows skbs to be submitted and accounted by BQL counters. Then netdev_tx_reset_queue() is called that resets BQL counters and eventually leads to the BUG in dql_completed(). Move virtnet_napi_tx_enable() what does BQL counters reset before RX napi enable to avoid the issue. Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/netdev/e632e378-d019-4de7-8f13-07c572ab37a9@samsung.com/ Fixes: c8bd1f7f3e61 ("virtio_net: add support for Byte Queue Limits") Tested-by: Marek Szyprowski Signed-off-by: Jiri Pirko Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Link: https://patch.msgid.link/20240814122500.1710279-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit f8e170a3dd723c29d7fedcd584c468e1fedd5e5b Merge: 75eac7e8bb775 f002702290fcc Author: Dave Airlie Date: Fri Aug 16 12:06:07 2024 +1000 Merge tag 'drm-xe-fixes-2024-08-15' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Validate user fence during creation (Brost) - Fix use after free when client stats are captured (Umesh) - SRIOV fixes (Michal) - Runtime PM fixes (Brost) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Zr4KWF5nM1YvnT8H@intel.com commit 9b340aeb26d50e9a9ec99599e2a39b035fac978e Author: Dave Airlie Date: Fri Aug 16 06:19:23 2024 +1000 nouveau/firmware: use dma non-coherent allocator Currently, enabling SG_DEBUG in the kernel will cause nouveau to hit a BUG() on startup, when the iommu is enabled: kernel BUG at include/linux/scatterlist.h:187! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 7 PID: 930 Comm: (udev-worker) Not tainted 6.9.0-rc3Lyude-Test+ #30 Hardware name: MSI MS-7A39/A320M GAMING PRO (MS-7A39), BIOS 1.I0 01/22/2019 RIP: 0010:sg_init_one+0x85/0xa0 Code: 69 88 32 01 83 e1 03 f6 c3 03 75 20 a8 01 75 1e 48 09 cb 41 89 54 24 08 49 89 1c 24 41 89 6c 24 0c 5b 5d 41 5c e9 7b b9 88 00 <0f> 0b 0f 0b 0f 0b 48 8b 05 5e 46 9a 01 eb b2 66 66 2e 0f 1f 84 00 RSP: 0018:ffffa776017bf6a0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffa77600d87000 RCX: 000000000000002b RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffa77680d87000 RBP: 000000000000e000 R08: 0000000000000000 R09: 0000000000000000 R10: ffff98f4c46aa508 R11: 0000000000000000 R12: ffff98f4c46aa508 R13: ffff98f4c46aa008 R14: ffffa77600d4a000 R15: ffffa77600d4a018 FS: 00007feeb5aae980(0000) GS:ffff98f5c4dc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f22cb9a4520 CR3: 00000001043ba000 CR4: 00000000003506f0 Call Trace: ? die+0x36/0x90 ? do_trap+0xdd/0x100 ? sg_init_one+0x85/0xa0 ? do_error_trap+0x65/0x80 ? sg_init_one+0x85/0xa0 ? exc_invalid_op+0x50/0x70 ? sg_init_one+0x85/0xa0 ? asm_exc_invalid_op+0x1a/0x20 ? sg_init_one+0x85/0xa0 nvkm_firmware_ctor+0x14a/0x250 [nouveau] nvkm_falcon_fw_ctor+0x42/0x70 [nouveau] ga102_gsp_booter_ctor+0xb4/0x1a0 [nouveau] r535_gsp_oneinit+0xb3/0x15f0 [nouveau] ? srso_return_thunk+0x5/0x5f ? srso_return_thunk+0x5/0x5f ? nvkm_udevice_new+0x95/0x140 [nouveau] ? srso_return_thunk+0x5/0x5f ? srso_return_thunk+0x5/0x5f ? ktime_get+0x47/0xb0 Fix this by using the non-coherent allocator instead, I think there might be a better answer to this, but it involve ripping up some of APIs using sg lists. Cc: stable@vger.kernel.org Fixes: 2541626cfb79 ("drm/nouveau/acr: use common falcon HS FW code for ACR FWs") Signed-off-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240815201923.632803-1-airlied@gmail.com commit 75eac7e8bb77597fa199a056710f9ebba5b1995b Merge: 9370e43071ba1 fd45cc614b8ac Author: Dave Airlie Date: Fri Aug 16 11:21:31 2024 +1000 Merge tag 'drm-misc-fixes-2024-08-15' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: panel: - dt-bindings style fixes panel-orientation: - add quirk for Any Loki Max - add quirk for Any Loki Zero rockchip: - inno-hdmi: fix infoframe upload v3d: - fix OOB access in v3d_csd_job_run() Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240815131751.GA151031@linux.fritz.box commit b313a8c835516bdda85025500be866ac8a74e022 Author: Li Lingfeng Date: Thu Aug 15 10:47:36 2024 +0800 block: Fix lockdep warning in blk_mq_mark_tag_wait Lockdep reported a warning in Linux version 6.6: [ 414.344659] ================================ [ 414.345155] WARNING: inconsistent lock state [ 414.345658] 6.6.0-07439-gba2303cacfda #6 Not tainted [ 414.346221] -------------------------------- [ 414.346712] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [ 414.347545] kworker/u10:3/1152 [HC0[0]:SC0[0]:HE0:SE1] takes: [ 414.349245] ffff88810edd1098 (&sbq->ws[i].wait){+.?.}-{2:2}, at: blk_mq_dispatch_rq_list+0x131c/0x1ee0 [ 414.351204] {IN-SOFTIRQ-W} state was registered at: [ 414.351751] lock_acquire+0x18d/0x460 [ 414.352218] _raw_spin_lock_irqsave+0x39/0x60 [ 414.352769] __wake_up_common_lock+0x22/0x60 [ 414.353289] sbitmap_queue_wake_up+0x375/0x4f0 [ 414.353829] sbitmap_queue_clear+0xdd/0x270 [ 414.354338] blk_mq_put_tag+0xdf/0x170 [ 414.354807] __blk_mq_free_request+0x381/0x4d0 [ 414.355335] blk_mq_free_request+0x28b/0x3e0 [ 414.355847] __blk_mq_end_request+0x242/0xc30 [ 414.356367] scsi_end_request+0x2c1/0x830 [ 414.345155] WARNING: inconsistent lock state [ 414.345658] 6.6.0-07439-gba2303cacfda #6 Not tainted [ 414.346221] -------------------------------- [ 414.346712] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [ 414.347545] kworker/u10:3/1152 [HC0[0]:SC0[0]:HE0:SE1] takes: [ 414.349245] ffff88810edd1098 (&sbq->ws[i].wait){+.?.}-{2:2}, at: blk_mq_dispatch_rq_list+0x131c/0x1ee0 [ 414.351204] {IN-SOFTIRQ-W} state was registered at: [ 414.351751] lock_acquire+0x18d/0x460 [ 414.352218] _raw_spin_lock_irqsave+0x39/0x60 [ 414.352769] __wake_up_common_lock+0x22/0x60 [ 414.353289] sbitmap_queue_wake_up+0x375/0x4f0 [ 414.353829] sbitmap_queue_clear+0xdd/0x270 [ 414.354338] blk_mq_put_tag+0xdf/0x170 [ 414.354807] __blk_mq_free_request+0x381/0x4d0 [ 414.355335] blk_mq_free_request+0x28b/0x3e0 [ 414.355847] __blk_mq_end_request+0x242/0xc30 [ 414.356367] scsi_end_request+0x2c1/0x830 [ 414.356863] scsi_io_completion+0x177/0x1610 [ 414.357379] scsi_complete+0x12f/0x260 [ 414.357856] blk_complete_reqs+0xba/0xf0 [ 414.358338] __do_softirq+0x1b0/0x7a2 [ 414.358796] irq_exit_rcu+0x14b/0x1a0 [ 414.359262] sysvec_call_function_single+0xaf/0xc0 [ 414.359828] asm_sysvec_call_function_single+0x1a/0x20 [ 414.360426] default_idle+0x1e/0x30 [ 414.360873] default_idle_call+0x9b/0x1f0 [ 414.361390] do_idle+0x2d2/0x3e0 [ 414.361819] cpu_startup_entry+0x55/0x60 [ 414.362314] start_secondary+0x235/0x2b0 [ 414.362809] secondary_startup_64_no_verify+0x18f/0x19b [ 414.363413] irq event stamp: 428794 [ 414.363825] hardirqs last enabled at (428793): [] ktime_get+0x1dc/0x200 [ 414.364694] hardirqs last disabled at (428794): [] _raw_spin_lock_irq+0x47/0x50 [ 414.365629] softirqs last enabled at (428444): [] __do_softirq+0x540/0x7a2 [ 414.366522] softirqs last disabled at (428419): [] irq_exit_rcu+0x14b/0x1a0 [ 414.367425] other info that might help us debug this: [ 414.368194] Possible unsafe locking scenario: [ 414.368900] CPU0 [ 414.369225] ---- [ 414.369548] lock(&sbq->ws[i].wait); [ 414.370000] [ 414.370342] lock(&sbq->ws[i].wait); [ 414.370802] *** DEADLOCK *** [ 414.371569] 5 locks held by kworker/u10:3/1152: [ 414.372088] #0: ffff88810130e938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x357/0x13f0 [ 414.373180] #1: ffff88810201fdb8 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x3a3/0x13f0 [ 414.374384] #2: ffffffff86ffbdc0 (rcu_read_lock){....}-{1:2}, at: blk_mq_run_hw_queue+0x637/0xa00 [ 414.375342] #3: ffff88810edd1098 (&sbq->ws[i].wait){+.?.}-{2:2}, at: blk_mq_dispatch_rq_list+0x131c/0x1ee0 [ 414.376377] #4: ffff888106205a08 (&hctx->dispatch_wait_lock){+.-.}-{2:2}, at: blk_mq_dispatch_rq_list+0x1337/0x1ee0 [ 414.378607] stack backtrace: [ 414.379177] CPU: 0 PID: 1152 Comm: kworker/u10:3 Not tainted 6.6.0-07439-gba2303cacfda #6 [ 414.380032] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 414.381177] Workqueue: writeback wb_workfn (flush-253:0) [ 414.381805] Call Trace: [ 414.382136] [ 414.382429] dump_stack_lvl+0x91/0xf0 [ 414.382884] mark_lock_irq+0xb3b/0x1260 [ 414.383367] ? __pfx_mark_lock_irq+0x10/0x10 [ 414.383889] ? stack_trace_save+0x8e/0xc0 [ 414.384373] ? __pfx_stack_trace_save+0x10/0x10 [ 414.384903] ? graph_lock+0xcf/0x410 [ 414.385350] ? save_trace+0x3d/0xc70 [ 414.385808] mark_lock.part.20+0x56d/0xa90 [ 414.386317] mark_held_locks+0xb0/0x110 [ 414.386791] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 414.387320] lockdep_hardirqs_on_prepare+0x297/0x3f0 [ 414.387901] ? _raw_spin_unlock_irq+0x28/0x50 [ 414.388422] trace_hardirqs_on+0x58/0x100 [ 414.388917] _raw_spin_unlock_irq+0x28/0x50 [ 414.389422] __blk_mq_tag_busy+0x1d6/0x2a0 [ 414.389920] __blk_mq_get_driver_tag+0x761/0x9f0 [ 414.390899] blk_mq_dispatch_rq_list+0x1780/0x1ee0 [ 414.391473] ? __pfx_blk_mq_dispatch_rq_list+0x10/0x10 [ 414.392070] ? sbitmap_get+0x2b8/0x450 [ 414.392533] ? __blk_mq_get_driver_tag+0x210/0x9f0 [ 414.393095] __blk_mq_sched_dispatch_requests+0xd99/0x1690 [ 414.393730] ? elv_attempt_insert_merge+0x1b1/0x420 [ 414.394302] ? __pfx___blk_mq_sched_dispatch_requests+0x10/0x10 [ 414.394970] ? lock_acquire+0x18d/0x460 [ 414.395456] ? blk_mq_run_hw_queue+0x637/0xa00 [ 414.395986] ? __pfx_lock_acquire+0x10/0x10 [ 414.396499] blk_mq_sched_dispatch_requests+0x109/0x190 [ 414.397100] blk_mq_run_hw_queue+0x66e/0xa00 [ 414.397616] blk_mq_flush_plug_list.part.17+0x614/0x2030 [ 414.398244] ? __pfx_blk_mq_flush_plug_list.part.17+0x10/0x10 [ 414.398897] ? writeback_sb_inodes+0x241/0xcc0 [ 414.399429] blk_mq_flush_plug_list+0x65/0x80 [ 414.399957] __blk_flush_plug+0x2f1/0x530 [ 414.400458] ? __pfx___blk_flush_plug+0x10/0x10 [ 414.400999] blk_finish_plug+0x59/0xa0 [ 414.401467] wb_writeback+0x7cc/0x920 [ 414.401935] ? __pfx_wb_writeback+0x10/0x10 [ 414.402442] ? mark_held_locks+0xb0/0x110 [ 414.402931] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 414.403462] ? lockdep_hardirqs_on_prepare+0x297/0x3f0 [ 414.404062] wb_workfn+0x2b3/0xcf0 [ 414.404500] ? __pfx_wb_workfn+0x10/0x10 [ 414.404989] process_scheduled_works+0x432/0x13f0 [ 414.405546] ? __pfx_process_scheduled_works+0x10/0x10 [ 414.406139] ? do_raw_spin_lock+0x101/0x2a0 [ 414.406641] ? assign_work+0x19b/0x240 [ 414.407106] ? lock_is_held_type+0x9d/0x110 [ 414.407604] worker_thread+0x6f2/0x1160 [ 414.408075] ? __kthread_parkme+0x62/0x210 [ 414.408572] ? lockdep_hardirqs_on_prepare+0x297/0x3f0 [ 414.409168] ? __kthread_parkme+0x13c/0x210 [ 414.409678] ? __pfx_worker_thread+0x10/0x10 [ 414.410191] kthread+0x33c/0x440 [ 414.410602] ? __pfx_kthread+0x10/0x10 [ 414.411068] ret_from_fork+0x4d/0x80 [ 414.411526] ? __pfx_kthread+0x10/0x10 [ 414.411993] ret_from_fork_asm+0x1b/0x30 [ 414.412489] When interrupt is turned on while a lock holding by spin_lock_irq it throws a warning because of potential deadlock. blk_mq_prep_dispatch_rq blk_mq_get_driver_tag __blk_mq_get_driver_tag __blk_mq_alloc_driver_tag blk_mq_tag_busy -> tag is already busy // failed to get driver tag blk_mq_mark_tag_wait spin_lock_irq(&wq->lock) -> lock A (&sbq->ws[i].wait) __add_wait_queue(wq, wait) -> wait queue active blk_mq_get_driver_tag __blk_mq_tag_busy -> 1) tag must be idle, which means there can't be inflight IO spin_lock_irq(&tags->lock) -> lock B (hctx->tags) spin_unlock_irq(&tags->lock) -> unlock B, turn on interrupt accidentally -> 2) context must be preempt by IO interrupt to trigger deadlock. As shown above, the deadlock is not possible in theory, but the warning still need to be fixed. Fix it by using spin_lock_irqsave to get lockB instead of spin_lock_irq. Fixes: 4f1731df60f9 ("blk-mq: fix potential io hang by wrong 'wake_batch'") Signed-off-by: Li Lingfeng Reviewed-by: Ming Lei Reviewed-by: Yu Kuai Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240815024736.2040971-1-lilingfeng@huaweicloud.com Signed-off-by: Jens Axboe commit 9370e43071ba157b73d717b3bfa0f6aa628148d7 Merge: 7c626ce4bae1a 23acd1f344e81 Author: Dave Airlie Date: Fri Aug 16 10:57:05 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-08-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-08-14: amdgpu: - Fix MES ring buffer overflow - DCN 3.5 fix - DCN 3.2.1 fix - DP MST fix - Cursor fixes - JPEG fixes - Context ops validation - MES 12 fixes - VCN 5.0 fix - HDP fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240814213846.1331827-1-alexander.deucher@amd.com commit d7a5aa4b3c007fae50405ca75c40258d90300e96 Merge: e724918b37862 4bbe600293195 Author: Linus Torvalds Date: Thu Aug 15 16:08:59 2024 -0700 Merge tag 'perf-tools-fixes-for-v6.11-2024-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Namhyung Kim: "The usual header file sync-ups and one more build fix: - Add README file to explain why we copy the headers - Sync UAPI and other header files with kernel source - Fix build on MIPS 32-bit" * tag 'perf-tools-fixes-for-v6.11-2024-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf daemon: Fix the build on 32-bit architectures tools/include: Sync arm64 headers with the kernel sources tools/include: Sync x86 headers with the kernel sources tools/include: Sync filesystem headers with the kernel sources tools/include: Sync network socket headers with the kernel sources tools/include: Sync uapi/asm-generic/unistd.h with the kernel sources tools/include: Sync uapi/sound/asound.h with the kernel sources tools/include: Sync uapi/linux/perf.h with the kernel sources tools/include: Sync uapi/linux/kvm.h with the kernel sources tools/include: Sync uapi/drm/i915_drm.h with the kernel sources perf tools: Add tools/include/uapi/README commit 5b4f3af39b6588e8de4444d8e1ccf759b40f9414 Author: Gustavo A. R. Silva Date: Thu Aug 8 16:04:04 2024 -0600 smb: smb2pdu.h: Use static_assert() to check struct sizes Commit 9f9bef9bc5c6 ("smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end warnings") introduced tagged `struct create_context_hdr`. We want to ensure that when new members need to be added to the flexible structure, they are always included within this tagged struct. So, we use `static_assert()` to ensure that the memory layout for both the flexible structure and the tagged struct is the same after any changes. Acked-by: Namjae Jeon Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steve French commit 836bb3268db405cf9021496ac4dbc26d3e4758fe Author: Steve French Date: Thu Aug 15 14:03:43 2024 -0500 smb3: fix lock breakage for cached writes Mandatory locking is enforced for cached writes, which violates default posix semantics, and also it is enforced inconsistently. This apparently breaks recent versions of libreoffice, but can also be demonstrated by opening a file twice from the same client, locking it from handle one and writing to it from handle two (which fails, returning EACCES). Since there was already a mount option "forcemandatorylock" (which defaults to off), with this change only when the user intentionally specifies "forcemandatorylock" on mount will we break posix semantics on write to a locked range (ie we will only fail the write in this case, if the user mounts with "forcemandatorylock"). Fixes: 85160e03a79e ("CIFS: Implement caching mechanism for mandatory brlocks") Cc: stable@vger.kernel.org Cc: Pavel Shilovsky Reported-by: abartlet@samba.org Reported-by: Kevin Ottens Reviewed-by: David Howells Signed-off-by: Steve French commit 50faba777177e80fd29a249fcd9f8aa18348d65b Merge: 7db4042336580 c916ca35308d3 Author: Jens Axboe Date: Thu Aug 15 14:53:08 2024 -0600 Merge tag 'md-6.11-20240815' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.11 Pull MD fix from Song: "This patch fixes a potential data corruption in degraded raid0 array with slow (WriteMostly) drives. This issue was introduced in upstream 6.9 kernel." * tag 'md-6.11-20240815' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: Fix data corruption for degraded array with slow disk commit c916ca35308d3187c9928664f9be249b22a3a701 Author: Yu Kuai Date: Sat Aug 3 17:11:37 2024 +0800 md/raid1: Fix data corruption for degraded array with slow disk read_balance() will avoid reading from slow disks as much as possible, however, if valid data only lands in slow disks, and a new normal disk is still in recovery, unrecovered data can be read: raid1_read_request read_balance raid1_should_read_first -> return false choose_best_rdev -> normal disk is not recovered, return -1 choose_bb_rdev -> missing the checking of recovery, return the normal disk -> read unrecovered data Root cause is that the checking of recovery is missing in choose_bb_rdev(). Hence add such checking to fix the problem. Also fix similar problem in choose_slow_rdev(). Cc: stable@vger.kernel.org Fixes: 9f3ced792203 ("md/raid1: factor out choose_bb_rdev() from read_balance()") Fixes: dfa8ecd167c1 ("md/raid1: factor out choose_slow_rdev() from read_balance()") Reported-and-tested-by: Mateusz Jończyk Closes: https://lore.kernel.org/all/9952f532-2554-44bf-b906-4880b2e88e3a@o2.pl/ Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20240803091137.3197008-1-yukuai1@huaweicloud.com Signed-off-by: Song Liu commit 74c2ab6d653b4c2354df65a7f7f2df1925a40a51 Author: Su Hui Date: Thu Aug 8 20:23:32 2024 +0800 smb/client: avoid possible NULL dereference in cifs_free_subrequest() Clang static checker (scan-build) warning: cifsglob.h:line 890, column 3 Access to field 'ops' results in a dereference of a null pointer. Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in R/W requests") adds a check for 'rdata->server', and let clang throw this warning about NULL dereference. When 'rdata->credits.value != 0 && rdata->server == NULL' happens, add_credits_and_wake_if() will call rdata->server->ops->add_credits(). This will cause NULL dereference problem. Add a check for 'rdata->server' to avoid NULL dereference. Cc: stable@vger.kernel.org Fixes: 69c3c023af25 ("cifs: Implement netfslib hooks") Reviewed-by: David Howells Signed-off-by: Su Hui Signed-off-by: Steve French commit 32d5f7add080a936e28ab4142bfeea6b06999789 Merge: e01d48c699bbe 1f5288874de77 Author: Palmer Dabbelt Date: Wed Aug 14 13:13:26 2024 -0700 Merge patch series "RISC-V: hwprobe: Misaligned scalar perf fix and rename" Evan Green says: The CPUPERF0 hwprobe key was documented and identified in code as a bitmask value, but its contents were an enum. This produced incorrect behavior in conjunction with the WHICH_CPUS hwprobe flag. The first patch in this series fixes the bitmask/enum problem by creating a new hwprobe key that returns the same data, but is properly described as a value instead of a bitmask. The second patch renames the value definitions in preparation for adding vector misaligned access info. As of this version, the old defines are kept in place to maintain source compatibility with older userspace programs. * b4-shazam-merge: RISC-V: hwprobe: Add SCALAR to misaligned perf defines RISC-V: hwprobe: Add MISALIGNED_PERF key Link: https://lore.kernel.org/r/20240809214444.3257596-1-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit e01d48c699bbe015d887cb598e4047f08f3998a8 Author: Alexandre Ghiti Date: Wed Aug 14 21:26:19 2024 +0200 riscv: Fix out-of-bounds when accessing Andes per hart vendor extension array The out-of-bounds access is reported by UBSAN: [ 0.000000] UBSAN: array-index-out-of-bounds in ../arch/riscv/kernel/vendor_extensions.c:41:66 [ 0.000000] index -1 is out of range for type 'riscv_isavendorinfo [32]' [ 0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.11.0-rc2ubuntu-defconfig #2 [ 0.000000] Hardware name: riscv-virtio,qemu (DT) [ 0.000000] Call Trace: [ 0.000000] [] dump_backtrace+0x32/0x40 [ 0.000000] [] show_stack+0x38/0x44 [ 0.000000] [] dump_stack_lvl+0x70/0x9c [ 0.000000] [] dump_stack+0x18/0x20 [ 0.000000] [] ubsan_epilogue+0x10/0x46 [ 0.000000] [] __ubsan_handle_out_of_bounds+0x94/0x9c [ 0.000000] [] __riscv_isa_vendor_extension_available+0x90/0x92 [ 0.000000] [] riscv_cpufeature_patch_func+0xc4/0x148 [ 0.000000] [] _apply_alternatives+0x42/0x50 [ 0.000000] [] apply_boot_alternatives+0x3c/0x100 [ 0.000000] [] setup_arch+0x85a/0x8bc [ 0.000000] [] start_kernel+0xa4/0xfb6 The dereferencing using cpu should actually not happen, so remove it. Fixes: 23c996fc2bc1 ("riscv: Extend cpufeature.c to detect vendor extensions") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240814192619.276794-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 0e28bf61a5f9ab30be3f3b4eafb8d097e39446bb Author: David Gstir Date: Wed Jul 17 13:28:45 2024 +0200 KEYS: trusted: dcp: fix leak of blob encryption key Trusted keys unseal the key blob on load, but keep the sealed payload in the blob field so that every subsequent read (export) will simply convert this field to hex and send it to userspace. With DCP-based trusted keys, we decrypt the blob encryption key (BEK) in the Kernel due hardware limitations and then decrypt the blob payload. BEK decryption is done in-place which means that the trusted key blob field is modified and it consequently holds the BEK in plain text. Every subsequent read of that key thus send the plain text BEK instead of the encrypted BEK to userspace. This issue only occurs when importing a trusted DCP-based key and then exporting it again. This should rarely happen as the common use cases are to either create a new trusted key and export it, or import a key blob and then just use it without exporting it again. Fix this by performing BEK decryption and encryption in a dedicated buffer. Further always wipe the plain text BEK buffer to prevent leaking the key via uninitialized memory. Cc: stable@vger.kernel.org # v6.10+ Fixes: 2e8a0f40a39c ("KEYS: trusted: Introduce NXP DCP-backed trusted keys") Signed-off-by: David Gstir Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 6486cad00a8b7f8585983408c152bbe33dda529b Author: David Gstir Date: Wed Jul 17 13:28:44 2024 +0200 KEYS: trusted: fix DCP blob payload length assignment The DCP trusted key type uses the wrong helper function to store the blob's payload length which can lead to the wrong byte order being used in case this would ever run on big endian architectures. Fix by using correct helper function. Cc: stable@vger.kernel.org # v6.10+ Fixes: 2e8a0f40a39c ("KEYS: trusted: Introduce NXP DCP-backed trusted keys") Suggested-by: Richard Weinberger Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405240610.fj53EK0q-lkp@intel.com/ Signed-off-by: David Gstir Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit e724918b3786252b985b0c2764c16a57d1937707 Merge: a4a35f6cbebbf fb6a421fb6153 Author: Linus Torvalds Date: Thu Aug 15 11:50:07 2024 -0700 Merge tag 'hardening-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening fixes from Kees Cook: - gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement (Thorsten Blum) - kallsyms: Clean up interaction with LTO suffixes (Song Liu) - refcount: Report UAF for refcount_sub_and_test(0) when counter==0 (Petr Pavlu) - kunit/overflow: Avoid misallocation of driver name (Ivan Orlov) * tag 'hardening-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kallsyms: Match symbols exactly with CONFIG_LTO_CLANG kallsyms: Do not cleanup .llvm. suffix before sorting symbols kunit/overflow: Fix UB in overflow_allocation_test gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement refcount: Report UAF for refcount_sub_and_test(0) when counter==0 commit e30729d4bd4001881be4d1ad4332a5d4985398f8 Author: Naohiro Aota Date: Thu Aug 1 16:47:52 2024 +0900 btrfs: zoned: properly take lock to read/update block group's zoned variables __btrfs_add_free_space_zoned() references and modifies bg's alloc_offset, ro, and zone_unusable, but without taking the lock. It is mostly safe because they monotonically increase (at least for now) and this function is mostly called by a transaction commit, which is serialized by itself. Still, taking the lock is a safer and correct option and I'm going to add a change to reset zone_unusable while a block group is still alive. So, add locking around the operations. Fixes: 169e0da91a21 ("btrfs: zoned: track unusable bytes for zones") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 008e2512dc5696ab2dc5bf264e98a9fe9ceb830e Author: Qu Wenruo Date: Sun Aug 11 15:00:22 2024 +0930 btrfs: tree-checker: add dev extent item checks [REPORT] There is a corruption report that btrfs refused to mount a fs that has overlapping dev extents: BTRFS error (device sdc): dev extent devid 4 physical offset 14263979671552 overlap with previous dev extent end 14263980982272 BTRFS error (device sdc): failed to verify dev extents against chunks: -117 BTRFS error (device sdc): open_ctree failed [CAUSE] The direct cause is very obvious, there is a bad dev extent item with incorrect length. With btrfs check reporting two overlapping extents, the second one shows some clue on the cause: ERROR: dev extent devid 4 offset 14263979671552 len 6488064 overlap with previous dev extent end 14263980982272 ERROR: dev extent devid 13 offset 2257707008000 len 6488064 overlap with previous dev extent end 2257707270144 ERROR: errors found in extent allocation tree or chunk allocation The second one looks like a bitflip happened during new chunk allocation: hex(2257707008000) = 0x20da9d30000 hex(2257707270144) = 0x20da9d70000 diff = 0x00000040000 So it looks like a bitflip happened during new dev extent allocation, resulting the second overlap. Currently we only do the dev-extent verification at mount time, but if the corruption is caused by memory bitflip, we really want to catch it before writing the corruption to the storage. Furthermore the dev extent items has the following key definition: ( DEV_EXTENT ) Thus we can not just rely on the generic key order check to make sure there is no overlapping. [ENHANCEMENT] Introduce dedicated dev extent checks, including: - Fixed member checks * chunk_tree should always be BTRFS_CHUNK_TREE_OBJECTID (3) * chunk_objectid should always be BTRFS_FIRST_CHUNK_CHUNK_TREE_OBJECTID (256) - Alignment checks * chunk_offset should be aligned to sectorsize * length should be aligned to sectorsize * key.offset should be aligned to sectorsize - Overlap checks If the previous key is also a dev-extent item, with the same device id, make sure we do not overlap with the previous dev extent. Reported: Stefan N Link: https://lore.kernel.org/linux-btrfs/CA+W5K0rSO3koYTo=nzxxTm1-Pdu1HYgVxEpgJ=aGc7d=E8mGEg@mail.gmail.com/ CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3bc2ac2f8f0b78a13140fc72022771efe0c9b778 Author: Jeff Layton Date: Mon Aug 12 12:30:52 2024 -0400 btrfs: update target inode's ctime on unlink Unlink changes the link count on the target inode. POSIX mandates that the ctime must also change when this occurs. According to https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html: "Upon successful completion, unlink() shall mark for update the last data modification and last file status change timestamps of the parent directory. Also, if the file's link count is not 0, the last file status change timestamp of the file shall be marked for update." Signed-off-by: Jeff Layton Reviewed-by: David Sterba [ add link to the opengroup docs ] Signed-off-by: David Sterba commit c0247d289e73e18f6ddb0895de30c09770fbed95 Author: Thorsten Blum Date: Tue Aug 13 12:53:15 2024 +0200 btrfs: send: annotate struct name_cache_entry with __counted_by() Add the __counted_by compiler attribute to the flexible array member name to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Signed-off-by: Thorsten Blum Reviewed-by: David Sterba Signed-off-by: David Sterba commit a4a35f6cbebbf9466b6c412506ab89299d567f51 Merge: 20573d8e1c280 9c5af2d7dfe18 Author: Linus Torvalds Date: Thu Aug 15 10:35:20 2024 -0700 Merge tag 'net-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from wireless and netfilter Current release - regressions: - udp: fall back to software USO if IPv6 extension headers are present - wifi: iwlwifi: correctly lookup DMA address in SG table Current release - new code bugs: - eth: mlx5e: fix queue stats access to non-existing channels splat Previous releases - regressions: - eth: mlx5e: take state lock during tx timeout reporter - eth: mlxbf_gige: disable RX filters until RX path initialized - eth: igc: fix reset adapter logics when tx mode change Previous releases - always broken: - tcp: update window clamping condition - netfilter: - nf_queue: drop packets with cloned unconfirmed conntracks - nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests - vsock: fix recursive ->recvmsg calls - dsa: vsc73xx: fix MDIO bus access and PHY opera - eth: gtp: pull network headers in gtp_dev_xmit() - eth: igc: fix packet still tx after gate close by reducing i226 MAC retry buffer - eth: mana: fix RX buf alloc_size alignment and atomic op panic - eth: hns3: fix a deadlock problem when config TC during resetting" * tag 'net-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (58 commits) net: hns3: use correct release function during uninitialization net: hns3: void array out of bound when loop tnl_num net: hns3: fix a deadlock problem when config TC during resetting net: hns3: use the user's cfg after reset net: hns3: fix wrong use of semaphore up selftests: net: lib: kill PIDs before del netns pse-core: Conditionally set current limit during PI regulator registration net: thunder_bgx: Fix netdev structure allocation net: ethtool: Allow write mechanism of LPL and both LPL and EPL vsock: fix recursive ->recvmsg calls selftest: af_unix: Fix kselftest compilation warnings netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests netfilter: nf_tables: Introduce nf_tables_getobj_single netfilter: nf_tables: Audit log dump reset after the fact selftests: netfilter: add test for br_netfilter+conntrack+queue combination netfilter: nf_queue: drop packets with cloned unconfirmed conntracks netfilter: flowtable: initialise extack before use netfilter: nfnetlink: Initialise extack before use in ACKs netfilter: allow ipv6 fragments to arrive on different devices tcp: Update window clamping condition ... commit 20573d8e1c2801d6f0cc08d26003248fd118962b Merge: 6e80a1fd99fd7 63de936b513f7 Author: Linus Torvalds Date: Thu Aug 15 10:23:19 2024 -0700 Merge tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Two regression fixes: - fix atomisp support for ISP2400 - fix dvb-usb regression for TeVii s480 dual DVB-S2 S660 board" * tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: atomisp: Fix streaming no longer working on BYT / ISP2400 devices media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()" commit 624ab9cde26a9f150b4fd268b0f3dae3184dc40c Author: Rob Clark Date: Tue Jul 16 09:06:30 2024 -0700 drm/msm/adreno: Fix error return if missing firmware-name -ENODEV is used to signify that there is no zap shader for the platform, and the CPU can directly take the GPU out of secure mode. We want to use this return code when there is no zap-shader node. But not when there is, but without a firmware-name property. This case we want to treat as-if the needed fw is not found. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/604564/ commit 6e80a1fd99fd71a2e104f45f2aeafb0cb19da44a Merge: 1fb918967b56d fa0db8e568787 Author: Linus Torvalds Date: Thu Aug 15 10:10:59 2024 -0700 Merge tag 'ata-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fix from Niklas Cassel: - Revert a recent change to sense data generation. Sense data can be in either fixed format or descriptor format. The D_SENSE bit in the Control mode page controls which format to generate. All places but one respected the D_SENSE bit. The recent change fixed the one place that didn't respect the D_SENSE bit. However, it turns out that hdparm, hddtemp and udisks (incorrectly) assumes sense data in descriptor format. Therefore, even while the change was technically correct, revert it, since even if these user space programs are fixed to (correctly) look at the format type before parsing the data, older versions of these tools will be around roughly forever. * tag 'ata-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: Revert "ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error" commit 538fd3921afac97158d4177139a0ad39f056dbb2 Author: Griffin Kroah-Hartman Date: Thu Aug 15 13:51:00 2024 +0200 Bluetooth: MGMT: Add error handling to pair_device() hci_conn_params_add() never checks for a NULL value and could lead to a NULL pointer dereference causing a crash. Fixed by adding error handling in the function. Cc: Stable Fixes: 5157b8a503fa ("Bluetooth: Fix initializing conn_params in scan phase") Signed-off-by: Griffin Kroah-Hartman Reported-by: Yiwei Zhang Signed-off-by: Luiz Augusto von Dentz commit 28cd47f75185c4818b0fb1b46f2f02faaba96376 Author: Luiz Augusto von Dentz Date: Wed Aug 30 15:08:06 2023 -0700 Bluetooth: SMP: Fix assumption of Central always being Initiator SMP initiator role shall be considered the one that initiates the pairing procedure with SMP_CMD_PAIRING_REQ: BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 3, Part H page 1557: Figure 2.1: LE pairing phases Note that by sending SMP_CMD_SECURITY_REQ it doesn't change the role to be Initiator. Link: https://github.com/bluez/bluez/issues/567 Fixes: b28b4943660f ("Bluetooth: Add strict checks for allowed SMP PDUs") Signed-off-by: Luiz Augusto von Dentz commit 932021a11805b9da4bd6abf66fe233cccd59fe0e Author: Luiz Augusto von Dentz Date: Mon Aug 12 11:22:08 2024 -0400 Bluetooth: hci_core: Fix LE quote calculation Function hci_sched_le needs to update the respective counter variable inplace other the likes of hci_quote_sent would attempt to use the possible outdated value of conn->{le_cnt,acl_cnt}. Link: https://github.com/bluez/bluez/issues/915 Fixes: 73d80deb7bdf ("Bluetooth: prioritizing data over HCI") Signed-off-by: Luiz Augusto von Dentz commit aae6b81260fd9a7224f7eb4fc440d625852245bb Author: Luiz Augusto von Dentz Date: Mon Aug 12 10:43:48 2024 -0400 Bluetooth: HCI: Invert LE State quirk to be opt-out rather then opt-in This inverts the LE State quirk so by default we assume the controllers would report valid states rather than invalid which is how quirks normally behave, also this would result in HCI command failing it the LE States are really broken thus exposing the controllers that are really broken in this respect. Link: https://github.com/bluez/bluez/issues/584 Fixes: 220915857e29 ("Bluetooth: Adding driver and quirk defs for multi-role LE") Signed-off-by: Luiz Augusto von Dentz commit fb6a421fb6153d97cf3058f9bd550b377b76a490 Author: Song Liu Date: Wed Aug 7 15:05:13 2024 -0700 kallsyms: Match symbols exactly with CONFIG_LTO_CLANG With CONFIG_LTO_CLANG=y, the compiler may add .llvm. suffix to function names to avoid duplication. APIs like kallsyms_lookup_name() and kallsyms_on_each_match_symbol() tries to match these symbol names without the .llvm. suffix, e.g., match "c_stop" with symbol c_stop.llvm.17132674095431275852. This turned out to be problematic for use cases that require exact match, for example, livepatch. Fix this by making the APIs to match symbols exactly. Also cleanup kallsyms_selftests accordingly. Signed-off-by: Song Liu Fixes: 8cc32a9bbf29 ("kallsyms: strip LTO-only suffixes from promoted global functions") Tested-by: Masami Hiramatsu (Google) Reviewed-by: Masami Hiramatsu (Google) Acked-by: Petr Mladek Reviewed-by: Sami Tolvanen Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20240807220513.3100483-3-song@kernel.org Signed-off-by: Kees Cook commit 020925ce92990c3bf59ab2cde386ac6d9ec734ff Author: Song Liu Date: Wed Aug 7 15:05:12 2024 -0700 kallsyms: Do not cleanup .llvm. suffix before sorting symbols Cleaning up the symbols causes various issues afterwards. Let's sort the list based on original name. Signed-off-by: Song Liu Fixes: 8cc32a9bbf29 ("kallsyms: strip LTO-only suffixes from promoted global functions") Reviewed-by: Masami Hiramatsu (Google) Tested-by: Masami Hiramatsu (Google) Acked-by: Petr Mladek Reviewed-by: Sami Tolvanen Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20240807220513.3100483-2-song@kernel.org Signed-off-by: Kees Cook commit 92e9bac18124682c4b99ede9ee3bcdd68f121e92 Author: Ivan Orlov Date: Thu Aug 15 01:04:31 2024 +0100 kunit/overflow: Fix UB in overflow_allocation_test The 'device_name' array doesn't exist out of the 'overflow_allocation_test' function scope. However, it is being used as a driver name when calling 'kunit_driver_create' from 'kunit_device_register'. It produces the kernel panic with KASAN enabled. Since this variable is used in one place only, remove it and pass the device name into kunit_device_register directly as an ascii string. Signed-off-by: Ivan Orlov Reviewed-by: David Gow Link: https://lore.kernel.org/r/20240815000431.401869-1-ivan.orlov0322@gmail.com Signed-off-by: Kees Cook commit 9bb5e74b2bf88fbb024bb15ded3b011e02c673be Author: Griffin Kroah-Hartman Date: Thu Aug 15 11:49:20 2024 +0200 Revert "misc: fastrpc: Restrict untrusted app to attach to privileged PD" This reverts commit bab2f5e8fd5d2f759db26b78d9db57412888f187. Joel reported that this commit breaks userspace and stops sensors in SDM845 from working. Also breaks other qcom SoC devices running postmarketOS. Cc: stable Cc: Ekansh Gupta Cc: Dmitry Baryshkov Reported-by: Joel Selvaraj Link: https://lore.kernel.org/r/9a9f5646-a554-4b65-8122-d212bb665c81@umsystem.edu Signed-off-by: Griffin Kroah-Hartman Acked-by: Srinivas Kandagatla Fixes: bab2f5e8fd5d ("misc: fastrpc: Restrict untrusted app to attach to privileged PD") Link: https://lore.kernel.org/r/20240815094920.8242-1-griffin@kroah.com Signed-off-by: Greg Kroah-Hartman commit 164199615ae230ace4519141285f06766d6d8036 Author: Yuntao Liu Date: Thu Aug 15 08:49:23 2024 +0000 ASoC: amd: acp: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table. Fixes: 9d8a7be88b336 ("ASoC: amd: acp: Add legacy sound card support for Chrome audio") Signed-off-by: Yuntao Liu Link: https://patch.msgid.link/20240815084923.756476-1-liuyuntao12@huawei.com Signed-off-by: Mark Brown commit af8e119f52e9c13e556be9e03f27957554a84656 Author: Mathias Nyman Date: Thu Aug 15 17:11:17 2024 +0300 xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration re-enumerating full-speed devices after a failed address device command can trigger a NULL pointer dereference. Full-speed devices may need to reconfigure the endpoint 0 Max Packet Size value during enumeration. Usb core calls usb_ep0_reinit() in this case, which ends up calling xhci_configure_endpoint(). On Panther point xHC the xhci_configure_endpoint() function will additionally check and reserve bandwidth in software. Other hosts do this in hardware If xHC address device command fails then a new xhci_virt_device structure is allocated as part of re-enabling the slot, but the bandwidth table pointers are not set up properly here. This triggers the NULL pointer dereference the next time usb_ep0_reinit() is called and xhci_configure_endpoint() tries to check and reserve bandwidth [46710.713538] usb 3-1: new full-speed USB device number 5 using xhci_hcd [46710.713699] usb 3-1: Device not responding to setup address. [46710.917684] usb 3-1: Device not responding to setup address. [46711.125536] usb 3-1: device not accepting address 5, error -71 [46711.125594] BUG: kernel NULL pointer dereference, address: 0000000000000008 [46711.125600] #PF: supervisor read access in kernel mode [46711.125603] #PF: error_code(0x0000) - not-present page [46711.125606] PGD 0 P4D 0 [46711.125610] Oops: Oops: 0000 [#1] PREEMPT SMP PTI [46711.125615] CPU: 1 PID: 25760 Comm: kworker/1:2 Not tainted 6.10.3_2 #1 [46711.125620] Hardware name: Gigabyte Technology Co., Ltd. [46711.125623] Workqueue: usb_hub_wq hub_event [usbcore] [46711.125668] RIP: 0010:xhci_reserve_bandwidth (drivers/usb/host/xhci.c Fix this by making sure bandwidth table pointers are set up correctly after a failed address device command, and additionally by avoiding checking for bandwidth in cases like this where no actual endpoints are added or removed, i.e. only context for default control endpoint 0 is evaluated. Reported-by: Karel Balej Closes: https://lore.kernel.org/linux-usb/D3CKQQAETH47.1MUO22RTCH2O3@matfyz.cz/ Cc: stable@vger.kernel.org Fixes: 651aaf36a7d7 ("usb: xhci: Handle USB transaction error on address command") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240815141117.2702314-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f002702290fccbd473f5bb94e52f25c96917fff2 Author: Matthew Brost Date: Fri Jul 19 10:29:04 2024 -0700 drm/xe: Hold a PM ref when GT TLB invalidations are inflight Avoid GT TLB invalidation timeouts by holding a PM ref when invalidations are inflight. v2: - Drop PM ref before signaling fence (CI) v3: - Move invalidation_fence_signal helper in tlb timeout to previous patch (Matthew Auld) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi Cc: Nirmoy Das Signed-off-by: Matthew Brost Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240719172905.1527927-4-matthew.brost@intel.com (cherry picked from commit 0a382f9bc5dc4744a33970a5ed4df8f9c702ee9e) Requires: 46209ce5287b ("drm/xe: Add xe_gt_tlb_invalidation_fence_init helper") Requires: 0e414ab036e0 ("drm/xe: Drop xe_gt_tlb_invalidation_wait") Signed-off-by: Rodrigo Vivi commit 58bfe6674467f4c037e89111e6007f25b34d8bb3 Author: Matthew Brost Date: Fri Jul 19 10:29:03 2024 -0700 drm/xe: Drop xe_gt_tlb_invalidation_wait Having two methods to wait on GT TLB invalidations is not ideal. Remove xe_gt_tlb_invalidation_wait and only use GT TLB invalidation fences. In addition to two methods being less than ideal, once GT TLB invalidations are coalesced the seqno cannot be assigned during xe_gt_tlb_invalidation_ggtt/range. Thus xe_gt_tlb_invalidation_wait would not have a seqno to wait one. A fence however can be armed and later signaled. v3: - Add explaination about coalescing to commit message v4: - Don't put dma fence if defined on stack (CI) v5: - Initialize ret to zero (CI) v6: - Use invalidation_fence_signal helper in tlb timeout (Matthew Auld) Signed-off-by: Matthew Brost Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240719172905.1527927-3-matthew.brost@intel.com (cherry picked from commit 61ac035361ae555ee5a17a7667fe96afdde3d59a) Signed-off-by: Rodrigo Vivi commit 90be4cc6f7674a1478c4c750beeee3edd14aee38 Author: Matthew Brost Date: Fri Jul 19 10:29:02 2024 -0700 drm/xe: Add xe_gt_tlb_invalidation_fence_init helper Other layers should not be touching struct xe_gt_tlb_invalidation_fence directly, add helper for initialization. v2: - Add dma_fence_get and list init to xe_gt_tlb_invalidation_fence_init Signed-off-by: Matthew Brost Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240719172905.1527927-2-matthew.brost@intel.com (cherry picked from commit a522b285c6b4b611406d59612a8d7241714d2e31) Signed-off-by: Rodrigo Vivi commit 4f7652dcd339aca6678084d42fda999ecb19b624 Author: Michal Wajdeczko Date: Tue Aug 6 20:05:16 2024 +0200 drm/xe/pf: Fix VF config validation on multi-GT platforms When validating VF config on the media GT, we may wrongly report that VF is already partially configured on it, as we consider GGTT and LMEM provisioning done on the primary GT (since both GGTT and LMEM are tile-level resources, not a GT-level). This will cause skipping a VF auto-provisioning on the media-GT and in result will block a VF from successfully initialize that GT. Fix that by considering GGTT and LMEM configurations only when checking if a VF provisioning is complete, and omit GGTT and LMEM when reporting empty/partial provisioning. Fixes: 234670cea9a2 ("drm/xe/pf: Skip fair VFs provisioning if already provisioned") Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240806180516.618-1-michal.wajdeczko@intel.com (cherry picked from commit 5bdacb0907c1f531995b6ba47b832ac3a0182ae9) Signed-off-by: Rodrigo Vivi commit 55ea73aacfb9a92def840a7110a468c5a76caeb5 Author: Matthew Brost Date: Fri Jul 19 10:29:05 2024 -0700 drm/xe: Build PM into GuC CT layer Take PM ref when any G2H are outstanding, drop when none are outstanding. To safely ensure we have PM ref when in the GuC CT layer, a PM ref needs to be held when scheduler messages are pending too. v2: - Add outer PM protections to xe_file_close (CI) v3: - Only take PM ref 0->1 and drop on 1->0 (Matthew Auld) v4: - Add assert to G2H increment function v5: - Rebase v6: - Declare xe as local variable in xe_file_close (CI) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Matthew Auld Cc: Rodrigo Vivi Cc: Nirmoy Das Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240719172905.1527927-5-matthew.brost@intel.com (cherry picked from commit d930c19fdff3109e97b610fa10943b7602efcabd) Signed-off-by: Rodrigo Vivi commit 64da63cd3f7d771bf8f240e72203da1f72aa3728 Author: Michal Wajdeczko Date: Thu Jul 18 22:31:55 2024 +0200 drm/xe/vf: Fix register value lookup We should use the number of actual entries stored in the runtime register buffer, not the maximum number of entries that this buffer can hold, otherwise bsearch() may fail and we may miss the data and wrongly report unexpected access to some registers. Fixes: 4edadc41a3a4 ("drm/xe/vf: Use register values obtained from the PF") Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240718203155.486-1-michal.wajdeczko@intel.com (cherry picked from commit ad16682db18f4414e53bba1ce0db75b08bdc4dff) Signed-off-by: Rodrigo Vivi commit 817c70e2ba278e9d5360833b1137ef8855ac1728 Author: Umesh Nerlige Ramappa Date: Thu Jul 18 14:05:48 2024 -0700 drm/xe: Fix use after free when client stats are captured xe_file_close triggers an asynchronous queue cleanup and then frees up the xef object. Since queue cleanup flushes all pending jobs and the KMD stores client usage stats into the xef object after jobs are flushed, we see a use-after-free for the xef object. Resolve this by taking a reference to xef from xe_exec_queue. While at it, revert an earlier change that contained a partial work around for this issue. v2: - Take a ref to xef even for the VM bind queue (Matt) - Squash patches relevant to that fix and work around (Lucas) v3: Fix typo (Lucas) Fixes: ce62827bc294 ("drm/xe: Do not access xe file when updating exec queue run_ticks") Fixes: 6109f24f87d7 ("drm/xe: Add helper to accumulate exec queue runtime") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1908 Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240718210548.3580382-5-umesh.nerlige.ramappa@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 2149ded63079449b8dddf9da38392632f155e6b5) Signed-off-by: Rodrigo Vivi commit 6309f9b1fc4de2daa1293fe12a488d765e60507d Author: Umesh Nerlige Ramappa Date: Thu Jul 18 14:05:47 2024 -0700 drm/xe: Take a ref to xe file when user creates a VM Take a reference to xef when user creates the VM and put the reference when user destroys the VM. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240718210548.3580382-4-umesh.nerlige.ramappa@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit a2387e69493df3de706f14e4573ee123d23d5d34) Signed-off-by: Rodrigo Vivi commit d28bb0120f360e772458a7cf295d6d0ae3dc18a4 Author: Umesh Nerlige Ramappa Date: Thu Jul 18 14:05:46 2024 -0700 drm/xe: Add ref counting for xe_file Add ref counting for xe_file. v2: - Add kernel doc for exported functions (Matt) - Instead of xe_file_destroy, export the get/put helpers (Lucas) v3: Fixup the kernel-doc format and description (Matt, Lucas) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240718210548.3580382-3-umesh.nerlige.ramappa@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit ce8c161cbad43f4056451e541f7ae3471d0cca12) Signed-off-by: Rodrigo Vivi commit e98a032c0340d45c199f4eb536359f5762a8748f Author: Umesh Nerlige Ramappa Date: Thu Jul 18 14:05:45 2024 -0700 drm/xe: Move part of xe_file cleanup to a helper In order to make xe_file ref counted, move destruction of xe_file members to a helper. v2: Move xe_vm_close_and_put back into xe_file_close (Matt) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240718210548.3580382-2-umesh.nerlige.ramappa@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 3d0c4a62cc553c6ffde4cb11620eba991e770665) Signed-off-by: Rodrigo Vivi commit ddeb7989a98faf8da67ac613731a0eee32667b7d Author: Matthew Brost Date: Wed Jul 17 07:04:28 2024 -0700 drm/xe: Validate user fence during creation Fail invalid addresses during user fence creation. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240717140429.1396820-1-matthew.brost@intel.com (cherry picked from commit 0fde907da2d5fd4da68845e96c6842497159c858) Signed-off-by: Rodrigo Vivi commit d33d26036a0274b472299d7dcdaa5fb34329f91b Author: Roland Xu Date: Thu Aug 15 10:58:13 2024 +0800 rtmutex: Drop rt_mutex::wait_lock before scheduling rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held. In the good case it returns with the lock held and in the deadlock case it emits a warning and goes into an endless scheduling loop with the lock held, which triggers the 'scheduling in atomic' warning. Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning and dropping into the schedule for ever loop. [ tglx: Moved unlock before the WARN(), removed the pointless comment, massaged changelog, added Fixes tag ] Fixes: 3d5c9340d194 ("rtmutex: Handle deadlock detection smarter") Signed-off-by: Roland Xu Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300MB0635.AUSP300.PROD.OUTLOOK.COM commit 9c5af2d7dfe18e3a36f85fad8204cd2442ecd82b Merge: 34dfdf210d05e bd662c4218f96 Author: Paolo Abeni Date: Thu Aug 15 13:25:06 2024 +0200 Merge tag 'nf-24-08-15' 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) Ignores ifindex for types other than mcast/linklocal in ipv6 frag reasm, from Tom Hughes. 2) Initialize extack for begin/end netlink message marker in batch, from Donald Hunter. 3) Initialize extack for flowtable offload support, also from Donald. 4) Dropped packets with cloned unconfirmed conntracks in nfqueue, later it should be possible to explore lookup after reinject but Florian prefers this approach at this stage. From Florian Westphal. 5) Add selftest for cloned unconfirmed conntracks in nfqueue for previous update. 6) Audit after filling netlink header successfully in object dump, from Phil Sutter. 7-8) Fix concurrent dump and reset which could result in underflow counter / quota objects. netfilter pull request 24-08-15 * tag 'nf-24-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests netfilter: nf_tables: Introduce nf_tables_getobj_single netfilter: nf_tables: Audit log dump reset after the fact selftests: netfilter: add test for br_netfilter+conntrack+queue combination netfilter: nf_queue: drop packets with cloned unconfirmed conntracks netfilter: flowtable: initialise extack before use netfilter: nfnetlink: Initialise extack before use in ACKs netfilter: allow ipv6 fragments to arrive on different devices ==================== Link: https://patch.msgid.link/20240814222042.150590-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 34dfdf210d05ea6c6c75de2fa785853734fb51e8 Merge: 7965a7f32a53d 7660833d21752 Author: Paolo Abeni Date: Thu Aug 15 13:07:10 2024 +0200 Merge branch 'there-are-some-bugfix-for-the-hns3-ethernet-driver' Jijie Shao says: ==================== There are some bugfix for the HNS3 ethernet driver ==================== Link: https://patch.msgid.link/20240813141024.1707252-1-shaojijie@huawei.com Signed-off-by: Paolo Abeni commit 7660833d217528c8f2385528951ab820a031e4e3 Author: Peiyang Wang Date: Tue Aug 13 22:10:24 2024 +0800 net: hns3: use correct release function during uninitialization pci_request_regions is called to apply for PCI I/O and memory resources when the driver is initialized, Therefore, when the driver is uninstalled, pci_release_regions should be used to release PCI I/O and memory resources instead of pci_release_mem_regions is used to release memory reasouces only. Signed-off-by: Peiyang Wang Signed-off-by: Jijie Shao Signed-off-by: Paolo Abeni commit 86db7bfb06704ef17340eeae71c832f21cfce35c Author: Peiyang Wang Date: Tue Aug 13 22:10:23 2024 +0800 net: hns3: void array out of bound when loop tnl_num When query reg inf of SSU, it loops tnl_num times. However, tnl_num comes from hardware and the length of array is a fixed value. To void array out of bound, make sure the loop time is not greater than the length of array Signed-off-by: Peiyang Wang Signed-off-by: Jijie Shao Signed-off-by: Paolo Abeni commit be5e816d00a506719e9dbb1a9c861c5ced30a109 Author: Jie Wang Date: Tue Aug 13 22:10:22 2024 +0800 net: hns3: fix a deadlock problem when config TC during resetting When config TC during the reset process, may cause a deadlock, the flow is as below: pf reset start │ ▼ ...... setup tc │ │ ▼ ▼ DOWN: napi_disable() napi_disable()(skip) │ │ │ ▼ ▼ ...... ...... │ │ ▼ │ napi_enable() │ ▼ UINIT: netif_napi_del() │ ▼ ...... │ ▼ INIT: netif_napi_add() │ ▼ ...... global reset start │ │ ▼ ▼ UP: napi_enable()(skip) ...... │ │ ▼ ▼ ...... napi_disable() In reset process, the driver will DOWN the port and then UINIT, in this case, the setup tc process will UP the port before UINIT, so cause the problem. Adds a DOWN process in UINIT to fix it. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Jie Wang Signed-off-by: Jijie Shao Signed-off-by: Paolo Abeni commit 30545e17eac1f50c5ef49644daf6af205100a965 Author: Peiyang Wang Date: Tue Aug 13 22:10:21 2024 +0800 net: hns3: use the user's cfg after reset Consider the followed case that the user change speed and reset the net interface. Before the hw change speed successfully, the driver get old old speed from hw by timer task. After reset, the previous speed is config to hw. As a result, the new speed is configed successfully but lost after PF reset. The followed pictured shows more dirrectly. +------+ +----+ +----+ | USER | | PF | | HW | +---+--+ +-+--+ +-+--+ | ethtool -s 100G | | +------------------>| set speed 100G | | +--------------------->| | | set successfully | | |<---------------------+---+ | |query cfg (timer task)| | | +--------------------->| | handle speed | | return 200G | | changing event | ethtool --reset |<---------------------+ | (100G) +------------------>| cfg previous speed |<--+ | | after reset (200G) | | +--------------------->| | | +---+ | |query cfg (timer task)| | | +--------------------->| | handle speed | | return 100G | | changing event | |<---------------------+ | (200G) | | |<--+ | |query cfg (timer task)| | +--------------------->| | | return 200G | | |<---------------------+ | | | v v v This patch save new speed if hw change speed successfully, which will be used after reset successfully. Fixes: 2d03eacc0b7e ("net: hns3: Only update mac configuation when necessary") Signed-off-by: Peiyang Wang Signed-off-by: Jijie Shao Signed-off-by: Paolo Abeni commit 8445d9d3c03101859663d34fda747f6a50947556 Author: Jie Wang Date: Tue Aug 13 22:10:20 2024 +0800 net: hns3: fix wrong use of semaphore up Currently, if hns3 PF or VF FLR reset failed after five times retry, the reset done process will directly release the semaphore which has already released in hclge_reset_prepare_general. This will cause down operation fail. So this patch fixes it by adding reset state judgement. The up operation is only called after successful PF FLR reset. Fixes: 8627bdedc435 ("net: hns3: refactor the precedure of PF FLR") Fixes: f28368bb4542 ("net: hns3: refactor the procedure of VF FLR") Signed-off-by: Jie Wang Signed-off-by: Jijie Shao Signed-off-by: Paolo Abeni commit 7965a7f32a53d9ad807ce2c53bdda69ba104974f Author: Matthieu Baerts (NGI0) Date: Tue Aug 13 15:39:34 2024 +0200 selftests: net: lib: kill PIDs before del netns When deleting netns, it is possible to still have some tasks running, e.g. background tasks like tcpdump running in the background, not stopped because the test has been interrupted. Before deleting the netns, it is then safer to kill all attached PIDs, if any. That should reduce some noises after the end of some tests, and help with the debugging of some issues. That's why this modification is seen as a "fix". Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Acked-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Acked-by: Florian Westphal Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/20240813-upstream-net-20240813-selftests-net-lib-kill-v1-1-27b689b248b8@kernel.org Signed-off-by: Paolo Abeni commit cdc90f75387c42d64a0ed1ba03550ea9447249d4 Author: Oleksij Rempel Date: Tue Aug 13 09:37:19 2024 +0200 pse-core: Conditionally set current limit during PI regulator registration Fix an issue where `devm_regulator_register()` would fail for PSE controllers that do not support current limit control, such as simple GPIO-based controllers like the podl-pse-regulator. The `REGULATOR_CHANGE_CURRENT` flag and `max_uA` constraint are now conditionally set only if the `pi_set_current_limit` operation is supported. This change prevents the regulator registration routine from attempting to call `pse_pi_set_current_limit()`, which would return `-EOPNOTSUPP` and cause the registration to fail. Fixes: 4a83abcef5f4f ("net: pse-pd: Add new power limit get and set c33 features") Signed-off-by: Oleksij Rempel Reviewed-by: Kory Maincent Tested-by: Kyle Swenson Link: https://patch.msgid.link/20240813073719.2304633-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 52dd070c62e4ae2b5e7411b920e3f7a64235ecfb Author: Peng Fan Date: Wed Aug 14 20:47:40 2024 +0800 pmdomain: imx: wait SSAR when i.MX93 power domain on With "quiet" set in bootargs, there is power domain failure: "imx93_power_domain 44462400.power-domain: pd_off timeout: name: 44462400.power-domain, stat: 4" The current power on opertation takes ISO state as power on finished flag, but it is wrong. Before powering on operation really finishes, powering off comes and powering off will never finish because the last powering on still not finishes, so the following powering off actually not trigger hardware state machine to run. SSAR is the last step when powering on a domain, so need to wait SSAR done when powering on. Since EdgeLock Enclave(ELE) handshake is involved in the flow, enlarge the waiting time to 10ms for both on and off to avoid timeout. Cc: stable@vger.kernel.org Fixes: 0a0f7cc25d4a ("soc: imx: add i.MX93 SRC power domain driver") Reviewed-by: Jacky Bai Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20240814124740.2778952-1-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit fd45cc614b8acca5bb435ba37fe9b3f9a17fab84 Author: Alex Bee Date: Mon Aug 5 13:08:56 2024 +0200 drm/rockchip: inno-hdmi: Fix infoframe upload HDMI analyser shows that the AVI infoframe is no being longer send. The switch to the HDMI connector api should have used the frame content which is now given in the buffer parameter, but instead still uses the (now) empty and superfluous packed_frame variable. Fix it. Fixes: 65548c8ff0ab ("drm/rockchip: inno_hdmi: Switch to HDMI connector") Signed-off-by: Alex Bee Acked-by: Maxime Ripard Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240805110855.274140-2-knaerzche@gmail.com commit 1f1b194284093d619c9fbc7e9e38b2c68d0408e8 Author: Marc Zyngier Date: Mon Aug 12 15:13:22 2024 +0100 net: thunder_bgx: Fix netdev structure allocation Commit 94833addfaba ("net: thunderx: Unembed netdev structure") had a go at dynamically allocating the netdev structures for the thunderx_bgx driver. This change results in my ThunderX box catching fire (to be fair, it is what it does best). The issues with this change are that: - bgx_lmac_enable() is called *after* bgx_acpi_register_phy() and bgx_init_of_phy(), both expecting netdev to be a valid pointer. - bgx_init_of_phy() populates the MAC addresses for *all* LMACs attached to a given BGX instance, and thus needs netdev for each of them to have been allocated. There is a few things to be said about how the driver mixes LMAC and BGX states which leads to this sorry state, but that's beside the point. To address this, go back to a situation where all netdev structures are allocated before the driver starts relying on them, and move the freeing of these structures to driver removal. Someone brave enough can always go and restructure the driver if they want. Fixes: 94833addfaba ("net: thunderx: Unembed netdev structure") Signed-off-by: Marc Zyngier Cc: Breno Leitao Cc: Sunil Goutham Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Reviewed-by: Simon Horman Reviewed-by: Breno Leitao Link: https://patch.msgid.link/20240812141322.1742918-1-maz@kernel.org Signed-off-by: Paolo Abeni commit fde25c20f51807db340b875953cfd1cedaa392fc Author: Danielle Ratson Date: Mon Aug 12 17:08:24 2024 +0300 net: ethtool: Allow write mechanism of LPL and both LPL and EPL CMIS 5.2 standard section 9.4.2 defines four types of firmware update supported mechanism: None, only LPL, only EPL, both LPL and EPL. Currently, only LPL (Local Payload) type of write firmware block is supported. However, if the module supports both LPL and EPL the flashing process wrongly fails for no supporting LPL. Fix that, by allowing the write mechanism to be LPL or both LPL and EPL. Fixes: c4f78134d45c ("ethtool: cmis_fw_update: add a layer for supporting firmware update using CDB") Reported-by: Vladyslav Mykhaliuk Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Link: https://patch.msgid.link/20240812140824.3718826-1-danieller@nvidia.com Signed-off-by: Paolo Abeni commit 69139d2919dd4aa9a553c8245e7c63e82613e3fc Author: Cong Wang Date: Sun Aug 11 19:21:53 2024 -0700 vsock: fix recursive ->recvmsg calls After a vsock socket has been added to a BPF sockmap, its prot->recvmsg has been replaced with vsock_bpf_recvmsg(). Thus the following recursiion could happen: vsock_bpf_recvmsg() -> __vsock_recvmsg() -> vsock_connectible_recvmsg() -> prot->recvmsg() -> vsock_bpf_recvmsg() again We need to fix it by calling the original ->recvmsg() without any BPF sockmap logic in __vsock_recvmsg(). Fixes: 634f1a7110b4 ("vsock: support sockmap") Reported-by: syzbot+bdb4bd87b5e22058e2a4@syzkaller.appspotmail.com Tested-by: syzbot+bdb4bd87b5e22058e2a4@syzkaller.appspotmail.com Cc: Bobby Eshleman Cc: Michael S. Tsirkin Cc: Stefano Garzarella Signed-off-by: Cong Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240812022153.86512-1-xiyou.wangcong@gmail.com Signed-off-by: Paolo Abeni commit f75c235565f90c4a17b125e47f1c68ef6b8c2bce Author: Samuel Holland Date: Wed Aug 14 02:09:53 2024 -0700 arm64: Fix KASAN random tag seed initialization Currently, kasan_init_sw_tags() is called before setup_per_cpu_areas(), so per_cpu(prng_state, cpu) accesses the same address regardless of the value of "cpu", and the same seed value gets copied to the percpu area for every CPU. Fix this by moving the call to smp_prepare_boot_cpu(), which is the first architecture hook after setup_per_cpu_areas(). Fixes: 3c9e3aa11094 ("kasan: add tag related helper functions") Fixes: 3f41b6093823 ("kasan: fix random seed generation for tag-based mode") Signed-off-by: Samuel Holland Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20240814091005.969756-1-samuel.holland@sifive.com Signed-off-by: Catalin Marinas commit 0863bffda1131fd2fa9c05b653ad9ee3d8db127e Author: Griffin Kroah-Hartman Date: Wed Aug 14 13:17:47 2024 +0200 Revert "serial: 8250_omap: Set the console genpd always on if no console suspend" This reverts commit 68e6939ea9ec3d6579eadeab16060339cdeaf940. Kevin reported that this causes a crash during suspend on platforms that dont use PM domains. Link: https://lore.kernel.org/r/7ha5hgpchq.fsf@baylibre.com Cc: Thomas Richard Fixes: 68e6939ea9ec ("serial: 8250_omap: Set the console genpd always on if no console suspend") Cc: stable Reported-by: Kevin Hilman Signed-off-by: Griffin Kroah-Hartman Link: https://lore.kernel.org/r/20240814111747.82371-1-griffin@kroah.com Signed-off-by: Greg Kroah-Hartman commit b2ca1661c7db9693095cee7991c55d67c3b5d346 Merge: 6c569b77f0300 e37a9184f2708 Author: Jakub Kicinski Date: Wed Aug 14 20:40:43 2024 -0700 Merge tag 'wireless-2024-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.11 We have few fixes to drivers. The most important here is a fix for iwlwifi which caused major slowdowns for several users. * tag 'wireless-2024-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: correctly lookup DMA address in SG table wifi: mt76: mt7921: fix NULL pointer access in mt7921_ipv6_addr_change wifi: brcmfmac: cfg80211: Handle SSID based pmksa deletion wifi: rtlwifi: rtl8192du: Initialise value32 in _rtl92du_init_queue_reserved_page wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850 ==================== Link: https://patch.msgid.link/20240814171606.E14A0C116B1@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 6c569b77f0300f8a9960277c7094fa0f128eb811 Author: Abhinav Jain Date: Wed Aug 14 13:37:43 2024 +0530 selftest: af_unix: Fix kselftest compilation warnings Change expected_buf from (const void *) to (const char *) in function __recvpair(). This change fixes the below warnings during test compilation: ``` In file included from msg_oob.c:14: msg_oob.c: In function ‘__recvpair’: ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=] ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’ msg_oob.c:235:17: note: in expansion of macro ‘TH_LOG’ ../../kselftest_harness.h:106:40: warning: format ‘%s’ expects argument of type ‘char *’,but argument 6 has type ‘const void *’ [-Wformat=] ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’ msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’ ``` Fixes: d098d77232c3 ("selftest: af_unix: Add msg_oob.c.") Signed-off-by: Abhinav Jain Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20240814080743.1156166-1-jain.abhinav177@gmail.com Signed-off-by: Jakub Kicinski commit 924fc22c282edbf93869b150d9e1b47e0b10485e Author: Bartosz Golaszewski Date: Wed Jul 31 09:44:57 2024 +0200 firmware: qcom: qseecom: remove unused functions qseecom_scm_dev(), qseecom_dma_alloc() and qseecom_dma_free() are no longer used following the conversion to using tzmem. Remove them. Fixes: 6612103ec35a ("firmware: qcom: qseecom: convert to using the TZ allocator") Reviewed-by: Andrew Halaney Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240731-tzmem-efivars-fix-v2-2-f0e84071ec07@linaro.org Signed-off-by: Bjorn Andersson commit 1c753d001a259d0278fe318a1ed3c8aa5f3ea09e Author: Bartosz Golaszewski Date: Wed Jul 31 09:44:56 2024 +0200 firmware: qcom: tzmem: fix virtual-to-physical address conversion We currently only correctly convert the virtual address passed by the caller to qcom_tzmem_to_phys() if it corresponds to the base address of the chunk. If the user wants to convert some pointer at an offset relative to that base address, we'll return 0. Let's change the implementation of qcom_tzmem_to_phys(): iterate over the chunks and try to call gen_pool_virt_to_phys() just-in-time instead of trying to call it only once when creating the chunk. Fixes: 84f5a7b67b61 ("firmware: qcom: add a dedicated TrustZone buffer allocator") Reported-by: Johan Hovold Closes: https://lore.kernel.org/lkml/20240729095542.21097-1-johan+linaro@kernel.org/ Acked-by: Andrew Halaney Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240731-tzmem-efivars-fix-v2-1-f0e84071ec07@linaro.org Signed-off-by: Bjorn Andersson commit 9960085a3a82c58d3323c1c20b991db6045063b0 Author: Murali Nalajala Date: Wed Aug 14 15:32:44 2024 -0700 firmware: qcom: scm: Mark get_wq_ctx() as atomic call Currently get_wq_ctx() is wrongly configured as a standard call. When two SMC calls are in sleep and one SMC wakes up, it calls get_wq_ctx() to resume the corresponding sleeping thread. But if get_wq_ctx() is interrupted, goes to sleep and another SMC call is waiting to be allocated a waitq context, it leads to a deadlock. To avoid this get_wq_ctx() must be an atomic call and can't be a standard SMC call. Hence mark get_wq_ctx() as a fast call. Fixes: 6bf325992236 ("firmware: qcom: scm: Add wait-queue handling logic") Cc: stable@vger.kernel.org Signed-off-by: Murali Nalajala Signed-off-by: Unnathi Chalicheemala Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240814223244.40081-1-quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit 6357efe3abead68048729adf11a9363881657939 Author: devi priya Date: Tue Aug 6 11:41:05 2024 +0530 clk: qcom: ipq9574: Update the alpha PLL type for GPLLs Update PLL offsets to DEFAULT_EVO to configure MDIO to 800MHz. The incorrect clock frequency leads to an incorrect MDIO clock. This, in turn, affects the MDIO hardware configurations as the divider is calculated from the MDIO clock frequency. If the clock frequency is not as expected, the MDIO register fails due to the generation of an incorrect MDIO frequency. This issue is critical as it results in incorrect MDIO configurations and ultimately leads to the MDIO function not working. This results in a complete feature failure affecting all Ethernet PHYs. Specifically, Ethernet will not work on IPQ9574 due to this issue. Currently, the clock frequency is set to CLK_ALPHA_PLL_TYPE_DEFAULT. However, this setting does not yield the expected clock frequency. To rectify this, we need to change this to CLK_ALPHA_PLL_TYPE_DEFAULT_EVO. This modification ensures that the clock frequency aligns with our expectations, thereby resolving the MDIO register failure and ensuring the proper functioning of the Ethernet on IPQ9574. Fixes: d75b82cff488 ("clk: qcom: Add Global Clock Controller driver for IPQ9574") Signed-off-by: devi priya Signed-off-by: Amandeep Singh Link: https://lore.kernel.org/r/20240806061105.2849944-1-quic_amansing@quicinc.com Signed-off-by: Bjorn Andersson commit dfbe93f32c12f5628bd83303e10ba63621c259ae Author: Konrad Dybcio Date: Tue Jul 16 12:35:03 2024 +0200 arm64: dts: qcom: x1e80100: Fix Adreno SMMU global interrupt Fix the unfortunate off-by-one. Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240716-topic-h_bits-v1-1-f6c5d3ff982c@linaro.org Signed-off-by: Bjorn Andersson commit 1f7574a1f9a892dd79e0dfc03f38573e9c399ec2 Author: Dmitry Baryshkov Date: Mon Jul 15 22:17:44 2024 +0300 arm64: dts: qcom: disable GPU on x1e80100 by default The GPU on X1E80100 requires ZAP 'shader' file to be useful. Since the file is signed by the OEM keys and might be not available by default, disable the GPU node and drop the firmware name from the x1e80100.dtsi file. Devices not being fused to use OEM keys can specify generic location at `qcom/x1e80100/gen70500_zap.mbn` while enabling the GPU. The CRD and QCP were lucky enough to work with the default settings, so reenable the GPU on those platforms and provide correct firmware-name (including the SoC subdir). Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support") Cc: Akhil P Oommen Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Reviewed-by: Akhil P Oommen Link: https://lore.kernel.org/r/20240715-x1e8-zap-name-v3-1-e7a5258c3c2e@linaro.org Signed-off-by: Bjorn Andersson commit 1fb918967b56df3262ee984175816f0acb310501 Merge: d07b43284ab35 6252690f7e1b1 Author: Linus Torvalds Date: Wed Aug 14 17:56:15 2024 -0700 Merge tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - extend tree-checker verification of directory item type - fix regression in page/folio and extent state tracking in xarray, the dirty status can get out of sync and can cause problems e.g. a hang - in send, detect last extent and allow to clone it instead of sending it as write, reduces amount of data transferred in the stream - fix checking extent references when cleaning deleted subvolumes - fix one more case in the extent map shrinker, let it run only in the kswapd context so it does not cause latency spikes during other operations * tag 'for-6.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix invalid mapping of extent xarray state btrfs: send: allow cloning non-aligned extent if it ends at i_size btrfs: only run the extent map shrinker from kswapd tasks btrfs: tree-checker: reject BTRFS_FT_UNKNOWN dir type btrfs: check delayed refs when we're checking if a ref exists commit 14d069d92951a3e150c0a81f2ca3b93e54da913b Author: Breno Leitao Date: Tue Aug 13 09:12:53 2024 -0700 i2c: tegra: Do not mark ACPI devices as irq safe On ACPI machines, the tegra i2c module encounters an issue due to a mutex being called inside a spinlock. This leads to the following bug: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:585 ... Call trace: __might_sleep __mutex_lock_common mutex_lock_nested acpi_subsys_runtime_resume rpm_resume tegra_i2c_xfer The problem arises because during __pm_runtime_resume(), the spinlock &dev->power.lock is acquired before rpm_resume() is called. Later, rpm_resume() invokes acpi_subsys_runtime_resume(), which relies on mutexes, triggering the error. To address this issue, devices on ACPI are now marked as not IRQ-safe, considering the dependency of acpi_subsys_runtime_resume() on mutexes. Fixes: bd2fdedbf2ba ("i2c: tegra: Add the ACPI support") Cc: # v5.17+ Co-developed-by: Michael van der Westhuizen Signed-off-by: Michael van der Westhuizen Signed-off-by: Breno Leitao Reviewed-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Signed-off-by: Andi Shyti commit bd662c4218f9648e888bebde9468146965f3f8a0 Author: Phil Sutter Date: Fri Aug 9 15:07:32 2024 +0200 netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests Objects' dump callbacks are not concurrency-safe per-se with reset bit set. If two CPUs perform a reset at the same time, at least counter and quota objects suffer from value underrun. Prevent this by introducing dedicated locking callbacks for nfnetlink and the asynchronous dump handling to serialize access. Fixes: 43da04a593d8 ("netfilter: nf_tables: atomic dump and reset for stateful objects") Signed-off-by: Phil Sutter Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 69fc3e9e90f1afc11f4015e6b75d18ab9acee348 Author: Phil Sutter Date: Fri Aug 9 15:07:31 2024 +0200 netfilter: nf_tables: Introduce nf_tables_getobj_single Outsource the reply skb preparation for non-dump getrule requests into a distinct function. Prep work for object reset locking. Signed-off-by: Phil Sutter Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e0b6648b0446e59522819c75ba1dcb09e68d3e94 Author: Phil Sutter Date: Fri Aug 9 15:07:30 2024 +0200 netfilter: nf_tables: Audit log dump reset after the fact In theory, dumpreset may fail and invalidate the preceeding log message. Fix this and use the occasion to prepare for object reset locking, which benefits from a few unrelated changes: * Add an early call to nfnetlink_unicast if not resetting which effectively skips the audit logging but also unindents it. * Extract the table's name from the netlink attribute (which is verified via earlier table lookup) to not rely upon validity of the looked up table pointer. * Do not use local variable family, it will vanish. Fixes: 8e6cf365e1d5 ("audit: log nftables configuration change events") Signed-off-by: Phil Sutter Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ea2306f0330c59ac8cd6ba13193497f0a6a02684 Author: Florian Westphal Date: Thu Aug 8 23:14:43 2024 +0200 selftests: netfilter: add test for br_netfilter+conntrack+queue combination Trigger cloned skbs leaving softirq protection. This triggers splat without the preceeding change ("netfilter: nf_queue: drop packets with cloned unconfirmed conntracks"): WARNING: at net/netfilter/nf_conntrack_core.c:1198 __nf_conntrack_confirm.. because local delivery and forwarding will race for confirmation. Based on a reproducer script from Yi Chen. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7d8dc1c7be8d3509e8f5164dd5df64c8e34d7eeb Author: Florian Westphal Date: Wed Aug 7 21:28:41 2024 +0200 netfilter: nf_queue: drop packets with cloned unconfirmed conntracks Conntrack assumes an unconfirmed entry (not yet committed to global hash table) has a refcount of 1 and is not visible to other cores. With multicast forwarding this assumption breaks down because such skbs get cloned after being picked up, i.e. ct->use refcount is > 1. Likewise, bridge netfilter will clone broad/mutlicast frames and all frames in case they need to be flood-forwarded during learning phase. For ip multicast forwarding or plain bridge flood-forward this will "work" because packets don't leave softirq and are implicitly serialized. With nfqueue this no longer holds true, the packets get queued and can be reinjected in arbitrary ways. Disable this feature, I see no other solution. After this patch, nfqueue cannot queue packets except the last multicast/broadcast packet. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e9767137308daf906496613fd879808a07f006a2 Author: Donald Hunter Date: Tue Aug 6 17:16:37 2024 +0100 netfilter: flowtable: initialise extack before use Fix missing initialisation of extack in flow offload. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Donald Hunter Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit d1a7b382a9d3f0f3e5a80e0be2991c075fa4f618 Author: Donald Hunter Date: Tue Aug 6 16:43:24 2024 +0100 netfilter: nfnetlink: Initialise extack before use in ACKs Add missing extack initialisation when ACKing BATCH_BEGIN and BATCH_END. Fixes: bf2ac490d28c ("netfilter: nfnetlink: Handle ACK flags for batch messages") Signed-off-by: Donald Hunter Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit ff9f065318e17a1a97981d9e535fcfc6ce5d5614 Author: YR Yang Date: Thu Aug 1 16:43:26 2024 +0800 ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile Add AFE Control Register 0 to the volatile_register. AFE_DAC_CON0 can be modified by both the SOF and ALSA drivers. If this register is read and written in cache mode, the cached value might not reflect the actual value when the register is modified by another driver. It can cause playback or capture failures. Therefore, it is necessary to add AFE_DAC_CON0 to the list of volatile registers. Signed-off-by: YR Yang Reviewed-by: Fei Shao Reviewed-by: Trevor Wu Link: https://patch.msgid.link/20240801084326.1472-1-yr.yang@mediatek.com Signed-off-by: Mark Brown commit d07b43284ab356daf7ec5ae1858a16c1c7b6adab Merge: 9d5906799f7d8 1c0e5881691a7 Author: Linus Torvalds Date: Wed Aug 14 13:46:24 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "s390: - Fix failure to start guests with kvm.use_gisa=0 - Panic if (un)share fails to maintain security. ARM: - Use kvfree() for the kvmalloc'd nested MMUs array - Set of fixes to address warnings in W=1 builds - Make KVM depend on assembler support for ARMv8.4 - Fix for vgic-debug interface for VMs without LPIs - Actually check ID_AA64MMFR3_EL1.S1PIE in get-reg-list selftest - Minor code / comment cleanups for configuring PAuth traps - Take kvm->arch.config_lock to prevent destruction / initialization race for a vCPU's CPUIF which may lead to a UAF x86: - Disallow read-only memslots for SEV-ES and SEV-SNP (and TDX) - Fix smatch issues - Small cleanups - Make x2APIC ID 100% readonly - Fix typo in uapi constant Generic: - Use synchronize_srcu_expedited() on irqfd shutdown" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (21 commits) KVM: SEV: uapi: fix typo in SEV_RET_INVALID_CONFIG KVM: x86: Disallow read-only memslots for SEV-ES and SEV-SNP (and TDX) KVM: eventfd: Use synchronize_srcu_expedited() on shutdown KVM: selftests: Add a testcase to verify x2APIC is fully readonly KVM: x86: Make x2APIC ID 100% readonly KVM: x86: Use this_cpu_ptr() instead of per_cpu_ptr(smp_processor_id()) KVM: x86: hyper-v: Remove unused inline function kvm_hv_free_pa_page() KVM: SVM: Fix an error code in sev_gmem_post_populate() KVM: SVM: Fix uninitialized variable bug KVM: arm64: vgic: Hold config_lock while tearing down a CPU interface KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list KVM: arm64: Tidying up PAuth code in KVM KVM: arm64: vgic-debug: Exit the iterator properly w/o LPI KVM: arm64: Enforce dependency on an ARMv8.4-aware toolchain s390/uv: Panic for set and remove shared access UVC errors KVM: s390: fix validity interception issue when gisa is switched off docs: KVM: Fix register ID of SPSR_FIQ KVM: arm64: vgic: fix unexpected unlock sparse warnings KVM: arm64: fix kdoc warnings in W=1 builds KVM: arm64: fix override-init warnings in W=1 builds ... commit 1f5288874de776412041022607513ffac74ae1a6 Author: Evan Green Date: Fri Aug 9 14:44:44 2024 -0700 RISC-V: hwprobe: Add SCALAR to misaligned perf defines In preparation for misaligned vector performance hwprobe keys, rename the hwprobe key values associated with misaligned scalar accesses to include the term SCALAR. Leave the old defines in place to maintain source compatibility. This change is intended to be a functional no-op. Signed-off-by: Evan Green Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240809214444.3257596-3-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit c42e2f076769c9c1bc5f3f0aa1c2032558e76647 Author: Evan Green Date: Fri Aug 9 14:44:43 2024 -0700 RISC-V: hwprobe: Add MISALIGNED_PERF key RISCV_HWPROBE_KEY_CPUPERF_0 was mistakenly flagged as a bitmask in hwprobe_key_is_bitmask(), when in reality it was an enum value. This causes problems when used in conjunction with RISCV_HWPROBE_WHICH_CPUS, since SLOW, FAST, and EMULATED have values whose bits overlap with each other. If the caller asked for the set of CPUs that was SLOW or EMULATED, the returned set would also include CPUs that were FAST. Introduce a new hwprobe key, RISCV_HWPROBE_KEY_MISALIGNED_PERF, which returns the same values in response to a direct query (with no flags), but is properly handled as an enumerated value. As a result, SLOW, FAST, and EMULATED are all correctly treated as distinct values under the new key when queried with the WHICH_CPUS flag. Leave the old key in place to avoid disturbing applications which may have already come to rely on the key, with or without its broken behavior with respect to the WHICH_CPUS flag. Fixes: e178bf146e4b ("RISC-V: hwprobe: Introduce which-cpus flag") Signed-off-by: Evan Green Reviewed-by: Charlie Jenkins Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20240809214444.3257596-2-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit a445699879f989f6700df81f497b70bf94cc6163 Author: Haibo Xu Date: Mon Aug 5 11:30:23 2024 +0800 RISC-V: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE Currently, only acpi_early_node_map[0] was initialized to NUMA_NO_NODE. To ensure all the values were properly initialized, switch to initialize all of them to NUMA_NO_NODE. Fixes: eabd9db64ea8 ("ACPI: RISCV: Add NUMA support based on SRAT and SLIT") Reported-by: Andrew Jones Suggested-by: Andrew Jones Signed-off-by: Haibo Xu Reviewed-by: Sunil V L Reviewed-by: Andrew Jones Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/0d362a8ae50558b95685da4c821b2ae9e8cf78be.1722828421.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit 57d76bc51fd80824bcc0c84a5b5ec944f1b51edd Author: Nam Cao Date: Wed May 8 21:19:17 2024 +0200 riscv: change XIP's kernel_map.size to be size of the entire kernel With XIP kernel, kernel_map.size is set to be only the size of data part of the kernel. This is inconsistent with "normal" kernel, who sets it to be the size of the entire kernel. More importantly, XIP kernel fails to boot if CONFIG_DEBUG_VIRTUAL is enabled, because there are checks on virtual addresses with the assumption that kernel_map.size is the size of the entire kernel (these checks are in arch/riscv/mm/physaddr.c). Change XIP's kernel_map.size to be the size of the entire kernel. Signed-off-by: Nam Cao Cc: # v6.1+ Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240508191917.2892064-1-namcao@linutronix.de Signed-off-by: Palmer Dabbelt commit 61119394631f219e23ce98bcc3eb993a64a8ea64 Author: Celeste Liu Date: Thu Jun 27 22:23:39 2024 +0800 riscv: entry: always initialize regs->a0 to -ENOSYS Otherwise when the tracer changes syscall number to -1, the kernel fails to initialize a0 with -ENOSYS and subsequently fails to return the error code of the failed syscall to userspace. For example, it will break strace syscall tampering. Fixes: 52449c17bdd1 ("riscv: entry: set a0 = -ENOSYS only when syscall != -1") Reported-by: "Dmitry V. Levin" Reviewed-by: Björn Töpel Cc: stable@vger.kernel.org Signed-off-by: Celeste Liu Link: https://lore.kernel.org/r/20240627142338.5114-2-CoelacanthusHex@gmail.com Signed-off-by: Palmer Dabbelt commit 3cd740b985963f874a1a094f1969e998b9d05554 Author: Tom Hughes Date: Tue Aug 6 12:40:52 2024 +0100 netfilter: allow ipv6 fragments to arrive on different devices Commit 264640fc2c5f4 ("ipv6: distinguish frag queues by device for multicast and link-local packets") modified the ipv6 fragment reassembly logic to distinguish frag queues by device for multicast and link-local packets but in fact only the main reassembly code limits the use of the device to those address types and the netfilter reassembly code uses the device for all packets. This means that if fragments of a packet arrive on different interfaces then netfilter will fail to reassemble them and the fragments will be expired without going any further through the filters. Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Tom Hughes Signed-off-by: Pablo Neira Ayuso commit 2848ff28d180bd63a95da8e5dcbcdd76c1beeb7b Author: Mitchell Levy Date: Mon Aug 12 13:44:12 2024 -0700 x86/fpu: Avoid writing LBR bit to IA32_XSS unless supported There are two distinct CPU features related to the use of XSAVES and LBR: whether LBR is itself supported and whether XSAVES supports LBR. The LBR subsystem correctly checks both in intel_pmu_arch_lbr_init(), but the XSTATE subsystem does not. The LBR bit is only removed from xfeatures_mask_independent when LBR is not supported by the CPU, but there is no validation of XSTATE support. If XSAVES does not support LBR the write to IA32_XSS causes a #GP fault, leaving the state of IA32_XSS unchanged, i.e. zero. The fault is handled with a warning and the boot continues. Consequently the next XRSTORS which tries to restore supervisor state fails with #GP because the RFBM has zero for all supervisor features, which does not match the XCOMP_BV field. As XFEATURE_MASK_FPSTATE includes supervisor features setting up the FPU causes a #GP, which ends up in fpu_reset_from_exception_fixup(). That fails due to the same problem resulting in recursive #GPs until the kernel runs out of stack space and double faults. Prevent this by storing the supported independent features in fpu_kernel_cfg during XSTATE initialization and use that cached value for retrieving the independent feature bits to be written into IA32_XSS. [ tglx: Massaged change log ] Fixes: f0dccc9da4c0 ("x86/fpu/xstate: Support dynamic supervisor feature for LBR") Suggested-by: Thomas Gleixner Signed-off-by: Mitchell Levy Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240812-xsave-lbr-fix-v3-1-95bac1bf62f4@gmail.com commit 71833e79a42178d8a50b5081c98c78ace9325628 Author: Richard Fitzgerald Date: Wed Aug 14 13:16:49 2024 +0100 i2c: Use IS_REACHABLE() for substituting empty ACPI functions Replace IS_ENABLED() with IS_REACHABLE() to substitute empty stubs for: i2c_acpi_get_i2c_resource() i2c_acpi_client_count() i2c_acpi_find_bus_speed() i2c_acpi_new_device_by_fwnode() i2c_adapter *i2c_acpi_find_adapter_by_handle() i2c_acpi_waive_d0_probe() commit f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions") partially fixed this conditional to depend on CONFIG_I2C, but used IS_ENABLED(), which is wrong since CONFIG_I2C is tristate. CONFIG_ACPI is boolean but let's also change it to use IS_REACHABLE() to future-proof it against becoming tristate. Somehow despite testing various combinations of CONFIG_I2C and CONFIG_ACPI we missed the combination CONFIG_I2C=m, CONFIG_ACPI=y. Signed-off-by: Richard Fitzgerald Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/ Reviewed-by: Takashi Iwai Signed-off-by: Wolfram Sang commit 57d5af2660e9443b081eeaf1c373b3ce48477828 Author: Vignesh Raghavendra Date: Wed Aug 14 20:42:37 2024 +0530 spi: spi-cadence-quadspi: Fix OSPI NOR failures during system resume Its necessary to call pm_runtime_force_*() hooks as part of system suspend/resume calls so that the runtime_pm hooks get called. This ensures latest state of the IP is cached and restored during system sleep. This is especially true if runtime autosuspend is enabled as runtime suspend hooks may not be called at all before system sleeps. Without this patch, OSPI NOR enumeration (READ_ID) fails during resume as context saved during suspend path is inconsistent. Fixes: 078d62de433b ("spi: cadence-qspi: add system-wide suspend and resume callbacks") Signed-off-by: Vignesh Raghavendra Link: https://patch.msgid.link/20240814151237.3856184-1-vigneshr@ti.com Signed-off-by: Mark Brown commit 2251db28edcc70b7ee8a8c6bcbaecf752b3ea5ec Author: Krzysztof Kozlowski Date: Tue Aug 6 13:49:13 2024 +0200 ASoC: codecs: wcd937x: Fix missing de-assert of reset GPIO The device never comes online from a reset/shutdown state, because the driver de-asserts reset GPIO when requesting it but then, at the end of probe() through wcd937x_reset(), leaves it asserted. Cc: stable@vger.kernel.org Fixes: 9be3ec196da4 ("ASoC: codecs: wcd937x: add wcd937x codec driver") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240806114913.40022-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 1c0e5881691a787a9399a99bff4d56ead6e75e91 Author: Amit Shah Date: Wed Aug 14 10:31:13 2024 +0200 KVM: SEV: uapi: fix typo in SEV_RET_INVALID_CONFIG "INVALID" is misspelt in "SEV_RET_INAVLID_CONFIG". Since this is part of the UAPI, keep the current definition and add a new one with the fix. Fix-suggested-by: Marc Zyngier Signed-off-by: Amit Shah Message-ID: <20240814083113.21622-1-amit@kernel.org> Signed-off-by: Paolo Bonzini commit a21dcf0ea8566ebbe011c79d6ed08cdfea771de3 Author: Haibo Xu Date: Mon Aug 5 11:30:24 2024 +0800 arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE Currently, only acpi_early_node_map[0] was initialized to NUMA_NO_NODE. To ensure all the values were properly initialized, switch to initialize all of them to NUMA_NO_NODE. Fixes: e18962491696 ("arm64: numa: rework ACPI NUMA initialization") Cc: # 4.19.x Reported-by: Andrew Jones Suggested-by: Andrew Jones Signed-off-by: Haibo Xu Reviewed-by: Anshuman Khandual Reviewed-by: Sunil V L Reviewed-by: Andrew Jones Acked-by: Catalin Marinas Acked-by: Lorenzo Pieralisi Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/853d7f74aa243f6f5999e203246f0d1ae92d2b61.1722828421.git.haibo1.xu@intel.com Signed-off-by: Catalin Marinas commit f94511df53bb792e505c98662971434c7995388a Author: Mark Rutland Date: Wed Aug 7 11:37:31 2024 +0100 arm64: uaccess: correct thinko in __get_mem_asm() In the CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y version of __get_mem_asm(), we incorrectly use _ASM_EXTABLE_##type##ACCESS_ERR() such that upon a fault the extable fixup handler writes -EFAULT into "%w0", which is the register containing 'x' (the result of the load). This was a thinko in commit: 86a6a68febfcf57b ("arm64: start using 'asm goto' for get_user() when available") Prior to that commit _ASM_EXTABLE_##type##ACCESS_ERR_ZERO() was used such that the extable fixup handler wrote -EFAULT into "%w0" (the register containing 'err'), and zero into "%w1" (the register containing 'x'). When the 'err' variable was removed, the extable entry was updated incorrectly. Writing -EFAULT to the value register is unnecessary but benign: * We never want -EFAULT in the value register, and previously this would have been zeroed in the extable fixup handler. * In __get_user_error() the value is overwritten with zero explicitly in the error path. * The asm goto outputs cannot be used when the goto label is taken, as older compilers (e.g. clang < 16.0.0) do not guarantee that asm goto outputs are usable in this path and may use a stale value rather than the value in an output register. Consequently, zeroing in the extable fixup handler is insufficient to ensure callers see zero in the error path. * The expected usage of unsafe_get_user() and get_kernel_nofault() requires that the value is not consumed in the error path. Some versions of GCC would mis-compile asm goto with outputs, and erroneously omit subsequent assignments, breaking the error path handling in __get_user_error(). This was discussed at: https://lore.kernel.org/lkml/ZpfxLrJAOF2YNqCk@J2N7QTR9R3.cambridge.arm.com/ ... and was fixed by removing support for asm goto with outputs on those broken compilers in commit: f2f6a8e887172503 ("init/Kconfig: remove CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND") With that out of the way, we can safely replace the usage of _ASM_EXTABLE_##type##ACCESS_ERR() with _ASM_EXTABLE_##type##ACCESS(), leaving the value register unchanged in the case a fault is taken, as was originally intended. This matches other architectures and matches our __put_mem_asm(). Signed-off-by: Mark Rutland Cc: Will Deacon Link: https://lore.kernel.org/r/20240807103731.2498893-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 66155de93bcf4f2967e602a4b3bf7ebe58f34b11 Author: Sean Christopherson Date: Fri Aug 9 12:02:58 2024 -0700 KVM: x86: Disallow read-only memslots for SEV-ES and SEV-SNP (and TDX) Disallow read-only memslots for SEV-{ES,SNP} VM types, as KVM can't directly emulate instructions for ES/SNP, and instead the guest must explicitly request emulation. Unless the guest explicitly requests emulation without accessing memory, ES/SNP relies on KVM creating an MMIO SPTE, with the subsequent #NPF being reflected into the guest as a #VC. But for read-only memslots, KVM deliberately doesn't create MMIO SPTEs, because except for ES/SNP, doing so requires setting reserved bits in the SPTE, i.e. the SPTE can't be readable while also generating a #VC on writes. Because KVM never creates MMIO SPTEs and jumps directly to emulation, the guest never gets a #VC. And since KVM simply resumes the guest if ES/SNP guests trigger emulation, KVM effectively puts the vCPU into an infinite #NPF loop if the vCPU attempts to write read-only memory. Disallow read-only memory for all VMs with protected state, i.e. for upcoming TDX VMs as well as ES/SNP VMs. For TDX, it's actually possible to support read-only memory, as TDX uses EPT Violation #VE to reflect the fault into the guest, e.g. KVM could configure read-only SPTEs with RX protections and SUPPRESS_VE=0. But there is no strong use case for supporting read-only memslots on TDX, e.g. the main historical usage is to emulate option ROMs, but TDX disallows executing from shared memory. And if someone comes along with a legitimate, strong use case, the restriction can always be lifted for TDX. Don't bother trying to retroactively apply the restriction to SEV-ES VMs that are created as type KVM_X86_DEFAULT_VM. Read-only memslots can't possibly work for SEV-ES, i.e. disallowing such memslots is really just means reporting an error to userspace instead of silently hanging vCPUs. Trying to deal with the ordering between KVM_SEV_INIT and memslot creation isn't worth the marginal benefit it would provide userspace. Fixes: 26c44aa9e076 ("KVM: SEV: define VM types for SEV and SEV-ES") Fixes: 1dfe571c12cf ("KVM: SEV: Add initial SEV-SNP support") Cc: Peter Gonda Cc: Michael Roth Cc: Vishal Annapurve Cc: Ackerly Tng Signed-off-by: Sean Christopherson Message-ID: <20240809190319.1710470-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9d5906799f7d89c9e12f6d2e0fccb00713c945ab Merge: 4ac0f08f44b62 05a3d6e930725 Author: Linus Torvalds Date: Wed Aug 14 09:23:20 2024 -0700 Merge tag 'selinux-pr-20240814' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fixes from Paul Moore: - Fix a xperms counting problem where we adding to the xperms count even if we failed to add the xperm. - Propogate errors from avc_add_xperms_decision() back to the caller so that we can trigger the proper cleanup and error handling. - Revert our use of vma_is_initial_heap() in favor of our older logic as vma_is_initial_heap() doesn't correctly handle the no-heap case and it is causing issues with the SELinux process/execheap access control. While the older SELinux logic may not be perfect, it restores the expected user visible behavior. Hopefully we will be able to resolve the problem with the vma_is_initial_heap() macro with the mm folks, but we need to fix this in the meantime. * tag 'selinux-pr-20240814' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: revert our use of vma_is_initial_heap() selinux: add the processing of the failure of avc_add_xperms_decision() selinux: fix potential counting error in avc_add_xperms_decision() commit 4ac0f08f44b62e59a389c7ed87c89087d9fefe29 Merge: 02f8ca3d49055 810ee43d9cd24 Author: Linus Torvalds Date: Wed Aug 14 09:06:28 2024 -0700 Merge tag 'vfs-6.11-rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "VFS: - Fix the name of file lease slab cache. When file leases were split out of file locks the name of the file lock slab cache was used for the file leases slab cache as well. - Fix a type in take_fd() helper. - Fix infinite directory iteration for stable offsets in tmpfs. - When the icache is pruned all reclaimable inodes are marked with I_FREEING and other processes that try to lookup such inodes will block. But some filesystems like ext4 can trigger lookups in their inode evict callback causing deadlocks. Ext4 does such lookups if the ea_inode feature is used whereby a separate inode may be used to store xattrs. Introduce I_LRU_ISOLATING which pins the inode while its pages are reclaimed. This avoids inode deletion during inode_lru_isolate() avoiding the deadlock and evict is made to wait until I_LRU_ISOLATING is done. netfs: - Fault in smaller chunks for non-large folio mappings for filesystems that haven't been converted to large folios yet. - Fix the CONFIG_NETFS_DEBUG config option. The config option was renamed a short while ago and that introduced two minor issues. First, it depended on CONFIG_NETFS whereas it wants to depend on CONFIG_NETFS_SUPPORT. The former doesn't exist, while the latter does. Second, the documentation for the config option wasn't fixed up. - Revert the removal of the PG_private_2 writeback flag as ceph is using it and fix how that flag is handled in netfs. - Fix DIO reads on 9p. A program watching a file on a 9p mount wouldn't see any changes in the size of the file being exported by the server if the file was changed directly in the source filesystem. Fix this by attempting to read the full size specified when a DIO read is requested. - Fix a NULL pointer dereference bug due to a data race where a cachefiles cookies was retired even though it was still in use. Check the cookie's n_accesses counter before discarding it. nsfs: - Fix ioctl declaration for NS_GET_MNTNS_ID from _IO() to _IOR() as the kernel is writing to userspace. pidfs: - Prevent the creation of pidfds for kthreads until we have a use-case for it and we know the semantics we want. It also confuses userspace why they can get pidfds for kthreads. squashfs: - Fix an unitialized value bug reported by KMSAN caused by a corrupted symbolic link size read from disk. Check that the symbolic link size is not larger than expected" * tag 'vfs-6.11-rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: Squashfs: sanity check symbolic link size 9p: Fix DIO read through netfs vfs: Don't evict inode under the inode lru traversing context netfs: Fix handling of USE_PGPRIV2 and WRITE_TO_CACHE flags netfs, ceph: Revert "netfs: Remove deprecated use of PG_private_2 as a second writeback flag" file: fix typo in take_fd() comment pidfd: prevent creation of pidfds for kthreads netfs: clean up after renaming FSCACHE_DEBUG config libfs: fix infinite directory reads for offset dir nsfs: fix ioctl declaration fs/netfs/fscache_cookie: add missing "n_accesses" check filelock: fix name of file_lease slab cache netfs: Fault in smaller chunks for non-large folio mappings commit 02f8ca3d49055788f112c17052a3da65feb01835 Merge: 6b0f8db921abf 100bff23818eb Author: Linus Torvalds Date: Wed Aug 14 08:57:24 2024 -0700 Merge tag 'bpf-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Pull bpf fixes from Alexei Starovoitov: - Fix bpftrace regression from Kyle Huey. Tracing bpf prog was called with perf_event input arguments causing bpftrace produce garbage output. - Fix verifier crash in stacksafe() from Yonghong Song. Daniel Hodges reported verifier crash when playing with sched-ext. The stack depth in the known verifier state was larger than stack depth in being explored state causing out-of-bounds access. - Fix update of freplace prog in prog_array from Leon Hwang. freplace prog type wasn't recognized correctly. * tag 'bpf-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: perf/bpf: Don't call bpf_overflow_handler() for tracing events selftests/bpf: Add a test to verify previous stacksafe() fix bpf: Fix a kernel verifier crash in stacksafe() bpf: Fix updating attached freplace prog in prog_array map commit 8d16762047c627073955b7ed171a36addaf7b1ff Author: Darrick J. Wong Date: Sun Aug 4 14:39:57 2024 -0700 xfs: conditionally allow FS_XFLAG_REALTIME changes if S_DAX is set If a file has the S_DAX flag (aka fsdax access mode) set, we cannot allow users to change the realtime flag unless the datadev and rtdev both support fsdax access modes. Even if there are no extents allocated to the file, the setattr thread could be racing with another thread that has already started down the write code paths. Fixes: ba23cba9b3bdc ("fs: allow per-device dax status checking for filesystems") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 04d6dbb55301a29aeb9a197e6b0012cdc265f1e4 Author: Darrick J. Wong Date: Sun Aug 4 14:39:34 2024 -0700 xfs: revert AIL TASK_KILLABLE threshold In commit 9adf40249e6c, we changed the behavior of the AIL thread to set its own task state to KILLABLE whenever the timeout value is nonzero. Unfortunately, this missed the fact that xfsaild_push will return 50ms (aka a longish sleep) when we reach the push target or the AIL becomes empty, so xfsaild goes to sleep for a long period of time in uninterruptible D state. This results in artificially high load averages because KILLABLE processes are UNINTERRUPTIBLE, which contributes to load average even though the AIL is asleep waiting for someone to interrupt it. It's not blocked on IOs or anything, but people scrap ps for processes that look like they're stuck in D state, so restore the previous threshold. Fixes: 9adf40249e6c ("xfs: AIL doesn't need manual pushing") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 73c34b0b85d46bf9c2c0b367aeaffa1e2481b136 Author: Darrick J. Wong Date: Mon Jul 29 13:44:33 2024 -0700 xfs: attr forks require attr, not attr2 It turns out that I misunderstood the difference between the attr and attr2 feature bits. "attr" means that at some point an attr fork was created somewhere in the filesystem. "attr2" means that inodes have variable-sized forks, but says nothing about whether or not there actually /are/ attr forks in the system. If we have an attr fork, we only need to check that attr is set. Fixes: 99d9d8d05da26 ("xfs: scrub inode block mappings") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 829e2a23121fb36ee30ea5145c2a85199f68e2c8 Author: Takashi Iwai Date: Wed Aug 14 12:04:59 2024 +0200 ALSA: hda/tas2781: Use correct endian conversion The data conversion is done rather by a wrong function. We convert to BE32, not from BE32. Although the end result must be same, this was complained by the compiler. Fix the code again and align with another similar function tas2563_apply_calib() that does already right. Fixes: 3beddef84d90 ("ALSA: hda/tas2781: fix wrong calibrated data order") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408141630.DiDUB8Z4-lkp@intel.com/ Link: https://patch.msgid.link/20240814100500.1944-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit fa0db8e568787c665384430eaf2221b299b85367 Author: Niklas Cassel Date: Tue Aug 13 15:19:01 2024 +0200 Revert "ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error" This reverts commit 28ab9769117ca944cb6eb537af5599aa436287a4. Sense data can be in either fixed format or descriptor format. SAT-6 revision 1, "10.4.6 Control mode page", defines the D_SENSE bit: "The SATL shall support this bit as defined in SPC-5 with the following exception: if the D_ SENSE bit is set to zero (i.e., fixed format sense data), then the SATL should return fixed format sense data for ATA PASS-THROUGH commands." The libata SATL has always kept D_SENSE set to zero by default. (It is however possible to change the value using a MODE SELECT SG_IO command.) Failed ATA PASS-THROUGH commands correctly respected the D_SENSE bit, however, successful ATA PASS-THROUGH commands incorrectly returned the sense data in descriptor format (regardless of the D_SENSE bit). Commit 28ab9769117c ("ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error") fixed this bug for successful ATA PASS-THROUGH commands. However, after commit 28ab9769117c ("ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error"), there were bug reports that hdparm, hddtemp, and udisks were no longer working as expected. These applications incorrectly assume the returned sense data is in descriptor format, without even looking at the RESPONSE CODE field in the returned sense data (to see which format the returned sense data is in). Considering that there will be broken versions of these applications around roughly forever, we are stuck with being bug compatible with older kernels. Cc: stable@vger.kernel.org # 4.19+ Reported-by: Stephan Eisvogel Reported-by: Christian Heusel Closes: https://lore.kernel.org/linux-ide/0bf3f2f0-0fc6-4ba5-a420-c0874ef82d64@heusel.eu/ Fixes: 28ab9769117c ("ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error") Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240813131900.1285842-2-cassel@kernel.org Signed-off-by: Niklas Cassel commit c286f204ce6ba7b48e3dcba53eda7df8eaa64dd9 Author: Juan José Arboleda Date: Tue Aug 13 11:10:53 2024 -0500 ALSA: usb-audio: Support Yamaha P-125 quirk entry This patch adds a USB quirk for the Yamaha P-125 digital piano. Signed-off-by: Juan José Arboleda Cc: Link: https://patch.msgid.link/20240813161053.70256-1-soyjuanarbol@gmail.com Signed-off-by: Takashi Iwai commit a2cbb1603943281a604f5adc48079a148db5cb0d Author: Subash Abhinov Kasiviswanathan Date: Thu Aug 8 16:06:40 2024 -0700 tcp: Update window clamping condition This patch is based on the discussions between Neal Cardwell and Eric Dumazet in the link https://lore.kernel.org/netdev/20240726204105.1466841-1-quic_subashab@quicinc.com/ It was correctly pointed out that tp->window_clamp would not be updated in cases where net.ipv4.tcp_moderate_rcvbuf=0 or if (copied <= tp->rcvq_space.space). While it is expected for most setups to leave the sysctl enabled, the latter condition may not end up hitting depending on the TCP receive queue size and the pattern of arriving data. The updated check should be hit only on initial MSS update from TCP_MIN_MSS to measured MSS value and subsequently if there was an update to a larger value. Fixes: 05f76b2d634e ("tcp: Adjust clamping window for applications specifying SO_RCVBUF") Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 63de936b513f7a9ce559194d3269ac291f4f4662 Author: Hans de Goede Date: Sun Jul 21 17:38:40 2024 +0200 media: atomisp: Fix streaming no longer working on BYT / ISP2400 devices Commit a0821ca14bb8 ("media: atomisp: Remove test pattern generator (TPG) support") broke BYT support because it removed a seemingly unused field from struct sh_css_sp_config and a seemingly unused value from enum ia_css_input_mode. But these are part of the ABI between the kernel and firmware on ISP2400 and this part of the TPG support removal changes broke ISP2400 support. ISP2401 support was not affected because on ISP2401 only a part of struct sh_css_sp_config is used. Restore the removed field and enum value to fix this. Fixes: a0821ca14bb8 ("media: atomisp: Remove test pattern generator (TPG) support") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 58474f76a770bcc79d4b2d7232e4d6650e732b50 Author: Kent Overstreet Date: Mon Aug 12 02:27:36 2024 -0400 bcachefs: bcachefs_metadata_version_disk_accounting_inum This adds another disk accounting counter to track usage per inode number (any snapshot ID). This will be used for a couple things: - It'll give us a way to tell the user how much space a given file ista consuming in all snapshots; i.e. how much extra space it's consuming due to snapshot versioning. - It counts number of extents and total size of extents (both in btree keyspace sectors and actual disk usage), meaning it gives us average extent size: that is, it'll let us cheaply find fragmented files that should be defragmented. Signed-off-by: Kent Overstreet commit 5132b99bb62664c02bd6c0dd62ad3fedc75294d8 Author: Kent Overstreet Date: Mon Aug 12 02:35:10 2024 -0400 bcachefs: Kill __bch2_accounting_mem_mod() The next patch will be adding a disk accounting counter type which is not kept in the in-memory eytzinger tree. As prep, fold __bch2_accounting_mem_mod() into bch2_accounting_mem_mod_locked() so that we can check for that counter type and bail out without calling bpos_to_disk_accounting_pos() twice. Signed-off-by: Kent Overstreet commit d97de0d017cde0d442c3d144b4f969f43064cc0f Author: Kent Overstreet Date: Mon Aug 12 21:31:25 2024 -0400 bcachefs: Make bkey_fsck_err() a wrapper around fsck_err() bkey_fsck_err() was added as an interface that looks like fsck_err(), but previously all it did was ensure that the appropriate error counter was incremented in the superblock. This is a cleanup and bugfix patch that converts it to a wrapper around fsck_err(). This is needed to fix an issue with the upgrade path to disk_accounting_v3, where the "silent fix" error list now includes bkey_fsck errors; fsck_err() handles this in a unified way, and since we need to change printing of bkey fsck errors from the caller to the inner bkey_fsck_err() calls, this ends up being a pretty big change. Als,, rename .invalid() methods to .validate(), for clarity, while we're changing the function signature anyways (to drop the printbuf argument). Signed-off-by: Kent Overstreet commit c99471024f24b3cbafc02bf5b112ecf34b0dbd40 Author: Kent Overstreet Date: Mon Aug 12 23:29:46 2024 -0400 bcachefs: Fix warning in __bch2_fsck_err() for trans not passed in Signed-off-by: Kent Overstreet commit 06a8693b890c0cf7d94bf7c6f0e2adf3a3aaa346 Author: Kent Overstreet Date: Sat Aug 10 15:48:18 2024 -0400 bcachefs: Add a time_stat for blocked on key cache flush Signed-off-by: Kent Overstreet commit 790666c8ac6427ddaa00f502dc44073c1e039355 Author: Kent Overstreet Date: Sat Aug 10 14:31:17 2024 -0400 bcachefs: Improve trans_blocked_journal_reclaim tracepoint include information about the state of the btree key cache Signed-off-by: Kent Overstreet commit 7254555c440ff6b136aa97fb3c33fd5e0bb4fb9f Author: Kent Overstreet Date: Sat Aug 10 14:40:09 2024 -0400 bcachefs: Add hysteresis to waiting on btree key cache flush This helps ensure key cache reclaim isn't contending with threads waiting for the key cache to be helped, and fixes a severe performance bug. Signed-off-by: Kent Overstreet commit b2f11c6f3e1fc60742673b8675c95b78447f3dae Author: Kent Overstreet Date: Sat Aug 10 21:04:35 2024 -0400 lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc() If we need to increase the tree depth, allocate a new node, and then race with another thread that increased the tree depth before us, we'll still have a preallocated node that might be used later. If we then use that node for a new non-root node, it'll still have a pointer to the old root instead of being zeroed - fix this by zeroing it in the cmpxchg failure path. Signed-off-by: Kent Overstreet commit 968feb854a86b59cc4bc72af3105989706ca2c7d Author: Kent Overstreet Date: Wed Aug 7 16:34:28 2024 -0400 bcachefs: Convert for_each_btree_node() to lockrestart_do() for_each_btree_node() now works similarly to for_each_btree_key(), where the loop body is passed as an argument to be passed to lockrestart_do(). This now calls trans_begin() on every loop iteration - which fixes an SRCU warning in backpointers fsck. Signed-off-by: Kent Overstreet commit 48d6cc1b4895ada0781da11a0a483332a236ec14 Author: Kent Overstreet Date: Tue Aug 13 01:01:35 2024 -0400 bcachefs: Add missing downgrade table entry Signed-off-by: Kent Overstreet commit 486d920735325e507d965c2639ba2775b81fd329 Author: Kent Overstreet Date: Tue Aug 13 22:47:55 2024 -0400 bcachefs: disk accounting: ignore unknown types forward compat fix Signed-off-by: Kent Overstreet commit d9e615762bf2eb7459fb0f270525f8b186bce6b7 Author: Kent Overstreet Date: Tue Aug 13 04:53:12 2024 -0400 bcachefs: bch2_accounting_invalid() fixup Signed-off-by: Kent Overstreet commit bd864bc2d90790e00b02b17c75fb951cb4b0bb8b Author: Kent Overstreet Date: Mon Aug 12 23:24:03 2024 -0400 bcachefs: Fix bch2_trigger_alloc when upgrading from old versions bch2_trigger_alloc was assuming that the new key would always be newly created and thus always an alloc_v4 key, but - not when called from btree_gc. Signed-off-by: Kent Overstreet commit a24e6e7146e361aa0855cf8ee3b2e80b8eb692e3 Author: Kent Overstreet Date: Tue Aug 13 22:40:39 2024 -0400 bcachefs: delete faulty fastpath in bch2_btree_path_traverse_cached() bch2_btree_path_traverse_cached() was previously checking if it could just relock the path, which is a common idiom in path traversal. However, it was using btree_node_relock(), not btree_path_relock(); btree_path_relock() only succeeds if the path was in state BTREE_ITER_NEED_RELOCK. If the path was in state BTREE_ITER_NEED_TRAVERSE a full traversal is needed; this led to a null ptr deref in bch2_btree_path_traverse_cached(). And the short circuit check here isn't needed, since it was already done in the main bch2_btree_path_traverse_one(). Signed-off-by: Kent Overstreet commit 655111b838cdabdb604f3625a9ff08c5eedb11da Author: Eugene Syromiatnikov Date: Mon Aug 12 08:51:23 2024 +0200 mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size ssn_offset field is u32 and is placed into the netlink response with nla_put_u32(), but only 2 bytes are reserved for the attribute payload in subflow_get_info_size() (even though it makes no difference in the end, as it is aligned up to 4 bytes). Supply the correct argument to the relevant nla_total_size() call to make it less confusing. Fixes: 5147dfb50832 ("mptcp: allow dumping subflow context to userspace") Signed-off-by: Eugene Syromiatnikov Reviewed-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240812065024.GA19719@asgard.redhat.com Signed-off-by: Jakub Kicinski commit 6b0f8db921abf0520081d779876d3a41069dab95 Merge: 6b4aa469f0499 f50733b45d865 Author: Linus Torvalds Date: Tue Aug 13 16:10:32 2024 -0700 Merge tag 'execve-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve fixes from Kees Cook: - binfmt_flat: Fix corruption when not offsetting data start - exec: Fix ToCToU between perm check and set-uid/gid usage * tag 'execve-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Fix ToCToU between perm check and set-uid/gid usage binfmt_flat: Fix corruption when not offsetting data start commit 4e91fa1ef3ce6290b4c598e54b5eb6cf134fbec8 Author: Andi Shyti Date: Mon Aug 12 21:40:28 2024 +0200 i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume Add the missing geni_icc_disable() call before returning in the geni_i2c_runtime_resume() function. Commit 9ba48db9f77c ("i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume") by Gaosheng missed disabling the interconnect in one case. Fixes: bf225ed357c6 ("i2c: i2c-qcom-geni: Add interconnect support") Cc: Gaosheng Cui Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Andi Shyti commit b739dffa5d570b411d4bdf4bb9b8dfd6b7d72305 Author: Stefan Wiehler Date: Mon Aug 12 12:06:51 2024 +0200 of/irq: Prevent device address out-of-bounds read in interrupt map walk When of_irq_parse_raw() is invoked with a device address smaller than the interrupt parent node (from #address-cells property), KASAN detects the following out-of-bounds read when populating the initial match table (dyndbg="func of_irq_parse_* +p"): OF: of_irq_parse_one: dev=/soc@0/picasso/watchdog, index=0 OF: parent=/soc@0/pci@878000000000/gpio0@17,0, intsize=2 OF: intspec=4 OF: of_irq_parse_raw: ipar=/soc@0/pci@878000000000/gpio0@17,0, size=2 OF: -> addrsize=3 ================================================================== BUG: KASAN: slab-out-of-bounds in of_irq_parse_raw+0x2b8/0x8d0 Read of size 4 at addr ffffff81beca5608 by task bash/764 CPU: 1 PID: 764 Comm: bash Tainted: G O 6.1.67-484c613561-nokia_sm_arm64 #1 Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2023.01-12.24.03-dirty 01/01/2023 Call trace: dump_backtrace+0xdc/0x130 show_stack+0x1c/0x30 dump_stack_lvl+0x6c/0x84 print_report+0x150/0x448 kasan_report+0x98/0x140 __asan_load4+0x78/0xa0 of_irq_parse_raw+0x2b8/0x8d0 of_irq_parse_one+0x24c/0x270 parse_interrupts+0xc0/0x120 of_fwnode_add_links+0x100/0x2d0 fw_devlink_parse_fwtree+0x64/0xc0 device_add+0xb38/0xc30 of_device_add+0x64/0x90 of_platform_device_create_pdata+0xd0/0x170 of_platform_bus_create+0x244/0x600 of_platform_notify+0x1b0/0x254 blocking_notifier_call_chain+0x9c/0xd0 __of_changeset_entry_notify+0x1b8/0x230 __of_changeset_apply_notify+0x54/0xe4 of_overlay_fdt_apply+0xc04/0xd94 ... The buggy address belongs to the object at ffffff81beca5600 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 8 bytes inside of 128-byte region [ffffff81beca5600, ffffff81beca5680) The buggy address belongs to the physical page: page:00000000230d3d03 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1beca4 head:00000000230d3d03 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x8000000000010200(slab|head|zone=2) raw: 8000000000010200 0000000000000000 dead000000000122 ffffff810000c300 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffff81beca5500: 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffffff81beca5580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffffff81beca5600: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffffff81beca5680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffffff81beca5700: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ================================================================== OF: -> got it ! Prevent the out-of-bounds read by copying the device address into a buffer of sufficient size. Signed-off-by: Stefan Wiehler Link: https://lore.kernel.org/r/20240812100652.3800963-1-stefan.wiehler@nokia.com Signed-off-by: Rob Herring (Arm) commit f50733b45d865f91db90919f8311e2127ce5a0cb Author: Kees Cook Date: Thu Aug 8 11:39:08 2024 -0700 exec: Fix ToCToU between perm check and set-uid/gid usage When opening a file for exec via do_filp_open(), permission checking is done against the file's metadata at that moment, and on success, a file pointer is passed back. Much later in the execve() code path, the file metadata (specifically mode, uid, and gid) is used to determine if/how to set the uid and gid. However, those values may have changed since the permissions check, meaning the execution may gain unintended privileges. For example, if a file could change permissions from executable and not set-id: ---------x 1 root root 16048 Aug 7 13:16 target to set-id and non-executable: ---S------ 1 root root 16048 Aug 7 13:16 target it is possible to gain root privileges when execution should have been disallowed. While this race condition is rare in real-world scenarios, it has been observed (and proven exploitable) when package managers are updating the setuid bits of installed programs. Such files start with being world-executable but then are adjusted to be group-exec with a set-uid bit. For example, "chmod o-x,u+s target" makes "target" executable only by uid "root" and gid "cdrom", while also becoming setuid-root: -rwxr-xr-x 1 root cdrom 16048 Aug 7 13:16 target becomes: -rwsr-xr-- 1 root cdrom 16048 Aug 7 13:16 target But racing the chmod means users without group "cdrom" membership can get the permission to execute "target" just before the chmod, and when the chmod finishes, the exec reaches brpm_fill_uid(), and performs the setuid to root, violating the expressed authorization of "only cdrom group members can setuid to root". Re-check that we still have execute permissions in case the metadata has changed. It would be better to keep a copy from the perm-check time, but until we can do that refactoring, the least-bad option is to do a full inode_permission() call (under inode lock). It is understood that this is safe against dead-locks, but hardly optimal. Reported-by: Marco Vanotti Tested-by: Marco Vanotti Suggested-by: Linus Torvalds Cc: stable@vger.kernel.org Cc: Eric Biederman Cc: Alexander Viro Cc: Christian Brauner Signed-off-by: Kees Cook commit 3e30296b374af33cb4c12ff93df0b1e5b2d0f80b Author: Abhinav Kumar Date: Thu Aug 8 16:52:27 2024 -0700 drm/msm: fix the highest_bank_bit for sc7180 sc7180 programs the ubwc settings as 0x1e as that would mean a highest bank bit of 14 which matches what the GPU sets as well. However, the highest_bank_bit field of the msm_mdss_data which is being used to program the SSPP's fetch configuration is programmed to a highest bank bit of 16 as 0x3 translates to 16 and not 14. Fix the highest bank bit field used for the SSPP to match the mdss and gpu settings. Fixes: 6f410b246209 ("drm/msm/mdss: populate missing data") Reviewed-by: Rob Clark Tested-by: Stephen Boyd # Trogdor.Lazor Patchwork: https://patchwork.freedesktop.org/patch/607625/ Link: https://lore.kernel.org/r/20240808235227.2701479-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar commit faada2174c08662ae98b439c69efe3e79382c538 Author: Mikulas Patocka Date: Tue Aug 13 16:35:14 2024 +0200 dm persistent data: fix memory allocation failure kmalloc is unreliable when allocating more than 8 pages of memory. It may fail when there is plenty of free memory but the memory is fragmented. Zdenek Kabelac observed such failure in his tests. This commit changes kmalloc to kvmalloc - kvmalloc will fall back to vmalloc if the large allocation fails. Signed-off-by: Mikulas Patocka Reported-by: Zdenek Kabelac Reviewed-by: Mike Snitzer Cc: stable@vger.kernel.org commit 100bff23818eb61751ed05d64a7df36ce9728a4d Author: Kyle Huey Date: Tue Aug 13 15:17:27 2024 +0000 perf/bpf: Don't call bpf_overflow_handler() for tracing events The regressing commit is new in 6.10. It assumed that anytime event->prog is set bpf_overflow_handler() should be invoked to execute the attached bpf program. This assumption is false for tracing events, and as a result the regressing commit broke bpftrace by invoking the bpf handler with garbage inputs on overflow. Prior to the regression the overflow handlers formed a chain (of length 0, 1, or 2) and perf_event_set_bpf_handler() (the !tracing case) added bpf_overflow_handler() to that chain, while perf_event_attach_bpf_prog() (the tracing case) did not. Both set event->prog. The chain of overflow handlers was replaced by a single overflow handler slot and a fixed call to bpf_overflow_handler() when appropriate. This modifies the condition there to check event->prog->type == BPF_PROG_TYPE_PERF_EVENT, restoring the previous behavior and fixing bpftrace. Signed-off-by: Kyle Huey Suggested-by: Andrii Nakryiko Reported-by: Joe Damato Closes: https://lore.kernel.org/lkml/ZpFfocvyF3KHaSzF@LQ3V64L9R2/ Fixes: f11f10bfa1ca ("perf/bpf: Call BPF handler directly, not through overflow machinery") Cc: stable@vger.kernel.org Tested-by: Joe Damato # bpftrace Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240813151727.28797-1-jdamato@fastly.com Signed-off-by: Alexei Starovoitov commit 23acd1f344e8102f803119d0c8fc4df4628d694f Author: Kenneth Feng Date: Thu Aug 8 12:19:22 2024 +0800 drm/amd/amdgpu: add HDP_SD support on gc 12.0.0/1 add HDP_SD support on gc 12.0.0/1 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit 61cffacb3a1c590b15c0e9ff987de02d293e0dd8) commit 507a2286c052919fe416b3daa0f0061d0fc702b9 Author: Yinjie Yao Date: Fri Aug 9 17:20:26 2024 -0400 drm/amdgpu: Update kmd_fw_shared for VCN5 kmd_fw_shared changed in VCN5 Signed-off-by: Yinjie Yao Reviewed-by: Ruijing Dong Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit aa02486fb18cecbaca0c4fd393d1a03f1d4c3f9a) commit 470516c2925493594a690bc4d05b1f4471d9f996 Author: David (Ming Qiang) Wu Date: Thu Aug 8 12:19:50 2024 -0400 drm/amd/amdgpu: command submission parser for JPEG Add JPEG IB command parser to ensure registers in the command are within the JPEG IP block. Reviewed-by: Alex Deucher Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher (cherry picked from commit a7f670d5d8e77b092404ca8a35bb0f8f89ed3117) Cc: stable@vger.kernel.org commit 4246b1077ffcc37926868581bb818fdb49d0d065 Author: Jack Xiao Date: Wed Aug 7 12:03:11 2024 +0800 drm/amdgpu/mes12: fix suspend issue Use mes pipe to unmap kcq and kgq. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit f7fb9d677faf0460131bc2af15afd766d48a1f47) commit af401543df510a73f7beb13f80cf4c541be94786 Author: Jack Xiao Date: Wed Aug 7 15:23:16 2024 +0800 drm/amdgpu/mes12: sw/hw fini for unified mes Free memory for two pipes and unmap pipe0 via pipe1. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 98cae695a8ae0e4291b1fa7feef9b54fabefe885) commit 7254027e1e6edbff54f5930a5f13f14ac6f1694c Author: Jack Xiao Date: Wed Aug 7 14:49:30 2024 +0800 drm/amdgpu/mes12: configure two pipes hardware resources Configure two pipes with different hardware resources. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit ea5d6db17a8e3635ad91e8c53faa1fdc9570fbbb) commit 1097727d6d0c13eca25321fff46714fc5047d6e8 Author: Jack Xiao Date: Wed Aug 7 14:44:07 2024 +0800 drm/amdgpu/mes12: adjust mes12 sw/hw init for multiple pipes Adjust mes12 sw/hw initiailization for both pipe0 and pipe1 enablement. The two pipes are almost identical pipe. Pipe0 behaves like schq and pipe1 like kiq, pipe0 was mapped by pipe1. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit aa539da8aff07ab08def6490e8c9b441439e70ba) commit 3738a7f0ddb920bde538d3f78a02edbc6ad1307e Author: Jack Xiao Date: Wed Aug 7 14:15:48 2024 +0800 drm/amdgpu/mes12: add mes pipe switch support Add mes pipe switch to let caller choose pipe to submit packet. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit b2dee0837a4be63e8d3e00550a9f057644f962c4) commit a13d91bf3c1910212e45a69d04ad40d99878f8da Author: Jack Xiao Date: Wed Aug 7 13:19:59 2024 +0800 drm/amdgpu/mes12: load unified mes fw on pipe0 and pipe1 Enable unified mes firmware to load on pipe0 and pipe1. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit e69c2dd7534f3fcabf7bb801db2a7ac71e7e5da6) commit 2029b3d7e1358bcca30f74978543ba35b4bbc43d Author: Jack Xiao Date: Wed Aug 7 11:53:35 2024 +0800 drm/amdgpu/mes: add multiple mes ring instances support Add multiple mes ring instances in mes structure to support multiple mes pipes. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit c7d4355648ffa02a1551495b05c71ea6c884d29c) commit 278e1865b7a2124ea783b75ea8b3ee0bc2da5d85 Author: Jack Xiao Date: Wed Aug 7 11:43:45 2024 +0800 drm/amdgpu/mes12: update mes_v12_api_def.h Update mes12 api definition. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 2ab5dc59177419d8a49e89585e82ff41524270fc) commit 0573a1e2ea7e35bff08944a40f1adf2bb35cea61 Author: Bas Nieuwenhuizen Date: Tue Aug 6 22:27:32 2024 +0200 drm/amdgpu: Actually check flags for all context ops. Missing validation ... Checked libdrm and it clears all the structs, so we should be safe to just check everything. Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher (cherry picked from commit c6b86421f1f9ddf9d706f2453159813ee39d0cf9) Cc: stable@vger.kernel.org commit e6c6bd6253e792cee6c5c065e106e87b9f0d9ae9 Author: Alex Deucher Date: Fri Jul 12 10:06:05 2024 -0400 drm/amdgpu/jpeg4: properly set atomics vmid field This needs to be set as well if the IB uses atomics. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher (cherry picked from commit c6c2e8b6a427d4fecc7c36cffccb908185afcab2) Cc: stable@vger.kernel.org commit e414a304f2c5368a84f03ad34d29b89f965a33c9 Author: Alex Deucher Date: Fri Jul 12 10:00:33 2024 -0400 drm/amdgpu/jpeg2: properly set atomics vmid field This needs to be set as well if the IB uses atomics. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher (cherry picked from commit 35c628774e50b3784c59e8ca7973f03bcb067132) Cc: stable@vger.kernel.org commit 56fb276d0244d430496f249335a44ae114dd5f54 Author: Rodrigo Siqueira Date: Thu Aug 1 16:16:35 2024 -0600 drm/amd/display: Adjust cursor position [why & how] When the commit 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror") was introduced, it used the wrong calculation for the position copy for X. This commit uses the correct calculation for that based on the original patch. Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror") Cc: Mario Limonciello Cc: Alex Deucher Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 8f9b23abbae5ffcd64856facd26a86b67195bc2f) Cc: stable@vger.kernel.org commit 737222cebecbdbcdde2b69475c52bcb9ecfeb830 Author: Melissa Wen Date: Tue Jan 31 15:05:46 2023 -0100 drm/amd/display: fix cursor offset on rotation 180 [why & how] Cursor gets clipped off in the middle of the screen with hw rotation 180. Fix a miscalculation of cursor offset when it's placed near the edges in the pipe split case. Cursor bugs with hw rotation were reported on AMD issue tracker: https://gitlab.freedesktop.org/drm/amd/-/issues/2247 The issues on rotation 270 was fixed by: https://lore.kernel.org/amd-gfx/20221118125935.4013669-22-Brian.Chang@amd.com/ that partially addressed the rotation 180 too. So, this patch is the final bits for rotation 180. Reported-by: Xaver Hugl Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2247 Reviewed-by: Harry Wentland Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror") Signed-off-by: Melissa Wen Signed-off-by: Hamza Mahfooz Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 1fd2cf090096af8a25bf85564341cfc21cec659d) Cc: stable@vger.kernel.org commit 338567d17627064dba63cf063459605e782f71d2 Author: Fangzhi Zuo Date: Mon Jul 29 10:23:03 2024 -0400 drm/amd/display: Fix MST BW calculation Regression [Why & How] Revert commit 8b2cb32cf0c6 ("drm/amd/display: FEC overhead should be checked once for mst slot nums") Because causes bw calculation regression Cc: mario.limonciello@amd.com Cc: alexander.deucher@amd.com Reported-by: jirislaby@kernel.org Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3495 Closes: https://bugzilla.suse.com/show_bug.cgi?id=1228093 Reviewed-by: Wayne Lin Signed-off-by: Fangzhi Zuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 12dbb3ed212fc7655fce421542a5add637f8af7a) Cc: stable@vger.kernel.org commit 0dbb81d44108a2a1004e5b485ef3fca5bc078424 Author: Loan Chen Date: Fri Aug 2 13:57:40 2024 +0800 drm/amd/display: Enable otg synchronization logic for DCN321 [Why] Tiled display cannot synchronize properly after S3. The fix for commit 5f0c74915815 ("drm/amd/display: Fix for otg synchronization logic") is not enable in DCN321, which causes the otg is excluded from synchronization. [How] Enable otg synchronization logic in dcn321. Fixes: 5f0c74915815 ("drm/amd/display: Fix for otg synchronization logic") Cc: Mario Limonciello Cc: Alex Deucher Reviewed-by: Alvin Lee Signed-off-by: Loan Chen Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit d6ed53712f583423db61fbb802606759e023bf7b) Cc: stable@vger.kernel.org commit f6098641d3e1e4d4052ff9378857c831f9675f6b Author: Hamza Mahfooz Date: Tue Aug 6 09:55:55 2024 -0400 drm/amd/display: fix s2idle entry for DCN3.5+ To be able to get to the lowest power state when suspending systems with DCN3.5+, we must be in IPS before the display hardware is put into D3cold. So, to ensure that the system always reaches the lowest power state while suspending, force systems that support IPS to enter idle optimizations before entering D3cold. Reviewed-by: Roman Li Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher (cherry picked from commit 237193e21b29d4aa0617ffeea3d6f49e72999708) Cc: stable@vger.kernel.org # 6.10+ commit 11752c013f562a1124088a35bd314aa0e9f0e88f Author: Jack Xiao Date: Thu Jul 18 16:38:50 2024 +0800 drm/amdgpu/mes: fix mes ring buffer overflow wait memory room until enough before writing mes packets to avoid ring buffer overflow. v2: squash in sched_hw_submission fix Fixes: de3246254156 ("drm/amdgpu: cleanup MES11 command submission") Fixes: fffe347e1478 ("drm/amdgpu: cleanup MES12 command submission") Signed-off-by: Jack Xiao Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 34e087e8920e635c62e2ed6a758b0cd27f836d13) Cc: stable@vger.kernel.org commit c9b35a6f4edea698a5bb4dd8029e7104ee0a3726 Author: Li RongQing Date: Thu Jul 11 20:11:30 2024 +0800 KVM: eventfd: Use synchronize_srcu_expedited() on shutdown When hot-unplug a device which has many queues, and guest CPU will has huge jitter, and unplugging is very slow. It turns out synchronize_srcu() in irqfd_shutdown() caused the guest jitter and unplugging latency, so replace synchronize_srcu() with synchronize_srcu_expedited(), to accelerate the unplugging, and reduce the guest OS jitter, this accelerates the VM reboot too. Signed-off-by: Li RongQing Message-ID: <20240711121130.38917-1-lirongqing@baidu.com> [Call it just once in irqfd_resampler_shutdown. - Paolo] Signed-off-by: Paolo Bonzini commit 6b4aa469f04999c3f244515fa7491b4d093c5167 Merge: d74da846046ae f6bd41280a44d Author: Linus Torvalds Date: Tue Aug 13 09:03:23 2024 -0700 Merge tag '6.11-rc3-ksmbd-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: "Two smb3 server fixes for access denied problem on share path checks" * tag '6.11-rc3-ksmbd-fixes' of git://git.samba.org/ksmbd: ksmbd: override fsids for smb2_query_info() ksmbd: override fsids for share path check commit 238d3d63d1e27c8d9733b48f7b682fc6aba86672 Author: Michal Luczaj Date: Fri Aug 2 13:29:41 2024 -0700 KVM: selftests: Add a testcase to verify x2APIC is fully readonly Add a test to verify that userspace can't change a vCPU's x2APIC ID by abusing KVM_SET_LAPIC. KVM models the x2APIC ID (and x2APIC LDR) as readonly, and silently ignores userspace attempts to change the x2APIC ID for backwards compatibility. Signed-off-by: Michal Luczaj [sean: write changelog, add to existing test] Signed-off-by: Sean Christopherson Message-ID: <20240802202941.344889-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4b7c3f6d04bd53f2e5b228b6821fb8f5d1ba3071 Author: Sean Christopherson Date: Fri Aug 2 13:29:40 2024 -0700 KVM: x86: Make x2APIC ID 100% readonly Ignore the userspace provided x2APIC ID when fixing up APIC state for KVM_SET_LAPIC, i.e. make the x2APIC fully readonly in KVM. Commit a92e2543d6a8 ("KVM: x86: use hardware-compatible format for APIC ID register"), which added the fixup, didn't intend to allow userspace to modify the x2APIC ID. In fact, that commit is when KVM first started treating the x2APIC ID as readonly, apparently to fix some race: static inline u32 kvm_apic_id(struct kvm_lapic *apic) { - return (kvm_lapic_get_reg(apic, APIC_ID) >> 24) & 0xff; + /* To avoid a race between apic_base and following APIC_ID update when + * switching to x2apic_mode, the x2apic mode returns initial x2apic id. + */ + if (apic_x2apic_mode(apic)) + return apic->vcpu->vcpu_id; + + return kvm_lapic_get_reg(apic, APIC_ID) >> 24; } Furthermore, KVM doesn't support delivering interrupts to vCPUs with a modified x2APIC ID, but KVM *does* return the modified value on a guest RDMSR and for KVM_GET_LAPIC. I.e. no remotely sane setup can actually work with a modified x2APIC ID. Making the x2APIC ID fully readonly fixes a WARN in KVM's optimized map calculation, which expects the LDR to align with the x2APIC ID. WARNING: CPU: 2 PID: 958 at arch/x86/kvm/lapic.c:331 kvm_recalculate_apic_map+0x609/0xa00 [kvm] CPU: 2 PID: 958 Comm: recalc_apic_map Not tainted 6.4.0-rc3-vanilla+ #35 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.2-1-1 04/01/2014 RIP: 0010:kvm_recalculate_apic_map+0x609/0xa00 [kvm] Call Trace: kvm_apic_set_state+0x1cf/0x5b0 [kvm] kvm_arch_vcpu_ioctl+0x1806/0x2100 [kvm] kvm_vcpu_ioctl+0x663/0x8a0 [kvm] __x64_sys_ioctl+0xb8/0xf0 do_syscall_64+0x56/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fade8b9dd6f Unfortunately, the WARN can still trigger for other CPUs than the current one by racing against KVM_SET_LAPIC, so remove it completely. Reported-by: Michal Luczaj Closes: https://lore.kernel.org/all/814baa0c-1eaa-4503-129f-059917365e80@rbox.co Reported-by: Haoyu Wu Closes: https://lore.kernel.org/all/20240126161633.62529-1-haoyuwu254@gmail.com Reported-by: syzbot+545f1326f405db4e1c3e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000c2a6b9061cbca3c3@google.com Signed-off-by: Sean Christopherson Message-ID: <20240802202941.344889-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c0196faaa927321a63e680427e075734ee656e42 Author: Albert Jakieła Date: Fri Aug 9 13:56:27 2024 +0000 ASoC: SOF: mediatek: Add missing board compatible Add Google Dojo compatible. Signed-off-by: Albert Jakieła Reviewed-by: Chen-Yu Tsai Link: https://patch.msgid.link/20240809135627.544429-1-jakiela@google.com Signed-off-by: Mark Brown commit 86cfa9a85fb04fa61e7c6b5a8ecf812437cdad78 Author: Daniel Yang Date: Wed Aug 7 02:01:21 2024 -0700 Documentation: dm-crypt.rst warning + error fix While building kernel documention using make htmldocs command, I was getting unexpected indentation error. Single description was given for two module parameters with wrong indentation. So, I corrected the indentation of both parameters and the description. Signed-off-by: Shibu kumar Signed-off-by: Daniel Yang Signed-off-by: Mikulas Patocka Fixes: 0d815e3400e6 ("dm-crypt: limit the size of encryption requests") commit 15e1c3d65975524c5c792fcd59f7d89f00402261 Author: Isaku Yamahata Date: Fri Aug 2 13:16:30 2024 -0700 KVM: x86: Use this_cpu_ptr() instead of per_cpu_ptr(smp_processor_id()) Use this_cpu_ptr() instead of open coding the equivalent in various user return MSR helpers. Signed-off-by: Isaku Yamahata Reviewed-by: Chao Gao Reviewed-by: Yuan Yao [sean: massage changelog] Signed-off-by: Sean Christopherson Reviewed-by: Pankaj Gupta Message-ID: <20240802201630.339306-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit df934abb185c71c9f2fa07a5013672d0cbd36560 Author: David Thompson Date: Fri Aug 9 12:36:12 2024 -0400 mlxbf_gige: disable RX filters until RX path initialized A recent change to the driver exposed a bug where the MAC RX filters (unicast MAC, broadcast MAC, and multicast MAC) are configured and enabled before the RX path is fully initialized. The result of this bug is that after the PHY is started packets that match these MAC RX filters start to flow into the RX FIFO. And then, after rx_init() is completed, these packets will go into the driver RX ring as well. If enough packets are received to fill the RX ring (default size is 128 packets) before the call to request_irq() completes, the driver RX function becomes stuck. This bug is intermittent but is most likely to be seen where the oob_net0 interface is connected to a busy network with lots of broadcast and multicast traffic. All the MAC RX filters must be disabled until the RX path is ready, i.e. all initialization is done and all the IRQs are installed. Fixes: f7442a634ac0 ("mlxbf_gige: call request_irq() after NAPI initialized") Reviewed-by: Asmaa Mnebhi Signed-off-by: David Thompson Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240809163612.12852-1-davthompson@nvidia.com Signed-off-by: Paolo Abeni commit 6252690f7e1b173b86a4c27dfc046b351ab423e7 Author: Naohiro Aota Date: Fri Aug 9 16:54:22 2024 +0900 btrfs: fix invalid mapping of extent xarray state In __extent_writepage_io(), we call btrfs_set_range_writeback() -> folio_start_writeback(), which clears PAGECACHE_TAG_DIRTY mark from the mapping xarray if the folio is not dirty. This worked fine before commit 97713b1a2ced ("btrfs: do not clear page dirty inside extent_write_locked_range()"). After the commit, however, the folio is still dirty at this point, so the mapping DIRTY tag is not cleared anymore. Then, __extent_writepage_io() calls btrfs_folio_clear_dirty() to clear the folio's dirty flag. That results in the page being unlocked with a "strange" state. The page is not PageDirty, but the mapping tag is set as PAGECACHE_TAG_DIRTY. This strange state looks like causing a hang with a call trace below when running fstests generic/091 on a null_blk device. It is waiting for a folio lock. While I don't have an exact relation between this hang and the strange state, fixing the state also fixes the hang. And, that state is worth fixing anyway. This commit reorders btrfs_folio_clear_dirty() and btrfs_set_range_writeback() in __extent_writepage_io(), so that the PAGECACHE_TAG_DIRTY tag is properly removed from the xarray. [464.274] task:fsx state:D stack:0 pid:3034 tgid:3034 ppid:2853 flags:0x00004002 [464.286] Call Trace: [464.291] [464.295] __schedule+0x10ed/0x6260 [464.301] ? __pfx___blk_flush_plug+0x10/0x10 [464.308] ? __submit_bio+0x37c/0x450 [464.314] ? __pfx___schedule+0x10/0x10 [464.321] ? lock_release+0x567/0x790 [464.327] ? __pfx_lock_acquire+0x10/0x10 [464.334] ? __pfx_lock_release+0x10/0x10 [464.340] ? __pfx_lock_acquire+0x10/0x10 [464.347] ? __pfx_lock_release+0x10/0x10 [464.353] ? do_raw_spin_lock+0x12e/0x270 [464.360] schedule+0xdf/0x3b0 [464.365] io_schedule+0x8f/0xf0 [464.371] folio_wait_bit_common+0x2ca/0x6d0 [464.378] ? folio_wait_bit_common+0x1cc/0x6d0 [464.385] ? __pfx_folio_wait_bit_common+0x10/0x10 [464.392] ? __pfx_filemap_get_folios_tag+0x10/0x10 [464.400] ? __pfx_wake_page_function+0x10/0x10 [464.407] ? __pfx___might_resched+0x10/0x10 [464.414] ? do_raw_spin_unlock+0x58/0x1f0 [464.420] extent_write_cache_pages+0xe49/0x1620 [btrfs] [464.428] ? lock_acquire+0x435/0x500 [464.435] ? __pfx_extent_write_cache_pages+0x10/0x10 [btrfs] [464.443] ? btrfs_do_write_iter+0x493/0x640 [btrfs] [464.451] ? orc_find.part.0+0x1d4/0x380 [464.457] ? __pfx_lock_release+0x10/0x10 [464.464] ? __pfx_lock_release+0x10/0x10 [464.471] ? btrfs_do_write_iter+0x493/0x640 [btrfs] [464.478] btrfs_writepages+0x1cc/0x460 [btrfs] [464.485] ? __pfx_btrfs_writepages+0x10/0x10 [btrfs] [464.493] ? is_bpf_text_address+0x6e/0x100 [464.500] ? kernel_text_address+0x145/0x160 [464.507] ? unwind_get_return_address+0x5e/0xa0 [464.514] ? arch_stack_walk+0xac/0x100 [464.521] do_writepages+0x176/0x780 [464.527] ? lock_release+0x567/0x790 [464.533] ? __pfx_do_writepages+0x10/0x10 [464.540] ? __pfx_lock_acquire+0x10/0x10 [464.546] ? __pfx_stack_trace_save+0x10/0x10 [464.553] ? do_raw_spin_lock+0x12e/0x270 [464.560] ? do_raw_spin_unlock+0x58/0x1f0 [464.566] ? _raw_spin_unlock+0x23/0x40 [464.573] ? wbc_attach_and_unlock_inode+0x3da/0x7d0 [464.580] filemap_fdatawrite_wbc+0x113/0x180 [464.587] ? prepare_pages.constprop.0+0x13c/0x5c0 [btrfs] [464.596] __filemap_fdatawrite_range+0xaf/0xf0 [464.603] ? __pfx___filemap_fdatawrite_range+0x10/0x10 [464.611] ? trace_irq_enable.constprop.0+0xce/0x110 [464.618] ? kasan_quarantine_put+0xd7/0x1e0 [464.625] btrfs_start_ordered_extent+0x46f/0x570 [btrfs] [464.633] ? __pfx_btrfs_start_ordered_extent+0x10/0x10 [btrfs] [464.642] ? __clear_extent_bit+0x2c0/0x9d0 [btrfs] [464.650] btrfs_lock_and_flush_ordered_range+0xc6/0x180 [btrfs] [464.659] ? __pfx_btrfs_lock_and_flush_ordered_range+0x10/0x10 [btrfs] [464.669] btrfs_read_folio+0x12a/0x1d0 [btrfs] [464.676] ? __pfx_btrfs_read_folio+0x10/0x10 [btrfs] [464.684] ? __pfx_filemap_add_folio+0x10/0x10 [464.691] ? __pfx___might_resched+0x10/0x10 [464.698] ? __filemap_get_folio+0x1c5/0x450 [464.705] prepare_uptodate_page+0x12e/0x4d0 [btrfs] [464.713] prepare_pages.constprop.0+0x13c/0x5c0 [btrfs] [464.721] ? fault_in_iov_iter_readable+0xd2/0x240 [464.729] btrfs_buffered_write+0x5bd/0x12f0 [btrfs] [464.737] ? __pfx_btrfs_buffered_write+0x10/0x10 [btrfs] [464.745] ? __pfx_lock_release+0x10/0x10 [464.752] ? generic_write_checks+0x275/0x400 [464.759] ? down_write+0x118/0x1f0 [464.765] ? up_write+0x19b/0x500 [464.770] btrfs_direct_write+0x731/0xba0 [btrfs] [464.778] ? __pfx_btrfs_direct_write+0x10/0x10 [btrfs] [464.785] ? __pfx___might_resched+0x10/0x10 [464.792] ? lock_acquire+0x435/0x500 [464.798] ? lock_acquire+0x435/0x500 [464.804] btrfs_do_write_iter+0x494/0x640 [btrfs] [464.811] ? __pfx_btrfs_do_write_iter+0x10/0x10 [btrfs] [464.819] ? __pfx___might_resched+0x10/0x10 [464.825] ? rw_verify_area+0x6d/0x590 [464.831] vfs_write+0x5d7/0xf50 [464.837] ? __might_fault+0x9d/0x120 [464.843] ? __pfx_vfs_write+0x10/0x10 [464.849] ? btrfs_file_llseek+0xb1/0xfb0 [btrfs] [464.856] ? lock_release+0x567/0x790 [464.862] ksys_write+0xfb/0x1d0 [464.867] ? __pfx_ksys_write+0x10/0x10 [464.873] ? _raw_spin_unlock+0x23/0x40 [464.879] ? btrfs_getattr+0x4af/0x670 [btrfs] [464.886] ? vfs_getattr_nosec+0x79/0x340 [464.892] do_syscall_64+0x95/0x180 [464.898] ? __do_sys_newfstat+0xde/0xf0 [464.904] ? __pfx___do_sys_newfstat+0x10/0x10 [464.911] ? trace_irq_enable.constprop.0+0xce/0x110 [464.918] ? syscall_exit_to_user_mode+0xac/0x2a0 [464.925] ? do_syscall_64+0xa1/0x180 [464.931] ? trace_irq_enable.constprop.0+0xce/0x110 [464.939] ? trace_irq_enable.constprop.0+0xce/0x110 [464.946] ? syscall_exit_to_user_mode+0xac/0x2a0 [464.953] ? btrfs_file_llseek+0xb1/0xfb0 [btrfs] [464.960] ? do_syscall_64+0xa1/0x180 [464.966] ? btrfs_file_llseek+0xb1/0xfb0 [btrfs] [464.973] ? trace_irq_enable.constprop.0+0xce/0x110 [464.980] ? syscall_exit_to_user_mode+0xac/0x2a0 [464.987] ? __pfx_btrfs_file_llseek+0x10/0x10 [btrfs] [464.995] ? trace_irq_enable.constprop.0+0xce/0x110 [465.002] ? __pfx_btrfs_file_llseek+0x10/0x10 [btrfs] [465.010] ? do_syscall_64+0xa1/0x180 [465.016] ? lock_release+0x567/0x790 [465.022] ? __pfx_lock_acquire+0x10/0x10 [465.028] ? __pfx_lock_release+0x10/0x10 [465.034] ? trace_irq_enable.constprop.0+0xce/0x110 [465.042] ? syscall_exit_to_user_mode+0xac/0x2a0 [465.049] ? do_syscall_64+0xa1/0x180 [465.055] ? syscall_exit_to_user_mode+0xac/0x2a0 [465.062] ? do_syscall_64+0xa1/0x180 [465.068] ? syscall_exit_to_user_mode+0xac/0x2a0 [465.075] ? do_syscall_64+0xa1/0x180 [465.081] ? clear_bhb_loop+0x25/0x80 [465.087] ? clear_bhb_loop+0x25/0x80 [465.093] ? clear_bhb_loop+0x25/0x80 [465.099] entry_SYSCALL_64_after_hwframe+0x76/0x7e [465.106] RIP: 0033:0x7f093b8ee784 [465.111] RSP: 002b:00007ffc29d31b28 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [465.122] RAX: ffffffffffffffda RBX: 0000000000006000 RCX: 00007f093b8ee784 [465.131] RDX: 000000000001de00 RSI: 00007f093b6ed200 RDI: 0000000000000003 [465.141] RBP: 000000000001de00 R08: 0000000000006000 R09: 0000000000000000 [465.150] R10: 0000000000023e00 R11: 0000000000000202 R12: 0000000000006000 [465.160] R13: 0000000000023e00 R14: 0000000000023e00 R15: 0000000000000001 [465.170] [465.174] INFO: lockdep is turned off. Reported-by: Shinichiro Kawasaki Fixes: 97713b1a2ced ("btrfs: do not clear page dirty inside extent_write_locked_range()") Reviewed-by: Qu Wenruo Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit b098495e69491c2225681f43228312d32477217b Author: Yue Haibing Date: Sat Aug 3 19:32:33 2024 +0800 KVM: x86: hyper-v: Remove unused inline function kvm_hv_free_pa_page() There is no caller in tree since introduction in commit b4f69df0f65e ("KVM: x86: Make Hyper-V emulation optional") Signed-off-by: Yue Haibing Message-ID: <20240803113233.128185-1-yuehaibing@huawei.com> Signed-off-by: Paolo Bonzini commit 0ecc5be200c84e67114f3640064ba2bae3ba2f5a Author: Yuntao Wang Date: Tue Aug 13 09:48:27 2024 +0800 x86/apic: Make x2apic_disable() work correctly x2apic_disable() clears x2apic_state and x2apic_mode unconditionally, even when the state is X2APIC_ON_LOCKED, which prevents the kernel to disable it thereby creating inconsistent state. Due to the early state check for X2APIC_ON, the code path which warns about a locked X2APIC cannot be reached. Test for state < X2APIC_ON instead and move the clearing of the state and mode variables to the place which actually disables X2APIC. [ tglx: Massaged change log. Added Fixes tag. Moved clearing so it's at the right place for back ports ] Fixes: a57e456a7b28 ("x86/apic: Fix fallout from x2apic cleanup") Signed-off-by: Yuntao Wang Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240813014827.895381-1-yuntao.wang@linux.dev commit bcc954c6caba01fca143162d5fbb90e46aa1ad80 Author: Ryo Takakura Date: Mon Aug 12 16:27:03 2024 +0900 printk/panic: Allow cpu backtraces to be written into ringbuffer during panic commit 779dbc2e78d7 ("printk: Avoid non-panic CPUs writing to ringbuffer") disabled non-panic CPUs to further write messages to ringbuffer after panicked. Since the commit, non-panicked CPU's are not allowed to write to ring buffer after panicked and CPU backtrace which is triggered after panicked to sample non-panicked CPUs' backtrace no longer serves its function as it has nothing to print. Fix the issue by allowing non-panicked CPUs to write into ringbuffer while CPU backtrace is in flight. Fixes: 779dbc2e78d7 ("printk: Avoid non-panic CPUs writing to ringbuffer") Signed-off-by: Ryo Takakura Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20240812072703.339690-1-takakura@valinux.co.jp Signed-off-by: Petr Mladek commit e4956dc7a84da074fd8dc10f7abd147f15b3ae58 Author: Jens Axboe Date: Tue Aug 13 06:10:59 2024 -0600 io_uring/sqpoll: annotate debug task == current with data_race() There's a debug check in io_sq_thread_park() checking if it's the SQPOLL thread itself calling park. KCSAN warns about this, as we should not be reading sqd->thread outside of sqd->lock. Just silence this with data_race(). The pointer isn't used for anything but this debug check. Reported-by: syzbot+2b946a3fd80caf971b21@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit 810ee43d9cd245d138a2733d87a24858a23f577d Author: Phillip Lougher Date: Mon Aug 12 00:28:21 2024 +0100 Squashfs: sanity check symbolic link size Syzkiller reports a "KMSAN: uninit-value in pick_link" bug. This is caused by an uninitialised page, which is ultimately caused by a corrupted symbolic link size read from disk. The reason why the corrupted symlink size causes an uninitialised page is due to the following sequence of events: 1. squashfs_read_inode() is called to read the symbolic link from disk. This assigns the corrupted value 3875536935 to inode->i_size. 2. Later squashfs_symlink_read_folio() is called, which assigns this corrupted value to the length variable, which being a signed int, overflows producing a negative number. 3. The following loop that fills in the page contents checks that the copied bytes is less than length, which being negative means the loop is skipped, producing an uninitialised page. This patch adds a sanity check which checks that the symbolic link size is not larger than expected. -- Signed-off-by: Phillip Lougher Link: https://lore.kernel.org/r/20240811232821.13903-1-phillip@squashfs.org.uk Reported-by: Lizhi Xu Reported-by: syzbot+24ac24ff58dc5b0d26b9@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000a90e8c061e86a76b@google.com/ V2: fix spelling mistake. Signed-off-by: Christian Brauner commit e3786b29c54cdae3490b07180a54e2461f42144c Author: Dominique Martinet Date: Thu Aug 8 14:29:38 2024 +0100 9p: Fix DIO read through netfs If a program is watching a file on a 9p mount, it won't see any change in size if the file being exported by the server is changed directly in the source filesystem, presumably because 9p doesn't have change notifications, and because netfs skips the reads if the file is empty. Fix this by attempting to read the full size specified when a DIO read is requested (such as when 9p is operating in unbuffered mode) and dealing with a short read if the EOF was less than the expected read. To make this work, filesystems using netfslib must not set NETFS_SREQ_CLEAR_TAIL if performing a DIO read where that read hit the EOF. I don't want to mandatorily clear this flag in netfslib for DIO because, say, ceph might make a read from an object that is not completely filled, but does not reside at the end of file - and so we need to clear the excess. This can be tested by watching an empty file over 9p within a VM (such as in the ktest framework): while true; do read content; if [ -n "$content" ]; then echo $content; break; fi; done < /host/tmp/foo then writing something into the empty file. The watcher should immediately display the file content and break out of the loop. Without this fix, it remains in the loop indefinitely. Fixes: 80105ed2fd27 ("9p: Use netfslib read/write_iter") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218916 Signed-off-by: David Howells Link: https://lore.kernel.org/r/1229195.1723211769@warthog.procyon.org.uk cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Christian Schoenebeck cc: Marc Dionne cc: Ilya Dryomov cc: Steve French cc: Paulo Alcantara cc: Trond Myklebust cc: v9fs@lists.linux.dev cc: linux-afs@lists.infradead.org cc: ceph-devel@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Dominique Martinet Signed-off-by: Christian Brauner commit 2a0629834cd82f05d424bbc193374f9a43d1f87d Author: Zhihao Cheng Date: Fri Aug 9 11:16:28 2024 +0800 vfs: Don't evict inode under the inode lru traversing context The inode reclaiming process(See function prune_icache_sb) collects all reclaimable inodes and mark them with I_FREEING flag at first, at that time, other processes will be stuck if they try getting these inodes (See function find_inode_fast), then the reclaiming process destroy the inodes by function dispose_list(). Some filesystems(eg. ext4 with ea_inode feature, ubifs with xattr) may do inode lookup in the inode evicting callback function, if the inode lookup is operated under the inode lru traversing context, deadlock problems may happen. Case 1: In function ext4_evict_inode(), the ea inode lookup could happen if ea_inode feature is enabled, the lookup process will be stuck under the evicting context like this: 1. File A has inode i_reg and an ea inode i_ea 2. getfattr(A, xattr_buf) // i_ea is added into lru // lru->i_ea 3. Then, following three processes running like this: PA PB echo 2 > /proc/sys/vm/drop_caches shrink_slab prune_dcache_sb // i_reg is added into lru, lru->i_ea->i_reg prune_icache_sb list_lru_walk_one inode_lru_isolate i_ea->i_state |= I_FREEING // set inode state inode_lru_isolate __iget(i_reg) spin_unlock(&i_reg->i_lock) spin_unlock(lru_lock) rm file A i_reg->nlink = 0 iput(i_reg) // i_reg->nlink is 0, do evict ext4_evict_inode ext4_xattr_delete_inode ext4_xattr_inode_dec_ref_all ext4_xattr_inode_iget ext4_iget(i_ea->i_ino) iget_locked find_inode_fast __wait_on_freeing_inode(i_ea) ----→ AA deadlock dispose_list // cannot be executed by prune_icache_sb wake_up_bit(&i_ea->i_state) Case 2: In deleted inode writing function ubifs_jnl_write_inode(), file deleting process holds BASEHD's wbuf->io_mutex while getting the xattr inode, which could race with inode reclaiming process(The reclaiming process could try locking BASEHD's wbuf->io_mutex in inode evicting function), then an ABBA deadlock problem would happen as following: 1. File A has inode ia and a xattr(with inode ixa), regular file B has inode ib and a xattr. 2. getfattr(A, xattr_buf) // ixa is added into lru // lru->ixa 3. Then, following three processes running like this: PA PB PC echo 2 > /proc/sys/vm/drop_caches shrink_slab prune_dcache_sb // ib and ia are added into lru, lru->ixa->ib->ia prune_icache_sb list_lru_walk_one inode_lru_isolate ixa->i_state |= I_FREEING // set inode state inode_lru_isolate __iget(ib) spin_unlock(&ib->i_lock) spin_unlock(lru_lock) rm file B ib->nlink = 0 rm file A iput(ia) ubifs_evict_inode(ia) ubifs_jnl_delete_inode(ia) ubifs_jnl_write_inode(ia) make_reservation(BASEHD) // Lock wbuf->io_mutex ubifs_iget(ixa->i_ino) iget_locked find_inode_fast __wait_on_freeing_inode(ixa) | iput(ib) // ib->nlink is 0, do evict | ubifs_evict_inode | ubifs_jnl_delete_inode(ib) ↓ ubifs_jnl_write_inode ABBA deadlock ←-----make_reservation(BASEHD) dispose_list // cannot be executed by prune_icache_sb wake_up_bit(&ixa->i_state) Fix the possible deadlock by using new inode state flag I_LRU_ISOLATING to pin the inode in memory while inode_lru_isolate() reclaims its pages instead of using ordinary inode reference. This way inode deletion cannot be triggered from inode_lru_isolate() thus avoiding the deadlock. evict() is made to wait for I_LRU_ISOLATING to be cleared before proceeding with inode cleanup. Link: https://lore.kernel.org/all/37c29c42-7685-d1f0-067d-63582ffac405@huaweicloud.com/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=219022 Fixes: e50e5129f384 ("ext4: xattr-in-inode support") Fixes: 7959cf3a7506 ("ubifs: journal: Handle xattrs like files") Cc: stable@vger.kernel.org Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20240809031628.1069873-1-chengzhihao@huaweicloud.com Reviewed-by: Jan Kara Suggested-by: Jan Kara Suggested-by: Mateusz Guzik Signed-off-by: Christian Brauner commit 7a636b4f03af9d541205f69e373672e7b2b60a8a Author: Khazhismel Kumykov Date: Tue Aug 13 12:39:52 2024 +0200 dm resume: don't return EINVAL when signalled If the dm_resume method is called on a device that is not suspended, the method will suspend the device briefly, before resuming it (so that the table will be swapped). However, there was a bug that the return value of dm_suspended_md was not checked. dm_suspended_md may return an error when it is interrupted by a signal. In this case, do_resume would call dm_swap_table, which would return -EINVAL. This commit fixes the logic, so that error returned by dm_suspend is checked and the resume operation is undone. Signed-off-by: Mikulas Patocka Signed-off-by: Khazhismel Kumykov Cc: stable@vger.kernel.org commit 1e1fd567d32fcf7544c6e09e0e5bc6c650da6e23 Author: Mikulas Patocka Date: Tue Aug 13 12:38:51 2024 +0200 dm suspend: return -ERESTARTSYS instead of -EINTR This commit changes device mapper, so that it returns -ERESTARTSYS instead of -EINTR when it is interrupted by a signal (so that the ioctl can be restarted). The manpage signal(7) says that the ioctl function should be restarted if the signal was handled with SA_RESTART. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org commit 46a6e10a1ab16cc71d4a3cab73e79aabadd6b8ea Author: Filipe Manana Date: Mon Aug 12 14:18:06 2024 +0100 btrfs: send: allow cloning non-aligned extent if it ends at i_size If we a find that an extent is shared but its end offset is not sector size aligned, then we don't clone it and issue write operations instead. This is because the reflink (remap_file_range) operation does not allow to clone unaligned ranges, except if the end offset of the range matches the i_size of the source and destination files (and the start offset is sector size aligned). While this is not incorrect because send can only guarantee that a file has the same data in the source and destination snapshots, it's not optimal and generates confusion and surprising behaviour for users. For example, running this test: $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV mount $DEV $MNT # Use a file size not aligned to any possible sector size. file_size=$((1 * 1024 * 1024 + 5)) # 1MB + 5 bytes dd if=/dev/random of=$MNT/foo bs=$file_size count=1 cp --reflink=always $MNT/foo $MNT/bar btrfs subvolume snapshot -r $MNT/ $MNT/snap rm -f /tmp/send-test btrfs send -f /tmp/send-test $MNT/snap umount $MNT mkfs.btrfs -f $DEV mount $DEV $MNT btrfs receive -vv -f /tmp/send-test $MNT xfs_io -r -c "fiemap -v" $MNT/snap/bar umount $MNT Gives the following result: (...) mkfile o258-7-0 rename o258-7-0 -> bar write bar - offset=0 length=49152 write bar - offset=49152 length=49152 write bar - offset=98304 length=49152 write bar - offset=147456 length=49152 write bar - offset=196608 length=49152 write bar - offset=245760 length=49152 write bar - offset=294912 length=49152 write bar - offset=344064 length=49152 write bar - offset=393216 length=49152 write bar - offset=442368 length=49152 write bar - offset=491520 length=49152 write bar - offset=540672 length=49152 write bar - offset=589824 length=49152 write bar - offset=638976 length=49152 write bar - offset=688128 length=49152 write bar - offset=737280 length=49152 write bar - offset=786432 length=49152 write bar - offset=835584 length=49152 write bar - offset=884736 length=49152 write bar - offset=933888 length=49152 write bar - offset=983040 length=49152 write bar - offset=1032192 length=16389 chown bar - uid=0, gid=0 chmod bar - mode=0644 utimes bar utimes BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=06d640da-9ca1-604c-b87c-3375175a8eb3, stransid=7 /mnt/sdi/snap/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2055]: 26624..28679 2056 0x1 There's no clone operation to clone extents from the file foo into file bar and fiemap confirms there's no shared flag (0x2000). So update send_write_or_clone() so that it proceeds with cloning if the source and destination ranges end at the i_size of the respective files. After this changes the result of the test is: (...) mkfile o258-7-0 rename o258-7-0 -> bar clone bar - source=foo source offset=0 offset=0 length=1048581 chown bar - uid=0, gid=0 chmod bar - mode=0644 utimes bar utimes BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=582420f3-ea7d-564e-bbe5-ce440d622190, stransid=7 /mnt/sdi/snap/bar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..2055]: 26624..28679 2056 0x2001 A test case for fstests will also follow up soon. Link: https://github.com/kdave/btrfs-progs/issues/572#issuecomment-2282841416 CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 71bf41b8e913ec9fc91f0d39ab8fb320229ec604 Author: Rafael J. Wysocki Date: Mon Aug 12 15:16:21 2024 +0200 ACPI: EC: Evaluate _REG outside the EC scope more carefully Commit 60fa6ae6e6d0 ("ACPI: EC: Install address space handler at the namespace root") caused _REG methods for EC operation regions outside the EC device scope to be evaluated which on some systems leads to the evaluation of _REG methods in the scopes of device objects representing devices that are not present and not functional according to the _STA return values. Some of those device objects represent EC "alternatives" and if _REG is evaluated for their operation regions, the platform firmware may be confused and the platform may start to behave incorrectly. To avoid this problem, only evaluate _REG for EC operation regions located in the scopes of device objects representing known-to-be-present devices. For this purpose, partially revert commit 60fa6ae6e6d0 and trigger the evaluation of _REG for EC operation regions from acpi_bus_attach() for the known-valid devices. Fixes: 60fa6ae6e6d0 ("ACPI: EC: Install address space handler at the namespace root") Link: https://lore.kernel.org/linux-acpi/1f76b7e2-1928-4598-8037-28a1785c2d13@redhat.com Link: https://bugzilla.redhat.com/show_bug.cgi?id=2298938 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2302253 Reported-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Cc: All applicable Link: https://patch.msgid.link/23612351.6Emhk5qWAg@rjwysocki.net commit cdf65d73e001fde600b18d7e45afadf559425ce5 Author: Rafael J. Wysocki Date: Mon Aug 12 15:11:42 2024 +0200 ACPICA: Add a depth argument to acpi_execute_reg_methods() A subsequent change will need to pass a depth argument to acpi_execute_reg_methods(), so prepare that function for it. No intentional functional changes. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Cc: All applicable Link: https://patch.msgid.link/8451567.NyiUUSuA9g@rjwysocki.net commit 5d61841c74db8b5bbbf9403f1bd4879f614617d2 Author: Sean Anderson Date: Fri Aug 9 16:15:39 2024 -0400 spi: zynqmp-gqspi: Scale timeout by data size Large blocks of data time out when reading because we don't wait long enough for the transfer to complete. Scale our timeouts based on the amount of data we are tranferring, with a healthy dose of pessimism. Signed-off-by: Sean Anderson Link: https://patch.msgid.link/20240809201540.3363243-1-sean.anderson@linux.dev Signed-off-by: Mark Brown commit 779bac9994452f6a894524f70c00cfb0cd4b6364 Author: Rafael J. Wysocki Date: Mon Aug 12 15:08:04 2024 +0200 Revert "ACPI: EC: Evaluate orphan _REG under EC device" This reverts commit 0e6b6dedf168 ("Revert "ACPI: EC: Evaluate orphan _REG under EC device") because the problem addressed by it will be addressed differently in what follows. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Cc: All applicable Link: https://patch.msgid.link/3236716.5fSG56mABF@rjwysocki.net commit ae1e766f623f7a2a889a0b09eb076dd9a60efbe9 Author: Filipe Manana Date: Sun Aug 11 11:53:42 2024 +0100 btrfs: only run the extent map shrinker from kswapd tasks Currently the extent map shrinker can be run by any task when attempting to allocate memory and there's enough memory pressure to trigger it. To avoid too much latency we stop iterating over extent maps and removing them once the task needs to reschedule. This logic was introduced in commit b3ebb9b7e92a ("btrfs: stop extent map shrinker if reschedule is needed"). While that solved high latency problems for some use cases, it's still not enough because with a too high number of tasks entering the extent map shrinker code, either due to memory allocations or because they are a kswapd task, we end up having a very high level of contention on some spin locks, namely: 1) The fs_info->fs_roots_radix_lock spin lock, which we need to find roots to iterate over their inodes; 2) The spin lock of the xarray used to track open inodes for a root (struct btrfs_root::inodes) - on 6.10 kernels and below, it used to be a red black tree and the spin lock was root->inode_lock; 3) The fs_info->delayed_iput_lock spin lock since the shrinker adds delayed iputs (calls btrfs_add_delayed_iput()). Instead of allowing the extent map shrinker to be run by any task, make it run only by kswapd tasks. This still solves the problem of running into OOM situations due to an unbounded extent map creation, which is simple to trigger by direct IO writes, as described in the changelog of commit 956a17d9d050 ("btrfs: add a shrinker for extent maps"), and by a similar case when doing buffered IO on files with a very large number of holes (keeping the file open and creating many holes, whose extent maps are only released when the file is closed). Reported-by: kzd Link: https://bugzilla.kernel.org/show_bug.cgi?id=219121 Reported-by: Octavia Togami Link: https://lore.kernel.org/linux-btrfs/CAHPNGSSt-a4ZZWrtJdVyYnJFscFjP9S7rMcvEMaNSpR556DdLA@mail.gmail.com/ Fixes: 956a17d9d050 ("btrfs: add a shrinker for extent maps") CC: stable@vger.kernel.org # 6.10+ Tested-by: kzd Tested-by: Octavia Togami Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8475a1d9bb7acf1cb15842dd24baab0e8ea4e4ff Author: Richard Fitzgerald Date: Tue Aug 13 12:32:09 2024 +0100 ALSA: hda: cs35l41: Remove redundant call to hda_cs_dsp_control_remove() The driver doesn't create any ALSA controls for firmware controls, so it shouldn't be calling hda_cs_dsp_control_remove(). commit 312c04cee408 ("ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients") removed the call to hda_cs_dsp_add_controls() but didn't remove the call for destroying those controls. Signed-off-by: Richard Fitzgerald Fixes: 312c04cee408 ("ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients") Link: https://patch.msgid.link/20240813113209.648-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 31723c9542dba1681cc3720571fdf12ffe0eddd9 Author: Qu Wenruo Date: Mon Aug 12 08:52:44 2024 +0930 btrfs: tree-checker: reject BTRFS_FT_UNKNOWN dir type [REPORT] There is a bug report that kernel is rejecting a mismatching inode mode and its dir item: [ 1881.553937] BTRFS critical (device dm-0): inode mode mismatch with dir: inode mode=040700 btrfs type=2 dir type=0 [CAUSE] It looks like the inode mode is correct, while the dir item type 0 is BTRFS_FT_UNKNOWN, which should not be generated by btrfs at all. This may be caused by a memory bit flip. [ENHANCEMENT] Although tree-checker is not able to do any cross-leaf verification, for this particular case we can at least reject any dir type with BTRFS_FT_UNKNOWN. So here we enhance the dir type check from [0, BTRFS_FT_MAX), to (0, BTRFS_FT_MAX). Although the existing corruption can not be fixed just by such enhanced checking, it should prevent the same 0x2->0x0 bitflip for dir type to reach disk in the future. Reported-by: Kota Link: https://lore.kernel.org/linux-btrfs/CACsxjPYnQF9ZF-0OhH16dAx50=BXXOcP74MxBc3BG+xae4vTTw@mail.gmail.com/ CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 42fac187b5c746227c92d024f1caf33bc1d337e4 Author: Josef Bacik Date: Thu Apr 11 16:41:20 2024 -0400 btrfs: check delayed refs when we're checking if a ref exists In the patch 78c52d9eb6b7 ("btrfs: check for refs on snapshot delete resume") I added some code to handle file systems that had been corrupted by a bug that incorrectly skipped updating the drop progress key while dropping a snapshot. This code would check to see if we had already deleted our reference for a child block, and skip the deletion if we had already. Unfortunately there is a bug, as the check would only check the on-disk references. I made an incorrect assumption that blocks in an already deleted snapshot that was having the deletion resume on mount wouldn't be modified. If we have 2 pending deleted snapshots that share blocks, we can easily modify the rules for a block. Take the following example subvolume a exists, and subvolume b is a snapshot of subvolume a. They share references to block 1. Block 1 will have 2 full references, one for subvolume a and one for subvolume b, and it belongs to subvolume a (btrfs_header_owner(block 1) == subvolume a). When deleting subvolume a, we will drop our full reference for block 1, and because we are the owner we will drop our full reference for all of block 1's children, convert block 1 to FULL BACKREF, and add a shared reference to all of block 1's children. Then we will start the snapshot deletion of subvolume b. We look up the extent info for block 1, which checks delayed refs and tells us that FULL BACKREF is set, so sets parent to the bytenr of block 1. However because this is a resumed snapshot deletion, we call into check_ref_exists(). Because check_ref_exists() only looks at the disk, it doesn't find the shared backref for the child of block 1, and thus returns 0 and we skip deleting the reference for the child of block 1 and continue. This orphans the child of block 1. The fix is to lookup the delayed refs, similar to what we do in btrfs_lookup_extent_info(). However we only care about whether the reference exists or not. If we fail to find our reference on disk, go look up the bytenr in the delayed refs, and if it exists look for an existing ref in the delayed ref head. If that exists then we know we can delete the reference safely and carry on. If it doesn't exist we know we have to skip over this block. This bug has existed since I introduced this fix, however requires having multiple deleted snapshots pending when we unmount. We noticed this in production because our shutdown path stops the container on the system, which deletes a bunch of subvolumes, and then reboots the box. This gives us plenty of opportunities to hit this issue. Looking at the history we've seen this occasionally in production, but we had a big spike recently thanks to faster machines getting jobs with multiple subvolumes in the job. Chris Mason wrote a reproducer which does the following mount /dev/nvme4n1 /btrfs btrfs subvol create /btrfs/s1 simoop -E -f 4k -n 200000 -z /btrfs/s1 while(true) ; do btrfs subvol snap /btrfs/s1 /btrfs/s2 simoop -f 4k -n 200000 -r 10 -z /btrfs/s2 btrfs subvol snap /btrfs/s2 /btrfs/s3 btrfs balance start -dusage=80 /btrfs btrfs subvol del /btrfs/s2 /btrfs/s3 umount /btrfs btrfsck /dev/nvme4n1 || exit 1 mount /dev/nvme4n1 /btrfs done On the second loop this would fail consistently, with my patch it has been running for hours and hasn't failed. I also used dm-log-writes to capture the state of the failure so I could debug the problem. Using the existing failure case to test my patch validated that it fixes the problem. Fixes: 78c52d9eb6b7 ("btrfs: check for refs on snapshot delete resume") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit b919a27fab37e108164d657ac6e77bf870bf95e6 Author: Krzysztof Kozlowski Date: Tue Jul 30 12:35:11 2024 +0200 ASoC: MAINTAINERS: Drop Banajit Goswami from Qualcomm sound drivers There was no active maintenance from Banajit Goswami - last email is from 2019 - so make obvious that Qualcomm sound drivers are maintained by only one person. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240730103511.21728-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 897e91e995b338002b00454fd0018af26a098148 Author: Vijendar Mukunda Date: Tue Aug 13 16:29:44 2024 +0530 ASoC: SOF: amd: Fix for incorrect acp error register offsets Addition of 'dsp_intr_base' to ACP error register offsets points to wrong register offsets in irq handler. Correct the acp error register offsets. ACP error status register offset and acp error reason register offset got changed from ACP6.0 onwards. Add 'acp_error_stat' and 'acp_sw0_i2s_err_reason' as descriptor fields in sof_amd_acp_desc structure and update the values based on the ACP variant. >From Rembrandt platform onwards, errors related to SW1 Soundwire manager instance/I2S controller connected on P1 power tile is reported with ACP_SW1_I2S_ERROR_REASON register. Add conditional check for the same. Fixes: 96eb81851012 ("ASoC: SOF: amd: add interrupt handling for SoundWire manager devices") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240813105944.3126903-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit c56ba3e44784527fd6efe5eb7a4fa6c9f6969a58 Author: Vijendar Mukunda Date: Tue Aug 13 16:29:43 2024 +0530 ASoC: SOF: amd: move iram-dram fence register programming sequence The existing code modifies IRAM and DRAM size after sha dma start for vangogh platform. The problem with this sequence is that it might cause sha dma failure when firmware code binary size is greater than the default IRAM size. To fix this issue, Move the iram-dram fence register sequence prior to sha dma start. Fixes: 094d11768f74 ("ASoC: SOF: amd: Skip IRAM/DRAM size modification for Steam Deck OLED") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240813105944.3126903-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 12d82c7b0a612372f594e4ff00983a1da3a1d929 Author: Richard Fitzgerald Date: Tue Aug 13 12:07:50 2024 +0100 ALSA: hda: cs35l56: Remove redundant call to hda_cs_dsp_control_remove() The driver doesn't create any ALSA controls for firmware controls, so it shouldn't be calling hda_cs_dsp_control_remove(). commit 34e1b1bb7324 ("ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients") removed the call to hda_cs_dsp_add_controls() but didn't remove the call for destroying those controls. Signed-off-by: Richard Fitzgerald Fixes: 34e1b1bb7324 ("ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients") Link: https://patch.msgid.link/20240813110750.2814-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 58a63729c957621f1990c3494c702711188ca347 Author: Long Li Date: Fri Aug 9 08:58:58 2024 -0700 net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings After napi_complete_done() is called when NAPI is polling in the current process context, another NAPI may be scheduled and start running in softirq on another CPU and may ring the doorbell before the current CPU does. When combined with unnecessary rings when there is no need to arm the CQ, it triggers error paths in the hardware. This patch fixes this by calling napi_complete_done() after doorbell rings. It limits the number of unnecessary rings when there is no need to arm. MANA hardware specifies that there must be one doorbell ring every 8 CQ wraparounds. This driver guarantees one doorbell ring as soon as the number of consumed CQEs exceeds 4 CQ wraparounds. In practical workloads, the 4 CQ wraparounds proves to be big enough that it rarely exceeds this limit before all the napi weight is consumed. To implement this, add a per-CQ counter cq->work_done_since_doorbell, and make sure the CQ is armed as soon as passing 4 wraparounds of the CQ. Cc: stable@vger.kernel.org Fixes: e1b5683ff62e ("net: mana: Move NAPI from EQ to CQ") Reviewed-by: Haiyang Zhang Signed-off-by: Long Li Link: https://patch.msgid.link/1723219138-29887-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Paolo Abeni commit cd2d00606553e631e9b5d11cca7da38fc95433e6 Author: Dan Carpenter Date: Wed Jun 12 14:50:39 2024 +0300 KVM: SVM: Fix an error code in sev_gmem_post_populate() The copy_from_user() function returns the number of bytes which it was not able to copy. Return -EFAULT instead. Fixes: dee5a47cc7a4 ("KVM: SEV: Add KVM_SEV_SNP_LAUNCH_UPDATE command") Signed-off-by: Dan Carpenter Message-ID: <20240612115040.2423290-4-dan.carpenter@linaro.org> Signed-off-by: Paolo Bonzini commit 696eb24ac2af632ddcb422114b2d8498af1de20c Merge: 747cfbf161a5b cff59d8631e14 Author: Paolo Bonzini Date: Tue Aug 13 06:07:03 2024 -0400 Merge tag 'kvm-s390-master-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD Fix invalid gisa designation value when gisa is not in use. Panic if (un)share fails to maintain security. commit 747cfbf161a5bc292ce194bfce6ab1a2d5e60b40 Merge: 92b6c2f0076c5 9eb18136af9fe Author: Paolo Bonzini Date: Tue Aug 13 06:06:27 2024 -0400 Merge tag 'kvmarm-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.11, round #1 - Use kvfree() for the kvmalloc'd nested MMUs array - Set of fixes to address warnings in W=1 builds - Make KVM depend on assembler support for ARMv8.4 - Fix for vgic-debug interface for VMs without LPIs - Actually check ID_AA64MMFR3_EL1.S1PIE in get-reg-list selftest - Minor code / comment cleanups for configuring PAuth traps - Take kvm->arch.config_lock to prevent destruction / initialization race for a vCPU's CPUIF which may lead to a UAF commit 92b6c2f0076c50aaa919d16b595f34f3e9967bea Author: Dan Carpenter Date: Wed Jun 12 14:50:38 2024 +0300 KVM: SVM: Fix uninitialized variable bug If snp_lookup_rmpentry() fails then "assigned" is printed in the error message but it was never initialized. Initialize it to false. Fixes: dee5a47cc7a4 ("KVM: SEV: Add KVM_SEV_SNP_LAUNCH_UPDATE command") Signed-off-by: Dan Carpenter Message-ID: <20240612115040.2423290-3-dan.carpenter@linaro.org> Signed-off-by: Paolo Bonzini commit e37a9184f27084b891d3617723b9410f8fcaff99 Merge: 38c8d02501c09 38055789d1515 Author: Kalle Valo Date: Tue Aug 13 12:51:21 2024 +0300 Merge tag 'ath-current-20240812' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath ath.git patch for v6.11 We have a single patch for the next 6.11-rc which introduces a workaround to ath12k which addresses a WCN7850 hardware issue that prevents proper operation with unaligned transmit buffers. commit 38c8d02501c09454e4fbf0f67de03de35e94d384 Author: Benjamin Berg Date: Mon Aug 12 13:06:40 2024 +0200 wifi: iwlwifi: correctly lookup DMA address in SG table The code to lookup the scatter gather table entry assumed that it was possible to use sg_virt() in order to lookup the DMA address in a mapped scatter gather table. However, this assumption is incorrect as the DMA mapping code may merge multiple entries into one. In that case, the DMA address space may have e.g. two consecutive pages which is correctly represented by the scatter gather list entry, however the virtual addresses for these two pages may differ and the relationship cannot be resolved anymore. Avoid this problem entirely by working with the offset into the mapped area instead of using virtual addresses. With that we only use the DMA length and DMA address from the scatter gather list entries. The underlying DMA/IOMMU code is therefore free to merge two entries into one even if the virtual addresses space for the area is not continuous. Fixes: 90db50755228 ("wifi: iwlwifi: use already mapped data when TXing an AMSDU") Reported-by: Chris Bainbridge Closes: https://lore.kernel.org/r/ZrNRoEbdkxkKFMBi@debian.local Signed-off-by: Benjamin Berg Tested-by: Chris Bainbridge Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240812110640.460514-1-benjamin@sipsolutions.net commit 479ffee68d59c599f8aed8fa2dcc8e13e7bd13c3 Author: Bert Karwatzki Date: Mon Aug 12 12:45:41 2024 +0200 wifi: mt76: mt7921: fix NULL pointer access in mt7921_ipv6_addr_change When disabling wifi mt7921_ipv6_addr_change() is called as a notifier. At this point mvif->phy is already NULL so we cannot use it here. Signed-off-by: Bert Karwatzki Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240812104542.80760-1-spasswolf@web.de commit cdd1fa91a6b8c7cd93b3abf9f3ef05b8ce741b61 Author: Bart Van Assche Date: Mon Aug 5 16:20:21 2024 -0700 mips: sgi-ip22: Fix the build Fix a recently introduced build failure. Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240805232026.65087-3-bvanassche@acm.org Signed-off-by: Greg Kroah-Hartman commit abfceba0a7a246ac082bf569807738ff7416f59f Author: Bart Van Assche Date: Mon Aug 5 16:20:20 2024 -0700 ARM: riscpc: ecard: Fix the build Fix a recently introduced build failure. Cc: Russell King Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240805232026.65087-2-bvanassche@acm.org Signed-off-by: Greg Kroah-Hartman commit c9f6613b16123989f2c3bd04b1d9b2365d6914e7 Author: Mathieu Othacehe Date: Thu Aug 8 08:06:37 2024 +0200 tty: atmel_serial: use the correct RTS flag. In RS485 mode, the RTS pin is driven high by hardware when the transmitter is operating. This behaviour cannot be changed. This means that the driver should claim that it supports SER_RS485_RTS_ON_SEND and not SER_RS485_RTS_AFTER_SEND. Otherwise, when configuring the port with the SER_RS485_RTS_ON_SEND, one get the following warning: kern.warning kernel: atmel_usart_serial atmel_usart_serial.2.auto: ttyS1 (1): invalid RTS setting, using RTS_AFTER_SEND instead which is contradictory with what's really happening. Signed-off-by: Mathieu Othacehe Cc: stable Tested-by: Alexander Dahl Fixes: af47c491e3c7 ("serial: atmel: Fill in rs485_supported") Link: https://lore.kernel.org/r/20240808060637.19886-1-othacehe@gnu.org Signed-off-by: Greg Kroah-Hartman commit 7258fdd7d7459616b3fe1a603e33900584b10c13 Author: Masahiro Yamada Date: Sat Aug 10 01:07:20 2024 +0900 tty: vt: conmakehash: remove non-portable code printing comment header Commit 6e20753da6bc ("tty: vt: conmakehash: cope with abs_srctree no longer in env") included , which invoked another (wrong) patch that tried to address a build error on macOS. According to the specification [1], the correct header to use PATH_MAX is . The minimal fix would be to replace with . However, the following commits seem questionable to me: - 3bd85c6c97b2 ("tty: vt: conmakehash: Don't mention the full path of the input in output") - 6e20753da6bc ("tty: vt: conmakehash: cope with abs_srctree no longer in env") These commits made too many efforts to cope with a comment header in drivers/tty/vt/consolemap_deftbl.c: /* * Do not edit this file; it was automatically generated by * * conmakehash drivers/tty/vt/cp437.uni > [this file] * */ With this commit, the header part of the generate C file will be simplified as follows: /* * Automatically generated file; Do not edit. */ BTW, another series of excessive efforts for a comment header can be seen in the following: - 5ef6dc08cfde ("lib/build_OID_registry: don't mention the full path of the script in output") - 2fe29fe94563 ("lib/build_OID_registry: avoid non-destructive substitution for Perl < 5.13.2 compat") [1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html Fixes: 6e20753da6bc ("tty: vt: conmakehash: cope with abs_srctree no longer in env") Cc: stable Reported-by: Daniel Gomez Closes: https://lore.kernel.org/all/20240807-macos-build-support-v1-11-4cd1ded85694@samsung.com/ Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20240809160853.1269466-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit dc98d76a15bc29a9a4e76f2f65f39f3e590fb15c Author: Peng Fan Date: Thu Aug 8 22:03:25 2024 +0800 tty: serial: fsl_lpuart: mark last busy before uart_add_one_port With "earlycon initcall_debug=1 loglevel=8" in bootargs, kernel sometimes boot hang. It is because normal console still is not ready, but runtime suspend is called, so early console putchar will hang in waiting TRDE set in UARTSTAT. The lpuart driver has auto suspend delay set to 3000ms, but during uart_add_one_port, a child device serial ctrl will added and probed with its pm runtime enabled(see serial_ctrl.c). The runtime suspend call path is: device_add |-> bus_probe_device |->device_initial_probe |->__device_attach |-> pm_runtime_get_sync(dev->parent); |-> pm_request_idle(dev); |-> pm_runtime_put(dev->parent); So in the end, before normal console ready, the lpuart get runtime suspended. And earlycon putchar will hang. To address the issue, mark last busy just after pm_runtime_enable, three seconds is long enough to switch from bootconsole to normal console. Fixes: 43543e6f539b ("tty: serial: fsl_lpuart: Add runtime pm support") Cc: stable Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20240808140325.580105-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 92567a5f92bc947fb7aa4351979db1b7b71a554c Author: Yue Haibing Date: Thu Aug 8 22:06:19 2024 +0800 iommu: Remove unused declaration iommu_sva_unbind_gpasid() Commit 0c9f17877891 ("iommu: Remove guest pasid related interfaces and definitions") removed the implementation but leave declaration. Signed-off-by: Yue Haibing Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240808140619.2498535-1-yuehaibing@huawei.com Signed-off-by: Joerg Roedel commit f149be46e4c13e277e013c0fff13cb2aa7a4399c Author: Frank Li Date: Wed Aug 7 10:52:09 2024 -0400 arm64: dts: imx8mm-phygate: fix typo pinctrcl-0 Fix typo pinctrcl-0 with pinctrl-0. Fix below warning: arch/arm64/boot/dts/freescale/imx8mm-phygate-tauri-l-rs232-rs485.dtb: gpio@30220000: 'pinctrl-0' is a dependency of 'pinctrl-names' from schema $id: http://devicetree.org/schemas/pinctrl/pinctrl-consumer.yaml# arch/arm64/boot/dts/freescale/imx8mm-phygate-tauri-l-rs232-rs485.dtb: uart4_rs485_en: $nodename:0: 'uart4_rs485_en' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$ Fixes: 8d97083c0b5d ("arm64: dts: phygate-tauri-l: add overlays for RS232 and RS485") Reviewed-by: Teresa Remmet Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 3ed486e383ccee9b0c8d727608f12a937c6603ca Author: Hans de Goede Date: Mon Aug 12 11:50:38 2024 +0200 usb: misc: ljca: Add Lunar Lake ljca GPIO HID to ljca_gpio_hids[] Add LJCA GPIO support for the Lunar Lake platform. New HID taken from out of tree ivsc-driver git repo. Link: https://github.com/intel/ivsc-driver/commit/47e7c4a446c8ea8c741ff5a32fa7b19f9e6fd47e Cc: stable Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240812095038.555837-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 21ea1ce37fc267dc45fe27517bbde926211683df Author: Xu Yang Date: Fri Aug 9 19:29:01 2024 +0800 Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET" This reverts commit bf20c69cf3cf9c6445c4925dd9a8a6ca1b78bfdf. During tcpm_init() stage, if the VBUS is still present after tcpm_reset_port(), then we assume that VBUS will off and goto safe0v after a specific discharge time. Following a TCPM_VBUS_EVENT event if VBUS reach to off state. TCPM_VBUS_EVENT event may be set during PORT_RESET handling stage. If pd_events reset to 0 after TCPM_VBUS_EVENT set, we will lost this VBUS event. Then the port state machine may stuck at one state. Before: [ 2.570172] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev1 NONE_AMS] [ 2.570179] state change PORT_RESET -> PORT_RESET_WAIT_OFF [delayed 100 ms] [ 2.570182] pending state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED @ 920 ms [rev1 NONE_AMS] [ 3.490213] state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED [delayed 920 ms] [ 3.490220] Start toggling [ 3.546050] CC1: 0 -> 0, CC2: 0 -> 2 [state TOGGLING, polarity 0, connected] [ 3.546057] state change TOGGLING -> SRC_ATTACH_WAIT [rev1 NONE_AMS] After revert this patch, we can see VBUS off event and the port will goto expected state. [ 2.441992] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev1 NONE_AMS] [ 2.441999] state change PORT_RESET -> PORT_RESET_WAIT_OFF [delayed 100 ms] [ 2.442002] pending state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED @ 920 ms [rev1 NONE_AMS] [ 2.442122] VBUS off [ 2.442125] state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED [rev1 NONE_AMS] [ 2.442127] VBUS VSAFE0V [ 2.442351] CC1: 0 -> 0, CC2: 0 -> 0 [state SNK_UNATTACHED, polarity 0, disconnected] [ 2.442357] Start toggling [ 2.491850] CC1: 0 -> 0, CC2: 0 -> 2 [state TOGGLING, polarity 0, connected] [ 2.491858] state change TOGGLING -> SRC_ATTACH_WAIT [rev1 NONE_AMS] [ 2.491863] pending state change SRC_ATTACH_WAIT -> SNK_TRY @ 200 ms [rev1 NONE_AMS] [ 2.691905] state change SRC_ATTACH_WAIT -> SNK_TRY [delayed 200 ms] Fixes: bf20c69cf3cf ("usb: typec: tcpm: clear pd_event queue in PORT_RESET") Cc: stable@vger.kernel.org Signed-off-by: Xu Yang Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240809112901.535072-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit d209d1634e6562eafc369b28f8a1f67a2e9e5222 Author: Heikki Krogerus Date: Fri Aug 9 18:03:43 2024 +0300 usb: typec: ucsi: Fix the return value of ucsi_run_command() The command execution routines need to return the amount of data that was transferred when succesful. This fixes an issue where the alternate modes and the power delivery capabilities are not getting registered. Fixes: 5e9c1662a89b ("usb: typec: ucsi: rework command execution functions") Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240809150343.286942-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 741b41b48faf41c0bcf3c26fbb3448b0fda4fc5d Author: Niklas Neronin Date: Fri Aug 9 15:44:08 2024 +0300 usb: xhci: fix duplicate stall handling in handle_tx_event() Stall handling is managed in the 'process_*' functions, which are called right before the 'goto' stall handling code snippet. Thus, there should be a return after the 'process_*' functions. Otherwise, the stall code may run twice. Fixes: 1b349f214ac7 ("usb: xhci: add 'goto' for halted endpoint check in handle_tx_event()") Reported-by: Michal Pecio Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240809124408.505786-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dcdb52d948f3a17ccd3fce757d9bd981d7c32039 Author: Marc Zyngier Date: Fri Aug 9 15:44:07 2024 +0300 usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup() If xhci_mem_init() fails, it calls into xhci_mem_cleanup() to mop up the damage. If it fails early enough, before xhci->interrupters is allocated but after xhci->max_interrupters has been set, which happens in most (all?) cases, things get uglier, as xhci_mem_cleanup() unconditionally derefences xhci->interrupters. With prejudice. Gate the interrupt freeing loop with a check on xhci->interrupters being non-NULL. Found while debugging a DMA allocation issue that led the XHCI driver on this exact path. Fixes: c99b38c41234 ("xhci: add support to allocate several interrupters") Cc: Mathias Nyman Cc: Wesley Cheng Cc: Greg Kroah-Hartman Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org # 6.8+ Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240809124408.505786-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2185b4b72017e47fc8e0daa6bba4d4cb662c48f7 Merge: 7c626ce4bae1a e2006140ad2e0 Author: Greg Kroah-Hartman Date: Tue Aug 13 10:22:34 2024 +0200 Merge tag 'thunderbolt-for-v6.11-rc3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus thunderbolt: Fixes for v6.11-rc3 This includes following USB4/Thunderbolt fixes for v6.11-rc3: - Fix memory leak in debugfs sideband register access - Fix hang when host router NVM is upgraded and there is another host connected. Both have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.11-rc3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Mark XDomain as unplugged when router is removed thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write() commit bc923d594db21bee0ead128eb4bb78f7e77467a4 Author: Maximilian Luz Date: Sun Aug 11 14:46:44 2024 +0200 platform/surface: aggregator: Fix warning when controller is destroyed in probe There is a small window in ssam_serial_hub_probe() where the controller is initialized but has not been started yet. Specifically, between ssam_controller_init() and ssam_controller_start(). Any failure in this window, for example caused by a failure of serdev_device_open(), currently results in an incorrect warning being emitted. In particular, any failure in this window results in the controller being destroyed via ssam_controller_destroy(). This function checks the state of the controller and, in an attempt to validate that the controller has been cleanly shut down before we try and deallocate any resources, emits a warning if that state is not SSAM_CONTROLLER_STOPPED. However, since we have only just initialized the controller and have not yet started it, its state is SSAM_CONTROLLER_INITIALIZED. Note that this is the only point at which the controller has this state, as it will change after we start the controller with ssam_controller_start() and never revert back. Further, at this point no communication has taken place and the sender and receiver threads have not been started yet (and we may not even have an open serdev device either). Therefore, it is perfectly safe to call ssam_controller_destroy() with a state of SSAM_CONTROLLER_INITIALIZED. This, however, means that the warning currently being emitted is incorrect. Fix it by extending the check. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20240811124645.246016-1-luzmaximilian@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit ccbde4b128ef9c73d14d0d7817d68ef795f6d131 Author: Eli Billauer Date: Thu Aug 1 15:11:26 2024 +0300 char: xillybus: Don't destroy workqueue from work item running on it Triggered by a kref decrement, destroy_workqueue() may be called from within a work item for destroying its own workqueue. This illegal situation is averted by adding a module-global workqueue for exclusive use of the offending work item. Other work items continue to be queued on per-device workqueues to ensure performance. Reported-by: syzbot+91dbdfecdd3287734d8e@syzkaller.appspotmail.com Cc: stable Closes: https://lore.kernel.org/lkml/0000000000000ab25a061e1dfe9f@google.com/ Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20240801121126.60183-1-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit 99ae7b9ba047ad029a0a23b2bd51608ce79c8e97 Author: Maximilian Luz Date: Sun Aug 11 15:19:48 2024 +0200 platform/surface: aggregator_registry: Add support for Surface Laptop 6 Add SAM client device nodes for the Surface Laptop Studio 6 (SL6). The SL6 is similar to the SL5, with the typical battery/AC, platform profile, and HID nodes. It also has support for the newly supported fan interface. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20240811131948.261806-6-luzmaximilian@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 002adda09bc1c983c75c82a7e12285c7423aec31 Author: Maximilian Luz Date: Sun Aug 11 15:19:47 2024 +0200 platform/surface: aggregator_registry: Add fan and thermal sensor support for Surface Laptop 5 The EC on the Surface Laptop 5 exposes the fan interface. With the recently introduced driver for it, we can now also enable it here. In addition, also enable the thermal sensor interface. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20240811131948.261806-5-luzmaximilian@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 28d04b4a2cc20981c95787f9c449e6fc51d904f9 Author: Maximilian Luz Date: Sun Aug 11 15:19:46 2024 +0200 platform/surface: aggregator_registry: Add support for Surface Laptop Studio 2 Add SAM client device nodes for the Surface Laptop Studio 2 (SLS2). The SLS2 is quite similar to the SLS1, but it does not provide the touchpad as a SAM-HID device. Therefore, add a new node group for the SLS2 and update the comments accordingly. In addition, it uses the new fan control interface. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20240811131948.261806-4-luzmaximilian@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit ed235163c3f02329d5e37ed4485bbc39ed2568d4 Author: Maximilian Luz Date: Sun Aug 11 15:19:45 2024 +0200 platform/surface: aggregator_registry: Add support for Surface Laptop Go 3 Add SAM client device nodes for the Surface Laptop Go 3. It seems to use the same SAM client devices as the Surface Laptop Go 1 and 2, so re-use their node group. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20240811131948.261806-3-luzmaximilian@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9c8e022567bbec53bee8ae75c44b3d6cd2080d42 Author: Maximilian Luz Date: Sun Aug 11 15:19:44 2024 +0200 platform/surface: aggregator_registry: Add Support for Surface Pro 10 Add SAM client device nodes for the Surface Pro 10. It seems to use the same SAM client devices as the Surface Pro 9, so re-use its node group. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20240811131948.261806-2-luzmaximilian@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d2dfed310aae0739dc87b68c660357e6a4f29819 Author: Luke D. Jones Date: Tue Aug 6 11:46:03 2024 +1200 platform/x86: asus-wmi: Add quirk for ROG Ally X The new ROG Ally X functions the same as the previus model so we can use the same method to ensure the MCU USB devices wake and reconnect correctly. Given that two devices marks the start of a trend, this patch also adds a quirk table to make future additions easier if the MCU is the same. Signed-off-by: Luke D. Jones Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240805234603.38736-1-luke@ljones.dev Signed-off-by: Ilpo Järvinen commit 3beddef84d90590270465a907de1cfe2539ac70d Author: Baojun Xu Date: Tue Aug 13 12:37:48 2024 +0800 ALSA: hda/tas2781: fix wrong calibrated data order Wrong calibration data order cause sound too low in some device. Fix wrong calibrated data order, add calibration data converssion by get_unaligned_be32() after reading from UEFI. Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Cc: Signed-off-by: Baojun Xu Link: https://patch.msgid.link/20240813043749.108-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit d3c2b2a8923abc087c2e585f5828fb7fae8fedfe Author: Peng Fan Date: Mon Aug 5 11:05:35 2024 +0800 arm64: dts: imx95: correct L3Cache cache-sets The L3Cache size is 512KB. Size = Cache Line Size(64) * num sets(512) * Assoc(0x10). Correct the number of Cache sets. Fixes: 5e3cbb8e4256 ("arm64: dts: freescale: add i.MX95 basic dtsi") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 915d9d914a25575055804cb8bfd13490111282ec Author: Peng Fan Date: Mon Jul 29 14:41:11 2024 +0800 arm64: dts: imx95: correct a55 power-domains The A55 power domains is for SCMI performance usage, so for device power on/off. Correct the power-domains entry to use scmi_perf not scmi_devpd. Fixes: 5e3cbb8e4256 ("arm64: dts: freescale: add i.MX95 basic dtsi") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit f4c16a7cdbd2edecdb854f2ce0ef07c6263c5379 Author: Abel Vesa Date: Thu Aug 1 13:21:07 2024 +0300 clk: qcom: gcc-x1e80100: Fix USB 0 and 1 PHY GDSC pwrsts flags Allowing these GDSCs to collapse makes the QMP combo PHYs lose their configuration on machine suspend. Currently, the QMP combo PHY driver doesn't reinitialise the HW on resume. Under such conditions, the USB SuperSpeed support is broken. To avoid this, mark the pwrsts flags with RET_ON. This is in line with USB 2 PHY GDSC config. Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100") Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20240801-x1e80100-clk-gcc-fix-usb-phy-gdscs-pwrsts-v1-1-8df016768a0f@linaro.org Signed-off-by: Bjorn Andersson commit 046667c4d3196938e992fba0dfcde570aa85cd0e Author: Al Viro Date: Sun Jul 21 14:45:08 2024 -0400 memcg_write_event_control(): fix a user-triggerable oops we are *not* guaranteed that anything past the terminating NUL is mapped (let alone initialized with anything sane). Fixes: 0dea116876ee ("cgroup: implement eventfd-based generic API for notifications") Cc: stable@vger.kernel.org Cc: Andrew Morton Acked-by: Michal Hocko Signed-off-by: Al Viro commit 5f0a894bfa3c26ce61deda4c52b12e8ec84d876a Author: Markus Niebel Date: Wed Jul 24 14:58:52 2024 +0200 arm64: dts: freescale: imx93-tqma9352-mba93xxla: fix typo Fix typo in assignment of SD-Card cd-gpios. Fixes: c982ecfa7992 ("arm64: dts: freescale: add initial device tree for MBa93xxLA SBC board") Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit cd0c6872aab4d2c556a5e953e6926a1b4485e543 Author: Markus Niebel Date: Wed Jul 24 14:58:48 2024 +0200 arm64: dts: freescale: imx93-tqma9352: fix CMA alloc-ranges DRAM starts at 0x80000000. Fixes: c982ecfa7992 ("arm64: dts: freescale: add initial device tree for MBa93xxLA SBC board") Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 6e1918ff680527ce4be77426aa537012b5aa997c Author: Kuniyuki Iwashima Date: Wed Aug 7 21:00:21 2024 -0700 net: macb: Use rcu_dereference() for idev->ifa_list in macb_suspend(). In macb_suspend(), idev->ifa_list is fetched with rcu_access_pointer() and later the pointer is dereferenced as ifa->ifa_local. So, idev->ifa_list must be fetched with rcu_dereference(). Fixes: 0cb8de39a776 ("net: macb: Add ARP support to WOL") Signed-off-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20240808040021.6971-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 662c3e2db00f92e50c26e9dc4fe47c52223d9982 Author: Yonghong Song Date: Mon Aug 12 14:48:52 2024 -0700 selftests/bpf: Add a test to verify previous stacksafe() fix A selftest is added such that without the previous patch, a crash can happen. With the previous patch, the test can run successfully. The new test is written in a way which mimics original crash case: main_prog static_prog_1 static_prog_2 where static_prog_1 has different paths to static_prog_2 and some path has stack allocated and some other path does not. A stacksafe() checking in static_prog_2() triggered the crash. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20240812214852.214037-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit bed2eb964c70b780fb55925892a74f26cb590b25 Author: Yonghong Song Date: Mon Aug 12 14:48:47 2024 -0700 bpf: Fix a kernel verifier crash in stacksafe() Daniel Hodges reported a kernel verifier crash when playing with sched-ext. Further investigation shows that the crash is due to invalid memory access in stacksafe(). More specifically, it is the following code: if (exact != NOT_EXACT && old->stack[spi].slot_type[i % BPF_REG_SIZE] != cur->stack[spi].slot_type[i % BPF_REG_SIZE]) return false; The 'i' iterates old->allocated_stack. If cur->allocated_stack < old->allocated_stack the out-of-bound access will happen. To fix the issue add 'i >= cur->allocated_stack' check such that if the condition is true, stacksafe() should fail. Otherwise, cur->stack[spi].slot_type[i % BPF_REG_SIZE] memory access is legal. Fixes: 2793a8b015f7 ("bpf: exact states comparison for iterator convergence checks") Cc: Eduard Zingerman Reported-by: Daniel Hodges Acked-by: Eduard Zingerman Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20240812214847.213612-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 8c6b808c8c2a9de21503944bd6308979410fd812 Author: Shin'ichiro Kawasaki Date: Sat Aug 10 13:27:01 2024 +0900 scsi: mpi3mr: Avoid MAX_PAGE_ORDER WARNING for buffer allocations Commit fc4444941140 ("scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers") added mpi3mr_alloc_diag_bufs() which calls dma_alloc_coherent() to allocate the trace buffer and the firmware buffer. mpi3mr_alloc_diag_bufs() decides the buffer sizes from the driver configuration. In my environment, the sizes are 8MB. With the sizes, dma_alloc_coherent() fails and report this WARNING: WARNING: CPU: 4 PID: 438 at mm/page_alloc.c:4676 __alloc_pages_noprof+0x52f/0x640 The WARNING indicates that the order of the allocation size is larger than MAX_PAGE_ORDER. After this failure, mpi3mr_alloc_diag_bufs() reduces the buffer sizes and retries dma_alloc_coherent(). In the end, the buffer allocations succeed with 4MB size in my environment, which corresponds to MAX_PAGE_ORDER=10. Though the allocations succeed, the WARNING message is misleading and should be avoided. To avoid the WARNING, check the orders of the buffer allocation sizes before calling dma_alloc_coherent(). If the orders are larger than MAX_PAGE_ORDER, fall back to the retry path. Fixes: fc4444941140 ("scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers") Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240810042701.661841-3-shinichiro.kawasaki@wdc.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit 227bbaabe64b6f9cd98aa051454c1d4a194a8c6a Author: Nysal Jan K.A Date: Wed Jul 31 08:31:13 2024 +0530 powerpc/topology: Check if a core is online topology_is_core_online() checks if the core a CPU belongs to is online. The core is online if at least one of the sibling CPUs is online. The first CPU of an online core is also online in the common case, so this should be fairly quick. Fixes: 73c58e7e1412 ("powerpc: Add HOTPLUG_SMT support") Signed-off-by: Nysal Jan K.A Reviewed-by: Shrikanth Hegde Signed-off-by: Michael Ellerman Link: https://msgid.link/20240731030126.956210-3-nysal@linux.ibm.com commit 6c17ea1f3eaa330d445ac14a9428402ce4e3055e Author: Nysal Jan K.A Date: Wed Jul 31 08:31:12 2024 +0530 cpu/SMT: Enable SMT only if a core is online If a core is offline then enabling SMT should not online CPUs of this core. By enabling SMT, what is intended is either changing the SMT value from "off" to "on" or setting the SMT level (threads per core) from a lower to higher value. On PowerPC the ppc64_cpu utility can be used, among other things, to perform the following functions: ppc64_cpu --cores-on # Get the number of online cores ppc64_cpu --cores-on=X # Put exactly X cores online ppc64_cpu --offline-cores=X[,Y,...] # Put specified cores offline ppc64_cpu --smt={on|off|value} # Enable, disable or change SMT level If the user has decided to offline certain cores, enabling SMT should not online CPUs in those cores. This patch fixes the issue and changes the behaviour as described, by introducing an arch specific function topology_is_core_online(). It is currently implemented only for PowerPC. Fixes: 73c58e7e1412 ("powerpc: Add HOTPLUG_SMT support") Reported-by: Tyrel Datwyler Closes: https://groups.google.com/g/powerpc-utils-devel/c/wrwVzAAnRlI/m/5KJSoqP4BAAJ Signed-off-by: Nysal Jan K.A Reviewed-by: Shrikanth Hegde Reviewed-by: Thomas Gleixner Signed-off-by: Michael Ellerman Link: https://msgid.link/20240731030126.956210-2-nysal@linux.ibm.com commit fdad456cbcca739bae1849549c7a999857c56f88 Author: Leon Hwang Date: Sun Jul 28 19:46:11 2024 +0800 bpf: Fix updating attached freplace prog in prog_array map The commit f7866c358733 ("bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT") fixed a NULL pointer dereference panic, but didn't fix the issue that fails to update attached freplace prog to prog_array map. Since commit 1c123c567fb1 ("bpf: Resolve fext program type when checking map compatibility"), freplace prog and its target prog are able to tail call each other. And the commit 3aac1ead5eb6 ("bpf: Move prog->aux->linked_prog and trampoline into bpf_link on attach") sets prog->aux->dst_prog as NULL after attaching freplace prog to its target prog. After loading freplace the prog_array's owner type is BPF_PROG_TYPE_SCHED_CLS. Then, after attaching freplace its prog->aux->dst_prog is NULL. Then, while updating freplace in prog_array the bpf_prog_map_compatible() incorrectly returns false because resolve_prog_type() returns BPF_PROG_TYPE_EXT instead of BPF_PROG_TYPE_SCHED_CLS. After this patch the resolve_prog_type() returns BPF_PROG_TYPE_SCHED_CLS and update to prog_array can succeed. Fixes: f7866c358733 ("bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT") Cc: Toke Høiland-Jørgensen Cc: Martin KaFai Lau Acked-by: Yonghong Song Signed-off-by: Leon Hwang Link: https://lore.kernel.org/r/20240728114612.48486-2-leon.hwang@linux.dev Signed-off-by: Alexei Starovoitov commit 6b9935da2a6b2a72774c15c844ae201a3fc362ac Author: Shin'ichiro Kawasaki Date: Sat Aug 10 13:27:00 2024 +0900 scsi: mpi3mr: Add missing spin_lock_init() for mrioc->trigger_lock Commit fc4444941140 ("scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers") added the spinlock trigger_lock to the struct mpi3mr_ioc. However, spin_lock_init() call was not added for it, then the lock does not work as expected. Also, the kernel reports the message below when lockdep is enabled. INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? To fix the issue and to avoid the INFO message, add the missing spin_lock_init() call. Fixes: fc4444941140 ("scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers") Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240810042701.661841-2-shinichiro.kawasaki@wdc.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit 7b589a9b45ae32aa9d7bece597490e141198d7a6 Author: David Howells Date: Wed Aug 7 19:38:46 2024 +0100 netfs: Fix handling of USE_PGPRIV2 and WRITE_TO_CACHE flags The NETFS_RREQ_USE_PGPRIV2 and NETFS_RREQ_WRITE_TO_CACHE flags aren't used correctly. The problem is that we try to set them up in the request initialisation, but we the cache may be in the process of setting up still, and so the state may not be correct. Further, we secondarily sample the cache state and make contradictory decisions later. The issue arises because we set up the cache resources, which allows the cache's ->prepare_read() to switch on NETFS_SREQ_COPY_TO_CACHE - which triggers cache writing even if we didn't set the flags when allocating. Fix this in the following way: (1) Drop NETFS_ICTX_USE_PGPRIV2 and instead set NETFS_RREQ_USE_PGPRIV2 in ->init_request() rather than trying to juggle that in netfs_alloc_request(). (2) Repurpose NETFS_RREQ_USE_PGPRIV2 to merely indicate that if caching is to be done, then PG_private_2 is to be used rather than only setting it if we decide to cache and then having netfs_rreq_unlock_folios() set the non-PG_private_2 writeback-to-cache if it wasn't set. (3) Split netfs_rreq_unlock_folios() into two functions, one of which contains the deprecated code for using PG_private_2 to avoid accidentally doing the writeback path - and always use it if USE_PGPRIV2 is set. (4) As NETFS_ICTX_USE_PGPRIV2 is removed, make netfs_write_begin() always wait for PG_private_2. This function is deprecated and only used by ceph anyway, and so label it so. (5) Drop the NETFS_RREQ_WRITE_TO_CACHE flag and use fscache_operation_valid() on the cache_resources instead. This has the advantage of picking up the result of netfs_begin_cache_read() and fscache_begin_write_operation() - which are called after the object is initialised and will wait for the cache to come to a usable state. Just reverting ae678317b95e[1] isn't a sufficient fix, so this need to be applied on top of that. Without this as well, things like: rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { and: WARNING: CPU: 13 PID: 3621 at fs/ceph/caps.c:3386 may happen, along with some UAFs due to PG_private_2 not getting used to wait on writeback completion. Fixes: 2ff1e97587f4 ("netfs: Replace PG_fscache by setting folio->private and marking dirty") Reported-by: Max Kellermann Signed-off-by: David Howells cc: Ilya Dryomov cc: Xiubo Li cc: Hristo Venev cc: Jeff Layton cc: Matthew Wilcox cc: ceph-devel@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/3575457.1722355300@warthog.procyon.org.uk/ [1] Link: https://lore.kernel.org/r/1173209.1723152682@warthog.procyon.org.uk Signed-off-by: Christian Brauner commit 8e5ced7804cb9184c4a23f8054551240562a8eda Author: David Howells Date: Tue Jul 30 17:01:40 2024 +0100 netfs, ceph: Revert "netfs: Remove deprecated use of PG_private_2 as a second writeback flag" This reverts commit ae678317b95e760607c7b20b97c9cd4ca9ed6e1a. Revert the patch that removes the deprecated use of PG_private_2 in netfslib for the moment as Ceph is actually still using this to track data copied to the cache. Fixes: ae678317b95e ("netfs: Remove deprecated use of PG_private_2 as a second writeback flag") Reported-by: Max Kellermann Signed-off-by: David Howells cc: Ilya Dryomov cc: Xiubo Li cc: Jeff Layton cc: Matthew Wilcox cc: ceph-devel@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org https: //lore.kernel.org/r/3575457.1722355300@warthog.procyon.org.uk Signed-off-by: Christian Brauner commit 86509e38a80da34d7800985fa2be183475242c8c Author: Mathias Krause Date: Fri Aug 9 15:50:35 2024 +0200 file: fix typo in take_fd() comment The explanatory comment above take_fd() contains a typo, fix that to not confuse readers. Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240809135035.748109-1-minipli@grsecurity.net Signed-off-by: Christian Brauner commit 3b5bbe798b2451820e74243b738268f51901e7d0 Author: Christian Brauner Date: Wed Jul 31 12:01:12 2024 +0200 pidfd: prevent creation of pidfds for kthreads It's currently possible to create pidfds for kthreads but it is unclear what that is supposed to mean. Until we have use-cases for it and we figured out what behavior we want block the creation of pidfds for kthreads. Link: https://lore.kernel.org/r/20240731-gleis-mehreinnahmen-6bbadd128383@brauner Fixes: 32fcb426ec00 ("pid: add pidfd_open()") Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner commit 889ced4c9388785952d78d20d338bda2df209bb5 Author: Lukas Bulwahn Date: Wed Jul 31 09:39:02 2024 +0200 netfs: clean up after renaming FSCACHE_DEBUG config Commit 6b8e61472529 ("netfs: Rename CONFIG_FSCACHE_DEBUG to CONFIG_NETFS_DEBUG") renames the config, but introduces two issues: First, NETFS_DEBUG mistakenly depends on the non-existing config NETFS, whereas the actual intended config is called NETFS_SUPPORT. Second, the config renaming misses to adjust the documentation of the functionality of this config. Clean up those two points. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20240731073902.69262-1-lukas.bulwahn@redhat.com Signed-off-by: Christian Brauner commit 64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a Author: yangerkun Date: Wed Jul 31 12:38:35 2024 +0800 libfs: fix infinite directory reads for offset dir After we switch tmpfs dir operations from simple_dir_operations to simple_offset_dir_operations, every rename happened will fill new dentry to dest dir's maple tree(&SHMEM_I(inode)->dir_offsets->mt) with a free key starting with octx->newx_offset, and then set newx_offset equals to free key + 1. This will lead to infinite readdir combine with rename happened at the same time, which fail generic/736 in xfstests(detail show as below). 1. create 5000 files(1 2 3...) under one dir 2. call readdir(man 3 readdir) once, and get one entry 3. rename(entry, "TEMPFILE"), then rename("TEMPFILE", entry) 4. loop 2~3, until readdir return nothing or we loop too many times(tmpfs break test with the second condition) We choose the same logic what commit 9b378f6ad48cf ("btrfs: fix infinite directory reads") to fix it, record the last_index when we open dir, and do not emit the entry which index >= last_index. The file->private_data now used in offset dir can use directly to do this, and we also update the last_index when we llseek the dir file. Fixes: a2e459555c5f ("shmem: stable directory offsets") Signed-off-by: yangerkun Link: https://lore.kernel.org/r/20240731043835.1828697-1-yangerkun@huawei.com Reviewed-by: Chuck Lever [brauner: only update last_index after seek when offset is zero like Jan suggested] Signed-off-by: Christian Brauner commit 42b0f8da3acc87953161baeb24f756936eb4d4b2 Author: Christian Brauner Date: Wed Jul 31 07:47:27 2024 +0200 nsfs: fix ioctl declaration The kernel is writing an object of type __u64, so the ioctl has to be defined to _IOR(NSIO, 0x5, __u64) instead of _IO(NSIO, 0x5). Reported-by: Dmitry V. Levin Link: https://lore.kernel.org/r/20240730164554.GA18486@altlinux.org Signed-off-by: Christian Brauner commit f71aa06398aabc2e3eaac25acdf3d62e0094ba70 Author: Max Kellermann Date: Mon Jul 29 17:19:30 2024 +0100 fs/netfs/fscache_cookie: add missing "n_accesses" check This fixes a NULL pointer dereference bug due to a data race which looks like this: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 33 PID: 16573 Comm: kworker/u97:799 Not tainted 6.8.7-cm4all1-hp+ #43 Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 10/17/2018 Workqueue: events_unbound netfs_rreq_write_to_cache_work RIP: 0010:cachefiles_prepare_write+0x30/0xa0 Code: 57 41 56 45 89 ce 41 55 49 89 cd 41 54 49 89 d4 55 53 48 89 fb 48 83 ec 08 48 8b 47 08 48 83 7f 10 00 48 89 34 24 48 8b 68 20 <48> 8b 45 08 4c 8b 38 74 45 49 8b 7f 50 e8 4e a9 b0 ff 48 8b 73 10 RSP: 0018:ffffb4e78113bde0 EFLAGS: 00010286 RAX: ffff976126be6d10 RBX: ffff97615cdb8438 RCX: 0000000000020000 RDX: ffff97605e6c4c68 RSI: ffff97605e6c4c60 RDI: ffff97615cdb8438 RBP: 0000000000000000 R08: 0000000000278333 R09: 0000000000000001 R10: ffff97605e6c4600 R11: 0000000000000001 R12: ffff97605e6c4c68 R13: 0000000000020000 R14: 0000000000000001 R15: ffff976064fe2c00 FS: 0000000000000000(0000) GS:ffff9776dfd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000005942c002 CR4: 00000000001706f0 Call Trace: ? __die+0x1f/0x70 ? page_fault_oops+0x15d/0x440 ? search_module_extables+0xe/0x40 ? fixup_exception+0x22/0x2f0 ? exc_page_fault+0x5f/0x100 ? asm_exc_page_fault+0x22/0x30 ? cachefiles_prepare_write+0x30/0xa0 netfs_rreq_write_to_cache_work+0x135/0x2e0 process_one_work+0x137/0x2c0 worker_thread+0x2e9/0x400 ? __pfx_worker_thread+0x10/0x10 kthread+0xcc/0x100 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 Modules linked in: CR2: 0000000000000008 ---[ end trace 0000000000000000 ]--- This happened because fscache_cookie_state_machine() was slow and was still running while another process invoked fscache_unuse_cookie(); this led to a fscache_cookie_lru_do_one() call, setting the FSCACHE_COOKIE_DO_LRU_DISCARD flag, which was picked up by fscache_cookie_state_machine(), withdrawing the cookie via cachefiles_withdraw_cookie(), clearing cookie->cache_priv. At the same time, yet another process invoked cachefiles_prepare_write(), which found a NULL pointer in this code line: struct cachefiles_object *object = cachefiles_cres_object(cres); The next line crashes, obviously: struct cachefiles_cache *cache = object->volume->cache; During cachefiles_prepare_write(), the "n_accesses" counter is non-zero (via fscache_begin_operation()). The cookie must not be withdrawn until it drops to zero. The counter is checked by fscache_cookie_state_machine() before switching to FSCACHE_COOKIE_STATE_RELINQUISHING and FSCACHE_COOKIE_STATE_WITHDRAWING (in "case FSCACHE_COOKIE_STATE_FAILED"), but not for FSCACHE_COOKIE_STATE_LRU_DISCARDING ("case FSCACHE_COOKIE_STATE_ACTIVE"). This patch adds the missing check. With a non-zero access counter, the function returns and the next fscache_end_cookie_access() call will queue another fscache_cookie_state_machine() call to handle the still-pending FSCACHE_COOKIE_DO_LRU_DISCARD. Fixes: 12bb21a29c19 ("fscache: Implement cookie user counting and resource pinning") Signed-off-by: Max Kellermann Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240729162002.3436763-2-dhowells@redhat.com cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: stable@vger.kernel.org Signed-off-by: Christian Brauner commit 3f65f3c099bcb27949e712f39ba836f21785924a Author: Omar Sandoval Date: Mon Jul 29 15:48:12 2024 -0700 filelock: fix name of file_lease slab cache When struct file_lease was split out from struct file_lock, the name of the file_lock slab cache was copied to the new slab cache for file_lease. This name conflict causes confusion in /proc/slabinfo and /sys/kernel/slab. In particular, it caused failures in drgn's test case for slab cache merging. Link: https://github.com/osandov/drgn/blob/9ad29fd86499eb32847473e928b6540872d3d59a/tests/linux_kernel/helpers/test_slab.py#L81 Fixes: c69ff4071935 ("filelock: split leases out of struct file_lock") Signed-off-by: Omar Sandoval Link: https://lore.kernel.org/r/2d1d053da1cafb3e7940c4f25952da4f0af34e38.1722293276.git.osandov@fb.com Reviewed-by: Chuck Lever Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 98055bc3595500bcf2126b93b1595354bdb86a66 Author: Matthew Wilcox (Oracle) Date: Mon May 27 21:17:32 2024 +0100 netfs: Fault in smaller chunks for non-large folio mappings As in commit 4e527d5841e2 ("iomap: fault in smaller chunks for non-large folio mappings"), we can see a performance loss for filesystems which have not yet been converted to large folios. Fixes: c38f4e96e605 ("netfs: Provide func to copy data to pagecache for buffered write") Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240527201735.1898381-1-willy@infradead.org Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 054308ad90ae43ba2d4b9c83c6582e8fe94f6fed Author: Manivannan Sadhasivam Date: Mon Aug 12 11:27:07 2024 +0530 MAINTAINERS: Add Manivannan Sadhasivam as Reviewer for PCI native host bridge and endpoint drivers I've been reviewing the native host bridge drivers for some time and would like to be listed as a Reviewer formally. Link: https://lore.kernel.org/r/20240812055707.6778-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas commit 48cc7ecd3a68e0fbfa281ef1ed6f6b6cb7638390 Author: Olivier Langlois Date: Sun Aug 11 20:34:46 2024 -0400 io_uring/napi: remove duplicate io_napi_entry timeout assignation io_napi_entry() has 2 calling sites. One of them is unlikely to find an entry and if it does, the timeout should arguable not be updated. The other io_napi_entry() calling site is overwriting the update made by io_napi_entry() so the io_napi_entry() timeout value update has no or little value and therefore is removed. Signed-off-by: Olivier Langlois Link: https://lore.kernel.org/r/145b54ff179f87609e20dffaf5563c07cdbcad1a.1723423275.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit 84f2eecf95018386c145ada19bb45b03bdb80d9e Author: Olivier Langlois Date: Sun Aug 11 14:07:11 2024 -0400 io_uring/napi: check napi_enabled in io_napi_add() before proceeding doing so avoids the overhead of adding napi ids to all the rings that do not enable napi. if no id is added to napi_list because napi is disabled, __io_napi_busy_loop() will not be called. Signed-off-by: Olivier Langlois Fixes: b4ccc4dd1330 ("io_uring/napi: enable even with a timeout of 0") Link: https://lore.kernel.org/r/bd989ccef5fda14f5fd9888faf4fefcf66bd0369.1723400131.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit 7db4042336580dfd75cb5faa82c12cd51098c90b Author: Stefan Haberland Date: Mon Aug 12 14:57:33 2024 +0200 s390/dasd: fix error recovery leading to data corruption on ESE devices Extent Space Efficient (ESE) or thin provisioned volumes need to be formatted on demand during usual IO processing. The dasd_ese_needs_format function checks for error codes that signal the non existence of a proper track format. The check for incorrect length is to imprecise since other error cases leading to transport of insufficient data also have this flag set. This might lead to data corruption in certain error cases for example during a storage server warmstart. Fix by removing the check for incorrect length and replacing by explicitly checking for invalid track format in transport mode. Also remove the check for file protected since this is not a valid ESE handling case. Cc: stable@vger.kernel.org # 5.3+ Fixes: 5e2b17e712cf ("s390/dasd: Add dynamic formatting support for ESE volumes") Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20240812125733.126431-3-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 2a07bb64d80152701d507b1498237ed1b8d83866 Author: Eric Farman Date: Mon Aug 12 14:57:32 2024 +0200 s390/dasd: Remove DMA alignment This reverts commit bc792884b76f ("s390/dasd: Establish DMA alignment"). Quoting the original commit: linux-next commit bf8d08532bc1 ("iomap: add support for dma aligned direct-io") changes the alignment requirement to come from the block device rather than the block size, and the default alignment requirement is 512-byte boundaries. Since DASD I/O has page alignments for IDAW/TIDAW requests, let's override this value to restore the expected behavior. I mentioned TIDAW, but that was wrong. TIDAWs have no distinct alignment requirement (per p. 15-70 of POPS SA22-7832-13): Unless otherwise specified, TIDAWs may designate a block of main storage on any boundary and length up to 4K bytes, provided the specified block does not cross a 4 K-byte boundary. IDAWs do, but the original commit neglected that while ECKD DASD are typically formatted in 4096-byte blocks, they don't HAVE to be. Formatting an ECKD volume with smaller blocks is permitted (dasdfmt -b xxx), and the problematic commit enforces alignment properties to such a device that will result in errors, such as: [test@host ~]# lsdasd -l a367 | grep blksz blksz: 512 [test@host ~]# mkfs.xfs -f /dev/disk/by-path/ccw-0.0.a367-part1 meta-data=/dev/dasdc1 isize=512 agcount=4, agsize=230075 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=1 = reflink=1 bigtime=1 inobtcount=1 nrext64=1 data = bsize=4096 blocks=920299, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=16384, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 error reading existing superblock: Invalid argument mkfs.xfs: pwrite failed: Invalid argument libxfs_bwrite: write failed on (unknown) bno 0x70565c/0x100, err=22 mkfs.xfs: Releasing dirty buffer to free list! found dirty buffer (bulk) on free list! mkfs.xfs: pwrite failed: Invalid argument ...snipped... The original commit omitted the FBA discipline for just this reason, but the formatted block size of the other disciplines was overlooked. The solution to all of this is to revert to the original behavior, such that the block size can be respected. There were two commits [1] that moved this code in the interim, so a straight git-revert is not possible, but the change is straightforward. But what of the original problem? That was manifested with a direct-io QEMU guest, where QEMU itself was changed a month or two later with commit 25474d90aa ("block: use the request length for iov alignment") such that the blamed kernel commit is unnecessary. [1] commit 0127a47f58c6 ("dasd: move queue setup to common code") commit fde07a4d74e3 ("dasd: use the atomic queue limits API") Fixes: bc792884b76f ("s390/dasd: Establish DMA alignment") Reviewed-by: Stefan Haberland Signed-off-by: Eric Farman Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20240812125733.126431-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit d74da846046aeec9333e802f5918bd3261fb5509 Merge: a1460e457e7ae 7cc06e729460a Author: Linus Torvalds Date: Mon Aug 12 08:21:52 2024 -0700 Merge tag 'platform-drivers-x86-v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: "While the ideapad concurrency fix itself is relatively straightforward, it required moving code around and adding a bit of supporting infrastructure to have a clean inter-driver interface. This shows up in the diffstats. - ideapad-laptop / lenovo-ymc: Protect VPC calls with a mutex - amd/pmf: Query HPD data also when ALS is disabled" * tag 'platform-drivers-x86-v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc platform/x86: ideapad-laptop: introduce a generic notification chain platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled commit a1460e457e7ae42f48d8490c1214fa29f23e4d58 Merge: 7c626ce4bae1a 9a2fa14720835 Author: Linus Torvalds Date: Mon Aug 12 08:03:28 2024 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull fd bitmap fix from Al Viro: "Fix bitmap corruption on close_range() by cleaning up copy_fd_bitmaps()" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE commit 497d370a644d95a9f04271aa92cb96d32e84c770 Author: Maíra Canal Date: Fri Aug 9 12:18:45 2024 -0300 drm/v3d: Fix out-of-bounds read in `v3d_csd_job_run()` When enabling UBSAN on Raspberry Pi 5, we get the following warning: [ 387.894977] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/v3d/v3d_sched.c:320:3 [ 387.903868] index 7 is out of range for type '__u32 [7]' [ 387.909692] CPU: 0 PID: 1207 Comm: kworker/u16:2 Tainted: G WC 6.10.3-v8-16k-numa #151 [ 387.919166] Hardware name: Raspberry Pi 5 Model B Rev 1.0 (DT) [ 387.925961] Workqueue: v3d_csd drm_sched_run_job_work [gpu_sched] [ 387.932525] Call trace: [ 387.935296] dump_backtrace+0x170/0x1b8 [ 387.939403] show_stack+0x20/0x38 [ 387.942907] dump_stack_lvl+0x90/0xd0 [ 387.946785] dump_stack+0x18/0x28 [ 387.950301] __ubsan_handle_out_of_bounds+0x98/0xd0 [ 387.955383] v3d_csd_job_run+0x3a8/0x438 [v3d] [ 387.960707] drm_sched_run_job_work+0x520/0x6d0 [gpu_sched] [ 387.966862] process_one_work+0x62c/0xb48 [ 387.971296] worker_thread+0x468/0x5b0 [ 387.975317] kthread+0x1c4/0x1e0 [ 387.978818] ret_from_fork+0x10/0x20 [ 387.983014] ---[ end trace ]--- This happens because the UAPI provides only seven configuration registers and we are reading the eighth position of this u32 array. Therefore, fix the out-of-bounds read in `v3d_csd_job_run()` by accessing only seven positions on the '__u32 [7]' array. The eighth register exists indeed on V3D 7.1, but it isn't currently used. That being so, let's guarantee that it remains unused and add a note that it could be set in a future patch. Fixes: 0ad5bc1ce463 ("drm/v3d: fix up register addresses for V3D 7.x") Reported-by: Tvrtko Ursulin Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240809152001.668314-1-mcanal@igalia.com commit db1b4bedb9b97c6d34b03d03815147c04fffe8b4 Author: Zheng Zhang Date: Sat Aug 10 13:26:51 2024 +0800 net: ethernet: mtk_wed: fix use-after-free panic in mtk_wed_setup_tc_block_cb() When there are multiple ap interfaces on one band and with WED on, turning the interface down will cause a kernel panic on MT798X. Previously, cb_priv was freed in mtk_wed_setup_tc_block() without marking NULL,and mtk_wed_setup_tc_block_cb() didn't check the value, too. Assign NULL after free cb_priv in mtk_wed_setup_tc_block() and check NULL in mtk_wed_setup_tc_block_cb(). ---------- Unable to handle kernel paging request at virtual address 0072460bca32b4f5 Call trace: mtk_wed_setup_tc_block_cb+0x4/0x38 0xffffffc0794084bc tcf_block_playback_offloads+0x70/0x1e8 tcf_block_unbind+0x6c/0xc8 ... --------- Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") Signed-off-by: Zheng Zhang Signed-off-by: David S. Miller commit 32316f676b4ee87c0404d333d248ccf777f739bc Author: Haiyang Zhang Date: Fri Aug 9 14:01:24 2024 -0700 net: mana: Fix RX buf alloc_size alignment and atomic op panic The MANA driver's RX buffer alloc_size is passed into napi_build_skb() to create SKB. skb_shinfo(skb) is located at the end of skb, and its alignment is affected by the alloc_size passed into napi_build_skb(). The size needs to be aligned properly for better performance and atomic operations. Otherwise, on ARM64 CPU, for certain MTU settings like 4000, atomic operations may panic on the skb_shinfo(skb)->dataref due to alignment fault. To fix this bug, add proper alignment to the alloc_size calculation. Sample panic info: [ 253.298819] Unable to handle kernel paging request at virtual address ffff000129ba5cce [ 253.300900] Mem abort info: [ 253.301760] ESR = 0x0000000096000021 [ 253.302825] EC = 0x25: DABT (current EL), IL = 32 bits [ 253.304268] SET = 0, FnV = 0 [ 253.305172] EA = 0, S1PTW = 0 [ 253.306103] FSC = 0x21: alignment fault Call trace: __skb_clone+0xfc/0x198 skb_clone+0x78/0xe0 raw6_local_deliver+0xfc/0x228 ip6_protocol_deliver_rcu+0x80/0x500 ip6_input_finish+0x48/0x80 ip6_input+0x48/0xc0 ip6_sublist_rcv_finish+0x50/0x78 ip6_sublist_rcv+0x1cc/0x2b8 ipv6_list_rcv+0x100/0x150 __netif_receive_skb_list_core+0x180/0x220 netif_receive_skb_list_internal+0x198/0x2a8 __napi_poll+0x138/0x250 net_rx_action+0x148/0x330 handle_softirqs+0x12c/0x3a0 Cc: stable@vger.kernel.org Fixes: 80f6215b450e ("net: mana: Add support for jumbo frame") Signed-off-by: Haiyang Zhang Reviewed-by: Long Li Signed-off-by: David S. Miller commit c25504a0ba36968f919aa30caff172ef23346299 Author: Frank Li Date: Fri Aug 9 16:06:53 2024 -0400 dt-bindings: net: fsl,qoriq-mc-dpmac: add missed property phys Add missed property phys, which indicate how connect to serdes phy. Fix below warning: arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: fsl-mc@80c000000: dpmacs:ethernet@7: Unevaluated properties are not allowed ('phys' was unexpected) Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit e7e846dc6c73fbc94ae8b4ec20d05627646416f2 Author: Christophe Leroy Date: Thu Aug 8 09:05:08 2024 +0200 powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL Booting with CONFIG_DEBUG_VIRTUAL leads to following warning when passing hugepage reservation on command line: Kernel command line: hugepagesz=1g hugepages=1 hugepagesz=64m hugepages=1 hugepagesz=256m hugepages=1 noreboot HugeTLB: allocating 1 of page size 1.00 GiB failed. Only allocated 0 hugepages. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at arch/powerpc/include/asm/io.h:948 __alloc_bootmem_huge_page+0xd4/0x284 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 6.10.0-rc6-00396-g6b0e82791bd0-dirty #936 Hardware name: MPC8544DS e500v2 0x80210030 MPC8544 DS NIP: c1020240 LR: c10201d0 CTR: 00000000 REGS: c13fdd30 TRAP: 0700 Not tainted (6.10.0-rc6-00396-g6b0e82791bd0-dirty) MSR: 00021000 CR: 44084288 XER: 20000000 GPR00: c10201d0 c13fde20 c130b560 e8000000 e8001000 00000000 00000000 c1420000 GPR08: 00000000 00028001 00000000 00000004 44084282 01066ac0 c0eb7c9c efffe149 GPR16: c0fc4228 0000005f ffffffff c0eb7d0c c0eb7cc0 c0eb7ce0 ffffffff 00000000 GPR24: c1441cec efffe153 e8001000 c14240c0 00000000 c1441d64 00000000 e8000000 NIP [c1020240] __alloc_bootmem_huge_page+0xd4/0x284 LR [c10201d0] __alloc_bootmem_huge_page+0x64/0x284 Call Trace: [c13fde20] [c10201d0] __alloc_bootmem_huge_page+0x64/0x284 (unreliable) [c13fde50] [c10207b8] hugetlb_hstate_alloc_pages+0x8c/0x3e8 [c13fdeb0] [c1021384] hugepages_setup+0x240/0x2cc [c13fdef0] [c1000574] unknown_bootoption+0xfc/0x280 [c13fdf30] [c0078904] parse_args+0x200/0x4c4 [c13fdfa0] [c1000d9c] start_kernel+0x238/0x7d0 [c13fdff0] [c0000434] set_ivor+0x12c/0x168 Code: 554aa33e 7c042840 3ce0c142 80a7427c 5109a016 50caa016 7c9a2378 7fdcf378 4180000c 7c052040 41810160 7c095040 <0fe00000> 38c00000 40800108 3c60c0eb ---[ end trace 0000000000000000 ]--- This is due to virt_addr_valid() using high_memory before it is set. high_memory is set in mem_init() using max_low_pfn, but max_low_pfn is available long before, it is set in mem_topology_setup(). So just like commit daa9ada2093e ("powerpc/mm: Fix boot crash with FLATMEM") moved the setting of max_mapnr immediately after the call to mem_topology_setup(), the same can be done for high_memory. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/62b69c4baad067093f39e7e60df0fe27a86b8d2a.1723100702.git.christophe.leroy@csgroup.eu commit e7a9af8c93aa9f408f9972809b642faeec5287e1 Author: Christophe Leroy Date: Thu Aug 8 11:32:47 2024 +0200 powerpc/mm: Fix size of allocated PGDIR Commit 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)") increased the size of PGD entries but failed to increase the PGD directory. Use the size of pgd_t instead of the size of pointers to calculate the allocated size. Reported-by: Guenter Roeck Fixes: 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)") Signed-off-by: Christophe Leroy Tested-by: Guenter Roeck Signed-off-by: Michael Ellerman Link: https://msgid.link/1cdaacb391cbd3e0240f0e0faf691202874e9422.1723109462.git.christophe.leroy@csgroup.eu commit 8512fbb64b0e599412da661412d10d4ba1cb003c Author: Michal Vokáč Date: Tue Jul 23 16:25:19 2024 +0200 ARM: dts: imx6dl-yapp43: Increase LED current to match the yapp4 HW design On the imx6dl-yapp4 revision based boards, the RGB LED is not driven directly by the LP5562 driver but through FET transistors. Hence the LED current is not determined by the driver but by the LED series resistors. On the imx6dl-yapp43 revision based boards, we removed the FET transistors to drive the LED directly from the LP5562 but forgot to tune the output current to match the previous HW design. Set the LED current on imx6dl-yapp43 based boards to the same values measured on the imx6dl-yapp4 boards and limit the maximum current to 20mA. Fixes: 7da4734751e0 ("ARM: dts: imx6dl-yapp43: Add support for new HW revision of the IOTA board") Cc: Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 1fc2021941241bf32728a198bc0a7f38669e44a5 Merge: 9ff2f816e2aa6 de7a670f8defe Author: David S. Miller Date: Mon Aug 12 11:46:56 2024 +0100 Merge branch 'vsc73xx-fix-mdio-and-phy' Pawel Dembicki says: ==================== net: dsa: vsc73xx: fix MDIO bus access and PHY opera This series are extracted patches from net-next series [0]. The VSC73xx driver has issues with PHY configuration. This patch series fixes most of them. The first patch synchronizes the register configuration routine with the datasheet recommendations. Patches 2-3 restore proper communication on the MDIO bus. Currently, the write value isn't sent to the MDIO register, and without a busy check, communication with the PHY can be interrupted. This causes the PHY to receive improper configuration and autonegotiation could fail. The fourth patch removes the PHY reset blockade, as it is no longer required. After fixing the MDIO operations, autonegotiation became possible. The last patch removes the blockade, which became unnecessary after the MDIO operations fix. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=874739&state=%2A&archive=both ==================== Signed-off-by: David S. Miller commit de7a670f8defe4ed2115552ad23dea0f432f7be4 Author: Pawel Dembicki Date: Fri Aug 9 21:38:06 2024 +0200 net: phy: vitesse: repair vsc73xx autonegotiation When the vsc73xx mdio bus work properly, the generic autonegotiation configuration works well. Reviewed-by: Linus Walleij Signed-off-by: Pawel Dembicki Signed-off-by: David S. Miller commit 9f9a72654622bae75adb1e1923d709e96ede3042 Author: Pawel Dembicki Date: Fri Aug 9 21:38:05 2024 +0200 net: dsa: vsc73xx: allow phy resetting Resetting the VSC73xx PHY was problematic because the MDIO bus, without a busy check, read and wrote incorrect register values. My investigation indicates that resetting the PHY only triggers changes in configuration. However, improper register values written earlier were only exposed after a soft reset. The reset itself wasn't the issue; rather, the problem stemmed from incorrect read and write operations. A 'soft_reset' can now proceed normally. There are no reasons to keep the VSC73xx from being reset. This commit removes the reset blockade in the 'vsc73xx_phy_write' function. Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: Pawel Dembicki Signed-off-by: David S. Miller commit fa63c6434b6f6aaf9d8d599dc899bc0a074cc0ad Author: Pawel Dembicki Date: Fri Aug 9 21:38:04 2024 +0200 net: dsa: vsc73xx: check busy flag in MDIO operations The VSC73xx has a busy flag used during MDIO operations. It is raised when MDIO read/write operations are in progress. Without it, PHYs are misconfigured and bus operations do not work as expected. Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver") Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: Pawel Dembicki Signed-off-by: David S. Miller commit 5b9eebc2c7a5f0cc7950d918c1e8a4ad4bed5010 Author: Pawel Dembicki Date: Fri Aug 9 21:38:03 2024 +0200 net: dsa: vsc73xx: pass value in phy_write operation In the 'vsc73xx_phy_write' function, the register value is missing, and the phy write operation always sends zeros. This commit passes the value variable into the proper register. Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver") Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: Pawel Dembicki Signed-off-by: David S. Miller commit 63796bc2e97cd5ebcef60bad4953259d4ad11cb4 Author: Pawel Dembicki Date: Fri Aug 9 21:38:02 2024 +0200 net: dsa: vsc73xx: fix port MAC configuration in full duplex mode According to the datasheet description ("Port Mode Procedure" in 5.6.2), the VSC73XX_MAC_CFG_WEXC_DIS bit is configured only for half duplex mode. The WEXC_DIS bit is responsible for MAC behavior after an excessive collision. Let's set it as described in the datasheet. Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver") Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: Pawel Dembicki Signed-off-by: David S. Miller commit 9ff2f816e2aa65ca9a1cdf0954842f8173c0f48d Author: Radhey Shyam Pandey Date: Fri Aug 9 11:56:09 2024 +0530 net: axienet: Fix register defines comment description In axiethernet header fix register defines comment description to be inline with IP documentation. It updates MAC configuration register, MDIO configuration register and frame filter control description. Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Signed-off-by: Radhey Shyam Pandey Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a9a18e8f770c9b0703dab93580d0b02e199a4c79 Author: Dan Carpenter Date: Fri Aug 9 15:28:19 2024 +0300 atm: idt77252: prevent use after free in dequeue_rx() We can't dereference "skb" after calling vcc->push() because the skb is released. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 1472464c6248575bf2d01c7f076b94704bb32c95 Author: Masahiro Yamada Date: Thu Aug 8 03:03:00 2024 +0900 kbuild: avoid scripts/kallsyms parsing /dev/null On macOS, as reported by Daniel Gomez, getline() sets ENOTTY to errno if it is requested to read from /dev/null. If this is worth fixing, I would rather pass an empty file to scripts/kallsyms instead of adding the ugly #ifdef __APPLE__. Fixes: c442db3f49f2 ("kbuild: remove PROVIDE() for kallsyms symbols") Reported-by: Daniel Gomez Closes: https://lore.kernel.org/all/20240807-macos-build-support-v1-12-4cd1ded85694@samsung.com/ Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Reviewed-by: Daniel Gomez commit e332a5aba83500e8d422c90d2a84d8a5f888673e Author: Masahiro Yamada Date: Thu Aug 8 02:47:28 2024 +0900 treewide: remove unnecessary inclusion These files do not use any macros defined in . Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 2c71c8459c8ca66bd8f597effaac892ee8448a9f Author: Bouke Sybren Haarsma Date: Sun Jul 28 14:47:31 2024 +0200 drm: panel-orientation-quirks: Add quirk for Ayn Loki Max Add quirk orientation for Ayn Loki Max model. This has been tested by JELOS team that uses their own patched kernel for a while now and confirmed by users in the ChimeraOS discord servers. Signed-off-by: Bouke Sybren Haarsma Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20240728124731.168452-3-boukehaarsma23@gmail.com commit b86aa4140f6a8f01f35bfb05af60e01a55b48803 Author: Bouke Sybren Haarsma Date: Sun Jul 28 14:47:30 2024 +0200 drm: panel-orientation-quirks: Add quirk for Ayn Loki Zero Add quirk orientation for the Ayn Loki Zero. This also has been tested/used by the JELOS team. Signed-off-by: Bouke Sybren Haarsma Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20240728124731.168452-2-boukehaarsma23@gmail.com commit 004eb8ba776ccd3e296ea6f78f7ae7985b12824e Author: Lianqin Hu Date: Sun Aug 11 08:30:11 2024 +0000 ALSA: usb-audio: Add delay quirk for VIVO USB-C-XE710 HEADSET Audio control requests that sets sampling frequency sometimes fail on this card. Adding delay between control messages eliminates that problem. Signed-off-by: Lianqin Hu Cc: Link: https://patch.msgid.link/TYUPR06MB6217FF67076AF3E49E12C877D2842@TYUPR06MB6217.apcprd06.prod.outlook.com Signed-off-by: Takashi Iwai commit eb75d05d96b824e14efa4de6c30692d300a9ce67 Merge: ef9718b3d54e8 03c5c350e38d9 Author: Takashi Iwai Date: Mon Aug 12 09:17:57 2024 +0200 Merge branch 'topic/cirrus-hp-g12' into for-linus Pull Cirrus HD-audio quirks for HP G12 laptops. Signed-off-by: Takashi Iwai commit 03c5c350e38d9346b69357d0e52c3c40495c14a0 Author: Simon Trimmer Date: Fri Aug 2 16:22:15 2024 +0100 ALSA: hda/realtek: Add support for new HP G12 laptops Some of these laptop models have quirk IDs that are identical but have different amplifier parts fitted, this difference is described in the ACPI information. The solution introduced for this product family can derive the required component binding information from ACPI instead of hardcoding it, supports the new variants of the CS35L56 being used and has generalized naming that makes it applicable to other ALC+amp combinations. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240802152215.20831-4-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 9219b179bab20563c43aee0c195e1e9304a9deed Merge: 7c626ce4bae1a 90ec3a8a7fd0d Author: Takashi Iwai Date: Mon Aug 12 09:15:01 2024 +0200 Merge tag 'spi-acpi-lookup-dummy' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into topic/cirrus-hp-g12 spi: Add empty versions of ACPI lookup functions A patch from Richard Fitzgerald adding dummy versions of the ACPI lookup functions for SPI: Provide empty versions of acpi_spi_count_resources(), acpi_spi_device_alloc() and acpi_spi_find_controller_by_adev() if the real functions are not being built. This commit fixes two problems with the original definitions: 1) There wasn't an empty version of these functions 2) The #if only depended on CONFIG_ACPI. But the functions are implemented in the core spi.c so CONFIG_SPI_MASTER must also be enabled for the real functions to exist. commit 109f256285dd6a5f8c3bd0d80d39b2ccd4fe314e Author: Shenwei Wang Date: Mon Jul 15 08:17:22 2024 -0500 arm64: dts: imx93: update default value for snps,clk-csr For the i.MX93 SoC, the default clock rate for the IP of STMMAC EQOS is 312.5 MHz. According to the following mapping table from the i.MX93 reference manual, this clock rate corresponds to a CSR value of 6. 0000: CSR clock = 60-100 MHz; MDC clock = CSR clock/42 0001: CSR clock = 100-150 MHz; MDC clock = CSR clock/62 0010: CSR clock = 20-35 MHz; MDC clock = CSR clock/16 0011: CSR clock = 35-60 MHz; MDC clock = CSR clock/26 0100: CSR clock = 150-250 MHz; MDC clock = CSR clock/102 0101: CSR clock = 250-300 MHz; MDC clock = CSR clock/124 0110: CSR clock = 300-500 MHz; MDC clock = CSR clock/204 0111: CSR clock = 500-800 MHz; MDC clock = CSR clock/324 Fixes: f2d03ba997cb ("arm64: dts: imx93: reorder device nodes") Signed-off-by: Shenwei Wang Signed-off-by: Shawn Guo commit 4736ad9422cb86f15464d2bd579c1f5d7786bb61 Author: Sascha Hauer Date: Mon Jul 15 11:32:31 2024 +0200 arm64: dts: freescale: tqma9352: Fix watchdog reset On the tqma9352 the board is reset through an external PMIC, so set the fsl,ext-reset-output property to enable triggering the output pin on a watchdog trigger. Signed-off-by: Sascha Hauer Reviewed-by: Fabio Estevam Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit 4e69cd835a2d5c3915838491f59a68ee697a87d0 Author: Adam Ford Date: Sun Jul 14 12:20:17 2024 -0500 arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962 The L/R clock needs to be controlled by the SAI3 instead of the CODEC to properly achieve stereo sound. Doing this allows removes the need for unnecessary clock manipulation to try to get the CODEC's clock in sync with the SAI3 clock, since the CODEC can cope with a wide variety of clock inputs. Fixes: 161af16c18f3 ("arm64: dts: imx8mp-beacon-kit: Fix audio_pll2 clock") Fixes: 69e2f37a6ddc ("arm64: dts: imx8mp-beacon-kit: Enable WM8962 Audio CODEC") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 7c626ce4bae1ac14f60076d00eafe71af30450ba Author: Linus Torvalds Date: Sun Aug 11 14:27:14 2024 -0700 Linux 6.11-rc3 commit 7006fe2f7f781fc96c8bab9df0c0417fd670a8e1 Merge: 7270e931b5302 919f18f961c03 Author: Linus Torvalds Date: Sun Aug 11 10:20:29 2024 -0700 Merge tag 'x86-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: - Fix 32-bit PTI for real. pti_clone_entry_text() is called twice, once before initcalls so that initcalls can use the user-mode helper and then again after text is set read only. Setting read only on 32-bit might break up the PMD mapping, which makes the second invocation of pti_clone_entry_text() find the mappings out of sync and failing. Allow the second call to split the existing PMDs in the user mapping and synchronize with the kernel mapping. - Don't make acpi_mp_wake_mailbox read-only after init as the mail box must be writable in the case that CPU hotplug operations happen after boot. Otherwise the attempt to start a CPU crashes with a write to read only memory. - Add a missing sanity check in mtrr_save_state() to ensure that the fixed MTRR MSRs are supported. Otherwise mtrr_save_state() ends up in a #GP, which is fixed up, but the WARN_ON() can bring systems down when panic on warn is set. * tag 'x86-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mtrr: Check if fixed MTRRs exist before saving them x86/paravirt: Fix incorrect virt spinlock setting on bare metal x86/acpi: Remove __ro_after_init from acpi_mp_wake_mailbox x86/mm: Fix PTI for i386 some more commit 7270e931b53025c1070c2dda30a0ba7f1b2c072c Merge: 56fe0a6a9f894 5916be8a53de6 Author: Linus Torvalds Date: Sun Aug 11 10:15:34 2024 -0700 Merge tag 'timers-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull time keeping fixes from Thomas Gleixner: - Fix a couple of issues in the NTP code where user supplied values are neither sanity checked nor clamped to the operating range. This results in integer overflows and eventualy NTP getting out of sync. According to the history the sanity checks had been removed in favor of clamping the values, but the clamping never worked correctly under all circumstances. The NTP people asked to not bring the sanity checks back as it might break existing applications. Make the clamping work correctly and add it where it's missing - If adjtimex() sets the clock it has to trigger the hrtimer subsystem so it can adjust and if the clock was set into the future expire timers if needed. The caller should provide a bitmask to tell hrtimers which clocks have been adjusted. adjtimex() uses not the proper constant and uses CLOCK_REALTIME instead, which is 0. So hrtimers adjusts only the clocks, but does not check for expired timers, which might make them expire really late. Use the proper bitmask constant instead. * tag 'timers-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() ntp: Safeguard against time_constant overflow ntp: Clamp maxerror and esterror to operating range commit 56fe0a6a9f8941b154bd6a41ed828e9e1078b67b Merge: cb2e5ee8e7a04 03f9885c60adf Author: Linus Torvalds Date: Sun Aug 11 10:07:52 2024 -0700 Merge tag 'irq-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Three small fixes for interrupt core and drivers: - The interrupt core fails to honor caller supplied affinity hints for non-managed interrupts and uses the system default affinity on startup instead. Set the missing flag in the descriptor to tell the core to use the provided affinity. - Fix a shift out of bounds error in the Xilinx driver - Handle switching to level trigger correctly in the RISCV APLIC driver. It failed to retrigger the interrupt which causes it to become stale" * tag 'irq-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration irqchip/xilinx: Fix shift out of bounds genirq/irqdesc: Honor caller provided affinity in alloc_desc() commit cb2e5ee8e7a04be6a762b51241701b5105b82022 Merge: 42b34a8de31f1 65ba8cef04168 Author: Linus Torvalds Date: Sun Aug 11 09:55:32 2024 -0700 Merge tag 'usb-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of small USB driver fixes for reported issues for 6.11-rc3. Included in here are: - usb serial driver MODULE_DESCRIPTION() updates - usb serial driver fixes - typec driver fixes - usb-ip driver fix - gadget driver fixes - dt binding update All of these have been in linux-next with no reported issues" * tag 'usb-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: ucsi: Fix a deadlock in ucsi_send_command_common() usb: typec: tcpm: avoid sink goto SNK_UNATTACHED state if not received source capability message usb: gadget: f_fs: pull out f->disable() from ffs_func_set_alt() usb: gadget: f_fs: restore ffs_func_disable() functionality USB: serial: debug: do not echo input by default usb: typec: tipd: Delete extra semi-colon usb: typec: tipd: Fix dereferencing freeing memory in tps6598x_apply_patch() usb: gadget: u_serial: Set start_delayed during suspend usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap() usb: typec: fsa4480: Check if the chip is really there usb: gadget: core: Check for unset descriptor usb: vhci-hcd: Do not drop references before new references are gained usb: gadget: u_audio: Check return codes from usb_ep_enable and config_ep_by_speed. usb: gadget: midi2: Fix the response for FB info with block 0xff dt-bindings: usb: microchip,usb2514: Add USB2517 compatible USB: serial: garmin_gps: use struct_size() to allocate pkt USB: serial: garmin_gps: annotate struct garmin_packet with __counted_by USB: serial: add missing MODULE_DESCRIPTION() macros USB: serial: spcp8x5: remove unused struct 'spcp8x5_usb_ctrl_arg' commit 42b34a8de31f1de4bffbf7cc5a2ea699af8dca8a Merge: 84e6da5752151 6e20753da6bc6 Author: Linus Torvalds Date: Sun Aug 11 09:51:29 2024 -0700 Merge tag 'tty-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for reported problems for 6.11-rc3. Included in here are: - sc16is7xx serial driver fixes - uartclk bugfix for a divide by zero issue - conmakehash userspace build issue fix All of these have been in linux-next for a while with no reported issues" * tag 'tty-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: vt: conmakehash: cope with abs_srctree no longer in env serial: sc16is7xx: fix invalid FIFO access with special register set serial: sc16is7xx: fix TX fifo corruption serial: core: check uartclk for zero to avoid divide by zero commit 84e6da575215154cf6aa1e17661989d3b37bb3c1 Merge: 9221afb2d8e8d 15fffc6a5624b Author: Linus Torvalds Date: Sun Aug 11 09:38:38 2024 -0700 Merge tag 'driver-core-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core / documentation fixes from Greg KH: "Here are some small fixes, and some documentation updates for 6.11-rc3. Included in here are: - embargoed hardware documenation updates based on a lot of review by legal-types in lots of companies to try to make the process a _bit_ easier for us to manage over time. - rust firmware documentation fix - driver detach race fix for the fix that went into 6.11-rc1 All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Fix uevent_show() vs driver detach race Documentation: embargoed-hardware-issues.rst: add a section documenting the "early access" process Documentation: embargoed-hardware-issues.rst: minor cleanups and fixes rust: firmware: fix invalid rustdoc link commit 9221afb2d8e8db75bbf71a223010e37db1b64f30 Merge: 04cc50c2f38b0 ffcf2eb4bfa24 Author: Linus Torvalds Date: Sun Aug 11 09:32:54 2024 -0700 Merge tag 'char-misc-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small char/misc/other driver fixes for 6.11-rc3 for reported issues. Included in here are: - binder driver fixes - fsi MODULE_DESCRIPTION() additions (people seem to love them...) - eeprom driver fix - Kconfig dependency fix to resolve build issues - spmi driver fixes All of these have been in linux-next for a while with no reported problems" * tag 'char-misc-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: spmi: pmic-arb: add missing newline in dev_err format strings spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree binder_alloc: Fix sleeping function called from invalid context binder: fix descriptor lookup for context manager char: add missing NetWinder MODULE_DESCRIPTION() macros misc: mrvl-cn10k-dpi: add PCI_IOV dependency eeprom: ee1004: Fix locking issues in ee1004_probe() fsi: add missing MODULE_DESCRIPTION() macros commit 04cc50c2f38b032a167b289f1b351a83dbcb853e Merge: 5189dafa4cf95 f874d7210d882 Author: Linus Torvalds Date: Sun Aug 11 09:28:04 2024 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two core fixes: one to prevent discard type changes (seen on iSCSI) during intermittent errors and the other is fixing a lockdep problem caused by the queue limits change. And one driver fix in ufs" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Keep the discard mode stable scsi: sd: Move sd_read_cpr() out of the q->limits_lock region scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic commit ef9718b3d54e822de294351251f3a574f8a082ce Author: Parsa Poorshikhian Date: Sat Aug 10 18:39:06 2024 +0330 ALSA: hda/realtek: Fix noise from speakers on Lenovo IdeaPad 3 15IAU7 Fix noise from speakers connected to AUX port when no sound is playing. The problem occurs because the `alc_shutup_pins` function includes a 0x10ec0257 vendor ID, which causes noise on Lenovo IdeaPad 3 15IAU7 with Realtek ALC257 codec when no sound is playing. Removing this vendor ID from the function fixes the bug. Fixes: 70794b9563fe ("ALSA: hda/realtek: Add more codec ID to no shutup pins list") Signed-off-by: Parsa Poorshikhian Link: https://patch.msgid.link/20240810150939.330693-1-parsa.poorsh@gmail.com Signed-off-by: Takashi Iwai commit 484caf207629e94f8414ffd50d2287ca3c7698e3 Merge: 9a039eeb71a42 6c3fc0b1c3d07 Author: David S. Miller Date: Sun Aug 11 04:49:53 2024 +0100 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-q ueue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-08-07 (igc) This series contains updates to igc driver only. Faizal adjusts the size of the MAC internal buffer on i226 devices to resolve an errata for leaking packet transmits. He also corrects a condition in which qbv_config_change_errors are incorrectly counted. Lastly, he adjusts the conditions for resetting the adapter when changing TSN Tx mode and corrects the conditions in which gtxoffset register is set. ==================== Signed-off-by: David S. Miller commit 9a039eeb71a42c8b13408a1976e300f3898e1be0 Author: Moon Yeounsu Date: Wed Aug 7 19:07:21 2024 +0900 net: ethernet: use ip_hdrlen() instead of bit shift `ip_hdr(skb)->ihl << 2` is the same as `ip_hdrlen(skb)` Therefore, we should use a well-defined function not a bit shift to find the header length. It also compresses two lines to a single line. Signed-off-by: Moon Yeounsu Reviewed-by: Christophe JAILLET Signed-off-by: David S. Miller commit aad41832326723627ad8ac9ee8a543b6dca4454d Author: Asmaa Mnebhi Date: Tue Jun 11 13:15:09 2024 -0400 gpio: mlxbf3: Support shutdown() function During Linux graceful reboot, the GPIO interrupts are not disabled. Since the drivers are not removed during graceful reboot, the logic to call mlxbf3_gpio_irq_disable() is not triggered. Interrupts that remain enabled can cause issues on subsequent boots. For example, the mlxbf-gige driver contains PHY logic to bring up the link. If the gpio-mlxbf3 driver loads first, the mlxbf-gige driver will use a GPIO interrupt to bring up the link. Otherwise, it will use polling. The next time Linux boots and loads the drivers in this order, we encounter the issue: - mlxbf-gige loads first and uses polling while the GPIO10 interrupt is still enabled from the previous boot. So if the interrupt triggers, there is nothing to clear it. - gpio-mlxbf3 loads. - i2c-mlxbf loads. The interrupt doesn't trigger for I2C because it is shared with the GPIO interrupt line which was not cleared. The solution is to add a shutdown function to the GPIO driver to clear and disable all interrupts. Also clear the interrupt after disabling it in mlxbf3_gpio_irq_disable(). Fixes: 38a700efc510 ("gpio: mlxbf3: Add gpio driver support") Signed-off-by: Asmaa Mnebhi Reviewed-by: David Thompson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240611171509.22151-1-asmaa@nvidia.com Signed-off-by: Bartosz Golaszewski commit 5189dafa4cf950e675f02ee04b577dfbbad0d9b1 Merge: 7299cd48aeceb 91da337e5d506 Author: Linus Torvalds Date: Sat Aug 10 10:44:21 2024 -0700 Merge tag 'nfsd-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Two minor fixes for recent changes * tag 'nfsd-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets sunrpc: avoid -Wformat-security warning commit 7299cd48aeceba873a52968d6d6edb34c15bac11 Merge: 0409cc53c4212 01a620d491592 Author: Linus Torvalds Date: Sat Aug 10 10:28:52 2024 -0700 Merge tag 'i2c-for-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - Two fixes for SMBusAlert handling in the I2C core: one to avoid an endless loop when scanning for handlers and one to make sure handlers are always called even if HW has broken behaviour - I2C header build fix for when ACPI is enabled but I2C isn't - The testunit gets a rename in the code to match the documentation - Two fixes for the Qualcomm GENI I2C controller are cleaning up the error exit patch in the runtime_resume() function. The first is disabling the clock, the second disables the icc on the way out * tag 'i2c-for-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: testunit: match HostNotify test name with docs i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runtime_resume i2c: Fix conditional for substituting empty ACPI functions i2c: smbus: Send alert notifications to all devices if source not found i2c: smbus: Improve handling of stuck alerts commit 0409cc53c42129cfeeaea610d0ebb91934491dca Merge: 31b244460634c bd44ca3de49cc Author: Linus Torvalds Date: Sat Aug 10 10:19:05 2024 -0700 Merge tag 'dma-mapping-6.11-2024-08-10' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: - avoid a deadlock with dma-debug and netconsole (Rik van Riel) * tag 'dma-mapping-6.11-2024-08-10' of git://git.infradead.org/users/hch/dma-mapping: dma-debug: avoid deadlock between dma debug vs printk and netconsole commit 31b244460634c74430745a74e56f5c88c43f079b Merge: 34ac1e82e5a78 8a2491db7bea6 Author: Linus Torvalds Date: Sat Aug 10 10:06:26 2024 -0700 Merge tag 'bcachefs-2024-08-10' of git://evilpiepirate.org/bcachefs Pull more bcachefs fixes from Kent Overstreet: "A couple last minute fixes for the new disk accounting - fix a bug that was causing ACLs to seemingly "disappear" - new on disk format version, bcachefs_metadata_version_disk_accounting_v3 bcachefs_metadata_version_disk_accounting_v2 accidentally included padding in disk_accounting_key; fortunately, 6.11 isn't out yet so we can fix this with another version bump" * tag 'bcachefs-2024-08-10' of git://evilpiepirate.org/bcachefs: bcachefs: bcachefs_metadata_version_disk_accounting_v3 bcachefs: improve bch2_dev_usage_to_text() bcachefs: bch2_accounting_invalid() bcachefs: Switch to .get_inode_acl() commit 2ad4e1ada8eebafa2d75a4b75eeeca882de6ada1 Author: Janne Grunau Date: Sat Aug 3 21:52:55 2024 +0200 wifi: brcmfmac: cfg80211: Handle SSID based pmksa deletion wpa_supplicant 2.11 sends since 1efdba5fdc2c ("Handle PMKSA flush in the driver for SAE/OWE offload cases") SSID based PMKSA del commands. brcmfmac is not prepared and tries to dereference the NULL bssid and pmkid pointers in cfg80211_pmksa. PMKID_V3 operations support SSID based updates so copy the SSID. Fixes: a96202acaea4 ("wifi: brcmfmac: cfg80211: Add support for PMKID_V3 operations") Cc: stable@vger.kernel.org # 6.4.x Signed-off-by: Janne Grunau Reviewed-by: Neal Gompa Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240803-brcmfmac_pmksa_del_ssid-v1-1-4e85f19135e1@jannau.net commit ccbfcac05866ebe6eb3bc6d07b51d4ed4fcde436 Author: Takashi Iwai Date: Sat Aug 10 10:48:32 2024 +0200 ALSA: timer: Relax start tick time check for slave timer elements The recent addition of a sanity check for a too low start tick time seems breaking some applications that uses aloop with a certain slave timer setup. They may have the initial resolution 0, hence it's treated as if it were a too low value. Relax and skip the check for the slave timer instance for addressing the regression. Fixes: 4a63bd179fa8 ("ALSA: timer: Set lower bound of start tick time") Cc: Link: https://github.com/raspberrypi/linux/issues/6294 Link: https://patch.msgid.link/20240810084833.10939-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 03f9885c60adf73488fe32aab628ee3d4a39598e Author: Yong-Xuan Wang Date: Fri Aug 9 15:10:47 2024 +0800 irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration The section 4.5.2 of the RISC-V AIA specification says that "any write to a sourcecfg register of an APLIC might (or might not) cause the corresponding interrupt-pending bit to be set to one if the rectified input value is high (= 1) under the new source mode." When the interrupt type is changed in the sourcecfg register, the APLIC device might not set the corresponding pending bit, so the interrupt might never become pending. To handle sourcecfg register changes for level-triggered interrupts in MSI mode, manually set the pending bit for retriggering interrupt so it gets retriggered if it was already asserted. Fixes: ca8df97fe679 ("irqchip/riscv-aplic: Add support for MSI-mode") Signed-off-by: Yong-Xuan Wang Signed-off-by: Thomas Gleixner Reviewed-by: Vincent Chen Reviewed-by: Anup Patel Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240809071049.2454-1-yongxuan.wang@sifive.com commit d73f0f49daa84176c3beee1606e73c7ffb6af8b2 Author: Radhey Shyam Pandey Date: Fri Aug 9 12:32:24 2024 +0530 irqchip/xilinx: Fix shift out of bounds The device tree property 'xlnx,kind-of-intr' is sanity checked that the bitmask contains only set bits which are in the range of the number of interrupts supported by the controller. The check is done by shifting the mask right by the number of supported interrupts and checking the result for zero. The data type of the mask is u32 and the number of supported interrupts is up to 32. In case of 32 interrupts the shift is out of bounds, resulting in a mismatch warning. The out of bounds condition is also reported by UBSAN: UBSAN: shift-out-of-bounds in irq-xilinx-intc.c:332:22 shift exponent 32 is too large for 32-bit type 'unsigned int' Fix it by promoting the mask to u64 for the test. Fixes: d50466c90724 ("microblaze: intc: Refactor DT sanity check") Signed-off-by: Radhey Shyam Pandey Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/1723186944-3571957-1-git-send-email-radhey.shyam.pandey@amd.com commit eb755a956f618ff113355333b1af68973ce9d861 Merge: d2438c16a6347 0b4a4534d083e Author: Jakub Kicinski Date: Fri Aug 9 22:16:48 2024 -0700 Merge branch 'mlx5-misc-fixes-2024-08-08' Tariq Toukan says: ==================== mlx5 misc fixes 2024-08-08 This patchset provides misc bug fixes from the team to the mlx5 core and Eth drivers. ==================== Link: https://patch.msgid.link/20240808144107.2095424-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 0b4a4534d083e055831b3bc29c5eafc918ed4d86 Author: Gal Pressman Date: Thu Aug 8 17:41:06 2024 +0300 net/mlx5e: Fix queue stats access to non-existing channels splat The queue stats API queries the queues according to the real_num_[tr]x_queues, in case the device is down and channels were not yet created, don't try to query their statistics. To trigger the panic, run this command before the interface is brought up: ./cli.py --spec ../../../Documentation/netlink/specs/netdev.yaml --dump qstats-get --json '{"ifindex": 4}' BUG: kernel NULL pointer dereference, address: 0000000000000c00 PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP PTI CPU: 3 UID: 0 PID: 977 Comm: python3 Not tainted 6.10.0+ #40 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5e_get_queue_stats_rx+0x3c/0xb0 [mlx5_core] Code: fc 55 48 63 ee 53 48 89 d3 e8 40 3d 70 e1 85 c0 74 58 4c 89 ef e8 d4 07 04 00 84 c0 75 41 49 8b 84 24 f8 39 00 00 48 8b 04 e8 <48> 8b 90 00 0c 00 00 48 03 90 40 0a 00 00 48 89 53 08 48 8b 90 08 RSP: 0018:ffff888116be37d0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff888116be3868 RCX: 0000000000000004 RDX: ffff88810ada4000 RSI: 0000000000000000 RDI: ffff888109df09c0 RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000004 R10: ffff88813461901c R11: ffffffffffffffff R12: ffff888109df0000 R13: ffff888109df09c0 R14: ffff888116be38d0 R15: 0000000000000000 FS: 00007f4375d5c740(0000) GS:ffff88852c980000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000c00 CR3: 0000000106ada006 CR4: 0000000000370eb0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __die+0x1f/0x60 ? page_fault_oops+0x14e/0x3d0 ? exc_page_fault+0x73/0x130 ? asm_exc_page_fault+0x22/0x30 ? mlx5e_get_queue_stats_rx+0x3c/0xb0 [mlx5_core] netdev_nl_stats_by_netdev+0x2a6/0x4c0 ? __rmqueue_pcplist+0x351/0x6f0 netdev_nl_qstats_get_dumpit+0xc4/0x1b0 genl_dumpit+0x2d/0x80 netlink_dump+0x199/0x410 __netlink_dump_start+0x1aa/0x2c0 genl_family_rcv_msg_dumpit+0x94/0xf0 ? __pfx_genl_start+0x10/0x10 ? __pfx_genl_dumpit+0x10/0x10 ? __pfx_genl_done+0x10/0x10 genl_rcv_msg+0x116/0x2b0 ? __pfx_netdev_nl_qstats_get_dumpit+0x10/0x10 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x54/0x100 genl_rcv+0x24/0x40 netlink_unicast+0x21a/0x340 netlink_sendmsg+0x1f4/0x440 __sys_sendto+0x1b6/0x1c0 ? do_sock_setsockopt+0xc3/0x180 ? __sys_setsockopt+0x60/0xb0 __x64_sys_sendto+0x20/0x30 do_syscall_64+0x50/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f43757132b0 Code: c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 1d 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 68 c3 0f 1f 80 00 00 00 00 41 54 48 83 ec 20 RSP: 002b:00007ffd258da048 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007ffd258da0f8 RCX: 00007f43757132b0 RDX: 000000000000001c RSI: 00007f437464b850 RDI: 0000000000000003 RBP: 00007f4375085de0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: ffffffffc4653600 R14: 0000000000000001 R15: 00007f43751a6147 Modules linked in: netconsole 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 ib_umad rdma_cm ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core zram zsmalloc mlx5_core fuse [last unloaded: netconsole] CR2: 0000000000000c00 ---[ end trace 0000000000000000 ]--- RIP: 0010:mlx5e_get_queue_stats_rx+0x3c/0xb0 [mlx5_core] Code: fc 55 48 63 ee 53 48 89 d3 e8 40 3d 70 e1 85 c0 74 58 4c 89 ef e8 d4 07 04 00 84 c0 75 41 49 8b 84 24 f8 39 00 00 48 8b 04 e8 <48> 8b 90 00 0c 00 00 48 03 90 40 0a 00 00 48 89 53 08 48 8b 90 08 RSP: 0018:ffff888116be37d0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff888116be3868 RCX: 0000000000000004 RDX: ffff88810ada4000 RSI: 0000000000000000 RDI: ffff888109df09c0 RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000004 R10: ffff88813461901c R11: ffffffffffffffff R12: ffff888109df0000 R13: ffff888109df09c0 R14: ffff888116be38d0 R15: 0000000000000000 FS: 00007f4375d5c740(0000) GS:ffff88852c980000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000c00 CR3: 0000000106ada006 CR4: 0000000000370eb0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 7b66ae536a78 ("net/mlx5e: Add per queue netdev-genl stats") Signed-off-by: Gal Pressman Signed-off-by: Tariq Toukan Reviewed-by: Joe Damato Link: https://patch.msgid.link/20240808144107.2095424-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit cbc796be1779c4dbc9a482c7233995e2a8b6bfb3 Author: Cosmin Ratiu Date: Thu Aug 8 17:41:05 2024 +0300 net/mlx5e: Correctly report errors for ethtool rx flows Previously, an ethtool rx flow with no attrs would not be added to the NIC as it has no rules to configure the hw with, but it would be reported as successful to the caller (return code 0). This is confusing for the user as ethtool then reports "Added rule $num", but no rule was actually added. This change corrects that by instead reporting these wrong rules as -EINVAL. Fixes: b29c61dac3a2 ("net/mlx5e: Ethtool steering flow validation refactoring") Signed-off-by: Cosmin Ratiu Reviewed-by: Saeed Mahameed Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240808144107.2095424-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit e6b5afd30b99b43682a7764e1a74a42fe4d5f4b3 Author: Dragos Tatulea Date: Thu Aug 8 17:41:04 2024 +0300 net/mlx5e: Take state lock during tx timeout reporter mlx5e_safe_reopen_channels() requires the state lock taken. The referenced changed in the Fixes tag removed the lock to fix another issue. This patch adds it back but at a later point (when calling mlx5e_safe_reopen_channels()) to avoid the deadlock referenced in the Fixes tag. Fixes: eab0da38912e ("net/mlx5e: Fix possible deadlock on mlx5e_tx_timeout_work") Signed-off-by: Dragos Tatulea Link: https://lore.kernel.org/all/ZplpKq8FKi3vwfxv@gmail.com/T/ Reviewed-by: Breno Leitao Reviewed-by: Moshe Shemesh Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240808144107.2095424-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit ab6013a59b4d0947fda409c29426dc904959e632 Author: Dragos Tatulea Date: Thu Aug 8 17:41:03 2024 +0300 net/mlx5e: SHAMPO, Increase timeout to improve latency During latency tests (netperf TCP_RR) a 30% degradation of HW GRO vs SW GRO was observed. This is due to SHAMPO triggering timeout filler CQEs instead of delivering the CQE for the packet. Having a short timeout for SHAMPO doesn't bring any benefits as it is the driver that does the merging, not the hardware. On the contrary, it can have a negative impact: additional filler CQEs are generated due to the timeout. As there is no way to disable this timeout, this change sets it to the maximum value. Instead of using the packet_merge.timeout parameter which is also used for LRO, set the value directly when filling in the rest of the SHAMPO parameters in mlx5e_build_rq_param(). Fixes: 99be56171fa9 ("net/mlx5e: SHAMPO, Re-enable HW-GRO") Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240808144107.2095424-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit c31fe2b5095d8c84562ce90db07600f7e9f318df Author: Tariq Toukan Date: Thu Aug 8 17:41:02 2024 +0300 net/mlx5: SD, Do not query MPIR register if no sd_group Unconditionally calling the MPIR query on BF separate mode yields the FW syndrome below [1]. Do not call it unless admin clearly specified the SD group, i.e. expressing the intention of using the multi-PF netdev feature. This fix covers cases not covered in commit fca3b4791850 ("net/mlx5: Do not query MPIR on embedded CPU function"). [1] mlx5_cmd_out_err:808:(pid 8267): ACCESS_REG(0x805) op_mod(0x1) failed, status bad system state(0x4), syndrome (0x685f19), err(-5) Fixes: 678eb448055a ("net/mlx5: SD, Implement basic query and instantiation") Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Link: https://patch.msgid.link/20240808144107.2095424-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d2438c16a6347f811ab0249330ee9e54fa3db6b0 Merge: 3a3be7ff9224f 1d2c46c1bc568 Author: Jakub Kicinski Date: Fri Aug 9 21:58:11 2024 -0700 Merge branch 'don-t-take-hw-uso-path-when-packets-can-t-be-checksummed-by-device' Jakub Sitnicki says: ==================== Don't take HW USO path when packets can't be checksummed by device This series addresses a recent regression report from syzbot [1]. After enabling UDP_SEGMENT for egress devices which don't support checksum offload [2], we need to tighten down the checks which let packets take the HW USO path. The fix consists of two parts: 1. don't let devices offer USO without checksum offload, and 2. force software USO fallback in presence of IPv6 extension headers. [1] https://lore.kernel.org/all/000000000000e1609a061d5330ce@google.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=10154dbded6d6a2fecaebdfda206609de0f121a9 v3: https://lore.kernel.org/r/20240807-udp-gso-egress-from-tunnel-v3-0-8828d93c5b45@cloudflare.com v2: https://lore.kernel.org/r/20240801-udp-gso-egress-from-tunnel-v2-0-9a2af2f15d8d@cloudflare.com v1: https://lore.kernel.org/r/20240725-udp-gso-egress-from-tunnel-v1-0-5e5530ead524@cloudflare.com ==================== Link: https://patch.msgid.link/20240808-udp-gso-egress-from-tunnel-v4-0-f5c5b4149ab9@cloudflare.com Signed-off-by: Jakub Kicinski commit 1d2c46c1bc5680335f20f64089c161fdfcd3e8ab Author: Jakub Sitnicki Date: Thu Aug 8 11:56:23 2024 +0200 selftests/net: Add coverage for UDP GSO with IPv6 extension headers After enabling UDP GSO for devices not offering checksum offload, we have hit a regression where a bad offload warning can be triggered when sending a datagram with IPv6 extension headers. Extend the UDP GSO IPv6 tests to cover this scenario. Reviewed-by: Willem de Bruijn Signed-off-by: Jakub Sitnicki Link: https://patch.msgid.link/20240808-udp-gso-egress-from-tunnel-v4-3-f5c5b4149ab9@cloudflare.com Signed-off-by: Jakub Kicinski commit 30b03f2a0592eee1267298298eac9dd655f55ab2 Author: Jakub Sitnicki Date: Thu Aug 8 11:56:22 2024 +0200 udp: Fall back to software USO if IPv6 extension headers are present In commit 10154dbded6d ("udp: Allow GSO transmit from devices with no checksum offload") we have intentionally allowed UDP GSO packets marked CHECKSUM_NONE to pass to the GSO stack, so that they can be segmented and checksummed by a software fallback when the egress device lacks these features. What was not taken into consideration is that a CHECKSUM_NONE skb can be handed over to the GSO stack also when the egress device advertises the tx-udp-segmentation / NETIF_F_GSO_UDP_L4 feature. This will happen when there are IPv6 extension headers present, which we check for in __ip6_append_data(). Syzbot has discovered this scenario, producing a warning as below: ip6tnl0: caps=(0x00000006401d7869, 0x00000006401d7869) WARNING: CPU: 0 PID: 5112 at net/core/dev.c:3293 skb_warn_bad_offload+0x166/0x1a0 net/core/dev.c:3291 Modules linked in: CPU: 0 PID: 5112 Comm: syz-executor391 Not tainted 6.10.0-rc7-syzkaller-01603-g80ab5445da62 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 RIP: 0010:skb_warn_bad_offload+0x166/0x1a0 net/core/dev.c:3291 [...] Call Trace: __skb_gso_segment+0x3be/0x4c0 net/core/gso.c:127 skb_gso_segment include/net/gso.h:83 [inline] validate_xmit_skb+0x585/0x1120 net/core/dev.c:3661 __dev_queue_xmit+0x17a4/0x3e90 net/core/dev.c:4415 neigh_output include/net/neighbour.h:542 [inline] ip6_finish_output2+0xffa/0x1680 net/ipv6/ip6_output.c:137 ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222 ip6_send_skb+0x112/0x230 net/ipv6/ip6_output.c:1958 udp_v6_send_skb+0xbf5/0x1870 net/ipv6/udp.c:1292 udpv6_sendmsg+0x23b3/0x3270 net/ipv6/udp.c:1588 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xef/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2585 ___sys_sendmsg net/socket.c:2639 [inline] __sys_sendmmsg+0x3b2/0x740 net/socket.c:2725 __do_sys_sendmmsg net/socket.c:2754 [inline] __se_sys_sendmmsg net/socket.c:2751 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2751 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 [...] We are hitting the bad offload warning because when an egress device is capable of handling segmentation offload requested by skb_shinfo(skb)->gso_type, the chain of gso_segment callbacks won't produce any segment skbs and return NULL. See the skb_gso_ok() branch in {__udp,tcp,sctp}_gso_segment helpers. To fix it, force a fallback to software USO when processing a packet with IPv6 extension headers, since we don't know if these can checksummed by all devices which offer USO. Fixes: 10154dbded6d ("udp: Allow GSO transmit from devices with no checksum offload") Reported-by: syzbot+e15b7e15b8a751a91d9a@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000e1609a061d5330ce@google.com/ Reviewed-by: Willem de Bruijn Signed-off-by: Jakub Sitnicki Link: https://patch.msgid.link/20240808-udp-gso-egress-from-tunnel-v4-2-f5c5b4149ab9@cloudflare.com Signed-off-by: Jakub Kicinski commit 2b2bc3bab158b7e036508742b16cd8a3c2f59a12 Author: Jakub Sitnicki Date: Thu Aug 8 11:56:21 2024 +0200 net: Make USO depend on CSUM offload UDP segmentation offload inherently depends on checksum offload. It should not be possible to disable checksum offload while leaving USO enabled. Enforce this dependency in code. There is a single tx-udp-segmentation feature flag to indicate support for both IPv4/6, hence the devices wishing to support USO must offer checksum offload for both IP versions. Fixes: 10154dbded6d ("udp: Allow GSO transmit from devices with no checksum offload") Suggested-by: Willem de Bruijn Signed-off-by: Jakub Sitnicki Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240808-udp-gso-egress-from-tunnel-v4-1-f5c5b4149ab9@cloudflare.com Signed-off-by: Jakub Kicinski commit 3a3be7ff9224f424e485287b54be00d2c6bd9c40 Author: Eric Dumazet Date: Thu Aug 8 13:24:55 2024 +0000 gtp: pull network headers in gtp_dev_xmit() syzbot/KMSAN reported use of uninit-value in get_dev_xmit() [1] We must make sure the IPv4 or Ipv6 header is pulled in skb->head before accessing fields in them. Use pskb_inet_may_pull() to fix this issue. [1] BUG: KMSAN: uninit-value in ipv6_pdp_find drivers/net/gtp.c:220 [inline] BUG: KMSAN: uninit-value in gtp_build_skb_ip6 drivers/net/gtp.c:1229 [inline] BUG: KMSAN: uninit-value in gtp_dev_xmit+0x1424/0x2540 drivers/net/gtp.c:1281 ipv6_pdp_find drivers/net/gtp.c:220 [inline] gtp_build_skb_ip6 drivers/net/gtp.c:1229 [inline] gtp_dev_xmit+0x1424/0x2540 drivers/net/gtp.c:1281 __netdev_start_xmit include/linux/netdevice.h:4913 [inline] netdev_start_xmit include/linux/netdevice.h:4922 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x247/0xa20 net/core/dev.c:3596 __dev_queue_xmit+0x358c/0x5610 net/core/dev.c:4423 dev_queue_xmit include/linux/netdevice.h:3105 [inline] packet_xmit+0x9c/0x6c0 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3145 [inline] packet_sendmsg+0x90e3/0xa3a0 net/packet/af_packet.c:3177 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:745 __sys_sendto+0x685/0x830 net/socket.c:2204 __do_sys_sendto net/socket.c:2216 [inline] __se_sys_sendto net/socket.c:2212 [inline] __x64_sys_sendto+0x125/0x1d0 net/socket.c:2212 x64_sys_call+0x3799/0x3c10 arch/x86/include/generated/asm/syscalls_64.h:45 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 created at: slab_post_alloc_hook mm/slub.c:3994 [inline] slab_alloc_node mm/slub.c:4037 [inline] kmem_cache_alloc_node_noprof+0x6bf/0xb80 mm/slub.c:4080 kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:583 __alloc_skb+0x363/0x7b0 net/core/skbuff.c:674 alloc_skb include/linux/skbuff.h:1320 [inline] alloc_skb_with_frags+0xc8/0xbf0 net/core/skbuff.c:6526 sock_alloc_send_pskb+0xa81/0xbf0 net/core/sock.c:2815 packet_alloc_skb net/packet/af_packet.c:2994 [inline] packet_snd net/packet/af_packet.c:3088 [inline] packet_sendmsg+0x749c/0xa3a0 net/packet/af_packet.c:3177 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:745 __sys_sendto+0x685/0x830 net/socket.c:2204 __do_sys_sendto net/socket.c:2216 [inline] __se_sys_sendto net/socket.c:2212 [inline] __x64_sys_sendto+0x125/0x1d0 net/socket.c:2212 x64_sys_call+0x3799/0x3c10 arch/x86/include/generated/asm/syscalls_64.h:45 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 CPU: 0 UID: 0 PID: 7115 Comm: syz.1.515 Not tainted 6.11.0-rc1-syzkaller-00043-g94ede2a3e913 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Fixes: 999cb275c807 ("gtp: add IPv6 support") Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Eric Dumazet Cc: Harald Welte Reviewed-by: Pablo Neira Ayuso Link: https://patch.msgid.link/20240808132455.3413916-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 34ac1e82e5a78d5ed7f647766f5b1b51ca4d983a Merge: 57b935eb8c553 36bb22a08a69d Author: Linus Torvalds Date: Fri Aug 9 21:33:25 2024 -0700 Merge tag '6.11-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - DFS fix - fix for security flags for requiring encryption - minor cleanup * tag '6.11-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath Fix spelling errors in Server Message Block smb3: fix setting SecurityFlags when encryption is required commit 57b935eb8c553b93e7c88fc3c6f9163b06ef907e Merge: 15833fea97c1f 730bbfaf7d489 Author: Linus Torvalds Date: Fri Aug 9 21:26:50 2024 -0700 Merge tag 'spi-fix-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few SPI fixes: clock rate calculation fixes for the Kunpeng and lpsi drivers and a missing registration of a device ID for spidev (which had only been updated for DT cases, causing warnings)" * tag 'spi-fix-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-fsl-lpspi: Fix scldiv calculation spi: spidev: Add missing spi_device_id for bh2228fv spi: hisi-kunpeng: Add verification for the max_frequency provided by the firmware spi: hisi-kunpeng: Add validation for the minimum value of speed_hz commit 3eb3cd5992f7a0c37edc8d05b4c38c98758d8671 Author: Kees Cook Date: Wed Aug 7 12:51:23 2024 -0700 binfmt_flat: Fix corruption when not offsetting data start Commit 04d82a6d0881 ("binfmt_flat: allow not offsetting data start") introduced a RISC-V specific variant of the FLAT format which does not allocate any space for the (obsolete) array of shared library pointers. However, it did not disable the code which initializes the array, resulting in the corruption of sizeof(long) bytes before the DATA segment, generally the end of the TEXT segment. Introduce MAX_SHARED_LIBS_UPDATE which depends on the state of CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET to guard the initialization of the shared library pointer region so that it will only be initialized if space is reserved for it. Fixes: 04d82a6d0881 ("binfmt_flat: allow not offsetting data start") Co-developed-by: Stefan O'Rear Signed-off-by: Stefan O'Rear Reviewed-by: Damien Le Moal Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20240807195119.it.782-kees@kernel.org Signed-off-by: Kees Cook commit 4bbe6002931954bbe82b25f25990b987b0392e18 Author: Arnaldo Carvalho de Melo Date: Thu Jul 18 16:38:07 2024 -0300 perf daemon: Fix the build on 32-bit architectures Noticed with: 1 6.22 debian:experimental-x-mipsel : FAIL gcc version 13.2.0 (Debian 13.2.0-25) builtin-daemon.c: In function 'cmd_session_list': builtin-daemon.c:691:35: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=] Use inttypes.h's PRIu64 to deal with that. Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/ZplvH21aQ8pzmza_@x1 Signed-off-by: Namhyung Kim commit 8a2491db7bea6ad88ec568731eafd583501f1c96 Author: Kent Overstreet Date: Fri Aug 9 00:25:25 2024 -0400 bcachefs: bcachefs_metadata_version_disk_accounting_v3 bcachefs_metadata_version_disk_accounting_v2 erroneously had padding bytes in disk_accounting_key, which is a problem because we have to guarantee that all unused bytes in disk_accounting_key are zeroed. Fortunately 6.11 isn't out yet, so it's cheap to fix this by spinning a new version. Reported-by: Gabriel de Perthuis Signed-off-by: Kent Overstreet commit 2c402bd2e85b44dc00ef85b5c0e217de684b5372 Author: Li Ming Date: Fri Aug 9 08:27:50 2024 +0000 cxl/test: Skip cxl_setup_parent_dport() for emulated dports The cxl_test unit test environment on qemu always hits below call trace with KASAN enabled: BUG: KASAN: slab-out-of-bounds in cxl_setup_parent_dport+0x480/0x530 [cxl_core] Read of size 1 at addr ff110000676014f8 by task (udev-worker)/676[ 24.424403] CPU: 2 PID: 676 Comm: (udev-worker) Tainted: G O N 6.10.0-qemucxl #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20240214-2.el9 02/14/2024 Call Trace: dump_stack_lvl+0xea/0x150 print_report+0xce/0x610 ? kasan_complete_mode_report_info+0x40/0x200 kasan_report+0xcc/0x110 __asan_report_load1_noabort+0x18/0x20 cxl_setup_parent_dport+0x480/0x530 [cxl_core] cxl_mem_probe+0x49b/0xaa0 [cxl_mem] cxl_test module models a CXL topology for testing, it creates some emulated dports with platform devices in the CXL topology, so the dport_dev of an emulated dport points to a platform device rather than a pci device or a pci host bridge in the case. Currently, cxl_setup_parent_dport() is used to set up RAS and AER capability on the dport connected to the CXL memory device, but cxl_test does not support RAS or AER functionality yet, so the fix is implementing a __wrap_cxl_setup_parent_dport() to filter out all emulated dports, guarantees only real dports can be handled by cxl_setup_parent_dport(). Fixes: f05fd10d138d ("cxl/pci: Add RCH downstream port AER register discovery") Reported-by: Pengfei Xu Closes: https://lore.kernel.org/linux-cxl/ZrHTBp2O+HtUe6kt@xpf.sh.intel.com/T/#t Signed-off-by: Li Ming Reviewed-by: Dan Williams Reviewed-by: Ira Weiny Reviewed-by: Alison Schofield Tested-by: Ira Weiny Tested-by: Alison Schofield Link: https://patch.msgid.link/20240809082750.3015641-3-ming4.li@intel.com Signed-off-by: Dave Jiang commit 8c251c5ab1b7cd204231e4ee936bfe078a33f234 Author: Li Ming Date: Fri Aug 9 08:27:49 2024 +0000 cxl/pci: Get AER capability address from RCRB only for RCH dport cxl_setup_parent_dport() needs to get RCH dport AER capability address from RCRB to disable AER interrupt. The function does not check if dport is RCH dport, it will get a wrong pci_host_bridge structure by dport_dev in VH case because dport_dev points to a pci device(RP or switch DSP) rather than a pci host bridge device. Fixes: f05fd10d138d ("cxl/pci: Add RCH downstream port AER register discovery") Signed-off-by: Li Ming Reviewed-by: Dan Williams Reviewed-by: Ira Weiny Tested-by: Ira Weiny Tested-by: Alison Schofield Link: https://patch.msgid.link/20240809082750.3015641-2-ming4.li@intel.com Signed-off-by: Dave Jiang commit 0eba65f0310d3c7d5516c7fd4c172d0bfa8b285b Author: Miguel Ojeda Date: Tue Aug 6 16:45:58 2024 +0200 rust: x86: remove `-3dnow{,a}` from target features LLVM 19 is dropping support for 3DNow! in commit f0eb5587ceeb ("Remove support for 3DNow!, both intrinsics and builtins. (#96246)"): Remove support for 3DNow!, both intrinsics and builtins. (#96246) This set of instructions was only supported by AMD chips starting in the K6-2 (introduced 1998), and before the "Bulldozer" family (2011). They were never much used, as they were effectively superseded by the more-widely-implemented SSE (first implemented on the AMD side in Athlon XP in 2001). This is being done as a predecessor towards general removal of MMX register usage. Since there is almost no usage of the 3DNow! intrinsics, and no modern hardware even implements them, simple removal seems like the best option. Thus we should avoid passing these to the backend, since otherwise we get a diagnostic about it: '-3dnow' is not a recognized feature for this target (ignoring feature) '-3dnowa' is not a recognized feature for this target (ignoring feature) We could try to disable them only up to LLVM 19 (not the C side one, but the one used by `rustc`, which may be built with a range of LLVMs). However, to avoid more complexity, we can likely just remove them altogether. According to Nikita [2]: > I don't think it's needed because LLVM should not generate 3dnow > instructions unless specifically asked to, using intrinsics that > Rust does not provide in the first place. Thus do so, like Rust did for one of their builtin targets [3]. For those curious: Clang will warn only about trying to enable them (`-m3dnow{,a}`), but not about disabling them (`-mno-3dnow{,a}`), so there is no change needed there. Cc: Nikita Popov Cc: Nathan Chancellor Cc: x86@kernel.org Link: https://github.com/llvm/llvm-project/commit/f0eb5587ceeb641445b64cb264c822b4751de04a [1] Link: https://github.com/rust-lang/rust/pull/127864#issuecomment-2235898760 [2] Link: https://github.com/rust-lang/rust/pull/127864 [3] Closes: https://github.com/Rust-for-Linux/linux/issues/1094 Tested-by: Benno Lossin Tested-by: Alice Ryhl Link: https://lore.kernel.org/r/20240806144558.114461-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit d734422b7dd7d033fc02e421924e70dabf665b4c Author: Miguel Ojeda Date: Wed Aug 7 01:35:59 2024 +0200 kbuild: rust-analyzer: mark `rust_is_available.sh` invocation as recursive When calling the `rust_is_available.sh` script, we need to make the jobserver available to it, as commit ecab4115c44c ("kbuild: mark `rustc` (and others) invocations as recursive") explains and did for the others. Otherwise, we get a warning from `rustc` when calling `make rust-analyzer` with parallel jobs, e.g. `-j8`. Using several jobs for that target does not really matter, but developers may call `make` with jobs enabled in all cases. Thus fix it. Fixes: 6dc9d9ca9a72 ("kbuild: rust-analyzer: better error handling") Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20240806233559.246705-1-ojeda@kernel.org [ Reworded to add a couple more details mentioned in the list. - Miguel ] Signed-off-by: Miguel Ojeda commit 02dfd63afe65f7bacad543ba2b10f77083ae7929 Author: Miguel Ojeda Date: Tue Aug 6 17:06:19 2024 +0200 rust: add intrinsics to fix `-Os` builds Alice reported [1] that an arm64 build failed with: ld.lld: error: undefined symbol: __extendsfdf2 >>> referenced by core.a6f5fc5794e7b7b3-cgu.0 >>> rust/core.o:(::midpoint) in archive vmlinux.a >>> referenced by core.a6f5fc5794e7b7b3-cgu.0 >>> rust/core.o:(::midpoint) in archive vmlinux.a ld.lld: error: undefined symbol: __truncdfsf2 >>> referenced by core.a6f5fc5794e7b7b3-cgu.0 >>> rust/core.o:(::midpoint) in archive vmlinux.a Rust 1.80.0 or later together with `CONFIG_CC_OPTIMIZE_FOR_SIZE=y` is what triggers it. In addition, x86_64 builds also fail the same way. Similarly, compiling with Rust 1.82.0 (currently in nightly) makes another one appear, possibly due to the LLVM 19 upgrade there: ld.lld: error: undefined symbol: __eqdf2 >>> referenced by core.20495ea57a9f069d-cgu.0 >>> rust/core.o:(::next_up) in archive vmlinux.a >>> referenced by core.20495ea57a9f069d-cgu.0 >>> rust/core.o:(::next_down) in archive vmlinux.a Gary adds [1]: > Usually the fix on rustc side is to mark those functions as `#[inline]` > > All of {midpoint,next_up,next_down} are indeed unstable functions not > marked as inline... Fix all those by adding those intrinsics to our usual workaround. [ Trevor quickly submitted a fix to upstream Rust [2] that has already been merged, to be released in Rust 1.82.0 (2024-10-17). - Miguel ] Cc: Gary Guo Reported-by: Alice Ryhl Closes: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/455637364 [1] Reviewed-by: Trevor Gross Tested-by: Alice Ryhl Tested-by: Boqun Feng Reviewed-by: Gary Guo Link: https://github.com/rust-lang/rust/pull/128749 [2] Link: https://lore.kernel.org/r/20240806150619.192882-1-ojeda@kernel.org [ Shortened Zulip link. - Miguel ] Signed-off-by: Miguel Ojeda commit 869b5016e94eced02f2cf99bf53c69b49adcee32 Author: Zehui Xu Date: Wed Jul 31 16:43:46 2024 +0300 kbuild: rust: skip -fmin-function-alignment in bindgen flags GCC 14 recently added -fmin-function-alignment option and the root Makefile uses it to replace -falign-functions when available. However, this flag can cause issues when passed to the Rust Makefile and affect the bindgen process. Bindgen relies on libclang to parse C code, and currently does not support the -fmin-function-alignment flag, leading to compilation failures when GCC 14 is used. This patch addresses the issue by adding -fmin-function-alignment to the bindgen_skip_c_flags in rust/Makefile. This prevents the flag from causing compilation issues. [ Matthew and Gary confirm function alignment should not change the ABI in a way that bindgen would care about, thus we did not need the extra logic for bindgen from v2. - Miguel ] Link: https://lore.kernel.org/linux-kbuild/20240222133500.16991-1-petr.pavlu@suse.com/ Signed-off-by: Zehui Xu Reviewed-by: Alice Ryhl Reviewed-by: Neal Gompa Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20240731134346.10630-1-zehuixu@whu.edu.cn [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda commit 15833fea97c1fdb3b34fceefa4b51177dd57e18f Merge: afdab700f65e1 06f5b920d1d0b Author: Linus Torvalds Date: Fri Aug 9 14:00:22 2024 -0700 Merge tag 'drm-fixes-2024-08-10' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Weekly regular fixes, mostly amdgpu with i915/xe having a few each, and then some misc bits across the board, seems about right for rc3 time. client: - fix null ptr deref bridge: - connector: fix double free atomic: - fix async flip update panel: - document panel omap: - add config dependency tests: - fix gem shmem test drm buddy: - Add start address to trim function amdgpu: - DMCUB fix - Fix DET programming on some DCNs - DCC fixes - DCN 4.0.1 fixes - SMU 14.0.x update - MMHUB fix - DCN 3.1.4 fix - GC 12.0 fixes - Fix soft recovery error propogation - SDMA 7.0 fixes - DSC fix xe: - Fix off-by-one when processing RTP rules - Use dma_fence_chain_free in chain fence unused as a sync - Fix PL1 disable flow in xe_hwmon_power_max_write - Take ref to VM in delayed dump snapshot i915: - correct dual pps handling for MTL_PCH+ [display] - Adjust vma offset for framebuffer mmap offset [gem] - Fix Virtual Memory mapping boundaries calculation [gem] - Allow evicting to use the requested placement - Attempt to get pages without eviction first" * tag 'drm-fixes-2024-08-10' of https://gitlab.freedesktop.org/drm/kernel: (31 commits) drm/xe: Take ref to VM in delayed snapshot drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write drm/xe: Use dma_fence_chain_free in chain fence unused as a sync drm/xe/rtp: Fix off-by-one when processing rules drm/amdgpu: Add DCC GFX12 flag to enable address alignment drm/amdgpu: correct sdma7 max dw drm/amdgpu: Add address alignment support to DCC buffers drm/amd/display: Skip Recompute DSC Params if no Stream on Link drm/amdgpu: change non-dcc buffer copy configuration drm/amdgpu: Forward soft recovery errors to userspace drm/amdgpu: add golden setting for gc v12 drm/buddy: Add start address support to trim function drm/amd/display: Add missing program DET segment call to pipe init drm/amd/display: Add missing DCN314 to the DML Makefile drm/amdgpu: force to use legacy inv in mmhub drm/amd/pm: update powerplay structure on smu v14.0.2/3 drm/amd/display: Add missing mcache registers drm/amd/display: Add dcc propagation value drm/amd/display: Add missing DET segments programming drm/amd/display: Replace dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd ... commit d5240fa65db071909e9d1d5adcc5fd1abc8e96fe Author: Zhihao Cheng Date: Fri Aug 9 11:11:55 2024 +0800 nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases The dax is only supported on pfn type pmem devices since commit f467fee48da4 ("block: move the dax flag to queue_limits"). Trying to mount DAX filesystem fails with this error: mount: : wrong fs type, bad option, bad superblock on /dev/pmem7, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call. dmesg: EXT4-fs (pmem7): DAX unsupported by block device. Fix the problem by adding dax flag setting for the missed case. Fixes: f467fee48da4 ("block: move the dax flag to queue_limits") Signed-off-by: Zhihao Cheng Reviewed-by: Christoph Hellwig Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Tested-by: Ira Weiny Tested-by: Alison Schofield Link: https://patch.msgid.link/20240809031155.2837271-1-chengzhihao1@huawei.com Signed-off-by: Ira Weiny commit 1a9e219db15e62760cfcc107ab6df3796d353605 Author: Kent Overstreet Date: Thu Aug 8 23:44:00 2024 -0400 bcachefs: improve bch2_dev_usage_to_text() Add a line for capacity Signed-off-by: Kent Overstreet commit 077e47372309dcbe3a150754ea9c6f15cc838d6b Author: Kent Overstreet Date: Thu Aug 8 23:19:59 2024 -0400 bcachefs: bch2_accounting_invalid() Implement bch2_accounting_invalid(); check for junk at the end, and replicas accounting entries in particular need to be checked or we'll pop asserts later. Signed-off-by: Kent Overstreet commit afdab700f65e14070d8ab92175544b1c62b8bf03 Merge: 850828972588b 5819e464a1758 Author: Linus Torvalds Date: Fri Aug 9 11:18:09 2024 -0700 Merge tag 'bitmap-6.11-rc' of https://github.com/norov/linux Pull cpumask fix from Yury Norov: "Fix for cpumask merge" [ Mea culpa, this was my mismerge due to too much cut-and-paste - Linus ] * tag 'bitmap-6.11-rc' of https://github.com/norov/linux: cpumask: Fix crash on updating CPU enabled mask commit 850828972588bd5422ab6c917df3f78233df1a62 Merge: 58d40f5f81314 64a66f4a3c89b Author: Linus Torvalds Date: Fri Aug 9 10:44:35 2024 -0700 Merge tag 'pm-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Change the default EPP (energy-performence preference) value for the Emerald Rapids processor in the intel_pstate driver. Thisshould improve both the performance and energy efficiency (Pedro Henrique Kopper)" * tag 'pm-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids commit 58d40f5f8131479a1e688828e2fa0a7836cf5358 Merge: 0f135d3e30c43 b82c1d235a306 Author: Linus Torvalds Date: Fri Aug 9 10:23:18 2024 -0700 Merge tag 'asm-generic-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fixes from Arnd Bergmann: "There are two more changes to the syscall.tbl conversion: the '__NR_newfstat' in the previous bugfix was a mistake and gets reverted now, after triple-checking that the contents are now back to what they were on all architectures. The __NR_nfsservctl definition is not really needed but came up in the same discussion as it had previously been defined in uapi/asm-generic/unistd.h and tested for in user space. There are a few more symbols that used to be defined in the old unistd.h file, but that are never defined on any other architecture using syscall.tbl format. These used to be needed inside of the kernel: __NR_syscalls __NR_arch_specific_syscall __NR3264_* Searching for these on https://codesearch.debian.net/ shows a few packages (rustc, golang, clamav, libseccomp, librsvg, strace) that duplicate all the macros from asm/unistd.h, but nothing that actually uses the macros, so I concluded that they are fine to omit after all" * tag 'asm-generic-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: syscalls: add back legacy __NR_nfsservctl macro syscalls: fix fstat() entry again commit 0f135d3e30c43be2034299c560272e18c6166d04 Merge: 146430a0c26eb 6b1124c4526fb Author: Linus Torvalds Date: Fri Aug 9 10:06:43 2024 -0700 Merge tag 'arm-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "There are three sets of patches for the soc tree: - Marek Behún addresses multiple build time regressions caused by changes to the cznic turris-omnia support - Dmitry Torokhov fixes a regression in the legacy "gumstix" board code he cleaned up earlier - The TI K3 maintainers found multiple bugs in the in gpio, audio and pcie devicetree nodes" * tag 'arm-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: pxa/gumstix: fix attaching properties to vbus gpio device doc: platform: cznic: turris-omnia-mcu: Use double backticks for attribute value doc: platform: cznic: turris-omnia-mcu: Fix sphinx-build warning platform: cznic: turris-omnia-mcu: Make GPIO code optional platform: cznic: turris-omnia-mcu: Make poweroff and wakeup code optional platform: cznic: turris-omnia-mcu: Make TRNG code optional platform: cznic: turris-omnia-mcu: Make watchdog code optional arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs arm64: dts: ti: k3-j722s: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-am62p: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-am62p: Add gpio-ranges for mcu_gpio0 arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regulator on arm64: dts: ti: k3-j784s4-evm: Consolidate serdes0 references arm64: dts: ti: k3-j784s4-evm: Assign only lanes 0 and 1 to PCIe1 commit 90574d2a675947858b47008df8d07f75ea50d0d0 Author: Dan Carpenter Date: Fri Aug 9 15:34:30 2024 +0300 rtla/osnoise: Prevent NULL dereference in error handling If the "tool->data" allocation fails then there is no need to call osnoise_free_top() and, in fact, doing so will lead to a NULL dereference. Cc: stable@vger.kernel.org Cc: John Kacur Cc: "Luis Claudio R. Goncalves" Cc: Clark Williams Fixes: 1eceb2fc2ca5 ("rtla/osnoise: Add osnoise top mode") Link: https://lore.kernel.org/f964ed1f-64d2-4fde-ad3e-708331f8f358@stanley.mountain Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (Google) commit d0949cd44a62c4c41b30ea7ae94d8c887f586882 Author: Steven Rostedt Date: Thu Aug 8 23:57:30 2024 -0400 tracing: Return from tracing_buffers_read() if the file has been closed When running the following: # cd /sys/kernel/tracing/ # echo 1 > events/sched/sched_waking/enable # echo 1 > events/sched/sched_switch/enable # echo 0 > tracing_on # dd if=per_cpu/cpu0/trace_pipe_raw of=/tmp/raw0.dat The dd task would get stuck in an infinite loop in the kernel. What would happen is the following: When ring_buffer_read_page() returns -1 (no data) then a check is made to see if the buffer is empty (as happens when the page is not full), it will call wait_on_pipe() to wait until the ring buffer has data. When it is it will try again to read data (unless O_NONBLOCK is set). The issue happens when there's a reader and the file descriptor is closed. The wait_on_pipe() will return when that is the case. But this loop will continue to try again and wait_on_pipe() will again return immediately and the loop will continue and never stop. Simply check if the file was closed before looping and exit out if it is. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20240808235730.78bf63e5@rorschach.local.home Fixes: 2aa043a55b9a7 ("tracing/ring-buffer: Fix wait_on_pipe() race") Signed-off-by: Steven Rostedt (Google) commit 146430a0c26eb7b515abb04664e1a516078ec5c2 Merge: b7768c4881d1b 8c8acb8f26cbd Author: Linus Torvalds Date: Fri Aug 9 09:43:46 2024 -0700 Merge tag 'probes-fixes-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull kprobe fixes from Masami Hiramatsu: - Fix misusing str_has_prefix() parameter order to check symbol prefix correctly - bpf: remove unused declaring of bpf_kprobe_override * tag 'probes-fixes-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: kprobes: Fix to check symbol prefixes correctly bpf: kprobe: remove unused declaring of bpf_kprobe_override commit b7768c4881d1b69bd95dad149d3b558c8e7de91a Merge: 8828729c4435b eded04fe3bdad Author: Linus Torvalds Date: Fri Aug 9 09:35:58 2024 -0700 Merge tag 'block-6.11-20240809' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Just a set of cleanups for blk-throttle and nvme structures" * tag 'block-6.11-20240809' of git://git.kernel.dk/linux: nvme: reorganize nvme_ns_head fields nvme: change data type of lba_shift nvme: remove a field from nvme_ns_head nvme: remove unused parameter blk-throttle: remove more latency dead-code commit 8828729c4435b85844a3b6da19cc7c148c59ec43 Merge: 377773dd6be50 8fe8ac24adcd7 Author: Linus Torvalds Date: Fri Aug 9 09:32:10 2024 -0700 Merge tag 'io_uring-6.11-20240809' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Nothing major in here, just two fixes for ensuring that bundle recv/send requests always get marked for cleanups, and a single fix to ensure that sends with provided buffers only pick a single buffer unless the bundle option has been enabled" * tag 'io_uring-6.11-20240809' of git://git.kernel.dk/linux: io_uring/net: don't pick multiple buffers for non-bundle send io_uring/net: ensure expanded bundle send gets marked for cleanup io_uring/net: ensure expanded bundle recv gets marked for cleanup commit 377773dd6be500d17b94de08271ff9ed643554f1 Merge: 2124d84db293b d3e82ced462b4 Author: Linus Torvalds Date: Fri Aug 9 09:25:30 2024 -0700 Merge tag 'sound-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of lots of small changes, almost all device-specific: - A series of fixes for ASoC Qualcomm stuff - Various fixes for Cirrus ASoC and HD-audio codecs - A few AMD ASoC quirks and usual HD-audio quirks - Other misc fixes, including a long-time regression in USB-audio" * tag 'sound-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (39 commits) ASoC: cs35l56: Patch CS35L56_IRQ1_MASK_18 to the default value ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT MAINTAINERS: Update Cirrus Logic parts to linux-sound mailing list ASoC: dt-bindings: qcom,wcd939x: Correct reset GPIO polarity in example ASoC: dt-bindings: qcom,wcd938x: Correct reset GPIO polarity in example ASoC: dt-bindings: qcom,wcd934x: Correct reset GPIO polarity in example ASoC: dt-bindings: qcom,wcd937x: Correct reset GPIO polarity in example ASoC: amd: yc: Add quirk entry for OMEN by HP Gaming Laptop 16-n0xxx ASoC: codecs: ES8326: button detect issue ASoC: amd: yc: Support mic on Lenovo Thinkpad E14 Gen 6 ALSA: usb-audio: Re-add ScratchAmp quirk entries ALSA: hda/realtek: Add Framework Laptop 13 (Intel Core Ultra) to quirks ALSA: hda/hdmi: Yet more pin fix for HP EliteDesk 800 G4 ALSA: hda: Add HP MP9 G4 Retail System AMS to force connect list ASoC: cs35l56: Handle OTP read latency over SoundWire ASoC: codecs: lpass-macro: fix missing codec version ALSA: line6: Fix racy access to midibuf ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL ASoC: cs35l56: Stop creating ALSA controls for firmware coefficients ASoC: wm_adsp: Add control_add callback and export wm_adsp_control_add() ... commit 2124d84db293ba164059077944e6b429ba530495 Author: Linus Torvalds Date: Fri Aug 9 08:33:28 2024 -0700 module: make waiting for a concurrent module loader interruptible The recursive aes-arm-bs module load situation reported by Russell King is getting fixed in the crypto layer, but this in the meantime fixes the "recursive load hangs forever" by just making the waiting for the first module load be interruptible. This should now match the old behavior before commit 9b9879fc0327 ("modules: catch concurrent module loads, treat them as idempotent"), which used the different "wait for module to be ready" code in module_patient_check_exists(). End result: a recursive module load will still block, but now a signal will interrupt it and fail the second module load, at which point the first module will successfully complete loading. Fixes: 9b9879fc0327 ("modules: catch concurrent module loads, treat them as idempotent") Cc: Russell King Cc: Herbert Xu Signed-off-by: Linus Torvalds commit 01a620d491592ead12eca039fe1c9e74908c35cf Merge: 74b0666f97f94 9ba48db9f77ce Author: Wolfram Sang Date: Fri Aug 9 15:28:08 2024 +0200 Merge tag 'i2c-host-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current Two fixes on the Qualcomm GENI I2C controller are cleaning up the error exit patch in the runtime_resume() function. The first is disabling the clock, the second disables the icc on the way out. commit 67927a1b255d883881be9467508e0af9a5e0be9d Author: Foster Snowhill Date: Tue Aug 6 19:28:09 2024 +0200 usbnet: ipheth: fix carrier detection in modes 1 and 4 Apart from the standard "configurations", "interfaces" and "alternate interface settings" in USB, iOS devices also have a notion of "modes". In different modes, the device exposes a different set of available configurations. Depending on the iOS version, and depending on the current mode, the length and contents of the carrier state control message differs: * 1 byte (seen on iOS 4.2.1, 8.4): * 03: carrier off (mode 0) * 04: carrier on (mode 0) * 3 bytes (seen on iOS 10.3.4, 15.7.6): * 03 03 03: carrier off (mode 0) * 04 04 03: carrier on (mode 0) * 4 bytes (seen on iOS 16.5, 17.6): * 03 03 03 00: carrier off (mode 0) * 04 03 03 00: carrier off (mode 1) * 06 03 03 00: carrier off (mode 4) * 04 04 03 04: carrier on (mode 0 and 1) * 06 04 03 04: carrier on (mode 4) Before this change, the driver always used the first byte of the response to determine carrier state. From this larger sample, the first byte seems to indicate the number of available USB configurations in the current mode (with the exception of the default mode 0), and in some cases (namely mode 1 and 4) does not correlate with the carrier state. Previous logic erroneously counted `04 03 03 00` as "carrier on" and `06 04 03 04` as "carrier off" on iOS versions that support mode 1 and mode 4 respectively. Only modes 0, 1 and 4 expose the USB Ethernet interfaces necessary for the ipheth driver. Check the second byte of the control message where possible, and fall back to checking the first byte on older iOS versions. Signed-off-by: Foster Snowhill Tested-by: Georgi Valkov Signed-off-by: David S. Miller commit 74efed51e0a4d62f998f806c307778b47fc73395 Author: Foster Snowhill Date: Tue Aug 6 19:28:08 2024 +0200 usbnet: ipheth: do not stop RX on failing RX callback RX callbacks can fail for multiple reasons: * Payload too short * Payload formatted incorrecly (e.g. bad NCM framing) * Lack of memory None of these should cause the driver to seize up. Make such failures non-critical and continue processing further incoming URBs. Signed-off-by: Foster Snowhill Signed-off-by: David S. Miller commit 94d7eeb6c0ef0310992944f0d0296929816a2cb0 Author: Foster Snowhill Date: Tue Aug 6 19:28:07 2024 +0200 usbnet: ipheth: drop RX URBs with no payload On iPhone 15 Pro Max one can observe periodic URBs with no payload on the "bulk in" (RX) endpoint. These don't seem to do anything meaningful. Reproduced on iOS 17.5.1 and 17.6. This behaviour isn't observed on iPhone 11 on the same iOS version. The nature of these zero-length URBs is so far unknown. Drop RX URBs with no payload. Signed-off-by: Foster Snowhill Signed-off-by: David S. Miller commit 655b46d7a39ac6f049698b27c1568c0f7ff85d1e Author: Foster Snowhill Date: Tue Aug 6 19:28:06 2024 +0200 usbnet: ipheth: remove extraneous rx URB length check Rx URB length was already checked in ipheth_rcvbulk_callback_legacy() and ipheth_rcvbulk_callback_ncm(), depending on the current mode. The check in ipheth_rcvbulk_callback() was thus mostly a duplicate. The only place in ipheth_rcvbulk_callback() where we care about the URB length is for the initial control frame. These frames are always 4 bytes long. This has been checked as far back as iOS 4.2.1 on iPhone 3G. Remove the extraneous URB length check. For control frames, check for the specific 4-byte length instead. Signed-off-by: Foster Snowhill Tested-by: Georgi Valkov Signed-off-by: David S. Miller commit e5876b088ba03a62124266fa20d00e65533c7269 Author: Oliver Neukum Date: Tue Aug 6 19:28:05 2024 +0200 usbnet: ipheth: race between ipheth_close and error handling ipheth_sndbulk_callback() can submit carrier_work as a part of its error handling. That means that the driver must make sure that the work is cancelled after it has made sure that no more URB can terminate with an error condition. Hence the order of actions in ipheth_close() needs to be inverted. Signed-off-by: Oliver Neukum Signed-off-by: Foster Snowhill Tested-by: Georgi Valkov Signed-off-by: David S. Miller commit d3e82ced462b4ed956504b62603a11d52a599f99 Merge: 03898691d42e0 72776774b55bb Author: Takashi Iwai Date: Fri Aug 9 09:58:07 2024 +0200 Merge tag 'asoc-fix-v6.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.11 Quite a lot of fixes have come in since the merge window, there's some repetitive fixes over the Qualcomm drivers increasing the patch count, along with a large batch of fixes from Cirrus. We also have some quirks and some individual fixes. commit 06f5b920d1d0b686d794426264dc39aa8582db14 Merge: fe0ce0d622d08 787db3bb6ed5c Author: Dave Airlie Date: Fri Aug 9 17:16:28 2024 +1000 Merge tag 'drm-intel-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - correct dual pps handling for MTL_PCH+ [display] (Dnyaneshwar Bhadane) - Adjust vma offset for framebuffer mmap offset [gem] (Andi Shyti) - Fix Virtual Memory mapping boundaries calculation [gem] (Andi Shyti) - Allow evicting to use the requested placement (David Gow) - Attempt to get pages without eviction first (David Gow) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/ZrSFpj20b1LbBhCJ@linux commit fe0ce0d622d08dde6acb9857fc180d59af804a86 Merge: a507e750a1d69 642dfc9d5964b Author: Dave Airlie Date: Fri Aug 9 17:08:55 2024 +1000 Merge tag 'drm-xe-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Fix off-by-one when processing RTP rules (Lucas) - Use dma_fence_chain_free in chain fence unused as a sync (Brost) - Fix PL1 disable flow in xe_hwmon_power_max_write (Karthik) - Take ref to VM in delayed dump snapshot (Brost) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZrUGgVrgTJ_vF2PS@intel.com commit f6bd41280a44dcc2e0a25ed72617d25f586974a7 Author: Namjae Jeon Date: Mon Aug 5 08:57:03 2024 +0900 ksmbd: override fsids for smb2_query_info() Sangsoo reported that a DAC denial error occurred when accessing files through the ksmbd thread. This patch override fsids for smb2_query_info(). Reported-by: Sangsoo Lee Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit a018c1b636e79b60149b41151ded7c2606d8606e Author: Namjae Jeon Date: Mon Aug 5 08:56:18 2024 +0900 ksmbd: override fsids for share path check Sangsoo reported that a DAC denial error occurred when accessing files through the ksmbd thread. This patch override fsids for share path check. Reported-by: Sangsoo Lee Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit a507e750a1d693a21b233f47db466d9aae895fa2 Merge: 062fd0a6cdb59 6ad9dafba19f1 Author: Dave Airlie Date: Fri Aug 9 13:45:52 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-08-08' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-08-08: amdgpu: - DMCUB fix - Fix DET programming on some DCNs - DCC fixes - DCN 4.0.1 fixes - SMU 14.0.x update - MMHUB fix - DCN 3.1.4 fix - GC 12.0 fixes - Fix soft recovery error propogation - SDMA 7.0 fixes - DSC fix drm buddy: - Add start address to trim function Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240808161134.1227671-1-alexander.deucher@amd.com commit 062fd0a6cdb5986745100ab1328d4e475078fda4 Merge: de9c2c66ad8e7 929725bd7eb4e Author: Dave Airlie Date: Fri Aug 9 13:00:59 2024 +1000 Merge tag 'drm-misc-fixes-2024-08-08' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A fix for drm/client to prevent a null pointer dereference, a fix for a double-free in drm/bridge-connector, a fix for a gem shmem test, and a fix for async flips updates. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240808-debonair-smoky-mustang-8b6b3f@houat commit 36bb22a08a69d9984a8399c07310d18b115eae20 Author: Gleb Korobeynikov Date: Thu Aug 8 18:47:48 2024 +0300 cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath Replace the always-true check tcon->origin_fullpath with check of server->leaf_fullpath See https://bugzilla.kernel.org/show_bug.cgi?id=219083 The check of the new @tcon will always be true during mounting, since @tcon->origin_fullpath will only be set after the tree is connected to the latest common resource, as well as checking if the prefix paths from it are fully accessible. Fixes: 3ae872de4107 ("smb: client: fix shared DFS root mounts with different prefixes") Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Gleb Korobeynikov Signed-off-by: Steve French commit 5552cccb0b73020f6506fd5d8f81975b1f59080c Merge: 72776774b55bb a9a7a2d80790d Author: Mark Brown Date: Thu Aug 8 22:47:19 2024 +0100 ASoC: codecs: warn on unknown codec version Merge series from Dmitry Baryshkov : While debugging broken audio issues on some of Qualcomm platforms I stumbled upon the kernel not providing the actual error information. It prints an error from the wsa_macro driver, but the actual issue is in the VA macro driver. Add error message to point to the actual error location. va_macro 3370000.codec: Unknown VA Codec version, ID: 00 / 0f / 00 wsa_macro 3240000.codec: Unsupported Codec version (0) commit ee9a43b7cfe2d8a3520335fea7d8ce71b8cabd9d Merge: 9466b6ae6befa 2ff4ceb0309ab Author: Linus Torvalds Date: Thu Aug 8 13:51:44 2024 -0700 Merge tag 'net-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth. Current release - regressions: - eth: bnxt_en: fix memory out-of-bounds in bnxt_fill_hw_rss_tbl() on older chips Current release - new code bugs: - ethtool: fix off-by-one error / kdoc contradicting the code for max RSS context IDs - Bluetooth: hci_qca: - QCA6390: fix support on non-DT platforms - QCA6390: don't call pwrseq_power_off() twice - fix a NULL-pointer derefence at shutdown - eth: ice: fix incorrect assigns of FEC counters Previous releases - regressions: - mptcp: fix handling endpoints with both 'signal' and 'subflow' flags set - virtio-net: fix changing ring count when vq IRQ coalescing not supported - eth: gve: fix use of netif_carrier_ok() during reconfig / reset Previous releases - always broken: - eth: idpf: fix bugs in queue re-allocation on reconfig / reset - ethtool: fix context creation with no parameters Misc: - linkwatch: use system_unbound_wq to ease RTNL contention" * tag 'net-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (41 commits) net: dsa: microchip: disable EEE for KSZ8567/KSZ9567/KSZ9896/KSZ9897. ethtool: Fix context creation with no parameters net: ethtool: fix off-by-one error in max RSS context IDs net: pse-pd: tps23881: include missing bitfield.h header net: fec: Stop PPS on driver remove net: bcmgenet: Properly overlay PHY and MAC Wake-on-LAN capabilities l2tp: fix lockdep splat net: stmmac: dwmac4: fix PCS duplex mode decode idpf: fix UAFs when destroying the queues idpf: fix memleak in vport interrupt configuration idpf: fix memory leaks and crashes while performing a soft reset bnxt_en : Fix memory out-of-bounds in bnxt_fill_hw_rss_tbl() net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() net/smc: add the max value of fallback reason count Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor Bluetooth: l2cap: always unlock channel in l2cap_conless_channel() Bluetooth: hci_qca: fix a NULL-pointer derefence at shutdown Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms Bluetooth: hci_qca: don't call pwrseq_power_off() twice for QCA6390 ice: Fix incorrect assigns of FEC counts ... commit 9466b6ae6befa87b27cc13ee7263e01b9c48efc0 Merge: b3f5620f76f9a 0b6743bd60a56 Author: Linus Torvalds Date: Thu Aug 8 13:32:59 2024 -0700 Merge tag 'trace-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Have reading of event format files test if the metadata still exists. When a event is freed, a flag (EVENT_FILE_FL_FREED) in the metadata is set to state that it is to prevent any new references to it from happening while waiting for existing references to close. When the last reference closes, the metadata is freed. But the "format" was missing a check to this flag (along with some other files) that allowed new references to happen, and a use-after-free bug to occur. - Have the trace event meta data use the refcount infrastructure instead of relying on its own atomic counters. - Have tracefs inodes use alloc_inode_sb() for allocation instead of using kmem_cache_alloc() directly. - Have eventfs_create_dir() return an ERR_PTR instead of NULL as the callers expect a real object or an ERR_PTR. - Have release_ei() use call_srcu() and not call_rcu() as all the protection is on SRCU and not RCU. - Fix ftrace_graph_ret_addr() to use the task passed in and not current. - Fix overflow bug in get_free_elt() where the counter can overflow the integer and cause an infinite loop. - Remove unused function ring_buffer_nr_pages() - Have tracefs freeing use the inode RCU infrastructure instead of creating its own. When the kernel had randomize structure fields enabled, the rcu field of the tracefs_inode was overlapping the rcu field of the inode structure, and corrupting it. Instead, use the destroy_inode() callback to do the initial cleanup of the code, and then have free_inode() free it. * tag 'trace-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracefs: Use generic inode RCU for synchronizing freeing ring-buffer: Remove unused function ring_buffer_nr_pages() tracing: Fix overflow in get_free_elt() function_graph: Fix the ret_stack used by ftrace_graph_ret_addr() eventfs: Use SRCU for freeing eventfs_inodes eventfs: Don't return NULL in eventfs_create_dir() tracefs: Fix inode allocation tracing: Use refcount for trace_event_file reference counter tracing: Have format file honor EVENT_FILE_FL_FREED commit b3f5620f76f9a6da024bd243a73fa8e2df520c5a Merge: cb5b81bc9a448 73dc1656f41a4 Author: Linus Torvalds Date: Thu Aug 8 13:27:31 2024 -0700 Merge tag 'bcachefs-2024-08-08' of git://evilpiepirate.org/bcachefs Pull bcachefs fixes from Kent Overstreet: "Assorted little stuff: - lockdep fixup for lockdep_set_notrack_class() - we can now remove a device when using erasure coding without deadlocking, though we still hit other issues - the 'allocator stuck' timeout is now configurable, and messages are ratelimited. The default timeout has been increased from 10 seconds to 30" * tag 'bcachefs-2024-08-08' of git://evilpiepirate.org/bcachefs: bcachefs: Use bch2_wait_on_allocator() in btree node alloc path bcachefs: Make allocator stuck timeout configurable, ratelimit messages bcachefs: Add missing path_traverse() to btree_iter_next_node() bcachefs: ec should not allocate from ro devs bcachefs: Improved allocator debugging for ec bcachefs: Add missing bch2_trans_begin() call bcachefs: Add a comment for bucket helper types bcachefs: Don't rely on implicit unsigned -> signed integer conversion lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT bcachefs: Fix double free of ca->buckets_nouse commit 05a3d6e9307250a5911d75308e4363466794ab21 Author: Paul Moore Date: Thu Aug 8 11:57:38 2024 -0400 selinux: revert our use of vma_is_initial_heap() Unfortunately it appears that vma_is_initial_heap() is currently broken for applications that do not currently have any heap allocated, e.g. brk == start_brk. The breakage is such that it will cause SELinux to check for the process/execheap permission on memory regions that cross brk/start_brk even when there is no heap. The proper fix would be to correct vma_is_initial_heap(), but as there are multiple callers I am hesitant to unilaterally modify the helper out of concern that I would end up breaking some other subsystem. The mm developers have been made aware of the situation and hopefully they will have a fix at some point in the future, but we need a fix soon so we are simply going to revert our use of vma_is_initial_heap() in favor of our old logic/code which works as expected, even in the face of a zero size heap. We can return to using vma_is_initial_heap() at some point in the future when it is fixed. Cc: stable@vger.kernel.org Reported-by: Marc Reisner Closes: https://lore.kernel.org/all/ZrPmoLKJEf1wiFmM@marcreisner.com Fixes: 68df1baf158f ("selinux: use vma_is_initial_stack() and vma_is_initial_heap()") Signed-off-by: Paul Moore commit 0c84bde4f37ba27d50e4c70ecacd33fe4a57030d Author: Sean Young Date: Thu Aug 8 10:35:19 2024 +0200 media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()" This reverts commit 2052138b7da52ad5ccaf74f736d00f39a1c9198c. This breaks the TeVii s480 dual DVB-S2 S660. The device has a bulk in endpoint but no corresponding out endpoint, so the device does not pass the "has both receive and send bulk endpoint" test. Seemingly this device does not use dvb_usb_generic_rw() so I have tried removing the generic_bulk_ctrl_endpoint entry, but this resulted in different problems. As we have no explanation yet, revert. $ dmesg | grep -i -e dvb -e dw21 -e usb\ 4 [ 0.999122] usb 1-1: new high-speed USB device number 2 using ehci-pci [ 1.023123] usb 4-1: new high-speed USB device number 2 using ehci-pci [ 1.130247] usb 1-1: New USB device found, idVendor=9022, idProduct=d482, +bcdDevice= 0.01 [ 1.130257] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 1.152323] usb 4-1: New USB device found, idVendor=9022, idProduct=d481, +bcdDevice= 0.01 [ 1.152329] usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 6.701033] dvb-usb: found a 'TeVii S480.2 USB' in cold state, will try to +load a firmware [ 6.701178] dvb-usb: downloading firmware from file 'dvb-usb-s660.fw' [ 6.701179] dw2102: start downloading DW210X firmware [ 6.703715] dvb-usb: found a 'Microsoft Xbox One Digital TV Tuner' in cold +state, will try to load a firmware [ 6.703974] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw' [ 6.756432] usb 1-1: USB disconnect, device number 2 [ 6.862119] dvb-usb: found a 'TeVii S480.2 USB' in warm state. [ 6.862194] dvb-usb: TeVii S480.2 USB error while loading driver (-22) [ 6.862209] dvb-usb: found a 'TeVii S480.1 USB' in cold state, will try to +load a firmware [ 6.862244] dvb-usb: downloading firmware from file 'dvb-usb-s660.fw' [ 6.862245] dw2102: start downloading DW210X firmware [ 6.914811] usb 4-1: USB disconnect, device number 2 [ 7.014131] dvb-usb: found a 'TeVii S480.1 USB' in warm state. [ 7.014487] dvb-usb: TeVii S480.1 USB error while loading driver (-22) [ 7.014538] usbcore: registered new interface driver dw2102 Closes: https://lore.kernel.org/stable/20240801165146.38991f60@mir/ Fixes: 2052138b7da5 ("media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()") Reported-by: Stefan Lippers-Hollmann Cc: stable@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 72776774b55bb59b7b1b09117e915a5030110304 Author: Simon Trimmer Date: Wed Aug 7 14:26:48 2024 +0000 ASoC: cs35l56: Patch CS35L56_IRQ1_MASK_18 to the default value Device tuning files made with early revision tooling may contain configuration that can unmask IRQ signals that are owned by the host. Adding a safe default to the regmap patch ensures that the hardware matches the driver expectations. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/20240807142648.46932-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 5003d0ce5c7da3a02c0aff771f516f99731e7390 Author: Jerome Brunet Date: Wed Aug 7 18:27:03 2024 +0200 ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT With PREEMPT_RT enabled a spinlock_t becomes a sleeping lock. This is usually not a problem with spinlocks used in IRQ context since IRQ handlers get threaded. However, if IRQF_ONESHOT is set, the primary handler won't be force-threaded and runs always in hardirq context. This is a problem because spinlock_t requires a preemptible context on PREEMPT_RT. In this particular instance, regmap mmio uses spinlock_t to protect the register access and IRQF_ONESHOT is set on the IRQ. In this case, it is actually better to do everything in threaded handler and it solves the problem with PREEMPT_RT. Reported-by: Arseniy Krasnov Closes: https://lore.kernel.org/linux-amlogic/20240729131652.3012327-1-avkrasnov@salutedevices.com Suggested-by: Sebastian Andrzej Siewior Fixes: b11d26660dff ("ASoC: meson: axg-fifo: use threaded irq to check periods") Signed-off-by: Jerome Brunet Reviewed-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240807162705.4024136-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 2f11f61f9d4d5692bcebb9d089429ee0c046e08a Author: Charles Keepax Date: Wed Aug 7 15:01:40 2024 +0100 MAINTAINERS: Update Cirrus Logic parts to linux-sound mailing list Now that most kernel work on sound has moved over to the linux-sound mailing list so should the Cirrus Logic audio parts. Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240807140140.421359-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 81f88fddef9cddae6b4e5d9359022c7a2a3e3b6a Author: Krzysztof Kozlowski Date: Tue Aug 6 13:49:31 2024 +0200 ASoC: dt-bindings: qcom,wcd939x: Correct reset GPIO polarity in example The reset GPIO of WCD9390/WCD9395 is active low and that's how it is routed on typical boards, so correct the example DTS to use expected polarity, instead of IRQ flag (which is a logical mistake on its own). Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240806114931.40090-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 871f1a16fa3506487de24b05d68be45e9185e77a Author: Krzysztof Kozlowski Date: Tue Aug 6 13:49:30 2024 +0200 ASoC: dt-bindings: qcom,wcd938x: Correct reset GPIO polarity in example The reset GPIO of WCD9380/WCD9385 is active low and that's how it is routed on typical boards, so correct the example DTS to use expected polarity. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240806114931.40090-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 55922275702e112652d314a9b6a6ca31d4b7252e Author: Krzysztof Kozlowski Date: Tue Aug 6 13:49:29 2024 +0200 ASoC: dt-bindings: qcom,wcd934x: Correct reset GPIO polarity in example The reset GPIO of WCD9340/WCD9341 is active low and that's how it is routed on typical boards, so correct the example DTS to use expected polarity. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240806114931.40090-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 2f3e2c9eaafc272266344d777f8de44f8632e247 Author: Krzysztof Kozlowski Date: Tue Aug 6 13:49:28 2024 +0200 ASoC: dt-bindings: qcom,wcd937x: Correct reset GPIO polarity in example The reset GPIO of WCD9370/WCD9375 is active low and that's how it is routed on typical boards, so correct the example DTS to use expected polarity. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240806114931.40090-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 6675e76a5c441b52b1b983ebb714122087020ebe Author: Takashi Iwai Date: Wed Aug 7 19:02:27 2024 +0200 ASoC: amd: yc: Add quirk entry for OMEN by HP Gaming Laptop 16-n0xxx Fix the missing mic on OMEN by HP Gaming Laptop 16-n0xxx by adding the quirk entry with the board ID 8A44. Cc: stable@vger.kernel.org Link: https://bugzilla.suse.com/show_bug.cgi?id=1227182 Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20240807170249.16490-1-tiwai@suse.de Signed-off-by: Mark Brown commit 4684a2df9c5b3fc914377127faf2515aa9049093 Author: Zhang Yi Date: Wed Aug 7 10:53:55 2024 +0800 ASoC: codecs: ES8326: button detect issue We find that we need to set snd_jack_types to 0. If not, there will be a probability of button detection errors Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20240807025356.24904-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 23a58b782f864951485d7a0018549729e007cb43 Author: Krzysztof Stępniak Date: Wed Aug 7 02:12:19 2024 +0200 ASoC: amd: yc: Support mic on Lenovo Thinkpad E14 Gen 6 Lenovo Thinkpad E14 Gen 6 (model type 21M3) needs a quirk entry for internal mic to work. Signed-off-by: Krzysztof Stępniak Link: https://patch.msgid.link/20240807001219.1147-1-kfs.szk@gmail.com Signed-off-by: Mark Brown commit cb5b81bc9a448f8db817566f60f92e2ea788ea0f Author: Linus Torvalds Date: Thu Aug 8 12:29:40 2024 -0700 module: warn about excessively long module waits Russell King reported that the arm cbc(aes) crypto module hangs when loaded, and Herbert Xu bisected it to commit 9b9879fc0327 ("modules: catch concurrent module loads, treat them as idempotent"), and noted: "So what's happening here is that the first modprobe tries to load a fallback CBC implementation, in doing so it triggers a load of the exact same module due to module aliases. IOW we're loading aes-arm-bs which provides cbc(aes). However, this needs a fallback of cbc(aes) to operate, which is made out of the generic cbc module + any implementation of aes, or ecb(aes). The latter happens to also be provided by aes-arm-cb so that's why it tries to load the same module again" So loading the aes-arm-bs module ends up wanting to recursively load itself, and the recursive load then ends up waiting for the original module load to complete. This is a regression, in that it used to be that we just tried to load the module multiple times, and then as we went on to install it the second time we would instead just error out because the module name already existed. That is actually also exactly what the original "catch concurrent loads" patch did in commit 9828ed3f695a ("module: error out early on concurrent load of the same module file"), but it turns out that it ends up being racy, in that erroring out before the module has been fully initialized will cause failures in dependent module loading. See commit ac2263b588df (which was the revert of that "error out early") commit for details about why erroring out before the module has been initialized is actually fundamentally racy. Now, for the actual recursive module load (as opposed to just concurrently loading the same module twice), the race is not an issue. At the same time it's hard for the kernel to see that this is recursion, because the module load is always done from a usermode helper, so the recursion is not some simple callchain within the kernel. End result: this is not the real fix, but this at least adds a warning for the situation (admittedly much too late for all the debugging pain that Russell and Herbert went through) and if we can come to a resolution on how to detect the recursion properly, this re-organizes the code to make that easier. Link: https://lore.kernel.org/all/ZrFHLqvFqhzykuYw@shell.armlinux.org.uk/ Reported-by: Russell King Debugged-by: Herbert Xu Signed-off-by: Linus Torvalds commit f39bae2e028b841732ca81d8131d27b48a6051ad Author: Kent Overstreet Date: Wed Aug 7 15:42:23 2024 -0400 bcachefs: Switch to .get_inode_acl() .set_acl() requires a dentry, and if one isn't passed it marks the VFS inode as not having an ACL. This has been causing inodes with ACLs to have them "disappear" on bcachefs filesystem, depending on which path those inodes get pulled into the cache from. Switching to .get_inode_acl(), like other local filesystems, fixes this. Signed-off-by: Kent Overstreet commit cd9aae921ab6b614e56ce690dedfe82e79db9354 Author: Douglas Anderson Date: Thu Aug 8 11:44:07 2024 -0700 dt-bindings: display: panel: samsung,atna45dc02: Fix indentation The yaml had indentation errors: ./Documentation/devicetree/bindings/display/panel/samsung,atna33xc20.yaml:21:9: [warning] wrong indentation: expected 10 but found 8 (indentation) ./Documentation/devicetree/bindings/display/panel/samsung,atna33xc20.yaml:23:11: [warning] wrong indentation: expected 12 but found 10 (indentation) Fix them. Reported-by: Rob Herring Closes: https://lore.kernel.org/r/CAL_JsqLRTgQRPcfXy4G9hLoHMd-Uax4_C90BV_OZn4mK+-82kw@mail.gmail.com Fixes: 1c4a057d01f4 ("dt-bindings: display: panel: samsung,atna45dc02: Document ATNA45DC02") Reviewed-by: Rob Clark Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240808114407.1.I099e8e9e36407a0785d846b953031d40ea71e559@changeid commit eded04fe3bdad9b11bc82b972b4c6fa79f1726ba Merge: 01aa8c869d0cd b4c1f33a5d59f Author: Jens Axboe Date: Thu Aug 8 12:27:40 2024 -0600 Merge tag 'nvme-6.11-2024-08-08' of git://git.infradead.org/nvme into block-6.11 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.11 - Cleanups and improved struct packing (Kanchan)" * tag 'nvme-6.11-2024-08-08' of git://git.infradead.org/nvme: nvme: reorganize nvme_ns_head fields nvme: change data type of lba_shift nvme: remove a field from nvme_ns_head nvme: remove unused parameter commit cf6d429eb6563185919322205a320c3b12d1c255 Merge: 660e4b18a72ef 494b0792d962e Author: Linus Torvalds Date: Thu Aug 8 11:22:04 2024 -0700 Merge tag 'loongarch-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Enable general EFI poweroff method to make poweroff usable on hardwares which lack ACPI S5, use accessors to page table entries instead of direct dereference to avoid potential problems, and two trivial kvm cleanups" * tag 'loongarch-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Remove undefined a6 argument comment for kvm_hypercall() LoongArch: KVM: Remove unnecessary definition of KVM_PRIVATE_MEM_SLOTS LoongArch: Use accessors to page table entries instead of direct dereference LoongArch: Enable general EFI poweroff method commit 642dfc9d5964b26f66fa6c28ce2861e11f9232aa Author: Matthew Brost Date: Thu Aug 1 08:41:16 2024 -0700 drm/xe: Take ref to VM in delayed snapshot Kernel BO's don't take a ref to the VM, we need the VM for the delayed snapshot, so take a ref to the VM in delayed snapshot. v2: - Check for lrc_bo before taking a VM ref (CI) - Check lrc_bo->vm before taking / dropping a VM ref (CI) - Drop VM in xe_lrc_snapshot_free v5: - Fix commit message wording (Johnathan) Fixes: 47058633d9c5 ("drm/xe: Move lrc snapshot capturing to xe_lrc.c") Cc: Maarten Lankhorst Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240801154118.2547543-2-matthew.brost@intel.com (cherry picked from commit c3bc97d2f102ddd5a8341eeb2dbae2a3e98bb46a) Signed-off-by: Rodrigo Vivi commit ac3191c5cf47e2d5220a1ed7353a2e498a1f415e Author: Karthik Poosa Date: Thu Aug 1 16:54:24 2024 +0530 drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write In xe_hwmon_power_max_write, for PL1 disable supported case, instead of returning after PL1 disable, PL1 enable path was also being run. Fixed it by returning after disable. v2: Correct typo and grammar in commit message. (Jonathan) Signed-off-by: Karthik Poosa Fixes: fef6dd12b45a ("drm/xe/hwmon: Protect hwmon rw attributes with hwmon_lock") Reviewed-by: Jonathan Cavitt Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240801112424.1841766-1-karthik.poosa@intel.com (cherry picked from commit 146458645e505f5eac498759bcd865cf7c0dfd9a) Signed-off-by: Rodrigo Vivi commit 4f854a8b1b85d46abd5ce206936d23f87ac5e0c9 Author: Matthew Brost Date: Fri Jul 26 18:22:16 2024 -0700 drm/xe: Use dma_fence_chain_free in chain fence unused as a sync A chain fence is uninitialized if not installed in a drm sync obj. Thus if xe_sync_entry_cleanup is called and sync->chain_fence is non-NULL the proper cleanup is dma_fence_chain_free rather than a dma-fence put. Reported-by: Paulo Zanoni Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2411 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2261 Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240727012216.2118276-1-matthew.brost@intel.com (cherry picked from commit 7f7a2da3bf8bc0e0f6c239af495b7050056e889c) Signed-off-by: Rodrigo Vivi commit ae02c7b7fea3e034fbd724c21d88406f71ccc2f8 Author: Lucas De Marchi Date: Thu Jul 25 23:43:35 2024 -0700 drm/xe/rtp: Fix off-by-one when processing rules Gustavo noticed an odd "+ 2" in rtp_mark_active() while processing rtp rules and pointed that it should be "+ 1". In fact, while processing entries without actions (OOB workarounds), if the WA is activated and has OR rules, it will also inadvertently activate the very next workaround. Test in a LNL B0 platform by moving 18024947630 on top of 16020292621, makes the latter become active: $ cat /sys/kernel/debug/dri/0/gt0/workarounds ... OOB Workarounds 18024947630 16020292621 14018094691 16022287689 13011645652 22019338487_display In future a kunit test will be added to cover the rtp checks for entries without actions. Fixes: fe19328b900c ("drm/xe/rtp: Add support for entries with no action") Cc: Gustavo Sousa Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20240726064337.797576-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit fd6797ec50c561f085bc94e3ee26f484a52af79e) Signed-off-by: Rodrigo Vivi commit 5819e464a17587e6830cfab05f3e91a9a8753a41 Author: Gavin Shan Date: Thu Aug 8 14:08:08 2024 +1000 cpumask: Fix crash on updating CPU enabled mask The CPU enabled mask instead of the CPU possible mask should be used by set_cpu_enabled(). Otherwise, we run into crash due to write to the read-only CPU possible mask when vCPU is hot added on ARM64. (qemu) device_add host-arm-cpu,id=cpu1,socket-id=1 Unable to handle kernel write to read-only memory at virtual address ffff800080fa7190 : Call trace: register_cpu+0x1a4/0x2e8 arch_register_cpu+0x84/0xd8 acpi_processor_add+0x480/0x5b0 acpi_bus_attach+0x1c4/0x300 acpi_dev_for_one_check+0x3c/0x50 device_for_each_child+0x68/0xc8 acpi_dev_for_each_child+0x48/0x80 acpi_bus_attach+0x84/0x300 acpi_bus_scan+0x74/0x220 acpi_scan_rescan_bus+0x54/0x88 acpi_device_hotplug+0x208/0x478 acpi_hotplug_work_fn+0x2c/0x50 process_one_work+0x15c/0x3c0 worker_thread+0x2ec/0x400 kthread+0x120/0x130 ret_from_fork+0x10/0x20 Fix it by passing the CPU enabled mask instead of the CPU possible mask to set_cpu_enabled(). Fixes: 51c4767503d5 ("Merge tag 'bitmap-6.11-rc1' of https://github.com:/norov/linux") Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Signed-off-by: Yury Norov commit 9eb18136af9fe4dd688724070f2bfba271bd1542 Author: Marc Zyngier Date: Thu Aug 8 10:15:46 2024 +0100 KVM: arm64: vgic: Hold config_lock while tearing down a CPU interface Tearing down a vcpu CPU interface involves freeing the private interrupt array. If we don't hold the lock, we may race against another thread trying to configure it. Yeah, fuzzers do wonderful things... Taking the lock early solves this particular problem. Fixes: 03b3d00a70b5 ("KVM: arm64: vgic: Allocate private interrupts on demand") Reported-by: Alexander Potapenko Tested-by: Alexander Potapenko Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240808091546.3262111-1-maz@kernel.org Signed-off-by: Oliver Upton commit 1cb6ab446424649f03c82334634360c2e3043684 Author: Jiaxun Yang Date: Tue Jul 23 17:15:44 2024 +0800 MIPS: Loongson64: Set timer mode in cpu-probe Loongson64 C and G processors have EXTIMER feature which is conflicting with CP0 counter. Although the processor resets in EXTIMER disabled & INTIMER enabled mode, which is compatible with MIPS CP0 compare, firmware may attempt to enable EXTIMER and interfere CP0 compare. Set timer mode back to MIPS compatible mode to fix booting on systems with such firmware before we have an actual driver for EXTIMER. Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit bdcffe4be7cb90ccd12c49924dad9e2eda11b57a Author: Xiaxi Shen Date: Wed Aug 7 09:53:20 2024 -0700 Fix spelling errors in Server Message Block Fixed typos in various files under fs/smb/client/ Signed-off-by: Xiaxi Shen Signed-off-by: Steve French commit 1b5487aefb1ce7a6b1f15a33297d1231306b4122 Author: Steve French Date: Wed Jul 31 21:38:50 2024 -0500 smb3: fix setting SecurityFlags when encryption is required Setting encryption as required in security flags was broken. For example (to require all mounts to be encrypted by setting): "echo 0x400c5 > /proc/fs/cifs/SecurityFlags" Would return "Invalid argument" and log "Unsupported security flags" This patch fixes that (e.g. allowing overriding the default for SecurityFlags 0x00c5, including 0x40000 to require seal, ie SMB3.1.1 encryption) so now that works and forces encryption on subsequent mounts. Acked-by: Bharath SM Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 2ff4ceb0309abb3cd1843189e99e4cc479ec5b92 Merge: 0411f73c13afc c181da18a7302 Author: Jakub Kicinski Date: Thu Aug 8 09:02:25 2024 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-08-07 (ice) This series contains updates to ice driver only. Grzegorz adds IRQ synchronization call before performing reset and prevents writing to hardware when it is resetting. Mateusz swaps incorrect assignment of FEC statistics. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix incorrect assigns of FEC counts ice: Skip PTP HW writes during PTP reset procedure ice: Fix reset handler ==================== Link: https://patch.msgid.link/20240807224521.3819189-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 0411f73c13afcf619d7aa7546edbc5710a871cae Author: Martin Whitaker Date: Wed Aug 7 21:52:09 2024 +0100 net: dsa: microchip: disable EEE for KSZ8567/KSZ9567/KSZ9896/KSZ9897. As noted in the device errata [1-8], EEE support is not fully operational in the KSZ8567, KSZ9477, KSZ9567, KSZ9896, and KSZ9897 devices, causing link drops when connected to another device that supports EEE. The patch series "net: add EEE support for KSZ9477 switch family" merged in commit 9b0bf4f77162 caused EEE support to be enabled in these devices. A fix for this regression for the KSZ9477 alone was merged in commit 08c6d8bae48c2. This patch extends this fix to the other affected devices. [1] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ8567R-Errata-DS80000752.pdf [2] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ8567S-Errata-DS80000753.pdf [3] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9477S-Errata-DS80000754.pdf [4] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9567R-Errata-DS80000755.pdf [5] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9567S-Errata-DS80000756.pdf [6] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9896C-Errata-DS80000757.pdf [7] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9897R-Errata-DS80000758.pdf [8] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/Errata/KSZ9897S-Errata-DS80000759.pdf Fixes: 69d3b36ca045 ("net: dsa: microchip: enable EEE support") # for KSZ8567/KSZ9567/KSZ9896/KSZ9897 Link: https://lore.kernel.org/netdev/137ce1ee-0b68-4c96-a717-c8164b514eec@martin-whitaker.me.uk/ Signed-off-by: Martin Whitaker Acked-by: Arun Ramadoss Reviewed-by: Oleksij Rempel Reviewed-by: Lukasz Majewski Link: https://patch.msgid.link/20240807205209.21464-1-foss@martin-whitaker.me.uk Signed-off-by: Jakub Kicinski commit 4d7c3c1aba3ca12fad2e90163b8d5153363f93e5 Author: Gal Pressman Date: Wed Aug 7 20:33:52 2024 +0300 ethtool: Fix context creation with no parameters The 'at least one change' requirement is not applicable for context creation, skip the check in such case. This allows a command such as 'ethtool -X eth0 context new' to work. The command works by mistake when using older versions of userspace ethtool due to an incompatibility issue where rxfh.input_xfrm is passed as zero (unset) instead of RXH_XFRM_NO_CHANGE as done with recent userspace. This patch does not try to solve the incompatibility issue. Link: https://lore.kernel.org/netdev/05ae8316-d3aa-4356-98c6-55ed4253c8a7@nvidia.com/ Fixes: 84a1d9c48200 ("net: ethtool: extend RXNFC API to support RSS spreading of filter matches") Reviewed-by: Dragos Tatulea Reviewed-by: Jianbo Liu Signed-off-by: Gal Pressman Reviewed-by: Edward Cree Link: https://patch.msgid.link/20240807173352.3501746-1-gal@nvidia.com Signed-off-by: Jakub Kicinski commit b54de55990b0467538c6bb33523b28816384958a Author: Edward Cree Date: Wed Aug 7 17:06:12 2024 +0100 net: ethtool: fix off-by-one error in max RSS context IDs Both ethtool_ops.rxfh_max_context_id and the default value used when it's not specified are supposed to be exclusive maxima (the former is documented as such; the latter, U32_MAX, cannot be used as an ID since it equals ETH_RXFH_CONTEXT_ALLOC), but xa_alloc() expects an inclusive maximum. Subtract one from 'limit' to produce an inclusive maximum, and pass that to xa_alloc(). Increase bnxt's max by one to prevent a (very minor) regression, as BNXT_MAX_ETH_RSS_CTX is an inclusive max. This is safe since bnxt is not actually hard-limited; BNXT_MAX_ETH_RSS_CTX is just a leftover from old driver code that managed context IDs itself. Rename rxfh_max_context_id to rxfh_max_num_contexts to make its semantics (hopefully) more obvious. Fixes: 847a8ab18676 ("net: ethtool: let the core choose RSS context IDs") Signed-off-by: Edward Cree Link: https://patch.msgid.link/5a2d11a599aa5b0cc6141072c01accfb7758650c.1723045898.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit a70b637db15b4de25af3c5946c4399144b3bc241 Author: Arnd Bergmann Date: Wed Aug 7 09:54:22 2024 +0200 net: pse-pd: tps23881: include missing bitfield.h header Using FIELD_GET() fails in configurations that don't already include the header file indirectly: drivers/net/pse-pd/tps23881.c: In function 'tps23881_i2c_probe': drivers/net/pse-pd/tps23881.c:755:13: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration] 755 | if (FIELD_GET(TPS23881_REG_DEVID_MASK, ret) != TPS23881_DEVICE_ID) { | ^~~~~~~~~ Fixes: 89108cb5c285 ("net: pse-pd: tps23881: Fix the device ID check") Signed-off-by: Arnd Bergmann Acked-by: Oleksij Rempel Link: https://patch.msgid.link/20240807075455.2055224-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 8fee6d5ad5fa18c270eedb2a2cdf58dbadefb94b Author: Csókás, Bence Date: Wed Aug 7 10:09:56 2024 +0200 net: fec: Stop PPS on driver remove PPS was not stopped in `fec_ptp_stop()`, called when the adapter was removed. Consequentially, you couldn't safely reload the driver with the PPS signal on. Fixes: 32cba57ba74b ("net: fec: introduce fec_ptp_stop and use in probe fail path") Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/netdev/CAOMZO5BzcZR8PwKKwBssQq_wAGzVgf1ffwe_nhpQJjviTdxy-w@mail.gmail.com/T/#m01dcb810bfc451a492140f6797ca77443d0cb79f Signed-off-by: Csókás, Bence Reviewed-by: Andrew Lunn Reviewed-by: Frank Li Link: https://patch.msgid.link/20240807080956.2556602-1-csokas.bence@prolan.hu Signed-off-by: Jakub Kicinski commit 9ee09edc05f20422e7ced84b1f8a5d3359926ac8 Author: Florian Fainelli Date: Tue Aug 6 10:56:59 2024 -0700 net: bcmgenet: Properly overlay PHY and MAC Wake-on-LAN capabilities 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. Fixes: 7e400ff35cbe ("net: bcmgenet: Add support for PHY-based Wake-on-LAN") Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20240806175659.3232204-1-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski commit 86a41ea9fd79ddb6145cb8ebf5aeafceabca6f7d Author: James Chapman Date: Tue Aug 6 17:06:26 2024 +0100 l2tp: fix lockdep splat When l2tp tunnels use a socket provided by userspace, we can hit lockdep splats like the below when data is transmitted through another (unrelated) userspace socket which then gets routed over l2tp. This issue was previously discussed here: https://lore.kernel.org/netdev/87sfialu2n.fsf@cloudflare.com/ The solution is to have lockdep treat socket locks of l2tp tunnel sockets separately than those of standard INET sockets. To do so, use a different lockdep subclass where lock nesting is possible. ============================================ WARNING: possible recursive locking detected 6.10.0+ #34 Not tainted -------------------------------------------- iperf3/771 is trying to acquire lock: ffff8881027601d8 (slock-AF_INET/1){+.-.}-{2:2}, at: l2tp_xmit_skb+0x243/0x9d0 but task is already holding lock: ffff888102650d98 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x1848/0x1e10 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_INET/1); lock(slock-AF_INET/1); *** DEADLOCK *** May be due to missing lock nesting notation 10 locks held by iperf3/771: #0: ffff888102650258 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sendmsg+0x1a/0x40 #1: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x4b/0xbc0 #2: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x17a/0x1130 #3: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x28b/0x9f0 #4: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_local_deliver_finish+0xf9/0x260 #5: ffff888102650d98 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x1848/0x1e10 #6: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: __ip_queue_xmit+0x4b/0xbc0 #7: ffffffff822ac220 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x17a/0x1130 #8: ffffffff822ac1e0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0xcc/0x1450 #9: ffff888101f33258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}, at: __dev_queue_xmit+0x513/0x1450 stack backtrace: CPU: 2 UID: 0 PID: 771 Comm: iperf3 Not tainted 6.10.0+ #34 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x69/0xa0 dump_stack+0xc/0x20 __lock_acquire+0x135d/0x2600 ? srso_alias_return_thunk+0x5/0xfbef5 lock_acquire+0xc4/0x2a0 ? l2tp_xmit_skb+0x243/0x9d0 ? __skb_checksum+0xa3/0x540 _raw_spin_lock_nested+0x35/0x50 ? l2tp_xmit_skb+0x243/0x9d0 l2tp_xmit_skb+0x243/0x9d0 l2tp_eth_dev_xmit+0x3c/0xc0 dev_hard_start_xmit+0x11e/0x420 sch_direct_xmit+0xc3/0x640 __dev_queue_xmit+0x61c/0x1450 ? ip_finish_output2+0xf4c/0x1130 ip_finish_output2+0x6b6/0x1130 ? srso_alias_return_thunk+0x5/0xfbef5 ? __ip_finish_output+0x217/0x380 ? srso_alias_return_thunk+0x5/0xfbef5 __ip_finish_output+0x217/0x380 ip_output+0x99/0x120 __ip_queue_xmit+0xae4/0xbc0 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? tcp_options_write.constprop.0+0xcb/0x3e0 ip_queue_xmit+0x34/0x40 __tcp_transmit_skb+0x1625/0x1890 __tcp_send_ack+0x1b8/0x340 tcp_send_ack+0x23/0x30 __tcp_ack_snd_check+0xa8/0x530 ? srso_alias_return_thunk+0x5/0xfbef5 tcp_rcv_established+0x412/0xd70 tcp_v4_do_rcv+0x299/0x420 tcp_v4_rcv+0x1991/0x1e10 ip_protocol_deliver_rcu+0x50/0x220 ip_local_deliver_finish+0x158/0x260 ip_local_deliver+0xc8/0xe0 ip_rcv+0xe5/0x1d0 ? __pfx_ip_rcv+0x10/0x10 __netif_receive_skb_one_core+0xce/0xe0 ? process_backlog+0x28b/0x9f0 __netif_receive_skb+0x34/0xd0 ? process_backlog+0x28b/0x9f0 process_backlog+0x2cb/0x9f0 __napi_poll.constprop.0+0x61/0x280 net_rx_action+0x332/0x670 ? srso_alias_return_thunk+0x5/0xfbef5 ? find_held_lock+0x2b/0x80 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 handle_softirqs+0xda/0x480 ? __dev_queue_xmit+0xa2c/0x1450 do_softirq+0xa1/0xd0 __local_bh_enable_ip+0xc8/0xe0 ? __dev_queue_xmit+0xa2c/0x1450 __dev_queue_xmit+0xa48/0x1450 ? ip_finish_output2+0xf4c/0x1130 ip_finish_output2+0x6b6/0x1130 ? srso_alias_return_thunk+0x5/0xfbef5 ? __ip_finish_output+0x217/0x380 ? srso_alias_return_thunk+0x5/0xfbef5 __ip_finish_output+0x217/0x380 ip_output+0x99/0x120 __ip_queue_xmit+0xae4/0xbc0 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? tcp_options_write.constprop.0+0xcb/0x3e0 ip_queue_xmit+0x34/0x40 __tcp_transmit_skb+0x1625/0x1890 tcp_write_xmit+0x766/0x2fb0 ? __entry_text_end+0x102ba9/0x102bad ? srso_alias_return_thunk+0x5/0xfbef5 ? __might_fault+0x74/0xc0 ? srso_alias_return_thunk+0x5/0xfbef5 __tcp_push_pending_frames+0x56/0x190 tcp_push+0x117/0x310 tcp_sendmsg_locked+0x14c1/0x1740 tcp_sendmsg+0x28/0x40 inet_sendmsg+0x5d/0x90 sock_write_iter+0x242/0x2b0 vfs_write+0x68d/0x800 ? __pfx_sock_write_iter+0x10/0x10 ksys_write+0xc8/0xf0 __x64_sys_write+0x3d/0x50 x64_sys_call+0xfaf/0x1f50 do_syscall_64+0x6d/0x140 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f4d143af992 Code: c3 8b 07 85 c0 75 24 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 e9 01 cc ff ff 41 54 b8 02 00 00 0 RSP: 002b:00007ffd65032058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f4d143af992 RDX: 0000000000000025 RSI: 00007f4d143f3bcc RDI: 0000000000000005 RBP: 00007f4d143f2b28 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4d143f3bcc R13: 0000000000000005 R14: 0000000000000000 R15: 00007ffd650323f0 Fixes: 0b2c59720e65 ("l2tp: close all race conditions in l2tp_tunnel_register()") Suggested-by: Eric Dumazet Reported-by: syzbot+6acef9e0a4d1f46c83d4@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=6acef9e0a4d1f46c83d4 CC: gnault@redhat.com CC: cong.wang@bytedance.com Signed-off-by: James Chapman Signed-off-by: Tom Parkin Link: https://patch.msgid.link/20240806160626.1248317-1-jchapman@katalix.com Signed-off-by: Jakub Kicinski commit 85ba108a529d99c82e814eaf782a9443acf5eaed Author: Russell King (Oracle) Date: Tue Aug 6 14:08:41 2024 +0100 net: stmmac: dwmac4: fix PCS duplex mode decode dwmac4 was decoding the duplex mode from the GMAC_PHYIF_CONTROL_STATUS register incorrectly, using GMAC_PHYIF_CTRLSTATUS_LNKMOD_MASK (value 1) rather than GMAC_PHYIF_CTRLSTATUS_LNKMOD (bit 16). Fix this. Fixes: 70523e639bf8c ("drivers: net: stmmac: reworking the PCS code.") Reviewed-by: Andrew Halaney Reviewed-by: Andrew Lunn Reviewed-by: Serge Semin Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1sbJvd-001rGD-E3@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 919f18f961c03d6694aa726c514184f2311a4614 Author: Andi Kleen Date: Wed Aug 7 17:02:44 2024 -0700 x86/mtrr: Check if fixed MTRRs exist before saving them MTRRs have an obsolete fixed variant for fine grained caching control of the 640K-1MB region that uses separate MSRs. This fixed variant has a separate capability bit in the MTRR capability MSR. So far all x86 CPUs which support MTRR have this separate bit set, so it went unnoticed that mtrr_save_state() does not check the capability bit before accessing the fixed MTRR MSRs. Though on a CPU that does not support the fixed MTRR capability this results in a #GP. The #GP itself is harmless because the RDMSR fault is handled gracefully, but results in a WARN_ON(). Add the missing capability check to prevent this. Fixes: 2b1f6278d77c ("[PATCH] x86: Save the MTRRs of the BSP before booting an AP") Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240808000244.946864-1-ak@linux.intel.com commit 660e4b18a72efe555c9b7ff9a80cfd4777af9609 Merge: 6a0e382640128 6d45e1c948a8b Author: Linus Torvalds Date: Thu Aug 8 07:32:20 2024 -0700 Merge tag 'mm-hotfixes-stable-2024-08-07-18-32' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "Nine hotfixes. Five are cc:stable, the others either pertain to post-6.10 material or aren't considered necessary for earlier kernels. Five are MM and four are non-MM. No identifiable theme here - please see the individual changelogs" * tag 'mm-hotfixes-stable-2024-08-07-18-32' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: padata: Fix possible divide-by-0 panic in padata_mt_helper() mailmap: update entry for David Heidelberg memcg: protect concurrent access to mem_cgroup_idr mm: shmem: fix incorrect aligned index when checking conflicts mm: shmem: avoid allocating huge pages larger than MAX_PAGECACHE_ORDER for shmem mm: list_lru: fix UAF for memory cgroup kcov: properly check for softirq context MAINTAINERS: Update LTP members and web selftests: mm: add s390 to ARCH check commit 7cc06e729460a209b84d3db4db56c9f85f048cc2 Author: Gergo Koteles Date: Thu Jul 25 11:21:10 2024 +0200 platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands Calling VPC commands consists of several VPCW and VPCR ACPI calls. These calls and their results can get mixed up if they are called simultaneously from different threads, like acpi notify handler, sysfs, debugfs, notification chain. The commit e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") made the race issues much worse than before it but some races were possible even before that commit. Add a mutex to synchronize VPC commands. Fixes: e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") Fixes: e82882cdd241 ("platform/x86: Add driver for Yoga Tablet Mode switch") Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/f26782fa1194ad11ed5d9ba121a804e59b58b026.1721898747.git.soyer@irl.hu Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit cde7886b35176d56e72bfc68dc104fa08e7b072c Author: Gergo Koteles Date: Thu Jul 25 11:21:08 2024 +0200 platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc Some models need to trigger the EC after each YMC event for the yoga mode control to work properly. EC triggering consist of a VPC call from the lenovo-ymc module. Except for this, all VPC calls are in the ideapad-laptop module. Since ideapad-laptop has a notification chain, a new YMC_EVENT action can be added and triggered from the lenovo-ymc module. Then the ideapad-laptop can trigger the EC. If the triggering is in the ideapad-laptop module, then the ec_trigger module parameter should be there as well. Move the ymc_trigger_ec functionality and the ec_trigger module parameter to the ideapad-laptop module. Signed-off-by: Gergo Koteles Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/d980ab3ac32b5e554f456b0ff17279bfdbe2a203.1721898747.git.soyer@irl.hu Signed-off-by: Ilpo Järvinen commit 613e3900c24bb1379d994f44d75d31c3223cc263 Author: Gergo Koteles Date: Thu Jul 25 11:21:07 2024 +0200 platform/x86: ideapad-laptop: introduce a generic notification chain There are several cases where a notification chain can simplify Lenovo WMI drivers. Add a generic notification chain into ideapad-laptop. Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/c5a43efae8a32bd034c3d19c0a686941347575a7.1721898747.git.soyer@irl.hu Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 78296429e20052b029211b0aca64aadc5052d581 Author: Shyam Sundar S K Date: Tue Jul 30 19:53:16 2024 +0530 platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled If the Ambient Light Sensor (ALS) is disabled, the current code in the PMF driver does not query for Human Presence Detection (HPD) data in amd_pmf_get_sensor_info(). As a result, stale HPD data is used by PMF-TA to evaluate policy conditions, leading to unexpected behavior in the policy output actions. To resolve this issue, modify the PMF driver to query HPD data independently of ALS. Since user_present is a boolean, modify the current code to return true if the user is present and false if the user is away or if the sensor is not detected, and report this status to the PMF TA firmware accordingly. With this change, amd_pmf_get_sensor_info() now returns void instead of int. Fixes: cedecdba60f4 ("platform/x86/amd/pmf: Get ambient light information from AMD SFH driver") 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/20240730142316.3846259-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 06ce0af34177a110d6a5cf71f924965b9b230691 Author: Dr. David Alan Gilbert Date: Wed May 29 00:11:23 2024 +0100 soc: fsl: qbman: remove unused struct 'cgr_comp' 'cgr_comp' has been unused since commit 96f413f47677 ("soc/fsl/qbman: fix issue in qman_delete_cgr_safe()"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Sean Anderson Signed-off-by: Michael Ellerman Link: https://msgid.link/20240528231123.136664-1-linux@treblig.org commit 03898691d42e0170e7d00f07cbe21ce0e9f3a8fa Author: Takashi Iwai Date: Thu Aug 8 10:18:01 2024 +0200 ALSA: usb-audio: Re-add ScratchAmp quirk entries At the code refactoring of USB-audio quirk handling, I assumed that the quirk entries of Stanton ScratchAmp devices were only about the device name, and moved them completely into the rename table. But it seems that the device requires the quirk entry so that it's probed by the driver itself. This re-adds back the quirk entries of ScratchAmp, but in a minimalistic manner. Fixes: 5436f59bc5bc ("ALSA: usb-audio: Move device rename and profile quirks to an internal table") Link: https://patch.msgid.link/20240808081803.22300-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 74b0666f97f9455bc799405b7874df62fcb66bae Author: Wolfram Sang Date: Tue Aug 6 13:35:33 2024 +0200 i2c: testunit: match HostNotify test name with docs Ensure the test has the same name in the code as it has in the docs. Signed-off-by: Wolfram Sang commit b928e7d19dfd8a336e13ec0d21e1d60dc285efd5 Merge: bc59b558927b1 b5431dc2803ac Author: Jakub Kicinski Date: Wed Aug 7 20:31:42 2024 -0700 Merge tag 'for-net-2024-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_sync: avoid dup filtering when passive scanning with adv monitor - hci_qca: don't call pwrseq_power_off() twice for QCA6390 - hci_qca: fix QCA6390 support on non-DT platforms - hci_qca: fix a NULL-pointer derefence at shutdown - l2cap: always unlock channel in l2cap_conless_channel() * tag 'for-net-2024-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor Bluetooth: l2cap: always unlock channel in l2cap_conless_channel() Bluetooth: hci_qca: fix a NULL-pointer derefence at shutdown Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms Bluetooth: hci_qca: don't call pwrseq_power_off() twice for QCA6390 ==================== Link: https://patch.msgid.link/20240807210103.142483-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit bc59b558927b180acbec40a0246557f77007e820 Merge: da03f5d1b2c31 290f1c033281c Author: Jakub Kicinski Date: Wed Aug 7 20:26:57 2024 -0700 Merge branch 'idpf-fix-3-bugs-revealed-by-the-chapter-i' Tony Nguyen says: ==================== idpf: fix 3 bugs revealed by the Chapter I Alexander Lobakin says: The libeth conversion revealed 2 serious issues which lead to sporadic crashes or WARNs under certain configurations. Additional one was found while debugging these two with kmemleak. This one is targeted stable, the rest can be backported manually later if needed. They can be reproduced only after the conversion is applied anyway. ==================== Link: https://patch.msgid.link/20240806220923.3359860-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 290f1c033281c1a502a3cd1c53c3a549259c491f Author: Alexander Lobakin Date: Tue Aug 6 15:09:22 2024 -0700 idpf: fix UAFs when destroying the queues The second tagged commit started sometimes (very rarely, but possible) throwing WARNs from net/core/page_pool.c:page_pool_disable_direct_recycling(). Turned out idpf frees interrupt vectors with embedded NAPIs *before* freeing the queues making page_pools' NAPI pointers lead to freed memory before these pools are destroyed by libeth. It's not clear whether there are other accesses to the freed vectors when destroying the queues, but anyway, we usually free queue/interrupt vectors only when the queues are destroyed and the NAPIs are guaranteed to not be referenced anywhere. Invert the allocation and freeing logic making queue/interrupt vectors be allocated first and freed last. Vectors don't require queues to be present, so this is safe. Additionally, this change allows to remove that useless queue->q_vector pointer cleanup, as vectors are still valid when freeing the queues (+ both are freed within one function, so it's not clear why nullify the pointers at all). Fixes: 1c325aac10a8 ("idpf: configure resources for TX queues") Fixes: 90912f9f4f2d ("idpf: convert header split mode to libeth + napi_build_skb()") Reported-by: Michal Kubiak Signed-off-by: Alexander Lobakin Reviewed-by: Simon Horman Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240806220923.3359860-4-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3cc88e8405b8d55e0ff035e31971aadd6baee2b6 Author: Michal Kubiak Date: Tue Aug 6 15:09:21 2024 -0700 idpf: fix memleak in vport interrupt configuration The initialization of vport interrupt consists of two functions: 1) idpf_vport_intr_init() where a generic configuration is done 2) idpf_vport_intr_req_irq() where the irq for each q_vector is requested. The first function used to create a base name for each interrupt using "kasprintf()" call. Unfortunately, although that call allocated memory for a text buffer, that memory was never released. Fix this by removing creating the interrupt base name in 1). Instead, always create a full interrupt name in the function 2), because there is no need to create a base name separately, considering that the function 2) is never called out of idpf_vport_intr_init() context. Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport") Cc: stable@vger.kernel.org # 6.7 Signed-off-by: Michal Kubiak Reviewed-by: Pavan Kumar Linga Signed-off-by: Alexander Lobakin Reviewed-by: Simon Horman Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240806220923.3359860-3-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit f01032a2ca099ec8d619aaa916c3762aa62495df Author: Alexander Lobakin Date: Tue Aug 6 15:09:20 2024 -0700 idpf: fix memory leaks and crashes while performing a soft reset The second tagged commit introduced a UAF, as it removed restoring q_vector->vport pointers after reinitializating the structures. This is due to that all queue allocation functions are performed here with the new temporary vport structure and those functions rewrite the backpointers to the vport. Then, this new struct is freed and the pointers start leading to nowhere. But generally speaking, the current logic is very fragile. It claims to be more reliable when the system is low on memory, but in fact, it consumes two times more memory as at the moment of running this function, there are two vports allocated with their queues and vectors. Moreover, it claims to prevent the driver from running into "bad state", but in fact, any error during the rebuild leaves the old vport in the partially allocated state. Finally, if the interface is down when the function is called, it always allocates a new queue set, but when the user decides to enable the interface later on, vport_open() allocates them once again, IOW there's a clear memory leak here. Just don't allocate a new queue set when performing a reset, that solves crashes and memory leaks. Readd the old queue number and reopen the interface on rollback - that solves limbo states when the device is left disabled and/or without HW queues enabled. Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks") Fixes: e4891e4687c8 ("idpf: split &idpf_queue into 4 strictly-typed queue structures") Signed-off-by: Alexander Lobakin Reviewed-by: Simon Horman Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240806220923.3359860-2-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit da03f5d1b2c319a2b74fe76edeadcd8fa5f44376 Author: Michael Chan Date: Mon Aug 5 22:37:42 2024 -0700 bnxt_en : Fix memory out-of-bounds in bnxt_fill_hw_rss_tbl() A recent commit has modified the code in __bnxt_reserve_rings() to set the default RSS indirection table to default only when the number of RX rings is changing. While this works for newer firmware that requires RX ring reservations, it causes the regression on older firmware not requiring RX ring resrvations (BNXT_NEW_RM() returns false). With older firmware, RX ring reservations are not required and so hw_resc->resv_rx_rings is not always set to the proper value. The comparison: if (old_rx_rings != bp->hw_resc.resv_rx_rings) in __bnxt_reserve_rings() may be false even when the RX rings are changing. This will cause __bnxt_reserve_rings() to skip setting the default RSS indirection table to default to match the current number of RX rings. This may later cause bnxt_fill_hw_rss_tbl() to use an out-of-range index. We already have bnxt_check_rss_tbl_no_rmgr() to handle exactly this scenario. We just need to move it up in bnxt_need_reserve_rings() to be called unconditionally when using older firmware. Without the fix, if the TX rings are changing, we'll skip the bnxt_check_rss_tbl_no_rmgr() call and __bnxt_reserve_rings() may also skip the bnxt_set_dflt_rss_indir_tbl() call for the reason explained in the last paragraph. Without setting the default RSS indirection table to default, it causes the regression: BUG: KASAN: slab-out-of-bounds in __bnxt_hwrm_vnic_set_rss+0xb79/0xe40 Read of size 2 at addr ffff8881c5809618 by task ethtool/31525 Call Trace: __bnxt_hwrm_vnic_set_rss+0xb79/0xe40 bnxt_hwrm_vnic_rss_cfg_p5+0xf7/0x460 __bnxt_setup_vnic_p5+0x12e/0x270 __bnxt_open_nic+0x2262/0x2f30 bnxt_open_nic+0x5d/0xf0 ethnl_set_channels+0x5d4/0xb30 ethnl_default_set_doit+0x2f1/0x620 Reported-by: Breno Leitao Closes: https://lore.kernel.org/netdev/ZrC6jpghA3PWVWSB@gmail.com/ Fixes: 98ba1d931f61 ("bnxt_en: Fix RSS logic in __bnxt_reserve_rings()") Reviewed-by: Pavan Chebbi Reviewed-by: Kalesh AP Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Tested-by: Breno Leitao Link: https://patch.msgid.link/20240806053742.140304-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit e3862093ee93fcfbdadcb7957f5f8974fffa806a Author: Joe Hattori Date: Tue Aug 6 10:13:27 2024 +0900 net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() bcm_sf2_mdio_register() calls of_phy_find_device() and then phy_device_remove() in a loop to remove existing PHY devices. of_phy_find_device() eventually calls bus_find_device(), which calls get_device() on the returned struct device * to increment the refcount. The current implementation does not decrement the refcount, which causes memory leak. This commit adds the missing phy_device_free() call to decrement the refcount via put_device() to balance the refcount. Fixes: 771089c2a485 ("net: dsa: bcm_sf2: Ensure that MDIO diversion is used") Signed-off-by: Joe Hattori Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240806011327.3817861-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Jakub Kicinski commit d27a835f41d947f62e6a95e89ba523299c9e6437 Author: Zhengchao Shao Date: Mon Aug 5 12:38:56 2024 +0800 net/smc: add the max value of fallback reason count The number of fallback reasons defined in the smc_clc.h file has reached 36. For historical reasons, some are no longer quoted, and there's 33 actually in use. So, add the max value of fallback reason count to 36. Fixes: 6ac1e6563f59 ("net/smc: support smc v2.x features validate") Fixes: 7f0620b9940b ("net/smc: support max connections per lgr negotiation") Fixes: 69b888e3bb4b ("net/smc: support max links per lgr negotiation in clc handshake") Signed-off-by: Zhengchao Shao Reviewed-by: Wenjia Zhang Reviewed-by: D. Wythe Link: https://patch.msgid.link/20240805043856.565677-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski commit 6d45e1c948a8b7ed6ceddb14319af69424db730c Author: Waiman Long Date: Tue Aug 6 13:46:47 2024 -0400 padata: Fix possible divide-by-0 panic in padata_mt_helper() We are hit with a not easily reproducible divide-by-0 panic in padata.c at bootup time. [ 10.017908] Oops: divide error: 0000 1 PREEMPT SMP NOPTI [ 10.017908] CPU: 26 PID: 2627 Comm: kworker/u1666:1 Not tainted 6.10.0-15.el10.x86_64 #1 [ 10.017908] Hardware name: Lenovo ThinkSystem SR950 [7X12CTO1WW]/[7X12CTO1WW], BIOS [PSE140J-2.30] 07/20/2021 [ 10.017908] Workqueue: events_unbound padata_mt_helper [ 10.017908] RIP: 0010:padata_mt_helper+0x39/0xb0 : [ 10.017963] Call Trace: [ 10.017968] [ 10.018004] ? padata_mt_helper+0x39/0xb0 [ 10.018084] process_one_work+0x174/0x330 [ 10.018093] worker_thread+0x266/0x3a0 [ 10.018111] kthread+0xcf/0x100 [ 10.018124] ret_from_fork+0x31/0x50 [ 10.018138] ret_from_fork_asm+0x1a/0x30 [ 10.018147] Looking at the padata_mt_helper() function, the only way a divide-by-0 panic can happen is when ps->chunk_size is 0. The way that chunk_size is initialized in padata_do_multithreaded(), chunk_size can be 0 when the min_chunk in the passed-in padata_mt_job structure is 0. Fix this divide-by-0 panic by making sure that chunk_size will be at least 1 no matter what the input parameters are. Link: https://lkml.kernel.org/r/20240806174647.1050398-1-longman@redhat.com Fixes: 004ed42638f4 ("padata: add basic support for multithreaded jobs") Signed-off-by: Waiman Long Cc: Daniel Jordan Cc: Steffen Klassert Cc: Waiman Long Cc: Signed-off-by: Andrew Morton commit f2087995fb7165a88b50dde02f3909e448522e0a Author: David Heidelberg Date: Sun Aug 4 14:45:54 2024 +0900 mailmap: update entry for David Heidelberg Link my old gmail address to my active email. Link: https://lkml.kernel.org/r/20240804054704.859503-1-david@ixit.cz Signed-off-by: David Heidelberg Cc: David S. Miller Cc: Jiri Kosina Cc: Manivannan Sadhasivam Signed-off-by: Andrew Morton commit 9972605a238339b85bd16b084eed5f18414d22db Author: Shakeel Butt Date: Fri Aug 2 16:58:22 2024 -0700 memcg: protect concurrent access to mem_cgroup_idr Commit 73f576c04b94 ("mm: memcontrol: fix cgroup creation failure after many small jobs") decoupled the memcg IDs from the CSS ID space to fix the cgroup creation failures. It introduced IDR to maintain the memcg ID space. The IDR depends on external synchronization mechanisms for modifications. For the mem_cgroup_idr, the idr_alloc() and idr_replace() happen within css callback and thus are protected through cgroup_mutex from concurrent modifications. However idr_remove() for mem_cgroup_idr was not protected against concurrency and can be run concurrently for different memcgs when they hit their refcnt to zero. Fix that. We have been seeing list_lru based kernel crashes at a low frequency in our fleet for a long time. These crashes were in different part of list_lru code including list_lru_add(), list_lru_del() and reparenting code. Upon further inspection, it looked like for a given object (dentry and inode), the super_block's list_lru didn't have list_lru_one for the memcg of that object. The initial suspicions were either the object is not allocated through kmem_cache_alloc_lru() or somehow memcg_list_lru_alloc() failed to allocate list_lru_one() for a memcg but returned success. No evidence were found for these cases. Looking more deeply, we started seeing situations where valid memcg's id is not present in mem_cgroup_idr and in some cases multiple valid memcgs have same id and mem_cgroup_idr is pointing to one of them. So, the most reasonable explanation is that these situations can happen due to race between multiple idr_remove() calls or race between idr_alloc()/idr_replace() and idr_remove(). These races are causing multiple memcgs to acquire the same ID and then offlining of one of them would cleanup list_lrus on the system for all of them. Later access from other memcgs to the list_lru cause crashes due to missing list_lru_one. Link: https://lkml.kernel.org/r/20240802235822.1830976-1-shakeel.butt@linux.dev Fixes: 73f576c04b94 ("mm: memcontrol: fix cgroup creation failure after many small jobs") Signed-off-by: Shakeel Butt Acked-by: Muchun Song Reviewed-by: Roman Gushchin Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton commit 4cbf320b1500fe64fcef8c96ed74dfc1ae2c9e2c Author: Baolin Wang Date: Wed Jul 31 13:46:20 2024 +0800 mm: shmem: fix incorrect aligned index when checking conflicts In the shmem_suitable_orders() function, xa_find() is used to check for conflicts in the pagecache to select suitable huge orders. However, when checking each huge order in every loop, the aligned index is calculated from the previous iteration, which may cause suitable huge orders to be missed. We should use the original index each time in the loop to calculate a new aligned index for checking conflicts to avoid this issue. Link: https://lkml.kernel.org/r/07433b0f16a152bffb8cee34934a5c040e8e2ad6.1722404078.git.baolin.wang@linux.alibaba.com Fixes: e7a2ab7b3bb5 ("mm: shmem: add mTHP support for anonymous shmem") Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Cc: Barry Song <21cnbao@gmail.com> Cc: Gavin Shan Cc: Hugh Dickins Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Cc: Zi Yan Cc: Barry Song Cc: Kefeng Wang Signed-off-by: Andrew Morton commit b66b1b71d7ff5464d23a0ac6f73fae461b7264fd Author: Baolin Wang Date: Wed Jul 31 13:46:19 2024 +0800 mm: shmem: avoid allocating huge pages larger than MAX_PAGECACHE_ORDER for shmem Similar to commit d659b715e94ac ("mm/huge_memory: avoid PMD-size page cache if needed"), ARM64 can support 512MB PMD-sized THP when the base page size is 64KB, which is larger than the maximum supported page cache size MAX_PAGECACHE_ORDER. This is not expected. To fix this issue, use THP_ORDERS_ALL_FILE_DEFAULT for shmem to filter allowable huge orders. [baolin.wang@linux.alibaba.com: remove comment, per Barry] Link: https://lkml.kernel.org/r/c55d7ef7-78aa-4ed6-b897-c3e03a3f3ab7@linux.alibaba.com [wangkefeng.wang@huawei.com: remove local `orders'] Link: https://lkml.kernel.org/r/87769ae8-b6c6-4454-925d-1864364af9c8@huawei.com Link: https://lkml.kernel.org/r/117121665254442c3c7f585248296495e5e2b45c.1722404078.git.baolin.wang@linux.alibaba.com Fixes: e7a2ab7b3bb5 ("mm: shmem: add mTHP support for anonymous shmem") Signed-off-by: Baolin Wang Signed-off-by: Kefeng Wang Reviewed-by: Barry Song Cc: Barry Song <21cnbao@gmail.com> Cc: David Hildenbrand Cc: Gavin Shan Cc: Hugh Dickins Cc: Lance Yang Cc: Matthew Wilcox Cc: Ryan Roberts Cc: Zi Yan Signed-off-by: Andrew Morton commit 5161b48712dcd08ec427c450399d4d1483e21dea Author: Muchun Song Date: Thu Jul 18 16:36:07 2024 +0800 mm: list_lru: fix UAF for memory cgroup The mem_cgroup_from_slab_obj() is supposed to be called under rcu lock or cgroup_mutex or others which could prevent returned memcg from being freed. Fix it by adding missing rcu read lock. Found by code inspection. [songmuchun@bytedance.com: only grab rcu lock when necessary, per Vlastimil] Link: https://lkml.kernel.org/r/20240801024603.1865-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20240718083607.42068-1-songmuchun@bytedance.com Fixes: 0a97c01cd20b ("list_lru: allow explicit memcg and NUMA node selection") Signed-off-by: Muchun Song Acked-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Nhat Pham Cc: Signed-off-by: Andrew Morton commit 7d4df2dad312f270d62fecb0e5c8b086c6d7dcfc Author: Andrey Konovalov Date: Mon Jul 29 04:21:58 2024 +0200 kcov: properly check for softirq context When collecting coverage from softirqs, KCOV uses in_serving_softirq() to check whether the code is running in the softirq context. Unfortunately, in_serving_softirq() is > 0 even when the code is running in the hardirq or NMI context for hardirqs and NMIs that happened during a softirq. As a result, if a softirq handler contains a remote coverage collection section and a hardirq with another remote coverage collection section happens during handling the softirq, KCOV incorrectly detects a nested softirq coverate collection section and prints a WARNING, as reported by syzbot. This issue was exposed by commit a7f3813e589f ("usb: gadget: dummy_hcd: Switch to hrtimer transfer scheduler"), which switched dummy_hcd to using hrtimer and made the timer's callback be executed in the hardirq context. Change the related checks in KCOV to account for this behavior of in_serving_softirq() and make KCOV ignore remote coverage collection sections in the hardirq and NMI contexts. This prevents the WARNING printed by syzbot but does not fix the inability of KCOV to collect coverage from the __usb_hcd_giveback_urb when dummy_hcd is in use (caused by a7f3813e589f); a separate patch is required for that. Link: https://lkml.kernel.org/r/20240729022158.92059-1-andrey.konovalov@linux.dev Fixes: 5ff3b30ab57d ("kcov: collect coverage from interrupts") Signed-off-by: Andrey Konovalov Reported-by: syzbot+2388cdaeb6b10f0c13ac@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=2388cdaeb6b10f0c13ac Acked-by: Marco Elver Cc: Alan Stern Cc: Aleksandr Nogikh Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Greg Kroah-Hartman Cc: Marcello Sylvester Bauer Cc: Signed-off-by: Andrew Morton commit 37bf7fbe1db27792b27345871aa5f8ae52cd396c Author: Petr Vorel Date: Fri Jul 26 09:20:09 2024 +0200 MAINTAINERS: Update LTP members and web LTP project uses now readthedocs.org instance instead of GitHub wiki. LTP maintainers are listed in alphabetical order. Link: https://lkml.kernel.org/r/20240726072009.1021599-1-pvorel@suse.cz Signed-off-by: Petr Vorel Reviewed-by: Li Wang Reviewed-by: Cyril Hrubis Cc: Jan Stancek Cc: Xiao Yang Cc: Yang Xu Signed-off-by: Andrew Morton commit 30b651c8bc788c068a978dc760e9d5f824f7019e Author: Nico Pache Date: Wed Jul 24 15:35:17 2024 -0600 selftests: mm: add s390 to ARCH check commit 0518dbe97fe6 ("selftests/mm: fix cross compilation with LLVM") changed the env variable for the architecture from MACHINE to ARCH. This is preventing 3 required TEST_GEN_FILES from being included when cross compiling s390x and errors when trying to run the test suite. This is due to the ARCH variable already being set and the arch folder name being s390. Add "s390" to the filtered list to cover this case and have the 3 files included in the build. Link: https://lkml.kernel.org/r/20240724213517.23918-1-npache@redhat.com Fixes: 0518dbe97fe6 ("selftests/mm: fix cross compilation with LLVM") Signed-off-by: Nico Pache Cc: Mark Brown Cc: Albert Ou Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton commit 73dc1656f41a42849e43b945fe44d4e3d55eb6c3 Author: Kent Overstreet Date: Wed Aug 7 16:40:14 2024 -0400 bcachefs: Use bch2_wait_on_allocator() in btree node alloc path If the allocator gets stuck, we need to know why. Signed-off-by: Kent Overstreet commit cecf72798b25fcb00303392407fccf500a746747 Author: Kent Overstreet Date: Wed Aug 7 13:58:57 2024 -0400 bcachefs: Make allocator stuck timeout configurable, ratelimit messages Limit these messages to once every 2 minutes to avoid spamming logs; with multiple devices the output can be quite significant. Also, up the default timeout to 30 seconds from 10 seconds. Signed-off-by: Kent Overstreet commit 6d496e02b4a70926c3bd4e7ab6249ff262eb3bc0 Author: Kent Overstreet Date: Wed Aug 7 18:03:54 2024 -0400 bcachefs: Add missing path_traverse() to btree_iter_next_node() This fixes a bug exposed by the next path - we pop an assert in path_set_should_be_locked(). Signed-off-by: Kent Overstreet commit 0b6743bd60a56a701070b89fb80c327a44b7b3e2 Author: Steven Rostedt Date: Wed Aug 7 18:54:02 2024 -0400 tracefs: Use generic inode RCU for synchronizing freeing With structure layout randomization enabled for 'struct inode' we need to avoid overlapping any of the RCU-used / initialized-only-once members, e.g. i_lru or i_sb_list to not corrupt related list traversals when making use of the rcu_head. For an unlucky structure layout of 'struct inode' we may end up with the following splat when running the ftrace selftests: [<...>] list_del corruption, ffff888103ee2cb0->next (tracefs_inode_cache+0x0/0x4e0 [slab object]) is NULL (prev is tracefs_inode_cache+0x78/0x4e0 [slab object]) [<...>] ------------[ cut here ]------------ [<...>] kernel BUG at lib/list_debug.c:54! [<...>] invalid opcode: 0000 [#1] PREEMPT SMP KASAN [<...>] CPU: 3 PID: 2550 Comm: mount Tainted: G N 6.8.12-grsec+ #122 ed2f536ca62f28b087b90e3cc906a8d25b3ddc65 [<...>] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 [<...>] RIP: 0010:[] __list_del_entry_valid_or_report+0x138/0x3e0 [<...>] Code: 48 b8 99 fb 65 f2 ff ff ff ff e9 03 5c d9 fc cc 48 b8 99 fb 65 f2 ff ff ff ff e9 33 5a d9 fc cc 48 b8 99 fb 65 f2 ff ff ff ff <0f> 0b 4c 89 e9 48 89 ea 48 89 ee 48 c7 c7 60 8f dd 89 31 c0 e8 2f [<...>] RSP: 0018:fffffe80416afaf0 EFLAGS: 00010283 [<...>] RAX: 0000000000000098 RBX: ffff888103ee2cb0 RCX: 0000000000000000 [<...>] RDX: ffffffff84655fe8 RSI: ffffffff89dd8b60 RDI: 0000000000000001 [<...>] RBP: ffff888103ee2cb0 R08: 0000000000000001 R09: fffffbd0082d5f25 [<...>] R10: fffffe80416af92f R11: 0000000000000001 R12: fdf99c16731d9b6d [<...>] R13: 0000000000000000 R14: ffff88819ad4b8b8 R15: 0000000000000000 [<...>] RBX: tracefs_inode_cache+0x0/0x4e0 [slab object] [<...>] RDX: __list_del_entry_valid_or_report+0x108/0x3e0 [<...>] RSI: __func__.47+0x4340/0x4400 [<...>] RBP: tracefs_inode_cache+0x0/0x4e0 [slab object] [<...>] RSP: process kstack fffffe80416afaf0+0x7af0/0x8000 [mount 2550 2550] [<...>] R09: kasan shadow of process kstack fffffe80416af928+0x7928/0x8000 [mount 2550 2550] [<...>] R10: process kstack fffffe80416af92f+0x792f/0x8000 [mount 2550 2550] [<...>] R14: tracefs_inode_cache+0x78/0x4e0 [slab object] [<...>] FS: 00006dcb380c1840(0000) GS:ffff8881e0600000(0000) knlGS:0000000000000000 [<...>] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [<...>] CR2: 000076ab72b30e84 CR3: 000000000b088004 CR4: 0000000000360ef0 shadow CR4: 0000000000360ef0 [<...>] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [<...>] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [<...>] ASID: 0003 [<...>] Stack: [<...>] ffffffff818a2315 00000000f5c856ee ffffffff896f1840 ffff888103ee2cb0 [<...>] ffff88812b6b9750 0000000079d714b6 fffffbfff1e9280b ffffffff8f49405f [<...>] 0000000000000001 0000000000000000 ffff888104457280 ffffffff8248b392 [<...>] Call Trace: [<...>] [<...>] [] ? lock_release+0x175/0x380 fffffe80416afaf0 [<...>] [] list_lru_del+0x152/0x740 fffffe80416afb48 [<...>] [] list_lru_del_obj+0x113/0x280 fffffe80416afb88 [<...>] [] ? _atomic_dec_and_lock+0x119/0x200 fffffe80416afb90 [<...>] [] iput_final+0x1c4/0x9a0 fffffe80416afbb8 [<...>] [] dentry_unlink_inode+0x44b/0xaa0 fffffe80416afbf8 [<...>] [] __dentry_kill+0x23c/0xf00 fffffe80416afc40 [<...>] [] ? __this_cpu_preempt_check+0x1f/0xa0 fffffe80416afc48 [<...>] [] ? shrink_dentry_list+0x1c5/0x760 fffffe80416afc70 [<...>] [] ? shrink_dentry_list+0x51/0x760 fffffe80416afc78 [<...>] [] shrink_dentry_list+0x288/0x760 fffffe80416afc80 [<...>] [] shrink_dcache_sb+0x155/0x420 fffffe80416afcc8 [<...>] [] ? debug_smp_processor_id+0x23/0xa0 fffffe80416afce0 [<...>] [] ? do_one_tree+0x140/0x140 fffffe80416afcf8 [<...>] [] ? do_remount+0x329/0xa00 fffffe80416afd18 [<...>] [] ? security_sb_remount+0x81/0x1c0 fffffe80416afd38 [<...>] [] reconfigure_super+0x856/0x14e0 fffffe80416afd70 [<...>] [] ? ns_capable_common+0xe7/0x2a0 fffffe80416afd90 [<...>] [] do_remount+0x416/0xa00 fffffe80416afdd0 [<...>] [] path_mount+0x5c4/0x900 fffffe80416afe28 [<...>] [] ? finish_automount+0x13a0/0x13a0 fffffe80416afe60 [<...>] [] ? user_path_at_empty+0xb2/0x140 fffffe80416afe88 [<...>] [] do_mount+0x115/0x1c0 fffffe80416afeb8 [<...>] [] ? path_mount+0x900/0x900 fffffe80416afed8 [<...>] [] ? __kasan_check_write+0x1c/0xa0 fffffe80416afee0 [<...>] [] __do_sys_mount+0x12f/0x280 fffffe80416aff30 [<...>] [] __x64_sys_mount+0xcd/0x2e0 fffffe80416aff70 [<...>] [] ? syscall_trace_enter+0x218/0x380 fffffe80416aff88 [<...>] [] x64_sys_call+0x5d5e/0x6720 fffffe80416affa8 [<...>] [] do_syscall_64+0xcd/0x3c0 fffffe80416affb8 [<...>] [] entry_SYSCALL_64_safe_stack+0x4c/0x87 fffffe80416affe8 [<...>] [<...>] [<...>] RIP: 0033:[<00006dcb382ff66a>] vm_area_struct[mount 2550 2550 file 6dcb38225000-6dcb3837e000 22 55(read|exec|mayread|mayexec)]+0x0/0xb8 [userland map] [<...>] Code: 48 8b 0d 29 18 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d f6 17 0d 00 f7 d8 64 89 01 48 [<...>] RSP: 002b:0000763d68192558 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [<...>] RAX: ffffffffffffffda RBX: 00006dcb38433264 RCX: 00006dcb382ff66a [<...>] RDX: 000017c3e0d11210 RSI: 000017c3e0d1a5a0 RDI: 000017c3e0d1ae70 [<...>] RBP: 000017c3e0d10fb0 R08: 000017c3e0d11260 R09: 00006dcb383d1be0 [<...>] R10: 000000000020002e R11: 0000000000000246 R12: 0000000000000000 [<...>] R13: 000017c3e0d1ae70 R14: 000017c3e0d11210 R15: 000017c3e0d10fb0 [<...>] RBX: vm_area_struct[mount 2550 2550 file 6dcb38433000-6dcb38434000 5b 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] RCX: vm_area_struct[mount 2550 2550 file 6dcb38225000-6dcb3837e000 22 55(read|exec|mayread|mayexec)]+0x0/0xb8 [userland map] [<...>] RDX: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] RSI: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] RDI: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] RBP: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] RSP: vm_area_struct[mount 2550 2550 anon 763d68173000-763d68195000 7ffffffdd 100133(read|write|mayread|maywrite|growsdown|account)]+0x0/0xb8 [userland map] [<...>] R08: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] R09: vm_area_struct[mount 2550 2550 file 6dcb383d1000-6dcb383d3000 1cd 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] R13: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] R14: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] R15: vm_area_struct[mount 2550 2550 anon 17c3e0d0f000-17c3e0d31000 17c3e0d0f 100033(read|write|mayread|maywrite|account)]+0x0/0xb8 [userland map] [<...>] [<...>] Modules linked in: [<...>] ---[ end trace 0000000000000000 ]--- The list debug message as well as RBX's symbolic value point out that the object in question was allocated from 'tracefs_inode_cache' and that the list's '->next' member is at offset 0. Dumping the layout of the relevant parts of 'struct tracefs_inode' gives the following: struct tracefs_inode { union { struct inode { struct list_head { struct list_head * next; /* 0 8 */ struct list_head * prev; /* 8 8 */ } i_lru; [...] } vfs_inode; struct callback_head { void (*func)(struct callback_head *); /* 0 8 */ struct callback_head * next; /* 8 8 */ } rcu; }; [...] }; Above shows that 'vfs_inode.i_lru' overlaps with 'rcu' which will destroy the 'i_lru' list as soon as the 'rcu' member gets used, e.g. in call_rcu() or later when calling the RCU callback. This will disturb concurrent list traversals as well as object reuse which assumes these list heads will keep their integrity. For reproduction, the following diff manually overlays 'i_lru' with 'rcu' as, otherwise, one would require some good portion of luck for gambling an unlucky RANDSTRUCT seed: --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -629,6 +629,7 @@ struct inode { umode_t i_mode; unsigned short i_opflags; kuid_t i_uid; + struct list_head i_lru; /* inode LRU list */ kgid_t i_gid; unsigned int i_flags; @@ -690,7 +691,6 @@ struct inode { u16 i_wb_frn_avg_time; u16 i_wb_frn_history; #endif - struct list_head i_lru; /* inode LRU list */ struct list_head i_sb_list; struct list_head i_wb_list; /* backing dev writeback list */ union { The tracefs inode does not need to supply its own RCU delayed destruction of its inode. The inode code itself offers both a "destroy_inode()" callback that gets called when the last reference of the inode is released, and the "free_inode()" which is called after a RCU synchronization period from the "destroy_inode()". The tracefs code can unlink the inode from its list in the destroy_inode() callback, and the simply free it from the free_inode() callback. This should provide the same protection. Link: https://lore.kernel.org/all/20240807115143.45927-3-minipli@grsecurity.net/ Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Ajay Kaher Cc: Ilkka =?utf-8?b?TmF1bGFww6TDpA==?= Link: https://lore.kernel.org/20240807185402.61410544@gandalf.local.home Fixes: baa23a8d4360 ("tracefs: Reset permissions on remount if permissions are options") Reported-by: Mathias Krause Reported-by: Brad Spengler Suggested-by: Al Viro Signed-off-by: Steven Rostedt (Google) commit 58f7e4d7ba32758b861807e77535853cacc1f426 Author: Jianhui Zhou <912460177@qq.com> Date: Mon Aug 5 19:36:31 2024 +0800 ring-buffer: Remove unused function ring_buffer_nr_pages() Because ring_buffer_nr_pages() is not an inline function and user accesses buffer->buffers[cpu]->nr_pages directly, the function ring_buffer_nr_pages is removed. Signed-off-by: Jianhui Zhou <912460177@qq.com> Link: https://lore.kernel.org/tencent_F4A7E9AB337F44E0F4B858D07D19EF460708@qq.com Signed-off-by: Steven Rostedt (Google) commit bcf86c01ca4676316557dd482c8416ece8c2e143 Author: Tze-nan Wu Date: Mon Aug 5 13:59:22 2024 +0800 tracing: Fix overflow in get_free_elt() "tracing_map->next_elt" in get_free_elt() is at risk of overflowing. Once it overflows, new elements can still be inserted into the tracing_map even though the maximum number of elements (`max_elts`) has been reached. Continuing to insert elements after the overflow could result in the tracing_map containing "tracing_map->max_size" elements, leaving no empty entries. If any attempt is made to insert an element into a full tracing_map using `__tracing_map_insert()`, it will cause an infinite loop with preemption disabled, leading to a CPU hang problem. Fix this by preventing any further increments to "tracing_map->next_elt" once it reaches "tracing_map->max_elt". Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Fixes: 08d43a5fa063e ("tracing: Add lock-free tracing_map") Co-developed-by: Cheng-Jui Wang Link: https://lore.kernel.org/20240805055922.6277-1-Tze-nan.Wu@mediatek.com Signed-off-by: Cheng-Jui Wang Signed-off-by: Tze-nan Wu Signed-off-by: Steven Rostedt (Google) commit 604b72b32522d548f855ed82842d2e49bf384edb Author: Petr Pavlu Date: Sat Aug 3 15:09:26 2024 +0200 function_graph: Fix the ret_stack used by ftrace_graph_ret_addr() When ftrace_graph_ret_addr() is invoked to convert a found stack return address to its original value, the function can end up producing the following crash: [ 95.442712] BUG: kernel NULL pointer dereference, address: 0000000000000028 [ 95.442720] #PF: supervisor read access in kernel mode [ 95.442724] #PF: error_code(0x0000) - not-present page [ 95.442727] PGD 0 P4D 0- [ 95.442731] Oops: Oops: 0000 [#1] PREEMPT SMP PTI [ 95.442736] CPU: 1 UID: 0 PID: 2214 Comm: insmod Kdump: loaded Tainted: G OE K 6.11.0-rc1-default #1 67c62a3b3720562f7e7db5f11c1fdb40b7a2857c [ 95.442747] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE, [K]=LIVEPATCH [ 95.442750] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 [ 95.442754] RIP: 0010:ftrace_graph_ret_addr+0x42/0xc0 [ 95.442766] Code: [...] [ 95.442773] RSP: 0018:ffff979b80ff7718 EFLAGS: 00010006 [ 95.442776] RAX: ffffffff8ca99b10 RBX: ffff979b80ff7760 RCX: ffff979b80167dc0 [ 95.442780] RDX: ffffffff8ca99b10 RSI: ffff979b80ff7790 RDI: 0000000000000005 [ 95.442783] RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000 [ 95.442786] R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff8e9491e0 [ 95.442790] R13: ffffffff8d6f70f0 R14: ffff979b80167da8 R15: ffff979b80167dc8 [ 95.442793] FS: 00007fbf83895740(0000) GS:ffff8a0afdd00000(0000) knlGS:0000000000000000 [ 95.442797] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 95.442800] CR2: 0000000000000028 CR3: 0000000005070002 CR4: 0000000000370ef0 [ 95.442806] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 95.442809] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 95.442816] Call Trace: [ 95.442823] [ 95.442896] unwind_next_frame+0x20d/0x830 [ 95.442905] arch_stack_walk_reliable+0x94/0xe0 [ 95.442917] stack_trace_save_tsk_reliable+0x7d/0xe0 [ 95.442922] klp_check_and_switch_task+0x55/0x1a0 [ 95.442931] task_call_func+0xd3/0xe0 [ 95.442938] klp_try_switch_task.part.5+0x37/0x150 [ 95.442942] klp_try_complete_transition+0x79/0x2d0 [ 95.442947] klp_enable_patch+0x4db/0x890 [ 95.442960] do_one_initcall+0x41/0x2e0 [ 95.442968] do_init_module+0x60/0x220 [ 95.442975] load_module+0x1ebf/0x1fb0 [ 95.443004] init_module_from_file+0x88/0xc0 [ 95.443010] idempotent_init_module+0x190/0x240 [ 95.443015] __x64_sys_finit_module+0x5b/0xc0 [ 95.443019] do_syscall_64+0x74/0x160 [ 95.443232] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 95.443236] RIP: 0033:0x7fbf82f2c709 [ 95.443241] Code: [...] [ 95.443247] RSP: 002b:00007fffd5ea3b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 95.443253] RAX: ffffffffffffffda RBX: 000056359c48e750 RCX: 00007fbf82f2c709 [ 95.443257] RDX: 0000000000000000 RSI: 000056356ed4efc5 RDI: 0000000000000003 [ 95.443260] RBP: 000056356ed4efc5 R08: 0000000000000000 R09: 00007fffd5ea3c10 [ 95.443263] R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000 [ 95.443267] R13: 000056359c48e6f0 R14: 0000000000000000 R15: 0000000000000000 [ 95.443272] [ 95.443274] Modules linked in: [...] [ 95.443385] Unloaded tainted modules: intel_uncore_frequency(E):1 isst_if_common(E):1 skx_edac(E):1 [ 95.443414] CR2: 0000000000000028 The bug can be reproduced with kselftests: cd linux/tools/testing/selftests make TARGETS='ftrace livepatch' (cd ftrace; ./ftracetest test.d/ftrace/fgraph-filter.tc) (cd livepatch; ./test-livepatch.sh) The problem is that ftrace_graph_ret_addr() is supposed to operate on the ret_stack of a selected task but wrongly accesses the ret_stack of the current task. Specifically, the above NULL dereference occurs when task->curr_ret_stack is non-zero, but current->ret_stack is NULL. Correct ftrace_graph_ret_addr() to work with the right ret_stack. Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Reported-by: Miroslav Benes Link: https://lore.kernel.org/20240803131211.17255-1-petr.pavlu@suse.com Fixes: 7aa1eaef9f42 ("function_graph: Allow multiple users to attach to function graph") Signed-off-by: Petr Pavlu Signed-off-by: Steven Rostedt (Google) commit 8e556432477e97ad6179c61b61a32bf5f1af2355 Author: Mathias Krause Date: Tue Jul 23 23:07:53 2024 +0200 eventfs: Use SRCU for freeing eventfs_inodes To mirror the SRCU lock held in eventfs_iterate() when iterating over eventfs inodes, use call_srcu() to free them too. This was accidentally(?) degraded to RCU in commit 43aa6f97c2d0 ("eventfs: Get rid of dentry pointers without refcounts"). Cc: Ajay Kaher Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Linus Torvalds Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20240723210755.8970-1-minipli@grsecurity.net Fixes: 43aa6f97c2d0 ("eventfs: Get rid of dentry pointers without refcounts") Signed-off-by: Mathias Krause Signed-off-by: Steven Rostedt (Google) commit 12c20c65d0460cf34f9a665d8f0c0d77d45a3829 Author: Mathias Krause Date: Tue Jul 23 14:25:21 2024 +0200 eventfs: Don't return NULL in eventfs_create_dir() Commit 77a06c33a22d ("eventfs: Test for ei->is_freed when accessing ei->dentry") added another check, testing if the parent was freed after we released the mutex. If so, the function returns NULL. However, all callers expect it to either return a valid pointer or an error pointer, at least since commit 5264a2f4bb3b ("tracing: Fix a NULL vs IS_ERR() bug in event_subsystem_dir()"). Returning NULL will therefore fail the error condition check in the caller. Fix this by substituting the NULL return value with a fitting error pointer. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: stable@vger.kernel.org Fixes: 77a06c33a22d ("eventfs: Test for ei->is_freed when accessing ei->dentry") Link: https://lore.kernel.org/20240723122522.2724-1-minipli@grsecurity.net Reviewed-by: Dan Carpenter Reviewed-by: Ajay Kaher Signed-off-by: Mathias Krause Signed-off-by: Steven Rostedt (Google) commit 0df2ac59bebfac221463ef57ed3554899b41d75f Author: Mathias Krause Date: Wed Aug 7 13:51:38 2024 +0200 tracefs: Fix inode allocation The leading comment above alloc_inode_sb() is pretty explicit about it: /* * This must be used for allocating filesystems specific inodes to set * up the inode reclaim context correctly. */ Switch tracefs over to alloc_inode_sb() to make sure inodes are properly linked. Cc: Ajay Kaher Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Al Viro Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20240807115143.45927-2-minipli@grsecurity.net Fixes: ba37ff75e04b ("eventfs: Implement tracefs_inode_cache") Signed-off-by: Mathias Krause Signed-off-by: Steven Rostedt (Google) commit 730bbfaf7d4890bd99e637db7767dc68cfeb24e7 Author: Stefan Wahren Date: Sun Aug 4 13:36:11 2024 +0200 spi: spi-fsl-lpspi: Fix scldiv calculation The effective SPI clock frequency should never exceed speed_hz otherwise this might result in undefined behavior of the SPI device. Currently the scldiv calculation could violate this constraint. For the example parameters perclk_rate = 24 MHz and speed_hz = 7 MHz, the function fsl_lpspi_set_bitrate will determine perscale = 0 and scldiv = 1, which is a effective SPI clock of 8 MHz. So fix this by rounding up the quotient of perclk_rate and speed_hz. While this never change within the loop, we can pull this out. Fixes: 5314987de5e5 ("spi: imx: add lpspi bus driver") Signed-off-by: Stefan Wahren Link: https://patch.msgid.link/20240804113611.83613-1-wahrenst@gmx.net Signed-off-by: Mark Brown commit a9a7a2d80790d06cd32c535e2e7b10f72ce592e7 Author: Dmitry Baryshkov Date: Sat Aug 3 13:41:41 2024 +0300 ASoC: codecs: lpass-va-macro: warn on unknown version Warn the users if the driver doesn't know the codec version. This helps in debugging the issues with other codec not detecting the correct version. va_macro 3370000.codec: Unknown VA Codec version, ID: 00 / 0f / 00 Signed-off-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240803-codec-version-v1-2-bc29baa5e417@linaro.org Signed-off-by: Mark Brown commit 49f6202ce991742f451fc724f03d0c17460d06cd Author: Dmitry Baryshkov Date: Sat Aug 3 13:41:40 2024 +0300 ASoC: codecs: lpass-macro: fix version strings returned for 1.x codecs Add missing cases to lpass_macro_get_codec_version_string() to let it print the correct codec version for 1.x codec platforms. Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version") Signed-off-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240803-codec-version-v1-1-bc29baa5e417@linaro.org Signed-off-by: Mark Brown commit 6ad9dafba19f15a64f71c2e1a9e3b6932f96628e Author: Arunpravin Paneer Selvam Date: Mon Aug 5 19:17:04 2024 +0530 drm/amdgpu: Add DCC GFX12 flag to enable address alignment We require this flag AMDGPU_GEM_CREATE_GFX12_DCC or any other kernel level GFX12 DCC flag to differentiate the DCC buffers and other pinned display buffers(which has TTM_PL_FLAG_CONTIGUOUS enabled). If we use the TTM_PL_FLAG_CONTIGUOUS flag for DCC buffers, we may over allocate for all the pinned display buffers unnecessarily that leads to memory allocation failure. Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 46142cc1b9272d664e0258e105b537735bfeeccc) commit 7fc5f252c0d21b7b89720386344b614733edab32 Author: Frank Min Date: Thu Aug 1 12:20:18 2024 +0800 drm/amdgpu: correct sdma7 max dw correct sdma7 max dw into 8 Signed-off-by: Frank Min Acked-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 86598c3819fdc70e59d28221bfa7bc36e9f5777e) commit 4a5ad08f537703c35cf7cc29845381805c891d9b Author: Arunpravin Paneer Selvam Date: Sat Aug 3 21:30:18 2024 +0530 drm/amdgpu: Add address alignment support to DCC buffers Add address alignment support to the DCC VRAM buffers. v2: - adjust size based on the max_texture_channel_caches values only for GFX12 DCC buffers. - used AMDGPU_GEM_CREATE_GFX12_DCC flag to apply change only for DCC buffers. - roundup non power of two DCC buffer adjusted size to nearest power of two number as the buddy allocator does not support non power of two alignments. This applies only to the contiguous DCC buffers. v3:(Alex) - rewrite the max texture channel caches comparison code in an algorithmic way to determine the alignment size. v4:(Alex) - Move the logic from amdgpu_vram_mgr_dcc_alignment() to gmc_v12_0.c and add a new gmc func callback for dcc alignment. If the callback is non-NULL, call it to get the alignment, otherwise, use the default. v5:(Alex) - Set the Alignment to a default value if the callback doesn't exist. - Add the callback to amdgpu_gmc_funcs. v6: - Fix checkpatch warning reported by Intel CI. v7:(Christian) - remove the AMDGPU_GEM_CREATE_GFX12_DCC flag and keep a flag that checks the BO pinning and for a specific hw generation. v8:(Christian) - move this check into gmc_v12_0_get_dcc_alignment. v9: - Fix 32bit build errors Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex Deucher Acked-by: Christian König Reviewed-by: Frank Min Signed-off-by: Alex Deucher (cherry picked from commit aa94b623cb9233b91ed342dd87ecd62e56ff4938) commit 50e376f1fe3bf571d0645ddf48ad37eb58323919 Author: Fangzhi Zuo Date: Fri Jul 12 16:30:03 2024 -0400 drm/amd/display: Skip Recompute DSC Params if no Stream on Link [why] Encounter NULL pointer dereference uner mst + dsc setup. BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 4 PID: 917 Comm: sway Not tainted 6.3.9-arch1-1 #1 124dc55df4f5272ccb409f39ef4872fc2b3376a2 Hardware name: LENOVO 20NKS01Y00/20NKS01Y00, BIOS R12ET61W(1.31 ) 07/28/2022 RIP: 0010:drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper] Code: 01 00 00 48 8b 85 60 05 00 00 48 63 80 88 00 00 00 3b 43 28 0f 8d 2e 01 00 00 48 8b 53 30 48 8d 04 80 48 8d 04 c2 48 8b 40 18 <48> 8> RSP: 0018:ffff960cc2df77d8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8afb87e81280 RCX: 0000000000000224 RDX: ffff8afb9ee37c00 RSI: ffff8afb8da1a578 RDI: ffff8afb87e81280 RBP: ffff8afb83d67000 R08: 0000000000000001 R09: ffff8afb9652f850 R10: ffff960cc2df7908 R11: 0000000000000002 R12: 0000000000000000 R13: ffff8afb8d7688a0 R14: ffff8afb8da1a578 R15: 0000000000000224 FS: 00007f4dac35ce00(0000) GS:ffff8afe30b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000010ddc6000 CR4: 00000000003506e0 Call Trace: ? __die+0x23/0x70 ? page_fault_oops+0x171/0x4e0 ? plist_add+0xbe/0x100 ? exc_page_fault+0x7c/0x180 ? asm_exc_page_fault+0x26/0x30 ? drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026] ? drm_dp_atomic_find_time_slots+0x28/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026] compute_mst_dsc_configs_for_link+0x2ff/0xa40 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] ? fill_plane_buffer_attributes+0x419/0x510 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] compute_mst_dsc_configs_for_state+0x1e1/0x250 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] amdgpu_dm_atomic_check+0xecd/0x1190 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] drm_atomic_check_only+0x5c5/0xa40 drm_mode_atomic_ioctl+0x76e/0xbc0 [how] dsc recompute should be skipped if no mode change detected on the new request. If detected, keep checking whether the stream is already on current state or not. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Rodrigo Siqueira Signed-off-by: Fangzhi Zuo Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 8151a6c13111b465dbabe07c19f572f7cbd16fef) commit 5d687a67fda6389b9214815aa0d0adcc44302dc5 Author: Frank Min Date: Fri Aug 2 11:15:11 2024 +0800 drm/amdgpu: change non-dcc buffer copy configuration Without setting cpv bit and 7th ib dw, non-dcc buffer copy will have random corruption So set the cpv bit and clear the 7th ib dw for copy non-dcc buffers Signed-off-by: Frank Min Acked-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 5aacf8917fde5bc2a640f3cd49130c0e2e85e726) commit 829798c789f567ef6ba4b084c15b7b5f3bd98d51 Author: Joshua Ashton Date: Thu Mar 7 19:04:31 2024 +0000 drm/amdgpu: Forward soft recovery errors to userspace As we discussed before[1], soft recovery should be forwarded to userspace, or we can get into a really bad state where apps will keep submitting hanging command buffers cascading us to a hard reset. 1: https://lore.kernel.org/all/bf23d5ed-9a6b-43e7-84ee-8cbfd0d60f18@froggi.es/ Signed-off-by: Joshua Ashton Reviewed-by: Marek Olšák Signed-off-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit 434967aadbbbe3ad9103cc29e9a327de20fdba01) Cc: stable@vger.kernel.org commit 8ff3bb44cc94b74ebd57fe3be9dedb98dbf92771 Author: Likun Gao Date: Thu Aug 1 10:47:16 2024 +0800 drm/amdgpu: add golden setting for gc v12 Adding Manual GDB golden setting for gc v12 revision 0 ASIC. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit c9875d0a789060facc274dee0d4eb6500d471772) commit d507ae0dc83b7f43cdf6760b8f1a30aac4fc405a Author: Arunpravin Paneer Selvam Date: Fri Aug 2 11:13:19 2024 +0530 drm/buddy: Add start address support to trim function - Add a new start parameter in trim function to specify exact address from where to start the trimming. This would help us in situations like if drivers would like to do address alignment for specific requirements. - Add a new flag DRM_BUDDY_TRIM_DISABLE. Drivers can use this flag to disable the allocator trimming part. This patch enables the drivers control trimming and they can do it themselves based on the application requirements. v1:(Matthew) - check new_start alignment with min chunk_size - use range_overflows() Signed-off-by: Arunpravin Paneer Selvam Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit db65eb46de135338d6177f8853e0fd208f19d63e) commit e8097cf1ce9e7ad8516ee95f06f7baaa31506035 Author: Rodrigo Siqueira Date: Thu Jul 25 16:41:38 2024 -0600 drm/amd/display: Add missing program DET segment call to pipe init Add a callback that program the DET segment when initializing pipes. Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit e1dbe625d6ac2821eb29e087db46cb539d8079f0) commit 07cd40a0c9843653451f9355170770f6e42489c8 Author: Rodrigo Siqueira Date: Wed Jul 24 09:29:13 2024 -0600 drm/amd/display: Add missing DCN314 to the DML Makefile Include display_mode_vba_314 and display_rq_dlg_calc_314 to the dml Makefile. Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 089525632d40bbfa507f224c20563529b3f8a4b3) commit aa5c9701ebd654284c55eba30d0a38eec49f2946 Author: Likun Gao Date: Wed Jul 31 11:58:46 2024 +0800 drm/amdgpu: force to use legacy inv in mmhub MMHUB v4.1.0 only support fixed cache mode, so only use legacy invalidation accordingly. Signed-off-by: Likun Gao Reviewed-by: Frank Min Signed-off-by: Alex Deucher (cherry picked from commit 9192c7613ca53572908ba23a4c3f39c7f8ba8021) commit 5f142b3826a0d223e947501fa9fe4ca912d9db26 Author: Kenneth Feng Date: Mon Jul 29 09:24:20 2024 +0800 drm/amd/pm: update powerplay structure on smu v14.0.2/3 update powerplay structure on smu v14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit f905d0c328b440fabaaf265350bf4187ccd5f59b) commit eb880ffddd5da8a014669deaf7bb3e7e9ecd06f4 Author: Rodrigo Siqueira Date: Mon Jul 22 20:33:40 2024 -0600 drm/amd/display: Add missing mcache registers Add missing register programming for mcache in DCN401. Reviewed-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher (cherry picked from commit a00a177055cced5cd2bb057a1ace9a95a286bc49) commit 437cf8bb0e1a56fa0491610706ddafd04b3b1a9b Author: Rodrigo Siqueira Date: Mon Jul 22 20:40:22 2024 -0600 drm/amd/display: Add dcc propagation value Initialize the field dcc_meta_propagation_delay_us with 10 ms. Reviewed-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher (cherry picked from commit 74bad61c5d83f5af8a855c8b7dc8e20377c74d46) commit 4df19b14f6311c860223f349356da2c08ae92101 Author: Rodrigo Siqueira Date: Mon Jul 22 16:53:42 2024 -0600 drm/amd/display: Add missing DET segments programming The commit 5034b935f62a ("drm/amd/display: Modify DHCUB waterwark structures and functions") introduced a code refactor for DCHUB, but during the merge process into amd-staging-drm-next, the program det segments were removed. This commit adds the DET segment programming for DCN35. Fixes: 5034b935f62a ("drm/amd/display: Modify DHCUB waterwark structures and functions") Reviewed-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher (cherry picked from commit 675d9ac9d0de765531e94f9fdc536989a997a324) commit f2aaed194a54d78c307c44d1829c7e1ba67e9ba5 Author: Rodrigo Siqueira Date: Mon Dec 4 16:35:04 2023 -0500 drm/amd/display: Replace dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd In the commit c2cec7a872b6 ("drm/amd/display: Wake DMCUB before sending a command for replay feature"), replaced dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd in multiple areas, but due to merge issues the replacement of this function in the dmub_replay_copy_settings was missed. This commit replaces the old dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd. Fixes: 3601a35a2e9d ("drm/amd/display: Wake DMCUB before sending a command for replay feature") Reviewed-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher (cherry picked from commit 6cc213b9aa34bc3213e20f9256345c5cc1495b0b) commit 6e2fdceffdc6bd7b8ba314a1d1b976721533c8f9 Author: Steven Rostedt Date: Fri Jul 26 14:42:08 2024 -0400 tracing: Use refcount for trace_event_file reference counter Instead of using an atomic counter for the trace_event_file reference counter, use the refcount interface. It has various checks to make sure the reference counting is correct, and will warn if it detects an error (like refcount_inc() on '0'). Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20240726144208.687cce24@rorschach.local.home Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit b1560408692cd0ab0370cfbe9deb03ce97ab3f6d Author: Steven Rostedt Date: Tue Jul 30 11:06:57 2024 -0400 tracing: Have format file honor EVENT_FILE_FL_FREED When eventfs was introduced, special care had to be done to coordinate the freeing of the file meta data with the files that are exposed to user space. The file meta data would have a ref count that is set when the file is created and would be decremented and freed after the last user that opened the file closed it. When the file meta data was to be freed, it would set a flag (EVENT_FILE_FL_FREED) to denote that the file is freed, and any new references made (like new opens or reads) would fail as it is marked freed. This allowed other meta data to be freed after this flag was set (under the event_mutex). All the files that were dynamically created in the events directory had a pointer to the file meta data and would call event_release() when the last reference to the user space file was closed. This would be the time that it is safe to free the file meta data. A shortcut was made for the "format" file. It's i_private would point to the "call" entry directly and not point to the file's meta data. This is because all format files are the same for the same "call", so it was thought there was no reason to differentiate them. The other files maintain state (like the "enable", "trigger", etc). But this meant if the file were to disappear, the "format" file would be unaware of it. This caused a race that could be trigger via the user_events test (that would create dynamic events and free them), and running a loop that would read the user_events format files: In one console run: # cd tools/testing/selftests/user_events # while true; do ./ftrace_test; done And in another console run: # cd /sys/kernel/tracing/ # while true; do cat events/user_events/__test_event/format; done 2>/dev/null With KASAN memory checking, it would trigger a use-after-free bug report (which was a real bug). This was because the format file was not checking the file's meta data flag "EVENT_FILE_FL_FREED", so it would access the event that the file meta data pointed to after the event was freed. After inspection, there are other locations that were found to not check the EVENT_FILE_FL_FREED flag when accessing the trace_event_file. Add a new helper function: event_file_file() that will make sure that the event_mutex is held, and will return NULL if the trace_event_file has the EVENT_FILE_FL_FREED flag set. Have the first reference of the struct file pointer use event_file_file() and check for NULL. Later uses can still use the event_file_data() helper function if the event_mutex is still held and was not released since the event_file_file() call. Link: https://lore.kernel.org/all/20240719204701.1605950-1-minipli@grsecurity.net/ Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Ajay Kaher Cc: Ilkka Naulapää Cc: Linus Torvalds Cc: Al Viro Cc: Dan Carpenter Cc: Beau Belgrave Cc: Florian Fainelli Cc: Alexey Makhalov Cc: Vasavi Sirnapalli Link: https://lore.kernel.org/20240730110657.3b69d3c1@gandalf.local.home Fixes: b63db58e2fa5d ("eventfs/tracing: Add callback for release of an eventfs_inode") Reported-by: Mathias Krause Tested-by: Mathias Krause Signed-off-by: Steven Rostedt (Google) commit 8fe8ac24adcd76b12edbfdefa078567bfff117d4 Author: Jens Axboe Date: Wed Aug 7 15:09:33 2024 -0600 io_uring/net: don't pick multiple buffers for non-bundle send If a send is issued marked with IOSQE_BUFFER_SELECT for selecting a buffer, unless it's a bundle, it should not select multiple buffers. Cc: stable@vger.kernel.org Fixes: a05d1f625c7a ("io_uring/net: support bundles for send") Signed-off-by: Jens Axboe commit 70ed519ed59da3a92c3acedeb84a30e5a66051ce Author: Jens Axboe Date: Wed Aug 7 15:08:17 2024 -0600 io_uring/net: ensure expanded bundle send gets marked for cleanup If the iovec inside the kmsg isn't already allocated AND one gets expanded beyond the fixed size, then the request may not already have been marked for cleanup. Ensure that it is. Cc: stable@vger.kernel.org Fixes: a05d1f625c7a ("io_uring/net: support bundles for send") Signed-off-by: Jens Axboe commit 11893e144ed75be55d99349760513ca104781fc0 Author: Jens Axboe Date: Wed Aug 7 15:06:45 2024 -0600 io_uring/net: ensure expanded bundle recv gets marked for cleanup If the iovec inside the kmsg isn't already allocated AND one gets expanded beyond the fixed size, then the request may not already have been marked for cleanup. Ensure that it is. Cc: stable@vger.kernel.org Fixes: 2f9c9515bdfd ("io_uring/net: support bundles for recv") Signed-off-by: Jens Axboe commit b5431dc2803ac159d6d4645ae237d15c3cb252db Author: Anton Khirnov Date: Mon Jul 29 21:58:10 2024 +0200 Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor This restores behaviour (including the comment) from now-removed hci_request.c, and also matches existing code for active scanning. Without this, the duplicates filter is always active when passive scanning, which makes it impossible to work with devices that send nontrivial dynamic data in their advertisement reports. Fixes: abfeea476c68 ("Bluetooth: hci_sync: Convert MGMT_OP_START_DISCOVERY") Signed-off-by: Anton Khirnov Signed-off-by: Luiz Augusto von Dentz commit c531e63871c0b50c8c4e62c048535a08886fba3e Author: Dmitry Antipov Date: Wed Jul 31 12:19:36 2024 +0300 Bluetooth: l2cap: always unlock channel in l2cap_conless_channel() Add missing call to 'l2cap_chan_unlock()' on receive error handling path in 'l2cap_conless_channel()'. Fixes: a24cce144b98 ("Bluetooth: Fix reference counting of global L2CAP channels") Reported-by: syzbot+45ac74737e866894acb0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=45ac74737e866894acb0 Signed-off-by: Dmitry Antipov Signed-off-by: Luiz Augusto von Dentz commit e1d28be268cfe978e19a18a3a9b37a4a7d37745e Author: Bartosz Golaszewski Date: Wed Jul 31 17:20:50 2024 +0200 Bluetooth: hci_qca: fix a NULL-pointer derefence at shutdown Unlike qca_regulator_init(), qca_power_shutdown() may be called for QCA_ROME which does not have qcadev->bt_power assigned. Add a NULL-pointer check before dereferencing the struct qca_power pointer. Fixes: eba1718717b0 ("Bluetooth: hci_qca: make pwrseq calls the default if available") Reported-by: Dmitry Baryshkov Closes: https://lore.kernel.org/linux-bluetooth/su3wp6s44hrxf4ijvsdfzbvv4unu4ycb7kkvwbx6ltdafkldir@4g7ydqm2ap5j/ Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit f3660957303b822e5dd6e10fe9e1e19afc6d33de Author: Bartosz Golaszewski Date: Wed Jul 31 17:20:49 2024 +0200 Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms QCA6390 can albo be used on non-DT systems so we must not make the power sequencing the only option. Check if the serdev device consumes an OF node. If so: honor the new contract as per the DT bindings. If not: fall back to the previous behavior by falling through to the existing default label. Fixes: 9a15ce685706 ("Bluetooth: qca: use the power sequencer for QCA6390") Reported-by: Wren Turkal Closes: https://lore.kernel.org/linux-bluetooth/27e6a6c5-fb63-4219-be0b-eefa2c116e06@penguintechs.org/ Signed-off-by: Bartosz Golaszewski Reviewed-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz commit 541b80216cd1d511841c3c8d9559a7b13f4f79f2 Author: Bartosz Golaszewski Date: Wed Jul 31 17:20:48 2024 +0200 Bluetooth: hci_qca: don't call pwrseq_power_off() twice for QCA6390 Now that we call pwrseq_power_off() for all models that hold a valid power sequencing handle, we can remove the switch case for QCA_6390. The switch will now use the default label for this model but that's fine: if it has the BT-enable GPIO than we should use it. Fixes: eba1718717b0 ("Bluetooth: hci_qca: make pwrseq calls the default if available") Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit 6c3fc0b1c3d073bd6fc3bf43dbd0e64240537464 Author: Faizal Rahim Date: Sun Jul 7 08:53:18 2024 -0400 igc: Fix qbv tx latency by setting gtxoffset A large tx latency issue was discovered during testing when only QBV was enabled. The issue occurs because gtxoffset was not set when QBV is active, it was only set when launch time is active. The patch "igc: Correct the launchtime offset" only sets gtxoffset when the launchtime_enable field is set by the user. Enabling launchtime_enable ultimately sets the register IGC_TXQCTL_QUEUE_MODE_LAUNCHT (referred to as LaunchT in the SW user manual). Section 7.5.2.6 of the IGC i225/6 SW User Manual Rev 1.2.4 states: "The latency between transmission scheduling (launch time) and the time the packet is transmitted to the network is listed in Table 7-61." However, the patch misinterprets the phrase "launch time" in that section by assuming it specifically refers to the LaunchT register, whereas it actually denotes the generic term for when a packet is released from the internal buffer to the MAC transmit logic. This launch time, as per that section, also implicitly refers to the QBV gate open time, where a packet waits in the buffer for the QBV gate to open. Therefore, latency applies whenever QBV is in use. TSN features such as QBU and QAV reuse QBV, making the latency universal to TSN features. Discussed with i226 HW owner (Shalev, Avi) and we were in agreement that the term "launch time" used in Section 7.5.2.6 is not clear and can be easily misinterpreted. Avi will update this section to: "When TQAVCTRL.TRANSMIT_MODE = TSN, the latency between transmission scheduling and the time the packet is transmitted to the network is listed in Table 7-61." Fix this issue by using igc_tsn_is_tx_mode_in_tsn() as a condition to write to gtxoffset, aligning with the newly updated SW User Manual. Tested: 1. Enrol taprio on talker board base-time 0 cycle-time 1000000 flags 0x2 index 0 cmd S gatemask 0x1 interval1 index 0 cmd S gatemask 0x1 interval2 Note: interval1 = interval for a 64 bytes packet to go through interval2 = cycle-time - interval1 2. Take tcpdump on listener board 3. Use udp tai app on talker to send packets to listener 4. Check the timestamp on listener via wireshark Test Result: 100 Mbps: 113 ~193 ns 1000 Mbps: 52 ~ 84 ns 2500 Mbps: 95 ~ 223 ns Note that the test result is similar to the patch "igc: Correct the launchtime offset". Fixes: 790835fcc0cb ("igc: Correct the launchtime offset") Signed-off-by: Faizal Rahim Reviewed-by: Simon Horman Acked-by: Vinicius Costa Gomes Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 0afeaeb5dae86aceded0d5f0c3a54d27858c0c6f Author: Faizal Rahim Date: Sun Jul 7 08:53:17 2024 -0400 igc: Fix reset adapter logics when tx mode change Following the "igc: Fix TX Hang issue when QBV Gate is close" changes, remaining issues with the reset adapter logic in igc_tsn_offload_apply() have been observed: 1. The reset adapter logics for i225 and i226 differ, although they should be the same according to the guidelines in I225/6 HW Design Section 7.5.2.1 on software initialization during tx mode changes. 2. The i225 resets adapter every time, even though tx mode doesn't change. This occurs solely based on the condition igc_is_device_id_i225() when calling schedule_work(). 3. i226 doesn't reset adapter for tsn->legacy tx mode changes. It only resets adapter for legacy->tsn tx mode transitions. 4. qbv_count introduced in the patch is actually not needed; in this context, a non-zero value of qbv_count is used to indicate if tx mode was unconditionally set to tsn in igc_tsn_enable_offload(). This could be replaced by checking the existing register IGC_TQAVCTRL_TRANSMIT_MODE_TSN bit. This patch resolves all issues and enters schedule_work() to reset the adapter only when changing tx mode. It also removes reliance on qbv_count. qbv_count field will be removed in a future patch. Test ran: 1. Verify reset adapter behaviour in i225/6: a) Enrol a new GCL Reset adapter observed (tx mode change legacy->tsn) b) Enrol a new GCL without deleting qdisc No reset adapter observed (tx mode remain tsn->tsn) c) Delete qdisc Reset adapter observed (tx mode change tsn->legacy) 2. Tested scenario from "igc: Fix TX Hang issue when QBV Gate is closed" to confirm it remains resolved. Fixes: 175c241288c0 ("igc: Fix TX Hang issue when QBV Gate is closed") Signed-off-by: Faizal Rahim Reviewed-by: Simon Horman Acked-by: Vinicius Costa Gomes Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit f8d6acaee9d35cbff3c3cfad94641666c596f8da Author: Faizal Rahim Date: Sun Jul 7 08:53:16 2024 -0400 igc: Fix qbv_config_change_errors logics When user issues these cmds: 1. Either a) or b) a) mqprio with hardware offload disabled b) taprio with txtime-assist feature enabled 2. etf 3. tc qdisc delete 4. taprio with base time in the past At step 4, qbv_config_change_errors wrongly increased by 1. Excerpt from IEEE 802.1Q-2018 8.6.9.3.1: "If AdminBaseTime specifies a time in the past, and the current schedule is running, then: Increment ConfigChangeError counter" qbv_config_change_errors should only increase if base time is in the past and no taprio is active. In user perspective, taprio was not active when first triggered at step 4. However, i225/6 reuses qbv for etf, so qbv is enabled with a dummy schedule at step 2 where it enters igc_tsn_enable_offload() and qbv_count got incremented to 1. At step 4, it enters igc_tsn_enable_offload() again, qbv_count is incremented to 2. Because taprio is running, tc_setup_type is TC_SETUP_QDISC_ETF and qbv_count > 1, qbv_config_change_errors value got incremented. This issue happens due to reliance on qbv_count field where a non-zero value indicates that taprio is running. But qbv_count increases regardless if taprio is triggered by user or by other tsn feature. It does not align with qbv_config_change_errors expectation where it is only concerned with taprio triggered by user. Fixing this by relocating the qbv_config_change_errors logic to igc_save_qbv_schedule(), eliminating reliance on qbv_count and its inaccuracies from i225/6's multiple uses of qbv feature for other TSN features. The new function created: igc_tsn_is_taprio_activated_by_user() uses taprio_offload_enable field to indicate that the current running taprio was triggered by user, instead of triggered by non-qbv feature like etf. Fixes: ae4fe4698300 ("igc: Add qbv_config_change_errors counter") Signed-off-by: Faizal Rahim Reviewed-by: Simon Horman Acked-by: Vinicius Costa Gomes Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit e037a26ead187901f83cad9c503ccece5ff6817a Author: Faizal Rahim Date: Sat Jul 6 11:38:07 2024 -0400 igc: Fix packet still tx after gate close by reducing i226 MAC retry buffer Testing uncovered that even when the taprio gate is closed, some packets still transmit. According to i225/6 hardware errata [1], traffic might overflow the planned QBV window. This happens because MAC maintains an internal buffer, primarily for supporting half duplex retries. Therefore, even when the gate closes, residual MAC data in the buffer may still transmit. To mitigate this for i226, reduce the MAC's internal buffer from 192 bytes to the recommended 88 bytes by modifying the RETX_CTL register value. This follows guidelines from: [1] Ethernet Controller I225/I22 Spec Update Rev 2.1 Errata Item 9: TSN: Packet Transmission Might Cross Qbv Window [2] I225/6 SW User Manual Rev 1.2.4: Section 8.11.5 Retry Buffer Control Note that the RETX_CTL register can't be used in TSN mode because half duplex feature cannot coexist with TSN. Test Steps: 1. Send taprio cmd to board A: tc qdisc replace dev enp1s0 parent root handle 100 taprio \ num_tc 4 \ map 3 2 1 0 3 3 3 3 3 3 3 3 3 3 3 3 \ queues 1@0 1@1 1@2 1@3 \ base-time 0 \ sched-entry S 0x07 500000 \ sched-entry S 0x0f 500000 \ flags 0x2 \ txtime-delay 0 Note that for TC3, gate should open for 500us and close for another 500us. 3. Take tcpdump log on Board B. 4. Send udp packets via UDP tai app from Board A to Board B. 5. Analyze tcpdump log via wireshark log on Board B. Ensure that the total time from the first to the last packet received during one cycle for TC3 does not exceed 500us. Fixes: 43546211738e ("igc: Add new device ID's") Signed-off-by: Faizal Rahim Acked-by: Vinicius Costa Gomes Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen commit 6dd1e4c045afa6a4ba5d46f044c83bd357c593c2 Author: Zhen Lei Date: Wed Aug 7 17:00:56 2024 +0800 selinux: add the processing of the failure of avc_add_xperms_decision() When avc_add_xperms_decision() fails, the information recorded by the new avc node is incomplete. In this case, the new avc node should be released instead of replacing the old avc node. Cc: stable@vger.kernel.org Fixes: fa1aa143ac4a ("selinux: extended permissions for ioctls") Suggested-by: Stephen Smalley Signed-off-by: Zhen Lei Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit ad518452fd263766946346324810f14bd8bb8b34 Author: Mark Brown Date: Wed Jul 31 17:21:13 2024 +0100 KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list The ID register for S1PIE is ID_AA64MMFR3_EL1.S1PIE which is bits 11:8 but get-reg-list uses a shift of 4, checking SCTLRX instead. Use a shift of 8 instead. Fixes: 5f0419a0083b ("KVM: selftests: get-reg-list: add Permission Indirection registers") Signed-off-by: Mark Brown Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20240731-kvm-arm64-fix-s1pie-test-v1-1-a9253f3b7db4@kernel.org Signed-off-by: Oliver Upton commit 7e814a20f6da2bd2044b1a4682dd92a6f0df5a92 Author: Fuad Tabba Date: Mon Jul 22 17:33:11 2024 +0100 KVM: arm64: Tidying up PAuth code in KVM Tidy up some of the PAuth trapping code to clear up some comments and avoid clang/checkpatch warnings. Also, don't bother setting PAuth HCR_EL2 bits in pKVM, since it's handled by the hypervisor. Signed-off-by: Fuad Tabba Link: https://lore.kernel.org/r/20240722163311.1493879-1-tabba@google.com Signed-off-by: Oliver Upton commit 01ab08cafeced7ae1d6c01a08218742c8182f8da Author: Zenghui Yu Date: Wed Aug 7 13:20:24 2024 +0800 KVM: arm64: vgic-debug: Exit the iterator properly w/o LPI In case the guest doesn't have any LPI, we previously relied on the iterator setting 'intid = nr_spis + VGIC_NR_PRIVATE_IRQS' && 'lpi_idx = 1' to exit the iterator. But it was broken with commit 85d3ccc8b75b ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator") -- the intid remains at 'nr_spis + VGIC_NR_PRIVATE_IRQS - 1', and we end up endlessly printing the last SPI's state. Consider that it's meaningless to search the LPI xarray and populate lpi_idx when there is no LPI, let's just skip the process for that case. The result is that * If there's no LPI, we focus on the intid and exit the iterator when it runs out of the valid SPI range. * Otherwise we keep the current logic and let the xarray drive the iterator. Fixes: 85d3ccc8b75b ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator") Signed-off-by: Zenghui Yu Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20240807052024.2084-1-yuzenghui@huawei.com Signed-off-by: Oliver Upton commit 10f2ad032defe906240d0c3b62dcbceace96b230 Author: Marc Zyngier Date: Wed Aug 7 12:51:44 2024 +0100 KVM: arm64: Enforce dependency on an ARMv8.4-aware toolchain With the NV support of TLBI-range operations, KVM makes use of instructions that are only supported by binutils versions >= 2.30. This breaks the build for very old toolchains. Make KVM support conditional on having ARMv8.4 support in the assembler, side-stepping the issue. Fixes: 5d476ca57d7d ("KVM: arm64: nv: Add handling of range-based TLBI operations") Reported-by: Viresh Kumar Suggested-by: Arnd Bergmann Signed-off-by: Marc Zyngier Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240807115144.3237260-1-maz@kernel.org Signed-off-by: Oliver Upton commit e639222a51196c69c70b49b67098ce2f9919ed08 Author: Chen Yu Date: Tue Aug 6 19:22:07 2024 +0800 x86/paravirt: Fix incorrect virt spinlock setting on bare metal The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. The kernel uses a static key to switch between the two modes. In theory, the static key is enabled by default (run in guest mode) and should be disabled for bare metal (and in some guests that want native behavior or paravirt spinlock). A performance drop is reported when running encode/decode workload and BenchSEE cache sub-workload. Bisect points to commit ce0a1b608bfc ("x86/paravirt: Silence unused native_pv_lock_init() function warning"). When CONFIG_PARAVIRT_SPINLOCKS is disabled the virt_spin_lock_key is incorrectly set to true on bare metal. The qspinlock degenerates to test-and-set spinlock, which decreases the performance on bare metal. Set the default value of virt_spin_lock_key to false. If booting in a VM, enable this key. Later during the VM initialization, if other high-efficient spinlock is preferred (e.g. paravirt-spinlock), or the user wants the native qspinlock (via nopvspin boot commandline), the virt_spin_lock_key is disabled accordingly. This results in the following decision matrix: X86_FEATURE_HYPERVISOR Y Y Y N CONFIG_PARAVIRT_SPINLOCKS Y Y N Y/N PV spinlock Y N N Y/N virt_spin_lock_key N Y/N Y N Fixes: ce0a1b608bfc ("x86/paravirt: Silence unused native_pv_lock_init() function warning") Reported-by: Prem Nath Dey Reported-by: Xiaoping Zhou Suggested-by: Dave Hansen Suggested-by: Qiuxu Zhuo Suggested-by: Nikolay Borisov Signed-off-by: Chen Yu Signed-off-by: Thomas Gleixner Reviewed-by: Nikolay Borisov Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240806112207.29792-1-yu.c.chen@intel.com commit ab84ba647f2c94ac4d0c3fc6951c49f08aa1fcf7 Author: Zhiquan Li Date: Mon Aug 5 18:35:31 2024 +0800 x86/acpi: Remove __ro_after_init from acpi_mp_wake_mailbox On a platform using the "Multiprocessor Wakeup Structure"[1] to startup secondary CPUs the control processor needs to memremap() the physical address of the MP Wakeup Structure mailbox to the variable acpi_mp_wake_mailbox, which holds the virtual address of mailbox. To wake up the AP the control processor writes the APIC ID of AP, the wakeup vector and the ACPI_MP_WAKE_COMMAND_WAKEUP command into the mailbox. Current implementation doesn't consider the case which restricts boot time CPU bringup to 1 with the kernel parameter "maxcpus=1" and brings other CPUs online later from user space as it sets acpi_mp_wake_mailbox to read-only after init. So when the first AP is tried to brought online after init, the attempt to update the variable results in a kernel panic. The memremap() call that initializes the variable cannot be moved into acpi_parse_mp_wake() because memremap() is not functional at that point in the boot process. Also as the APs might never be brought up, keep the memremap() call in acpi_wakeup_cpu() so that the operation only takes place when needed. Fixes: 24dd05da8c79 ("x86/apic: Mark acpi_mp_wake_* variables as __ro_after_init") Signed-off-by: Zhiquan Li Signed-off-by: Thomas Gleixner Reviewed-by: Kirill A. Shutemov Link: https://lore.kernel.org/all/20240805103531.1230635-1-zhiquan1.li@intel.com commit d5b854893d27b4030943a10cf28a07189aab0c36 Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync arm64 headers with the kernel sources To pick up changes from: 9ef54a384526 arm64: cputype: Add Cortex-A725 definitions 58d245e03c32 arm64: cputype: Add Cortex-X1C definitions fd2ff5f0b320 arm64: cputype: Add Cortex-X925 definitions add332c40328 arm64: cputype: Add Cortex-A720 definitions be5a6f238700 arm64: cputype: Add Cortex-X3 definitions This should be used to beautify x86 syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Namhyung Kim commit f6d9883f8e680460be4714d4d35c7acac1dffeaf Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync x86 headers with the kernel sources To pick up changes from: 149fd4712bcd perf/x86/intel: Support Perfmon MSRs aliasing 21b362cc762a x86/resctrl: Enable shared RMID mode on Sub-NUMA Cluster (SNC) systems 4f460bff7b6a cpufreq: acpi: move MSR_K7_HWCR_CPB_DIS_BIT into msr-index.h 7ea81936b853 x86/cpufeatures: Add HWP highest perf change feature flag 78ce84b9e0a5 x86/cpufeatures: Flip the /proc/cpuinfo appearance logic 1beb348d5c7f x86/sev: Provide SVSM discovery support This should be used to beautify x86 syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Namhyung Kim commit 845295f4004c7e1591bab4bad01b51f37d32272f Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync filesystem headers with the kernel sources To pick up changes from: 0f9ca80fa4f9 fs: Add initial atomic write support info to statx f9af549d1fd3 fs: export mount options via statmount() 0a3deb11858a fs: Allow listmount() in foreign mount namespace 09b31295f833 fs: export the mount ns id via statmount d04bccd8c19d listmount: allow listing in reverse order bfc69fd05ef9 fs/procfs: add build ID fetching to PROCMAP_QUERY API ed5d583a88a9 fs/procfs: implement efficient VMA querying API for /proc//maps This should be used to beautify FS syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h diff -u tools/perf/trace/beauty/include/uapi/linux/fs.h include/uapi/linux/fs.h diff -u tools/perf/trace/beauty/include/uapi/linux/mount.h include/uapi/linux/mount.h diff -u tools/perf/trace/beauty/include/uapi/linux/stat.h include/uapi/linux/stat.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Namhyung Kim commit ed86525f1f4b738bae75c73e89f25430bd0af1b0 Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync network socket headers with the kernel sources To pick up changes from: d25a92ccae6b net/smc: Introduce IPPROTO_SMC 060f4ba6e403 io_uring/net: move charging socket out of zc io_uring bb6aaf736680 net: Split a __sys_listen helper for io_uring dc2e77979412 net: Split a __sys_bind helper for io_uring This should be used to beautify socket syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Signed-off-by: Namhyung Kim commit 568901e709d7fa564dfdc75816ea59fec65d20a0 Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync uapi/asm-generic/unistd.h with the kernel sources And arch syscall tables to pick up changes from: b1e31c134a8a powerpc: restore some missing spu syscalls d3882564a77c syscalls: fix compat_sys_io_pgetevents_time64 usage 54233a425403 uretprobe: change syscall number, again 63ded110979b uprobe: Change uretprobe syscall scope and number 9142be9e6443 x86/syscall: Mark exit[_group] syscall handlers __noreturn 9aae1baa1c5d x86, arm: Add missing license tag to syscall tables files 5c28424e9a34 syscalls: Fix to add sys_uretprobe to syscall.tbl 190fec72df4a uprobe: Wire up uretprobe system call This should be used to beautify syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Arnd Bergmann Cc: linux-arch@vger.kernel.org Signed-off-by: Namhyung Kim commit c181da18a7302c5de510fe975a3a333299c6e4b7 Author: Mateusz Polchlopek Date: Fri Jul 26 06:19:28 2024 -0400 ice: Fix incorrect assigns of FEC counts Commit ac21add2540e ("ice: Implement driver functionality to dump fec statistics") introduces obtaining FEC correctable and uncorrectable stats per netdev in ICE driver. Unfortunately the assignment of values to fec_stats structure has been done incorrectly. This commit fixes the assignments. Fixes: ac21add2540e ("ice: Implement driver functionality to dump fec statistics") Reviewed-by: Wojciech Drewek Signed-off-by: Mateusz Polchlopek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit bca515d58367494d8699ab53c645b57b71fb4785 Author: Grzegorz Nitka Date: Mon Jul 15 17:39:11 2024 +0200 ice: Skip PTP HW writes during PTP reset procedure Block HW write access for the driver while the device is in reset to avoid potential race condition and access to the PTP HW in non-nominal state which could lead to undesired effects Fixes: 4aad5335969f ("ice: add individual interrupt allocation") Signed-off-by: Grzegorz Nitka Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 25a7123579ecac9a89a7e5b8d8a580bee4b68acd Author: Grzegorz Nitka Date: Mon Jul 15 17:39:10 2024 +0200 ice: Fix reset handler Synchronize OICR IRQ when preparing for reset to avoid potential race conditions between the reset procedure and OICR Fixes: 4aad5335969f ("ice: add individual interrupt allocation") Signed-off-by: Grzegorz Nitka Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit f1cb9d5aefba07fc52b06b7bd5fdcd9ef91157b4 Author: Bitterblue Smith Date: Tue Aug 6 19:20:11 2024 +0300 wifi: rtlwifi: rtl8192du: Initialise value32 in _rtl92du_init_queue_reserved_page GCC complains: In file included from include/linux/ieee80211.h:21, from include/net/mac80211.h:20, from drivers/net/wireless/realtek/rtlwifi/rtl8192du/../wifi.h:14, from drivers/net/wireless/realtek/rtlwifi/rtl8192du/hw.c:4: In function 'u32p_replace_bits', inlined from '_rtl92du_init_queue_reserved_page.isra' at drivers/net/wireless/realtek/rtlwifi/rtl8192du/hw.c:225:2: >> include/linux/bitfield.h:189:18: warning: 'value32' is used uninitialized [-Wuninitialized] Part of the variable is indeed left uninitialised. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202408062100.DWhN0CYH-lkp@intel.com/ Fixes: e769c67105d3 ("wifi: rtlwifi: Add rtl8192du/hw.{c,h}") Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://patch.msgid.link/2a808244-93d0-492c-b304-ae1974df5df9@gmail.com commit 6a0e38264012809afa24113ee2162dc07f4ed22b Merge: 94a8ee195daf9 12653ec36112a Author: Linus Torvalds Date: Wed Aug 7 09:53:41 2024 -0700 Merge tag 'for-6.11-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix double inode unlock for direct IO sync writes (reported by syzbot) - fix root tree id/name map definitions, don't use fixed size buffers for name (reported by -Werror=unterminated-string-initialization) - fix qgroup reserve leaks in bufferd write path - update scrub status structure more often so it can be reported in user space more accurately and let 'resume' not repeat work - in preparation to remove space cache v1 in the future print a warning if it's detected * tag 'for-6.11-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: avoid using fixed char array size for tree names btrfs: fix double inode unlock for direct IO sync writes btrfs: emit a warning about space cache v1 being deprecated btrfs: fix qgroup reserve leaks in cow_file_range btrfs: implement launder_folio for clearing dirty page reserve btrfs: scrub: update last_physical after scrubbing one stripe btrfs: factor out stripe length calculation into a helper commit 94a8ee195daf9b2d081a573d740993cef4a64a20 Merge: d4560686726f7 d6cca7631a4b5 Author: Linus Torvalds Date: Wed Aug 7 09:45:21 2024 -0700 Merge tag 'for-v6.11-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: "rt5033: - fix driver regression causing kernel oops axp288-charger: - fix charge voltage setup qcom-battmgr: - fix thermal zone spamming errors - fix init on Qualcomm X Elite" * tag 'for-v6.11-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: qcom_battmgr: Ignore extra __le32 in info payload power: supply: qcom_battmgr: return EAGAIN when firmware service is not up power: supply: axp288_charger: Round constant_charge_voltage writes down power: supply: axp288_charger: Fix constant_charge_voltage writes power: supply: rt5033: Bring back i2c_set_clientdata commit e9408fa234fb2c0f087d718c7172212bb0dd7e6f Author: Andrei Simion Date: Wed Jul 31 17:41:00 2024 +0300 MAINTAINERS: Update DTS path for ARM/Microchip (AT91) SoC Update the path to the supported DTS files for ARM/Microchip (AT91) SoC to ensure that the output of the get_maintainer.pl script includes the email addresses of the maintainers for all files located in arch/arm/boot/dts/microchip. Suggested-by: Conor Dooley Signed-off-by: Andrei Simion Reviewed-by: Cristian Birsan Link: https://lore.kernel.org/r/20240731144100.182221-1-andrei.simion@microchip.com Signed-off-by: Claudiu Beznea commit edbbaae42a56f9a2b39c52ef2504dfb3fb0a7858 Author: Shay Drory Date: Tue Aug 6 10:20:44 2024 +0300 genirq/irqdesc: Honor caller provided affinity in alloc_desc() Currently, whenever a caller is providing an affinity hint for an interrupt, the allocation code uses it to calculate the node and copies the cpumask into irq_desc::affinity. If the affinity for the interrupt is not marked 'managed' then the startup of the interrupt ignores irq_desc::affinity and uses the system default affinity mask. Prevent this by setting the IRQD_AFFINITY_SET flag for the interrupt in the allocator, which causes irq_setup_affinity() to use irq_desc::affinity on interrupt startup if the mask contains an online CPU. [ tglx: Massaged changelog ] Fixes: 45ddcecbfa94 ("genirq: Use affinity hint in irqdesc allocation") Signed-off-by: Shay Drory Signed-off-by: Thomas Gleixner Cc: Link: https://lore.kernel.org/all/20240806072044.837827-1-shayd@nvidia.com commit c48b5a4cf3125adb679e28ef093f66ff81368d05 Author: Thomas Gleixner Date: Tue Aug 6 20:48:43 2024 +0200 x86/mm: Fix PTI for i386 some more So it turns out that we have to do two passes of pti_clone_entry_text(), once before initcalls, such that device and late initcalls can use user-mode-helper / modprobe and once after free_initmem() / mark_readonly(). Now obviously mark_readonly() can cause PMD splits, and pti_clone_pgtable() doesn't like that much. Allow the late clone to split PMDs so that pagetables stay in sync. [peterz: Changelog and comments] Reported-by: Guenter Roeck Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Tested-by: Guenter Roeck Link: https://lkml.kernel.org/r/20240806184843.GX37996@noisy.programming.kicks-ass.net commit 6b1124c4526fb1648a3921a441515ea8a98b92e4 Merge: cddaac0459c00 402d336053a5d Author: Arnd Bergmann Date: Wed Aug 7 14:45:45 2024 +0200 Merge tag 'ti-k3-dt-fixes-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/fixes Devicetree fixes for TI K3 platforms for v6.11 Critical fixes for the following: * j784s4: Fix for McASP DMA map * J722s/AM62p: GPIO ranges fixes * k3-am62-verdin-dahlia: sleep-moci fixes for deep-sleep (revert) * tag 'ti-k3-dt-fixes-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs arm64: dts: ti: k3-j722s: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-am62p: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-am62p: Add gpio-ranges for mcu_gpio0 arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regulator on arm64: dts: ti: k3-j784s4-evm: Consolidate serdes0 references arm64: dts: ti: k3-j784s4-evm: Assign only lanes 0 and 1 to PCIe1 commit cddaac0459c004c439510bd109929466b0d5908e Author: Dmitry Torokhov Date: Tue Aug 6 09:12:58 2024 -0700 ARM: pxa/gumstix: fix attaching properties to vbus gpio device Commit f1d6588af93b tried to convert GPIO lookup tables to software properties for the vbus gpio device, bit forgot the most important step: actually attaching the new properties to the device. Also fix up the name of the property array to reflect the board name, and add missing gpio/property.h and devices.h includes absence of which causes compile failures on some configurations. Switch "#ifdef CONFIG_USB_PXA25X" to "#if IS_ENABLED(CONFIG_USB_PXA25X)" because it should not matter if the driver is buolt in or a module, it still need vbus controls. Reported-by: Arnd Bergmann Fixes: f1d6588af93b ("ARM: pxa/gumstix: convert vbus gpio to use software nodes") Signed-off-by: Dmitry Torokhov Signed-off-by: Arnd Bergmann commit e1793fea0350330a6a50721ecb2ad66846e0c51e Author: Marek Behún Date: Tue Jul 30 16:49:24 2024 +0200 doc: platform: cznic: turris-omnia-mcu: Use double backticks for attribute value Use double backticks instead of quotes for sysfs attribute value. This makes sphinx generate the "mcu" and "cpu" values in monospace when rendering to HTML. Fixes: dfa556e45ae9 ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs") Tested-by: Stephen Rothwell Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240730144924.25552-3-kabel@kernel.org Signed-off-by: Arnd Bergmann commit a626ada4184b1888c1c5a4566071643f6e8081a2 Author: Marek Behún Date: Tue Jul 30 16:49:23 2024 +0200 doc: platform: cznic: turris-omnia-mcu: Fix sphinx-build warning Fix sphinx-build warnings ERROR: Unexpected indentation. WARNING: Block quote ends without a blank line; unexpected unindent in Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu. Reported-by: Stephen Rothwell Link: https://lore.kernel.org/all/20240702174938.04c12aab@canb.auug.org.au/ Fixes: dfa556e45ae9 ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs") Tested-by: Stephen Rothwell Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240730144924.25552-2-kabel@kernel.org Signed-off-by: Arnd Bergmann commit af340b7aa21c351ba08950f664af601888633614 Author: Marek Behún Date: Fri Jul 19 10:57:56 2024 +0200 platform: cznic: turris-omnia-mcu: Make GPIO code optional Make the GPIO part of the driver optional, under a boolean config option. Move the dependency to GPIOLIB and OF and the selection of GPIOLIB_IRQCHIP to this new option. This makes the turris-omnia-mcu driver available for compilation even if GPIOLIB or OF are disabled. Fixes: ed46f1f7731d ("platform: cznic: turris-omnia-mcu: fix Kconfig dependencies") Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240719085756.30598-5-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 74a22fced5a012c57f56d1cf7ea926cc366a2a3a Author: Marek Behún Date: Fri Jul 19 10:57:55 2024 +0200 platform: cznic: turris-omnia-mcu: Make poweroff and wakeup code optional Make the system poweroff and RTC wakeup part of the driver optional, under a boolean config option. Move the dependency to RTC_CLASS to this new option. This makes the turris-omnia-mcu driver available for compilation even if RTC_CLASS is disabled. Fixes: ed46f1f7731d ("platform: cznic: turris-omnia-mcu: fix Kconfig dependencies") Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240719085756.30598-4-kabel@kernel.org Signed-off-by: Arnd Bergmann commit c7da0d4e33ce262dbed7b9ae4cf013aad0f541f6 Author: Marek Behún Date: Fri Jul 19 10:57:54 2024 +0200 platform: cznic: turris-omnia-mcu: Make TRNG code optional Make the TRNG part of the driver optional, under a boolean config option. This makes the driver turris-omnia-mcu available for compilation even if HW_RANDOM is disabled. Fixes: ed46f1f7731d ("platform: cznic: turris-omnia-mcu: fix Kconfig dependencies") Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240719085756.30598-3-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 019f87f1ef967c5a5b263f21ad100f46c874505a Author: Marek Behún Date: Fri Jul 19 10:57:53 2024 +0200 platform: cznic: turris-omnia-mcu: Make watchdog code optional Make the watchdog part of the driver optional, under a boolean config option. Move the dependency to WATCHDOG to this new option, and change the WATCHDOG_CORE dependency to selection, as is done in most watchdog drivers. This makes the turris-omnia-mcu driver available for compilation even if WATCHDOG is disabled. Fixes: ed46f1f7731d ("platform: cznic: turris-omnia-mcu: fix Kconfig dependencies") Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240719085756.30598-2-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 2caca9fb166f82937110368768002511628e6e1f Author: Kent Overstreet Date: Tue Aug 6 23:30:48 2024 -0400 bcachefs: ec should not allocate from ro devs This fixes a device removal deadlock when using erasure coding. Signed-off-by: Kent Overstreet commit c1e4446247b2a8919649fb9aae2d86f53bf3d1e3 Author: Kent Overstreet Date: Tue Aug 6 21:02:34 2024 -0400 bcachefs: Improved allocator debugging for ec chasing down a device removal deadlock with erasure coding Signed-off-by: Kent Overstreet commit 02026e8931366158d7395f87afeb0b535210dbee Author: Kent Overstreet Date: Tue Aug 6 22:49:31 2024 -0400 bcachefs: Add missing bch2_trans_begin() call Signed-off-by: Kent Overstreet commit 90b211fa2da3f36939e84b6426988832a62caf4b Author: Kent Overstreet Date: Tue Jul 30 20:35:59 2024 -0400 bcachefs: Add a comment for bucket helper types We've had bugs in the past with incorrect integer conversions in disk accounting code, which is why bucket helpers now always return s64s; add a comment explaining this. Signed-off-by: Kent Overstreet commit 7442b5cdf259e2fb112560904b7002ce48d15578 Author: Kent Overstreet Date: Tue Jul 30 20:33:25 2024 -0400 bcachefs: Don't rely on implicit unsigned -> signed integer conversion implicit integer conversion is a fertile source of bugs, and we really would rather not have the min()/max() macros doing it implicitly. bcachefs appears to be the only place in the kernel where this happens, so let's fix it. Signed-off-by: Kent Overstreet commit ff9bf4b34104955017822e9bc42aeeb526ee2a80 Author: Kent Overstreet Date: Tue Jul 30 21:14:08 2024 -0400 lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT We won't find a contended lock if it's not being tracked. Signed-off-by: Kent Overstreet commit cff59d8631e1409ffdd22d9d717e15810181b32c Author: Claudio Imbrenda Date: Thu Aug 1 13:25:48 2024 +0200 s390/uv: Panic for set and remove shared access UVC errors The return value uv_set_shared() and uv_remove_shared() (which are wrappers around the share() function) is not always checked. The system integrity of a protected guest depends on the Share and Unshare UVCs being successful. This means that any caller that fails to check the return value will compromise the security of the protected guest. No code path that would lead to such violation of the security guarantees is currently exercised, since all the areas that are shared never get unshared during the lifetime of the system. This might change and become an issue in the future. The Share and Unshare UVCs can only fail in case of hypervisor misbehaviour (either a bug or malicious behaviour). In such cases there is no reasonable way forward, and the system needs to panic. This patch replaces the return at the end of the share() function with a panic, to guarantee system integrity. Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code") Signed-off-by: Claudio Imbrenda Reviewed-by: Christian Borntraeger Reviewed-by: Steffen Eiden Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20240801112548.85303-1-imbrenda@linux.ibm.com Message-ID: <20240801112548.85303-1-imbrenda@linux.ibm.com> [frankja@linux.ibm.com: Fixed up patch subject] Signed-off-by: Janosch Frank commit 65ba8cef0416816b912c04850fc2468329994353 Author: Heikki Krogerus Date: Tue Aug 6 14:20:29 2024 +0300 usb: typec: ucsi: Fix a deadlock in ucsi_send_command_common() The function returns with the ppm_lock held if the PPM is busy or there's an error. Reported-and-tested-by: Luciano Coelho Fixes: 5e9c1662a89b ("usb: typec: ucsi: rework command execution functions") Signed-off-by: Heikki Krogerus Reported-by: Luciano Coelho Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/20240806112029.2984319-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit becac61a771a4a127e0c38c28110a55cb84d9f41 Author: Xu Yang Date: Fri Aug 2 14:41:56 2024 +0800 usb: typec: tcpm: avoid sink goto SNK_UNATTACHED state if not received source capability message Since commit (122968f8dda8 usb: typec: tcpm: avoid resets for missing source capability messages), state will change from SNK_WAIT_CAPABILITIES to SNK_WAIT_CAPABILITIES_TIMEOUT. We need to change SNK_WAIT_CAPABILITIES -> SNK_READY path to SNK_WAIT_CAPABILITIES_TIMEOUT -> SNK_READY accordingly. Otherwise, the sink port will never change to SNK_READY state if the source does't have PD capability. [ 503.547183] pending state change SNK_WAIT_CAPABILITIES -> SNK_WAIT_CAPABILITIES_TIMEOUT @ 310 ms [rev3 NONE_AMS] [ 503.857239] state change SNK_WAIT_CAPABILITIES -> SNK_WAIT_CAPABILITIES_TIMEOUT [delayed 310 ms] [ 503.857254] PD TX, header: 0x87 [ 503.862440] PD TX complete, status: 2 [ 503.862484] state change SNK_WAIT_CAPABILITIES_TIMEOUT -> SNK_UNATTACHED [rev3 NONE_AMS] Fixes: 122968f8dda8 ("usb: typec: tcpm: avoid resets for missing source capability messages") Cc: stable@vger.kernel.org Signed-off-by: Xu Yang Reviewed-by: Sebastian Reichel Reviewed-by: Heikki Krogerus Reviewed-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20240802064156.1846768-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit a59d8cc9292c58bccec7d8fa27eb59d0a3a6aa0d Author: Tudor Ambarus Date: Fri Aug 2 14:04:28 2024 +0000 usb: gadget: f_fs: pull out f->disable() from ffs_func_set_alt() The ``alt`` parameter was used as a way to differentiate between f->disable() and f->set_alt(). As the code paths diverge quite a bit, pull out the f->disable() code from ffs_func_set_alt(), everything will become clearer and less error prone. No change in functionality intended. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20240802140428.2000312-3-tudor.ambarus@linaro.org Signed-off-by: Greg Kroah-Hartman commit 382b6eabb0316b7334d97afbdcf33a4e20b0ecd8 Author: Tudor Ambarus Date: Fri Aug 2 14:04:27 2024 +0000 usb: gadget: f_fs: restore ffs_func_disable() functionality The blamed commit made ffs_func_disable() always return -EINVAL as the method calls ffs_func_set_alt() with the ``alt`` argument being ``(unsigned)-1``, which is always greater than MAX_ALT_SETTINGS. Use the MAX_ALT_SETTINGS check just in the f->set_alt() code path, f->disable() doesn't care about the ``alt`` parameter. Make a surgical fix, but really the f->disable() code shall be pulled out from ffs_func_set_alt(), the code will become clearer. A patch will follow. Note that ffs_func_disable() always returning -EINVAL made pixel6 crash on USB disconnect. Fixes: 2f550553e23c ("usb: gadget: f_fs: Add the missing get_alt callback") Cc: stable Reported-by: William McVicker Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20240802140428.2000312-2-tudor.ambarus@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7d5cbd799a97b4483aa278663138b5af8bccffdf Merge: b1dad2f091382 00af4f3dda146 Author: Greg Kroah-Hartman Date: Wed Aug 7 12:36:50 2024 +0200 Merge tag 'usb-serial-6.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fix for 6.11-rc2 Here's a fix for an issue when using the usb_debug driver with Xen. This change has been in linux-next for a couple of days with no reported issues. * tag 'usb-serial-6.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: debug: do not echo input by default commit 494b0792d962e8efac72b3a5b6d9bcd4e6fa8cf0 Author: Dandan Zhang Date: Wed Aug 7 17:37:14 2024 +0800 LoongArch: KVM: Remove undefined a6 argument comment for kvm_hypercall() The kvm_hypercall() set for LoongArch is limited to a1-a5. So the mention of a6 in the comment is undefined that needs to be rectified. Reviewed-by: Bibo Mao Signed-off-by: Wentao Guan Signed-off-by: Dandan Zhang Signed-off-by: Huacai Chen commit 296b03ce389b4f7b3d7ea5664e53d432fb17e745 Author: Yuli Wang Date: Wed Aug 7 17:37:14 2024 +0800 LoongArch: KVM: Remove unnecessary definition of KVM_PRIVATE_MEM_SLOTS 1. "KVM_PRIVATE_MEM_SLOTS" is renamed as "KVM_INTERNAL_MEM_SLOTS". 2. "KVM_INTERNAL_MEM_SLOTS" defaults to zero, so it is not necessary to define it in LoongArch's asm/kvm_host.h. Link: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bdd1c37a315bc50ab14066c4852bc8dcf070451e Link: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b075450868dbc0950f0942617f222eeb989cad10 Reviewed-by: Bibo Mao Signed-off-by: Wentao Guan Signed-off-by: Yuli Wang Signed-off-by: Huacai Chen commit 4574815abf43e2bf05643e1b3f7a2e5d6df894f0 Author: Huacai Chen Date: Wed Aug 7 17:37:11 2024 +0800 LoongArch: Use accessors to page table entries instead of direct dereference As very well explained in commit 20a004e7b017cce282 ("arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables"), an architecture whose page table walker can modify the PTE in parallel must use READ_ONCE()/ WRITE_ONCE() macro to avoid any compiler transformation. So apply that to LoongArch which is such an architecture, in order to avoid potential problems. Similar to commit edf955647269422e ("riscv: Use accessors to page table entries instead of direct dereference"). Signed-off-by: Huacai Chen commit e688c220732e518c2eb1639e9ef77d4a9311713c Author: Miao Wang Date: Wed Aug 7 17:37:11 2024 +0800 LoongArch: Enable general EFI poweroff method efi_shutdown_init() can register a general sys_off handler named efi_power_off(). Enable this by providing efi_poweroff_required(), like arm and x86. Since EFI poweroff is also supported on LoongArch, and the enablement makes the poweroff function usable for hardwares which lack ACPI S5. We prefer ACPI poweroff rather than EFI poweroff (like x86), so we only require EFI poweroff if acpi_gbl_reduced_hardware or acpi_no_s5 is true. Cc: stable@vger.kernel.org Acked-by: Ard Biesheuvel Signed-off-by: Miao Wang Signed-off-by: Huacai Chen commit 787db3bb6ed5cee56fc97fecdd61517d89763f0a Author: David Gow Date: Sun Aug 4 17:18:48 2024 +0800 drm/i915: Attempt to get pages without eviction first In commit a78a8da51b36 ("drm/ttm: replace busy placement with flags v6"), __i915_ttm_get_pages was updated to use flags instead of the separate 'busy' placement list. However, the behaviour was subtly changed. Originally, the function would attempt to use the preferred placement without eviction, and give an opportunity to restart the operation before falling back to allowing eviction. This was unintentionally changed, as the preferred placement was not given the TTM_PL_FLAG_DESIRED flag, and so eviction could be triggered in that first pass. This caused thrashing, and a significant performance regression on DG2 systems with small BAR. For example, Minecraft and Team Fortress 2 would drop to single-digit framerates. Restore the original behaviour by marking the initial placement as desired on that first attempt. Also, rework this to use a separate struct ttm_palcement, as the individual placements are marked 'const', so hot-patching the flags is even more dodgy than before. Thanks to Justin Brewer for bisecting this. Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11255 Signed-off-by: David Gow Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240804091851.122186-3-david@davidgow.net (cherry picked from commit 92653f2a572505adaf7f13f695c1907e71a1dc84) Signed-off-by: Joonas Lahtinen commit 264b5b5980061d8c6a6a30c031cdec1179fe2bae Author: David Gow Date: Sun Aug 4 17:18:47 2024 +0800 drm/i915: Allow evicting to use the requested placement In commit a78a8da51b36 ("drm/ttm: replace busy placement with flags v6"), the old system of having a separate placement list (for placements which should be used without eviction) and a 'busy' placement list (for placements which should be attempted if eviction is required) was replaced with a new one where placements could be marked 'FALLBACK' (to be attempted if eviction is required) or 'DESIRED' (to be attempted first, but not if eviction is required). i915 had always included the requested placement in the list of 'busy' placements: i.e., the placement could be used either if eviction is required or not. But when the new system was put in place, the requested (first) placement was marked 'DESIRED', so would never be used if eviction became necessary. While a bug in the original commit prevented this flag from working, when this was fixed in 4a0e7b3c ("drm/i915: fix applying placement flag"), it caused long hangs on DG2 systems with small BAR. Don't mark the requested placement DESIRED (or FALLBACK), allowing it to be used in both situations. This matches the old behaviour, and resolves the hangs. Thanks to Justin Brewer for bisecting the issue. Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") Fixes: 4a0e7b3c3753 ("drm/i915: fix applying placement flag") Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11255 Signed-off-by: David Gow Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240804091851.122186-2-david@davidgow.net (cherry picked from commit 54bf0af90844fbf18f5be3272eda69198dfdb622) Signed-off-by: Joonas Lahtinen commit eb91c456f3714c336f0812dccab422ec0e72bde4 Author: Dustin L. Howett Date: Tue Aug 6 21:33:51 2024 -0500 ALSA: hda/realtek: Add Framework Laptop 13 (Intel Core Ultra) to quirks The Framework Laptop 13 (Intel Core Ultra) has an ALC285 that ships in a similar configuration to the ALC295 in previous models. It requires the same quirk for headset detection. Signed-off-by: Dustin L. Howett Cc: Link: https://patch.msgid.link/20240806-alsa-hda-realtek-add-framework-laptop-13-intel-core-ultra-to-quirks-v1-1-42d6ce2dbf14@howett.net Signed-off-by: Takashi Iwai commit 1ca645a2f74a4290527ae27130c8611391b07dbf Author: ZHANG Yuntian Date: Sat Aug 3 15:46:51 2024 +0800 net: usb: qmi_wwan: add MeiG Smart SRM825L Add support for MeiG Smart SRM825L which is based on Qualcomm 315 chip. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 P: Vendor=2dee ProdID=4d22 Rev= 4.14 S: Manufacturer=MEIG S: Product=LTE-A Module S: SerialNumber=6f345e48 C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=896mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=88(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms Signed-off-by: ZHANG Yuntian Link: https://patch.msgid.link/D1EB81385E405DFE+20240803074656.567061-1-yt@radxa.com Signed-off-by: Jakub Kicinski commit c7a19018bd557c24072b59088ad2684fd83ea3f4 Author: Tristram Ha Date: Mon Aug 5 16:52:00 2024 -0700 net: dsa: microchip: Fix Wake-on-LAN check to not return an error The wol variable in ksz_port_set_mac_address() is declared with random data, but the code in ksz_get_wol call may not be executed so the WAKE_MAGIC check may be invalid resulting in an error message when setting a MAC address after starting the DSA driver. Fixes: 3b454b6390c3 ("net: dsa: microchip: ksz9477: Add Wake on Magic Packet support") Signed-off-by: Tristram Ha Reviewed-by: Oleksij Rempel Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240805235200.24982-1-Tristram.Ha@microchip.com Signed-off-by: Jakub Kicinski commit 9ba48db9f77ce0001dbb882476fa46e092feb695 Author: Gaosheng Cui Date: Tue Aug 6 20:53:31 2024 +0800 i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume Add the missing geni_icc_disable() before return in geni_i2c_runtime_resume(). Fixes: bf225ed357c6 ("i2c: i2c-qcom-geni: Add interconnect support") Signed-off-by: Gaosheng Cui Reviewed-by: Vladimir Zapolskiy Signed-off-by: Andi Shyti commit fe992163575b187405899c5abaad8ef6fb828ff6 Author: Sarthak Singh Date: Wed Jul 24 22:57:06 2024 +0530 rust: Support latest version of `rust-analyzer` Sets the `sysroot` field in rust-project.json which is now needed in newer versions of rust-analyzer instead of the `sysroot_src` field. Till [1] `rust-analyzer` used to guess the `sysroot` based on the `sysroot_src` at [2]. Now `sysroot` is a required parameter for a `rust-project.json` file. It is required because `rust-analyzer` need it to find the proc-macro server [3]. In the current version of `rust-analyzer` the `sysroot_src` is only used to include the inbuilt library crates (std, core, alloc, etc) [4]. Since we already specify the core library to be included in the `rust-project.json` we don't need to define the `sysroot_src`. Code editors like VS Code try to use the latest version of rust-analyzer (which is updated every week) instead of the version of rust-analyzer that comes with the rustup toolchain (which is updated every six weeks along with the rust version). Without this change `rust-analyzer` is breaking for anyone using VS Code. As they are getting the latest version of `rust-analyzer` with the changes made in [1]. `rust-analyzer` will also start breaking for other developers as they update their rust version (assuming that also updates the rust-analyzer version on their system). This patch should work with every setup as there is no more guess work being done by `rust-analyzer`. [ Lukas, who leads the rust-analyzer team, says: `sysroot_src` is required now if you want to have the sysroot source libraries be loaded. I think we used to infer it as `{sysroot}/lib/rustlib/src/rust/library` before when only the `sysroot` field was given but that was since changed to make it possible in having a sysroot without the standard library sources (that is only have the binaries available). So if you want the library sources to be loaded by rust-analyzer you will have to set that field as well now. - Miguel ] Link: https://github.com/rust-lang/rust-analyzer/pull/17287 [1] Link: https://github.com/rust-lang/rust-analyzer/blob/f372a8a1176ff8dd5f45ab2ddd45f3530db0374f/crates/project-model/src/workspace.rs#L367-L374 [2] Link: https://github.com/rust-lang/rust-analyzer/blob/eeb192b79aeac47b40add66347022af17a74fbaf/crates/project-model/src/sysroot.rs#L180-L192 [3] Link: https://github.com/search?q=repo%3AVeykril%2Frust-analyzer%20src_root()&type=code [4] Tested-by: Dirk Behme Signed-off-by: Sarthak Singh Link: https://rust-for-linux.zulipchat.com/#narrow/stream/291565-Help/topic/How.20to.20rust-analyzer.20correctly.20working Link: https://lore.kernel.org/r/20240724172713.899399-1-sarthak.singh99@gmail.com [ Formatted comment, fixed typo and removed spurious empty line. - Miguel ] Signed-off-by: Miguel Ojeda commit 379d9af3f3da2da1bbfa67baf1820c72a080d1f1 Author: Zhen Lei Date: Tue Aug 6 14:51:13 2024 +0800 selinux: fix potential counting error in avc_add_xperms_decision() The count increases only when a node is successfully added to the linked list. Cc: stable@vger.kernel.org Fixes: fa1aa143ac4a ("selinux: extended permissions for ioctls") Signed-off-by: Zhen Lei Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit b9735006762677c2cd794bfcb1463a9a6ed558dd Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync uapi/sound/asound.h with the kernel sources To pick up changes from: f05c1ffc2745 ALSA: pcm: reinvent the stream synchronization ID API This should be used to beautify sound syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/sound/asound.h include/uapi/sound/asound.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: linux-sound@vger.kernel.org Signed-off-by: Namhyung Kim commit 8ec9497d3ef34fab216e277eca5035811f06b421 Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync uapi/linux/perf.h with the kernel sources To pick up changes from: 608f6976c309 perf/x86/intel: Support new data source for Lunar Lake This should be used to beautify perf syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Ian Rogers Cc: Adrian Hunter Cc: "Liang, Kan" Cc: linux-perf-users@vger.kernel.org Signed-off-by: Namhyung Kim commit a625df3995c31a5d8cf46f2337b207e93bef9bdd Author: Namhyung Kim Date: Tue Aug 6 12:07:50 2024 -0700 tools/include: Sync uapi/linux/kvm.h with the kernel sources And other arch-specific UAPI headers to pick up changes from: 4b23e0c199b2 KVM: Ensure new code that references immediate_exit gets extra scrutiny 85542adb65ec KVM: x86: Add KVM_RUN_X86_GUEST_MODE kvm_run flag 6fef518594bc KVM: x86: Add a capability to configure bus frequency for APIC timer 34ff65901735 x86/sev: Use kernel provided SVSM Calling Areas 5dcc1e76144f Merge tag 'kvm-x86-misc-6.11' of https://github.com/kvm-x86/linux into HEAD 9a0d2f4995dd KVM: PPC: Book3S HV: Add one-reg interface for HASHPKEYR register e9eb790b2557 KVM: PPC: Book3S HV: Add one-reg interface for HASHKEYR register 1a1e6865f516 KVM: PPC: Book3S HV: Add one-reg interface for DEXCR register This should be used to beautify KVM syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Signed-off-by: Namhyung Kim commit aef21f6b6a4aae648c890e74c2322d10ab267249 Author: Namhyung Kim Date: Tue Aug 6 09:59:26 2024 -0700 tools/include: Sync uapi/drm/i915_drm.h with the kernel sources To pick up changes from: 0f1bb41bf396 drm/i915: Support replaying GPU hangs with captured context image This should be used to beautify DRM syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Namhyung Kim commit fbc05142ccdd0061f6d0e489608935943d2984a1 Author: Namhyung Kim Date: Tue Aug 6 12:01:40 2024 -0700 perf tools: Add tools/include/uapi/README Write down the reason why we keep a copy of headers to the README file instead of adding it to every commit messages. Suggested-by: Jani Nikula Original-by: Arnaldo Carvalho de Melo Original-by: Ingo Molnar Signed-off-by: Namhyung Kim commit 3e7917c0cdad835a5121520fc5686d954b7a61ab Author: Eric Dumazet Date: Mon Aug 5 08:58:21 2024 +0000 net: linkwatch: use system_unbound_wq linkwatch_event() grabs possibly very contended RTNL mutex. system_wq is not suitable for such work. Inspired by many noisy syzbot reports. 3 locks held by kworker/0:7/5266: #0: ffff888015480948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015480948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90003f6fd00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] , at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffffffff8fa6f208 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276 Reported-by: syzbot Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20240805085821.1616528-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 929725bd7eb4eea1f75197d9847f3f1ea5afdad1 Author: Simon Ser Date: Wed Jul 31 19:10:20 2024 +0000 drm/atomic: allow no-op FB_ID updates for async flips User-space is allowed to submit any property in an async flip as long as the value doesn't change. However we missed one case: as things stand, the kernel rejects no-op FB_ID changes on non-primary planes. Fix this by changing the conditional and skipping drm_atomic_check_prop_changes() only for FB_ID on the primary plane (instead of skipping for FB_ID on any plane). Fixes: 0e26cc72c71c ("drm: Refuse to async flip with atomic prop changes") Signed-off-by: Simon Ser Reviewed-by: André Almeida Tested-by: Xaver Hugl Cc: Alex Deucher Cc: Christian König Cc: Michel Dänzer Cc: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240731191014.878320-1-contact@emersion.fr commit d4560686726f7a357922f300fc81f5964be8df04 Merge: eb5e56d149129 0823dc64586ba Author: Linus Torvalds Date: Tue Aug 6 10:58:28 2024 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fix from Michael Tsirkin: "Fix a single, long-standing issue with kick pass-through vdpa" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost-vdpa: switch to use vmf_insert_pfn() in the fault handler commit 1c4a057d01f4432704c4dc8842b6e888a91d95df Author: Rob Clark Date: Mon Jul 29 13:57:24 2024 -0700 dt-bindings: display: panel: samsung,atna45dc02: Document ATNA45DC02 The Samsung ATNA45DC02 panel is an AMOLED eDP panel, similar to the existing ATNA45AF01 and ATNA33XC20 panel but with a higher resolution. Signed-off-by: Rob Clark Acked-by: Conor Dooley Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240729205726.7923-1-robdclark@gmail.com commit bd44ca3de49cc1badcff7a96010fa2c64f04868c Author: Rik van Riel Date: Tue Aug 6 11:56:45 2024 -0400 dma-debug: avoid deadlock between dma debug vs printk and netconsole Currently the dma debugging code can end up indirectly calling printk under the radix_lock. This happens when a radix tree node allocation fails. This is a problem because the printk code, when used together with netconsole, can end up inside the dma debugging code while trying to transmit a message over netcons. This creates the possibility of either a circular deadlock on the same CPU, with that CPU trying to grab the radix_lock twice, or an ABBA deadlock between different CPUs, where one CPU grabs the console lock first and then waits for the radix_lock, while the other CPU is holding the radix_lock and is waiting for the console lock. The trace captured by lockdep is of the ABBA variant. -> #2 (&dma_entry_hash[i].lock){-.-.}-{2:2}: _raw_spin_lock_irqsave+0x5a/0x90 debug_dma_map_page+0x79/0x180 dma_map_page_attrs+0x1d2/0x2f0 bnxt_start_xmit+0x8c6/0x1540 netpoll_start_xmit+0x13f/0x180 netpoll_send_skb+0x20d/0x320 netpoll_send_udp+0x453/0x4a0 write_ext_msg+0x1b9/0x460 console_flush_all+0x2ff/0x5a0 console_unlock+0x55/0x180 vprintk_emit+0x2e3/0x3c0 devkmsg_emit+0x5a/0x80 devkmsg_write+0xfd/0x180 do_iter_readv_writev+0x164/0x1b0 vfs_writev+0xf9/0x2b0 do_writev+0x6d/0x110 do_syscall_64+0x80/0x150 entry_SYSCALL_64_after_hwframe+0x4b/0x53 -> #0 (console_owner){-.-.}-{0:0}: __lock_acquire+0x15d1/0x31a0 lock_acquire+0xe8/0x290 console_flush_all+0x2ea/0x5a0 console_unlock+0x55/0x180 vprintk_emit+0x2e3/0x3c0 _printk+0x59/0x80 warn_alloc+0x122/0x1b0 __alloc_pages_slowpath+0x1101/0x1120 __alloc_pages+0x1eb/0x2c0 alloc_slab_page+0x5f/0x150 new_slab+0x2dc/0x4e0 ___slab_alloc+0xdcb/0x1390 kmem_cache_alloc+0x23d/0x360 radix_tree_node_alloc+0x3c/0xf0 radix_tree_insert+0xf5/0x230 add_dma_entry+0xe9/0x360 dma_map_page_attrs+0x1d2/0x2f0 __bnxt_alloc_rx_frag+0x147/0x180 bnxt_alloc_rx_data+0x79/0x160 bnxt_rx_skb+0x29/0xc0 bnxt_rx_pkt+0xe22/0x1570 __bnxt_poll_work+0x101/0x390 bnxt_poll+0x7e/0x320 __napi_poll+0x29/0x160 net_rx_action+0x1e0/0x3e0 handle_softirqs+0x190/0x510 run_ksoftirqd+0x4e/0x90 smpboot_thread_fn+0x1a8/0x270 kthread+0x102/0x120 ret_from_fork+0x2f/0x40 ret_from_fork_asm+0x11/0x20 This bug is more likely than it seems, because when one CPU has run out of memory, chances are the other has too. The good news is, this bug is hidden behind the CONFIG_DMA_API_DEBUG, so not many users are likely to trigger it. Signed-off-by: Rik van Riel Reported-by: Konstantin Ovsepian Signed-off-by: Christoph Hellwig commit 61cbfb5368dd50ed0d65ce21d305aa923581db2b Author: Dumitru Ceclan Date: Tue Aug 6 11:51:33 2024 +0300 iio: adc: ad7124: fix DT configuration parsing The cfg pointer is set before reading the channel number that the configuration should point to. This causes configurations to be shifted by one channel. For example setting bipolar to the first channel defined in the DT will cause bipolar mode to be active on the second defined channel. Fix by moving the cfg pointer setting after reading the channel number. Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels") Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240806085133.114547-1-dumitru.ceclan@analog.com Cc: Signed-off-by: Jonathan Cameron commit e81bb580ec08d7503c14c92157d810d306290003 Author: Nuno Sa Date: Tue Aug 6 17:40:49 2024 +0200 iio: adc: ad_sigma_delta: fix irq_flags on irq request With commit 7b0c9f8fa3d2 ("iio: adc: ad_sigma_delta: Add optional irq selection"), we can get the irq line from struct ad_sigma_delta_info instead of the spi device. However, in devm_ad_sd_probe_trigger(), when getting the irq_flags with irq_get_trigger_type() we are still using the spi device irq instead of the one used for devm_request_irq(). Fixes: 7b0c9f8fa3d2 ("iio: adc: ad_sigma_delta: Add optional irq selection") Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240806-dev-fix-ad-sigma-delta-v1-1-aa25b173c063@analog.com Cc: Signed-off-by: Jonathan Cameron commit eb5e56d1491297e0881c95824e2050b7c205f0d4 Merge: b446a2dae984f 3114f77e9453d Author: Linus Torvalds Date: Tue Aug 6 07:52:10 2024 -0700 Merge tag 'platform-drivers-x86-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: "Fixes: - Fix ACPI notifier racing with itself (intel-vbtn) - Initialize local variable to cover a timeout corner case (intel/ifs) - WMI docs spelling New device IDs: - amd/{pmc,pmf}: AMD 1Ah model 60h series. - amd/pmf: SPS quirk support for ASUS ROG Ally X" * tag 'platform-drivers-x86-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/intel/ifs: Initialize union ifs_status to zero platform/x86: msi-wmi-platform: Fix spelling mistakes platform/x86/amd/pmf: Add new ACPI ID AMDI0107 platform/x86/amd/pmc: Send OS_HINT command for new AMD platform platform/x86/amd: pmf: Add quirk for ROG Ally X platform/x86: intel-vbtn: Protect ACPI notify handler against recursion commit ee9a68394b4bea8b9044ec4bfdbaacf45297ecef Author: Alexandre Ghiti Date: Thu Aug 1 21:14:04 2024 +0200 riscv: Re-introduce global icache flush in patch_text_XXX() commit edf2d546bfd6 ("riscv: patch: Flush the icache right after patching to avoid illegal insns") mistakenly removed the global icache flush in patch_text_nosync() and patch_text_set_nosync() functions, so reintroduce them. Fixes: edf2d546bfd6 ("riscv: patch: Flush the icache right after patching to avoid illegal insns") Reported-by: Samuel Holland Closes: https://lore.kernel.org/linux-riscv/a28ddc26-d77a-470a-a33f-88144f717e86@sifive.com/ Signed-off-by: Alexandre Ghiti Reviewed-by: Samuel Holland Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240801191404.55181-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit a44b7b57ef144052cd322880c4d2b3d52e563544 Merge: e42066df07c0f 2c3640b82213c Author: Mark Brown Date: Tue Aug 6 13:42:45 2024 +0100 ASoC: Extend wm_adsp so cs35l56 can suppress controls Merge series from Simon Trimmer : This pair of patches extend wm_adsp to add a callback that can be used to control whether ALSA controls are added and then tweak cs35l56 to use it to suppress controls made from firmware coefficients. commit 8bdd9ef7e9b1b2a73e394712b72b22055e0e26c3 Author: Andi Shyti Date: Fri Aug 2 10:38:50 2024 +0200 drm/i915/gem: Fix Virtual Memory mapping boundaries calculation Calculating the size of the mapped area as the lesser value between the requested size and the actual size does not consider the partial mapping offset. This can cause page fault access. Fix the calculation of the starting and ending addresses, the total size is now deduced from the difference between the end and start addresses. Additionally, the calculations have been rewritten in a clearer and more understandable form. Fixes: c58305af1835 ("drm/i915: Use remap_io_mapping() to prefault all PTE in a single pass") Reported-by: Jann Horn Co-developed-by: Chris Wilson Signed-off-by: Chris Wilson Signed-off-by: Andi Shyti Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Rodrigo Vivi Cc: # v4.9+ Reviewed-by: Jann Horn Reviewed-by: Jonathan Cavitt [Joonas: Add Requires: tag] Requires: 60a2066c5005 ("drm/i915/gem: Adjust vma offset for framebuffer mmap offset") Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20240802083850.103694-3-andi.shyti@linux.intel.com (cherry picked from commit 97b6784753da06d9d40232328efc5c5367e53417) Signed-off-by: Joonas Lahtinen commit 1ac5167b3a90c9820daa64cc65e319b2d958d686 Author: Andi Shyti Date: Fri Aug 2 10:38:49 2024 +0200 drm/i915/gem: Adjust vma offset for framebuffer mmap offset When mapping a framebuffer object, the virtual memory area (VMA) offset ('vm_pgoff') should be adjusted by the start of the 'vma_node' associated with the object. This ensures that the VMA offset is correctly aligned with the corresponding offset within the GGTT aperture. Increment vm_pgoff by the start of the vma_node with the offset= provided by the user. Suggested-by: Chris Wilson Signed-off-by: Andi Shyti Reviewed-by: Jonathan Cavitt Reviewed-by: Rodrigo Vivi Cc: # v4.9+ [Joonas: Add Cc: stable] Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20240802083850.103694-2-andi.shyti@linux.intel.com (cherry picked from commit 60a2066c50058086510c91f404eb582029650970) Signed-off-by: Joonas Lahtinen commit 402d336053a5d827c70ec11109e079811e86e0e8 Author: Parth Pancholi Date: Tue Jul 30 11:37:54 2024 +0200 arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs Correct the McASP nodes - mcasp3 and mcasp4 with the right DMAs thread IDs as per TISCI documentation [1] for J784s4. This fixes the related McASPs probe failure due to incorrect DMA IDs. Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/j784s4/psil_cfg.html#psi-l-source-and-destination-thread-ids/ [1] Fixes: 5095ec4aa1ea ("arm64: dts: ti: k3-j784s4-main: Add McASP nodes") Signed-off-by: Parth Pancholi Reviewed-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20240730093754.1659782-1-parth105105@gmail.com Signed-off-by: Nishanth Menon commit 8de78e00986e883670d79d99d174626e4d4dabc5 Merge: 053ae05f80329 ac2b81eb8b2d1 Author: Marc Kleine-Budde Date: Tue Aug 6 09:52:53 2024 +0200 Merge patch series "can: mcp251xfd: fix ring/coalescing configuration" Marc Kleine-Budde says: When changing from CAN-CC to CAN-FD mode the ring and/or coalescing parameters might be too big. This series fixes the problem and adds a safeguard to detect broken coalescing configuration. Link: https://lore.kernel.org/all/20240805-mcp251xfd-fix-ringconfig-v1-0-72086f0ca5ee@pengutronix.de Signed-off-by: Marc Kleine-Budde commit ac2b81eb8b2d104033560daea886ee84531e3d0a Author: Marc Kleine-Budde Date: Fri Jul 5 17:24:42 2024 +0200 can: mcp251xfd: mcp251xfd_ring_init(): check TX-coalescing configuration When changing the interface from CAN-CC to CAN-FD mode the old coalescing parameters are re-used. This might cause problem, as the configured parameters are too big for CAN-FD mode. During testing an invalid TX coalescing configuration has been seen. The problem should be been fixed in the previous patch, but add a safeguard here to ensure that the number of TEF coalescing buffers (if configured) is exactly the half of all TEF buffers. Link: https://lore.kernel.org/all/20240805-mcp251xfd-fix-ringconfig-v1-2-72086f0ca5ee@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 50ea5449c56310d2d31c28ba91a59232116d3c1e Author: Marc Kleine-Budde Date: Fri Jul 5 17:28:27 2024 +0200 can: mcp251xfd: fix ring configuration when switching from CAN-CC to CAN-FD mode If the ring (rx, tx) and/or coalescing parameters (rx-frames-irq, tx-frames-irq) have been configured while the interface was in CAN-CC mode, but the interface is brought up in CAN-FD mode, the ring parameters might be too big. Use the default CAN-FD values in this case. Fixes: 9263c2e92be9 ("can: mcp251xfd: ring: add support for runtime configurable RX/TX ring parameters") Link: https://lore.kernel.org/all/20240805-mcp251xfd-fix-ringconfig-v1-1-72086f0ca5ee@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 053ae05f8032937ded7049366f2e6e7b36c6d6e9 Merge: 06d4ef3056a7a e443d15b94995 Author: Marc Kleine-Budde Date: Tue Aug 6 09:27:41 2024 +0200 Merge patch series "can: m_can: Fix polling and other issues" Markus Schneider-Pargmann says: these are a number of fixes for m_can that fix polling mode and some other issues that I saw while working on the code. Changes in v2 ------------- - Fixed one multiline comment - Rebased to v6.11-rc1 Previous versions ----------------- v1: https://lore.kernel.org/lkml/20240726195944.2414812-1-msp@baylibre.com/ Link: https://lore.kernel.org/all/20240805183047.305630-1-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit e443d15b949952ee039b731d5c35bcbafa300024 Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:47 2024 +0200 can: m_can: Limit coalescing to peripheral instances The use of coalescing for non-peripheral chips in the current implementation is limited to non-existing. Disable the possibility to set coalescing through ethtool. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-8-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 733dbf556cd5b71d5e6f6aa7a93f117b438ab785 Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:46 2024 +0200 can: m_can: Reset cached active_interrupts on start To force writing the enabled interrupts, reset the active_interrupts cache. Fixes: 07f25091ca02 ("can: m_can: Implement receive coalescing") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-7-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit a572fea86c9b06cd3e6e89d79d565b52cb7e7cff Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:45 2024 +0200 can: m_can: disable_all_interrupts, not clear active_interrupts active_interrupts is a cache for the enabled interrupts and not the global masking of interrupts. Do not clear this variable otherwise we may loose the state of the interrupts. Fixes: 07f25091ca02 ("can: m_can: Implement receive coalescing") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-6-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 4d5159bfafa8d1a205d8213b7434e0402588b9ed Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:44 2024 +0200 can: m_can: Do not cancel timer from within timer On setups without interrupts, the interrupt handler is called from a timer callback. For non-peripheral receives napi is scheduled, interrupts are disabled and the timer is canceled with a blocking call. In case of an error this can happen as well. Check if napi is scheduled in the timer callback after the interrupt handler executed. If napi is scheduled, the timer is disabled. It will be reenabled by m_can_poll(). Return error values from the interrupt handler so that interrupt threads and timer callback can deal differently with it. In case of the timer we only disable the timer. The rest will be done when stopping the interface. Fixes: b382380c0d2d ("can: m_can: Add hrtimer to generate software interrupt") Fixes: a163c5761019 ("can: m_can: Start/Cancel polling timer together with interrupts") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-5-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 40e4552eeef0e3090a5988de15889795936fd38f Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:43 2024 +0200 can: m_can: Remove m_can_rx_peripheral indirection m_can_rx_peripheral() is a wrapper around m_can_rx_handler() that calls m_can_disable_all_interrupts() on error. The same handling for the same error path is done in m_can_isr() as well. So remove m_can_rx_peripheral() and do the call from m_can_isr() directly. Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-4-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 6eff1cead75ff330bb33264424c1da6cc7179ab8 Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:42 2024 +0200 can: m_can: Remove coalesing disable in isr during suspend We don't need to disable coalescing when the interrupt handler executes while the chip is suspended. The coalescing is already reset during suspend. Fixes: 07f25091ca02 ("can: m_can: Implement receive coalescing") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-3-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit a651261ac74298535f6d6316ebe27beceb6b17b1 Author: Markus Schneider-Pargmann Date: Mon Aug 5 20:30:41 2024 +0200 can: m_can: Reset coalescing during suspend/resume During resume the interrupts are limited to IR_RF0N and the chip keeps running. In this case if coalescing is enabled and active we may miss waterlevel interrupts during suspend. It is safer to reset the coalescing by stopping the timer and adding IR_RF0N | IR_TEFN to the interrupts. This is a theoratical issue and probably extremely rare. Cc: Martin Hundebøll Fixes: 4a94d7e31cf5 ("can: m_can: allow keeping the transceiver running in suspend") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240805183047.305630-2-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 06d4ef3056a7ac31be331281bb7a6302ef5a7f8a Author: Simon Horman Date: Mon Aug 5 15:01:58 2024 +0100 can: m_can: Release irq on error in m_can_open It appears that the irq requested in m_can_open() may be leaked if an error subsequently occurs: if m_can_start() fails. Address this by calling free_irq in the unwind path for such cases. Flagged by Smatch. Compile tested only. Fixes: eaacfeaca7ad ("can: m_can: Call the RAM init directly from m_can_chip_config") Acked-by: Marc Kleine-Budde Signed-off-by: Simon Horman Link: https://lore.kernel.org/all/20240805-mcan-irq-v2-1-7154c0484819@kernel.org Signed-off-by: Marc Kleine-Budde commit 76fe372ccb81b0c89b6cd2fec26e2f38c958be85 Author: Kuniyuki Iwashima Date: Mon Jul 22 12:28:42 2024 -0700 can: bcm: Remove proc entry when dev is unregistered. syzkaller reported a warning in bcm_connect() below. [0] The repro calls connect() to vxcan1, removes vxcan1, and calls connect() with ifindex == 0. Calling connect() for a BCM socket allocates a proc entry. Then, bcm_sk(sk)->bound is set to 1 to prevent further connect(). However, removing the bound device resets bcm_sk(sk)->bound to 0 in bcm_notify(). The 2nd connect() tries to allocate a proc entry with the same name and sets NULL to bcm_sk(sk)->bcm_proc_read, leaking the original proc entry. Since the proc entry is available only for connect()ed sockets, let's clean up the entry when the bound netdev is unregistered. [0]: proc_dir_entry 'can-bcm/2456' already registered WARNING: CPU: 1 PID: 394 at fs/proc/generic.c:376 proc_register+0x645/0x8f0 fs/proc/generic.c:375 Modules linked in: CPU: 1 PID: 394 Comm: syz-executor403 Not tainted 6.10.0-rc7-g852e42cc2dd4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 RIP: 0010:proc_register+0x645/0x8f0 fs/proc/generic.c:375 Code: 00 00 00 00 00 48 85 ed 0f 85 97 02 00 00 4d 85 f6 0f 85 9f 02 00 00 48 c7 c7 9b cb cf 87 48 89 de 4c 89 fa e8 1c 6f eb fe 90 <0f> 0b 90 90 48 c7 c7 98 37 99 89 e8 cb 7e 22 05 bb 00 00 00 10 48 RSP: 0018:ffa0000000cd7c30 EFLAGS: 00010246 RAX: 9e129be1950f0200 RBX: ff1100011b51582c RCX: ff1100011857cd80 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002 RBP: 0000000000000000 R08: ffd400000000000f R09: ff1100013e78cac0 R10: ffac800000cd7980 R11: ff1100013e12b1f0 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ff1100011a99a2ec FS: 00007fbd7086f740(0000) GS:ff1100013fd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200071c0 CR3: 0000000118556004 CR4: 0000000000771ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: proc_create_net_single+0x144/0x210 fs/proc/proc_net.c:220 bcm_connect+0x472/0x840 net/can/bcm.c:1673 __sys_connect_file net/socket.c:2049 [inline] __sys_connect+0x5d2/0x690 net/socket.c:2066 __do_sys_connect net/socket.c:2076 [inline] __se_sys_connect net/socket.c:2073 [inline] __x64_sys_connect+0x8f/0x100 net/socket.c:2073 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7fbd708b0e5d Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 9f 1b 00 f7 d8 64 89 01 48 RSP: 002b:00007fff8cd33f08 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fbd708b0e5d RDX: 0000000000000010 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000040 R09: 0000000000000040 R10: 0000000000000040 R11: 0000000000000246 R12: 00007fff8cd34098 R13: 0000000000401280 R14: 0000000000406de8 R15: 00007fbd70ab9000 remove_proc_entry: removing non-empty directory 'net/can-bcm', leaking at least '2456' Fixes: ffd980f976e7 ("[CAN]: Add broadcast manager (bcm) protocol") Reported-by: syzkaller Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20240722192842.37421-1-kuniyu@amazon.com Signed-off-by: Marc Kleine-Budde commit 176fd1511dd9086ab4fa9323cb232177c6235288 Author: Takashi Iwai Date: Tue Aug 6 08:49:16 2024 +0200 ALSA: hda/hdmi: Yet more pin fix for HP EliteDesk 800 G4 HP EliteDesk 800 G4 (PCI SSID 103c:83e2) is another Kabylake machine where BIOS misses the HDMI pin initializations. Add the quirk entry. Cc: Link: https://patch.msgid.link/20240806064918.11132-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b82c1d235a30622177ce10dcb94dfd691a49922f Author: Arnd Bergmann Date: Mon Aug 5 22:38:29 2024 +0200 syscalls: add back legacy __NR_nfsservctl macro The conversion from the old unistd.h file to syscall.tbl dropped the nfsservctl macro. This one was handled inconsistently across architectures in the original introduction of the syscall.tbl format, and I went the other way on this. The syscall was already gone in linux-3.1 before the current users of the generic table (other than openrisc) first appeared, so nobody could actally use it, but putting the number back helps for consistency since there are build scripts that check the presence of all these macros. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2301919 Signed-off-by: Arnd Bergmann commit 7e1e206b99f4b3345aeb49d94584a420b7887f1d Author: Steven 'Steve' Kendall Date: Tue Aug 6 00:08:24 2024 +0000 ALSA: hda: Add HP MP9 G4 Retail System AMS to force connect list In recent HP UEFI firmware (likely v2.15 and above, tested on 2.27), these pins are incorrectly set for HDMI/DP audio. Tested on HP MP9 G4 Retail System AMS. Tested audio with two monitors connected via DisplayPort. Link: https://forum.manjaro.org/t/intel-cannon-lake-pch-cavs-conexant-cx20632-no-sound-at-hdmi-or-displayport/133494 Link: https://bbs.archlinux.org/viewtopic.php?id=270523 Signed-off-by: Steven 'Steve' Kendall Cc: Link: https://patch.msgid.link/20240806-hdmi-audio-hp-wrongpins-v2-1-d9eb4ad41043@chromium.org Signed-off-by: Takashi Iwai commit 5a44bb061d04b0306f2aa8add761d86d152b9377 Author: Michael Mueller Date: Thu Aug 1 14:31:09 2024 +0200 KVM: s390: fix validity interception issue when gisa is switched off We might run into a SIE validity if gisa has been disabled either via using kernel parameter "kvm.use_gisa=0" or by setting the related sysfs attribute to N (echo N >/sys/module/kvm/parameters/use_gisa). The validity is caused by an invalid value in the SIE control block's gisa designation. That happens because we pass the uninitialized gisa origin to virt_to_phys() before writing it to the gisa designation. To fix this we return 0 in kvm_s390_get_gisa_desc() if the origin is 0. kvm_s390_get_gisa_desc() is used to determine which gisa designation to set in the SIE control block. A value of 0 in the gisa designation disables gisa usage. The issue surfaces in the host kernel with the following kernel message as soon a new kvm guest start is attemted. kvm: unhandled validity intercept 0x1011 WARNING: CPU: 0 PID: 781237 at arch/s390/kvm/intercept.c:101 kvm_handle_sie_intercept+0x42e/0x4d0 [kvm] Modules linked in: vhost_net tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT xt_tcpudp nft_compat x_tables nf_nat_tftp nf_conntrack_tftp vfio_pci_core irqbypass vhost_vsock vmw_vsock_virtio_transport_common vsock vhost vhost_iotlb kvm nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables sunrpc mlx5_ib ib_uverbs ib_core mlx5_core uvdevice s390_trng eadm_sch vfio_ccw zcrypt_cex4 mdev vfio_iommu_type1 vfio sch_fq_codel drm i2c_core loop drm_panel_orientation_quirks configfs nfnetlink lcs ctcm fsm dm_service_time ghash_s390 prng chacha_s390 libchacha aes_s390 des_s390 libdes sha3_512_s390 sha3_256_s390 sha512_s390 sha256_s390 sha1_s390 sha_common dm_mirror dm_region_hash dm_log zfcp scsi_transport_fc scsi_dh_rdac scsi_dh_emc scsi_dh_alua pkey zcrypt dm_multipath rng_core autofs4 [last unloaded: vfio_pci] CPU: 0 PID: 781237 Comm: CPU 0/KVM Not tainted 6.10.0-08682-gcad9f11498ea #6 Hardware name: IBM 3931 A01 701 (LPAR) Krnl PSW : 0704c00180000000 000003d93deb0122 (kvm_handle_sie_intercept+0x432/0x4d0 [kvm]) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 Krnl GPRS: 000003d900000027 000003d900000023 0000000000000028 000002cd00000000 000002d063a00900 00000359c6daf708 00000000000bebb5 0000000000001eff 000002cfd82e9000 000002cfd80bc000 0000000000001011 000003d93deda412 000003ff8962df98 000003d93de77ce0 000003d93deb011e 00000359c6daf960 Krnl Code: 000003d93deb0112: c020fffe7259 larl %r2,000003d93de7e5c4 000003d93deb0118: c0e53fa8beac brasl %r14,000003d9bd3c7e70 #000003d93deb011e: af000000 mc 0,0 >000003d93deb0122: a728ffea lhi %r2,-22 000003d93deb0126: a7f4fe24 brc 15,000003d93deafd6e 000003d93deb012a: 9101f0b0 tm 176(%r15),1 000003d93deb012e: a774fe48 brc 7,000003d93deafdbe 000003d93deb0132: 40a0f0ae sth %r10,174(%r15) Call Trace: [<000003d93deb0122>] kvm_handle_sie_intercept+0x432/0x4d0 [kvm] ([<000003d93deb011e>] kvm_handle_sie_intercept+0x42e/0x4d0 [kvm]) [<000003d93deacc10>] vcpu_post_run+0x1d0/0x3b0 [kvm] [<000003d93deaceda>] __vcpu_run+0xea/0x2d0 [kvm] [<000003d93dead9da>] kvm_arch_vcpu_ioctl_run+0x16a/0x430 [kvm] [<000003d93de93ee0>] kvm_vcpu_ioctl+0x190/0x7c0 [kvm] [<000003d9bd728b4e>] vfs_ioctl+0x2e/0x70 [<000003d9bd72a092>] __s390x_sys_ioctl+0xc2/0xd0 [<000003d9be0e9222>] __do_syscall+0x1f2/0x2e0 [<000003d9be0f9a90>] system_call+0x70/0x98 Last Breaking-Event-Address: [<000003d9bd3c7f58>] __warn_printk+0xe8/0xf0 Cc: stable@vger.kernel.org Reported-by: Christian Borntraeger Fixes: fe0ef0030463 ("KVM: s390: sort out physical vs virtual pointers usage") Signed-off-by: Michael Mueller Tested-by: Christian Borntraeger Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20240801123109.2782155-1-mimu@linux.ibm.com Message-ID: <20240801123109.2782155-1-mimu@linux.ibm.com> Signed-off-by: Janosch Frank commit 33330bcf031818e60a816db0cfd3add9eecc3b28 Author: Anders Roxell Date: Mon Aug 5 11:22:34 2024 +0200 scripts: kconfig: merge_config: config files: add a trailing newline When merging files without trailing newlines at the end of the file, two config fragments end up at the same row if file1.config doens't have a trailing newline at the end of the file. file1.config "CONFIG_1=y" file2.config "CONFIG_2=y" ./scripts/kconfig/merge_config.sh -m .config file1.config file2.config This will generate a .config looking like this. cat .config ... CONFIG_1=yCONFIG_2=y" Making sure so we add a newline at the end of every config file that is passed into the script. Signed-off-by: Anders Roxell Signed-off-by: Masahiro Yamada commit e2006140ad2e01a02ed0aff49cc2ae3ceeb11f8d Author: Mika Westerberg Date: Thu Jun 13 15:05:03 2024 +0300 thunderbolt: Mark XDomain as unplugged when router is removed I noticed that when we do discrete host router NVM upgrade and it gets hot-removed from the PCIe side as a result of NVM firmware authentication, if there is another host connected with enabled paths we hang in tearing them down. This is due to fact that the Thunderbolt networking driver also tries to cleanup the paths and ends up blocking in tb_disconnect_xdomain_paths() waiting for the domain lock. However, at this point we already cleaned the paths in tb_stop() so there is really no need for tb_disconnect_xdomain_paths() to do that anymore. Furthermore it already checks if the XDomain is unplugged and bails out early so take advantage of that and mark the XDomain as unplugged when we remove the parent router. Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit 6fc9aacad49e3fbecd270c266850d50c453d52ef Author: Alexandre Courbot Date: Sun Aug 4 14:50:57 2024 +0900 Makefile: add $(srctree) to dependency of compile_commands.json target When trying to build compile_commands.json for an external module against the kernel built in a separate output directory, the following error is displayed: make[1]: *** No rule to make target 'scripts/clang-tools/gen_compile_commands.py', needed by 'compile_commands.json'. Stop. This is because gen_compile_commands.py was previously looked up using a relative path to $(srctree), but commit b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory") stopped defining VPATH for external module builds. Prefixing gen_compile_commands.py with $(srctree) fixes the problem. Fixes: b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory") Signed-off-by: Alexandre Courbot Reviewed-by: Nicolas Schier Signed-off-by: Masahiro Yamada commit 8fcd8d1e63c05c48b3ac16d0c3e2cd6a7a5c8ec4 Author: Masahiro Yamada Date: Fri Jul 26 04:23:14 2024 +0900 kbuild: clean up code duplication in cmd_fdtoverlay When resolving a merge conflict, Linus noticed the fdtoverlay command duplication introduced by commit 49636c5680b9 ("kbuild: verify dtoverlay files against schema"). He suggested a clean-up. I eliminated the duplication and refactored the code a little further. No functional changes are intended, except for the short logs. The log will look as follows: $ make ARCH=arm64 defconfig dtbs_check [ snip ] DTC [C] arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dtb DTC [C] arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dtb DTC [C] arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dtb DTC [C] arch/arm64/boot/dts/freescale/imx95-19x19-evk.dtb DTC arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-imx219.dtbo OVL [C] arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x-imx219.dtb The tag [C] indicates that the schema check is executed. Link: https://lore.kernel.org/lkml/CAHk-=wiF3yeWehcvqY-4X7WNb8n4yw_5t0H1CpEpKi7JMjaMfw@mail.gmail.com/#t Requested-by: Linus Torvalds Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit c4c8f369b6a6d21ce27286de1501137771e01dc3 Author: Uros Bizjak Date: Mon Aug 5 09:30:29 2024 +0200 workqueue: Correct declaration of cpu_pwq in struct workqueue_struct cpu_pwq is used in various percpu functions that expect variable in __percpu address space. Correct the declaration of cpu_pwq to struct pool_workqueue __rcu * __percpu *cpu_pwq to declare the variable as __percpu pointer. The patch also fixes following sparse errors: workqueue.c:380:37: warning: duplicate [noderef] workqueue.c:380:37: error: multiple address spaces given: __rcu & __percpu workqueue.c:2271:15: error: incompatible types in comparison expression (different address spaces): workqueue.c:2271:15: struct pool_workqueue [noderef] __rcu * workqueue.c:2271:15: struct pool_workqueue [noderef] __percpu * and uncovers a couple of exisiting "incorrect type in assignment" warnings (from __rcu address space), which this patch does not address. Found by GCC's named address space checks. There were no changes in the resulting object files. Signed-off-by: Uros Bizjak Cc: Tejun Heo Cc: Lai Jiangshan Signed-off-by: Tejun Heo commit 8bc35475ef1a23b0e224f3242eb11c76cab0ea88 Author: Tejun Heo Date: Mon Aug 5 09:37:25 2024 -1000 workqueue: Fix spruious data race in __flush_work() When flushing a work item for cancellation, __flush_work() knows that it exclusively owns the work item through its PENDING bit. 134874e2eee9 ("workqueue: Allow cancel_work_sync() and disable_work() from atomic contexts on BH work items") added a read of @work->data to determine whether to use busy wait for BH work items that are being canceled. While the read is safe when @from_cancel, @work->data was read before testing @from_cancel to simplify code structure: data = *work_data_bits(work); if (from_cancel && !WARN_ON_ONCE(data & WORK_STRUCT_PWQ) && (data & WORK_OFFQ_BH)) { While the read data was never used if !@from_cancel, this could trigger KCSAN data race detection spuriously: ================================================================== BUG: KCSAN: data-race in __flush_work / __flush_work write to 0xffff8881223aa3e8 of 8 bytes by task 3998 on cpu 0: instrument_write include/linux/instrumented.h:41 [inline] ___set_bit include/asm-generic/bitops/instrumented-non-atomic.h:28 [inline] insert_wq_barrier kernel/workqueue.c:3790 [inline] start_flush_work kernel/workqueue.c:4142 [inline] __flush_work+0x30b/0x570 kernel/workqueue.c:4178 flush_work kernel/workqueue.c:4229 [inline] ... read to 0xffff8881223aa3e8 of 8 bytes by task 50 on cpu 1: __flush_work+0x42a/0x570 kernel/workqueue.c:4188 flush_work kernel/workqueue.c:4229 [inline] flush_delayed_work+0x66/0x70 kernel/workqueue.c:4251 ... value changed: 0x0000000000400000 -> 0xffff88810006c00d Reorganize the code so that @from_cancel is tested before @work->data is accessed. The only problem is triggering KCSAN detection spuriously. This shouldn't need READ_ONCE() or other access qualifiers. No functional changes. Signed-off-by: Tejun Heo Reported-by: syzbot+b3e4f2f51ed645fd5df2@syzkaller.appspotmail.com Fixes: 134874e2eee9 ("workqueue: Allow cancel_work_sync() and disable_work() from atomic contexts on BH work items") Link: http://lkml.kernel.org/r/000000000000ae429e061eea2157@google.com Cc: Jens Axboe commit 98cc1730c89467fc26e2dc2ceb2a014f332daa97 Author: Lai Jiangshan Date: Thu Jul 25 09:04:37 2024 +0800 workqueue: Remove incorrect "WARN_ON_ONCE(!list_empty(&worker->entry));" from dying worker The commit 68f83057b913 ("workqueue: Reap workers via kthread_stop() and remove detach_completion") changes the procedure of destroying workers; the dying workers are kept in the cull_list in wake_dying_workers() with the pool lock held and removed from the cull_list by the newly added reap_dying_workers() without the pool lock. This can cause a warning if the dying worker is wokenup earlier than reaped as reported by Marc: 2024/07/23 18:01:21 [M83LP63]: [ 157.267727] ------------[ cut here ]------------ 2024/07/23 18:01:21 [M83LP63]: [ 157.267735] WARNING: CPU: 21 PID: 725 at kernel/workqueue.c:3340 worker_thread+0x54e/0x558 2024/07/23 18:01:21 [M83LP63]: [ 157.267746] Modules linked in: binfmt_misc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables sunrpc dm_service_time s390_trng vfio_ccw mdev vfio_iommu_type1 vfio sch_fq_codel 2024/07/23 18:01:21 [M83LP63]: loop dm_multipath configfs nfnetlink lcs ctcm fsm zfcp scsi_transport_fc ghash_s390 prng chacha_s390 libchacha aes_s390 des_s390 libdes sha3_512_s390 sha3_256_s390 sha512_s390 sha256_s390 sha1_s390 sha_common scm_block eadm_sch scsi_dh_rdac scsi_dh_emc scsi_dh_alua pkey zcrypt rng_core autofs4 2024/07/23 18:01:21 [M83LP63]: [ 157.267792] CPU: 21 PID: 725 Comm: kworker/dying Not tainted 6.10.0-rc2-00239-g68f83057b913 #95 2024/07/23 18:01:21 [M83LP63]: [ 157.267796] Hardware name: IBM 3906 M04 704 (LPAR) 2024/07/23 18:01:21 [M83LP63]: [ 157.267802] R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3 2024/07/23 18:01:21 [M83LP63]: [ 157.267797] Krnl PSW : 0704d00180000000 000003d600fcd9fa (worker_thread+0x552/0x558) 2024/07/23 18:01:21 [M83LP63]: [ 157.267806] Krnl GPRS: 6479696e6700776f 000002c901b62780 000003d602493ec8 000002c914954600 2024/07/23 18:01:21 [M83LP63]: [ 157.267809] 0000000000000000 0000000000000008 000002c901a85400 000002c90719e840 2024/07/23 18:01:21 [M83LP63]: [ 157.267811] 000002c90719e880 000002c901a85420 000002c91127adf0 000002c901a85400 2024/07/23 18:01:21 [M83LP63]: [ 157.267813] 000002c914954600 0000000000000000 000003d600fcd772 000003560452bd98 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] Krnl Code: 000003d600fcd9ec: c0e500674262 brasl %r14,000003d601cb5eb0 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] 000003d600fcd9f2: a7f4ffc8 brc 15,000003d600fcd982 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] #000003d600fcd9f6: af000000 mc 0,0 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] >000003d600fcd9fa: a7f4fec2 brc 15,000003d600fcd77e 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] 000003d600fcd9fe: 0707 bcr 0,%r7 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] 000003d600fcda00: c00400682e10 brcl 0,000003d601cd3620 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] 000003d600fcda06: eb7ff0500024 stmg %r7,%r15,80(%r15) 2024/07/23 18:01:21 [M83LP63]: [ 157.267822] 000003d600fcda0c: b90400ef lgr %r14,%r15 2024/07/23 18:01:21 [M83LP63]: [ 157.267853] Call Trace: 2024/07/23 18:01:21 [M83LP63]: [ 157.267855] [<000003d600fcd9fa>] worker_thread+0x552/0x558 2024/07/23 18:01:21 [M83LP63]: [ 157.267859] ([<000003d600fcd772>] worker_thread+0x2ca/0x558) 2024/07/23 18:01:21 [M83LP63]: [ 157.267862] [<000003d600fd6c80>] kthread+0x120/0x128 2024/07/23 18:01:21 [M83LP63]: [ 157.267865] [<000003d600f5305c>] __ret_from_fork+0x3c/0x58 2024/07/23 18:01:21 [M83LP63]: [ 157.267868] [<000003d601cc746a>] ret_from_fork+0xa/0x30 2024/07/23 18:01:21 [M83LP63]: [ 157.267873] Last Breaking-Event-Address: 2024/07/23 18:01:21 [M83LP63]: [ 157.267874] [<000003d600fcd778>] worker_thread+0x2d0/0x558 Since the procedure of destroying workers is changed, the WARN_ON_ONCE() becomes incorrect and should be removed. Cc: Marc Hartmayer Link: https://lore.kernel.org/lkml/87le1sjd2e.fsf@linux.ibm.com/ Reported-by: Marc Hartmayer Fixes: 68f83057b913 ("workqueue: Reap workers via kthread_stop() and remove detach_completion") Cc: stable@vger.kernel.org # v6.11+ Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 38f7e14519d39cf524ddc02d4caee9b337dad703 Author: Will Deacon Date: Tue Jul 30 12:44:31 2024 +0100 workqueue: Fix UBSAN 'subtraction overflow' error in shift_and_mask() UBSAN reports the following 'subtraction overflow' error when booting in a virtual machine on Android: | Internal error: UBSAN: integer subtraction overflow: 00000000f2005515 [#1] PREEMPT SMP | Modules linked in: | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.10.0-00006-g3cbe9e5abd46-dirty #4 | Hardware name: linux,dummy-virt (DT) | pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : cancel_delayed_work+0x34/0x44 | lr : cancel_delayed_work+0x2c/0x44 | sp : ffff80008002ba60 | x29: ffff80008002ba60 x28: 0000000000000000 x27: 0000000000000000 | x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 | x23: 0000000000000000 x22: 0000000000000000 x21: ffff1f65014cd3c0 | x20: ffffc0e84c9d0da0 x19: ffffc0e84cab3558 x18: ffff800080009058 | x17: 00000000247ee1f8 x16: 00000000247ee1f8 x15: 00000000bdcb279d | x14: 0000000000000001 x13: 0000000000000075 x12: 00000a0000000000 | x11: ffff1f6501499018 x10: 00984901651fffff x9 : ffff5e7cc35af000 | x8 : 0000000000000001 x7 : 3d4d455453595342 x6 : 000000004e514553 | x5 : ffff1f6501499265 x4 : ffff1f650ff60b10 x3 : 0000000000000620 | x2 : ffff80008002ba78 x1 : 0000000000000000 x0 : 0000000000000000 | Call trace: | cancel_delayed_work+0x34/0x44 | deferred_probe_extend_timeout+0x20/0x70 | driver_register+0xa8/0x110 | __platform_driver_register+0x28/0x3c | syscon_init+0x24/0x38 | do_one_initcall+0xe4/0x338 | do_initcall_level+0xac/0x178 | do_initcalls+0x5c/0xa0 | do_basic_setup+0x20/0x30 | kernel_init_freeable+0x8c/0xf8 | kernel_init+0x28/0x1b4 | ret_from_fork+0x10/0x20 | Code: f9000fbf 97fffa2f 39400268 37100048 (d42aa2a0) | ---[ end trace 0000000000000000 ]--- | Kernel panic - not syncing: UBSAN: integer subtraction overflow: Fatal exception This is due to shift_and_mask() using a signed immediate to construct the mask and being called with a shift of 31 (WORK_OFFQ_POOL_SHIFT) so that it ends up decrementing from INT_MIN. Use an unsigned constant '1U' to generate the mask in shift_and_mask(). Cc: Tejun Heo Cc: Lai Jiangshan Fixes: 1211f3b21c2a ("workqueue: Preserve OFFQ bits in cancel[_sync] paths") Signed-off-by: Will Deacon Signed-off-by: Tejun Heo commit 44732f1dad20457d64c525549cd63dcef2563c23 Author: Nikita Shubin Date: Fri Jul 19 17:30:16 2024 +0300 workqueue: doc: Fix function name, remove markers - s/alloc_ordered_queue()/alloc_ordered_workqueue()/ - remove markers to convert it into a link. Signed-off-by: Nikita Shubin Signed-off-by: Tejun Heo commit 92c4ee25208d0f35dafc3213cdf355fbe449e078 Author: Nikolay Aleksandrov Date: Fri Aug 2 11:07:30 2024 +0300 net: bridge: mcast: wait for previous gc cycles when removing port syzbot hit a use-after-free[1] which is caused because the bridge doesn't make sure that all previous garbage has been collected when removing a port. What happens is: CPU 1 CPU 2 start gc cycle remove port acquire gc lock first wait for lock call br_multicasg_gc() directly acquire lock now but free port the port can be freed while grp timers still running Make sure all previous gc cycles have finished by using flush_work before freeing the port. [1] BUG: KASAN: slab-use-after-free in br_multicast_port_group_expired+0x4c0/0x550 net/bridge/br_multicast.c:861 Read of size 8 at addr ffff888071d6d000 by task syz.5.1232/9699 CPU: 1 PID: 9699 Comm: syz.5.1232 Not tainted 6.10.0-rc5-syzkaller-00021-g24ca36a562d6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 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 br_multicast_port_group_expired+0x4c0/0x550 net/bridge/br_multicast.c:861 call_timer_fn+0x1a3/0x610 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x74b/0xaf0 kernel/time/timer.c:2417 __run_timer_base kernel/time/timer.c:2428 [inline] __run_timer_base kernel/time/timer.c:2421 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2437 Reported-by: syzbot+263426984509be19c9a0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=263426984509be19c9a0 Fixes: e12cec65b554 ("net: bridge: mcast: destroy all entries via gc") Signed-off-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20240802080730.3206303-1-razor@blackwall.org Signed-off-by: Jakub Kicinski commit 9a2fa1472083580b6c66bdaf291f591e1170123a Author: Al Viro Date: Sat Aug 3 18:02:00 2024 -0400 fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE copy_fd_bitmaps(new, old, count) is expected to copy the first count/BITS_PER_LONG bits from old->full_fds_bits[] and fill the rest with zeroes. What it does is copying enough words (BITS_TO_LONGS(count/BITS_PER_LONG)), then memsets the rest. That works fine, *if* all bits past the cutoff point are clear. Otherwise we are risking garbage from the last word we'd copied. For most of the callers that is true - expand_fdtable() has count equal to old->max_fds, so there's no open descriptors past count, let alone fully occupied words in ->open_fds[], which is what bits in ->full_fds_bits[] correspond to. The other caller (dup_fd()) passes sane_fdtable_size(old_fdt, max_fds), which is the smallest multiple of BITS_PER_LONG that covers all opened descriptors below max_fds. In the common case (copying on fork()) max_fds is ~0U, so all opened descriptors will be below it and we are fine, by the same reasons why the call in expand_fdtable() is safe. Unfortunately, there is a case where max_fds is less than that and where we might, indeed, end up with junk in ->full_fds_bits[] - close_range(from, to, CLOSE_RANGE_UNSHARE) with * descriptor table being currently shared * 'to' being above the current capacity of descriptor table * 'from' being just under some chunk of opened descriptors. In that case we end up with observably wrong behaviour - e.g. spawn a child with CLONE_FILES, get all descriptors in range 0..127 open, then close_range(64, ~0U, CLOSE_RANGE_UNSHARE) and watch dup(0) ending up with descriptor #128, despite #64 being observably not open. The minimally invasive fix would be to deal with that in dup_fd(). If this proves to add measurable overhead, we can go that way, but let's try to fix copy_fd_bitmaps() first. * new helper: bitmap_copy_and_expand(to, from, bits_to_copy, size). * make copy_fd_bitmaps() take the bitmap size in words, rather than bits; it's 'count' argument is always a multiple of BITS_PER_LONG, so we are not losing any information, and that way we can use the same helper for all three bitmaps - compiler will see that count is a multiple of BITS_PER_LONG for the large ones, so it'll generate plain memcpy()+memset(). Reproducer added to tools/testing/selftests/core/close_range_test.c Cc: stable@vger.kernel.org Signed-off-by: Al Viro commit f32e90c0688a3d1f8079ac18ed39b752d22e92bd Author: Thorsten Blum Date: Tue Jul 23 18:53:31 2024 +0200 gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement Since the kernel currently requires GCC 5.1 as a minimum, remove the unnecessary GCC version >= 4.7 check. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240723165332.1947-1-thorsten.blum@toblux.com Signed-off-by: Kees Cook commit f91f7ac900e7342e0fd66093dfbf7cb8cb585a99 Author: Petr Pavlu Date: Wed Jul 17 15:00:23 2024 +0200 refcount: Report UAF for refcount_sub_and_test(0) when counter==0 When a reference counter is at zero and refcount_sub_and_test() is invoked to subtract zero, the function accepts this request without any warning and returns true. This behavior does not seem ideal because the counter being already at zero indicates a use-after-free. Furthermore, returning true by refcount_sub_and_test() in this case potentially results in a double-free done by its caller. Modify the underlying function __refcount_sub_and_test() to warn about this case as a use-after-free and have it return false to avoid the potential double-free. Signed-off-by: Petr Pavlu Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240717130023.5675-1-petr.pavlu@suse.com Signed-off-by: Kees Cook commit b446a2dae984fa5bd56dd7c3a02a426f87e05813 Merge: c813111d19e65 170c966cbe274 Author: Linus Torvalds Date: Mon Aug 5 14:31:12 2024 -0700 Merge tag 'linux_kselftest-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fix from Shuah Khan: "A single fix to the conditional in ksft.py script which incorrectly flags a test suite failed when there are skipped tests in the mix. The logic is fixed to take skipped tests into account and report the test as passed" * tag 'linux_kselftest-fixes-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: ksft: Fix finished() helper exit code on skipped tests commit d3a785e4f983f523380e023d8a05fb6d04402957 Author: Dmitry Baryshkov Date: Thu Jun 27 00:45:57 2024 +0300 drm/msm/dpu: take plane rotation into account for wide planes Take into account the plane rotation and flipping when calculating src positions for the wide plane parts. This is not an issue yet, because rotation is only supported for the UBWC planes and wide UBWC planes are rejected anyway because in parallel multirect case only the half of the usual width is supported for tiled formats. However it's better to fix this now rather than stumbling upon it later. Fixes: 80e8ae3b38ab ("drm/msm/dpu: add support for wide planes") Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/601059/ Link: https://lore.kernel.org/r/20240627-dpu-virtual-wide-v5-3-5efb90cbb8be@linaro.org Signed-off-by: Abhinav Kumar commit cb18195914e353ece0e789e365a5a16872169805 Author: Dmitry Baryshkov Date: Thu Jun 27 00:45:56 2024 +0300 drm/msm/dpu: relax YUV requirements YUV formats require only CSC to be enabled. Even decimated formats should not require scaler. Relax the requirement and don't check for the scaler block while checking if YUV format can be enabled. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/601049/ Link: https://lore.kernel.org/r/20240627-dpu-virtual-wide-v5-2-5efb90cbb8be@linaro.org Signed-off-by: Abhinav Kumar commit 2db13c4a631505029ada9404e09a2b06a268c1c4 Author: Dmitry Baryshkov Date: Thu Jun 27 00:45:55 2024 +0300 drm/msm/dpu: limit QCM2290 to RGB formats only The QCM2290 doesn't have CSC blocks, so it can not support YUV formats even on ViG blocks. Fix the formats declared by _VIG_SBLK_NOSCALE(). Fixes: 5334087ee743 ("drm/msm: add support for QCM2290 MDSS") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/601048/ Link: https://lore.kernel.org/r/20240627-dpu-virtual-wide-v5-1-5efb90cbb8be@linaro.org Signed-off-by: Abhinav Kumar commit bfa1a6283be390947d3649c482e5167186a37016 Author: Dmitry Baryshkov Date: Tue Jun 25 00:13:41 2024 +0300 drm/msm/dpu: cleanup FB if dpu_format_populate_layout fails If the dpu_format_populate_layout() fails, then FB is prepared, but not cleaned up. This ends up leaking the pin_count on the GEM object and causes a splat during DRM file closure: msm_obj->pin_count WARNING: CPU: 2 PID: 569 at drivers/gpu/drm/msm/msm_gem.c:121 update_lru_locked+0xc4/0xcc [...] Call trace: update_lru_locked+0xc4/0xcc put_pages+0xac/0x100 msm_gem_free_object+0x138/0x180 drm_gem_object_free+0x1c/0x30 drm_gem_object_handle_put_unlocked+0x108/0x10c drm_gem_object_release_handle+0x58/0x70 idr_for_each+0x68/0xec drm_gem_release+0x28/0x40 drm_file_free+0x174/0x234 drm_release+0xb0/0x160 __fput+0xc0/0x2c8 __fput_sync+0x50/0x5c __arm64_sys_close+0x38/0x7c invoke_syscall+0x48/0x118 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x4c/0x120 el0t_64_sync_handler+0x100/0x12c el0t_64_sync+0x190/0x194 irq event stamp: 129818 hardirqs last enabled at (129817): [] console_unlock+0x118/0x124 hardirqs last disabled at (129818): [] el1_dbg+0x24/0x8c softirqs last enabled at (129808): [] handle_softirqs+0x4c8/0x4e8 softirqs last disabled at (129785): [] __do_softirq+0x14/0x20 Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/600714/ Link: https://lore.kernel.org/r/20240625-dpu-mode-config-width-v5-1-501d984d634f@linaro.org Signed-off-by: Abhinav Kumar commit 319aca883bfa1b85ee08411541b51b9a934ac858 Author: Abhinav Kumar Date: Thu Jul 25 15:04:50 2024 -0700 drm/msm/dp: reset the link phy params before link training Before re-starting link training reset the link phy params namely the pre-emphasis and voltage swing levels otherwise the next link training begins at the previously cached levels which can result in link training failures. Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # SM8350-HDK Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/605946/ Link: https://lore.kernel.org/r/20240725220450.131245-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar commit aedf02e46eb549dac8db4821a6b9f0c6bf6e3990 Author: Abhinav Kumar Date: Wed Jul 31 12:17:22 2024 -0700 drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable() For cases where the crtc's connectors_changed was set without enable/active getting toggled , there is an atomic_enable() call followed by an atomic_disable() but without an atomic_mode_set(). This results in a NULL ptr access for the dpu_encoder_get_drm_fmt() call in the atomic_enable() as the dpu_encoder's connector was cleared in the atomic_disable() but not re-assigned as there was no atomic_mode_set() call. Fix the NULL ptr access by moving the assignment for atomic_enable() and also use drm_atomic_get_new_connector_for_encoder() to get the connector from the atomic_state. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Dmitry Baryshkov Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/59 Suggested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # SM8350-HDK Patchwork: https://patchwork.freedesktop.org/patch/606729/ Link: https://lore.kernel.org/r/20240731191723.3050932-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar commit ff0ce721ec213499ec5a532041fb3a1db2dc5ecb Author: Waiman Long Date: Sun Aug 4 21:30:17 2024 -0400 cgroup/cpuset: Eliminate unncessary sched domains rebuilds in hotplug It was found that some hotplug operations may cause multiple rebuild_sched_domains_locked() calls. Some of those intermediate calls may use cpuset states not in the final correct form leading to incorrect sched domain setting. Fix this problem by using the existing force_rebuild flag to inhibit immediate rebuild_sched_domains_locked() calls if set and only doing one final call at the end. Also renaming the force_rebuild flag to force_sd_rebuild to make its meaning for clear. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 311a1bdc44a8e06024df4fd3392be0dfc8298655 Author: Waiman Long Date: Sun Aug 4 21:30:16 2024 -0400 cgroup/cpuset: Clear effective_xcpus on cpus_allowed clearing only if cpus.exclusive not set Commit e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2") adds a user writable cpuset.cpus.exclusive file for setting exclusive CPUs to be used for the creation of partitions. Since then effective_xcpus depends on both the cpuset.cpus and cpuset.cpus.exclusive setting. If cpuset.cpus.exclusive is set, effective_xcpus will depend only on cpuset.cpus.exclusive. When it is not set, effective_xcpus will be set according to the cpuset.cpus value when the cpuset becomes a valid partition root. When cpuset.cpus is being cleared by the user, effective_xcpus should only be cleared when cpuset.cpus.exclusive is not set. However, that is not currently the case. # cd /sys/fs/cgroup/ # mkdir test # echo +cpuset > cgroup.subtree_control # cd test # echo 3 > cpuset.cpus.exclusive # cat cpuset.cpus.exclusive.effective 3 # echo > cpuset.cpus # cat cpuset.cpus.exclusive.effective // was cleared Fix it by clearing effective_xcpus only if cpuset.cpus.exclusive is not set. Fixes: e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2") Cc: stable@vger.kernel.org # v6.7+ Reported-by: Chen Ridong Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 959ab6350add903e352890af53e86663739fcb9a Author: Chen Ridong Date: Sun Aug 4 21:30:15 2024 -0400 cgroup/cpuset: fix panic caused by partcmd_update We find a bug as below: BUG: unable to handle page fault for address: 00000003 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 3 PID: 358 Comm: bash Tainted: G W I 6.6.0-10893-g60d6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/4 RIP: 0010:partition_sched_domains_locked+0x483/0x600 Code: 01 48 85 d2 74 0d 48 83 05 29 3f f8 03 01 f3 48 0f bc c2 89 c0 48 9 RSP: 0018:ffffc90000fdbc58 EFLAGS: 00000202 RAX: 0000000100000003 RBX: ffff888100b3dfa0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000002fe80 RBP: ffff888100b3dfb0 R08: 0000000000000001 R09: 0000000000000000 R10: ffffc90000fdbcb0 R11: 0000000000000004 R12: 0000000000000002 R13: ffff888100a92b48 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f44a5425740(0000) GS:ffff888237d80000(0000) knlGS:0000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000100030973 CR3: 000000010722c000 CR4: 00000000000006e0 Call Trace: ? show_regs+0x8c/0xa0 ? __die_body+0x23/0xa0 ? __die+0x3a/0x50 ? page_fault_oops+0x1d2/0x5c0 ? partition_sched_domains_locked+0x483/0x600 ? search_module_extables+0x2a/0xb0 ? search_exception_tables+0x67/0x90 ? kernelmode_fixup_or_oops+0x144/0x1b0 ? __bad_area_nosemaphore+0x211/0x360 ? up_read+0x3b/0x50 ? bad_area_nosemaphore+0x1a/0x30 ? exc_page_fault+0x890/0xd90 ? __lock_acquire.constprop.0+0x24f/0x8d0 ? __lock_acquire.constprop.0+0x24f/0x8d0 ? asm_exc_page_fault+0x26/0x30 ? partition_sched_domains_locked+0x483/0x600 ? partition_sched_domains_locked+0xf0/0x600 rebuild_sched_domains_locked+0x806/0xdc0 update_partition_sd_lb+0x118/0x130 cpuset_write_resmask+0xffc/0x1420 cgroup_file_write+0xb2/0x290 kernfs_fop_write_iter+0x194/0x290 new_sync_write+0xeb/0x160 vfs_write+0x16f/0x1d0 ksys_write+0x81/0x180 __x64_sys_write+0x21/0x30 x64_sys_call+0x2f25/0x4630 do_syscall_64+0x44/0xb0 entry_SYSCALL_64_after_hwframe+0x78/0xe2 RIP: 0033:0x7f44a553c887 It can be reproduced with cammands: cd /sys/fs/cgroup/ mkdir test cd test/ echo +cpuset > ../cgroup.subtree_control echo root > cpuset.cpus.partition cat /sys/fs/cgroup/cpuset.cpus.effective 0-3 echo 0-3 > cpuset.cpus // taking away all cpus from root This issue is caused by the incorrect rebuilding of scheduling domains. In this scenario, test/cpuset.cpus.partition should be an invalid root and should not trigger the rebuilding of scheduling domains. When calling update_parent_effective_cpumask with partcmd_update, if newmask is not null, it should recheck newmask whether there are cpus is available for parect/cs that has tasks. Fixes: 0c7f293efc87 ("cgroup/cpuset: Add cpuset.cpus.exclusive.effective for v2") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Chen Ridong Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit d19d5b8d8f6dab942ce5ddbcf34bf7275e778250 Author: Abhinav Kumar Date: Mon Aug 5 13:20:08 2024 -0700 drm/msm/dp: fix the max supported bpp logic Fix the dp_panel_get_supported_bpp() API to return the minimum supported bpp correctly for relevant cases and use this API to correct the behavior of DP driver which hard-codes the max supported bpp to 30. This is incorrect because the number of lanes and max data rate supported by the lanes need to be taken into account. Replace the hardcoded limit with the appropriate math which accounts for the accurate number of lanes and max data rate. changes in v2: - Fix the dp_panel_get_supported_bpp() and use it - Drop the max_t usage as dp_panel_get_supported_bpp() already returns the min_bpp correctly now changes in v3: - replace min_t with just min as all params are u32 Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Reported-by: Dmitry Baryshkov Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/43 Tested-by: Dmitry Baryshkov # SM8350-HDK Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/607073/ Link: https://lore.kernel.org/r/20240805202009.1120981-1-quic_abhinavk@quicinc.com Signed-off-by: Stephen Boyd Signed-off-by: Abhinav Kumar commit df24373435f5899a2a98b7d377479c8d4376613b Author: Dmitry Baryshkov Date: Fri Aug 2 22:47:34 2024 +0300 drm/msm/dpu: don't play tricks with debug macros DPU debugging macros need to be converted to a proper drm_debug_* macros, however this is a going an intrusive patch, not suitable for a fix. Wire DPU_DEBUG and DPU_DEBUG_DRIVER to always use DRM_DEBUG_DRIVER to make sure that DPU debugging messages always end up in the drm debug messages and are controlled via the usual drm.debug mask. I don't think that it is a good idea for a generic DPU_DEBUG macro to be tied to DRM_UT_KMS. It is used to report a debug message from driver, so by default it should go to the DRM_UT_DRIVER channel. While refactoring debug macros later on we might end up with particular messages going to ATOMIC or KMS, but DRIVER should be the default. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/606932/ Link: https://lore.kernel.org/r/20240802-dpu-fix-wb-v2-2-7eac9eb8e895@linaro.org Signed-off-by: Abhinav Kumar commit 26fef9d0bbeba6bf5d18386bd20aff2c83caa0ed Author: Arnd Bergmann Date: Mon Aug 5 22:35:43 2024 +0200 syscalls: fix fstat() entry again The previous patch to fix the newfstatat() syscall entry ended up breaking fstat() instead. Unfortunately these two are not handled the same way, so I messed this one up the exact opposite way. Fixes: 343416f0c11c ("syscalls: fix syscall macros for newfstat/newfstatat") Signed-off-by: Arnd Bergmann commit 7fef1eb0b013eaa42019a95a08f71368e5a22dba Author: Takahiro Itazuri Date: Tue Jun 6 16:46:28 2023 +0100 docs: KVM: Fix register ID of SPSR_FIQ Fixes the register ID of SPSR_FIQ. SPSR_FIQ is a 64-bit register and the 64-bit register size mask is 0x0030000000000000ULL. Fixes: fd3bc912d3d1 ("KVM: Documentation: Document arm64 core registers in detail") Signed-off-by: Takahiro Itazuri Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20230606154628.95498-1-itazur@amazon.com Signed-off-by: Oliver Upton commit 04c90681144c40619524367c69e40736a6fa690c Author: Jared McArthur Date: Thu Aug 1 16:04:14 2024 -0500 arm64: dts: ti: k3-j722s: Fix gpio-range for main_pmx0 Commit 5e5c50964e2e ("arm64: dts: ti: k3-j722s: Add gpio-ranges properties") introduced pinmux range definition for gpio-ranges, however missed a hole within gpio-range for main_pmx0. As a result, automatic mapping of GPIO to pin control for gpios within the main_pmx0 domain is broken. Fix this by correcting the gpio-range. Fixes: 5e5c50964e2e ("arm64: dts: ti: k3-j722s: Add gpio-ranges properties") Signed-off-by: Jared McArthur Link: https://lore.kernel.org/r/20240801210414.715306-4-j-mcarthur@ti.com Signed-off-by: Nishanth Menon commit 98897a300859dca62f834a5d1f60267032a9fe54 Author: Jared McArthur Date: Thu Aug 1 16:04:13 2024 -0500 arm64: dts: ti: k3-am62p: Fix gpio-range for main_pmx0 Commit d72d73a44c3c ("arm64: dts: ti: k3-am62p: Add gpio-ranges properties") introduced pinmux range definition for gpio-ranges, however missed a hole within gpio-range for main_pmx0. As a result, automatic mapping of GPIO to pin control for gpios within the main_pmx0 domain is broken. Fix this by correcting the gpio-range. Fixes: d72d73a44c3c ("arm64: dts: ti: k3-am62p: Add gpio-ranges properties") Signed-off-by: Jared McArthur Link: https://lore.kernel.org/r/20240801210414.715306-3-j-mcarthur@ti.com Signed-off-by: Nishanth Menon commit 4e436f6fb95e507131df78c0d98052237db60ecc Author: Jared McArthur Date: Thu Aug 1 16:04:12 2024 -0500 arm64: dts: ti: k3-am62p: Add gpio-ranges for mcu_gpio0 Commit d72d73a44c3c ("arm64: dts: ti: k3-am62p: Add gpio-ranges properties") introduced pinmux range definition for gpio-ranges, however missed introducing the range description for the mcu_gpio node. As a result, automatic mapping of GPIO to pin control for mcu gpios is broken. Fix this by introducing the proper ranges. Fixes: d72d73a44c3c ("arm64: dts: ti: k3-am62p: Add gpio-ranges properties") Signed-off-by: Jared McArthur Link: https://lore.kernel.org/r/20240801210414.715306-2-j-mcarthur@ti.com Signed-off-by: Nishanth Menon commit 5062d9c0cbbc202e495e9b20f147f64ef5cc2897 Author: Sicelo A. Mhlongo Date: Mon Jul 22 13:31:11 2024 +0200 ARM: dts: omap3-n900: correct the accelerometer orientation Negate the values reported for the accelerometer z-axis in order to match Documentation/devicetree/bindings/iio/mount-matrix.txt. Fixes: 14a213dcb004 ("ARM: dts: n900: use iio driver for accelerometer") Signed-off-by: Sicelo A. Mhlongo Reviewed-By: Andreas Kemnade Link: https://lore.kernel.org/r/20240722113137.3240847-1-absicsz@gmail.com Signed-off-by: Kevin Hilman commit e42066df07c0fcedebb32ed56f8bc39b4bf86337 Author: Richard Fitzgerald Date: Mon Aug 5 15:08:39 2024 +0100 ASoC: cs35l56: Handle OTP read latency over SoundWire Use the late-read buffer in the CS35L56 SoundWire interface to read OTP memory. The OTP memory has a longer access latency than chip registers and cannot guarantee to return the data value in the SoundWire control response if the bus clock is >4.8 MHz. The Cirrus SoundWire peripheral IP exposes the bridge-to-bus read buffer and status bits. For a read from OTP the bridge status bits are polled to wait for the OTP data to be loaded into the read buffer and the data is then read from there. Signed-off-by: Richard Fitzgerald Fixes: e1830f66f6c6 ("ASoC: cs35l56: Add helper functions for amp calibration") Link: https://patch.msgid.link/20240805140839.26042-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 9a1af1e218779724ff29ca75f2b9397dc3ed11e7 Author: Johan Hovold Date: Mon Jul 29 15:13:51 2024 +0200 ASoC: codecs: lpass-macro: fix missing codec version Recent changes that started checking the codec version broke audio on the Lenovo ThinkPad X13s: wsa_macro 3240000.codec: Unsupported Codec version (0) wsa_macro 3240000.codec: probe with driver wsa_macro failed with error -22 rx_macro 3200000.rxmacro: Unsupported Codec version (0) rx_macro 3200000.rxmacro: probe with driver rx_macro failed with error -22 Add the missing codec version to the lookup table so that the codec drivers probe successfully. Note that I'm just assuming that this is a 2.0 codec based on the fact that this device uses the older register layout. Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version") Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240729131351.27886-1-johan+linaro@kernel.org Signed-off-by: Mark Brown commit b53b831919a0dc4e6631ebe0497ab2a4d8bef014 Author: Kees Cook Date: Tue Jul 16 14:38:33 2024 -0700 dmaengine: stm32-dma3: Set lli_size after allocation With the new __counted_by annotation, the "lli_size" variable needs to valid for accesses to the "lli" array. This requirement is not met in stm32_dma3_chan_desc_alloc(), since "lli_size" starts at "0", so "lli" index "0" will not be considered valid during the initialization for loop. Fix this by setting lli_size immediately after allocation (similar to how this is handled in stm32_mdma_alloc_desc() for the node/count relationship). Fixes: f561ec8b2b33 ("dmaengine: Add STM32 DMA3 support") Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20240716213830.work.951-kees@kernel.org Signed-off-by: Vinod Koul commit 5e5c793c7fc47219998465361d94510fdf55d83f Author: Kees Cook Date: Tue Jul 16 14:57:06 2024 -0700 dmaengine: ti: omap-dma: Initialize sglen after allocation With the new __counted_by annocation, the "sglen" struct member must be set before accessing the "sg" array. This initialization was done in other places where a new struct omap_desc is allocated, but these cases were missed. Set "sglen" after allocation. Fixes: b85178611c11 ("dmaengine: ti: omap-dma: Annotate struct omap_desc with __counted_by") Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20240716215702.work.802-kees@kernel.org Signed-off-by: Vinod Koul commit 2ebc36b9581df31eed271e5de61fc8a8b66dbc56 Author: Serge Semin Date: Fri Aug 2 10:50:51 2024 +0300 dmaengine: dw: Unify ret-val local variables naming Currently there are two names utilized in the driver to keep the functions call status: ret and err. For the sake of unification convert to using the first version only. Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240802075100.6475-7-fancer.lancer@gmail.com Signed-off-by: Vinod Koul commit d8fa0802f63502c0409d02c6b701d51841a6f1bd Author: Serge Semin Date: Fri Aug 2 10:50:50 2024 +0300 dmaengine: dw: Simplify max-burst calculation procedure In order to have a more coherent DW AHB DMA slave configuration method - dwc_config() - let's simplify the source and destination channel max-burst calculation procedure: 1. Create the max-burst verification method as it has been just done for the memory and peripheral address widths. Thus the dwc_config() method will turn to a set of the verification methods execution. 2. Since both the generic DW AHB DMA and Intel iDMA 32-bit engines support the power-of-2 bursts only, then the specified by the client driver max-burst values can be converted to being power-of-2 right in the max-burst verification method. 3. Since max-burst encoded value is required on the CTL_LO fields calculation stage, the encode_maxburst() callback can be easily dropped from the dw_dma structure meanwhile the encoding procedure will be executed right in the CTL_LO register value calculation. Thus the update will provide the next positive effects: the internal DMA-slave config structure will contain only the real DMA-transfer config values, which will be encoded to the DMA-controller register fields only when it's required on the buffer mapping; the redundant encode_maxburst() callback will be dropped simplifying the internal HW-abstraction API; dwc_config() will look more readable executing the verification functions one-by-one. Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240802075100.6475-6-fancer.lancer@gmail.com Signed-off-by: Vinod Koul commit 3acb301d33749a8974e61ecda16a5f5441fc9628 Author: Serge Semin Date: Fri Aug 2 10:50:49 2024 +0300 dmaengine: dw: Define encode_maxburst() above prepare_ctllo() callbacks As a preparatory change before dropping the encode_maxburst() callbacks let's move dw_dma_encode_maxburst() and idma32_encode_maxburst() to being defined above the dw_dma_prepare_ctllo() and idma32_prepare_ctllo() methods respectively. That's required since the former methods will be called from the later ones directly. Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240802075100.6475-5-fancer.lancer@gmail.com Signed-off-by: Vinod Koul commit 1fd6fe89055e6dbb4be8f16b8dcab8602e3603d6 Author: Serge Semin Date: Fri Aug 2 10:50:48 2024 +0300 dmaengine: dw: Simplify prepare CTL_LO methods Currently the CTL LO fields are calculated on the platform-specific basis. It's implemented by means of the prepare_ctllo() callbacks using the ternary operator within the local variables init block at the beginning of the block scope. The functions code currently is relatively hard to comprehend and isn't that optimal since implies four conditional statements executed and two additional local variables defined. Let's simplify the DW AHB DMA prepare_ctllo() method by unrolling the ternary operators into the normal if-else statement, dropping redundant master-interface ID variables and initializing the local variables based on the singly evaluated DMA-transfer direction check. Thus the method will look much more readable since now the fields content can be easily inferred right from the if-else branch. Provide the same update in the Intel DMA32 core driver for the sake of the driver code unification. Note besides of the effects described above this update is basically a preparation before dropping the max burst encoding callback. The dropping will require to call the burst fields calculation methods right in the prepare_ctllo() callbacks. It would have made the later functions code even more complex should they were left in the original state. Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240802075100.6475-4-fancer.lancer@gmail.com Signed-off-by: Vinod Koul commit d04b21bfa1c50a2ade4816cab6fdc91827b346b1 Author: Serge Semin Date: Fri Aug 2 10:50:47 2024 +0300 dmaengine: dw: Add memory bus width verification Currently in case of the DEV_TO_MEM or MEM_TO_DEV DMA transfers the memory data width (single transfer width) is determined based on the buffer length, buffer base address or DMA master-channel max address width capability. It isn't enough in case of the channel disabling prior the block transfer is finished. Here is what DW AHB DMA IP-core databook says regarding the port suspension (DMA-transfer pause) implementation in the controller: "When CTLx.SRC_TR_WIDTH < CTLx.DST_TR_WIDTH and the CFGx.CH_SUSP bit is high, the CFGx.FIFO_EMPTY is asserted once the contents of the FIFO do not permit a single word of CTLx.DST_TR_WIDTH to be formed. However, there may still be data in the channel FIFO, but not enough to form a single transfer of CTLx.DST_TR_WIDTH. In this scenario, once the channel is disabled, the remaining data in the channel FIFO is not transferred to the destination peripheral." So in case if the port gets to be suspended and then disabled it's possible to have the data silently discarded even though the controller reported that FIFO is empty and the CTLx.BLOCK_TS indicated the dropped data already received from the source device. This looks as if the data somehow got lost on a way from the peripheral device to memory and causes problems for instance in the DW APB UART driver, which pauses and disables the DMA-transfer as soon as the recv data timeout happens. Here is the way it looks: Memory <------- DMA FIFO <------ UART FIFO <---------------- UART DST_TR_WIDTH -+--------| | | | | | | No more data Current lvl -+--------| |---------+- DMA-burst lvl | | |---------+- Leftover data | | |---------+- SRC_TR_WIDTH -+--------+-------+---------+ In the example above: no more data is getting received over the UART port and BLOCK_TS is not even close to be fully received; some data is left in the UART FIFO, but not enough to perform a bursted DMA-xfer to the DMA FIFO; some data is left in the DMA FIFO, but not enough to be passed further to the system memory in a single transfer. In this situation the 8250 UART driver catches the recv timeout interrupt, pauses the DMA-transfer and terminates it completely, after which the IRQ handler manually fetches the leftover data from the UART FIFO into the recv-buffer. But since the DMA-channel has been disabled with the data left in the DMA FIFO, that data will be just discarded and the recv-buffer will have a gap of the "current lvl" size in the recv-buffer at the tail of the lately received data portion. So the data will be lost just due to the misconfigured DMA transfer. Note this is only relevant for the case of the transfer suspension and _disabling_. No problem will happen if the transfer will be re-enabled afterwards or the block transfer is fully completed. In the later case the "FIFO flush mode" will be executed at the transfer final stage in order to push out the data left in the DMA FIFO. In order to fix the denoted problem the DW AHB DMA-engine driver needs to make sure that the _bursted_ source transfer width is greater or equal to the single destination transfer (note the HW databook describes more strict constraint than actually required). Since the peripheral-device side is prescribed by the client driver logic, the memory-side can be only used for that. The solution can be easily implemented for the DEV_TO_MEM transfers just by adjusting the memory-channel address width. Sadly it's not that easy for the MEM_TO_DEV transfers since the mem-to-dma burst size is normally dynamically determined by the controller. So the only thing that can be done is to make sure that memory-side address width is greater than the peripheral device address width. Fixes: a09820043c9e ("dw_dmac: autoconfigure data_width or get it via platform data") Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240802075100.6475-3-fancer.lancer@gmail.com Signed-off-by: Vinod Koul commit b336268dde75cb09bd795cb24893d52152a9191f Author: Serge Semin Date: Fri Aug 2 10:50:46 2024 +0300 dmaengine: dw: Add peripheral bus width verification Currently the src_addr_width and dst_addr_width fields of the dma_slave_config structure are mapped to the CTLx.SRC_TR_WIDTH and CTLx.DST_TR_WIDTH fields of the peripheral bus side in order to have the properly aligned data passed to the target device. It's done just by converting the passed peripheral bus width to the encoded value using the __ffs() function. This implementation has several problematic sides: 1. __ffs() is undefined if no bit exist in the passed value. Thus if the specified addr-width is DMA_SLAVE_BUSWIDTH_UNDEFINED, __ffs() may return unexpected value depending on the platform-specific implementation. 2. DW AHB DMA-engine permits having the power-of-2 transfer width limited by the DMAH_Mk_HDATA_WIDTH IP-core synthesize parameter. Specifying bus-width out of that constraints scope will definitely cause unexpected result since the destination reg will be only partly touched than the client driver implied. Let's fix all of that by adding the peripheral bus width verification method and calling it in dwc_config() which is supposed to be executed before preparing any transfer. The new method will make sure that the passed source or destination address width is valid and if undefined then the driver will just fallback to the 1-byte width transfer. Fixes: 029a40e97d0d ("dmaengine: dw: provide DMA capabilities") Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240802075100.6475-2-fancer.lancer@gmail.com Signed-off-by: Vinod Koul commit b93d16bee557302d4e588375ececd833cc048acc Author: Gaosheng Cui Date: Sat Aug 3 14:10:41 2024 +0800 i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runtime_resume Add the missing clk_disable_unprepare() before return in geni_i2c_runtime_resume(). Fixes: 14d02fbadb5d ("i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant") Signed-off-by: Gaosheng Cui Reviewed-by: Vladimir Zapolskiy Signed-off-by: Andi Shyti commit c813111d19e65b6336a6352eae9c1ff5c40f722f Merge: de9c2c66ad8e7 a371d558e6f3a Author: Linus Torvalds Date: Mon Aug 5 09:23:00 2024 -0700 Merge tag 'slab-fixes-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fix from Vlastimil Babka: "Since v6.8 we've had a subtle breakage in SLUB with KFENCE enabled, that can cause a crash. It hasn't been found earlier due to quite specific conditions necessary (OOM during kmem_cache_alloc_bulk())" * tag 'slab-fixes-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm, slub: do not call do_slab_free for kfence object commit 5af9b304bc6010723c02f74de0bfd24ff19b1a10 Author: Piyush Mehta Date: Mon Aug 5 11:29:07 2024 +0530 phy: xilinx: phy-zynqmp: Fix SGMII linkup failure on resume On a few Kria KR260 Robotics Starter Kit the PS-GEM SGMII linkup is not happening after the resume. This is because serdes registers are reset when FPD is off (in suspend state) and needs to be reprogrammed in the resume path with the same default initialization as done in the first stage bootloader psu_init routine. To address the failure introduce a set of serdes registers to be saved in the suspend path and then restore it on resume. Fixes: 4a33bea00314 ("phy: zynqmp: Add PHY driver for the Xilinx ZynqMP Gigabit Transceiver") Signed-off-by: Piyush Mehta Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1722837547-2578381-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Vinod Koul commit 1fb0847392e220890c9cf8908e3ab8e7e1227ff6 Author: Cristian Ciocaltea Date: Thu Jul 11 14:26:55 2024 +0300 drm/bridge-connector: Fix double free in error handling paths The recent switch to drmm allocation in drm_bridge_connector_init() may cause double free on bridge_connector in some of the error handling paths. Drop the explicit kfree() calls on bridge_connector. Fixes: c12907be57b1 ("drm/bridge-connector: switch to using drmm allocations") Signed-off-by: Cristian Ciocaltea Signed-off-by: default avatarRobert Foss Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240711-bridge-connector-fix-dbl-free-v1-1-d558b2d0eb93@collabora.com commit 5916be8a53de6401871bdd953f6c60237b47d6d3 Author: Thomas Gleixner Date: Sat Aug 3 17:07:51 2024 +0200 timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() The addition of the bases argument to clock_was_set() fixed up all call sites correctly except for do_adjtimex(). This uses CLOCK_REALTIME instead of CLOCK_SET_WALL as argument. CLOCK_REALTIME is 0. As a result the effect of that clock_was_set() notification is incomplete and might result in timers expiring late because the hrtimer code does not re-evaluate the affected clock bases. Use CLOCK_SET_WALL instead of CLOCK_REALTIME to tell the hrtimers code which clock bases need to be re-evaluated. Fixes: 17a1b8826b45 ("hrtimer: Add bases argument to clock_was_set()") Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/877ccx7igo.ffs@tglx commit 06c03c8edce333b9ad9c6b207d93d3a5ae7c10c0 Author: Justin Stitt Date: Fri May 17 00:47:10 2024 +0000 ntp: Safeguard against time_constant overflow Using syzkaller with the recently reintroduced signed integer overflow sanitizer produces this UBSAN report: UBSAN: signed-integer-overflow in ../kernel/time/ntp.c:738:18 9223372036854775806 + 4 cannot be represented in type 'long' Call Trace: handle_overflow+0x171/0x1b0 __do_adjtimex+0x1236/0x1440 do_adjtimex+0x2be/0x740 The user supplied time_constant value is incremented by four and then clamped to the operating range. Before commit eea83d896e31 ("ntp: NTP4 user space bits update") the user supplied value was sanity checked to be in the operating range. That change removed the sanity check and relied on clamping after incrementing which does not work correctly when the user supplied value is in the overflow zone of the '+ 4' operation. The operation requires CAP_SYS_TIME and the side effect of the overflow is NTP getting out of sync. Similar to the fixups for time_maxerror and time_esterror, clamp the user space supplied value to the operating range. [ tglx: Switch to clamping ] Fixes: eea83d896e31 ("ntp: NTP4 user space bits update") Signed-off-by: Justin Stitt Signed-off-by: Thomas Gleixner Cc: Miroslav Lichvar Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240517-b4-sio-ntp-c-v2-1-f3a80096f36f@google.com Closes: https://github.com/KSPP/linux/issues/352 commit 87d571d6fb77ec342a985afa8744bb9bb75b3622 Author: Justin Stitt Date: Fri May 17 20:22:44 2024 +0000 ntp: Clamp maxerror and esterror to operating range Using syzkaller alongside the newly reintroduced signed integer overflow sanitizer spits out this report: UBSAN: signed-integer-overflow in ../kernel/time/ntp.c:461:16 9223372036854775807 + 500 cannot be represented in type 'long' Call Trace: handle_overflow+0x171/0x1b0 second_overflow+0x2d6/0x500 accumulate_nsecs_to_secs+0x60/0x160 timekeeping_advance+0x1fe/0x890 update_wall_time+0x10/0x30 time_maxerror is unconditionally incremented and the result is checked against NTP_PHASE_LIMIT, but the increment itself can overflow, resulting in wrap-around to negative space. Before commit eea83d896e31 ("ntp: NTP4 user space bits update") the user supplied value was sanity checked to be in the operating range. That change removed the sanity check and relied on clamping in handle_overflow() which does not work correctly when the user supplied value is in the overflow zone of the '+ 500' operation. The operation requires CAP_SYS_TIME and the side effect of the overflow is NTP getting out of sync. Miroslav confirmed that the input value should be clamped to the operating range and the same applies to time_esterror. The latter is not used by the kernel, but the value still should be in the operating range as it was before the sanity check got removed. Clamp them to the operating range. [ tglx: Changed it to clamping and included time_esterror ] Fixes: eea83d896e31 ("ntp: NTP4 user space bits update") Signed-off-by: Justin Stitt Signed-off-by: Thomas Gleixner Cc: Miroslav Lichvar Link: https://lore.kernel.org/all/20240517-b4-sio-ntp-usec-v2-1-d539180f2b79@google.com Closes: https://github.com/KSPP/linux/issues/354 commit 9438f970296f9c3a6dd340ae0ad01d2f056c88e6 Author: Francesco Dolcini Date: Wed Jul 31 07:48:04 2024 +0200 arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regulator on This reverts commit 3935fbc87ddebea5439f3ab6a78b1e83e976bf88. CTRL_SLEEP_MOCI# is a signal that is defined for all the SoM implementing the Verdin family specification, this signal is supposed to control the power enable in the carrier board when the system is in deep sleep mode. However this is not possible with Texas Instruments AM62 SoC, IOs output buffer is disabled in deep sleep and IOs are in tri-state mode. Given that we cannot properly control this pin, force it to be always high to minimize potential issues. Fixes: 3935fbc87dde ("arm64: dts: ti: k3-am62-verdin-dahlia: support sleep-moci") Cc: Link: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1361669/am625-gpio-output-state-in-deep-sleep/5244802 Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20240731054804.6061-1-francesco@dolcini.it Signed-off-by: Nishanth Menon commit 042b8711a0beafb2c3b888bebe3c300ab4c817fa Author: AngeloGioacchino Del Regno Date: Thu Jul 18 10:24:10 2024 +0200 drm/mediatek: Set sensible cursor width/height values to fix crash Hardware-speaking, there is no feature-reduced cursor specific plane, so this driver reserves the last all Overlay plane as a Cursor plane, but sets the maximum cursor width/height to the maximum value that the full overlay plane can use. While this could be ok, it raises issues with common userspace using libdrm (especially Mutter, but other compositors too) which will crash upon performing allocations and/or using said cursor plane. Reduce the maximum width/height for the cursor to 512x512 pixels, value taken from IGT's maximum cursor size test, which succeeds. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao Tested-by: Fei Shao Reviewed-by: Daniel Stone Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20240718082410.204459-1-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 15b7a03205b31bc5623378c190d22b7ff60026f1 Author: Takashi Iwai Date: Mon Aug 5 15:01:28 2024 +0200 ALSA: line6: Fix racy access to midibuf There can be concurrent accesses to line6 midibuf from both the URB completion callback and the rawmidi API access. This could be a cause of KMSAN warning triggered by syzkaller below (so put as reported-by here). This patch protects the midibuf call of the former code path with a spinlock for avoiding the possible races. Reported-by: syzbot+78eccfb8b3c9a85fc6c5@syzkaller.appspotmail.com Closes: https://lore.kernel.org/00000000000000949c061df288c5@google.com Cc: Link: https://patch.msgid.link/20240805130129.10872-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit ce4a995884ecedb98ba00e2e0b8ce94cde2060ce Author: Arnd Bergmann Date: Fri Jul 19 11:59:31 2024 +0200 drm/omap: add CONFIG_MMU dependency Compile-testing with CONFIG_MMU disabled causes a link error in omapdrm: arm-linux-gnueabi-ld: drivers/gpu/drm/omapdrm/omap_gem.o: in function `omap_gem_fault_2d': omap_gem.c:(.text+0x36e): undefined reference to `vmf_insert_mixed' arm-linux-gnueabi-ld: drivers/gpu/drm/omapdrm/omap_gem.o: in function `omap_gem_fault': omap_gem.c:(.text+0x74a): undefined reference to `vmf_insert_mixed' Avoid this by adding a Kconfig dependency. Fixes: dc6fcaaba5a5 ("drm/omap: Allow build with COMPILE_TEST=y") Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240719095942.3841009-1-arnd@kernel.org commit dc268085e499666b9f4f0fcb4c5a94e1c0b193b3 Author: Richard Fitzgerald Date: Mon Aug 5 12:42:22 2024 +0100 ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL Call efi_rt_services_supported() to check that efi.get_variable exists before calling it. Signed-off-by: Richard Fitzgerald Fixes: 1cad8725f2b9 ("ASoC: cs-amp-lib: Add helpers for factory calibration data") Link: https://patch.msgid.link/20240805114222.15722-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 2c3640b82213cf2beb7c1cc3cfce2ecf5349b0de Author: Simon Trimmer Date: Mon Aug 5 10:27:21 2024 +0000 ASoC: cs35l56: Stop creating ALSA controls for firmware coefficients A number of laptops have gone to market with old firmware versions that export controls that have since been hidden, but we can't just install a newer firmware because the firmware for each product is customized and qualified by the OEM. The issue is that alsactl save and restore has no idea what controls are good to persist which can lead to misconfiguration. There is no reason that the UCM or user should need to interact with any of the ALSA controls for the firmware coefficients so they can be removed entirely. Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/20240805102721.30102-3-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 45b4acab4cac79503663f0a4be9eb3752db04d4b Author: Simon Trimmer Date: Mon Aug 5 10:27:20 2024 +0000 ASoC: wm_adsp: Add control_add callback and export wm_adsp_control_add() The callback allows codec drivers to affect how firmware coefficients are added as controls. For example a codec driver may selectively add controls by choosing to call wm_adsp_control_add() based on some filter logic. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/20240805102721.30102-2-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 50359c9c3cb3e55e840e3485f5ee37da5b2b16b6 Author: Alexander Stein Date: Wed Jul 17 10:03:33 2024 +0200 pmdomain: imx: scu-pd: Remove duplicated clocks These clocks are already added to the list. Remove the duplicates ones. Fixes: a67d780720ff ("genpd: imx: scu-pd: add more PDs") Signed-off-by: Alexander Stein Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240717080334.2210988-1-alexander.stein@ew.tq-group.com Signed-off-by: Ulf Hansson commit 7ab107544b777c3bd7feb9fe447367d8edd5b202 Author: Daniele Palmas Date: Thu Aug 1 15:55:12 2024 +0200 net: usb: qmi_wwan: fix memory leak for not ip packets Free the unused skb when not ip packets arrive. Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support") Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller commit 268762d0bbe778952ebda77a9ae8b8b3b584ae61 Merge: 14ab4792ee120 4ba8d97083707 Author: David S. Miller Date: Mon Aug 5 11:10:22 2024 +0100 Merge branch 'virtio-net-rq-coalescing' into main Heng Qi says: ==================== virtio-net: unbreak vq resizing if vq coalescing is not supported Currently, if the driver does not negotiate the vq coalescing feature but supports vq resize, the vq resize action, which could have been successfully executed, is interrupted due to the failure in configuring the vq coalescing parameters. This issue needs to be fixed. Changelog ========= v3->v4: - Add a comment for patch[2/2]. v2->v3: - Break out the feature check and the fix into separate patches. v1->v2: - Rephrase the subject. - Put the feature check inside the virtnet_send_{r,t}x_ctrl_coal_vq_cmd. ==================== Signed-off-by: David S. Miller commit 4ba8d97083707409822264fd1776aad7233f353e Author: Heng Qi Date: Thu Aug 1 21:23:38 2024 +0800 virtio-net: unbreak vq resizing when coalescing is not negotiated Don't break the resize action if the vq coalescing feature named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated. Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq resize") Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Eugenio Pé rez Acked-by: Jason Wang Signed-off-by: David S. Miller commit b50f2af9fbc5c00103ca8b72752b15310bd77762 Author: Heng Qi Date: Thu Aug 1 21:23:37 2024 +0800 virtio-net: check feature before configuring the vq coalescing command Virtio spec says: The driver MUST have negotiated the VIRTIO_NET_F_VQ_NOTF_COAL feature when issuing commands VIRTIO_NET_CTRL_NOTF_COAL_VQ_SET and VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET. So we add the feature negotiation check to virtnet_send_{r,t}x_ctrl_coal_vq_cmd as a basis for the next bugfix patch. Suggested-by: Michael S. Tsirkin Signed-off-by: Heng Qi Acked-by: Jason Wang Signed-off-by: David S. Miller commit 1b85bdb0fadb42f5ef75ddcd259fc1ef13ec04de Author: Dnyaneshwar Bhadane Date: Thu Aug 1 16:41:41 2024 +0530 drm/i915/display: correct dual pps handling for MTL_PCH+ On the PCH side the second PPS was introduced in ICP+.Add condition On MTL_PCH and greater platform also having the second PPS. Note that DG1/2 south block only has the single PPS, so need to exclude the fake DG1/2 PCHs Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11488 Fixes: 93cbc1accbce ("drm/i915/mtl: Add fake PCH for Meteor Lake") Cc: # v6.9+ Signed-off-by: Dnyaneshwar Bhadane Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240801111141.574854-1-dnyaneshwar.bhadane@intel.com (cherry picked from commit da1878b61c8d480c361ba6a39ce8a31c80b65826) Signed-off-by: Joonas Lahtinen commit 38055789d15155109b41602ad719d770af507030 Author: Baochen Qiang Date: Thu Aug 1 18:04:07 2024 +0300 wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850 In transmit path, it is likely that the iova is not aligned to PCIe TLP max payload size, which is 128 for WCN7850. Normally in such cases hardware is expected to split the packet into several parts in a manner such that they, other than the first one, have aligned iova. However due to hardware limitations, WCN7850 does not behave like that properly with some specific unaligned iova in transmit path. This easily results in target hang in a KPI transmit test: packet send/receive failure, WMI command send timeout etc. Also fatal error seen in PCIe level: ... Capabilities: ... ... DevSta: ... FatalErr+ ... ... ... Work around this by manually moving/reallocating payload buffer such that we can map it to a 128 bytes aligned iova. The moving requires sufficient head room or tail room in skb: for the former we can do ourselves a favor by asking some extra bytes when registering with mac80211, while for the latter we can do nothing. Moving/reallocating buffer consumes additional CPU cycles, but the good news is that an aligned iova increases PCIe efficiency. In my tests on some X86 platforms the KPI results are almost consistent. Since this is seen only with WCN7850, add a new hardware parameter to differentiate from others. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Cc: Tested-by: Mark Pearson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240715023814.20242-1-quic_bqiang@quicinc.com commit 203ed203fcc223d80737a7799f8244646363b739 Author: Krzysztof Kozlowski Date: Tue Jul 2 16:54:17 2024 +0200 arm64: dts: layerscape: fix thermal node names length Linux kernel expects thermal zone node names to be maximum of 19 characters (see THERMAL_NAME_LENGTH, including terminating NUL byte) and bindings/dtbs_check points that: fsl-ls2088a-rdb.dtb: thermal-zones: 'core-cluster1-thermal', 'core-cluster2-thermal', 'core-cluster3-thermal', 'core-cluster4-thermal' do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,10}-thermal$', 'pinctrl-[0-9]+' Name longer than 19 characters leads to driver probe errors when registering such thermal zone. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 312c04cee408a8448ec8b639fe7f0434017d7161 Author: Stefan Binding Date: Thu Aug 1 16:50:44 2024 +0100 ALSA: hda: cs35l41: Stop creating ALSA Controls for firmware coefficients When the CS35L41 loads its firmware, it has a number of controls to affect its behaviour. Currently, these controls are exposed as ALSA Controls. These controls were never intended to be exposed to users but the firmware doesn't mark them hidden, so make the driver ignore them. Any changes in the coefficients handled by these controls needs to be matched to the individual system by SSID, which is already handled using the tuning file, when firmware is loaded, so UCM should not be setting these controls anyway. Signed-off-by: Stefan Binding Link: https://patch.msgid.link/20240801155047.456540-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 34e1b1bb73244219b3b3e24911e56c6e7b2b679e Author: Simon Trimmer Date: Thu Aug 1 14:31:39 2024 +0000 ALSA: hda: cs35l56: Stop creating ALSA controls for firmware coefficients A number of laptops have gone to market with old firmware versions that export controls that have since been hidden, but we can't just install a newer firmware because the firmware for each product is customized and qualified by the OEM. The issue is that alsactl save and restore has no idea what controls are good to persist which can lead to misconfiguration. There is no reason that the UCM or user should need to interact with any of the ALSA controls for the firmware coefficients so they can be removed entirely, this also simplifies the driver. Signed-off-by: Simon Trimmer Link: https://patch.msgid.link/20240801143139.34549-1-simont@opensource.cirrus.com Signed-off-by: Takashi Iwai commit b7fd10333713e9984cc9b9c04f3681f80efdc809 Author: Konrad Dybcio Date: Thu Jul 11 11:37:57 2024 +0200 pinctrl: qcom: x1e80100: Update PDC hwirq map The current map seems to be out of sync (and includes a duplicate entry for GPIO193..). Replace it with the map present in shipping devices' ACPI tables. This new one seems more complete, as it e.g. contains GPIO145 (PCIE6a WAKE#) Fixes: 05e4941d97ef ("pinctrl: qcom: Add X1E80100 pinctrl driver") Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Reviewed-by: Rajendra Nayak Link: https://lore.kernel.org/20240711-topic-x1e_pdc_tlmm-v1-1-e278b249d793@linaro.org Signed-off-by: Linus Walleij commit 8c8acb8f26cbde665b233dd1b9bbcbb9b86822dc Author: Masami Hiramatsu (Google) Date: Fri Aug 2 22:53:15 2024 +0900 kprobes: Fix to check symbol prefixes correctly Since str_has_prefix() takes the prefix as the 2nd argument and the string as the first, is_cfi_preamble_symbol() always fails to check the prefix. Fix the function parameter order so that it correctly check the prefix. Link: https://lore.kernel.org/all/172260679559.362040.7360872132937227206.stgit@devnote2/ Fixes: de02f2ac5d8c ("kprobes: Prohibit probing on CFI preamble symbol") Signed-off-by: Masami Hiramatsu (Google) commit 0e8b53979ac86eddb3fd76264025a70071a25574 Author: Menglong Dong Date: Mon Aug 5 14:01:21 2024 +0900 bpf: kprobe: remove unused declaring of bpf_kprobe_override After the commit 66665ad2f102 ("tracing/kprobe: bpf: Compare instruction pointer with original one"), "bpf_kprobe_override" is not used anywhere anymore, and we can remove it now. Link: https://lore.kernel.org/all/20240710085939.11520-1-dongml2@chinatelecom.cn/ Fixes: 66665ad2f102 ("tracing/kprobe: bpf: Compare instruction pointer with original one") Signed-off-by: Menglong Dong Acked-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 206f533a0a7c683982af473079c4111f4a0f9f5e Author: Dmitry Torokhov Date: Sun Aug 4 17:50:25 2024 -0700 Input: uinput - reject requests with unreasonable number of slots From: Dmitry Torokhov When exercising uinput interface syzkaller may try setting up device with a really large number of slots, which causes memory allocation failure in input_mt_init_slots(). While this allocation failure is handled properly and request is rejected, it results in syzkaller reports. Additionally, such request may put undue burden on the system which will try to free a lot of memory for a bogus request. Fix it by limiting allowed number of slots to 100. This can easily be extended if we see devices that can track more than 100 contacts. Reported-by: Tetsuo Handa Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=0122fa359a69694395d5 Link: https://lore.kernel.org/r/Zqgi7NYEbpRsJfa2@google.com Signed-off-by: Dmitry Torokhov commit fc289d3e8698f9b11edad6d73f371ebf35944c57 Author: Felix Kaechele Date: Sat Aug 3 23:13:10 2024 -0400 Input: edt-ft5x06 - add support for FocalTech FT8201 The driver supports the FT8201 chip as well. It registers up to 10 touch points. Tested on: Lenovo ThinkSmart View (CD-18781Y), LCM: BOE TV080WXM-LL4 Signed-off-by: Felix Kaechele Link: https://lore.kernel.org/r/20240804031310.331871-3-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit 70d76b0e85ad126358baec1b44f797e61e3ebecc Author: Felix Kaechele Date: Sat Aug 3 23:13:09 2024 -0400 dt-bindings: input: touchscreen: edt-ft5x06: Document FT8201 support Document FocalTech FT8201 support by adding the compatible. Signed-off-by: Felix Kaechele Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240804031310.331871-2-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed Author: Linus Torvalds Date: Sun Aug 4 13:50:53 2024 -0700 Linux 6.11-rc2 commit b88f55389ad27f05ed84af9e1026aa64dbfabc9a Author: Tetsuo Handa Date: Sun Aug 4 18:48:10 2024 +0900 profiling: remove profile=sleep support The kernel sleep profile is no longer working due to a recursive locking bug introduced by commit 42a20f86dc19 ("sched: Add wrapper for get_wchan() to keep task blocked") Booting with the 'profile=sleep' kernel command line option added or executing # echo -n sleep > /sys/kernel/profiling after boot causes the system to lock up. Lockdep reports kthreadd/3 is trying to acquire lock: ffff93ac82e08d58 (&p->pi_lock){....}-{2:2}, at: get_wchan+0x32/0x70 but task is already holding lock: ffff93ac82e08d58 (&p->pi_lock){....}-{2:2}, at: try_to_wake_up+0x53/0x370 with the call trace being lock_acquire+0xc8/0x2f0 get_wchan+0x32/0x70 __update_stats_enqueue_sleeper+0x151/0x430 enqueue_entity+0x4b0/0x520 enqueue_task_fair+0x92/0x6b0 ttwu_do_activate+0x73/0x140 try_to_wake_up+0x213/0x370 swake_up_locked+0x20/0x50 complete+0x2f/0x40 kthread+0xfb/0x180 However, since nobody noticed this regression for more than two years, let's remove 'profile=sleep' support based on the assumption that nobody needs this functionality. Fixes: 42a20f86dc19 ("sched: Add wrapper for get_wchan() to keep task blocked") Cc: stable@vger.kernel.org # v5.16+ Signed-off-by: Tetsuo Handa Signed-off-by: Linus Torvalds commit 3a07703a523045cbdb0a5fa5e0902a9145ee43e9 Author: Dan Carpenter Date: Mon Jul 8 12:04:33 2024 -0500 phy: exynos5-usbdrd: fix error code in probe() Return negative -ENOMEM instead of positive ENOMEM. Fixes: 497ddafe915e ("phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk") Signed-off-by: Dan Carpenter Reviewed-by: Peter Griffin Reviewed-by: André Draszik Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/a956a3e2-c6ce-4f07-ad80-ec8a96e00d16@stanley.mountain Signed-off-by: Vinod Koul commit ce52c2532299c7ccfd34a52db8d071e890a78c59 Author: Xu Yang Date: Thu Aug 1 20:46:42 2024 +0800 phy: fsl-imx8mq-usb: fix tuning parameter name According to fsl,imx8mq-usb-phy.yaml, this tuning parameter should be fsl,phy-pcs-tx-deemph-3p5db-attenuation-db. Fixes: 63c85ad0cd81 ("phy: fsl-imx8mp-usb: add support for phy tuning") Cc: stable@vger.kernel.org Signed-off-by: Xu Yang Reviewed-by: Alexander Stein Link: https://lore.kernel.org/r/20240801124642.1152838-1-xu.yang_2@nxp.com Signed-off-by: Vinod Koul commit 0e8a0504da59041e775a95db3ebc1a6211423593 Author: Abel Vesa Date: Thu Aug 1 13:40:24 2024 +0300 phy: qcom: qmp-pcie: Fix X1E80100 PCIe Gen4 PHY initialisation Update the PCIe Gen4 PHY init sequence with the latest based on internal Qualcomm documentation. Fixes: 606060ce8fd0 ("phy: qcom-qmp-pcie: Add support for X1E80100 g3x2 and g4x2 PCIE") Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20240801-x1e80100-phy-qmp-pcie-fix-config-v2-1-cdc0f22b4169@linaro.org Signed-off-by: Vinod Koul commit a5dbd76a89423eca9f8de338350f2666aacfb432 Merge: 61ca6c78295e2 dd35a0933269c Author: Linus Torvalds Date: Sun Aug 4 08:57:08 2024 -0700 Merge tag 'x86-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: - Prevent a deadlock on cpu_hotplug_lock in the aperf/mperf driver. A recent change in the ACPI code which consolidated code pathes moved the invocation of init_freq_invariance_cppc() to be moved to a CPU hotplug handler. The first invocation on AMD CPUs ends up enabling a static branch which dead locks because the static branch enable tries to acquire cpu_hotplug_lock but that lock is already held write by the hotplug machinery. Use static_branch_enable_cpuslocked() instead and take the hotplug lock read for the Intel code path which is invoked from the architecture code outside of the CPU hotplug operations. - Fix the number of reserved bits in the sev_config structure bit field so that the bitfield does not exceed 64 bit. - Add missing Zen5 model numbers - Fix the alignment assumptions of pti_clone_pgtable() and clone_entry_text() on 32-bit: The code assumes PMD aligned code sections, but on 32-bit the kernel entry text is not PMD aligned. So depending on the code size and location, which is configuration and compiler dependent, entry text can cross a PMD boundary. As the start is not PMD aligned adding PMD size to the start address is larger than the end address which results in partially mapped entry code for user space. That causes endless recursion on the first entry from userspace (usually #PF). Cure this by aligning the start address in the addition so it ends up at the next PMD start address. clone_entry_text() enforces PMD mapping, but on 32-bit the tail might eventually be PTE mapped, which causes a map fail because the PMD for the tail is not a large page mapping. Use PTI_LEVEL_KERNEL_IMAGE for the clone() invocation which resolves to PTE on 32-bit and PMD on 64-bit. - Zero the 8-byte case for get_user() on range check failure on 32-bit The recend consolidation of the 8-byte get_user() case broke the zeroing in the failure case again. Establish it by clearing ECX before the range check and not afterwards as that obvioulsy can't be reached when the range check fails * tag 'x86-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/uaccess: Zero the 8-byte get_range case on failure on 32-bit x86/mm: Fix pti_clone_entry_text() for i386 x86/mm: Fix pti_clone_pgtable() alignment assumption x86/setup: Parse the builtin command line before merging x86/CPU/AMD: Add models 0x60-0x6f to the Zen5 range x86/sev: Fix __reserved field in sev_config x86/aperfmperf: Fix deadlock on cpu_hotplug_lock commit 61ca6c78295e242d4b681003112bfcdc54597489 Merge: 6cc82dc2bd119 f2655ac2c06a1 Author: Linus Torvalds Date: Sun Aug 4 08:50:16 2024 -0700 Merge tag 'timers-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Two fixes for the timer/clocksource code: - The recent fix to make the take over of the broadcast timer more reliable retrieves a per CPU pointer in preemptible context. This went unnoticed in testing as some compilers hoist the access into the non-preemotible section where the pointer is actually used, but obviously compilers can rightfully invoke it where the code put it. Move it into the non-preemptible section right to the actual usage side to cure it. - The clocksource watchdog is supposed to emit a warning when the retry count is greater than one and the number of retries reaches the limit. The condition is backwards and warns always when the count is greater than one. Fixup the condition to prevent spamming dmesg" * tag 'timers-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource: Fix brown-bag boolean thinko in cs_watchdog_read() tick/broadcast: Move per CPU pointer access into the atomic section commit 6cc82dc2bd1196141ffd5ebc99ecb52f9537443b Merge: 1ddeb0ef3cb72 fe7a11c78d2a9 Author: Linus Torvalds Date: Sun Aug 4 08:46:14 2024 -0700 Merge tag 'sched-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: - When stime is larger than rtime due to accounting imprecision, then utime = rtime - stime becomes negative. As this is unsigned math, the result becomes a huge positive number. Cure it by resetting stime to rtime in that case, so utime becomes 0. - Restore consistent state when sched_cpu_deactivate() fails. When offlining a CPU fails in sched_cpu_deactivate() after the SMT present counter has been decremented, then the function aborts but fails to increment the SMT present counter and leaves it imbalanced. Consecutive operations cause it to underflow. Add the missing fixup for the error path. For SMT accounting the runqueue needs to marked online again in the error exit path to restore consistent state. * tag 'sched-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate() sched/core: Introduce sched_set_rq_on/offline() helper sched/smt: Fix unbalance sched_smt_present dec/inc sched/smt: Introduce sched_smt_present_inc/dec() helper sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime commit 1ddeb0ef3cb724615d2d3aa8b35e5e241c474b51 Merge: 953f776459a83 f73cefa3b72ea Author: Linus Torvalds Date: Sun Aug 4 08:42:18 2024 -0700 Merge tag 'perf-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fixes from Thomas Gleixner: - Move the smp_processor_id() invocation back into the non-preemtible region, so that the result is valid to use - Add the missing package C2 residency counters for Sierra Forest CPUs to make the newly added support actually useful * tag 'perf-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix smp_processor_id()-in-preemptible warnings perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest commit 953f776459a83f00ac940dd67c96d226d7041550 Merge: 3bc70ad12097c 6be6cba9c4371 Author: Linus Torvalds Date: Sun Aug 4 08:36:57 2024 -0700 Merge tag 'irq-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A couple of fixes for interrupt chip drivers: - Make sure to skip the clear register space in the MBIGEN driver when calculating the node register index. Otherwise the clear register is clobbered and the wrong node registers are accessed. - Fix a signed/unsigned confusion in the loongarch CPU driver which converts an error code to a huge "valid" interrupt number. - Convert the mesion GPIO interrupt controller lock to a raw spinlock so it works on RT. - Add a missing static to a internal function in the pic32 EVIC driver" * tag 'irq-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mbigen: Fix mbigen node address layout irqchip/meson-gpio: Convert meson_gpio_irq_controller::lock to 'raw_spinlock_t' irqchip/irq-pic32-evic: Add missing 'static' to internal function irqchip/loongarch-cpu: Fix return value of lpic_gsi_to_irq() commit 3bc70ad12097c19cd6c687bc5b12c31da14b63f7 Merge: ff58838015c14 224fa3552029a Author: Linus Torvalds Date: Sun Aug 4 08:32:31 2024 -0700 Merge tag 'locking-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two fixes for locking and jump labels: - Ensure that the atomic_cmpxchg() conditions are correct and evaluating to true on any non-zero value except 1. The missing check of the return value leads to inconsisted state of the jump label counter. - Add a missing type conversion in the paravirt spinlock code which makes loongson build again" * tag 'locking-urgent-2024-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: jump_label: Fix the fix, brown paper bags galore locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node() commit ff58838015c14a12cb8c003b9d6fc062b49e8d9e Author: Rob Herring (Arm) Date: Tue Jul 30 15:00:30 2024 -0600 arm: dts: arm: versatile-ab: Fix duplicate clock node name Commit 04f08ef291d4 ("arm/arm64: dts: arm: Use generic clock and regulator nodenames") renamed nodes and created 2 "clock-24000000" nodes (at different paths). The kernel can't handle these duplicate names even though they are at different paths. Fix this by renaming one of the nodes to "clock-pclk". This name is aligned with other Arm boards (those didn't have a known frequency to use in the node name). Fixes: 04f08ef291d4 ("arm/arm64: dts: arm: Use generic clock and regulator nodenames") Reported-by: Guenter Roeck Signed-off-by: Rob Herring (Arm) Tested-by: Guenter Roeck Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Linus Torvalds commit 3f3f6d6123c3eb8bcae6c87776130d560250be77 Merge: 3c41df428e998 a91bfa67601c0 Author: Linus Torvalds Date: Sun Aug 4 08:18:40 2024 -0700 Merge tag '6.11-rc1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - two reparse point fixes - minor cleanup - additional trace point (to help debug a recent problem) * tag '6.11-rc1-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal version number smb: client: fix FSCTL_GET_REPARSE_POINT against NetApp smb3: add dynamic tracepoints for shutdown ioctl cifs: Remove cifs_aio_ctx smb: client: handle lack of FSCTL_GET_REPARSE_POINT support commit 3c41df428e9989eee79ed86d809a59ac03ac7c31 Merge: defaf1a2113a2 e2ed53694e535 Author: Linus Torvalds Date: Sun Aug 4 08:12:33 2024 -0700 Merge tag 'media/v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - two Kconfig fixes - one fix for the UVC driver addressing probing time detection of a UVC custom controls - one fix related to PDF generation * tag 'media/v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: v4l: Fix missing tabular column hint for Y14P format media: intel/ipu6: select AUXILIARY_BUS in Kconfig media: ipu-bridge: fix ipu6 Kconfig dependencies media: uvcvideo: Fix custom control mapping probing commit f17c06c6608ad4ecd2ccf321753fb511812d821b Author: Richard Fitzgerald Date: Fri Aug 2 16:22:14 2024 +0100 i2c: Fix conditional for substituting empty ACPI functions Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI functions. The conditional around these functions depended only on CONFIG_ACPI. But the functions are implemented in I2C core, so are only present if CONFIG_I2C is enabled. Signed-off-by: Richard Fitzgerald Signed-off-by: Wolfram Sang commit f6c29f710c1ff2590109f83be3e212b86c01e0f3 Author: Guenter Roeck Date: Tue Jul 30 07:19:41 2024 -0700 i2c: smbus: Send alert notifications to all devices if source not found If a SMBus alert is received and the originating device is not found, the reason may be that the address reported on the SMBus alert address is corrupted, for example because multiple devices asserted alert and do not correctly implement SMBus arbitration. If this happens, call alert handlers on all devices connected to the given I2C bus, in the hope that this cleans up the situation. This change reliably fixed the problem on a system with multiple devices on a single bus. Example log where the device on address 0x18 (ADM1021) and on address 0x4c (ADT7461A) both had the alert line asserted: smbus_alert 3-000c: SMBALERT# from dev 0x0c, flag 0 smbus_alert 3-000c: no driver alert()! smbus_alert 3-000c: SMBALERT# from dev 0x0c, flag 0 smbus_alert 3-000c: no driver alert()! lm90 3-0018: temp1 out of range, please check! lm90 3-0018: Disabling ALERT# lm90 3-0029: Everything OK lm90 3-002a: Everything OK lm90 3-004c: temp1 out of range, please check! lm90 3-004c: temp2 out of range, please check! lm90 3-004c: Disabling ALERT# Fixes: b5527a7766f0 ("i2c: Add SMBus alert support") Signed-off-by: Guenter Roeck [wsa: fixed a typo in the commit message] Signed-off-by: Wolfram Sang commit 14ab4792ee120c022f276a7e4768f4dcb08f0cdd Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Aug 1 01:13:28 2024 +0100 net/tcp: Disable TCP-AO static key after RCU grace period The lifetime of TCP-AO static_key is the same as the last tcp_ao_info. On the socket destruction tcp_ao_info ceases to be with RCU grace period, while tcp-ao static branch is currently deferred destructed. The static key definition is : DEFINE_STATIC_KEY_DEFERRED_FALSE(tcp_ao_needed, HZ); which means that if RCU grace period is delayed by more than a second and tcp_ao_needed is in the process of disablement, other CPUs may yet see tcp_ao_info which atent dead, but soon-to-be. And that breaks the assumption of static_key_fast_inc_not_disabled(). See the comment near the definition: > * The caller must make sure that the static key can't get disabled while > * in this function. It doesn't patch jump labels, only adds a user to > * an already enabled static key. Originally it was introduced in commit eb8c507296f6 ("jump_label: Prevent key->enabled int overflow"), which is needed for the atomic contexts, one of which would be the creation of a full socket from a request socket. In that atomic context, it's known by the presence of the key (md5/ao) that the static branch is already enabled. So, the ref counter for that static branch is just incremented instead of holding the proper mutex. static_key_fast_inc_not_disabled() is just a helper for such usage case. But it must not be used if the static branch could get disabled in parallel as it's not protected by jump_label_mutex and as a result, races with jump_label_update() implementation details. Happened on netdev test-bot[1], so not a theoretical issue: [] jump_label: Fatal kernel bug, unexpected op at tcp_inbound_hash+0x1a7/0x870 [ffffffffa8c4e9b7] (eb 50 0f 1f 44 != 66 90 0f 1f 00)) size:2 type:1 [] ------------[ cut here ]------------ [] kernel BUG at arch/x86/kernel/jump_label.c:73! [] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI [] CPU: 3 PID: 243 Comm: kworker/3:3 Not tainted 6.10.0-virtme #1 [] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [] Workqueue: events jump_label_update_timeout [] RIP: 0010:__jump_label_patch+0x2f6/0x350 ... [] Call Trace: [] [] arch_jump_label_transform_queue+0x6c/0x110 [] __jump_label_update+0xef/0x350 [] __static_key_slow_dec_cpuslocked.part.0+0x3c/0x60 [] jump_label_update_timeout+0x2c/0x40 [] process_one_work+0xe3b/0x1670 [] worker_thread+0x587/0xce0 [] kthread+0x28a/0x350 [] ret_from_fork+0x31/0x70 [] ret_from_fork_asm+0x1a/0x30 [] [] Modules linked in: veth [] ---[ end trace 0000000000000000 ]--- [] RIP: 0010:__jump_label_patch+0x2f6/0x350 [1]: https://netdev-3.bots.linux.dev/vmksft-tcp-ao-dbg/results/696681/5-connect-deny-ipv6/stderr Cc: stable@kernel.org Fixes: 67fa83f7c86a ("net/tcp: Add static_key for TCP-AO") Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit defaf1a2113a22b00dfa1abc0fd2014820eaf065 Merge: d3426a6ed9d83 7c632fc3ce64c Author: Linus Torvalds Date: Sat Aug 3 15:12:56 2024 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "One core change that reverts the double message print patch in sd.c (it was causing regressions on embedded systems). The rest are driver fixes in ufs, mpt3sas and mpi3mr" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: exynos: Don't resume FMP when crypto support is disabled scsi: mpt3sas: Avoid IOMMU page faults on REPORT ZONES scsi: mpi3mr: Avoid IOMMU page faults on REPORT ZONES scsi: ufs: core: Do not set link to OFF state while waking up from hibernation scsi: Revert "scsi: sd: Do not repeat the starting disk message" scsi: ufs: core: Fix deadlock during RTC update scsi: ufs: core: Bypass quick recovery if force reset is needed scsi: ufs: core: Check LSDBS cap when !mcq commit d3426a6ed9d8398bfee2a1c5cd0ae50f2f4494a8 Merge: 1dd950f2888f6 7bf888fa26e8f Author: Linus Torvalds Date: Sat Aug 3 09:09:25 2024 -0700 Merge tag 'xfs-6.11-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Chandan Babu: - Fix memory leak when corruption is detected during scrubbing parent pointers - Allow SECURE namespace xattrs to use reserved block pool to in order to prevent ENOSPC - Save stack space by passing tracepoint's char array to file_path() instead of another stack variable - Remove unused parameter in macro XFS_DQUOT_LOGRES - Replace comma with semicolon in a couple of places * tag 'xfs-6.11-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: convert comma to semicolon xfs: convert comma to semicolon xfs: remove unused parameter in macro XFS_DQUOT_LOGRES xfs: fix file_path handling in tracepoints xfs: allow SECURE namespace xattrs to use reserved block pool xfs: fix a memory leak commit 1dd950f2888f63ec163f3f142161e21a66685e35 Merge: b6547e54864b9 7ae04ba36b381 Author: Linus Torvalds Date: Sat Aug 3 09:03:21 2024 -0700 Merge tag 'parisc-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: - fix unaligned memory accesses when calling BPF functions - adjust memory size constants to fix possible DMA corruptions * tag 'parisc-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: fix a possible DMA corruption parisc: fix unaligned accesses in BPF commit de80af5c2ffd9c3f02792f6979296cb6f74e82e5 Author: Francesco Dolcini Date: Wed Jul 31 16:06:57 2024 +0200 iio: adc: ads1119: Fix IRQ flags Remove IRQF_TRIGGER_FALLING flag from irq request, this should come from the platform firmware and should not be hard-coded into the driver. Add IRQF_ONESHOT flag to the irq request, the interrupt should not be re-activated in interrupt context, it should be done only after the device irq handler run. Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver") Signed-off-by: Francesco Dolcini Reviwed-by: João Paulo Gonçalves Link: https://patch.msgid.link/20240731140657.88265-1-francesco@dolcini.it Signed-off-by: Jonathan Cameron commit b6547e54864b998af21fdcaa0a88cf8e7efe641a Author: Linus Torvalds Date: Fri Aug 2 18:12:06 2024 -0700 runtime constants: deal with old decrepit linkers The runtime constants linker script depended on documented linker behavior [1]: "If an output section’s name is the same as the input section’s name and is representable as a C identifier, then the linker will automatically PROVIDE two symbols: __start_SECNAME and __stop_SECNAME, where SECNAME is the name of the section. These indicate the start address and end address of the output section respectively" to just automatically define the symbol names for the bounds of the runtime constant arrays. It turns out that this isn't actually something we can rely on, with old linkers not generating these automatic symbols. It looks to have been introduced in binutils-2.29 back in 2017, and we still support building with versions all the way back to binutils-2.25 (from 2015). And yes, Oleg actually seems to be using such ancient versions of binutils. So instead of depending on the implicit symbols from "section names match and are representable C identifiers", just do this all manually. It's not like it causes us any extra pain, we already have to do that for all the other sections that we use that often have special characters in them. Reported-and-tested-by: Oleg Nesterov Link: https://sourceware.org/binutils/docs/ld/Input-Section-Example.html [1] Link: https://lore.kernel.org/all/20240802114518.GA20924@redhat.com/ Signed-off-by: Linus Torvalds commit 8a3dcc970dc57b358c8db2702447bf0af4e0d83a Author: Matteo Martelli Date: Tue Jul 30 10:11:53 2024 +0200 iio: fix scale application in iio_convert_raw_to_processed_unlocked When the scale_type is IIO_VAL_INT_PLUS_MICRO or IIO_VAL_INT_PLUS_NANO the scale passed as argument is only applied to the fractional part of the value. Fix it by also multiplying the integer part by the scale provided. Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value") Signed-off-by: Matteo Martelli Link: https://patch.msgid.link/20240730-iio-fix-scale-v1-1-6246638c8daa@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 2f6b92d0f69f04d9e2ea0db1228ab7f82f3173af Author: Dumitru Ceclan Date: Wed Jul 31 15:37:23 2024 +0300 iio: adc: ad7124: fix config comparison The ad7124_find_similar_live_cfg() computes the compare size by substracting the address of the cfg struct from the address of the live field. Because the live field is the first field in the struct, the result is 0. Also, the memcmp() call is made from the start of the cfg struct, which includes the live and cfg_slot fields, which are not relevant for the comparison. Fix by grouping the relevant fields with struct_group() and use the size of the group to compute the compare size; make the memcmp() call from the address of the group. Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels") Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240731-ad7124-fix-v1-2-46a76aa4b9be@analog.com Cc: Signed-off-by: Jonathan Cameron commit 96f9ab0d5933c1c00142dd052f259fce0bc3ced2 Author: Dumitru Ceclan Date: Wed Jul 31 15:37:22 2024 +0300 iio: adc: ad7124: fix chip ID mismatch The ad7124_soft_reset() function has the assumption that the chip will assert the "power-on reset" bit in the STATUS register after a software reset without any delay. The POR bit =0 is used to check if the chip initialization is done. A chip ID mismatch probe error appears intermittently when the probe continues too soon and the ID register does not contain the expected value. Fix by adding a 200us delay after the software reset command is issued. Fixes: b3af341bbd96 ("iio: adc: Add ad7124 support") Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240731-ad7124-fix-v1-1-46a76aa4b9be@analog.com Cc: Signed-off-by: Jonathan Cameron commit e2ed53694e5356a55fd539a4d8dc56c2fa42b2ff Merge: 914f8961879de 66558537cb8c7 Author: Hans Verkuil Date: Sat Aug 3 11:01:04 2024 +0200 Merge tag 'tags/fixes-media-uvc-20230722' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git uvcvideo v6.11 regression fix: fix custom control mapping probing Signed-off-by: Hans Verkuil commit f874d7210d882cb1c58a8e3da66f61cdc63cd4b4 Author: Li Feng Date: Thu Jul 18 16:07:22 2024 +0800 scsi: sd: Keep the discard mode stable There is a scenario where a large number of discard commands are issued when the iscsi initiator connects to the target and then performs a session rescan operation. There is a time window, most of the commands are in UNMAP mode, and some discard commands become WRITE SAME with UNMAP. The discard mode has been negotiated during the SCSI probe. If the mode is temporarily changed from UNMAP to WRITE SAME with UNMAP, an I/O ERROR may occur because the target may not implement WRITE SAME with UNMAP. Keep the discard mode stable to fix this issue. Signed-off-by: Li Feng Link: https://lore.kernel.org/r/20240718080751.313102-2-fengli@smartx.com Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Martin K. Petersen commit 4430556935db6808b63daf1bae91e9a4386e92bd Author: Roman Kisel Date: Thu Aug 1 14:22:35 2024 -0700 Drivers: hv: vmbus: Fix the misplaced function description When hv_synic_disable_regs was introduced, it received the description of hv_synic_cleanup. Fix that. Fixes: dba61cda3046 ("Drivers: hv: vmbus: Break out synic enable and disable operations") Signed-off-by: Roman Kisel Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20240801212235.352220-1-romank@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20240801212235.352220-1-romank@linux.microsoft.com> commit c6e2b45a544b45ce1a26858ded61a0dc4896d54a Author: Anthony Nandaa Date: Tue Jul 2 10:22:50 2024 +0000 tools: hv: lsvmbus: change shebang to use python3 In many modern Linux distros, running `lsvmbus` returns the error: ``` /usr/bin/env: 'python': No such file or directory ``` because 'python' doesn't point anywhere. Now that python2 has reached EOL as of January 1, 2020 and is no longer maintained[1], these distros have python3 instead. Also, the script isn't executable by default because the permissions are set to mode 644. Fix this by updating the shebang in the `lsvmbus` to use python3 instead of python. Also fix the permissions to be 755 so that is executable by default, which matches other similar scripts in `tools/hv`. The script is also tested and verified that is compatible with python3. [1] https://www.python.org/doc/sunset-python-2/ Signed-off-by: Anthony Nandaa Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20240702102250.13935-1-profnandaa@gmail.com Signed-off-by: Wei Liu Message-ID: <20240702102250.13935-1-profnandaa@gmail.com> commit fba917b169bea5f8f2ee300e19d5f7a6341a5251 Author: Praveen Kaligineedi Date: Thu Aug 1 13:56:19 2024 -0700 gve: Fix use of netif_carrier_ok() GVE driver wrongly relies on netif_carrier_ok() to check the interface administrative state when resources are being allocated/deallocated for queue(s). netif_carrier_ok() needs to be replaced with netif_running() for all such cases. Administrative state is the result of "ip link set dev up/down". It reflects whether the administrator wants to use the device for traffic and the corresponding resources have been allocated. Fixes: 5f08cd3d6423 ("gve: Alloc before freeing when adjusting queues") Signed-off-by: Praveen Kaligineedi Reviewed-by: Shailend Chand Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240801205619.987396-1-pkaligineedi@google.com Signed-off-by: Jakub Kicinski commit 8fcc514809de41153b43ccbe1a0cdf7f72b78e7e Author: Michael Kelley Date: Wed Jun 5 19:55:59 2024 -0700 x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency A Linux guest on Hyper-V gets the TSC frequency from a synthetic MSR, if available. In this case, set X86_FEATURE_TSC_KNOWN_FREQ so that Linux doesn't unnecessarily do refined TSC calibration when setting up the TSC clocksource. With this change, a message such as this is no longer output during boot when the TSC is used as the clocksource: [ 1.115141] tsc: Refined TSC clocksource calibration: 2918.408 MHz Furthermore, the guest and host will have exactly the same view of the TSC frequency, which is important for features such as the TSC deadline timer that are emulated by the Hyper-V host. Signed-off-by: Michael Kelley Reviewed-by: Roman Kisel Link: https://lore.kernel.org/r/20240606025559.1631-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240606025559.1631-1-mhklinux@outlook.com> commit 89108cb5c28527c1882df2987394e5c261a1f4aa Author: Kyle Swenson Date: Wed Jul 31 15:42:14 2024 +0000 net: pse-pd: tps23881: Fix the device ID check The DEVID register contains two pieces of information: the device ID in the upper nibble, and the silicon revision number in the lower nibble. The driver should work fine with any silicon revision, so let's mask that out in the device ID check. Fixes: 20e6d190ffe1 ("net: pse-pd: Add TI TPS23881 PSE controller driver") Signed-off-by: Kyle Swenson Reviewed-by: Thomas Petazzoni Acked-by: Oleksij Rempel Link: https://patch.msgid.link/20240731154152.4020668-1-kyle.swenson@est.tech Signed-off-by: Jakub Kicinski commit 9ab0faa7f9ffe31296dbb9bbe6f76c72c14eea18 Author: Kuniyuki Iwashima Date: Wed Jul 31 16:46:24 2024 -0700 sctp: Fix null-ptr-deref in reuseport_add_sock(). syzbot reported a null-ptr-deref while accessing sk2->sk_reuseport_cb in reuseport_add_sock(). [0] The repro first creates a listener with SO_REUSEPORT. Then, it creates another listener on the same port and concurrently closes the first listener. The second listen() calls reuseport_add_sock() with the first listener as sk2, where sk2->sk_reuseport_cb is not expected to be cleared concurrently, but the close() does clear it by reuseport_detach_sock(). The problem is SCTP does not properly synchronise reuseport_alloc(), reuseport_add_sock(), and reuseport_detach_sock(). The caller of reuseport_alloc() and reuseport_{add,detach}_sock() must provide synchronisation for sockets that are classified into the same reuseport group. Otherwise, such sockets form multiple identical reuseport groups, and all groups except one would be silently dead. 1. Two sockets call listen() concurrently 2. No socket in the same group found in sctp_ep_hashtable[] 3. Two sockets call reuseport_alloc() and form two reuseport groups 4. Only one group hit first in __sctp_rcv_lookup_endpoint() receives incoming packets Also, the reported null-ptr-deref could occur. TCP/UDP guarantees that would not happen by holding the hash bucket lock. Let's apply the locking strategy to __sctp_hash_endpoint() and __sctp_unhash_endpoint(). [0]: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 1 UID: 0 PID: 10230 Comm: syz-executor119 Not tainted 6.10.0-syzkaller-12585-g301927d2d2eb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 RIP: 0010:reuseport_add_sock+0x27e/0x5e0 net/core/sock_reuseport.c:350 Code: 00 0f b7 5d 00 bf 01 00 00 00 89 de e8 1b a4 ff f7 83 fb 01 0f 85 a3 01 00 00 e8 6d a0 ff f7 49 8d 7e 12 48 89 f8 48 c1 e8 03 <42> 0f b6 04 28 84 c0 0f 85 4b 02 00 00 41 0f b7 5e 12 49 8d 7e 14 RSP: 0018:ffffc9000b947c98 EFLAGS: 00010202 RAX: 0000000000000002 RBX: ffff8880252ddf98 RCX: ffff888079478000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000012 RBP: 0000000000000001 R08: ffffffff8993e18d R09: 1ffffffff1fef385 R10: dffffc0000000000 R11: fffffbfff1fef386 R12: ffff8880252ddac0 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f24e45b96c0(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffcced5f7b8 CR3: 00000000241be000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __sctp_hash_endpoint net/sctp/input.c:762 [inline] sctp_hash_endpoint+0x52a/0x600 net/sctp/input.c:790 sctp_listen_start net/sctp/socket.c:8570 [inline] sctp_inet_listen+0x767/0xa20 net/sctp/socket.c:8625 __sys_listen_socket net/socket.c:1883 [inline] __sys_listen+0x1b7/0x230 net/socket.c:1894 __do_sys_listen net/socket.c:1902 [inline] __se_sys_listen net/socket.c:1900 [inline] __x64_sys_listen+0x5a/0x70 net/socket.c:1900 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:0x7f24e46039b9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 91 1a 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:00007f24e45b9228 EFLAGS: 00000246 ORIG_RAX: 0000000000000032 RAX: ffffffffffffffda RBX: 00007f24e468e428 RCX: 00007f24e46039b9 RDX: 00007f24e46039b9 RSI: 0000000000000003 RDI: 0000000000000004 RBP: 00007f24e468e420 R08: 00007f24e45b96c0 R09: 00007f24e45b96c0 R10: 00007f24e45b96c0 R11: 0000000000000246 R12: 00007f24e468e42c R13: 00007f24e465a5dc R14: 0020000000000001 R15: 00007ffcced5f7d8 Modules linked in: Fixes: 6ba845740267 ("sctp: process sk_reuseport in sctp_get_port_local") Reported-by: syzbot+e6979a5d2f10ecb700e4@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e6979a5d2f10ecb700e4 Tested-by: syzbot+e6979a5d2f10ecb700e4@syzkaller.appspotmail.com Signed-off-by: Kuniyuki Iwashima Acked-by: Xin Long Link: https://patch.msgid.link/20240731234624.94055-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit eeef5f183f1c1bdc3ea42b26ded1da2a8a5c69d9 Author: Stephen Hemminger Date: Thu Aug 1 09:28:42 2024 -0700 MAINTAINERS: update status of sky2 and skge drivers The old SysKonnect NIc's are not used or actively maintained anymore. My sky2 NIC's are all in box in back corner of attic. Signed-off-by: Stephen Hemminger Link: https://patch.msgid.link/20240801162930.212299-1-stephen@networkplumber.org Signed-off-by: Jakub Kicinski commit 17712b7ea0756799635ba159cc773082230ed028 Merge: d9ef02e56f0fd c3fca4fb83f7c Author: Linus Torvalds Date: Fri Aug 2 14:18:31 2024 -0700 Merge tag 'io_uring-6.11-20240802' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Two minor tweaks for the NAPI handling, both from Olivier: - Kill two unused list definitions - Ensure that multishot NAPI doesn't age away" * tag 'io_uring-6.11-20240802' of git://git.kernel.dk/linux: io_uring: remove unused local list heads in NAPI functions io_uring: keep multishot request NAPI timeout current commit d9ef02e56f0fd3668b6d7cb17f9399ea53f12edd Merge: 041b1061d8920 a09074228977c Author: Linus Torvalds Date: Fri Aug 2 14:10:11 2024 -0700 Merge tag 'thermal-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "These fix a few issues related to the MSI IRQs management in the int340x thermal driver, fix a thermal core issue that may lead to missing trip point crossing events and update the thermal core documentation. Specifics: - Fix MSI error path cleanup in int340x, allow it to work with a subset of thermal MSI IRQs if some of them are not working and make it free all MSI IRQs on module exit (Srinivas Pandruvada) - Fix a thermal core issue that may lead to missing trip point crossing events in some cases when thermal_zone_set_trips() is used and update the thermal core documentation (Rafael Wysocki)" * tag 'thermal-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Update thermal zone registration documentation thermal: trip: Avoid skipping trips in thermal_zone_set_trips() thermal: intel: int340x: Free MSI IRQ vectors on module exit thermal: intel: int340x: Allow limited thermal MSI support thermal: intel: int340x: Fix kernel warning during MSI cleanup commit 041b1061d89203e933cb385d70d0e85f90a08417 Merge: 1c4246294c984 cfb00a3578641 Author: Linus Torvalds Date: Fri Aug 2 13:46:43 2024 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Expand the speculative SSBS errata workaround to more CPUs - Ensure jump label changes are visible to all CPUs with a kick_all_cpus_sync() (and also enable jump label batching as part of the fix) - The shadow call stack sanitiser is currently incompatible with Rust, make CONFIG_RUST conditional on !CONFIG_SHADOW_CALL_STACK * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: jump_label: Ensure patched jump_labels are visible to all CPUs rust: SHADOW_CALL_STACK is incompatible with Rust arm64: errata: Expand speculative SSBS workaround (again) arm64: cputype: Add Cortex-A725 definitions arm64: cputype: Add Cortex-X1C definitions commit 12653ec36112ab55fa06c01db7c4432653d30a8d Author: Qu Wenruo Date: Fri Jul 19 18:56:46 2024 +0930 btrfs: avoid using fixed char array size for tree names [BUG] There is a bug report that using the latest trunk GCC 15, btrfs would cause unterminated-string-initialization warning: linux-6.6/fs/btrfs/print-tree.c:29:49: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization] 29 | { BTRFS_BLOCK_GROUP_TREE_OBJECTID, "BLOCK_GROUP_TREE" }, | ^~~~~~~~~~~~~~~~~~ [CAUSE] To print tree names we have an array of root_name_map structure, which uses "char name[16];" to store the name string of a tree. But the following trees have names exactly at 16 chars length: - "BLOCK_GROUP_TREE" - "RAID_STRIPE_TREE" This means we will have no space for the terminating '\0', and can lead to unexpected access when printing the name. [FIX] Instead of "char name[16];" use "const char *" instead. Since the name strings are all read-only data, and are all NULL terminated by default, there is not much need to bother the length at all. Reported-by: Sam James Reported-by: Alejandro Colomar Fixes: edde81f1abf29 ("btrfs: add raid stripe tree pretty printer") Fixes: 9c54e80ddc6bd ("btrfs: add code to support the block group root") CC: stable@vger.kernel.org # 6.1+ Suggested-by: Alejandro Colomar Reviewed-by: Johannes Thumshirn Reviewed-by: Alejandro Colomar Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e0391e92f9ab4fb3dbdeb139c967dcfa7ac4b115 Author: Filipe Manana Date: Fri Aug 2 09:38:51 2024 +0100 btrfs: fix double inode unlock for direct IO sync writes If we do a direct IO sync write, at btrfs_sync_file(), and we need to skip inode logging or we get an error starting a transaction or an error when flushing delalloc, we end up unlocking the inode when we shouldn't under the 'out_release_extents' label, and then unlock it again at btrfs_direct_write(). Fix that by checking if we have to skip inode unlocking under that label. Reported-by: syzbot+7dbbb74af6291b5a5a8b@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/000000000000dfd631061eaeb4bc@google.com/ Fixes: 939b656bc8ab ("btrfs: fix corruption after buffer fault in during direct IO append write") Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 19d837bc881b2f9f72f9eb506b46c2e2d983896d Author: Sebastian Ott Date: Tue Jul 23 12:12:04 2024 +0200 KVM: arm64: vgic: fix unexpected unlock sparse warnings Get rid of unexpected unlock sparse warnings in vgic code by adding an annotation to vgic_queue_irq_unlock(). arch/arm64/kvm/vgic/vgic.c:334:17: warning: context imbalance in 'vgic_queue_irq_unlock' - unexpected unlock arch/arm64/kvm/vgic/vgic.c:419:5: warning: context imbalance in 'kvm_vgic_inject_irq' - different lock contexts for basic block Signed-off-by: Sebastian Ott Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240723101204.7356-4-sebott@redhat.com Signed-off-by: Oliver Upton commit 0aa34b37a78d063da58838b84b20a68a94d919fd Author: Sebastian Ott Date: Tue Jul 23 12:12:03 2024 +0200 KVM: arm64: fix kdoc warnings in W=1 builds Fix kdoc warnings by adding missing function parameter descriptions or by conversion to a normal comment. Signed-off-by: Sebastian Ott Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240723101204.7356-3-sebott@redhat.com Signed-off-by: Oliver Upton commit 963a08e586bd45fd55f4c1752e98029ce83fc091 Author: Sebastian Ott Date: Tue Jul 23 12:12:02 2024 +0200 KVM: arm64: fix override-init warnings in W=1 builds Add -Wno-override-init to the build flags for sys_regs.c, handle_exit.c, and switch.c to fix warnings like the following: arch/arm64/kvm/hyp/vhe/switch.c:271:43: warning: initialized field overwritten [-Woverride-init] 271 | [ESR_ELx_EC_CP15_32] = kvm_hyp_handle_cp15_32, | Signed-off-by: Sebastian Ott Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240723101204.7356-2-sebott@redhat.com Signed-off-by: Oliver Upton commit 32b9a52f88a5713bf8a02dae66f2ad69705de69f Author: Danilo Krummrich Date: Tue Jul 23 16:20:52 2024 +0200 KVM: arm64: free kvm->arch.nested_mmus with kvfree() kvm->arch.nested_mmus is allocated with kvrealloc(), hence free it with kvfree() instead of kfree(). Fixes: 4f128f8e1aaa ("KVM: arm64: nv: Support multiple nested Stage-2 mmu structures") Signed-off-by: Danilo Krummrich Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240723142204.758796-1-dakr@kernel.org Signed-off-by: Oliver Upton commit 90ec3a8a7fd0d43026fcca979713e077d4883b56 Author: Richard Fitzgerald Date: Fri Aug 2 16:22:13 2024 +0100 spi: Add empty versions of ACPI functions Provide empty versions of acpi_spi_count_resources(), acpi_spi_device_alloc() and acpi_spi_find_controller_by_adev() if the real functions are not being built. This commit fixes two problems with the original definitions: 1) There wasn't an empty version of these functions 2) The #if only depended on CONFIG_ACPI. But the functions are implemented in the core spi.c so CONFIG_SPI_MASTER must also be enabled for the real functions to exist. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240802152215.20831-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 1c4246294c9841c50805cec0627030c083e019c6 Merge: 725d410facf9f 31634d7597d8c Author: Linus Torvalds Date: Fri Aug 2 10:33:06 2024 -0700 Merge tag 'ceph-for-6.11-rc2' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a potential hang in the MDS when cap revocation races with the client releasing the caps in question, marked for stable" * tag 'ceph-for-6.11-rc2' of https://github.com/ceph/ceph-client: ceph: force sending a cap update msg back to MDS for revoke op commit 725d410facf9f232832bf6ea14a0c8814d890e06 Merge: 948752d2e010e 1773014a97591 Author: Linus Torvalds Date: Fri Aug 2 10:17:49 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "The bulk of the changes here is a largish change to guest_memfd, delaying the clearing and encryption of guest-private pages until they are actually added to guest page tables. This started as "let's make it impossible to misuse the API" for SEV-SNP; but then it ballooned a bit. The new logic is generally simpler and more ready for hugepage support in guest_memfd. Summary: - fix latent bug in how usage of large pages is determined for confidential VMs - fix "underline too short" in docs - eliminate log spam from limited APIC timer periods - disallow pre-faulting of memory before SEV-SNP VMs are initialized - delay clearing and encrypting private memory until it is added to guest page tables - this change also enables another small cleanup: the checks in SNP_LAUNCH_UPDATE that limit it to non-populated, private pages can now be moved in the common kvm_gmem_populate() function - fix compilation error that the RISC-V merge introduced in selftests" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/mmu: fix determination of max NPT mapping level for private pages KVM: riscv: selftests: Fix compile error KVM: guest_memfd: abstract how prepared folios are recorded KVM: guest_memfd: let kvm_gmem_populate() operate only on private gfns KVM: extend kvm_range_has_memory_attributes() to check subset of attributes KVM: cleanup and add shortcuts to kvm_range_has_memory_attributes() KVM: guest_memfd: move check for already-populated page to common code KVM: remove kvm_arch_gmem_prepare_needed() KVM: guest_memfd: make kvm_gmem_prepare_folio() operate on a single struct kvm KVM: guest_memfd: delay kvm_gmem_prepare_folio() until the memory is passed to the guest KVM: guest_memfd: return locked folio from __kvm_gmem_get_pfn KVM: rename CONFIG_HAVE_KVM_GMEM_* to CONFIG_HAVE_KVM_ARCH_GMEM_* KVM: guest_memfd: do not go through struct page KVM: guest_memfd: delay folio_mark_uptodate() until after successful preparation KVM: guest_memfd: return folio from __kvm_gmem_get_pfn() KVM: x86: disallow pre-fault for SNP VMs before initialization KVM: Documentation: Fix title underline too short warning KVM: x86: Eliminate log spam from limited APIC timer periods commit 1773014a975919195be71646fc2c2cad1570fce4 Merge: 29b5bbf7e97fb aca0ec970d764 Author: Paolo Bonzini Date: Fri Aug 2 12:31:48 2024 -0400 Merge branch 'kvm-fixes' into HEAD * fix latent bug in how usage of large pages is determined for confidential VMs * fix "underline too short" in docs * eliminate log spam from limited APIC timer periods * disallow pre-faulting of memory before SEV-SNP VMs are initialized * delay clearing and encrypting private memory until it is added to guest page tables * this change also enables another small cleanup: the checks in SNP_LAUNCH_UPDATE that limit it to non-populated, private pages can now be moved in the common kvm_gmem_populate() function commit 948752d2e010e11b56a877975e7e9158d6d31823 Merge: 66242ef25eedc 3b6564427aea8 Author: Linus Torvalds Date: Fri Aug 2 09:33:35 2024 -0700 Merge tag 'riscv-for-linus-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix to avoid dropping some of the internal pseudo-extensions, which breaks *envcfg dependency parsing - The kernel entry address is now aligned in purgatory, which avoids a misaligned load that can lead to crash on systems that don't support misaligned accesses early in boot - The FW_SFENCE_VMA_RECEIVED perf event was duplicated in a handful of perf JSON configurations, one of them been updated to FW_SFENCE_VMA_ASID_SENT - The starfive cache driver is now restricted to 64-bit systems, as it isn't 32-bit clean - A fix for to avoid aliasing legacy-mode perf counters with software perf counters - VM_FAULT_SIGSEGV is now handled in the page fault code - A fix for stalls during CPU hotplug due to IPIs being disabled - A fix for memblock bounds checking. This manifests as a crash on systems with discontinuous memory maps that have regions that don't fit in the linear map * tag 'riscv-for-linus-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix linear mapping checks for non-contiguous memory regions RISC-V: Enable the IPI before workqueue_online_cpu() riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error() perf: riscv: Fix selecting counters in legacy mode cache: StarFive: Require a 64-bit system perf arch events: Fix duplicate RISC-V SBI firmware event name riscv/purgatory: align riscv_kernel_entry riscv: cpufeature: Do not drop Linux-internal extensions commit 29b5bbf7e97fb4aee55df17a38f5bc192b1928ae Merge: 8400291e289ee dd4a799bcc139 Author: Paolo Bonzini Date: Fri Aug 2 12:31:29 2024 -0400 Merge tag 'kvm-riscv-fixes-6.11-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.11, take #1 - Fix compile error in get-reg-list selftests commit 66242ef25eedc5b48d46c4b60f5d453763adf2b8 Merge: 29ccb40f2b543 33bd8d153c337 Author: Linus Torvalds Date: Fri Aug 2 09:29:54 2024 -0700 Merge tag 's390-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - remove unused empty CPU alternatives header file - fix recently and erroneously removed exception handling when loading an invalid floating point register - ptdump fixes to reflect the recent changes due to the uncoupling of physical vs virtual kernel address spaces - changes to avoid the unnecessary splitting of large pages in kernel mappings - add the missing MODULE_DESCRIPTION for the CIO modules * tag 's390-6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: Keep inittext section writable s390/vmlinux.lds.S: Move ro_after_init section behind rodata section s390/mm: Get rid of RELOC_HIDE() s390/mm/ptdump: Improve sorting of markers s390/mm/ptdump: Add support for relocated lowcore mapping s390/mm/ptdump: Fix handling of identity mapping area s390/cio: Add missing MODULE_DESCRIPTION() macros s390/alternatives: Remove unused empty header file s390/fpu: Re-add exception handling in load_fpu_state() commit f2655ac2c06a15558e51ed6529de280e1553c86e Author: Paul E. McKenney Date: Fri Aug 2 08:46:15 2024 -0700 clocksource: Fix brown-bag boolean thinko in cs_watchdog_read() The current "nretries > 1 || nretries >= max_retries" check in cs_watchdog_read() will always evaluate to true, and thus pr_warn(), if nretries is greater than 1. The intent is instead to never warn on the first try, but otherwise warn if the successful retry was the last retry. Therefore, change that "||" to "&&". Fixes: db3a34e17433 ("clocksource: Retry clock read if long delays detected") Reported-by: Borislav Petkov Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240802154618.4149953-2-paulmck@kernel.org commit 29ccb40f2b543ccb1d143e54e8227b80d277bc2f Merge: 6b779f8a86488 343416f0c11c4 Author: Linus Torvalds Date: Fri Aug 2 09:14:48 2024 -0700 Merge tag 'asm-generic-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fixes from Arnd Bergmann: "These are three important bug fixes for the cross-architecture tree, fixing a regression with the new syscall.tbl file, the inconsistent numbering for the new uretprobe syscall and a bug with iowrite64be on alpha" * tag 'asm-generic-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: syscalls: fix syscall macros for newfstat/newfstatat uretprobe: change syscall number, again alpha: fix ioread64be()/iowrite64be() helpers commit 6b779f8a8648848d74c24b07d0e2436c00211788 Merge: 29b4a6996c244 478689b5990de Author: Linus Torvalds Date: Fri Aug 2 09:04:57 2024 -0700 Merge tag 'sound-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A small collection of fixes: - Revert of FireWire changes that caused a long-time regression - Another long-time regression fix for AMD HDMI - MIDI2 UMP fixes - HD-audio Conexant codec fixes and a quirk" * tag 'sound-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: Conditionally use snooping for AMD HDMI ALSA: usb-audio: Correct surround channels in UAC1 channel map ALSA: seq: ump: Explicitly reset RPN with Null RPN ALSA: seq: ump: Transmit RPN/NRPN message at each MSB/LSB data reception ALSA: seq: ump: Use the common RPN/bank conversion context ALSA: ump: Explicitly reset RPN with Null RPN ALSA: ump: Transmit RPN/NRPN message at each MSB/LSB data reception Revert "ALSA: firewire-lib: operate for period elapse event in process context" Revert "ALSA: firewire-lib: obsolete workqueue for period update" ALSA: hda/realtek: Add quirk for Acer Aspire E5-574G ALSA: seq: ump: Optimize conversions from SysEx to UMP ALSA: hda/conexant: Mute speakers at suspend / shutdown ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown ALSA: hda: conexant: Fix headset auto detect fail in the polling mode commit 29b4a6996c244f0d360537d6a4a0996468372c17 Merge: 454e2370b9851 27ce65f65258c Author: Linus Torvalds Date: Fri Aug 2 08:59:09 2024 -0700 Merge tag 'drm-fixes-2024-08-02' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Regular weekly fixes. This is a bit larger than usual but doesn't seem too crazy. Most of it is vmwgfx changes that fix a bunch of issues with wayland userspaces with dma-buf/external buffers and modesetting fixes. Otherwise it's kinda spread out, v3d fixes some new ioctls, nouveau has regression revert and fixes, amdgpu, i915 and ast have some small fixes, and some core fixes spread about. client: - fix error code atomic: - allow damage clips with async flips - allow explicit sync with async flips kselftests: - fix dmabuf-heaps test panic: - fix schedule_work in panic paths panel: - fix OrangePi Neo orientation gpuvm: - fix missing dependency amdgpu: - SMU 14.x update - Fix contiguous VRAM handling for IB parsing - GFX 12 fix - Regression fix for old APUs i915: - Static analysis fix for int overflow - Fix for HDCP2_STREAM_STATUS macro and removal of PWR_CLK_STATE for gen12 nouveau: - revert busy wait change that caused a resume regression - fix buffer placement fault on dynamic pm s/r - fix refcount underflow ast: - fix black screen on resume - wake during connector status detect v3d: - fix issues with perf/timestamp ioctls vmwgfx: - fix deadlock in dma-buf fence polling - fix screen surface refcounting - fix dumb buffer handling - fix support for external buffers - fix overlay with screen targets - trigger modeset on screen moves" * tag 'drm-fixes-2024-08-02' of https://gitlab.freedesktop.org/drm/kernel: (31 commits) Revert "nouveau: rip out busy fence waits" nouveau: set placement to original placement on uvmm validate. drm/atomic: Allow userspace to use damage clips with async flips drm/atomic: Allow userspace to use explicit sync with atomic async flips drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll() drm/i915/hdcp: Fix HDCP2_STREAM_STATUS macro drm/ast: astdp: Wake up during connector status detection i915/perf: Remove code to update PWR_CLK_STATE for gen12 kselftests: dmabuf-heaps: Ensure the driver name is null-terminated drm/client: Fix error code in drm_client_buffer_vmap_local() drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware() drm/amdgpu: increase mes log buffer size for gfx12 drm/amdgpu: fix contiguous handling for IB parsing v2 drm/amdgpu/pm: support gpu_metrics sysfs interface for smu v14.0.2/3 drm/vmwgfx: Trigger a modeset when the screen moves drm/vmwgfx: Fix overlay when using Screen Targets drm/vmwgfx: Add basic support for external buffers drm/vmwgfx: Fix handling of dumb buffers drm/vmwgfx: Make sure the screen surface is ref counted drm/vmwgfx: Fix a deadlock in dma buf fence polling ... commit a91bfa67601c07ff9d31731fd2d624b47b0039f2 Author: Steve French Date: Fri Jul 26 18:44:16 2024 -0500 cifs: update internal version number To 2.50 Signed-off-by: Steve French commit ddecea00f87f0c46e9c8339a7c89fb2ff891521a Author: Paulo Alcantara Date: Thu Aug 1 18:12:39 2024 -0300 smb: client: fix FSCTL_GET_REPARSE_POINT against NetApp NetApp server requires the file to be open with FILE_READ_EA access in order to support FSCTL_GET_REPARSE_POINT, otherwise it will return STATUS_INVALID_DEVICE_REQUEST. It doesn't make any sense because there's no requirement for FILE_READ_EA bit to be set nor STATUS_INVALID_DEVICE_REQUEST being used for something other than "unsupported reparse points" in MS-FSA. To fix it and improve compatibility, set FILE_READ_EA & SYNCHRONIZE bits to match what Windows client currently does. Tested-by: Sebastian Steinbeisser Acked-by: Tom Talpey Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 69ca1f57555f74142a4c241703c307cb31b54667 Author: Steve French Date: Tue Jul 30 00:26:21 2024 -0500 smb3: add dynamic tracepoints for shutdown ioctl For debugging an umount failure in xfstests generic/043 generic/044 in some configurations, we needed more information on the shutdown ioctl which was suspected of being related to the cause, so tracepoints are added in this patch e.g. "trace-cmd record -e smb3_shutdown_enter -e smb3_shutdown_done -e smb3_shutdown_err" Sample output: godown-47084 [011] ..... 3313.756965: smb3_shutdown_enter: flags=0x1 tid=0x733b3e75 godown-47084 [011] ..... 3313.756968: smb3_shutdown_done: flags=0x1 tid=0x733b3e75 Tested-by: Anthony Nandaa (Microsoft) Signed-off-by: Steve French commit cd936507986e38535e7c98940c186e9a97b87184 Author: David Howells Date: Wed Jul 31 11:30:00 2024 +0100 cifs: Remove cifs_aio_ctx Remove struct cifs_aio_ctx and its associated alloc/release functions as it is no longer used, the functions being taken over by netfslib. Signed-off-by: David Howells cc: Steve French cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit 4b96024ef2296b1d323af327cae5e52809b61420 Author: Paulo Alcantara Date: Wed Jul 31 10:23:39 2024 -0300 smb: client: handle lack of FSCTL_GET_REPARSE_POINT support As per MS-FSA 2.1.5.10.14, support for FSCTL_GET_REPARSE_POINT is optional and if the server doesn't support it, STATUS_INVALID_DEVICE_REQUEST must be returned for the operation. If we find files with reparse points and we can't read them due to lack of client or server support, just ignore it and then treat them as regular files or junctions. Fixes: 5f71ebc41294 ("smb: client: parse reparse point flag in create response") Reported-by: Sebastian Steinbeisser Tested-by: Sebastian Steinbeisser Acked-by: Tom Talpey Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 454e2370b9851519a8f27d1965fe25a9a38b5ac5 Merge: bbea34e693f4c 89fb4dfacbb33 Author: Linus Torvalds Date: Fri Aug 2 08:54:16 2024 -0700 Merge tag 'ata-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fix from Damien Le Moal: - Add missing power-domains property to the device tree bindings for the Rockchip Designware AHCI adapter (from Heiko) * tag 'ata-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: dt-bindings: ata: rockchip-dwc-ahci: add missing power-domains commit bbea34e693f4cc62d594efc7ef7629900d97b9a8 Merge: c0ecd6388360d 8aa37bde1a7b6 Author: Linus Torvalds Date: Fri Aug 2 08:52:27 2024 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fix from Al Viro: "do_dup2() out-of-bounds array speculation fix" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: protect the fetch of ->fd[fd] in do_dup2() from mispredictions commit cfb00a35786414e7c0e6226b277d9f09657eae74 Author: Will Deacon Date: Wed Jul 31 14:36:01 2024 +0100 arm64: jump_label: Ensure patched jump_labels are visible to all CPUs Although the Arm architecture permits concurrent modification and execution of NOP and branch instructions, it still requires some synchronisation to ensure that other CPUs consistently execute the newly written instruction: > When the modified instructions are observable, each PE that is > executing the modified instructions must execute an ISB or perform a > context synchronizing event to ensure execution of the modified > instructions Prior to commit f6cc0c501649 ("arm64: Avoid calling stop_machine() when patching jump labels"), the arm64 jump_label patching machinery performed synchronisation using stop_machine() after each modification, however this was problematic when flipping static keys from atomic contexts (namely, the arm_arch_timer CPU hotplug startup notifier) and so we switched to the _nosync() patching routines to avoid "scheduling while atomic" BUG()s during boot. In hindsight, the analysis of the issue in f6cc0c501649 isn't quite right: it cites the use of IPIs in the default patching routines as the cause of the lockup, whereas stop_machine() does not rely on IPIs and the I-cache invalidation is performed using __flush_icache_range(), which elides the call to kick_all_cpus_sync(). In fact, the blocking wait for other CPUs is what triggers the BUG() and the problem remains even after f6cc0c501649, for example because we could block on the jump_label_mutex. Eventually, the arm_arch_timer driver was fixed to avoid the static key entirely in commit a862fc2254bd ("clocksource/arm_arch_timer: Remove use of workaround static key"). This all leaves the jump_label patching code in a funny situation on arm64 as we do not synchronise with other CPUs to reduce the likelihood of a bug which no longer exists. Consequently, toggling a static key on one CPU cannot be assumed to take effect on other CPUs, leading to potential issues, for example with missing preempt notifiers. Rather than revert f6cc0c501649 and go back to stop_machine() for each patch site, implement arch_jump_label_transform_apply() and kick all the other CPUs with an IPI at the end of patching. Cc: Alexander Potapenko Cc: Mark Rutland Cc: Marc Zyngier Fixes: f6cc0c501649 ("arm64: Avoid calling stop_machine() when patching jump labels") Signed-off-by: Will Deacon Reviewed-by: Catalin Marinas Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240731133601.3073-1-will@kernel.org Signed-off-by: Catalin Marinas commit fca5b78511e98bdff2cdd55c172b23200a7b3404 Author: Barak Biber Date: Thu Aug 1 09:26:04 2024 -0300 iommu: Restore lost return in iommu_report_device_fault() When iommu_report_device_fault gets called with a partial fault it is supposed to collect the fault into the group and then return. Instead the return was accidently deleted which results in trying to process the fault and an eventual crash. Deleting the return was a typo, put it back. Fixes: 3dfa64aecbaf ("iommu: Make iommu_report_device_fault() return void") Signed-off-by: Barak Biber Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/0-v1-e7153d9c8cee+1c6-iommu_fault_fix_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 343416f0c11c42bed07f6db03ca599f4f1771b17 Author: Arnd Bergmann Date: Thu Aug 1 14:27:23 2024 +0200 syscalls: fix syscall macros for newfstat/newfstatat The __NR_newfstat and __NR_newfstatat macros accidentally got renamed in the conversion to the syscall.tbl format, dropping the 'new' portion of the name. In an unrelated change, the two syscalls are no longer architecture specific but are once more defined on all 64-bit architectures, so the 'newstat' ABI keyword can be dropped from the table as a simplification. Fixes: Fixes: 4fe53bf2ba0a ("syscalls: add generic scripts/syscall.tbl") Closes: https://lore.kernel.org/lkml/838053e0-b186-4e9f-9668-9a3384a71f23@app.fastmail.com/T/#t Reported-by: Florian Weimer Signed-off-by: Arnd Bergmann commit 54233a4254036efca91b9bffbd398ecf39e90555 Author: Arnd Bergmann Date: Tue Jul 30 17:30:40 2024 +0200 uretprobe: change syscall number, again Despite multiple attempts to get the syscall number assignment right for the newly added uretprobe syscall, we ended up with a bit of a mess: - The number is defined as 467 based on the assumption that the xattrat family of syscalls would use 463 through 466, but those did not make it into 6.11. - The include/uapi/asm-generic/unistd.h file still lists the number 463, but the new scripts/syscall.tbl that was supposed to have the same data lists 467 instead as the number for arc, arm64, csky, hexagon, loongarch, nios2, openrisc and riscv. None of these architectures actually provide a uretprobe syscall. - All the other architectures (powerpc, arm, mips, ...) don't list this syscall at all. There are two ways to make it consistent again: either list it with the same syscall number on all architectures, or only list it on x86 but not in scripts/syscall.tbl and asm-generic/unistd.h. Based on the most recent discussion, it seems like we won't need it anywhere else, so just remove the inconsistent assignment and instead move the x86 number to the next available one in the architecture specific range, which is 335. Fixes: 5c28424e9a34 ("syscalls: Fix to add sys_uretprobe to syscall.tbl") Fixes: 190fec72df4a ("uprobe: Wire up uretprobe system call") Fixes: 63ded110979b ("uprobe: Change uretprobe syscall scope and number") Acked-by: Masami Hiramatsu (Google) Reviewed-by: Jiri Olsa Signed-off-by: Arnd Bergmann commit 93afd028fb5f06a46a32375fd1f0473451eb1c5a Author: Charles Keepax Date: Fri Aug 2 11:57:34 2024 +0100 ASoC: cs42l43: Cache shutter IRQ control pointers The microphone/speaker privacy shutter ALSA control handlers need to call pm_runtime_resume, since the hardware needs to be powered up to check the hardware state of the shutter. The IRQ handler for the shutters also needs to notify the ALSA control to inform user-space the shutters updated. However this leads to a mutex inversion, between the sdw_dev_lock and the controls_rwsem. To avoid this mutex inversion cache the kctl pointers before the IRQ handler, which avoids the need to lookup the control and take the controls_rwsem. Suggested-by: Jaroslav Kysela Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240802105734.2309788-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 4791c422981350d0de4ad02a14a08b99c766d06f Author: Charles Keepax Date: Fri Aug 2 11:57:33 2024 +0100 ASoC: cs35l45: Use new snd_soc_component_get_kcontrol_locked() helper No longer any need to hard code the addition of the name prefix, use the new helper function. Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240802105734.2309788-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit c8a132e2e032b00828d51141ab34f9aeb24f44ae Author: Charles Keepax Date: Fri Aug 2 11:57:32 2024 +0100 ASoC: soc-component: Add new snd_soc_component_get_kcontrol() helpers Add new helper functions snd_soc_component_get_kcontrol() and snd_soc_component_get_kcontrol_locked() that returns a kcontrol by name, but will factor in the components name_prefix, to handle situations where multiple components are present with the same controls. Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240802105734.2309788-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit becfa08bfefa2cbb22c84d9e583e81387f2f3bf2 Author: Charles Keepax Date: Fri Aug 2 11:57:31 2024 +0100 ASoC: cs42l43: Remove redundant semi-colon at end of function Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240802105734.2309788-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 64a66f4a3c89b4602ee1e6cd23b28729fc4562b3 Author: Pedro Henrique Kopper Date: Thu Aug 1 13:41:50 2024 -0300 cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids On Intel Emerald Rapids machines, we ship the Energy Performance Preference (EPP) default for balance_performance as 128. However, during an internal investigation together with Intel, we have determined that 32 is a more suitable value. This leads to significant improvements in both performance and energy: POV-Ray: 32% faster | 12% less energy OpenSSL: 12% faster | energy within 1% Build Linux Kernel: 29% faster | 18% less energy Therefore, we should move the default EPP for balance_performance to 32. This is in line with what has already been done for Sapphire Rapids. Signed-off-by: Pedro Henrique Kopper Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/Zqu6zjVMoiXwROBI@capivara Signed-off-by: Rafael J. Wysocki commit a09074228977c24c677c10282f506fa11f88eb93 Author: Rafael J. Wysocki Date: Thu Aug 1 18:39:28 2024 +0200 thermal: core: Update thermal zone registration documentation The thermal sysfs API document is outdated. One of the problems with it is that is still documents thermal_zone_device_register() which does not exit any more and it does not reflect the current thermal zone operations definition. Replace the thermal_zone_device_register() description in it with a thermal_zone_device_register_with_trips() description, including an update of the thermal zone operations list. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/2767845.mvXUDI8C0e@rjwysocki.net commit 1b8f9c1fb464968a5b18d3acc1da8c00bad24fad Author: Jason Gerecke Date: Tue Jul 30 08:51:55 2024 -0700 HID: wacom: Defer calculation of resolution until resolution_code is known The Wacom driver maps the HID_DG_TWIST usage to ABS_Z (rather than ABS_RZ) for historic reasons. When the code to support twist was introduced in commit 50066a042da5 ("HID: wacom: generic: Add support for height, tilt, and twist usages"), we were careful to write it in such a way that it had HID calculate the resolution of the twist axis assuming ABS_RZ instead (so that we would get correct angular behavior). This was broken with the introduction of commit 08a46b4190d3 ("HID: wacom: Set a default resolution for older tablets"), which moved the resolution calculation to occur *before* the adjustment from ABS_Z to ABS_RZ occurred. This commit moves the calculation of resolution after the point that we are finished setting things up for its proper use. Signed-off-by: Jason Gerecke Fixes: 08a46b4190d3 ("HID: wacom: Set a default resolution for older tablets") Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit c8000deb68365b461b324d68c7ea89d730f0bb85 Author: Dmitry Savin Date: Tue Jul 16 23:27:57 2024 +0100 HID: multitouch: Add support for GT7868Q GT7868Q has incorrect data in the report and needs a fixup. The change enables haptic touchpad on Lenovo ThinkBook 13x Gen 4 and has been tested on the device. Signed-off-by: Dmitry Savin Signed-off-by: Jiri Kosina commit 97155021ae17b86985121b33cf8098bcde00d497 Author: Olivier Sobrie Date: Tue Jul 23 10:44:35 2024 +0200 HID: amd_sfh: free driver_data after destroying hid device HID driver callbacks aren't called anymore once hid_destroy_device() has been called. Hence, hid driver_data should be freed only after the hid_destroy_device() function returned as driver_data is used in several callbacks. I observed a crash with kernel 6.10.0 on my T14s Gen 3, after enabling KASAN to debug memory allocation, I got this output: [ 13.050438] ================================================================== [ 13.054060] BUG: KASAN: slab-use-after-free in amd_sfh_get_report+0x3ec/0x530 [amd_sfh] [ 13.054809] psmouse serio1: trackpoint: Synaptics TrackPoint firmware: 0x02, buttons: 3/3 [ 13.056432] Read of size 8 at addr ffff88813152f408 by task (udev-worker)/479 [ 13.060970] CPU: 5 PID: 479 Comm: (udev-worker) Not tainted 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.063978] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.067860] Call Trace: [ 13.069383] input: TPPS/2 Synaptics TrackPoint as /devices/platform/i8042/serio1/input/input8 [ 13.071486] [ 13.071492] dump_stack_lvl+0x5d/0x80 [ 13.074870] snd_hda_intel 0000:33:00.6: enabling device (0000 -> 0002) [ 13.078296] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.082199] print_report+0x174/0x505 [ 13.085776] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.089367] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.093255] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.097464] kasan_report+0xc8/0x150 [ 13.101461] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.105802] amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.110303] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.114879] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.119450] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.124097] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.127404] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.131925] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.136455] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.140197] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.143602] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.147234] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.150446] ? __devm_add_action+0x167/0x1d0 [ 13.155061] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.158581] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.161814] platform_probe+0xa2/0x150 [ 13.165029] really_probe+0x1e3/0x8a0 [ 13.168243] __driver_probe_device+0x18c/0x370 [ 13.171500] driver_probe_device+0x4a/0x120 [ 13.175000] __driver_attach+0x190/0x4a0 [ 13.178521] ? __pfx___driver_attach+0x10/0x10 [ 13.181771] bus_for_each_dev+0x106/0x180 [ 13.185033] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.188229] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.191446] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.194382] bus_add_driver+0x29e/0x4d0 [ 13.197328] driver_register+0x1a5/0x360 [ 13.200283] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.203362] do_one_initcall+0xa7/0x380 [ 13.206432] ? __pfx_do_one_initcall+0x10/0x10 [ 13.210175] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.213211] ? kasan_unpoison+0x44/0x70 [ 13.216688] do_init_module+0x238/0x750 [ 13.219696] load_module+0x5011/0x6af0 [ 13.223096] ? kasan_save_stack+0x30/0x50 [ 13.226743] ? kasan_save_track+0x14/0x30 [ 13.230080] ? kasan_save_free_info+0x3b/0x60 [ 13.233323] ? poison_slab_object+0x109/0x180 [ 13.236778] ? __pfx_load_module+0x10/0x10 [ 13.239703] ? poison_slab_object+0x109/0x180 [ 13.243070] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.245924] ? init_module_from_file+0x13d/0x150 [ 13.248745] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.251503] ? init_module_from_file+0xdf/0x150 [ 13.254198] init_module_from_file+0xdf/0x150 [ 13.256826] ? __pfx_init_module_from_file+0x10/0x10 [ 13.259428] ? kasan_save_track+0x14/0x30 [ 13.261959] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.264471] ? kasan_save_free_info+0x3b/0x60 [ 13.267026] ? poison_slab_object+0x109/0x180 [ 13.269494] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.271949] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.274324] ? _raw_spin_lock+0x85/0xe0 [ 13.276671] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.278963] ? __rseq_handle_notify_resume+0x1a6/0xad0 [ 13.281193] idempotent_init_module+0x23b/0x650 [ 13.283420] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.285619] ? __pfx___seccomp_filter+0x10/0x10 [ 13.287714] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.289828] ? __fget_light+0x57/0x420 [ 13.291870] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.293880] ? security_capable+0x74/0xb0 [ 13.295820] __x64_sys_finit_module+0xbe/0x130 [ 13.297874] do_syscall_64+0x82/0x190 [ 13.299898] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.301905] ? irqtime_account_irq+0x3d/0x1f0 [ 13.303877] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.305753] ? __irq_exit_rcu+0x4e/0x130 [ 13.307577] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.309489] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 13.311371] RIP: 0033:0x7a21f96ade9d [ 13.313234] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 63 de 0c 00 f7 d8 64 89 01 48 [ 13.317051] RSP: 002b:00007ffeae934e78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.319024] RAX: ffffffffffffffda RBX: 00005987276bfcf0 RCX: 00007a21f96ade9d [ 13.321100] RDX: 0000000000000004 RSI: 00007a21f8eda376 RDI: 000000000000001c [ 13.323314] RBP: 00007a21f8eda376 R08: 0000000000000001 R09: 00007ffeae934ec0 [ 13.325505] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000 [ 13.327637] R13: 00005987276c1250 R14: 0000000000000000 R15: 00005987276c4530 [ 13.329737] [ 13.333945] Allocated by task 139: [ 13.336111] kasan_save_stack+0x30/0x50 [ 13.336121] kasan_save_track+0x14/0x30 [ 13.336125] __kasan_kmalloc+0xaa/0xb0 [ 13.336129] amdtp_hid_probe+0xb1/0x440 [amd_sfh] [ 13.336138] amd_sfh_hid_client_init+0xb8a/0x10f0 [amd_sfh] [ 13.336144] sfh_init_work+0x47/0x120 [amd_sfh] [ 13.336150] process_one_work+0x673/0xeb0 [ 13.336155] worker_thread+0x795/0x1250 [ 13.336160] kthread+0x290/0x350 [ 13.336164] ret_from_fork+0x34/0x70 [ 13.336169] ret_from_fork_asm+0x1a/0x30 [ 13.338175] Freed by task 139: [ 13.340064] kasan_save_stack+0x30/0x50 [ 13.340072] kasan_save_track+0x14/0x30 [ 13.340076] kasan_save_free_info+0x3b/0x60 [ 13.340081] poison_slab_object+0x109/0x180 [ 13.340085] __kasan_slab_free+0x32/0x50 [ 13.340089] kfree+0xe5/0x310 [ 13.340094] amdtp_hid_remove+0xb2/0x160 [amd_sfh] [ 13.340102] amd_sfh_hid_client_deinit+0x324/0x640 [amd_sfh] [ 13.340107] amd_sfh_hid_client_init+0x94a/0x10f0 [amd_sfh] [ 13.340113] sfh_init_work+0x47/0x120 [amd_sfh] [ 13.340118] process_one_work+0x673/0xeb0 [ 13.340123] worker_thread+0x795/0x1250 [ 13.340127] kthread+0x290/0x350 [ 13.340132] ret_from_fork+0x34/0x70 [ 13.340136] ret_from_fork_asm+0x1a/0x30 [ 13.342482] The buggy address belongs to the object at ffff88813152f400 which belongs to the cache kmalloc-64 of size 64 [ 13.347357] The buggy address is located 8 bytes inside of freed 64-byte region [ffff88813152f400, ffff88813152f440) [ 13.347367] The buggy address belongs to the physical page: [ 13.355409] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13152f [ 13.355416] anon flags: 0x2ffff8000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 13.355423] page_type: 0xffffefff(slab) [ 13.355429] raw: 02ffff8000000000 ffff8881000428c0 ffffea0004c43a00 0000000000000005 [ 13.355435] raw: 0000000000000000 0000000000200020 00000001ffffefff 0000000000000000 [ 13.355439] page dumped because: kasan: bad access detected [ 13.357295] Memory state around the buggy address: [ 13.357299] ffff88813152f300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357303] ffff88813152f380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357306] >ffff88813152f400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357309] ^ [ 13.357311] ffff88813152f480: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 13.357315] ffff88813152f500: 00 00 00 00 00 00 00 06 fc fc fc fc fc fc fc fc [ 13.357318] ================================================================== [ 13.357405] Disabling lock debugging due to kernel taint [ 13.383534] Oops: general protection fault, probably for non-canonical address 0xe0a1bc4140000013: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 13.383544] KASAN: maybe wild-memory-access in range [0x050e020a00000098-0x050e020a0000009f] [ 13.383551] CPU: 3 PID: 479 Comm: (udev-worker) Tainted: G B 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.383561] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.383565] RIP: 0010:amd_sfh_get_report+0x81/0x530 [amd_sfh] [ 13.383580] Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 78 03 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 08 49 8d 7c 24 10 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 45 8b 74 24 10 45 [ 13.383585] RSP: 0018:ffff8881261f7388 EFLAGS: 00010212 [ 13.383592] RAX: dffffc0000000000 RBX: ffff88813152f400 RCX: 0000000000000002 [ 13.383597] RDX: 00a1c04140000013 RSI: 0000000000000008 RDI: 050e020a0000009b [ 13.383600] RBP: ffff88814d010000 R08: 0000000000000002 R09: fffffbfff3ddb8c0 [ 13.383604] R10: ffffffff9eedc607 R11: ffff88810ce98000 R12: 050e020a0000008b [ 13.383607] R13: ffff88814d010000 R14: dffffc0000000000 R15: 0000000000000004 [ 13.383611] FS: 00007a21f94d0880(0000) GS:ffff8887e7d80000(0000) knlGS:0000000000000000 [ 13.383615] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 13.383618] CR2: 00007e0014c438f0 CR3: 000000012614c000 CR4: 0000000000f50ef0 [ 13.383622] PKRU: 55555554 [ 13.383625] Call Trace: [ 13.383629] [ 13.383632] ? __die_body.cold+0x19/0x27 [ 13.383644] ? die_addr+0x46/0x70 [ 13.383652] ? exc_general_protection+0x150/0x240 [ 13.383664] ? asm_exc_general_protection+0x26/0x30 [ 13.383674] ? amd_sfh_get_report+0x81/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383686] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383697] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383706] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383713] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.383727] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.383739] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383745] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.383753] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.383762] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.383768] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.383790] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383795] ? __devm_add_action+0x167/0x1d0 [ 13.383806] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.383818] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383826] platform_probe+0xa2/0x150 [ 13.383832] really_probe+0x1e3/0x8a0 [ 13.383838] __driver_probe_device+0x18c/0x370 [ 13.383844] driver_probe_device+0x4a/0x120 [ 13.383851] __driver_attach+0x190/0x4a0 [ 13.383857] ? __pfx___driver_attach+0x10/0x10 [ 13.383863] bus_for_each_dev+0x106/0x180 [ 13.383868] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.383874] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.383880] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383887] bus_add_driver+0x29e/0x4d0 [ 13.383895] driver_register+0x1a5/0x360 [ 13.383902] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.383910] do_one_initcall+0xa7/0x380 [ 13.383919] ? __pfx_do_one_initcall+0x10/0x10 [ 13.383927] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383933] ? kasan_unpoison+0x44/0x70 [ 13.383943] do_init_module+0x238/0x750 [ 13.383955] load_module+0x5011/0x6af0 [ 13.383962] ? kasan_save_stack+0x30/0x50 [ 13.383968] ? kasan_save_track+0x14/0x30 [ 13.383973] ? kasan_save_free_info+0x3b/0x60 [ 13.383980] ? poison_slab_object+0x109/0x180 [ 13.383993] ? __pfx_load_module+0x10/0x10 [ 13.384007] ? poison_slab_object+0x109/0x180 [ 13.384012] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384018] ? init_module_from_file+0x13d/0x150 [ 13.384025] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384032] ? init_module_from_file+0xdf/0x150 [ 13.384037] init_module_from_file+0xdf/0x150 [ 13.384044] ? __pfx_init_module_from_file+0x10/0x10 [ 13.384050] ? kasan_save_track+0x14/0x30 [ 13.384055] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384060] ? kasan_save_free_info+0x3b/0x60 [ 13.384066] ? poison_slab_object+0x109/0x180 [ 13.384071] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384080] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384085] ? _raw_spin_lock+0x85/0xe0 [ 13.384091] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.384096] ? __rseq_handle_notify_resume+0x1a6/0xad0 [ 13.384106] idempotent_init_module+0x23b/0x650 [ 13.384114] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.384120] ? __pfx___seccomp_filter+0x10/0x10 [ 13.384129] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384135] ? __fget_light+0x57/0x420 [ 13.384142] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384147] ? security_capable+0x74/0xb0 [ 13.384157] __x64_sys_finit_module+0xbe/0x130 [ 13.384164] do_syscall_64+0x82/0x190 [ 13.384174] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384179] ? irqtime_account_irq+0x3d/0x1f0 [ 13.384188] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384193] ? __irq_exit_rcu+0x4e/0x130 [ 13.384201] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384206] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 13.384212] RIP: 0033:0x7a21f96ade9d [ 13.384263] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 63 de 0c 00 f7 d8 64 89 01 48 [ 13.384267] RSP: 002b:00007ffeae934e78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.384273] RAX: ffffffffffffffda RBX: 00005987276bfcf0 RCX: 00007a21f96ade9d [ 13.384277] RDX: 0000000000000004 RSI: 00007a21f8eda376 RDI: 000000000000001c [ 13.384280] RBP: 00007a21f8eda376 R08: 0000000000000001 R09: 00007ffeae934ec0 [ 13.384284] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000 [ 13.384288] R13: 00005987276c1250 R14: 0000000000000000 R15: 00005987276c4530 [ 13.384297] [ 13.384299] Modules linked in: soundwire_amd(+) hid_sensor_gyro_3d(+) hid_sensor_magn_3d hid_sensor_accel_3d soundwire_generic_allocation amdxcp hid_sensor_trigger drm_exec industrialio_triggered_buffer soundwire_bus gpu_sched kvm_amd kfifo_buf qmi_helpers joydev drm_buddy hid_sensor_iio_common mousedev snd_soc_core industrialio i2c_algo_bit mac80211 snd_compress drm_suballoc_helper kvm snd_hda_intel drm_ttm_helper ac97_bus snd_pcm_dmaengine snd_intel_dspcfg ttm thinkpad_acpi(+) snd_intel_sdw_acpi hid_sensor_hub snd_rpl_pci_acp6x drm_display_helper snd_hda_codec hid_multitouch libarc4 snd_acp_pci platform_profile think_lmi(+) hid_generic firmware_attributes_class wmi_bmof cec snd_acp_legacy_common sparse_keymap rapl snd_hda_core psmouse cfg80211 pcspkr snd_pci_acp6x snd_hwdep video snd_pcm snd_pci_acp5x snd_timer snd_rn_pci_acp3x ucsi_acpi snd_acp_config snd sp5100_tco rfkill snd_soc_acpi typec_ucsi thunderbolt amd_sfh k10temp mhi soundcore i2c_piix4 snd_pci_acp3x typec i2c_hid_acpi roles i2c_hid wmi acpi_tad amd_pmc [ 13.384454] mac_hid i2c_dev crypto_user loop nfnetlink zram ip_tables x_tables dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel serio_raw sha512_ssse3 atkbd sha256_ssse3 libps2 sha1_ssse3 vivaldi_fmap nvme aesni_intel crypto_simd nvme_core cryptd ccp xhci_pci i8042 nvme_auth xhci_pci_renesas serio vfat fat btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq [ 13.384552] ---[ end trace 0000000000000000 ]--- KASAN reports a use-after-free of hid->driver_data in function amd_sfh_get_report(). The backtrace indicates that the function is called by amdtp_hid_request() which is one of the callbacks of hid device. The current make sure that driver_data is freed only once hid_destroy_device() returned. Note that I observed the crash both on v6.9.9 and v6.10.0. The code seems to be as it was from the early days of the driver. Signed-off-by: Olivier Sobrie Acked-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit d1aa95e86f178dc597e80228cd9bd81fc3510f34 Author: Luke D. Jones Date: Thu Jul 25 10:31:25 2024 +1200 hid-asus: add ROG Ally X prod ID to quirk list The new ASUS ROG Ally X functions almost exactly the same as the previous model, so we can use the same quirks. Signed-off-by: Luke D. Jones Signed-off-by: Jiri Kosina commit 62b45bab010d1b0cea6166f818f1cd0666a6d8d8 Author: Dave Airlie Date: Mon Jul 15 18:35:51 2024 +1000 drm/test: fix the gem shmem test to map the sg table. The test here creates an sg table, but never maps it, when we get to drm_gem_shmem_free, the helper tries to unmap and this causes warnings on some platforms and debug kernels. This also sets a 64-bit dma mask, as I see an swiotlb warning if I stick with the default 32-bit one. Fixes: 93032ae634d4 ("drm/test: add a test suite for GEM objects backed by shmem") Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie Reviewed-by: Michael J. Ruhl Acked-by: Daniel Vetter Reviewed-by: Marco Pagani Link: https://patchwork.freedesktop.org/patch/msgid/20240715083551.777807-1-airlied@gmail.com Signed-off-by: Maxime Ripard commit 113fd6372a5bb3689aba8ef5b8a265ed1529a78f Author: Ma Ke Date: Fri Aug 2 12:47:36 2024 +0800 drm/client: fix null pointer dereference in drm_client_modeset_probe In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is assigned to modeset->mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: stable@vger.kernel.org Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code") Signed-off-by: Ma Ke Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240802044736.1570345-1-make24@iscas.ac.cn commit ab3de2c7ec91db6a3cf5fc07765852c81ca7d6ef Author: Aapo Vienamo Date: Thu Jun 20 13:43:03 2024 +0300 thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write() Add missing free_page() call for the memory allocated by validate_and_copy_from_user(). Fixes: 6d241fa00159 ("thunderbolt: Add sideband register access to debugfs") Signed-off-by: Aapo Vienamo Reviewed-by: Przemek Kitszel Signed-off-by: Mika Westerberg commit 27ce65f65258cf2f2855162cbeef59659a81fac4 Author: Dave Airlie Date: Fri Aug 2 14:38:28 2024 +1000 Revert "nouveau: rip out busy fence waits" This reverts commit d45bb9c5f7a6f7b6e47939856b28cb1da0cdc119. Just got a report that this causes some suspend/resume issues, so back it out and I'll investigate it later. Reported-by: Mike Galbraith Signed-off-by: Dave Airlie commit 4eb399741ff67452eeaf099f366045042401cf3c Merge: 7b9b765168beb 9c685f61722d3 Author: Dave Airlie Date: Fri Aug 2 12:14:28 2024 +1000 Merge tag 'drm-misc-fixes-2024-08-01' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A couple drm_panic fixes, several v3d fixes to increase the new timestamp API safety, several fixes for vmwgfx for various modesetting issues, PM fixes for ast, async flips improvements and two fixes for nouveau to fix resource refcounting and buffer placement. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240801-interesting-antique-bat-2fe4c0@houat commit ffed586b8c4f1fdb772ee350e229863f145defb5 Author: Shin'ichiro Kawasaki Date: Thu Aug 1 14:42:34 2024 +0900 scsi: sd: Move sd_read_cpr() out of the q->limits_lock region Commit 804e498e0496 ("sd: convert to the atomic queue limits API") introduced pairs of function calls to queue_limits_start_update() and queue_limits_commit_update(). These two functions lock and unlock q->limits_lock. In sd_revalidate_disk(), sd_read_cpr() is called after queue_limits_start_update() call and before queue_limits_commit_update() call. sd_read_cpr() locks q->sysfs_dir_lock and &q->sysfs_lock. Then new lock dependencies were created between q->limits_lock, q->sysfs_dir_lock and q->sysfs_lock, as follows: sd_revalidate_disk queue_limits_start_update mutex_lock(&q->limits_lock) sd_read_cpr disk_set_independent_access_ranges mutex_lock(&q->sysfs_dir_lock) mutex_lock(&q->sysfs_lock) mutex_unlock(&q->sysfs_lock) mutex_unlock(&q->sysfs_dir_lock) queue_limits_commit_update mutex_unlock(&q->limits_lock) However, the three locks already had reversed dependencies in other places. Then the new dependencies triggered the lockdep WARN "possible circular locking dependency detected" [1]. This WARN was observed by running the blktests test case srp/002. To avoid the WARN, move the sd_read_cpr() call in sd_revalidate_disk() after the queue_limits_commit_update() call. In other words, move the sd_read_cpr() call out of the q->limits_lock region. [1] https://lore.kernel.org/linux-scsi/vlmv53ni3ltwxplig5qnw4xsl2h6ccxijfbqzekx76vxoim5a5@dekv7q3es3tx/ Fixes: 804e498e0496 ("sd: convert to the atomic queue limits API") Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240801054234.540532-1-shinichiro.kawasaki@wdc.com Tested-by: Luca Coelho Reviewed-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit ab9fd06cb8f0db0854291833fc40c789e43a361f Author: Vamshi Gajjela Date: Wed Jul 24 19:21:26 2024 +0530 scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic The ufshcd_add_delay_before_dme_cmd() always introduces a delay of MIN_DELAY_BEFORE_DME_CMDS_US between DME commands even when it's not required. The delay is added when the UFS host controller supplies the quirk UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS. Fix the logic to update hba->last_dme_cmd_tstamp to ensure subsequent DME commands have the correct delay in the range of 0 to MIN_DELAY_BEFORE_DME_CMDS_US. Update the timestamp at the end of the function to ensure it captures the latest time after any necessary delay has been applied. Signed-off-by: Vamshi Gajjela Link: https://lore.kernel.org/r/20240724135126.1786126-1-vamshigajjela@google.com Fixes: cad2e03d8607 ("ufs: add support to allow non standard behaviours (quirks)") Cc: stable@vger.kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 16dc75e500a37bc9a2fcc39d0c776a90ca06a34f Merge: 183d46ff422ef 4d2868b5d191c Author: Jakub Kicinski Date: Thu Aug 1 18:24:51 2024 -0700 Merge branch 'mptcp-fix-endpoints-with-signal-and-subflow-flags' Matthieu Baerts says: ==================== mptcp: fix endpoints with 'signal' and 'subflow' flags When looking at improving the user experience around the MPTCP endpoints setup, I noticed that setting an endpoint with both the 'signal' and the 'subflow' flags -- as it has been done in the past by users according to bug reports we got -- was resulting on only announcing the endpoint, but not using it to create subflows: the 'subflow' flag was then ignored. My initial thought was to modify IPRoute2 to warn the user when the two flags were set, but it doesn't sound normal to ignore one of them. I then looked at modifying the kernel not to allow having the two flags set, but when discussing about that with Mat, we thought it was maybe not ideal to do that, as there might be use-cases, we might break some configs. Then I saw it was working before v5.17. So instead, I fixed the support on the kernel side (patch 5) using Paolo's suggestion. This also includes a fix on the options side (patch 1: for v5.11+), an explicit deny of some options combinations (patch 2: for v5.18+), and some refactoring (patches 3 and 4) to ease the inclusion of the patch 5. While at it, I added a new selftest (patch 7) to validate this case -- including a modification of the chk_add_nr helper to inverse the sides were the counters are checked (patch 6) -- and allowed ADD_ADDR echo just after the MP_JOIN 3WHS. The selftests modification have the same Fixes tag as the previous commit, but no 'Cc: Stable': if the backport can work, that's good -- but it still need to be verified by running the selftests -- if not, no need to worry, many CIs will use the selftests from the last stable version to validate previous stable releases. ==================== Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-0-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit 4d2868b5d191c74262f7407972d68d1bf3245d6a Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:59 2024 +0200 selftests: mptcp: join: test both signal & subflow It should be quite uncommon to set both the subflow and the signal flags: the initiator of the connection is typically the one creating new subflows, not the other peer, then no need to announce additional local addresses, and use it to create subflows. But some people might be confused about the flags, and set both "just to be sure at least the right one is set". To verify the previous fix, and avoid future regressions, this specific case is now validated: the client announces a new address, and initiates a new subflow from the same address. While working on this, another bug has been noticed, where the client reset the new subflow because an ADD_ADDR echo got received as the 3rd ACK: this new test also explicitly checks that no RST have been sent by the client and server. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-7-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit bec1f3b119ebc613d08dfbcdbaef01a79aa7de92 Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:58 2024 +0200 selftests: mptcp: join: ability to invert ADD_ADDR check In the following commit, the client will initiate the ADD_ADDR, instead of the server. We need to way to verify the ADD_ADDR have been correctly sent. Note: the default expected counters for when the port number is given are never changed by the caller, no need to accept them as parameter then. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-6-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit 85df533a787bf07bf4367ce2a02b822ff1fba1a3 Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:57 2024 +0200 mptcp: pm: do not ignore 'subflow' if 'signal' flag is also set Up to the 'Fixes' commit, having an endpoint with both the 'signal' and 'subflow' flags, resulted in the creation of a subflow and an address announcement using the address linked to this endpoint. After this commit, only the address announcement was done, ignoring the 'subflow' flag. That's because the same bitmap is used for the two flags. It is OK to keep this single bitmap, the already selected local endpoint simply have to be re-used, but not via select_local_address() not to look at the just modified bitmap. Note that it is unusual to set the two flags together: creating a new subflow using a new local address will implicitly advertise it to the other peer. So in theory, no need to advertise it explicitly as well. Maybe there are use-cases -- the subflow might not reach the other peer that way, we can ask the other peer to try initiating the new subflow without delay -- or very likely the user is confused, and put both flags "just to be sure at least the right one is set". Still, if it is allowed, the kernel should do what has been asked: using this endpoint to announce the address and to create a new subflow from it. An alternative is to forbid the use of the two flags together, but that's probably too late, there are maybe use-cases, and it was working before. This patch will avoid people complaining subflows are not created using the endpoint they added with the 'subflow' and 'signal' flag. Note that with the current patch, the subflow might not be created in some corner cases, e.g. if the 'subflows' limit was reached when sending the ADD_ADDR, but changed later on. It is probably not worth splitting id_avail_bitmap per target ('signal', 'subflow'), which will add another large field to the msk "just" to track (again) endpoints. Anyway, currently when the limits are changed, the kernel doesn't check if new subflows can be created or removed, because we would need to keep track of the received ADD_ADDR, and more. It sounds OK to assume that the limits should be properly configured before establishing new connections. Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-5-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit cd7c957f936f8cb80d03e5152f4013aae65bd986 Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:56 2024 +0200 mptcp: pm: don't try to create sf if alloc failed It sounds better to avoid wasting cycles and / or put extreme memory pressure on the system by trying to create new subflows if it was not possible to add a new item in the announce list. While at it, a warning is now printed if the entry was already in the list as it should not happen with the in-kernel path-manager. With this PM, mptcp_pm_alloc_anno_list() should only fail in case of memory pressure. Fixes: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-4-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit c95eb32ced823a00be62202b43966b07b2f20b7f Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:55 2024 +0200 mptcp: pm: reduce indentation blocks That will simplify the following commits. No functional changes intended. Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-3-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit 8af1f11865f259c882cce71d32f85ee9004e2660 Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:54 2024 +0200 mptcp: pm: deny endp with signal + subflow + port As mentioned in the 'Fixes' commit, the port flag is only supported by the 'signal' flag, and not by the 'subflow' one. Then if both the 'signal' and 'subflow' flags are set, the problem is the same: the feature cannot work with the 'subflow' flag. Technically, if both the 'signal' and 'subflow' flags are set, it will be possible to create the listening socket, but not to establish a subflow using this source port. So better to explicitly deny it, not to create some confusions because the expected behaviour is not possible. Fixes: 09f12c3ab7a5 ("mptcp: allow to use port and non-signal in set_flags") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-2-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit d67c5649c1541dc93f202eeffc6f49220a4ed71d Author: Matthieu Baerts (NGI0) Date: Wed Jul 31 13:05:53 2024 +0200 mptcp: fully established after ADD_ADDR echo on MPJ Before this patch, receiving an ADD_ADDR echo on the just connected MP_JOIN subflow -- initiator side, after the MP_JOIN 3WHS -- was resulting in an MP_RESET. That's because only ACKs with a DSS or ADD_ADDRs without the echo bit were allowed. Not allowing the ADD_ADDR echo after an MP_CAPABLE 3WHS makes sense, as we are not supposed to send an ADD_ADDR before because it requires to be in full established mode first. For the MP_JOIN 3WHS, that's different: the ADD_ADDR can be sent on a previous subflow, and the ADD_ADDR echo can be received on the recently created one. The other peer will already be in fully established, so it is allowed to send that. We can then relax the conditions here to accept the ADD_ADDR echo for MPJ subflows. Fixes: 67b12f792d5e ("mptcp: full fully established support after ADD_ADDR") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-1-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski commit 7b9b765168beb8b7c7c26e60c9b7c86befc31e2b Merge: 774c6f271080f 5b51157266019 Author: Dave Airlie Date: Fri Aug 2 11:19:14 2024 +1000 Merge tag 'drm-intel-fixes-2024-08-01' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes - Static analysis fix for int overflow - Fix for HDCP2_STREAM_STATUS macro and removal of PWR_CLK_STATE for gen12 Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZqslBkcZlInYdYgm@jlahtine-mobl.ger.corp.intel.com commit 774c6f271080fea23e7780e063c665af8679f3af Merge: 8400291e289ee d2860084ecca4 Author: Dave Airlie Date: Fri Aug 2 08:21:34 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-07-27' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.11-2024-07-27: amdgpu: - SMU 14.x update - Fix contiguous VRAM handling for IB parsing - GFX 12 fix - Regression fix for old APUs Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240728025407.2115881-1-alexander.deucher@amd.com commit 8aa37bde1a7b645816cda8b80df4753ecf172bf1 Author: Al Viro Date: Thu Aug 1 15:22:22 2024 -0400 protect the fetch of ->fd[fd] in do_dup2() from mispredictions both callers have verified that fd is not greater than ->max_fds; however, misprediction might end up with tofree = fdt->fd[fd]; being speculatively executed. That's wrong for the same reasons why it's wrong in close_fd()/file_close_fd_locked(); the same solution applies - array_index_nospec(fd, fdt->max_fds) could differ from fd only in case of speculative execution on mispredicted path. Cc: stable@vger.kernel.org Signed-off-by: Al Viro commit dd35a0933269c636635b6af89dc6fa1782791e56 Author: David Gow Date: Wed Jul 31 15:30:29 2024 +0800 x86/uaccess: Zero the 8-byte get_range case on failure on 32-bit While zeroing the upper 32 bits of an 8-byte getuser on 32-bit x86 was fixed by commit 8c860ed825cb ("x86/uaccess: Fix missed zeroing of ia32 u64 get_user() range checking") it was broken again in commit 8a2462df1547 ("x86/uaccess: Improve the 8-byte getuser() case"). This is because the register which holds the upper 32 bits (%ecx) is being cleared _after_ the check_range, so if the range check fails, %ecx is never cleared. This can be reproduced with: ./tools/testing/kunit/kunit.py run --arch i386 usercopy Instead, clear %ecx _before_ check_range in the 8-byte case. This reintroduces a bit of the ugliness we were trying to avoid by adding another #ifndef CONFIG_X86_64, but at least keeps check_range from needing a separate bad_get_user_8 jump. Fixes: 8a2462df1547 ("x86/uaccess: Improve the 8-byte getuser() case") Signed-off-by: David Gow Signed-off-by: Thomas Gleixner Acked-by: Linus Torvalds Link: https://lore.kernel.org/all/20240731073031.4045579-1-davidgow@google.com commit 3b6564427aea83b7a35a15ca278291d50a1edcfc Author: Stuart Menefy Date: Sat Jun 22 12:42:16 2024 +0100 riscv: Fix linear mapping checks for non-contiguous memory regions The RISC-V kernel already has checks to ensure that memory which would lie outside of the linear mapping is not used. However those checks use memory_limit, which is used to implement the mem= kernel command line option (to limit the total amount of memory, not its address range). When memory is made up of two or more non-contiguous memory banks this check is incorrect. Two changes are made here: - add a call in setup_bootmem() to memblock_cap_memory_range() which will cause any memory which falls outside the linear mapping to be removed from the memory regions. - remove the check in create_linear_mapping_page_table() which was intended to remove memory which is outside the liner mapping based on memory_limit, as it is no longer needed. Note a check for mapping more memory than memory_limit (to implement mem=) is unnecessary because of the existing call to memblock_enforce_memory_limit(). This issue was seen when booting on a SV39 platform with two memory banks: 0x00,80000000 1GiB 0x20,00000000 32GiB This memory range is 158GiB from top to bottom, but the linear mapping is limited to 128GiB, so the lower block of RAM will be mapped at PAGE_OFFSET, and the upper block straddles the top of the linear mapping. This causes the following Oops: [ 0.000000] Linux version 6.10.0-rc2-gd3b8dd5b51dd-dirty (stuart.menefy@codasip.com) (riscv64-codasip-linux-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.41.0.20231213) #20 SMP Sat Jun 22 11:34:22 BST 2024 [ 0.000000] memblock_add: [0x0000000080000000-0x00000000bfffffff] early_init_dt_add_memory_arch+0x4a/0x52 [ 0.000000] memblock_add: [0x0000002000000000-0x00000027ffffffff] early_init_dt_add_memory_arch+0x4a/0x52 ... [ 0.000000] memblock_alloc_try_nid: 23724 bytes align=0x8 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 early_init_dt_alloc_memory_arch+0x1e/0x48 [ 0.000000] memblock_reserve: [0x00000027ffff5350-0x00000027ffffaffb] memblock_alloc_range_nid+0xb8/0x132 [ 0.000000] Unable to handle kernel paging request at virtual address fffffffe7fff5350 [ 0.000000] Oops [#1] [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.10.0-rc2-gd3b8dd5b51dd-dirty #20 [ 0.000000] Hardware name: codasip,a70x (DT) [ 0.000000] epc : __memset+0x8c/0x104 [ 0.000000] ra : memblock_alloc_try_nid+0x74/0x84 [ 0.000000] epc : ffffffff805e88c8 ra : ffffffff806148f6 sp : ffffffff80e03d50 [ 0.000000] gp : ffffffff80ec4158 tp : ffffffff80e0bec0 t0 : fffffffe7fff52f8 [ 0.000000] t1 : 00000027ffffb000 t2 : 5f6b636f6c626d65 s0 : ffffffff80e03d90 [ 0.000000] s1 : 0000000000005cac a0 : fffffffe7fff5350 a1 : 0000000000000000 [ 0.000000] a2 : 0000000000005cac a3 : fffffffe7fffaff8 a4 : 000000000000002c [ 0.000000] a5 : ffffffff805e88c8 a6 : 0000000000005cac a7 : 0000000000000030 [ 0.000000] s2 : fffffffe7fff5350 s3 : ffffffffffffffff s4 : 0000000000000000 [ 0.000000] s5 : ffffffff8062347e s6 : 0000000000000000 s7 : 0000000000000001 [ 0.000000] s8 : 0000000000002000 s9 : 00000000800226d0 s10: 0000000000000000 [ 0.000000] s11: 0000000000000000 t3 : ffffffff8080a928 t4 : ffffffff8080a928 [ 0.000000] t5 : ffffffff8080a928 t6 : ffffffff8080a940 [ 0.000000] status: 0000000200000100 badaddr: fffffffe7fff5350 cause: 000000000000000f [ 0.000000] [] __memset+0x8c/0x104 [ 0.000000] [] early_init_dt_alloc_memory_arch+0x1e/0x48 [ 0.000000] [] __unflatten_device_tree+0x52/0x114 [ 0.000000] [] unflatten_device_tree+0x9e/0xb8 [ 0.000000] [] setup_arch+0xd4/0x5bc [ 0.000000] [] start_kernel+0x76/0x81a [ 0.000000] Code: b823 02b2 bc23 02b2 b023 04b2 b423 04b2 b823 04b2 (bc23) 04b2 [ 0.000000] ---[ end trace 0000000000000000 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- The problem is that memblock (unaware that some physical memory cannot be used) has allocated memory from the top of memory but which is outside the linear mapping region. Signed-off-by: Stuart Menefy Fixes: c99127c45248 ("riscv: Make sure the linear mapping does not use the kernel mapping") Reviewed-by: David McKay Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240622114217.2158495-1-stuart.menefy@codasip.com Signed-off-by: Palmer Dabbelt commit c0ecd6388360d930440cc5554026818895199923 Merge: 183d46ff422ef 5560a612c20d3 Author: Linus Torvalds Date: Thu Aug 1 11:30:15 2024 -0700 Merge tag 'pci-v6.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fixes from Bjorn Helgaas: - Fix a pci_intx() regression that caused driver reload to fail with "Resources present before probing" (Philipp Stanner) - Fix a pciehp regression that clobbered the upper bits of RAID status LEDs on NVMe devices behind an Intel VMD (Blazej Kucman) * tag 'pci-v6.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: pciehp: Retain Power Indicator bits for userspace indicators PCI: Fix devres regression in pci_intx() commit aca0ec970d7644954caf01a40c5538d4400c01bd Author: Ackerley Tng Date: Thu Aug 1 17:39:55 2024 +0000 KVM: x86/mmu: fix determination of max NPT mapping level for private pages The `if (req_max_level)` test was meant ignore req_max_level if PG_LEVEL_NONE was returned. Hence, this function should return max_level instead of the ignored req_max_level. This is only a latent issue for now, since guest_memfd does not support large pages. Signed-off-by: Ackerley Tng Message-ID: <20240801173955.1975034-1-ackerleytng@google.com> Fixes: f32fb32820b1 ("KVM: x86: Add hook for determining max NPT mapping level") Signed-off-by: Paolo Bonzini commit 5560a612c20d3daacbf5da7913deefa5c31742f4 Author: Blazej Kucman Date: Mon Jul 22 16:14:40 2024 +0200 PCI: pciehp: Retain Power Indicator bits for userspace indicators The sysfs "attention" file normally controls the Slot Control Attention Indicator with 0 (off), 1 (on), 2 (blink) settings. 576243b3f9ea ("PCI: pciehp: Allow exclusive userspace control of indicators") added pciehp_set_raw_indicator_status() to allow userspace to directly control all four bits in both the Attention Indicator and the Power Indicator fields via the "attention" file. This is used on Intel VMD bridges so utilities like "ledmon" can use sysfs "attention" to control up to 16 indicators for NVMe device RAID status. abaaac4845a0 ("PCI: hotplug: Use FIELD_GET/PREP()") broke this by masking the sysfs data with PCI_EXP_SLTCTL_AIC, which discards the upper two bits intended for the Power Indicator Control field (PCI_EXP_SLTCTL_PIC). For NVMe devices behind an Intel VMD, ledmon settings that use the PCI_EXP_SLTCTL_PIC bits, i.e., ATTENTION_REBUILD (0x5), ATTENTION_LOCATE (0x7), ATTENTION_FAILURE (0xD), ATTENTION_OFF (0xF), no longer worked correctly. Mask with PCI_EXP_SLTCTL_AIC | PCI_EXP_SLTCTL_PIC to retain both the Attention Indicator and the Power Indicator bits. Fixes: abaaac4845a0 ("PCI: hotplug: Use FIELD_GET/PREP()") Link: https://lore.kernel.org/r/20240722141440.7210-1-blazej.kucman@intel.com Signed-off-by: Blazej Kucman [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v6.7+ commit 00f89ae4e759a7eef07e4188e1534af7dd2c7e9c Author: Philipp Stanner Date: Thu Jul 25 14:07:30 2024 +0200 PCI: Fix devres regression in pci_intx() pci_intx() becomes managed if pcim_enable_device() has been called in advance. Commit 25216afc9db5 ("PCI: Add managed pcim_intx()") changed this behavior so that pci_intx() always leads to creation of a separate device resource for itself, whereas earlier, a shared resource was used for all PCI devres operations. Unfortunately, pci_intx() seems to be used in some drivers' remove() paths; in the managed case this causes a device resource to be created on driver detach, which causes .probe() to fail if the driver is reloaded: pci 0000:00:1f.2: Resources present before probing Fix the regression by only redirecting pci_intx() to its managed twin pcim_intx() if the pci_command changes. Link: https://lore.kernel.org/r/20240725120729.59788-2-pstanner@redhat.com Fixes: 25216afc9db5 ("PCI: Add managed pcim_intx()") Reported-by: Damien Le Moal Closes: https://lore.kernel.org/all/b8f4ba97-84fc-4b7e-ba1a-99de2d9f0118@kernel.org/ Signed-off-by: Philipp Stanner [bhelgaas: add error message to commit log] Signed-off-by: Bjorn Helgaas Tested-by: Damien Le Moal commit 183d46ff422ef9f3d755b6808ef3faa6d009ba3a Merge: 21b136cc63d2a 25010bfdf8bbe Author: Linus Torvalds Date: Thu Aug 1 09:42:09 2024 -0700 Merge tag 'net-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from wireless, bleutooth, BPF and netfilter. Current release - regressions: - core: drop bad gso csum_start and offset in virtio_net_hdr - wifi: mt76: fix null pointer access in mt792x_mac_link_bss_remove - eth: tun: add missing bpf_net_ctx_clear() in do_xdp_generic() - phy: aquantia: only poll GLOBAL_CFG regs on aqr113, aqr113c and aqr115c Current release - new code bugs: - smc: prevent UAF in inet_create() - bluetooth: btmtk: fix kernel crash when entering btmtk_usb_suspend - eth: bnxt: reject unsupported hash functions Previous releases - regressions: - sched: act_ct: take care of padding in struct zones_ht_key - netfilter: fix null-ptr-deref in iptable_nat_table_init(). - tcp: adjust clamping window for applications specifying SO_RCVBUF Previous releases - always broken: - ethtool: rss: small fixes to spec and GET - mptcp: - fix signal endpoint re-add - pm: fix backup support in signal endpoints - wifi: ath12k: fix soft lockup on suspend - eth: bnxt_en: fix RSS logic in __bnxt_reserve_rings() - eth: ice: fix AF_XDP ZC timeout and concurrency issues - eth: mlx5: - fix missing lock on sync reset reload - fix error handling in irq_pool_request_irq" * tag 'net-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (76 commits) mptcp: fix duplicate data handling mptcp: fix bad RCVPRUNED mib accounting ipv6: fix ndisc_is_useropt() handling for PIO igc: Fix double reset adapter triggered from a single taprio cmd net: MAINTAINERS: Demote Qualcomm IPA to "maintained" net: wan: fsl_qmc_hdlc: Discard received CRC net: wan: fsl_qmc_hdlc: Convert carrier_lock spinlock to a mutex net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys net/mlx5e: Fix CT entry update leaks of modify header context net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability net/mlx5: Fix missing lock on sync reset reload net/mlx5: Lag, don't use the hardcoded value of the first port net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule net/mlx5: Fix error handling in irq_pool_request_irq net/mlx5: Always drain health in shutdown callback net: Add skbuff.h to MAINTAINERS r8169: don't increment tx_dropped in case of NETDEV_TX_BUSY netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init(). netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init(). net: drop bad gso csum_start and offset in virtio_net_hdr ... commit 1e7bec1f7d6533f08bc1c4ee94930c02361db86c Author: Josef Bacik Date: Mon Jul 29 11:05:48 2024 -0400 btrfs: emit a warning about space cache v1 being deprecated We've been wanting to get rid of this for a while, add a message to indicate that this feature is going away and when so we can finally have a date when we're going to remove it. The output looks like this BTRFS warning (device nvme0n1): space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2 Reviewed-by: Qu Wenruo Reviewed-by: Neal Gompa Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 30479f31d44d47ed00ae0c7453d9b253537005b2 Author: Boris Burkov Date: Fri Jul 19 16:49:08 2024 -0700 btrfs: fix qgroup reserve leaks in cow_file_range In the buffered write path, the dirty page owns the qgroup reserve until it creates an ordered_extent. Therefore, any errors that occur before the ordered_extent is created must free that reservation, or else the space is leaked. The fstest generic/475 exercises various IO error paths, and is able to trigger errors in cow_file_range where we fail to get to allocating the ordered extent. Note that because we *do* clear delalloc, we are likely to remove the inode from the delalloc list, so the inodes/pages to not have invalidate/launder called on them in the commit abort path. This results in failures at the unmount stage of the test that look like: BTRFS: error (device dm-8 state EA) in cleanup_transaction:2018: errno=-5 IO failure BTRFS: error (device dm-8 state EA) in btrfs_replace_file_extents:2416: errno=-5 IO failure BTRFS warning (device dm-8 state EA): qgroup 0/5 has unreleased space, type 0 rsv 28672 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 22588 at fs/btrfs/disk-io.c:4333 close_ctree+0x222/0x4d0 [btrfs] Modules linked in: btrfs blake2b_generic libcrc32c xor zstd_compress raid6_pq CPU: 3 PID: 22588 Comm: umount Kdump: loaded Tainted: G W 6.10.0-rc7-gab56fde445b8 #21 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 RIP: 0010:close_ctree+0x222/0x4d0 [btrfs] RSP: 0018:ffffb4465283be00 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffffa1a1818e1000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffb4465283bbe0 RDI: ffffa1a19374fcb8 RBP: ffffa1a1818e13c0 R08: 0000000100028b16 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000003 R12: ffffa1a18ad7972c R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f9168312b80(0000) GS:ffffa1a4afcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f91683c9140 CR3: 000000010acaa000 CR4: 00000000000006f0 Call Trace: ? close_ctree+0x222/0x4d0 [btrfs] ? __warn.cold+0x8e/0xea ? close_ctree+0x222/0x4d0 [btrfs] ? report_bug+0xff/0x140 ? handle_bug+0x3b/0x70 ? exc_invalid_op+0x17/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? close_ctree+0x222/0x4d0 [btrfs] generic_shutdown_super+0x70/0x160 kill_anon_super+0x11/0x40 btrfs_kill_super+0x11/0x20 [btrfs] deactivate_locked_super+0x2e/0xa0 cleanup_mnt+0xb5/0x150 task_work_run+0x57/0x80 syscall_exit_to_user_mode+0x121/0x130 do_syscall_64+0xab/0x1a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f916847a887 ---[ end trace 0000000000000000 ]--- BTRFS error (device dm-8 state EA): qgroup reserved space leaked Cases 2 and 3 in the out_reserve path both pertain to this type of leak and must free the reserved qgroup data. Because it is already an error path, I opted not to handle the possible errors in btrfs_free_qgroup_data. Reviewed-by: Qu Wenruo Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 872617a0896fc7510b0b8f25d323670424461cfc Author: Boris Burkov Date: Thu Jul 18 14:46:23 2024 -0700 btrfs: implement launder_folio for clearing dirty page reserve In the buffered write path, dirty pages can be said to "own" the qgroup reservation until they create an ordered_extent. It is possible for there to be outstanding dirty pages when a transaction is aborted, in which case there is no cancellation path for freeing this reservation and it is leaked. We do already walk the list of outstanding delalloc inodes in btrfs_destroy_delalloc_inodes() and call invalidate_inode_pages2() on them. This does *not* call btrfs_invalidate_folio(), as one might guess, but rather calls launder_folio() and release_folio(). Since this is a reservation associated with dirty pages only, rather than something associated with the private bit (ordered_extent is cancelled separately already in the cleanup transaction path), implementing this release should be done via launder_folio. Reviewed-by: Qu Wenruo Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 63447b7dd40c6a9ae8d3bb70c11f4c46731823e3 Author: Qu Wenruo Date: Fri Mar 8 13:40:31 2024 +1030 btrfs: scrub: update last_physical after scrubbing one stripe Currently sctx->stat.last_physical only got updated in the following cases: - When the last stripe of a non-RAID56 chunk is scrubbed This implies a pitfall, if the last stripe is at the chunk boundary, and we finished the scrub of the whole chunk, we won't update last_physical at all until the next chunk. - When a P/Q stripe of a RAID56 chunk is scrubbed This leads the following two problems: - sctx->stat.last_physical is not updated for a almost full chunk This is especially bad, affecting scrub resume, as the resume would start from last_physical, causing unnecessary re-scrub. - "btrfs scrub status" will not report any progress for a long time Fix the problem by properly updating @last_physical after each stripe is scrubbed. And since we're here, for the sake of consistency, use spin lock to protect the update of @last_physical, just like all the remaining call sites touching sctx->stat. Reported-by: Michel Palleau Link: https://lore.kernel.org/linux-btrfs/CAMFk-+igFTv2E8svg=cQ6o3e6CrR5QwgQ3Ok9EyRaEvvthpqCQ@mail.gmail.com/ Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 33eb1e5db351e2c0e652d878b66b8a6d4d013135 Author: Qu Wenruo Date: Fri Mar 8 13:40:30 2024 +1030 btrfs: factor out stripe length calculation into a helper Currently there are two locations which need to calculate the real length of a stripe (which can be at the end of a chunk, and the chunk size may not always be 64K aligned). Factor them into a helper as we're going to have a third user soon. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f126745da81783fb1d082e67bf14c6795e489a88 Author: Alice Ryhl Date: Mon Jul 29 14:22:49 2024 +0000 rust: SHADOW_CALL_STACK is incompatible with Rust When using the shadow call stack sanitizer, all code must be compiled with the -ffixed-x18 flag, but this flag is not currently being passed to Rust. This results in crashes that are extremely difficult to debug. To ensure that nobody else has to go through the same debugging session that I had to, prevent configurations that enable both SHADOW_CALL_STACK and RUST. It is rather common for people to backport 724a75ac9542 ("arm64: rust: Enable Rust support for AArch64"), so I recommend applying this fix all the way back to 6.1. Cc: stable@vger.kernel.org # 6.1 and later Fixes: 724a75ac9542 ("arm64: rust: Enable Rust support for AArch64") Signed-off-by: Alice Ryhl Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20240729-shadow-call-stack-v4-1-2a664b082ea4@google.com Signed-off-by: Catalin Marinas commit adeec61a4723fd3e39da68db4cc4d924e6d7f641 Author: Mark Rutland Date: Thu Aug 1 11:18:03 2024 +0100 arm64: errata: Expand speculative SSBS workaround (again) A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. We worked around this for a number of CPUs in commits: * 7187bb7d0b5c7dfa ("arm64: errata: Add workaround for Arm errata 3194386 and 3312417") * 75b3c43eab594bfb ("arm64: errata: Expand speculative SSBS workaround") Since then, similar errata have been published for a number of other Arm Ltd CPUs, for which the same mitigation is sufficient. This is described in their respective Software Developer Errata Notice (SDEN) documents: * Cortex-A76 (MP052) SDEN v31.0, erratum 3324349 https://developer.arm.com/documentation/SDEN-885749/3100/ * Cortex-A77 (MP074) SDEN v19.0, erratum 3324348 https://developer.arm.com/documentation/SDEN-1152370/1900/ * Cortex-A78 (MP102) SDEN v21.0, erratum 3324344 https://developer.arm.com/documentation/SDEN-1401784/2100/ * Cortex-A78C (MP138) SDEN v16.0, erratum 3324346 https://developer.arm.com/documentation/SDEN-1707916/1600/ * Cortex-A78C (MP154) SDEN v10.0, erratum 3324347 https://developer.arm.com/documentation/SDEN-2004089/1000/ * Cortex-A725 (MP190) SDEN v5.0, erratum 3456106 https://developer.arm.com/documentation/SDEN-2832921/0500/ * Cortex-X1 (MP077) SDEN v21.0, erratum 3324344 https://developer.arm.com/documentation/SDEN-1401782/2100/ * Cortex-X1C (MP136) SDEN v16.0, erratum 3324346 https://developer.arm.com/documentation/SDEN-1707914/1600/ * Neoverse-N1 (MP050) SDEN v32.0, erratum 3324349 https://developer.arm.com/documentation/SDEN-885747/3200/ * Neoverse-V1 (MP076) SDEN v19.0, erratum 3324341 https://developer.arm.com/documentation/SDEN-1401781/1900/ Note that due to the manner in which Arm develops IP and tracks errata, some CPUs share a common erratum number and some CPUs have multiple erratum numbers for the same HW issue. On parts without SB, it is necessary to use ISB for the workaround. The spec_bar() macro used in the mitigation will expand to a "DSB SY; ISB" sequence in this case, which is sufficient on all affected parts. Enable the existing mitigation by adding the relevant MIDRs to erratum_spec_ssbs_list. The list is sorted alphanumerically (involving moving Neoverse-V3 after Neoverse-V2) so that this is easy to audit and potentially extend again in future. The Kconfig text is also updated to clarify the set of affected parts and the mitigation. Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Reviewed-by: Anshuman Khandual Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240801101803.1982459-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 9ef54a384526911095db465e77acc1cb5266b32c Author: Mark Rutland Date: Thu Aug 1 11:18:02 2024 +0100 arm64: cputype: Add Cortex-A725 definitions Add cputype definitions for Cortex-A725. These will be used for errata detection in subsequent patches. These values can be found in the Cortex-A725 TRM: https://developer.arm.com/documentation/107652/0001/ ... in table A-247 ("MIDR_EL1 bit descriptions"). Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20240801101803.1982459-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 58d245e03c324d083a0ec3b9ab8ebd46ec9848d7 Author: Mark Rutland Date: Thu Aug 1 11:18:01 2024 +0100 arm64: cputype: Add Cortex-X1C definitions Add cputype definitions for Cortex-X1C. These will be used for errata detection in subsequent patches. These values can be found in the Cortex-X1C TRM: https://developer.arm.com/documentation/101968/0002/ ... in section B2.107 ("MIDR_EL1, Main ID Register, EL1"). Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20240801101803.1982459-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 3908ba2e0b2476e2ec13e15967bf6a37e449f2af Author: Nick Hu Date: Wed Jul 17 11:17:14 2024 +0800 RISC-V: Enable the IPI before workqueue_online_cpu() Sometimes the hotplug cpu stalls at the arch_cpu_idle() for a while after workqueue_online_cpu(). When cpu stalls at the idle loop, the reschedule IPI is pending. However the enable bit is not enabled yet so the cpu stalls at WFI until watchdog timeout. Therefore enable the IPI before the workqueue_online_cpu() to fix the issue. Fixes: 63c5484e7495 ("workqueue: Add multiple affinity scopes and interface to select them") Signed-off-by: Nick Hu Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20240717031714.1946036-1-nick.hu@sifive.com Signed-off-by: Palmer Dabbelt commit 0c710050c47d45eb77b28c271cddefc5c785cb40 Author: Zhe Qiao Date: Wed Jul 31 16:45:47 2024 +0800 riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error() Handle VM_FAULT_SIGSEGV in the page fault path so that we correctly kill the process and we don't BUG() the kernel. Fixes: 07037db5d479 ("RISC-V: Paging and MMU") Signed-off-by: Zhe Qiao Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240731084547.85380-1-qiaozhe@iscas.ac.cn Signed-off-by: Palmer Dabbelt commit 941a8e9b7a86763ac52d5bf6ccc9986d37fde628 Author: Shifrin Dmitry Date: Mon Jul 29 15:58:58 2024 +0300 perf: riscv: Fix selecting counters in legacy mode It is required to check event type before checking event config. Events with the different types can have the same config. This check is missed for legacy mode code For such perf usage: sysctl -w kernel.perf_user_access=2 perf stat -e cycles,L1-dcache-loads -- driver will try to force both events to CYCLE counter. This commit implements event type check before forcing events on the special counters. Signed-off-by: Shifrin Dmitry Reviewed-by: Atish Patra Fixes: cc4c07c89aad ("drivers: perf: Implement perf event mmap support in the SBI backend") Link: https://lore.kernel.org/r/20240729125858.630653-1-dmitry.shifrin@syntacore.com Signed-off-by: Palmer Dabbelt commit 57e5c814e91577a464484cc4b1a56ff86371a713 Author: Palmer Dabbelt Date: Mon Jul 22 08:45:20 2024 -0700 cache: StarFive: Require a 64-bit system This has a bunch of {read,write}q() calls, so it won't work on 32-bit systems. I don't think there's any 32-bit StarFive systems, so for now just require 64-bit. Fixes: cabff60ca77d ("cache: Add StarFive StarLink cache management") Acked-by: Conor Dooley Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20240722154519.25375-2-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt commit 63ba5b0fb4f54db256ec43b3062b2606b383055d Author: Eric Lin Date: Fri Jul 19 19:50:18 2024 +0800 perf arch events: Fix duplicate RISC-V SBI firmware event name Currently, the RISC-V firmware JSON file has duplicate event name "FW_SFENCE_VMA_RECEIVED". According to the RISC-V SBI PMU extension[1], the event name should be "FW_SFENCE_VMA_ASID_SENT". Before this patch: $ perf list firmware: fw_access_load [Load access trap event. Unit: cpu] fw_access_store [Store access trap event. Unit: cpu] .... fw_set_timer [Set timer event. Unit: cpu] fw_sfence_vma_asid_received [Received SFENCE.VMA with ASID request from other HART event. Unit: cpu] fw_sfence_vma_received [Sent SFENCE.VMA with ASID request to other HART event. Unit: cpu] After this patch: $ perf list firmware: fw_access_load [Load access trap event. Unit: cpu] fw_access_store [Store access trap event. Unit: cpu] ..... fw_set_timer [Set timer event. Unit: cpu] fw_sfence_vma_asid_received [Received SFENCE.VMA with ASID request from other HART event. Unit: cpu] fw_sfence_vma_asid_sent [Sent SFENCE.VMA with ASID request to other HART event. Unit: cpu] fw_sfence_vma_received [Received SFENCE.VMA request from other HART event. Unit: cpu] Link: https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-pmu.adoc#event-firmware-events-type-15 [1] Fixes: 8f0dcb4e7364 ("perf arch events: riscv sbi firmware std event files") Fixes: c4f769d4093d ("perf vendor events riscv: add Sifive U74 JSON file") Fixes: acbf6de674ef ("perf vendor events riscv: Add StarFive Dubhe-80 JSON file") Fixes: 7340c6df49df ("perf vendor events riscv: add T-HEAD C9xx JSON file") Fixes: f5102e31c209 ("riscv: andes: Support specifying symbolic firmware and hardware raw event") Signed-off-by: Eric Lin Reviewed-by: Samuel Holland Reviewed-by: Nikita Shubin Reviewed-by: Inochi Amaoto Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20240719115018.27356-1-eric.lin@sifive.com Signed-off-by: Palmer Dabbelt commit fb197c5d2fd24b9af3d4697d0cf778645846d6d5 Author: Daniel Maslowski Date: Fri Jul 19 19:04:37 2024 +0200 riscv/purgatory: align riscv_kernel_entry When alignment handling is delegated to the kernel, everything must be word-aligned in purgatory, since the trap handler is then set to the kexec one. Without the alignment, hitting the exception would ultimately crash. On other occasions, the kernel's handler would take care of exceptions. This has been tested on a JH7110 SoC with oreboot and its SBI delegating unaligned access exceptions and the kernel configured to handle them. Fixes: 736e30af583fb ("RISC-V: Add purgatory") Signed-off-by: Daniel Maslowski Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240719170437.247457-1-cyrevolt@gmail.com Signed-off-by: Palmer Dabbelt commit b07ce24df7fee54189a7bca583bcda81a5448198 Author: Arnd Bergmann Date: Mon Jul 29 23:44:59 2024 +0200 alpha: fix ioread64be()/iowrite64be() helpers Compile-testing the crypto/caam driver on alpha showed a pre-existing problem on alpha with iowrite64be() missing: ERROR: modpost: "iowrite64be" [drivers/crypto/caam/caam_jr.ko] undefined! The prototypes were added a while ago when we started using asm-generic/io.h, but the implementation was still missing. At some point the ioread64/iowrite64 helpers were added, but the big-endian versions are still missing, and the generic version (using readq/writeq) is would not work here. Change it to wrap ioread64()/iowrite64() instead. Fixes: beba3771d9e0 ("crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST") Fixes: e19d4ebc536d ("alpha: add full ioread64/iowrite64 implementation") Fixes: 7e772dad9913 ("alpha: Use generic ") Closes: https://lore.kernel.org/all/CAHk-=wgEyzSxTs467NDOVfBSzWvUS6ztcwhiy=M3xog==KBmTw@mail.gmail.com/ Tested-by: Guenter Roeck Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 3db03fb4995ef85fc41e86262ead7b4852f4bcf0 Author: Peter Zijlstra Date: Thu Aug 1 12:42:25 2024 +0200 x86/mm: Fix pti_clone_entry_text() for i386 While x86_64 has PMD aligned text sections, i386 does not have this luxery. Notably ALIGN_ENTRY_TEXT_END is empty and _etext has PAGE alignment. This means that text on i386 can be page granular at the tail end, which in turn means that the PTI text clones should consistently account for this. Make pti_clone_entry_text() consistent with pti_clone_kernel_text(). Fixes: 16a3fe634f6a ("x86/mm/pti: Clone kernel-image on PTE level for 32 bit") Signed-off-by: Peter Zijlstra (Intel) commit 41e71dbb0e0a0fe214545fe64af031303a08524c Author: Peter Zijlstra Date: Wed Jul 31 18:31:05 2024 +0200 x86/mm: Fix pti_clone_pgtable() alignment assumption Guenter reported dodgy crashes on an i386-nosmp build using GCC-11 that had the form of endless traps until entry stack exhaust and then #DF from the stack guard. It turned out that pti_clone_pgtable() had alignment assumptions on the start address, notably it hard assumes start is PMD aligned. This is true on x86_64, but very much not true on i386. These assumptions can cause the end condition to malfunction, leading to a 'short' clone. Guess what happens when the user mapping has a short copy of the entry text? Use the correct increment form for addr to avoid alignment assumptions. Fixes: 16a3fe634f6a ("x86/mm/pti: Clone kernel-image on PTE level for 32 bit") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Suggested-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240731163105.GG33588@noisy.programming.kicks-ass.net commit 7354eb7f1558466e92e926802d36e69e42938ea9 Author: Curtis Malainey Date: Wed Jul 31 14:21:44 2024 -0700 ASoC: SOF: Remove libraries from topology lookups Default firmware shipped in open source are not licensed for 3P libraries, therefore topologies should not reference them. If a OS wants to use 3P (that they have licensed) then they should use the appropriate topology override mechanisms. Fixes: 8a7d5d85ed2161 ("ASoC: SOF: mediatek: mt8195: Add devicetree support to select topologies") Signed-off-by: Curtis Malainey Cc: Wojciech Macek Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20240731212153.921327-1-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 31634d7597d8c57894b6c98eeefc9e58cf842993 Author: Xiubo Li Date: Fri Jul 12 12:40:19 2024 +0800 ceph: force sending a cap update msg back to MDS for revoke op If a client sends out a cap update dropping caps with the prior 'seq' just before an incoming cap revoke request, then the client may drop the revoke because it believes it's already released the requested capabilities. This causes the MDS to wait indefinitely for the client to respond to the revoke. It's therefore always a good idea to ack the cap revoke request with the bumped up 'seq'. Currently if the cap->issued equals to the newcaps the check_caps() will do nothing, we should force flush the caps. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/61782 Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Signed-off-by: Ilya Dryomov commit a6e9c391d45b5865b61e569146304cff72821a5d Author: Camila Alvarez Date: Tue Jul 30 19:42:43 2024 -0400 HID: cougar: fix slab-out-of-bounds Read in cougar_report_fixup report_fixup for the Cougar 500k Gaming Keyboard was not verifying that the report descriptor size was correct before accessing it Reported-by: syzbot+24c0361074799d02c452@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=24c0361074799d02c452 Signed-off-by: Camila Alvarez Reviewed-by: Silvan Jegen Signed-off-by: Jiri Kosina commit 9374ae912dbb1eed8139ed75fd2c0f1b30ca454d Author: Mengqi Zhang Date: Tue Jul 16 09:37:04 2024 +0800 mmc: mtk-sd: receive cmd8 data when hs400 tuning fail When we use cmd8 as the tuning command in hs400 mode, the command response sent back by some eMMC devices cannot be correctly sampled by MTK eMMC controller at some weak sample timing. In this case, command timeout error may occur. So we must receive the following data to make sure the next cmd8 send correctly. Signed-off-by: Mengqi Zhang Fixes: c4ac38c6539b ("mmc: mtk-sd: Add HS400 online tuning support") Cc: stable@vger.stable.com Link: https://lore.kernel.org/r/20240716013704.10578-1-mengqi.zhang@mediatek.com Signed-off-by: Ulf Hansson commit 25010bfdf8bbedc64c5c04d18f846412f5367d26 Merge: 2b4a32daa6de7 68cc924729ffc Author: Paolo Abeni Date: Thu Aug 1 12:30:15 2024 +0200 Merge branch 'mptcp-fix-duplicate-data-handling' Matthieu Baerts says: ==================== mptcp: fix duplicate data handling In some cases, the subflow-level's copied_seq counter was incorrectly increased, leading to an unexpected subflow reset. Patch 1/2 fixes the RCVPRUNED MIB counter that was attached to the wrong event since its introduction in v5.14, backported to v5.11. Patch 2/2 fixes the copied_seq counter issues, is present since v5.10. Signed-off-by: Matthieu Baerts (NGI0) ==================== Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-dup-data-v1-0-bde833fa628a@kernel.org Signed-off-by: Paolo Abeni commit 68cc924729ffcfe90d0383177192030a9aeb2ee4 Author: Paolo Abeni Date: Wed Jul 31 12:10:15 2024 +0200 mptcp: fix duplicate data handling When a subflow receives and discards duplicate data, the mptcp stack assumes that the consumed offset inside the current skb is zero. With multiple subflows receiving data simultaneously such assertion does not held true. As a result the subflow-level copied_seq will be incorrectly increased and later on the same subflow will observe a bad mapping, leading to subflow reset. Address the issue taking into account the skb consumed offset in mptcp_subflow_discard_data(). Fixes: 04e4cd4f7ca4 ("mptcp: cleanup mptcp_subflow_discard_data()") Cc: stable@vger.kernel.org Link: https://github.com/multipath-tcp/mptcp_net-next/issues/501 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 0a567c2a10033bf04ed618368d179bce6977984b Author: Paolo Abeni Date: Wed Jul 31 12:10:14 2024 +0200 mptcp: fix bad RCVPRUNED mib accounting Since its introduction, the mentioned MIB accounted for the wrong event: wake-up being skipped as not-needed on some edge condition instead of incoming skb being dropped after landing in the (subflow) receive queue. Move the increment in the correct location. Fixes: ce599c516386 ("mptcp: properly account bulk freed memory") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 2b4a32daa6de7ff4c978c07878880ab2bb475932 Merge: a46c68debf3be c22921df777de Author: Paolo Abeni Date: Thu Aug 1 12:08:28 2024 +0200 Merge tag 'nf-24-07-31' 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: Fix a possible null-ptr-deref sometimes triggered by iptables-restore at boot time. Register iptables {ipv4,ipv6} nat table pernet in first place to fix this issue. Patch #1 and #2 from Kuniyuki Iwashima. netfilter pull request 24-07-31 * tag 'nf-24-07-31' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init(). netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init(). ==================== Link: https://patch.msgid.link/20240731213046.6194-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit a46c68debf3be3a477a69ccbf0a1d050df841676 Author: Maciej Żenczykowski Date: Mon Jul 29 17:17:48 2024 -0700 ipv6: fix ndisc_is_useropt() handling for PIO The current logic only works if the PIO is between two other ND user options. This fixes it so that the PIO can also be either before or after other ND user options (for example the first or last option in the RA). side note: there's actually Android tests verifying a portion of the old broken behaviour, so: https://android-review.googlesource.com/c/kernel/tests/+/3196704 fixes those up. Cc: Jen Linkova Cc: Lorenzo Colitti Cc: Patrick Rohr Cc: David Ahern Cc: YOSHIFUJI Hideaki / 吉藤英明 Cc: Jakub Kicinski Signed-off-by: Maciej Żenczykowski Fixes: 048c796beb6e ("ipv6: adjust ndisc_is_useropt() to also return true for PIO") Link: https://patch.msgid.link/20240730001748.147636-1-maze@google.com Signed-off-by: Paolo Abeni commit f4973130d255dd4811006f5822d4fa4d0de9d712 Author: Satya Priya Kakitapalli Date: Wed Jul 31 11:59:12 2024 +0530 clk: qcom: clk-alpha-pll: Update set_rate for Zonda PLL The Zonda PLL has a 16 bit signed alpha and in the cases where the alpha value is greater than 0.5, the L value needs to be adjusted accordingly. Thus update the logic to handle the signed alpha val. Fixes: f21b6bfecc27 ("clk: qcom: clk-alpha-pll: add support for zonda pll") Cc: stable@vger.kernel.org Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240731062916.2680823-5-quic_skakitap@quicinc.com Signed-off-by: Bjorn Andersson commit 85e8ee59dfde1a7b847fbed0778391392cd985cb Author: Satya Priya Kakitapalli Date: Wed Jul 31 11:59:11 2024 +0530 clk: qcom: clk-alpha-pll: Fix zonda set_rate failure when PLL is disabled Currently, clk_zonda_pll_set_rate polls for the PLL to lock even if the PLL is disabled. However, if the PLL is disabled then LOCK_DET will never assert and we'll return an error. There is no reason to poll LOCK_DET if the PLL is already disabled, so skip polling in this case. Fixes: f21b6bfecc27 ("clk: qcom: clk-alpha-pll: add support for zonda pll") Cc: stable@vger.kernel.org Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240731062916.2680823-4-quic_skakitap@quicinc.com Signed-off-by: Bjorn Andersson commit 4ad1ed6ef27cab94888bb3c740c14042d5c0dff2 Author: Satya Priya Kakitapalli Date: Wed Jul 31 11:59:10 2024 +0530 clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API Correct the pll postdiv shift used in clk_trion_pll_postdiv_set_rate API. The shift value is not same for different types of plls and should be taken from the pll's .post_div_shift member. Fixes: 548a909597d5 ("clk: qcom: clk-alpha-pll: Add support for Trion PLLs") Cc: stable@vger.kernel.org Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240731062916.2680823-3-quic_skakitap@quicinc.com Signed-off-by: Bjorn Andersson commit 2c4553e6c485a96b5d86989eb9654bf20e51e6dd Author: Satya Priya Kakitapalli Date: Wed Jul 31 11:59:09 2024 +0530 clk: qcom: clk-alpha-pll: Fix the pll post div mask The PLL_POST_DIV_MASK should be 0 to (width - 1) bits. Fix it. Fixes: 1c3541145cbf ("clk: qcom: support for 2 bit PLL post divider") Cc: stable@vger.kernel.org Reviewed-by: Konrad Dybcio Signed-off-by: Satya Priya Kakitapalli Link: https://lore.kernel.org/r/20240731062916.2680823-2-quic_skakitap@quicinc.com Signed-off-by: Bjorn Andersson commit b9e7fc0aeda79031a101610b2fcb12bf031056e9 Author: Faizal Rahim Date: Tue Jul 30 10:33:02 2024 -0700 igc: Fix double reset adapter triggered from a single taprio cmd Following the implementation of "igc: Add TransmissionOverrun counter" patch, when a taprio command is triggered by user, igc processes two commands: TAPRIO_CMD_REPLACE followed by TAPRIO_CMD_STATS. However, both commands unconditionally pass through igc_tsn_offload_apply() which evaluates and triggers reset adapter. The double reset causes issues in the calculation of adapter->qbv_count in igc. TAPRIO_CMD_REPLACE command is expected to reset the adapter since it activates qbv. It's unexpected for TAPRIO_CMD_STATS to do the same because it doesn't configure any driver-specific TSN settings. So, the evaluation in igc_tsn_offload_apply() isn't needed for TAPRIO_CMD_STATS. To address this, commands parsing are relocated to igc_tsn_enable_qbv_scheduling(). Commands that don't require an adapter reset will exit after processing, thus avoiding igc_tsn_offload_apply(). Fixes: d3750076d464 ("igc: Add TransmissionOverrun counter") Signed-off-by: Faizal Rahim Acked-by: Vinicius Costa Gomes Reviewed-by: Vladimir Oltean Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240730173304.865479-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 4efce726e0cbc723178eea5b944e13775f628ecc Author: Krzysztof Kozlowski Date: Tue Jul 30 12:40:16 2024 +0200 net: MAINTAINERS: Demote Qualcomm IPA to "maintained" To the best of my knowledge, Alex Elder is not being paid to support Qualcomm IPA networking drivers, so drop the status from "supported" to "maintained". Signed-off-by: Krzysztof Kozlowski Acked-by: Alex Elder Link: https://patch.msgid.link/20240730104016.22103-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit e549360069b4a57e111b8222fc072f3c7c1688ab Author: Herve Codina Date: Tue Jul 30 08:31:33 2024 +0200 net: wan: fsl_qmc_hdlc: Discard received CRC Received frame from QMC contains the CRC. Upper layers don't need this CRC and tcpdump mentioned trailing junk data due to this CRC presence. As some other HDLC driver, simply discard this CRC. Fixes: d0f2258e79fd ("net: wan: Add support for QMC HDLC") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240730063133.179598-1-herve.codina@bootlin.com Signed-off-by: Jakub Kicinski commit c4d6a347ba7babdf9d90a0eb24048c266cae0532 Author: Herve Codina Date: Tue Jul 30 08:31:04 2024 +0200 net: wan: fsl_qmc_hdlc: Convert carrier_lock spinlock to a mutex The carrier_lock spinlock protects the carrier detection. While it is held, framer_get_status() is called which in turn takes a mutex. This is not correct and can lead to a deadlock. A run with PROVE_LOCKING enabled detected the issue: [ BUG: Invalid wait context ] ... c204ddbc (&framer->mutex){+.+.}-{3:3}, at: framer_get_status+0x40/0x78 other info that might help us debug this: context-{4:4} 2 locks held by ifconfig/146: #0: c0926a38 (rtnl_mutex){+.+.}-{3:3}, at: devinet_ioctl+0x12c/0x664 #1: c2006a40 (&qmc_hdlc->carrier_lock){....}-{2:2}, at: qmc_hdlc_framer_set_carrier+0x30/0x98 Avoid the spinlock usage and convert carrier_lock to a mutex. Fixes: 54762918ca85 ("net: wan: fsl_qmc_hdlc: Add framer support") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240730063104.179553-1-herve.codina@bootlin.com Signed-off-by: Jakub Kicinski commit fe16667f2959ec89488a872efbd9782bed250d10 Merge: 8f73ef8298589 3f8e82a020a5c Author: Jakub Kicinski Date: Wed Jul 31 18:04:53 2024 -0700 Merge branch 'mlx5-misc-fixes-2024-07-30' Tariq Toukan says: ==================== mlx5 misc fixes 2024-07-30 This patchset provides misc bug fixes from the team to the mlx5 core and Eth drivers. ==================== Link: https://patch.msgid.link/20240730061638.1831002-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 3f8e82a020a5c22f9b791f4ac499b8e18007fbda Author: Shahar Shitrit Date: Tue Jul 30 09:16:37 2024 +0300 net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys Since the documentation for mlx5_toggle_port_link states that it should only be used after setting the port register, we add a check for the return value from mlx5_port_set_eth_ptys to ensure the register was successfully set before calling it. Fixes: 667daedaecd1 ("net/mlx5e: Toggle link only after modifying port parameters") Signed-off-by: Shahar Shitrit Reviewed-by: Carolina Jubran Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 025f2b85a5e5a46df14ecf162c3c80a957a36d0b Author: Chris Mi Date: Tue Jul 30 09:16:36 2024 +0300 net/mlx5e: Fix CT entry update leaks of modify header context The cited commit allocates a new modify header to replace the old one when updating CT entry. But if failed to allocate a new one, eg. exceed the max number firmware can support, modify header will be an error pointer that will trigger a panic when deallocating it. And the old modify header point is copied to old attr. When the old attr is freed, the old modify header is lost. Fix it by restoring the old attr to attr when failed to allocate a new modify header context. So when the CT entry is freed, the right modify header context will be freed. And the panic of accessing error pointer is also fixed. Fixes: 94ceffb48eac ("net/mlx5e: Implement CT entry update") Signed-off-by: Chris Mi Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-8-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 06827e27fdcd197557be72b2229dbd362303794f Author: Rahul Rameshbabu Date: Tue Jul 30 09:16:35 2024 +0300 net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability Require mlx5 classifier action support when creating IPSec chains in offload path. MLX5_IPSEC_CAP_PRIO should only be set if CONFIG_MLX5_CLS_ACT is enabled. If CONFIG_MLX5_CLS_ACT=n and MLX5_IPSEC_CAP_PRIO is set, configuring IPsec offload will fail due to the mlxx5 ipsec chain rules failing to be created due to lack of classifier action support. Fixes: fa5aa2f89073 ("net/mlx5e: Use chains for IPsec policy priority offload") Signed-off-by: Rahul Rameshbabu Reviewed-by: Leon Romanovsky Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 572f9caa9e7295f8c8822e4122c7ae8f1c412ff9 Author: Moshe Shemesh Date: Tue Jul 30 09:16:34 2024 +0300 net/mlx5: Fix missing lock on sync reset reload On sync reset reload work, when remote host updates devlink on reload actions performed on that host, it misses taking devlink lock before calling devlink_remote_reload_actions_performed() which results in triggering lock assert like the following: WARNING: CPU: 4 PID: 1164 at net/devlink/core.c:261 devl_assert_locked+0x3e/0x50 … CPU: 4 PID: 1164 Comm: kworker/u96:6 Tainted: G S W 6.10.0-rc2+ #116 Hardware name: Supermicro SYS-2028TP-DECTR/X10DRT-PT, BIOS 2.0 12/18/2015 Workqueue: mlx5_fw_reset_events mlx5_sync_reset_reload_work [mlx5_core] RIP: 0010:devl_assert_locked+0x3e/0x50 … Call Trace: ? __warn+0xa4/0x210 ? devl_assert_locked+0x3e/0x50 ? report_bug+0x160/0x280 ? handle_bug+0x3f/0x80 ? exc_invalid_op+0x17/0x40 ? asm_exc_invalid_op+0x1a/0x20 ? devl_assert_locked+0x3e/0x50 devlink_notify+0x88/0x2b0 ? mlx5_attach_device+0x20c/0x230 [mlx5_core] ? __pfx_devlink_notify+0x10/0x10 ? process_one_work+0x4b6/0xbb0 process_one_work+0x4b6/0xbb0 […] Fixes: 84a433a40d0e ("net/mlx5: Lock mlx5 devlink reload callbacks") Signed-off-by: Moshe Shemesh Reviewed-by: Maor Gottlieb Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 3fda84dc090390573cfbd0b1d70372663315de21 Author: Mark Bloch Date: Tue Jul 30 09:16:33 2024 +0300 net/mlx5: Lag, don't use the hardcoded value of the first port The cited commit didn't change the body of the loop as it should. It shouldn't be using MLX5_LAG_P1. Fixes: 7e978e7714d6 ("net/mlx5: Lag, use actual number of lag ports") Signed-off-by: Mark Bloch Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 94a3ad6c081381fa9ee523781789802b4ed00faf Author: Yevgeny Kliteynik Date: Tue Jul 30 09:16:32 2024 +0300 net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule This patch reduces the size of hw_ste_arr_optimized array that is allocated on stack from 640 bytes (5 match STEs + 5 action STES) to 448 bytes (2 match STEs + 5 action STES). This fixes the 'stack guard page was hit' issue, while still fitting majority of the usecases (up to 2 match STEs). Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit a4557b0b57c40871ff00da4f623cf79211e052f3 Author: Shay Drory Date: Tue Jul 30 09:16:31 2024 +0300 net/mlx5: Fix error handling in irq_pool_request_irq In case mlx5_irq_alloc fails, the previously allocated index remains in the XArray, which could lead to inconsistencies. Fix it by adding error handling that erases the allocated index from the XArray if mlx5_irq_alloc returns an error. Fixes: c36326d38d93 ("net/mlx5: Round-Robin EQs over IRQs") Signed-off-by: Shay Drory Reviewed-by: Maher Sanalla Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 1b75da22ed1e6171e261bc9265370162553d5393 Author: Shay Drory Date: Tue Jul 30 09:16:30 2024 +0300 net/mlx5: Always drain health in shutdown callback There is no point in recovery during device shutdown. if health work started need to wait for it to avoid races and NULL pointer access. Hence, drain health WQ on shutdown callback. Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") Fixes: d2aa060d40fa ("net/mlx5: Cancel health poll before sending panic teardown command") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Tariq Toukan Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/20240730061638.1831002-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 8f73ef82985890e484efaed816b172fdf35c87aa Author: Breno Leitao Date: Tue Jul 30 09:14:03 2024 -0700 net: Add skbuff.h to MAINTAINERS The network maintainers need to be copied if the skbuff.h is touched. This also helps git-send-email to figure out the proper maintainers when touching the file. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240730161404.2028175-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit d516b187a9cc2e842030dd005be2735db3e8f395 Author: Heiner Kallweit Date: Tue Jul 30 21:51:52 2024 +0200 r8169: don't increment tx_dropped in case of NETDEV_TX_BUSY The skb isn't consumed in case of NETDEV_TX_BUSY, therefore don't increment the tx_dropped counter. Fixes: 188f4af04618 ("r8169: use NETDEV_TX_{BUSY/OK}") Cc: stable@vger.kernel.org Suggested-by: Jakub Kicinski Signed-off-by: Heiner Kallweit Reviewed-by: Wojciech Drewek Link: https://patch.msgid.link/bbba9c48-8bac-4932-9aa1-d2ed63bc9433@gmail.com Signed-off-by: Jakub Kicinski commit 601df205896da88e654d7c97d4579fa4af0b4adf Merge: 0bf50cead4c47 7764b9622db43 Author: Jakub Kicinski Date: Wed Jul 31 17:49:00 2024 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2024-07-31 We've added 2 non-merge commits during the last 2 day(s) which contain a total of 2 files changed, 2 insertions(+), 2 deletions(-). The main changes are: 1) Fix BPF selftest build after tree sync with regards to a _GNU_SOURCE macro redefined compilation error, from Stanislav Fomichev. 2) Fix a wrong test in the ASSERT_OK() check in uprobe_syscall BPF selftest, from Jiri Olsa. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf/selftests: Fix ASSERT_OK condition check in uprobe_syscall test selftests/bpf: Filter out _GNU_SOURCE when compiling test_cpp ==================== Link: https://patch.msgid.link/20240731115706.19677-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 9c685f61722d30a22d55bb8a48f7a48bb2e19bcc Author: Dave Airlie Date: Wed May 15 12:55:41 2024 +1000 nouveau: set placement to original placement on uvmm validate. When a buffer is evicted for memory pressure or TTM evict all, the placement is set to the eviction domain, this means the buffer never gets revalidated on the next exec to the correct domain. I think this should be fine to use the initial domain from the object creation, as least with VM_BIND this won't change after init so this should be the correct answer. Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Cc: Danilo Krummrich Cc: # v6.6 Signed-off-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240515025542.2156774-1-airlied@gmail.com commit 39a3396558fb97e6e7d4c1eb04c2166da31904a9 Author: Drew Fustini Date: Tue Jul 30 23:14:40 2024 -0700 clk: thead: fix dependency on clk_ignore_unused Add the CLK_IGNORE_UNUSED flag to the vp-axi clock (CLK_VP_AXI) to avoid depending on clk_ignore_unused in the cmdline. Without this fix, the emmc-sdio clock (CLK_EMMC_SDIO) fails to work after vp-axi is disabled. Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20240731061439.3807172-1-drew@pdp7.com Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks") Signed-off-by: Stephen Boyd commit c22921df777de5606f1047b1345b8d22ef1c0b34 Author: Kuniyuki Iwashima Date: Thu Jul 25 12:28:21 2024 -0700 netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init(). ip6table_nat_table_init() accesses net->gen->ptr[ip6table_nat_net_ops.id], but the function is exposed to user space before the entry is allocated via register_pernet_subsys(). Let's call register_pernet_subsys() before xt_register_template(). Fixes: fdacd57c79b7 ("netfilter: x_tables: never register tables by default") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 5830aa863981d43560748aa93589c0695191d95d Author: Kuniyuki Iwashima Date: Thu Jul 25 12:28:20 2024 -0700 netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init(). We had a report that iptables-restore sometimes triggered null-ptr-deref at boot time. [0] The problem is that iptable_nat_table_init() is exposed to user space before the kernel fully initialises netns. In the small race window, a user could call iptable_nat_table_init() that accesses net_generic(net, iptable_nat_net_id), which is available only after registering iptable_nat_net_ops. Let's call register_pernet_subsys() before xt_register_template(). [0]: bpfilter: Loaded bpfilter_umh pid 11702 Started bpfilter BUG: kernel NULL pointer dereference, address: 0000000000000013 PF: supervisor write access in kernel mode PF: error_code(0x0002) - not-present page PGD 0 P4D 0 PREEMPT SMP NOPTI CPU: 2 PID: 11879 Comm: iptables-restor Not tainted 6.1.92-99.174.amzn2023.x86_64 #1 Hardware name: Amazon EC2 c6i.4xlarge/, BIOS 1.0 10/16/2017 RIP: 0010:iptable_nat_table_init (net/ipv4/netfilter/iptable_nat.c:87 net/ipv4/netfilter/iptable_nat.c:121) iptable_nat Code: 10 4c 89 f6 48 89 ef e8 0b 19 bb ff 41 89 c4 85 c0 75 38 41 83 c7 01 49 83 c6 28 41 83 ff 04 75 dc 48 8b 44 24 08 48 8b 0c 24 <48> 89 08 4c 89 ef e8 a2 3b a2 cf 48 83 c4 10 44 89 e0 5b 5d 41 5c RSP: 0018:ffffbef902843cd0 EFLAGS: 00010246 RAX: 0000000000000013 RBX: ffff9f4b052caa20 RCX: ffff9f4b20988d80 RDX: 0000000000000000 RSI: 0000000000000064 RDI: ffffffffc04201c0 RBP: ffff9f4b29394000 R08: ffff9f4b07f77258 R09: ffff9f4b07f77240 R10: 0000000000000000 R11: ffff9f4b09635388 R12: 0000000000000000 R13: ffff9f4b1a3c6c00 R14: ffff9f4b20988e20 R15: 0000000000000004 FS: 00007f6284340000(0000) GS:ffff9f51fe280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000013 CR3: 00000001d10a6005 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? show_trace_log_lvl (arch/x86/kernel/dumpstack.c:259) ? show_trace_log_lvl (arch/x86/kernel/dumpstack.c:259) ? xt_find_table_lock (net/netfilter/x_tables.c:1259) ? __die_body.cold (arch/x86/kernel/dumpstack.c:478 arch/x86/kernel/dumpstack.c:420) ? page_fault_oops (arch/x86/mm/fault.c:727) ? exc_page_fault (./arch/x86/include/asm/irqflags.h:40 ./arch/x86/include/asm/irqflags.h:75 arch/x86/mm/fault.c:1470 arch/x86/mm/fault.c:1518) ? asm_exc_page_fault (./arch/x86/include/asm/idtentry.h:570) ? iptable_nat_table_init (net/ipv4/netfilter/iptable_nat.c:87 net/ipv4/netfilter/iptable_nat.c:121) iptable_nat xt_find_table_lock (net/netfilter/x_tables.c:1259) xt_request_find_table_lock (net/netfilter/x_tables.c:1287) get_info (net/ipv4/netfilter/ip_tables.c:965) ? security_capable (security/security.c:809 (discriminator 13)) ? ns_capable (kernel/capability.c:376 kernel/capability.c:397) ? do_ipt_get_ctl (net/ipv4/netfilter/ip_tables.c:1656) ? bpfilter_send_req (net/bpfilter/bpfilter_kern.c:52) bpfilter nf_getsockopt (net/netfilter/nf_sockopt.c:116) ip_getsockopt (net/ipv4/ip_sockglue.c:1827) __sys_getsockopt (net/socket.c:2327) __x64_sys_getsockopt (net/socket.c:2342 net/socket.c:2339 net/socket.c:2339) do_syscall_64 (arch/x86/entry/common.c:51 arch/x86/entry/common.c:81) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) RIP: 0033:0x7f62844685ee Code: 48 8b 0d 45 28 0f 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 0a c3 66 0f 1f 84 00 00 00 00 00 48 8b 15 09 RSP: 002b:00007ffd1f83d638 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ffd1f83d680 RCX: 00007f62844685ee RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 0000000000000004 R08: 00007ffd1f83d670 R09: 0000558798ffa2a0 R10: 00007ffd1f83d680 R11: 0000000000000246 R12: 00007ffd1f83e3b2 R13: 00007f628455baa0 R14: 00007ffd1f83d7b0 R15: 00007f628457a008 Modules linked in: iptable_nat(+) bpfilter rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache veth xt_state xt_connmark xt_nat xt_statistic xt_MASQUERADE xt_mark xt_addrtype ipt_REJECT nf_reject_ipv4 nft_chain_nat nf_nat xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_comment nft_compat nf_tables nfnetlink overlay nls_ascii nls_cp437 vfat fat ghash_clmulni_intel aesni_intel ena crypto_simd ptp cryptd i8042 pps_core serio button sunrpc sch_fq_codel configfs loop dm_mod fuse dax dmi_sysfs crc32_pclmul crc32c_intel efivarfs CR2: 0000000000000013 Fixes: fdacd57c79b7 ("netfilter: x_tables: never register tables by default") Reported-by: Takahiro Kawahara Signed-off-by: Kuniyuki Iwashima Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bf514327c324bc8af64f359b341cc9b189c096fd Author: Borislav Petkov (AMD) Date: Tue Jul 30 16:15:12 2024 +0200 x86/setup: Parse the builtin command line before merging Commit in Fixes was added as a catch-all for cases where the cmdline is parsed before being merged with the builtin one. And promptly one issue appeared, see Link below. The microcode loader really needs to parse it that early, but the merging happens later. Reshuffling the early boot nightmare^W code to handle that properly would be a painful exercise for another day so do the chicken thing and parse the builtin cmdline too before it has been merged. Fixes: 0c40b1c7a897 ("x86/setup: Warn when option parsing is done too early") Reported-by: Mike Lothian Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/all/20240730152108.GAZqkE5Dfi9AuKllRw@fat_crate.local Link: https://lore.kernel.org/r/20240722152330.GCZp55ck8E_FT4kPnC@fat_crate.local commit f85de245c6a8e2654e1e9158588bcf78e38cd5a5 Author: André Almeida Date: Tue Jul 2 18:22:15 2024 -0300 drm/atomic: Allow userspace to use damage clips with async flips Allow userspace to use damage clips with atomic async flips. Damage clips are useful for partial plane updates, which can be helpful for clients that want to do flips asynchronously. Fixes: 0e26cc72c71c ("drm: Refuse to async flip with atomic prop changes") Signed-off-by: André Almeida Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20240702212215.109696-2-andrealmeid@igalia.com commit e0fa4132bfae725a60c50d53bac80ec31fc20d89 Author: André Almeida Date: Tue Jul 2 18:22:14 2024 -0300 drm/atomic: Allow userspace to use explicit sync with atomic async flips Allow userspace to use explicit synchronization with atomic async flips. That means that the flip will wait for some hardware fence, and then will flip as soon as possible (async) in regard of the vblank. Fixes: 0e26cc72c71c ("drm: Refuse to async flip with atomic prop changes") Signed-off-by: André Almeida Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20240702212215.109696-1-andrealmeid@igalia.com commit 170c966cbe274e664288cfc12ee919d5e706dc50 Author: Laura Nao Date: Tue Jul 30 12:29:28 2024 +0200 selftests: ksft: Fix finished() helper exit code on skipped tests The Python finished() helper currently exits with KSFT_FAIL when there are only passed and skipped tests. Fix the logic to exit with KSFT_PASS instead, making it consistent with its C and bash counterparts (ksft_finished() and ktap_finished() respectively). Reviewed-by: Nícolas F. R. A. Prado Fixes: dacf1d7a78bf ("kselftest: Add test to verify probe of devices from discoverable buses") Signed-off-by: Laura Nao Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 684890a0185dabf5920c43b639133adc4c2632cf Author: John Keeping Date: Wed Jul 31 10:33:09 2024 +0100 Input: adc-joystick - fix optional value handling The abs-fuzz and abs-flat properties are documented as optional. When these are absent, fwnode_property_read_u32() will leave the input unchanged, meaning that an axis either picks up the value for the previous axis or an uninitialized value. Explicitly set these values to zero when they are unspecified to match the documented behaviour in the device tree bindings. Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20240731093310.3696919-1-jkeeping@inmusicbrands.com Signed-off-by: Dmitry Torokhov commit 478689b5990deb626a0b3f1ebf165979914d6be4 Author: Takashi Iwai Date: Wed Jul 31 19:05:15 2024 +0200 ALSA: hda: Conditionally use snooping for AMD HDMI The recent regression report revealed that the use of WC pages for AMD HDMI device together with AMD IOMMU leads to unexpected truncation or noises. The issue seems triggered by the change in the kernel core memory allocation that enables IOMMU driver to use always S/G buffers. Meanwhile, the use of WC pages has been a workaround for the similar issue with standard pages in the past. So, now we need to apply the workaround conditionally, namely, only when IOMMU isn't in place. This patch modifies the workaround code to check the DMA ops at first and apply the snoop-off only when needed. Fixes: f5ff79fddf0e ("dma-mapping: remove CONFIG_DMA_REMAP") Link: https://bugzilla.kernel.org/show_bug.cgi?id=219087 Link: https://patch.msgid.link/20240731170521.31714-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 21b136cc63d2a9ddd60d4699552b69c214b32964 Author: Linus Torvalds Date: Tue Jul 30 15:44:16 2024 -0700 minmax: fix up min3() and max3() too David Laight pointed out that we should deal with the min3() and max3() mess too, which still does excessive expansion. And our current macros are actually rather broken. In particular, the macros did this: #define min3(x, y, z) min((typeof(x))min(x, y), z) #define max3(x, y, z) max((typeof(x))max(x, y), z) and that not only is a nested expansion of possibly very complex arguments with all that involves, the typing with that "typeof()" cast is completely wrong. For example, imagine what happens in max3() if 'x' happens to be a 'unsigned char', but 'y' and 'z' are 'unsigned long'. The types are compatible, and there's no warning - but the result is just random garbage. No, I don't think we've ever hit that issue in practice, but since we now have sane infrastructure for doing this right, let's just use it. It fixes any excessive expansion, and also avoids these kinds of broken type issues. Requested-by: David Laight Acked-by: Arnd Bergmann Signed-off-by: Linus Torvalds commit b75a22e7d4f23dcd4f78ed2ff368a3d2a4556c0c Author: Samuel Holland Date: Thu Jul 18 14:29:59 2024 -0700 riscv: cpufeature: Do not drop Linux-internal extensions The Linux-internal Xlinuxenvcfg ISA extension is omitted from the riscv_isa_ext array because it has no DT binding and should not appear in /proc/cpuinfo. The logic added in commit 625034abd52a ("riscv: add ISA extensions validation callback") assumes all extensions are included in riscv_isa_ext, and so riscv_resolve_isa() wrongly drops Xlinuxenvcfg from the final ISA string. Instead, accept such Linux-internal ISA extensions as if they have no validation callback. Fixes: 625034abd52a ("riscv: add ISA extensions validation callback") Signed-off-by: Samuel Holland Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20240718213011.2600150-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit b4c1f33a5d59f577814d87704c45a745a35d8bd9 Author: Kanchan Joshi Date: Tue Jul 30 16:01:38 2024 +0530 nvme: reorganize nvme_ns_head fields shuffle few fields to reduce the holes within nvme_ns_head. On x86_64, the size is reduced to 1104 bytes from 1120 bytes. Signed-off-by: Kanchan Joshi Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 73d148ccb9e1b62cdcb65e1c6a461229446a55a2 Author: Kanchan Joshi Date: Tue Jul 30 16:01:37 2024 +0530 nvme: change data type of lba_shift u8 fits the need, so stop using int for it. Signed-off-by: Kanchan Joshi Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 6339b7edada2d0c4661bc4200f1adfc80f2e24aa Author: Kanchan Joshi Date: Tue Jul 30 16:01:36 2024 +0530 nvme: remove a field from nvme_ns_head pi_offset field is not required to be present in nvme_ns_head. Signed-off-by: Kanchan Joshi Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit e1cf752ede8e82c2d084868c50a1ca6cdb07c9c4 Author: Francesco Dolcini Date: Wed Jun 12 11:29:34 2024 +0200 dt-bindings: eeprom: at25: add fujitsu,mb85rs256 compatible The fujitsu,mb85rs256 is a 256 Kbit SPI memory FRAM in the same family as the two existing fujitsu,mb85rs* compatibles and at25 compatible. Signed-off-by: Francesco Dolcini Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612092934.12282-1-francesco@dolcini.it Signed-off-by: Rob Herring (Arm) commit 33bd8d153c337ba9b30a2e5994437ca703ab4ed8 Author: Heiko Carstens Date: Mon Jul 29 13:06:44 2024 +0200 s390: Keep inittext section writable There is no added security by making the inittext section non-writable, however it does split part of the kernel mapping into 4K mappings instead of 1M mappings: ---[ Kernel Image Start ]--- 0x000003ffe0000000-0x000003ffe0e00000 14M PMD RO X 0x000003ffe0e00000-0x000003ffe0ec7000 796K PTE RO X 0x000003ffe0ec7000-0x000003ffe0f00000 228K PTE RO NX 0x000003ffe0f00000-0x000003ffe1300000 4M PMD RO NX 0x000003ffe1300000-0x000003ffe1353000 332K PTE RO NX 0x000003ffe1353000-0x000003ffe1400000 692K PTE RW NX 0x000003ffe1400000-0x000003ffe1500000 1M PMD RW NX 0x000003ffe1500000-0x000003ffe1700000 2M PTE RW NX <--- 0x000003ffe1700000-0x000003ffe1800000 1M PMD RW NX 0x000003ffe1800000-0x000003ffe187e000 504K PTE RW NX ---[ Kernel Image End ]--- Keep the inittext writable and enable instruction execution protection (aka noexec) later to prevent this. This also allows to use the generic free_initmem() implementation. ---[ Kernel Image Start ]--- 0x000003ffe0000000-0x000003ffe0e00000 14M PMD RO X 0x000003ffe0e00000-0x000003ffe0ec7000 796K PTE RO X 0x000003ffe0ec7000-0x000003ffe0f00000 228K PTE RO NX 0x000003ffe0f00000-0x000003ffe1300000 4M PMD RO NX 0x000003ffe1300000-0x000003ffe1353000 332K PTE RO NX 0x000003ffe1353000-0x000003ffe1400000 692K PTE RW NX 0x000003ffe1400000-0x000003ffe1800000 4M PMD RW NX <--- 0x000003ffe1800000-0x000003ffe187e000 504K PTE RW NX ---[ Kernel Image End ]--- Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 75c10d5377d8821efafed32e4d72068d9c1f8ec0 Author: Heiko Carstens Date: Mon Jul 29 13:06:43 2024 +0200 s390/vmlinux.lds.S: Move ro_after_init section behind rodata section The .data.rel.ro and .got section were added between the rodata and ro_after_init data section, which adds an RW mapping in between all RO mapping of the kernel image: ---[ Kernel Image Start ]--- 0x000003ffe0000000-0x000003ffe0e00000 14M PMD RO X 0x000003ffe0e00000-0x000003ffe0ec7000 796K PTE RO X 0x000003ffe0ec7000-0x000003ffe0f00000 228K PTE RO NX 0x000003ffe0f00000-0x000003ffe1300000 4M PMD RO NX 0x000003ffe1300000-0x000003ffe1331000 196K PTE RO NX 0x000003ffe1331000-0x000003ffe13b3000 520K PTE RW NX <--- 0x000003ffe13b3000-0x000003ffe13d5000 136K PTE RO NX 0x000003ffe13d5000-0x000003ffe1400000 172K PTE RW NX 0x000003ffe1400000-0x000003ffe1500000 1M PMD RW NX 0x000003ffe1500000-0x000003ffe1700000 2M PTE RW NX 0x000003ffe1700000-0x000003ffe1800000 1M PMD RW NX 0x000003ffe1800000-0x000003ffe187e000 504K PTE RW NX ---[ Kernel Image End ]--- Move the ro_after_init data section again right behind the rodata section to prevent interleaving RO and RW mappings: ---[ Kernel Image Start ]--- 0x000003ffe0000000-0x000003ffe0e00000 14M PMD RO X 0x000003ffe0e00000-0x000003ffe0ec7000 796K PTE RO X 0x000003ffe0ec7000-0x000003ffe0f00000 228K PTE RO NX 0x000003ffe0f00000-0x000003ffe1300000 4M PMD RO NX 0x000003ffe1300000-0x000003ffe1353000 332K PTE RO NX 0x000003ffe1353000-0x000003ffe1400000 692K PTE RW NX 0x000003ffe1400000-0x000003ffe1500000 1M PMD RW NX 0x000003ffe1500000-0x000003ffe1700000 2M PTE RW NX 0x000003ffe1700000-0x000003ffe1800000 1M PMD RW NX 0x000003ffe1800000-0x000003ffe187e000 504K PTE RW NX ---[ Kernel Image End ]--- Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 1e72ba5566d90a668c1c0fbde319cec03454fd20 Author: Heiko Carstens Date: Mon Jul 29 15:45:58 2024 +0200 s390/mm: Get rid of RELOC_HIDE() Since __va(0) does not translate to NULL anymore remove RELOC_HIDE() which was only added to get rid of a compile warning with clang W=1: arch/s390/mm/vmem.c:666:36: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 666 | __set_memory_4k(__va(0), __va(0) + ident_map_size); | ~~~~~~~ ^ Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7e12284c523be33f34d43b2bf8627ab0c8af2388 Author: Heiko Carstens Date: Tue Jul 23 20:49:55 2024 +0200 s390/mm/ptdump: Improve sorting of markers Use the sort() from lib/sort.c to sort markers instead of the private implementation. The current implementation does not sort markers properly if they have to be moved downwards: ---[ Real Memory Copy Area Start ]--- 0x0000035b903ff000-0x0000035b90400000 4K PTE I ---[ vmalloc Area Start ]--- ---[ Real Memory Copy Area End ]--- Add a new member to each marker which indicates if a marker is start of an area. If addresses of areas are equal consider an address which defines the start of an area higher than the address which defines the end of an area. In result the output is sorted as intended: ---[ Real Memory Copy Area Start ]--- 0x0000019cedcff000-0x0000019cedd00000 4K PTE I ---[ Real Memory Copy Area End ]--- ---[ vmalloc Area Start ]--- Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7e4d4cfed6483303436687f1db9a28a377c6ab2a Author: Heiko Carstens Date: Tue Jul 23 20:49:54 2024 +0200 s390/mm/ptdump: Add support for relocated lowcore mapping The page table dumper contains a hard coded assumption that the first mapped area starts at address zero. With a relocated lowcore this is not true anymore. Subsequently the first entry (lowcore) is printed as if it would contain everything from address zero until the end of the location of the lowcore area. Fix this by adding a single "Kernel Virtual Address Space" entry, which always starts at address zero. It ends when the lowcore area starts which is either address zero, or its relocated address. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 373953444ce542db43535861fb8ebf3a1e05669c Author: Heiko Carstens Date: Tue Jul 23 20:49:53 2024 +0200 s390/mm/ptdump: Fix handling of identity mapping area Since virtual and real addresses are not the same anymore the assumption that the kernel image is contained within the identity mapping is also not true anymore. Fix this by adding two explicit areas and at the correct locations: one for the 8kb lowcore area, and one for the identity mapping. Fixes: c98d2ecae08f ("s390/mm: Uncouple physical vs virtual address spaces") Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c8e4d73eae835a1b9f6fc29f2577770ea8ca0c03 Author: Jeff Johnson Date: Mon Jul 15 08:58:51 2024 -0700 s390/cio: Add missing MODULE_DESCRIPTION() macros With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/cio/ccwgroup.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/cio/vfio_ccw.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Reviewed-by: Eric Farman Reviewed-by: Vineeth Vijayan Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240715-md-s390-drivers-s390-cio-v2-1-97eaa6971124@quicinc.com Signed-off-by: Vasily Gorbik commit 0a34c027a3dd756bdc17762db3acaeacdabacaf0 Author: Heiko Carstens Date: Sat Jul 27 19:34:27 2024 +0200 s390/alternatives: Remove unused empty header file Remove the unused and empty arch/s390/kernel/alternative.h header file which was added by mistake. Fixes: 5ade5be4edf8 ("s390: Add infrastructure to patch lowcore accesses") Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4734406c39238cbeafe66f0060084caa3247ff53 Author: Heiko Carstens Date: Thu Jul 25 11:31:52 2024 +0200 s390/fpu: Re-add exception handling in load_fpu_state() With the recent rewrite of the fpu code exception handling for the lfpc instruction within load_fpu_state() was erroneously removed. Add it again to prevent that loading invalid floating point register values cause an unhandled specification exception. Fixes: 8c09871a950a ("s390/fpu: limit save and restore to used registers") Cc: stable@vger.kernel.org Reported-by: Aristeu Rozanski Tested-by: Aristeu Rozanski Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b7b7e1ab7619deb3b299b5e5c619c3e6f183a12d Author: Takashi Iwai Date: Wed Jul 31 16:19:41 2024 +0200 ALSA: usb-audio: Correct surround channels in UAC1 channel map USB-audio driver puts SNDRV_CHMAP_SL and _SR as left and right surround channels for UAC1 channel map, respectively. But they should have been SNDRV_CHMAP_RL and _RR; the current value *_SL and _SR are rather "side" channels, not "surround". I guess I took those mistakenly when I read the spec mentioning "surround left". This patch corrects those entries to be the right channels. Suggested-by: Sylvain BERTRAND Closes: https://lore.kernel.orgZ/qIyJD8lhd8hFhlC@freedom Fixes: 04324ccc75f9 ("ALSA: usb-audio: add channel map support") Cc: Link: https://patch.msgid.link/20240731142018.24750-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9da8aa3b3ca05b22be5ba312771e6df4366e56cc Author: Francesco Dolcini Date: Wed Jul 31 13:48:28 2024 +0200 ASoC: nau8822: Lower debug print priority NAU8822 codec PLL parameters are not an information that the general user should care about, this print is supposed to be used for debugging, adjust the debug print priority accordingly. Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20240731114828.61238-1-francesco@dolcini.it Signed-off-by: Mark Brown commit 00af4f3dda1461ec90d892edc10bec6d3c50c554 Author: Marek Marczykowski-Górecki Date: Mon Jul 15 12:44:53 2024 +0200 USB: serial: debug: do not echo input by default This driver is intended as a "client" end of the console connection. When connected to a host it's supposed to receive debug logs, and possibly allow to interact with whatever debug console is available there. Feeding messages back, depending on a configuration may cause log messages be executed as shell commands (which can be really bad if one is unlucky, imagine a log message like "prevented running `rm -rf /home`"). In case of Xen, it exposes sysrq-like debug interface, and feeding it its own logs will pretty quickly hit 'R' for "instant reboot". Contrary to a classic serial console, the USB one cannot be configured ahead of time, as the device shows up only when target OS is up. And at the time device is opened to execute relevant ioctl, it's already too late, especially when logs start flowing shortly after device is initialized. Avoid the issue by changing default to no echo for this type of devices. Signed-off-by: Marek Marczykowski-Górecki [ johan: amend summary; disable also ECHONL ] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 98ea612dd1150adb61cd2a0e93875e1cc77e6b87 Author: Takashi Iwai Date: Wed Jul 31 15:05:26 2024 +0200 ALSA: seq: ump: Explicitly reset RPN with Null RPN RPN with 127:127 is treated as a Null RPN, just to reset the parameters, and it's not translated to MIDI2. Although the current code can work as is in most cases, better to implement the RPN reset explicitly for Null message. Link: https://patch.msgid.link/20240731130528.12600-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit a4ff92ff0bdd731eca9f0b50b1cbb5aba89be4b2 Author: Takashi Iwai Date: Wed Jul 31 15:05:25 2024 +0200 ALSA: seq: ump: Transmit RPN/NRPN message at each MSB/LSB data reception Just like the core UMP conversion helper, we need to deal with the partially-filled RPN/NRPN data in the sequencer UMP converter as well. Link: https://patch.msgid.link/20240731130528.12600-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit a683030606fa5ff8b722a5e28839d19288011ede Author: Takashi Iwai Date: Wed Jul 31 15:05:24 2024 +0200 ALSA: seq: ump: Use the common RPN/bank conversion context The UMP core conversion helper API already defines the context needed to record the bank and RPN/NRPN values, and we can simply re-use the same struct instead of re-defining the same content as a different name. Link: https://patch.msgid.link/20240731130528.12600-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 50a6dd19dca9446475f023eaa652016bfe5b1cbe Author: Takashi Iwai Date: Wed Jul 31 15:05:23 2024 +0200 ALSA: ump: Explicitly reset RPN with Null RPN RPN with 127:127 is treated as a Null RPN, just to reset the parameters, and it's not translated to MIDI2. Although the current code can work as is in most cases, better to implement the RPN reset explicitly for Null message. Link: https://patch.msgid.link/20240731130528.12600-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit e6ce8a28c768dbbad3f818db286cd0f4c7a921a8 Author: Takashi Iwai Date: Wed Jul 31 15:05:22 2024 +0200 ALSA: ump: Transmit RPN/NRPN message at each MSB/LSB data reception The UMP 1.1 spec says that an RPN/NRPN should be sent when one of the following occurs: * a CC 38 is received * a subsequent CC 6 is received * a CC 98, 99, 100, and 101 is received, indicating the last RPN/NRPN message has ended and a new one has started That said, we should send a partial data even if it's not fully filled. Let's change the UMP conversion helper code to follow that rule. Link: https://patch.msgid.link/20240731130528.12600-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 15fffc6a5624b13b428bb1c6e9088e32a55eb82c Author: Dan Williams Date: Fri Jul 12 12:42:09 2024 -0700 driver core: Fix uevent_show() vs driver detach race uevent_show() wants to de-reference dev->driver->name. There is no clean way for a device attribute to de-reference dev->driver unless that attribute is defined via (struct device_driver).dev_groups. Instead, the anti-pattern of taking the device_lock() in the attribute handler risks deadlocks with code paths that remove device attributes while holding the lock. This deadlock is typically invisible to lockdep given the device_lock() is marked lockdep_set_novalidate_class(), but some subsystems allocate a local lockdep key for @dev->mutex to reveal reports of the form: ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc7+ #275 Tainted: G OE N ------------------------------------------------------ modprobe/2374 is trying to acquire lock: ffff8c2270070de0 (kn->active#6){++++}-{0:0}, at: __kernfs_remove+0xde/0x220 but task is already holding lock: ffff8c22016e88f8 (&cxl_root_key){+.+.}-{3:3}, at: device_release_driver_internal+0x39/0x210 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&cxl_root_key){+.+.}-{3:3}: __mutex_lock+0x99/0xc30 uevent_show+0xac/0x130 dev_attr_show+0x18/0x40 sysfs_kf_seq_show+0xac/0xf0 seq_read_iter+0x110/0x450 vfs_read+0x25b/0x340 ksys_read+0x67/0xf0 do_syscall_64+0x75/0x190 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #0 (kn->active#6){++++}-{0:0}: __lock_acquire+0x121a/0x1fa0 lock_acquire+0xd6/0x2e0 kernfs_drain+0x1e9/0x200 __kernfs_remove+0xde/0x220 kernfs_remove_by_name_ns+0x5e/0xa0 device_del+0x168/0x410 device_unregister+0x13/0x60 devres_release_all+0xb8/0x110 device_unbind_cleanup+0xe/0x70 device_release_driver_internal+0x1c7/0x210 driver_detach+0x47/0x90 bus_remove_driver+0x6c/0xf0 cxl_acpi_exit+0xc/0x11 [cxl_acpi] __do_sys_delete_module.isra.0+0x181/0x260 do_syscall_64+0x75/0x190 entry_SYSCALL_64_after_hwframe+0x76/0x7e The observation though is that driver objects are typically much longer lived than device objects. It is reasonable to perform lockless de-reference of a @driver pointer even if it is racing detach from a device. Given the infrequency of driver unregistration, use synchronize_rcu() in module_remove_driver() to close any potential races. It is potentially overkill to suffer synchronize_rcu() just to handle the rare module removal racing uevent_show() event. Thanks to Tetsuo Handa for the debug analysis of the syzbot report [1]. Fixes: c0a40097f0bc ("drivers: core: synchronize really_probe() and dev_uevent()") Reported-by: syzbot+4762dd74e32532cda5ff@syzkaller.appspotmail.com Reported-by: Tetsuo Handa Closes: http://lore.kernel.org/5aa5558f-90a4-4864-b1b1-5d6784c5607d@I-love.SAKURA.ne.jp [1] Link: http://lore.kernel.org/669073b8ea479_5fffa294c1@dwillia2-xfh.jf.intel.com.notmuch Cc: stable@vger.kernel.org Cc: Ashish Sangwan Cc: Namjae Jeon Cc: Dirk Behme Cc: Greg Kroah-Hartman Cc: Rafael J. Wysocki Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/172081332794.577428.9738802016494057132.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Greg Kroah-Hartman commit ffcf2eb4bfa24f7256de53a95182c3e3e23fdc6c Author: David Collins Date: Thu Jul 25 09:46:33 2024 -0700 spmi: pmic-arb: add missing newline in dev_err format strings dev_err() format strings should end with '\n'. Several such format strings in the spmi-pmic-arb driver are missing it. Add newlines where needed. Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter") Signed-off-by: David Collins Link: https://lore.kernel.org/r/20240703221248.3640490-1-quic_collinsd@quicinc.com Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20240725164636.3362690-4-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit f38ba5459ced3441852f37f20fcfb7bd39d20f62 Author: Konrad Dybcio Date: Thu Jul 25 09:46:32 2024 -0700 spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree Currently, irqchips for all of the subnodes (which represent a given bus master) point to the parent wrapper node. This is no bueno, as no interrupts arrive, ever (because nothing references that node). Fix that by passing a reference to the respective master's of_node. Worth noting, this is a NOP for devices with only a single master described. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240522-topic-spmi_multi_master_irqfix-v2-1-7ec92a862b9f@linaro.org Reviewed-by: Abel Vesa Tested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter") Cc: stable@vger.kernel.org Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240725164636.3362690-3-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2c10a20f5e84ab777d29ed921d4c78d66de6d0fb Author: Mukesh Ojha Date: Thu Jul 25 11:55:10 2024 +0530 binder_alloc: Fix sleeping function called from invalid context 36c55ce8703c ("binder_alloc: Replace kcalloc with kvcalloc to mitigate OOM issues") introduced schedule while atomic issue. [ 2689.152635][ T4275] BUG: sleeping function called from invalid context at mm/vmalloc.c:2847 [ 2689.161291][ T4275] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4275, name: kworker/1:140 [ 2689.170708][ T4275] preempt_count: 1, expected: 0 [ 2689.175572][ T4275] RCU nest depth: 0, expected: 0 [ 2689.180521][ T4275] INFO: lockdep is turned off. [ 2689.180523][ T4275] Preemption disabled at: [ 2689.180525][ T4275] [] binder_alloc_deferred_release+0x2c/0x388 .. .. [ 2689.213419][ T4275] __might_resched+0x174/0x178 [ 2689.213423][ T4275] __might_sleep+0x48/0x7c [ 2689.213426][ T4275] vfree+0x4c/0x15c [ 2689.213430][ T4275] kvfree+0x24/0x44 [ 2689.213433][ T4275] binder_alloc_deferred_release+0x2c0/0x388 [ 2689.213436][ T4275] binder_proc_dec_tmpref+0x15c/0x2a8 [ 2689.213440][ T4275] binder_deferred_func+0xa8/0x8ec [ 2689.213442][ T4275] process_one_work+0x254/0x59c [ 2689.213447][ T4275] worker_thread+0x274/0x3ec [ 2689.213450][ T4275] kthread+0x110/0x134 [ 2689.213453][ T4275] ret_from_fork+0x10/0x20 Fix it by moving the place of kvfree outside of spinlock context. Fixes: 36c55ce8703c ("binder_alloc: Replace kcalloc with kvcalloc to mitigate OOM issues") Acked-by: Carlos Llamas Signed-off-by: Mukesh Ojha Link: https://lore.kernel.org/r/20240725062510.2856662-1-quic_mojha@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 11512c197d387b59569d3a93af93de204d3bdaa6 Author: Carlos Llamas Date: Mon Jul 22 15:05:11 2024 +0000 binder: fix descriptor lookup for context manager In commit 15d9da3f818c ("binder: use bitmap for faster descriptor lookup"), it was incorrectly assumed that references to the context manager node should always get descriptor zero assigned to them. However, if the context manager dies and a new process takes its place, then assigning descriptor zero to the new context manager might lead to collisions, as there could still be references to the older node. This issue was reported by syzbot with the following trace: kernel BUG at drivers/android/binder.c:1173! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 447 Comm: binder-util Not tainted 6.10.0-rc6-00348-g31643d84b8c3 #10 Hardware name: linux,dummy-virt (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : binder_inc_ref_for_node+0x500/0x544 lr : binder_inc_ref_for_node+0x1e4/0x544 sp : ffff80008112b940 x29: ffff80008112b940 x28: ffff0e0e40310780 x27: 0000000000000000 x26: 0000000000000001 x25: ffff0e0e40310738 x24: ffff0e0e4089ba34 x23: ffff0e0e40310b00 x22: ffff80008112bb50 x21: ffffaf7b8f246970 x20: ffffaf7b8f773f08 x19: ffff0e0e4089b800 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 000000002de4aa60 x14: 0000000000000000 x13: 2de4acf000000000 x12: 0000000000000020 x11: 0000000000000018 x10: 0000000000000020 x9 : ffffaf7b90601000 x8 : ffff0e0e48739140 x7 : 0000000000000000 x6 : 000000000000003f x5 : ffff0e0e40310b28 x4 : 0000000000000000 x3 : ffff0e0e40310720 x2 : ffff0e0e40310728 x1 : 0000000000000000 x0 : ffff0e0e40310710 Call trace: binder_inc_ref_for_node+0x500/0x544 binder_transaction+0xf68/0x2620 binder_thread_write+0x5bc/0x139c binder_ioctl+0xef4/0x10c8 [...] This patch adds back the previous behavior of assigning the next non-zero descriptor if references to previous context managers still exist. It amends both strategies, the newer dbitmap code and also the legacy slow_desc_lookup_olocked(), by allowing them to start looking for available descriptors at a given offset. Fixes: 15d9da3f818c ("binder: use bitmap for faster descriptor lookup") Cc: stable@vger.kernel.org Reported-and-tested-by: syzbot+3dae065ca76952a67257@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000c1c0a0061d1e6979@google.com/ Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20240722150512.4192473-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit d1009d04a0fefe4df86285cbb37c78aa0b7ab852 Author: Jeff Johnson Date: Wed Jul 17 09:17:07 2024 -0700 char: add missing NetWinder MODULE_DESCRIPTION() macros Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning with make W=1. The following warnings are being observed in drivers/char when CONFIG_ARCH_NETWINDER is enabled: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/ds1620.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/nwbutton.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/nwflash.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240717-md-arm-drivers-char-nw-v1-1-fee7a8505e9e@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f528cd55853968db8e959ff0e4c2c43e561e7b83 Author: Arnd Bergmann Date: Fri Jul 19 12:38:23 2024 +0200 misc: mrvl-cn10k-dpi: add PCI_IOV dependency I found one more missing dependency in the new driver: when building without CONFIG_PCI_IOV, pci_sriov_configure_simple() cannot be called directly: drivers/misc/mrvl_cn10k_dpi.c: In function 'dpi_remove': include/linux/stddef.h:9:14: error: called object is not a function or function pointer 9 | #define NULL ((void *)0) | ^ include/linux/pci.h:2416:41: note: in expansion of macro 'NULL' 2416 | #define pci_sriov_configure_simple NULL | ^~~~ drivers/misc/mrvl_cn10k_dpi.c:652:9: note: in expansion of macro 'pci_sriov_configure_simple' 652 | pci_sriov_configure_simple(pdev, 0); Add this to the Kconfig file as well. Fixes: 5f67eef6dff3 ("misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver") Signed-off-by: Arnd Bergmann Tested-by: Vamsi Attunuru Link: https://lore.kernel.org/r/20240719103858.1292094-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit e6cd0dc91ef9d24edda553343e64eb6b542c21dd Author: Armin Wolf Date: Sun Jul 14 01:48:13 2024 +0200 eeprom: ee1004: Fix locking issues in ee1004_probe() Currently, the devres-based management of ee1004_bus_data has several issues when it comes to locking: 1. It does not call mutex_unlock() before returning an error. 2. When encountering an error, it deadlocks when trying to recursively lock a mutex. Fix this by moving the mutex-protected bus data initialization into a separate function so that devm_add_action_or_reset() is called without the mutex being held. Reported-by: Dan Carpenter Fixes: 55d57ef6fa97 ("eeprom: ee1004: Use devres for bus data cleanup") Signed-off-by: Armin Wolf Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240713234813.21746-1-W_Armin@gmx.de Signed-off-by: Greg Kroah-Hartman commit be62f1289df01b7083f9ee5daf2a27d81355d666 Author: Jeff Johnson Date: Tue Jul 30 07:43:21 2024 -0700 fsi: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-hub.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-aspeed.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-gpio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-ast-cf.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-scom.o Add the missing invocations of the MODULE_DESCRIPTION() macro, and fix the copy/paste of the module description comment in fsi-master-ast-cf.c. Reviewed-by: Eddie James Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240730-module_description_orphans-v1-4-7094088076c8@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 741f5ba7ccba5d7ae796dd11c320e28045524771 Author: Quentin Schulz Date: Wed Jul 31 13:05:29 2024 +0200 arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma The Qseven BIOS_DISABLE signal on the RK3399-Q7 keeps the on-module eMMC and SPI flash powered-down initially (in fact it keeps the reset signal asserted). BIOS_DISABLE_OVERRIDE pin allows to override that signal so that eMMC and SPI can be used regardless of the state of the signal. Let's make this GPIO a hog so that it's reserved and locked in the proper state. At the same time, make sure the pin is reserved for the hog and cannot be requested by another node. Cc: stable@vger.kernel.org Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20240731-puma-emmc-6-v1-2-4e28eadf32d0@cherry.de Signed-off-by: Heiko Stuebner commit bb94a157b37ec23f53906a279320f6ed64300eba Author: Quentin Schulz Date: Wed Jul 31 13:05:28 2024 +0200 arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma In commit 91419ae0420f ("arm64: dts: rockchip: use BCLK to GPIO switch on rk3399"), an additional pinctrl state was added whose default pinmux is for 8ch i2s0. However, Puma only has 2ch i2s0. It's been overriding the pinctrl-0 property but the second property override was missed in the aforementioned commit. On Puma, a hardware slider called "BIOS Disable/Normal Boot" can disable eMMC and SPI to force booting from SD card. Another software-controlled GPIO is then configured to override this behavior to make eMMC and SPI available without human intervention. This is currently done in U-Boot and it was enough until the aforementioned commit. Indeed, because of this additional not-yet-overridden property, this software-controlled GPIO is now muxed in a state that does not override this hardware slider anymore, rendering SPI and eMMC flashes unusable. Let's override the property with the 2ch pinmux to fix this. Fixes: 91419ae0420f ("arm64: dts: rockchip: use BCLK to GPIO switch on rk3399") Cc: stable@vger.kernel.org Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20240731-puma-emmc-6-v1-1-4e28eadf32d0@cherry.de Signed-off-by: Heiko Stuebner commit 86fee2877f3427df5876159a182aa70d10964cdf Author: Greg Kroah-Hartman Date: Tue Jul 30 18:09:32 2024 +0200 Documentation: embargoed-hardware-issues.rst: add a section documenting the "early access" process Over the past years there have been many "misunderstandings" and "confusion" as to who is, and is not, allowed early access to the changes created by the members of the embargoed hardware issue teams working on a specific problem. The current process, while it does work, is "difficult" for many companies to understand and agree with. Because of this, there has been numerous attempts by many companies to work around the process by lies, subterfuge, and other side channels sometimes involving unsuspecting lawyers. Cut all of that out, and put the responsibility of distributing code on the silicon vendor affected, as they already have legal agreements in place that cover this type of distribution. When this distribution happens, the developers involved MUST be notified of this happening, to be kept aware of the situation at all times. The wording here has been hashed out by many different companies and lawyers involved in the process, as well as community members and everyone now agrees that the proposed change here should work better than what is currently happening. This change has been approved by a review from a large number of different open source legal members, representing the companies involved in this process. Link: https://lore.kernel.org/r/2024073035-bagel-vertigo-e0dd@gregkh Co-developed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner Co-developed-by: Michael Dolan Signed-off-by: Michael Dolan Co-developed-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman commit a2e4bdca2c361260609d47dff6c0e36ef2b41d4c Author: Greg Kroah-Hartman Date: Tue Jul 30 18:09:31 2024 +0200 Documentation: embargoed-hardware-issues.rst: minor cleanups and fixes The embargoed-hardware-issues.rst file needed a bunch of minor grammar, punctuation, and syntax cleanups based on feedback we have gotten over the past few years. The main change here is the term "silicon" being used over "hardware" to differentiate between companies that make a chip (i.e. a CPU) and those that take the chip and put it into their system. No process changes are made here at all, only clarification for the way the current process works. All of these changes have been approved by a review from a large number of different open source legal members, representing the companies involved in this process. Acked-by: Jonathan Corbet Link: https://lore.kernel.org/r/2024073032-outsource-sniff-e8ea@gregkh Co-developed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner Co-developed-by: Michael Dolan Signed-off-by: Michael Dolan Co-developed-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman commit cd04d50979502a1a965869dcd246d44db1bf0153 Author: Andrew Ballance Date: Mon Jul 8 19:44:26 2024 -0500 rust: firmware: fix invalid rustdoc link remove an extra quote from the doc comment so that rustdoc no longer genertes a link to a nonexistent file. Signed-off-by: Andrew Ballance Reviewed-by: Danilo Krummrich Acked-by: Miguel Ojeda Fixes: de6582833db0 ("rust: add firmware abstractions") Link: https://lore.kernel.org/r/20240709004426.44854-1-andrewjballance@gmail.com Signed-off-by: Greg Kroah-Hartman commit f73cefa3b72eaa90abfc43bf6d68137ba059d4b1 Author: Li Huafei Date: Tue Jul 30 06:09:28 2024 +0800 perf/x86: Fix smp_processor_id()-in-preemptible warnings The following bug was triggered on a system built with CONFIG_DEBUG_PREEMPT=y: # echo p > /proc/sysrq-trigger BUG: using smp_processor_id() in preemptible [00000000] code: sh/117 caller is perf_event_print_debug+0x1a/0x4c0 CPU: 3 UID: 0 PID: 117 Comm: sh Not tainted 6.11.0-rc1 #109 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: dump_stack_lvl+0x4f/0x60 check_preemption_disabled+0xc8/0xd0 perf_event_print_debug+0x1a/0x4c0 __handle_sysrq+0x140/0x180 write_sysrq_trigger+0x61/0x70 proc_reg_write+0x4e/0x70 vfs_write+0xd0/0x430 ? handle_mm_fault+0xc8/0x240 ksys_write+0x9c/0xd0 do_syscall_64+0x96/0x190 entry_SYSCALL_64_after_hwframe+0x4b/0x53 This is because the commit d4b294bf84db ("perf/x86: Hybrid PMU support for counters") took smp_processor_id() outside the irq critical section. If a preemption occurs in perf_event_print_debug() and the task is migrated to another cpu, we may get incorrect pmu debug information. Move smp_processor_id() back inside the irq critical section to fix this issue. Fixes: d4b294bf84db ("perf/x86: Hybrid PMU support for counters") Signed-off-by: Li Huafei Reviewed-and-tested-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20240729220928.325449-1-lihuafei1@huawei.com commit 224fa3552029a3d14bec7acf72ded8171d551b88 Author: Peter Zijlstra Date: Wed Jul 31 12:43:21 2024 +0200 jump_label: Fix the fix, brown paper bags galore Per the example of: !atomic_cmpxchg(&key->enabled, 0, 1) the inverse was written as: atomic_cmpxchg(&key->enabled, 1, 0) except of course, that while !old is only true for old == 0, old is true for everything except old == 0. Fix it to read: atomic_cmpxchg(&key->enabled, 1, 0) == 1 such that only the 1->0 transition returns true and goes on to disable the keys. Fixes: 83ab38ef0a0b ("jump_label: Fix concurrency issues in static_key_slow_dec()") Reported-by: Darrick J. Wong Signed-off-by: Peter Zijlstra (Intel) Tested-by: Darrick J. Wong Link: https://lkml.kernel.org/r/20240731105557.GY33588@noisy.programming.kicks-ass.net commit a366e46da10d7bfa1a52c3bd31f342a3d0e8e7fe Author: Mika Westerberg Date: Mon Jun 24 12:55:42 2024 +0300 pinctrl: meteorlake: Add Arrow Lake-H/U ACPI ID Intel Arrow Lake-H/U has the same GPIO hardware than Meteor Lake-P but the ACPI ID is different. Add this new ACPI ID to the list of supported devices. Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit 6881e75237a84093d0986f56223db3724619f26e Author: Thomas Gleixner Date: Wed Jul 31 12:23:51 2024 +0200 tick/broadcast: Move per CPU pointer access into the atomic section The recent fix for making the take over of the broadcast timer more reliable retrieves a per CPU pointer in preemptible context. This went unnoticed as compilers hoist the access into the non-preemptible region where the pointer is actually used. But of course it's valid that the compiler keeps it at the place where the code puts it which rightfully triggers: BUG: using smp_processor_id() in preemptible [00000000] code: caller is hotplug_cpu__broadcast_tick_pull+0x1c/0xc0 Move it to the actual usage site which is in a non-preemptible region. Fixes: f7d43dd206e7 ("tick/broadcast: Make takeover of broadcast hrtimer reliable") Reported-by: David Wang <00107082@163.com> Signed-off-by: Thomas Gleixner Tested-by: Yu Liao Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/87ttg56ers.ffs@tglx commit 6e20753da6bc651e02378a0cdb78f16c42098c88 Author: Max Krummenacher Date: Thu Jul 25 15:20:45 2024 +0200 tty: vt: conmakehash: cope with abs_srctree no longer in env conmakehash uses getenv("abs_srctree") from the environment to strip the absolute path from the generated sources. However since commit e2bad142bb3d ("kbuild: unexport abs_srctree and abs_objtree") this environment variable no longer gets set. Instead use basename() to indicate the used file in a comment of the generated source file. Fixes: 3bd85c6c97b2 ("tty: vt: conmakehash: Don't mention the full path of the input in output") Cc: stable Signed-off-by: Max Krummenacher Link: https://lore.kernel.org/stable/20240725132056.9151-1-max.oss.09%40gmail.com Link: https://lore.kernel.org/r/20240725132056.9151-1-max.oss.09@gmail.com Signed-off-by: Greg Kroah-Hartman commit d955d7cecb51b1a3ef4849886f39688aba3f60b3 Merge: f844793f2d374 f8ce49be27435 Author: Rafael J. Wysocki Date: Wed Jul 31 12:31:27 2024 +0200 Merge branch 'thermal-intel' Merge fixes for the int340x thermal driver handling of MSI IRQs: - Fix MSI error path cleanup in int340x, allow it to work with a subset of thermal MSI IRQs if some of them are not working and make it free all MSI IRQs on module exit (Srinivas Pandruvada). * thermal-intel: thermal: intel: int340x: Free MSI IRQ vectors on module exit thermal: intel: int340x: Allow limited thermal MSI support thermal: intel: int340x: Fix kernel warning during MSI cleanup commit 7d3b793faaab1305994ce568b59d61927235f57b Author: Hugo Villeneuve Date: Tue Jul 23 08:53:01 2024 -0400 serial: sc16is7xx: fix invalid FIFO access with special register set When enabling access to the special register set, Receiver time-out and RHR interrupts can happen. In this case, the IRQ handler will try to read from the FIFO thru the RHR register at address 0x00, but address 0x00 is mapped to DLL register, resulting in erroneous FIFO reading. Call graph example: sc16is7xx_startup(): entry sc16is7xx_ms_proc(): entry sc16is7xx_set_termios(): entry sc16is7xx_set_baud(): DLH/DLL = $009C --> access special register set sc16is7xx_port_irq() entry --> IIR is 0x0C sc16is7xx_handle_rx() entry sc16is7xx_fifo_read(): --> unable to access FIFO (RHR) because it is mapped to DLL (LCR=LCR_CONF_MODE_A) sc16is7xx_set_baud(): exit --> Restore access to general register set Fix the problem by claiming the efr_lock mutex when accessing the Special register set. Fixes: dfeae619d781 ("serial: sc16is7xx") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20240723125302.1305372-3-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 133f4c00b8b2bfcacead9b81e7e8edfceb4b06c4 Author: Hugo Villeneuve Date: Tue Jul 23 08:53:00 2024 -0400 serial: sc16is7xx: fix TX fifo corruption Sometimes, when a packet is received on channel A at almost the same time as a packet is about to be transmitted on channel B, we observe with a logic analyzer that the received packet on channel A is transmitted on channel B. In other words, the Tx buffer data on channel B is corrupted with data from channel A. The problem appeared since commit 4409df5866b7 ("serial: sc16is7xx: change EFR lock to operate on each channels"), which changed the EFR locking to operate on each channel instead of chip-wise. This commit has introduced a regression, because the EFR lock is used not only to protect the EFR registers access, but also, in a very obscure and undocumented way, to protect access to the data buffer, which is shared by the Tx and Rx handlers, but also by each channel of the IC. Fix this regression first by switching to kfifo_out_linear_ptr() in sc16is7xx_handle_tx() to eliminate the need for a shared Rx/Tx buffer. Secondly, replace the chip-wise Rx buffer with a separate Rx buffer for each channel. Fixes: 4409df5866b7 ("serial: sc16is7xx: change EFR lock to operate on each channels") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20240723125302.1305372-2-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit f844793f2d374ffb7f2231f4d36cd4bc52f12de0 Author: Rafael J. Wysocki Date: Tue Jul 30 16:41:18 2024 +0200 thermal: trip: Avoid skipping trips in thermal_zone_set_trips() Say there are 3 trip points A, B, C sorted in ascending temperature order with no hysteresis. If the zone temerature is exactly equal to B, thermal_zone_set_trips() will set the boundaries to A and C and the hardware will not catch any crossing of B (either way) until either A or C is crossed and the boundaries are changed. To avoid that, use non-strict inequalities when comparing the trip threshold to the zone temperature in thermal_zone_set_trips(). In the example above, it will cause both boundaries to be set to B, which is desirable because an interrupt will trigger when the zone temperature becomes different from B regardless of which way it goes. That will allow a new interval to be set depending on the direction of the zone temperature change. Fixes: 893bae92237d ("thermal: trip: Make thermal_zone_set_trips() use trip thresholds") Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/12509184.O9o76ZdvQC@rjwysocki.net commit 6eabce6608d6f3440f4c03aa3d3ef50a47a3d193 Author: George Kennedy Date: Wed Jul 17 07:24:38 2024 -0500 serial: core: check uartclk for zero to avoid divide by zero Calling ioctl TIOCSSERIAL with an invalid baud_base can result in uartclk being zero, which will result in a divide by zero error in uart_get_divisor(). The check for uartclk being zero in uart_set_info() needs to be done before other settings are made as subsequent calls to ioctl TIOCSSERIAL for the same port would be impacted if the uartclk check was done where uartclk gets set. Oops: divide error: 0000 PREEMPT SMP KASAN PTI RIP: 0010:uart_get_divisor (drivers/tty/serial/serial_core.c:580) Call Trace: serial8250_get_divisor (drivers/tty/serial/8250/8250_port.c:2576 drivers/tty/serial/8250/8250_port.c:2589) serial8250_do_set_termios (drivers/tty/serial/8250/8250_port.c:502 drivers/tty/serial/8250/8250_port.c:2741) serial8250_set_termios (drivers/tty/serial/8250/8250_port.c:2862) uart_change_line_settings (./include/linux/spinlock.h:376 ./include/linux/serial_core.h:608 drivers/tty/serial/serial_core.c:222) uart_port_startup (drivers/tty/serial/serial_core.c:342) uart_startup (drivers/tty/serial/serial_core.c:368) uart_set_info (drivers/tty/serial/serial_core.c:1034) uart_set_info_user (drivers/tty/serial/serial_core.c:1059) tty_set_serial (drivers/tty/tty_io.c:2637) tty_ioctl (drivers/tty/tty_io.c:2647 drivers/tty/tty_io.c:2791) __x64_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:907 fs/ioctl.c:893 fs/ioctl.c:893) 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) Reported-by: syzkaller Cc: stable@vger.kernel.org Signed-off-by: George Kennedy Rule: add Link: https://lore.kernel.org/stable/1721148848-9784-1-git-send-email-george.kennedy%40oracle.com Link: https://lore.kernel.org/r/1721219078-3209-1-git-send-email-george.kennedy@oracle.com Signed-off-by: Greg Kroah-Hartman commit 3114f77e9453daa292ec0906f313a715c69b5943 Author: Kuppuswamy Sathyanarayanan Date: Tue Jul 30 15:59:30 2024 +0000 platform/x86/intel/ifs: Initialize union ifs_status to zero If the IFS scan test exits prematurely due to a timeout before completing a single run, the union ifs_status remains uninitialized, leading to incorrect test status reporting. To prevent this, always initialize the union ifs_status to zero. Fixes: 2b40e654b73a ("platform/x86/intel/ifs: Add scan test support") Suggested-by: Ilpo Järvinen Reviewed-by: Jithu Joseph Reviewed-by: Ashok Raj Signed-off-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20240730155930.1754744-1-sathyanarayanan.kuppuswamy@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 6e73c490445ae77c52f62fcf9a49193d17c6f79a Author: Luis Felipe Hernandez Date: Tue Jul 30 20:15:59 2024 -0400 platform/x86: msi-wmi-platform: Fix spelling mistakes There were a few instances of typos that lead could to confusion when reading. The following words have been corrected: Binay -> Binary singe -> single chaged -> changed Signed-off-by: Luis Felipe Hernandez Reviewed-by: Armin Wolf Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20240731001602.259338-1-luis.hernandez093@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 3dab73ab925a51ab05543b491bf17463a48ca323 Author: Edmund Raile Date: Tue Jul 30 19:53:29 2024 +0000 Revert "ALSA: firewire-lib: operate for period elapse event in process context" Commit 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event in process context") removed the process context workqueue from amdtp_domain_stream_pcm_pointer() and update_pcm_pointers() to remove its overhead. With RME Fireface 800, this lead to a regression since Kernels 5.14.0, causing an AB/BA deadlock competition for the substream lock with eventual system freeze under ALSA operation: thread 0: * (lock A) acquire substream lock by snd_pcm_stream_lock_irq() in snd_pcm_status64() * (lock B) wait for tasklet to finish by calling tasklet_unlock_spin_wait() in tasklet_disable_in_atomic() in ohci_flush_iso_completions() of ohci.c thread 1: * (lock B) enter tasklet * (lock A) attempt to acquire substream lock, waiting for it to be released: snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed() in update_pcm_pointers() in process_ctx_payloads() in process_rx_packets() of amdtp-stream.c ? tasklet_unlock_spin_wait ohci_flush_iso_completions firewire_ohci amdtp_domain_stream_pcm_pointer snd_firewire_lib snd_pcm_update_hw_ptr0 snd_pcm snd_pcm_status64 snd_pcm ? native_queued_spin_lock_slowpath _raw_spin_lock_irqsave snd_pcm_period_elapsed snd_pcm process_rx_packets snd_firewire_lib irq_target_callback snd_firewire_lib handle_it_packet firewire_ohci context_tasklet firewire_ohci Restore the process context work queue to prevent deadlock AB/BA deadlock competition for ALSA substream lock of snd_pcm_stream_lock_irq() in snd_pcm_status64() and snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed(). revert commit 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event in process context") Replace inline description to prevent future deadlock. Cc: stable@vger.kernel.org Fixes: 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event in process context") Reported-by: edmund.raile Closes: https://lore.kernel.org/r/kwryofzdmjvzkuw6j3clftsxmoolynljztxqwg76hzeo4simnl@jn3eo7pe642q/ Signed-off-by: Edmund Raile Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20240730195318.869840-3-edmund.raile@protonmail.com commit 6ccf9984d6be3c2f804087b736db05c2ec42664b Author: Edmund Raile Date: Tue Jul 30 19:53:26 2024 +0000 Revert "ALSA: firewire-lib: obsolete workqueue for period update" prepare resolution of AB/BA deadlock competition for substream lock: restore workqueue previously used for process context: revert commit b5b519965c4c ("ALSA: firewire-lib: obsolete workqueue for period update") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/kwryofzdmjvzkuw6j3clftsxmoolynljztxqwg76hzeo4simnl@jn3eo7pe642q/ Signed-off-by: Edmund Raile Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20240730195318.869840-2-edmund.raile@protonmail.com commit b1dad2f091382b0049c72dab8153779248fa8016 Author: Harshit Mogalapalli Date: Wed Jul 24 09:23:51 2024 -0700 usb: typec: tipd: Delete extra semi-colon There shouldn't be a ; at the end of the function, delete it. Signed-off-by: Harshit Mogalapalli Reviewed-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240724162356.992763-2-harshit.m.mogalapalli@oracle.com Signed-off-by: Greg Kroah-Hartman commit 8290b567621ba4e3ccf45ec9d67e0507196c5ddc Author: Harshit Mogalapalli Date: Wed Jul 24 09:23:50 2024 -0700 usb: typec: tipd: Fix dereferencing freeing memory in tps6598x_apply_patch() release_firmware() already frees fw, fix this my moving release_firmware after the dereference. Fixes: 916b8e5fa73d ("usb: typec: tipd: add error log to provide firmware name and size") Signed-off-by: Harshit Mogalapalli Reviewed-by: Heikki Krogerus Reviewed-by: Javier Carrasco Link: https://lore.kernel.org/r/20240724162356.992763-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Greg Kroah-Hartman commit 5a444bea37e2759549ef72bfe83d1c8712e76b3d Author: Prashanth K Date: Tue Jul 30 18:27:54 2024 +0530 usb: gadget: u_serial: Set start_delayed during suspend Upstream commit aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") added started_delayed flag, so that new ports which are opened after USB suspend can start IO while resuming. But if the port was already opened, and gadget suspend kicks in afterwards, start_delayed will never be set. This causes resume to bail out before calling gs_start_io(). Fix this by setting start_delayed during suspend. Fixes: aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") Cc: stable@vger.kernel.org Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20240730125754.576326-1-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 3c526089a663e25ac78b6a61d84a52a83680d0c3 Author: Dan Carpenter Date: Fri Jul 12 09:05:50 2024 -0500 usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap() The tcpci_check_std_output_cap() function is supposed to return negative error codes but it's declared as type bool so the error handling doesn't work. Declare it as an int instead. Fixes: 62ce9ef14797 ("usb: typec: tcpci: add support to set connector orientation") Signed-off-by: Dan Carpenter Reviewed-by: Heikki Krogerus Reviewed-by: Marco Felsch Link: https://lore.kernel.org/r/b0880888-6719-4614-91fc-8ee63b71d304@stanley.mountain Signed-off-by: Greg Kroah-Hartman commit e885f5f1f2b43575aa8e4e31404132d77d6663d1 Author: Konrad Dybcio Date: Mon Jul 29 10:42:58 2024 +0200 usb: typec: fsa4480: Check if the chip is really there Currently, the driver will happily register the switch/mux devices, and so long as the i2c master doesn't complain, the user would never know there's something wrong. Add a device id check (based on [1]) and return -ENODEV if the read fails or returns nonsense. Checking the value on a Qualcomm SM6115P-based Lenovo Tab P11 tablet, the ID mentioned in the datasheet does indeed show up: fsa4480 1-0042: Found FSA4480 v1.1 (Vendor ID = 0) [1] https://www.onsemi.com/pdf/datasheet/fsa4480-d.pdf Fixes: 1dc246320c6b ("usb: typec: mux: Add On Semi fsa4480 driver") Cc: stable Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240729-topic-fs4480_check-v3-1-f5bf732d3424@kernel.org Signed-off-by: Greg Kroah-Hartman commit 973a57891608a98e894db2887f278777f564de18 Author: Chris Wulff Date: Wed Jul 24 21:04:20 2024 -0400 usb: gadget: core: Check for unset descriptor Make sure the descriptor has been set before looking at maxpacket. This fixes a null pointer panic in this case. This may happen if the gadget doesn't properly set up the endpoint for the current speed, or the gadget descriptors are malformed and the descriptor for the speed/endpoint are not found. No current gadget driver is known to have this problem, but this may cause a hard-to-find bug during development of new gadgets. Fixes: 54f83b8c8ea9 ("USB: gadget: Reject endpoints with 0 maxpacket value") Cc: stable@vger.kernel.org Signed-off-by: Chris Wulff Link: https://lore.kernel.org/r/20240725010419.314430-2-crwulff@gmail.com Signed-off-by: Greg Kroah-Hartman commit afdcfd3d6fcdeca2735ca8d994c5f2d24a368f0a Author: Oliver Neukum Date: Tue Jul 9 13:38:41 2024 +0200 usb: vhci-hcd: Do not drop references before new references are gained At a few places the driver carries stale pointers to references that can still be used. Make sure that does not happen. This strictly speaking closes ZDI-CAN-22273, though there may be similar races in the driver. Signed-off-by: Oliver Neukum Cc: stable Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20240709113851.14691-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 76a7bfc445b8e9893c091e24ccfd4f51dfdc0a70 Author: Chris Wulff Date: Sun Jul 21 15:23:15 2024 -0400 usb: gadget: u_audio: Check return codes from usb_ep_enable and config_ep_by_speed. These functions can fail if descriptors are malformed, or missing, for the selected USB speed. Fixes: eb9fecb9e69b ("usb: gadget: f_uac2: split out audio core") Fixes: 24f779dac8f3 ("usb: gadget: f_uac2/u_audio: add feedback endpoint support") Cc: stable@vger.kernel.org Signed-off-by: Chris Wulff Link: https://lore.kernel.org/r/20240721192314.3532697-2-crwulff@gmail.com Signed-off-by: Greg Kroah-Hartman commit 228a953e61d6d608a3facc1c3a27b9fb03c99de7 Author: Takashi Iwai Date: Wed Jul 17 11:50:53 2024 +0200 usb: gadget: midi2: Fix the response for FB info with block 0xff When the block number 0xff is given to Function Block Discovery message, the device should return the information of all Function Blocks, but currently the gadget driver treats it as an error. Implement the proper behavior for the block 0xff instead. Fixes: 8b645922b223 ("usb: gadget: Add support for USB MIDI 2.0 function driver") Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20240717095102.10493-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit 16d731890db94e23d5483402494ef378f2271ba1 Author: Alexander Stein Date: Wed Jul 31 09:19:50 2024 +0200 dt-bindings: usb: microchip,usb2514: Add USB2517 compatible USB2517 is a 7-port variant of this USB hub. Add an USB compatible based on USB vendor & product ID. Signed-off-by: Alexander Stein Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240731071950.989113-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 3ca06e90a7ceb06aaba8a9dc1c59d970824dab23 Merge: 8400291e289ee df8c0b8a03e87 Author: Greg Kroah-Hartman Date: Wed Jul 31 10:16:19 2024 +0200 Merge tag 'usb-serial-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial updates for 6.11-rc1 Here are the USB-serial updates for 6.11-rc1, including: - add missing module descriptions - add flexible array annotation in garmin_gps Included are also various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: garmin_gps: use struct_size() to allocate pkt USB: serial: garmin_gps: annotate struct garmin_packet with __counted_by USB: serial: add missing MODULE_DESCRIPTION() macros USB: serial: spcp8x5: remove unused struct 'spcp8x5_usb_ctrl_arg' commit e4fc196f5ba36eb7b9758cf2c73df49a44199895 Merge: e254e0c5baeae b8e947e9f64ca Author: Linus Torvalds Date: Tue Jul 30 19:28:36 2024 -0700 Merge tag 'for-6.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix regression in extent map rework when handling insertion of overlapping compressed extent - fix unexpected file length when appending to a file using direct io and buffer not faulted in - in zoned mode, fix accounting of unusable space when flipping read-only block group back to read-write - fix page locking when COWing an inline range, assertion failure found by syzbot - fix calculation of space info in debugging print - tree-checker, add validation of data reference item - fix a few -Wmaybe-uninitialized build warnings * tag 'for-6.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: initialize location to fix -Wmaybe-uninitialized in btrfs_lookup_dentry() btrfs: fix corruption after buffer fault in during direct IO append write btrfs: zoned: fix zone_unusable accounting on making block group read-write again btrfs: do not subtract delalloc from avail bytes btrfs: make cow_file_range_inline() honor locked_page on error btrfs: fix corrupt read due to bad offset of a compressed extent map btrfs: tree-checker: validate dref root and objectid commit e254e0c5baeae28717d1b312821e6ded29e7d969 Merge: c91a7dee0555f d27087c76e3c8 Author: Linus Torvalds Date: Tue Jul 30 19:22:41 2024 -0700 Merge tag 'perf-tools-fixes-for-v6.11-2024-07-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Namhyung Kim: "Some more build fixes and a random crash fix: - Fix cross-build by setting pkg-config env according to the arch - Fix static build for missing library dependencies - Fix Segfault when callchain has no symbols" * tag 'perf-tools-fixes-for-v6.11-2024-07-30' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf docs: Document cross compilation perf: build: Link lib 'zstd' for static build perf: build: Link lib 'lzma' for static build perf: build: Only link libebl.a for old libdw perf: build: Set Python configuration for cross compilation perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation perf tool: fix dereferencing NULL al->maps commit 0bf50cead4c4710d9f704778c32ab8af47ddf070 Merge: 89add40066f9e 963fb4612295a Author: Jakub Kicinski Date: Tue Jul 30 18:41:10 2024 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== ice: fix AF_XDP ZC timeout and concurrency issues Maciej Fijalkowski says: Changes included in this patchset address an issue that customer has been facing when AF_XDP ZC Tx sockets were used in combination with flow control and regular Tx traffic. After executing: ethtool --set-priv-flags $dev link-down-on-close on ethtool -A $dev rx on tx on launching multiple ZC Tx sockets on $dev + pinging remote interface (so that regular Tx traffic is present) and then going through down/up of $dev, Tx timeout occurred and then most of the time ice driver was unable to recover from that state. These patches combined together solve the described above issue on customer side. Main focus here is to forbid producing Tx descriptors when either carrier is not yet initialized or process of bringing interface down has already started. v1: https://lore.kernel.org/netdev/20240708221416.625850-1-anthony.l.nguyen@intel.com/ * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: xsk: fix txq interrupt mapping ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog ice: improve updating ice_{t,r}x_ring::xsk_pool ice: toggle netif_carrier when setting up XSK pool ice: modify error handling when setting XSK pool in ndo_bpf ice: replace synchronize_rcu with synchronize_net ice: don't busy wait for Rx queue disable in ice_qp_dis() ice: respect netif readiness in AF_XDP ZC related ndo's ==================== Link: https://patch.msgid.link/20240729200716.681496-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 89add40066f9ed9abe5f7f886fe5789ff7e0c50e Author: Willem de Bruijn Date: Mon Jul 29 16:10:12 2024 -0400 net: drop bad gso csum_start and offset in virtio_net_hdr Tighten csum_start and csum_offset checks in virtio_net_hdr_to_skb for GSO packets. The function already checks that a checksum requested with VIRTIO_NET_HDR_F_NEEDS_CSUM is in skb linear. But for GSO packets this might not hold for segs after segmentation. Syzkaller demonstrated to reach this warning in skb_checksum_help offset = skb_checksum_start_offset(skb); ret = -EINVAL; if (WARN_ON_ONCE(offset >= skb_headlen(skb))) By injecting a TSO packet: WARNING: CPU: 1 PID: 3539 at net/core/dev.c:3284 skb_checksum_help+0x3d0/0x5b0 ip_do_fragment+0x209/0x1b20 net/ipv4/ip_output.c:774 ip_finish_output_gso net/ipv4/ip_output.c:279 [inline] __ip_finish_output+0x2bd/0x4b0 net/ipv4/ip_output.c:301 iptunnel_xmit+0x50c/0x930 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x2296/0x2c70 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x759/0xa60 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4850 [inline] netdev_start_xmit include/linux/netdevice.h:4864 [inline] xmit_one net/core/dev.c:3595 [inline] dev_hard_start_xmit+0x261/0x8c0 net/core/dev.c:3611 __dev_queue_xmit+0x1b97/0x3c90 net/core/dev.c:4261 packet_snd net/packet/af_packet.c:3073 [inline] The geometry of the bad input packet at tcp_gso_segment: [ 52.003050][ T8403] skb len=12202 headroom=244 headlen=12093 tailroom=0 [ 52.003050][ T8403] mac=(168,24) mac_len=24 net=(192,52) trans=244 [ 52.003050][ T8403] shinfo(txflags=0 nr_frags=1 gso(size=1552 type=3 segs=0)) [ 52.003050][ T8403] csum(0x60000c7 start=199 offset=1536 ip_summed=3 complete_sw=0 valid=0 level=0) Mitigate with stricter input validation. csum_offset: for GSO packets, deduce the correct value from gso_type. This is already done for USO. Extend it to TSO. Let UFO be: udp[46]_ufo_fragment ignores these fields and always computes the checksum in software. csum_start: finding the real offset requires parsing to the transport header. Do not add a parser, use existing segmentation parsing. Thanks to SKB_GSO_DODGY, that also catches bad packets that are hw offloaded. Again test both TSO and USO. Do not test UFO for the above reason, and do not test UDP tunnel offload. GSO packet are almost always CHECKSUM_PARTIAL. USO packets may be CHECKSUM_NONE since commit 10154dbded6d6 ("udp: Allow GSO transmit from devices with no checksum offload"), but then still these fields are initialized correctly in udp4_hwcsum/udp6_hwcsum_outgoing. So no need to test for ip_summed == CHECKSUM_PARTIAL first. This revises an existing fix mentioned in the Fixes tag, which broke small packets with GSO offload, as detected by kselftests. Link: https://syzkaller.appspot.com/bug?extid=e1db31216c789f552871 Link: https://lore.kernel.org/netdev/20240723223109.2196886-1-kuba@kernel.org Fixes: e269d79c7d35 ("net: missing check virtio") Cc: stable@vger.kernel.org Signed-off-by: Willem de Bruijn Link: https://patch.msgid.link/20240729201108.1615114-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit a7f3abcf635767b2e19c4c55c4c35756595ebc86 Author: Bartosz Golaszewski Date: Mon Jul 29 17:03:14 2024 +0200 net: phy: aquantia: only poll GLOBAL_CFG regs on aqr113, aqr113c and aqr115c Commit 708405f3e56e ("net: phy: aquantia: wait for the GLOBAL_CFG to start returning real values") introduced a workaround for an issue observed on aqr115c. However there were never any reports of it happening on other models and the workaround has been reported to cause and issue on aqr113c (and it may cause the same on any other model not supporting 10M mode). Let's limit the impact of the workaround to aqr113, aqr113c and aqr115c and poll the 100M GLOBAL_CFG register instead as both models are known to support it correctly. Reported-by: Jon Hunter Closes: https://lore.kernel.org/lkml/7c0140be-4325-4005-9068-7e0fc5ff344d@nvidia.com/ Fixes: 708405f3e56e ("net: phy: aquantia: wait for the GLOBAL_CFG to start returning real values") Tested-by: Jon Hunter Signed-off-by: Bartosz Golaszewski Reviewed-by: Antoine Tenart Link: https://patch.msgid.link/20240729150315.65798-1-brgl@bgdev.pl Signed-off-by: Jakub Kicinski commit e61dd678601eac53d501dda1eb1bcffec7b11bd6 Author: Kent Overstreet Date: Tue Jul 30 18:21:32 2024 -0400 bcachefs: Fix double free of ca->buckets_nouse Reported-by: Dan Carpenter Fixes: ffcbec6076 ("bcachefs: Kill opts.buckets_nouse") Signed-off-by: Kent Overstreet commit 84383b5ef4cd21b4a67de92afdc05a03b5247db9 Author: Raju Lakkaraju Date: Thu Jul 25 12:41:25 2024 +0530 net: phy: micrel: Fix the KSZ9131 MDI-X status issue The MDIX status is not accurately reflecting the current state after the link partner has manually altered its MDIX configuration while operating in forced mode. Access information about Auto mdix completion and pair selection from the KSZ9131's Auto/MDI/MDI-X status register Fixes: b64e6a8794d9 ("net: phy: micrel: Add PHY Auto/MDI/MDI-X set driver for KSZ9131") Signed-off-by: Raju Lakkaraju Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240725071125.13960-1-Raju.Lakkaraju@microchip.com Signed-off-by: Jakub Kicinski commit 7764b9622db4382b2797b54a70f292c8da6ef417 Author: Jiri Olsa Date: Fri Jul 26 20:08:47 2024 +0200 bpf/selftests: Fix ASSERT_OK condition check in uprobe_syscall test Fixing ASSERT_OK condition check in uprobe_syscall test, otherwise we return from test on pipe success. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20240726180847.684584-1-jolsa@kernel.org commit c91a7dee0555f6f9d3702d86312382e4c4729d0a Merge: 22f5468731491 df615907f1bf9 Author: Linus Torvalds Date: Tue Jul 30 12:53:52 2024 -0700 Merge tag 'chrome-platform-fixes-for-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome-platform fix from Tzung-Bi Shih: "Fix a race condition that sends multiple host commands at a time" * tag 'chrome-platform-fixes-for-v6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_proto: Lock device when updating MKBP version commit fce6a1eefb2a1db706fa17ca21e3e7107811d2e8 Author: Konrad Dybcio Date: Fri Jul 26 13:18:24 2024 +0200 MAINTAINERS: Update Konrad Dybcio's email address Use my @kernel.org address everywhere. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240726-topic-konrad_email-v1-2-f94665da2919@kernel.org Signed-off-by: Bjorn Andersson commit 72c93f3e0dcdc05fceafcb32e79352a45716d181 Author: Konrad Dybcio Date: Fri Jul 26 13:18:23 2024 +0200 mailmap: Add an entry for Konrad Dybcio Map my old addresses. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240726-topic-konrad_email-v1-1-f94665da2919@kernel.org Signed-off-by: Bjorn Andersson commit 6be6cba9c4371d27f78d900ccfe34bb880d9ee20 Author: Yipeng Zou Date: Tue Jul 30 09:44:00 2024 +0800 irqchip/mbigen: Fix mbigen node address layout The mbigen interrupt chip has its per node registers located in a contiguous region of page sized chunks. The code maps them into virtual address space as a contiguous region and determines the address of a node by using the node ID as index. mbigen chip |-----------------|------------|--------------| mgn_node_0 mgn_node_1 ... mgn_node_i |--------------| |--------------| |----------------------| [0x0000, 0x0x0FFF] [0x1000, 0x1FFF] [i*0x1000, (i+1)*0x1000 - 1] This works correctly up to 10 nodes, but then fails because the 11th's array slot is used for the MGN_CLEAR registers. mbigen chip |-----------|--------|--------|---------------|--------| mgn_node_0 mgn_node_1 ... mgn_clear_register ... mgn_node_i |-----------------| [0xA000, 0xAFFF] Skip the MGN_CLEAR register space when calculating the offset for node IDs greater than or equal to ten. Fixes: a6c2f87b8820 ("irqchip/mbigen: Implement the mbigen irq chip operation functions") Signed-off-by: Yipeng Zou Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20240730014400.1751530-1-zouyipeng@huawei.com commit 22f5468731491e53356ba7c028f0fdea20b18e2c Author: Linus Torvalds Date: Tue Jul 30 10:36:47 2024 -0700 minmax: improve macro expansion and type checking This clarifies the rules for min()/max()/clamp() type checking and makes them a much more efficient macro expansion. In particular, we now look at the type and range of the inputs to see whether they work together, generating a mask of acceptable comparisons, and then just verifying that the inputs have a shared case: - an expression with a signed type can be used for (1) signed comparisons (2) unsigned comparisons if it is statically known to have a non-negative value - an expression with an unsigned type can be used for (3) unsigned comparison (4) signed comparisons if the type is smaller than 'int' and thus the C integer promotion rules will make it signed anyway Here rule (1) and (3) are obvious, and rule (2) is important in order to allow obvious trivial constants to be used together with unsigned values. Rule (4) is not necessarily a good idea, but matches what we used to do, and we have extant cases of this situation in the kernel. Notably with bcachefs having an expression like min(bch2_bucket_sectors_dirty(a), ca->mi.bucket_size) where bch2_bucket_sectors_dirty() returns an 's64', and 'ca->mi.bucket_size' is of type 'u16'. Technically that bcachefs comparison is clearly sensible on a C type level, because the 'u16' will go through the normal C integer promotion, and become 'int', and then we're comparing two signed values and everything looks sane. However, it's not entirely clear that a 'min(s64,u16)' operation makes a lot of conceptual sense, and it's possible that we will remove rule (4). After all, the _reason_ we have these complicated type checks is exactly that the C type promotion rules are not very intuitive. But at least for now the rule is in place for backwards compatibility. Also note that rule (2) existed before, but is hugely relaxed by this commit. It used to be true only for the simplest compile-time non-negative integer constants. The new macro model will allow cases where the compiler can trivially see that an expression is non-negative even if it isn't necessarily a constant. For example, the amdgpu driver does min_t(size_t, sizeof(fru_info->serial), pia[addr] & 0x3F)); because our old 'min()' macro would see that 'pia[addr] & 0x3F' is of type 'int' and clearly not a C constant expression, so doing a 'min()' with a 'size_t' is a signedness violation. Our new 'min()' macro still sees that 'pia[addr] & 0x3F' is of type 'int', but is smart enough to also see that it is clearly non-negative, and thus would allow that case without any complaints. Cc: Arnd Bergmann Cc: David Laight Cc: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit e4c4638b6a10427d30e29d22351c375886025f47 Author: Geert Uytterhoeven Date: Tue Jul 30 15:35:47 2024 +0200 spi: spidev: Add missing spi_device_id for bh2228fv When the of_device_id entry for "rohm,bh2228fv" was added, the corresponding spi_device_id was forgotten, causing a warning message during boot-up: SPI driver spidev has no spi_device_id for rohm,bh2228fv Fix module autoloading and shut up the warning by adding the missing entry. Fixes: fc28d1c1fe3b3e2f ("spi: spidev: add correct compatible for Rohm BH2228FV") Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/cb571d4128f41175f31319cd9febc829417ea167.1722346539.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit af441750df42f610bd308c579a9c1ec84ee2b3c6 Merge: e2d124de0017b aa4f76ef09a99 Author: Mark Brown Date: Tue Jul 30 17:01:12 2024 +0100 ASoC: fsl_micfil: Check the difference for i.MX8 and Merge series from Shengjiu Wang : There are some register difference for i.MX8 and i.MX9 REG_MICFIL_FIFO_CTRL definition is updated. REG_MICFIL_FSYNC_CTRL, REG_MICFIL_VERID, REG_MICFIL_PARAM are added from i.MX9. commit 0aa3ca956c46d849775eae1816cef8fe4bc8b50e Author: Dan Carpenter Date: Wed Jul 24 11:06:56 2024 -0500 net: mvpp2: Don't re-use loop iterator This function has a nested loop. The problem is that both the inside and outside loop use the same variable as an iterator. I found this via static analysis so I'm not sure the impact. It could be that it loops forever or, more likely, the loop exits early. Fixes: 3a616b92a9d1 ("net: mvpp2: Add TX flow control support for jumbo frames") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Link: https://patch.msgid.link/eaa8f403-7779-4d81-973d-a9ecddc0bf6f@stanley.mountain Signed-off-by: Jakub Kicinski commit f8ce49be2743541bdc9e184fab1cfd736031ab66 Author: Srinivas Pandruvada Date: Tue Jul 23 07:02:28 2024 -0700 thermal: intel: int340x: Free MSI IRQ vectors on module exit On module exit call proc_thermal_free_msi() to free vectors allocated by pci_alloc_irq_vectors(). Fixes: 7a9a8c5faf41 ("thermal: intel: int340x: Support MSI interrupt for Lunar Lake") Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Link: https://patch.msgid.link/20240723140228.865919-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit b85a2d300a37641456c238591a056404436675c2 Author: Srinivas Pandruvada Date: Tue Jul 23 07:02:27 2024 -0700 thermal: intel: int340x: Allow limited thermal MSI support On some Lunar Lake pre-production systems, not all the MSI thermal vectors are valid. In that case instead of failing module load, continue with partial thermal interrupt support. pci_alloc_irq_vectors() can return less than expected maximum vectors. In that case call devm_request_threaded_irq() only for current maximum vectors. Fixes: 7a9a8c5faf41 ("thermal: intel: int340x: Support MSI interrupt for Lunar Lake") Reported-by: Yijun Shen Tested-by: Yijun Shen Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Link: https://patch.msgid.link/20240723140228.865919-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit b630a04121519c0f93f9cc8994147191cc3c17b4 Author: Srinivas Pandruvada Date: Tue Jul 23 07:02:26 2024 -0700 thermal: intel: int340x: Fix kernel warning during MSI cleanup On some pre-production Lunar Lake systems, there is a kernel warning: remove_proc_entry: removing non-empty directory 'irq/172' WARNING: CPU: 0 PID: 501 at fs/proc/generic.c:717 remove_proc_entry+0x1b4/0x1e0 ... ... remove_proc_entry+0x1b4/0x1e0 report_bug+0x182/0x1b0 handle_bug+0x51/0xa0 exc_invalid_op+0x18/0x80 asm_exc_invalid_op+0x1b/0x20 remove_proc_entry+0x1b4/0x1e0 remove_proc_entry+0x1b4/0x1e0 unregister_irq_proc+0xf2/0x120 free_desc+0x41/0xe0 irq_domain_free_irqs+0x138/0x1c0 irq_free_descs+0x52/0x80 irq_domain_free_irqs+0x151/0x1c0 msi_domain_free_locked.part.0+0x17e/0x1c0 msi_domain_free_irqs_all_locked+0x74/0xc0 pci_msi_teardown_msi_irqs+0x50/0x60 pci_free_msi_irqs+0x12/0x40 pci_free_irq_vectors+0x58/0x70 On these systems, not all the MSI thermal vectors are valid. This causes devm_request_threaded_irq() to fail for some vectors. As part of the clean up on this error, pci_free_irq_vectors() is called without calling devm_free_irq(). This causes the above warning. Add a function proc_thermal_free_msi() to call devm_free_irq() for all successfully registered IRQ handlers, then call pci_free_irq_vectors(). Call this function for MSI cleanup. Fixes: 7a9a8c5faf41 ("thermal: intel: int340x: Support MSI interrupt for Lunar Lake") Reported-by: Yijun Shen Tested-by: Yijun Shen Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Link: https://patch.msgid.link/20240723140228.865919-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 5b511572660190db1dc8ba412efd0be0d3781ab6 Author: Nikita Zhandarovich Date: Mon Jul 29 10:40:35 2024 -0700 drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll() On the off chance that clock value ends up being too high (by means of skl_ddi_calculate_wrpll() having been called with big enough value of crtc_state->port_clock * 1000), one possible consequence may be that the result will not be able to fit into signed int. Fix this issue by moving conversion of clock parameter from kHz to Hz into the body of skl_ddi_calculate_wrpll(), as well as casting the same parameter to u64 type while calculating the value for AFE clock. This both mitigates the overflow problem and avoids possible erroneous integer promotion mishaps. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 82d354370189 ("drm/i915/skl: Implementation of SKL DPLL programming") Cc: stable@vger.kernel.org Signed-off-by: Nikita Zhandarovich Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240729174035.25727-1-n.zhandarovich@fintech.ru (cherry picked from commit 833cf12846aa19adf9b76bc79c40747726f3c0c1) Signed-off-by: Joonas Lahtinen commit 555069117390a5d581863bc797fb546bb4417c31 Author: Suraj Kandpal Date: Tue Jul 30 09:25:05 2024 +0530 drm/i915/hdcp: Fix HDCP2_STREAM_STATUS macro Fix HDCP2_STREAM_STATUS macro, it called pipe instead of port never threw a compile error as no one used it. --v2 -Add Fixes [Jani] Fixes: d631b984cc90 ("drm/i915/hdcp: Add HDCP 2.2 stream register") Signed-off-by: Suraj Kandpal Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240730035505.3759899-1-suraj.kandpal@intel.com (cherry picked from commit 73d7cd542bbd0a7c6881ea0df5255f190a1e7236) Signed-off-by: Joonas Lahtinen commit a0e6fbf22439f796b51ea583a68eb763b0a99393 Author: Stephan Gerhold Date: Mon Jul 15 14:15:39 2024 +0200 arm64: dts: qcom: x1e80100-crd: Fix backlight The backlight does not work correctly with the current display panel configuration: It works after boot, but once the display gets disabled it is not possible to get it back on. It turns out that the ATNA45AF01 panel needs exactly the same non-standard power sequence as implemented by the panel-samsung-atna33xc20 driver for sc7180-trogdor-homestar. Switch the panel in the DT to the new compatible and make two more changes to make it work correctly: 1. Add the missing GPIO for the panel EL_ON3 line (EDP_BL_EN on CRD and enable-gpios in the DT). 2. Drop the regulator-always-on for the panel regulator. The panel does not seem to power off properly if the regulator stays on. Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Reviewed-by: Johan Hovold Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-3-31b7f2f658a3@linaro.org Signed-off-by: Bjorn Andersson commit 86c71c0e893d58447e4a9e5c0d1c2c0f89c1b9e1 Author: Johan Hovold Date: Mon Jul 22 11:54:59 2024 +0200 arm64: dts: qcom: x1e80100-yoga-slim7x: fix missing PCIe4 gpios Add the missing PCIe4 perst, wake and clkreq GPIOs and pin config. Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree") Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-13-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 750b8a3b5a4476cf000f3db1fe46293c97fcd979 Author: Johan Hovold Date: Mon Jul 22 11:54:58 2024 +0200 arm64: dts: qcom: x1e80100-yoga-slim7x: disable PCIe6a perst pull down Disable the PCIe6a perst pull-down resistor to save some power. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-12-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit a655dacf2a35a35eadd95f0ba8fe9cf70359eeb9 Author: Johan Hovold Date: Mon Jul 22 11:54:57 2024 +0200 arm64: dts: qcom: x1e80100-yoga-slim7x: fix up PCIe6a pinctrl node The PCIe6a pinctrl node appears to have been copied from the sc8280xp CRD dts (via the x1e80100 CRD dts), which has the NVMe on pcie2a and uses some funny indentation. Fix up the node name to match the x1e80100 use and label and use only tabs for indentation. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-11-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit b90567c262fc3a3e703f3091499dec799a6147ab Author: Johan Hovold Date: Mon Jul 22 11:54:56 2024 +0200 arm64: dts: qcom: x1e80100-yoga-slim7x: fix PCIe4 PHY supply The PCIe4 PHY is powered by vreg_l3i (not vreg_l3j) on the CRD reference design so assume the same applies to the Lenovo Yoga Slim 7x. Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree") Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-10-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit e7f3f3cbbfef84729ad6c10eb589957e7b28b95a Author: Johan Hovold Date: Mon Jul 22 11:54:55 2024 +0200 arm64: dts: qcom: x1e80100-vivobook-s15: fix missing PCIe4 gpios Add the missing PCIe4 perst, wake and clkreq GPIOs and pin config. Fixes: d0e2f8f62dff ("arm64: dts: qcom: Add device tree for ASUS Vivobook S 15") Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-9-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit d7ff5d1868d1cfd1c06a601a7cfa2dbb6dba4be9 Author: Johan Hovold Date: Mon Jul 22 11:54:54 2024 +0200 arm64: dts: qcom: x1e80100-vivobook-s15: disable PCIe6a perst pull down Disable the PCIe6a perst pull-down resistor to save some power. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-8-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit c67b3dfd8d69164f70ab3aaff889fca1e536c909 Author: Johan Hovold Date: Mon Jul 22 11:54:53 2024 +0200 arm64: dts: qcom: x1e80100-vivobook-s15: fix up PCIe6a pinctrl node The PCIe6a pinctrl node appears to have been copied from the sc8280xp CRD dts (via the x1e80100 CRD dts), which has the NVMe on pcie2a. Fix up the node name to match the x1e80100 use and label. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-7-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit e89fe0596c62363082cabbaa5ccb38989e714e68 Author: Johan Hovold Date: Mon Jul 22 11:54:52 2024 +0200 arm64: dts: qcom: x1e80100-vivobook-s15: fix PCIe4 PHY supply The PCIe4 PHY is powered by vreg_l3i (not vreg_l3j) on the CRD reference design so assume the same applies to the Asus Vivobook S15. Fixes: d0e2f8f62dff ("arm64: dts: qcom: Add device tree for ASUS Vivobook S 15") Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-6-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 2ac90e4d2b6d6823ca10642ef39595ff1181c3fa Author: Johan Hovold Date: Mon Jul 22 11:54:51 2024 +0200 arm64: dts: qcom: x1e80100-qcp: fix missing PCIe4 gpios Add the missing PCIe4 perst, wake and clkreq GPIOs and pin config. Fixes: f9a9c11471da ("arm64: dts: qcom: x1e80100-qcp: Enable more support") Cc: stable@vger.kernel.org # 6.9 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722095459.27437-5-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 12661b333374c892f9053261b4bceb346a709ea4 Author: Johan Hovold Date: Mon Jul 22 11:54:50 2024 +0200 arm64: dts: qcom: x1e80100-qcp: disable PCIe6a perst pull down Disable the PCIe6a perst pull-down resistor to save some power. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20240722095459.27437-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 0aab6eaac72ac140dfc5e0a38bf3178497762e43 Author: Johan Hovold Date: Mon Jul 22 11:54:49 2024 +0200 arm64: dts: qcom: x1e80100-qcp: fix up PCIe6a pinctrl node The PCIe6a pinctrl node appears to have been copied from the sc8280xp CRD dts, which has the NVMe on pcie2a and uses some funny indentation. Fix up the node name to match the x1e80100 use and label and use only tabs for indentation. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20240722095459.27437-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit f03dd49f884f428ba71efe23383ff842f4f15e0e Author: Johan Hovold Date: Mon Jul 22 11:54:48 2024 +0200 arm64: dts: qcom: x1e80100-qcp: fix PCIe4 PHY supply The PCIe4 PHY is powered by vreg_l3i (not vreg_l3j) on the CRD so assume the same applies to the QCP. Fixes: f9a9c11471da ("arm64: dts: qcom: x1e80100-qcp: Enable more support") Cc: stable@vger.kernel.org # 6.9 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20240722095459.27437-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 42b33ad188466292eaac9825544b8be8deddb3cb Author: Johan Hovold Date: Mon Jul 22 11:42:47 2024 +0200 arm64: dts: qcom: x1e80100-crd: fix missing PCIe4 gpios Add the missing PCIe4 perst, wake and clkreq GPIOs and pin config. Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Cc: stable@vger.kernel.org # 6.9 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240722094249.26471-7-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 8a6e1dbf1362e78081e71b2690750e9556136f26 Author: Johan Hovold Date: Mon Jul 22 11:42:46 2024 +0200 arm64: dts: qcom: x1e80100-crd: disable PCIe6a perst pull down Disable the PCIe6a perst pull-down resistor to save some power. Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240722094249.26471-6-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 6e3902c499544291ac4fd1a1bb69f2e9037a0e86 Author: Johan Hovold Date: Mon Jul 22 11:42:45 2024 +0200 arm64: dts: qcom: x1e80100-crd: fix up PCIe6a pinctrl node The PCIe6a pinctrl node appears to have been copied from the sc8280xp CRD dts, which has the NVMe on pcie2a and uses some funny indentation. Fix up the node name to match the x1e80100 use and label and use only tabs for indentation. Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240722094249.26471-5-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 98abf2fbd179017833c38edc9f3b587c69d07e2a Author: Johan Hovold Date: Mon Jul 22 11:42:44 2024 +0200 arm64: dts: qcom: x1e80100: add missing PCIe minimum OPP Add the missing PCIe CX performance level votes to avoid relying on other drivers (e.g. USB) to maintain the nominal performance level required for Gen3 speeds. Fixes: 5eb83fc10289 ("arm64: dts: qcom: x1e80100: Add PCIe nodes") Cc: stable@vger.kernel.org # 6.9 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240722094249.26471-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit f8fa1f2f6412bffa71972f9506b72992d0e6e485 Author: Johan Hovold Date: Mon Jul 22 11:42:43 2024 +0200 arm64: dts: qcom: x1e80100: fix PCIe domain numbers The current PCIe domain numbers are off by one and do not match the numbers that the UEFI firmware (and Windows) uses. Fixes: 5eb83fc10289 ("arm64: dts: qcom: x1e80100: Add PCIe nodes") Cc: stable@vger.kernel.org # 6.9 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240722094249.26471-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 30f593fa0088b89f479f7358640687b3cbca93d4 Author: Johan Hovold Date: Mon Jul 22 11:42:42 2024 +0200 arm64: dts: qcom: x1e80100-crd: fix PCIe4 PHY supply The PCIe4 PHY is powered by vreg_l3i (not vreg_l3j). Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Cc: stable@vger.kernel.org # 6.9 Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20240722094249.26471-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit b8e947e9f64cac9df85a07672b658df5b2bcff07 Author: David Sterba Date: Mon Jul 29 21:59:24 2024 +0200 btrfs: initialize location to fix -Wmaybe-uninitialized in btrfs_lookup_dentry() Some arch + compiler combinations report a potentially unused variable location in btrfs_lookup_dentry(). This is a false alert as the variable is passed by value and always valid or there's an error. The compilers cannot probably reason about that although btrfs_inode_by_name() is in the same file. > + /kisskb/src/fs/btrfs/inode.c: error: 'location.objectid' may be used +uninitialized in this function [-Werror=maybe-uninitialized]: => 5603:9 > + /kisskb/src/fs/btrfs/inode.c: error: 'location.type' may be used +uninitialized in this function [-Werror=maybe-uninitialized]: => 5674:5 m68k-gcc8/m68k-allmodconfig mips-gcc8/mips-allmodconfig powerpc-gcc5/powerpc-all{mod,yes}config powerpc-gcc5/ppc64_defconfig Initialize it to zero, this should fix the warnings and won't change the behaviour as btrfs_inode_by_name() accepts only a root or inode item types, otherwise returns an error. Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/linux-btrfs/bd4e9928-17b3-9257-8ba7-6b7f9bbb639a@linux-m68k.org/ Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit bf5641eccf71bcd13a849930e190563c3a19815d Author: Perry Yuan Date: Mon Jul 29 08:46:26 2024 +0200 x86/CPU/AMD: Add models 0x60-0x6f to the Zen5 range Add some new Zen5 models for the 0x1A family. [ bp: Merge the 0x60 and 0x70 ranges. ] Signed-off-by: Perry Yuan Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240729064626.24297-1-bp@kernel.org commit f558120cd709682b739207b48cf7479fd9568431 Author: Alexandra Winter Date: Mon Jul 29 14:28:16 2024 +0200 net/iucv: fix use after free in iucv_sock_close() iucv_sever_path() is called from process context and from bh context. iucv->path is used as indicator whether somebody else is taking care of severing the path (or it is already removed / never existed). This needs to be done with atomic compare and swap, otherwise there is a small window where iucv_sock_close() will try to work with a path that has already been severed and freed by iucv_callback_connrej() called by iucv_tasklet_fn(). Example: [452744.123844] Call Trace: [452744.123845] ([<0000001e87f03880>] 0x1e87f03880) [452744.123966] [<00000000d593001e>] iucv_path_sever+0x96/0x138 [452744.124330] [<000003ff801ddbca>] iucv_sever_path+0xc2/0xd0 [af_iucv] [452744.124336] [<000003ff801e01b6>] iucv_sock_close+0xa6/0x310 [af_iucv] [452744.124341] [<000003ff801e08cc>] iucv_sock_release+0x3c/0xd0 [af_iucv] [452744.124345] [<00000000d574794e>] __sock_release+0x5e/0xe8 [452744.124815] [<00000000d5747a0c>] sock_close+0x34/0x48 [452744.124820] [<00000000d5421642>] __fput+0xba/0x268 [452744.124826] [<00000000d51b382c>] task_work_run+0xbc/0xf0 [452744.124832] [<00000000d5145710>] do_notify_resume+0x88/0x90 [452744.124841] [<00000000d5978096>] system_call+0xe2/0x2c8 [452744.125319] Last Breaking-Event-Address: [452744.125321] [<00000000d5930018>] iucv_path_sever+0x90/0x138 [452744.125324] [452744.125325] Kernel panic - not syncing: Fatal exception in interrupt Note that bh_lock_sock() is not serializing the tasklet context against process context, because the check for sock_owned_by_user() and corresponding handling is missing. Ideas for a future clean-up patch: A) Correct usage of bh_lock_sock() in tasklet context, as described in Link: https://lore.kernel.org/netdev/1280155406.2899.407.camel@edumazet-laptop/ Re-enqueue, if needed. This may require adding return values to the tasklet functions and thus changes to all users of iucv. B) Change iucv tasklet into worker and use only lock_sock() in af_iucv. Fixes: 7d316b945352 ("af_iucv: remove IUCV-pathes completely") Reviewed-by: Halil Pasic Signed-off-by: Alexandra Winter Link: https://patch.msgid.link/20240729122818.947756-1-wintera@linux.ibm.com Signed-off-by: Paolo Abeni commit 942810c0e89277d738b7f1b6f379d0a5877999f6 Author: Shyam Sundar S K Date: Tue Jul 23 18:54:50 2024 +0530 platform/x86/amd/pmf: Add new ACPI ID AMDI0107 Add new ACPI ID AMDI0107 used by upcoming AMD platform to the PMF supported list of devices. Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20240723132451.3488326-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 426463d94d45d37c233e480231a40b9b35f10e49 Author: Shyam Sundar S K Date: Thu Jul 18 20:31:19 2024 +0530 platform/x86/amd/pmc: Send OS_HINT command for new AMD platform To initiate the HW deep state transition, the OS_HINT command has to be sent to the PMFW. Add this support to the platforms that belong to family 1Ah model 60h series. Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240718150119.3427190-1-Shyam-sundar.S-k@amd.com Signed-off-by: Ilpo Järvinen commit 4c83ee4bf32ea8e57ae2321906c067d69ad7c41b Author: Luke D. Jones Date: Mon Jul 29 14:08:31 2024 +1200 platform/x86/amd: pmf: Add quirk for ROG Ally X The ASUS ROG Ally X has the same issue as the G14 where it advertises SPS support but doesn't use it. Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20240729020831.28117-1-luke@ljones.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e075c3b13a0a142dcd3151b25d29a24f31b7b640 Author: Hans de Goede Date: Mon Jul 29 14:04:43 2024 +0200 platform/x86: intel-vbtn: Protect ACPI notify handler against recursion Since commit e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") ACPI notify handlers like the intel-vbtn notify_handler() may run on multiple CPU cores racing with themselves. This race gets hit on Dell Venue 7140 tablets when undocking from the keyboard, causing the handler to try and register priv->switches_dev twice, as can be seen from the dev_info() message getting logged twice: [ 83.861800] intel-vbtn INT33D6:00: Registering Intel Virtual Switches input-dev after receiving a switch event [ 83.861858] input: Intel Virtual Switches as /devices/pci0000:00/0000:00:1f.0/PNP0C09:00/INT33D6:00/input/input17 [ 83.861865] intel-vbtn INT33D6:00: Registering Intel Virtual Switches input-dev after receiving a switch event After which things go seriously wrong: [ 83.861872] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/INT33D6:00/input/input17' ... [ 83.861967] kobject: kobject_add_internal failed for input17 with -EEXIST, don't try to register things with the same name in the same directory. [ 83.877338] BUG: kernel NULL pointer dereference, address: 0000000000000018 ... Protect intel-vbtn notify_handler() from racing with itself with a mutex to fix this. Fixes: e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") Reported-by: En-Wei Wu Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2073001 Tested-by: Kostadin Stoilov Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240729120443.14779-1-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 5127c42c77de18651aa9e8e0a3ced190103b449c Author: Devyn Liu Date: Tue Jul 30 11:20:40 2024 +0800 spi: hisi-kunpeng: Add verification for the max_frequency provided by the firmware If the value of max_speed_hz is 0, it may cause a division by zero error in hisi_calc_effective_speed(). The value of max_speed_hz is provided by firmware. Firmware is generally considered as a trusted domain. However, as division by zero errors can cause system failure, for defense measure, the value of max_speed is validated here. So 0 is regarded as invalid and an error code is returned. Signed-off-by: Devyn Liu Reviewed-by: Jay Fang Link: https://patch.msgid.link/20240730032040.3156393-3-liudingyuan@huawei.com Signed-off-by: Mark Brown commit c3c4f22b7c814a6ee485ce294065836f8ede30fa Author: Devyn Liu Date: Tue Jul 30 11:20:39 2024 +0800 spi: hisi-kunpeng: Add validation for the minimum value of speed_hz The speed specified by the user is used to calculate the clk_div based on the max_speed_hz in hisi_calc_effective_speed. A very low speed value can lead to a clk_div larger than the variable range. Avoid this by setting the min_speed_hz so that such a small speed value is rejected. __spi_validate() in spi.c will return -EINVAL for the specified speed_hz lower than min_speed_hz. Signed-off-by: Devyn Liu Reviewed-by: Jay Fang Link: https://patch.msgid.link/20240730032040.3156393-2-liudingyuan@huawei.com Signed-off-by: Mark Brown commit c3fca4fb83f7c84cd1e1aa9fe3a0e220ce8f30fb Author: Olivier Langlois Date: Mon Jul 29 19:13:35 2024 -0400 io_uring: remove unused local list heads in NAPI functions These lists are unused, remove them. Signed-off-by: Olivier Langlois Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/0a0ae3e955aed0f3e3d29882fb3d3cb575e0009b.1722294947.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit 2c762be5b798c443612c1bb9b011de4fdaebd1c5 Author: Olivier Langlois Date: Mon Jul 29 19:03:33 2024 -0400 io_uring: keep multishot request NAPI timeout current This refresh statement was originally present in the original patch: https://lore.kernel.org/netdev/20221121191437.996297-2-shr@devkernel.io/ It has been removed with no explanation in v6: https://lore.kernel.org/netdev/20230201222254.744422-2-shr@devkernel.io/ It is important to make the refresh for multishot requests, because if no new requests using the same NAPI device are added to the ring, the entry will become stale and be removed silently. The unsuspecting user will not know that their ring had busy polling for only 60 seconds before being pruned. Signed-off-by: Olivier Langlois Reviewed-by: Pavel Begunkov Fixes: 8d0c12a80cdeb ("io-uring: add napi busy poll support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/0fe61a019ec61e5708cd117cb42ed0dab95e1617.1722294646.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit df615907f1bf907260af01ccb904d0e9304b5278 Author: Patryk Duda Date: Tue Jul 30 10:44:25 2024 +0000 platform/chrome: cros_ec_proto: Lock device when updating MKBP version The cros_ec_get_host_command_version_mask() function requires that the caller must have ec_dev->lock mutex before calling it. This requirement was not met and as a result it was possible that two commands were sent to the device at the same time. The problem was observed while using UART backend which doesn't use any additional locks, unlike SPI backend which locks the controller until response is received. Fixes: f74c7557ed0d ("platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure") Cc: stable@vger.kernel.org Signed-off-by: Patryk Duda Link: https://lore.kernel.org/r/20240730104425.607083-1-patrykd@google.com Signed-off-by: Tzung-Bi Shih commit a371d558e6f3aed977a8a7346350557de5d25190 Author: Rik van Riel Date: Mon Jul 29 14:19:28 2024 -0400 mm, slub: do not call do_slab_free for kfence object In 782f8906f805 the freeing of kfence objects was moved from deep inside do_slab_free to the wrapper functions outside. This is a nice change, but unfortunately it missed one spot in __kmem_cache_free_bulk. This results in a crash like this: BUG skbuff_head_cache (Tainted: G S B E ): Padding overwritten. 0xffff88907fea0f00-0xffff88907fea0fff @offset=3840 slab_err (mm/slub.c:1129) free_to_partial_list (mm/slub.c:? mm/slub.c:4036) slab_pad_check (mm/slub.c:864 mm/slub.c:1290) check_slab (mm/slub.c:?) free_to_partial_list (mm/slub.c:3171 mm/slub.c:4036) kmem_cache_alloc_bulk (mm/slub.c:? mm/slub.c:4495 mm/slub.c:4586 mm/slub.c:4635) napi_build_skb (net/core/skbuff.c:348 net/core/skbuff.c:527 net/core/skbuff.c:549) All the other callers to do_slab_free appear to be ok. Add a kfence_free check in __kmem_cache_free_bulk to avoid the crash. Reported-by: Chris Mason Fixes: 782f8906f805 ("mm/slub: free KFENCE objects in slab_free_hook()") Cc: stable@kernel.org Signed-off-by: Rik van Riel Signed-off-by: Vlastimil Babka commit 2fe5273f149cc882c371f9954b5fdbd1bd8c9b5c Author: D. Wythe Date: Mon Jul 29 11:40:15 2024 +0800 net/smc: prevent UAF in inet_create() Following syzbot repro crashes the kernel: socketpair(0x2, 0x1, 0x100, &(0x7f0000000140)) (fail_nth: 13) Fix this by not calling sk_common_release() from smc_create_clcsk(). Stack trace: socket: no more sockets ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 5092 at lib/refcount.c:28 refcount_warn_saturate+0x15a/0x1d0 lib/refcount.c:28 Modules linked in: CPU: 1 PID: 5092 Comm: syz-executor424 Not tainted 6.10.0-syzkaller-04483-g0be9ae5486cd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 RIP: 0010:refcount_warn_saturate+0x15a/0x1d0 lib/refcount.c:28 Code: 80 f3 1f 8c e8 e7 69 a8 fc 90 0f 0b 90 90 eb 99 e8 cb 4f e6 fc c6 05 8a 8d e8 0a 01 90 48 c7 c7 e0 f3 1f 8c e8 c7 69 a8 fc 90 <0f> 0b 90 90 e9 76 ff ff ff e8 a8 4f e6 fc c6 05 64 8d e8 0a 01 90 RSP: 0018:ffffc900034cfcf0 EFLAGS: 00010246 RAX: 3b9fcde1c862f700 RBX: ffff888022918b80 RCX: ffff88807b39bc00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000003 R08: ffffffff815878a2 R09: fffffbfff1c39d94 R10: dffffc0000000000 R11: fffffbfff1c39d94 R12: 00000000ffffffe9 R13: 1ffff11004523165 R14: ffff888022918b28 R15: ffff888022918b00 FS: 00005555870e7380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000140 CR3: 000000007582e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_create+0xbaf/0xe70 __sock_create+0x490/0x920 net/socket.c:1571 sock_create net/socket.c:1622 [inline] __sys_socketpair+0x2ca/0x720 net/socket.c:1769 __do_sys_socketpair net/socket.c:1822 [inline] __se_sys_socketpair net/socket.c:1819 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1819 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:0x7fbcb9259669 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 1a 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:00007fffe931c6d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000035 RAX: ffffffffffffffda RBX: 00007fffe931c6f0 RCX: 00007fbcb9259669 RDX: 0000000000000100 RSI: 0000000000000001 RDI: 0000000000000002 RBP: 0000000000000002 R08: 00007fffe931c476 R09: 00000000000000a0 R10: 0000000020000140 R11: 0000000000000246 R12: 00007fffe931c6ec R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001 Link: https://lore.kernel.org/r/20240723175809.537291-1-edumazet@google.com/ Fixes: d25a92ccae6b ("net/smc: Introduce IPPROTO_SMC") Reported-by: syzbot Signed-off-by: D. Wythe Reviewed-by: Eric Dumazet Reviewed-by: Wenjia Zhang Link: https://patch.msgid.link/1722224415-30999-1-git-send-email-alibuda@linux.alibaba.com Signed-off-by: Paolo Abeni commit 0cd55ef92a4a94fabc6e7d5fb2e8dfced1860d88 Merge: 039564d2fd37b f833470c27832 Author: Paolo Abeni Date: Tue Jul 30 10:27:32 2024 +0200 Merge branch 'mptcp-fix-inconsistent-backup-usage' Matthieu Baerts says: ==================== mptcp: fix inconsistent backup usage In all the MPTCP backup related tests, the backup flag was set on one side, and the expected behaviour is to have both sides respecting this decision. That's also the "natural" way, and what the users seem to expect. On the scheduler side, only the 'backup' field was checked, which is supposed to be set only if the other peer flagged a subflow as backup. But in various places, this flag was also set when the local host flagged the subflow as backup, certainly to have the expected behaviour mentioned above. Patch 1 modifies the packet scheduler to check if the backup flag has been set on both directions, not to change its behaviour after having applied the following patches. That's what the default packet scheduler should have done since the beginning in v5.7. Patch 2 fixes the backup flag being mirrored on the MPJ+SYN+ACK by accident since its introduction in v5.7. Instead, the received and sent backup flags are properly distinguished in requests. Patch 3 stops setting the received backup flag as well when sending an MP_PRIO, something that was done since the MP_PRIO support in v5.12. Patch 4 adds related and missing MIB counters to be able to easily check if MP_JOIN are sent with a backup flag. Certainly because these counters were not there, the behaviour that is fixed by patches here was not properly verified. Patch 5 validates the previous patch by extending the MPTCP Join selftest. Patch 6 fixes the backup support in signal endpoints: if a signal endpoint had the backup flag, it was not set in the MPJ+SYN+ACK as expected. It was only set for ongoing connections, but not future ones as expected, since the introduction of the backup flag in endpoints in v5.10. Patch 7 validates the previous patch by extending the MPTCP Join selftest as well. Signed-off-by: Matthieu Baerts (NGI0) --- Matthieu Baerts (NGI0) (7): mptcp: sched: check both directions for backup mptcp: distinguish rcv vs sent backup flag in requests mptcp: pm: only set request_bkup flag when sending MP_PRIO mptcp: mib: count MPJ with backup flag selftests: mptcp: join: validate backup in MPJ mptcp: pm: fix backup support in signal endpoints selftests: mptcp: join: check backup support in signal endp include/trace/events/mptcp.h | 2 +- net/mptcp/mib.c | 2 + net/mptcp/mib.h | 2 + net/mptcp/options.c | 2 +- net/mptcp/pm.c | 12 +++++ net/mptcp/pm_netlink.c | 19 ++++++- net/mptcp/pm_userspace.c | 18 +++++++ net/mptcp/protocol.c | 10 ++-- net/mptcp/protocol.h | 4 ++ net/mptcp/subflow.c | 10 ++++ tools/testing/selftests/net/mptcp/mptcp_join.sh | 72 ++++++++++++++++++++----- 11 files changed, 132 insertions(+), 21 deletions(-) ==================== Link: https://patch.msgid.link/20240727-upstream-net-20240727-mptcp-backup-signal-v1-0-f50b31604cf1@kernel.org Signed-off-by: Paolo Abeni commit f833470c27832136d4416d8fc55d658082af0989 Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:29 2024 +0200 selftests: mptcp: join: check backup support in signal endp Before the previous commit, 'signal' endpoints with the 'backup' flag were ignored when sending the MP_JOIN. The MPTCP Join selftest has then been modified to validate this case: the "single address, backup" test, is now validating the MP_JOIN with a backup flag as it is what we expect it to do with such name. The previous version has been kept, but renamed to "single address, switch to backup" to avoid confusions. The "single address with port, backup" test is also now validating the MPJ with a backup flag, which makes more sense than checking the switch to backup with an MP_PRIO. The "mpc backup both sides" test is now validating that the backup flag is also set in MP_JOIN from and to the addresses used in the initial subflow, using the special ID 0. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 4596a2c1b7f5 ("mptcp: allow creating non-backup subflows") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 6834097fc38c5416701c793da94558cea49c0a1f Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:28 2024 +0200 mptcp: pm: fix backup support in signal endpoints There was a support for signal endpoints, but only when the endpoint's flag was changed during a connection. If an endpoint with the signal and backup was already present, the MP_JOIN reply was not containing the backup flag as expected. That's confusing to have this inconsistent behaviour. On the other hand, the infrastructure to set the backup flag in the SYN + ACK + MP_JOIN was already there, it was just never set before. Now when requesting the local ID from the path-manager, the backup status is also requested. Note that when the userspace PM is used, the backup flag can be set if the local address was already used before with a backup flag, e.g. if the address was announced with the 'backup' flag, or a subflow was created with the 'backup' flag. Fixes: 4596a2c1b7f5 ("mptcp: allow creating non-backup subflows") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/507 Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 935ff5bb8a1cfcdf8e60c8f5c794d0bbbc234437 Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:27 2024 +0200 selftests: mptcp: join: validate backup in MPJ A peer can notify the other one that a subflow has to be treated as "backup" by two different ways: either by sending a dedicated MP_PRIO notification, or by setting the backup flag in the MP_JOIN handshake. The selftests were previously monitoring the former, but not the latter. This is what is now done here by looking at these new MIB counters when validating the 'backup' cases: MPTcpExtMPJoinSynBackupRx MPTcpExtMPJoinSynAckBackupRx The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it will help to validate a new fix for an issue introduced by this commit ID. Fixes: 4596a2c1b7f5 ("mptcp: allow creating non-backup subflows") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 4dde0d72ccec500c60c798e036b852e013d6e124 Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:26 2024 +0200 mptcp: mib: count MPJ with backup flag Without such counters, it is difficult to easily debug issues with MPJ not having the backup flags on production servers. This is not strictly a fix, but it eases to validate the following patches without requiring to take packet traces, to query ongoing connections with Netlink with admin permissions, or to guess by looking at the behaviour of the packet scheduler. Also, the modification is self contained, isolated, well controlled, and the increments are done just after others, there from the beginning. It looks then safe, and helpful to backport this. Fixes: 4596a2c1b7f5 ("mptcp: allow creating non-backup subflows") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 4258b94831bb7ff28ab80e3c8d94db37db930728 Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:25 2024 +0200 mptcp: pm: only set request_bkup flag when sending MP_PRIO The 'backup' flag from mptcp_subflow_context structure is supposed to be set only when the other peer flagged a subflow as backup, not the opposite. Fixes: 067065422fcd ("mptcp: add the outgoing MP_PRIO support") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit efd340bf3d7779a3a8ec954d8ec0fb8a10f24982 Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:24 2024 +0200 mptcp: distinguish rcv vs sent backup flag in requests When sending an MP_JOIN + SYN + ACK, it is possible to mark the subflow as 'backup' by setting the flag with the same name. Before this patch, the backup was set if the other peer set it in its MP_JOIN + SYN request. It is not correct: the backup flag should be set in the MPJ+SYN+ACK only if the host asks for it, and not mirroring what was done by the other peer. It is then required to have a dedicated bit for each direction, similar to what is done in the subflow context. Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit b6a66e521a2032f7fcba2af5a9bcbaeaa19b7ca3 Author: Matthieu Baerts (NGI0) Date: Sat Jul 27 12:01:23 2024 +0200 mptcp: sched: check both directions for backup The 'mptcp_subflow_context' structure has two items related to the backup flags: - 'backup': the subflow has been marked as backup by the other peer - 'request_bkup': the backup flag has been set by the host Before this patch, the scheduler was only looking at the 'backup' flag. That can make sense in some cases, but it looks like that's not what we wanted for the general use, because either the path-manager was setting both of them when sending an MP_PRIO, or the receiver was duplicating the 'backup' flag in the subflow request. Note that the use of these two flags in the path-manager are going to be fixed in the next commits, but this change here is needed not to modify the behaviour. Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 0ce91928ec62d189b5c51816e325f02587b53118 Author: Thomas Zimmermann Date: Wed Jul 17 16:24:16 2024 +0200 drm/ast: astdp: Wake up during connector status detection Power up the ASTDP connector for connection status detection if the connector is not active. Keep it powered if a display is attached. This fixes a bug where the connector does not come back after disconnecting the display. The encoder's atomic_disable turns off power on the physical connector. Further HPD reads will fail, thus preventing the driver from detecting re-connected displays. For connectors that are actively used, only test the HPD flag without touching power. Fixes: f81bb0ac7872 ("drm/ast: report connection status on Display Port.") Cc: Jocelyn Falempe Cc: Thomas Zimmermann Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v6.6+ Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240717143319.104012-2-tzimmermann@suse.de commit c14e4114582c20276467226387d5bae7310a849e Author: Pavan Kumar Paluri Date: Mon Jul 29 13:08:08 2024 -0500 x86/sev: Fix __reserved field in sev_config sev_config currently has debug, ghcbs_initialized, and use_cas fields. However, __reserved count has not been updated. Fix this. Fixes: 34ff65901735 ("x86/sev: Use kernel provided SVSM Calling Areas") Signed-off-by: Pavan Kumar Paluri Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240729180808.366587-1-papaluri@amd.com commit 11dcda9b7a3407abe941092c87e7bc7e2da9e97b Merge: a1ff5a7d78a03 291e4baf70019 Author: Maxime Ripard Date: Tue Jul 30 09:13:51 2024 +0200 Merge drm-misc/drm-misc-next-fixes into drm-misc-fixes There's a patch left in drm-misc-next-fixes, let's bring it into drm-misc-fixes. Signed-off-by: Maxime Ripard commit a1ff5a7d78a036d6c2178ee5acd6ba4946243800 Merge: b5fbf924f125b 8400291e289ee Author: Maxime Ripard Date: Tue Jul 30 09:09:23 2024 +0200 Merge drm/drm-fixes into drm-misc-fixes Let's start the new drm-misc-fixes cycle by bringing in 6.11-rc1. Signed-off-by: Maxime Ripard commit 914f8961879de6fadd166ebd75151a778481e09a Author: Jean-Michel Hautbois Date: Sat Jun 8 18:41:27 2024 +0200 media: v4l: Fix missing tabular column hint for Y14P format The original patch added two columns in the flat-table of Luma-Only Image Formats, without updating hints to latex: above it. This results in wrong column count in the output of Sphinx's latex builder. Fix it. Reported-by: Akira Yokosawa Closes: https://lore.kernel.org/linux-media/bdbc27ba-5098-49fb-aabf-753c81361cc7@gmail.com/ Fixes: adb1d4655e53 ("media: v4l: Add V4L2-PIX-FMT-Y14P format") Cc: stable@vger.kernel.org # for v6.10 Signed-off-by: Jean-Michel Hautbois Signed-off-by: Hans Verkuil commit 423a77ae3a3f916809ff3ab1c8db6d3d580c3120 Author: Bingbu Cao Date: Wed Jul 17 15:40:50 2024 +0800 media: intel/ipu6: select AUXILIARY_BUS in Kconfig Intel IPU6 PCI driver need register its devices on auxiliary bus, so it needs to select the AUXILIARY_BUS in Kconfig. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407161833.7BEFXejx-lkp@intel.com/ Fixes: c70281cc83d6 ("media: intel/ipu6: add Kconfig and Makefile") Signed-off-by: Bingbu Cao Cc: stable@vger.kernel.org # for v6.10 Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d7b5f7537c8282e1e1919408d0b6c69877fd35f8 Author: Arnd Bergmann Date: Fri Jul 19 11:53:50 2024 +0200 media: ipu-bridge: fix ipu6 Kconfig dependencies Commit 4670c8c3fb04 ("media: ipu-bridge: Fix Kconfig dependencies") changed how IPU_BRIDGE dependencies are handled for all drivers, but the IPU6 variant was added the old way, which causes build time warnings when I2C is turned off: WARNING: unmet direct dependencies detected for IPU_BRIDGE Depends on [n]: MEDIA_SUPPORT [=m] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=y] || COMPILE_TEST [=y]) && I2C [=n] Selected by [m]: - VIDEO_INTEL_IPU6 [=m] && MEDIA_SUPPORT [=m] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=y] || COMPILE_TEST [=y]) && VIDEO_DEV [=m] && X86 [=y] && X86_64 [=y] && HAS_DMA [=y] To make it consistent with the other IPU drivers as well as avoid this warning, change the 'select' into 'depends on'. Fixes: c70281cc83d6 ("media: intel/ipu6: add Kconfig and Makefile") Signed-off-by: Arnd Bergmann [Sakari Ailus: Alternatively depend on !IPU_BRIDGE.] Cc: stable@vger.kernel.org # for v6.10 Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7c632fc3ce64c05bae4addbdfa174f98d0431ca4 Merge: 8400291e289ee 47398f49dab83 Author: Martin K. Petersen Date: Mon Jul 29 21:46:16 2024 -0400 Merge branch '6.11/scsi-queue' into 6.11/scsi-fixes Pull outstanding commits from 6.11 queue into fixes. Signed-off-by: Martin K. Petersen commit 94ede2a3e9135764736221c080ac7c0ad993dc2d Author: Linus Torvalds Date: Mon Jul 29 16:34:17 2024 -0700 profiling: remove stale percpu flip buffer variables For some reason I didn't see this issue on my arm64 or x86-64 builds, but Stephen Rothwell reports that commit 2accfdb7eff6 ("profiling: attempt to remove per-cpu profile flip buffer") left these static variables around, and the powerpc build is unhappy about them: kernel/profile.c:52:28: warning: 'cpu_profile_flip' defined but not used [-Wunused-variable] 52 | static DEFINE_PER_CPU(int, cpu_profile_flip); | ^~~~~~~~~~~~~~~~ .. So remove these stale left-over remnants too. Fixes: 2accfdb7eff6 ("profiling: attempt to remove per-cpu profile flip buffer") Reported-by: Stephen Rothwell Signed-off-by: Linus Torvalds commit 41c24102af7b6236277a214428b203d51a3462df Author: Stanislav Fomichev Date: Thu Jul 25 14:40:29 2024 -0700 selftests/bpf: Filter out _GNU_SOURCE when compiling test_cpp Jakub reports build failures when merging linux/master with net tree: CXX test_cpp In file included from :454: :2:9: error: '_GNU_SOURCE' macro redefined [-Werror,-Wmacro-redefined] 2 | #define _GNU_SOURCE | ^ :445:9: note: previous definition is here 445 | #define _GNU_SOURCE 1 The culprit is commit cc937dad85ae ("selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk") which unconditionally added -D_GNU_SOUCE to CLFAGS. Apparently clang++ also unconditionally adds it for the C++ targets [0] which causes a conflict. Add small change in the selftests makefile to filter it out for test_cpp. Not sure which tree it should go via, targeting bpf for now, but net might be better? 0: https://stackoverflow.com/questions/11670581/why-is-gnu-source-defined-by-default-and-how-to-turn-it-off Signed-off-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240725214029.1760809-1-sdf@fomichev.me commit 6b5faec9f564ea627c66064a4a6a5904fe5a07dd Merge: 10826505f5235 facdbdfe0e620 Author: Linus Torvalds Date: Mon Jul 29 13:07:05 2024 -0700 Merge tag 'for-linus-2024072901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Benjamin Tissoires: - fixes for HID-BPF after the merge with the bpf tree (Arnd Bergmann and Benjamin Tissoires) - some tool type fix for the Wacom driver (Tatsunosuke Tobita) - a reorder of the sensor discovery to ensure the HID AMD SFH is removed when no sensors are available (Basavaraj Natikar) * tag 'for-linus-2024072901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: selftests/hid: add test for attaching multiple time the same struct_ops HID: bpf: prevent the same struct_ops to be attached more than once selftests/hid: disable struct_ops auto-attach selftests/hid: fix bpf_wq new API HID: amd_sfh: Move sensor discovery before HID device initialization hid: bpf: add BPF_JIT dependency HID: wacom: more appropriate tool type categorization HID: wacom: Modify pen IDs commit 10826505f52357c7c9e12358db97a3acbe82e958 Merge: cec6937dd1aae 6d834691da474 Author: Linus Torvalds Date: Mon Jul 29 12:53:37 2024 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "The biggest thing here is the adminq change - but it looks like the only way to avoid headq blocking causing indefinite stalls. This fixes three issues: - Prevent admin commands on one VF blocking another. This prevents a bad VF from blocking a good one, as well as fixing a scalability issue with large # of VFs - Correctly return error on command failure on octeon. We used to treat failed commands as a success. - Fix modpost warning when building virtio_dma_buf. Harmless, but the fix is trivial" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_pci_modern: remove admin queue serialization lock virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result virtio_pci_modern: pass cmd as an identification token virtio_pci_modern: create admin queue of queried size virtio: create admin queues alongside other virtqueues virtio_pci: pass vq info as an argument to vp_setup_vq() virtio: push out code to vp_avq_index() virtio_pci_modern: treat vp_dev->admin_vq.info.vq pointer as static virtio_pci: introduce vector allocation fallback for slow path virtqueues virtio_pci: pass vector policy enum to vp_find_one_vq_msix() virtio_pci: pass vector policy enum to vp_find_vqs_msix() virtio_pci: simplify vp_request_msix_vectors() call a bit virtio_pci: push out single vq find code to vp_find_one_vq_msix() vdpa/octeon_ep: Fix error code in octep_process_mbox() virtio: add missing MODULE_DESCRIPTION() macro commit 0710c3d304f67f9b68f5082214e311ec8f82bd82 Author: Konrad Dybcio Date: Fri Jul 26 13:18:25 2024 +0200 dt-bindings: Batch-update Konrad Dybcio's email Use my @kernel.org address everywhere. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240726-topic-konrad_email-v1-3-f94665da2919@kernel.org Signed-off-by: Rob Herring (Arm) commit 70eac5c3c49195a323387ec237f17f9801cbdb25 Author: Dumitru Ceclan Date: Tue Jul 23 14:13:22 2024 +0300 iio: adc: ad7173: Fix incorrect compatible string Wrong compatible strings are used for AD411x devices. Fix by adding the missing "adi," prefix. Fixes: 13d12e3ad12d ("iio: adc: ad7173: Add support for AD411x devices") Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240723111322.324947-1-dumitru.ceclan@analog.com Signed-off-by: Jonathan Cameron commit 84c65d8008764a8fb4e627ff02de01ec4245f2c4 Author: David Lechner Date: Tue Jul 23 11:32:21 2024 -0500 iio: buffer-dmaengine: fix releasing dma channel on error If dma_get_slave_caps() fails, we need to release the dma channel before returning an error to avoid leaking the channel. Fixes: 2d6ca60f3284 ("iio: Add a DMAengine framework based buffer") Signed-off-by: David Lechner Link: https://patch.msgid.link/20240723-iio-fix-dmaengine-free-on-error-v1-1-2c7cbc9b92ff@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit 90826e08468ba7fb35d8b39645b22d9e80004afe Author: Guillaume Stols Date: Tue Jul 2 12:52:51 2024 +0000 iio: adc: ad7606: remove frstdata check for serial mode The current implementation attempts to recover from an eventual glitch in the clock by checking frstdata state after reading the first channel's sample: If frstdata is low, it will reset the chip and return -EIO. This will only work in parallel mode, where frstdata pin is set low after the 2nd sample read starts. For the serial mode, according to the datasheet, "The FRSTDATA output returns to a logic low following the 16th SCLK falling edge.", thus after the Xth pulse, X being the number of bits in a sample, the check will always be true, and the driver will not work at all in serial mode if frstdata(optional) is defined in the devicetree as it will reset the chip, and return -EIO every time read_sample is called. Hence, this check must be removed for serial mode. Fixes: b9618c0cacd7 ("staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4") Signed-off-by: Guillaume Stols Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240702-cleanup-ad7606-v3-1-18d5ea18770e@baylibre.com Cc: Signed-off-by: Jonathan Cameron commit b48aa991758999d4e8f9296c5bbe388f293ef465 Author: Aleksandr Mishin Date: Wed Jul 3 18:45:06 2024 +0300 staging: iio: frequency: ad9834: Validate frequency parameter value In ad9834_write_frequency() clk_get_rate() can return 0. In such case ad9834_calc_freqreg() call will lead to division by zero. Checking 'if (fout > (clk_freq / 2))' doesn't protect in case of 'fout' is 0. ad9834_write_frequency() is called from ad9834_write(), where fout is taken from text buffer, which can contain any value. Modify parameters checking. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 12b9d5bf76bf ("Staging: IIO: DDS: AD9833 / AD9834 driver") Suggested-by: Dan Carpenter Signed-off-by: Aleksandr Mishin Reviewed-by: Dan Carpenter Link: https://patch.msgid.link/20240703154506.25584-1-amishin@t-argos.ru Cc: Signed-off-by: Jonathan Cameron commit c623e9daf60a0275d623ce054601550e54987f5b Author: FUKAUMI Naoki Date: Mon Jul 22 18:52:16 2024 +0900 arm64: dts: rockchip: fix PMIC interrupt pin in pinctrl for ROCK Pi E use GPIO0_A2 as PMIC interrupt pin in pinctrl. (I forgot to fix this part in previous commit.) Fixes: 02afd3d5b9fa ("arm64: dts: rockchip: fix PMIC interrupt pin on ROCK Pi E") Signed-off-by: FUKAUMI Naoki Link: https://lore.kernel.org/r/20240722095216.1656081-1-naoki@radxa.com Signed-off-by: Heiko Stuebner commit cec6937dd1aae1b38d147bd190cb895d06cf96d0 Author: Linus Torvalds Date: Mon Jul 29 12:05:06 2024 -0700 task_work: make TWA_NMI_CURRENT handling conditional on IRQ_WORK The TWA_NMI_CURRENT handling very much depends on IRQ_WORK, but that isn't universally enabled everywhere. Maybe the IRQ_WORK infrastructure should just be unconditional - x86 ends up indirectly enabling it through unconditionally enabling PERF_EVENTS, for example. But it also gets enabled by having SMP support, or even if you just have PRINTK enabled. But in the meantime TWA_NMI_CURRENT causes tons of build failures on various odd minimal configs. Which did show up in linux-next, but despite that nobody bothered to fix it or even inform me until -rc1 was out. Fixes: 466e4d801cd4 ("task_work: Add TWA_NMI_CURRENT as an additional notify mode") Reported-by: Naresh Kamboju Reported-by: kernelci.org bot Reported-by: Guenter Roeck Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Signed-off-by: Linus Torvalds commit 1c9034eb025330f193f01ff4260367d078c60e4a Author: Alexander Shiyan Date: Tue Jul 9 21:20:29 2024 +0300 arm64: dts: rockchip: Remove broken tsadc pinctrl binding for rk356x There is no pinctrl "init" handling in the tsadc driver. Let's remove this binding. Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20240709182029.1318214-1-eagle.alexander923@gmail.com Signed-off-by: Heiko Stuebner commit e2d124de0017b7649963e956eb7b80bc84848eb3 Merge: 45d763fe503e6 dcb6631d05152 Author: Mark Brown Date: Mon Jul 29 19:34:05 2024 +0100 ASoC: codecs: wcd93xx/wsa88xx: Correct Soundwire ports Merge series from Krzysztof Kozlowski : Incorrect mask of Soundwire ports - one bit too long/big - was passed. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Not adding Cc-stable because I don't think the issue can lead to real out-of-bounds read. commit 950aeefb34923fe3c28ade35fe05f24e2c5b1d55 Author: Nicolin Chen Date: Wed Jul 17 22:01:30 2024 -0700 iommufd/device: Fix hwpt at err_unresv in iommufd_device_do_replace() The rewind routine should remove the reserved iovas added to the new hwpt. Fixes: 89db31635c87 ("iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/r/20240718050130.1956804-1-nicolinc@nvidia.com Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 2accfdb7eff65f390c4308b0e9cb7c3fe48ad63c Author: Linus Torvalds Date: Mon Jul 29 10:58:28 2024 -0700 profiling: attempt to remove per-cpu profile flip buffer This is the really old legacy kernel profiling code, which has long since been obviated by "real profiling" (ie 'prof' and company), and mainly remains as a source of syzbot reports. There are anecdotal reports that people still use it for boot-time profiling, but it's unlikely that such use would care about the old NUMA optimizations in this code from 2004 (commit ad02973d42: "profile: 512x Altix timer interrupt livelock fix" in the BK import archive at [1]) So in order to head off future syzbot reports, let's try to simplify this code and get rid of the per-cpu profile buffers that are quite a large portion of the complexity footprint of this thing (including CPU hotplug callbacks etc). It's unlikely anybody will actually notice, or possibly, as Thomas put it: "Only people who indulge in nostalgia will notice :)". That said, if it turns out that this code is actually actively used by somebody, we can always revert this removal. Thus the "attempt" in the summary line. [ Note: in a small nod to "the profiling code can cause NUMA problems", this also removes the "increment the last entry in the profiling array on any unknown hits" logic. That would account any program counter in a module to that single counter location, and might exacerbate any NUMA cacheline bouncing issues ] Link: https://lore.kernel.org/all/CAHk-=wgs52BxT4Zjmjz8aNvHWKxf5_ThBY4bYL1Y6CTaNL2dTw@mail.gmail.com/ Link: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git [1] Cc: Thomas Gleixner Cc: Tetsuo Handa Signed-off-by: Linus Torvalds commit 7c51f7bbf057f82aeba3390c39ef61b244181c09 Author: Tetsuo Handa Date: Sat Jul 27 19:59:57 2024 +0900 profiling: remove prof_cpu_mask syzbot is reporting uninit-value at profile_hits(), for there is a race window between if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL)) return -ENOMEM; cpumask_copy(prof_cpu_mask, cpu_possible_mask); in profile_init() and cpumask_available(prof_cpu_mask) && cpumask_test_cpu(smp_processor_id(), prof_cpu_mask)) in profile_tick(); prof_cpu_mask remains uninitialzed until cpumask_copy() completes while cpumask_available(prof_cpu_mask) returns true as soon as alloc_cpumask_var(&prof_cpu_mask) completes. We could replace alloc_cpumask_var() with zalloc_cpumask_var() and call cpumask_copy() from create_proc_profile() on only UP kernels, for profile_online_cpu() calls cpumask_set_cpu() as needed via cpuhp_setup_state(CPUHP_AP_ONLINE_DYN) on SMP kernels. But this patch removes prof_cpu_mask because it seems unnecessary. The cpumask_test_cpu(smp_processor_id(), prof_cpu_mask) test in profile_tick() is likely always true due to a CPU cannot call profile_tick() if that CPU is offline and cpumask_set_cpu(cpu, prof_cpu_mask) is called when that CPU becomes online and cpumask_clear_cpu(cpu, prof_cpu_mask) is called when that CPU becomes offline . This test could be false during transition between online and offline. But according to include/linux/cpuhotplug.h , CPUHP_PROFILE_PREPARE belongs to PREPARE section, which means that the CPU subjected to profile_dead_cpu() cannot be inside profile_tick() (i.e. no risk of use-after-free bug) because interrupt for that CPU is disabled during PREPARE section. Therefore, this test is guaranteed to be true, and can be removed. (Since profile_hits() checks prof_buffer != NULL, we don't need to check prof_buffer != NULL here unless get_irq_regs() or user_mode() is such slow that we want to avoid when prof_buffer == NULL). do_profile_hits() is called from profile_tick() from timer interrupt only if cpumask_test_cpu(smp_processor_id(), prof_cpu_mask) is true and prof_buffer is not NULL. But syzbot is also reporting that sometimes do_profile_hits() is called while current thread is still doing vzalloc(), where prof_buffer must be NULL at this moment. This indicates that multiple threads concurrently tried to write to /sys/kernel/profiling interface, which caused that somebody else try to re-allocate prof_buffer despite somebody has already allocated prof_buffer. Fix this by using serialization. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=b1a83ab2a9eb9321fbdd Signed-off-by: Tetsuo Handa Tested-by: syzbot Signed-off-by: Linus Torvalds commit 99d3bf5f7377d42f8be60a6b9cb60fb0be34dceb Author: Tetsuo Handa Date: Mon Jul 29 21:51:30 2024 +0900 Input: MT - limit max slots syzbot is reporting too large allocation at input_mt_init_slots(), for num_slots is supplied from userspace using ioctl(UI_DEV_CREATE). Since nobody knows possible max slots, this patch chose 1024. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=0122fa359a69694395d5 Suggested-by: Dmitry Torokhov Signed-off-by: Tetsuo Handa Signed-off-by: Linus Torvalds commit 3894840a7a11aa06cc3b0d5a2d1b5f6878127903 Merge: dc1c8034e31b1 d7ac67b943909 Author: Linus Torvalds Date: Mon Jul 29 10:33:51 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux Pull ARM updates from Russell King: - ftrace: don't assume stack frames are contiguous in memory - remove unused mod_inwind_map structure - spelling fixes - allow use of LD dead code/data elimination - fix callchain_trace() return value - add support for stackleak gcc plugin - correct some reset asm function prototypes for CFI [ Missed the merge window because Russell forgot to push out ] * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9408/1: mm: CFI: Fix some erroneous reset prototypes ARM: 9407/1: Add support for STACKLEAK gcc plugin ARM: 9406/1: Fix callchain_trace() return value ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION ARM: 9403/1: Alpine: Spelling s/initialiing/initializing/ ARM: 9402/1: Kconfig: Spelling s/Cortex A-/Cortex-A/ ARM: 9400/1: Remove unused struct 'mod_unwind_map' commit 939b656bc8ab203fdbde26ccac22bcb7f0985be5 Author: Filipe Manana Date: Fri Jul 26 11:12:52 2024 +0100 btrfs: fix corruption after buffer fault in during direct IO append write During an append (O_APPEND write flag) direct IO write if the input buffer was not previously faulted in, we can corrupt the file in a way that the final size is unexpected and it includes an unexpected hole. The problem happens like this: 1) We have an empty file, with size 0, for example; 2) We do an O_APPEND direct IO with a length of 4096 bytes and the input buffer is not currently faulted in; 3) We enter btrfs_direct_write(), lock the inode and call generic_write_checks(), which calls generic_write_checks_count(), and that function sets the iocb position to 0 with the following code: if (iocb->ki_flags & IOCB_APPEND) iocb->ki_pos = i_size_read(inode); 4) We call btrfs_dio_write() and enter into iomap, which will end up calling btrfs_dio_iomap_begin() and that calls btrfs_get_blocks_direct_write(), where we update the i_size of the inode to 4096 bytes; 5) After btrfs_dio_iomap_begin() returns, iomap will attempt to access the page of the write input buffer (at iomap_dio_bio_iter(), with a call to bio_iov_iter_get_pages()) and fail with -EFAULT, which gets returned to btrfs at btrfs_direct_write() via btrfs_dio_write(); 6) At btrfs_direct_write() we get the -EFAULT error, unlock the inode, fault in the write buffer and then goto to the label 'relock'; 7) We lock again the inode, do all the necessary checks again and call again generic_write_checks(), which calls generic_write_checks_count() again, and there we set the iocb's position to 4K, which is the current i_size of the inode, with the following code pointed above: if (iocb->ki_flags & IOCB_APPEND) iocb->ki_pos = i_size_read(inode); 8) Then we go again to btrfs_dio_write() and enter iomap and the write succeeds, but it wrote to the file range [4K, 8K), leaving a hole in the [0, 4K) range and an i_size of 8K, which goes against the expectations of having the data written to the range [0, 4K) and get an i_size of 4K. Fix this by not unlocking the inode before faulting in the input buffer, in case we get -EFAULT or an incomplete write, and not jumping to the 'relock' label after faulting in the buffer - instead jump to a location immediately before calling iomap, skipping all the write checks and relocking. This solves this problem and it's fine even in case the input buffer is memory mapped to the same file range, since only holding the range locked in the inode's io tree can cause a deadlock, it's safe to keep the inode lock (VFS lock), as was fixed and described in commit 51bd9563b678 ("btrfs: fix deadlock due to page faults during direct IO reads and writes"). A sample reproducer provided by a reporter is the following: $ cat test.c #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include #include #include #include int main(int argc, char *argv[]) { if (argc < 2) { fprintf(stderr, "Usage: %s \n", argv[0]); return 1; } int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC | O_DIRECT | O_APPEND, 0644); if (fd < 0) { perror("creating test file"); return 1; } char *buf = mmap(NULL, 4096, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); ssize_t ret = write(fd, buf, 4096); if (ret < 0) { perror("pwritev2"); return 1; } struct stat stbuf; ret = fstat(fd, &stbuf); if (ret < 0) { perror("stat"); return 1; } printf("size: %llu\n", (unsigned long long)stbuf.st_size); return stbuf.st_size == 4096 ? 0 : 1; } A test case for fstests will be sent soon. Reported-by: Hanna Czenczek Link: https://lore.kernel.org/linux-btrfs/0b841d46-12fe-4e64-9abb-871d8d0de271@redhat.com/ Fixes: 8184620ae212 ("btrfs: fix lost file sync on direct IO write with nowait and dsync iocb") CC: stable@vger.kernel.org # 6.1+ Tested-by: Hanna Czenczek Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 8cd44dd1d17a23d5cc8c443c659ca57aa76e2fa5 Author: Naohiro Aota Date: Wed Feb 15 09:18:02 2023 +0900 btrfs: zoned: fix zone_unusable accounting on making block group read-write again When btrfs makes a block group read-only, it adds all free regions in the block group to space_info->bytes_readonly. That free space excludes reserved and pinned regions. OTOH, when btrfs makes the block group read-write again, it moves all the unused regions into the block group's zone_unusable. That unused region includes reserved and pinned regions. As a result, it counts too much zone_unusable bytes. Fortunately (or unfortunately), having erroneous zone_unusable does not affect the calculation of space_info->bytes_readonly, because free space (num_bytes in btrfs_dec_block_group_ro) calculation is done based on the erroneous zone_unusable and it reduces the num_bytes just to cancel the error. This behavior can be easily discovered by adding a WARN_ON to check e.g, "bg->pinned > 0" in btrfs_dec_block_group_ro(), and running fstests test case like btrfs/282. Fix it by properly considering pinned and reserved in btrfs_dec_block_group_ro(). Also, add a WARN_ON and introduce btrfs_space_info_update_bytes_zone_unusable() to catch a similar mistake. Fixes: 169e0da91a21 ("btrfs: zoned: track unusable bytes for zones") CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Naohiro Aota Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit d89c285d28491d8f10534c262ac9e6bdcbe1b4d2 Author: Naohiro Aota Date: Thu Jul 11 23:50:58 2024 +0900 btrfs: do not subtract delalloc from avail bytes The block group's avail bytes printed when dumping a space info subtract the delalloc_bytes. However, as shown in btrfs_add_reserved_bytes() and btrfs_free_reserved_bytes(), it is added or subtracted along with "reserved" for the delalloc case, which means the "delalloc_bytes" is a part of the "reserved" bytes. So, excluding it to calculate the avail space counts delalloc_bytes twice, which can lead to an invalid result. Fixes: e50b122b832b ("btrfs: print available space for a block group when dumping a space info") CC: stable@vger.kernel.org # 6.6+ Signed-off-by: Naohiro Aota Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit 478574370bef7951fbd9ef5155537d6cbed49472 Author: Boris Burkov Date: Mon Jul 22 16:49:45 2024 -0700 btrfs: make cow_file_range_inline() honor locked_page on error The btrfs buffered write path runs through __extent_writepage() which has some tricky return value handling for writepage_delalloc(). Specifically, when that returns 1, we exit, but for other return values we continue and end up calling btrfs_folio_end_all_writers(). If the folio has been unlocked (note that we check the PageLocked bit at the start of __extent_writepage()), this results in an assert panic like this one from syzbot: BTRFS: error (device loop0 state EAL) in free_log_tree:3267: errno=-5 IO failure BTRFS warning (device loop0 state EAL): Skipping commit of aborted transaction. BTRFS: error (device loop0 state EAL) in cleanup_transaction:2018: errno=-5 IO failure assertion failed: folio_test_locked(folio), in fs/btrfs/subpage.c:871 ------------[ cut here ]------------ kernel BUG at fs/btrfs/subpage.c:871! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 PID: 5090 Comm: syz-executor225 Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 RIP: 0010:btrfs_folio_end_all_writers+0x55b/0x610 fs/btrfs/subpage.c:871 Code: e9 d3 fb ff ff e8 25 22 c2 fd 48 c7 c7 c0 3c 0e 8c 48 c7 c6 80 3d 0e 8c 48 c7 c2 60 3c 0e 8c b9 67 03 00 00 e8 66 47 ad 07 90 <0f> 0b e8 6e 45 b0 07 4c 89 ff be 08 00 00 00 e8 21 12 25 fe 4c 89 RSP: 0018:ffffc900033d72e0 EFLAGS: 00010246 RAX: 0000000000000045 RBX: 00fff0000000402c RCX: 663b7a08c50a0a00 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: ffffc900033d73b0 R08: ffffffff8176b98c R09: 1ffff9200067adfc R10: dffffc0000000000 R11: fffff5200067adfd R12: 0000000000000001 R13: dffffc0000000000 R14: 0000000000000000 R15: ffffea0001cbee80 FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5f076012f8 CR3: 000000000e134000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __extent_writepage fs/btrfs/extent_io.c:1597 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2251 [inline] btrfs_writepages+0x14d7/0x2760 fs/btrfs/extent_io.c:2373 do_writepages+0x359/0x870 mm/page-writeback.c:2656 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397 __filemap_fdatawrite_range mm/filemap.c:430 [inline] __filemap_fdatawrite mm/filemap.c:436 [inline] filemap_flush+0xdf/0x130 mm/filemap.c:463 btrfs_release_file+0x117/0x130 fs/btrfs/file.c:1547 __fput+0x24a/0x8a0 fs/file_table.c:422 task_work_run+0x24f/0x310 kernel/task_work.c:222 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa2f/0x27f0 kernel/exit.c:877 do_group_exit+0x207/0x2c0 kernel/exit.c:1026 __do_sys_exit_group kernel/exit.c:1037 [inline] __se_sys_exit_group kernel/exit.c:1035 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1035 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 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:0x7f5f075b70c9 Code: Unable to access opcode bytes at 0x7f5f075b709f. I was hitting the same issue by doing hundreds of accelerated runs of generic/475, which also hits IO errors by design. I instrumented that reproducer with bpftrace and found that the undesirable folio_unlock was coming from the following callstack: folio_unlock+5 __process_pages_contig+475 cow_file_range_inline.constprop.0+230 cow_file_range+803 btrfs_run_delalloc_range+566 writepage_delalloc+332 __extent_writepage # inlined in my stacktrace, but I added it here extent_write_cache_pages+622 Looking at the bisected-to patch in the syzbot report, Josef realized that the logic of the cow_file_range_inline error path subtly changing. In the past, on error, it jumped to out_unlock in cow_file_range(), which honors the locked_page, so when we ultimately call folio_end_all_writers(), the folio of interest is still locked. After the change, we always unlocked ignoring the locked_page, on both success and error. On the success path, this all results in returning 1 to __extent_writepage(), which skips the folio_end_all_writers() call, which makes it OK to have unlocked. Fix the bug by wiring the locked_page into cow_file_range_inline() and only setting locked_page to NULL on success. Reported-by: syzbot+a14d8ac9af3a2a4fd0c8@syzkaller.appspotmail.com Fixes: 0586d0a89e77 ("btrfs: move extent bit and page cleanup into cow_file_range_inline") CC: stable@vger.kernel.org # 6.10+ Reviewed-by: Qu Wenruo Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 963fb4612295a5c35b1b89c8bff3bdd4f9127af6 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:16 2024 +0200 ice: xsk: fix txq interrupt mapping ice_cfg_txq_interrupt() internally handles XDP Tx ring. Do not use ice_for_each_tx_ring() in ice_qvec_cfg_msix() as this causing us to treat XDP ring that belongs to queue vector as Tx ring and therefore misconfiguring the interrupts. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 6044ca26210ba72b3dcc649fae1cbedd9e6ab018 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:15 2024 +0200 ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog It is read by data path and modified from process context on remote cpu so it is needed to use WRITE_ONCE to clear the pointer. Fixes: efc2214b6047 ("ice: Add support for XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit ebc33a3f8d0aeddf19fd5827add24b82ae171829 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:14 2024 +0200 ice: improve updating ice_{t,r}x_ring::xsk_pool xsk_buff_pool pointers that ice ring structs hold are updated via ndo_bpf that is executed in process context while it can be read by remote CPU at the same time within NAPI poll. Use synchronize_net() after pointer update and {READ,WRITE}_ONCE() when working with mentioned pointer. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 9da75a511c5558fa3da56759984fd1fa859186f0 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:13 2024 +0200 ice: toggle netif_carrier when setting up XSK pool This so we prevent Tx timeout issues. One of conditions checked on running in the background dev_watchdog() is netif_carrier_ok(), so let us turn it off when we disable the queues that belong to a q_vector where XSK pool is being configured. Turn carrier on in ice_qp_ena() only when ice_get_link_status() tells us that physical link is up. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit d5922717994911e8f0eab736f3ba0d968c158823 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:12 2024 +0200 ice: modify error handling when setting XSK pool in ndo_bpf Don't bail out right when spotting an error within ice_qp_{dis,ena}() but rather track error and go through whole flow of disabling and enabling queue pair. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 405d9999aa0b4ae467ef391d1d9c7e0d30ad0841 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:11 2024 +0200 ice: replace synchronize_rcu with synchronize_net Given that ice_qp_dis() is called under rtnl_lock, synchronize_net() can be called instead of synchronize_rcu() so that XDP rings can finish its job in a faster way. Also let us do this as earlier in XSK queue disable flow. Additionally, turn off regular Tx queue before disabling irqs and NAPI. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 1ff72a2f67791cd4ddad19ed830445f57b30e992 Author: Maciej Fijalkowski Date: Fri Jul 26 20:17:10 2024 +0200 ice: don't busy wait for Rx queue disable in ice_qp_dis() When ice driver is spammed with multiple xdpsock instances and flow control is enabled, there are cases when Rx queue gets stuck and unable to reflect the disable state in QRX_CTRL register. Similar issue has previously been addressed in commit 13a6233b033f ("ice: Add support to enable/disable all Rx queues before waiting"). To workaround this, let us simply not wait for a disabled state as later patch will make sure that regardless of the encountered error in the process of disabling a queue pair, the Rx queue will be enabled. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit ec145a18687fec8dd97eeb4f30057fa4debef577 Author: Michal Kubiak Date: Fri Jul 26 20:17:09 2024 +0200 ice: respect netif readiness in AF_XDP ZC related ndo's Address a scenario in which XSK ZC Tx produces descriptors to XDP Tx ring when link is either not yet fully initialized or process of stopping the netdev has already started. To avoid this, add checks against carrier readiness in ice_xsk_wakeup() and in ice_xmit_zc(). One could argue that bailing out early in ice_xsk_wakeup() would be sufficient but given the fact that we produce Tx descriptors on behalf of NAPI that is triggered for Rx traffic, the latter is also needed. Bringing link up is an asynchronous event executed within ice_service_task so even though interface has been brought up there is still a time frame where link is not yet ok. Without this patch, when AF_XDP ZC Tx is used simultaneously with stack Tx, Tx timeouts occur after going through link flap (admin brings interface down then up again). HW seem to be unable to transmit descriptor to the wire after HW tail register bump which in turn causes bit __QUEUE_STATE_STACK_XOFF to be set forever as netdev_tx_completed_queue() sees no cleaned bytes on the input. Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API") Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reviewed-by: Shannon Nelson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Michal Kubiak Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 7ec5bd247a0d6fb23ab7da2bedd9c3f1f9333c3b Author: Kanchan Joshi Date: Mon Jul 29 12:01:33 2024 +0530 nvme: remove unused parameter First parameter of nvme_init_integrity() is unused. Remove it, and modify the callers. Signed-off-by: Kanchan Joshi Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 7ae04ba36b381bffe2471eff3a93edced843240f Author: Mikulas Patocka Date: Sat Jul 27 20:22:52 2024 +0200 parisc: fix a possible DMA corruption ARCH_DMA_MINALIGN was defined as 16 - this is too small - it may be possible that two unrelated 16-byte allocations share a cache line. If one of these allocations is written using DMA and the other is written using cached write, the value that was written with DMA may be corrupted. This commit changes ARCH_DMA_MINALIGN to be 128 on PA20 and 32 on PA1.1 - that's the largest possible cache line size. As different parisc microarchitectures have different cache line size, we define arch_slab_minalign(), cache_line_size() and dma_get_cache_alignment() so that the kernel may tune slab cache parameters dynamically, based on the detected cache line size. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Helge Deller commit 1fd2c10acb7b35d72101a4619ee5b2cddb9efd3a Author: Mikulas Patocka Date: Sat Jul 27 12:11:02 2024 +0200 parisc: fix unaligned accesses in BPF There were spurious unaligned access warnings when calling BPF code. Sometimes, the warnings were triggered with any incoming packet, making the machine hard to use. The reason for the warnings is this: on parisc64, pointers to functions are not really pointers to functions, they are pointers to 16-byte descriptor. The first 8 bytes of the descriptor is a pointer to the function and the next 8 bytes of the descriptor is the content of the "dp" register. This descriptor is generated in the function bpf_jit_build_prologue. The problem is that the function bpf_int_jit_compile advertises 4-byte alignment when calling bpf_jit_binary_alloc, bpf_jit_binary_alloc randomizes the returned array and if the array happens to be not aligned on 8-byte boundary, the descriptor generated in bpf_jit_build_prologue is also not aligned and this triggers the unaligned access warning. Fix this by advertising 8-byte alignment on parisc64 when calling bpf_jit_binary_alloc. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Helge Deller commit f872d4af79fe8c71ae291ce8875b477e1669a6c7 Author: Arseniy Krasnov Date: Mon Jul 29 16:18:50 2024 +0300 irqchip/meson-gpio: Convert meson_gpio_irq_controller::lock to 'raw_spinlock_t' This lock is acquired under irq_desc::lock with interrupts disabled. When PREEMPT_RT is enabled, 'spinlock_t' becomes preemptible, which results in invalid lock acquire context; [ BUG: Invalid wait context ] swapper/0/1 is trying to lock: ffff0000008fed30 (&ctl->lock){....}-{3:3}, at: meson_gpio_irq_update_bits0 other info that might help us debug this: context-{5:5} 3 locks held by swapper/0/1: #0: ffff0000003cd0f8 (&dev->mutex){....}-{4:4}, at: __driver_attach+0x90c #1: ffff000004714650 (&desc->request_mutex){+.+.}-{4:4}, at: __setup_irq0 #2: ffff0000047144c8 (&irq_desc_lock_class){-.-.}-{2:2}, at: __setup_irq0 stack backtrace: CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.9.9-sdkernel #1 Call trace: _raw_spin_lock_irqsave+0x60/0x88 meson_gpio_irq_update_bits+0x34/0x70 meson8_gpio_irq_set_type+0x78/0xc4 meson_gpio_irq_set_type+0x30/0x60 __irq_set_trigger+0x60/0x180 __setup_irq+0x30c/0x6e0 request_threaded_irq+0xec/0x1a4 Fixes: 215f4cc0fb20 ("irqchip/meson: Add support for gpio interrupt controller") Signed-off-by: Arseniy Krasnov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240729131850.3015508-1-avkrasnov@salutedevices.com commit 0f7ced7d620ecc7a986843d6aeec41cce3116f41 Author: Jonathan Cameron Date: Mon Jul 29 11:55:04 2024 +0100 x86/aperfmperf: Fix deadlock on cpu_hotplug_lock The broken patch results in a call to init_freq_invariance_cppc() in a CPU hotplug handler in both the path for initially present CPUs and those hotplugged later. That function includes a one time call to amd_set_max_freq_ratio() which in turn calls freq_invariance_enable() that has a static_branch_enable() which takes the cpu_hotlug_lock which is already held. Avoid the deadlock by using static_branch_enable_cpuslocked() as the lock will always be already held. The equivalent path on Intel does not already hold this lock, so take it around the call to freq_invariance_enable(), which results in it being held over the call to register_syscall_ops, which looks to be safe to do. Fixes: c1385c1f0ba3 ("ACPI: processor: Simplify initial onlining to use same path for cold and hotplug") Closes: https://lore.kernel.org/all/CABXGCsPvqBfL5hQDOARwfqasLRJ_eNPBbCngZ257HOe=xbWDkA@mail.gmail.com/ Reported-by: Mikhail Gavrilov Suggested-by: Thomas Gleixner Signed-off-by: Jonathan Cameron Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Tested-by: Mikhail Gavrilov Tested-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240729105504.2170-1-Jonathan.Cameron@huawei.com commit 45d763fe503e6e0f180f873b750aea307e73fdcf Author: Paul Handrigan Date: Fri Jul 26 10:11:11 2024 -0500 ASoC: cs530x: Change IN HPF Select kcontrol name Change to the IN HPF Select kcontrol to the correct name IN DEC Filter Select. Signed-off-by: Paul Handrigan Link: https://patch.msgid.link/20240726151111.3247774-1-paulha@opensource.cirrus.com Signed-off-by: Mark Brown commit c118478665f467e57d06b2354de65974b246b82b Author: Bruno Ancona Date: Sun Jul 28 22:50:32 2024 -0600 ASoC: amd: yc: Support mic on HP 14-em0002la Add support for the internal microphone for HP 14-em0002la laptop using a quirk entry. Signed-off-by: Bruno Ancona Link: https://patch.msgid.link/20240729045032.223230-1-brunoanconasala@gmail.com Signed-off-by: Mark Brown commit 6b99068d5ea0aa295f15f30afc98db74d056ec7b Author: Jerome Audu Date: Sat Jul 27 15:40:15 2024 +0200 ASoC: sti: add missing probe entry for player and reader This patch addresses a regression in the ASoC STI drivers that was introduced in Linux version 6.6.y. The issue originated from a series of patches (see https://lore.kernel.org/all/87wmy5b0wt.wl-kuninori.morimoto.gx@renesas.com/) that unintentionally omitted necessary probe functions for the player and reader components. Probe function in `sound/soc/sti/sti_uniperif.c:415` is being replaced by another probe function located at `sound/soc/sti/sti_uniperif.c:453`, which should instead be derived from the player and reader components. This patch correctly reinserts the missing probe entries, restoring the intended functionality. Fixes: 9f625f5e6cf9 ("ASoC: sti: merge DAI call back functions into ops") Signed-off-by: Jerome Audu Link: https://patch.msgid.link/20240727-sti-audio-fix-v2-1-208bde546c3f@free.fr Signed-off-by: Mark Brown commit dcb6631d05152930e2ea70fd2abfd811b0e970b5 Author: Krzysztof Kozlowski Date: Fri Jul 26 16:10:46 2024 +0200 ASoC: codecs: wsa884x: Correct Soundwire ports mask Device has up to WSA884X_MAX_SWR_PORTS number of ports and the array assigned to prop.sink_dpn_prop has 0..WSA884X_MAX_SWR_PORTS-1 elements. On the other hand, GENMASK(high, low) creates an inclusive mask between , so we need the mask from 0 up to WSA884X_MAX_SWR_PORTS-1. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Fixes: aa21a7d4f68a ("ASoC: codecs: wsa884x: Add WSA884x family of speakers") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-6-d4d7a8b56f05@linaro.org Signed-off-by: Mark Brown commit 6801ac36f25690e14955f7f9eace1eaa29edbdd0 Author: Krzysztof Kozlowski Date: Fri Jul 26 16:10:45 2024 +0200 ASoC: codecs: wsa883x: Correct Soundwire ports mask Device has up to WSA883X_MAX_SWR_PORTS number of ports and the array assigned to prop.sink_dpn_prop has 0..WSA883X_MAX_SWR_PORTS-1 elements. On the other hand, GENMASK(high, low) creates an inclusive mask between , so we need the mask from 0 up to WSA883X_MAX_SWR_PORTS-1. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-5-d4d7a8b56f05@linaro.org Signed-off-by: Mark Brown commit eb11c3bb64ad0a05aeacdb01039863aa2aa3614b Author: Krzysztof Kozlowski Date: Fri Jul 26 16:10:44 2024 +0200 ASoC: codecs: wsa881x: Correct Soundwire ports mask Device has up to WSA881X_MAX_SWR_PORTS number of ports and the array assigned to prop.sink_dpn_prop has 0..WSA881X_MAX_SWR_PORTS-1 elements. On the other hand, GENMASK(high, low) creates an inclusive mask between , so we need the mask from 0 up to WSA881X_MAX_SWR_PORTS-1. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-4-d4d7a8b56f05@linaro.org Signed-off-by: Mark Brown commit 74a79977c4e1d09eced33e6e22f875a5bb3fad29 Author: Krzysztof Kozlowski Date: Fri Jul 26 16:10:43 2024 +0200 ASoC: codecs: wcd939x-sdw: Correct Soundwire ports mask Device has up to WCD939X_MAX_TX_SWR_PORTS (or WCD939X_MAX_RX_SWR_PORTS for sink) number of ports and the array assigned to prop.src_dpn_prop and prop.sink_dpn_prop has 0..WCD939X_MAX_TX_SWR_PORTS-1 elements. On the other hand, GENMASK(high, low) creates an inclusive mask between , so we need the mask from 0 up to WCD939X_MAX_TX_SWR_PORTS-1. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Fixes: be2af391cea0 ("ASoC: codecs: Add WCD939x Soundwire devices driver") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-3-d4d7a8b56f05@linaro.org Signed-off-by: Mark Brown commit 3f6fb03dae9c7dfba7670858d29e03c8faaa89fe Author: Krzysztof Kozlowski Date: Fri Jul 26 16:10:42 2024 +0200 ASoC: codecs: wcd938x-sdw: Correct Soundwire ports mask Device has up to WCD938X_MAX_SWR_PORTS number of ports and the array assigned to prop.src_dpn_prop and prop.sink_dpn_prop has 0..WCD938X_MAX_SWR_PORTS-1 elements. On the other hand, GENMASK(high, low) creates an inclusive mask between , so we need the mask from 0 up to WCD938X_MAX_SWR_PORTS-1. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-2-d4d7a8b56f05@linaro.org Signed-off-by: Mark Brown commit aebb1813c279ce8f3a2dfa3f86def0c0ec1cbb8d Author: Krzysztof Kozlowski Date: Fri Jul 26 16:10:41 2024 +0200 ASoC: codecs: wcd937x-sdw: Correct Soundwire ports mask Device has up to WCD937X_MAX_TX_SWR_PORTS (or WCD937X_MAX_SWR_PORTS for sink) number of ports and the array assigned to prop.src_dpn_prop and prop.sink_dpn_prop has 0..WCD937X_MAX_TX_SWR_PORTS-1 elements. On the other hand, GENMASK(high, low) creates an inclusive mask between , so we need the mask from 0 up to WCD937X_MAX_TX_SWR_PORTS-1. Theoretically, too wide mask could cause an out of bounds read in sdw_get_slave_dpn_prop() in stream.c, however only in the case of buggy driver, e.g. adding incorrect number of ports via sdw_stream_add_slave(). Fixes: c99a515ff153 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240726-asoc-wcd-wsa-swr-ports-genmask-v1-1-d4d7a8b56f05@linaro.org Signed-off-by: Mark Brown commit aa4f76ef09a993efa9b5fab6ddf5d6d324baaea3 Author: Shengjiu Wang Date: Thu Jul 25 16:54:54 2024 +0800 ASoC: fsl_micfil: Differentiate register access permission for platforms On i.MX9x platforms, the REG_MICFIL_FSYNC_CTRL, REG_MICFIL_VERID, REG_MICFIL_PARAM are added, but they are not existed on i.MX8x platforms. Use the existed micfil->soc->use_verid to distinguish the access permission for these platforms. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1721897694-6088-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 4ddd51ccff911a2e9e961307692532a325f6c78a Author: Shengjiu Wang Date: Thu Jul 25 16:54:53 2024 +0800 ASoC: fsl_micfil: Expand the range of FIFO watermark mask On the i.MX9x platforms, the mask of FIFO watermark is 0x1F, on i.MX8x platforms, the mask of FIFO watermark is 0X7. So use the mask 0x1F for all platforms to make them compatible. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1721897694-6088-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 039564d2fd37b122ec0d268e2ee6334e7169e225 Merge: 9415d375d8520 7c70bcc2a84cf Author: David S. Miller Date: Mon Jul 29 13:31:28 2024 +0100 Merge branch 'mptcp-endpoint-readd-fixes' into main Matthieu Baerts says: ==================== mptcp: fix signal endpoint readd Issue #501 [1] showed that the Netlink PM currently doesn't correctly support removal and re-add of signal endpoints. Patches 1 and 2 address the issue: the first one in the userspace path- manager, introduced in v5.19 ; and the second one in the in-kernel path- manager, introduced in v5.7. Patch 3 introduces a related selftest. There is no 'Fixes' tag, because it might be hard to backport it automatically, as missing helpers in Bash will not be caught when compiling the kernel or the selftests. The last two patches address two small issues in the MPTCP selftests, one introduced in v6.6., and the other one in v5.17. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/501 [1] ==================== Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 7c70bcc2a84cf925f655ea1ac4b8088062b144a3 Author: Liu Jing Date: Sat Jul 27 11:04:03 2024 +0200 selftests: mptcp: always close input's FD if opened In main_loop_s function, when the open(cfg_input, O_RDONLY) function is run, the last fd is not closed if the "--cfg_repeat > 0" branch is not taken. Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests") Cc: stable@vger.kernel.org Signed-off-by: Liu Jing Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 4a2f48992ddf4b8c2fba846c6754089edae6db5a Author: Paolo Abeni Date: Sat Jul 27 11:04:02 2024 +0200 selftests: mptcp: fix error path pm_nl_check_endpoint() currently calls an not existing helper to mark the test as failed. Fix the wrong call. Fixes: 03668c65d153 ("selftests: mptcp: join: rework detailed report") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit b5e2fb832f48bc01d937a053e0550a1465a2f05d Author: Paolo Abeni Date: Sat Jul 27 11:04:01 2024 +0200 selftests: mptcp: add explicit test case for remove/readd Delete and re-create a signal endpoint and ensure that the PM actually deletes and re-create the subflow. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 4b317e0eb287bd30a1b329513531157c25e8b692 Author: Paolo Abeni Date: Sat Jul 27 11:04:00 2024 +0200 mptcp: fix NL PM announced address accounting Currently the per connection announced address counter is never decreased. As a consequence, after connection establishment, if the NL PM deletes an endpoint and adds a new/different one, no additional subflow is created for the new endpoint even if the current limits allow that. Address the issue properly updating the signaled address counter every time the NL PM removes such addresses. Fixes: 01cacb00b35c ("mptcp: add netlink-based PM") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 167b93258d1e2230ee3e8a97669b4db4cc9e90aa Author: Paolo Abeni Date: Sat Jul 27 11:03:59 2024 +0200 mptcp: fix user-space PM announced address accounting Currently the per-connection announced address counter is never decreased. When the user-space PM is in use, this just affect the information exposed via diag/sockopt, but it could still foul the PM to wrong decision. Add the missing accounting for the user-space PM's sake. Fixes: 8b1c94da1e48 ("mptcp: only send RM_ADDR in nl_cmd_remove") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 0ba521d6948ecb4acf1276494dfed127fe096ca6 Author: Miguel Ojeda Date: Thu Jul 25 20:46:44 2024 +0200 rust: macros: indent list item in `module!`'s docs Like commit e516211f615f ("rust: macros: indent list item in `paste!`'s docs"), but for `module!`. Reviewed-by: Trevor Gross Link: https://lore.kernel.org/r/20240725184644.135185-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 4bc14b9cfaa2149d41baef2f2620e9f82d9847d7 Author: Umesh Nerlige Ramappa Date: Fri Jun 28 17:56:43 2024 -0700 i915/perf: Remove code to update PWR_CLK_STATE for gen12 PWR_CLK_STATE only needs to be modified up until gen11. For gen12 this code is not applicable. Remove code to update context image with PWR_CLK_STATE for gen12. Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240629005643.3050678-1-umesh.nerlige.ramappa@intel.com (cherry picked from commit 7b5bdae7740eb6a3d09f9cd4e4b07362a15b86b3) Signed-off-by: Joonas Lahtinen commit 3c0b6f924e1259ade38587ea719b693f6f6f2f3e Author: Mavroudis Chatzilazaridis Date: Sun Jul 28 12:36:04 2024 +0000 ALSA: hda/realtek: Add quirk for Acer Aspire E5-574G ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST fixes combo jack detection and limits the internal microphone boost that causes clipping on this model. Signed-off-by: Mavroudis Chatzilazaridis Cc: Link: https://patch.msgid.link/20240728123601.144017-1-mavchatz@protonmail.com Signed-off-by: Takashi Iwai commit 137d9e76ae0b51d9b39c17e2675dae09de5f16e3 Merge: 8400291e289ee cc5049007d722 Author: Nishanth Menon Date: Mon Jul 29 06:36:08 2024 -0500 Merge tag 'ti-k3-dt-for-v6.11-part2' into ti-k3-dts-next Late fixes towards v6.11-rc1 First patch fixes warning splat seen on J784S4 due to overlapping serdes0 lane. Second patch cleans up the serdes0 references for readability Signed-off-by: Nishanth Menon commit 9415d375d8520e0ed55f0c0b058928da9a5b5b3d Author: Kuniyuki Iwashima Date: Fri Jul 26 17:19:53 2024 -0700 rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink(). The cited commit accidentally replaced tgt_net with net in rtnl_dellink(). As a result, IFLA_TARGET_NETNSID is ignored if the interface is specified with IFLA_IFNAME or IFLA_ALT_IFNAME. Let's pass tgt_net to rtnl_dev_get(). Fixes: cc6090e985d7 ("net: rtnetlink: introduce helper to get net_device instance by ifname") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 799a829507506924add8a7620493adc1c3cfda30 Author: Andy Chiu Date: Fri Jul 26 15:06:50 2024 +0800 net: axienet: start napi before enabling Rx/Tx softirq may get lost if an Rx interrupt comes before we call napi_enable. Move napi_enable in front of axienet_setoptions(), which turns on the device, to address the issue. Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive") Signed-off-by: Andy Chiu Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 05f76b2d634e65ab34472802d9b142ea9e03f74e Author: Subash Abhinov Kasiviswanathan Date: Fri Jul 26 13:41:05 2024 -0700 tcp: Adjust clamping window for applications specifying SO_RCVBUF tp->scaling_ratio is not updated based on skb->len/skb->truesize once SO_RCVBUF is set leading to the maximum window scaling to be 25% of rcvbuf after commit dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale") and 50% of rcvbuf after commit 697a6c8cec03 ("tcp: increase the default TCP scaling ratio"). 50% tries to emulate the behavior of older kernels using sysctl_tcp_adv_win_scale with default value. Systems which were using a different values of sysctl_tcp_adv_win_scale in older kernels ended up seeing reduced download speeds in certain cases as covered in https://lists.openwall.net/netdev/2024/05/15/13 While the sysctl scheme is no longer acceptable, the value of 50% is a bit conservative when the skb->len/skb->truesize ratio is later determined to be ~0.66. Applications not specifying SO_RCVBUF update the window scaling and the receiver buffer every time data is copied to userspace. This computation is now used for applications setting SO_RCVBUF to update the maximum window scaling while ensuring that the receive buffer is within the application specified limit. Fixes: dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale") Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit fe7a11c78d2a9bdb8b50afc278a31ac177000948 Author: Yang Yingliang Date: Wed Jul 3 11:16:10 2024 +0800 sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate() If cpuset_cpu_inactive() fails, set_rq_online() need be called to rollback. Fixes: 120455c514f7 ("sched: Fix hotplug vs CPU bandwidth control") Cc: stable@kernel.org Signed-off-by: Yang Yingliang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240703031610.587047-5-yangyingliang@huaweicloud.com commit 2f027354122f58ee846468a6f6b48672fff92e9b Author: Yang Yingliang Date: Wed Jul 3 11:16:09 2024 +0800 sched/core: Introduce sched_set_rq_on/offline() helper Introduce sched_set_rq_on/offline() helper, so it can be called in normal or error path simply. No functional changed. Cc: stable@kernel.org Signed-off-by: Yang Yingliang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240703031610.587047-4-yangyingliang@huaweicloud.com commit e22f910a26cc2a3ac9c66b8e935ef2a7dd881117 Author: Yang Yingliang Date: Wed Jul 3 11:16:08 2024 +0800 sched/smt: Fix unbalance sched_smt_present dec/inc I got the following warn report while doing stress test: jump label: negative count! WARNING: CPU: 3 PID: 38 at kernel/jump_label.c:263 static_key_slow_try_dec+0x9d/0xb0 Call Trace: __static_key_slow_dec_cpuslocked+0x16/0x70 sched_cpu_deactivate+0x26e/0x2a0 cpuhp_invoke_callback+0x3ad/0x10d0 cpuhp_thread_fun+0x3f5/0x680 smpboot_thread_fn+0x56d/0x8d0 kthread+0x309/0x400 ret_from_fork+0x41/0x70 ret_from_fork_asm+0x1b/0x30 Because when cpuset_cpu_inactive() fails in sched_cpu_deactivate(), the cpu offline failed, but sched_smt_present is decremented before calling sched_cpu_deactivate(), it leads to unbalanced dec/inc, so fix it by incrementing sched_smt_present in the error path. Fixes: c5511d03ec09 ("sched/smt: Make sched_smt_present track topology") Cc: stable@kernel.org Signed-off-by: Yang Yingliang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chen Yu Reviewed-by: Tim Chen Link: https://lore.kernel.org/r/20240703031610.587047-3-yangyingliang@huaweicloud.com commit 31b164e2e4af84d08d2498083676e7eeaa102493 Author: Yang Yingliang Date: Wed Jul 3 11:16:07 2024 +0800 sched/smt: Introduce sched_smt_present_inc/dec() helper Introduce sched_smt_present_inc/dec() helper, so it can be called in normal or error path simply. No functional changed. Cc: stable@kernel.org Signed-off-by: Yang Yingliang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240703031610.587047-2-yangyingliang@huaweicloud.com commit 77baa5bafcbe1b2a15ef9c37232c21279c95481c Author: Zheng Zucheng Date: Fri Jul 26 02:32:35 2024 +0000 sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime In extreme test scenarios: the 14th field utime in /proc/xx/stat is greater than sum_exec_runtime, utime = 18446744073709518790 ns, rtime = 135989749728000 ns In cputime_adjust() process, stime is greater than rtime due to mul_u64_u64_div_u64() precision problem. before call mul_u64_u64_div_u64(), stime = 175136586720000, rtime = 135989749728000, utime = 1416780000. after call mul_u64_u64_div_u64(), stime = 135989949653530 unsigned reversion occurs because rtime is less than stime. utime = rtime - stime = 135989749728000 - 135989949653530 = -199925530 = (u64)18446744073709518790 Trigger condition: 1). User task run in kernel mode most of time 2). ARM64 architecture 3). TICK_CPU_ACCOUNTING=y CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set Fix mul_u64_u64_div_u64() conversion precision by reset stime to rtime Fixes: 3dc167ba5729 ("sched/cputime: Improve cputime_adjust()") Signed-off-by: Zheng Zucheng Signed-off-by: Peter Zijlstra (Intel) Cc: Link: https://lkml.kernel.org/r/20240726023235.217771-1-zhengzucheng@huawei.com commit b1d0e15c8725d21a73c22c099418a63940261041 Author: Zhenyu Wang Date: Wed Jul 17 11:16:09 2024 +0800 perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest Package C2 residency counter is also available on Sierra Forest. So add it support in srf_cstates. Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support") Signed-off-by: Zhenyu Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Tested-by: Wendy Wang Link: https://lore.kernel.org/r/20240717031609.74513-1-zhenyuw@linux.intel.com commit 6623b0217d0c9bed80bfa43b778ce1c0eb03b497 Author: Uros Bizjak Date: Sun Jul 21 18:45:41 2024 +0200 locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node() "enum vcpu_state" is not compatible with "u8" type for all targets, resulting in: error: initialization of 'u8 *' {aka 'unsigned char *'} from incompatible pointer type 'enum vcpu_state *' for LoongArch. Correct the type of "old" variable to "u8". Fixes: fea0e1820b51 ("locking/pvqspinlock: Use try_cmpxchg() in qspinlock_paravirt.h") Closes: https://lore.kernel.org/lkml/20240719024010.3296488-1-maobibo@loongson.cn/ Reported-by: Bibo Mao Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Link: https://lore.kernel.org/r/20240721164552.50175-1-ubizjak@gmail.com commit e96a79b19a8499ce2f22ccf0e6b0192e9dcff001 Merge: 9da49aa80d686 0d6ccfe6b319d Author: David S. Miller Date: Mon Jul 29 10:59:08 2024 +0100 Merge branch 'ethtool-rss-fixes' into main Jakub Kicinski says; ==================== ethtool: more RSS fixes More fixes for RSS setting. First two patches fix my own bugs in bnxt conversion to the new API. The third patch fixes what seems to be a 10 year old issue (present since the Linux RSS API was created). Fourth patch fixes an issue with the XArray state being out of sync. And then a small test. ==================== Signed-off-by: David S. Miller commit 0d6ccfe6b319d56da63b7d7cfbcecd92780a680d Author: Jakub Kicinski Date: Thu Jul 25 15:23:53 2024 -0700 selftests: drv-net: rss_ctx: check for all-zero keys We had a handful of bugs relating to key being either all 0 or just reported incorrectly as all 0. Check for this in the tests. Signed-off-by: Jakub Kicinski Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit dc9755370e1c5965d16dff98c9877f5b1847e367 Author: Jakub Kicinski Date: Thu Jul 25 15:23:52 2024 -0700 ethtool: fix the state of additional contexts with old API We expect drivers implementing the new create/modify/destroy API to populate the defaults in struct ethtool_rxfh_context. In legacy API ctx isn't even passed, and rxfh.indir / rxfh.key are NULL so drivers can't give us defaults even if they want to. Call get_rxfh() to fetch the values. We can reuse rxfh_dev for the get_rxfh(), rxfh stores the input from the user. This fixes IOCTL reporting 0s instead of the default key / indir table for drivers using legacy API. Add a check to try to catch drivers using the new API but not populating the key. Fixes: 7964e7884643 ("net: ethtool: use the tracking array for get_rxfh on custom RSS contexts") Signed-off-by: Jakub Kicinski Reviewed-by: Edward Cree Signed-off-by: David S. Miller commit 7195f0ef7f5b8c678cf28de7c9b619cb908b482c Author: Jakub Kicinski Date: Thu Jul 25 15:23:51 2024 -0700 ethtool: fix setting key and resetting indir at once The indirection table and the key follow struct ethtool_rxfh in user memory. To reset the indirection table user space calls SET_RXFH with table of size 0 (OTOH to say "no change" it should use -1 / ~0). The logic for calculating the offset where they key sits is incorrect in this case, as kernel would still offset by the full table length, while for the reset there is no indir table and key is immediately after the struct. $ ethtool -X eth0 default hkey 01:02:03... $ ethtool -x eth0 [...] RSS hash key: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [...] Fixes: 3de0b592394d ("ethtool: Support for configurable RSS hash key") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9dbad38336a9c9a6e77df07c6c770ff6cf55c365 Author: Jakub Kicinski Date: Thu Jul 25 15:23:50 2024 -0700 eth: bnxt: populate defaults in the RSS context struct As described in the kdoc for .create_rxfh_context we are responsible for populating the defaults. The core will not call .get_rxfh for non-0 context. The problem can be easily observed since Netlink doesn't currently use the cache. Using netlink ethtool: $ ethtool -x eth0 context 1 [...] RSS hash key: 13:60:cd:60:14:d3:55:36:86:df:90:f2:96:14:e2:21:05:57:a8:8f:a5:12:5e:54:62:7f:fd:3c:15:7e:76:05:71:42:a2:9a:73:80:09:9c RSS hash function: toeplitz: on xor: off crc32: off But using IOCTL ethtool shows: $ ./ethtool-old -x eth0 context 1 [...] RSS hash key: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 RSS hash function: Operation not supported Fixes: 7964e7884643 ("net: ethtool: use the tracking array for get_rxfh on custom RSS contexts") Signed-off-by: Jakub Kicinski Reviewed-by: Pavan Chebbi Signed-off-by: David S. Miller commit daefd348a5938d2256d304b57a9e787a83bb58d9 Author: Jakub Kicinski Date: Thu Jul 25 15:23:49 2024 -0700 eth: bnxt: reject unsupported hash functions In commit under Fixes I split the bnxt_set_rxfh_context() function, and attached the appropriate chunks to new ops. I missed that bnxt_set_rxfh_context() gets called after some initial checks in bnxt_set_rxfh(), namely that the hash function is Toeplitz. Fixes: 5c466b4d4e75 ("eth: bnxt: move from .set_rxfh to .create_rxfh_context and friends") Signed-off-by: Jakub Kicinski Reviewed-by: Pavan Chebbi Signed-off-by: David S. Miller commit 9da49aa80d686582bc3a027112a30484c9be6b6e Author: Jeongjun Park Date: Fri Jul 26 06:40:49 2024 +0900 tun: Add missing bpf_net_ctx_clear() in do_xdp_generic() There are cases where do_xdp_generic returns bpf_net_context without clearing it. This causes various memory corruptions, so the missing bpf_net_ctx_clear must be added. Reported-by: syzbot+44623300f057a28baf1e@syzkaller.appspotmail.com Fixes: fecef4cd42c6 ("tun: Assign missing bpf_net_context.") Signed-off-by: Jeongjun Park Acked-by: Jason Wang Reviewed-by: Willem de Bruijn Reported-by: syzbot+3c2b6d5d4bec3b904933@syzkaller.appspotmail.com Reported-by: syzbot+707d98c8649695eaf329@syzkaller.appspotmail.com Reported-by: syzbot+c226757eb784a9da3e8b@syzkaller.appspotmail.com Reported-by: syzbot+61a1cfc2b6632363d319@syzkaller.appspotmail.com Reported-by: syzbot+709e4c85c904bcd62735@syzkaller.appspotmail.com Signed-off-by: David S. Miller commit a4765eb49cd94a7653c1a643b03d4facc5d87aa5 Author: Luca Ceresoli Date: Wed Jul 17 14:25:20 2024 +0200 irqchip/irq-pic32-evic: Add missing 'static' to internal function Fix build error reported by gcc 12: drivers/irqchip/irq-pic32-evic.c:164:5: error: no previous prototype for ‘pic32_irq_domain_xlate’ [-Werror=missing-prototypes] 164 | int pic32_irq_domain_xlate(struct irq_domain *d, struct device_node *ctrlr, | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Luca Ceresoli Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240717-irq-pic32-evic-fix-build-static-v1-1-5129085589c6@bootlin.com commit 37c526f00bc1c4f847fc800085f8f009d2e11be6 Author: Guenter Roeck Date: Mon Jan 10 09:28:56 2022 -0800 i2c: smbus: Improve handling of stuck alerts The following messages were observed while testing alert functionality on systems with multiple I2C devices on a single bus if alert was active on more than one chip. smbus_alert 3-000c: SMBALERT# from dev 0x0c, flag 0 smbus_alert 3-000c: no driver alert()! and: smbus_alert 3-000c: SMBALERT# from dev 0x28, flag 0 Once it starts, this message repeats forever at high rate. There is no device at any of the reported addresses. Analysis shows that this is seen if multiple devices have the alert pin active. Apparently some devices do not support SMBus arbitration correctly. They keep sending address bits after detecting an address collision and handle the collision not at all or too late. Specifically, address 0x0c is seen with ADT7461A at address 0x4c and ADM1021 at address 0x18 if alert is active on both chips. Address 0x28 is seen with ADT7483 at address 0x2a and ADT7461 at address 0x4c if alert is active on both chips. Once the system is in bad state (alert is set by more than one chip), it often only recovers by power cycling. To reduce the impact of this problem, abort the endless loop in smbus_alert() if the same address is read more than once and not handled by a driver. Fixes: b5527a7766f0 ("i2c: Add SMBus alert support") Signed-off-by: Guenter Roeck [wsa: it also fixed an interrupt storm in one of my experiments] Tested-by: Wolfram Sang [wsa: rebased, moved a comment as well, improved the 'invalid' value] Signed-off-by: Wolfram Sang commit 291e4baf70019f17a81b7b47aeb186b27d222159 Author: Zenghui Yu Date: Mon Jul 29 10:46:04 2024 +0800 kselftests: dmabuf-heaps: Ensure the driver name is null-terminated Even if a vgem device is configured in, we will skip the import_vgem_fd() test almost every time. TAP version 13 1..11 # Testing heap: system # ======================================= # Testing allocation and importing: ok 1 # SKIP Could not open vgem -1 The problem is that we use the DRM_IOCTL_VERSION ioctl to query the driver version information but leave the name field a non-null-terminated string. Terminate it properly to actually test against the vgem device. While at it, let's check the length of the driver name is exactly 4 bytes and return early otherwise (in case there is a name like "vgemfoo" that gets converted to "vgem\0" unexpectedly). Signed-off-by: Zenghui Yu Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20240729024604.2046-1-yuzenghui@huawei.com commit b5fbf924f125ba3638cfdc21c0515eb7e76264ca Author: Dan Carpenter Date: Wed Jul 24 11:09:54 2024 -0500 drm/client: Fix error code in drm_client_buffer_vmap_local() This function accidentally returns zero/success on the failure path. It leads to locking issues and an uninitialized *map_copy in the caller. Fixes: b4b0193e83cb ("drm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Osipenko Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/89d13df3-747c-4c5d-b122-d081aef5110a@stanley.mountain commit dd4a799bcc13992dd8be9708e5c585f55226b567 Author: Yong-Xuan Wang Date: Fri Jul 26 16:49:29 2024 +0800 KVM: riscv: selftests: Fix compile error Fix compile error introduced by commit d27c34a73514 ("KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test"). These 4 lines should be end with ";". Fixes: d27c34a73514 ("KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test") Signed-off-by: Yong-Xuan Wang Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20240726084931.28924-5-yongxuan.wang@sifive.com Signed-off-by: Anup Patel commit 7bf888fa26e8f22bed4bc3965ab2a2953104ff96 Author: Chen Ni Date: Tue Jul 16 16:01:12 2024 +0800 xfs: convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: 178b48d588ea ("xfs: remove the for_each_xbitmap_ helpers") Signed-off-by: Chen Ni Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 8c2263b9231754f341e204124801c60de969298c Author: Chen Ni Date: Tue Jul 9 15:36:32 2024 +0800 xfs: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Fixes: 8f4b980ee67f ("xfs: pass the attr value to put_listent when possible") Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit af5d92f2fad818663da2ce073b6fe15b9d56ffdc Author: Julian Sun Date: Sun Jul 21 07:27:01 2024 -0400 xfs: remove unused parameter in macro XFS_DQUOT_LOGRES In the macro definition of XFS_DQUOT_LOGRES, a parameter is accepted, but it is not used. Hence, it should be removed. This patch has only passed compilation test, but it should be fine. Signed-off-by: Julian Sun Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 19ebc8f84ea12e18dd6c8d3ecaf87bcf4666eee1 Author: Darrick J. Wong Date: Wed Jul 10 22:43:53 2024 -0700 xfs: fix file_path handling in tracepoints Since file_path() takes the output buffer as one of its arguments, we might as well have it format directly into the tracepoint's char array instead of wasting stack space. Fixes: 3934e8ebb7cc6 ("xfs: create a big array data structure") Fixes: 5076a6040ca16 ("xfs: support in-memory buffer cache targets") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403290419.HPcyvqZu-lkp@intel.com/ Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 39c1ddb064fd38e28571c853f067b134d17cffb2 Author: Eric Sandeen Date: Tue Jul 23 12:26:10 2024 -0500 xfs: allow SECURE namespace xattrs to use reserved block pool We got a report from the podman folks that selinux relabels that happen as part of their process were returning ENOSPC when the filesystem is completely full. This is because xattr changes reserve about 15 blocks for the worst case, but the common case is for selinux contexts to be the sole, in-inode xattr and consume no blocks. We already allow reserved space consumption for XFS_ATTR_ROOT for things such as ACLs, and SECURE namespace attributes are not so very different, so allow them to use the reserved space as well. Code-comment-by: Dave Chinner Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R V2: Remove local variable, add comment. V3: Add Dave's preferred comment V4: Spelling and comment beautification commit 80d3d33cdf4b0494b465087eb34d2e29d86e290e Author: Darrick J. Wong Date: Tue Jul 23 22:11:55 2024 -0700 xfs: fix a memory leak kmemleak reported that we don't free the parent pointer names here if we found corruption. Fixes: 0d29a20fbdba8 ("xfs: scrub parent pointers") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit dc1c8034e31b14a2e5e212104ec508aec44ce1b9 Author: Linus Torvalds Date: Sun Jul 28 20:24:12 2024 -0700 minmax: simplify min()/max()/clamp() implementation Now that we no longer have any C constant expression contexts (ie array size declarations or static initializers) that use min() or max(), we can simpify the implementation by not having to worry about the result staying as a C constant expression. So now we can unconditionally just use temporary variables of the right type, and get rid of the excessive expansion that used to come from the use of __builtin_choose_expr(__is_constexpr(...), .. to pick the specialized code for constant expressions. Another expansion simplification is to pass the temporary variables (in addition to the original expression) to our __types_ok() macro. That may superficially look like it complicates the macro, but when we only want the type of the expression, expanding the temporary variable names is much simpler and smaller than expanding the potentially complicated original expression. As a result, on my machine, doing a $ time make drivers/staging/media/atomisp/pci/isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.i goes from real 0m16.621s user 0m15.360s sys 0m1.221s to real 0m2.532s user 0m2.091s sys 0m0.452s because the token expansion goes down dramatically. In particular, the longest line expansion (which was line 71 of that 'ia_css_ynr.host.c' file) shrinks from 23,338kB (yes, 23MB for one single line) to "just" 1,444kB (now "only" 1.4MB). And yes, that line is still the line from hell, because it's doing multiple levels of "min()/max()" expansion thanks to some of them being hidden inside the uDIGIT_FITTING() macro. Lorenzo has a nice cleanup patch that makes that driver use inline functions instead of macros for sDIGIT_FITTING() and uDIGIT_FITTING(), which will fix that line once and for all, but the 16-fold reduction in this case does show why we need to simplify these helpers. Cc: David Laight Cc: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed Author: Linus Torvalds Date: Sun Jul 28 17:32:05 2024 -0700 minmax: don't use max() in situations that want a C constant expression We only had a couple of array[] declarations, and changing them to just use 'MAX()' instead of 'max()' fixes the issue. This will allow us to simplify our min/max macros enormously, since they can now unconditionally use temporary variables to avoid using the argument values multiple times. Cc: David Laight Cc: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit 60a76f7826b88ebf7697a56fdcd9596b23c2b616 Author: Varadarajan Narayanan Date: Tue Jul 23 15:31:51 2024 +0530 arm64: dts: qcom: ipq5332: Fix interrupt trigger type for usb Trigger type is incorrectly specified as IRQ_TYPE_EDGE_BOTH instead of IRQ_TYPE_LEVEL_HIGH. This trigger type is not supported for SPIs and results in probe failure with -EINVAL. Reviewed-by: Konrad Dybcio Fixes: 927173bf8a0e ("arm64: dts: qcom: Add missing interrupts for qcs404/ipq5332") Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240723100151.402300-3-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 8bc7cb73df8644423758c79d4504d501c8ef3854 Author: Patrick Wildt Date: Mon Jul 15 21:40:41 2024 +0200 arm64: dts: qcom: x1e80100-yoga: add wifi calibration variant Describe the bus topology for PCIe domain 4 and add the ath12k calibration variant so that the board file (calibration data) can be loaded. Signed-off-by: Patrick Wildt Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/ZpV7OeGNIGGpqNC0@windev.fritz.box Signed-off-by: Bjorn Andersson commit dbd6bd124e34f9f859271ed9ae2afc39f36c7e8c Author: Arnd Bergmann Date: Fri Jul 19 12:12:31 2024 +0200 soc: qcom: pd-mapper: mark qcom_pdm_domains as __maybe_unused The qcom_pdm_domains[] array is used only when passing it into of_match_node() but is not also referenced by MODULE_DEVICE_TABLE() or the platform driver as a table. When CONFIG_OF is disabled, this causes a harmless build warning: drivers/soc/qcom/qcom_pd_mapper.c:520:34: error: 'qcom_pdm_domains' defined but not used [-Werror=unused-const-variable=] Avoid this by marking the variable as __maybe_unused. This also makes it clear that anything referenced by it will be dropped by the compiler when it is unused. Fixes: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation") Signed-off-by: Arnd Bergmann Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240719101238.199850-1-arnd@kernel.org Signed-off-by: Bjorn Andersson commit f9bb896eab221618927ae6a2f1d566567999839d Author: Volodymyr Babchuk Date: Thu Jul 18 11:33:23 2024 +0530 soc: qcom: cmd-db: Map shared memory as WC, not WB Linux does not write into cmd-db region. This region of memory is write protected by XPU. XPU may sometime falsely detect clean cache eviction as "write" into the write protected region leading to secure interrupt which causes an endless loop somewhere in Trust Zone. The only reason it is working right now is because Qualcomm Hypervisor maps the same region as Non-Cacheable memory in Stage 2 translation tables. The issue manifests if we want to use another hypervisor (like Xen or KVM), which does not know anything about those specific mappings. Changing the mapping of cmd-db memory from MEMREMAP_WB to MEMREMAP_WT/WC removes dependency on correct mappings in Stage 2 tables. This patch fixes the issue by updating the mapping to MEMREMAP_WC. I tested this on SA8155P with Xen. Fixes: 312416d9171a ("drivers: qcom: add command DB driver") Cc: stable@vger.kernel.org # 5.4+ Signed-off-by: Volodymyr Babchuk Tested-by: Nikita Travkin # sc7180 WoA in EL2 Signed-off-by: Maulik Shah Tested-by: Pavankumar Kondeti Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20240718-cmd_db_uncached-v2-1-f6cf53164c90@quicinc.com Signed-off-by: Bjorn Andersson commit 10f98bb9d98137b544b00abb4f9df45e9be7878d Author: Stephan Gerhold Date: Mon Jul 15 14:15:40 2024 +0200 arm64: defconfig: Add CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 This is needed for the display panel to work on the Qualcomm sc7180-trogdor-homestar and x1e80100-crd. Signed-off-by: Stephan Gerhold Reviewed-by: Douglas Anderson Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-4-31b7f2f658a3@linaro.org Signed-off-by: Bjorn Andersson commit e4ab5d7cb5f19858305395e034f214c92afc3cf5 Author: Andrew Halaney Date: Thu Jul 25 11:23:33 2024 -0500 soc: qcom: pd-mapper: Depend on ARCH_QCOM || COMPILE_TEST The pd-mapper driver doesn't make sense on non Qualcomm systems. Let's follow suit with the rest of the Qualcomm SoC Kconfigs and depend on ARCH_QCOM || COMPILE_TEST to avoid asking users about a config they will not use. Fixes: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation") Signed-off-by: Andrew Halaney Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240725-pd-mapper-config-v1-1-f26e513608c6@redhat.com Signed-off-by: Bjorn Andersson commit 9f499b8c791d2983c0a31a543c51d1b2f15e8755 Author: Linus Torvalds Date: Sun Jul 28 17:06:20 2024 -0700 minmax: scsi: fix mis-use of 'clamp()' in sr.c While working on simplifying the minmax functions, and avoiding excessive macro expansion, it turns out that the sr.c use of the 'clamp()' macro has the arguments the wrong way around. The clamp logic is val = clamp(in, low, high); and it returns the input clamped to the low/high limits. But sr.c ddid speed = clamp(0, speed, 0xffff / 177); which clamps the value '0' to the range '[speed, 0xffff / 177]' and ends up being nonsensical. Happily, I don't think anybody ever cared. Fixes: 9fad9d560af5 ("scsi: sr: Fix unintentional arithmetic wraparound") Cc: Justin Stitt Cc: Kees Cook Cc: Martin K. Petersen Signed-off-by: Linus Torvalds commit 89fb4dfacbb33750e0243848f4c54d73e558ba9a Author: Heiko Stuebner Date: Sat Jul 20 22:57:05 2024 +0200 dt-bindings: ata: rockchip-dwc-ahci: add missing power-domains The Rockchip variant of the dwc-ahci controller does have and need power- domains to work, though the binding does not mention them, making dtccheck quite unhappy: DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dtb /home/devel/hstuebner/00_git-repos/linux-rockchip/_build-arm64/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dtb: sata@fc800000: Unevaluated properties are not allowed ('power-domains' was unexpected) from schema $id: http://devicetree.org/schemas/ata/rockchip,dwc-ahci.yaml# Fix that by adding the missing power-domain property to the binding. Fixes: 85b0e13b19c2 ("dt-bindings: ata: dwc-ahci: add Rockchip RK3588") Signed-off-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Signed-off-by: Damien Le Moal commit 1a251f52cfdc417c84411a056bc142cbd77baef4 Author: Linus Torvalds Date: Sun Jul 28 15:49:18 2024 -0700 minmax: make generic MIN() and MAX() macros available everywhere This just standardizes the use of MIN() and MAX() macros, with the very traditional semantics. The goal is to use these for C constant expressions and for top-level / static initializers, and so be able to simplify the min()/max() macros. These macro names were used by various kernel code - they are very traditional, after all - and all such users have been fixed up, with a few different approaches: - trivial duplicated macro definitions have been removed Note that 'trivial' here means that it's obviously kernel code that already included all the major kernel headers, and thus gets the new generic MIN/MAX macros automatically. - non-trivial duplicated macro definitions are guarded with #ifndef This is the "yes, they define their own versions, but no, the include situation is not entirely obvious, and maybe they don't get the generic version automatically" case. - strange use case #1 A couple of drivers decided that the way they want to describe their versioning is with #define MAJ 1 #define MIN 2 #define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) which adds zero value and I just did my Alexander the Great impersonation, and rewrote that pointless Gordian knot as #define DRV_VERSION "1.2" instead. - strange use case #2 A couple of drivers thought that it's a good idea to have a random 'MIN' or 'MAX' define for a value or index into a table, rather than the traditional macro that takes arguments. These values were re-written as C enum's instead. The new function-line macros only expand when followed by an open parenthesis, and thus don't clash with enum use. Happily, there weren't really all that many of these cases, and a lot of users already had the pattern of using '#ifndef' guarding (or in one case just using '#undef MIN') before defining their own private version that does the same thing. I left such cases alone. Cc: David Laight Cc: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit aacf93e87f0d808ef46e621aa56caea336b4433c Author: Masahiro Yamada Date: Sat Jul 27 23:03:00 2024 +0900 rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT Another oddity in these config entries is their default value can fall back to 'n', which is a value for bool or tristate symbols. The '|| echo n' is an incorrect workaround to avoid the syntax error. This is not a big deal, as the entry is hidden by 'depends on RUST' in situations where '$(RUSTC) --version' or '$(BINDGEN) --version' fails. Anyway, it looks odd. The default of a string type symbol should be a double-quoted string literal. Turn it into an empty string when the version command fails. Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20240727140302.1806011-2-masahiroy@kernel.org [ Rebased on top of v6.11-rc1. - Miguel ] Signed-off-by: Miguel Ojeda commit 5ce86c6c861352c9346ebb5c96ed70cb67414aa3 Author: Masahiro Yamada Date: Sat Jul 27 23:02:59 2024 +0900 rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT While this is a somewhat unusual case, I encountered odd error messages when I ran Kconfig in a foreign architecture chroot. $ make allmodconfig sh: 1: rustc: not found sh: 1: bindgen: not found # # configuration written to .config # The successful execution of 'command -v rustc' does not necessarily mean that 'rustc --version' will succeed. $ sh -c 'command -v rustc' /home/masahiro/.cargo/bin/rustc $ sh -c 'rustc --version' sh: 1: rustc: not found Here, 'rustc' is built for x86, and I ran it in an arm64 system. The current code: command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) --version || echo n can be turned into: command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) --version 2>/dev/null || echo n However, I did not understand the necessity of 'command -v $(RUSTC)'. I simplified it to: $(RUSTC) --version 2>/dev/null || echo n Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20240727140302.1806011-1-masahiroy@kernel.org [ Rebased on top of v6.11-rc1. - Miguel ] Signed-off-by: Miguel Ojeda commit 8400291e289ee6b2bf9779ff1c83a291501f017b Author: Linus Torvalds Date: Sun Jul 28 14:19:55 2024 -0700 Linux 6.11-rc1 commit a0c04bd55a467aee3eb647555343ad6971106e86 Merge: 017fa3e891878 3415b10a03945 Author: Linus Torvalds Date: Sun Jul 28 14:02:48 2024 -0700 Merge tag 'kbuild-fixes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix RPM package build error caused by an incorrect locale setup - Mark modules.weakdep as ghost in RPM package - Fix the odd combination of -S and -c in stack protector scripts, which is an error with the latest Clang * tag 'kbuild-fixes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: Fix '-S -c' in x86 stack protector scripts kbuild: rpm-pkg: ghost modules.weakdep file kbuild: rpm-pkg: Fix C locale setup commit 017fa3e89187848fd056af757769c9e66ac3e93d Author: Linus Torvalds Date: Sun Jul 28 13:50:01 2024 -0700 minmax: simplify and clarify min_t()/max_t() implementation This simplifies the min_t() and max_t() macros by no longer making them work in the context of a C constant expression. That means that you can no longer use them for static initializers or for array sizes in type definitions, but there were only a couple of such uses, and all of them were converted (famous last words) to use MIN_T/MAX_T instead. Cc: David Laight Cc: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit 4477b39c32fdc03363affef4b11d48391e6dc9ff Author: Linus Torvalds Date: Sun Jul 28 13:03:48 2024 -0700 minmax: add a few more MIN_T/MAX_T users Commit 3a7e02c040b1 ("minmax: avoid overly complicated constant expressions in VM code") added the simpler MIN_T/MAX_T macros in order to avoid some excessive expansion from the rather complicated regular min/max macros. The complexity of those macros stems from two issues: (a) trying to use them in situations that require a C constant expression (in static initializers and for array sizes) (b) the type sanity checking and MIN_T/MAX_T avoids both of these issues. Now, in the whole (long) discussion about all this, it was pointed out that the whole type sanity checking is entirely unnecessary for min_t/max_t which get a fixed type that the comparison is done in. But that still leaves min_t/max_t unnecessarily complicated due to worries about the C constant expression case. However, it turns out that there really aren't very many cases that use min_t/max_t for this, and we can just force-convert those. This does exactly that. Which in turn will then allow for much simpler implementations of min_t()/max_t(). All the usual "macros in all upper case will evaluate the arguments multiple times" rules apply. We should do all the same things for the regular min/max() vs MIN/MAX() cases, but that has the added complexity of various drivers defining their own local versions of MIN/MAX, so that needs another level of fixes first. Link: https://lore.kernel.org/all/b47fad1d0cf8449886ad148f8c013dae@AcuMS.aculab.com/ Cc: David Laight Cc: Lorenzo Stoakes Signed-off-by: Linus Torvalds commit 7e2d0ba732ad649c557b49b0a3ef69d54df256d0 Merge: e172f1e906880 92a286e90203c Author: Linus Torvalds Date: Sun Jul 28 11:51:51 2024 -0700 Merge tag 'ubifs-for-linus-6.11-rc1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI and UBIFS updates from Richard Weinberger: - Many fixes for power-cut issues by Zhihao Cheng - Another ubiblock error path fix - ubiblock section mismatch fix - Misc fixes all over the place * tag 'ubifs-for-linus-6.11-rc1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: Fix ubi_init() ubiblock_exit() section mismatch ubifs: add check for crypto_shash_tfm_digest ubifs: Fix inconsistent inode size when powercut happens during appendant writing ubi: block: fix null-pointer-dereference in ubiblock_create() ubifs: fix kernel-doc warnings ubifs: correct UBIFS_DFS_DIR_LEN macro definition and improve code clarity mtd: ubi: Restore missing cleanup on ubi_init() failure path ubifs: dbg_orphan_check: Fix missed key type checking ubifs: Fix unattached inode when powercut happens in creating ubifs: Fix space leak when powercut happens in linking tmpfile ubifs: Move ui->data initialization after initializing security ubifs: Fix adding orphan entry twice for the same inode ubifs: Remove insert_dead_orphan from replaying orphan process Revert "ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path" ubifs: Don't add xattr inode into orphan area ubifs: Fix unattached xattr inode if powercut happens after deleting mtd: ubi: avoid expensive do_div() on 32-bit machines mtd: ubi: make ubi_class constant ubi: eba: properly rollback inside self_check_eba commit 3415b10a03945b0da4a635e146750dfe5ce0f448 Author: Nathan Chancellor Date: Fri Jul 26 11:05:00 2024 -0700 kbuild: Fix '-S -c' in x86 stack protector scripts After a recent change in clang to stop consuming all instances of '-S' and '-c' [1], the stack protector scripts break due to the kernel's use of -Werror=unused-command-line-argument to catch cases where flags are not being properly consumed by the compiler driver: $ echo | clang -o - -x c - -S -c -Werror=unused-command-line-argument clang: error: argument unused during compilation: '-c' [-Werror,-Wunused-command-line-argument] This results in CONFIG_STACKPROTECTOR getting disabled because CONFIG_CC_HAS_SANE_STACKPROTECTOR is no longer set. '-c' and '-S' both instruct the compiler to stop at different stages of the pipeline ('-S' after compiling, '-c' after assembling), so having them present together in the same command makes little sense. In this case, the test wants to stop before assembling because it is looking at the textual assembly output of the compiler for either '%fs' or '%gs', so remove '-c' from the list of arguments to resolve the error. All versions of GCC continue to work after this change, along with versions of clang that do or do not contain the change mentioned above. Cc: stable@vger.kernel.org Fixes: 4f7fd4d7a791 ("[PATCH] Add the -fstack-protector option to the CFLAGS") Fixes: 60a5317ff0f4 ("x86: implement x86_32 stack protector") Link: https://github.com/llvm/llvm-project/commit/6461e537815f7fa68cef06842505353cf5600e9c [1] Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 92a286e90203ce3e6c3a6d945fa36da419c3671f Author: Richard Weinberger Date: Sat Jul 13 09:35:19 2024 +0200 ubi: Fix ubi_init() ubiblock_exit() section mismatch Since ubiblock_exit() is now called from an init function, the __exit section no longer makes sense. Cc: Ben Hutchings Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407131403.wZJpd8n2-lkp@intel.com/ Signed-off-by: Richard Weinberger Reviewed-by: Zhihao Cheng commit e172f1e9068807a336c0429b6c57d29bded8d891 Merge: e62f81bbd24db 866d2d36b81d7 Author: Linus Torvalds Date: Sun Jul 28 10:52:15 2024 -0700 Merge tag 'v6.11-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: - Enable turbostat extensions to add both perf and PMT (Intel Platform Monitoring Technology) counters via the cmdline - Demonstrate PMT access with built-in support for Meteor Lake's Die C6 counter * tag 'v6.11-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: version 2024.07.26 tools/power turbostat: Include umask=%x in perf counter's config tools/power turbostat: Document PMT in turbostat.8 tools/power turbostat: Add MTL's PMT DC6 builtin counter tools/power turbostat: Add early support for PMT counters tools/power turbostat: Add selftests for added perf counters tools/power turbostat: Add selftests for SMI, APERF and MPERF counters tools/power turbostat: Move verbose counter messages to level 2 tools/power turbostat: Move debug prints from stdout to stderr tools/power turbostat: Fix typo in turbostat.8 tools/power turbostat: Add perf added counter example to turbostat.8 tools/power turbostat: Fix formatting in turbostat.8 tools/power turbostat: Extend --add option with perf counters tools/power turbostat: Group SMI counter with APERF and MPERF tools/power turbostat: Add ZERO_ARRAY for zero initializing builtin array tools/power turbostat: Replace enum rapl_source and cstate_source with counter_source tools/power turbostat: Remove anonymous union from rapl_counter_info_t tools/power/turbostat: Switch to new Intel CPU model defines commit e62f81bbd24db746c9b1aa29e7b6423211262ac4 Merge: 7b5d481889421 a0328b397f333 Author: Linus Torvalds Date: Sun Jul 28 09:33:28 2024 -0700 Merge tag 'cxl-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull CXL updates from Dave Jiang: "Core: - A CXL maturity map has been added to the documentation to detail the current state of CXL enabling. It provides the status of the current state of various CXL features to inform current and future contributors of where things are and which areas need contribution. - A notifier handler has been added in order for a newly created CXL memory region to trigger the abstract distance metrics calculation. This should bring parity for CXL memory to the same level vs hotplugged DRAM for NUMA abstract distance calculation. The abstract distance reflects relative performance used for memory tiering handling. - An addition for XOR math has been added to address the CXL DPA to SPA translation. CXL address translation did not support address interleave math with XOR prior to this change. Fixes: - Fix to address race condition in the CXL memory hotplug notifier - Add missing MODULE_DESCRIPTION() for CXL modules - Fix incorrect vendor debug UUID define Misc: - A warning has been added to inform users of an unsupported configuration when mixing CXL VH and RCH/RCD hierarchies - The ENXIO error code has been replaced with EBUSY for inject poison limit reached via debugfs and cxl-test support - Moving the PCI config read in cxl_dvsec_rr_decode() to avoid unnecessary PCI config reads - A refactor to a common struct for DRAM and general media CXL events" * tag 'cxl-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/core/pci: Move reading of control register to immediately before usage cxl: Remove defunct code calculating host bridge target positions cxl/region: Verify target positions using the ordered target list cxl: Restore XOR'd position bits during address translation cxl/core: Fold cxl_trace_hpa() into cxl_dpa_to_hpa() cxl/test: Replace ENXIO with EBUSY for inject poison limit reached cxl/memdev: Replace ENXIO with EBUSY for inject poison limit reached cxl/acpi: Warn on mixed CXL VH and RCH/RCD Hierarchy cxl/core: Fix incorrect vendor debug UUID define Documentation: CXL Maturity Map cxl/region: Simplify cxl_region_nid() cxl/region: Support to calculate memory tier abstract distance cxl/region: Fix a race condition in memory hotplug notifier cxl: add missing MODULE_DESCRIPTION() macros cxl/events: Use a common struct for DRAM and General Media events commit 7b5d48188942178985cc185a17c754539cb9a4d3 Merge: 5437f30d3458a 68318904a7758 Author: Linus Torvalds Date: Sun Jul 28 09:14:11 2024 -0700 Merge tag 'unicode-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode Pull unicode update from Gabriel Krisman Bertazi: "Two small fixes to silence the compiler and static analyzers tools from Ben Dooks and Jeff Johnson" * tag 'unicode-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode: unicode: add MODULE_DESCRIPTION() macros unicode: make utf8 test count static commit d01c14074be79e5f5270498f90530a12583fbf7a Author: Jose Ignacio Tornos Martinez Date: Fri Jul 26 11:00:26 2024 +0200 kbuild: rpm-pkg: ghost modules.weakdep file In the same way as for other similar files, mark as ghost the new file generated by depmod for configured weak dependencies for modules, modules.weakdep, so that although it is not included in the package, claim the ownership on it. Signed-off-by: Jose Ignacio Tornos Martinez Signed-off-by: Masahiro Yamada commit 5437f30d3458ad36e83ab96088d490ebfee844d8 Merge: 6342649c33d23 b6f6a7aa689f1 Author: Linus Torvalds Date: Sat Jul 27 20:08:07 2024 -0700 Merge tag '6.11-rc-smb-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull more smb client updates from Steve French: - fix for potential null pointer use in init cifs - additional dynamic trace points to improve debugging of some common scenarios - two SMB1 fixes (one addressing reconnect with POSIX extensions, one a mount parsing error) * tag '6.11-rc-smb-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: smb3: add dynamic trace point for session setup key expired failures smb3: add four dynamic tracepoints for copy_file_range and reflink smb3: add dynamic tracepoint for reflink errors cifs: mount with "unix" mount option for SMB1 incorrectly handled cifs: fix reconnect with SMB1 UNIX Extensions cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path commit 6342649c33d232c4e7ac690b98bcddaab10a4d8c Merge: 8c9307474333d f6bb5254b7774 Author: Linus Torvalds Date: Sat Jul 27 15:28:53 2024 -0700 Merge tag 'block-6.11-20240726' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - Fix request without payloads cleanup (Leon) - Use new protection information format (Francis) - Improved debug message for lost pci link (Bart) - Another apst quirk (Wang) - Use appropriate sysfs api for printing chars (Markus) - ublk async device deletion fix (Ming) - drbd kerneldoc fixups (Simon) - Fix deadlock between sd removal and release (Yang) * tag 'block-6.11-20240726' of git://git.kernel.dk/linux: nvme-pci: add missing condition check for existence of mapped data ublk: fix UBLK_CMD_DEL_DEV_ASYNC handling block: fix deadlock between sd_remove & sd_release drbd: Add peer_device to Kernel doc nvme-core: choose PIF from QPIF if QPIFS supports and PIF is QTYPE nvme-pci: Fix the instructions for disabling power management nvme: remove redundant bdev local variable nvme-fabrics: Use seq_putc() in __nvmf_concat_opt_tokens() nvme/pci: Add APST quirk for Lenovo N60z laptop commit 8c9307474333d8d100870b45af00bfeb1872c836 Merge: bc4eee85ca6ce 358169617602f Author: Linus Torvalds Date: Sat Jul 27 15:22:33 2024 -0700 Merge tag 'io_uring-6.11-20240726' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix a syzbot issue for the msg ring cache added in this release. No ill effects from this one, but it did make KMSAN unhappy (me) - Sanitize the NAPI timeout handling, by unifying the value handling into all ktime_t rather than converting back and forth (Pavel) - Fail NAPI registration for IOPOLL rings, it's not supported (Pavel) - Fix a theoretical issue with ring polling and cancelations (Pavel) - Various little cleanups and fixes (Pavel) * tag 'io_uring-6.11-20240726' of git://git.kernel.dk/linux: io_uring/napi: pass ktime to io_napi_adjust_timeout io_uring/napi: use ktime in busy polling io_uring/msg_ring: fix uninitialized use of target_req->flags io_uring: align iowq and task request error handling io_uring: kill REQ_F_CANCEL_SEQ io_uring: simplify io_uring_cmd return io_uring: fix io_match_task must_hold io_uring: don't allow netpolling with SETUP_IOPOLL io_uring: tighten task exit cancellations commit bc4eee85ca6ce5335efe314215841712b5531449 Merge: 910bfc26d16d0 ef9ca17ca458a Author: Linus Torvalds Date: Sat Jul 27 15:11:59 2024 -0700 Merge tag 'vfs-6.11-rc1.fixes.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "This contains two fixes for this merge window: VFS: - I noticed that it is possible for a privileged user to mount most filesystems with a non-initial user namespace in sb->s_user_ns. When fsopen() is called in a non-init namespace the caller's namespace is recorded in fs_context->user_ns. If the returned file descriptor is then passed to a process privileged in init_user_ns, that process can call fsconfig(fd_fs, FSCONFIG_CMD_CREATE*), creating a new superblock with sb->s_user_ns set to the namespace of the process which called fsopen(). This is problematic as only filesystems that raise FS_USERNS_MOUNT are known to be able to support a non-initial s_user_ns. Others may suffer security issues, on-disk corruption or outright crash the kernel. Prevent that by restricting such delegation to filesystems that allow FS_USERNS_MOUNT. Note, that this delegation requires a privileged process to actually create the superblock so either the privileged process is cooperaing or someone must have tricked a privileged process into operating on a fscontext file descriptor whose origin it doesn't know (a stupid idea). The bug dates back to about 5 years afaict. Misc: - Fix hostfs parsing when the mount request comes in via the legacy mount api. In the legacy mount api hostfs allows to specify the host directory mount without any key. Restore that behavior" * tag 'vfs-6.11-rc1.fixes.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: hostfs: fix the host directory parse when mounting. fs: don't allow non-init s_user_ns for filesystems without FS_USERNS_MOUNT commit d2860084ecca456ce78b251011f7def8d9136dcc Author: Alex Deucher Date: Thu Jul 25 17:30:37 2024 -0400 drm/amdgpu: Fix APU handling in amdgpu_pm_load_smu_firmware() We only need to skip this on modern APUs. It's required on older APUs as it's where start_smu gets called from. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3502 Fixes: 064d92436b69 ("drm/amd/pm: avoid to load smu firmware for APUs") Reviewed-by: Tim Huang Signed-off-by: Alex Deucher Cc: Tim Huang (cherry picked from commit 608d886c978cd5f3d8650630568d96c231845227) commit 9038e25c80558d48ce33d6d8c168666164dc72e9 Author: Michael Chen Date: Tue Jul 23 17:45:23 2024 -0400 drm/amdgpu: increase mes log buffer size for gfx12 MES firmware requires larger log buffer for gfx12. Allocate proper buffer respectively for gfx11 and gfx12. Signed-off-by: Michael Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 739d0f3e1f36738d4cd84166784a8f7a58d69612) commit f3572db3c049b4d32bb5ba77ad5305616c44c7c1 Author: Christian König Date: Wed Jul 24 09:24:02 2024 +0200 drm/amdgpu: fix contiguous handling for IB parsing v2 Otherwise we won't get correct access to the IB. v2: keep setting AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS to avoid problems in the VRAM backend. Signed-off-by: Christian König Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3501 Fixes: e362b7c8f8c7 ("drm/amdgpu: Modify the contiguous flags behaviour") Reviewed-by: Alex Deucher Cc: stable@vger.kernel.org Tested-by: Dave Airlie Signed-off-by: Alex Deucher (cherry picked from commit fbfb5f0342253d92c4e446588c428a9d90c3f610) commit fe26546aeb35c5d1fd69530bb6bfd04e0b5cd489 Author: Kenneth Feng Date: Thu Jul 4 08:14:15 2024 +0800 drm/amdgpu/pm: support gpu_metrics sysfs interface for smu v14.0.2/3 support gpu_metrics sysfs interface for smu v14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher (cherry picked from commit 60c30ba7ba2064066ec462236666058cbbf619c1) commit 910bfc26d16d07df5a2bfcbc63f0aa9d1397e2ef Merge: ff30564411ffd b126341111230 Author: Linus Torvalds Date: Sat Jul 27 13:44:54 2024 -0700 Merge tag 'rust-6.11' of https://github.com/Rust-for-Linux/linux Pull Rust updates from Miguel Ojeda: "The highlight is the establishment of a minimum version for the Rust toolchain, including 'rustc' (and bundled tools) and 'bindgen'. The initial minimum will be the pinned version we currently have, i.e. we are just widening the allowed versions. That covers three stable Rust releases: 1.78.0, 1.79.0, 1.80.0 (getting released tomorrow), plus beta, plus nightly. This should already be enough for kernel developers in distributions that provide recent Rust compiler versions routinely, such as Arch Linux, Debian Unstable (outside the freeze period), Fedora Linux, Gentoo Linux (especially the testing channel), Nix (unstable) and openSUSE Slowroll and Tumbleweed. In addition, the kernel is now being built-tested by Rust's pre-merge CI. That is, every change that is attempting to land into the Rust compiler is tested against the kernel, and it is merged only if it passes. Similarly, the bindgen tool has agreed to build the kernel in their CI too. Thus, with the pre-merge CI in place, both projects hope to avoid unintentional changes to Rust that break the kernel. This means that, in general, apart from intentional changes on their side (that we will need to workaround conditionally on our side), the upcoming Rust compiler versions should generally work. In addition, the Rust project has proposed getting the kernel into stable Rust (at least solving the main blockers) as one of its three flagship goals for 2024H2 [1]. I would like to thank Niko, Sid, Emilio et al. for their help promoting the collaboration between Rust and the kernel. Toolchain and infrastructure: - Support several Rust toolchain versions. - Support several bindgen versions. - Remove 'cargo' requirement and simplify 'rusttest', thanks to 'alloc' having been dropped last cycle. - Provide proper error reporting for the 'rust-analyzer' target. 'kernel' crate: - Add 'uaccess' module with a safe userspace pointers abstraction. - Add 'page' module with a 'struct page' abstraction. - Support more complex generics in workqueue's 'impl_has_work!' macro. 'macros' crate: - Add 'firmware' field support to the 'module!' macro. - Improve 'module!' macro documentation. Documentation: - Provide instructions on what packages should be installed to build the kernel in some popular Linux distributions. - Introduce the new kernel.org LLVM+Rust toolchains. - Explain '#[no_std]'. And a few other small bits" Link: https://rust-lang.github.io/rust-project-goals/2024h2/index.html#flagship-goals [1] * tag 'rust-6.11' of https://github.com/Rust-for-Linux/linux: (26 commits) docs: rust: quick-start: add section on Linux distributions rust: warn about `bindgen` versions 0.66.0 and 0.66.1 rust: start supporting several `bindgen` versions rust: work around `bindgen` 0.69.0 issue rust: avoid assuming a particular `bindgen` build rust: start supporting several compiler versions rust: simplify Clippy warning flags set rust: relax most deny-level lints to warnings rust: allow `dead_code` for never constructed bindings rust: init: simplify from `map_err` to `inspect_err` rust: macros: indent list item in `paste!`'s docs rust: add abstraction for `struct page` rust: uaccess: add typed accessors for userspace pointers uaccess: always export _copy_[from|to]_user with CONFIG_RUST rust: uaccess: add userspace pointers kbuild: rust-analyzer: improve comment documentation kbuild: rust-analyzer: better error handling docs: rust: no_std is used rust: alloc: add __GFP_HIGHMEM flag rust: alloc: fix typo in docs for GFP_NOWAIT ... commit ff30564411ffdcee49d579cb15eb13185a36e253 Merge: 86b405ad8d0d2 e0ff0cff1f6cd Author: Linus Torvalds Date: Sat Jul 27 13:28:39 2024 -0700 Merge tag 'apparmor-pr-2024-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "Cleanups - optimization: try to avoid refing the label in apparmor_file_open - remove useless static inline function is_deleted - use kvfree_sensitive to free data->data - fix typo in kernel doc Bug fixes: - unpack transition table if dfa is not present - test: add MODULE_DESCRIPTION() - take nosymfollow flag into account - fix possible NULL pointer dereference - fix null pointer deref when receiving skb during sock creation" * tag 'apparmor-pr-2024-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: unpack transition table if dfa is not present apparmor: try to avoid refing the label in apparmor_file_open apparmor: test: add MODULE_DESCRIPTION() apparmor: take nosymfollow flag into account apparmor: fix possible NULL pointer dereference apparmor: fix typo in kernel doc apparmor: remove useless static inline function is_deleted apparmor: use kvfree_sensitive to free data->data apparmor: Fix null pointer deref when receiving skb during sock creation commit 86b405ad8d0d2994a7ffbacb8fcf83be8afb952c Merge: 8e333791d4605 cc374782b6ca0 Author: Linus Torvalds Date: Sat Jul 27 13:16:53 2024 -0700 Merge tag 'landlock-6.11-rc1-houdini-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock fix from Mickaël Salaün: "Jann Horn reported a sandbox bypass for Landlock. This includes the fix and new tests. This should be backported" * tag 'landlock-6.11-rc1-houdini-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: selftests/landlock: Add cred_transfer test landlock: Don't lose track of restrictions on cred_transfer commit 8e333791d4605dbce611c22f71a86721c9afc336 Merge: bf80f1391a425 3ae08e47742ee Author: Linus Torvalds Date: Sat Jul 27 12:54:06 2024 -0700 Merge tag 'gpio-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fix from Bartosz Golaszewski: - don't use sprintf() with non-constant format string * tag 'gpio-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: virtuser: avoid non-constant format string commit bf80f1391a425081b96f9e04e5c608f854858aaa Merge: b465ed28f7125 6dc55268f64b7 Author: Linus Torvalds Date: Sat Jul 27 12:46:16 2024 -0700 Merge tag 'devicetree-fixes-for-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull more devicetree updates from Rob Herring: "Most of this is a treewide change to of_property_for_each_u32() which was small enough to do in one go before rc1 and avoids the need to create of_property_for_each_u32_some_new_name(). - Treewide conversion of of_property_for_each_u32() to drop internal arguments making struct property opaque - Add binding for Amlogic A4 SoC watchdog - Fix constraints for AD7192 'single-channel' property" * tag 'devicetree-fixes-for-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: iio: adc: ad7192: Fix 'single-channel' constraints of: remove internal arguments from of_property_for_each_u32() dt-bindings: watchdog: add support for Amlogic A4 SoCs commit b465ed28f7125fcc41f3e556db57c42c11892ff5 Merge: 0421621158ed1 726d4f528dbc9 Author: Linus Torvalds Date: Sat Jul 27 12:39:55 2024 -0700 Merge tag 'iommu-fixes-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Will Deacon: "We're still resolving a regression with the handling of unexpected page faults on SMMUv3, but we're not quite there with a fix yet. - Fix NULL dereference when freeing domain in Unisoc SPRD driver - Separate assignment statements with semicolons in AMD page-table code - Fix Tegra erratum workaround when the CPU is using 16KiB pages" * tag 'iommu-fixes-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings iommu/amd: Convert comma to semicolon iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en commit 0421621158ed14d0e04321c445c770fc4e99ee59 Merge: ab11658f26bfb c1839501fe3e6 Author: Linus Torvalds Date: Sat Jul 27 12:35:12 2024 -0700 Merge tag 'firewire-fixes-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fixes from Takashi Sakamoto: "The recent integration of compiler collections introduced the technology to check flexible array length at runtime by providing proper annotations. In v6.10 kernel, a patch was merged into firewire subsystem to utilize it, however the annotation was inadequate. There is also the related change for the flexible array in sound subsystem, but it causes a regression where the data in the payload of isochronous packet is incorrect for some devices. These bugs are now fixed" * tag 'firewire-fixes-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: ALSA: firewire-lib: fix wrong value as length of header for CIP_NO_HEADER case Revert "firewire: Annotate struct fw_iso_packet with __counted_by()" commit ab11658f26bfb5bb62fd7155fe821e511e9a4668 Merge: 560e805047ad3 fc28d1c1fe3b3 Author: Linus Torvalds Date: Sat Jul 27 12:29:10 2024 -0700 Merge tag 'spi-fix-v6.11-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "The bulk of this is a series of fixes for the microchip-core driver mostly originating from one of their customers, I also applied an additional patch adding support for controlling the word size which came along with it since it's still the merge window and clearly had a bunch of fairly thorough testing. We also have a fix for the compatible used to bind spidev to the BH2228FV" * tag 'spi-fix-v6.11-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spidev: add correct compatible for Rohm BH2228FV dt-bindings: trivial-devices: fix Rohm BH2228FV compatible string spi: microchip-core: add support for word sizes of 1 to 32 bits spi: microchip-core: ensure TX and RX FIFOs are empty at start of a transfer spi: microchip-core: fix init function not setting the master and motorola modes spi: microchip-core: only disable SPI controller when register value change requires it spi: microchip-core: defer asserting chip select until just before write to TX FIFO spi: microchip-core: fix the issues in the isr commit 560e805047ad38898b423ef456e5368260e199fb Merge: 8f3f7598cb657 e975d955c07cb Author: Linus Torvalds Date: Sat Jul 27 12:27:52 2024 -0700 Merge tag 'regulator-fix-v6.11-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "These two commits clean up the excessively loose dependencies for the RZG2L USB VBCTRL regulator driver, ensuring it shouldn't prompt for people who can't use it" * tag 'regulator-fix-v6.11-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Further restrict RZG2L USB VBCTRL regulator dependencies regulator: renesas-usb-vbus-regulator: Update the default commit 8f3f7598cb657b9ceb6dacb4b97a52811f25f991 Merge: de5f4fbe7bd20 542440fd7b309 Author: Linus Torvalds Date: Sat Jul 27 12:26:09 2024 -0700 Merge tag 'regmap-fix-v6.11-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "Arnd sent a workaround for a false positive warning which was showing up with GCC 14.1" * tag 'regmap-fix-v6.11-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: maple: work around gcc-14.1 false-positive warning commit de5f4fbe7bd20a5c464c3b0101ee3b8486f40189 Merge: c85e1497dd108 f99b3feb3b0e9 Author: Linus Torvalds Date: Sat Jul 27 12:07:18 2024 -0700 Merge tag 'clk-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 the merge window to fix the build and boot on some SoCs. - Initialize struct clk_init_data in the TI da8xx-cfgchip driver so that stack contents aren't used for things like clk flags leading to unexpected behavior - Don't leak stack contents in a debug print in the new Sophgo clk driver - Disable the new T-Head clk driver on 32-bit targets to fix the build due to a division - Fix Samsung Exynos4 fin_pll wreckage from the clkdev rework done last cycle by using a struct clk_hw directly instead of a struct clk consumer" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: samsung: fix getting Exynos4 fin_pll rate from external clocks clk: T-Head: Disable on 32-bit Targets clk: sophgo: clk-sg2042-pll: Fix uninitialized variable in debug output clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use commit c85e1497dd10879f447d6a12f97762c581093e9b Merge: 1fcaa5db40f96 24168c5e6dfbd Author: Linus Torvalds Date: Sat Jul 27 10:53:06 2024 -0700 Merge tag 'i3c/for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "This cycle, there are new features for the Designware controller and fixes for the other IPs: - dw: optional apb clock and power management support, IBI handling fixes - mipi-i3c-hci: IBI handling fixes - svc: a few fixes" * tag 'i3c/for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: dt-bindings: i3c: add header for generic I3C flags i3c: master: svc: Fix error code in svc_i3c_master_do_daa_locked() i3c: master: Enhance i3c_bus_type visibility for device searching & event monitoring i3c: dw: Add power management support i3c: dw: Add some functions for reusability i3c: dw: Save timing registers and other values i3c: master: svc: Improve DAA STOP handle code logic i3c: dw: Add optional apb clock i3c: dw: Use new *_enabled clk API dt-bindings: i3c: dw: Add apb clock binding i3c: master: svc: Convert comma to semicolon i3c: mipi-i3c-hci: Round IBI data chunk size to HW supported value i3c: mipi-i3c-hci: Error out instead on BUG_ON() in IBI DMA setup i3c: mipi-i3c-hci: Set IBI Status and Data Ring base addresses i3c: mipi-i3c-hci: Switch to lower_32_bits()/upper_32_bits() helpers i3c: dw: Remove ibi_capable property i3c: dw: Fix IBI intr programming i3c: dw: Fix clearing queue thld i3c: mipi-i3c-hci: Fix number of DAT/DCT entries for HCI versions < 1.1 i3c: master: svc: resend target address when get NACK commit 1fcaa5db40f960e58f47050337db54eb087fb62a Merge: 7b0acd911ca05 f7c1b0e4ae47e Author: Linus Torvalds Date: Sat Jul 27 10:44:49 2024 -0700 Merge tag 'thermal-6.11-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Prevent the thermal core from flooding the kernel log with useless messages if thermal zone temperature can never be determined (or its sensor has failed permanently) and make it finally give up and disable defective thermal zones (Rafael Wysocki)" * tag 'thermal-6.11-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Back off when polling thermal zones on errors thermal: trip: Split thermal_zone_device_set_mode() commit 7b0acd911ca05b2555d834cd93ffcfab1ade828c Merge: 5256184b6119b 4811f7af6090e Author: Linus Torvalds Date: Sat Jul 27 10:26:41 2024 -0700 Merge tag 'mm-hotfixes-stable-2024-07-26-14-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc hotfixes from Andrew Morton: "11 hotfixes, 7 of which are cc:stable. 7 are MM, 4 are other" * tag 'mm-hotfixes-stable-2024-07-26-14-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: nilfs2: handle inconsistent state in nilfs_btnode_create_block() selftests/mm: skip test for non-LPA2 and non-LVA systems mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist() mm: memcg: add cacheline padding after lruvec in mem_cgroup_per_node alloc_tag: outline and export free_reserved_page() decompress_bunzip2: fix rare decompression failure mm/huge_memory: avoid PMD-size page cache if needed mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines mm: fix old/young bit handling in the faulting path dt-bindings: arm: update James Clark's email address MAINTAINERS: mailmap: update James Clark's email address commit 5256184b6119bd1da541d8deb487c2f9131a6c9f Merge: c9f33436d85b7 f004bf9de0570 Author: Linus Torvalds Date: Sat Jul 27 10:19:55 2024 -0700 Merge tag 'timers-urgent-2024-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer migration updates from Thomas Gleixner: "Fixes and minor updates for the timer migration code: - Stop testing the group->parent pointer as it is not guaranteed to be stable over a chain of operations by design. This includes a warning which would be nice to have but it produces false positives due to the racy nature of the check. - Plug a race between CPUs going in and out of idle and a CPU hotplug operation. The latter can create and connect a new hierarchy level which is missed in the concurrent updates of CPUs which go into idle. As a result the events of such a CPU might not be processed and timers go stale. Cure it by splitting the hotplug operation into a prepare and online callback. The prepare callback is guaranteed to run on an online and therefore active CPU. This CPU updates the hierarchy and being online ensures that there is always at least one migrator active which handles the modified hierarchy correctly when going idle. The online callback which runs on the incoming CPU then just marks the CPU active and brings it into operation. - Improve tracing and polish the code further so it is more obvious what's going on" * tag 'timers-urgent-2024-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers/migration: Fix grammar in comment timers/migration: Spare write when nothing changed timers/migration: Rename childmask by groupmask to make naming more obvious timers/migration: Read childmask and parent pointer in a single place timers/migration: Use a single struct for hierarchy walk data timers/migration: Improve tracing timers/migration: Move hierarchy setup into cpuhotplug prepare callback timers/migration: Do not rely always on group->parent commit c9f33436d85b72b2addfd9423eae864cb8dac1da Merge: c17f1224b8d79 52420e483d3e1 Author: Linus Torvalds Date: Sat Jul 27 10:14:34 2024 -0700 Merge tag 'riscv-for-linus-6.11-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Palmer Dabbelt: - Support for NUMA (via SRAT and SLIT), console output (via SPCR), and cache info (via PPTT) on ACPI-based systems. - The trap entry/exit code no longer breaks the return address stack predictor on many systems, which results in an improvement to trap latency. - Support for HAVE_ARCH_STACKLEAK. - The sv39 linear map has been extended to support 128GiB mappings. - The frequency of the mtime CSR is now visible via hwprobe. * tag 'riscv-for-linus-6.11-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (21 commits) RISC-V: Provide the frequency of time CSR via hwprobe riscv: Extend sv39 linear mapping max size to 128G riscv: enable HAVE_ARCH_STACKLEAK riscv: signal: Remove unlikely() from WARN_ON() condition riscv: Improve exception and system call latency RISC-V: Select ACPI PPTT drivers riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init() RISC-V: ACPI: Enable SPCR table for console output on RISC-V riscv: boot: remove duplicated targets line trace: riscv: Remove deprecated kprobe on ftrace support riscv: cpufeature: Extract common elements from extension checking riscv: Introduce vendor variants of extension helpers riscv: Add vendor extensions to /proc/cpuinfo riscv: Extend cpufeature.c to detect vendor extensions RISC-V: run savedefconfig for defconfig RISC-V: hwprobe: sort EXT_KEY()s in hwprobe_isa_ext0() alphabetically ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init ACPI: NUMA: change the ACPI_NUMA to a hidden option ACPI: NUMA: Add handler for SRAT RINTC affinity structure ... commit c17f1224b8d79339e9f2156fdf2966281cdb31df Merge: 3a7e02c040b13 4c006734898a1 Author: Linus Torvalds Date: Sat Jul 27 09:58:24 2024 -0700 Merge tag 'for-linus-6.11-rc1a-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Two fixes for issues introduced in this merge window: - fix enhanced debugging in the Xen multicall handling - two patches fixing a boot failure when running as dom0 in PVH mode" * tag 'for-linus-6.11-rc1a-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: fix memblock_reserve() usage on PVH x86/xen: move xen_reserve_extra_memory() xen: fix multicall debug data referencing commit 01aa8c869d0cdaf603f42dc1d2302b164c25353a Author: Dr. David Alan Gilbert Date: Sat Jul 27 16:58:24 2024 +0100 blk-throttle: remove more latency dead-code The struct 'latency_bucket' and the #define 'request_bucket_index' are unused since commit bf20ab538c81 ("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW") and the 'LATENCY_BUCKET_SIZE' #define was only used by the 'request_bucket_index' define. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240727155824.1000042-1-linux@treblig.org Signed-off-by: Jens Axboe commit d7ac67b94390945872713f9bb0c141bf158c83aa Merge: 657a292d679ae 2335c9cb831fa Author: Russell King (Oracle) Date: Sat Jul 27 09:13:09 2024 +0100 Merge branches 'fixes' and 'misc' into for-linus commit ef9ca17ca458ac7253ae71b552e601e49311fc48 Author: Hongbo Li Date: Thu Jul 25 14:51:30 2024 +0800 hostfs: fix the host directory parse when mounting. hostfs not keep the host directory when mounting. When the host directory is none (default), fc->source is used as the host root directory, and this is wrong. Here we use `parse_monolithic` to handle the old mount path for parsing the root directory. For new mount path, The `parse_param` is used for the host directory parse. Reported-and-tested-by: Maciej Żenczykowski Fixes: cd140ce9f611 ("hostfs: convert hostfs to use the new mount API") Link: https://lore.kernel.org/all/CANP3RGceNzwdb7w=vPf5=7BCid5HVQDmz1K5kC9JG42+HVAh_g@mail.gmail.com/ Cc: Christian Brauner Signed-off-by: Hongbo Li Link: https://lore.kernel.org/r/20240725065130.1821964-1-lihongbo22@huawei.com [brauner: minor fixes] Signed-off-by: Christian Brauner commit e1c5ae59c0f22f7fe5c07fb5513a29e4aad868c9 Author: Seth Forshee (DigitalOcean) Date: Wed Jul 24 09:53:59 2024 -0500 fs: don't allow non-init s_user_ns for filesystems without FS_USERNS_MOUNT Christian noticed that it is possible for a privileged user to mount most filesystems with a non-initial user namespace in sb->s_user_ns. When fsopen() is called in a non-init namespace the caller's namespace is recorded in fs_context->user_ns. If the returned file descriptor is then passed to a process priviliged in init_user_ns, that process can call fsconfig(fd_fs, FSCONFIG_CMD_CREATE), creating a new superblock with sb->s_user_ns set to the namespace of the process which called fsopen(). This is problematic. We cannot assume that any filesystem which does not set FS_USERNS_MOUNT has been written with a non-initial s_user_ns in mind, increasing the risk for bugs and security issues. Prevent this by returning EPERM from sget_fc() when FS_USERNS_MOUNT is not set for the filesystem and a non-initial user namespace will be used. sget() does not need to be updated as it always uses the user namespace of the current context, or the initial user namespace if SB_SUBMOUNT is set. Fixes: cb50b348c71f ("convenience helpers: vfs_get_super() and sget_fc()") Reported-by: Christian Brauner Signed-off-by: Seth Forshee (DigitalOcean) Link: https://lore.kernel.org/r/20240724-s_user_ns-fix-v1-1-895d07c94701@kernel.org Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit c1839501fe3e67d98635f159dba8b170d08f6521 Author: Takashi Sakamoto Date: Fri Jul 26 00:56:40 2024 +0900 ALSA: firewire-lib: fix wrong value as length of header for CIP_NO_HEADER case In a commit 1d717123bb1a ("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning"), DEFINE_FLEX() macro was used to handle variable length of array for header field in struct fw_iso_packet structure. The usage of macro has a side effect that the designated initializer assigns the count of array to the given field. Therefore CIP_HEADER_QUADLETS (=2) is assigned to struct fw_iso_packet.header, while the original designated initializer assigns zero to all fields. With CIP_NO_HEADER flag, the change causes invalid length of header in isochronous packet for 1394 OHCI IT context. This bug affects all of devices supported by ALSA fireface driver; RME Fireface 400, 800, UCX, UFX, and 802. This commit fixes the bug by replacing it with the alternative version of macro which corresponds no initializer. Cc: stable@vger.kernel.org Fixes: 1d717123bb1a ("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning") Reported-by: Edmund Raile Closes: https://lore.kernel.org/r/rrufondjeynlkx2lniot26ablsltnynfaq2gnqvbiso7ds32il@qk4r6xps7jh2/ Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20240725155640.128442-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 00e3913b0416fe69d28745c0a2a340e2f76c219c Author: Takashi Sakamoto Date: Fri Jul 26 01:16:48 2024 +0900 Revert "firewire: Annotate struct fw_iso_packet with __counted_by()" This reverts commit d3155742db89df3b3c96da383c400e6ff4d23c25. The header_length field is byte unit, thus it can not express the number of elements in header field. It seems that the argument for counted_by attribute can have no arithmetic expression, therefore this commit just reverts the issued commit. Suggested-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20240725161648.130404-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 301927d2d2eb8e541357ba850bc7a1a74dbbd670 Merge: 697943657444a df3d6a3e01fd8 Author: Jakub Kicinski Date: Fri Jul 26 18:27:51 2024 -0700 Merge tag 'for-net-2024-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btmtk: Fix kernel crash when entering btmtk_usb_suspend - btmtk: Fix btmtk.c undefined reference build error - btintel: Fail setup on error - hci_sync: Fix suspending with wrong filter policy - hci_event: Fix setting DISCOVERY_FINDING for passive scanning * tag 'for-net-2024-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: hci_event: Fix setting DISCOVERY_FINDING for passive scanning Bluetooth: btmtk: remove #ifdef around declarations Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder Bluetooth: btmtk: Fix btmtk.c undefined reference build error Bluetooth: hci_sync: Fix suspending with wrong filter policy Bluetooth: btmtk: Fix kernel crash when entering btmtk_usb_suspend Bluetooth: btintel: Fail setup on error ==================== Link: https://patch.msgid.link/20240726150502.3300832-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 697943657444a7d7123b47bc32019e62533f4863 Author: Alexander Duyck Date: Thu Jul 25 10:03:54 2024 -0700 fbnic: Change kconfig prompt from S390=n to !S390 In testing the recent kernel I found that the fbnic driver couldn't be enabled on x86_64 builds. A bit of digging showed that the fbnic driver was the only one to check for S390 to be n, all others had checked for !S390. Since it is a boolean and not a tristate I am not sure it will be N. So just update it to use the !S390 flag. A quick check via "make menuconfig" verified that after making this change there was an option to select the fbnic driver. Fixes 0e03c643dc93 ("eth: fbnic: fix s390 build.") Signed-off-by: Alexander Duyck Reviewed-by: Joe Damato Link: https://patch.msgid.link/172192698293.1903337.4255690118685300353.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit f99d93de93c2e650abee890af4f31c29fe12a32a Merge: 225990c487c10 a47f3320bb4ba Author: Jakub Kicinski Date: Fri Jul 26 18:22:53 2024 -0700 Merge tag 'wireless-2024-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Couple of more urgent fixes: * ath12k: wowlan loop iteration issue * ath12k: fix soft lockup on suspend in certain scenarios * mt76: fix crash when removing an interface * mac80211: fix injection crash with some drivers that don't want monitor vif * cfg80211: fix S1G beacon parsing in scan * cfg80211: fix MLO link status reporting on connect * tag 'wireless-2024-07-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: ath12k: fix soft lockup on suspend wifi: mt76: mt7921: fix null pointer access in mt792x_mac_link_bss_remove wifi: ath12k: fix reusing outside iterator in ath12k_wow_vif_set_wakeups() wifi: cfg80211: correct S1G beacon length calculation wifi: cfg80211: fix reporting failed MLO links status with cfg80211_connect_done wifi: mac80211: use monitor sdata with driver only if desired ==================== Link: https://patch.msgid.link/20240726122638.942420-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 3a7e02c040b130b5545e4b115aada7bacd80a2b6 Author: Linus Torvalds Date: Fri Jul 26 15:32:27 2024 -0700 minmax: avoid overly complicated constant expressions in VM code The minmax infrastructure is overkill for simple constants, and can cause huge expansions because those simple constants are then used by other things. For example, 'pageblock_order' is a core VM constant, but because it was implemented using 'min_t()' and all the type-checking that involves, it actually expanded to something like 2.5kB of preprocessor noise. And when that simple constant was then used inside other expansions: #define pageblock_nr_pages (1UL << pageblock_order) #define pageblock_start_pfn(pfn) ALIGN_DOWN((pfn), pageblock_nr_pages) and we then use that inside a 'max()' macro: case ISOLATE_SUCCESS: update_cached = false; last_migrated_pfn = max(cc->zone->zone_start_pfn, pageblock_start_pfn(cc->migrate_pfn - 1)); the end result was that one statement expanding to 253kB in size. There are probably other cases of this, but this one case certainly stood out. I've added 'MIN_T()' and 'MAX_T()' macros for this kind of "core simple constant with specific type" use. These macros skip the type checking, and as such need to be very sparingly used only for obvious cases that have active issues like this. Reported-by: Lorenzo Stoakes Link: https://lore.kernel.org/all/36aa2cad-1db1-4abf-8dd2-fb20484aabc3@lucifer.local/ Cc: David Laight Signed-off-by: Linus Torvalds commit d6cca7631a4b54a8995e3bc53e5afb11d3b0c8ff Author: Stephan Gerhold Date: Fri Jul 12 12:00:03 2024 +0200 power: supply: qcom_battmgr: Ignore extra __le32 in info payload Some newer ADSP firmware versions on X1E80100 report an extra __le32 at the end of the battery information request payload, causing qcom_battmgr to fail to initialize. Adjust the check to ignore the extra field in the info payload so we can support both old and newer firmware versions. Tested-by: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Tested-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240712-x1e80100-battmgr-v1-1-a253d767f493@linaro.org Signed-off-by: Sebastian Reichel commit bf9d5cb588755ee41ac12a8976dccf44ae18281b Author: Neil Armstrong Date: Mon Jul 15 14:57:06 2024 +0200 power: supply: qcom_battmgr: return EAGAIN when firmware service is not up The driver returns -ENODEV when the firmware battmrg service hasn't started yet, while per-se -ENODEV is fine, we usually use -EAGAIN to tell the user to retry again later. And the power supply core uses -EGAIN when the device isn't initialized, let's use the same return. This notably causes an infinite spam of: thermal thermal_zoneXX: failed to read out thermal zone (-19) because the thermal core doesn't understand -ENODEV, but only considers -EAGAIN as a non-fatal error. While it didn't appear until now, commit [1] fixes thermal core and no more ignores thermal zones returning an error at first temperature update. [1] 5725f40698b9 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid") Link: https://lore.kernel.org/all/2ed4c630-204a-4f80-a37f-f2ca838eb455@linaro.org/ Cc: stable@vger.kernel.org Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply") Signed-off-by: Neil Armstrong Tested-by: Stephan Gerhold Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20240715-topic-sm8x50-upstream-fix-battmgr-temp-tz-warn-v1-1-16e842ccead7@linaro.org Signed-off-by: Sebastian Reichel commit 81af7f2342d162e24ac820c10e68684d9f927663 Author: Hans de Goede Date: Wed Jul 17 22:03:33 2024 +0200 power: supply: axp288_charger: Round constant_charge_voltage writes down Round constant_charge_voltage writes down to the first supported lower value, rather then rounding them up to the first supported higher value. This fixes e.g. writing 4250000 resulting in a value of 4350000 which might be dangerous, instead writing 4250000 will now result in a safe 4200000 value. Fixes: 843735b788a4 ("power: axp288_charger: axp288 charger driver") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240717200333.56669-2-hdegoede@redhat.com Signed-off-by: Sebastian Reichel commit b34ce4a59cfe9cd0d6f870e6408e8ec88a964585 Author: Hans de Goede Date: Wed Jul 17 22:03:32 2024 +0200 power: supply: axp288_charger: Fix constant_charge_voltage writes info->max_cv is in millivolts, divide the microvolt value being written to constant_charge_voltage by 1000 *before* clamping it to info->max_cv. Before this fix the code always tried to set constant_charge_voltage to max_cv / 1000 = 4 millivolt, which ends up in setting it to 4.1V which is the lowest supported value. Fixes: 843735b788a4 ("power: axp288_charger: axp288 charger driver") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240717200333.56669-1-hdegoede@redhat.com Signed-off-by: Sebastian Reichel commit e8432ac802a028eaee6b1e86383d7cd8e9fb8431 Author: Linus Torvalds Date: Fri Jul 26 15:09:07 2024 -0700 minmax: avoid overly complex min()/max() macro arguments in xen We have some very fancy min/max macros that have tons of sanity checking to warn about mixed signedness etc. This is all things that a sane compiler should warn about, but there are no sane compiler interfaces for this, and '-Wsign-compare' is broken [1] and not useful. So then we compensate (some would say over-compensate) by doing the checks manually with some truly horrid macro games. And no, we can't just use __builtin_types_compatible_p(), because the whole question of "does it make sense to compare these two values" is a lot more complicated than that. For example, it makes a ton of sense to compare unsigned values with simple constants like "5", even if that is indeed a signed type. So we have these very strange macros to try to make sensible type checking decisions on the arguments to 'min()' and 'max()'. But that can cause enormous code expansion if the min()/max() macros are used with complicated expressions, and particularly if you nest these things so that you get the first big expansion then expanded again. The xen setup.c file ended up ballooning to over 50MB of preprocessed noise that takes 15s to compile (obviously depending on the build host), largely due to one single line. So let's split that one single line to just be simpler. I think it ends up being more legible to humans too at the same time. Now that single file compiles in under a second. Reported-and-reviewed-by: Lorenzo Stoakes Link: https://lore.kernel.org/all/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/ Link: https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/ [1] Cc: David Laight Signed-off-by: Linus Torvalds commit 4811f7af6090e8f5a398fbdd766f903ef6c0d787 Author: Ryusuke Konishi Date: Thu Jul 25 14:20:07 2024 +0900 nilfs2: handle inconsistent state in nilfs_btnode_create_block() Syzbot reported that a buffer state inconsistency was detected in nilfs_btnode_create_block(), triggering a kernel bug. It is not appropriate to treat this inconsistency as a bug; it can occur if the argument block address (the buffer index of the newly created block) is a virtual block number and has been reallocated due to corruption of the bitmap used to manage its allocation state. So, modify nilfs_btnode_create_block() and its callers to treat it as a possible filesystem error, rather than triggering a kernel bug. Link: https://lkml.kernel.org/r/20240725052007.4562-1-konishi.ryusuke@gmail.com Fixes: a60be987d45d ("nilfs2: B-tree node cache") Signed-off-by: Ryusuke Konishi Reported-by: syzbot+89cc4f2324ed37988b60@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=89cc4f2324ed37988b60 Cc: Signed-off-by: Andrew Morton commit f556acc2facdd240de2c7416cd1da48a1dae70ec Author: Dev Jain Date: Thu Jul 18 10:55:04 2024 +0530 selftests/mm: skip test for non-LPA2 and non-LVA systems Post my improvement of the test in e4a4ba415419 ("selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing"): The test begins to fail on 4k and 16k pages, on non-LPA2 systems. To reduce noise in the CI systems, let us skip the test when higher address space is not implemented. Link: https://lkml.kernel.org/r/20240718052504.356517-1-dev.jain@arm.com Fixes: e4a4ba415419 ("selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing") Signed-off-by: Dev Jain Reviewed-by: Ryan Roberts Cc: Anshuman Khandual Cc: Mark Brown Signed-off-by: Andrew Morton commit 66eca1021a42856d6af2a9802c99e160278aed91 Author: Li Zhijian Date: Tue Jul 23 14:44:28 2024 +0800 mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist() It's expected that no page should be left in pcp_list after calling zone_pcp_disable() in offline_pages(). Previously, it's observed that offline_pages() gets stuck [1] due to some pages remaining in pcp_list. Cause: There is a race condition between drain_pages_zone() and __rmqueue_pcplist() involving the pcp->count variable. See below scenario: CPU0 CPU1 ---------------- --------------- spin_lock(&pcp->lock); __rmqueue_pcplist() { zone_pcp_disable() { /* list is empty */ if (list_empty(list)) { /* add pages to pcp_list */ alloced = rmqueue_bulk() mutex_lock(&pcp_batch_high_lock) ... __drain_all_pages() { drain_pages_zone() { /* read pcp->count, it's 0 here */ count = READ_ONCE(pcp->count) /* 0 means nothing to drain */ /* update pcp->count */ pcp->count += alloced << order; ... ... spin_unlock(&pcp->lock); In this case, after calling zone_pcp_disable() though, there are still some pages in pcp_list. And these pages in pcp_list are neither movable nor isolated, offline_pages() gets stuck as a result. Solution: Expand the scope of the pcp->lock to also protect pcp->count in drain_pages_zone(), to ensure no pages are left in the pcp list after zone_pcp_disable() [1] https://lore.kernel.org/linux-mm/6a07125f-e720-404c-b2f9-e55f3f166e85@fujitsu.com/ Link: https://lkml.kernel.org/r/20240723064428.1179519-1-lizhijian@fujitsu.com Fixes: 4b23a68f9536 ("mm/page_alloc: protect PCP lists with a spinlock") Signed-off-by: Li Zhijian Reported-by: Yao Xingtao Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Signed-off-by: Andrew Morton commit f59adcf5933271ab7247c4c8938c67be8905b725 Author: Roman Gushchin Date: Tue Jul 23 17:12:44 2024 +0000 mm: memcg: add cacheline padding after lruvec in mem_cgroup_per_node Oliver Sand reported a performance regression caused by commit 98c9daf5ae6b ("mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node"), which puts some fields of the mem_cgroup_per_node structure under the CONFIG_MEMCG_V1 config option. Apparently it causes a false cache sharing between lruvec and lru_zone_size members of the structure. Fix it by adding an explicit padding after the lruvec member. Even though the padding is not required with CONFIG_MEMCG_V1 set, it seems like the introduced memory overhead is not significant enough to warrant another divergence in the mem_cgroup_per_node layout, so the padding is added unconditionally. Link: https://lkml.kernel.org/r/20240723171244.747521-1-roman.gushchin@linux.dev Fixes: 98c9daf5ae6b ("mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node") Signed-off-by: Roman Gushchin Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202407121335.31a10cb6-oliver.sang@intel.com Tested-by: Oliver Sang Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit b3bebe44306e23827397d0d774d206e3fa374041 Author: Suren Baghdasaryan Date: Wed Jul 17 14:28:44 2024 -0700 alloc_tag: outline and export free_reserved_page() Outline and export free_reserved_page() because modules use it and it in turn uses page_ext_{get|put} which should not be exported. The same result could be obtained by outlining {get|put}_page_tag_ref() but that would have higher performance impact as these functions are used in more performance critical paths. Link: https://lkml.kernel.org/r/20240717212844.2749975-1-surenb@google.com Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging") Signed-off-by: Suren Baghdasaryan Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407080044.DWMC9N9I-lkp@intel.com/ Suggested-by: Christoph Hellwig Suggested-by: Vlastimil Babka Acked-by: Vlastimil Babka Cc: Kees Cook Cc: Kent Overstreet Cc: Pasha Tatashin Cc: Sourav Panda Cc: [6.10] Signed-off-by: Andrew Morton commit bf6acd5d16057d7accbbb1bf7dc6d8c56eeb4ecc Author: Ross Lagerwall Date: Wed Jul 17 17:20:16 2024 +0100 decompress_bunzip2: fix rare decompression failure The decompression code parses a huffman tree and counts the number of symbols for a given bit length. In rare cases, there may be >= 256 symbols with a given bit length, causing the unsigned char to overflow. This causes a decompression failure later when the code tries and fails to find the bit length for a given symbol. Since the maximum number of symbols is 258, use unsigned short instead. Link: https://lkml.kernel.org/r/20240717162016.1514077-1-ross.lagerwall@citrix.com Fixes: bc22c17e12c1 ("bzip2/lzma: library support for gzip, bzip2 and lzma decompression") Signed-off-by: Ross Lagerwall Cc: Alain Knaff Cc: "H. Peter Anvin" Cc: Signed-off-by: Andrew Morton commit d659b715e94ac039803d7601505d3473393fc0be Author: Gavin Shan Date: Mon Jul 15 10:04:23 2024 +1000 mm/huge_memory: avoid PMD-size page cache if needed xarray can't support arbitrary page cache size. the largest and supported page cache size is defined as MAX_PAGECACHE_ORDER by commit 099d90642a71 ("mm/filemap: make MAX_PAGECACHE_ORDER acceptable to xarray"). However, it's possible to have 512MB page cache in the huge memory's collapsing path on ARM64 system whose base page size is 64KB. 512MB page cache is breaking the limitation and a warning is raised when the xarray entry is split as shown in the following example. [root@dhcp-10-26-1-207 ~]# cat /proc/1/smaps | grep KernelPageSize KernelPageSize: 64 kB [root@dhcp-10-26-1-207 ~]# cat /tmp/test.c : int main(int argc, char **argv) { const char *filename = TEST_XFS_FILENAME; int fd = 0; void *buf = (void *)-1, *p; int pgsize = getpagesize(); int ret = 0; if (pgsize != 0x10000) { fprintf(stdout, "System with 64KB base page size is required!\n"); return -EPERM; } system("echo 0 > /sys/devices/virtual/bdi/253:0/read_ahead_kb"); system("echo 1 > /proc/sys/vm/drop_caches"); /* Open the xfs file */ fd = open(filename, O_RDONLY); assert(fd > 0); /* Create VMA */ buf = mmap(NULL, TEST_MEM_SIZE, PROT_READ, MAP_SHARED, fd, 0); assert(buf != (void *)-1); fprintf(stdout, "mapped buffer at 0x%p\n", buf); /* Populate VMA */ ret = madvise(buf, TEST_MEM_SIZE, MADV_NOHUGEPAGE); assert(ret == 0); ret = madvise(buf, TEST_MEM_SIZE, MADV_POPULATE_READ); assert(ret == 0); /* Collapse VMA */ ret = madvise(buf, TEST_MEM_SIZE, MADV_HUGEPAGE); assert(ret == 0); ret = madvise(buf, TEST_MEM_SIZE, MADV_COLLAPSE); if (ret) { fprintf(stdout, "Error %d to madvise(MADV_COLLAPSE)\n", errno); goto out; } /* Split xarray entry. Write permission is needed */ munmap(buf, TEST_MEM_SIZE); buf = (void *)-1; close(fd); fd = open(filename, O_RDWR); assert(fd > 0); fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, TEST_MEM_SIZE - pgsize, pgsize); out: if (buf != (void *)-1) munmap(buf, TEST_MEM_SIZE); if (fd > 0) close(fd); return ret; } [root@dhcp-10-26-1-207 ~]# gcc /tmp/test.c -o /tmp/test [root@dhcp-10-26-1-207 ~]# /tmp/test ------------[ cut here ]------------ WARNING: CPU: 25 PID: 7560 at lib/xarray.c:1025 xas_split_alloc+0xf8/0x128 Modules linked in: nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib \ nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct \ nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 \ ip_set rfkill nf_tables nfnetlink vfat fat virtio_balloon drm fuse \ xfs libcrc32c crct10dif_ce ghash_ce sha2_ce sha256_arm64 virtio_net \ sha1_ce net_failover virtio_blk virtio_console failover dimlib virtio_mmio CPU: 25 PID: 7560 Comm: test Kdump: loaded Not tainted 6.10.0-rc7-gavin+ #9 Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20240524-1.el9 05/24/2024 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : xas_split_alloc+0xf8/0x128 lr : split_huge_page_to_list_to_order+0x1c4/0x780 sp : ffff8000ac32f660 x29: ffff8000ac32f660 x28: ffff0000e0969eb0 x27: ffff8000ac32f6c0 x26: 0000000000000c40 x25: ffff0000e0969eb0 x24: 000000000000000d x23: ffff8000ac32f6c0 x22: ffffffdfc0700000 x21: 0000000000000000 x20: 0000000000000000 x19: ffffffdfc0700000 x18: 0000000000000000 x17: 0000000000000000 x16: ffffd5f3708ffc70 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: ffffffffffffffc0 x10: 0000000000000040 x9 : ffffd5f3708e692c x8 : 0000000000000003 x7 : 0000000000000000 x6 : ffff0000e0969eb8 x5 : ffffd5f37289e378 x4 : 0000000000000000 x3 : 0000000000000c40 x2 : 000000000000000d x1 : 000000000000000c x0 : 0000000000000000 Call trace: xas_split_alloc+0xf8/0x128 split_huge_page_to_list_to_order+0x1c4/0x780 truncate_inode_partial_folio+0xdc/0x160 truncate_inode_pages_range+0x1b4/0x4a8 truncate_pagecache_range+0x84/0xa0 xfs_flush_unmap_range+0x70/0x90 [xfs] xfs_file_fallocate+0xfc/0x4d8 [xfs] vfs_fallocate+0x124/0x2f0 ksys_fallocate+0x4c/0xa0 __arm64_sys_fallocate+0x24/0x38 invoke_syscall.constprop.0+0x7c/0xd8 do_el0_svc+0xb4/0xd0 el0_svc+0x44/0x1d8 el0t_64_sync_handler+0x134/0x150 el0t_64_sync+0x17c/0x180 Fix it by correcting the supported page cache orders, different sets for DAX and other files. With it corrected, 512MB page cache becomes disallowed on all non-DAX files on ARM64 system where the base page size is 64KB. After this patch is applied, the test program fails with error -EINVAL returned from __thp_vma_allowable_orders() and the madvise() system call to collapse the page caches. Link: https://lkml.kernel.org/r/20240715000423.316491-1-gshan@redhat.com Fixes: 6b24ca4a1a8d ("mm: Use multi-index entries in the page cache") Signed-off-by: Gavin Shan Acked-by: David Hildenbrand Reviewed-by: Ryan Roberts Acked-by: Zi Yan Cc: Baolin Wang Cc: Barry Song Cc: Don Dutile Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Ryan Roberts Cc: William Kucharski Cc: [5.17+] Signed-off-by: Andrew Morton commit d9592025000b3cf26c742f3505da7b83aedc26d5 Author: Yang Shi Date: Fri Jul 12 08:58:55 2024 -0700 mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines Yves-Alexis Perez reported commit 4ef9ad19e176 ("mm: huge_memory: don't force huge page alignment on 32 bit") didn't work for x86_32 [1]. It is because x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT. !CONFIG_64BIT should cover all 32 bit machines. [1] https://lore.kernel.org/linux-mm/CAHbLzkr1LwH3pcTgM+aGQ31ip2bKqiqEQ8=FQB+t2c3dhNKNHA@mail.gmail.com/ Link: https://lkml.kernel.org/r/20240712155855.1130330-1-yang@os.amperecomputing.com Fixes: 4ef9ad19e176 ("mm: huge_memory: don't force huge page alignment on 32 bit") Signed-off-by: Yang Shi Reported-by: Yves-Alexis Perez Tested-by: Yves-Alexis Perez Acked-by: David Hildenbrand Cc: Ben Hutchings Cc: Christoph Lameter Cc: Jiri Slaby Cc: Matthew Wilcox (Oracle) Cc: Rik van Riel Cc: Salvatore Bonaccorso Cc: Suren Baghdasaryan Cc: [6.8+] Signed-off-by: Andrew Morton commit 4cd7ba16a0afb36550eed7690e73d3e7a743fa96 Author: Ram Tummala Date: Tue Jul 9 18:45:39 2024 -0700 mm: fix old/young bit handling in the faulting path Commit 3bd786f76de2 ("mm: convert do_set_pte() to set_pte_range()") replaced do_set_pte() with set_pte_range() and that introduced a regression in the following faulting path of non-anonymous vmas which caused the PTE for the faulting address to be marked as old instead of young. handle_pte_fault() do_pte_missing() do_fault() do_read_fault() || do_cow_fault() || do_shared_fault() finish_fault() set_pte_range() The polarity of prefault calculation is incorrect. This leads to prefault being incorrectly set for the faulting address. The following check will incorrectly mark the PTE old rather than young. On some architectures this will cause a double fault to mark it young when the access is retried. if (prefault && arch_wants_old_prefaulted_pte()) entry = pte_mkold(entry); On a subsequent fault on the same address, the faulting path will see a non NULL vmf->pte and instead of reaching the do_pte_missing() path, PTE will then be correctly marked young in handle_pte_fault() itself. Due to this bug, performance degradation in the fault handling path will be observed due to unnecessary double faulting. Link: https://lkml.kernel.org/r/20240710014539.746200-1-rtummala@nvidia.com Fixes: 3bd786f76de2 ("mm: convert do_set_pte() to set_pte_range()") Signed-off-by: Ram Tummala Reviewed-by: Yin Fengwei Cc: Alistair Popple Cc: Matthew Wilcox (Oracle) Cc: Yin Fengwei Cc: Signed-off-by: Andrew Morton commit 34e526f6182e12b71f6076d43760dc6e0ae175a3 Author: James Clark Date: Tue Jul 9 11:25:11 2024 +0100 dt-bindings: arm: update James Clark's email address My new address is james.clark@linaro.org Link: https://lkml.kernel.org/r/20240709102512.31212-3-james.clark@linaro.org Signed-off-by: James Clark Cc: Bjorn Andersson Cc: Conor Dooley Cc: David S. Miller Cc: Geliang Tang Cc: Hao Zhang Cc: Jakub Kicinski Cc: Jiri Kosina Cc: Kees Cook Cc: Krzysztof Kozlowski Cc: Mao Jinlong Cc: Matthieu Baerts Cc: Matt Ranostay Cc: Mike Leach Cc: Oleksij Rempel Cc: Rob Herring (Arm) Cc: Suzuki K Poulose Signed-off-by: Andrew Morton commit 5bf6f3c595d38e3e92130373ae4c0799da5026ee Author: James Clark Date: Tue Jul 9 11:25:10 2024 +0100 MAINTAINERS: mailmap: update James Clark's email address My new address is james.clark@linaro.org Link: https://lkml.kernel.org/r/20240709102512.31212-2-james.clark@linaro.org Signed-off-by: James Clark Cc: Bjorn Andersson Cc: Conor Dooley Cc: David S. Miller Cc: Geliang Tang Cc: Hao Zhang Cc: Jakub Kicinski Cc: Jiri Kosina Cc: Kees Cook Cc: Krzysztof Kozlowski Cc: Mao Jinlong Cc: Matthieu Baerts Cc: Matt Ranostay Cc: Mike Leach Cc: Oleksij Rempel Cc: Rob Herring (Arm) Cc: Suzuki K Poulose Signed-off-by: Andrew Morton commit 81a91abab1307d7725fa4620952c0767beae7753 Author: Huacai Chen Date: Tue Jul 23 14:45:08 2024 +0800 irqchip/loongarch-cpu: Fix return value of lpic_gsi_to_irq() lpic_gsi_to_irq() should return a valid Linux interrupt number if acpi_register_gsi() succeeds, and return 0 otherwise. But lpic_gsi_to_irq() converts a negative return value of acpi_register_gsi() to a positive value silently. Convert the return value explicitly. Fixes: e8bba72b396c ("irqchip / ACPI: Introduce ACPI_IRQ_MODEL_LPIC for LoongArch") Reported-by: Miao Wang Signed-off-by: Huacai Chen Signed-off-by: Thomas Gleixner Reviewed-by: Jiaxun Yang Cc: Link: https://lore.kernel.org/r/20240723064508.35560-1-chenhuacai@loongson.cn commit 6dc55268f64b780eb8774de3705f791b689853bb Author: Rob Herring (Arm) Date: Tue Jul 23 18:09:03 2024 -0500 dt-bindings: iio: adc: ad7192: Fix 'single-channel' constraints The 'single-channel' property is an uint32, not an array, so 'items' is an incorrect constraint. This didn't matter until dtschema recently changed how properties are decoded. This results in this warning: Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dtb: adc@0: \ channel@1:single-channel: 1 is not of type 'array' Fixes: caf7b7632b8d ("dt-bindings: iio: adc: ad7192: Add AD7194 support") Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240723230904.1299744-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) commit 66a644c09fbed0a19f3708895c1180df78181019 Author: Paolo Bonzini Date: Fri Jul 26 13:45:36 2024 -0400 KVM: guest_memfd: abstract how prepared folios are recorded Right now, large folios are not supported in guest_memfd, and therefore the order used by kvm_gmem_populate() is always 0. In this scenario, using the up-to-date bit to track prepared-ness is nice and easy because we have one bit available per page. In the future, however, we might have large pages that are partially populated; for example, in the case of SEV-SNP, if a large page has both shared and private areas inside, it is necessary to populate it at a granularity that is smaller than that of the guest_memfd's backing store. In that case we will have to track preparedness at a 4K level, probably as a bitmap. In preparation for that, do not use explicitly folio_test_uptodate() and folio_mark_uptodate(). Return the state of the page directly from __kvm_gmem_get_pfn(), so that it is expected to apply to 2^N pages with N=*max_order. The function to mark a range as prepared for now takes just a folio, but is expected to take also an index and order (or something like that) when large pages are introduced. Thanks to Michael Roth for pointing out the issue with large pages. Signed-off-by: Paolo Bonzini commit e4ee5447927377c55777b73fe497a2455a25f948 Author: Paolo Bonzini Date: Thu Jul 11 18:27:55 2024 -0400 KVM: guest_memfd: let kvm_gmem_populate() operate only on private gfns This check is currently performed by sev_gmem_post_populate(), but it applies to all callers of kvm_gmem_populate(): the point of the function is that the memory is being encrypted and some work has to be done on all the gfns in order to encrypt them. Therefore, check the KVM_MEMORY_ATTRIBUTE_PRIVATE attribute prior to invoking the callback, and stop the operation if a shared page is encountered. Because CONFIG_KVM_PRIVATE_MEM in principle does not require attributes, this makes kvm_gmem_populate() depend on CONFIG_KVM_GENERIC_PRIVATE_MEM (which does require them). Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 4b5f67120a88c713b82907d55a767693382e9e9d Author: Paolo Bonzini Date: Thu Jul 11 18:27:54 2024 -0400 KVM: extend kvm_range_has_memory_attributes() to check subset of attributes While currently there is no other attribute than KVM_MEMORY_ATTRIBUTE_PRIVATE, KVM code such as kvm_mem_is_private() is written to expect their existence. Allow using kvm_range_has_memory_attributes() as a multi-page version of kvm_mem_is_private(), without it breaking later when more attributes are introduced. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit e300614f10bd2f33252c8ba40b34d6c3fbf95d72 Author: Paolo Bonzini Date: Thu Jul 11 18:27:53 2024 -0400 KVM: cleanup and add shortcuts to kvm_range_has_memory_attributes() Use a guard to simplify early returns, and add two more easy shortcuts. If the requested attributes are invalid, the attributes xarray will never show them as set. And if testing a single page, kvm_get_memory_attributes() is more efficient. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit de80252414f32db31eaa14baef511e9bd96021cd Author: Paolo Bonzini Date: Thu Jul 11 18:27:52 2024 -0400 KVM: guest_memfd: move check for already-populated page to common code Do not allow populating the same page twice with startup data. In the case of SEV-SNP, for example, the firmware does not allow it anyway, since the launch-update operation is only possible on pages that are still shared in the RMP. Even if it worked, kvm_gmem_populate()'s callback is meant to have side effects such as updating launch measurements, and updating the same page twice is unlikely to have the desired results. Races between calls to the ioctl are not possible because kvm_gmem_populate() holds slots_lock and the VM should not be running. But again, even if this worked on other confidential computing technology, it doesn't matter to guest_memfd.c whether this is something fishy such as missing synchronization in userspace, or rather something intentional. One of the racers wins, and the page is initialized by either kvm_gmem_prepare_folio() or kvm_gmem_populate(). Anyway, out of paranoia, adjust sev_gmem_post_populate() anyway to use the same errno that kvm_gmem_populate() is using. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 7239ed74677af143857d1a96d402476446a0995a Author: Paolo Bonzini Date: Thu Jul 11 18:27:51 2024 -0400 KVM: remove kvm_arch_gmem_prepare_needed() It is enough to return 0 if a guest need not do any preparation. This is in fact how sev_gmem_prepare() works for non-SNP guests, and it extends naturally to Intel hosts: the x86 callback for gmem_prepare is optional and returns 0 if not defined. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 6dd761d92f6600342860c618639489bb9c3843ea Author: Paolo Bonzini Date: Thu Jul 11 18:27:50 2024 -0400 KVM: guest_memfd: make kvm_gmem_prepare_folio() operate on a single struct kvm This is now possible because preparation is done by kvm_gmem_get_pfn() instead of fallocate(). In practice this is not a limitation, because even though guest_memfd can be bound to multiple struct kvm, for hardware implementations of confidential computing only one guest (identified by an ASID on SEV-SNP, or an HKID on TDX) will be able to access it. In the case of intra-host migration (not implemented yet for SEV-SNP, but we can use SEV-ES as an idea of how it will work), the new struct kvm inherits the same ASID and preparation need not be repeated. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit b85524314a3db687a87b190fd878aa1206b94b52 Author: Paolo Bonzini Date: Thu Jul 11 18:27:49 2024 -0400 KVM: guest_memfd: delay kvm_gmem_prepare_folio() until the memory is passed to the guest Initializing the contents of the folio on fallocate() is unnecessarily restrictive. It means that the page is registered with the firmware and then it cannot be touched anymore. In particular, this loses the possibility of using fallocate() to pre-allocate the page for SEV-SNP guests, because kvm_arch_gmem_prepare() then fails. It's only when the guest actually accesses the page (and therefore kvm_gmem_get_pfn() is called) that the page must be cleared from any stale host data and registered with the firmware. The up-to-date flag is clear if this has to be done (i.e. it is the first access and kvm_gmem_populate() has not been called). All in all, there are enough differences between kvm_gmem_get_pfn() and kvm_gmem_populate(), that it's better to separate the two flows completely. Extract the bulk of kvm_gmem_get_folio(), which take a folio and end up setting its up-to-date flag, to a new function kvm_gmem_prepare_folio(); these are now done only by the non-__-prefixed kvm_gmem_get_pfn(). As a bonus, __kvm_gmem_get_pfn() loses its ugly "bool prepare" argument. One difference is that fallocate(PUNCH_HOLE) can now race with a page fault. Potentially this causes a page to be prepared and into the filemap even after fallocate(PUNCH_HOLE). This is harmless, as it can be fixed by another hole punching operation, and can be avoided by clearing the private-page attribute prior to invoking fallocate(PUNCH_HOLE). This way, the page fault will cause an exit to user space. The previous semantics, where fallocate() could be used to prepare the pages in advance of running the guest, can be accessed with KVM_PRE_FAULT_MEMORY. For now, accessing a page in one VM will attempt to call kvm_arch_gmem_prepare() in all of those that have bound the guest_memfd. Cleaning this up is left to a separate patch. Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 78c4293372fe1fe6060727dfbd5643552e3ff86d Author: Paolo Bonzini Date: Thu Jul 11 18:27:48 2024 -0400 KVM: guest_memfd: return locked folio from __kvm_gmem_get_pfn Allow testing the up-to-date flag in the caller without taking the lock again. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 564429a6bd8d26065b2cccffcaa9485359f74de7 Author: Paolo Bonzini Date: Thu Jul 11 18:27:47 2024 -0400 KVM: rename CONFIG_HAVE_KVM_GMEM_* to CONFIG_HAVE_KVM_ARCH_GMEM_* Add "ARCH" to the symbols; shortly, the "prepare" phase will include both the arch-independent step to clear out contents left in the page by the host, and the arch-dependent step enabled by CONFIG_HAVE_KVM_GMEM_PREPARE. For consistency do the same for CONFIG_HAVE_KVM_GMEM_INVALIDATE as well. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 7fbdda31b0a14ff45809fb27182b98dcbcbad5b0 Author: Paolo Bonzini Date: Thu Jul 11 18:27:46 2024 -0400 KVM: guest_memfd: do not go through struct page We have a perfectly usable folio, use it to retrieve the pfn and order. All that's needed is a version of folio_file_page that returns a pfn. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit d04c77d231223563405e8874fa7edfdc65e545fe Author: Paolo Bonzini Date: Thu Jul 11 18:27:45 2024 -0400 KVM: guest_memfd: delay folio_mark_uptodate() until after successful preparation The up-to-date flag as is now is not too useful; it tells guest_memfd not to overwrite the contents of a folio, but it doesn't say that the page is ready to be mapped into the guest. For encrypted guests, mapping a private page requires that the "preparation" phase has succeeded, and at the same time the same page cannot be prepared twice. So, ensure that folio_mark_uptodate() is only called on a prepared page. If kvm_gmem_prepare_folio() or the post_populate callback fail, the folio will not be marked up-to-date; it's not a problem to call clear_highpage() again on such a page prior to the next preparation attempt. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit d0d87226f535965b4dafc6ef79246456503a4503 Author: Paolo Bonzini Date: Thu Jul 11 18:27:44 2024 -0400 KVM: guest_memfd: return folio from __kvm_gmem_get_pfn() Right now this is simply more consistent and avoids use of pfn_to_page() and put_page(). It will be put to more use in upcoming patches, to ensure that the up-to-date flag is set at the very end of both the kvm_gmem_get_pfn() and kvm_gmem_populate() flows. Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 5932ca411e533e7ad2b97c47b4357a05fa06c2a5 Author: Paolo Bonzini Date: Wed Jul 17 13:04:48 2024 -0400 KVM: x86: disallow pre-fault for SNP VMs before initialization KVM_PRE_FAULT_MEMORY for an SNP guest can race with sev_gmem_post_populate() in bad ways. The following sequence for instance can potentially trigger an RMP fault: thread A, sev_gmem_post_populate: called thread B, sev_gmem_prepare: places below 'pfn' in a private state in RMP thread A, sev_gmem_post_populate: *vaddr = kmap_local_pfn(pfn + i); thread A, sev_gmem_post_populate: copy_from_user(vaddr, src + i * PAGE_SIZE, PAGE_SIZE); RMP #PF Fix this by only allowing KVM_PRE_FAULT_MEMORY to run after a guest's initial private memory contents have been finalized via KVM_SEV_SNP_LAUNCH_FINISH. Beyond fixing this issue, it just sort of makes sense to enforce this, since the KVM_PRE_FAULT_MEMORY documentation states: "KVM maps memory as if the vCPU generated a stage-2 read page fault" which sort of implies we should be acting on the same guest state that a vCPU would see post-launch after the initial guest memory is all set up. Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini commit 866d2d36b81d7d0e6d91423b6dd9b1bcfd0510dd Author: Len Brown Date: Fri Jul 26 14:16:28 2024 -0400 tools/power turbostat: version 2024.07.26 Release 2024.07.26: Enable turbostat extensions to add both perf and PMT (Intel Platform Monitoring Technology) counters from the cmdline. Demonstrate PMT access with built-in support for Meteor Lake's Die%c6 counter. This commit: Clean up white-space nits introduced since version 2024.05.10 Signed-off-by: Len Brown commit 19d076903b95896ce55c7cc3679f795731591ac6 Author: Patryk Wlazlyn Date: Wed Jul 24 13:17:30 2024 +0200 tools/power turbostat: Include umask=%x in perf counter's config Some counters, like cpu/cache-misses/, expose and require umask=%x parameter alongside event=%x in the sysfs perf counter's event file. This change make sure we parse and use it when opening user added counters. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 944264a2a99cc4dd4b10eaa9798b6aab80adf4be Author: Patryk Wlazlyn Date: Tue Jul 23 20:12:32 2024 +0200 tools/power turbostat: Document PMT in turbostat.8 Add a general description of the user interface for adding PMT counters with the new --add pmt,... option. Provide a complete example for requesting two counters. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 640540beb88363a825524295664acfdb0f5d5fc2 Author: Patryk Wlazlyn Date: Mon Jul 22 22:12:22 2024 +0200 tools/power turbostat: Add MTL's PMT DC6 builtin counter Provide a definition for metadata that allows reading DC6 residency counter via PMT and exposes it as a builtin counter. Note that this residency counter is updated and read via entirely different mechanisms vs the MSR-based residency counters. On MTL processors, there are times when Die%c6 will report above 100%. This is still useful, but don't expect 3 digits of precision... Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit f0e4ed752fda6997b41917c94a5478b340178001 Author: Patryk Wlazlyn Date: Mon Jul 22 22:11:03 2024 +0200 tools/power turbostat: Add early support for PMT counters Allows users to read Intel PMT (Platform Monitoring Technology) counters, providing interface similar to one used to add MSR and perf counters. Because PMT is exposed as a raw MMIO range, without metadata, user has to supply the necessary information to find and correctly display the requested counter. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit d27087c76e3c859ea05b7581ef7ce8aa5a088dd8 Author: Leo Yan Date: Wed Jul 17 09:22:11 2024 +0100 perf docs: Document cross compilation Records the commands for cross compilation with two methods. The first method relies on Multiarch. The second approach is to explicitly specify the PKG_CONFIG variables, which is widely used in build system (like Buildroot, Yocto, etc). Co-developed-by: James Clark Signed-off-by: James Clark Signed-off-by: Leo Yan Tested-by: Ian Rogers Cc: amadio@gentoo.org Cc: Thomas Richter Link: https://lore.kernel.org/r/20240717082211.524826-7-leo.yan@arm.com Signed-off-by: Namhyung Kim commit f42596c73872b753ff1799bc7fc79b1100226da1 Author: Leo Yan Date: Wed Jul 17 09:22:10 2024 +0100 perf: build: Link lib 'zstd' for static build When build static perf, Makefile reports the error: Makefile.config:480: No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR The libdw has been installed on the system, but the build system fails to build the feature detecting binary 'test-libdw-dwarf-unwind'. The failure is caused by missing to link the lib 'zstd'. Link lib 'zstd' for the static build, in the end, the dwarf feature can be enabled in the static perf. Signed-off-by: Leo Yan Tested-by: Ian Rogers Cc: amadio@gentoo.org Cc: James Clark Cc: Thomas Richter Link: https://lore.kernel.org/r/20240717082211.524826-6-leo.yan@arm.com Signed-off-by: Namhyung Kim commit 91b6a536b40658c24d6f04747ddf852d30f7f259 Author: Leo Yan Date: Wed Jul 17 09:22:09 2024 +0100 perf: build: Link lib 'lzma' for static build The libunwind feature test failed with the static linkage. This is due to the 'lzma' lib is missed, so link it to dismiss building failure. Signed-off-by: Leo Yan Tested-by: Ian Rogers Cc: amadio@gentoo.org Cc: James Clark Cc: Thomas Richter Link: https://lore.kernel.org/r/20240717082211.524826-5-leo.yan@arm.com Signed-off-by: Namhyung Kim commit 536661da6ea18fe6df5740bc9e9001d097b035ee Author: Leo Yan Date: Wed Jul 17 09:22:08 2024 +0100 perf: build: Only link libebl.a for old libdw Since libdw version 0.177, elfutils has merged libebl.a into libdw (see the commit "libebl: Don't install libebl.a, libebl.h and remove backends from spec." in the elfutils repository). As a result, libebl.a does not exist on Debian Bullseye and newer releases, causing static perf builds to fail on these distributions. This commit checks the libdw version and only links libebl.a if it detects that the libdw version is older than 0.177. Signed-off-by: Leo Yan Tested-by: Ian Rogers Cc: amadio@gentoo.org Cc: James Clark Cc: Thomas Richter Link: https://lore.kernel.org/r/20240717082211.524826-4-leo.yan@arm.com Signed-off-by: Namhyung Kim commit cffe29d3b54aa0437bc35440ea64866bbfc418a3 Author: Leo Yan Date: Wed Jul 17 09:22:07 2024 +0100 perf: build: Set Python configuration for cross compilation Python configuration has dedicated folders for different architectures. For example, Python 3.11 has two folders as shown below, one for Arm64 and another for x86_64: /usr/lib/python3.11/config-3.11-aarch64-linux-gnu/ /usr/lib/python3.11/config-3.11-x86_64-linux-gnu/ This commit updates the Python configuration path based on the compiler's machine type, guiding the compiler to find the correct path for Python libraries. It also renames the generated .so file name to match the machine name. Signed-off-by: Leo Yan Tested-by: Ian Rogers Cc: amadio@gentoo.org Cc: James Clark Cc: Thomas Richter Link: https://lore.kernel.org/r/20240717082211.524826-3-leo.yan@arm.com Signed-off-by: Namhyung Kim commit 440cf77625e300e683ca0edc39fbc4b6f3175feb Author: Leo Yan Date: Wed Jul 17 09:22:06 2024 +0100 perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation On recent Linux distros like Ubuntu Noble and Debian Bookworm, the 'pkg-config-aarch64-linux-gnu' package is missing. As a result, the aarch64-linux-gnu-pkg-config command is not available, which causes build failures. When a build passes the environment variables PKG_CONFIG_LIBDIR or PKG_CONFIG_PATH, like a user uses make command or a build system (like Yocto, Buildroot, etc) prepares the variables and passes to the Perf's Makefile, the commit keeps these variables for package configuration. Otherwise, this commit sets the PKG_CONFIG_LIBDIR variable to use the Multiarch libs for the cross compilation. Signed-off-by: Leo Yan Tested-by: Ian Rogers Cc: amadio@gentoo.org Cc: Thomas Richter Link: https://lore.kernel.org/r/20240717082211.524826-2-leo.yan@arm.com Signed-off-by: Namhyung Kim commit 4c17736689ccfc44ec7dcc472577f25c34cf8724 Author: Casey Chen Date: Mon Jul 22 15:15:48 2024 -0600 perf tool: fix dereferencing NULL al->maps With 0dd5041c9a0e ("perf addr_location: Add init/exit/copy functions"), when cpumode is 3 (macro PERF_RECORD_MISC_HYPERVISOR), thread__find_map() could return with al->maps being NULL. The path below could add a callchain_cursor_node with NULL ms.maps. add_callchain_ip() thread__find_symbol(.., &al) thread__find_map(.., &al) // al->maps becomes NULL ms.maps = maps__get(al.maps) callchain_cursor_append(..., &ms, ...) node->ms.maps = maps__get(ms->maps) Then the path below would dereference NULL maps and get segfault. fill_callchain_info() maps__machine(node->ms.maps); Fix it by checking if maps is NULL in fill_callchain_info(). Fixes: 0dd5041c9a0e ("perf addr_location: Add init/exit/copy functions") Signed-off-by: Casey Chen Reviewed-by: Ian Rogers Reviewed-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: yzhong@purestorage.com Link: https://lore.kernel.org/r/20240722211548.61455-1-cachen@purestorage.com Signed-off-by: Namhyung Kim commit 2f8c4f5062855a83c1f2dbc012c4fa274ce999d4 Merge: eb966e0c5f238 2ccfe94bc3ac9 Author: Linus Torvalds Date: Fri Jul 26 11:04:28 2024 -0700 Merge tag 'auxdisplay-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull auxdisplay updates from Geert Uytterhoeven: - add support for configuring the boot message on line displays - miscellaneous fixes and improvements * tag 'auxdisplay-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: auxdisplay: ht16k33: Drop reference after LED registration auxdisplay: Use sizeof(*pointer) instead of sizeof(type) auxdisplay: hd44780: add missing MODULE_DESCRIPTION() macro auxdisplay: linedisp: add missing MODULE_DESCRIPTION() macro auxdisplay: linedisp: Support configuring the boot message auxdisplay: charlcd: Provide a forward declaration commit eb966e0c5f238ffeacc15543f1d25fb06a5100c2 Merge: 0ba9b1551185a e8b96a66ae01d Author: Linus Torvalds Date: Fri Jul 26 11:01:31 2024 -0700 Merge tag 'sound-fix-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes gathered since the previous pull. We see a bit large LOCs at a HD-audio quirk, but that's only bulk COEF data, hence it's safe to take. In addition to that, there were two minor fixes for MIDI 2.0 handling for ALSA core, and the rest are all rather random small and device-specific fixes" * tag 'sound-fix-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: fsl-asoc-card: Dynamically allocate memory for snd_soc_dai_link_components ASoC: amd: yc: Support mic on Lenovo Thinkpad E16 Gen 2 ALSA: hda/realtek: Implement sound init sequence for Samsung Galaxy Book3 Pro 360 ALSA: hda/realtek: cs35l41: Fixup remaining asus strix models ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on unprepare ASoC: SOF: ipc4-topology: Only handle dai_config with HW_PARAMS for ChainDMA ALSA: ump: Force 1 Group for MIDI1 FBs ALSA: ump: Don't update FB name for static blocks ALSA: usb-audio: Add a quirk for Sonix HD USB Camera ASoC: TAS2781: Fix tasdev_load_calibrated_data() ASoC: tegra: select CONFIG_SND_SIMPLE_CARD_UTILS ASoC: Intel: use soc_intel_is_byt_cr() only when IOSF_MBI is reachable ALSA: usb-audio: Move HD Webcam quirk to the right place ALSA: hda: tas2781: mark const variables as __maybe_unused ALSA: usb-audio: Fix microphone sound on HD webcam. ASoC: sof: amd: fix for firmware reload failure in Vangogh platform ASoC: Intel: Fix RT5650 SSP lookup ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices ASoC: SOF: imx8m: Fix DSP control regmap retrieval commit 0ba9b1551185a8b42003b708b6a9c25a9808701e Merge: 65ad409e6388e d4ef5d2b7ee0c Author: Linus Torvalds Date: Fri Jul 26 10:57:07 2024 -0700 Merge tag 'drm-next-2024-07-26' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Fixes for rc1, mostly amdgpu, i915 and xe, with some other misc ones, doesn't seem to be anything too serious. amdgpu: - Bump driver version for GFX12 DCC - DC documention warning fixes - VCN unified queue power fix - SMU fix - RAS fix - Display corruption fix - SDMA 5.2 workaround - GFX12 fixes - Uninitialized variable fix - VCN/JPEG 4.0.3 fixes - Misc display fixes - RAS fixes - VCN4/5 harvest fix - GPU reset fix i915: - Reset intel_dp->link_trained before retraining the link - Don't switch the LTTPR mode on an active link - Do not consider preemption during execlists_dequeue for gen8 - Allow NULL memory region xe: - xe_exec ioctl minor fix on sync entry cleanup upon error - SRIOV: limit VF LMEM provisioning - Wedge mode fixes v3d: - fix indirect dispatch on newer v3d revs panel: - fix panel backlight bindings" * tag 'drm-next-2024-07-26' of https://gitlab.freedesktop.org/drm/kernel: (39 commits) drm/amdgpu: reset vm state machine after gpu reset(vram lost) drm/amdgpu: add missed harvest check for VCN IP v4/v5 drm/amdgpu: Fix eeprom max record count drm/amdgpu: fix ras UE error injection failure issue drm/amd/display: Remove ASSERT if significance is zero in math_ceil2 drm/amd/display: Check for NULL pointer drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF drm/amdgpu: Add empty HDP flush function to VCN v4.0.3 drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3 drm/amd/amdgpu: Fix uninitialized variable warnings drm/amdgpu: Fix atomics on GFX12 drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell drm/i915: Allow NULL memory region drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8 dt-bindings: display: panel: samsung,atna33xc20: Document ATNA45AF01 drm/xe: Don't suspend device upon wedge drm/xe: Wedge the entire device drm/xe/pf: Limit fair VF LMEM provisioning drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup drm/amd/display: fix corruption with high refresh rates on DCN 3.0 ... commit f3065f9c3917fa9279992623a2f3282f1fd43515 Author: Patryk Wlazlyn Date: Thu Jul 4 20:11:33 2024 +0200 tools/power turbostat: Add selftests for added perf counters Test adds several perf counters from msr, cstate_core and cstate_pkg groups and checks if the columns for those counters show up. The test skips the counters that are not present. It is not an error, but the test may not be as exhaustive. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 1f8add13e6c86653da2ec599dfc94e7a8865cdcb Author: Patryk Wlazlyn Date: Wed Jul 3 23:14:14 2024 +0200 tools/power turbostat: Add selftests for SMI, APERF and MPERF counters The test requests BICs that are dependent on SMI, APERF and MPERF counters and checks if the columns show up in the output and the turbostat doesn't crash. Read the counters in both --no-msr and --no-perf mode. The test skips counters that are not present or user does not have permissions to read. It is not an error, but the test may not be as exhaustive. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 65ad409e6388ea59d8ae73e99857c565da69612e Merge: a6294b5b1fdcd 6dc2e98d5f1de Author: Linus Torvalds Date: Fri Jul 26 10:47:53 2024 -0700 Merge tag 's390-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Vasily Gorbik: - Fix KMSAN build breakage caused by the conflict between s390 and mm-stable trees - Add KMSAN page markers for ptdump - Add runtime constant support - Fix __pa/__va for modules under non-GPL licenses by exporting necessary vm_layout struct with EXPORT_SYMBOL to prevent linkage problems - Fix an endless loop in the CF_DIAG event stop in the CPU Measurement Counter Facility code when the counter set size is zero - Remove the PROTECTED_VIRTUALIZATION_GUEST config option and enable its functionality by default - Support allocation of multiple MSI interrupts per device and improve logging of architecture-specific limitations - Add support for lowcore relocation as a debugging feature to catch all null ptr dereferences in the kernel address space, improving detection beyond the current implementation's limited write access protection - Clean up and rework CPU alternatives to allow for callbacks and early patching for the lowcore relocation * tag 's390-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (39 commits) s390: Remove protvirt and kvm config guards for uv code s390/boot: Add cmdline option to relocate lowcore s390/kdump: Make kdump ready for lowcore relocation s390/entry: Make system_call() ready for lowcore relocation s390/entry: Make ret_from_fork() ready for lowcore relocation s390/entry: Make __switch_to() ready for lowcore relocation s390/entry: Make restart_int_handler() ready for lowcore relocation s390/entry: Make mchk_int_handler() ready for lowcore relocation s390/entry: Make int handlers ready for lowcore relocation s390/entry: Make pgm_check_handler() ready for lowcore relocation s390/entry: Add base register to CHECK_VMAP_STACK/CHECK_STACK macro s390/entry: Add base register to SIEEXIT macro s390/entry: Add base register to MBEAR macro s390/entry: Make __sie64a() ready for lowcore relocation s390/head64: Make startup code ready for lowcore relocation s390: Add infrastructure to patch lowcore accesses s390/atomic_ops: Disable flag outputs constraint for GCC versions below 14.2.0 s390/entry: Move SIE indicator flag to thread info s390/nmi: Simplify ptregs setup s390/alternatives: Remove alternative facility list ... commit b2e4a5dfafcce87ed2b9aac0b2887f421cd2930a Author: Patryk Wlazlyn Date: Wed Jul 10 14:28:03 2024 +0200 tools/power turbostat: Move verbose counter messages to level 2 Printing information about the source and value during initialization and reading of the counter for each cpu, while useful when debugging, results in too verbose output. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 52e130764ab6bdc439bcf124ac3e15f52ca0c8e5 Author: Patryk Wlazlyn Date: Wed Jul 10 11:34:38 2024 +0200 tools/power turbostat: Move debug prints from stdout to stderr This leaves the stdout cleaner, having only counter data. It makes it easier for programs to parse the output of turbostat, for example selftests. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit a6294b5b1fdcdcb23c6882f2edb4bae1db3fc096 Merge: 6467dfdfc94cf 36639013b3462 Author: Linus Torvalds Date: Fri Jul 26 10:39:10 2024 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The usual summary below, but the main fix is for the fast GUP lockless page-table walk when we have a combination of compile-time and run-time folding of the p4d and the pud respectively. - Remove some redundant Kconfig conditionals - Fix string output in ptrace selftest - Fix fast GUP crashes in some page-table configurations - Remove obsolete linker option when building the vDSO - Fix some sysreg field definitions for the GIC" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: Fix lockless walks with static and dynamic page-table folding arm64/sysreg: Correct the values for GICv4.1 arm64/vdso: Remove --hash-style=sysv kselftest: missing arg in ptrace.c arm64/Kconfig: Remove redundant 'if HAVE_FUNCTION_GRAPH_TRACER' arm64: remove redundant 'if HAVE_ARCH_KASAN' in Kconfig commit c2adcf051be01d3da1e138c178a680514299461b Author: Chang Yu Date: Tue Jul 23 20:40:06 2024 -0700 KVM: Documentation: Fix title underline too short warning Fix "WARNING: Title underline too short" by extending title line to the proper length. Signed-off-by: Chang Yu Message-ID: Signed-off-by: Paolo Bonzini commit b6f6a7aa689f1c255e06fee3ca13c9f9e5c12780 Author: Steve French Date: Fri Jul 26 01:06:20 2024 -0500 smb3: add dynamic trace point for session setup key expired failures There are cases where services need to remount (or change their credentials files) when keys have expired, but it can be helpful to have a dynamic trace point to make it easier to notify the service to refresh the storage account key. Here is sample output, one from mount with bad password, one from a reconnect where the password has been changed or expired and reconnect fails (requiring remount with new storage account key) TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | mount.cifs-11362 [000] ..... 6000.241620: smb3_key_expired: rc=-13 user=testpassu conn_id=0x2 server=localhost addr=127.0.0.1:445 kworker/4:0-8458 [004] ..... 6044.892283: smb3_key_expired: rc=-13 user=testpassu conn_id=0x3 server=localhost addr=127.0.0.1:445 Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 6467dfdfc94cfefed728bb1d9eb78493760469e0 Merge: 732c275394305 3ceccb14f5576 Author: Linus Torvalds Date: Fri Jul 26 10:34:42 2024 -0700 Merge tag 'ceph-for-6.11-rc1' of https://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "A small patchset to address bogus I/O errors and ultimately an assertion failure in the face of watch errors with -o exclusive mappings in RBD marked for stable and some assorted CephFS fixes" * tag 'ceph-for-6.11-rc1' of https://github.com/ceph/ceph-client: rbd: don't assume rbd_is_lock_owner() for exclusive mappings rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings rbd: rename RBD_LOCK_STATE_RELEASING and releasing_wait ceph: fix incorrect kmalloc size of pagevec mempool ceph: periodically flush the cap releases ceph: convert comma to semicolon in __ceph_dentry_dir_lease_touch() ceph: use cap_wait_list only if debugfs is enabled commit 6629f87b97e0740431b7b29b8dfdfa9d842c4bc5 Author: Steve French Date: Wed Jul 24 11:57:18 2024 -0500 smb3: add four dynamic tracepoints for copy_file_range and reflink Add more dynamic tracepoints to help debug copy_file_range (copychunk) and clone_range ("duplicate extents"). These are tracepoints for entering the function and completing without error. For example: "trace-cmd record -e smb3_copychunk_enter -e smb3_copychunk_done" or "trace-cmd record -e smb3_clone_enter -e smb3_clone_done" Here is sample output: TASK-PID CPU# ||||| TIMESTAMP FUNCTION | | | ||||| | | cp-5964 [005] ..... 2176.168977: smb3_clone_enter: xid=17 sid=0xeb275be4 tid=0x7ffa7cdb source fid=0x1ed02e15 source offset=0x0 target fid=0x1ed02e15 target offset=0x0 len=0xa0000 cp-5964 [005] ..... 2176.170668: smb3_clone_done: xid=17 sid=0xeb275be4 tid=0x7ffa7cdb source fid=0x1ed02e15 source offset=0x0 target fid=0x1ed02e15 target offset=0x0 len=0xa0000 Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 5779d398dbcd74c30a641c209946b8498e668a53 Author: Steve French Date: Tue Jul 23 18:12:40 2024 -0500 smb3: add dynamic tracepoint for reflink errors There are cases where debugging clone_range ("smb2_duplicate_extents" function) and in the future copy_range ("smb2_copychunk_range") can be helpful. Add dynamic trace points for any errors in clone, and a followon patch will add them for copychunk. "trace-cmd record -e smb3_clone_err" Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 0005ca2076ad222de34de519c47b0eb80f458877 Author: Jim Mattson Date: Wed Jul 24 12:05:09 2024 -0700 KVM: x86: Eliminate log spam from limited APIC timer periods SAP's vSMP MemoryONE continuously requests a local APIC timer period less than 500 us, resulting in the following kernel log spam: kvm: vcpu 15: requested 70240 ns lapic timer period limited to 500000 ns kvm: vcpu 19: requested 52848 ns lapic timer period limited to 500000 ns kvm: vcpu 15: requested 70256 ns lapic timer period limited to 500000 ns kvm: vcpu 9: requested 70256 ns lapic timer period limited to 500000 ns kvm: vcpu 9: requested 70208 ns lapic timer period limited to 500000 ns kvm: vcpu 9: requested 387520 ns lapic timer period limited to 500000 ns kvm: vcpu 9: requested 70160 ns lapic timer period limited to 500000 ns kvm: vcpu 66: requested 205744 ns lapic timer period limited to 500000 ns kvm: vcpu 9: requested 70224 ns lapic timer period limited to 500000 ns kvm: vcpu 9: requested 70256 ns lapic timer period limited to 500000 ns limit_periodic_timer_frequency: 7569 callbacks suppressed ... To eliminate this spam, change the pr_info_ratelimited() in limit_periodic_timer_frequency() to pr_info_once(). Reported-by: James Houghton Signed-off-by: Jim Mattson Message-ID: <20240724190640.2449291-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 732c275394305b6d71b4bb74f5432d2d91f05257 Merge: dd90ad50cb372 14e9283fb22d0 Author: Linus Torvalds Date: Fri Jul 26 10:31:03 2024 -0700 Merge tag 'erofs-for-6.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull more erofs updates from Gao Xiang: - Support STATX_DIOALIGN and FS_IOC_GETFSSYSFSPATH - Fix a race of LZ4 decompression due to recent refactoring - Another multi-page folio adaption in erofs_bread() * tag 'erofs-for-6.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: convert comma to semicolon erofs: support multi-page folios for erofs_bread() erofs: add support for FS_IOC_GETFSSYSFSPATH erofs: fix race in z_erofs_get_gbuf() erofs: support STATX_DIOALIGN commit dd90ad50cb372056d01a9913ce80aaa526826593 Merge: 4c7be57f2772c bba1f6758a9ec Author: Linus Torvalds Date: Fri Jul 26 10:26:33 2024 -0700 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull struct file leak fixes from Al Viro: "a couple of leaks on failure exits missing fdput()" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: lirc: rc_dev_get_from_fd(): fix file leak powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() commit 4c7be57f2772c8ce4e1e43c6a79b8f8d401a4795 Author: Linus Torvalds Date: Tue Jul 23 13:21:02 2024 -0700 arm64: allow installing compressed image by default On arm64 we build compressed images, but "make install" by default will install the old non-compressed one. To actually get the compressed image install, you need to use "make zinstall", which is not the usual way to install a kernel. Which may not sound like much of an issue, but when you deal with multiple architectures (and years of your fingers knowing the regular "make install" incantation), this inconsistency is pretty annoying. But as Will Deacon says: "Sadly, bootloaders being as top quality as you might expect, I don't think we're in a position to rely on decompressor support across the board. Our Image.gz is literally just that -- we don't have a built-in decompressor (nor do I think we want to rush into that again after the fun we had on arm32) and the recent EFI zboot support solves that problem for platforms using EFI. Changing the default 'install' target terrifies me. There are bound to be folks with embedded boards who've scripted this and we could really ruin their day if we quietly give them a compressed kernel that their bootloader doesn't know how to handle :/" So make this conditional on a new "COMPRESSED_INSTALL" option. Cc: Catalin Marinas Acked-by: Will Deacon Signed-off-by: Linus Torvalds commit 51c4767503d5d3a5a0ae4dcb19b7f7cf38b40c6c Merge: 1722389b0d863 fb9086e95ad84 Author: Linus Torvalds Date: Fri Jul 26 09:50:36 2024 -0700 Merge tag 'bitmap-6.11-rc1' of https://github.com:/norov/linux Pull bitmap updates from Yury Norov: "Random fixes" * tag 'bitmap-6.11-rc1' of https://github.com:/norov/linux: riscv: Remove unnecessary int cast in variable_fls() radix tree test suite: put definition of bitmap_clear() into lib/bitmap.c bitops: Add a comment explaining the double underscore macros lib: bitmap: add missing MODULE_DESCRIPTION() macros cpumask: introduce assign_cpu() macro commit df3d6a3e01fd82cb74b6bb309f7be71e728a3448 Author: Luiz Augusto von Dentz Date: Thu Jul 25 18:28:08 2024 -0400 Bluetooth: hci_event: Fix setting DISCOVERY_FINDING for passive scanning DISCOVERY_FINDING shall only be set for active scanning as passive scanning is not meant to generate MGMT Device Found events causing discovering state to go out of sync since userspace would believe it is discovering when in fact it is just passive scanning. Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=219088 Fixes: 2e2515c1ba38 ("Bluetooth: hci_event: Set DISCOVERY_FINDING on SCAN_ENABLED") Signed-off-by: Luiz Augusto von Dentz commit 7a8c6fb21a7c913ddb99785b14914dab2f934fbd Author: Arnd Bergmann Date: Mon Jul 22 11:27:06 2024 +0200 Bluetooth: btmtk: remove #ifdef around declarations The caller of these functions in btusb.c is guarded with an if(IS_ENABLED()) style check, so dead code is left out, but the declarations are still needed at compile time: drivers/bluetooth/btusb.c: In function 'btusb_mtk_reset': drivers/bluetooth/btusb.c:2705:15: error: implicit declaration of function 'btmtk_usb_subsys_reset' [-Wimplicit-function-declaration] 2705 | err = btmtk_usb_subsys_reset(hdev, btmtk_data->dev_id); | ^~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btusb.c: In function 'btusb_send_frame_mtk': drivers/bluetooth/btusb.c:2720:23: error: implicit declaration of function 'alloc_mtk_intr_urb' [-Wimplicit-function-declaration] 2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete); | ^~~~~~~~~~~~~~~~~~ drivers/bluetooth/btusb.c:2720:21: error: assignment to 'struct urb *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 2720 | urb = alloc_mtk_intr_urb(hdev, skb, btusb_tx_complete); | ^ Fixes: f0c83a23fcbb ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error") Signed-off-by: Arnd Bergmann Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Luiz Augusto von Dentz commit 61f7a8f975456d7be21100ee0936389142b95a81 Author: Arnd Bergmann Date: Mon Jul 22 11:27:05 2024 +0200 Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder The previous fix was incomplete as the link failure still persists with CONFIG_USB=m when the sdio or serial wrappers for btmtk.c are build-in: btmtk.c:(.text+0x468): undefined reference to `usb_alloc_urb' btmtk.c:(.text+0x488): undefined reference to `usb_free_urb' btmtk.c:(.text+0x500): undefined reference to `usb_anchor_urb' btmtk.c:(.text+0x50a): undefined reference to `usb_submit_urb' btmtk.c:(.text+0x92c): undefined reference to `usb_control_msg' btmtk.c:(.text+0xa92): undefined reference to `usb_unanchor_urb' btmtk.c:(.text+0x11e4): undefined reference to `usb_set_interface' btmtk.c:(.text+0x120a): undefined reference to `usb_kill_anchored_urbs' Disallow this configuration. Fixes: f0c83a23fcbb ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error") Signed-off-by: Arnd Bergmann Signed-off-by: Luiz Augusto von Dentz commit f0c83a23fcbb424fdff5b38fbcdda3c04003a210 Author: Chris Lu Date: Fri Jul 19 11:30:19 2024 +0800 Bluetooth: btmtk: Fix btmtk.c undefined reference build error MediaTek moved some usb interface related function to btmtk.c which may cause build failed if BT USB Kconfig wasn't enabled. Fix undefined reference by adding config check. btmtk.c:(.text+0x89c): undefined reference to `usb_alloc_urb' btmtk.c:(.text+0x8e3): undefined reference to `usb_free_urb' btmtk.c:(.text+0x956): undefined reference to `usb_free_urb' btmtk.c:(.text+0xa0e): undefined reference to `usb_anchor_urb' btmtk.c:(.text+0xb43): undefined reference to `usb_autopm_get_interface' btmtk.c:(.text+0xb7e): undefined reference to `usb_autopm_put_interface' btmtk.c:(.text+0xf70): undefined reference to `usb_disable_autosuspend' btmtk.c:(.text+0x133a): undefined reference to `usb_control_msg' Fixes: d019930b0049 ("Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407091928.AH0aGZnx-lkp@intel.com/ Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit 96b82af36efaa1787946e021aa3dc5410c05beeb Author: Luiz Augusto von Dentz Date: Mon Jul 15 10:40:03 2024 -0400 Bluetooth: hci_sync: Fix suspending with wrong filter policy When suspending the scan filter policy cannot be 0x00 (no acceptlist) since that means the host has to process every advertisement report waking up the system, so this attempts to check if hdev is marked as suspended and if the resulting filter policy would be 0x00 (no acceptlist) then skip passive scanning if thre no devices in the acceptlist otherwise reset the filter policy to 0x01 so the acceptlist is used since the devices programmed there can still wakeup be system. Fixes: 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier") Signed-off-by: Luiz Augusto von Dentz commit d09009bc80d9d0d812b988888c40cd86e52eaf1e Author: Chris Lu Date: Tue Jul 16 15:49:47 2024 +0800 Bluetooth: btmtk: Fix kernel crash when entering btmtk_usb_suspend If MediaTek's Bluetooth setup is unsuccessful, a NULL pointer issue occur when the system is suspended and the anchored kill function is called. To avoid this, add protection to prevent executing the anchored kill function if the setup is unsuccessful. [ 6.922106] Hardware name: Acer Tomato (rev2) board (DT) [ 6.922114] Workqueue: pm pm_runtime_work [ 6.922132] pstate: 804000c9 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 6.922147] pc : usb_kill_anchored_urbs+0x6c/0x1e0 [ 6.922164] lr : usb_kill_anchored_urbs+0x48/0x1e0 [ 6.922181] sp : ffff800080903b60 [ 6.922187] x29: ffff800080903b60 x28: ffff2c7b85c32b80 x27: ffff2c7bbb370930 [ 6.922211] x26: 00000000000f4240 x25: 00000000ffffffff x24: ffffd49ece2dcb48 [ 6.922255] x20: ffffffffffffffd8 x19: 0000000000000000 x18: 0000000000000006 [ 6.922276] x17: 6531656337386238 x16: 3632373862333863 x15: ffff800080903480 [ 6.922297] x14: 0000000000000000 x13: 303278302f303178 x12: ffffd49ecf090e30 [ 6.922318] x11: 0000000000000001 x10: 0000000000000001 x9 : ffffd49ecd2c5bb4 [ 6.922339] x8 : c0000000ffffdfff x7 : ffffd49ecefe0db8 x6 : 00000000000affa8 [ 6.922360] x5 : ffff2c7bbb35dd48 x4 : 0000000000000000 x3 : 0000000000000000 [ 6.922379] x2 : 0000000000000000 x1 : 0000000000000003 x0 : ffffffffffffffd8 [ 6.922400] Call trace: [ 6.922405] usb_kill_anchored_urbs+0x6c/0x1e0 [ 6.922422] btmtk_usb_suspend+0x20/0x38 [btmtk 5f200a97badbdfda4266773fee49acfc8e0224d5] [ 6.922444] btusb_suspend+0xd0/0x210 [btusb 0bfbf19a87ff406c83b87268b87ce1e80e9a829b] [ 6.922469] usb_suspend_both+0x90/0x288 [ 6.922487] usb_runtime_suspend+0x3c/0xa8 [ 6.922507] __rpm_callback+0x50/0x1f0 [ 6.922523] rpm_callback+0x70/0x88 [ 6.922538] rpm_suspend+0xe4/0x5a0 [ 6.922553] pm_runtime_work+0xd4/0xe0 [ 6.922569] process_one_work+0x18c/0x440 [ 6.922588] worker_thread+0x314/0x428 [ 6.922606] kthread+0x128/0x138 [ 6.922621] ret_from_fork+0x10/0x20 [ 6.922644] Code: f100a274 54000520 d503201f d100a260 (b8370000) [ 6.922654] ---[ end trace 0000000000000000 ]--- Fixes: ceac1cb0259d ("Bluetooth: btusb: mediatek: add ISO data transmission functions") Signed-off-by: Chris Lu Reported-by: Nícolas F. R. A. Prado #KernelCI Tested-by: Nícolas F. R. A. Prado Signed-off-by: Luiz Augusto von Dentz commit e22a3a9d4134d7e6351a2998771522e74bcc58da Author: Kiran K Date: Wed Jul 3 14:22:42 2024 +0530 Bluetooth: btintel: Fail setup on error Do not attempt to send any hci command to controller if *setup* function fails. Fixes: af395330abed ("Bluetooth: btintel: Add Intel devcoredump support") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 952b13c215234855d75ef4b5bb0138075e73677c Author: Takashi Iwai Date: Fri Jul 26 16:34:54 2024 +0200 ALSA: seq: ump: Optimize conversions from SysEx to UMP The current conversion from the legacy SysEx event to UMP SysEx packet in the sequencer core has a couple of issues: * The first packet trims the SysEx start byte (0xf0), hence it contains only 5 bytes instead of 6. This isn't wrong, per specification, but it's strange not to fill 6 bytes. * When the SysEx end marker (0xf7) is placed at the first byte of the next packet, it'll end up with an empty data just with the END status. It can be rather folded into the previous packet with the END status. This patch tries to address those issues. The first packet may have 6 bytes even with the SysEx start, and an empty packet with the SysEx end marker is omitted. Fixes: e9e02819a98a ("ALSA: seq: Automatic conversion of UMP events") Cc: Link: https://patch.msgid.link/20240726143455.3254-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4f61c8fe35202702426cfc0003e15116a01ba885 Author: Takashi Iwai Date: Fri Jul 26 16:26:20 2024 +0200 ALSA: hda/conexant: Mute speakers at suspend / shutdown Use the new helper to mute speakers at suspend / shutdown for avoiding click noises. Link: https://bugzilla.suse.com/show_bug.cgi?id=1228269 Link: https://patch.msgid.link/20240726142625.2460-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6cd23b26b348fa52c88e1adf9c0e48d68e13f95e Author: Takashi Iwai Date: Fri Jul 26 16:26:19 2024 +0200 ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown Some devices indicate click noises at suspend or shutdown when the speakers are unmuted. This patch adds a helper, snd_hda_gen_shutup_speakers(), to work around it. The new function is supposed to be called at suspend or shutdown by the codec driver, and it mutes the speakers. The mute status isn't cached, hence the original mute state will be restored at resume again. Link: https://patch.msgid.link/20240726142625.2460-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 358169617602f6f71b31e5c9532a09b95a34b043 Author: Pavel Begunkov Date: Fri Jul 26 15:24:31 2024 +0100 io_uring/napi: pass ktime to io_napi_adjust_timeout Pass the waiting time for __io_napi_adjust_timeout as ktime and get rid of all timespec64 conversions. It's especially simpler since the caller already have a ktime. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4f5b8e8eed4f53a1879e031a6712b25381adc23d.1722003776.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 342b2e395d5f34c9f111a818556e617939f83a8c Author: Pavel Begunkov Date: Fri Jul 26 15:24:30 2024 +0100 io_uring/napi: use ktime in busy polling It's more natural to use ktime/ns instead of keeping around usec, especially since we're comparing it against user provided timers, so convert napi busy poll internal handling to ktime. It's also nicer since the type (ktime_t vs unsigned long) now tells the unit of measure. Keep everything as ktime, which we convert to/from micro seconds for IORING_[UN]REGISTER_NAPI. The net/ busy polling works seems to work with usec, however it's not real usec as shift by 10 is used to get it from nsecs, see busy_loop_current_time(), so it's easy to get truncated nsec back and we get back better precision. Note, we can further improve it later by removing the truncation and maybe convincing net/ to use ktime/ns instead. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/95e7ec8d095069a3ed5d40a4bc6f8b586698bc7e.1722003776.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e60dc98122110594d0290845160f12916192fc6d Author: songxiebing Date: Fri Jul 26 18:07:26 2024 +0800 ALSA: hda: conexant: Fix headset auto detect fail in the polling mode The previous fix (7aeb25908648) only handles the unsol_event reporting during interrupts and does not include the polling mode used to set jackroll_ms, so now we are replacing it with snd_hda_jack_detect_enable_callback. Fixes: 7aeb25908648 ("ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140") Co-developed-by: bo liu Signed-off-by: bo liu Signed-off-by: songxiebing Link: https://patch.msgid.link/20240726100726.50824-1-soxiebing@163.com Signed-off-by: Takashi Iwai commit e975d955c07cbc2cd6a83a5d8235d8373441fdb9 Author: Mark Brown Date: Fri Jul 26 14:49:41 2024 +0100 regulator: Further restrict RZG2L USB VBCTRL regulator dependencies Since the regulator can't be used without the USB controller also tighten the dependency to match, as well as the default. Reviewed-by: Biju Das Signed-off-by: Mark Brown Link: https://patch.msgid.link/20240726-regulator-restrict-rzg2l-v1-1-640e508896e2@kernel.org Signed-off-by: Mark Brown commit f6bb5254b777453618a12d3bbf4a2a487acc8ee2 Merge: 55fbb9a5d64e0 c31fad1470389 Author: Jens Axboe Date: Fri Jul 26 08:06:15 2024 -0600 Merge tag 'nvme-6.11-2024-07-26' of git://git.infradead.org/nvme into block-6.11 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.11 - Fix request without payloads cleanup (Leon) - Use new protection information format (Francis) - Improved debug message for lost pci link (Bart) - Another apst quirk (Wang) - Use appropriate sysfs api for printing chars (Markus)" * tag 'nvme-6.11-2024-07-26' of git://git.infradead.org/nvme: nvme-pci: add missing condition check for existence of mapped data nvme-core: choose PIF from QPIF if QPIFS supports and PIF is QTYPE nvme-pci: Fix the instructions for disabling power management nvme: remove redundant bdev local variable nvme-fabrics: Use seq_putc() in __nvmf_concat_opt_tokens() nvme/pci: Add APST quirk for Lenovo N60z laptop commit 225990c487c1023e7b3aa89beb6a68011fbc0461 Author: Mark Mentovai Date: Thu Jul 25 16:41:44 2024 -0400 net: phy: realtek: add support for RTL8366S Gigabit PHY The PHY built in to the Realtek RTL8366S switch controller was previously supported by genphy_driver. This PHY does not implement MMD operations. Since commit 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()"), MMD register reads have been made during phy_probe to determine EEE support. For genphy_driver, these reads are transformed into 802.3 annex 22D clause 45-over-clause 22 mmd_phy_indirect operations that perform MII register writes to MII_MMD_CTRL and MII_MMD_DATA. This overwrites those two MII registers, which on this PHY are reserved and have another function, rendering the PHY unusable while so configured. Proper support for this PHY is restored by providing a phy_driver that declares MMD operations as unsupported by using the helper functions provided for that purpose, while remaining otherwise identical to genphy_driver. Fixes: 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()") Reported-by: Russell Senior Closes: https://github.com/openwrt/openwrt/issues/15981 Link: https://github.com/openwrt/openwrt/issues/15739 Signed-off-by: Mark Mentovai Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit 52420e483d3e1562f11a208d3c540b27b5e5dbf4 Author: Palmer Dabbelt Date: Tue Jul 2 11:37:31 2024 +0800 RISC-V: Provide the frequency of time CSR via hwprobe The RISC-V architecture makes a real time counter CSR (via RDTIME instruction) available for applications in U-mode but there is no architected mechanism for an application to discover the frequency the counter is running at. Some applications (e.g., DPDK) use the time counter for basic performance analysis as well as fine grained time-keeping. Add support to the hwprobe system call to export the time CSR frequency to code running in U-mode. Signed-off-by: Yunhui Cui Reviewed-by: Evan Green Reviewed-by: Anup Patel Acked-by: Punit Agrawal Link: https://lore.kernel.org/r/20240702033731.71955-2-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt commit 5c8405d763dc2b125b39166bc70be1b8dcc80582 Author: Stuart Menefy Date: Sun Jun 30 12:05:49 2024 +0100 riscv: Extend sv39 linear mapping max size to 128G This harmonizes all virtual addressing modes which can now all map (PGDIR_SIZE * PTRS_PER_PGD) / 4 of physical memory. The RISCV implementation of KASAN requires that the boundary between shallow mappings are aligned on an 8G boundary. In this case we need VMALLOC_START to be 8G aligned. So although we only need to move the start of the linear mapping down by 4GiB to allow 128GiB to be mapped, we actually move it down by 8GiB (creating a 4GiB hole between the linear mapping and KASAN shadow space) to maintain the alignment requirement. Signed-off-by: Stuart Menefy Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240630110550.1731929-1-stuart.menefy@codasip.com Signed-off-by: Palmer Dabbelt commit 3aa1a7d013dd69d187a7b2daa1a0961b7d4edc71 Merge: ec1dc56b54d67 66381d36771e4 Author: Palmer Dabbelt Date: Wed Jul 24 07:39:39 2024 -0700 Merge patch series "RISC-V: Select ACPI PPTT drivers" This series adds support for ACPI PPTT via cacheinfo. * b4-shazam-merge: RISC-V: Select ACPI PPTT drivers riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init() Link: https://lore.kernel.org/r/20240617131425.7526-1-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt commit ec1dc56b54d679cbfaa7ef7abbf23bdeac029af1 Merge: b5db73fb18257 38738947db385 Author: Palmer Dabbelt Date: Wed Jul 24 07:33:41 2024 -0700 Merge patch "Enable SPCR table for console output on RISC-V" Sia Jee Heng says: The ACPI SPCR code has been used to enable console output for ARM64 and X86. The same code can be reused for RISC-V. Furthermore, SPCR table is mandated for headless system as outlined in the RISC-V BRS Specification, chapter 6. * b4-shazam-merge: RISC-V: ACPI: Enable SPCR table for console output on RISC-V Link: https://lore.kernel.org/r/20240502073751.102093-1-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit b5db73fb18257cd5d9cb59bc4b779fffa629566a Author: Jisheng Zhang Date: Mon Jun 24 07:53:16 2024 +0800 riscv: enable HAVE_ARCH_STACKLEAK Add support for the stackleak feature. Whenever the kernel returns to user space the kernel stack is filled with a poison value. At the same time, disables the plugin in EFI stub code because EFI stub is out of scope for the protection. Tested on qemu and milkv duo: / # echo STACKLEAK_ERASING > /sys/kernel/debug/provoke-crash/DIRECT [ 38.675575] lkdtm: Performing direct entry STACKLEAK_ERASING [ 38.678448] lkdtm: stackleak stack usage: [ 38.678448] high offset: 288 bytes [ 38.678448] current: 496 bytes [ 38.678448] lowest: 1328 bytes [ 38.678448] tracked: 1328 bytes [ 38.678448] untracked: 448 bytes [ 38.678448] poisoned: 14312 bytes [ 38.678448] low offset: 8 bytes [ 38.689887] lkdtm: OK: the rest of the thread stack is properly erased Signed-off-by: Jisheng Zhang Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240623235316.2010-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 1d20e5d437cfebefb5e6f4d652c3a1561fc23fc7 Author: Zhongqiu Han Date: Thu Jun 20 11:34:34 2024 +0800 riscv: signal: Remove unlikely() from WARN_ON() condition "WARN_ON(unlikely(x))" is excessive. WARN_ON() already uses unlikely() internally. Signed-off-by: Zhongqiu Han Reviewed-by: Bjorn Andersson Reviewed-by: Andy Chiu Link: https://lore.kernel.org/r/20240620033434.3778156-1-quic_zhonhan@quicinc.com Signed-off-by: Palmer Dabbelt commit 5d5fc33ce58e81e8738816f5ee59f8e85fd3b404 Author: Anton Blanchard Date: Thu Jun 6 23:13:35 2024 -0700 riscv: Improve exception and system call latency Many CPUs implement return address branch prediction as a stack. The RISCV architecture refers to this as a return address stack (RAS). If this gets corrupted then the CPU will mispredict at least one but potentally many function returns. There are two issues with the current RISCV exception code: - We are using the alternate link stack (x5/t0) for the indirect branch which makes the hardware think this is a function return. This will corrupt the RAS. - We modify the return address of handle_exception to point to ret_from_exception. This will also corrupt the RAS. Testing the null system call latency before and after the patch: Visionfive2 (StarFive JH7110 / U74) baseline: 189.87 ns patched: 176.76 ns Lichee pi 4a (T-Head TH1520 / C910) baseline: 666.58 ns patched: 636.90 ns Just over 7% on the U74 and just over 4% on the C910. Signed-off-by: Anton Blanchard Signed-off-by: Cyril Bur Tested-by: Jisheng Zhang Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20240607061335.2197383-1-cyrilbur@tenstorrent.com Signed-off-by: Palmer Dabbelt commit 24168c5e6dfbdd5b414f048f47f75d64533296ca Author: Carlos Song Date: Mon Jul 15 18:53:51 2024 -0400 dt-bindings: i3c: add header for generic I3C flags Add header file for generic I3C flags to avoid hard code in dts file. Signed-off-by: Carlos Song Reviewed-by: Frank Li Acked-by: Jason Liu Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240715225351.3237284-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit b73c983491e0a61331611d2dab1dfccd4464b060 Author: Dan Carpenter Date: Thu Jul 18 13:30:22 2024 -0500 i3c: master: svc: Fix error code in svc_i3c_master_do_daa_locked() This code has a typo so it returns positive EIO instead of negative -EIO. Fix it! Fixes: a7809cb368b9 ("i3c: master: svc: Improve DAA STOP handle code logic") Signed-off-by: Dan Carpenter Reviewed-by: Frank Li Link: https://lore.kernel.org/r/e017edfc-da64-496b-8516-958bec27cd9a@stanley.mountain Signed-off-by: Alexandre Belloni commit 63c33ca0969cf4d4574103b69fb46f58a19a182b Author: Bhoomik Gupta Date: Mon Jul 8 11:08:35 2024 +0530 i3c: master: Enhance i3c_bus_type visibility for device searching & event monitoring Improve the visibility of i3c_bus_type to facilitate searching for i3c devices attached to the i3c bus. Enable other drivers to use bus_register_notifier to monitor i3c bus device events. Signed-off-by: Bhoomik Gupta Link: https://lore.kernel.org/r/20240708053835.3003986-1-bhoomik.gupta@nxp.com Signed-off-by: Alexandre Belloni commit 62fe9d06f5709caa1fa68055873ff279e05ade37 Author: Aniket Date: Mon Jul 8 06:21:03 2024 +0000 i3c: dw: Add power management support Add support for runtime and system power management. Handle clocks, resets, pads as part of suspend and resume. Restore controller registers that could be lost due to suspend. Finally add get and put calls appropriately in functions which access controller : bus_init, do_daa, send_ccc_cmd, priv_xfers, i2c_xfers, ibi and hot-join. Signed-off-by: Aniket Link: https://lore.kernel.org/r/20240708062103.3296587-4-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit effd21743c39a6535f204812006054fa172e4313 Author: Aniket Date: Mon Jul 8 06:21:02 2024 +0000 i3c: dw: Add some functions for reusability Separate logic for setting intr/thld registers in a func. Also modify enable function to take care of setting all fields in DEVICE_CTRL. These functions can be reused later for power management. Signed-off-by: Aniket Link: https://lore.kernel.org/r/20240708062103.3296587-3-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit 4e89bc48e66a9aef46a705943d3f81bffb3a2288 Author: Aniket Date: Mon Jul 8 06:21:01 2024 +0000 i3c: dw: Save timing registers and other values Add variables to store timing registers and other values. These variables would be later used to restore registers during resume without recomputation. Signed-off-by: Aniket Link: https://lore.kernel.org/r/20240708062103.3296587-2-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit 915d0741e0c8e5fe406f8a8369745a73e2c681ef Author: Frank Li Date: Tue Jul 2 18:31:07 2024 -0400 i3c: master: svc: Improve DAA STOP handle code logic The REQUEST_PROC_DAA command behaves differently from other commands. Sometimes the hardware can auto emit STOP, but in other conditions, it cannot. Improves the code logic to better handle these situations. Hardware can auto emit STOP only when the following conditions are met: - The previous I3C device correctly returns a PID and ACKs an I3C address. - A NACK is received when emitting 7E to try to get the next I3C device's PID. In all other cases, a manual STOP emission is needed. The code is changed to emit STOP when break the while loop and 'return 0' only when the hardware can auto emit STOP. Signed-off-by: Frank Li Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20240702223107.403057-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit a0d48ebf39cee74f3832d42126b6ddf4497fc07c Author: Aniket Date: Fri Jun 28 15:46:18 2024 +0000 i3c: dw: Add optional apb clock Besides the core clock, IP also has an apb interface clock. Add an optional hook for the same. Signed-off-by: Aniket Link: https://lore.kernel.org/r/20240628154618.327151-1-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit 54f5079e0dfcce2886178382ee9f03f35cc28325 Author: Aniket Date: Fri Jun 28 15:46:03 2024 +0000 i3c: dw: Use new *_enabled clk API Move to "enabled" variant of clk_get API. It takes care of enable and disable calls during the probe and remove. Signed-off-by: Aniket Link: https://lore.kernel.org/r/20240628154603.326075-1-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit 71134c13ac59fcadbfe39b8f9022a37266c4ed5a Author: Aniket Date: Fri Jun 28 15:45:26 2024 +0000 dt-bindings: i3c: dw: Add apb clock binding Add dt binding for optional apb clock. Core clock is mandatory. Signed-off-by: Aniket Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240628154526.324068-1-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit 48a6dcdafdbe7b9596ac6ecbecc347c2e2413f81 Author: Chen Ni Date: Tue Jul 2 10:47:58 2024 +0800 i3c: master: svc: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20240702024758.1411569-1-nichen@iscas.ac.cn Signed-off-by: Alexandre Belloni commit 4642f7eddb75efb5944ff21e5340ccce66928ff1 Author: Jarkko Nikula Date: Fri Jun 28 16:15:59 2024 +0300 i3c: mipi-i3c-hci: Round IBI data chunk size to HW supported value The dma.c: hci_dma_init() sets the CHUNK_SIZE field in the IBI_SETUP register incorrectly if the calculated ibi_chunk_sz is not exactly 2^(n+2) bytes, where n is 0..6. Fix this by rounding the chunk size up to nearest 2^(n+2) bytes. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20240628131559.502822-4-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 8a2be2f1db268ec735419e53ef04ca039fc027dc Author: Jarkko Nikula Date: Fri Jun 28 16:15:58 2024 +0300 i3c: mipi-i3c-hci: Error out instead on BUG_ON() in IBI DMA setup Definitely condition dma_get_cache_alignment * defined value > 256 during driver initialization is not reason to BUG_ON(). Turn that to graceful error out with -EINVAL. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20240628131559.502822-3-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 2df1de813a5ccbc89c7c831365e9e2c479aea0c3 Author: Jarkko Nikula Date: Fri Jun 28 16:15:57 2024 +0300 i3c: mipi-i3c-hci: Set IBI Status and Data Ring base addresses IBI Status and Data Ring base address registers are not set so HW obviously cannot update those rings after In-Band Interrupt. Set them to already allocated and mapped ring addresses. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20240628131559.502822-2-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 74e931f090a1d1a71d460284e87bd668667b98db Author: Jarkko Nikula Date: Fri Jun 28 16:15:56 2024 +0300 i3c: mipi-i3c-hci: Switch to lower_32_bits()/upper_32_bits() helpers Rather than having own lo32()/hi32() helpers for dealing with 32-bit and 64-bit build targets switch to generic lower_32_bits()/upper_32_bits() helpers. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20240628131559.502822-1-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit d9deb28f700cbe15800f1835da7994a5c6f03928 Author: Aniket Date: Thu Jun 27 03:41:19 2024 +0000 i3c: dw: Remove ibi_capable property Since DW I3C IP master role always supports IBI, we don't need to keep two variants of master ops and select one using this property. Hence remove the code. Signed-off-by: Aniket Link: https://lore.kernel.org/r/20240627034119.3938050-1-aniketmaurya@google.com Signed-off-by: Alexandre Belloni commit 64bf1459080670f05b8bb9c0cd140befd6780b5e Author: Aniket Date: Fri Jun 7 07:20:30 2024 +0000 i3c: dw: Fix IBI intr programming IBI_SIR_REQ_REJECT register is not present if the IP has IC_HAS_IBI_DATA = 1 set. So don't rely on doing read- modify-write op on this register. Instead maintain a variable to store the sir reject mask and use it to set IBI_SIR_REQ_REJECT. Signed-off-by: Aniket Reviewed-by: Jeremy Kerr Signed-off-by: Alexandre Belloni commit 8f2cb0327938c786cede21a542fb538ff243a03a Author: Aniket Date: Tue Jun 11 11:26:50 2024 +0000 i3c: dw: Fix clearing queue thld QUEUE_THLD_CTRL_IBI_STAT_MASK is repeated twice. Replace with QUEUE_THLD_CTRL_IBI_DATA_MASK. Signed-off-by: Aniket Signed-off-by: Alexandre Belloni commit be90ae1ba14a83962b33c4d4c854ef081186b0e4 Author: Jarkko Nikula Date: Fri Jun 14 17:02:08 2024 +0300 i3c: mipi-i3c-hci: Fix number of DAT/DCT entries for HCI versions < 1.1 I was wrong about the TABLE_SIZE field description in the commit 0676bfebf576 ("i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes"). For the MIPI I3C HCI versions 1.0 and earlier the TABLE_SIZE field in the registers DAT_SECTION_OFFSET and DCT_SECTION_OFFSET is indeed defined in DWORDs and not number of entries like it is defined in later versions. Where above fix allowed driver initialization to continue the wrongly interpreted TABLE_SIZE field leads variables DAT_entries being twice and DCT_entries four times as big as they really are. That in turn leads clearing the DAT table over the boundary in the dat_v1.c: hci_dat_v1_init(). So interprete the TABLE_SIZE field in DWORDs for HCI versions < 1.1 and fix number of DAT/DCT entries accordingly. Fixes: 0676bfebf576 ("i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes") Signed-off-by: Jarkko Nikula Signed-off-by: Alexandre Belloni commit 9bc7501b0b90f4d0c34b97c14ff1f708ce7ad8f3 Author: Frank Li Date: Mon Jun 3 11:15:27 2024 -0400 i3c: master: svc: resend target address when get NACK According to I3C Spec 1.1.1, 11-Jun-2021, section: 5.1.2.2.3: If the Controller chooses to start an I3C Message with an I3C Dynamic Address, then special provisions shall be made because that same I3C Target may be initiating an IBI or a Controller Role Request. So, one of three things may happen: (skip 1, 2) 3. The Addresses match and the RnW bits also match, and so neither Controller nor Target will ACK since both are expecting the other side to provide ACK. As a result, each side might think it had "won" arbitration, but neither side would continue, as each would subsequently see that the other did not provide ACK. ... For either value of RnW: Due to the NACK, the Controller shall defer the Private Write or Private Read, and should typically transmit the Target ^^^^^^^^^^^^^^^^^^^ Address again after a Repeated START (i.e., the next one or any one prior ^^^^^^^^^^^^^ to a STOP in the Frame). Since the Address Header following a Repeated START is not arbitrated, the Controller will always win (see Section 5.1.2.2.4). Resend target address again if address is not 7E and controller get NACK. Reviewed-by: Miquel Raynal Signed-off-by: Frank Li Signed-off-by: Alexandre Belloni commit 14e9283fb22d0d259820a5f05c6059678bab9ac5 Author: Chen Ni Date: Wed Jul 24 10:07:21 2024 +0800 erofs: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20240724020721.2389738-1-nichen@iscas.ac.cn Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 5d3bb77e5fce1d224b94da31abae0a7afed54735 Author: Gao Xiang Date: Tue Jul 23 15:30:24 2024 +0800 erofs: support multi-page folios for erofs_bread() If the requested page is part of the previous multi-page folio, there is no need to call read_mapping_folio() again. Also, get rid of the remaining one of page->index [1] in our codebase. [1] https://lore.kernel.org/r/Zp8fgUSIBGQ1TN0D@casper.infradead.org Cc: Matthew Wilcox Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240723073024.875290-1-hsiangkao@linux.alibaba.com commit 684b290abc774202ff88897648f24520f40c916b Author: Huang Xiaojia Date: Sat Jul 20 16:23:35 2024 +0800 erofs: add support for FS_IOC_GETFSSYSFSPATH FS_IOC_GETFSSYSFSPATH ioctl exposes /sys/fs path of a given filesystem, potentially standarizing sysfs reporting. This patch add support for FS_IOC_GETFSSYSFSPATH for erofs, "erofs/" will be outputted for bdev cases, "erofs/[domain_id,]" will be outputted for fscache cases. Signed-off-by: Huang Xiaojia Link: https://lore.kernel.org/r/20240720082335.441563-1-huangxiaojia2@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 7dc5537c3f8be87e005f0844a7626c987914f8fd Author: Gao Xiang Date: Mon Jul 22 11:51:10 2024 +0800 erofs: fix race in z_erofs_get_gbuf() In z_erofs_get_gbuf(), the current task may be migrated to another CPU between `z_erofs_gbuf_id()` and `spin_lock(&gbuf->lock)`. Therefore, z_erofs_put_gbuf() will trigger the following issue which was found by stress test: <2>[772156.434168] kernel BUG at fs/erofs/zutil.c:58! .. <4>[772156.435007] <4>[772156.439237] CPU: 0 PID: 3078 Comm: stress Kdump: loaded Tainted: G E 6.10.0-rc7+ #2 <4>[772156.439239] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 1.0.0 01/01/2017 <4>[772156.439241] pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) <4>[772156.439243] pc : z_erofs_put_gbuf+0x64/0x70 [erofs] <4>[772156.439252] lr : z_erofs_lz4_decompress+0x600/0x6a0 [erofs] .. <6>[772156.445958] stress (3127): drop_caches: 1 <4>[772156.446120] Call trace: <4>[772156.446121] z_erofs_put_gbuf+0x64/0x70 [erofs] <4>[772156.446761] z_erofs_lz4_decompress+0x600/0x6a0 [erofs] <4>[772156.446897] z_erofs_decompress_queue+0x740/0xa10 [erofs] <4>[772156.447036] z_erofs_runqueue+0x428/0x8c0 [erofs] <4>[772156.447160] z_erofs_readahead+0x224/0x390 [erofs] .. Fixes: f36f3010f676 ("erofs: rename per-CPU buffers to global buffer pool and make it configurable") Cc: # 6.10+ Reviewed-by: Chunhai Guo Reviewed-by: Sandeep Dhavale Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240722035110.3456740-1-hsiangkao@linux.alibaba.com commit 9c421ef3f6b30ab912eaaa3c3d20cfb921fd8c8f Author: Hongbo Li Date: Thu Jul 18 16:32:43 2024 +0800 erofs: support STATX_DIOALIGN Add support for STATX_DIOALIGN to EROFS, so that direct I/O alignment restrictions are exposed to userspace in a generic way. [Before] ``` ./statx_test /mnt/erofs/testfile statx(/mnt/erofs/testfile) = 0 dio mem align:0 dio offset align:0 ``` [After] ``` ./statx_test /mnt/erofs/testfile statx(/mnt/erofs/testfile) = 0 dio mem align:512 dio offset align:512 ``` Signed-off-by: Hongbo Li Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240718083243.2485437-1-hsiangkao@linux.alibaba.com commit a47f3320bb4ba6714abe8dddb36399367b491358 Author: Johan Hovold Date: Tue Jul 9 09:31:32 2024 +0200 wifi: ath12k: fix soft lockup on suspend The ext interrupts are enabled when the firmware has been started, but this may never happen, for example, if the board configuration file is missing. When the system is later suspended, the driver unconditionally tries to disable interrupts, which results in an irq disable imbalance and causes the driver to spin indefinitely in napi_synchronize(). Make sure that the interrupts have been enabled before attempting to disable them. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Cc: stable@vger.kernel.org # 6.3 Signed-off-by: Johan Hovold Acked-by: Jeff Johnson Link: https://patch.msgid.link/20240709073132.9168-1-johan+linaro@kernel.org Signed-off-by: Johannes Berg commit 6557a28f3e3a54cff4f0dcdd1dfa649b26557ab3 Author: Sean Wang Date: Thu Jul 18 16:46:33 2024 -0700 wifi: mt76: mt7921: fix null pointer access in mt792x_mac_link_bss_remove Fix null pointer access in mt792x_mac_link_bss_remove. To prevent null pointer access, we should assign the vif to bss_conf in mt7921_add_interface. This ensures that subsequent operations on the BSS can properly reference the correct vif. [ T843] Call Trace: [ T843] [ T843] ? __die+0x1e/0x60 [ T843] ? page_fault_oops+0x157/0x450 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? search_bpf_extables+0x5a/0x80 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? exc_page_fault+0x2bb/0x670 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? lock_timer_base+0x71/0x90 [ T843] ? asm_exc_page_fault+0x26/0x30 [ T843] ? mt792x_mac_link_bss_remove+0x24/0x110 [mt792x_lib] [ T843] ? mt792x_remove_interface+0x6e/0x90 [mt792x_lib] [ T843] ? ieee80211_do_stop+0x507/0x7e0 [mac80211] [ T843] ? ieee80211_stop+0x53/0x190 [mac80211] [ T843] ? __dev_close_many+0xa5/0x120 [ T843] ? __dev_change_flags+0x18c/0x220 [ T843] ? dev_change_flags+0x21/0x60 [ T843] ? do_setlink+0xdf9/0x11d0 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? security_sock_rcv_skb+0x33/0x50 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? __nla_validate_parse+0x61/0xd10 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? genl_done+0x53/0x80 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? netlink_dump+0x357/0x410 [ T843] ? __rtnl_newlink+0x5d6/0x980 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? genl_family_rcv_msg_dumpit+0xdf/0xf0 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? __kmalloc_cache_noprof+0x44/0x210 [ T843] ? rtnl_newlink+0x42/0x60 [ T843] ? rtnetlink_rcv_msg+0x152/0x3f0 [ T843] ? mptcp_pm_nl_dump_addr+0x180/0x180 [ T843] ? rtnl_calcit.isra.0+0x130/0x130 [ T843] ? netlink_rcv_skb+0x56/0x100 [ T843] ? netlink_unicast+0x199/0x290 [ T843] ? netlink_sendmsg+0x21d/0x490 [ T843] ? __sock_sendmsg+0x78/0x80 [ T843] ? ____sys_sendmsg+0x23f/0x2e0 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? copy_msghdr_from_user+0x68/0xa0 [ T843] ? ___sys_sendmsg+0x81/0xd0 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? crng_fast_key_erasure+0xbc/0xf0 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? get_random_bytes_user+0x126/0x140 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? __fdget+0xb1/0xe0 [ T843] ? __sys_sendmsg+0x56/0xa0 [ T843] ? srso_alias_return_thunk+0x5/0xfbef5 [ T843] ? do_syscall_64+0x5f/0x170 [ T843] ? entry_SYSCALL_64_after_hwframe+0x55/0x5d [ T843] Fixes: 1541d63c5fe2 ("wifi: mt76: mt7925: add mt7925_mac_link_bss_remove to remove per-link BSS") Reported-by: Bert Karwatzki Closes: https://lore.kernel.org/linux-wireless/2fee61f8c903d02a900ca3188c3742c7effd102e.camel@web.de/#b Signed-off-by: Sean Wang Tested-by: Bert Karwatzki Link: https://patch.msgid.link/20240718234633.12737-1-sean.wang@kernel.org Signed-off-by: Johannes Berg commit 189d7aae8f5a100b0db8b302debbd445475d01e6 Author: Baochen Qiang Date: Mon Jul 22 11:33:32 2024 +0800 wifi: ath12k: fix reusing outside iterator in ath12k_wow_vif_set_wakeups() Smatch throws below warning: drivers/net/wireless/ath/ath12k/wow.c:434 ath12k_wow_vif_set_wakeups() warn: reusing outside iterator: 'i' drivers/net/wireless/ath/ath12k/wow.c 411 default: 412 break; 413 } 414 415 for (i = 0; i < wowlan->n_patterns; i++) { ^^^^^^^^^^^^^^^^^^^^^^ Here we loop until ->n_patterns 416 const struct cfg80211_pkt_pattern *eth_pattern = &patterns[i]; 417 struct ath12k_pkt_pattern new_pattern = {}; 418 419 if (WARN_ON(eth_pattern->pattern_len > WOW_MAX_PATTERN_SIZE)) 420 return -EINVAL; 421 422 if (ar->ab->wow.wmi_conf_rx_decap_mode == 423 ATH12K_HW_TXRX_NATIVE_WIFI) { 424 ath12k_wow_convert_8023_to_80211(ar, eth_pattern, 425 &new_pattern); 426 427 if (WARN_ON(new_pattern.pattern_len > WOW_MAX_PATTERN_SIZE)) 428 return -EINVAL; 429 } else { 430 memcpy(new_pattern.pattern, eth_pattern->pattern, 431 eth_pattern->pattern_len); 432 433 /* convert bitmask to bytemask */ --> 434 for (i = 0; i < eth_pattern->pattern_len; i++) 435 if (eth_pattern->mask[i / 8] & BIT(i % 8)) 436 new_pattern.bytemask[i] = 0xff; This loop re-uses i and the loop ends with i == eth_pattern->pattern_len. This looks like a bug. Change to use a new iterator 'j' for the inner loop to fix it. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Fixes: 4a3c212eee0e ("wifi: ath12k: add basic WoW functionalities") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/d4975b95-9c43-45af-a0ab-80253f18c7f2@stanley.mountain/ Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Link: https://patch.msgid.link/20240722033332.6273-1-quic_bqiang@quicinc.com Signed-off-by: Johannes Berg commit 6873cc4416078202882691b424fcca5b5fb1a94d Author: Johannes Berg Date: Wed Jul 24 13:29:12 2024 +0200 wifi: cfg80211: correct S1G beacon length calculation The minimum header length calculation (equivalent to the start of the elements) for the S1G long beacon erroneously required only up to the start of u.s1g_beacon rather than the start of u.s1g_beacon.variable. Fix that, and also shuffle the branches around a bit to not assign useless values that are overwritten later. Reported-by: syzbot+0f3afa93b91202f21939@syzkaller.appspotmail.com Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results") Link: https://patch.msgid.link/20240724132912.9662972db7c1.I8779675b5bbda4994cc66f876b6b87a2361c3c0b@changeid Signed-off-by: Johannes Berg commit baeaabf970b9a90999f62ae27edf63f6cb86c023 Author: Veerendranath Jakkam Date: Wed Jul 24 18:23:27 2024 +0530 wifi: cfg80211: fix reporting failed MLO links status with cfg80211_connect_done Individual MLO links connection status is not copied to EVENT_CONNECT_RESULT data while processing the connect response information in cfg80211_connect_done(). Due to this failed links are wrongly indicated with success status in EVENT_CONNECT_RESULT. To fix this, copy the individual MLO links status to the EVENT_CONNECT_RESULT data. Fixes: 53ad07e9823b ("wifi: cfg80211: support reporting failed links") Signed-off-by: Veerendranath Jakkam Reviewed-by: Carlos Llamas Link: https://patch.msgid.link/20240724125327.3495874-1-quic_vjakkam@quicinc.com [commit message editorial changes] Signed-off-by: Johannes Berg commit 8f4fa0876231c426f880a2bff25ac49fac67d805 Author: Johannes Berg Date: Thu Jul 25 18:48:36 2024 +0200 wifi: mac80211: use monitor sdata with driver only if desired In commit 0d9c2beed116 ("wifi: mac80211: fix monitor channel with chanctx emulation") I changed mac80211 to always have an internal monitor_sdata to have something to have the chanctx bound to. However, if the driver didn't also have the WANT_MONITOR flag this would cause mac80211 to allocate it without telling the driver (which was intentional) but also use it for later APIs to the driver without it ever having known about it which was _not_ intentional. Check through the code and only use the monitor_sdata in the relevant places (TX, MU-MIMO follow settings, TX power, and interface iteration) when the WANT_MONITOR flag is set. Cc: stable@vger.kernel.org Fixes: 0d9c2beed116 ("wifi: mac80211: fix monitor channel with chanctx emulation") Reported-by: ZeroBeat Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219086 Tested-by: Lorenzo Bianconi Link: https://patch.msgid.link/20240725184836.25d334157a8e.I02574086da2c5cf0e18264ce5807db6f14ffd9c0@changeid Signed-off-by: Johannes Berg commit 2191a54f63225b548fd8346be3611c3219a24738 Author: Eric Dumazet Date: Thu Jul 25 09:27:45 2024 +0000 sched: act_ct: take care of padding in struct zones_ht_key Blamed commit increased lookup key size from 2 bytes to 16 bytes, because zones_ht_key got a struct net pointer. Make sure rhashtable_lookup() is not using the padding bytes which are not initialized. BUG: KMSAN: uninit-value in rht_ptr_rcu include/linux/rhashtable.h:376 [inline] BUG: KMSAN: uninit-value in __rhashtable_lookup include/linux/rhashtable.h:607 [inline] BUG: KMSAN: uninit-value in rhashtable_lookup include/linux/rhashtable.h:646 [inline] BUG: KMSAN: uninit-value in rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline] BUG: KMSAN: uninit-value in tcf_ct_flow_table_get+0x611/0x2260 net/sched/act_ct.c:329 rht_ptr_rcu include/linux/rhashtable.h:376 [inline] __rhashtable_lookup include/linux/rhashtable.h:607 [inline] rhashtable_lookup include/linux/rhashtable.h:646 [inline] rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline] tcf_ct_flow_table_get+0x611/0x2260 net/sched/act_ct.c:329 tcf_ct_init+0xa67/0x2890 net/sched/act_ct.c:1408 tcf_action_init_1+0x6cc/0xb30 net/sched/act_api.c:1425 tcf_action_init+0x458/0xf00 net/sched/act_api.c:1488 tcf_action_add net/sched/act_api.c:2061 [inline] tc_ctl_action+0x4be/0x19d0 net/sched/act_api.c:2118 rtnetlink_rcv_msg+0x12fc/0x1410 net/core/rtnetlink.c:6647 netlink_rcv_skb+0x375/0x650 net/netlink/af_netlink.c:2550 rtnetlink_rcv+0x34/0x40 net/core/rtnetlink.c:6665 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0xf52/0x1260 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x10da/0x11e0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x30f/0x380 net/socket.c:745 ____sys_sendmsg+0x877/0xb60 net/socket.c:2597 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2651 __sys_sendmsg net/socket.c:2680 [inline] __do_sys_sendmsg net/socket.c:2689 [inline] __se_sys_sendmsg net/socket.c:2687 [inline] __x64_sys_sendmsg+0x307/0x4a0 net/socket.c:2687 x64_sys_call+0x2dd6/0x3c10 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 Local variable key created at: tcf_ct_flow_table_get+0x4a/0x2260 net/sched/act_ct.c:324 tcf_ct_init+0xa67/0x2890 net/sched/act_ct.c:1408 Fixes: 88c67aeb1407 ("sched: act_ct: add netns into the key of tcf_ct_flow_table") Reported-by: syzbot+1b5e4e187cc586d05ea0@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Xin Long Reviewed-by: Simon Horman Reviewed-by: Xin Long Signed-off-by: David S. Miller commit 08f3a5c38087d1569e982a121aad1e6acbf145ce Author: Ma Ke Date: Thu Jul 25 10:29:42 2024 +0800 net: usb: sr9700: fix uninitialized variable use in sr_mdio_read It could lead to error happen because the variable res is not updated if the call to sr_share_read_word returns an error. In this particular case error code was returned and res stayed uninitialized. Same issue also applies to sr_read_reg. This can be avoided by checking the return value of sr_share_read_word and sr_read_reg, and propagating the error if the read operation failed. Found by code review. Cc: stable@vger.kernel.org Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support") Signed-off-by: Ma Ke Reviewed-by: Shigeru Yoshida Reviewed-by: Hariprasad Kelam Signed-off-by: David S. Miller commit 0823dc64586ba5ea13a7d200a5d33e4c5fa45950 Author: Jason Wang Date: Mon Jul 1 11:31:59 2024 +0800 vhost-vdpa: switch to use vmf_insert_pfn() in the fault handler remap_pfn_page() should not be called in the fault handler as it may change the vma->flags which may trigger lockdep warning since the vma write lock is not held. Actually there's no need to modify the vma->flags as it has been set in the mmap(). So this patch switches to use vmf_insert_pfn() instead. Reported-by: Dragos Tatulea Tested-by: Dragos Tatulea Fixes: ddd89d0a059d ("vhost_vdpa: support doorbell mapping via mmap") Cc: stable@vger.kernel.org Signed-off-by: Jason Wang Message-Id: <20240701033159.18133-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Michal Kubiak commit 75c3e8a26a35d4f3eee299b3cc7e465f166f4e2d Author: Ian Forbes Date: Mon Jun 24 15:59:51 2024 -0500 drm/vmwgfx: Trigger a modeset when the screen moves When multi-monitor is cycled the X,Y position of the Screen Target will likely change but the resolution will not. We need to trigger a modeset when this occurs in order to recreate the Screen Target with the correct X,Y position. Fixes a bug where multiple displays are shown in a single scrollable host window rather than in 2+ windows on separate host displays. Fixes: 426826933109 ("drm/vmwgfx: Filter modes which exceed graphics memory") Signed-off-by: Ian Forbes Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20240624205951.23343-1-ian.forbes@broadcom.com commit d4ef5d2b7ee0cbb5f2d864716140366a618400d6 Merge: 86f259cb7ca13 5659b0c93a1ea Author: Dave Airlie Date: Fri Jul 26 09:51:59 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-07-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.11-2024-07-25: amdgpu: - SDMA 5.2 workaround - GFX12 fixes - Uninitialized variable fix - VCN/JPEG 4.0.3 fixes - Misc display fixes - RAS fixes - VCN4/5 harvest fix - GPU reset fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240725202900.2155572-1-alexander.deucher@amd.com commit 86f259cb7ca13a7b0a4b9314f01668118c2aba59 Merge: a37cd98cd56e2 b6f7d984ebf82 Author: Dave Airlie Date: Fri Jul 26 09:51:10 2024 +1000 Merge tag 'drm-misc-next-fixes-2024-07-25' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next A single fix for a panel compatible Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240725-frisky-wren-of-tact-f5f504@houat commit 07c10cff663e54dadff7cfb6cf09e266456ed073 Merge: 98ba1d931f611 f96aae91b0d26 Author: Jakub Kicinski Date: Thu Jul 25 16:23:49 2024 -0700 Merge branch 'ethtool-rss-small-fixes-to-spec-and-get' Jakub Kicinski says: ==================== ethtool: rss: small fixes to spec and GET Two small fixes to the ethtool RSS_GET over Netlink. Spec is a bit inaccurate and responses miss an identifier. ==================== Link: https://patch.msgid.link/20240724234249.2621109-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f96aae91b0d260f682e630e092ef70a05a718a43 Author: Jakub Kicinski Date: Wed Jul 24 16:42:49 2024 -0700 ethtool: rss: echo the context number back The response to a GET request in Netlink should fully identify the queried object. RSS_GET accepts context id as an input, so it must echo that attribute back to the response. After (assuming context 1 has been created): $ ./cli.py --spec netlink/specs/ethtool.yaml \ --do rss-get \ --json '{"header": {"dev-index": 2}, "context": 1}' {'context': 1, 'header': {'dev-index': 2, 'dev-name': 'eth0'}, [...] Fixes: 7112a04664bf ("ethtool: add netlink based get rss support") Acked-by: Paolo Abeni Reviewed-by: Joe Damato Link: https://patch.msgid.link/20240724234249.2621109-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a40c7a24f97edda025f53cfe8f0bc6a6e3c12fa6 Author: Jakub Kicinski Date: Wed Jul 24 16:42:48 2024 -0700 netlink: specs: correct the spec of ethtool The spec for Ethtool is a bit inaccurate. We don't currently support dump. Context is only accepted as input and not echoed to output (which is a separate bug). Fixes: a353318ebf24 ("tools: ynl: populate most of the ethtool spec") Acked-by: Paolo Abeni Reviewed-by: Joe Damato Link: https://patch.msgid.link/20240724234249.2621109-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 98ba1d931f611e8f8f519c0405fa0a1a76554bfa Author: Pavan Chebbi Date: Wed Jul 24 15:21:06 2024 -0700 bnxt_en: Fix RSS logic in __bnxt_reserve_rings() In __bnxt_reserve_rings(), the existing code unconditionally sets the default RSS indirection table to default if netif_is_rxfh_configured() returns false. This used to be correct before we added RSS contexts support. For example, if the user is changing the number of ethtool channels, we will enter this path to reserve the new number of rings. We will then set the RSS indirection table to default to cover the new number of rings if netif_is_rxfh_configured() is false. Now, with RSS contexts support, if the user has added or deleted RSS contexts, we may now enter this path to reserve the new number of VNICs. However, netif_is_rxfh_configured() will not return the correct state if we are still in the middle of set_rxfh(). So the existing code may set the indirection table of the default RSS context to default by mistake. Fix it to check if the reservation of the RX rings is changing. Only check netif_is_rxfh_configured() if it is changing. RX rings will not change in the middle of set_rxfh() and this will fix the issue. Fixes: b3d0083caf9a ("bnxt_en: Support RSS contexts in ethtool .{get|set}_rxfh()") Reported-and-tested-by: Jakub Kicinski Link: https://lore.kernel.org/20240625010210.2002310-1-kuba@kernel.org Reviewed-by: Andy Gospodarek Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://patch.msgid.link/20240724222106.147744-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit de9f46cb0044a9b9f825d7695ae235863461dc00 Author: Filipe Manana Date: Thu Jul 11 13:33:23 2024 +0100 btrfs: fix corrupt read due to bad offset of a compressed extent map If we attempt to insert a compressed extent map that has a range that overlaps another extent map we have in the inode's extent map tree, we can end up with an incorrect offset after adjusting the new extent map at merge_extent_mapping() because we don't update the extent map's offset. For example consider the following scenario: 1) We have a file extent item for a compressed extent covering the file range [108K, 144K) and currently there's no corresponding extent map in the inode's extent map tree; 2) The inode's size is 141K; 3) We have an encoded write (compressed) into the file range [120K, 128K), which overlaps the existing file extent item. The encoded write creates a matching extent map, adds it to the inode's extent map tree and creates an ordered extent for it. Note that the corresponding file extent item is added to the subvolume tree only when the ordered extent completes (when executing btrfs_finish_one_ordered()); 4) We have a write into the file range [160K, 164K). This writes increases the i_size of the file, and there's a hole between the current i_size (141K) and the start offset of this write, and since the old i_size is in the middle of the block [140K, 144K), we have to write zeroes to the range [141K, 144K) (3072 bytes) and therefore dirty that page. We then call btrfs_set_extent_delalloc() with a start offset of 140K. We then end up at btrfs_find_new_delalloc_bytes() which will call btrfs_get_extent() for the range [140K, 144K); 5) The btrfs_get_extent() doesn't find any extent map in the inode's extent map tree covering the range [140K, 144K), so it searches the subvolume tree for any file extent items covering that range. There it finds the file extent item for the range [108K, 144K), creates a compressed extent map for that range and then calls btrfs_add_extent_mapping() with that extent map and passes the range [140K, 144K) via the "start" and "len" parameters; 6) The call to add_extent_mapping() done by btrfs_add_extent_mapping() fails with -EEXIST because there's an extent map, created at step 2 for the [120K, 128K) range, that covers that overlaps with the range of the given extent map ([108K, 144K)). Then it does a lookup for extent map from step 2 add calls merge_extent_mapping() to adjust the input extent map ([108K, 144K)). That adjust the extent map to a start offset of 128K and a length of 16K (starting just after the extent map from step 2), but it does not update the offset field of the extent map, leaving it with a value of zero instead of updating to a value of 20K (128K - 108K = 20K). As a result any read for the range [128K, 144K) can return incorrect data since we read from a wrong section of the extent (unless both the correct and incorrect ranges happen to have the same data). So fix this by changing merge_extent_mapping() to update the extent map's offset even if it's compressed. Also add a test case to the self tests. This didn't happen before the patchset that does big changes in the extent map structure (which includes the commit in the Fixes tag below) because we kept track of the original start offset in the extent map (member "orig_start") so we could always calculate the correct offset by subtracting that offset from the start offset. A test case for fstests that triggered this problem using send/receive with compressed writes will be added soon. Fixes: 3d2ac9922465 ("btrfs: introduce new members for extent_map") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit f333a3c7e8323499aa65038e77fe8f3199d4e283 Author: Qu Wenruo Date: Mon Jul 15 16:07:07 2024 +0930 btrfs: tree-checker: validate dref root and objectid [CORRUPTION] There is a bug report that btrfs flips RO due to a corruption in the extent tree, the involved dumps looks like this: item 188 key (402811572224 168 4096) itemoff 14598 itemsize 79 extent refs 3 gen 3678544 flags 1 ref#0: extent data backref root 13835058055282163977 objectid 281473384125923 offset 81432576 count 1 ref#1: shared data backref parent 1947073626112 count 1 ref#2: shared data backref parent 1156030103552 count 1 BTRFS critical (device vdc1: state EA): unable to find ref byte nr 402811572224 parent 0 root 265 owner 28703026 offset 81432576 slot 189 BTRFS error (device vdc1: state EA): failed to run delayed ref for logical 402811572224 num_bytes 4096 type 178 action 2 ref_mod 1: -2 [CAUSE] The corrupted entry is ref#0 of item 188. The root number 13835058055282163977 is beyond the upper limit for root items (the current limit is 1 << 48), and the objectid also looks suspicious. Only the offset and count is correct. [ENHANCEMENT] Although it's still unknown why we have such many bytes corrupted randomly, we can still enhance the tree-checker for data backrefs by: - Validate the root value For now there should only be 3 types of roots can have data backref: * subvolume trees * data reloc trees * root tree Only for v1 space cache - validate the objectid value The objectid should be a valid inode number. Hopefully we can catch such problem in the future with the new checkers. Reported-by: Kai Krakow Link: https://lore.kernel.org/linux-btrfs/CAMthOuPjg5RDT-G_LXeBBUUtzt3cq=JywF+D1_h+JYxe=WKp-Q@mail.gmail.com/#t Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a37cd98cd56e2c53d77d9c45cd4b7b3d91916df7 Merge: 627a24f5f25d6 26720dd2b5a1d Author: Dave Airlie Date: Fri Jul 26 06:41:02 2024 +1000 Merge tag 'drm-intel-next-fixes-2024-07-25' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next - Do not consider preemption during execlists_dequeue for gen8 [gt] (Nitin Gote) - Allow NULL memory region (Jonathan Cavitt) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/ZqICQzyzm/6hDWy4@linux commit 1722389b0d863056d78287a120a1d6cadb8d4f7b Merge: 8bf100092d60b af65ea42bd1d2 Author: Linus Torvalds Date: Thu Jul 25 13:32:25 2024 -0700 Merge tag 'net-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf and netfilter. A lot of networking people were at a conference last week, busy catching COVID, so relatively short PR. Current release - regressions: - tcp: process the 3rd ACK with sk_socket for TFO and MPTCP Current release - new code bugs: - l2tp: protect session IDR and tunnel session list with one lock, make sure the state is coherent to avoid a warning - eth: bnxt_en: update xdp_rxq_info in queue restart logic - eth: airoha: fix location of the MBI_RX_AGE_SEL_MASK field Previous releases - regressions: - xsk: require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len, the field reuses previously un-validated pad Previous releases - always broken: - tap/tun: drop short frames to prevent crashes later in the stack - eth: ice: add a per-VF limit on number of FDIR filters - af_unix: disable MSG_OOB handling for sockets in sockmap/sockhash" * tag 'net-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (34 commits) tun: add missing verification for short frame tap: add missing verification for short frame mISDN: Fix a use after free in hfcmulti_tx() gve: Fix an edge case for TSO skb validity check bnxt_en: update xdp_rxq_info in queue restart logic tcp: process the 3rd ACK with sk_socket for TFO/MPTCP selftests/bpf: Add XDP_UMEM_TX_METADATA_LEN to XSK TX metadata test xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len bpf: Fix a segment issue when downgrading gso_size net: mediatek: Fix potential NULL pointer dereference in dummy net_device handling MAINTAINERS: make Breno the netconsole maintainer MAINTAINERS: Update bonding entry net: nexthop: Initialize all fields in dumped nexthops net: stmmac: Correct byte order of perfect_match selftests: forwarding: skip if kernel not support setting bridge fdb learning limit tipc: Return non-zero value from tipc_udp_addr2str() on error netfilter: nft_set_pipapo_avx2: disable softinterrupts ice: Fix recipe read procedure ice: Add a per-VF limit on number of FDIR filters net: bonding: correctly annotate RCU in bond_should_notify_peers() ... commit 8bf100092d60bf586bbc1a3a2cd833bb212d9d53 Merge: b485625078cab a930fde94ae5f Author: Linus Torvalds Date: Thu Jul 25 13:18:41 2024 -0700 Merge tag 'printk-for-6.11-trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - trivial printk changes The bigger "real" printk work is still being discussed. * tag 'printk-for-6.11-trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: vsprintf: add missing MODULE_DESCRIPTION() macro printk: Rename console_replay_all() and update context commit b485625078cab3b824a84ce185b6e73733704b5b Merge: bba959f477f2f 78eb4ea25cd5f Author: Linus Torvalds Date: Thu Jul 25 12:58:36 2024 -0700 Merge tag 'constfy-sysctl-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl Pull sysctl constification from Joel Granados: "Treewide constification of the ctl_table argument of proc_handlers using a coccinelle script and some manual code formatting fixups. This is a prerequisite to moving the static ctl_table structs into read-only data section which will ensure that proc_handler function pointers cannot be modified" * tag 'constfy-sysctl-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: sysctl: treewide: constify the ctl_table argument of proc_handlers commit bba959f477f2f4a48ab72eda2902db706bbc3793 Merge: 9b21993654871 ae835a96d72cd Author: Linus Torvalds Date: Thu Jul 25 12:55:21 2024 -0700 Merge tag 'efi-fixes-for-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: - Wipe screen_info after allocating it from the heap - used by arm32 and EFI zboot, other EFI architectures allocate it statically - Revert to allocating boot_params from the heap on x86 when entering via the native PE entrypoint, to work around a regression on older Dell hardware * tag 'efi-fixes-for-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: x86/efistub: Revert to heap allocated boot_params for PE entrypoint efi/libstub: Zero initialize heap allocated struct screen_info commit 9b21993654871eda57dfeeee4739fea797a50b1e Merge: 28e7241cb8574 9bccbe7b20876 Author: Linus Torvalds Date: Thu Jul 25 12:48:42 2024 -0700 Merge tag 'kgdb-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "Three small changes this cycle: - Clean up an architecture abstraction that is no longer needed because all the architectures have converged. - Actually use the prompt argument to kdb_position_cursor() instead of ignoring it (functionally this fix is a nop but that was due to luck rather than good judgement) - Fix a -Wformat-security warning" * tag 'kgdb-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Get rid of redundant kdb_curr_task() kdb: Use the passed prompt in kdb_position_cursor() kdb: address -Wformat-security warnings commit 28e7241cb857415fbc8d8d962e2b423c3842e9f9 Merge: f6464295247dd 2c716cf17edee Author: Linus Torvalds Date: Thu Jul 25 12:41:53 2024 -0700 Merge tag 'mips_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - Use improved timer sync for Loongson64 - Fix address of GCR_ACCESS register - Add missing MODULE_DESCRIPTION * tag 'mips_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: sibyte: add missing MODULE_DESCRIPTION() macro MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later MIPS: Loongson64: Switch to SYNC_R4K commit f6464295247dd04b2070e110f0d5659577e393b9 Merge: f9bcc61ad1fbe cbade823342cd Author: Linus Torvalds Date: Thu Jul 25 12:37:42 2024 -0700 Merge tag 'parisc-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "The gettimeofday() and clock_gettime() syscalls are now available as vDSO functions, and Dave added a patch which allows to use NVMe cards in the PCI slots as fast and easy alternative to SCSI discs. Summary: - add gettimeofday() and clock_gettime() vDSO functions - enable PCI_MSI_ARCH_FALLBACKS to allow PCI to PCIe bridge adaptor with PCIe NVME card to function in parisc machines - allow users to reduce kernel unaligned runtime warnings - minor code cleanups" * tag 'parisc-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Add support for CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN parisc: Use max() to calculate parisc_tlb_flush_threshold parisc: Fix warning at drivers/pci/msi/msi.h:121 parisc: Add 64-bit gettimeofday() and clock_gettime() vDSO functions parisc: Add 32-bit gettimeofday() and clock_gettime() vDSO functions parisc: Clean up unistd.h file commit f9bcc61ad1fbe7dbc6bdd71d31254e429100a009 Merge: c2a96b7f187fb 98ff534ec2cd0 Author: Linus Torvalds Date: Thu Jul 25 12:33:08 2024 -0700 Merge tag 'uml-for-linus-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML updates from Richard Weinberger: - Support for preemption - i386 Rust support - Huge cleanup by Benjamin Berg - UBSAN support - Removal of dead code * tag 'uml-for-linus-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (41 commits) um: vector: always reset vp->opened um: vector: remove vp->lock um: register power-off handler um: line: always fill *error_out in setup_one_line() um: remove pcap driver from documentation um: Enable preemption in UML um: refactor TLB update handling um: simplify and consolidate TLB updates um: remove force_flush_all from fork_handler um: Do not flush MM in flush_thread um: Delay flushing syscalls until the thread is restarted um: remove copy_context_skas0 um: remove LDT support um: compress memory related stub syscalls while adding them um: Rework syscall handling um: Add generic stub_syscall6 function um: Create signal stack memory assignment in stub_data um: Remove stub-data.h include from common-offsets.h um: time-travel: fix signal blocking race/hang um: time-travel: remove time_exit() ... commit c2a96b7f187fb6a455836d4a6e113947ff11de97 Merge: b2eed73360dff b57d5ffc3ab50 Author: Linus Torvalds Date: Thu Jul 25 10:42:22 2024 -0700 Merge tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the big set of driver core changes for 6.11-rc1. Lots of stuff in here, with not a huge diffstat, but apis are evolving which required lots of files to be touched. Highlights of the changes in here are: - platform remove callback api final fixups (Uwe took many releases to get here, finally!) - Rust bindings for basic firmware apis and initial driver-core interactions. It's not all that useful for a "write a whole driver in rust" type of thing, but the firmware bindings do help out the phy rust drivers, and the driver core bindings give a solid base on which others can start their work. There is still a long way to go here before we have a multitude of rust drivers being added, but it's a great first step. - driver core const api changes. This reached across all bus types, and there are some fix-ups for some not-common bus types that linux-next and 0-day testing shook out. This work is being done to help make the rust bindings more safe, as well as the C code, moving toward the end-goal of allowing us to put driver structures into read-only memory. We aren't there yet, but are getting closer. - minor devres cleanups and fixes found by code inspection - arch_topology minor changes - other minor driver core cleanups All of these have been in linux-next for a very long time with no reported problems" * tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits) ARM: sa1100: make match function take a const pointer sysfs/cpu: Make crash_hotplug attribute world-readable dio: Have dio_bus_match() callback take a const * zorro: make match function take a const pointer driver core: module: make module_[add|remove]_driver take a const * driver core: make driver_find_device() take a const * driver core: make driver_[create|remove]_file take a const * firmware_loader: fix soundness issue in `request_internal` firmware_loader: annotate doctests as `no_run` devres: Correct code style for functions that return a pointer type devres: Initialize an uninitialized struct member devres: Fix memory leakage caused by driver API devm_free_percpu() devres: Fix devm_krealloc() wasting memory driver core: platform: Switch to use kmemdup_array() driver core: have match() callback in struct bus_type take a const * MAINTAINERS: add Rust device abstractions to DRIVER CORE device: rust: improve safety comments MAINTAINERS: add Danilo as FIRMWARE LOADER maintainer MAINTAINERS: add Rust FW abstractions to FIRMWARE LOADER firmware: rust: improve safety comments ... commit b2eed73360dffea91ea64e8f19330c950dd42ebb Merge: 9cf601e865198 63d097d46799d Author: Linus Torvalds Date: Thu Jul 25 10:18:35 2024 -0700 Merge tag 'linux-watchdog-6.11-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - make watchdog_class const - rework of the rzg2l_wdt driver - other small fixes and improvements * tag 'linux-watchdog-6.11-rc1' of git://www.linux-watchdog.org/linux-watchdog: dt-bindings: watchdog: dlg,da9062-watchdog: Drop blank space watchdog: rzn1: Convert comma to semicolon watchdog: lenovo_se10_wdt: Convert comma to semicolon dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support watchdog: rzg2l_wdt: Add suspend/resume support watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset watchdog: rzg2l_wdt: Remove comparison with zero watchdog: rzg2l_wdt: Remove reset de-assert from probe watchdog: rzg2l_wdt: Check return status of pm_runtime_put() watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() watchdog: rzg2l_wdt: Make the driver depend on PM watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011 watchdog: imx7ulp_wdt: keep already running watchdog enabled watchdog: starfive: Add missing clk_disable_unprepare() watchdog: Make watchdog_class const commit 9cf601e865198c72e2a53118eaf37dcfd9a6cf1f Merge: c33ffdb70cc6d 28e8b7406d3a1 Author: Linus Torvalds Date: Thu Jul 25 10:10:34 2024 -0700 Merge tag 'dma-mapping-6.11-2024-07-24' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: - fix the order of actions in dmam_free_coherent (Lance Richardson) * tag 'dma-mapping-6.11-2024-07-24' of git://git.infradead.org/users/hch/dma-mapping: dma: fix call order in dmam_free_coherent commit e8b96a66ae01d039699bac256c5b6b30b2284170 Merge: dcfed708742c7 ab53dfdcdd1ec Author: Takashi Iwai Date: Thu Jul 25 18:04:55 2024 +0200 Merge tag 'asoc-fix-v6.11-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.11 A selection of routine fixes and quirks that came in since the merge window. The fsl-asoc-card change is a fix for systems with multiple cards where updating templates in place leaks data from one card to another. commit af65ea42bd1d28d818b74b9b3b4f8da7ada9f88b Merge: 61ab751451f5e 049584807f1d7 Author: Jakub Kicinski Date: Thu Jul 25 08:07:06 2024 -0700 Merge branch 'tap-tun-harden-by-dropping-short-frame' Dongli Zhang says: ==================== tap/tun: harden by dropping short frame This is to harden all of tap/tun to avoid any short frame smaller than the Ethernet header (ETH_HLEN). While the xen-netback already rejects short frame smaller than ETH_HLEN ... 914 static void xenvif_tx_build_gops(struct xenvif_queue *queue, 915 int budget, 916 unsigned *copy_ops, 917 unsigned *map_ops) 918 { ... ... 1007 if (unlikely(txreq.size < ETH_HLEN)) { 1008 netdev_dbg(queue->vif->dev, 1009 "Bad packet size: %d\n", txreq.size); 1010 xenvif_tx_err(queue, &txreq, extra_count, idx); 1011 break; 1012 } ... the short frame may not be dropped by vhost-net/tap/tun. This fixes CVE-2024-41090 and CVE-2024-41091. ==================== Link: https://patch.msgid.link/20240724170452.16837-1-dongli.zhang@oracle.com Signed-off-by: Jakub Kicinski commit 049584807f1d797fc3078b68035450a9769eb5c3 Author: Dongli Zhang Date: Wed Jul 24 10:04:52 2024 -0700 tun: add missing verification for short frame The cited commit missed to check against the validity of the frame length in the tun_xdp_one() path, which could cause a corrupted skb to be sent downstack. Even before the skb is transmitted, the tun_xdp_one-->eth_type_trans() may access the Ethernet header although it can be less than ETH_HLEN. Once transmitted, this could either cause out-of-bound access beyond the actual length, or confuse the underlayer with incorrect or inconsistent header length in the skb metadata. In the alternative path, tun_get_user() already prohibits short frame which has the length less than Ethernet header size from being transmitted for IFF_TAP. This is to drop any frame shorter than the Ethernet header size just like how tun_get_user() does. CVE: CVE-2024-41091 Inspired-by: https://lore.kernel.org/netdev/1717026141-25716-1-git-send-email-si-wei.liu@oracle.com/ Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()") Cc: stable@vger.kernel.org Signed-off-by: Dongli Zhang Reviewed-by: Si-Wei Liu Reviewed-by: Willem de Bruijn Reviewed-by: Paolo Abeni Reviewed-by: Jason Wang Link: https://patch.msgid.link/20240724170452.16837-3-dongli.zhang@oracle.com Signed-off-by: Jakub Kicinski commit ed7f2afdd0e043a397677e597ced0830b83ba0b3 Author: Si-Wei Liu Date: Wed Jul 24 10:04:51 2024 -0700 tap: add missing verification for short frame The cited commit missed to check against the validity of the frame length in the tap_get_user_xdp() path, which could cause a corrupted skb to be sent downstack. Even before the skb is transmitted, the tap_get_user_xdp()-->skb_set_network_header() may assume the size is more than ETH_HLEN. Once transmitted, this could either cause out-of-bound access beyond the actual length, or confuse the underlayer with incorrect or inconsistent header length in the skb metadata. In the alternative path, tap_get_user() already prohibits short frame which has the length less than Ethernet header size from being transmitted. This is to drop any frame shorter than the Ethernet header size just like how tap_get_user() does. CVE: CVE-2024-41090 Link: https://lore.kernel.org/netdev/1717026141-25716-1-git-send-email-si-wei.liu@oracle.com/ Fixes: 0efac27791ee ("tap: accept an array of XDP buffs through sendmsg()") Cc: stable@vger.kernel.org Signed-off-by: Si-Wei Liu Signed-off-by: Dongli Zhang Reviewed-by: Willem de Bruijn Reviewed-by: Paolo Abeni Reviewed-by: Jason Wang Link: https://patch.msgid.link/20240724170452.16837-2-dongli.zhang@oracle.com Signed-off-by: Jakub Kicinski commit 61ab751451f5ebd0b98e02276a44e23a10110402 Author: Dan Carpenter Date: Wed Jul 24 11:08:18 2024 -0500 mISDN: Fix a use after free in hfcmulti_tx() Don't dereference *sp after calling dev_kfree_skb(*sp). Fixes: af69fb3a8ffa ("Add mISDN HFC multiport driver") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Link: https://patch.msgid.link/8be65f5a-c2dd-4ba0-8a10-bfe5980b8cfb@stanley.mountain Signed-off-by: Jakub Kicinski commit 36e3b949e35964e22b9a57f960660fc599038dd4 Author: Bailey Forrest Date: Wed Jul 24 07:34:31 2024 -0700 gve: Fix an edge case for TSO skb validity check The NIC requires each TSO segment to not span more than 10 descriptors. NIC further requires each descriptor to not exceed 16KB - 1 (GVE_TX_MAX_BUF_SIZE_DQO). The descriptors for an skb are generated by gve_tx_add_skb_no_copy_dqo() for DQO RDA queue format. gve_tx_add_skb_no_copy_dqo() loops through each skb frag and generates a descriptor for the entire frag if the frag size is not greater than GVE_TX_MAX_BUF_SIZE_DQO. If the frag size is greater than GVE_TX_MAX_BUF_SIZE_DQO, it is split into descriptor(s) of size GVE_TX_MAX_BUF_SIZE_DQO and a descriptor is generated for the remainder (frag size % GVE_TX_MAX_BUF_SIZE_DQO). gve_can_send_tso() checks if the descriptors thus generated for an skb would meet the requirement that each TSO-segment not span more than 10 descriptors. However, the current code misses an edge case when a TSO segment spans multiple descriptors within a large frag. This change fixes the edge case. gve_can_send_tso() relies on the assumption that max gso size (9728) is less than GVE_TX_MAX_BUF_SIZE_DQO and therefore within an skb fragment a TSO segment can never span more than 2 descriptors. Fixes: a57e5de476be ("gve: DQO: Add TX path") Signed-off-by: Praveen Kaligineedi Signed-off-by: Bailey Forrest Reviewed-by: Jeroen de Borst Cc: stable@vger.kernel.org Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240724143431.3343722-1-pkaligineedi@google.com Signed-off-by: Jakub Kicinski commit b537633ce57b29f4c9687fea6f2d92e1ca7853fc Author: Taehee Yoo Date: Sun Jul 21 05:35:54 2024 +0000 bnxt_en: update xdp_rxq_info in queue restart logic When the netdev_rx_queue_restart() restarts queues, the bnxt_en driver updates(creates and deletes) a page_pool. But it doesn't update xdp_rxq_info, so the xdp_rxq_info is still connected to an old page_pool. So, bnxt_rx_ring_info->page_pool indicates a new page_pool, but bnxt_rx_ring_info->xdp_rxq is still connected to an old page_pool. An old page_pool is no longer used so it is supposed to be deleted by page_pool_destroy() but it isn't. Because the xdp_rxq_info is holding the reference count for it and the xdp_rxq_info is not updated, an old page_pool will not be deleted in the queue restart logic. Before restarting 1 queue: ./tools/net/ynl/samples/page-pool enp10s0f1np1[6] page pools: 4 (zombies: 0) refs: 8192 bytes: 33554432 (refs: 0 bytes: 0) recycling: 0.0% (alloc: 128:8048 recycle: 0:0) After restarting 1 queue: ./tools/net/ynl/samples/page-pool enp10s0f1np1[6] page pools: 5 (zombies: 0) refs: 10240 bytes: 41943040 (refs: 0 bytes: 0) recycling: 20.0% (alloc: 160:10080 recycle: 1920:128) Before restarting queues, an interface has 4 page_pools. After restarting one queue, an interface has 5 page_pools, but it should be 4, not 5. The reason is that queue restarting logic creates a new page_pool and an old page_pool is not deleted due to the absence of an update of xdp_rxq_info logic. Fixes: 2d694c27d32e ("bnxt_en: implement netdev_queue_mgmt_ops") Signed-off-by: Taehee Yoo Reviewed-by: David Wei Reviewed-by: Somnath Kotur Link: https://patch.msgid.link/20240721053554.1233549-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 0db4618e8fabfcc404af4dda23799bba726785a5 Author: Jens Axboe Date: Thu Jul 25 08:41:35 2024 -0600 io_uring/msg_ring: fix uninitialized use of target_req->flags syzbot reports that KMSAN complains that 'nr_tw' is an uninit-value with the following report: BUG: KMSAN: uninit-value in io_req_local_work_add io_uring/io_uring.c:1192 [inline] BUG: KMSAN: uninit-value in io_req_task_work_add_remote+0x588/0x5d0 io_uring/io_uring.c:1240 io_req_local_work_add io_uring/io_uring.c:1192 [inline] io_req_task_work_add_remote+0x588/0x5d0 io_uring/io_uring.c:1240 io_msg_remote_post io_uring/msg_ring.c:102 [inline] io_msg_data_remote io_uring/msg_ring.c:133 [inline] io_msg_ring_data io_uring/msg_ring.c:152 [inline] io_msg_ring+0x1c38/0x1ef0 io_uring/msg_ring.c:305 io_issue_sqe+0x383/0x22c0 io_uring/io_uring.c:1710 io_queue_sqe io_uring/io_uring.c:1924 [inline] io_submit_sqe io_uring/io_uring.c:2180 [inline] io_submit_sqes+0x1259/0x2f20 io_uring/io_uring.c:2295 __do_sys_io_uring_enter io_uring/io_uring.c:3205 [inline] __se_sys_io_uring_enter+0x40c/0x3ca0 io_uring/io_uring.c:3142 __x64_sys_io_uring_enter+0x11f/0x1a0 io_uring/io_uring.c:3142 x64_sys_call+0x2d82/0x3c10 arch/x86/include/generated/asm/syscalls_64.h:427 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 which is the following check: if (nr_tw < nr_wait) return; in io_req_local_work_add(). While nr_tw itself cannot be uninitialized, it does depend on req->flags, which off the msg ring issue path can indeed be uninitialized. Fix this by always clearing the allocated 'req' fully if we can't grab one from the cache itself. Fixes: 50cf5f3842af ("io_uring/msg_ring: add an alloc cache for io_kiocb entries") Reported-by: syzbot+82609b8937a4458106ca@syzkaller.appspotmail.com Link: https://lore.kernel.org/io-uring/000000000000fd3d8d061dfc0e4a@google.com/ Signed-off-by: Jens Axboe commit f7578df913041f08b680aac2c660ebd71f35af3a Merge: c1668292689ad 9b9969c40b0d6 Author: Jakub Kicinski Date: Thu Jul 25 07:40:24 2024 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2024-07-25 We've added 14 non-merge commits during the last 8 day(s) which contain a total of 19 files changed, 177 insertions(+), 70 deletions(-). The main changes are: 1) Fix af_unix to disable MSG_OOB handling for sockets in BPF sockmap and BPF sockhash. Also add test coverage for this case, from Michal Luczaj. 2) Fix a segmentation issue when downgrading gso_size in the BPF helper bpf_skb_adjust_room(), from Fred Li. 3) Fix a compiler warning in resolve_btfids due to a missing type cast, from Liwei Song. 4) Fix stack allocation for arm64 to align the stack pointer at a 16 byte boundary in the fexit_sleep BPF selftest, from Puranjay Mohan. 5) Fix a xsk regression to require a flag when actuating tx_metadata_len, from Stanislav Fomichev. 6) Fix function prototype BTF dumping in libbpf for prototypes that have no input arguments, from Andrii Nakryiko. 7) Fix stacktrace symbol resolution in perf script for BPF programs containing subprograms, from Hou Tao. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Add XDP_UMEM_TX_METADATA_LEN to XSK TX metadata test xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len bpf: Fix a segment issue when downgrading gso_size tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids bpf, events: Use prog to emit ksymbol event for main program selftests/bpf: Test sockmap redirect for AF_UNIX MSG_OOB selftests/bpf: Parametrize AF_UNIX redir functions to accept send() flags selftests/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected() af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash bpftool: Fix typo in usage help libbpf: Fix no-args func prototype BTF dumping syntax MAINTAINERS: Update powerpc BPF JIT maintainers MAINTAINERS: Update email address of Naveen selftests/bpf: fexit_sleep: Fix stack allocation for arm64 ==================== Link: https://patch.msgid.link/20240725114312.32197-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit c31fad1470389666ac7169fe43aa65bf5b7e2cfd Author: Leon Romanovsky Date: Wed Jul 24 13:31:14 2024 +0300 nvme-pci: add missing condition check for existence of mapped data nvme_map_data() is called when request has physical segments, hence the nvme_unmap_data() should have same condition to avoid dereference. Fixes: 4aedb705437f ("nvme-pci: split metadata handling from nvme_map_data / nvme_unmap_data") Signed-off-by: Leon Romanovsky Reviewed-by: Christoph Hellwig Reviewed-by: Nitesh Shetty Signed-off-by: Keith Busch commit ab53dfdcdd1ec8df8729890aefa5b0e3c900afbb Author: Shengjiu Wang Date: Thu Jul 25 11:22:53 2024 +0800 ASoC: fsl-asoc-card: Dynamically allocate memory for snd_soc_dai_link_components The static snd_soc_dai_link_components cause conflict for multiple instances of this generic driver. For example, when there is wm8962 and SPDIF case enabled together, the contaminated snd_soc_dai_link_components will cause another device probe fail. Fixes: 6d174cc4f224 ("ASoC: fsl-asoc-card: merge spdif support from imx-spdif.c") Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1721877773-5229-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 36639013b3462c06ff8e3400a427f775b4fc97f5 Author: Will Deacon Date: Thu Jul 25 10:03:45 2024 +0100 arm64: mm: Fix lockless walks with static and dynamic page-table folding Lina reports random oopsen originating from the fast GUP code when 16K pages are used with 4-level page-tables, the fourth level being folded at runtime due to lack of LPA2. In this configuration, the generic implementation of p4d_offset_lockless() will return a 'p4d_t *' corresponding to the 'pgd_t' allocated on the stack of the caller, gup_fast_pgd_range(). This is normally fine, but when the fourth level of page-table is folded at runtime, pud_offset_lockless() will offset from the address of the 'p4d_t' to calculate the address of the PUD in the same page-table page. This results in a stray stack read when the 'p4d_t' has been allocated on the stack and can send the walker into the weeds. Fix the problem by providing our own definition of p4d_offset_lockless() when CONFIG_PGTABLE_LEVELS <= 4 which returns the real page-table pointer rather than the address of the local stack variable. Cc: Catalin Marinas Cc: Ard Biesheuvel Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/50360968-13fb-4e6f-8f52-1725b3177215@asahilina.net Fixes: 0dd4f60a2c76 ("arm64: mm: Add support for folding PUDs at runtime") Reported-by: Asahi Lina Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20240725090345.28461-1-will@kernel.org Signed-off-by: Will Deacon commit 726d4f528dbc98a84d9ce3c749dfdada3dcdd5ca Author: Ashish Mhetre Date: Wed Jul 24 17:31:32 2024 +0000 iommu: arm-smmu: Fix Tegra workaround for PAGE_SIZE mappings PAGE_SIZE can be 16KB for Tegra which is not supported by MMU-500 on both Tegra194 and Tegra234. Retain only valid granularities from pgsize_bitmap which would either be 4KB or 64KB. Signed-off-by: Ashish Mhetre Link: https://lore.kernel.org/r/20240724173132.219978-1-amhetre@nvidia.com Signed-off-by: Will Deacon commit 9722c3b66e21ff08aec570d02a97d331087fd70f Author: Luca Ceresoli Date: Wed Jul 24 18:33:06 2024 +0200 of: remove internal arguments from of_property_for_each_u32() The of_property_for_each_u32() macro needs five parameters, two of which are primarily meant as internal variables for the macro itself (in the for() clause). Yet these two parameters are used by a few drivers, and this can be considered misuse or at least bad practice. Now that the kernel uses C11 to build, these two parameters can be avoided by declaring them internally, thus changing this pattern: struct property *prop; const __be32 *p; u32 val; of_property_for_each_u32(np, "xyz", prop, p, val) { ... } to this: u32 val; of_property_for_each_u32(np, "xyz", val) { ... } However two variables cannot be declared in the for clause even with C11, so declare one struct that contain the two variables we actually need. As the variables inside this struct are not meant to be used by users of this macro, give the struct instance the noticeable name "_it" so it is visible during code reviews, helping to avoid new code to use it directly. Most usages are trivially converted as they do not use those two parameters, as expected. The non-trivial cases are: - drivers/clk/clk.c, of_clk_get_parent_name(): easily doable anyway - drivers/clk/clk-si5351.c, si5351_dt_parse(): this is more complex as the checks had to be replicated in a different way, making code more verbose and somewhat uglier, but I refrained from a full rework to keep as much of the original code untouched having no hardware to test my changes All the changes have been build tested. The few for which I have the hardware have been runtime-tested too. Reviewed-by: Andre Przywara # drivers/clk/sunxi/clk-simple-gates.c, drivers/clk/sunxi/clk-sun8i-bus-gates.c Acked-by: Bartosz Golaszewski # drivers/gpio/gpio-brcmstb.c Acked-by: Nicolas Ferre # drivers/irqchip/irq-atmel-aic-common.c Acked-by: Jonathan Cameron # drivers/iio/adc/ti_am335x_adc.c Acked-by: Uwe Kleine-König # drivers/pwm/pwm-samsung.c Acked-by: Richard Leitner # drivers/usb/misc/usb251xb.c Acked-by: Mark Brown # sound/soc/codecs/arizona.c Reviewed-by: Richard Fitzgerald # sound/soc/codecs/arizona.c Acked-by: Michael Ellerman # arch/powerpc/sysdev/xive/spapr.c Acked-by: Stephen Boyd # clk Signed-off-by: Luca Ceresoli Acked-by: Lee Jones Link: https://lore.kernel.org/r/20240724-of_property_for_each_u32-v3-1-bea82ce429e2@bootlin.com Signed-off-by: Rob Herring (Arm) commit 7b52a9d9ee6c5505a51ebe03703a56a72c75f9de Author: Huqiang Qin Date: Tue Jul 9 16:48:25 2024 +0800 dt-bindings: watchdog: add support for Amlogic A4 SoCs Update dt-binding document for watchdog of Amlogic A4 SoCs. Signed-off-by: Huqiang Qin Signed-off-by: Xianwei Zhao Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240709-a4-a5_watchdog-v1-1-2ae852e05ec2@amlogic.com Signed-off-by: Rob Herring (Arm) commit 1d9ce4440414c92acb17eece3218fe5c92b141e3 Author: Takashi Iwai Date: Thu Jul 25 08:54:28 2024 +0200 ASoC: amd: yc: Support mic on Lenovo Thinkpad E16 Gen 2 Lenovo Thinkpad E16 Gen 2 AMD model (model 21M5) needs a corresponding quirk entry for making the internal mic working. Link: https://bugzilla.suse.com/show_bug.cgi?id=1228269 Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20240725065442.9293-1-tiwai@suse.de Signed-off-by: Mark Brown commit 4c006734898a113a64a528027274a571b04af95a Author: Roger Pau Monne Date: Thu Jul 25 09:31:15 2024 +0200 x86/xen: fix memblock_reserve() usage on PVH The current usage of memblock_reserve() in init_pvh_bootparams() is done before the .bss is zeroed, and that used to be fine when memblock_reserved_init_regions implicitly ended up in the .meminit.data section. However after commit 73db3abdca58c memblock_reserved_init_regions ends up in the .bss section, thus breaking it's usage before the .bss is cleared. Move and rename the call to xen_reserve_extra_memory() so it's done in the x86_init.oem.arch_setup hook, which gets executed after the .bss has been zeroed, but before calling e820__memory_setup(). Fixes: 73db3abdca58c ("init/modpost: conditionally check section mismatch to __meminit*") Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Message-ID: <20240725073116.14626-3-roger.pau@citrix.com> Signed-off-by: Juergen Gross commit fc05ea89c9ab45e70cb73e70bc0b9cdd403e0ee1 Author: Roger Pau Monne Date: Thu Jul 25 09:31:14 2024 +0200 x86/xen: move xen_reserve_extra_memory() In preparation for making the function static. No functional change. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Message-ID: <20240725073116.14626-2-roger.pau@citrix.com> Signed-off-by: Juergen Gross commit c1668292689ad2ee16c9c1750a8044b0b0aad663 Author: Matthieu Baerts (NGI0) Date: Wed Jul 24 12:25:16 2024 +0200 tcp: process the 3rd ACK with sk_socket for TFO/MPTCP The 'Fixes' commit recently changed the behaviour of TCP by skipping the processing of the 3rd ACK when a sk->sk_socket is set. The goal was to skip tcp_ack_snd_check() in tcp_rcv_state_process() not to send an unnecessary ACK in case of simultaneous connect(). Unfortunately, that had an impact on TFO and MPTCP. I started to look at the impact on MPTCP, because the MPTCP CI found some issues with the MPTCP Packetdrill tests [1]. Then Paolo Abeni suggested me to look at the impact on TFO with "plain" TCP. For MPTCP, when receiving the 3rd ACK of a request adding a new path (MP_JOIN), sk->sk_socket will be set, and point to the MPTCP sock that has been created when the MPTCP connection got established before with the first path. The newly added 'goto' will then skip the processing of the segment text (step 7) and not go through tcp_data_queue() where the MPTCP options are validated, and some actions are triggered, e.g. sending the MPJ 4th ACK [2] as demonstrated by the new errors when running a packetdrill test [3] establishing a second subflow. This doesn't fully break MPTCP, mainly the 4th MPJ ACK that will be delayed. Still, we don't want to have this behaviour as it delays the switch to the fully established mode, and invalid MPTCP options in this 3rd ACK will not be caught any more. This modification also affects the MPTCP + TFO feature as well, and being the reason why the selftests started to be unstable the last few days [4]. For TFO, the existing 'basic-cookie-not-reqd' test [5] was no longer passing: if the 3rd ACK contains data, and the connection is accept()ed before receiving them, these data would no longer be processed, and thus not ACKed. One last thing about MPTCP, in case of simultaneous connect(), a fallback to TCP will be done, which seems fine: `../common/defaults.sh` 0 socket(..., SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_MPTCP) = 3 +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0 > S 0:0(0) +0 < S 0:0(0) win 1000 +0 > S. 0:0(0) ack 1 +0 < S. 0:0(0) ack 1 win 65535 +0 > . 1:1(0) ack 1 Simultaneous SYN-data crossing is also not supported by TFO, see [6]. Kuniyuki Iwashima suggested to restrict the processing to SYN+ACK only: that's a more generic solution than the one initially proposed, and also enough to fix the issues described above. Later on, Eric Dumazet mentioned that an ACK should still be sent in reaction to the second SYN+ACK that is received: not sending a DUPACK here seems wrong and could hurt: 0 socket(..., SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_TCP) = 3 +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0 > S 0:0(0) +0 < S 0:0(0) win 1000 +0 > S. 0:0(0) ack 1 +0 < S. 0:0(0) ack 1 win 1000 +0 > . 1:1(0) ack 1 // <== Here So in this version, the 'goto consume' is dropped, to always send an ACK when switching from TCP_SYN_RECV to TCP_ESTABLISHED. This ACK will be seen as a DUPACK -- with DSACK if SACK has been negotiated -- in case of simultaneous SYN crossing: that's what is expected here. Link: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/9936227696 [1] Link: https://datatracker.ietf.org/doc/html/rfc8684#fig_tokens [2] Link: https://github.com/multipath-tcp/packetdrill/blob/mptcp-net-next/gtests/net/mptcp/syscalls/accept.pkt#L28 [3] Link: https://netdev.bots.linux.dev/contest.html?executor=vmksft-mptcp-dbg&test=mptcp-connect-sh [4] Link: https://github.com/google/packetdrill/blob/master/gtests/net/tcp/fastopen/server/basic-cookie-not-reqd.pkt#L21 [5] Link: https://github.com/google/packetdrill/blob/master/gtests/net/tcp/fastopen/client/simultaneous-fast-open.pkt [6] Fixes: 23e89e8ee7be ("tcp: Don't drop SYN+ACK for simultaneous connect().") Suggested-by: Paolo Abeni Suggested-by: Kuniyuki Iwashima Suggested-by: Eric Dumazet Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240724-upstream-net-next-20240716-tcp-3rd-ack-consume-sk_socket-v3-1-d48339764ce9@kernel.org Signed-off-by: Paolo Abeni commit 3ceccb14f5576e02b81cc8b105ab81f224bd87f6 Author: Ilya Dryomov Date: Tue Jul 23 18:08:08 2024 +0200 rbd: don't assume rbd_is_lock_owner() for exclusive mappings Expanding on the previous commit, assuming that rbd_is_lock_owner() always returns true (i.e. that we are either in RBD_LOCK_STATE_LOCKED or RBD_LOCK_STATE_QUIESCING) if the mapping is exclusive is wrong too. In case ceph_cls_set_cookie() fails, the lock would be temporarily released even if the mapping is exclusive, meaning that we can end up even in RBD_LOCK_STATE_UNLOCKED. IOW, exclusive mappings are really "just" about disabling automatic lock transitions (as documented in the man page), not about grabbing the lock and holding on to it whatever it takes. Cc: stable@vger.kernel.org Fixes: 637cd060537d ("rbd: new exclusive lock wait/wake code") Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang commit 2237ceb71f89837ac47c5dce2aaa2c2b3a337a3c Author: Ilya Dryomov Date: Tue Jul 23 18:07:59 2024 +0200 rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings Every time a watch is reestablished after getting lost, we need to update the cookie which involves quiescing exclusive lock. For this, we transition from RBD_LOCK_STATE_LOCKED to RBD_LOCK_STATE_QUIESCING roughly for the duration of rbd_reacquire_lock() call. If the mapping is exclusive and I/O happens to arrive in this time window, it's failed with EROFS (later translated to EIO) based on the wrong assumption in rbd_img_exclusive_lock() -- "lock got released?" check there stopped making sense with commit a2b1da09793d ("rbd: lock should be quiesced on reacquire"). To make it worse, any such I/O is added to the acquiring list before EROFS is returned and this sets up for violating rbd_lock_del_request() precondition that the request is either on the running list or not on any list at all -- see commit ded080c86b3f ("rbd: don't move requests to the running list on errors"). rbd_lock_del_request() ends up processing these requests as if they were on the running list which screws up quiescing_wait completion counter and ultimately leads to rbd_assert(!completion_done(&rbd_dev->quiescing_wait)); being triggered on the next watch error. Cc: stable@vger.kernel.org # 06ef84c4e9c4: rbd: rename RBD_LOCK_STATE_RELEASING and releasing_wait Cc: stable@vger.kernel.org Fixes: 637cd060537d ("rbd: new exclusive lock wait/wake code") Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang commit f5c466a0fdb2d9f3650d2e3911b0735f17ba00cf Author: Ilya Dryomov Date: Tue Jul 23 17:54:39 2024 +0200 rbd: rename RBD_LOCK_STATE_RELEASING and releasing_wait ... to RBD_LOCK_STATE_QUIESCING and quiescing_wait to recognize that this state and the associated completion are backing rbd_quiesce_lock(), which isn't specific to releasing the lock. While exclusive lock does get quiesced before it's released, it also gets quiesced before an attempt to update the cookie is made and there the lock is not released as long as ceph_cls_set_cookie() succeeds. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang commit 9b9969c40b0d63a8fca434d4ea01c60a39699aa3 Author: Stanislav Fomichev Date: Fri Jul 12 18:52:52 2024 -0700 selftests/bpf: Add XDP_UMEM_TX_METADATA_LEN to XSK TX metadata test This flag is now required to use tx_metadata_len. Fixes: 40808a237d9c ("selftests/bpf: Add TX side to xdp_metadata") Reported-by: Julian Schindel Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20240713015253.121248-3-sdf@fomichev.me commit d5e726d9143c5624135f5dc9e4069799adeef734 Author: Stanislav Fomichev Date: Fri Jul 12 18:52:51 2024 -0700 xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len Julian reports that commit 341ac980eab9 ("xsk: Support tx_metadata_len") can break existing use cases which don't zero-initialize xdp_umem_reg padding. Introduce new XDP_UMEM_TX_METADATA_LEN to make sure we interpret the padding as tx_metadata_len only when being explicitly asked. Fixes: 341ac980eab9 ("xsk: Support tx_metadata_len") Reported-by: Julian Schindel Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20240713015253.121248-2-sdf@fomichev.me commit fa5ef655615a01533035c6139248c5b33aa27028 Author: Fred Li Date: Fri Jul 19 10:46:53 2024 +0800 bpf: Fix a segment issue when downgrading gso_size Linearize the skb when downgrading gso_size because it may trigger a BUG_ON() later when the skb is segmented as described in [1,2]. Fixes: 2be7e212d5419 ("bpf: add bpf_skb_adjust_room helper") Signed-off-by: Fred Li Signed-off-by: Daniel Borkmann Reviewed-by: Willem de Bruijn Acked-by: Daniel Borkmann Link: https://lore.kernel.org/all/20240626065555.35460-2-dracodingfly@gmail.com [1] Link: https://lore.kernel.org/all/668d5cf1ec330_1c18c32947@willemb.c.googlers.com.notmuch [2] Link: https://lore.kernel.org/bpf/20240719024653.77006-1-dracodingfly@gmail.com commit 16f3a28cf5f876a7f3550d8f4c870a7b41bcfaef Author: Breno Leitao Date: Wed Jul 24 01:05:23 2024 -0700 net: mediatek: Fix potential NULL pointer dereference in dummy net_device handling Move the freeing of the dummy net_device from mtk_free_dev() to mtk_remove(). Previously, if alloc_netdev_dummy() failed in mtk_probe(), eth->dummy_dev would be NULL. The error path would then call mtk_free_dev(), which in turn called free_netdev() assuming dummy_dev was allocated (but it was not), potentially causing a NULL pointer dereference. By moving free_netdev() to mtk_remove(), we ensure it's only called when mtk_probe() has succeeded and dummy_dev is fully allocated. This addresses a potential NULL pointer dereference detected by Smatch[1]. Fixes: b209bd6d0bff ("net: mediatek: mtk_eth_sock: allocate dummy net_device dynamically") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/4160f4e0-cbef-4a22-8b5d-42c4d399e1f7@stanley.mountain/ [1] Suggested-by: Dan Carpenter Reviewed-by: Dan Carpenter Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240724080524.2734499-1-leitao@debian.org Signed-off-by: Paolo Abeni commit e6d08d7ecf1b675b4b174d696badc36706c4233c Merge: 5bdaf3625a07f a16909ae9982e Author: Paolo Abeni Date: Thu Jul 25 11:17:21 2024 +0200 Merge tag 'nf-24-07-24' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains a Netfilter fix for net: Patch #1 if FPU is busy, then pipapo set backend falls back to standard set element lookup. Moreover, disable bh while at this. From Florian Westphal. netfilter pull request 24-07-24 * tag 'nf-24-07-24' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_set_pipapo_avx2: disable softinterrupts ==================== Link: https://patch.msgid.link/20240724081305.3152-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit dcfed708742c7ab5e0c9cfcc673cb4e5fafb18ff Author: Nick Weihs Date: Wed Jul 24 22:47:22 2024 -0700 ALSA: hda/realtek: Implement sound init sequence for Samsung Galaxy Book3 Pro 360 Samsung Galaxy Book3 Pro 360 sends a large amount of data to the codec through hda processing coefficients. This data was captured using a modified version of QEMU, but the actual content of the data remains opaque to me. Elliding any part of the data seems to cause sound to not work. Signed-off-by: Nick Weihs Link: https://patch.msgid.link/20240725054722.42597-1-nick.weihs@gmail.com Signed-off-by: Takashi Iwai commit 5bdaf3625a07f20583ad4bcf9f0233473450be10 Merge: 7c938e438c56d 19abb9c2b900b Author: Paolo Abeni Date: Thu Jul 25 10:10:05 2024 +0200 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== This series contains updates to ice driver only. Ahmed enforces the iavf per VF filter limit on ice (PF) driver to prevent possible resource exhaustion. Wojciech corrects assignment of l2 flags read from firmware. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix recipe read procedure ice: Add a per-VF limit on number of FDIR filters ==================== Link: https://patch.msgid.link/20240723233242.3146628-1-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni commit cb372a505a994cb39aa75acfb8b3bcf94787cf94 Author: Ian Forbes Date: Fri Jul 19 11:36:27 2024 -0500 drm/vmwgfx: Fix overlay when using Screen Targets This code was never updated to support Screen Targets. Fixes a bug where Xv playback displays a green screen instead of actual video contents when 3D acceleration is disabled in the guest. Fixes: c8261a961ece ("vmwgfx: Major KMS refactoring / cleanup in preparation of screen targets") Reported-by: Doug Brown Closes: https://lore.kernel.org/all/bd9cb3c7-90e8-435d-bc28-0e38fee58977@schmorgal.com Signed-off-by: Ian Forbes Tested-by: Doug Brown Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20240719163627.20888-1-ian.forbes@broadcom.com commit 12bed149a3460bb6efbca697b4a46e11c819db86 Author: Zack Rusin Date: Mon Jul 22 14:41:16 2024 -0400 drm/vmwgfx: Add basic support for external buffers Make vmwgfx go through the dma-buf interface to map/unmap imported buffers. The driver used to try to directly manipulate external buffers, assuming that everything that was coming to it had to live in cpu accessible memory. While technically true because what's in the vms is controlled by us, it's semantically completely broken. Fix importing of external buffers by forwarding all memory access requests to the importer. Tested by the vmw_prime basic_vgem test. Signed-off-by: Zack Rusin Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20240722184313.181318-5-zack.rusin@broadcom.com commit d6667f0ddf46c671d379cd5fe66ce0a54d2a743a Author: Zack Rusin Date: Mon Jul 22 14:41:15 2024 -0400 drm/vmwgfx: Fix handling of dumb buffers Dumb buffers can be used in kms but also through prime with gallium's resource_from_handle. In the second case the dumb buffers can be rendered by the GPU where with the regular DRM kms interfaces they are mapped and written to by the CPU. Because the same buffer can be written to by the GPU and CPU vmwgfx needs to use vmw_surface (object which properly tracks dirty state of the guest and gpu memory) instead of vmw_bo (which is just guest side memory). Furthermore the dumb buffer handles are expected to be gem objects by a lot of userspace. Make vmwgfx accept gem handles in prime and kms but internally switch to vmw_surface's to properly track the dirty state of the objects between the GPU and CPU. Fixes new kwin and kde on wayland. Signed-off-by: Zack Rusin Fixes: b32233acceff ("drm/vmwgfx: Fix prime import/export") Cc: Broadcom internal kernel review list Cc: dri-devel@lists.freedesktop.org Cc: # v6.9+ Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20240722184313.181318-4-zack.rusin@broadcom.com commit 09f34a00272d2311f6e5d64ed8ad824ef78f7487 Author: Zack Rusin Date: Mon Jul 22 14:41:14 2024 -0400 drm/vmwgfx: Make sure the screen surface is ref counted Fix races issues in virtual crc generation by making sure the surface the code uses for crc computation is properly ref counted. Crc generation was trying to be too clever by allowing the surfaces to go in and out of scope, with the hope of always having some kind of screen present. That's not always the code, in particular during atomic disable, so to make sure the surface, when present, is not being actively destroyed at the same time, hold a reference to it. Signed-off-by: Zack Rusin Fixes: 7b0062036c3b ("drm/vmwgfx: Implement virtual crc generation") Cc: Zack Rusin Cc: Broadcom internal kernel review list Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20240722184313.181318-3-zack.rusin@broadcom.com commit e58337100721f3cc0c7424a18730e4f39844934f Author: Zack Rusin Date: Mon Jul 22 14:41:13 2024 -0400 drm/vmwgfx: Fix a deadlock in dma buf fence polling Introduce a version of the fence ops that on release doesn't remove the fence from the pending list, and thus doesn't require a lock to fix poll->fence wait->fence unref deadlocks. vmwgfx overwrites the wait callback to iterate over the list of all fences and update their status, to do that it holds a lock to prevent the list modifcations from other threads. The fence destroy callback both deletes the fence and removes it from the list of pending fences, for which it holds a lock. dma buf polling cb unrefs a fence after it's been signaled: so the poll calls the wait, which signals the fences, which are being destroyed. The destruction tries to acquire the lock on the pending fences list which it can never get because it's held by the wait from which it was called. Old bug, but not a lot of userspace apps were using dma-buf polling interfaces. Fix those, in particular this fixes KDE stalls/deadlock. Signed-off-by: Zack Rusin Fixes: 2298e804e96e ("drm/vmwgfx: rework to new fence interface, v2") Cc: Broadcom internal kernel review list Cc: dri-devel@lists.freedesktop.org Cc: # v6.2+ Reviewed-by: Maaz Mombasawala Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20240722184313.181318-2-zack.rusin@broadcom.com commit 5659b0c93a1ea02c662a030b322093203f299185 Author: ZhenGuo Yin Date: Fri Jul 19 16:10:40 2024 +0800 drm/amdgpu: reset vm state machine after gpu reset(vram lost) [Why] Page table of compute VM in the VRAM will lost after gpu reset. VRAM won't be restored since compute VM has no shadows. [How] Use higher 32-bit of vm->generation to record a vram_lost_counter. Reset the VM state machine when vm->genertaion is not equal to the new generation token. v2: Check vm->generation instead of calling drm_sched_entity_error in amdgpu_vm_validate. v3: Use new generation token instead of vram_lost_counter for check. Signed-off-by: ZhenGuo Yin Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit 47c0388b0589cb481c294dcb857d25a214c46eb3) commit fab1ead0ae3a4757afb92ff6909b37d63db17e55 Author: Tim Huang Date: Tue Jul 23 16:54:34 2024 +0800 drm/amdgpu: add missed harvest check for VCN IP v4/v5 To prevent below probe failure, add a check for models with VCN IP v4.0.6 where VCN1 may be harvested. v2: Apply the same check to VCN IP v4.0 and v5.0. [ 54.070117] RIP: 0010:vcn_v4_0_5_start_dpg_mode+0x9be/0x36b0 [amdgpu] [ 54.071055] Code: 80 fb ff 8d 82 00 80 fe ff 81 fe 00 06 00 00 0f 43 c2 49 69 d5 38 0d 00 00 48 8d 71 04 c1 e8 02 4c 01 f2 48 89 b2 50 f6 02 00 <89> 01 48 8b 82 50 f6 02 00 48 8d 48 04 48 89 8a 50 f6 02 00 c7 00 [ 54.072408] RSP: 0018:ffffb17985f736f8 EFLAGS: 00010286 [ 54.072793] RAX: 00000000000000d6 RBX: ffff99a82f680000 RCX: 0000000000000000 [ 54.073315] RDX: ffff99a82f680000 RSI: 0000000000000004 RDI: ffff99a82f680000 [ 54.073835] RBP: ffffb17985f73730 R08: 0000000000000001 R09: 0000000000000000 [ 54.074353] R10: 0000000000000008 R11: ffffb17983c05000 R12: 0000000000000000 [ 54.074879] R13: 0000000000000000 R14: ffff99a82f680000 R15: 0000000000000001 [ 54.075400] FS: 00007f8d9c79a000(0000) GS:ffff99ab2f140000(0000) knlGS:0000000000000000 [ 54.075988] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 54.076408] CR2: 0000000000000000 CR3: 0000000140c3a000 CR4: 0000000000750ef0 [ 54.076927] PKRU: 55555554 [ 54.077132] Call Trace: [ 54.077319] [ 54.077484] ? show_regs+0x69/0x80 [ 54.077747] ? __die+0x28/0x70 [ 54.077979] ? page_fault_oops+0x180/0x4b0 [ 54.078286] ? do_user_addr_fault+0x2d2/0x680 [ 54.078610] ? exc_page_fault+0x84/0x190 [ 54.078910] ? asm_exc_page_fault+0x2b/0x30 [ 54.079224] ? vcn_v4_0_5_start_dpg_mode+0x9be/0x36b0 [amdgpu] [ 54.079941] ? vcn_v4_0_5_start_dpg_mode+0xe6/0x36b0 [amdgpu] [ 54.080617] vcn_v4_0_5_set_powergating_state+0x82/0x19b0 [amdgpu] [ 54.081316] amdgpu_device_ip_set_powergating_state+0x64/0xc0 [amdgpu] [ 54.082057] amdgpu_vcn_ring_begin_use+0x6f/0x1d0 [amdgpu] [ 54.082727] amdgpu_ring_alloc+0x44/0x70 [amdgpu] [ 54.083351] amdgpu_vcn_dec_sw_ring_test_ring+0x40/0x110 [amdgpu] [ 54.084054] amdgpu_ring_test_helper+0x22/0x90 [amdgpu] [ 54.084698] vcn_v4_0_5_hw_init+0x87/0xc0 [amdgpu] [ 54.085307] amdgpu_device_init+0x1f96/0x2780 [amdgpu] [ 54.085951] amdgpu_driver_load_kms+0x1e/0xc0 [amdgpu] [ 54.086591] amdgpu_pci_probe+0x19f/0x550 [amdgpu] [ 54.087215] local_pci_probe+0x48/0xa0 [ 54.087509] pci_device_probe+0xc9/0x250 [ 54.087812] really_probe+0x1a4/0x3f0 [ 54.088101] __driver_probe_device+0x7d/0x170 [ 54.088443] driver_probe_device+0x24/0xa0 [ 54.088765] __driver_attach+0xdd/0x1d0 [ 54.089068] ? __pfx___driver_attach+0x10/0x10 [ 54.089417] bus_for_each_dev+0x8e/0xe0 [ 54.089718] driver_attach+0x22/0x30 [ 54.090000] bus_add_driver+0x120/0x220 [ 54.090303] driver_register+0x62/0x120 [ 54.090606] ? __pfx_amdgpu_init+0x10/0x10 [amdgpu] [ 54.091255] __pci_register_driver+0x62/0x70 [ 54.091593] amdgpu_init+0x67/0xff0 [amdgpu] [ 54.092190] do_one_initcall+0x5f/0x330 [ 54.092495] do_init_module+0x68/0x240 [ 54.092794] load_module+0x201c/0x2110 [ 54.093093] init_module_from_file+0x97/0xd0 [ 54.093428] ? init_module_from_file+0x97/0xd0 [ 54.093777] idempotent_init_module+0x11c/0x2a0 [ 54.094134] __x64_sys_finit_module+0x64/0xc0 [ 54.094476] do_syscall_64+0x58/0x120 [ 54.094767] entry_SYSCALL_64_after_hwframe+0x6e/0x76 Signed-off-by: Tim Huang Reviewed-by: Saleemkhan Jamadar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit 0b071245ddd98539d4f7493bdd188417fcf2d629) commit 1a8825259a9ccc53faddcdec24cf94e0a36b32cc Author: Stanley.Yang Date: Thu Jul 18 10:58:04 2024 +0800 drm/amdgpu: Fix eeprom max record count The eeprom table is empty before initializing, set eeprom table version first before initializing. Changed from V1: Reuse amdgpu_ras_set_eeprom_table_version function Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 015b8a2fdf39a4c288ff24e7b715b8d9198e56dc) commit afac8c6554ccee54bfd1743755e10af005be3bcf Author: YiPeng Chai Date: Fri Jul 19 20:43:04 2024 +0800 drm/amdgpu: fix ras UE error injection failure issue The ras command shared memory is allocated from VRAM and the response status of the command buffer will not be zero due to gpu being in fatal error state after ras UE error injection. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 8284951a6e79c6806c675e5f68a4cd425dd56bc4) commit 5302d1a06a2cd9855378122a07c9e0942f0f04a9 Author: Rodrigo Siqueira Date: Thu Jul 4 11:54:34 2024 -0600 drm/amd/display: Remove ASSERT if significance is zero in math_ceil2 In the DML math_ceil2 function, there is one ASSERT if the significance is equal to zero. However, significance might be equal to zero sometimes, and this is not an issue for a ceil function, but the current ASSERT will trigger warnings in those cases. This commit removes the ASSERT if the significance is equal to zero to avoid unnecessary noise. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Chaitanya Dhere Signed-off-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher (cherry picked from commit 332315885d3ccc6d8fe99700f3c2e4c24aa65ab7) commit 4ab68e168ae1695f7c04fae98930740aaf7c50fa Author: Sung Joon Kim Date: Mon Jul 8 19:29:49 2024 -0400 drm/amd/display: Check for NULL pointer [why & how] Need to make sure plane_state is initialized before accessing its members. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Xi (Alex) Liu Signed-off-by: Sung Joon Kim Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher (cherry picked from commit 295d91cbc700651782a60572f83c24861607b648) commit 6728f55590a667c292cee10c009e16d90f48d63a Author: Jane Jian Date: Mon Jul 15 18:48:31 2024 +0800 drm/amdgpu/vcn: Use offsets local to VCN/JPEG in VF For VCN/JPEG 4.0.3, use only the local addressing scheme. - Mask bit higher than AID0 range v2 remain the case for mmhub use master XCC Signed-off-by: Jane Jian Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher (cherry picked from commit caaf576292f8ccef5cdc0ac16e77b87dbf6e17ab) commit 485432d090016aebf8fb407a44ce7a2f856d11eb Author: Lijo Lazar Date: Mon Dec 11 11:18:42 2023 +0530 drm/amdgpu: Add empty HDP flush function to VCN v4.0.3 VCN 4.0.3 does not HDP flush with RRMT enabled. Instead, mmsch will do the HDP flush. This change is necessary for VCN v4.0.3, no need for backward compatibility Signed-off-by: Lijo Lazar Signed-off-by: Jane Jian Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 49cfaebe48e97500a68d5322a8194736b0a2c3cf) commit 23df34997d386f1442d26f2d8edf44a5b5fee79f Author: Lijo Lazar Date: Mon Dec 11 10:45:38 2023 +0530 drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3 JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead, mmsch fw will do the flush. This change is necessary for JPEG v4.0.3, no need for backward compatibility Signed-off-by: Lijo Lazar Signed-off-by: Jane Jian Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 585e3fdb36f59c5cfed0ae06c852dc1df22b1d60) commit df65aabef3c0327c23b840ab5520150df4db6b5f Author: Ma Ke Date: Thu Jul 18 22:17:35 2024 +0800 drm/amd/amdgpu: Fix uninitialized variable warnings Return 0 to avoid returning an uninitialized variable r. Cc: stable@vger.kernel.org Fixes: 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10") Signed-off-by: Ma Ke Signed-off-by: Alex Deucher (cherry picked from commit 6472de66c0aa18d50a4b5ca85f8272e88a737676) commit 73048bda46c3085df5fd42840de09523386d3e54 Author: David Belanger Date: Mon Jun 10 16:38:55 2024 -0400 drm/amdgpu: Fix atomics on GFX12 If PCIe supports atomics, configure register to prevent DF from breaking atomics in separate load/store operations. Signed-off-by: David Belanger Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher (cherry picked from commit 666f14cab21b17ccc1bdfe1e82458aa429b3b7e0) commit a03ebf116303e5d13ba9a2b65726b106cb1e96f6 Author: Alex Deucher Date: Tue Jul 9 17:54:11 2024 -0400 drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell We seem to have a case where SDMA will sometimes miss a doorbell if GFX is entering the powergating state when the doorbell comes in. To workaround this, we can update the wptr via MMIO, however, this is only safe because we disallow gfxoff in begin_ring() for SDMA 5.2 and then allow it again in end_ring(). Enable this workaround while we are root causing the issue with the HW team. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/3440 Tested-by: Friedrich Vock Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit f2ac52634963fc38e4935e11077b6f7854e5d700) commit c33ffdb70cc6df4105160f991288e7d2567d7ffa Merge: ad7b0b7b87bb1 2a011c3c12e8d Author: Linus Torvalds Date: Wed Jul 24 13:11:28 2024 -0700 Merge tag 'phy-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "New Support - Samsung Exynos gs101 drd combo phy - Qualcomm SC8180x USB uniphy, IPQ9574 QMP PCIe phy - Airoha EN7581 PCIe phy - Freescale i.MX8Q HSIO SerDes phy - Starfive jh7110 dphy tx Updates: - Resume support for j721e-wiz driver - Updates to Exynos usbdrd driver - Support for optional power domains in g12a usb2-phy driver - Debugfs support and updates to zynqmp driver" * tag 'phy-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (56 commits) phy: airoha: Add dtime and Rx AEQ IO registers dt-bindings: phy: airoha: Add dtime and Rx AEQ IO registers dt-bindings: phy: rockchip-emmc-phy: Convert to dtschema dt-bindings: phy: qcom,qmp-usb: fix spelling error phy: exynos5-usbdrd: support Exynos USBDRD 3.1 combo phy (HS & SS) phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk phy: exynos5-usbdrd: convert (phy) register access clock to clk_bulk phy: exynos5-usbdrd: convert core clocks to clk_bulk phy: exynos5-usbdrd: support isolating HS and SS ports independently dt-bindings: phy: samsung,usb3-drd-phy: add gs101 compatible phy: core: Fix documentation of of_phy_get phy: starfive: Correct the dphy configure process phy: zynqmp: Add debugfs support phy: zynqmp: Take the phy mutex in xlate phy: zynqmp: Only wait for PLL lock "primary" instances phy: zynqmp: Store instance instead of type phy: zynqmp: Enable reference clock correctly phy: cadence-torrent: Check return value on register read phy: Fix the cacography in phy-exynos5250-usb2.c phy: phy-rockchip-samsung-hdptx: Select CONFIG_MFD_SYSCON ... commit ad7b0b7b87bb19ea7ee71e165e597f5fbfac76ab Merge: 7a46b17d4c00c fdd3d14ca3c8c Author: Linus Torvalds Date: Wed Jul 24 13:04:43 2024 -0700 Merge tag 'soundwire-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: - Simplification across subsystem using cleanup.h - Support for debugfs to read/write commands - Few Intel and Qualcomm driver updates * tag 'soundwire-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: debugfs: simplify with cleanup.h soundwire: cadence: simplify with cleanup.h soundwire: intel_ace2x: simplify with cleanup.h soundwire: intel_ace2x: simplify return path in hw_params soundwire: intel: simplify with cleanup.h soundwire: intel: simplify return path in hw_params soundwire: amd_init: simplify with cleanup.h soundwire: amd: simplify with cleanup.h soundwire: amd: simplify return path in hw_params soundwire: intel_auxdevice: start the bus at default frequency soundwire: intel_auxdevice: add cs42l43 codec to wake_capable_list drivers:soundwire: qcom: cleanup port maask calculations soundwire: bus: simplify by using local slave->prop soundwire: generic_bandwidth_allocation: change port_bo parameter to pointer soundwire: Intel: clarify Copyright information soundwire: intel_ace2.x: add AC timing extensions for PantherLake soundwire: bus: add stream refcount soundwire: debugfs: add interface to read/write commands commit 7a46b17d4c00c2547b5bd82eec9489b19128fd65 Merge: 7a3fad30fd8b4 b8ec9dba02a74 Author: Linus Torvalds Date: Wed Jul 24 12:34:47 2024 -0700 Merge tag 'dmaengine-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "New support: - New dmaengine_prep_peripheral_dma_vec() to support transfers using dma vectors and documentation and user in AXI dma - STMicro STM32 DMA3 support and new capabilities of cyclic dma Updates: - Yaml conversion for Freescale imx dma and qdma bindings, sprd sc9860 dma binding - Altera msgdma updates for descriptor management" * tag 'dmaengine-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (35 commits) dt-bindings: fsl-qdma: fix interrupts 'if' check logic dt-bindings: dma: sprd,sc9860-dma: convert to YAML dmaengine: fsl-dpaa2-qdma: add missing MODULE_DESCRIPTION() macro dmaengine: ti: add missing MODULE_DESCRIPTION() macros dmaengine: ti: cppi41: add missing MODULE_DESCRIPTION() macro dmaengine: virt-dma: add missing MODULE_DESCRIPTION() macro dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels dmaengine: sh: rz-dmac: Fix lockdep assert warning dmaengine: qcom: gpi: clean up the IRQ disable/enable in gpi_reset_chan() dmaengine: fsl-edma: change the memory access from local into remote mode in i.MX 8QM dmaengine: qcom: gpi: remove unused struct 'reg_info' dmaengine: moxart-dma: remove unused struct 'moxart_filter_data' dt-bindings: fsl-qdma: Convert to yaml format dmaengine: fsl-edma: remove redundant "idle" field from fsl_chan dmaengine: fsl-edma: request per-channel IRQ only when channel is allocated dmaengine: stm32-dma3: defer channel registration to specify channel name dmaengine: add channel device name to channel registration dmaengine: stm32-dma3: improve residue granularity dmaengine: stm32-dma3: add device_pause and device_resume ops dmaengine: stm32-dma3: add DMA_MEMCPY capability ... commit 78eb4ea25cd5fdbdae7eb9fdf87b99195ff67508 Author: Joel Granados Date: Wed Jul 24 20:59:29 2024 +0200 sysctl: treewide: constify the ctl_table argument of proc_handlers const qualify the struct ctl_table argument in the proc_handler function signatures. This is a prerequisite to moving the static ctl_table structs into .rodata data which will ensure that proc_handler function pointers cannot be modified. This patch has been generated by the following coccinelle script: ``` virtual patch @r1@ identifier ctl, write, buffer, lenp, ppos; identifier func !~ "appldata_(timer|interval)_handler|sched_(rt|rr)_handler|rds_tcp_skbuf_handler|proc_sctp_do_(hmac_alg|rto_min|rto_max|udp_port|alpha_beta|auth|probe_interval)"; @@ int func( - struct ctl_table *ctl + const struct ctl_table *ctl ,int write, void *buffer, size_t *lenp, loff_t *ppos); @r2@ identifier func, ctl, write, buffer, lenp, ppos; @@ int func( - struct ctl_table *ctl + const struct ctl_table *ctl ,int write, void *buffer, size_t *lenp, loff_t *ppos) { ... } @r3@ identifier func; @@ int func( - struct ctl_table * + const struct ctl_table * ,int , void *, size_t *, loff_t *); @r4@ identifier func, ctl; @@ int func( - struct ctl_table *ctl + const struct ctl_table *ctl ,int , void *, size_t *, loff_t *); @r5@ identifier func, write, buffer, lenp, ppos; @@ int func( - struct ctl_table * + const struct ctl_table * ,int write, void *buffer, size_t *lenp, loff_t *ppos); ``` * Code formatting was adjusted in xfs_sysctl.c to comply with code conventions. The xfs_stats_clear_proc_handler, xfs_panic_mask_proc_handler and xfs_deprecated_dointvec_minmax where adjusted. * The ctl_table argument in proc_watchdog_common was const qualified. This is called from a proc_handler itself and is calling back into another proc_handler, making it necessary to change it as part of the proc_handler migration. Co-developed-by: Thomas Weißschuh Signed-off-by: Thomas Weißschuh Co-developed-by: Joel Granados Signed-off-by: Joel Granados commit e0ff0cff1f6cdce0aa596aac04129893201c4162 Author: Georgia Garcia Date: Mon Jun 10 09:51:48 2024 -0300 apparmor: unpack transition table if dfa is not present Due to a bug in earlier userspaces, a transition table may be present even when the dfa is not. Commit 7572fea31e3e ("apparmor: convert fperm lookup to use accept as an index") made the verification check more rigourous regressing old userspaces with the bug. For compatibility reasons allow the orphaned transition table during unpack and discard. Fixes: 7572fea31e3e ("apparmor: convert fperm lookup to use accept as an index") Signed-off-by: Georgia Garcia Signed-off-by: John Johansen commit f4fee216df7d28b87d1c9cc60bcebfecb51c1a05 Author: Mateusz Guzik Date: Thu Jun 20 19:15:27 2024 +0200 apparmor: try to avoid refing the label in apparmor_file_open If the label is not stale (which is the common case), the fact that the passed file object holds a reference can be leverged to avoid the ref/unref cycle. Doing so reduces performance impact of apparmor on parallel open() invocations. When benchmarking on a 24-core vm using will-it-scale's open1_process ("Separate file open"), the results are (ops/s): before: 6092196 after: 8309726 (+36%) Signed-off-by: Mateusz Guzik Signed-off-by: John Johansen commit 445d336cd15860f1efb441e6d694f829fbf679eb Author: Dmitry Osipenko Date: Sun Jul 14 23:50:09 2024 +0300 drm/virtio: Fix type of dma-fence context variable Type of DMA fence context is u64. Fence-waiting code uses u32 for the context variable, fix it. Fixes: e4812ab8e6b1 ("drm/virtio: Refactor and optimize job submission code path") Cc: # v6.4+ Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20240714205009.3408298-1-dmitry.osipenko@collabora.com commit 4b954a025591a1c7d3a0c0111b6d4730596046b6 Author: Jeff Johnson Date: Wed May 29 18:21:39 2024 -0700 apparmor: test: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in security/apparmor/apparmor_policy_unpack_test.o Signed-off-by: Jeff Johnson Signed-off-by: John Johansen commit 33be0cfa5ba522ba88ba25cb95e582932843409b Author: Alexander Mikhalitsyn Date: Fri Jun 28 17:37:12 2024 +0200 apparmor: take nosymfollow flag into account A "nosymfollow" flag was added in commit dab741e0e02b ("Add a "nosymfollow" mount option.") While we don't need to implement any special logic on the AppArmor kernel side to handle it, we should provide user with a correct list of mount flags in audit logs. Signed-off-by: Alexander Mikhalitsyn Reviewed-by: Georgia Garcia Signed-off-by: John Johansen commit 7a3fad30fd8b4b5e370906b3c554f64026f56c2f Merge: d1e9a63dcd724 ad8070cb1b4bd Author: Linus Torvalds Date: Wed Jul 24 10:29:50 2024 -0700 Merge tag 'random-6.11-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random Pull random number generator updates from Jason Donenfeld: "This adds getrandom() support to the vDSO. First, it adds a new kind of mapping to mmap(2), MAP_DROPPABLE, which lets the kernel zero out pages anytime under memory pressure, which enables allocating memory that never gets swapped to disk but also doesn't count as being mlocked. Then, the vDSO implementation of getrandom() is introduced in a generic manner and hooked into random.c. Next, this is implemented on x86. (Also, though it's not ready for this pull, somebody has begun an arm64 implementation already) Finally, two vDSO selftests are added. There are also two housekeeping cleanup commits" * tag 'random-6.11-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: MAINTAINERS: add random.h headers to RNG subsection random: note that RNDGETPOOL was removed in 2.6.9-rc2 selftests/vDSO: add tests for vgetrandom x86: vdso: Wire up getrandom() vDSO implementation random: introduce generic vDSO getrandom() implementation mm: add MAP_DROPPABLE for designating always lazily freeable mappings commit d1e9a63dcd7248385bbbccf1650d69e4af914f05 Merge: e44be00289ef3 f5e5e97c719d2 Author: Linus Torvalds Date: Wed Jul 24 09:42:51 2024 -0700 Merge tag 'vfs-6.11-rc1.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "VFS: - The new 64bit mount ids start after the old mount id, i.e., at the first non-32 bit value. However, we started counting one id too late and thus lost 4294967296 as the first valid id. Fix that. - Update a few comments on some vfs_*() creation helpers. - Move copying of the xattr name out from the locks required to start a filesystem write. - Extend the filelock lock UAF fix to the compat code as well. - Now that we added the ability to look up an inode under RCU it's possible that lockless hash lookup can find and lock an inode after it gets I_FREEING set. It then waits until inode teardown in evict() is finished. The flag however is still set after evict() has woken up all waiters. If the inode lock is taken late enough on the waiting side after hash removal and wakeup happened the waiting thread will never be woken. Before RCU based lookup this was synchronized via the inode_hash_lock. But since unhashing requires the inode lock as well we can check whether the inode is unhashed while holding inode lock even without holding inode_hash_lock. pidfd: - The nsproxy structure contains nearly all of the namespaces associated with a task. When a namespace type isn't supported nsproxy might contain a NULL pointer or always point to the initial namespace type. The logic isn't consistent. So when deriving namespace fds we need to ensure that the namespace type is supported. First, so that we don't risk dereferncing NULL pointers. The correct bigger fix would be to change all namespaces to always set a valid namespace pointer in struct nsproxy independent of whether or not it is compiled in. But that requires quite a few changes. Second, so that we don't allow deriving namespace fds when the namespace type doesn't exist and thus when they couldn't also be derived via /proc/self/ns/. - Add missing selftests for the new pidfd ioctls to derive namespace fds. This simply extends the already existing testsuite. netfs: - Fix debug logging and fix kconfig variable name so it actually works. - Fix writeback that goes both to the server and cache. The streams are only activated once a subreq is added. When a server write happens the subreq doesn't need to have finished by the time the cache write is started. If the server write has already finished by the time the cache write is about to start the cache write will operate on a folio that might already have been reused. Fix this by preactivating the cache write. - Limit cachefiles subreq size for cache writes to MAX_RW_COUNT" * tag 'vfs-6.11-rc1.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: inode: clarify what's locked vfs: Fix potential circular locking through setxattr() and removexattr() filelock: Fix fcntl/close race recovery compat path fs: use all available ids cachefiles: Set the max subreq size for cache writes to MAX_RW_COUNT netfs: Fix writeback that needs to go to both server and cache pidfs: add selftests for new namespace ioctls pidfs: handle kernels without namespaces cleanly pidfs: when time ns disabled add check for ioctl vfs: correct the comments of vfs_*() helpers vfs: handle __wait_on_freeing_inode() and evict() race netfs: Rename CONFIG_FSCACHE_DEBUG to CONFIG_NETFS_DEBUG netfs: Revert "netfs: Switch debug logging to pr_debug()" commit facdbdfe0e6202d74758387ae9189c39f7b4b16c Author: Benjamin Tissoires Date: Tue Jul 23 18:21:54 2024 +0200 selftests/hid: add test for attaching multiple time the same struct_ops Turns out that we would en up in a bad state if we attempt to attach twice the same HID-BPF struct_ops, so have a test for it. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-4-b9d770346784@kernel.org Signed-off-by: Benjamin Tissoires commit acd34cfc48b3dd46e5e4c4bdc99cc0c15568bac0 Author: Benjamin Tissoires Date: Tue Jul 23 18:21:53 2024 +0200 HID: bpf: prevent the same struct_ops to be attached more than once If the struct_ops is already attached, we should bail out or we will end up in various locks and pointer issues while unregistering. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-3-b9d770346784@kernel.org Signed-off-by: Benjamin Tissoires commit f64c1a4593391c57accf32693a14ef45f8162b5c Author: Benjamin Tissoires Date: Tue Jul 23 18:21:52 2024 +0200 selftests/hid: disable struct_ops auto-attach Since commit 08ac454e258e ("libbpf: Auto-attach struct_ops BPF maps in BPF skeleton"), libbpf automatically calls bpf_map__attach_struct_ops() on every struct_ops it sees in the bpf object. The problem is that our test bpf object has many of them but only one should be manually loaded at a time, or we end up locking the syscall. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-2-b9d770346784@kernel.org Signed-off-by: Benjamin Tissoires commit ff9fbcafbaf13346c742c0d672a22f5ac20b9d92 Author: Benjamin Tissoires Date: Tue Jul 23 18:21:51 2024 +0200 selftests/hid: fix bpf_wq new API Since commit f56f4d541eab ("bpf: helpers: fix bpf_wq_set_callback_impl signature"), the API for bpf_wq changed a bit. We need to update the selftests/hid code to reflect that or the bpf program will not load. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-1-b9d770346784@kernel.org Signed-off-by: Benjamin Tissoires commit e44be00289ef3ce8195d915cf354714b14fd30a4 Author: Linus Torvalds Date: Tue Jul 23 18:14:54 2024 -0700 hostfs: fix folio conversion Commit e3ec0fe944d2 ("hostfs: Convert hostfs_read_folio() to use a folio") simplified hostfs_read_folio(), but in the process of converting to using folios natively also mis-used the folio_zero_tail() function due to the very confusing API of that function. Very arguably it's folio_zero_tail() API itself that is buggy, since it would make more sense (and the documentation kind of implies) that the third argument would be the pointer to the beginning of the folio buffer. But no, the third argument to folio_zero_tail() is where we should start zeroing the tail (even if we already also pass in the offset separately as the second argument). So fix the hostfs caller, and we can leave any folio_zero_tail() sanity cleanup for later. Reported-and-tested-by: Maciej Żenczykowski Fixes: e3ec0fe944d2 ("hostfs: Convert hostfs_read_folio() to use a folio") Link: https://lore.kernel.org/all/CANP3RGceNzwdb7w=vPf5=7BCid5HVQDmz1K5kC9JG42+HVAh_g@mail.gmail.com/ Cc: Matthew Wilcox Cc: Christian Brauner Signed-off-by: Linus Torvalds commit e6e18021ddd0dc5af487fb86b6d7c964e062d692 Author: Luke D. Jones Date: Tue Jul 23 13:12:24 2024 +1200 ALSA: hda/realtek: cs35l41: Fixup remaining asus strix models Adjust quirks for 0x3a20, 0x3a30, 0x3a50 to match the 0x3a60. This set has now been confirmed to work with this patch. Signed-off-by: Luke D. Jones Fixes: 811dd426a9b1 ("ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41") Cc: Link: https://patch.msgid.link/20240723011224.115579-1-luke@ljones.dev Signed-off-by: Takashi Iwai commit 55fbb9a5d64e0e590cad5eacc16c99f2482a008f Author: Ming Lei Date: Wed Jul 24 22:33:11 2024 +0800 ublk: fix UBLK_CMD_DEL_DEV_ASYNC handling In ublk_ctrl_uring_cmd(), ioctl command NR should be used for matching _IOC_NR(cmd_op). Fix it by adding one private macro, and this way is clean. Fixes: 13fe8e6825e4 ("ublk: add UBLK_CMD_DEL_DEV_ASYNC") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20240724143311.2646330-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 7e04da2dc7013af50ed3a2beb698d5168d1e594b Author: Yang Yang Date: Wed Jul 24 15:04:12 2024 +0800 block: fix deadlock between sd_remove & sd_release Our test report the following hung task: [ 2538.459400] INFO: task "kworker/0:0":7 blocked for more than 188 seconds. [ 2538.459427] Call trace: [ 2538.459430] __switch_to+0x174/0x338 [ 2538.459436] __schedule+0x628/0x9c4 [ 2538.459442] schedule+0x7c/0xe8 [ 2538.459447] schedule_preempt_disabled+0x24/0x40 [ 2538.459453] __mutex_lock+0x3ec/0xf04 [ 2538.459456] __mutex_lock_slowpath+0x14/0x24 [ 2538.459459] mutex_lock+0x30/0xd8 [ 2538.459462] del_gendisk+0xdc/0x350 [ 2538.459466] sd_remove+0x30/0x60 [ 2538.459470] device_release_driver_internal+0x1c4/0x2c4 [ 2538.459474] device_release_driver+0x18/0x28 [ 2538.459478] bus_remove_device+0x15c/0x174 [ 2538.459483] device_del+0x1d0/0x358 [ 2538.459488] __scsi_remove_device+0xa8/0x198 [ 2538.459493] scsi_forget_host+0x50/0x70 [ 2538.459497] scsi_remove_host+0x80/0x180 [ 2538.459502] usb_stor_disconnect+0x68/0xf4 [ 2538.459506] usb_unbind_interface+0xd4/0x280 [ 2538.459510] device_release_driver_internal+0x1c4/0x2c4 [ 2538.459514] device_release_driver+0x18/0x28 [ 2538.459518] bus_remove_device+0x15c/0x174 [ 2538.459523] device_del+0x1d0/0x358 [ 2538.459528] usb_disable_device+0x84/0x194 [ 2538.459532] usb_disconnect+0xec/0x300 [ 2538.459537] hub_event+0xb80/0x1870 [ 2538.459541] process_scheduled_works+0x248/0x4dc [ 2538.459545] worker_thread+0x244/0x334 [ 2538.459549] kthread+0x114/0x1bc [ 2538.461001] INFO: task "fsck.":15415 blocked for more than 188 seconds. [ 2538.461014] Call trace: [ 2538.461016] __switch_to+0x174/0x338 [ 2538.461021] __schedule+0x628/0x9c4 [ 2538.461025] schedule+0x7c/0xe8 [ 2538.461030] blk_queue_enter+0xc4/0x160 [ 2538.461034] blk_mq_alloc_request+0x120/0x1d4 [ 2538.461037] scsi_execute_cmd+0x7c/0x23c [ 2538.461040] ioctl_internal_command+0x5c/0x164 [ 2538.461046] scsi_set_medium_removal+0x5c/0xb0 [ 2538.461051] sd_release+0x50/0x94 [ 2538.461054] blkdev_put+0x190/0x28c [ 2538.461058] blkdev_release+0x28/0x40 [ 2538.461063] __fput+0xf8/0x2a8 [ 2538.461066] __fput_sync+0x28/0x5c [ 2538.461070] __arm64_sys_close+0x84/0xe8 [ 2538.461073] invoke_syscall+0x58/0x114 [ 2538.461078] el0_svc_common+0xac/0xe0 [ 2538.461082] do_el0_svc+0x1c/0x28 [ 2538.461087] el0_svc+0x38/0x68 [ 2538.461090] el0t_64_sync_handler+0x68/0xbc [ 2538.461093] el0t_64_sync+0x1a8/0x1ac T1: T2: sd_remove del_gendisk __blk_mark_disk_dead blk_freeze_queue_start ++q->mq_freeze_depth bdev_release mutex_lock(&disk->open_mutex) sd_release scsi_execute_cmd blk_queue_enter wait_event(!q->mq_freeze_depth) mutex_lock(&disk->open_mutex) SCSI does not set GD_OWNS_QUEUE, so QUEUE_FLAG_DYING is not set in this scenario. This is a classic ABBA deadlock. To fix the deadlock, make sure we don't try to acquire disk->open_mutex after freezing the queue. Cc: stable@vger.kernel.org Fixes: eec1be4c30df ("block: delete partitions later in del_gendisk") Signed-off-by: Yang Yang Reviewed-by: Ming Lei Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Fixes: and Cc: stable tags are missing. Otherwise this patch looks fine Link: https://lore.kernel.org/r/20240724070412.22521-1-yang.yang@vivo.com Signed-off-by: Jens Axboe commit cc374782b6ca0fd634482391da977542443d3368 Author: Mickaël Salaün Date: Wed Jul 24 16:54:26 2024 +0200 selftests/landlock: Add cred_transfer test Check that keyctl(KEYCTL_SESSION_TO_PARENT) preserves the parent's restrictions. Fixes: e1199815b47b ("selftests/landlock: Add user space tests") Co-developed-by: Jann Horn Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20240724.Ood5aige9she@digikod.net Signed-off-by: Mickaël Salaün commit 39705a6c29f8a2b93cf5b99528a55366c50014d1 Author: Jann Horn Date: Wed Jul 24 14:49:01 2024 +0200 landlock: Don't lose track of restrictions on cred_transfer When a process' cred struct is replaced, this _almost_ always invokes the cred_prepare LSM hook; but in one special case (when KEYCTL_SESSION_TO_PARENT updates the parent's credentials), the cred_transfer LSM hook is used instead. Landlock only implements the cred_prepare hook, not cred_transfer, so KEYCTL_SESSION_TO_PARENT causes all information on Landlock restrictions to be lost. This basically means that a process with the ability to use the fork() and keyctl() syscalls can get rid of all Landlock restrictions on itself. Fix it by adding a cred_transfer hook that does the same thing as the existing cred_prepare hook. (Implemented by having hook_cred_prepare() call hook_cred_transfer() so that the two functions are less likely to accidentally diverge in the future.) Cc: stable@kernel.org Fixes: 385975dca53e ("landlock: Set up the security framework and manage credentials") Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20240724-landlock-houdini-fix-v1-1-df89a4560ca3@google.com Signed-off-by: Mickaël Salaün commit 66381d36771e4ffedbea0dd23da17cf3d38e9aae Author: Yunhui Cui Date: Mon Jun 17 21:14:25 2024 +0800 RISC-V: Select ACPI PPTT drivers After adding ACPI support to populate_cache_leaves(), RISC-V can build cacheinfo through the ACPI PPTT table, thus enabling the ACPI_PPTT configuration. Signed-off-by: Yunhui Cui Reviewed-by: Jeremy Linton Reviewed-by: Sudeep Holla Reviewed-by: Sunil V L Link: https://lore.kernel.org/r/20240617131425.7526-3-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt commit 604f32ea6909b0ebb8ab0bf1ab7dc66ee3dc8955 Author: Yunhui Cui Date: Mon Jun 17 21:14:24 2024 +0800 riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT Before cacheinfo can be built correctly, we need to initialize level and type. Since RISC-V currently does not have a register group that describes cache-related attributes like ARM64, we cannot obtain them directly, so now we obtain cache leaves from the ACPI PPTT table (acpi_get_cache_info()) and set the cache type through split_levels. Suggested-by: Jeremy Linton Suggested-by: Sudeep Holla Reviewed-by: Conor Dooley Reviewed-by: Sunil V L Reviewed-by: Jeremy Linton Reviewed-by: Sudeep Holla Signed-off-by: Yunhui Cui Link: https://lore.kernel.org/r/20240617131425.7526-2-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt commit ee3fab10cb1566562aa683f319066eaeecccf918 Author: Yunhui Cui Date: Mon Jun 17 21:14:23 2024 +0800 riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init() ci_leaf_init() is a declared static function. The implementation of the function body and the caller do not use the parameter (struct device_node *node) input parameter, so remove it. Fixes: 6a24915145c9 ("Revert "riscv: Set more data to cacheinfo"") Signed-off-by: Yunhui Cui Reviewed-by: Jeremy Linton Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20240617131425.7526-1-cuiyunhui@bytedance.com Signed-off-by: Palmer Dabbelt commit 38738947db38520b58b7dae64bd0eec513e83139 Author: Sia Jee Heng Date: Thu May 2 00:37:51 2024 -0700 RISC-V: ACPI: Enable SPCR table for console output on RISC-V The ACPI SPCR code has been used to enable console output for ARM64 and X86. The same code can be reused for RISC-V. Furthermore, SPCR table is mandated for headless system as outlined in the RISC-V BRS Specification, chapter 6. Signed-off-by: Sia Jee Heng Reviewed-by: Sunil V L Link: https://lore.kernel.org/r/20240502073751.102093-2-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit 7c938e438c56dbbe1aceb128c46cebb340a3c06b Author: Jakub Kicinski Date: Tue Jul 23 15:34:05 2024 -0700 MAINTAINERS: make Breno the netconsole maintainer netconsole has no maintainer, and Breno has been working on improving it consistently for some time. So I think we found the maintainer :) Acked-by: Paolo Abeni Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski Acked-by: Breno Leitao Signed-off-by: David S. Miller commit 0fa9af961102cf3a4cbf591a50f376c8ab1cf443 Author: Jay Vosburgh Date: Tue Jul 23 15:22:36 2024 -0700 MAINTAINERS: Update bonding entry Update my email address, clarify support status, and delete the web site that hasn't been used in a long time. Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller commit 6d745cd0e9720282cd291d36b9db528aea18add2 Author: Petr Machata Date: Tue Jul 23 18:04:16 2024 +0200 net: nexthop: Initialize all fields in dumped nexthops struct nexthop_grp contains two reserved fields that are not initialized by nla_put_nh_group(), and carry garbage. This can be observed e.g. with strace (edited for clarity): # ip nexthop add id 1 dev lo # ip nexthop add id 101 group 1 # strace -e recvmsg ip nexthop get id 101 ... recvmsg(... [{nla_len=12, nla_type=NHA_GROUP}, [{id=1, weight=0, resvd1=0x69, resvd2=0x67}]] ...) = 52 The fields are reserved and therefore not currently used. But as they are, they leak kernel memory, and the fact they are not just zero complicates repurposing of the fields for new ends. Initialize the full structure. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit e9dbebae2e3c338122716914fe105458f41e3a4a Author: Simon Horman Date: Tue Jul 23 14:29:27 2024 +0100 net: stmmac: Correct byte order of perfect_match The perfect_match parameter of the update_vlan_hash operation is __le16, and is correctly converted from host byte-order in the lone caller, stmmac_vlan_update(). However, the implementations of this caller, dwxgmac2_update_vlan_hash() and dwxgmac2_update_vlan_hash(), both treat this parameter as host byte order, using the following pattern: u32 value = ... ... writel(value | perfect_match, ...); This is not correct because both: 1) value is host byte order; and 2) writel expects a host byte order value as it's first argument I believe that this will break on big endian systems. And I expect it has gone unnoticed by only being exercised on little endian systems. The approach taken by this patch is to update the callback, and it's caller to simply use a host byte order value. Flagged by Sparse. Compile tested only. Fixes: c7ab0b8088d7 ("net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available") Signed-off-by: Simon Horman Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit 29d63b94036e561a016ec8878b44aad6650d23e2 Author: Pavel Begunkov Date: Wed Jul 24 12:16:21 2024 +0100 io_uring: align iowq and task request error handling There is a difference in how io_queue_sqe and io_wq_submit_work treat error codes they get from io_issue_sqe. The first one fails anything unknown but latter only fails when the code is negative. It doesn't make sense to have this discrepancy, align them to the io_queue_sqe behaviour. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c550e152bf4a290187f91a4322ddcb5d6d1f2c73.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a2b72b81fb3ba18717fc000949ca9d45a3351130 Author: Pavel Begunkov Date: Wed Jul 24 12:16:20 2024 +0100 io_uring: kill REQ_F_CANCEL_SEQ We removed the reliance on the flag by the cancellation path and now it's unused. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e57afe566bbe4fefeb44daffb08900f2a4756577.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f1dcdfcadb0c8c13dddd931c1f4dc58e54fdc9c0 Author: Pavel Begunkov Date: Wed Jul 24 12:16:19 2024 +0100 io_uring: simplify io_uring_cmd return We don't have to return error code from an op handler back to core io_uring, so once io_uring_cmd() sets the results and handles errors we can juts return IOU_OK and simplify the code. Note, only valid with e0b23d9953b0c ("io_uring: optimise ltimeout for inline execution"), there was a problem with iopoll before. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8eae2be5b2a49236cd5f1dadbd1aa5730e9e2d4f.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e142e9cd8891b0c6f277ac2c2c254199a6aa56e3 Author: Pavel Begunkov Date: Wed Jul 24 12:16:18 2024 +0100 io_uring: fix io_match_task must_hold The __must_hold annotation in io_match_task() uses a non existing parameter "req", fix it. Fixes: 6af3f48bf6156 ("io_uring: fix link traversal locking") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3e65ee7709e96507cef3d93291746f2c489f2307.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit bd44d7e902c2b34c217d3b48874b079760ca7b6e Author: Pavel Begunkov Date: Wed Jul 24 12:16:17 2024 +0100 io_uring: don't allow netpolling with SETUP_IOPOLL IORING_SETUP_IOPOLL rings don't have any netpoll handling, let's fail attempts to register netpolling in this case, there might be people who will mix up IOPOLL and netpoll. Cc: stable@vger.kernel.org Fixes: ef1186c1a875b ("io_uring: add register/unregister napi function") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1e7553aee0a8ae4edec6742cd6dd0c1e6914fba8.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f8b632e89a101dae349a7b212c1771d7925f441b Author: Pavel Begunkov Date: Wed Jul 24 12:16:16 2024 +0100 io_uring: tighten task exit cancellations io_uring_cancel_generic() should retry if any state changes like a request is completed, however in case of a task exit it only goes for another loop and avoids schedule() if any tracked (i.e. REQ_F_INFLIGHT) request got completed. Let's assume we have a non-tracked request executing in iowq and a tracked request linked to it. Let's also assume io_uring_cancel_generic() fails to find and cancel the request, i.e. via io_run_local_work(), which may happen as io-wq has gaps. Next, the request logically completes, io-wq still hold a ref but queues it for completion via tw, which happens in io_uring_try_cancel_requests(). After, right before prepare_to_wait() io-wq puts the request, grabs the linked one and tries executes it, e.g. arms polling. Finally the cancellation loop calls prepare_to_wait(), there are no tw to run, no tracked request was completed, so the tctx_inflight() check passes and the task is put to indefinite sleep. Cc: stable@vger.kernel.org Fixes: 3f48cf18f886c ("io_uring: unify files and task cancel") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/acac7311f4e02ce3c43293f8f1fda9c705d158f1.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8d22d0db5bbcec95c70e025dce3d00821da8be7d Author: Jisheng Zhang Date: Thu Jun 13 23:30:53 2024 +0800 riscv: boot: remove duplicated targets line The "targets:" is duplicated in another line, remove the one with less targets. Signed-off-by: Jisheng Zhang Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20240613153053.3835-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 3308172276db5d070975d9a321283fcd423ce465 Author: Jinjie Ruan Date: Thu Jun 13 19:13:47 2024 +0800 trace: riscv: Remove deprecated kprobe on ftrace support Since commit 7caa9765465f60 ("ftrace: riscv: move from REGS to ARGS"), kprobe on ftrace is not supported by riscv, because riscv's support for FTRACE_WITH_REGS has been replaced with support for FTRACE_WITH_ARGS, and KPROBES_ON_FTRACE will be supplanted by FPROBES. So remove the deprecated kprobe on ftrace support, which is misunderstood. Signed-off-by: Jinjie Ruan Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20240613111347.1745379-1-ruanjinjie@huawei.com Signed-off-by: Palmer Dabbelt commit 863ff546fb62a8fa75757a30794ab6ec6cc4bab7 Author: Hangbin Liu Date: Tue Jul 23 16:22:52 2024 +0800 selftests: forwarding: skip if kernel not support setting bridge fdb learning limit If the testing kernel doesn't support setting fdb_max_learned or show fdb_n_learned, just skip it. Or we will get errors like ./bridge_fdb_learning_limit.sh: line 218: [: null: integer expression expected ./bridge_fdb_learning_limit.sh: line 225: [: null: integer expression expected Fixes: 6f84090333bb ("selftests: forwarding: bridge_fdb_learning_limit: Add a new selftest") Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Reviewed-by: Johannes Nixdorf Signed-off-by: David S. Miller commit fa96c6baef1b5385e2f0c0677b32b3839e716076 Author: Shigeru Yoshida Date: Tue Jul 16 11:09:05 2024 +0900 tipc: Return non-zero value from tipc_udp_addr2str() on error tipc_udp_addr2str() should return non-zero value if the UDP media address is invalid. Otherwise, a buffer overflow access can occur in tipc_media_addr_printf(). Fix this by returning 1 on an invalid UDP media address. Fixes: d0f91938bede ("tipc: add ip/udp media type") Signed-off-by: Shigeru Yoshida Reviewed-by: Tung Nguyen Signed-off-by: David S. Miller commit f7c1b0e4ae47e67c6f9af84568a5f4a80638ccd8 Author: Rafael J. Wysocki Date: Thu Jul 18 21:01:14 2024 +0200 thermal: core: Back off when polling thermal zones on errors Commit a8a261774466 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid") introduced a polling mechanism by which the thermal core attampts to get a valid temperature value for thermal zones where the .get_temp() callback returns errors to start with (for example, due to initialization ordering woes). However, this polling is carried out periodically ad infinitum and every iteration of it causes a message to be printed to the kernel log which means a lot of log noise on systems where there are thermal zones that never get ready for some reason. It is also not really useful to continuously poll thermal zones that never respond. To address this, modify the thermal core to increase the delay between consecutive thermal zone temperature checks after every check that fails until it reaches a certain maximum value. At that point, the thermal zone in question will be disabled, but user space will be able to reenable it if it believes that the failure is transient. Also change the code to print messages regarding failed temperature checks to the kernel log only twice, once when the thermal zone's .get_temp() callback returns an error for the first time and once when disabling the given thermal zone. In addition, a dev_crit() message will be printed at that point if the given thermal zone contains a critical trip point to notify the system operator about the situation. Fixes: a8a261774466 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid") Link: https://lore.kernel.org/linux-acpi/CAGnHSE=RyPK++UG0-wAtVKgeJxe0uzFYgLxm+RUOKKoQquW=Ow@mail.gmail.com/ Reported-by: Tom Yan Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2962033.e9J7NaK4W3@rjwysocki.net commit e6fc5fcaeffa04a3fa1db8dfccdfd4b6001c0446 Author: Peter Ujfalusi Date: Wed Jul 24 11:19:32 2024 +0300 ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on unprepare The DMA Link ID is set to the IPC message's primary during dai_config, which is only during hw_params. During xrun handling the hw_params is not called and the DMA Link ID information will be lost. All other fields in the message expected to be 0 for re-configuration, only the DMA Link ID needs to be preserved and the in case of repeated dai_config, it is correctly updated (masked and then set). Cc: stable@vger.kernel.org Fixes: ca5ce0caa67f ("ASoC: SOF: ipc4/intel: Add support for chained DMA") Link: https://github.com/thesofproject/linux/issues/5116 Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240724081932.24542-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ae67ed9010a7b52933ad1038d13df8a3aae34b83 Author: Peter Ujfalusi Date: Wed Jul 24 11:19:31 2024 +0300 ASoC: SOF: ipc4-topology: Only handle dai_config with HW_PARAMS for ChainDMA The DMA Link ID is only valid in snd_sof_dai_config_data when the dai_config is called with HW_PARAMS. The commit that this patch fixes is actually moved a code section without changing it, the same bug exists in the original code, needing different patch to kernel prior to 6.9 kernels. Cc: stable@vger.kernel.org Fixes: 3858464de57b ("ASoC: SOF: ipc4-topology: change chain_dma handling in dai_config") Link: https://github.com/thesofproject/linux/issues/5116 Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240724081932.24542-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ba6c664081afd18da86ac49cb22ceb266f89a561 Author: Petr Vorel Date: Wed Jul 24 10:46:55 2024 +0200 kbuild: rpm-pkg: Fix C locale setup semicolon separation in LC_ALL is wrong. Either variable needs to be exported before as a separate commit or set as part of the commit in the beginning. Used second variant. This fixes broken build on user's locale setup which makes 'date' binary to produce invalid characters in rpm changelog (e.g. cs_CZ.UTF-8 'čec'): $ make binrpm-pkg GEN rpmbuild/SPECS/kernel.spec rpmbuild -bb rpmbuild/SPECS/kernel.spec --define='_topdirlinux/rpmbuild' \ --target x86_64-linux --build-in-place --noprep --define='_smp_mflags \ %{nil}' $(rpm -q rpm >/dev/null 2>&1 || echo --nodeps) Building target platforms: x86_64-linux Building for target x86_64-linux error: bad date in %changelog: St čec 24 2024 user make[2]: *** [scripts/Makefile.package:71: binrpm-pkg] Error 1 make[1]: *** [linux/Makefile:1546: binrpm-pkg] Error 2 make: *** [Makefile:224: __sub-make] Error 2 Fixes: 301c10908e42 ("kbuild: rpm-pkg: introduce a simple changelog section for kernel.spec") Signed-off-by: Petr Vorel Reviewed-by: Miguel Ojeda Signed-off-by: Masahiro Yamada commit f5e5e97c719d289025afce07050effcf1f7373ef Author: Christian Brauner Date: Wed Jul 24 10:50:33 2024 +0200 inode: clarify what's locked In __wait_on_freeing_inode() we warn in case the inode_hash_lock is held but the inode is unhashed. We then release the inode_lock. So using "locked" as parameter name is confusing. Use is_inode_hash_locked as parameter name instead. Signed-off-by: Christian Brauner commit c3a5e3e872f3688ae0dc57bb78ca633921d96a91 Author: David Howells Date: Tue Jul 23 09:59:54 2024 +0100 vfs: Fix potential circular locking through setxattr() and removexattr() When using cachefiles, lockdep may emit something similar to the circular locking dependency notice below. The problem appears to stem from the following: (1) Cachefiles manipulates xattrs on the files in its cache when called from ->writepages(). (2) The setxattr() and removexattr() system call handlers get the name (and value) from userspace after taking the sb_writers lock, putting accesses of the vma->vm_lock and mm->mmap_lock inside of that. (3) The afs filesystem uses a per-inode lock to prevent multiple revalidation RPCs and in writeback vs truncate to prevent parallel operations from deadlocking against the server on one side and local page locks on the other. Fix this by moving the getting of the name and value in {get,remove}xattr() outside of the sb_writers lock. This also has the minor benefits that we don't need to reget these in the event of a retry and we never try to take the sb_writers lock in the event we can't pull the name and value into the kernel. Alternative approaches that might fix this include moving the dispatch of a write to the cache off to a workqueue or trying to do without the validation lock in afs. Note that this might also affect other filesystems that use netfslib and/or cachefiles. ====================================================== WARNING: possible circular locking dependency detected 6.10.0-build2+ #956 Not tainted ------------------------------------------------------ fsstress/6050 is trying to acquire lock: ffff888138fd82f0 (mapping.invalidate_lock#3){++++}-{3:3}, at: filemap_fault+0x26e/0x8b0 but task is already holding lock: ffff888113f26d18 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x165/0x250 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&vma->vm_lock->lock){++++}-{3:3}: __lock_acquire+0xaf0/0xd80 lock_acquire.part.0+0x103/0x280 down_write+0x3b/0x50 vma_start_write+0x6b/0xa0 vma_link+0xcc/0x140 insert_vm_struct+0xb7/0xf0 alloc_bprm+0x2c1/0x390 kernel_execve+0x65/0x1a0 call_usermodehelper_exec_async+0x14d/0x190 ret_from_fork+0x24/0x40 ret_from_fork_asm+0x1a/0x30 -> #3 (&mm->mmap_lock){++++}-{3:3}: __lock_acquire+0xaf0/0xd80 lock_acquire.part.0+0x103/0x280 __might_fault+0x7c/0xb0 strncpy_from_user+0x25/0x160 removexattr+0x7f/0x100 __do_sys_fremovexattr+0x7e/0xb0 do_syscall_64+0x9f/0x100 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #2 (sb_writers#14){.+.+}-{0:0}: __lock_acquire+0xaf0/0xd80 lock_acquire.part.0+0x103/0x280 percpu_down_read+0x3c/0x90 vfs_iocb_iter_write+0xe9/0x1d0 __cachefiles_write+0x367/0x430 cachefiles_issue_write+0x299/0x2f0 netfs_advance_write+0x117/0x140 netfs_write_folio.isra.0+0x5ca/0x6e0 netfs_writepages+0x230/0x2f0 afs_writepages+0x4d/0x70 do_writepages+0x1e8/0x3e0 filemap_fdatawrite_wbc+0x84/0xa0 __filemap_fdatawrite_range+0xa8/0xf0 file_write_and_wait_range+0x59/0x90 afs_release+0x10f/0x270 __fput+0x25f/0x3d0 __do_sys_close+0x43/0x70 do_syscall_64+0x9f/0x100 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #1 (&vnode->validate_lock){++++}-{3:3}: __lock_acquire+0xaf0/0xd80 lock_acquire.part.0+0x103/0x280 down_read+0x95/0x200 afs_writepages+0x37/0x70 do_writepages+0x1e8/0x3e0 filemap_fdatawrite_wbc+0x84/0xa0 filemap_invalidate_inode+0x167/0x1e0 netfs_unbuffered_write_iter+0x1bd/0x2d0 vfs_write+0x22e/0x320 ksys_write+0xbc/0x130 do_syscall_64+0x9f/0x100 entry_SYSCALL_64_after_hwframe+0x76/0x7e -> #0 (mapping.invalidate_lock#3){++++}-{3:3}: check_noncircular+0x119/0x160 check_prev_add+0x195/0x430 __lock_acquire+0xaf0/0xd80 lock_acquire.part.0+0x103/0x280 down_read+0x95/0x200 filemap_fault+0x26e/0x8b0 __do_fault+0x57/0xd0 do_pte_missing+0x23b/0x320 __handle_mm_fault+0x2d4/0x320 handle_mm_fault+0x14f/0x260 do_user_addr_fault+0x2a2/0x500 exc_page_fault+0x71/0x90 asm_exc_page_fault+0x22/0x30 other info that might help us debug this: Chain exists of: mapping.invalidate_lock#3 --> &mm->mmap_lock --> &vma->vm_lock->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(&vma->vm_lock->lock); lock(&mm->mmap_lock); lock(&vma->vm_lock->lock); rlock(mapping.invalidate_lock#3); *** DEADLOCK *** 1 lock held by fsstress/6050: #0: ffff888113f26d18 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x165/0x250 stack backtrace: CPU: 0 PID: 6050 Comm: fsstress Not tainted 6.10.0-build2+ #956 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 Call Trace: dump_stack_lvl+0x57/0x80 check_noncircular+0x119/0x160 ? queued_spin_lock_slowpath+0x4be/0x510 ? __pfx_check_noncircular+0x10/0x10 ? __pfx_queued_spin_lock_slowpath+0x10/0x10 ? mark_lock+0x47/0x160 ? init_chain_block+0x9c/0xc0 ? add_chain_block+0x84/0xf0 check_prev_add+0x195/0x430 __lock_acquire+0xaf0/0xd80 ? __pfx___lock_acquire+0x10/0x10 ? __lock_release.isra.0+0x13b/0x230 lock_acquire.part.0+0x103/0x280 ? filemap_fault+0x26e/0x8b0 ? __pfx_lock_acquire.part.0+0x10/0x10 ? rcu_is_watching+0x34/0x60 ? lock_acquire+0xd7/0x120 down_read+0x95/0x200 ? filemap_fault+0x26e/0x8b0 ? __pfx_down_read+0x10/0x10 ? __filemap_get_folio+0x25/0x1a0 filemap_fault+0x26e/0x8b0 ? __pfx_filemap_fault+0x10/0x10 ? find_held_lock+0x7c/0x90 ? __pfx___lock_release.isra.0+0x10/0x10 ? __pte_offset_map+0x99/0x110 __do_fault+0x57/0xd0 do_pte_missing+0x23b/0x320 __handle_mm_fault+0x2d4/0x320 ? __pfx___handle_mm_fault+0x10/0x10 handle_mm_fault+0x14f/0x260 do_user_addr_fault+0x2a2/0x500 exc_page_fault+0x71/0x90 asm_exc_page_fault+0x22/0x30 Signed-off-by: David Howells Link: https://lore.kernel.org/r/2136178.1721725194@warthog.procyon.org.uk cc: Alexander Viro cc: Christian Brauner cc: Jan Kara cc: Jeff Layton cc: Gao Xiang cc: Matthew Wilcox cc: netfs@lists.linux.dev cc: linux-erofs@lists.ozlabs.org cc: linux-fsdevel@vger.kernel.org [brauner: fix minor issues] Signed-off-by: Christian Brauner commit f8138f2ad2f745b9a1c696a05b749eabe44337ea Author: Jann Horn Date: Tue Jul 23 17:03:56 2024 +0200 filelock: Fix fcntl/close race recovery compat path When I wrote commit 3cad1bc01041 ("filelock: Remove locks reliably when fcntl/close race is detected"), I missed that there are two copies of the code I was patching: The normal version, and the version for 64-bit offsets on 32-bit kernels. Thanks to Greg KH for stumbling over this while doing the stable backport... Apply exactly the same fix to the compat path for 32-bit kernels. Fixes: c293621bbf67 ("[PATCH] stale POSIX lock handling") Cc: stable@kernel.org Link: https://bugs.chromium.org/p/project-zero/issues/detail?id=2563 Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20240723-fs-lock-recover-compatfix-v1-1-148096719529@google.com Signed-off-by: Christian Brauner commit 8eac5358ad3bbc007156a0f9ea5637ee7ae421b5 Author: Christian Brauner Date: Fri Jul 19 13:41:48 2024 +0200 fs: use all available ids The counter is unconditionally incremented for each mount allocation. If we set it to 1ULL << 32 we're losing 4294967296 as the first valid non-32 bit mount id. Link: https://lore.kernel.org/r/20240719-work-mount-namespace-v1-1-834113cab0d2@kernel.org Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 51d37982bbac3ea0ca21b2797a9cb0044272b3aa Author: David Howells Date: Fri Jul 19 15:19:02 2024 +0100 cachefiles: Set the max subreq size for cache writes to MAX_RW_COUNT Set the maximum size of a subrequest that writes to cachefiles to be MAX_RW_COUNT so that we don't overrun the maximum write we can make to the backing filesystem. Signed-off-by: David Howells Link: https://lore.kernel.org/r/1599005.1721398742@warthog.procyon.org.uk cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 212be98aa19303cbf376d61faf9de3ec9997c1cd Author: David Howells Date: Fri Jul 19 15:20:18 2024 +0100 netfs: Fix writeback that needs to go to both server and cache When netfslib is performing writeback (ie. ->writepages), it maintains two parallel streams of writes, one to the server and one to the cache, but it doesn't mark either stream of writes as active until it gets some data that needs to be written to that stream. This is done because some folios will only be written to the cache (e.g. copying to the cache on read is done by marking the folios and letting writeback do the actual work) and sometimes we'll only be writing to the server (e.g. if there's no cache). Now, since we don't actually dispatch uploads and cache writes in parallel, but rather flip between the streams, depending on which has the lowest so-far-issued offset, and don't wait for the subreqs to finish before flipping, we can end up in a situation where, say, we issue a write to the server and this completes before we start the write to the cache. But because we only activate a stream when we first add a subreq to it, the result collection code may run before we manage to activate the stream - resulting in the folio being cleaned and having the writeback-in-progress mark removed. At this point, the folio no longer belongs to us. This is only really a problem for folios that need to be written to both streams - and in that case, the upload to the server is started first, followed by the write to the cache - and the cache write may see a bad folio. Fix this by activating the cache stream up front if there's a cache available. If there's a cache, then all data is going to be written to it. Fixes: 288ace2f57c9 ("netfs: New writeback implementation") Signed-off-by: David Howells Link: https://lore.kernel.org/r/1599053.1721398818@warthog.procyon.org.uk cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit 1bb8dce5dfa9d11ff83a683fab2cda2916384c12 Author: Christian Brauner Date: Mon Jul 22 15:13:55 2024 +0200 pidfs: add selftests for new namespace ioctls Add selftests to verify that deriving namespace file descriptors from pidfd file descriptors works correctly. Link: https://lore.kernel.org/r/20240722-work-pidfs-69dbea91edab@brauner Signed-off-by: Christian Brauner commit 9b3e15046437d0e647e1f29ac955e2a3eb94b675 Author: Christian Brauner Date: Mon Jul 22 15:13:54 2024 +0200 pidfs: handle kernels without namespaces cleanly The nsproxy structure contains nearly all of the namespaces associated with a task. When a given namespace type is not supported by this kernel the rules whether the corresponding pointer in struct nsproxy is NULL or always init__ns differ per namespace. Ideally, that wouldn't be the case and for all namespace types we'd always set it to init__ns when the corresponding namespace type isn't supported. Make sure we handle all namespaces where the pointer in struct nsproxy can be NULL when the namespace type isn't supported. Link: https://lore.kernel.org/r/20240722-work-pidfs-e6a83030f63e@brauner Fixes: 5b08bd408534 ("pidfs: allow retrieval of namespace file descriptors") # mainline only Signed-off-by: Christian Brauner commit f60d38cb02d03f39576f9c7ad13652babded2410 Author: Edward Adam Davis Date: Sun Jul 21 14:23:12 2024 +0800 pidfs: when time ns disabled add check for ioctl syzbot call pidfd_ioctl() with cmd "PIDFD_GET_TIME_NAMESPACE" and disabled CONFIG_TIME_NS, since time_ns is NULL, it will make NULL ponter deref in open_namespace. Fixes: 5b08bd408534 ("pidfs: allow retrieval of namespace file descriptors") # mainline only Reported-and-tested-by: syzbot+34a0ee986f61f15da35d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=34a0ee986f61f15da35d Signed-off-by: Edward Adam Davis Link: https://lore.kernel.org/r/tencent_7FAE8DB725EE0DD69236DDABDDDE195E4F07@qq.com Signed-off-by: Christian Brauner commit b40c8e7a033ff2cafd33adbe50e2a516f88fa223 Author: Congjie Zhou Date: Fri Jul 19 00:25:45 2024 +0800 vfs: correct the comments of vfs_*() helpers correct the comments of vfs_*() helpers in fs/namei.c, including: 1. vfs_create() 2. vfs_mknod() 3. vfs_mkdir() 4. vfs_rmdir() 5. vfs_symlink() All of them come from the same commit: 6521f8917082 "namei: prepare for idmapped mounts" The @dentry is actually the dentry of child directory rather than base directory(parent directory), and thus the @dir has to be modified due to the change of @dentry. Signed-off-by: Congjie Zhou Link: https://lore.kernel.org/r/tencent_2FCF6CC9E10DC8A27AE58A5A0FE4FCE96D0A@qq.com Signed-off-by: Christian Brauner commit 5bc9ad78c2f836bd2fe9b5c911f8499364ee5b6e Author: Mateusz Guzik Date: Thu Jul 18 17:18:37 2024 +0200 vfs: handle __wait_on_freeing_inode() and evict() race Lockless hash lookup can find and lock the inode after it gets the I_FREEING flag set, at which point it blocks waiting for teardown in evict() to finish. However, the flag is still set even after evict() wakes up all waiters. This results in a race where if the inode lock is taken late enough, it can happen after both hash removal and wakeups, meaning there is nobody to wake the racing thread up. This worked prior to RCU-based lookup because the entire ordeal was synchronized with the inode hash lock. Since unhashing requires the inode lock, we can safely check whether it happened after acquiring it. Link: https://lore.kernel.org/v9fs/20240717102458.649b60be@kernel.org/ Reported-by: Dominique Martinet Fixes: 7180f8d91fcb ("vfs: add rcu-based find_inode variants for iget ops") Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240718151838.611807-1-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit fcad93360df4d04b172dba85b976c9f38ee0d5e0 Author: David Howells Date: Thu Jul 18 21:10:06 2024 +0100 netfs: Rename CONFIG_FSCACHE_DEBUG to CONFIG_NETFS_DEBUG CONFIG_FSCACHE_DEBUG should have been renamed to CONFIG_NETFS_DEBUG, so do that now. Signed-off-by: David Howells Link: https://lore.kernel.org/r/1410796.1721333406@warthog.procyon.org.uk cc: Uwe Kleine-König cc: Christian Brauner cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit a9d47a50cf257ff1019a4e30d573777882fd785c Author: David Howells Date: Thu Jul 18 21:07:32 2024 +0100 netfs: Revert "netfs: Switch debug logging to pr_debug()" Revert commit 163eae0fb0d4c610c59a8de38040f8e12f89fd43 to get back the original operation of the debugging macros. Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240608151352.22860-2-ukleinek@kernel.org Link: https://lore.kernel.org/r/1410685.1721333252@warthog.procyon.org.uk cc: Uwe Kleine-König cc: Christian Brauner cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner commit a16909ae9982e931841c456061cb57fbaec9c59e Author: Florian Westphal Date: Fri Jul 19 13:19:26 2024 +0200 netfilter: nft_set_pipapo_avx2: disable softinterrupts We need to disable softinterrupts, else we get following problem: 1. pipapo_avx2 called from process context; fpu usable 2. preempt_disable() called, pcpu scratchmap in use 3. softirq handles rx or tx, we re-enter pipapo_avx2 4. fpu busy, fallback to generic non-avx version 5. fallback reuses scratch map and index, which are in use by the preempted process Handle this same way as generic version by first disabling softinterrupts while the scratchmap is in use. Fixes: f0b3d338064e ("netfilter: nft_set_pipapo_avx2: Add irq_fpu_usable() check, fallback to non-AVX2 version") Cc: Stefano Brivio Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit da897484557b34a54fabb81f6c223c19a69e546d Author: Jonathan Denose Date: Tue Jul 23 21:33:30 2024 -0700 Input: synaptics - enable SMBus for HP Elitebook 840 G2 The kernel reports that the touchpad for this device can support a different bus. With SMBus enabled the touchpad movement is smoother and three-finger gestures are recognized. Signed-off-by: Jonathan Denose Link: https://lore.kernel.org/r/20240719180612.1.Ib652dd808c274076f32cd7fc6c1160d2cf71753b@changeid Signed-off-by: Dmitry Torokhov commit ccbfea78adf75d3d9e87aa739dab83254f5333fa Author: Marek Vasut Date: Mon Jul 8 23:18:57 2024 +0200 Input: ads7846 - ratelimit the spi_sync error message In case the touch controller is not connected, this message keeps scrolling on the console indefinitelly. Ratelimit it to avoid filling kernel logs. " ads7846 spi2.1: spi_sync --> -22 " Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20240708211913.171243-1-marex@denx.de Signed-off-by: Dmitry Torokhov commit 786c8248dbd33a5a7a07f7c6e55a7bfc68d2ca48 Merge: e9e969797bae3 92717bc077892 Author: Linus Torvalds Date: Tue Jul 23 18:15:51 2024 -0700 Merge tag 'perf-tools-fixes-for-v6.11-2024-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Namhyung Kim: "Two fixes for building perf and other tools: - Fix breakage in tracing tools due to pkg-config for libtrace{event,fs} - Fix build of perf when libunwind is used" * tag 'perf-tools-fixes-for-v6.11-2024-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf dso: Fix build when libunwind is enabled tools/latency: Use pkg-config in lib_setup of Makefile.config tools/rtla: Use pkg-config in lib_setup of Makefile.config tools/verification: Use pkg-config in lib_setup of Makefile.config tools: Make pkg-config dependency checks usable by other tools perf build: Warn if libtracefs is not found commit e9e969797bae359fd463f7617ad875bca2771586 Merge: 5ad7ff8738b8b b6f5ee4d53019 Author: Linus Torvalds Date: Tue Jul 23 17:30:42 2024 -0700 Merge tag 'execve-v6.11-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve fix from Kees Cook: "This moves the exec and binfmt_elf tests out of your way and into the tests/ subdirectory, following the newly ratified KUnit naming conventions. :)" * tag 'execve-v6.11-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: execve: Move KUnit tests to tests/ subdirectory commit cbade823342cd013f1fbd46f6e3b74825fecbc16 Author: Helge Deller Date: Sun Jul 21 23:36:36 2024 +0200 parisc: Add support for CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN Allow users to disable kernel warnings for unaligned memory accesses from kernel via the /proc/sys/kernel/ignore-unaligned-usertrap procfs entry. That way users can disable those warnings in case they happen too often. Signed-off-by: Helge Deller commit 0e314e452687ce0ec5874e42cdb993a34325d3d2 Author: Steve French Date: Tue Jul 23 00:44:48 2024 -0500 cifs: mount with "unix" mount option for SMB1 incorrectly handled Although by default we negotiate CIFS Unix Extensions for SMB1 mounts to Samba (and they work if the user does not specify "unix" or "posix" or "linux" on mount), and we do properly handle when a user turns them off with "nounix" mount parm. But with the changes to the mount API we broke cases where the user explicitly specifies the "unix" option (or equivalently "linux" or "posix") on mount with vers=1.0 to Samba or other servers which support the CIFS Unix Extensions. "mount error(95): Operation not supported" and logged: "CIFS: VFS: Check vers= mount option. SMB3.11 disabled but required for POSIX extensions" even though CIFS Unix Extensions are supported for vers=1.0 This patch fixes the case where the user specifies both "unix" (or equivalently "posix" or "linux") and "vers=1.0" on mount to a server which supports the CIFS Unix Extensions. Cc: stable@vger.kernel.org Reviewed-by: David Howells Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit a214384ce26b6111ea8c8d58fa82a1ca63996c38 Author: Steve French Date: Mon Jul 22 23:40:08 2024 -0500 cifs: fix reconnect with SMB1 UNIX Extensions When mounting with the SMB1 Unix Extensions (e.g. mounts to Samba with vers=1.0), reconnects no longer reset the Unix Extensions (SetFSInfo SET_FILE_UNIX_BASIC) after tcon so most operations (e.g. stat, ls, open, statfs) will fail continuously with: "Operation not supported" if the connection ever resets (e.g. due to brief network disconnect) Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 19abb9c2b900bad59e0a9818d6c83bb4cc875437 Author: Wojciech Drewek Date: Mon Jul 1 11:05:46 2024 +0200 ice: Fix recipe read procedure When ice driver reads recipes from firmware information about need_pass_l2 and allow_pass_l2 flags is not stored correctly. Those flags are stored as one bit each in ice_sw_recipe structure. Because of that, the result of checking a flag has to be casted to bool. Note that the need_pass_l2 flag currently works correctly, because it's stored in the first bit. Fixes: bccd9bce29e0 ("ice: Add guard rule when creating FDB in switchdev") Reviewed-by: Marcin Szycik Reviewed-by: Przemek Kitszel Signed-off-by: Wojciech Drewek Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 6ebbe97a488179f5dc85f2f1e0c89b486e99ee97 Author: Ahmed Zaki Date: Fri Jun 14 07:18:42 2024 -0600 ice: Add a per-VF limit on number of FDIR filters While the iavf driver adds a s/w limit (128) on the number of FDIR filters that the VF can request, a malicious VF driver can request more than that and exhaust the resources for other VFs. Add a similar limit in ice. CC: stable@vger.kernel.org Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF") Reviewed-by: Przemek Kitszel Suggested-by: Sridhar Samudrala Signed-off-by: Ahmed Zaki Reviewed-by: Wojciech Drewek Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 5ad7ff8738b8bd238ca899df08badb1f61bcc39e Merge: 371c141464b83 bed6b0317441d Author: Linus Torvalds Date: Tue Jul 23 15:21:19 2024 -0700 Merge tag 'f2fs-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "A pretty small update including mostly minor bug fixes in zoned storage along with the large section support. Enhancements: - add support for FS_IOC_GETFSSYSFSPATH - enable atgc dynamically if conditions are met - use new ioprio Macro to get ckpt thread ioprio level - remove unreachable lazytime mount option parsing Bug fixes: - fix null reference error when checking end of zone - fix start segno of large section - fix to cover read extent cache access with lock - don't dirty inode for readonly filesystem - allocate a new section if curseg is not the first seg in its zone - only fragment segment in the same section - truncate preallocated blocks in f2fs_file_open() - fix to avoid use SSR allocate when do defragment - fix to force buffered IO on inline_data inode And some minor code clean-ups and sanity checks" * tag 'f2fs-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (26 commits) f2fs: clean up addrs_per_{inode,block}() f2fs: clean up F2FS_I() f2fs: use meta inode for GC of COW file f2fs: use meta inode for GC of atomic file f2fs: only fragment segment in the same section f2fs: fix to update user block counts in block_operations() f2fs: remove unreachable lazytime mount option parsing f2fs: fix null reference error when checking end of zone f2fs: fix start segno of large section f2fs: remove redundant sanity check in sanity_check_inode() f2fs: assign CURSEG_ALL_DATA_ATGC if blkaddr is valid f2fs: fix to use mnt_{want,drop}_write_file replace file_{start,end}_wrtie f2fs: clean up set REQ_RAHEAD given rac f2fs: enable atgc dynamically if conditions are met f2fs: fix to truncate preallocated blocks in f2fs_file_open() f2fs: fix to cover read extent cache access with lock f2fs: fix return value of f2fs_convert_inline_inode() f2fs: use new ioprio Macro to get ckpt thread ioprio level f2fs: fix to don't dirty inode for readonly filesystem f2fs: fix to avoid use SSR allocate when do defragment ... commit 371c141464b8312ee4a298fad6d17ee26654b7d6 Merge: ca83c61cb3db9 d0fa70aca54c8 Author: Linus Torvalds Date: Tue Jul 23 15:15:16 2024 -0700 Merge tag 'jfs-6.11' of github.com:kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "Folio conversion from Matthew Wilcox and a few various fixes" * tag 'jfs-6.11' of github.com:kleikamp/linux-shaggy: jfs: don't walk off the end of ealist jfs: Fix shift-out-of-bounds in dbDiscardAG jfs: Fix array-index-out-of-bounds in diFree jfs: fix null ptr deref in dtInsertEntry jfs: Remove use of folio error flag fs: Remove i_blocks_per_page jfs: Change metapage->page to metapage->folio jfs: Convert force_metapage to use a folio jfs: Convert inc_io to take a folio jfs: Convert page_to_mp to folio_to_mp jfs; Convert __invalidate_metapages to use a folio jfs: Convert dec_io to take a folio jfs: Convert drop_metapage and remove_metapage to take a folio jfs; Convert release_metapage to use a folio jfs: Convert insert_metapage() to take a folio jfs: Convert __get_metapage to use a folio jfs: Convert metapage_writepage to metapage_write_folio jfs: Convert metapage_read_folio to use folio APIs commit ca83c61cb3db964061ea186654bf8e1879589de3 Merge: 643af93f15be9 13c239a2c088e Author: Linus Torvalds Date: Tue Jul 23 14:32:21 2024 -0700 Merge tag 'kbuild-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Remove tristate choice support from Kconfig - Stop using the PROVIDE() directive in the linker script - Reduce the number of links for the combination of CONFIG_KALLSYMS and CONFIG_DEBUG_INFO_BTF - Enable the warning for symbol reference to .exit.* sections by default - Fix warnings in RPM package builds - Improve scripts/make_fit.py to generate a FIT image with separate base DTB and overlays - Improve choice value calculation in Kconfig - Fix conditional prompt behavior in choice in Kconfig - Remove support for the uncommon EMAIL environment variable in Debian package builds - Remove support for the uncommon "name " form for the DEBEMAIL environment variable - Raise the minimum supported GNU Make version to 4.0 - Remove stale code for the absolute kallsyms - Move header files commonly used for host programs to scripts/include/ - Introduce the pacman-pkg target to generate a pacman package used in Arch Linux - Clean up Kconfig * tag 'kbuild-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (65 commits) kbuild: doc: gcc to CC change kallsyms: change sym_entry::percpu_absolute to bool type kallsyms: unify seq and start_pos fields of struct sym_entry kallsyms: add more original symbol type/name in comment lines kallsyms: use \t instead of a tab in printf() kallsyms: avoid repeated calculation of array size for markers kbuild: add script and target to generate pacman package modpost: use generic macros for hash table implementation kbuild: move some helper headers from scripts/kconfig/ to scripts/include/ Makefile: add comment to discourage tools/* addition for kernel builds kbuild: clean up scripts/remove-stale-files kconfig: recursive checks drop file/lineno kbuild: rpm-pkg: introduce a simple changelog section for kernel.spec kallsyms: get rid of code for absolute kallsyms kbuild: Create INSTALL_PATH directory if it does not exist kbuild: Abort make on install failures kconfig: remove 'e1' and 'e2' macros from expression deduplication kconfig: remove SYMBOL_CHOICEVAL flag kconfig: add const qualifiers to several function arguments kconfig: call expr_eliminate_yn() at least once in expr_eliminate_dups() ... commit 643af93f15be901982b2b08f241263934201c99f Merge: 60c6119cadba5 36862eab884d9 Author: Linus Torvalds Date: Tue Jul 23 13:41:59 2024 -0700 Merge tag 'rpmsg-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: - fix interrupt handling in the stm32 remoteproc driver when being attached to an already running remote processor - fix invalid kernel-doc and add missing MODULE_DESCRIPTION() in the rpmsg char driver * tag 'rpmsg-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: char: add missing MODULE_DESCRIPTION() macro remoteproc: stm32_rproc: Fix mailbox interrupts queuing rpmsg: char: Fix rpmsg_eptdev structure documentation commit 60c6119cadba52bee86b3e88011495483e26eb43 Merge: 58bffbac533d4 19cb605862062 Author: Linus Torvalds Date: Tue Jul 23 13:36:51 2024 -0700 Merge tag 'rproc-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: - The maximum amount of DDR memory used by the Mediatek MT8188/MT8195 SCP is increased to handle new use cases. Handling of optional L1TCM memory is made actually optional. - An optimization is introduced to only clear the unused portion of IPI shared buffers, rather than the entire buffer before writing the message. - Detection for IPC-only mode in the TI K3 DSP remoteproc driver is corrected. The loglevel of a debug print in the same is lowered from error. - Support for attaching to an running remote processor is added to the Xilinx R5F. - An in-kernel implementation of the Qualcomm "protected domain mapper" (aka service registry) service is introduced, to remove the dependency on a userspace implementation to detect when the battery monitor and USB Type-C port manager becomes available. This is then integrated with the Qualcomm remoteproc driver. - The Qualcomm PAS remoteproc driver gains support for attempting to bust hwspinlocks held by the remote processor when it crashed/stopped. - The TI OMAP remoteproc driver is transitioned to use devres helpers for various forms of allocations. - Parsing of memory-regions in the i.MX remoteproc driver is improved to avoid a NULL pointer dereference if the phandle reference is empty. of_node reference counting is corrected in the same. * tag 'rproc-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: remoteproc: mediatek: Increase MT8188/MT8195 SCP core0 DRAM size remoteproc: k3-dsp: Fix log levels where appropriate remoteproc: xlnx: Add attach detach support remoteproc: qcom: select AUXILIARY_BUS remoteproc: k3-r5: Fix IPC-only mode detection remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing remoteproc: qcom: enable in-kernel PD mapper dt-bindings: remoteproc: imx_rproc: Add minItems for power-domain remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init remoteproc: omap: Use devm_rproc_add() helper remoteproc: omap: Use devm action to release reserved memory remoteproc: omap: Use devm_rproc_alloc() helper remoteproc: imx_rproc: Skip over memory region when node value is NULL dt-bindings: remoteproc: k3-dsp: Correct optional sram properties for AM62A SoCs remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop soc: qcom: smem: Add qcom_smem_bust_hwspin_lock_by_host() remoteproc: mediatek: Zero out only remaining bytes of IPI buffer commit 58bffbac533d4526cb4922b8563d1963a90729be Merge: e9680017b2dc8 718a7ad700b1e Author: Linus Torvalds Date: Tue Jul 23 13:34:56 2024 -0700 Merge tag 'hwlock-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull hwspinlock updates from Bjorn Andersson: "This introduces a mechanism in the hardware spinlock framework, and the Qualcomm TCSR mutex driver, for allowing clients to bust locks held by a remote processor in the event that this enters a faulty state while holding the shared lock" * tag 'hwlock-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: hwspinlock: qcom: implement bust operation hwspinlock: Introduce hwspin_lock_bust() commit e9680017b2dc8686a908ea1b51941a91b6da9f1d Merge: f488790059fe7 8fe76a1c2264a Author: Linus Torvalds Date: Tue Jul 23 11:57:52 2024 -0700 Merge tag 'sh-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux Pull sh updates from John Paul Adrian Glaubitz: "This is rather small this time and contains just three changes. The first change by Oscar Salvador drops support for memory hotplug and hotremove for sh as the kernel stopped supporting it on 32-bit platforms since 7ec58a2b941e ("mm/memory_hotplug: restrict CONFIG_MEMORY_HOTPLUG to 64 bit"). That then results in a follow-up change to update all affected board config files. The third change comes from Jeff Johnson which adds the missing MODULE_DESCRIPTION() macro to the push-switch driver" * tag 'sh-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: push-switch: Add missing MODULE_DESCRIPTION() macro sh: config: Drop CONFIG_MEMORY_{HOTPLUG,HOTREMOVE} sh: Drop support for memory hotplug and memory hotremove commit f488790059fe7be6b2b059ddee10835b2500b603 Merge: d2d721e2eb133 61842868de13a Author: Linus Torvalds Date: Tue Jul 23 11:43:40 2024 -0700 Merge tag 'modules-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module update from Luis Chamberlain: "This is a super boring development cycle this time around for modules, there is only one patch in this pull request. The patch deals with a corner case set of dependencies which is not resolved today to ensure users get the module they need on initramfs. Currently only one module is known to exist which needs this, however this can grow to capture other corner cases likely escaped and not reported before. The kernel change is just a section update, the real work is done and merged already on upstream kmod. This has been on linux-next for 3 weeks now" * tag 'modules-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module: create weak dependecies commit f99b3feb3b0e9fca2257c90fc8317be8ee44c19a Author: Krzysztof Kozlowski Date: Mon Jul 22 08:33:09 2024 +0200 clk: samsung: fix getting Exynos4 fin_pll rate from external clocks Commit 0dc83ad8bfc9 ("clk: samsung: Don't register clkdev lookup for the fixed rate clocks") claimed registering clkdev lookup is not necessary anymore, but that was not entirely true: Exynos4210/4212/4412 clock code still relied on it to get the clock rate of xxti or xusbxti external clocks. Drop that requirement by accessing already registered clk_hw when looking up the xxti/xusbxti rate. Reported-by: Artur Weber Closes: https://lore.kernel.org/all/6227c1fb-d769-462a-b79b-abcc15d3db8e@gmail.com/ Fixes: 0dc83ad8bfc9 ("clk: samsung: Don't register clkdev lookup for the fixed rate clocks") Cc: Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240722063309.60054-1-krzysztof.kozlowski@linaro.org Tested-by: Artur Weber # Exynos4212 Signed-off-by: Stephen Boyd commit d2d721e2eb1337c67f0c5bba303f8a013b622bed Merge: 28bbe4ea686a0 ea5377ec49f29 Author: Linus Torvalds Date: Tue Jul 23 11:11:51 2024 -0700 Merge tag 'livepatching-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching update from Petr Mladek: - show patch->replace flag in sysfs - add or improve few selftests * tag 'livepatching-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Replace snprintf() with sysfs_emit() selftests/livepatch: Add selftests for "replace" sysfs attribute livepatch: Add "replace" sysfs attribute selftests: livepatch: Test atomic replace against multiple modules selftests/livepatch: define max test-syscall processes commit 8031b001da700474c11d28629581480b12a0d8d4 Author: Basavaraj Natikar Date: Thu Jul 18 16:46:16 2024 +0530 HID: amd_sfh: Move sensor discovery before HID device initialization Sensors discovery is independent of HID device initialization. If sensor discovery fails after HID initialization, then the HID device needs to be deinitialized. Therefore, sensors discovery should be moved before HID device initialization. Fixes: 7bcfdab3f0c6 ("HID: amd_sfh: if no sensors are enabled, clean up") Tested-by: Aurinko Signed-off-by: Basavaraj Natikar Link: https://patch.msgid.link/20240718111616.3012155-1-Basavaraj.Natikar@amd.com Signed-off-by: Benjamin Tissoires commit 28bbe4ea686a023929d907cc168430b61094811c Merge: d51f8f63f7cf1 385ac870bdd53 Author: Linus Torvalds Date: Tue Jul 23 09:59:20 2024 -0700 Merge tag 'i2c-for-6.11-rc1-second-batch' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "The I2C core has two header documentation updates as the dependecies are in now. The I2C host drivers add some patches which nearly fell through the cracks: - Added descriptions in the DTS for the Qualcomm SM8650 and SM8550 Camera Control Interface (CCI). - Added support for the "settle-time-us" property, which allows the gpio-mux device to switch from one bus to another with a configurable delay. The time can be set in the DTS. The latest change also includes file sorting. - Fixed slot numbering in the SMBus framework to prevent failures when more than 8 slots are occupied. It now enforces a a maximum of 8 slots to be used. This ensures that the Intel PIIX4 device can register the SPDs correctly without failure, even if other slots are populated but not used" * tag 'i2c-for-6.11-rc1-second-batch' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: header: improve kdoc for i2c_algorithm i2c: header: remove unneeded stuff regarding i2c_algorithm i2c: piix4: Register SPDs i2c: smbus: remove i801 assumptions from SPD probing i2c: mux: gpio: Add support for the 'settle-time-us' property i2c: mux: gpio: Re-order #include to match alphabetic order dt-bindings: i2c: mux-gpio: Add 'settle-time-us' property dt-bindings: i2c: qcom-cci: Document sm8650 compatible dt-bindings: i2c: qcom-cci: Document sm8550 compatible commit d51f8f63f7cf19c7c7d0288650fdee154a89d499 Merge: 71bed1ec0fa73 a8bd68e4329f9 Author: Linus Torvalds Date: Tue Jul 23 09:55:27 2024 -0700 Merge tag 'mailbox-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox Pull mailbox updates from Jassi Brar: "broadcom: - remove unused pdc_dma_map imx: - fix TXDB_V2 channel race condition mediatek: - cleanup and refactor driver - add bindings for gce-props omap: - fix mailbox interrupt sharing qcom: - add bindings for SA8775p - add CPUCP driver zynqmp: - make polling period configurable" * tag 'mailbox-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable() mailbox: zynqmp-ipi: Make polling period configurable mailbox: qcom-cpucp: fix 64BIT dependency mailbox: Add support for QTI CPUCP mailbox controller dt-bindings: mailbox: qcom: Add CPUCP mailbox controller bindings dt-bindings: remoteproc: qcom,sa8775p-pas: Document the SA8775p ADSP, CDSP and GPDSP mailbox: mtk-cmdq: add missing MODULE_DESCRIPTION() macro mailbox: bcm-pdc: remove unused struct 'pdc_dma_map' mailbox: imx: fix TXDB_V2 channel race condition mailbox: omap: Fix mailbox interrupt sharing mailbox: mtk-cmdq: Dynamically allocate clk_bulk_data structure mailbox: mtk-cmdq: Move and partially refactor clocks probe mailbox: mtk-cmdq: Stop requiring name for GCE clock dt-bindings: mailbox: Add mediatek,gce-props.yaml commit 71bed1ec0fa73da529a23336352b859eab12ae8f Merge: fd71b9a07b632 0630e3bc0e91b Author: Linus Torvalds Date: Tue Jul 23 09:46:17 2024 -0700 Merge tag 'pcmcia-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull PCMCIA updates from Dominik Brodowski: "A number of tiny cleanups of the PCMCIA subsystem by Jeff Johnson, Jules Irenge, and Krzysztof Kozlowski" * tag 'pcmcia-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: add missing MODULE_DESCRIPTION() macros pcmcia: Use resource_size function on resource object pcmcia: bcm63xx: drop driver owner assignment commit fd71b9a07b6327bed6ef9d572b9cede98c868baf Merge: c5d2be66705c5 be6299c6e55e9 Author: Linus Torvalds Date: Tue Jul 23 09:38:27 2024 -0700 Merge tag 'for-v6.11' 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: - new charging_orange_full_green RGB LED trigger - simplify and cleanup power-supply LED trigger code - expose power information via hwmon compatibility layer New hardware support: - enable battery support for Qualcomm Snapdragon X Elite - new battery driver for Maxim MAX17201/MAX17205 - new battery driver for Lenovo Yoga C630 laptop (custom EC) Cleanups: - cleanup 'struct i2c_device_id' initializations - misc small battery driver cleanups and fixes" * tag 'for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: sysfs: use power_supply_property_is_writeable() power: supply: qcom_battmgr: Enable battery support on x1e80100 power: supply: add support for MAX1720x standalone fuel gauge dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge power: reset: piix4: add missing MODULE_DESCRIPTION() macro power: supply: samsung-sdi-battery: Constify struct power_supply_maintenance_charge_table power: supply: samsung-sdi-battery: Constify struct power_supply_vbat_ri_table power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver power: supply: ingenic: Fix some error handling paths in ingenic_battery_get_property() power: supply: ab8500: Clean some error messages power: supply: ab8500: Use iio_read_channel_processed_scale() power: supply: ab8500: Fix error handling when calling iio_read_channel_processed() power: supply: hwmon: Add support for power sensors power: supply: ab8500: remove unused struct 'inst_curr_result_list' power: supply: bd99954: remove unused struct 'battery_data' power: supply: leds: Add activate() callback to triggers power: supply: leds: Share trig pointer for online and charging_full power: supply: leds: Add power_supply_[un]register_led_trigger() power: supply: Drop explicit initialization of struct i2c_device_id::driver_data to 0 commit c5d2be66705c5ebec8a691707ab427d937c91b7a Merge: 66ebbdfdeb093 f02cfe6950479 Author: Linus Torvalds Date: Tue Jul 23 09:37:33 2024 -0700 Merge tag 'hsi-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI update from Sebastian Reichel: - drop unused gpio.h header from SSI McSAAB protocol driver * tag 'hsi-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: ssi_protocol: Remove unused linux/gpio.h commit 13c239a2c088e91e453d26517b562c9a116444fa Author: Ivan Davydov Date: Mon Jul 22 08:57:31 2024 +0300 kbuild: doc: gcc to CC change In this part of the documentation, $(CC) is meant, but gcc is written. Signed-off-by: Ivan Davydov Signed-off-by: Masahiro Yamada commit 86c5eac3c4c4a2ee124d202af9a141bd0457ee68 Author: Chen Ni Date: Tue Jul 16 15:25:45 2024 +0800 iommu/amd: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: c9b258c6be09 ("iommu/amd: Prepare for generic IO page table framework") Signed-off-by: Chen Ni Reviewed-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20240716072545.968690-1-nichen@iscas.ac.cn Signed-off-by: Will Deacon commit 630482ee0653decf9e2482ac6181897eb6cde5b8 Author: Artem Chernyshev Date: Tue Jul 16 15:55:14 2024 +0300 iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en In sprd_iommu_cleanup() before calling function sprd_iommu_hw_en() dom->sdev is equal to NULL, which leads to null dereference. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9afea57384d4 ("iommu/sprd: Release dma buffer to avoid memory leak") Signed-off-by: Artem Chernyshev Reviewed-by: Chunyan Zhang Link: https://lore.kernel.org/r/20240716125522.3690358-1-artem.chernyshev@red-soft.ru Signed-off-by: Will Deacon commit 193cc89ea0ca1da311877d2b4bb5e9f03bcc82a2 Author: Steve French Date: Sun Jul 21 15:45:56 2024 -0500 cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path Dan Carpenter reported a Smack static checker warning: fs/smb/client/cifsfs.c:1981 init_cifs() error: we previously assumed 'serverclose_wq' could be null (see line 1895) The patch which introduced the serverclose workqueue used the wrong oredering in error paths in init_cifs() for freeing it on errors. Fixes: 173217bd7336 ("smb3: retrying on failed server close") Cc: stable@vger.kernel.org Cc: Ritvik Budhiraja Reported-by: Dan Carpenter Reviewed-by: Dan Carpenter Reviewed-by: David Howells Signed-off-by: Steve French commit ea5377ec49f29baaf50cbffa986a8ae667b7eaff Merge: 61894818e3049 920526928089b Author: Petr Mladek Date: Tue Jul 23 17:13:10 2024 +0200 Merge branch 'for-6.11/sysfs-patch-replace' into for-linus commit f3dfcd25455b1cbb3c7e2d19b0a06acc6c7472a5 Author: Raghavendra Rao Ananta Date: Thu Jul 18 21:55:32 2024 +0000 arm64/sysreg: Correct the values for GICv4.1 Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in ID_PFR1_EL1 and ID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM. Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Zenghui Yu Reviewed-by: Anshuman Khandual Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240718215532.616447-1-rananta@google.com Signed-off-by: Will Deacon commit 48f6430505c0b0498ee9020ce3cf9558b1caaaeb Author: Fangrui Song Date: Thu Jul 18 10:34:23 2024 -0700 arm64/vdso: Remove --hash-style=sysv glibc added support for .gnu.hash in 2006 and .hash has been obsoleted for more than one decade in many Linux distributions. Using --hash-style=sysv might imply unaddressed issues and confuse readers. Just drop the option and rely on the linker default, which is likely "both", or "gnu" when the distribution really wants to eliminate sysv hash overhead. Similar to commit 6b7e26547fad ("x86/vdso: Emit a GNU hash"). Signed-off-by: Fangrui Song Link: https://lore.kernel.org/r/20240718173423.1574395-1-maskray@google.com Signed-off-by: Will Deacon commit 0c35e3bd412a6a2676adc35df950cfbb9f464b0c Author: Remington Brasga Date: Fri Jul 12 23:17:30 2024 +0000 kselftest: missing arg in ptrace.c The string passed to ksft_test_result_skip is missing the `type_name` Signed-off-by: Remington Brasga Reviewed-by: Dev Jain Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20240712231730.2794-1-rbrasga@uci.edu Signed-off-by: Will Deacon commit add6128fc7f0d24199e977d13ca724f011c03fc2 Author: Anshuman Khandual Date: Tue Jul 16 10:39:15 2024 +0530 arm64/Kconfig: Remove redundant 'if HAVE_FUNCTION_GRAPH_TRACER' Since the commit 819e50e25d0c ("arm64: Add ftrace support"), HAVE_FUNCTION_GRAPH_TRACER has always been enabled. Although a subsequent commit 364697032246 ("arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL") redundantly added check on HAVE_FUNCTION_GRAPH_TRACER, while enabling the config HAVE_FUNCTION_GRAPH_RETVAL. Let's just drop this redundant check. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240716050915.2657694-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 62e2397c2203d41c8ebe2cca0c728293ff2af313 Author: Masahiro Yamada Date: Tue Jul 16 04:28:17 2024 +0900 arm64: remove redundant 'if HAVE_ARCH_KASAN' in Kconfig Since commit 0383808e4d99 ("arm64: kasan: Reduce minimum shadow alignment and enable 5 level paging"), HAVE_ARCH_KASAN is always 'y'. The condition 'if HAVE_ARCH_KASAN' is always met. Signed-off-by: Masahiro Yamada Reviewed-by: Randy Dunlap Acked-by: Mark Rutland Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20240715192843.2201439-1-masahiroy@kernel.org Signed-off-by: Will Deacon commit 6dc2e98d5f1de162d1777aee97e59d75d70d07c5 Author: Janosch Frank Date: Thu Jul 4 11:02:46 2024 +0000 s390: Remove protvirt and kvm config guards for uv code Removing the CONFIG_PROTECTED_VIRTUALIZATION_GUEST ifdefs and config option as well as CONFIG_KVM ifdefs in uv files. Having this configurable has been more of a pain than a help. It's time to remove the ifdefs and the config option. Signed-off-by: Janosch Frank Acked-by: Christian Borntraeger Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 8f1e70adb1a3ecb982bb6c475209b080bf985074 Author: Sven Schnelle Date: Mon Jul 22 15:41:28 2024 +0200 s390/boot: Add cmdline option to relocate lowcore Now that everything has been converted, add the option 'relocate_lowcore' to enable relocating the lowcore. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 97cee3dd4a07413a4175e247f550a4931d39cee1 Author: Sven Schnelle Date: Mon Jul 22 15:41:27 2024 +0200 s390/kdump: Make kdump ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in store_status() and __do_machine_kdump(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 361f6ec2fe203760353c708480099e0325295b21 Author: Sven Schnelle Date: Mon Jul 22 15:41:26 2024 +0200 s390/entry: Make system_call() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in system_call(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 9b3dcae128f8803950d646329f2301cae3fe8f4d Author: Sven Schnelle Date: Mon Jul 22 15:41:25 2024 +0200 s390/entry: Make ret_from_fork() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in ret_from_fork(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 7cc86dee44a47d961fd6195fd91f75ce176b992d Author: Sven Schnelle Date: Mon Jul 22 15:41:24 2024 +0200 s390/entry: Make __switch_to() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in __switch_to(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 4064b711127e1eb5b5fd42d539fd45e3e33c9b6f Author: Sven Schnelle Date: Mon Jul 22 15:41:23 2024 +0200 s390/entry: Make restart_int_handler() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in restart_int_handler(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 0001b7bbc53aeb8d31f650701d2a55e498634a2d Author: Sven Schnelle Date: Mon Jul 22 15:41:22 2024 +0200 s390/entry: Make mchk_int_handler() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in mcck_int_handler(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit bd2c55b307f77fbf19d76250672266ff06f4a324 Author: Sven Schnelle Date: Mon Jul 22 15:41:21 2024 +0200 s390/entry: Make int handlers ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in the ext/io interrupt handlers. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 9e1e275fa28d5896ca7cdf8afa5eb58c0117a303 Author: Sven Schnelle Date: Mon Jul 22 15:41:20 2024 +0200 s390/entry: Make pgm_check_handler() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in pgm_check_handler(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 86e08d64eec35cbe6a85798add4bfc1218ca9513 Author: Sven Schnelle Date: Mon Jul 22 15:41:19 2024 +0200 s390/entry: Add base register to CHECK_VMAP_STACK/CHECK_STACK macro In preparation of having lowcore at different address than zero, add the base register to CHECK_VMAP_STACK and CHECK_STACK. No functional change, because %r0 is passed to the macro. Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 6908f8f916f24636621a5b4c300bdf9a0155f07e Author: Sven Schnelle Date: Mon Jul 22 15:41:18 2024 +0200 s390/entry: Add base register to SIEEXIT macro In preparation of having lowcore at different address than zero, add the base register to SIEEXIT. No functional change, because %r0 is passed to the macro. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit ca2f0a26c498c42fcccdf09527e8755481801eea Author: Sven Schnelle Date: Mon Jul 22 15:41:17 2024 +0200 s390/entry: Add base register to MBEAR macro In preparation of having lowcore at different address than zero, add the base register to MBEAR. No functional change, because %r0 is passed to the macro. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 12184a46767b40c1c9b022cd96a9b4019ebd368f Author: Sven Schnelle Date: Mon Jul 22 15:41:16 2024 +0200 s390/entry: Make __sie64a() ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in __sie64a(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 39e8c5d6a4ce6512af5178f70c0c5d735141fc10 Author: Sven Schnelle Date: Mon Jul 22 15:41:15 2024 +0200 s390/head64: Make startup code ready for lowcore relocation In preparation of having lowcore at different address than zero, add the base register to all lowcore accesses in startup_continue(). Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 5ade5be4edf855245955108860d2016af3065a37 Author: Sven Schnelle Date: Mon Jul 22 15:41:14 2024 +0200 s390: Add infrastructure to patch lowcore accesses The s390 architecture defines two special per-CPU data pages called the "prefix area". In s390-linux terminology this is usually called "lowcore". This memory area contains system configuration data like old/new PSW's for system call/interrupt/machine check handlers and lots of other data. It is normally mapped to logical address 0. This area can only be accessed when in supervisor mode. This means that kernel code can dereference NULL pointers, because accesses to address 0 are allowed. Parts of lowcore can be write protected, but read accesses and write accesses outside of the write protected areas are not caught. To remove this limitation for debugging and testing, remap lowcore to another address and define a function get_lowcore() which simply returns the address where lowcore is mapped at. This would normally introduce a pointer dereference (=memory read). As lowcore is used for several very often used variables, add code to patch this function during runtime, so we avoid the memory reads. For C code get_lowcore() has to be used, for assembly code it is the GET_LC macro. When using this macro/function a reference is added to alternative patching. All these locations will be patched to the actual lowcore location when the kernel is booted or a module is loaded. To make debugging/bisecting problems easier, this patch adds all the infrastructure but the lowcore address is still hardwired to 0. This way the code can be converted on a per function basis, and the functionality is enabled in a patch after all the functions have been converted. Note that this requires at least z16 because the old lpsw instruction only allowed a 12 bit displacement. z16 introduced lpswey which allows 20 bits (signed), so the lowcore can effectively be mapped from address 0 - 0x7e000. To use 0x7e000 as address, a 6 byte lgfi instruction would have to be used in the alternative. To save two bytes, llilh can be used, but this only allows to set bits 16-31 of the address. In order to use the llilh instruction, use 0x70000 as alternative lowcore address. This is still large enough to catch NULL pointer dereferences into large arrays. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 13be21f39ab58184fb91844d2242e33805dda40e Author: Heiko Carstens Date: Mon Jul 22 15:41:13 2024 +0200 s390/atomic_ops: Disable flag outputs constraint for GCC versions below 14.2.0 GCC may die with an ICE if the flag outputs constraint is used in combination with other inline assemblies. This will be fixed with GCC 14.2.0. Therefore disable the use of the constraint for now. Link: https://gcc.gnu.org/git?p=gcc.git;a=commit;h=cd11413ff7c4353a3e336db415304f788d23a393 Signed-off-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit fc8eac33ad93420b4e51cdd811e12d3fc9b531a5 Author: Heiko Carstens Date: Mon Jul 22 15:41:12 2024 +0200 s390/entry: Move SIE indicator flag to thread info CIF_SIE indicates if a thread is running in SIE context. This is the state of a thread and not the CPU. Therefore move this indicator to thread info. Signed-off-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 213400c4afd5c89fd8bd17d06addf145f6c8f0d5 Author: Heiko Carstens Date: Mon Jul 22 15:41:11 2024 +0200 s390/nmi: Simplify ptregs setup The low level machine check handler code fills the ptregs structure partially with the register contents present at machine check handler entry and partially with contents from the machine check save area. In case of a machine check the contents of all general purpose registers are saved by the CPU to the machine check save area. Therefore simplify the code and fill the ptregs structure by only using the machine check save area as source. Signed-off-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit beb8cee06f9b8726616ba87783116cb8fb889c7a Author: Heiko Carstens Date: Tue Jul 16 13:50:56 2024 +0200 s390/alternatives: Remove alternative facility list The alternative and the normal facility list are always identical. Remove the alternative facility list, which allows to simplify the alternatives code. Acked-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 47837a5c74f432ad992239cfa5966543f466d4df Author: Heiko Carstens Date: Tue Jul 16 13:50:55 2024 +0200 s390/nospec: Push down alternative handling The nospec implementation is deeply integrated into the alternatives code: only for nospec an alternative facility list is implemented and used by the alternative code, while it is modified by nospec specific needs. Push down the nospec alternative handling into the nospec by introducing a new alternative type and a specific nospec callback to decide if alternatives should be applied. Also introduce a new global nobp variable which together with facility 82 can be used to decide if nobp is enabled or not. Acked-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7f9d85998f6c5b989796470fd1ac066232c60723 Author: Sven Schnelle Date: Tue Jul 16 13:50:54 2024 +0200 s390/alternatives: Allow early alternative patching in decompressor Add the required code to patch alternatives early in the decompressor. This is required for the upcoming lowcore relocation changes, where alternatives for facility 193 need to get patched before lowcore alternatives. Reviewed-by: Alexander Gordeev Co-developed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit b3e0c5f734f934dab1cfdef669e3baa165a0cbfe Author: Heiko Carstens Date: Tue Jul 16 13:50:53 2024 +0200 s390/alternatives: Rework to allow for callbacks Rework alternatives to allow for callbacks. With this every alternative entry has additional data encoded: - When (aka context) an alternative is supposed to be applied - The type of an alternative, which allows for type specific handling and callbacks - Extra type specific payload (patch information), which can be passed to callbacks in order to decide if an alternative should be applied or not With this only the "late" context is implemented, which means there is no change to the previous behaviour. All code is just converted to the more generic new infrastructure. Reviewed-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 030f7951c5b293739301fb616add0f1d3fb46073 Author: Heiko Carstens Date: Tue Jul 16 13:50:52 2024 +0200 s390/uaccess: Make s390_kernel_write() usable for decompressor To avoid lots of ifdefs in C code make s390_kernel_write() usable for the decompressor: simply use memcpy() for this case since there is no write protection enabled that early. Reviewed-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ace76fac944b06e46427e0406f315609f278ef91 Author: Heiko Carstens Date: Tue Jul 16 13:50:51 2024 +0200 s390/alternatives: Move text sync functions Move all text sync functions from alternative.c to processor.c. This way there is only minimal code left in alternative.c left, which is a prerequisite to use the C file within boot code as well. Reviewed-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c77f7354c4478bf4560b546913e097b3d4ab50c1 Author: Heiko Carstens Date: Tue Jul 16 13:50:50 2024 +0200 s390/alternatives: Merge both alternative header files The two alternative header files must stay in sync. This is easier to achieve within one header file. Therefore merge both of them and have only one file, like most other architectures. Reviewed-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9be999a61232fd6748ebe8654c71bcde1a0fbed3 Author: Heiko Carstens Date: Tue Jul 16 13:50:49 2024 +0200 s390/alternatives: Use consistent naming The alternative code is using the words facility and feature for the same. Rename facility to more generic feature everywhere to have consistent naming. Reviewed-by: Alexander Gordeev Tested-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 035248a7843242d51f249444fbad7340b7336f68 Author: Sven Schnelle Date: Tue Jul 16 13:50:48 2024 +0200 s390/alternatives: Remove noaltinstr option The current Kernel doesn't boot without alternative patching on z16 machines. To avoid such bugs in the future, remove the option disable alternative patching. Signed-off-by: Sven Schnelle Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d3604ffba1521f59f312be3f19999084dddef446 Author: Sven Schnelle Date: Tue Jul 16 09:26:15 2024 +0200 s390: Move CIF flags to struct pcpu To allow testing flags for offline CPUs, move the CIF flags to struct pcpu. To avoid having to calculate the array index for each access, add a pointer to the pcpu member for the current cpu to lowcore. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 90fc5ac28235843b1d5070c5dac9b01e7d39b24c Author: Sven Schnelle Date: Tue Jul 16 09:26:14 2024 +0200 s390/smp: Switch pcpu_devices to percpu In preparation of moving the CIF flags from lowcore to pcpu_devices, convert the pcpu_devices array to use the percpu infrastructure. This is required because using the pcpu_devices array as it is would introduce a performance penalty due to the fact that CPU flags for multiple CPUs would end up in the same cacheline. Note that a pointer to the pcpu struct of the IPL CPU is still required. This is because a restart interrupt can be triggered on an offline CPU. s390 stores the percpu offset in lowcore, but offline CPUs have no lowcore area allocated. So percpu data cannot be used from an offline CPU and we need to get the pcpu pointer for the IPL cpu from somewhere else. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit a795eeaf851b91c79fc357a245ca72fd1e7df906 Author: Sven Schnelle Date: Tue Jul 16 09:26:13 2024 +0200 s390/smp: Handle restart interrupt on ipl cpu The current smp code allows to trigger a restart interrupt on CPUs offline in linux. To allow using the percpu infrastructure instead of the pcpu_devices array, switch to the ipl cpu which is always online before calling do_restart(). Reviewed-by: Heiko Carstens Reviewed-by: Alexander Gordeev Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit b798b685b42c9dbe508e59a74250d97c41bec35e Author: Alexander Gordeev Date: Wed Jul 17 21:43:22 2024 +0200 s390/boot: Do not assume the decompressor range is reserved When allocating a random memory range for .amode31 sections the minimal randomization address is 0. That does not lead to a possible overlap with the decompressor image (which also starts from 0) since by that time the image range is already reserved. Do not assume the decompressor range is reserved and always provide the minimal randomization address for .amode31 sections beyond the decompressor. That is a prerequisite for moving the lowcore memory address from NULL elsewhere. Signed-off-by: Alexander Gordeev Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit e6ce1f12d777f6ee22b20e10ae6a771e7e6f44f5 Author: Thomas Richter Date: Mon Jul 15 12:07:29 2024 +0200 s390/cpum_cf: Fix endless loop in CF_DIAG event stop Event CF_DIAG reads out complete counter sets using stcctm instruction. This is done at event start time when the process starts execution and at event stop time when the process is removed from the CPU. During removal the difference of each counter in the counter sets is calculated and saved as raw data in the ring buffer. This works fine unless the number of counters in a counter set is zero. This may happen for the extended counter set. This set is machine specific and the size of the counter set can be zero even when extended counter set is authorized for read access. This case is not handled. cfdiag_diffctr() checks authorization of the extended counter set. If true the functions assumes the extended counter set has been saved in a data buffer. However this is not the case, cfdiag_getctrset() does not save a counter set with counter set size of zero. This mismatch causes an endless loop in the counter set readout during event stop handling. The calculation of the difference of the counters in each counter now verifies the size of the counter set is non-zero. A counter set with size zero is skipped. Fixes: a029a4eab39e ("s390/cpumf: Allow concurrent access for CPU Measurement Counter Facility") Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Acked-by: Heiko Carstens Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 19af288706b25f2213e85b8b2df140c04fd7c63d Author: Ilya Leoshkevich Date: Tue Jul 23 14:44:12 2024 +0200 s390/ptdump: Add KMSAN page markers Add KMSAN vmalloc metadata areas to /sys/kernel/debug/kernel_page_tables. Example output: 0x000003a95fff9000-0x000003a960000000 28K PTE I ---[ vmalloc Area End ]--- ---[ Kmsan vmalloc Shadow Start ]--- 0x000003a960000000-0x000003a960010000 64K PTE RW NX [...] 0x000003d3dfff9000-0x000003d3e0000000 28K PTE I ---[ Kmsan vmalloc Shadow End ]--- ---[ Kmsan vmalloc Origins Start ]--- 0x000003d3e0000000-0x000003d3e0010000 64K PTE RW NX [...] 0x000003fe5fff9000-0x000003fe60000000 28K PTE I ---[ Kmsan vmalloc Origins End ]--- ---[ Kmsan Modules Shadow Start ]--- 0x000003fe60000000-0x000003fe60001000 4K PTE RW NX [...] 0x000003fe60100000-0x000003fee0000000 2047M PMD I ---[ Kmsan Modules Shadow End ]--- ---[ Kmsan Modules Origins Start ]--- 0x000003fee0000000-0x000003fee0001000 4K PTE RW NX [...] 0x000003fee0100000-0x000003ff60000000 2047M PMD I ---[ Kmsan Modules Origins End ]--- ---[ Modules Area Start ]--- 0x000003ff60000000-0x000003ff60001000 4K PTE RO X Signed-off-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/20240723124441.120044-3-iii@linux.ibm.com Signed-off-by: Vasily Gorbik commit ec25f99cc834644e6577fa11582f7691589ed8cc Author: Ilya Leoshkevich Date: Tue Jul 23 14:44:11 2024 +0200 s390/kmsan: Fix merge conflict with get_lowcore() introduction Resolve the conflict between commit 2a48c8c9cf87 ("s390/kmsan: implement the architecture-specific functions") and commit 39976f1278a9 ("s390: Remove S390_lowcore"). Fixes: 2a48c8c9cf87 ("s390/kmsan: implement the architecture-specific functions") Signed-off-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/20240723124441.120044-2-iii@linux.ibm.com Signed-off-by: Vasily Gorbik commit e188e5d5ffd01d484b5255b88739fcf67b300223 Author: Vasily Gorbik Date: Thu Jul 11 15:50:26 2024 +0200 s390/setup: Fix __pa/__va for modules under non-GPL licenses The struct vm_layout contains fields used in __pa/__va calculations. Such fundamental things have to be exported with EXPORT_SYMBOL to avoid breakages of out-of-tree modules under non-GPL licenses. Fixes: 7de0446f0b26 ("s390/boot: Make identity mapping base address explicit") Acked-by: Heiko Carstens Acked-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit ab42fcb511fd9d241bbab7cc3ca04e34e9fc0666 Author: Gerd Bayer Date: Thu Jul 11 15:45:27 2024 +0200 s390/pci: Allow allocation of more than 1 MSI interrupt On a PCI adapter that provides up to 8 MSI interrupt sources the s390 implementation of PCI interrupts rejected to accommodate them, although the underlying hardware is able to support that. For MSI-X it is sufficient to allocate a single irq_desc per msi_desc, but for MSI multiple irq descriptors are attached to and controlled by a single msi descriptor. Add the appropriate loops to maintain multiple irq descriptors and tie/untie them to/from the appropriate AIBV bit, if a device driver allocates more than 1 MSI interrupt. Common PCI code passes on requests to allocate a number of interrupt vectors based on the device drivers' demand and the PCI functions' capabilities. However, the root-complex of s390 systems support just a limited number of interrupt vectors per PCI function. Produce a kernel log message to inform about any architecture-specific capping that might be done. With this change, we had a PCI adapter successfully raising interrupts to its device driver via all 8 sources. Fixes: a384c8924a8b ("s390/PCI: Fix single MSI only check") Signed-off-by: Gerd Bayer Reviewed-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 5fd11b96b43708f2f6e3964412c301c1bd20ec0f Author: Gerd Bayer Date: Thu Jul 11 15:45:26 2024 +0200 s390/pci: Refactor arch_setup_msi_irqs() Factor out adapter interrupt allocation from arch_setup_msi_irqs() in preparation for enabling registration of multiple MSIs. Code movement only, no change of functionality intended. Signed-off-by: Gerd Bayer Reviewed-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 57e29f4c8919af7276c35c2da0ae5efb4c36c33e Author: Heiko Carstens Date: Mon Jul 15 10:33:06 2024 +0200 s390: Add runtime constant support Implement the runtime constant infrastructure for s390, allowing the dcache d_hash() function to be generated using as a constant for hash table address followed by shift by a constant of the hash index. This is the s390 variant of commit 94a2bc0f611c ("arm64: add 'runtime constant' support") and commit e3c92e81711d ("runtime constants: add x86 architecture support"). Signed-off-by: Heiko Carstens Acked-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit b8a4518b5c2d1164f9bb2e586733a658c5239adf Author: Simon Horman Date: Tue Jul 23 10:41:52 2024 +0100 drbd: Add peer_device to Kernel doc Add missing documentation of peer_device parameter to Kernel doc. These parameters were added in commit 8164dd6c8ae1 ("drbd: Add peer device parameter to whole-bitmap I/O handlers") Flagged by W=1 builds. Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20240723-drbd-doc-v1-1-a04d9b7a9688@kernel.org Signed-off-by: Jens Axboe commit 3ba359c0cd6eb5ea772125a7aededb4a2d516684 Author: Johannes Berg Date: Fri Jul 19 09:41:18 2024 -0700 net: bonding: correctly annotate RCU in bond_should_notify_peers() RCU use in bond_should_notify_peers() looks wrong, since it does rcu_dereference(), leaves the critical section, and uses the pointer after that. Luckily, it's called either inside a nested RCU critical section or with the RTNL held. Annotate it with rcu_dereference_rtnl() instead, and remove the inner RCU critical section. Fixes: 4cb4f97b7e36 ("bonding: rebuild the lock use for bond_mii_monitor()") Reviewed-by: Jiri Pirko Signed-off-by: Johannes Berg Acked-by: Jay Vosburgh Link: https://patch.msgid.link/20240719094119.35c62455087d.I68eb9c0f02545b364b79a59f2110f2cf5682a8e2@changeid Signed-off-by: Paolo Abeni commit e5f98896efb3b6350cb6f1c241394966dcbcf240 Author: Rafael J. Wysocki Date: Thu Jul 18 21:00:35 2024 +0200 thermal: trip: Split thermal_zone_device_set_mode() Pull a wrapper around thermal zone .change_mode() callback out of thermal_zone_device_set_mode() because it will be used elsewhere subsequently. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2206793.irdbgypaU6@rjwysocki.net commit 39a9c25bcdfb5e88995841c47439b74cac74a527 Author: Lorenzo Bianconi Date: Fri Jul 19 22:38:31 2024 +0200 net: airoha: Fix MBI_RX_AGE_SEL_MASK definition Fix copy-paste error in MBI_RX_AGE_SEL_MASK macro definition Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/d27d0465be1bff3369e886e5f10c4d37fefc4934.1721419930.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni commit 368990a7fe30737c990f628a60d26d9854a9e690 Author: Juergen Gross Date: Mon Jul 15 09:47:08 2024 +0200 xen: fix multicall debug data referencing The recent adding of multicall debug mixed up the referencing of the debug data. A __percpu tagged pointer can't be initialized with a plain pointer, so use another percpu variable for the pointer and set it on each new cpu via a function. Fixes: 942d917cb92a ("xen: make multicall debug boot time selectable") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407151106.5s7Mnfpz-lkp@intel.com/ Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 26720dd2b5a1d088bff8f7e6355fca021c83718f Author: Jonathan Cavitt Date: Fri Jul 12 14:41:56 2024 -0700 drm/i915: Allow NULL memory region Prevent a NULL pointer access in intel_memory_regions_hw_probe. Fixes: 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup warning") Reported-by: Dan Carpenter Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11704 Signed-off-by: Jonathan Cavitt Reviewed-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240712214156.3969584-1-jonathan.cavitt@intel.com (cherry picked from commit d75dec1fcbcb05b021c08b62551649567ab8955c) Signed-off-by: Tvrtko Ursulin commit 65564157ae64cec0f527583f96e32f484f730f92 Author: Nitin Gote Date: Thu Jul 11 22:02:08 2024 +0530 drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8 We're seeing a GPU hang issue on a CHV platform, which was caused by commit bac24f59f454 ("drm/i915/execlists: Enable coarse preemption boundaries for Gen8"). The Gen8 platform only supports timeslicing and doesn't have a preemption mechanism, as its engines do not have a preemption timer. Commit 751f82b353a6 ("drm/i915/gt: Only disable preemption on Gen8 render engines") addressed this issue only for render engines. This patch extends that fix by ensuring that preemption is not considered for all engines on Gen8 platforms. v4: - Use the correct Fixes tag (Rodrigo Vivi) - Reworded commit log (Andi Shyti) v3: - Inside need_preempt(), condition of can_preempt() is not required as simplified can_preempt() is enough. (Chris Wilson) v2: Simplify can_preempt() function (Tvrtko Ursulin) Fixes: 751f82b353a6 ("drm/i915/gt: Only disable preemption on gen8 render engines") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11396 Suggested-by: Andi Shyti Signed-off-by: Nitin Gote Cc: Chris Wilson CC: # v5.12+ Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240711163208.1355736-1-nitin.r.gote@intel.com (cherry picked from commit 7df0be6e6280c6fca01d039864bb123e5e36604b) Signed-off-by: Tvrtko Ursulin commit d587d825424b6784ff7d7519efd1b827b09aa501 Author: James Chapman Date: Thu Jul 18 14:43:48 2024 +0100 l2tp: make session IDR and tunnel session list coherent Modify l2tp_session_register and l2tp_session_unhash so that the session IDR and tunnel session lists remain coherent. To do so, hold the session IDR lock and the tunnel's session list lock when making any changes to either list. Without this change, a rare race condition could hit the WARN_ON_ONCE in l2tp_session_unhash if a thread replaced the IDR entry while another thread was registering the same ID. [ 7126.151795][T17511] WARNING: CPU: 3 PID: 17511 at net/l2tp/l2tp_core.c:1282 l2tp_session_delete.part.0+0x87e/0xbc0 [ 7126.163754][T17511] ? show_regs+0x93/0xa0 [ 7126.164157][T17511] ? __warn+0xe5/0x3c0 [ 7126.164536][T17511] ? l2tp_session_delete.part.0+0x87e/0xbc0 [ 7126.165070][T17511] ? report_bug+0x2e1/0x500 [ 7126.165486][T17511] ? l2tp_session_delete.part.0+0x87e/0xbc0 [ 7126.166013][T17511] ? handle_bug+0x99/0x130 [ 7126.166428][T17511] ? exc_invalid_op+0x35/0x80 [ 7126.166890][T17511] ? asm_exc_invalid_op+0x1a/0x20 [ 7126.167372][T17511] ? l2tp_session_delete.part.0+0x87d/0xbc0 [ 7126.167900][T17511] ? l2tp_session_delete.part.0+0x87e/0xbc0 [ 7126.168429][T17511] ? __local_bh_enable_ip+0xa4/0x120 [ 7126.168917][T17511] l2tp_session_delete+0x40/0x50 [ 7126.169369][T17511] pppol2tp_release+0x1a1/0x3f0 [ 7126.169817][T17511] __sock_release+0xb3/0x270 [ 7126.170247][T17511] ? __pfx_sock_close+0x10/0x10 [ 7126.170697][T17511] sock_close+0x1c/0x30 [ 7126.171087][T17511] __fput+0x40b/0xb90 [ 7126.171470][T17511] task_work_run+0x16c/0x260 [ 7126.171897][T17511] ? __pfx_task_work_run+0x10/0x10 [ 7126.172362][T17511] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7126.172863][T17511] ? do_raw_spin_unlock+0x174/0x230 [ 7126.173348][T17511] do_exit+0xaae/0x2b40 [ 7126.173730][T17511] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7126.174235][T17511] ? __pfx_lock_release+0x10/0x10 [ 7126.174690][T17511] ? srso_alias_return_thunk+0x5/0xfbef5 [ 7126.175190][T17511] ? do_raw_spin_lock+0x12c/0x2b0 [ 7126.175650][T17511] ? __pfx_do_exit+0x10/0x10 [ 7126.176072][T17511] ? _raw_spin_unlock_irq+0x23/0x50 [ 7126.176543][T17511] do_group_exit+0xd3/0x2a0 [ 7126.176990][T17511] __x64_sys_exit_group+0x3e/0x50 [ 7126.177456][T17511] x64_sys_call+0x1821/0x1830 [ 7126.177895][T17511] do_syscall_64+0xcb/0x250 [ 7126.178317][T17511] entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: aa5e17e1f5ec ("l2tp: store l2tpv3 sessions in per-net IDR") Signed-off-by: James Chapman Signed-off-by: Tom Parkin Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240718134348.289865-1-jchapman@katalix.com Signed-off-by: Paolo Abeni commit cc73bbab4b1fb8a4f53a24645871dafa5f81266a Author: Ido Schimmel Date: Thu Jul 18 15:34:07 2024 +0300 ipv4: Fix incorrect source address in Record Route option The Record Route IP option records the addresses of the routers that routed the packet. In the case of forwarded packets, the kernel performs a route lookup via fib_lookup() and fills in the preferred source address of the matched route. The lookup is performed with the DS field of the forwarded packet, but using the RT_TOS() macro which only masks one of the two ECN bits. If the packet is ECT(0) or CE, the matched route might be different than the route via which the packet was forwarded as the input path masks both of the ECN bits, resulting in the wrong address being filled in the Record Route option. Fix by masking both of the ECN bits. Fixes: 8e36360ae876 ("ipv4: Remove route key identity dependencies in ip_rt_get_source().") Signed-off-by: Ido Schimmel Reviewed-by: Guillaume Nault Link: https://patch.msgid.link/20240718123407.434778-1-idosch@nvidia.com Signed-off-by: Paolo Abeni commit 03230edb0bd831662a7c08b6fef66b2a9a817774 Author: ethanwu Date: Thu Jul 11 14:47:56 2024 +0800 ceph: fix incorrect kmalloc size of pagevec mempool The kmalloc size of pagevec mempool is incorrectly calculated. It misses the size of page pointer and only accounts the number for the array. Fixes: a0102bda5bc0 ("ceph: move sb->wb_pagevec_pool to be a global mempool") Signed-off-by: ethanwu Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 578eb54c4a16713d99eed736660e30ae6eb1877f Author: Xiubo Li Date: Wed Jul 10 20:16:54 2024 +0800 ceph: periodically flush the cap releases The MDS could be waiting the caps releases infinitely in some corner case and then reporting the caps revoke stuck warning. To fix this we should periodically flush the cap releases. Link: https://tracker.ceph.com/issues/57244 Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Signed-off-by: Ilya Dryomov commit 77bb4a501a7756e6f5428b72fb0e420deb7ae562 Author: Chen Ni Date: Tue Jul 9 14:44:00 2024 +0800 ceph: convert comma to semicolon in __ceph_dentry_dir_lease_touch() Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 65d284a38c0ded391ae04a29640c34221c934cd2 Author: Max Kellermann Date: Thu Jun 6 18:41:57 2024 +0200 ceph: use cap_wait_list only if debugfs is enabled Only debugfs uses this list. By omitting it, we save some memory and reduce lock contention on `caps_list_lock`. Signed-off-by: Max Kellermann Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 2c716cf17edee74424336e87fe42b99ee5e91bad Author: Jeff Johnson Date: Thu Jul 18 16:17:52 2024 -0700 mips: sibyte: add missing MODULE_DESCRIPTION() macro Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning with make W=1. The following warning is being observed when ARCH=mips and CONFIG_SIBYTE_TBPROF=m: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/mips/sibyte/common/sb_tbprof.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Thomas Bogendoerfer commit a263e5f309f32301e1f3ad113293f4e68a82a646 Author: Gregory CLEMENT Date: Mon Jul 22 15:15:39 2024 +0200 MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later When the CM block migrated from CM2.5 to CM3.0, the address offset for the Global CSR Access Privilege register was modified. We saw this in the "MIPS64 I6500 Multiprocessing System Programmer's Guide," it is stated that "the Global CSR Access Privilege register is located at offset 0x0120" in section 5.4. It is at least the same for I6400. This fix allows to use the VP cores in SMP mode if the reset values were modified by the bootloader. Based on the work of Vladimir Kondratiev and the feedback from Jiaxun Yang . Fixes: 197e89e0984a ("MIPS: mips-cm: Implement mips_cm_revision") Signed-off-by: Gregory CLEMENT Reviewed-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit fa165f919016829e542e37782a3452512dffa5ea Author: Jiaxun Yang Date: Sun Jul 14 10:41:05 2024 +0800 MIPS: Loongson64: Switch to SYNC_R4K Nowadays SYNC_R4K is performing better than Loongson64's custom sync mechanism. Switch to SYNC_R4K to improve performance and reduce code duplication. Signed-off-by: Jiaxun Yang Reviewed-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit b6f5ee4d53019443fb99dd23bc08680b1244ccfa Author: Kees Cook Date: Sat Jul 20 10:03:14 2024 -0700 execve: Move KUnit tests to tests/ subdirectory Move the exec KUnit tests into a separate directory to avoid polluting the local directory namespace. Additionally update MAINTAINERS for the new files. Reviewed-by: David Gow Reviewed-by: SeongJae Park Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20240720170310.it.942-kees@kernel.org Signed-off-by: Kees Cook commit 47398f49dab8326bb652fa2d7a51ae5ec78775b5 Author: Eric Biggers Date: Sun Jul 21 11:38:40 2024 -0700 scsi: ufs: exynos: Don't resume FMP when crypto support is disabled If exynos_ufs_fmp_init() did not enable FMP support, then exynos_ufs_fmp_resume() should not execute the FMP-related SMC calls. Fixes: c96499fcb403 ("scsi: ufs: exynos: Add support for Flash Memory Protector (FMP)") Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240721183840.209284-1-ebiggers@kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 82dbb57ac8d06dfe8227ba9ab11a49de2b475ae5 Author: Damien Le Moal Date: Fri Jul 19 16:39:12 2024 +0900 scsi: mpt3sas: Avoid IOMMU page faults on REPORT ZONES Some firmware versions of the 9600 series SAS HBA byte-swap the REPORT ZONES command reply buffer from ATA-ZAC devices by directly accessing the buffer in the host memory. This does not respect the default command DMA direction and causes IOMMU page faults on architectures with an IOMMU enforcing write-only mappings for DMA_FROM_DEVICE DMA driection (e.g. AMD hosts). scsi 18:0:0:0: Direct-Access-ZBC ATA WDC WSH722020AL W870 PQ: 0 ANSI: 6 scsi 18:0:0:0: SATA: handle(0x0027), sas_addr(0x300062b2083e7c40), phy(0), device_name(0x5000cca29dc35e11) scsi 18:0:0:0: enclosure logical id (0x300062b208097c40), slot(0) scsi 18:0:0:0: enclosure level(0x0000), connector name( C0.0) scsi 18:0:0:0: atapi(n), ncq(y), asyn_notify(n), smart(y), fua(y), sw_preserve(y) scsi 18:0:0:0: qdepth(32), tagged(1), scsi_level(7), cmd_que(1) sd 18:0:0:0: Attached scsi generic sg2 type 20 sd 18:0:0:0: [sdc] Host-managed zoned block device mpt3sas 0000:41:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0021 address=0xfff9b200 flags=0x0050] mpt3sas 0000:41:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0021 address=0xfff9b300 flags=0x0050] mpt3sas_cm0: mpt3sas_ctl_pre_reset_handler: Releasing the trace buffer due to adapter reset. mpt3sas_cm0 fault info from func: mpt3sas_base_make_ioc_ready mpt3sas_cm0: fault_state(0x2666)! mpt3sas_cm0: sending diag reset !! mpt3sas_cm0: diag reset: SUCCESS sd 18:0:0:0: [sdc] REPORT ZONES start lba 0 failed sd 18:0:0:0: [sdc] REPORT ZONES: Result: hostbyte=DID_RESET driverbyte=DRIVER_OK sd 18:0:0:0: [sdc] 0 4096-byte logical blocks: (0 B/0 B) Avoid such issue by always mapping the buffer of REPORT ZONES commands using DMA_BIDIRECTIONAL (read+write IOMMU mapping). This is done by introducing the helper function _base_scsi_dma_map() and using this helper in _base_build_sg_scmd() and _base_build_sg_scmd_ieee() instead of calling directly scsi_dma_map(). Fixes: 471ef9d4e498 ("mpt3sas: Build MPI SGL LIST on GEN2 HBAs and IEEE SGL LIST on GEN3 HBAs") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20240719073913.179559-3-dlemoal@kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 1abc900ddda8ad2ef739fedf498d415655b6c3b8 Author: Damien Le Moal Date: Fri Jul 19 16:39:11 2024 +0900 scsi: mpi3mr: Avoid IOMMU page faults on REPORT ZONES Some firmware versions of the 9600 series SAS HBA byte-swap the REPORT ZONES command reply buffer from ATA-ZAC devices by directly accessing the buffer in the host memory. This does not respect the default command DMA direction and causes IOMMU page faults on architectures with an IOMMU enforcing write-only mappings for DMA_FROM_DEVICE DMA direction (e.g. AMD hosts), leading to the device capacity to be dropped to 0: scsi 18:0:58:0: Direct-Access-ZBC ATA WDC WSH722626AL W930 PQ: 0 ANSI: 7 scsi 18:0:58:0: Power-on or device reset occurred sd 18:0:58:0: Attached scsi generic sg9 type 20 sd 18:0:58:0: [sdj] Host-managed zoned block device mpi3mr 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0001 address=0xfec0c400 flags=0x0050] mpi3mr 0000:c1:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0001 address=0xfec0c500 flags=0x0050] sd 18:0:58:0: [sdj] REPORT ZONES start lba 0 failed sd 18:0:58:0: [sdj] REPORT ZONES: Result: hostbyte=DID_SOFT_ERROR driverbyte=DRIVER_OK sd 18:0:58:0: [sdj] 0 4096-byte logical blocks: (0 B/0 B) sd 18:0:58:0: [sdj] Write Protect is off sd 18:0:58:0: [sdj] Mode Sense: 6b 00 10 08 sd 18:0:58:0: [sdj] Write cache: enabled, read cache: enabled, supports DPO and FUA sd 18:0:58:0: [sdj] Attached SCSI disk Avoid this issue by always mapping the buffer of REPORT ZONES commands using DMA_BIDIRECTIONAL, that is, using a read-write IOMMU mapping. Suggested-by: Christoph Hellwig Fixes: 023ab2a9b4ed ("scsi: mpi3mr: Add support for queue command processing") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20240719073913.179559-2-dlemoal@kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit ac6efb12ca64156f4a94e964acdb96ee7d59630d Author: Manivannan Sadhasivam Date: Thu Jul 18 22:36:59 2024 +0530 scsi: ufs: core: Do not set link to OFF state while waking up from hibernation UFS link is just put into hibern8 state during the 'freeze' process of the hibernation. Afterwards, the system may get powered down. But that doesn't matter during wakeup. Because during wakeup from hibernation, UFS link is again put into hibern8 state by the restore kernel and then the control is handed over to the to image kernel. So in both the places, UFS link is never turned OFF. But ufshcd_system_restore() just assumes that the link will be in OFF state and sets the link state accordingly. And this breaks hibernation wakeup: [ 2445.371335] phy phy-1d87000.phy.3: phy_power_on was called before phy_init [ 2445.427883] ufshcd-qcom 1d84000.ufshc: Controller enable failed [ 2445.427890] ufshcd-qcom 1d84000.ufshc: ufshcd_host_reset_and_restore: Host init failed -5 [ 2445.427906] ufs_device_wlun 0:0:0:49488: ufshcd_wl_resume failed: -5 [ 2445.427918] ufs_device_wlun 0:0:0:49488: PM: dpm_run_callback(): scsi_bus_restore returns -5 [ 2445.427973] ufs_device_wlun 0:0:0:49488: PM: failed to restore async: error -5 So fix the issue by removing the code that sets the link to OFF state. Cc: Anjana Hari Cc: stable@vger.kernel.org # 6.3 Fixes: 88441a8d355d ("scsi: ufs: core: Add hibernation callbacks") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240718170659.201647-1-manivannan.sadhasivam@linaro.org Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit da3e19ef0b3de0aa4b25595bdc214c02a04f19b8 Author: Johan Hovold Date: Tue Jul 16 18:11:01 2024 +0200 scsi: Revert "scsi: sd: Do not repeat the starting disk message" This reverts commit 7a6bbc2829d4ab592c7e440a6f6f5deb3cd95db4. The offending commit tried to suppress a double "Starting disk" message for some drivers, but instead started spamming the log with bogus messages every five seconds: [ 311.798956] sd 0:0:0:0: [sda] Starting disk [ 316.919103] sd 0:0:0:0: [sda] Starting disk [ 322.040775] sd 0:0:0:0: [sda] Starting disk [ 327.161140] sd 0:0:0:0: [sda] Starting disk [ 332.281352] sd 0:0:0:0: [sda] Starting disk [ 337.401878] sd 0:0:0:0: [sda] Starting disk [ 342.521527] sd 0:0:0:0: [sda] Starting disk [ 345.850401] sd 0:0:0:0: [sda] Starting disk [ 350.967132] sd 0:0:0:0: [sda] Starting disk [ 356.090454] sd 0:0:0:0: [sda] Starting disk ... on machines that do not actually stop the disk on runtime suspend (e.g. the Qualcomm sc8280xp CRD with UFS). Let's just revert for now to address the regression. Fixes: 7a6bbc2829d4 ("scsi: sd: Do not repeat the starting disk message") Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240716161101.30692-1-johan+linaro@kernel.org Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit b9a603da42c816af9eeb8f5084ba815353e9b22b Merge: 82b461680651a d4c8d79f51990 Author: Palmer Dabbelt Date: Mon Jul 22 15:37:01 2024 -0700 Merge patch series "riscv: Separate vendor extensions from standard extensions" Charlie Jenkins says: All extensions, both standard and vendor, live in one struct "riscv_isa_ext". There is currently one vendor extension, xandespmu, but it is likely that more vendor extensions will be added to the kernel in the future. As more vendor extensions (and standard extensions) are added, riscv_isa_ext will become more bloated with a mix of vendor and standard extensions. This also allows each vendor to be conditionally enabled through Kconfig. * b4-shazam-merge: riscv: cpufeature: Extract common elements from extension checking riscv: Introduce vendor variants of extension helpers riscv: Add vendor extensions to /proc/cpuinfo riscv: Extend cpufeature.c to detect vendor extensions Link: https://lore.kernel.org/r/20240719-support_vendor_extensions-v3-0-0af7587bbec0@rivosinc.com Signed-off-by: Palmer Dabbelt commit d4c8d79f5199055da38f880f782a3e62c599ff5d Author: Charlie Jenkins Date: Fri Jul 19 09:15:21 2024 -0700 riscv: cpufeature: Extract common elements from extension checking The __riscv_has_extension_likely() and __riscv_has_extension_unlikely() functions from the vendor_extensions.h can be used to simplify the standard extension checking code as well. Migrate those functions to cpufeature.h and reorganize the code in the file to use the functions. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Reviewed-by: Andy Chiu Link: https://lore.kernel.org/r/20240719-support_vendor_extensions-v3-4-0af7587bbec0@rivosinc.com Signed-off-by: Palmer Dabbelt commit 0f2425411101128a38ad0166268975ca11fbcaeb Author: Charlie Jenkins Date: Fri Jul 19 09:15:20 2024 -0700 riscv: Introduce vendor variants of extension helpers Vendor extensions are maintained in per-vendor structs (separate from standard extensions which live in riscv_isa). Create vendor variants for the existing extension helpers to interface with the riscv_isa_vendor bitmaps. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Reviewed-by: Andy Chiu Link: https://lore.kernel.org/r/20240719-support_vendor_extensions-v3-3-0af7587bbec0@rivosinc.com Signed-off-by: Palmer Dabbelt commit 9448d9accdd8f1483df6fe6692e3c50cfe507d7a Author: Charlie Jenkins Date: Fri Jul 19 09:15:19 2024 -0700 riscv: Add vendor extensions to /proc/cpuinfo All of the supported vendor extensions that have been listed in riscv_isa_vendor_ext_list can be exported through /proc/cpuinfo. Signed-off-by: Charlie Jenkins Reviewed-by: Evan Green Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240719-support_vendor_extensions-v3-2-0af7587bbec0@rivosinc.com Signed-off-by: Palmer Dabbelt commit 23c996fc2bc1978a02c64eddb90b4ab5d309c8df Author: Charlie Jenkins Date: Fri Jul 19 09:15:18 2024 -0700 riscv: Extend cpufeature.c to detect vendor extensions Instead of grouping all vendor extensions into the same riscv_isa_ext that standard instructions use, create a struct "riscv_isa_vendor_ext_data_list" that allows each vendor to maintain their vendor extensions independently of the standard extensions. xandespmu is currently the only vendor extension so that is the only extension that is affected by this change. An additional benefit of this is that the extensions of each vendor can be conditionally enabled. A config RISCV_ISA_VENDOR_EXT_ANDES has been added to allow for that. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Reviewed-by: Andy Chiu Tested-by: Yu Chien Peter Lin Reviewed-by: Yu Chien Peter Lin Link: https://lore.kernel.org/r/20240719-support_vendor_extensions-v3-1-0af7587bbec0@rivosinc.com Signed-off-by: Palmer Dabbelt commit 0e91ac701c69c44840e8d36566604cac1b638880 Author: Palmer Dabbelt Date: Fri Jul 19 08:10:27 2024 -0700 clk: T-Head: Disable on 32-bit Targets This fails to build on 32-bit targets because of a missing __udivdi3. IIRC the right way to fix that is to avoid the division, but I just want a tree that builds and the only real T-Head platforms are 64-bit right now. Signed-off-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20240719151027.16152-1-palmer@rivosinc.com Acked-by: Drew Fustini Signed-off-by: Stephen Boyd commit 66ebbdfdeb093e097399b1883390079cd4c3022b Merge: ac7473a179d65 c9b4f313f6b83 Author: Linus Torvalds Date: Mon Jul 22 14:02:19 2024 -0700 Merge tag 'irq-msi-2024-07-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull MSI interrupt updates from Thomas Gleixner: "Switch ARM/ARM64 over to the modern per device MSI domains. This simplifies the handling of platform MSI and wire to MSI controllers and removes about 500 lines of legacy code. Aside of that it paves the way for ARM/ARM64 to utilize the dynamic allocation of PCI/MSI interrupts and to support the upcoming non standard IMS (Interrupt Message Store) mechanism on PCIe devices" * tag 'irq-msi-2024-07-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) irqchip/gic-v3-its: Correctly fish out the DID for platform MSI irqchip/gic-v3-its: Correctly honor the RID remapping genirq/msi: Move msi_device_data to core genirq/msi: Remove platform MSI leftovers irqchip/irq-mvebu-icu: Remove platform MSI leftovers irqchip/irq-mvebu-sei: Switch to MSI parent irqchip/mvebu-odmi: Switch to parent MSI irqchip/mvebu-gicp: Switch to MSI parent irqchip/irq-mvebu-icu: Prepare for real per device MSI irqchip/imx-mu-msi: Switch to MSI parent irqchip/gic-v2m: Switch to device MSI irqchip/gic_v3_mbi: Switch over to parent domain genirq/msi: Remove platform_msi_create_device_domain() irqchip/mbigen: Remove platform_msi_create_device_domain() fallback irqchip/gic-v3-its: Switch platform MSI to MSI parent irqchip/irq-msi-lib: Prepare for DOMAIN_BUS_WIRED_TO_MSI irqchip/mbigen: Prepare for real per device MSI irqchip/irq-msi-lib: Prepare for DEVICE MSI to replace platform MSI irqchip/gic-v3-its: Provide MSI parent for PCI/MSI[-X] irqchip/irq-msi-lib: Prepare for PCI MSI/MSIX ... commit a9bf3efc33f1fbf88787a277f7349459283c9b95 Author: Danilo Krummrich Date: Thu Jul 18 18:58:46 2024 +0200 drm/nouveau: prime: fix refcount underflow Calling nouveau_bo_ref() on a nouveau_bo without initializing it (and hence the backing ttm_bo) leads to a refcount underflow. Instead of calling nouveau_bo_ref() in the unwind path of drm_gem_object_init(), clean things up manually. Fixes: ab9ccb96a6e6 ("drm/nouveau: use prime helpers") Reviewed-by: Ben Skeggs Reviewed-by: Christian König Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240718165959.3983-2-dakr@kernel.org (cherry picked from commit 1b93f3e89d03cfc576636e195466a0d728ad8de5) Signed-off-by: Danilo Krummrich commit ac7473a179d65f6c5de06a4b10d3b3d36df3f172 Merge: a362ade892e3e b7b377332b96a Author: Linus Torvalds Date: Mon Jul 22 13:52:05 2024 -0700 Merge tag 'irq-core-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull interrupt subsystem updates from Thomas Gleixner: "Core: - Provide a new mechanism to create interrupt domains. The existing interfaces have already too many parameters and it's a pain to expand any of this for new required functionality. The new function takes a pointer to a data structure as argument. The data structure combines all existing parameters and allows for easy extension. The first extension for this is to handle the instantiation of generic interrupt chips at the core level and to allow drivers to provide extra init/exit callbacks. This is necessary to do the full interrupt chip initialization before the new domain is published, so that concurrent usage sites won't see a half initialized interrupt domain. Similar problems exist on teardown. This has turned out to be a real problem due to the deferred and parallel probing which was added in recent years. Handling this at the core level allows to remove quite some accrued boilerplate code in existing drivers and avoids horrible workarounds at the driver level. - The usual small improvements all over the place Drivers: - Add support for LAN966x OIC and RZ/Five SoC - Split the STM ExtI driver into a microcontroller and a SMP version to allow building the latter as a module for multi-platform kernels - Enable MSI support for Armada 370XP on platforms which do not support IPIs - The usual small fixes and enhancements all over the place" * tag 'irq-core-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (59 commits) irqdomain: Fix the kernel-doc and plug it into Documentation genirq: Set IRQF_COND_ONESHOT in request_irq() irqchip/imx-irqsteer: Handle runtime power management correctly irqchip/gic-v3: Pass #redistributor-regions to gic_of_setup_kvm_info() irqchip/bcm2835: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued irqchip/gic-v4: Substitute vmovp_lock for a per-VM lock irqchip/gic-v4: Always configure affinity on VPE activation Revert "irqchip/dw-apb-ictl: Support building as module" Revert "Loongarch: Support loongarch avec" arm64: Kconfig: Allow build irq-stm32mp-exti driver as module ARM: stm32: Allow build irq-stm32mp-exti driver as module irqchip/stm32mp-exti: Allow building as module irqchip/stm32mp-exti: Rename internal symbols irqchip/stm32-exti: Split MCU and MPU code arm64: Kconfig: Select STM32MP_EXTI on STM32 platforms ARM: stm32: Use different EXTI driver on ARMv7m and ARMv7a irqchip/stm32-exti: Add CONFIG_STM32MP_EXTI irqchip/dw-apb-ictl: Support building as module irqchip/riscv-aplic: Simplify the initialization code ... commit a362ade892e3e4de69296cddb1a23a1efe701428 Merge: 539fbb912321a 998b17d4440b8 Author: Linus Torvalds Date: Mon Jul 22 13:44:22 2024 -0700 Merge tag 'loongarch-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Define __ARCH_WANT_NEW_STAT in unistd.h - Always enumerate MADT and setup logical-physical CPU mapping - Add irq_work support via self IPIs - Add RANDOMIZE_KSTACK_OFFSET support - Add ARCH_HAS_PTE_DEVMAP support - Add ARCH_HAS_DEBUG_VM_PGTABLE support - Add writecombine support for DMW-based ioremap() - Add architectural preparation for CPUFreq - Add ACPI standard hardware register based S3 support - Add support for relocating the kernel with RELR relocation - Some bug fixes and other small changes * tag 'loongarch-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: Make the users of larch_insn_gen_break() constant LoongArch: Check TIF_LOAD_WATCH to enable user space watchpoint LoongArch: Use rustc option -Zdirect-access-external-data LoongArch: Add support for relocating the kernel with RELR relocation LoongArch: Remove a redundant checking in relocator LoongArch: Use correct API to map cmdline in relocate_kernel() LoongArch: Automatically disable KASLR for hibernation LoongArch: Add ACPI standard hardware register based S3 support LoongArch: Add architectural preparation for CPUFreq LoongArch: Add writecombine support for DMW-based ioremap() LoongArch: Add ARCH_HAS_DEBUG_VM_PGTABLE support LoongArch: Add ARCH_HAS_PTE_DEVMAP support LoongArch: Add RANDOMIZE_KSTACK_OFFSET support LoongArch: Add irq_work support via self IPIs LoongArch: Always enumerate MADT and setup logical-physical CPU mapping LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h commit 539fbb912321ab6361ccc08b72f5f83e8a25c24b Merge: 9deed1d5f82cf e528be3c87be9 Author: Linus Torvalds Date: Mon Jul 22 12:13:48 2024 -0700 Merge tag 'thermal-6.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Fix a flood of kernel messages coming from the thermal core on systems where iwlwifi is loaded, but the network interfaces controlled by it are down (Rafael Wysocki)" * tag 'thermal-6.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Allow thermal zones to tell the core to ignore them commit 9deed1d5f82cf30308027f9f604a95ac7ffdbe19 Merge: 7d080fa867092 bcc87d978b834 Author: Linus Torvalds Date: Mon Jul 22 11:45:48 2024 -0700 Merge tag 'io_uring-6.11-20240722' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Two minor fixes in here, both heading to stable. In detail: - Fix error where forced async uring_cmd getsockopt returns the wrong value on execution, leading to it never being completed (Pavel) - Fix io_alloc_pbuf_ring() using a NULL check rather than IS_ERR (Pavel)" * tag 'io_uring-6.11-20240722' of git://git.kernel.dk/linux: io_uring: fix error pbuf checking io_uring: fix lost getsockopt completions commit 7d080fa867092c1db078dd72d70cb256642f7b18 Merge: 0256994887d7c 89ed6c9ac69ec Author: Linus Torvalds Date: Mon Jul 22 11:32:05 2024 -0700 Merge tag 'for-6.11/block-20240722' of git://git.kernel.dk/linux Pull more block updates from Jens Axboe: - MD fixes via Song: - md-cluster fixes (Heming Zhao) - raid1 fix (Mateusz Jończyk) - s390/dasd module description (Jeff) - Series cleaning up and hardening the blk-mq debugfs flag handling (John, Christoph) - blk-cgroup cleanup (Xiu) - Error polled IO attempts if backend doesn't support it (hexue) - Fix for an sbitmap hang (Yang) * tag 'for-6.11/block-20240722' of git://git.kernel.dk/linux: (23 commits) blk-cgroup: move congestion_count to struct blkcg sbitmap: fix io hung due to race on sbitmap_word::cleared block: avoid polling configuration errors block: Catch possible entries missing from rqf_name[] block: Simplify definition of RQF_NAME() block: Use enum to define RQF_x bit indexes block: Catch possible entries missing from cmd_flag_name[] block: Catch possible entries missing from alloc_policy_name[] block: Catch possible entries missing from hctx_flag_name[] block: Catch possible entries missing from hctx_state_name[] block: Catch possible entries missing from blk_queue_flag_name[] block: Make QUEUE_FLAG_x as an enum block: Relocate BLK_MQ_MAX_DEPTH block: Relocate BLK_MQ_CPU_WORK_BATCH block: remove QUEUE_FLAG_STOPPED block: Add missing entry to hctx_flag_name[] block: Add zone write plugging entry to rqf_name[] block: Add missing entries from cmd_flag_name[] s390/dasd: fix error checks in dasd_copy_pair_store() s390/dasd: add missing MODULE_DESCRIPTION() macros ... commit 0256994887d7c89c2a41d872aac67605bda8f115 Merge: dd018c238b848 74cc150282e41 Author: Linus Torvalds Date: Mon Jul 22 11:04:09 2024 -0700 Merge tag 'for-6.11/block-post-20240722' of git://git.kernel.dk/linux Pull block integrity mapping updates from Jens Axboe: "A set of cleanups and fixes for the block integrity support. Sent separately from the main block changes from last week, as they depended on later fixes in the 6.10-rc cycle" * tag 'for-6.11/block-post-20240722' of git://git.kernel.dk/linux: block: don't free the integrity payload in bio_integrity_unmap_free_user block: don't free submitter owned integrity payload on I/O completion block: call bio_integrity_unmap_free_user from blk_rq_unmap_user block: don't call bio_uninit from bio_endio block: also return bio_integrity_payload * from stubs block: split integrity support out of bio.h commit dd018c238b8489b6dd8c06f6b962ea75d79115ff Merge: 5ea6d72489a4a 737759fc098f7 Author: Linus Torvalds Date: Mon Jul 22 10:59:08 2024 -0700 Merge tag 'bcachefs-2024-07-22' of https://evilpiepirate.org/git/bcachefs Pull bcachefs fixes from Kent Overstreet: - another fix for fsck getting stuck, from marcin - small syzbot fix - another undefined shift fix * tag 'bcachefs-2024-07-22' of https://evilpiepirate.org/git/bcachefs: bcachefs: Fix printbuf usage while atomic bcachefs: More informative error message in reattach_inode() bcachefs: kill btree_trans_too_many_iters() in bch2_bucket_alloc_freelist() bcachefs: mean_and_variance: Avoid too-large shift amounts commit 82b461680651ac452fa773f271000ddbc4e4db14 Author: Conor Dooley Date: Wed Jul 17 14:29:24 2024 +0100 RISC-V: run savedefconfig for defconfig It's been a while since this was run, and there's a few things that have changed. Firstly, almost all of the Renesas stuff vanishes because the config for the RZ/Five is gated behind NONPORTABLE. Several options (like CONFIG_PM) are removed as they are the default values. To retain DEFVFREQ_THERMAL and BLK_DEV_THROTTLING, add PM_DEVFREQ and BLK_CGROUP respectively. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20240717-shrubs-concise-51600886babf@spud Signed-off-by: Palmer Dabbelt commit 3d8d459c8ba282a67df3b518c5f80bcb217a5b38 Author: Conor Dooley Date: Wed Jul 17 09:54:38 2024 +0100 RISC-V: hwprobe: sort EXT_KEY()s in hwprobe_isa_ext0() alphabetically Currently the entries appear to be in a random order (although according to Palmer he has tried to sort them by key value) which makes it harder to find entries in a growing list, and more likely to have conflicts as all patches are adding to the end of the list. Sort them alphabetically instead. Signed-off-by: Conor Dooley Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20240717-dedicate-squeamish-7e4ab54df58f@spud Signed-off-by: Palmer Dabbelt commit 5ea6d72489a4a937fb9e9f9e81474cdf3483196e Merge: 933069701c1b5 911daf695a740 Author: Linus Torvalds Date: Mon Jul 22 10:50:18 2024 -0700 Merge tag 'ntfs3_for_6.11' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs3 updates from Konstantin Komarov: "New code: - simple fileattr support Fixes: - transform resident to nonresident for compressed files - the format of the "nocase" mount option - getting file type - many other internal bugs Refactoring: - remove unused functions and macros - partial transition from page to folio (suggested by Matthew Wilcox) - legacy ntfs support" * tag 'ntfs3_for_6.11' of https://github.com/Paragon-Software-Group/linux-ntfs3: (42 commits) fs/ntfs3: Fix formatting, change comments, renaming fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed fs/ntfs3: Implement simple fileattr fs/ntfs3: Redesign legacy ntfs support fs/ntfs3: Use function file_inode to get inode from file fs/ntfs3: Minor ntfs_list_ea refactoring fs/ntfs3: Check more cases when directory is corrupted fs/ntfs3: Do copy_to_user out of run_lock fs/ntfs3: Keep runs for $MFT::$ATTR_DATA and $MFT::$ATTR_BITMAP fs/ntfs3: Missed error return fs/ntfs3: Fix the format of the "nocase" mount option fs/ntfs3: Fix field-spanning write in INDEX_HDR ntfs3: Convert attr_wof_frame_info() to use a folio ntfs3: Convert ni_readpage_cmpr() to take a folio ntfs3: Convert ntfs_get_frame_pages() to use a folio ntfs3: Remove calls to set/clear the error flag ntfs3: Convert attr_make_nonresident to use a folio ntfs3: Convert attr_data_write_resident to use a folio ntfs3: Convert ntfs_write_end() to work on a folio ntfs3: Convert attr_data_read_resident() to take a folio ... commit 6a4aa4c94ba161bc0ffa73169ef5f33d0ae673d6 Merge: f557af081de6b 5f76d4211ee44 Author: Palmer Dabbelt Date: Mon Jul 22 07:13:13 2024 -0700 Merge patch series "Add ACPI NUMA support for RISC-V" Haibo Xu says: This patch series enable RISC-V ACPI NUMA support which was based on the recently approved ACPI ECR[1]. Patch 1/4 add RISC-V specific acpi_numa.c file to parse NUMA information from SRAT and SLIT ACPI tables. Patch 2/4 add the common SRAT RINTC affinity structure handler. Patch 3/4 change the ACPI_NUMA to a hidden option since it would be selected by default on all supported platform. Patch 4/4 replace pr_info with pr_debug in arch_acpi_numa_init() to avoid potential boot noise on ACPI platforms that are not NUMA. Based-on: https://github.com/linux-riscv/linux-riscv/tree/for-next [1] https://drive.google.com/file/d/1YTdDx2IPm5IeZjAW932EYU-tUtgS08tX/view?usp=sharing Testing: Since the ACPI AIA/PLIC support patch set is still under upstream review, hence it is tested using the poll based HVC SBI console and RAM disk. 1) Build latest Qemu with the following patch backported https://github.com/vlsunil/qemu/commit/42bd4eeefd5d4410a68f02d54fee406d8a1269b0 2) Build latest EDK-II https://github.com/tianocore/edk2/blob/master/OvmfPkg/RiscVVirt/README.md 3) Build Linux with the following configs enabled CONFIG_RISCV_SBI_V01=y CONFIG_SERIAL_EARLYCON_RISCV_SBI=y CONFIG_NONPORTABLE=y CONFIG_HVC_RISCV_SBI=y CONFIG_NUMA=y CONFIG_ACPI_NUMA=y 4) Build buildroot rootfs.cpio 5) Launch the Qemu machine qemu-system-riscv64 -nographic \ -machine virt,pflash0=pflash0,pflash1=pflash1 -smp 4 -m 8G \ -blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \ -blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \ -object memory-backend-ram,size=4G,id=m0 \ -object memory-backend-ram,size=4G,id=m1 \ -numa node,memdev=m0,cpus=0-1,nodeid=0 \ -numa node,memdev=m1,cpus=2-3,nodeid=1 \ -numa dist,src=0,dst=1,val=30 \ -kernel linux/arch/riscv/boot/Image \ -initrd buildroot/output/images/rootfs.cpio \ -append "root=/dev/ram ro console=hvc0 earlycon=sbi" [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000000-0x17fffffff] [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x180000000-0x27fffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x17fe3bc40-0x17fe3cfff] [ 0.000000] NUMA: NODE_DATA [mem 0x27fff4c40-0x27fff5fff] ... [ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> HARTID 0x0 -> Node 0 [ 0.000000] ACPI: NUMA: SRAT: PXM 0 -> HARTID 0x1 -> Node 0 [ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> HARTID 0x2 -> Node 1 [ 0.000000] ACPI: NUMA: SRAT: PXM 1 -> HARTID 0x3 -> Node 1 * b4-shazam-merge: ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init ACPI: NUMA: change the ACPI_NUMA to a hidden option ACPI: NUMA: Add handler for SRAT RINTC affinity structure ACPI: RISCV: Add NUMA support based on SRAT and SLIT Link: https://lore.kernel.org/r/cover.1718268003.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit f004bf9de057004f7ccea4239317aec2fbd8240b Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:26 2024 +0200 timers/migration: Fix grammar in comment Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-8-757baa7803fe@linutronix.de commit 2367e28e231af05243b92325de9a38956ad0b565 Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:25 2024 +0200 timers/migration: Spare write when nothing changed The wakeup value is written unconditionally in tmigr_cpu_new_timer(). When there was no new next timer expiry that needs to be propagated, then the value that was read before is written. This is not required. Move the write to the place where wakeup value is changed changed. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-7-757baa7803fe@linutronix.de commit 835a9a67f54f01033417a254e53a1391f99db708 Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:24 2024 +0200 timers/migration: Rename childmask by groupmask to make naming more obvious childmask in the group reflects the mask that is required to 'reference' this group in the parent. When reading childmask, this might be confusing, as this suggests, that this is the mask of the child of the group. Clarify this by renaming childmask in the tmigr_group and tmc_group by groupmask. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-6-757baa7803fe@linutronix.de commit d47be589844224a3ef13b55ff6f15211ab20f1d1 Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:23 2024 +0200 timers/migration: Read childmask and parent pointer in a single place Reading the childmask and parent pointer is required when propagating changes through the hierarchy. At the moment this reads are spread all over the place which makes it harder to follow. Move those reads to a single place to keep code clean. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-5-757baa7803fe@linutronix.de commit 3ba111032bc1d8a0f04e6d2a5d8fb4ddc96eeae7 Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:22 2024 +0200 timers/migration: Use a single struct for hierarchy walk data Two different structs are defined for propagating data from one to another level when walking the hierarchy. Several struct members exist in both structs which makes generalization harder. Merge those two structs into a single one and use it directly in walk_groups() and the corresponding function pointers instead of introducing pointer casting all over the place. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-4-757baa7803fe@linutronix.de commit 92506741521fd09dfaa9d6ef3c3620a9dd6bbafd Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:21 2024 +0200 timers/migration: Improve tracing Trace points of inactive and active propagation are located at the end of the related functions. The interesting information of those trace points is the updated group state. When trace points are not located directly at the place where group state changed, order of trace points in traces could be confusing. Move inactive and active propagation trace points directly after update of group state values. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-3-757baa7803fe@linutronix.de commit 10a0e6f3d3db7dcfe36e578923e5f038f1d2b72a Author: Anna-Maria Behnsen Date: Wed Jul 17 11:49:40 2024 +0200 timers/migration: Move hierarchy setup into cpuhotplug prepare callback When a CPU comes online the first time, it is possible that a new top level group will be created. In general all propagation is done from the bottom to top. This minimizes complexity and prevents possible races. But when a new top level group is created, the formely top level group needs to be connected to the new level. This is the only time, when the direction to propagate changes is changed: the changes are propagated from top (new top level group) to bottom (formerly top level group). This introduces two races (see (A) and (B)) as reported by Frederic: (A) This race happens, when marking the formely top level group as active, but the last active CPU of the formerly top level group goes idle. Then it's likely that formerly group is no longer active, but marked nevertheless as active in new top level group: [GRP0:0] migrator = 0 active = 0 nextevt = KTIME_MAX / \ 0 1 .. 7 active idle 0) Hierarchy has for now only 8 CPUs and CPU 0 is the only active CPU. [GRP1:0] migrator = TMIGR_NONE active = NONE nextevt = KTIME_MAX \ [GRP0:0] [GRP0:1] migrator = 0 migrator = TMIGR_NONE active = 0 active = NONE nextevt = KTIME_MAX nextevt = KTIME_MAX / \ 0 1 .. 7 8 active idle !online 1) CPU 8 is booting and creates a new group in first level GRP0:1 and therefore also a new top group GRP1:0. For now the setup code proceeded only until the connected between GRP0:1 to the new top group. The connection between CPU8 and GRP0:1 is not yet established and CPU 8 is still !online. [GRP1:0] migrator = TMIGR_NONE active = NONE nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = 0 migrator = TMIGR_NONE active = 0 active = NONE nextevt = KTIME_MAX nextevt = KTIME_MAX / \ 0 1 .. 7 8 active idle !online 2) Setup code now connects GRP0:0 to GRP1:0 and observes while in tmigr_connect_child_parent() that GRP0:0 is not TMIGR_NONE. So it prepares to call tmigr_active_up() on it. It hasn't done it yet. [GRP1:0] migrator = TMIGR_NONE active = NONE nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = TMIGR_NONE migrator = TMIGR_NONE active = NONE active = NONE nextevt = KTIME_MAX nextevt = KTIME_MAX / \ 0 1 .. 7 8 idle idle !online 3) CPU 0 goes idle. Since GRP0:0->parent has been updated by CPU 8 with GRP0:0->lock held, CPU 0 observes GRP1:0 after calling tmigr_update_events() and it propagates the change to the top (no change there and no wakeup programmed since there is no timer). [GRP1:0] migrator = GRP0:0 active = GRP0:0 nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = TMIGR_NONE migrator = TMIGR_NONE active = NONE active = NONE nextevt = KTIME_MAX nextevt = KTIME_MAX / \ 0 1 .. 7 8 idle idle !online 4) Now the setup code finally calls tmigr_active_up() to and sets GRP0:0 active in GRP1:0 [GRP1:0] migrator = GRP0:0 active = GRP0:0, GRP0:1 nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = TMIGR_NONE migrator = 8 active = NONE active = 8 nextevt = KTIME_MAX nextevt = KTIME_MAX / \ | 0 1 .. 7 8 idle idle active 5) Now CPU 8 is connected with GRP0:1 and CPU 8 calls tmigr_active_up() out of tmigr_cpu_online(). [GRP1:0] migrator = GRP0:0 active = GRP0:0 nextevt = T8 / \ [GRP0:0] [GRP0:1] migrator = TMIGR_NONE migrator = TMIGR_NONE active = NONE active = NONE nextevt = KTIME_MAX nextevt = T8 / \ | 0 1 .. 7 8 idle idle idle 5) CPU 8 goes idle with a timer T8 and relies on GRP0:0 as the migrator. But it's not really active, so T8 gets ignored. --> The update which is done in third step is not noticed by setup code. So a wrong migrator is set to top level group and a timer could get ignored. (B) Reading group->parent and group->childmask when an hierarchy update is ongoing and reaches the formerly top level group is racy as those values could be inconsistent. (The notation of migrator and active now slightly changes in contrast to the above example, as now the childmasks are used.) [GRP1:0] migrator = TMIGR_NONE active = 0x00 nextevt = KTIME_MAX \ [GRP0:0] [GRP0:1] migrator = TMIGR_NONE migrator = TMIGR_NONE active = 0x00 active = 0x00 nextevt = KTIME_MAX nextevt = KTIME_MAX childmask= 0 childmask= 1 parent = NULL parent = GRP1:0 / \ 0 1 .. 7 8 idle idle !online childmask=1 1) Hierarchy has 8 CPUs. CPU 8 is at the moment in the process of onlining but did not yet connect GRP0:0 to GRP1:0. [GRP1:0] migrator = TMIGR_NONE active = 0x00 nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = TMIGR_NONE migrator = TMIGR_NONE active = 0x00 active = 0x00 nextevt = KTIME_MAX nextevt = KTIME_MAX childmask= 0 childmask= 1 parent = GRP1:0 parent = GRP1:0 / \ 0 1 .. 7 8 idle idle !online childmask=1 2) Setup code (running on CPU 8) now connects GRP0:0 to GRP1:0, updates parent pointer of GRP0:0 and ... [GRP1:0] migrator = TMIGR_NONE active = 0x00 nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = 0x01 migrator = TMIGR_NONE active = 0x01 active = 0x00 nextevt = KTIME_MAX nextevt = KTIME_MAX childmask= 0 childmask= 1 parent = GRP1:0 parent = GRP1:0 / \ 0 1 .. 7 8 active idle !online childmask=1 tmigr_walk.childmask = 0 3) ... CPU 0 comes active in the same time. As migrator in GRP0:0 was TMIGR_NONE, childmask of GRP0:0 is stored in update propagation data structure tmigr_walk (as update of childmask is not yet visible/updated). And now ... [GRP1:0] migrator = TMIGR_NONE active = 0x00 nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = 0x01 migrator = TMIGR_NONE active = 0x01 active = 0x00 nextevt = KTIME_MAX nextevt = KTIME_MAX childmask= 2 childmask= 1 parent = GRP1:0 parent = GRP1:0 / \ 0 1 .. 7 8 active idle !online childmask=1 tmigr_walk.childmask = 0 4) ... childmask of GRP0:0 is updated by CPU 8 (still part of setup code). [GRP1:0] migrator = 0x00 active = 0x00 nextevt = KTIME_MAX / \ [GRP0:0] [GRP0:1] migrator = 0x01 migrator = TMIGR_NONE active = 0x01 active = 0x00 nextevt = KTIME_MAX nextevt = KTIME_MAX childmask= 2 childmask= 1 parent = GRP1:0 parent = GRP1:0 / \ 0 1 .. 7 8 active idle !online childmask=1 tmigr_walk.childmask = 0 5) CPU 0 sees the connection to GRP1:0 and now propagates active state to GRP1:0 but with childmask = 0 as stored in propagation data structure. --> Now GRP1:0 always has a migrator as 0x00 != TMIGR_NONE and for all CPUs it looks like GRP1:0 is always active. To prevent those races, the setup of the hierarchy is moved into the cpuhotplug prepare callback. The prepare callback is not executed by the CPU which will come online, it is executed by the CPU which prepares onlining of the other CPU. This CPU is active while it is connecting the formerly top level to the new one. This prevents from (A) to happen and it also prevents from any further walk above the formerly top level until that active CPU becomes inactive, releasing the new ->parent and ->childmask updates to be visible by any subsequent walk up above the formerly top level hierarchy. This prevents from (B) to happen. The direction for the updates is now forced to look like "from bottom to top". However if the active CPU prevents from tmigr_cpu_(in)active() to walk up with the update not-or-half visible, nothing prevents walking up to the new top with a 0 childmask in tmigr_handle_remote_up() or tmigr_requires_handle_remote_up() if the active CPU doing the prepare is not the migrator. But then it looks fine because: * tmigr_check_migrator() should just return false * The migrator is active and should eventually observe the new childmask at some point in a future tick. Split setup functionality of online callback into the cpuhotplug prepare callback and setup hotplug state. Change init call into early_initcall() to make sure an already active CPU prepares everything for newly upcoming CPUs. Reorder the code, that all prepare related functions are close to each other and online and offline callbacks are also close together. Fixes: 7ee988770326 ("timers: Implement the hierarchical pull model") Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240717094940.18687-1-anna-maria@linutronix.de commit facd40aa5c4699f94014012e4e58414c082f2c01 Author: Anna-Maria Behnsen Date: Tue Jul 16 16:19:19 2024 +0200 timers/migration: Do not rely always on group->parent When reading group->parent without holding the group lock it is racy against CPUs coming online the first time and thereby creating another level of the hierarchy. This is not a problem when this value is read once to decide whether to abort a propagation or not. The worst outcome is an unnecessary/early CPU wake up. But it is racy when reading it several times during a single 'action' (like activation, deactivation, checking for remote timer expiry,...) and relying on the consitency of this value without holding the lock. This happens at the moment e.g. in tmigr_inactive_up() which is also calling tmigr_udpate_events(). Code relys on group->parent not to change during this 'action'. Update parent struct member description to explain the above only once. Remove parent pointer checks when they are not mandatory (like update of data->childmask). Remove a warning, which would be nice but the trigger of this warning is not reliable and add expand the data structure member description instead. Expand a comment, why it is safe to rely on parent pointer here (inside hierarchy update). Fixes: 7ee988770326 ("timers: Implement the hierarchical pull model") Reported-by: Borislav Petkov Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240716-tmigr-fixes-v4-1-757baa7803fe@linutronix.de commit b6f7d984ebf826069d3dc6fa187b4d1cfb90f965 Author: Stephan Gerhold Date: Mon Jul 15 14:15:37 2024 +0200 dt-bindings: display: panel: samsung,atna33xc20: Document ATNA45AF01 The Samsung ATNA45AF01 panel is an AMOLED eDP panel that has backlight control over the DP AUX channel. While it works almost correctly with the generic "edp-panel" compatible, the backlight needs special handling to work correctly. It is similar to the existing ATNA33XC20 panel, just with a larger resolution and size. Add a new "samsung,atna45af01" compatible to describe this panel in the DT. Use the existing "samsung,atna33xc20" as fallback compatible since existing drivers should work as-is, given that resolution and size are discoverable through the eDP link. Signed-off-by: Stephan Gerhold Acked-by: Conor Dooley Reviewed-by: Neil Armstrong Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240715-x1e80100-crd-backlight-v2-1-31b7f2f658a3@linaro.org commit 737759fc098f7bb7fb4cef64fec731803e955e01 Author: Kent Overstreet Date: Mon Jul 22 11:25:03 2024 -0400 bcachefs: Fix printbuf usage while atomic Reported-by: syzbot+f765e51170cf13493f0b@syzkaller.appspotmail.com Fixes: f12410bb7ddd ("bcachefs: Add an error message for insufficient rw journal devs") Signed-off-by: Kent Overstreet commit 7a086baad0d640a45dbc65d6853a58ca6368892b Author: Kent Overstreet Date: Sat Jul 20 14:37:24 2024 -0400 bcachefs: More informative error message in reattach_inode() Signed-off-by: Kent Overstreet commit bacc15e010fc5a235fb2020b06a29a9961b5db82 Author: Arnd Bergmann Date: Fri Jul 19 11:51:07 2024 +0200 hid: bpf: add BPF_JIT dependency The module does not do anything when the JIT is disabled, but instead causes a warning: In file included from include/linux/bpf_verifier.h:7, from drivers/hid/bpf/hid_bpf_struct_ops.c:10: drivers/hid/bpf/hid_bpf_struct_ops.c: In function 'hid_bpf_struct_ops_init': include/linux/bpf.h:1853:50: error: statement with no effect [-Werror=unused-value] 1853 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; }) | ^~~~~~~~~~~~~~~~ drivers/hid/bpf/hid_bpf_struct_ops.c:305:16: note: in expansion of macro 'register_bpf_struct_ops' 305 | return register_bpf_struct_ops(&bpf_hid_bpf_ops, hid_bpf_ops); | ^~~~~~~~~~~~~~~~~~~~~~~ Add a Kconfig dependency to only allow building the HID-BPF support when a JIT is enabled. Fixes: ebc0d8093e8c ("HID: bpf: implement HID-BPF through bpf_struct_ops") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/96a00b6f-eb81-4c67-8c4b-6b1f3f045034@app.fastmail.com Signed-off-by: Benjamin Tissoires commit 13c9b702e6cb8e406d5fa6b2dca422fa42d2f13e Author: Liwei Song Date: Mon Jul 22 16:32:59 2024 +0800 tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids Add a type cast for set8->pairs to fix below compile warning: main.c: In function 'sets_patch': main.c:699:50: warning: comparison of distinct pointer types lacks a cast 699 | BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id); | ^~ Fixes: 9707ac4fe2f5 ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h") Signed-off-by: Liwei Song Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240722083305.4009723-1-liwei.song.lsong@gmail.com commit ac29d8ae05b770ed3f52d7a60908ab9b126f69d7 Author: Takashi Iwai Date: Mon Jul 22 16:06:06 2024 +0200 ALSA: ump: Force 1 Group for MIDI1 FBs When a Function Block declares it being a legacy MIDI1 device, it has to be only with a single UMP Group. Correct the attribute when a device declares it wrongly. Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing") Cc: Link: https://patch.msgid.link/20240722140610.10845-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9a4ab167cfb1dea1df0c0c948205a62c7eb3b85b Author: Takashi Iwai Date: Mon Jul 22 15:59:28 2024 +0200 ALSA: ump: Don't update FB name for static blocks When a device tries to update the FB name string even if its Endpoint is declared as static, we should skip it, just already done for the FB info update reply. Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing") Cc: Link: https://patch.msgid.link/20240722135929.8612-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5f76d4211ee44dcd9b2dc8a9065002bf8ecee81e Author: Haibo Xu Date: Thu Jun 13 16:54:36 2024 +0800 ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init There are lots of ACPI enabled systems that aren't NUMA and If the firmware didn't provide the SRAT/SLIT, then there will be a message "Failed to initialise from firmware" from arch_acpi_numa_init() which adding noise to the boot on all of those kind of systems. Replace the pr_info with pr_debug in arch_acpi_numa_init() to avoid it. Suggested-by: Sunil V L Signed-off-by: Haibo Xu Reviewed-by: Sunil V L Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/109354315a02cd22145d2effa4a8c571b69d3e56.1718268003.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit adc3e82d253786a5b63c821108709de23317a90d Author: Haibo Xu Date: Thu Jun 13 16:54:35 2024 +0800 ACPI: NUMA: change the ACPI_NUMA to a hidden option x86/arm64/loongarch would select ACPI_NUMA by default and riscv would do the same thing, so change it to a hidden option and the select statements except for the X86_64_ACPI_NUMA can also go away. Suggested-by: Arnd Bergmann Suggested-by: Sunil V L Signed-off-by: Haibo Xu Reviewed-by: Sunil V L Acked-by: Huacai Chen Acked-by: Will Deacon Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/f1f96377b8ecd6e3183f28abf5c9ac21cb9855ea.1718268003.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit 39494aec8a0454f9e8a68d2422d3bd4e5c5ee0c7 Author: Haibo Xu Date: Thu Jun 13 16:54:34 2024 +0800 ACPI: NUMA: Add handler for SRAT RINTC affinity structure Add RINTC affinity structure handler during parsing SRAT table. Signed-off-by: Haibo Xu Reviewed-by: Sunil V L Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/e076514d78d92f104a5f2d8c82b8921f6aa26fdd.1718268003.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit eabd9db64ea8ba64d2a0b1d70da38e1a95dcd08b Author: Haibo Xu Date: Thu Jun 13 16:54:33 2024 +0800 ACPI: RISCV: Add NUMA support based on SRAT and SLIT Add acpi_numa.c file to enable parse NUMA information from ACPI SRAT and SLIT tables. SRAT table provide CPUs(Hart) and memory nodes to proximity domain mapping, while SLIT table provide the distance metrics between proximity domains. Signed-off-by: Haibo Xu Reviewed-by: Sunil V L Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/65dbad1fda08a32922c44886e4581e49b4a2fecc.1718268003.git.haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit 91da337e5d506f2c065d20529d105ca40090e320 Author: Jeff Layton Date: Fri Jul 19 14:55:53 2024 -0400 nfsd: don't set SVC_SOCK_ANONYMOUS when creating nfsd sockets When creating nfsd sockets via the netlink interface, we do want to register with the portmapper. Don't set SVC_SOCK_ANONYMOUS. Reported-by: Steve Dickson Fixes: 16a471177496 ("NFSD: add listener-{set,get} netlink command") Cc: Lorenzo Bianconi Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 21451dfd853e7d8e6e3fbd7ef1fbdb2f2ead12f5 Author: wangdicheng Date: Mon Jul 22 16:48:22 2024 +0800 ALSA: usb-audio: Add a quirk for Sonix HD USB Camera Sonix HD USB Camera does not support reading the sample rate which leads to many lines of "cannot get freq at ep 0x84". This patch adds the USB ID to quirks.c and avoids those error messages. (snip) [1.789698] usb 3-3: new high-speed USB device number 2 using xhci_hcd [1.984121] usb 3-3: New USB device found, idVendor=0c45, idProduct=6340, bcdDevice= 0.00 [1.984124] usb 3-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0 [1.984127] usb 3-3: Product: USB 2.0 Camera [1.984128] usb 3-3: Manufacturer: Sonix Technology Co., Ltd. [5.440957] usb 3-3: 3:1: cannot get freq at ep 0x84 [12.130679] usb 3-3: 3:1: cannot get freq at ep 0x84 [12.175065] usb 3-3: 3:1: cannot get freq at ep 0x84 Signed-off-by: wangdicheng Cc: Link: https://patch.msgid.link/20240722084822.31620-1-wangdich9700@163.com Signed-off-by: Takashi Iwai commit 66558537cb8c7485cf2d43b3880395c81218ec12 Author: Ricardo Ribalda Date: Mon Jul 22 11:52:26 2024 +0000 media: uvcvideo: Fix custom control mapping probing Custom control mapping introduced a bug, where the filter function was applied to every single control. Fix it so it is only applied to the matching controls. The following dmesg errors during probe are now fixed: usb 1-5: Found UVC 1.00 device Integrated_Webcam_HD (0c45:670c) usb 1-5: Failed to query (GET_CUR) UVC control 2 on unit 2: -75 (exp. 1). usb 1-5: Failed to query (GET_CUR) UVC control 3 on unit 2: -75 (exp. 1). usb 1-5: Failed to query (GET_CUR) UVC control 6 on unit 2: -75 (exp. 1). usb 1-5: Failed to query (GET_CUR) UVC control 7 on unit 2: -75 (exp. 1). usb 1-5: Failed to query (GET_CUR) UVC control 8 on unit 2: -75 (exp. 1). usb 1-5: Failed to query (GET_CUR) UVC control 9 on unit 2: -75 (exp. 1). usb 1-5: Failed to query (GET_CUR) UVC control 10 on unit 2: -75 (exp. 1). Reported-by: Paul Menzel Closes: https://lore.kernel.org/linux-media/518cd6b4-68a8-4895-b8fc-97d4dae1ddc4@molgen.mpg.de/T/#t Cc: stable@vger.kernel.org Fixes: 8f4362a8d42b ("media: uvcvideo: Allow custom control mapping") Signed-off-by: Ricardo Ribalda Link: https://lore.kernel.org/r/20240722-fix-filter-mapping-v2-1-7ed5bb6c1185@chromium.org Tested-by: Paul Menzel Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 92c78222168e9035a9bfb8841c2e56ce23e51f73 Author: Dan Carpenter Date: Fri Jul 19 18:53:48 2024 -0500 ASoC: TAS2781: Fix tasdev_load_calibrated_data() This function has a reversed if statement so it's either a no-op or it leads to a NULL dereference. Fixes: b195acf5266d ("ASoC: tas2781: Fix wrong loading calibrated data sequence") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/18a29b68-cc85-4139-b7c7-2514e8409a42@stanley.mountain Signed-off-by: Mark Brown commit 83340b855d222f257354afd272dc8d315fecc3ee Author: Arnd Bergmann Date: Fri Jul 19 09:48:03 2024 +0200 ASoC: tegra: select CONFIG_SND_SIMPLE_CARD_UTILS This I2S client driver now uses functions exported from a helper module but fails to link when the helper is disabled: ERROR: modpost: "simple_util_parse_convert" [sound/soc/tegra/snd-soc-tegra210-i2s.ko] undefined! ERROR: modpost: "simple_util_get_sample_fmt" [sound/soc/tegra/snd-soc-tegra210-i2s.ko] undefined! Add a Kconfig select line to ensure it's always turned on here. Fixes: 2502f8dd8c30 ("ASoC: tegra: I2S client convert formats handling") Signed-off-by: Arnd Bergmann Reviewed-by: Sameer Pujar Link: https://patch.msgid.link/20240719074831.3253995-1-arnd@kernel.org Signed-off-by: Mark Brown commit 9931f7d5d251882a147cc5811060097df43e79f5 Author: Pierre-Louis Bossart Date: Mon Jul 22 10:30:02 2024 +0200 ASoC: Intel: use soc_intel_is_byt_cr() only when IOSF_MBI is reachable the Intel kbuild bot reports a link failure when IOSF_MBI is built-in but the Merrifield driver is configured as a module. The soc-intel-quirks.h is included for Merrifield platforms, but IOSF_MBI is not selected for that platform. ld.lld: error: undefined symbol: iosf_mbi_read >>> referenced by atom.c >>> sound/soc/sof/intel/atom.o:(atom_machine_select) in archive vmlinux.a This patch forces the use of the fallback static inline when IOSF_MBI is not reachable. Fixes: 536cfd2f375d ("ASoC: Intel: use common helpers to detect CPUs") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407160704.zpdhJ8da-lkp@intel.com/ Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://patch.msgid.link/20240722083002.10800-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 542440fd7b30983cae23e32bd22f69a076ec7ef4 Author: Arnd Bergmann Date: Fri Jul 19 12:40:24 2024 +0200 regmap: maple: work around gcc-14.1 false-positive warning With gcc-14.1, there is a false-postive -Wuninitialized warning in regcache_maple_drop: drivers/base/regmap/regcache-maple.c: In function 'regcache_maple_drop': drivers/base/regmap/regcache-maple.c:113:23: error: 'lower_index' is used uninitialized [-Werror=uninitialized] 113 | unsigned long lower_index, lower_last; | ^~~~~~~~~~~ drivers/base/regmap/regcache-maple.c:113:36: error: 'lower_last' is used uninitialized [-Werror=uninitialized] 113 | unsigned long lower_index, lower_last; | ^~~~~~~~~~ I've created a reduced test case to see if this needs to be reported as a gcc, but it appears that the gcc-14.x branch already has a change that turns this into a more sensible -Wmaybe-uninitialized warning, so I ended up not reporting it so far. The reduced test case also produces a warning for gcc-13 and gcc-12 but I don't see that with the version in the kernel. Link: https://godbolt.org/z/oKbohKqd3 Link: https://lore.kernel.org/all/CAMuHMdWj=FLmkazPbYKPevDrcym2_HDb_U7Mb9YE9ovrP0jJfA@mail.gmail.com/ Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20240719104030.1382465-1-arnd@kernel.org Signed-off-by: Mark Brown commit 7010d9464f7ca3ee2d75095ea2e642a9009a41ff Author: Takashi Iwai Date: Mon Jul 22 10:06:04 2024 +0200 ALSA: usb-audio: Move HD Webcam quirk to the right place The quirk_flags_table[] is sorted in the USB ID order, while the last fix was put at a wrong position. Adjust the entry at the right position. Fixes: 74dba2408818 ("ALSA: usb-audio: Fix microphone sound on HD webcam.") Cc: Link: https://patch.msgid.link/20240722080605.23481-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 933069701c1b507825b514317d4edd5d3fd9d417 Merge: 527eff227d432 d484d621d40f4 Author: Linus Torvalds Date: Sun Jul 21 20:50:39 2024 -0700 Merge tag '6.11-rc-smb3-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - two durable handle improvements - two small cleanup patches * tag '6.11-rc-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: add durable scavenger timer ksmbd: avoid reclaiming expired durable opens by the client ksmbd: Constify struct ksmbd_transport_ops ksmbd: remove duplicate SMB2 Oplock levels definitions commit 627a24f5f25d689682f395f3df1411273be4436b Merge: 412dbc662e651 e3615bd198289 Author: Dave Airlie Date: Mon Jul 22 13:03:42 2024 +1000 Merge tag 'amd-drm-fixes-6.11-2024-07-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.11-2024-07-18: amdgpu: - Bump driver version for GFX12 DCC - DC documention warning fixes - VCN unified queue power fix - SMU fix - RAS fix - Display corruption fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240718215258.79356-1-alexander.deucher@amd.com commit 412dbc662e651960b47285d8b647cd36b31a3e4d Merge: 78e6e468e111e 1fe1c66274fb8 Author: Dave Airlie Date: Mon Jul 22 12:52:55 2024 +1000 Merge tag 'drm-misc-next-fixes-2024-07-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next Two fixes for v3d to fix an array indexing on newer V3D revisions. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240719-emerald-newt-of-skill-89b54a@houat commit 78e6e468e111ebf502adea7bb07c6708e497f83d Merge: 7d4ecf3707b5d 90936a0a4c54f Author: Dave Airlie Date: Mon Jul 22 11:51:48 2024 +1000 Merge tag 'drm-xe-next-fixes-2024-07-18' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next - Xe_exec ioctl minor fix on sync entry cleanup upon error (Ashutosh) - SRIOV: limit VF LMEM provisioning (Michal) - Wedge mode fixes (Brost) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Zpk6CI0FDoTJwkSb@intel.com commit 527eff227d4321c6ea453db1083bc4fdd4d3a3e8 Merge: fbc90c042cd1d 67856f44da381 Author: Linus Torvalds Date: Sun Jul 21 17:56:22 2024 -0700 Merge tag 'mm-nonmm-stable-2024-07-21-15-07' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - In the series "treewide: Refactor heap related implementation", Kuan-Wei Chiu has significantly reworked the min_heap library code and has taught bcachefs to use the new more generic implementation. - Yury Norov's series "Cleanup cpumask.h inclusion in core headers" reworks the cpumask and nodemask headers to make things generally more rational. - Kuan-Wei Chiu has sent along some maintenance work against our sorting library code in the series "lib/sort: Optimizations and cleanups". - More library maintainance work from Christophe Jaillet in the series "Remove usage of the deprecated ida_simple_xx() API". - Ryusuke Konishi continues with the nilfs2 fixes and clanups in the series "nilfs2: eliminate the call to inode_attach_wb()". - Kuan-Ying Lee has some fixes to the gdb scripts in the series "Fix GDB command error". - Plus the usual shower of singleton patches all over the place. Please see the relevant changelogs for details. * tag 'mm-nonmm-stable-2024-07-21-15-07' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (98 commits) ia64: scrub ia64 from poison.h watchdog/perf: properly initialize the turbo mode timestamp and rearm counter tsacct: replace strncpy() with strscpy() lib/bch.c: use swap() to improve code test_bpf: convert comma to semicolon init/modpost: conditionally check section mismatch to __meminit* init: remove unused __MEMINIT* macros nilfs2: Constify struct kobj_type nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro math: rational: add missing MODULE_DESCRIPTION() macro lib/zlib: add missing MODULE_DESCRIPTION() macro fs: ufs: add MODULE_DESCRIPTION() lib/rbtree.c: fix the example typo ocfs2: add bounds checking to ocfs2_check_dir_entry() fs: add kernel-doc comments to ocfs2_prepare_orphan_dir() coredump: simplify zap_process() selftests/fpu: add missing MODULE_DESCRIPTION() macro compiler.h: simplify data_race() macro build-id: require program headers to be right after ELF header resource: add missing MODULE_DESCRIPTION() ... commit 7d4ecf3707b5da27a69ddf3dcfc28599593aad2e Merge: 478a52707b0ab 509580fad7323 Author: Dave Airlie Date: Mon Jul 22 10:51:47 2024 +1000 Merge tag 'drm-intel-next-fixes-2024-07-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next - Reset intel_dp->link_trained before retraining the link [dp] (Imre Deak) - Don't switch the LTTPR mode on an active link [dp] (Imre Deak) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/ZpjgtowjpUZoHvrl@linux commit fbc90c042cd1dc7258ebfebe6d226017e5b5ac8c Merge: 7846b618e0a4c 30d77b7eef019 Author: Linus Torvalds Date: Sun Jul 21 17:15:46 2024 -0700 Merge tag 'mm-stable-2024-07-21-14-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: - In the series "mm: Avoid possible overflows in dirty throttling" Jan Kara addresses a couple of issues in the writeback throttling code. These fixes are also targetted at -stable kernels. - Ryusuke Konishi's series "nilfs2: fix potential issues related to reserved inodes" does that. This should actually be in the mm-nonmm-stable tree, along with the many other nilfs2 patches. My bad. - More folio conversions from Kefeng Wang in the series "mm: convert to folio_alloc_mpol()" - Kemeng Shi has sent some cleanups to the writeback code in the series "Add helper functions to remove repeated code and improve readability of cgroup writeback" - Kairui Song has made the swap code a little smaller and a little faster in the series "mm/swap: clean up and optimize swap cache index". - In the series "mm/memory: cleanly support zeropage in vm_insert_page*(), vm_map_pages*() and vmf_insert_mixed()" David Hildenbrand has reworked the rather sketchy handling of the use of the zeropage in MAP_SHARED mappings. I don't see any runtime effects here - more a cleanup/understandability/maintainablity thing. - Dev Jain has improved selftests/mm/va_high_addr_switch.c's handling of higher addresses, for aarch64. The (poorly named) series is "Restructure va_high_addr_switch". - The core TLB handling code gets some cleanups and possible slight optimizations in Bang Li's series "Add update_mmu_tlb_range() to simplify code". - Jane Chu has improved the handling of our fake-an-unrecoverable-memory-error testing feature MADV_HWPOISON in the series "Enhance soft hwpoison handling and injection". - Jeff Johnson has sent a billion patches everywhere to add MODULE_DESCRIPTION() to everything. Some landed in this pull. - In the series "mm: cleanup MIGRATE_SYNC_NO_COPY mode", Kefeng Wang has simplified migration's use of hardware-offload memory copying. - Yosry Ahmed performs more folio API conversions in his series "mm: zswap: trivial folio conversions". - In the series "large folios swap-in: handle refault cases first", Chuanhua Han inches us forward in the handling of large pages in the swap code. This is a cleanup and optimization, working toward the end objective of full support of large folio swapin/out. - In the series "mm,swap: cleanup VMA based swap readahead window calculation", Huang Ying has contributed some cleanups and a possible fixlet to his VMA based swap readahead code. - In the series "add mTHP support for anonymous shmem" Baolin Wang has taught anonymous shmem mappings to use multisize THP. By default this is a no-op - users must opt in vis sysfs controls. Dramatic improvements in pagefault latency are realized. - David Hildenbrand has some cleanups to our remaining use of page_mapcount() in the series "fs/proc: move page_mapcount() to fs/proc/internal.h". - David also has some highmem accounting cleanups in the series "mm/highmem: don't track highmem pages manually". - Build-time fixes and cleanups from John Hubbard in the series "cleanups, fixes, and progress towards avoiding "make headers"". - Cleanups and consolidation of the core pagemap handling from Barry Song in the series "mm: introduce pmd|pte_needs_soft_dirty_wp helpers and utilize them". - Lance Yang's series "Reclaim lazyfree THP without splitting" has reduced the latency of the reclaim of pmd-mapped THPs under fairly common circumstances. A 10x speedup is seen in a microbenchmark. It does this by punting to aother CPU but I guess that's a win unless all CPUs are pegged. - hugetlb_cgroup cleanups from Xiu Jianfeng in the series "mm/hugetlb_cgroup: rework on cftypes". - Miaohe Lin's series "Some cleanups for memory-failure" does just that thing. - Someone other than SeongJae has developed a DAMON feature in Honggyu Kim's series "DAMON based tiered memory management for CXL memory". This adds DAMON features which may be used to help determine the efficiency of our placement of CXL/PCIe attached DRAM. - DAMON user API centralization and simplificatio work in SeongJae Park's series "mm/damon: introduce DAMON parameters online commit function". - In the series "mm: page_type, zsmalloc and page_mapcount_reset()" David Hildenbrand does some maintenance work on zsmalloc - partially modernizing its use of pageframe fields. - Kefeng Wang provides more folio conversions in the series "mm: remove page_maybe_dma_pinned() and page_mkclean()". - More cleanup from David Hildenbrand, this time in the series "mm/memory_hotplug: use PageOffline() instead of PageReserved() for !ZONE_DEVICE". It "enlightens memory hotplug more about PageOffline() pages" and permits the removal of some virtio-mem hacks. - Barry Song's series "mm: clarify folio_add_new_anon_rmap() and __folio_add_anon_rmap()" is a cleanup to the anon folio handling in preparation for mTHP (multisize THP) swapin. - Kefeng Wang's series "mm: improve clear and copy user folio" implements more folio conversions, this time in the area of large folio userspace copying. - The series "Docs/mm/damon/maintaier-profile: document a mailing tool and community meetup series" tells people how to get better involved with other DAMON developers. From SeongJae Park. - A large series ("kmsan: Enable on s390") from Ilya Leoshkevich does that. - David Hildenbrand sends along more cleanups, this time against the migration code. The series is "mm/migrate: move NUMA hinting fault folio isolation + checks under PTL". - Jan Kara has found quite a lot of strangenesses and minor errors in the readahead code. He addresses this in the series "mm: Fix various readahead quirks". - SeongJae Park's series "selftests/damon: test DAMOS tried regions and {min,max}_nr_regions" adds features and addresses errors in DAMON's self testing code. - Gavin Shan has found a userspace-triggerable WARN in the pagecache code. The series "mm/filemap: Limit page cache size to that supported by xarray" addresses this. The series is marked cc:stable. - Chengming Zhou's series "mm/ksm: cmp_and_merge_page() optimizations and cleanup" cleans up and slightly optimizes KSM. - Roman Gushchin has separated the memcg-v1 and memcg-v2 code - lots of code motion. The series (which also makes the memcg-v1 code Kconfigurable) are "mm: memcg: separate legacy cgroup v1 code and put under config option" and "mm: memcg: put cgroup v1-specific memcg data under CONFIG_MEMCG_V1" - Dan Schatzberg's series "Add swappiness argument to memory.reclaim" adds an additional feature to this cgroup-v2 control file. - The series "Userspace controls soft-offline pages" from Jiaqi Yan permits userspace to stop the kernel's automatic treatment of excessive correctable memory errors. In order to permit userspace to monitor and handle this situation. - Kefeng Wang's series "mm: migrate: support poison recover from migrate folio" teaches the kernel to appropriately handle migration from poisoned source folios rather than simply panicing. - SeongJae Park's series "Docs/damon: minor fixups and improvements" does those things. - In the series "mm/zsmalloc: change back to per-size_class lock" Chengming Zhou improves zsmalloc's scalability and memory utilization. - Vivek Kasireddy's series "mm/gup: Introduce memfd_pin_folios() for pinning memfd folios" makes the GUP code use FOLL_PIN rather than bare refcount increments. So these paes can first be moved aside if they reside in the movable zone or a CMA block. - Andrii Nakryiko has added a binary ioctl()-based API to /proc/pid/maps for much faster reading of vma information. The series is "query VMAs from /proc//maps". - In the series "mm: introduce per-order mTHP split counters" Lance Yang improves the kernel's presentation of developer information related to multisize THP splitting. - Michael Ellerman has developed the series "Reimplement huge pages without hugepd on powerpc (8xx, e500, book3s/64)". This permits userspace to use all available huge page sizes. - In the series "revert unconditional slab and page allocator fault injection calls" Vlastimil Babka removes a performance-affecting and not very useful feature from slab fault injection. * tag 'mm-stable-2024-07-21-14-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (411 commits) mm/mglru: fix ineffective protection calculation mm/zswap: fix a white space issue mm/hugetlb: fix kernel NULL pointer dereference when migrating hugetlb folio mm/hugetlb: fix possible recursive locking detected warning mm/gup: clear the LRU flag of a page before adding to LRU batch mm/numa_balancing: teach mpol_to_str about the balancing mode mm: memcg1: convert charge move flags to unsigned long long alloc_tag: fix page_ext_get/page_ext_put sequence during page splitting lib: reuse page_ext_data() to obtain codetag_ref lib: add missing newline character in the warning message mm/mglru: fix overshooting shrinker memory mm/mglru: fix div-by-zero in vmpressure_calc_level() mm/kmemleak: replace strncpy() with strscpy() mm, page_alloc: put should_fail_alloc_page() back behing CONFIG_FAIL_PAGE_ALLOC mm, slab: put should_failslab() back behind CONFIG_SHOULD_FAILSLAB mm: ignore data-race in __swap_writepage hugetlbfs: ensure generic_hugetlb_get_unmapped_area() returns higher address than mmap_min_addr mm: shmem: rename mTHP shmem counters mm: swap_state: use folio_alloc_mpol() in __read_swap_cache_async() mm/migrate: putback split folios when numa hint migration fails ... commit 7846b618e0a4c3e08888099d1d4512722b39ca99 Merge: 33c9de2960d34 efa9c5be2caec Author: Linus Torvalds Date: Sun Jul 21 15:34:10 2024 -0700 Merge tag 'rtc-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Subsystem: - add missing MODULE_DESCRIPTION() macro - fix offset addition for alarms Drivers: - isl1208: alarm clearing fixes - mcp794xx: oscillator failure detection - stm32: stm32mp25 support - tps6594: power management support" * tag 'rtc-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: stm32: add new st,stm32mp25-rtc compatible and check RIF configuration dt-bindings: rtc: stm32: introduce new st,stm32mp25-rtc compatible rtc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 rtc: interface: Add RTC offset to alarm after fix-up rtc: ds1307: Clamp year to valid BCD (0-99) in `set_time()` rtc: ds1307: Detect oscillator fail on mcp794xx rtc: isl1208: Update correct procedure for clearing alarm rtc: isl1208: Add a delay for clearing alarm dt-bindings: rtc: Convert rtc-fsl-ftm-alarm.txt to yaml format rtc: add missing MODULE_DESCRIPTION() macro rtc: abx80x: Fix return value of nvmem callback on read rtc: cmos: Fix return value of nvmem callbacks rtc: isl1208: Fix return value of nvmem callbacks rtc: tps6594: Add power management support rtc: tps6594: introduce private structure as drvdata rtc: tps6594: Fix memleak in probe commit 33c9de2960d347c06d016c2c07ac4aa855cd75f0 Merge: 8e313211f7d46 a07d38afd1528 Author: Linus Torvalds Date: Sun Jul 21 15:23:39 2024 -0700 Merge tag '6.11-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Six smb3 client fixes, most for stable including important netfs fixes: - various netfs related fixes for cifs addressing some regressions in 6.10 (e.g. generic/708 and some multichannel crediting related issues) - fix for a noisy log message on copy_file_range - add trace point for read/write credits" * tag '6.11-rc-part1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix missing fscache invalidation cifs: Add a tracepoint to track credits involved in R/W requests cifs: Fix setting of zero_point after DIO write cifs: Fix missing error code set cifs: Fix server re-repick on subrequest retry cifs: fix noisy message on copy_file_range commit 8e313211f7d46d42b6aa7601b972fe89dcc4a076 Merge: 2c9b3512402ed 11eaac6e8e720 Author: Linus Torvalds Date: Sun Jul 21 10:25:59 2024 -0700 Merge tag 'pinctrl-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Some new drivers is the main part, the rest is cleanups and nonurgent fixes. Nothing much special about this, no core changes this time. New drivers: - Renesas RZ/V2H(P) SoC - NXP Freescale i.MX91 SoC - Nuvoton MA35D1 SoC - Qualcomm PMC8380, SM4250, SM4250 LPI Enhancements: - A slew of scoped-based simplifications of of_node_put()" * tag 'pinctrl-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (110 commits) pinctrl: renesas: rzg2l: Support output enable on RZ/G2L pinctrl: renesas: rzg2l: Clean up and refactor OEN read/write functions pinctrl: renesas: rzg2l: Clarify OEN read/write support dt-bindings: pinctrl: pinctrl-single: Fix pinctrl-single,gpio-range description dt-bindings: pinctrl: npcm8xx: add missing pin group and mux function dt-bindings: pinctrl: pinctrl-single: fix schmitt related properties pinctrl: freescale: Use scope based of_node_put() cleanups pinctrl: equilibrium: Use scope based of_node_put() cleanups pinctrl: ti: iodelay: Use scope based of_node_put() cleanups pinctrl: qcom: lpass-lpi: increase MAX_NR_GPIO to 32 pinctrl: cy8c95x0: Update cache modification pinctrl: cy8c95x0: Use cleanup.h pinctrl: renesas: r8a779h0: Remove unneeded separators pinctrl: renesas: r8a779g0: Add INTC-EX pins, groups, and function pinctrl: renesas: r8a779g0: Remove unneeded separators pinctrl: renesas: r8a779h0: Add AVB MII pins and groups pinctrl: renesas: r8a779g0: Fix TPU suffixes pinctrl: renesas: r8a779g0: Fix TCLK suffixes pinctrl: renesas: r8a779g0: FIX PWM suffixes pinctrl: renesas: r8a779g0: Fix IRQ suffixes ... commit 1a7c8d2459edb8e082cbce1b7e516495ca913740 Author: Masahiro Yamada Date: Sun Jul 21 01:21:14 2024 +0900 kallsyms: change sym_entry::percpu_absolute to bool type This field is boolean. Signed-off-by: Masahiro Yamada commit 1d48f8feb86ee773e65c6d54856bbfb7702bd35d Author: Masahiro Yamada Date: Sun Jul 21 01:21:13 2024 +0900 kallsyms: unify seq and start_pos fields of struct sym_entry The struct sym_entry uses the 'seq' and 'start_pos' fields to remember the index in the symbol table. They serve the same purpose and are not used simultaneously. Unify them. Signed-off-by: Masahiro Yamada commit f9c3d671dd816ea4d5604dd04ef98d42921656a7 Author: Masahiro Yamada Date: Sat Jul 20 19:30:14 2024 +0900 kallsyms: add more original symbol type/name in comment lines Commit bea5b7450474 ("kallsyms: expand symbol name into comment for debugging") added the uncompressed type/name in the comment lines of kallsyms_offsets. It would be useful to do the same for kallsyms_names and kallsyms_seqs_of_names. Signed-off-by: Masahiro Yamada commit b07e18100940418803d289a91c7d859af006b8e7 Author: Masahiro Yamada Date: Sat Jul 20 19:30:13 2024 +0900 kallsyms: use \t instead of a tab in printf() This string literal uses a mixture of \t escape sequences and a tab. Use \t consistently. Signed-off-by: Masahiro Yamada commit bde6fb37bbc3a41eb63b1e4d06e2ff217d4a2f18 Author: Masahiro Yamada Date: Sat Jul 20 19:30:12 2024 +0900 kallsyms: avoid repeated calculation of array size for markers Introduce the markers_cnt variable for readability. No functional change intended. Signed-off-by: Masahiro Yamada commit c8578539debaedfbb4671e1954be8ebbd1307c6f Author: Thomas Weißschuh Date: Sat Jul 20 11:18:12 2024 +0200 kbuild: add script and target to generate pacman package pacman is the package manager used by Arch Linux and its derivates. Creating native packages from the kernel tree has multiple advantages: * The package triggers the correct hooks for initramfs generation and bootloader configuration * Uninstallation is complete and also invokes the relevant hooks * New UAPI headers can be installed without any manual bookkeeping The PKGBUILD file is a modified version of the one used for the downstream Arch Linux "linux" package. Extra steps that should not be necessary for a development kernel have been removed and an UAPI header package has been added. Signed-off-by: Thomas Weißschuh Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 3554a45297c0f6c5de5dfdba0d218b0eb9274207 Author: Masahiro Yamada Date: Sat Jul 20 16:27:39 2024 +0900 modpost: use generic macros for hash table implementation Use macros provided by hashtable.h Signed-off-by: Masahiro Yamada commit fbaf242c956aff6a07d9e97eaa3a0a48d947de33 Author: Masahiro Yamada Date: Sat Jul 20 16:27:38 2024 +0900 kbuild: move some helper headers from scripts/kconfig/ to scripts/include/ Move array_size.h, hashtable.h, list.h, list_types.h from scripts/kconfig/ to scripts/include/. These headers will be useful for other host programs. Remove scripts/mod/list.h. Signed-off-by: Masahiro Yamada commit 2c9b3512402ed192d1f43f4531fb5da947e72bd0 Merge: c43a20e4a520b 332d2c1d713e2 Author: Linus Torvalds Date: Sat Jul 20 12:41:03 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "ARM: - Initial infrastructure for shadow stage-2 MMUs, as part of nested virtualization enablement - Support for userspace changes to the guest CTR_EL0 value, enabling (in part) migration of VMs between heterogenous hardware - Fixes + improvements to pKVM's FF-A proxy, adding support for v1.1 of the protocol - FPSIMD/SVE support for nested, including merged trap configuration and exception routing - New command-line parameter to control the WFx trap behavior under KVM - Introduce kCFI hardening in the EL2 hypervisor - Fixes + cleanups for handling presence/absence of FEAT_TCRX - Miscellaneous fixes + documentation updates LoongArch: - Add paravirt steal time support - Add support for KVM_DIRTY_LOG_INITIALLY_SET - Add perf kvm-stat support for loongarch RISC-V: - Redirect AMO load/store access fault traps to guest - perf kvm stat support - Use guest files for IMSIC virtualization, when available s390: - Assortment of tiny fixes which are not time critical x86: - Fixes for Xen emulation - Add a global struct to consolidate tracking of host values, e.g. EFER - Add KVM_CAP_X86_APIC_BUS_CYCLES_NS to allow configuring the effective APIC bus frequency, because TDX - Print the name of the APICv/AVIC inhibits in the relevant tracepoint - Clean up KVM's handling of vendor specific emulation to consistently act on "compatible with Intel/AMD", versus checking for a specific vendor - Drop MTRR virtualization, and instead always honor guest PAT on CPUs that support self-snoop - Update to the newfangled Intel CPU FMS infrastructure - Don't advertise IA32_PERF_GLOBAL_OVF_CTRL as an MSR-to-be-saved, as it reads '0' and writes from userspace are ignored - Misc cleanups x86 - MMU: - Small cleanups, renames and refactoring extracted from the upcoming Intel TDX support - Don't allocate kvm_mmu_page.shadowed_translation for shadow pages that can't hold leafs SPTEs - Unconditionally drop mmu_lock when allocating TDP MMU page tables for eager page splitting, to avoid stalling vCPUs when splitting huge pages - Bug the VM instead of simply warning if KVM tries to split a SPTE that is non-present or not-huge. KVM is guaranteed to end up in a broken state because the callers fully expect a valid SPTE, it's all but dangerous to let more MMU changes happen afterwards x86 - AMD: - Make per-CPU save_area allocations NUMA-aware - Force sev_es_host_save_area() to be inlined to avoid calling into an instrumentable function from noinstr code - Base support for running SEV-SNP guests. API-wise, this includes a new KVM_X86_SNP_VM type, encrypting/measure the initial image into guest memory, and finalizing it before launching it. Internally, there are some gmem/mmu hooks needed to prepare gmem-allocated pages before mapping them into guest private memory ranges This includes basic support for attestation guest requests, enough to say that KVM supports the GHCB 2.0 specification There is no support yet for loading into the firmware those signing keys to be used for attestation requests, and therefore no need yet for the host to provide certificate data for those keys. To support fetching certificate data from userspace, a new KVM exit type will be needed to handle fetching the certificate from userspace. An attempt to define a new KVM_EXIT_COCO / KVM_EXIT_COCO_REQ_CERTS exit type to handle this was introduced in v1 of this patchset, but is still being discussed by community, so for now this patchset only implements a stub version of SNP Extended Guest Requests that does not provide certificate data x86 - Intel: - Remove an unnecessary EPT TLB flush when enabling hardware - Fix a series of bugs that cause KVM to fail to detect nested pending posted interrupts as valid wake eents for a vCPU executing HLT in L2 (with HLT-exiting disable by L1) - KVM: x86: Suppress MMIO that is triggered during task switch emulation Explicitly suppress userspace emulated MMIO exits that are triggered when emulating a task switch as KVM doesn't support userspace MMIO during complex (multi-step) emulation Silently ignoring the exit request can result in the WARN_ON_ONCE(vcpu->mmio_needed) firing if KVM exits to userspace for some other reason prior to purging mmio_needed See commit 0dc902267cb3 ("KVM: x86: Suppress pending MMIO write exits if emulator detects exception") for more details on KVM's limitations with respect to emulated MMIO during complex emulator flows Generic: - Rename the AS_UNMOVABLE flag that was introduced for KVM to AS_INACCESSIBLE, because the special casing needed by these pages is not due to just unmovability (and in fact they are only unmovable because the CPU cannot access them) - New ioctl to populate the KVM page tables in advance, which is useful to mitigate KVM page faults during guest boot or after live migration. The code will also be used by TDX, but (probably) not through the ioctl - Enable halt poll shrinking by default, as Intel found it to be a clear win - Setup empty IRQ routing when creating a VM to avoid having to synchronize SRCU when creating a split IRQCHIP on x86 - Rework the sched_in/out() paths to replace kvm_arch_sched_in() with a flag that arch code can use for hooking both sched_in() and sched_out() - Take the vCPU @id as an "unsigned long" instead of "u32" to avoid truncating a bogus value from userspace, e.g. to help userspace detect bugs - Mark a vCPU as preempted if and only if it's scheduled out while in the KVM_RUN loop, e.g. to avoid marking it preempted and thus writing guest memory when retrieving guest state during live migration blackout Selftests: - Remove dead code in the memslot modification stress test - Treat "branch instructions retired" as supported on all AMD Family 17h+ CPUs - Print the guest pseudo-RNG seed only when it changes, to avoid spamming the log for tests that create lots of VMs - Make the PMU counters test less flaky when counting LLC cache misses by doing CLFLUSH{OPT} in every loop iteration" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (227 commits) crypto: ccp: Add the SNP_VLEK_LOAD command KVM: x86/pmu: Add kvm_pmu_call() to simplify static calls of kvm_pmu_ops KVM: x86: Introduce kvm_x86_call() to simplify static calls of kvm_x86_ops KVM: x86: Replace static_call_cond() with static_call() KVM: SEV: Provide support for SNP_EXTENDED_GUEST_REQUEST NAE event x86/sev: Move sev_guest.h into common SEV header KVM: SEV: Provide support for SNP_GUEST_REQUEST NAE event KVM: x86: Suppress MMIO that is triggered during task switch emulation KVM: x86/mmu: Clean up make_huge_page_split_spte() definition and intro KVM: x86/mmu: Bug the VM if KVM tries to split a !hugepage SPTE KVM: selftests: x86: Add test for KVM_PRE_FAULT_MEMORY KVM: x86: Implement kvm_arch_vcpu_pre_fault_memory() KVM: x86/mmu: Make kvm_mmu_do_page_fault() return mapped level KVM: x86/mmu: Account pf_{fixed,emulate,spurious} in callers of "do page fault" KVM: x86/mmu: Bump pf_taken stat only in the "real" page fault handler KVM: Add KVM_PRE_FAULT_MEMORY vcpu ioctl to pre-populate guest memory KVM: Document KVM_PRE_FAULT_MEMORY ioctl mm, virt: merge AS_UNMOVABLE and AS_INACCESSIBLE perf kvm: Add kvm-stat for loongarch64 LoongArch: KVM: Add PV steal time support in guest side ... commit a07d38afd15281c42613943a9a715c3ba07c21e6 Author: David Howells Date: Fri Jul 19 16:01:48 2024 +0100 cifs: Fix missing fscache invalidation A network filesystem needs to implement a netfslib hook to invalidate fscache if it's to be able to use the cache. Fix cifs to implement the cache invalidation hook. Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (Red Hat) cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Cc: stable@vger.kernel.org Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib") Signed-off-by: Steve French commit c43a20e4a520b37c2ef6d4f422de989992c9129f Merge: 9fa23750c6e59 78a0b13f5744b Author: Linus Torvalds Date: Sat Jul 20 11:52:17 2024 -0700 Merge tag 'mtd/for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "Nothing stands out for this merge window, mostly minor fixes, such as module descriptions, the use of debug macros and Makefile improvements. Raw NAND changes; - The Freescale MXC driver has been converted to the newer '->exec_op()' interface - The meson driver now supports handling the boot ROM area with very specific ECC needs - Support for the iMX8QXP has been added to the GPMI driver - The lpx32xx driver now can get the DMA channels using DT entries - The Qcom binding has been improved to be more future proof by Rob - And then there is the usual load of misc and minor changes SPI-NAND changes: - The Macronix vendor driver has been improved to support an extended ID to avoid conflicting with older devices after an ID reuse issue SPI NOR changes: - Drop support for Xilinx S3AN flashes. These flashes are for the very old Xilinx Spartan 3 FPGAs and they need some awkward code in the core to support. Drop support for these flashes, along with the special handling we needed for them in the core like non-power-of-2 page size handling and the .setup() callback. - Fix regression for old w25q128 flashes without SFDP tables. Commit 83e824a4a595 ("mtd: spi-nor: Correct flags for Winbond w25q128") dropped support for such devices under the assumption that they aren't being used anymore. Users have now surfaced [0] so fix the regression by supporting both kind of devices. - Core cleanups including removal of SPI_NOR_NO_FR flag and simplification of spi_nor_get_flash_info()" Link: https://lore.kernel.org/r/CALxbwRo_-9CaJmt7r7ELgu+vOcgk=xZcGHobnKf=oT2=u4d4aA@mail.gmail.com/ [0] * tag 'mtd/for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (28 commits) mtd: rawnand: lpx32xx: Fix dma_request_chan() error checks mtd: spinand: macronix: Add support for serial NAND flash mtd: spinand: macronix: Add support for reading Device ID 2 mtd: rawnand: lpx32xx: Request DMA channels using DT entries dt-bindings: mtd: qcom,nandc: Define properties at top-level mtd: rawnand: intel: use 'time_left' variable with wait_for_completion_timeout() mtd: rawnand: mxc: use 'time_left' variable with wait_for_completion_timeout() mtd: rawnand: gpmi: add iMX8QXP support. mtd: rawnand: gpmi: add 'support_edo_timing' in gpmi_devdata mtd: cmdlinepart: Replace `dbg()` macro with `pr_debug()` mtd: add missing MODULE_DESCRIPTION() macros mtd: make mtd_test.c a separate module dt-bindings: mtd: gpmi-nand: Add 'fsl,imx8qxp-gpmi-nand' compatible string mtd: rawnand: cadence: remove unused struct 'ecc_info' mtd: rawnand: mxc: support software ECC mtd: rawnand: mxc: implement exec_op mtd: rawnand: mxc: separate page read from ecc calc mtd: spi-nor: winbond: fix w25q128 regression mtd: spi-nor: simplify spi_nor_get_flash_info() mtd: spi-nor: get rid of SPI_NOR_NO_FR ... commit 9fa23750c6e591a6e095057ec07c81dddec0d72c Merge: 8326f5e1a47b1 f4b89d8ce5a83 Author: Linus Torvalds Date: Sat Jul 20 11:41:52 2024 -0700 Merge tag 'landlock-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock updates from Mickaël Salaün: "This simplifies code and improves documentation" * tag 'landlock-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Various documentation improvements landlock: Clarify documentation for struct landlock_ruleset_attr landlock: Use bit-fields for storing handled layer access masks commit 8326f5e1a47b1a657524678cb62b264a84fbea7e Merge: 13a7871541b7f 06dcc4c9baa9e Author: Linus Torvalds Date: Sat Jul 20 11:30:16 2024 -0700 Merge tag 'firewire-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Takashi Sakamoto: "There are many lines of changes for FireWire subsystem, but there is practically no functional change. Most of the changes are for code refactoring, some KUnit tests to added helper functions, and new tracepoints events for both the core functions and 1394 OHCI driver. The tracepoints events now cover the verbose logging enabled by debug parameter of firewire-ohci kernel module. The parameter would be removed in any future timing, thus it is now deprecated" * tag 'firewire-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: (32 commits) firewire: core: move copy_port_status() helper function to TP_fast_assign() block Revert "firewire: ohci: use common macro to interpret be32 data in le32 buffer" firewire: ohci: add tracepoints event for data of Self-ID DMA firewire: ohci: use inline functions to operate data of self-ID DMA firewire: ohci: add static inline functions to deserialize for Self-ID DMA operation firewire: ohci: use static function to handle endian issue on PowerPC platform firewire: ohci: use common macro to interpret be32 data in le32 buffer firewire: core: Fix spelling mistakes in tracepoint messages firewire: ohci: add tracepoints event for hardIRQ event firewire: ohci: add support for Linux kernel tracepoints firewire: core: add tracepoints events for completions of packets in isochronous context firewire: core: add tracepoints events for queueing packets of isochronous context firewire: core: add tracepoints events for flushing completions of isochronous context firewire: core: add tracepoints events for flushing of isochronous context firewire: core: add tracepoints events for starting/stopping of isochronous context firewire: core: add tracepoints events for setting channels of multichannel context firewire: core: add tracepoints events for allocation/deallocation of isochronous context firewire: core: undefine macros after use in tracepoints events firewire: core: record card index in tracepoints event for self ID sequence firewire: core: use inline helper functions to serialize phy config packet ... commit 13a7871541b7f5fa6d81e76f160644d1e118b6b0 Merge: f557af081de6b b0d478e34dbfc Author: Linus Torvalds Date: Sat Jul 20 11:26:02 2024 -0700 Merge tag 'libnvdimm-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Ira Weiny: - One small cleanup to use sizeof(*pointer) - Add MODULE_DESCRIPTIONS() to eliminate make W=1 warnings * tag 'libnvdimm-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: testing: nvdimm: Add MODULE_DESCRIPTION() macros testing: nvdimm: iomap: add MODULE_DESCRIPTION() dax: add missing MODULE_DESCRIPTION() macros nvdimm: add missing MODULE_DESCRIPTION() macros ACPI: NFIT: add missing MODULE_DESCRIPTION() macro nvdimm/btt: use sizeof(*pointer) instead of sizeof(type) commit bcc87d978b834c298bbdd9c52454c5d0a946e97e Author: Pavel Begunkov Date: Thu Jul 18 20:00:53 2024 +0100 io_uring: fix error pbuf checking Syz reports a problem, which boils down to NULL vs IS_ERR inconsistent error handling in io_alloc_pbuf_ring(). KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:__io_remove_buffers+0xac/0x700 io_uring/kbuf.c:341 Call Trace: io_put_bl io_uring/kbuf.c:378 [inline] io_destroy_buffers+0x14e/0x490 io_uring/kbuf.c:392 io_ring_ctx_free+0xa00/0x1070 io_uring/io_uring.c:2613 io_ring_exit_work+0x80f/0x8a0 io_uring/io_uring.c:2844 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 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 Cc: stable@vger.kernel.org Reported-by: syzbot+2074b1a3d447915c6f1c@syzkaller.appspotmail.com Fixes: 87585b05757dc ("io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ring") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c5f9df20560bd9830401e8e48abc029e7cfd9f5e.1721329239.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 24dce1c538a7ceac43f2f97aae8dfd4bb93ea9b9 Author: Pavel Begunkov Date: Tue Jul 16 19:05:46 2024 +0100 io_uring: fix lost getsockopt completions There is a report that iowq executed getsockopt never completes. The reason being that io_uring_cmd_sock() can return a positive result, and io_uring_cmd() propagates it back to core io_uring, instead of IOU_OK. In case of io_wq_submit_work(), the request will be dropped without completing it. The offending code was introduced by a hack in a9c3eda7eada9 ("io_uring: fix submission-failure handling for uring-cmd"), however it was fine until getsockopt was introduced and started returning positive results. The right solution is to always return IOU_OK, since e0b23d9953b0c ("io_uring: optimise ltimeout for inline execution"), we should be able to do it without problems, however for the sake of backporting and minimising side effects, let's keep returning negative return codes and otherwise do IOU_OK. Link: https://github.com/axboe/liburing/issues/1181 Cc: stable@vger.kernel.org Fixes: 8e9fad0e70b7b ("io_uring: Add io_uring command support for sockets") Signed-off-by: Pavel Begunkov Reviewed-by: Breno Leitao Link: https://lore.kernel.org/r/ff349cf0654018189b6077e85feed935f0f8839e.1721149870.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f557af081de6b45a25e27d633b4d8d2dbc2f428e Merge: d2be38b9a5514 93b63f68d00a0 Author: Linus Torvalds Date: Sat Jul 20 09:11:27 2024 -0700 Merge tag 'riscv-for-linus-6.11-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for various new ISA extensions: * The Zve32[xf] and Zve64[xfd] sub-extensios of the vector extension * Zimop and Zcmop for may-be-operations * The Zca, Zcf, Zcd and Zcb sub-extensions of the C extension * Zawrs - riscv,cpu-intc is now dtschema - A handful of performance improvements and cleanups to text patching - Support for memory hot{,un}plug - The highest user-allocatable virtual address is now visible in hwprobe * tag 'riscv-for-linus-6.11-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (58 commits) riscv: lib: relax assembly constraints in hweight riscv: set trap vector earlier KVM: riscv: selftests: Add Zawrs extension to get-reg-list test KVM: riscv: Support guest wrs.nto riscv: hwprobe: export Zawrs ISA extension riscv: Add Zawrs support for spinlocks dt-bindings: riscv: Add Zawrs ISA extension description riscv: Provide a definition for 'pause' riscv: hwprobe: export highest virtual userspace address riscv: Improve sbi_ecall() code generation by reordering arguments riscv: Add tracepoints for SBI calls and returns riscv: Optimize crc32 with Zbc extension riscv: Enable DAX VMEMMAP optimization riscv: mm: Add support for ZONE_DEVICE virtio-mem: Enable virtio-mem for RISC-V riscv: Enable memory hotplugging for RISC-V riscv: mm: Take memory hotplug read-lock during kernel page table dump riscv: mm: Add memory hotplugging support riscv: mm: Add pfn_to_kaddr() implementation riscv: mm: Refactor create_linear_mapping_range() for memory hot add ... commit d2be38b9a5514dbc7dc0c96a2a7f619fcddce00d Merge: 3c3ff7be97299 bb2d63500b5c8 Author: Linus Torvalds Date: Sat Jul 20 09:03:36 2024 -0700 Merge tag 'mips_6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - add support for Realtek RTL9302C - add support for Mobileye EyeQ6H - add support for Mobileye EyeQ OLB system controller - improve r4k clocksource - add mode for emulating ieee754 NAN2008 - rework for BMIPS CBR address handling - fixes for Loongson 2K1000 - defconfig updates - cleanups and fixes * tag 'mips_6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (58 commits) MIPS: config: Add ip30_defconfig MIPS: config: lemote2f: Regenerate defconfig MIPS: config: generic: Add board-litex MIPS: config: Enable MSA and virtualization for MIPS64R6 MIPS: Fix fallback march for SB1 mips: dts: realtek: Add RTL9302C board mips: generic: add fdt fixup for Realtek reference board mips: select REALTEK_OTTO_TIMER for Realtek platforms dt-bindings: interrupt-controller: realtek,rtl-intc: Add rtl9300-intc dt-bindings: mips: realtek: Add rtl930x-soc compatible dt-bindings: vendor-prefixes: Add Cameo Communications mips: dts: realtek: add device_type property to cpu node mips: dts: realtek: use "serial" instead of "uart" in node name MIPS: Implement ieee754 NAN2008 emulation mode MIPS: lantiq: improve USB initialization MIPS: GIC: Generate redirect block accessors MIPS: CPS: Add a couple of multi-cluster utility functions MIPS: Octeron: remove source file executable bit MAINTAINERS: Mobileye: add OLB drivers and dt-bindings MIPS: mobileye: eyeq5: add OLB system-controller node ... commit 998b17d4440b8559a8bf4926e86f493101995519 Author: Oleg Nesterov Date: Sat Jul 20 22:41:07 2024 +0800 LoongArch: Make the users of larch_insn_gen_break() constant LoongArch defines UPROBE_SWBP_INSN as a function call and this breaks arch_uprobe_trampoline() which uses it to initialize a static variable. Add the new "__builtin_constant_p" helper, __emit_break(), and redefine the current users of larch_insn_gen_break() to use it. Fixes: ff474a78cef5 ("uprobe: Add uretprobe syscall to speed up return probe") Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/all/20240614174822.GA1185149@thelio-3990X/ Suggested-by: Andrii Nakryiko Tested-by: Tiezhu Yang Signed-off-by: Oleg Nesterov Signed-off-by: Huacai Chen commit 3892b11eac5aaaeefbf717f1953288b77759d9e2 Author: Tiezhu Yang Date: Sat Jul 20 22:41:07 2024 +0800 LoongArch: Check TIF_LOAD_WATCH to enable user space watchpoint Currently, there are some places to set CSR.PRMD.PWE, the first one is in hw_breakpoint_thread_switch() to enable user space singlestep via checking TIF_SINGLESTEP, the second one is in hw_breakpoint_control() to enable user space watchpoint. For the latter case, it should also check TIF_LOAD_WATCH to make the logic correct and clear. Fixes: c8e57ab0995c ("LoongArch: Trigger user-space watchpoints correctly") Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 0d3a6322021b8c98527842518eeb685f3a8761c8 Author: WANG Rui Date: Sat Jul 20 22:41:07 2024 +0800 LoongArch: Use rustc option -Zdirect-access-external-data -Zdirect-access-external-data is a new Rust compiler option added in Rust 1.78, which we use to optimize the access of external data in the Linux kernel's Rust code. This patch modifies the Rust code in vmlinux to directly access externa data, using PC-REL instead of GOT. However, Rust code whithin modules is constrained by the PC-REL addressing range and is explicitly set to use an indirect method. Acked-by: Miguel Ojeda Signed-off-by: WANG Rui Signed-off-by: Huacai Chen commit e05d4cd9b895c503dcf19c0ed9ebb8d393b220ec Author: Xi Ruoyao Date: Sat Jul 20 22:41:07 2024 +0800 LoongArch: Add support for relocating the kernel with RELR relocation RELR as a relocation packing format for relative relocations for reducing the size of relative relocation records. In a position independent executable there are often many relative relocation records, and our vmlinux is a PIE. The LLD linker (since 17.0.0) and the BFD linker (since 2.43) supports packing the relocations in the RELR format for LoongArch, with the flag -z pack-relative-relocs. Commits 5cf896fb6be3eff ("arm64: Add support for relocating the kernel with RELR relocations") and ccb2d173b983984bfa ("Makefile: use -z pack-relative-relocs") have already added the framework to use RELR. We just need to wire it up and process the RELR relocation records in relocate_relative() in addition to the RELA relocation records. A ".p2align 3" directive is added to la_abs macro or the BFD linker cannot pack the relocation records against the .la_abs section (the ". = ALIGN(8);" directive in vmlinux.lds.S is too late in the linking process). With defconfig and CONFIG_RELR vmlinux.efi is 2.1 MiB (6%) smaller, and vmlinuz.efi (using gzip compression) is 384 KiB (2.8%) smaller. Link: https://groups.google.com/d/topic/generic-abi/bX460iggiKg Link: https://reviews.llvm.org/D138135#4531389 Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d89ecf33ab6d Signed-off-by: Xi Ruoyao Signed-off-by: Huacai Chen commit 0ad158e4ef769c5f261cbf791e0005d69fc3b785 Author: Xi Ruoyao Date: Sat Jul 20 22:41:07 2024 +0800 LoongArch: Remove a redundant checking in relocator With our linker script "relocated_addr >= VMLINUX_LOAD_ADDRESS" should be always true. Signed-off-by: Xi Ruoyao Signed-off-by: Huacai Chen commit 0124fbb4c6dba23dbdf80c829be68adbccde2722 Author: Huacai Chen Date: Sat Jul 20 22:41:07 2024 +0800 LoongArch: Use correct API to map cmdline in relocate_kernel() fw_arg1 is in memory space rather than I/O space, so we should use early_memremap_ro() instead of early_ioremap() to map the cmdline. Moreover, we should unmap it after using. Suggested-by: Jiaxun Yang Reviewed-by: Jiaxun Yang Signed-off-by: Huacai Chen commit 67e6b115ddcf8f03108cedcf66261153904ce4fb Author: Huacai Chen Date: Sat Jul 20 22:41:06 2024 +0800 LoongArch: Automatically disable KASLR for hibernation Hibernation assumes the memory layout after resume be the same as that before sleep, so it expects the kernel is loaded at the same position. To achieve this goal we automatically disable KASLR if user explicitly requests hibernation via the "resume=" command line. Since "nohibernate" and "noresume" have higher priorities than "resume=", we only disable KASLR if there is no "nohibernate" and "noresume". Signed-off-by: Huacai Chen commit e523a5a65f34ca5bd67ccfdfdccf04689b58f0bf Author: Jiaxun Yang Date: Sat Jul 20 22:41:06 2024 +0800 LoongArch: Add ACPI standard hardware register based S3 support Most LoongArch 64 machines are using custom "SADR" ACPI extension to perform ACPI S3 sleep. However the standard ACPI way to perform sleep is to write a value to ACPI PM1/SLEEP_CTL register, and this is never supported properly in kernel. Add standard S3 sleep by providing a default DoSuspend function which calls ACPI's acpi_enter_sleep_state() routine when SADR is not provided by the firmware. Also fix suspend assembly code so that ra is set properly before go into sleep routine. (Previously linked address of jirl was set to a0, some firmware do require return address in a0 but it's already set with la.pcrel before). Signed-off-by: Jiaxun Yang Signed-off-by: Huacai Chen commit f60d251b27f6599b3407950924ac9b2c7a94b714 Author: Huacai Chen Date: Sat Jul 20 22:41:06 2024 +0800 LoongArch: Add architectural preparation for CPUFreq Add architectural preparation for CPUFreq driver, including: Kconfig, register definition and platform device registration. Some of LoongArch processors support DVFS, their IOCSR.FEATURES has IOCSRF_FREQSCALE set. And they has a micro-core in the package called SMC (System Management Controller) to scale frequency, voltage, etc. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 8e02c3b782ec64343f3cccc8dc5a8be2b379e80b Author: Huacai Chen Date: Sat Jul 20 22:40:59 2024 +0800 LoongArch: Add writecombine support for DMW-based ioremap() Currently, only TLB-based ioremap() support writecombine, so add the counterpart for DMW-based ioremap() with help of DMW2. The base address (WRITECOMBINE_BASE) is configured as 0xa000000000000000. DMW3 is unused by kernel now, however firmware may leave garbage in them and interfere kernel's address mapping. So clear it as necessary. BTW, centralize the DMW configuration to macro SETUP_DMWINS. Signed-off-by: Jiaxun Yang Signed-off-by: Huacai Chen commit 614d7e99752e02ff6f6d447a83d2929b9649b6cb Author: Huacai Chen Date: Sat Jul 20 22:40:59 2024 +0800 LoongArch: Add ARCH_HAS_DEBUG_VM_PGTABLE support Add ARCH_HAS_DEBUG_VM_PGTABLE selection in Kconfig, in order to make corresponding vm debug features usable on LoongArch. Also update the corresponding arch-support.txt document. Signed-off-by: Huacai Chen commit b7a2750ef268e2723acb785c4903b0b78c3dcbc6 Author: Huacai Chen Date: Sat Jul 20 22:40:59 2024 +0800 LoongArch: Add ARCH_HAS_PTE_DEVMAP support In order for things like get_user_pages() to work on ZONE_DEVICE memory, we need a software PTE bit to identify device-backed PFNs. Hook this up along with the relevant helpers to join in with ARCH_HAS_PTE_DEVMAP. Signed-off-by: Huacai Chen commit a0f7085f6a63f19f83f2644ce2da49a8d3cf7c0f Author: Jinjie Ruan Date: Sat Jul 20 22:40:58 2024 +0800 LoongArch: Add RANDOMIZE_KSTACK_OFFSET support Add support of kernel stack offset randomization while handling syscall, the offset is defaultly limited by KSTACK_OFFSET_MAX(). In order to avoid triggering stack canaries (due to __builtin_alloca()) and slowing down the entry path, use __no_stack_protector attribute to disable stack protector for do_syscall() at function level. With this patch, the REPORT_STACK test show that: `loongarch64 bits of stack entropy: 7` Reviewed-by: Kees Cook Signed-off-by: Jinjie Ruan Signed-off-by: Huacai Chen commit 08f417db702c5b05150b3851af7186fee96ddd46 Author: Huacai Chen Date: Sat Jul 20 22:40:58 2024 +0800 LoongArch: Add irq_work support via self IPIs Add irq_work support for LoongArch via self IPIs. This make it possible to run works in hardware interrupt context, which is a prerequisite for NOHZ_FULL. Implement: - arch_irq_work_raise() - arch_irq_work_has_interrupt() Reviewed-by: Guo Ren Signed-off-by: Huacai Chen commit 12d3b559b85e75640b79995e1320588d6f0d5630 Author: Huacai Chen Date: Sat Jul 20 22:40:58 2024 +0800 LoongArch: Always enumerate MADT and setup logical-physical CPU mapping Some drivers want to use cpu_logical_map(), early_cpu_to_node() and some other CPU mapping APIs, even if we use "nr_cpus=1" to hard limit the CPU number. This is strongly required for the multi-bridges machines. Currently, we stop parsing the MADT if the nr_cpus limit is reached, but to achieve the above goal we should always enumerate the MADT table and setup logical-physical CPU mapping whether there is a nr_cpus limit. Rework the MADT enumeration: 1. Define a flag "cpu_enumerated" to distinguish the first enumeration (cpu_enumerated=0) and the physical hotplug case (cpu_enumerated=1) for set_processor_mask(). 2. If cpu_enumerated=0, stop parsing only when NR_CPUS limit is reached, so we can setup logical-physical CPU mapping; if cpu_enumerated=1, stop parsing when nr_cpu_ids limit is reached, so we can avoid some runtime bugs. Once logical-physical CPU mapping is setup, we will let cpu_enumerated=1. 3. Use find_first_zero_bit() instead of cpumask_next_zero() to find the next zero bit (free logical CPU id) in the cpu_present_mask, because cpumask_next_zero() will stop at nr_cpu_ids. 4. Only touch cpu_possible_mask if cpu_enumerated=0, this is in order to avoid some potential crashes, because cpu_possible_mask is marked as __ro_after_init. 5. In prefill_possible_map(), clear cpu_present_mask bits greater than nr_cpu_ids, in order to avoid a CPU be "present" but not "possible". Signed-off-by: Huacai Chen commit 7697a0fe0154468f5df35c23ebd7aa48994c2cdc Author: Huacai Chen Date: Sat Jul 20 22:40:58 2024 +0800 LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h Chromium sandbox apparently wants to deny statx [1] so it could properly inspect arguments after the sandboxed process later falls back to fstat. Because there's currently not a "fd-only" version of statx, so that the sandbox has no way to ensure the path argument is empty without being able to peek into the sandboxed process's memory. For architectures able to do newfstatat though, glibc falls back to newfstatat after getting -ENOSYS for statx, then the respective SIGSYS handler [2] takes care of inspecting the path argument, transforming allowed newfstatat's into fstat instead which is allowed and has the same type of return value. But, as LoongArch is the first architecture to not have fstat nor newfstatat, the LoongArch glibc does not attempt falling back at all when it gets -ENOSYS for statx -- and you see the problem there! Actually, back when the LoongArch port was under review, people were aware of the same problem with sandboxing clone3 [3], so clone was eventually kept. Unfortunately it seemed at that time no one had noticed statx, so besides restoring fstat/newfstatat to LoongArch uapi (and postponing the problem further), it seems inevitable that we would need to tackle seccomp deep argument inspection. However, this is obviously a decision that shouldn't be taken lightly, so we just restore fstat/newfstatat by defining __ARCH_WANT_NEW_STAT in unistd.h. This is the simplest solution for now, and so we hope the community will tackle the long-standing problem of seccomp deep argument inspection in the future [4][5]. Also add "newstat" to syscall_abis_64 in Makefile.syscalls due to upstream asm-generic changes. More infomation please reading this thread [6]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2823150 [2] https://chromium.googlesource.com/chromium/src/sandbox/+/c085b51940bd/linux/seccomp-bpf-helpers/sigsys_handlers.cc#355 [3] https://lore.kernel.org/linux-arch/20220511211231.GG7074@brightrain.aerifal.cx/ [4] https://lwn.net/Articles/799557/ [5] https://lpc.events/event/4/contributions/560/attachments/397/640/deep-arg-inspection.pdf [6] https://lore.kernel.org/loongarch/20240226-granit-seilschaft-eccc2433014d@brauner/T/#t Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen commit 385ac870bdd531348de123d6790626ccd7827f69 Author: Wolfram Sang Date: Tue Jul 16 10:36:25 2024 +0200 i2c: header: improve kdoc for i2c_algorithm Reword the explanation of @xfer, the old one was confusing and mixing up terminology. Other than that, capitalize some words correctly and use full line length. Signed-off-by: Wolfram Sang commit d83763e44944d4d6dee38099c5d0a0984ac66385 Author: Wolfram Sang Date: Tue Jul 16 10:36:24 2024 +0200 i2c: header: remove unneeded stuff regarding i2c_algorithm The forward declaration is not needed anymore. The sentence about "following structs" became obsolete when struct i2c_algorithm became a kdoc. The paragraph about return values can go because we have this information in kdoc already. Signed-off-by: Wolfram Sang commit 6318f219cd8971296c04371b2dc4a0bff7f44858 Merge: 8e5c0abfa02d8 de4f2f52f9325 Author: Wolfram Sang Date: Sat Jul 20 15:42:18 2024 +0200 Merge tag 'i2c-host-6.11-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow Added descriptions in the DTS for the Qualcomm SM8650 and SM8550 Camera Control Interface (CCI). Added support for the "settle-time-us" property, which allows the gpio-mux device to switch from one bus to another with a configurable delay. The time can be set in the DTS. The latest change also includes file sorting. Fixed slot numbering in the SMBus framework to prevent failures when more than 8 slots are occupied. It now enforces a a maximum of 8 slots to be used. This ensures that the Intel PIIX4 device can register the SPDs correctly without failure, even if other slots are populated but not used. commit 78a0b13f5744bd270d0c2391973605d9960a402a Merge: b93f410b8b2a9 a503f91a36456 Author: Miquel Raynal Date: Sat Jul 20 14:24:38 2024 +0200 Merge tag 'nand/for-6.11' into mtd/next Raw NAND changes; The Freescale MXC driver has been converted to the newer ->exec_op() interface. The meson driver now supports handling the boot ROM area with very specific ECC needs. Support for the iMX8QXP has been added to the GPMI driver. The lpx32xx driver now can get the DMA channels using DT entries. The Qcom binding has been improved to be more future proof by Rob. And then there is the usual load of misc and minor changes. SPI-NAND changes: The Macronix vendor driver has been improved to support an extended ID to avoid conflicting with older devices after an ID reuse issue. Signed-off-by: Miquel Raynal commit b93f410b8b2a9a6344ea27ea9f1038e351b112f3 Merge: 2538af030d6fa d35df77707bf5 Author: Miquel Raynal Date: Sat Jul 20 14:24:26 2024 +0200 Merge tag 'spi-nor/for-6.11' into mtd/next SPI NOR changes for 6.11 Notable changes: - Drop support for Xilinx S3AN flashes. These flashes are for the very old Xilinx Spartan 3 FPGAs and they need some awkward code in the core to support. Drop support for these flashes, along with the special handling we needed for them in the core like non-power-of-2 page size handling and the .setup() callback. - Fix regression for old w25q128 flashes without SFDP tables. Commit 83e824a4a595 ("mtd: spi-nor: Correct flags for Winbond w25q128") dropped support for such devices under the assumption that they aren't being used anymore. Users have now surfaced [0] so fix the regression by supporting both kind of devices. - Core cleanups including removal of SPI_NOR_NO_FR flag and simplification of spi_nor_get_flash_info(). [0] https://lore.kernel.org/r/CALxbwRo_-9CaJmt7r7ELgu+vOcgk=xZcGHobnKf=oT2=u4d4aA@mail.gmail.com/ Signed-off-by: Miquel Raynal commit de4f2f52f93257433c9029ba2b4044cd9f029b21 Author: Thomas Weißschuh Date: Tue Jul 9 19:35:36 2024 +0200 i2c: piix4: Register SPDs The piix4 I2C bus can carry SPDs, register them if present. Only look on bus 0, as this is where the SPDs seem to be located. Only the first 8 slots are supported. If the system has more, then these will not be visible. The AUX bus can not be probed as on some platforms it reports all devices present and all reads return "0". This would allow the ee1004 to be probed incorrectly. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Andi Shyti commit 6e6ef2da3a28f3e02fd204b4f8821030b61f8cd4 Author: Masahiro Yamada Date: Thu Jul 18 03:28:19 2024 +0900 Makefile: add comment to discourage tools/* addition for kernel builds Kbuild provides scripts/Makefile.host to build host programs used for building the kernel. Unfortunately, there are two exceptions that opt out of Kbuild. The build system under tools/ is a cheesy replica, and cause issues. I was recently poked about a problem in the tools build system, which I do not maintain (and nobody maintains). [1] Without a comment, people might believe this is the right location because that is where objtool lives, even if a more robust Kbuild syntax satisfies their needs. [2] [1]: https://lore.kernel.org/linux-kbuild/ZnIYWBgrJ-IJtqK8@google.com/T/#m8ece130dd0e23c6f2395ed89070161948dee8457 [2]: https://lore.kernel.org/all/20240618200501.GA1611012@google.com/ Signed-off-by: Masahiro Yamada Acked-by: Nicolas Schier Reviewed-by: Brian Norris Reviewed-by: Sami Tolvanen commit 44ad2814ca58fc43ab473d8fbb3b46a2b39a0392 Author: Masahiro Yamada Date: Thu Jul 18 03:13:22 2024 +0900 kbuild: clean up scripts/remove-stale-files These lines have been here for more than a year. Remove them. Signed-off-by: Masahiro Yamada commit 9d0d266046571f4b3e733c7eb9cf7c959f37fbdd Author: HONG Yifan Date: Wed Jul 17 01:50:41 2024 +0000 kconfig: recursive checks drop file/lineno This prevents segfault when getting filename and lineno in recursive checks. If the following snippet is found in Kconfig: [Test code 1] config FOO bool depends on BAR select BAR ... without BAR defined; then there is a segfault. Kconfig:34:error: recursive dependency detected! Kconfig:34: symbol FOO depends on BAR make[4]: *** [scripts/kconfig/Makefile:85: allnoconfig] Segmentation fault This is because of the following. BAR is a fake entry created by sym_lookup() with prop being NULL. In the recursive check, there is a NULL check for prop to fall back to stack->sym->prop if stack->prop is NULL. However, in this case, stack->sym points to the fake BAR entry created by sym_lookup(), so prop is still NULL. prop was then referenced without additional NULL checks, causing segfault. As the previous email thread suggests, the file and lineno for select is also wrong: [Test code 2] config FOO bool config BAR bool config FOO bool "FOO" depends on BAR select BAR $ make defconfig *** Default configuration is based on 'x86_64_defconfig' Kconfig:1:error: recursive dependency detected! Kconfig:1: symbol FOO depends on BAR Kconfig:4: symbol BAR is selected by FOO [...] Kconfig:4 should be Kconfig:10. This patch deletes the wrong and segfault-prone filename/lineno inference completely. With this patch, Test code 1 yields: error: recursive dependency detected! symbol FOO depends on BAR symbol BAR is selected by FOO Signed-off-by: HONG Yifan Signed-off-by: Masahiro Yamada commit 301c10908e42657c3e6142055aa772adab6a6ef7 Author: Rafael Aquini Date: Tue Jul 16 08:25:05 2024 -0400 kbuild: rpm-pkg: introduce a simple changelog section for kernel.spec Fix the following rpmbuild warning: $ make srcrpm-pkg ... RPM build warnings: source_date_epoch_from_changelog set but %changelog is missing Signed-off-by: Rafael Aquini Signed-off-by: Masahiro Yamada commit 64e166099b69bfc09f667253358a15160b86ea43 Author: Jann Horn Date: Wed Feb 21 21:26:53 2024 +0100 kallsyms: get rid of code for absolute kallsyms Commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture") removed the last use of the absolute kallsyms. Signed-off-by: Jann Horn Acked-by: Arnd Bergmann Link: https://lore.kernel.org/all/20240221202655.2423854-1-jannh@google.com/ [masahiroy@kernel.org: rebase the code and reword the commit description] Signed-off-by: Masahiro Yamada commit 7efcb39e0da99de8295e81a2f98b7fdeebcdaa73 Author: Zhang Bingwu Date: Sun Jul 14 16:57:51 2024 +0800 kbuild: Create INSTALL_PATH directory if it does not exist If INSTALL_PATH is not a valid directory, create it, like what modules_install and dtbs_install will do in the same situation. Signed-off-by: Zhang Bingwu Reviewed-by: Nicolas Schier Signed-off-by: Masahiro Yamada commit af7925d82096d30bf971d41a109bd42f6a027ec2 Author: Zhang Bingwu Date: Sun Jul 14 16:57:50 2024 +0800 kbuild: Abort make on install failures Setting '-e' flag tells shells to exit with error exit code immediately after any of commands fails, and causes make(1) to regard recipes as failed. Before this, make will still continue to succeed even after the installation failed, for example, for insufficient permission or directory does not exist. Signed-off-by: Zhang Bingwu Signed-off-by: Masahiro Yamada commit 3c2f84cedaeb2fe9575dd3f6edddf0d875b3b97c Author: Masahiro Yamada Date: Mon Jul 8 00:38:07 2024 +0900 kconfig: remove 'e1' and 'e2' macros from expression deduplication I do not think the macros 'e1' and 'e2' are readable. The statement: e1 = expr_alloc_symbol(...); affects the caller's variable, but this is not sufficiently clear from the code. Remove the macros. No functional change intended. Signed-off-by: Masahiro Yamada commit 3c3ff7be9729959699eb6cbc7fd7303566d74069 Merge: 3f386cb8ee9f0 9ff0251b2eb54 Author: Linus Torvalds Date: Fri Jul 19 21:00:33 2024 -0700 Merge tag 'powerpc-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Remove support for 40x CPUs & platforms - Add support to the 64-bit BPF JIT for cpu v4 instructions - Fix PCI hotplug driver crash on powernv - Fix doorbell emulation for KVM on PAPR guests (nestedv2) - Fix KVM nested guest handling of some less used SPRs - Online NUMA nodes with no CPU/memory if they have a PCI device attached - Reduce memory overhead of enabling kfence on 64-bit Radix MMU kernels - Reimplement the iommu table_group_ops for pseries for VFIO SPAPR TCE Thanks to: Anjali K, Artem Savkov, Athira Rajeev, Breno Leitao, Brian King, Celeste Liu, Christophe Leroy, Esben Haabendal, Gaurav Batra, Gautam Menghani, Haren Myneni, Hari Bathini, Jeff Johnson, Krishna Kumar, Krzysztof Kozlowski, Nathan Lynch, Nicholas Piggin, Nick Bowler, Nilay Shroff, Rob Herring (Arm), Shawn Anastasio, Shivaprasad G Bhat, Sourabh Jain, Srikar Dronamraju, Timothy Pearson, Uwe Kleine-König, and Vaibhav Jain. * tag 'powerpc-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (57 commits) Documentation/powerpc: Mention 40x is removed powerpc: Remove 40x leftovers macintosh/therm_windtunnel: fix module unload. powerpc: Check only single values are passed to CPU/MMU feature checks powerpc/xmon: Fix disassembly CPU feature checks powerpc: Drop clang workaround for builtin constant checks powerpc64/bpf: jit support for signed division and modulo powerpc64/bpf: jit support for sign extended mov powerpc64/bpf: jit support for sign extended load powerpc64/bpf: jit support for unconditional byte swap powerpc64/bpf: jit support for 32bit offset jmp instruction powerpc/pci: Hotplug driver bridge support pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC powerpc: add missing MODULE_DESCRIPTION() macros macintosh/mac_hid: add MODULE_DESCRIPTION() KVM: PPC: add missing MODULE_DESCRIPTION() macros powerpc/kexec: Use of_property_read_reg() powerpc/64s/radix/kfence: map __kfence_pool at page granularity powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API ... commit a8bd68e4329f9a0ad1b878733e0f80be6a971649 Author: Jason-JH.Lin Date: Thu Jul 18 22:17:04 2024 +0800 mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable() When mtk-cmdq unbinds, a WARN_ON message with condition pm_runtime_get_sync() < 0 occurs. According to the call tracei below: cmdq_mbox_shutdown mbox_free_channel mbox_controller_unregister __devm_mbox_controller_unregister ... The root cause can be deduced to be calling pm_runtime_get_sync() after calling pm_runtime_disable() as observed below: 1. CMDQ driver uses devm_mbox_controller_register() in cmdq_probe() to bind the cmdq device to the mbox_controller, so devm_mbox_controller_unregister() will automatically unregister the device bound to the mailbox controller when the device-managed resource is removed. That means devm_mbox_controller_unregister() and cmdq_mbox_shoutdown() will be called after cmdq_remove(). 2. CMDQ driver also uses devm_pm_runtime_enable() in cmdq_probe() after devm_mbox_controller_register(), so that devm_pm_runtime_disable() will be called after cmdq_remove(), but before devm_mbox_controller_unregister(). To fix this problem, cmdq_probe() needs to move devm_mbox_controller_register() after devm_pm_runtime_enable() to make devm_pm_runtime_disable() be called after devm_mbox_controller_unregister(). Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver") Signed-off-by: Jason-JH.Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit 0e3bb6ee88874fc052a6f7a8eb18463faea0a63d Author: Ben Levinsky Date: Thu Jul 18 13:40:57 2024 -0700 mailbox: zynqmp-ipi: Make polling period configurable There are cases where remote that is acking mailbox message can take longer than the default tx_poll_period value. Therefore, enable this to be mutable. Added tx_poll_period field while inserting the module to set the poll period for ack after sending mailbox message. Signed-off-by: Ben Levinsky Acked-by: Michal Simek Signed-off-by: Jassi Brar commit cbf5009580c7c86e9822b3e675df1762ea0a5a0a Author: Arnd Bergmann Date: Fri Jul 19 12:02:23 2024 +0200 mailbox: qcom-cpucp: fix 64BIT dependency This newly added driver fails compile testing on 32-bit architectures because it relies on 64-bit MMIO register access: drivers/mailbox/qcom-cpucp-mbox.c: In function 'qcom_cpucp_mbox_irq_fn': drivers/mailbox/qcom-cpucp-mbox.c:54:18: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Wimplicit-function-declaration] 54 | status = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_STAT); | ^~~~~ | readb drivers/mailbox/qcom-cpucp-mbox.c:65:17: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Wimplicit-function-declaration] 65 | writeq(BIT(i), cpucp->rx_base + APSS_CPUCP_RX_MBOX_CLEAR); | ^~~~~~ | writeb Change the Kconfig dependency to disallow that configuration as well. Fixes: 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller") Signed-off-by: Arnd Bergmann Reviewed-by: Konrad Dybcio Signed-off-by: Jassi Brar commit 3f386cb8ee9f04ff4be164ca7a1d0ef3f81f7374 Merge: 8e5c0abfa02d8 45659274e6086 Author: Linus Torvalds Date: Fri Jul 19 19:03:18 2024 -0700 Merge tag 'pci-v6.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Define PCIE_RESET_CONFIG_DEVICE_WAIT_MS for the generic 100ms required after reset before config access (Kevin Xie) - Define PCIE_T_RRS_READY_MS for the generic 100ms required after reset before config access (probably should be unified with PCIE_RESET_CONFIG_DEVICE_WAIT_MS) (Damien Le Moal) Resource management: - Rename find_resource() to find_resource_space() to be more descriptive (Ilpo Järvinen) - Export find_resource_space() for use by PCI core, which needs to learn whether there is available space for a bridge window (Ilpo Järvinen) - Prevent double counting of resources so window size doesn't grow on each remove/rescan cycle (Ilpo Järvinen) - Relax bridge window sizing algorithm so a device doesn't break simply because it was removed and rescanned (Ilpo Järvinen) - Evaluate the ACPI PRESERVE_BOOT_CONFIG _DSM in pci_register_host_bridge() (not acpi_pci_root_create()) so we can unify it with similar DT functionality (Vidya Sagar) - Extend use of DT "linux,pci-probe-only" property so it works per-host bridge as well as globally (Vidya Sagar) - Unify support for ACPI PRESERVE_BOOT_CONFIG _DSM and the DT "linux,pci-probe-only" property in pci_preserve_config() (Vidya Sagar) Driver binding: - Add devres infrastructure for managed request and map of partial BAR resources (Philipp Stanner) - Deprecate pcim_iomap_table() because uses like "pcim_iomap_table()[0]" have no good way to return errors (Philipp Stanner) - Add an always-managed pcim_request_region() for use instead of pci_request_region() and similar, which are sometimes managed depending on whether pcim_enable_device() has been called previously (Philipp Stanner) - Reimplement pcim_set_mwi() so it doesn't need to keep store MWI state (Philipp Stanner) - Add pcim_intx() for use instead of pci_intx(), which is sometimes managed depending on whether pcim_enable_device() has been called previously (Philipp Stanner) - Add managed pcim_iomap_range() to allow mapping of a partial BAR (Philipp Stanner) - Fix a devres mapping leak in drm/vboxvideo (Philipp Stanner) Error handling: - Add missing bridge locking in device reset path and add a warning for other possible lock issues (Dan Williams) - Fix use-after-free on concurrent DPC and hot-removal (Lukas Wunner) Power management: - Disable AER and DPC during suspend to avoid spurious wakeups if they share an interrupt with PME (Kai-Heng Feng) PCIe native device hotplug: - Detect if a device was removed or replaced during system sleep so we don't assume a new device is the one that used to be there (Lukas Wunner) Virtualization: - Add an ACS quirk for Broadcom BCM5760X multi-function NIC; it prevents transactions between functions even though it doesn't advertise ACS, so the functions can be attached individually via VFIO (Ajit Khaparde) Peer-to-peer DMA: - Add a "pci=config_acs=" kernel command-line parameter to relax default ACS settings to enable additional peer-to-peer configurations. Requires expert knowledge of topology and ACS operation (Vidya Sagar) Endpoint framework: - Remove unused struct pci_epf_group.type_group (Christophe JAILLET) - Fix error handling in vpci_scan_bus() and epf_ntb_epc_cleanup() (Dan Carpenter) - Make struct pci_epc_class constant (Greg Kroah-Hartman) - Remove unused pci_endpoint_test_bar_{readl,writel} functions (Jiapeng Chong) - Rename "BME" to "Bus Master Enable" (Manivannan Sadhasivam) - Rename struct pci_epc_event_ops.core_init() callback to epc_init() (Manivannan Sadhasivam) - Move DMA init to MHI .epc_init() callback for uniformity (Manivannan Sadhasivam) - Cancel EPF test delayed work when link goes down (Manivannan Sadhasivam) - Add struct pci_epc_event_ops.epc_deinit() callback for cleanup needed on fundamental reset (Manivannan Sadhasivam) - Add 64KB alignment to endpoint test to support Rockchip rk3588 (Niklas Cassel) - Optimize endpoint test by using memcpy() instead of readl() (Niklas Cassel) Device tree bindings: - Add generic "ats-supported" property to advertise that a PCIe Root Complex supports ATS (Jean-Philippe Brucker) Amazon Annapurna Labs PCIe controller driver: - Validate IORESOURCE_BUS presence to avoid NULL pointer dereference (Aleksandr Mishin) Axis ARTPEC-6 PCIe controller driver: - Rename .cpu_addr_fixup() parameter to reflect that it is a PCI address, not a CPU address (Niklas Cassel) Freescale i.MX6 PCIe controller driver: - Convert to agnostic GPIO API (Andy Shevchenko) Freescale Layerscape PCIe controller driver: - Make struct mobiveil_rp_ops constant (Christophe JAILLET) - Use new generic dw_pcie_ep_linkdown() to handle link-down events (Manivannan Sadhasivam) HiSilicon Kirin PCIe controller driver: - Convert to agnostic GPIO API (Andy Shevchenko) - Use _scoped() iterator for OF children to ensure refcounts are decremented at loop exit (Javier Carrasco) Intel VMD host bridge driver: - Create sysfs "domain" symlink before downstream devices are exposed to userspace by pci_bus_add_devices() (Jiwei Sun) Loongson PCIe controller driver: - Enable MSI when LS7A is used with new CPUs that have integrated PCIe Root Complex, e.g., Loongson-3C6000, so downstream devices can use MSI (Huacai Chen) Microchip AXI PolarFlare PCIe controller driver: - Move pcie-microchip-host.c to a new PLDA directory (Minda Chen) - Factor PLDA generic items out to a common plda,xpressrich3-axi-common.yaml binding (Minda Chen) - Factor PLDA generic data structures and code out to shared pcie-plda.h, pcie-plda-host.c (Minda Chen) - Add PLDA generic interrupt handling with a .request_event_irq() callback for vendor-specific events (Minda Chen) - Add PLDA generic host init/deinit and map bus functions for use by vendor-specific drivers (Minda Chen) - Rework to use PLDA core (Minda Chen) Microsoft Hyper-V host bridge driver: - Return zero, not garbage, when reading PCI_INTERRUPT_PIN (Wei Liu) NVIDIA Tegra194 PCIe controller driver: - Remove unused struct tegra_pcie_soc (Dr. David Alan Gilbert) - Set 64KB inbound ATU alignment restriction (Jon Hunter) Qualcomm PCIe controller driver: - Make the MHI reg region mandatory for X1E80100, since all PCIe controllers have it (Abel Vesa) - Prevent use of uninitialized data and possible error pointer dereference (Dan Carpenter) - Return error, not success, if dev_pm_opp_find_freq_floor() fails (Dan Carpenter) - Add Operating Performance Points (OPP) support to scale performance state based on aggregate link bandwidth to improve SoC power efficiency (Krishna chaitanya chundru) - Vote for the CPU-PCIe ICC (interconnect) path to ensure it stays active even if other drivers don't vote for it (Krishna chaitanya chundru) - Use devm_clk_bulk_get_all() to get all the clocks from DT to avoid writing out all the clock names (Manivannan Sadhasivam) - Add DT binding and driver support for the SA8775P SoC (Mrinmay Sarkar) - Add HDMA support for the SA8775P SoC (Mrinmay Sarkar) - Override the SA8775P NO_SNOOP default to avoid possible memory corruption (Mrinmay Sarkar) - Make sure resources are disabled during PERST# assertion, even if the link is already disabled (Manivannan Sadhasivam) - Use new generic dw_pcie_ep_linkdown() to handle link-down events (Manivannan Sadhasivam) - Add DT and endpoint driver support for the SA8775P SoC (Mrinmay Sarkar) - Add Hyper DMA (HDMA) support for the SA8775P SoC and enable it in the EPF MHI driver (Mrinmay Sarkar) - Set PCIE_PARF_NO_SNOOP_OVERIDE to override the default NO_SNOOP attribute on the SA8775P SoC (both Root Complex and Endpoint mode) to avoid possible memory corruption (Mrinmay Sarkar) Renesas R-Car PCIe controller driver: - Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup() to avoid unnecessary backtrace (Marek Vasut) - Add DT and driver support for R-Car V4H (R8A779G0) host and endpoint. This requires separate proprietary firmware (Yoshihiro Shimoda) Rockchip PCIe controller driver: - Assert PERST# for 100ms after power is stable (Damien Le Moal) - Wait PCIE_T_RRS_READY_MS (100ms) after reset before starting configuration (Damien Le Moal) - Use GPIOD_OUT_LOW flag while requesting ep_gpio to fix a firmware crash on Qcom-based modems with Rockpro64 board (Manivannan Sadhasivam) Rockchip DesignWare PCIe controller driver: - Factor common parts of rockchip-dw-pcie DT binding to be shared by Root Complex and Endpoint mode (Niklas Cassel) - Add missing INTx signals to common DT binding (Niklas Cassel) - Add eDMA items to DT binding for Endpoint controller (Niklas Cassel) - Fix initial dw-rockchip PERST# GPIO value to prevent unnecessary short assert/deassert that causes issues with some WLAN controllers (Niklas Cassel) - Refactor dw-rockchip and add support for Endpoint mode (Niklas Cassel) - Call pci_epc_init_notify() and drop dw_pcie_ep_init_notify() wrapper (Niklas Cassel) - Add error messages in .probe() error paths to improve user experience (Uwe Kleine-König) Samsung Exynos PCIe controller driver: - Use bulk clock APIs to simplify clock setup (Shradha Todi) StarFive PCIe controller driver: - Add DT binding and driver support for the StarFive JH7110 PLDA-based PCIe controller (Minda Chen) Synopsys DesignWare PCIe controller driver: - Add generic support for sending PME_Turn_Off when system suspends (Frank Li) - Fix incorrect interpretation of iATU slot 0 after PERST# assert/deassert (Frank Li) - Use msleep() instead of usleep_range() while waiting for link (Konrad Dybcio) - Refactor dw_pcie_edma_find_chip() to enable adding support for Hyper DMA (HDMA) (Manivannan Sadhasivam) - Enable drivers to supply the eDMA channel count since some can't auto detect this (Manivannan Sadhasivam) - Call pci_epc_init_notify() and drop dw_pcie_ep_init_notify() wrapper (Manivannan Sadhasivam) - Pass the eDMA mapping format directly from drivers instead of maintaining a capability for it (Manivannan Sadhasivam) - Add generic dw_pcie_ep_linkdown() to notify EPF drivers about link-down events and restore non-sticky DWC registers lost on link down (Manivannan Sadhasivam) - Add vendor-specific "apb" reg name, interrupt names, INTx names to generic binding (Niklas Cassel) - Enforce DWC restriction that 64-bit BARs must start with an even-numbered BAR (Niklas Cassel) - Consolidate args of dw_pcie_prog_outbound_atu() into a structure (Yoshihiro Shimoda) - Add support for endpoints to send Message TLPs, e.g., for INTx emulation (Yoshihiro Shimoda) TI DRA7xx PCIe controller driver: - Rename .cpu_addr_fixup() parameter to reflect that it is a PCI address, not a CPU address (Niklas Cassel) TI Keystone PCIe controller driver: - Validate IORESOURCE_BUS presence to avoid NULL pointer dereference (Aleksandr Mishin) - Work around AM65x/DRA80xM Errata #i2037 that corrupts TLPs and causes processor hangs by limiting Max_Read_Request_Size (MRRS) and Max_Payload_Size (MPS) (Kishon Vijay Abraham I) - Leave BAR 0 disabled for AM654x to fix a regression caused by 6ab15b5e7057 ("PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus"), which caused a 45-second boot delay (Siddharth Vadapalli) Xilinx Versal CPM PCIe controller driver: - Fix overlapping bridge registers and 32-bit BAR addresses in DT binding (Thippeswamy Havalige) MicroSemi Switchtec management driver: - Make struct switchtec_class constant (Greg Kroah-Hartman) Miscellaneous: - Remove unused struct acpi_handle_node (Dr. David Alan Gilbert) - Add missing MODULE_DESCRIPTION() macros (Jeff Johnson)" * tag 'pci-v6.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (154 commits) PCI: loongson: Enable MSI in LS7A Root Complex PCI: Extend ACS configurability PCI: Add missing bridge lock to pci_bus_lock() drm/vboxvideo: fix mapping leaks PCI: Add managed pcim_iomap_range() PCI: Remove legacy pcim_release() PCI: Add managed pcim_intx() PCI: vmd: Create domain symlink before pci_bus_add_devices() PCI: qcom: Prevent use of uninitialized data in qcom_pcie_suspend_noirq() PCI: qcom: Prevent potential error pointer dereference PCI: qcom: Fix missing error code in qcom_pcie_probe() PCI: Give pcim_set_mwi() its own devres cleanup callback PCI: Move struct pci_devres.pinned bit to struct pci_dev PCI: Remove struct pci_devres.enabled status bit PCI: Document hybrid devres hazards PCI: Add managed pcim_request_region() PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all() PCI: Add managed partial-BAR request and map infrastructure PCI: Add devres helpers for iomap table PCI: Add and use devres helper for bit masks ... commit 8f3075cc680c232590ca4e2ef39ebaf1e887a52e Author: Thomas Weißschuh Date: Tue Jul 9 19:35:35 2024 +0200 i2c: smbus: remove i801 assumptions from SPD probing The check and warning are very specific to the SPD usage of the i801 driver. That was fine as long as i801 was the only caller of i2c_register_spd(). Now that piix4 will be added as another user of that function, the check and warning are not accurate anymore. Instead of introducing a more complicated calling protocol only to print a warning, drop the warning. Even in cases where not all slots can be probed, then at least probe the 8 slots that can be. Signed-off-by: Thomas Weißschuh Reviewed-by: Heiner Kallweit Signed-off-by: Andi Shyti commit 45b8ee7182d5ef8df6959297046f86dc128d6a06 Author: Bastien Curutchet Date: Mon Jun 17 14:08:18 2024 +0200 i2c: mux: gpio: Add support for the 'settle-time-us' property Some hardware need some time to switch from a bus to another. This can cause the first transfers following the selection of a bus to fail. There is no way to configure this kind of waiting time in the driver. Add support for the 'settle-time-us' device-tree property. When set, the i2c_mux_gpio_select() applies a delay before returning, leaving enough time to the hardware to switch to the new bus. Signed-off-by: Bastien Curutchet Reviewed-by: Andi Shyti Acked-by: Peter Rosin Signed-off-by: Andi Shyti commit a618d86d5a1cf1ac6edbbe0e2b29649afb3decf0 Author: Bastien Curutchet Date: Mon Jun 17 14:08:17 2024 +0200 i2c: mux: gpio: Re-order #include to match alphabetic order The #includes don't match alphabetic order. Re-order #includes to match the alphabetic order before adding a new one. Signed-off-by: Bastien Curutchet Reviewed-by: Andi Shyti Acked-by: Peter Rosin Signed-off-by: Andi Shyti commit dc53dbe3e79008ca7c1bc5e5ae2c71b52161f96d Author: Bastien Curutchet Date: Mon Jun 17 14:08:16 2024 +0200 dt-bindings: i2c: mux-gpio: Add 'settle-time-us' property I2C MUXes described by the i2c-gpio-mux sometimes need a significant amount of time to switch from a bus to another. When a new bus is selected, the first I2C transfer can fail if it occurs too early. There is no way to describe this transition delay that has to be waited before starting the first I2C transfer. Add a 'settle-time-us' property that indicates the delay to be respected before doing the first i2c transfer. Signed-off-by: Bastien Curutchet Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Acked-by: Peter Rosin Signed-off-by: Andi Shyti commit 064e911392177e8c39e395f748fb4ae8ffb18e92 Author: Vladimir Zapolskiy Date: Thu Jun 13 00:58:33 2024 +0300 dt-bindings: i2c: qcom-cci: Document sm8650 compatible Add sm8650 compatible consistent with CAMSS CCI interfaces. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andi Shyti commit 8c4ff24d7cc84432a9f1055ef57e4c86706b38c7 Author: Vladimir Zapolskiy Date: Thu Jun 13 00:58:32 2024 +0300 dt-bindings: i2c: qcom-cci: Document sm8550 compatible Add sm8550 compatible consistent with CAMSS CCI interfaces, the list of clocks is reduced by removing "slow_ahb_src" clock, which is derived from "cpas_ahb" clock. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andi Shyti commit 8e5c0abfa02d85b9cd2419567ad2d73ed8fe4b74 Merge: ef035628c326a a23e196693246 Author: Linus Torvalds Date: Fri Jul 19 16:51:39 2024 -0700 Merge tag 'input-for-v6.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - streamlined logic in input core for handling normal input handlers vs input filters - updates to input drivers to allocate memory with sizeof(*pointer) instead of sizeof(type) - change to ads7846 touchscreen driver to use hsync GPIO instead of requiring platform data with special method (which is not compatible with boards using device tree) - update to adc-joystick driver to handle inverted axes - cleanups in various drivers switching them to use the new "guard" and "__free()" facilities - changes to several drivers (adxl34x, atmel_mxt_ts, ati-remote2, omap-keypad, yealink) to stop creating driver-specific device attributes manually and use driver core facilities for this - update to Cypress PS/2 protocol driver to properly handle errors from the PS/2 transport as well as other cleanups - update to edt-ft5x06 driver to support ft5426 variant - update to ektf2127 driver to support ektf2232 variant - update to exc3000 driver to support EXC81W32 variant - update to imagis driver to support IST3038 variant - other assorted driver cleanups. * tag 'input-for-v6.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (71 commits) Input: yealink - simplify locking in sysfs attribute handling Input: yealink - use driver core to instantiate device attributes Input: ati-remote2 - use driver core to instantiate device attributes Input: omap-keypad - use driver core to instantiate device attributes Input: atmel_mxt_ts - use driver core to instantiate device attributes Input: exc3000 - add EXC81W32 support dt-bindings: input: touchscreen: exc3000: add EXC81W32 Input: twl4030-pwrbutton - fix kernel-doc warning Input: himax_hx83112b - add support for HX83100A Input: himax_hx83112b - add himax_chip struct for multi-chip support Input: himax_hx83112b - implement MCU register reading Input: himax_hx83112b - use more descriptive register defines dt-bindings: input: touchscreen: himax,hx83112b: add HX83100A Input: do not check number of events in input_pass_values() Input: preallocate memory to hold event values Input: rearrange input_alloc_device() to prepare for preallocating of vals Input: simplify event handling logic Input: make events() method return number of events processed Input: make sure input handlers define only one processing method Input: evdev - remove ->event() method ... commit ef035628c326af9aa645af1b91fbb72fdfec874e Merge: acc5965b9ff8a 5d89b5bdbce39 Author: Linus Torvalds Date: Fri Jul 19 16:46:26 2024 -0700 Merge tag 'i2c-for-6.11-rc1-try2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "The I2C core gains documentation updates for the testunit, a cleanup regarding unneeded 'driver_data' and more sanity checks in the char device. For the host drivers, this release includes significant updates, with the primary change being the renaming from "master/slave" to "controller/target" to adhere to I2C v7 and SMBus 3.2 standards. New Support: - Added support for Intel Arrow Lake-H - Added I2C support in the Arioha SoC by linking the Mediatek I2C controller Cleanups: - Added the MODULE_DESCRIPTION() macro, resolving a modpost warning in the ALi 1563 Southbridge driver. - Constified the regmap_config declaration in the i2c-designware driver. - Improved the coding style in the Renesas R-Car driver by removing unnecessary semicolons after brackets. General improvements: - In the OMAP device, replaced NOIRQ_SYSTEM_SLEEP_PM_OPS with RUNTIME_PM_OPS to enable waking up the controller during suspend() before suspend_noirq() kicks in. - Improved logging in the Xilinx driver. - Added a warning (WARN()) in the Renesas R-Car driver for spurious interrupts. DTS Changes: - Removed address-cell and size-cell from the Atmel at91sam, nVidia Tegra 20, and Samsung S3c2410 devices. - Fixed Texas Instruments OMAP4 I2C controller to comply with the i2c-controller.yaml schema. - Improved indentation in DTS examples for several I2C devices. - Converted the NXP LPC1788 binding to the dt-schema. - Added documentation for the compatible string thead,th1520-i2c. - Added the "power-domains" property for the Meson I2C driver. AT24 EEPROM driver changes: - add support for two new Microchip models - document even more new models in DT bindings (those use fallback compatibles so no code changes)" * tag 'i2c-for-6.11-rc1-try2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (87 commits) i2c: document new callbacks in i2c_algorithm dt-bindings: i2c: amlogic,meson6-i2c: add optional power-domains dt-bindings: i2c: at91: Add sama7d65 compatible string i2c: st: reword according to newest specification i2c: cpm: reword according to newest specification i2c: virtio: reword according to newest specification i2c: nvidia-gpu: reword according to newest specification i2c: viai2c: reword according to newest specification i2c: viperboard: reword according to newest specification i2c: uniphier: reword according to newest specification i2c: uniphier-f: reword according to newest specification i2c: tiny-usb: reword according to newest specification i2c: thunderx-pcidrv: reword according to newest specification i2c: tegra-bpmp: reword according to newest specification i2c: taos-evm: reword according to newest specification i2c: sun6i-p2wi: reword according to newest specification i2c: stm32f4: reword according to newest specification i2c: sprd: reword according to newest specification i2c: sis5595: reword according to newest specification i2c: rzv2m: reword according to newest specification ... commit acc5965b9ff8a1889f5b51466562896d59c6e1b9 Merge: 09ea8089abb5d 5418e6dfc905b Author: Linus Torvalds Date: Fri Jul 19 15:55:08 2024 -0700 Merge tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc and other driver updates from Greg KH: "Here is the "big" set of char/misc and other driver subsystem changes for 6.11-rc1. Nothing major in here, just loads of new drivers and updates. Included in here are: - IIO api updates and new drivers added - wait_interruptable_timeout() api cleanups for some drivers - MODULE_DESCRIPTION() additions for loads of drivers - parport out-of-bounds fix - interconnect driver updates and additions - mhi driver updates and additions - w1 driver fixes - binder speedups and fixes - eeprom driver updates - coresight driver updates - counter driver update - new misc driver additions - other minor api updates All of these, EXCEPT for the final Kconfig build fix for 32bit systems, have been in linux-next for a while with no reported issues. The Kconfig fixup went in 29 hours ago, so might have missed the latest linux-next, but was acked by everyone involved" * tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (330 commits) misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems misc: delete Makefile.rej binder: fix hang of unregistered readers misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI virtio: add missing MODULE_DESCRIPTION() macro agp: uninorth: add missing MODULE_DESCRIPTION() macro spmi: add missing MODULE_DESCRIPTION() macros dev/parport: fix the array out-of-bounds risk samples: configfs: add missing MODULE_DESCRIPTION() macro misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver misc: keba: Fix missing AUXILIARY_BUS dependency slimbus: Fix struct and documentation alignment in stream.c MAINTAINERS: CC dri-devel list on Qualcomm FastRPC patches misc: fastrpc: use coherent pool for untranslated Compute Banks misc: fastrpc: support complete DMA pool access to the DSP misc: fastrpc: add missing MODULE_DESCRIPTION() macro misc: fastrpc: Add missing dev_err newlines misc: fastrpc: Use memdup_user() nvmem: core: Implement force_ro sysfs attribute nvmem: Use sysfs_emit() for type attribute ... commit 09ea8089abb5d851ce08a9b1a43706e42ef39db2 Merge: 04d17331ca337 104e004739ef0 Author: Linus Torvalds Date: Fri Jul 19 15:46:29 2024 -0700 Merge tag 'staging-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "This is the "big" staging driver update for 6.11-rc1. Not really all that much happened this release cycle, just lots of tiny cleanups, overall about 3000 lines removed, so the cleanups were worth it. Included in here are: - loads of rtl8723bs driver cleanups - lots of rtl8192e driver cleanups - vc04_services reworks and cleanups as that codebase gets slowly evolved into something that will make it into the "real" part of the kernel hopefully soon. - other tiny staging driver cleanups All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (124 commits) staging: rtl8723bs: Remove constant result function CheckNegative() staging: rtl8723bs: Remove unused macros in rtw_mlme_ext.h staging: rtl8723bs: Remove unused macros in hal_pwr_seq.h staging: rtl8723bs: Remove unused macros in rtw_efuse.h staging: rtl8723bs: Remove unused macros in rtw_mlme.h staging: rtl8723bs: Remove unused macros in HalPwrSeqCmd.h staging: rtl8723bs: Remove unused macros in Hal8723BReg.h staging: rtl8723bs: Remove unused macros in Hal8192CPhyReg.h staging: rtl8723bs: Delete file hal_phy_reg_8723b.h staging: rtl8723bs: Move last macro from hal_phy_reg_8723b.h staging: rtl8723bs: Remove unused macros in hal_phy_reg_8723b.h staging: rtl8723bs: Remove unused macros in hal_com_reg.h staging: rtl8723bs: Remove unused macros in rtw_ht.h staging: rtl8723bs: Remove unused macros in hal_com_h2c.h staging: vc04_services: vchiq_core: Stop kthreads on vchiq module unload staging: vchiq_core: Bubble up wait_event_interruptible() return value staging: nvec: Use x instead of x != NULL to improve readability. staging: rtl8192e: Fix conflicting types error with net_device. staging: rtl8723bs: Remove unused variable pwdev_priv staging: vc04_services: Update testing instructions ... commit 04d17331ca33744e1426fdeee7ba5e975c4b2239 Merge: aba9753c0677e b727493011123 Author: Linus Torvalds Date: Fri Jul 19 15:37:48 2024 -0700 Merge tag 'usb-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the big set of USB and Thunderbolt changes for 6.11-rc1. Nothing earth-shattering in here, just constant forward progress in adding support for new hardware and better debugging functionalities for thunderbolt devices and the subsystem. Included in here are: - thunderbolt debugging update and driver additions - xhci driver updates - typec driver updates - kselftest device driver changes (acked by the relevant maintainers, depended on other changes in this tree.) - cdns3 driver updates - gadget driver updates - MODULE_DESCRIPTION() additions - dwc3 driver updates and fixes All of these have been in linux-next for a while with no reported issues" * tag 'usb-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (112 commits) kselftest: devices: Add test to detect device error logs kselftest: Move ksft helper module to common directory kselftest: devices: Move discoverable devices test to subdirectory usb: gadget: f_uac2: fix non-newline-terminated function name USB: uas: Implement the new shutdown callback USB: core: add 'shutdown' callback to usb_driver usb: typec: Drop explicit initialization of struct i2c_device_id::driver_data to 0 usb: dwc3: enable CCI support for AMD-xilinx DWC3 controller usb: dwc2: add support for other Lantiq SoCs usb: gadget: Use u16 types for 16-bit fields usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup usb: dwc3: core: Check all ports when set phy suspend usb: typec: tcpci: add support to set connector orientation dt-bindings: usb: Convert fsl-usb to yaml usb: typec: ucsi: reorder operations in ucsi_run_command() usb: typec: ucsi: extract common code for command handling usb: typec: ucsi: inline ucsi_read_message_in usb: typec: ucsi: rework command execution functions usb: typec: ucsi: split read operation usb: typec: ucsi: simplify command sending API ... commit aba9753c0677e860f982edff98c7fe5a2b97758c Merge: d7e78951a8b8b 17199dfccd4b7 Author: Linus Torvalds Date: Fri Jul 19 15:22:14 2024 -0700 Merge tag 'tty-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial updates from Greg KH: "Here is a small set of tty and serial driver updates for 6.11-rc1. Not much happened this cycle, unlike the previous kernel release which had lots of "excitement" in this part of the kernel. Included in here are the following changes: - dt binding updates for new platforms - 8250 driver updates - various small serial driver fixes and updates - printk/console naming and matching attempt #2 (was reverted for 6.10-final, should be good to go this time around, acked by the relevant maintainers). All of these have been in linux-next for a while with no reported issues" * tag 'tty-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (22 commits) Documentation: kernel-parameters: Add DEVNAME:0.0 format for serial ports serial: core: Add serial_base_match_and_update_preferred_console() printk: Add match_devname_and_update_preferred_console() serial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT dt-bindings: serial: sc16is7xx: add reset-gpios dt-bindings: serial: vt8500-uart: convert to json-schema serial: 8250_platform: Explicitly show we initialise ISA ports only once tty: add missing MODULE_DESCRIPTION() macros dt-bindings: serial: mediatek,uart: add MT7988 serial: sh-sci: Add support for RZ/V2H(P) SoC dt-bindings: serial: Add documentation for Renesas RZ/V2H(P) (R9A09G057) SCIF support dt-bindings: serial: renesas,scif: Make 'interrupt-names' property as required dt-bindings: serial: renesas,scif: Validate 'interrupts' and 'interrupt-names' dt-bindings: serial: renesas,scif: Move ref for serial.yaml at the end riscv: dts: starfive: jh7110: Add the core reset and jh7110 compatible for uarts serial: 8250_dw: Use reset array API to get resets dt-bindings: serial: snps-dw-apb-uart: Add one more reset signal for StarFive JH7110 SoC serial: 8250: Extract platform driver serial: 8250: Extract RSA bits serial: imx: stop casting struct uart_port to struct imx_port ... commit d7e78951a8b8b53e4d52c689d927a6887e6cfadf Merge: 53a5182c8a680 4359836129d93 Author: Linus Torvalds Date: Fri Jul 19 14:58:12 2024 -0700 Merge tag 'net-6.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter. Notably this includes fixes for a s390 build breakage. Current release - new code bugs: - eth: fbnic: fix s390 build - eth: airoha: fix NULL pointer dereference in airoha_qdma_cleanup_rx_queue() Previous releases - regressions: - flow_dissector: use DEBUG_NET_WARN_ON_ONCE - ipv4: fix incorrect TOS in route get reply - dsa: fix chip-wide frame size config in some drivers Previous releases - always broken: - netfilter: nf_set_pipapo: fix initial map fill - eth: gve: fix XDP TX completion handling when counters overflow" * tag 'net-6.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: eth: fbnic: don't build the driver when skb has more than 21 frags net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports net: airoha: Fix NULL pointer dereference in airoha_qdma_cleanup_rx_queue() net: wwan: t7xx: add support for Dell DW5933e ipv4: Fix incorrect TOS in fibmatch route get reply ipv4: Fix incorrect TOS in route get reply net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE driver core: auxiliary bus: Fix documentation of auxiliary_device net: airoha: fix error branch in airoha_dev_xmit and airoha_set_gdm_ports gve: Fix XDP TX completion handling when counters overflow ipvs: properly dereference pe in ip_vs_add_service selftests: netfilter: add test case for recent mismatch bug netfilter: nf_set_pipapo: fix initial map fill netfilter: ctnetlink: use helper function to calculate expect ID eth: fbnic: fix s390 build. commit 53a5182c8a6805d3096336709ba5790d16f8c369 Merge: 33cf098770930 c3ece6b7ffb4a Author: Linus Torvalds Date: Fri Jul 19 14:34:52 2024 -0700 Merge tag 'for-6.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "A fix for build breakage on 32bit platforms" * tag 'for-6.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: change BTRFS_MOUNT_* flags to 64bit type commit 33cf098770930a9b782d3983e1b0127bdc203216 Merge: 9c67f9084af3f 5c28424e9a348 Author: Linus Torvalds Date: Fri Jul 19 14:33:30 2024 -0700 Merge tag 'probes-fixes-v6.11-pre-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull uprobe fix from Masami Hiramatsu: - Add sys_uretprobe entry to scripts/syscall.tbl. * tag 'probes-fixes-v6.11-pre-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: syscalls: Fix to add sys_uretprobe to syscall.tbl commit 9c67f9084af3f84e63abb44b82316fe0dbccd5d5 Merge: 12cc3d5389f31 1a8c67a8b21e2 Author: Linus Torvalds Date: Fri Jul 19 14:31:18 2024 -0700 Merge tag 'pwrseq-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull power sequencing fixes from Bartosz Golaszewski: "There's one fix for an invalid pointer dereference in error path reported by smatch and two patches that address the noisy config choices you reported earlier this week. Summary: - fix an invalid pointer dereference in error path in pwrseq core - reduce the Kconfig noise from PCI pwrctl choices" * tag 'pwrseq-fixes-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: arm64: qcom: don't select HAVE_PWRCTL when PCI=n Kconfig: reduce the amount of power sequencing noise power: sequencing: fix an invalid pointer dereference in error path commit 12cc3d5389f313f07222b000fefa2cd8fc98c4f8 Merge: a4f9285520584 4594d26fca91f Author: Linus Torvalds Date: Fri Jul 19 12:39:34 2024 -0700 Merge tag 'sound-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Lots of changes in this cycle, but mostly for cleanups and refactoring. Significant amount of changes are about DT schema conversions for ASoC at this time while we see other usual suspects, too. Some highlights below: Core: - Re-introduction of PCM sync ID support API - MIDI2 time-base extension in ALSA sequencer API ASoC: - Syncing of features between simple-audio-card and the two audio-graph cards - Support for specifying the order of operations for components within cards to allow quirking for unusual systems - Lots of DT schema conversions - Continued SOF/Intel updates for topology, SoundWire, IPC3/4 - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5 and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments PCM5242 HD-audio: - More quirks, Intel PantherLake support, senarytech codec support - Refactoring of Cirrus codec component-binding Others: - ALSA control kselftest improvements, and fixes for input value checks in various drivers" * tag 'sound-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (349 commits) kselftest/alsa: Log the PCM ID in pcm-test kselftest/alsa: Use card name rather than number in test names ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360 ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop ALSA: seq: ump: Skip useless ports for static blocks ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused ALSA: usb: Use BIT() for bit values ALSA: usb: Fix UBSAN warning in parse_audio_unit() ALSA: hda/realtek: Enable headset mic on Positivo SU C1400 ASoC: tas2781: Add new Kontrol to set tas2563 digital Volume ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply ASoC: codecs: wcd937x: Remove the string compare in MIC BIAS widget settings ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable ASoC: dt-bindings: cirrus,cs42xx8: Convert to dtschema ASoC: cs530x: Remove bclk from private structure ASoC: cs530x: Calculate proper bclk rate using TDM ASoC: dt-bindings: cirrus,cs4270: Convert to dtschema firmware: cs_dsp: Rename fw_ver to wmfw_ver firmware: cs_dsp: Clarify wmfw format version log message firmware: cs_dsp: Make wmfw and bin filename arguments const char * ... commit a4f9285520584977127946a22eab2adfbc87d1bf Merge: f4f92db439128 589eb11498fbf Author: Linus Torvalds Date: Fri Jul 19 12:16:28 2024 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This a large collection of clk driver updates and a handful of new SoC clk driver support. We have the usual Qualcomm clk drivers, along with clk drivers for the Sophgo and T-Head vendors, all to support some new SoCs. Nothing in particular stands out to me in the updates. There's the interconnect clk driver which exposes clks as interconnects, crossing subsystems. There's a bunch of janitorial things that are improving drivers in general like kmemdup_array() or fixing error paths. But overall the updates look normal to fix the description data which is usually the stuff that's wrong and/or untested. Core: - Skip gate basic type KUnit tests on s390 due to lack of MMIO emulation New Drivers: - AP sub-system clock controller in the T-Head TH1520 - Sophgo Sophon sg2042 clk driver - Qualcomm SM7150 camera, display and video clk drivers - Qualcomm QCM2290 GPU clk driver - Qualcomm QCS8386/QCS8084 NSS clk driver - Qualcomm SM8650 camera and video drivers Updates: - Add reset support to Airoha EN7581 clk driver - Add MODULE_DESCRIPTIONs to various clk drivers - Introduce helper logic to expose clock controllers as simple interconnect providers - Use the interconnect helper above on Qualcomm ipq9574 - Add CLK_SET_RATE_PARENT to the remaining USB pipe clocks on Qualcomm X1Elite - Improve error handling in Qualcomm kpss-xcc driver - Mark Qualcomm SC8280XP LPASS clock controller regmap_config const - Export more clocks for Rockchip rk3128 peripherals - Convert Rockchip clk drivers to use kmemdup_array() - Drop CLK_NR_CLKS from Rockchip rk3128 and rk3188 binding headers - Make qcom_cc_really_probe() take a struct device to allow reuse in non-platform-drivers - Introduce prepare-only branch clock ops in the qcom clk driver to support clocks on buses that take locks - Describe parent/child relationship for Qualcomm SC7280 camera GDSCs - Support Qualcomm Huayra 2290 alpha PLL - Adjust the highest SDCC clock frequency on Qualcomm IPQ6018 to match HS200 support - Add missing PCIe PIPE clocks on Qualcomm IPQ9574 - Fix various configurations and properties in the Qualcomm SA8775P, X1E80100 and SM7280 drivers - Park Qualcomm SM8350 GPU RCGs on XO while disabled - Remove unused CONFIG_QCOM_RPMCC Kconfig symbol - exynos-clkout: Remove usage of of_device_id table as .of_match_table, because the driver is instantiated as MFD cell, not as standalone platform driver. Populated .of_match_table confused people few times to convert the code to device_get_match_data(), which broke the driver - Mark one Samsung UFS clock as critical, because having it off stops the system from shutdown - Use kmemdup_array() when applicable - Remove unused 'struct gates_data' from old sunxi driver library - Add GPADC clock and reset for Allwinner H616 - Minor Amlogic S4 clock fixes - DT bindings Yaml conversion of the Amlogic AXG audio controller - Amlogic C3 clock controllers support - Amlogic clk flag added to skip init of already enabled PLLs and avoid relocking - Amlogic A1 DT bindings updates for system pll support - Add missing MODULE_DESCRIPTION where necessary - Remove obsolete clock DT binding header files - Add Battery Backup (VBATTB) and I2C clocks, resets, and power domains on Renesas RZ/G3S - Add audio clocks on Renesas R-Car V4M - Add video capture (ISPCS, CSI-2, VIN) clocks on Renesas R-Car V4M" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (135 commits) clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks dt-bindings: clock: Document T-Head TH1520 AP_SUBSYS controller clk: sophgo: Avoid -Wsometimes-uninitialized in sg2042_clk_pll_set_rate() clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() clk: mxs: Use clamp() in clk_ref_round_rate() and clk_ref_set_rate() clk: sunxi-ng r40: Constify struct regmap_config clk: en7523: fix rate divider for slic and spi clocks clk: lpc32xx: Constify struct regmap_config clk: xilinx: Constify struct regmap_config clk: en7523: Remove PCIe reset open drain configuration for EN7581 clk: en7523: Remove pcie prepare/unpreare callbacks for EN7581 SoC clk: en7523: Add reset-controller support for EN7581 SoC dt-bindings: clock: airoha: Add reset support to EN7581 clock binding dt-bindings: clock: mediatek: Document reset cells for MT8188 sys clk: mediatek: mt8173-infracfg: Handle unallocated infracfg when module dt-bindings: clock: mediatek: add syscon compatible for mt7622 pciesys dt-bindings: clock: sprd,sc9860-clk: convert to YAML dt-bindings: clock: qoriq-clock: convert to yaml format clk: qcom: Park shared RCGs upon registration clk: qcom: ipq9574: Use icc-clk for enabling NoC related clocks ... commit f4f92db4391285ef3a688cdad25d5c76db200a30 Merge: f66b07c561198 6c85d6b653cae Author: Linus Torvalds Date: Fri Jul 19 11:57:55 2024 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Several new features here: - Virtio find vqs API has been reworked (required to fix the scalability issue we have with adminq, which I hope to merge later in the cycle) - vDPA driver for Marvell OCTEON - virtio fs performance improvement - mlx5 migration speedups Fixes, cleanups all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (56 commits) virtio: rename virtio_find_vqs_info() to virtio_find_vqs() virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx() helpers virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info() virtio_balloon: convert to use virtio_find_vqs_info() virtiofs: convert to use virtio_find_vqs_info() scsi: virtio_scsi: convert to use virtio_find_vqs_info() virtio_net: convert to use virtio_find_vqs_info() virtio_crypto: convert to use virtio_find_vqs_info() virtio_console: convert to use virtio_find_vqs_info() virtio_blk: convert to use virtio_find_vqs_info() virtio: rename find_vqs_info() op to find_vqs() virtio: remove the original find_vqs() op virtio: call virtio_find_vqs_info() from virtio_find_single_vq() directly virtio: convert find_vqs() op implementations to find_vqs_info() virtio_pci: convert vp_*find_vqs() ops to find_vqs_info() virtio: introduce virtio_queue_info struct and find_vqs_info() config op virtio: make virtio_find_single_vq() call virtio_find_vqs() virtio: make virtio_find_vqs() call virtio_find_vqs_ctx() caif_virtio: use virtio_find_single_vq() for single virtqueue finding vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready() ... commit f66b07c56119833b88bffa4ecaf9f983834675de Merge: 4305ca0087dd9 0756bec2e45b2 Author: Linus Torvalds Date: Fri Jul 19 11:53:09 2024 -0700 Merge tag 'vfio-v6.11-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Add support for 8-byte accesses when using read/write through the device regions. This fills a gap for userspace drivers that might not be able to use access through mmap to perform native register width accesses (Gerd Bayer) - Add missing MODULE_DESCRIPTION to vfio-mdev sample drivers and replace a non-standard MODULE_INFO usage (Jeff Johnson) * tag 'vfio-v6.11-rc1' of https://github.com/awilliam/linux-vfio: vfio-mdev: add missing MODULE_DESCRIPTION() macros vfio/pci: Fix typo in macro to declare accessors vfio/pci: Support 8-byte PCI loads and stores vfio/pci: Extract duplicated code into macro commit ad8070cb1b4bd40aa19a5e3f7c24d7f62c71b382 Author: Jason A. Donenfeld Date: Mon Jul 15 04:37:18 2024 +0200 MAINTAINERS: add random.h headers to RNG subsection Before, patches to two RNG header files wouldn't be sent to the right recipients automatically. So add the two header files -- one for userspace and one for the kernel -- to the right part of the MAINTAINERS file. Signed-off-by: Jason A. Donenfeld commit 13f75d9ecf3d8efcf597dfcd8f7be7460cdaa11a Author: Jason A. Donenfeld Date: Mon Jul 15 04:50:07 2024 +0200 random: note that RNDGETPOOL was removed in 2.6.9-rc2 RNDGETPOOL was thankfully removed twenty years ago, but it's stuck around in headers. Probably removing it from uapi headers isn't great in case there are some weird users out there, but we should at least mark this as having been removed, to save future readers the same goose chase I just went on. Link: https://lore.kernel.org/all/E1By1St-0001TS-Qj@thunk.org/ Link: https://lore.kernel.org/all/Pine.LNX.4.58.0409130937050.4094@ppc970.osdl.org/ Signed-off-by: Jason A. Donenfeld commit 4920a2590e91bc15068e789aaf4ddc522f772fc5 Author: Jason A. Donenfeld Date: Sun Jul 7 01:40:16 2024 +0200 selftests/vDSO: add tests for vgetrandom This adds two tests for vgetrandom. The first one, vdso_test_chacha, simply checks that the assembly implementation of chacha20 matches that of libsodium, a basic sanity check that should catch most errors. The second, vdso_test_getrandom, is a full "libc-like" implementation of the userspace side of vgetrandom() support. It's meant to be used also as example code for libcs that might be integrating this. Cc: linux-kselftest@vger.kernel.org Signed-off-by: Jason A. Donenfeld commit 33385150ac456f6f95a58647583d0a3887620729 Author: Jason A. Donenfeld Date: Fri Nov 18 17:38:23 2022 +0100 x86: vdso: Wire up getrandom() vDSO implementation Hook up the generic vDSO implementation to the x86 vDSO data page. Since the existing vDSO infrastructure is heavily based on the timekeeping functionality, which works over arrays of bases, a new macro is introduced for vvars that are not arrays. The vDSO function requires a ChaCha20 implementation that does not write to the stack, yet can still do an entire ChaCha20 permutation, so provide this using SSE2, since this is userland code that must work on all x86-64 processors. Reviewed-by: Thomas Gleixner Reviewed-by: Samuel Neves # for vgetrandom-chacha.S Signed-off-by: Jason A. Donenfeld commit 4ad10a5f5f78a5b3e525a63bd075a4eb1139dde1 Author: Jason A. Donenfeld Date: Fri Nov 18 17:23:34 2022 +0100 random: introduce generic vDSO getrandom() implementation Provide a generic C vDSO getrandom() implementation, which operates on an opaque state returned by vgetrandom_alloc() and produces random bytes the same way as getrandom(). This has the following API signature: ssize_t vgetrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len); The return value and the first three arguments are the same as ordinary getrandom(), while the last two arguments are a pointer to the opaque allocated state and its size. Were all five arguments passed to the getrandom() syscall, nothing different would happen, and the functions would have the exact same behavior. The actual vDSO RNG algorithm implemented is the same one implemented by drivers/char/random.c, using the same fast-erasure techniques as that. Should the in-kernel implementation change, so too will the vDSO one. It requires an implementation of ChaCha20 that does not use any stack, in order to maintain forward secrecy if a multi-threaded program forks (though this does not account for a similar issue with SA_SIGINFO copying registers to the stack), so this is left as an architecture-specific fill-in. Stack-less ChaCha20 is an easy algorithm to implement on a variety of architectures, so this shouldn't be too onerous. Initially, the state is keyless, and so the first call makes a getrandom() syscall to generate that key, and then uses it for subsequent calls. By keeping track of a generation counter, it knows when its key is invalidated and it should fetch a new one using the syscall. Later, more than just a generation counter might be used. Since MADV_WIPEONFORK is set on the opaque state, the key and related state is wiped during a fork(), so secrets don't roll over into new processes, and the same state doesn't accidentally generate the same random stream. The generation counter, as well, is always >0, so that the 0 counter is a useful indication of a fork() or otherwise uninitialized state. If the kernel RNG is not yet initialized, then the vDSO always calls the syscall, because that behavior cannot be emulated in userspace, but fortunately that state is short lived and only during early boot. If it has been initialized, then there is no need to inspect the `flags` argument, because the behavior does not change post-initialization regardless of the `flags` value. Since the opaque state passed to it is mutated, vDSO getrandom() is not reentrant, when used with the same opaque state, which libc should be mindful of. The function works over an opaque per-thread state of a particular size, which must be marked VM_WIPEONFORK, VM_DONTDUMP, VM_NORESERVE, and VM_DROPPABLE for proper operation. Over time, the nuances of these allocations may change or grow or even differ based on architectural features. The opaque state passed to vDSO getrandom() must be allocated using the mmap_flags and mmap_prot parameters provided by the vgetrandom_opaque_params struct, which also contains the size of each state. That struct can be obtained with a call to vgetrandom(NULL, 0, 0, ¶ms, ~0UL). Then, libc can call mmap(2) and slice up the returned array into a state per each thread, while ensuring that no single state straddles a page boundary. Libc is expected to allocate a chunk of these on first use, and then dole them out to threads as they're created, allocating more when needed. vDSO getrandom() provides the ability for userspace to generate random bytes quickly and safely, and is intended to be integrated into libc's thread management. As an illustrative example, the introduced code in the vdso_test_getrandom self test later in this series might be used to do the same outside of libc. In a libc the various pthread-isms are expected to be elided into libc internals. Reviewed-by: Thomas Gleixner Signed-off-by: Jason A. Donenfeld commit 9651fcedf7b92d3f7f1ab179e8ab55b85ee10fc1 Author: Jason A. Donenfeld Date: Thu Dec 8 17:55:04 2022 +0100 mm: add MAP_DROPPABLE for designating always lazily freeable mappings The vDSO getrandom() implementation works with a buffer allocated with a new system call that has certain requirements: - It shouldn't be written to core dumps. * Easy: VM_DONTDUMP. - It should be zeroed on fork. * Easy: VM_WIPEONFORK. - It shouldn't be written to swap. * Uh-oh: mlock is rlimited. * Uh-oh: mlock isn't inherited by forks. - It shouldn't reserve actual memory, but it also shouldn't crash when page faulting in memory if none is available * Uh-oh: VM_NORESERVE means segfaults. It turns out that the vDSO getrandom() function has three really nice characteristics that we can exploit to solve this problem: 1) Due to being wiped during fork(), the vDSO code is already robust to having the contents of the pages it reads zeroed out midway through the function's execution. 2) In the absolute worst case of whatever contingency we're coding for, we have the option to fallback to the getrandom() syscall, and everything is fine. 3) The buffers the function uses are only ever useful for a maximum of 60 seconds -- a sort of cache, rather than a long term allocation. These characteristics mean that we can introduce VM_DROPPABLE, which has the following semantics: a) It never is written out to swap. b) Under memory pressure, mm can just drop the pages (so that they're zero when read back again). c) It is inherited by fork. d) It doesn't count against the mlock budget, since nothing is locked. e) If there's not enough memory to service a page fault, it's not fatal, and no signal is sent. This way, allocations used by vDSO getrandom() can use: VM_DROPPABLE | VM_DONTDUMP | VM_WIPEONFORK | VM_NORESERVE And there will be no problem with OOMing, crashing on overcommitment, using memory when not in use, not wiping on fork(), coredumps, or writing out to swap. In order to let vDSO getrandom() use this, expose these via mmap(2) as MAP_DROPPABLE. Note that this involves removing the MADV_FREE special case from sort_folio(), which according to Yu Zhao is unnecessary and will simply result in an extra call to shrink_folio_list() in the worst case. The chunk removed reenables the swapbacked flag, which we don't want for VM_DROPPABLE, and we can't conditionalize it here because there isn't a vma reference available. Finally, the provided self test ensures that this is working as desired. Cc: linux-mm@kvack.org Acked-by: David Hildenbrand Signed-off-by: Jason A. Donenfeld commit 4305ca0087dd99c3c3e0e2ac8a228b7e53a21c78 Merge: 661fb4e68cf62 23cef42d17413 Author: Linus Torvalds Date: Fri Jul 19 10:56:58 2024 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, lpfc, qla2xxx, mpi3mr) plus some misc small fixes. The only core changes are to both bsg and scsi to pass in the device instead of setting it afterwards as q->queuedata, so no functional change" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (69 commits) scsi: aha152x: Use DECLARE_COMPLETION_ONSTACK for non-constant completion scsi: qla2xxx: Convert comma to semicolon scsi: qla2xxx: Update version to 10.02.09.300-k scsi: qla2xxx: Use QP lock to search for bsg scsi: qla2xxx: Reduce fabric scan duplicate code scsi: qla2xxx: Fix optrom version displayed in FDMI scsi: qla2xxx: During vport delete send async logout explicitly scsi: qla2xxx: Complete command early within lock scsi: qla2xxx: Fix flash read failure scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds scsi: qla2xxx: Fix for possible memory corruption scsi: qla2xxx: validate nvme_local_port correctly scsi: qla2xxx: Unable to act on RSCN for port online scsi: ufs: exynos: Add support for Flash Memory Protector (FMP) scsi: ufs: core: Add UFSHCD_QUIRK_KEYS_IN_PRDT scsi: ufs: core: Add fill_crypto_prdt variant op scsi: ufs: core: Add UFSHCD_QUIRK_BROKEN_CRYPTO_ENABLE scsi: ufs: core: fold ufshcd_clear_keyslot() into its caller scsi: ufs: core: Add UFSHCD_QUIRK_CUSTOM_CRYPTO_PROFILE scsi: ufs: mcq: Make .get_hba_mac() optional ... commit 661fb4e68cf62bf52eacfcd9b3b0d93fe4260c5b Merge: afd81d914f6fb 7f1c4909a821d Author: Linus Torvalds Date: Fri Jul 19 10:48:44 2024 -0700 Merge tag 'for-6.11/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mikulas Patocka: - Optimize processing of flush bios in the dm-linear and dm-stripe targets - Dm-io cleansups and refactoring - Remove unused 'struct thunk' in dm-cache - Handle minor device numbers > 255 in dm-init - Dm-verity refactoring & enabling platform keyring - Fix warning in dm-raid - Improve dm-crypt performance - split bios to smaller pieces, so that They could be processed concurrently - Stop using blk_limits_io_{min,opt} - Dm-vdo cleanup and refactoring - Remove max_write_zeroes_granularity and max_secure_erase_granularity - Dm-multipath cleanup & refactoring - Add dm-crypt and dm-integrity support for non-power-of-2 sector size - Fix reshape in dm-raid - Make dm_block_validator const * tag 'for-6.11/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (33 commits) dm vdo: fix a minor formatting issue in vdo.rst dm vdo int-map: fix kerneldoc formatting dm vdo repair: add missing kerneldoc fields dm: Constify struct dm_block_validator dm-integrity: introduce the Inline mode dm: introduce the target flag mempool_needs_integrity dm raid: fix stripes adding reshape size issues dm raid: move _get_reshape_sectors() as prerequisite to fixing reshape size issues dm-crypt: support for per-sector NVMe metadata dm mpath: don't call dm_get_device in multipath_message dm: factor out helper function from dm_get_device dm-verity: fix dm_is_verity_target() when dm-verity is builtin dm: Remove max_secure_erase_granularity dm: Remove max_write_zeroes_granularity dm vdo indexer: use swap() instead of open coding it dm vdo: remove unused struct 'uds_attribute' dm: stop using blk_limits_io_{min,opt} dm-crypt: limit the size of encryption requests dm verity: add support for signature verification with platform keyring dm-raid: Fix WARN_ON_ONCE check for sync_thread in raid_resume ... commit afd81d914f6fb3e74a46bf5d0dd0b028591ea22e Merge: ebcfbf02abfbe b69bdba5a37eb Author: Linus Torvalds Date: Fri Jul 19 10:20:26 2024 -0700 Merge tag 'dma-mapping-6.11-2024-07-19' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - reduce duplicate swiotlb pool lookups (Michael Kelley) - minor small fixes (Yicong Yang, Yang Li) * tag 'dma-mapping-6.11-2024-07-19' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix kernel-doc description for swiotlb_del_transient swiotlb: reduce swiotlb pool lookups dma-mapping: benchmark: Don't starve others when doing the test commit ebcfbf02abfbecc144440ff797419cc95cb047fe Merge: 3d51520954154 8b6c32e831ef4 Author: Linus Torvalds Date: Fri Jul 19 09:59:58 2024 -0700 Merge tag 'iommu-updates-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu updates from Will Deacon: "Core: - Support for the "ats-supported" device-tree property - Removal of the 'ops' field from 'struct iommu_fwspec' - Introduction of iommu_paging_domain_alloc() and partial conversion of existing users - Introduce 'struct iommu_attach_handle' and provide corresponding IOMMU interfaces which will be used by the IOMMUFD subsystem - Remove stale documentation - Add missing MODULE_DESCRIPTION() macro - Misc cleanups Allwinner Sun50i: - Ensure bypass mode is disabled on H616 SoCs - Ensure page-tables are allocated below 4GiB for the 32-bit page-table walker - Add new device-tree compatible strings AMD Vi: - Use try_cmpxchg64() instead of cmpxchg64() when updating pte Arm SMMUv2: - Print much more useful information on context faults - Fix Qualcomm TBU probing when CONFIG_ARM_SMMU_QCOM_DEBUG=n - Add new Qualcomm device-tree bindings Arm SMMUv3: - Support for hardware update of access/dirty bits and reporting via IOMMUFD - More driver rework from Jason, this time updating the PASID/SVA support to prepare for full IOMMUFD support - Add missing MODULE_DESCRIPTION() macro - Minor fixes and cleanups NVIDIA Tegra: - Fix for benign fwspec initialisation issue exposed by rework on the core branch Intel VT-d: - Use try_cmpxchg64() instead of cmpxchg64() when updating pte - Use READ_ONCE() to read volatile descriptor status - Remove support for handling Execute-Requested requests - Avoid calling iommu_domain_alloc() - Minor fixes and refactoring Qualcomm MSM: - Updates to the device-tree bindings" * tag 'iommu-updates-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: (72 commits) iommu/tegra-smmu: Pass correct fwnode to iommu_fwspec_init() iommu/vt-d: Fix identity map bounds in si_domain_init() iommu: Move IOMMU_DIRTY_NO_CLEAR define dt-bindings: iommu: Convert msm,iommu-v0 to yaml iommu/vt-d: Fix aligned pages in calculate_psi_aligned_address() iommu/vt-d: Limit max address mask to MAX_AGAW_PFN_WIDTH docs: iommu: Remove outdated Documentation/userspace-api/iommu.rst arm64: dts: fvp: Enable PCIe ATS for Base RevC FVP iommu/of: Support ats-supported device-tree property dt-bindings: PCI: generic: Add ats-supported property iommu: Remove iommu_fwspec ops OF: Simplify of_iommu_configure() ACPI: Retire acpi_iommu_fwspec_ops() iommu: Resolve fwspec ops automatically iommu/mediatek-v1: Clean up redundant fwspec checks RDMA/usnic: Use iommu_paging_domain_alloc() wifi: ath11k: Use iommu_paging_domain_alloc() wifi: ath10k: Use iommu_paging_domain_alloc() drm/msm: Use iommu_paging_domain_alloc() vhost-vdpa: Use iommu_paging_domain_alloc() ... commit 3d51520954154a476bfdacf9427acd1d9538734c Merge: ef7c8f2b1fb46 887cd308fd46a Author: Linus Torvalds Date: Fri Jul 19 09:51:33 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Usual collection of small improvements and fixes: - Bug fixes and minor improvments in efa, irdma, mlx4, mlx5, rxe, hf1, qib, ocrdma - bnxt_re support for MSN, which is a new retransmit logic - Initial mana support for RC qps - Use after free bug and cleanups in iwcm - Reduce resource usage in mlx5 when RDMA verbs features are not used - New verb to drain shared recieve queues, similar to normal recieve queues. This is necessary to allow ULPs a clean shutdown. Used in the iscsi rdma target - mlx5 support for more than 16 bits of doorbell indexes - Doorbell moderation support for bnxt_re - IB multi-plane support for mlx5 - New EFA adaptor PCI IDs - RDMA_NAME_ASSIGN_TYPE_USER to hint to userspace that it shouldn't rename the device - A collection of hns bugs - Fix long standing bug in bnxt_re with incorrect endian handling of immediate data" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (65 commits) IB/hfi1: Constify struct flag_table RDMA/mana_ib: Set correct device into ib bnxt_re: Fix imm_data endianness RDMA: Fix netdev tracker in ib_device_set_netdev RDMA/hns: Fix mbx timing out before CMD execution is completed RDMA/hns: Fix insufficient extend DB for VFs. RDMA/hns: Fix undifined behavior caused by invalid max_sge RDMA/hns: Fix shift-out-bounds when max_inline_data is 0 RDMA/hns: Fix missing pagesize and alignment check in FRMR RDMA/hns: Fix unmatch exception handling when init eq table fails RDMA/hns: Fix soft lockup under heavy CEQE load RDMA/hns: Check atomic wr length RDMA/ocrdma: Don't inline statistics functions RDMA/core: Introduce "name_assign_type" for an IB device RDMA/qib: Fix truncation compilation warnings in qib_verbs.c RDMA/qib: Fix truncation compilation warnings in qib_init.c RDMA/efa: Add EFA 0xefa3 PCI ID RDMA/mlx5: Support per-plane port IB counters by querying PPCNT register net/mlx5: mlx5_ifc update for accessing ppcnt register of plane ports RDMA/mlx5: Add plane index support when querying PTYS registers ... commit ef7c8f2b1fb46d3fc7a46d64bb73919e288ba547 Merge: 07e773db19f16 136a8066676e5 Author: Linus Torvalds Date: Fri Jul 19 09:42:29 2024 -0700 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd updates from Jason Gunthorpe: - The iova_bitmap logic for efficiently reporting dirty pages back to userspace has a few more tricky corner case bugs that have been resolved and backed with new tests. The revised version has simpler logic. - Shared branch with iommu for handle support when doing domain attach. Handles allow the domain owner to include additional private data on a per-device basis. - IO Page Fault Reporting to userspace via iommufd. Page faults can be generated on fault capable HWPTs when a translation is not present. Routing them to userspace would allow a VMM to be able to virtualize them into an emulated vIOMMU. This is the next step to fully enabling vSVA support. * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: (26 commits) iommufd: Put constants for all the uAPI enums iommufd: Fix error pointer checking iommufd: Add check on user response code iommufd: Remove IOMMUFD_PAGE_RESP_FAILURE iommufd: Require drivers to supply the cache_invalidate_user ops iommufd/selftest: Add coverage for IOPF test iommufd/selftest: Add IOPF support for mock device iommufd: Associate fault object with iommufd_hw_pgtable iommufd: Fault-capable hwpt attach/detach/replace iommufd: Add iommufd fault object iommufd: Add fault and response message definitions iommu: Extend domain attach group with handle support iommu: Add attach handle to struct iopf_group iommu: Remove sva handle list iommu: Introduce domain attachment handle iommufd/iova_bitmap: Remove iterator logic iommufd/iova_bitmap: Dynamic pinning on iova_bitmap_set() iommufd/iova_bitmap: Consolidate iova_bitmap_set exit conditionals iommufd/iova_bitmap: Move initial pinning to iova_bitmap_for_each() iommufd/iova_bitmap: Cache mapped length in iova_bitmap_map struct ... commit 07e773db19f16f4111795b658c4748da22c927bb Merge: c434e25b62f8e 7dc357d343f13 Author: Linus Torvalds Date: Fri Jul 19 09:35:53 2024 -0700 Merge tag 'tpmdd-next-6.11-rc1-roundtwo' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fix from Jarkko Sakkinen: "An additional fix that supplements my earlier fixes for handling auth, which I unfortunately missed last time" * tag 'tpmdd-next-6.11-rc1-roundtwo' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: Use auth only after NULL check in tpm_buf_check_hmac_response() commit 519be989717c5bffaed1dc14a439e3872cb4bb8d Author: David Howells Date: Thu May 23 10:01:08 2024 +0100 cifs: Add a tracepoint to track credits involved in R/W requests Add a tracepoint to track the credit changes and server in_flight value involved in the lifetime of a R/W request, logging it against the request/subreq debugging ID. This requires the debugging IDs to be recorded in the cifs_credits struct. The tracepoint can be enabled with: echo 1 >/sys/kernel/debug/tracing/events/cifs/smb3_rw_credits/enable Also add a three-state flag to struct cifs_credits to note if we're interested in determining when the in_flight contribution ends and, if so, to track whether we've decremented the contribution yet. Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (Red Hat) cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 61ea6b3a3104fcd66364282391dd2152bc4c129a Author: David Howells Date: Fri Jul 19 14:07:07 2024 +0100 cifs: Fix setting of zero_point after DIO write At the moment, at the end of a DIO write, cifs calls netfs_resize_file() to adjust the size of the file if it needs it. This will reduce the zero_point (the point above which we assume a read will just return zeros) if it's more than the new i_size, but won't increase it. With DIO writes, however, we definitely want to increase it as we have clobbered the local pagecache and then written some data that's not available locally. Fix cifs to make the zero_point above the end of a DIO or unbuffered write. This fixes corruption seen occasionally with the generic/708 xfs-test. In that case, the read-back of some of the written data is being short-circuited and replaced with zeroes. Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib") Cc: stable@vger.kernel.org Reported-by: Steve French Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (Red Hat) cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit d2c5eb57b6da10f335c30356f9696bd667601e6a Author: David Howells Date: Thu Jul 18 20:55:20 2024 +0100 cifs: Fix missing error code set In cifs_strict_readv(), the default rc (-EACCES) is accidentally cleared by a successful return from netfs_start_io_direct(), such that if cifs_find_lock_conflict() fails, we don't return an error. Fix this by resetting the default error code. Fixes: 14b1cd25346b ("cifs: Fix locking in cifs_strict_readv()") Cc: stable@vger.kernel.org Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (Red Hat) cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit de40579b903883274fe203865f29d66b168b7236 Author: David Howells Date: Thu Jul 18 20:19:32 2024 +0100 cifs: Fix server re-repick on subrequest retry When a subrequest is marked for needing retry, netfs will call cifs_prepare_write() which will make cifs repick the server for the op before renegotiating credits; it then calls cifs_issue_write() which invokes smb2_async_writev() - which re-repicks the server. If a different server is then selected, this causes the increment of server->in_flight to happen against one record and the decrement to happen against another, leading to misaccounting. Fix this by just removing the repick code in smb2_async_writev(). As this is only called from netfslib-driven code, cifs_prepare_write() should always have been called first, and so server should never be NULL and the preparatory step is repeated in the event that we do a retry. The problem manifests as a warning looking something like: WARNING: CPU: 4 PID: 72896 at fs/smb/client/smb2ops.c:97 smb2_add_credits+0x3f0/0x9e0 [cifs] ... RIP: 0010:smb2_add_credits+0x3f0/0x9e0 [cifs] ... smb2_writev_callback+0x334/0x560 [cifs] cifs_demultiplex_thread+0x77a/0x11b0 [cifs] kthread+0x187/0x1d0 ret_from_fork+0x34/0x60 ret_from_fork_asm+0x1a/0x30 Which may be triggered by a number of different xfstests running against an Azure server in multichannel mode. generic/249 seems the most repeatable, but generic/215, generic/249 and generic/308 may also show it. Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib") Cc: stable@vger.kernel.org Reported-by: Steve French Reviewed-by: Paulo Alcantara (Red Hat) Acked-by: Tom Talpey Signed-off-by: David Howells cc: Jeff Layton cc: Aurelien Aptel cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit ae4ccca47195332c69176b8615c5ee17efd30c46 Author: Steve French Date: Wed Jul 17 00:42:22 2024 -0500 cifs: fix noisy message on copy_file_range There are common cases where copy_file_range can noisily log "source and target of copy not on same server" e.g. the mv command across mounts to two different server's shares. Change this to informational rather than logging as an error. A followon patch will add dynamic trace points e.g. for cifs_file_copychunk_range Cc: stable@vger.kernel.org Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit c434e25b62f8efcfbb6bf1f7ce55960206c1137e Merge: 720261cfc7329 df1e9791998a9 Author: Linus Torvalds Date: Fri Jul 19 08:52:58 2024 -0700 Merge tag 'v6.11-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto update from Herbert Xu: "API: - Test setkey in no-SIMD context - Add skcipher speed test for user-specified algorithm Algorithms: - Add x25519 support on ppc64le - Add VAES and AVX512 / AVX10 optimized AES-GCM on x86 - Remove sm2 algorithm Drivers: - Add Allwinner H616 support to sun8i-ce - Use DMA in stm32 - Add Exynos850 hwrng support to exynos" * tag 'v6.11-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (81 commits) hwrng: core - remove (un)register_miscdev() crypto: lib/mpi - delete unnecessary condition crypto: testmgr - generate power-of-2 lengths more often crypto: mxs-dcp - Ensure payload is zero when using key slot hwrng: Kconfig - Do not enable by default CN10K driver crypto: starfive - Fix nent assignment in rsa dec crypto: starfive - Align rsa input data to 32-bit crypto: qat - fix unintentional re-enabling of error interrupts crypto: qat - extend scope of lock in adf_cfg_add_key_value_param() Documentation: qat: fix auto_reset attribute details crypto: sun8i-ce - add Allwinner H616 support crypto: sun8i-ce - wrap accesses to descriptor address fields dt-bindings: crypto: sun8i-ce: Add compatible for H616 hwrng: core - Fix wrong quality calculation at hw rng registration hwrng: exynos - Enable Exynos850 support hwrng: exynos - Add SMC based TRNG operation hwrng: exynos - Implement bus clock control hwrng: exynos - Use devm_clk_get_enabled() to get the clock hwrng: exynos - Improve coding style dt-bindings: rng: Add Exynos850 support to exynos-trng ... commit 89ed6c9ac69ec398ccb648f5f675b43e8ca679ca Author: Xiu Jianfeng Date: Tue Jul 16 13:30:58 2024 +0000 blk-cgroup: move congestion_count to struct blkcg The congestion_count was introduced into the struct cgroup by commit d09d8df3a294 ("blkcg: add generic throttling mechanism"), but since it is closely related to the blkio subsys, it is not appropriate to put it in the struct cgroup, so let's move it to struct blkcg. There should be no functional changes because blkcg is per cgroup. Signed-off-by: Xiu Jianfeng Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20240716133058.3491350-1-xiujianfeng@huawei.com Signed-off-by: Jens Axboe commit 72d04bdcf3f7d7e07d82f9757946f68802a7270a Author: Yang Yang Date: Tue Jul 16 16:26:27 2024 +0800 sbitmap: fix io hung due to race on sbitmap_word::cleared Configuration for sbq: depth=64, wake_batch=6, shift=6, map_nr=1 1. There are 64 requests in progress: map->word = 0xFFFFFFFFFFFFFFFF 2. After all the 64 requests complete, and no more requests come: map->word = 0xFFFFFFFFFFFFFFFF, map->cleared = 0xFFFFFFFFFFFFFFFF 3. Now two tasks try to allocate requests: T1: T2: __blk_mq_get_tag . __sbitmap_queue_get . sbitmap_get . sbitmap_find_bit . sbitmap_find_bit_in_word . __sbitmap_get_word -> nr=-1 __blk_mq_get_tag sbitmap_deferred_clear __sbitmap_queue_get /* map->cleared=0xFFFFFFFFFFFFFFFF */ sbitmap_find_bit if (!READ_ONCE(map->cleared)) sbitmap_find_bit_in_word return false; __sbitmap_get_word -> nr=-1 mask = xchg(&map->cleared, 0) sbitmap_deferred_clear atomic_long_andnot() /* map->cleared=0 */ if (!(map->cleared)) return false; /* * map->cleared is cleared by T1 * T2 fail to acquire the tag */ 4. T2 is the sole tag waiter. When T1 puts the tag, T2 cannot be woken up due to the wake_batch being set at 6. If no more requests come, T1 will wait here indefinitely. This patch achieves two purposes: 1. Check on ->cleared and update on both ->cleared and ->word need to be done atomically, and using spinlock could be the simplest solution. 2. Add extra check in sbitmap_deferred_clear(), to identify whether ->word has free bits. Fixes: ea86ea2cdced ("sbitmap: ammortize cost of clearing bits") Signed-off-by: Yang Yang Reviewed-by: Ming Lei Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240716082644.659566-1-yang.yang@vivo.com Signed-off-by: Jens Axboe commit 73e59d3eeca4feaf0814a077df8ec5edc53ccf77 Author: hexue Date: Thu Jul 18 15:08:17 2024 +0800 block: avoid polling configuration errors This patch adds a poll queue check, aiming to help users use polled IO accurately. If users do polled IO but the device doesn't have poll queues, they will get suboptimal performance data and waste CPU resources. Add a poll queue check batching this. If users don't have the device properly configured, or if it simply doesn't support polled IO, it will error the IO with -EOPNOTSUPP. This is similar to what we used to do for sync polled IO, which is no longer supported. Signed-off-by: hexue Link: https://lore.kernel.org/r/20240718070817.1031494-1-xue01.he@samsung.com Signed-off-by: Jens Axboe commit 8a47e33f50dd779f94bc277c6d3de81672463c5e Author: John Garry Date: Fri Jul 19 11:29:12 2024 +0000 block: Catch possible entries missing from rqf_name[] Add a BUILD_BUG_ON() call to ensure that we are not missing entries in rqf_name[]. Reviewed-by: Bart Van Assche Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-16-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 2d61a6c2ca7aadce3771f81a3624848f97dcc39e Author: John Garry Date: Fri Jul 19 11:29:11 2024 +0000 block: Simplify definition of RQF_NAME() Now that we have a bit index for RQF_x in __RQF_x, use __RQF_x to simplify the definition of RQF_NAME() by not using ilog2((__force u32()). Reviewed-by: Bart Van Assche Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-15-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 5f89154e8e9e3445f9b592e58a7045e06153b822 Author: John Garry Date: Fri Jul 19 11:29:10 2024 +0000 block: Use enum to define RQF_x bit indexes Similar to what we do for enum req_flag_bits, divide the definition of RQF_x flags into an enum to declare the bits and an actual flag. Tweak some comments to not spill onto new lines. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-14-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 6fa99325ec86bcd442363d77561a1babd8d9a427 Author: John Garry Date: Fri Jul 19 11:29:09 2024 +0000 block: Catch possible entries missing from cmd_flag_name[] Add a BUILD_BUG_ON() call to ensure that we are not missing entries in cmd_flag_name[]. Reviewed-by: Bart Van Assche Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-13-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 26d3bdb57ec3fa56eaf8d2e74b5d488e55f43013 Author: John Garry Date: Fri Jul 19 11:29:08 2024 +0000 block: Catch possible entries missing from alloc_policy_name[] Make BLK_TAG_ALLOC_x an enum and add a "max" entry. Add a BUILD_BUG_ON() call to ensure that we are not missing entries in hctx_flag_name[]. Reviewed-by: Bart Van Assche Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-12-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 226f0f6afc3e5c8903c6e57e1f6073ad8ad189b5 Author: John Garry Date: Fri Jul 19 11:29:07 2024 +0000 block: Catch possible entries missing from hctx_flag_name[] Refresh values in BLK_MQ_F_x enum, and then re-arrange members in hctx_flag_name[] to match that enum. Renumber BLK_MQ_F_ALLOC_POLICY_START_BIT to match the value refresh. Add a BUILD_BUG_ON() call to ensure that we are not missing entries in hctx_flag_name[]. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-11-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 23827310cce7eff3477aeaeb59ea3718f5c9c633 Author: John Garry Date: Fri Jul 19 11:29:06 2024 +0000 block: Catch possible entries missing from hctx_state_name[] Add a build-time assert that we are not missing entries from hctx_state_name[]. For this, create a separate enum for state flags and add a "max" entry for BLK_MQ_S_x flags. The numbering for those enum values is as default, so don't explicitly number. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-10-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit cce496de061d09794825b7c7c7d57faca4772d82 Author: John Garry Date: Fri Jul 19 11:29:05 2024 +0000 block: Catch possible entries missing from blk_queue_flag_name[] Assert that we are not missing flag entries in blk_queue_flag_name[]. Signed-off-by: John Garry Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240719112912.3830443-9-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 55177adf1837bc56f878f7f6f7123947a2088148 Author: John Garry Date: Fri Jul 19 11:29:04 2024 +0000 block: Make QUEUE_FLAG_x as an enum This will allow us better keep in sync with blk_queue_flag_name[]. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-8-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 793356d23f8a817e164a917c792741a6d6d651ed Author: John Garry Date: Fri Jul 19 11:29:03 2024 +0000 block: Relocate BLK_MQ_MAX_DEPTH BLK_MQ_MAX_DEPTH is defined as an enumerated value, but has no real relation to the other members in its enum, so just use #define to provide the definition. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-7-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 3dff6155733f25872530ad358c6f5559800f4ccb Author: John Garry Date: Fri Jul 19 11:29:02 2024 +0000 block: Relocate BLK_MQ_CPU_WORK_BATCH BLK_MQ_CPU_WORK_BATCH is defined in include/linux/blk-mq.h, but only used in blk-mq.c, so relocate to block/blk-mq.h Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-6-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit c8f51feee135f37f0d77b4616083c25524daa7b0 Author: Christoph Hellwig Date: Fri Jul 19 11:29:01 2024 +0000 block: remove QUEUE_FLAG_STOPPED QUEUE_FLAG_STOPPED is entirely unused. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-5-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 1c83c5375e2f1bc7b59fa3ec5aa1e5909ec8710c Author: John Garry Date: Fri Jul 19 11:29:00 2024 +0000 block: Add missing entry to hctx_flag_name[] Add missing entry for NO_SCHED_BY_DEFAULT and reorder to match the enum. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-4-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit af54963f193533dd7c1fe8f3d4e7af18de2406d8 Author: John Garry Date: Fri Jul 19 11:28:59 2024 +0000 block: Add zone write plugging entry to rqf_name[] Add missing entry. Reviewed-by: Bart Van Assche Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 6b3789e6c5310a8f517796b0f4a11039f9e5cf8f Author: John Garry Date: Fri Jul 19 11:28:58 2024 +0000 block: Add missing entries from cmd_flag_name[] Add missing entries for req_flag_bits. Reviewed-by: Bart Van Assche Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240719112912.3830443-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 0be9ae5486cd9e767138c13638820d240713f5f1 Author: Hou Tao Date: Sun Jul 14 14:55:33 2024 +0800 bpf, events: Use prog to emit ksymbol event for main program Since commit 0108a4e9f358 ("bpf: ensure main program has an extable"), prog->aux->func[0]->kallsyms is left as uninitialized. For BPF programs with subprogs, the symbol for the main program is missing just as shown in the output of perf script below: ffffffff81284b69 qp_trie_lookup_elem+0xb9 ([kernel.kallsyms]) ffffffffc0011125 bpf_prog_a4a0eb0651e6af8b_lookup_qp_trie+0x5d (bpf...) ffffffff8127bc2b bpf_for_each_array_elem+0x7b ([kernel.kallsyms]) ffffffffc00110a1 +0x25 () ffffffff8121a89a trace_call_bpf+0xca ([kernel.kallsyms]) Fix it by always using prog instead prog->aux->func[0] to emit ksymbol event for the main program. After the fix, the output of perf script will be correct: ffffffff81284b96 qp_trie_lookup_elem+0xe6 ([kernel.kallsyms]) ffffffffc001382d bpf_prog_a4a0eb0651e6af8b_lookup_qp_trie+0x5d (bpf...) ffffffff8127bc2b bpf_for_each_array_elem+0x7b ([kernel.kallsyms]) ffffffffc0013779 bpf_prog_245c55ab25cfcf40_qp_trie_lookup+0x25 (bpf...) ffffffff8121a89a trace_call_bpf+0xca ([kernel.kallsyms]) Fixes: 0108a4e9f358 ("bpf: ensure main program has an extable") Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Tested-by: Yonghong Song Reviewed-by: Krister Johansen Reviewed-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240714065533.1112616-1-houtao@huaweicloud.com commit c3ece6b7ffb4a7c00e8d53cbf4026a32b6127914 Author: Qu Wenruo Date: Sat Jul 13 18:33:44 2024 +0930 btrfs: change BTRFS_MOUNT_* flags to 64bit type Currently the BTRFS_MOUNT_* flags are already beyond 32 bits, this is going to cause compilation errors for some 32 bit systems, as their unsigned long is only 32 bits long, thus flag BTRFS_MOUNT_IGNORESUPERFLAGS overflows and can lead to errors. Fix the problem by: - Migrate all existing BTRFS_MOUNT_* flags to unsigned long long - Migrate all mount option related variables to unsigned long long * btrfs_fs_info::mount_opt * btrfs_fs_context::mount_opt * mount_opt parameter of btrfs_check_options() * old_opts parameter of btrfs_remount_begin() * old_opts parameter of btrfs_remount_cleanup() * mount_opt parameter of btrfs_check_mountopts_zoned() * mount_opt and opt parameters of check_ro_option() Fixes: 32e6216512b4 ("btrfs: introduce new "rescue=ignoresuperflags" mount option") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 45659274e60864f9acabba844468e405362bdc8c Merge: 19a3eec1e7cc0 142a41da39d14 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:33 2024 -0500 Merge branch 'pci/misc' - Remove unused struct 'acpi_handle_node' (Dr. David Alan Gilbert) - Use array notation for portdrv .id_table consistently (Masahiro Yamada) - Switch to new Intel CPU model defines (Tony Luck) - Add missing MODULE_DESCRIPTION() macros (Jeff Johnson) * pci/misc: PCI: controller: Add missing MODULE_DESCRIPTION() macros PCI: Add missing MODULE_DESCRIPTION() macros PCI/PM: Switch to new Intel CPU model defines PCI: Use array for .id_table consistently ACPI: PCI: Remove unused struct 'acpi_handle_node' commit 19a3eec1e7cc04901f8b14f6244345cd83a8507f Merge: d098215aec2c1 8a74e4eaa72c1 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:33 2024 -0500 Merge branch 'pci/switchtec' - Make switchtec_class constant (Greg Kroah-Hartman) * pci/switchtec: PCI: switchtec: Make switchtec_class constant commit d098215aec2c1a0ef785542c1b1bcf65d617dd80 Merge: 99329ded09099 f24c9bfcd423e Author: Bjorn Helgaas Date: Fri Jul 19 10:10:32 2024 -0500 Merge branch 'pci/controller/vmd' - Create "domain" symlink for vmd before adding devices below the VMD bridge so it's available when mdadm assembles RAID devices from them (Jiwei Sun) * pci/controller/vmd: PCI: vmd: Create domain symlink before pci_bus_add_devices() commit 99329ded09099b40f755893b466571395d09ce46 Merge: 8240a9b4a5a27 6a6118336270f Author: Bjorn Helgaas Date: Fri Jul 19 10:10:32 2024 -0500 Merge branch 'pci/controller/tegra194' - Ensure Tegra194 and Tegra234 inbound ATU entries are 64KB-aligned to match the hardware restriction (Jon Hunter) - Remove unused struct 'tegra_pcie_soc' (Dr. David Alan Gilbert) * pci/controller/tegra194: PCI: tegra: Remove unused struct 'tegra_pcie_soc' PCI: tegra194: Set EP alignment restriction for inbound ATU commit 8240a9b4a5a27ce20a0ae2dea2b2e830be34f3b9 Merge: 59dd7046b4fbe 84e30b878aed9 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:32 2024 -0500 Merge branch 'pci/controller/rockchip' - Use dev_err_probe() in dw-rockchip probe error path so the failures aren't silent (Uwe Kleine-König) - Sleep PCIE_T_PVPERL_MS (100ms) before deasserting PERST# (Damien Le Moal) - Sleep PCIE_T_RRS_READY_MS (100ms) after conventional reset, before a config access (Damien Le Moal) - Request the PERST# GPIO with GPIOD_OUT_LOW so it matches the POR value, which avoids a spurious PERST# assertion and fixes a Qcom modem firmware crash and issues with WLAN controllers, e.g., RTL8822CE (Manivannan Sadhasivam for rockchip, Niklas Cassel for dw-rockchip) - Refactor dw-rockchip and add support for Endpoint mode for rk3568 and rk3588 (Niklas Cassel) * pci/controller/rockchip: PCI: dw-rockchip: Use pci_epc_init_notify() directly PCI: dw-rockchip: Add endpoint mode support PCI: dw-rockchip: Refactor the driver to prepare for EP mode PCI: dw-rockchip: Add rockchip_pcie_get_ltssm() helper PCI: dw-rockchip: Fix weird indentation PCI: dw-rockchip: Fix initial PERST# GPIO value PCI: dw-rockchip: Add error messages in .probe() error paths PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio PCI: rockchip-host: Wait 100ms after reset before starting configuration PCI: rockchip-host: Fix rockchip_pcie_host_init_port() PERST# handling commit 59dd7046b4fbe60d74544f8a77c63899ce8b3618 Merge: 55b3ebfedc199 faf5a975ee3b9 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:31 2024 -0500 Merge branch 'pci/controller/rcar-gen4' - Add Synopsys DWC macros for lane skew configuration (Yoshihiro Shimoda) - Add struct rcar_gen4_pcie_drvdata to provide for future SoCs with different initialization requirements (Yoshihiro Shimoda) - Add .ltssm_control() method for SoC dependencies (Yoshihiro Shimoda) - Add r8a779g0 (R-Car V4H) support (Yoshihiro Shimoda) * pci/controller/rcar-gen4: PCI: rcar-gen4: Add support for R-Car V4H PCI: rcar-gen4: Add .ltssm_control() for other SoC support PCI: rcar-gen4: Add struct rcar_gen4_pcie_drvdata PCI: dwc: Add PCIE_PORT_{FORCE,LANE_SKEW} macros commit 55b3ebfedc199c1492c30d0ef0ad5dd7d4ee611c Merge: df5dd337283ad c93637e6a4c4e Author: Bjorn Helgaas Date: Fri Jul 19 10:10:31 2024 -0500 Merge branch 'pci/controller/rcar' - Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup() to avoid excessive warnings when the driver is confused about link state when resuming (Marek Vasut) * pci/controller/rcar: PCI: rcar: Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup() commit df5dd337283ad104ef329124d683b63d6b4dcd48 Merge: 325b9a3e4e6bc 044b45be04cb1 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:31 2024 -0500 Merge branch 'pci/controller/qcom' - Use devm_clk_bulk_get_all() to get all the clocks from DT to avoid writing out all the clock names (Manivannan Sadhasivam) - Add DT binding and driver support for the SA8775P SoC (Mrinmay Sarkar) - Refactor dw_pcie_edma_find_chip() to enable adding support for Hyper DMA (HDMA) (Manivannan Sadhasivam) - Enable drivers to supply the eDMA channel count since some can't auto detect this (Manivannan Sadhasivam) - Add HDMA support for the SA8775P SoC (Mrinmay Sarkar) - Override the SA8775P NO_SNOOP default to avoid possible memory corruption (Mrinmay Sarkar) - Make sure resources are disabled during PERST# assertion, even if the link is already disabled (Manivannan Sadhasivam) - Vote for the CPU-PCIe ICC (interconnect) path to ensure it stays active even if other drivers don't vote for it (Krishna chaitanya chundru) - Add Operating Performance Points (OPP) to scale performance state based on aggregate link bandwidth to improve SoC power efficiency (Krishna chaitanya chundru) - Return failure instead of success if dev_pm_opp_find_freq_floor() fails (Dan Carpenter) - Avoid an error pointer dereference if dev_pm_opp_find_freq_exact() fails (Dan Carpenter) - Prevent use of uninitialized data in qcom_pcie_suspend_noirq() (Dan Carpenter) * pci/controller/qcom: PCI: qcom: Prevent use of uninitialized data in qcom_pcie_suspend_noirq() PCI: qcom: Prevent potential error pointer dereference PCI: qcom: Fix missing error code in qcom_pcie_probe() PCI: qcom: Add OPP support to scale performance PCI: Bring the PCIe speed to MBps logic to new pcie_dev_speed_mbps() PCI: qcom: Add ICC bandwidth vote for CPU to PCIe path PCI: qcom-ep: Disable resources unconditionally during PERST# assert PCI: qcom-ep: Override NO_SNOOP attribute for SA8775P EP PCI: qcom: Override NO_SNOOP attribute for SA8775P RC PCI: epf-mhi: Enable HDMA for SA8775P SoC PCI: qcom-ep: Add HDMA support for SA8775P SoC PCI: dwc: Pass the eDMA mapping format flag directly from glue drivers PCI: dwc: Skip finding eDMA channels count for HDMA platforms PCI: dwc: Refactor dw_pcie_edma_find_chip() API PCI: qcom-ep: Add support for SA8775P SOC dt-bindings: PCI: qcom-ep: Add support for SA8775P SoC PCI: qcom: Use devm_clk_bulk_get_all() API commit 325b9a3e4e6bcaa04495ebc54e24203e00151bc0 Merge: 145eec91b38a5 39b91eb40c6aa Author: Bjorn Helgaas Date: Fri Jul 19 10:10:30 2024 -0500 Merge branch 'pci/controller/microchip' - Move PLDA XpressRICH generic DT binding properties to plda,xpressrich3-axi-common.yaml where they can be shared across PLDA-based drivers (Minda Chen) - Create a drivers/pci/controller/plda/ directory for PLDA-based drivers and move pcie-microchip-host.c there (Minda Chen) - Move PLDA generic macros to pcie-plda.h where they can be shared across drivers (Minda Chen) - Extract PLDA generic structures from pcie-microchip-host.c, rename them to be generic, and move them to pcie-plda-host.c where they can be shared across drivers (Minda Chen) - Add a .request_event_irq() callback for requesting device-specific interrupts in addition to PLDA-generic interrupts (Minda Chen) - Add DT binding and driver for the StarFive JH7110 SoC, based on PLDA IP (Minda Chen) * pci/controller/microchip: PCI: starfive: Add JH7110 PCIe controller dt-bindings: PCI: Add StarFive JH7110 PCIe controller PCI: Add PCIE_RESET_CONFIG_DEVICE_WAIT_MS waiting time value PCI: plda: Pass pci_host_bridge to plda_pcie_setup_iomems() PCI: plda: Add host init/deinit and map bus functions PCI: plda: Add event bitmap field to struct plda_pcie_rp PCI: microchip: Move IRQ functions to pcie-plda-host.c PCI: microchip: Add event irqchip field to host port and add PLDA irqchip PCI: microchip: Add get_events() callback and PLDA get_event() PCI: microchip: Add INTx and MSI event num to struct plda_event PCI: microchip: Add request_event_irq() callback function PCI: microchip: Add num_events field to struct plda_pcie_rp PCI: microchip: Rename interrupt related functions PCI: microchip: Move PLDA functions to pcie-plda-host.c PCI: microchip: Rename PLDA functions to be generic PCI: microchip: Move PLDA structures to plda-pcie.h PCI: microchip: Rename PLDA structures to be generic PCI: microchip: Add bridge_addr field to struct mc_pcie PCI: microchip: Move PLDA IP register macros to pcie-plda.h PCI: microchip: Move pcie-microchip-host.c to PLDA directory dt-bindings: PCI: Add PLDA XpressRICH PCIe host common properties # Conflicts: # drivers/pci/pci.h commit 145eec91b38a56a619fb1edc867f09fecc8dc44f Merge: 9965133729ed7 a4bbcac11d3ce Author: Bjorn Helgaas Date: Fri Jul 19 10:10:28 2024 -0500 Merge branch 'pci/controller/loongson' * pci/controller/loongson: PCI: loongson: Enable MSI in LS7A Root Complex commit 9965133729ed70293f565d35bf67f6a87fe88c6a Merge: db2cc94fae135 cd09a6ac85b9f Author: Bjorn Helgaas Date: Fri Jul 19 10:10:28 2024 -0500 Merge branch 'pci/controller/layerscape' - Make the ls-gen4 struct mobiveil_rp_ops constant (Christophe JAILLET) * pci/controller/layerscape: PCI: ls-gen4: Make struct mobiveil_rp_ops constant commit db2cc94fae135e2ea9d2de68c7a2b30a2fc75e74 Merge: 477ddcd8ef8bc 86f271f22bbb6 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:28 2024 -0500 Merge branch 'pci/controller/keystone' - Enable BAR 0 only for v3.65a to avoid Completion Timeouts that cause a 45 second boot delay on the v4.90a-based AM654x SoC (Siddharth Vadapalli) - Avoid a NULL pointer dereference if DT failed to provide a host bridge memory window (Aleksandr Mishin) * pci/controller/keystone: PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0) PCI: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs() PCI: keystone: Don't enable BAR 0 for AM654x PCI: keystone: Relocate ks_pcie_set/clear_dbi_mode() commit 477ddcd8ef8bc555e021eb1a9d13bf182538a363 Merge: da3552d2256c8 fea93a3e5d5e6 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:27 2024 -0500 Merge branch 'pci/controller/hyperv' - Return zero, not garbage, when reading PCI_INTERRUPT_PIN from a Hyper-V device (Wei Liu) * pci/controller/hyperv: PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN commit da3552d2256c8bb8953a65d94b26994e29998f89 Merge: 1d97f4b215396 6b11143f9344d Author: Bjorn Helgaas Date: Fri Jul 19 10:10:27 2024 -0500 Merge branch 'pci/controller/exynos' - Use devm_clk_bulk_get_all_enable() to simplify clock setup (Shradha Todi) * pci/controller/exynos: PCI: exynos: Adapt to use bulk clock APIs commit 1d97f4b215396f3501732ff09f311494db3fbdec Merge: 43f25adf9f27a 045fda2535116 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:27 2024 -0500 Merge branch 'pci/controller/dra7xx' - Correct the dra7xx_pcie_cpu_addr_fixup() parameter name, which takes a CPU address but called it "pci_addr" (Niklas Cassel) * pci/controller/dra7xx: PCI: dra7xx: Fix dra7xx_pcie_cpu_addr_fixup() parameter name commit 43f25adf9f27a88247ab7500f0d8190bf970a4f6 Merge: e38de94eddcef 7903ffa44056b Author: Bjorn Helgaas Date: Fri Jul 19 10:10:26 2024 -0500 Merge branch 'pci/controller/artpec6' - Correct the artpec6_pcie_cpu_addr_fixup() parameter name, which takes a CPU address but called it "pci_addr" (Niklas Cassel) * pci/controller/artpec6: PCI: artpec6: Fix artpec6_pcie_cpu_addr_fixup() parameter name commit e38de94eddcef3763b12e60528fe8a716af9f77c Merge: 3785393285115 a9927c2cac6e9 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:26 2024 -0500 Merge branch 'pci/controller/al' - Check IORESOURCE_BUS existence to avoid NULL pointer dereference (Aleksandr Mishin) * pci/controller/al: PCI: al: Check IORESOURCE_BUS existence during probe commit 37853932851153fe49bdb2cfd9b2f0694812504f Merge: 35f0c94a1207c 9b10e877fc847 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:25 2024 -0500 Merge branch 'pci/controller/dwc' - Use msleep() in DWC core instead of usleep_range() for ~100 ms sleep (Konrad Dybcio) - Fix iATU slot management to avoid using the wrong slot after PERST# assert/deassert, which could potentially cause DMA to go the wrong place (Frank Li) - Consolidate dw_pcie_prog_outbound_atu() arguments into a struct to ease adding new functionality like initiating Message TLPs (Yoshihiro Shimoda) - Add support for endpoints to initiate PCIe messages (Yoshihiro Shimoda) - Add #defines for PCIe INTx messages (Yoshihiro Shimoda) - Add support for endpoints to initiate PCIe PME_Turn_Off messages for system suspend (Frank Li) - Add dw_pcie_ep_linkdown() to reinitialize registers that are lost when the link goes down (Manivannan Sadhasivam) - Use dw_pcie_ep_linkdown() to reinitialize qcom non-sticky registers that are lost when the link goes down (Manivannan Sadhasivam) - Enforce DWC limitation that 64-bit BARs must start with the even numbered BAR (Niklas Cassel) * pci/controller/dwc: PCI: dwc: ep: Enforce DWC specific 64-bit BAR limitation PCI: layerscape-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event PCI: dwc: ep: Remove dw_pcie_ep_init_notify() wrapper PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event PCI: dwc: Add generic MSG TLP support for sending PME_Turn_Off when system suspend PCI: Add PCIE_MSG_CODE_PME_TURN_OFF message macro PCI: Add PCIE_MSG_CODE_ASSERT_INTx message macros PCI: dwc: Add outbound MSG TLPs support PCI: dwc: Consolidate args of dw_pcie_prog_outbound_atu() into a structure PCI: dwc: Fix index 0 incorrectly being interpreted as a free ATU slot PCI: dwc: Use msleep() in dw_pcie_wait_for_link() commit 35f0c94a1207cd250ed705860bd223f01761b209 Merge: 0f74d8984301b d03b2dd785323 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:25 2024 -0500 Merge branch 'pci/controller/gpio' - Include in dra7xx to avoid implicitly including it elsewhere (Andy Shevchenko) - Remove unused from aardvark and dwc drivers (dra7xx, meson, qcom, tegra194) (Andy Shevchenko) - Convert kirin to use scoped for_each_available_child_of_node() to ease future error exits (Javier Carrasco) - Convert imx6 and kirin to use the agnostic GPIO API to simplify GPIO setup and remove usage of the deprecated of_gpio.h API (Andy Shevchenko) * pci/controller/gpio: PCI: kirin: Convert to use agnostic GPIO API PCI: kirin: Convert kirin_pcie_parse_port() to scoped iterator PCI: imx6: Convert to use agnostic GPIO API PCI: dwc: Remove unused of_gpio.h inclusion PCI: aardvark: Remove unused of_gpio.h inclusion PCI: dra7xx: Add missing chained IRQ header inclusion commit 0f74d8984301b65879ef34ffc69de33f2c32beb2 Merge: 7095d21ef5534 96447ede32d81 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:25 2024 -0500 Merge branch 'pci/endpoint' - Remove unused struct pci_epf_group.type_group (Christophe JAILLET) - Use cached epc_features instead of pci_epc_get_features() to avoid having to check for failure (potential NULL pointer dereference) (Manivannan Sadhasivam) - Drop pointless local msix_capable variable in pci_epf_test_alloc_space() (Manivannan Sadhasivam) - Rename struct pci_epc_event_ops.core_init to .epc_init, since "core" is no longer meaningful here (Manivannan Sadhasivam) - Rename pci_epc_bme_notify(), pci_epf_mhi_bme(), pci_epc_bme_notify() to spell out "bus_master_enable" instead of "bme" (Manivannan Sadhasivam) - Factor pci_epf_test_clear_bar() and pci_epf_test_free_space() out of pci_epf_test_unbind() so they can be reused elsewhere (Manivannan Sadhasivam) - Move DMA initialization to the pci_epf_mhi_epc_init() callback so endpoint drivers do this uniformly (Manivannan Sadhasivam) - Add endpoint testing for Link Down events (Manivannan Sadhasivam) - Add 'epc_deinit' event so endpoints that can be reset via PERST# (qcom, tegra194) can notify EPF drivers when this happens (Manivannan Sadhasivam) - Make pci_epc_class constant (Greg Kroah-Hartman) - Fix vpci_scan_bus() error checking to print error for failure (not success) and clean up after failure (Dan Carpenter) - Fix epf_ntb_epc_cleanup() error handling to clean up scratchpad BARs and clean up in mirror order of allocation (Dan Carpenter) - Add rk3588, which requires 64KB BAR alignment, to pci_endpoint_test (Niklas Cassel) - Use memcpy_toio()/memcpy_fromio() for endpoint BAR tests to improve performance (Niklas Cassel) - Set DMA mask to 48 bits always to simplify endpoint test, since there's there's no need to check for error or to fallback to 32 bits (Frank Li) - Suggest using programmable Vendor/Device ID (when supported) to use pci_endpoint_test without having to add new entries (Yoshihiro Shimoda) - Remove unused pci_endpoint_test_bar_{readl,writel}() (Jiapeng Chong) - Remove 'linkup' and add 'add_cfs' to the endpoint function driver 'ops' documentation to match the code (Alexander Stein) - * pci/endpoint: Documentation: PCI: pci-endpoint: Fix EPF ops list misc: pci_endpoint_test: Remove unused pci_endpoint_test_bar_{readl,writel} functions misc: pci_endpoint_test: Document policy about adding pci_device_id misc: pci_endpoint_test: Refactor dma_set_mask_and_coherent() logic misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests misc: pci_endpoint_test: Add support for Rockchip rk3588 PCI: endpoint: Fix error handling in epf_ntb_epc_cleanup() PCI: endpoint: Clean up error handling in vpci_scan_bus() PCI: endpoint: Make pci_epc_class struct constant PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers PCI: endpoint: pci-epf-test: Handle Link Down event PCI: endpoint: pci-epf-{mhi/test}: Move DMA initialization to EPC init callback PCI: endpoint: pci-epf-test: Refactor pci_epf_test_unbind() function PCI: endpoint: Rename BME to Bus Master Enable PCI: endpoint: Rename core_init() callback in 'struct pci_epc_event_ops' to epc_init() PCI: endpoint: pci-epf-test: Use 'msix_capable' flag directly in pci_epf_test_alloc_space() PCI: endpoint: pci-epf-test: Make use of cached 'epc_features' in pci_epf_test_core_init() PCI: endpoint: Remove unused field in struct pci_epf_group commit 7095d21ef5534d753895f5f1e695a1371a2d5b44 Merge: 65d8f684a5cb7 30e7c6cc88b04 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:24 2024 -0500 Merge branch 'pci/dt-bindings' - Add "apb", "sys", "pmc", "msg", "err" for Endpoint descriptions as well as for Root Complexes (Niklas Cassel) - Add "tx_inta", "tx_intb", "tx_intc", "tx_intd" for interrupt signals triggered in response to PCIe Assert_INTx messages (Niklas Cassel) - Refactor rockchip-dw-pcie binding to move generic properties to a new rockchip-dw-pcie-common binding that can be shared by both RC and EP mode (Niklas Cassel) - Fix rockchip-dw-pcie description of INTx signals (Niklas Cassel) - Add rockchip-dw-pcie description of Endpoint controller (Niklas Cassel) - Avoid xilinx-versal-cpm overlapping of bridge registers and 32-bit BAR addresses (Thippeswamy Havalige) - Add qcom Operating Performance Points (OPP) table (Krishna chaitanya chundru) - Add a picture of mediatek,mt7621-pcie topology (Sergio Paracuellos) - Add a generic "ats-supported" property so the OS can discover whether a Root Complex supports ATS (Jean-Philippe Brucker) - Make the qcom,pcie-x1e80100 MHI register region mandatory (Abel Vesa) * pci/dt-bindings: dt-bindings: PCI: qcom: x1e80100: Make the MHI reg region mandatory dt-bindings: PCI: generic: Add ats-supported property dt-bindings: PCI: mediatek,mt7621-pcie: Add PCIe host topology ASCII graph dt-bindings: PCI: qcom: Add OPP table dt-bindings: PCI: xilinx-cpm: Fix overlapping of bridge register and 32-bit BAR addresses dt-bindings: PCI: rockchip: Add DesignWare based PCIe Endpoint controller dt-bindings: PCI: rockchip-dw-pcie: Fix description of legacy IRQ dt-bindings: PCI: rockchip-dw-pcie: Prepare for Endpoint mode support dt-bindings: PCI: snps,dw-pcie-ep: Add tx_int{a,b,c,d} legacy IRQs dt-bindings: PCI: snps,dw-pcie-ep: Add vendor specific interrupt-names dt-bindings: PCI: snps,dw-pcie-ep: Add vendor specific reg-name commit 65d8f684a5cb7ededa4fe7e264dbef750fa5b489 Merge: 62281339e34ba 566f1dd528167 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:24 2024 -0500 Merge branch 'pci/resource' - Rename find_resource() to find_resource_space() to make it more descriptive for exporting outside resource.c (Ilpo Järvinen) - Document find_resource_space() and the resource_constraint struct it uses (Ilpo Järvinen) - Add typedef resource_alignf to make it simpler to declare allocation constraint alignf callbacks (Ilpo Järvinen) - Open-code the no-constraint simple alignment case to make the simple_align_resource() default callback unnecessary (Ilpo Järvinen) - Export find_resource_space() because PCI bridge window allocation needs to learn whether there's space for a window (Ilpo Järvinen) - Fix a double-counting problem in PCI calculate_memsize() that led to allocating larger windows each time a bus was removed and rescanned (Ilpo Järvinen) - When we don't have space to allocate larger bridge windows, allocate windows only large enough for the downstream devices to prevent cases where a device worked originally, but not after being removed and re-added (Ilpo Järvinen) * pci/resource: PCI: Relax bridge window tail sizing rules PCI: Make minimum bridge window alignment reference more obvious PCI: Fix resource double counting on remove & rescan resource: Export find_resource_space() resource: Handle simple alignment inside __find_resource_space() resource: Use typedef for alignf callback resource: Document find_resource_space() and resource_constraint resource: Rename find_resource() to find_resource_space() commit 62281339e34ba39c062d7ee13a02e9f2f3c739f8 Merge: 675ba773c6b31 a4e772898f8bf Author: Bjorn Helgaas Date: Fri Jul 19 10:10:23 2024 -0500 Merge branch 'pci/reset' - Warn about doing a Secondary Bus Reset without holding the device lock (Dan Williams) - Lock bridge in addition to downstream hierarchy before doing a Secondary Bus Reset (Dan Williams) * pci/reset: PCI: Add missing bridge lock to pci_bus_lock() PCI: Warn on missing cfg_access_lock during secondary bus reset commit 675ba773c6b3175b331db0933eea88346ec78d83 Merge: 5249048080f41 618b29a346979 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:23 2024 -0500 Merge branch 'pci/hotplug' - Detect if a device was removed or replaced during system sleep so we don't assume a new device is the one that used to be there. This uses Vendor/Device/Subsystem/Class/Revision and Device Serial Number (if implemented), so it's not fool-proof and drivers may know how to detect more cases (Lukas Wunner) - Add missing MODULE_DESCRIPTION() macro (Jeff Johnson) * pci/hotplug: PCI: acpiphp: Add missing MODULE_DESCRIPTION() macro PCI: pciehp: Detect device replacement during system sleep commit 5249048080f4144a32cdfa4be878482a5216bee6 Merge: 903a3b1eed540 75c47c790f43c Author: Bjorn Helgaas Date: Fri Jul 19 10:10:22 2024 -0500 Merge branch 'pci/err' - Disable AER and DPC during suspend so that if they share an interrupt with PME and errors occur during suspend, the AER or DPC interrupt doesn't cause spurious wakeups (Kai-Heng Feng) * pci/err: PCI/DPC: Disable DPC service on suspend PCI/AER: Disable AER service on suspend commit 903a3b1eed540d0e02ca8489638dcf92126c8946 Merge: 147ea50e1e050 7246a4520b4bf Author: Bjorn Helgaas Date: Fri Jul 19 10:10:22 2024 -0500 Merge branch 'pci/enumeration' - Move the PRESERVE_BOOT_CONFIG ACPI _DSM evaluation from drivers/acpi to drivers/pci so we can unify with similar DT functionality (Vidya Sagar) - Add of_pci_preserve_config() to check for a DT "linux,pci-probe-only" property on a per-host bridge basis in addition to a global basis (Vidya Sagar) - Unify ACPI PRESERVE_BOOT_CONFIG _DSM and DT "linux,pci-probe-only" in a generic pci_preserve_config() path (Vidya Sagar) * pci/enumeration: PCI: Use preserve_config in place of pci_flags PCI: Unify ACPI and DT 'preserve config' support PCI: of: Add of_pci_preserve_config() for per-host bridge support PCI: Move PRESERVE_BOOT_CONFIG _DSM evaluation to pci_register_host_bridge() commit 147ea50e1e0508544156b0465dc07fd8739281f4 Merge: 06bbe25c21a02 11a1f4bc47362 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:22 2024 -0500 Merge branch 'pci/dpc' - If there's a device below a bridge, prevent a use-after-free by holding a reference to the device while waiting for the secondary bus to be ready in case the device is concurrently removed, e.g., by DPC (Lukas Wunner) * pci/dpc: PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal commit 06bbe25c21a02ec09682be5077f22198870040e2 Merge: cb43487e5dc3e f00059b4c1b06 Author: Bjorn Helgaas Date: Fri Jul 19 10:10:21 2024 -0500 Merge branch 'pci/devres' - Add pcim_add_mapping_to_legacy_table() and pcim_remove_mapping_from_legacy_table() helper functions to simplify devres iomap table (Philipp Stanner) - Reimplement devres that take a bit mask of BARs in a way that can be used to map partial BARs as well as entire BARs (Philipp Stanner) - Deprecate pcim_iomap_table() and pcim_iomap_regions_request_all() in favor of pcim_* request plus pcim_* mapping (Philipp Stanner) - Add pcim_request_region(), a managed interface to request a single BAR (Philipp Stanner) - Use the existing pci_is_enabled() interface to replace the struct devres.enabled bit (Philipp Stanner) - Move the struct pci_devres.pinned bit to struct pci_dev (Philipp Stanner) - Reimplement pcim_set_mwi() so it uses its own devres cleanup callback instead of a special-purpose bit in struct pci_devres (Philipp Stanner) - Add pcim_intx(), which is unambiguously managed, unlike pci_intx(), which is managed if pcim_enable_device() has been called but unmanaged otherwise (Philipp Stanner) - Remove pcim_release(), which is no longer needed after previous cleanups of pcim_set_mwi() and pci_intx() (Philipp Stanner) - Add pcim_iomap_range(), a managed interface to map part of a BAR (Philipp Stanner) - Fix vboxvideo leak by using the new pcim_iomap_range() instead of the unmanaged pci_iomap_range() (Philipp Stanner) * pci/devres: drm/vboxvideo: fix mapping leaks PCI: Add managed pcim_iomap_range() PCI: Remove legacy pcim_release() PCI: Add managed pcim_intx() PCI: Give pcim_set_mwi() its own devres cleanup callback PCI: Move struct pci_devres.pinned bit to struct pci_dev PCI: Remove struct pci_devres.enabled status bit PCI: Document hybrid devres hazards PCI: Add managed pcim_request_region() PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all() PCI: Add managed partial-BAR request and map infrastructure PCI: Add devres helpers for iomap table PCI: Add and use devres helper for bit masks commit cb43487e5dc3efddc14c66938138b5908789be59 Merge: 1613e604df0cd 47c8846a49baa Author: Bjorn Helgaas Date: Fri Jul 19 10:10:21 2024 -0500 Merge branch 'pci/acs' - Add ACS quirk for Broadcom BCM5760X NIC, which doesn't allow peer-to-peer transactions between functions, but doesn't advertise ACS support (Ajit Khaparde) - Add "pci=config_acs=" kernel command-line parameter to relax default ACS settings to enable peer-to-peer configurations. Requires expert knowledge of topology and ACS operation (Vidya Sagar) * pci/acs: PCI: Extend ACS configurability PCI: Add ACS quirk for Broadcom BCM5760X NIC commit a4bbcac11d3cea85822af8b40daed7e96bca5068 Author: Huacai Chen Date: Wed Jun 12 14:53:15 2024 +0800 PCI: loongson: Enable MSI in LS7A Root Complex The LS7A chipset can be used as part of a PCIe Root Complex with Loongson-3C6000 and similar CPUs. In this case, DEV_LS7A_PCIE_PORT5 has a PCI_CLASS_BRIDGE_HOST class code, and it is a Type 0 Function whose config space provides access to Root Complex registers. The DEV_LS7A_PCIE_PORT5 has an MSI Capability, and its MSI Enable bit must be set before other devices below the Root Complex can use MSI. This is not the standard PCI behavior of MSI Enable, so the normal PCI MSI code does not set it. Set the DEV_LS7A_PCIE_PORT5 MSI Enable bit via a quirk so other devices below the Root Complex can use MSI. [kwilczynski: exit early to reduce indentation; commit log] Link: https://lore.kernel.org/linux-pci/20240612065315.2048110-1-chenhuacai@loongson.cn Signed-off-by: Sheng Wu Signed-off-by: Huacai Chen Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org commit a2d6d8aee4a4f694920bfaf6f6be3690e0f8d302 Author: Arnd Bergmann Date: Fri Jul 19 11:56:34 2024 +0200 ALSA: hda: tas2781: mark const variables as __maybe_unused An earlier patch changed the DECLARE_TLV_DB_SCALE declaration, but now there are additional static const variables that cause the same build warnings: In file included from sound/pci/hda/tas2781_hda_i2c.c:23: include/sound/tas2781-tlv.h:23:28: error: 'tas2563_dvc_table' defined but not used [-Werror=unused-const-variable=] 23 | static const unsigned char tas2563_dvc_table[][4] = { | ^~~~~~~~~~~~~~~~~ In file included from include/sound/tlv.h:10, from sound/pci/hda/tas2781_hda_i2c.c:22: include/sound/tas2781-tlv.h:20:35: error: 'tas2563_dvc_tlv' defined but not used [-Werror=unused-const-variable=] 20 | static const DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1); | ^~~~~~~~~~~~~~~ Mark them all as unused as well. Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20240719095640.3741247-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit 3ae08e47742eeebf2190900d31ddac53fdd13a5b Author: Arnd Bergmann Date: Fri Jul 19 16:44:10 2024 +0200 gpio: virtuser: avoid non-constant format string Using a string variable as an sprintf format is potentially dangerous, and gcc can warn about this: drivers/gpio/gpio-virtuser.c: In function 'gpio_virtuser_dbgfs_init_line_attrs': drivers/gpio/gpio-virtuser.c:808:9: error: format not a string literal and no format arguments [-Werror=format-security] 808 | sprintf(data->consumer, id); | ^~~~~~~ Change it to a simpler strscpy() instead to just copy it and check the destination buffer size. Fixes: 91581c4b3f29 ("gpio: virtuser: new virtual testing driver for the GPIO API") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240719144422.2082394-1-arnd@kernel.org Signed-off-by: Bartosz Golaszewski commit 74dba240881820b46b9b1c62ef4de3bfff47fbd4 Author: wangdicheng Date: Fri Jul 19 10:09:06 2024 +0800 ALSA: usb-audio: Fix microphone sound on HD webcam. I own an external usb Webcam, HD webcam, which had low mic volume and inconsistent sound quality. Video works as expected. (snip) [ 95.473820][ 1] [ T73] usb 5-2.2: new high-speed USB device number 7 using xhci_hcd [ 95.773974][ 1] [ T73] usb 5-2.2: New USB device found, idVendor=1bcf, idProduct=2281, bcdDevice= 0.05 [ 95.783445][ 1] [ T73] usb 5-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 95.791872][ 1] [ T73] usb 5-2.2: Product: HD webcam [ 95.797001][ 1] [ T73] usb 5-2.2: Manufacturer: Sunplus IT Co [ 95.802996][ 1] [ T73] usb 5-2.2: SerialNumber: 20200513 [ 96.092610][ 2] [ T3680] usb 5-2.2: Warning! Unlikely big volume range (=4096), cval->res is probably wrong. [ 96.102436][ 2] [ T3680] usb 5-2.2: [5] FU [Mic Capture Volume] ch = 1, val = 0/4096/1 Set up quirk cval->res to 16 for 256 levels, Set GET_SAMPLE_RATE quirk flag to stop trying to get the sample rate. Confirmed that happened anyway later due to the backoff mechanism, After 3 failures. All audio stream on device interfaces share the same values, apart from wMaxPacketSize and tSamFreq : bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 1 Audio Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 1 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 1 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0064 1x 100 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0x0000 (snip) Testing patch provides consistent good sound recording quality and volume range. (snip) [ 95.473820][ 1] [ T73] usb 5-2.2: new high-speed USB device number 7 using xhci_hcd [ 95.773974][ 1] [ T73] usb 5-2.2: New USB device found, idVendor=1bcf, idProduct=2281, bcdDevice= 0.05 [ 95.783445][ 1] [ T73] usb 5-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 95.791872][ 1] [ T73] usb 5-2.2: Product: HD webcam [ 95.797001][ 1] [ T73] usb 5-2.2: Manufacturer: Sunplus IT Co [ 95.802996][ 1] [ T73] usb 5-2.2: SerialNumber: 20200513 [ 96.110630][ 3] [ T3680] usbcore: registered new interface driver snd-usb-audio [ 96.114329][ 7] [ T3677] usb 5-2.2: Found UVC 1.00 device HD webcam (1bcf:2281) [ 96.167555][ 7] [ T3677] usbcore: registered new interface driver uvcvideo Signed-off-by: wangdicheng Cc: Link: https://patch.msgid.link/20240719020906.8078-1-wangdich9700@163.com Signed-off-by: Takashi Iwai commit 4359836129d931fc424370249a1fcdec139fe407 Author: Jakub Kicinski Date: Wed Jul 17 09:15:59 2024 -0700 eth: fbnic: don't build the driver when skb has more than 21 frags Similarly to commit 0e03c643dc93 ("eth: fbnic: fix s390 build."), the driver won't build if skb_shared_info has more than 25 frags assuming a 64B cache line and 21 frags assuming a 128B cache line. (512 - 48 - 64) / 16 = 25 (512 - 48 - 128) / 16 = 21 Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free") Signed-off-by: Jakub Kicinski Link: https://patch.msgid.link/20240717161600.1291544-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 785280973472dbdee2c31cb740633c4b6460a8ee Author: Arnd Bergmann Date: Fri Jul 19 12:54:22 2024 +0200 sunrpc: avoid -Wformat-security warning Using a non-constant string as an sprintf-style is potentially dangerous: net/sunrpc/svc.c: In function 'param_get_pool_mode': net/sunrpc/svc.c:164:32: error: format not a string literal and no format arguments [-Werror=format-security] Use a literal "%s" format instead. Fixes: 5f71f3c32553 ("sunrpc: refactor pool_mode setting code") Signed-off-by: Arnd Bergmann Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit b57d5ffc3ab507d0e19fc8b90b19c76af43fb790 Author: Greg Kroah-Hartman Date: Fri Jul 12 11:39:17 2024 +0200 ARM: sa1100: make match function take a const pointer In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match callback for busses was changed to take a const pointer to struct device_driver. Unfortunately I missed fixing up the sa1111 code, and was only noticed after-the-fact by the kernel test robot. Resolve this issue by properly changing the sa111_match() function. Cc: Russell King Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20240712093916.2121096-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7f1c4909a821dbfd258177db9ec96dda3ae91346 Author: Masatake YAMATO Date: Wed Jul 17 04:05:59 2024 +0900 dm vdo: fix a minor formatting issue in vdo.rst Signed-off-by: Masatake YAMATO Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit 513789b7fb5366a7c26c9d347d83eaba6c33a537 Author: Matthew Sakai Date: Mon Jul 15 10:43:39 2024 -0400 dm vdo int-map: fix kerneldoc formatting Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407141607.M3E2XQ0Z-lkp@intel.com/ Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit fa398e603ff79523ac5f40632f061396baa58593 Author: Matthew Sakai Date: Mon Jul 15 12:45:15 2024 -0400 dm vdo repair: add missing kerneldoc fields Also remove trivial comment for increment_recovery_point. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9518 Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit 0b60be1628e3448fc96e28bde3d0b27e6d8743fc Author: Christophe JAILLET Date: Sun Jul 14 09:13:56 2024 +0200 dm: Constify struct dm_block_validator 'struct dm_block_validator' are 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 32047 920 16 32983 80d7 drivers/md/dm-cache-metadata.o After: ===== text data bss dec hex filename 32075 896 16 32987 80db drivers/md/dm-cache-metadata.o Signed-off-by: Christophe JAILLET Signed-off-by: Mikulas Patocka commit fb0987682c629c1d2c476f35f6fde405a5e304a4 Author: Mikulas Patocka Date: Wed Jul 10 21:00:18 2024 +0200 dm-integrity: introduce the Inline mode This commit introduces a new 'I' mode for dm-integrity. The 'I' mode may be selected if the underlying device has non-power-of-2 sector size. In this mode, dm-integrity will store integrity data directly in device's sectors and it will not use journal. This mode improves performance and reduces flash wear because there would be no journal writes. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 1a8c67a8b21e26843d5641c55f48130b3e323ce8 Author: Arnd Bergmann Date: Fri Jul 19 09:27:47 2024 +0200 arm64: qcom: don't select HAVE_PWRCTL when PCI=n The new HAVE_PWRCTL option is defined in the PCI subsystem, so selecting it unconditionally when PCI is disabled causes a harmless warning: WARNING: unmet direct dependencies detected for HAVE_PWRCTL Depends on [n]: PCI [=n] Selected by [y]: - ARCH_QCOM [=y] Add 'if PCI' in the qualcomm platform to hide the warning. Fixes: ed70aaac7c35 ("Kconfig: reduce the amount of power sequencing noise") Signed-off-by: Arnd Bergmann Signed-off-by: Bartosz Golaszewski commit 12c35c5582acb0fd8f7713ffa75f450766022ff1 Author: Jammy Huang Date: Thu Jul 18 11:03:52 2024 +0800 drm/ast: Fix black screen after resume Suspend will disable pcie device. Thus, resume should do full hw initialization again. Add some APIs to ast_drm_thaw() before ast_post_gpu() to fix the issue. v2: - fix function-call arguments Fixes: 5b71707dd13c ("drm/ast: Enable and unlock device access early during init") Reported-by: Cary Garrett Closes: https://lore.kernel.org/dri-devel/8ce1e1cc351153a890b65e62fed93b54ccd43f6a.camel@gmail.com/ Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v6.6+ Signed-off-by: Jammy Huang Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240718030352.654155-1-jammy_huang@aspeedtech.com commit 5c28424e9a348f95e3c634fe2ed6da8af29cc870 Author: Masami Hiramatsu (Google) Date: Fri Jul 19 14:35:51 2024 +0900 syscalls: Fix to add sys_uretprobe to syscall.tbl Add sys_uretprobe entry to scripts/syscall.tbl as same as arch/x86/entry/syscalls/syscall_64.tbl. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20240719102824.1e086a40@canb.auug.org.au/ Fixes: 63ded110979b ("uprobe: Change uretprobe syscall scope and number") Signed-off-by: Masami Hiramatsu (Google) commit 28e8b7406d3a1f5329a03aa25a43aa28e087cb20 Author: Lance Richardson Date: Thu Jul 18 14:38:24 2024 +0000 dma: fix call order in dmam_free_coherent dmam_free_coherent() frees a DMA allocation, which makes the freed vaddr available for reuse, then calls devres_destroy() to remove and free the data structure used to track the DMA allocation. Between the two calls, it is possible for a concurrent task to make an allocation with the same vaddr and add it to the devres list. If this happens, there will be two entries in the devres list with the same vaddr and devres_destroy() can free the wrong entry, triggering the WARN_ON() in dmam_match. Fix by destroying the devres entry before freeing the DMA allocation. Tested: kokonut //net/encryption http://sponge2/b9145fe6-0f72-4325-ac2f-a84d81075b03 Fixes: 9ac7849e35f7 ("devres: device resource management") Signed-off-by: Lance Richardson Signed-off-by: Christoph Hellwig commit 2fa88b191929d3115ccda098071b34922957bb08 Author: Kent Overstreet Date: Wed Jul 17 11:56:05 2024 -0400 bcachefs: kill btree_trans_too_many_iters() in bch2_bucket_alloc_freelist() When we're called via trans commit -> btree split -> allocator We may have already arbitrarily many btree_paths, for the transaction commit we're trying to do; when this happens, the btree_trans_too_many_iters() call causes us to livelock. Since the allocator calls btree_iter_dontneed to release paths as it iterates, this shouldn't cause any problems. Signed-off-by: Kent Overstreet commit 720261cfc7329406a50c2a8536e0039b9dd9a4e5 Merge: 4f40c636b291d a97b43fac5b9b Author: Linus Torvalds Date: Thu Jul 18 17:27:43 2024 -0700 Merge tag 'bcachefs-2024-07-18.2' of https://evilpiepirate.org/git/bcachefs Pull bcachefs updates from Kent Overstreet: - Metadata version 1.8: Stripe sectors accounting, BCH_DATA_unstriped This splits out the accounting of dirty sectors and stripe sectors in alloc keys; this lets us see stripe buckets that still have unstriped data in them. This is needed for ensuring that erasure coding is working correctly, as well as completing stripe creation after a crash. - Metadata version 1.9: Disk accounting rewrite The previous disk accounting scheme relied heavily on percpu counters that were also sharded by outstanding journal buffer; it was fast but not extensible or scalable, and meant that all accounting counters were recorded in every journal entry. The new disk accounting scheme stores accounting as normal btree keys; updates are deltas until they are flushed by the btree write buffer. This means we have no practical limit on the number of counters, and a new tagged union format that's easy to extend. We now have counters for compression type/ratio, per-snapshot-id usage, per-btree-id usage, and pending rebalance work. - Self healing on read IO/checksum error Data is now automatically rewritten if we get a read error and then a successful retry - Mount API conversion (thanks to Thomas Bertschinger) - Better lockdep coverage Previously, btree node locks were tracked individually by lockdep, like any other lock. But we may take _many_ btree node locks simultaneously, we easily blow through the limit of 48 locks that lockdep can track, leading to lockdep turning itself off. Tracking each btree node lock individually isn't really necessary since we have our own cycle detector for deadlock avoidance and centralized tracking of btree node locks, so we now have a single lockdep_map in btree_trans for "any btree nodes are locked". - Some more small incremental work towards online check_allocations - Lots more debugging improvements - Fixes, including: - undefined behaviour fixes, originally noted as breaking userspace LTO builds - fix a spurious warning in fsck_err, reported by Marcin - fix an integer overflow on trans->nr_updates, also reported by Marcin; this broke during deletion of highly fragmented indirect extents * tag 'bcachefs-2024-07-18.2' of https://evilpiepirate.org/git/bcachefs: (120 commits) lockdep: Add comments for lockdep_set_no{validate,track}_class() bcachefs: Fix integer overflow on trans->nr_updates bcachefs: silence silly kdoc warning bcachefs: Fix fsck warning about btree_trans not passed to fsck error bcachefs: Add an error message for insufficient rw journal devs bcachefs: varint: Avoid left-shift of a negative value bcachefs: darray: Don't pass NULL to memcpy() bcachefs: Kill bch2_assert_btree_nodes_not_locked() bcachefs: Rename BCH_WRITE_DONE -> BCH_WRITE_SUBMITTED bcachefs: __bch2_read(): call trans_begin() on every loop iter bcachefs: show none if label is not set bcachefs: drop packed, aligned from bkey_inode_buf bcachefs: btree node scan: fall back to comparing by journal seq bcachefs: Add lockdep support for btree node locks lockdep: lockdep_set_notrack_class() bcachefs: Improve copygc_wait_to_text() bcachefs: Convert clock code to u64s bcachefs: Improve startup message bcachefs: Self healing on read IO error bcachefs: Make read_only a mount option again, but hidden ... commit 4f40c636b291deeae7d1f4c9fb5db5f0aac54267 Merge: 51ed42a8a1355 b9fae9f06d84f Author: Linus Torvalds Date: Thu Jul 18 17:17:30 2024 -0700 Merge tag 'nfs-for-6.11-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "New Features: - Add support for large folios - Implement rpcrdma generic device removal notification - Add client support for attribute delegations - Use a LAYOUTRETURN during reboot recovery to report layoutstats and errors - Improve throughput for random buffered writes - Add NVMe support to pnfs/blocklayout Bugfixes: - Fix rpcrdma_reqs_reset() - Avoid soft lockups when using UDP - Fix an nfs/blocklayout premature PR key unregestration - Another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server - Do not extend writes to the entire folio - Pass explicit offset and count values to tracepoints - Fix a race to wake up sleeping SUNRPC sync tasks - Fix gss_status tracepoint output Cleanups: - Add missing MODULE_DESCRIPTION() macros - Add blocklayout / SCSI layout tracepoints - Remove asm-generic headers from xprtrdma verbs.c - Remove unused 'struct mnt_fhstatus' - Other delegation related cleanups - Other folio related cleanups - Other pNFS related cleanups - Other xprtrdma cleanups" * tag 'nfs-for-6.11-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (63 commits) SUNRPC: Fixup gss_status tracepoint error output SUNRPC: Fix a race to wake a sync task nfs: split nfs_read_folio nfs: pass explicit offset/count to trace events nfs: do not extend writes to the entire folio nfs/blocklayout: add support for NVMe nfs: remove nfs_page_length nfs: remove the unused max_deviceinfo_size field from struct pnfs_layoutdriver_type nfs: don't reuse partially completed requests in nfs_lock_and_join_requests nfs: move nfs_wait_on_request to write.c nfs: fold nfs_page_group_lock_subrequests into nfs_lock_and_join_requests nfs: fold nfs_folio_find_and_lock_request into nfs_lock_and_join_requests nfs: simplify nfs_folio_find_and_lock_request nfs: remove nfs_folio_private_request nfs: remove dead code for the old swap over NFS implementation NFSv4.1 another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server nfs: Block on write congestion nfs: Properly initialize server->writeback nfs: Drop pointless check from nfs_commit_release_pages() nfs/blocklayout: SCSI layout trace points for reservation key reg/unreg ... commit 51ed42a8a135511f6d6f75b56e85e6586a06a93c Merge: dddebdece62ea f9ca51596bbfd Author: Linus Torvalds Date: Thu Jul 18 17:03:42 2024 -0700 Merge tag 'ext4_for_linus-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Many cleanups and bug fixes in ext4, especially for the fast commit feature. Also some performance improvements; in particular, improving IOPS and throughput on fast devices running Async Direct I/O by up to 20% by optimizing jbd2_transaction_committed()" * tag 'ext4_for_linus-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits) ext4: make sure the first directory block is not a hole ext4: check dot and dotdot of dx_root before making dir indexed ext4: sanity check for NULL pointer after ext4_force_shutdown jbd2: increase maximum transaction size jbd2: drop pointless shrinker batch initialization jbd2: avoid infinite transaction commit loop jbd2: precompute number of transaction descriptor blocks jbd2: make jbd2_journal_get_max_txn_bufs() internal jbd2: avoid mount failed when commit block is partial submitted ext4: avoid writing unitialized memory to disk in EA inodes ext4: don't track ranges in fast_commit if inode has inlined data ext4: fix possible tid_t sequence overflows ext4: use ext4_update_inode_fsync_trans() helper in inode creation ext4: add missing MODULE_DESCRIPTION() jbd2: add missing MODULE_DESCRIPTION() ext4: use memtostr_pad() for s_volume_name jbd2: speed up jbd2_transaction_committed() ext4: make ext4_da_map_blocks() buffer_head unaware ext4: make ext4_insert_delayed_block() insert multi-blocks ext4: factor out a helper to check the cluster allocation state ... commit dddebdece62ead1ac1112e6df375f56a1cb45f84 Merge: cf05e93af423b 280e36f0d5b99 Author: Linus Torvalds Date: Thu Jul 18 16:59:02 2024 -0700 Merge tag 'vfs-6.11-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix a missing rcu_read_unlock() in nsfs by switching to a cleanup guard - Add missing module descriptor for adfs * tag 'vfs-6.11-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: nsfs: use cleanup guard fs/adfs: add MODULE_DESCRIPTION commit cf05e93af423b225fb3e3237e7d46493c7909f2b Merge: 7dd894c1bf65a 702418f7559fb Author: Linus Torvalds Date: Thu Jul 18 15:54:16 2024 -0700 Merge tag 'docs-6.11' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "Nothing hugely exciting happening in the documentation tree this time around, mostly more of the usual: - More Spanish, Italian, and Chinese translations - A new script, scripts/checktransupdate.py, can be used to see which commits have touched an (English) document since a given translation was last updated. - A couple of "best practices" suggestions (on Link: tags and off-list discussions) that were not entirely at consensus level, but I concluded they were close enough to accept. - Some nice cleanups removing documentation for kernel parameters that have not been recognized for ... a long time. ...along with the usual updates, typo fixes, and such" * tag 'docs-6.11' of git://git.lwn.net/linux: (57 commits) Documentation: Document user_events ioctl code docs/pinctrl: fix typo in mapping example docs: maintainer: discourage taking conversations off-list docs: driver-model: platform: update the definition of platform_driver docs/sp_SP: Add translation for scheduler/sched-design-CFS.rst writing_musb_glue_layer.rst: Fix broken URL zh_CN/admin-guide: one typo fix docs/zh_CN/virt: Update the translation of guest-halt-polling.rst Documentation: add reference from dynamic debug to loglevel kernel params Documentation: best practices for using Link trailers Documentation: fix links to mailing list services Documentation: exception-tables.rst: Fix the wrong steps referenced docs/zh_CN: add process/researcher-guidelines Chinese translation Documentation/tools/rv: fix document header docs/sp_SP: Add translation of process/maintainer-kvm-x86.rst docs/admin-guide/mm: correct typo 'quired' to 'queried' Add libps2 to the input section of driver-api Docs/mm/index: move allocation profiling document to unsorted documents chapter Docs/mm/index: rename 'Legacy Documentation' to 'Unsorted Documentation' Docs/mm/index: Remove 'Memory Management Guide' chapter marker ... commit 7dd894c1bf65a9591ba27f6175cf3238748deb47 Merge: 1c7d0c3af5cc8 a3da15389112a Author: Linus Torvalds Date: Thu Jul 18 15:48:41 2024 -0700 Merge tag 'sparc-for-6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc Pull sparc updates from Andreas Larsson: - Add MODULE_DESCRIPTION for a number of sbus drivers - Fix linking error for large sparc32 kernels - Fix incorrect functions signature and prototype warnings for sparc64 * tag 'sparc-for-6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc: sparc64: Fix prototype warnings in hibernate.c sparc64: Fix prototype warning for prom_get_mmu_ihandle sparc64: Fix incorrect function signature and add prototype for prom_cif_init sparc64: Fix prototype warnings for floppy_64.h sparc32: Fix truncated relocation errors when linking large kernels sbus: add missing MODULE_DESCRIPTION() macros commit 1c7d0c3af5cc8adafef6477f9416820fc894ca40 Merge: dde1a0e1625c0 df39038cd8952 Author: Linus Torvalds Date: Thu Jul 18 15:41:45 2024 -0700 Merge tag 's390-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Remove restrictions on PAI NNPA and crypto counters, enabling concurrent per-task and system-wide sampling and counting events - Switch to GENERIC_CPU_DEVICES by setting up the CPU present mask in the architecture code and letting the generic code handle CPU bring-up - Add support for the diag204 busy indication facility to prevent undesirable blocking during hypervisor logical CPU utilization queries. Implement results caching - Improve the handling of Store Data SCLP events by suppressing unnecessary warning, preventing buffer release in I/O during failures, and adding timeout handling for Store Data requests to address potential firmware issues - Provide optimized __arch_hweight*() implementations - Remove the unnecessary CPU KOBJ_CHANGE uevents generated during topology updates, as they are unused and also not present on other architectures - Cleanup atomic_ops, optimize __atomic_set() for small values and __atomic_cmpxchg_bool() for compilers supporting flag output constraint - Couple of cleanups for KVM: - Move and improve KVM struct definitions for DAT tables from gaccess.c to a new header - Pass the asce as parameter to sie64a() - Make the crdte() and cspg() page table handling wrappers return a boolean to indicate success, like the other existing "compare and swap" wrappers - Add documentation for HWCAP flags - Switch to obtaining total RAM pages from memblock instead of totalram_pages() during mm init, to ensure correct calculation of zero page size, when defer_init is enabled - Refactor lowcore access and switch to using the get_lowcore() function instead of the S390_lowcore macro - Cleanups for PG_arch_1 and folio handling in UV and hugetlb code - Add missing MODULE_DESCRIPTION() macros - Fix VM_FAULT_HWPOISON handling in do_exception() * tag 's390-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (54 commits) s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception() s390/kvm: Move bitfields for dat tables s390/entry: Pass the asce as parameter to sie64a() s390/sthyi: Use cached data when diag is busy s390/sthyi: Move diag operations s390/hypfs_diag: Diag204 busy loop s390/diag: Add busy-indication-facility requirements s390/diag: Diag204 add busy return errno s390/diag: Return errno's from diag204 s390/sclp: Diag204 busy indication facility detection s390/atomic_ops: Make use of flag output constraint s390/atomic_ops: Improve __atomic_set() for small values s390/atomic_ops: Use symbolic names s390/smp: Switch to GENERIC_CPU_DEVICES s390/hwcaps: Add documentation for HWCAP flags s390/pgtable: Make crdte() and cspg() return a value s390/topology: Remove CPU KOBJ_CHANGE uevents s390/sclp: Add timeout to Store Data requests s390/sclp: Prevent release of buffer in I/O s390/sclp: Suppress unnecessary Store Data warning ... commit 73f88592dd1bef38542024ef8223599afc2c41bb Author: Tavian Barnes Date: Fri Jun 21 16:38:44 2024 -0400 bcachefs: mean_and_variance: Avoid too-large shift amounts Shifting a value by the width of its type or more is undefined. Signed-off-by: Tavian Barnes Signed-off-by: Kent Overstreet commit a97b43fac5b9b3ffca71b8a917a249789902fce9 Author: Kent Overstreet Date: Thu Jul 18 17:17:10 2024 -0400 lockdep: Add comments for lockdep_set_no{validate,track}_class() Cc: Waiman Long Signed-off-by: Kent Overstreet commit 6f719cbe0c8b3b8a14b403b9e60fdb565fd829fe Author: Kent Overstreet Date: Tue Jul 16 20:20:21 2024 -0400 bcachefs: Fix integer overflow on trans->nr_updates We can't have more updates than paths, so btree_path_idx_t is the correct type to use. Signed-off-by: Kent Overstreet commit f05a0b9c73bc1728b130ac8d1d76b7bbf3f0241d Author: Kent Overstreet Date: Tue Jul 16 16:43:59 2024 -0400 bcachefs: silence silly kdoc warning Signed-off-by: Kent Overstreet commit 2c4c17fefc49e895e322b3ab0f49d946f384f71b Author: Kent Overstreet Date: Mon Jul 15 19:03:17 2024 -0400 bcachefs: Fix fsck warning about btree_trans not passed to fsck error If a btree_trans is in use it's supposed to be passed to fsck_err so that it can be unlocked if we're waiting on userspace input; but the btree IO paths do call fsck errors where a btree_trans exists on the stack but it's not passed through. But it's ok, because it's unlocked while doing IO. Fixes: a850bde6498b ("bcachefs: fsck_err() may now take a btree_trans") Signed-off-by: Kent Overstreet commit f12410bb7dddc64b58cbd6fca224b82ff40c5807 Author: Kent Overstreet Date: Mon Jul 15 16:30:44 2024 -0400 bcachefs: Add an error message for insufficient rw journal devs This causes us to go read-only - need an error message saying why. Signed-off-by: Kent Overstreet commit ee1b8dc17ac367f3fbea18fee4f7825eb11eb757 Author: Tavian Barnes Date: Fri Jun 21 16:39:58 2024 -0400 bcachefs: varint: Avoid left-shift of a negative value Shifting a negative value left is undefined. Signed-off-by: Tavian Barnes Signed-off-by: Kent Overstreet commit dde1a0e1625c08cf4f958348a83434b2ddecf449 Merge: 76d9b92e68f2b 47ff30cc1be7b Author: Linus Torvalds Date: Thu Jul 18 15:24:59 2024 -0700 Merge tag 'x86-percpu-2024-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 percpu updates from Ingo Molnar: - Enable the named address spaces based percpu accessors optimization on all GCC versions that contain this feature, detected through a build-time testcase. This effectively enables the feature on GCC 6, GCC 7 and GCC 8 versions. - Fix operand constraint modifier in __raw_cpu_write() - Reorganize the per-CPU headers for better readability - Misc cleanups and fixes * tag 'x86-percpu-2024-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/percpu: Enable named address spaces for all capable GCC versions x86/percpu: Clean up vertical alignment details x86/percpu: Clean up a bit x86/percpu: Move some percpu accessors around to reduce ifdeffery x86/percpu: Rename percpu_stable_op() to __raw_cpu_read_stable() x86/percpu: Fix operand constraint modifier in __raw_cpu_write() x86/percpu: Introduce the __raw_cpu_read_const() macro x86/percpu: Unify percpu read-write accessors x86/percpu: Move some percpu macros around for readability x86/percpu: Introduce the pcpu_binary_op() macro commit 76d9b92e68f2bb55890f935c5143f4fef97a935d Merge: b2fc97c18614f 436381eaf2a42 Author: Linus Torvalds Date: Thu Jul 18 15:08:12 2024 -0700 Merge tag 'slab-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: "The most prominent change this time is the kmem_buckets based hardening of kmalloc() allocations from Kees Cook. We have also extended the kmalloc() alignment guarantees for non-power-of-two sizes in a way that benefits rust. The rest are various cleanups and non-critical fixups. - Dedicated bucket allocator (Kees Cook) This series [1] enhances the probabilistic defense against heap spraying/grooming of CONFIG_RANDOM_KMALLOC_CACHES from last year. kmalloc() users that are known to be useful for exploits can get completely separate set of kmalloc caches that can't be shared with other users. The first converted users are alloc_msg() and memdup_user(). The hardening is enabled by CONFIG_SLAB_BUCKETS. - Extended kmalloc() alignment guarantees (Vlastimil Babka) For years now we have guaranteed natural alignment for power-of-two allocations, but nothing was defined for other sizes (in practice, we have two such buckets, kmalloc-96 and kmalloc-192). To avoid unnecessary padding in the rust layer due to its alignment rules, extend the guarantee so that the alignment is at least the largest power-of-two divisor of the requested size. This fits what rust needs, is a superset of the existing power-of-two guarantee, and does not in practice change the layout (and thus does not add overhead due to padding) of the kmalloc-96 and kmalloc-192 caches, unless slab debugging is enabled for them. - Cleanups and non-critical fixups (Chengming Zhou, Suren Baghdasaryan, Matthew Willcox, Alex Shi, and Vlastimil Babka) Various tweaks related to the new alloc profiling code, folio conversion, debugging and more leftovers after SLAB" Link: https://lore.kernel.org/all/20240701190152.it.631-kees@kernel.org/ [1] * tag 'slab-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/memcg: alignment memcg_data define condition mm, slab: move prepare_slab_obj_exts_hook under CONFIG_MEM_ALLOC_PROFILING mm, slab: move allocation tagging code in the alloc path into a hook mm/util: Use dedicated slab buckets for memdup_user() ipc, msg: Use dedicated slab buckets for alloc_msg() mm/slab: Introduce kmem_buckets_create() and family mm/slab: Introduce kvmalloc_buckets_node() that can take kmem_buckets argument mm/slab: Plumb kmem_buckets into __do_kmalloc_node() mm/slab: Introduce kmem_buckets typedef slab, rust: extend kmalloc() alignment guarantees to remove Rust padding slab: delete useless RED_INACTIVE and RED_ACTIVE slab: don't put freepointer outside of object if only orig_size slab: make check_object() more consistent mm: Reduce the number of slab->folio casts mm, slab: don't wrap internal functions with alloc_hooks() commit b2fc97c18614f99179700be263ecbc667c91a4e8 Merge: 68b59730459e5 9364a7e40d54e Author: Linus Torvalds Date: Thu Jul 18 14:48:11 2024 -0700 Merge tag 'memblock-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock updates from Mike Rapoport: - 'reserve_mem' command line parameter to allow creation of named memory reservation at boot time. The driving use-case is to improve the ability of pstore to retain ramoops data across reboots. - cleanups and small improvements in memblock and mm_init - new tests cases in memblock test suite * tag 'memblock-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock tests: fix implicit declaration of function 'numa_valid_node' memblock: Move late alloc warning down to phys alloc pstore/ramoops: Add ramoops.mem_name= command line option mm/memblock: Add "reserve_mem" to reserved named memory at boot up mm/mm_init.c: don't initialize page->lru again mm/mm_init.c: not always search next deferred_init_pfn from very beginning mm/mm_init.c: use deferred_init_mem_pfn_range_in_zone() to decide loop condition mm/mm_init.c: get the highest zone directly mm/mm_init.c: move nr_initialised reset down a bit mm/memblock: fix a typo in description of for_each_mem_region() mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn mm/memblock: use PAGE_ALIGN_DOWN to get pgend in free_memmap mm/memblock: return true directly on finding overlap region memblock tests: add memblock_overlaps_region_checks mm/memblock: fix comment for memblock_isolate_range() memblock tests: add memblock_reserve_many_may_conflict_check() memblock tests: add memblock_reserve_all_locations_check() mm/memblock: remove empty dummy entry commit 68b59730459e5d1fe4e0bbeb04ceb9df0f002270 Merge: f669aac34c5f7 7a2fb5619cc1f Author: Linus Torvalds Date: Thu Jul 18 14:16:35 2024 -0700 Merge tag 'perf-tools-for-v6.11-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools updates from Namhyung Kim: "Build: - Build each directory as a library so that depedency check for the python extension module can be automatic - Use pkg-config to check libtraceevent and libtracefs perf sched: - Add --task-name and --fuzzy-name options for `perf sched map` It focuses on selected tasks only by removing unrelated tasks in the output. It matches the task comm with the given string and the --fuzzy-name option allows the partial matching: $ sudo perf sched record -a sleep 1 $ sudo perf sched map --task-name kworker --fuzzy-name . . . . - *A0 . . 481065.315131 secs A0 => kworker/5:2-i91:438521 . . . . - *- . . 481065.315160 secs *B0 . . . - . . . 481065.316435 secs B0 => kworker/0:0-i91:437860 *- . . . . . . . 481065.316441 secs . . . . . *A0 . . 481065.318703 secs . . . . . *- . . 481065.318717 secs . . *C0 . . . . . 481065.320544 secs C0 => kworker/u16:30-:430186 . . *- . . . . . 481065.320555 secs . . *D0 . . . . . 481065.328524 secs D0 => kworker/2:0-kdm:429654 *B0 . D0 . - . . . 481065.328527 secs *- . D0 . - . . . 481065.328535 secs . . *- . . . . . 481065.328535 secs - Fix -r/--repeat option of perf sched replay The documentation said -1 will work as infinity but it didn't accept the value. Update the code and document to use 0 instead - Fix perf sched timehist to account the delay time for preempted tasks Perf event filtering: - perf top gained filtering support on regular events using BPF like perf record. Previously it was able to use it for tracepoints only - The BPF filter now supports filtering by UID/GID. This should be preferred than -u option as it's racy to scan /proc to check tasks for the user and fails to open an event for the task if it's already gone $ sudo perf top -e cycles --filter "uid == $(id -u)" perf report: - Skip dummy events in the group output by default. The --skip-empty option controls display of empty events without samples. But perf report can force display all events in a group In this case, auto-added a dummy event (for a system-wide record) ends up in the output. Now it can skip those empty events even in the group display mode To preserve the old behavior, run this: $ perf report --group --no-skip-empty perf stat: - Choose the most disaggregate option when multiple aggregation options are given. It used to pick the last option in the command line but it can be confusing and not consistent. Now it'll choose the smallest unit For example, it'd aggregate the result per-core when the user gave both --per-socket and --per-core options at the same time Internals: - Fix `perf bench` when some CPUs are offline - Fix handling of JIT symbol mappings to accept "/tmp/perf-${PID}.map patterns only so that it can not be confused by other /tmp/perf-* files - Many improvements and fixes for `perf test` Others: - Support some new instructions for Intel-PT - Fix syscall ID mapping in perf trace - Document AMD IBS PMU usages - Change `perf lock info` to show map and thread info by default Vendor JSON events: - Update Intel events and metrics - Add i.MX9[35] DDR metrics" * tag 'perf-tools-for-v6.11-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (125 commits) perf trace: Fix iteration of syscall ids in syscalltbl->entries perf dso: Fix address sanitizer build perf mem: Warn if memory events are not supported on all CPUs perf arm-spe: Support multiple Arm SPE PMUs perf build x86: Fix SC2034 error in syscalltbl.sh perf record: Fix memset out-of-range error perf sched map: Add --fuzzy-name option for fuzzy matching in task names perf sched map: Add support for multiple task names using CSV perf sched map: Add task-name option to filter the output map perf build: Conditionally add feature check flags for libtrace{event,fs} perf install: Don't propagate subdir to Documentation submake perf vendor events arm64:: Add i.MX95 DDR Performance Monitor metrics perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics perf dsos: When adding a dso into sorted dsos maintain the sort order perf comm str: Avoid sort during insert perf report: Calling available function for stats printing perf intel-pt: Fix exclude_guest setting perf intel-pt: Fix aux_watermark calculation for 64-bit size perf sched replay: Fix -r/--repeat command line option for infinity perf: pmus: Remove unneeded semicolon ... commit f669aac34c5f76b58e6cad1fef0643e5ae16d413 Merge: 1777e471e11da 5f7c72df1ba6b Author: Linus Torvalds Date: Thu Jul 18 14:08:42 2024 -0700 Merge tag 'trace-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing CREDITS file update from Steven Rostedt: "Update of MAINTAINERS and CREDITS file - Update Daniel Bristot de Oliveira's entry in MAINTAINERS with respect to his tracing code. - Add more credits to him in CREDITS file and move his entry to be alphabetical" * tag 'trace-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Update MAINTAINERS file commit ae835a96d72cd025421910edb0e8faf706998727 Author: Ard Biesheuvel Date: Fri Mar 22 18:11:32 2024 +0100 x86/efistub: Revert to heap allocated boot_params for PE entrypoint This is a partial revert of commit 8117961d98f ("x86/efi: Disregard setup header of loaded image") which triggers boot issues on older Dell laptops. As it turns out, switching back to a heap allocation for the struct boot_params constructed by the EFI stub works around this, even though it is unclear why. Cc: Christian Heusel Reported-by: Signed-off-by: Ard Biesheuvel commit 1777e471e11da7cba3db8dfa82822dcef6fd7794 Merge: 70045bfc4cd5f 28beb730ee167 Author: Linus Torvalds Date: Thu Jul 18 14:01:37 2024 -0700 Merge tag 'trace-tools-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing tools updates from Steven Rostedt: "Trivial updates for 6.11: - Use pretty formatting only on interactive tty in rtla/osnoise - Better reporting when histogram is empty in rtla/osnoise - Use the correct library name for "libtracefs" in feature detection" * tag 'trace-tools-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tools: build: use correct lib name for libtracefs feature detection rtla/osnoise: Better report when histogram is empty rtla/osnoise: Use pretty formatting only on interactive tty commit 70045bfc4cd5fef44ada25fa3367329eba98731a Merge: 2fd4130e53db0 b576d375b5365 Author: Linus Torvalds Date: Thu Jul 18 13:36:33 2024 -0700 Merge tag 'ftrace-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull ftrace updates from Steven Rostedt: "Rewrite of function graph tracer to allow multiple users Up until now, the function graph tracer could only have a single user attached to it. If another user tried to attach to the function graph tracer while one was already attached, it would fail. Allowing function graph tracer to have more than one user has been asked for since 2009, but it required a rewrite to the logic to pull it off so it never happened. Until now! There's three systems that trace the return of a function. That is kretprobes, function graph tracer, and BPF. kretprobes and function graph tracing both do it similarly. The difference is that kretprobes uses a shadow stack per callback and function graph tracer creates a shadow stack for all tasks. The function graph tracer method makes it possible to trace the return of all functions. As kretprobes now needs that feature too, allowing it to use function graph tracer was needed. BPF also wants to trace the return of many probes and its method doesn't scale either. Having it use function graph tracer would improve that. By allowing function graph tracer to have multiple users allows both kretprobes and BPF to use function graph tracer in these cases. This will allow kretprobes code to be removed in the future as it's version will no longer be needed. Note, function graph tracer is only limited to 16 simultaneous users, due to shadow stack size and allocated slots" * tag 'ftrace-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (49 commits) fgraph: Use str_plural() in test_graph_storage_single() function_graph: Add READ_ONCE() when accessing fgraph_array[] ftrace: Add missing kerneldoc parameters to unregister_ftrace_direct() function_graph: Everyone uses HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, remove it function_graph: Fix up ftrace_graph_ret_addr() function_graph: Make fgraph_update_pid_func() a stub for !DYNAMIC_FTRACE function_graph: Rename BYTE_NUMBER to CHAR_NUMBER in selftests fgraph: Remove some unused functions ftrace: Hide one more entry in stack trace when ftrace_pid is enabled function_graph: Do not update pid func if CONFIG_DYNAMIC_FTRACE not enabled function_graph: Make fgraph_do_direct static key static ftrace: Fix prototypes for ftrace_startup/shutdown_subops() ftrace: Assign RCU list variable with rcu_assign_ptr() ftrace: Assign ftrace_list_end to ftrace_ops_list type cast to RCU ftrace: Declare function_trace_op in header to quiet sparse warning ftrace: Add comments to ftrace_hash_move() and friends ftrace: Convert "inc" parameter to bool in ftrace_hash_rec_update_modify() ftrace: Add comments to ftrace_hash_rec_disable/enable() ftrace: Remove "filter_hash" parameter from __ftrace_hash_rec_update() ftrace: Rename dup_hash() and comment it ... commit 5a6a25ea5bcd5bdf80fb13acd65a03fc6b8794b1 Author: Dan Carpenter Date: Wed Jul 17 21:25:53 2024 -0500 clk: sophgo: clk-sg2042-pll: Fix uninitialized variable in debug output If sg2042_get_pll_ctl_setting() fails then "value" isn't initialized and it is printed in the debug output. Initialize it to zero. Fixes: 48cf7e01386e ("clk: sophgo: Add SG2042 clock driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/baf0a490-d5ba-4528-90ba-80399684692d@stanley.mountain Reviewed-by: Chen Wang Signed-off-by: Stephen Boyd commit a83b22754e351f13fb46596c85f667dc33da71ec Author: Bastien Curutchet Date: Thu Jul 18 13:55:34 2024 +0200 clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use The flag attribute of the struct clk_init_data isn't initialized before the devm_clk_hw_register() call. This can lead to unexpected behavior during registration. Initialize the entire clk_init_data to zero at declaration. Cc: stable@vger.kernel.org Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks") Signed-off-by: Bastien Curutchet Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20240718115534.41513-1-bastien.curutchet@bootlin.com Signed-off-by: Stephen Boyd commit 2fd4130e53db0958167510eddbca0f09dc858109 Merge: db2451e78d5df 7dc836187f7c6 Author: Linus Torvalds Date: Thu Jul 18 13:29:25 2024 -0700 Merge tag 'trace-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: "Trivial updates for 6.11: - Set rtla/osnoise default threshold to 1us from 5us The 5us default was missing noise that people cared about. Changing it to 1us makes it work as expected. - Restructure how sched_switch prev_comm and next_comm was being saved The prev_comm was being saved along with the other next fields, and the next_comm was being saved along with the other prev fields. This is just a cosmetic change. - Have the allocation of pid_list use GFP_NOWAIT instead of GFP_KERNEL The allocation can happen in irq_work context, but luckily, the size was by default so large, it was never triggered. But in case it ever is, use the NOWAIT allocation in the interrupt context. - Fix some kernel doc errors" * tag 'trace-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: trace/pid_list: Change gfp flags in pid_list_fill_irq() tracing/sched: sched_switch: place prev_comm and next_comm in right order rtla/osnoise: set the default threshold to 1us tracing: Fix trace_pid_list_free() kernel-doc commit db2451e78d5df51b8f926e31e343e74e6aafba9d Merge: 91bd008d4e2b4 0d9c0a67b1440 Author: Linus Torvalds Date: Thu Jul 18 12:39:40 2024 -0700 Merge tag 'bootconfig-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull bootconfig update from Masami Hiramatsu: - Remove duplicate included header file linux/bootconfig.h from lib/bootconfig.c. This is a cleanup, no behavior change. * tag 'bootconfig-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Remove duplicate included header file linux/bootconfig.h commit 91bd008d4e2b4962ecb9a10e40c2fb666b0aeb92 Merge: cb273eb7c8390 c26b1b89b8a9f Author: Linus Torvalds Date: Thu Jul 18 12:19:20 2024 -0700 Merge tag 'probes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes updates from Masami Hiramatsu: "Uprobes: - x86/shstk: Make return uprobe work with shadow stack - Add uretprobe syscall which speeds up the uretprobe 10-30% faster. This syscall is automatically used from user-space trampolines which are generated by the uretprobe. If this syscall is used by normal user program, it will cause SIGILL. Note that this is currently only implemented on x86_64. (This also has two fixes for adjusting the syscall number to avoid conflict with new *attrat syscalls.) - uprobes/perf: fix user stack traces in the presence of pending uretprobe. This corrects the uretprobe's trampoline address in the stacktrace with correct return address - selftests/x86: Add a return uprobe with shadow stack test - selftests/bpf: Add uretprobe syscall related tests. - test case for register integrity check - test case with register changing case - test case for uretprobe syscall without uprobes (expected to fail) - test case for uretprobe with shadow stack - selftests/bpf: add test validating uprobe/uretprobe stack traces - MAINTAINERS: Add uprobes entry. This does not specify the tree but to clarify who maintains and reviews the uprobes Kprobes: - tracing/kprobes: Test case cleanups. Replace redundant WARN_ON_ONCE() + pr_warn() with WARN_ONCE() and remove unnecessary code from selftest - tracing/kprobes: Add symbol counting check when module loads. This checks the uniqueness of the probed symbol on modules. The same check has already done for kernel symbols (This also has a fix for build error with CONFIG_MODULES=n) Cleanup: - Add MODULE_DESCRIPTION() macros for fprobe and kprobe examples" * tag 'probes-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: MAINTAINERS: Add uprobes entry selftests/bpf: Change uretprobe syscall number in uprobe_syscall test uprobe: Change uretprobe syscall scope and number tracing/kprobes: Fix build error when find_module() is not available tracing/kprobes: Add symbol counting check when module loads selftests/bpf: add test validating uprobe/uretprobe stack traces perf,uprobes: fix user stack traces in the presence of pending uretprobes tracing/kprobe: Remove cleanup code unrelated to selftest tracing/kprobe: Integrate test warnings into WARN_ONCE selftests/bpf: Add uretprobe shadow stack test selftests/bpf: Add uretprobe syscall call from user space test selftests/bpf: Add uretprobe syscall test for regs changes selftests/bpf: Add uretprobe syscall test for regs integrity selftests/x86: Add return uprobe shadow stack test uprobe: Add uretprobe syscall to speed up return probe uprobe: Wire up uretprobe system call x86/shstk: Make return uprobe work with shadow stack samples: kprobes: add missing MODULE_DESCRIPTION() macros fprobe: add missing MODULE_DESCRIPTION() macro commit cb273eb7c8390c70a484db6c79a797e377db09b5 Merge: 24777bac4af5f 8b5ea9029b03e Author: Linus Torvalds Date: Thu Jul 18 11:47:14 2024 -0700 Merge tag 'fbdev-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: - Detect VGA compatibility from VESA attributes (Thomas Zimmermann) - Make I2C terminology more inclusive in smscufx and viafb (Easwar Hariharan) - Add lots of missing MODULE_DESCRIPTION() macros (Jeff Johnson) - Logo code cleanups (Geert Uytterhoeven) - Minor fixes by Chen Ni, Kuninori Morimoto, Uwe Kleine-König and Christophe Jaillett * tag 'fbdev-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (21 commits) fbdev: viafb: Make I2C terminology more inclusive fbdev: smscufx: Make I2C terminology more inclusive fbdev: omap2: Return clk_prepare_enable to transfer the error fbdev: mmp: Constify struct mmp_overlay_ops fbdev: Drop explicit initialization of struct i2c_device_id::driver_data to 0 video: agp: add remaining missing MODULE_DESCRIPTION() macros video: console: add missing MODULE_DESCRIPTION() macros fbdev: amifb: add missing MODULE_DESCRIPTION() macro fbdev: c2p_planar: add missing MODULE_DESCRIPTION() macro fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes fbdev: omapfb: use of_graph_get_remote_port() fbdev: omapdss: use for_each_endpoint_of_node() fbdev: offb: add missing MODULE_DESCRIPTION() macro fbdev: vfb: add missing MODULE_DESCRIPTION() macro fbdev: macmodes: add missing MODULE_DESCRIPTION() macro fbdev: goldfishfb: add missing MODULE_DESCRIPTION() macro fbdev: kyro: add missing MODULE_DESCRIPTION() macro fbdev: viafb: add missing MODULE_DESCRIPTION() macro fbdev: matroxfb: add missing MODULE_DESCRIPTION() macros video/logo: Remove linux_serial_image comments ... commit 63d097d46799dc6ab4d1430482cd5ab6a409c4ec Author: Biju Das Date: Wed Jul 17 12:56:47 2024 +0100 dt-bindings: watchdog: dlg,da9062-watchdog: Drop blank space Drop unnecessary blank space from binding documentation. Reported-by: Pavel Machek Closes: https://lore.kernel.org/all/ZpemkYsK6zQgGCF2@duo.ucw.cz/ Signed-off-by: Biju Das Acked-by: Conor Dooley Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240717115649.131914-1-biju.das.jz@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1bb3b542cb1b68e40d4323592fdc9bd222c4f84a Author: Chen Ni Date: Tue Jul 16 11:11:37 2024 +0800 watchdog: rzn1: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: d65112f58464 ("watchdog: Add Renesas RZ/N1 Watchdog driver") Signed-off-by: Chen Ni Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240716031137.400502-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2c58070fde0fffe494d9e38b0ccedbda01c512ff Author: Chen Ni Date: Tue Jul 16 11:07:25 2024 +0800 watchdog: lenovo_se10_wdt: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: 1f6602c8ed1e ("watchdog: lenovo_se10_wdt: Watchdog driver for Lenovo SE10 platform") Signed-off-by: Chen Ni Reviewed-by: Guenter Roeck Reviewed-by: Mark Pearson Link: https://lore.kernel.org/r/20240716030725.400400-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c9b4f313f6b83ac80e9d51845d092c32513efdb4 Author: Marc Zyngier Date: Thu Jul 18 08:58:04 2024 +0100 irqchip/gic-v3-its: Correctly fish out the DID for platform MSI Similarly to PCI where msi-map/msi-mask are used to compute the full RID (aka DID in ITS speak), use the msi-parent as the discovery mechanism, since there is no way a device can generally express its ID. However, since switching to a per-device MSI domain model, the domain passed to its_pmsi_prepare() is the wrong one, and points to the device's instead of the ITS'. Bad. Use the parent domain instead, which is the ITS domain. Fixes: 80b63cc1cc146 ("irqchip/gic-v3-its: Switch platform MSI to MSI parent") Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240718075804.2245733-1-maz@kernel.org commit 99d7fbf8f813eb77dd4ec148c4596455910b2fa1 Author: Marc Zyngier Date: Wed Jul 17 20:59:37 2024 +0100 irqchip/gic-v3-its: Correctly honor the RID remapping Since 6adb35ff43a16 ("irqchip/gic-v3-its: Provide MSI parent for PCI/MSI[-X]"), the primary domain a PCI device allocates its interrupts from is the one that is directly attached to the device itself. By virtue of being a PCI device, it has no OF node. This domain is (through more layer than it is worth describing) passed to its_pci_msi_prepare(), which tries to compute the full RID that is presented to the ITS by the device. This is ultimately done by calling pci_msi_domain_get_msi_rid(), passing both the domain and the PCI device as arguments. The baked-in assumption is that either the domain that is passed to pci_msi_domain_get_msi_rid() describes an interrupt controller with either an OF node or an entry in an ACPI IORT table. In this case, it is *neither*. This domain is does not represent anything firmware-based, but just an allocation unit for the device. As a result, it fails to provide the full RID (which requires inspecting the msi-map/msi-mask properties in the DT), and stick to the BDF, which isn't very useful. Tragedy follows with a litany of devices that randomly die as they fail to see any MSI (because the RID is wrong) or fail to get an allocation (because they try to steal LPIs from their neighbour's pool). This will happen on any system where a single ITS is shared by multiple root ports and end-points with overlapping BDF numbers, and has the topology described in the device-tree. Simpler DT topologies will luckily work, and so will ACPI-based systems. Solve it by pointing pci_msi_domain_get_msi_rid() at the *parent* domain, which is the ITS, resulting in a correct mapping and a restored happiness in my personal zoo. Fixes: 6adb35ff43a16 ("irqchip/gic-v3-its: Provide MSI parent for PCI/MSI[-X]") Reported-by: Johan Hovold Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20240717195937.2240400-1-maz@kernel.org commit 2fdda02a8749fdaff5621c96aaf24a61d2f8c5a2 Author: Thomas Gleixner Date: Sun Jun 23 17:19:07 2024 +0200 genirq/msi: Move msi_device_data to core Now that the platform MSI hack is gone, nothing needs to know about struct msi_device_data outside of the core code. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142236.003295177@linutronix.de commit e9894248994ca8291838baf063f045eab28e5a0e Author: Thomas Gleixner Date: Sun Jun 23 17:19:05 2024 +0200 genirq/msi: Remove platform MSI leftovers No more users! Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240623142235.943295676@linutronix.de commit ce44d1ff463dcf812b43c71a0e16859e3451bc1e Author: Thomas Gleixner Date: Sun Jun 23 17:19:04 2024 +0200 irqchip/irq-mvebu-icu: Remove platform MSI leftovers All related domains provide MSI parent functionality, so the fallback code to the original platform MSI implementation is not longer required. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.881677325@linutronix.de commit fbdf14e90ce445fedfb387413c3d8dc9d90db2a7 Author: Thomas Gleixner Date: Sun Jun 23 17:19:02 2024 +0200 irqchip/irq-mvebu-sei: Switch to MSI parent All platform MSI users and the PCI/MSI code handle per device MSI domains when the irqdomain associated to the device provides MSI parent functionality. Remove the "global" platform domain related code and provide the MSI parent functionality by filling in msi_parent_ops. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.820275215@linutronix.de commit e0b99c4c5917759c257a5c41d2c3e4d7c014578b Author: Thomas Gleixner Date: Sun Jun 23 17:19:00 2024 +0200 irqchip/mvebu-odmi: Switch to parent MSI All platform MSI users and the PCI/MSI code handle per device MSI domains when the irqdomain associated to the device provides MSI parent functionality. Remove the "global" platform domain related code and provide the MSI parent functionality by filling in msi_parent_ops. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.759892514@linutronix.de commit cdb238723018eb766040d7be5d879b4c81ad3d50 Author: Thomas Gleixner Date: Sun Jun 23 17:18:58 2024 +0200 irqchip/mvebu-gicp: Switch to MSI parent All platform MSI users and the PCI/MSI code handle per device MSI domains when the irqdomain associated to the device provides MSI parent functionality. Remove the "global" platform domain related code and provide the MSI parent functionality by filling in msi_parent_ops. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.699780279@linutronix.de commit d929e4db22b61555a6b091450c26d1f7281ca576 Author: Thomas Gleixner Date: Sun Jun 23 17:18:56 2024 +0200 irqchip/irq-mvebu-icu: Prepare for real per device MSI The core infrastructure has everything in place to switch ICU to per device MSI domains and avoid the convoluted construct of the existing platform-MSI layering violation. The new infrastructure provides a wired interrupt specific interface in the MSI core which converts the 'hardware interrupt number + trigger type' allocation which is required for wired interrupts in the regular irqdomain code to a normal MSI allocation. The hardware interrupt number and the trigger type are stored in the MSI descriptor device cookie by the core code so the ICU specific code can retrieve them. The new per device domain is only instantiated when the irqdomain which is associated to the ICU device provides MSI parent functionality. Up to that point it invokes the existing code. Once the parent is converted the code for the current platform-MSI mechanism is removed. The new domain shares the interrupt chip callbacks and the translation function. The only new functionality aside of filling out the msi_domain_templates is a domain specific set_desc() callback, which will go away once all platform-MSI code has been converted. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.635015886@linutronix.de commit 7b2f8aa005bc141ac9144f2fcf2cfb63abd7a0b1 Author: Thomas Gleixner Date: Sun Jun 23 17:18:55 2024 +0200 irqchip/imx-mu-msi: Switch to MSI parent All platform MSI users and the PCI/MSI code handle per device MSI domains when the irqdomain associated to the device provides MSI parent functionality. Remove the "global" platform domain related code and provide the MSI parent functionality by filling in msi_parent_ops. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.574932935@linutronix.de commit 74e44454aafefd682706248eb3846e25a1a05c6d Author: Thomas Gleixner Date: Sun Jun 23 17:18:53 2024 +0200 irqchip/gic-v2m: Switch to device MSI All platform MSI users and the PCI/MSI code handle per device MSI domains when the irqdomain associated to the device provides MSI parent functionality. Remove the "global" PCI/MSI and platform domain related code and provide the MSI parent functionality by filling in msi_parent_ops. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.514419280@linutronix.de commit da8ec7956efb5dc2be87f5f3beb3c9ed74316baf Author: Thomas Gleixner Date: Sun Jun 23 17:18:51 2024 +0200 irqchip/gic_v3_mbi: Switch over to parent domain The MBI chip creates two MSI domains: - PCI/MSI - Platform device domain Both have the MBI domain as parent and differ slightly in the interrupt chip callbacks and the platform device domain supports level type signaling. Convert it over to the MSI parent domain mechanism by: - Providing the required templates - Implementing a custom init_dev_msi_info() callback which sets the chip callbacks and the level support flags depending on the domain bus token type of the per device domain. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.455849114@linutronix.de commit f6a9886a9e55a1e6bd78c7e505205d05ef50a71e Author: Thomas Gleixner Date: Sun Jun 23 17:18:50 2024 +0200 genirq/msi: Remove platform_msi_create_device_domain() No more users. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.395577449@linutronix.de commit 752e021f5b9be0ad42752deaa241ae631f293f9f Author: Thomas Gleixner Date: Sun Jun 23 17:18:48 2024 +0200 irqchip/mbigen: Remove platform_msi_create_device_domain() fallback Now that ITS provides the MSI parent domain, remove the unused fallback code. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.333333826@linutronix.de commit 7f2baef05d6aaae7bd6d0c863eeec50ae5b2997f Author: Thomas Gleixner Date: Sun Jun 23 17:18:46 2024 +0200 irqchip/gic-v3-its: Switch platform MSI to MSI parent Similar to the previous conversion of the PCI/MSI support lift the prepare() callback from the existing platform MSI code and enable platform MSI and the related device domain bus tokens in select and the child domain initialization code. All platform MSI users are automatically using the new per device MSI model now. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.271734124@linutronix.de commit 64a855324311ddad7a85fc0b25ce1f3914ed3425 Author: Thomas Gleixner Date: Sun Jun 23 17:18:44 2024 +0200 irqchip/irq-msi-lib: Prepare for DOMAIN_BUS_WIRED_TO_MSI Add the new bus token to the accepted list of child domain tokens. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.207343466@linutronix.de commit fbfe7e13641efe811a273e1fd237929245376fe0 Author: Thomas Gleixner Date: Sun Jun 23 17:18:43 2024 +0200 irqchip/mbigen: Prepare for real per device MSI The core infrastructure has everything in place to switch MBIGEN to per device MSI domains and avoid the convoluted construct of the existing platform-MSI layering violation. The new infrastructure provides a wired interrupt specific interface in the MSI core which converts the 'hardware interrupt number + trigger type' allocation which is required for wired interrupts in the regular irqdomain code to a normal MSI allocation. The hardware interrupt number and the trigger type are stored in the MSI descriptor device cookie by the core code so the MBIGEN specific code can retrieve them. The new per device domain is only instantiated when the irqdomain which is associated to the MBIGEN device provides MSI parent functionality. Up to that point it invokes the existing code. Once the parent is converted the code for the current platform-MSI mechanism is removed. The new domain shares the interrupt chip callbacks and the translation function. The only new functionality aside of filling out the msi_domain_template is a domain specific set_desc() callback, which will go away once all platform-MSI code has been converted. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.146579575@linutronix.de commit 496436f4a514a3fb4bc7aecd41f0dd4b38e39b1f Author: Thomas Gleixner Date: Sun Jun 23 17:18:41 2024 +0200 irqchip/irq-msi-lib: Prepare for DEVICE MSI to replace platform MSI Add the prerequisites for DEVICE MSI into the shared select() and child domain init function. These domains are really trivial and just provide a custom irq chip callback to write the MSI message. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.085171290@linutronix.de commit b5712bf89b4bbc5bcc9ebde8753ad222f1f68296 Author: Thomas Gleixner Date: Sun Jun 23 17:18:39 2024 +0200 irqchip/gic-v3-its: Provide MSI parent for PCI/MSI[-X] The its_pci_msi_prepare() function from the ITS-PCI/MSI code provides the 'global' PCI/MSI domains. Move this function to the ITS-MSI parent code and amend the function to use the domain hardware size, which is the MSI[X] vector count, for allocating the ITS slots for the PCI device. Enable PCI matching in msi_parent_ops and provide the necessary update to the ITS specific child domain initialization function so that the prepare callback gets invoked on allocations. The latter might be optimized to do the allocation right at the point where the child domain is initialized, but keep it simple for now. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142235.024567623@linutronix.de commit 8c41ccec839c622b2d1be769a95405e4e9a4cb20 Author: Thomas Gleixner Date: Sun Jun 23 17:18:38 2024 +0200 irqchip/irq-msi-lib: Prepare for PCI MSI/MSIX Add the bus tokens for DOMAIN_BUS_PCI_DEVICE_MSI and DOMAIN_BUS_PCI_DEVICE_MSIX to the common child init function. Provide the match mask which can be used by parent domain implementation so the bitmask based child bus token match works. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142234.964056815@linutronix.de commit 48f71d56e2b87839052d2a2ec32fc97a79c3e264 Author: Thomas Gleixner Date: Sun Jun 23 17:18:36 2024 +0200 irqchip/gic-v3-its: Provide MSI parent infrastructure To support per device MSI domains the ITS must provide MSI parent domain functionality. Provide the basic skeleton for this: - msi_parent_ops - child domain init callback - the MSI parent flag set in irqdomain::flags This does not make ITS a functional parent domain as there is no bit set in the bus_select_mask yet, but it provides the base to implement PCI and platform MSI support gradually on top. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142234.903076277@linutronix.de commit 72e257c6f058032daba1c4fe0c81003d545d0f81 Author: Thomas Gleixner Date: Sun Jun 23 17:18:34 2024 +0200 irqchip: Provide irq-msi-lib All irqdomains which provide MSI parent domain functionality for per device MSI domains need to provide a select() callback for the irqdomain and a function to initialize the child domain. Most of these functions would just be copy&paste with minimal modifications, so provide a library function which implements the required functionality and is customizable via parent_domain::msi_parent_ops. The check for the supported bus tokens in msi_lib_init_dev_msi_info() is expanded step by step within the next patches. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240623142234.840975799@linutronix.de commit 7d189c77106ed6df09829f7a419e35ada67b2bd0 Author: Shivamurthy Shastri Date: Wed Jun 26 21:05:12 2024 +0200 PCI/MSI: Provide MSI_FLAG_PCI_MSI_MASK_PARENT Most ARM(64) PCI/MSI domains mask and unmask in the parent domain after or before the PCI mask/unmask operation takes place. So there are more than a dozen of the same wrapper implementation all over the place. Don't make the same mistake with the new per device PCI/MSI domains and provide a new MSI feature flag, which lets the domain implementation enable this sequence in the PCI/MSI code. Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/87ed8j34pj.ffs@tglx commit 24777bac4af5fcddb0cf4a7d8a2b6ee2a98fe6fd Author: Manivannan Sadhasivam Date: Wed Jul 17 09:57:46 2024 +0530 PCI: Check for the existence of 'dev.of_node' before calling of_platform_populate() Commit 50b040ef3732 ("PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled") added the CONFIG_OF guard for the of_platform_populate() API. But it missed the fact that the CONFIG_OF platforms can also run on ACPI without devicetree (so dev.of_node will be NULL). In those cases, of_platform_populate() will fail with below error messages as seen on the Ampere Altra box: pci 000c:00:01.0: failed to populate child OF nodes (-22) pci 000c:00:02.0: failed to populate child OF nodes (-22) Fix this by checking for the existence of 'dev.of_node' before calling the of_platform_populate() API. This also warrants the removal of CONFIG_OF check, since dev_of_node() helper will return NULL if CONFIG_OF is not enabled. While at it, let's also use dev_of_node() to pass device OF node pointer to of_platform_populate(). Fixes: 50b040ef3732 ("PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled") Reported-by: Linus Torvalds Closes: https://lore.kernel.org/linux-arm-msm/CAHk-=wjcO_9dkNf-bNda6bzykb5ZXWtAYA97p7oDsXPHmMRi6g@mail.gmail.com Reviewed-by: Bartosz Golaszewski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Torvalds commit f2f6a8e8871725035959b90bac048cde555aa0e9 Author: Mark Rutland Date: Thu Jul 18 13:06:47 2024 +0100 init/Kconfig: remove CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND Several versions of GCC mis-compile asm goto with outputs. We try to workaround this, but our workaround is demonstrably incomplete and liable to result in subtle bugs, especially on arm64 where get_user() has recently been moved over to using asm goto with outputs. From discussion(s) with Linus at: https://lore.kernel.org/linux-arm-kernel/Zpfv2tnlQ-gOLGac@J2N7QTR9R3.cambridge.arm.com/ https://lore.kernel.org/linux-arm-kernel/ZpfxLrJAOF2YNqCk@J2N7QTR9R3.cambridge.arm.com/ ... it sounds like the best thing to do for now is to remove the workaround and make CC_HAS_ASM_GOTO_OUTPUT depend on working compiler versions. The issue was originally reported to GCC by Sean Christopherson: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 ... and Jakub Jelinek fixed this for GCC 14, with the fix backported to 13.3.0, 12.4.0, and 11.5.0. In the kernel, we tried to workaround broken compilers in commits: 4356e9f841f7 ("work around gcc bugs with 'asm goto' with outputs") 68fb3ca0e408 ("update workarounds for gcc "asm goto" issue") ... but the workaround of adding an empty asm("") after the asm volatile goto(...) demonstrably does not always avoid the problem, as can be seen in the following test case: | #define asm_goto_output(x...) \ | do { asm volatile goto(x); asm (""); } while (0) | | #define __good_or_bad(__val, __key) \ | do { \ | __label__ __failed; \ | unsigned long __tmp; \ | asm_goto_output( \ | " cbnz %[key], %l[__failed]\n" \ | " mov %[val], #0x900d\n" \ | : [val] "=r" (__tmp) \ | : [key] "r" (__key) \ | : \ | : __failed); \ | (__val) = __tmp; \ | break; \ | __failed: \ | (__val) = 0xbad; \ | } while (0) | | unsigned long get_val(unsigned long key); | unsigned long get_val(unsigned long key) | { | unsigned long val = 0xbad; | | __good_or_bad(val, key); | | return val; | } GCC 13.2.0 (at -O2) compiles this to: | cbnz x0, .Lfailed | mov x0, #0x900d | .Lfailed: | ret GCC 14.1.0 (at -O2) compiles this to: | cbnz x0, .Lfailed | mov x0, #0x900d | ret | .Lfailed: | mov x0, #0xbad | ret Note that GCC 13.2.0 erroneously omits the assignment to 'val' in the error path (even though this does not depend on an output of the asm goto). GCC 14.1.0 correctly retains the assignment. This problem can be seen within the kernel with the following test case: | #include | #include | | noinline unsigned long test_unsafe_get_user(unsigned long __user *ptr); | noinline unsigned long test_unsafe_get_user(unsigned long __user *ptr) | { | unsigned long val; | | unsafe_get_user(val, ptr, Efault); | return val; | | Efault: | val = 0x900d; | return val; | } GCC 13.2.0 (arm64 defconfig) compiles this to: | and x0, x0, #0xff7fffffffffffff | ldtr x0, [x0] | .Lextable_fixup: | ret GCC 13.2.0 (x86_64 defconfig + MITIGATION_RETPOLINE=n) compiles this to: | endbr64 | mov (%rdi),%rax | .Lextable_fixup: | ret ... omitting the assignment to 'val' in the error path, and leaving garbage in the result register returned by the function (which happens to contain the faulting address in the generated code). GCC 14.1.0 (arm64 defconfig) compiles this to: | and x0, x0, #0xff7fffffffffffff | ldtr x0, [x0] | ret | .Lextable_fixup: | mov x0, #0x900d // #36877 | ret GCC 14.1.0 (x86_64 defconfig + MITIGATION_RETPOLINE=n) compiles this to: | endbr64 | mov (%rdi),%rax | ret | .Lextable_fixup: | mov $0x900d,%eax | ret ... retaining the expected assignment to 'val' in the error path. We don't have a complete and reasonable workaround. While placing empty asm("") blocks after each goto label *might* be sufficient, we don't know for certain, this is tedious and error-prone, and there doesn't seem to be a neat way to wrap this up (which is especially painful for cases with multiple goto labels). Avoid this issue by disabling CONFIG_CC_HAS_ASM_GOTO_OUTPUT for known-broken compiler versions and removing the workaround (along with the CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND config option). For the moment I've left the default implementation of asm_goto_output() unchanged. This should now be redundant since any compiler with the fix for the clobbering issue whould also have a fix for the (earlier) volatile issue, but it's far less churny to leave it around, which makes it easier to backport this patch if necessary. Signed-off-by: Mark Rutland Cc: Alex Coplan Cc: Catalin Marinas Cc: Jakub Jelinek Cc: Peter Zijlstra Cc: Sean Christopherson Cc: Szabolcs Nagy Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Linus Torvalds commit 49208b67585d18521225bf72bf842593cea711f8 Author: Masahiro Yamada Date: Thu Jul 18 01:24:20 2024 +0900 kbuild: fix rebuild of generic syscall headers Commit fbb5c0606fa4 ("kbuild: add syscall table generation to scripts/Makefile.asm-headers") started to generate syscall headers for architectures using generic syscalls. However, these headers are always rebuilt using GNU Make 4.4.1 or newer. When using GNU Make 4.4 or older, these headers are not rebuilt when the command to generate them is changed, despite the use of the if_changed macro. scripts/Makefile.asm-headers now uses FORCE, but it is not marked as .PHONY. To handle the command line change correctly, .*.cmd files must be included. Fixes: fbb5c0606fa4 ("kbuild: add syscall table generation to scripts/Makefile.asm-headers") Reported-by: Linus Torvalds Closes: https://lore.kernel.org/lkml/CAHk-=wibB7SvXnUftBgAt+4-3vEKRpvEgBeDEH=i=j2GvDitoA@mail.gmail.com/ Signed-off-by: Masahiro Yamada Tested-by: Arnd Bergmann Signed-off-by: Linus Torvalds commit b3ce7a30847a54a7f96a35e609303d8afecd460b Merge: b1bc554e009e3 478a52707b0ab Author: Linus Torvalds Date: Thu Jul 18 09:34:02 2024 -0700 Merge tag 'drm-next-2024-07-18' of https://gitlab.freedesktop.org/drm/kernel Pull drm updates from Dave Airlie: "There's a lot of stuff in here, amd, i915 and xe have new platform work, lots of core rework around EDID handling, some new COMPILE_TEST options, maintainer changes and a lots of other stuff. Summary: core: - deprecate DRM data and return 0 date - connector: Create a set of helpers to help with HDMI support - Remove driver owner assignments - Allow more drivers to compile with COMPILE_TEST - Conversions to drm_edid - Sprinkle MODULE_DESCRIPTIONS everywhere they are missing - Remove drm_mm_replace_node - print: Add a drm prefix to warn level messages too, remove ___drm_dbg, consolidate prefix handling - New monochrome TV mode variant ttm: - improve number of page faults on some platforms - fix test builds under PREEMPT_RT - more test coverage ci: - Require a more recent version of mesa - improve farm setup and test generation dma-buf: - warn if reserving 0 fence slots - internal API heap enhancements fbdev: - Create memory manager optimized fbdev emulation panic: - Allow to select fonts - improve drm_fb_dma_get_scanout_buffer - Allow to dump kmsg to the screen bridge: - Remove redundant checks on bridge->encoder - Remove drm_bridge_chain_mode_fixup - bridge-connector: Plumb in the new HDMI helper - analogix_dp: Various improvements, handle AUX transfers timeout - samsung-dsim: Fix timings calculation - tc358767: Plenty of small fixes, fix no connector attach, fix clocks - sii902x: state validation improvements panels: - Switch panels from register table initialization to proper code - Now that the panel code tracks the panel state, remove every ad-hoc implementation in the panel drivers - More cleanup of prepare / enable state tracking in drivers - edp: Drop legacy panel compatibles - simple-bridge: Switch to devm_drm_bridge_add - New panels: Lincoln Tech Sol LCD185-101CT, Microtips Technology 13-101HIEBCAF0-C, Microtips Technology MF-103HIEB0GA0, BOE nv110wum-l60, IVO t109nw41, WL-355608-A8, PrimeView PM070WL4, Lincoln Technologies LCD197, Ortustech COM35H3P70ULC, AUO G104STN01, K&d kd101ne3-40ti amdgpu: - DCN 4.0.x support - GC 12.0 support - GMC 12.0 support - SDMA 7.0 support - MES12 support - MMHUB 4.1 support - GFX12 modifier and DCC support - lots of IP fixes/updates amdkfd: - Contiguous VRAM allocations - GC 12.0 support - SDMA 7.0 support - SR-IOV fixes - KFD GFX ALU exceptions i915: - Battlemage Xe2 HPD display enablement - Panel Replay enabling - DP AUX-less ALPM/LOBF - Enable link training failure fallback for DP MST links - CMRR (Content Match Refresh Rate) enabling - Increase ADL-S/ADL-P/DG2+ max TMDS bitrate to 6 Gbps - Enable eDP AUX based HDR backlight - Support replaying GPU hangs with captured context image - Automate CCS Mode setting during engine resets - lots of refactoring - Support replaying GPU hangs with captured context image - Increase FLR timeout from 3s to 9s - Enable w/a 16021333562 for DG2, MTL and ARL [guc] xe: - update MAINATINERS - New uapi adding OA functionality to Xe - expose l3 bank mask - fix display detect on ADL-N - runtime PM Fixes - Fix silent backmerge issues - More prep for SR-IOV - HWmon additions - per client usage info - Rework GPU page fault handling - Drop EXEC_QUEUE_FLAG_BANNED - Add BMG PCI IDs - Scheduler fixes and improvements - Rename xe_exec_queue::compute to xe_exec_queue::lr - Use ttm_uncached for BO with NEEDS_UC flag - Rename xe perf layer as xe observation layer - lots of refactoring radeon: - Backlight workaround for iMac - Silence UBSAN flex array warnings msm: - Validate registers XML description against schema in CI - core/dpu: SM7150 support - mdp5: Add support for MSM8937 - gpu: Add param for userspace to know if raytracing is supported - gpu: X185 support (aka gpu in X1 laptop chips) - gpu: a505 support ivpu: - hardware scheduler support - profiling support - improvements to the platform support layer - firmware handling improvements - clocks/power mgmt improvements - scheduler/logging improvements habanalabs: - Gradual sleep in polling memory macro - Reduce Gaudi2 MSI-X interrupt count to 128 - Add Gaudi2-D revision support - Add timestamp to CPLD info - Gaudi2: Assume hard-reset by firmware upon MC SEI severe error - Align Gaudi2 interrupt names - Check for errors after preboot is ready - Change habanalabs maintainer and git repo path mgag200: - refactoring and improvements - Add BMC output - enable polling nouveau: - add registry command line v3d: - perf counters improvements zynqmp: - irq and debugfs improvements atmel-hlcdc: - Support XLCDC in sam9x7 mipi-dbi: - Remove mipi_dbi_machine_little_endian - make SPI bits per word configurable - support RGB888 - allow pixel formats to be specified in the DT sun4i: - Rework the blender setup for DE2 panfrost: - Enable MT8188 support vc4: - Monochrome TV support exynos: - fix fallback mode regression - fix memory leak - Use drm_edid_duplicate() instead of kmemdup() etnaviv: - fix i.MX8MP NPU clock gating - workaround FE register cdc issues on some cores - fix DMA sync handling for cached buffers - fix job timeout handling - keep TS enabled on MMUv2 cores for improved performance mediatek: - Convert to platform remove callback returning void- - Drop chain_mode_fixup call in mode_valid() - Fixes the errors of MediaTek display driver found by IGT - Add display support for the MT8365-EVK board - Fix bit depth overwritten for mtk_ovl_set bit_depth() - Fix possible_crtcs calculation - Fix spurious kfree() ast: - refactor mode setting code stm: - Add LVDS support - DSI PHY updates" * tag 'drm-next-2024-07-18' of https://gitlab.freedesktop.org/drm/kernel: (2501 commits) drm/amdgpu/mes12: add missing opcode string drm/amdgpu/mes11: update opcode strings Revert "drm/amd/display: Reset freesync config before update new state" drm/omap: Restrict compile testing to PAGE_SIZE less than 64KB drm/xe: Drop trace_xe_hw_fence_free drm/xe/uapi: Rename xe perf layer as xe observation layer drm/amdgpu: remove exp hw support check for gfx12 drm/amdgpu: timely save bad pages to eeprom after gpu ras reset is completed drm/amdgpu: flush all cached ras bad pages to eeprom drm/amdgpu: select compute ME engines dynamically drm/amd/display: Allow display DCC for DCN401 drm/amdgpu: select compute ME engines dynamically drm/amdgpu/job: Replace DRM_INFO/ERROR logging drm/amdgpu: select compute ME engines dynamically drm/amd/pm: Ignore initial value in smu response register drm/amdgpu: Initialize VF partition mode drm/amd/amdgpu: fix SDMA IRQ client ID <-> req mapping MAINTAINERS: fix Xinhui's name MAINTAINERS: update powerplay and swsmu drm/qxl: Pin buffer objects for internal mappings ... commit b9fae9f06d84ffab0f3f9118f3a96bbcdc528bf6 Author: Benjamin Coddington Date: Thu Jul 11 13:21:00 2024 -0400 SUNRPC: Fixup gss_status tracepoint error output The GSS routine errors are values, not flags. Fixes: 0c77668ddb4e ("SUNRPC: Introduce trace points in rpc_auth_gss.ko") Signed-off-by: Benjamin Coddington Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker commit ed0172af5d6fc07d1b40ca82f5ca3979300369f7 Author: Benjamin Coddington Date: Wed Jul 17 10:49:33 2024 -0400 SUNRPC: Fix a race to wake a sync task We've observed NFS clients with sync tasks sleeping in __rpc_execute waiting on RPC_TASK_QUEUED that have not responded to a wake-up from rpc_make_runnable(). I suspect this problem usually goes unnoticed, because on a busy client the task will eventually be re-awoken by another task completion or xprt event. However, if the state manager is draining the slot table, a sync task missing a wake-up can result in a hung client. We've been able to prove that the waker in rpc_make_runnable() successfully calls wake_up_bit() (ie- there's no race to tk_runstate), but the wake_up_bit() call fails to wake the waiter. I suspect the waker is missing the load of the bit's wait_queue_head, so waitqueue_active() is false. There are some very helpful comments about this problem above wake_up_bit(), prepare_to_wait(), and waitqueue_active(). Fix this by inserting smp_mb__after_atomic() before the wake_up_bit(), which pairs with prepare_to_wait() calling set_current_state(). Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 4594d26fca91fab0e1621d2ab196f3f9bab96bc8 Author: Mark Brown Date: Tue Jul 16 15:48:00 2024 +0100 kselftest/alsa: Log the PCM ID in pcm-test Drivers report a string with a name for each PCM, log it during startup of pcm-test as a diagnostic aid. Signed-off-by: Mark Brown Link: https://patch.msgid.link/20240716-alsa-kselftest-board-name-v2-2-60f1acdde096@kernel.org Signed-off-by: Takashi Iwai commit b1a7b97aa534b031f929ba4bf70d2e869b117c9d Author: Mark Brown Date: Tue Jul 16 15:47:59 2024 +0100 kselftest/alsa: Use card name rather than number in test names Currently for the PCM and mixer tests we report test names which identify the card being tested with the card number. This ensures we have unique names but since card numbers are dynamically assigned at runtime the names we end up with will often not be stable on systems with multiple cards especially where those cards are provided by separate modules loeaded at runtime. This makes it difficult for automated systems and UIs to relate test results between runs on affected platforms. Address this by replacing our use of card numbers with card names which are more likely to be stable across runs. We use the card ID since it is guaranteed to be unique by default, unlike the long name. There is still some vulnerability to ordering issues if multiple cards with the same base ID are present in the system but have separate dependencies but not all drivers put distinguishing information in their long names. Signed-off-by: Mark Brown Link: https://patch.msgid.link/20240716-alsa-kselftest-board-name-v2-1-60f1acdde096@kernel.org Signed-off-by: Takashi Iwai commit d7063c08738573fc2f3296da6d31a22fa8aa843a Author: Seunghun Han Date: Thu Jul 18 17:09:08 2024 +0900 ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360 Samsung Galaxy Book Pro 360 (13" 2022 NT935QDB-KC71S) with codec SSID 144d:c1a4 requires the same workaround to enable the speaker amp as other Samsung models with the ALC298 codec. Signed-off-by: Seunghun Han Cc: Link: https://patch.msgid.link/20240718080908.8677-1-kkamagui@gmail.com Signed-off-by: Takashi Iwai commit 90936a0a4c54f0a1cdf4538f9128821ad70c36ab Author: Matthew Brost Date: Mon Jul 15 23:39:02 2024 -0700 drm/xe: Don't suspend device upon wedge When wedging a device we shouldn't be suspending device as state for debug will be lost. Also this appears to not work as the below stack trace pops upon trying to resume a wedged device: [ 304.245044] INFO: task cat:12115 blocked for more than 151 seconds. [ 304.251333] Tainted: G W 6.10.0-rc7-xe+ #3518 [ 304.257617] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 304.265459] task:cat state:D stack:13384 pid:12115 tgid:12115 ppid:3986 flags:0x00000006 [ 304.265465] Call Trace: [ 304.265467] [ 304.265469] __schedule+0x3c4/0xdf0 [ 304.265478] schedule+0x3c/0x140 [ 304.265481] rpm_resume+0x1cc/0x740 [ 304.265484] ? __pfx_autoremove_wake_function+0x10/0x10 [ 304.265489] __pm_runtime_resume+0x49/0x80 [ 304.265494] guc_info+0x6b/0xb0 [xe] [ 304.265538] ? __pfx___drm_printfn_seq_file+0x10/0x10 [ 304.265541] ? __pfx___drm_puts_seq_file+0x10/0x10 [ 304.265545] seq_read_iter+0x111/0x4c0 [ 304.265551] seq_read+0xfc/0x140 [ 304.265556] full_proxy_read+0x58/0x80 [ 304.265560] vfs_read+0xa7/0x360 [ 304.265563] ? find_held_lock+0x2b/0x80 [ 304.265568] ksys_read+0x64/0xe0 [ 304.265571] do_syscall_64+0x68/0x140 [ 304.265575] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 304.265578] RIP: 0033:0x7f4254d14992 [ 304.265580] RSP: 002b:00007ffc558666f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 304.265583] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f4254d14992 [ 304.265584] RDX: 0000000000020000 RSI: 00007f4254ebb000 RDI: 0000000000000003 [ 304.265586] RBP: 00007f4254ebb000 R08: 00007f4254eba010 R09: 00007f4254eba010 [ 304.265587] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000022000 [ 304.265588] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [ 304.265593] [ 304.265594] Showing all locks held in the system: [ 304.265598] 1 lock held by khungtaskd/57: [ 304.265599] #0: ffffffff8273b860 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x36/0x1c0 [ 304.265607] 3 locks held by kworker/6:1/90: [ 304.265610] 1 lock held by in:imklog/547: [ 304.265611] #0: ffff88810498cd88 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x76/0xc0 [ 304.265620] 1 lock held by dmesg/1310: v2: Drop local 'err' variable (Jonathan) Fixes: 8ed9aaae39f3 ("drm/xe: Force wedged state and block GT reset upon any GPU hang") Cc: Rodrigo Vivi Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240716063902.1390130-2-matthew.brost@intel.com (cherry picked from commit 452bca0edbd0764ca0284239d5438b3edd305ab3) Signed-off-by: Rodrigo Vivi commit c9474b726b932b5d555effd9ed0ae19f4da2367c Author: Matthew Brost Date: Mon Jul 15 23:39:01 2024 -0700 drm/xe: Wedge the entire device Wedge the entire device, not just GT which may have triggered the wedge. To implement this, cleanup the layering so xe_device_declare_wedged() calls into the lower layers (GT) to ensure entire device is wedged. While we are here, also signal any pending GT TLB invalidations upon wedging device. Lastly, short circuit reset wait if device is wedged. v2: - Short circuit reset wait if device is wedged (Local testing) Fixes: 8ed9aaae39f3 ("drm/xe: Force wedged state and block GT reset upon any GPU hang") Cc: Rodrigo Vivi Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240716063902.1390130-1-matthew.brost@intel.com (cherry picked from commit 7dbe8af13c189f5937e87e9fb924d5bbc49e6f71) Signed-off-by: Rodrigo Vivi commit bf07ca963d4fd11c88a9d4b058f2bd62e8d46a98 Author: Michal Wajdeczko Date: Thu Jul 11 21:23:19 2024 +0200 drm/xe/pf: Limit fair VF LMEM provisioning Due to the current design of the BO and VRAM manager, any object with XE_BO_FLAG_PINNED flag, which the PF driver uses during VF LMEM provisionining, is created with the TTM_PL_FLAG_CONTIGUOUS flag, which may cause VRAM fragmentation that prevents subsequent allocations of larger objects, like fair VF LMEM provisioning. To avoid such failures, round down fair VF LMEM provisioning size to next power of two size, to compensate what xe_ttm_vram_mgr is doing to achieve contiguous allocations. Fixes: ac6598aed1b3 ("drm/xe/pf: Add support to configure SR-IOV VFs") Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240711192320.1198-2-michal.wajdeczko@intel.com Signed-off-by: Lucas De Marchi (cherry picked from commit 4c3fe5eae46b92e2fd961b19f7779608352e5368) Signed-off-by: Rodrigo Vivi commit 408c2f14a5d3d7ac4824b96e52693ab271efb738 Author: Ashutosh Dixit Date: Thu Jul 11 14:12:03 2024 -0700 drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup Increment num_syncs after xe_sync_entry_parse() is successful to ensure the xe_sync_entry_cleanup() logic under "err_syncs" label works correctly. v2: Use the same pattern as that in xe_vm.c (Matt Brost) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Ashutosh Dixit Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240711211203.3728180-1-ashutosh.dixit@intel.com (cherry picked from commit 43a6faa6d9b5e9139758200a79fe9c8f4aaa0c8d) Signed-off-by: Rodrigo Vivi commit 4ecc24a84d7e0254efd150ec23e0b89638386516 Author: Tvrtko Ursulin Date: Thu Jul 11 14:53:34 2024 +0100 drm/v3d: Validate passed in drm syncobj handles in the performance extension If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfully or otherwise fail the extension by jumping into the existing unwind. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3d: Create a CPU job extension for the reset performance query job") Cc: Maíra Canal Cc: Iago Toral Quiroga Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240711135340.84617-6-tursulin@igalia.com (cherry picked from commit a546b7e4d73c23838d7e4d2c92882b3ca902d213) Signed-off-by: Thomas Zimmermann commit 023d22e8bb0cdd6900382ad1ed06df3b6c2ea791 Author: Tvrtko Ursulin Date: Thu Jul 11 14:53:33 2024 +0100 drm/v3d: Validate passed in drm syncobj handles in the timestamp extension If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfully or otherwise fail the extension by jumping into the existing unwind. Signed-off-by: Tvrtko Ursulin Fixes: 9ba0ff3e083f ("drm/v3d: Create a CPU job extension for the timestamp query job") Cc: Maíra Canal Cc: Iago Toral Quiroga Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240711135340.84617-5-tursulin@igalia.com (cherry picked from commit 8d1276d1b8f738c3afe1457d4dff5cc66fc848a3) Signed-off-by: Thomas Zimmermann commit 32df4abc44f24dbec239d43e2b26d5768c5d1a78 Author: Tvrtko Ursulin Date: Thu Jul 11 14:53:32 2024 +0100 drm/v3d: Fix potential memory leak in the performance extension If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3d: Create a CPU job extension for the reset performance query job") Cc: Maíra Canal Cc: Iago Toral Quiroga Cc: stable@vger.kernel.org # v6.8+ Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240711135340.84617-4-tursulin@igalia.com (cherry picked from commit 484de39fa5f5b7bd0c5f2e2c5265167250ef7501) Signed-off-by: Thomas Zimmermann commit 0e50fcc20bd87584840266e8004f9064a8985b4f Author: Tvrtko Ursulin Date: Thu Jul 11 14:53:31 2024 +0100 drm/v3d: Fix potential memory leak in the timestamp extension If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tvrtko Ursulin Fixes: 9ba0ff3e083f ("drm/v3d: Create a CPU job extension for the timestamp query job") Cc: Maíra Canal Cc: Iago Toral Quiroga Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240711135340.84617-3-tursulin@igalia.com (cherry picked from commit 753ce4fea62182c77e1691ab4f9022008f25b62e) Signed-off-by: Thomas Zimmermann commit 6ce9efd12ae81cf46bf44eb0348594558dfbb9d2 Author: Tvrtko Ursulin Date: Thu Jul 11 14:53:30 2024 +0100 drm/v3d: Prevent out of bounds access in performance query extensions Check that the number of perfmons userspace is passing in the copy and reset extensions is not greater than the internal kernel storage where the ids will be copied into. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3d: Create a CPU job extension for the reset performance query job") Cc: Maíra Canal Cc: Iago Toral Quiroga Cc: stable@vger.kernel.org # v6.8+ Reviewed-by: Iago Toral Quiroga Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240711135340.84617-2-tursulin@igalia.com (cherry picked from commit f32b5128d2c440368b5bf3a7a356823e235caabb) Signed-off-by: Thomas Zimmermann commit ed70aaac7c359540d3d8332827fa60b6a45e15f2 Author: Bartosz Golaszewski Date: Wed Jul 17 16:28:03 2024 +0200 Kconfig: reduce the amount of power sequencing noise Kconfig will ask the user twice about power sequencing: once for the QCom WCN power sequencing driver and then again for the PCI power control driver using it. Let's automate the selection of PCI_PWRCTL by introducing a new hidden symbol: HAVE_PWRCTL which should be selected by all platforms that have the need to include PCI power control code (right now: only ARCH_QCOM). The pwrseq-based PCI pwrctl driver itself will then be selected by the drivers binding to devices that may require external handling of the power-up sequence (currently: ath11k and ath12k) based on the value of HAVE_PWRCTL. Make all PCI pwrctl Kconfig symbols hidden so that no questions are asked during configuration. Fixes: 4565d2652a37 ("PCI/pwrctl: Add PCI power control core code") Reported-by: Linus Torvalds Closes: https://lore.kernel.org/lkml/CAHk-=wjWc5dzcj2O1tEgNHY1rnQW63JwtuZi_vAZPqy6wqpoUQ@mail.gmail.com/ Acked-by: Jeff Johnson # drivers/net/wireless/ath Link: https://lore.kernel.org/r/20240717142803.53248-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit e528be3c87be953b73e7826a2d7e4b837cbad39d Author: Rafael J. Wysocki Date: Wed Jul 17 21:45:02 2024 +0200 thermal: core: Allow thermal zones to tell the core to ignore them The iwlwifi wireless driver registers a thermal zone that is only needed when the network interface handled by it is up and it wants that thermal zone to be effectively ignored by the core otherwise. Before commit a8a261774466 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid") that could be achieved by returning an error code from the thermal zone's .get_temp() callback because the core did not really handle errors returned by it almost at all. However, commit a8a261774466 made the core attempt to recover from the situation in which the temperature of a thermal zone cannot be determined due to errors returned by its .get_temp() and is always invalid from the core's perspective. That was done because there are thermal zones in which .get_temp() returns errors to start with due to some difficulties related to the initialization ordering, but then it will start to produce valid temperature values at one point. Unfortunately, the simple approach taken by commit a8a261774466, which is to poll the thermal zone periodically until its .get_temp() callback starts to return valid temperature values, is at odds with the special thermal zone in iwlwifi in which .get_temp() may always return an error because its network interface may always be down. If that happens, every attempt to invoke the thermal zone's .get_temp() callback resulting in an error causes the thermal core to print a dev_warn() message to the kernel log which is super-noisy. To address this problem, make the core handle the case in which .get_temp() returns 0, but the temperature value returned by it is not actually valid, in a special way. Namely, make the core completely ignore the invalid temperature value coming from .get_temp() in that case, which requires folding in update_temperature() into its caller and a few related changes. On the iwlwifi side, modify iwl_mvm_tzone_get_temp() to return 0 and put THERMAL_TEMP_INVALID into the temperature return memory location instead of returning an error when the firmware is not running or it is not of the right type. Also, to clearly separate the handling of invalid temperature values from the thermal zone initialization, introduce a special THERMAL_TEMP_INIT value specifically for the latter purpose. Fixes: a8a261774466 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid") Closes: https://lore.kernel.org/linux-pm/20240715044527.GA1544@sol.localdomain/ Reported-by: Eric Biggers Reported-by: Stefan Lippers-Hollmann Link: https://bugzilla.kernel.org/show_bug.cgi?id=201761 Tested-by: Oleksandr Natalenko Tested-by: Stefan Lippers-Hollmann Cc: 6.10+ # 6.10+ Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/4950004.31r3eYUQgx@rjwysocki.net [ rjw: Rebased on top of the current mainline ] Signed-off-by: Rafael J. Wysocki commit a1b7dbca149053e4f79a451bebdf0c40c9092896 Merge: 269521e250699 cbd070a4ae62f Author: Paolo Abeni Date: Thu Jul 18 13:28:34 2024 +0200 Merge tag 'nf-24-07-17' 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) Call nf_expect_get_id() to delete expectation by ID. By trial and error it is possible to leak the LSB of the expectation address on x86_64. This bug is a leftover when converting the existing code to use nf_expect_get_id(). 2) Incorrect initialization in pipapo set backend leads to packet mismatches. From Florian Westphal. 3) Extend netfilter's selftests to cover for the pipapo set backend, also from Florian. 4) Fix sparse warning in IPVS when adding service, from Chen Hanxiao. netfilter pull request 24-07-17 * tag 'nf-24-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: ipvs: properly dereference pe in ip_vs_add_service selftests: netfilter: add test case for recent mismatch bug netfilter: nf_set_pipapo: fix initial map fill netfilter: ctnetlink: use helper function to calculate expect ID ==================== Link: https://patch.msgid.link/20240717215214.225394-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 269521e250699b312876d85e6ab2279c6d16e91d Merge: 4e076ff6ad530 c5118072e228e Author: Paolo Abeni Date: Thu Jul 18 13:09:13 2024 +0200 Merge branch 'net-dsa-fix-chip-wide-frame-size-config-in-some-drivers' Martin Willi says: ==================== net: dsa: Fix chip-wide frame size config in some drivers Some DSA chips support a chip-wide frame size configurations, only. Some drivers adjust that chip-wide setting for user port changes, overriding the frame size requirements on the CPU port that includes tagger overhead. Fix the mv88e6xxx and b53 drivers and align them to the behavior of other drivers. v2: - Skip chip-wide config for non-CPU ports instead of finding the maximim MTU over all ports - Add a patch fixing the b53 driver as well v1: https://lore.kernel.org/netdev/20240716120808.396514-1-martin@strongswan.org/ ==================== Link: https://patch.msgid.link/20240717090820.894234-1-martin@strongswan.org Signed-off-by: Paolo Abeni commit c5118072e228e7e4385fc5ac46b2e31cf6c4f2d3 Author: Martin Willi Date: Wed Jul 17 11:08:20 2024 +0200 net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports Broadcom switches supported by the b53 driver use a chip-wide jumbo frame configuration. In the commit referenced with the Fixes tag, the setting is applied just for the last port changing its MTU. While configuring CPU ports accounts for tagger overhead, user ports do not. When setting the MTU for a user port, the chip-wide setting is reduced to not include the tagger overhead, resulting in an potentially insufficient chip-wide maximum frame size for the CPU port. As, by design, the CPU port MTU is adjusted for any user port change, apply the chip-wide setting only for CPU ports. This aligns the driver to the behavior of other switch drivers. Fixes: 6ae5834b983a ("net: dsa: b53: add MTU configuration support") Suggested-by: Vladimir Oltean Signed-off-by: Martin Willi Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit 66b6095c264e1b4e0a441c6329861806504e06c6 Author: Martin Willi Date: Wed Jul 17 11:08:19 2024 +0200 net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports Marvell chips not supporting per-port jumbo frame size configurations use a chip-wide frame size configuration. In the commit referenced with the Fixes tag, the setting is applied just for the last port changing its MTU. While configuring CPU ports accounts for tagger overhead, user ports do not. When setting the MTU for a user port, the chip-wide setting is reduced to not include the tagger overhead, resulting in an potentially insufficient maximum frame size for the CPU port. Specifically, sending full-size frames from the CPU port on a MV88E6097 having a user port MTU of 1500 bytes results in dropped frames. As, by design, the CPU port MTU is adjusted for any user port change, apply the chip-wide setting only for CPU ports. Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU") Suggested-by: Vladimir Oltean Signed-off-by: Martin Willi Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit 4e076ff6ad5302c015617da30d877b4cdcbdf613 Author: Lorenzo Bianconi Date: Wed Jul 17 10:47:19 2024 +0200 net: airoha: Fix NULL pointer dereference in airoha_qdma_cleanup_rx_queue() Move page_pool_get_dma_dir() inside the while loop of airoha_qdma_cleanup_rx_queue routine in order to avoid possible NULL pointer dereference if airoha_qdma_init_rx_queue() fails before properly allocating the page_pool pointer. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/7330a41bba720c33abc039955f6172457a3a34f0.1721205981.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni commit fc28d1c1fe3b3e2fbc50834c8f73dda72f6af9fc Author: Conor Dooley Date: Wed Jul 17 10:59:49 2024 +0100 spi: spidev: add correct compatible for Rohm BH2228FV When Maxime originally added the BH2228FV to the spidev driver, he spelt it incorrectly - the d should have been a b. Add the correctly spelt compatible to the driver. Although the majority of users of this compatible are abusers, there is at least one board that validly uses the incorrect spelt compatible, so keep it in the driver to avoid breaking the few real users it has. Fixes: 8fad805bdc52 ("spi: spidev: Add Rohm DH2228FV DAC compatible string") Signed-off-by: Conor Dooley Acked-by: Maxime Ripard Link: https://patch.msgid.link/20240717-ventricle-strewn-a7678c509e85@spud Signed-off-by: Mark Brown commit 5170dae5591036dba7daa519ea3126169300e275 Author: Conor Dooley Date: Wed Jul 17 10:59:48 2024 +0100 dt-bindings: trivial-devices: fix Rohm BH2228FV compatible string When Maxime originally added the BH2228FV to the spidev driver, he spelt it incorrectly - the d should have been a b. That spelling was then propagated to the binding when written by Krzysztof. Add a new, correctly spelt compatible and advise against using the incorrectly spelling. Fixes: 025aea27732d ("dt-bindings: trivial-devices: document SPI dev compatibles") Signed-off-by: Conor Dooley Acked-by: Maxime Ripard Link: https://patch.msgid.link/20240717-exuberant-enlighten-f890fabcd247@spud Signed-off-by: Mark Brown commit f2038c12e8133bf4c6bd4d1127a23310d55d9e21 Author: Venkata Prasad Potturu Date: Thu Jul 18 11:50:02 2024 +0530 ASoC: sof: amd: fix for firmware reload failure in Vangogh platform Setting ACP ACLK as clock source when ACP enters D0 state causing firmware load failure, as per design clock source should be internal clock. Remove acp_clkmux_sel field so that ACP will use internal clock source when ACP enters into D0 state. Fixes: d0dab6b76a9f ("ASoC: SOF: amd: Add sof support for vangogh platform") Signed-off-by: Venkata Prasad Potturu Link: https://patch.msgid.link/20240718062004.581685-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit a1a305375dc356865b22a43cbe09869bf8fae9ca Author: Jack Wu Date: Tue Jul 16 10:49:02 2024 +0800 net: wwan: t7xx: add support for Dell DW5933e add support for Dell DW5933e (0x14c0, 0x4d75) Signed-off-by: Jack Wu Link: https://patch.msgid.link/20240716024902.16054-1-wojackbb@gmail.com Signed-off-by: Paolo Abeni commit ab1a2a52885a922687822f6615078d2de25dfe38 Merge: 120f1c857a73e f036e68212c11 Author: Paolo Abeni Date: Thu Jul 18 11:11:05 2024 +0200 Merge branch 'ipv4-fix-incorrect-tos-in-route-get-reply' Ido Schimmel says: ==================== ipv4: Fix incorrect TOS in route get reply Two small fixes for incorrect TOS in route get reply. See more details in the commit messages. No regressions in FIB tests: # ./fib_tests.sh [...] Tests passed: 218 Tests failed: 0 ==================== Link: https://patch.msgid.link/20240715142354.3697987-1-idosch@nvidia.com Signed-off-by: Paolo Abeni commit f036e68212c11e5a7edbb59b5e25299341829485 Author: Ido Schimmel Date: Mon Jul 15 17:23:54 2024 +0300 ipv4: Fix incorrect TOS in fibmatch route get reply The TOS value that is returned to user space in the route get reply is the one with which the lookup was performed ('fl4->flowi4_tos'). This is fine when the matched route is configured with a TOS as it would not match if its TOS value did not match the one with which the lookup was performed. However, matching on TOS is only performed when the route's TOS is not zero. It is therefore possible to have the kernel incorrectly return a non-zero TOS: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip route get fibmatch 192.0.2.2 tos 0xfc 192.0.2.0/24 tos 0x1c dev dummy1 proto kernel scope link src 192.0.2.1 Fix by instead returning the DSCP field from the FIB result structure which was populated during the route lookup. Output after the patch: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip route get fibmatch 192.0.2.2 tos 0xfc 192.0.2.0/24 dev dummy1 proto kernel scope link src 192.0.2.1 Extend the existing selftests to not only verify that the correct route is returned, but that it is also returned with correct "tos" value (or without it). Fixes: b61798130f1b ("net: ipv4: RTM_GETROUTE: return matched fib result when requested") Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Reviewed-by: Guillaume Nault Signed-off-by: Paolo Abeni commit 338bb57e4c2a1c2c6fc92f9c0bd35be7587adca7 Author: Ido Schimmel Date: Mon Jul 15 17:23:53 2024 +0300 ipv4: Fix incorrect TOS in route get reply The TOS value that is returned to user space in the route get reply is the one with which the lookup was performed ('fl4->flowi4_tos'). This is fine when the matched route is configured with a TOS as it would not match if its TOS value did not match the one with which the lookup was performed. However, matching on TOS is only performed when the route's TOS is not zero. It is therefore possible to have the kernel incorrectly return a non-zero TOS: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip route get 192.0.2.2 tos 0xfc 192.0.2.2 tos 0x1c dev dummy1 src 192.0.2.1 uid 0 cache Fix by adding a DSCP field to the FIB result structure (inside an existing 4 bytes hole), populating it in the route lookup and using it when filling the route get reply. Output after the patch: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip route get 192.0.2.2 tos 0xfc 192.0.2.2 dev dummy1 src 192.0.2.1 uid 0 cache Fixes: 1a00fee4ffb2 ("ipv4: Remove rt_key_{src,dst,tos} from struct rtable.") Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Reviewed-by: Guillaume Nault Signed-off-by: Paolo Abeni commit 120f1c857a73e52132e473dee89b340440cb692b Author: Pablo Neira Ayuso Date: Mon Jul 15 16:14:42 2024 +0200 net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE The following splat is easy to reproduce upstream as well as in -stable kernels. Florian Westphal provided the following commit: d1dab4f71d37 ("net: add and use __skb_get_hash_symmetric_net") but this complementary fix has been also suggested by Willem de Bruijn and it can be easily backported to -stable kernel which consists in using DEBUG_NET_WARN_ON_ONCE instead to silence the following splat given __skb_get_hash() is used by the nftables tracing infrastructure to to identify packets in traces. [69133.561393] ------------[ cut here ]------------ [69133.561404] WARNING: CPU: 0 PID: 43576 at net/core/flow_dissector.c:1104 __skb_flow_dissect+0x134f/ [...] [69133.561944] CPU: 0 PID: 43576 Comm: socat Not tainted 6.10.0-rc7+ #379 [69133.561959] RIP: 0010:__skb_flow_dissect+0x134f/0x2ad0 [69133.561970] Code: 83 f9 04 0f 84 b3 00 00 00 45 85 c9 0f 84 aa 00 00 00 41 83 f9 02 0f 84 81 fc ff ff 44 0f b7 b4 24 80 00 00 00 e9 8b f9 ff ff <0f> 0b e9 20 f3 ff ff 41 f6 c6 20 0f 84 e4 ef ff ff 48 8d 7b 12 e8 [69133.561979] RSP: 0018:ffffc90000006fc0 EFLAGS: 00010246 [69133.561988] RAX: 0000000000000000 RBX: ffffffff82f33e20 RCX: ffffffff81ab7e19 [69133.561994] RDX: dffffc0000000000 RSI: ffffc90000007388 RDI: ffff888103a1b418 [69133.562001] RBP: ffffc90000007310 R08: 0000000000000000 R09: 0000000000000000 [69133.562007] R10: ffffc90000007388 R11: ffffffff810cface R12: ffff888103a1b400 [69133.562013] R13: 0000000000000000 R14: ffffffff82f33e2a R15: ffffffff82f33e28 [69133.562020] FS: 00007f40f7131740(0000) GS:ffff888390800000(0000) knlGS:0000000000000000 [69133.562027] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [69133.562033] CR2: 00007f40f7346ee0 CR3: 000000015d200001 CR4: 00000000001706f0 [69133.562040] Call Trace: [69133.562044] [69133.562049] ? __warn+0x9f/0x1a0 [ 1211.841384] ? __skb_flow_dissect+0x107e/0x2860 [...] [ 1211.841496] ? bpf_flow_dissect+0x160/0x160 [ 1211.841753] __skb_get_hash+0x97/0x280 [ 1211.841765] ? __skb_get_hash_symmetric+0x230/0x230 [ 1211.841776] ? mod_find+0xbf/0xe0 [ 1211.841786] ? get_stack_info_noinstr+0x12/0xe0 [ 1211.841798] ? bpf_ksym_find+0x56/0xe0 [ 1211.841807] ? __rcu_read_unlock+0x2a/0x70 [ 1211.841819] nft_trace_init+0x1b9/0x1c0 [nf_tables] [ 1211.841895] ? nft_trace_notify+0x830/0x830 [nf_tables] [ 1211.841964] ? get_stack_info+0x2b/0x80 [ 1211.841975] ? nft_do_chain_arp+0x80/0x80 [nf_tables] [ 1211.842044] nft_do_chain+0x79c/0x850 [nf_tables] Fixes: 9b52e3f267a6 ("flow_dissector: handle no-skb use case") Suggested-by: Willem de Bruijn Signed-off-by: Pablo Neira Ayuso Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240715141442.43775-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 280e36f0d5b997173d014c07484c03a7f7750668 Author: Christian Brauner Date: Tue Jul 16 09:19:11 2024 +0200 nsfs: use cleanup guard Ensure that rcu read lock is given up before returning. Link: https://lore.kernel.org/r/20240716-elixier-fliesen-1ab342151a61@brauner Fixes: ca567df74a28 ("nsfs: add pid translation ioctls") Reported-by: syzbot+a3e82ae343b26b4d2335@syzkaller.appspotmail.com Signed-off-by: Christian Brauner commit 400e4064b63a4c302dff11136828f54de91eda2a Author: Jeff Johnson Date: Thu May 23 06:58:01 2024 -0700 fs/adfs: add MODULE_DESCRIPTION Fix the 'make W=1' issue: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/adfs/adfs.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240523-md-adfs-v1-1-364268e38370@quicinc.com Signed-off-by: Christian Brauner commit 5418e6dfc905b3ccc1e01bdad97d948697b20100 Author: Vamsi Attunuru Date: Wed Jul 17 09:37:39 2024 -0700 misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems Upon adding CONFIG_ARCH_THUNDER & CONFIG_COMPILE_TEST dependency, compilation errors arise on 32-bit ARM with writeq() & readq() calls which are used for accessing 64-bit values. Since DPI hardware only works with 64-bit register accesses, using CONFIG_64BIT dependency to skip compilation on 32-bit systems. Fixes: a5e43e2d202d ("misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI") Signed-off-by: Vamsi Attunuru Tested-by: Nathan Chancellor Tested-by: Jeff Johnson Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240717163739.181236-1-vattunuru@marvell.com Signed-off-by: Greg Kroah-Hartman commit f4b89d8ce5a835afa51404977ee7e3889c2b9722 Author: Günther Noack Date: Mon Jul 15 16:03:29 2024 +0000 landlock: Various documentation improvements * Fix some typos, incomplete or confusing phrases. * Split paragraphs where appropriate. * List the same error code multiple times, if it has multiple possible causes. * Bring wording closer to the man page wording, which has undergone more thorough review (esp. for LANDLOCK_ACCESS_FS_WRITE_FILE). * Small semantic clarifications * Call the ephemeral port range "ephemeral" * Clarify reasons for EFAULT in landlock_add_rule() * Clarify @rule_type doc for landlock_add_rule() This is a collection of small fixes which I collected when preparing the corresponding man pages [1]. Cc: Alejandro Colomar Cc: Konstantin Meskhidze Link: https://lore.kernel.org/r/20240715155554.2791018-1-gnoack@google.com [1] Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20240715160328.2792835-2-gnoack@google.com [mic: Add label to link, fix formatting spotted by make htmldocs, synchronize userspace-api documentation's date] Signed-off-by: Mickaël Salaün commit 9c2913b962daf3e5a947babf93f2125765eeca09 Author: Tatsunosuke Tobita Date: Tue Jul 9 14:57:29 2024 +0900 HID: wacom: more appropriate tool type categorization Recent eraser and pen tools are able to be distinguished by looking at its least significant nibble. This modification applies it to wacom_intuos_get_tool_type function and reduces its code lines. Signed-off-by: Tatsunosuke Tobita Signed-off-by: Tatsunosuke Tobita Reviewed-by: Ping Cheng Link: https://patch.msgid.link/20240709055729.17158-2-tatsunosuke.wacom@gmail.com Signed-off-by: Benjamin Tissoires commit f0d17d696dfce77c9abc830e4ac2d677890a2dad Author: Tatsunosuke Tobita Date: Tue Jul 9 14:57:28 2024 +0900 HID: wacom: Modify pen IDs The pen ID, 0x80842, was not the correct ID for wacom driver to treat. The ID was corrected to 0x8842. Also, 0x4200 was not the expected ID used on any Wacom device. Therefore, 0x4200 was removed. Signed-off-by: Tatsunosuke Tobita Signed-off-by: Tatsunosuke Tobita Fixes: bfdc750c4cb2 ("HID: wacom: add three styli to wacom_intuos_get_tool_type") Cc: stable@kernel.org #6.2 Reviewed-by: Ping Cheng Link: https://patch.msgid.link/20240709055729.17158-1-tatsunosuke.wacom@gmail.com Signed-off-by: Benjamin Tissoires commit c14112a5574ff5cf3de198ab6eeff53ac1234068 Author: Shay Drory Date: Wed Jul 17 10:29:16 2024 -0700 driver core: auxiliary bus: Fix documentation of auxiliary_device Fix the documentation of the below field of struct auxiliary_device include/linux/auxiliary_bus.h:150: warning: Function parameter or struct member 'sysfs' not described in 'auxiliary_device' include/linux/auxiliary_bus.h:150: warning: Excess struct member 'irqs' description in 'auxiliary_device' include/linux/auxiliary_bus.h:150: warning: Excess struct member 'lock' description in 'auxiliary_device' include/linux/auxiliary_bus.h:150: warning: Excess struct member 'irq_dir_exists' description in 'auxiliary_device' Fixes: a808878308a8 ("driver core: auxiliary bus: show auxiliary device IRQs") Reported-by: Stephen Rothwell Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed Link: https://patch.msgid.link/20240717172916.595808-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 1f038d5897fe6b439039fc28420842abcc0d126b Author: Lorenzo Bianconi Date: Wed Jul 17 10:15:46 2024 +0200 net: airoha: fix error branch in airoha_dev_xmit and airoha_set_gdm_ports Fix error case management in airoha_dev_xmit routine since we need to DMA unmap pending buffers starting from q->head. Moreover fix a typo in error case branch in airoha_set_gdm_ports routine. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Link: https://patch.msgid.link/b628871bc8ae4861b5e2ab4db90aaf373cbb7cee.1721203880.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 03b54bad26f3c78bb1f90410ec3e4e7fe197adc9 Author: Joshua Washington Date: Tue Jul 16 10:10:41 2024 -0700 gve: Fix XDP TX completion handling when counters overflow In gve_clean_xdp_done, the driver processes the TX completions based on a 32-bit NIC counter and a 32-bit completion counter stored in the tx queue. Fix the for loop so that the counter wraparound is handled correctly. Fixes: 75eaae158b1b ("gve: Add XDP DROP and TX support for GQI-QPL format") Signed-off-by: Joshua Washington Signed-off-by: Praveen Kaligineedi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240716171041.1561142-1-pkaligineedi@google.com Signed-off-by: Jakub Kicinski commit 9ff0251b2eb54d17fbe4f6aff50f6edfd837adb6 Merge: 90e812ac40c4b ca8dad0415162 Author: Michael Ellerman Date: Thu Jul 18 14:32:46 2024 +1000 Merge branch 'topic/ppc-kvm' into next Merge the powerpc KVM topic branch. commit 67856f44da381973caf4eb692ad2cca1de7b2d37 Author: Alexey Dobriyan Date: Mon Jul 15 08:25:33 2024 +0300 ia64: scrub ia64 from poison.h Link: https://lkml.kernel.org/r/c72e5467-06a8-4739-ae6a-7c84c96cad77@p183 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton commit f944ffcbc2e1c759764850261670586ddf3bdabb Author: Thomas Gleixner Date: Thu Jul 11 22:25:21 2024 +0200 watchdog/perf: properly initialize the turbo mode timestamp and rearm counter For systems on which the performance counter can expire early due to turbo modes the watchdog handler has a safety net in place which validates that since the last watchdog event there has at least 4/5th of the watchdog period elapsed. This works reliably only after the first watchdog event because the per CPU variable which holds the timestamp of the last event is never initialized. So a first spurious event will validate against a timestamp of 0 which results in a delta which is likely to be way over the 4/5 threshold of the period. As this might happen before the first watchdog hrtimer event increments the watchdog counter, this can lead to false positives. Fix this by initializing the timestamp before enabling the hardware event. Reset the rearm counter as well, as that might be non zero after the watchdog was disabled and reenabled. Link: https://lkml.kernel.org/r/87frsfu15a.ffs@tglx Fixes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo modes") Signed-off-by: Thomas Gleixner Cc: Arjan van de Ven Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton commit 30d77b7eef019fa4422980806e8b7cdc8674493e Author: Yu Zhao Date: Fri Jul 12 17:29:56 2024 -0600 mm/mglru: fix ineffective protection calculation mem_cgroup_calculate_protection() is not stateless and should only be used as part of a top-down tree traversal. shrink_one() traverses the per-node memcg LRU instead of the root_mem_cgroup tree, and therefore it should not call mem_cgroup_calculate_protection(). The existing misuse in shrink_one() can cause ineffective protection of sub-trees that are grandchildren of root_mem_cgroup. Fix it by reusing lru_gen_age_node(), which already traverses the root_mem_cgroup tree, to calculate the protection. Previously lru_gen_age_node() opportunistically skips the first pass, i.e., when scan_control->priority is DEF_PRIORITY. On the second pass, lruvec_is_sizable() uses appropriate scan_control->priority, set by set_initial_priority() from lru_gen_shrink_node(), to decide whether a memcg is too small to reclaim from. Now lru_gen_age_node() unconditionally traverses the root_mem_cgroup tree. So it should call set_initial_priority() upfront, to make sure lruvec_is_sizable() uses appropriate scan_control->priority on the first pass. Otherwise, lruvec_is_reclaimable() can return false negatives and result in premature OOM kills when min_ttl_ms is used. Link: https://lkml.kernel.org/r/20240712232956.1427127-1-yuzhao@google.com Fixes: e4dde56cd208 ("mm: multi-gen LRU: per-node lru_gen_folio lists") Signed-off-by: Yu Zhao Reported-by: T.J. Mercier Cc: Signed-off-by: Andrew Morton commit b749cb0d61ca1ed120a555badf3a7b025b8a7fc2 Author: Dan Carpenter Date: Mon Jul 15 15:23:05 2024 -0500 mm/zswap: fix a white space issue We accidentally deleted a tab in commit f84152e9efc5 ("mm/zswap: use only one pool in zswap"). Add it back. Link: https://lkml.kernel.org/r/c15066a0-f061-42c9-b0f5-d60281d3d5d8@stanley.mountain Signed-off-by: Dan Carpenter Reviewed-by: Chengming Zhou Signed-off-by: Andrew Morton commit 1390a3334a48ecac5175865fd433d55eec255db8 Author: Miaohe Lin Date: Tue Jul 9 20:04:33 2024 +0800 mm/hugetlb: fix kernel NULL pointer dereference when migrating hugetlb folio A kernel crash was observed when migrating hugetlb folio: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 0 P4D 0 Oops: Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 3435 Comm: bash Not tainted 6.10.0-rc6-00450-g8578ca01f21f #66 RIP: 0010:__folio_undo_large_rmappable+0x70/0xb0 RSP: 0018:ffffb165c98a7b38 EFLAGS: 00000097 RAX: fffffbbc44528090 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffffa30e000a2800 RSI: 0000000000000246 RDI: ffffa3153ffffcc0 RBP: fffffbbc44528000 R08: 0000000000002371 R09: ffffffffbe4e5868 R10: 0000000000000001 R11: 0000000000000001 R12: ffffa3153ffffcc0 R13: fffffbbc44468000 R14: 0000000000000001 R15: 0000000000000001 FS: 00007f5b3a716740(0000) GS:ffffa3151fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000010959a000 CR4: 00000000000006f0 Call Trace: __folio_migrate_mapping+0x59e/0x950 __migrate_folio.constprop.0+0x5f/0x120 move_to_new_folio+0xfd/0x250 migrate_pages+0x383/0xd70 soft_offline_page+0x2ab/0x7f0 soft_offline_page_store+0x52/0x90 kernfs_fop_write_iter+0x12c/0x1d0 vfs_write+0x380/0x540 ksys_write+0x64/0xe0 do_syscall_64+0xb9/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5b3a514887 RSP: 002b:00007ffe138fce68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f5b3a514887 RDX: 000000000000000c RSI: 0000556ab809ee10 RDI: 0000000000000001 RBP: 0000556ab809ee10 R08: 00007f5b3a5d1460 R09: 000000007fffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c R13: 00007f5b3a61b780 R14: 00007f5b3a617600 R15: 00007f5b3a616a00 It's because hugetlb folio is passed to __folio_undo_large_rmappable() unexpectedly. large_rmappable flag is imperceptibly set to hugetlb folio since commit f6a8dd98a2ce ("hugetlb: convert alloc_buddy_hugetlb_folio to use a folio"). Then commit be9581ea8c05 ("mm: fix crashes from deferred split racing folio migration") makes folio_migrate_mapping() call folio_undo_large_rmappable() triggering the bug. Fix this issue by clearing large_rmappable flag for hugetlb folios. They don't need that flag set anyway. Link: https://lkml.kernel.org/r/20240709120433.4136700-1-linmiaohe@huawei.com Fixes: f6a8dd98a2ce ("hugetlb: convert alloc_buddy_hugetlb_folio to use a folio") Fixes: be9581ea8c05 ("mm: fix crashes from deferred split racing folio migration") Signed-off-by: Miaohe Lin Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Signed-off-by: Andrew Morton commit 667574e873b5f77a220b2a93329689f36fb56d5d Author: Miaohe Lin Date: Fri Jul 12 11:13:14 2024 +0800 mm/hugetlb: fix possible recursive locking detected warning When tries to demote 1G hugetlb folios, a lockdep warning is observed: ============================================ WARNING: possible recursive locking detected 6.10.0-rc6-00452-ga4d0275fa660-dirty #79 Not tainted -------------------------------------------- bash/710 is trying to acquire lock: ffffffff8f0a7850 (&h->resize_lock){+.+.}-{3:3}, at: demote_store+0x244/0x460 but task is already holding lock: ffffffff8f0a6f48 (&h->resize_lock){+.+.}-{3:3}, at: demote_store+0xae/0x460 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&h->resize_lock); lock(&h->resize_lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by bash/710: #0: ffff8f118439c3f0 (sb_writers#5){.+.+}-{0:0}, at: ksys_write+0x64/0xe0 #1: ffff8f11893b9e88 (&of->mutex#2){+.+.}-{3:3}, at: kernfs_fop_write_iter+0xf8/0x1d0 #2: ffff8f1183dc4428 (kn->active#98){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x100/0x1d0 #3: ffffffff8f0a6f48 (&h->resize_lock){+.+.}-{3:3}, at: demote_store+0xae/0x460 stack backtrace: CPU: 3 PID: 710 Comm: bash Not tainted 6.10.0-rc6-00452-ga4d0275fa660-dirty #79 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x68/0xa0 __lock_acquire+0x10f2/0x1ca0 lock_acquire+0xbe/0x2d0 __mutex_lock+0x6d/0x400 demote_store+0x244/0x460 kernfs_fop_write_iter+0x12c/0x1d0 vfs_write+0x380/0x540 ksys_write+0x64/0xe0 do_syscall_64+0xb9/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa61db14887 RSP: 002b:00007ffc56c48358 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fa61db14887 RDX: 0000000000000002 RSI: 000055a030050220 RDI: 0000000000000001 RBP: 000055a030050220 R08: 00007fa61dbd1460 R09: 000000007fffffff R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fa61dc1b780 R14: 00007fa61dc17600 R15: 00007fa61dc16a00 Lockdep considers this an AA deadlock because the different resize_lock mutexes reside in the same lockdep class, but this is a false positive. Place them in distinct classes to avoid these warnings. Link: https://lkml.kernel.org/r/20240712031314.2570452-1-linmiaohe@huawei.com Fixes: 8531fc6f52f5 ("hugetlb: add hugetlb demote page support") Signed-off-by: Miaohe Lin Acked-by: Muchun Song Cc: Signed-off-by: Andrew Morton commit 33dfe9204f29b415bbc0abb1a50642d1ba94f5e9 Author: yangge Date: Wed Jul 3 20:02:33 2024 +0800 mm/gup: clear the LRU flag of a page before adding to LRU batch If a large number of CMA memory are configured in system (for example, the CMA memory accounts for 50% of the system memory), starting a virtual virtual machine with device passthrough, it will call pin_user_pages_remote(..., FOLL_LONGTERM, ...) to pin memory. Normally if a page is present and in CMA area, pin_user_pages_remote() will migrate the page from CMA area to non-CMA area because of FOLL_LONGTERM flag. But the current code will cause the migration failure due to unexpected page refcounts, and eventually cause the virtual machine fail to start. If a page is added in LRU batch, its refcount increases one, remove the page from LRU batch decreases one. Page migration requires the page is not referenced by others except page mapping. Before migrating a page, we should try to drain the page from LRU batch in case the page is in it, however, folio_test_lru() is not sufficient to tell whether the page is in LRU batch or not, if the page is in LRU batch, the migration will fail. To solve the problem above, we modify the logic of adding to LRU batch. Before adding a page to LRU batch, we clear the LRU flag of the page so that we can check whether the page is in LRU batch by folio_test_lru(page). It's quite valuable, because likely we don't want to blindly drain the LRU batch simply because there is some unexpected reference on a page, as described above. This change makes the LRU flag of a page invisible for longer, which may impact some programs. For example, as long as a page is on a LRU batch, we cannot isolate it, and we cannot check if it's an LRU page. Further, a page can now only be on exactly one LRU batch. This doesn't seem to matter much, because a new page is allocated from buddy and added to the lru batch, or be isolated, it's LRU flag may also be invisible for a long time. Link: https://lkml.kernel.org/r/1720075944-27201-1-git-send-email-yangge1116@126.com Link: https://lkml.kernel.org/r/1720008153-16035-1-git-send-email-yangge1116@126.com Fixes: 9a4e9f3b2d73 ("mm: update get_user_pages_longterm to migrate pages allocated from CMA region") Signed-off-by: yangge Cc: Aneesh Kumar K.V Cc: Baolin Wang Cc: David Hildenbrand Cc: Barry Song <21cnbao@gmail.com> Cc: Hugh Dickins Signed-off-by: Andrew Morton commit af649773fb25250cd22625af021fb6275c56a3ee Author: Tvrtko Ursulin Date: Mon Jul 8 08:56:32 2024 +0100 mm/numa_balancing: teach mpol_to_str about the balancing mode Since balancing mode was added in bda420b98505 ("numa balancing: migrate on fault among multiple bound nodes"), it was possible to set this mode but it wouldn't be shown in /proc//numa_maps since there was no support for it in the mpol_to_str() helper. Furthermore, because the balancing mode sets the MPOL_F_MORON flag, it would be displayed as 'default' due a workaround introduced a few years earlier in 8790c71a18e5 ("mm/mempolicy.c: fix mempolicy printing in numa_maps"). To tidy this up we implement two changes: Replace the MPOL_F_MORON check by pointer comparison against the preferred_node_policy array. By doing this we generalise the current special casing and replace the incorrect 'default' with the correct 'bind' for the mode. Secondly, we add a string representation and corresponding handling for the MPOL_F_NUMA_BALANCING flag. With the two changes together we start showing the balancing flag when it is set and therefore complete the fix. Representation format chosen is to separate multiple flags with vertical bars, following what existed long time ago in kernel 2.6.25. But as between then and now there wasn't a way to display multiple flags, this patch does not change the format in practice. Some /proc//numa_maps output examples: 555559580000 bind=balancing:0-1,3 file=... 555585800000 bind=balancing|static:0,2 file=... 555635240000 prefer=relative:0 file= Link: https://lkml.kernel.org/r/20240708075632.95857-1-tursulin@igalia.com Signed-off-by: Tvrtko Ursulin Fixes: bda420b98505 ("numa balancing: migrate on fault among multiple bound nodes") References: 8790c71a18e5 ("mm/mempolicy.c: fix mempolicy printing in numa_maps") Reviewed-by: "Huang, Ying" Cc: Mel Gorman Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Rik van Riel Cc: Johannes Weiner Cc: "Matthew Wilcox (Oracle)" Cc: Dave Hansen Cc: Andi Kleen Cc: Michal Hocko Cc: David Rientjes Cc: [5.12+] Signed-off-by: Andrew Morton commit 5316b497c51fee98b399c055a76f10088dcdce2b Author: Roman Gushchin Date: Fri Jul 12 18:35:14 2024 +0000 mm: memcg1: convert charge move flags to unsigned long long Currently MOVE_ANON and MOVE_FILE flags are defined as integers and it leads to the following Smatch static checker warning: mm/memcontrol-v1.c:609 mem_cgroup_move_charge_write() warn: was expecting a 64 bit value instead of '~(1 | 2)' Fix this be redefining them as unsigned long long. Even though the issue allows to set high 32 bits of mc.flags to an arbitrary number, these bits are never used, so it doesn't have any significant consequences. Link: https://lkml.kernel.org/r/ZpF8Q9zBsIY7d2P9@google.com Signed-off-by: Roman Gushchin Reported-by: Dan Carpenter Signed-off-by: Andrew Morton commit 6ab42fe21c84d72da752923b4bd7075344f4a362 Author: Suren Baghdasaryan Date: Thu Jul 11 15:04:57 2024 -0700 alloc_tag: fix page_ext_get/page_ext_put sequence during page splitting pgalloc_tag_sub() might call page_ext_put() using a page different from the one used in page_ext_get() call. This does not pose an issue since page_ext_put() ignores this parameter as long as it's non-NULL but technically this is wrong. Fix it by storing the original page used in page_ext_get() and passing it to page_ext_put(). Link: https://lkml.kernel.org/r/20240711220457.1751071-3-surenb@google.com Fixes: be25d1d4e822 ("mm: create new codetag references during page splitting") Signed-off-by: Suren Baghdasaryan Cc: Kees Cook Cc: Kent Overstreet Cc: Pasha Tatashin Cc: Sourav Panda Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit fd8acc0097b91fab3104fa8a66ce2fd9cf8b0c11 Author: Suren Baghdasaryan Date: Thu Jul 11 15:04:56 2024 -0700 lib: reuse page_ext_data() to obtain codetag_ref codetag_ref_from_page_ext() reimplements the same calculation as page_ext_data(). Reuse existing function instead. Link: https://lkml.kernel.org/r/20240711220457.1751071-2-surenb@google.com Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging") Signed-off-by: Suren Baghdasaryan Cc: Kees Cook Cc: Kent Overstreet Cc: Pasha Tatashin Cc: Sourav Panda Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4810a82c8a8ae06fe6496a23fcb89a4952603e60 Author: Suren Baghdasaryan Date: Thu Jul 11 15:04:55 2024 -0700 lib: add missing newline character in the warning message Link: https://lkml.kernel.org/r/20240711220457.1751071-1-surenb@google.com Fixes: 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling") Signed-off-by: Suren Baghdasaryan Cc: Kees Cook Cc: Kent Overstreet Cc: Pasha Tatashin Cc: Sourav Panda Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 3f74e6bd3b84a8b6bb3cc51609c89e5b9d58eed7 Author: Yu Zhao Date: Thu Jul 11 13:19:57 2024 -0600 mm/mglru: fix overshooting shrinker memory set_initial_priority() tries to jump-start global reclaim by estimating the priority based on cold/hot LRU pages. The estimation does not account for shrinker objects, and it cannot do so because their sizes can be in different units other than page. If shrinker objects are the majority, e.g., on TrueNAS SCALE 24.04.0 where ZFS ARC can use almost all system memory, set_initial_priority() can vastly underestimate how much memory ARC shrinker can evict and assign extreme low values to scan_control->priority, resulting in overshoots of shrinker objects. To reproduce the problem, using TrueNAS SCALE 24.04.0 with 32GB DRAM, a test ZFS pool and the following commands: fio --name=mglru.file --numjobs=36 --ioengine=io_uring \ --directory=/root/test-zfs-pool/ --size=1024m --buffered=1 \ --rw=randread --random_distribution=random \ --time_based --runtime=1h & for ((i = 0; i < 20; i++)) do sleep 120 fio --name=mglru.anon --numjobs=16 --ioengine=mmap \ --filename=/dev/zero --size=1024m --fadvise_hint=0 \ --rw=randrw --random_distribution=random \ --time_based --runtime=1m done To fix the problem: 1. Cap scan_control->priority at or above DEF_PRIORITY/2, to prevent the jump-start from being overly aggressive. 2. Account for the progress from mm_account_reclaimed_pages(), to prevent kswapd_shrink_node() from raising the priority unnecessarily. Link: https://lkml.kernel.org/r/20240711191957.939105-2-yuzhao@google.com Fixes: e4dde56cd208 ("mm: multi-gen LRU: per-node lru_gen_folio lists") Signed-off-by: Yu Zhao Reported-by: Alexander Motin Cc: Wei Xu Cc: Signed-off-by: Andrew Morton commit 8b671fe1a879923ecfb72dda6caf01460dd885ef Author: Yu Zhao Date: Thu Jul 11 13:19:56 2024 -0600 mm/mglru: fix div-by-zero in vmpressure_calc_level() evict_folios() uses a second pass to reclaim folios that have gone through page writeback and become clean before it finishes the first pass, since folio_rotate_reclaimable() cannot handle those folios due to the isolation. The second pass tries to avoid potential double counting by deducting scan_control->nr_scanned. However, this can result in underflow of nr_scanned, under a condition where shrink_folio_list() does not increment nr_scanned, i.e., when folio_trylock() fails. The underflow can cause the divisor, i.e., scale=scanned+reclaimed in vmpressure_calc_level(), to become zero, resulting in the following crash: [exception RIP: vmpressure_work_fn+101] process_one_work at ffffffffa3313f2b Since scan_control->nr_scanned has no established semantics, the potential double counting has minimal risks. Therefore, fix the problem by not deducting scan_control->nr_scanned in evict_folios(). Link: https://lkml.kernel.org/r/20240711191957.939105-1-yuzhao@google.com Fixes: 359a5e1416ca ("mm: multi-gen LRU: retry folios written back while isolated") Reported-by: Wei Xu Signed-off-by: Yu Zhao Cc: Alexander Motin Cc: Signed-off-by: Andrew Morton commit 0b84780134fb02525ef29ddcb88c3d560ba88a9c Author: Kees Cook Date: Tue Jul 9 17:13:08 2024 -0700 mm/kmemleak: replace strncpy() with strscpy() Replace the depreciated[1] strncpy() calls with strscpy(). Uses of object->comm do not depend on the padding side-effect. Link: https://github.com/KSPP/linux/issues/90 [1] Link: https://lkml.kernel.org/r/20240710001300.work.004-kees@kernel.org Signed-off-by: Kees Cook Acked-by: Catalin Marinas Signed-off-by: Andrew Morton commit 53dabce2652fb854eae84609ce9c37429d5d87ba Author: Vlastimil Babka Date: Thu Jul 11 18:35:31 2024 +0200 mm, page_alloc: put should_fail_alloc_page() back behing CONFIG_FAIL_PAGE_ALLOC This mostly reverts commit af3b854492f3 ("mm/page_alloc.c: allow error injection"). The commit made should_fail_alloc_page() a noinline function that's always called from the page allocation hotpath, even if it's empty because CONFIG_FAIL_PAGE_ALLOC is not enabled, and there is no option to disable it and prevent the associated function call overhead. As with the preceding patch "mm, slab: put should_failslab back behind CONFIG_SHOULD_FAILSLAB" and for the same reasons, put the should_fail_alloc_page() back behind the config option. When enabled, the ALLOW_ERROR_INJECTION and BTF_ID records are preserved so it's not a complete revert. Link: https://lkml.kernel.org/r/20240711-b4-fault-injection-reverts-v1-2-9e2651945d68@suse.cz Signed-off-by: Vlastimil Babka Cc: Akinobu Mita Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Christoph Lameter Cc: Daniel Borkmann Cc: David Rientjes Cc: Eduard Zingerman Cc: Hao Luo Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Mateusz Guzik Cc: Roman Gushchin Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Signed-off-by: Andrew Morton commit a7526fe8b94eced7d82aa00b2bcca44e39ae0769 Author: Vlastimil Babka Date: Thu Jul 11 18:35:30 2024 +0200 mm, slab: put should_failslab() back behind CONFIG_SHOULD_FAILSLAB Patch series "revert unconditional slab and page allocator fault injection calls". These two patches largely revert commits that added function call overhead into slab and page allocation hotpaths and that cannot be currently disabled even though related CONFIG_ options do exist. A much more involved solution that can keep the callsites always existing but hidden behind a static key if unused, is possible [1] and can be pursued by anyone who believes it's necessary. Meanwhile the fact the should_failslab() error injection is already not functional on kernels built with current gcc without anyone noticing [2], and lukewarm response to [1] suggests the need is not there. I believe it will be more fair to have the state after this series as a baseline for possible further optimisation, instead of the unconditional overhead. For example a possible compromise for anyone who's fine with an empty function call overhead but not the full CONFIG_FAILSLAB / CONFIG_FAIL_PAGE_ALLOC overhead is to reuse patch 1 from [1] but insert a static key check only inside should_failslab() and should_fail_alloc_page() before performing the more expensive checks. [1] https://lore.kernel.org/all/20240620-fault-injection-statickeys-v2-0-e23947d3d84b@suse.cz/#t [2] https://github.com/bpftrace/bpftrace/issues/3258 This patch (of 2): This mostly reverts commit 4f6923fbb352 ("mm: make should_failslab always available for fault injection"). The commit made should_failslab() a noinline function that's always called from the slab allocation hotpath, even if it's empty because CONFIG_SHOULD_FAILSLAB is not enabled, and there is no option to disable that call. This is visible in profiles and the function call overhead can be noticeable especially with cpu mitigations. Meanwhile the bpftrace program example in the commit silently does not work without CONFIG_SHOULD_FAILSLAB anyway with a recent gcc, because the empty function gets a .constprop clone that is actually being called (uselessly) from the slab hotpath, while the error injection is hooked to the original function that's not being called at all [1]. Thus put the whole should_failslab() function back behind CONFIG_SHOULD_FAILSLAB. It's not a complete revert of 4f6923fbb352 - the int return type that returns -ENOMEM on failure is preserved, as well ALLOW_ERROR_INJECTION annotation. The BTF_ID() record that was meanwhile added is also guarded by CONFIG_SHOULD_FAILSLAB. [1] https://github.com/bpftrace/bpftrace/issues/3258 Link: https://lkml.kernel.org/r/20240711-b4-fault-injection-reverts-v1-0-9e2651945d68@suse.cz Link: https://lkml.kernel.org/r/20240711-b4-fault-injection-reverts-v1-1-9e2651945d68@suse.cz Signed-off-by: Vlastimil Babka Cc: Akinobu Mita Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Christoph Lameter Cc: Daniel Borkmann Cc: David Rientjes Cc: Eduard Zingerman Cc: Hao Luo Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Mateusz Guzik Cc: Roman Gushchin Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Signed-off-by: Andrew Morton commit 7b7aca6d7c0f9b2d9400bfc57cb2b23cfbd5134d Author: Pei Li Date: Thu Jul 11 09:32:30 2024 -0700 mm: ignore data-race in __swap_writepage Syzbot reported a possible data race: BUG: KCSAN: data-race in __swap_writepage / scan_swap_map_slots read-write to 0xffff888102fca610 of 8 bytes by task 7106 on cpu 1. read to 0xffff888102fca610 of 8 bytes by task 7080 on cpu 0. While we are in __swap_writepage to read sis->flags, scan_swap_map_slots is trying to update it with SWP_SCANNING. value changed: 0x0000000000008083 -> 0x0000000000004083. While this can be updated non-atomicially, this won't affect SWP_SYNCHRONOUS_IO, so we consider this data-race safe. This is possibly introduced by commit 3222d8c2a7f8 ("block: remove ->rw_page"), where this if branch is introduced. Link: https://lkml.kernel.org/r/20240711-bug13-v1-1-cea2b8ae8d76@gmail.com Fixes: 3222d8c2a7f8 ("block: remove ->rw_page") Signed-off-by: Pei Li Reported-by: syzbot+da25887cc13da6bf3b8c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=da25887cc13da6bf3b8c Cc: Dan Williams Cc: Shuah Khan Signed-off-by: Andrew Morton commit dffe24e9587607c377d87d6c372653ae44b99ce7 Author: Donet Tom Date: Wed Jul 10 00:19:12 2024 -0500 hugetlbfs: ensure generic_hugetlb_get_unmapped_area() returns higher address than mmap_min_addr generic_hugetlb_get_unmapped_area() was returning an address less than mmap_min_addr if the mmap argument addr, after alignment, was less than mmap_min_addr, causing mmap to fail. This is because current generic_hugetlb_get_unmapped_area() code does not take into account mmap_min_addr. This patch ensures that generic_hugetlb_get_unmapped_area() always returns an address that is greater than mmap_min_addr. Additionally, similar to generic_get_unmapped_area(), vm_end_gap() checks are included to maintain stack gap. How to reproduce ================ #include #include #include #include #define HUGEPAGE_SIZE (16 * 1024 * 1024) int main() { void *addr = mmap((void *)-1, HUGEPAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); if (addr == MAP_FAILED) { perror("mmap"); exit(EXIT_FAILURE); } snprintf((char *)addr, HUGEPAGE_SIZE, "Hello, Huge Pages!"); printf("%s\n", (char *)addr); if (munmap(addr, HUGEPAGE_SIZE) == -1) { perror("munmap"); exit(EXIT_FAILURE); } return 0; } Result without fix ================== # cat /proc/meminfo |grep -i HugePages_Free HugePages_Free: 20 # ./test mmap: Permission denied # Result with fix =============== # cat /proc/meminfo |grep -i HugePages_Free HugePages_Free: 20 # ./test Hello, Huge Pages! # Link: https://lkml.kernel.org/r/20240710051912.4681-1-donettom@linux.ibm.com Signed-off-by: Donet Tom Reported-by Pavithra Prakash Acked-by: Kirill A. Shutemov Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Aneesh Kumar K.V Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Muchun Song Cc: Nicholas Piggin Cc: Ritesh Harjani (IBM) Cc: Tony Battersby Signed-off-by: Andrew Morton commit b1bc554e009e3aeed7e4cfd2e717c7a34a98c683 Merge: 0ffb8a4c96e55 68a72104cbcf3 Author: Linus Torvalds Date: Wed Jul 17 18:30:10 2024 -0700 Merge tag 'media/v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - New sensor drivers: gc05a2, gc08a3 and imx283 - New serializer/deserializer drivers: max96714 and max96717 - New JPEG encoder driver: e5010 - Support for Raspberry Pi PiSP Backend (BE) ISP driver - Old documentation for av7110 driver removed, as a new version was added as Documentation/userspace-api/media/dvb/legacy*.rst - atompisp: Linux firmwares are now available, so drop firmware-related task from TODO and update firmware logic - The imx258 driver has gained several improvements - wave5 driver has gained support for HEVC decoding - em28xx gained support for MyGica UTV3 - av7110 budget-patch driver removed - Lots of other cleanups, improvements and fixes * tag 'media/v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (301 commits) media: raspberrypi: Switch to remove_new media: uapi: pisp_be_config: Add extra config fields media: uapi: pisp_be_config: Re-sort pisp_be_tiles_config media: uapi: pisp_common: Capitalize all macros media: uapi: pisp_common: Add 32 bpp format test media: uapi: pisp_be_config: Drop BIT() from uAPI media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs media: atomisp: Fix spelling mistakes in sh_css_sp.c media: atomisp: Fix spelling mistake in ia_css_debug.c media: atomisp: Fix spelling mistake in hmm_bo.c media: atomisp: Fix spelling mistake in ia_css_eed1_8.host.c media: atomisp: Fix spelling mistake in sh_css_internal.h media: atomisp: Fix spelling mistake "pipline" -> "pipeline" media: atomisp: Remove unused GPIO related defines and APIs media: atomisp: Replace COMPILATION_ERROR_IF() by static_assert() media: atomisp: Clean up unused macros from math_support.h media: atomisp: csi2-bridge: Add DMI quirk for OV5693 on Xiaomi Mipad2 media: atomisp: Update TODO media: atomisp: Prefix firmware paths with "intel/ipu/" media: atomisp: Remove firmware_name module parameter ... commit 0ffb8a4c96e55ecf0e572aec1a0220af3da84e22 Merge: 5b9ac6c2a735f 76be2f9823b10 Author: Linus Torvalds Date: Wed Jul 17 18:07:31 2024 -0700 Merge tag 'devicetree-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DT Bindings: - Convert and add a bunch of IBM FSI related bindings - Add a new schema listing legacy compatibles which will (probably) never be documented. This will silence various checks warning about them. - Add bindings for Sierra Wireless mangOH Green SPI IoT interface, new Arm 2024 Cortex and Neoverse CPUs, QCom sc8180x PDC, QCom SDX75 GPI DMA, imx8mp/imx8qxp fsl,irqsteer, and Renesas RZ/G2UL CRU and CSI-2 blocks - Convert Spreadtrum sprd-timer, FSL cpm_qe, FSL fsl,ls-scfg-msi, FSL q(b)man-*, FSL qoriq-mc, and img,pdc-wdt bindings to DT schema - Drop obsolete stericsson,abx500.txt DT core: - Update dtc to upstream version v1.7.0-93-g1df7b047fe43 - Add support to run DT validation on DTs with applied overlays - Add helper for creating boolean properties in dynamic nodes and use that for dynamic PCI nodes - Clean-up early parsing of '#{address,size}-cells'" * tag 'devicetree-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (39 commits) dt-bindings: timer: sprd-timer: convert to YAML dt-bindings: incomplete-devices: document devices without bindings dt-bindings: trivial-devices: document the Sierra Wireless mangOH Green SPI IoT interface scripts/dtc: Update to upstream version v1.7.0-93-g1df7b047fe43 dt-bindings: soc: fsl: Add fsl,ls1028a-reset for reset syscon node dt-bindings: soc: fsl: cpm_qe: convert to yaml format dt-bindings: i2c: i2c-fsi: Convert to json-schema dt-bindings: fsi: Document the FSI Hub Controller dt-bindings: fsi: Document the AST2700 FSI controller dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema dt-bindings: fsi: ibm,i2cr-fsi-master: Reference common FSI controller dt-bindings: fsi: Document the FSI controller common properties dt-bindings: fsi: Document the IBM SBEFIFO engine dt-bindings: fsi: p9-occ: Convert to json-schema dt-bindings: fsi: Document the IBM SCOM engine dt-bindings: fsi: fsi2spi: Document SPI controller child nodes dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml dt-bindings: soc: fsl: Convert q(b)man-* to yaml format dt-bindings: misc: fsl,qoriq-mc: convert to yaml format dt-bindings: drop stale Anson Huang from maintainers ... commit 5b9ac6c2a735f5b1721e0bc7331f8707190f9ef6 Merge: fea17683c4fbb 9e4259716f60c Author: Linus Torvalds Date: Wed Jul 17 18:03:41 2024 -0700 Merge tag 'for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux Pull hardware timestamp update from Dipen Patel: - Add module description in hte test to silence modpost warnings * tag 'for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux: hte: tegra-194: add missing MODULE_DESCRIPTION() macro commit fea17683c4fbb06a727cd94abf4c9588a580ab12 Merge: e0d97b04eceb6 b0eed397623f8 Author: Linus Torvalds Date: Wed Jul 17 17:51:30 2024 -0700 Merge tag 'leds-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: "Core Frameworks: - New trigger for Input Events - New led_mc_set_brightness() call to adapt colour/brightness for mutli-colour LEDs - New lled_mc_trigger_event() call to call the above based on given trigger conditions - New led_get_color_name() call, a wrapper around the existing led_colors[] array - A new flag to avoid automatic renaming of LED devices New Drivers: - Silergy SY7802 Flash LED Controller - Texas Instruments LP5569 LED Controller - ChromeOS EC LED Controller New Device Support: - KTD202{6,7} support for Kinetic KTD2026/7 LEDs Fix-ups: - Replace ACPI/DT firmware helpers with agnostic variants - Make use of resource managed devm_* API calls - Device Tree binding adaptions/conversions/creation - Constify/staticise applicable data structures - Trivial; spelling, whitespace, coding-style adaptions - Drop i2c_device_id::driver_data where the value is unused - Utilise centrally provided helpers and macros to aid simplicity and avoid duplication - Use generic platform device properties instead of OF/ACPI specific ones - Consolidate/de-duplicate various functionality - Remove superfluous/duplicated/unused sections - Make use of the new *_scoped() guard APIs - Improve/simplify error handling Bug Fixes: - Flush pending brightness changes before activating the trigger - Repair incorrect device naming preventing matches - Prevent memory leaks by correctly free resources during error handling routines - Repair locking issue causing circular dependency splats and lock-ups - Unregister sysfs entries before deactivating triggers to prevent use-after issues - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings - Use correct return codes expected by the callers - Omit set_brightness() error message for a LEDs that support only HW triggers" * tag 'leds-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (65 commits) leds: leds-lp5569: Enable chip after chip configuration leds: leds-lp5569: Better handle enabling clock internal setting leds: leds-lp5569: Fix typo in driver name leds: flash: leds-qcom-flash: Test the correct variable in init leds: leds-lp55xx: Convert mutex lock/unlock to guard API leds: leds-lp5523: Convert to sysfs_emit API leds: leds-lp5569: Convert to sysfs_emit API Revert "leds: led-core: Fix refcount leak in of_led_get()" leds: leds-lp5569: Add support for Texas Instruments LP5569 leds: leds-lp55xx: Drop deprecated defines leds: leds-lp55xx: Support ENGINE program up to 128 bytes leds: leds-lp55xx: Generalize sysfs master_fader leds: leds-lp55xx: Generalize sysfs engine_leds leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode leds: leds-lp55xx: Generalize stop_engine function leds: leds-lp55xx: Generalize turn_off_channels function leds: leds-lp55xx: Generalize set_led_current function leds: leds-lp55xx: Generalize multicolor_brightness function leds: leds-lp55xx: Generalize led_brightness function leds: leds-lp55xx: Generalize firmware_loaded function ... commit e0d97b04eceb637a476a2d0233bc7721611a9cb2 Merge: 1200af3ac1648 1df5aa3754cac Author: Linus Torvalds Date: Wed Jul 17 17:48:40 2024 -0700 Merge tag 'backlight-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Drivers: - Texas Instruments LM3509 Backlight Driver Fix-ups: - Device Tree binding adaptions/conversions/creation - Drop i2c_device_id::driver_data where the value is unused - Make use of the new *_scoped() guard APIs - Decouple from fbdev by providing Backlight with its own BACKLIGHT_POWER_* constrains Bug Fixes: - Correctly assess return values (NULL vs IS_ERR()) - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings" * tag 'backlight-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (23 commits) backlight: sky81452-backlight: Use backlight power constants backlight: rave-sp-backlight: Use backlight power constants backlight: pwm-backlight: Use backlight power constants backlight: pcf50633-backlight: Use backlight power constants backlight: pandora-backlight: Use backlight power constants backlight: mp3309c: Use backlight power constants backlight: lm3533-backlight: Use backlight power constants backlight: led-backlight: Use backlight power constants backlight: ktd253-backlight: Use backlight power constants backlight: kb3886-bl: Use backlight power constants backlight: journada_bl: Use backlight power constants backlight: ipaq-micro-backlight: Use backlight power constants backlight: gpio-backlight: Use backlight power constants backlight: corgi-lcd: Use backlight power constants backlight: ams369fb06: Use backlight power constants backlight: aat2870-backlight: Use blacklight power constants backlight: Add BACKLIGHT_POWER_ constants for power states backlight: lm3509_bl: Fix early returns in for_each_child_of_node() backlight: Drop explicit initialization of struct i2c_device_id::driver_data to 0 backlight: Add missing MODULE_DESCRIPTION() macros ... commit 1200af3ac16489d9f0b86000362a044ed7521cf6 Merge: 6e504d2c61244 c298391abf650 Author: Linus Torvalds Date: Wed Jul 17 17:42:20 2024 -0700 Merge tag 'mfd-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - ROHM BD96801 Power Management IC - Cirrus Logic CS40L50 Haptic Driver with Waveform Memory - Marvell 88PM886 Power Management IC New Device Support: - Keyboard Backlight to ChromeOS Embedded Controller - LEDs to ChromeOS Embedded Controller - Charge Control to ChromeOS Embedded Controller - HW Monitoring Service to ChromeOS Embedded Controller - AUXADCs to MediaTek MT635{7,8,9} Power Management ICs New Functionality: - Allow Syscon consumers to supply their own Regmaps on registration Fix-ups: - Constify/staticise applicable data structures - Remove superfluous/duplicated/unused sections - Device Tree binding adaptions/conversions/creation - Trivial; spelling, whitespace, coding-style adaptions - Utilise centrally provided helpers and macros to aid simplicity/duplication - Drop i2c_device_id::driver_data where the value is unused - Replace ACPI/DT firmware helpers with agnostic variants - Move over to GPIOD (descriptor-based) APIs - Annotate a bunch of __counted_by() cases - Straighten out some includes Bug Fixes: - Ensure potentially asserted recent lines are deasserted during initialisation - Avoid ".ko is added to multiple modules" warnings - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings - Fix Wvoid-pointer-to-enum-cast warnings" * tag 'mfd-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (87 commits) mfd: timberdale: Attach device properties to TSC2007 board info mfd: tmio: Move header to platform_data mfd: tmio: Sanitize comments mfd: tmio: Update include files mmc: tmio/sdhi: Fix includes mfd: tmio: Remove obsolete io accessors mfd: tmio: Remove obsolete platform_data watchdog: bd96801_wdt: Add missing include for FIELD_*() dt-bindings: mfd: syscon: Add APM poweroff mailbox dt-bindings: mfd: syscon: Split and enforce documenting MFD children dt-bindings: mfd: rk817: Merge support for RK809 dt-bindings: mfd: rk817: Fixup clocks and reference dai-common dt-bindings: mfd: syscon: Add TI's opp table compatible mfd: omap-usb-tll: Use struct_size to allocate tll dt-bindings: mfd: Explain lack of child dependency in simple-mfd dt-bindings: mfd: Dual licensing for st,stpmic1 bindings mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by mfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode() mfd: lm3533: Move to new GPIO descriptor-based APIs mfd: tps65912: Use devm helper functions to simplify probe ... commit 6e504d2c61244a01226c5100c835e44fb9b85ca8 Merge: 221fd1e154ee5 30b866413e7bd Author: Linus Torvalds Date: Wed Jul 17 17:28:31 2024 -0700 Merge tag 'for-linus-2024071601' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Benjamin Tissoires: - rewrite of the HID-BPF internal implementation to use bpf struct_ops instead of a tracing endpoint (Benjamin Tissoires) - add two new HID-BPF hooks to be able to intercept userspace calls targeting a HID device and filtering them (Benjamin Tissoires) - add support for various new devices through HID-BPF filters (Benjamin Tissoires) - add support for the magic keyboard backlight (Orlando Chamberlain) - add the missing MODULE_DESCRIPTION() macros in HID drivers (Jeff Johnson) - use of kvzalloc in case memory gets too fragmented (Hailong Liu) - retrieve the device firmware node in the child HID device (Danny Kaehn) - some hid-uclogic improvements (José Expósito) - some more typos, trivial fixes, kernel doctext and unused functions cleanups * tag 'for-linus-2024071601' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (60 commits) HID: hid-steam: Fix typo in goto label HID: mcp2221: Remove unnecessary semicolon HID: Fix spelling mistakes "Kensigton" -> "Kensington" HID: add more missing MODULE_DESCRIPTION() macros HID: samples: fix the 2 struct_ops definitions HID: fix for amples in for-6.11/bpf HID: apple: Add support for magic keyboard backlight on T2 Macs HID: bpf: Thrustmaster TCA Yoke Boeing joystick fix HID: bpf: Add Huion Dial 2 bpf fixup HID: bpf: Add support for the XP-PEN Deco Mini 4 HID: bpf: move the BIT() macro to hid_bpf_helpers.h HID: bpf: add a driver for the Huion Inspiroy 2S (H641P) HID: bpf: Add a HID report composition helper macros HID: bpf: doc fixes for hid_hw_request() hooks HID: bpf: doc fixes for hid_hw_request() hooks HID: bpf: fix gcc warning and unify __u64 into u64 selftests/hid: ensure CKI can compile our new tests on old kernels selftests/hid: add an infinite loop test for hid_bpf_try_input_report selftests/hid: add another test for injecting an event from an event hook HID: bpf: allow hid_device_event hooks to inject input reports on self ... commit 221fd1e154ee533c529280bd3866570c086ec792 Merge: a5cb6b2bbff9c 19a01155ddfe5 Author: Linus Torvalds Date: Wed Jul 17 17:09:15 2024 -0700 Merge tag 'for-linus-6.11-1' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some cleanups for device changes coming, and some range checks on data coming from a host to a BMC" * tag 'for-linus-6.11-1' of https://github.com/cminyard/linux-ipmi: ipmi: Drop explicit initialization of struct i2c_device_id::driver_data to 0 ipmi: ssif_bmc: prevent integer overflow on 32bit systems commit a5cb6b2bbff9cdd32aab635ad464a1ee299a63bd Merge: e2f710f97f354 d8b17a364ec48 Author: Linus Torvalds Date: Wed Jul 17 17:05:21 2024 -0700 Merge tag 'platform-drivers-x86-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Ilpo Järvinen: - amd/pmf: Report system state changes using existing input events - asus-wmi: Zenbook 2023 camera LED disable support and fix TUF laptop keyboard RGB LED sysfs interface - dell-pc: Fan modes / platform profile support - hp-wmi: Fix platform profile switching on Omen/Victus laptops - intel/ISST: Use only TPMI interface when TPMI and legacy interfaces are available - intel/pmc: LTR restore support to pair with LTR ignore - intel/tpmi: Performance Limit Reasons (PLR) and APIC <-> Punit CPU numbering mapping support - WMI: driver override support and docs improvements - lenovo-yoga-c630: Support for EC (platform/arm64) - platform/arm64: Fix build with COMPILE_TEST (broke after addition of C630) - tools: Intel Speed Select Turbo Ratio Limit fix - Miscellaneous cleanups / refactoring / improvements * tag 'platform-drivers-x86-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (65 commits) platform/x86: asus-wmi: fix TUF laptop RGB variant platform/x86/intel/tpmi/plr: Fix output in plr_print_bits() Docs/admin-guide: Remove pmf leftover reference from the index platform/x86: ideapad-laptop: use cleanup.h platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function platform: arm64: EC_LENOVO_YOGA_C630 should depend on ARCH_QCOM platform: arm64: EC_ACER_ASPIRE1 should depend on ARCH_QCOM platform/x86/amd/pmf: Remove update system state document platform/x86/amd/pmf: Use existing input event codes to update system states platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops platform/x86:intel/pmc: Add support to undo ltr_ignore platform/x86:intel/pmc: Use the Elvis operator platform/x86:intel/pmc: Use DEFINE_SHOW_STORE_ATTRIBUTE macro platform/x86:intel/pmc: Remove unneeded min_t check platform/x86:intel/pmc: Add support to show ltr_ignore value platform/x86:intel/pmc: Move pmc assignment closer to first usage platform/x86:intel/pmc: Convert index variables to be unsigned platform/x86:intel/pmc: Simplify mutex usage with cleanup helpers platform/x86:intel/pmc: Use the return value of pmc_core_send_msg tools/power/x86/intel-speed-select: v1.20 release ... commit 478a52707b0abe98aac7f8c53ccddb759be66b06 Merge: c58c39163a7e2 1cff1010bef6f Author: Dave Airlie Date: Thu Jul 18 09:19:46 2024 +1000 Merge tag 'amd-drm-next-6.11-2024-07-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.11-2024-07-12: amdgpu: - RAS fixes - SMU fixes - GC 12 updates - SR-IOV fixes - IH 7 updates - DCC fixes - GC 11.5 fixes - DP MST fixes - GFX 9.4.4 fixes - SMU 14 updates - Documentation updates - MAINTAINERS updates - PSR SU fix - Misc small fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240712171637.2581787-1-alexander.deucher@amd.com commit e3615bd198289f319172c428f20857accb46b830 Author: Alex Deucher Date: Tue Jul 16 12:49:25 2024 -0400 drm/amd/display: fix corruption with high refresh rates on DCN 3.0 This reverts commit bc87d666c05a13e6d4ae1ddce41fc43d2567b9a2 and the register changes from commit 6d4279cb99ac4f51d10409501d29969f687ac8dc. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3412 Cc: mikhail.v.gavrilov@gmail.com Cc: Rodrigo Siqueira Tested-by: Mikhail Gavrilov Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.10.x commit cbd070a4ae62f119058973f6d2c984e325bce6e7 Author: Chen Hanxiao Date: Thu Jun 27 14:15:15 2024 +0800 ipvs: properly dereference pe in ip_vs_add_service Use pe directly to resolve sparse warning: net/netfilter/ipvs/ip_vs_ctl.c:1471:27: warning: dereference of noderef expression Fixes: 39b972231536 ("ipvs: handle connections started by real-servers") Signed-off-by: Chen Hanxiao Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 6caf9efaa169faea10a369dd6b36806ae6842584 Author: Michal Luczaj Date: Sat Jul 13 21:41:41 2024 +0200 selftests/bpf: Test sockmap redirect for AF_UNIX MSG_OOB Verify that out-of-band packets are silently dropped before they reach the redirection logic. The idea is to test with a 2 byte long send(). Should a MSG_OOB flag be in use, only the last byte will be treated as out-of-band. Test fails if verd_mapfd indicates a wrong number of packets processed (e.g. if OOB wasn't dropped at the source) or if it was possible to recv() MSG_OOB from the mapped socket, or if any stale OOB data have been left reachable from the unmapped socket. Signed-off-by: Michal Luczaj Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20240713200218.2140950-5-mhal@rbox.co commit 0befb349c4cdcc4e3c2f4aff81259a3a58c3b33e Author: Michal Luczaj Date: Sat Jul 13 21:41:40 2024 +0200 selftests/bpf: Parametrize AF_UNIX redir functions to accept send() flags Extend pairs_redir_to_connected() and unix_inet_redir_to_connected() with a send_flags parameter. Replace write() with send() allowing packets to be sent as MSG_OOB. Signed-off-by: Michal Luczaj Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20240713200218.2140950-4-mhal@rbox.co commit 1b0ad43177c097d38b967b99c2b71d8be28b0223 Author: Michal Luczaj Date: Sat Jul 13 21:41:39 2024 +0200 selftests/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected() Function ignores the AF_UNIX socket type argument, SOCK_DGRAM is hardcoded. Fix to respect the argument provided. Fixes: 75e0e27db6cf ("selftest/bpf: Change udp to inet in some function names") Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20240713200218.2140950-3-mhal@rbox.co commit ee8b8f5d83eb2c9caaebcf633310905ee76856e9 Author: Qiang Ma Date: Wed Jul 17 15:00:43 2024 +0800 efi/libstub: Zero initialize heap allocated struct screen_info After calling uefi interface allocate_pool to apply for memory, we should clear 0 to prevent the possibility of using random values. Signed-off-by: Qiang Ma Cc: # v6.6+ Fixes: 732ea9db9d8a ("efi: libstub: Move screen_info handling to common code") Signed-off-by: Ard Biesheuvel commit 638f32604385fd23059985da8de918e9c18f0b98 Author: Michal Luczaj Date: Sat Jul 13 21:41:38 2024 +0200 af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash AF_UNIX socket tracks the most recent OOB packet (in its receive queue) with an `oob_skb` pointer. BPF redirecting does not account for that: when an OOB packet is moved between sockets, `oob_skb` is left outdated. This results in a single skb that may be accessed from two different sockets. Take the easy way out: silently drop MSG_OOB data targeting any socket that is in a sockmap or a sockhash. Note that such silent drop is akin to the fate of redirected skb's scm_fp_list (SCM_RIGHTS, SCM_CREDENTIALS). For symmetry, forbid MSG_OOB in unix_bpf_recvmsg(). Fixes: 314001f0bf92 ("af_unix: Add OOB support") Suggested-by: Kuniyuki Iwashima Signed-off-by: Michal Luczaj Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20240713200218.2140950-2-mhal@rbox.co commit 3c870059e9f8897c032f4256f90c41ee822218a8 Author: Donald Hunter Date: Wed Jul 17 14:45:08 2024 +0100 bpftool: Fix typo in usage help The usage help for "bpftool prog help" contains a ° instead of the _ symbol for cgroup/sendmsg_unix. Fix the typo. Fixes: 8b3cba987e6d ("bpftool: Add support for cgroup unix socket address hooks") Signed-off-by: Donald Hunter Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240717134508.77488-1-donald.hunter@gmail.com commit 189f1a976e426011e6a5588f1d3ceedf71fe2965 Author: Andrii Nakryiko Date: Fri Jul 12 15:44:42 2024 -0700 libbpf: Fix no-args func prototype BTF dumping syntax For all these years libbpf's BTF dumper has been emitting not strictly valid syntax for function prototypes that have no input arguments. Instead of `int (*blah)()` we should emit `int (*blah)(void)`. This is not normally a problem, but it manifests when we get kfuncs in vmlinux.h that have no input arguments. Due to compiler internal specifics, we get no BTF information for such kfuncs, if they are not declared with proper `(void)`. The fix is trivial. We also need to adjust a few ancient tests that happily assumed `()` is correct. Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") Reported-by: Tejun Heo Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20240712224442.282823-1-andrii@kernel.org commit e2f710f97f3544df08ebe608c8157536e0ffb494 Merge: 01f851a0e87ed 6739fad42af2e Author: Linus Torvalds Date: Wed Jul 17 13:26:01 2024 -0700 Merge tag 'ata-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata updates from Niklas Cassel: - ATA PASS-THROUGH sense data cleanups and fixes (Igor Pylypiv) Store the sense data for ATA PASS-THROUGH commands at the correct offset in the sense buffer when using fixed format sense data. Cleanup the logic related to generating sense data for PASS-THROUGH commands. Generating sense data for PASS-THROUGH commands would overwrite any eventual (real) sense data received from the device. Honor the D_SENSE bit when generating sense data for PASS-THROUGH commands. (The D_SENSE bit can be set by the user, and determines if the returned sense data should be in fixed format or descriptor format) - ata port allocation cleanups (me) Assign the ata port print_id at port allocation time, such that the ata_port_* print functions can be used earlier in the init call chain. Change the ata port port print_id to use ida_alloc(), such that print_ids will get reused on rmmod + modprobe, instead of being incremented indefinitely. Remove wrappers that only existed in order to export the internal libata functions which they wrapped, and instead export the libata functions directly. - Update SATA_MOBILE_LPM_POLICY Kconfig default to med_power_with_dipm (Mario Limonciello) Using this default was not always a good idea before, because it would break hot plug support. However, with LPM changes in recent kernels, a port marked as external will not enable LPM (in order to not break hot plug), so it is now safe to change the default value of this Kconfig. All major Linux distros have had SATA_MOBILE_LPM_POLICY set to med_power_with_dipm for quite a long time - Convert ahci-fsl-qoriq device tree binding to yaml format (Frank Li) * tag 'ata-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: dt-bindings: ata: ahci-fsl-qoriq: add fsl,ls1046a-ahci and fsl,ls1012a-ahci ata: ahci: Add debug print for external port ata,scsi: Remove wrapper ata_sas_port_alloc() ata: libata-core: Reuse available ata_port print_ids ata: libata: Assign print_id at port allocation time ata: libata-core: Remove local_port_no struct member ata: libata-sata: Remove superfluous assignment in ata_sas_port_alloc() ata: libata-core: Remove support for decreasing the number of ports ata: libata: Remove unused function declaration for ata_scsi_detect() ata,scsi: Remove wrappers ata_sas_tport_{add,delete}() ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf ata: libata-core: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() ata: libata-scsi: Do not pass ATA device id to ata_to_sense_error() ata: libata-scsi: Remove redundant sense_buffer memsets ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1 ata: libata-scsi: Fix offsets for the fixed format sense data dt-bindings: ata: ahci-fsl-qoriq: convert to yaml format ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm commit 01f851a0e87ed64db7081a472061650e96dfb798 Merge: 8b0f0bb27c32e df2f9708ff1f2 Author: Linus Torvalds Date: Wed Jul 17 13:24:24 2024 -0700 Merge tag 'zonefs-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs update from Damien Le Moal: "A single change to enable support for large folios (from Johannes)" * tag 'zonefs-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: enable support for large folios commit 92717bc077892d1ce60fee07aee3a33f33909b85 Author: James Clark Date: Mon Jul 15 10:47:13 2024 +0100 perf dso: Fix build when libunwind is enabled Now that symsrc_filename is always accessed through an accessor, we also need a free() function for it to avoid the following compilation error: util/unwind-libunwind-local.c:416:12: error: lvalue required as unary ‘&’ operand 416 | zfree(&dso__symsrc_filename(dso)); Fixes: 1553419c3c10 ("perf dso: Fix address sanitizer build") Signed-off-by: James Clark Reviewed-by: Ian Rogers Tested-by: Leo Yan Tested-by: Florian Fainelli Cc: Yunseong Kim Cc: Athira Rajeev Link: https://lore.kernel.org/r/20240715094715.3914813-1-james.clark@linaro.org Signed-off-by: Namhyung Kim commit 2085948e5f8b31c1ec1bc92413794d11ff749bb2 Author: Guilherme Amadio Date: Wed Jul 17 19:47:39 2024 +0200 tools/latency: Use pkg-config in lib_setup of Makefile.config This allows to build against libtraceevent and libtracefs installed in non-standard locations. Signed-off-by: Guilherme Amadio Tested-by: Thorsten Leemhuis Tested-by: Leo Yan Acked-by: Steven Rostedt (Google) Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20240717174739.186988-6-amadio@gentoo.org Signed-off-by: Namhyung Kim commit eb545a42d0f1da8dd1a09072cff18f5605add05b Author: Guilherme Amadio Date: Fri Jul 12 21:40:49 2024 +0200 tools/rtla: Use pkg-config in lib_setup of Makefile.config This allows to build against libtraceevent and libtracefs installed in non-standard locations. Signed-off-by: Guilherme Amadio Tested-by: Thorsten Leemhuis Tested-by: Leo Yan Acked-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20240712194511.3973899-5-amadio@gentoo.org Signed-off-by: Namhyung Kim commit e525eff7cc334e1c7450c6bc952bfc35b9d74500 Author: Guilherme Amadio Date: Fri Jul 12 21:40:48 2024 +0200 tools/verification: Use pkg-config in lib_setup of Makefile.config This allows to build against libtraceevent and libtracefs installed in non-standard locations. Signed-off-by: Guilherme Amadio Tested-by: Thorsten Leemhuis Tested-by: Leo Yan Acked-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20240712194511.3973899-4-amadio@gentoo.org Signed-off-by: Namhyung Kim commit 8f61e98ad51f167de148488b1881de72fec0d563 Author: Guilherme Amadio Date: Wed Jul 17 19:47:36 2024 +0200 tools: Make pkg-config dependency checks usable by other tools Other tools, in tools/verification and tools/tracing, make use of libtraceevent and libtracefs as dependencies. This allows setting up the feature check flags for them as well. Signed-off-by: Guilherme Amadio Tested-by: Thorsten Leemhuis Tested-by: Leo Yan Acked-by: Steven Rostedt (Google) Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20240717174739.186988-3-amadio@gentoo.org Signed-off-by: Namhyung Kim commit 37ac347f87b616525e0fd397cfc9a163328173aa Author: Guilherme Amadio Date: Wed Jul 17 19:47:35 2024 +0200 perf build: Warn if libtracefs is not found Signed-off-by: Guilherme Amadio Tested-by: Thorsten Leemhuis Tested-by: Leo Yan Acked-by: Steven Rostedt (Google) Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20240717174739.186988-2-amadio@gentoo.org Signed-off-by: Namhyung Kim commit 8b0f0bb27c32ed46da0d67d056a6aacccd7c48bf Merge: d60183211494d 322a6aff03937 Author: Linus Torvalds Date: Wed Jul 17 13:11:42 2024 -0700 Merge tag 'fs_for_v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull udf, ext2, isofs fixes and cleanups from Jan Kara: - A few UDF cleanups and fixes for handling corrupted filesystems - ext2 fix for handling of corrupted filesystem - isofs module description - jbd2 module description * tag 'fs_for_v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Verify bitmap and itable block numbers before using them udf: prevent integer overflow in udf_bitmap_free_blocks() udf: Avoid excessive partition lengths udf: Drop load_block_bitmap() wrapper udf: Avoid using corrupted block bitmap buffer udf: Fix bogus checksum computation in udf_rename() udf: Fix lock ordering in udf_evict_inode() udf: Drop pointless IS_IMMUTABLE and IS_APPEND check isofs: add missing MODULE_DESCRIPTION() jbd2: add missing MODULE_DESCRIPTION() commit d60183211494de0d6af04f82dd3fc301e5562724 Merge: bf3aa9de7ba57 172e422ffea20 Author: Linus Torvalds Date: Wed Jul 17 13:07:53 2024 -0700 Merge tag 'fsnotify_for_v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify fix from Jan Kara: "Fix possible softlockups on directories with many dentries in fsnotify code" * tag 'fsnotify_for_v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: clear PARENT_WATCHED flags lazily commit bf3aa9de7ba57c2c7b5ea70c1ad3a6670cd6fcb0 Merge: 0260b0a7445c6 2bf6e353542d2 Author: Linus Torvalds Date: Wed Jul 17 12:57:48 2024 -0700 Merge tag 'xfs-6.11-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Chandan Babu: "Major changes in this release are limited to enabling FITRIM on realtime devices and Byte-based grant head log reservation tracking. The remaining changes are limited to fixes and cleanups included in this pull request. Core: - Enable FITRIM on the realtime device - Introduce byte-based grant head log reservation tracking instead of physical log location tracking. This allows grant head to track a full 64 bit bytes space and hence overcome the limit of 4GB indexing that has been present until now Fixes: - xfs_flush_unmap_range() and xfs_prepare_shift() should consider RT extents in the flush unmap range - Implement bounds check when traversing log operations during log replay - Prevent out of bounds access when traversing a directory data block - Prevent incorrect ENOSPC when concurrently performing file creation and file writes - Fix rtalloc rotoring when delalloc is in use Cleanups: - Clean up I/O path inode locking helpers and the page fault handler - xfs: hoist inode operations to libxfs in anticipation of the metadata inode directory feature, which maintains a directory tree of metadata inodes. This will be necessary for further enhancements to the realtime feature, subvolume support - Clean up some warts in the extent freeing log intent code - Clean up the refcount and rmap intent code before adding support for realtime devices - Provide the correct email address for sysfs ABI documentation" * tag 'xfs-6.11-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (80 commits) xfs: fix rtalloc rotoring when delalloc is in use xfs: get rid of xfs_ag_resv_rmapbt_alloc xfs: skip flushing log items during push xfs: grant heads track byte counts, not LSNs xfs: pass the full grant head to accounting functions xfs: track log space pinned by the AIL xfs: collapse xlog_state_set_callback in caller xfs: l_last_sync_lsn is really AIL state xfs: ensure log tail is always up to date xfs: background AIL push should target physical space xfs: AIL doesn't need manual pushing xfs: move and rename xfs_trans_committed_bulk xfs: fix the contact address for the sysfs ABI documentation xfs: Avoid races with cnt_btree lastrec updates xfs: move xfs_refcount_update_defer_add to xfs_refcount_item.c xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one xfs: don't bother calling xfs_refcount_finish_one_cleanup in xfs_refcount_finish_one xfs: reuse xfs_refcount_update_cancel_item xfs: add a ci_entry helper xfs: remove xfs_trans_set_refcount_flags ... commit 0260b0a7445c62a08938fa66fad256e5d0779817 Merge: a1b547f0f217c 89fc548767a21 Author: Linus Torvalds Date: Wed Jul 17 12:53:47 2024 -0700 Merge tag 'exfat-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Fix deadlock issue reported by syzbot - Handle idmapped mounts * tag 'exfat-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix potential deadlock on __exfat_get_dentry_set exfat: handle idmapped mounts commit a1b547f0f217cfb06af7eb4ce8488b02d83a0370 Merge: 6706415bf9f3d 8e7860543a947 Author: Linus Torvalds Date: Wed Jul 17 12:38:04 2024 -0700 Merge tag 'for-6.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "The highlights are new logic behind background block group reclaim, automatic removal of qgroup after removing a subvolume and new 'rescue=' mount options. The rest is optimizations, cleanups and refactoring. User visible features: - dynamic block group reclaim: - tunable framework to avoid situations where eager data allocations prevent creating new metadata chunks due to lack of unallocated space - reuse sysfs knob bg_reclaim_threshold (otherwise used only in zoned mode) for a fixed value threshold - new on/off sysfs knob "dynamic_reclaim" calculating the value based on heuristics, aiming to keep spare working space for relocating chunks but not to needlessly relocate partially utilized block groups or reclaim newly allocated ones - stats are exported in sysfs per block group type, files "reclaim_*" - this may increase IO load at unexpected times but the corner case of no allocatable block groups is known to be worse - automatically remove qgroup of deleted subvolumes: - adjust qgroup removal conditions, make sure all related subvolume data are already removed, or return EBUSY, also take into account setting of sysfs drop_subtree_threshold - also works in squota mode - mount option updates: new modes of 'rescue=' that allow to mount images (read-only) that could have been partially converted by user space tools - ignoremetacsums - invalid metadata checksums are ignored - ignoresuperflags - super block flags that track conversion in progress (like UUID or checksums) Core: - size of struct btrfs_inode is now below 1024 (on a release config), improved memory packing and other secondary effects - switch tracking of open inodes from rb-tree to xarray, minor performance improvement - reduce number of empty transaction commits when there are no dirty data/metadata - memory allocation optimizations (reduced numbers, reordering out of critical sections) - extent map structure optimizations and refactoring, more sanity checks - more subpage in zoned mode preparations or fixes - general snapshot code cleanups, improvements and documentation - tree-checker updates: more file extent ram_bytes fixes, continued - raid-stripe-tree update (not backward compatible): - remove extent encoding field from the structure, can be inferred from other information - requires btrfs-progs 6.9.1 or newer - cleanups and refactoring - error message updates - error handling improvements - return type and parameter cleanups and improvements" * tag 'for-6.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (152 commits) btrfs: fix extent map use-after-free when adding pages to compressed bio btrfs: fix bitmap leak when loading free space cache on duplicate entry btrfs: remove the BUG_ON() inside extent_range_clear_dirty_for_io() btrfs: move extent_range_clear_dirty_for_io() into inode.c btrfs: enhance compression error messages btrfs: fix data race when accessing the last_trans field of a root btrfs: rename the extra_gfp parameter of btrfs_alloc_page_array() btrfs: remove the extra_gfp parameter from btrfs_alloc_folio_array() btrfs: introduce new "rescue=ignoresuperflags" mount option btrfs: introduce new "rescue=ignoremetacsums" mount option btrfs: output the unrecognized super block flags as hex btrfs: remove unused Opt enums btrfs: tree-checker: add extra ram_bytes and disk_num_bytes check btrfs: fix the ram_bytes assignment for truncated ordered extents btrfs: make validate_extent_map() catch ram_bytes mismatch btrfs: ignore incorrect btrfs_file_extent_item::ram_bytes btrfs: cleanup the bytenr usage inside btrfs_extent_item_to_extent_map() btrfs: fix typo in error message in btrfs_validate_super() btrfs: move the direct IO code into its own file btrfs: pass a btrfs_inode to btrfs_set_prop() ... commit 6706415bf9f3dcb425f4b60a08a3a6f1d94ec0e0 Merge: f097ef0e7625f f75efefb6db30 Author: Linus Torvalds Date: Wed Jul 17 12:23:33 2024 -0700 Merge tag 'gfs2-v6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: "Fixes and cleanups: - Revise the glock reference counting model and LRU list handling to be more sensible - Several quota related fixes: clean up the quota code, add some missing locking, and work around the on-disk corruption that the reverted patch "gfs2: ignore negated quota changes" causes - Clean up the glock demote logic in glock_work_func()" * tag 'gfs2-v6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (29 commits) gfs2: Clean up glock demote logic gfs2: Revert "check for no eligible quota changes" gfs2: Be more careful with the quota sync generation gfs2: Get rid of some unnecessary quota locking gfs2: Add some missing quota locking gfs2: Fold qd_fish into gfs2_quota_sync gfs2: quota need_sync cleanup gfs2: Fix and clean up function do_qc gfs2: Revert "Add quota_change type" gfs2: Revert "ignore negated quota changes" gfs2: qd_check_sync cleanups gfs2: Revert "introduce qd_bh_get_or_undo" gfs2: Check quota consistency on mount gfs2: Minor gfs2_quota_init error path cleanup gfs2: Get rid of demote_ok checks Revert "GFS2: Don't add all glocks to the lru" gfs2: Revise glock reference counting model gfs2: Switch to a per-filesystem glock workqueue gfs2: Report when glocks cannot be freed for a long time gfs2: gfs2_glock_get cleanup ... commit f097ef0e7625f70844ddaba60ca43d421db5b1b0 Merge: 586f14a6a182b 89b01913dc73d Author: Linus Torvalds Date: Wed Jul 17 12:16:22 2024 -0700 Merge tag 'dlm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: - New flag DLM_LSFL_SOFTIRQ_SAFE can be set by code using dlm to indicate callbacks can be run from softirq - Change md-cluster to set DLM_LSFL_SOFTIRQ_SAFE - Clean up for previous changes, e.g. unused code and parameters - Remove custom pre-allocation of rsb structs which is unnecessary with kmem caches - Change idr to xarray for lkb structs in use - Change idr to xarray for rsb structs being recovered - Change outdated naming related to internal rsb states - Fix some incorrect add/remove of rsb on scan list - Use rcu to free rsb structs * tag 'dlm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: add rcu_barrier before destroy kmem cache dlm: remove DLM_LSFL_SOFTIRQ from exflags fs: dlm: remove unused struct 'dlm_processed_nodes' md-cluster: use DLM_LSFL_SOFTIRQ for dlm_new_lockspace() dlm: implement LSFL_SOFTIRQ_SAFE dlm: introduce DLM_LSFL_SOFTIRQ_SAFE dlm: use LSFL_FS to check for kernel lockspace dlm: use rcu to avoid an extra rsb struct lookup dlm: fix add_scan and del_scan usage dlm: change list and timer names dlm: move recover idr to xarray datastructure dlm: move lkb idr to xarray datastructure dlm: drop own rsb pre allocation mechanism dlm: remove ls_local_handle from struct dlm_ls dlm: remove unused parameter in dlm_midcomms_addr dlm: don't kref_init rsbs created for toss list dlm: remove scand leftovers commit 586f14a6a182bbdb9404dc66464dcd8d0ac175a3 Merge: 586a7a854234b a3c10bed330b7 Author: Linus Torvalds Date: Wed Jul 17 12:10:37 2024 -0700 Merge tag 'erofs-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "Updates for folio conversions for compressed inodes: While large folio support for compressed data could work now, it remains disabled since the stress test could hang due to page migration in a few hours after enabling it. I need more time to investigate further before enabling this feature. Additionally, clean up stream decompressors and tracepoints for simplicity. Summary: - More folio conversions for compressed inodes - Stream decompressor (LZMA/DEFLATE/ZSTD) cleanups - Minor tracepoint cleanup" * tag 'erofs-for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: silence uninitialized variable warning in z_erofs_scan_folio() erofs: avoid refcounting short-lived pages erofs: get rid of z_erofs_map_blocks_iter_* tracepoints erofs: tidy up stream decompressors erofs: refine z_erofs_{init,exit}_subsystem() erofs: move each decompressor to its own source file erofs: tidy up `struct z_erofs_bvec` erofs: teach z_erofs_scan_folios() to handle multi-page folios erofs: convert z_erofs_read_fragment() to folios erofs: convert z_erofs_pcluster_readmore() to folios commit 586a7a854234b0a48b0e188ad11896fd2764174f Merge: 48f8bfd4810e5 769d20028f45a Author: Linus Torvalds Date: Wed Jul 17 12:00:49 2024 -0700 Merge tag 'nfsd-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "This is a light release containing optimizations, code clean-ups, and minor bug fixes. This development cycle focused on work outside of upstream kernel development: - Continuing to build upstream CI for NFSD based on kdevops - Continuing to focus on the quality of NFSD in LTS kernels - Participation in IETF nfsv4 WG discussions about NFSv4 ACLs, directory delegation, and NFSv4.2 COPY offload Notable features for v6.11 that do not come through the NFSD tree include NFS server-side support for the new pNFS NVMe layout type [RFC9561]. Functional testing for pNFS block layouts like this one has been introduced to our kdevops CI harness. Work on improving the resolution of file attribute time stamps in local filesystems is also ongoing tree-wide. As always I am grateful to NFSD contributors, reviewers, testers, and bug reporters who participated during this cycle" * tag 'nfsd-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey MAINTAINERS: Add a bugzilla link for NFSD nfsd: new netlink ops to get/set server pool_mode sunrpc: refactor pool_mode setting code nfsd: allow passing in array of thread counts via netlink nfsd: make nfsd_svc take an array of thread counts sunrpc: fix up the special handling of sv_nrpools == 1 SUNRPC: Add a trace point in svc_xprt_deferred_close NFSD: Support write delegations in LAYOUTGET lockd: Use *-y instead of *-objs in Makefile NFSD: Fix nfsdcld warning svcrdma: Handle ADDR_CHANGE CM event properly svcrdma: Refactor the creation of listener CMA ID NFSD: remove unused structs 'nfsd3_voidargs' NFSD: harden svcxdr_dupstr() and svcxdr_tmpalloc() against integer overflows commit 48f8bfd4810e5e2b5de40328aa007733ce3372e3 Merge: 51835949dda37 0aef1d41c61b5 Author: Linus Torvalds Date: Wed Jul 17 11:53:23 2024 -0700 Merge tag 'affs-6.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull affs updates from David Sterba: - conversions of one-element arrays to flexible arrays * tag 'affs-6.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: struct slink_front: Replace 1-element array with flexible array affs: struct affs_data_head: Replace 1-element array with flexible array affs: struct affs_head: Replace 1-element array with flexible array commit 0756bec2e45b206ccb5fc3e8791c08d696dd06f7 Author: Jeff Johnson Date: Mon Jul 15 12:27:09 2024 -0700 vfio-mdev: add missing MODULE_DESCRIPTION() macros Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), a module without a MODULE_DESCRIPTION() will result in a warning with make W=1. The following warnings are being observed in samples/vfio-mdev: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mtty.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy-fb.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mbochs.o Add the missing invocations of the MODULE_DESCRIPTION() macro to these modules. And in the case of mtty.c, remove the now redundant instance of the MODULE_INFO() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240715-md-vfio-mdev-v2-1-59a4c5e924bc@quicinc.com Signed-off-by: Alex Williamson commit a0328b397f3339d8d17a6ec356e94b3c110b010c Author: Foryun Ma Date: Tue Jun 4 11:21:51 2024 +0800 cxl/core/pci: Move reading of control register to immediately before usage Relocate the reading of the DVSEC control register to immediately before usage and avoid unnecessary PCI config access from the read if DVSEC capability check, hdm_count check, or device validity check results in failure. Signed-off-by: Foryun Ma Reviewed-by: Jonathan Cameron Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20240604032151.655-1-foryun.ma@jaguarmicro.com Signed-off-by: Dave Jiang commit c638b130e83e4aa47031c0e51455ecc961dfdc3d Author: Naveen N Rao Date: Sun Jul 14 14:04:24 2024 +0530 MAINTAINERS: Update powerpc BPF JIT maintainers Hari Bathini has been updating and maintaining the powerpc BPF JIT since a while now. Christophe Leroy has been doing the same for 32-bit powerpc. Add them as maintainers for the powerpc BPF JIT. I am no longer actively looking into the powerpc BPF JIT. Change my role to that of a reviewer so that I can help with the odd query. Signed-off-by: Naveen N Rao Signed-off-by: Daniel Borkmann Reviewed-by: Masami Hiramatsu (Google) Acked-by: Christophe Leroy Acked-by: Hari Bathini Link: https://lore.kernel.org/bpf/24fea21d9d4458973aadd6a02bb1bf558b8bd0b2.1720944897.git.naveen@kernel.org commit afcc8e1ef7bb5c14100ba3e6ccfd4baebc80242e Author: Naveen N Rao Date: Sun Jul 14 14:04:23 2024 +0530 MAINTAINERS: Update email address of Naveen I have switched to using my @kernel.org id for my contributions. Update MAINTAINERS and mailmap to reflect the same. Signed-off-by: Naveen N Rao Signed-off-by: Daniel Borkmann Reviewed-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/bpf/fb6ef126771c70538067709af69d960da3560ce7.1720944897.git.naveen@kernel.org commit e1ef78dce9b7b0fa7f9d88bb3554441d74d33b34 Author: Puranjay Mohan Date: Mon Jul 15 17:33:27 2024 +0000 selftests/bpf: fexit_sleep: Fix stack allocation for arm64 On ARM64 the stack pointer should be aligned at a 16 byte boundary or the SPAlignmentFault can occur. The fexit_sleep selftest allocates the stack for the child process as a character array, this is not guaranteed to be aligned at 16 bytes. Because of the SPAlignmentFault, the child process is killed before it can do the nanosleep call and hence fentry_cnt remains as 0. This causes the main thread to hang on the following line: while (READ_ONCE(fexit_skel->bss->fentry_cnt) != 2); Fix this by allocating the stack using mmap() as described in the example in the man page of clone(). Remove the fexit_sleep test from the DENYLIST of arm64. Fixes: eddbe8e65214 ("selftest/bpf: Add a test to check trampoline freeing logic.") Signed-off-by: Puranjay Mohan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240715173327.8657-1-puranjay@kernel.org commit a308996ed7c02d1cd6504ce73436ef3f1c1c75c0 Author: Christoph Hellwig Date: Thu Jul 11 09:17:03 2024 +0200 nfs: split nfs_read_folio nfs_read_folio is a bit hard to follow because it mixes highlevel logic with the actual data read. Split the latter into a helper and update the comments to be more accurate. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit fada32ed6dbc748f447c8d050a961b75d946055a Author: Christoph Hellwig Date: Thu Jul 11 09:17:02 2024 +0200 nfs: pass explicit offset/count to trace events nfs_folio_length is unsafe to use without having the folio locked and a check for a NULL ->f_mapping that protects against truncations and can lead to kernel crashes. E.g. when running xfstests generic/065 with all nfs trace points enabled. Follow the model of the XFS trace points and pass in an explіcit offset and length. This has the additional benefit that these values can be more accurate as some of the users touch partial folio ranges. Fixes: eb5654b3b89d ("NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio()") Reported-by: Chuck Lever Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 0935ee6032dfe68bd1f8ddf4c43b618d7beafc69 Author: Florian Westphal Date: Mon Jul 15 13:55:29 2024 +0200 selftests: netfilter: add test case for recent mismatch bug Without 'netfilter: nf_set_pipapo: fix initial map fill' this fails: TEST: reported issues Add two elements, flush, re-add 1s [ OK ] net,mac with reload 1s [ OK ] net,port,proto 1s [FAIL] post-add: should have returned 10.5.8.0/24 . 51-60 . 6-17 but got table inet filter { set test { type ipv4_addr . inet_service . inet_proto flags interval,timeout elements = { 10.5.7.0/24 . 51-60 . 6-17 } } } The other sets defined in the selftest do not trigger this bug, it only occurs if the first field group bitsize is smaller than the largest group bitsize. For each added element, check 'get' works and actually returns the requested range. After map has been filled, check all added ranges can still be retrieved. For each deleted element, check that 'get' fails. Based on a reproducer script from Yi Chen. Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 791a615b7ad2258c560f91852be54b0480837c93 Author: Florian Westphal Date: Mon Jul 15 13:54:03 2024 +0200 netfilter: nf_set_pipapo: fix initial map fill The initial buffer has to be inited to all-ones, but it must restrict it to the size of the first field, not the total field size. After each round in the map search step, the result and the fill map are swapped, so if we have a set where f->bsize of the first element is smaller than m->bsize_max, those one-bits are leaked into future rounds result map. This makes pipapo find an incorrect matching results for sets where first field size is not the largest. Followup patch adds a test case to nft_concat_range.sh selftest script. Thanks to Stefano Brivio for pointing out that we need to zero out the remainder explicitly, only correcting memset() argument isn't enough. Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Reported-by: Yi Chen Cc: Stefano Brivio Signed-off-by: Florian Westphal Reviewed-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 782161895eb4ac45cf7cfa8db375bd4766cb8299 Author: Pablo Neira Ayuso Date: Sat Jul 13 16:47:38 2024 +0200 netfilter: ctnetlink: use helper function to calculate expect ID Delete expectation path is missing a call to the nf_expect_get_id() helper function to calculate the expectation ID, otherwise LSB of the expectation object address is leaked to userspace. Fixes: 3c79107631db ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id") Reported-by: zdi-disclosures@trendmicro.com Signed-off-by: Pablo Neira Ayuso commit 332d2c1d713e232e163386c35a3ba0c1b90df83f Author: Michael Roth Date: Wed May 1 03:52:10 2024 -0500 crypto: ccp: Add the SNP_VLEK_LOAD command When requesting an attestation report a guest is able to specify whether it wants SNP firmware to sign the report using either a Versioned Chip Endorsement Key (VCEK), which is derived from chip-unique secrets, or a Versioned Loaded Endorsement Key (VLEK) which is obtained from an AMD Key Derivation Service (KDS) and derived from seeds allocated to enrolled cloud service providers (CSPs). For VLEK keys, an SNP_VLEK_LOAD SNP firmware command is used to load them into the system after obtaining them from the KDS. Add a corresponding userspace interface so to allow the loading of VLEK keys into the system. See SEV-SNP Firmware ABI 1.54, SNP_VLEK_LOAD for more details. Reviewed-by: Tom Lendacky Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-21-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 5f7c72df1ba6ba00ee163ba4049c785ac5930759 Author: Steven Rostedt (Google) Date: Mon Jul 15 14:47:45 2024 -0400 tracing: Update MAINTAINERS file Gone but never forgotten. [ Also moved Daniel's name to be consistent with the alphabetical order ] Cc: Mark Rutland Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Juri Lelli Cc: Kate Stewart Cc: Clark Williams Cc: "Luis Claudio R. Goncalves" Cc: John Kacur Signed-off-by: Steven Rostedt (Google) Link: https://lore.kernel.org/20240715144745.51d887a9@rorschach.local.home Reviewed-by: Mathieu Desnoyers Reviewed-by: Masami Hiramatsu (Google) commit a19ce320c379e0519b68178c596e43d1d5dda03b Author: Bartosz Golaszewski Date: Fri Jul 12 21:40:04 2024 +0200 power: sequencing: fix an invalid pointer dereference in error path We may end up calling pwrseq_target_free() on a partially initialized target object whose unit is either NULL or an ERR_PTR(). Avoid dereferencing invalid memory by adding an appropriate check to pwrseq_target_free(). Fixes: 249ebf3f65f8 ("power: sequencing: implement the pwrseq core") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-pm/62a3531e-9927-40f8-b587-254a2dfa47ef@stanley.mountain/ Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240712194004.241939-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 0e03c643dc9389e61fa484562dae58c8d6e96d63 Author: Paolo Abeni Date: Wed Jul 17 13:25:06 2024 +0200 eth: fbnic: fix s390 build. Building the fbnic nn s390, yield a build bug: In function ‘fbnic_config_drop_mode_rcq’, inlined from ‘fbnic_enable’ at drivers/net/ethernet/meta/fbnic/fbnic_txrx.c:1836:4: ././include/linux/compiler_types.h:510:45: error: call to ‘__compiletime_assert_919’ declared with attribute error: FIELD_PREP: value too large for the field The relevant mask is 9 bits wide, and the related value is the cacheline aligned size of struct skb_shared_info. On s390 the cacheline size is 256 bytes, and skb_shared_info minimum size on 64 bits system is 320 bytes. Avoid building the driver for such arch. Reported-by: kernel test robot Link: https://lore.kernel.org/202407170432.dYJQOWVz-lkp@intel.com/ Reported-by: Nathan Chancellor Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free") Signed-off-by: Paolo Abeni Link: https://patch.msgid.link/5dfefd3e90e77828f38e68854b171a5b8b8c6ede.1721215379.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit df39038cd89525d465c2c8827eb64116873f141a Author: Gerald Schaefer Date: Mon Jul 15 20:04:16 2024 +0200 s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception() There is no support for HWPOISON, MEMORY_FAILURE, or ARCH_HAS_COPY_MC on s390. Therefore we do not expect to see VM_FAULT_HWPOISON in do_exception(). However, since commit af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general"), it is possible to see VM_FAULT_HWPOISON in combination with PTE_MARKER_POISONED, even on architectures that do not support HWPOISON otherwise. In this case, we will end up on the BUG() in do_exception(). Fix this by treating VM_FAULT_HWPOISON the same as VM_FAULT_SIGBUS, similar to x86 when MEMORY_FAILURE is not configured. Also print unexpected fault flags, for easier debugging. Note that VM_FAULT_HWPOISON_LARGE is not expected, because s390 cannot support swap entries on other levels than PTE level. Cc: stable@vger.kernel.org # 6.6+ Fixes: af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general") Reported-by: Yunseong Kim Tested-by: Yunseong Kim Acked-by: Alexander Gordeev Signed-off-by: Gerald Schaefer Message-ID: <20240715180416.3632453-1-gerald.schaefer@linux.ibm.com> Signed-off-by: Vasily Gorbik commit 1e5597e5ff18d452cf9afa847e904f301d1ac690 Author: Shenghao Ding Date: Wed Jul 17 19:53:04 2024 +0800 ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop Add new vendor_id and subsystem_id in quirk for Lenovo Hera2 Laptop. Signed-off-by: Shenghao Ding Cc: Link: https://patch.msgid.link/20240717115305.723-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai commit 6d834691da474ed1c648753d3d3a3ef8379fa1c1 Author: Jiri Pirko Date: Tue Jul 16 13:35:52 2024 +0200 virtio_pci_modern: remove admin queue serialization lock The admin queue operations are protected by newly introduced spin lock. To make it possible to issue parallel commands, remove the admin queue serialization lock. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-14-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 4c3b54af907e709609d3d8beca92d65e2f0cfd83 Author: Jiri Pirko Date: Tue Jul 16 13:35:51 2024 +0200 virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result Currently, the code waits in a busy loop on every admin virtqueue issued command to get a reply. That prevents callers from issuing multiple commands in parallel. To overcome this limitation, introduce a virtqueue event callback for admin virtqueue. For every issued command, use completion mechanism to wait on a reply. In the event callback, trigger the completion is done for every incoming reply. Alongside with that, introduce a spin lock to protect the admin virtqueue operations. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-13-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 7090f2b5ad33e9b6ba68eb927b02e8a286d21fb4 Author: Jiri Pirko Date: Tue Jul 16 13:35:50 2024 +0200 virtio_pci_modern: pass cmd as an identification token In preparation to asynchronous admin queue processing, pass cmd pointer as a data arg to virtqueue_add_sgs(). Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-12-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit b00c4150c435eed6e80ab302ae3a02a3d41460c3 Author: Jiri Pirko Date: Tue Jul 16 13:35:49 2024 +0200 virtio_pci_modern: create admin queue of queried size Don't limit the admin queue size to VIRTIO_AVQ_SGS_MAX and rather rely on the queried queue size. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-11-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit af22bbe1f4a514c80b89a27252beef033168f4e9 Author: Jiri Pirko Date: Tue Jul 16 13:35:48 2024 +0200 virtio: create admin queues alongside other virtqueues Admin virtqueue is just another virtqueue nothing that special about it. The current implementation treats it somehow separate though in terms of creation and deletion. Unify the admin virtqueue creation and deletion flows to be aligned with the rest of virtqueues, creating it from vp_find_vqs_*() helpers. Let the admin virtqueue to be deleted by vp_del_vqs() as the rest. Call vp_find_one_vq_msix() with slow_path argument being "true" to make sure that in case of limited interrupt vectors the config vector is used for admin queue. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-10-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 89a1c435aec269d109ed46ca7bbb10fa8edf7ace Author: Jiri Pirko Date: Tue Jul 16 13:35:47 2024 +0200 virtio_pci: pass vq info as an argument to vp_setup_vq() Instead vp_setup_vq() storing vq info directly to vp_dev->vqs, let the caller provide a pointer to store the info to. This prepares vp_setup_vq() to be able to store admin queue info as well. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-9-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 7e5d9f556edca687acb04f171af1061042a35927 Author: Jiri Pirko Date: Tue Jul 16 13:35:46 2024 +0200 virtio: push out code to vp_avq_index() To prepare for the follow-up patch to use the code as an op, push out the code that gets admin virtqueue base index and count to a separate helper. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-8-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 4199107e39122e49bbddafb50932943127b63aee Author: Jiri Pirko Date: Tue Jul 16 13:35:45 2024 +0200 virtio_pci_modern: treat vp_dev->admin_vq.info.vq pointer as static It is guaranteed by the virtio_pci and PCI layers that none of the VFs is probed before setup_vq() is called for admin queue and after del_vq() is called for admin queue. Therefore treat vp_dev->admin_vq.info.vq as static, don't null it and don't take cmd lock during assign. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-7-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 06909a4427d6d57757c0a97a4a4be0aea363caab Author: Jiri Pirko Date: Tue Jul 16 13:35:44 2024 +0200 virtio_pci: introduce vector allocation fallback for slow path virtqueues If there is not enough vectors to satisfy all virtqueues, currently the fallback is to use one vector for all virtqueues. That may be unnecessary in some cases, when there is enough vectors per data queues. Introduce another fallback policy that tries to allocate vector for all data queues, however for slow path queues (control/admin) it shares config vector. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-6-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit b8b4e1a05d41c282e63a1772f00e376f6fb84410 Author: Jiri Pirko Date: Tue Jul 16 13:35:43 2024 +0200 virtio_pci: pass vector policy enum to vp_find_one_vq_msix() Instead of accessing vp_dev->per_vq_vectors, pass vector policy enum as an argument of vp_find_one_vq_msix() in preparation for another irq allocation policy. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-5-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit ef775b2627c83f7c521c38fdcf972567c55e4550 Author: Jiri Pirko Date: Tue Jul 16 13:35:42 2024 +0200 virtio_pci: pass vector policy enum to vp_find_vqs_msix() In preparation for another irq allocation fallback, introduce vector policy enum and pass the values to vp_find_vqs_msix() instead of bool arg. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-4-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 572864d45d61c69aa99461e944f43d3b95c5e159 Author: Jiri Pirko Date: Tue Jul 16 13:35:41 2024 +0200 virtio_pci: simplify vp_request_msix_vectors() call a bit Pass desc arg as it is always to vp_request_msix_vectors(). There rely on per_vq_vectors arg and null desc in case it is false. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-3-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit de128f3f6317b8568311d9f9eb5e0425ebc23a03 Author: Jiri Pirko Date: Tue Jul 16 13:35:40 2024 +0200 virtio_pci: push out single vq find code to vp_find_one_vq_msix() In order to be reused for admin queue setup, push out common code to setup and configure irq for one vq into a separate helper. Signed-off-by: Jiri Pirko Message-Id: <20240716113552.80599-2-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit e14f480df7fbcb0c84ce9142c861701495d9b6e2 Author: Dan Carpenter Date: Fri Jul 12 09:06:12 2024 -0500 vdpa/octeon_ep: Fix error code in octep_process_mbox() Return -EINVAL for invalid signatures. Don't return success. Fixes: 8b6c724cdab8 ("virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices") Signed-off-by: Dan Carpenter Message-Id: <623e885b-1a05-479e-ab97-01bcf10bf5b8@stanley.mountain> Signed-off-by: Michael S. Tsirkin commit 69eced9eb49aa6a55c9ef5745b0826fe0b74ff0f Author: Jeff Johnson Date: Sun Jun 2 13:25:28 2024 -0700 virtio: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/virtio/virtio_dma_buf.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Message-Id: <20240602-md-virtio_dma_buf-v1-1-ce602d47e257@quicinc.com> Signed-off-by: Michael S. Tsirkin commit 6c85d6b653caeba2ef982925703cbb4f2b3b3163 Author: Jiri Pirko Date: Mon Jul 8 09:48:14 2024 +0200 virtio: rename virtio_find_vqs_info() to virtio_find_vqs() Since the original virtio_find_vqs() is no longer present, rename virtio_find_vqs_info() back to virtio_find_vqs(). Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-20-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 3e8d51c7765dac2a70fe2ad222a8ad244c9f29a4 Author: Jiri Pirko Date: Mon Jul 8 09:48:13 2024 +0200 virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx() helpers All callers of virtio_find_vqs() and virtio_find_vqs_ctx() were converted to use virtio_find_vqs_info(). Remove no longer used helpers. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-19-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit c95e67bac42d7e671e6a2c14548b6a7f76e71235 Author: Jiri Pirko Date: Mon Jul 8 09:48:12 2024 +0200 virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), have one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-18-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 7221922da2a1eb8bbc8d6570cec1197c8f484517 Author: Jiri Pirko Date: Mon Jul 8 09:48:11 2024 +0200 virtio_balloon: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), have one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-17-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit fc496dcd935c23a0b4425e34f82c2ec33c2893f6 Author: Jiri Pirko Date: Mon Jul 8 09:48:10 2024 +0200 virtiofs: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), allocate one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-16-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit a6da214b7c9d8f1c32e1d1844c78f764db63cd48 Author: Jiri Pirko Date: Mon Jul 8 09:48:09 2024 +0200 scsi: virtio_scsi: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), allocate one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-15-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit c2c6325e1645b56cc5784c288686e11d649c453e Author: Jiri Pirko Date: Mon Jul 8 09:48:08 2024 +0200 virtio_net: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs_ctx(), allocate one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-14-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 210a70f22dd09559c2fdc0135aecdd6fe01d724e Author: Jiri Pirko Date: Mon Jul 8 09:48:07 2024 +0200 virtio_crypto: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), allocate one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-13-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit cd54c623a80bf818c72eb09051e462157d04cad4 Author: Jiri Pirko Date: Mon Jul 8 09:48:06 2024 +0200 virtio_console: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), allocate one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-12-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 0c60458b1827adbd1ddf7c7dcd2c5b82a449f6df Author: Jiri Pirko Date: Mon Jul 8 09:48:05 2024 +0200 virtio_blk: convert to use virtio_find_vqs_info() Instead of passing separate names and callbacks arrays to virtio_find_vqs(), allocate one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-11-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit b49503eaf9c74c3d0efd1e8331aba37ce3c1fd68 Author: Jiri Pirko Date: Mon Jul 8 09:48:04 2024 +0200 virtio: rename find_vqs_info() op to find_vqs() Since the original find_vqs() is no longer present, rename find_vqs_info() back to find_vqs(). Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-10-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 18cd029fd7f7a85d522973f34c413a2b009255ac Author: Jiri Pirko Date: Mon Jul 8 09:48:03 2024 +0200 virtio: remove the original find_vqs() op As it is no longer used, remove it. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-9-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 992648f5a61f1c9fab800fbc42dea31727cd8a55 Author: Jiri Pirko Date: Mon Jul 8 09:48:02 2024 +0200 virtio: call virtio_find_vqs_info() from virtio_find_single_vq() directly Since there are no more implementations of find_vqs() op, call virtio_find_vqs_info() from virtio_find_single_vq() directly. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-8-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 3c93b576e038577490e8b906025e38b6fd7241b3 Author: Jiri Pirko Date: Mon Jul 8 09:48:01 2024 +0200 virtio: convert find_vqs() op implementations to find_vqs_info() Convert existing find_vqs() transport implementations to use find_vqs_info() config op. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-7-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit ad9a12576bccd4cf1bbef7f8574421804cdff403 Author: Jiri Pirko Date: Mon Jul 8 09:48:00 2024 +0200 virtio_pci: convert vp_*find_vqs() ops to find_vqs_info() Convert existing vp_find_vqs() and vp_modern_find_vqs() implementations to find_vqs_info() config op. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-6-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit c502eb85c34e29bb185e3d15dd9b8fce8a74f303 Author: Jiri Pirko Date: Mon Jul 8 09:47:59 2024 +0200 virtio: introduce virtio_queue_info struct and find_vqs_info() config op Introduce a structure virtio_queue_info to carry name, callback and ctx together. In order to allow config implementations to accept config op with array of virtio_queue_info structures, introduce a new find_vqs_info() op. Do the needed conversion in virtio_find_vqs_ctx(). Note that whole virtio_find_vqs_ctx() is going to be eventually removed at the and of this patchset. Suggested-by: Xuan Zhuo Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-5-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 959538c11a88298672195a0eb3289c0f2f88b02d Author: Jiri Pirko Date: Mon Jul 8 09:47:58 2024 +0200 virtio: make virtio_find_single_vq() call virtio_find_vqs() In order to prepare for conversion of virtio_find_vqs*() arguments, make virtio_find_single_vq() to call virtio_find_vqs() instead of op directly. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-4-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit de1177e56005dccd9729d4ca331de64f5d463b90 Author: Jiri Pirko Date: Mon Jul 8 09:47:57 2024 +0200 virtio: make virtio_find_vqs() call virtio_find_vqs_ctx() In order to prepare for conversion of virtio_find_vqs*() arguments, make virtio_find_vqs() to call virtio_find_vqs_ctx() instead of op directly. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-3-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 87bb477c39b172071a1cb44aef41e701d5fee90d Author: Jiri Pirko Date: Mon Jul 8 09:47:56 2024 +0200 caif_virtio: use virtio_find_single_vq() for single virtqueue finding Since caif uses only one queue, convert to virtio_find_single_vq() helper which is made for this purpose. Signed-off-by: Jiri Pirko Message-Id: <20240708074814.1739223-2-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin commit 256a6f430562c163f1fa07576c4cd4e996e953dd Merge: 0c38364824812 1a7b7326d587c Author: Huacai Chen Date: Wed Jul 17 17:07:11 2024 +0800 Merge tag 'asm-generic-6.11' into loongarch-next LoongArch architecture changes for 6.11 depend on the asm-generic changes to avoid confliction, so merge them to create a base. commit 3bfd7c0ba184de99e9f5083b29e5308f30767265 Author: Takashi Iwai Date: Wed Jul 17 10:33:01 2024 +0200 ALSA: seq: ump: Skip useless ports for static blocks When the UMP Endpoint is configured with static blocks, the block configuration will never change, hence the unused ports will be unchanged as well. Creating sequencer ports for those unused ports is simply useless, and it might be rather confusing for users. The idea behind the inactive ports was for allowing connections from/to ports that can become usable later, but this will never happen for inactive groups in static blocks. Let's change the sequencer UMP binding to skip those unused ports when the UMP EP is with static blocks. Fixes: 81fd444aa371 ("ALSA: seq: Bind UMP device") Cc: Link: https://patch.msgid.link/20240717083322.25892-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 88e98af9f4b5b0d60c1fe7f7f2701b5467691e75 Author: Shengjiu Wang Date: Wed Jul 17 14:44:53 2024 +0800 ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused When suspended, the DMA channel may enter PAUSE state if dmaengine_pause() is supported by DMA. At this state, dmaengine_synchronize() should not be called, otherwise the DMA channel can't be resumed successfully. Fixes: e8343410ddf0 ("ALSA: dmaengine: Synchronize dma channel after drop()") Signed-off-by: Shengjiu Wang Cc: Link: https://patch.msgid.link/1721198693-27636-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Takashi Iwai commit a503f91a3645651a39baf97f1aed90d5d9f9bda9 Author: Piotr Wojtaszczyk Date: Fri Jul 5 13:51:35 2024 +0200 mtd: rawnand: lpx32xx: Fix dma_request_chan() error checks The dma_request_chan() returns error pointer in case of error, while dma_request_channel() returns NULL in case of error therefore different error checks are needed for the two. Fixes: 7326d3fb1ee3 ("mtd: rawnand: lpx32xx: Request DMA channels using DT entries") Signed-off-by: Piotr Wojtaszczyk Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240705115139.126522-1-piotr.wojtaszczyk@timesys.com commit d29e8e28d6d53b3406c214059b8e048fa950a136 Author: Cheng Ming Lin Date: Thu Jul 4 10:48:39 2024 +0800 mtd: spinand: macronix: Add support for serial NAND flash MX35{U,L}F{2,4}G24AD-Z4I8 are Macronix serial NAND flashes. Their main difference from MX35{U,L}F{2,4}G24AD lies in the plane number. The plane number for those with the postfix Z4I8 is 1. These flashes have been validated on Xilinx zynq-picozed board which include Macronix SPI Host. Signed-off-by: Cheng Ming Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240704024839.241101-3-linchengming884@gmail.com commit aacbb6c837dfc0f5bba29318c590fc83a0e83f70 Author: Cheng Ming Lin Date: Thu Jul 4 10:48:38 2024 +0800 mtd: spinand: macronix: Add support for reading Device ID 2 Adding the Device ID 2 on Macronix serial NAND flash. When the number of flashes increases, we need to utilize Device ID 2 to distinguish between different flashes. These flashes have been validated on Xilinx zynq-picozed board which included Macronix SPI Host. Signed-off-by: Cheng Ming Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240704024839.241101-2-linchengming884@gmail.com commit 4782118674600ce1b1622ea66501ff9e484360b1 Author: Piotr Wojtaszczyk Date: Thu Jun 27 17:00:28 2024 +0200 mtd: rawnand: lpx32xx: Request DMA channels using DT entries Move away from pl08x platform data towards device tree. Signed-off-by: Piotr Wojtaszczyk Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240627150046.258795-11-piotr.wojtaszczyk@timesys.com commit 14427d4b883159d179847f1090112221c1abc7bd Author: Rob Herring (Arm) Date: Tue Jun 25 15:56:05 2024 -0600 dt-bindings: mtd: qcom,nandc: Define properties at top-level Convention is DT schemas should define all properties at the top-level and not inside of if/then schemas. That minimizes the if/then schemas and is more future proof. There were 2 "if" schemas for "qcom,ipq806x-nand" and the "qcom,boot-partitions: true" unnecessary, so the conditional schemas can be simplified a bit. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240625215605.192260-1-robh@kernel.org commit e33df1c488d6e2b58064355651adb51901137036 Author: Wolfram Sang Date: Tue Jun 4 23:29:21 2024 +0200 mtd: rawnand: intel: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Fix to the proper variable type 'unsigned long' while here. Signed-off-by: Wolfram Sang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240604212919.5038-6-wsa+renesas@sang-engineering.com commit bf66d81975d4240b46659ea2392fe65d83527140 Author: Wolfram Sang Date: Tue Jun 4 23:29:20 2024 +0200 mtd: rawnand: mxc: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240604212919.5038-5-wsa+renesas@sang-engineering.com commit cbbfb0b4f89733f0152c8a784a24417cd1083f52 Author: Han Xu Date: Mon May 20 12:09:15 2024 -0400 mtd: rawnand: gpmi: add iMX8QXP support. Add "fsl,imx8qxp-gpmi-nand" compatible string. iMX8QXP gpmi nand is similar to iMX7D. But it is using 4 clocks: "gpmi_io", "gpmi_apb", "gpmi_bch" and "gpmi_bch_apb". Signed-off-by: Han Xu Signed-off-by: Frank Li Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240520-gpmi_nand-v2-4-e3017e4c9da5@nxp.com commit 355235842d0a59dc329fa925218ad12a5774e4df Author: Frank Li Date: Mon May 20 12:09:14 2024 -0400 mtd: rawnand: gpmi: add 'support_edo_timing' in gpmi_devdata Introduce a boolean flag, 'support_edo_timing', within gpmi_devdata to simplify the logic check in gpmi_setup_interface(). This is made in preparation for adding support for imx8qxp gpmi. Signed-off-by: Frank Li Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240520-gpmi_nand-v2-3-e3017e4c9da5@nxp.com commit 51835949dda3783d4639cfa74ce13a3c9829de00 Merge: 0434dbe32053d 77ae5e5b00720 Author: Linus Torvalds Date: Tue Jul 16 19:28:34 2024 -0700 Merge tag 'net-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: "Not much excitement - a handful of large patchsets (devmem among them) did not make it in time. Core & protocols: - Use local_lock in addition to local_bh_disable() to protect per-CPU resources in networking, a step closer for local_bh_disable() not to act as a big lock on PREEMPT_RT - Use flex array for netdevice priv area, ensure its cache alignment - Add a sysctl knob to allow user to specify a default rto_min at socket init time. Bit of a big hammer but multiple companies were independently carrying such patch downstream so clearly it's useful - Support scheduling transmission of packets based on CLOCK_TAI - Un-pin TCP TIMEWAIT timer to avoid it firing on CPUs later cordoned off using cpusets - Support multiple L2TPv3 UDP tunnels using the same 5-tuple address - Allow configuration of multipath hash seed, to both allow synchronizing hashing of two routers, and preventing partial accidental sync - Improve TCP compliance with RFC 9293 for simultaneous connect() - Support sending NAT keepalives in IPsec ESP in UDP states. Userspace IKE daemon had to do this before, but the kernel can better keep track of it - Support sending supervision HSR frames with MAC addresses stored in ProxyNodeTable when RedBox (i.e. HSR-SAN) is enabled - Introduce IPPROTO_SMC for selecting SMC when socket is created - Allow UDP GSO transmit from devices with no checksum offload - openvswitch: add packet sampling via psample, separating the sampled traffic from "upcall" packets sent to user space for forwarding - nf_tables: shrink memory consumption for transaction objects Things we sprinkled into general kernel code: - Power Sequencing subsystem (used by Qualcomm Bluetooth driver for QCA6390) [ Already merged separately - Linus ] - Add IRQ information in sysfs for auxiliary bus - Introduce guard definition for local_lock - Add aligned flavor of __cacheline_group_{begin, end}() markings for grouping fields in structures BPF: - Notify user space (via epoll) when a struct_ops object is getting detached/unregistered - Add new kfuncs for a generic, open-coded bits iterator - Enable BPF programs to declare arrays of kptr, bpf_rb_root, and bpf_list_head - Support resilient split BTF which cuts down on duplication and makes BTF as compact as possible WRT BTF from modules - Add support for dumping kfunc prototypes from BTF which enables both detecting as well as dumping compilable prototypes for kfuncs - riscv64 BPF JIT improvements in particular to add 12-argument support for BPF trampolines and to utilize bpf_prog_pack for the latter - Add the capability to offload the netfilter flowtable in XDP layer through kfuncs Driver API: - Allow users to configure IRQ tresholds between which automatic IRQ moderation can choose - Expand Power Sourcing (PoE) status with power, class and failure reason. Support setting power limits - Track additional RSS contexts in the core, make sure configuration changes don't break them - Support IPsec crypto offload for IPv6 ESP and IPv4 UDP-encapsulated ESP data paths - Support updating firmware on SFP modules Tests and tooling: - mptcp: use net/lib.sh to manage netns - TCP-AO and TCP-MD5: replace debug prints used by tests with tracepoints - openvswitch: make test self-contained (don't depend on OvS CLI tools) Drivers: - Ethernet high-speed NICs: - Broadcom (bnxt): - increase the max total outstanding PTP TX packets to 4 - add timestamping statistics support - implement netdev_queue_mgmt_ops - support new RSS context API - Intel (100G, ice, idpf): - implement FEC statistics and dumping signal quality indicators - support E825C products (with 56Gbps PHYs) - nVidia/Mellanox: - support HW-GRO - mlx4/mlx5: support per-queue statistics via netlink - obey the max number of EQs setting in sub-functions - AMD/Solarflare: - support new RSS context API - AMD/Pensando: - ionic: rework fix for doorbell miss to lower overhead and skip it on new HW - Wangxun: - txgbe: support Flow Director perfect filters - Ethernet NICs consumer, embedded and virtual: - Add driver for Tehuti Networks TN40xx chips - Add driver for Meta's internal NIC chips - Add driver for Ethernet MAC on Airoha EN7581 SoCs - Add driver for Renesas Ethernet-TSN devices - Google cloud vNIC: - flow steering support - Microsoft vNIC: - support page sizes other than 4KB on ARM64 - vmware vNIC: - support latency measurement (update to version 9) - VirtIO net: - support for Byte Queue Limits - support configuring thresholds for automatic IRQ moderation - support for AF_XDP Rx zero-copy - Synopsys (stmmac): - support for STM32MP13 SoC - let platforms select the right PCS implementation - TI: - icssg-prueth: add multicast filtering support - icssg-prueth: enable PTP timestamping and PPS - Renesas: - ravb: improve Rx performance 30-400% by using page pool, theaded NAPI and timer-based IRQ coalescing - ravb: add MII support for R-Car V4M - Cadence (macb): - macb: add ARP support to Wake-On-LAN - Cortina: - use phylib for RX and TX pause configuration - Ethernet switches: - nVidia/Mellanox: - support configuration of multipath hash seed - report more accurate max MTU - use page_pool to improve Rx performance - MediaTek: - mt7530: add support for bridge port isolation - Qualcomm: - qca8k: add support for bridge port isolation - Microchip: - lan9371/2: add 100BaseTX PHY support - NXP: - vsc73xx: implement VLAN operations - Ethernet PHYs: - aquantia: enable support for aqr115c - aquantia: add support for PHY LEDs - realtek: add support for rtl8224 2.5Gbps PHY - xpcs: add memory-mapped device support - add BroadR-Reach link mode and support in Broadcom's PHY driver - CAN: - add document for ISO 15765-2 protocol support - mcp251xfd: workaround for erratum DS80000789E, use timestamps to catch when device returns incorrect FIFO status - WiFi: - mac80211/cfg80211: - parse Transmit Power Envelope (TPE) data in mac80211 instead of in drivers - improvements for 6 GHz regulatory flexibility - multi-link improvements - support multiple radios per wiphy - remove DEAUTH_NEED_MGD_TX_PREP flag - Intel (iwlwifi): - bump FW API to 91 for BZ/SC devices - report 64-bit radiotap timestamp - enable P2P low latency by default - handle Transmit Power Envelope (TPE) advertised by AP - remove support for older FW for new devices - fast resume (keeping the device configured) - mvm: re-enable Multi-Link Operation (MLO) - aggregation (A-MSDU) optimizations - MediaTek (mt76): - mt7925 Multi-Link Operation (MLO) support - Qualcomm (ath10k): - LED support for various chipsets - Qualcomm (ath12k): - remove unsupported Tx monitor handling - support channel 2 in 6 GHz band - support Spatial Multiplexing Power Save (SMPS) in 6 GHz band - supprt multiple BSSID (MBSSID) and Enhanced Multi-BSSID Advertisements (EMA) - support dynamic VLAN - add panic handler for resetting the firmware state - DebugFS support for datapath statistics - WCN7850: support for Wake on WLAN - Microchip (wilc1000): - read MAC address during probe to make it visible to user space - suspend/resume improvements - TI (wl18xx): - support newer firmware versions - RealTek (rtw89): - preparation for RTL8852BE-VT support - Wake on WLAN support for WiFi 6 chips - 36-bit PCI DMA support - RealTek (rtlwifi): - RTL8192DU support - Broadcom (brcmfmac): - Management Frame Protection support (to enable WPA3) - Bluetooth: - qualcomm: use the power sequencer for QCA6390 - btusb: mediatek: add ISO data transmission functions - hci_bcm4377: add BCM4388 support - btintel: add support for BlazarU core - btintel: add support for Whale Peak2 - btnxpuart: add support for AW693 A1 chipset - btnxpuart: add support for IW615 chipset - btusb: add Realtek RTL8852BE support ID 0x13d3:0x3591" * tag 'net-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1589 commits) eth: fbnic: Fix spelling mistake "tiggerring" -> "triggering" tcp: Replace strncpy() with strscpy() wifi: ath12k: fix build vs old compiler tcp: Don't access uninit tcp_rsk(req)->ao_keyid in tcp_create_openreq_child(). eth: fbnic: Write the TCAM tables used for RSS control and Rx to host eth: fbnic: Add L2 address programming eth: fbnic: Add basic Rx handling eth: fbnic: Add basic Tx handling eth: fbnic: Add link detection eth: fbnic: Add initial messaging to notify FW of our presence eth: fbnic: Implement Rx queue alloc/start/stop/free eth: fbnic: Implement Tx queue alloc/start/stop/free eth: fbnic: Allocate a netdevice and napi vectors with queues eth: fbnic: Add FW communication mechanism eth: fbnic: Add message parsing for FW messages eth: fbnic: Add register init to set PCIe/Ethernet device config eth: fbnic: Allocate core device specific structures and devlink interface eth: fbnic: Add scaffolding for Meta's NIC driver PCI: Add Meta Platforms vendor ID net/sched: cls_flower: propagate tca[TCA_OPTIONS] to NL_REQ_ATTR_CHECK ... commit 0434dbe32053d07d658165be681505120c6b1abc Merge: f8d22a3195b8e bb408dae9e738 Author: Linus Torvalds Date: Tue Jul 16 17:45:33 2024 -0700 Merge tag 'linux_kselftest-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - change resctrl test to cleanup resctrl_val() and generalize it by removing test name specific handling from the function. - several clang build failure fixes to framework and tests - add tests to verify IFS (In Field Scan) driver functionality - cleanups to remove unused variables and document changes * tag 'linux_kselftest-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (33 commits) selftests: ifs: verify IFS ARRAY BIST functionality selftests: ifs: verify IFS scan test functionality selftests: ifs: verify test image loading functionality selftests: ifs: verify test interfaces are created by the driver selftests/dma:remove unused variable selftests/breakpoints:Remove unused variable selftests/x86: fix printk warnings reported by clang selftests/x86: remove (or use) unused variables and functions selftests/x86: avoid -no-pie warnings from clang during compilation selftests/x86: build sysret_rip.c with clang selftests/x86: build fsgsbase_restore.c with clang selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp selftests/x86: fix Makefile dependencies to work with clang selftests/timers: remove unused irqcount variable selftests: Add information about TAP conformance in tests selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl() selftests/resctrl: Remove mongrp from CMT test selftests/resctrl: Remove mongrp from MBA test selftests/resctrl: Convert ctrlgrp & mongrp to pointers selftests/resctrl: Make some strings passed to resctrlfs functions const ... commit f8d22a3195b8e2eaacbc5073ae1d5d5bb7386de9 Merge: 9de4ad3bde144 ebf51e460e488 Author: Linus Torvalds Date: Tue Jul 16 17:42:14 2024 -0700 Merge tag 'linux_kselftest-kunit-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit updates from Shuah Khan: - add vm_mmap() allocation resource manager - convert usercopy kselftest to KUnit - disable usercopy testing on !CONFIG_MMU - add MODULE_DESCRIPTION() to core, list, and usercopy tests - add tests for assertion formatting functions - assert.c - introduce KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros - fix KUNIT_ASSERT_STRNEQ comments to make it clear that it is an assertion - rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT * tag 'linux_kselftest-kunit-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: Introduce KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros kunit: Rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT for readability kunit: Fix the comment of KUNIT_ASSERT_STRNEQ as assertion kunit: executor: Simplify string allocation handling kunit/usercopy: Add missing MODULE_DESCRIPTION() kunit/usercopy: Disable testing on !CONFIG_MMU usercopy: Convert test_user_copy to KUnit test kunit: test: Add vm_mmap() allocation resource manager list: test: add the missing MODULE_DESCRIPTION() macro kunit: add missing MODULE_DESCRIPTION() macros to core modules list: test: remove unused struct 'klist_test_struct' kunit: Cover 'assert.c' with tests commit 9de4ad3bde144b55b8451fc280c18107c139481c Author: Linus Torvalds Date: Tue Jul 16 17:35:45 2024 -0700 firmware: qcom: tzmem: don't ask about allocator mode when not enabled The Qualcomm firmware code shouldn't ask about what memory allocator mode should be used when the code isn't even enabled. Get rid of pointless config-time question. Link: https://lore.kernel.org/all/CAHk-=wg+38EHPKGou1MqXwAAXC30cM8sMgZAGnZ7TcFO4L9J2w@mail.gmail.com/ Signed-off-by: Linus Torvalds commit 17e6a1213058d8759bcf043151c04612df55ebc4 Author: Linus Torvalds Date: Tue Jul 16 17:25:59 2024 -0700 um: Use generic runtime constant implementation UML should not be using the architecture native runtime constants, since that requires also having the appropriate instruction fixups (and all the linker script details). Not that using that code would be impossible, but it's not worth it. Just point UML at the generic version. Reported-by: Nathan Chancellor Fixes: e3c92e81711d ("runtime constants: add x86 architecture support") Link: https://lore.kernel.org/all/20240716143644.GA1827132@thelio-3990X/ Signed-off-by: Linus Torvalds commit 576a997c6315ee482519e7cc080f341b07638808 Merge: 4a996d90b9e04 fa0c1c9d283b3 Author: Linus Torvalds Date: Tue Jul 16 17:13:31 2024 -0700 Merge tag 'perf-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull performance events updates from Ingo Molnar: - Intel PT support enhancements & fixes - Fix leaked SIGTRAP events - Improve and fix the Intel uncore driver - Add support for Intel HBM and CXL uncore counters - Add Intel Lake and Arrow Lake support - AMD uncore driver fixes - Make SIGTRAP and __perf_pending_irq() work on RT - Micro-optimizations - Misc cleanups and fixes * tag 'perf-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits) perf/x86/intel: Add a distinct name for Granite Rapids perf/x86/intel/ds: Fix non 0 retire latency on Raptorlake perf/x86/intel: Hide Topdown metrics events if the feature is not enumerated perf/x86/intel/uncore: Fix the bits of the CHA extended umask for SPR perf: Split __perf_pending_irq() out of perf_pending_irq() perf: Don't disable preemption in perf_pending_task(). perf: Move swevent_htable::recursion into task_struct. perf: Shrink the size of the recursion counter. perf: Enqueue SIGTRAP always via task_work. task_work: Add TWA_NMI_CURRENT as an additional notify mode. perf: Move irq_work_queue() where the event is prepared. perf: Fix event leak upon exec and file release perf: Fix event leak upon exit task_work: Introduce task_work_cancel() again task_work: s/task_work_cancel()/task_work_cancel_func()/ perf/x86/amd/uncore: Fix DF and UMC domain identification perf/x86/amd/uncore: Avoid PMU registration if counters are unavailable perf/x86/intel: Support Perfmon MSRs aliasing perf/x86/intel: Support PERFEVTSEL extension perf/x86: Add config_mask to represent EVENTSEL bitmask ... commit 4a996d90b9e046c6d59845acf00a54d464c34ff3 Merge: 0c182ac2ebc54 db43a609d01e8 Author: Linus Torvalds Date: Tue Jul 16 17:00:50 2024 -0700 Merge tag 'sched-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Update Daniel Bristot de Oliveira's entry in MAINTAINERS, and credit him in CREDITS - Harmonize the lock-yielding behavior on dynamically selected preemption models with static ones - Reorganize the code a bit: split out sched/syscalls.c to reduce the size of sched/core.c - Micro-optimize psi_group_change() - Fix set_load_weight() for SCHED_IDLE tasks - Misc cleanups & fixes * tag 'sched-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Update MAINTAINERS and CREDITS sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks sched/psi: Optimise psi_group_change a bit sched/core: Drop spinlocks on contention iff kernel is preemptible sched/core: Move preempt_model_*() helpers from sched.h to preempt.h sched/balance: Skip unnecessary updates to idle load balancer's flags idle: Remove stale RCU comment sched/headers: Move struct pre-declarations to the beginning of the header sched/core: Clean up kernel/sched/sched.h a bit sched/core: Simplify prefetch_curr_exec_start() sched: Fix spelling in comments sched/syscalls: Split out kernel/sched/syscalls.c from kernel/sched/core.c commit 0c182ac2ebc5470a725632b08cee9a52065bbe71 Merge: 151647ab58101 8e366d83edce3 Author: Linus Torvalds Date: Tue Jul 16 16:55:33 2024 -0700 Merge tag 'objtool-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Fix bug that caused objtool to confuse certain memory ops added by KASAN instrumentation as stack accesses - Various faddr2line optimizations - Improve error messages * tag 'objtool-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool/x86: objtool can confuse memory and stack access objtool: Use "action" in error message to be consistent with help scripts/faddr2line: Check only two symbols when calculating symbol size scripts/faddr2line: Remove call to addr2line from find_dir_prefix() scripts/faddr2line: Invoke addr2line as a single long-running process scripts/faddr2line: Pass --addresses argument to addr2line scripts/faddr2line: Check vmlinux only once scripts/faddr2line: Combine three readelf calls into one scripts/faddr2line: Reduce number of readelf calls to three commit 151647ab581013b482893d4e2218cd29b005cd6b Merge: 923a327e8f225 e81859fe64ad4 Author: Linus Torvalds Date: Tue Jul 16 16:42:37 2024 -0700 Merge tag 'locking-core-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - Jump label fixes, including a perf events fix that originally manifested as jump label failures, but was a serialization bug at the usage site - Mark down_write*() helpers as __always_inline, to improve WCHAN debuggability - Misc cleanups and fixes * tag 'locking-core-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers jump_label: Simplify and clarify static_key_fast_inc_cpus_locked() jump_label: Clarify condition in static_key_fast_inc_not_disabled() jump_label: Fix concurrency issues in static_key_slow_dec() perf/x86: Serialize set_attr_rdpmc() cleanup: Standardize the header guard define's name commit 923a327e8f2257ab7cd5485cb5d8db92c965dfca Merge: 41906248d0d78 b77b0bc85b117 Author: Linus Torvalds Date: Tue Jul 16 16:19:36 2024 -0700 Merge tag 'acpi-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "The only kind of new feature added by these is the hwmon interface support in the ACPI fan driver. Apart from that, they mostly address issues and clean up code. Specifics: - Switch the ACPI x86 utility code and the ACPI LPSS driver to new Intel CPU model defines (Tony Luck) - Add hwmon interface support to the ACPI fan driver (Armin Wolf) - Add sysfs entry for guaranteed performance to the ACPI CPPC library and replace a ternary operator with umax() in it (Petr Tesařík, Prabhakar Pujeri) - Clean up the ACPI PMIC driver in multiple ways (Andy Shevchenko, Christophe JAILLET) - Add support for charge limiting state to the ACPI battery driver and update _OSC to indicate support for it (Armin Wolf) - Clean up the sysfs interface in the ACPI battery, SBS (smart battery subsystem) and AC drivers (Thomas Weißschuh) - Coordinate header includes in the ACPI NUMA code and make it use ACCESS_COORDINATE_CPU when appropriate (Huang Ying, Thorsten Blum) - Downgrade Intel _OSC and _PDC messages in the ACPI processor driver to debug to reduce log noise (Mario Limonciello) - Still evaluate _OST when _PUR evaluation fails in the ACPI PAD (processor aggregator) driver as per the spec (Armin Wolf) - Skip ACPI IRQ override on Asus Vivobook Pro N6506MJ and N6506MU platforms (Tamim Khan) - Force native mode on some T2 macbooks in the ACPI backlight driver and replace strcpy() with strscpy() in it (Orlando Chamberlain, Muhammad Qasim Abdul Majeed) - Add missing MODULE_DESCRIPTION() macros in two places (Jeff Johnson)" * tag 'acpi-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (26 commits) ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ ACPI: video: force native for some T2 macbooks ACPI: video: Use strscpy() instead of strcpy() ACPI: CPPC: Replace ternary operator with umax() ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MU ACPI: PMIC: Constify struct pmic_table ACPI: bus: Indicate support for battery charge limiting thru _OSC ACPI: battery: Add support for charge limiting state ACPI: processor: Downgrade Intel _OSC and _PDC messages to debug ACPI: SBS: manage alarm sysfs attribute through psy core ACPI: battery: create alarm sysfs attribute atomically ACPI: battery: use sysfs_emit over sprintf ACPI: battery: constify powersupply properties ACPI: SBS: constify powersupply properties ACPI: AC: constify powersupply properties ACPI: PMIC: Replace open coded be16_to_cpu() ACPI: PMIC: Convert pr_*() to dev_*() printing macros ACPI: PMIC: Use sizeof() instead of hard coded value ACPI: NUMA: Consolidate header includes ACPI: CPPC: add sysfs entry for guaranteed performance ... commit 41906248d0d78e3a620a86cf715f6f630912a4eb Merge: 15114e8fb58ff a02bed4183c48 Author: Linus Torvalds Date: Tue Jul 16 15:54:03 2024 -0700 Merge tag 'pm-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add a new cpufreq driver for Loongson-3, add support for new features in the intel_pstate (Lunar Lake and Arrow Lake platforms, OOB mode for Emerald Rapids, highest performance change interrupt), amd-pstate (fast CPPC) and sun50i (Allwinner H700 speed bin) cpufreq drivers, simplify the cpufreq driver interface, simplify the teo cpuidle governor, adjust the pm-graph utility for a new version of Python, address issues and clean up code. Specifics: - Add Loongson-3 CPUFreq driver support (Huacai Chen) - Add support for the Arrow Lake and Lunar Lake platforms and the out-of-band (OOB) mode on Emerald Rapids to the intel_pstate cpufreq driver, make it support the highest performance change interrupt and clean it up (Srinivas Pandruvada) - Switch cpufreq to new Intel CPU model defines (Tony Luck) - Simplify the cpufreq driver interface by switching the .exit() driver callback to the void return data type (Lizhe, Viresh Kumar) - Make cpufreq_boost_enabled() return bool (Dhruva Gole) - Add fast CPPC support to the amd-pstate cpufreq driver, address multiple assorted issues in it and clean it up (Perry Yuan, Mario Limonciello, Dhananjay Ugwekar, Meng Li, Xiaojian Du) - Add Allwinner H700 speed bin to the sun50i cpufreq driver (Ryan Walklin) - Fix memory leaks and of_node_put() usage in the sun50i and qcom-nvmem cpufreq drivers (Javier Carrasco) - Clean up the sti and dt-platdev cpufreq drivers (Jeff Johnson, Raphael Gallais-Pou) - Fix deferred probe handling in the TI cpufreq driver and wrong return values of ti_opp_supply_probe(), and add OPP tables for the AM62Ax and AM62Px SoCs to it (Bryan Brattlof, Primoz Fiser) - Avoid overflow of target_freq in .fast_switch() in the SCMI cpufreq driver (Jagadeesh Kona) - Use dev_err_probe() in every error path in probe in the Mediatek cpufreq driver (Nícolas Prado) - Fix kernel-doc param for longhaul_setstate in the longhaul cpufreq driver (Yang Li) - Fix system resume handling in the CPPC cpufreq driver (Riwen Lu) - Improve the teo cpuidle governor and clean up leftover comments from the menu cpuidle governor (Christian Loehle) - Clean up a comment typo in the teo cpuidle governor (Atul Kumar Pant) - Add missing MODULE_DESCRIPTION() macro to cpuidle haltpoll (Jeff Johnson) - Switch the intel_idle driver to new Intel CPU model defines (Tony Luck) - Switch the Intel RAPL driver new Intel CPU model defines (Tony Luck) - Simplify if condition in the idle_inject driver (Thorsten Blum) - Fix missing cleanup on error in _opp_attach_genpd() (Viresh Kumar) - Introduce an OF helper function to inform if required-opps is used and drop a redundant in-parameter to _set_opp_level() (Ulf Hansson) - Update pm-graph to v5.12 which includes fixes and major code revamp for python3.12 (Todd Brandt) - Address several assorted issues in the cpupower utility (Roman Storozhenko)" * tag 'pm-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (77 commits) cpufreq: sti: fix build warning cpufreq: mediatek: Use dev_err_probe in every error path in probe cpufreq: Add Loongson-3 CPUFreq driver support cpufreq: Make cpufreq_driver->exit() return void cpufreq/amd-pstate: Fix the scaling_max_freq setting on shared memory CPPC systems cpufreq/amd-pstate-ut: Convert nominal_freq to khz during comparisons cpufreq: pcc: Remove empty exit() callback cpufreq: loongson2: Remove empty exit() callback cpufreq: nforce2: Remove empty exit() callback cpupower: fix lib default installation path cpufreq: docs: Add missing scaling_available_frequencies description cpuidle: teo: Don't count non-existent intercepts cpupower: Disable direct build of the 'bench' subproject cpuidle: teo: Remove recent intercepts metric Revert: "cpuidle: teo: Introduce util-awareness" cpufreq: make cpufreq_boost_enabled() return bool cpufreq: intel_pstate: Support highest performance change interrupt x86/cpufeatures: Add HWP highest perf change feature flag Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method cpufreq: amd-pstate: Cap the CPPC.max_perf to nominal_perf if CPB is off ... commit 15114e8fb58ffd574da83951e89cb5ab0055cc1e Merge: 42b5a01596f1f 281cfec53b448 Author: Linus Torvalds Date: Tue Jul 16 15:47:19 2024 -0700 Merge tag 'thermal-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These add some new hardware support (notably, the Lunar Lake platform support in int340x and X1E80100 temperature sensor), continue to rework the thermal driver interface to eliminate trip point IDs from it, update DT bindings for a number of platforms and simplify probe in a number of thermal drivers, address issues and clean up code. Specifics: - Add DLVR and MSI interrupt support for the Lunar Lake platform to the int340x thermal driver (Srinivas Pandruvada) - Enable workload type hints (WLT) support and power floor interrupt support for the Lunar Lake platform in int340x ((Srinivas Pandruvada) - Switch Intel thermal drivers to new Intel CPU model defines (Tony Luck) - Clean up the int3400 and int3403 drivers (Erick Archer and David Alan Gilbert) - Improve intel_pch_thermal kernel log messages printed during suspend to idle (Zhang Rui) - Make the intel_tcc_cooling driver use a model-specific bitmask for TCC offset (Ricardo Neri) - Redesign the .set_trip_temp() thermal zone callback to take a trip pointer instead of a trip ID and update its users (Rafael Wysocki) - Avoid using invalid combinations of polling_delay and passive_delay thermal zone parameters (Rafael Wysocki) - Update a cooling device registration function to take a const argument (Krzysztof Kozlowski) - Make the uniphier thermal driver use thermal_zone_for_each_trip() for walking trip points (Rafael Wysocki) - Fix and clean up several minor shortcomings in thermal debug (Rafael Wysocki) - Rename __thermal_zone_set_trips() to thermal_zone_set_trips() and make it use trip thresholds (Rafael Wysocki) - Use READ_ONCE() for lockless access to trip temperature and hysteresis (Rafael Wysocki) - Drop unnecessary cooling device target state checks from the Bang-Bang thermal governor (Rafael Wysocki) - Avoid invoking thermal governor .trip_crossed() callback for critical and hot trip points (Rafael Wysocki) - Group all Renesas drivers inside a dedicated sub directory and add the missing dependency to OF (Niklas Söderlund) - Add suspend/resume support on k3_j72xx_bandgap and take the opportunity to remove an unneeded delay in the init time code path (Théo Lebrun) - Fix thermal zone definition for MT8186 and MT8188 (Julien Panis) - Convert hisilicon-thermal.txt to dt-schema (Abdulrasaq Lawani) - Add DT bindings for the X1E80100 temperature sensor (Abel Vesa) - Fix the thermal zone node name regular expression in the DT schema (Krzysztof Kozlowski) - Avoid failing thermal control initialization by using default values on some platforms where calibration data is missing (Chen-Yu Tsai) - Fix the sensor cell size in DT for the Exynos platform (Krzysztof Kozlowski) - Bring the common definition of '#thermal-sensor-cells' property in order to simplify the bindings on all the platforms where this change makes sense and do some minor cleanups (Krzysztof Kozlowski) - Fix a race between removal and clock disable in the broadcom thermal driver (Krzysztof Kozlowski) - Drop 'trips' DT node as required from the thermal zone bindings in order to fix the remaining warnings appearing for thermal zones without trip points (Rob Herring) - Simplify all the drivers where dev_err_probe() can apply (Krzysztof Kozlowski) - Clean up code related to stih416 as this platform is not described anywhere (Raphael Gallais-Pou)" * tag 'thermal-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (81 commits) thermal/drivers/sti: Cleanup code related to stih416 thermal/drivers/generic-adc: Simplify with dev_err_probe() thermal/drivers/generic-adc: Simplify probe() with local dev variable thermal/drivers/qcom-tsens: Simplify with dev_err_probe() thermal/drivers/qcom-spmi-adc-tm5: Simplify with dev_err_probe() thermal/drivers/imx: Simplify with dev_err_probe() thermal/drivers/imx: Simplify probe() with local dev variable thermal/drivers/hisi: Simplify with dev_err_probe() thermal/drivers/exynos: Simplify with dev_err_probe() thermal/drivers/exynos: Simplify probe() with local dev variable thermal/drivers/broadcom: Simplify with dev_err_probe() thermal/drivers/broadcom: Simplify probe() with local dev variable thermal/drivers/broadcom: Fix race between removal and clock disable dt-bindings: thermal: Drop 'trips' node as required dt-bindings: thermal: qoriq: reference thermal-sensor schema dt-bindings: thermal: cleanup examples indentation dt-bindings: thermal: simplify few bindings dt-bindings: thermal: ti,j72xx: reference thermal-sensor schema dt-bindings: thermal: ti,am654: reference thermal-sensor schema dt-bindings: thermal: st,stm32: reference thermal-sensor schema ... commit 42b5a01596f1f9471b58a2f59e1fceeb8db79ffc Merge: 11ab4cd5ec3f5 e86cac0acdb1a Author: Linus Torvalds Date: Tue Jul 16 14:56:13 2024 -0700 Merge tag 'Smack-for-6.10' of https://github.com/cschaufler/smack-next Pull smack updates from Casey Schaufler: "Two fixes for Smack networking labeling by Konstantin Andreev" * tag 'Smack-for-6.10' of https://github.com/cschaufler/smack-next: smack: unix sockets: fix accept()ed socket label smack: tcp: ipv4, fix incorrect labeling commit 11ab4cd5ec3f5f531ca0cb3014b7c6869c4aea5d Merge: dad8d1a383a8a dd44477e7fa15 Author: Linus Torvalds Date: Tue Jul 16 14:50:44 2024 -0700 Merge tag 'lsm-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm updates from Paul Moore: "Two LSM patches focused on cleaning up the inode xattr capability handling" * tag 'lsm-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: selinux,smack: remove the capability checks in the removexattr hooks lsm: fixup the inode xattr capability handling commit dad8d1a383a8a2123be2a067098fa25afa2ddad7 Merge: f8a8b94d0698c e123134b39dc4 Author: Linus Torvalds Date: Tue Jul 16 14:43:28 2024 -0700 Merge tag 'selinux-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux update from Paul Moore: "A single SELinux patch to change the type of a pre-processor constant to better match its use" * tag 'selinux-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: Use 1UL for EBITMAP_BIT to match maps type commit f8a8b94d0698ccc56c44478169c91ca774540d9f Merge: ce5a51bfacf7a acc154691fc75 Author: Linus Torvalds Date: Tue Jul 16 14:24:29 2024 -0700 Merge tag 'sysctl-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl Pull sysctl updates from Joel Granados: - Remove "->procname == NULL" check when iterating through sysctl table arrays Removing sentinels in ctl_table arrays reduces the build time size and runtime memory consumed by ~64 bytes per array. With all ctl_table sentinels gone, the additional check for ->procname == NULL that worked in tandem with the ARRAY_SIZE to calculate the size of the ctl_table arrays is no longer needed and has been removed. The sysctl register functions now returns an error if a sentinel is used. - Preparation patches for sysctl constification Constifying ctl_table structs prevents the modification of proc_handler function pointers as they would reside in .rodata. The ctl_table arguments in sysctl utility functions are const qualified in preparation for a future treewide proc_handler argument constification commit. - Misc fixes Increase robustness of set_ownership by providing sane default ownership values in case the callee doesn't set them. Bound check proc_dou8vec_minmax to avoid loading buggy modules and give sysctl testing module a name to avoid compiler complaints. * tag 'sysctl-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: sysctl: Warn on an empty procname element sysctl: Remove ctl_table sentinel code comments sysctl: Remove "child" sysctl code comments sysctl: Remove superfluous empty allocations from sysctl internals sysctl: Replace nr_entries with ctl_table_size in new_links sysctl: Remove check for sentinel element in ctl_table arrays mm profiling: Remove superfluous sentinel element from ctl_table locking: Remove superfluous sentinel element from kern_lockdep_table sysctl: Add module description to sysctl-testing sysctl: constify ctl_table arguments of utility function utsname: constify ctl_table arguments of utility function sysctl: move the extra1/2 boundary check of u8 to sysctl_check_table_array sysctl: always initialize i_uid/i_gid commit ce5a51bfacf7a2953f8fa309a8fc8540c2e288da Merge: 8050258bd1eed 872bb37f6829d Author: Linus Torvalds Date: Tue Jul 16 13:45:43 2024 -0700 Merge tag 'hardening-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: - lkdtm/bugs: add test for hung smp_call_function_single() (Mark Rutland) - gcc-plugins: Remove duplicate included header file stringpool.h (Thorsten Blum) - ARM: Remove address checking for MMUless devices (Yanjun Yang) - randomize_kstack: Clean up per-arch entropy and codegen - KCFI: Make FineIBT mode Kconfig selectable - fortify: Do not special-case 0-sized destinations * tag 'hardening-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: randomize_kstack: Improve stack alignment codegen ARM: Remove address checking for MMUless devices gcc-plugins: Remove duplicate included header file stringpool.h randomize_kstack: Remove non-functional per-arch entropy filtering fortify: Do not special-case 0-sized destinations x86/alternatives: Make FineIBT mode Kconfig selectable lkdtm/bugs: add test for hung smp_call_function_single() commit 8050258bd1eed0f77dd7e3fa15feb23bbcc38e63 Merge: 1ca995edf838a 9b3c13c9ea4ec Author: Linus Torvalds Date: Tue Jul 16 13:35:07 2024 -0700 Merge tag 'pstore-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - Add missing MODULE_DESCRIPTION() macro (Jeff Johnson) - Replace deprecated strncpy() with strscpy() (Justin Stitt) * tag 'pstore-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: platform: add missing MODULE_DESCRIPTION() macro pstore/blk: replace deprecated strncpy with strscpy commit 1ca995edf838a70c7c0aba2de7fc6da57e22cbf3 Merge: 72fda6c8e5536 f0c508faea645 Author: Linus Torvalds Date: Tue Jul 16 13:12:16 2024 -0700 Merge tag 'seccomp-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: - interrupt SECCOMP_IOCTL_NOTIF_RECV when all users exit (Andrei Vagin) - Update selftests to check for expected NOTIF_RECV exits (Andrei Vagin) * tag 'seccomp-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: check that a zombie leader doesn't affect others selftests/seccomp: add test for NOTIF_RECV and unused filters seccomp: release task filters when the task exits seccomp: interrupt SECCOMP_IOCTL_NOTIF_RECV when all users have exited commit 72fda6c8e553699f6ba8d3ddc34f0bbe7a5898df Merge: f83e38fc9f109 21f9310830602 Author: Linus Torvalds Date: Tue Jul 16 12:59:20 2024 -0700 Merge tag 'execve-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve updates from Kees Cook: - Use value of kernel.randomize_va_space once per exec (Alexey Dobriyan) - Honor PT_LOAD alignment for static PIE - Make bprm->argmin only visible under CONFIG_MMU - Add KUnit testing of bprm_stack_limits() * tag 'execve-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Avoid pathological argc, envc, and bprm->p values execve: Keep bprm->argmin behind CONFIG_MMU ELF: fix kernel.randomize_va_space double read exec: Add KUnit test for bprm_stack_limits() binfmt_elf: Honor PT_LOAD alignment for static PIE binfmt_elf: Calculate total_size earlier selftests/exec: Build both static and non-static load_address tests commit f83e38fc9f1092f8a7a65ff2ea6a1ea6502efaf0 Merge: e55037c879a08 9fe6a8c5b247e Author: Linus Torvalds Date: Tue Jul 16 12:30:57 2024 -0700 Merge tag 'for-linus-6.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - some trivial cleanups - a fix for the Xen timer - add boot time selectable debug capability to the Xen multicall handling - two fixes for the recently added Xen irqfd handling * tag 'for-linus-6.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: remove deprecated xen_nopvspin boot parameter x86/xen: eliminate some private header files x86/xen: make some functions static xen: make multicall debug boot time selectable xen/arm: Convert comma to semicolon xen: privcmd: Fix possible access to a freed kirqfd instance xen: privcmd: Switch from mutex to spinlock for irqfds xen: add missing MODULE_DESCRIPTION() macros x86/xen: Convert comma to semicolon x86/xen/time: Reduce Xen timer tick xen/manage: Constify struct shutdown_handler commit e55037c879a087a57d775e848a58430ab3380fc1 Merge: d80f2996b8502 4a2ebb082297f Author: Linus Torvalds Date: Tue Jul 16 12:22:07 2024 -0700 Merge tag 'efi-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: "Note the removal of the EFI fake memory map support - this is believed to be unused and no longer worth supporting. However, we could easily bring it back if needed. With recent developments regarding confidential VMs and unaccepted memory, combined with kexec, creating a known inaccurate view of the firmware's memory map and handing it to the OS is a feature we can live without, hence the removal. Alternatively, I could imagine making this feature mutually exclusive with those confidential VM related features, but let's try simply removing it first. Summary: - Drop support for the 'fake' EFI memory map on x86 - Add an SMBIOS based tweak to the EFI stub instructing the firmware on x86 Macbook Pros to keep both GPUs enabled - Replace 0-sized array with flexible array in EFI memory attributes table handling - Drop redundant BSS clearing when booting via the native PE entrypoint on x86 - Avoid returning EFI_SUCCESS when aborting on an out-of-memory condition - Cosmetic tweak for arm64 KASLR loading logic" * tag 'efi-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr() arm64/efistub: Clean up KASLR logic x86/efistub: Drop redundant clearing of BSS x86/efistub: Avoid returning EFI_SUCCESS on error x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs x86/efistub: Enable SMBIOS protocol handling for x86 efistub/smbios: Simplify SMBIOS enumeration API x86/efi: Drop support for fake EFI memory maps commit d80f2996b8502779c39221a9e7c9ea7e361c0ae4 Merge: a5db8e4544a4d 1a7b7326d587c Author: Linus Torvalds Date: Tue Jul 16 12:09:03 2024 -0700 Merge tag 'asm-generic-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "Most of this is part of my ongoing work to clean up the system call tables. In this bit, all of the newer architectures are converted to use the machine readable syscall.tbl format instead in place of complex macros in include/uapi/asm-generic/unistd.h. This follows an earlier series that fixed various API mismatches and in turn is used as the base for planned simplifications. The other two patches are dead code removal and a warning fix" * tag 'asm-generic-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: vmlinux.lds.h: catch .bss..L* sections into BSS") fixmap: Remove unused set_fixmap_offset_io() riscv: convert to generic syscall table openrisc: convert to generic syscall table nios2: convert to generic syscall table loongarch: convert to generic syscall table hexagon: use new system call table csky: convert to generic syscall table arm64: rework compat syscall macros arm64: generate 64-bit syscall.tbl arm64: convert unistd_32.h to syscall.tbl format arc: convert to generic syscall table clone3: drop __ARCH_WANT_SYS_CLONE3 macro kbuild: add syscall table generation to scripts/Makefile.asm-headers kbuild: verify asm-generic header list loongarch: avoid generating extra header files um: don't generate asm/bpf_perf_event.h csky: drop asm/gpio.h wrapper syscalls: add generic scripts/syscall.tbl commit a5db8e4544a4dc7143f30a1438686a4d5fa6d775 Merge: a9a4cd9c33971 dead06c5e110c Author: Linus Torvalds Date: Tue Jul 16 12:03:39 2024 -0700 Merge tag 'soc-arm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull arm SoC platform updates from Arnd Bergmann: "The majority of the updates here are Dmitry Torokhov's cleanups for platform code in the pxa and tegra platforms, changing custom platform_data structures into DT-compatible software node declarations. The other updates are for the MAINTAINERS file, correcting some stale or missing entries" * tag 'soc-arm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: pxa: fix build breakage on PXA3xx ti: omap: MAINTAINERS: move Benoît Cousson to CREDITS amazon: MAINTAINERS: change to odd fixes and Tsahee Zidenberg to CREDITS MAINTAINERS: thead: add git tree ARM: spitz: Use software nodes for the ADS7846 touchscreen ARM: spitz: Use software nodes to describe LED GPIOs ARM: spitz: Use software nodes to describe MMC GPIOs ARM: spitz: Use software nodes to describe LCD GPIOs ARM: spitz: Use software nodes to describe audio GPIOs ARM: spitz: Use software nodes to describe SPI CS lines ARM: spitz: Simplify instantiating SPI controller ARM: pxa/gumstix: convert vbus gpio to use software nodes ARM: pxa: consolidate GPIO chip platform data ARM: spitz: fix GPIO assignment for backlight ARM: tegra: paz00: Use software nodes to describe GPIOs for WiFi rfkill MAINTAINERS: ARM: airoha: add entry to cover Airoha SoC bus: vexpress-config: Add missing MODULE_DESCRIPTION() macro arm64: layerscape: remove redundant EDAC_SUPPORT selection dt-bindings: arm: Remove obsolete RTSM DCSCB binding arm: vexpress: Remove obsolete RTSM DCSCB support commit a9a4cd9c3397109c2799cb765ab0d3959831a248 Merge: e3950967f6e6b 05a01ce77349f Author: Linus Torvalds Date: Tue Jul 16 11:56:15 2024 -0700 Merge tag 'soc-defconfig-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC defconfig updates from Arnd Bergmann: "These are the usual updates to enable newly added drivers, mostly for arm64 and riscv this time" * tag 'soc-defconfig-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: defconfig: Enable the IWLWIFI driver ARM: multi_v7_defconfig: Add MCP23S08 pinctrl support arm64: defconfig: Enable NVIDIA CoreSight PMU driver arm64: defconfig: enable SHM Bridge support for the TZ memory allocator arm64: defconfig: Enable secure QFPROM driver ARM: imx_v6_v7_defconfig: enable DRM_SII902X and DRM_DISPLAY_CONNECTOR ARM: imx_v6_v7_defconfig: Enable drivers for TQMa7x/MBa7x riscv: defconfig: Enable StarFive JH7110 drivers arm64: defconfig: Enable TI LP873X PMIC arm64: defconfig: Enable USB2 PHY Driver arm64: defconfig: Enable MTD support for Hyperbus ARM: configs: at91: Enable LVDS serializer support arm64: defconfig: enable several Qualcomm interconnects arm64: defconfig: Enable Marvell 88Q2XXX PHY support arm64: defconfig: make CONFIG_INTERCONNECT_QCOM_SM8350 built-in arm64: defconfig: enable CONFIG_SM_GPUCC_8350 arm64: defconfig: Enable Renesas R-Car Gen4 PCIe controller commit e3950967f6e6b74a3606739ec50ed19f3398c7d8 Merge: cc0f7c3f97bc6 48d2245586452 Author: Linus Torvalds Date: Tue Jul 16 11:43:51 2024 -0700 Merge tag 'soc-dt-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC dt updates from Arnd Bergmann: "The devicetree updates are fairly well spread out across platforms, with Qualcomm making up about a third of the total. There are three new SoCs in existing product families this: - NXP i.MX95 is a variant of i.MX93, now with six Cortex-A55 cores instead of just two as well as a GPU and more high-speed I/O devices. - Qualcomm QCS8550 is a variant of SM8550 for IOT devices - Airoha EN7581 is a 10G-PON network chip and related to the MT7981 Wireless router chip from its parent Mediatek. In total there are 58 new machines, including four riscv boards and eight for 32-bit arm. The most exciting new addition is probably a pair of laptops based on the Qualcomm x1e80100 (Snapdragon X1 Elite) chip, the Asus Vivobook S15 and the Lenovo Yoga Slim7x. Other noteworthy new additions are: - A total of 20 Qualcomm based machines, mostly Android devices from Samsung, Motorola and LG, as well as a wireless router and some reference designs - Six NXP i.MX based machines, mostly industrial boards along with some reference designs - Mediatek sees some interesting Filogic based routers including the "OpenWRT One", a few new Chromebooks as well as single-board computers. - Four machines from Solidrun based on Marvell cn913x, replacing the older Armada 8000 based counterparts - The four Amlogic machines are all set top boxes or reference designs for them - The nine new Rockchips machines are mostly single-board computers including some interesting ones based on the rk3588 chip like the ROCK 5 ITX board and the CM3588 with its four NVMe slots - The RISC-V boards are all single-board computers based on Starfive JH7110, Microchip MPFS and Allwinner D1, which all had similar boards already There are also a lot of updates to already supported machines, notably for the TI K3, Rockchips, Freescale and of course Qualcomm platforms" * tag 'soc-dt-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (846 commits) arm64: dts: allwinner: h616: add crypto engine node riscv: dts: add clock generator for Sophgo SG2042 SoC arm64: dts: rockchip: Add Xunlong Orange Pi 3B dt-bindings: arm: rockchip: Add Xunlong Orange Pi 3B arm64: dts: rockchip: Add Radxa ROCK 3B dt-bindings: arm: rockchip: Add Radxa ROCK 3B mailmap: Update Luca Weiss's email address ARM: dts: ixp4xx: nslu2: beeper uses PWM arm64: dts: rockchip: add ROCK 5 ITX board dt-bindings: arm: rockchip: Add ROCK 5 ITX board arm64: dts: rockchip: Add dma-names to uart1 on Pine64 rk3566 devices arm64: dts: rockchip: Add avdd supplies to hdmi on rock64 arm64: dts: qcom: msm8916-lg-c50: add initial dts for LG Leon LTE arm64: dts: qcom: msm8916-lg-m216: Add initial device tree dt-bindings: arm: qcom: Add msm8916 based LG devices ARM: dts: qcom: msm8960: correct memory base arm64: dts: qcom: ipq9574: Add icc provider ability to gcc dt-bindings: interconnect: Add Qualcomm IPQ9574 support arm64: dts: qcom: sm8150: Add video clock controller node arm64: dts: qcom: pm6150: Add vibrator ... commit cc0f7c3f97bc6e888bf4be28a9da9dbd3735d2b4 Merge: 99298eb615deb 49e24c80d3c81 Author: Linus Torvalds Date: Tue Jul 16 11:35:27 2024 -0700 Merge tag 'soc-drivers-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "The updates to the mediatek, allwinner, ti, tegra, microchip, stm32, samsung, imx, zynq and amlogic platoforms are fairly small maintenance changes, either addressing minor mistakes or enabling additional hardware. The qualcomm platform changes add a number of features and are larger than the other ones combined, introducing the use of linux/cleanup.h across several drivers, adding support for Snapdragon X1E and other SoCs in platform drivers, a new "protection domain mapper" driver, and a "shared memory bridge" driver. The cznic "turris omnia" router based on Marvell Armada gets a platform driver that talks to the board specific microcontroller. The reset and cache subsystems get a few minor updates to SoC specific drivers, while the ff-a, scmi and optee firmware drivers get some code refactoring and new features" * tag 'soc-drivers-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (122 commits) firmware: turris-mox-rwtm: Initialize completion before mailbox firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout() firmware: turris-mox-rwtm: Do not complete if there are no waiters MAINTAINERS: drop riscv list from cache controllers platform: cznic: turris-omnia-mcu: fix Kconfig dependencies bus: sunxi-rsb: Constify struct regmap_bus soc: sunxi: sram: Constify struct regmap_config platform: cznic: turris-omnia-mcu: Depend on WATCHDOG platform: cznic: turris-omnia-mcu: Depend on OF soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers arm64: stm32: enable scmi regulator for stm32 firmware: qcom: tzmem: blacklist more platforms for SHM Bridge soc: qcom: wcnss: simplify with cleanup.h soc: qcom: pdr: simplify with cleanup.h soc: qcom: ocmem: simplify with cleanup.h soc: qcom: mdt_loader: simplify with cleanup.h soc: qcom: llcc: simplify with cleanup.h firmware: qcom: tzmem: simplify returning pointer without cleanup soc: qcom: socinfo: Add PM6350 PMIC arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS ... commit 99298eb615debd41c1fccff05b163d0a29091904 Merge: 408323581b722 21b9e722ad28c Author: Linus Torvalds Date: Tue Jul 16 11:30:32 2024 -0700 Merge tag 'm68k-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Fix bootup lock-ups on Warp1260, Atari TT, and MegaSTe - Miscellaneous fixes and improvements - defconfig updates * tag 'm68k-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: cmpxchg: Fix return value for default case in __arch_xchg() m68k: defconfig: Update defconfigs for v6.10-rc1 m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages zorro: Use str_plural() in amiga_zorro_probe() m68k: emu: Add missing MODULE_DESCRIPTION() macros m68k: amiga: Turn off Warp1260 interrupts during boot commit 589eb11498fbf7de7a1bc8ff1f4b7592687dfd46 Merge: bc060e6bb7028 691a018040865 04718d1e4dbfd 00c7ded68012c ae81b69fd2b1e Author: Stephen Boyd Date: Tue Jul 16 11:24:25 2024 -0700 Merge branches 'clk-qcom', 'clk-rockchip', 'clk-sophgo' and 'clk-thead' into clk-next - Add support for the AP sub-system clock controller in the T-Head TH1520 * clk-qcom: (71 commits) clk: qcom: Park shared RCGs upon registration clk: qcom: ipq9574: Use icc-clk for enabling NoC related clocks clk: qcom: common: Add interconnect clocks support interconnect: icc-clk: Add devm_icc_clk_register interconnect: icc-clk: Specify master/slave ids dt-bindings: clock: qcom: Add AHB clock for SM8150 clk: qcom: gcc-x1e80100: Set parent rate for USB3 sec and tert PHY pipe clks dt-bindings: interconnect: Add Qualcomm IPQ9574 support clk: qcom: kpss-xcc: Return of_clk_add_hw_provider to transfer the error clk: qcom: lpasscc-sc8280xp: Constify struct regmap_config clk: qcom: gcc-x1e80100: Fix halt_check for all pipe clocks clk: qcom: gcc-ipq6018: update sdcc max clock frequency clk: qcom: camcc-sm8650: Add SM8650 camera clock controller driver dt-bindings: clock: qcom: Add SM8650 camera clock controller dt-bindings: clock: qcom: Update the order of SC8280XP camcc header clk: qcom: videocc-sm8550: Add SM8650 video clock controller clk: qcom: videocc-sm8550: Add support for videocc XO clk ares dt-bindings: clock: qcom: Add SM8650 video clock controller dt-bindings: clock: qcom: Update SM8450 videocc header file name clk: qcom: gpucc-sa8775p: Update wait_val fields for GPU GDSC's ... * clk-rockchip: dt-bindings: clock: rk3188-cru-common: remove CLK_NR_CLKS clk: rockchip: rk3188: Drop CLK_NR_CLKS usage clk: rockchip: Switch to use kmemdup_array() clk: rockchip: rk3128: Add HCLK_SFC dt-bindings: clock: rk3128: Add HCLK_SFC dt-bindings: clock: rk3128: Drop CLK_NR_CLKS clk: rockchip: rk3128: Drop CLK_NR_CLKS usage clk: rockchip: rk3128: Add hclk_vio_h2p to critical clocks clk: rockchip: rk3128: Export PCLK_MIPIPHY dt-bindings: clock: rk3128: Add PCLK_MIPIPHY * clk-sophgo: clk: sophgo: Avoid -Wsometimes-uninitialized in sg2042_clk_pll_set_rate() clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() clk: sophgo: Add SG2042 clock driver dt-bindings: clock: sophgo: add clkgen for SG2042 dt-bindings: clock: sophgo: add RP gate clocks for SG2042 dt-bindings: clock: sophgo: add pll clocks for SG2042 * clk-thead: clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks dt-bindings: clock: Document T-Head TH1520 AP_SUBSYS controller commit bc060e6bb7028a1780f1fe652d2546ee7058e065 Merge: 160d7b9fb9205 e96b0420988a4 d424c029af5e2 38bded815463f b1da66d28a8ba Author: Stephen Boyd Date: Tue Jul 16 11:24:16 2024 -0700 Merge branches 'clk-renesas', 'clk-amlogic', 'clk-allwinner' and 'clk-samsung' into clk-next * clk-renesas: clk: renesas: r9a08g045: Add clock, reset and power domain support for I2C clk: renesas: r8a779h0: Add Audio clocks clk: renesas: r9a08g045: Add clock, reset and power domain support for the VBATTB IP dt-bindings: clock: rcar-gen2: Remove obsolete header files dt-bindings: clock: r8a7779: Remove duplicate newline clk: renesas: Drop "Renesas" from individual driver descriptions clk: renesas: r8a779h0: Fix PLL2/PLL4 multipliers in comments clk: renesas: r8a779h0: Add VIN clocks dt-bindings: clock: renesas,rzg2l-cpg: Update description for #reset-cells clk: renesas: rcar-gen2: Use DEFINE_SPINLOCK() for static spinlock clk: renesas: cpg-lib: Use DEFINE_SPINLOCK() for global spinlock clk: renesas: r8a77970: Use common cpg_lock clk: renesas: r8a779h0: Add CSI-2 clocks clk: renesas: r8a779h0: Add ISPCS clocks * clk-amlogic: clk: meson: add missing MODULE_DESCRIPTION() macros dt-bindings: clock: meson: a1: peripherals: support sys_pll input dt-bindings: clock: meson: a1: pll: introduce new syspll bindings clk: meson: add 'NOINIT_ENABLED' flag to eliminate init for enabled PLL clk: meson: c3: add c3 clock peripherals controller driver clk: meson: c3: add support for the C3 SoC PLL clock dt-bindings: clock: add Amlogic C3 peripherals clock controller dt-bindings: clock: add Amlogic C3 SCMI clock controller support dt-bindings: clock: add Amlogic C3 PLL clock controller dt-bindings: clock: meson: Convert axg-audio-clkc to YAML format clk: meson: s4: fix pwm_j_div parent clock clk: meson: s4: fix fixed_pll_dco clock * clk-allwinner: clk: sunxi-ng r40: Constify struct regmap_config clk: sunxi-ng: h616: Add clock/reset for GPADC dt-bindings: clock: sun50i-h616-ccu: Add GPADC clocks clk: sunxi: Remove unused struct 'gates_data' clk: sunxi-ng: add missing MODULE_DESCRIPTION() macros * clk-samsung: clk: samsung: gs101: mark gout_hsi2_ufs_embd_i_clk_unipro as critical clk: samsung: Switch to use kmemdup_array() clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE commit 160d7b9fb920535c5df12df10e85efabe675d6d1 Merge: a542e9d70cb1a 12b02b6359598 a6c3da03ead11 58c53d43142f2 Author: Stephen Boyd Date: Tue Jul 16 11:24:01 2024 -0700 Merge branches 'clk-stm', 'clk-cleanup', 'clk-kunit' and 'clk-mediatek' into clk-next - Add reset support to Airoha EN7581 clk driver - Add module description to mediatek clk drivers * clk-stm: clk: stm32mp25: add security clocks clk: stm32mp2: use of STM32 access controller * clk-cleanup: clk: mxs: Use clamp() in clk_ref_round_rate() and clk_ref_set_rate() clk: lpc32xx: Constify struct regmap_config clk: xilinx: Constify struct regmap_config dt-bindings: clock: sprd,sc9860-clk: convert to YAML dt-bindings: clock: qoriq-clock: convert to yaml format clk: vexpress-osc: add missing MODULE_DESCRIPTION() macro clk: sifive: prci: fix module autoloading dt-bindings: clock: milbeaut: Drop providers and consumers from example clk: sprd: add missing MODULE_DESCRIPTION() macro clk: sophgo: add missing MODULE_DESCRIPTION() macro * clk-kunit: clk: disable clk gate tests for s390 clk: test: add missing MODULE_DESCRIPTION() macros * clk-mediatek: clk: en7523: fix rate divider for slic and spi clocks clk: en7523: Remove PCIe reset open drain configuration for EN7581 clk: en7523: Remove pcie prepare/unpreare callbacks for EN7581 SoC clk: en7523: Add reset-controller support for EN7581 SoC dt-bindings: clock: airoha: Add reset support to EN7581 clock binding dt-bindings: clock: mediatek: Document reset cells for MT8188 sys clk: mediatek: mt8173-infracfg: Handle unallocated infracfg when module dt-bindings: clock: mediatek: add syscon compatible for mt7622 pciesys clk: mediatek: Add a module description where missing commit 408323581b722c9bd504dd296920f392049a7f52 Merge: b84b3381907a3 5fa96c7ab3dc6 Author: Linus Torvalds Date: Tue Jul 16 11:12:25 2024 -0700 Merge tag 'x86_sev_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV updates from Borislav Petkov: - Add support for running the kernel in a SEV-SNP guest, over a Secure VM Service Module (SVSM). When running over a SVSM, different services can run at different protection levels, apart from the guest OS but still within the secure SNP environment. They can provide services to the guest, like a vTPM, for example. This series adds the required facilities to interface with such a SVSM module. - The usual fixlets, refactoring and cleanups [ And as always: "SEV" is AMD's "Secure Encrypted Virtualization". I can't be the only one who gets all the newer x86 TLA's confused, can I? - Linus ] * tag 'x86_sev_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/ABI/configfs-tsm: Fix an unexpected indentation silly x86/sev: Do RMP memory coverage check after max_pfn has been set x86/sev: Move SEV compilation units virt: sev-guest: Mark driver struct with __refdata to prevent section mismatch x86/sev: Allow non-VMPL0 execution when an SVSM is present x86/sev: Extend the config-fs attestation support for an SVSM x86/sev: Take advantage of configfs visibility support in TSM fs/configfs: Add a callback to determine attribute visibility sev-guest: configfs-tsm: Allow the privlevel_floor attribute to be updated virt: sev-guest: Choose the VMPCK key based on executing VMPL x86/sev: Provide guest VMPL level to userspace x86/sev: Provide SVSM discovery support x86/sev: Use the SVSM to create a vCPU when not in VMPL0 x86/sev: Perform PVALIDATE using the SVSM when not at VMPL0 x86/sev: Use kernel provided SVSM Calling Areas x86/sev: Check for the presence of an SVSM in the SNP secrets page x86/irqflags: Provide native versions of the local_irq_save()/restore() commit b84b3381907a3c5c6f1d524185eddc55547068b7 Merge: d67978318827d ea34999f41873 Author: Linus Torvalds Date: Tue Jul 16 10:53:54 2024 -0700 Merge tag 'x86_cache_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resource control updates from Borislav Petkov: - Enable Sub-NUMA clustering to work with resource control on Intel by teaching resctrl to handle scopes due to the clustering which partitions the L3 cache into sets. Modify and extend the subsystem to handle such scopes properly * tag 'x86_cache_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Update documentation with Sub-NUMA cluster changes x86/resctrl: Detect Sub-NUMA Cluster (SNC) mode x86/resctrl: Enable shared RMID mode on Sub-NUMA Cluster (SNC) systems x86/resctrl: Make __mon_event_count() handle sum domains x86/resctrl: Fill out rmid_read structure for smp_call*() to read a counter x86/resctrl: Handle removing directories in Sub-NUMA Cluster (SNC) mode x86/resctrl: Create Sub-NUMA Cluster (SNC) monitor files x86/resctrl: Allocate a new field in union mon_data_bits x86/resctrl: Refactor mkdir_mondata_subdir() with a helper function x86/resctrl: Initialize on-stack struct rmid_read instances x86/resctrl: Add a new field to struct rmid_read for summation of domains x86/resctrl: Prepare for new Sub-NUMA Cluster (SNC) monitor files x86/resctrl: Block use of mba_MBps mount option on Sub-NUMA Cluster (SNC) systems x86/resctrl: Introduce snc_nodes_per_l3_cache x86/resctrl: Add node-scope to the options for feature scope x86/resctrl: Split the rdt_domain and rdt_hw_domain structures x86/resctrl: Prepare for different scope for control/monitor operations x86/resctrl: Prepare to split rdt_domain structure x86/resctrl: Prepare for new domain scope commit 702418f7559fb1828646f0b51d9ca7c8b9ee7bff Author: Beau Belgrave Date: Mon Jul 15 18:14:13 2024 +0000 Documentation: Document user_events ioctl code The user events trace subsystem uses the 0x2A/'*' code for ioctls. These are published via the uapi/linux/user_events.h header file. Add a line indicating user events as the owner of the 0x2A/'*' code and reserve the first 32 sequence numbers. Signed-off-by: Beau Belgrave Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240715181413.1157-1-beaub@linux.microsoft.com commit f8e52fb8c2b61baf0e376db4dc3347c326feb781 Author: Marc Ferland Date: Tue Jul 9 14:39:19 2024 -0400 docs/pinctrl: fix typo in mapping example Small typo. The device name in the example should be "foo-i2c.0" and not "foo-i2c.o". Signed-off-by: Marc Ferland Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240709183919.3337131-1-marc.ferland@sonatest.com commit e35fa1f236b3e8bec56aed0ae180eaaeb3c853eb Author: Jakub Kicinski Date: Sat Jul 13 16:50:20 2024 -0700 docs: maintainer: discourage taking conversations off-list Multiple vendors seem to prefer taking discussions off list, and ask contributors to work with them privately rather than just send patches to the list. I'd imagine this is because it's hard to fit in time for random developers popping up with features to review into packed schedule. From what I've seen "work in private" usually means someone on the company side will be assigned to handle the interaction, possibly months later. In worst case, the person scheduled to help the contributor takes over and writes the code themselves. This is not how the community is supposed to work. Reviewed-by: Greg Kroah-Hartman Reviewed-by: Mark Brown Reviewed-by: Shuah Khan Signed-off-by: Jakub Kicinski Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240713235020.820910-1-kuba@kernel.org Link: https://lore.kernel.org/r/20240712144903.392284-1-kuba@kernel.org commit 5d766508fd15d7e8c90574ef270f0c163b750b45 Author: Wei Wang Date: Tue May 7 21:31:03 2024 +0800 KVM: x86/pmu: Add kvm_pmu_call() to simplify static calls of kvm_pmu_ops Similar to kvm_x86_call(), kvm_pmu_call() is added to streamline the usage of static calls of kvm_pmu_ops, which improves code readability. Suggested-by: Sean Christopherson Signed-off-by: Wei Wang Link: https://lore.kernel.org/r/20240507133103.15052-4-wei.w.wang@intel.com Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 896046474f8d2ea711f63576b3ff89f88e273aef Author: Wei Wang Date: Tue May 7 21:31:02 2024 +0800 KVM: x86: Introduce kvm_x86_call() to simplify static calls of kvm_x86_ops Introduces kvm_x86_call(), to streamline the usage of static calls of kvm_x86_ops. The current implementation of these calls is verbose and could lead to alignment challenges. This makes the code susceptible to exceeding the "80 columns per single line of code" limit as defined in the coding-style document. Another issue with the existing implementation is that the addition of kvm_x86_ prefix to hooks at the static_call sites hinders code readability and navigation. kvm_x86_call() is added to improve code readability and maintainability, while adhering to the coding style guidelines. Signed-off-by: Wei Wang Link: https://lore.kernel.org/r/20240507133103.15052-3-wei.w.wang@intel.com Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit f4854bf741c4cdb8f8cdefbf533f9b8dfd43f041 Author: Wei Wang Date: Tue May 7 21:31:01 2024 +0800 KVM: x86: Replace static_call_cond() with static_call() The use of static_call_cond() is essentially the same as static_call() on x86 (e.g. static_call() now handles a NULL pointer as a NOP), so replace it with static_call() to simplify the code. Link: https://lore.kernel.org/all/3916caa1dcd114301a49beafa5030eca396745c1.1679456900.git.jpoimboe@kernel.org/ Suggested-by: Sean Christopherson Signed-off-by: Wei Wang Link: https://lore.kernel.org/r/20240507133103.15052-2-wei.w.wang@intel.com Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 8fe76a1c2264a02155895cda9f97a6a5a9b97d91 Author: Jeff Johnson Date: Tue Jul 2 12:29:38 2024 -0700 sh: push-switch: Add missing MODULE_DESCRIPTION() macro Fixes the following warning when building allmodconfig with W=1 C=1: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/sh/drivers/push-switch.o Signed-off-by: Jeff Johnson Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20240702-md-sh-arch-sh-drivers-v1-1-2c5d439a5479@quicinc.com Signed-off-by: John Paul Adrian Glaubitz commit 4b0eb9ce15912ec303cc515888691b6ec6c32196 Author: Rodrigo Siqueira Date: Mon Jul 15 16:57:47 2024 -0600 Documentation/amdgpu: Fix duplicate declaration Address the below kernel doc warning: Documentation/gpu/amdgpu/display/display-manager:134: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:101. Declaration is '.. c:struct:: mpcc_blnd_cfg'. Documentation/gpu/amdgpu/display/display-manager:146: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:3. Declaration is '.. c:enum:: mpcc_alpha_blend_mode'. To address the above warnings, this commit uses the 'no-identifiers' option in the dcn-blocks to avoid duplication with the previous use of this function doc in the display-manager file. Finally, replaces the deprecated ':function:' in favor of ':identifiers:'. Cc: Alex Deucher Acked-by: Alex Deucher Reported-by: Stephen Rothwell Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 91ca34cba3b6a13df6304f80bbcfdf6cad328c2b Author: Rodrigo Siqueira Date: Mon Jul 15 16:29:41 2024 -0600 Documentation/gpu: Remove undocumented files from dcn-blockshubbub.h The dchubbub.h and hubp.h do not have any meaningful documentation; for this reason, this commit removes those files from the dcn-blocks documentation. Cc: Alex Deucher Acked-by: Alex Deucher Reported-by: Stephen Rothwell Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d938ec1a12a22a4eedff319aa41cba48e9c5e544 Author: Rodrigo Siqueira Date: Mon Jul 15 16:16:12 2024 -0600 drm/amd/display: Add simple struct doc to remove doc build warning This commit is a part of a series that addresses the following build warning for opp: ./drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured comments found ./drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h:1: warning: no structured comments found This commit fixes this issue by adding a simple kernel-doc to a struct in the opp.h and the dpp.h files. Cc: Alex Deucher Acked-by: Alex Deucher Reported-by: Stephen Rothwell Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1200bce4de8798ff73d1a0011e84b5ff68ffc25c Author: Rodrigo Siqueira Date: Mon Jul 15 15:58:40 2024 -0600 Documentation/gpu: Adjust DCN documentation paths When building the kernel-doc, it has the following complaints: Documentation/gpu/amdgpu/display/dcn-blocks:23: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:3. Declaration is '.. c:struct:: surface_flip_registers'. Documentation/gpu/amdgpu/display/dcn-blocks:35: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:3. Declaration is '.. c:struct:: surface_flip_registers'. This error happened due to a copy-and-paste where the same file path was duplicated multiple times to a different set of blocks. This commit addresses this issue by using the correct file path. Cc: Alex Deucher Acked-by: Alex Deucher Reported-by: Stephen Rothwell Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9947dbf984dd79d644a5468a47a76d9fef9f0884 Author: Rodrigo Siqueira Date: Mon Jul 15 15:10:32 2024 -0600 Documentation/gpu: Remove ':export:' option from DCN documentation This commit reduces, but does not fix, all the occurrences and some of the documentation warnings related to the 'no structured comments.' This was caused by the wrong use of the ':export:' option in the DCN kernel-doc, so this commit drops the usage of those options. Acked-by: Alex Deucher Reported-by: Stephen Rothwell Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4cf300f604fe894e4bd734f87fa4502faf1b8af3 Author: Rodrigo Siqueira Date: Mon Jul 15 14:57:49 2024 -0600 drm/amd/display: Move DIO documentation to the right place When building the kernel-doc, it complains with the below warning: ./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found ./drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h:1: warning: no structured comments found This warning was caused by the wrong use of the ':export:' and the lack of function documentation in the file pointed under the ':internal:'. This commit addresses those issues by relocating the overview documentation to the correct C file, removing the ':export:' options, and adding two simple kernel-doc to ensure that ':internal:' does not have any warning. Cc: Alex Deucher Acked-by: Alex Deucher Reported-by: Stephen Rothwell Link: https://lore.kernel.org/dri-devel/20240715085918.68f5ecc9@canb.auug.org.au/ Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5ae8fb971201d281cc594dba58787406e46c696a Author: Li Ma Date: Wed Jul 10 17:29:59 2024 +0800 drm/amd/swsmu: enable Pstates profile levels for SMU v14.0.4 Enables following UMD stable Pstates profile levels of power_dpm_force_performance_level for SMU v14.0.4. - profile_peak - profile_min_mclk - profile_min_sclk - profile_standard Signed-off-by: Li Ma Reviewed-by: Tim Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2fdc99b96ea86c178eb14bc948dac93feffc8936 Author: Tim Huang Date: Fri Jul 12 11:05:07 2024 +0800 drm/amd/pm: early return if disabling DPMS for GFX IP v11.5.2 This was intended to add support for GFX IP v11.5.2, but it needs to be applied to all GFX11 and subsequent APUs. Therefore the code should be revised to accommodate this. Signed-off-by: Tim Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b3fb79cda5688a44a423c27b791f5456d801e49c Author: YiPeng Chai Date: Fri Apr 12 13:46:03 2024 +0800 drm/amdgpu: add mutex to protect ras shared memory Add mutex to protect ras shared memory. v2: Add TA_RAS_COMMAND__TRIGGER_ERROR command call status check. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bc9cd5a219aa6c00515aa8f0904c8d49706f0760 Merge: 2a1fc7dc36260 74458e4859d85 Author: Paolo Bonzini Date: Tue Jul 16 11:44:23 2024 -0400 Merge branch 'kvm-6.11-sev-attestation' into HEAD The GHCB 2.0 specification defines 2 GHCB request types to allow SNP guests to send encrypted messages/requests to firmware: SNP Guest Requests and SNP Extended Guest Requests. These encrypted messages are used for things like servicing attestation requests issued by the guest. Implementing support for these is required to be fully GHCB-compliant. For the most part, KVM only needs to handle forwarding these requests to firmware (to be issued via the SNP_GUEST_REQUEST firmware command defined in the SEV-SNP Firmware ABI), and then forwarding the encrypted response to the guest. However, in the case of SNP Extended Guest Requests, the host is also able to provide the certificate data corresponding to the endorsement key used by firmware to sign attestation report requests. This certificate data is provided by userspace because: 1) It allows for different keys/key types to be used for each particular guest with requiring any sort of KVM API to configure the certificate table in advance on a per-guest basis. 2) It provides additional flexibility with how attestation requests might be handled during live migration where the certificate data for source/dest might be different. 3) It allows all synchronization between certificates and firmware/signing key updates to be handled purely by userspace rather than requiring some in-kernel mechanism to facilitate it. [1] To support fetching certificate data from userspace, a new KVM exit type will be needed to handle fetching the certificate from userspace. An attempt to define a new KVM_EXIT_COCO/KVM_EXIT_COCO_REQ_CERTS exit type to handle this was introduced in v1 of this patchset, but is still being discussed by community, so for now this patchset only implements a stub version of SNP Extended Guest Requests that does not provide certificate data, but is still enough to provide compliance with the GHCB 2.0 spec. commit 0e2c796b49735ee141fbff355b9d02e0189c3c65 Author: Roman Li Date: Mon Jul 15 16:45:46 2024 -0400 drm/amd/display: Add function banner for idle_workqueue [Why] htmldocs warning: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h: warning: Function parameter or struct member 'idle_workqueue' not described in 'amdgpu_display_manager'. [How] Add comment section for idle_workqueue with param description. Reported-by: Stephen Rothwell Link: https://lore.kernel.org/dri-devel/20240715090211.736a9b4d@canb.auug.org.au/ Signed-off-by: Roman Li Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6e169c7e0f842c48c7bf683fb789dbf5a8b1dfd8 Author: Alex Hung Date: Mon Jul 15 13:53:17 2024 -0600 drm/amd/display: Add doc entry for program_3dlut_size Fixes the warning: Function parameter or struct member 'program_3dlut_size' not described in 'mpc_funcs' Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/dri-devel/20240715090445.7e9387ec@canb.auug.org.au/ Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 7d75ef3736a025db441be652c8cc8e84044a215f Author: Boyuan Zhang Date: Wed Jul 10 16:17:12 2024 -0400 drm/amdgpu/vcn: not pause dpg for unified queue For unified queue, DPG pause for encoding is done inside VCN firmware, so there is no need to pause dpg based on ring type in kernel. For VCN3 and below, pausing DPG for encoding in kernel is still needed. v2: add more comments v3: update commit message Signed-off-by: Boyuan Zhang Acked-by: Alex Deucher Reviewed-by: Ruijing Dong Signed-off-by: Alex Deucher commit 74458e4859d85ea5963ac1c2bd7fa112f92a1d6d Author: Michael Roth Date: Mon Jul 1 17:31:48 2024 -0500 KVM: SEV: Provide support for SNP_EXTENDED_GUEST_REQUEST NAE event Version 2 of GHCB specification added support for the SNP Extended Guest Request Message NAE event. This event serves a nearly identical purpose to the previously-added SNP_GUEST_REQUEST event, but for certain message types it allows the guest to supply a buffer to be used for additional information in some cases. Currently the GHCB spec only defines extended handling of this sort in the case of attestation requests, where the additional buffer is used to supply a table of certificate data corresponding to the attestion report's signing key. Support for this extended handling will require additional KVM APIs to handle coordinating with userspace. Whether or not the hypervisor opts to provide this certificate data is optional. However, support for processing SNP_EXTENDED_GUEST_REQUEST GHCB requests is required by the GHCB 2.0 specification for SNP guests, so for now implement a stub implementation that provides an empty certificate table to the guest if it supplies an additional buffer, but otherwise behaves identically to SNP_GUEST_REQUEST. Reviewed-by: Carlos Bilbao Reviewed-by: Tom Lendacky Reviewed-by: Liam Merwick Signed-off-by: Michael Roth Message-ID: <20240701223148.3798365-4-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit f55f3c3ac69f22ce092506244a31c08a1ca497ba Author: Michael Roth Date: Mon Jul 1 17:31:47 2024 -0500 x86/sev: Move sev_guest.h into common SEV header sev_guest.h currently contains various definitions relating to the format of SNP_GUEST_REQUEST commands to SNP firmware. Currently only the sev-guest driver makes use of them, but when the KVM side of this is implemented there's a need to parse the SNP_GUEST_REQUEST header to determine whether additional information needs to be provided to the guest. Prepare for this by moving those definitions to a common header that's shared by host/guest code so that KVM can also make use of them. Reviewed-by: Tom Lendacky Reviewed-by: Liam Merwick Signed-off-by: Michael Roth Message-ID: <20240701223148.3798365-3-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 88caf544c9305313e1c48ac1a437faa5df8fff06 Author: Brijesh Singh Date: Mon Jul 1 17:31:46 2024 -0500 KVM: SEV: Provide support for SNP_GUEST_REQUEST NAE event Version 2 of GHCB specification added support for the SNP Guest Request Message NAE event. The event allows for an SEV-SNP guest to make requests to the SEV-SNP firmware through the hypervisor using the SNP_GUEST_REQUEST API defined in the SEV-SNP firmware specification. This is used by guests primarily to request attestation reports from firmware. There are other request types are available as well, but the specifics of what guest requests are being made generally does not affect how they are handled by the hypervisor, which only serves as a proxy for the guest requests and firmware responses. Implement handling for these events. When an SNP Guest Request is issued, the guest will provide its own request/response pages, which could in theory be passed along directly to firmware. However, these pages would need special care: - Both pages are from shared guest memory, so they need to be protected from migration/etc. occurring while firmware reads/writes to them. At a minimum, this requires elevating the ref counts and potentially needing an explicit pinning of the memory. This places additional restrictions on what type of memory backends userspace can use for shared guest memory since there would be some reliance on using refcounted pages. - The response page needs to be switched to Firmware-owned state before the firmware can write to it, which can lead to potential host RMP #PFs if the guest is misbehaved and hands the host a guest page that KVM is writing to for other reasons (e.g. virtio buffers). Both of these issues can be avoided completely by using separately-allocated bounce pages for both the request/response pages and passing those to firmware instead. So that's the approach taken here. Signed-off-by: Brijesh Singh Co-developed-by: Alexey Kardashevskiy Signed-off-by: Alexey Kardashevskiy Co-developed-by: Ashish Kalra Signed-off-by: Ashish Kalra Reviewed-by: Tom Lendacky Reviewed-by: Liam Merwick [mdr: ensure FW command failures are indicated to guest, drop extended request handling to be re-written as separate patch, massage commit] Signed-off-by: Michael Roth Message-ID: <20240701223148.3798365-2-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit ecfa23c8df7ef3ea2a429dfe039341bf792e95b4 Author: Boyuan Zhang Date: Thu Jul 11 16:19:54 2024 -0400 drm/amdgpu/vcn: identify unified queue in sw init Determine whether VCN using unified queue in sw_init, instead of calling functions later on. v2: fix coding style Signed-off-by: Boyuan Zhang Acked-by: Alex Deucher Reviewed-by: Ruijing Dong Signed-off-by: Alex Deucher commit 77ae5e5b00720372af2860efdc4bc652ac682696 Author: Colin Ian King Date: Tue Jul 16 10:38:51 2024 +0100 eth: fbnic: Fix spelling mistake "tiggerring" -> "triggering" There is a spelling mistake in a netdev_warn message. Fix it. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20240716093851.1003131-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit 415fb383ec2bbe4d4bb1a1b5593cd67eb058f1de Author: Francis Pravin Date: Mon Jul 15 06:31:57 2024 +0530 nvme-core: choose PIF from QPIF if QPIFS supports and PIF is QTYPE As per TP4141a: "If the Qualified Protection Information Format Support(QPIFS) bit is set to 1 and the Protection Information Format(PIF) field is set to 11b (i.e., Qualified Type), then the pif is as defined in the Qualified Protection Information Format (QPIF) field." So, choose PIF from QPIF if QPIFS supports and PIF is QTYPE. Signed-off-by: Francis Pravin Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit a3bfc095060b51f0198755020daf80d1e14413b1 Author: Kees Cook Date: Sat Jul 13 21:11:15 2024 -0700 tcp: Replace strncpy() with strscpy() Replace the deprecated[1] uses of strncpy() in tcp_ca_get_name_by_key() and tcp_get_default_congestion_control(). The callers use the results as standard C strings (via nla_put_string() and proc handlers respectively), so trailing padding is not needed. Since passing the destination buffer arguments decays it to a pointer, the size can't be trivially determined by the compiler. ca->name is the same length in both cases, so strscpy() won't fail (when ca->name is NUL-terminated). Include the length explicitly instead of using the 2-argument strscpy(). Link: https://github.com/KSPP/linux/issues/90 [1] Signed-off-by: Kees Cook Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240714041111.it.918-kees@kernel.org Signed-off-by: Jakub Kicinski commit b49991d83bba4ae77a560c5f021932e8290bd022 Author: Paolo Abeni Date: Tue Jul 16 13:06:39 2024 +0200 wifi: ath12k: fix build vs old compiler gcc 11.4.1-3 warns about memcpy() with overlapping pointers: drivers/net/wireless/ath/ath12k/wow.c: In function ‘ath12k_wow_convert_8023_to_80211.constprop’: ./include/linux/fortify-string.h:114:33: error: ‘__builtin_memcpy’ accessing 18446744073709551611 or more bytes at offsets 0 and 0 overlaps 9223372036854775799 bytes at offset -9223372036854775804 [-Werror=restrict] 114 | #define __underlying_memcpy __builtin_memcpy | ^ ./include/linux/fortify-string.h:637:9: note: in expansion of macro ‘__underlying_memcpy’ 637 | __underlying_##op(p, q, __fortify_size); \ | ^~~~~~~~~~~~~ ./include/linux/fortify-string.h:682:26: note: in expansion of macro ‘__fortify_memcpy_chk’ 682 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/wow.c:190:25: note: in expansion of macro ‘memcpy’ 190 | memcpy(pat, eth_pat, eth_pat_len); | ^~~~~~ ./include/linux/fortify-string.h:114:33: error: ‘__builtin_memcpy’ accessing 18446744073709551605 or more bytes at offsets 0 and 0 overlaps 9223372036854775787 bytes at offset -9223372036854775798 [-Werror=restrict] 114 | #define __underlying_memcpy __builtin_memcpy | ^ ./include/linux/fortify-string.h:637:9: note: in expansion of macro ‘__underlying_memcpy’ 637 | __underlying_##op(p, q, __fortify_size); \ | ^~~~~~~~~~~~~ ./include/linux/fortify-string.h:682:26: note: in expansion of macro ‘__fortify_memcpy_chk’ 682 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/wow.c:232:25: note: in expansion of macro ‘memcpy’ 232 | memcpy(pat, eth_pat, eth_pat_len); | ^~~~~~ The sum of size_t operands can overflow SIZE_MAX, triggering the warning. Address the issue using the suitable helper. Fixes: 4a3c212eee0e ("wifi: ath12k: add basic WoW functionalities") Signed-off-by: Paolo Abeni Reviewed-by: Kees Cook Acked-by: Jeff Johnson Link: https://patch.msgid.link/3175f87d7227e395b330fd88fb840c1645084ea7.1721127979.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 33c97e7c0338d921c2ae0c2e54bf17121007fb94 Author: Günther Noack Date: Thu Jul 11 16:54:57 2024 +0000 landlock: Clarify documentation for struct landlock_ruleset_attr The explanation for @handled_access_fs and @handled_access_net has significant overlap and is better explained together. * Explain the commonalities in structure-level documentation. * Clarify some wording and break up longer sentences. * Put emphasis on the word "handled" to make it clearer that "handled" is a term with special meaning in the context of Landlock. I'd like to transfer this wording into the man pages as well. Signed-off-by: Günther Noack Cc: Alejandro Colomar Cc: Konstantin Meskhidze Cc: linux-security-module@vger.kernel.org Link: https://lore.kernel.org/r/20240711165456.2148590-2-gnoack@google.com [mic: Format commit message] Signed-off-by: Mickaël Salaün commit eeb1f825b5dc68047a0556e5ae86d1467920db41 Author: Danilo Krummrich Date: Mon Jul 15 15:51:33 2024 +0200 drm/gpuvm: fix missing dependency to DRM_EXEC In commit 50c1a36f594b ("drm/gpuvm: track/lock/validate external/evicted objects") we started using drm_exec, but did not select DRM_EXEC in the Kconfig for DRM_GPUVM, fix this. Cc: Christian König Cc: Boris Brezillon Cc: Thomas Hellström Fixes: 50c1a36f594b ("drm/gpuvm: track/lock/validate external/evicted objects") Signed-off-by: Danilo Krummrich Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20240715135158.133287-1-dakr@redhat.com commit 2a1fc7dc36260fbe74b6ca29dc6d9088194a2115 Author: Sean Christopherson Date: Fri Jul 12 07:48:41 2024 -0700 KVM: x86: Suppress MMIO that is triggered during task switch emulation Explicitly suppress userspace emulated MMIO exits that are triggered when emulating a task switch as KVM doesn't support userspace MMIO during complex (multi-step) emulation. Silently ignoring the exit request can result in the WARN_ON_ONCE(vcpu->mmio_needed) firing if KVM exits to userspace for some other reason prior to purging mmio_needed. See commit 0dc902267cb3 ("KVM: x86: Suppress pending MMIO write exits if emulator detects exception") for more details on KVM's limitations with respect to emulated MMIO during complex emulator flows. Reported-by: syzbot+2fb9f8ed752c01bc9a3f@syzkaller.appspotmail.com Signed-off-by: Sean Christopherson Message-ID: <20240712144841.1230591-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9fe17d2ada6e4ec05502a8725e87def023e1d74e Author: Sean Christopherson Date: Fri Jul 12 08:13:35 2024 -0700 KVM: x86/mmu: Clean up make_huge_page_split_spte() definition and intro Tweak the definition of make_huge_page_split_spte() to eliminate an unnecessarily long line, and opportunistically initialize child_spte to make it more obvious that the child is directly derived from the huge parent. No functional change intended. Signed-off-by: Sean Christopherson Message-ID: <20240712151335.1242633-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3d4415ed75a57fc96ea203a9832e3c5ac5982719 Author: Sean Christopherson Date: Fri Jul 12 08:13:34 2024 -0700 KVM: x86/mmu: Bug the VM if KVM tries to split a !hugepage SPTE Bug the VM instead of simply warning if KVM tries to split a SPTE that is non-present or not-huge. KVM is guaranteed to end up in a broken state as the callers fully expect a valid SPTE, e.g. the shadow MMU will add an rmap entry, and all MMUs will account the expected small page. Returning '0' is also technically wrong now that SHADOW_NONPRESENT_VALUE exists, i.e. would cause KVM to create a potential #VE SPTE. While it would be possible to have the callers gracefully handle failure, doing so would provide no practical value as the scenario really should be impossible, while the error handling would add a non-trivial amount of noise. Fixes: a3fe5dbda0a4 ("KVM: x86/mmu: Split huge pages mapped by the TDP MMU when dirty logging is enabled") Cc: David Matlack Signed-off-by: Sean Christopherson Message-ID: <20240712151335.1242633-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 208a352a5490f2fa4b78d702035036af1a53a287 Merge: 1229cbefa6796 45405155d876c Author: Paolo Bonzini Date: Tue Jul 16 09:56:41 2024 -0400 Merge tag 'kvm-x86-vmx-6.11' of https://github.com/kvm-x86/linux into HEAD KVM VMX changes for 6.11 - Remove an unnecessary EPT TLB flush when enabling hardware. - Fix a series of bugs that cause KVM to fail to detect nested pending posted interrupts as valid wake eents for a vCPU executing HLT in L2 (with HLT-exiting disable by L1). - Misc cleanups commit 1229cbefa67969044fddd329ec498b4bbd0d32a1 Merge: dbfd50cb45129 704ec48fc2fbd Author: Paolo Bonzini Date: Tue Jul 16 09:55:39 2024 -0400 Merge tag 'kvm-x86-svm-6.11' of https://github.com/kvm-x86/linux into HEAD KVM SVM changes for 6.11 - Make per-CPU save_area allocations NUMA-aware. - Force sev_es_host_save_area() to be inlined to avoid calling into an instrumentable function from noinstr code. commit dbfd50cb4512990c3619e72d9d4c9a31352aba8f Merge: cda231cd42f5d 4669de42aa6c7 Author: Paolo Bonzini Date: Tue Jul 16 09:55:27 2024 -0400 Merge tag 'kvm-x86-selftests-6.11' of https://github.com/kvm-x86/linux into HEAD KVM selftests for 6.11 - Remove dead code in the memslot modification stress test. - Treat "branch instructions retired" as supported on all AMD Family 17h+ CPUs. - Print the guest pseudo-RNG seed only when it changes, to avoid spamming the log for tests that create lots of VMs. - Make the PMU counters test less flaky when counting LLC cache misses by doing CLFLUSH{OPT} in every loop iteration. commit cda231cd42f5d6c4f054071f7fce4f1fe0423e13 Merge: 5c5ddf71071f0 f287bef6ddc20 Author: Paolo Bonzini Date: Tue Jul 16 09:55:15 2024 -0400 Merge tag 'kvm-x86-pmu-6.11' of https://github.com/kvm-x86/linux into HEAD KVM x86/pmu changes for 6.11 - Don't advertise IA32_PERF_GLOBAL_OVF_CTRL as an MSR-to-be-saved, as it reads '0' and writes from userspace are ignored. - Update to the newfangled Intel CPU FMS infrastructure. - Use macros instead of open-coded literals to clean up KVM's manipulation of FIXED_CTR_CTRL MSRs. commit 5c5ddf71071f01fabe9380e16c36c9263d40d528 Merge: 34b69edecb472 377b2f359d1f7 Author: Paolo Bonzini Date: Tue Jul 16 09:54:57 2024 -0400 Merge tag 'kvm-x86-mtrrs-6.11' of https://github.com/kvm-x86/linux into HEAD KVM x86 MTRR virtualization removal Remove support for virtualizing MTRRs on Intel CPUs, along with a nasty CR0.CD hack, and instead always honor guest PAT on CPUs that support self-snoop. commit 34b69edecb47284e81f0204a50db5e55fe93cb52 Merge: 5dcc1e76144fc 0089c055b5602 Author: Paolo Bonzini Date: Tue Jul 16 09:53:28 2024 -0400 Merge tag 'kvm-x86-mmu-6.11' of https://github.com/kvm-x86/linux into HEAD KVM x86 MMU changes for 6.11 - Don't allocate kvm_mmu_page.shadowed_translation for shadow pages that can't hold leafs SPTEs. - Unconditionally drop mmu_lock when allocating TDP MMU page tables for eager page splitting to avoid stalling vCPUs when splitting huge pages. - Misc cleanups commit 5dcc1e76144fcf7bfe182bd98572d1957a380bac Merge: 86014c1e20fa1 82222ee7e84cb Author: Paolo Bonzini Date: Tue Jul 16 09:53:05 2024 -0400 Merge tag 'kvm-x86-misc-6.11' of https://github.com/kvm-x86/linux into HEAD KVM x86 misc changes for 6.11 - Add a global struct to consolidate tracking of host values, e.g. EFER, and move "shadow_phys_bits" into the structure as "maxphyaddr". - Add KVM_CAP_X86_APIC_BUS_CYCLES_NS to allow configuring the effective APIC bus frequency, because TDX. - Print the name of the APICv/AVIC inhibits in the relevant tracepoint. - Clean up KVM's handling of vendor specific emulation to consistently act on "compatible with Intel/AMD", versus checking for a specific vendor. - Misc cleanups commit 86014c1e20fa1b5d5c6968f37fdd2f1b6c94d519 Merge: f4501e8bc88db 25bc6af60f612 Author: Paolo Bonzini Date: Tue Jul 16 09:51:36 2024 -0400 Merge tag 'kvm-x86-generic-6.11' of https://github.com/kvm-x86/linux into HEAD KVM generic changes for 6.11 - Enable halt poll shrinking by default, as Intel found it to be a clear win. - Setup empty IRQ routing when creating a VM to avoid having to synchronize SRCU when creating a split IRQCHIP on x86. - Rework the sched_in/out() paths to replace kvm_arch_sched_in() with a flag that arch code can use for hooking both sched_in() and sched_out(). - Take the vCPU @id as an "unsigned long" instead of "u32" to avoid truncating a bogus value from userspace, e.g. to help userspace detect bugs. - Mark a vCPU as preempted if and only if it's scheduled out while in the KVM_RUN loop, e.g. to avoid marking it preempted and thus writing guest memory when retrieving guest state during live migration blackout. - A few minor cleanups commit f4501e8bc88db2548b37afe100506358f1bf7504 Merge: 1c5a0b55abeb6 ebbdf37ce9abb Author: Paolo Bonzini Date: Tue Jul 16 09:51:14 2024 -0400 Merge tag 'kvm-x86-fixes-6.10-11' of https://github.com/kvm-x86/linux into HEAD KVM Xen: Fix a bug where KVM fails to check the validity of an incoming userspace virtual address and tries to activate a gfn_to_pfn_cache with a kernel address. commit 1c5a0b55abeb6d99ed0962c6a6fa611821949523 Merge: c8b8b8190a80b bb032b2352c33 Author: Paolo Bonzini Date: Tue Jul 16 09:50:44 2024 -0400 Merge tag 'kvmarm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 changes for 6.11 - Initial infrastructure for shadow stage-2 MMUs, as part of nested virtualization enablement - Support for userspace changes to the guest CTR_EL0 value, enabling (in part) migration of VMs between heterogenous hardware - Fixes + improvements to pKVM's FF-A proxy, adding support for v1.1 of the protocol - FPSIMD/SVE support for nested, including merged trap configuration and exception routing - New command-line parameter to control the WFx trap behavior under KVM - Introduce kCFI hardening in the EL2 hypervisor - Fixes + cleanups for handling presence/absence of FEAT_TCRX - Miscellaneous fixes + documentation updates commit 6f6a23d42bdfbbfe1b41a23e2c78319a0cc65db3 Author: Curtis Malainey Date: Tue Jul 16 10:40:12 2024 +0200 ASoC: Intel: Fix RT5650 SSP lookup Commit 8efcd4864652 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization") migrated the pin assignment in the context struct up to soc-acpi-intel-ssp-common.c. This uses a lookup table to see if a device has a amp/codec before assigning the pin. The issue here arises when combination parts that serve both (with 2 ports) are used. sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1f.3/adl_rt5682_def/SSP0-Codec' CPU: 1 PID: 2079 Comm: udevd Tainted: G U 6.6.36-03391-g744739e00023 #1 3be1a2880a0970f65545a957db7d08ef4b3e2c0d Hardware name: Google Anraggar/Anraggar, BIOS Google_Anraggar.15217.552.0 05/07/2024 Call Trace: dump_stack_lvl+0x69/0xa0 sysfs_warn_dup+0x5b/0x70 sysfs_create_dir_ns+0xb0/0x100 kobject_add_internal+0x133/0x3c0 kobject_add+0x66/0xb0 ? device_add+0x65/0x780 device_add+0x164/0x780 snd_soc_add_pcm_runtimes+0x2fa/0x800 snd_soc_bind_card+0x35e/0xc20 devm_snd_soc_register_card+0x48/0x90 platform_probe+0x7b/0xb0 really_probe+0xf7/0x2a0 ... kobject: kobject_add_internal failed for SSP0-Codec with -EEXIST, don't try to register things with the same name in the same directory. The issue is that the ALC5650 was only defined in the codec table and not the amp table which left the pin unassigned but the dai link was still created by the machine driver. Also patch the suffix filename code for the topology to prevent double suffix names as a result of this change. Fixes: 8efcd4864652 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization") Reviewed-by: Bard Liao Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240716084012.299257-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9ee3f0d8c9999eb1ef2866e86f8d57d996fc0348 Author: Pierre-Louis Bossart Date: Tue Jul 16 10:45:30 2024 +0200 ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices Multiple users report a regression bisected to commit d5263dbbd8af ("ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfers"). The firmware version is the likely suspect, as these users relied on SOF 2.0 while Intel only tested with the 2.2 release. Rather than completely disable the wait_for_completion(), which can help us gather timing information on the different stages of the boot process, the simplest course of action is to just disable it for older IPC versions which are no longer under active development. Closes: https://github.com/thesofproject/linux/issues/5072 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218961 Fixes: d5263dbbd8af ("ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfers") Tested-by: Mike Krinkin Tested-by: Todd Brandt Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://patch.msgid.link/20240716084530.300829-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7dc357d343f134bf59815ff6098b93503ec8a23b Author: Hao Ge Date: Tue Jul 9 10:33:37 2024 +0800 tpm: Use auth only after NULL check in tpm_buf_check_hmac_response() Dereference auth after NULL check in tpm_buf_check_hmac_response(). Otherwise, unless tpm2_sessions_init() was called, a call can cause NULL dereference, when TCG_TPM2_HMAC is enabled. [jarkko: adjusted the commit message.] Cc: stable@vger.kernel.org # v6.10+ Fixes: 7ca110f2679b ("tpm: Address !chip->auth in tpm_buf_append_hmac_session*()") Signed-off-by: Hao Ge Signed-off-by: Jarkko Sakkinen commit 30b866413e7bdd507a79854b5931528d3f6f438f Merge: e518f368303d3 a67a1deb11d9a Author: Benjamin Tissoires Date: Tue Jul 16 12:27:26 2024 +0200 Merge branch 'for-6.11/bpf' into for-linus - Rewrite of HID-BPF internal implementation to use bpf struct_ops instead of tracing (Benjamin Tissoires) - Add new HID-BPF hooks to be able to intercept userspace calls targetting a HID device and filtering them (Benjamin Tissoires) - Add support for various new devices through HID-BPF filters (Benjamin Tissoires) commit e518f368303d35017fe79f21f0fec7860ef71d0b Merge: 2fe90223ebd44 06483d251df67 Author: Benjamin Tissoires Date: Tue Jul 16 12:24:46 2024 +0200 Merge branch 'for-6.11/uclogic' into for-linus Couple of hid-uclogic fixes by José Expósito: - Support HUION devices with up to 20 buttons - Use Rx and Ry for touch strips commit 2fe90223ebd44c2fa33b788926b415f885906cc4 Merge: d0dcd1952e54a 09bae5876dde0 Author: Benjamin Tissoires Date: Tue Jul 16 12:24:04 2024 +0200 Merge branch 'for-6.11/nintendo' into for-linus Cleanup unused functions in hid-nintendo by Jiapeng Chong commit d0dcd1952e54a1668058b789f3933a9319ff3372 Merge: a07ead311700a 8bb9f9fa59ef9 Author: Benjamin Tissoires Date: Tue Jul 16 12:22:09 2024 +0200 Merge branch 'for-6.11/intel-ish-hid' into for-linus Couple of minor fixes on intel-ish-hid by Jeff Johnson: - add missing MODULE_DESCRIPTION - add missing doctext entry commit a07ead311700a74cb013aa3df7e7dba527e99547 Merge: 3c69140734a27 394ba612f9419 Author: Benjamin Tissoires Date: Tue Jul 16 12:21:09 2024 +0200 Merge branch 'for-6.11/apple' into for-linus Add support for the magic keyboard backlight (Orlando Chamberlain) commit 3c69140734a27f8b145f12fa0ae80c1fe36a02ca Merge: 5ba28be6be8ac 8a25418ba65a5 Author: Benjamin Tissoires Date: Tue Jul 16 12:19:28 2024 +0200 Merge branch 'for-6.11/trivial' into for-linus Couple of trivial fixes: - extra semicolon (Chen Ni) - typo (Thorsten Blum) commit 5ba28be6be8ac6cd4fa1ac67cd4da237d39917d2 Merge: b5c4881bda64d 523e6f4f50fc7 Author: Benjamin Tissoires Date: Tue Jul 16 12:18:28 2024 +0200 Merge branch 'for-6.11/module-description' into for-linus - add a bunch of missing MODULE_DESCRIPTION (Jeff Johnson) commit b5c4881bda64ddf8d83ea6c116365294028b7ce4 Merge: 22c0a46a0d973 b81881b9c10e1 Author: Benjamin Tissoires Date: Tue Jul 16 12:16:04 2024 +0200 Merge branch 'for-6.11/core' into for-linus Couple of fixes for HID-core: - use of kvzalloc in case memory gets too fragmented (Hailong Liu) - retrieve the device firmware node in the child HID device (Danny Kaehn) commit c26b1b89b8a9fd8665e79cd798bd970e233772b6 Author: Masami Hiramatsu (Google) Date: Fri Jul 12 09:26:17 2024 +0900 MAINTAINERS: Add uprobes entry Add uprobes entry to MAINTAINERS to clarify the maintainers. Link: https://lore.kernel.org/all/172074397710.247544.17045299807723238107.stgit@devnote2/ Suggested-by: Peter Zijlstra Signed-off-by: Masami Hiramatsu (Google) Acked-by: Peter Zijlstra (Intel) Acked-by: Oleg Nesterov commit 3f45181358e4df50a40ea1bb51b00a1f295f915e Author: Kuniyuki Iwashima Date: Sun Jul 14 09:17:19 2024 -0700 tcp: Don't access uninit tcp_rsk(req)->ao_keyid in tcp_create_openreq_child(). syzkaller reported KMSAN splat in tcp_create_openreq_child(). [0] The uninit variable is tcp_rsk(req)->ao_keyid. tcp_rsk(req)->ao_keyid is initialised only when tcp_conn_request() finds a valid TCP AO option in SYN. Then, tcp_rsk(req)->used_tcp_ao is set accordingly. Let's not read tcp_rsk(req)->ao_keyid when tcp_rsk(req)->used_tcp_ao is false. [0]: BUG: KMSAN: uninit-value in tcp_create_openreq_child+0x198b/0x1ff0 net/ipv4/tcp_minisocks.c:610 tcp_create_openreq_child+0x198b/0x1ff0 net/ipv4/tcp_minisocks.c:610 tcp_v4_syn_recv_sock+0x18e/0x2170 net/ipv4/tcp_ipv4.c:1754 tcp_check_req+0x1a3e/0x20c0 net/ipv4/tcp_minisocks.c:852 tcp_v4_rcv+0x26a4/0x53a0 net/ipv4/tcp_ipv4.c:2265 ip_protocol_deliver_rcu+0x884/0x1270 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x30f/0x530 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x230/0x4c0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline] ip_sublist_rcv+0x10f7/0x13e0 net/ipv4/ip_input.c:639 ip_list_rcv+0x952/0x9c0 net/ipv4/ip_input.c:674 __netif_receive_skb_list_ptype net/core/dev.c:5703 [inline] __netif_receive_skb_list_core+0xd92/0x11d0 net/core/dev.c:5751 __netif_receive_skb_list net/core/dev.c:5803 [inline] netif_receive_skb_list_internal+0xd8f/0x1350 net/core/dev.c:5895 gro_normal_list include/net/gro.h:515 [inline] napi_complete_done+0x3f2/0x990 net/core/dev.c:6246 e1000_clean+0x1fa4/0x5e50 drivers/net/ethernet/intel/e1000/e1000_main.c:3808 __napi_poll+0xd9/0x990 net/core/dev.c:6771 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x90f/0x17e0 net/core/dev.c:6962 handle_softirqs+0x152/0x6b0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0x5d/0x120 kernel/softirq.c:649 common_interrupt+0x83/0x90 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 __msan_instrument_asm_store+0xd6/0xe0 arch_atomic_inc arch/x86/include/asm/atomic.h:53 [inline] raw_atomic_inc include/linux/atomic/atomic-arch-fallback.h:992 [inline] atomic_inc include/linux/atomic/atomic-instrumented.h:436 [inline] page_ref_inc include/linux/page_ref.h:153 [inline] folio_ref_inc include/linux/page_ref.h:160 [inline] filemap_map_order0_folio mm/filemap.c:3596 [inline] filemap_map_pages+0x11c7/0x2270 mm/filemap.c:3644 do_fault_around mm/memory.c:4879 [inline] do_read_fault mm/memory.c:4912 [inline] do_fault mm/memory.c:5051 [inline] do_pte_missing mm/memory.c:3897 [inline] handle_pte_fault mm/memory.c:5381 [inline] __handle_mm_fault mm/memory.c:5524 [inline] handle_mm_fault+0x3677/0x6f00 mm/memory.c:5689 do_user_addr_fault+0x1373/0x2b20 arch/x86/mm/fault.c:1338 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x54/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Uninit was stored to memory at: tcp_create_openreq_child+0x1984/0x1ff0 net/ipv4/tcp_minisocks.c:611 tcp_v4_syn_recv_sock+0x18e/0x2170 net/ipv4/tcp_ipv4.c:1754 tcp_check_req+0x1a3e/0x20c0 net/ipv4/tcp_minisocks.c:852 tcp_v4_rcv+0x26a4/0x53a0 net/ipv4/tcp_ipv4.c:2265 ip_protocol_deliver_rcu+0x884/0x1270 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x30f/0x530 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x230/0x4c0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline] ip_sublist_rcv+0x10f7/0x13e0 net/ipv4/ip_input.c:639 ip_list_rcv+0x952/0x9c0 net/ipv4/ip_input.c:674 __netif_receive_skb_list_ptype net/core/dev.c:5703 [inline] __netif_receive_skb_list_core+0xd92/0x11d0 net/core/dev.c:5751 __netif_receive_skb_list net/core/dev.c:5803 [inline] netif_receive_skb_list_internal+0xd8f/0x1350 net/core/dev.c:5895 gro_normal_list include/net/gro.h:515 [inline] napi_complete_done+0x3f2/0x990 net/core/dev.c:6246 e1000_clean+0x1fa4/0x5e50 drivers/net/ethernet/intel/e1000/e1000_main.c:3808 __napi_poll+0xd9/0x990 net/core/dev.c:6771 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x90f/0x17e0 net/core/dev.c:6962 handle_softirqs+0x152/0x6b0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0x5d/0x120 kernel/softirq.c:649 common_interrupt+0x83/0x90 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 Uninit was created at: __alloc_pages_noprof+0x82d/0xcb0 mm/page_alloc.c:4706 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page mm/slub.c:2265 [inline] allocate_slab mm/slub.c:2428 [inline] new_slab+0x2af/0x14e0 mm/slub.c:2481 ___slab_alloc+0xf73/0x3150 mm/slub.c:3667 __slab_alloc mm/slub.c:3757 [inline] __slab_alloc_node mm/slub.c:3810 [inline] slab_alloc_node mm/slub.c:3990 [inline] kmem_cache_alloc_noprof+0x53a/0x9f0 mm/slub.c:4009 reqsk_alloc_noprof net/ipv4/inet_connection_sock.c:920 [inline] inet_reqsk_alloc+0x63/0x700 net/ipv4/inet_connection_sock.c:951 tcp_conn_request+0x339/0x4860 net/ipv4/tcp_input.c:7177 tcp_v4_conn_request+0x13b/0x190 net/ipv4/tcp_ipv4.c:1719 tcp_rcv_state_process+0x2dd/0x4a10 net/ipv4/tcp_input.c:6711 tcp_v4_do_rcv+0xbee/0x10d0 net/ipv4/tcp_ipv4.c:1932 tcp_v4_rcv+0x3fad/0x53a0 net/ipv4/tcp_ipv4.c:2334 ip_protocol_deliver_rcu+0x884/0x1270 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x30f/0x530 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x230/0x4c0 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline] ip_sublist_rcv+0x10f7/0x13e0 net/ipv4/ip_input.c:639 ip_list_rcv+0x952/0x9c0 net/ipv4/ip_input.c:674 __netif_receive_skb_list_ptype net/core/dev.c:5703 [inline] __netif_receive_skb_list_core+0xd92/0x11d0 net/core/dev.c:5751 __netif_receive_skb_list net/core/dev.c:5803 [inline] netif_receive_skb_list_internal+0xd8f/0x1350 net/core/dev.c:5895 gro_normal_list include/net/gro.h:515 [inline] napi_complete_done+0x3f2/0x990 net/core/dev.c:6246 e1000_clean+0x1fa4/0x5e50 drivers/net/ethernet/intel/e1000/e1000_main.c:3808 __napi_poll+0xd9/0x990 net/core/dev.c:6771 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x90f/0x17e0 net/core/dev.c:6962 handle_softirqs+0x152/0x6b0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0x5d/0x120 kernel/softirq.c:649 common_interrupt+0x83/0x90 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 CPU: 0 PID: 239 Comm: modprobe Tainted: G B 6.10.0-rc7-01816-g852e42cc2dd4 #3 1107521f0c7b55c9309062382d0bda9f604dbb6d Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 Fixes: 06b22ef29591 ("net/tcp: Wire TCP-AO to request sockets") Reported-by: syzkaller Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Acked-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://patch.msgid.link/20240714161719.6528-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit d8b17a364ec48239fccb65efe74bb485e79e6743 Author: Luke D. Jones Date: Tue Jul 16 13:11:30 2024 +1200 platform/x86: asus-wmi: fix TUF laptop RGB variant In kbd_rgb_mode_store the dev_get_drvdata() call was assuming the device data was asus_wmi when it was actually led_classdev. This patch corrects this by making the correct chain of calls to get the asus_wmi driver data. Fixes: ae834a549ec1 ("platform/x86: asus-wmi: add support variant of TUF RGB") Tested-by: Denis Benato Signed-off-by: Luke D. Jones Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240716011130.17464-2-luke@ljones.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 182c6941c55347c735e70ffca77741cd000cbec7 Author: Dan Carpenter Date: Mon Jul 15 15:22:55 2024 -0500 platform/x86/intel/tpmi/plr: Fix output in plr_print_bits() Smatch complains that 'str' can be used without being initialized: drivers/platform/x86/intel/intel_plr_tpmi.c:178 plr_print_bits() error: uninitialized symbol 'str'. In this loop, we iterate over all the set bits and print the name of the bit. The intention is that if there is a bit which is between 0-31 we look for the name in the first array plr_coarse_reasons[] which has 10 elements. If the bit is in the 32-63 range we look for it in the plr_fine_reasons[] array which has 30 elements. If the bit is in the invalid ranges, 10-31 or 62-63, then we should print "UNKNOWN(%d)". The problem is that 'str' needs to be initialized at the start of each iteration, otherwise if we can't find the string then instead of printing "UNKNOWN(%d)", we will re-print whatever the previous bit was. Fixes: 9e9397a41b7b ("platform/x86/intel/tpmi/plr: Add support for the plr mailbox") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/b0084e70-4144-445a-9b89-fb19f6b8336a@stanley.mountain Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9d20c0535ea822e7306049bfc735bd0fb83400c1 Author: Ilpo Järvinen Date: Mon Jul 15 13:41:02 2024 +0300 Docs/admin-guide: Remove pmf leftover reference from the index pmf.rst was removed by the commit 2fd66f7d3b0d ("platform/x86/amd/pmf: Remove update system state document") but the reference in the admin-guide index remained in place which triggers this warning: Documentation/admin-guide/index.rst:75: WARNING: toctree contains reference to nonexisting document 'admin-guide/pmf' Remove pmf also from the index to avoid the warning. Reported-by: Stephen Rothwell Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20240715104102.4615-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen commit 509580fad7323b6a5da27e8365cd488f3b57210e Author: Imre Deak Date: Mon Jul 8 22:00:25 2024 +0300 drm/i915/dp: Don't switch the LTTPR mode on an active link Switching to transparent mode leads to a loss of link synchronization, so prevent doing this on an active link. This happened at least on an Intel N100 system / DELL UD22 dock, the LTTPR residing either on the host or the dock. To fix the issue, keep the current mode on an active link, adjusting the LTTPR count accordingly (resetting it to 0 in transparent mode). v2: Adjust code comment during link training about reiniting the LTTPRs. (Ville) Fixes: 7b2a4ab8b0ef ("drm/i915: Switch to LTTPR transparent mode link training") Reported-and-tested-by: Gareth Yu Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10902 Cc: # v5.15+ Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Reviewed-by: Ankit Nautiyal Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240708190029.271247-3-imre.deak@intel.com (cherry picked from commit 211ad49cf8ccfdc798a719b4d1e000d0a8a9e588) Signed-off-by: Tvrtko Ursulin commit d13e2a6e95e6b87f571c837c71a3d05691def9bb Author: Imre Deak Date: Mon Jul 8 22:00:24 2024 +0300 drm/i915/dp: Reset intel_dp->link_trained before retraining the link Regularly retraining a link during an atomic commit happens with the given pipe/link already disabled and hence intel_dp->link_trained being false. Ensure this also for retraining a DP SST link via direct calls to the link training functions (vs. an actual commit as for DP MST). So far nothing depended on this, however the next patch will depend on link_trained==false for changing the LTTPR mode to non-transparent. Cc: # v5.15+ Cc: Ville Syrjälä Reviewed-by: Ankit Nautiyal Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240708190029.271247-2-imre.deak@intel.com (cherry picked from commit a4d5ce61765c08ab364aa4b327f6739b646e6cfa) Signed-off-by: Tvrtko Ursulin commit 94a4b0a4cb4340273a2d67be893f9032fe7b7e26 Author: Masahiro Yamada Date: Mon Jul 8 00:38:06 2024 +0900 kconfig: remove SYMBOL_CHOICEVAL flag This flag is unneeded because a choice member can be detected by other means. Signed-off-by: Masahiro Yamada commit 6425e3b247b1eff04c64091b2af8811d05546a86 Author: Masahiro Yamada Date: Mon Jul 8 00:38:05 2024 +0900 kconfig: add const qualifiers to several function arguments Clarify that the given structures are not modified. Signed-off-by: Masahiro Yamada commit 8bfd6f0923cd7e48aa5d9e5a4e20af818a32c30a Author: Masahiro Yamada Date: Mon Jul 8 00:38:04 2024 +0900 kconfig: call expr_eliminate_yn() at least once in expr_eliminate_dups() Kconfig simplifies expressions, but redundant '&&' and '||' operators involving constant symbols 'y' and 'n' are sometimes trimmed and sometimes not. [Test Code] config DEP def_bool y config A bool "A" depends on DEP && y config B bool "B" depends on DEP && y && y [Result] $ make helpnewconfig [ snip ] ----- There is no help available for this option. Symbol: A [=n] Type : bool Defined at Kconfig:4 Prompt: A Depends on: DEP [=y] && y [=y] Location: -> A (A [=n]) ----- ----- There is no help available for this option. Symbol: B [=n] Type : bool Defined at Kconfig:8 Prompt: B Depends on: DEP [=y] Location: -> B (B [=n]) ----- The dependency for A, 'DEP && y', remains as-is, while that for B, 'DEP && y && y', has been reduced to 'DEP'. Currently, expr_eliminate_dups() calls expr_eliminate_yn() only when trans_count != 0, in other words, only when expr_eliminate_dups1() has trimmed at least one leaf. It fails to trim a single '&& y', etc. To fix this inconsistent behavior, expr_eliminate_yn() should be called at least once even if no leaf has been trimmed. Signed-off-by: Masahiro Yamada commit d67015eedd9722cfbf9d929be743ce27dfcd0744 Author: Masahiro Yamada Date: Fri Jul 5 00:23:32 2024 +0900 kbuild: deb-pkg: use default string when variable is unset or null ${DEBFULLNAME-${user}} falls back to ${user} when DEBFULLNAME is unset. It is more reasonable to do so when DEBFULLNAME is unset or null. Otherwise, the command: $ DEBFULLNAME= make deb-pkg will leave the name field blank. The same applies to KBUILD_BUILD_USER and KBUILD_BUILD_HOST. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit f58437aba0a35825dc14dbbf7a1e452662ef797d Author: Masahiro Yamada Date: Thu Jul 4 22:47:57 2024 +0900 modpost: rename R_ARM_THM_CALL to R_ARM_THM_PC22 /usr/include/elf.h, which originates from the glibc/musl, defines R_ARM_THM_PC22 instead of R_ARM_THM_CALL. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 3914cdde89c29b681e73e507a04ca50f147482a3 Author: Masahiro Yamada Date: Thu Jul 4 22:47:56 2024 +0900 modpost: remove self-definitions of R_ARM_* macros Commit f5983dab0ead ("modpost: define more R_ARM_* for old distributions") added self-definitions for the R_ARM_* macros to fix build errors on CentOS 7. RHEL/CentOS 7 were retired at the end of June. Remove all the R_ARM_* definitions (except for R_ARM_THM_CALL), which should be available in recent distributions. glibc and musl added most of R_ARM_* macros in 2013. [1] [2] [1]: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=08cbd996d33114ca50644d060fbe3a08260430fb [2]: https://git.musl-libc.org/cgit/musl/commit/?id=268375c1c017c0bdefeed1a330811e433c4dfaef Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 5f99665ee8f4335f334a5292b6d5b41a577fc2c0 Author: Masahiro Yamada Date: Thu Jul 4 22:47:55 2024 +0900 kbuild: raise the minimum GNU Make requirement to 4.0 RHEL/CentOS 7, popular distributions that install GNU Make 3.82, reached EOM/EOL on June 30, 2024. While you may get extended support, it is a good time to raise the minimum GNU Make version. The new requirement, GNU Make 4.0, was released in October, 2013. I did not touch the Makefiles under tools/ because I do not know the requirements for building tools. I do not find any GNU Make version checks under tools/. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 712aba5543b88996bc4682086471076fbf048927 Author: Masahiro Yamada Date: Thu Jul 4 22:13:58 2024 +0900 kbuild: avoid build error when single DTB is turned into composite DTB As commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)") explained, $(real-prereqs) is not just a list of objects when linking a multi-object module. If a single-object module is turned into a multi-object module, $^ (and therefore $(real-prereqs) as well) contains header files recorded in the *.cmd file. Such headers must be filtered out. Now that a DTB can be built either from a single source or multiple source files, the same issue can occur. Consider the following scenario: First, foo.dtb is implemented as a single-blob device tree. The code looks something like this: [Sample Code 1] Makefile: dtb-y += foo.dtb foo.dts: #include /dts-v1/; / { }; When it is compiled, .foo.dtb.cmd records that foo.dtb depends on scripts/dtc/include-prefixes/dt-bindings/gpio/gpio.h. Later, foo.dtb is split into a base and an overlay. The code looks something like this: [Sample Code 2] Makefile: dtb-y += foo.dtb foo-dtbs := foo-base.dtb foo-addon.dtbo foo-base.dts: #include /dts-v1/; / { }; foo-addon.dtso: /dts-v1/; /plugin/; / { }; If you rebuild foo.dtb without 'make clean', you will get this error: Overlay 'scripts/dtc/include-prefixes/dt-bindings/gpio/gpio.h' is incomplete $(real-prereqs) contains not only foo-base.dtb and foo-addon.dtbo but also scripts/dtc/include-prefixes/dt-bindings/gpio/gpio.h, which is passed to scripts/dtc/fdtoverlay. Fixes: 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay") Signed-off-by: Masahiro Yamada commit c0414419758b2521c2038847960af258c678db8d Author: Masahiro Yamada Date: Wed Jul 3 03:02:42 2024 +0900 kbuild: package: add -e and -u options to some shell scripts Set -e to make these scripts fail on the first error. Set -u because these scripts are invoked by Makefile, and do not work properly without necessary variables defined. I tweaked mkdebian to cope with optional environment variables. Remove the explicit "test -n ..." from install-extmod-build. Both options are described in POSIX. [1] [1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.html Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit d67978318827d06f1c0fa4c31343a279e9df6fde Merge: 2439a5eaa753d 34b3fc558b537 Author: Linus Torvalds Date: Mon Jul 15 20:25:16 2024 -0700 Merge tag 'x86_cpu_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu model updates from Borislav Petkov: - Flip the logic to add feature names to /proc/cpuinfo to having to explicitly specify the flag if there's a valid reason to show it in /proc/cpuinfo - Switch a bunch of Intel x86 model checking code to the new CPU model defines - Fixes and cleanups * tag 'x86_cpu_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines x86/cpufeatures: Flip the /proc/cpuinfo appearance logic x86/CPU/AMD: Always inline amd_clear_divider() x86/mce/inject: Add missing MODULE_DESCRIPTION() line perf/x86/rapl: Switch to new Intel CPU model defines x86/boot: Switch to new Intel CPU model defines x86/cpu: Switch to new Intel CPU model defines perf/x86/intel: Switch to new Intel CPU model defines x86/virt/tdx: Switch to new Intel CPU model defines x86/PCI: Switch to new Intel CPU model defines x86/cpu/intel: Switch to new Intel CPU model defines x86/platform/intel-mid: Switch to new Intel CPU model defines x86/pconfig: Remove unused MKTME pconfig code x86/cpu: Remove useless work in detect_tme_early() commit 2439a5eaa753d22759fb4248e0f5e459503fffad Merge: f998678baf3c1 42c141fbb651b Author: Linus Torvalds Date: Mon Jul 15 20:07:27 2024 -0700 Merge tag 'x86_bugs_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu mitigation updates from Borislav Petkov: - Add a spectre_bhi=vmexit mitigation option aimed at cloud environments - Remove duplicated Spectre cmdline option documentation - Add separate macro definitions for syscall handlers which do not return in order to address objtool warnings * tag 'x86_bugs_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/bugs: Add 'spectre_bhi=vmexit' cmdline option x86/bugs: Remove duplicate Spectre cmdline option descriptions x86/syscall: Mark exit[_group] syscall handlers __noreturn commit f998678baf3c143fec4c66e7f3a84bae3b25ff12 Merge: 222dfb8326dcd 57b7b6acb41b5 Author: Linus Torvalds Date: Mon Jul 15 20:05:40 2024 -0700 Merge tag 'x86_vmware_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vmware updates from Borislav Petkov: - Add a unified VMware hypercall API layer which should be used by all callers instead of them doing homegrown solutions. This will provide for adding API support for confidential computing solutions like TDX * tag 'x86_vmware_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vmware: Add TDX hypercall support x86/vmware: Remove legacy VMWARE_HYPERCALL* macros x86/vmware: Correct macro names x86/vmware: Use VMware hypercall API drm/vmwgfx: Use VMware hypercall API input/vmmouse: Use VMware hypercall API ptp/vmware: Use VMware hypercall API x86/vmware: Introduce VMware hypercall API commit 3911af778f208e5f49d43ce739332b91e26bc48e Author: Peter Wang Date: Mon Jul 15 14:38:31 2024 +0800 scsi: ufs: core: Fix deadlock during RTC update There is a deadlock when runtime suspend waits for the flush of RTC work, and the RTC work calls ufshcd_rpm_get_sync() to wait for runtime resume. Here is deadlock backtrace: kworker/0:1 D 4892.876354 10 10971 4859 0x4208060 0x8 10 0 120 670730152367 ptr f0ffff80c2e40000 0 1 0x00000001 0x000000ff 0x000000ff 0x000000ff __switch_to+0x1a8/0x2d4 __schedule+0x684/0xa98 schedule+0x48/0xc8 schedule_timeout+0x48/0x170 do_wait_for_common+0x108/0x1b0 wait_for_completion+0x44/0x60 __flush_work+0x39c/0x424 __cancel_work_sync+0xd8/0x208 cancel_delayed_work_sync+0x14/0x28 __ufshcd_wl_suspend+0x19c/0x480 ufshcd_wl_runtime_suspend+0x3c/0x1d4 scsi_runtime_suspend+0x78/0xc8 __rpm_callback+0x94/0x3e0 rpm_suspend+0x2d4/0x65c __pm_runtime_suspend+0x80/0x114 scsi_runtime_idle+0x38/0x6c rpm_idle+0x264/0x338 __pm_runtime_idle+0x80/0x110 ufshcd_rtc_work+0x128/0x1e4 process_one_work+0x26c/0x650 worker_thread+0x260/0x3d8 kthread+0x110/0x134 ret_from_fork+0x10/0x20 Skip updating RTC if RPM state is not RPM_ACTIVE. Fixes: 6bf999e0eb41 ("scsi: ufs: core: Add UFS RTC support") Cc: stable@vger.kernel.org # 6.9.x Signed-off-by: Peter Wang Link: https://lore.kernel.org/r/20240715063831.29792-1-peter.wang@mediatek.com Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 022587d8aec3da1d1698ddae9fb8cfe35f3ad49c Author: Peter Wang Date: Fri Jul 12 17:45:06 2024 +0800 scsi: ufs: core: Bypass quick recovery if force reset is needed If force_reset is true, bypass quick recovery. This will shorten error recovery time. Signed-off-by: Peter Wang Link: https://lore.kernel.org/r/20240712094506.11284-1-peter.wang@mediatek.com Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 222dfb8326dcdc3181832d80331d2d4956cab42e Merge: 1d86d352411da bf6ab33d8487f Author: Linus Torvalds Date: Mon Jul 15 19:53:07 2024 -0700 Merge tag 'x86_misc_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: - Make error checking of AMD SMN accesses more robust in the callers as they're the only ones who can interpret the results properly - The usual cleanups and fixes, left and right * tag 'x86_misc_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kmsan: Fix hook for unaligned accesses x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos x86/pci/xen: Fix PCIBIOS_* return code handling x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling x86/of: Return consistent error type from x86_of_pci_irq_enable() hwmon: (k10temp) Rename _data variable hwmon: (k10temp) Remove unused HAVE_TDIE() macro hwmon: (k10temp) Reduce k10temp_get_ccd_support() parameters hwmon: (k10temp) Define a helper function to read CCD temperature x86/amd_nb: Enhance SMN access error checking hwmon: (k10temp) Check return value of amd_smn_read() EDAC/amd64: Check return value of amd_smn_read() EDAC/amd64: Remove unused register accesses tools/x86/kcpuid: Add missing dir via Makefile x86, arm: Add missing license tag to syscall tables files commit 1d86d352411dab9bf9312c9eb4b2d4020195be45 Merge: 93196575442e1 469169803d52a Author: Linus Torvalds Date: Mon Jul 15 19:51:23 2024 -0700 Merge tag 'x86_build_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build update from Borislav Petkov: - Make sure insn support detection uses the proper compiler flag in bi-arch builds * tag 'x86_build_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS commit 0c60eb0cc320fffbb8b10329d276af14f6f5e6bf Author: Kyoungrul Kim Date: Wed Jul 10 08:25:20 2024 +0900 scsi: ufs: core: Check LSDBS cap when !mcq If the user sets use_mcq_mode to 0, the host will try to activate the LSDB mode unconditionally even when the LSDBS of device HCI cap is 1. This makes commands time out and causes device probing to fail. To prevent that problem, check the LSDBS cap when MCQ is not supported. Signed-off-by: Kyoungrul Kim Link: https://lore.kernel.org/r/20240709232520epcms2p8ebdb5c4fccc30a6221390566589bf122@epcms2p8 Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 93196575442e13a1bc4190ecd870ceb21866013c Merge: 98896d8795d72 8a2462df15479 Author: Linus Torvalds Date: Mon Jul 15 19:49:55 2024 -0700 Merge tag 'x86_core_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 uaccess update from Borislav Petkov: - Cleanup the 8-byte getuser() asm case * tag 'x86_core_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/uaccess: Improve the 8-byte getuser() case commit 98896d8795d72acf166f83b06c2706effa019d92 Merge: 181a984b7d8d9 16df35946120f Author: Linus Torvalds Date: Mon Jul 15 19:36:01 2024 -0700 Merge tag 'x86_cc_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 confidential computing updates from Borislav Petkov: "Unrelated x86/cc changes queued here to avoid ugly cross-merges and conflicts: - Carve out CPU hotplug function declarations into a separate header with the goal to be able to use the lockdep assertions in a more flexible manner - As a result, refactor cacheinfo code after carving out a function to return the cache ID associated with a given cache level - Cleanups Add support to be able to kexec TDX guests: - Expand ACPI MADT CPU offlining support - Add machinery to prepare CoCo guests memory before kexec-ing into a new kernel - Cleanup, readjust and massage related code" * tag 'x86_cc_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) ACPI: tables: Print MULTIPROC_WAKEUP when MADT is parsed x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method x86/mm: Introduce kernel_ident_mapping_free() x86/smp: Add smp_ops.stop_this_cpu() callback x86/acpi: Do not attempt to bring up secondary CPUs in the kexec case x86/acpi: Rename fields in the acpi_madt_multiproc_wakeup structure x86/mm: Do not zap page table entries mapping unaccepted memory table during kdump x86/mm: Make e820__end_ram_pfn() cover E820_TYPE_ACPI ranges x86/tdx: Convert shared memory back to private on kexec x86/mm: Add callbacks to prepare encrypted memory for kexec x86/tdx: Account shared memory x86/mm: Return correct level from lookup_address() if pte is none x86/mm: Make x86_platform.guest.enc_status_change_*() return an error x86/kexec: Keep CR4.MCE set during kexec for TDX guest x86/relocate_kernel: Use named labels for less confusion cpu/hotplug, x86/acpi: Disable CPU offlining for ACPI MADT wakeup cpu/hotplug: Add support for declaring CPU offlining not supported x86/apic: Mark acpi_mp_wake_* variables as __ro_after_init x86/acpi: Extract ACPI MADT wakeup code into a separate file x86/kexec: Remove spurious unconditional JMP from from identity_mapped() ... commit 181a984b7d8d98e5997bcd8e2ebe6ade1b36978e Merge: 4578d072fa8f8 71315037cb7d4 Author: Linus Torvalds Date: Mon Jul 15 19:34:20 2024 -0700 Merge tag 'x86_cleanups_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Borislav Petkov: - Remove an unused function and the documentation of an already removed cmdline parameter * tag 'x86_cleanups_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Remove unused function __fortify_panic() Documentation: Remove "mfgpt_irq=" from the kernel-parameters.txt file commit 4578d072fa8f840d2492e1bba30871dbe1e9609a Merge: 208c6772d3839 0c40b1c7a897b Author: Linus Torvalds Date: Mon Jul 15 19:31:59 2024 -0700 Merge tag 'x86_boot_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Borislav Petkov: - Add a check to warn when cmdline parsing happens before the final cmdline string has been built and thus arguments can get lost - Code cleanups and simplifications * tag 'x86_boot_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/setup: Warn when option parsing is done too early x86/boot: Clean up the arch/x86/boot/main.c code a bit x86/boot: Use current_stack_pointer to avoid asm() in init_heap() commit 208c6772d3839203fa34a8c77dd1fb7750c4f34a Merge: 1467b49869df4 0d3db1f14abb4 Author: Linus Torvalds Date: Mon Jul 15 19:11:28 2024 -0700 Merge tag 'x86_alternatives_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 alternatives updates from Borislav Petkov: "This is basically PeterZ's idea to nest the alternative macros to avoid the need to "spell out" the number of alternates in an ALTERNATIVE_n() macro and thus have an ever-increasing complexity in those definitions. For ease of bisection, the old macros are converted to the new, nested variants in a step-by-step manner so that in case an issue is encountered during testing, one can pinpoint the place where it fails easier. Because debugging alternatives is a serious pain" * tag 'x86_alternatives_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives, kvm: Fix a couple of CALLs without a frame pointer x86/alternative: Replace the old macros x86/alternative: Convert the asm ALTERNATIVE_3() macro x86/alternative: Convert the asm ALTERNATIVE_2() macro x86/alternative: Convert the asm ALTERNATIVE() macro x86/alternative: Convert ALTERNATIVE_3() x86/alternative: Convert ALTERNATIVE_TERNARY() x86/alternative: Convert alternative_call_2() x86/alternative: Convert alternative_call() x86/alternative: Convert alternative_io() x86/alternative: Convert alternative_input() x86/alternative: Convert alternative_2() x86/alternative: Convert alternative() x86/alternatives: Add nested alternatives macros x86/alternative: Zap alternative_ternary() commit 1467b49869df43c4ee51bdaa0ec1cb69e333407d Merge: 8028e290b6354 5b9d292ea87c8 Author: Linus Torvalds Date: Mon Jul 15 18:22:48 2024 -0700 Merge tag 'ras_core_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Borislav Petkov: - A cleanup and a correction to the error injection driver to inject a MCA_MISC value only when one has actually been supplied by the user * tag 'ras_core_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Remove unused variable and return value in machine_check_poll() x86/mce/inject: Only write MCA_MISC when a value has been supplied commit 8028e290b6354ddb404e88f17fe5d37945cb122f Merge: e23dd95cfd063 03a9b67087ba0 Author: Linus Torvalds Date: Mon Jul 15 18:20:24 2024 -0700 Merge tag 'edac_updates_for_v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - The AMD memory controllers data fabric version 4.5 supports non-power-of-2 denormalization in the sense that certain bits of the system physical address cannot be reconstructed from the normalized address reported by the RAS hardware. Add support for handling such addresses - Switch the EDAC drivers to the new Intel CPU model defines - The usual fixes and cleanups all over the place * tag 'edac_updates_for_v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC: Add missing MODULE_DESCRIPTION() macros EDAC/dmc520: Use devm_platform_ioremap_resource() EDAC/igen6: Add Intel Arrow Lake-U/H SoCs support RAS/AMD/FMPM: Use atl internal.h for INVALID_SPA RAS/AMD/ATL: Implement DF 4.5 NP2 denormalization RAS/AMD/ATL: Validate address map when information is gathered RAS/AMD/ATL: Expand helpers for adding and removing base and hole RAS/AMD/ATL: Read DRAM hole base early RAS/AMD/ATL: Add amd_atl pr_fmt() prefix RAS/AMD/ATL: Add a missing module description EDAC, i10nm: make skx_common.o a separate module EDAC/skx: Switch to new Intel CPU model defines EDAC/sb_edac: Switch to new Intel CPU model defines EDAC, pnd2: Switch to new Intel CPU model defines EDAC/i10nm: Switch to new Intel CPU model defines EDAC/ghes: Add missing newline to pr_info() statement RAS/AMD/ATL: Add missing newline to pr_info() statement EDAC/thunderx: Remove unused struct error_syndrome commit e23dd95cfd063632fb212390740940f2761e322d Merge: 584aeccc0b717 3048dc8ba46b7 Author: Linus Torvalds Date: Mon Jul 15 18:03:43 2024 -0700 Merge tag 'spi-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "There's some quite exciting core work in this release, we've got the beginnings of support for hardware initiated transfers which is itself independently useful for optimising fast paths in existing drivers. We also have a rework of the DMA mapping which allows finer grained decisions about DMA mapping messages and also helps remove some bodges that we'd had. Otherwise it's a fairly quiet release, a few new drivers and features for existing drivers, together with various cleanups and DT binding conversions. One regmap SPI fix made it's way in here too which I should probably have sent as a regmap fix instead. Summary: - Support for pre-optimising messages, reducing the overhead for messages that are repeatedly used (eg, reading the interrupt status from a device). This will also be used for hardware initiated transfers in future. - A reworking of how DMA mapping is done, introducing a new helper and allowing the DMA mapping decision to be done per transfer instead of per message. - Support for Atmel SAMA7D64, Freescale LX2160A DSPI and WCH CH341A" * tag 'spi-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (72 commits) spi: dt-bindings: at91: Add sama7d65 compatible string spi: add ch341a usb2spi driver spi: dt-bindings: fsl-dspi: add compatible string 'fsl,lx2160a-dspi' spi: dt-bindings: fsl-dspi: add dmas and dma-names properties spi: spi: Remove unnecessary ‘0’ values from status spi: spi: Remove unnecessary ‘0’ values from rc spi: xcomm: fix coding style spi: xcomm: remove i2c_set_clientdata() spi: xcomm: make use of devm_spi_alloc_host() spi: xcomm: add gpiochip support spi: dt-bindings: snps,dw-apb-ssi.yaml: update compatible property spi: dt-bindings: fsl-dspi: Convert to yaml format spi: fsl-dspi: use common proptery 'spi-cs-setup(hold)-delay-ns' spi: axi-spi-engine: remove platform_set_drvdata() spi: spi-fsl-lpspi: Pass pm_ptr() spi: spi-imx: Pass pm_ptr() spi: spi-fsl-lpspi: Switch to SYSTEM_SLEEP_PM_OPS() spi: spi-imx: Switch to RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() spi: add EXPORT_SYMBOL_GPL(devm_spi_optimize_message) spi: add devm_spi_optimize_message() helper ... commit 584aeccc0b717f447505cc738d8c2f292d9d1a66 Merge: 25617a5c4503b ef0b29e744965 Author: Linus Torvalds Date: Mon Jul 15 17:59:12 2024 -0700 Merge tag 'regulator-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This s a very quiet release for the regulator API, we have a few new devices (most of which are just ID updates) and one new fairly specialist core feature for use in interrupt context. - An API allowing lockless enable/disable for regulators acquired in exclusive mode, for use in interrupt contexts - A rewrite of the MedaTek DVFSRC regulator driver which apparently never worked - Support for Mediaktek MT6312, Qualcomm QCA6390 and WCN7850, Renesas RZ/G2L USB VBUS regulator and ST Microelectronics STM32MP13" * tag 'regulator-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (26 commits) regulator: dt-bindings: pca9450: Make interrupt optional regulator: pca9450: Make IRQ optional dt-bindings: regulator: sprd,sc2731-regulator: convert to YAML regulator: max77857: Constify struct regmap_config regulator: da9121: Constify struct regmap_config dt-bindings: regulator: ti,tps65132: document VIN supply dt-bindings: mfd: twl: Fix example regulator: Add Renesas RZ/G2L USB VBUS regulator driver regulator: core: Add helper for allow HW access to enable/disable regulator regulator: Add bindings for MediaTek DVFSRC Regulators regulator: Add refactored mtk-dvfsrc-regulator driver regulator: Remove mtk-dvfsrc-regulator.c regulator: userspace-consumer: quiet device deferral regulator: dt-bindings: mt6315: Document MT6319 PMIC regulator: add missing MODULE_DESCRIPTION() macro dt-bindings: regulator: twl-regulator: convert to yaml regulator: dt-bindings: describe the PMU module of the WCN7850 package regulator: dt-bindings: describe the PMU module of the QCA6390 package regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property regulator: rtq2208: Add fixed LDO VOUT property and check that matches the constraints ... commit 25617a5c4503b20d2edcc75804169960e7c0d88e Merge: b3c0eccb48540 c2bb8198fee88 Author: Linus Torvalds Date: Mon Jul 15 17:56:11 2024 -0700 Merge tag 'regmap-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "There's one new feature here, a regmap_multi_reg_read() matching the existing write function which has some IIO users coming. This allows atomic reads from multiple registers without the need to wrap a higher level lock in the client driver just for regmap (which already has locks anyway). We also have one fix for the KUnit tests, and a bunch of cleanups" * tag 'regmap-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: kunit: Add test cases for regmap_multi_reg_(read,write}() regmap: Implement regmap_multi_reg_read() regmap-irq: handle const struct regmap_irq_sub_irq_map const_structs.checkpatch: add regmap structs regmap: add missing MODULE_DESCRIPTION() macros regmap-i2c: add missing MODULE_DESCRIPTION() macro regmap: kunit: Use array_size() and sizeof(*ptr) consistently regmap: maple: Switch to use kmemdup_array() regmap: cache: Switch to use kmemdup_array() regmap: cache: Use correct type of the rb_for_each() parameter regmap: Switch to use kmemdup_array() regmap: kunit: add missing MODULE_DESCRIPTION() regmap: kunit: Fix memory leaks in gen_regmap() and gen_raw_regmap() commit b3c0eccb485404d3ea5eaae483b1a2e9e2134d21 Merge: 3f32ab146c557 dfda97e37de4c Author: Linus Torvalds Date: Mon Jul 15 17:53:24 2024 -0700 Merge tag 'gpio-updates-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "The majority of added lines are two new modules: the GPIO virtual consumer module that improves our ability to add automated tests for the kernel API and the "sloppy" logic analyzer module that uses the GPIO API to implement a coarse-grained debugging tool for useful for remote development. Other than that we have the usual assortment of various driver extensions, improvements to the core GPIO code, DT-bindings and other documentation updates as well as an extension to the interrupt simulator: GPIOLIB core: - rework kfifo handling rework in the character device code - improve the labeling of GPIOs requested as interrupts and show more info on interrupt-only GPIOs in debugfs - remove unused APIs - unexport interfaces that are only used from the core GPIO code - drop the return value from gpiochip_set_desc_names() as it cannot fail - move a string array definition out of a header and into a specific compilation unit - convert the last user of gpiochip_get_desc() other than GPIO core to using a safer alternative - use array_index_nospec() where applicable New drivers: - add a "virtual GPIO consumer" module that allows requesting GPIOs from actual hardware and driving tests of the in-kernel GPIO API from user-space over debugfs - add a GPIO-based "sloppy" logic analyzer module useful for "first glance" debugging on remote boards Driver improvements: - add support for a new model to gpio-pca953x - lock GPIOs as interrupts in gpio-sim when the lines are requested as irqs via the simulator domain + some other minor improvements - improve error reporting in gpio-syscon - convert gpio-ath79 to using dynamic GPIO base and range - use pcibios_err_to_errno() for converting PCIBIOS error codes to errno vaues in gpio-amd8111 and gpio-rdc321x - allow building gpio-brcmstb for the BCM2835 architecture DT bindings: - convert DT bindings for lsi,zevio, mpc8xxx, and atmel to DT schema - document new properties for aspeed,gpio, fsl,qoriq-gpio and gpio-vf610 - document new compatibles for pca953x and fsl,qoriq-gpio Documentation: - document stricter behavior of the GPIO character device uAPI with regards to reconfiguring requested line without direction set - clarify the effect of the active-low flag on line values and edges - remove documentation for the legacy GPIO API in order to stop tempting people to use it - document the preference for using pread() for reading edge events in the sysfs API Other: - add an extended initializer to the interrupt simulator allowing to specify a number of callbacks callers can use to be notified about irqs being requested and released" * tag 'gpio-updates-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (41 commits) gpio: mc33880: Convert comma to semicolon gpio: virtuser: actually use the "trimmed" local variable dt-bindings: gpio: convert Atmel GPIO to json-schema gpio: virtuser: new virtual testing driver for the GPIO API dt-bindings: gpio: vf610: Allow gpio-line-names to be set gpio: sim: lock GPIOs as interrupts when they are requested genirq/irq_sim: add an extended irq_sim initializer dt-bindings: gpio: fsl,qoriq-gpio: Add compatible string fsl,ls1046a-gpio gpiolib: unexport gpiochip_get_desc() gpio: add sloppy logic analyzer using polling Documentation: gpio: Reconfiguration with unset direction (uAPI v2) Documentation: gpio: Reconfiguration with unset direction (uAPI v1) dt-bindings: gpio: fsl,qoriq-gpio: add common property gpio-line-names gpio: ath79: convert to dynamic GPIO base allocation pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc() gpiolib: put gpio_suffixes in a single compilation unit Documentation: gpio: Clarify effect of active low flag on line edges Documentation: gpio: Clarify effect of active low flag on line values gpiolib: Remove data-less gpiochip_add() function gpio: sim: use devm_mutex_init() ... commit 3f32ab146c557f0fd9060b03003d0d4b2815968a Merge: d46ede31887ff b85e021853976 Author: Linus Torvalds Date: Mon Jul 15 17:48:12 2024 -0700 Merge tag 'mmc-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC host: - Convert from using tasklet to the BH workqueue - dw_mmc-bluefield: Add support for eMMC HW reset - mmc_spi: Allow spi controllers incapable of lower than 400kHz - sdhci: Rework code to eliminate SDHCI_QUIRK_UNSTABLE_RO_DETECT - sdhci-brcmstb: Add support for the BCM2712 variant - sdhci-esdhc-imx: Disable card-detect as system wakeup on S32G platforms - sdhci-msm: Add support for the SDX75 variant - sdhci-of-dwcmshc: Enable CQE support for some Rockchip variants - sdhci-of-esdhc: Convert DT-bindings to yaml - sdhci-sprd: Convert DT-bindings to yaml MEMSTICK: - rtsx_pci_ms: Remove the unused Realtek PCI memstick driver" * tag 'mmc-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (26 commits) MAINTAINERS: add 's32@nxp.com' as relevant mailing list for 'sdhci-esdhc-imx' driver mmc: sdhci-esdhc-imx: obtain the 'per' clock rate after its enablement mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms dt-bindings: mmc: sdhci-sprd: convert to YAML mmc: davinci_mmc: report all possible bus widths mmc: dw_mmc-bluefield: Add support for eMMC HW reset mmc: dw_mmc: Add support for platform specific eMMC HW reset mmc: sdhci_am654: Constify struct regmap_config mmc: Convert from tasklet to BH workqueue mmc: sdhi: Convert from tasklet to BH workqueue mmc: mmc_spi: allow for spi controllers incapable of getting as low as 400k memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver MAINTAINERS: drop entry for VIA SD/MMC controller mmc: tmio: Remove obsolete .set_pwr() callback() mfd: tmio: Remove obsolete .set_clk_div() callback mmc: sdhci-brcmstb: Add ARCH_BCM2835 option mmc: sdhci: Eliminate SDHCI_QUIRK_UNSTABLE_RO_DETECT dt-bindings: mmc: Convert fsl-esdhc.txt to yaml dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix mmc: add missing MODULE_DESCRIPTION() macros ... commit d46ede31887ff511a75c2544a2b2739703c3c1cd Merge: c6e63a9882c90 67ce905f5f725 Author: Linus Torvalds Date: Mon Jul 15 17:44:59 2024 -0700 Merge tag 'pmdomain-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain updates from Ulf Hansson: "pmdomain core: - Add support for HW-managed devices pmdomain providers: - amlogic: Add support for the A5 and the A4 power domains - arm: Enable system wakeups for the SCMI PM domain - qcom/clk: Add HW-mode callbacks to allow switching of GDSC mode pmdomain consumers: - qcom/media/venus: Enable support for switching GDSC HW-mode on V6" * tag 'pmdomain-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain: amlogic: Constify struct meson_secure_pwrc_domain_desc venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode on V6 clk: qcom: videocc: Use HW_CTRL_TRIGGER for SM8250, SC7280 vcodec GDSC's clk: qcom: gdsc: Add set and get hwmode callbacks to switch GDSC mode PM: domains: Add the domain HW-managed mode to the summary PM: domains: Allow devices attached to genpd to be managed by HW pmdomain: amlogic: Add support for A5 power domains controller dt-bindings: power: add Amlogic A5 power domains pmdomain: amlogic: add missing MODULE_DESCRIPTION() macros pmdomain: arm: scmi_pm_domain: set flag GENPD_FLAG_ACTIVE_WAKEUP pmdomain: renesas: rmobile-sysc: Use for_each_child_of_node_scoped() pmdomain: core: Use genpd_is_irq_safe() helper pmdomain: amlogic: Add support for A4 power domains controller dt-bindings: power: add Amlogic A4 power domains commit c6e63a9882c90f753b11c82db4308a9aba94e38d Merge: 500a711df663a 240b129d597cb Author: Linus Torvalds Date: Mon Jul 15 17:42:28 2024 -0700 Merge tag 'pwm/for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm updates from Uwe Kleine-König: "This contains the usual mix of fixes, cleanups, two new drivers and several dt binding updates. The fixes are for minor issues that are already old (4.11-rc1 and 3.9-rc1) and were found by code review and not during usage, so I didn't sent them for earlier inclusion. The changes to include/linux/mfd/stm32-timers.h and drivers/counter/stm32-timer-cnt.c are part of an immutable branch that will also be included in the mfd and counter pulls. It changes some register definitions and affects the pwm-stm32 driver. Thanks go to Andy Shevchenko, AngeloGioacchino Del Regno, Conor Dooley, David Lechner, Dhruva Gole, Drew Fustini, Frank Li, Jeff Johnson, Junyi Zhao, Kelvin Zhang, Krzysztof Kozlowski, Lee Jones, Linus Walleij, Linus Walleij, Michael Hennerich, Nicola Di Lieto, Nicolas Ferre, Nuno Sa, Paul Cercueil, Raag Jadav, Rob Herring, Sean Anderson, Sean Young, Shenwei Wang, Stefan Wahren, Trevor Gamblin, Tzung-Bi Shih, Vincent Whitchurch and William Breathitt Gray for their contributions to this pull request; they authored changes, spend time reviewing changes and coordinated the above mentioned immutable branch" * tag 'pwm/for-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: (38 commits) pwm: axi-pwmgen: add .max_register to regmap dt-bindings: pwm: at91: Add sama7d65 compatible string pwm: atmel-tcb: Make private data variable naming consistent pwm: atmel-tcb: Simplify checking the companion output pwm: Allow pwm state transitions from an invalid state pwm: xilinx: Simplify using devm_ functions pwm: Use guards for pwm_lookup_lock instead of explicity mutex_lock + mutex_unlock pwm: Use guards for export->lock instead of explicity mutex_lock + mutex_unlock pwm: Use guards for pwm_lock instead of explicity mutex_lock + mutex_unlock pwm: Register debugfs operations after the pwm class pwm: imx-tpm: Enable pinctrl setting for sleep state pwm: lpss: drop redundant runtime PM handles pwm: lpss: use devm_pm_runtime_enable() helper pwm-stm32: Make use of parametrised register definitions dt-bindings: pwm: imx: remove interrupt property from required pwm: meson: Add support for Amlogic S4 PWM pwm: Add GPIO PWM driver dt-bindings: pwm: Add pwm-gpio pwm: Drop pwm_apply_state() bus: ts-nbus: Use pwm_apply_might_sleep() ... commit 500a711df663adccb30fd3508960ff90c73f1cd4 Merge: e763c9ec71dd4 1ea3fd1eb9869 Author: Linus Torvalds Date: Mon Jul 15 17:39:13 2024 -0700 Merge tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "Obsolete driver removals: - Removed obsolete adm1021 and max6642 drivers New drivers: - MPS MP2891, MP2993, MP9941, and MP5920 - SPD5118 (Temperature Sensor and EEPROM) Added device support to existing drivers: - g762: G761 - dell-smm: Dell OptiPlex 7060 - asus-ec-sensors: ProArt X670E-CREATOR WIFI - corsair-psu: HX1200i Series 2023 psu - nzxt-smart2: Additional USB IS for NZXT RGB & Fan Controller Notable enhancements and fixes: - Removed use of i2c_match_id() - Constified struct regmap_config where feasible - Cleaned up amc6821 driver, and converted to use regmap and with_info API - Converted max6639 driver to use with_info API; added support for additional sysfs attributes - Fixed various sysfs attribute underflows - Added PEC support to hwmon core, and use in lm90 and max31827 drivers And various other minor fixes and improvements" * tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (103 commits) hwmon: (max6697) Fix swapped temp{1,8} critical alarms hwmon: (max6697) Fix underflow when writing limit attributes hwmon: Remove obsolete adm1021 and max6642 drivers hwmon: (pmbus/ltc4286) Drop unused i2c device ids hwmon: (g762) Initialize fans after configuring clock hwmon: (amc6821) Add support for pwm1_mode attribute hwmon: (amc6821) Convert to with_info API hwmon: (amc6821) Convert to use regmap hwmon: (amc6821) Drop unnecessary enum chips hwmon: (amc6821) Use BIT() and GENMASK() hwmon: (amc6821) Use tabs for column alignment in defines hwmon: (amc6821) Reorder include files, drop unnecessary ones hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4 hwmon: (amc6821) Rename fan1_div to fan1_pulses hwmon: (amc6821) Make reading and writing fan speed limits consistent hwmon: (amc6821) Stop accepting invalid pwm values hwmon: (w83627ehf) Fix underflows seen when writing limit attributes hwmon: (nct6775-core) Fix underflows seen when writing limit attributes hwmon: (lm95234) Fix underflows seen when writing limit attributes hwmon: (adc128d818) Fix underflows seen when writing limit attributes ... commit e763c9ec71dd462337d0b671ec5014b737c5342e Merge: cdf471c348c12 50b040ef37329 Author: Linus Torvalds Date: Mon Jul 15 17:34:31 2024 -0700 Merge tag 'pwrseq-updates-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull power sequencing updates from Bartosz Golaszewski: "This has been in development since last year's Linux Plumbers Conference and was inspired by the need to enable support upstream for Bluetooth/WLAN chips on Qualcomm platforms. The main problem we're fixing is powering up devices which are represented as separate objects in the kernel (binding to different drivers) but which share parts of the power-up sequence and thus need some kind of a mediator who knows the possible interactions and can assure they don't interfere with neither device's bring up. An example of such an inter-driver interaction is the WCN family of BT/WLAN chips from Qualcomm of which some models require the user to observe a certain delay between driving the bt-enable and wlan-enable GPIOs. This is not a new problem but up to this point all attempts at addressing it ended up hitting one wall or another and being dropped. The main obstacle was the fact that most these attempts tried to introduce the concept of a "power sequence" into the device-tree bindings which breaks the main DT rule: describe the hardware, not its behavior. The solution I proposed focuses on making the power sequencer drivers interpret the actual HW description flexibly. More details on that are in the linked cover letter. The second problem fixed here is powering up PCI devices before they are detected on the bus. This is achieved by creating special platform devices for device-tree nodes describing hard-wired PCI devices which bind to the so-called PCI power control drivers which enable required resources and trigger a bus rescan once the controlled device is up then setup the correct devlink hierarchy for power-management. By combining the two new frameworks we implemented the power sequencing PCI power control driver which is capable of powering up the WLAN modules of the QCom WCN family of chipsets. All this has spent a significant amount of time in linux-next and enabled WLAN/BT support on several Qualcomm platforms. To further prove that this is useful and needed: right after this was picked up into next, I was sent a series using the subsystem for a similar use-case on Amlogic platforms. This contains the core power sequencing framework, the first driver, PCI changes using the pwrseq library (blessed by Bjorn Helgaas) and some fixes that came later" * tag 'pwrseq-updates-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled power: sequencing: simplify returning pointer without cleanup PCI/pwrctl: Add a PCI power control driver for power sequenced devices PCI/pwrctl: Add PCI power control core code PCI/pwrctl: Create platform devices for child OF nodes of the port node PCI/pwrctl: Reuse the OF node for power controlled devices PCI: Hold the rescan mutex when scanning for the first time power: pwrseq: add a driver for the PMU module on the QCom WCN chipsets power: sequencing: implement the pwrseq core commit cdf471c348c1200ca243775b4b8d6eaa6d7f3979 Merge: 89c491389331f fc2c1d716d4a8 Author: Linus Torvalds Date: Mon Jul 15 17:28:40 2024 -0700 Merge tag 'tag-chrome-platform-firmware-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform firmware update from Tzung-Bi Shih: - Minor cleanup: add missing MODULE_DESCRIPTION * tag 'tag-chrome-platform-firmware-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: firmware: google: add missing MODULE_DESCRIPTION() macros commit 89c491389331faea09a247da47ebd95982dae06e Merge: d8764c1931a4c 4baf1cc54433f Author: Linus Torvalds Date: Mon Jul 15 17:25:38 2024 -0700 Merge tag 'tag-chrome-platform-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: "New code: - Add "cros_ec_hwmon" driver to expose fan speed and temperature - Add "cros_charge-control" driver to control charge thresholds and behaviour - Add module parameter "log_poll_period_ms" in cros_ec_debugfs for tuning the poll period - Support version 3 of EC_CMD_GET_NEXT_EVENT and keyboard matrix Fixes: - Fix a race condition in accessing MEC (Microchip EC) memory between ACPI and kernel. Serialize the memory access by an AML (ACPI Machine Language) mutex - Fix an issue of wrong EC message version in cros_ec_debugfs Misc: - Fix kernel-doc errors and cleanups" * tag 'tag-chrome-platform-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (28 commits) power: supply: cros_charge-control: Fix signedness bug in charge_behaviour_store() power: supply: cros_charge-control: Avoid accessing attributes out of bounds power: supply: cros_charge-control: don't load if Framework control is present power: supply: add ChromeOS EC based charge control driver platform/chrome: cros_ec_proto: Introduce cros_ec_get_cmd_versions() platform/chrome: Update binary interface for EC-based charge control ACPI: battery: add devm_battery_hook_register() dt-bindings: input: cros-ec-keyboard: Add keyboard matrix v3.0 platform/chrome: cros_ec_lpc: Handle zero length read/write platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes() platform/chrome: cros_ec_debugfs: fix wrong EC message version platform/chrome: cros_ec_proto: update Kunit test for get_next_data_v3 platform/chrome: cros_ec_proto: add missing MODULE_DESCRIPTION() macro hwmon: (cros_ec) Fix access to restricted __le16 hwmon: (cros_ec) Prevent read overflow in probe() platform/chrome: cros_ec_lpc: Add quirks for Framework Laptop platform/chrome: cros_ec_lpc: Add a new quirk for AML mutex platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id platform/chrome: cros_ec_lpc: MEC access can use an AML mutex platform/chrome: cros_ec_lpc: MEC access can return error code ... commit d8764c1931a4c91b9b53ee183757f70999da2bb3 Merge: c89d780cc195a aa8684755a283 Author: Linus Torvalds Date: Mon Jul 15 17:23:32 2024 -0700 Merge tag 'wq-for-6.11-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "cpus_read_lock() was dropped from workqueue creation path but there were still remaining lockdep_assert_cpus_held() triggering spurious lockdep failures. Remove them" * tag 'wq-for-6.11-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Remove unneeded lockdep_assert_cpus_held() commit c89d780cc195a63dcd9c3d2fc239308b3920a9a1 Merge: bbb3556c014dc 4f3a6c4de7d93 Author: Linus Torvalds Date: Mon Jul 15 17:06:19 2024 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: "The biggest part is the virtual CPU hotplug that touches ACPI, irqchip. We also have some GICv3 optimisation for pseudo-NMIs that has been queued via the arm64 tree. Otherwise the usual perf updates, kselftest, various small cleanups. Core: - Virtual CPU hotplug support for arm64 ACPI systems - cpufeature infrastructure cleanups and making the FEAT_ECBHB ID bits visible to guests - CPU errata: expand the speculative SSBS workaround to more CPUs - GICv3, use compile-time PMR values: optimise the way regular IRQs are masked/unmasked when GICv3 pseudo-NMIs are used, removing the need for a static key in fast paths by using a priority value chosen dynamically at boot time ACPI: - 'acpi=nospcr' option to disable SPCR as default console for arm64 - Move some ACPI code (cpuidle, FFH) to drivers/acpi/arm64/ Perf updates: - Rework of the IMX PMU driver to enable support for I.MX95 - Enable support for tertiary match groups in the CMN PMU driver - Initial refactoring of the CPU PMU code to prepare for the fixed instruction counter introduced by Arm v9.4 - Add missing PMU driver MODULE_DESCRIPTION() strings - Hook up DT compatibles for recent CPU PMUs Kselftest updates: - Kernel mode NEON fp-stress - Cleanups, spelling mistakes Miscellaneous: - arm64 Documentation update with a minor clarification on TBI - Fix missing IPI statistics - Implement raw_smp_processor_id() using thread_info rather than a per-CPU variable (better code generation) - Make MTE checking of in-kernel asynchronous tag faults conditional on KASAN being enabled - Minor cleanups, typos" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (69 commits) selftests: arm64: tags: remove the result script selftests: arm64: tags_test: conform test to TAP output perf: add missing MODULE_DESCRIPTION() macros arm64: smp: Fix missing IPI statistics irqchip/gic-v3: Fix 'broken_rdists' unused warning when !SMP and !ACPI ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64 Documentation: arm64: Update memory.rst for TBI arm64/cpufeature: Replace custom macros with fields from ID_AA64PFR0_EL1 KVM: arm64: Replace custom macros with fields from ID_AA64PFR0_EL1 perf: arm_pmuv3: Include asm/arm_pmuv3.h from linux/perf/arm_pmuv3.h perf: arm_v6/7_pmu: Drop non-DT probe support perf/arm: Move 32-bit PMU drivers to drivers/perf/ perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check perf: arm_pmuv3: Avoid assigning fixed cycle counter with threshold arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU perf: imx_perf: add support for i.MX95 platform perf: imx_perf: fix counter start and config sequence perf: imx_perf: refactor driver for imx93 perf: imx_perf: let the driver manage the counter usage rather the user perf: imx_perf: add macro definitions for parsing config attr ... commit aa8684755a283536bd8ad93141052f47a4faa5a3 Author: Lai Jiangshan Date: Tue Jul 16 01:29:31 2024 +0800 workqueue: Remove unneeded lockdep_assert_cpus_held() The commit 19af45757383 ("workqueue: Remove cpus_read_lock() from apply_wqattrs_lock()") removes the unneed cpus_read_lock() after the pwq creations and installations have been reworked based on wq_online_cpumask rather than cpu_online_mask making cpus_read_lock() is unneeded during wqattrs changes. But it desn't remove the lockdep_assert_cpus_held() checks during wqattrs changes, which leads to complaints from lockdep reported by kernel test robot: [ 15.726567][ T131] ------------[ cut here ]------------ [ 15.728117][ T131] WARNING: CPU: 1 PID: 131 at kernel/cpu.c:525 lockdep_assert_cpus_held (kernel/cpu.c:525) [ 15.731191][ T131] Modules linked in: floppy(+) parport_pc(+) parport qemu_fw_cfg rtc_cmos [ 15.733423][ T131] CPU: 1 PID: 131 Comm: systemd-udevd Tainted: G T 6.10.0-rc2-00254-g19af45757383 #1 df6f039f42e8818bf9a534449362ebad1aad32e2 [ 15.737011][ T131] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 15.739760][ T131] EIP: lockdep_assert_cpus_held (kernel/cpu.c:525) [ 15.741326][ T131] Code: 97 c2 03 72 20 83 3d f4 73 97 c2 00 74 17 55 89 e5 b8 fc bd 4d c2 ba ff ff ff ff e8 e4 57 d1 00 85 c0 74 06 5d 31 c0 31 d2 c3 <0f> 0b eb f6 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 89 e5 b8 Fix it by removing the unneeded lockdep_assert_cpus_held(). Also remove the unneed cpus_read_lock() from wq_affn_dfl_set(). tj: Dropped the removal of cpus_read_lock/unlock() in wq_affn_dfl_set() to keep this patch fix only. Cc: kernel test robot Fixes: 19af45757383("workqueue: Remove cpus_read_lock() from apply_wqattrs_lock()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202407141846.665c0446-lkp@intel.com Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit bbb3556c014dc8ed1645b725ad84477603553743 Merge: 4cb9dc10a6c32 84edd7adcc9de Author: Linus Torvalds Date: Mon Jul 15 16:59:58 2024 -0700 Merge tag 'keys-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull keys updates from Jarkko Sakkinen: "Contains cosmetic fixes only" * tag 'keys-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: KEYS: encrypted: add missing MODULE_DESCRIPTION() KEYS: trusted: add missing MODULE_DESCRIPTION() commit 4cb9dc10a6c32f2e485f2be47f3d32a45a3fe499 Merge: b02c520fee632 0543f29408a15 Author: Linus Torvalds Date: Mon Jul 15 16:57:27 2024 -0700 Merge tag 'tpmdd-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "A couple of bug fixes. No new features are coming for this release. I had one in progress but decided to let it mature up until 6.12" * tag 'tpmdd-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm_tis_spi: add missing attpm20p SPI device ID entry char: tpm: Fix possible memory leak in tpm_bios_measurements_open() commit b02c520fee6327eb4b25696c5e2d6732f362213c Merge: 895b9b1207f26 58629d4871e8e Author: Linus Torvalds Date: Mon Jul 15 16:51:22 2024 -0700 Merge tag 'wq-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: - Lai fixed a bug where CPU hotplug and workqueue attribute changes race leaving some workqueues not fully updated. This involved refactoring and changing how online CPUs are tracked. The resulting code is cleaner. - Workqueue watchdog touch operation was causing too much cacheline contention on very large machines. Nicholas improved scalabililty by avoiding unnecessary global updates. - Code cleanups and minor rescuer behavior improvement. - The last commit 58629d4871e8 ("workqueue: Always queue work items to the newest PWQ for order workqueues") is a cherry-picked straggler commit from for-6.10-fixes, a fix for a bug which may not actually trigger. * tag 'wq-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (24 commits) workqueue: Always queue work items to the newest PWQ for order workqueues workqueue: Rename wq_update_pod() to unbound_wq_update_pwq() workqueue: Remove the arguments @hotplug_cpu and @online from wq_update_pod() workqueue: Remove the argument @cpu_going_down from wq_calc_pod_cpumask() workqueue: Remove the unneeded cpumask empty check in wq_calc_pod_cpumask() workqueue: Remove cpus_read_lock() from apply_wqattrs_lock() workqueue: Simplify wq_calc_pod_cpumask() with wq_online_cpumask workqueue: Add wq_online_cpumask workqueue: Init rescuer's affinities as the wq's effective cpumask workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S. workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs() workqueue: Make rescuer initialization as the last step of the creation of a new wq workqueue: Register sysfs after the whole creation of the new wq workqueue: Simplify goto statement workqueue: Update cpumasks after only applying it successfully workqueue: Improve scalability of workqueue watchdog touch workqueue: wq_watchdog_touch is always called with valid CPU workqueue: Remove useless pool->dying_workers workqueue: Detach workers directly in idle_cull_fn() workqueue: Don't bind the rescuer in the last working cpu ... commit 895b9b1207f26f020f18b5b54e072d119defffc4 Merge: f97b956b631a0 9283ff5be1510 Author: Linus Torvalds Date: Mon Jul 15 16:41:32 2024 -0700 Merge tag 'cgroup-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - Added Michal Koutný as a maintainer - Counters in pids.events were behaving inconsistently. pids.events made properly hierarchical and pids.events.local added - misc.peak and misc.events.local added - cpuset remote partition creation and cpuset.cpus.exclusive handling improved - Code cleanups, non-critical fixes, doc updates - for-6.10-fixes is merged in to receive two non-critical fixes that didn't trigger pull * tag 'cgroup-for-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (23 commits) cgroup: Add Michal Koutný as a maintainer cgroup/misc: Introduce misc.events.local cgroup/rstat: add force idle show helper cgroup: Protect css->cgroup write under css_set_lock cgroup/misc: Introduce misc.peak cgroup_misc: add kernel-doc comments for enum misc_res_type cgroup/cpuset: Prevent UAF in proc_cpuset_show() selftest/cgroup: Update test_cpuset_prs.sh to match changes cgroup/cpuset: Make cpuset.cpus.exclusive independent of cpuset.cpus cgroup/cpuset: Delay setting of CS_CPU_EXCLUSIVE until valid partition selftest/cgroup: Fix test_cpuset_prs.sh problems reported by test robot cgroup/cpuset: Fix remote root partition creation problem cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit() cgroup/cpuset: Optimize isolated partition only generate_sched_domains() calls cgroup/cpuset: Reduce the lock protecting CS_SCHED_LOAD_BALANCE kernel/cgroup: cleanup cgroup_base_files when fail to add cgroup_psi_files selftests: cgroup: Add basic tests for pids controller selftests: cgroup: Lexicographic order in Makefile cgroup/pids: Add pids.events.local cgroup/pids: Make event counters hierarchical ... commit f97b956b631a0340f5bf8abcca891a8e5a874f69 Merge: e4b2b0b1e41e3 6ca8f2e20bd1c Author: Linus Torvalds Date: Mon Jul 15 16:38:28 2024 -0700 Merge tag 'nolibc.2024.07.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull nolibc updates from Paul McKenney: - Fix selftest printf format mismatch in expect_str_buf_eq() - Stop using brk() and sbrk() when testing against musl, which implements these two functions with ENOMEM - Make tests use -Werror to force failure on compiler warnings - Add limits for the {u,}intmax_t, ulong and {u,}llong types - Implement strtol() and friends - Add facility to skip nolibc-specific tests when running against non-nolibc libraries - Implement strerror() - Also use strerror() on nolibc when running kselftests * tag 'nolibc.2024.07.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: selftests: kselftest: also use strerror() on nolibc tools/nolibc: implement strerror() selftests/nolibc: introduce condition to run tests only on nolibc tools/nolibc: implement strtol() and friends tools/nolibc: add limits for {u,}intmax_t, ulong and {u,}llong selftests/nolibc: run-tests.sh: use -Werror by default selftests/nolibc: disable brk()/sbrk() tests on musl selftests/nolibc: fix printf format mismatch in expect_str_buf_eq() commit e4b2b0b1e41e3b5c542a18639cd4f11c9efbb465 Merge: b176e21d812a0 ddd7432d621da Author: Linus Torvalds Date: Mon Jul 15 15:44:40 2024 -0700 Merge tag 'kcsan.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull KCSAN updates from Paul McKenney: - improve the documentation for the new __data_racy type qualifier to the data_race() macro's kernel-doc header and to the LKMM's access-marking documentation - add missing MODULE_DESCRIPTION * tag 'kcsan.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: kcsan: Add missing MODULE_DESCRIPTION() macro kcsan: Add example to data_race() kerneldoc header commit b176e21d812a0674196996e2f53d481208c5d832 Merge: 9855e873285f1 d4641fa67d3dc Author: Linus Torvalds Date: Mon Jul 15 15:39:25 2024 -0700 Merge tag 'torture.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull torture-test updates from Paul McKenney: "This adds MODULE_DESCRIPTION() to torture.c, locktorture.c, and scftorture.c, and also adds 'static' to a global variable that is used only in scftorture.c" * tag 'torture.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: scftorture: Make torture_type static scftorture: Add MODULE_DESCRIPTION() locktorture: Add MODULE_DESCRIPTION() torture: Add MODULE_DESCRIPTION() commit 9855e873285f1395b9a04613c56101f04a5ec9fb Merge: 253e1e98180a1 02219caa92b5b Author: Linus Torvalds Date: Mon Jul 15 15:25:27 2024 -0700 Merge tag 'rcu.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU updates from Paul McKenney: - Update Tasks RCU and Tasks Rude RCU description in Requirements.rst and clarify rcu_assign_pointer() and rcu_dereference() ordering properties - Add lockdep assertions for RCU readers, limit inline wakeups for callback-bypass synchronize_rcu(), add an rcutree.nohz_full_patience_delay to reduce nohz_full OS jitter, add Uladzislau Rezki as RCU maintainer, and fix a subtle callback-migration memory-ordering issue - Remove a number of redundant memory barriers - Remove unnecessary bypass-list lock-contention mitigation, use parking API instead of open-coded ad-hoc equivalent, and upgrade obsolete comments - Revert avoidance of a deadlock that can no longer occur and properly synchronize Tasks Trace RCU checking of runqueues - Add tests for handling of double-call_rcu() bug, add missing MODULE_DESCRIPTION, and add a script that histograms the number of calls to RCU updaters - Fill out SRCU polled-grace-period API * tag 'rcu.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (29 commits) rcu: Fix rcu_barrier() VS post CPUHP_TEARDOWN_CPU invocation rcu: Eliminate lockless accesses to rcu_sync->gp_count MAINTAINERS: Add Uladzislau Rezki as RCU maintainer rcu: Add rcutree.nohz_full_patience_delay to reduce nohz_full OS jitter rcu/exp: Remove redundant full memory barrier at the end of GP rcu: Remove full memory barrier on RCU stall printout rcu: Remove full memory barrier on boot time eqs sanity check rcu/exp: Remove superfluous full memory barrier upon first EQS snapshot rcu: Remove superfluous full memory barrier upon first EQS snapshot rcu: Remove full ordering on second EQS snapshot srcu: Fill out polled grace-period APIs srcu: Update cleanup_srcu_struct() comment srcu: Add NUM_ACTIVE_SRCU_POLL_OLDSTATE srcu: Disable interrupts directly in srcu_gp_end() rcu: Disable interrupts directly in rcu_gp_init() rcu/tree: Reduce wake up for synchronize_rcu() common case rcu/tasks: Fix stale task snaphot for Tasks Trace tools/rcu: Add rcu-updaters.sh script rcutorture: Add missing MODULE_DESCRIPTION() macros rcutorture: Fix rcu_torture_fwd_cb_cr() data race ... commit 253e1e98180a124475327f2ce7b6f15f2e4d0d45 Merge: c4b729b0fac2d ea6ee1bac6034 Author: Linus Torvalds Date: Mon Jul 15 15:22:35 2024 -0700 Merge tag 'lkmm.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull memory model updates from Paul McKenney: "lkmm: Fix corner-case locking bug and improve documentation A simple but odd single-process litmus test acquires and immediately releases a lock, then calls spin_is_locked(). LKMM acts if it was a deadlock due to an assumption that spin_is_locked() will follow a spin_lock() or some other process's spin_unlock(). This litmus test manages to violate this assumption because the spin_is_locked() follows the same process's spin_unlock(). This series fixes this bug, reorganizes and optimizes the lock.cat model, and updates documentation" * tag 'lkmm.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: tools/memory-model: Code reorganization in lock.cat tools/memory-model: Fix bug in lock.cat tools/memory-model: Add access-marking.txt to README tools/memory-model: Add KCSAN LF mentorship session citation commit c4b729b0fac2d1b336df6d3e8c3fdb67ee9fff82 Merge: 4fd9435641bb8 f1b5644862c5b Author: Linus Torvalds Date: Mon Jul 15 15:19:36 2024 -0700 Merge tag 'cmpxchg.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull arm byte cmpxchg from Paul McKenney: "ARM: Provide one-byte cmpxchg emulation This provides emulated one-byte cmpxchg() support for ARM using the cmpxchg_emu_u8() function that uses a four-byte cmpxchg() to emulate the one-byte variant. Similar patches for emulation of one-byte cmpxchg() for arc, sh, and xtensa have not yet received maintainer acks, so they are slated for the v6.12 merge window" * tag 'cmpxchg.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: ARM: Emulate one-byte cmpxchg commit 4fd9435641bb80c04863c9a35afafe4c3f953bbf Merge: 0eff0491e74c4 b7625d67eb1a6 Author: Linus Torvalds Date: Mon Jul 15 15:03:09 2024 -0700 Merge tag 'timers-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Updates for timers, timekeeping and related functionality: Core: - Make the takeover of a hrtimer based broadcast timer reliable during CPU hot-unplug. The current implementation suffers from a race which can lead to broadcast timer starvation in the worst case. - VDSO related cleanups and simplifications - Small cleanups and enhancements all over the place PTP: - Replace the architecture specific base clock to clocksource, e.g. ART to TSC, conversion function with generic functionality to avoid exposing such internals to drivers and convert all existing drivers over. This also allows to provide functionality which converts the other way round in the core code based on the same parameter set. - Provide a function to convert CLOCK_REALTIME to the base clock to support the upcoming PPS output driver on Intel platforms. Drivers: - A set of Device Tree bindings for new hardware - Cleanups and enhancements all over the place" * tag 'timers-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) clocksource/drivers/realtek: Add timer driver for rtl-otto platforms dt-bindings: timer: Add schema for realtek,otto-timer dt-bindings: timer: Add SOPHGO SG2002 clint dt-bindings: timer: renesas,tmu: Add R-Car Gen2 support dt-bindings: timer: renesas,tmu: Add RZ/G1 support dt-bindings: timer: renesas,tmu: Add R-Mobile APE6 support clocksource/drivers/mips-gic-timer: Correct sched_clock width clocksource/drivers/mips-gic-timer: Refine rating computation clocksource/drivers/sh_cmt: Address race condition for clock events clocksource/driver/arm_global_timer: Remove unnecessary ‘0’ values from err clocksource/drivers/arm_arch_timer: Remove unnecessary ‘0’ values from irq tick/broadcast: Make takeover of broadcast hrtimer reliable tick/sched: Combine WARN_ON_ONCE and print_once x86/vdso: Remove unused include x86/vgtod: Remove unused typedef gtod_long_t x86/vdso: Fix function reference in comment vdso: Add comment about reason for vdso struct ordering vdso/gettimeofday: Clarify comment about open coded function timekeeping: Add missing kernel-doc function comments tick: Remove unnused tick_nohz_get_idle_calls() ... commit 0eff0491e74c4df69bbe43555243ecec85577823 Merge: 0e4b77d4eaa12 77aeb1b685f9d Author: Linus Torvalds Date: Mon Jul 15 14:55:30 2024 -0700 Merge tag 'smp-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug updates from Thomas Gleixner: "A small set of SMP/CPU hotplug updates: - Reverse the order of iteration when freezing secondary CPUs for hibernation. This avoids that drivers like the Intel uncore performance counter have to transfer the assignement of handling the per package uncore events for every CPU in a package, which is a considerable speedup on larger systems. - Add a missing destroy_work_on_stack() invocation in smp_call_on_cpu() to prevent debug objects to emit a false positive warning when the stack is freed. - Small cleanups in comments and a str_plural() conversion" * tag 'smp-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu() cpu/hotplug: Reverse order of iteration in freeze_secondary_cpus() smp: Use str_plural() to fix Coccinelle warnings cpu/hotplug: Fix typo in comment commit 0e4b77d4eaa121bdcf8cb2b07aa4a16e7a9e7c6d Merge: 3e7819886281e 5b5baba622225 Author: Linus Torvalds Date: Mon Jul 15 14:52:21 2024 -0700 Merge tag 'core-debugobjects-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects update from Thomas Gleixner: "A single update for debugobjects to annotate all intentionally racy global debug variables so that KCSAN ignores them" * tag 'core-debugobjects-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Annotate racy debug variables commit 7bbae44cf1bda02537a84cd8ad75bd81694acfc7 Author: Aurabindo Pillai Date: Mon Jul 15 15:02:20 2024 -0400 drm/amd/display: fix doc entry for bb_from_dmub Fixes the warning: Function parameter or struct member 'bb_from_dmub' not described in 'amdgpu_display_manager' Reported-by: Stephen Rothwell Signed-off-by: Aurabindo Pillai Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 28814be8823002eca06d857d4bce70eb4c6fccd3 Author: Aurabindo Pillai Date: Wed Jul 10 20:20:47 2024 +0000 drm/amd: Bump KMS_DRIVER_MINOR version Increase the KMS minor version to indicate GFX12 DCC support since this contains a major change in how DCC is managed across IPs like GFX, DCN etc. This will be used mainly by userspace like Mesa to figure out DCC support on GFX12 hardware. v2: fix version number (Alex) Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher commit 3e7819886281e077e82006fe4804b0d6b0f5643b Merge: 3a56e24173297 3c1743a685b19 Author: Linus Torvalds Date: Mon Jul 15 14:20:22 2024 -0700 Merge tag 'for-6.11/block-20240710' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - NVMe updates via Keith: - Device initialization memory leak fixes (Keith) - More constants defined (Weiwen) - Target debugfs support (Hannes) - PCIe subsystem reset enhancements (Keith) - Queue-depth multipath policy (Redhat and PureStorage) - Implement get_unique_id (Christoph) - Authentication error fixes (Gaosheng) - MD updates via Song - sync_action fix and refactoring (Yu Kuai) - Various small fixes (Christoph Hellwig, Li Nan, and Ofir Gal, Yu Kuai, Benjamin Marzinski, Christophe JAILLET, Yang Li) - Fix loop detach/open race (Gulam) - Fix lower control limit for blk-throttle (Yu) - Add module descriptions to various drivers (Jeff) - Add support for atomic writes for block devices, and statx reporting for same. Includes SCSI and NVMe (John, Prasad, Alan) - Add IO priority information to block trace points (Dongliang) - Various zone improvements and tweaks (Damien) - mq-deadline tag reservation improvements (Bart) - Ignore direct reclaim swap writes in writeback throttling (Baokun) - Block integrity improvements and fixes (Anuj) - Add basic support for rust based block drivers. Has a dummy null_blk variant for now (Andreas) - Series converting driver settings to queue limits, and cleanups and fixes related to that (Christoph) - Cleanup for poking too deeply into the bvec internals, in preparation for DMA mapping API changes (Christoph) - Various minor tweaks and fixes (Jiapeng, John, Kanchan, Mikulas, Ming, Zhu, Damien, Christophe, Chaitanya) * tag 'for-6.11/block-20240710' of git://git.kernel.dk/linux: (206 commits) floppy: add missing MODULE_DESCRIPTION() macro loop: add missing MODULE_DESCRIPTION() macro ublk_drv: add missing MODULE_DESCRIPTION() macro xen/blkback: add missing MODULE_DESCRIPTION() macro block/rnbd: Constify struct kobj_type block: take offset into account in blk_bvec_map_sg again block: fix get_max_segment_size() warning loop: Don't bother validating blocksize virtio_blk: Don't bother validating blocksize null_blk: Don't bother validating blocksize block: Validate logical block size in blk_validate_limits() virtio_blk: Fix default logical block size fallback nvmet-auth: fix nvmet_auth hash error handling nvme: implement ->get_unique_id block: pass a phys_addr_t to get_max_segment_size block: add a bvec_phys helper blk-lib: check for kill signal in ioctl BLKZEROOUT block: limit the Write Zeroes to manually writing zeroes fallback block: refacto blkdev_issue_zeroout block: move read-only and supported checks into (__)blkdev_issue_zeroout ... commit a23e1966932464e1c5226cb9ac4ce1d5fc10ba22 Merge: 7c7b1be19b228 f3efefb6fdcce Author: Dmitry Torokhov Date: Mon Jul 15 14:03:44 2024 -0700 Merge branch 'next' into for-linus Prepare input updates for 6.11 merge window. commit 3a56e241732975c2c1247047ddbfc0ac6f6a4905 Merge: 4f5e249ec0ea8 ad00e629145b2 Author: Linus Torvalds Date: Mon Jul 15 13:49:10 2024 -0700 Merge tag 'for-6.11/io_uring-20240714' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: "Here are the io_uring updates queued up for 6.11. Nothing major this time around, various minor improvements and cleanups/fixes. This contains: - Add bind/listen opcodes. Main motivation is to support direct descriptors, to avoid needing a regular fd just for doing these two operations (Gabriel) - Probe fixes (Gabriel) - Treat io-wq work flags as atomics. Not fixing a real issue, but may as well and it silences a KCSAN warning (me) - Cleanup of rsrc __set_current_state() usage (me) - Add 64-bit for {m,f}advise operations (me) - Improve performance of data ring messages (me) - Fix for ring message overflow posting (Pavel) - Fix for freezer interaction with TWA_NOTIFY_SIGNAL. Not strictly an io_uring thing, but since TWA_NOTIFY_SIGNAL was originally added for faster task_work signaling for io_uring, bundling it with this pull (Pavel) - Add Pavel as a co-maintainer - Various cleanups (me, Thorsten)" * tag 'for-6.11/io_uring-20240714' of git://git.kernel.dk/linux: (28 commits) io_uring/net: check socket is valid in io_bind()/io_listen() kernel: rerun task_work while freezing in get_signal() io_uring/io-wq: limit retrying worker initialisation io_uring/napi: Remove unnecessary s64 cast io_uring/net: cleanup io_recv_finish() bundle handling io_uring/msg_ring: fix overflow posting MAINTAINERS: change Pavel Begunkov from io_uring reviewer to maintainer io_uring/msg_ring: use kmem_cache_free() to free request io_uring/msg_ring: check for dead submitter task io_uring/msg_ring: add an alloc cache for io_kiocb entries io_uring/msg_ring: improve handling of target CQE posting io_uring: add io_add_aux_cqe() helper io_uring: add remote task_work execution helper io_uring/msg_ring: tighten requirement for remote posting io_uring: Allocate only necessary memory in io_probe io_uring: Fix probe of disabled operations io_uring: Introduce IORING_OP_LISTEN io_uring: Introduce IORING_OP_BIND net: Split a __sys_listen helper for io_uring net: Split a __sys_bind helper for io_uring ... commit 92fc2c469eb26060384e9b2cd4cb0cc228aba582 Author: Bart Van Assche Date: Thu Jul 11 15:59:52 2024 -0700 nvme-pci: Fix the instructions for disabling power management pcie_aspm=off tells the kernel not to modify the ASPM configuration. This setting does not guarantee that ASPM (Active State Power Management) is disabled. Hence add pcie_port_pm=off. This disables power management for all PCIe ports. This patch has been tested on a workstation with a Samsung SSD 970 EVO Plus NVMe SSD. Fixes: 4641a8e6e145 ("nvme-pci: add trouble shooting steps for timeouts") Cc: Keith Busch Cc: Christoph Hellwig Cc: Chaitanya Kulkarni Signed-off-by: Bart Van Assche Signed-off-by: Keith Busch commit 88c918d1ee2c88cc5be3aa67ce048414fee471ff Author: Israel Rukshin Date: Thu Jul 11 14:40:53 2024 +0300 nvme: remove redundant bdev local variable Use disk directly instead of getting it from bdev->bd_disk. Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit 1a7812b25e69f6c63c52d3bc93c0970ab7ad9660 Author: Markus Elfring Date: Sat Jul 13 15:43:17 2024 +0200 nvme-fabrics: Use seq_putc() in __nvmf_concat_opt_tokens() Single characters should be put into a sequence. Thus use the corresponding function “seq_putc”. This issue was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Keith Busch commit ab091ec536cb7b271983c0c063b17f62f3591583 Author: WangYuli Date: Mon Jul 15 17:31:44 2024 +0800 nvme/pci: Add APST quirk for Lenovo N60z laptop There is a hardware power-saving problem with the Lenovo N60z board. When turn it on and leave it for 10 hours, there is a 20% chance that a nvme disk will not wake up until reboot. Link: https://lore.kernel.org/all/2B5581C46AC6E335+9c7a81f1-05fb-4fd0-9fbb-108757c21628@uniontech.com Signed-off-by: hmy Signed-off-by: Wentao Guan Signed-off-by: WangYuli Signed-off-by: Keith Busch commit 4f5e249ec0ea8872e1644df23cffffbe28007188 Merge: 98f3a9a4fd449 602f09f4029c7 Author: Linus Torvalds Date: Mon Jul 15 13:28:14 2024 -0700 Merge tag 'vfs-6.11.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull iomap updates from Christian Brauner: "This contains some minor work for the iomap subsystem: - Add documentation on the design of iomap and how to port to it - Optimize iomap_read_folio() - Bring back the change to iomap_write_end() to no increase i_size. This is accompanied by a change to xfs to reserve blocks for truncating large realtime inodes to avoid exposing stale data when iomap_write_end() stops increasing i_size" * tag 'vfs-6.11.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: iomap: don't increase i_size in iomap_write_end() xfs: reserve blocks for truncating large realtime inode Documentation: the design of iomap and how to port iomap: Optimize iomap_read_folio commit 51b35d4f9d8860b7c181e545a90bc0ad370efbdb Merge: af58de31bebe7 0a1868b93fad5 Author: Jakub Kicinski Date: Mon Jul 15 13:05:05 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Merge in late fixes to prepare for the 6.11 net-next PR. Conflicts: 93c3a96c301f ("net: pse-pd: Do not return EOPNOSUPP if config is null") 4cddb0f15ea9 ("net: ethtool: pse-pd: Fix possible null-deref") 30d7b6727724 ("net: ethtool: Add new power limit get and set features") https://lore.kernel.org/20240715123204.623520bb@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit af58de31bebe737235f0238843f2054996998bd5 Merge: dd3cd3ca691df 355440a6981ab Author: Jakub Kicinski Date: Mon Jul 15 12:50:57 2024 -0700 Merge branch 'eth-fbnic-add-network-driver-for-meta-platforms-host-network-interface' Alexander Duyck says: ==================== eth: fbnic: Add network driver for Meta Platforms Host Network Interface This patch set includes the necessary patches to enable basic Tx and Rx over the Meta Platforms Host Network Interface. To do this we introduce a new driver and driver directories in the form of "drivers/net/ethernet/meta/fbnic". The NIC itself is fairly simplistic. As far as speeds we support 25Gb, 50Gb, and 100Gb and we are mostly focused on speeds and feeds. As far as future patch sets we will be supporting the basic Rx/Tx offloads such as header/payload data split, TSO, checksum, and timestamp offloads. We have access to the MAC and PCS from the NIC, however the PHY and QSFP are hidden behind a FW layer as it is shared between 4 slices and the BMC. Due to submission limits the general plan to submit a minimal driver for now almost equivalent to a UEFI driver in functionality, and then follow up over the coming months enabling additional offloads and enabling more features for the device. ==================== Link: https://patch.msgid.link/172079913640.1778861.11459276843992867323.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 355440a6981ab8166a8291678424bb38d3c1f5f9 Author: Alexander Duyck Date: Fri Jul 12 08:50:35 2024 -0700 eth: fbnic: Write the TCAM tables used for RSS control and Rx to host RSS is controlled by the Rx filter tables. Program rules matching on appropriate traffic types and set hashing fields using actions. We need a separate set of rules for broadcast and multicast because the action there needs to include forwarding to BMC. This patch only initializes the default settings, the control of the configuration using ethtool will come soon. With this the necessary rules are put in place to enable Rx of packets by the host. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079943591.1778861.17778587068185893750.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit eb690ef8d1c2a1b60e8c11721ace1538f027459e Author: Alexander Duyck Date: Fri Jul 12 08:50:32 2024 -0700 eth: fbnic: Add L2 address programming Program the Rx TCAM to control L2 forwarding. Since we are in full control of the NIC we need to make sure we include BMC forwarding in the rules. When host is not present BMC will program the TCAM to get onto the network but once we take ownership it's up to Linux driver to make sure BMC L2 addresses are handled correctly. Co-developed-by: Sanman Pradhan Signed-off-by: Sanman Pradhan Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079943202.1778861.4410412697614789017.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit a29b8eb6e5337f569f4a08937573dce7cc183493 Author: Alexander Duyck Date: Fri Jul 12 08:50:28 2024 -0700 eth: fbnic: Add basic Rx handling Handle Rx packets with basic csum and Rx hash offloads. NIC writes back to the completion ring a head buffer descriptor (data buffer allocated from header pages), variable number of payload descriptors (data buffers in payload pages), an optional metadata descriptor (type 2) and finally the primary metadata descriptor (type 3). This format makes scatter support fairly easy - start gathering the pages when we see head page, gather until we see the primary metadata descriptor, do the processing. Use XDP infra to collect the packet fragments as we traverse the descriptors. XDP itself is not supported yet, but it will be soon. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079942839.1778861.10509071985738726125.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 9a57bacd574b52b08bc2c600af6a8c7a87049ecf Author: Alexander Duyck Date: Fri Jul 12 08:50:24 2024 -0700 eth: fbnic: Add basic Tx handling Handle Tx of simple packets. Support checksum offload and gather. Use .ndo_features_check to make sure packet geometry will be supported by the HW, i.e. we can fit the header lengths into the descriptor fields. The device writes to the completion rings the position of the tail (consumer) pointer. Read all those writebacks, obviously the last one will be the most recent, complete skbs up to that point. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079942464.1778861.17919428039428796180.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 69684376eed517817251ea6a768cfc315350d5c1 Author: Alexander Duyck Date: Fri Jul 12 08:49:58 2024 -0700 eth: fbnic: Add link detection Add basic support for detecting the link and reporting it at the netdev layer. For now we will just use the values reporeted by the firmware as the link configuration and assume that is the current configuration of the MAC and PCS. With this we start the stubbing out of the phylink interface that will be used to provide the configuration interface for ethtool in a future patch set. The phylink interface isn't an exact fit. As such we are currently working around several issues in this patch set that we plan to address in the future such as: 1. Support for FEC 2. Support for multiple lanes to handle 50GbaseR2 vs 50GbaseR1 3. Support for BMC CC: Russell King CC: Andrew Lunn Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079939835.1778861.5964790909718481811.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 20d2e88cc7461b03b97293d62d780a2d4b08ed8b Author: Alexander Duyck Date: Fri Jul 12 08:49:54 2024 -0700 eth: fbnic: Add initial messaging to notify FW of our presence After the driver loads we need to get some initial capabilities from the firmware to determine what the device is capable of and what functionality needs to be enabled. Specifically we receive information about the current state of the link and if a BMC is present. After that when we bring the interface up we will need the ability to take ownership from the FW. To do that we will need to notify it that we are taking control before we start configuring the traffic classifier and MAC. Once we have ownership we need to notify the firmware that we are still present and active. To do that we will send a regular heartbeat to the FW. If the FW doesn't receive the heartbeat in a timely fashion it will retake control of the RPC and MAC and assume that the host has gone offline. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079939458.1778861.8966209942099133957.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 0cb4c0a13723ef6dd06be8f913443897a0ffccb5 Author: Alexander Duyck Date: Fri Jul 12 08:49:50 2024 -0700 eth: fbnic: Implement Rx queue alloc/start/stop/free Implement control path parts of Rx queue handling. The NIC consumes memory in pages. It takes a full page and places packets into it in a configurable manner (with the ability to define headroom / tailroom as well as head alignment requirements). As mentioned in prior patches there are two page submissions queues one for packet headers and second (optional) for packet payloads. For now feed both queues from a single page pool. Use the page pool "fragment" API, as we can't predict upfront how the page will be sliced. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079939092.1778861.3780136633831329550.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 40bf06a160a14eb910c491b6c0deca1821d34cd9 Author: Alexander Duyck Date: Fri Jul 12 08:49:47 2024 -0700 eth: fbnic: Implement Tx queue alloc/start/stop/free Implement basic management operations for Tx queues. Allocate memory for submission and completion rings. Learn how to start the queues, stop them, and wait for HW to be idle. We call HW rings "descriptor rings" (stored in ring->desc), and SW context rings "buffer rings" (stored in ring->*_buf union). This is the first patch which actually touches CSRs so add CSR helpers. No actual datapath / packet handling here, yet. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079938724.1778861.8329677776612865169.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit bc6107771bb4be3009168cfda24d22131c026fe8 Author: Alexander Duyck Date: Fri Jul 12 08:49:43 2024 -0700 eth: fbnic: Allocate a netdevice and napi vectors with queues Allocate a netdev and figure out basics like how many queues we need, MAC address, MTU bounds. Kick off a service task to do various periodic things like health checking. The service task only runs when device is open. We have four levels of objects here: - ring - A HW ring with head / tail pointers, - triad - Two submission and one completion ring, - NAPI - NAPI, with one IRQ and any number of Rx and Tx triads, - Netdev - The ultimate container of the rings and napi vectors. The "triad" is the only less-than-usual construct. On Rx we have two "free buffer" submission rings, one for packet headers and one for packet data. On Tx we have separate rings for XDP Tx and normal Tx. So we ended up with ring triplets in both directions. We keep NAPIs on a local list, even though core already maintains a list. Later on having a separate list will matter for live reconfig. We introduce the list already, the churn would not be worth it. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079938358.1778861.11681469974633489463.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit da3cde08209ec1c915195c2331c275397f34a731 Author: Alexander Duyck Date: Fri Jul 12 08:49:31 2024 -0700 eth: fbnic: Add FW communication mechanism Add a mechanism for sending messages to and receiving messages from the FW. The FW has fairly limited functionality, so the mechanism doesn't have to support high message rate. Use device mailbox registers to form two rings, one "to" and one "from" the device. The rings are just a convention between driver and FW, not a HW construct. We don't expect messages larger than 4k so use page-sized buffers. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079937113.1778861.10669864213768701947.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit c6203e678cc9a5bf01ec7ae382851f504870777f Author: Alexander Duyck Date: Fri Jul 12 08:49:27 2024 -0700 eth: fbnic: Add message parsing for FW messages Add FW message formatting and parsing. The TLV format should look very familiar to those familiar with netlink. Since we don't have to deal with backward compatibility we tweaked the format a little to make it easier to deal with, and more appropriate for tightly coupled interfaces like driver<>FW communication. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079936754.1778861.1029830244010564007.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 3646153161f1052972d9d2062d8c27b0e30c89f8 Author: Alexander Duyck Date: Fri Jul 12 08:49:23 2024 -0700 eth: fbnic: Add register init to set PCIe/Ethernet device config As a part of enabling the device the first step is to configure the AXI and Ethernet interfaces to allow for basic traffic. This consists of configuring several registers related to the PCIe and Ethernet FIFOs as well as configuring the handlers for moving traffic between entities. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079936376.1778861.15942501417449077552.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 1a9d48892ea5bf27f359f40d96511acc3eecea58 Author: Alexander Duyck Date: Fri Jul 12 08:49:20 2024 -0700 eth: fbnic: Allocate core device specific structures and devlink interface At the core of the fbnic device will be the devlink interface. This interface will eventually provide basic functionality in the event that there are any issues with the network interface. Add support for allocating the MSI-X vectors and setting up the BAR mapping. With this we can start enabling various subsystems and start brining up additional interfaces such the AXI fabric and the firmware mailbox. Signed-off-by: Alexander Duyck Link: https://patch.msgid.link/172079936012.1778861.4670986685222676467.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit 546dd90be97913c775b5bcd20b665f4ff5df9cd4 Author: Alexander Duyck Date: Fri Jul 12 08:49:16 2024 -0700 eth: fbnic: Add scaffolding for Meta's NIC driver Create a bare-bones PCI driver for Meta's NIC. Subsequent changes will flesh it out. Signed-off-by: Alexander Duyck Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/172079935646.1778861.9710282776096050607.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit c5eaf1b3f824369b6dcb33a39232b871d2ca8e33 Author: Alexander Duyck Date: Fri Jul 12 08:49:12 2024 -0700 PCI: Add Meta Platforms vendor ID Add Meta as a vendor ID for PCI devices so we can use the macro for future drivers. Signed-off-by: Alexander Duyck Acked-by: Bjorn Helgaas Link: https://patch.msgid.link/172079935272.1778861.13619056509276833225.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski commit dd3cd3ca691df33292e73996f92d2a98906f69c5 Merge: e7afb958fa90c 0477d5168bbb8 Author: Jakub Kicinski Date: Mon Jul 15 12:42:44 2024 -0700 Merge tag 'aux-sysfs-irqs' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== aux-sysfs-irqs Shay Says: ========== Introduce auxiliary bus IRQs sysfs Today, PCI PFs and VFs, which are anchored on the PCI bus, display their IRQ information in the /msi_irqs/ sysfs files. PCI subfunctions (SFs) are similar to PFs and VFs and these SFs are anchored on the auxiliary bus. However, these PCI SFs lack such IRQ information on the auxiliary bus, leaving users without visibility into which IRQs are used by the SFs. This absence makes it impossible to debug situations and to understand the source of interrupts/SFs for performance tuning and debug. Additionally, the SFs are multifunctional devices supporting RDMA, network devices, clocks, and more, similar to their peer PCI PFs and VFs. Therefore, it is desirable to have SFs' IRQ information available at the bus/device level. To overcome the above limitations, this short series extends the auxiliary bus to display IRQ information in sysfs, similar to that of PFs and VFs. It adds an 'irqs' directory under the auxiliary device and includes an sysfs file within it. For example: $ ls /sys/bus/auxiliary/devices/mlx5_core.sf.1/irqs/ 50 51 52 53 54 55 56 57 58 Patch summary: patch-1 adds auxiliary bus to support irqs used by auxiliary device patch-2 mlx5 driver using exposing irqs for PCI SF devices via auxiliary bus ========== * tag 'aux-sysfs-irqs' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Expose SFs IRQs driver core: auxiliary bus: show auxiliary device IRQs RDMA/mlx5: Add Qcounters req_transport_retries_exceeded/req_rnr_retries_exceeded net/mlx5: Reimplement write combining test ==================== Link: https://patch.msgid.link/20240711213140.256997-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 98f3a9a4fd449641010c77abca16aebb0b8d4419 Merge: 1b074abe885f4 5b08bd408534b Author: Linus Torvalds Date: Mon Jul 15 12:34:01 2024 -0700 Merge tag 'vfs-6.11.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull pidfs updates from Christian Brauner: "This contains work to make it possible to derive namespace file descriptors from pidfd file descriptors. Right now it is already possible to use a pidfd with setns() to atomically change multiple namespaces at the same time. In other words, it is possible to switch to the namespace context of a process using a pidfd. There is no need to first open namespace file descriptors via procfs. The work included here is an extension of these abilities by allowing to open namespace file descriptors using a pidfd. This means it is now possible to interact with namespaces without ever touching procfs. To this end a new set of ioctls() on pidfds is introduced covering all supported namespace types" * tag 'vfs-6.11.pidfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: pidfs: allow retrieval of namespace file descriptors nsfs: add open_namespace() nsproxy: add helper to go from arbitrary namespace to ns_common nsproxy: add a cleanup helper for nsproxy file: add take_fd() cleanup helper commit 1b074abe885f43b2c207b5e748ffa60604dbc020 Merge: f608cabaeda47 ca567df74a28a Author: Linus Torvalds Date: Mon Jul 15 12:27:39 2024 -0700 Merge tag 'vfs-6.11.nsfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull namespace-fs updates from Christian Brauner: "This adds ioctls allowing to translate PIDs between PID namespaces. The motivating use-case comes from LXCFS which is a tiny fuse filesystem used to virtualize various aspects of procfs. LXCFS is run on the host. The files and directories it creates can be bind-mounted by e.g. a container at startup and mounted over the various procfs files the container wishes to have virtualized. When e.g. a read request for uptime is received, LXCFS will receive the pid of the reader. In order to virtualize the corresponding read, LXCFS needs to know the pid of the init process of the reader's pid namespace. In order to do this, LXCFS first needs to fork() two helper processes. The first helper process setns() to the readers pid namespace. The second helper process is needed to create a process that is a proper member of the pid namespace. The second helper process then creates a ucred message with ucred.pid set to 1 and sends it back to LXCFS. The kernel will translate the ucred.pid field to the corresponding pid number in LXCFS's pid namespace. This way LXCFS can learn the init pid number of the reader's pid namespace and can go on to virtualize. Since these two forks() are costly LXCFS maintains an init pid cache that caches a given pid for a fixed amount of time. The cache is pruned during new read requests. However, even with the cache the hit of the two forks() is singificant when a very large number of containers are running. So this adds a simple set of ioctls that let's a caller translate PIDs from and into a given PID namespace. This significantly improves performance with a very simple change. To protect against races pidfds can be used to check whether the process is still valid" * tag 'vfs-6.11.nsfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: nsfs: add pid translation ioctls commit ae81b69fd2b1eb4885b352749b1fd1172e2f0f18 Author: Drew Fustini Date: Thu Jul 11 09:56:20 2024 -0700 clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks Add support for the AP sub-system clock controller in the T-Head TH1520. This include CPU, DPU, GMAC and TEE PLLs. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf Co-developed-by: Yangtao Li Signed-off-by: Yangtao Li Co-developed-by: Jisheng Zhang Signed-off-by: Jisheng Zhang Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20240711-th1520-clk-v3-2-6ff17bb318fb@tenstorrent.com Signed-off-by: Stephen Boyd commit 7dc836187f7c6f70a82b4521503e9f9f96194581 Author: levi.yun Date: Thu Jul 4 16:02:26 2024 +0100 trace/pid_list: Change gfp flags in pid_list_fill_irq() pid_list_fill_irq() runs via irq_work. When CONFIG_PREEMPT_RT is disabled, it would run in irq_context. so it shouldn't sleep while memory allocation. Change gfp flags from GFP_KERNEL to GFP_NOWAIT to prevent sleep in irq_work. This change wouldn't impact functionality in practice because the worst-size is 2K. Cc: stable@goodmis.org Fixes: 8d6e90983ade2 ("tracing: Create a sparse bitmask for pid filtering") Link: https://lore.kernel.org/20240704150226.1359936-1-yeoreum.yun@arm.com Acked-by: Masami Hiramatsu (Google) Signed-off-by: levi.yun Signed-off-by: Steven Rostedt (Google) commit a325742505f6f08141fd7a530a82a907780bfd2c Author: Tio Zhang Date: Wed Jul 3 11:33:53 2024 +0800 tracing/sched: sched_switch: place prev_comm and next_comm in right order Switch the order of prev_comm and next_comm in sched_switch's code to align with its printing order. Cc: Signed-off-by: Tio Zhang Link: https://lore.kernel.org/20240703033353.GA2833@didi-ThinkCentre-M930t-N000 Reviewed-by: Madadi Vineeth Reddy Signed-off-by: Steven Rostedt (Google) commit f608cabaeda472887c008e42398e8fca14e8f411 Merge: 2aae1d67fd1d9 4bed843b10004 Author: Linus Torvalds Date: Mon Jul 15 11:54:04 2024 -0700 Merge tag 'vfs-6.11.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs mount query updates from Christian Brauner: "This contains work to extend the abilities of listmount() and statmount() and various fixes and cleanups. Features: - Allow iterating through mounts via listmount() from newest to oldest. This makes it possible for mount(8) to keep iterating the mount table in reverse order so it gets newest mounts first. - Relax permissions on listmount() and statmount(). It's not necessary to have capabilities in the initial namespace: it is sufficient to have capabilities in the owning namespace of the mount namespace we're located in to list unreachable mounts in that namespace. - Extend both listmount() and statmount() to list and stat mounts in foreign mount namespaces. Currently the only way to iterate over mount entries in mount namespaces that aren't in the caller's mount namespace is by crawling through /proc in order to find /proc//mountinfo for the relevant mount namespace. This is both very clumsy and hugely inefficient. So extend struct mnt_id_req with a new member that allows to specify the mount namespace id of the mount namespace we want to look at. Luckily internally we already have most of the infrastructure for this so we just need to expose it to userspace. Give userspace a way to retrieve the id of a mount namespace via statmount() and through a new nsfs ioctl() on mount namespace file descriptor. This comes with appropriate selftests. - Expose mount options through statmount(). Currently if userspace wants to get mount options for a mount and with statmount(), they still have to open /proc//mountinfo to parse mount options. Simply the information through statmount() directly. Afterwards it's possible to only rely on statmount() and listmount() to retrieve all and more information than /proc//mountinfo provides. This comes with appropriate selftests. Fixes: - Avoid copying to userspace under the namespace semaphore in listmount. Cleanups: - Simplify the error handling in listmount by relying on our newly added cleanup infrastructure. - Refuse invalid mount ids early for both listmount and statmount" * tag 'vfs-6.11.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: reject invalid last mount id early fs: refuse mnt id requests with invalid ids early fs: find rootfs mount of the mount namespace fs: only copy to userspace on success in listmount() sefltests: extend the statmount test for mount options fs: use guard for namespace_sem in statmount() fs: export mount options via statmount() fs: rename show_mnt_opts -> show_vfsmnt_opts selftests: add a test for the foreign mnt ns extensions fs: add an ioctl to get the mnt ns id from nsfs fs: Allow statmount() in foreign mount namespace fs: Allow listmount() in foreign mount namespace fs: export the mount ns id via statmount fs: keep an index of current mount namespaces fs: relax permissions for statmount() listmount: allow listing in reverse order fs: relax permissions for listmount() fs: simplify error handling fs: don't copy to userspace under namespace semaphore path: add cleanup helper commit 281cfec53b4484ce2092c89b6909f5573cb23443 Merge: ab33da3a22080 b755367602d70 Author: Rafael J. Wysocki Date: Mon Jul 15 20:44:31 2024 +0200 Merge branch 'thermal-intel' Merge updates of Intel thermal drivers for 6.11-rc1: - Switch Intel thermal drivers to new Intel CPU model defines (Tony Luck). - Clean up the int3400 and int3403 drivers (Erick Archer and David Alan Gilbert). - Improve intel_pch_thermal kernel log messages printed during suspend to idle (Zhang Rui). - Make the intel_tcc_cooling driver use a model-specific bitmask for TCC offset (Ricardo Neri). - Add DLVR and MSI interrupt support for the Lunar Lake platform to the int340x thermal driver (Srinivas Pandruvada). - Enable workload type hints (WLT) support and power floor interrupt support for the Lunar Lake platform in int340x ((Srinivas Pandruvada). - Make the HFI thermal driver use package scope for HFI instances as per the Intel SDM (Zhang Rui). * thermal-intel: thermal: intel: hfi: Give HFI instances package scope thermal: intel: int340x: Enable WLT and power floor support for Lunar Lake thermal: intel: int340x: Support MSI interrupt for Lunar Lake thermal: intel: int340x: Remove unnecessary calls to free irq thermal: intel: int340x: Add DLVR support for Lunar Lake thermal: intel: int340x: Capability to map user space to firmware values thermal: intel: int340x: Cleanup of DLVR sysfs on driver remove thermal: intel: intel_tcc_cooling: Use a model-specific bitmask for TCC offset thermal: intel: intel_tcc: Add model checks for temperature registers thermal: intel: intel_pch: Improve cooling log thermal: int3403: remove unused struct 'int3403_performance_state' thermal: int3400: Use sizeof(*pointer) instead of sizeof(type) thermal: intel: intel_soc_dts_thermal: Switch to new Intel CPU model defines thermal: intel: intel_tcc_cooling: Switch to new Intel CPU model defines commit ab33da3a220809e4b18fd8782785c90d02a96795 Merge: 3fdd8ea39f0bc 3669716401921 Author: Rafael J. Wysocki Date: Mon Jul 15 20:43:21 2024 +0200 Merge branch 'thermal-core' Merge updates related to the thermal core for 6.11-rc1: - Redesign the .set_trip_temp() thermal zone callback to take a trip pointer instead of a trip ID and update its users (Rafael Wysocki). - Avoid using invalid combinations of polling_delay and passive_delay thermal zone parameters (Rafael Wysocki). - Update a cooling device registration function to take a const argument (Krzysztof Kozlowski). - Make the uniphier thermal driver use thermal_zone_for_each_trip() for walking trip points (Rafael Wysocki). * thermal-core: thermal: core: Add sanity checks for polling_delay and passive_delay thermal: trip: Fold __thermal_zone_get_trip() into its caller thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback thermal: imx: Drop critical trip check from imx_set_trip_temp() thermal: trip: Add conversion macros for thermal trip priv field thermal: helpers: Introduce thermal_trip_is_bound_to_cdev() thermal: core: Change passive_delay and polling_delay data type thermal: core: constify 'type' in devm_thermal_of_cooling_device_register() thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points commit 2aae1d67fd1d9070f8f23a6e7d9a7a093cf35fbb Merge: b8fc1bd73a5a1 dc99c0ff53f58 Author: Linus Torvalds Date: Mon Jul 15 11:39:44 2024 -0700 Merge tag 'vfs-6.11.inode' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs inode / dentry updates from Christian Brauner: "This contains smaller performance improvements to inodes and dentries: inode: - Add rcu based inode lookup variants. They avoid one inode hash lock acquire in the common case thereby significantly reducing contention. We already support RCU-based operations but didn't take advantage of them during inode insertion. Callers of iget_locked() get the improvement without any code changes. Callers that need a custom callback can switch to iget5_locked_rcu() as e.g., did btrfs. With 20 threads each walking a dedicated 1000 dirs * 1000 files directory tree to stat(2) on a 32 core + 24GB ram vm: before: 3.54s user 892.30s system 1966% cpu 45.549 total after: 3.28s user 738.66s system 1955% cpu 37.932 total (-16.7%) Long-term we should pick up the effort to introduce more fine-grained locking and possibly improve on the currently used hash implementation. - Start zeroing i_state in inode_init_always() instead of doing it in individual filesystems. This allows us to remove an unneeded lock acquire in new_inode() and not burden individual filesystems with this. dcache: - Move d_lockref out of the area used by RCU lookup to avoid cacheline ping poing because the embedded name is sharing a cacheline with d_lockref. - Fix dentry size on 32bit with CONFIG_SMP=y so it does actually end up with 128 bytes in total" * tag 'vfs-6.11.inode' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: fix dentry size vfs: move d_lockref out of the area used by RCU lookup bcachefs: remove now spurious i_state initialization xfs: remove now spurious i_state initialization in xfs_inode_alloc vfs: partially sanitize i_state zeroing on inode creation xfs: preserve i_state around inode_init_always in xfs_reinit_inode btrfs: use iget5_locked_rcu vfs: add rcu-based find_inode variants for iget ops commit b8fc1bd73a5a12e48f9fd2e7ccea60cadf718c93 Merge: 4a051e4c21dfb eea6a8322efd3 Author: Linus Torvalds Date: Mon Jul 15 11:31:32 2024 -0700 Merge tag 'vfs-6.11.mount.api' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs mount API updates from Christian Brauner: - Add a generic helper to parse uid and gid mount options. Currently we open-code the same logic in various filesystems which is error prone, especially since the verification of uid and gid mount options is a sensitive operation in the face of idmappings. Add a generic helper and convert all filesystems over to it. Make sure that filesystems that are mountable in unprivileged containers verify that the specified uid and gid can be represented in the owning namespace of the filesystem. - Convert hostfs to the new mount api. * tag 'vfs-6.11.mount.api' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fuse: Convert to new uid/gid option parsing helpers fuse: verify {g,u}id mount options correctly fat: Convert to new uid/gid option parsing helpers fat: Convert to new mount api fat: move debug into fat_mount_options vboxsf: Convert to new uid/gid option parsing helpers tracefs: Convert to new uid/gid option parsing helpers smb: client: Convert to new uid/gid option parsing helpers tmpfs: Convert to new uid/gid option parsing helpers ntfs3: Convert to new uid/gid option parsing helpers isofs: Convert to new uid/gid option parsing helpers hugetlbfs: Convert to new uid/gid option parsing helpers ext4: Convert to new uid/gid option parsing helpers exfat: Convert to new uid/gid option parsing helpers efivarfs: Convert to new uid/gid option parsing helpers debugfs: Convert to new uid/gid option parsing helpers autofs: Convert to new uid/gid option parsing helpers fs_parse: add uid & gid option option parsing helpers hostfs: Add const qualifier to host_root in hostfs_fill_super() hostfs: convert hostfs to use the new mount API commit 4a051e4c21dfb1c65ef54c44a7a4d0e6845e24f6 Merge: 7d156879ffd6c 28add38d545f4 Author: Linus Torvalds Date: Mon Jul 15 11:18:49 2024 -0700 Merge tag 'vfs-6.11.casefold' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs casefolding updates from Christian Brauner: "This contains some work to simplify the handling of casefolded names: - Simplify the handling of casefolded names in f2fs and ext4 by keeping the names as a qstr to avoiding unnecessary conversions - Introduce a new generic_ci_match() libfs case-insensitive lookup helper and use it in both f2fs and ext4 allowing to remove the filesystem specific implementations - Remove a bunch of ifdefs by making the unicode build checks part of the code flow" * tag 'vfs-6.11.casefold' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: f2fs: Move CONFIG_UNICODE defguards into the code flow ext4: Move CONFIG_UNICODE defguards into the code flow f2fs: Reuse generic_ci_match for ci comparisons ext4: Reuse generic_ci_match for ci comparisons libfs: Introduce case-insensitive string comparison helper f2fs: Simplify the handling of cached casefolded names ext4: Simplify the handling of cached casefolded names commit 7d156879ffd6c48428c2f46d5c2b4b80d9c9ee79 Merge: aff31330e037f 807221c54db6b Author: Linus Torvalds Date: Mon Jul 15 11:14:59 2024 -0700 Merge tag 'vfs-6.11.module.description' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs module description updates from Christian Brauner: "This contains patches to add module descriptions to all modules under fs/ currently lacking them" * tag 'vfs-6.11.module.description' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: openpromfs: add missing MODULE_DESCRIPTION() macro fs: nls: add missing MODULE_DESCRIPTION() macros fs: autofs: add MODULE_DESCRIPTION() fs: fat: add missing MODULE_DESCRIPTION() macros fs: binfmt: add missing MODULE_DESCRIPTION() macros fs: cramfs: add MODULE_DESCRIPTION() fs: hfs: add MODULE_DESCRIPTION() fs: hpfs: add MODULE_DESCRIPTION() qnx4: add MODULE_DESCRIPTION() qnx6: add MODULE_DESCRIPTION() fs: sysv: add MODULE_DESCRIPTION() fs: efs: add MODULE_DESCRIPTION() fs: minix: add MODULE_DESCRIPTION() commit 87232ea8a5caf8d050f8ea7acd210a2cfcbe6309 Author: Steve Wilkins Date: Mon Jul 15 12:13:57 2024 +0100 spi: microchip-core: add support for word sizes of 1 to 32 bits The current implementation only supports a word size of 8 bits, which limits the devices it can be used with. Add support for any word size between 1 and 32 bits, as supported by the hardware. Signed-off-by: Steve Wilkins Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20240715-cogwheel-uniquely-0d4ef518b809@wendy Signed-off-by: Mark Brown commit 9cf71eb0faef4bff01df4264841b8465382d7927 Author: Steve Wilkins Date: Mon Jul 15 12:13:56 2024 +0100 spi: microchip-core: ensure TX and RX FIFOs are empty at start of a transfer While transmitting with rx_len == 0, the RX FIFO is not going to be emptied in the interrupt handler. A subsequent transfer could then read crap from the previous transfer out of the RX FIFO into the start RX buffer. The core provides a register that will empty the RX and TX FIFOs, so do that before each transfer. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Steve Wilkins Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20240715-flammable-provoke-459226d08e70@wendy Signed-off-by: Mark Brown commit 3a5e76283672efddf47cea39ccfe9f5735cc91d5 Author: Steve Wilkins Date: Mon Jul 15 12:13:55 2024 +0100 spi: microchip-core: fix init function not setting the master and motorola modes mchp_corespi_init() reads the CONTROL register, sets the master and motorola bits, but doesn't write the value back to the register. The function also doesn't ensure the controller is disabled at the start, which may present a problem if the controller was used by an earlier boot stage as some settings (including the mode) can only be modified while the controller is disabled. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Steve Wilkins Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20240715-designing-thus-05f7c26e1da7@wendy Signed-off-by: Mark Brown commit de9850b5c606b754dd7861678d6e2874b96b04f8 Author: Steve Wilkins Date: Mon Jul 15 12:13:54 2024 +0100 spi: microchip-core: only disable SPI controller when register value change requires it Setting up many of the registers for a new SPI transfer involves unconditionally disabling the SPI controller, writing the register value and re-enabling the controller. This is being done for registers even when the value is unchanged and is also done for registers that don't require the controller to be disabled for the change to take effect. Make an effort to detect changes to the register values, and only disables the controller if the new register value is different and disabling the controller is required. This stops the controller being repeated disabled and the bus going tristate before every transfer. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Steve Wilkins Co-developed-by: Conor Dooley Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20240715-depict-twirl-7e592eeabaad@wendy Signed-off-by: Mark Brown commit 22fd98c107c792e35db7abe45298bc3a29bf4723 Author: Steve Wilkins Date: Mon Jul 15 12:13:53 2024 +0100 spi: microchip-core: defer asserting chip select until just before write to TX FIFO Setting up many of the registers for a new SPI transfer requires the SPI controller to be disabled after set_cs() has been called to assert the chip select line. However, disabling the controller results in the SCLK and MOSI output pins being tristate, which can cause clock transitions to be seen by a slave device whilst SS is active. To fix this, the CS is only set to inactive inline, whilst setting it active is deferred until all registers are set up and the any controller disables have been completed. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Steve Wilkins Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20240715-sanitizer-recant-dd96b7a97048@wendy Signed-off-by: Mark Brown commit 502a582b8dd897d9282db47c0911d5320ef2e6b9 Author: Naga Sureshkumar Relli Date: Mon Jul 15 12:13:52 2024 +0100 spi: microchip-core: fix the issues in the isr It is possible for the TXDONE interrupt be raised if the tx FIFO becomes temporarily empty while transmitting, resulting in recursive calls to mchp_corespi_write_fifo() and therefore a garbage message might be transmitted depending on when the interrupt is triggered. Moving all of the tx FIFO writes out of the TXDONE portion of the interrupt handler avoids this problem. Most of rest of the TXDONE portion of the handler is problematic too. Only reading the rx FIFO (and finalising the transfer) when the TXDONE interrupt is raised can cause the transfer to stall, if the final bytes of rx data are not available in the rx FIFO when the final TXDONE interrupt is raised. The transfer should be finalised regardless of which interrupt is raised, provided that all tx data has been set and all rx data received. The first issue was encountered "in the wild", the second is theoretical. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Naga Sureshkumar Relli Signed-off-by: Conor Dooley Link: https://patch.msgid.link/20240715-candied-deforest-585685ef3c8a@wendy Signed-off-by: Mark Brown commit aff31330e037f75de7820bc7deb494eeaeaadd35 Merge: b051320d6ab8c 7ad635ea82704 Author: Linus Torvalds Date: Mon Jul 15 11:08:14 2024 -0700 Merge tag 'vfs-6.11.pg_error' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull PG_error removal updates from Christian Brauner: "This contains work to remove almost all remaining users of PG_error from filesystems and filesystem helper libraries. An additional patch will be coming in via the jfs tree which tests the PG_error bit. Afterwards nothing will be testing it anymore and it's safe to remove all places which set or clear the PG_error bit. The goal is to fully remove PG_error by the next merge window" * tag 'vfs-6.11.pg_error' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: buffer: Remove calls to set and clear the folio error flag iomap: Remove calls to set and clear folio error flag vboxsf: Convert vboxsf_read_folio() to use a folio ufs: Remove call to set the folio error flag romfs: Convert romfs_read_folio() to use a folio reiserfs: Remove call to folio_set_error() orangefs: Remove calls to set/clear the error flag nfs: Remove calls to folio_set_error jffs2: Remove calls to set/clear the folio error flag hostfs: Convert hostfs_read_folio() to use a folio isofs: Convert rock_ridge_symlink_read_folio to use a folio hpfs: Convert hpfs_symlink_read_folio to use a folio efs: Convert efs_symlink_read_folio to use a folio cramfs: Convert cramfs_read_folio to use a folio coda: Convert coda_symlink_filler() to use folio_end_read() befs: Convert befs_symlink_read_folio() to use folio_end_read() commit 2634f745eac25a33f032df32cf98fca8538a534a Author: Daniel Baluta Date: Mon Jul 15 18:16:53 2024 +0300 ASoC: SOF: imx8m: Fix DSP control regmap retrieval According to Documentation/devicetree/bindings/dsp/fsl,dsp.yaml fsl,dsp-ctrl is a phandle to syscon block so we need to use correct function to retrieve it. Currently there is no SOF DSP DTS merged into mainline so there is no need to support the old way of retrieving the dsp control node. Fixes: 9ba23717b292 ("ASoC: SOF: imx8m: Implement DSP start") Signed-off-by: Daniel Baluta Link: https://patch.msgid.link/20240715151653.114751-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit b051320d6ab8cfdd77a48ef4e563584cd7681d2d Merge: 2ffd45da0b06b b80cc4df11247 Author: Linus Torvalds Date: Mon Jul 15 10:52:51 2024 -0700 Merge tag 'vfs-6.11.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "Features: - Support passing NULL along AT_EMPTY_PATH for statx(). NULL paths with any flag value other than AT_EMPTY_PATH go the usual route and end up with -EFAULT to retain compatibility (Rust is abusing calls of the sort to detect availability of statx) This avoids path lookup code, lockref management, memory allocation and in case of NULL path userspace memory access (which can be quite expensive with SMAP on x86_64) - Don't block i_writecount during exec. Remove the deny_write_access() mechanism for executables - Relax open_by_handle_at() permissions in specific cases where we can prove that the caller had sufficient privileges to open a file - Switch timespec64 fields in struct inode to discrete integers freeing up 4 bytes Fixes: - Fix false positive circular locking warning in hfsplus - Initialize hfs_inode_info after hfs_alloc_inode() in hfs - Avoid accidental overflows in vfs_fallocate() - Don't interrupt fallocate with EINTR in tmpfs to avoid constantly restarting shmem_fallocate() - Add missing quote in comment in fs/readdir Cleanups: - Don't assign and test in an if statement in mqueue. Move the assignment out of the if statement - Reflow the logic in may_create_in_sticky() - Remove the usage of the deprecated ida_simple_xx() API from procfs - Reject FSCONFIG_CMD_CREATE_EXCL requets that depend on the new mount api early - Rename variables in copy_tree() to make it easier to understand - Replace WARN(down_read_trylock, ...) abuse with proper asserts in various places in the VFS - Get rid of user_path_at_empty() and drop the empty argument from getname_flags() - Check for error while copying and no path in one branch in getname_flags() - Avoid redundant smp_mb() for THP handling in do_dentry_open() - Rename parent_ino to d_parent_ino and make it use RCU - Remove unused header include in fs/readdir - Export in_group_capable() helper and switch f2fs and fuse over to it instead of open-coding the logic in both places" * tag 'vfs-6.11.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (27 commits) ipc: mqueue: remove assignment from IS_ERR argument vfs: rename parent_ino to d_parent_ino and make it use RCU vfs: support statx(..., NULL, AT_EMPTY_PATH, ...) stat: use vfs_empty_path() helper fs: new helper vfs_empty_path() fs: reflow may_create_in_sticky() vfs: remove redundant smp_mb for thp handling in do_dentry_open fuse: Use in_group_or_capable() helper f2fs: Use in_group_or_capable() helper fs: Export in_group_or_capable() vfs: reorder checks in may_create_in_sticky hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode() proc: Remove usage of the deprecated ida_simple_xx() API hfsplus: fix to avoid false alarm of circular locking Improve readability of copy_tree vfs: shave a branch in getname_flags vfs: retire user_path_at_empty and drop empty arg from getname_flags vfs: stop using user_path_at_empty in do_readlinkat tmpfs: don't interrupt fallocate with EINTR fs: don't block i_writecount during exec ... commit b77b0bc85b117119764107f3ee76e8877bf826ab Merge: 3128ff2347302 abba7f922d8b7 Author: Rafael J. Wysocki Date: Mon Jul 15 19:20:51 2024 +0200 Merge branch 'acpi-misc' Merge a miscellaneous ACPI change for 6.11-rc1: - Add missing MODULE_DESCRIPTION() macros in two places (Jeff Johnson). * acpi-misc: ACPI: add missing MODULE_DESCRIPTION() macros commit 3128ff23473024f5a64f5ffad351591faf971286 Merge: fa0d938c2855c 83c2ec72efa29 117478c9d710d e2e7f037b400a d010a0282e045 Author: Rafael J. Wysocki Date: Mon Jul 15 19:14:48 2024 +0200 Merge branches 'acpi-processor', 'acpi-pad', 'acpi-resource' and 'acpi-video' Merge changes in the ACPI processor and ACPI PAD drivers, ACPI resources management quirks and ACPI backlight (video) driver changes for 6.11-rc1: - Downgrade Intel _OSC and _PDC messages in the ACPI processor driver to debug to reduce log noise (Mario Limonciello). - Still evaluate _OST when _PUR evaluation fails in the ACPI PAD (processor aggregator) driver as per the spec (Armin Wolf). - Skip ACPI IRQ override on Asus Vivobook Pro N6506MJ and N6506MU platforms (Tamim Khan). - Force native mode on some T2 macbooks in the ACPI backlight driver and replace strcpy() with strscpy() in it (Orlando Chamberlain, Muhammad Qasim Abdul Majeed). * acpi-processor: ACPI: processor: Downgrade Intel _OSC and _PDC messages to debug * acpi-pad: ACPI: acpi_pad: Still evaluate _OST when _PUR evaluation fails * acpi-resource: ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MU * acpi-video: ACPI: video: force native for some T2 macbooks ACPI: video: Use strscpy() instead of strcpy() commit fa0d938c2855cbf8e4521c6dd97099d6c2002522 Merge: e598dd44b381b cfff1997aafa2 face1c543e89e 79a947bd54348 Author: Rafael J. Wysocki Date: Mon Jul 15 19:08:18 2024 +0200 Merge branches 'acpi-pmic', 'acpi-battery' and 'acpi-numa' Merge ACPI PMIC driver changes, updates related to the ACPI battery and SBS drivers and NUMA-related ACPI updates for 6.11-rc1: - Clean up the ACPI PMIC driver in multiple ways (Andy Shevchenko, Christophe JAILLET). - Add support for charge limiting state to the ACPI battery driver and update _OSC to indicate support for it (Armin Wolf). - Clean up the sysfs interface in the ACPI battery, SBS (smart battery subsystem) and AC drivers (Thomas Weißschuh). - Coordinate header includes in the ACPI NUMA code and make it use ACCESS_COORDINATE_CPU when appropriate (Huang Ying, Thorsten Blum). * acpi-pmic: ACPI: PMIC: Constify struct pmic_table ACPI: PMIC: Replace open coded be16_to_cpu() ACPI: PMIC: Convert pr_*() to dev_*() printing macros ACPI: PMIC: Use sizeof() instead of hard coded value * acpi-battery: ACPI: bus: Indicate support for battery charge limiting thru _OSC ACPI: battery: Add support for charge limiting state ACPI: SBS: manage alarm sysfs attribute through psy core ACPI: battery: create alarm sysfs attribute atomically ACPI: battery: use sysfs_emit over sprintf ACPI: battery: constify powersupply properties ACPI: SBS: constify powersupply properties ACPI: AC: constify powersupply properties * acpi-numa: ACPI: NUMA: Consolidate header includes ACPI: HMAT: Use ACCESS_COORDINATE_CPU when appropriate commit 2ffd45da0b06b26f30480584de7c660d84b2d7dc Merge: 5e0497553643b 8b68788bebd3f Author: Linus Torvalds Date: Mon Jul 15 10:07:31 2024 -0700 Merge tag 'drm-fixes-2024-07-12' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Oh I screwed up last week's fixes pull, and forgot to send.. Back to work, thanks to Sima for last week, not too many fixes as expected getting close to release [ sic - Linus ], amdgpu and xe have a couple each, and then some other misc ones. amdgpu: - PSR-SU fix - Reseved VMID fix xe: - Use write-back caching mode for system memory on DGFX - Do not leak object when finalizing hdcp gsc bridge: - adv7511 EDID irq fix gma500: - NULL mode fixes. meson: - fix resource leak" * tag 'drm-fixes-2024-07-12' of https://gitlab.freedesktop.org/drm/kernel: Revert "drm/amd/display: Reset freesync config before update new state" drm/xe/display/xe_hdcp_gsc: Free arbiter on driver removal drm/xe: Use write-back caching mode for system memory on DGFX drm/amdgpu: reject gang submit on reserved VMIDs drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes drm/meson: fix canvas release in bind function drm/bridge: adv7511: Fix Intermittent EDID failures commit e598dd44b381b2ccd64e47034122663f55ae7089 Merge: 233323f9b9f82 35ba8ec0fbd0a 35c50d853adc0 dde8ec86c3fdb 86932cd8ccd4a Author: Rafael J. Wysocki Date: Mon Jul 15 19:04:15 2024 +0200 Merge branches 'acpi-x86', 'acpi-fan', 'acpi-soc' and 'acpi-cppc' Merge changes in the ACPI x86-specific code, ACPI fan driverm ACPI LPSS (Intel SoC) driver and the ACPI CPPC library for 6.11-rc1: - Switch the ACPI x86 utility code and the ACPI LPSS driver to new Intel CPU model defines (Tony Luck). - Add hwmon interface support to the ACPI fan driver (Armin Wolf). - Add sysfs entry for guaranteed performance to the ACPI CPPC library and replace a ternary operator with umax() in it (Petr Tesařík, Prabhakar Pujeri). * acpi-x86: ACPI: x86: Switch to new Intel CPU model defines * acpi-fan: ACPI: fan: Add hwmon support * acpi-soc: ACPI: LPSS: Switch to new Intel CPU model defines * acpi-cppc: ACPI: CPPC: Replace ternary operator with umax() ACPI: CPPC: add sysfs entry for guaranteed performance commit 8e64d2356cbc800b4cd0e3e614797f76bcf0cdb8 Author: Carlos López Date: Mon Jul 15 13:24:34 2024 +0200 s390/dasd: fix error checks in dasd_copy_pair_store() dasd_add_busid() can return an error via ERR_PTR() if an allocation fails. However, two callsites in dasd_copy_pair_store() do not check the result, potentially resulting in a NULL pointer dereference. Fix this by checking the result with IS_ERR() and returning the error up the stack. Fixes: a91ff09d39f9b ("s390/dasd: add copy pair setup") Signed-off-by: Carlos López Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20240715112434.2111291-3-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 1f5a33315362cb8ade2b15489c985ada0cc8623b Author: Jeff Johnson Date: Mon Jul 15 13:24:33 2024 +0200 s390/dasd: add missing MODULE_DESCRIPTION() macros With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dasd_diag_mod.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dasd_eckd_mod.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dasd_fba_mod.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20240715112434.2111291-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit a02bed4183c48d42a2855a4e70867b6239c45770 Merge: 7fae6f8b97ed5 161bd53e32483 b48b342dd5e6e Author: Rafael J. Wysocki Date: Mon Jul 15 18:55:14 2024 +0200 Merge branches 'pm-opp' and 'pm-tools' Merge OPP (operating performance points) and tooling updates for 6.11-rc1: - Fix missing cleanup on error in _opp_attach_genpd() (Viresh Kumar). - Introduce an OF helper function to inform if required-opps is used and drop a redundant in-parameter to _set_opp_level() (Ulf Hansson). - Update pm-graph to v5.12 which includes fixes and major code revamp for python3.12 (Todd Brandt). - Address several assorted issues in the cpupower utility (Roman Storozhenko). * pm-opp: OPP: Introduce an OF helper function to inform if required-opps is used OPP: Drop a redundant in-parameter to _set_opp_level() OPP: Fix missing cleanup on error in _opp_attach_genpd() * pm-tools: cpupower: fix lib default installation path cpupower: Disable direct build of the 'bench' subproject cpupower: Change the var type of the 'monitor' subcommand display mode cpupower: Remove absent 'v' parameter from monitor man page cpupower: Improve cpupower build process description cpupower: Add 'help' target to the main Makefile cpupower: Replace a dead reference link with working ones pm-graph: v5.12, code revamp for python3.12 pm-graph: v5.12, fixes commit 7fae6f8b97ed5f9d60d6af54614724cdca7dc5de Merge: a18abb873bee8 4b20b07ce72f4 e5753da31c61a Author: Rafael J. Wysocki Date: Mon Jul 15 18:53:48 2024 +0200 Merge branches 'pm-cpuidle' and 'pm-powercap' Merge cpuidle and power capping changes for 6.11-rc1: - Improve the teo cpuidle governor and clean up leftover comments from the menu cpuidle governor (Christian Loehle). - Clean up a comment typo in the teo cpuidle governor (Atul Kumar Pant). - Add missing MODULE_DESCRIPTION() macro to cpuidle haltpoll (Jeff Johnson). - Switch the intel_idle driver to new Intel CPU model defines (Tony Luck). - Switch the Intel RAPL driver new Intel CPU model defines (Tony Luck). - Simplify if condition in the idle_inject driver (Thorsten Blum). * pm-cpuidle: cpuidle: teo: Don't count non-existent intercepts cpuidle: teo: Remove recent intercepts metric Revert: "cpuidle: teo: Introduce util-awareness" cpuidle: governors: teo: Fix a typo in a comment cpuidle: haltpoll: add missing MODULE_DESCRIPTION() macro cpuidle: menu: Cleanup after loadavg removal intel_idle: Switch to new Intel CPU model defines * pm-powercap: powercap: idle_inject: Simplify if condition powercap: intel_rapl: Switch to new Intel CPU model defines powercap: intel_rapl_msr: Switch to new Intel CPU model defines commit a18abb873bee8fa48d18216009c1c5a8bde19e7f Merge: 130abfe9a1841 9dabb5b48fe5e Author: Rafael J. Wysocki Date: Mon Jul 15 18:51:35 2024 +0200 Merge branch 'pm-cpufreq' Merge cpufreq changes for 6.11-rc1: - Add Loongson-3 CPUFreq driver support (Huacai Chen). - Add support for the Arrow Lake and Lunar Lake platforms and the out-of-band (OOB) mode on Emerald Rapids to the intel_pstate cpufreq driver, make it support the highest performance change interrupt and clean it up (Srinivas Pandruvada). - Switch cpufreq to new Intel CPU model defines (Tony Luck). - Simplify the cpufreq driver interface by switching the .exit() driver callback to the void return data type (Lizhe, Viresh Kumar). - Make cpufreq_boost_enabled() return bool (Dhruva Gole). - Add fast CPPC support to the amd-pstate cpufreq driver, address multiple assorted issues in it and clean it up (Perry Yuan, Mario Limonciello, Dhananjay Ugwekar, Meng Li, Xiaojian Du). - Add Allwinner H700 speed bin to the sun50i cpufreq driver (Ryan Walklin). - Fix memory leaks and of_node_put() usage in the sun50i and qcom-nvmem cpufreq drivers (Javier Carrasco). - Clean up the sti and dt-platdev cpufreq drivers (Jeff Johnson, Raphael Gallais-Pou). - Fix deferred probe handling in the TI cpufreq driver and wrong return values of ti_opp_supply_probe(), and add OPP tables for the AM62Ax and AM62Px SoCs to it (Bryan Brattlof, Primoz Fiser). - Avoid overflow of target_freq in .fast_switch() in the SCMI cpufreq driver (Jagadeesh Kona). - Use dev_err_probe() in every error path in probe in the Mediatek cpufreq driver (Nícolas Prado). - Fix kernel-doc param for longhaul_setstate in the longhaul cpufreq driver (Yang Li). - Fix system resume handling in the CPPC cpufreq driver (Riwen Lu). * pm-cpufreq: (55 commits) cpufreq: sti: fix build warning cpufreq: mediatek: Use dev_err_probe in every error path in probe cpufreq: Add Loongson-3 CPUFreq driver support cpufreq: Make cpufreq_driver->exit() return void cpufreq/amd-pstate: Fix the scaling_max_freq setting on shared memory CPPC systems cpufreq/amd-pstate-ut: Convert nominal_freq to khz during comparisons cpufreq: pcc: Remove empty exit() callback cpufreq: loongson2: Remove empty exit() callback cpufreq: nforce2: Remove empty exit() callback cpufreq: docs: Add missing scaling_available_frequencies description cpufreq: make cpufreq_boost_enabled() return bool cpufreq: intel_pstate: Support highest performance change interrupt x86/cpufeatures: Add HWP highest perf change feature flag Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method cpufreq: amd-pstate: Cap the CPPC.max_perf to nominal_perf if CPB is off cpufreq: amd-pstate: initialize core precision boost state cpufreq: acpi: move MSR_K7_HWCR_CPB_DIS_BIT into msr-index.h cpufreq: sti: add missing MODULE_DEVICE_TABLE entry for stih418 cpufreq: intel_pstate: Replace boot_cpu_has() cpufreq: ti: update OPP table for AM62Px SoCs ... commit 5e0497553643b6c6acd16c389afb9cec210f4ea9 Merge: 1654c37ddbfce 13694f0dbc077 Author: Linus Torvalds Date: Mon Jul 15 09:39:33 2024 -0700 Merge branch 'link_path_walk' This is the last - for now - of the "look, we generated some questionable code for basic pathname lookup operations" set of branches. This is mainly just re-organizing the name hashing code in link_path_walk(), mostly by improving the calling conventions to the inlined helper functions and moving some of the code around to allow for more straightforward code generation. The profiles - and the generated code - look much more palatable to me now. * link_path_walk: vfs: link_path_walk: move more of the name hashing into hash_name() vfs: link_path_walk: improve may_lookup() code generation vfs: link_path_walk: do '.' and '..' detection while hashing vfs: link_path_walk: clarify and improve name hashing interface vfs: link_path_walk: simplify name hash flow commit 161bd53e3248358029e1cdad02ab74f0003e6b02 Merge: 4e89a5309a753 d92467ad9d9ee Author: Rafael J. Wysocki Date: Mon Jul 15 18:27:13 2024 +0200 Merge back final cpufreq fixes for 6.10. commit bb2d63500b5c8fd1ea425caffe2d44c931fefc6b Author: Jiaxun Yang Date: Sun Jul 14 10:20:50 2024 +0800 MIPS: config: Add ip30_defconfig Add ip30_defconfig derived from ip27_defconfig to ensure this target is build tested by various kernel testing projects. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 31ebd6e11f2450f20317e399b08680a80cbff484 Author: Jiaxun Yang Date: Sun Jul 14 10:20:49 2024 +0800 MIPS: config: lemote2f: Regenerate defconfig Regenerate defconfig to include some drivers that are used by this platform, including sm712fb, simplefb, rtl8187. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 10f338bd0a42140d8a18a31c89309c5a03e38fc2 Author: Jiaxun Yang Date: Sun Jul 14 10:20:48 2024 +0800 MIPS: config: generic: Add board-litex The LiteX framework provides a convenient and efficient infrastructure to create FPGA Cores/SoCs. We have implemented LiteX support for a couple of opensource MIPS CPU cores including microAptiv UP from MIPS, GS232 from Loongson, and CDIM from CQU. For this platform, devicetree is generated by litex python scripts so there is no devicetree addition necessary. Link: https://github.com/enjoy-digital/litex/pull/1990 Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 9ce4250eeed47d732015c459726fc2c32481395f Author: Jiaxun Yang Date: Sun Jul 14 10:20:47 2024 +0800 MIPS: config: Enable MSA and virtualization for MIPS64R6 All MIPS64R6 cores so far supports MSA and vz, so it makes sense to enable them in 64R6 default config. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 2326c8f2022636a1e47402ffd09a3b28f737275f Author: Jiaxun Yang Date: Sun Jul 14 10:52:57 2024 +0800 MIPS: Fix fallback march for SB1 Fallback march for SB1 should be mips64 instead of mips64r1. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407111851.LwDasTcp-lkp@intel.com/ Fixes: bfc0a330c1b4 ("MIPS: Fallback CPU -march flag to ISA level if unsupported") Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit e7afb958fa90c4c9bd1d375e5292d8ea5f8f11b5 Merge: ba7a0f4436ac7 536b97acddd70 Author: Jakub Kicinski Date: Mon Jul 15 09:14:45 2024 -0700 Merge branch 'flower-rework-tca_flower_key_enc_flags-usage' Asbjørn Sloth Tønnesen says: ==================== flower: rework TCA_FLOWER_KEY_ENC_FLAGS usage This series reworks the recently added TCA_FLOWER_KEY_ENC_FLAGS attribute, to be more like TCA_FLOWER_KEY_FLAGS, and use the unused u32 flags field in FLOW_DISSECTOR_KEY_ENC_CONTROL, instead of adding a new flags field as FLOW_DISSECTOR_KEY_ENC_FLAGS. I have defined the new FLOW_DIS_F_* and TCA_FLOWER_KEY_FLAGS_* flags to co-exist with the existing flags, so the meaning of the flags field in struct flow_dissector_key_control is not depending on the context it is used in. If we run out of bits then we can always split them up later, if we really want to. Future flags might also be valid in both contexts. iproute2 RFC v2 patch: https://lore.kernel.org/560bcd549ca8ab24b1ad5abe352580a621f6d426.1720790774.git.dcaratti@redhat.com/ v3: https://lore.kernel.org/20240709163825.1210046-1-ast@fiberby.net/ v2: https://lore.kernel.org/20240705133348.728901-1-ast@fiberby.net/ v1: https://lore.kernel.org/20240703104600.455125-1-ast@fiberby.net/ RFC: https://lore.kernel.org/20240611235355.177667-1-ast@fiberby.net/ ==================== Link: https://patch.msgid.link/20240713021911.1631517-1-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 536b97acddd702edacbe5f89c95dcd5a145b490f Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:10 2024 +0000 net/sched: cls_flower: propagate tca[TCA_OPTIONS] to NL_REQ_ATTR_CHECK NL_REQ_ATTR_CHECK() is used in fl_set_key_flags() to set extended attributes about the origin of an error, this patch propagates tca[TCA_OPTIONS] through. Before this patch: $ sudo ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/tc.yaml \ --do newtfilter --json '{ "chain": 0, "family": 0, "handle": 4, "ifindex": 22, "info": 262152, "kind": "flower", "options": { "flags": 0, "key-enc-flags": 8, "key-eth-type": 2048 }, "parent": 4294967283 }' Netlink error: Invalid argument nl_len = 68 (52) nl_flags = 0x300 nl_type = 2 error: -22 extack: {'msg': 'Missing flags mask', 'miss-type': 111} After this patch: [same cmd] Netlink error: Invalid argument nl_len = 76 (60) nl_flags = 0x300 nl_type = 2 error: -22 extack: {'msg': 'Missing flags mask', 'miss-type': 111, 'miss-nest': 56} Suggested-by: Jakub Kicinski Signed-off-by: Asbjørn Sloth Tønnesen Link: https://patch.msgid.link/20240713021911.1631517-14-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 706bf4f44c6d2ae2fdeefeb816b2c35a173ecfa4 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:09 2024 +0000 flow_dissector: set encapsulation control flags for non-IP Make sure to set encapsulated control flags also for non-IP packets, such that it's possible to allow matching on e.g. TUNNEL_OAM on a geneve packet carrying a non-IP packet. Suggested-by: Davide Caratti Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-13-ast@fiberby.net Signed-off-by: Jakub Kicinski commit db5271d50ec155abf287a27fa84e2e33a81dbd55 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:08 2024 +0000 flow_dissector: cleanup FLOW_DISSECTOR_KEY_ENC_FLAGS Now that TCA_FLOWER_KEY_ENC_FLAGS is unused, as it's former data is stored behind TCA_FLOWER_KEY_ENC_CONTROL, then remove the last bits of FLOW_DISSECTOR_KEY_ENC_FLAGS. FLOW_DISSECTOR_KEY_ENC_FLAGS is unreleased, and have been in net-next since 2024-06-04. Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-12-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 880a51a8ab8cbdeb9c2d35a5147d30b7fc0893e4 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:07 2024 +0000 doc: netlink: specs: tc: flower: add enc-flags Describe key-enc-flags and key-enc-flags-mask. These are defined similarly to key-flags and key-flags-mask. Suggested-by: Jakub Kicinski Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20240713021911.1631517-11-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 11036bd7a0b3b05c5e1f43d107ddb02abf83adb9 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:06 2024 +0000 net/sched: cls_flower: rework TCA_FLOWER_KEY_ENC_FLAGS usage This patch changes how TCA_FLOWER_KEY_ENC_FLAGS is used, so that it is used with TCA_FLOWER_KEY_FLAGS_* flags, in the same way as TCA_FLOWER_KEY_FLAGS is currently used. Where TCA_FLOWER_KEY_FLAGS uses {key,mask}->control.flags, then TCA_FLOWER_KEY_ENC_FLAGS now uses {key,mask}->enc_control.flags, therefore {key,mask}->enc_flags is now unused. As the generic fl_set_key_flags/fl_dump_key_flags() is used with encap set to true, then fl_{set,dump}_key_enc_flags() is removed. This breaks unreleased userspace API (net-next since 2024-06-04). Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-10-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 988f8723d398cf122c112342d12d67ba31cadf3b Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:05 2024 +0000 net/sched: cls_flower: add tunnel flags to fl_{set,dump}_key_flags() Prepare to set and dump the tunnel flags. This code won't see any of these flags yet, as these flags aren't allowed by the NLA_POLICY_MASK, and the functions doesn't get called with encap set to true yet. Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-9-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 03afeb613bfe6b0c28e8b843959f716a3d2c42df Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:04 2024 +0000 flow_dissector: set encapsulated control flags from tun_flags Set the new FLOW_DIS_F_TUNNEL_* encapsulated control flags, based on if their counter-part is set in tun_flags. These flags are not userspace visible yet, as the code to dump encapsulated control flags will first be added, and later activated in the following patches. Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-8-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 4d0aed380f9ddf24dfb1d06a05096b778442c403 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:03 2024 +0000 flow_dissector: prepare for encapsulated control flags Rename skb_flow_dissect_set_enc_addr_type() to skb_flow_dissect_set_enc_control(), and make it set both addr_type and flags in FLOW_DISSECTOR_KEY_ENC_CONTROL. Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-7-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 0e83a7875d691f5b76c87d9223b22e5a0d34511e Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:02 2024 +0000 net/sched: cls_flower: add policy for TCA_FLOWER_KEY_FLAGS This policy guards fl_set_key_flags() from seeing flags not used in the context of TCA_FLOWER_KEY_FLAGS. In order For the policy check to be performed with the correct endianness, then we also needs to change the attribute type to NLA_BE32 (Thanks Davide). TCA_FLOWER_KEY_FLAGS{,_MASK} already has a be32 comment in include/uapi/linux/pkt_cls.h. Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-6-ast@fiberby.net Signed-off-by: Jakub Kicinski commit fcb4bb07a9276bfb63c82ce5e8c4f8ff23646635 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:01 2024 +0000 net/sched: cls_flower: prepare fl_{set,dump}_key_flags() for ENC_FLAGS Prepare fl_set_key_flags/fl_dump_key_flags() for use with TCA_FLOWER_KEY_ENC_FLAGS{,_MASK}. This patch adds an encap argument, similar to fl_set_key_ip/ fl_dump_key_ip(), and determine the flower keys based on the encap argument, and use them in the rest of the two functions. Since these functions are so far, only called with encap set false, then there is no functional change. Signed-off-by: Asbjørn Sloth Tønnesen Tested-by: Davide Caratti Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-5-ast@fiberby.net Signed-off-by: Jakub Kicinski commit bfda5a63137bc83c344c4d995f404c8e701ff0fa Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:19:00 2024 +0000 net/sched: flower: define new tunnel flags Define new TCA_FLOWER_KEY_FLAGS_* flags for use in struct flow_dissector_key_control, covering the same flags as currently exposed through TCA_FLOWER_KEY_ENC_FLAGS. Put the new flags under FLOW_DIS_F_*. The idea is that we can later, move the existing flags under FLOW_DIS_F_* as well. The ynl flag names have been taken from the RFC iproute2 patch. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20240713021911.1631517-4-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 49ba9fc1c7736e935f7606920c5092b2bbb0d1e4 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:18:59 2024 +0000 doc: netlink: specs: tc: describe flower control flags Describe the flower control flags, and use them for key-flags and key-flags-mask. The flag names have been taken from iproute2. Suggested-by: Jakub Kicinski Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20240713021911.1631517-3-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 6e5c85c003e47fd49b72ca052b9181644e04a520 Author: Asbjørn Sloth Tønnesen Date: Sat Jul 13 02:18:58 2024 +0000 net/sched: flower: refactor control flag definitions Redefine the flower control flags as an enum, so they are included in BTF info. Make the kernel-side enum a more explicit superset of TCA_FLOWER_KEY_FLAGS_*, new flags still need to be added to both enums, but at least the bit position only has to be defined once. FLOW_DIS_ENCAPSULATION is never set for mask, so it can't be exposed to userspace in an unsupported flags mask error message, so it will be placed one bit position above the last uAPI flag. Suggested-by: Alexander Lobakin Suggested-by: Jakub Kicinski Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Davide Caratti Link: https://patch.msgid.link/20240713021911.1631517-2-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 1654c37ddbfce5d50bc2895d7ea9c5e0edcc4d77 Merge: 6a31ffdfed10d 7fd298d4b39d8 Author: Linus Torvalds Date: Mon Jul 15 09:10:31 2024 -0700 Merge branch 'arm64-uaccess' (early part) Merge arm64 support for proper 'unsafe' user accessor functionality, with 'asm goto' for handling exceptions. The arm64 user access code used the slow fallback code for the user access code, which generates horrendous code for things like strncpy_from_user(), because it causes us to generate code for SW PAN and for range checking for every individual word. Teach arm64 about 'user_access_begin()' and the so-called 'unsafe' user access functions that take an error label and use 'asm goto' to make all the exception handling be entirely out of line. [ These user access functions are called 'unsafe' not because the concept is unsafe, but because the low-level accessor functions absolutely have to be protected by the 'user_access_begin()' code, because that's what does the range checking. So the accessor functions have that scary name to make sure people don't think they are usable on their own, and cannot be mis-used the way our old "double underscore" versions of __get_user() and friends were ] The "(early part)" of the branch is because the full branch also improved on the "access_ok()" function, but the exact semantics of TBI (top byte ignore) have to be discussed before doing that part. So this just does the low-level accessor update to use "asm goto". * 'arm64-uaccess' (early part): arm64: start using 'asm goto' for put_user() arm64: start using 'asm goto' for get_user() when available commit c52090805382387f60c8e4cf8d613d0cf77ee1e9 Author: Masahiro Yamada Date: Wed Jul 3 03:02:41 2024 +0900 kbuild: deb-pkg: remove support for "name " form for DEBEMAIL Commit d5940c60e057 ("kbuild: deb-pkg improve maintainer address generation") supported the "name " form for DEBEMAIL, with behavior slightly different from devscripts. In Kbuild, if DEBEMAIL is given in the form "name ", it is used as-is, and DEBFULLNAME is ignored. In contrast, debchange takes the name from DEBFULLNAME (or NAME) if set, as described in 'man debchange': If this variable has the form "name ", then the maintainer name will also be taken from here if neither DEBFULLNAME nor NAME is set. This commit removes support for the "name form for DEBEMAIL, as the current behavior is already different from debchange, and the Debian manual suggests setting the email address and name separately in DEBEMAIL and DEBFULLNAME. [1] If there are any complaints about this removal, we can re-add it, with better alignment with the debchange implementation. [2] [1]: https://www.debian.org/doc/manuals/debmake-doc/ch03.en.html#email-setup [2]: https://salsa.debian.org/debian/devscripts/-/blob/v2.23.7/scripts/debchange.pl#L802 Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 6276761955817fd8259093a6e6a9ad88ab466b21 Author: Masahiro Yamada Date: Wed Jul 3 03:02:40 2024 +0900 kbuild: deb-pkg: remove support for EMAIL environment variable Commit edec611db047 ("kbuild, deb-pkg: improve maintainer identification") added the EMAIL and NAME environment variables. Commit d5940c60e057 ("kbuild: deb-pkg improve maintainer address generation") removed support for NAME, but kept support for EMAIL. The EMAIL and NAME environment variables are supported by some tools (see 'man debchange'), but not by all. We should support both of them, or neither of them. We should not stop halfway. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit d5afb4824f142205900aa4a3a133b5dd68720e67 Author: Masahiro Yamada Date: Thu Jun 27 03:22:04 2024 +0900 kconfig: refactor error messages in sym_check_print_recursive() Improve the error messages and clean up redundant code. [1] remove redundant next_sym->name checks If 'next_sym' is a choice, the first 'if' block is executed. In the subsequent 'else if' blocks, 'next_sym" is not a choice, hence next_sym->name is not NULL. [2] remove redundant sym->name checks A choice is never selected or implied by anyone because it has no name (it is syntactically impossible). If it is, sym->name is not NULL. [3] Show the location of choice instead of "" "part of choice " does not convey useful information. Since a choice has no name, it is more informative to display the file name and line number. Signed-off-by: Masahiro Yamada commit d67624d814ae40a655981992b0f0d652e6f591b8 Author: Masahiro Yamada Date: Thu Jun 27 03:22:03 2024 +0900 kconfig: improve error message for recursive dependency in choice Kconfig detects recursive dependencies in a choice block, but the error message is unclear. [Test Code] choice prompt "choose" depends on A config A bool "A" config B bool "B" endchoice [Result] Kconfig:1:error: recursive dependency detected! Kconfig:1: choice contains symbol A Kconfig:5: symbol A is part of choice For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" The phrase "contains symbol A" does not accurately describe the problem. The issue is that the choice depends on A, which is a member of itself. The first if-block does not print a sensible message. Remove it. This commit improves the error message to: Kconfig:1:error: recursive dependency detected! Kconfig:1: symbol symbol is visible depending on A Kconfig:5: symbol A is part of choice For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" Signed-off-by: Masahiro Yamada commit 1a7d0ea83e620fd8d7b3ced00a1c31f64cb70730 Author: Masahiro Yamada Date: Thu Jun 27 03:22:02 2024 +0900 kconfig: improve error message for dependency between choice members A choice member must not depend on another member within the same choice block. Kconfig detects this, but the error message is not sensible. [Test Code] choice prompt "choose" config A bool "A" depends on B config B bool "B" endchoice [Result] Kconfig:1:error: recursive dependency detected! Kconfig:1: choice contains symbol A Kconfig:4: symbol A is part of choice B Kconfig:8: symbol B is part of choice For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" The phrase "part of choice B" is weird because B is not a choice block, but a choice member. To determine whether the current symbol is a part of a choice block, sym_is_choice(next_sym) must be checked. This commit improves the error message to: Kconfig:1:error: recursive dependency detected! Kconfig:1: choice contains symbol A Kconfig:4: symbol A symbol is visible depending on B Kconfig:8: symbol B is part of choice For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" Signed-off-by: Masahiro Yamada commit d533828ef3cafc2178dda44851d7cd8875781d55 Author: Masahiro Yamada Date: Thu Jun 27 03:22:01 2024 +0900 kconfig: fix conditional prompt behavior for choice When a prompt is followed by "if ", the symbol is configurable when the if-conditional evaluates to true. A typical usage is as follows: menuconfig BLOCK bool "Enable the block layer" if EXPERT default y When EXPERT=n, the prompt is hidden, but this config entry is still active, and BLOCK is set to its default value 'y'. When EXPERT=y, the prompt is shown, making BLOCK a user-configurable option. This usage is common throughout the kernel tree, but it has never worked within a choice block. [Test Code] config EXPERT bool "Allow expert users to modify more options" choice prompt "Choose" if EXPERT config A bool "A" config B bool "B" endchoice [Result] # CONFIG_EXPERT is not set When the prompt is hidden, the choice block should produce the default without asking for the user's preference. Hence, the output should be: # CONFIG_EXPERT is not set CONFIG_A=y # CONFIG_B is not set Removing unnecessary hacks fixes the issue. This commit also changes the behavior of 'select' by choice members. [Test Code 2] config MODULES def_bool y modules config DEP def_tristate m if DEP choice prompt "choose" config A bool "A" select C endchoice config B def_bool y select D endif config C tristate config D tristate The current output is as follows: CONFIG_MODULES=y CONFIG_DEP=m CONFIG_A=y CONFIG_B=y CONFIG_C=y CONFIG_D=m With this commit, the output will be changed as follows: CONFIG_MODULES=y CONFIG_DEP=m CONFIG_A=y CONFIG_B=y CONFIG_C=m CONFIG_D=m CONFIG_C will be changed to 'm' because 'select C' will inherit the dependency on DEP, which is 'm'. This change is aligned with the behavior of 'select' outside a choice block; 'select D' depends on DEP, therefore D is selected by (B && DEP). Note: With this commit, allmodconfig will set CONFIG_USB_ROLE_SWITCH to 'm' instead of 'y'. I did not see any build regression with this change. Signed-off-by: Masahiro Yamada commit b9d73218d78778effd2924664ed93d78ff6949de Author: Masahiro Yamada Date: Thu Jun 27 03:22:00 2024 +0900 treewide: change conditional prompt for choices to 'depends on' While Documentation/kbuild/kconfig-language.rst provides a brief explanation, there are recurring confusions regarding the usage of a prompt followed by 'if '. This conditional controls _only_ the prompt. A typical usage is as follows: menuconfig BLOCK bool "Enable the block layer" if EXPERT default y When EXPERT=n, the prompt is hidden, but this config entry is still active, and BLOCK is set to its default value 'y'. This is reasonable because you are likely want to enable the block device support. When EXPERT=y, the prompt is shown, allowing you to toggle BLOCK. Please note that it is different from 'depends on EXPERT', which would enable and disable the entire config entry. However, this conditional prompt has never worked in a choice block. The following two work in the same way: when EXPERT is disabled, the choice block is entirely disabled. [Test Code 1] choice prompt "choose" if EXPERT config A bool "A" config B bool "B" endchoice [Test Code 2] choice prompt "choose" depends on EXPERT config A bool "A" config B bool "B" endchoice I believe the first case should hide only the prompt, producing the default: CONFIG_A=y # CONFIG_B is not set The next commit will change (fix) the behavior of the conditional prompt in choice blocks. I see several choice blocks wrongly using a conditional prompt, where 'depends on' makes more sense. To preserve the current behavior, this commit converts such misuses. I did not touch the following entry in arch/x86/Kconfig: choice prompt "Memory split" if EXPERT default VMSPLIT_3G This is truly the correct use of the conditional prompt; when EXPERT=n, this choice block should silently select the reasonable VMSPLIT_3G, although the resulting PAGE_OFFSET will not be affected anyway. Presumably, the one in fs/jffs2/Kconfig is also correct, but I converted it to 'depends on' to avoid any potential behavioral change. Signed-off-by: Masahiro Yamada commit 7c9bb07a6e9439fb7bdeee15eb188fe127a0d0e0 Author: Masahiro Yamada Date: Tue Jun 18 19:35:31 2024 +0900 kconfig: remove E_LIST expression type E_LIST was preveously used to form an expression tree consisting of choice members. It is no longer used. Signed-off-by: Masahiro Yamada commit ca4c74ba306e28cebf53908e69b773dcbb700cbc Author: Masahiro Yamada Date: Tue Jun 18 19:35:30 2024 +0900 kconfig: remove P_CHOICE property P_CHOICE is a pseudo property used to link a choice with its members. There is no more code relying on this, except for some debug code. Signed-off-by: Masahiro Yamada commit b139b43e9d47552b3f998fade184ed19e45d0c32 Author: Masahiro Yamada Date: Tue Jun 18 19:35:29 2024 +0900 kconfig: use sym_get_choice_menu() in sym_check_deps() Choices and their members are associated via the P_CHOICE property. Currently, prop_get_symbol(sym_get_choice_prop()) is used to obtain the choice of the given choice member. Replace it with sym_get_choice_menu(), which retrieves the choice without relying on P_CHOICE. Signed-off-by: Masahiro Yamada commit 609fc4099b3482ba774712376d56316c561432ff Author: Masahiro Yamada Date: Tue Jun 18 19:35:28 2024 +0900 kconfig: use sym_get_choice_menu() in sym_check_choice_deps() Choices and their members are associated via the P_CHOICE property. Currently, prop_get_symbol(sym_get_choice_prop()) is used to obtain the choice of the given choice member. Replace it with sym_get_choice_menu(), which retrieves the choice without relying on P_CHOICE. Signed-off-by: Masahiro Yamada commit d8f8bbcf4b94fefbf9e2f0d3a67b7190507afc48 Author: Masahiro Yamada Date: Tue Jun 18 19:35:27 2024 +0900 kconfig: use sym_get_choice_menu() in sym_check_print_recursive() Choices and their members are associated via the P_CHOICE property. Currently, prop_get_symbol(sym_get_choice_prop()) is used to obtain the choice of the given choice member. Replace it with sym_get_choice_menu(), which retrieves the choice without relying on P_CHOICE. Signed-off-by: Masahiro Yamada commit 8926bc901d617f21d5ebd2eda17aeea55bbecd9a Author: Masahiro Yamada Date: Tue Jun 18 19:35:26 2024 +0900 kconfig: remove expr_list_for_each_sym() macro All users of this macro have been converted. Remove it. Signed-off-by: Masahiro Yamada commit 6e6d0e917a9714297614b41fbbfde1625249e197 Author: Masahiro Yamada Date: Tue Jun 18 19:35:25 2024 +0900 kconfig: use menu_list_for_each_sym() in sym_choice_default() Choices and their members are associated via the P_CHOICE property. Currently, sym_get_choice_prop() and expr_list_for_each_sym() are used to iterate on choice members. Replace them with menu_for_each_sub_entry(), which achieves the same without relying on P_CHOICE. Signed-off-by: Masahiro Yamada commit e8fcd915e3c07a2ef90341fa307a224cfd5d865d Author: Masahiro Yamada Date: Tue Jun 18 19:35:24 2024 +0900 kconfig: change sym_choice_default() to take the choice menu Change the argument of sym_choice_default() to ease further cleanups. Signed-off-by: Masahiro Yamada commit cca318378d6dcb38acd0ba8801b34d1a9be16028 Author: Masahiro Yamada Date: Tue Jun 18 19:35:23 2024 +0900 kconfig: remove conf_unsaved in conf_read_simple() This variable is unnecessary. Call conf_set_changed(true) directly. Signed-off-by: Masahiro Yamada commit bd0db4b6ad03abb39708e3c09d9d275973052b6f Author: Masahiro Yamada Date: Tue Jun 18 19:35:22 2024 +0900 kconfig: remove sym_get_choice_value() sym_get_choice_value(menu->sym) is equivalent to sym_calc_choice(menu). Convert all call sites of sym_get_choice_value() and then remove it. Signed-off-by: Masahiro Yamada commit f79dc03fe68c79d388908182e68d702f7f1786bc Author: Masahiro Yamada Date: Tue Jun 18 19:35:21 2024 +0900 kconfig: refactor choice value calculation Handling choices has always been in a PITA in Kconfig. For example, fixes and reverts were repeated for randconfig with KCONFIG_ALLCONFIG: - 422c809f03f0 ("kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG") - 23a5dfdad22a ("Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"") - 8357b48549e1 ("kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG") - 490f16171119 ("Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"") As these commits pointed out, randconfig does not randomize choices when KCONFIG_ALLCONFIG is used. This issue still remains. [Test Case] choice prompt "choose" config A bool "A" config B bool "B" endchoice $ echo > all.config $ make KCONFIG_ALLCONFIG=1 randconfig The output is always as follows: CONFIG_A=y # CONFIG_B is not set Not only randconfig, but other all*config variants are also broken with KCONFIG_ALLCONFIG. With the same Kconfig, $ echo '# CONFIG_A is not set' > all.config $ make KCONFIG_ALLCONFIG=1 allyesconfig You will get this: CONFIG_A=y # CONFIG_B is not set This is incorrect because it does not respect all.config. The correct output should be: # CONFIG_A is not set CONFIG_B=y To handle user inputs more accurately, this commit refactors the code based on the following principles: - When a user value is given, Kconfig must set it immediately. Do not defer it by setting SYMBOL_NEED_SET_CHOICE_VALUES. - The SYMBOL_DEF_USER flag must not be cleared, unless a new config file is loaded. Kconfig must not forget user inputs. In addition, user values for choices must be managed with priority. If user inputs conflict within a choice block, the newest value wins. The values given by randconfig have lower priority than explicit user inputs. This commit implements it by using a linked list. Every time a choice block gets a new input, it is moved to the top of the list. Let me explain how it works. Let's say, we have a choice block that consists of five symbols: A, B, C, D, and E. Initially, the linked list looks like this: A(=?) --> B(=?) --> C(=?) --> D(=?) --> E(=?) Suppose randconfig is executed with the following KCONFIG_ALLCONFIG: CONFIG_C=y # CONFIG_A is not set CONFIG_D=y First, CONFIG_C=y is read. C is set to 'y' and moved to the top. C(=y) --> A(=?) --> B(=?) --> D(=?) --> E(=?) Next, '# CONFIG_A is not set' is read. A is set to 'n' and moved to the top. A(=n) --> C(=y) --> B(=?) --> D(=?) --> E(=?) Then, 'CONFIG_D=y' is read. D is set to 'y' and moved to the top. D(=y) --> A(=n) --> C(=y) --> B(=?) --> E(=?) Lastly, randconfig shuffles the order of the remaining symbols, resulting in: D(=y) --> A(=n) --> C(=y) --> B(=y) --> E(=y) or D(=y) --> A(=n) --> C(=y) --> E(=y) --> B(=y) When calculating the output, the linked list is traversed and the first visible symbol with 'y' is taken. In this case, it is D if visible. If D is hidden by 'depends on', the next node, A, is examined. Since it is already specified as 'n', it is skipped. Next, C is checked, and selected if it is visible. If C is also invisible, either B or E is chosen as a result of the randomization. If B and E are also invisible, the linked list is traversed in the reverse order, and the least prioritized 'n' symbol is chosen. It is A in this case. Now, Kconfig remembers all user values. This is a big difference from the previous implementation, where Kconfig would forget CONFIG_C=y when CONFIG_D=y appeared in the same input file. The new appaorch respects user-specified values as much as possible. Signed-off-by: Masahiro Yamada commit ee29e6204c32dce013ac6d1078d98dce5607ce86 Author: Masahiro Yamada Date: Tue Jun 18 19:35:20 2024 +0900 kconfig: import list_move(_tail) and list_for_each_entry_reverse macros Import more macros from include/linux/list.h. These will be used in the next commit. Signed-off-by: Masahiro Yamada commit 17c31aded9a1ee87e37f0ea0e3737797ef3f8c97 Author: Chen-Yu Tsai Date: Thu Jun 13 17:34:32 2024 +0800 scripts/make_fit: Support decomposing DTBs The kernel tree builds some "composite" DTBs, where the final DTB is the result of applying one or more DTB overlays on top of a base DTB with fdtoverlay. The FIT image specification already supports configurations having one base DTB and overlays applied on top. It is then up to the bootloader to apply said overlays and either use or pass on the final result. This allows the FIT image builder to reuse the same FDT images for multiple configurations, if such cases exist. The decomposition function depends on the kernel build system, reading back the .cmd files for the to-be-packaged DTB files to check for the fdtoverlay command being called. This will not work outside the kernel tree. The function is off by default to keep compatibility with possible existing users. To facilitate the decomposition and keep the code clean, the model and compatitble string extraction have been moved out of the output_dtb function. The FDT image description is replaced with the base file name of the included image. Signed-off-by: Chen-Yu Tsai Reviewed-by: Simon Glass Signed-off-by: Masahiro Yamada commit e61b190b1a273201bf8a4169fb52e54b633f5349 Author: Rafael Aquini Date: Tue Jun 11 17:11:21 2024 -0400 kbuild: rpm-pkg: make sure to have versioned 'Obsoletes' for kernel.spec Fix the following rpmbuild warning: $ make srcrpm-pkg ... RPM build warnings: line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers Signed-off-by: Rafael Aquini Tested-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 7308bf8a2c3d008f3662eaa3b4c3bbe55852d6c6 Author: Uwe Kleine-König Date: Tue Jun 11 22:59:00 2024 +0200 modpost: Enable section warning from *driver to .exit.text There used to be several offenders, but now that for all of them patches were sent and most of them were applied, enable the warning also for builds without W=1. Signed-off-by: Uwe Kleine-König Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit ae4c4cee8110a986f5a884c5d91d137e2b994303 Author: Masahiro Yamada Date: Wed Jun 12 03:24:47 2024 +0900 kbuild: move init/build-version to scripts/ At first, I thought this script would be needed only in init/Makefile. However, commit 5db8face97f8 ("kbuild: Restore .version auto-increment behaviour for Debian packages") and commit 1789fc912541 ("kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg") revealed that it was actually needed for scripts/package/mk* as well. After all, scripts/ is a better place for it. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 9b114520837a5f08b8eeeee30947bb9e7f44be1e Author: Masahiro Yamada Date: Wed Jun 12 02:55:13 2024 +0900 kconfig: remember the current choice while parsing the choice block Instead of the boolean flag, it will be more useful to remember the current choice being parsed. Signed-off-by: Masahiro Yamada commit bd988e7cb84a7f27e8ec100c5f68498b7d4fa69c Author: Masahiro Yamada Date: Wed Jun 12 02:55:12 2024 +0900 kconfig: introduce choice_set_value() helper Currently, sym_set_tristate_value() is used to set 'y' to a choice member, which is confusing because it not only sets 'y' to the given symbol but also tweaks flags of other symbols as a side effect. Add a dedicated function for setting the value of the given choice. Signed-off-by: Masahiro Yamada commit dfe8e56fc604a6000550174d1002c6076efd8003 Author: Masahiro Yamada Date: Wed Jun 12 02:55:11 2024 +0900 kconfig: add fallthrough comments to expr_compare_type() Clarify the missing 'break' is intentional. Signed-off-by: Masahiro Yamada commit cd90952101c86267193b263ed3f0753f0715700e Author: Masahiro Yamada Date: Wed Jun 12 02:55:10 2024 +0900 kconfig: remove unneeded code in expr_compare_type() The condition (t2 == 0) never becomes true because the zero value (i.e., E_NONE) is only used as a dummy type for prevtoken. It can be passed to t1, but not to t2. The caller of this function only checks expr_compare_type() > 0. Therefore, the distinction between 0 and -1 is unnecessary. Signed-off-by: Masahiro Yamada commit e570ef438fcd279514691f0aae903272d45e45e9 Author: Masahiro Yamada Date: Wed Jun 12 01:08:05 2024 +0900 kconfig: add -e and -u options to *conf-cfg.sh scripts Set -e to make these scripts fail on the first error. Set -u because these scripts are invoked by Makefile, and do not work properly without necessary variables defined. Both options are described in POSIX. [1] [1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.html Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit b1a9a5e04767e2a78783e19c9e55c25812ceccc3 Author: Masahiro Yamada Date: Mon Jun 10 20:25:18 2024 +0900 kbuild: merge temporary vmlinux for BTF and kallsyms CONFIG_DEBUG_INFO_BTF=y requires one additional link step. (.tmp_vmlinux.btf) CONFIG_KALLSYMS=y requires two additional link steps. (.tmp_vmlinux.kallsyms1 and .tmp_vmlinux.kallsyms2) Enabling both requires three additional link steps. When CONFIG_DEBUG_INFO_BTF=y and CONFIG_KALLSYMS=y, the current build process is as follows: KSYMS .tmp_vmlinux.kallsyms0.S AS .tmp_vmlinux.kallsyms0.o LD .tmp_vmlinux.btf # temporary vmlinux for BTF BTF .btf.vmlinux.bin.o LD .tmp_vmlinux.kallsyms1 # temporary vmlinux for kallsyms step 1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 # temporary vmlinux for kallsyms step 2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux # final vmlinux This is redundant because the BTF generation and the kallsyms step 1 can be performed against the same temporary vmlinux. When both CONFIG_DEBUG_INFO_BTF and CONFIG_KALLSYMS are enabled, we can reduce the number of link steps by one. This commit changes the build process as follows: KSYMS .tmp_vmlinux0.kallsyms.S AS .tmp_vmlinux0.kallsyms.o LD .tmp_vmlinux1 # temporary vmlinux for BTF and kallsyms step 1 BTF .tmp_vmlinux1.btf.o NM .tmp_vmlinux1.syms KSYMS .tmp_vmlinux1.kallsyms.S AS .tmp_vmlinux1.kallsyms.o LD .tmp_vmlinux2 # temporary vmlinux for kallsyms step 2 NM .tmp_vmlinux2.syms KSYMS .tmp_vmlinux2.kallsyms.S AS .tmp_vmlinux2.kallsyms.o LD vmlinux # final vmlinux Signed-off-by: Masahiro Yamada Acked-by: Andrii Nakryiko commit c442db3f49f27e5a60a641b2ac9a3c6320796ed6 Author: Masahiro Yamada Date: Mon Jun 10 20:25:17 2024 +0900 kbuild: remove PROVIDE() for kallsyms symbols This reimplements commit 951bcae6c5a0 ("kallsyms: Avoid weak references for kallsyms symbols") because I am not a big fan of PROVIDE(). As an alternative solution, this commit prepends one more kallsyms step. KSYMS .tmp_vmlinux.kallsyms0.S # added AS .tmp_vmlinux.kallsyms0.o # added LD .tmp_vmlinux.btf BTF .btf.vmlinux.bin.o LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux Step 0 takes /dev/null as input, and generates .tmp_vmlinux.kallsyms0.o, which has a valid kallsyms format with the empty symbol list, and can be linked to vmlinux. Since it is really small, the added compile-time cost is negligible. Signed-off-by: Masahiro Yamada Acked-by: Ard Biesheuvel Reviewed-by: Nicolas Schier commit ddf41329839f49dadf26973cd845ea160ac1784d Author: Masahiro Yamada Date: Mon Jun 10 20:25:16 2024 +0900 kbuild: refactor variables in scripts/link-vmlinux.sh Clean up the variables in scripts/link-vmlinux.sh - Specify the extra objects directly in vmlinux_link() - Move the AS rule to kallsyms() - Set kallsymso and btf_vmlinux_bin_o where they are generated - Remove unneeded variable, kallsymso_prev - Introduce the btf_data variable - Introduce the strip_debug flag instead of checking the output name No functional change intended. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 995150e4de13cee75b28265dabcd0c289b4ed3fa Author: Masahiro Yamada Date: Sun Jun 2 21:54:16 2024 +0900 kconfig: refactor conf_write_defconfig() to reduce indentation level Reduce the indentation level by continue'ing the loop earlier if (!sym || sym_is_choice(sym)). No functional change intended. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 826ee96dd4f72028b98366a21d986d35e1d781d5 Author: Masahiro Yamada Date: Sun Jun 2 21:54:15 2024 +0900 kconfig: refactor conf_set_all_new_symbols() to reduce indentation level The outer switch statement can be avoided by continue'ing earlier the loop when the symbol type is neither S_BOOLEAN nor S_TRISTATE. Remove it to reduce the indentation level by one. In addition, avoid the repetition of sym->def[S_DEF_USER].tri. No functional change intended. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit fde192511bdbff554320b31574bb8a9cb3275522 Author: Masahiro Yamada Date: Sun Jun 2 21:54:14 2024 +0900 kconfig: remove tristate choice support I previously submitted a fix for a bug in the choice feature [1], where I mentioned, "Another (much cleaner) approach would be to remove the tristate choice support entirely". There are more issues in the tristate choice feature. For example, you can observe a couple of bugs in the following test code. [Test Code] config MODULES def_bool y modules choice prompt "tristate choice" default A config A tristate "A" config B tristate "B" endchoice Bug 1: the 'default' property is not correctly processed 'make alldefconfig' produces: CONFIG_MODULES=y # CONFIG_A is not set # CONFIG_B is not set However, the correct output should be: CONFIG_MODULES=y CONFIG_A=y # CONFIG_B is not set The unit test file, scripts/kconfig/tests/choice/alldef_expected_config, is wrong as well. Bug 2: choice members never get 'y' with randconfig For the test code above, the following combinations are possible: A B (1) y n (2) n y (3) m m (4) m n (5) n m (6) n n 'make randconfig' never produces (1) or (2). These bugs are fixable, but a more critical problem is the lack of a sensible syntax to specify the default for the tristate choice. The default for the choice must be one of the choice members, which cannot specify any of the patterns (3) through (6) above. In addition, I have never seen it being used in a useful way. The following commits removed unnecessary use of tristate choices: - df8df5e4bc37 ("usb: get rid of 'choice' for legacy gadget drivers") - bfb57ef0544a ("rapidio: remove choice for enumeration") This commit removes the tristate choice support entirely, which allows me to delete a lot of code, making further refactoring easier. Note: This includes the revert of commit fa64e5f6a35e ("kconfig/symbol.c: handle choice_values that depend on 'm' symbols"). It was suspicious because it did not address the root cause but introduced inconsistency in visibility between choice members and other symbols. [1]: https://lore.kernel.org/linux-kbuild/20240427104231.2728905-1-masahiroy@kernel.org/T/#m0a1bb6992581462ceca861b409bb33cb8fd7dbae Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 03638aaa7995c07376f2e51ac2640ccd25b4ba75 Author: Masahiro Yamada Date: Sun Jun 2 03:20:43 2024 +0900 kconfig: pass new conf_changed value to the callback Commit ee06a3ef7e3c ("kconfig: Update config changed flag before calling callback") pointed out that conf_updated flag must be updated _before_ calling the callback, which needs to know the new value. Given that, it makes sense to directly pass the new value to the callback. Signed-off-by: Masahiro Yamada commit 0b62fe46d77878645d117e70b9f135d7c9fcab47 Author: Masahiro Yamada Date: Sun Jun 2 03:20:42 2024 +0900 kconfig: gconf: move conf_changed() definition up Define conf_changed() before its call site to remove the forward declaration. Signed-off-by: Masahiro Yamada commit 300bf53ecb3673bf41db5dad2afcd77b8de3a662 Author: Masahiro Yamada Date: Sun Jun 2 03:20:41 2024 +0900 kconfig: gconf: remove unnecessary forward declarations These are defined before their call sites. Signed-off-by: Masahiro Yamada commit 060e05c3b422f7ed7112e14f5039870ecdd449cc Author: Masahiro Yamada Date: Sun Jun 2 03:20:39 2024 +0900 kconfig: qconf: remove initial call to conf_changed() If any CONFIG option is changed while loading the .config file, conf_read() calls conf_set_changed(true) and then the conf_changed() callback. With conf_read() moved after window initialization, the explicit conf_changed() call can be removed. Signed-off-by: Masahiro Yamada commit fb3f7f0f156a111da7d43f6ffe52b48bac5b7159 Author: Masahiro Yamada Date: Fri May 31 21:28:25 2024 +0900 initramfs: shorten cmd_initfs in usr/Makefile Avoid repetition of long variables. No functional change intended. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit ba7a0f4436ac73850a4110acf04d65f6e8a67d82 Author: Jakub Kicinski Date: Mon Jul 15 09:05:52 2024 -0700 Revert "net: mvpp2: Improve data types and use min()" This reverts commit f7023b3d697c6a7dfe2d9c70e0d8c2c580ccbd76. Russell indicates that assuming 32bits are sufficient isn't necessarily safe. Link: https://lore.kernel.org/20240711154741.174745-1-thorsten.blum@toblux.com/ Signed-off-by: Jakub Kicinski commit 6a31ffdfed10dc48e6fd1775d50c22429382ab98 Merge: a5819099f601c f915a3e5b0182 Author: Linus Torvalds Date: Mon Jul 15 08:55:10 2024 -0700 Merge branch 'word-at-a-time' Merge minor word-at-a-time instruction choice improvements for x86 and arm64. This is the second of four branches that came out of me looking at the code generation for path lookup on arm64. The word-at-a-time infrastructure is used to do string operations in chunks of one word both when copying the pathname from user space (in strncpy_from_user()), and when parsing and hashing the individual path components (in link_path_walk()). In particular, the "find the first zero byte" uses various bit tricks to figure out the end of the string or path component, and get the length without having to do things one byte at a time. Both x86-64 and arm64 had less than optimal code choices for that. The commit message for the arm64 change in particular tries to explain the exact code flow for the zero byte finding for people who care. It's made a bit more complicated by the fact that we support big-endian hardware too, and so we have some extra abstraction layers to allow different models for finding the zero byte, quite apart from the issue of picking specialized instructions. * word-at-a-time: arm64: word-at-a-time: improve byte count calculations for LE x86-64: word-at-a-time: improve byte count calculations commit 0970bf676f86c2c4d9bf7e672f5504d390c9fce6 Author: Christophe JAILLET Date: Sun Jul 14 18:15:20 2024 +0200 llc: Constify struct llc_sap_state_trans 'struct llc_sap_state_trans' are not modified in this driver. 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 339 456 24 819 333 net/llc/llc_s_st.o After: ===== text data bss dec hex filename 683 144 0 827 33b net/llc/llc_s_st.o Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Link: https://patch.msgid.link/9d17587639195ee94b74ff06a11ef97d1833ee52.1720973710.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 70de41ef78573ce958ac04ecc2b5671851723c59 Author: Christophe JAILLET Date: Sun Jul 14 18:05:56 2024 +0200 llc: Constify struct llc_conn_state_trans 'struct llc_conn_state_trans' are not modified in this driver. 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 13923 10896 32 24851 6113 net/llc/llc_c_st.o After: ===== text data bss dec hex filename 21859 3328 0 25187 6263 net/llc/llc_c_st.o Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Link: https://patch.msgid.link/87cda89e4c9414e71d1a54bb1eb491b0e7f70375.1720973029.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit f96eb1172ed8d74cfed7da92d2045ec64028cc38 Author: Christian Eggers Date: Mon Jul 15 14:30:50 2024 +0200 dsa: lan9303: consistent naming for PHY address parameter Name it 'addr' instead of 'port' or 'phy'. Signed-off-by: Christian Eggers Link: https://patch.msgid.link/20240715123050.21202-1-ceggers@arri.de Signed-off-by: Jakub Kicinski commit 1fe1c66274fb80cc1ac42e0d38917d53adc7d7a3 Author: Maíra Canal Date: Sun Jul 14 11:49:12 2024 -0300 drm/v3d: Fix Indirect Dispatch configuration for V3D 7.1.6 and later `args->cfg[4]` is configured in Indirect Dispatch using the number of batches. Currently, for all V3D tech versions, `args->cfg[4]` equals the number of batches subtracted by 1. But, for V3D 7.1.6 and later, we must not subtract 1 from the number of batches. Implement the fix by checking the V3D tech version and revision. Fixes several `dEQP-VK.synchronization*` CTS tests related to Indirect Dispatch. Fixes: 18b8413b25b7 ("drm/v3d: Create a CPU job extension for a indirect CSD job") Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240714145243.1223131-2-mcanal@igalia.com commit 93b63f68d00a0483b450b446e2ea5386a1b94213 Author: Qingfang Deng Date: Mon May 27 17:24:04 2024 +0800 riscv: lib: relax assembly constraints in hweight rd and rs don't have to be the same. In some cases where rs needs to be saved for later usage, this will save us some mv instructions. Signed-off-by: Qingfang Deng Reviewed-by: Xiao Wang Link: https://lore.kernel.org/r/20240527092405.134967-1-dqfext@gmail.com Signed-off-by: Palmer Dabbelt commit 7c78fdbace0ff9bd2a2f1206182c054462b006af Author: Maíra Canal Date: Sun Jul 14 11:49:11 2024 -0300 drm/v3d: Add V3D tech revision to the device information The V3D tech revision can be a useful information when configuring jobs. Therefore, expose it in the `struct v3d_dev` with the V3D tech version. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240714145243.1223131-1-mcanal@igalia.com commit a5819099f601c1af5b86b1f5921a56859e45b19a Merge: 0c38364824812 94a2bc0f611cd Author: Linus Torvalds Date: Mon Jul 15 08:36:13 2024 -0700 Merge branch 'runtime-constants' Merge runtime constants infrastructure with implementations for x86 and arm64. This is one of four branches that came out of me looking at profiles of my kernel build filesystem load on my 128-core Altra arm64 system, where pathname walking and the user copies (particularly strncpy_from_user() for fetching the pathname from user space) is very hot. This is a very specialized "instruction alternatives" model where the dentry hash pointer and hash count will be constants for the lifetime of the kernel, but the allocation are not static but done early during the kernel boot. In order to avoid the pointer load and dynamic shift, we just rewrite the constants in the instructions in place. We can't use the "generic" alternative instructions infrastructure, because different architectures do it very differently, and it's actually simpler to just have very specific helpers, with a fallback to the generic ("old") model of just using variables for architectures that do not implement the runtime constant patching infrastructure. Link: https://lore.kernel.org/all/CAHk-=widPe38fUNjUOmX11ByDckaeEo9tN4Eiyke9u1SAtu9sA@mail.gmail.com/ * runtime-constants: arm64: add 'runtime constant' support runtime constants: add x86 architecture support runtime constants: add default dummy infrastructure vfs: dcache: move hashlen_hash() from callers into d_hash() commit cd9b6f4795e7002fa2fb51e6d172294e28453df3 Merge: 30b3560050486 23e88450bb04f Author: Jakub Kicinski Date: Mon Jul 15 08:27:40 2024 -0700 Merge tag 'for-net-next-2024-07-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: - qca: use the power sequencer for QCA6390 - btusb: mediatek: add ISO data transmission functions - hci_bcm4377: Add BCM4388 support - btintel: Add support for BlazarU core - btintel: Add support for Whale Peak2 - btnxpuart: Add support for AW693 A1 chipset - btnxpuart: Add support for IW615 chipset - btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591 * tag 'for-net-next-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (71 commits) Bluetooth: btmtk: Mark all stub functions as inline Bluetooth: hci_qca: Fix build error Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855 Bluetooth: hci_qca: make pwrseq calls the default if available Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device() Bluetooth: hci_qca: schedule a devm action for disabling the clock dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850 Bluetooth: btnxpuart: Fix warnings for suspend and resume functions Bluetooth: btnxpuart: Add system suspend and resume handlers Bluetooth: btnxpuart: Add support for IW615 chipset Bluetooth: btnxpuart: Add support for AW693 A1 chipset Bluetooth: btintel: Add support for Whale Peak2 Bluetooth: btintel: Add support for BlazarU core Bluetooth: btusb: mediatek: add ISO data transmission functions Bluetooth: btmtk: move btusb_recv_acl_mtk to btmtk.c Bluetooth: btmtk: move btusb_mtk_[setup, shutdown] to btmtk.c Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c Bluetooth: btusb: add callback function in btusb suspend/resume Bluetooth: btmtk: rename btmediatek_data Bluetooth: btusb: mediatek: return error for failed reg access ... ==================== Link: https://patch.msgid.link/20240715142543.303944-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 30b3560050486275c6207c8c90c0d53a7cc73ac1 Merge: 9283477e28913 2111375b85ad1 Author: Jakub Kicinski Date: Mon Jul 15 07:13:00 2024 -0700 Merge branch 'net-make-timestamping-selectable' First part of "net: Make timestamping selectable" from Kory Maincent. Change the driver-facing type already to lower rebasing pain. Link: https://lore.kernel.org/20240709-feature_ptp_netnext-v17-0-b5317f50df2a@bootlin.com/ Signed-off-by: Jakub Kicinski commit 2111375b85ad173d58e7b8604246a3de60950ac8 Author: Kory Maincent Date: Tue Jul 9 15:53:38 2024 +0200 net: Add struct kernel_ethtool_ts_info In prevision to add new UAPI for hwtstamp we will be limited to the struct ethtool_ts_info that is currently passed in fixed binary format through the ETHTOOL_GET_TS_INFO ethtool ioctl. It would be good if new kernel code already started operating on an extensible kernel variant of that structure, similar in concept to struct kernel_hwtstamp_config vs struct hwtstamp_config. Since struct ethtool_ts_info is in include/uapi/linux/ethtool.h, here we introduce the kernel-only structure in include/linux/ethtool.h. The manual copy is then made in the function called by ETHTOOL_GET_TS_INFO. Acked-by: Shannon Nelson Acked-by: Alexandra Winter Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-6-b5317f50df2a@bootlin.com Signed-off-by: Jakub Kicinski commit bc5a07ed15a3d30df3e8af2ef6bb0472f1d337f9 Author: Kory Maincent Date: Tue Jul 9 15:53:37 2024 +0200 net: net_tstamp: Add unspec field to hwtstamp_source enumeration Prepare for future support of saving hwtstamp source in PTP xarray by introducing HWTSTAMP_SOURCE_UNSPEC to hwtstamp_source enum, setting it to 0 to match old behavior of no source defined. Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-5-b5317f50df2a@bootlin.com Signed-off-by: Jakub Kicinski commit 2dd35600590148d843367c04975acad3c1a527c3 Author: Kory Maincent Date: Tue Jul 9 15:53:36 2024 +0200 net: Change the API of PHY default timestamp to MAC Change the API to select MAC default time stamping instead of the PHY. Indeed the PHY is closer to the wire therefore theoretically it has less delay than the MAC timestamping but the reality is different. Due to lower time stamping clock frequency, latency in the MDIO bus and no PHC hardware synchronization between different PHY, the PHY PTP is often less precise than the MAC. The exception is for PHY designed specially for PTP case but these devices are not very widespread. For not breaking the compatibility default_timestamp flag has been introduced in phy_device that is set by the phy driver to know we are using the old API behavior. Reviewed-by: Rahul Rameshbabu Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-4-b5317f50df2a@bootlin.com Signed-off-by: Jakub Kicinski commit 3fdd8ea39f0bcb6acff160a1fc6e331e7b21cbfc Merge: 462be1c353400 e61cc85edbbeb Author: Rafael J. Wysocki Date: Mon Jul 15 16:59:14 2024 +0200 Merge tag 'thermal-v6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux into thermal Merge thermal drivers updates for 6.11-rc1 from Daniel Lezcano: "- Group all Renesas drivers inside a dedicated sub directory and add the missing dependency to OF (Niklas Söderlund) - Add suspend/resume support on k3_j72xx_bandgap and take the opportunity to remove a unneeded delay in the init time code path (Théo Lebrun) - Fix thermal zone definition for MT8186 and MT8188 (Julien Panis) - Convert hisilicon-thermal.txt to dt-schema (Abdulrasaq Lawani) - Add the DT bindings for the X1E80100 temperature sensor (Abel Vesa) - Fix the thermal zone node name regular expression in the DT schema (Krzysztof Kozlowski) - Take into account some production platforms may not have calibration data. Deal with it with a default value instead of failing the initialization (Chen-Yu Tsai) - Fix the sensor cell size on the Exynos platform (Krzysztof Kozlowski) - Bring the common definition of '#thermal-sensor-cells' property in order to simplify the bindings on all the platforms where this change makes sense and do some minor cleanups (Krzysztof Kozlowski) - Fix a race between removal and clock disable on the broadcom driver (Krzysztof Kozlowski) - Drop 'trips' node as required from the thermal zone bindings in order to fix the remaining warnings appearing with thermal zone whithout trip points defined (Rob Herring) - Simplify all the drivers where dev_err_probe() can apply (Krzysztof Kozlowski) - Cleanup code related to stih416 as this platform is not described anywhere (Raphael Gallais-Pou)" * tag 'thermal-v6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (45 commits) thermal/drivers/sti: Cleanup code related to stih416 thermal/drivers/generic-adc: Simplify with dev_err_probe() thermal/drivers/generic-adc: Simplify probe() with local dev variable thermal/drivers/qcom-tsens: Simplify with dev_err_probe() thermal/drivers/qcom-spmi-adc-tm5: Simplify with dev_err_probe() thermal/drivers/imx: Simplify with dev_err_probe() thermal/drivers/imx: Simplify probe() with local dev variable thermal/drivers/hisi: Simplify with dev_err_probe() thermal/drivers/exynos: Simplify with dev_err_probe() thermal/drivers/exynos: Simplify probe() with local dev variable thermal/drivers/broadcom: Simplify with dev_err_probe() thermal/drivers/broadcom: Simplify probe() with local dev variable thermal/drivers/broadcom: Fix race between removal and clock disable dt-bindings: thermal: Drop 'trips' node as required dt-bindings: thermal: qoriq: reference thermal-sensor schema dt-bindings: thermal: cleanup examples indentation dt-bindings: thermal: simplify few bindings dt-bindings: thermal: ti,j72xx: reference thermal-sensor schema dt-bindings: thermal: ti,am654: reference thermal-sensor schema dt-bindings: thermal: st,stm32: reference thermal-sensor schema ... commit 49e24c80d3c81c43e2a56101449e1eea32fcf292 Author: Marek Behún Date: Mon Jul 15 13:59:12 2024 +0200 firmware: turris-mox-rwtm: Initialize completion before mailbox Initialize the completion before the mailbox channel is requested. Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Marek Behún Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann commit 8467cfe821ac3526f7598682ad5f90689fa8cc49 Author: Marek Behún Date: Mon Jul 15 13:59:11 2024 +0200 firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout() The wait_for_completion_timeout() function returns 0 if timed out, and a positive value if completed. Fix the usage of this function. Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Fixes: 2eab59cf0d20 ("firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng") Signed-off-by: Marek Behún Reviewed-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann commit 0bafb172b111ab27251af0eb684e7bde9570ce4c Author: Marek Behún Date: Mon Jul 15 13:59:10 2024 +0200 firmware: turris-mox-rwtm: Do not complete if there are no waiters Do not complete the "command done" completion if there are no waiters. This can happen if a wait_for_completion() timed out or was interrupted. Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Marek Behún Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann commit 97b10a77b150df664bb521ae217dd6bceb40d5d3 Merge: e54dc34318f62 c51cba4755609 Author: Takashi Iwai Date: Mon Jul 15 16:31:00 2024 +0200 Merge tag 'asoc-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for for v6.11 There are a lot of changes in here, though the big bulk of things is cleanups and simplifications of various kinds which are internally rather than externally visible. A good chunk of those are DT schema conversions, but there's also a lot of changes in the code. Highlights: - Syncing of features between simple-audio-card and the two audio-graph cards so there is no reason to stick with an older driver. - Support for specifying the order of operations for components within cards to allow quirking for unusual systems. - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5 and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments PCM5242. commit 7164122e25b18806f5dce68c8a0bdaa9e4f902a5 Author: Biju Das Date: Mon Jul 15 14:41:12 2024 +0100 regulator: renesas-usb-vbus-regulator: Update the default As the "rzg2l-usb-vbus-regulator" platform device is only created by drivers/reset/reset-rzg2l-usbphy-ctrl.c, update the default stricter by replacing ARCH_RZG2L->RESET_RZG2L_USBPHY_CTRL. Signed-off-by: Biju Das Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdX5ayWbLEEa6nAipECVB6H9eCpRg21pu3zYrTdiER0F+Q@mail.gmail.com/ Link: https://patch.msgid.link/20240715134120.312610-1-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown commit 23e88450bb04f6b44ce4cacbd76cd775e426a5b2 Author: Nathan Chancellor Date: Wed Jul 10 10:56:24 2024 -0700 Bluetooth: btmtk: Mark all stub functions as inline Several recent patches added static stubs to btmtk.h without the inline keyword, which causes instances of -Wunused-function when those stubs are not used anywhere in a file that includes the header: In file included from drivers/bluetooth/btusb.c:28: drivers/bluetooth/btmtk.h:254:13: warning: 'btmtk_fw_get_filename' defined but not used [-Wunused-function] 254 | static void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id, | ^~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:249:12: warning: 'btmtk_process_coredump' defined but not used [-Wunused-function] 249 | static int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:243:12: warning: 'btmtk_register_coredump' defined but not used [-Wunused-function] 243 | static int btmtk_register_coredump(struct hci_dev *hdev, const char *name, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:233:12: warning: 'btmtk_setup_firmware' defined but not used [-Wunused-function] 233 | static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname, | ^~~~~~~~~~~~~~~~~~~~ drivers/bluetooth/btmtk.h:227:12: warning: 'btmtk_setup_firmware_79xx' defined but not used [-Wunused-function] 227 | static int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname, | ^~~~~~~~~~~~~~~~~~~~~~~~~ Add inline to all the stubs in btmtk.h (even ones that do not currently have any warnings associated with them) to ensure there are never unused function warnings from these stubs, as is customary for the kernel. Signed-off-by: Nathan Chancellor Signed-off-by: Luiz Augusto von Dentz commit 84f9288208dfcd955446060a53add15b9e01af4e Author: Luiz Augusto von Dentz Date: Wed Jul 10 22:30:57 2024 -0400 Bluetooth: hci_qca: Fix build error This fixes the following build error introduced by b80f4e3b8cb8 ("Bluetooth: hci_qca: schedule a devm action for disabling the clock"): drivers/bluetooth/hci_qca.c: In function ‘qca_serdev_remove’: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement 2501 | default: | ^~~~~~~ Fixes: b80f4e3b8cb8 ("Bluetooth: hci_qca: schedule a devm action for disabling the clock") Signed-off-by: Luiz Augusto von Dentz commit 921ad2879aa7733620585e4904ba673c6c916dab Author: Bartosz Golaszewski Date: Tue Jul 9 14:18:36 2024 +0200 Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855 In preparation for using the power sequencing subsystem on sm8650 boards and X13s laptop let's make pwrseq the default for wcn7850 and wcn6855. Both these models require an enable GPIO so we can safely assume that if the property is not there, then we should try to get the power sequencer. Due to how the pwrseq lookup works - checking the provider at run-time - we cannot really do it the other way around as we'd get stuck forever on -EPROBE_DEFER. If the relevant OF node does have the 'enable-gpios' property, we fallback to the existing code for backward compatibility with older DTs. Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit eba1718717b097d825f26a33ae7d8a5b9d478396 Author: Bartosz Golaszewski Date: Tue Jul 9 14:18:35 2024 +0200 Bluetooth: hci_qca: make pwrseq calls the default if available If the device has a power sequencing handle, use it first. Otherwise fall back to whatever code already exists. Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit b8093157714fb0e1475909d744007d102efeaff1 Author: Bartosz Golaszewski Date: Tue Jul 9 14:18:34 2024 +0200 Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device() Now that all three branches of the switch end up doing the same thing, we can move the call to hci_uart_register_device() past it and unify the error message. Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit b80f4e3b8cb8a4a41cc038807cd0a1e889154902 Author: Bartosz Golaszewski Date: Tue Jul 9 14:18:33 2024 +0200 Bluetooth: hci_qca: schedule a devm action for disabling the clock In preparation for unduplicating the hci_uart registration code, schedule a devres action for disabling the SUSCLK rather than doing it manually. We cannot really use devm_clk_get_enabled() as we also set the rate before enabling the clock. While this should in theory work, I don't want to risk breaking existing users. One solution for the future is to add devm_clk_get_enabled_with_rate() to the clock framework. Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit bd3f305886adc07c27b8e998719c73688dad0991 Author: Bartosz Golaszewski Date: Tue Jul 9 14:18:32 2024 +0200 dt-bindings: bluetooth: qualcomm: describe the inputs from PMU for wcn7850 Drop the inputs from the host and instead expect the Bluetooth node to consume the outputs of the internal PMU. This model is closer to reality than how we represent it now. Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring (Arm) Signed-off-by: Luiz Augusto von Dentz commit 3aa7901e44bb2b6f6d3a14ad5a47e07ec81dcd47 Author: Neeraj Sanjay Kale Date: Wed Jul 10 18:04:26 2024 +0530 Bluetooth: btnxpuart: Fix warnings for suspend and resume functions This fixes the warnings 'nxp_serdev_resume' and 'nxp_serdev_suspend' defined but not used. Signed-off-by: Neeraj Sanjay Kale Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407100518.06Xxq5PK-lkp@intel.com/ Signed-off-by: Luiz Augusto von Dentz commit 658c56d5b3b3a41e52ea4236f5dd023cbb139ece Author: Neeraj Sanjay Kale Date: Fri Jul 5 12:28:26 2024 +0530 Bluetooth: btnxpuart: Add system suspend and resume handlers This adds handling for system suspend and resume. While the host enters suspend state, the driver will drive the chip into low power state. Similarly when system is resuming, the driver will wake up the chip. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit d4f6acfcb0b0962e2a59165108e212a976d1f078 Author: Neeraj Sanjay Kale Date: Thu Jul 4 18:50:58 2024 +0530 Bluetooth: btnxpuart: Add support for IW615 chipset This adds support for IW615 chipset with it's bootloader signature and firmware file. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit e50bfd6bb231a6e2b7221ad78dce294330238c76 Author: Kory Maincent Date: Tue Jul 9 15:53:33 2024 +0200 net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask Timestamping software or hardware flags are often used as a group, therefore adding these masks will ease future use. I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and not used at all. Reviewed-by: Willem de Bruijn Reviewed-by: Florian Fainelli Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-1-b5317f50df2a@bootlin.com Signed-off-by: Jakub Kicinski commit 358534152c59fdea7731c204d5a91151e4e91e2b Author: Neeraj Sanjay Kale Date: Thu Jul 4 18:50:57 2024 +0530 Bluetooth: btnxpuart: Add support for AW693 A1 chipset This adds support for AW693 A1 chipset with it's bootloader signature and firmware file. No firmware name change needed for AW693 A0 chipset. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit f6dc9214e526c2f735d93b5330f4dcd42a2b5308 Author: Kiran K Date: Fri Jul 5 15:59:23 2024 +0530 Bluetooth: btintel: Add support for Whale Peak2 from /sys/kernel/debug/usb/devices: T: Bus=03 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=0039 Rev= 0.00 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= 64 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: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 880120d5f12e3e9af6472f2ddddb33a6c2648418 Author: Kiran K Date: Fri Jul 5 15:59:22 2024 +0530 Bluetooth: btintel: Add support for BlazarU core Add support for BlazarU core (CNVi). Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit ceac1cb0259de682d78f5c784ef8e0b13022e9d9 Author: Chris Lu Date: Thu Jul 4 14:01:16 2024 +0800 Bluetooth: btusb: mediatek: add ISO data transmission functions This patch implements functions for ISO data send and receive in btusb driver for MediaTek's controller. MediaTek defines a specific interrupt endpoint for ISO data transmissin because the characteristics of interrupt endpoint are similar to the application of ISO data which can support guaranteed transmissin bandwidth, enough maximum data length and error checking mechanism. Driver sets up ISO interface and endpoints in btusb_mtk_setup and clears the setup in btusb_mtk_shutdown. These flow can't move to btmtk.c due to btusb_driver is only defined in btusb.c when claiming/relaesing interface. ISO packet anchor stops when driver suspending and resubmit interrupt urb for ISO data when driver resuming. Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit 6dc22ab9f085ae165e4ce89d61fb426f94e8a969 Author: Chris Lu Date: Thu Jul 4 14:01:15 2024 +0800 Bluetooth: btmtk: move btusb_recv_acl_mtk to btmtk.c Move btusb_recv_acl_mtk from btusb.c to btmtk.c which holds vendor specific stuff and would make btusb.c clean. Signed-off-by: Sean Wang Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit 5c5e8c52e3cafaa6f71efd44a42a674271e5b3ad Author: Chris Lu Date: Thu Jul 4 14:01:14 2024 +0800 Bluetooth: btmtk: move btusb_mtk_[setup, shutdown] to btmtk.c Move btusb_mtk_[setup, shutdown] and related function from btusb.c to btmtk.c which holds vendor specific stuff and would make btusb.c clean. Signed-off-by: Sean Wang Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit d019930b0049fc2648a6b279893d8ad330596e81 Author: Chris Lu Date: Thu Jul 4 14:01:13 2024 +0800 Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c Move btusb_mtk_hci_wmt_sync from btusb.c to btmtk.c which holds vendor specific stuff and would make btusb.c clean. Add usb.h header to btmtksdio.c/btmtkuart.c for usb related element defined in btmtk.h Signed-off-by: Sean Wang Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit 95f92928ad2215b5f524903e67eebd8e14f99564 Author: Chris Lu Date: Thu Jul 4 14:01:12 2024 +0800 Bluetooth: btusb: add callback function in btusb suspend/resume Add suspend/resum callback function in btusb_data which are reserved for vendor specific usage during suspend/resume. hdev->suspend will be added before stop traffic in btusb_suspend and hdev-> resume will be added after resubmit urb in btusb_resume. Signed-off-by: Chris Lu Signed-off-by: Sean Wang Signed-off-by: Luiz Augusto von Dentz commit d3e6236053958a8f1c7c7a885d9cecdd383e4615 Author: Chris Lu Date: Thu Jul 4 14:01:11 2024 +0800 Bluetooth: btmtk: rename btmediatek_data Rename btmediatek_data to have a consistent prefix throughout the driver. Signed-off-by: Sean Wang Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit 3dcb122b30643444352ff4b9aa16367dd24d7571 Author: Chris Lu Date: Thu Jul 4 14:01:10 2024 +0800 Bluetooth: btusb: mediatek: return error for failed reg access Update the code to immediately return an error code if accessing a related register fails. This ensures that our desired logic for subsequent register operations is maintained and allows us to promptly catch any unexpected errors. Signed-off-by: Sean Wang Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit be71dfb9ad2042bba713975ef50c3a5b0429f1d2 Author: Chris Lu Date: Thu Jul 4 14:01:09 2024 +0800 Bluetooth: btusb: mediatek: remove the unnecessary goto tag Remove the unnecessary goto tag whether there is an error or not, we have to free the buffer at the end of the function. Signed-off-by: Sean Wang Signed-off-by: Chris Lu Signed-off-by: Luiz Augusto von Dentz commit 936daee9cf08c5e58c9a0fe687f52adb2d80e87d Author: Luiz Augusto von Dentz Date: Mon Jul 1 17:10:41 2024 -0400 Bluetooth: Remove hci_request.{c,h} This removes hci_request.{c,h} since it shall no longer be used. Signed-off-by: Luiz Augusto von Dentz commit f2d89775358606c7ab6b6b6c4a02fe1e8cd270b1 Author: Luiz Augusto von Dentz Date: Mon Jul 1 16:52:57 2024 -0400 Bluetooth: hci_sync: Remove remaining dependencies of hci_request This removes the dependencies of hci_req_init and hci_request_cancel_all from hci_sync.c. Signed-off-by: Luiz Augusto von Dentz commit 8bedf130c265384fb136b19b20504239240c51bf Author: Luiz Augusto von Dentz Date: Mon Jul 1 16:50:30 2024 -0400 Bluetooth: hci_sync: Move handling of interleave_scan This moves handling of interleave_scan work to hci_sync.c since hci_request.c is deprecated. Signed-off-by: Luiz Augusto von Dentz commit 176cbeceb5c5a740216a6be3e751e76aaddf94b9 Author: Luiz Augusto von Dentz Date: Mon Jul 1 16:13:56 2024 -0400 Bluetooth: hci_core: Don't use hci_prepare_cmd This replaces the instance of hci_prepare_cmd with hci_cmd_sync_alloc since the former is part of hci_request.c which is considered deprecated. Signed-off-by: Luiz Augusto von Dentz commit 92048ab2e2e6cc90ad1cc9f55deb5cec4d731793 Author: Luiz Augusto von Dentz Date: Mon Jul 1 16:00:08 2024 -0400 Bluetooth: hci_core: Remove usage of hci_req_sync hci_request functions are considered deprecated so this replaces the usage of hci_req_sync with hci_inquiry_sync. Signed-off-by: Luiz Augusto von Dentz commit 88b73fdc8144de7daf1156509df4d82830f48202 Author: Rafał Miłecki Date: Fri Jun 28 07:46:35 2024 +0200 dt-bindings: net: bluetooth: convert MT7622 Bluetooth to the json-schema This helps validating DTS files. Introduced changes: 1. Dropped serial details from example 2. Added required example include Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring (Arm) Signed-off-by: Luiz Augusto von Dentz commit 87be7b189b2c50d4b51512f59e4e97db4eedee8a Author: Luiz Augusto von Dentz Date: Mon Jul 1 12:07:46 2024 -0400 Bluetooth: Fix usage of __hci_cmd_sync_status __hci_cmd_sync_status shall only be used if hci_req_sync_lock is _not_ required which is not the case of hci_dev_cmd so it needs to use hci_cmd_sync_status which uses hci_req_sync_lock internally. Fixes: f1a8f402f13f ("Bluetooth: L2CAP: Fix deadlock") Reported-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit 473a89b4ed7fd52a419340f7c540d5c8fc96fc75 Author: WangYuli Date: Sat Jun 22 12:09:59 2024 +0800 Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591 Add the support ID(0x13d3, 0x3591) to usb_device_id table for Realtek RTL8852BE. The device table is as follows: T: Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3591 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 Cc: stable@vger.kernel.org Signed-off-by: Wentao Guan Signed-off-by: WangYuli Signed-off-by: Luiz Augusto von Dentz commit 3ba74b2f288bbc17c0c2a58ab219e1df19f80153 Author: Dmitry Antipov Date: Fri Jun 21 16:01:55 2024 +0300 Bluetooth: hci_core: cleanup struct hci_dev Remove unused and set but otherwise unused 'discovery_old_state' and 'sco_last_tx' members of 'struct hci_dev'. The first one is a leftover after commit 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier"); the second one is originated from ancient 2.4.19 and I was unable to find any actual use since that. Signed-off-by: Dmitry Antipov Reviewed-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz commit 1723b550b66aebea9b8e9d6fb5f3c468adea69ce Author: Kiran K Date: Thu Jun 27 18:36:39 2024 +0530 Bluetooth: btintel: Fix the sfi name for BlazarU Use INTEL_HW_VARIANT() instead of CNVi Id to decide to load Intermediate Loader (IML) image. Fix the driver loading incorrect firmware for BlazarU product. dmesg: ..... [146.111834] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [146.111839] Bluetooth: hci0: Bootloader timestamp 2022.18 buildtype 1 build 16362 [146.111848] Bluetooth: hci0: No support for _PRR ACPI method [146.112204] Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-0291-0291-iml.sfi (-2) Fixes: 164c62f958f8 ("Bluetooth: btintel: Add firmware ID to firmware name") Reported-by: Tsigan, Vladislav Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit fb5e4713fc185f6283ba0704edccea312253e805 Author: Bartosz Golaszewski Date: Mon Jun 24 21:45:18 2024 +0200 Bluetooth: qca: don't disable power management for QCA6390 We unnecessarily fallthrough the case for QCA6390 when initializing the device and hit the condition where - due to the lack of the enable-gpio - we disable power management despite using the power sequencer. We don't need to look for clocks on this model so it makes more sense to just register the hci device and break the switch. Reported-by: Dmitry Baryshkov Fixes: 9a15ce685706 ("Bluetooth: qca: use the power sequencer for QCA6390") Signed-off-by: Bartosz Golaszewski Acked-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # RB5 Signed-off-by: Luiz Augusto von Dentz commit b96bac9607b285d4316e74fbf469df084c4f8adb Author: Krzysztof Kozlowski Date: Sun Jun 23 19:13:52 2024 +0200 Bluetooth: hci: fix build when POWER_SEQUENCING=m BT_HCIUART_QCA, which is a bool and an HCI UART component, uses now power sequencing, so we need to be sure BT_HCIUART_QCA=y and POWER_SEQUENCING=m cannot happen: /usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_serdev_probe': drivers/bluetooth/hci_qca.c:2401:(.text+0xc48): undefined reference to `devm_pwrseq_get' /usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_power_shutdown': drivers/bluetooth/hci_qca.c:2192:(.text+0x29e8): undefined reference to `pwrseq_power_off' /usr/bin/aarch64-linux-gnu-ld: drivers/bluetooth/hci_qca.o: in function `qca_power_on': drivers/bluetooth/hci_qca.c:1808:(.text+0x3390): undefined reference to `pwrseq_power_on' Fixes: 9a15ce685706 ("Bluetooth: qca: use the power sequencer for QCA6390") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit 519d849acb6523a9e9500f7a4345018fe92a131a Author: Paul Menzel Date: Fri Jun 21 09:18:57 2024 +0200 Bluetooth: btintel: Fix spelling of *intermediate* in comment Fixes: f3b845e0aea3 ("Bluetooth: btintel: Add support to download intermediate loader") Cc: Kiran K Signed-off-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz commit 9a15ce685706e73154f03341b35ff5943e46d039 Author: Bartosz Golaszewski Date: Wed Jun 12 10:01:50 2024 +0200 Bluetooth: qca: use the power sequencer for QCA6390 Use the pwrseq subsystem's consumer API to run the power-up sequence for the Bluetooth module of the QCA6390 package. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit 66ef82c66e9c462c893909b35ee4cbdfccf02bb2 Author: Bartosz Golaszewski Date: Wed Jun 12 10:01:49 2024 +0200 dt-bindings: net: bluetooth: qualcomm: describe regulators for QCA6390 QCA6390 has a compatible listed in the bindings but is missing the regulators description. Add the missing supply property and list the required ones in the allOf section. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Signed-off-by: Luiz Augusto von Dentz commit f497862d99ddbf4e46d6e26cd0f40adb724f55c9 Merge: 164c62f958f8c 2f1630f437dff Author: Luiz Augusto von Dentz Date: Mon Jul 15 10:09:20 2024 -0400 Merge tag 'pwrseq-initial-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into HEAD Initial implementation of the power sequencing subsystem for linux v6.11 commit e54dc34318f62bdeea7edefed386d47fae155618 Author: Takashi Iwai Date: Mon Jul 15 14:36:45 2024 +0200 ALSA: usb: Use BIT() for bit values Instead of the explicit "1 << x", use BIT() macro for one bit values. This will improve the readability and also avoids the possible bad value for 31bit shift. Link: https://patch.msgid.link/20240715123646.26679-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2f38cf730caedaeacdefb7ff35b0a3c1168117f9 Author: Takashi Iwai Date: Mon Jul 15 14:35:54 2024 +0200 ALSA: usb: Fix UBSAN warning in parse_audio_unit() A malformed USB descriptor may pass the lengthy mixer description with a lot of channels, and this may overflow the 32bit integer shift size, as caught by syzbot UBSAN test. Although this won't cause any real trouble, it's better to address. This patch introduces a sanity check of the number of channels to bail out the parsing when too many channels are found. Reported-by: syzbot+78d5b129a762182225aa@syzkaller.appspotmail.com Closes: https://lore.kernel.org/0000000000000adac5061d3c7355@google.com Link: https://patch.msgid.link/20240715123619.26612-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9283477e28913c1e7625c0a8d6959745e2431533 Author: Aleksander Jan Bajkowski Date: Sat Jul 13 19:09:20 2024 +0200 net: ethernet: lantiq_etop: remove redundant device name setup The same name is set when allocating the netdevice structure in the alloc_etherdev_mq()->alloc_etherrdev_mqs() function. Therefore, there is no need to manually set it. This fixes CheckPatch warnings: WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88 strcpy(dev->name, "eth%d"); Signed-off-by: Aleksander Jan Bajkowski Link: https://patch.msgid.link/20240713170920.863171-1-olek2@wp.pl Signed-off-by: Jakub Kicinski commit c49379dcda748adb8ba84d7a8eb3b02d4f1ebfcf Merge: a8ea8d531d1ed 259a7061c2f14 Author: Jakub Kicinski Date: Mon Jul 15 06:55:19 2024 -0700 Merge branch 'net-dsa-vsc73xx-implement-vlan-operations' Pawel Dembicki says: ==================== net: dsa: vsc73xx: Implement VLAN operations This patch series is a result of splitting a larger patch series [0], where some parts was merged before. The first patch implements port state configuration, which is required for bridge functionality. STP frames are not forwarded at this moment. BPDU frames are only forwarded from/to the PI/SI interface. For more information, see chapter 2.7.1 (CPU Forwarding) in the datasheet. Patches 2, 7-9 and 11 provide a basic implementation of tag_8021q functionality with QinQ support, without VLAN filtering in the bridge and simple VLAN awareness in VLAN filtering mode. Patches 3-6 came from Vladimir Oltean. They prepare for making tag8021q more common. VSC73XX uses very similar tag recognition, and some code from tag_sja1105 could be moved to tag_8021q for common use. Patch 10 is preparation for use tag_8021q bridge functions as generic implementation of the 'ds->ops->port_bridge_*()'. Patch 12 is required to avoid problem with learning on standalone ports. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=841034&state=%2A&archive=both ==================== Link: https://patch.msgid.link/20240713211620.1125910-1-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 259a7061c2f14bbf5845598f69ac63cdb77d6346 Author: Pawel Dembicki Date: Sat Jul 13 23:16:18 2024 +0200 net: dsa: vsc73xx: start treating the BR_LEARNING flag This patch implements .port_pre_bridge_flags() and .port_bridge_flags(), which are required for properly treating the BR_LEARNING flag. Also, .port_stp_state_set() is tweaked and now disables learning for standalone ports. Disabling learning for standalone ports is required to avoid situations where one port sees traffic originating from another, which could cause packet drops. Signed-off-by: Pawel Dembicki Acked-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-13-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 6dfaaa27633711ba52c418d578b3a13b0c8bfd8d Author: Pawel Dembicki Date: Sat Jul 13 23:16:17 2024 +0200 net: dsa: vsc73xx: Add bridge support This patch adds bridge support for the vsc73xx driver. The vsc73xx requires minimal operations and ithe generic dsa_tag_8021q_bridge_* API is sufficient. The forwarding matrix is managed by vsc73xx_port_stp_state_set() -> vsc73xx_refresh_fwd_map()i routine, which is called immediately after .port_bridge_join() and .port_bridge_leave(). Reviewed-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Link: https://patch.msgid.link/20240713211620.1125910-12-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 85aabd1fe9d6af4dc5d11a2d8be567ec45d1dc5e Author: Pawel Dembicki Date: Sat Jul 13 23:16:16 2024 +0200 net: dsa: prepare 'dsa_tag_8021q_bridge_join' for standalone use The 'dsa_tag_8021q_bridge_join' could be used as a generic implementation of the 'ds->ops->port_bridge_join()' function. However, it is necessary to synchronize their arguments. This patch also moves the 'tx_fwd_offload' flag configuration line into 'dsa_tag_8021q_bridge_join' body. Currently, every (sja1105) driver sets it, and the future vsc73xx implementation will also need it for simplification. Suggested-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-11-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit ce20fdd670ac375a4e3dff91c2888ad9ff9eef56 Author: Pawel Dembicki Date: Sat Jul 13 23:16:15 2024 +0200 net: dsa: Define max num of bridges in tag8021q implementation Max number of bridges in tag8021q implementation is strictly limited by VBID size: 3 bits. But zero is reserved and only 7 values can be used. This patch adds define which describe maximum possible value. Suggested-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Reviewed-by: Florian Fainelli Reviewed-by: Linus Walleij Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-10-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit e3386ec4ec9083522c36ab0ddfc638c90395c741 Author: Pawel Dembicki Date: Sat Jul 13 23:16:14 2024 +0200 net: dsa: vsc73xx: Implement the tag_8021q VLAN operations This patch is a simple implementation of 802.1q tagging in the vsc73xx driver. Currently, devices with DSA_TAG_PROTO_NONE are not functional. The VSC73XX family doesn't provide any tag support for external Ethernet ports. The only option available is VLAN-based tagging, which requires constant hardware VLAN filtering. While the VSC73XX family supports provider bridging, it only supports QinQ without full implementation of 802.1AD. This means it only allows the doubled 0x8100 TPID. In the simple port mode, QinQ is enabled to preserve forwarding of VLAN-tagged frames. Signed-off-by: Pawel Dembicki Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-9-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 6c87e1a4792804efce8ab3dfdb6e9ada314ec6dd Author: Pawel Dembicki Date: Sat Jul 13 23:16:13 2024 +0200 net: dsa: vsc73xx: introduce tag 8021q for vsc73xx This commit introduces a new tagger based on 802.1q tagging. It's designed for the vsc73xx driver. The VSC73xx family doesn't have any tag support for the RGMII port, but it could be based on VLANs. Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20240713211620.1125910-8-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit d124cf54df6fafa5ab63d3ee40d64bd54487b5cc Author: Vladimir Oltean Date: Sat Jul 13 23:16:12 2024 +0200 net: dsa: tag_sja1105: refactor skb->dev assignment to dsa_tag_8021q_find_user() A new tagging protocol implementation based on tag_8021q is on the horizon, and it appears that it also has to open-code the complicated logic of finding a source port based on a VLAN header. Create a single dsa_tag_8021q_find_user() and make sja1105 call it. Signed-off-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240713211620.1125910-7-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 823e5cc141c6408b470b8302dd8b5082636fbfaf Author: Vladimir Oltean Date: Sat Jul 13 23:16:11 2024 +0200 net: dsa: tag_sja1105: prefer precise source port info on SJA1110 too Now that dsa_8021q_rcv() handles better the case where we don't overwrite the precise source information if it comes from an external (non-tag_8021q) source, we can now unify the call sequence between sja1105_rcv() and sja1110_rcv(). This is a preparatory change for creating a higher-level wrapper for the entire sequence which will live in tag_8021q. Signed-off-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-6-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 0064b863abdc7bd5e209cdbce7619464069458fe Author: Vladimir Oltean Date: Sat Jul 13 23:16:10 2024 +0200 net: dsa: tag_sja1105: absorb entire sja1105_vlan_rcv() into dsa_8021q_rcv() tag_sja1105 has a wrapper over dsa_8021q_rcv(): sja1105_vlan_rcv(), which determines whether the packet came from a bridge with vlan_filtering=1 (the case resolved via dsa_find_designated_bridge_port_by_vid()), or if it contains a tag_8021q header. Looking at a new tagger implementation for vsc73xx, based also on tag_8021q, it is becoming clear that the logic is needed there as well. So instead of forcing each tagger to wrap around dsa_8021q_rcv(), let's merge the logic into the core. Signed-off-by: Vladimir Oltean Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Link: https://patch.msgid.link/20240713211620.1125910-5-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit dcfe7673787b4bfea2c213df443d312aa754757b Author: Vladimir Oltean Date: Sat Jul 13 23:16:09 2024 +0200 net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv() In both sja1105_rcv() and sja1110_rcv(), we may have precise source port information coming from parallel hardware mechanisms, in addition to the tag_8021q header. Only sja1105_rcv() has extra logic to not overwrite that precise info with what's present in the VLAN tag. This is because sja1110_rcv() gets by, by having a reversed set of checks when assigning skb->dev. When the source port is imprecise (vbid >=1), source_port and switch_id will be set to zeroes by dsa_8021q_rcv(), which might be problematic. But by checking for vbid >= 1 first, sja1110_rcv() fends that off. We would like to make more code common between sja1105_rcv() and sja1110_rcv(), and for that, we need to make sure that sja1110_rcv() also goes through the precise source port preservation logic. Signed-off-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-4-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 6b783ded364ad037dd526c0be5860f58a51ca084 Author: Pawel Dembicki Date: Sat Jul 13 23:16:08 2024 +0200 net: dsa: vsc73xx: Add vlan filtering This patch implements VLAN filtering for the vsc73xx driver. After starting VLAN filtering, the switch is reconfigured from QinQ to a simple VLAN aware mode. This is required because VSC73XX chips do not support inner VLAN tag filtering. Signed-off-by: Pawel Dembicki Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240713211620.1125910-3-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit 1e5b23e50ffbbca91351812d4f7b4d1b151f04b0 Author: Pawel Dembicki Date: Sat Jul 13 23:16:07 2024 +0200 net: dsa: vsc73xx: add port_stp_state_set function This isn't a fully functional implementation of 802.1D, but port_stp_state_set is required for a future tag8021q operations. This implementation handles properly all states, but vsc73xx doesn't forward STP packets. Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: Pawel Dembicki Link: https://patch.msgid.link/20240713211620.1125910-2-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski commit d60c429610a14560085d98fa6f4cdb43040ca8f0 Author: Philip Mueller Date: Mon Jul 15 11:57:49 2024 +0700 drm: panel-orientation-quirks: Add quirk for OrangePi Neo This adds a DMI orientation quirk for the OrangePi Neo Linux Gaming Handheld. Signed-off-by: Philip Mueller Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20240715045818.1019979-1-philm@manjaro.org commit 887cd308fd46a1c6956e9ccda1aaca830edc8ed7 Author: Christophe JAILLET Date: Sun Jul 14 14:15:25 2024 +0200 IB/hfi1: Constify struct flag_table 'struct flag_table' are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 302932 40271 112 343315 53d13 drivers/infiniband/hw/hfi1/chip.o After: ===== text data bss dec hex filename 311636 31567 112 343315 53d13 drivers/infiniband/hw/hfi1/chip.o Link: https://lore.kernel.org/r/782b6a648bfbbf2bb83f81a73c0460b5bb7642a1.1720959310.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Jason Gunthorpe commit b7b377332b96a38bc98928d7ec2674c77a95fcb3 Author: Jiri Slaby (SUSE) Date: Fri Jul 12 08:41:48 2024 +0200 irqdomain: Fix the kernel-doc and plug it into Documentation There were several undocumented fields in structs irq_domain_ops and irq_domain_info. Document them. irq_domain_ops::revmap_size contained "[]" in the description, which is not allowed in sphinx. Remove that. Finally, plug the whole header (irqdomain.h) into genericirq.rst, so that the docs is autogenerated and hyperlinks to these structure are created. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Thomas Gleixner Tested-by: Randy Dunlap Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20240712064148.157040-1-jirislaby@kernel.org commit c37927a203fa283950f6045602b9f71328ad786c Author: Rafael J. Wysocki Date: Thu Jul 11 12:20:04 2024 +0200 genirq: Set IRQF_COND_ONESHOT in request_irq() The callers of request_irq() don't care about IRQF_ONESHOT because they don't provide threaded handlers, but if they happen to share the IRQ with the ACPI SCI, which has a threaded handler and sets IRQF_ONESHOT, request_irq() will fail for them due to a flags mismatch. Address this by making request_irq() add IRQF_COND_ONESHOT to the flags passed to request_threaded_irq() for all of its callers. Fixes: 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") Reported-by: Stefan Seyfried Signed-off-by: Rafael J. Wysocki Signed-off-by: Thomas Gleixner Tested-by: Stefan Seyfried Cc: stable@vger.kerel.org Link: https://lore.kernel.org/r/5800834.DvuYhMxLoT@rjwysocki.net Closes: https://lore.kernel.org/lkml/205bd84a-fe8e-4963-968e-0763285f35ba@message-id.googlemail.com commit 33b1c47d1fc0b5f06a393bb915db85baacba18ea Author: Shenwei Wang Date: Wed Jul 3 11:32:50 2024 -0500 irqchip/imx-irqsteer: Handle runtime power management correctly The power domain is automatically activated from clk_prepare(). However, on certain platforms like i.MX8QM and i.MX8QXP, the power-on handling invokes sleeping functions, which triggers the 'scheduling while atomic' bug in the context switch path during device probing: BUG: scheduling while atomic: kworker/u13:1/48/0x00000002 Call trace: __schedule_bug+0x54/0x6c __schedule+0x7f0/0xa94 schedule+0x5c/0xc4 schedule_preempt_disabled+0x24/0x40 __mutex_lock.constprop.0+0x2c0/0x540 __mutex_lock_slowpath+0x14/0x20 mutex_lock+0x48/0x54 clk_prepare_lock+0x44/0xa0 clk_prepare+0x20/0x44 imx_irqsteer_resume+0x28/0xe0 pm_generic_runtime_resume+0x2c/0x44 __genpd_runtime_resume+0x30/0x80 genpd_runtime_resume+0xc8/0x2c0 __rpm_callback+0x48/0x1d8 rpm_callback+0x6c/0x78 rpm_resume+0x490/0x6b4 __pm_runtime_resume+0x50/0x94 irq_chip_pm_get+0x2c/0xa0 __irq_do_set_handler+0x178/0x24c irq_set_chained_handler_and_data+0x60/0xa4 mxc_gpio_probe+0x160/0x4b0 Cure this by implementing the irq_bus_lock/sync_unlock() interrupt chip callbacks and handle power management in them as they are invoked from non-atomic context. [ tglx: Rewrote change log, added Fixes tag ] Fixes: 0136afa08967 ("irqchip: Add driver for imx-irqsteer controller") Signed-off-by: Shenwei Wang Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240703163250.47887-1-shenwei.wang@nxp.com commit 10697eee6a6ff59207663f536dc8e8de7a4fd3e7 Author: Geert Uytterhoeven Date: Tue Jul 2 11:24:14 2024 +0200 irqchip/gic-v3: Pass #redistributor-regions to gic_of_setup_kvm_info() The caller of gic_of_setup_kvm_info() already queried DT for the value of the #redistributor-regions property. So just pass this value, instead of doing the DT look-up again in the callee. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/808286a3ac08f60585ae7e2c848e0f9b3cb79cf8.1719912215.git.geert+renesas@glider.be commit 9a58480e5e532903f08b2a34f05076d3ec3a5c00 Author: Stefan Wahren Date: Sun Jun 30 17:36:46 2024 +0200 irqchip/bcm2835: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND The BCM2835 ARMCTRL interrupt controller doesn't provide any facility to configure the wakeup sources. That's the reason why the driver lacks the irq_set_wake() callback for the interrupt chip. But this prevent to properly enter power management states like "suspend to idle". Enable the flags IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND so the interrupt suspend logic can handle the chip correctly. Signed-off-by: Stefan Wahren Signed-off-by: Thomas Gleixner Reviewed-by: Florian Fainelli commit a84a07fa3100d7ad46a3d6882af25a3df9c9e7e3 Author: Marc Zyngier Date: Fri Jul 5 10:31:55 2024 +0100 irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued In order to make sure that vpe->col_idx is correctly sampled when a VMAPP command is issued, the vpe_lock must be held for the VPE. This is now possible since the introduction of the per-VM vmapp_lock, which can be taken before vpe_lock in the correct locking order. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Nianyao Tang Link: https://lore.kernel.org/r/20240705093155.871070-4-maz@kernel.org commit f0eb154c39471bf881422e8ac23e4c037289ece9 Author: Marc Zyngier Date: Fri Jul 5 10:31:54 2024 +0100 irqchip/gic-v4: Substitute vmovp_lock for a per-VM lock vmovp_lock is abused in a number of cases to serialise updates to vlpi_count[] and deal with map/unmap of a VM to ITSs. Instead, provide a per-VM lock and revisit the use of vlpi_count[] so that it is always wrapped in this per-VM vmapp_lock. This reduces the potential contention on a concurrent VMOVP command, and paves the way for subsequent VPE locking that holding vmovp_lock actively prevents due to the lock ordering. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Nianyao Tang Link: https://lore.kernel.org/r/20240705093155.871070-3-maz@kernel.org commit 7d2c2048a86477461f7bc75d064579ed349472bc Author: Marc Zyngier Date: Fri Jul 5 10:31:53 2024 +0100 irqchip/gic-v4: Always configure affinity on VPE activation There are currently two paths to set the initial affinity of a VPE: - at activation time on GICv4 without the stupid VMOVP list, and on GICv4.1 - at map time for GICv4 with VMOVP list The latter location may end-up modifying the affinity of VPE that is currently running, making the results unpredictible. Instead, unify the two paths, making sure to set the initial affinity only at activation time. Reported-by: Nianyao Tang Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Nianyao Tang Link: https://lore.kernel.org/r/20240705093155.871070-2-maz@kernel.org commit a8ea8d531d1edf7b29e559713fe1aaab3530d7d9 Author: MD Danish Anwar Date: Fri Jul 12 17:36:36 2024 +0530 net: ti: icssg-prueth: Split out common object into module icssg_prueth.c and icssg_prueth_sr1.c drivers use multiple common .c files. These common objects are getting added to multiple modules. As a result when both drivers are enabled in .config, below warning is seen. drivers/net/ethernet/ti/Makefile: icssg/icssg_common.o is added to multiple modules: icssg-prueth icssg-prueth-sr1 drivers/net/ethernet/ti/Makefile: icssg/icssg_classifier.o is added to multiple modules: icssg-prueth icssg-prueth-sr1 drivers/net/ethernet/ti/Makefile: icssg/icssg_config.o is added to multiple modules: icssg-prueth icssg-prueth-sr1 drivers/net/ethernet/ti/Makefile: icssg/icssg_mii_cfg.o is added to multiple modules: icssg-prueth icssg-prueth-sr1 drivers/net/ethernet/ti/Makefile: icssg/icssg_stats.o is added to multiple modules: icssg-prueth icssg-prueth-sr1 drivers/net/ethernet/ti/Makefile: icssg/icssg_ethtool.o is added to multiple modules: icssg-prueth icssg-prueth-sr1 Fix this by building a new module (icssg.o) for all the common objects. Both the driver can then depend on this common module. Some APIs being exported have emac_ as the prefix which may result into confusion with other existing APIs with emac_ prefix, to avoid confusion, rename the APIs being exported with emac_ to icssg_ prefix. This also fixes below error seen when both drivers are built. ERROR: modpost: "icssg_queue_pop" [drivers/net/ethernet/ti/icssg-prueth-sr1.ko] undefined! ERROR: modpost: "icssg_queue_push" [drivers/net/ethernet/ti/icssg-prueth-sr1.ko] undefined! Reported-and-tested-by: Thorsten Leemhuis Closes: https://lore.kernel.org/oe-kbuild-all/202405182038.ncf1mL7Z-lkp@intel.com/ Fixes: 487f7323f39a ("net: ti: icssg-prueth: Add helper functions to configure FDB") Reviewed-by: Roger Quadros Signed-off-by: MD Danish Anwar Reviewed-by: Sai Krishna Signed-off-by: David S. Miller commit 136a8066676e593cd29627219467fc222c8f3b04 Author: Jason Gunthorpe Date: Thu Jul 11 21:11:03 2024 -0300 iommufd: Put constants for all the uAPI enums Relying on position in the enum makes it subtly harder when doing merge resolutions or backporting as it is easy to grab a patch and not notice it is a uAPI change with a differently ordered enum. This may become a bigger problem in next cycles when iommu_hwpt_invalidate_data_type and other per-driver enums have patches flowing through different trees. So lets start including constants for all the uAPI enums to make this safer. No functional change. Link: https://lore.kernel.org/r/0-v1-2c06ec044924+133-iommufd_uapi_const_jgg@nvidia.com Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Tested-by: Yi Liu Signed-off-by: Jason Gunthorpe commit 89fc548767a2155231128cb98726d6d2ea1256c9 Author: Sungjong Seo Date: Fri May 31 19:14:44 2024 +0900 exfat: fix potential deadlock on __exfat_get_dentry_set When accessing a file with more entries than ES_MAX_ENTRY_NUM, the bh-array is allocated in __exfat_get_entry_set. The problem is that the bh-array is allocated with GFP_KERNEL. It does not make sense. In the following cases, a deadlock for sbi->s_lock between the two processes may occur. CPU0 CPU1 ---- ---- kswapd balance_pgdat lock(fs_reclaim) exfat_iterate lock(&sbi->s_lock) exfat_readdir exfat_get_uniname_from_ext_entry exfat_get_dentry_set __exfat_get_dentry_set kmalloc_array ... lock(fs_reclaim) ... evict exfat_evict_inode lock(&sbi->s_lock) To fix this, let's allocate bh-array with GFP_NOFS. Fixes: a3ff29a95fde ("exfat: support dynamic allocate bh for exfat_entry_set_cache") Cc: stable@vger.kernel.org # v6.2+ Reported-by: syzbot+412a392a2cd4a65e71db@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/000000000000fef47e0618c0327f@google.com Signed-off-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 224821766f4355cfa63f825660f5922e670d6fc6 Author: Michael Jeanson Date: Wed May 22 21:10:07 2024 -0400 exfat: handle idmapped mounts Pass the idmapped mount information to the different helper functions. Adapt the uid/gid checks in exfat_setattr to use the vfsuid/vfsgid helpers. Based on the fat implementation in commit 4b7899368108 ("fat: handle idmapped mounts") by Christian Brauner. Signed-off-by: Michael Jeanson Reviewed-by: Christian Brauner Signed-off-by: Namjae Jeon commit 0a1868b93fad5938dbcca77286b25bf211c49f7a Author: Elliot Ayrey Date: Fri Jul 12 13:31:33 2024 +1200 net: bridge: mst: Check vlan state for egress decision If a port is blocking in the common instance but forwarding in an MST instance, traffic egressing the bridge will be dropped because the state of the common instance is overriding that of the MST instance. Fix this by skipping the port state check in MST mode to allow checking the vlan state via br_allowed_egress(). This is similar to what happens in br_handle_frame_finish() when checking ingress traffic, which was introduced in the change below. Fixes: ec7328b59176 ("net: bridge: mst: Multiple Spanning Tree (MST) mode") Signed-off-by: Elliot Ayrey Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit dead06c5e110c25931bafc8cf017e3077b871ac5 Author: Dmitry Torokhov Date: Fri Jul 12 20:34:51 2024 -0700 ARM: pxa: fix build breakage on PXA3xx Commit 917195d6f829 ("ARM: pxa: consolidate GPIO chip platform data") tried to reuse the same instance of platform data for PXA25x and PXA27x GPIO controllers by moving it into arch/arm/mach-pxa/devices.c Unfortunately this file is built for other PXA variants which resulted in the following error: >> arm-linux-gnueabi-ld: arch/arm/mach-pxa/devices.o:(.data+0x167c): undefined reference to `gpio_set_wake' Fix this by using #ifdef around PXA25x and PXA27x GPIO controller device structures and associated data. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407112039.cyyIQ3Js-lkp@intel.com/ Fixes: 917195d6f829 ("ARM: pxa: consolidate GPIO chip platform data") Signed-off-by: Dmitry Torokhov Signed-off-by: Arnd Bergmann commit 6bad1bef26ca2b3fd6412c6e2ac943ae6f45351c Author: Conor Dooley Date: Mon Jul 15 12:21:48 2024 +0100 MAINTAINERS: drop riscv list from cache controllers When adding the bindings for cache controllers to the MAINTAINERS entry, I forgot to drop the riscv mailing list - and so completely unrelated to riscv stuff is now being sent there. Drop it. Fixes: 4ca47d8bcca0 ("MAINTAINERS: add cache binding directory to cache driver entry") Signed-off-by: Conor Dooley Signed-off-by: Arnd Bergmann commit 250b8b86b683e6b52b58514bff94146a47d3251f Merge: 97d9fba9a812c 59a931c5b732c Author: David S. Miller Date: Mon Jul 15 12:43:46 2024 +0100 Merge branch 'main' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net into main Steffen Klassert says: ==================== 1) Fix esp_output_tail_tcp() on unsupported ESPINTCP. From Hagar Hemdan. 2) Fix two bugs in the recently introduced SA direction separation. From Antony Antony. 3) Fix unregister netdevice hang on hardware offload. We had to add another list where skbs linked to that are unlinked from the lists (deleted) but not yet freed. 4) Fix netdev reference count imbalance in xfrm_state_find. From Jianbo Liu. 5) Call xfrm_dev_policy_delete when killingi them on offloaded policies. Jianbo Liu. ==================== Signed-off-by: David S. Miller commit e61cc85edbbeb71e53fbf049dc9ec763bc274479 Author: Raphael Gallais-Pou Date: Mon Jul 8 18:18:40 2024 +0200 thermal/drivers/sti: Cleanup code related to stih416 "st,stih416-mpe-thermal" compatible seems to appear nowhere in the device-tree nor in the documentation. Remove compatible and related code. Signed-off-by: Raphael Gallais-Pou Link: https://lore.kernel.org/r/20240708161840.102004-1-rgallaispou@gmail.com Signed-off-by: Daniel Lezcano commit d5c38eec5d58d5d017bb8c73b4387943d080c32f Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:42 2024 +0200 thermal/drivers/generic-adc: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-12-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit f637bfe26c23c8e4a38076da286f6a0de1291323 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:41 2024 +0200 thermal/drivers/generic-adc: Simplify probe() with local dev variable Simplify the probe() function by using local 'dev' instead of &pdev->dev. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-11-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit bc55630c657a7f81e65b6993e8113f453cdcef4b Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:40 2024 +0200 thermal/drivers/qcom-tsens: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-10-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit ecfee9176b8fd68178a9682fc7285054266012ef Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:39 2024 +0200 thermal/drivers/qcom-spmi-adc-tm5: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-9-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit d0b297e76b5cb06bd67577dc1b710cc13e4f4300 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:38 2024 +0200 thermal/drivers/imx: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-8-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit e9ac90242b83dde46406723bc00d1616e3083431 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:37 2024 +0200 thermal/drivers/imx: Simplify probe() with local dev variable Simplify the probe() function by using local 'dev' instead of &pdev->dev. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-7-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit 3e1a0680bbeddd30f1df23bffa00b906714f6da0 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:36 2024 +0200 thermal/drivers/hisi: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-6-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit ca6176693f86cbff58c5eda82a2617bd9143cafb Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:35 2024 +0200 thermal/drivers/exynos: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-5-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit 4a6cf76edf5c8cda4def7b1578836a88b547ff69 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:34 2024 +0200 thermal/drivers/exynos: Simplify probe() with local dev variable Simplify the probe() function by using local 'dev' instead of &pdev->dev. While touching devm_kzalloc(), use preferred sizeof(*) syntax. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-4-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit 9d55cb3ba36e218839ca04c55e977ab6faac1707 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:33 2024 +0200 thermal/drivers/broadcom: Simplify with dev_err_probe() Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-3-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit fd972a17451f9cd4f6c99415b5a9dcf856d93433 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:32 2024 +0200 thermal/drivers/broadcom: Simplify probe() with local dev variable Simplify the probe() function by using local 'dev' instead of &pdev->dev. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-2-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit e90c369cc2ffcf7145a46448de101f715a1f5584 Author: Krzysztof Kozlowski Date: Tue Jul 9 14:59:31 2024 +0200 thermal/drivers/broadcom: Fix race between removal and clock disable During the probe, driver enables clocks necessary to access registers (in get_temp()) and then registers thermal zone with managed-resources (devm) interface. Removal of device is not done in reversed order, because: 1. Clock will be disabled in driver remove() callback - thermal zone is still registered and accessible to users, 2. devm interface will unregister thermal zone. This leaves short window between (1) and (2) for accessing the get_temp() callback with disabled clock. Fix this by enabling clock also via devm-interface, so entire cleanup path will be in proper, reversed order. Fixes: 8454c8c09c77 ("thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-1-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano commit 6f48290b1a18dba5870920188725eee6fe603ee6 Author: Rob Herring (Arm) Date: Tue Jul 9 09:01:53 2024 -0600 dt-bindings: thermal: Drop 'trips' node as required It is possible to have thermal zones which don't have any trip points. These zones in effect simply represent a temperature sensor without any action associated with it. While the schema has always required a 'trips' node, users have existed for a long time without it. Update the schema to match reality. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709150154.3272825-1-robh@kernel.org Signed-off-by: Daniel Lezcano commit fd1f85b2e7a6cdf84fb590fe17c7664b202cb9bb Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:31 2024 +0200 dt-bindings: thermal: qoriq: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-12-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit f062dc5ccaf2cdca9b1d9282ddae1cdb77b9d902 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:41 2024 +0200 dt-bindings: thermal: cleanup examples indentation Preferred indentation for DTS examples in the bindings is 4-space. It is also preferred not to have redundant/unused labels. No functional change Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-22-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit bbb4c179397c0af1ff403b2f13fff4753874bf7d Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:40 2024 +0200 dt-bindings: thermal: simplify few bindings Simplify few bindings which already reference thermal-sensor.yaml schema by dropping unneeded requiring of '#thermal-sensor-cells' and dropping assigned-clocks properties (core schema allows it if 'clocks' are there). Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-21-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit a985dceccd82850b93d392ae9c4d5748f40c3e2a Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:39 2024 +0200 dt-bindings: thermal: ti,j72xx: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-20-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 323a6134e7d0f146e7185167025c2b1c7993f5b2 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:38 2024 +0200 dt-bindings: thermal: ti,am654: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-19-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 17cdc4717dabe9a84fe81bcd310ea8035fca475a Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:37 2024 +0200 dt-bindings: thermal: st,stm32: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-18-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit f9b2d6b840d50d23086b9638dee7e622f3db6638 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:36 2024 +0200 dt-bindings: thermal: sprd: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Baolin Wang Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-17-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 28b317510582fad1d1a64775250e57a886826897 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:35 2024 +0200 dt-bindings: thermal: socionext,uniphier: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-16-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit bf1163bb009885e89eda82bb48b0e638c2860a28 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:34 2024 +0200 dt-bindings: thermal: rzg2l: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Biju Das Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-15-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 9abcf4ac35908ee6db36354e4545cc88600b56b3 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:33 2024 +0200 dt-bindings: thermal: rockchip: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Heiko Stuebner Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-14-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 7410853a1d0065572b5097f114e210870bd2f0cb Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:32 2024 +0200 dt-bindings: thermal: rcar-gen3: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Niklas Söderlund Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-13-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 80c3fda5de2cf5ff0680626da70da0f9a8eac351 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:30 2024 +0200 dt-bindings: thermal: qcom-tsens: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Dmitry Baryshkov Reviewed-by: Amit Kucheria Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-11-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit c1bca276d8100b141a1244e8e357b0bbfbc2bed3 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:29 2024 +0200 dt-bindings: thermal: qcom-spmi-adc-tm5: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Dmitry Baryshkov Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-10-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit df300226f6f630daf96be0a82f3f61f2cf2898dd Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:28 2024 +0200 dt-bindings: thermal: qcom-spmi-adc-tm-hc: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Dmitry Baryshkov Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-9-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit b760aeec3d2b50d8680f4b52d851de7dd4fa8127 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:27 2024 +0200 dt-bindings: thermal: nvidia,tegra30-tsensor: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-8-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit b6f4d62c53e6e2eb4560a5a20315bee2adfe7b6d Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:26 2024 +0200 dt-bindings: thermal: nvidia,tegra186-bpmp: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-7-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 57fa7d668770780932acf83c2dcf4e15741efd1a Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:25 2024 +0200 dt-bindings: thermal: imx8mm: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-6-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 2410427cc87bf843e6871730f18b10dcbb91e992 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:24 2024 +0200 dt-bindings: thermal: generic-adc: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-5-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit 0ae2a1a6146f1ae6936919deb3150a24d1bdc118 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:23 2024 +0200 dt-bindings: thermal: brcm,avs-ro: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Acked-by: Florian Fainelli Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-4-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit e8eca74902eba1df568eda0b1b88781439a58bd8 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:22 2024 +0200 dt-bindings: thermal: allwinner,sun8i-a83t-ths: reference thermal-sensor schema Device is a thermal sensor and it requires '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it and bring the common definition of '#thermal-sensor-cells' property. Reviewed-by: Vasily Khoruzhick Acked-by: Chen-Yu Tsai Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-3-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit da1f72fbe7a8b562a0cb0a9b771347c78ef4a612 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:21 2024 +0200 dt-bindings: thermal: amlogic: reference thermal-sensor schema Device is a thermal sensor and all in-tree DTS provide '#thermal-sensor-cells', so reference the thermal-sensor.yaml to simplify it, bring the common definition of '#thermal-sensor-cells' property and require it. Reviewed-by: Neil Armstrong Reviewed-by: Guillaume LA ROQUE Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-2-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit f5a890927ec47c11427ed1f11192a9b4a7be3d34 Author: Krzysztof Kozlowski Date: Fri Jul 5 11:51:20 2024 +0200 dt-bindings: thermal: samsung,exynos: specify cells All Samsung Exynos SoCs Thermal Management Units have only one sensor, so make '#thermal-sensor-cells' fixed at 0. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240705-dt-bindings-thermal-allof-v1-1-554061b52fbc@linaro.org Signed-off-by: Daniel Lezcano commit a5d4afb92eca216b27f662d77e91f2d464345c6e Author: Chen-Yu Tsai Date: Thu Jun 20 17:23:03 2024 +0800 thermal/drivers/mediatek/lvts_thermal: Provide default calibration data On some pre-production hardware, the SoCs do not contain calibration data for the thermal sensors. The downstream drivers provide default values that sort of work, instead of having the thermal sensors not work at all. Port the default values to the upstream driver. These values are from the ChromeOS kernels, which sadly do not cover the MT7988. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240620092306.2352606-1-wenst@chromium.org Signed-off-by: Daniel Lezcano commit 97e32381d0fc6c2602a767b0c46e15eb2b75971d Author: Krzysztof Kozlowski Date: Tue Jul 2 16:52:48 2024 +0200 dt-bindings: thermal: correct thermal zone node name limit Linux kernel uses thermal zone node name during registering thermal zones and has a hard-coded limit of 20 characters, including terminating NUL byte. The bindings expect node names to finish with '-thermal' which is eight bytes long, thus we have only 11 characters for the reset of the node name (thus 10 for the pattern after leading fixed character). Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_JsqKogbT_4DPd1n94xqeHaU_J8ve5K09WOyVsRX3jxxUW3w@mail.gmail.com/ Fixes: 1202a442a31f ("dt-bindings: thermal: Add yaml bindings for thermal zones") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240702145248.47184-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano commit b18ce693a26526603e104d95ce91040fd73e98a7 Author: Abel Vesa Date: Fri Jun 28 11:31:01 2024 +0300 dt-bindings: thermal: qcom-tsens: Document the X1E80100 Temperature Sensor Document the Temperature Sensor (TSENS) on the X1E80100 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Abel Vesa Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20240628-x1e80100-bindings-thermal-qcom-tsens-v2-1-4843d4c2ba24@linaro.org Signed-off-by: Daniel Lezcano commit bb6972fad98fbe6555653e762e5b31ff352a9e73 Author: Abdulrasaq Lawani Date: Tue Jun 18 22:31:35 2024 -0400 dt-bindings: thermal: convert hisilicon-thermal.txt to dt-schema Convert the hisilicon SoCs tsensor txt bindings to dt-schema Signed-off-by: Abdulrasaq Lawani Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240618-hisilicon-thermal-dt-bindings-conversion-v4-1-7eba97fbe6d0@gmail.com Signed-off-by: Daniel Lezcano commit be3e224ec502d49cf9017304286c14418b230fe6 Author: Julien Panis Date: Mon Jun 3 12:50:49 2024 +0200 dt-bindings: thermal: mediatek: Fix thermal zone definitions for MT8188 Fix thermal zone names for consistency with the other SoCs: - GPU0 must be used as the first GPU item. - SOCx deal with audio DSP, video, and infra subsystems. The naming must be fixed "atomically" so compilation does not break. As a result, the change is made in the dt-bindings and in the LVTS driver within a single commit, despite the checkpatch warning. The definitions can be safely modified here because they are used only in the LVTS driver, which is modified accordingly, and have not yet been included in a released kernel. Fixes: 78c88534e5e1 ("dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8188") Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Julien Panis Link: https://lore.kernel.org/r/20240603-mtk-thermal-mt818x-dtsi-v7-2-8c8e3c7a3643@baylibre.com Signed-off-by: Daniel Lezcano commit 6b04928e83f298d99359f3ba67187a328c223357 Author: Julien Panis Date: Mon Jun 3 12:50:48 2024 +0200 dt-bindings: thermal: mediatek: Fix thermal zone definition for MT8186 Fix a thermal zone name for consistency with the other SoCs: MFG contains GPU, the latter is more specific and must be used here. The naming must be fixed "atomically" so compilation does not break. As a result, the change is made in the dt-bindings and in the LVTS driver within a single commit, despite the checkpatch warning. The definition can be safely modified here because it is used only in the LVTS driver, which is modified accordingly, and has not yet been included in a released kernel. Fixes: a2ca202350f9 ("dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8186") Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Julien Panis Link: https://lore.kernel.org/r/20240603-mtk-thermal-mt818x-dtsi-v7-1-8c8e3c7a3643@baylibre.com Signed-off-by: Daniel Lezcano commit 854a8e208c26b60708785d4ef8d5cf8ee014335a Author: Théo Lebrun Date: Thu Apr 25 17:32:38 2024 +0200 thermal/drivers/k3_j72xx_bandgap: Implement suspend/resume support This add suspend-to-ram support. The derived_table is kept-as is, so the resume is only about pm_runtime_* calls and restoring the same registers as the probe. Extract the hardware initialization procedure to a function called at both probe-time & resume-time. The probe-time loop is split in two to ensure doing the hardware initialization before registering thermal zones. That ensures our callbacks cannot be called while in bad state. The 100ms delay in the hardware initialization sequence was removed. It was initially added to be sure the thresholds are programmed before enabling the interrupt, but in fact it's not needed (tested on J7200 platform). Signed-off-by: Théo Lebrun Acked-by: Keerthy Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240425153238.498750-1-thomas.richard@bootlin.com Signed-off-by: Daniel Lezcano commit f996e2b17a30c2919ed018d3902d1e633ae40ab2 Author: Niklas Söderlund Date: Mon May 6 17:40:11 2024 +0200 thermal/drivers/renesas/rcar: Add dependency on OF The R-Car thermal driver depends on OF, describe this. Signed-off-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20240506154011.344324-3-niklas.soderlund+renesas@ragnatech.se commit 9d617949d49099d549175979e6454ce64461eaa2 Author: Niklas Söderlund Date: Mon May 6 17:40:10 2024 +0200 thermal/drivers/renesas: Group all renesas thermal drivers together Move all Renesas thermal drivers to a vendor specific directory. All drivers are moved verbatim apart from the updated include path for thermal_hwmon.h. Signed-off-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20240506154011.344324-2-niklas.soderlund+renesas@ragnatech.se commit 76be2f9823b10c07daf814cb6c732eb1456a0b9e Author: Stanislav Jakubek Date: Wed Jul 3 14:02:46 2024 +0200 dt-bindings: timer: sprd-timer: convert to YAML Convert the Spreadtrum SC9860 timer bindings to DT schema. Changes during conversion: - rename file to match compatible - add sprd,sc9860-suspend-timer which was previously undocumented - minor grammar fix in description Signed-off-by: Stanislav Jakubek Reviewed-by: Conor Dooley Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/ZoU95lBgoyF/8Md3@standask-GA-A55M-S2HP Signed-off-by: Rob Herring (Arm) commit 03a9b67087ba071f69b12d730b36aa7c2d3dbf21 Merge: f4c0cd1870afd 3afa157f43b36 Author: Borislav Petkov (AMD) Date: Mon Jul 15 11:59:10 2024 +0200 Merge remote-tracking branches 'ras/edac-amd-atl' and 'ras/edac-misc' into edac-updates * ras/edac-amd-atl: RAS/AMD/FMPM: Use atl internal.h for INVALID_SPA RAS/AMD/ATL: Implement DF 4.5 NP2 denormalization RAS/AMD/ATL: Validate address map when information is gathered RAS/AMD/ATL: Expand helpers for adding and removing base and hole RAS/AMD/ATL: Read DRAM hole base early RAS/AMD/ATL: Add amd_atl pr_fmt() prefix RAS/AMD/ATL: Add a missing module description * ras/edac-misc: EDAC: Add missing MODULE_DESCRIPTION() macros EDAC/dmc520: Use devm_platform_ioremap_resource() EDAC/igen6: Add Intel Arrow Lake-U/H SoCs support EDAC, i10nm: make skx_common.o a separate module EDAC/skx: Switch to new Intel CPU model defines EDAC/sb_edac: Switch to new Intel CPU model defines EDAC, pnd2: Switch to new Intel CPU model defines EDAC/i10nm: Switch to new Intel CPU model defines EDAC/ghes: Add missing newline to pr_info() statement RAS/AMD/ATL: Add missing newline to pr_info() statement EDAC/thunderx: Remove unused struct error_syndrome Signed-off-by: Borislav Petkov (AMD) commit 7c25946f345838c3d66e54dd808ec5183640a75a Author: Gergo Koteles Date: Tue Jul 9 11:33:05 2024 +0200 platform/x86: ideapad-laptop: use cleanup.h Use cleanup.h helpers to simplify some code paths. Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/851d4180f1df5a10ca6e2feaf429611f1c0ccc88.1720515666.git.soyer@irl.hu Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f6bd2f633b686cdd6a466a4d8484fb74492b1125 Author: Alexis Belmonte Date: Fri Jul 12 19:26:47 2024 +0200 platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function Fix ill-formed implementation of the platform_profile_omen_get function introduced by the commit d23430233494 ("platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops"). platform_profile_omen_get() is .profile_get function that should set *profile and return 0 on success. Reported-by: Dan Carpenter Fixes: d23430233494 ("platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops") Signed-off-by: Alexis Belmonte Reviewed-by: Armin Wolf Link: https://lore.kernel.org/r/ZpFnV8w1558BW7iZ@alexis-pc Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 436381eaf2a423e60fc8340399f7d2458091b383 Merge: a52c6330ff2fe d73778e4b8675 Author: Vlastimil Babka Date: Mon Jul 15 10:44:16 2024 +0200 Merge branch 'slab/for-6.11/buckets' into slab/for-next Merge all the slab patches previously collected on top of v6.10-rc1, over cleanups/fixes that had to be based on rc6. commit a52c6330ff2fe1163333fa6609bdc6e8763ec286 Author: Alex Shi (Tencent) Date: Fri Jul 12 12:14:35 2024 +0800 mm/memcg: alignment memcg_data define condition commit 21c690a349ba ("mm: introduce slabobj_ext to support slab object extensions") changed the folio/page->memcg_data define condition from MEMCG to SLAB_OBJ_EXT. This action make memcg_data exposed while !MEMCG. As Vlastimil Babka suggested, let's add _unused_slab_obj_exts for SLAB_MATCH for slab.obj_exts while !MEMCG. That could resolve the match issue, clean up the feature logical. Signed-off-by: Alex Shi (Tencent) Cc: Randy Dunlap Cc: Yoann Congal Cc: Masahiro Yamada Cc: Petr Mladek Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Vlastimil Babka commit 5fa87a081b2d633b944d5a93f5767623ef2a961d Merge: 8fc1e8b230771 d2eb433c85463 Author: Takashi Iwai Date: Mon Jul 15 08:17:55 2024 +0200 Merge branch 'for-next' into for-linus Pull 6.11 devel branch Signed-off-by: Takashi Iwai commit ed46f1f7731d2cd77d623c0f895df9e23c0bffb6 Author: Arnd Bergmann Date: Mon Jul 15 08:02:30 2024 +0200 platform: cznic: turris-omnia-mcu: fix Kconfig dependencies The newly added driver causes a Kconfig warning: WARNING: unmet direct dependencies detected for RTC_CLASS Depends on [n]: !S390 [=y] Selected by [m]: - TURRIS_OMNIA_MCU [=m] && CZNIC_PLATFORMS [=y] && (MACH_ARMADA_38X || COMPILE_TEST [=y]) && I2C [=m] && OF [=y] && WATCHDOG [=y] The problem here is that it selects entire subsystems, which normal device drivers should not do. Changes all of these to 'depends on' instead. Fixes: dfa556e45ae9e ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs") Fixes: 90e700fd12b61 ("platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup") Fixes: ab89fb5fb92c7 ("platform: cznic: turris-omnia-mcu: Add support for MCU watchdog") Fixes: 41bb142a40289 ("platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG") Reported-by: Nathan Chancellor Signed-off-by: Arnd Bergmann commit 3e301b431b91e4b973dbc520e90e220acb5b91f5 Author: Jiri Olsa Date: Fri Jul 12 15:52:28 2024 +0200 selftests/bpf: Change uretprobe syscall number in uprobe_syscall test Fixing the syscall number value. Link: https://lore.kernel.org/all/20240712135228.1619332-3-jolsa@kernel.org/ Fixes: 9e7f74e64ae5 ("selftests/bpf: Add uretprobe syscall call from user space test") Signed-off-by: Jiri Olsa Acked-by: Andrii Nakryiko Signed-off-by: Masami Hiramatsu (Google) commit 63ded110979bdd8741542ec66fb9e2d2074aed8c Author: Jiri Olsa Date: Fri Jul 12 15:52:27 2024 +0200 uprobe: Change uretprobe syscall scope and number After discussing with Arnd [1] it's preferable to change uretprobe syscall number to 467 to omit the merge conflict with xattrat syscalls. Also changing the ABI to 'common' which will ease up the global scripts/syscall.tbl management. One consequence is we generate uretprobe syscall numbers for ABIs that do not support uretprobe syscall, but the syscall still returns -ENOSYS when called in that ABI. [1] https://lore.kernel.org/lkml/784a34e5-4654-44c9-9c07-f9f4ffd952a0@app.fastmail.com/ Link: https://lore.kernel.org/all/20240712135228.1619332-2-jolsa@kernel.org/ Fixes: 190fec72df4a ("uprobe: Wire up uretprobe system call") Suggested-by: Arnd Bergmann Signed-off-by: Jiri Olsa Acked-by: Andrii Nakryiko Signed-off-by: Masami Hiramatsu (Google) commit 58629d4871e8eb2c385b16a73a8451669db59f39 Author: Lai Jiangshan Date: Wed Jul 3 17:27:41 2024 +0800 workqueue: Always queue work items to the newest PWQ for order workqueues To ensure non-reentrancy, __queue_work() attempts to enqueue a work item to the pool of the currently executing worker. This is not only unnecessary for an ordered workqueue, where order inherently suggests non-reentrancy, but it could also disrupt the sequence if the item is not enqueued on the newest PWQ. Just queue it to the newest PWQ and let order management guarantees non-reentrancy. Signed-off-by: Lai Jiangshan Fixes: 4c065dbce1e8 ("workqueue: Enable unbound cpumask update on ordered workqueues") Cc: stable@vger.kernel.org # v6.9+ Signed-off-by: Tejun Heo (cherry picked from commit 74347be3edfd11277799242766edf844c43dd5d3) commit 9283ff5be1510a35356656a6c1efe14f765c936a Merge: 226c49446bcce 57b56d16800e8 Author: Tejun Heo Date: Sun Jul 14 18:04:03 2024 -1000 Merge branch 'for-6.10-fixes' into for-6.11 commit 59a931c5b732ca5fc2ca727f5a72aeabaafa85ec Author: Taehee Yoo Date: Fri Jul 12 09:51:16 2024 +0000 xdp: fix invalid wait context of page_pool_destroy() If the driver uses a page pool, it creates a page pool with page_pool_create(). The reference count of page pool is 1 as default. A page pool will be destroyed only when a reference count reaches 0. page_pool_destroy() is used to destroy page pool, it decreases a reference count. When a page pool is destroyed, ->disconnect() is called, which is mem_allocator_disconnect(). This function internally acquires mutex_lock(). If the driver uses XDP, it registers a memory model with xdp_rxq_info_reg_mem_model(). The xdp_rxq_info_reg_mem_model() internally increases a page pool reference count if a memory model is a page pool. Now the reference count is 2. To destroy a page pool, the driver should call both page_pool_destroy() and xdp_unreg_mem_model(). The xdp_unreg_mem_model() internally calls page_pool_destroy(). Only page_pool_destroy() decreases a reference count. If a driver calls page_pool_destroy() then xdp_unreg_mem_model(), we will face an invalid wait context warning. Because xdp_unreg_mem_model() calls page_pool_destroy() with rcu_read_lock(). The page_pool_destroy() internally acquires mutex_lock(). Splat looks like: ============================= [ BUG: Invalid wait context ] 6.10.0-rc6+ #4 Tainted: G W ----------------------------- ethtool/1806 is trying to lock: ffffffff90387b90 (mem_id_lock){+.+.}-{4:4}, at: mem_allocator_disconnect+0x73/0x150 other info that might help us debug this: context-{5:5} 3 locks held by ethtool/1806: stack backtrace: CPU: 0 PID: 1806 Comm: ethtool Tainted: G W 6.10.0-rc6+ #4 f916f41f172891c800f2fed Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 Call Trace: dump_stack_lvl+0x7e/0xc0 __lock_acquire+0x1681/0x4de0 ? _printk+0x64/0xe0 ? __pfx_mark_lock.part.0+0x10/0x10 ? __pfx___lock_acquire+0x10/0x10 lock_acquire+0x1b3/0x580 ? mem_allocator_disconnect+0x73/0x150 ? __wake_up_klogd.part.0+0x16/0xc0 ? __pfx_lock_acquire+0x10/0x10 ? dump_stack_lvl+0x91/0xc0 __mutex_lock+0x15c/0x1690 ? mem_allocator_disconnect+0x73/0x150 ? __pfx_prb_read_valid+0x10/0x10 ? mem_allocator_disconnect+0x73/0x150 ? __pfx_llist_add_batch+0x10/0x10 ? console_unlock+0x193/0x1b0 ? lockdep_hardirqs_on+0xbe/0x140 ? __pfx___mutex_lock+0x10/0x10 ? tick_nohz_tick_stopped+0x16/0x90 ? __irq_work_queue_local+0x1e5/0x330 ? irq_work_queue+0x39/0x50 ? __wake_up_klogd.part.0+0x79/0xc0 ? mem_allocator_disconnect+0x73/0x150 mem_allocator_disconnect+0x73/0x150 ? __pfx_mem_allocator_disconnect+0x10/0x10 ? mark_held_locks+0xa5/0xf0 ? rcu_is_watching+0x11/0xb0 page_pool_release+0x36e/0x6d0 page_pool_destroy+0xd7/0x440 xdp_unreg_mem_model+0x1a7/0x2a0 ? __pfx_xdp_unreg_mem_model+0x10/0x10 ? kfree+0x125/0x370 ? bnxt_free_ring.isra.0+0x2eb/0x500 ? bnxt_free_mem+0x5ac/0x2500 xdp_rxq_info_unreg+0x4a/0xd0 bnxt_free_mem+0x1356/0x2500 bnxt_close_nic+0xf0/0x3b0 ? __pfx_bnxt_close_nic+0x10/0x10 ? ethnl_parse_bit+0x2c6/0x6d0 ? __pfx___nla_validate_parse+0x10/0x10 ? __pfx_ethnl_parse_bit+0x10/0x10 bnxt_set_features+0x2a8/0x3e0 __netdev_update_features+0x4dc/0x1370 ? ethnl_parse_bitset+0x4ff/0x750 ? __pfx_ethnl_parse_bitset+0x10/0x10 ? __pfx___netdev_update_features+0x10/0x10 ? mark_held_locks+0xa5/0xf0 ? _raw_spin_unlock_irqrestore+0x42/0x70 ? __pm_runtime_resume+0x7d/0x110 ethnl_set_features+0x32d/0xa20 To fix this problem, it uses rhashtable_lookup_fast() instead of rhashtable_lookup() with rcu_read_lock(). Using xa without rcu_read_lock() here is safe. xa is freed by __xdp_mem_allocator_rcu_free() and this is called by call_rcu() of mem_xa_remove(). The mem_xa_remove() is called by page_pool_destroy() if a reference count reaches 0. The xa is already protected by the reference count mechanism well in the control plane. So removing rcu_read_lock() for page_pool_destroy() is safe. Fixes: c3f812cea0d7 ("page_pool: do not release pool until inflight == 0.") Signed-off-by: Taehee Yoo Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20240712095116.3801586-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit f8321fa75102246d7415a6af441872f6637c93ab Author: Breno Leitao Date: Fri Jul 12 04:53:25 2024 -0700 virtio_net: Fix napi_skb_cache_put warning After the commit bdacf3e34945 ("net: Use nested-BH locking for napi_alloc_cache.") was merged, the following warning began to appear: WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 napi_skb_cache_put+0x82/0x4b0 __warn+0x12f/0x340 napi_skb_cache_put+0x82/0x4b0 napi_skb_cache_put+0x82/0x4b0 report_bug+0x165/0x370 handle_bug+0x3d/0x80 exc_invalid_op+0x1a/0x50 asm_exc_invalid_op+0x1a/0x20 __free_old_xmit+0x1c8/0x510 napi_skb_cache_put+0x82/0x4b0 __free_old_xmit+0x1c8/0x510 __free_old_xmit+0x1c8/0x510 __pfx___free_old_xmit+0x10/0x10 The issue arises because virtio is assuming it's running in NAPI context even when it's not, such as in the netpoll case. To resolve this, modify virtnet_poll_tx() to only set NAPI when budget is available. Same for virtnet_poll_cleantx(), which always assumed that it was in a NAPI context. Fixes: df133f3f9625 ("virtio_net: bulk free tx skbs") Suggested-by: Jakub Kicinski Signed-off-by: Breno Leitao Reviewed-by: Jakub Kicinski Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Heng Qi Link: https://patch.msgid.link/20240712115325.54175-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 217b953a8ca6af14dc81935d7ab4b3815966bb62 Merge: d944c27a9d581 03ab6c244bb0c Author: Jakub Kicinski Date: Sun Jul 14 20:38:38 2024 -0700 Merge branch 'net-phy-bcm5481x-add-support-for-broadr-reach-mode' Kamil Horák says: ==================== net: phy: bcm5481x: add support for BroadR-Reach mode PATCH 1 - Add the 10baseT1BRR_Full link mode PATCH 2 - Add the definitions of LRE registers, necessary to use BroadR-Reach modes on the BCM5481x PHY PATCH 3 - Add brr-mode flag to switch between IEEE802.3 and BroadR-Reach PATCH 4 - Implementation of the BroadR-Reach modes for the Broadcom PHYs ==================== Link: https://patch.msgid.link/20240712150709.3134474-1-kamilh@axis.com Signed-off-by: Jakub Kicinski commit 03ab6c244bb0ced0a67b86399a282987740bb116 Author: Kamil Horák (2N) Date: Fri Jul 12 17:07:09 2024 +0200 net: phy: bcm-phy-lib: Implement BroadR-Reach link modes Implement single-pair BroadR-Reach modes on bcm5481x PHY by Broadcom. Create set of functions alternative to IEEE 802.3 to handle configuration of these modes on compatible Broadcom PHYs. There is only subset of capabilities supported because of limited collection of hardware available for the development. For BroadR-Reach capable PHYs, the LRE (Long Reach Ethernet) alternative register set is handled. Only bcm54811 PHY is verified, for bcm54810, there is some support possible but untested. There is no auto-negotiation of the link parameters (called LDS in the Broadcom terminology, Long-Distance Signaling) for bcm54811. It should be possible to enable LDS for bcm54810. Signed-off-by: Kamil Horák (2N) Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240712150709.3134474-5-kamilh@axis.com Signed-off-by: Jakub Kicinski commit 775631d7845b34996ceb0d975725c16d9a414430 Author: Kamil Horák (2N) Date: Fri Jul 12 17:07:08 2024 +0200 dt-bindings: ethernet-phy: add optional brr-mode flag There is a group of PHY chips supporting BroadR-Reach link modes in a manner allowing for more or less identical register usage as standard Clause 22 PHY. These chips support standard Ethernet link modes as well, however, the circuitry is mutually exclusive and cannot be auto-detected. The link modes in question are 100Base-T1 as defined in IEEE802.3bw, based on Broadcom's 1BR-100 link mode, and newly defined 10Base-T1BRR (1BR-10 in Broadcom documents). Add optional brr-mode flag to switch the PHY to BroadR-Reach mode. Signed-off-by: Kamil Horák (2N) Reviewed-by: Rob Herring (Arm) Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240712150709.3134474-4-kamilh@axis.com Signed-off-by: Jakub Kicinski commit ff253875ff3bab75214c4e94352956dc02a0d965 Author: Kamil Horák (2N) Date: Fri Jul 12 17:07:07 2024 +0200 net: phy: bcm54811: Add LRE registers definitions Add the definitions of LRE registers for Broadcom BCM5481x PHY Signed-off-by: Kamil Horák (2N) Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20240712150709.3134474-3-kamilh@axis.com Signed-off-by: Jakub Kicinski commit 2c1583290b08c5aa9005178a573be8f329de2976 Author: Kamil Horák (2N) Date: Fri Jul 12 17:07:06 2024 +0200 net: phy: bcm54811: New link mode for BroadR-Reach Introduce a new link mode necessary for 10 MBit single-pair connection in BroadR-Reach mode on bcm5481x PHY by Broadcom. This new link mode, 10baseT1BRR, is known as 1BR10 in the Broadcom terminology. Another link mode to be used is 1BR100 and it is already present as 100baseT1, because Broadcom's 1BR100 became 100baseT1 (IEEE 802.3bw). Signed-off-by: Kamil Horák (2N) Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240712150709.3134474-2-kamilh@axis.com Signed-off-by: Jakub Kicinski commit d944c27a9d58179b2fd96e23104f213481ec1e8d Merge: e6c29506b2ec9 99c861b44eb1f Author: Jakub Kicinski Date: Sun Jul 14 20:32:41 2024 -0700 Merge branch 'virtio-net-support-af_xdp-zero-copy' Xuan Zhuo says: ==================== virtio-net: support AF_XDP zero copy v5: http://lore.kernel.org/all/20240611114147.31320-1-xuanzhuo@linux.alibaba.com XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero copy feature of xsk (XDP socket) needs to be supported by the driver. The performance of zero copy is very good. mlx5 and intel ixgbe already support this feature, This patch set allows virtio-net to support xsk's zerocopy xmit feature. At present, we have completed some preparation: 1. vq-reset (virtio spec and kernel code) 2. virtio-core premapped dma 3. virtio-net xdp refactor So it is time for Virtio-Net to complete the support for the XDP Socket Zerocopy. Virtio-net can not increase the queue num at will, so xsk shares the queue with kernel. On the other hand, Virtio-Net does not support generate interrupt from driver manually, so when we wakeup tx xmit, we used some tips. If the CPU run by TX NAPI last time is other CPUs, use IPI to wake up NAPI on the remote CPU. If it is also the local CPU, then we wake up napi directly. This patch set includes some refactor to the virtio-net to let that to support AF_XDP. Because there are too many commits, the work of virtio net supporting af-xdp is split to rx part and tx part. This patch set is for rx part. So the flag NETDEV_XDP_ACT_XSK_ZEROCOPY is not added, if someone want to test for af-xdp rx, the flag needs to be adding locally. ENV: Qemu with vhost-user(polling mode). Host CPU: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz testpmd> show port stats all ######################## NIC statistics for port 0 ######################## RX-packets: 19531092064 RX-missed: 0 RX-bytes: 1093741155584 RX-errors: 0 RX-nombuf: 0 TX-packets: 5959955552 TX-errors: 0 TX-bytes: 371030645664 Throughput (since last show) Rx-pps: 8861574 Rx-bps: 3969985208 Tx-pps: 8861493 Tx-bps: 3969962736 ############################################################################ testpmd> show port stats all ######################## NIC statistics for port 0 ######################## RX-packets: 68152727 RX-missed: 0 RX-bytes: 3816552712 RX-errors: 0 RX-nombuf: 0 TX-packets: 68114967 TX-errors: 33216 TX-bytes: 3814438152 Throughput (since last show) Rx-pps: 6333196 Rx-bps: 2837272088 Tx-pps: 6333227 Tx-bps: 2837285936 ############################################################################ But AF_XDP consumes more CPU for tx and rx napi(100% and 86%). ==================== Link: https://patch.msgid.link/20240708112537.96291-1-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 99c861b44eb1fb9dfe8776854116a6a9064c19bb Author: Xuan Zhuo Date: Mon Jul 8 19:25:37 2024 +0800 virtio_net: xsk: rx: support recv merge mode Support AF-XDP for merge mode. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-11-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit a4e7ba7027012f009f22a68bcfde670f9298d3a4 Author: Xuan Zhuo Date: Mon Jul 8 19:25:36 2024 +0800 virtio_net: xsk: rx: support recv small mode In the process: 1. We may need to copy data to create skb for XDP_PASS. 2. We may need to call xsk_buff_free() to release the buffer. 3. The handle for xdp_buff is difference from the buffer. If we pushed this logic into existing receive handle(merge and small), we would have to maintain code scattered inside merge and small (and big). So I think it is a good choice for us to put the xsk code into an independent function. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-10-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit e9f3962441c0a4d6f16c656e6c8aa02a3ccdd568 Author: Xuan Zhuo Date: Mon Jul 8 19:25:35 2024 +0800 virtio_net: xsk: rx: support fill with xsk buffer Implement the logic of filling rq with XSK buffers. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-9-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 19a5a7710ee1c60e491e326f9107666435f94044 Author: Xuan Zhuo Date: Mon Jul 8 19:25:34 2024 +0800 virtio_net: xsk: support wakeup xsk wakeup is used to trigger the logic for xsk xmit by xsk framework or user. Virtio-net does not support to actively generate an interruption, so it tries to trigger tx NAPI on the local cpu. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-8-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 09d2b3182c8e3a215a9b2a1834f81dd07305989f Author: Xuan Zhuo Date: Mon Jul 8 19:25:33 2024 +0800 virtio_net: xsk: bind/unbind xsk for rx This patch implement the logic of bind/unbind xsk pool to rq. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-7-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 5db481059d79e304596881af0bd195a4418f987a Author: Xuan Zhuo Date: Mon Jul 8 19:25:32 2024 +0800 virtio_net: separate receive_mergeable This commit separates the function receive_mergeable(), put the logic of appending frag to the skb as an independent function. The subsequent commit will reuse it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-6-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit c86c120fde29dc659a50540f749b6033f7267a62 Author: Xuan Zhuo Date: Mon Jul 8 19:25:31 2024 +0800 virtio_net: separate receive_buf This commit separates the function receive_buf(), then we wrap the logic of handling the skb to an independent function virtnet_receive_done(). The subsequent commit will reuse it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-5-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 391aa2aad0229d0f34aed6270c5266a0754893a2 Author: Xuan Zhuo Date: Mon Jul 8 19:25:30 2024 +0800 virtio_net: separate virtnet_tx_resize() This patch separates two sub-functions from virtnet_tx_resize(): * virtnet_tx_pause * virtnet_tx_resume Then the subsequent virtnet_tx_reset() can share these two functions. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-4-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 47879b7322fa0d53c54970099a0ec0aee1d281e2 Author: Xuan Zhuo Date: Mon Jul 8 19:25:29 2024 +0800 virtio_net: separate virtnet_rx_resize() This patch separates two sub-functions from virtnet_rx_resize(): * virtnet_rx_pause * virtnet_rx_resume Then the subsequent reset rx for xsk can share these two functions. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-3-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 41d4a174201e62fc95562dc8e53097baf8568f24 Author: Xuan Zhuo Date: Mon Jul 8 19:25:28 2024 +0800 virtio_net: replace VIRTIO_XDP_HEADROOM by XDP_PACKET_HEADROOM virtio net has VIRTIO_XDP_HEADROOM that is equal to XDP_PACKET_HEADROOM to calculate the headroom for xdp. But here we should use the macro XDP_PACKET_HEADROOM from bpf.h to calculate the headroom for xdp. So here we remove the VIRTIO_XDP_HEADROOM, and use the XDP_PACKET_HEADROOM to replace it. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20240708112537.96291-2-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 79eecf631c14e7f4057186570ac20e2cfac3802e Author: Chengen Du Date: Sat Jul 13 19:47:35 2024 +0800 af_packet: Handle outgoing VLAN packets without hardware offloading The issue initially stems from libpcap. The ethertype will be overwritten as the VLAN TPID if the network interface lacks hardware VLAN offloading. In the outbound packet path, if hardware VLAN offloading is unavailable, the VLAN tag is inserted into the payload but then cleared from the sk_buff struct. Consequently, this can lead to a false negative when checking for the presence of a VLAN tag, causing the packet sniffing outcome to lack VLAN tag information (i.e., TCI-TPID). As a result, the packet capturing tool may be unable to parse packets as expected. The TCI-TPID is missing because the prb_fill_vlan_info() function does not modify the tp_vlan_tci/tp_vlan_tpid values, as the information is in the payload and not in the sk_buff struct. The skb_vlan_tag_present() function only checks vlan_all in the sk_buff struct. In cooked mode, the L2 header is stripped, preventing the packet capturing tool from determining the correct TCI-TPID value. Additionally, the protocol in SLL is incorrect, which means the packet capturing tool cannot parse the L3 header correctly. Link: https://github.com/the-tcpdump-group/libpcap/issues/1105 Link: https://lore.kernel.org/netdev/20240520070348.26725-1-chengen.du@canonical.com/T/#u Fixes: 393e52e33c6c ("packet: deliver VLAN TCI to userspace") Cc: stable@vger.kernel.org Signed-off-by: Chengen Du Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240713114735.62360-1-chengen.du@canonical.com Signed-off-by: Jakub Kicinski commit e6c29506b2ec94e634819c03445ffe9eb350caed Merge: 62fdd1708fcb3 782fe08e9861d Author: Jakub Kicinski Date: Sun Jul 14 20:26:18 2024 -0700 Merge branch 'eliminate-config_nr_cpus-dependency-in-dpaa-eth-and-enable-compile_test-in-fsl_qbman' Vladimir Oltean says: ==================== Eliminate CONFIG_NR_CPUS dependency in dpaa-eth and enable COMPILE_TEST in fsl_qbman Breno's previous attempt at enabling COMPILE_TEST for the fsl_qbman driver (now included here as patch 5/5) triggered compilation warnings for large CONFIG_NR_CPUS values: https://lore.kernel.org/all/202406261920.l5pzM1rj-lkp@intel.com/ Patch 1/5 switches two NR_CPUS arrays in the dpaa-eth driver to dynamic allocation to avoid that warning. There is more NR_CPUS usage in the fsl-qbman driver, but that looks relatively harmless and I couldn't find a good reason to change it. I noticed, while testing, that the driver doesn't actually work properly with high CONFIG_NR_CPUS values, and patch 2/5 addresses that. During code analysis, I have identified two places which treat conditions that can never happen. Patches 3/5 and 4/5 simplify the probing code - dpaa_fq_setup() - just a little bit. Finally we have at 5/5 the patch that triggered all of this. There is an okay from Herbert to take it via netdev, despite it being on soc/qbman: https://lore.kernel.org/all/Zns%2FeVVBc7pdv0yM@gondor.apana.org.au/ Link to v1: https://lore.kernel.org/netdev/20240710230025.46487-1-vladimir.oltean@nxp.com/ ==================== Link: https://patch.msgid.link/20240713225336.1746343-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 782fe08e9861d00ce8aca370453dd9ceb9a23d50 Author: Breno Leitao Date: Sun Jul 14 01:53:36 2024 +0300 soc: fsl: qbman: FSL_DPAA depends on COMPILE_TEST As most of the drivers that depend on ARCH_LAYERSCAPE, make FSL_DPAA depend on COMPILE_TEST for compilation and testing. # grep -r depends.\*ARCH_LAYERSCAPE.\*COMPILE_TEST | wc -l 29 Signed-off-by: Breno Leitao Signed-off-by: Vladimir Oltean Acked-by: Madalin Bucur Link: https://patch.msgid.link/20240713225336.1746343-6-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 6d2338205d78bb27ec2a3e035a4c2867320a0719 Author: Vladimir Oltean Date: Sun Jul 14 01:53:35 2024 +0300 net: dpaa: no need to make sure all CPUs receive a corresponding Tx queue dpaa_fq_setup() iterates through the &priv->dpaa_fq_list elements allocated by dpaa_alloc_all_fqs(). This includes a call to: if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, FQ_TYPE_TX)) goto fq_alloc_failed; which gives us dpaa_max_num_txqs() elements of FQ_TYPE_TX type. The code block which we are deleting runs after an earlier iteration through &priv->dpaa_fq_list. So at the end of this iteration (for which there is no early break), egress_cnt will be unconditionally equal to dpaa_max_num_txqs(). In other words, dpaa_alloc_all_fqs() has already allocated TX queues for all possible CPUs and the maximal number of traffic classes, and we've already iterated once through them all. The while() condition is dead code, remove it. Signed-off-by: Vladimir Oltean Acked-by: Madalin Bucur Link: https://patch.msgid.link/20240713225336.1746343-5-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e3672a6d5e89589b734fdbf1e79528b7bcafd11f Author: Vladimir Oltean Date: Sun Jul 14 01:53:34 2024 +0300 net: dpaa: stop ignoring TX queues past the number of CPUs dpaa_fq_setup() iterates through the queues allocated by dpaa_alloc_all_fqs() and saved in &priv->dpaa_fq_list. The allocation for FQ_TYPE_TX looks as follows: if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, FQ_TYPE_TX)) goto fq_alloc_failed; Thus, iterating again through FQ_TYPE_TX queues in dpaa_fq_setup() and counting them will never yield an egress_cnt larger than the allocated size, dpaa_max_num_txqs(). The comparison serves no purpose since it is always true; remove it. Signed-off-by: Vladimir Oltean Acked-by: Madalin Bucur Link: https://patch.msgid.link/20240713225336.1746343-4-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e7072750bbcb4d74945ed1e22070b96cc3457def Author: Vladimir Oltean Date: Sun Jul 14 01:53:33 2024 +0300 net: dpaa: eliminate NR_CPUS dependency in egress_fqs[] and conf_fqs[] The driver uses the DPAA_TC_TXQ_NUM and DPAA_ETH_TXQ_NUM macros for TX queue handling, and they depend on CONFIG_NR_CPUS. In generic .config files, these can go to very large (8096 CPUs) values for the systems that DPAA1 is integrated in (1-24 CPUs). We allocate a lot of resources that will never be used. Those are: - system memory - QMan FQIDs as managed by qman_alloc_fqid_range(). This is especially painful since currently, when booting with CONFIG_NR_CPUS=8096, a LS1046A-RDB system will only manage to probe 3 of its 6 interfaces. The rest will run out of FQD ("/reserved-memory/qman-fqd" in the device tree) and fail at the qman_create_fq() stage of the probing process. - netdev queues as alloc_etherdev_mq() argument. The high queue indices are simply hidden from the network stack after the call to netif_set_real_num_tx_queues(). With just a tiny bit more effort, we can replace the NR_CPUS compile-time constant with the num_possible_cpus() run-time constant, and dynamically allocate the egress_fqs[] and conf_fqs[] arrays. Even on a system with a high CONFIG_NR_CPUS, num_possible_cpus() will remain equal to the number of available cores on the SoC. The replacement is as follows: - DPAA_TC_TXQ_NUM -> dpaa_num_txqs_per_tc() - DPAA_ETH_TXQ_NUM -> dpaa_max_num_txqs() Signed-off-by: Vladimir Oltean Acked-by: Madalin Bucur Link: https://patch.msgid.link/20240713225336.1746343-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 555a05d84ca2c587e2d4777006e2c2fb3dfbd91d Author: Vladimir Oltean Date: Sun Jul 14 01:53:32 2024 +0300 net: dpaa: avoid on-stack arrays of NR_CPUS elements The dpaa-eth driver is written for PowerPC and Arm SoCs which have 1-24 CPUs. It depends on CONFIG_NR_CPUS having a reasonably small value in Kconfig. Otherwise, there are 2 functions which allocate on-stack arrays of NR_CPUS elements, and these can quickly explode in size, leading to warnings such as: drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:3280:12: warning: stack frame size (16664) exceeds limit (2048) in 'dpaa_eth_probe' [-Wframe-larger-than] The problem is twofold: - Reducing the array size to the boot-time num_possible_cpus() (rather than the compile-time NR_CPUS) creates a variable-length array, which should be avoided in the Linux kernel. - Using NR_CPUS as an array size makes the driver blow up in stack consumption with generic, as opposed to hand-crafted, .config files. A simple solution is to use dynamic allocation for num_possible_cpus() elements (aka a small number determined at runtime). Link: https://lore.kernel.org/all/202406261920.l5pzM1rj-lkp@intel.com/ Signed-off-by: Vladimir Oltean Reviewed-by: Breno Leitao Acked-by: Madalin Bucur Link: https://patch.msgid.link/20240713225336.1746343-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit d484d621d40f4a8b8959008802d79bef3609641b Author: Namjae Jeon Date: Mon Jul 15 08:29:39 2024 +0900 ksmbd: add durable scavenger timer Launch ksmbd-durable-scavenger kernel thread to scan durable fps that have not been reclaimed by a client within the configured time. Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 2e118ba36d56acf78084518dfb7cb53b1d417da0 Author: Tavian Barnes Date: Fri Jun 21 16:29:32 2024 -0400 bcachefs: darray: Don't pass NULL to memcpy() memcpy's second parameter must not be NULL, even if size is zero. Signed-off-by: Tavian Barnes Signed-off-by: Kent Overstreet commit 164c62f958f8c7f0bde1e9a5a8677971c6f28205 Author: Kiran K Date: Wed Jun 19 15:39:33 2024 +0530 Bluetooth: btintel: Add firmware ID to firmware name From BlazarI onwards, driver shall append the firmware ID (usually represents transport type) while constructing the firmware name. Firmware ID is returned on Intel Read Version command. The new firmware file name for operational image and ddc file shall be, ibt--.[sfi|ddc] dmesg snippet from BlazarI pcie product: ...... [17.098858] Bluetooth: hci0: Found device firmware: intel/ibt-0190-0291-pci.sfi [17.098871] Bluetooth: hci0: Boot Address: 0x10000800 [17.098872] Bluetooth: hci0: Firmware Version: 214-25.24 [17.158229] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [17.158236] Bluetooth: BNEP filters: protocol multicast [17.158241] Bluetooth: BNEP socket layer initialized [17.468789] Bluetooth: hci0: Waiting for firmware download to complete [17.468793] Bluetooth: hci0: Firmware loaded in 361262 usecs [17.468872] Bluetooth: hci0: Waiting for device to boot [17.504148] Bluetooth: hci0: Device booted in 34512 usecs [17.504148] Bluetooth: hci0: Malformed MSFT vendor event: 0x02 [17.504682] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-0190-0291-pci.ddc [17.505380] Bluetooth: hci0: Applying Intel DDC parameters completed [17.505622] Bluetooth: hci0: Firmware timestamp 2024.25 buildtype 3 build 64726 [17.505624] Bluetooth: hci0: Firmware SHA1: 0x9f4adddc [17.505838] Bluetooth: hci0: Fseq status: Success (0x00) [17.505839] Bluetooth: hci0: Fseq executed: 00.00.04.183 [17.505840] Bluetooth: hci0: Fseq BT Top: 00.00.04.183 dmesg snippet from BlazarI usb product: ....... [14.212072] Bluetooth: hci0: Found device firmware: intel/ibt-0190-0291-usb.sfi [14.212091] Bluetooth: hci0: Boot Address: 0x10000800 [14.212093] Bluetooth: hci0: Firmware Version: 79-21.24 [14.262125] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [14.262129] Bluetooth: BNEP filters: protocol multicast [14.262133] Bluetooth: BNEP socket layer initialized [15.865421] Bluetooth: hci0: Waiting for firmware download to complete [15.865991] Bluetooth: hci0: Firmware loaded in 1615150 usecs [15.866017] Bluetooth: hci0: Waiting for device to boot [15.899934] Bluetooth: hci0: Malformed MSFT vendor event: 0x02 [15.899942] Bluetooth: hci0: Device booted in 33139 usecs [15.900172] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-0190-0291-usb.ddc [15.901928] Bluetooth: hci0: Applying Intel DDC parameters completed [15.904993] Bluetooth: hci0: Firmware timestamp 2024.21 buildtype 3 build 63311 [15.904996] Bluetooth: hci0: Firmware SHA1: 0x8b217cf7 [15.908929] Bluetooth: hci0: Fseq status: Success (0x00) [15.908934] Bluetooth: hci0: Fseq executed: 00.00.04.180 [15.908935] Bluetooth: hci0: Fseq BT Top: 00.00.04.180 Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit da63f331353c9e1e6dc29e49e28f8f4fe5d642fd Author: Dmitry Antipov Date: Tue Jun 18 21:59:32 2024 +0300 Bluetooth: hci_core, hci_sync: cleanup struct discovery_state After commit 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan work"), 'scan_start' and 'scan_duration' of 'struct discovery_state' are still initialized but actually unused. So remove the aforementioned fields and adjust 'hci_discovery_filter_clear()' and 'le_scan_disable()' accordingly. Compile tested only. Fixes: 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan work") Signed-off-by: Dmitry Antipov Signed-off-by: Luiz Augusto von Dentz commit 295ef07a9dae6182ad4b689aa8c6a7dbba21474c Author: Hilda Wu Date: Mon Jun 17 17:05:18 2024 +0800 Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables Add the support ID 0489:e125 to usb_device_id table for Realtek RTL8852B chip. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=03 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e125 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 Signed-off-by: Hilda Wu Signed-off-by: Luiz Augusto von Dentz commit 5a820b13db3988122080f8de2920721f770c37a0 Author: Iulia Tanasescu Date: Mon Jun 17 11:52:06 2024 +0300 Bluetooth: hci_event: Set QoS encryption from BIGInfo report On a Broadcast Sink, after synchronizing to the PA transimitted by a Broadcast Source, the BIGInfo advertising reports emitted by the Controller hold the encryption field, which indicates whether the Broadcast Source is transmitting encrypted streams. This updates the PA sync hcon QoS with the encryption value reported in the BIGInfo report, so that this information is accurate if the userspace tries to access the QoS struct via getsockopt. Fixes: 1d11d70d1f6b ("Bluetooth: ISO: Pass BIG encryption info through QoS") Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz commit 27489364299a2ddb5c54cd9f29a3f41bd8d151ab Author: Neeraj Sanjay Kale Date: Fri Jun 14 13:53:38 2024 +0530 Bluetooth: btnxpuart: Add handling for boot-signature timeout errors This handles the timeout error codes sent by the chip as part of the bootloader signatures during firmware download process. When the bootloader does not receive a response packet from the host within a specific time, it adds an error code to the bootloader signature while requesting for the FW chunk from the same offset. The host is expected to clear this error code with a NAK, and reply to only those bootloader signatures which have error code 0. However, the driver was ignoring this error code and replying with the firmware chunks instead, which is apparently ignored by the chip and the chip resends the same bootloader signature with the error code again. This happens in a loop until the error code self clears and firmware download proceeds ahead, adding a couple of milliseconds to the total firmware download time. Commit 689ca16e5232 was an initial implementation which simply printed the following line during driver debug: - FW Download received err 0x04 from chip This commit adds the expected handling to the error codes. This error handling is valid for data_req bootloader signatures for V3 and future bootloader versions. Signed-off-by: Neeraj Sanjay Kale Fixes: 689ca16e5232 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets") Signed-off-by: Luiz Augusto von Dentz commit cb24bb7e6f8ae569c699f569ac4b5093606dca49 Author: Neeraj Sanjay Kale Date: Fri Jun 14 14:19:41 2024 +0530 Bluetooth: btnxpuart: Update firmware names This updates the firmware names of 3 chipsets: w8987, w8997, w9098. These changes are been done to standardize chip specific firmware file names to be in sync with firmware names of newer chipsets. The naming convention for BT-only files would be as follows: For dual-radio WiFi+BT chipsets: - _bt_v.bin For tri-radio WiFi+BT+15.4 chipsets: - _bt_v.bin To maintain backward compatibility, this commit adds a provision to request older firmware file name, if new firmware file name not found in /lib/firmware/nxp/. A new device tree property has been introduced called firmware-name, to override the hardcoded firmware names (old and new) in the driver. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit 921825453873a15e8c83d6c171f0a6cf128fc963 Author: Neeraj Sanjay Kale Date: Fri Jun 14 14:19:40 2024 +0530 dt-bindings: net: bluetooth: nxp: Add firmware-name property This adds a new optional device tree property called firware-name. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit 08c22b52262041164990eef4b0e076bce173a3b2 Author: Hector Martin Date: Sun Jun 2 09:57:05 2024 +0000 Bluetooth: hci_bcm4377: Add BCM4388 support This new variant needs a different core2_window1 and always uses beamforming. The BAR2 also has an offset (RAM start, presumably), so add that. Signed-off-by: Hector Martin Reviewed-by: Sven Peter [sven: rebased, updated some comments, mentioned 4388 in Kconfig] Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz commit f25b7fd36cc3a850e006aed686f5bbecd200de1b Author: Ying Hsu Date: Wed May 29 08:00:00 2024 +0000 Bluetooth: Add vendor-specific packet classification for ISO data When HCI raw sockets are opened, the Bluetooth kernel module doesn't track CIS/BIS connections. User-space applications have to identify ISO data by maintaining connection information and look up the mapping for each ACL data packet received. Besides, btsnoop log captured in kernel couldn't tell ISO data from ACL data in this case. To avoid additional lookups, this patch introduces vendor-specific packet classification for Intel BT controllers to distinguish ISO data packets from ACL data packets. Signed-off-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz commit d4cc4ee48167b4c25abf49ead19412c29a1ad9f4 Author: Dr. David Alan Gilbert Date: Sat Jun 1 00:26:14 2024 +0100 Bluetooth: iso: remove unused struct 'iso_list_data' 'iso_list_data' has been unused since the original commit ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Luiz Augusto von Dentz commit 67c3bceabb42780f18362d7c5ec72a700051ca36 Author: Thorsten Blum Date: Sat Jun 1 01:51:33 2024 +0200 Bluetooth: btintel_pcie: Remove unnecessary memset(0) calls Remove memset(0) after dma_alloc_coherent(), which already zeroes out the memory, and fix the following two Coccinelle/coccicheck warnings reported by zalloc-simple.cocci: btintel_pcie.c:837:19-37: WARNING: dma_alloc_coherent used in /* Allocate full chunk of data buffer for DMA first and do indexing and * initialization next, so it can be freed easily */ rxq->buf_v_addr already zeroes out memory, so memset is not needed btintel_pcie.c:792:19-37: WARNING: dma_alloc_coherent used in /* Allocate full chunk of data buffer for DMA first and do indexing and * initialization next, so it can be freed easily */ txq->buf_v_addr already zeroes out memory, so memset is not needed Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Thorsten Blum Signed-off-by: Luiz Augusto von Dentz commit 973dd9c4db4746200f88fe46e30eada7054fdbea Author: Erick Archer Date: Fri May 24 19:11:51 2024 +0200 Bluetooth: Use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Signed-off-by: Luiz Augusto von Dentz commit 183469bccf68cb05dfb56cc47e73520217854bab Author: Dan Carpenter Date: Fri May 24 13:14:02 2024 +0300 Bluetooth: MGMT: Uninitialized variable in load_conn_param() The "update" variable needs to be initialized to false. Fixes: 0ece498c27d8 ("Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection") Signed-off-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz commit fbcd1492d8c0ae39bf9f1d3d85228e7e279c4d24 Author: Dr. David Alan Gilbert Date: Thu May 9 01:11:38 2024 +0100 Bluetooth/nokia: Remove unused struct 'hci_nokia_radio_hdr' 'hci_nokia_radio_hdr' looks like it was unused since it's initial commit. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Luiz Augusto von Dentz commit b1c7cd6caaf6209ed9f7df59b61a2ac885eb79b3 Author: Erick Archer Date: Fri May 17 19:21:50 2024 +0200 tty: rfcomm: prefer array indexing over pointer arithmetic Refactor the list_for_each_entry() loop of rfcomm_get_dev_list() function to use array indexing instead of pointer arithmetic. This way, the code is more readable and idiomatic. Reviewed-by: Kees Cook Signed-off-by: Erick Archer Signed-off-by: Luiz Augusto von Dentz commit 7d2c7ddba6238e6a14cd89ef869878dd22f2a661 Author: Erick Archer Date: Fri May 17 19:21:49 2024 +0200 tty: rfcomm: prefer struct_size over open coded arithmetic This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1][2]. As the "dl" variable is a pointer to "struct rfcomm_dev_list_req" and this structure ends in a flexible array: struct rfcomm_dev_list_req { [...] struct rfcomm_dev_info dev_info[]; }; the preferred way in the kernel is to use the struct_size() helper to do the arithmetic instead of the calculation "size + count * size" in the kzalloc() and copy_to_user() functions. At the same time, prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). In this case, it is important to note that the logic needs a little refactoring to ensure that the "dev_num" member is initialized before the first access to the flex array. Specifically, add the assignment before the list_for_each_entry() loop. Also remove the "size" variable as it is no longer needed. This way, the code is more readable and safer. This code was detected with the help of Coccinelle, and audited and modified manually. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/160 [2] Reviewed-by: Kees Cook Signed-off-by: Erick Archer Signed-off-by: Luiz Augusto von Dentz commit c61e41121036aa610e904ef60f8520e10455ee8c Author: Erick Archer Date: Sat May 18 10:30:39 2024 +0200 Bluetooth: hci_core: Prefer array indexing over pointer arithmetic Refactor the list_for_each_entry() loop of hci_get_dev_list() function to use array indexing instead of pointer arithmetic. This way, the code is more readable and idiomatic. Reviewed-by: Kees Cook Signed-off-by: Erick Archer Signed-off-by: Luiz Augusto von Dentz commit 8f7dfe171c576aaec4911cc59feaed26d79c7c7f Author: Erick Archer Date: Sat May 18 10:30:38 2024 +0200 Bluetooth: hci_core: Prefer struct_size over open coded arithmetic This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1][2]. As the "dl" variable is a pointer to "struct hci_dev_list_req" and this structure ends in a flexible array: struct hci_dev_list_req { [...] struct hci_dev_req dev_req[]; /* hci_dev_req structures */ }; the preferred way in the kernel is to use the struct_size() helper to do the arithmetic instead of the calculation "size + count * size" in the kzalloc() and copy_to_user() functions. At the same time, prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). In this case, it is important to note that the logic needs a little refactoring to ensure that the "dev_num" member is initialized before the first access to the flex array. Specifically, add the assignment before the list_for_each_entry() loop. Also remove the "size" variable as it is no longer needed. This way, the code is more readable and safer. This code was detected with the help of Coccinelle, and audited and modified manually. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/160 [2] Reviewed-by: Kees Cook Signed-off-by: Erick Archer Signed-off-by: Luiz Augusto von Dentz commit 041677e7aad6f57020aa271aafd4cb9e2af1536f Author: Kiran K Date: Fri May 17 15:24:46 2024 +0530 Bluetooth: btintel_pcie: Fix irq leak Free irq before releasing irq vector. Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 17813af5656b1f47fc3bc2c486ac8014e0026ad8 Author: Kiran K Date: Fri May 17 15:24:45 2024 +0530 Bluetooth: btintel_pcie: Print Firmware Sequencer information Firmware sequencer (FSEQ) is a common code shared across Bluetooth and Wifi. Printing FSEQ will help to debug if there is any mismatch between Bluetooth and Wifi FSEQ. Make 'btintel_print_fseq_info' public and use it in btintel_pcie.c. dmesg: .... [ 5335.695740] Bluetooth: hci0: Device booted in 33872 usecs [ 5335.695918] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-0190-0291.ddc [ 5335.697011] Bluetooth: hci0: Applying Intel DDC parameters completed [ 5335.697837] Bluetooth: hci0: Firmware timestamp 2024.20 buildtype 0 build 62871 [ 5335.697848] Bluetooth: hci0: Firmware SHA1: 0xeffdce06 [ 5335.698655] Bluetooth: hci0: Fseq status: Success (0x00) [ 5335.698666] Bluetooth: hci0: Fseq executed: 00.00.04.176 [ 5335.698670] Bluetooth: hci0: Fseq BT Top: 00.00.04.176 [ 5335.750204] Bluetooth: MGMT ver 1.22 Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 064aee501012eaeeeb40a2acb991598e0a89fac9 Author: Hao Qin Date: Wed May 15 16:15:21 2024 -0700 Bluetooth: btusb: mediatek: add MT7922 subsystem reset Add the support of MT7922 bluetooth subsystem reset that was called the auto revert to self-recover from the fatal error in the controller like the host encounters HCI cmd timeout or the controller crashes. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Hao Qin Signed-off-by: Luiz Augusto von Dentz commit ccfc8948d7e4d93cab341a99774b24586717d89a Author: Hao Qin Date: Wed May 15 16:15:20 2024 -0700 Bluetooth: btusb: mediatek: reset the controller before downloading the fw Reset the controller before downloading the firmware to improve its reliability. This includes situations like cold or warm reboots, ensuring the controller is in its initial state before starting the firmware download. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Chris Lu Signed-off-by: Chris Lu Signed-off-by: Hao Qin Signed-off-by: Luiz Augusto von Dentz commit 4c0c28f2bbec0c51395fd1f13c697da67483964b Author: Hao Qin Date: Wed May 15 16:15:19 2024 -0700 Bluetooth: btusb: mediatek: refactor the function btusb_mtk_reset Extract the function btusb_mtk_subsys_reset from the btusb_mtk_reset for the future handling of resetting bluetooth controller without the USB reset. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Hao Qin Signed-off-by: Luiz Augusto von Dentz commit 7f935b21bee4d8a9f26b57ae6c3682161b247809 Author: Sean Wang Date: Wed May 15 16:15:18 2024 -0700 Bluetooth: btmtk: apply the common btmtk_fw_get_filename Apply the common btmtk_fw_get_filename to avoid the similar coding in each driver. Signed-off-by: Sean Wang Signed-off-by: Luiz Augusto von Dentz commit 00f993fdec06c8f036a1b9c8ee6b004c17143bd1 Author: Sean Wang Date: Wed May 15 16:15:17 2024 -0700 Bluetooth: btmtk: add the function to get the fw name Include a shared function to get the firmware name, to prevent repeating code for similar chipsets. Signed-off-by: Sean Wang Signed-off-by: Luiz Augusto von Dentz commit 0a3e2eca1daa5627c8ecd1554e3146de82d61dd2 Author: Kiran K Date: Thu May 16 17:54:36 2024 +0530 Bluetooth: btintel: Refactor btintel_set_ppag() Current flow iterates the ACPI table associated with Bluetooth controller looking for PPAG method. Method name can be directly passed to acpi_evaluate_object function instead of iterating the table. Fixes: c585a92b2f9c ("Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG)") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 0d0df1e750bac0fdaa77940e711c1625cff08d33 Author: Luke Wang Date: Fri May 17 19:15:35 2024 +0800 Bluetooth: btnxpuart: Shutdown timer and prevent rearming when driver unloading When unload the btnxpuart driver, its associated timer will be deleted. If the timer happens to be modified at this moment, it leads to the kernel call this timer even after the driver unloaded, resulting in kernel panic. Use timer_shutdown_sync() instead of del_timer_sync() to prevent rearming. panic log: Internal error: Oops: 0000000086000007 [#1] PREEMPT SMP Modules linked in: algif_hash algif_skcipher af_alg moal(O) mlan(O) crct10dif_ce polyval_ce polyval_generic snd_soc_imx_card snd_soc_fsl_asoc_card snd_soc_imx_audmux mxc_jpeg_encdec v4l2_jpeg snd_soc_wm8962 snd_soc_fsl_micfil snd_soc_fsl_sai flexcan snd_soc_fsl_utils ap130x rpmsg_ctrl imx_pcm_dma can_dev rpmsg_char pwm_fan fuse [last unloaded: btnxpuart] CPU: 5 PID: 723 Comm: memtester Tainted: G O 6.6.23-lts-next-06207-g4aef2658ac28 #1 Hardware name: NXP i.MX95 19X19 board (DT) pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : 0xffff80007a2cf464 lr : call_timer_fn.isra.0+0x24/0x80 ... Call trace: 0xffff80007a2cf464 __run_timers+0x234/0x280 run_timer_softirq+0x20/0x40 __do_softirq+0x100/0x26c ____do_softirq+0x10/0x1c call_on_irq_stack+0x24/0x4c do_softirq_own_stack+0x1c/0x2c irq_exit_rcu+0xc0/0xdc el0_interrupt+0x54/0xd8 __el0_irq_handler_common+0x18/0x24 el0t_64_irq_handler+0x10/0x1c el0t_64_irq+0x190/0x194 Code: ???????? ???????? ???????? ???????? (????????) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception in interrupt SMP: stopping secondary CPUs Kernel Offset: disabled CPU features: 0x0,c0000000,40028143,1000721b Memory Limit: none ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]--- Signed-off-by: Luke Wang Signed-off-by: Luiz Augusto von Dentz commit e3c4891098c875a63ab0c3b31d584f6d4f1895fd Author: Neeraj Sanjay Kale Date: Wed May 15 12:36:57 2024 +0530 Bluetooth: btnxpuart: Handle FW Download Abort scenario This adds a new flag BTNXPUART_FW_DOWNLOAD_ABORT which handles the situation where driver is removed while firmware download is in progress. logs: modprobe btnxpuart [65239.230431] Bluetooth: hci0: ChipID: 7601, Version: 0 [65239.236670] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se rmmod btnxpuart [65241.425300] Bluetooth: hci0: FW Download Aborted Signed-off-by: Neeraj Sanjay Kale Tested-by: Guillaume Legoupil Signed-off-by: Luiz Augusto von Dentz commit 2684dd614ccf085b64456d78e2c23911006d503d Author: Neeraj Sanjay Kale Date: Wed May 15 12:36:56 2024 +0530 Bluetooth: btnxpuart: Enable status prints for firmware download This enables prints for firmware download which can help automation tests to verify firmware download functionality. dmesg logs before: modprobe btnxpuart [ 1999.187264] Bluetooth: MGMT ver 1.22 dmesg logs with this patch: modprobe btnxpuart [16179.758515] Bluetooth: hci0: ChipID: 7601, Version: 0 [16179.764748] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se [16181.217490] Bluetooth: hci0: FW Download Complete: 372696 bytes [16182.701398] Bluetooth: MGMT ver 1.22 Signed-off-by: Neeraj Sanjay Kale Tested-by: Guillaume Legoupil Signed-off-by: Luiz Augusto von Dentz commit c68bbf5e334b35b36ac5b9f0419f1f93f796bad1 Author: Neeraj Sanjay Kale Date: Wed May 15 12:36:55 2024 +0530 Bluetooth: btnxpuart: Fix Null pointer dereference in btnxpuart_flush() This adds a check before freeing the rx->skb in flush and close functions to handle the kernel crash seen while removing driver after FW download fails or before FW download completes. dmesg log: [ 54.634586] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000080 [ 54.643398] Mem abort info: [ 54.646204] ESR = 0x0000000096000004 [ 54.649964] EC = 0x25: DABT (current EL), IL = 32 bits [ 54.655286] SET = 0, FnV = 0 [ 54.658348] EA = 0, S1PTW = 0 [ 54.661498] FSC = 0x04: level 0 translation fault [ 54.666391] Data abort info: [ 54.669273] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 54.674768] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 54.674771] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 54.674775] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000048860000 [ 54.674780] [0000000000000080] pgd=0000000000000000, p4d=0000000000000000 [ 54.703880] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 54.710152] Modules linked in: btnxpuart(-) overlay fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic snd_soc_imx_spdif snd_soc_imx_card snd_soc_ak5558 snd_soc_ak4458 caam secvio error snd_soc_fsl_micfil snd_soc_fsl_spdif snd_soc_fsl_sai snd_soc_fsl_utils imx_pcm_dma gpio_ir_recv rc_core sch_fq_codel fuse [ 54.744357] CPU: 3 PID: 72 Comm: kworker/u9:0 Not tainted 6.6.3-otbr-g128004619037 #2 [ 54.744364] Hardware name: FSL i.MX8MM EVK board (DT) [ 54.744368] Workqueue: hci0 hci_power_on [ 54.757244] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 54.757249] pc : kfree_skb_reason+0x18/0xb0 [ 54.772299] lr : btnxpuart_flush+0x40/0x58 [btnxpuart] [ 54.782921] sp : ffff8000805ebca0 [ 54.782923] x29: ffff8000805ebca0 x28: ffffa5c6cf1869c0 x27: ffffa5c6cf186000 [ 54.782931] x26: ffff377b84852400 x25: ffff377b848523c0 x24: ffff377b845e7230 [ 54.782938] x23: ffffa5c6ce8dbe08 x22: ffffa5c6ceb65410 x21: 00000000ffffff92 [ 54.782945] x20: ffffa5c6ce8dbe98 x19: ffffffffffffffac x18: ffffffffffffffff [ 54.807651] x17: 0000000000000000 x16: ffffa5c6ce2824ec x15: ffff8001005eb857 [ 54.821917] x14: 0000000000000000 x13: ffffa5c6cf1a02e0 x12: 0000000000000642 [ 54.821924] x11: 0000000000000040 x10: ffffa5c6cf19d690 x9 : ffffa5c6cf19d688 [ 54.821931] x8 : ffff377b86000028 x7 : 0000000000000000 x6 : 0000000000000000 [ 54.821938] x5 : ffff377b86000000 x4 : 0000000000000000 x3 : 0000000000000000 [ 54.843331] x2 : 0000000000000000 x1 : 0000000000000002 x0 : ffffffffffffffac [ 54.857599] Call trace: [ 54.857601] kfree_skb_reason+0x18/0xb0 [ 54.863878] btnxpuart_flush+0x40/0x58 [btnxpuart] [ 54.863888] hci_dev_open_sync+0x3a8/0xa04 [ 54.872773] hci_power_on+0x54/0x2e4 [ 54.881832] process_one_work+0x138/0x260 [ 54.881842] worker_thread+0x32c/0x438 [ 54.881847] kthread+0x118/0x11c [ 54.881853] ret_from_fork+0x10/0x20 [ 54.896406] Code: a9be7bfd 910003fd f9000bf3 aa0003f3 (b940d400) [ 54.896410] ---[ end trace 0000000000000000 ]--- Signed-off-by: Neeraj Sanjay Kale Tested-by: Guillaume Legoupil Signed-off-by: Luiz Augusto von Dentz commit 3b867602854058c6d26b146372f3b33c3a5040b9 Author: Hector Martin Date: Wed May 15 18:15:03 2024 +0000 Bluetooth: hci_bcm4377: Increase boot timeout BCM4388 takes over 2 seconds to boot, so increase the timeout. Signed-off-by: Hector Martin Reviewed-by: Sven Peter Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz commit 56c695a823e4ee1e5294a8340d5afe5de73828ec Author: Sven Peter Date: Wed May 15 18:15:02 2024 +0000 Bluetooth: hci_bcm4377: Use correct unit for timeouts BCM4377_TIMEOUT is always used to wait for completitions and their API expects a timeout in jiffies instead of msecs. Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards") Signed-off-by: Sven Peter Signed-off-by: Luiz Augusto von Dentz commit 0ece498c27d8cd2fdad6f49a6abc34b8badd8fbc Author: Luiz Augusto von Dentz Date: Fri May 10 10:36:45 2024 -0400 Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection This makes MGMT_OP_LOAD_CONN_PARAM update existing connection by dectecting the request is just for one connection, parameters already exists and there is a connection. Since this is a new behavior the revision is also updated to enable userspace to detect it. Signed-off-by: Luiz Augusto von Dentz commit efb2018e4d238cc205690ac62c0917d60d291e66 Author: Kent Overstreet Date: Sun Jul 14 19:51:01 2024 -0400 bcachefs: Kill bch2_assert_btree_nodes_not_locked() We no longer track individual btree node locks with lockdep, so this will never be enabled. Signed-off-by: Kent Overstreet commit ae469056313f7d8a63646de8ef53eebfefc2d9c0 Author: Kent Overstreet Date: Mon Aug 28 16:13:18 2023 -0400 bcachefs: Rename BCH_WRITE_DONE -> BCH_WRITE_SUBMITTED Signed-off-by: Kent Overstreet commit 520da3c488c5bb177871634e713eb8a106082e6b Author: Namjae Jeon Date: Tue May 21 22:57:52 2024 +0900 ksmbd: avoid reclaiming expired durable opens by the client The expired durable opens should not be reclaimed by client. This patch add ->durable_scavenger_timeout to fp and check it in ksmbd_lookup_durable_fd(). Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 051d469be1b355ffc62fcd9c82195230c780228a Author: Christophe JAILLET Date: Sun Jun 23 20:07:58 2024 +0200 ksmbd: Constify struct ksmbd_transport_ops 'struct ksmbd_transport_ops' 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 52184 2085 256 54525 d4fd fs/smb/server/transport_rdma.o After: ===== text data bss dec hex filename 52260 2021 256 54537 d509 fs/smb/server/transport_rdma.o Signed-off-by: Christophe JAILLET Acked-by: Namjae Jeon Signed-off-by: Steve French commit ac5399d48616644cb6ddfe39f8babe807d5f5cbd Author: ChenXiaoSong Date: Wed Jun 19 16:17:53 2024 +0000 ksmbd: remove duplicate SMB2 Oplock levels definitions smb/common already have SMB2 Oplock levels definitions, remove duplicate definitions in server. Signed-off-by: ChenXiaoSong Acked-by: Namjae Jeon Signed-off-by: Steve French commit 1d18b5cabc89f9c0ea0a3a1d738d5a02d478117f Author: Kent Overstreet Date: Sun Jul 14 16:32:11 2024 -0400 bcachefs: __bch2_read(): call trans_begin() on every loop iter perusal of /sys/kernel/debug/bcachefs/*/btree_transaction_stats shows that the read path has been acculumalating unneeded paths on the reflink btree, which we don't want. The solution is to call bch2_trans_begin(), which drops paths not used on previous loop iteration. bch2_readahead: Max mem used: 0 Transaction duration: count: 194235 since mount recent duration of events min: 150 ns max: 9 ms total: 838 ms mean: 4 us 6 us stddev: 34 us 7 us time between events min: 10 ns max: 15 h mean: 2 s 12 s stddev: 2 s 3 ms Maximum allocated btree paths (193): path: idx 2 ref 0:0 P btree=extents l=0 pos 270943112:392:U32_MAX locks 0 path: idx 3 ref 1:0 S btree=extents l=0 pos 270943112:24578:U32_MAX locks 1 path: idx 4 ref 0:0 P btree=reflink l=0 pos 0:24773509:0 locks 0 path: idx 5 ref 0:0 P S btree=reflink l=0 pos 0:24773631:0 locks 1 path: idx 6 ref 0:0 P S btree=reflink l=0 pos 0:24773759:0 locks 1 path: idx 7 ref 0:0 P S btree=reflink l=0 pos 0:24773887:0 locks 1 path: idx 8 ref 0:0 P S btree=reflink l=0 pos 0:24774015:0 locks 1 path: idx 9 ref 0:0 P S btree=reflink l=0 pos 0:24774143:0 locks 1 path: idx 10 ref 0:0 P S btree=reflink l=0 pos 0:24774271:0 locks 1 Signed-off-by: Kent Overstreet commit 114f530e1e600245b0f9c114aa75c1ecc4376c67 Author: Hongbo Li Date: Fri Jul 12 15:09:25 2024 +0800 bcachefs: show none if label is not set If label is not set, the Label tag in superblock info show '(none)'. ``` [Before] Device index: 0 Label: Version: 1.4: member_seq [After] Device index: 0 Label: (none) Version: 1.4: member_seq ``` Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet commit 7b6dda7282b1f26094aac21e1862690c79152e51 Author: Kent Overstreet Date: Fri Jul 12 14:35:46 2024 -0400 bcachefs: drop packed, aligned from bkey_inode_buf Unnecessary here, and this broke the rust bindings: error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> /build/source/target/release/build/bch_bindgen-9445b24c90aca2a3/out/bcachefs.rs:29025:1 | 29025 | pub struct bkey_i_inode_v3 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `bch_inode_v3` has a `#[repr(align)]` attribute --> /build/source/target/release/build/bch_bindgen-9445b24c90aca2a3/out/bcachefs.rs:8949:1 | 8949 | pub struct bch_inode_v3 { | ^^^^^^^^^^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> /build/source/target/release/build/bch_bindgen-9445b24c90aca2a3/out/bcachefs.rs:32826:1 | 32826 | pub struct bkey_inode_buf { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `bch_inode_v3` has a `#[repr(align)]` attribute --> /build/source/target/release/build/bch_bindgen-9445b24c90aca2a3/out/bcachefs.rs:8949:1 | 8949 | pub struct bch_inode_v3 { | ^^^^^^^^^^^^^^^^^^^^^^^ note: `bkey_inode_buf` contains a field of type `bkey_i_inode_v3` --> /build/source/target/release/build/bch_bindgen-9445b24c90aca2a3/out/bcachefs.rs:32827:9 | 32827 | pub inode: bkey_i_inode_v3, | ^^^^^ note: ...which contains a field of type `bch_inode_v3` --> /build/source/target/release/build/bch_bindgen-9445b24c90aca2a3/out/bcachefs.rs:29027:9 | 29027 | pub v: bch_inode_v3, | ^ Signed-off-by: Kent Overstreet commit 6ec8623f7cdd7e32a560fbef1e742bd8bc23925e Author: Kent Overstreet Date: Fri Jul 12 14:16:01 2024 -0400 bcachefs: btree node scan: fall back to comparing by journal seq highly damaged filesystems, or filesystems that have been damaged and repair and damaged again, may have sequence numbers we can't fully trust - which in itself is something we need to debug. Add a journal_seq fallback so that repair doesn't get stuck. Signed-off-by: Kent Overstreet commit 375476c41405ff6fc379cdbf1ad1df35c737500c Author: Kent Overstreet Date: Thu Dec 21 18:54:09 2023 -0500 bcachefs: Add lockdep support for btree node locks This adds lockdep tracking for held btree locks with a single dep_map in btree_trans, i.e. tracking all held btree locks as one object. This is more practical and more useful than having lockdep track held btree locks individually, because - we can take more locks than lockdep can track (unbounded, now that we have dynamically resizable btree paths) - there's no lock ordering between btree locks for lockdep to track (we do cycle detection) - and this makes it easy to teach lockdep that btree locks are not safe to hold while invoking memory reclaim. The last rule is one that lockdep would never learn, because we only do trylock() from within shrinkers - but we very much do not want to be invoking memory reclaim while holding btree node locks. Signed-off-by: Kent Overstreet commit 1a616c2fe96b357894b74b41787d4ea6987f6199 Author: Kent Overstreet Date: Thu Dec 21 20:34:17 2023 -0500 lockdep: lockdep_set_notrack_class() Add a new helper to disable lockdep tracking entirely for a given class. This is needed for bcachefs, which takes too many btree node locks for lockdep to track. Instead, we have a single lockdep_map for "btree_trans has any btree nodes locked", which makes more since given that we have centralized lock management and a cycle detector. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Signed-off-by: Kent Overstreet commit 8f523d425e0255a68d2f47f9b21db4f684c185c9 Author: Kent Overstreet Date: Sat Jun 29 16:04:40 2024 -0400 bcachefs: Improve copygc_wait_to_text() printing the raw values can occasionally be very useful Signed-off-by: Kent Overstreet commit 27d033df35154256e0063450d651000bd1b36d72 Author: Kent Overstreet Date: Sat Jun 29 18:08:20 2024 -0400 bcachefs: Convert clock code to u64s Eliminate possible integer truncation bugs on 32 bit Signed-off-by: Kent Overstreet commit ec8bf491a9008b8db97076ba7a6905edb4537bb9 Author: Kent Overstreet Date: Sat Jun 29 11:43:23 2024 -0400 bcachefs: Improve startup message We're not always mounting when we start the filesystem Signed-off-by: Kent Overstreet commit a2cb8a6236daafbea5e3d9d720f5e55ba692817b Author: Kent Overstreet Date: Fri Jun 28 13:28:30 2024 -0400 bcachefs: Self healing on read IO error This repurposes the promote path, which already knows how to call data_update() after a read: we now automatically rewrite bad data when we get a read error and then successfully retry from a different replica. Signed-off-by: Kent Overstreet commit b1d63b06e8398eb048dcc455acc628e6655d7499 Author: Kent Overstreet Date: Fri Jun 28 18:10:47 2024 -0400 bcachefs: Make read_only a mount option again, but hidden fsck passes read_only as a mount option, and it's required for nochanges, which it also uses. Usually read_only is handled by the VFS, but we need to be able to handle it too; we just don't want to print it out twice, so mark it as a hidden option. Signed-off-by: Kent Overstreet commit 9d9d212e26399c04c567c232f500179cbdc8dc7e Author: Kent Overstreet Date: Fri Jun 28 16:25:39 2024 -0400 bcachefs: bch2_extent_crc_unpacked_to_text() Signed-off-by: Kent Overstreet commit 5e3c208325189df6d0c08307cbadb2a03b2fbe2e Author: Kent Overstreet Date: Fri Jun 28 13:51:38 2024 -0400 bcachefs: Ratelimit checksum error messages Signed-off-by: Kent Overstreet commit 0f3372dcee6212ad49a8c32ea3ca80b91f36b9d3 Author: Kent Overstreet Date: Fri Jun 28 13:36:00 2024 -0400 bcachefs: spelling fix Signed-off-by: Kent Overstreet commit d2cb6b219d37284d78deeac1be8eb9d7670eebd1 Author: Kent Overstreet Date: Sat Jun 8 17:49:11 2024 -0400 bcachefs: Simplify btree key cache fill path Don't allocate the new bkey_cached until after we've done the btree lookup; this means we can kill bkey_cached.valid. Signed-off-by: Kent Overstreet commit 39d5d8290cd4ae709b5c9625f991a2b028234315 Author: Kent Overstreet Date: Sun Jun 23 02:13:44 2024 -0400 bcachefs: Improve "unable to allocate journal write" message Signed-off-by: Kent Overstreet commit e0d5bc6a66182dd68e117638c04a6794f2604331 Author: Kent Overstreet Date: Sun Jun 23 18:48:22 2024 -0400 bcachefs: Fix missing BTREE_TRIGGER_bucket_invalidate flag This fixes an accounting mismatch for cached data. Signed-off-by: Kent Overstreet commit 7554a8bb6ddeeca87fa8abd1d9766111477a6643 Author: Kent Overstreet Date: Sun Sep 10 17:29:39 2023 -0400 bcachefs: Ensure buffered writes write as much as they can This adds a new helper, bch2_folio_reservation_get_partial(), which reserves as many blocks as possible and may return partial success. __bch2_buffered_write() is switched to the new helper - this fixes fstests generic/275, the write until -ENOSPC test. generic/230 now fails: this appears to be a test bug, where xfs_io isn't looping after a partial write to get the error code. Signed-off-by: Kent Overstreet commit 95924420b038a0d025c4d16c75be2a858e7c09df Author: Hongbo Li Date: Thu Jun 20 21:21:12 2024 +0800 bcachefs: support STATX_DIOALIGN for statx file Add support for STATX_DIOALIGN to bcachefs, so that direct I/O alignment restrictions are exposed to userspace in a generic way. [Before] ``` ./statx_test /mnt/bcachefs/test statx(/mnt/bcachefs/test) = 0 dio mem align:0 dio offset align:0 ``` [After] ``` ./statx_test /mnt/bcachefs/test statx(/mnt/bcachefs/test) = 0 dio mem align:1 dio offset align:512 ``` Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet commit 7aa7183e00d92539c61b3a01a7ebf676b0ecb91e Author: Kent Overstreet Date: Wed Jun 19 09:00:11 2024 -0400 bcachefs: split out lru_format.h Signed-off-by: Kent Overstreet commit 789566da258f27ec5bffd4ae685306c71d7b4809 Author: Kent Overstreet Date: Sat Jun 8 15:20:53 2024 -0400 bcachefs: bch2_btree_key_cache_drop() now evicts As part of improving btree key cache coherency, the bkey_cached.valid flag is going away. Signed-off-by: Kent Overstreet commit febc33cb352afb8c8dc87286635c35cc644fbdb9 Author: Pankaj Raghav Date: Fri Jun 14 10:50:31 2024 +0000 bcachefs: set fgf order hint before starting a buffered write Set the preferred folio order in the fgp_flags by calling fgf_set_order(). Page cache will try to allocate large folio of the preferred order whenever possible instead of allocating multiple 0 order folios. This improves the buffered write performance up to 1.25x with default mount options and up to 1.57x when mounted with no_data_io option with the following fio workload: fio --name=bcachefs --filename=/mnt/test --size=100G \ --ioengine=io_uring --iodepth=16 --rw=write --bs=128k Signed-off-by: Pankaj Raghav Signed-off-by: Kent Overstreet commit 2b02b9552c7839840e4ce05244d20738515ab05c Author: Pankaj Raghav Date: Fri Jun 14 10:50:30 2024 +0000 bcachefs: use FGP_WRITEBEGIN instead of combining individual flags Use FGP_WRITEBEGIN to avoid repeating the individual FGP flags before starting a buffered write. Signed-off-by: Pankaj Raghav Signed-off-by: Kent Overstreet commit b0d3ab531f07b6fc22ed9b84e7b9a5ff9be90df9 Author: Kent Overstreet Date: Thu Jun 13 17:07:36 2024 -0400 bcachefs: Reduce the scope of gc_lock gc_lock is now only for synchronization between check_alloc_info and interior btree updates - nothing else Signed-off-by: Kent Overstreet commit 132e1a2380d06c31a17c773aac6c676658b9686a Author: Kent Overstreet Date: Thu Jun 13 14:11:48 2024 -0400 bcachefs: per_cpu_sum() Signed-off-by: Kent Overstreet commit 63567f643a3e2cdc54d0e190a7a14c01c523b71c Author: Brian Foster Date: Mon Jun 10 08:26:39 2024 -0400 MAINTAINERS: remove Brian Foster as a reviewer for bcachefs Signed-off-by: Brian Foster Signed-off-by: Kent Overstreet commit 385f0c05d670a252943299506750ed90a4843861 Author: Kent Overstreet Date: Sat Jun 8 16:46:58 2024 -0400 bcachefs: kill key cache arg to bch2_assert_pos_locked() this is an internal implementation detail - and we're improving key cache coherency Signed-off-by: Kent Overstreet commit c30402e5483df785a5319ffe07127bfd7238d8d9 Author: Kent Overstreet Date: Sat Jun 8 15:24:14 2024 -0400 bcachefs: btree_path_cached_set() new helper - small refactoring Signed-off-by: Kent Overstreet commit 71fdc0b5a678766e874c5001e8bc83bde5931655 Author: Kent Overstreet Date: Sat Jun 8 15:25:12 2024 -0400 bcachefs: btree_node_unlock() assert we have a separate helper for releasing write locks Signed-off-by: Kent Overstreet commit dd3995a6a4fcf041297d73fb7a12c6edde339986 Author: Kent Overstreet Date: Fri Jun 7 20:53:02 2024 -0400 bcachefs: bch2_gc_pos_to_text() Signed-off-by: Kent Overstreet commit 11169d9983d55f1550ba2d65e074128dd0373937 Author: Kent Overstreet Date: Fri Jun 7 18:19:39 2024 -0400 bcachefs: bch2_btree_id_to_text() Signed-off-by: Kent Overstreet commit ae4fb17e86701c55da6867ded662d1b7aef40f12 Author: Kent Overstreet Date: Fri Jun 7 20:51:57 2024 -0400 bcachefs: Kill gc_pos_btree_node() gc_pos is now based on keys, not nodes, for invariantness w.r.t. splits and merges Signed-off-by: Kent Overstreet commit 820b9efeb142a45b2c55df0806feb34936025c2a Author: Kent Overstreet Date: Thu Jun 6 14:33:27 2024 -0400 bcachefs: Fix bch2_gc_accounting_done() locking The transaction commit path takes mark_lock, so we shouldn't be holding it; use a bpos as an iterator so that we can drop and retake. Signed-off-by: Kent Overstreet commit f73e6bb6d6c70b72aff021237b8c4722cc43a919 Author: Kent Overstreet Date: Thu Jun 6 13:48:54 2024 -0400 bcachefs: bch2_accounting_mem_gc() Add a new helper to free zeroed out accounting entries, and use it in bch2_replicas_gc2(); bch2_replicas_gc2() was killing superblock replicas entries if their corresponding accounting counters were nonzero, but that's incorrect - the superblock replicas entry needs to exist if the accounting entry exists, not if it's nonzero, because we check and create the replicas entry when creating the new accounting entry - we don't know when it's becoming nonzero. Signed-off-by: Kent Overstreet commit 2574e95a8b78ef853100d6889f154883fec989a2 Author: Kent Overstreet Date: Thu Jun 6 13:25:28 2024 -0400 bcachefs: Refactor disk accounting data structures Break up the percpu counter allocations into individual allocations for each disk accounting counter; this fixes an issue on large systems where we have too many replica entries to for the percpu allocator's max practical size. Also, use just one eytzinger tree for the normal set of counters and the gc counters; this simplifies accounting_gc_done() where we need the same set of counters to be present in both tables. Signed-off-by: Kent Overstreet commit b5597347a5c7182dba80f9fb561c404abb3cead8 Author: Brian Foster Date: Thu Jun 6 09:58:26 2024 -0400 bcachefs: fix smatch data leak warning in fs usage ioctl smatch warns that the copy of arg to userspace is a potential data leak by virtue of arg.pad not being checked or zeroed. This was introduced by the commit referenced below that switched arg from being a zeroed runtime allocation to living on the stack. Fix by simply zero initializing the structure. Fixes: cde738a61e65 ("bcachefs: Convert bch2_ioctl_fs_usage() to new accounting") Reported-by: Dan Carpenter Signed-off-by: Brian Foster Signed-off-by: Kent Overstreet commit f295920bc4a0f34f7c4182f53c8f0c929e4358a2 Author: Kent Overstreet Date: Wed Jun 5 12:35:48 2024 -0400 bcachefs: Fix race in bch2_accounting_mem_insert() bch2_accounting_mem_insert() drops and retakes mark_lock; thus, we need to check if the entry in question has already been inserted. Signed-off-by: Kent Overstreet commit 49858d869b62446e552bf9421077fb6c3125b13a Author: Ariel Miculas Date: Mon Jun 3 23:47:31 2024 +0300 bcachefs: bch2_btree_insert() - add btree iter flags The commit 65bd44239727 ("bcachefs: bch2_btree_insert_trans() no longer specifies BTREE_ITER_cached") removes BTREE_ITER_cached from bch2_btree_insert_trans, which causes the update_inode function from bcachefs-tools to take a long time (~20s). Add an iter_flags parameter to bch2_btree_insert, so the users can specify iter update trigger flags, such as BTREE_ITER_cached. Signed-off-by: Ariel Miculas Signed-off-by: Kent Overstreet commit 8863d1e092005d5b31f7e712827a5605f8a7ba22 Author: Kent Overstreet Date: Fri Mar 1 18:43:39 2024 -0500 bcachefs: BCH_IOCTL_QUERY_ACCOUNTING Add a new ioctl that can return the new accounting counter types; it takes as input a bitmask of accounting types to return. This will be used for returning e.g. compression accounting and rebalance_work accounting. Signed-off-by: Kent Overstreet commit 7f3dc6c98b52204c0060fa7eee0fbced05958544 Author: Reed Riley Date: Sat May 11 00:20:12 2024 +0000 bcachefs: support REMAP_FILE_DEDUP in bch2_remap_file_range By removing the early-exit when REMAP_FILE_DEDUP is set, we should be able to support the fideduperange ioctl, albeit less efficiently than if we handled some of the extent locking and comparison logic inside bcachefs. Extent comparison logic already exists inside of `__generic_remap_file_range_prep`. Signed-off-by: Reed Riley Signed-off-by: Kent Overstreet commit 7a254053a59008913247606d0ce4a0a8b61fe6ee Author: Hongbo Li Date: Mon Jun 3 21:26:20 2024 +0800 bcachefs: support FS_IOC_SETFSLABEL Implement support for FS_IOC_SETFSLABEL ioctl to set filesystem label. Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet commit 81bce3cf2b2b4adcba4eda58fb3ebc4082b13fb3 Author: Hongbo Li Date: Mon Jun 3 21:26:19 2024 +0800 bcachefs: support get fs label Implement support for FS_IOC_GETFSLABEL ioctl to read filesystem label. Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet commit 8a4ef7e28abade861d894e25b167988c5b8977a7 Author: Hongbo Li Date: Mon Jun 3 21:26:18 2024 +0800 bcachefs: implement FS_IOC_GETVERSION to support lsattr In this patch we add the FS_IOC_GETVERSION ioctl for getting i_generation from inode, after that, users can list file's generation number by using "lsattr". Signed-off-by: Hongbo Li Signed-off-by: Kent Overstreet commit 889fb3dc5d6f8e0931649cb5f016dd38d50fd9fe Author: Kent Overstreet Date: Wed May 29 21:14:40 2024 -0400 bcachefs: Unlock trans when waiting for user input in fsck We can't hold locks while waiting for user input, that's a deadlock. Signed-off-by: Kent Overstreet commit 747d1d6c7efdfb4e59a93a129eaf434cb9325eb8 Author: Youling Tang Date: Fri May 31 10:35:09 2024 +0800 bcachefs: Add tracepoints for bch2_sync_fs() and bch2_fsync() Add trace_bch2_sync_fs() and trace_bch2_fsync() implementations. The output in trace is as follows: sync-29779 [000] ..... 193.700935: bch2_sync_fs: dev 254,16 wait 1 <...>-40027 [002] ..... 342.535227: bch2_fsync: dev 254,32 ino 4099 parent 4096 datasync 1 Signed-off-by: Youling Tang Signed-off-by: Kent Overstreet commit 8b0882505d012ef5f309a1b547fae53080a62f07 Author: Youling Tang Date: Fri May 31 10:31:15 2024 +0800 bcachefs: track writeback errors using the generic tracking infrastructure We already using mapping_set_error() in bch2_writepage_io_done(), so all we need to do is to use file_check_and_advance_wb_err() when handling fsync() requests in bch2_fsync(). Signed-off-by: Youling Tang Signed-off-by: Kent Overstreet commit f8b0147364d5938c71c0bf315becd7a9de0d64b0 Author: Ariel Miculas Date: Fri May 31 00:13:58 2024 +0300 bcachefs: bch2_dir_emit() - fix directory reads in the fuse driver Commit 0c0cbfdb84725e9933a24ecf47c61bdeeda06ba2 dropped the ctx->pos update before the call to dir_emit. This breaks the userspace implementation, causing the directory reads to be stuck in an infinite loop. This doesn't happen in the kernel because the vfs handles the updates to ctx->pos, but in the fuse implementation nobody updates it. Signed-off-by: Ariel Miculas Signed-off-by: Kent Overstreet commit 7ed122aea2e26686467c6ec63dc4a1c060e0ff44 Author: Kent Overstreet Date: Thu May 30 15:54:08 2024 -0400 bcachefs: twf: delete dead struct fields Signed-off-by: Kent Overstreet commit d37dd9b60487357cf831720383e335ee9baf5f25 Author: Kent Overstreet Date: Wed May 29 20:37:39 2024 -0400 bcachefs: bch2_stdio_redirect_readline_timeout() Signed-off-by: Kent Overstreet commit 0c97c437e362fb825b7501bd5da801bac77981b4 Author: Kent Overstreet Date: Wed May 29 20:34:48 2024 -0400 bcachefs: twf: convert bch2_stdio_redirect_readline() to darray We now read the line from the buffer atomically, which means we have to allow the buffer to grow past STDIO_REDIRECT_BUFSIZE if we're waiting for a full line - this behaviour is necessary for stdio_redirect_readline_timeout() in the next patch. Signed-off-by: Kent Overstreet commit 36008d5d01ad155e14fd9df876d4356433613088 Author: Kent Overstreet Date: Wed May 29 22:06:00 2024 -0400 bcachefs: Plumb more logging through stdio redirect Signed-off-by: Kent Overstreet commit a850bde6498b46d6e3143d8847f9aa9598491f9f Author: Kent Overstreet Date: Thu Feb 8 21:10:32 2024 -0500 bcachefs: fsck_err() may now take a btree_trans fsck_err() now optionally takes a btree_trans; if the current thread has one, it is required that it be passed. The next patch will use this to unlock when waiting for user input. Signed-off-by: Kent Overstreet commit 38e3ca275cb00034d9bd5006573f6e32fc5e2a45 Author: Kent Overstreet Date: Wed May 29 19:37:29 2024 -0400 bcachefs: btree_types bitmask cleanups Make things more consistent and ensure that we're using u64 bitfields - key types and btree ids are already around 32 bits. Signed-off-by: Kent Overstreet commit 174722de552a8f0e3cffbe93d48420275141cc77 Author: Kent Overstreet Date: Sat Apr 6 23:58:01 2024 -0400 bcachefs: Delete old assertion for online fsck the order in which btree_gc walks keys have changed, so we no longer have the sort of issues with online fsck this assertion was warning about. Signed-off-by: Kent Overstreet commit 38ad9dc8c6194413a468f1eb288836b6c2783c6f Author: Kent Overstreet Date: Wed May 29 18:54:39 2024 -0400 bcachefs: Initialize gc buckets in alloc trigger Needed for online fsck; we need the trigger to initialize newly allocated buckets and generation number changes while gc is running. Signed-off-by: Kent Overstreet commit 9ab55df5991eb967f6b94f8e1b855ffacdc50668 Author: Kent Overstreet Date: Wed May 29 18:53:48 2024 -0400 bcachefs: Walk leaf to root in btree_gc Next change will move gc_alloc_start initialization into the alloc trigger, so we have to mark those first. Signed-off-by: Kent Overstreet commit 86d46471d52bf33e8652b220741d3223338d1724 Author: Kent Overstreet Date: Wed May 29 17:54:46 2024 -0400 bcachefs: Don't block journal when finishing check_allocations() Blocking the journal was needed to finish checking old style accounting, but that code is gone and it's not needed in the alloc rewrite, mark_lock is sufficient for synchronization. Signed-off-by: Kent Overstreet commit 5645c32ccf3197ee900dd0c0fbf66a40ad39f79f Author: Kent Overstreet Date: Wed May 29 13:55:49 2024 -0400 bcachefs: bch2_fs_get_tree() cleanup - improve error paths - call bch2_fs_start() separately, after applying late-parsed options Signed-off-by: Kent Overstreet commit 25ee25e637a6f734ed549b79b1294b0bb96d112e Author: Kent Overstreet Date: Wed May 29 13:38:06 2024 -0400 bcachefs: Kill bch2_mount() Fold into bch2_fs_get_tree() Signed-off-by: Kent Overstreet commit b9efa9673e1d3fee530b582dbde1827d336513a8 Author: Kent Overstreet Date: Wed Dec 27 11:33:21 2023 -0500 bcachefs: Eytzinger accumulation for accounting keys The btree write buffer takes as input keys from the journal, sorts them, deduplicates them, and flushes them back to the btree in sorted order. The disk space accounting rewrite is moving accounting to normal btree keys, with update (in this case deltas) accumulated in the write buffer and then flushed to the btree; but this is going to increase the number of keys handled by the write buffer by perhaps as much as a factor of 3x-5x. The overhead from copying around and sorting this many keys would cause a significant performance regression, but: there is huge locality in updates to accounting keys that we can take advantage of. Instead of appending accounting keys to the list of keys to be sorted, this patch adds an eytzinger search tree of recently seen accounting keys. We look up the accounting key in the eytzinger search tree and apply the delta directly, adding it if it doesn't exist, and periodically prune the eytzinger tree of unused entries. Signed-off-by: Kent Overstreet commit 20ac515a9cc73d48be1462d2a04cda75215a1867 Author: Kent Overstreet Date: Tue Mar 19 00:04:52 2024 -0400 bcachefs: bch_acct_rebalance_work Signed-off-by: Kent Overstreet commit 6af91147b6b90552cdf1dd400eeb9da66920f3ce Author: Kent Overstreet Date: Wed Feb 28 22:37:21 2024 -0500 bcachefs: bch_acct_btree Add counters for how much disk space we're using per btree. Signed-off-by: Kent Overstreet commit 6675c37662341cf1a2e3b502a4dafbf7571978b2 Author: Kent Overstreet Date: Mon Feb 12 02:17:02 2024 -0500 bcachefs: bch_acct_snapshot Signed-off-by: Kent Overstreet commit 72c277878031a988ca472aa41370488c726d33b0 Author: Kent Overstreet Date: Fri Feb 23 17:23:41 2024 -0500 bcachefs: bch2_fs_usage_base_to_text() Helper to show raw accounting in sysfs, mainly for debugging. Signed-off-by: Kent Overstreet commit f93bb76ba288ccc1e014037413b007b174e03f3a Author: Kent Overstreet Date: Sat Feb 24 19:58:07 2024 -0500 bcachefs: bch2_fs_accounting_to_text() Helper to show raw accounting in sysfs, mainly for debugging. Signed-off-by: Kent Overstreet commit 91f44781d59a00a3478240e0b907c70d972e8897 Author: Kent Overstreet Date: Sat Feb 24 21:09:51 2024 -0500 bcachefs: Convert bch2_compression_stats_to_text() to new accounting We no longer have to walk the whole btree to calculate compression stats. Signed-off-by: Kent Overstreet commit bfcaa9079d91cb843630403e7379bbb86d2f73b0 Author: Kent Overstreet Date: Sat Jan 6 21:42:36 2024 -0500 bcachefs: bch_acct_compression This adds per-compression-type accounting of compressed and uncompressed size as well as number of extents - meaning we can now see compression ratio (without walking the whole filesystem). Signed-off-by: Kent Overstreet commit 5668e5deec253dc4674aea00997716cc3a66aaac Author: Kent Overstreet Date: Sun Feb 18 00:13:22 2024 -0500 bcachefs: bch2_verify_accounting_clean() Verify that the in-memory accounting verifies the on-disk accounting after a clean shutdown. Signed-off-by: Kent Overstreet commit 00839addfc771e5653bb9562c5a87cd78eea0eee Author: Kent Overstreet Date: Mon Feb 12 15:21:10 2024 -0500 bcachefs: Convert bch2_replicas_gc2() to new accounting bch2_replicas_gc2() is used for garbage collection superblock replicas entries that are empty - this converts it to the new accounting scheme. Signed-off-by: Kent Overstreet commit fb23d57a6dfc4e521c003dc542799f07d22d269e Author: Kent Overstreet Date: Sun Feb 11 22:48:05 2024 -0500 bcachefs: Convert gc to new accounting Rewrite fsck/gc for the new accounting scheme. This adds a second set of in-memory accounting counters for gc to use; like with other parts of gc we run all trigger in TRIGGER_GC mode, then compare what we calculated to existing in-memory accounting at the end. Signed-off-by: Kent Overstreet commit 4c4a7d48bd59380fa4fc75f2cd341e9de09adbf7 Author: Kent Overstreet Date: Tue Jan 2 00:22:57 2024 -0500 bcachefs: Kill replicas_journal_res More dead code deletion Signed-off-by: Kent Overstreet commit 66a57684c6afce8e20ac38b389caca078407ac29 Author: Kent Overstreet Date: Tue Jan 2 00:15:16 2024 -0500 bcachefs: Kill fs_usage_online More dead code deletion. Signed-off-by: Kent Overstreet commit fe5eddc0d02176d54609c9e38044c2870750bf1d Author: Kent Overstreet Date: Sat Feb 24 20:04:48 2024 -0500 bcachefs: Kill bch2_fs_usage_to_text() Dead code. Signed-off-by: Kent Overstreet commit 8bb8d683a4013f94953da3991da4bb2c38111063 Author: Kent Overstreet Date: Wed Dec 27 22:09:25 2023 -0500 bcachefs: Delete journal-buf-sharded old style accounting More deletion of dead code. Signed-off-by: Kent Overstreet commit 5b9bc272e6c37406fcc5dba720a477d00240477a Author: Kent Overstreet Date: Sun Dec 31 22:30:15 2023 -0500 bcachefs: Kill writing old accounting to journal More ripping out of the old disk space accounting. Note that the new disk space accounting is incompatible with the old, and writing out old style disk space accounting with the new code is infeasible. This means upgrading and downgrading past this version requires regenerating accounting. Signed-off-by: Kent Overstreet commit 3afb8dbf03408099e745f12e4d121f1412575618 Author: Kent Overstreet Date: Mon Jan 1 23:36:23 2024 -0500 bcachefs: kill bch2_fs_usage_read() With bch2_ioctl_fs_usage(), this is now dead code. Signed-off-by: Kent Overstreet commit 6b39638b84b462e29e8008f5b5f6fad93e021544 Author: Kent Overstreet Date: Sat Jan 6 20:29:25 2024 -0500 bcachefs: Convert bch2_ioctl_fs_usage() to new accounting This converts bch2_ioctl_fs_usage() to read from the new disk accounting, via bch2_fs_replicas_usage_read(). Signed-off-by: Kent Overstreet commit 72a6bb098c5879ce6aa51f714730971737a0b3ca Author: Kent Overstreet Date: Fri Jan 5 21:23:07 2024 -0500 bcachefs: Kill bch2_fs_usage_initialize() Deleting code for the old disk accounting scheme. Signed-off-by: Kent Overstreet commit f5095b9f85a1674a92d00e7ab466499a8ba49ce1 Author: Kent Overstreet Date: Mon Jan 1 19:42:37 2024 -0500 bcachefs: dev_usage updated by new accounting Reading disk accounting now requires an eytzinger lookup (see: bch2_accounting_mem_read()), but the per-device counters are used frequently enough that we'd like to still be able to read them with just a percpu sum, as in the old code. This patch special cases the device counters; when we update in-memory accounting we also update the old style percpu counters if it's a deice counter update. Signed-off-by: Kent Overstreet commit 2e8d686a4a13c01d9a2b329507a0f5ce6455b5a8 Author: Kent Overstreet Date: Tue Jun 4 18:31:13 2024 -0400 bcachefs: Coalesce accounting keys before journal replay This fixes a performance regression in journal replay; without colaescing accounting keys we have multiple keys at the same position, which means journal_keys_peek_upto() has to skip past many overwritten keys - turning journal replay into an O(n^2) algorithm. Signed-off-by: Kent Overstreet commit 1d16c605cc55ef26f0c65b362665a6c99080ccbc Author: Kent Overstreet Date: Thu Nov 9 14:22:46 2023 -0500 bcachefs: Disk space accounting rewrite Main part of the disk accounting rewrite. This is a wholesale rewrite of the existing disk space accounting, which relies on percepu counters that are sharded by journal buffer, and rolled up and added to each journal write. With the new scheme, every set of counters is a distinct key in the accounting btree; this fixes scaling limitations of the old scheme, where counters took up space in each journal entry and required multiple percpu counters. Now, in memory accounting requires a single set of percpu counters - not multiple for each in flight journal buffer - and in the future we'll probably also have counters that don't use in memory percpu counters, they're not strictly required. An accounting update is now a normal btree update, using the btree write buffer path. At transaction commit time, we apply accounting updates to the in memory counters, which are percpu counters indexed in an eytzinger tree by the accounting key. Signed-off-by: Kent Overstreet commit 5d9667d1d6eaca3f6cd3c63cd6a0f309147c7f5c Author: Kent Overstreet Date: Fri Nov 17 00:23:07 2023 -0500 bcachefs: btree write buffer knows how to accumulate bch_accounting keys Teach the btree write buffer how to accumulate accounting keys - instead of having the newer key overwrite the older key as we do with other updates, we need to add them together. Also, add a flag so that write buffer flush knows when journal replay is finished flushing accounting, and teach it to hold accounting keys until that flag is set. Signed-off-by: Kent Overstreet commit 9dec2a473bd1ba6a111382928e3ceaddfbb720ba Author: Kent Overstreet Date: Wed Dec 27 20:59:01 2023 -0500 bcachefs: Accumulate accounting keys in journal replay Until accounting keys hit the btree, they are deltas, not new versions of the existing key; this means we have to teach journal replay to accumulate them. Additionally, the journal doesn't track precisely which entries have been flushed to the btree; it only tracks a range of entries that may possibly still need to be flushed. That means we need to compare accounting keys against the version in the btree and only flush updates that are newer. There's another wrinkle with the write buffer: if the write buffer starts flushing accounting keys before journal replay has finished flushing accounting keys, journal replay will see the version number from the new updates and updates from the journal will be lost. To avoid this, journal replay has to flush accounting keys first, and we'll be adding a flag so that write buffer flush knows to hold accounting keys until then. Signed-off-by: Kent Overstreet commit 2744e5c9eb1a1090b5f61c955e934c70bfe6b04c Author: Kent Overstreet Date: Wed Dec 27 18:31:46 2023 -0500 bcachefs: KEY_TYPE_accounting New key type for the disk space accounting rewrite. - Holds a variable sized array of u64s (may be more than one for accounting e.g. compressed and uncompressed size, or buckets and sectors for a given data type) - Updates are deltas, not new versions of the key: this means updates to accounting can happen via the btree write buffer, which we'll be teaching to accumulate deltas. Signed-off-by: Kent Overstreet commit 929d954330142a6273697b2cbf855f0f904a12f5 Author: Thomas Bertschinger Date: Mon May 27 22:36:11 2024 -0600 bcachefs: use new mount API This updates bcachefs to use the new mount API: - Update the file_system_type to use the new init_fs_context() function. - Define the new fs_context_operations functions. - No longer register bch2_mount() and bch2_remount(); these are now called via the new fs_context functions. - Define a new helper type, bch2_opts_parse that includes a struct bch_opts and additionally a printbuf used to save options that can't be parsed until after the FS is opened. This enables us to parse as many options as possible prior to opening the filesystem while saving those options that need the open FS for later parsing. Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet commit 1c12d1caf8d627d8b791f4dc25af2522dac7cd10 Author: Thomas Bertschinger Date: Mon May 27 22:36:10 2024 -0600 bcachefs: Add error code to defer option parsing This introduces a new error code, option_needs_open_fs, which is used to indicate that an attempt was made to parse a mount option prior to opening a filesystem, when that mount option requires an open filesystem in order to be validated. Returning this error results in bch2_parse_one_mount_opt() saving that option for later parsing, after the filesystem is opened. Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet commit 9b7f0b5d3d220ccba3151b95a5532780e04e1954 Author: Thomas Bertschinger Date: Mon May 27 22:36:09 2024 -0600 bcachefs: add printbuf arg to bch2_parse_mount_opts() Mount options that take the name of a device that may be part of a filesystem, for example "metadata_target", cannot be validated until after the filesystem has been opened. However, an attempt to parse those options may be made prior to the filesystem being opened. This change adds a printbuf parameter to bch2_parse_mount_opts() which will be used to save those mount options, when they are supplied prior to the FS being opened, so that they can be parsed later. This functionality is not currently needed, but will be used after bcachefs starts using the new mount API to parse mount options. This is because using the new mount API, we will process mount options prior to opening the FS, but the new API doesn't provide a convenient way to "replay" mount option parsing. So we save these options ourselves to accomplish this. This change also splits out the code to parse a single option into bch2_parse_one_mount_opt(), which will be useful when using the new mount API which deals with a single mount option at a time. Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet commit 7773df19c35fabdcc8c36176a480a1b19ad32866 Author: Kent Overstreet Date: Thu Apr 25 20:45:00 2024 -0400 bcachefs: metadata version bucket_stripe_sectors New on disk format version for bch_alloc->stripe_sectors and BCH_DATA_unstriped - accounting for unstriped data in stripe buckets. Upgrade/downgrade requires regenerating alloc info - but only if erasure coding is in use. Signed-off-by: Kent Overstreet commit 2612e29142ff718e6f120c62e6792f0a67fd3005 Author: Kent Overstreet Date: Thu Nov 23 16:34:03 2023 -0500 bcachefs: BCH_DATA_unstriped Add a new pseudo data type, to track buckets that are members of a stripe, but have unstriped data in them. Signed-off-by: Kent Overstreet commit 55f7962da3bb2d34525c1973189413a113667a24 Author: Kent Overstreet Date: Thu Nov 23 17:21:23 2023 -0500 bcachefs: bch_alloc->stripe_sectors Add a separate counter to bch_alloc_v4 for amount of striped data; this lets us separately track striped and unstriped data in a bucket, which lets us see when erasure coding has failed to update extents with stripe pointers, and also find buckets to continue updating if we crash mid way through creating a new stripe. Signed-off-by: Kent Overstreet commit c13d526d9dc1aa0c4962b017c881c28c1e23ca26 Author: Kent Overstreet Date: Sun May 26 18:11:37 2024 -0400 bcachefs: check_key_has_inode() Consolidate duplicated checks for extents/dirents/xattrs - these keys should all have a corresponding inode of the correct type. Signed-off-by: Kent Overstreet commit 51fc436c806c638512ea745579dbc4098a60b2d5 Author: Thomas Bertschinger Date: Sat May 25 13:36:19 2024 -0600 bcachefs: allow passing full device path for target options The output of mount options such as "metadata_target" in `/proc/mounts` uses the full path to the device. mount(8) from util-linux uses the output from `/proc/mounts` to pass existing mount options when performing a remount, so bcachefs should accept as input the same form that it prints as output. Without this change: $ mount -t bcachefs -o metadata_target=vdb /dev/vdb /mnt $ strace mount -o remount /mnt ... fsconfig(4, FSCONFIG_SET_STRING, "metadata_target", "/dev/vdb", 0) = -1 EINVAL (Invalid argument) ... Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet commit 3811f48aa3d6ab97b199bdf4bdacce7abe7cfdeb Author: Kent Overstreet Date: Sun May 26 22:20:34 2024 -0400 bcachefs: bch2_printbuf_strip_trailing_newline() Add a new helper to fix inode_to_text() Signed-off-by: Kent Overstreet commit babe30fe8db62b79f7e3df4144acc344b3672f60 Author: Thomas Bertschinger Date: Sun May 26 13:08:20 2024 -0600 bcachefs: don't expose "read_only" as a mount option When "read_only" is exposed as a mount option, it is redundant with the standard option "ro" and gives users multiple ways to specify that a bcachefs filesystem should be mounted read-only. This presents the risk of having inconsistent options specified. This can be seen when remounting a read-only filesystem in read-write mode, using mount(8) from util-linux. Because mount(8) parses the existing mount options from `/proc/mounts` and applies them when remounting, it can end up applying both "read_only" and "rw": $ mount img -o ro /mnt $ strace mount -o remount,rw /mnt ... fsconfig(4, FSCONFIG_SET_FLAG, "read_only", NULL, 0) = 0 fsconfig(4, FSCONFIG_SET_FLAG, "rw", NULL, 0) = 0 ... Making "read_only" no longer a mount option means this edge case cannot occur. Fixes: 62719cf33c3a ("bcachefs: Fix nochanges/read_only interaction") Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet commit 03ec0927fa15e1af1268c8637f61b0ac98082907 Author: Thomas Bertschinger Date: Sun May 26 13:08:19 2024 -0600 bcachefs: make offline fsck set read_only fs flag A subsequent change will remove "read_only" as a mount option in favor of the standard option "ro", meaning the userspace fsck command cannot pass it to the fsck ioctl. Instead, in offline fsck, set "read_only" kernel-side without trying to parse it as a mount option. For compatibility with versions of the "bcachefs fsck" command that try to pass the "read_only" mount opt, remove it from the mount options string prior to parsing when it is present. Signed-off-by: Thomas Bertschinger Signed-off-by: Kent Overstreet commit 652bc7fabc28294e6a6798c4d37861db605bda8d Author: Kent Overstreet Date: Fri May 24 18:04:22 2024 -0400 bcachefs: btree_ptr_sectors_written() now takes bkey_s_c this is for the userspace metadata dump tool Signed-off-by: Kent Overstreet commit 9cc8eb3098b8e78c727bc136f8e97ce5178fcce8 Author: Kent Overstreet Date: Fri May 10 09:27:09 2024 -0400 bcachefs: Check for bsets past bch_btree_ptr_v2.sectors_written Signed-off-by: Kent Overstreet commit 68573b936d3fceda9cd5cce3a577e035d19ad426 Author: Uros Bizjak Date: Thu May 23 11:19:26 2024 +0200 bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg() Use try_cmpxchg() family of functions instead of cmpxchg (*ptr, old, new) == old. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg fails. There is no need to re-read the value in the loop. No functional change intended. Signed-off-by: Uros Bizjak Cc: Kent Overstreet Cc: Brian Foster Signed-off-by: Kent Overstreet commit e76a2b65b0565f55ea668ec46d54f6a00b8ea9fc Author: Kent Overstreet Date: Fri Jun 7 16:35:42 2024 -0400 bcachefs: add might_sleep() annotations for fsck_err() Signed-off-by: Kent Overstreet commit 546b65378d0436f55cd6fcbbba890525b77d65f3 Author: Kent Overstreet Date: Mon Jun 17 13:58:17 2024 -0400 bcachefs: fix missing include fs-common.h needs dirent.h for enum bch_rename_mode Signed-off-by: Kent Overstreet commit 630d565ddad52c1777ec3b48de04ecdc21004991 Author: Youling Tang Date: Thu Apr 25 17:16:59 2024 +0800 bcachefs: Use filemap_read() to simplify the execution flow Using filemap_read() can reduce unnecessary code execution for non IOCB_DIRECT paths. Signed-off-by: Youling Tang Signed-off-by: Kent Overstreet commit da6fa380d369a7e4d61f7a654efb48a018e3e563 Author: Youling Tang Date: Thu Apr 18 08:50:55 2024 +0800 bcachefs: Align the display format of `btrees/inodes/keys` Before patch: ``` #cat btrees/inodes/keys u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755 flags= (16300000) bi_size=0 ``` After patch: ``` #cat btrees/inodes/keys u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755 flags=(16300000) bi_size=0 ``` Signed-off-by: Youling Tang Signed-off-by: Kent Overstreet commit 12e7ff1a1ee5dda5880116db451a3f3d23a79267 Author: Youling Tang Date: Thu Apr 18 16:31:03 2024 +0800 bcachefs: Fix missing spaces in journal_entry_dev_usage_to_text Fixed missing spaces displayed in journal_entry_dev_usage_to_text while adjusting the display format to improve readability. before: ``` # bcachefs list_journal -a -t alloc:1:0 /dev/sdb ... dev_usage: dev=0free: buckets=233180 sectors=0 fragmented=0sb: buckets=13 sectors=6152 fragmented=504journal: buckets=1847 sectors=945664 fragmented=0btree: buckets=20 sectors=10240 fragmented=0user: buckets=1419 sectors=726513 fragmented=15cached: buckets=0 sectors=0 fragmented=0parity: buckets=0 sectors=0 fragmented=0stripe: buckets=0 sectors=0 fragmented=0need_gc_gens: buckets=0 sectors=0 fragmented=0need_discard: buckets=1 sectors=0 fragmented=0 ``` after: ``` # bcachefs list_journal -a -t alloc:1:0 /dev/sdb ... dev_usage: dev=0 free: buckets=233180 sectors=0 fragmented=0 sb: buckets=13 sectors=6152 fragmented=504 journal: buckets=1847 sectors=945664 fragmented=0 btree: buckets=20 sectors=10240 fragmented=0 user: buckets=1419 sectors=726513 fragmented=15 cached: buckets=0 sectors=0 fragmented=0 parity: buckets=0 sectors=0 fragmented=0 stripe: buckets=0 sectors=0 fragmented=0 need_gc_gens: buckets=0 sectors=0 fragmented=0 need_discard: buckets=1 sectors=0 fragmented=0 ``` Signed-off-by: Youling Tang Signed-off-by: Kent Overstreet commit f369de82679f4f71d4f5e8a3149a80ebc1bfc987 Author: Kent Overstreet Date: Thu Jul 4 17:10:29 2024 -0400 bcachefs: fix ei_update_lock lock ordering ei_update_lock is largely vestigal and will probably be removed, but we're not ready for that just yet. this fixes some lockdep splats with the new lockdep support for btree node locks; they're harmless, since we were taking ei_update_lock before actually locking any btree nodes, but "any btree nodes locked" are now tracked at the btree_trans level. Signed-off-by: Kent Overstreet commit cdda2126ab0dfeafc52c725f808baed7ea26d0b5 Author: Kent Overstreet Date: Thu Jul 11 16:30:41 2024 -0400 bcachefs: bch2_btree_reserve_cache_to_text() Add a pretty printer so the btree reserve cache can be seen in sysfs; as it pins open_buckets we need it for tracking down open_buckets issues. Signed-off-by: Kent Overstreet commit d06a26d24db090d8be0ea4c9bfa1457e334940b7 Author: Kent Overstreet Date: Thu Jul 11 16:11:45 2024 -0400 bcachefs: sysfs trigger_freelist_wakeup another debugging knob Signed-off-by: Kent Overstreet commit a1e7a97f22bf688a1234e698d342726e70f8a25b Author: Kent Overstreet Date: Fri Jun 28 21:40:00 2024 -0400 bcachefs: sysfs internal/trigger_journal_writes another debugging knob - trigger the journal to do ready journal writes Signed-off-by: Kent Overstreet commit 26a170aa6182209723f7654eaeddcab7b58a9d83 Author: Kent Overstreet Date: Thu Jul 11 16:00:46 2024 -0400 bcachefs: add capacity, reserved to fs_alloc_debug_to_text() Signed-off-by: Kent Overstreet commit 8a3c8303e2f1834a79e00305d94ef562946c2ef4 Author: Kent Overstreet Date: Sat Jun 29 14:37:46 2024 -0400 bcachefs: uninline fallocate functions better stack traces Signed-off-by: Kent Overstreet commit 52fd0f96206831ed4b75d2060f2e2a96bf2624b0 Author: Kent Overstreet Date: Wed Jul 10 18:03:11 2024 -0400 bcachefs: btree ids are 64 bit bitmasks Signed-off-by: Kent Overstreet commit 3de8fd4a33c9caf5ca798373800a37e4f206d8ed Author: Kent Overstreet Date: Thu Jul 11 14:08:38 2024 -0400 bcachefs: Print allocator stuck on timeout in fallocate path same as in io_write.c, if we're waiting on the allocator for an excessive amount of time, print what's going on Signed-off-by: Kent Overstreet commit 1ea3fd1eb9869fcdcbc9c68f9728bfc47b9503f1 Author: Guenter Roeck Date: Sat Jul 13 12:03:53 2024 -0700 hwmon: (max6697) Fix swapped temp{1,8} critical alarms The critical alarm bit for the local temperature sensor (temp1) is in bit 7 of register 0x45 (not bit 6), and the critical alarm bit for remote temperature sensor 7 (temp8) is in bit 6 (not bit 7). This only affects MAX6581 since all other chips supported by this driver do not support those critical alarms. Fixes: 5372d2d71c46 ("hwmon: Driver for Maxim MAX6697 and compatibles") Reviewed-by: Tzung-Bi Shih Signed-off-by: Guenter Roeck commit cbf7467828cd4ec7ceac7a8b5b5ddb2f69f07b0e Author: Guenter Roeck Date: Sat Jul 13 14:26:19 2024 -0700 hwmon: (max6697) Fix underflow when writing limit attributes Using DIV_ROUND_CLOSEST() on an unbound value can result in underflows. Indeed, module test scripts report: temp1_max: Suspected underflow: [min=0, read 255000, written -9223372036854775808] temp1_crit: Suspected underflow: [min=0, read 255000, written -9223372036854775808] Fix by introducing an extra set of clamping. Fixes: 5372d2d71c46 ("hwmon: Driver for Maxim MAX6697 and compatibles") Reviewed-by: Tzung-Bi Shih Signed-off-by: Guenter Roeck commit ed99ae74f2328e42286880c946953a8f9dd95a7e Author: Guenter Roeck Date: Fri Jul 12 10:27:26 2024 -0700 hwmon: Remove obsolete adm1021 and max6642 drivers ADM1021, MAX6642, and compatible chips are supported by the lm90 driver. Remove the obsolete stand-alone drivers to reduce maintenance overhead. Reviewed-by: Tzung-Bi Shih Signed-off-by: Guenter Roeck commit 8fc1e8b230771442133d5cf5fa4313277aa2bb8b Author: Edson Juliano Drosdeck Date: Fri Jul 12 15:06:42 2024 -0300 ALSA: hda/realtek: Enable headset mic on Positivo SU C1400 Positivo SU C1400 is equipped with ALC256, and it needs ALC269_FIXUP_ASPIRE_HEADSET_MIC quirk to make its headset mic work. Signed-off-by: Edson Juliano Drosdeck Cc: Link: https://patch.msgid.link/20240712180642.22564-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai commit 62fdd1708fcb3e1c58d21221bf0861a8b1975f90 Merge: ecb1e1dcb7b5d d5b60c6517d22 Author: Jakub Kicinski Date: Sun Jul 14 07:56:32 2024 -0700 Merge tag 'ipsec-next-2024-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2024-07-13 1) Support sending NAT keepalives in ESP in UDP states. Userspace IKE daemon had to do this before, but the kernel can better keep track of it. From Eyal Birger. 2) Support IPsec crypto offload for IPv6 ESP and IPv4 UDP-encapsulated ESP data paths. Currently, IPsec crypto offload is enabled for GRO code path only. This patchset support UDP encapsulation for the non GRO path. From Mike Yu. * tag 'ipsec-next-2024-07-13' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: xfrm: Support crypto offload for outbound IPv4 UDP-encapsulated ESP packet xfrm: Support crypto offload for inbound IPv4 UDP-encapsulated ESP packet xfrm: Allow UDP encapsulation in crypto offload control path xfrm: Support crypto offload for inbound IPv6 ESP packets not in GRO path xfrm: support sending NAT keepalives in ESP in UDP states ==================== Link: https://patch.msgid.link/20240713102416.3272997-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit ecb1e1dcb7b5d68828c13ab3f99e399b4ec0c350 Merge: 861f34e61774f 23020f0493270 Author: Jakub Kicinski Date: Sun Jul 14 07:46:55 2024 -0700 Merge branch 'introduce-en7581-ethernet-support' Lorenzo Bianconi says: ==================== Introduce EN7581 ethernet support Add airoha_eth driver in order to introduce ethernet support for Airoha EN7581 SoC available on EN7581 development board. EN7581 mac controller is mainly composed by Frame Engine (FE) and QoS-DMA (QDMA) modules. FE is used for traffic offloading (just basic functionalities are supported now) while QDMA is used for DMA operation and QOS functionalities between mac layer and the dsa switch (hw QoS is not available yet and it will be added in the future). Currently only hw lan features are available, hw wan will be added with subsequent patches. ==================== Link: https://patch.msgid.link/cover.1720818878.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 23020f04932701d5c8363e60756f12b43b8ed752 Author: Lorenzo Bianconi Date: Fri Jul 12 23:27:58 2024 +0200 net: airoha: Introduce ethernet support for EN7581 SoC Add airoha_eth driver in order to introduce ethernet support for Airoha EN7581 SoC available on EN7581 development board (en7581-evb). EN7581 mac controller is mainly composed by the Frame Engine (PSE+PPE) and QoS-DMA (QDMA) modules. FE is used for traffic offloading (just basic functionalities are currently supported) while QDMA is used for DMA operations and QOS functionalities between the mac layer and the external modules conncted to the FE GDM ports (e.g MT7530 DSA switch or external phys). A general overview of airoha_eth architecture is reported below: ┌───────┐ ┌───────┐ │ QDMA2 │ │ QDMA1 │ └───┬───┘ └───┬───┘ │ │ ┌───────▼─────────────────────────────────────────────▼────────┐ │ │ │ P5 P0 │ │ │ │ │ │ │ ┌──────┐ │ P3 ├────► GDM3 │ │ │ └──────┘ │ │ │ │ ┌─────┐ │ │ │ PPE ◄────┤ P4 PSE │ └─────┘ │ │ │ │ │ │ │ │ ┌──────┐ │ P9 ├────► GDM4 │ │ │ └──────┘ │ │ │ │ │ │ │ P2 P1 │ └─────────┬───────────────────────────────────────────┬────────┘ │ │ ┌───▼──┐ ┌──▼───┐ │ GDM2 │ │ GDM1 │ └──────┘ └──┬───┘ │ ┌────▼─────┐ │ MT7530 │ └──────────┘ Currently only hw LAN features (QDMA1+GDM1) are available while hw WAN (QDMA2+GDM{2,3,4}) ones will be added with subsequent patches introducing traffic offloading support. Tested-by: Benjamin Larsson Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/274945d2391c195098ab180a46d0617b18b9e42c.1720818878.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 6bc8719c9dbf2d107760a238394dd77bb7df9ab9 Author: Lorenzo Bianconi Date: Fri Jul 12 23:27:57 2024 +0200 dt-bindings: net: airoha: Add EN7581 ethernet controller Introduce device-tree binding documentation for Airoha EN7581 ethernet mac controller. Reviewed-by: Rob Herring (Arm) Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/7dfecf8aa4e6519562a94455b95c49e1b3c858a0.1720818878.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 97d9fba9a812cada5484667a46e14a4c976ca330 Author: Breno Leitao Date: Fri Jul 12 07:34:15 2024 -0700 net: netconsole: Disable target before netpoll cleanup Currently, netconsole cleans up the netpoll structure before disabling the target. This approach can lead to race conditions, as message senders (write_ext_msg() and write_msg()) check if the target is enabled before using netpoll. The sender can validate that the target is enabled, but, the netpoll might be de-allocated already, causing undesired behaviours. This patch reverses the order of operations: 1. Disable the target 2. Clean up the netpoll structure This change eliminates the potential race condition, ensuring that no messages are sent through a partially cleaned-up netpoll structure. Fixes: 2382b15bcc39 ("netconsole: take care of NETDEV_UNREGISTER event") Cc: stable@vger.kernel.org Signed-off-by: Breno Leitao Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240712143415.1141039-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 861f34e61774ff3c2c0d0a87592518ff6e68d889 Merge: 852e42cc2dd47 e10989e56f523 Author: Jakub Kicinski Date: Sun Jul 14 07:37:29 2024 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: Switch API optimizations Marcin Szycik says: Optimize the process of creating a recipe in the switch block by removing duplicate switch ID words and changing how result indexes are fitted into recipes. In many cases this can decrease the number of recipes required to add a certain set of rules, potentially allowing a more varied set of rules to be created. Total rule count will also increase, since less words will be left unused/wasted. There are only 64 rules available in total, so every one counts. After this modification, many fields and some structs became unused or were simplified, resulting in overall simpler implementation. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Add tracepoint for adding and removing switch rules ice: Remove unused members from switch API ice: Optimize switch recipe creation ice: remove unused recipe bookkeeping data ice: Simplify bitmap setting in adding recipe ice: Remove reading all recipes before adding a new one ice: Remove unused struct ice_prot_lkup_ext members ==================== Link: https://patch.msgid.link/20240711181312.2019606-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit d657f5c76c47eca50dd61b5c1e150dac05e07046 Merge: f67a90a0c8f5b 39367183aecfc Author: Jakub Kicinski Date: Sun Jul 14 07:34:17 2024 -0700 Merge branch 'vrf-fix-source-address-selection-with-route-leak' Nicolas Dichtel says: ==================== vrf: fix source address selection with route leak For patch 1 and 2, I didn't find the exact commit that introduced this bug, but I suspect it has been here since the first version. I arbitrarily choose one. ==================== Link: https://patch.msgid.link/20240710081521.3809742-1-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit 39367183aecfc05f006a29b1f96708a6d1a3d8c3 Author: Nicolas Dichtel Date: Wed Jul 10 10:14:30 2024 +0200 selftests: vrf_route_leaking: add local test The goal is to check that the source address selected by the kernel is routable when a leaking route is used. ICMP, TCP and UDP connections are tested. The symmetric topology is enough for this test. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Link: https://patch.msgid.link/20240710081521.3809742-5-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit abb9a68d2c64dd9b128ae1f2e635e4d805e7ce64 Author: Nicolas Dichtel Date: Wed Jul 10 10:14:29 2024 +0200 ipv6: take care of scope when choosing the src addr When the source address is selected, the scope must be checked. For example, if a loopback address is assigned to the vrf device, it must not be chosen for packets sent outside. CC: stable@vger.kernel.org Fixes: afbac6010aec ("net: ipv6: Address selection needs to consider L3 domains") Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Link: https://patch.msgid.link/20240710081521.3809742-4-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit 252442f2ae317d109ef0b4b39ce0608c09563042 Author: Nicolas Dichtel Date: Wed Jul 10 10:14:28 2024 +0200 ipv6: fix source address selection with route leak By default, an address assigned to the output interface is selected when the source address is not specified. This is problematic when a route, configured in a vrf, uses an interface from another vrf (aka route leak). The original vrf does not own the selected source address. Let's add a check against the output interface and call the appropriate function to select the source address. CC: stable@vger.kernel.org Fixes: 0d240e7811c4 ("net: vrf: Implement get_saddr for IPv6") Signed-off-by: Nicolas Dichtel Link: https://patch.msgid.link/20240710081521.3809742-3-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit 6807352353561187a718e87204458999dbcbba1b Author: Nicolas Dichtel Date: Wed Jul 10 10:14:27 2024 +0200 ipv4: fix source address selection with route leak By default, an address assigned to the output interface is selected when the source address is not specified. This is problematic when a route, configured in a vrf, uses an interface from another vrf (aka route leak). The original vrf does not own the selected source address. Let's add a check against the output interface and call the appropriate function to select the source address. CC: stable@vger.kernel.org Fixes: 8cbb512c923d ("net: Add source address lookup op for VRF") Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Link: https://patch.msgid.link/20240710081521.3809742-2-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit f67a90a0c8f5b3d0acc18f10650d90fec44775f9 Author: Amit Cohen Date: Thu Jul 11 17:27:02 2024 +0200 selftests: forwarding: devlink_lib: Wait for udev events after reloading Lately, an additional locking was added by commit c0a40097f0bc ("drivers: core: synchronize really_probe() and dev_uevent()"). The locking protects dev_uevent() calling. This function is used to send messages from the kernel to user space. Uevent messages notify user space about changes in device states, such as when a device is added, removed, or changed. These messages are used by udev (or other similar user-space tools) to apply device-specific rules. After reloading devlink instance, udev events should be processed. This locking causes a short delay of udev events handling. One example for useful udev rule is renaming ports. 'forwading.config' can be configured to use names after udev rules are applied. Some tests run devlink_reload() and immediately use the updated names. This worked before the above mentioned commit was pushed, but now the delay of uevent messages causes that devlink_reload() returns before udev events are handled and tests fail. Adjust devlink_reload() to not assume that udev events are already processed when devlink reload is done, instead, wait for udev events to ensure they are processed before returning from the function. Without this patch: TESTS='rif_mac_profile' ./resource_scale.sh TEST: 'rif_mac_profile' 4 [ OK ] sysctl: cannot stat /proc/sys/net/ipv6/conf/swp1/disable_ipv6: No such file or directory sysctl: cannot stat /proc/sys/net/ipv6/conf/swp1/disable_ipv6: No such file or directory sysctl: cannot stat /proc/sys/net/ipv6/conf/swp2/disable_ipv6: No such file or directory sysctl: cannot stat /proc/sys/net/ipv6/conf/swp2/disable_ipv6: No such file or directory Cannot find device "swp1" Cannot find device "swp2" TEST: setup_wait_dev (: Interface swp1 does not come up.) [FAIL] With this patch: $ TESTS='rif_mac_profile' ./resource_scale.sh TEST: 'rif_mac_profile' 4 [ OK ] TEST: 'rif_mac_profile' overflow 5 [ OK ] This is relevant not only for this test. Fixes: bc7cbb1e9f4c ("selftests: forwarding: Add devlink_lib.sh") Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://patch.msgid.link/89367666e04b38a8993027f1526801ca327ab96a.1720709333.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 5f25f553b823d8d047662de8cc186f272bfd7fee Merge: 70c676cb3dfcc 4cddb0f15ea9c Author: Jakub Kicinski Date: Sun Jul 14 07:16:21 2024 -0700 Merge branch 'net-pse-pd-fix-possible-issues-with-a-pse-supporting-both-c33-and-podl' Kory Maincent says: ==================== net: pse-pd: Fix possible issues with a PSE supporting both c33 and PoDL Although PSE controllers supporting both c33 and PoDL are not on the market yet, we want to prevent potential issues from arising in the future. Two possible issues could occur with a PSE supporting both c33 and PoDL: - Setting the config for one type of PSE leaves the other type's config null. In this case, the PSE core would return EOPNOTSUPP, which is not the correct behavior. - Null dereference of Netlink attributes as only one of the Netlink attributes would be specified at a time. This patch series contains two patches to fix these issues. ==================== Link: https://patch.msgid.link/20240711-fix_pse_pd_deref-v3-0-edd78fc4fe42@bootlin.com Signed-off-by: Jakub Kicinski commit 4cddb0f15ea9c62f81b4889ea69a99368cc63a86 Author: Kory Maincent Date: Thu Jul 11 15:55:19 2024 +0200 net: ethtool: pse-pd: Fix possible null-deref Fix a possible null dereference when a PSE supports both c33 and PoDL, but only one of the netlink attributes is specified. The c33 or PoDL PSE capabilities are already validated in the ethnl_set_pse_validate() call. Signed-off-by: Kory Maincent Reported-by: Jakub Kicinski Closes: https://lore.kernel.org/netdev/20240705184116.13d8235a@kernel.org/ Fixes: 4d18e3ddf427 ("net: ethtool: pse-pd: Expand pse commands with the PSE PoE interface") Link: https://patch.msgid.link/20240711-fix_pse_pd_deref-v3-2-edd78fc4fe42@bootlin.com Signed-off-by: Jakub Kicinski commit 93c3a96c301f0b1ac0bafb5e74bef58e79937648 Author: Kory Maincent Date: Thu Jul 11 15:55:18 2024 +0200 net: pse-pd: Do not return EOPNOSUPP if config is null For a PSE supporting both c33 and PoDL, setting config for one type of PoE leaves the other type's config null. Currently, this case returns EOPNOTSUPP, which is incorrect. Instead, we should do nothing if the configuration is empty. Signed-off-by: Kory Maincent Fixes: d83e13761d5b ("net: pse-pd: Use regulator framework within PSE framework") Link: https://patch.msgid.link/20240711-fix_pse_pd_deref-v3-1-edd78fc4fe42@bootlin.com Signed-off-by: Jakub Kicinski commit 70c676cb3dfcc75e32eaf0e98eba6814ebfc6af6 Merge: 528dd46d0fc35 89a2aefe4b084 Author: Jakub Kicinski Date: Sun Jul 14 07:10:49 2024 -0700 Merge tag 'ipsec-2024-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2024-07-11 1) Fix esp_output_tail_tcp() on unsupported ESPINTCP. From Hagar Hemdan. 2) Fix two bugs in the recently introduced SA direction separation. From Antony Antony. 3) Fix unregister netdevice hang on hardware offload. We had to add another list where skbs linked to that are unlinked from the lists (deleted) but not yet freed. 4) Fix netdev reference count imbalance in xfrm_state_find. From Jianbo Liu. 5) Call xfrm_dev_policy_delete when killingi them on offloaded policies. Jianbo Liu. * tag 'ipsec-2024-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: call xfrm_dev_policy_delete when kill policy xfrm: fix netdev reference count imbalance xfrm: Export symbol xfrm_dev_state_delete. xfrm: Fix unregister netdevice hang on hardware offload. xfrm: Log input direction mismatch error in one place xfrm: Fix input error path memory access net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP ==================== Link: https://patch.msgid.link/20240711100025.1949454-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 6887a9ace00413c9538261b13e07b22cc13cf099 Author: Oscar Salvador Date: Sat May 18 13:58:08 2024 +0200 sh: config: Drop CONFIG_MEMORY_{HOTPLUG,HOTREMOVE} Signed-off-by: Oscar Salvador Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20240518115808.8888-3-osalvador@suse.de Signed-off-by: John Paul Adrian Glaubitz commit a71ac6c956ee8aac289c7c9dd12dfe1ee3447006 Author: Oscar Salvador Date: Sat May 18 13:58:07 2024 +0200 sh: Drop support for memory hotplug and memory hotremove Support for memory hotplug was restricted to 64-bit platforms in 7ec58a2b941e ("mm/memory_hotplug: restrict CONFIG_MEMORY_HOTPLUG to 64 bit") while sh is a pure 32-bit platform since the removal of sh5 support. Thus, drop support for memory hotplug and the associated memory hotremove on this platform. Signed-off-by: Oscar Salvador Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20240518115808.8888-2-osalvador@suse.de Signed-off-by: John Paul Adrian Glaubitz commit 3c80ebb70e7beea39924939e3f1c6e7433b3b81f Merge: 3c1743a685b19 36a5c03f23271 Author: Jens Axboe Date: Sun Jul 14 01:50:42 2024 -0600 Merge tag 'md-6.11-20240712' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.11/block Pull MD fixes from Song: "Changes in this set are: 1. md-cluster fixes by Heming Zhao; 2. raid1 fix by Mateusz Jończyk." * tag 'md-6.11-20240712' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: set max_sectors during early return from choose_slow_rdev() md-cluster: fix no recovery job when adding/re-adding a disk md-cluster: fix hanging issue while a new disk adding commit 1df03a4b44146c4f720d793915747272c7773a3e Author: Konstantin Taranov Date: Thu Jul 11 06:37:57 2024 -0700 RDMA/mana_ib: Set correct device into ib Add mana_get_primary_netdev_rcu helper to get a primary netdevice for a given port. When mana is used with netvsc, the VF netdev is controlled by an upper netvsc device. In a baremetal case, the VF netdev is the primary device. Use the mana_get_primary_netdev_rcu() helper in the mana_ib to get the correct device for querying network states. Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1") Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1720705077-322-1-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit 95b087f87b780daafad1dbb2c84e81b729d5d33f Author: Jack Wang Date: Wed Jul 10 14:21:02 2024 +0200 bnxt_re: Fix imm_data endianness When map a device between servers with MLX and BCM RoCE nics, RTRS server complain about unknown imm type, and can't map the device, After more debug, it seems bnxt_re wrongly handle the imm_data, this patch fixed the compat issue with MLX for us. In off list discussion, Selvin confirmed HW is working in little endian format and all data needs to be converted to LE while providing. This patch fix the endianness for imm_data Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20240710122102.37569-1-jinpu.wang@ionos.com Acked-by: Selvin Xavier Signed-off-by: Leon Romanovsky commit 2043a14fb3de9d88440b21590f714306fcbbd55f Author: David Ahern Date: Wed Jul 10 13:33:10 2024 -0700 RDMA: Fix netdev tracker in ib_device_set_netdev If a netdev has already been assigned, ib_device_set_netdev needs to release the reference on the older netdev but it is mistakenly being called for the new netdev. Fix it and in the process use netdev_put to be symmetrical with the netdev_hold. Fixes: 09f530f0c6d6 ("RDMA: Add netdevice_tracker to ib_device_set_netdev()") Signed-off-by: David Ahern Link: https://lore.kernel.org/r/20240710203310.19317-1-dsahern@kernel.org Signed-off-by: Leon Romanovsky commit 872bb37f6829d4f7f3ed5afe2786add3d4384b4b Author: Kees Cook Date: Tue Jul 2 14:16:16 2024 -0700 randomize_kstack: Improve stack alignment codegen The codgen for adding architecture-specific stack alignment to the effective alloca() usage is somewhat inefficient and allows a bit to get carried beyond the desired entropy range. This isn't really a problem, but it's unexpected and the codegen is kind of bad. Quoting Mark[1], the disassembly for arm64's invoke_syscall() looks like: // offset = raw_cpu_read(kstack_offset) mov x4, sp adrp x0, kstack_offset mrs x5, tpidr_el1 add x0, x0, #:lo12:kstack_offset ldr w0, [x0, x5] // offset = KSTACK_OFFSET_MAX(offset) and x0, x0, #0x3ff // alloca(offset) add x0, x0, #0xf and x0, x0, #0x7f0 sub sp, x4, x0 ... which in C would be: offset = raw_cpu_read(kstack_offset) offset &= 0x3ff; // [0x0, 0x3ff] offset += 0xf; // [0xf, 0x40e] offset &= 0x7f0; // [0x0, ... so when *all* bits [3:0] are 0, they'll have no impact, and when *any* of bits [3:0] are 1 they'll trigger a carry into bit 4, which could ripple all the way up and spill into bit 10. Switch the masking in KSTACK_OFFSET_MAX() to explicitly clear the bottom bits to avoid the rounding by using 0b1111110000 instead of 0b1111111111: // offset = raw_cpu_read(kstack_offset) mov x4, sp adrp x0, 0 mrs x5, tpidr_el1 add x0, x0, #:lo12:kstack_offset ldr w0, [x0, x5] // offset = KSTACK_OFFSET_MAX(offset) and x0, x0, #0x3f0 // alloca(offset) sub sp, x4, x0 Suggested-by: Mark Rutland Link: https://lore.kernel.org/lkml/ZnVfOnIuFl2kNWkT@J2N7QTR9R3/ [1] Link: https://lore.kernel.org/r/20240702211612.work.576-kees@kernel.org Signed-off-by: Kees Cook commit 21f93108306026b8066db31c24a097192c8c36c7 Author: Kees Cook Date: Fri Jun 21 13:50:44 2024 -0700 exec: Avoid pathological argc, envc, and bprm->p values Make sure nothing goes wrong with the string counters or the bprm's belief about the stack pointer. Add checks and matching self-tests. Take special care for !CONFIG_MMU, since argmin is not exposed there. For 32-bit validation, 32-bit UML was used: $ tools/testing/kunit/kunit.py run \ --make_options CROSS_COMPILE=i686-linux-gnu- \ --make_options SUBARCH=i386 \ exec For !MMU validation, m68k was used: $ tools/testing/kunit/kunit.py run \ --arch m68k --make_option CROSS_COMPILE=m68k-linux-gnu- \ exec Link: https://lore.kernel.org/r/20240520021615.741800-2-keescook@chromium.org Link: https://lore.kernel.org/r/20240621205046.4001362-2-kees@kernel.org Signed-off-by: Kees Cook commit 084ebf7ca83e6cb743784f2eecc654193ce064fb Author: Kees Cook Date: Fri Jun 21 13:50:43 2024 -0700 execve: Keep bprm->argmin behind CONFIG_MMU When argmin was added in commit 655c16a8ce9c ("exec: separate MM_ANONPAGES and RLIMIT_STACK accounting"), it was intended only for validating stack limits on CONFIG_MMU[1]. All checking for reaching the limit (argmin) is wrapped in CONFIG_MMU ifdef checks, though setting argmin was not. That argmin is only supposed to be used under CONFIG_MMU was rediscovered recently[2], and I don't want to trip over this again. Move argmin's declaration into the existing CONFIG_MMU area, and add helpers functions so the MMU tests can be consolidated. Link: https://lore.kernel.org/all/20181126122307.GA1660@redhat.com [1] Link: https://lore.kernel.org/all/202406211253.7037F69@keescook/ [2] Link: https://lore.kernel.org/r/20240621205046.4001362-1-kees@kernel.org Signed-off-by: Kees Cook commit bb032b2352c33be374136889789103d724f1b613 Merge: bc2e3253ca965 88a0a4f6068c6 Author: Oliver Upton Date: Sun Jul 14 00:28:57 2024 +0000 Merge branch kvm-arm64/docs into kvmarm/next * kvm-arm64/docs: : KVM Documentation fixes, courtesy of Changyuan Lyu : : Small set of typo fixes / corrections to the KVM API documentation : relating to MSIs and arm64 VGIC UAPI. MAINTAINERS: Include documentation in KVM/arm64 entry KVM: Documentation: Correct the VGIC V2 CPU interface addr space size KVM: Documentation: Enumerate allowed value macros of `irq_type` KVM: Documentation: Fix typo `BFD` Signed-off-by: Oliver Upton commit bc2e3253ca965fc6a2df1ba242cf10a4ef9462f1 Merge: 8c2899e7706ed 91e9cc70b7751 Author: Oliver Upton Date: Sun Jul 14 00:28:30 2024 +0000 Merge branch kvm-arm64/nv-tcr2 into kvmarm/next * kvm-arm64/nv-tcr2: : Fixes to the handling of TCR_EL1, courtesy of Marc Zyngier : : Series addresses a couple gaps that are present in KVM (from cover : letter): : : - VM configuration: HCRX_EL2.TCR2En is forced to 1, and we blindly : save/restore stuff. : : - trap bit description and routing: none, obviously, since we make a : point in not trapping. KVM: arm64: Honor trap routing for TCR2_EL1 KVM: arm64: Make PIR{,E0}_EL1 save/restore conditional on FEAT_TCRX KVM: arm64: Make TCR2_EL1 save/restore dependent on the VM features KVM: arm64: Get rid of HCRX_GUEST_FLAGS KVM: arm64: Correctly honor the presence of FEAT_TCRX Signed-off-by: Oliver Upton commit 8c2899e7706edee1486bd8f4b77d3c71f44807c6 Merge: 1270dad310977 f1ee914fb6268 Author: Oliver Upton Date: Sun Jul 14 00:27:01 2024 +0000 Merge branch kvm-arm64/nv-sve into kvmarm/next * kvm-arm64/nv-sve: : CPTR_EL2, FPSIMD/SVE support for nested : : This series brings support for honoring the guest hypervisor's CPTR_EL2 : trap configuration when running a nested guest, along with support for : FPSIMD/SVE usage at L1 and L2. KVM: arm64: Allow the use of SVE+NV KVM: arm64: nv: Add additional trap setup for CPTR_EL2 KVM: arm64: nv: Add trap description for CPTR_EL2 KVM: arm64: nv: Add TCPAC/TTA to CPTR->CPACR conversion helper KVM: arm64: nv: Honor guest hypervisor's FP/SVE traps in CPTR_EL2 KVM: arm64: nv: Load guest FP state for ZCR_EL2 trap KVM: arm64: nv: Handle CPACR_EL1 traps KVM: arm64: Spin off helper for programming CPTR traps KVM: arm64: nv: Ensure correct VL is loaded before saving SVE state KVM: arm64: nv: Use guest hypervisor's max VL when running nested guest KVM: arm64: nv: Save guest's ZCR_EL2 when in hyp context KVM: arm64: nv: Load guest hyp's ZCR into EL1 state KVM: arm64: nv: Handle ZCR_EL2 traps KVM: arm64: nv: Forward SVE traps to guest hypervisor KVM: arm64: nv: Forward FP/ASIMD traps to guest hypervisor Signed-off-by: Oliver Upton commit 1270dad3109770fc12c1f09f7bab4bceaf2fb829 Merge: 377d0e5d77953 eca4ba5b6dff9 Author: Oliver Upton Date: Sun Jul 14 00:23:32 2024 +0000 Merge branch kvm-arm64/el2-kcfi into kvmarm/next * kvm-arm64/el2-kcfi: : kCFI support in the EL2 hypervisor, courtesy of Pierre-Clément Tosi : : Enable the usage fo CONFIG_CFI_CLANG (kCFI) for hardening indirect : branches in the EL2 hypervisor. Unlike kernel support for the feature, : CFI failures at EL2 are always fatal. KVM: arm64: nVHE: Support CONFIG_CFI_CLANG at EL2 KVM: arm64: Introduce print_nvhe_hyp_panic helper arm64: Introduce esr_brk_comment, esr_is_cfi_brk KVM: arm64: VHE: Mark __hyp_call_panic __noreturn KVM: arm64: nVHE: gen-hyprel: Skip R_AARCH64_ABS32 KVM: arm64: nVHE: Simplify invalid_host_el2_vect KVM: arm64: Fix __pkvm_init_switch_pgd call ABI KVM: arm64: Fix clobbered ELR in sync abort/SError Signed-off-by: Oliver Upton commit 377d0e5d7795381a4b676d7030266b4836cec53a Merge: 435a9f60eda44 b0539664cbc3c Author: Oliver Upton Date: Sun Jul 14 00:15:00 2024 +0000 Merge branch kvm-arm64/ctr-el0 into kvmarm/next * kvm-arm64/ctr-el0: : Support for user changes to CTR_EL0, courtesy of Sebastian Ott : : Allow userspace to change the guest-visible value of CTR_EL0 for a VM, : so long as the requested value represents a subset of features supported : by hardware. In other words, prevent the VMM from over-promising the : capabilities of hardware. : : Make this happen by fitting CTR_EL0 into the existing infrastructure for : feature ID registers. KVM: selftests: Assert that MPIDR_EL1 is unchanged across vCPU reset KVM: arm64: nv: Unfudge ID_AA64PFR0_EL1 masking KVM: selftests: arm64: Test writes to CTR_EL0 KVM: arm64: rename functions for invariant sys regs KVM: arm64: show writable masks for feature registers KVM: arm64: Treat CTR_EL0 as a VM feature ID register KVM: arm64: unify code to prepare traps KVM: arm64: nv: Use accessors for modifying ID registers KVM: arm64: Add helper for writing ID regs KVM: arm64: Use read-only helper for reading VM ID registers KVM: arm64: Make idregs debugfs iterator search sysreg table directly KVM: arm64: Get sys_reg encoding from descriptor in idregs_debug_show() Signed-off-by: Oliver Upton commit 435a9f60eda4437cb779db940d8f407640e525c7 Merge: a35d5b2032cec 3cfde36df7aba Author: Oliver Upton Date: Sun Jul 14 00:11:45 2024 +0000 Merge branch kvm-arm64/shadow-mmu into kvmarm/next * kvm-arm64/shadow-mmu: : Shadow stage-2 MMU support for NV, courtesy of Marc Zyngier : : Initial implementation of shadow stage-2 page tables to support a guest : hypervisor. In the author's words: : : So here's the 10000m (approximately 30000ft for those of you stuck : with the wrong units) view of what this is doing: : : - for each {VMID,VTTBR,VTCR} tuple the guest uses, we use a : separate shadow s2_mmu context. This context has its own "real" : VMID and a set of page tables that are the combination of the : guest's S2 and the host S2, built dynamically one fault at a time. : : - these shadow S2 contexts are ephemeral, and behave exactly as : TLBs. For all intent and purposes, they *are* TLBs, and we discard : them pretty often. : : - TLB invalidation takes three possible paths: : : * either this is an EL2 S1 invalidation, and we directly emulate : it as early as possible : : * or this is an EL1 S1 invalidation, and we need to apply it to : the shadow S2s (plural!) that match the VMID set by the L1 guest : : * or finally, this is affecting S2, and we need to teardown the : corresponding part of the shadow S2s, which invalidates the TLBs KVM: arm64: nv: Truely enable nXS TLBI operations KVM: arm64: nv: Add handling of NXS-flavoured TLBI operations KVM: arm64: nv: Add handling of range-based TLBI operations KVM: arm64: nv: Add handling of outer-shareable TLBI operations KVM: arm64: nv: Invalidate TLBs based on shadow S2 TTL-like information KVM: arm64: nv: Tag shadow S2 entries with guest's leaf S2 level KVM: arm64: nv: Handle FEAT_TTL hinted TLB operations KVM: arm64: nv: Handle TLBI IPAS2E1{,IS} operations KVM: arm64: nv: Handle TLBI ALLE1{,IS} operations KVM: arm64: nv: Handle TLBI VMALLS12E1{,IS} operations KVM: arm64: nv: Handle TLB invalidation targeting L2 stage-1 KVM: arm64: nv: Handle EL2 Stage-1 TLB invalidation KVM: arm64: nv: Add Stage-1 EL2 invalidation primitives KVM: arm64: nv: Unmap/flush shadow stage 2 page tables KVM: arm64: nv: Handle shadow stage 2 page faults KVM: arm64: nv: Implement nested Stage-2 page table walk logic KVM: arm64: nv: Support multiple nested Stage-2 mmu structures Signed-off-by: Oliver Upton commit a35d5b2032cec947212a30291f2091d0ed5f724c Merge: bd2e95136ba4d 42fb33dde42b8 Author: Oliver Upton Date: Sun Jul 14 00:11:34 2024 +0000 Merge branch kvm-arm64/ffa-1p1 into kvmarm/next * kvm-arm64/ffa-1p1: : Improvements to the pKVM FF-A Proxy, courtesy of Sebastian Ene : : Various minor improvements to how host FF-A calls are proxied with the : TEE, along with support for v1.1 of the protocol. KVM: arm64: Use FF-A 1.1 with pKVM KVM: arm64: Update the identification range for the FF-A smcs KVM: arm64: Add support for FFA_PARTITION_INFO_GET KVM: arm64: Trap FFA_VERSION host call in pKVM Signed-off-by: Oliver Upton commit bd2e95136ba4d69e15279583d158f8403df5950f Merge: 83a7eefedc9b5 cb52b5c8b81bf Author: Oliver Upton Date: Sun Jul 14 00:11:26 2024 +0000 Merge branch kvm-arm64/misc into kvmarm/next * kvm-arm64/misc: : Miscellaneous updates : : - Provide a command-line parameter to statically control the WFx trap : selection in KVM : : - Make sysreg masks allocation accounted Revert "KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity" KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity KVM: arm64: Add early_param to control WFx trapping Signed-off-by: Oliver Upton commit 852e42cc2dd4783744b0ea4fd0d9ab80a06eb21d Merge: ba88b47816a20 1712c9ee36d1f Author: Jakub Kicinski Date: Sat Jul 13 16:04:52 2024 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-07-11 (net/intel) This series contains updates to most Intel network drivers. Tony removes MODULE_AUTHOR from drivers containing the entry. Simon Horman corrects a kdoc entry for i40e. Pawel adds implementation for devlink param "local_forwarding" on ice. Michal removes unneeded call, and code, for eswitch rebuild for ice. Sasha removed a no longer used field from igc. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: Remove the internal 'eee_advert' field ice: remove eswitch rebuild ice: Add support for devlink local_forwarding param i40e: correct i40e_addr_to_hkey() name in kdoc net: intel: Remove MODULE_AUTHORs ==================== Link: https://patch.msgid.link/20240711201932.2019925-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ba88b47816a2089cd270a38fc002bc7df13f8ebe Author: Easwar Hariharan Date: Thu Jul 11 05:27:32 2024 +0000 sfc: falcon: Make I2C terminology more inclusive I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Reviewed-by: Martin Habets Reviewed-by: Simon Horman Signed-off-by: Easwar Hariharan Link: https://patch.msgid.link/20240711052734.1273652-5-eahariha@linux.microsoft.com Signed-off-by: Jakub Kicinski commit 0cda1acfa235f2ee75597e7b378de54a91d69e99 Author: Oleksij Rempel Date: Fri Jul 12 17:28:48 2024 +0200 net: phy: dp83td510: add cable testing support This patch implements the TDR test procedure as described in "Application Note DP83TD510E Cable Diagnostics Toolkit revC", section 3.2. The procedure was tested with "draka 08 signalkabel 2x0.8mm". The reported cable length was 5 meters more for each 20 meters of actual cable length. For instance, a 20-meter cable showed as 25 meters, and a 40-meter cable showed as 50 meters. Since other parts of the diagnostics provided by this PHY (e.g., Active Link Cable Diagnostics) require accurate cable characterization to provide proper results, this tuning can be implemented in a separate patch/interface. Signed-off-by: Oleksij Rempel changes v2: - add comments - change post silence time to 1000ms Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240712152848.2479912-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit e7cdef626f1d7ca69eb3351a8c4ae6a8ec46feed Author: Breno Leitao Date: Fri Jul 12 06:48:16 2024 -0700 net: dpaa: Fix compilation Warning Remove variables that are defined and incremented but never read. This issue appeared in network tests[1] as: drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c:38:6: warning: variable 'i' set but not used [-Wunused-but-set-variable] 38 | int i = 0; | ^ Link: https://netdev.bots.linux.dev/static/nipa/870263/13729811/build_clang/stderr [1] Signed-off-by: Breno Leitao Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240712134817.913756-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 3771266bf8418904794175fdc83aaf4732114cba Author: Jakub Kicinski Date: Thu Jul 11 15:37:22 2024 -0700 eth: mlx5: expose NETIF_F_NTUPLE when ARFS is compiled out ARFS depends on NTUPLE filters, but the inverse is not true. Drivers which don't support ARFS commonly still support NTUPLE filtering. mlx5 has a Kconfig option to disable ARFS (MLX5_EN_ARFS) and does not advertise NTUPLE filters as a feature at all when ARFS is compiled out. That's not correct, ntuple filters indeed still work just fine (as long as MLX5_EN_RXNFC is enabled). This is needed to make the RSS test not skip all RSS context related testing. Acked-by: Saeed Mahameed Link: https://patch.msgid.link/20240711223722.297676-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 464b99e77b3d024a319db0dabe917d04824039db Author: Matthieu Baerts (NGI0) Date: Fri Jul 12 12:00:15 2024 +0200 selftests: mptcp: lib: fix shellcheck errors It looks like we missed these two errors recently: - SC2068: Double quote array expansions to avoid re-splitting elements. - SC2145: Argument mixes string and array. Use * or separate argument. Two simple fixes, it is not supposed to change the behaviour as the variable names should not have any spaces in their names. Still, better to fix them to easily spot new issues. Fixes: f265d3119a29 ("selftests: mptcp: lib: use setup/cleanup_ns helpers") Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240712-upstream-net-next-20240712-selftests-mptcp-fix-shellcheck-v1-1-1cb7180db40a@kernel.org Signed-off-by: Jakub Kicinski commit 22767eecd62f7bb5c83541c291297cf24326a997 Merge: f7023b3d697c6 4b66be76a6fbe Author: Jakub Kicinski Date: Sat Jul 13 15:44:18 2024 -0700 Merge branch 'mlx5-misc-2023-07-08-sf-max-eq' Saeed Mahameed says: ==================== mlx5 misc 2023-07-08 (sf max eq) Link: https://patchwork.kernel.org/project/netdevbpf/patch/20240708080025.1593555-2-tariqt@nvidia.com/ ==================== Link: https://patch.msgid.link/20240712003310.355106-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 4b66be76a6fbe16918a01439bb9023da154d7694 Author: Daniel Jurgens Date: Thu Jul 11 17:33:10 2024 -0700 net/mlx5: Use set number of max EQs If a maximum number of EQs has been set for an SF, use that amount. Signed-off-by: Daniel Jurgens Reviewed-by: William Tu Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://patch.msgid.link/20240712003310.355106-5-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 20d80b95a7e4adbd1963c152cf79a58a93b4f577 Author: Daniel Jurgens Date: Thu Jul 11 17:33:09 2024 -0700 net/mlx5: Set default max eqs for SFs If the user hasn't configured max_io_eqs set a low default. The SF driver shouldn't try to create more than this, but FW will enforce this limit. Signed-off-by: Daniel Jurgens Reviewed-by: William Tu Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://patch.msgid.link/20240712003310.355106-4-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 2ece6c72ea040b2bec823b11f8e5bad0d92d8af2 Author: Daniel Jurgens Date: Thu Jul 11 17:33:08 2024 -0700 net/mlx5: Set sf_eq_usage for SF max EQs When setting max_io_eqs for an SF function also set the sf_eq_usage_cap. This is to indicate to the SF driver from the PF that the user has set the max io eqs via devlink. So the SF driver can later query the proper max eq value from the new cap. Signed-off-by: Daniel Jurgens Reviewed-by: William Tu Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://patch.msgid.link/20240712003310.355106-3-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 63c6e08eac8e7e2ad2e883c968e58e23e1dc8c70 Author: Daniel Jurgens Date: Thu Jul 11 17:33:07 2024 -0700 net/mlx5: IFC updates for SF max IO EQs Expose a new cap sf_eq_usage. The vhca_resource_manager can write this cap, indicating the SF driver should use max_num_eqs_24b to determine how many EQs to use. Will be used in the next patch, to indicate to the SF driver from the PF that the user has set the max io eqs via devlink. So the SF driver can later query the proper max eq value from the new cap. devlink port function set pci/0000:08:00.0/32768 max_io_eqs 32 Signed-off-by: Daniel Jurgens Reviewed-by: William Tu Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://patch.msgid.link/20240712003310.355106-2-saeed@kernel.org Signed-off-by: Jakub Kicinski commit f7023b3d697c6a7dfe2d9c70e0d8c2c580ccbd76 Author: Thorsten Blum Date: Thu Jul 11 17:47:43 2024 +0200 net: mvpp2: Improve data types and use min() Change the data type of the variable freq in mvpp2_rx_time_coal_set() and mvpp2_tx_time_coal_set() to u32 because port->priv->tclk also has the data type u32. Change the data type of the function parameter clk_hz in mvpp2_usec_to_cycles() and mvpp2_cycles_to_usec() to u32 accordingly and remove 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 Use min() to simplify the code and improve its readability. Compile-tested only. Signed-off-by: Thorsten Blum Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240711154741.174745-1-thorsten.blum@toblux.com Signed-off-by: Jakub Kicinski commit 275a63c9fe10f39066782d2d775d7d3efb20b01f Author: Danielle Ratson Date: Thu Jul 11 11:09:34 2024 +0300 net: ethtool: Monotonically increase the message sequence number Currently, during the module firmware flashing process, unicast notifications are sent from the kernel using the same sequence number, making it impossible for user space to track missed notifications. Monotonically increase the message sequence number, so the order of notifications could be tracked effectively. Signed-off-by: Danielle Ratson Reviewed-by: Ido Schimmel Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20240711080934.2071869-1-danieller@nvidia.com Signed-off-by: Jakub Kicinski commit 646d2ac752db921bb97349fa1037a5b862cf87c4 Merge: 42ffe242860c4 b3bb4d23a41b8 Author: Jakub Kicinski Date: Sat Jul 13 15:19:53 2024 -0700 Merge branch 'tcp-make-simultaneous-connect-rfc-compliant' Kuniyuki Iwashima says: ==================== tcp: Make simultaneous connect() RFC-compliant. Patch 1 fixes an issue that BPF TCP option parser is triggered for ACK instead of SYN+ACK in the case of simultaneous connect(). Patch 2 removes an wrong assumption in tcp_ao/self-connnect tests. v2: https://lore.kernel.org/netdev/20240708180852.92919-1-kuniyu@amazon.com/ v1: https://lore.kernel.org/netdev/20240704035703.95065-1-kuniyu@amazon.com/ ==================== Link: https://patch.msgid.link/20240710171246.87533-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit b3bb4d23a41b825c78ff4436c9dc8650b1ea5704 Author: Kuniyuki Iwashima Date: Wed Jul 10 10:12:46 2024 -0700 selftests: tcp: Remove broken SNMP assumptions for TCP AO self-connect tests. tcp_ao/self-connect.c checked the following SNMP stats before/after connect() to confirm that the test exercises the simultaneous connect() path. * TCPChallengeACK * TCPSYNChallenge But the stats should not be counted for self-connect in the first place, and the assumption is no longer true. Let's remove the check. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Reviewed-by: Dmitry Safonov Link: https://patch.msgid.link/20240710171246.87533-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 23e89e8ee7be73e21200947885a6d3a109a2c58d Author: Kuniyuki Iwashima Date: Wed Jul 10 10:12:45 2024 -0700 tcp: Don't drop SYN+ACK for simultaneous connect(). RFC 9293 states that in the case of simultaneous connect(), the connection gets established when SYN+ACK is received. [0] TCP Peer A TCP Peer B 1. CLOSED CLOSED 2. SYN-SENT --> ... 3. SYN-RECEIVED <-- <-- SYN-SENT 4. ... --> SYN-RECEIVED 5. SYN-RECEIVED --> ... 6. ESTABLISHED <-- <-- SYN-RECEIVED 7. ... --> ESTABLISHED However, since commit 0c24604b68fc ("tcp: implement RFC 5961 4.2"), such a SYN+ACK is dropped in tcp_validate_incoming() and responded with Challenge ACK. For example, the write() syscall in the following packetdrill script fails with -EAGAIN, and wrong SNMP stats get incremented. 0 socket(..., SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_TCP) = 3 +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0 > S 0:0(0) +0 < S 0:0(0) win 1000 +0 > S. 0:0(0) ack 1 +0 < S. 0:0(0) ack 1 win 1000 +0 write(3, ..., 100) = 100 +0 > P. 1:101(100) ack 1 -- # packetdrill cross-synack.pkt cross-synack.pkt:13: runtime error in write call: Expected result 100 but got -1 with errno 11 (Resource temporarily unavailable) # nstat ... TcpExtTCPChallengeACK 1 0.0 TcpExtTCPSYNChallenge 1 0.0 The problem is that bpf_skops_established() is triggered by the Challenge ACK instead of SYN+ACK. This causes the bpf prog to miss the chance to check if the peer supports a TCP option that is expected to be exchanged in SYN and SYN+ACK. Let's accept a bare SYN+ACK for active-open TCP_SYN_RECV sockets to avoid such a situation. Note that tcp_ack_snd_check() in tcp_rcv_state_process() is skipped not to send an unnecessary ACK, but this could be a bit risky for net.git, so this targets for net-next. Link: https://www.rfc-editor.org/rfc/rfc9293.html#section-3.5-7 [0] Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20240710171246.87533-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 42ffe242860c401c34c62aa369c2add341a6eece Author: Peng Fan Date: Wed Jul 10 20:27:28 2024 +0800 test/vsock: add install target Add install target for vsock to make Yocto easy to install the images. Signed-off-by: Peng Fan Reviewed-by: Stefano Garzarella Link: https://patch.msgid.link/20240710122728.45044-1-peng.fan@oss.nxp.com Signed-off-by: Jakub Kicinski commit 8e5f53a684338c04b7f7487c65e1519b83295046 Author: Eric Dumazet Date: Fri Jul 12 23:42:13 2024 +0000 MAINTAINERS: add 5 missing tcp-related files Following files are part of TCP stack: - net/ipv4/inet_connection_sock.c - net/ipv4/inet_hashtables.c - net/ipv4/inet_timewait_sock.c - net/ipv6/inet6_connection_sock.c - net/ipv6/inet6_hashtables.c Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20240712234213.3178593-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit ad00e629145b2b9f0d78aa46e204a9df7d628978 Author: Tetsuo Handa Date: Sat Jul 13 19:05:02 2024 +0900 io_uring/net: check socket is valid in io_bind()/io_listen() We need to check that sock_from_file(req->file) != NULL. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=1e811482aa2c70afa9a0 Fixes: 7481fd93fa0a ("io_uring: Introduce IORING_OP_BIND") Fixes: ff140cc8628a ("io_uring: Introduce IORING_OP_LISTEN") Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/903da529-eaa3-43ef-ae41-d30f376c60cc@I-love.SAKURA.ne.jp [axboe: move assignment of sock to where the NULL check is] Signed-off-by: Jens Axboe commit b7625d67eb1a63d33b0a2a4518ce4897d27f7465 Merge: f7d43dd206e7e 4bdc3eaa102b6 Author: Thomas Gleixner Date: Sat Jul 13 12:07:10 2024 +0200 Merge tag 'timers-v6.11-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/event driver updates from Daniel Lezcano: - Remove unnecessary local variables initialization as they will be initialized in the code path anyway right after on the ARM arch timer and the ARM global timer (Li kunyu) - Fix a race condition in the interrupt leading to a deadlock on the SH CMT driver. Note that this fix was not tested on the platform using this timer but the fix seems reasonable enough to be picked confidently (Niklas Söderlund) - Increase the rating of the gic-timer and use the configured width clocksource register on the MIPS architecture (Jiaxun Yang) - Add the DT bindings for the TMU on the Renesas platforms (Geert Uytterhoeven) - Add the DT bindings for the SOPHGO SG2002 clint on RiscV (Thomas Bonnefille) - Add the rtl-otto timer driver along with the DT bindings for the Realtek platform (Chris Packham) Link: https://lore.kernel.org/all/91cd05de-4c5d-4242-a381-3b8a4fe6a2a2@linaro.org commit d5b60c6517d227b044674718a993caae19080f7b Merge: f531d13bdfe3f 447bc4b1906f1 Author: Steffen Klassert Date: Sat Jul 13 11:14:04 2024 +0200 Merge branch 'Support IPsec crypto offload for IPv6 ESP and IPv4 UDP-encapsulated ESP data paths' Mike Yu says: ==================== Currently, IPsec crypto offload is enabled for GRO code path. However, there are other code paths where the XFRM stack is involved; for example, IPv6 ESP packets handled by xfrm6_esp_rcv() in ESP layer, and IPv4 UDP-encapsulated ESP packets handled by udp_rcv() in UDP layer. This patchset extends the crypto offload support to cover these two cases. This is useful for devices with traffic accounting (e.g., Android), where GRO can lead to inaccurate accounting on the underlying network. For example, VPN traffic might not be counted on the wifi network interface wlan0 if the packets are handled in GRO code path before entering the network stack for accounting. Below is the RX data path scenario the crypto offload can be applied to. +-----------+ +-------+ | HW Driver |-->| wlan0 |--------+ +-----------+ +-------+ | v +---------------+ +------+ +------>| Network Stack |-->| Apps | | +---------------+ +------+ | | | v +--------+ +------------+ | ipsec1 |<--| XFRM Stack | +--------+ +------------+ ==================== Signed-off-by: Steffen Klassert commit 5d89b5bdbce3937c86f05ffe19455c3068fd94f7 Author: Wolfram Sang Date: Fri Jul 12 11:52:40 2024 +0200 i2c: document new callbacks in i2c_algorithm When updating the callbacks, adding their kernel-doc was forgotten. Add it now. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20240712165527.75e4ddc9@canb.auug.org.au Fixes: a93c2e5fe766 ("i2c: reword i2c_algorithm according to newest specification") Signed-off-by: Wolfram Sang commit 479f18ccca110b727d99c2db60d769736bf390e6 Merge: 500c20fe3ea4a ab1c7ea48f6e2 Author: Wolfram Sang Date: Sat Jul 13 11:10:54 2024 +0200 Merge tag 'i2c-host-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow This release includes significant updates, with the primary change being the renaming from "master/slave" to "controller/target" to adhere to I2C v7 and SMBus 3.2 standards. New Support: - Added support for Intel Arrow Lake-H. - Added I2C support in the Arioha SoC by linking the Mediatek I2C controller. Cleanups: - Added the MODULE_DESCRIPTION() macro, resolving a modpost warning in the ALi 1563 Southbridge driver. - Constified the regmap_config declaration in the i2c-designware driver. - Improved the coding style in the Renesas R-Car driver by removing unnecessary semicolons after brackets. General improvements: - In the OMAP device, replaced NOIRQ_SYSTEM_SLEEP_PM_OPS with RUNTIME_PM_OPS to enable waking up the controller during suspend() before suspend_noirq() kicks in. - Improved logging in the Xilinx driver. - Added a warning (WARN()) in the Renesas R-Car driver for spurious interrupts. DTS Changes: - Removed address-cell and size-cell from the Atmel at91sam, nVidia Tegra 20, and Samsung S3c2410 devices. - Fixed Texas Instruments OMAP4 I2C controller to comply with the i2c-controller.yaml schema. - Improved indentation in DTS examples for several I2C devices. - Converted the NXP LPC1788 binding to the dt-schema. - Added documentation for the compatible string thead,th1520-i2c. - Added the "power-domains" property for the Meson I2C driver. commit b69bdba5a37eb6224039e9572e0e98fc3a931fee Author: Yang Li Date: Fri Jul 12 15:38:16 2024 +0800 swiotlb: fix kernel-doc description for swiotlb_del_transient Describe the pool argument in the kernel-doc comment for swiotlb_del_transient. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Christoph Hellwig commit 69cf87304dcb08d61e35bcfccdb1a5d52ce2969c Merge: 26f453176a66b 74d1412ac8f37 Author: Jakub Kicinski Date: Fri Jul 12 22:27:25 2024 -0700 Merge branch '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== idpf: XDP chapter I: convert Rx to libeth Alexander Lobakin says: XDP for idpf is currently 5 chapters: * convert Rx to libeth (this); * convert Tx and stats to libeth; * generic XDP and XSk code changes, libeth_xdp; * actual XDP for idpf via libeth_xdp; * XSk for idpf (^). Part I does the following: * splits &idpf_queue into 4 (RQ, SQ, FQ, CQ) and puts them on a diet; * ensures optimal cacheline placement, strictly asserts CL sizes; * moves currently unused/dead singleq mode out of line; * reuses libeth's Rx ptype definitions and helpers; * uses libeth's Rx buffer management for both header and payload; * eliminates memcpy()s and coherent DMA uses on hotpath, uses napi_build_skb() instead of in-place short skb allocation. Most idpf patches, except for the queue split, removes more lines than adds. Expect far better memory utilization and +5-8% on Rx depending on the case (+17% on skb XDP_DROP :>). * '200GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: idpf: use libeth Rx buffer management for payload buffer idpf: convert header split mode to libeth + napi_build_skb() libeth: support different types of buffers for Rx idpf: remove legacy Page Pool Ethtool stats idpf: reuse libeth's definitions of parsed ptype structures idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ idpf: merge singleq and splitq &net_device_ops idpf: strictly assert cachelines of queue and queue vector structures idpf: avoid bloating &idpf_q_vector with big %NR_CPUS idpf: split &idpf_queue into 4 strictly-typed queue structures idpf: stop using macros for accessing queue descriptors libeth: add cacheline / struct layout assertion helpers page_pool: use __cacheline_group_{begin, end}_aligned() cache: add __cacheline_group_{begin, end}_aligned() (+ couple more) ==================== Link: https://patch.msgid.link/20240710203031.188081-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 26f453176a66bb36bf9e3a8abad808b144a94f6a Merge: e5abd12f3df13 e435b043d89a2 Author: Jakub Kicinski Date: Fri Jul 12 22:25:53 2024 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2024-07-12 We've added 23 non-merge commits during the last 3 day(s) which contain a total of 18 files changed, 234 insertions(+), 243 deletions(-). The main changes are: 1) Improve BPF verifier by utilizing overflow.h helpers to check for overflows, from Shung-Hsi Yu. 2) Fix NULL pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT when attr->attach_prog_fd was not specified, from Tengda Wu. 3) Fix arm64 BPF JIT when generating code for BPF trampolines with BPF_TRAMP_F_CALL_ORIG which corrupted upper address bits, from Puranjay Mohan. 4) Remove test_run callback from lwt_seg6local_prog_ops which never worked in the first place and caused syzbot reports, from Sebastian Andrzej Siewior. 5) Relax BPF verifier to accept non-zero offset on KF_TRUSTED_ARGS/ /KF_RCU-typed BPF kfuncs, from Matt Bobrowski. 6) Fix a long standing bug in libbpf with regards to handling of BPF skeleton's forward and backward compatibility, from Andrii Nakryiko. 7) Annotate btf_{seq,snprintf}_show functions with __printf, from Alan Maguire. 8) BPF selftest improvements to reuse common network helpers in sk_lookup test and dropping the open-coded inetaddr_len() and make_socket() ones, from Geliang Tang. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (23 commits) selftests/bpf: Test for null-pointer-deref bugfix in resolve_prog_type() bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT selftests/bpf: DENYLIST.aarch64: Skip fexit_sleep again bpf: use check_sub_overflow() to check for subtraction overflows bpf: use check_add_overflow() to check for addition overflows bpf: fix overflow check in adjust_jmp_off() bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o bpf: annotate BTF show functions with __printf bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG selftests/bpf: Close obj in error path in xdp_adjust_tail selftests/bpf: Null checks for links in bpf_tcp_ca selftests/bpf: Use connect_fd_to_fd in sk_lookup selftests/bpf: Use start_server_addr in sk_lookup selftests/bpf: Use start_server_str in sk_lookup selftests/bpf: Close fd in error path in drop_on_reuseport selftests/bpf: Add ASSERT_OK_FD macro selftests/bpf: Add backlog for network_helper_opts selftests/bpf: fix compilation failure when CONFIG_NF_FLOW_TABLE=m bpf: Remove tst_run from lwt_seg6local_prog_ops. bpf: relax zero fixed offset constraint on KF_TRUSTED_ARGS/KF_RCU ... ==================== Link: https://patch.msgid.link/20240712212448.5378-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit e5abd12f3df13e92e2fb3c02fe825aa6c57f8306 Merge: 75fd6079326da 528dd46d0fc35 Author: Jakub Kicinski Date: Fri Jul 12 22:17:55 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/broadcom/bnxt/bnxt.c f7ce5eb2cb79 ("bnxt_en: Fix crash in bnxt_get_max_rss_ctx_ring()") 20c8ad72eb7f ("eth: bnxt: use the RSS context XArray instead of the local list") Adjacent changes: net/ethtool/ioctl.c 503757c80928 ("net: ethtool: Fix RSS setting") eac9122f0c41 ("net: ethtool: record custom RSS contexts in the XArray") Signed-off-by: Jakub Kicinski commit 75fd6079326da816caba51f9a4192c1876f37423 Merge: 338a93cf4a18c 46e457a454de1 Author: Jakub Kicinski Date: Fri Jul 12 22:16:28 2024 -0700 Merge branch 'eth-bnxt-use-the-new-rss-api' Jakub Kicinski says: ==================== eth: bnxt: use the new RSS API Convert bnxt from using the set_rxfh API to separate create/modify/remove callbacks. Two small extensions to the core APIs are necessary: - the ability to discard contexts if for some catastrophic reasons device can no longer provide them; - the ability to reserve space in the context for RSS table growth. The driver is adjusted to store indirection tables on u32 to make it easier to use core structs directly. With that out of the way the conversion is fairly straightforward. Since the opposition to discarding contexts was relatively mild and its what bnxt does already, I'm sticking to that. We may very well need to revisit that at a later time. v1: https://lore.kernel.org/all/20240702234757.4188344-1-kuba@kernel.org/ ==================== Link: https://patch.msgid.link/20240711220713.283778-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 46e457a454de1d95c57394129a2be6eac8bf85e4 Author: Jakub Kicinski Date: Thu Jul 11 15:07:13 2024 -0700 eth: bnxt: use the indir table from ethtool context Instead of allocating a separate indir table in the vnic use the one already present in the RSS context allocated by the core. This saves some LoC and also we won't have to worry about syncing the local version back to the core, once core learns how to dump contexts. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-12-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 73afb518af4af2364793849b069716425a665c6c Author: Jakub Kicinski Date: Thu Jul 11 15:07:12 2024 -0700 eth: bnxt: bump the entry size in indir tables to u32 Ethtool core stores indirection table with u32 entries, "just to be safe". Switch the type in the driver, so that it's easier to swap local tables for the core ones. Memory allocations already use sizeof(*entry), switch the memset()s as well. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-11-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 9c34c6c28c704fb2f6124d7b6a6837bdbc8e72fc Author: Jakub Kicinski Date: Thu Jul 11 15:07:11 2024 -0700 eth: bnxt: pad out the correct indirection table bnxt allocates tables of max size, and changes the used size based on number of active rings. The unused entries get padded out with zeros. bnxt_modify_rss() seems to always pad out the table of the main / default RSS context, instead of the table of the modified context. I haven't observed any behavior change due to this patch, so I don't think it's a fix. Not entirely sure what role the padding plays, 0 is a valid queue ID. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-10-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 20c8ad72eb7f1510d2a802328cd0809b4db9e18a Author: Jakub Kicinski Date: Thu Jul 11 15:07:10 2024 -0700 eth: bnxt: use the RSS context XArray instead of the local list Core already maintains all RSS contexts in an XArray, no need to keep a second list in the driver. Remove bnxt_get_max_rss_ctx_ring() completely since core performs the same check already. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 63d4769cf74acfc42a3436ff28e92ef4f70e617c Author: Jakub Kicinski Date: Thu Jul 11 15:07:09 2024 -0700 eth: bnxt: use context priv for struct bnxt_rss_ctx Core can allocate space for per-context driver-private data, use it for struct bnxt_rss_ctx. Inline bnxt_alloc_rss_ctx() at this point, most of the init (as in the actions bnxt_del_one_rss_ctx() will undo) is open coded in bnxt_create_rxfh_context(), anyway. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit bf30162915f890c113bb2aefcea8be20b3326d00 Author: Jakub Kicinski Date: Thu Jul 11 15:07:08 2024 -0700 eth: bnxt: depend on core cleaning up RSS contexts New RSS context API removes old contexts on netdev unregister. No need to wipe them manually. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1a49a23c034b9c991f01b7034efc555886cee11a Author: Jakub Kicinski Date: Thu Jul 11 15:07:07 2024 -0700 eth: bnxt: remove rss_ctx_bmap Core will allocate IDs for the driver, from the range [1, BNXT_MAX_ETH_RSS_CTX], no need to track the allocations. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5c466b4d4e75c09a5a3e8d7a79cc20a22bc83809 Author: Jakub Kicinski Date: Thu Jul 11 15:07:06 2024 -0700 eth: bnxt: move from .set_rxfh to .create_rxfh_context and friends Use the new ethtool ops for RSS context management. The conversion is pretty straightforward cut / paste of the right chunks of the combined handler. Main change is that we let the core pick the IDs (bitmap will be removed separately for ease of review), so we need to tell the core when we lose a context. Since the new API passes rxfh as const, change bnxt_modify_rss() to also take const. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 667ac333dbb7e265b3f5bc4bc94e236f64682c86 Author: Jakub Kicinski Date: Thu Jul 11 15:07:05 2024 -0700 eth: bnxt: allow deleting RSS contexts when the device is down Contexts get deleted from FW when the device is down, but they are kept in SW and re-added back on open. bnxt_set_rxfh_context() apparently does not want to deal with complexity of dealing with both the device down and device up cases. This is perhaps acceptable for creating new contexts, but not being able to delete contexts makes core-driven cleanups messy. Specifically with the new RSS API core will try to delete contexts automatically after bringing the device down. Support the delete-while-down case. Skip the FW logic and delete just the driver state. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 28c8757a792bbbc76407777bd0303862daa75057 Author: Jakub Kicinski Date: Thu Jul 11 15:07:04 2024 -0700 net: ethtool: let drivers declare max size of RSS indir table and key Some drivers (bnxt but I think also mlx5 from ML discussions) change the size of the indirection table depending on the number of Rx rings. Decouple the max table size from the size of the currently used table, so that we can reserve space in the context for table growth. Static members in ethtool_ops are good enough for now, we can add callbacks to read the max size more dynamically if someone needs that. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d69ba6bbaf1f606ac354e925571a54d025e32aae Author: Jakub Kicinski Date: Thu Jul 11 15:07:03 2024 -0700 net: ethtool: let drivers remove lost RSS contexts RSS contexts may get lost from a device, in various extreme circumstances. Specifically if the firmware leaks resources and resets, or crashes and either recovers in partially working state or the crash causes a different FW version to run - creating the context again may fail. Drivers should do their absolute best to prevent this from happening. When it does, however, telling user that a context exists, when it can't possibly be used any more is counter productive. Add a helper for drivers to discard contexts. Print an error, in the future netlink notification will also be sent. More robust approaches were proposed, like keeping the contexts but marking them as "dead" (but possibly resurrected by next reset). That may be better but it's unclear at this stage whether the effort is worth the benefits. Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20240711220713.283778-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a3c10bed330b7ab401254a0c91098a03b04f1448 Author: Dan Carpenter Date: Fri Jul 12 20:04:16 2024 -0500 erofs: silence uninitialized variable warning in z_erofs_scan_folio() Smatch complains that: fs/erofs/zdata.c:1047 z_erofs_scan_folio() error: uninitialized symbol 'err'. The issue is if we hit this (!(map->m_flags & EROFS_MAP_MAPPED)) { condition then "err" isn't set. It's inside a loop so we would have to hit that condition on every iteration. Initialize "err" to zero to solve this. Fixes: 5b9654efb604 ("erofs: teach z_erofs_scan_folios() to handle multi-page folios") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/f78ab50e-ed6d-4275-8dd4-a4159fa565a2@stanley.mountain Signed-off-by: Gao Xiang commit f3efefb6fdcce604413135bd8d4c5568e53a1f13 Author: Dmitry Torokhov Date: Wed Jul 10 16:48:54 2024 -0700 Input: yealink - simplify locking in sysfs attribute handling The locking rules in the driver came from era when sysfs attributes could live past the point of time when device would be unbound from the driver, and so used module-global semaphore (potentially shared between multiple yealink devices). Thankfully these times are long gone and attributes will not be accessible once they are removed. Simplify the logic by moving to per-device mutex, stop checking if there is driver data instance attached to the interface, and use guard notation to acquire the mutex. Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240710234855.311366-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 295b89a631fe2935d268a95a9dea284992a7a27d Author: Dmitry Torokhov Date: Wed Jul 10 16:48:53 2024 -0700 Input: yealink - use driver core to instantiate device attributes Instead of manually creating driver-specific device attributes set struct usb_driver->dev_groups pointer to have the driver core do it. Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240710234855.311366-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit b20d6bf8014b2d6fcf65c150453d95a6276fd1fa Author: Dmitry Torokhov Date: Wed Jul 10 16:59:36 2024 -0700 Input: ati-remote2 - use driver core to instantiate device attributes Instead of manually creating driver-specific device attributes set struct usb_driver->dev_groups pointer to have the driver core do it. Reviewed-by: Ville Syrjälä Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/Zo8gaF_lKPAfcye1@google.com Signed-off-by: Dmitry Torokhov commit 2d7877d797aaa16b18ac156ed87fa0f23b9907c8 Author: Dmitry Torokhov Date: Wed Jul 10 22:03:29 2024 -0700 Input: omap-keypad - use driver core to instantiate device attributes Instead of manually creating driver-specific device attributes set struct driver->dev_groups pointer to have the driver core do it. This also fixes issue with the attribute not being deleted on driver unbind. Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/Zo9nofWJ1xg9MgKs@google.com Signed-off-by: Dmitry Torokhov commit a122a6fd72d64de1e2f7521046823e25cb269f06 Author: Dmitry Torokhov Date: Wed Jul 10 21:49:12 2024 -0700 Input: atmel_mxt_ts - use driver core to instantiate device attributes Instead of manually creating driver-specific device attributes, set struct driver->dev_groups pointer to have the driver core do it. Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/Zo9kSFeGOZB9b3rq@google.com Signed-off-by: Dmitry Torokhov commit df1e9791998a92fe9f1e7d3f031b34daaad39e2f Author: Masahiro Yamada Date: Sat Jul 6 23:41:24 2024 +0900 hwrng: core - remove (un)register_miscdev() These functions are redundant after commit 0daa7a0afd0f ("hwrng: Avoid manual device_create_file() calls"). Let's call misc_(de)register() directly. Signed-off-by: Masahiro Yamada Signed-off-by: Herbert Xu commit fe69b772e35e181ff0576ab4a610515ffe7a3325 Author: Dan Carpenter Date: Thu Jul 4 10:25:05 2024 -0500 crypto: lib/mpi - delete unnecessary condition We checked that "nlimbs" is non-zero in the outside if statement so delete the duplicate check here. Signed-off-by: Dan Carpenter Reviewed-by: Tianjia Zhang Signed-off-by: Herbert Xu commit 101e99c23af9460890edc9055141e6aba6d3e08a Author: Eric Biggers Date: Wed Jul 3 12:04:31 2024 -0700 crypto: testmgr - generate power-of-2 lengths more often Implementations of hash functions often have special cases when lengths are a multiple of the hash function's internal block size (e.g. 64 for SHA-256, 128 for SHA-512). Currently, when the fuzz testing code generates lengths, it doesn't prefer any length mod 64 over any other. This limits the coverage of these special cases. Therefore, this patch updates the fuzz testing code to generate power-of-2 lengths and divide messages exactly in half a bit more often. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit dd52b5eeb0f70893f762da7254e923fd23fd1379 Author: David Gstir Date: Wed Jul 3 14:49:58 2024 +0200 crypto: mxs-dcp - Ensure payload is zero when using key slot We could leak stack memory through the payload field when running AES with a key from one of the hardware's key slots. Fix this by ensuring the payload field is set to 0 in such cases. This does not affect the common use case when the key is supplied from main memory via the descriptor payload. Signed-off-by: David Gstir Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202405270146.Y9tPoil8-lkp@intel.com/ Fixes: 3d16af0b4cfa ("crypto: mxs-dcp: Add support for hardware-bound keys") Signed-off-by: Herbert Xu commit addea5858b66a185d33bf1b90980316f5f375d75 Author: Francesco Dolcini Date: Tue Jun 25 21:57:46 2024 +0200 hwrng: Kconfig - Do not enable by default CN10K driver Do not enable by default the CN10K HW random generator driver. CN10K Random Number Generator is available only on some specific Marvell SoCs, however the driver is in practice enabled by default on all arm64 configs. Signed-off-by: Francesco Dolcini Signed-off-by: Herbert Xu commit 0fe2356434e157b3952ff4dbdfe0a96070ddcaa2 Author: Kees Cook Date: Thu Jul 11 10:13:09 2024 -0700 tsacct: replace strncpy() with strscpy() Replace the deprecated[1] use of strncpy() in bacct_add_tsk(). Since this is UAPI, include trailing padding in the copy. Link: https://github.com/KSPP/linux/issues/90 [1] Link: https://lkml.kernel.org/r/20240711171308.work.995-kees@kernel.org Signed-off-by: Kees Cook Cc: "Dr. Thomas Orgis" Cc: Eric W. Biederman Cc: Ismael Luceno Cc: Peng Liu Signed-off-by: Andrew Morton commit e1fb7430fcb00431087fc1c088ec9e8737cf6c7d Author: Thorsten Blum Date: Tue Jul 9 00:40:24 2024 +0200 lib/bch.c: use swap() to improve code Use the swap() macro to simplify the functions solve_linear_system() and gf_poly_gcd() and improve their readability. Remove the local variable tmp. Fixes the following three Coccinelle/coccicheck warnings reported by swap.cocci: WARNING opportunity for swap() WARNING opportunity for swap() WARNING opportunity for swap() Link: https://lkml.kernel.org/r/20240708224023.9312-2-thorsten.blum@toblux.com Signed-off-by: Thorsten Blum Signed-off-by: Andrew Morton commit 4f5d4a1ba7a1a23173e356186f3f8b7c27d2e948 Author: Chen Ni Date: Tue Jul 9 11:43:23 2024 +0800 test_bpf: convert comma to semicolon Replace commas between expression statements with semicolons. Link: https://lkml.kernel.org/r/20240709034323.586185-1-nichen@iscas.ac.cn Signed-off-by: Chen Ni Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Eduard Zingerman Cc: Hao Luo Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Signed-off-by: Andrew Morton commit 73db3abdca58c8a014ec4c88cf5ef925cbf63669 Author: Masahiro Yamada Date: Sun Jul 7 01:05:06 2024 +0900 init/modpost: conditionally check section mismatch to __meminit* This reverts commit eb8f689046b8 ("Use separate sections for __dev/ _cpu/__mem code/data"). Check section mismatch to __meminit* only when CONFIG_MEMORY_HOTPLUG=n. With this change, the linker script and modpost become simpler, and we can get rid of the __ref annotations from the memory hotplug code. [sfr@canb.auug.org.au: remove MEM_KEEP from arch/powerpc/kernel/vmlinux.lds.S] Link: https://lkml.kernel.org/r/20240710093213.2aefb25f@canb.auug.org.au Link: https://lkml.kernel.org/r/20240706160511.2331061-2-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Rothwell Reviewed-by: Wei Yang Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit 7a7127aa33c9f5b7b54ffa80619f644c5e000846 Author: Masahiro Yamada Date: Sun Jul 7 01:05:05 2024 +0900 init: remove unused __MEMINIT* macros These macros are not used anywhere. Link: https://lkml.kernel.org/r/20240706160511.2331061-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Reviewed-by: Wei Yang Signed-off-by: Andrew Morton commit fbc8846cd9c258e3844d22afd4d1ae7240077aab Author: Christophe JAILLET Date: Mon Jul 8 23:32:42 2024 +0900 nilfs2: Constify struct kobj_type 'struct kobj_type' is not modified in this driver. It is only used with kobject_init_and_add() which takes a "const struct kobj_type *" parameter. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 22403 4184 24 26611 67f3 fs/nilfs2/sysfs.o After: ===== text data bss dec hex filename 22723 3928 24 26675 6833 fs/nilfs2/sysfs.o Link: https://lkml.kernel.org/r/20240708143242.3296-1-konishi.ryusuke@gmail.com Signed-off-by: Christophe JAILLET Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 63d9866ab01ffd0d0835d5564107283a4afc0a38 Author: Ryan Roberts Date: Wed Jul 10 10:55:01 2024 +0100 mm: shmem: rename mTHP shmem counters The legacy PMD-sized THP counters at /proc/vmstat include thp_file_alloc, thp_file_fallback and thp_file_fallback_charge, which rather confusingly refer to shmem THP and do not include any other types of file pages. This is inconsistent since in most other places in the kernel, THP counters are explicitly separated for anon, shmem and file flavours. However, we are stuck with it since it constitutes a user ABI. Recently, commit 66f44583f9b6 ("mm: shmem: add mTHP counters for anonymous shmem") added equivalent mTHP stats for shmem, keeping the same "file_" prefix in the names. But in future, we may want to add extra stats to cover actual file pages, at which point, it would all become very confusing. So let's take the opportunity to rename these new counters "shmem_" before the change makes it upstream and the ABI becomes immutable. While we are at it, let's improve the documentation for the legacy counters to make it clear that they count shmem pages only. Link: https://lkml.kernel.org/r/20240710095503.3193901-1-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Baolin Wang Reviewed-by: Lance Yang Reviewed-by: Zi Yan Reviewed-by: Barry Song Acked-by: David Hildenbrand Cc: Daniel Gomez Cc: Hugh Dickins Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 2ef52d5bb78dc2d27d8141578e8095989ad5ca35 Author: Kefeng Wang Date: Tue Jul 9 18:55:08 2024 +0800 mm: swap_state: use folio_alloc_mpol() in __read_swap_cache_async() Convert to use folio_alloc_mpol() helper() in __read_swap_cache_async(). Link: https://lkml.kernel.org/r/20240709105508.3933823-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton commit 6e49019db5f7a09a9c0e8ac4d108e656c3f8e583 Author: Peter Xu Date: Mon Jul 8 17:55:37 2024 -0400 mm/migrate: putback split folios when numa hint migration fails This issue is not from any report yet, but by code observation only. This is yet another fix besides Hugh's patch [1] but on relevant code path, where eager split of folio can happen if the folio is already on deferred list during a folio migration. Here the issue is NUMA path (migrate_misplaced_folio()) may start to encounter such folio split now even with MR_NUMA_MISPLACED hint applied. Then when migrate_pages() didn't migrate all the folios, it's possible the split small folios be put onto the list instead of the original folio. Then putting back only the head page won't be enough. Fix it by putting back all the folios on the list. [1] https://lore.kernel.org/all/46c948b4-4dd8-6e03-4c7b-ce4e81cfa536@google.com/ [akpm@linux-foundation.org: remove now unused local `nr_pages'] Link: https://lkml.kernel.org/r/20240708215537.2630610-1-peterx@redhat.com Fixes: 7262f208ca68 ("mm/migrate: split source folio if it is on deferred split list") Signed-off-by: Peter Xu Reviewed-by: Zi Yan Reviewed-by: Baolin Wang Cc: Yang Shi Cc: Hugh Dickins Cc: Huang Ying Cc: David Hildenbrand Cc: Signed-off-by: Andrew Morton commit 61c663e020d263eaecc7f09afa40f7bbe160931e Author: Yu Zhao Date: Mon Jul 8 15:27:53 2024 -0600 mm/truncate: batch-clear shadow entries Make clear_shadow_entry() clear shadow entries in `struct folio_batch` so that it can reduce contention on i_lock and i_pages locks, e.g., watchdog: BUG: soft lockup - CPU#29 stuck for 11s! [fio:2701649] clear_shadow_entry+0x3d/0x100 mapping_try_invalidate+0x117/0x1d0 invalidate_mapping_pages+0x10/0x20 invalidate_bdev+0x3c/0x50 blkdev_common_ioctl+0x5f7/0xa90 blkdev_ioctl+0x109/0x270 Also, rename clear_shadow_entry() to clear_shadow_entries() accordingly. [yuzhao@google.com: v2] Link: https://lkml.kernel.org/r/20240710060933.3979380-1-yuzhao@google.com Link: https://lkml.kernel.org/r/20240708212753.3120511-1-yuzhao@google.com Reported-by: Bharata B Rao Closes: https://lore.kernel.org/d2841226-e27b-4d3d-a578-63587a3aa4f3@amd.com/ Signed-off-by: Yu Zhao Cc: Mel Gorman Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 8a78882dac1c8c464e047a29415edb50421651ce Author: Miaohe Lin Date: Mon Jul 8 11:05:44 2024 +0800 mm/memory-failure: remove obsolete MF_MSG_DIFFERENT_COMPOUND The page cannot become compound pages again just after a folio is split as an extra refcnt is held. So the MF_MSG_DIFFERENT_COMPOUND case is obsolete and can be removed to get rid of this false assumption and code burden. But add one WARN_ON() here to keep the situation clear. Link: https://lkml.kernel.org/r/20240708030544.196919-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit a5ea521250afdf3d70c72970660f44aebf56ea19 Author: Hugh Dickins Date: Sat Jul 6 14:29:00 2024 -0700 mm: simplify folio_migrate_mapping() Now that folio_undo_large_rmappable() is an inline function checking order and large_rmappable for itself (and __folio_undo_large_rmappable() is now declared even when CONFIG_TRANASPARENT_HUGEPAGE is off) there is no need for folio_migrate_mapping() to check large and large_rmappable first (in the mapping case when it has had to freeze anyway). Link: https://lkml.kernel.org/r/68feee73-050e-8e98-7a3a-abf78738d92c@google.com Signed-off-by: Hugh Dickins Reviewed-by: Zi Yan Cc: Baolin Wang Cc: Barry Song Cc: David Hildenbrand Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Nhat Pham Cc: Yang Shi Signed-off-by: Andrew Morton commit f6953e22af7dd1466f71102627791eae0c30ef68 Author: Wei Yang Date: Sat Jul 6 06:16:15 2024 +0000 mm/page_alloc: put __free_pages_core() in __meminit section __free_pages_core() is only used in bootmem init and hot-add memory init path. Let's put it in __meminit section. Link: https://lkml.kernel.org/r/20240706061615.30322-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: David Hildenbrand Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 26c7d8413aaf113a54b54f63e151416a5c5c2a88 Author: Bang Li Date: Fri Jul 5 11:23:09 2024 +0800 mm: thp: support "THPeligible" semantics for mTHP with anonymous shmem After the commit 7fb1b252afb5 ("mm: shmem: add mTHP support for anonymous shmem"), we can configure different policies through the multi-size THP sysfs interface for anonymous shmem. But currently "THPeligible" indicates only whether the mapping is eligible for allocating THP-pages as well as the THP is PMD mappable or not for anonymous shmem, we need to support semantics for mTHP with anonymous shmem similar to those for mTHP with anonymous memory. Link: https://lkml.kernel.org/r/20240705032309.24933-1-libang.li@antgroup.com Signed-off-by: Bang Li Reviewed-by: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Ryan Roberts Cc: Zi Yan Signed-off-by: Andrew Morton commit 4c8763e84aae4d04d94b35aca9f7db6a8930ad77 Author: Ran Xiaokai Date: Fri Jul 5 10:43:43 2024 +0000 kpageflags: detect isolated KPF_THP folios When folio is isolated, the PG_lru bit is cleared. So the PG_lru check in stable_page_flags() will miss this kind of isolated folios. Use folio_test_large_rmappable() instead to also include isolated folios. Since pagecache supports large folios and the introduction of mTHP, the semantics of KPF_THP have been expanded, now it indicates not only PMD-sized THP. Update related documentation to clearly state that KPF_THP indicates multiple order THPs. [ran.xiaokai@zte.com.cn: directly use is_zero_folio(), per David] Link: https://lkml.kernel.org/r/20240708062601.165215-1-ranxiaokai627@163.com Link: https://lkml.kernel.org/r/20240705104343.112680-1-ranxiaokai627@163.com Signed-off-by: Ran Xiaokai Acked-by: David Hildenbrand Cc: Andrei Vagin Cc: Jonathan Corbet Cc: Muhammad Usama Anjum Cc: Ryan Roberts Cc: Svetly Todorov Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton commit 00f58104202c472e487f0866fbd38832523fd4f9 Author: Ryan Roberts Date: Thu Jul 4 10:10:50 2024 +0100 mm: fix khugepaged activation policy Since the introduction of mTHP, the docuementation has stated that khugepaged would be enabled when any mTHP size is enabled, and disabled when all mTHP sizes are disabled. There are 2 problems with this; 1. this is not what was implemented by the code and 2. this is not the desirable behavior. Desirable behavior is for khugepaged to be enabled when any PMD-sized THP is enabled, anon or file. (Note that file THP is still controlled by the top-level control so we must always consider that, as well as the PMD-size mTHP control for anon). khugepaged only supports collapsing to PMD-sized THP so there is no value in enabling it when PMD-sized THP is disabled. So let's change the code and documentation to reflect this policy. Further, per-size enabled control modification events were not previously forwarded to khugepaged to give it an opportunity to start or stop. Consequently the following was resulting in khugepaged eroneously not being activated: echo never > /sys/kernel/mm/transparent_hugepage/enabled echo always > /sys/kernel/mm/transparent_hugepage/hugepages-2048kB/enabled [ryan.roberts@arm.com: v3] Link: https://lkml.kernel.org/r/20240705102849.2479686-1-ryan.roberts@arm.com Link: https://lkml.kernel.org/r/20240705102849.2479686-1-ryan.roberts@arm.com Link: https://lkml.kernel.org/r/20240704091051.2411934-1-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Fixes: 3485b88390b0 ("mm: thp: introduce multi-size THP sysfs interface") Closes: https://lore.kernel.org/linux-mm/7a0bbe69-1e3d-4263-b206-da007791a5c4@redhat.com/ Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Barry Song Cc: Jonathan Corbet Cc: Lance Yang Cc: Yang Shi Cc: Signed-off-by: Andrew Morton commit 823430c8e9d98c5865af518c782d0493b76aa511 Author: Ho-Ren (Jack) Chuang Date: Thu Jul 4 07:26:44 2024 +0000 memory tier: consolidate the initialization of memory tiers The current memory tier initialization process is distributed across two different functions, memory_tier_init() and memory_tier_late_init(). This design is hard to maintain. Thus, this patch is proposed to reduce the possible code paths by consolidating different initialization patches into one. The earlier discussion with Jonathan and Ying is listed here: https://lore.kernel.org/lkml/20240405150244.00004b49@Huawei.com/ If we want to put these two initializations together, they must be placed together in the later function. Because only at that time, the HMAT information will be ready, adist between nodes can be calculated, and memory tiering can be established based on the adist. So we position the initialization at memory_tier_init() to the memory_tier_late_init() call. Moreover, it's natural to keep memory_tier initialization in drivers at device_initcall() level. If we simply move the set_node_memory_tier() from memory_tier_init() to late_initcall(), it will result in HMAT not registering the mt_adistance_algorithm callback function, because set_node_memory_tier() is not performed during the memory tiering initialization phase, leading to a lack of correct default_dram information. Therefore, we introduced a nodemask to pass the information of the default DRAM nodes. The reason for not choosing to reuse default_dram_type->nodes is that it is not clean enough. So in the end, we use a __initdata variable, which is a variable that is released once initialization is complete, including both CPU and memory nodes for HMAT to iterate through. Link: https://lkml.kernel.org/r/20240704072646.437579-1-horen.chuang@linux.dev Signed-off-by: Ho-Ren (Jack) Chuang Suggested-by: Jonathan Cameron Reviewed-by: "Huang, Ying" Reviewed-by: Jonathan Cameron Cc: Alistair Popple Cc: Aneesh Kumar K.V Cc: Dan Williams Cc: Dave Jiang Cc: Gregory Price Cc: Len Brown Cc: Michal Hocko Cc: Rafael J. Wysocki Cc: Ravi Jonnalagadda Cc: SeongJae Park Cc: Tejun Heo Signed-off-by: Andrew Morton commit a8585ac68621983587f1701b7567978fcbcd9573 Author: Maarten Lankhorst Date: Wed Jul 3 13:25:10 2024 +0200 mm/page_counter: move calculating protection values to page_counter It's a lot of math, and there is nothing memcontrol specific about it. This makes it easier to use inside of the drm cgroup controller. [akpm@linux-foundation.org: fix kerneldoc, per Jeff Johnson] Link: https://lkml.kernel.org/r/20240703112510.36424-1-maarten.lankhorst@linux.intel.com Signed-off-by: Maarten Lankhorst Acked-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Michal Hocko Cc: Johannes Weiner Cc: Muchun Song Cc: Jeff Johnson Signed-off-by: Andrew Morton commit 3b0ba54d5f8ff60553c01d3ec3c607ab7bb3b452 Author: Suren Baghdasaryan Date: Wed Jul 3 10:42:25 2024 -0700 mm: add comments for allocation helpers explaining why they are macros A number of allocation helper functions were converted into macros to account them at the call sites. Add a comment for each converted allocation helper explaining why it has to be a macro and why we typecast the return value wherever required. The patch also moves acpi_os_acquire_object() closer to other allocation helpers to group them together under the same comment. The patch has no functional changes. Link: https://lkml.kernel.org/r/20240703174225.3891393-1-surenb@google.com Fixes: 2c321f3f70bc ("mm: change inlined allocation helpers to account at the call site") Signed-off-by: Suren Baghdasaryan Suggested-by: Andrew Morton Cc: Christian König Cc: Christoph Hellwig Cc: Jan Kara Cc: Kent Overstreet Cc: Thorsten Blum Signed-off-by: Andrew Morton commit cd1e0dac3a3e57d86085eea95ab0cf3172950156 Author: Christoph Hellwig Date: Tue Jul 2 09:23:27 2024 +0200 mm: unexport vmf_insert_mixed_mkwrite vmf_insert_mixed_mkwrite is only used by the built-in DAX code. Link: https://lkml.kernel.org/r/20240702072327.1640911-1-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Alistair Popple Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 8268614b408be6b76c1cee6f67de7deb0d6593b3 Author: Christophe Leroy Date: Tue Jul 2 15:51:35 2024 +0200 mm: remove CONFIG_ARCH_HAS_HUGEPD powerpc was the only user of CONFIG_ARCH_HAS_HUGEPD and doesn't use it anymore, so remove all related code. Link: https://lkml.kernel.org/r/4b10c54c794780b955f3ad6c657d0199dd792146.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Acked-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 0c22e4b2949b83ccaf530603d68239cb5b0fd512 Author: Christophe Leroy Date: Tue Jul 2 15:51:34 2024 +0200 powerpc/mm: remove hugepd leftovers All targets have now opted out of CONFIG_ARCH_HAS_HUGEPD so remove left over code. Link: https://lkml.kernel.org/r/39c0d0adee6790fc42cee9f458e05fb95136c3dd.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Acked-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 57fb15c32f4f6a4f1a58f1fbc58a799c3f975ed8 Author: Christophe Leroy Date: Tue Jul 2 15:51:33 2024 +0200 powerpc/64s: use contiguous PMD/PUD instead of HUGEPD On book3s/64, the only user of hugepd is hash in 4k mode. All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. Rework hash-4k to use contiguous PMD and PUD instead. In that setup there are only two huge page sizes: 16M and 16G. 16M sits at PMD level and 16G at PUD level. pte_update doesn't know page size, lets use the same trick as hpte_need_flush() to get page size from segment properties. That's not the most efficient way but let's do that until callers of pte_update() provide page size instead of just a huge flag. Link: https://lkml.kernel.org/r/7448f60a9b3efd396595f4f735d1e0babc5ae379.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Acked-by: Michael Ellerman (powerpc) Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 7c44202e36097e23240025298ccd1fe4eacfd94e Author: Christophe Leroy Date: Tue Jul 2 15:51:32 2024 +0200 powerpc/e500: use contiguous PMD instead of hugepd e500 supports many page sizes among which the following size are implemented in the kernel at the time being: 4M, 16M, 64M, 256M, 1G. On e500, TLB miss for hugepages is exclusively handled by SW even on e6500 which has HW assistance for 4k pages, so there are no constraints like on the 8xx. On e500/32, all are at PGD/PMD level and can be handled as cont-PMD. On e500/64, smaller ones are on PMD while bigger ones are on PUD. Again, they can easily be handled as cont-PMD and cont-PUD instead of hugepd. On e500/32, use the pagesize bits in PTE to know if it is a PMD or a leaf entry. This works because the pagesize bits are in the last 12 bits and page tables are 4k aligned. On e500/64, use highest bit which is always 1 on PxD (Because PxD contains virtual address of a kernel memory) and always 0 on PTEs because not all bits of RPN are used/possible. Link: https://lkml.kernel.org/r/dd085987816ed2a0c70adb7e34966cb833fc03e1.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit dc0aa538a954c90d71d6bc1fcac487ef01512120 Author: Christophe Leroy Date: Tue Jul 2 15:51:31 2024 +0200 powerpc/e500: free r10 for FIND_PTE Move r13 load after the call to FIND_PTE, and use r13 instead of r10 for storing fault address. This will allow using r10 freely in FIND_PTE in following patch to handle hugepage size. Link: https://lkml.kernel.org/r/a3ee563ad5b13c891a15d3aae6c136c44ce8aa63.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 276d5affbbaea4d369d1e5b9711cb2951037f6ee Author: Christophe Leroy Date: Tue Jul 2 15:51:30 2024 +0200 powerpc/e500: don't pre-check write access on data TLB error Don't pre-check write access on read-only pages on data TLB error. Load the TLB anyway and take a DSI exception when it happens. This avoids reading SPRN_ESR at every data TLB error exception. Link: https://lkml.kernel.org/r/8525518e1657d6032b7e980c1888102828d66950.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 84319905ca5f3759c42082e20ed978c81f4dead0 Author: Christophe Leroy Date: Tue Jul 2 15:51:29 2024 +0200 powerpc/e500: encode hugepage size in PTE bits Use PTE page size bits to encode hugepage size with the following format corresponding to the values expected in bits 52-55 in MAS1 register. Those bits are called TSIZE: 0001 4 Kbyte 0010 16 Kbyte 0011 64 Kbyte 0100 256 Kbyte 0101 1 Mbyte 0110 4 Mbyte 0111 16 Mbyte 1000 64 Mbyte 1001 256 Mbyte 1010 1 Gbyte 1011 4 Gbyte 1100 16 Gbyte 1101 64 Gbyte 1110 256 Gbyte 1111 1 Tbyte It corresponds to shift value minus 10 with lowest bit removed. It is not the value expected in the PTE in that field, but only e6500 performs HW based TLB loading and the e6500 reference manual explicitely says that this field is ignored. Also add pte_huge_size() which will be used later. Link: https://lkml.kernel.org/r/6f7ce82fa8c381d55f65342d77060fc55802e612.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 6b0e82791bd03b2326c7f7d8c1124c825742f2a4 Author: Christophe Leroy Date: Tue Jul 2 15:51:28 2024 +0200 powerpc/e500: switch to 64 bits PGD on 85xx (32 bits) At the time being when CONFIG_PTE_64BIT is selected, PTE entries are 64 bits but PGD entries are still 32 bits. In order to allow leaf PMD entries, switch the PGD to 64 bits entries. Link: https://lkml.kernel.org/r/ca85397df02564e5edc3a3c27b55cf43af3e4ef3.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit e081c14744f4a93514069e1af1a7273d5451b909 Author: Christophe Leroy Date: Tue Jul 2 15:51:27 2024 +0200 powerpc/e500: remove enc and ind fields from struct mmu_psize_def enc field is hidden behind BOOK3E_PAGESZ_XX macros, and when you look closer you realise that this field is nothing else than the value of shift minus ten. So remove enc field and calculate tsize from shift field. Also remove inc field which is unused. Link: https://lkml.kernel.org/r/e99136779b5b0829c2c60d37f305a1410c65cf9b.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit b04c2da4ff89a06978da25c528378371b881e910 Author: Christophe Leroy Date: Tue Jul 2 15:51:26 2024 +0200 powerpc/8xx: simplify struct mmu_psize_def On 8xx, only the shift field is used in struct mmu_psize_def Remove other fields and related macros. Link: https://lkml.kernel.org/r/dd0587a9e8354005858c7f8c9a775ad05523b314.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 0549e76663730235a10395a7af7ad3d3ce6e2402 Author: Christophe Leroy Date: Tue Jul 2 15:51:25 2024 +0200 powerpc/8xx: rework support for 8M pages using contiguous PTE entries In order to fit better with standard Linux page tables layout, add support for 8M pages using contiguous PTE entries in a standard page table. Page tables will then be populated with 1024 similar entries and two PMD entries will point to that page table. The PMD entries also get a flag to tell it is addressing an 8M page, this is required for the HW tablewalk assistance. Link: https://lkml.kernel.org/r/8693d9a0408371043ca63bf9e4a9c140667af63e.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 7ea981070fd9ec24bc0111636038193aebb0289c Author: Christophe Leroy Date: Tue Jul 2 15:51:24 2024 +0200 powerpc/8xx: fix size given to set_huge_pte_at() set_huge_pte_at() expects the size of the hugepage as an int, not the psize which is the index of the page definition in table mmu_psize_defs[] Link: https://lkml.kernel.org/r/97f2090011e25d99b6b0aae73e22e1b921c5d1fb.1719928057.git.christophe.leroy@csgroup.eu Fixes: 935d4f0c6dc8 ("mm: hugetlb: add huge page size param to set_huge_pte_at()") Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit d6a1a9a3be8568e0cd37aeaa33dd115223eb0d82 Author: Christophe Leroy Date: Tue Jul 2 15:51:23 2024 +0200 powerpc/mm: allow hugepages without hugepd In preparation of implementing huge pages on powerpc 8xx without hugepd, enclose hugepd related code inside an ifdef CONFIG_ARCH_HAS_HUGEPD This also allows removing some stubs. Link: https://lkml.kernel.org/r/ada097ca8a4fa85a77f51719516ef2478800d77a.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 6a9f66c84c4a1d8c874d10abf6a2be3e867d2764 Author: Christophe Leroy Date: Tue Jul 2 15:51:22 2024 +0200 powerpc/mm: fix __find_linux_pte() on 32 bits with PMD leaf entries Building on 32 bits with pmd_leaf() not returning always false leads to the following error: CC arch/powerpc/mm/pgtable.o arch/powerpc/mm/pgtable.c: In function '__find_linux_pte': arch/powerpc/mm/pgtable.c:506:1: error: function may return address of local variable [-Werror=return-local-addr] 506 | } | ^ arch/powerpc/mm/pgtable.c:394:15: note: declared here 394 | pud_t pud, *pudp; | ^~~ arch/powerpc/mm/pgtable.c:394:15: note: declared here This is due to pmd_offset() being a no-op in that case. So rework it for powerpc/32 so that pXd_offset() are used on real pointers and not on on-stack copies. Behind fixing the problem, it also has the advantage of simplifying __find_linux_pte() including the removal of stack frame: After this patch: 00000018 <__find_linux_pte>: 18: 2c 06 00 00 cmpwi r6,0 1c: 41 82 00 0c beq 28 <__find_linux_pte+0x10> 20: 39 20 00 00 li r9,0 24: 91 26 00 00 stw r9,0(r6) 28: 2f 85 00 00 cmpwi cr7,r5,0 2c: 41 9e 00 0c beq cr7,38 <__find_linux_pte+0x20> 30: 39 20 00 00 li r9,0 34: 99 25 00 00 stb r9,0(r5) 38: 54 89 65 3a rlwinm r9,r4,12,20,29 3c: 7c 63 48 2e lwzx r3,r3,r9 40: 2f 83 00 00 cmpwi cr7,r3,0 44: 41 9e 00 30 beq cr7,74 <__find_linux_pte+0x5c> 48: 54 69 07 3a rlwinm r9,r3,0,28,29 4c: 2f 89 00 0c cmpwi cr7,r9,12 50: 54 63 00 26 clrrwi r3,r3,12 54: 54 84 b5 36 rlwinm r4,r4,22,20,27 58: 3c 63 c0 00 addis r3,r3,-16384 5c: 7c 63 22 14 add r3,r3,r4 60: 4c be 00 20 bnelr+ cr7 64: 4d 82 00 20 beqlr 68: 39 20 00 17 li r9,23 6c: 91 26 00 00 stw r9,0(r6) 70: 4e 80 00 20 blr 74: 38 60 00 00 li r3,0 78: 4e 80 00 20 blr Before this patch: 00000018 <__find_linux_pte>: 18: 2c 06 00 00 cmpwi r6,0 1c: 94 21 ff e0 stwu r1,-32(r1) 20: 41 82 00 0c beq 2c <__find_linux_pte+0x14> 24: 39 20 00 00 li r9,0 28: 91 26 00 00 stw r9,0(r6) 2c: 2f 85 00 00 cmpwi cr7,r5,0 30: 41 9e 00 0c beq cr7,3c <__find_linux_pte+0x24> 34: 39 20 00 00 li r9,0 38: 99 25 00 00 stb r9,0(r5) 3c: 54 89 65 3a rlwinm r9,r4,12,20,29 40: 7c 63 48 2e lwzx r3,r3,r9 44: 54 69 07 3a rlwinm r9,r3,0,28,29 48: 2f 89 00 0c cmpwi cr7,r9,12 4c: 90 61 00 0c stw r3,12(r1) 50: 41 9e 00 4c beq cr7,9c <__find_linux_pte+0x84> 54: 80 61 00 0c lwz r3,12(r1) 58: 54 69 07 3a rlwinm r9,r3,0,28,29 5c: 2f 89 00 0c cmpwi cr7,r9,12 60: 90 61 00 08 stw r3,8(r1) 64: 41 9e 00 38 beq cr7,9c <__find_linux_pte+0x84> 68: 80 61 00 08 lwz r3,8(r1) 6c: 2f 83 00 00 cmpwi cr7,r3,0 70: 41 9e 00 54 beq cr7,c4 <__find_linux_pte+0xac> 74: 54 69 07 3a rlwinm r9,r3,0,28,29 78: 2f 89 00 0c cmpwi cr7,r9,12 7c: 54 69 00 26 clrrwi r9,r3,12 80: 54 8a b5 36 rlwinm r10,r4,22,20,27 84: 3c 69 c0 00 addis r3,r9,-16384 88: 7c 63 52 14 add r3,r3,r10 8c: 54 84 93 be srwi r4,r4,14 90: 41 9e 00 14 beq cr7,a4 <__find_linux_pte+0x8c> 94: 38 21 00 20 addi r1,r1,32 98: 4e 80 00 20 blr 9c: 54 69 00 26 clrrwi r9,r3,12 a0: 54 84 93 be srwi r4,r4,14 a4: 3c 69 c0 00 addis r3,r9,-16384 a8: 54 84 25 36 rlwinm r4,r4,4,20,27 ac: 7c 63 22 14 add r3,r3,r4 b0: 41 a2 ff e4 beq 94 <__find_linux_pte+0x7c> b4: 39 20 00 17 li r9,23 b8: 91 26 00 00 stw r9,0(r6) bc: 38 21 00 20 addi r1,r1,32 c0: 4e 80 00 20 blr c4: 38 60 00 00 li r3,0 c8: 38 21 00 20 addi r1,r1,32 cc: 4e 80 00 20 blr Link: https://lkml.kernel.org/r/50a3cfbab5b11890a0da027de5cb011a9d47ba89.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit afc8969f6da223562221d7dc389f72fdc2038e35 Author: Christophe Leroy Date: Tue Jul 2 15:51:21 2024 +0200 powerpc/mm: remove _PAGE_PSIZE _PAGE_PSIZE macro is never used outside the place it is defined and is used only on 8xx and e500. Remove indirection, remove it and use its content directly. Link: https://lkml.kernel.org/r/c41da3b0ceda7311a50f0391cc4d54302ae15b74.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit e6c0c03245b14d6c205814aee67128257d0bea84 Author: Christophe Leroy Date: Tue Jul 2 15:51:20 2024 +0200 mm: provide mm_struct and address to huge_ptep_get() On powerpc 8xx huge_ptep_get() will need to know whether the given ptep is a PTE entry or a PMD entry. This cannot be known with the PMD entry itself because there is no easy way to know it from the content of the entry. So huge_ptep_get() will need to know either the size of the page or get the pmd. In order to be consistent with huge_ptep_get_and_clear(), give mm and address to huge_ptep_get(). Link: https://lkml.kernel.org/r/cc00c70dd384298796a4e1b25d6c4eb306d3af85.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 18d095b2556e5e1292003c8e9f5d845ed42ef89b Author: Christophe Leroy Date: Tue Jul 2 15:51:19 2024 +0200 mm: define __pte_leaf_size() to also take a PMD entry On powerpc 8xx, when a page is 8M size, the information is in the PMD entry. So allow architectures to provide __pte_leaf_size() instead of pte_leaf_size() and provide the PMD entry to that function. When __pte_leaf_size() is not defined, define it as a pte_leaf_size() so that architectures not interested in the PMD arguments are not impacted. Only define a default pte_leaf_size() when __pte_leaf_size() is not defined to make sure nobody adds new calls to pte_leaf_size() in the core. Link: https://lkml.kernel.org/r/c7c008f0a314bf8029ad7288fdc908db1ec7e449.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Peter Xu Signed-off-by: Andrew Morton commit 0db46aaabe641e5565238dc3ef7ac2396a0c6286 Author: Michael Ellerman Date: Tue Jul 2 15:51:18 2024 +0200 powerpc/64e: drop unused TLB miss handlers There are two possibilities for book3e_htw_mode, PPC_HTW_E6500 or PPC_HTW_NONE. The TLB miss handlers are patched to use, respectively: - exc_[data|indstruction]_tlb_miss_e6500_book3e - exc_[data|indstruction]_tlb_miss_bolted_book3e Which means the default handlers are never used. Remove those, and use the bolted handlers (PPC_HTW_NONE) by default. Link: https://lkml.kernel.org/r/9a670adc1771fb1871fba93ace5372f7eadc286f.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Michael Ellerman Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 264488bf59864fa7a67983b9f1561c54ca71ddb3 Author: Michael Ellerman Date: Tue Jul 2 15:51:17 2024 +0200 powerpc/64e: consolidate TLB miss handler patching The 64e TLB miss handler patching is done in setup_mmu_htw(), and then again immediately afterward in early_init_mmu_global(). Consolidate it into a single location. Link: https://lkml.kernel.org/r/7033b37493fb48a3e5245b59d0a42afb75dabfc1.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Michael Ellerman Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit aca69900d717f62ef3d4df671129b707f651af5d Author: Michael Ellerman Date: Tue Jul 2 15:51:16 2024 +0200 powerpc/64e: drop MMU_FTR_TYPE_FSL_E checks in 64-bit code All 64-bit Book3E have MMU_FTR_TYPE_FSL_E, since A2 was removed, so remove checks for it in 64-bit only code. Link: https://lkml.kernel.org/r/2b0b0bc9752e6cece222e4e2050358da70bb631d.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Michael Ellerman Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit ceb9314fd8ecc92467369c7463cb0bed728607fa Author: Michael Ellerman Date: Tue Jul 2 15:51:15 2024 +0200 powerpc/64e: drop E500 ifdefs in 64-bit code All 64-bit Book3E have E500=y, so drop the unneeded ifdefs. Link: https://lkml.kernel.org/r/7fb88809c88a1b774063eda602a9333079403f83.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Michael Ellerman Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit a898530eea3d0ba08c17a60865995a3bb468d1bc Author: Michael Ellerman Date: Tue Jul 2 15:51:14 2024 +0200 powerpc/64e: split out nohash Book3E 64-bit code A reasonable chunk of nohash/tlb.c is 64-bit only code, split it out into a separate file. Link: https://lkml.kernel.org/r/cb2b118f9d8a86f82d01bfb9ad309d1d304480a1.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Michael Ellerman Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 88715b6e5d529f4ef3830ad2a893e4624c6af0b8 Author: Michael Ellerman Date: Tue Jul 2 15:51:13 2024 +0200 powerpc/64e: remove unused IBM HTW code Patch series "Reimplement huge pages without hugepd on powerpc (8xx, e500, book3s/64)", v7. Unlike most architectures, powerpc 8xx HW requires a two-level pagetable topology for all page sizes. So a leaf PMD-contig approach is not feasible as such. Possible sizes on 8xx are 4k, 16k, 512k and 8M. First level (PGD/PMD) covers 4M per entry. For 8M pages, two PMD entries must point to a single entry level-2 page table. Until now that was done using hugepd. This series changes it to use standard page tables where the entry is replicated 1024 times on each of the two pagetables refered by the two associated PMD entries for that 8M page. For e500 and book3s/64 there are less constraints because it is not tied to the HW assisted tablewalk like on 8xx, so it is easier to use leaf PMDs (and PUDs). On e500 the supported page sizes are 4M, 16M, 64M, 256M and 1G. All at PMD level on e500/32 (mpc85xx) and mix of PMD and PUD for e500/64. We encode page size with 4 available bits in PTE entries. On e300/32 PGD entries size is increases to 64 bits in order to allow leaf-PMD entries because PTE are 64 bits on e500. On book3s/64 only the hash-4k mode is concerned. It supports 16M pages as cont-PMD and 16G pages as cont-PUD. In other modes (radix-4k, radix-6k and hash-64k) the sizes match with PMD and PUD sizes so that's just leaf entries. The hash processing make things a bit more complex. To ease things, __hash_page_huge() is modified to bail out when DIRTY or ACCESSED bits are missing, leaving it to mm core to fix it. This patch (of 23): The nohash HTW_IBM (Hardware Table Walk) code is unused since support for A2 was removed in commit fb5a515704d7 ("powerpc: Remove platforms/ wsp and associated pieces") (2014). The remaining supported CPUs use either no HTW (data_tlb_miss_bolted), or the e6500 HTW (data_tlb_miss_e6500). Link: https://lkml.kernel.org/r/cover.1719928057.git.christophe.leroy@csgroup.eu Link: https://lkml.kernel.org/r/820dd1385ecc931f07b0d7a0fa827b1613917ab6.1719928057.git.christophe.leroy@csgroup.eu Signed-off-by: Michael Ellerman Signed-off-by: Christophe Leroy Cc: Jason Gunthorpe Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 791abe1e420c3dad6ddbd0a6c40467e9e24059b7 Author: Sergey Senozhatsky Date: Mon Jul 1 12:11:37 2024 +0900 zsmalloc: rename class stat mutators A cosmetic change. o Rename class_stat_inc() and class_stat_dec() to class_stat_add() and class_stat_sub() correspondingly. inc/dec are usually associated with +1/-1 modifications, while zsmlloc can modify stats by up to ->objs_per_zspage. Use add/sub (follow atomics naming). o Rename zs_stat_get() to class_stat_read() get() is usually associated with ref-counting and is paired with put(). zs_stat_get() simply reads class stat so rename to reflect it. (This also follows atomics naming). Link: https://lkml.kernel.org/r/20240701031140.3756345-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Reviewed-by: Chengming Zhou Cc: Minchan Kim Signed-off-by: Andrew Morton commit 9b89e018990de47c72ef8b2ca29204f88fda8f05 Author: Lance Yang Date: Fri Jun 28 21:07:50 2024 +0800 mm: add docs for per-order mTHP split counters This commit introduces documentation for mTHP split counters in transhuge.rst. [ioworker0@gmail.com: improve the doc as suggested by Ryan] Link: https://lkml.kernel.org/r/20240704012905.42971-3-ioworker0@gmail.com [ioworker0@gmail.com: tweak Documentation/admin-guide/mm/transhuge.rst] Link: https://lkml.kernel.org/r/20240707013659.1151-1-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240628130750.73097-3-ioworker0@gmail.com Signed-off-by: Mingzhe Yang Signed-off-by: Lance Yang Reviewed-by: Barry Song Reviewed-by: Ryan Roberts Acked-by: David Hildenbrand Cc: Bang Li Cc: Baolin Wang Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit f216c845f3c772e54d27fe209fd300b10e7bf54a Author: Lance Yang Date: Fri Jun 28 21:07:49 2024 +0800 mm: add per-order mTHP split counters Patch series "mm: introduce per-order mTHP split counters", v3. At present, the split counters in THP statistics no longer include PTE-mapped mTHP. Therefore, we want to introduce per-order mTHP split counters to monitor the frequency of mTHP splits. This will assist developers in better analyzing and optimizing system performance. /sys/kernel/mm/transparent_hugepage/hugepages-/stats split split_failed split_deferred This patch (of 2): Currently, the split counters in THP statistics no longer include PTE-mapped mTHP. Therefore, we propose introducing per-order mTHP split counters to monitor the frequency of mTHP splits. This will help developers better analyze and optimize system performance. /sys/kernel/mm/transparent_hugepage/hugepages-/stats split split_failed split_deferred [ioworker0@gmail.com: make things more readable, per Barry and Baolin] Link: https://lkml.kernel.org/r/20240704012905.42971-2-ioworker0@gmail.com [ioworker0@gmail.com: use == for `order' test, per David] Link: https://lkml.kernel.org/r/20240705113119.82210-1-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240704012905.42971-1-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240704012905.42971-2-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240628130750.73097-1-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240628130750.73097-2-ioworker0@gmail.com Signed-off-by: Mingzhe Yang Signed-off-by: Lance Yang Reviewed-by: Ryan Roberts Acked-by: Barry Song Reviewed-by: Baolin Wang Acked-by: David Hildenbrand Cc: Bang Li Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit d468f1b8cb8e4c28ebb2282af2dd4021b60df7cb Author: Chengming Zhou Date: Thu Jun 27 15:59:59 2024 +0800 mm/zsmalloc: move record_obj() into obj_malloc() We always record_obj() to make handle points to object after obj_malloc(), so simplify the code by moving record_obj() into obj_malloc(). There should be no functional change. Link: https://lkml.kernel.org/r/20240627075959.611783-2-chengming.zhou@linux.dev Signed-off-by: Chengming Zhou Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton commit 538148f9ba9e3136a877881e72ccbe56733daae2 Author: Chengming Zhou Date: Thu Jun 27 15:59:58 2024 +0800 mm/zsmalloc: clarify class per-fullness zspage counts We always use insert_zspage() and remove_zspage() to update zspage's fullness location, which will account correctly. But this special async free path use "splice" instead of remove_zspage(), so the per-fullness zspage count for ZS_INUSE_RATIO_0 won't decrease. Clean things up by decreasing when iterate over the zspage free list. This doesn't actually fix anything. ZS_INUSE_RATIO_0 is just a "placeholder" which is never used anywhere. Link: https://lkml.kernel.org/r/20240627075959.611783-1-chengming.zhou@linux.dev Signed-off-by: Chengming Zhou Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 81510a0eaa6916c2fbb0b2639f3e617a296979a3 Author: Andrii Nakryiko Date: Thu Jun 27 10:08:58 2024 -0700 selftests/proc: add PROCMAP_QUERY ioctl tests Extend existing proc-pid-vm.c tests with PROCMAP_QUERY ioctl() API. Test a few successful and negative cases, validating querying filtering and exact vs next VMA logic works as expected. Link: https://lkml.kernel.org/r/20240627170900.1672542-7-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Liam R. Howlett Cc: Alexey Dobriyan Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Mike Rapoport (IBM) Cc: Suren Baghdasaryan Cc: Andi Kleen Cc: Arnd Bergmann Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit 77179b6f30811bf0bd2f62fcdf235997123e70dc Author: Andrii Nakryiko Date: Thu Jun 27 10:08:57 2024 -0700 tools: sync uapi/linux/fs.h header into tools subdir We need this UAPI header in tools/include subdirectory for using it from BPF selftests. Link: https://lkml.kernel.org/r/20240627170900.1672542-6-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Liam R. Howlett Cc: Alexey Dobriyan Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Mike Rapoport (IBM) Cc: Suren Baghdasaryan Cc: Andi Kleen Cc: Arnd Bergmann Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit c10cb9148e5175e65326f81930ecebd0147e2721 Author: Andrii Nakryiko Date: Thu Jun 27 10:08:56 2024 -0700 docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence Call out PROCMAP_QUERY ioctl() existence in the section describing /proc/PID/maps file in documentation. We refer user to UAPI header for low-level details of this programmatic interface. Link: https://lkml.kernel.org/r/20240627170900.1672542-5-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Liam R. Howlett Cc: Alexey Dobriyan Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Mike Rapoport (IBM) Cc: Suren Baghdasaryan Cc: Andi Kleen Cc: Arnd Bergmann Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit bfc69fd05ef9b6416f4811aafafb7f2b34daa000 Author: Andrii Nakryiko Date: Thu Jun 27 10:08:55 2024 -0700 fs/procfs: add build ID fetching to PROCMAP_QUERY API The need to get ELF build ID reliably is an important aspect when dealing with profiling and stack trace symbolization, and /proc//maps textual representation doesn't help with this. To get backing file's ELF build ID, application has to first resolve VMA, then use it's start/end address range to follow a special /proc//map_files/- symlink to open the ELF file (this is necessary because backing file might have been removed from the disk or was already replaced with another binary in the same file path. Such approach, beyond just adding complexity of having to do a bunch of extra work, has extra security implications. Because application opens underlying ELF file and needs read access to its entire contents (as far as kernel is concerned), kernel puts additional capable() checks on following /proc//map_files/- symlink. And that makes sense in general. But in the case of build ID, profiler/symbolizer doesn't need the contents of ELF file, per se. It's only build ID that is of interest, and ELF build ID itself doesn't provide any sensitive information. So this patch adds a way to request backing file's ELF build ID along the rest of VMA information in the same API. User has control over whether this piece of information is requested or not by either setting build_id_size field to zero or non-zero maximum buffer size they provided through build_id_addr field (which encodes user pointer as __u64 field). This is a completely optional piece of information, and so has no performance implications for user cases that don't care about build ID, while improving performance and simplifying the setup for those application that do need it. Kernel already implements build ID fetching, which is used from BPF subsystem. We are reusing this code here, but plan a follow up changes to make it work better under more relaxed assumption (compared to what existing code assumes) of being called from user process context, in which page faults are allowed. BPF-specific implementation currently bails out if necessary part of ELF file is not paged in, all due to extra BPF-specific restrictions (like the need to fetch build ID in restrictive contexts such as NMI handler). [andrii@kernel.org: fix integer to pointer cast warning in do_procmap_query()] Link: https://lkml.kernel.org/r/20240701174805.1897344-1-andrii@kernel.org Link: https://lkml.kernel.org/r/20240627170900.1672542-4-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Liam R. Howlett Cc: Alexey Dobriyan Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Mike Rapoport (IBM) Cc: Suren Baghdasaryan Cc: Andi Kleen Cc: Arnd Bergmann Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit ed5d583a88a9207b866c14ba834984c6f3c51d23 Author: Andrii Nakryiko Date: Thu Jun 27 10:08:54 2024 -0700 fs/procfs: implement efficient VMA querying API for /proc//maps /proc//maps file is extremely useful in practice for various tasks involving figuring out process memory layout, what files are backing any given memory range, etc. One important class of applications that absolutely rely on this are profilers/stack symbolizers (perf tool being one of them). Patterns of use differ, but they generally would fall into two categories. In on-demand pattern, a profiler/symbolizer would normally capture stack trace containing absolute memory addresses of some functions, and would then use /proc//maps file to find corresponding backing ELF files (normally, only executable VMAs are of interest), file offsets within them, and then continue from there to get yet more information (ELF symbols, DWARF information) to get human-readable symbolic information. This pattern is used by Meta's fleet-wide profiler, as one example. In preprocessing pattern, application doesn't know the set of addresses of interest, so it has to fetch all relevant VMAs (again, probably only executable ones), store or cache them, then proceed with profiling and stack trace capture. Once done, it would do symbolization based on stored VMA information. This can happen at much later point in time. This patterns is used by perf tool, as an example. In either case, there are both performance and correctness requirement involved. This address to VMA information translation has to be done as efficiently as possible, but also not miss any VMA (especially in the case of loading/unloading shared libraries). In practice, correctness can't be guaranteed (due to process dying before VMA data can be captured, or shared library being unloaded, etc), but any effort to maximize the chance of finding the VMA is appreciated. Unfortunately, for all the /proc//maps file universality and usefulness, it doesn't fit the above use cases 100%. First, it's main purpose is to emit all VMAs sequentially, but in practice captured addresses would fall only into a smaller subset of all process' VMAs, mainly containing executable text. Yet, library would need to parse most or all of the contents to find needed VMAs, as there is no way to skip VMAs that are of no use. Efficient library can do the linear pass and it is still relatively efficient, but it's definitely an overhead that can be avoided, if there was a way to do more targeted querying of the relevant VMA information. Second, it's a text based interface, which makes its programmatic use from applications and libraries more cumbersome and inefficient due to the need to handle text parsing to get necessary pieces of information. The overhead is actually payed both by kernel, formatting originally binary VMA data into text, and then by user space application, parsing it back into binary data for further use. For the on-demand pattern of usage, described above, another problem when writing generic stack trace symbolization library is an unfortunate performance-vs-correctness tradeoff that needs to be made. Library has to make a decision to either cache parsed contents of /proc//maps (after initial processing) to service future requests (if application requests to symbolize another set of addresses (for the same process), captured at some later time, which is typical for periodic/continuous profiling cases) to avoid higher costs of re-parsing this file. Or it has to choose to cache the contents in memory to speed up future requests. In the former case, more memory is used for the cache and there is a risk of getting stale data if application loads or unloads shared libraries, or otherwise changed its set of VMAs somehow, e.g., through additional mmap() calls. In the latter case, it's the performance hit that comes from re-opening the file and re-parsing its contents all over again. This patch aims to solve this problem by providing a new API built on top of /proc//maps. It's meant to address both non-selectiveness and text nature of /proc//maps, by giving user more control of what sort of VMA(s) needs to be queried, and being binary-based interface eliminates the overhead of text formatting (on kernel side) and parsing (on user space side). It's also designed to be extensible and forward/backward compatible by including required struct size field, which user has to provide. We use established copy_struct_from_user() approach to handle extensibility. User has a choice to pick either getting VMA that covers provided address or -ENOENT if none is found (exact, least surprising, case). Or, with an extra query flag (PROCMAP_QUERY_COVERING_OR_NEXT_VMA), they can get either VMA that covers the address (if there is one), or the closest next VMA (i.e., VMA with the smallest vm_start > addr). The latter allows more efficient use, but, given it could be a surprising behavior, requires an explicit opt-in. There is another query flag that is useful for some use cases. PROCMAP_QUERY_FILE_BACKED_VMA instructs this API to only return file-backed VMAs. Combining this with PROCMAP_QUERY_COVERING_OR_NEXT_VMA makes it possible to efficiently iterate only file-backed VMAs of the process, which is what profilers/symbolizers are normally interested in. All the above querying flags can be combined with (also optional) set of desired VMA permissions flags. This allows to, for example, iterate only an executable subset of VMAs, which is what preprocessing pattern, used by perf tool, would benefit from, as the assumption is that captured stack traces would have addresses of executable code. This saves time by skipping non-executable VMAs altogether efficienty. All these querying flags (modifiers) are orthogonal and can be combined in a semantically meaningful and natural way. Basing this ioctl()-based API on top of /proc//maps's FD makes sense given it's querying the same set of VMA data. It's also benefitial because permission checks for /proc//maps is performed at open time once, and the actual data read of text contents of /proc//maps is done without further permission checks. We piggyback on this pattern with ioctl()-based API as well, as that's a desired property. Both for performance reasons, but also for security and flexibility reasons. Allowing application to open an FD for /proc/self/maps without any extra capabilities, and then passing it to some sort of profiling agent through Unix-domain socket, would allow such profiling agent to not require some of the capabilities that are otherwise expected when opening /proc//maps file for *another* process. This is a desirable property for some more restricted setups. This new ioctl-based implementation doesn't interfere with seq_file-based implementation of /proc//maps textual interface, and so could be used together or independently without paying any price for that. Note also, that fetching VMA name (e.g., backing file path, or special hard-coded or user-provided names) is optional just like build ID. If user sets vma_name_size to zero, kernel code won't attempt to retrieve it, saving resources. Earlier versions of this patch set were adding per-VMA locking, which is why we have a code structure that is ready for abstracting mmap_lock vs vm_lock differences (query_vma_setup(), query_vma_teardown(), and query_vma_find_by_addr()), but given anon_vma_name() is not yet compatible with per-VMA locking, initial implementation sticks to using only mmap_lock for now. It will be easy to add back per-VMA locking once all the pieces are ready later on. Which is why we keep existing code structure with setup/teardown/query helper functions. [andrii@kernel.org: improve PROCMAP_QUERY's compat mode handling] Link: https://lkml.kernel.org/r/20240701174805.1897344-2-andrii@kernel.org Link: https://lkml.kernel.org/r/20240627170900.1672542-3-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Liam R. Howlett Cc: Alexey Dobriyan Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Mike Rapoport (IBM) Cc: Suren Baghdasaryan Cc: Andi Kleen Cc: Arnd Bergmann Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit acd4b2ecf3bb24a781aad7f703243fa00eb7efbb Author: Andrii Nakryiko Date: Thu Jun 27 10:08:53 2024 -0700 fs/procfs: extract logic for getting VMA name constituents Patch series "ioctl()-based API to query VMAs from /proc//maps", v6. Implement binary ioctl()-based interface to /proc//maps file to allow applications to query VMA information more efficiently than reading *all* VMAs nonselectively through text-based interface of /proc//maps file. Patch #2 goes into a lot of details and background on some common patterns of using /proc//maps in the area of performance profiling and subsequent symbolization of captured stack traces. As mentioned in that patch, patterns of VMA querying can differ depending on specific use case, but can generally be grouped into two main categories: the need to query a small subset of VMAs covering a given batch of addresses, or reading/storing/caching all (typically, executable) VMAs upfront for later processing. The new PROCMAP_QUERY ioctl() API added in this patch set was motivated by the former pattern of usage. Earlier revisions had a patch adding a tool that faithfully reproduces an efficient VMA matching pass of a symbolizer, collecting a subset of covering VMAs for a given set of addresses as efficiently as possible. This tool served both as a testing ground, as well as a benchmarking tool. It implements everything both for currently existing text-based /proc//maps interface, as well as for newly-added PROCMAP_QUERY ioctl(). This revision dropped the tool from the patch set and, once the API lands upstream, this tool might be added separately on Github as an example. Based on discussion on earlier revisions of this patch set, it turned out that this ioctl() API is competitive with highly-optimized text-based pre-processing pattern that perf tool is using. Based on perf discussion, this revision adds more flexibility in specifying a subset of VMAs that are of interest. Now it's possible to specify desired permissions of VMAs (e.g., request only executable ones) and/or restrict to only a subset of VMAs that have file backing. This further improves the efficiency when using this new API thanks to more selective (executable VMAs only) querying. In addition to a custom benchmarking tool, and experimental perf integration (available at [0]), Daniel Mueller has since also implemented an experimental integration into blazesym (see [1]), a library used for stack trace symbolization by our server fleet-wide profiler and another on-device profiler agent that runs on weaker ARM devices. The latter ARM-based device profiler is especially sensitive to performance, and so we benchmarked and compared text-based /proc//maps solution to the equivalent one using PROCMAP_QUERY ioctl(). Results are very encouraging, giving us 5x improvement for end-to-end so-called "address normalization" pass, which is the part of the symbolization process that happens locally on ARM device, before being sent out for further heavier-weight processing on more powerful remote server. Note that this is not an artificial microbenchmark. It's a full end-to-end API call being measured with real-world data on real-world device. TEXT-BASED ========== Benchmarking main/normalize_process_no_build_ids_uncached_maps main/normalize_process_no_build_ids_uncached_maps time: [49.777 µs 49.982 µs 50.250 µs] IOCTL-BASED =========== Benchmarking main/normalize_process_no_build_ids_uncached_maps main/normalize_process_no_build_ids_uncached_maps time: [10.328 µs 10.391 µs 10.457 µs] change: [−79.453% −79.304% −79.166%] (p = 0.00 < 0.02) Performance has improved. You can see above that we see the drop from 50µs down to 10µs for exactly the same amount of work, with the same data and target process. With the aforementioned custom tool, we see about ~40x improvement (it might vary a bit, depending on a specific captured set of addresses). And even for perf-based benchmark it's on par or slightly ahead when using permission-based filtering (fetching only executable VMAs). Earlier revisions attempted to use per-VMA locking, if kernel was compiled with CONFIG_PER_VMA_LOCK=y, but it turned out that anon_vma_name() is not yet compatible with per-VMA locking and assumes mmap_lock to be taken, which makes the use of per-VMA locking for this API premature. It was agreed ([2]) to continue for now with just mmap_lock, but the code structure is such that it should be easy to add per-VMA locking support once all the pieces are ready. One thing that did not change was basing this new API as an ioctl() command on /proc//maps file. An ioctl-based API on top of pidfd was considered, but has its own downsides. Implementing ioctl() directly on pidfd will cause access permission checks on every single ioctl(), which leads to performance concerns and potential spam of capable() audit messages. It also prevents a nice pattern, possible with /proc//maps, in which application opens /proc/self/maps FD (requiring no additional capabilities) and passed this FD to profiling agent for querying. To achieve similar pattern, a new file would have to be created from pidf just for VMA querying, which is considered to be inferior to just querying /proc//maps FD as proposed in current approach. These aspects were discussed in the hallway track at recent LSF/MM/BPF 2024 and sticking to procfs ioctl() was the final agreement we arrived at. [0] https://github.com/anakryiko/linux/commits/procfs-proc-maps-ioctl-v2/ [1] https://github.com/libbpf/blazesym/pull/675 [2] https://lore.kernel.org/bpf/7rm3izyq2vjp5evdjc7c6z4crdd3oerpiknumdnmmemwyiwx7t@hleldw7iozi3/ This patch (of 6): Extract generic logic to fetch relevant pieces of data to describe VMA name. This could be just some string (either special constant or user-provided), or a string with some formatted wrapping text (e.g., "[anon_shmem:]"), or, commonly, file path. seq_file-based logic has different methods to handle all three cases, but they are currently mixed in with extracting underlying sources of data. This patch splits this into data fetching and data formatting, so that data fetching can be reused later on. There should be no functional changes. Link: https://lkml.kernel.org/r/20240627170900.1672542-1-andrii@kernel.org Link: https://lkml.kernel.org/r/20240627170900.1672542-2-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Liam R. Howlett Cc: Alexey Dobriyan Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Mike Rapoport (IBM) Cc: Suren Baghdasaryan Cc: Andi Kleen Cc: Arnd Bergmann Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit 8d42e2a91dcf86b34461cd7f709797805afa9f43 Author: Vivek Kasireddy Date: Sun Jun 23 23:36:17 2024 -0700 selftests/udmabuf: add tests to verify data after page migration Since the memfd pages associated with a udmabuf may be migrated as part of udmabuf create, we need to verify the data coherency after successful migration. The new tests added in this patch try to do just that using 4k sized pages and also 2 MB sized huge pages for the memfd. Successful completion of the tests would mean that there is no disconnect between the memfd pages and the ones associated with a udmabuf. And, these tests can also be augmented in the future to test newer udmabuf features (such as handling memfd hole punch). The idea for these tests comes from a patch by Mike Kravetz here: https://lists.freedesktop.org/archives/dri-devel/2023-June/410623.html v1->v2: (suggestions from Shuah) - Use ksft_* functions to print and capture results of tests - Use appropriate KSFT_* status codes for exit() - Add Mike Kravetz's suggested-by tag Link: https://lkml.kernel.org/r/20240624063952.1572359-10-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Suggested-by: Mike Kravetz Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: Shuah Khan Cc: David Hildenbrand Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Dongwon Kim Cc: Junxiao Chang Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Oscar Salvador Signed-off-by: Andrew Morton commit c6a3194c05e7e6fd0e8fbfb1720084ae2503c4ac Author: Vivek Kasireddy Date: Sun Jun 23 23:36:16 2024 -0700 udmabuf: pin the pages using memfd_pin_folios() API Using memfd_pin_folios() will ensure that the pages are pinned correctly using FOLL_PIN. And, this also ensures that we don't accidentally break features such as memory hotunplug as it would not allow pinning pages in the movable zone. Using this new API also simplifies the code as we no longer have to deal with extracting individual pages from their mappings or handle shmem and hugetlb cases separately. Link: https://lkml.kernel.org/r/20240624063952.1572359-9-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Dongwon Kim Cc: Junxiao Chang Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Oscar Salvador Cc: Shuah Khan Signed-off-by: Andrew Morton commit 5e72b2b41a21e596dcff489810ea760adeb2ef30 Author: Vivek Kasireddy Date: Sun Jun 23 23:36:15 2024 -0700 udmabuf: convert udmabuf driver to use folios This is mainly a preparatory patch to use memfd_pin_folios() API for pinning folios. Using folios instead of pages makes sense as the udmabuf driver needs to handle both shmem and hugetlb cases. And, using the memfd_pin_folios() API makes this easier as we no longer need to separately handle shmem vs hugetlb cases in the udmabuf driver. Note that, the function vmap_udmabuf() still needs a list of pages; so, we collect all the head pages into a local array in this case. Other changes in this patch include the addition of helpers for checking the memfd seals and exporting dmabuf. Moving code from udmabuf_create() into these helpers improves readability given that udmabuf_create() is a bit long. Link: https://lkml.kernel.org/r/20240624063952.1572359-8-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Dongwon Kim Cc: Junxiao Chang Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Oscar Salvador Cc: Shuah Khan Signed-off-by: Andrew Morton commit 0c8b91ef5100eaed3d64123ac91ac4739fccf15c Author: Vivek Kasireddy Date: Sun Jun 23 23:36:14 2024 -0700 udmabuf: add back support for mapping hugetlb pages A user or admin can configure a VMM (Qemu) Guest's memory to be backed by hugetlb pages for various reasons. However, a Guest OS would still allocate (and pin) buffers that are backed by regular 4k sized pages. In order to map these buffers and create dma-bufs for them on the Host, we first need to find the hugetlb pages where the buffer allocations are located and then determine the offsets of individual chunks (within those pages) and use this information to eventually populate a scatterlist. Testcase: default_hugepagesz=2M hugepagesz=2M hugepages=2500 options were passed to the Host kernel and Qemu was launched with these relevant options: qemu-system-x86_64 -m 4096m.... -device virtio-gpu-pci,max_outputs=1,blob=true,xres=1920,yres=1080 -display gtk,gl=on -object memory-backend-memfd,hugetlb=on,id=mem1,size=4096M -machine memory-backend=mem1 Replacing -display gtk,gl=on with -display gtk,gl=off above would exercise the mmap handler. Link: https://lkml.kernel.org/r/20240624063952.1572359-7-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Acked-by: Mike Kravetz (v2) Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: David Hildenbrand Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Dongwon Kim Cc: Junxiao Chang Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Oscar Salvador Cc: Shuah Khan Signed-off-by: Andrew Morton commit 7d79cd784470395539bda91bf0b3505ff5b2ab6d Author: Vivek Kasireddy Date: Sun Jun 23 23:36:13 2024 -0700 udmabuf: use vmf_insert_pfn and VM_PFNMAP for handling mmap Add VM_PFNMAP to vm_flags in the mmap handler to ensure that the mappings would be managed without using struct page. And, in the vm_fault handler, use vmf_insert_pfn to share the page's pfn to userspace instead of directly sharing the page (via struct page *). Link: https://lkml.kernel.org/r/20240624063952.1572359-6-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Dongwon Kim Cc: Junxiao Chang Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Oscar Salvador Cc: Shuah Khan Signed-off-by: Andrew Morton commit 725553d202dda60dc17a142c80fd96bdf6ca43db Author: Arnd Bergmann Date: Sun Jun 23 23:36:12 2024 -0700 udmabuf: add CONFIG_MMU dependency There is no !CONFIG_MMU version of vmf_insert_pfn(): arm-linux-gnueabi-ld: drivers/dma-buf/udmabuf.o: in function `udmabuf_vm_fault': udmabuf.c:(.text+0xaa): undefined reference to `vmf_insert_pfn' Link: https://lkml.kernel.org/r/20240624063952.1572359-5-vivek.kasireddy@intel.com Signed-off-by: Arnd Bergmann Acked-by: David Hildenbrand Acked-by: Vivek Kasireddy Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dave Airlie Cc: Dongwon Kim Cc: Gerd Hoffmann Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: Junxiao Chang Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Xu Cc: Shuah Khan Signed-off-by: Andrew Morton commit 89c1905d9c140372b7f50ef48f42378cf85d9bc5 Author: Vivek Kasireddy Date: Sun Jun 23 23:36:11 2024 -0700 mm/gup: introduce memfd_pin_folios() for pinning memfd folios For drivers that would like to longterm-pin the folios associated with a memfd, the memfd_pin_folios() API provides an option to not only pin the folios via FOLL_PIN but also to check and migrate them if they reside in movable zone or CMA block. This API currently works with memfds but it should work with any files that belong to either shmemfs or hugetlbfs. Files belonging to other filesystems are rejected for now. The folios need to be located first before pinning them via FOLL_PIN. If they are found in the page cache, they can be immediately pinned. Otherwise, they need to be allocated using the filesystem specific APIs and then pinned. [akpm@linux-foundation.org: improve the CONFIG_MMU=n situation, per SeongJae] [vivek.kasireddy@intel.com: return -EINVAL if the end offset is greater than the size of memfd] Link: https://lkml.kernel.org/r/IA0PR11MB71850525CBC7D541CAB45DF1F8DB2@IA0PR11MB7185.namprd11.prod.outlook.com Link: https://lkml.kernel.org/r/20240624063952.1572359-4-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Suggested-by: Jason Gunthorpe Reviewed-by: Jason Gunthorpe (v2) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: Matthew Wilcox (Oracle) Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Dongwon Kim Cc: Junxiao Chang Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Oscar Salvador Cc: Shuah Khan Signed-off-by: Andrew Morton commit 53ba78de064b6a45f5925947b3b45e9e833c2f8a Author: Vivek Kasireddy Date: Sun Jun 23 23:36:10 2024 -0700 mm/gup: introduce check_and_migrate_movable_folios() This helper is the folio equivalent of check_and_migrate_movable_pages(). Therefore, all the rules that apply to check_and_migrate_movable_pages() also apply to this one as well. Currently, this helper is only used by memfd_pin_folios(). This patch also includes changes to rename and convert the internal functions collect_longterm_unpinnable_pages() and migrate_longterm_unpinnable_pages() to work on folios. As a result, check_and_migrate_movable_pages() is now a wrapper around check_and_migrate_movable_folios(). Link: https://lkml.kernel.org/r/20240624063952.1572359-3-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dongwon Kim Cc: Hugh Dickins Cc: Junxiao Chang Cc: Mike Kravetz Cc: Oscar Salvador Cc: Shuah Khan Signed-off-by: Andrew Morton commit 6cc040542ba7b2c60e5119cd04d841fcf048c872 Author: Vivek Kasireddy Date: Sun Jun 23 23:36:09 2024 -0700 mm/gup: introduce unpin_folio/unpin_folios helpers Patch series "mm/gup: Introduce memfd_pin_folios() for pinning memfd folios", v16. Currently, some drivers (e.g, Udmabuf) that want to longterm-pin the pages/folios associated with a memfd, do so by simply taking a reference on them. This is not desirable because the pages/folios may reside in Movable zone or CMA block. Therefore, having drivers use memfd_pin_folios() API ensures that the folios are appropriately pinned via FOLL_PIN for longterm DMA. This patchset also introduces a few helpers and converts the Udmabuf driver to use folios and memfd_pin_folios() API to longterm-pin the folios for DMA. Two new Udmabuf selftests are also included to test the driver and the new API. This patch (of 9): These helpers are the folio versions of unpin_user_page/unpin_user_pages. They are currently only useful for unpinning folios pinned by memfd_pin_folios() or other associated routines. However, they could find new uses in the future, when more and more folio-only helpers are added to GUP. We should probably sanity check the folio as part of unpin similar to how it is done in unpin_user_page/unpin_user_pages but we cannot cleanly do that at the moment without also checking the subpage. Therefore, sanity checking needs to be added to these routines once we have a way to determine if any given folio is anon-exclusive (via a per folio AnonExclusive flag). Link: https://lkml.kernel.org/r/20240624063952.1572359-1-vivek.kasireddy@intel.com Link: https://lkml.kernel.org/r/20240624063952.1572359-2-vivek.kasireddy@intel.com Signed-off-by: Vivek Kasireddy Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dongwon Kim Cc: Hugh Dickins Cc: Junxiao Chang Cc: Oscar Salvador Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Shuah Khan Signed-off-by: Andrew Morton commit 8edc9c4e72fe0cc9f7a258649827dafa9542c8ac Author: Chengming Zhou Date: Mon Jun 17 20:57:41 2024 +0800 mm/zswap: use only one pool in zswap Zswap uses 32 pools to workaround the locking scalability problem in zswap backends (mainly zsmalloc nowadays), which brings its own problems like memory waste and more memory fragmentation. Testing results show that we can have near performance with only one pool in zswap after changing zsmalloc to use per-size_class lock instead of pool spinlock. Testing kernel build (make bzImage -j32) on tmpfs with memory.max=1GB, and zswap shrinker enabled with 10GB swapfile on ext4. real user sys 6.10.0-rc3 138.18 1241.38 1452.73 6.10.0-rc3-onepool 149.45 1240.45 1844.69 6.10.0-rc3-onepool-perclass 138.23 1242.37 1469.71 And do the same testing using zbud, which shows a little worse performance as expected since we don't do any locking optimization for zbud. I think it's acceptable since zsmalloc became a lot more popular than other backends, and we may want to support only zsmalloc in the future. real user sys 6.10.0-rc3-zbud 138.23 1239.58 1430.09 6.10.0-rc3-onepool-zbud 139.64 1241.37 1516.59 [chengming.zhou@linux.dev: fix error handling in zswap_pool_create(), per Dan Carpenter] Link: https://lkml.kernel.org/r/20240621-zsmalloc-lock-mm-everything-v2-2-d30e9cd2b793@linux.dev [chengming.zhou@linux.dev: fix error handling again in zswap_pool_create(), per Yosry] Link: https://lkml.kernel.org/r/20240625-zsmalloc-lock-mm-everything-v3-2-ad941699cb61@linux.dev Link: https://lkml.kernel.org/r/20240617-zsmalloc-lock-mm-everything-v1-2-5e5081ea11b3@linux.dev Signed-off-by: Chengming Zhou Reviewed-by: Nhat Pham Acked-by: Yosry Ahmed Cc: Chengming Zhou Cc: Johannes Weiner Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 64bd0197ae0c7d779e21410fe6d1782a3b59ee32 Author: Chengming Zhou Date: Mon Jun 17 20:57:40 2024 +0800 mm/zsmalloc: change back to per-size_class lock Patch series "mm/zsmalloc: change back to per-size_class lock, v2". Commit c0547d0b6a4b ("zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks") changed per-size_class lock to pool spinlock to prepare reclaim support in zsmalloc. Then reclaim support in zsmalloc had been dropped in favor of LRU reclaim in zswap, but this locking change had been left there. Obviously, the scalability of pool spinlock is worse than per-size_class. And we have a workaround that using 32 pools in zswap to avoid this scalability problem, which brings its own problems like memory waste and more memory fragmentation. So this series changes back to use per-size_class lock and using testing data in much stressed situation to verify that we can use only one pool in zswap. Note we only test and care about the zsmalloc backend, which makes sense now since zsmalloc became a lot more popular than other backends. Testing kernel build (make bzImage -j32) on tmpfs with memory.max=1GB, and zswap shrinker enabled with 10GB swapfile on ext4. real user sys 6.10.0-rc3 138.18 1241.38 1452.73 6.10.0-rc3-onepool 149.45 1240.45 1844.69 6.10.0-rc3-onepool-perclass 138.23 1242.37 1469.71 We can see from "sys" column that per-size_class locking with only one pool in zswap can have near performance with the current 32 pools. This patch (of 2): This patch is almost the revert of the commit c0547d0b6a4b ("zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks"), which changed to use a global pool->lock instead of per-size_class lock and pool->migrate_lock, was preparation for suppporting reclaim in zsmalloc. Then reclaim in zsmalloc had been dropped in favor of LRU reclaim in zswap. In theory, per-size_class is more fine-grained than the pool->lock, since a pool can have many size_classes. As for the additional pool->migrate_lock, only free() and map() need to grab it to access stable handle to get zspage, and only in read lock mode. Link: https://lkml.kernel.org/r/20240625-zsmalloc-lock-mm-everything-v3-0-ad941699cb61@linux.dev Link: https://lkml.kernel.org/r/20240621-zsmalloc-lock-mm-everything-v2-0-d30e9cd2b793@linux.dev Link: https://lkml.kernel.org/r/20240617-zsmalloc-lock-mm-everything-v1-0-5e5081ea11b3@linux.dev Link: https://lkml.kernel.org/r/20240617-zsmalloc-lock-mm-everything-v1-1-5e5081ea11b3@linux.dev Signed-off-by: Chengming Zhou Reviewed-by: Sergey Senozhatsky Cc: Chengming Zhou Cc: Johannes Weiner Cc: Minchan Kim Cc: Nhat Pham Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 998d4e2c33be49297c780e0e59a333918b7c97e4 Author: Andrew Morton Date: Thu Jul 11 23:36:42 2024 -0700 mm/hugetlb.c: undo errant change During conflict resolution a line was unintentionally removed by a ksm.c patch. Link: https://lkml.kernel.org/r/85b0d694-d1ac-8e7a-2e50-1edc03eee21a@google.com Fixes: ac90c56bbd73 ("mm/ksm: refactor out try_to_merge_with_zero_page()") Reported-by: Hugh Dickins Cc: Aristeu Rozanski Cc: Chengming Zhou Signed-off-by: Andrew Morton commit 47c8846a49baa8c0b7a6a3e7e7eacd6e8d119d25 Author: Vidya Sagar Date: Tue Jun 25 21:01:50 2024 +0530 PCI: Extend ACS configurability PCIe ACS settings control the level of isolation and the possible P2P paths between devices. With greater isolation the kernel will create smaller iommu_groups and with less isolation there is more HW that can achieve P2P transfers. From a virtualization perspective all devices in the same iommu_group must be assigned to the same VM as they lack security isolation. There is no way for the kernel to automatically know the correct ACS settings for any given system and workload. Existing command line options (e.g., disable_acs_redir) allow only for large scale change, disabling all isolation, but this is not sufficient for more complex cases. Add a kernel command-line option 'config_acs' to directly control all the ACS bits for specific devices, which allows the operator to setup the right level of isolation to achieve the desired P2P configuration. The definition is future proof; when new ACS bits are added to the spec the open syntax can be extended. ACS needs to be setup early in the kernel boot as the ACS settings affect how iommu_groups are formed. iommu_group formation is a one time event during initial device discovery, so changing ACS bits after kernel boot can result in an inaccurate view of the iommu_groups compared to the current isolation configuration. ACS applies to PCIe Downstream Ports and multi-function devices. The default ACS settings are strict and deny any direct traffic between two functions. This results in the smallest iommu_group the HW can support. Frequently these values result in slow or non-working P2PDMA. ACS offers a range of security choices controlling how traffic is allowed to go directly between two devices. Some popular choices: - Full prevention - Translated requests can be direct, with various options - Asymmetric direct traffic, A can reach B but not the reverse - All traffic can be direct Along with some other less common ones for special topologies. The intention is that this option would be used with expert knowledge of the HW capability and workload to achieve the desired configuration. Link: https://lore.kernel.org/r/20240625153150.159310-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar [bhelgaas: add example, tidy printk formats] Signed-off-by: Bjorn Helgaas commit a4e772898f8bf2e7e1cf661a12c60a5612c4afab Author: Dan Williams Date: Thu May 30 18:04:35 2024 -0700 PCI: Add missing bridge lock to pci_bus_lock() One of the true positives that the cfg_access_lock lockdep effort identified is this sequence: WARNING: CPU: 14 PID: 1 at drivers/pci/pci.c:4886 pci_bridge_secondary_bus_reset+0x5d/0x70 RIP: 0010:pci_bridge_secondary_bus_reset+0x5d/0x70 Call Trace: ? __warn+0x8c/0x190 ? pci_bridge_secondary_bus_reset+0x5d/0x70 ? report_bug+0x1f8/0x200 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? pci_bridge_secondary_bus_reset+0x5d/0x70 pci_reset_bus+0x1d8/0x270 vmd_probe+0x778/0xa10 pci_device_probe+0x95/0x120 Where pci_reset_bus() users are triggering unlocked secondary bus resets. Ironically pci_bus_reset(), several calls down from pci_reset_bus(), uses pci_bus_lock() before issuing the reset which locks everything *but* the bridge itself. For the same motivation as adding: bridge = pci_upstream_bridge(dev); if (bridge) pci_dev_lock(bridge); to pci_reset_function() for the "bus" and "cxl_bus" reset cases, add pci_dev_lock() for @bus->self to pci_bus_lock(). Link: https://lore.kernel.org/r/171711747501.1628941.15217746952476635316.stgit@dwillia2-xfh.jf.intel.com Reported-by: Imre Deak Closes: http://lore.kernel.org/r/6657833b3b5ae_14984b29437@dwillia2-xfh.jf.intel.com.notmuch Signed-off-by: Dan Williams Signed-off-by: Keith Busch [bhelgaas: squash in recursive locking deadlock fix from Keith Busch: https://lore.kernel.org/r/20240711193650.701834-1-kbusch@meta.com] Signed-off-by: Bjorn Helgaas Tested-by: Hans de Goede Tested-by: Kalle Valo Reviewed-by: Dave Jiang commit 6739fad42af2e5eb87417283278a13a57f69c0de Author: Frank Li Date: Fri Jul 12 14:57:40 2024 -0400 dt-bindings: ata: ahci-fsl-qoriq: add fsl,ls1046a-ahci and fsl,ls1012a-ahci Add missing documented compatible strings 'fsl,ls1046a-ahci' and 'fsl,ls1012a-ahci'. Allow 'fsl,ls1012a-ahci' to fallback to 'fsl,ls1043a-ahci'. Fix below CHECK_DTB warnings arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dtb: sata@3200000: compatible:0: 'fsl,ls1012a-ahci' is not one of ['fsl,ls1021a-ahci', 'fsl,ls1043a-ahci', 'fsl,ls1028a-ahci', 'fsl,ls1088a-ahci', 'fsl,ls2080a-ahci', 'fsl,lx2160a-ahci'] arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dtb: sata@3200000: compatible: ['fsl,ls1012a-ahci', 'fsl,ls1043a-ahci'] is too long Fixes: e58e12c5c34c ("dt-bindings: ata: ahci-fsl-qoriq: convert to yaml format") Reviewed-by: Rob Herring Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240712185740.3819170-1-Frank.Li@nxp.com [cassel: rewrap commit log lines, capitalize SATA] Signed-off-by: Niklas Cassel commit bd5b61d8b16494c408eeb637ccacd3bf9f39114f Author: Eric Biggers Date: Thu Jul 11 13:04:21 2024 -0700 docs: driver-model: platform: update the definition of platform_driver Update the documented struct platform_driver to match the code. Signed-off-by: Eric Biggers Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240711200421.11428-1-ebiggers@kernel.org commit e435b043d89a267bd6eb3d5650d2319805d7924a Author: Tengda Wu Date: Thu Jul 11 22:58:19 2024 +0800 selftests/bpf: Test for null-pointer-deref bugfix in resolve_prog_type() This test verifies that resolve_prog_type() works as expected when `attach_prog_fd` is not passed in. `prog->aux->dst_prog` in resolve_prog_type() is assigned by `attach_prog_fd`, and would be NULL if `attach_prog_fd` is not provided. Loading EXT prog with bpf_dynptr_from_skb() kfunc call in this way will lead to null-pointer-deref. Verify that the null-pointer-deref bug in resolve_prog_type() is fixed. Signed-off-by: Tengda Wu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240711145819.254178-3-wutengda@huaweicloud.com commit f7866c35873377313ff94398f17d425b28b71de1 Author: Tengda Wu Date: Thu Jul 11 22:58:18 2024 +0800 bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT When loading a EXT program without specifying `attr->attach_prog_fd`, the `prog->aux->dst_prog` will be null. At this time, calling resolve_prog_type() anywhere will result in a null pointer dereference. Example stack trace: [ 8.107863] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 [ 8.108262] Mem abort info: [ 8.108384] ESR = 0x0000000096000004 [ 8.108547] EC = 0x25: DABT (current EL), IL = 32 bits [ 8.108722] SET = 0, FnV = 0 [ 8.108827] EA = 0, S1PTW = 0 [ 8.108939] FSC = 0x04: level 0 translation fault [ 8.109102] Data abort info: [ 8.109203] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 8.109399] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 8.109614] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 8.109836] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000101354000 [ 8.110011] [0000000000000004] pgd=0000000000000000, p4d=0000000000000000 [ 8.112624] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 8.112783] Modules linked in: [ 8.113120] CPU: 0 PID: 99 Comm: may_access_dire Not tainted 6.10.0-rc3-next-20240613-dirty #1 [ 8.113230] Hardware name: linux,dummy-virt (DT) [ 8.113390] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 8.113429] pc : may_access_direct_pkt_data+0x24/0xa0 [ 8.113746] lr : add_subprog_and_kfunc+0x634/0x8e8 [ 8.113798] sp : ffff80008283b9f0 [ 8.113813] x29: ffff80008283b9f0 x28: ffff800082795048 x27: 0000000000000001 [ 8.113881] x26: ffff0000c0bb2600 x25: 0000000000000000 x24: 0000000000000000 [ 8.113897] x23: ffff0000c1134000 x22: 000000000001864f x21: ffff0000c1138000 [ 8.113912] x20: 0000000000000001 x19: ffff0000c12b8000 x18: ffffffffffffffff [ 8.113929] x17: 0000000000000000 x16: 0000000000000000 x15: 0720072007200720 [ 8.113944] x14: 0720072007200720 x13: 0720072007200720 x12: 0720072007200720 [ 8.113958] x11: 0720072007200720 x10: 0000000000f9fca4 x9 : ffff80008021f4e4 [ 8.113991] x8 : 0101010101010101 x7 : 746f72705f6d656d x6 : 000000001e0e0f5f [ 8.114006] x5 : 000000000001864f x4 : ffff0000c12b8000 x3 : 000000000000001c [ 8.114020] x2 : 0000000000000002 x1 : 0000000000000000 x0 : 0000000000000000 [ 8.114126] Call trace: [ 8.114159] may_access_direct_pkt_data+0x24/0xa0 [ 8.114202] bpf_check+0x3bc/0x28c0 [ 8.114214] bpf_prog_load+0x658/0xa58 [ 8.114227] __sys_bpf+0xc50/0x2250 [ 8.114240] __arm64_sys_bpf+0x28/0x40 [ 8.114254] invoke_syscall.constprop.0+0x54/0xf0 [ 8.114273] do_el0_svc+0x4c/0xd8 [ 8.114289] el0_svc+0x3c/0x140 [ 8.114305] el0t_64_sync_handler+0x134/0x150 [ 8.114331] el0t_64_sync+0x168/0x170 [ 8.114477] Code: 7100707f 54000081 f9401c00 f9403800 (b9400403) [ 8.118672] ---[ end trace 0000000000000000 ]--- One way to fix it is by forcing `attach_prog_fd` non-empty when bpf_prog_load(). But this will lead to `libbpf_probe_bpf_prog_type` API broken which use verifier log to probe prog type and will log nothing if we reject invalid EXT prog before bpf_check(). Another way is by adding null check in resolve_prog_type(). The issue was introduced by commit 4a9c7bbe2ed4 ("bpf: Resolve to prog->aux->dst_prog->type only for BPF_PROG_TYPE_EXT") which wanted to correct type resolution for BPF_PROG_TYPE_TRACING programs. Before that, the type resolution of BPF_PROG_TYPE_EXT prog actually follows the logic below: prog->aux->dst_prog ? prog->aux->dst_prog->type : prog->type; It implies that when EXT program is not yet attached to `dst_prog`, the prog type should be EXT itself. This code worked fine in the past. So just keep using it. Fix this by returning `prog->type` for BPF_PROG_TYPE_EXT if `dst_prog` is not present in resolve_prog_type(). Fixes: 4a9c7bbe2ed4 ("bpf: Resolve to prog->aux->dst_prog->type only for BPF_PROG_TYPE_EXT") Signed-off-by: Tengda Wu Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Cc: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20240711145819.254178-2-wutengda@huaweicloud.com commit 054fd15984454f031611d6c63675fc578aad0cb1 Author: Chen Ni Date: Thu Jun 20 16:19:26 2024 +0800 ubifs: add check for crypto_shash_tfm_digest Add check for the return value of crypto_shash_tfm_digest() and return the error if it fails in order to catch the error. Fixes: 817aa094842d ("ubifs: support offline signed images") Signed-off-by: Chen Ni Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 25e79a7f2c9e54872fb2c8932bb582a500284505 Author: Zhihao Cheng Date: Tue Jun 4 19:32:07 2024 +0800 ubifs: Fix inconsistent inode size when powercut happens during appendant writing UBIFS always make sure that the data length won't beyond the inode size by writing inode before writing page(See ubifs_writepage.). After commit c35acef383f4a2f2cfc30("ubifs: Convert ubifs_writepage to use a folio"), the rule is broken in one case: Given a file with size 3, then write 4096 from the offset 0, following process will make inode size be smaller than file data length after powercut & recovery: P1 P2 ubifs_writepage len = folio_size(folio) // 4096 if (folio_pos(folio) + len <= i_size) // condition 1: 0 + 4096 <= 4096 //(i_size is updated as 4096 in ubifs_write_end) if (folio_pos(folio) >= synced_i_size) // condition 2: 0 >= 3, false write_inode // Skipped, because condition 2 is false do_writepage(folio, len) // write one page do_commit // data node won't be replayed in next mounting >> Powercut << So, inode size(4096) is not updated into disk, we will get following error messages in next mounting(chk_fs = 1): check_leaf [ubifs]: data node at LEB 14:2048 is not within inode size 3 dbg_walk_index [ubifs]: leaf checking function returned error -22, for leaf at LEB 14:2048 Fix it by modifying condition 2 as original comparison(Compare the page index of synced_i_size with current page index). Fixes: c35acef383f4 ("ubifs: Convert ubifs_writepage to use a folio") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218934 Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 4f9d406c8c90dc17470cf63342c16f66ec2d978e Author: Li Nan Date: Thu May 23 01:10:35 2024 +0800 ubi: block: fix null-pointer-dereference in ubiblock_create() Similar to commit adbf4c4954e3 ("ubi: block: fix memleak in ubiblock_create()"), 'dev->gd' is not assigned but dereferenced if blk_mq_alloc_tag_set() fails, and leading to a null-pointer-dereference. Fix it by using pr_err() and variable 'dev' to print error log. Additionally, the log in the error handle path of idr_alloc() has been improved by using pr_err(), too. Before initializing device name, using dev_err() will print error log with 'null' instead of the actual device name, like this: block (null): ... ~~~~~~ It is unclear. Using pr_err() can print more details of the device. The improved log is: ubiblock0_0: ... Fixes: 77567b25ab9f ("ubi: use blk_mq_alloc_disk and blk_cleanup_disk") Reported-by: Dan Carpenter Signed-off-by: Li Nan Reviewed-by: Zhihao Cheng Reviewed-by: Daniel Golle Signed-off-by: Richard Weinberger commit 39986148bc2ab4436ec169c8f4db76f6cc83705d Author: Jeff Johnson Date: Thu May 2 13:16:55 2024 -0700 ubifs: fix kernel-doc warnings make C=1 reports the following kernel-doc warnings: fs/ubifs/compress.c:103: warning: Function parameter or struct member 'c' not described in 'ubifs_compress' fs/ubifs/compress.c:155: warning: Function parameter or struct member 'c' not described in 'ubifs_decompress' fs/ubifs/find.c:353: warning: Excess function parameter 'data' description in 'scan_for_free_cb' fs/ubifs/find.c:353: warning: Function parameter or struct member 'arg' not described in 'scan_for_free_cb' fs/ubifs/find.c:594: warning: Excess function parameter 'data' description in 'scan_for_idx_cb' fs/ubifs/find.c:594: warning: Function parameter or struct member 'arg' not described in 'scan_for_idx_cb' fs/ubifs/find.c:786: warning: Excess function parameter 'data' description in 'scan_dirty_idx_cb' fs/ubifs/find.c:786: warning: Function parameter or struct member 'arg' not described in 'scan_dirty_idx_cb' fs/ubifs/find.c:86: warning: Excess function parameter 'data' description in 'scan_for_dirty_cb' fs/ubifs/find.c:86: warning: Function parameter or struct member 'arg' not described in 'scan_for_dirty_cb' fs/ubifs/journal.c:369: warning: expecting prototype for wake_up_reservation(). Prototype was for add_or_start_queue() instead fs/ubifs/lprops.c:1018: warning: Excess function parameter 'lst' description in 'scan_check_cb' fs/ubifs/lprops.c:1018: warning: Function parameter or struct member 'arg' not described in 'scan_check_cb' fs/ubifs/lpt.c:1938: warning: Function parameter or struct member 'ptr' not described in 'lpt_scan_node' fs/ubifs/replay.c:60: warning: Function parameter or struct member 'hash' not described in 'replay_entry' Fix them. Signed-off-by: Jeff Johnson Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 7037c96d8c42965eb93e6b96cf921399c283d431 Author: ZhaoLong Wang Date: Thu Apr 18 15:07:04 2024 +0800 ubifs: correct UBIFS_DFS_DIR_LEN macro definition and improve code clarity The UBIFS_DFS_DIR_LEN macro, which defines the maximum length of the UBIFS debugfs directory name, has an incorrect formula and misleading comments. The current formula is (3 + 1 + 2*2 + 1), which assumes that both UBI device number and volume ID are limited to 2 characters. However, UBI device number ranges from 0 to 31 (2 characters), and volume ID ranges from 0 to 127 (up to 3 characters). Although the current code works due to the cancellation of mathematical errors (9 + 1 = 10, which matches the correct UBIFS_DFS_DIR_LEN value), it can lead to confusion and potential issues in the future. This patch aims to improve the code clarity and maintainability by making the following changes: 1. Corrects the UBIFS_DFS_DIR_LEN macro definition to (3 + 1 + 2 + 3 + 1), accommodating the maximum lengths of both UBI device number and volume ID, plus the separators and null terminator. 2. Updates the snprintf calls to use UBIFS_DFS_DIR_LEN instead of UBIFS_DFS_DIR_LEN + 1, removing the unnecessary +1. 3. Modifies the error checks to compare against UBIFS_DFS_DIR_LEN using >= instead of >, aligning with the corrected macro definition. 4. Removes the redundant +1 in the dfs_dir_name array definitions in ubi.h and debug.h. While these changes do not affect the runtime behavior, they make the code more readable, maintainable, and less prone to future errors. v2->v3: - Removes the duplicated UBIFS_DFS_DIR_LEN and UBIFS_DFS_DIR_NAME macro definitions in ubifs.h, as they are already defined in debug.h. Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 72f3d3daddd740f744a24cd7ef8c27bd0cd5489d Author: Ben Hutchings Date: Thu Apr 11 00:42:41 2024 +0200 mtd: ubi: Restore missing cleanup on ubi_init() failure path We need to clean-up debugfs and ubiblock if we fail after initialising them. Signed-off-by: Ben Hutchings Fixes: 927c145208b0 ("mtd: ubi: attach from device tree") Signed-off-by: Richard Weinberger commit 06776df740660e27c351d89f314d05b2720ba41f Author: Zhihao Cheng Date: Wed Apr 10 15:37:51 2024 +0800 ubifs: dbg_orphan_check: Fix missed key type checking When selinux/encryption is enabled, xattr entry node is added into TNC before host inode when creating new file. So it is possible to find xattr entry without host inode from TNC. Orphan debug checking is called by ubifs_orphan_end_commit(), at that time, the commit semaphore is already unlock, so the new creation won't be blocked. Fixes: d7f0b70d30ff ("UBIFS: Add security.* XATTR support for the UBIFS") Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 3af2d3a8c56fe7dc24f60c4df0ab85b7ac941902 Author: Zhihao Cheng Date: Wed Apr 10 15:37:50 2024 +0800 ubifs: Fix unattached inode when powercut happens in creating For selinux or encryption scenarios, UBIFS could become inconsistent while creating new files in powercut case. Encryption/selinux related xattrs will be created before creating file dentry, which makes creation process is not atomic, details are shown as: Encryption case: ubifs_create ubifs_new_inode fscrypt_set_context ubifs_xattr_set create_xattr ubifs_jnl_update // Disk: xentry xinode inode(LAST_OF_NODE_GROUP) >> power cut << ubifs_jnl_update // Disk: dentry inode parent_inode(LAST_OF_NODE_GROUP) Selinux case: ubifs_create ubifs_new_inode ubifs_init_security security_inode_init_security ubifs_xattr_set create_xattr ubifs_jnl_update // Disk: xentry xinode inode(LAST_OF_NODE_GROUP) >> power cut << ubifs_jnl_update // Disk: dentry inode parent_inode(LAST_OF_NODE_GROUP) Above process will make chk_fs failed in next mounting: UBIFS error (ubi0:0 pid 7995): dbg_check_filesystem [ubifs]: inode 66 nlink is 1, but calculated nlink is 0 Fix it by allocating orphan inode for each non-xattr file creation, then removing orphan list in journal writing process, which ensures that both xattr and dentry be effective in atomic when powercut happens. Fixes: d7f0b70d30ff ("UBIFS: Add security.* XATTR support for the UBIFS") Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218309 Suggested-by: Zhang Yi Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit b25e6a5f78e84598ec62552ef342a58a23b6f7c4 Author: Zhihao Cheng Date: Wed Apr 10 15:37:49 2024 +0800 ubifs: Fix space leak when powercut happens in linking tmpfile There is a potential space leak problem when powercut happens in linking tmpfile, in which case, inode node (with nlink=0) and its' data nodes can be found from tnc (on flash), but there are no dentries related to the inode, so the file is invisible but takes free space. Detailed process is shown as: ubifs_tmpfile ubifs_jnl_update // Add bud A into log area ubifs_add_orphan // Add inode into orphan list P1 P2 ubifs_link ubifs_delete_orphan // Delete inode from orphan list, then inode won't // be written into orphan area, there is no chance // to delete inode by replaying orphan. commit // bud A won't be replayed in next mounting >> powercut << ubifs_jnl_update // Link inode to dentry The root cause is that orphan entry deletion and journal writing(for link) are interrupted by commit, which makes the two operations are not atomic. Fix it by doing ubifs_delete_orphan under the protection of c->commit_sem within ubifs_jnl_update. This is also a preparation to support all creating new files by orphan inode. v1 is https://lore.kernel.org/linux-mtd/20200701093227.674945-1-chengzhihao1@huawei.com/ Fixes: 32fe905c17f0 ("ubifs: Fix O_TMPFILE corner case in ubifs_link()") Link: https://bugzilla.kernel.org/show_bug.cgi?id=208405 Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 9f5ecacfcee2bda21b100399a9130248d55c2a0c Author: Zhihao Cheng Date: Wed Apr 10 15:37:48 2024 +0800 ubifs: Move ui->data initialization after initializing security Host inode and its' xattr will be written on disk after initializing security when creating symlink or dev, then the host inode and its dentry will be written again in ubifs_jnl_update. There is no need to write inode data in the security initialization pass, just move the ui->data initialization after initializing security. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 7efc34b53b3950ad4fc98b5d25210bae80ab0fde Author: Zhihao Cheng Date: Wed Apr 10 15:37:47 2024 +0800 ubifs: Fix adding orphan entry twice for the same inode The tmpfile could be added into orphan list twice, first time is creation, the second time is removing after it is linked. The orphan entry could be added twice for tmpfile if following sequence is satisfied: ubifs_tmpfile ubifs_jnl_update ubifs_add_orphan // first time to add orphan entry P1 P2 ubifs_link do_commit ubifs_orphan_start_commit orphan->cmt = 1 ubifs_delete_orphan orphan_delete if (orph->cmt) orph->del = 1; // orphan entry is not deleted from tree return ubifs_unlink ubifs_jnl_update ubifs_add_orphan orphan_add // found old orphan entry, second time to add orphan entry ubifs_err(c, "orphaned twice") return -EINVAL // unlink failed! ubifs_orphan_end_commit erase_deleted // delete old orphan entry rb_erase(&orphan->rb, &c->orph_tree) Fix it by removing orphan entry from orphan tree in advance, rather than remove it from orphan tree in committing process. Fixes: 32fe905c17f0 ("ubifs: Fix O_TMPFILE corner case in ubifs_link()") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218672 Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 6376d7503b02796cc6109198d555ddebfb4f5f81 Author: Zhihao Cheng Date: Wed Apr 10 15:37:46 2024 +0800 ubifs: Remove insert_dead_orphan from replaying orphan process UBIFS will do commit at the end of mounting process(rw mode), dead orphans(added by insert_dead_orphan in replaying orphan) are deleted by ubifs_orphan_end_commit(). The only reason why dead orphans are added into orphan list is that old orpans may be lost when powercut happens in ubifs_orphan_end_commit(): ubifs_orphan_end_commit // TNC(updated by orphans) is not written yet if (c->cmt_orphans != 0) commit_orphans consolidate // traverse orphan list write_orph_nodes // rewrite all orphans by ubifs_leb_change // If dead orphans are not in list, they will be lost when powercut // happens, then TNC won't be updated by old orphans in next mounting. Luckily, the condition 'c->cmt_orphans != 0' will never be true in mounting process, there can't be new orphans added into orphan list before mounting returned, but commit will be done at the end of mounting. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 7bed61a1cf166b5c113047fc8f60ff22dcb04893 Author: Zhihao Cheng Date: Wed Apr 10 15:37:45 2024 +0800 Revert "ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path" This reverts commit 6379b44cdcd67f5f5d986b73953e99700591edfa. Commit 1e022216dcd2 ("ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path") is applied again in commit 6379b44cdcd6 ("ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path"), which changed ubifs_mknod (It won't become a real problem). Just revert it. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 354c1796639a743b49bd13549ec0ec6ca121b85e Author: Zhihao Cheng Date: Wed Apr 10 15:37:44 2024 +0800 ubifs: Don't add xattr inode into orphan area Now, the entire inode with its' xattrs are removed while replaying orphan nodes. There is no need to add xattr inodes into orphan area, which is based on the fact that xattr entries won't be cleared from disk before deleting xattr inodes, in another words, current logic can make sure that xattr inode be deleted in any cases even UBIFS not record xattr inode into orphan area. Let's looking for possible paths that could clear xattr entries from disk but leave the xattr inode on TNC: 1. unlink/tmpfile -> ubifs_jnl_update: inode(nlink=0) is written into bud LEB and added into orphan list, then: a. powercut: ubifs_tnc_remove_ino(xattr entry/inode can be found from TNC and being deleted) is invoked in replaying journal. b. commit + powercut: inode is written into orphan area, and ubifs_tnc_remove_ino is invoked in replaying orphan nodes. c. evicting + powercut: xattr inode(nlink=0) is written on disk, xattr is removed from TNC, gc could clear xattr entries from disk. ubifs_tnc_remove_ino will apply on inode and xattr inode in replaying journal, so lost xattr entries will make no influence. d. evicting + commit + powercut: xattr inode/entry are removed from index tree(on disk) by ubifs_jnl_write_inode, xattr inode is cleared from orphan area by ubifs_jnl_write_inode + commit. e. commit + evicting + powercut: inode is written into orphan area, then equivalent to c. 2. remove xattr -> ubifs_jnl_delete_xattr: xattr entry(inum=0) and xattr inode(nlink=0) is written into bud LEB, xattr entry/inode are removed from TNC, then: a. powercut: gc could clear xattr entries from disk, which won't affect deleting xattr entry from TNC. ubifs_tnc_remove_ino will apply on xattr inode in replaying journal, ubifs_tnc_remove_nm will apply on xattr entry in replaying journal. b. commit + powercut: xattr entry/inode are removed from index tree (on disk). Tracking xattr inode in orphan list is imported by commit 988bec41318f3f ("ubifs: orphan: Handle xattrs like files"), it aims to fix the similar problem described in commit 7959cf3a7506d4a ("ubifs: journal: Handle xattrs like files"). Actually, the problem only exist in journal case but not the orphan case. So, we can remove the orphan tracking for xattr inodes. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 02eb1846b77d2896903e94b966ba632cf48d39e0 Author: Zhihao Cheng Date: Wed Apr 10 15:37:43 2024 +0800 ubifs: Fix unattached xattr inode if powercut happens after deleting When powercut happens after deleting file, the xattr inode could be alone existing in TNC but its' xattr entry cannot be found in TNC. File inode and xattr inode are added into orphan list after deleting file, file inode's nlink is 0 but xattr inode's nlink is not 0 (PS: zero nlink xattr inode is written on disk in evicting process by ubifs_jnl_write_inode). So, following process could happen: 1. touch file 2. setxattr(file) 3. unlink file // inode(nlink=0), xattr inode(nlink=1) are added into orphan list 4. commit // write inode inum and xattr inum into orphan area 5. powercut 6. mount do_kill_orphans // inode(nlink=0) is deleted from TNC by ubifs_tnc_remove_range, // xattr entry is deleted too. // xattr inode(nlink=1) is not deleted from TNC Finally we could see following error while debugging UBIFS: UBIFS error (ubi0:0 pid 1093): dbg_check_filesystem [ubifs]: inode 66 nlink is 1, but calculated nlink is 0 UBIFS (ubi0:0): dump of the inode 66 sitting in LEB 12:2128 node_type 0 (inode node) group_type 1 (in node group) len 197 key (66, inode) size 37 nlink 1 flags 0x20 xattr_cnt 0 xattr_size 0 xattr_names 0 data len 37 Fix it by removing entire inode with it's xattrs while replaying orphan, just replace function ubifs_tnc_remove_range by ubifs_tnc_remove_ino. Fixes: ee1438ce5dc4 ("ubifs: Check link count of inodes when killing orphans.") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218661 Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit ea9e315cccd5cfabdfd48bdd34ec774495f14201 Author: Krzysztof Kozlowski Date: Fri Jul 12 14:11:46 2024 +0200 dt-bindings: incomplete-devices: document devices without bindings There are devices in the wild with non-updatable firmware coming with ACPI tables with rejected compatibles, e.g. "ltr,ltrf216a". Linux kernel still supports this device via ACPI PRP0001, however the compatible was never accepted to bindings. There are also several early PowerPC or SPARC platforms using compatibles for their OpenFirmware, but without in-tree DTS. Often the legacy compatible is not correct in terms of current Devicetree specification, e.g. missing vendor prefix. Finally there are also Linux-specific tools and test code with compatibles. Add a schema covering above cases purely to satisfy the DT schema and scripts/checkpatch.pl checks for undocumented compatibles. For ltr,ltrf216a this also documents the consensus: compatible is allowed only via ACPI PRP0001, but not bindings. Link: https://lore.kernel.org/all/20240705095047.90558-1-marex@denx.de/ Link: https://lore.kernel.org/lkml/20220731173446.7400bfa8@jic23-huawei/T/#me55be502302d70424a85368c2645c89f860b7b40 Cc: Marek Vasut Cc: Jonathan Cameron Cc: Sebastian Reichel Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240712121146.90942-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 02096a0cf150fc8dc1cfe39afcd768d06b70e722 Author: Arnd Bergmann Date: Wed Mar 13 09:46:52 2024 +0100 mtd: ubi: avoid expensive do_div() on 32-bit machines The use of do_div() in ubi_nvmem_reg_read() makes calling it on 32-bit machines rather expensive. Since the 'from' variable is known to be a 32-bit quantity, it is clearly never needed and can be optimized into a regular division operation. Fixes: b8a77b9a5f9c ("mtd: ubi: fix NVMEM over UBI volumes on 32-bit systems") Fixes: 3ce485803da1 ("mtd: ubi: provide NVMEM layer over UBI volumes") Signed-off-by: Arnd Bergmann Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 299af26eb46374295a3289be990e536b75c9376a Author: Ricardo B. Marliere Date: Tue Mar 5 16:35:38 2024 -0300 mtd: ubi: make ubi_class constant Since commit 43a7206b0963 ("driver core: class: make class_register() take a const *"), the driver core allows for struct class to be in read-only memory, so move the ubi_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Zhihao Cheng Reviewed-by: Miquel Raynal Signed-off-by: Richard Weinberger commit 745d9f4a31defec731119ee8aad8ba9f2536dd9a Author: Fedor Pchelkin Date: Thu Feb 29 23:42:36 2024 +0300 ubi: eba: properly rollback inside self_check_eba In case of a memory allocation failure in the volumes loop we can only process the already allocated scan_eba and fm_eba array elements on the error path - others are still uninitialized. Found by Linux Verification Center (linuxtesting.org). Fixes: 00abf3041590 ("UBI: Add self_check_eba()") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 769d20028f45a4f442cfe558a32faba357a7f5e2 Author: Jeff Layton Date: Fri Jul 12 07:26:44 2024 -0400 nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument "data" actually refers to a file_lease and not a file_lock. Both structs have their file_lock_core as the first field though, so this bug should be harmless without struct randomization in play. Reported-by: Florian Evers Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219008 Fixes: 05580bbfc6bc ("nfsd: adapt to breakup of struct file_lock") Signed-off-by: Jeff Layton Tested-by: Florian Evers Signed-off-by: Chuck Lever commit 7a2fb5619cc1fb53cb8784154d5ef2bd99997436 Author: Howard Chu Date: Fri Jul 5 21:20:51 2024 +0800 perf trace: Fix iteration of syscall ids in syscalltbl->entries This is a bug found when implementing pretty-printing for the landlock_add_rule system call, I decided to send this patch separately because this is a serious bug that should be fixed fast. I wrote a test program to do landlock_add_rule syscall in a loop, yet perf trace -e landlock_add_rule freezes, giving no output. This bug is introduced by the false understanding of the variable "key" below: ``` for (key = 0; key < trace->sctbl->syscalls.nr_entries; ++key) { struct syscall *sc = trace__syscall_info(trace, NULL, key); ... } ``` The code above seems right at the beginning, but when looking at syscalltbl.c, I found these lines: ``` for (i = 0; i <= syscalltbl_native_max_id; ++i) if (syscalltbl_native[i]) ++nr_entries; entries = tbl->syscalls.entries = malloc(sizeof(struct syscall) * nr_entries); ... for (i = 0, j = 0; i <= syscalltbl_native_max_id; ++i) { if (syscalltbl_native[i]) { entries[j].name = syscalltbl_native[i]; entries[j].id = i; ++j; } } ``` meaning the key is merely an index to traverse the syscall table, instead of the actual syscall id for this particular syscall. So if one uses key to do trace__syscall_info(trace, NULL, key), because key only goes up to trace->sctbl->syscalls.nr_entries, for example, on my X86_64 machine, this number is 373, it will end up neglecting all the rest of the syscall, in my case, everything after `rseq`, because the traversal will stop at 373, and `rseq` is the last syscall whose id is lower than 373 in tools/perf/arch/x86/include/generated/asm/syscalls_64.c: ``` ... [334] = "rseq", [424] = "pidfd_send_signal", ... ``` The reason why the key is scrambled but perf trace works well is that key is used in trace__syscall_info(trace, NULL, key) to do trace->syscalls.table[id], this makes sure that the struct syscall returned actually has an id the same value as key, making the later bpf_prog matching all correct. After fixing this bug, I can do perf trace on 38 more syscalls, and because more syscalls are visible, we get 8 more syscalls that can be augmented. before: perf $ perf trace -vv --max-events=1 |& grep Reusing Reusing "open" BPF sys_enter augmenter for "stat" Reusing "open" BPF sys_enter augmenter for "lstat" Reusing "open" BPF sys_enter augmenter for "access" Reusing "connect" BPF sys_enter augmenter for "accept" Reusing "sendto" BPF sys_enter augmenter for "recvfrom" Reusing "connect" BPF sys_enter augmenter for "bind" Reusing "connect" BPF sys_enter augmenter for "getsockname" Reusing "connect" BPF sys_enter augmenter for "getpeername" Reusing "open" BPF sys_enter augmenter for "execve" Reusing "open" BPF sys_enter augmenter for "truncate" Reusing "open" BPF sys_enter augmenter for "chdir" Reusing "open" BPF sys_enter augmenter for "mkdir" Reusing "open" BPF sys_enter augmenter for "rmdir" Reusing "open" BPF sys_enter augmenter for "creat" Reusing "open" BPF sys_enter augmenter for "link" Reusing "open" BPF sys_enter augmenter for "unlink" Reusing "open" BPF sys_enter augmenter for "symlink" Reusing "open" BPF sys_enter augmenter for "readlink" Reusing "open" BPF sys_enter augmenter for "chmod" Reusing "open" BPF sys_enter augmenter for "chown" Reusing "open" BPF sys_enter augmenter for "lchown" Reusing "open" BPF sys_enter augmenter for "mknod" Reusing "open" BPF sys_enter augmenter for "statfs" Reusing "open" BPF sys_enter augmenter for "pivot_root" Reusing "open" BPF sys_enter augmenter for "chroot" Reusing "open" BPF sys_enter augmenter for "acct" Reusing "open" BPF sys_enter augmenter for "swapon" Reusing "open" BPF sys_enter augmenter for "swapoff" Reusing "open" BPF sys_enter augmenter for "delete_module" Reusing "open" BPF sys_enter augmenter for "setxattr" Reusing "open" BPF sys_enter augmenter for "lsetxattr" Reusing "openat" BPF sys_enter augmenter for "fsetxattr" Reusing "open" BPF sys_enter augmenter for "getxattr" Reusing "open" BPF sys_enter augmenter for "lgetxattr" Reusing "openat" BPF sys_enter augmenter for "fgetxattr" Reusing "open" BPF sys_enter augmenter for "listxattr" Reusing "open" BPF sys_enter augmenter for "llistxattr" Reusing "open" BPF sys_enter augmenter for "removexattr" Reusing "open" BPF sys_enter augmenter for "lremovexattr" Reusing "fsetxattr" BPF sys_enter augmenter for "fremovexattr" Reusing "open" BPF sys_enter augmenter for "mq_open" Reusing "open" BPF sys_enter augmenter for "mq_unlink" Reusing "fsetxattr" BPF sys_enter augmenter for "add_key" Reusing "fremovexattr" BPF sys_enter augmenter for "request_key" Reusing "fremovexattr" BPF sys_enter augmenter for "inotify_add_watch" Reusing "fremovexattr" BPF sys_enter augmenter for "mkdirat" Reusing "fremovexattr" BPF sys_enter augmenter for "mknodat" Reusing "fremovexattr" BPF sys_enter augmenter for "fchownat" Reusing "fremovexattr" BPF sys_enter augmenter for "futimesat" Reusing "fremovexattr" BPF sys_enter augmenter for "newfstatat" Reusing "fremovexattr" BPF sys_enter augmenter for "unlinkat" Reusing "fremovexattr" BPF sys_enter augmenter for "linkat" Reusing "open" BPF sys_enter augmenter for "symlinkat" Reusing "fremovexattr" BPF sys_enter augmenter for "readlinkat" Reusing "fremovexattr" BPF sys_enter augmenter for "fchmodat" Reusing "fremovexattr" BPF sys_enter augmenter for "faccessat" Reusing "fremovexattr" BPF sys_enter augmenter for "utimensat" Reusing "connect" BPF sys_enter augmenter for "accept4" Reusing "fremovexattr" BPF sys_enter augmenter for "name_to_handle_at" Reusing "fremovexattr" BPF sys_enter augmenter for "renameat2" Reusing "open" BPF sys_enter augmenter for "memfd_create" Reusing "fremovexattr" BPF sys_enter augmenter for "execveat" Reusing "fremovexattr" BPF sys_enter augmenter for "statx" after perf $ perf trace -vv --max-events=1 |& grep Reusing Reusing "open" BPF sys_enter augmenter for "stat" Reusing "open" BPF sys_enter augmenter for "lstat" Reusing "open" BPF sys_enter augmenter for "access" Reusing "connect" BPF sys_enter augmenter for "accept" Reusing "sendto" BPF sys_enter augmenter for "recvfrom" Reusing "connect" BPF sys_enter augmenter for "bind" Reusing "connect" BPF sys_enter augmenter for "getsockname" Reusing "connect" BPF sys_enter augmenter for "getpeername" Reusing "open" BPF sys_enter augmenter for "execve" Reusing "open" BPF sys_enter augmenter for "truncate" Reusing "open" BPF sys_enter augmenter for "chdir" Reusing "open" BPF sys_enter augmenter for "mkdir" Reusing "open" BPF sys_enter augmenter for "rmdir" Reusing "open" BPF sys_enter augmenter for "creat" Reusing "open" BPF sys_enter augmenter for "link" Reusing "open" BPF sys_enter augmenter for "unlink" Reusing "open" BPF sys_enter augmenter for "symlink" Reusing "open" BPF sys_enter augmenter for "readlink" Reusing "open" BPF sys_enter augmenter for "chmod" Reusing "open" BPF sys_enter augmenter for "chown" Reusing "open" BPF sys_enter augmenter for "lchown" Reusing "open" BPF sys_enter augmenter for "mknod" Reusing "open" BPF sys_enter augmenter for "statfs" Reusing "open" BPF sys_enter augmenter for "pivot_root" Reusing "open" BPF sys_enter augmenter for "chroot" Reusing "open" BPF sys_enter augmenter for "acct" Reusing "open" BPF sys_enter augmenter for "swapon" Reusing "open" BPF sys_enter augmenter for "swapoff" Reusing "open" BPF sys_enter augmenter for "delete_module" Reusing "open" BPF sys_enter augmenter for "setxattr" Reusing "open" BPF sys_enter augmenter for "lsetxattr" Reusing "openat" BPF sys_enter augmenter for "fsetxattr" Reusing "open" BPF sys_enter augmenter for "getxattr" Reusing "open" BPF sys_enter augmenter for "lgetxattr" Reusing "openat" BPF sys_enter augmenter for "fgetxattr" Reusing "open" BPF sys_enter augmenter for "listxattr" Reusing "open" BPF sys_enter augmenter for "llistxattr" Reusing "open" BPF sys_enter augmenter for "removexattr" Reusing "open" BPF sys_enter augmenter for "lremovexattr" Reusing "fsetxattr" BPF sys_enter augmenter for "fremovexattr" Reusing "open" BPF sys_enter augmenter for "mq_open" Reusing "open" BPF sys_enter augmenter for "mq_unlink" Reusing "fsetxattr" BPF sys_enter augmenter for "add_key" Reusing "fremovexattr" BPF sys_enter augmenter for "request_key" Reusing "fremovexattr" BPF sys_enter augmenter for "inotify_add_watch" Reusing "fremovexattr" BPF sys_enter augmenter for "mkdirat" Reusing "fremovexattr" BPF sys_enter augmenter for "mknodat" Reusing "fremovexattr" BPF sys_enter augmenter for "fchownat" Reusing "fremovexattr" BPF sys_enter augmenter for "futimesat" Reusing "fremovexattr" BPF sys_enter augmenter for "newfstatat" Reusing "fremovexattr" BPF sys_enter augmenter for "unlinkat" Reusing "fremovexattr" BPF sys_enter augmenter for "linkat" Reusing "open" BPF sys_enter augmenter for "symlinkat" Reusing "fremovexattr" BPF sys_enter augmenter for "readlinkat" Reusing "fremovexattr" BPF sys_enter augmenter for "fchmodat" Reusing "fremovexattr" BPF sys_enter augmenter for "faccessat" Reusing "fremovexattr" BPF sys_enter augmenter for "utimensat" Reusing "connect" BPF sys_enter augmenter for "accept4" Reusing "fremovexattr" BPF sys_enter augmenter for "name_to_handle_at" Reusing "fremovexattr" BPF sys_enter augmenter for "renameat2" Reusing "open" BPF sys_enter augmenter for "memfd_create" Reusing "fremovexattr" BPF sys_enter augmenter for "execveat" Reusing "fremovexattr" BPF sys_enter augmenter for "statx" TL;DR: These are the new syscalls that can be augmented Reusing "openat" BPF sys_enter augmenter for "open_tree" Reusing "openat" BPF sys_enter augmenter for "openat2" Reusing "openat" BPF sys_enter augmenter for "mount_setattr" Reusing "openat" BPF sys_enter augmenter for "move_mount" Reusing "open" BPF sys_enter augmenter for "fsopen" Reusing "openat" BPF sys_enter augmenter for "fspick" Reusing "openat" BPF sys_enter augmenter for "faccessat2" Reusing "openat" BPF sys_enter augmenter for "fchmodat2" as for the perf trace output: before perf $ perf trace -e faccessat2 --max-events=1 [no output] after perf $ ./perf trace -e faccessat2 --max-events=1 0.000 ( 0.037 ms): waybar/958 faccessat2(dfd: 40, filename: "uevent") = 0 P.S. The reason why this bug was not found in the past five years is probably because it only happens to the newer syscalls whose id is greater, for instance, faccessat2 of id 439, which not a lot of people care about when using perf trace. [Arnaldo]: notes That and the fact that the BPF code was hidden before having to use -e, that got changed kinda recently when we switched to using BPF skels for augmenting syscalls in 'perf trace': ⬢[acme@toolbox perf-tools-next]$ git log --oneline tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c a9f4c6c999008c92 perf trace: Collect sys_nanosleep first argument 29d16de26df17e94 perf augmented_raw_syscalls.bpf: Move 'struct timespec64' to vmlinux.h 5069211e2f0b47e7 perf trace: Use the right bpf_probe_read(_str) variant for reading user data 33b725ce7b988756 perf trace: Avoid compile error wrt redefining bool 7d9642311b6d9d31 perf bpf augmented_raw_syscalls: Add an assert to make sure sizeof(augmented_arg->value) is a power of two. 262b54b6c9396823 perf bpf augmented_raw_syscalls: Add an assert to make sure sizeof(saddr) is a power of two. 1836480429d173c0 perf bpf_skel augmented_raw_syscalls: Cap the socklen parameter using &= sizeof(saddr) cd2cece61ac5f900 perf trace: Tidy comments related to BPF + syscall augmentation 5e6da6be3082f77b perf trace: Migrate BPF augmentation to use a skeleton ⬢[acme@toolbox perf-tools-next]$ ⬢[acme@toolbox perf-tools-next]$ git show --oneline --pretty=reference 5e6da6be3082f77b | head -1 5e6da6be3082f77b (perf trace: Migrate BPF augmentation to use a skeleton, 2023-08-10) ⬢[acme@toolbox perf-tools-next]$ I.e. from August, 2023. One had as well to ask for BUILD_BPF_SKEL=1, which now is default if all it needs is available on the system. I simplified the code to not expose the 'struct syscall' outside of tools/perf/util/syscalltbl.c, instead providing a function to go from the index to the syscall id: int syscalltbl__id_at_idx(struct syscalltbl *tbl, int idx); Signed-off-by: Howard Chu Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/lkml/ZmhlAxbVcAKoPTg8@x1 Link: https://lore.kernel.org/r/20240705132059.853205-2-howardchu95@gmail.com Signed-off-by: Namhyung Kim commit 226c49446bccee1c2315bc88bbbca7e6542e98fc Author: Tejun Heo Date: Fri Jul 12 06:46:28 2024 -1000 cgroup: Add Michal Koutný as a maintainer Michal has been contributing and reviewing patches across cgroup for a while now. Add him as a maintainer. Signed-off-by: Tejun Heo Acked-by: Michal Koutný Acked-by: Johannes Weiner Cc: Zefan Li Cc: Linus Torvalds commit 6a26f9c68901797261bc145975a02f85be0c1d8f Author: Xiu Jianfeng Date: Thu Jul 11 10:14:57 2024 +0000 cgroup/misc: Introduce misc.events.local Currently the event counting provided by misc.events is hierarchical, it's not practical if user is only concerned with events of a specified cgroup. Therefore, introduce misc.events.local collect events specific to the given cgroup. This is analogous to memory.events.local and pids.events.local. Signed-off-by: Xiu Jianfeng Signed-off-by: Tejun Heo commit 617069741dfbb141bc4574531a5dbbbad8ddf197 Author: Mikulas Patocka Date: Wed Jul 10 20:53:12 2024 +0200 dm: introduce the target flag mempool_needs_integrity This commit introduces the dm target flag mempool_needs_integrity. When the flag is set, device mapper will call bioset_integrity_create on it's bio sets. The target can then call bio_integrity_alloc on the bios allocated from the table's mempool. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 1553419c3c10cf386496e68b90b5d0ce966ac614 Author: Ian Rogers Date: Wed Jul 3 18:17:45 2024 -0700 perf dso: Fix address sanitizer build Various files had been missed from having accessor functions added for the sake of dso reference count checking. Add the function calls and missing dso accessor functions. Fixes: ee756ef7491e ("perf dso: Add reference count checking and accessor functions") Signed-off-by: Ian Rogers Cc: James Clark Cc: Suzuki K Poulose Cc: Yunseong Kim Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Athira Rajeev Cc: John Garry Link: https://lore.kernel.org/r/20240704011745.1021288-1-irogers@google.com Signed-off-by: Namhyung Kim commit 14b0fffa25ce4a9ef5d4448b20b80217b2caa0e8 Author: Leo Yan Date: Sat Jul 6 16:20:35 2024 +0100 perf mem: Warn if memory events are not supported on all CPUs It is possible that memory events are not supported on all CPUs. Prints a warning by dumping the enabled CPU maps in this case. Signed-off-by: Leo Yan Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Will Deacon Cc: Mike Leach Cc: Kajol Jain Cc: John Garry Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20240706152035.86983-3-leo.yan@arm.com Signed-off-by: Namhyung Kim commit e6b4da6759334bfdead28f9ad32323cbdbf9f670 Author: Leo Yan Date: Sat Jul 6 16:20:34 2024 +0100 perf arm-spe: Support multiple Arm SPE PMUs A platform can have more than one Arm SPE PMU. For example, a system with multiple clusters may have each cluster enabled with its own Arm SPE instance. In such case, the PMU devices will be named 'arm_spe_0', 'arm_spe_1', and so on. Currently, the tool only supports 'arm_spe_0'. This commit extends support to multiple Arm SPE PMUs by detecting the substring 'arm_spe_'. Signed-off-by: Leo Yan Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Will Deacon Cc: Mike Leach Cc: Kajol Jain Cc: John Garry Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20240706152035.86983-2-leo.yan@arm.com Signed-off-by: Namhyung Kim commit 759ce73cf74d666ca90d2860dc386fd839887e19 Author: Haoze Xie Date: Mon Jul 8 02:04:02 2024 +0800 perf build x86: Fix SC2034 error in syscalltbl.sh Change the unused var in 'arch/x86/entry/syscalls/syscalltbl.sh' to '_' when reading from '$sorted_table'. This change allows the script to pass tests of ShellCheck before and after version 0.7.2 at the same time. When building in arch x86, syscalltbl.sh got a ShellCheck warning, which makes compilation error: In arch/x86/entry/syscalls/syscalltbl.sh line 27: while read nr _abi name entry _compat; do ^-^ SC2034: abi appears unused. Verify use (or export if used externally). ^----^ SC2034: compat appears unused. Verify use (or export if used externally). The script reads unused param abi and compat. It uses format '_xxx' to indicate dummy vars, which won't work properly when ShellCheck <= 0.7.2. According to SC2034, the more general way of writing is to use directly '_' to indicate discarding vars. 'entry' is also replaced by '_' because it just happens to be defined in emit function, otherwise it will lead to some misunderstandings. Link: https://www.shellcheck.net/wiki/SC2034 Signed-off-by: Haoze Xie Signed-off-by: Yuan Tan Link: https://lore.kernel.org/r/2143cab4cd8468c88860f4e5e382d0e6b4d89ac9.1720372178.git.royenheart@gmail.com Signed-off-by: Namhyung Kim commit 6353abd32c8d2a3698115e03b71099858a38591d Author: Haoze Xie Date: Mon Jul 8 02:01:00 2024 +0800 perf record: Fix memset out-of-range error Modified the object of 'memset' from '&lost.lost' to '&lost' in record__read_lost_samples. This allows 'memset' to access memory properly without causing out-of-bounds problems. The problems got from builtin-record.c are: In file included from /usr/include/string.h:495, from util/parse-events.h:13, from builtin-record.c:14: In function 'memset', inlined from 'record__read_lost_samples' at builtin-record.c:1958:6, inlined from '__cmd_record.constprop' at builtin-record.c:2817:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: error: '__builtin_memset' offset [17, 64] from the object at 'lost' is out of the bounds of referenced subobject 'lost' with type 'struct perf_record_lost_samples' at offset 0 [-Werror=array-bounds] 71|return __builtin___memset_chk (__dest,__ch,__len,__bos0 (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The error arised when performing a memset operation on the 'lost' variable, the bytes of 'sizeof(lost)' exceeds that of '&lost.lost', which are 64 and 16. Fixes: 6c1785cd75ef ("perf record: Ensure space for lost samples") Signed-off-by: Haoze Xie Signed-off-by: Yuan Tan Link: https://lore.kernel.org/r/11e12f171b846577cac698cd3999db3d7f6c4d03.1720372317.git.royenheart@gmail.com Signed-off-by: Namhyung Kim commit 306f921e87fc647f1b65c9517d7c97cea854f4f3 Author: Madadi Vineeth Reddy Date: Sun Jul 7 23:57:16 2024 +0530 perf sched map: Add --fuzzy-name option for fuzzy matching in task names The --fuzzy-name option can be used if fuzzy name matching is required. For example, "taskname" can be matched to any string that contains "taskname" as its substring. Sample output for --task-name wdav --fuzzy-name ============= . *A0 . . . . - . 131040.641346 secs A0 => wdavdaemon:62509 . A0 *B0 . . . - . 131040.641378 secs B0 => wdavdaemon:62274 . *- B0 . . . - . 131040.641379 secs *C0 . B0 . . . . . 131040.641572 secs C0 => wdavdaemon:62283 C0 . B0 . *D0 . . . 131040.641572 secs D0 => wdavdaemon:62277 C0 . B0 . D0 . *E0 . 131040.641578 secs E0 => wdavdaemon:62270 *- . B0 . D0 . E0 . 131040.641581 secs Suggested-by: Chen Yu Reviewed-and-tested-by: Athira Rajeev Signed-off-by: Madadi Vineeth Reddy Link: https://lore.kernel.org/r/20240707182716.22054-4-vineethr@linux.ibm.com Signed-off-by: Namhyung Kim commit 9cc0afed6fdc46a96501baa49527fa00aaef37b1 Author: Madadi Vineeth Reddy Date: Sun Jul 7 23:57:15 2024 +0530 perf sched map: Add support for multiple task names using CSV To track the scheduling patterns of multiple tasks simultaneously, multiple task names can be specified using a comma separator without any whitespace. Sample output for --task-name perf,wdavdaemon ============= . *A0 . . . . - . 131040.641346 secs A0 => wdavdaemon:62509 . A0 *B0 . . . - . 131040.641378 secs B0 => wdavdaemon:62274 . *- B0 . . . - . 131040.641379 secs *C0 . B0 . . . . . 131040.641572 secs C0 => wdavdaemon:62283 ... . *- . . . . . . 131041.395649 secs . . . . . . . *X2 131041.403969 secs X2 => perf:70211 . . . . . . . *- 131041.404006 secs Suggested-by: Namhyung Kim Reviewed-and-tested-by: Athira Rajeev Signed-off-by: Madadi Vineeth Reddy Cc: Chen Yu Link: https://lore.kernel.org/r/20240707182716.22054-3-vineethr@linux.ibm.com Signed-off-by: Namhyung Kim commit 3116d6091081ad6038db6d68bca9d7b84ba0b7f0 Author: Madadi Vineeth Reddy Date: Sun Jul 7 23:57:14 2024 +0530 perf sched map: Add task-name option to filter the output map By default, perf sched map prints sched-in events for all the tasks which may not be required all the time as it prints lot of symbols and rows to the terminal. With --task-name option, one could specify the specific task name for which the map has to be shown. This would help in analyzing the CPU usage patterns easier for that specific task. Since multiple PID's might have the same task name, using task-name filter would be more useful for debugging. For other tasks, instead of printing the symbol, '-' is printed and the same '.' is used to represent idle. '-' is used instead of symbol for other tasks because it helps in clear visualization of task of interest and secondly the symbol itself doesn't mean anything because the sched-in of that symbol will not be printed(first sched-in contains pid and the corresponding symbol). When using the --task-name option, the sched-out time is represented by a '*-'. Since not all task sched-in events are printed, the sched-out time of the relevant task might be lost. This representation ensures that the sched-out time of the interested task is not overlooked. 6.10.0-rc1 ========== *A0 131040.639793 secs A0 => migration/0:19 *. 131040.639801 secs . => swapper:0 . *B0 131040.639830 secs B0 => migration/1:24 . *. 131040.639836 secs . . *C0 131040.640108 secs C0 => migration/2:30 . . *. 131040.640163 secs . . . *D0 131040.640386 secs D0 => migration/3:36 . . . *. 131040.640395 secs 6.10.0-rc1 + patch (--task-name wdavdaemon) ============= . *A0 . . . . - . 131040.641346 secs A0 => wdavdaemon:62509 . A0 *B0 . . . - . 131040.641378 secs B0 => wdavdaemon:62274 - *- B0 . . . - . 131040.641379 secs *C0 . B0 . . . . . 131040.641572 secs C0 => wdavdaemon:62283 C0 . B0 . *D0 . . . 131040.641572 secs D0 => wdavdaemon:62277 C0 . B0 . D0 . *E0 . 131040.641578 secs E0 => wdavdaemon:62270 *- . B0 . D0 . E0 . 131040.641581 secs . . B0 . D0 . *- . 131040.641583 secs Reviewed-and-tested-by: Athira Rajeev Signed-off-by: Madadi Vineeth Reddy Cc: Chen Yu Link: https://lore.kernel.org/r/20240707182716.22054-2-vineethr@linux.ibm.com Signed-off-by: Namhyung Kim commit c51cba4755609ad97ba97713210c16f043c73224 Merge: 75ed63a5ab5d1 216d04139a6d0 Author: Mark Brown Date: Fri Jul 12 17:38:18 2024 +0100 Fix the unbalanced pm_runtime_enable in wcd937x-sdw Merge series from Mohammad Rafi Shaik : This patch set change will fix the unbalanced pm_runtime_enable in wcd937x-sdw soundwire slave. And removed the string compare with widget name in MIC BIAS settings, instead of string compare use the MIC BIAS id's as value. Removed separate handling for vdd-buck regulator supply which is not required. The vdd-buck regulator supply enabled using bulk enable. Added the error handling in wcd937x_probe() and disable the regulators in error case. commit 8a25418ba65a5d2494b369f6178a284c449bc399 Author: Thorsten Blum Date: Fri Jul 5 06:54:59 2024 +0200 HID: hid-steam: Fix typo in goto label s/stream/steam/ Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20240705045458.65108-2-thorsten.blum@toblux.com Signed-off-by: Benjamin Tissoires commit ad1ff1f250c966b945d40a6a2e548f7d701b96df Author: Chen Ni Date: Tue Jul 9 09:22:23 2024 +0800 HID: mcp2221: Remove unnecessary semicolon Remove unnecessary semicolon at the end of the switch statement. This is detected by coccinelle. Signed-off-by: Chen Ni Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20240709012223.17393-1-nichen@iscas.ac.cn Signed-off-by: Benjamin Tissoires commit 523e6f4f50fc7078be80434a98cc81b48a847923 Author: Colin Ian King Date: Thu Jul 11 09:35:13 2024 +0100 HID: Fix spelling mistakes "Kensigton" -> "Kensington" There are spelling mistakes in a comment and in the module description. Fix these. Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20240711083513.282724-1-colin.i.king@gmail.com Signed-off-by: Benjamin Tissoires commit 517125f6749402e579f715519147145944f12ad9 Author: Daniel Borkmann Date: Fri Jul 12 18:12:30 2024 +0200 selftests/bpf: DENYLIST.aarch64: Skip fexit_sleep again Revert commit 90dc946059b7 ("selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep") again. The fix in 19d3c179a377 ("bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG") does not address all of the issues and BPF CI is still hanging and timing out: https://github.com/kernel-patches/bpf/actions/runs/9905842936/job/27366435436 [...] #89/11 fexit_bpf2bpf/func_replace_global_func:OK #89/12 fexit_bpf2bpf/fentry_to_cgroup_bpf:OK #89/13 fexit_bpf2bpf/func_replace_progmap:OK #89 fexit_bpf2bpf:OK Error: The operation was canceled. Thus more investigation work & fixing is needed before the test can be put in place again. Signed-off-by: Daniel Borkmann Cc: Puranjay Mohan Link: https://lore.kernel.org/bpf/20240705145009.32340-1-puranjay@kernel.org commit ebf51e460e488511d9ee60b07d00dac68883facf Author: Eric Chan Date: Thu Jul 11 19:39:45 2024 +0000 kunit: Introduce KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros Introduces KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros to provide assert-type equivalents for memory comparison. While KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ are available for expectations, the addition of these new macros ensures that assertions can also be used for memory comparisons, enhancing the consistency and completeness of the kunit framework. Signed-off-by: Eric Chan Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 7d4087b013895524438f2522367c984f776e09e3 Author: Eric Chan Date: Thu Jul 11 19:39:31 2024 +0000 kunit: Rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT for readability Both KUNIT_FAIL and KUNIT_ASSERT_FAILURE defined to KUNIT_FAIL_ASSERTION with different tpye of kunit_assert_type. The current naming of KUNIT_ASSERT_FAILURE and KUNIT_FAIL_ASSERTION is confusing due to their similarities. To improve readability and symmetry, renames KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT. Makes the naming consistent, with KUNIT_FAIL and KUNIT_FAIL_AND_ABORT being symmetrical. Additionally, an explanation for KUNIT_FAIL_AND_ABORT has been added to clarify its usage. Signed-off-by: Eric Chan Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 2be32bbe6989e071aea1767cb54c7528a0dac07f Author: Eric Chan Date: Thu Jul 11 19:39:17 2024 +0000 kunit: Fix the comment of KUNIT_ASSERT_STRNEQ as assertion The current comment for KUNIT_ASSERT_STRNEQ incorrectly describes it as an expectation. Since KUNIT_ASSERT_STRNEQ is an assertion, updates the comment to correctly refer to it as such. Signed-off-by: Eric Chan Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 7554a7b96dc0dcc445d4af7077c96c6ab0988c79 Author: Kees Cook Date: Thu Jul 11 09:54:32 2024 -0700 kunit: executor: Simplify string allocation handling The alloc/copy code pattern is better consolidated to single kstrdup (and kstrndup) calls instead. This gets rid of deprecated[1] strncpy() uses as well. Replace one other strncpy() use with the more idiomatic strscpy(). Link: https://github.com/KSPP/linux/issues/90 [1] Reviewed-by: David Gow Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 8b6c32e831ef4496b51a68ddc5be9bb9e8d2337d Merge: 74e54d532b59c 3b10f25704bee Author: Will Deacon Date: Fri Jul 12 16:57:47 2024 +0100 Merge branch 'iommu/iommufd/paging-domain-alloc' into iommu/next * iommu/iommufd/paging-domain-alloc: RDMA/usnic: Use iommu_paging_domain_alloc() wifi: ath11k: Use iommu_paging_domain_alloc() wifi: ath10k: Use iommu_paging_domain_alloc() drm/msm: Use iommu_paging_domain_alloc() vhost-vdpa: Use iommu_paging_domain_alloc() vfio/type1: Use iommu_paging_domain_alloc() iommufd: Use iommu_paging_domain_alloc() iommu: Add iommu_paging_domain_alloc() interface commit 74e54d532b59c7a4375205d498c68634e0cf43b2 Merge: 578cc98b66f5a 8519e689834a3 Author: Will Deacon Date: Fri Jul 12 16:57:42 2024 +0100 Merge branch 'iommu/iommufd/attach-handles' into iommu/next * iommu/iommufd/attach-handles: iommu: Extend domain attach group with handle support iommu: Add attach handle to struct iopf_group iommu: Remove sva handle list iommu: Introduce domain attachment handle commit 578cc98b66f5a5c607d03b4191a314ec51d19e5f Merge: 342d3c1cbf6f1 6bac3388889ce Author: Will Deacon Date: Fri Jul 12 16:57:34 2024 +0100 Merge branch 'iommu/pci/ats' into iommu/next * iommu/pci/ats: arm64: dts: fvp: Enable PCIe ATS for Base RevC FVP iommu/of: Support ats-supported device-tree property dt-bindings: PCI: generic: Add ats-supported property commit 342d3c1cbf6f181e202c9984c5f9c68b808f4f61 Merge: c2b2e5c50330b 3e36c15fc1cce Author: Will Deacon Date: Fri Jul 12 16:55:43 2024 +0100 Merge branch 'iommu/fwspec-ops-removal' into iommu/next * iommu/fwspec-ops-removal: iommu: Remove iommu_fwspec ops OF: Simplify of_iommu_configure() ACPI: Retire acpi_iommu_fwspec_ops() iommu: Resolve fwspec ops automatically iommu/mediatek-v1: Clean up redundant fwspec checks [will: Fixed conflict in drivers/iommu/tegra-smmu.c between fwspec ops removal and fwspec driver fix as per Robin and Jon] commit 6ad8735994b854b23c824dd6b1dd2126e893a3b4 Author: yang.zhang Date: Wed May 8 10:24:45 2024 +0800 riscv: set trap vector earlier The exception vector of the booting hart is not set before enabling the mmu and then still points to the value of the previous firmware, typically _start. That makes it hard to debug setup_vm() when bad things happen. So fix that by setting the exception vector earlier. Reviewed-by: Alexandre Ghiti Signed-off-by: yang.zhang Link: https://lore.kernel.org/r/20240508022445.6131-1-gaoshanliukou@163.com Signed-off-by: Palmer Dabbelt commit 5ee121a39330e437cae0d64feeb459c7ec9e9500 Merge: c9b8cd139c1df f2c43c61160ec Author: Palmer Dabbelt Date: Fri Jul 12 03:23:22 2024 -0700 Merge patch series "riscv: Apply Zawrs when available" Andrew Jones says: Zawrs provides two instructions (wrs.nto and wrs.sto), where both are meant to allow the hart to enter a low-power state while waiting on a store to a memory location. The instructions also both wait an implementation-defined "short" duration (unless the implementation terminates the stall for another reason). The difference is that while wrs.sto will terminate when the duration elapses, wrs.nto, depending on configuration, will either just keep waiting or an ILL exception will be raised. Linux will use wrs.nto, so if platforms have an implementation which falls in the "just keep waiting" category (which is not expected), then it should _not_ advertise Zawrs in the hardware description. Like wfi (and with the same {m,h}status bits to configure it), when wrs.nto is configured to raise exceptions it's expected that the higher privilege level will see the instruction was a wait instruction, do something, and then resume execution following the instruction. For example, KVM does configure exceptions for wfi (hstatus.VTW=1) and therefore also for wrs.nto. KVM does this for wfi since it's better to allow other tasks to be scheduled while a VCPU waits for an interrupt. For waits such as those where wrs.nto/sto would be used, which are typically locks, it is also a good idea for KVM to be involved, as it can attempt to schedule the lock holding VCPU. This series starts with Christoph's addition of the riscv smp_cond_load_relaxed function which applies wrs.sto when available. That patch has been reworked to use wrs.nto and to use the same approach as Arm for the wait loop, since we can't have arbitrary C code between the load-reserved and the wrs. Then, hwprobe support is added (since the instructions are also usable from usermode), and finally KVM is taught about wrs.nto, allowing guests to see and use the Zawrs extension. We still don't have test results from hardware, and it's not possible to prove that using Zawrs is a win when testing on QEMU, not even when oversubscribing VCPUs to guests. However, it is possible to use KVM selftests to force a scenario where we can prove Zawrs does its job and does it well. [4] is a test which does this and, on my machine, without Zawrs it takes 16 seconds to complete and with Zawrs it takes 0.25 seconds. This series is also available here [1]. In order to use QEMU for testing a build with [2] is needed. In order to enable guests to use Zawrs with KVM using kvmtool, the branch at [3] may be used. [1] https://github.com/jones-drew/linux/commits/riscv/zawrs-v3/ [2] https://lore.kernel.org/all/20240312152901.512001-2-ajones@ventanamicro.com/ [3] https://github.com/jones-drew/kvmtool/commits/riscv/zawrs/ [4] https://github.com/jones-drew/linux/commit/cb2beccebcece10881db842ed69bdd5715cfab5d Link: https://lore.kernel.org/r/20240426100820.14762-8-ajones@ventanamicro.com * b4-shazam-merge: KVM: riscv: selftests: Add Zawrs extension to get-reg-list test KVM: riscv: Support guest wrs.nto riscv: hwprobe: export Zawrs ISA extension riscv: Add Zawrs support for spinlocks dt-bindings: riscv: Add Zawrs ISA extension description riscv: Provide a definition for 'pause' Signed-off-by: Palmer Dabbelt commit f2c43c61160ecba15f073b79abf1ea351e41203d Author: Andrew Jones Date: Fri Apr 26 12:08:26 2024 +0200 KVM: riscv: selftests: Add Zawrs extension to get-reg-list test KVM RISC-V allows the Zawrs extension for the Guest/VM, so add it to the get-reg-list test. Signed-off-by: Andrew Jones Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240426100820.14762-14-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 86d6a86e59e3aa425d829a935c0d92388e4fe55b Author: Andrew Jones Date: Fri Apr 26 12:08:25 2024 +0200 KVM: riscv: Support guest wrs.nto When a guest traps on wrs.nto, call kvm_vcpu_on_spin() to attempt to yield to the lock holding VCPU. Also extend the KVM ISA extension ONE_REG interface to allow KVM userspace to detect and enable the Zawrs extension for the Guest/VM. Signed-off-by: Andrew Jones Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240426100820.14762-13-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit c2b2e5c50330b29804339df4e7adf70e9f19b793 Merge: 710f1071f1619 228159802bceb Author: Will Deacon Date: Fri Jul 12 16:54:34 2024 +0100 Merge branch 'iommu/core' into iommu/next * iommu/core: docs: iommu: Remove outdated Documentation/userspace-api/iommu.rst iommufd: Use atomic_long_try_cmpxchg() in incr_user_locked_vm() iommu/iova: Add missing MODULE_DESCRIPTION() macro iommu/dma: Prune redundant pgprot arguments iommu: Make iommu_sva_domain_alloc() static commit a1010fce1c0c2ce3b305aa6e8ff70e86f99e3226 Merge: 2454075f8e291 deac5871eb075 Author: Alexei Starovoitov Date: Fri Jul 12 08:54:08 2024 -0700 Merge branch 'use-overflow-h-helpers-to-check-for-overflows' Shung-Hsi Yu says: ==================== Use overflow.h helpers to check for overflows This patch set refactors kernel/bpf/verifier.c to use type-agnostic, generic overflow-check helpers defined in include/linux/overflow.h to check for addition and subtraction overflow, and drop the signed_*_overflows() helpers we currently have in kernel/bpf/verifier.c; with a fix for overflow check in adjust_jmp_off() in patch 1. There should be no functional change in how the verifier works and the main motivation is to make future refactoring[1] easier. While check_mul_overflow() also exists and could potentially replace what we have in scalar*_min_max_mul(), it does not help with refactoring and would either change how the verifier works (e.g. lifting restriction on umax<=U32_MAX and u32_max<=U16_MAX) or make the code slightly harder to read, so it is left for future endeavour. Changes from v2 - add fix for 5337ac4c9b80 ("bpf: Fix the corner case with may_goto and jump to the 1st insn.") to correct the overflow check for general jump instructions - adapt to changes in commit 5337ac4c9b80 ("bpf: Fix the corner case with may_goto and jump to the 1st insn.") - refactor in adjust_jmp_off() as well and remove signed_add16_overflow() Changes from v1 : - use pointers to values in dst_reg directly as the sum/diff pointer and remove the else branch (Jiri) - change local variables to be dst_reg pointers instead of src_reg values - include comparison of generated assembly before & after the change (Alexei) 1: https://github.com/kernel-patches/bpf/pull/7205/commits ==================== Link: https://lore.kernel.org/r/20240712080127.136608-1-shung-hsi.yu@suse.com Signed-off-by: Alexei Starovoitov commit 710f1071f1619657ff87d0d7c019fbcba1bcd97b Merge: 4295d785a7aa1 b577060ac7ba6 Author: Will Deacon Date: Fri Jul 12 16:54:10 2024 +0100 Merge branch 'iommu/qualcomm/msm' into iommu/next * iommu/qualcomm/msm: dt-bindings: iommu: Convert msm,iommu-v0 to yaml dt-bindings: iommu: qcom,iommu: Add MSM8953 GPU IOMMU to SMMUv2 compatibles commit deac5871eb0751454cb80b3ff6b69e42a6c1bab2 Author: Shung-Hsi Yu Date: Fri Jul 12 16:01:26 2024 +0800 bpf: use check_sub_overflow() to check for subtraction overflows Similar to previous patch that drops signed_add*_overflows() and uses (compiler) builtin-based check_add_overflow(), do the same for signed_sub*_overflows() and replace them with the generic check_sub_overflow() to make future refactoring easier and have the checks implemented more efficiently. Unsigned overflow check for subtraction does not use helpers and are simple enough already, so they're left untouched. After the change GCC 13.3.0 generates cleaner assembly on x86_64: if (check_sub_overflow(*dst_smin, src_reg->smax_value, dst_smin) || 139bf: mov 0x28(%r12),%rax 139c4: mov %edx,0x54(%r12) 139c9: sub %r11,%rax 139cc: mov %rax,0x28(%r12) 139d1: jo 14627 check_sub_overflow(*dst_smax, src_reg->smin_value, dst_smax)) { 139d7: mov 0x30(%r12),%rax 139dc: sub %r9,%rax 139df: mov %rax,0x30(%r12) if (check_sub_overflow(*dst_smin, src_reg->smax_value, dst_smin) || 139e4: jo 14627 ... *dst_smin = S64_MIN; 14627: movabs $0x8000000000000000,%rax 14631: mov %rax,0x28(%r12) *dst_smax = S64_MAX; 14636: sub $0x1,%rax 1463a: mov %rax,0x30(%r12) Before the change it gives: if (signed_sub_overflows(dst_reg->smin_value, smax_val) || 13a50: mov 0x28(%r12),%rdi 13a55: mov %edx,0x54(%r12) dst_reg->smax_value = S64_MAX; 13a5a: movabs $0x7fffffffffffffff,%rdx 13a64: mov %eax,0x50(%r12) dst_reg->smin_value = S64_MIN; 13a69: movabs $0x8000000000000000,%rax s64 res = (s64)((u64)a - (u64)b); 13a73: mov %rdi,%rsi 13a76: sub %rcx,%rsi if (b < 0) 13a79: test %rcx,%rcx 13a7c: js 145ea if (signed_sub_overflows(dst_reg->smin_value, smax_val) || 13a82: cmp %rsi,%rdi 13a85: jl 13ac7 signed_sub_overflows(dst_reg->smax_value, smin_val)) { 13a87: mov 0x30(%r12),%r8 s64 res = (s64)((u64)a - (u64)b); 13a8c: mov %r8,%rax 13a8f: sub %r9,%rax return res > a; 13a92: cmp %rax,%r8 13a95: setl %sil if (b < 0) 13a99: test %r9,%r9 13a9c: js 147d1 dst_reg->smax_value = S64_MAX; 13aa2: movabs $0x7fffffffffffffff,%rdx dst_reg->smin_value = S64_MIN; 13aac: movabs $0x8000000000000000,%rax if (signed_sub_overflows(dst_reg->smin_value, smax_val) || 13ab6: test %sil,%sil 13ab9: jne 13ac7 dst_reg->smin_value -= smax_val; 13abb: mov %rdi,%rax dst_reg->smax_value -= smin_val; 13abe: mov %r8,%rdx dst_reg->smin_value -= smax_val; 13ac1: sub %rcx,%rax dst_reg->smax_value -= smin_val; 13ac4: sub %r9,%rdx 13ac7: mov %rax,0x28(%r12) ... 13ad1: mov %rdx,0x30(%r12) ... if (signed_sub_overflows(dst_reg->smin_value, smax_val) || 145ea: cmp %rsi,%rdi 145ed: jg 13ac7 145f3: jmp 13a87 Suggested-by: Jiri Olsa Signed-off-by: Shung-Hsi Yu Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20240712080127.136608-4-shung-hsi.yu@suse.com Signed-off-by: Alexei Starovoitov commit 28a4411076b254c67842348e3b25c2fb41a94cad Author: Shung-Hsi Yu Date: Fri Jul 12 16:01:25 2024 +0800 bpf: use check_add_overflow() to check for addition overflows signed_add*_overflows() was added back when there was no overflow-check helper. With the introduction of such helpers in commit f0907827a8a91 ("compiler.h: enable builtin overflow checkers and add fallback code"), we can drop signed_add*_overflows() in kernel/bpf/verifier.c and use the generic check_add_overflow() instead. This will make future refactoring easier, and takes advantage of compiler-emitted hardware instructions that efficiently implement these checks. After the change GCC 13.3.0 generates cleaner assembly on x86_64: err = adjust_scalar_min_max_vals(env, insn, dst_reg, *src_reg); 13625: mov 0x28(%rbx),%r9 /* r9 = src_reg->smin_value */ 13629: mov 0x30(%rbx),%rcx /* rcx = src_reg->smax_value */ ... if (check_add_overflow(*dst_smin, src_reg->smin_value, dst_smin) || 141c1: mov %r9,%rax 141c4: add 0x28(%r12),%rax 141c9: mov %rax,0x28(%r12) 141ce: jo 146e4 check_add_overflow(*dst_smax, src_reg->smax_value, dst_smax)) { 141d4: add 0x30(%r12),%rcx 141d9: mov %rcx,0x30(%r12) if (check_add_overflow(*dst_smin, src_reg->smin_value, dst_smin) || 141de: jo 146e4 ... *dst_smin = S64_MIN; 146e4: movabs $0x8000000000000000,%rax 146ee: mov %rax,0x28(%r12) *dst_smax = S64_MAX; 146f3: sub $0x1,%rax 146f7: mov %rax,0x30(%r12) Before the change it gives: s64 smin_val = src_reg->smin_value; 675: mov 0x28(%rsi),%r8 s64 smax_val = src_reg->smax_value; u64 umin_val = src_reg->umin_value; u64 umax_val = src_reg->umax_value; 679: mov %rdi,%rax /* rax = dst_reg */ if (signed_add_overflows(dst_reg->smin_value, smin_val) || 67c: mov 0x28(%rdi),%rdi /* rdi = dst_reg->smin_value */ u64 umin_val = src_reg->umin_value; 680: mov 0x38(%rsi),%rdx u64 umax_val = src_reg->umax_value; 684: mov 0x40(%rsi),%rcx s64 res = (s64)((u64)a + (u64)b); 688: lea (%r8,%rdi,1),%r9 /* r9 = dst_reg->smin_value + src_reg->smin_value */ return res < a; 68c: cmp %r9,%rdi 68f: setg %r10b /* r10b = (dst_reg->smin_value + src_reg->smin_value) > dst_reg->smin_value */ if (b < 0) 693: test %r8,%r8 696: js 72b signed_add_overflows(dst_reg->smax_value, smax_val)) { dst_reg->smin_value = S64_MIN; dst_reg->smax_value = S64_MAX; 69c: movabs $0x7fffffffffffffff,%rdi s64 smax_val = src_reg->smax_value; 6a6: mov 0x30(%rsi),%r8 dst_reg->smin_value = S64_MIN; 6aa: 00 00 00 movabs $0x8000000000000000,%rsi if (signed_add_overflows(dst_reg->smin_value, smin_val) || 6b4: test %r10b,%r10b /* (dst_reg->smin_value + src_reg->smin_value) > dst_reg->smin_value ? goto 6cb */ 6b7: jne 6cb signed_add_overflows(dst_reg->smax_value, smax_val)) { 6b9: mov 0x30(%rax),%r10 /* r10 = dst_reg->smax_value */ s64 res = (s64)((u64)a + (u64)b); 6bd: lea (%r10,%r8,1),%r11 /* r11 = dst_reg->smax_value + src_reg->smax_value */ if (b < 0) 6c1: test %r8,%r8 6c4: js 71e if (signed_add_overflows(dst_reg->smin_value, smin_val) || 6c6: cmp %r11,%r10 /* (dst_reg->smax_value + src_reg->smax_value) <= dst_reg->smax_value ? goto 723 */ 6c9: jle 723 } else { dst_reg->smin_value += smin_val; dst_reg->smax_value += smax_val; } 6cb: mov %rsi,0x28(%rax) ... 6d5: mov %rdi,0x30(%rax) ... if (signed_add_overflows(dst_reg->smin_value, smin_val) || 71e: cmp %r11,%r10 721: jl 6cb dst_reg->smin_value += smin_val; 723: mov %r9,%rsi dst_reg->smax_value += smax_val; 726: mov %r11,%rdi 729: jmp 6cb return res > a; 72b: cmp %r9,%rdi 72e: setl %r10b 732: jmp 69c 737: nopw 0x0(%rax,%rax,1) Note: unlike adjust_ptr_min_max_vals() and scalar*_min_max_add(), it is necessary to introduce intermediate variable in adjust_jmp_off() to keep the functional behavior unchanged. Without an intermediate variable imm/off will be altered even on overflow. Suggested-by: Jiri Olsa Signed-off-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20240712080127.136608-3-shung-hsi.yu@suse.com Signed-off-by: Alexei Starovoitov commit 4a04b4f0de59dd5c621e78f15803ee0b0544eeb8 Author: Shung-Hsi Yu Date: Fri Jul 12 16:01:24 2024 +0800 bpf: fix overflow check in adjust_jmp_off() adjust_jmp_off() incorrectly used the insn->imm field for all overflow check, which is incorrect as that should only be done or the BPF_JMP32 | BPF_JA case, not the general jump instruction case. Fix it by using insn->off for overflow check in the general case. Fixes: 5337ac4c9b80 ("bpf: Fix the corner case with may_goto and jump to the 1st insn.") Signed-off-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20240712080127.136608-2-shung-hsi.yu@suse.com Signed-off-by: Alexei Starovoitov commit 4295d785a7aa153942e76bdac0e24f0915e0cefb Merge: 906fe8b8263ed eac93f4d4ec63 Author: Will Deacon Date: Fri Jul 12 16:54:06 2024 +0100 Merge branch 'iommu/nvidia/tegra' into iommu/next * iommu/nvidia/tegra: iommu/tegra-smmu: Pass correct fwnode to iommu_fwspec_init() commit 906fe8b8263ed5cb3902d0f2b554deafe5cae766 Merge: cbf9520823bdd 31000732d56b4 Author: Will Deacon Date: Fri Jul 12 16:53:58 2024 +0100 Merge branch 'iommu/intel/vt-d' into iommu/next * iommu/intel/vt-d: iommu/vt-d: Fix identity map bounds in si_domain_init() iommu/vt-d: Fix aligned pages in calculate_psi_aligned_address() iommu/vt-d: Limit max address mask to MAX_AGAW_PFN_WIDTH iommu/vt-d: Refactor PCI PRI enabling/disabling callbacks iommu/vt-d: Add helper to flush caches for context change iommu/vt-d: Add helper to allocate paging domain iommu/vt-d: Downgrade warning for pre-enabled IR iommu/vt-d: Remove control over Execute-Requested requests iommu/vt-d: Remove comment for def_domain_type iommu/vt-d: Handle volatile descriptor status read iommu/vt-d: Use try_cmpxchg64() in intel_pasid_get_entry() commit 244c18fbf64a33d152645766a033b2935ab0acb5 Author: Andrew Jones Date: Fri Apr 26 12:08:24 2024 +0200 riscv: hwprobe: export Zawrs ISA extension Export Zawrs ISA extension through hwprobe. [Palmer: there's a gap in the numbers here as there will be a merge conflict when this is picked up. To avoid confusion I just set the hwprobe ID to match what it would be post-merge.] Signed-off-by: Andrew Jones Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20240426100820.14762-12-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit cbf9520823bdd4c44c94b5988e354ee12d57fa58 Merge: 5012650a15e4e 9b2bc6b9a264b Author: Will Deacon Date: Fri Jul 12 16:53:45 2024 +0100 Merge branch 'iommu/arm/smmu' into iommu/next * iommu/arm/smmu: (32 commits) iommu: Move IOMMU_DIRTY_NO_CLEAR define iommu/arm-smmu-qcom: Register the TBU driver in qcom_smmu_impl_init iommu/arm-smmu-v3: Enable HTTU for stage1 with io-pgtable mapping iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc iommu/io-pgtable-arm: Add read_and_clear_dirty() support iommu/arm-smmu-v3: Add feature detection for HTTU iommu/arm-smmu-v3: Add support for domain_alloc_user fn iommu/arm-smmu-qcom: record reason for deferring probe iommu/arm-smmu: Pretty-print context fault related regs iommu/arm-smmu-qcom-debug: Do not print for handled faults iommu/arm-smmu: Add CB prefix to register bitfields dt-bindings: arm-smmu: Add X1E80100 GPU SMMU iommu/arm-smmu-v3: add missing MODULE_DESCRIPTION() macro iommu/arm-smmu-v3: Shrink the strtab l1_desc array iommu/arm-smmu-v3: Do not zero the strtab twice iommu/arm-smmu-v3: Allow setting a S1 domain to a PASID iommu/arm-smmu-v3: Allow a PASID to be set when RID is IDENTITY/BLOCKED iommu/arm-smmu-v3: Test the STE S1DSS functionality iommu/arm-smmu-v3: Allow IDENTITY/BLOCKED to be set while PASID is used iommu/arm-smmu-v3: Put the SVA mmu notifier in the smmu_domain ... commit 5012650a15e4eea14bcd34be1feffb57ee91940d Merge: 91b3a24a22760 9a448e453151e Author: Will Deacon Date: Fri Jul 12 16:53:39 2024 +0100 Merge branch 'iommu/amd/amd-vi' into iommu/next * iommu/amd/amd-vi: iommu/amd: Use try_cmpxchg64() in v2_alloc_pte() commit 91b3a24a22760f7de16603773d81cfe374a11e51 Merge: 83a7eefedc9b5 8db07ce532c0b Author: Will Deacon Date: Fri Jul 12 16:53:20 2024 +0100 Merge branch 'iommu/allwinner/sun50i' into iommu/next * iommu/allwinner/sun50i: iommu: sun50i: Add H616 compatible string dt-bindings: iommu: add new compatible strings iommu: sun50i: allocate page tables from below 4 GiB iommu: sun50i: clear bypass register commit 1cff1010bef6f325d895db0306b59dc7232ed9b7 Author: Alex Deucher Date: Mon Jul 8 17:40:14 2024 -0400 drm/amdgpu/mes12: add missing opcode string Fixes the indexing of the string array. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 478cb8badf1898f22e19e4d21f7d7b70cd44df9e Author: Alex Deucher Date: Mon Jul 8 17:39:15 2024 -0400 drm/amdgpu/mes11: update opcode strings Add new packet. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7ed58b68ac5c3ff378656eb082c982a266bb658e Author: Leo Li Date: Thu Jul 11 10:31:09 2024 -0400 Revert "drm/amd/display: Reset freesync config before update new state" This change caused PSR SU panels to not read from their remote fb, preventing us from entering self-refresh. It is a regression. This reverts commit eb6dfbb7a9c67c7d9bcdb9f9b9131270e2144e3d. Signed-off-by: Leo Li Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit dc1000bf463d1d89f66d6b5369cf76603f32c4d3) commit eac93f4d4ec63423704657895ce9a4ddac7b023b Author: Will Deacon Date: Fri Jul 12 16:35:25 2024 +0100 iommu/tegra-smmu: Pass correct fwnode to iommu_fwspec_init() iommu_fwspec_init() expects to receive the fwnode corresponding to the IOMMU device, not the fwnode corresponding to the client device being probed. Fix arm_smmu_configure() to pass the correct fwnode to iommu_fwspec_init(). Reported-by: Jon Hunter Suggested-by: Robin Murphy Link: https://lore.kernel.org/r/0eec5f84-6b39-43ba-ab2f-914688a5cf45@nvidia.com Signed-off-by: Will Deacon commit 39c910a430370fd25d5b5e4b2f4b24581a705499 Author: Christoph Hellwig Date: Fri Jul 5 07:42:51 2024 +0200 nfs: do not extend writes to the entire folio nfs_update_folio has code to extend a write to the entire page under certain conditions. With the support for large folios this now suddenly extents to the variable sized and potentially much larger folio. Add code to limit the extension to the page boundaries of the start and end of the write, which matches the historic expecation and the code comments. Fixes: b73fe2dd6cd5 ("nfs: add support for large folios") Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 3921ae0850a31f06791e3c5d8f628864b5ae088a Author: Christoph Hellwig Date: Fri Jul 5 18:51:41 2024 +0200 nfs/blocklayout: add support for NVMe Look for the udev generated persistent device name for NVMe devices in addition to the SCSI ones and the Redhat-specific device mapper name. This is the client side implementation of RFC 9561 "Using the Parallel NFS (pNFS) SCSI Layout to Access Non-Volatile Memory Express (NVMe) Storage Devices". Note that the udev rules for nvme are a bit of a mess and udev will only create a link for the uuid if the NVMe namespace has one, and not the NGUID. As the current RFCs don't support UUID based identifications this means the layout can't be used on such namespaces out of the box. A small tweak to the udev rules can work around it, and as the real fix I will submit a draft to the IETF NFSv4 working group to support UUID-based identifiers for SCSI and NVMe. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit c8b8b8190a80b591aa73c27c70a668799f8db547 Merge: f0a23883fad4e 492ac37fa38fa Author: Paolo Bonzini Date: Fri Jul 12 11:24:12 2024 -0400 Merge tag 'loongarch-kvm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD LoongArch KVM changes for v6.11 1. Add ParaVirt steal time support. 2. Add some VM migration enhancement. 3. Add perf kvm-stat support for loongarch. commit 31000732d56b43765d51e08cccb68818fbc0032c Author: Jon Pan-Doh Date: Tue Jul 9 16:49:13 2024 -0700 iommu/vt-d: Fix identity map bounds in si_domain_init() Intel IOMMU operates on inclusive bounds (both generally aas well as iommu_domain_identity_map()). Meanwhile, for_each_mem_pfn_range() uses exclusive bounds for end_pfn. This creates an off-by-one error when switching between the two. Fixes: c5395d5c4a82 ("intel-iommu: Clean up iommu_domain_identity_map()") Signed-off-by: Jon Pan-Doh Tested-by: Sudheer Dantuluri Suggested-by: Gary Zibrat Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240709234913.2749386-1-pandoh@google.com Signed-off-by: Will Deacon commit f0a23883fad4ec8a63faddb9639a92be2e007624 Merge: 60d2b2f3c474b 7816e58967d0e Author: Paolo Bonzini Date: Fri Jul 12 11:22:39 2024 -0400 Merge tag 'kvm-s390-next-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD Assortment of tiny fixes which are not time critical: - Rejecting memory region operations for ucontrol mode VMs - Rewind the PSW on host intercepts for VSIE - Remove unneeded include commit 9b2bc6b9a264b863a2273c02db5ee9e214e0a526 Author: Shameer Kolothum Date: Fri Jul 12 12:31:32 2024 +0100 iommu: Move IOMMU_DIRTY_NO_CLEAR define Fixes the compile issue when CONFIG_IOMMU_API is not set. Fixes: 4fe88fd8b4ae ("iommu/io-pgtable-arm: Add read_and_clear_dirty() support") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407121602.HL9ih1it-lkp@intel.com/ Signed-off-by: Shameer Kolothum Reviewed-by: Joao Martins Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240712113132.45100-1-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit 60d2b2f3c474b46f35c8bb47598e04ae6e44063f Merge: f3996d4d7996e e325618349cdc Author: Paolo Bonzini Date: Fri Jul 12 11:19:51 2024 -0400 Merge tag 'kvm-riscv-6.11-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.11 - Redirect AMO load/store access fault traps to guest - Perf kvm stat support for RISC-V - Use guest files for IMSIC virtualization, when available ONE_REG support for the Zimop, Zcmop, Zca, Zcf, Zcd, Zcb and Zawrs ISA extensions is coming through the RISC-V tree. commit f3996d4d7996ef3ccddf6bd47edfba07f35cc425 Merge: eb162c941c0bf 9ff0e37c68821 Author: Paolo Bonzini Date: Fri Jul 12 11:18:45 2024 -0400 Merge branch 'kvm-prefault' into HEAD Pre-population has been requested several times to mitigate KVM page faults during guest boot or after live migration. It is also required by TDX before filling in the initial guest memory with measured contents. Introduce it as a generic API. commit 9ff0e37c68821d1a6c482cb258ad3b4696f91254 Author: Isaku Yamahata Date: Wed Apr 10 15:07:36 2024 -0700 KVM: selftests: x86: Add test for KVM_PRE_FAULT_MEMORY Add a test case to exercise KVM_PRE_FAULT_MEMORY and run the guest to access the pre-populated area. It tests KVM_PRE_FAULT_MEMORY ioctl for KVM_X86_DEFAULT_VM and KVM_X86_SW_PROTECTED_VM. Signed-off-by: Isaku Yamahata Message-ID: <32427791ef42e5efaafb05d2ac37fa4372715f47.1712785629.git.isaku.yamahata@intel.com> Signed-off-by: Paolo Bonzini commit 6e01b7601dfed61bcccd8c386c5084fc0d53d20b Author: Paolo Bonzini Date: Tue Jun 11 03:57:58 2024 -0400 KVM: x86: Implement kvm_arch_vcpu_pre_fault_memory() Wire KVM_PRE_FAULT_MEMORY ioctl to kvm_mmu_do_page_fault() to populate guest memory. It can be called right after KVM_CREATE_VCPU creates a vCPU, since at that point kvm_mmu_create() and kvm_init_mmu() are called and the vCPU is ready to invoke the KVM page fault handler. The helper function kvm_tdp_map_page() takes care of the logic to process RET_PF_* return values and convert them to success or errno. Signed-off-by: Isaku Yamahata Message-ID: <9b866a0ae7147f96571c439e75429a03dcb659b6.1712785629.git.isaku.yamahata@intel.com> Signed-off-by: Paolo Bonzini commit 58ef24699bcddfe3de0963c8f74ccf641ffe87f0 Author: Paolo Bonzini Date: Wed Jul 10 10:27:10 2024 -0400 KVM: x86/mmu: Make kvm_mmu_do_page_fault() return mapped level The guest memory population logic will need to know what page size or level (4K, 2M, ...) is mapped. Signed-off-by: Isaku Yamahata Message-ID: Signed-off-by: Paolo Bonzini commit f5e7f00cf1950c771987778444a6600b5f2d883a Author: Sean Christopherson Date: Wed Jun 12 12:59:06 2024 -0700 KVM: x86/mmu: Account pf_{fixed,emulate,spurious} in callers of "do page fault" Move the accounting of the result of kvm_mmu_do_page_fault() to its callers, as only pf_fixed is common to guest page faults and async #PFs, and upcoming support KVM_PRE_FAULT_MEMORY won't bump _any_ stats. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5186ec223b68cc5100035d605a730819f774932f Author: Sean Christopherson Date: Wed Jun 12 12:51:38 2024 -0700 KVM: x86/mmu: Bump pf_taken stat only in the "real" page fault handler Account stat.pf_taken in kvm_mmu_page_fault(), i.e. the actual page fault handler, instead of conditionally bumping it in kvm_mmu_do_page_fault(). The "real" page fault handler is the only path that should ever increment the number of taken page faults, as all other paths that "do page fault" are by definition not handling faults that occurred in the guest. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit bc1a5cd002116552db4c3541e91f8a5b1b0cf65d Author: Isaku Yamahata Date: Wed Apr 10 15:07:28 2024 -0700 KVM: Add KVM_PRE_FAULT_MEMORY vcpu ioctl to pre-populate guest memory Add a new ioctl KVM_PRE_FAULT_MEMORY in the KVM common code. It iterates on the memory range and calls the arch-specific function. The implementation is optional and enabled by a Kconfig symbol. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Reviewed-by: Rick Edgecombe Message-ID: <819322b8f25971f2b9933bfa4506e618508ad782.1712785629.git.isaku.yamahata@intel.com> Signed-off-by: Paolo Bonzini commit 9aed7a6c0b591801177c90137df43f244e2af9bb Author: Isaku Yamahata Date: Wed Apr 10 15:07:27 2024 -0700 KVM: Document KVM_PRE_FAULT_MEMORY ioctl Adds documentation of KVM_PRE_FAULT_MEMORY ioctl. [1] It populates guest memory. It doesn't do extra operations on the underlying technology-specific initialization [2]. For example, CoCo-related operations won't be performed. Concretely for TDX, this API won't invoke TDH.MEM.PAGE.ADD() or TDH.MR.EXTEND(). Vendor-specific APIs are required for such operations. The key point is to adapt of vcpu ioctl instead of VM ioctl. First, populating guest memory requires vcpu. If it is VM ioctl, we need to pick one vcpu somehow. Secondly, vcpu ioctl allows each vcpu to invoke this ioctl in parallel. It helps to scale regarding guest memory size, e.g., hundreds of GB. [1] https://lore.kernel.org/kvm/Zbrj5WKVgMsUFDtb@google.com/ [2] https://lore.kernel.org/kvm/Ze-TJh0BBOWm9spT@google.com/ Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Message-ID: <9a060293c9ad9a78f1d8994cfe1311e818e99257.1712785629.git.isaku.yamahata@intel.com> Signed-off-by: Paolo Bonzini commit eb162c941c0bf49e2e764191dcacad53edc4cbe1 Merge: 27e6a24a4cf3d c2f38f75fc89e Author: Paolo Bonzini Date: Fri Jul 12 11:16:05 2024 -0400 Merge branch 'kvm-tdx-prep-1-truncated' into HEAD A rename and refactoring extracted from the preparatory series for Intel TDX support in KVM's MMU. commit 27e6a24a4cf3d25421c0f6ebb7c39f45fc14d20f Author: Paolo Bonzini Date: Thu Jul 11 13:56:54 2024 -0400 mm, virt: merge AS_UNMOVABLE and AS_INACCESSIBLE The flags AS_UNMOVABLE and AS_INACCESSIBLE were both added just for guest_memfd; AS_UNMOVABLE is already in existing versions of Linux, while AS_INACCESSIBLE was acked for inclusion in 6.11. But really, they are the same thing: only guest_memfd uses them, at least for now, and guest_memfd pages are unmovable because they should not be accessed by the CPU. So merge them into one; use the AS_INACCESSIBLE name which is more comprehensive. At the same time, this fixes an embarrassing bug where AS_INACCESSIBLE was used as a bit mask, despite it being just a bit index. The bug was mostly benign, because AS_INACCESSIBLE's bit representation (1010) corresponded to setting AS_UNEVICTABLE (which is already set) and AS_ENOSPC (except no async writes can happen on the guest_memfd). So the AS_INACCESSIBLE flag simply had no effect. Fixes: 1d23040caa8b ("KVM: guest_memfd: Use AS_INACCESSIBLE when creating guest_memfd inode") Fixes: c72ceafbd12c ("mm: Introduce AS_INACCESSIBLE for encrypted/confidential memory") Cc: linux-mm@kvack.org Acked-by: Vlastimil Babka Acked-by: David Hildenbrand Tested-by: Michael Roth Reviewed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 2454075f8e2915cebbe52a1195631bc7efe2b7e1 Author: Alan Maguire Date: Fri Jul 12 10:28:59 2024 +0100 bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o As reported by Mirsad [1] we still see format warnings in kernel/bpf/btf.o at W=1 warning level: CC kernel/bpf/btf.o ./kernel/bpf/btf.c: In function ‘btf_type_seq_show_flags’: ./kernel/bpf/btf.c:7553:21: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format] 7553 | sseq.showfn = btf_seq_show; | ^ ./kernel/bpf/btf.c: In function ‘btf_type_snprintf_show’: ./kernel/bpf/btf.c:7604:31: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format] 7604 | ssnprintf.show.showfn = btf_snprintf_show; | ^ Combined with CONFIG_WERROR=y these can halt the build. The fix (annotating the structure field with __printf()) suggested by Mirsad resolves these. Apologies I missed this last time. No other W=1 warnings were observed in kernel/bpf after this fix. [1] https://lore.kernel.org/bpf/92c9d047-f058-400c-9c7d-81d4dc1ef71b@gmail.com/ Fixes: b3470da314fd ("bpf: annotate BTF show functions with __printf") Reported-by: Mirsad Todorovac Suggested-by: Mirsad Todorovac Signed-off-by: Alan Maguire Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240712092859.1390960-1-alan.maguire@oracle.com commit ff14bfb7bc0480c343356b82c126290a4774bcbe Author: Greg Kroah-Hartman Date: Fri Jul 12 16:41:47 2024 +0200 misc: delete Makefile.rej I accidentally added drivers/misc/Makefile.rej when applying the mrvl-cn10k-dpi by hand. Remove it as it's not needed. Reported-by: Stephen Rothwell Fixes: 5f67eef6dff3 ("misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver") Signed-off-by: Greg Kroah-Hartman commit 75ed63a5ab5d1d2872c735bc7edf8fef0e2fa2ea Author: Shenghao Ding Date: Wed Jul 10 14:42:37 2024 +0800 ASoC: tas2781: Add new Kontrol to set tas2563 digital Volume Requriment from customer to add new kcontrol to set tas2563 digital Volume Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240710064238.1480-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 4bdc3eaa102b6bedb0800f76f53eca516d5cf20c Author: Chris Packham Date: Wed Jul 10 16:35:21 2024 +1200 clocksource/drivers/realtek: Add timer driver for rtl-otto platforms The timer/counter block on the Realtek SoCs provides up to 5 timers. It also includes a watchdog timer which is handled by the realtek_otto_wdt.c driver. One timer will be used per CPU as a local clock event generator. An additional timer will be used as an overal stable clocksource. Signed-off-by: Markus Stockhausen Signed-off-by: Sander Vanheule Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20240710043524.1535151-8-chris.packham@alliedtelesis.co.nz Signed-off-by: Daniel Lezcano commit 128f44f788cab8cab53edf9fa35eccbaa48fb4b2 Author: Chris Packham Date: Wed Jul 10 16:35:19 2024 +1200 dt-bindings: timer: Add schema for realtek,otto-timer Add the devicetree schema for the realtek,otto-timer present on a number of Realtek SoCs. Signed-off-by: Chris Packham Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240710043524.1535151-6-chris.packham@alliedtelesis.co.nz Signed-off-by: Daniel Lezcano commit f24c0d6a50ebcc154bded7f40c997edc2064043e Author: Thomas Bonnefille Date: Tue Jul 9 12:07:17 2024 +0200 dt-bindings: timer: Add SOPHGO SG2002 clint Add compatible string for SOPHGO SG2002 Core-Local Interrupt Controller. Signed-off-by: Thomas Bonnefille Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240709-sg2002-v3-2-af779c3d139d@bootlin.com Signed-off-by: Daniel Lezcano commit f124a52ab88986dc21c88bfbbcefbfb262ce47f9 Author: Geert Uytterhoeven Date: Wed May 29 14:22:06 2024 +0200 dt-bindings: timer: renesas,tmu: Add R-Car Gen2 support Document support for the Timer Unit (TMU) on R-Car Gen2 SoCs. Signed-off-by: Geert Uytterhoeven Acked-by: Conor Dooley Reviewed-by: Niklas Söderlund Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/de215e00e180c266527b7bd7cff5f75df918da98.1716985096.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano commit c1028676dc859fbef9de21f0312df347cab515ba Author: Geert Uytterhoeven Date: Wed May 29 14:22:05 2024 +0200 dt-bindings: timer: renesas,tmu: Add RZ/G1 support Document support for the Timer Unit (TMU) on RZ/G1 SoCs. Signed-off-by: Geert Uytterhoeven Acked-by: Conor Dooley Reviewed-by: Niklas Söderlund Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/bdc30850526f448b8480d9a5e65e35739f416771.1716985096.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano commit 17c103b59c3b995eb9d2944067593f2c9cc13652 Author: Geert Uytterhoeven Date: Wed May 29 14:22:04 2024 +0200 dt-bindings: timer: renesas,tmu: Add R-Mobile APE6 support Document support for the Timer Unit (TMU) on the R-Mobile APE6 (R8A73A4) Soc. Signed-off-by: Geert Uytterhoeven Acked-by: Conor Dooley Reviewed-by: Niklas Söderlund Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/17e3fd5f27ab540c8611545ad3dc5a697ca66c58.1716985096.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano commit 5e4bfd66eccaaab65b3d565cfe28483afeacaf1d Author: Jiaxun Yang Date: Wed Jun 12 09:54:34 2024 +0100 clocksource/drivers/mips-gic-timer: Correct sched_clock width Counter width of GIC is configurable and can be read from a register. Use width value from the register for sched_clock. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jiaxun Yang Link: https://lore.kernel.org/r/20240612-mips-clks-v2-7-a57e6f49f3db@flygoat.com Signed-off-by: Daniel Lezcano commit cc9b2c590ebacf656bb2063c2f6cbfb7ad7081f3 Author: Jiaxun Yang Date: Wed Jun 12 09:54:33 2024 +0100 clocksource/drivers/mips-gic-timer: Refine rating computation It is a good clocksource which usually go as fast as CPU core and have a low access latency, so raise the base of rating from Good to desired when we know that it has a stable frequency. Increase frequency addend dividend to 10000000 (10MHz) to reasonably accommodate multi GHz level clock, also cap rating within current level. Signed-off-by: Jiaxun Yang Link: https://lore.kernel.org/r/20240612-mips-clks-v2-6-a57e6f49f3db@flygoat.com Signed-off-by: Daniel Lezcano commit db19d3aa77612983a02bd223b3f273f896b243cf Author: Niklas Söderlund Date: Tue Jul 2 21:02:30 2024 +0200 clocksource/drivers/sh_cmt: Address race condition for clock events There is a race condition in the CMT interrupt handler. In the interrupt handler the driver sets a driver private flag, FLAG_IRQCONTEXT. This flag is used to indicate any call to set_next_event() should not be directly propagated to the device, but instead cached. This is done as the interrupt handler itself reprograms the device when needed before it completes and this avoids this operation to take place twice. It is unclear why this design was chosen, my suspicion is to allow the struct clock_event_device.event_handler callback, which is called while the FLAG_IRQCONTEXT is set, can update the next event without having to write to the device twice. Unfortunately there is a race between when the FLAG_IRQCONTEXT flag is set and later cleared where the interrupt handler have already started to write the next event to the device. If set_next_event() is called in this window the value is only cached in the driver but not written. This leads to the board to misbehave, or worse lockup and produce a splat. rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 0-...!: (0 ticks this GP) idle=f5e0/0/0x0 softirq=519/519 fqs=0 (false positive?) rcu: (detected by 1, t=6502 jiffies, g=-595, q=77 ncpus=2) Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.10.0-rc5-arm64-renesas-00019-g74a6f86eaf1c-dirty #20 Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : tick_check_broadcast_expired+0xc/0x40 lr : cpu_idle_poll.isra.0+0x8c/0x168 sp : ffff800081c63d70 x29: ffff800081c63d70 x28: 00000000580000c8 x27: 00000000bfee5610 x26: 0000000000000027 x25: 0000000000000000 x24: 0000000000000000 x23: ffff00007fbb9100 x22: ffff8000818f1008 x21: ffff8000800ef07c x20: ffff800081c79ec0 x19: ffff800081c70c28 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffc2c717d8 x14: 0000000000000000 x13: ffff000009c18080 x12: ffff8000825f7fc0 x11: 0000000000000000 x10: ffff8000818f3cd4 x9 : 0000000000000028 x8 : ffff800081c79ec0 x7 : ffff800081c73000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : ffff7ffffe286000 x3 : 0000000000000000 x2 : ffff7ffffe286000 x1 : ffff800082972900 x0 : ffff8000818f1008 Call trace: tick_check_broadcast_expired+0xc/0x40 do_idle+0x9c/0x280 cpu_startup_entry+0x34/0x40 kernel_init+0x0/0x11c do_one_initcall+0x0/0x260 __primary_switched+0x80/0x88 rcu: rcu_preempt kthread timer wakeup didn't happen for 6501 jiffies! g-595 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 rcu: Possible timer handling issue on cpu=0 timer-softirq=262 rcu: rcu_preempt kthread starved for 6502 jiffies! g-595 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0 rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_preempt state:I stack:0 pid:15 tgid:15 ppid:2 flags:0x00000008 Call trace: __switch_to+0xbc/0x100 __schedule+0x358/0xbe0 schedule+0x48/0x148 schedule_timeout+0xc4/0x138 rcu_gp_fqs_loop+0x12c/0x764 rcu_gp_kthread+0x208/0x298 kthread+0x10c/0x110 ret_from_fork+0x10/0x20 The design have been part of the driver since it was first merged in early 2009. It becomes increasingly harder to trigger the issue the older kernel version one tries. It only takes a few boots on v6.10-rc5, while hundreds of boots are needed to trigger it on v5.10. Close the race condition by using the CMT channel lock for the two competing sections. The channel lock was added to the driver after its initial design. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240702190230.3825292-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Daniel Lezcano commit f3539a6a6998e1e662fdb30af435f239d5931c98 Author: Li kunyu Date: Fri Jul 5 13:21:59 2024 +0800 clocksource/driver/arm_global_timer: Remove unnecessary ‘0’ values from err The 'err' variable is initialized whatever the code path, it is pointless to initialize it when it is declared. Signed-off-by: Li kunyu Link: https://lore.kernel.org/r/20240705052159.22235-1-kunyu@nfschina.com Signed-off-by: Daniel Lezcano commit 7cbbcbd4b5bb68a6208b872612bb301683dc7114 Author: Li kunyu Date: Fri Jul 5 12:07:29 2024 +0800 clocksource/drivers/arm_arch_timer: Remove unnecessary ‘0’ values from irq The irq variable is initialized whatever the code path, it is poinless to initialize when declaring it. Signed-off-by: Li kunyu Link: https://lore.kernel.org/r/20240705040729.21961-1-kunyu@nfschina.com Signed-off-by: Daniel Lezcano commit 216d04139a6d0ecaea9432178225b29d367da886 Author: Mohammad Rafi Shaik Date: Thu Jul 4 13:47:23 2024 +0530 ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply Remove separate handling for vdd-buck regulator supply which is not required. The vdd-buck regulator supply enabled using bulk enable. Add the error handling in wcd937x_probe() and disable the regulators in error case. Reported-by: Christophe JAILLET Closes: https://lore.kernel.org/linux-sound/834d31cc-f4bc-4db7-a25b-f9869e550eb6@wanadoo.fr/ Signed-off-by: Mohammad Rafi Shaik Link: https://patch.msgid.link/20240704081723.3394153-4-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit a5f727f423101efd60a27bccd7680df429cef38a Author: Mohammad Rafi Shaik Date: Thu Jul 4 13:47:22 2024 +0530 ASoC: codecs: wcd937x: Remove the string compare in MIC BIAS widget settings Remove the string compare with widget name in MIC BIAS settings, instead of string compare use the MIC BIAS id's. Reported-by: Srinivas Kandagatla Closes: https://lore.kernel.org/linux-sound/ba911ebd-aef5-46af-ace1-84d13bee6876@linaro.org/ Signed-off-by: Mohammad Rafi Shaik Link: https://patch.msgid.link/20240704081723.3394153-3-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 0ffc5a40ad21996c1c4b1d8a636c9051ea41a76e Author: Mohammad Rafi Shaik Date: Thu Jul 4 13:47:21 2024 +0530 ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable Fix the unbalanced pm_runtime_enable! in wcd937x-sdw soundwire slave. Fixes: c99a515ff153 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver") Signed-off-by: Mohammad Rafi Shaik Link: https://patch.msgid.link/20240704081723.3394153-2-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 3669716401921c4c545ac2998d7c67f9727ee056 Author: Rafael J. Wysocki Date: Thu Jul 11 14:39:02 2024 +0200 thermal: core: Add sanity checks for polling_delay and passive_delay If polling_delay is nonzero and passive_delay is greater than polling_delay, the thermal zone temperature will be updated less often when tz->passive is nonzero, which is not as expected. Make the thermal zone registration fail with -EINVAL in that case as this is a clear thermal zone configuration mistake. If polling_delay is nonzero and passive_delay is 0, which is regarded as a valid thermal zone configuration, the thermal zone will use polling except when tz->passive is nonzero. However, the expected behavior in that case is to continue temperature polling with the same delay value regardless of tz->passive, so set passive_delay to the polling_delay value then. Signed-off-by: Rafael J. Wysocki Reviewed-by: Daniel Lezcano Link: https://patch.msgid.link/5802156.DvuYhMxLoT@rjwysocki.net commit 5b674baa596e624fde8bf62b9a3d8a26eef399b2 Author: Rafael J. Wysocki Date: Tue Jul 2 16:44:27 2024 +0200 thermal: trip: Fold __thermal_zone_get_trip() into its caller Because __thermal_zone_get_trip() is only called by thermal_zone_get_trip() now, fold the former into the latter. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/22339769.EfDdHjke4D@rjwysocki.net commit 0728c810873e1a94e8b767f9809af940c9307d60 Author: Rafael J. Wysocki Date: Tue Jul 2 16:42:33 2024 +0200 thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback Out of several drivers implementing the .set_trip_temp() thermal zone operation, three don't actually use the trip ID argument passed to it, two call __thermal_zone_get_trip() to get a struct thermal_trip corresponding to the given trip ID, and the other use the trip ID as an index into their own data structures with the assumption that it will always match the ordering of entries in the trips table passed to the core during thermal zone registration, which is fragile and not really guaranteed. Even though the trip IDs used by the core are in fact their indices in the trips table passed to it by the thermal zone creator, that is purely a matter of convenience and should not be relied on for correctness. For this reason, modify trip_point_temp_store() to pass a (const) trip pointer to .set_trip_temp() and adjust the drivers implementing it accordingly. This helps to simplify the drivers invoking __thermal_zone_get_trip() from their .set_trip_temp() callback functions because they will not need to do it now and the other drivers can store their internal trip indices in the priv field in struct thermal_trip and their .set_trip_temp() callback functions can get those indices from there. The intel_quark_dts thermal driver can instead use the trip type to determine the requisite trip index. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/8392906.T7Z3S40VBb@rjwysocki.net [ rjw: Add missing colon and 2 empty code lines ] [ rjw: Add missing change in imx_thermal.c and adjust the changelog ] [ rjw: Drop an unused local variable ] Signed-off-by: Rafael J. Wysocki commit 595572aae3d0c3bf295ea759b74b948e7493a9ff Author: Lu Baolu Date: Fri Jul 12 10:58:19 2024 +0800 iommufd: Fix error pointer checking Smatch static checker reported below warning: drivers/iommu/iommufd/fault.c:131 iommufd_device_get_attach_handle() warn: 'handle' is an error pointer or valid Fix it by checking 'handle' with IS_ERR(). Fixes: b7d8833677ba ("iommufd: Fault-capable hwpt attach/detach/replace") Link: https://lore.kernel.org/r/20240712025819.63147-1-baolu.lu@linux.intel.com Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-iommu/8bb4f37a-4514-4dea-aabb-7380be303895@stanley.mountain/ Signed-off-by: Lu Baolu Signed-off-by: Jason Gunthorpe commit 338a93cf4a18c2036b567e9f613367f7a52f2511 Author: Jeremy Kerr Date: Wed Jul 10 10:17:22 2024 +0800 net: mctp-i2c: invalidate flows immediately on TX errors If we encounter an error on i2c packet transmit, we won't have a valid flow anymore; since we didn't transmit a valid packet sequence, we'll have to wait for the key to timeout instead of dropping it on the reply. This causes the i2c lock to be held for longer than necessary. Instead, invalidate the flow on TX error, and release the i2c lock immediately. Cc: Bonnie Lo Tested-by: Jerry C Chen Signed-off-by: Jeremy Kerr Signed-off-by: David S. Miller commit d73cf5ff743b5a8de6fa20651baba5bd56ba98a3 Author: Lu Baolu Date: Wed Jul 10 16:33:40 2024 +0800 iommufd: Add check on user response code The response code from user space is only allowed to be SUCCESS or INVALID. All other values are treated by the device as a response code of Response Failure according to PCI spec, section 10.4.2.1. This response disables the Page Request Interface for the Function. Add a check in iommufd_fault_fops_write() to avoid invalid response code. Fixes: 07838f7fd529 ("iommufd: Add iommufd fault object") Link: https://lore.kernel.org/r/20240710083341.44617-3-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit cc5049007d722364bca4a4eeb619d5629733a004 Author: Andrew Halaney Date: Wed Jul 10 10:36:14 2024 -0500 arm64: dts: ti: k3-j784s4-evm: Consolidate serdes0 references Subnodes were added to serdes0 in two different spots (due to independent development of their consumer usage). Let's go ahead and combine those into one reference for readability's sake. Signed-off-by: Andrew Halaney Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240710-k3-j784s4-evm-serdes0-cleanup-v1-2-03850fe33922@redhat.com Signed-off-by: Vignesh Raghavendra commit 84f78178b6fe37b5eb8b90b5bb1239abce0b64d8 Author: Andrew Halaney Date: Wed Jul 10 10:36:13 2024 -0500 arm64: dts: ti: k3-j784s4-evm: Assign only lanes 0 and 1 to PCIe1 Currently PCIe1 is setup to use SERDES0 lanes 0 thru 3, and USB0 is setup to use SERDES0 lane 3 as well. This overlap in lanes causes the following reset related lane splat: [ 4.846266] WARNING: CPU: 4 PID: 308 at drivers/reset/core.c:792 __reset_control_get_internal+0x128/0x160 ... [ 4.846405] Call trace: [ 4.846407] __reset_control_get_internal+0x128/0x160 [ 4.846413] __of_reset_control_get+0x4e0/0x528 [ 4.846418] of_reset_control_array_get+0xa4/0x1f8 [ 4.846423] cdns_torrent_phy_probe+0xbc8/0x1068 [phy_cadence_torrent] [ 4.846445] platform_probe+0xb4/0xe8 ... [ 4.846577] cdns-torrent-phy 5060000.serdes: phy@0: failed to get reset Let's limit the PCIe1 SERDES0 lanes to 0 and 1 to avoid overlap here. This works since PCIe1 operates in x2 mode and doesn't need 4 SERDES0 lanes. Fixes: 27ce26fe52d4 ("arm64: dts: ti: k3-j784s4-evm: Enable PCIe0 and PCIe1 in RC Mode") Suggested-by: Siddharth Vadapalli Signed-off-by: Andrew Halaney Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240710-k3-j784s4-evm-serdes0-cleanup-v1-1-03850fe33922@redhat.com Signed-off-by: Vignesh Raghavendra commit 74beefb5935a67f9fa60f8103e3f69d42d6a08d7 Author: Chris Packham Date: Wed Jul 10 16:35:24 2024 +1200 mips: dts: realtek: Add RTL9302C board Add support for the RTL9302 SoC and the RTL9302C_2xRTL8224_2XGE reference board. The RTL930x family of SoCs are Realtek switches with an embedded MIPS core (800MHz 34Kc). Most of the peripherals are similar to the RTL838x SoC and can make use of many existing drivers. Add in full DSA switch support is still a work in progress. Signed-off-by: Chris Packham Signed-off-by: Thomas Bogendoerfer commit 662c0002ca2e1379d0e80be1a4e07ab47c9eee48 Author: Chris Packham Date: Wed Jul 10 16:35:23 2024 +1200 mips: generic: add fdt fixup for Realtek reference board The bootloader used on the Realtek RTL9302C boards is an ancient vendor fork of U-Boot that doesn't understand device trees. So to run a modern kernel it is necessary use one of the APPENDED_DTB options. When appending the DTB the inintrd information, if present, needs to be inserted into the /chosen device tree node. The bootloader provides the initrd start/size via the firmware environment. Add a fdt fixup that will update the device tree with the initrd information. Signed-off-by: Chris Packham Signed-off-by: Thomas Bogendoerfer commit 62b8db3afe3e93dd14baeddf081fe1200d5610e3 Author: Chris Packham Date: Wed Jul 10 16:35:22 2024 +1200 mips: select REALTEK_OTTO_TIMER for Realtek platforms When MACH_REALTEK_RTL is selected automatically select the REALTEK_OTTO_TIMER option in order to support the Realtek platforms that require it. Signed-off-by: Chris Packham Signed-off-by: Thomas Bogendoerfer commit 371c358d523f3e6878587ddb16dd61a4a89bef9e Author: Chris Packham Date: Wed Jul 10 16:35:20 2024 +1200 dt-bindings: interrupt-controller: realtek,rtl-intc: Add rtl9300-intc Add a compatible string for the interrupt controller found on the rtl930x SoCs. The interrupt controller has registers for VPE1 so these are added as a second reg cell. Signed-off-by: Chris Packham Reviewed-by: Rob Herring (Arm) Signed-off-by: Thomas Bogendoerfer commit 93eed6356d9ed26011f979ceb613c8ef3963cd10 Author: Chris Packham Date: Wed Jul 10 16:35:18 2024 +1200 dt-bindings: mips: realtek: Add rtl930x-soc compatible Add the rtl9302 SoC and the Cameo RTL9302C_2xRTL8224_2XGE reference board to the list of Realtek compatible strings. Signed-off-by: Chris Packham Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit a9b516f3e92688a3d0f84a4dbaffb2b73b652348 Author: Chris Packham Date: Wed Jul 10 16:35:17 2024 +1200 dt-bindings: vendor-prefixes: Add Cameo Communications Add entry for Cameo Communications (https://www.cameo.com.tw/) Signed-off-by: Chris Packham Acked-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit 75eb0cbe6e2220feffc7c6219b7dc80c56068bb9 Author: Chris Packham Date: Wed Jul 10 16:35:16 2024 +1200 mips: dts: realtek: add device_type property to cpu node Add device_type = "cpu" to the cpu node for the rtl838x SoC. This resolves the following dtbs_check complaint: cpus: cpu@0: 'cache-level' is a required property Signed-off-by: Chris Packham Reviewed-by: Marek Behún Signed-off-by: Thomas Bogendoerfer commit b1428c6860af10649cead288b8fc81efec6115c2 Author: Chris Packham Date: Wed Jul 10 16:35:15 2024 +1200 mips: dts: realtek: use "serial" instead of "uart" in node name Update the node name for the UARTs to resolve the following dtbs_check complaints: uart@2000: $nodename:0: 'uart@2000' does not match '^serial(@.*)?$' uart@2100: $nodename:0: 'uart@2100' does not match '^serial(@.*)?$' Signed-off-by: Chris Packham Reviewed-by: Marek Behún Signed-off-by: Thomas Bogendoerfer commit 59649de96f21dfb0518faa8feaa3d05c2d81b042 Author: Jiaxun Yang Date: Wed Jun 12 09:38:19 2024 +0100 MIPS: Implement ieee754 NAN2008 emulation mode Implement ieee754 NAN2008 emulation mode. When this mode is enabled, kernel will accept ELF file compiled for both NaN 2008 and NaN legacy, but if hardware does not have capability to match ELF's NaN mode, __own_fpu will fail for corresponding thread and fpuemu will then kick in. This mode trade performance for correctness, while maintaining support for both NaN mode regardless of hardware capability. It is useful for multilib installation that have both types of binary exist in system. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 9c7a86c935074525f24cc20e78a7d5150e4600e3 Author: Hauke Mehrtens Date: Tue Jul 9 00:23:04 2024 +0200 MIPS: lantiq: improve USB initialization This adds code to initialize the USB controller and PHY also on Danube, Amazon SE and AR10. This code is based on the Vendor driver from different UGW versions and compared to the hardware documentation. This patch is included in OpenWrt for many years. Signed-off-by: Hauke Mehrtens Signed-off-by: Thomas Bogendoerfer commit b8ddb0df30f9f6e70422f1e705b7416da115bd24 Author: Christoph Müllner Date: Fri Apr 26 12:08:23 2024 +0200 riscv: Add Zawrs support for spinlocks RISC-V code uses the generic ticket lock implementation, which calls the macros smp_cond_load_relaxed() and smp_cond_load_acquire(). Introduce a RISC-V specific implementation of smp_cond_load_relaxed() which applies WRS.NTO of the Zawrs extension in order to reduce power consumption while waiting and allows hypervisors to enable guests to trap while waiting. smp_cond_load_acquire() doesn't need a RISC-V specific implementation as the generic implementation is based on smp_cond_load_relaxed() and smp_acquire__after_ctrl_dep() sufficiently provides the acquire semantics. This implementation is heavily based on Arm's approach which is the approach Andrea Parri also suggested. The Zawrs specification can be found here: https://github.com/riscv/riscv-zawrs/blob/main/zawrs.adoc Signed-off-by: Christoph Müllner Co-developed-by: Andrew Jones Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20240426100820.14762-11-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 6d5852811600086f0a227a4d646b2a20b4dfe533 Author: Andrew Jones Date: Fri Apr 26 12:08:22 2024 +0200 dt-bindings: riscv: Add Zawrs ISA extension description Add description for the Zawrs (Wait-on-Reservation-Set) ISA extension which was ratified in commit 98918c844281 of riscv-isa-manual. Signed-off-by: Andrew Jones Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240426100820.14762-10-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 6da111574baffb3399a6bd03a98b269eac9713f2 Author: Andrew Jones Date: Fri Apr 26 12:08:21 2024 +0200 riscv: Provide a definition for 'pause' If we're going to provide the encoding for 'pause' in cpu_relax() anyway, then we can drop the toolchain checks and just always use it. The advantage of doing this is that other code that need pause don't need to also define it (yes, another use is coming). Add the definition to insn-def.h since it's an instruction definition and also because insn-def.h doesn't include much, so it's safe to include from asm/vdso/processor.h without concern for circular dependencies. Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20240426100820.14762-9-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 31643d84b8c3d9c846aa0e20bc033e46c68c7e7d Author: Carlos Llamas Date: Thu Jul 11 20:14:51 2024 +0000 binder: fix hang of unregistered readers With the introduction of binder_available_for_proc_work_ilocked() in commit 1b77e9dcc3da ("ANDROID: binder: remove proc waitqueue") a binder thread can only "wait_for_proc_work" after its thread->looper has been marked as BINDER_LOOPER_STATE_{ENTERED|REGISTERED}. This means an unregistered reader risks waiting indefinitely for work since it never gets added to the proc->waiting_threads. If there are no further references to its waitqueue either the task will hang. The same applies to readers using the (e)poll interface. I couldn't find the rationale behind this restriction. So this patch restores the previous behavior of allowing unregistered threads to "wait_for_proc_work". Note that an error message for this scenario, which had previously become unreachable, is now re-enabled. Fixes: 1b77e9dcc3da ("ANDROID: binder: remove proc waitqueue") Cc: stable@vger.kernel.org Cc: Martijn Coenen Cc: Arve Hjønnevåg Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20240711201452.2017543-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit b85e021853976aaebd3788e7e721020570754199 Author: Ciprian Costea Date: Mon Jul 8 15:10:18 2024 +0300 MAINTAINERS: add 's32@nxp.com' as relevant mailing list for 'sdhci-esdhc-imx' driver Since NXP S32G2 and S32G3 SoCs share the SDHCI controller with I.MX platforms it would be valuable to add 's32@nxp.com' as a relevant mailing list in this area. Signed-off-by: Ciprian Costea Acked-by: Adrian Hunter Acked-by: Haibo Chen Link: https://lore.kernel.org/r/20240708121018.246476-4-ciprianmarian.costea@oss.nxp.com Signed-off-by: Ulf Hansson commit 63e555d9bf76dc710842c13edb7d0986149f16a3 Author: Ciprian Costea Date: Mon Jul 8 15:10:17 2024 +0300 mmc: sdhci-esdhc-imx: obtain the 'per' clock rate after its enablement The I.MX SDHCI driver assumes that the frequency of the 'per' clock can be obtained even on disabled clocks, which is not always the case. According to 'clk_get_rate' documentation, it is only valid once the clock source has been enabled. Signed-off-by: Ciprian Costea Reviewed-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240708121018.246476-3-ciprianmarian.costea@oss.nxp.com Signed-off-by: Ulf Hansson commit a52b67bdf44cc673e3232b8456b2d85c9988fcad Author: Ciprian Costea Date: Mon Jul 8 15:10:16 2024 +0300 mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms In case of S32G based platforms, GPIO CD used for card detect wake mechanism is not available. For this scenario the newly introduced flag 'ESDHC_FLAG_SKIP_CD_WAKE' is used. Signed-off-by: Ciprian Costea Reviewed-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240708121018.246476-2-ciprianmarian.costea@oss.nxp.com Signed-off-by: Ulf Hansson commit e777798e67d9ba46cf56ad49919c1e86c5ee3213 Author: Petr Tesarik Date: Thu Jul 11 12:34:09 2024 +0200 sysfs/cpu: Make crash_hotplug attribute world-readable There is no reason to restrict access to this attribute, as it merely reports whether crash elfcorehdr is automatically updated on CPU hot plug/unplug and/or online/offline events. Note that since commit 79365026f8694 ("crash: add a new kexec flag for hotplug support"), this maps to the same flag which is world-accessible through /sys/devices/system/memory/crash_hotplug. Signed-off-by: Petr Tesarik Acked-by: Baoquan He Acked-by: Sourabh Jain Link: https://lore.kernel.org/r/20240711103409.319673-1-petr.tesarik@suse.com Signed-off-by: Greg Kroah-Hartman commit 1e02e317470b1c68d5971e51e8c62967ec1bc828 Author: Geert Uytterhoeven Date: Thu Jul 11 16:32:35 2024 +0200 platform: arm64: EC_LENOVO_YOGA_C630 should depend on ARCH_QCOM The Lenovo Yoga C630 Embedded Controller is only present on the Qualcomm Snapdragon-based Lenovo Yoga C630 laptop. Hence add a dependency on ARCH_QCOM, to prevent asking the user about this driver when configuring a kernel without Qualcomm SoC support. Signed-off-by: Geert Uytterhoeven Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/0e4c9ffdc8a5caffcda2afb8d5480900f7adebf6.1720707932.git.geert+renesas@glider.be Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b727493011123db329e2901e3abf81a8d146b6fe Author: Nícolas F. R. A. Prado Date: Fri Jul 5 19:29:56 2024 -0400 kselftest: devices: Add test to detect device error logs Log errors are the most widely used mechanism for reporting issues in the kernel. When an error is logged using the device helpers, eg dev_err(), it gets metadata attached that identifies the subsystem and device where the message is coming from. Introduce a new test that makes use of that metadata to report which devices logged errors (or more critical messages). Signed-off-by: Nícolas F. R. A. Prado Acked-by: Shuah Khan Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240705-dev-err-log-selftest-v2-3-163b9cd7b3c1@collabora.com Signed-off-by: Greg Kroah-Hartman commit 0e7b7bde460304f44e8c6b212c3195ac2f69f6fe Author: Nícolas F. R. A. Prado Date: Fri Jul 5 19:29:55 2024 -0400 kselftest: Move ksft helper module to common directory Move the ksft python module, which provides generic helpers for kselftests, to a common directory so it can be more easily shared between different tests. Signed-off-by: Nícolas F. R. A. Prado Acked-by: Shuah Khan Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240705-dev-err-log-selftest-v2-2-163b9cd7b3c1@collabora.com Signed-off-by: Greg Kroah-Hartman commit 0debb20c5c812f8750c20c3406bc94a1e8ea4742 Author: Nícolas F. R. A. Prado Date: Fri Jul 5 19:29:54 2024 -0400 kselftest: devices: Move discoverable devices test to subdirectory Move the discoverable devices test to a subdirectory to allow other related tests to be added to the devices directory. Signed-off-by: Nícolas F. R. A. Prado Acked-by: Shuah Khan Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240705-dev-err-log-selftest-v2-1-163b9cd7b3c1@collabora.com Signed-off-by: Greg Kroah-Hartman commit 03b927565057dae39da3e4b46e5ab65274b5dcdc Author: Geert Uytterhoeven Date: Thu Jul 11 16:30:36 2024 +0200 platform: arm64: EC_ACER_ASPIRE1 should depend on ARCH_QCOM The Acer Aspire 1 Embedded Controller is only present on the Qualcomm Snapdragon-based Acer Aspire 1 laptop. Hence add a dependency on ARCH_QCOM, to prevent asking the user about this driver when configuring a kernel without Qualcomm SoC support. Signed-off-by: Geert Uytterhoeven Reviewed-by: Hans de Goede Acked-by: Nikita Travkin Link: https://lore.kernel.org/r/f5f38709c01d369ed9e375ceb2a9a12986457a1a.1720707932.git.geert+renesas@glider.be Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a5e43e2d202de39196de9fba689c34f8270782eb Author: Vamsi Attunuru Date: Thu Jul 11 05:01:15 2024 -0700 misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI DPI hardware is an on-chip PCIe device on Marvell's arm64 SoC platforms. As Arnd suggested, CN10K belongs to ARCH_THUNDER lineage. Patch makes mrvl_cn10k_dpi driver dependent on CONFIG_ARCH_THUNDER. Signed-off-by: Vamsi Attunuru Link: https://lore.kernel.org/r/20240711120115.4069401-1-vattunuru@marvell.com Signed-off-by: Greg Kroah-Hartman commit 89067019d7dbc65d86cf3a4d8f84ed2ad4bed12b Author: Jeff Johnson Date: Sun Jun 2 13:25:28 2024 -0700 virtio: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/virtio/virtio_dma_buf.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-virtio_dma_buf-v1-1-ce602d47e257@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 15eec4e1d07229fe570ad3a1344ad4a39d26106b Author: Jeff Johnson Date: Sat Jun 15 14:01:12 2024 -0700 agp: uninorth: add missing MODULE_DESCRIPTION() macro With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/uninorth-agp.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20240615-md-powerpc-drivers-char-agp-v1-1-b79bfd07da42@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 5919d93fbecea729e6c1cfe96ea6360a1f146297 Author: Jeff Johnson Date: Sun Jun 9 17:40:17 2024 -0700 spmi: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/hisi-spmi-controller.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/spmi-pmic-arb.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240609-md-drivers-spmi-v1-1-f1d5b24e7a66@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 68a72104cbcf38ad16500216e213fa4eb21c4be2 Author: Stephen Rothwell Date: Tue Jul 9 16:37:15 2024 +1000 media: raspberrypi: Switch to remove_new The remove callback's return value is about to change from int to void, this is done by commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void"). Prepare for merging the patch by switching the PiSP driver from remove to remove_new callback. Fixes: 12187bd5d4f8 ("media: raspberrypi: Add support for PiSP BE") Signed-off-by: Stephen Rothwell Acked-by: Naushir Patuck Acked-by: Jacopo Mondi Signed-off-by: Sakari Ailus Reviewed-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 1c2c57bd439ecaffc728139a0a00701bee886d0a Author: Jacopo Mondi Date: Fri Jun 28 15:29:46 2024 +0200 media: uapi: pisp_be_config: Add extra config fields Complete the pisp_be_config strcture by adding fields that even if not written to the HW are relevant to complete the uAPI and put it in par with the BSP driver. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 639065c621df9bad9d94373084e1c568f81d34e0 Author: Jacopo Mondi Date: Fri Jun 28 15:29:45 2024 +0200 media: uapi: pisp_be_config: Re-sort pisp_be_tiles_config The order of the members of pisp_be_tiles_config is relevant as the driver logic assumes 'config' to be at offset 0. Re-sort the member to match the driver's expectations. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Acked-by: Naushir Patuck Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f5cee94f2dfe5b7625452b831f7629369ce68a7b Author: Jacopo Mondi Date: Fri Jun 28 15:29:44 2024 +0200 media: uapi: pisp_common: Capitalize all macros The macro used to inspect an image format characteristic use a mixture of capitalized and non-capitalized letters, which is rather unusual for the Linux kernel style. Capitalize all identifiers. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1991a09e6d7c1dff5efea65b5b31082332f2e64e Author: Jacopo Mondi Date: Fri Jun 28 15:29:43 2024 +0200 media: uapi: pisp_common: Add 32 bpp format test Add definition and test for 32-bits image formats to the pisp_common.h uAPI header. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Acked-by: David Plowman Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 79cf9c6ee44e0af7e1383365d29c64eece6665bb Author: Jacopo Mondi Date: Fri Jun 28 15:29:42 2024 +0200 media: uapi: pisp_be_config: Drop BIT() from uAPI The pisp_be_config.h uAPI header file contains a bit-field definition that uses the BIT() helper macro. As the BIT() identifier is not defined in userspace, drop it from the uAPI header. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4a2ebb082297f41803742729642961532e54079e Author: Kees Cook Date: Thu Jul 11 10:11:13 2024 -0700 efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array While efi_memory_attributes_table_t::entry isn't used directly as an array, it is used as a base for pointer arithmetic. The type is wrong as it's not technically an array of efi_memory_desc_t's; they could be larger. Regardless, leave the type unchanged and remove the old style "0" array size. Additionally replace the open-coded entry offset code with the existing efi_memdesc_ptr() helper. Signed-off-by: Kees Cook Signed-off-by: Ard Biesheuvel commit 887c4cf5594a073fd60c0df84150eb06d78c6406 Author: Kees Cook Date: Thu Jul 11 10:11:12 2024 -0700 efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr() The "early" part of the helper's name isn't accurate[1]. Drop it in preparation for adding a new (not early) usage. Suggested-by: Ard Biesheuvel Link: https://lore.kernel.org/lkml/CAMj1kXEyDjH0uu3Z4eBesV3PEnKGi5ArXXMp7R-hn8HdRytiPg@mail.gmail.com [1] Signed-off-by: Kees Cook Signed-off-by: Ard Biesheuvel commit b0eed397623f897d3ccac9bda2bd2f53331b571a Author: Christian Marangi Date: Fri Jul 12 02:45:54 2024 +0200 leds: leds-lp5569: Enable chip after chip configuration Documentation say that clock internal config needs to be set BEFORE chip is enabled. Align code to this and move the CHIP enable after the CHIP is configured. While at it also make use of STATUS reg and check when STARTUP is completed instead of sleep for 1-2 ms. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240712004556.15601-3-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 2a498d626df7e8d97e798799ebbc30d0482d52e8 Author: Christian Marangi Date: Fri Jul 12 02:45:53 2024 +0200 leds: leds-lp5569: Better handle enabling clock internal setting Better handle enabling clock internal setting. In further testing it was notice that internal clock config MUST be set before clock output config or the LED CHIP might stop working. This wasn't documented and was actually found on devices that have 2 chip chained where one chip provide clock for the other. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240712004556.15601-2-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 9c5fd279255cacc5a759e77a7eb1824d708b21d2 Author: Christian Marangi Date: Fri Jul 12 02:45:52 2024 +0200 leds: leds-lp5569: Fix typo in driver name Remove extra x from driver name as this was a typo from copy-paste error. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240712004556.15601-1-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 1a7b7326d587c9a5e8ff067e70d6aaf0333f4bb3 Author: Christophe Leroy Date: Fri Jul 12 07:51:58 2024 +0200 vmlinux.lds.h: catch .bss..L* sections into BSS") Commit 9a427556fb8e ("vmlinux.lds.h: catch compound literals into data and BSS") added catches for .data..L* and .rodata..L* but missed .bss..L* Since commit 5431fdd2c181 ("ptrace: Convert ptrace_attach() to use lock guards") the following appears at build: LD .tmp_vmlinux.kallsyms1 powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33' NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.S LD .tmp_vmlinux.kallsyms2 powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33' NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.S LD vmlinux powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33' Lets add .bss..L* to BSS_MAIN macro to catch those sections into BSS. Fixes: 9a427556fb8e ("vmlinux.lds.h: catch compound literals into data and BSS") Signed-off-by: Christophe Leroy Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404031349.nmKhyuUG-lkp@intel.com/ Signed-off-by: Arnd Bergmann commit 447bc4b1906f100e65c662528b7ae4e1dc2e9b80 Author: Mike Yu Date: Fri Jul 12 10:51:25 2024 +0800 xfrm: Support crypto offload for outbound IPv4 UDP-encapsulated ESP packet esp_xmit() is already able to handle UDP encapsulation through the call to esp_output_head(). However, the ESP header and the outer IP header are not correct and need to be corrected. Test: Enabled both dir=in/out IPsec crypto offload, and verified IPv4 UDP-encapsulated ESP packets on both wifi/cellular network Signed-off-by: Mike Yu Signed-off-by: Steffen Klassert commit 4ecbac84b5b8c4ad033b473782582568810baf61 Author: Mike Yu Date: Fri Jul 12 10:51:24 2024 +0800 xfrm: Support crypto offload for inbound IPv4 UDP-encapsulated ESP packet If xfrm_input() is called with UDP_ENCAP_ESPINUDP, the packet is already processed in UDP layer that removes the UDP header. Therefore, there should be no much difference to treat it as an ESP packet in the XFRM stack. Test: Enabled dir=in IPsec crypto offload, and verified IPv4 UDP-encapsulated ESP packets on both wifi/cellular network Signed-off-by: Mike Yu Signed-off-by: Steffen Klassert commit a10fb4a84a693891b2e205684456d0825363fc24 Author: Mike Yu Date: Fri Jul 12 10:51:23 2024 +0800 xfrm: Allow UDP encapsulation in crypto offload control path Unblock this limitation so that SAs with encapsulation specified can be passed to HW drivers. HW drivers can still reject the SA in their implementation of xdo_dev_state_add if the encapsulation is not supported. Test: Verified on Android device Signed-off-by: Mike Yu Signed-off-by: Steffen Klassert commit f7e8542d71e908706855a9f3e9e7844fea1feea0 Author: Mike Yu Date: Fri Jul 12 10:51:22 2024 +0800 xfrm: Support crypto offload for inbound IPv6 ESP packets not in GRO path IPsec crypt offload supports outbound IPv6 ESP packets, but it doesn't support inbound IPv6 ESP packets. This change enables the crypto offload for inbound IPv6 ESP packets that are not handled through GRO code path. If HW drivers add the offload information to the skb, the packet will be handled in the crypto offload rx code path. Apart from the change in crypto offload rx code path, the change in xfrm_policy_check is also needed. Exampe of RX data path: +-----------+ +-------+ | HW Driver |-->| wlan0 |--------+ +-----------+ +-------+ | v +---------------+ +------+ +------>| Network Stack |-->| Apps | | +---------------+ +------+ | | | v +--------+ +------------+ | ipsec1 |<--| XFRM Stack | +--------+ +------------+ Test: Enabled both in/out IPsec crypto offload, and verified IPv6 ESP packets on Android device on both wifi/cellular network Signed-off-by: Mike Yu Signed-off-by: Steffen Klassert commit 06dcc4c9baa9e92896f00d02ffa760c0988b4371 Author: Takashi Sakamoto Date: Fri Jul 12 09:30:10 2024 +0900 firewire: core: move copy_port_status() helper function to TP_fast_assign() block It would be possible to put any statement in TP_fast_assign(). This commit obsoletes the helper function and put its statements to TP_fast_assign() for the code simplicity. Link: https://lore.kernel.org/r/20240712003010.87341-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 8b68788bebd3f697ae62aa9af3dac35ed112ebd7 Merge: 85e23c6620745 dc1000bf463d1 Author: Dave Airlie Date: Fri Jul 12 13:25:17 2024 +1000 Merge tag 'amd-drm-fixes-6.10-2024-07-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.10-2024-07-11: amdgpu: - PSR-SU fix - Reseved VMID fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240712005534.803064-1-alexander.deucher@amd.com commit 85e23c6620745c6c0a764ded52f3d775ee767eb6 Merge: 94e068cf9c4ae 609458abd5a10 Author: Dave Airlie Date: Fri Jul 12 13:16:25 2024 +1000 Merge tag 'drm-xe-fixes-2024-07-11' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: - Use write-back caching mode for system memory on DGFX (Thomas) Driver Changes: - Do not leak object when finalizing hdcp gsc (Nirmoy) Signed-off-by: Dave Airlie From: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/vgqz35btnxdddko3byrgww5ii36wig2tvondg2p3j3b3ourj4i@rqgolll3wwkh commit c58c39163a7e2c4c8885c57e4e74931c7b482e53 Author: Nathan Chancellor Date: Thu Jun 20 08:48:16 2024 -0700 drm/omap: Restrict compile testing to PAGE_SIZE less than 64KB Prior to commit dc6fcaaba5a5 ("drm/omap: Allow build with COMPILE_TEST=y"), it was only possible to build the omapdrm driver with a 4KB page size. After that change, when the PAGE_SIZE is 64KB or larger, clang points out that the driver has some assumptions around the page size implicitly by passing PAGE_SIZE to a parameter with a type of u16: drivers/gpu/drm/omapdrm/omap_gem.c:758:7: error: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Werror,-Wconstant-conversion] 757 | block = tiler_reserve_2d(fmt, omap_obj->width, omap_obj->height, | ~~~~~~~~~~~~~~~~ 758 | PAGE_SIZE); | ^~~~~~~~~ arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE' 25 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) | ~~~~~~~~~~~~~^~~~~~~~~~~~~ drivers/gpu/drm/omapdrm/omap_gem.c:1504:44: error: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Werror,-Wconstant-conversion] 1504 | block = tiler_reserve_2d(fmts[i], w, h, PAGE_SIZE); | ~~~~~~~~~~~~~~~~ ^~~~~~~~~ arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE' 25 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) | ~~~~~~~~~~~~~^~~~~~~~~~~~~ 2 errors generated. As there is a lot of use of a u16 type throughout this driver and it will only ever be run on hardware that has a 4KB page size, just restrict compile testing to when the page size is less than 64KB (as no other issues have been discussed and it keeps compile testing relatively more available). Signed-off-by: Nathan Chancellor Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20240620-omapdrm-restrict-compile-test-to-sub-64kb-page-size-v1-1-5e56de71ffca@kernel.org commit 2146b7dd354c2a1384381ca3cd5751bfff6137d6 Author: James Chapman Date: Tue Jul 9 17:28:39 2024 +0100 l2tp: fix l2tp_session_register with colliding l2tpv3 IDs When handling colliding L2TPv3 session IDs, we use the existing session IDR entry and link the new session on that using session->coll_list. However, when using an existing IDR entry, we must not do the idr_replace step. Fixes: aa5e17e1f5ec ("l2tp: store l2tpv3 sessions in per-net IDR") Signed-off-by: James Chapman Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 864204e467e40621bb8b8009d2931558146a3e9a Merge: 38e73004c2b53 26d289158e491 Author: Dave Airlie Date: Fri Jul 12 12:52:15 2024 +1000 Merge tag 'drm-xe-next-fixes-2024-07-11' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next UAPI Changes: - Rename xe perf layer as xe observation layer (Ashutosh) Driver Changes: - Drop trace_xe_hw_fence_free (Brost) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Zo_3ustogPDVKZwu@intel.com commit 38e73004c2b537f79789347a8c381c8efc502480 Merge: 62a05f4ae9c1f c537fb4e3d36e Author: Dave Airlie Date: Fri Jul 12 10:42:16 2024 +1000 Merge tag 'drm-misc-next-fixes-2024-07-11' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next A fix for fbdev on big endian systems, a condition fix for a sharp panel at removal, and a fix for qxl to prevent unpinned buffer access under certain conditions. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240711-benign-rich-mouflon-2eeafe@houat commit b6c67967897e2e02482f7bbd26232090a6e30ae5 Author: Shigeru Yoshida Date: Tue Jul 9 23:36:32 2024 +0900 tipc: Consolidate redundant functions link_is_up() and tipc_link_is_up() have the same functionality. Consolidate these functions. Signed-off-by: Shigeru Yoshida Reviewed-by: Tung Nguyen Signed-off-by: David S. Miller commit 534ea0a95e2d7b31eb1e1248d04edaffed75e366 Author: Shigeru Yoshida Date: Tue Jul 9 23:34:10 2024 +0900 tipc: Remove unused struct declaration struct tipc_name_table in core.h is not used. Remove this declaration. Signed-off-by: Shigeru Yoshida Reviewed-by: Tung Nguyen Signed-off-by: David S. Miller commit 90e812ac40c4b813fdbafab22f426fe4cdf840a8 Author: Christophe Leroy Date: Thu Jul 11 12:50:21 2024 +0200 Documentation/powerpc: Mention 40x is removed Commit 732b32daef80 ("powerpc: Remove core support for 40x") removed 40x. Update documentation accordingly. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/c2d64bebc514ca892a12e51a68821a6317048d3a.1720694954.git.christophe.leroy@csgroup.eu commit 3efe19a9b15411119d4a35ec5790ad49f0a0234c Author: Christophe Leroy Date: Thu Jul 11 12:49:01 2024 +0200 powerpc: Remove 40x leftovers Remove stale references to 40x. Fixes: e939da89d024 ("powerpc: Remove 40x from Kconfig and defconfig") Fixes: 548f5244f106 ("powerpc/40x: Remove EP405") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/ab30ae302783d8617d407864b92db1b926ab5ab9.1720694914.git.christophe.leroy@csgroup.eu commit 2a4183f864dad50f84edb6b67a2807a438f944fd Merge: 5e724cb688a20 0066623d40085 Author: Jakub Kicinski Date: Thu Jul 11 18:32:52 2024 -0700 Merge branch 'netconsole-fix-potential-race-condition-and-improve-code-clarity' Breno Leitao says: ==================== netconsole: improve code clarity These changes aim to enhance the reliability of netconsole by eliminating the potential race condition and improve maintainability by making the code more straightforward to understand and modify. ==================== Link: https://patch.msgid.link/20240709144403.544099-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 0066623d40085bb5d0af8d645a3bba27fc5cfced Author: Breno Leitao Date: Tue Jul 9 07:44:00 2024 -0700 net: netconsole: Eliminate redundant setting of enabled field When disabling a netconsole target, enabled_store() is called with enabled=false. Currently, this results in updating the nt->enabled field twice: 1. Inside the if/else block, with the target_list_lock spinlock held 2. Later, without the target_list_lock This patch eliminates the redundancy by setting the field only once, improving efficiency and reducing potential race conditions. Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240709144403.544099-3-leitao@debian.org Signed-off-by: Jakub Kicinski commit a9359e8b0065a76cc11791f668bce3e9c7bf4fef Author: Breno Leitao Date: Tue Jul 9 07:43:59 2024 -0700 net: netconsole: Remove unnecessary cast from bool The 'enabled' variable is already a bool, so casting it to its value is redundant. Remove the superfluous cast, improving code clarity without changing functionality. Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240709144403.544099-2-leitao@debian.org Signed-off-by: Jakub Kicinski commit 36a5c03f232719eb4e2d925f4d584e09cfaf372c Author: Mateusz Jończyk Date: Thu Jul 11 22:23:16 2024 +0200 md/raid1: set max_sectors during early return from choose_slow_rdev() Linux 6.9+ is unable to start a degraded RAID1 array with one drive, when that drive has a write-mostly flag set. During such an attempt, the following assertion in bio_split() is hit: BUG_ON(sectors <= 0); Call Trace: ? bio_split+0x96/0xb0 ? exc_invalid_op+0x53/0x70 ? bio_split+0x96/0xb0 ? asm_exc_invalid_op+0x1b/0x20 ? bio_split+0x96/0xb0 ? raid1_read_request+0x890/0xd20 ? __call_rcu_common.constprop.0+0x97/0x260 raid1_make_request+0x81/0xce0 ? __get_random_u32_below+0x17/0x70 ? new_slab+0x2b3/0x580 md_handle_request+0x77/0x210 md_submit_bio+0x62/0xa0 __submit_bio+0x17b/0x230 submit_bio_noacct_nocheck+0x18e/0x3c0 submit_bio_noacct+0x244/0x670 After investigation, it turned out that choose_slow_rdev() does not set the value of max_sectors in some cases and because of it, raid1_read_request calls bio_split with sectors == 0. Fix it by filling in this variable. This bug was introduced in commit dfa8ecd167c1 ("md/raid1: factor out choose_slow_rdev() from read_balance()") but apparently hidden until commit 0091c5a269ec ("md/raid1: factor out helpers to choose the best rdev from read_balance()") shortly thereafter. Cc: stable@vger.kernel.org # 6.9.x+ Signed-off-by: Mateusz Jończyk Fixes: dfa8ecd167c1 ("md/raid1: factor out choose_slow_rdev() from read_balance()") Cc: Song Liu Cc: Yu Kuai Cc: Paul Luse Cc: Xiao Ni Cc: Mariusz Tkaczyk Link: https://lore.kernel.org/linux-raid/20240706143038.7253-1-mat.jonczyk@o2.pl/ -- Tested on both Linux 6.10 and 6.9.8. Inside a VM, mdadm testsuite for RAID1 on 6.10 did not find any problems: ./test --dev=loop --no-error --raidtype=raid1 (on 6.9.8 there was one failure, caused by external bitmap support not compiled in). Notes: - I was reliably getting deadlocks when adding / removing devices on such an array - while the array was loaded with fsstress with 20 concurrent processes. When the array was idle or loaded with fsstress with 8 processes, no such deadlocks happened in my tests. This occurred also on unpatched Linux 6.8.0 though, but not on 6.1.97-rc1, so this is likely an independent regression (to be investigated). - I was also getting deadlocks when adding / removing the bitmap on the array in similar conditions - this happened on Linux 6.1.97-rc1 also though. fsstress with 8 concurrent processes did cause it only once during many tests. - in my testing, there was once a problem with hot adding an internal bitmap to the array: mdadm: Cannot add bitmap while array is resyncing or reshaping etc. mdadm: failed to set internal bitmap. even though no such reshaping was happening according to /proc/mdstat. This seems unrelated, though. Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240711202316.10775-1-mat.jonczyk@o2.pl commit 35a0a409fa269c287c4378f1aefe84ae8b5211a1 Author: Heming Zhao Date: Tue Jul 9 18:41:20 2024 +0800 md-cluster: fix no recovery job when adding/re-adding a disk The commit db5e653d7c9f ("md: delay choosing sync action to md_start_sync()") delays the start of the sync action. In a clustered environment, this will cause another node to first activate the spare disk and skip recovery. As a result, no nodes will perform recovery when a disk is added or re-added. Before db5e653d7c9f: ``` node1 node2 ---------------------------------------------------------------- md_check_recovery + md_update_sb | sendmsg: METADATA_UPDATED + md_choose_sync_action process_metadata_update | remove_and_add_spares //node1 has not finished adding + call mddev->sync_work //the spare disk:do nothing md_start_sync starts md_do_sync md_do_sync + grabbed resync_lockres:DLM_LOCK_EX + do syncing job md_check_recovery sendmsg: METADATA_UPDATED process_metadata_update //activate spare disk ... ... md_do_sync waiting to grab resync_lockres:EX ``` After db5e653d7c9f: (note: if 'cmd:idle' sets MD_RECOVERY_INTR after md_check_recovery starts md_start_sync, setting the INTR action will exacerbate the delay in node1 calling the md_do_sync function.) ``` node1 node2 ---------------------------------------------------------------- md_check_recovery + md_update_sb | sendmsg: METADATA_UPDATED + calls mddev->sync_work process_metadata_update //node1 has not finished adding //the spare disk:do nothing md_start_sync + md_choose_sync_action | remove_and_add_spares + calls md_do_sync md_check_recovery md_update_sb sendmsg: METADATA_UPDATED process_metadata_update //activate spare disk ... ... ... ... md_do_sync + grabbed resync_lockres:EX + raid1_sync_request skip sync under conf->fullsync:0 md_do_sync 1. waiting to grab resync_lockres:EX 2. when node1 could grab EX lock, node1 will skip resync under recovery_offset:MaxSector ``` How to trigger: ```(commands @node1) # to easily watch the recovery status echo 2000 > /proc/sys/dev/raid/speed_limit_max ssh root@node2 "echo 2000 > /proc/sys/dev/raid/speed_limit_max" mdadm -CR /dev/md0 -l1 -b clustered -n 2 /dev/sda /dev/sdb --assume-clean ssh root@node2 mdadm -A /dev/md0 /dev/sda /dev/sdb mdadm --manage /dev/md0 --fail /dev/sda --remove /dev/sda mdadm --manage /dev/md0 --add /dev/sdc === "cat /proc/mdstat" on both node, there are no recovery action. === ``` How to fix: because md layer code logic is hard to restore for speeding up sync job on local node, we add new cluster msg to pending the another node to active disk. Signed-off-by: Heming Zhao Reviewed-by: Su Yue Acked-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240709104120.22243-2-heming.zhao@suse.com commit fff42f213824fa434a4b6cf906b4331fe6e9302b Author: Heming Zhao Date: Tue Jul 9 18:41:19 2024 +0800 md-cluster: fix hanging issue while a new disk adding The commit 1bbe254e4336 ("md-cluster: check for timeout while a new disk adding") is correct in terms of code syntax but not suite real clustered code logic. When a timeout occurs while adding a new disk, if recv_daemon() bypasses the unlock for ack_lockres:CR, another node will be waiting to grab EX lock. This will cause the cluster to hang indefinitely. How to fix: 1. In dlm_lock_sync(), change the wait behaviour from forever to a timeout, This could avoid the hanging issue when another node fails to handle cluster msg. Another result of this change is that if another node receives an unknown msg (e.g. a new msg_type), the old code will hang, whereas the new code will timeout and fail. This could help cluster_md handle new msg_type from different nodes with different kernel/module versions (e.g. The user only updates one leg's kernel and monitors the stability of the new kernel). 2. The old code for __sendmsg() always returns 0 (success) under the design (must successfully unlock ->message_lockres). This commit makes this function return an error number when an error occurs. Fixes: 1bbe254e4336 ("md-cluster: check for timeout while a new disk adding") Signed-off-by: Heming Zhao Reviewed-by: Su Yue Acked-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240709104120.22243-1-heming.zhao@suse.com commit 5e724cb688a207ae7a348d57f9ea77f475998883 Author: Adrian Moreno Date: Wed Jul 10 11:04:59 2024 +0200 selftests: openvswitch: retry instead of sleep There are a couple of places where the test script "sleep"s to wait for some external condition to be met. This is error prone, specially in slow systems (identified in CI by "KSFT_MACHINE_SLOW=yes"). To fix this, add a "ovs_wait" function that tries to execute a command a few times until it succeeds. The timeout used is set to 5s for "normal" systems and doubled if a slow CI machine is detected. This should make the following work: $ vng --build \ --config tools/testing/selftests/net/config \ --config kernel/configs/debug.config $ vng --run . --user root -- "make -C tools/testing/selftests/ \ KSFT_MACHINE_SLOW=yes TARGETS=net/openvswitch run_tests" Signed-off-by: Adrian Moreno Reviewed-by: Ilya Maximets Link: https://patch.msgid.link/20240710090500.1655212-1-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 13cabc47f8ae69d24653f32c28399d493fde0a56 Author: Alexander Lobakin Date: Wed Jul 10 04:30:28 2024 -0700 netdevice: define and allocate &net_device _properly_ In fact, this structure contains a flexible array at the end, but historically its size, alignment etc., is calculated manually. There are several instances of the structure embedded into other structures, but also there's ongoing effort to remove them and we could in the meantime declare &net_device properly. Declare the array explicitly, use struct_size() and store the array size inside the structure, so that __counted_by() can be applied. Don't use PTR_ALIGN(), as SLUB itself tries its best to ensure the allocated buffer is aligned to what the user expects. Also, change its alignment from %NETDEV_ALIGN to the cacheline size as per several suggestions on the netdev ML. bloat-o-meter for vmlinux: free_netdev 445 440 -5 netdev_freemem 24 - -24 alloc_netdev_mqs 1481 1450 -31 On x86_64 with several NICs of different vendors, I was never able to get a &net_device pointer not aligned to the cacheline size after the change. Signed-off-by: Alexander Lobakin Signed-off-by: Breno Leitao Reviewed-by: Przemek Kitszel Reviewed-by: Eric Dumazet Reviewed-by: Kees Cook Link: https://patch.msgid.link/20240710113036.2125584-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 8341eee81c794db0d8dd503c2b0ea2f55eba7334 Author: Adrian Moreno Date: Wed Jul 10 19:10:04 2024 +0200 net: psample: fix flag being set in wrong skb A typo makes PSAMPLE_ATTR_SAMPLE_RATE netlink flag be added to the wrong sk_buff. Fix the error and make the input sk_buff pointer "const" so that it doesn't happen again. Acked-by: Eelco Chaudron Fixes: 7b1b2b60c63f ("net: psample: allow using rate as probability") Signed-off-by: Adrian Moreno Reviewed-by: Ido Schimmel Reviewed-by: Antoine Tenart Link: https://patch.msgid.link/20240710171004.2164034-1-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit c9741a03dc8e491e57b95fba0058ab46b7e506da Author: Alexey Kodanev Date: Mon Jul 8 10:50:08 2024 +0000 bna: adjust 'name' buf size of bna_tcb and bna_ccb structures To have enough space to write all possible sprintf() args. Currently 'name' size is 16, but the first '%s' specifier may already need at least 16 characters, since 'bnad->netdev->name' is used there. For '%d' specifiers, assume that they require: * 1 char for 'tx_id + tx_info->tcb[i]->id' sum, BNAD_MAX_TXQ_PER_TX is 8 * 2 chars for 'rx_id + rx_info->rx_ctrl[i].ccb->id', BNAD_MAX_RXP_PER_RX is 16 And replace sprintf with snprintf. Detected using the static analysis tool - Svace. Fixes: 8b230ed8ec96 ("bna: Brocade 10Gb Ethernet device driver") Signed-off-by: Alexey Kodanev Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dc1000bf463d1d89f66d6b5369cf76603f32c4d3 Author: Leo Li Date: Thu Jul 11 10:31:09 2024 -0400 Revert "drm/amd/display: Reset freesync config before update new state" This change caused PSR SU panels to not read from their remote fb, preventing us from entering self-refresh. It is a regression. This reverts commit 6b8487cdf9fc7bae707519ac5b5daeca18d1e85b. Signed-off-by: Leo Li Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 80ab5445da623540ea6303740015dd0210a06dc8 Merge: cef4902b0fadf dabcfd5e11680 Author: Jakub Kicinski Date: Thu Jul 11 17:22:04 2024 -0700 Merge tag 'wireless-next-2024-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.11 Most likely the last "new features" pull request for v6.11 with changes both in stack and in drivers. The big thing is the multiple radios for wiphy feature which makes it possible to better advertise radio capabilities to user space. mt76 enabled MLO and iwlwifi re-enabled MLO, ath12k and rtw89 Wi-Fi 6 devices got WoWLAN support. Major changes: cfg80211/mac80211 * remove DEAUTH_NEED_MGD_TX_PREP flag * multiple radios per wiphy support mac80211_hwsim * multi-radio wiphy support ath12k * DebugFS support for datapath statistics * WCN7850: support for WoW (Wake on WLAN) * WCN7850: device-tree bindings ath11k * QCA6390: device-tree bindings iwlwifi * mvm: re-enable Multi-Link Operation (MLO) * aggregation (A-MSDU) optimisations rtw89 * preparation for RTL8852BE-VT support * WoWLAN support for WiFi 6 chips * 36-bit PCI DMA support mt76 * mt7925 Multi-Link Operation (MLO) support * tag 'wireless-next-2024-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (204 commits) wifi: mac80211: fix AP chandef capturing in CSA wifi: iwlwifi: correctly reference TSO page information wifi: mt76: mt792x: fix scheduler interference in drv own process wifi: mt76: mt7925: enabling MLO when the firmware supports it wifi: mt76: mt7925: remove the unused mt7925_mcu_set_chan_info wifi: mt76: mt7925: update mt7925_mac_link_bss_add for MLO wifi: mt76: mt7925: update mt7925_mcu_bss_basic_tlv for MLO wifi: mt76: mt7925: update mt7925_mcu_set_timing for MLO wifi: mt76: mt7925: update mt7925_mcu_sta_phy_tlv for MLO wifi: mt76: mt7925: update mt7925_mcu_sta_rate_ctrl_tlv for MLO wifi: mt76: mt7925: add mt7925_mcu_sta_eht_mld_tlv for MLO wifi: mt76: mt7925: update mt7925_mcu_sta_update for MLO wifi: mt76: mt7925: update mt7925_mcu_add_bss_info for MLO wifi: mt76: mt7925: update mt7925_mcu_bss_mld_tlv for MLO wifi: mt76: mt7925: update mt7925_mcu_sta_mld_tlv for MLO wifi: mt76: mt7925: add mt7925_[assign,unassign]_vif_chanctx wifi: mt76: add def_wcid to struct mt76_wcid wifi: mt76: mt7925: report link information in rx status wifi: mt76: mt7925: update rate index according to link id wifi: mt76: mt7925: add link handling in the mt7925_ipv6_addr_change ... ==================== Link: https://patch.msgid.link/20240711102353.0C849C116B1@smtp.kernel.org Signed-off-by: Jakub Kicinski commit cef4902b0fadfc4181176ef5713f0b7cf2a40d8f Author: Eric Dumazet Date: Wed Jul 10 15:16:53 2024 +0000 net: reduce rtnetlink_rcv_msg() stack usage IFLA_MAX is increasing slowly but surely. Some compilers use more than 512 bytes of stack in rtnetlink_rcv_msg() because it calls rtnl_calcit() for RTM_GETLINK message. Use noinline_for_stack attribute to not inline rtnl_calcit(), and directly use nla_for_each_attr_type() (Jakub suggestion) because we only care about IFLA_EXT_MASK at this stage. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240710151653.3786604-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit b07593edd2faf310f9b758896f4f1c6054515be4 Author: Chen Ni Date: Tue Jul 9 15:28:38 2024 +0800 net/sched: act_skbmod: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240709072838.1152880-1-nichen@iscas.ac.cn Signed-off-by: Jakub Kicinski commit ab1c7ea48f6e225aa40eff3be45a47c7d93cb3b8 Author: George Stark Date: Thu Jul 11 01:32:12 2024 +0300 dt-bindings: i2c: amlogic,meson6-i2c: add optional power-domains On newer SoCs, the I2C hardware can require a power domain to operate. Since the same compatible is used for older and newer SoCs make power-domains property optional. Signed-off-by: George Stark Reviewed-by: Neil Armstrong Reviewed-by: Rob Herring (Arm) Signed-off-by: Andi Shyti commit 0d9c0a67b14401344183cc0f8239f8d1851637fd Author: Thorsten Blum Date: Thu Jul 11 10:43:16 2024 +0200 bootconfig: Remove duplicate included header file linux/bootconfig.h The header file linux/bootconfig.h is included whether __KERNEL__ is defined or not. Include it only once before the #ifdef/#else/#endif preprocessor directives and remove the following make includecheck warning: linux/bootconfig.h is included more than once Move the comment to the top and delete the now empty #else block. Link: https://lore.kernel.org/all/20240711084315.1507-1-thorsten.blum@toblux.com/ Signed-off-by: Thorsten Blum Signed-off-by: Masami Hiramatsu (Google) commit 56478475560bde71dd3ef944b5013900272db273 Merge: 3a8617c7df6eb 8f55ada796565 Author: Dave Jiang Date: Thu Jul 11 16:30:18 2024 -0700 Merge branch 'for-6.11/xor_fixes' into cxl-for-next Series to fix XOR math for DPA to SPA translation - Refactor and fold cxl_trace_hpa() into cxl_dpa_to_hpa() - Complete DPA->HPA->SPA translation and correct XOR translation issue - Add new method to verify a CXL target position - Remove old method of CXL target position verifiation commit 861f96a785149a0062cce6578e0fa7cb95435a7e Author: Lu Baolu Date: Wed Jul 10 16:33:39 2024 +0800 iommufd: Remove IOMMUFD_PAGE_RESP_FAILURE The response code of IOMMUFD_PAGE_RESP_FAILURE was defined to be equivalent to the "Response Failure" in PCI spec, section 10.4.2.1. This response code indicates that one or more pages within the associated request group have encountered or caused an unrecoverable error. Therefore, this response disables the PRI at the function. Modern I/O virtualization technologies, like SR-IOV, share PRI among the assignable device units. Therefore, a response failure on one unit might cause I/O failure on other units. Remove this response code so that user space can only respond with SUCCESS or INVALID. The VMM is recommended to emulate a failure response as a PRI reset, or PRI disable and changing to a non-PRI domain. Fixes: c714f15860fc ("iommufd: Add fault and response message definitions") Link: https://lore.kernel.org/r/20240710083341.44617-2-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 8f55ada796565ce801418bf579f31a6a522d0337 Author: Alison Schofield Date: Tue Jul 2 22:29:52 2024 -0700 cxl: Remove defunct code calculating host bridge target positions The CXL Spec 3.1 Table 9-22 requires that the BIOS populate the CFMWS target list in interleave target order. This means the calculations the CXL driver added to determine positions when XOR math is in use, along with the entire XOR vs Modulo call back setup is not needed. A prior patch added a common method to verify positions. Remove the now unused code related to the cxl_calc_hb_fn. Signed-off-by: Alison Schofield Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/2e2c32a2d0f1007e920b58712d15edad2e48d857.1719980933.git.alison.schofield@intel.com Signed-off-by: Dave Jiang commit 82a3e3a235633aa0575fac9507d648dd80f3437f Author: Alison Schofield Date: Tue Jul 2 22:29:51 2024 -0700 cxl/region: Verify target positions using the ordered target list When a root decoder is configured the interleave target list is read from the BIOS populated CFMWS structure. Per the CXL spec 3.1 Table 9-22 the target list is in interleave order. The CXL driver populates its decoder target list in the same order and stores it in 'struct cxl_switch_decoder' field "@target: active ordered target list in current decoder configuration" Given the promise of an ordered list, the driver can stop duplicating the work of BIOS and simply check target positions against the ordered list during region configuration. The simplified check against the ordered list is presented here. A follow-on patch will remove the unused code. For Modulo arithmetic this is not a fix, only a simplification. For XOR arithmetic this is a fix for HB IW of 3,6,12. Fixes: f9db85bfec0d ("cxl/acpi: Support CXL XOR Interleave Math (CXIMS)") Signed-off-by: Alison Schofield Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/35d08d3aba08fee0f9b86ab1cef0c25116ca8a55.1719980933.git.alison.schofield@intel.com Signed-off-by: Dave Jiang commit 3b2fedcd75e3991e77c2a8c3ebcab0ea68b2d69d Author: Alison Schofield Date: Tue Jul 2 22:29:50 2024 -0700 cxl: Restore XOR'd position bits during address translation When a device reports a DPA in events like poison, general_media, and dram, the driver translates that DPA back to an HPA. Presently, the CXL driver translation only considers the Modulo position and will report the wrong HPA for XOR configured root decoders. Add a helper function that restores the XOR'd bits during DPA->HPA address translation. Plumb a root decoder callback to the new helper when XOR interleave arithmetic is in use. For Modulo arithmetic, just let the callback be NULL - as in no extra work required. Upon completion of a DPA->HPA translation a couple of checks are performed on the result. One simply confirms that the calculated HPA is within the address range of the region. That test is useful for both Modulo and XOR interleave arithmetic decodes. A second check confirms that the HPA is within an expected chunk based on the endpoints position in the region and the region granularity. An XOR decode disrupts the Modulo pattern making the chunk check useless. To align the checks with the proper decode, pull the region range check inline and use the helper to do the chunk check for Modulo decodes only. A cxl-test unit test is posted for upstream review here: https://lore.kernel.org/20240624210644.495563-1-alison.schofield@intel.com/ Fixes: 28a3ae4ff66c ("cxl/trace: Add an HPA to cxl_poison trace events") Signed-off-by: Alison Schofield Tested-by: Diego Garcia Rodriguez Reviewed-by: Dan Williams Link: https://patch.msgid.link/1a1ac880d9f889bd6384e657e810431b9a0a72e5.1719980933.git.alison.schofield@intel.com Signed-off-by: Dave Jiang commit 9aa5f6235e16ac6fceed789a30e72addf1abd7d8 Author: Alison Schofield Date: Tue Jul 2 22:29:49 2024 -0700 cxl/core: Fold cxl_trace_hpa() into cxl_dpa_to_hpa() Although cxl_trace_hpa() is used to populate TRACE EVENTs with HPA addresses the work it performs is a DPA to HPA translation not a trace. Tidy up this naming by moving the minimal work done in cxl_trace_hpa() into cxl_dpa_to_hpa() and use cxl_dpa_to_hpa() for trace event callbacks. Suggested-by: Dan Williams Signed-off-by: Alison Schofield Reviewed-by: Dan Williams Reviewed-by: Robert Richter Link: https://patch.msgid.link/452a9b0c525b774c72d9d5851515ffa928750132.1719980933.git.alison.schofield@intel.com Signed-off-by: Dave Jiang commit 3048dc8ba46b7ba11581f2a7e06849af0df13136 Author: Nicolas Ferre Date: Thu Jul 11 18:54:02 2024 +0200 spi: dt-bindings: at91: Add sama7d65 compatible string Add compatible string for sama7d65. Like sam9x60 and sam9x7, it requires to bind to "atmel,at91rm9200-spi". Group these three under the same enum, sorted alphanumerically, and remove previously added item. Signed-off-by: Nicolas Ferre Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240711165402.373634-1-nicolas.ferre@microchip.com Signed-off-by: Mark Brown commit e3fff693da9fa0337d98dab496db3a04c5227aae Author: Animesh Agarwal Date: Wed Jul 10 12:57:52 2024 +0530 ASoC: dt-bindings: cirrus,cs42xx8: Convert to dtschema Convert the Cirrus Logic CS42448/CS42888 audio CODEC bindings to DT schema format. Set power supply properties to required only for CS42888. Cc: Daniel Baluta Signed-off-by: Animesh Agarwal Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240710072756.99765-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit b2b1f9338400de0fb65e2ff5fab1b5617dcb5a97 Author: Lai Jiangshan Date: Thu Jul 11 16:35:47 2024 +0800 workqueue: Rename wq_update_pod() to unbound_wq_update_pwq() What wq_update_pod() does is just to update the pwq of the specific cpu. Rename it and update the comments. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit d160a58de59cd617d9648d0458d572d063d66b71 Author: Lai Jiangshan Date: Thu Jul 11 16:35:46 2024 +0800 workqueue: Remove the arguments @hotplug_cpu and @online from wq_update_pod() The arguments @hotplug_cpu and @online are not used in wq_update_pod() since the functions called by wq_update_pod() don't need them. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 88a41b185d3d6bb03733441c4e440c80dbd1866a Author: Lai Jiangshan Date: Thu Jul 11 16:35:45 2024 +0800 workqueue: Remove the argument @cpu_going_down from wq_calc_pod_cpumask() wq_calc_pod_cpumask() uses wq_online_cpumask, which excludes the cpu going down, so the argument cpu_going_down is unused and can be removed. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 2cb61f76be3b17d5ad42ba3b7b23c7bf98253a0b Author: Lai Jiangshan Date: Thu Jul 11 16:35:44 2024 +0800 workqueue: Remove the unneeded cpumask empty check in wq_calc_pod_cpumask() The cpumask empty check in wq_calc_pod_cpumask() has long been useless. It just works purely as documents which states that the cpumask is not possible empty after the function returns. Now the code above is even more explicit that the cpumask is not empty, so the document-only empty check can be removed. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 19af457573838785290d27dd09a59140f541d1d8 Author: Lai Jiangshan Date: Thu Jul 11 16:35:43 2024 +0800 workqueue: Remove cpus_read_lock() from apply_wqattrs_lock() 1726a1713590 ("workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.") led to the following possible deadlock: WARNING: possible recursive locking detected 6.10.0-rc5-00004-g1d4c6111406c #1 Not tainted -------------------------------------------- swapper/0/1 is trying to acquire lock: c27760f4 (cpu_hotplug_lock){++++}-{0:0}, at: alloc_workqueue (kernel/workqueue.c:5152 kernel/workqueue.c:5730) but task is already holding lock: c27760f4 (cpu_hotplug_lock){++++}-{0:0}, at: padata_alloc (kernel/padata.c:1007) ... stack backtrace: ... cpus_read_lock (include/linux/percpu-rwsem.h:53 kernel/cpu.c:488) alloc_workqueue (kernel/workqueue.c:5152 kernel/workqueue.c:5730) padata_alloc (kernel/padata.c:1007 (discriminator 1)) pcrypt_init_padata (crypto/pcrypt.c:327 (discriminator 1)) pcrypt_init (crypto/pcrypt.c:353) do_one_initcall (init/main.c:1267) do_initcalls (init/main.c:1328 (discriminator 1) init/main.c:1345 (discriminator 1)) kernel_init_freeable (init/main.c:1364) kernel_init (init/main.c:1469) ret_from_fork (arch/x86/kernel/process.c:153) ret_from_fork_asm (arch/x86/entry/entry_32.S:737) entry_INT80_32 (arch/x86/entry/entry_32.S:944) This is caused by pcrypt allocating a workqueue while holding cpus_read_lock(), so workqueue code can't do it again as that can lead to deadlocks if down_write starts after the first down_read. The pwq creations and installations have been reworked based on wq_online_cpumask rather than cpu_online_mask making cpus_read_lock() is unneeded during wqattrs changes. Fix the deadlock by removing cpus_read_lock() from apply_wqattrs_lock(). tj: Updated changelog. Signed-off-by: Lai Jiangshan Fixes: 1726a1713590 ("workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.") Link: http://lkml.kernel.org/r/202407081521.83b627c1-lkp@intel.com Signed-off-by: Tejun Heo commit fbb3d4c15dc0fe8a439de267db927a9ab2f44e98 Author: Lai Jiangshan Date: Thu Jul 11 16:35:42 2024 +0800 workqueue: Simplify wq_calc_pod_cpumask() with wq_online_cpumask Avoid relying on cpu_online_mask for wqattrs changes so that cpus_read_lock() can be removed from apply_wqattrs_lock(). And with wq_online_cpumask, attrs->__pod_cpumask doesn't need to be reused as a temporary storage to calculate if the pod have any online CPUs @attrs wants since @cpu_going_down is not in the wq_online_cpumask. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 8d84baf76045f5b9567581cde17e9c3d256bb073 Author: Lai Jiangshan Date: Thu Jul 11 16:35:41 2024 +0800 workqueue: Add wq_online_cpumask The new wq_online_mask mirrors the cpu_online_mask except during hotplugging; specifically, it differs between the hotplugging stages of workqueue_offline_cpu() and workqueue_online_cpu(), during which the transitioning CPU is not represented in the mask. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 1d302f626c2a23e4fd05bb810eff300e8f2174fd Author: Guilherme Amadio Date: Fri Jun 28 22:34:27 2024 +0200 perf build: Conditionally add feature check flags for libtrace{event,fs} This avoids reported warnings when the packages are not installed. [namhyung]: Removed the dummy assignment and unnecessary ifeq checks. Fixes: 0f0e1f445690 ("perf build: Use pkg-config for feature check for libtrace{event,fs}") Signed-off-by: Guilherme Amadio Cc: Leo Yan Cc: Thorsten Leemhuis Link: https://lore.kernel.org/r/20240628203432.3273625-1-amadio@gentoo.org Signed-off-by: Namhyung Kim commit 6937693d752e216b54845cfe8d89ced82e6a4568 Merge: 7c8267275de69 24ac7e5440815 Author: Jakub Kicinski Date: Thu Jul 11 14:41:49 2024 -0700 Merge branch 'ethtool-use-the-rss-context-xarray-in-ring-deactivation-safety-check' Jakub Kicinski says: ==================== ethtool: use the rss context XArray in ring deactivation safety-check Now that we have an XArray storing information about all extra RSS contexts - use it to extend checks already performed using ethtool_get_max_rxfh_channel(). ==================== Link: https://patch.msgid.link/20240710174043.754664-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 24ac7e5440815bb03bdfa9bc7e43a412b050dbaa Author: Jakub Kicinski Date: Wed Jul 10 10:40:43 2024 -0700 ethtool: use the rss context XArray in ring deactivation safety-check ethtool_get_max_rxfh_channel() gets called when user requests deactivating Rx channels. Check the additional RSS contexts, too. While we do track whether RSS context has an indirection table explicitly set by the user, no driver looks at that bit. Assume drivers won't auto-regenerate the additional tables, to be safe. Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20240710174043.754664-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2899d58462ba868287d6ff3acad3675e7adf934f Author: Jakub Kicinski Date: Wed Jul 10 10:40:42 2024 -0700 ethtool: fail closed if we can't get max channel used in indirection tables Commit 0d1b7d6c9274 ("bnxt: fix crashes when reducing ring count with active RSS contexts") proves that allowing indirection table to contain channels with out of bounds IDs may lead to crashes. Currently the max channel check in the core gets skipped if driver can't fetch the indirection table or when we can't allocate memory. Both of those conditions should be extremely rare but if they do happen we should try to be safe and fail the channel change. Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20240710174043.754664-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f00059b4c1b068df108c70f86749b23f9080d2ba Author: Philipp Stanner Date: Thu Jun 13 13:50:26 2024 +0200 drm/vboxvideo: fix mapping leaks When the PCI devres API was introduced to this driver, it was wrongly assumed that initializing the device with pcim_enable_device() instead of pci_enable_device() will make all PCI functions managed. This is wrong and was caused by the quite confusing PCI devres API in which some, but not all, functions become managed that way. The function pci_iomap_range() is never managed. Replace pci_iomap_range() with the managed function pcim_iomap_range(). Fixes: 8558de401b5f ("drm/vboxvideo: use managed pci functions") Link: https://lore.kernel.org/r/20240613115032.29098-14-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Hans de Goede commit ad78e05d654567e0a96f91d5db198469ddc2d4fb Author: Philipp Stanner Date: Thu Jun 13 13:50:25 2024 +0200 PCI: Add managed pcim_iomap_range() The only managed mapping function currently is pcim_iomap() which doesn't allow for mapping an area starting at a certain offset, which many drivers want. Add pcim_iomap_range() as an exported function. Link: https://lore.kernel.org/r/20240613115032.29098-13-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit f748a07a0b6430b3ed638e5df7ae5007a28eaf11 Author: Philipp Stanner Date: Thu Jun 13 13:50:24 2024 +0200 PCI: Remove legacy pcim_release() Thanks to preceding cleanup steps, pcim_release() is now not needed anymore and can be replaced by pcim_disable_device(), which is the exact counterpart to pcim_enable_device(). This permits removing further parts of the old PCI devres implementation. Replace pcim_release() with pcim_disable_device(). Remove the now unused function get_pci_dr(). Remove the struct pci_devres from pci.h. Link: https://lore.kernel.org/r/20240613115032.29098-12-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 25216afc9db53d85dc648aba8fb7f6d31f2c8731 Author: Philipp Stanner Date: Thu Jun 13 13:50:23 2024 +0200 PCI: Add managed pcim_intx() pci_intx() is a "hybrid" function, i.e., it is managed if pcim_enable_device() has been called, but unmanaged otherwise. Add pcim_intx(), which is always managed, and implement pci_intx() using it. Remove the now-unused struct pci_devres.orig_intx and .restore_intx and find_pci_dr(). Link: https://lore.kernel.org/r/20240613115032.29098-11-pstanner@redhat.com Signed-off-by: Philipp Stanner [kwilczynski: squashed in https://lore.kernel.org/r/426645d40776198e0fcc942f4a6cac4433c7a9aa.camel@redhat.com to fix problem reported and tested by Ashish Kalra : https://lore.kernel.org/r/20240708214656.4721-1-Ashish.Kalra@amd.com https://lore.kernel.org/r/8c4634e9-4f02-4c54-9c89-d75e2f4bf026@amd.com/] Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas commit 0477d5168bbb8767275822830b47112519a8446d Author: Shay Drory Date: Sun Apr 14 11:26:07 2024 +0300 net/mlx5: Expose SFs IRQs Expose the sysfs files for the IRQs that the mlx5 PCI SFs are using. These entries are similar to PCI PFs and VFs in 'msi_irqs' directory. Reviewed-by: Parav Pandit Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed --- v8-v9: - add Przemek RB v6->v7: - remove not needed changes to mlx5 sfnum SF sysfs v5->v6: - fail IRQ creation in case auxiliary_device_sysfs_irq_add() failed (Parav and Przemek) v2->v3: - fix mlx5 sfnum SF sysfs commit a808878308a8041ae10a151d69e2d22f94cae9f4 Author: Shay Drory Date: Sun Apr 14 11:05:25 2024 +0300 driver core: auxiliary bus: show auxiliary device IRQs PCI subfunctions (SF) are anchored on the auxiliary bus. PCI physical and virtual functions are anchored on the PCI bus. The irq information of each such function is visible to users via sysfs directory "msi_irqs" containing files for each irq entry. However, for PCI SFs such information is unavailable. Due to this users have no visibility on IRQs used by the SFs. Secondly, an SF can be multi function device supporting rdma, netdevice and more. Without irq information at the bus level, the user is unable to view or use the affinity of the SF IRQs. Hence to match to the equivalent PCI PFs and VFs, add "irqs" directory, for supporting auxiliary devices, containing file for each irq entry. For example: $ ls /sys/bus/auxiliary/devices/mlx5_core.sf.1/irqs/ 50 51 52 53 54 55 56 57 58 Cc: Simon Horman Reviewed-by: Przemek Kitszel Reviewed-by: Parav Pandit Reviewed-by: Greg Kroah-Hartman Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed --- v9-v10: - remove Przemek RB - add name field to auxiliary_irq_info (Greg and Przemek) - handle bogus IRQ in auxiliary_device_sysfs_irq_remove (Greg) v8-v9: - add Przemek RB - use guard() in auxiliary_irq_dir_prepare (Paolo) v7-v8: - use cleanup.h for info and name fields (Greg) - correct error flow in auxiliary_irq_dir_prepare (Przemek) - add documentation for new fields of auxiliary_device (Simon) v6-v7: - dynamically creating irqs directory when first irq file created (Greg) - removed irqs flag and simplified the dev_add() API (Greg) - move sysfs related new code to a new auxiliary_sysfs.c file (Greg) v5-v6: - removed concept of shared and exclusive and hence global xarray (Greg) v4-v5: - restore global mutex and replace refcount_t with simple integer (Greg) v3->4: - remove global mutex (Przemek) v2->v3: - fix function declaration in case SYSFS isn't defined v1->v2: - move #ifdefs from drivers/base/auxiliary.c to include/linux/auxiliary_bus.h (Greg) - use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL (Greg) - Fix kzalloc(ref) to kzalloc(*ref) (Simon) - Add return description in auxiliary_device_sysfs_irq_add() kdoc (Simon) - Fix auxiliary_irq_mode_show doc (kernel test boot) commit 94e068cf9c4aedf381cfab1595d531d2ec381bb8 Merge: 256abd8e550ce cb520c3f366c7 Author: Dave Airlie Date: Fri Jul 12 07:15:47 2024 +1000 Merge tag 'drm-misc-fixes-2024-07-11' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes drm-misc-fixes for v6.10: - EDID irq fix for bridge/adv7511. - gma500 null mode fixes. - Cleanup meson binding. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/8abff46f-eae6-4521-8434-7c6240f9091c@linux.intel.com commit b3470da314fd8018ee237e382000c4154a942420 Author: Alan Maguire Date: Thu Jul 11 19:23:21 2024 +0100 bpf: annotate BTF show functions with __printf -Werror=suggest-attribute=format warns about two functions in kernel/bpf/btf.c [1]; add __printf() annotations to silence these warnings since for CONFIG_WERROR=y they will trigger build failures. [1] https://lore.kernel.org/bpf/a8b20c72-6631-4404-9e1f-0410642d7d20@gmail.com/ Fixes: 31d0bc81637d ("bpf: Move to generic BTF show support, apply it to seq files/strings") Reported-by: Mirsad Todorovac Signed-off-by: Alan Maguire Tested-by: Mirsad Todorovac Link: https://lore.kernel.org/r/20240711182321.963667-1-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov commit 7c8267275de6989a9b682a07d75e89395457ee01 Merge: a6a9fcb108361 51df8e0cbaefd Author: Jakub Kicinski Date: Thu Jul 11 12:57:57 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: net/sched/act_ct.c 26488172b029 ("net/sched: Fix UAF when resolving a clash") 3abbd7ed8b76 ("act_ct: prepare for stolen verdict coming from conntrack and nat engine") No adjacent changes. Signed-off-by: Jakub Kicinski commit 4f3a6c4de7d932be94cde2c52ae58feeec9c9dbf Merge: 3346c56685770 080402007007c Author: Catalin Marinas Date: Thu Jul 11 19:10:02 2024 +0100 Merge branch 'for-next/vcpu-hotplug' into for-next/core * for-next/vcpu-hotplug: (21 commits) : arm64 support for virtual CPU hotplug (ACPI) irqchip/gic-v3: Fix 'broken_rdists' unused warning when !SMP and !ACPI arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU cpumask: Add enabled cpumask for present CPUs that can be brought online arm64: document virtual CPU hotplug's expectations arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled. arm64: arch_register_cpu() variant to check if an ACPI handle is now available. arm64: psci: Ignore DENIED CPUs irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs irqchip/gic-v3: Don't return errors from gic_acpi_match_gicc() arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry arm64: acpi: Move get_cpu_for_acpi_id() to a header ACPI: Add post_eject to struct acpi_scan_handler for cpu hotplug ACPI: scan: switch to flags for acpi_scan_check_and_detach() ACPI: processor: Register deferred CPUs from acpi_processor_get_info() ACPI: processor: Add acpi_get_processor_handle() helper ACPI: processor: Move checks and availability of acpi_processor earlier ACPI: processor: Fix memory leaks in error paths of processor_add() ACPI: processor: Return an error if acpi_processor_get_info() fails in processor_add() ACPI: processor: Drop duplicated check on _STA (enabled + present) cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER ... commit 3346c56685770e1865952a127f9e51edcc25b5a6 Merge: 42bebc7cca79d 056600ff73307 916b93f4e865b 6e3bc73be02ba 26ca4423604f1 75b3c43eab594 f5a4af3c75270 18fdb6348c480 5e30c16b58a48 Author: Catalin Marinas Date: Thu Jul 11 19:09:35 2024 +0100 Merge branches 'for-next/cpufeature', 'for-next/misc', 'for-next/kselftest', 'for-next/mte', 'for-next/errata', 'for-next/acpi', 'for-next/gic-v3-pmr' and 'for-next/doc', remote-tracking branch 'arm64/for-next/perf' into for-next/core * arm64/for-next/perf: perf: add missing MODULE_DESCRIPTION() macros perf: arm_pmuv3: Include asm/arm_pmuv3.h from linux/perf/arm_pmuv3.h perf: arm_v6/7_pmu: Drop non-DT probe support perf/arm: Move 32-bit PMU drivers to drivers/perf/ perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check perf: arm_pmuv3: Avoid assigning fixed cycle counter with threshold perf: imx_perf: add support for i.MX95 platform perf: imx_perf: fix counter start and config sequence perf: imx_perf: refactor driver for imx93 perf: imx_perf: let the driver manage the counter usage rather the user perf: imx_perf: add macro definitions for parsing config attr dt-bindings: perf: fsl-imx-ddr: Add i.MX95 compatible perf: pmuv3: Add new Cortex and Neoverse PMUs dt-bindings: arm: pmu: Add new Cortex and Neoverse cores perf/arm-cmn: Enable support for tertiary match group perf/arm-cmn: Decouple wp_config registers from filter group number * for-next/cpufeature: : Various cpufeature infrastructure patches arm64/cpufeature: Replace custom macros with fields from ID_AA64PFR0_EL1 KVM: arm64: Replace custom macros with fields from ID_AA64PFR0_EL1 arm64/cpufeatures/kvm: Add ARMv8.9 FEAT_ECBHB bits in ID_AA64MMFR1 register * for-next/misc: : Miscellaneous patches arm64: smp: Fix missing IPI statistics arm64: Cleanup __cpu_set_tcr_t0sz() arm64/mm: Stop using ESR_ELx_FSC_TYPE during fault arm64: Kconfig: fix typo in __builtin_return_adddress ARM64: reloc_test: add missing MODULE_DESCRIPTION() macro arm64: implement raw_smp_processor_id() using thread_info arm64/arch_timer: include * for-next/kselftest: : arm64 kselftest updates selftests: arm64: tags: remove the result script selftests: arm64: tags_test: conform test to TAP output kselftest/arm64: Fix a couple of spelling mistakes kselftest/arm64: Fix redundancy of a testcase kselftest/arm64: Include kernel mode NEON in fp-stress * for-next/mte: : MTE updates arm64: mte: Make mte_check_tfsr_*() conditional on KASAN instead of MTE * for-next/errata: : Arm CPU errata workarounds arm64: errata: Expand speculative SSBS workaround arm64: errata: Unify speculative SSBS errata logic arm64: cputype: Add Cortex-X925 definitions arm64: cputype: Add Cortex-A720 definitions arm64: cputype: Add Cortex-X3 definitions * for-next/acpi: : arm64 ACPI patches ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64 ACPI / amba: Drop unnecessary check for registered amba_dummy_clk arm64: FFH: Move ACPI specific code into drivers/acpi/arm64/ arm64: cpuidle: Move ACPI specific code into drivers/acpi/arm64/ ACPI: arm64: Sort entries alphabetically * for-next/gic-v3-pmr: : arm64: irqchip/gic-v3: Use compiletime constant PMR values arm64: irqchip/gic-v3: Select priorities at boot time irqchip/gic-v3: Detect GICD_CTRL.DS and SCR_EL3.FIQ earlier irqchip/gic-v3: Make distributor priorities variables irqchip/gic-common: Remove sync_access callback wordpart.h: Add REPEAT_BYTE_U32() * for-next/doc: : arm64 documentation updates Documentation: arm64: Update memory.rst for TBI commit 6e3bc73be02ba604e5fd865008050a6dfc3d1232 Author: Muhammad Usama Anjum Date: Sun Jun 2 18:25:00 2024 +0500 selftests: arm64: tags: remove the result script The run_tags_test.sh script is used to run tags_test and print out if the test succeeded or failed. As tags_test has been TAP conformed, this script is unneeded and hence can be removed. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20240602132502.4186771-2-usama.anjum@collabora.com Signed-off-by: Catalin Marinas commit 9de9c4cc03add590f99aa5fabbe8f5850e34837c Author: Muhammad Usama Anjum Date: Sun Jun 2 18:24:59 2024 +0500 selftests: arm64: tags_test: conform test to TAP output Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20240602132502.4186771-1-usama.anjum@collabora.com Signed-off-by: Catalin Marinas commit 1712c9ee36d1f7b00e89bcd9743c18ba00a47f42 Author: Sasha Neftin Date: Thu Jun 13 08:17:49 2024 +0300 igc: Remove the internal 'eee_advert' field Since the kernel's 'ethtool_keee' structure is in use, the internal 'eee_advert' field becomes pointless and can be removed. This patch comes to clean up this redundant code. Signed-off-by: Sasha Neftin Tested-by: Mor Bar-Gabay (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit aff6e32cc7ffb271b07b6390ef1580b7ec576a8f Author: Michal Swiatkowski Date: Mon Jun 24 10:05:10 2024 +0200 ice: remove eswitch rebuild Since the port representors are added one by one there is no need to do eswitch rebuild. Each port representor is detached and attached in VF reset path. Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit a59618b98543248adae7e77d60f67974ca243319 Author: Pawel Kaminski Date: Fri Jun 7 12:43:49 2024 +0200 ice: Add support for devlink local_forwarding param Add support for driver-specific devlink local_forwarding param. Supported values are "enabled", "disabled" and "prioritized". Default configuration is set to "enabled". Add documentation in networking/devlink/ice.rst. In previous generations of Intel NICs the transmit scheduler was only limited by PCIe bandwidth when scheduling/assigning hairpin-bandwidth between VFs. Changes to E810 HW design introduced scheduler limitation, so that available hairpin-bandwidth is bound to external port speed. In order to address this limitation and enable NFV services such as "service chaining" a knob to adjust the scheduler config was created. Driver can send a configuration message to the FW over admin queue and internal FW logic will reconfigure HW to prioritize and add more BW to VF to VF traffic. An end result, for example, 10G port will no longer limit hairpin-bandwidth to 10G and much higher speeds can be achieved. Devlink local_forwarding param set to "prioritized" enables higher hairpin-bandwitdh on related PFs. Configuration is applicable only to 8x10G and 4x25G cards. Changing local_forwarding configuration will trigger CORER reset in order to take effect. Example command to change current value: devlink dev param set pci/0000:b2:00.3 name local_forwarding \ value prioritized \ cmode runtime Co-developed-by: Michal Wilczynski Signed-off-by: Michal Wilczynski Reviewed-by: Przemek Kitszel Signed-off-by: Pawel Kaminski Signed-off-by: Wojciech Drewek Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit bb408dae9e73803eab8a648115d6c4a1bca4dba3 Author: Pengfei Xu Date: Fri May 31 15:53:50 2024 +0800 selftests: ifs: verify IFS ARRAY BIST functionality There are two selftest scenarios for ARRAY BIST(Board Integrated System Test) tests: 1. Perform IFS ARRAY BIST tests once on each CPU. 2. Perform IFS ARRAY BIST tests on a random CPU with 3 rounds. These are not meant to be exhaustive, but are some minimal tests for for checking IFS ARRAY BIST. Reviewed-by: Jithu Joseph Reviewed-by: Kuppuswamy Sathyanarayanan Co-developed-by: Ashok Raj Signed-off-by: Ashok Raj Signed-off-by: Pengfei Xu Acked-by: Jithu Joseph Signed-off-by: Shuah Khan commit 3170f7acfba15895844dc2c0f2d2ff6fd77ad2e1 Author: Pengfei Xu Date: Fri May 31 15:53:49 2024 +0800 selftests: ifs: verify IFS scan test functionality Two selftests are added to verify IFS scan test feature: 1. Perform IFS scan test once on each CPU using all the available image files. 2. Perform IFS scan test with the default image on a random cpu for 3 rounds. Reviewed-by: Jithu Joseph Reviewed-by: Kuppuswamy Sathyanarayanan Co-developed-by: Ashok Raj Signed-off-by: Ashok Raj Signed-off-by: Pengfei Xu Acked-by: Jithu Joseph Signed-off-by: Shuah Khan commit 20cef3039dcd6930e1a08c948a360eac5c0fce88 Author: Pengfei Xu Date: Fri May 31 15:53:48 2024 +0800 selftests: ifs: verify test image loading functionality Scan test image files have to be loaded before starting IFS test. Verify that In Field scan driver is able to load valid test image files. Also check if loading an invalid test image file fails. Reviewed-by: Jithu Joseph Reviewed-by: Kuppuswamy Sathyanarayanan Co-developed-by: Ashok Raj Signed-off-by: Ashok Raj Signed-off-by: Pengfei Xu Acked-by: Jithu Joseph Signed-off-by: Shuah Khan commit 8e51106d02d32cd83807fa56c602020c2309ace0 Author: Pengfei Xu Date: Fri May 31 15:53:47 2024 +0800 selftests: ifs: verify test interfaces are created by the driver IFS (In Field Scan) driver exposes its functionality via sysfs interfaces. Applications prepare and exercise the tests by interacting with the aforementioned sysfs files. Verify that the necessary sysfs entries are created after loading the IFS driver. Initialize test variables needed for building subsequent kself-test cases. Reviewed-by: Jithu Joseph Reviewed-by: Kuppuswamy Sathyanarayanan Co-developed-by: Ashok Raj Signed-off-by: Ashok Raj Signed-off-by: Pengfei Xu Acked-by: Jithu Joseph Signed-off-by: Shuah Khan commit df09b0bb09ea9775b66a5d24dc0fe0f86855efb5 Author: Zhu Jun Date: Tue Jul 9 23:57:59 2024 -0700 selftests/dma:remove unused variable The variable are never referenced in the code, just remove it that this problem was discovered by reading code Signed-off-by: Zhu Jun Signed-off-by: Shuah Khan commit e23b1e6a2b9c88c2a69c43f5e525fafec6d6bba0 Author: Zhu Jun Date: Tue Jul 9 19:11:36 2024 -0700 selftests/breakpoints:Remove unused variable This variable is never referenced in the code, just remove them that this problem was discovered by reading the code Signed-off-by: Zhu Jun Signed-off-by: Shuah Khan commit b84111cda99845b2ff248bae37b34f57882d513c Author: John Hubbard Date: Thu Jul 4 00:24:31 2024 -0700 selftests/x86: fix printk warnings reported by clang These warnings are all of the form, "the format specified a short (signed or unsigned) int, but the value is a full length int". Acked-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit 7d17b29b0e4b9a97426873f72e9cc6d35cfaf88f Author: John Hubbard Date: Thu Jul 4 00:24:30 2024 -0700 selftests/x86: remove (or use) unused variables and functions When building with clang, via: make LLVM=1 -C tools/testing/selftests ...quite a few functions are variables are generating "unused" warnings. Fix the warnings by deleting the unused items. One item, the "nerrs" variable in vsdo_restorer.c's main(), is unused but probably wants to be returned from main(), as a non-zero result. That result is also unused right now, so another option would be to delete it entirely, but this way, main() also gets fixed. It was missing a return value. Acked-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit a89e589051d48f605c11662c35c56be65e1bca64 Author: John Hubbard Date: Thu Jul 4 00:24:29 2024 -0700 selftests/x86: avoid -no-pie warnings from clang during compilation When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang warns that -no-pie is "unused during compilation". This occurs because clang only wants to see -no-pie during linking. Here, we don't have a separate linking stage, so a compiler warning is unavoidable without (wastefully) restructuring the Makefile. Avoid the warning by simply disabling that warning, for clang builds. Acked-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit 2ab9c93d6104e36110754d0778103f7f8719d969 Author: John Hubbard Date: Thu Jul 4 00:24:28 2024 -0700 selftests/x86: build sysret_rip.c with clang When building with clang, via: make LLVM=1 -C tools/testing/selftests ...the build fails because clang's inline asm doesn't support all of the features that are used in the asm() snippet in sysret_rip.c. Fix this by moving the asm code into the clang_helpers_64.S file, where it can be built with the assembler's full set of features. Acked-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit 1158655317b6b6e71980533939dce9ab91d9716b Author: John Hubbard Date: Thu Jul 4 00:24:27 2024 -0700 selftests/x86: build fsgsbase_restore.c with clang When building with clang, via: make LLVM=1 -C tools/testing/selftests Fix this by moving the inline asm to "pure" assembly, in two new files: clang_helpers_32.S, clang_helpers_64.S. As a bonus, the pure asm avoids the need for ifdefs, and is now very simple and easy on the eyes. Acked-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit bf967fb39e020f4426d13e634d21283758aea3c8 Author: Muhammad Usama Anjum Date: Thu Jul 4 00:24:26 2024 -0700 selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp Use fisttps instead of fisttp to specify correctly that the output variable is of size short. test_FISTTP.c:28:3: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') 28 | " fisttp res16""\n" | ^ :3:2: note: instantiated into assembly here 3 | fisttp res16 | ^ ...followed by three more cases of the same warning for other lines. [jh: removed a bit of duplication from the warnings report, above, and fixed a typo in the title] Signed-off-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit 825658b790330ed474547d2b1f87436879ca7da6 Author: John Hubbard Date: Thu Jul 4 00:24:25 2024 -0700 selftests/x86: fix Makefile dependencies to work with clang When building with clang, via: make LLVM=1 -C tools/testing/selftests ...the following build failure occurs in selftests/x86: clang: error: cannot specify -o when generating multiple output files This happens because, although gcc doesn't complain if you invoke it like this: gcc file1.c header2.h ...clang won't accept that form--it rejects the .h file(s). Also, the above approach is inaccurate anyway, because file.c includes header2.h in this case, and the inclusion of header2.h on the invocation is an artifact of the Makefile's desire to maintain dependencies. In Makefiles of this type, a better way to do it is to use Makefile dependencies to trigger the appropriate incremental rebuilds, and separately use file lists (see EXTRA_FILES in this commit) to track what to pass to the compiler. This commit splits those concepts up, by setting up both EXTRA_FILES and the Makefile dependencies with a single call to the new Makefile function extra-files. That fixes the build failure, while still providing the correct dependencies in all cases. Acked-by: Muhammad Usama Anjum Signed-off-by: John Hubbard Signed-off-by: Shuah Khan commit 4eddfafc902b28119c24189c5ba9469bd1607878 Author: John Hubbard Date: Wed Jul 3 19:42:02 2024 -0700 selftests/timers: remove unused irqcount variable When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about an unused irqcount variable. clang is correct: the variable is incremented and then ignored. Fix this by deleting the irqcount variable. Signed-off-by: John Hubbard Acked-by: John Stultz Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit b00db6fd2a301c5057d63c19d596818845c9a603 Author: Muhammad Usama Anjum Date: Wed Jun 12 12:27:23 2024 +0500 selftests: Add information about TAP conformance in tests Although "TAP" word is being used already in documentation, but it hasn't been defined in informative way for developers that how to write TAP conformant tests and what are the benefits. Write a short brief about it. Signed-off-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 0d66ddb296cc46d7b72d67cfaef0de03da092fcd Author: Ilpo Järvinen Date: Mon Jun 10 18:14:57 2024 +0300 selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl() write_bm_pid_to_resctrl() uses resctrl_val to check test name which is not a good interface generic resctrl FS functions should provide. Tests define mongrp when needed. Remove the test name check in write_bm_pid_to_resctrl() to only rely on the mongrp parameter being non-NULL. Remove write_bm_pid_to_resctrl() resctrl_val parameter and resctrl_val member from the struct resctrl_val_param that are not used anymore. Similarly, remove the test name constants that are no longer used. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit f58e66bed1b4563c8afd35d43dbd4fd361705789 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:56 2024 +0300 selftests/resctrl: Remove mongrp from CMT test The CMT selftest instantiates a monitor group to read LLC occupancy. Since the test also creates a control group, it is unnecessary to create another one for monitoring because control groups already provide monitoring too. Remove the unnecessary monitor group from the CMT selftest. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 64b0795192a8f7fa6baaeda2631a4134aa2c7e12 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:55 2024 +0300 selftests/resctrl: Remove mongrp from MBA test Nothing during MBA test uses mongrp even if it has been defined ever since the introduction of the MBA test in the commit 01fee6b4d1f9 ("selftests/resctrl: Add MBA test"). Remove the mongrp from MBA test. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit d14d94da0e3f1d7e598f88204cf37ee41a06f900 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:54 2024 +0300 selftests/resctrl: Convert ctrlgrp & mongrp to pointers The struct resctrl_val_param has control and monitor groups as char arrays but they are not supposed to be mutated within resctrl_val(). Convert the ctrlgrp and mongrp char array within resctrl_val_param to plain const char pointers and adjust the strlen() based checks to check NULL instead. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 909592b5dafa3680994b1d5144b6d5781eb49ab8 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:53 2024 +0300 selftests/resctrl: Make some strings passed to resctrlfs functions const Control group, monitor group and resctrl_val are not mutated and should not be mutated within resctrlfs.c functions. Mark this by using const char * for the arguments. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit fa1116d06ebc4673c4e8ca23d8e7ef73db544480 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:52 2024 +0300 selftests/resctrl: Simplify bandwidth report type handling bw_report is only needed for selecting the correct value from the values IMC measured. It is a member in the resctrl_val_param struct and is always set to "reads". The value is then checked in resctrl_val() using validate_bw_report_request() that besides validating the input, assumes it can mutate the string which is questionable programming practice. Simplify handling bw_report: - Convert validate_bw_report_request() into get_bw_report_type() that inputs and returns const char *. Use NULL to indicate error. - Validate the report types inside measure_mem_bw(), not in resctrl_val(). - Pass bw_report to measure_mem_bw() from ->measure() hook because resctrl_val() no longer needs bw_report for anything. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit aef5efa64426396cac5b0126cbb6071e92d5da24 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:51 2024 +0300 selftests/resctrl: Add ->init() callback into resctrl_val_param The struct resctrl_val_param is there to customize behavior inside resctrl_val() which is currently not used to full extent and there are number of strcmp()s for test name in resctrl_val done by resctrl_val(). Create ->init() hook into the struct resctrl_val_param to cleanly do per test initialization. Remove also unused branches to setup paths and the related #defines for CMT test. While touching kerneldoc, make the adjacent line consistent with the newly added form (callback vs call back). Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 0e251816995a1972062fc7ad32047c1aee9cd704 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:50 2024 +0300 selftests/resctrl: Add ->measure() callback to resctrl_val_param The measurement done in resctrl_val() varies depending on test type. The decision for how to measure is decided based on the string compare to test name which is quite inflexible. Add ->measure() callback into the struct resctrl_val_param to allow each test to provide necessary code as a function which simplifies what resctrl_val() has to do. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 711d27b05a97cd5c8e62c858c2c940d79f8445e1 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:49 2024 +0300 selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests initialize_mem_bw_resctrl() and set_mbm_path() contain complicated set of conditions, each yielding different file to be opened to measure memory bandwidth through resctrl FS. In practice, only two of them are used. For MBA test, ctrlgrp is always provided, and for MBM test both ctrlgrp and mongrp are set. The file used differ between MBA/MBM test, however, MBM test unnecessarily create monitor group because resctrl FS already provides monitoring interface underneath any ctrlgrp too, which is what the MBA selftest uses. Consolidate memory bandwidth file used to the one used by the MBA selftest. Remove all unused branches opening other files to simplify the code. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit bc074b6321d73295dcfe8c450c8f5245c530bb4e Author: Ilpo Järvinen Date: Mon Jun 10 18:14:48 2024 +0300 selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document measure_vals() is awfully generic name so rename it to measure_mem_bw() to describe better what it does and document the function parameters. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit b0bd742a1379dff238efcf67c2cb0c518ee0b691 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:47 2024 +0300 selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope 'bm_pid' and 'ppid' are global variables. As they are used by different processes and in signal handler, they cannot be entirely converted into local variables. The scope of those variables can still be reduced into resctrl_val.c only. As PARENT_EXIT() macro is using 'ppid', make it a function in resctrl_val.c and pass ppid to it as an argument because it is easier to understand than using the global variable directly. Pass 'bm_pid' into measure_vals() instead of relying on the global variable which helps to make the call signatures of measure_vals() and measure_llc_resctrl() more similar to each other. Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 8245a70edad18e5eba479c5ea91beb590590b237 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:46 2024 +0300 selftests/resctrl: Use correct type for pids A few functions receive PIDs through int arguments. PIDs variables should be of type pid_t, not int. Convert pid arguments from int to pid_t. Before printing PID, match the type to %d by casting to int which is enough for Linux (standard would allow using a longer integer type but generalizing for that would complicate the code unnecessarily, the selftest code does not need to be portable). Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 9224db5180f244f169fb81a3c88c48bf612ba238 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:45 2024 +0300 selftests/resctrl: Consolidate get_domain_id() into resctrl_val() Both initialize_mem_bw_resctrl() and initialize_llc_occu_resctrl() that are called from resctrl_val() need to determine domain ID to construct resctrl fs related paths. Both functions do it by taking CPU ID which neither needs for any other purpose than determining the domain ID. Consolidate determining the domain ID into resctrl_val() and pass the domain ID instead of CPU ID to initialize_mem_bw_resctrl() and initialize_llc_occu_resctrl(). Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 2704b2d117c52cd156bcdcad1eefd9c2dad1794d Author: Ilpo Järvinen Date: Mon Jun 10 18:14:44 2024 +0300 selftests/resctrl: Make "bandwidth" consistent in comments & prints Resctrl selftests refer to "bandwidth" currently in two other forms in the code ("B/W" and "band width"). Use "bandwidth" consistently everywhere. While at it, fix also one "over flow" -> "overflow" on a line that is touched by the change. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit da50de0a92f31605423e39e6ccf3ce7508e88a7a Author: Ilpo Järvinen Date: Mon Jun 10 18:14:43 2024 +0300 selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs the measurement over a duration of sleep(1) call. The memory bandwidth numbers from IMC are derived over this duration. The resctrl FS derived memory bandwidth, however, is calculated inside measure_vals() and only takes delta between the previous value and the current one which besides the actual test, also samples inter-test noise. Rework the logic in measure_vals() and get_mem_bw_imc() such that the resctrl FS memory bandwidth section covers much shorter duration closely matching that of the IMC perf counters to improve measurement accuracy. For the second read after rewind() to return a fresh value, also newline has to be consumed by the fscanf(). Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit c44000b6535dc9806b9128d1aed403862b2adab9 Author: Ilpo Järvinen Date: Mon Jun 10 18:14:42 2024 +0300 selftests/resctrl: Fix closing IMC fds on error and open-code R+W instead of loops The imc perf fd close() calls are missing from all error paths. In addition, get_mem_bw_imc() handles fds in a for loop but close() is based on two fixed indexes READ and WRITE. Open code inner for loops to READ+WRITE entries for clarity and add a function to close() IMC fds properly in all cases. Fixes: 7f4d257e3a2a ("selftests/resctrl: Add callback to start a benchmark") Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit b47619a3a3f79f75edf774275798aad1a37609ad Author: aigourensheng Date: Tue Jun 11 01:18:34 2024 -0400 selftests/sched: fix code format issues There are extra spaces in the middle of #define. It is recommended to delete the spaces to make the code look more comfortable. Signed-off-by: aigourensheng Signed-off-by: Shuah Khan commit a84a0c6a6d40b73f01033249ebe45c9484558539 Author: John Hubbard Date: Fri May 31 11:37:51 2024 -0700 selftests/lib.mk: silence some clang warnings that gcc already ignores gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. The warnings are not useful for the kernel itself, which is why they have remained disabled in gcc for the main kernel build. And it is only due to including kernel data structures in the selftests, that we get the warnings from clang. -Waddress-of-packed-member -Wgnu-variable-sized-type-not-at-end In other words, the warnings are not unique to the selftests: there is nothing that the selftests' code does that triggers these warnings, other than the act of including the kernel's data structures. Therefore, silence them for the clang builds as well. This eliminates warnings for the net/ and user_events/ kselftest subsystems, in these files: ./net/af_unix/scm_rights.c ./net/timestamping.c ./net/ipsec.c ./user_events/perf_test.c Cc: Nathan Chancellor Signed-off-by: John Hubbard Acked-by: Nathan Chancellor Signed-off-by: Shuah Khan commit 7b1fdf2ba4bc1434bb4c0077d7c9079a5a45df27 Author: Suren Baghdasaryan Date: Thu Jul 11 10:02:16 2024 -0700 mm, slab: move prepare_slab_obj_exts_hook under CONFIG_MEM_ALLOC_PROFILING The only place prepare_slab_obj_exts_hook() is currently being used is from alloc_tagging_slab_alloc_hook() when CONFIG_MEM_ALLOC_PROFILING=y. Move its definition under CONFIG_MEM_ALLOC_PROFILING to prevent unused function warning for CONFIG_SLAB_OBJ_EXT=n case. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407050845.zNONqauD-lkp@intel.com/ Signed-off-by: Suren Baghdasaryan Cc: Vlastimil Babka Reviewed-by: Xiongwei Song Signed-off-by: Vlastimil Babka commit 4c8c36fe4e3b3f7d321f885b76afdf858962335b Author: Simon Horman Date: Fri Jul 5 14:15:40 2024 +0100 i40e: correct i40e_addr_to_hkey() name in kdoc Correct name of i40e_addr_to_hkey() in it's kdoc. kernel-doc -none reports: drivers/net/ethernet/intel/i40e/i40e.h:739: warning: expecting prototype for i40e_mac_to_hkey(). Prototype was for i40e_addr_to_hkey() instead Signed-off-by: Simon Horman Reviewed-by: Przemek Kitszel Signed-off-by: Tony Nguyen commit bf130ed3aaa37bbd9c7f4b305c42e02128187cd4 Author: Tony Nguyen Date: Tue Jul 2 14:38:46 2024 -0700 net: intel: Remove MODULE_AUTHORs We are moving away from the Sourceforge email address. Rather than removing or updating the email for the affected entries, remove the MODULE_AUTHOR altogether as its usage is incorrect [1]. Link: https://lore.kernel.org/netdev/20200626115236.7f36d379@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/ [1] Reviewed-by: Jesse Brandeburg Acked-by: Alexander Lobakin # libeth, libie Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen commit a6a9fcb10836105e525ccb8bc1a6af4b20a113be Author: Colin Ian King Date: Tue Jul 9 11:52:22 2024 +0100 net: pse-pd: pd692x0: Fix spelling mistake "availables" -> "available" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Acked-by: Kory Maincent Link: https://patch.msgid.link/20240709105222.168306-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit 8c98dddc233c233a35e56b49d5cd9e032d442300 Author: Philipp Zabel Date: Wed Jul 10 12:28:32 2024 +0200 Input: exc3000 - add EXC81W32 support Add support for EXC81W32 controllers. Tested with firmware reported as type "PCAP81X32 Series", model "Orion_0183_1019", fw_version "8001280G". Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20240710-input-exc3000-exc81w32-v3-2-4272183628b4@pengutronix.de Signed-off-by: Dmitry Torokhov commit 87d9d1e3eb5daa45764ea5a5f387ab8b337fcf88 Author: Philipp Zabel Date: Wed Jul 10 12:28:31 2024 +0200 dt-bindings: input: touchscreen: exc3000: add EXC81W32 Add compatible for EXC81W32 touchscreen controllers. They use the same protocol and have the same resolution as EXC80H84. Signed-off-by: Philipp Zabel Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240710-input-exc3000-exc81w32-v3-1-4272183628b4@pengutronix.de Signed-off-by: Dmitry Torokhov commit f48ecbd2ce1ca2b0c92843f67879b583b1f85cda Author: Dmitry Torokhov Date: Tue Jul 9 17:04:35 2024 -0700 Input: twl4030-pwrbutton - fix kernel-doc warning Do not use kernel-doc style for comment describing contents of the source file, as it trips the script: scripts/kernel-doc -none drivers/input/misc/twl4030-pwrbutton.c drivers/input/misc/twl4030-pwrbutton.c:2: info: Scanning doc for function twl4030 drivers/input/misc/twl4030-pwrbutton.c:33: warning: expecting prototype for twl4030(). Prototype was for PWR_PWRON_IRQ() instead 1 warnings Also remove file name from the same comment - it it not the best idea to have it as they tend to get stale when sources get moved or renamed. Reported-by: Mirsad Todorovac Tested-by: Mirsad Todorovac Link: https://lore.kernel.org/r/Zo3QE00GqCrA3M9b@google.com Signed-off-by: Dmitry Torokhov commit e10989e56f5231934103d5a4c7c8926c783924ca Author: Marcin Szycik Date: Thu Jun 27 16:55:47 2024 +0200 ice: Add tracepoint for adding and removing switch rules Track the number of rules and recipes added to switch. Add a tracepoint to ice_aq_sw_rules(), which shows both rule and recipe count. This information can be helpful when designing a set of rules to program to the hardware, as it shows where the practical limit is. Actual limits are known (64 recipes, 32k rules), but it's hard to translate these values to how many rules the *user* can actually create, because of extra metadata being implicitly added, and recipe/rule chaining. Chaining combines several recipes/rules to create a larger recipe/rule, so one large rule added by the user might actually consume multiple rules from hardware perspective. Rule counter is simply incremented/decremented in ice_aq_sw_rules(), since all rules are added or removed via it. Counting recipes is harder, as recipes can't be removed (only overwritten). Recipes added via ice_aq_add_recipe() could end up being unused, when there is an error in later stages of rule creation. Instead, track the allocation and freeing of recipes, which should reflect the actual usage of recipes (if something fails after recipe(s) were created, caller should free them). Also, a number of recipes are loaded from NVM by default - initialize the recipe counter with the number of these recipes on switch initialization. Example configuration: cd /sys/kernel/tracing echo function > current_tracer echo ice_aq_sw_rules > set_ftrace_filter echo ice_aq_sw_rules > set_event echo 1 > tracing_on cat trace Example output: tc-4097 [069] ...1. 787.595536: ice_aq_sw_rules <-ice_rem_adv_rule tc-4097 [069] ..... 787.595705: ice_aq_sw_rules: rules=9 recipes=15 tc-4098 [057] ...1. 787.652033: ice_aq_sw_rules <-ice_add_adv_rule tc-4098 [057] ..... 787.652201: ice_aq_sw_rules: rules=10 recipes=16 Reviewed-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 1d2ac128531e381dab5bb7fd21f95cf2d075bff5 Author: Marcin Szycik Date: Thu Jun 27 16:55:46 2024 +0200 ice: Remove unused members from switch API Remove several members of struct ice_sw_recipe and struct ice_prot_lkup_ext. Remove struct ice_recp_grp_entry and struct ice_pref_recipe_group, since they are now unused as well. All of the deleted members were only written to and never read, so it's pointless to keep them. Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 2ecdd4ba47fc499ff610d49cb42df7ef27d0292e Author: Marcin Szycik Date: Thu Jun 27 16:55:45 2024 +0200 ice: Optimize switch recipe creation Currently when creating switch recipes, switch ID is always added as the first word in every recipe. There are only 5 words in a recipe, so one word is always wasted. This is also true for the last recipe, which stores result indexes (in case of chain recipes). Therefore the maximum usable length of a chain recipe is 4 * 4 = 16 words. 4 words in a recipe, 4 recipes that can be chained (using a 5th one for result indexes). Current max size chained recipe: 0: smmmm 1: smmmm 2: smmmm 3: smmmm 4: srrrr Where: s - switch ID m - regular match (e.g. ipv4 src addr, udp dst port, etc.) r - result index Switch ID does not actually need to be present in every recipe, only in one of them (in case of chained recipe). This frees up to 8 extra words: 3 from recipes in the middle (because first recipe still needs to have switch ID), and 5 from one extra recipe (because now the last recipe also does not have switch ID, so it can chain 1 more recipe). Max size chained recipe after changes: 0: smmmm 1: Mmmmm 2: Mmmmm 3: Mmmmm 4: MMMMM 5: Rrrrr Extra usable words available after this change are highlighted with capital letters. Changing how switch ID is added is not straightforward, because it's not a regular lookup. Its FV index and mask can't be determined based on protocol + offset pair read from package and instead need to be added manually. Additionally, change how result indexes are added. Currently they are always inserted in a new recipe at the end. Example for 13 words, (with above optimization, switch ID being one of the words): 0: smmmm 1: mmmmm 2: mmmxx 3: rrrxx Where: x - unused word In this and some other cases, the result indexes can be moved just after last matches because there are unused words, saving one recipe. Example for 13 words after both optimizations: 0: smmmm 1: mmmmm 2: mmmrr Note how one less result index is needed in this case, because the last recipe does not need to "link" to itself. There are cases when adding an additional recipe for result indexes cannot be avoided. In that cases result indexes are all put in the last recipe. Example for 14 words after both optimizations: 0: smmmm 1: mmmmm 2: mmmmx 3: rrrxx With these two changes, recipes/rules are more space efficient, allowing more to be created in total. Co-developed-by: Michal Swiatkowski Signed-off-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit f7d43dd206e7e18c182f200e67a8db8c209907fa Author: Yu Liao Date: Thu Jul 11 20:48:43 2024 +0800 tick/broadcast: Make takeover of broadcast hrtimer reliable Running the LTP hotplug stress test on a aarch64 machine results in rcu_sched stall warnings when the broadcast hrtimer was owned by the un-plugged CPU. The issue is the following: CPU1 (owns the broadcast hrtimer) CPU2 tick_broadcast_enter() // shutdown local timer device broadcast_shutdown_local() ... tick_broadcast_exit() clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT) // timer device is not programmed cpumask_set_cpu(cpu, tick_broadcast_force_mask) initiates offlining of CPU1 take_cpu_down() /* * CPU1 shuts down and does not * send broadcast IPI anymore */ takedown_cpu() hotplug_cpu__broadcast_tick_pull() // move broadcast hrtimer to this CPU clockevents_program_event() bc_set_next() hrtimer_start() /* * timer device is not programmed * because only the first expiring * timer will trigger clockevent * device reprogramming */ What happens is that CPU2 exits broadcast mode with force bit set, then the local timer device is not reprogrammed and CPU2 expects to receive the expired event by the broadcast IPI. But this does not happen because CPU1 is offlined by CPU2. CPU switches the clockevent device to ONESHOT state, but does not reprogram the device. The subsequent reprogramming of the hrtimer broadcast device does not program the clockevent device of CPU2 either because the pending expiry time is already in the past and the CPU expects the event to be delivered. As a consequence all CPUs which wait for a broadcast event to be delivered are stuck forever. Fix this issue by reprogramming the local timer device if the broadcast force bit of the CPU is set so that the broadcast hrtimer is delivered. [ tglx: Massage comment and change log. Add Fixes tag ] Fixes: 989dcb645ca7 ("tick: Handle broadcast wakeup of multiple cpus") Signed-off-by: Yu Liao Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240711124843.64167-1-liaoyu15@huawei.com commit cb1f1c7d38b56b6289e4e6dde554321be2dd4530 Author: Stanislav Jakubek Date: Tue Jul 9 08:30:18 2024 +0200 dt-bindings: mmc: sdhci-sprd: convert to YAML Covert the Spreadtrum SDHCI controller bindings to DT schema. Rename the file to match compatible. Drop assigned-* properties as these should not be needed. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stanislav Jakubek Link: https://lore.kernel.org/r/ZozY+tOkzK9yfjbo@standask-GA-A55M-S2HP Signed-off-by: Ulf Hansson commit ca04fff3886d449a6549929d487b4179214144fd Author: Bastien Curutchet Date: Thu Jul 11 10:18:38 2024 +0200 mmc: davinci_mmc: report all possible bus widths A dev_info() at probe's end() report the supported bus width. It never reports 8-bits width while the driver can handle it. Update the info message at then end of the probe to report the use of 8-bits data when needed. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240711081838.47256-3-bastien.curutchet@bootlin.com Signed-off-by: Ulf Hansson commit 796826bc61b60212570f6795b97bdef64bc16749 Merge: c17aecf85800a 16198eef11c19 Author: Ulf Hansson Date: Thu Jul 11 17:58:04 2024 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v6.10-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.11. Signed-off-by: Ulf Hansson commit 589dd7145a8ea6bcc6faa286205e467ba5403f79 Author: Michal Swiatkowski Date: Thu Jun 27 16:55:44 2024 +0200 ice: remove unused recipe bookkeeping data Remove root_buf from recipe struct. Its only usage was in ice_find_recp(), where if recipe had an inverse action, it was skipped, but actually the driver never adds inverse actions, so effectively it was pointless. Without root_buf, the recipe data element in ice_add_sw_recipe() does not need to be persistent and can also be automatically deallocated with __free, which nicely simplifies unroll. Signed-off-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit c9b8cd139c1dfb95eb86fd6a58cfe2089843d1d4 Author: Clément Léger Date: Wed Apr 10 16:45:57 2024 +0200 riscv: hwprobe: export highest virtual userspace address Some userspace applications (OpenJDK for instance) uses the free MSBs in pointers to insert additional information for their own logic and need to get this information from somewhere. Currently they rely on parsing /proc/cpuinfo "mmu=svxx" string to obtain the current value of virtual address usable bits [1]. Since this reflect the raw supported MMU mode, it might differ from the logical one used internally which is why arch_get_mmap_end() is used. Exporting the highest mmapable address through hwprobe will allow a more stable interface to be used. For that purpose, add a new hwprobe key named RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS which will export the highest userspace virtual address. Link: https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp#L171 [1] Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240410144558.1104006-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 19d3c179a37730caf600a97fed3794feac2b197b Author: Puranjay Mohan Date: Thu Jul 11 15:18:38 2024 +0000 bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG When BPF_TRAMP_F_CALL_ORIG is set, the trampoline calls __bpf_tramp_enter() and __bpf_tramp_exit() functions, passing them the struct bpf_tramp_image *im pointer as an argument in R0. The trampoline generation code uses emit_addr_mov_i64() to emit instructions for moving the bpf_tramp_image address into R0, but emit_addr_mov_i64() assumes the address to be in the vmalloc() space and uses only 48 bits. Because bpf_tramp_image is allocated using kzalloc(), its address can use more than 48-bits, in this case the trampoline will pass an invalid address to __bpf_tramp_enter/exit() causing a kernel crash. Fix this by using emit_a64_mov_i64() in place of emit_addr_mov_i64() as it can work with addresses that are greater than 48-bits. Fixes: efc9909fdce0 ("bpf, arm64: Add bpf trampoline for arm64") Signed-off-by: Puranjay Mohan Signed-off-by: Daniel Borkmann Closes: https://lore.kernel.org/all/SJ0PR15MB461564D3F7E7A763498CA6A8CBDB2@SJ0PR15MB4615.namprd15.prod.outlook.com/ Link: https://lore.kernel.org/bpf/20240711151838.43469-1-puranjay@kernel.org commit 3125eb5595904c41f93587e35712acffa51e14c8 Author: Michal Swiatkowski Date: Thu Jun 27 16:55:43 2024 +0200 ice: Simplify bitmap setting in adding recipe Remove unnecessary size checks when copying bitmaps in ice_add_sw_recipe() and replace them with compile time assert. Check if the bitmaps are equal size, as they are copied both ways. Signed-off-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Co-developed-by: Marcin Szycik Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit c563908494e9578da70a11d49f6ad75c56fe8d48 Author: Michal Swiatkowski Date: Thu Jun 27 16:55:42 2024 +0200 ice: Remove reading all recipes before adding a new one The content of the first read recipe is used as a template when adding a recipe. It isn't needed - only prune index is directly set from there. Set it in the code instead. Also, now there's no need to set rid and lookup indexes to 0, as the whole recipe buffer is initialized to 0. Signed-off-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit e247267bbeaf0d904b95765b2721495f6581eb65 Author: Marcin Szycik Date: Thu Jun 27 16:55:41 2024 +0200 ice: Remove unused struct ice_prot_lkup_ext members Remove field_off as it's never used. Remove done bitmap, as its value is only checked and never assigned. Reusing sub-recipes while creating new root recipes is currently not supported in the driver. Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit b4e891901ed5409f4c33d12fd92011be925ef5b3 Author: Steven Price Date: Wed Jun 12 17:00:38 2024 +0100 fixmap: Remove unused set_fixmap_offset_io() The macro set_fixmap_offset_io() was added in commit f774b7d10e21 ("arm64: fixmap: fix missing sub-page offset for earlyprintk") but then commit 8ef0ed95ee04 ("arm64: remove arch specific earlyprintk") removed the file causing the only user to be removed when the two commits were merged. Since this has never been used again since the v3.15 release remove it. Signed-off-by: Steven Price Signed-off-by: Arnd Bergmann commit c298391abf6505c4040632b310a14f6bd9b7afff Author: Dmitry Torokhov Date: Wed Jul 3 12:05:23 2024 -0700 mfd: timberdale: Attach device properties to TSC2007 board info Switch over to using software nodes/properties to describe the touchscreen instead of using the legacy platform data. This will allow to drop support for the platform data from TSC2007 driver and rely solely on the generic driver properties. Note: "model" is not part of defined device properties and is not used by the TSC2007 driver, so it can be safely dropped. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/ZoWg89A8C4gylTGX@google.com Signed-off-by: Lee Jones commit 609458abd5a10180f513ca364d6c0ae30128c821 Author: Nirmoy Das Date: Mon Jul 8 14:59:18 2024 +0200 drm/xe/display/xe_hdcp_gsc: Free arbiter on driver removal Free arbiter allocated in intel_hdcp_gsc_init(). Fixes: 152f2df954d8 ("drm/xe/hdcp: Enable HDCP for XE") Cc: Suraj Kandpal Cc: Arun R Murthy Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240708125918.23573-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das (cherry picked from commit 33891539f9d6f245e93a76e3fb5791338180374f) Signed-off-by: Lucas De Marchi commit 5207c393d3e7dda9aff813d6b3e2264370d241be Author: Thomas Hellström Date: Fri Jul 5 15:28:28 2024 +0200 drm/xe: Use write-back caching mode for system memory on DGFX The caching mode for buffer objects with VRAM as a possible placement was forced to write-combined, regardless of placement. However, write-combined system memory is expensive to allocate and even though it is pooled, the pool is expensive to shrink, since it involves global CPU TLB flushes. Moreover write-combined system memory from TTM is only reliably available on x86 and DGFX doesn't have an x86 restriction. So regardless of the cpu caching mode selected for a bo, internally use write-back caching mode for system memory on DGFX. Coherency is maintained, but user-space clients may perceive a difference in cpu access speeds. v2: - Update RB- and Ack tags. - Rephrase wording in xe_drm.h (Matt Roper) v3: - Really rephrase wording. Signed-off-by: Thomas Hellström Fixes: 622f709ca629 ("drm/xe/uapi: Add support for CPU caching mode") Cc: Pallavi Mishra Cc: Matthew Auld Cc: dri-devel@lists.freedesktop.org Cc: Joonas Lahtinen Cc: Effie Yu Cc: Matthew Brost Cc: Maarten Lankhorst Cc: Jose Souza Cc: Michal Mrozek Cc: # v6.8+ Acked-by: Matthew Auld Acked-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Fixes: 622f709ca629 ("drm/xe/uapi: Add support for CPU caching mode") Acked-by: Michal Mrozek Acked-by: Effie Yu #On chat Link: https://patchwork.freedesktop.org/patch/msgid/20240705132828.27714-1-thomas.hellstrom@linux.intel.com (cherry picked from commit 01e0cfc994be484ddcb9e121e353e51d8bb837c0) Signed-off-by: Lucas De Marchi commit 11b1a666c16d29ee9c1ebc954cda3fc9a2575fe3 Author: Nicolas Ferre Date: Wed Jul 10 18:26:15 2024 +0200 dt-bindings: i2c: at91: Add sama7d65 compatible string Add compatible string for sama7d65. Like sama7g5, it currently binds to "microchip,sam9x60-i2c" compatible string for this driver. Signed-off-by: Nicolas Ferre Acked-by: Krzysztof Kozlowski Signed-off-by: Andi Shyti commit 9fe6a8c5b247e182c1781556794324a8e26a7cd3 Author: Juergen Gross Date: Wed Jul 10 13:01:39 2024 +0200 x86/xen: remove deprecated xen_nopvspin boot parameter The xen_nopvspin boot parameter is deprecated since 2019. nopvspin can be used instead. Remove the xen_nopvspin boot parameter and replace the xen_pvspin variable use cases with nopvspin. This requires to move the nopvspin variable out of the .initdata section, as it needs to be accessed for cpuhotplug, too. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Message-ID: <20240710110139.22300-1-jgross@suse.com> Signed-off-by: Juergen Gross commit 556bc13776a7e27d1b8f4bfc92340428846774f4 Author: Neil Armstrong Date: Wed Jul 10 19:02:52 2024 +0200 dt-bindings: trivial-devices: document the Sierra Wireless mangOH Green SPI IoT interface Document the Sierra Wireless mangOH Green SPI IoT interface as a trivial device. This fixes the following check: qcom-mdm9615-wp8548-mangoh-green.dtb: /soc/gsbi@16200000/spi@16280000/spi@0: failed to match any schema with compatible: ['swir,mangoh-iotport-spi'] Signed-off-by: Neil Armstrong Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240710-topic-mdm9615-mangoh-iotport-spi-bindings-v1-1-3efe20cfea8a@linaro.org Signed-off-by: Rob Herring (Arm) commit bcea31e2d1c7a34aeeae9458f38833d5a8409cf7 Author: Juergen Gross Date: Wed Jul 10 11:37:18 2024 +0200 x86/xen: eliminate some private header files Under arch/x86/xen there is one large private header file xen-ops.h containing most of the Xen-private x86 related declarations, and then there are several small headers with a handful of declarations each. Merge the small headers into xen-ops.h. While doing that, move the declaration of xen_fifo_events from xen-ops.h into include/xen/events.h where it should have been from the beginning. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Message-ID: <20240710093718.14552-3-jgross@suse.com> Signed-off-by: Juergen Gross commit 337c628ab74d1bbfe5377bbd8d31c858baf5fbc6 Author: Juergen Gross Date: Wed Jul 10 11:37:17 2024 +0200 x86/xen: make some functions static Some functions and variables in arch/x86/xen are used locally only, make them static. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Message-ID: <20240710093718.14552-2-jgross@suse.com> Signed-off-by: Juergen Gross commit 942d917cb92af2277db9e3be0d62345d770d5996 Author: Juergen Gross Date: Wed Jul 10 11:27:49 2024 +0200 xen: make multicall debug boot time selectable Today Xen multicall debugging needs to be enabled via modifying a define in a source file for getting debug data of multicall errors encountered by users. Switch multicall debugging to depend on a boot parameter "xen_mc_debug" instead, enabling affected users to boot with the new parameter set in order to get better diagnostics. With debugging enabled print the following information in case at least one of the batched calls failed: - all calls of the batch with operation, result and caller - all parameters of each call - all parameters stored in the multicall data for each call Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Message-ID: <20240710092749.13595-1-jgross@suse.com> Signed-off-by: Juergen Gross commit 8e7860543a94784d744c7ce34b78a2e11beefa5c Author: Filipe Manana Date: Thu Jul 4 16:11:20 2024 +0100 btrfs: fix extent map use-after-free when adding pages to compressed bio At add_ra_bio_pages() we are accessing the extent map to calculate 'add_size' after we dropped our reference on the extent map, resulting in a use-after-free. Fix this by computing 'add_size' before dropping our extent map reference. Reported-by: syzbot+853d80cba98ce1157ae6@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/000000000000038144061c6d18f2@google.com/ Fixes: 6a4049102055 ("btrfs: subpage: make add_ra_bio_pages() compatible") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0aef1d41c61b52b21e1750e7b53447126ff257de Author: Kees Cook Date: Wed Jul 10 15:57:34 2024 -0700 affs: struct slink_front: Replace 1-element array with flexible array Replace the deprecated[1] use of a 1-element array in struct slink_front with a modern flexible array. No binary differences are present after this conversion. Link: https://github.com/KSPP/linux/issues/79 [1] Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Reviewed-by: David Sterba Signed-off-by: David Sterba commit e5f5ee827cda0933b46dacb123a53a58c1c656e8 Author: Kees Cook Date: Wed Jul 10 15:57:25 2024 -0700 affs: struct affs_data_head: Replace 1-element array with flexible array Replace the deprecated[1] use of a 1-element array in struct affs_data_head with a modern flexible array. No binary differences are present after this conversion. Link: https://github.com/KSPP/linux/issues/79 [1] Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Reviewed-by: David Sterba Signed-off-by: David Sterba commit 38a381a0bc57be2927c6744733ba274cefd13e9f Author: Kees Cook Date: Wed Jul 10 15:57:09 2024 -0700 affs: struct affs_head: Replace 1-element array with flexible array AFFS uses struct affs_head's "table" array as a flexible array. Switch this to a proper flexible array[1]. There are no sizeof() uses; struct affs_head is only ever uses via direct casts. No binary output differences were found after this change. Link: https://github.com/KSPP/linux/issues/79 [1] Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Reviewed-by: David Sterba Signed-off-by: David Sterba commit a3da15389112a28633e4c340e4841faab29df3b7 Author: Andreas Larsson Date: Wed Jul 10 11:41:55 2024 +0200 sparc64: Fix prototype warnings in hibernate.c Fix the following warnings: arch/sparc/power/hibernate.c:22:5: warning: no previous prototype for ‘pfn_is_nosave’ arch/sparc/power/hibernate.c:30:6: warning: no previous prototype for ‘save_processor_state’ arch/sparc/power/hibernate.c:35:6: warning: no previous prototype for ‘restore_processor_state’ The prototypes are available from linux/suspend.h so include that. Link: https://lore.kernel.org/r/20240710094155.458731-5-andreas@gaisler.com Signed-off-by: Andreas Larsson commit a9f52913ac60e7fc14306e7149e6c4e81e771f92 Author: Andreas Larsson Date: Wed Jul 10 11:41:54 2024 +0200 sparc64: Fix prototype warning for prom_get_mmu_ihandle arch/sparc/prom/misc_64.c:165:5: warning: no previous prototype for ‘prom_get_mmu_ihandle’ The function prom_get_mmu_ihandle has no users outside of misc_64.c so declare it static. Link: https://lore.kernel.org/r/20240710094155.458731-4-andreas@gaisler.com Signed-off-by: Andreas Larsson commit a6c3ea1ec96307dbfbb2f16d96c674c5cc80f445 Author: Andreas Larsson Date: Wed Jul 10 11:41:53 2024 +0200 sparc64: Fix incorrect function signature and add prototype for prom_cif_init Remove the unused cif_stack argument and add a protype in oplib_64.h Commit ef3e035c3a9b ("sparc64: Fix register corruption in top-most kernel stack frame during boot.") removed the cif_stack argument to prom_cif init in the declaration at the caller site and the usage of it within prom_cif_init, but not in the function signature of the function itself. This also fixes the following warning: arch/sparc/prom/p1275.c:52:6: warning: no previous prototype for ‘prom_cif_init’ Fixes: ef3e035c3a9b ("sparc64: Fix register corruption in top-most kernel stack frame during boot.") Link: https://lore.kernel.org/r/20240710094155.458731-3-andreas@gaisler.com Signed-off-by: Andreas Larsson commit 4c207db87d003c0dd1c59e41b355ab0a14f7a445 Author: Andreas Larsson Date: Wed Jul 10 11:41:52 2024 +0200 sparc64: Fix prototype warnings for floppy_64.h Fix the following warnings: arch/sparc/include/asm/floppy_64.h:200:13: warning: no previous prototype for ‘sparc_floppy_irq’ arch/sparc/include/asm/floppy_64.h:437:6: warning: no previous prototype for ‘sun_pci_fd_dma_callback’ Both sparc_floppy_irq and sun_pci_fd_dma_callback are only used within arch/sparc/include/asm/floppy_64.h that is included only by drivers/block/floppy.c, so declare them static. Link: https://lore.kernel.org/r/20240710094155.458731-2-andreas@gaisler.com Signed-off-by: Andreas Larsson commit a7ec177ebc447d541cf25171ba3f5c36e4acc206 Author: Andreas Larsson Date: Wed Jul 10 11:23:41 2024 +0200 sparc32: Fix truncated relocation errors when linking large kernels Use jumps instead of branches when jumping from one section to another to avoid branches to addresses further away than 22 bit offsets can handle that results in errors such as arch/sparc/kernel/signal_32.o:(.fixup+0x0): relocation truncated to fit: R_SPARC_WDISP22 against `.text' This is the same approach that was taken for sparc64 in commit 52eb053b7191 ("[SPARC64]: Fix linkage of enormous kernels.") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405080936.tWaJdO3P-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202406240441.5zaoshVX-lkp@intel.com/ Link: https://lore.kernel.org/r/20240710092341.457591-1-andreas@gaisler.com Signed-off-by: Andreas Larsson commit 26d289158e491d5ae34b10eab40b093a40fab7d7 Author: Matthew Brost Date: Mon Jul 8 14:10:08 2024 -0700 drm/xe: Drop trace_xe_hw_fence_free fence->ctx may be stale memory when trace_xe_hw_fence_free is called resuling UAF bug when deriving the device name. This tracepoint is not all that useful, so just drop it. Fixes: 501c4255c409 ("drm/xe/trace: Print device_id in xe_trace events") Cc: Ville Syrjälä Cc: Lucas De Marchi Cc: Gustavo Sousa Cc: Radhakrishna Sripada Cc: Matt Roper Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240708211008.956384-1-matthew.brost@intel.com (cherry picked from commit caaf1f44a6a27bae33eee189842c4d8fc21c3b02) Signed-off-by: Rodrigo Vivi commit 63347fe031e3bd738a2a16aee8eba889376e49a8 Author: Ashutosh Dixit Date: Wed Jul 3 09:48:01 2024 -0700 drm/xe/uapi: Rename xe perf layer as xe observation layer In Xe, the perf layer allows capture of HW counter streams. These HW counters are generally performance related but don't have to be necessarily so. Also, the name "perf" is a carryover from i915 and is not preferred. Here we propose the name "observation" for this common layer which allows capture of different types of these counter streams. v2: Rename observability layer to observation layer (Lucas/Rodrigo) v3: Rename sysctl file to "observation_paranoid" (Jose) Fixes: 52c2e956dceb ("drm/xe/perf/uapi: "Perf" layer to support multiple perf counter stream types") Fixes: fe8929bdf835 ("drm/xe/perf/uapi: Add perf_stream_paranoid sysctl") Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa Acked-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240703164801.2561423-1-ashutosh.dixit@intel.com (cherry picked from commit 8169b2097d88d99d7e4a72e20e4b549efe9eb8d7) Signed-off-by: Rodrigo Vivi commit 320d8dc612660da84c3b70a28658bb38069e5a9a Author: Filipe Manana Date: Wed Jul 3 15:40:59 2024 +0100 btrfs: fix bitmap leak when loading free space cache on duplicate entry If we failed to link a free space entry because there's already a conflicting entry for the same offset, we free the free space entry but we don't free the associated bitmap that we had just allocated before. Fix that by freeing the bitmap before freeing the entry. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a39484371dd29ed9ba67bfd211e51d72b1a35c3d Author: Qu Wenruo Date: Thu May 23 10:49:38 2024 +0930 btrfs: remove the BUG_ON() inside extent_range_clear_dirty_for_io() Previously we had a BUG_ON() inside extent_range_clear_dirty_for_io(), as we expected all involved folios to be still locked, thus no folio should be missing. However for extent_range_clear_dirty_for_io() itself, we can skip the missing folio and handle the remaining ones, and return an error if there is anything wrong. Remove the BUG_ON() and let the caller to handle the error. In the caller we do not have a quick way to cleanup the error, but all the compression routines would handle the missing folio as an error and properly error out, so we only need to do an ASSERT() for developers, while for non-debug build the compression routine would handle the error correctly. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit af61081fb522ab52bc7f7d8304b4a7cc4f606575 Author: Qu Wenruo Date: Thu May 23 10:49:37 2024 +0930 btrfs: move extent_range_clear_dirty_for_io() into inode.c The function is only used inside inode.c by compress_file_range(), so move it to inode.c and unexport it. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit be9438f0774c21e4de7c4905226c44830cac075a Author: David Sterba Date: Fri May 3 13:42:30 2024 +0200 btrfs: enhance compression error messages Add more verbose and specific messages to all main error points in compression code for all algorithms. Currently there's no way to know which inode is affected or where in the data errors happened. The messages follow a common format: - what happened - error code if relevant - root and inode - additional data like offsets or lengths There's no helper for the messages as they differ in some details and that would be cumbersome to generalize to a single function. As all the errors are "almost never happens" there are the unlikely annotations done as compression is hot path. Signed-off-by: David Sterba commit ca84529a842f3a15a5f17beac6252aa11955923f Author: Filipe Manana Date: Mon Jul 1 10:51:28 2024 +0100 btrfs: fix data race when accessing the last_trans field of a root KCSAN complains about a data race when accessing the last_trans field of a root: [ 199.553628] BUG: KCSAN: data-race in btrfs_record_root_in_trans [btrfs] / record_root_in_trans [btrfs] [ 199.555186] read to 0x000000008801e308 of 8 bytes by task 2812 on cpu 1: [ 199.555210] btrfs_record_root_in_trans+0x9a/0x128 [btrfs] [ 199.555999] start_transaction+0x154/0xcd8 [btrfs] [ 199.556780] btrfs_join_transaction+0x44/0x60 [btrfs] [ 199.557559] btrfs_dirty_inode+0x9c/0x140 [btrfs] [ 199.558339] btrfs_update_time+0x8c/0xb0 [btrfs] [ 199.559123] touch_atime+0x16c/0x1e0 [ 199.559151] pipe_read+0x6a8/0x7d0 [ 199.559179] vfs_read+0x466/0x498 [ 199.559204] ksys_read+0x108/0x150 [ 199.559230] __s390x_sys_read+0x68/0x88 [ 199.559257] do_syscall+0x1c6/0x210 [ 199.559286] __do_syscall+0xc8/0xf0 [ 199.559318] system_call+0x70/0x98 [ 199.559431] write to 0x000000008801e308 of 8 bytes by task 2808 on cpu 0: [ 199.559464] record_root_in_trans+0x196/0x228 [btrfs] [ 199.560236] btrfs_record_root_in_trans+0xfe/0x128 [btrfs] [ 199.561097] start_transaction+0x154/0xcd8 [btrfs] [ 199.561927] btrfs_join_transaction+0x44/0x60 [btrfs] [ 199.562700] btrfs_dirty_inode+0x9c/0x140 [btrfs] [ 199.563493] btrfs_update_time+0x8c/0xb0 [btrfs] [ 199.564277] file_update_time+0xb8/0xf0 [ 199.564301] pipe_write+0x8ac/0xab8 [ 199.564326] vfs_write+0x33c/0x588 [ 199.564349] ksys_write+0x108/0x150 [ 199.564372] __s390x_sys_write+0x68/0x88 [ 199.564397] do_syscall+0x1c6/0x210 [ 199.564424] __do_syscall+0xc8/0xf0 [ 199.564452] system_call+0x70/0x98 This is because we update and read last_trans concurrently without any type of synchronization. This should be generally harmless and in the worst case it can make us do extra locking (btrfs_record_root_in_trans()) trigger some warnings at ctree.c or do extra work during relocation - this would probably only happen in case of load or store tearing. So fix this by always reading and updating the field using READ_ONCE() and WRITE_ONCE(), this silences KCSAN and prevents load and store tearing. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 240b129d597cb8a8880eb3a381ff10eb98ca0c07 Author: Trevor Gamblin Date: Thu Jul 11 08:57:42 2024 -0400 pwm: axi-pwmgen: add .max_register to regmap This was missed in the basic driver and is useful for debug, so add it. Example regmap output before the patch: |root@zed-tg:~# cat /sys/kernel/debug/regmap/44a60000.pwm/registers |0: 00020100 And with it: |root@zed-tg:~# cat /sys/kernel/debug/regmap/44a60000.pwm/registers |00: 00020100 |04: 00000000 |08: 00000000 |0c: 601a3471 |10: 00000000 |14: 00000002 |18: 00000001 |1c: 00000000 |... Signed-off-by: Trevor Gamblin Link: https://lore.kernel.org/r/20240711125743.3956935-1-tgamblin@baylibre.com Signed-off-by: Uwe Kleine-König commit e51f125b10332914ea4440252abcb3688ca1af59 Author: Jeff Johnson Date: Wed Jun 19 07:07:26 2024 -0700 sbus: add missing MODULE_DESCRIPTION() macros With ARCH=sparc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/sbus/char/envctrl.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/sbus/char/flash.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/sbus/char/uctrl.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/sbus/char/bbc.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Andreas Larsson Link: https://lore.kernel.org/r/20240619-md-sparc-drivers-sbus-char-v1-1-85acadb8f789@quicinc.com Signed-off-by: Andreas Larsson commit 0fbf6cbd723dbf49d50bfe92d13baa338304c243 Author: Qu Wenruo Date: Thu Jun 27 13:22:16 2024 +0930 btrfs: rename the extra_gfp parameter of btrfs_alloc_page_array() There is only one caller utilizing the @extra_gfp parameter, alloc_eb_folio_array(). And in that case the extra_gfp is only assigned to __GFP_NOFAIL. Rename the @extra_gfp parameter to @nofail to indicate that. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit fea91134c213d0671863e5461a3c3e94c5d053be Author: Qu Wenruo Date: Thu Jun 27 13:15:55 2024 +0930 btrfs: remove the extra_gfp parameter from btrfs_alloc_folio_array() The function btrfs_alloc_folio_array() is only utilized in btrfs_submit_compressed_read() and no other location, and the only caller is not utilizing the @extra_gfp parameter. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32e6216512b4119c1bb317c7305708f725832ff7 Author: Qu Wenruo Date: Fri Jun 14 13:52:31 2024 +0930 btrfs: introduce new "rescue=ignoresuperflags" mount option This new mount option allows the kernel to skip the super flags check, it's mostly to allow the kernel to do a rescue mount of an interrupted checksum conversion. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 169aaaf2e0be615ffd4a12adc02db5eb86e8eee1 Author: Qu Wenruo Date: Fri Jun 14 13:52:30 2024 +0930 btrfs: introduce new "rescue=ignoremetacsums" mount option Introduce "rescue=ignoremetacsums" to ignore metadata csums, all the other metadata sanity checks are still kept as is. This new mount option is mostly to allow the kernel to mount an interrupted checksum conversion (at the metadata csum overwrite stage). And since the main part of metadata sanity checks is inside tree-checker, we shouldn't lose much safety, and the new mount option is rescue mount option it requires full read-only mount. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf31b271e0a65fadb675a6cec433e08ab636f36d Author: Qu Wenruo Date: Fri Jun 14 13:52:29 2024 +0930 btrfs: output the unrecognized super block flags as hex Most of the extra super block flags are beyond 32bits (from CHANGING_FSID_V2 to CHANGING_*_CSUMS), thus using %llu is not only too long and pretty hard to read. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 14114c98a89cad71698c9c29a038fd871cf8078f Author: Qu Wenruo Date: Fri Jun 14 13:52:28 2024 +0930 btrfs: remove unused Opt enums The following three Opt_* enums haven't been utilized since the port to new mount API: - Opt_ignorebadroots - Opt_ignoredatacsums - Opt_rescue_all All those enums are from the old day where we have dedicated mount options, nowadays they have been moved to "rescue=" mount option groups, and no more global tokens for them. So we can safely remove them now. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5fc070a9246d8d7d5dbccecf211085be43e0e8e5 Author: Qu Wenruo Date: Mon Jun 24 08:17:58 2024 +0930 btrfs: tree-checker: add extra ram_bytes and disk_num_bytes check This is to ensure non-compressed file extents (both regular and prealloc) should have matching ram_bytes and disk_num_bytes. This is only for CONFIG_BTRFS_DEBUG and CONFIG_BTRFS_ASSERT case, furthermore this will not return error, but just a kernel warning to inform developers. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 896c8b92dda6ca20c6a591db996039aa8931478b Author: Qu Wenruo Date: Tue Jun 25 13:40:49 2024 +0930 btrfs: fix the ram_bytes assignment for truncated ordered extents [HICCUP] After adding extra checks on btrfs_file_extent_item::ram_bytes to tree-checker, running fsstress leads to tree-checker warning at write time, as we created file extent items with an invalid ram_bytes. All those offending file extents have offset 0, and ram_bytes matching num_bytes, and smaller than disk_num_bytes. This would also trigger the recently enhanced btrfs-check, which catches such mismatches and report them as minor errors. [CAUSE] When a folio/page is invalidated and it is part of a submitted OE, we mark the OE truncated just to the beginning of the folio/page. And for truncated OE, we insert the file extent item with incorrect value for ram_bytes (using num_bytes instead of the usual value). This is not a big deal for end users, as we do not utilize the ram_bytes field for regular non-compressed extents. This mismatch is just a small violation against on-disk format. [FIX] Fix it by removing the override on btrfs_file_extent_item::ram_bytes. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 1b87d26addd811ac7033720d21def3c4a3ef9fe3 Author: Qu Wenruo Date: Tue Jun 25 13:34:33 2024 +0930 btrfs: make validate_extent_map() catch ram_bytes mismatch Previously validate_extent_map() is only to catch bugs related to extent_map member cleanups. But with recent btrfs-check enhancement to catch ram_bytes mismatch with disk_num_bytes, it would be much better to catch such extent maps earlier. So this patch adds extra ram_bytes validation for extent maps. Please note that, older filesystems with such mismatch won't trigger this error: - extent_map::ram_bytes is already fixed Previous patch has already fixed the ram_bytes for affected file extents. So this enhanced sanity check should not affect end users. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 88e2e6d72423912f62b3e44aeeb967d798a2c2f5 Author: Qu Wenruo Date: Wed Jun 26 09:34:40 2024 +0930 btrfs: ignore incorrect btrfs_file_extent_item::ram_bytes [HICCUP] Kernels can create file extent items with incorrect ram_bytes like this: item 6 key (257 EXTENT_DATA 0) itemoff 15816 itemsize 53 generation 7 type 1 (regular) extent data disk byte 13631488 nr 32768 extent data offset 0 nr 4096 ram 4096 extent compression 0 (none) Thankfully kernel can handle them properly, as in that case ram_bytes is not utilized at all. [ENHANCEMENT] Since the hiccup is not going to cause any data-loss and is only a minor violation of on-disk format, here we only need to ignore the incorrect ram_bytes value, and use the correct one from btrfs_file_extent_item::disk_num_bytes. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 0edeb6ea46aac9fdd95c6b0990b0359cc7ca5cc1 Author: Qu Wenruo Date: Tue Jun 25 13:25:17 2024 +0930 btrfs: cleanup the bytenr usage inside btrfs_extent_item_to_extent_map() [HICCUP] Before commit 85de2be7129c ("btrfs: remove extent_map::block_start member"), we utilized @bytenr variable inside btrfs_extent_item_to_extent_map() to calculate block_start. But that commit removed block_start completely, we have no need to advance @bytenr at all. [ENHANCEMENT] - Rename @bytenr as @disk_bytenr - Only declare @disk_bytenr inside the if branch - Make @disk_bytenr const and remove the modification on it Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 0102ab54e497c8dc6f9d9588aca16500207fdfce Author: Mark Harmstone Date: Thu Jun 20 16:04:51 2024 +0100 btrfs: fix typo in error message in btrfs_validate_super() There's a typo in an error message when checking the block group tree feature, it mentions fres-space-tree instead of free-space-tree. Fix that. Signed-off-by: Mark Harmstone Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9aa29a20b70097213d10e03a452366ceea72fc02 Author: Filipe Manana Date: Tue Jun 25 15:52:28 2024 +0100 btrfs: move the direct IO code into its own file The direct IO code is over a thousand lines and it's currently spread between file.c and inode.c, which makes it not easy to locate some parts of it sometimes. Also inode.c is about 11 thousand lines and file.c about 4 thousand lines, both too big. So move all the direct IO code into a dedicated file, so that it's easy to locate all its code and reduce the sizes of inode.c and file.c. This is a pure move of code without any other changes except export a a couple functions from inode.c (get_extent_allocation_hint() and create_io_em()) because they are used in inode.c and the new direct-io.c file, and a couple functions from file.c (btrfs_buffered_write() and btrfs_write_check()) because they are used both in file.c and in the new direct-io.c file. Reviewed-by: Boris Burkov Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 0d9b7e166aef9f6d6dc574155cce293a2b6bf190 Author: David Sterba Date: Mon Jan 31 19:16:41 2022 +0100 btrfs: pass a btrfs_inode to btrfs_set_prop() Pass a struct btrfs_inode to btrfs_set_prop() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit e2877c2a032d821ca339dc333401e0c63bf67d5c Author: David Sterba Date: Mon Jan 31 19:16:41 2022 +0100 btrfs: pass a btrfs_inode to btrfs_compress_heuristic() Pass a struct btrfs_inode to btrfs_compress_heuristic() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit a1f4e3d7bd3bfa01d8b4be9b55c2af180f733ff1 Author: David Sterba Date: Mon Jan 31 18:57:43 2022 +0100 btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inode The structure is internal so we should use struct btrfs_inode for that, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit c154a8446bb75d541a23d040bbfcb8664328d972 Author: David Sterba Date: Mon Jan 31 18:53:32 2022 +0100 btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode The structure is internal so we should use struct btrfs_inode for that. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit 24e74598495d69350fa9590934bc15814fe4c471 Author: David Sterba Date: Mon Jan 31 18:49:41 2022 +0100 btrfs: pass a btrfs_inode to btrfs_ioctl_send() Pass a struct btrfs_inode to btrfs_ioctl_send() and _btrfs_ioctl_send() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit e108c86b109268bffe26245570653328011f7581 Author: David Sterba Date: Mon Jan 31 18:46:17 2022 +0100 btrfs: switch btrfs_block_group::inode to struct btrfs_inode The structure is internal so we should use struct btrfs_inode for that. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit 8610ba7eab8f8dc7d75cfc66ff5b1237c57239e2 Author: David Sterba Date: Wed Jun 15 15:03:11 2022 +0200 btrfs: pass a btrfs_inode to is_data_inode() Pass a struct btrfs_inode to is_data_inode() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit a0d7e98ced3e4c45284b268bc0867b51f0e093d6 Author: David Sterba Date: Wed Jun 15 15:03:11 2022 +0200 btrfs: pass a btrfs_inode to btrfs_readdir_get_delayed_items() Pass a struct btrfs_inode to btrfs_readdir_get_delayed_items() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit 849c01ae90efcf273a9c26e305d5d42862f8f3e8 Author: David Sterba Date: Wed Jun 15 15:11:38 2022 +0200 btrfs: pass a btrfs_inode to btrfs_readdir_put_delayed_items() Pass a struct btrfs_inode to btrfs_readdir_put_delayed_items() as it's an internal interface, allowing to remove some use of BTRFS_I. Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit 2422547e99f99f952d1a37f26b63289f749d5fcd Author: Johannes Thumshirn Date: Mon May 13 18:01:43 2024 +0200 btrfs: remove raid-stripe-tree encoding field from stripe_extent Remove the encoding field from 'struct btrfs_stripe_extent'. It was originally intended to encode the RAID type as well as if we're a data or a parity stripe. But the RAID type can be inferred form the block-group and the data vs. parity differentiation can be done easier with adding a new key type for parity stripes in the RAID stripe tree. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit e2c1887329086148625fef5205719112ceb4a829 Author: Qu Wenruo Date: Mon Jun 24 14:28:54 2024 +0930 btrfs: print-tree: add generation and type dump for EXTENT_DATA_KEY When debugging the recent ram_bytes mismatch bug, I can hit it with enhanced tree-checker for file extent items at write time. But the bug is not that easy to trigger (mostly triggered with btrfs/06*, which uses 20 threads fsstress), and when I hit it, the only info is the kernel leaf dump, but it doesn't include things like the file extent type (REGULAR or PREALLOC). Add the dump for generation and type (although only numeric output) to make debugging a little easier. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e962e755b2684185ec37c75d91df56e076782ec Author: Boris Burkov Date: Wed Feb 14 11:29:50 2024 -0800 btrfs: urgent periodic reclaim pass Periodic reclaim attempts to avoid block_groups seeing active use with a sweep mark that gets cleared on allocation and set on a sweep. In urgent conditions where we have very little unallocated space (less than one chunk used by the threshold calculation for the unallocated target), we want to be able to override this mechanism. Introduce a second pass that only happens if we fail to find a reclaim candidate and reclaim is urgent. In that case, do a second pass where all block groups are eligible. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 813d4c642251649352e9680e6278a1c02c0ebf95 Author: Boris Burkov Date: Wed Feb 14 11:25:50 2024 -0800 btrfs: prevent pathological periodic reclaim loops Periodic reclaim runs the risk of getting stuck in a state where it keeps reclaiming the same block group over and over. This can happen if 1. reclaiming that block_group fails 2. reclaiming that block_group fails to move any extents into existing block_groups and just allocates a fresh chunk and moves everything. Currently, 1. is a very tight loop inside the reclaim worker. That is critical for edge triggered reclaim or else we risk forgetting about a reclaimable group. On the other hand, with level triggered reclaim we can break out of that loop and get it later. With that fixed, 2. applies to both failures and "successes" with no progress. If we have done a periodic reclaim on a space_info and nothing has changed in that space_info, there is not much point to trying again, so don't, until enough space gets free, which we capture with a heuristic of needing to net free 1 chunk. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit e4ca3932ae90a61c5d0252535f0bc15ce031a457 Author: Boris Burkov Date: Fri Feb 2 11:54:33 2024 -0800 btrfs: periodic block_group reclaim We currently employ a edge-triggered block group reclaim strategy which marks block groups for reclaim as they free down past a threshold. With a dynamic threshold, this is worse than doing it in a level-triggered fashion periodically. That is because the reclaim itself happens periodically, so the threshold at that point in time is what really matters, not the threshold at freeing time. If we mark the reclaim in a big pass, then sort by usage and do reclaim, we also benefit from a negative feedback loop preventing unnecessary reclaims as we crunch through the "best" candidates. Since this is quite a different model, it requires some additional support. The edge triggered reclaim has a good heuristic for not reclaiming fresh block groups, so we need to replace that with a typical GC sweep mark which skips block groups that have seen an allocation since the last sweep. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit f5ff64ccf7bb7274ed66b0d835b2f6ae10af5d7a Author: Boris Burkov Date: Fri Feb 2 11:52:16 2024 -0800 btrfs: dynamic block_group reclaim threshold We can currently recover allocated block_groups by: - explicitly starting balance operations - "auto reclaim" via bg_reclaim_threshold The latter works by checking against a fixed threshold on frees. If we pass from above the threshold to below, relocation triggers and the block group will get reclaimed by the cleaner thread (assuming it is still eligible) Picking a threshold is challenging. Too high, and you end up trying to reclaim very full block_groups which is quite costly, and you don't do reclaim on block_groups that don't get quite THAT full, but could still be quite fragmented and stranding a lot of space. Too low, and you similarly miss out on reclaim even if you badly need it to avoid running out of unallocated space, if you have heavily fragmented block groups living above the threshold. No matter the threshold, it suffers from a workload that happens to bounce around that threshold, which can introduce arbitrary amounts of reclaim waste. To improve this situation, introduce a dynamic threshold. The basic idea behind this threshold is that it should be very lax when there is plenty of unallocated space, and increasingly aggressive as we approach zero unallocated space. To that end, it sets a target for unallocated space (10 chunks) and then linearly increases the threshold as the amount of space short of the target we are increases. The formula is: (target - unalloc) / target I tested this by running it on three interesting workloads: 1. bounce allocations around X% full. 2. fill up all the way and introduce full fragmentation. 3. write in a fragmented way until the filesystem is just about full. 1. and 2. attack the weaknesses of a fixed threshold; fixed either works perfectly or fully falls apart, depending on the threshold. Dynamic always handles these cases well. 3. attacks dynamic by checking whether it is too zealous to reclaim in conditions with low unallocated and low unused. It tends to claw back 1GiB of unallocated fairly aggressively, but not much more. Early versions of dynamic threshold struggled on this test. Additional work could be done to intelligently ratchet up the urgency of reclaim in very low unallocated conditions. Existing mechanisms are already useless in that case anyway. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 42f620aec182f62ee72e3fce41cb3353951b3508 Author: Boris Burkov Date: Fri Feb 2 11:52:57 2024 -0800 btrfs: store fs_info in space_info This is handy when computing space_info dynamic reclaim thresholds where we do not have access to a block group. We could add it to the various functions as a parameter, but it seems reasonable for space_info to have an fs_info pointer. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 243192b6764990e7fa0e22ea65b4d12f3294471c Author: Boris Burkov Date: Thu Jan 25 14:10:30 2024 -0800 btrfs: report reclaim stats in sysfs When evaluating various reclaim strategies/thresholds against each other, it is useful to collect data about the amount of reclaim happening. Expose a count, error count, and byte count via sysfs per space_info. Note that this is only for automatic reclaim, not manually invoked balances or other codepaths that use "relocate_block_group" Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a5b3abb18c380177d3a994d30a2ab890f27b8df8 Author: David Sterba Date: Wed May 22 18:26:18 2024 +0200 btrfs: qgroup: warn about inconsistent qgroups when relation update fails Calling btrfs_handle_fs_error() after btrfs_run_qgroups() fails to update the qgroup status is probably not necessary, this would turn the filesystem to read-only. For the same reason aborting the transaction is also not a good option. The state is left inconsistent and can be fixed by rescan, printing a warning should be sufficient. Return code reflects the status of adding/deleting the relation and if the transaction was ended properly. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 4addc1ffd67ad34394674dc91379dc04cfdd2537 Author: David Sterba Date: Wed May 22 18:17:05 2024 +0200 btrfs: qgroup: preallocate memory before adding a relation There's a transaction joined in the qgroup relation add/remove ioctl and any error will lead to abort/error. We could lift the allocation from btrfs_add_qgroup_relation() and move it outside of the transaction context. The relation deletion does not need that. The ownership of the structure is moved to the add relation handler. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 7733b8dd189a9e525c2d53bdd4efb26e04a8d737 Author: David Sterba Date: Wed May 22 17:52:38 2024 +0200 btrfs: abort transaction on errors in btrfs_free_chunk() The errors during removing a chunk item are fatal, we expect to have a matching item in the chunk map from which the chunk_offset is taken. Handle that by transaction abort. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit b9878a89e93322931c3fd0b5e3e09645c899b619 Author: David Sterba Date: Wed May 22 17:35:41 2024 +0200 btrfs: only print error message when checking item size in print_extent_item() The extent item used to have a v0 that was removed in 6.6. There's a check for minimum expected size that could lead to btrfs_handle_fs_error() that would make the filesystem read-only. As we don't have v0 anymore (and haven't seen any reports in the deprecation period), handle this in a less intrusive way. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit f4f89477322295e0f0ea10aa3e617afe2a827fc5 Author: David Sterba Date: Wed May 22 17:28:10 2024 +0200 btrfs: abort transaction if we don't find extref in btrfs_del_inode_extref() When an extended ref is deleted we do a sanity check right before removing the item, if we can't find it then handle the error. This is done by btrfs_handle_fs_error() but this is from the time before we had the transaction abort infrastructure, so switch to that. The end result is the same, the error is reported and switched to read-only. We newly return the -ENOENT error code as this better represents what happened. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit eba1469f8f6a4c98d9cfdba2477fac82a2347c6c Author: Filipe Manana Date: Thu Jun 20 19:51:32 2024 +0100 btrfs: avoid allocating and running pointless delayed extent operations We always allocate a delayed extent op structure when allocating a tree block (except for log trees), but most of the time we don't need it as we only need to set the BTRFS_BLOCK_FLAG_FULL_BACKREF if we're dealing with a relocation tree and we only need to set the key of a tree block in a btrfs_tree_block_info structure if we are not using skinny metadata (feature enabled by default since btrfs-progs 3.18 and available as of kernel 3.10). In these cases, where we don't need neither to update flags nor to set the key, we only use the delayed extent op structure to set the tree block's level. This is a waste of memory and besides that, the memory allocation can fail and can add additional latency. Instead of using a delayed extent op structure to store the level of the tree block, use the delayed ref head to store it. This doesn't change the size of neither structure and helps us avoid allocating delayed extent ops structures when using the skinny metadata feature and there's no relocation going on. This also gets rid of a BUG_ON(). For example, for a fs_mark run, with 5 iterations, 8 threads and 100K files per iteration, before this patch there were 118109 allocations of delayed extent op structures and after it there were none. Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 33336c1805d3a03240afda0bfb8c8d20395fb1d3 Author: Boris Burkov Date: Thu Jun 20 10:33:10 2024 -0700 btrfs: preallocate ulist memory for qgroup rsv When qgroups are enabled, during data reservation, we allocate the ulist_nodes that track the exact reserved extents with GFP_ATOMIC unconditionally. This is unnecessary, and we can follow the model already employed by the struct extent_state we preallocate in the non qgroups case, which should reduce the risk of allocation failures with GFP_ATOMIC. Add a prealloc node to struct ulist which ulist_add will grab when it is present, and try to allocate it before taking the tree lock while we can still take advantage of a less strict gfp mask. The lifetime of that node belongs to the new prealloc field, until it is used, at which point it belongs to the ulist linked list. Reviewed-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 28cb13f29faf6290597b24b728dc3100c019356f Author: Filipe Manana Date: Tue Jun 18 12:15:01 2024 +0100 btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info() Instead of doing a BUG_ON() handle the error by returning -EUCLEAN, aborting the transaction and logging an error message. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5c83b3beaee06aa88d4015408ac2d8bb35380b06 Author: Filipe Manana Date: Tue Jun 18 11:52:19 2024 +0100 btrfs: reduce nesting for extent processing at btrfs_lookup_extent_info() Instead of using an if-else statement when processing the extent item at btrfs_lookup_extent_info(), use a single if statement for the error case since it does a goto at the end and leave the success (expected) case following the if statement, reducing indentation and making the logic a bit easier to follow. Also make the if statement's condition as unlikely since it's not expected to ever happen, as it signals some corruption, making it clear and hint the compiler to generate more efficient code. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit c65967ac4d1668dfcb903215c8af128fa15f05d6 Author: Filipe Manana Date: Tue Jun 18 13:09:39 2024 +0100 btrfs: remove superfluous metadata check at btrfs_lookup_extent_info() If we didn't found an extent item with the initial btrfs_search_slot() call, it's pointless to test if the "metadata" variable is "true", because right after we check if the key type is BTRFS_METADATA_ITEM_KEY and that is the case only when "metadata" is set to "true". So remove the redundant check. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b56329a782314fde5b61058e2a25097af7ccb675 Author: Filipe Manana Date: Tue Jun 18 15:55:16 2024 +0100 btrfs: replace BUG_ON() with error handling at update_ref_for_cow() Instead of a BUG_ON() just return an error, log an error message and abort the transaction in case we find an extent buffer belonging to the relocation tree that doesn't have the full backref flag set. This is unexpected and should never happen (save for bugs or a potential bad memory). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 716404e59a17f917b32c649a733c9a23e5d15ad4 Author: Filipe Manana Date: Tue Jun 18 15:21:50 2024 +0100 btrfs: simplify setting the full backref flag at update_ref_for_cow() We keep a "new_flags" variable only to keep track if we need to update the metadata extent's flags, and when we set BTRFS_BLOCK_FLAG_FULL_BACKREF in the variable, we do it in an inner scope. Then check in an outer scope if the variable is not 0 and if so call btrfs_set_disk_extent_flags(). The variable isn't used for anything else. This is somewhat confusing, so to make it more straightforward update the extent's flags where we are currently updating "new_flags" and remove the variable. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 119474bdbac0858053cf367c8c932dd5c4bb4e85 Author: Filipe Manana Date: Tue Jun 18 08:28:30 2024 +0100 btrfs: remove NULL transaction support for btrfs_lookup_extent_info() There are no callers of btrfs_lookup_extent_info() that pass a NULL value for the transaction handle argument, so there's no point in having special logic to deal with the NULL. The last caller that passed a NULL value was removed in commit 19b546d7a1b2 ("btrfs: relocation: Use btrfs_find_all_leafs to locate data extent parent tree leaves"). So remove the NULL handling from btrfs_lookup_extent_info(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d12765dc0242c94105e64eb54c30155dce46d873 Author: Filipe Manana Date: Mon Jun 17 12:09:59 2024 +0100 btrfs: use label to deduplicate error path at btrfs_force_cow_block() At btrfs_force_cow_block() we have several error paths that need to unlock the "cow" extent buffer, drop the reference on it and then return an error. This is a bit verbose so add a label where we perform these tasks and make the error paths jump to that label. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bb3868033a4cccff7be57e9145f2117cbdc91c11 Author: Filipe Manana Date: Fri Jun 14 14:50:47 2024 +0100 btrfs: do not BUG_ON() when freeing tree block after error When freeing a tree block, at btrfs_free_tree_block(), if we fail to create a delayed reference we don't deal with the error and just do a BUG_ON(). The error most likely to happen is -ENOMEM, and we have a comment mentioning that only -ENOMEM can happen, but that is not true, because in case qgroups are enabled any error returned from btrfs_qgroup_trace_extent_post() (can be -EUCLEAN or anything returned from btrfs_search_slot() for example) can be propagated back to btrfs_free_tree_block(). So stop doing a BUG_ON() and return the error to the callers and make them abort the transaction to prevent leaking space. Syzbot was triggering this, likely due to memory allocation failure injection. Reported-by: syzbot+a306f914b4d01b3958fe@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/000000000000fcba1e05e998263c@google.com/ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b7519157655bba3f885a856c1ec8b6560b51e214 Author: Filipe Manana Date: Thu Jun 13 11:43:43 2024 +0100 btrfs: remove super block argument from btrfs_iget_locked() It's pointless to pass a super block argument to btrfs_iget_locked() because we always pass a root and from it we can get the super block through: root->fs_info->sb So remove the super block argument. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d383eb69eb239ebf2f219e32742081d03fd9ac56 Author: Filipe Manana Date: Thu Jun 13 11:41:38 2024 +0100 btrfs: remove super block argument from btrfs_iget_path() It's pointless to pass a super block argument to btrfs_iget_path() because we always pass a root and from it we can get the super block through: root->fs_info->sb So remove the super block argument. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d13240dd0a2d13bce6039cc51990613b30d47bc4 Author: Filipe Manana Date: Thu Jun 13 11:36:26 2024 +0100 btrfs: remove super block argument from btrfs_iget() It's pointless to pass a super block argument to btrfs_iget() because we always pass a root and from it we can get the super block through: root->fs_info->sb So remove the super block argument. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 90df2c10a47eeed31efe62fb77ba61fef82956cb Author: Qu Wenruo Date: Mon Jun 10 06:32:07 2024 +0930 btrfs: subpage: remove the unused error bitmap dumping Since commit 2b2553f12355 ("btrfs: stop setting PageError in the data I/O path") btrfs no longer utilizes subpage error bitmaps anymore, but the commit forgot to remove the error bitmap in btrfs_subpage_dump_bitmap(), resulting in possible meaningless result for the error bitmap. Fix it by just removing the error bitmap dumping. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 87128f520a6b7573f8086f2c89b9381ee7e85e51 Author: Qu Wenruo Date: Mon Jun 10 06:22:56 2024 +0930 btrfs: uapi: record temporary super flags used by btrfstune [BUG] There is a bug report that a canceled checksum conversion (still experimental feature) results in unexpected super block flags: csum_type 0 (crc32c) csum_size 4 csum 0x14973811 [match] bytenr 65536 flags 0x1000000001 ( WRITTEN | CHANGING_FSID_V2 ) magic _BHRfS_M [match] While for a filesystem with ongoing checksum conversion it should have either CHANGING_DATA_CSUM or CHANGING_META_CSUM. [CAUSE] It turns out that, due to btrfs-progs keeps its own extra flags inside its own ctree.h headers, not the shared uapi headers, we have conflicting super flags: kernel-shared/uapi/btrfs_tree.h:#define BTRFS_SUPER_FLAG_METADUMP_V2 (1ULL << 34) kernel-shared/uapi/btrfs_tree.h:#define BTRFS_SUPER_FLAG_CHANGING_FSID (1ULL << 35) kernel-shared/uapi/btrfs_tree.h:#define BTRFS_SUPER_FLAG_CHANGING_FSID_V2 (1ULL << 36) kernel-shared/ctree.h:#define BTRFS_SUPER_FLAG_CHANGING_DATA_CSUM (1ULL << 36) kernel-shared/ctree.h:#define BTRFS_SUPER_FLAG_CHANGING_META_CSUM (1ULL << 37) Note that CHANGING_FSID_V2 is conflicting with CHANGING_DATA_CSUM. [FIX] The proper fix would be done inside btrfs-progs, but to keep everything properly recorded, we should have everything inside the same uapi header. Copy all the new flags into uapi header, and change the value for CHANGING_DATA_CSUM and CHANGING_META_CSUM, while keep the value of CHANGING_BG_TREE untouched. Thankfully checksum change is still only experimental and all those CHANGING_* flags are transient (only for btrfs-progs to resume the conversion, and kernel will reject them all), the damage is still minor. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 33b804fae7ad0d8890e6df827c287fadc9542f3f Author: Josef Bacik Date: Tue May 7 14:12:16 2024 -0400 btrfs: add documentation around snapshot delete Snapshot delete has some complicated looking code that is weirdly subtle at times. I've cleaned it up the best I can without re-writing it, but there are still a lot of details that are non-obvious. Add a bunch of comments to the main parts of the code to help future developers better understand the mechanics of snapshot deletion. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5eb178f373b4f16f3b42d55ff88fc94dd95b93b1 Author: Josef Bacik Date: Tue May 7 14:12:15 2024 -0400 btrfs: handle errors from btrfs_dec_ref() properly In walk_up_proc() we BUG_ON(ret) from btrfs_dec_ref(). This is incorrect, we have proper error handling here, return the error. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f9c5b70c99ab6db06236d5ce337cf427aed32e49 Author: Josef Bacik Date: Tue May 7 14:12:14 2024 -0400 btrfs: convert correctness BUG_ON()'s to ASSERT()'s in walk_up_proc() In walk_up_proc() we have several sanity checks that should only trip if the programmer made a mistake. Convert these to ASSERT()'s instead of BUG_ON()'s. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b8ccef048354074a548f108e51d0557d6adfd3a3 Author: Josef Bacik Date: Tue May 7 14:12:13 2024 -0400 btrfs: clean up our handling of refs == 0 in snapshot delete In reada we BUG_ON(refs == 0), which could be unkind since we aren't holding a lock on the extent leaf and thus could get a transient incorrect answer. In walk_down_proc we also BUG_ON(refs == 0), which could happen if we have extent tree corruption. Change that to return -EUCLEAN. In do_walk_down() we catch this case and handle it correctly, however we return -EIO, which -EUCLEAN is a more appropriate error code. Finally in walk_up_proc we have the same BUG_ON(refs == 0), so convert that to proper error handling. Also adjust the error message so we can actually do something with the information. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1f9d44c0a12730a24f8bb75c5e1102207413cc9b Author: Josef Bacik Date: Tue May 7 14:12:12 2024 -0400 btrfs: replace BUG_ON with ASSERT in walk_down_proc() We have a couple of areas where we check to make sure the tree block is locked before looking up or messing with references. This is old code so it has this as BUG_ON(). Convert this to ASSERT() for developers. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b4236703eb50d03db867ce080823f43c18257d80 Author: Josef Bacik Date: Tue May 7 14:12:11 2024 -0400 btrfs: handle errors from ref mods during UPDATE_BACKREF in walk_down_proc() We have blanket BUG_ON(ret) after every one of these reference mod attempts, which is just incorrect. If we encounter any errors during walk_down_tree() we will abort, so abort on any one of these failures. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a580fb2c3479d993556e1c31b237c9e5be4944a3 Author: Josef Bacik Date: Tue May 7 14:12:10 2024 -0400 btrfs: don't BUG_ON on ENOMEM from btrfs_lookup_extent_info() in walk_down_proc() We handle errors here properly, ENOMEM isn't fatal, return the error. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit acb9b4766cb2da41274189261810627149166d61 Author: Josef Bacik Date: Tue May 7 14:12:09 2024 -0400 btrfs: extract the reference dropping code into it's own helper This is a big chunk of code in do_walk_down() that will conditionally remove the reference for the child block we're currently evaluating. Extract it out into it's own helper and call that from do_walk_down() instead. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2b73c7e761c4912209bbd2baf6cf774a9cab8123 Author: Josef Bacik Date: Tue May 7 14:12:08 2024 -0400 btrfs: unify logic to decide if we need to walk down into a node during snapshot delete We currently duplicate the logic for walking into a node during snapshot delete. In one case it is during the actual delete, and in the other we use it for deciding if we should reada the block or not. Factor this code into it's own helper and comment fully what we're doing, and then update the two users to use the new helper. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4c4686d19dbaaaf46c5ac295e6e27580d514c4f5 Author: Josef Bacik Date: Tue May 7 14:12:07 2024 -0400 btrfs: remove local variable need_account in do_walk_down() We only set this if wc->refs[level - 1] > 1, and we check this way up above where we need it because the first thing we do before dropping our refs is reset wc->refs[level - 1] to 0. Reorder resetting of wc->refs to after our drop logic, and then remove the need_account variable and simply check wc->refs[level - 1] directly instead of using a variable. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 562d425454e8b8ee628fafb15e88b0ef7ec371e6 Author: Josef Bacik Date: Tue May 7 14:12:06 2024 -0400 btrfs: factor out eb uptodate check from do_walk_down() do_walk_down() already has a bunch of things going on, and there's a bit of code related to reading in the next eb if we decide we need it. Move this code off into it's own helper to clean up do_walk_down() a little bit. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7fcee18da46b51ca71a1ef82e1f2bc4bf7665870 Author: Josef Bacik Date: Tue May 7 14:12:05 2024 -0400 btrfs: push lookup_info into struct walk_control Instead of using a flag we're passing around everywhere, add a field to walk_control that we're already passing around everywhere and use that instead. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3fdf5798fa379c36d068090d026d18dd6dfc5b6c Author: Josef Bacik Date: Tue May 7 14:12:04 2024 -0400 btrfs: use btrfs_read_extent_buffer() in do_walk_down() Currently if our extent buffer isn't uptodate we will drop the lock, free it, and then call read_tree_block() for the bytenr. This is inefficient, we already have the extent buffer, we can simply call btrfs_read_extent_buffer(). Merge these two cases down into one if statement, if we are not uptodate we can drop the lock, trigger readahead, and do the read using btrfs_read_extent_buffer(), and carry on. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 133b3da83539bd04e97e24cbc8693a1cdca4b5ec Author: Josef Bacik Date: Tue May 7 14:12:03 2024 -0400 btrfs: remove all extra btrfs_check_eb_owner() calls Currently we have a handful of btrfs_check_eb_owner() calls in various places and helpers that read extent buffers. However we call this in the endio handler for every metadata block, so these extra checks are unnecessary, simply remove them from everywhere except the endio handler. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 58147d5a7072dbf5f392ad8b2d5328b105e0e48d Author: Josef Bacik Date: Tue May 7 14:12:02 2024 -0400 btrfs: don't do extra find_extent_buffer() in do_walk_down() We do find_extent_buffer(), and then if we don't find the eb in cache we call btrfs_find_create_tree_block(), which calls find_extent_buffer() first and then allocates the extent buffer. The reason we're doing this is because if we don't find the extent buffer in cache we set reada = 1. However this doesn't matter, because lower down we only trigger reada if !btrfs_buffer_uptodate(eb), which is what the case would be if we didn't find the extent buffer in cache and had to allocate it. Clean this up to simply call btrfs_find_create_tree_block(), and then use the fact that we're having to read the extent buffer off of disk to go ahead and kick off readahead. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 45c4102f0d827e00ce6ca107a7cb158265d706da Author: Filipe Manana Date: Tue Jun 11 11:44:33 2024 +0100 btrfs: avoid transaction commit on any fsync after subvolume creation As of commit 1b53e51a4a8f ("btrfs: don't commit transaction for every subvol create") we started to make any fsync after creating a subvolume to fallback to a transaction commit if the fsync is performed in the same transaction that was used to create the subvolume. This happens with the following at ioctl.c:create_subvol(): $ cat fs/btrfs/ioctl.c (...) /* Tree log can't currently deal with an inode which is a new root. */ btrfs_set_log_full_commit(trans); (...) Note that the comment is misleading as the problem is not that fsync can not deal with the root inode of a new root, but that we can not log any inode that belongs to a root that was not yet persisted because that would make log replay fail since the root doesn't exist at log replay time. The above simply makes any fsync fallback to a full transaction commit if it happens in the same transaction used to create the subvolume - even if it's an inode that belongs to any other subvolume. This is a brute force solution and it doesn't necessarily improve performance for every workload out there - it just moves a full transaction commit from one place, the subvolume creation, to another - an fsync for any inode. Just improve on this by making the fallback to a transaction commit only for an fsync against an inode of the new subvolume, or for the directory that contains the dentry that points to the new subvolume (in case anyone attempts to fsync the directory in the same transaction). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ebc7c7678eb04b739544d9caaa0a4797adb24392 Author: Filipe Manana Date: Thu Jun 6 09:20:18 2024 +0100 btrfs: remove pointless code when creating and deleting a subvolume When creating and deleting a subvolume, after starting a transaction we are explicitly calling btrfs_record_root_in_trans() for the root which we passed to btrfs_start_transaction(). This is pointless because at transaction.c:start_transaction() we end up doing that call, regardless of whether we actually start a new transaction or join an existing one, and if we were not it would mean the root item of that root would not be updated in the root tree when committing the transaction, leading to problems easy to spot with fstests for example. Remove these redundant calls. They were introduced with commit 74e97958121a ("btrfs: qgroup: fix qgroup prealloc rsv leak in subvolume operations"). Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 6d81df75af5a5cfb8bfc0a17cd3e43cb927216ab Author: Johannes Thumshirn Date: Wed Jun 5 16:45:48 2024 +0200 btrfs: pass reloc_control to setup_relocation_extent_mapping() All parameters passed into setup_relocation_extent_mapping() can be derived from 'struct reloc_control', so only pass in a 'struct reloc_control'. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 60f3dabdbc07ec831175b3296b601ea9c46d13a4 Author: Johannes Thumshirn Date: Wed Jun 5 16:15:21 2024 +0200 btrfs: pass a struct reloc_control to prealloc_file_extent_cluster() Pass a 'struct reloc_control' to prealloc_file_extent_cluster() instead of passing its members 'data_inode' and 'cluster' on their own. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 17a21d79149b2421120e2f2f8fd7e32f789ae6c7 Author: Johannes Thumshirn Date: Wed Jun 5 14:55:54 2024 +0200 btrfs: don't pass fs_info to describe_relocation() In describe_relocation() the fs_info is only needed for printing information via btrfs_info() and can easily be accessed via the passed in 'struct btrfs_block_group'. So we can safely remove the fs_info parameter. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 912eea7e24543661e77df1f1ccc05ea35c6ea029 Author: Johannes Thumshirn Date: Tue Jun 4 17:32:37 2024 +0200 btrfs: pass a reloc_control to relocate_one_folio() Pass a struct reloc_control to relocate_one_folio, instead of passing it's members data_inode and cluster as separate arguments to the function. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2e9e8dcdd5649690bf03dbbe8e652061f5512b8f Author: Johannes Thumshirn Date: Tue Jun 4 13:28:25 2024 +0200 btrfs: pass a reloc_control to relocate_file_extent_cluster() Instead of passing in a reloc_control's data_inode and file_extent_cluster members, pass in the whole reloc_control structure. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit fa4adfc786891b4bfc28b44521585f3eb52bf72c Author: Johannes Thumshirn Date: Tue Jun 4 13:15:34 2024 +0200 btrfs: pass reloc_control to relocate_data_extent() Pass a 'struct reloc_control' to relocate_data_extent() instead of it's data_inode and file_extent_cluster separately. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8b62f14d990213de8fb3b15d7fab18816314aab3 Author: Filipe Manana Date: Mon Jun 3 17:54:36 2024 +0100 btrfs: update panic message when splitting ordered extent During ordered extent splitting if we find a duplicated ordered extent when attempting to insert the new ordered extent we panic but with a message that has the "zoned:" prefix. This is because the splitting used to be exclusive for zoned filesystems, but as of commit b73a6fd1b1ef ("btrfs: split partial dio bios before submit") it can also be done for non zoned filesystems during direct IO writes. So remove the "zoned:" prefix from the message and mention the split to make it more specific and different from the panic message at insert_ordered_extent(). Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b7ac1acbdd1f3e84d566bdccfb0cf2d887ef55ce Author: Filipe Manana Date: Mon Jun 3 17:20:30 2024 +0100 btrfs: mark ordered extent insertion failure checks as unlikely We never expect an ordered extent insertion to fail due to already having another ordered extent in the tree for the same file offset, since we always wait for existing ordered extents in a range to complete before writing into the range again. So mark the failure checks for the results of tree_insert() as unlikely, to make it clear it's never expected (save exceptional causes like bugs or memory corruptions) and to serve as a hint for the compiler to possibly generate better code. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cb3cd62454eab7ebf833aeb04ca7458c656d30cf Author: Filipe Manana Date: Mon Jun 3 17:02:26 2024 +0100 btrfs: avoid removal and re-insertion of split ordered extent At btrfs_split_ordered_extent(), we are removing and re-inserting the ordered extent that we are trimming, but we don't need to since the trimming doesn't change its position in the red black tree because we don't have overlapping ordered extents (that would imply double allocation of extents) and we know the split length is smaller than the ordered extent's num_bytes field (we checked that early in the function). So drop the remove and re-insert code for the slit ordered extent. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit c18ca3c960171e0fb22e498dbf233e0cc521a31c Author: Filipe Manana Date: Mon Jun 3 16:50:31 2024 +0100 btrfs: add comment about locking to btrfs_split_ordered_extent() There are subtle details about why the root's ordered_extent_lock is held, so add a comment mentioning them. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac1f580c10f31063ce9dae840d3499d41e3854ce Author: Filipe Manana Date: Mon Jun 3 13:30:35 2024 +0100 btrfs: reduce critical section at btrfs_wait_ordered_extents() At btrfs_wait_ordered_extents(), there's no point in updating the counters after locking the root's ordered extent lock, as the counters are local. So change this to update the counters before taking the lock. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 03103ecf5ec95743615113e5d2d8feb8d1a42859 Author: Filipe Manana Date: Mon Jun 3 13:25:00 2024 +0100 btrfs: reduce critical section at btrfs_wait_ordered_roots() At btrfs_wait_ordered_roots(), there's no point in decrementing the counter after locking fs_info->ordered_root_lock as the counter is local. So change this to decrement the counter before taking the lock. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2917f74102cf23afe770c1293aabce005f956b4f Author: David Sterba Date: Thu May 30 19:14:12 2024 +0200 btrfs: constify pointer parameters where applicable We can add const to many parameters, this is for clarity and minor addition to safety. There are some minor effects, in the assembly code and .ko measured on release config. This patch does not cover all possible conversions. Signed-off-by: David Sterba commit c27b1dbb713ad0d81f3bbd5ede92caaaedfd8947 Author: Qu Wenruo Date: Tue May 28 14:57:32 2024 +0930 btrfs: do not directly include rwlock_types.h There is already an error inside that header: #if !defined(__LINUX_SPINLOCK_TYPES_H) # error "Do not include directly, include spinlock_types.h" #endif Thankfully it never get triggered as some other headers have already included spinlock_types.h. However clangd would still do a proper warning on that if only extent_map.h is opened. Fix it by using spinlock_types.h instead. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3b8dbf3425cfe3dcfdc026fcd7f8e1c0dd95b248 Author: Qu Wenruo Date: Tue May 28 14:56:13 2024 +0930 btrfs: cleanup recursive include of the same header We have several headers that are including themselves, triggering clangd warnings. Such includes are caused by commit 602035d7fecf ("btrfs: add forward declarations and headers, part 2"). Just remove such unnecessary include. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a56b79523483c04862d478687d888038720a1bb4 Author: Junchao Sun Date: Tue May 28 14:23:43 2024 +0800 btrfs: qgroup: delete a TODO about using kmem cache to allocate structures Generic slab works fine allocating btrfs_qgroup_extent_record structures. It's not necessary to create a dedicated kmem cache that would be created but unused if quotas were not enabled. Let's delete the TODO line. Reviewed-by: Qu Wenruo Signed-off-by: Junchao Sun Reviewed-by: David Sterba Signed-off-by: David Sterba commit a185373e53c6d22134c89be8508cfb5a491103c8 Author: Qu Wenruo Date: Tue Mar 5 17:27:58 2024 +1030 btrfs: make extent_write_locked_range() handle subpage writeback correctly When extent_write_locked_range() generated an inline extent, it would set and finish the writeback for the whole page. Although currently it's safe since subpage disables inline creation, for the sake of consistency, let it go with subpage helpers to set and clear the writeback flags. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Reviewed-by: Naohiro Aota Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 97713b1a2ced1e4a2a6c40045903797ebd44d7e0 Author: Qu Wenruo Date: Wed Mar 6 08:21:54 2024 +1030 btrfs: do not clear page dirty inside extent_write_locked_range() [BUG] For subpage + zoned case, the following workload can lead to rsv data leak at unmount time: # mkfs.btrfs -f -s 4k $dev # mount $dev $mnt # fsstress -w -n 8 -d $mnt -s 1709539240 0/0: fiemap - no filename 0/1: copyrange read - no filename 0/2: write - no filename 0/3: rename - no source filename 0/4: creat f0 x:0 0 0 0/4: creat add id=0,parent=-1 0/5: writev f0[259 1 0 0 0 0] [778052,113,965] 0 0/6: ioctl(FIEMAP) f0[259 1 0 0 224 887097] [1294220,2291618343991484791,0x10000] -1 0/7: dwrite - xfsctl(XFS_IOC_DIOINFO) f0[259 1 0 0 224 887097] return 25, fallback to stat() 0/7: dwrite f0[259 1 0 0 224 887097] [696320,102400] 0 # umount $mnt The dmesg includes the following rsv leak detection warning (all call trace skipped): ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8653 btrfs_destroy_inode+0x1e0/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8654 btrfs_destroy_inode+0x1a8/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8660 btrfs_destroy_inode+0x1a0/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): last unmount of filesystem 1b4abba9-de34-4f07-9e7f-157cf12a18d6 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 4528 at fs/btrfs/block-group.c:4434 btrfs_free_block_groups+0x338/0x500 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): space_info DATA has 268218368 free, is not full BTRFS info (device sda): space_info total=268435456, used=204800, pinned=0, reserved=0, may_use=12288, readonly=0 zone_unusable=0 BTRFS info (device sda): global_block_rsv: size 0 reserved 0 BTRFS info (device sda): trans_block_rsv: size 0 reserved 0 BTRFS info (device sda): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_refs_rsv: size 0 reserved 0 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 4528 at fs/btrfs/block-group.c:4434 btrfs_free_block_groups+0x338/0x500 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): space_info METADATA has 267796480 free, is not full BTRFS info (device sda): space_info total=268435456, used=131072, pinned=0, reserved=0, may_use=262144, readonly=0 zone_unusable=245760 BTRFS info (device sda): global_block_rsv: size 0 reserved 0 BTRFS info (device sda): trans_block_rsv: size 0 reserved 0 BTRFS info (device sda): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_refs_rsv: size 0 reserved 0 Above $dev is a tcmu-runner emulated zoned HDD, which has a max zone append size of 64K, and the system has 64K page size. [CAUSE] I have added several trace_printk() to show the events (header skipped): > btrfs_dirty_pages: r/i=5/259 dirty start=774144 len=114688 > btrfs_dirty_pages: r/i=5/259 dirty part of page=720896 off_in_page=53248 len_in_page=12288 > btrfs_dirty_pages: r/i=5/259 dirty part of page=786432 off_in_page=0 len_in_page=65536 > btrfs_dirty_pages: r/i=5/259 dirty part of page=851968 off_in_page=0 len_in_page=36864 The above lines show our buffered write has dirtied 3 pages of inode 259 of root 5: 704K 768K 832K 896K I |////I/////////////////I///////////| I 756K 868K |///| is the dirtied range using subpage bitmaps. and 'I' is the page boundary. Meanwhile all three pages (704K, 768K, 832K) have their PageDirty flag set. > btrfs_direct_write: r/i=5/259 start dio filepos=696320 len=102400 Then direct IO write starts, since the range [680K, 780K) covers the beginning part of the above dirty range, we need to writeback the two pages at 704K and 768K. > cow_file_range: r/i=5/259 add ordered extent filepos=774144 len=65536 > extent_write_locked_range: r/i=5/259 locked page=720896 start=774144 len=65536 Now the above 2 lines show that we're writing back for dirty range [756K, 756K + 64K). We only writeback 64K because the zoned device has max zone append size as 64K. > extent_write_locked_range: r/i=5/259 clear dirty for page=786432 !!! The above line shows the root cause. !!! We're calling clear_page_dirty_for_io() inside extent_write_locked_range(), for the page 768K. This is because extent_write_locked_range() can go beyond the current locked page, here we hit the page at 768K and clear its page dirt. In fact this would lead to the desync between subpage dirty and page dirty flags. We have the page dirty flag cleared, but the subpage range [820K, 832K) is still dirty. After the writeback of range [756K, 820K), the dirty flags look like this, as page 768K no longer has dirty flag set. 704K 768K 832K 896K I I | I/////////////| I 820K 868K This means we will no longer writeback range [820K, 832K), thus the reserved data/metadata space would never be properly released. > extent_write_cache_pages: r/i=5/259 skip non-dirty folio=786432 Now even though we try to start writeback for page 768K, since the page is not dirty, we completely skip it at extent_write_cache_pages() time. > btrfs_direct_write: r/i=5/259 dio done filepos=696320 len=0 Now the direct IO finished. > cow_file_range: r/i=5/259 add ordered extent filepos=851968 len=36864 > extent_write_locked_range: r/i=5/259 locked page=851968 start=851968 len=36864 Now we writeback the remaining dirty range, which is [832K, 868K). Causing the range [820K, 832K) never to be submitted, thus leaking the reserved space. This bug only affects subpage and zoned case. For non-subpage and zoned case, we have exactly one sector for each page, thus no such partial dirty cases. For subpage and non-zoned case, we never go into run_delalloc_cow(), and normally all the dirty subpage ranges would be properly submitted inside __extent_writepage_io(). [FIX] Just do not clear the page dirty at all inside extent_write_locked_range(). As __extent_writepage_io() would do a more accurate, subpage compatible clear for page and subpage dirty flags anyway. Now the correct trace would look like this: > btrfs_dirty_pages: r/i=5/259 dirty start=774144 len=114688 > btrfs_dirty_pages: r/i=5/259 dirty part of page=720896 off_in_page=53248 len_in_page=12288 > btrfs_dirty_pages: r/i=5/259 dirty part of page=786432 off_in_page=0 len_in_page=65536 > btrfs_dirty_pages: r/i=5/259 dirty part of page=851968 off_in_page=0 len_in_page=36864 The page dirty part is still the same 3 pages. > btrfs_direct_write: r/i=5/259 start dio filepos=696320 len=102400 > cow_file_range: r/i=5/259 add ordered extent filepos=774144 len=65536 > extent_write_locked_range: r/i=5/259 locked page=720896 start=774144 len=65536 And the writeback for the first 64K is still correct. > cow_file_range: r/i=5/259 add ordered extent filepos=839680 len=49152 > extent_write_locked_range: r/i=5/259 locked page=786432 start=839680 len=49152 Now with the fix, we can properly writeback the range [820K, 832K), and properly release the reserved data/metadata space. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit d034cdb4cc8aea42f3c633dd514181c3fed2e7ec Author: Qu Wenruo Date: Sun Feb 18 17:09:32 2024 +1030 btrfs: lock subpage ranges in one go for writepage_delalloc() If we have a subpage range like this for a 16K page with 4K sectorsize: 0 4K 8K 12K 16K |/////| |//////| | |/////| = dirty range Currently writepage_delalloc() would go through the following steps: - lock range [0, 4K) - run delalloc range for [0, 4K) - lock range [8K, 12K) - run delalloc range for [8K 12K) So far it's fine for regular subpage writeback, as btrfs_run_delalloc_range() can only go into one of run_delalloc_nocow(), cow_file_range() and run_delalloc_compressed(). But there is a special case for zoned subpage, where we will go through run_delalloc_cow(), which would create the ordered extent for the range and immediately submit the range. This would unlock the whole page range, causing all kinds of different ASSERT()s related to locked page. Address the page unlocking problem of run_delalloc_cow(), by changing the workflow to the following one: - lock range [0, 4K) - lock range [8K, 12K) - run delalloc range for [0, 4K) - run delalloc range for [8K, 12K) So that run_delalloc_cow() can only unlock the full page until the last lock user released. To do that: - Utilize subpage locked bitmap So for every delalloc range we found, call btrfs_folio_set_writer_lock() to populate the subpage locked bitmap, and later btrfs_folio_end_all_writers() if the page is fully unlocked. So we know there is a delalloc range that needs to be run later. - Save the @delalloc_end as @last_delalloc_end inside writepage_delalloc() Since subpage locked bitmap is only for ranges inside the page, meanwhile we can have delalloc range ends beyond our page boundary, we have to save the @last_delalloc_end just in case it's beyond our page boundary. Although there is one extra point to notice: - We need to handle errors in previous iteration Since we can have multiple locked delalloc ranges we have to call run_delalloc_ranges() multiple times. If we hit an error half way, we still need to unlock the remaining ranges. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit bca707e54276de828a8cad82b723192374e73e00 Author: Qu Wenruo Date: Mon Feb 19 13:13:24 2024 +1030 btrfs: subpage: introduce helpers to handle subpage delalloc locking Three new helpers are introduced for the incoming subpage delalloc locking change. - btrfs_folio_set_writer_lock() This is to mark specified range with subpage specific writer lock. After calling this, the subpage range can be proper unlocked by btrfs_folio_end_writer_lock() - btrfs_subpage_find_writer_locked() This is to find the writer locked subpage range in a page. With the help of btrfs_folio_set_writer_lock(), it can allow us to record and find previously locked subpage range without extra memory allocation. - btrfs_folio_end_all_writers() This is for the locked_page of __extent_writepage(), as there may be multiple subpage delalloc ranges locked. Reviewed-by: Johannes Thumshirn Reviewed-by: Naohiro Aota Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 21b5bef20ef89795882f0b1bf5517fb283c16461 Author: Qu Wenruo Date: Fri Feb 16 14:33:41 2024 +1030 btrfs: make __extent_writepage_io() to write specified range only Function __extent_writepage_io() is designed to find all dirty ranges of a page, and add the dirty ranges to the bio_ctrl for submission. It requires all the dirtied ranges to be covered by an ordered extent. It gets called in two locations, but one call site is not subpage aware: - __extent_writepage() It gets called when writepage_delalloc() returned 0, which means writepage_delalloc() has handled delalloc for all subpage sectors inside the page. So this call site is OK. - extent_write_locked_range() This call site is utilized by zoned support, and in this case, we may only run delalloc range for a subset of the page, like this: (64K page size) 0 16K 32K 48K 64K |/////| |///////| | In the above case, if extent_write_locked_range() is only triggered for range [0, 16K), __extent_writepage_io() would still try to submit the dirty range of [32K, 48K), then it would not find any ordered extent for it and triggers various ASSERT()s. Fix this problem by: - Introducing @start and @len parameters to specify the range For the first call site, we just pass the whole page, and the behavior is not touched, since run_delalloc_range() for the page should have created all ordered extents for the page. For the second call site, we avoid touching anything beyond the range, thus avoiding the dirty range which is not yet covered by any delalloc range. - Making btrfs_folio_assert_not_dirty() subpage aware The only caller is inside __extent_writepage_io(), and since that caller now accepts a subpage range, we should also check the subpage range other than the whole page. Reviewed-by: Johannes Thumshirn Reviewed-by: Naohiro Aota Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 95359f63223c432bd0ed1f1d9180a823f19f0712 Author: Jeff Johnson Date: Mon May 27 10:56:59 2024 -0700 btrfs: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/btrfs/btrfs.o Signed-off-by: Jeff Johnson Reviewed-by: David Sterba Signed-off-by: David Sterba commit ca8ba2ccdcdec7ecdfd5f87e90a57055eb7685f7 Author: Anand Jain Date: Tue Mar 19 20:25:32 2024 +0530 btrfs: rename err to ret in btrfs_drop_snapshot() Drop the variable 'err', reuse the variable 'ret' by reinitializing it to zero where necessary. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit ced1b1bd214fab463f35438c63d9bc6b1a743cae Author: Anand Jain Date: Fri May 10 15:21:08 2024 +0800 btrfs: rename err to ret in btrfs_recover_relocation() Fix coding style: rename the return variable to 'ret' in the function btrfs_recover_relocation instead of 'err'. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit bd0d9a619a870f8c6745d2b4f57508bc5106e282 Author: Anand Jain Date: Fri May 10 15:17:23 2024 +0800 btrfs: rename ret to ret2 in btrfs_recover_relocation() A preparatory patch to rename 'err' to 'ret', but ret is already used as an intermediary return value, so first rename 'ret' to 'ret2'. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit ba69f42af2a568f30904a11dc257eb892c5e8c0e Author: Anand Jain Date: Fri May 10 15:10:50 2024 +0800 btrfs: rename ret to err in btrfs_recover_relocation() In the function btrfs_recover_relocation(), currently the variable 'err' carries the return value and 'ret' holds the intermediary return value. However, in some lines, we don't need this two-step approach; we can directly use 'err'. So, optimize them, which requires reinitializing 'err' to zero at two locations. This is a preparatory patch to fix the code style by renaming 'err' to 'ret'. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 53d6c0da0a6bb9f945e5b4bc88701e51e172a087 Author: Anand Jain Date: Tue Mar 19 20:25:09 2024 +0530 btrfs: rename err to ret in btrfs_cleanup_fs_roots() Since err represents the function return value, rename it as ret, and rename the original ret, which serves as a helper return value, to found. Also, optimize the code to continue call btrfs_put_root() for the rest of the root if even after btrfs_orphan_cleanup() returns error. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 04ef7631bfa5247dfce8f1858be6f0f76ff0e299 Author: Qu Wenruo Date: Fri May 3 13:07:26 2024 +0930 btrfs: cleanup duplicated parameters related to btrfs_create_dio_extent() The following 3 parameters can be cleaned up using btrfs_file_extent structure: - len btrfs_file_extent::num_bytes - orig_block_len btrfs_file_extent::disk_num_bytes - ram_bytes btrfs_file_extent::ram_bytes Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9fec848b3a3343a1c680e26155aec26ae4866849 Author: Qu Wenruo Date: Fri May 3 13:02:00 2024 +0930 btrfs: cleanup duplicated parameters related to create_io_em() Most parameters of create_io_em() can be replaced by the members with the same name inside btrfs_file_extent. Do a direct parameters cleanup here. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e9ea31fb5c1f90a006dccb6972664086447f4911 Author: Qu Wenruo Date: Fri May 3 12:49:57 2024 +0930 btrfs: cleanup duplicated parameters related to btrfs_alloc_ordered_extent All parameters after @filepos of btrfs_alloc_ordered_extent() can be replaced with btrfs_file_extent structure. This patch does the cleanup, meanwhile some points to note: - Move btrfs_file_extent structure to ordered-data.h The structure is needed by both btrfs_alloc_ordered_extent() and can_nocow_extent(), but since btrfs_inode.h includes ordered-data.h, so we need to move the structure to ordered-data.h. - Move the special handling of NOCOW/PREALLOC into btrfs_alloc_ordered_extent() This is to allow btrfs_split_ordered_extent() to properly split them for DIO. For now just move the handling into btrfs_alloc_ordered_extent() to simplify the callers. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit cdc627e65c7eb8d105f0b9e9695106e54eea1a6e Author: Qu Wenruo Date: Fri May 3 09:35:21 2024 +0930 btrfs: cleanup duplicated parameters related to can_nocow_file_extent_args The following functions and structures can be simplified using the btrfs_file_extent structure: - can_nocow_extent() No need to return ram_bytes/orig_block_len through the parameter list, the @file_extent parameter contains all the needed info. - can_nocow_file_extent_args The following members are no longer needed: * disk_bytenr This one is confusing as it's not really the btrfs_file_extent_item::disk_bytenr, but where the IO would be, thus it's file_extent::disk_bytenr + file_extent::offset now. * num_bytes Now file_extent::num_bytes. * extent_offset Now file_extent::offset. * disk_num_bytes Now file_extent::disk_num_bytes. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c77a8c61002e91d859e118008fd495efbe1d9373 Author: Qu Wenruo Date: Tue Apr 30 07:53:06 2024 +0930 btrfs: remove extent_map::block_start member The member extent_map::block_start can be calculated from extent_map::disk_bytenr + extent_map::offset for regular extents. And otherwise just extent_map::disk_bytenr. And this is already validated by the validate_extent_map(). Now we can remove the member. However there is a special case in btrfs_create_dio_extent() where we for NOCOW/PREALLOC ordered extents cannot directly use the resulting btrfs_file_extent, as btrfs_split_ordered_extent() cannot handle them yet. So for that call site, we pass file_extent->disk_bytenr + file_extent->num_bytes as disk_bytenr for the ordered extent, and 0 for offset. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e28b851ed9b232c3b84cb8d0fedbdfa8ca881386 Author: Qu Wenruo Date: Tue Apr 30 07:53:05 2024 +0930 btrfs: remove extent_map::block_len member The extent_map::block_len is either extent_map::len (non-compressed extent) or extent_map::disk_num_bytes (compressed extent). Since we already have sanity checks to do the cross-checks between the new and old members, we can drop the old extent_map::block_len now. For most call sites, they can manually select extent_map::len or extent_map::disk_num_bytes, since most if not all of them have checked if the extent is compressed. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4aa7b5d1784f510c0f42afc1d74efb41947221d7 Author: Qu Wenruo Date: Tue Apr 30 07:53:04 2024 +0930 btrfs: remove extent_map::orig_start member Since we have extent_map::offset, the old extent_map::orig_start is just extent_map::start - extent_map::offset for non-hole/inline extents. And since the new extent_map::offset is already verified by validate_extent_map() while the old orig_start is not, let's just remove the old member from all call sites. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3f255ece2f1e68d10f42050050b39b04d0376fb1 Author: Qu Wenruo Date: Tue Apr 30 07:53:03 2024 +0930 btrfs: introduce extra sanity checks for extent maps Since extent_map structure has the all the needed members to represent a file extent directly, we can apply all the file extent sanity checks to an extent map. The new sanity checks will cross check both the old members (block_start/block_len/orig_start) and the new members (disk_bytenr/disk_num_bytes/offset). There is a special case for offset/orig_start/start cross check, we only do such sanity check for compressed extent, as only compressed read/encoded write really utilize orig_start. This can be proved by the cleanup patch of orig_start. The checks happens at the following times: - add_extent_mapping() This is for newly added extent map - replace_extent_mapping() This is for btrfs_drop_extent_map_range() and split_extent_map() - try_merge_map() For a lot of call sites we have to properly populate all the members to pass the sanity check, meanwhile the following code needs extra modification: - setup_file_extents() from inode-tests The file extents layout of setup_file_extents() is already too invalid that tree-checker would reject most of them in real world. However there is just a special unaligned regular extent which has mismatched disk_num_bytes (4096) and ram_bytes (4096 - 1). So instead of dropping the whole test case, here we just unify disk_num_bytes and ram_bytes to 4096 - 1. - test_case_7() from extent-map-tests An extent is inserted with 16K length, but on-disk extent size is only 4K. This means it must be a compressed extent, so set the compressed flag for it. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d2ac9922465be5e8c9662eead70867159bf567d Author: Qu Wenruo Date: Tue Apr 30 07:53:02 2024 +0930 btrfs: introduce new members for extent_map Introduce two new members for extent_map: - disk_bytenr - offset Both are matching the members with the same name inside btrfs_file_extent_items. For now this patch only touches those members when: - Reading btrfs_file_extent_items from disk - Inserting new holes - Merging two extent maps With the new disk_bytenr and disk_num_bytes, doing merging would be a little more complex, as we have 3 different cases: * Both extent maps are referring to the same data extents |<----- data extent A ----->| |<- em 1 ->|<- em 2 ->| * Both extent maps are referring to different data extents |<-- data extent A -->|<-- data extent B -->| |<- em 1 ->|<- em 2 ->| * One of the extent maps is referring to a merged and larger data extent that covers both extent maps This is not really valid case other than some selftests. So this test case would be removed. A new helper merge_ondisk_extents() is introduced to handle the above valid cases. To properly assign values for those new members, a new btrfs_file_extent parameter is introduced to all the involved call sites. - For NOCOW writes the btrfs_file_extent would be exposed from can_nocow_file_extent(). - For other writes, the members can be easily calculated As most of them have 0 offset and utilizing the whole on-disk data extent. The exception is encoded write, but thankfully that interface provided offset directly and all other needed info. For now, both the old members (block_start/block_len/orig_start) are co-existing with the new members (disk_bytenr/offset), meanwhile all the critical code is still using the old members only. The cleanup will happen later after all the old and new members are properly validated. There would be some re-ordering for the assignment of the extent_map members, now we follow the new ordering: - start and len Or file_pos and num_bytes for other structures. - disk_bytenr and disk_num_bytes - offset and ram_bytes - compression So expect some seemingly unrelated line movement. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 87a6962f73b1e5892d06987904e8f3827bf3ceec Author: Qu Wenruo Date: Tue Apr 30 07:53:01 2024 +0930 btrfs: export the expected file extent through can_nocow_extent() Currently function can_nocow_extent() only returns members needed for extent_map. However since we will soon change the extent_map structure to be more like btrfs_file_extent_item, we want to expose the expected file extent caused by the NOCOW write for future usage. This introduces a new structure, btrfs_file_extent, to be a more memory access friendly representation of btrfs_file_extent_item. And use that structure to expose the expected file extent caused by the NOCOW write. For now there is no user of the new structure yet. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e8fe524da027708793672e05fd4f17806855b0d8 Author: Qu Wenruo Date: Tue Apr 30 07:53:00 2024 +0930 btrfs: rename extent_map::orig_block_len to disk_num_bytes This would make it very obvious that the member just matches btrfs_file_extent_item::disk_num_bytes. Reviewed-by: Johannes Thumshirn Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8996f61ab9ff06a1433a58dd67ea0bf6f91ba499 Author: Filipe Manana Date: Wed May 22 15:29:05 2024 +0100 btrfs: move fiemap code into its own file Currently the core of the fiemap code lives in extent_io.c, which does not make any sense because it's not related to extent IO at all (and it was not as well before the big rewrite of fiemap I did some time ago). The entry point for fiemap, btrfs_fiemap(), lives in inode.c since it's an inode operation. Since there's a significant amount of fiemap code, move all of it into a dedicated file, including its entry point inode.c:btrfs_fiemap(). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f9763e4d150f22b18e79f1ef7ad2bee0059d02ff Author: Filipe Manana Date: Wed May 22 09:33:32 2024 +0100 btrfs: send: get rid of the label and gotos at ensure_commit_roots_uptodate() Now that there is a helper to commit the current transaction and we are using it, there's no need for the label and goto statements at ensure_commit_roots_uptodate(). So replace them with direct return statements that call btrfs_commit_current_transaction(). Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ded980eb3fadd79f73a1254e6b26551c4d6c8ab9 Author: Filipe Manana Date: Wed May 22 09:26:44 2024 +0100 btrfs: add and use helper to commit the current transaction We have several places that attach to the current transaction with btrfs_attach_transaction_barrier() and then commit the transaction if there is one. Add a helper and use it to deduplicate this pattern. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1f8aee298908611e62a6b86241c7451ff19684a4 Author: Filipe Manana Date: Tue May 21 17:08:06 2024 +0100 btrfs: scrub: avoid create/commit empty transaction at finish_extent_writes_for_zoned() At finish_extent_writes_for_zoned() we use btrfs_join_transaction() to catch any running transaction and then commit it. This will however create a new and empty transaction in case there's no running transaction anymore (got committed by the transaction kthread or other task for example) or there's a running transaction finishing its commit and with a state >= TRANS_STATE_UNBLOCKED. In the former case we don't need to do anything while in the second case we just need to wait for the transaction to complete its commit. So improve this by using btrfs_attach_transaction_barrier() instead, which does not create a new transaction if there's none running, and if there's a current transaction that is committing, it will wait for it to fully commit and not create a new transaction. This helps avoiding creating and committing empty transactions, saving IO, time and unnecessary rotation of the backup roots in the super block. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0557feab7004b0366ac849b30eee6b589d8ccac6 Author: Filipe Manana Date: Tue May 21 11:57:37 2024 +0100 btrfs: send: avoid create/commit empty transaction at ensure_commit_roots_uptodate() At ensure_commit_roots_uptodate() we use btrfs_join_transaction() to catch any running transaction and then commit it. This will however create a new and empty transaction in case there's no running transaction anymore (got committed by the transaction kthread or other task for example) or there's a running transaction finishing its commit and with a state >= TRANS_STATE_UNBLOCKED. In the former case we don't need to do anything while in the second case we just need to wait for the transaction to complete its commit. So improve this by using btrfs_attach_transaction_barrier() instead, which does not create a new transaction if there's none running, and if there's a current transaction that is committing, it will wait for it to fully commit and not create a new transaction. This helps avoiding creating and committing empty transactions, saving IO, time and unnecessary rotation of the backup roots in the super block. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9e79c497f8a91c186fc4f4083640179df40446d2 Author: Filipe Manana Date: Tue May 21 11:20:54 2024 +0100 btrfs: send: make ensure_commit_roots_uptodate() simpler and more efficient Before starting a send operation we have to make sure that every root has its commit root matching the regular root, to that send doesn't find stale inodes in the commit root (inodes that were deleted in the regular root) and fails the inode lookups with -ESTALE. Currently we keep looking for roots used by the send operation and as soon as we find one we commit the current transaction (or a new one since btrfs_join_transaction() creates one if there isn't any running or the running one is in a state >= TRANS_STATE_UNBLOCKED). It's pointless to keep looking until we don't find any, because after the first transaction commit all the other roots are updated too, as they were already tagged in the fs_info->fs_roots_radix radix tree when they were modified in order to have a commit root different from the regular root. Currently we are also always passing the main send root into btrfs_join_transaction(), which despite not having any functional issue, it is not optimal because in case the root wasn't modified we end up adding it to fs_info->fs_roots_radix and then update its root item in the root tree when committing the transaction, causing unnecessary work. So simplify and make this more efficient by removing the looping and by passing the first root we found that is modified as the argument to btrfs_join_transaction(). Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cab0d8623fb4bd568531875e1511430958382b04 Author: Filipe Manana Date: Tue May 21 10:45:27 2024 +0100 btrfs: avoid create and commit empty transaction when committing super At btrfs_commit_super(), called in a few contexts such as when unmounting a filesystem, we use btrfs_join_transaction() to catch any running transaction and then commit it. This will however create a new and empty transaction in case there's no running transaction or there's a running transaction with a state >= TRANS_STATE_UNBLOCKED. As we just want to be sure that any existing transaction is fully committed, we can use btrfs_attach_transaction_barrier() instead of btrfs_join_transaction(), therefore avoiding the creation and commit of empty transactions, which only waste IO and causes rotation of the precious backup roots. Example where we create and commit a pointless empty transaction: $ mkfs.btrfs -f /dev/sdj $ btrfs inspect-internal dump-super /dev/sdj | grep -e '^generation' generation 6 $ mount /dev/sdj /mnt/sdj $ touch /mnt/sdj/foo # Commit the currently open transaction. Just 'sync' or wait ~30 # seconds for the transaction kthread to commit it. $ sync $ btrfs inspect-internal dump-super /dev/sdj | grep -e '^generation' generation 7 $ umount /mnt/sdj $ btrfs inspect-internal dump-super /dev/sdj | grep -e '^generation' generation 8 The transaction with id 8 was pointless, an empty transaction that did not achieve anything. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit de18fba807c6b594d6ed13edf16726eb77237d32 Author: Filipe Manana Date: Mon May 20 13:21:12 2024 +0100 btrfs: qgroup: avoid start/commit empty transaction when flushing reservations When flushing reservations we are using btrfs_join_transaction() to get a handle for the current transaction and then commit it to try to release space. However btrfs_join_transaction() has some undesirable consequences: 1) If there's no running transaction, it will create one, and we will commit it right after. This is unnecessary because it will not release any space, and it will result in unnecessary IO and rotation of backup roots in the superblock; 2) If there's a current transaction and that transaction is committing (its state is >= TRANS_STATE_COMMIT_DOING), it will wait for that transaction to almost finish its commit (for its state to be >= TRANS_STATE_UNBLOCKED) and then start and return a new transaction. We will then commit that new transaction, which is pointless because all we wanted was to wait for the current (previous) transaction to fully finish its commit (state == TRANS_STATE_COMPLETED), and by starting and committing a new transaction we are wasting IO too and causing unnecessary rotation of backup roots in the superblock. So improve this by using btrfs_attach_transaction_barrier() instead, which does not create a new transaction if there's none running, and if there's a current transaction that is committing, it will wait for it to fully commit and not create a new transaction. Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 42317ab440c110618b511290284c6d6c10bcffc7 Author: David Sterba Date: Tue May 14 16:48:12 2024 +0200 btrfs: simplify range parameters of btrfs_wait_ordered_roots() The range is specified only in two ways, we can simplify the case for the whole filesystem range as a NULL block group parameter. Signed-off-by: David Sterba commit 839d6ea4f86de1d2e36a1b02561b4ccd597643b9 Author: Qu Wenruo Date: Fri Apr 19 14:57:24 2024 +0930 btrfs: automatically remove the subvolume qgroup Currently if we fully clean a subvolume (not only delete its directory, but fully clean all it's related data and root item), the associated qgroup would not be removed. We have "btrfs qgroup clear-stale" to handle such 0 level qgroups. Change the behavior to automatically removie the qgroup of a fully cleaned subvolume when possible: - Full qgroup but still consistent We can and should remove the qgroup. The qgroup numbers should be 0, without any rsv. - Full qgroup but inconsistent Can happen with drop_subtree_threshold feature (skip accounting and mark qgroup inconsistent). We can and should remove the qgroup. Higher level qgroup numbers will be incorrect, but since qgroup is already inconsistent, it should not be a problem. - Squota mode This is the special case, we can only drop the qgroup if its numbers are all 0. This would be handled by can_delete_qgroup(), so we only need to check the return value and ignore the -EBUSY error. Link: https://bugzilla.suse.com/show_bug.cgi?id=1222847 Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a776bf5f3c2300cfdf8a195663460b1793ac9847 Author: Qu Wenruo Date: Fri Apr 19 14:29:32 2024 +0930 btrfs: slightly loosen the requirement for qgroup removal [BUG] Currently if one is utilizing "qgroups/drop_subtree_threshold" sysfs, and a snapshot with level higher than that value is dropped, we will not be able to delete the qgroup until next qgroup rescan: uuid=ffffffff-eeee-dddd-cccc-000000000000 wipefs -fa $dev mkfs.btrfs -f $dev -O quota -s 4k -n 4k -U $uuid mount $dev $mnt btrfs subvolume create $mnt/subv1/ for (( i = 0; i < 1024; i++ )); do xfs_io -f -c "pwrite 0 2k" $mnt/subv1/file_$i > /dev/null done sync btrfs subvolume snapshot $mnt/subv1 $mnt/snapshot btrfs quota enable $mnt btrfs quota rescan -w $mnt sync echo 1 > /sys/fs/btrfs/$uuid/qgroups/drop_subtree_threshold btrfs subvolume delete $mnt/snapshot btrfs subvolume sync $mnt btrfs qgroup show -prce --sync $mnt btrfs qgroup destroy 0/257 $mnt umount $mnt The final qgroup removal would fail with the following error: ERROR: unable to destroy quota group: Device or resource busy [CAUSE] The above script would generate a subvolume of level 2, then snapshot it, enable qgroup, set the drop_subtree_threshold, then drop the snapshot. Since the subvolume drop would meet the threshold, qgroup would be marked inconsistent and skip accounting to avoid hanging the system at transaction commit. But currently we do not allow a qgroup with any rfer/excl numbers to be dropped, and this is not really compatible with the new drop_subtree_threshold behavior. [FIX] Only require the strict zero rfer/excl/rfer_cmpr/excl_cmpr for squota mode. This is due to the fact that squota can never go inconsistent, and it can have dropped subvolume but with non-zero qgroup numbers for future accounting. For full qgroup mode, we only check if there is a subvolume for it. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 56e6f2687521390bead4e4ea279ca4eec15579ef Author: David Sterba Date: Mon May 20 20:49:18 2024 +0200 btrfs: constify parameters of write_eb_member() and its users Reported by 'gcc -Wcast-qual', the argument from which write_extent_buffer() reads data to write to the eb should be const. In addition the const needs to be also added to __write_extent_buffer() local buffers. All callers of write_eb_member() can now be updated to use const for the input buffer structure or type. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit 840a97bdef1e5d7bd8bf147812df416cca15afc7 Author: David Sterba Date: Mon May 20 20:48:06 2024 +0200 btrfs: keep const when returning value from get_unaligned_le8() This was reported by 'gcc -Wcast-qual', the get_unaligned_le8() simply returns the argument and there's no reason to drop the cast. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit 5100c4eb527ebe175d3dbaeb0b8cc04f312183d7 Author: David Sterba Date: Mon May 20 20:19:53 2024 +0200 btrfs: remove unused define EXTENT_SIZE_PER_ITEM This was added in c61a16a701a126 ("Btrfs: fix the confusion between delalloc bytes and metadata bytes") and removed in 03fe78cc2942c5 ("btrfs: use delalloc_bytes to determine flush amount for shrink_delalloc") where the calculation was reworked to use a non-constant numbers. This was found by 'make W=2'. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit d2715d1db455e5e1099c48408aeae15551b67e02 Author: David Sterba Date: Mon May 20 19:46:44 2024 +0200 btrfs: use for-local variables that shadow function variables We've started to use for-loop local variables and in a few places this shadows a function variable. Convert a few cases reported by 'make W=2'. If applicable also change the style to post-increment, that's the preferred one. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit 91629e6dea437c6e7f01431e423a90ed1bab5db3 Author: David Sterba Date: Mon May 20 19:49:17 2024 +0200 btrfs: rename macro local variables that clash with other variables Fix variable names in two macros where there's a local function variable of the same name. In subpage_calc_start_bit() it's in several callers, in btrfs_abort_transaction() it's only in replace_file_extents(). Found by 'make W=2'. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit 9c5e1fb024df2675eeb6a2f43770687602a0ffdc Author: David Sterba Date: Mon May 20 19:40:26 2024 +0200 btrfs: remove duplicate name variable declarations When running 'make W=2' there are a few reports where a variable of the same name is declared in a nested block. In all the cases we can use the one declared in the parent block, no problematic cases were found. Reviewed-by: Boris Burkov Reviewed-by: Anand Jain Reviewed-by: Naohiro Aota Signed-off-by: David Sterba commit 56b7169f691cd4d015aca8436acd27f37a6b6a62 Author: Filipe Manana Date: Sat May 18 18:22:03 2024 +0100 btrfs: use a btrfs_inode local variable at btrfs_sync_file() Instead of using a VFS inode local pointer and then doing many BTRFS_I() calls inside btrfs_sync_file(), use a btrfs_inode pointer instead. This makes everything a bit easier to read and less confusing, allowing to make some statements shorter. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e641e323abb3ceff6477a3936c4f5173126b7890 Author: Filipe Manana Date: Sat May 18 18:14:06 2024 +0100 btrfs: pass a btrfs_inode to btrfs_wait_ordered_range() Instead of passing a (VFS) inode pointer argument, pass a btrfs_inode instead, as this is generally what we do for internal APIs, making it more consistent with most of the code base. This will later allow to help to remove a lot of BTRFS_I() calls in btrfs_sync_file(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cef2daba42682764be4083f8d333a2477034e7c9 Author: Filipe Manana Date: Sat May 18 18:01:47 2024 +0100 btrfs: pass a btrfs_inode to btrfs_fdatawrite_range() Instead of passing a (VFS) inode pointer argument, pass a btrfs_inode instead, as this is generally what we do for internal APIs, making it more consistent with most of the code base. This will later allow to help to remove a lot of BTRFS_I() calls in btrfs_sync_file(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4d0120a519357c817414adaa0f1b3e04fa424478 Author: Filipe Manana Date: Sat May 18 14:09:41 2024 +0100 btrfs: use a btrfs_inode in the log context (struct btrfs_log_ctx) Instead of using a inode pointer, use a btrfs_inode pointer in the log context structure, as this is generally what we need and allows for some internal APIs to take a btrfs_inode instead, making them more consistent with most of the code base. This will later allow to help to remove a lot of BTRFS_I() calls in btrfs_sync_file(). Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c41881ae07c828ee5da8ed1d44204911fdae3bcf Author: Filipe Manana Date: Wed May 15 13:54:14 2024 +0100 btrfs: make btrfs_finish_ordered_extent() return void Currently btrfs_finish_ordered_extent() returns a boolean indicating if the ordered extent was added to the work queue for completion, but none of its callers cares about it, so make it return void. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 83937fb612efa2f070536d94a8d6cfcbb1c589af Author: Anand Jain Date: Sun May 19 08:14:56 2024 +0800 btrfs: move btrfs_block_group_root() to block-group.c The function btrfs_block_group_root() is declared in disk-io.c; however, all its callers are in block-group.c. Move it to the latter file and declare it static. Reviewed-by: Naohiro Aota Reviewed-by: Qu Wenruo Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 70559abf6241c9ffe23e526a66960ac76d258e0e Author: Anand Jain Date: Thu May 16 11:10:23 2024 +0800 btrfs: drop bytenr_orig and fix comment in btrfs_scan_one_device() Drop the single-use variable bytenr_orig and instead use btrfs_sb_offset() in the function argument passing. Fix a stale comment about not automatically fixing a bad primary superblock from the backup mirror copies. Also, move the comment closer to where the primary superblock read occurs. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e660ca3a98d93180973426239e69ee44f4d7941 Author: Filipe Manana Date: Fri May 10 17:41:04 2024 +0100 btrfs: use a regular rb_root instead of cached rb_root for extent_map_tree We are currently using a cached rb_root (struct rb_root_cached) for the rb root of struct extent_map_tree. This doesn't offer much of an advantage here because: 1) It's only advantage over the regular rb_root is that it caches a pointer to the left most node (first node), so a call to rb_first_cached() doesn't have to chase pointers until it reaches the left most node; 2) We only have two scenarios that access left most node with rb_first_cached(): When dropping all extent maps from an inode, during inode eviction; When iterating over extent maps during the extent map shrinker; 3) In both cases we keep removing extent maps, which causes deletion of the left most node so rb_erase_cached() has to call rb_next() to find out what's the next left most node and assign it to struct rb_root_cached::rb_leftmost; 4) We can do that ourselves in those two uses cases and stop using a rb_root_cached rb tree and use instead a regular rb_root rb tree. This reduces the size of struct extent_map_tree by 8 bytes and, since this structure is embedded in struct btrfs_inode, it also reduces the size of that structure by 8 bytes. So on a 64 bits platform the size of btrfs_inode is reduced from 1032 bytes down to 1024 bytes. This means we will be able to have 4 inodes per 4K page instead of 3. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7f5830bc964dbe761af27c9a9f788bd8c7397d3d Author: Filipe Manana Date: Fri May 10 17:11:31 2024 +0100 btrfs: rename rb_root member of extent_map_tree from map to root Currently we name the rb_root member of struct extent_map_tree as 'map', which is odd and confusing. Since it's a root node, rename it to 'root'. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7a7bc21449bb185884cd6b0c2b52c2a27b0184c2 Author: Filipe Manana Date: Sun May 5 13:47:02 2024 +0100 btrfs: remove objectid from struct btrfs_inode on 64 bits platforms On 64 bits platforms we don't really need to have a dedicated member (the objectid field) for the inode's number since we store in the VFS inode's i_ino member, which is an unsigned long and this type is 64 bits wide on 64 bits platforms. We only need that field in case we are on a 32 bits platform because the unsigned long type is 32 bits wide on such platforms See commit 33345d01522f ("Btrfs: Always use 64bit inode number") regarding this 64/32 bits detail. The objectid field of struct btrfs_inode is also used to store the ID of a root for directories that are stubs for unreferenced roots. In such cases the inode is a directory and has the BTRFS_INODE_ROOT_STUB runtime flag set. So in order to reduce the size of btrfs_inode structure on 64 bits platforms we can remove the objectid member and use the VFS inode's i_ino member instead whenever we need to get the inode number. In case the inode is a root stub (BTRFS_INODE_ROOT_STUB set) we can use the member last_reflink_trans to store the ID of the unreferenced root, since such inode is a directory and reflinks can't be done against directories. So remove the objectid fields for 64 bits platforms and alias the last_reflink_trans field with a name of ref_root_id in a union. On a release kernel config, this reduces the size of struct btrfs_inode from 1040 bytes down to 1032 bytes. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 068fc8f9141f503d2e7744208bb6d68a739ee53d Author: Filipe Manana Date: Fri May 3 18:10:06 2024 +0100 btrfs: remove location key from struct btrfs_inode Currently struct btrfs_inode has a key member, named "location", that is either: 1) The key of the inode's item. In this case the objectid is the number of the inode; 2) A key stored in a dir entry with a type of BTRFS_ROOT_ITEM_KEY, for the case where we have a root that is a snapshot of a subvolume that points to other subvolumes. In this case the objectid is the ID of a subvolume inside the snapshotted parent subvolume. The key is only used to lookup the inode item for the first case, while for the second it's never used since it corresponds to directory stubs created with new_simple_dir() and which are marked as dummy, so there's no actual inode item to ever update. In the second case we only check the key type at btrfs_ino() for 32 bits platforms and its objectid is only needed for unlink. Instead of using a key we can do fine with just the objectid, since we can generate the key whenever we need it having only the objectid, as in all use cases the type is always BTRFS_INODE_ITEM_KEY and the offset is always 0. So use only an objectid instead of a full key. This reduces the size of struct btrfs_inode from 1048 bytes down to 1040 bytes on a release kernel. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d7db6e8bd22e692e0b7073eb7d12c9c1bbaeb2d Author: Filipe Manana Date: Tue Apr 30 16:52:27 2024 +0100 btrfs: don't allocate file extent tree for non regular files When not using the NO_HOLES feature we always allocate an io tree for an inode's file_extent_tree. This is wasteful because that io tree is only used for regular files, so we allocate more memory than needed for inodes that represent directories or symlinks for example, or for inodes that correspond to free space inodes. So improve on this by allocating the io tree only for inodes of regular files that are not free space inodes. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d9891ae28b0d3d3a188c502d33f04c1fb3ffd950 Author: Filipe Manana Date: Tue Apr 30 10:55:05 2024 +0100 btrfs: unify index_cnt and csum_bytes from struct btrfs_inode The index_cnt field of struct btrfs_inode is used only for two purposes: 1) To store the index for the next entry added to a directory; 2) For the data relocation inode to track the logical start address of the block group currently being relocated. For the relocation case we use index_cnt because it's not used for anything else in the relocation use case - we could have used other fields that are not used by relocation such as defrag_bytes, last_unlink_trans or last_reflink_trans for example (among others). Since the csum_bytes field is not used for directories, do the following changes: 1) Put index_cnt and csum_bytes in a union, and index_cnt is only initialized when the inode is a directory. The csum_bytes is only accessed in IO paths for regular files, so we're fine here; 2) Use the defrag_bytes field for relocation, since the data relocation inode is never used for defrag purposes. And to make the naming better, alias it to reloc_block_group_start by using a union. This reduces the size of struct btrfs_inode by 8 bytes in a release kernel, from 1056 bytes down to 1048 bytes. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e2844cce75c9e61a27dcc29f0773afe970cde296 Author: Filipe Manana Date: Mon May 6 13:27:29 2024 +0100 btrfs: remove inode_lock from struct btrfs_root and use xarray locks Currently we use the spinlock inode_lock from struct btrfs_root to serialize access to two different data structures: 1) The delayed inodes xarray (struct btrfs_root::delayed_nodes); 2) The inodes xarray (struct btrfs_root::inodes). Instead of using our own lock, we can use the spinlock that is part of the xarray implementation, by using the xa_lock() and xa_unlock() APIs and using the xarray APIs with the double underscore prefix that don't take the xarray locks and assume the caller is using xa_lock() and xa_unlock(). So remove the spinlock inode_lock from struct btrfs_root and use the corresponding xarray locks. This brings 2 benefits: 1) We reduce the size of struct btrfs_root, from 1336 bytes down to 1328 bytes on a 64 bits release kernel config; 2) We reduce lock contention by not using anymore the same lock for changing two different and unrelated xarrays. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d25f4ec17624b1b18ff2e0a3e9c2baa71c8a86f2 Author: Filipe Manana Date: Mon Apr 29 14:01:09 2024 +0100 btrfs: reduce nesting and deduplicate error handling at btrfs_iget_path() Make btrfs_iget_path() simpler and easier to read by avoiding nesting of if-then-else statements and having an error label to do all the error handling instead of repeating it a couple times. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 061ea8581b2e0ade913c8f5cd845e801976a577b Author: Filipe Manana Date: Mon Apr 29 13:08:12 2024 +0100 btrfs: preallocate inodes xarray entry to avoid transaction abort When creating a new inode, at btrfs_create_new_inode(), one of the very last steps is to add the inode to the root's inodes xarray. This often requires allocating memory which may fail (even though xarrays have a dedicated kmem_cache which make it less likely to fail), and at that point we are forced to abort the current transaction (as some, but not all, of the inode metadata was added to its subvolume btree). To avoid a transaction abort, preallocate memory for the xarray early at btrfs_create_new_inode(), so that if we fail we don't need to abort the transaction and the insertion into the xarray is guaranteed to succeed. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 310b2f5d5a9451b708ab1d3385c3b0998084904c Author: Filipe Manana Date: Wed Apr 24 16:58:01 2024 +0100 btrfs: use an xarray to track open inodes in a root Currently we use a red black tree (rb-tree) to track the currently open inodes of a root (in struct btrfs_root::inode_tree). This however is not very efficient when the number of inodes is large since rb-trees are binary trees. For example for 100K open inodes, the tree has a depth of 17. Besides that, inserting into the tree requires navigating through it and pulling useless cache lines in the process since the red black tree nodes are embedded within the btrfs inode - on the other hand, by being embedded, it requires no extra memory allocations. We can improve this by using an xarray instead, which is efficient when indices are densely clustered (such as inode numbers), is more cache friendly and behaves like a resizable array, with a much better search and insertion complexity than a red black tree. This only has one small disadvantage which is that insertion will sometimes require allocating memory for the xarray - which may fail (not that often since it uses a kmem_cache) - but on the other hand we can reduce the btrfs inode structure size by 24 bytes (from 1080 down to 1056 bytes) after removing the embedded red black tree node, which after the next patches will allow to reduce the size of the structure to 1024 bytes, meaning we will be able to store 4 inodes per 4K page instead of 3 inodes. This change does a straightforward change to use an xarray, and results in a transaction abort if we can't allocate memory for the xarray when creating an inode - but the next patch changes things so that we don't need to abort. Running the following fs_mark test showed some improvements: $ cat test.sh #!/bin/bash DEV=/dev/nullb0 MNT=/mnt/nullb0 MOUNT_OPTIONS="-o ssd" FILES=100000 THREADS=$(nproc --all) echo "performance" | \ tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f $DEV mount $MOUNT_OPTIONS $DEV $MNT OPTS="-S 0 -L 5 -n $FILES -s 0 -t $THREADS -k" for ((i = 1; i <= $THREADS; i++)); do OPTS="$OPTS -d $MNT/d$i" done fs_mark $OPTS umount $MNT Before this patch: FSUse% Count Size Files/sec App Overhead 10 1200000 0 92081.6 12505547 16 2400000 0 138222.6 13067072 23 3600000 0 148833.1 13290336 43 4800000 0 97864.7 13931248 53 6000000 0 85597.3 14384313 After this patch: FSUse% Count Size Files/sec App Overhead 10 1200000 0 93225.1 12571078 16 2400000 0 146720.3 12805007 23 3600000 0 160626.4 13073835 46 4800000 0 116286.2 13802927 53 6000000 0 90087.9 14754892 The test was run with a release kernel config (Debian's default config). Also capturing the insertion times into the rb tree and into the xarray, that is measuring the duration of the old function inode_tree_add() and the duration of the new btrfs_add_inode_to_root() function, gave the following results (in nanoseconds): Before this patch, inode_tree_add() execution times: Count: 5000000 Range: 0.000 - 5536887.000; Mean: 775.674; Median: 729.000; Stddev: 4820.961 Percentiles: 90th: 1015.000; 95th: 1139.000; 99th: 1397.000 0.000 - 7.816: 40 | 7.816 - 37.858: 209 | 37.858 - 170.278: 6059 | 170.278 - 753.961: 2754890 ##################################################### 753.961 - 3326.728: 2232312 ########################################### 3326.728 - 14667.018: 4366 | 14667.018 - 64652.943: 852 | 64652.943 - 284981.761: 550 | 284981.761 - 1256150.914: 221 | 1256150.914 - 5536887.000: 7 | After this patch, btrfs_add_inode_to_root() execution times: Count: 5000000 Range: 0.000 - 2900652.000; Mean: 272.148; Median: 241.000; Stddev: 2873.369 Percentiles: 90th: 342.000; 95th: 432.000; 99th: 572.000 0.000 - 7.264: 104 | 7.264 - 33.145: 352 | 33.145 - 140.081: 109606 # 140.081 - 581.930: 4840090 ##################################################### 581.930 - 2407.590: 43532 | 2407.590 - 9950.979: 2245 | 9950.979 - 41119.278: 514 | 41119.278 - 169902.616: 155 | 169902.616 - 702018.539: 47 | 702018.539 - 2900652.000: 9 | Average, percentiles, standard deviation, etc, are all much better. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bbbee460aaaabe5bea6665dd4ce18677f2d154cc Author: Qu Wenruo Date: Tue May 14 18:32:13 2024 +0930 btrfs: raid56: do extra dumping for CONFIG_BTRFS_ASSERT There are several hard-to-hit ASSERT()s hit inside raid56. Unfortunately the ASSERT() expression is a little complex, and except the ASSERT(), there is nothing to provide any clue. Considering if race is involved, it's pretty hard to reproduce. Meanwhile sometimes the dump of the rbio structure can provide some pretty good clues, it's worth to do the extra multi-line dump for btrfs raid56 related code. The dump looks like this: BTRFS critical (device dm-3): bioc logical=4598530048 full_stripe=4598530048 size=0 map_type=0x81 mirror=0 replace_nr_stripes=0 replace_stripe_src=-1 num_stripes=5 BTRFS critical (device dm-3): nr=0 devid=1 physical=1166147584 BTRFS critical (device dm-3): nr=1 devid=2 physical=1145176064 BTRFS critical (device dm-3): nr=2 devid=4 physical=1145176064 BTRFS critical (device dm-3): nr=3 devid=5 physical=1145176064 BTRFS critical (device dm-3): nr=4 devid=3 physical=1145176064 BTRFS critical (device dm-3): rbio flags=0x0 nr_sectors=80 nr_data=4 real_stripes=5 stripe_nsectors=16 scrubp=0 dbitmap=0x0 BTRFS critical (device dm-3): logical=4598530048 assertion failed: orig_logical >= full_stripe_start && orig_logical + orig_len <= full_stripe_start + rbio->nr_data * BTRFS_STRIPE_LEN, in fs/btrfs/raid56.c:1702 Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3441b070f82b721473547cba9e4cd7914006b67c Author: Filipe Manana Date: Tue May 14 13:19:12 2024 +0100 btrfs: fix function name in comment for btrfs_remove_ordered_extent() Due to a refactoring introduced by commit 53d9981ca20e ("btrfs: split btrfs_alloc_ordered_extent to allocation and insertion helpers"), the function btrfs_alloc_ordered_extent() was renamed to alloc_ordered_extent(), so the comment at btrfs_remove_ordered_extent() is no longer very accurate. Update the comment to refer to the new name "alloc_ordered_extent()". Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 416d6ab49d43570a52484677a864bda52e27db6c Author: Filipe Manana Date: Mon May 13 18:12:35 2024 +0100 btrfs: fix misspelled end IO compression callbacks Fix typo in the end IO compression callbacks, from "comprssed" to "compressed". Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d153fc5573e9684f7082baa66a7f3f6371a4d04d Author: Filipe Manana Date: Mon May 13 18:05:47 2024 +0100 btrfs: remove no longer used btrfs_migrate_to_delayed_refs_rsv() The function btrfs_migrate_to_delayed_refs_rsv() is no longer used. Its last use was removed in commit 2f6397e448e6 ("btrfs: don't refill whole delayed refs block reserve when starting transaction"). So remove the function. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 55a2f3887078cd3797a2553b9f8f095dc8e4e73a Author: Filipe Manana Date: Tue May 7 23:50:16 2024 +0100 btrfs: zoned: make btrfs_get_dev_zone() static It's not used outside zoned.c, so make it static. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ef6adef12bccdf9dd7fcb50deb930dee4b52bc9 Author: Johannes Thumshirn Date: Wed May 8 13:14:47 2024 +0200 btrfs: pass struct btrfs_io_geometry into handle_ops_on_dev_replace() Passing in a 'struct btrfs_io_geometry into handle_ops_on_dev_replace can reduce the number of arguments by two. No functional changes otherwise. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 34064fc3c9b557789a33214de0af6d6e09e4a0c8 Author: David Sterba Date: Thu May 2 23:11:33 2024 +0200 btrfs: qgroup: do quick checks if quotas are enabled before starting ioctls The ioctls that add relations, create qgroups or set limits start/join transaction. When quotas are not enabled this is not necessary, there will be errors reported back anyway but this could be also misleading and we should really report that quotas are not enabled. For that use -ENOTCONN. The helper is meant to do a quick check before any other standard ioctl checks are done. If quota is disabled meanwhile we still rely on proper locking inside any active operation changing the qgroup structures. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 3900cf8b3a7c9a925a5cda18430ba4c874037800 Author: Wolfram Sang Date: Sat Jul 6 13:21:00 2024 +0200 i2c: st: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Alain Volmat Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 79e9df7dc5da07e5efc744a145cc55c9cd0866cd Author: Wolfram Sang Date: Sat Jul 6 13:20:59 2024 +0200 i2c: cpm: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Acked-by: Jochen Friedrich Signed-off-by: Andi Shyti commit 532cc2176ab6a54cbcffaff0a28d31f3cc7263a2 Author: Wolfram Sang Date: Sat Jul 6 13:20:58 2024 +0200 i2c: virtio: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Viresh Kumar Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit a0e74ddb38afc613ef831556166cd96901630bc2 Author: Wolfram Sang Date: Sat Jul 6 13:20:57 2024 +0200 i2c: nvidia-gpu: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit d919298781d60f53560b4847323cb2436c914765 Author: Wolfram Sang Date: Sat Jul 6 13:20:56 2024 +0200 i2c: viai2c: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit f2005ced20eedbfe4d6f2313088936994f13b7ca Author: Wolfram Sang Date: Sat Jul 6 13:20:55 2024 +0200 i2c: viperboard: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a superfluous debug output which is already available via tracing. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit e02ec4e15a3c5d55c26f660aab2b4c2b492a166e Author: Wolfram Sang Date: Sat Jul 6 13:20:54 2024 +0200 i2c: uniphier: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit f872d28500bd42353495c0c4076f20aa832c36d6 Author: Wolfram Sang Date: Sat Jul 6 13:20:53 2024 +0200 i2c: uniphier-f: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 664e69d2e511b3fef2b856916f942c626d0314ed Author: Wolfram Sang Date: Sat Jul 6 13:20:52 2024 +0200 i2c: tiny-usb: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a superfluous debug output which is already available via tracing. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 44981dc3bacc51535bfc891d84530656d5bd8e3a Author: Wolfram Sang Date: Sat Jul 6 13:20:51 2024 +0200 i2c: thunderx-pcidrv: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit b00f427a07a3ccc56ed2b1140b47474ae948efd5 Author: Wolfram Sang Date: Sat Jul 6 13:20:50 2024 +0200 i2c: tegra-bpmp: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 3c06105d06064f139dac8a7d01f84d89bf3775a3 Author: Wolfram Sang Date: Sat Jul 6 13:20:49 2024 +0200 i2c: taos-evm: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit c2cac347ef59e01c34cae69996fc6c47043f657f Author: Wolfram Sang Date: Sat Jul 6 13:20:48 2024 +0200 i2c: sun6i-p2wi: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Chen-Yu Tsai Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 830f70cf1874df102128d498d5ba009d90529cdf Author: Wolfram Sang Date: Sat Jul 6 13:20:47 2024 +0200 i2c: stm32f4: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Alain Volmat Acked-by: Pierre-Yves MORDRET Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 5627f15847cd92d57e34896674b8471d255969e1 Author: Wolfram Sang Date: Sat Jul 6 13:20:46 2024 +0200 i2c: sprd: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Baolin Wang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit c405861c605c6e4323b3470c7d1229fb179532cf Author: Wolfram Sang Date: Sat Jul 6 13:20:45 2024 +0200 i2c: sis5595: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 39a6695f0e791f01f8879f1f15a700d7a8afb573 Author: Wolfram Sang Date: Sat Jul 6 13:20:44 2024 +0200 i2c: rzv2m: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit fd4b7e03d65e4a2e135924a8c21cc79288f1ba96 Author: Wolfram Sang Date: Sat Jul 6 13:20:43 2024 +0200 i2c: robotfuzz-osif: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit b340db73513e95aed95d00157afa4dc7479903ed Author: Wolfram Sang Date: Sat Jul 6 13:20:42 2024 +0200 i2c: rk3x: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Heiko Stuebner Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit e1571b1fb4ff9118315b627cc6dae524709899cd Author: Wolfram Sang Date: Sat Jul 6 13:20:41 2024 +0200 i2c: riic: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 0fddb5713bc88851202e852437df1e47e7c9463e Author: Wolfram Sang Date: Sat Jul 6 13:20:40 2024 +0200 i2c: pxa-pci: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 06b81a64c0f9a06932eeba7a76f62be8535551b7 Author: Wolfram Sang Date: Sat Jul 6 13:20:39 2024 +0200 i2c: powermac: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit a0ea3050082a595a3537ace01ff1efc5ff091def Author: Wolfram Sang Date: Sat Jul 6 13:20:38 2024 +0200 i2c: piix4: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 7d4cbda7c7ebbdf97e0c28d7640898549f6a3d0a Author: Wolfram Sang Date: Sat Jul 6 13:20:37 2024 +0200 i2c: pasemi: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Sven Peter Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit b4a0ca13024319545286d7aa9ce79288261e6f4b Author: Wolfram Sang Date: Sat Jul 6 13:20:36 2024 +0200 i2c: owl: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 7947d187a6ea4d42ad93c59f75c5d1a71618a522 Author: Wolfram Sang Date: Sat Jul 6 13:20:35 2024 +0200 i2c: opal: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 9881aac5aa11d1c7ace343ce44090b7cb2abf4e6 Author: Wolfram Sang Date: Sat Jul 6 13:20:34 2024 +0200 i2c: octeon: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 5a078b4f1f51743cb529693c29884a6b58dc02ad Author: Wolfram Sang Date: Sat Jul 6 13:20:33 2024 +0200 i2c: ocores: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 3fdf6335231edb2deb4fd2037d5b42ec38546b86 Author: Wolfram Sang Date: Sat Jul 6 13:20:32 2024 +0200 i2c: mv64xxx: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 839052d1d3a2bf82122945fdeec559f9e6187831 Author: Wolfram Sang Date: Sat Jul 6 13:20:31 2024 +0200 i2c: mt7621: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Stefan Roese Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 234b336f012807d58d71b484ea2c287f857a6e34 Author: Wolfram Sang Date: Sat Jul 6 13:20:30 2024 +0200 i2c: mpc: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Chris Packham Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 84187df6aea2ae79a880c69f14198e42dedc3902 Author: Wolfram Sang Date: Sat Jul 6 13:20:29 2024 +0200 i2c: mlxcpld: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Vadim Pasternak Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit d670ca5cf81ee73c014fb41c5f2e7fae2eb231fc Author: Wolfram Sang Date: Sat Jul 6 13:20:28 2024 +0200 i2c: ls2x: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 8c6890726be6e12efaa1635916eef20cf12aea0f Author: Wolfram Sang Date: Sat Jul 6 13:20:27 2024 +0200 i2c: lpc2k: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit fe5df00856464ae55c46b6f2ddc4080a25773699 Author: Wolfram Sang Date: Sat Jul 6 13:20:26 2024 +0200 i2c: ljca: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 3724934a3c4475b9ed22a8cc79c6b1b227abc3c8 Author: Wolfram Sang Date: Sat Jul 6 13:20:25 2024 +0200 i2c: kempld: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 057377dc0b9f1f1b43721b2c92cfd2df18236df0 Author: Wolfram Sang Date: Sat Jul 6 13:20:24 2024 +0200 i2c: jz4780: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Paul Cercueil Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 7d06f94e2c05940a32cd6d65e780a9fec4654233 Author: Wolfram Sang Date: Sat Jul 6 13:20:23 2024 +0200 i2c: isch: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 5e705f93fbf752b614c2c8c1d55522e777d77335 Author: Wolfram Sang Date: Sat Jul 6 13:20:22 2024 +0200 i2c: iop3xx: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a useless comment while here. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 8946eb1048b6f4b7ce44e3478760ec44945e560d Author: Wolfram Sang Date: Sat Jul 6 13:20:21 2024 +0200 i2c: ibm_iic: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a useless comment while here. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit d08cac0a6378c310ba0ab17e798d9be87db77c3e Author: Wolfram Sang Date: Sat Jul 6 13:20:20 2024 +0200 i2c: i801: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 7c9e67055ac3d2d03850f0d92d194ebd661aa26b Author: Wolfram Sang Date: Sat Jul 6 13:20:19 2024 +0200 i2c: hix5hd2: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 3fd5894f7d23fd51ab43d1aecb55e2451aa15182 Author: Wolfram Sang Date: Sat Jul 6 13:20:18 2024 +0200 i2c: hisi: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 5c9c9bff687ba6e1ec5ed6ce5fcf101eaaab8bc7 Author: Wolfram Sang Date: Sat Jul 6 13:20:17 2024 +0200 i2c: highlander: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 9557d1264de3fed328c7e10e2c463506c6533fdf Author: Wolfram Sang Date: Sat Jul 6 13:20:16 2024 +0200 i2c: gpio: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 57deeb98d5f228f2ab9712d6233760c6be645453 Author: Wolfram Sang Date: Sat Jul 6 13:20:15 2024 +0200 i2c: fsi: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Eddie James Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 37ce300ed6d9dc730994e4e753912a5c4d773acf Author: Wolfram Sang Date: Sat Jul 6 13:20:14 2024 +0200 i2c: dln2: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 3f1ca8a5396eb8785061015d42aa30d9506863ad Author: Wolfram Sang Date: Sat Jul 6 13:20:13 2024 +0200 i2c: diolan-u2c: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Guenter Roeck Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 4c77db838892f07f5e1601afaad569972fc17b76 Author: Wolfram Sang Date: Sat Jul 6 13:20:12 2024 +0200 i2c: digicolor: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 68e4c181719f8dd9bb2bbbb075501c4888023eb5 Author: Wolfram Sang Date: Sat Jul 6 13:20:11 2024 +0200 i2c: davinci: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove and reword comments while here. Signed-off-by: Wolfram Sang Acked-by: Bartosz Golaszewski Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 828434af3d9850d4cf85ee20890fbb043448e856 Author: Wolfram Sang Date: Sat Jul 6 13:20:10 2024 +0200 i2c: cros-ec-tunnel: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 71ab90129a21f6be337170b6f834a05c4c6b7656 Author: Wolfram Sang Date: Wed Jul 10 08:41:23 2024 +0200 i2c: cp2615: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Acked-by: Bence Csókás Signed-off-by: Andi Shyti commit 124ac28619efa9e0afa8deb8c32f211806a5ec62 Author: Wolfram Sang Date: Sat Jul 6 13:20:08 2024 +0200 i2c: cht-wc: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Reviewed-by: Hans de Goede Signed-off-by: Andi Shyti commit 91d1f6c5c7c4e91770216eec93b60aa9e535604e Author: Wolfram Sang Date: Sat Jul 6 13:20:07 2024 +0200 i2c: brcmstb: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a useless comment while here. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Reviewed-by: Florian Fainelli Signed-off-by: Andi Shyti commit efaa4dca48e7d654bc33a2ba09e42d6e3b08a3f1 Author: Wolfram Sang Date: Sat Jul 6 13:20:06 2024 +0200 i2c: bcm2835: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Florian Fainelli Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 045f96ed93876d02bc8c853deab41267f5840901 Author: Wolfram Sang Date: Sat Jul 6 13:20:05 2024 +0200 i2c: bcm-kona: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a useless comment while here. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Reviewed-by: Florian Fainelli Signed-off-by: Andi Shyti commit a4c98e4adacd6d16f8d2e7ca9da75a43da1dcfd0 Author: Wolfram Sang Date: Sat Jul 6 13:20:04 2024 +0200 i2c: au1550: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Remove a useless comment while here. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit d7f365fc379c68eebbf3096f51db59b4ff48f67d Author: Wolfram Sang Date: Sat Jul 6 13:20:03 2024 +0200 i2c: altera: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 4954abc402cc6d352bfcb51a091f046f5c31766d Author: Wolfram Sang Date: Sat Jul 6 13:20:02 2024 +0200 i2c: ali15x3: reword according to newest specification Change the wording of this driver wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit a93c2e5fe766825d6264823fd1dca9aae747cf5d Author: Wolfram Sang Date: Sat Jul 6 13:20:01 2024 +0200 i2c: reword i2c_algorithm according to newest specification Start changing the wording of the I2C main header wrt. the newest I2C v7 and SMBus 3.2 specifications and replace "master/slave" with more appropriate terms. The first step renames the members of struct i2c_algorithm. Once all in-tree users are converted, the anonymous union will go away again. All this work will also pave the way for finally seperating the monolithic header into more fine-grained headers like "i2c/clients.h" etc. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 87e552ad654554be73e62dd43c923bcee215287d Author: Dan Carpenter Date: Thu Jul 4 10:19:32 2024 -0500 leds: flash: leds-qcom-flash: Test the correct variable in init This code was passing the incorrect pointer to PTR_ERR_OR_ZERO() so it always returned success. It should have been checking the array element instead of the array itself. Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/ZoWJS_epjIMCYITg@stanley.mountain Signed-off-by: Lee Jones commit 4137d94fd8726431b8bf3ab329311c59e80f5530 Author: Christian Marangi Date: Thu Jun 27 00:15:13 2024 +0200 leds: leds-lp55xx: Convert mutex lock/unlock to guard API Convert any entry of mutex lock/unlock to guard API and simplify code. With the use of guard API, handling for selttest functions can be greatly simplified. Suggested-by: Markus Elfring Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626221520.2846-3-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit c2bb8198fee88a428513f8d023c627ecd13aa694 Author: Guenter Roeck Date: Wed Jul 10 22:53:52 2024 -0700 regmap: kunit: Add test cases for regmap_multi_reg_(read,write}() Add test cases for regmap_multi_reg_read() and regmap_multi_reg_write(). Signed-off-by: Guenter Roeck Link: https://patch.msgid.link/20240711055352.3411807-1-linux@roeck-us.net Signed-off-by: Mark Brown commit 833cd3e9ad8360785b6c23c82dd3856df00732d9 Author: Qiuxu Zhuo Date: Wed Jul 3 22:17:37 2024 +0800 drm/fb-helper: Don't schedule_work() to flush frame buffer during panic() Sometimes the system [1] hangs on x86 I/O machine checks. However, the expected behavior is to reboot the system, as the machine check handler ultimately triggers a panic(), initiating a reboot in the last step. The root cause is that sometimes the panic() is blocked when drm_fb_helper_damage() invoking schedule_work() to flush the frame buffer. This occurs during the process of flushing all messages to the frame buffer driver as shown in the following call trace: Machine check occurs [2]: panic() console_flush_on_panic() console_flush_all() console_emit_next_record() con->write() vt_console_print() hide_cursor() vc->vc_sw->con_cursor() fbcon_cursor() ops->cursor() bit_cursor() soft_cursor() info->fbops->fb_imageblit() drm_fbdev_generic_defio_imageblit() drm_fb_helper_damage_area() drm_fb_helper_damage() schedule_work() // <--- blocked here ... emergency_restart() // wasn't invoked, so no reboot. During panic(), except the panic CPU, all the other CPUs are stopped. In schedule_work(), the panic CPU requires the lock of worker_pool to queue the work on that pool, while the lock may have been token by some other stopped CPU. So schedule_work() is blocked. Additionally, during a panic(), since there is no opportunity to execute any scheduled work, it's safe to fix this issue by skipping schedule_work() on 'oops_in_progress' in drm_fb_helper_damage(). [1] Enable the kernel option CONFIG_FRAMEBUFFER_CONSOLE, CONFIG_DRM_FBDEV_EMULATION, and boot with the 'console=tty0' kernel command line parameter. [2] Set 'panic_timeout' to a non-zero value before calling panic(). Acked-by: Thomas Zimmermann Reported-by: Yudong Wang Tested-by: Yudong Wang Signed-off-by: Qiuxu Zhuo Link: https://patchwork.freedesktop.org/patch/msgid/20240703141737.75378-1-qiuxu.zhuo@intel.com Signed-off-by: Maarten Lankhorst,,, commit bbddfa2255dd0800209697fd12378e02ed05f833 Author: Chengchang Tang Date: Wed Jul 10 21:37:05 2024 +0800 RDMA/hns: Fix mbx timing out before CMD execution is completed When a large number of tasks are issued, the speed of HW processing mbx will slow down. The standard for judging mbx timeout in the current firmware is 30ms, and the current timeout standard for the driver is also 30ms. Considering that firmware scheduling in multi-function scenarios takes a certain amount of time, this will cause the driver to time out too early and report a failure before mbx execution times out. This patch introduces a new mechanism that can set different timeouts for different cmds and extends the timeout of mbx to 35ms. Fixes: a04ff739f2a9 ("RDMA/hns: Add command queue support for hip08 RoCE driver") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-9-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 0b8e658f70ffd5dc7cda3872fd524d657d4796b7 Author: Chengchang Tang Date: Wed Jul 10 21:37:04 2024 +0800 RDMA/hns: Fix insufficient extend DB for VFs. VFs and its PF will share the memory of the extend DB. Currently, the number of extend DB allocated by driver is only enough for PF. This leads to a probability of DB loss and some other problems in scenarios where both PF and VFs use a large number of QPs. Fixes: 6b63597d3540 ("RDMA/hns: Add TSQ link table support") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-8-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 36397b907355e2fdb5a25a02a7921a937fd8ef4c Author: Chengchang Tang Date: Wed Jul 10 21:37:03 2024 +0800 RDMA/hns: Fix undifined behavior caused by invalid max_sge If max_sge has been set to 0, roundup_pow_of_two() in set_srq_basic_param() may have undefined behavior. Fixes: 9dd052474a26 ("RDMA/hns: Allocate one more recv SGE for HIP08") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-7-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 24c6291346d98c7ece4f4bfeb5733bec1d6c7b4f Author: Chengchang Tang Date: Wed Jul 10 21:37:02 2024 +0800 RDMA/hns: Fix shift-out-bounds when max_inline_data is 0 A shift-out-bounds may occur, if the max_inline_data has not been set. The related log: UBSAN: shift-out-of-bounds in kernel/include/linux/log2.h:57:13 shift exponent 64 is too large for 64-bit type 'long unsigned int' Call trace: dump_backtrace+0xb0/0x118 show_stack+0x20/0x38 dump_stack_lvl+0xbc/0x120 dump_stack+0x1c/0x28 __ubsan_handle_shift_out_of_bounds+0x104/0x240 set_ext_sge_param+0x40c/0x420 [hns_roce_hw_v2] hns_roce_create_qp+0xf48/0x1c40 [hns_roce_hw_v2] create_qp.part.0+0x294/0x3c0 ib_create_qp_kernel+0x7c/0x150 create_mad_qp+0x11c/0x1e0 ib_mad_init_device+0x834/0xc88 add_client_context+0x248/0x318 enable_device_and_get+0x158/0x280 ib_register_device+0x4ac/0x610 hns_roce_init+0x890/0xf98 [hns_roce_hw_v2] __hns_roce_hw_v2_init_instance+0x398/0x720 [hns_roce_hw_v2] hns_roce_hw_v2_init_instance+0x108/0x1e0 [hns_roce_hw_v2] hclge_init_roce_client_instance+0x1a0/0x358 [hclge] hclge_init_client_instance+0xa0/0x508 [hclge] hnae3_register_client+0x18c/0x210 [hnae3] hns_roce_hw_v2_init+0x28/0xff8 [hns_roce_hw_v2] do_one_initcall+0xe0/0x510 do_init_module+0x110/0x370 load_module+0x2c6c/0x2f20 init_module_from_file+0xe0/0x140 idempotent_init_module+0x24c/0x350 __arm64_sys_finit_module+0x88/0xf8 invoke_syscall+0x68/0x1a0 el0_svc_common.constprop.0+0x11c/0x150 do_el0_svc+0x38/0x50 el0_svc+0x50/0xa0 el0t_64_sync_handler+0xc0/0xc8 el0t_64_sync+0x1a4/0x1a8 Fixes: 0c5e259b06a8 ("RDMA/hns: Fix incorrect sge nums calculation") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-6-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit d387d4b54eb84208bd4ca13572e106851d0a0819 Author: Chengchang Tang Date: Wed Jul 10 21:37:01 2024 +0800 RDMA/hns: Fix missing pagesize and alignment check in FRMR The offset requires 128B alignment and the page size ranges from 4K to 128M. Fixes: 68a997c5d28c ("RDMA/hns: Add FRMR support for hip08") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-5-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 543fb987bd63ed27409b5dea3d3eec27b9c1eac9 Author: Junxian Huang Date: Wed Jul 10 21:37:00 2024 +0800 RDMA/hns: Fix unmatch exception handling when init eq table fails The hw ctx should be destroyed when init eq table fails. Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08") Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-4-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 2fdf34038369c0a27811e7b4680662a14ada1d6b Author: Junxian Huang Date: Wed Jul 10 21:36:59 2024 +0800 RDMA/hns: Fix soft lockup under heavy CEQE load CEQEs are handled in interrupt handler currently. This may cause the CPU core staying in interrupt context too long and lead to soft lockup under heavy load. Handle CEQEs in BH workqueue and set an upper limit for the number of CEQE handled by a single call of work handler. Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08") Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-3-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 6afa2c0bfb8ef69f65715ae059e5bd5f9bbaf03b Author: Junxian Huang Date: Wed Jul 10 21:36:58 2024 +0800 RDMA/hns: Check atomic wr length 8 bytes is the only supported length of atomic. Add this check in set_rc_wqe(). Besides, stop processing WQEs and return from set_rc_wqe() if there is any error. Fixes: 384f88185112 ("RDMA/hns: Add atomic support") Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20240710133705.896445-2-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit b851268018f0d63cb2069b5589bf4dbee1c74287 Author: Peng Hao Date: Wed Jul 10 17:16:57 2024 +0800 RDMA/ocrdma: Don't inline statistics functions Fix the problem of KASAN causing the stack frame size to increase drivers/infiniband/hw/ocrdma/ocrdma_stats.c:686:16: error: stack frame size (20664) exceeds limit (8192) in 'ocrdma_dbgfs_ops_read' [-Werror,-Wframe-larger-than] static ssize_t ocrdma_dbgfs_ops_read(struct file *filp, char __user *buffer, ^ Some functions called by ocrdma_dbgfs_ops_read occupy a lot of stack space. Mark these functions as noinline_for_stack to prevent them from accumulating in ocrdma_dbgfs_ops_read. Signed-off-by: Peng Hao Link: https://lore.kernel.org/r/20240710091657.26291-1-flyingpeng@tencent.com Signed-off-by: Leon Romanovsky commit 8b5ea9029b03efda74292c57e0377a98ed0b7434 Author: Easwar Hariharan Date: Thu Jul 11 05:27:34 2024 +0000 fbdev: viafb: Make I2C terminology more inclusive I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann Signed-off-by: Easwar Hariharan Signed-off-by: Helge Deller commit 3cf12cabc3be2855466e1433d943455b1032fd86 Author: Easwar Hariharan Date: Thu Jul 11 05:27:33 2024 +0000 fbdev: smscufx: Make I2C terminology more inclusive I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage exists in the specification. Acked-by: Thomas Zimmermann Signed-off-by: Easwar Hariharan Signed-off-by: Helge Deller commit 5fa96c7ab3dc666c2904a35895635156c17a8f05 Author: Borislav Petkov (AMD) Date: Mon Jul 1 12:34:51 2024 +0200 Documentation/ABI/configfs-tsm: Fix an unexpected indentation silly Fix: Documentation/ABI/testing/configfs-tsm:97: ERROR: Unexpected indentation when building htmldocs with sphinx. I can't say I'm loving those rigid sphinx rules but whatever, make it shut up. Fixes: 627dc671518b ("x86/sev: Extend the config-fs attestation support for an SVSM") Reported-by: Stephen Rothwell Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20240701184557.4735ca3d@canb.auug.org.au commit 0440feb090790c6243bca85d6a794824e71ff26c Author: Tom Lendacky Date: Fri Jun 21 10:42:05 2024 -0500 x86/sev: Do RMP memory coverage check after max_pfn has been set The RMP table is probed early in the boot process before max_pfn has been set, so the logic to check if the RMP covers all of system memory is not valid. Move the RMP memory coverage check from snp_probe_rmptable_info() into snp_rmptable_init(), which is well after max_pfn has been set. Also, fix the calculation to use PFN_UP instead of PHYS_PFN, in order to compute the required RMP size properly. Fixes: 216d106c7ff7 ("x86/sev: Add SEV-SNP host initialization support") Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/bec4364c7e34358cc576f01bb197a7796a109169.1718984524.git.thomas.lendacky@amd.com commit 38918e0bb2c51c21ea464b071a254b27ff9aa71d Author: Borislav Petkov (AMD) Date: Wed Jun 19 11:03:16 2024 +0200 x86/sev: Move SEV compilation units A long time ago it was agreed upon that the coco stuff needs to go where it belongs: https://lore.kernel.org/all/Yg5nh1RknPRwIrb8@zn.tnic and not keep it in arch/x86/kernel. TDX did that and SEV can't find time to do so. So lemme do it. If people have trouble converting their ongoing featuritis patches, ask me for a sed script. No functional changes. Move the instrumentation exclusion bits too, as helpfully caught and reported by the 0day folks. Closes: https://lore.kernel.org/oe-kbuild-all/202406220748.hG3qlmDx-lkp@intel.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202407091342.46d7dbb-oliver.sang@intel.com Reported-by: kernel test robot Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikunj A Dadhania Reviewed-by: Ashish Kalra Tested-by: kernel test robot Link: https://lore.kernel.org/r/20240619093014.17962-1-bp@kernel.org commit 911daf695a740d9a58daef65dabfb5f69f18190f Author: Konstantin Komarov Date: Wed Jun 26 15:26:18 2024 +0300 fs/ntfs3: Fix formatting, change comments, renaming Huacai Chen: The label end_reply is obviously a typo. It should be "replay" in this context. So rename end_reply to end_replay. Suggested-by: Huacai Chen Signed-off-by: Konstantin Komarov commit 2fef55d8f78383c8e6d6d4c014b9597375132696 Author: Huacai Chen Date: Wed May 29 14:40:52 2024 +0800 fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed If an NTFS file system is mounted to another system with different PAGE_SIZE from the original system, log->page_size will change in log_replay(), but log->page_{mask,bits} don't change correspondingly. This will cause a panic because "u32 bytes = log->page_size - page_off" will get a negative value in the later read_log_page(). Cc: stable@vger.kernel.org Fixes: b46acd6a6a627d876898e ("fs/ntfs3: Add NTFS journal") Signed-off-by: Huacai Chen Signed-off-by: Konstantin Komarov commit 5bfb91c71207ef3f0058701eeca86d96c0a39447 Author: Konstantin Komarov Date: Tue Jun 18 17:31:21 2024 +0300 fs/ntfs3: Implement simple fileattr fileattr added to support chattr. Supported attributes: compressed and immutable. Signed-off-by: Konstantin Komarov commit 1ff2e956608c12a069faded7a01799d3206e8b1e Author: Konstantin Komarov Date: Mon Jun 17 15:03:21 2024 +0300 fs/ntfs3: Redesign legacy ntfs support 1) Make is_legacy_ntfs static inline. 2) Put legacy file_operations under #if IS_ENABLED(CONFIG_NTFS_FS). Cc: Matthew Wilcox (Oracle) Cc: Christian Brauner Signed-off-by: Konstantin Komarov commit b9906f8162478c778c5212720efb19633a458ade Author: Konstantin Komarov Date: Mon Jun 17 14:56:03 2024 +0300 fs/ntfs3: Use function file_inode to get inode from file Signed-off-by: Konstantin Komarov commit 791e5620c143232a5db8ff47686869bd3815457f Author: Konstantin Komarov Date: Mon Jun 17 14:47:20 2024 +0300 fs/ntfs3: Minor ntfs_list_ea refactoring For easy internal debugging. Signed-off-by: Konstantin Komarov commit 744375343662058cbfda96d871786e5a5cbe1947 Author: Konstantin Komarov Date: Mon Jun 17 14:53:57 2024 +0300 fs/ntfs3: Check more cases when directory is corrupted Mark ntfs dirty in this case. Rename ntfs_filldir to ntfs_dir_emit. Signed-off-by: Konstantin Komarov commit d57431c6f511bf020e474026d9f3123d7bfbea8c Author: Konstantin Komarov Date: Mon Jun 17 15:14:07 2024 +0300 fs/ntfs3: Do copy_to_user out of run_lock In order not to call copy_to_user (from fiemap_fill_next_extent) we allocate memory in the kernel, fill it and copy it to user memory after up_read(run_lock). Reported-by: syzbot+36bb70085ef6edc2ebb9@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov commit eb95678ee930d67d79fc83f0a700245ae7230455 Author: Konstantin Komarov Date: Tue Jun 18 17:11:37 2024 +0300 fs/ntfs3: Keep runs for $MFT::$ATTR_DATA and $MFT::$ATTR_BITMAP We skip the run_truncate_head call also for $MFT::$ATTR_BITMAP. Otherwise wnd_map()/run_lookup_entry will not find the disk position for the bitmap parts. Fixes: 0e5b044cbf3a ("fs/ntfs3: Refactoring attr_set_size to restore after errors") Signed-off-by: Konstantin Komarov commit 2cbbd96820255fff4f0ad1533197370c9ccc570b Author: Konstantin Komarov Date: Mon Jun 17 13:43:09 2024 +0300 fs/ntfs3: Missed error return Fixes: 3f3b442b5ad2 ("fs/ntfs3: Add bitmap") Signed-off-by: Konstantin Komarov commit d392e85fd1e8d58e460c17ca7d0d5c157848d9c1 Author: Konstantin Komarov Date: Tue Jun 25 09:57:33 2024 +0300 fs/ntfs3: Fix the format of the "nocase" mount option The 'nocase' option was mistakenly added as fsparam_flag_no with the 'no' prefix, causing the case-insensitive mode to require the 'nonocase' option to be enabled. Fixes: a3a956c78efa ("fs/ntfs3: Add option "nocase"") Signed-off-by: Konstantin Komarov commit db43a609d01e8bf9b812d45dc2945c65b57dd793 Author: Peter Zijlstra Date: Mon Jul 8 09:57:52 2024 +0200 sched: Update MAINTAINERS and CREDITS Thank you Daniel for having been our friend! Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Vincent Guittot Acked-by: Juri Lelli Reviewed-by: Steven Rostedt Link: https://lore.kernel.org/r/20240708075752.GF11386@noisy.programming.kicks-ass.net commit 011b1134b82c2750d83a299a1369c678845de45a Merge: d329605287020 ddae0ca2a8fe1 Author: Ingo Molnar Date: Thu Jul 11 10:42:33 2024 +0200 Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch Signed-off-by: Ingo Molnar commit 943ad0b62e3c21f324c4884caa6cb4a871bca05c Author: Pavel Begunkov Date: Wed Jul 10 18:58:18 2024 +0100 kernel: rerun task_work while freezing in get_signal() io_uring can asynchronously add a task_work while the task is getting freezed. TIF_NOTIFY_SIGNAL will prevent the task from sleeping in do_freezer_trap(), and since the get_signal()'s relock loop doesn't retry task_work, the task will spin there not being able to sleep until the freezing is cancelled / the task is killed / etc. Run task_works in the freezer path. Keep the patch small and simple so it can be easily back ported, but we might need to do some cleaning after and look if there are other places with similar problems. Cc: stable@vger.kernel.org Link: https://github.com/systemd/systemd/issues/33626 Fixes: 12db8b690010c ("entry: Add support for TIF_NOTIFY_SIGNAL") Reported-by: Julian Orth Acked-by: Oleg Nesterov Acked-by: Tejun Heo Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/89ed3a52933370deaaf61a0a620a6ac91f1e754d.1720634146.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0453aad676ff99787124b9b3af4a5f59fbe808e2 Author: Pavel Begunkov Date: Wed Jul 10 18:58:17 2024 +0100 io_uring/io-wq: limit retrying worker initialisation If io-wq worker creation fails, we retry it by queueing up a task_work. tasK_work is needed because it should be done from the user process context. The problem is that retries are not limited, and if queueing a task_work is the reason for the failure, we might get into an infinite loop. It doesn't seem to happen now but it would with the following patch executing task_work in the freezer's loop. For now, arbitrarily limit the number of attempts to create a worker. Cc: stable@vger.kernel.org Fixes: 3146cba99aa28 ("io-wq: make worker creation resilient against signals") Reported-by: Julian Orth Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8280436925db88448c7c85c6656edee1a43029ea.1720634146.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2fd66f7d3b0de2aa986d82ede81d7b85740713c4 Author: Shyam Sundar S K Date: Thu Jul 11 10:50:47 2024 +0530 platform/x86/amd/pmf: Remove update system state document This commit removes the "pmf.rst" document, which was associated with the PMF driver that enabled system state updates based on TA output actions. The driver now uses existing input events (KEY_SCREENLOCK, KEY_SLEEP, and KEY_SUSPEND) instead of defining new udev rules in the "/etc/udev/rules.d/" directory. Consequently, the pmf.rst document is no longer necessary. Therefore, the pmf.rst documentation is being removed. 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/20240711052047.1531957-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4c92d448e3e61d46111c29276ee959e3e4ec412b Author: Shyam Sundar S K Date: Thu Jul 11 10:50:46 2024 +0530 platform/x86/amd/pmf: Use existing input event codes to update system states At present, the PMF driver employs custom system state codes to update system states. It is recommended to replace these with existing input event codes (KEY_SLEEP, KEY_SUSPEND, and KEY_SCREENLOCK) to align system updates with the PMF-TA output actions. 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/20240711052047.1531957-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit fd748e177194ebcbbaf98df75152a30e08230cc6 Author: Nick Bowler Date: Wed Jul 10 23:54:17 2024 -0400 macintosh/therm_windtunnel: fix module unload. The of_device_unregister call in therm_windtunnel's module_exit procedure does not fully reverse the effects of of_platform_device_create in the module_init prodedure. Once you unload this module, it is impossible to load it ever again since only the first of_platform_device_create call on the fan node succeeds. This driver predates first git commit, and it turns out back then of_platform_device_create worked differently than it does today. So this is actually an old regression. The appropriate function to undo of_platform_device_create now appears to be of_platform_device_destroy, and switching to use this makes it possible to unload and load the module as expected. Signed-off-by: Nick Bowler Fixes: c6e126de43e7 ("of: Keep track of populated platform devices") Signed-off-by: Michael Ellerman Link: https://msgid.link/20240711035428.16696-1-nbowler@draconx.ca commit db25a9625dbc3aa6613c0347f574689c248a3d0b Author: Michael Ellerman Date: Thu May 9 22:12:48 2024 +1000 powerpc: Check only single values are passed to CPU/MMU feature checks cpu_has_feature()/mmu_has_feature() are only able to check a single feature at a time, but there is no enforcement of that. In fact, as fixed in the previous commit, there was code that was passing multiple values to cpu_has_feature(). So add a check that only a single feature is passed using popcount. Note that the test allows 0 or 1 bits to be set, because some code relies on cpu_has_feature(0) being false, the check with CPU_FTRS_POSSIBLE ensures that. See for example CPU_FTR_PPC_LE. Signed-off-by: Michael Ellerman Link: https://msgid.link/20240509121248.270878-3-mpe@ellerman.id.au commit 14196e47c5ffe32af7ed5a51c9e421c5ea5bccce Author: Michael Ellerman Date: Thu May 9 22:12:47 2024 +1000 powerpc/xmon: Fix disassembly CPU feature checks In the xmon disassembly code there are several CPU feature checks to determine what dialects should be passed to the disassembler. The dialect controls which instructions the disassembler will recognise. Unfortunately the checks are incorrect, because instead of passing a single CPU feature they are passing a mask of feature bits. For example the code: if (cpu_has_feature(CPU_FTRS_POWER5)) dialect |= PPC_OPCODE_POWER5; Is trying to check if the system is running on a Power5 CPU. But CPU_FTRS_POWER5 is a mask of *all* the feature bits that are enabled on a Power5. In practice the test will always return true for any 64-bit CPU, because at least one bit in the mask will be present in the CPU_FTRS_ALWAYS mask. Similarly for all the other checks against CPU_FTRS_xx masks. Rather than trying to match the disassembly behaviour exactly to the current CPU, just differentiate between 32-bit and 64-bit, and Altivec, VSX and HTM. That will cause some instructions to be shown in disassembly even on a CPU that doesn't support them, but that's OK, objdump -d output has the same behaviour, and if anything it's less confusing than some instructions not being disassembled. Fixes: 897f112bb42e ("[POWERPC] Import updated version of ppc disassembly code for xmon") Signed-off-by: Michael Ellerman Link: https://msgid.link/20240509121248.270878-2-mpe@ellerman.id.au commit 489116d784bebec7e441f400715fbfe6edbce66c Author: Michael Ellerman Date: Thu May 9 22:12:46 2024 +1000 powerpc: Drop clang workaround for builtin constant checks The CPU/MMU feature code has build-time checks that the feature value is a builtin constant. Back when the code was added clang wasn't able to compile the checks, so an ifdef was added to avoid the checks for clang builds. See commit b5fa0f7f88ed ("powerpc: Fix build failure with clang due to BUILD_BUG_ON()") These days clang 13 and later are able to build the checks successfully, so drop the workaround. Signed-off-by: Michael Ellerman Link: https://msgid.link/20240509121248.270878-1-mpe@ellerman.id.au commit 20c0455f3cffc93ef2712f33a7d118d4e5483ef3 Author: Nicolas Ferre Date: Wed Jul 10 18:36:51 2024 +0200 dt-bindings: pwm: at91: Add sama7d65 compatible string Add compatible string for sama7d65. Like sama7g5, it currently binds to "atmel,sama5d2-pwm" compatibility string for this driver, so add an "enum" to reflect that. Signed-off-by: Nicolas Ferre Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240710163651.343751-1-nicolas.ferre@microchip.com Signed-off-by: Uwe Kleine-König commit 1001042e54ef324c0c665b60a012519be05ae022 Author: Gao Xiang Date: Thu Jul 11 13:36:59 2024 +0800 erofs: avoid refcounting short-lived pages LZ4 always reuses the decompressed buffer as its LZ77 sliding window (dynamic dictionary) for optimal performance. However, in specific cases, the output buffer may not fully contain valid page cache pages, resulting in the use of short-lived pages for temporary purposes. Due to the limited sliding window size, LZ4 shortlived bounce pages can also be reused in a sliding manner, so each bounce page can be vmapped multiple times in different relative positions by design. In order to avoiding double frees, currently, reuse counts are recorded via page refcount, but it will no longer be used as-is in the future world of Memdescs. Just maintain a lookup table to check if a shortlived page is reused. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240711053659.1364989-1-hsiangkao@linux.alibaba.com commit fab451d1582cde6073c271f0520c2348a4f1398e Author: Chen Ni Date: Wed Jul 10 09:42:08 2024 +0800 xen/arm: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Reviewed-by: Stefano Stabellini Message-ID: <20240710014208.1719662-1-nichen@iscas.ac.cn> Signed-off-by: Juergen Gross commit fde318326daa48a4bb3ca8ee229bac4d14b5bc2a Author: Artem Savkov Date: Fri May 17 09:56:50 2024 +0200 powerpc64/bpf: jit support for signed division and modulo Add jit support for sign division and modulo. Tested using test_bpf module. Signed-off-by: Artem Savkov Signed-off-by: Michael Ellerman Link: https://msgid.link/20240517075650.248801-6-asavkov@redhat.com commit 597b1710982d10b8629697e4a548b30d0d93eeed Author: Artem Savkov Date: Fri May 17 09:56:49 2024 +0200 powerpc64/bpf: jit support for sign extended mov Add jit support for sign extended mov. Tested using test_bpf module. Signed-off-by: Artem Savkov Signed-off-by: Michael Ellerman Link: https://msgid.link/20240517075650.248801-5-asavkov@redhat.com commit 717756c9c8ddad9f28389185bfb161d4d88e01a4 Author: Artem Savkov Date: Fri May 17 09:56:48 2024 +0200 powerpc64/bpf: jit support for sign extended load Add jit support for sign extended load. Tested using test_bpf module. Signed-off-by: Artem Savkov Signed-off-by: Michael Ellerman Link: https://msgid.link/20240517075650.248801-4-asavkov@redhat.com commit a71c0b09a14db72d59c48a8cda7a73032f4d418b Author: Artem Savkov Date: Fri May 17 09:56:47 2024 +0200 powerpc64/bpf: jit support for unconditional byte swap Add jit support for unconditional byte swap. Tested using BSWAP tests from test_bpf module. Signed-off-by: Artem Savkov Reviewed-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://msgid.link/20240517075650.248801-3-asavkov@redhat.com commit 3c086ce222cefcf16d412faa10d456161d076796 Author: Artem Savkov Date: Fri May 17 09:56:46 2024 +0200 powerpc64/bpf: jit support for 32bit offset jmp instruction Add jit support for JMP32_JA instruction. Tested using test_bpf module. Signed-off-by: Artem Savkov Signed-off-by: Michael Ellerman Link: https://msgid.link/20240517075650.248801-2-asavkov@redhat.com commit f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6 Author: Baokun Li Date: Tue Jul 2 21:23:49 2024 +0800 ext4: make sure the first directory block is not a hole The syzbot constructs a directory that has no dirblock but is non-inline, i.e. the first directory block is a hole. And no errors are reported when creating files in this directory in the following flow. ext4_mknod ... ext4_add_entry // Read block 0 ext4_read_dirblock(dir, block, DIRENT) bh = ext4_bread(NULL, inode, block, 0) if (!bh && (type == INDEX || type == DIRENT_HTREE)) // The first directory block is a hole // But type == DIRENT, so no error is reported. After that, we get a directory block without '.' and '..' but with a valid dentry. This may cause some code that relies on dot or dotdot (such as make_indexed_dir()) to crash. Therefore when ext4_read_dirblock() finds that the first directory block is a hole report that the filesystem is corrupted and return an error to avoid loading corrupted data from disk causing something bad. Reported-by: syzbot+ae688d469e36fb5138d0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ae688d469e36fb5138d0 Fixes: 4e19d6b65fb4 ("ext4: allow directory holes") Cc: stable@kernel.org Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240702132349.2600605-3-libaokun@huaweicloud.com Signed-off-by: Theodore Ts'o commit 50ea741def587a64e08879ce6c6a30131f7111e7 Author: Baokun Li Date: Tue Jul 2 21:23:48 2024 +0800 ext4: check dot and dotdot of dx_root before making dir indexed Syzbot reports a issue as follows: ============================================ BUG: unable to handle page fault for address: ffffed11022e24fe PGD 23ffee067 P4D 23ffee067 PUD 0 Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 PID: 5079 Comm: syz-executor306 Not tainted 6.10.0-rc5-g55027e689933 #0 Call Trace: make_indexed_dir+0xdaf/0x13c0 fs/ext4/namei.c:2341 ext4_add_entry+0x222a/0x25d0 fs/ext4/namei.c:2451 ext4_rename fs/ext4/namei.c:3936 [inline] ext4_rename2+0x26e5/0x4370 fs/ext4/namei.c:4214 [...] ============================================ The immediate cause of this problem is that there is only one valid dentry for the block to be split during do_split, so split==0 results in out of bounds accesses to the map triggering the issue. do_split unsigned split dx_make_map count = 1 split = count/2 = 0; continued = hash2 == map[split - 1].hash; ---> map[4294967295] The maximum length of a filename is 255 and the minimum block size is 1024, so it is always guaranteed that the number of entries is greater than or equal to 2 when do_split() is called. But syzbot's crafted image has no dot and dotdot in dir, and the dentry distribution in dirblock is as follows: bus dentry1 hole dentry2 free |xx--|xx-------------|...............|xx-------------|...............| 0 12 (8+248)=256 268 256 524 (8+256)=264 788 236 1024 So when renaming dentry1 increases its name_len length by 1, neither hole nor free is sufficient to hold the new dentry, and make_indexed_dir() is called. In make_indexed_dir() it is assumed that the first two entries of the dirblock must be dot and dotdot, so bus and dentry1 are left in dx_root because they are treated as dot and dotdot, and only dentry2 is moved to the new leaf block. That's why count is equal to 1. Therefore add the ext4_check_dx_root() helper function to add more sanity checks to dot and dotdot before starting the conversion to avoid the above issue. Reported-by: syzbot+ae688d469e36fb5138d0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ae688d469e36fb5138d0 Fixes: ac27a0ec112a ("[PATCH] ext4: initial copy of files from ext3") Cc: stable@kernel.org Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240702132349.2600605-2-libaokun@huaweicloud.com Signed-off-by: Theodore Ts'o commit 23cef42d17413d099f44ea42b622fbf23b04646f Author: Zhongqiu Han Date: Fri Jul 5 18:36:14 2024 +0800 scsi: aha152x: Use DECLARE_COMPLETION_ONSTACK for non-constant completion The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep. See also commit 6e9a4738c9fa ("[PATCH] completions: lockdep annotate on stack completions"). Signed-off-by: Zhongqiu Han Link: https://lore.kernel.org/r/20240705103614.3650637-1-quic_zhonhan@quicinc.com Signed-off-by: Martin K. Petersen commit 6ca9fede7c73b3c83f4cc8ecb3c29e1d501107c6 Author: Chen Ni Date: Thu Jul 11 08:57:24 2024 +0800 scsi: qla2xxx: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: d4523bd6fd5d ("scsi: qla2xxx: Refactor asynchronous command initialization") Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20240711005724.2358446-1-nichen@iscas.ac.cn Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 22b8d89b9d8d84dcf161e583715e9501fd026ec1 Merge: af8e69efd7856 a1392b19ca592 Author: Martin K. Petersen Date: Wed Jul 10 22:45:08 2024 -0400 Merge patch series "qla2xxx misc. bug fixes" Nilesh Javali says: Martin, Please apply the qla2xxx driver miscellaneous bug fixes to the scsi tree at your earliest convenience. Link: https://lore.kernel.org/r/20240710171057.35066-1-njavali@marvell.com Signed-off-by: Martin K. Petersen commit a1392b19ca59256cda627b0ed04657e8e84702b4 Author: Nilesh Javali Date: Wed Jul 10 22:40:57 2024 +0530 scsi: qla2xxx: Update version to 10.02.09.300-k Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-12-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c449b4198701d828e40d60a2abd30970b74a1d75 Author: Quinn Tran Date: Wed Jul 10 22:40:56 2024 +0530 scsi: qla2xxx: Use QP lock to search for bsg On bsg timeout, hardware_lock is used as part of search for the srb. Instead, qpair lock should be used to iterate through different qpair. Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-11-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit beafd692461443e0fb1d61aa56886bf85ef6f5e4 Author: Quinn Tran Date: Wed Jul 10 22:40:55 2024 +0530 scsi: qla2xxx: Reduce fabric scan duplicate code For fabric scan, current code uses switch scan opcode and flags as the method to iterate through different commands to carry out the process. This makes it hard to read. This patch convert those opcode and flags into steps. In addition, this help reduce some duplicate code. Consolidate routines that handle GPNFT & GNNFT. Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-10-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 348744f27a35e087acc9378bf53537fbfb072775 Author: Shreyas Deodhar Date: Wed Jul 10 22:40:54 2024 +0530 scsi: qla2xxx: Fix optrom version displayed in FDMI Bios version was popluated for FDMI response. Systems with EFI would show optrom version as 0. EFI version is populated here and BIOS version is already displayed under FDMI_HBA_BOOT_BIOS_NAME. Cc: stable@vger.kernel.org Signed-off-by: Shreyas Deodhar Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-9-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 76f480d7c717368f29a3870f7d64471ce0ff8fb2 Author: Manish Rangankar Date: Wed Jul 10 22:40:53 2024 +0530 scsi: qla2xxx: During vport delete send async logout explicitly During vport delete, it is observed that during unload we hit a crash because of stale entries in outstanding command array. For all these stale I/O entries, eh_abort was issued and aborted (fast_fail_io = 2009h) but I/Os could not complete while vport delete is in process of deleting. BUG: kernel NULL pointer dereference, address: 000000000000001c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI Workqueue: qla2xxx_wq qla_do_work [qla2xxx] RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0 RSP: 0018:ffffa1e1e150fc68 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000001 RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8ce208a7a0d0 RBP: ffff8ce208a7a0d0 R08: 0000000000000000 R09: ffff8ce378aac9c8 R10: ffff8ce378aac8a0 R11: ffffa1e1e150f9d8 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8ce378aac9c8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8d217f000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000001c CR3: 0000002089acc000 CR4: 0000000000350ee0 Call Trace: qla2xxx_qpair_sp_free_dma+0x417/0x4e0 ? qla2xxx_qpair_sp_compl+0x10d/0x1a0 ? qla2x00_status_entry+0x768/0x2830 ? newidle_balance+0x2f0/0x430 ? dequeue_entity+0x100/0x3c0 ? qla24xx_process_response_queue+0x6a1/0x19e0 ? __schedule+0x2d5/0x1140 ? qla_do_work+0x47/0x60 ? process_one_work+0x267/0x440 ? process_one_work+0x440/0x440 ? worker_thread+0x2d/0x3d0 ? process_one_work+0x440/0x440 ? kthread+0x156/0x180 ? set_kthread_struct+0x50/0x50 ? ret_from_fork+0x22/0x30 Send out async logout explicitly for all the ports during vport delete. Cc: stable@vger.kernel.org Signed-off-by: Manish Rangankar Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-8-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 4475afa2646d3fec176fc4d011d3879b26cb26e3 Author: Shreyas Deodhar Date: Wed Jul 10 22:40:52 2024 +0530 scsi: qla2xxx: Complete command early within lock A crash was observed while performing NPIV and FW reset, BUG: kernel NULL pointer dereference, address: 000000000000001c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 1 PREEMPT_RT SMP NOPTI RIP: 0010:dma_direct_unmap_sg+0x51/0x1e0 RSP: 0018:ffffc90026f47b88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000021 RCX: 0000000000000002 RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff8881041130d0 RBP: ffff8881041130d0 R08: 0000000000000000 R09: 0000000000000034 R10: ffffc90026f47c48 R11: 0000000000000031 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8881565e4a20 R15: 0000000000000000 FS: 00007f4c69ed3d00(0000) GS:ffff889faac80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000001c CR3: 0000000288a50002 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? __die_body+0x1a/0x60 ? page_fault_oops+0x16f/0x4a0 ? do_user_addr_fault+0x174/0x7f0 ? exc_page_fault+0x69/0x1a0 ? asm_exc_page_fault+0x22/0x30 ? dma_direct_unmap_sg+0x51/0x1e0 ? preempt_count_sub+0x96/0xe0 qla2xxx_qpair_sp_free_dma+0x29f/0x3b0 [qla2xxx] qla2xxx_qpair_sp_compl+0x60/0x80 [qla2xxx] __qla2x00_abort_all_cmds+0xa2/0x450 [qla2xxx] The command completion was done early while aborting the commands in driver unload path but outside lock to avoid the WARN_ON condition of performing dma_free_attr within the lock. However this caused race condition while command completion via multiple paths causing system crash. Hence complete the command early in unload path but within the lock to avoid race condition. Fixes: 0367076b0817 ("scsi: qla2xxx: Perform lockless command completion in abort path") Cc: stable@vger.kernel.org Signed-off-by: Shreyas Deodhar Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-7-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 29e222085d8907ccff18ecd931bdd4c6b1f11b92 Author: Quinn Tran Date: Wed Jul 10 22:40:51 2024 +0530 scsi: qla2xxx: Fix flash read failure Link up failure is observed as a result of flash read failure. Current code does not check flash read return code where it relies on FW checksum to detect the problem. Add check of flash read failure to detect the problem sooner. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/202406210815.rPDRDMBi-lkp@intel.com/ Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-6-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit ce2065c4cc4f05635413f63f6dc038d7d4842e31 Author: Saurav Kashyap Date: Wed Jul 10 22:40:50 2024 +0530 scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds Firmware only supports single DSDs in ELS Pass-through IOCB (0x53h), sg cnt is decided by the SCSI ML. User is not aware of the cause of an acutal error. Return the appropriate return code that will be decoded by API and application and proper error message will be displayed to user. Fixes: 6e98016ca077 ("[SCSI] qla2xxx: Re-organized BSG interface specific code.") Cc: stable@vger.kernel.org Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-5-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c03d740152f78e86945a75b2ad541bf972fab92a Author: Shreyas Deodhar Date: Wed Jul 10 22:40:49 2024 +0530 scsi: qla2xxx: Fix for possible memory corruption Init Control Block is dereferenced incorrectly. Correctly dereference ICB Cc: stable@vger.kernel.org Signed-off-by: Shreyas Deodhar Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-4-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit eb1d4ce2609584eeb7694866f34d4b213caa3af9 Author: Nilesh Javali Date: Wed Jul 10 22:40:48 2024 +0530 scsi: qla2xxx: validate nvme_local_port correctly The driver load failed with error message, qla2xxx [0000:04:00.0]-ffff:0: register_localport failed: ret=ffffffef and with a kernel crash, BUG: unable to handle kernel NULL pointer dereference at 0000000000000070 Workqueue: events_unbound qla_register_fcport_fn [qla2xxx] RIP: 0010:nvme_fc_register_remoteport+0x16/0x430 [nvme_fc] RSP: 0018:ffffaaa040eb3d98 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff9dfb46b78c00 RCX: 0000000000000000 RDX: ffff9dfb46b78da8 RSI: ffffaaa040eb3e08 RDI: 0000000000000000 RBP: ffff9dfb612a0a58 R08: ffffffffaf1d6270 R09: 3a34303a30303030 R10: 34303a303030305b R11: 2078787832616c71 R12: ffff9dfb46b78dd4 R13: ffff9dfb46b78c24 R14: ffff9dfb41525300 R15: ffff9dfb46b78da8 FS: 0000000000000000(0000) GS:ffff9dfc67c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000070 CR3: 000000018da10004 CR4: 00000000000206f0 Call Trace: qla_nvme_register_remote+0xeb/0x1f0 [qla2xxx] ? qla2x00_dfs_create_rport+0x231/0x270 [qla2xxx] qla2x00_update_fcport+0x2a1/0x3c0 [qla2xxx] qla_register_fcport_fn+0x54/0xc0 [qla2xxx] Exit the qla_nvme_register_remote() function when qla_nvme_register_hba() fails and correctly validate nvme_local_port. Cc: stable@vger.kernel.org Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c3d98b12eef8db436e32f1a8c5478be57dc15621 Author: Quinn Tran Date: Wed Jul 10 22:40:47 2024 +0530 scsi: qla2xxx: Unable to act on RSCN for port online The device does not come online when the target port is online. There were multiple RSCNs indicating multiple devices were affected. Driver is in the process of finishing a fabric scan. A new RSCN (device up) arrived at the tail end of the last fabric scan. Driver mistakenly thinks the new RSCN is being taken care of by the previous fabric scan, where this notification is cleared and not acted on. The laser needs to be blinked again to get the device to show up. To prevent driver from accidentally clearing the RSCN notification, each RSCN is given a generation value. A fabric scan will scan for that generation(s). Any new RSCN arrive after the scan start will have a new generation value. This will trigger another scan to get latest data. The RSCN notification flag will be cleared when the scan is associate to that generation. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406210538.w875N70K-lkp@intel.com/ Fixes: bb2ca6b3f09a ("scsi: qla2xxx: Relogin during fabric disturbance") Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20240710171057.35066-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit af8e69efd78561496cdd736bb1b4f7edd89b2f6b Merge: e30618a480cbb c96499fcb403b Author: Martin K. Petersen Date: Wed Jul 10 22:33:34 2024 -0400 Merge patch series "Basic inline encryption support for ufs-exynos" Eric Biggers says: Add support for Flash Memory Protector (FMP), which is the inline encryption hardware on Exynos and Exynos-based SoCs. Specifically, add support for the "traditional FMP mode" that works on many Exynos-based SoCs including gs101. This is the mode that uses "software keys" and is compatible with the upstream kernel's existing inline encryption framework in the block and filesystem layers. I plan to add support for the wrapped key support on gs101 at a later time. Tested on gs101 (specifically Pixel 6) by running the 'encrypt' group of xfstests on a filesystem mounted with the 'inlinecrypt' mount option. This patchset applies to v6.10-rc6, and it has no prerequisites that aren't already upstream. Link: https://lore.kernel.org/r/20240708235330.103590-1-ebiggers@kernel.org Signed-off-by: Martin K. Petersen commit c96499fcb403b18b0ae0bf2e19a39f24e62dd3ac Author: Eric Biggers Date: Mon Jul 8 16:53:30 2024 -0700 scsi: ufs: exynos: Add support for Flash Memory Protector (FMP) Add support for Flash Memory Protector (FMP), which is the inline encryption hardware on Exynos and Exynos-based SoCs. Specifically, add support for the "traditional FMP mode" that works on many Exynos-based SoCs including gs101. This is the mode that uses "software keys" and is compatible with the upstream kernel's existing inline encryption framework in the block and filesystem layers. I plan to add support for the wrapped key support on gs101 at a later time. Tested on gs101 (specifically Pixel 6) by running the 'encrypt' group of xfstests on a filesystem mounted with the 'inlinecrypt' mount option. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240708235330.103590-7-ebiggers@kernel.org Reviewed-by: Peter Griffin Tested-by: Peter Griffin Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 4c45dba50a3750a0834353c4187e7896b158bc0c Author: Eric Biggers Date: Mon Jul 8 16:53:29 2024 -0700 scsi: ufs: core: Add UFSHCD_QUIRK_KEYS_IN_PRDT Since the nonstandard inline encryption support on Exynos SoCs requires that raw cryptographic keys be copied into the PRDT, it is desirable to zeroize those keys after each request to keep them from being left in memory. Therefore, add a quirk bit that enables the zeroization. We could instead do the zeroization unconditionally. However, using a quirk bit avoids adding the zeroization overhead to standard devices. Reviewed-by: Bart Van Assche Reviewed-by: Peter Griffin Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240708235330.103590-6-ebiggers@kernel.org Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 8ecea3da1567e0648b5d37a6faec73fc9c8571ba Author: Eric Biggers Date: Mon Jul 8 16:53:28 2024 -0700 scsi: ufs: core: Add fill_crypto_prdt variant op Add a variant op to allow host drivers to initialize nonstandard crypto-related fields in the PRDT. This is needed to support inline encryption on the "Exynos" UFS controller. Note that this will be used together with the support for overriding the PRDT entry size that was already added by commit ada1e653a5ea ("scsi: ufs: core: Allow UFS host drivers to override the sg entry size"). Reviewed-by: Bart Van Assche Reviewed-by: Peter Griffin Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240708235330.103590-5-ebiggers@kernel.org Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit e95881e0081a30e132b5ca087f1e07fc08608a7e Author: Eric Biggers Date: Mon Jul 8 16:53:27 2024 -0700 scsi: ufs: core: Add UFSHCD_QUIRK_BROKEN_CRYPTO_ENABLE Add UFSHCD_QUIRK_BROKEN_CRYPTO_ENABLE which tells the UFS core to not use the crypto enable bit defined by the UFS specification. This is needed to support inline encryption on the "Exynos" UFS controller. Reviewed-by: Bart Van Assche Reviewed-by: Peter Griffin Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240708235330.103590-4-ebiggers@kernel.org Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit ec99818afb03b1ebeb0b6ed0d5fd42143be79586 Author: Eric Biggers Date: Mon Jul 8 16:53:26 2024 -0700 scsi: ufs: core: fold ufshcd_clear_keyslot() into its caller Fold ufshcd_clear_keyslot() into its only remaining caller. Reviewed-by: Bart Van Assche Reviewed-by: Peter Griffin Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240708235330.103590-3-ebiggers@kernel.org Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit c2a90eee29f41630225c9a64d26c425e1d50b401 Author: Eric Biggers Date: Mon Jul 8 16:53:25 2024 -0700 scsi: ufs: core: Add UFSHCD_QUIRK_CUSTOM_CRYPTO_PROFILE Add UFSHCD_QUIRK_CUSTOM_CRYPTO_PROFILE which lets UFS host drivers initialize the blk_crypto_profile themselves rather than have it be initialized by ufshcd-core according to the UFSHCI standard. This is needed to support inline encryption on the "Exynos" UFS controller which has a nonstandard interface. Reviewed-by: Bart Van Assche Reviewed-by: Peter Griffin Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20240708235330.103590-2-ebiggers@kernel.org Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit e30618a480cbbfc1f49ec65fea86766141b7a1df Merge: 5e9a522b0779f af568c7e8292b Author: Martin K. Petersen Date: Wed Jul 10 22:26:08 2024 -0400 Merge patch series "UFS patches for kernel 6.11" Bart Van Assche says: Hi Martin, Please consider this series of UFS driver patches for the next merge window. Thank you, Bart. Link: https://lore.kernel.org/r/20240708211716.2827751-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 5e9a522b0779fa67928b7726374e60461e8aa5c5 Merge: 6cd48c8f62ade 7a6bbc2829d4a Author: Martin K. Petersen Date: Wed Jul 10 22:23:30 2024 -0400 Merge branch '6.10/scsi-fixes' into 6.11/scsi-staging Pull in my fixes branch to resolve an mpi3mr merge conflict reported by sfr. Signed-off-by: Martin K. Petersen commit af568c7e8292bd96f5a4f3d81dcc099bcfe7cb73 Author: Bart Van Assche Date: Mon Jul 8 14:16:05 2024 -0700 scsi: ufs: mcq: Make .get_hba_mac() optional UFSHCI controllers that are compliant with the UFSHCI 4.0 standard report the maximum number of supported commands in the controller capabilities register. Use that value if .get_hba_mac == NULL. Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-11-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 5e2053a41984f6086460a6b377a53af46ebe2b0f Author: Bart Van Assche Date: Mon Jul 8 14:16:04 2024 -0700 scsi: ufs: mcq: Inline ufshcd_mcq_vops_get_hba_mac() Make ufshcd_mcq_decide_queue_depth() easier to read by inlining ufshcd_mcq_vops_get_hba_mac(). Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-10-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 7e2c268dc3069b3d51a6dcd035d9b2ed3e6b1676 Author: Bart Van Assche Date: Mon Jul 8 14:16:03 2024 -0700 scsi: ufs: mcq: Move the ufshcd_mcq_enable() call Move the ufshcd_mcq_enable() call from inside ufshcd_config_mcq() to the callers of this function. No functionality is changed by this patch. This patch makes a later patch easier to read ("scsi: ufs: Make .get_hba_mac() optional"). Cc: Peter Wang Cc: Manivannan Sadhasivam Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-9-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 4a8c859b44da0040a02fb12aec3384f6279c17d7 Author: Bart Van Assche Date: Mon Jul 8 14:16:02 2024 -0700 scsi: ufs: mcq: Move the "hba->mcq_enabled = true" assignment Move the "hba->mcq_enabled = true" assignment to prevent that it gets duplicated by a later patch that will introduce more ufshcd_mcq_enable() calls. No functionality is changed by this patch. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-8-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 0fca3318e550d48e9a6c844763bf9eab91c30f07 Author: Bart Van Assche Date: Mon Jul 8 14:16:01 2024 -0700 scsi: ufs: core: Inline is_mcq_enabled() Improve code readability by inlining is_mcq_enabled(). Cc: Peter Wang Cc: Manivannan Sadhasivam Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-7-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit f4750af7081d0466c187f5b72272d07148d75e67 Author: Bart Van Assche Date: Mon Jul 8 14:16:00 2024 -0700 scsi: ufs: core: Initialize hba->reserved_slot earlier Move the hba->reserved_slot and the host->can_queue assignments from ufshcd_config_mcq() into ufshcd_alloc_mcq(). The advantages of this change are as follows: - It becomes easier to verify that these two parameters are updated if hba->nutrs is updated. - It prevents unnecessary assignments to these two parameters. While ufshcd_config_mcq() is called during host reset, ufshcd_alloc_mcq() is not. Cc: Can Guo Reviewed-by: Peter Wang Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-6-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit b53eb9a050d76fc695258e04384e71b3fbb1e7d5 Author: Bart Van Assche Date: Mon Jul 8 14:15:59 2024 -0700 scsi: ufs: core: Rename the MASK_TRANSFER_REQUESTS_SLOTS constant Rename this constant to prepare for the introduction of the MASK_TRANSFER_REQUESTS_SLOTS_MCQ constant. The acronym "SDB" stands for "single doorbell" (mode). Reviewed-by: Peter Wang Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 92c0b10fefe2cdae4e57ad5ff023345ea4a7134d Author: Bart Van Assche Date: Mon Jul 8 14:15:58 2024 -0700 scsi: ufs: core: Remove two constants The SCSI host template members .cmd_per_lun and .can_queue are copied into the SCSI host data structure. Before these are used, these are overwritten by ufshcd_init(). Hence, this patch does not change any functionality. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Keoseong Park Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 93ef12d92f65facf8e02ad6578a898a190aa6cf4 Author: Bart Van Assche Date: Mon Jul 8 14:15:57 2024 -0700 scsi: ufs: core: Initialize struct uic_command once Instead of first zero-initializing struct uic_command and next initializing it memberwise, initialize all members at once. Reviewed-by: Daejun Park Reviewed-by: Avri Altman Reviewed-by: Manivannan Sadhasivam Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit d502dac69ac0a81231bb41f0e4e2845d7414191b Author: Bart Van Assche Date: Mon Jul 8 14:15:56 2024 -0700 scsi: ufs: core: Declare functions once Several functions are declared in include/ufs/ufshcd.h and also in drivers/ufs/core/ufshcd-priv.h. Remove the duplicate declarations. Reviewed-by: Peter Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240708211716.2827751-2-bvanassche@acm.org Reviewed-by: Manivannan Sadhasivam Reviewed-by: Keoseong Park Signed-off-by: Martin K. Petersen commit 58f9416d413aa2c20b2515233ce450a1607ef843 Merge: d00ba1d734f78 70838938e89c7 Author: Jakub Kicinski Date: Wed Jul 10 19:09:54 2024 -0700 Merge branch 'ice-support-to-dump-phy-config-fec' Tony Nguyen says: ==================== ice: Support to dump PHY config, FEC Anil Samal says: Implementation to dump PHY configuration and FEC statistics to facilitate link level debugging of customer issues. Implementation has two parts a. Serdes equalization # ethtool -d eth0 Output: Offset Values ------ ------ 0x0000: 00 00 00 00 03 00 00 00 05 00 00 00 01 08 00 40 0x0010: 01 00 00 40 00 00 39 3c 01 00 00 00 00 00 00 00 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... 0x01f0: 01 00 00 00 ef be ad de 8f 00 00 00 00 00 00 00 0x0200: 00 00 00 00 ef be ad de 00 00 00 00 00 00 00 00 0x0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0230: 00 00 00 00 00 00 00 00 00 00 00 00 fa ff 00 00 0x0240: 06 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 0x0250: 0f b0 0f b0 00 00 00 00 00 00 00 00 00 00 00 00 0x0260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x02a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x02b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x02c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x02d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x02e0: 00 00 00 00 00 00 00 00 00 00 00 00 Current implementation appends 176 bytes i.e. 44 bytes * 4 serdes lane. For port with 2 serdes lane, first 88 bytes are valid values and remaining 88 bytes are filled with zero. Similarly for port with 1 serdes lane, first 44 bytes are valid and remaining 132 bytes are marked zero. Each set of serdes equalizer parameter (i.e. set of 44 bytes) follows below order a. rx_equalization_pre2 b. rx_equalization_pre1 c. rx_equalization_post1 d. rx_equalization_bflf e. rx_equalization_bfhf f. rx_equalization_drate g. tx_equalization_pre1 h. tx_equalization_pre3 i. tx_equalization_atten j. tx_equalization_post1 k. tx_equalization_pre2 Where each individual equalizer parameter is of 4 bytes. As ethtool prints values as individual bytes, for little endian machine these values will be in reverse byte order. b. FEC block counts # ethtool -I --show-fec eth0 Output: FEC parameters for eth0: Supported/Configured FEC encodings: Auto RS BaseR Active FEC encoding: RS Statistics: corrected_blocks: 0 uncorrectable_blocks: 0 This series do following: Patch 1 - Implementation to support user provided flag for side band queue command. Patch 2 - Currently driver does not have a way to derive serdes lane number, pcs quad , pcs port from port number. So we introduced a mechanism to derive above info. Ethtool interface extension to include FEC statistics counter. Patch 3 - Ethtool interface extension to include serdes equalizer output. v1: https://lore.kernel.org/netdev/20240702180710.2606969-1-anthony.l.nguyen@intel.com/ ==================== Link: https://patch.msgid.link/20240709202951.2103115-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 70838938e89c759586eb4f3b5ce29ca252c8240d Author: Anil Samal Date: Tue Jul 9 13:29:49 2024 -0700 ice: Implement driver functionality to dump serdes equalizer values To debug link issues in the field, serdes Tx/Rx equalizer values help to determine the health of serdes lane. Extend 'ethtool -d' option to dump serdes Tx/Rx equalizer. The following list of equalizer param is supported a. rx_equalization_pre2 b. rx_equalization_pre1 c. rx_equalization_post1 d. rx_equalization_bflf e. rx_equalization_bfhf f. rx_equalization_drate g. tx_equalization_pre1 h. tx_equalization_pre3 i. tx_equalization_atten j. tx_equalization_post1 k. tx_equalization_pre2 Reviewed-by: Simon Horman Reviewed-by: Jesse Brandeburg Signed-off-by: Anil Samal Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240709202951.2103115-4-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit ac21add2540e1a6ed27abea47fd2234ab05c71eb Author: Anil Samal Date: Tue Jul 9 13:29:48 2024 -0700 ice: Implement driver functionality to dump fec statistics To debug link issues in the field, it is paramount to dump fec corrected/uncorrected block counts from firmware. Firmware requires PCS quad number and PCS port number to read FEC statistics. Current driver implementation does not maintain above physical properties of a port. Add new driver API to derive physical properties of an input port.These properties include PCS quad number, PCS port number, serdes lane count, primary serdes lane number. Extend ethtool option '--show-fec' to support fec statistics. The IEEE standard mandates two sets of counters: - 30.5.1.1.17 aFECCorrectedBlocks - 30.5.1.1.18 aFECUncorrectableBlocks Standard defines above statistics per lane but current implementation supports total FEC statistics per port i.e. sum of all lane per port. Find sample output below FEC parameters for ens21f0np0: Supported/Configured FEC encodings: Auto RS BaseR Active FEC encoding: RS Statistics: corrected_blocks: 0 uncorrectable_blocks: 0 Reviewed-by: Simon Horman Reviewed-by: Jesse Brandeburg Signed-off-by: Anil Samal Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240709202951.2103115-3-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit a317f873ea85e1e3abf7963670e88fd6f23f8c68 Author: Anil Samal Date: Tue Jul 9 13:29:47 2024 -0700 ice: Extend Sideband Queue command to support flags Current driver implementation for Sideband Queue supports a fixed flag (ICE_AQ_FLAG_RD). To retrieve FEC statistics from firmware, Sideband Queue command is used with a different flag. Extend API for Sideband Queue command to use 'flags' as input argument. Reviewed-by: Simon Horman Reviewed-by: Jesse Brandeburg Signed-off-by: Anil Samal Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240709202951.2103115-2-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit d00ba1d734f78c8f0a4826acd1f19ec42bbcb9be Author: Frank Li Date: Tue Jul 9 17:48:41 2024 -0400 dt-bindings: net: convert enetc to yaml Convert enetc device binding file to yaml. Split to 3 yaml files, 'fsl,enetc.yaml', 'fsl,enetc-mdio.yaml', 'fsl,enetc-ierb.yaml'. Additional Changes: - Add pci, in compatible string. - Ref to common ethernet-controller.yaml and mdio.yaml. - Add Wei fang, Vladimir and Claudiu as maintainer. - Update ENETC description. - Remove fixed-link part. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240709214841.570154-1-Frank.Li@nxp.com Signed-off-by: Jakub Kicinski commit ab896aa62e309b3ceaa35b82dc99b64da7ce6bfa Author: Marek Vasut Date: Mon Jul 8 23:16:29 2024 +0200 dt-bindings: net: realtek,rtl82xx: Document RTL8211F LED support The RTL8211F PHY does support LED configuration, document support for LEDs in the binding document. Signed-off-by: Marek Vasut Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240708211649.165793-1-marex@denx.de Signed-off-by: Jakub Kicinski commit 3a8617c7df6eb351227aad9b0df647f34a7ef423 Author: Alison Schofield Date: Sat Jul 6 18:53:44 2024 -0700 cxl/test: Replace ENXIO with EBUSY for inject poison limit reached The CXL driver was recently updated to return EBUSY rather than ENXIO when the device reports that an injection request exceeds the device's limit. That change to EBUSY allows debug users to differentiate between limit reached and inject failures for any other reason. Change cxl-test to also return EBUSY and tidy up the dev_dbg() messaging to emit the correct limit. Reminder: the cxl-test per device injection limit is a configurable attribute: /sys/bus/platform/drivers/cxl_mock_mem/poison_inject_max Signed-off-by: Alison Schofield Tested-by: Xingtao Yao Reviewed-by: Dan Williams Reviewed-by: Davidlohr Bueso Link: https://patch.msgid.link/ba1b80e1658b644d85d0d5e2287112d00a48b9cf.1720316188.git.alison.schofield@intel.com Signed-off-by: Dave Jiang commit 591209c79844c1ecbee79e6b5a019e5b61eab8d3 Author: Alison Schofield Date: Sat Jul 6 18:53:43 2024 -0700 cxl/memdev: Replace ENXIO with EBUSY for inject poison limit reached The CXL driver provides a debugfs interface offering users the ability to inject and clear poison to a memdev. Once a user has injected up to the devices limit further injection requests fail with ENXIO until a clear poison is issued. Users may not have device specs in hand or may want to intentionally hit the limit and then clear. Replace the usual ENXIO return status with EBUSY so users can recognize this failure. Signed-off-by: Alison Schofield Tested-by: Xingtao Yao Reviewed-by: Dan Williams Reviewed-by: Davidlohr Bueso Link: https://patch.msgid.link/825bd4c67fb55a4373c4182d999ad49d4e6b4fe7.1720316188.git.alison.schofield@intel.com Signed-off-by: Dave Jiang commit bebfbbaffccfb69126c5a6a1d41cd868b6419370 Author: Fabio M. De Francesco Date: Fri Jun 28 19:48:07 2024 +0200 cxl/acpi: Warn on mixed CXL VH and RCH/RCD Hierarchy Each Host Bridge instance has a corresponding CXL Host Bridge Structure (CHBS) ACPI table that identifies its capabilities. CHBS tables can be two types (CXL 3.1 Table 9-21): The PCIe Root Complex Register Block (RCRB) and CXL Host Bridge Component Registers (CHBCR). If a Host Bridge is attached to a device that is operating in Restricted CXL Device Mode (RCD), BIOS publishes an RCRB with the base address of registers that describe its capabilities (CXL 3.1 sec. 9.11). Instead, the new (CXL 2.0+) Component registers can only be accessed by means of a base address published with a CHBCR (CXL 3.1 sec. 9.12). If an eRCD (a device that forces the host-bridge into CXL 1.1 Restricted CXL Host mode) is attached to a CXL 2.0+ Host-Bridge, the current CXL specification does not define a mechanism for finding CXL-2.0-only root-port component registers like HDM decoders and Extended Security capability. An algorithm to locate a CHBCR associated with an RCRB, would be too invasive to land without some concrete motivation. Therefore, just print a message to inform of unsupported config. Count how many different CHBS "Version" types are detected by cxl_get_chbs_iter(). Then make cxl_get_chbs() print a warning if that sum is greater than 1. Tested-by: Alison Schofield Signed-off-by: Fabio M. De Francesco Reviewed-by: Davidlohr Bueso Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20240628175535.272472-1-fabio.m.de.francesco@linux.intel.com Signed-off-by: Dave Jiang commit ee3f77a37646ed3c9b60e747737fb2c5c3a4c261 Merge: 1ee45e649ebf0 3cbda25e2db28 Author: Mark Brown Date: Thu Jul 11 00:26:30 2024 +0100 ASoC: dt-bindings: convert qcom sound bindings to Merge series from Rayyan Ansari : These patches convert the remaining plain text bindings for Qualcomm sound drivers to dt schema, so device trees can be validated against them. commit 1ee45e649ebf07f1438a464fc3bafd14becea797 Merge: 0d1ebba74fad7 dc0e5ca8856dc Author: Mark Brown Date: Thu Jul 11 00:26:23 2024 +0100 firmware: cs_dsp: Some small coding improvements Merge series from Richard Fitzgerald : Commit series that makes some small improvements to code and the kernel log messages. commit 1037885b309cfca5b770137209e9b51d1b50cc27 Author: Drew Fustini Date: Sun Jun 23 19:12:31 2024 -0700 dt-bindings: clock: Document T-Head TH1520 AP_SUBSYS controller Document bindings for the T-Head TH1520 AP sub-system clock controller. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf Co-developed-by: Yangtao Li Signed-off-by: Yangtao Li Reviewed-by: Conor Dooley Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20240623-th1520-clk-v2-1-ad8d6432d9fb@tenstorrent.com Signed-off-by: Stephen Boyd commit bed6b0317441d82c32506750ccd868d83850e6f4 Author: Chao Yu Date: Tue Jun 25 11:16:03 2024 +0800 f2fs: clean up addrs_per_{inode,block}() Introduce a new help addrs_per_page() to wrap common code from addrs_per_inode() and addrs_per_block() for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7309871c03be22bee843f6961dcce183f04d48a9 Author: Chao Yu Date: Tue Jun 25 11:16:02 2024 +0800 f2fs: clean up F2FS_I() Use temporary variable instead of F2FS_I() for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8ecef8e01a08c7e3e4ffc8f08d9f9663984f334b Author: peng guo Date: Wed Jul 10 10:31:12 2024 +0800 cxl/core: Fix incorrect vendor debug UUID define When user send a mbox command whose opcode is CXL_MBOX_OP_CLEAR_LOG and the in_payload is normal vendor debug log UUID according to the CXL specification cxl_payload_from_user_allowed() will return false unexpectedly, Sending mbox cmd operation fails and the kernel log will print: Clear Log: input payload not allowed. All CXL devices that support a debug log shall support the Vendor Debug Log to allow the log to be accessed through a common host driver, for any device, all versions of the CXL specification define the same value with Log Identifier of: 5e1819d9-11a9-400c-811f-d60719403d86 Refer to CXL spec r3.1 Table 8-71 Fix the definition value of DEFINE_CXL_VENDOR_DEBUG_UUID to match the CXL specification. Fixes: 472b1ce6e9d6 ("cxl/mem: Enable commands via CEL") Signed-off-by: peng guo Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20240710023112.8063-1-engguopeng@buaa.edu.cn Signed-off-by: Dave Jiang commit f18d0076933689775fe7faeeb10ee93ff01be6ab Author: Sunmin Jeong Date: Wed Jul 10 20:51:43 2024 +0900 f2fs: use meta inode for GC of COW file In case of the COW file, new updates and GC writes are already separated to page caches of the atomic file and COW file. As some cases that use the meta inode for GC, there are some race issues between a foreground thread and GC thread. To handle them, we need to take care when to invalidate and wait writeback of GC pages in COW files as the case of using the meta inode. Also, a pointer from the COW inode to the original inode is required to check the state of original pages. For the former, we can solve the problem by using the meta inode for GC of COW files. Then let's get a page from the original inode in move_data_block when GCing the COW file to avoid race condition. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Cc: stable@vger.kernel.org #v5.19+ Reviewed-by: Sungjong Seo Reviewed-by: Yeongjin Gil Signed-off-by: Sunmin Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b40a2b00370931b0c50148681dd7364573e52e6b Author: Sunmin Jeong Date: Wed Jul 10 20:51:17 2024 +0900 f2fs: use meta inode for GC of atomic file The page cache of the atomic file keeps new data pages which will be stored in the COW file. It can also keep old data pages when GCing the atomic file. In this case, new data can be overwritten by old data if a GC thread sets the old data page as dirty after new data page was evicted. Also, since all writes to the atomic file are redirected to COW inodes, GC for the atomic file is not working well as below. f2fs_gc(gc_type=FG_GC) - select A as a victim segment do_garbage_collect - iget atomic file's inode for block B move_data_page f2fs_do_write_data_page - use dn of cow inode - set fio->old_blkaddr from cow inode - seg_freed is 0 since block B is still valid - goto gc_more and A is selected as victim again To solve the problem, let's separate GC writes and updates in the atomic file by using the meta inode for GC writes. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Cc: stable@vger.kernel.org #v5.19+ Reviewed-by: Sungjong Seo Reviewed-by: Yeongjin Gil Signed-off-by: Sunmin Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e3a19972a49f61775e5e11ac43a663f28cdfb8b2 Author: Sheng Yong Date: Wed Jul 10 09:26:59 2024 +0800 f2fs: only fragment segment in the same section When new_curseg() is allocating a new segment, if mode=fragment:xxx is switched on in large section scenario, __get_next_segno() will select the next segno randomly in the range of [0, maxsegno] in order to fragment segments. If the candidate segno is free, get_new_segment() will use it directly as the new segment. However, if the section of the candidate is not empty, and some other segments have already been used, and have a different type (e.g NODE) with the candidate (e.g DATA), GC will complain inconsistent segment type later. This could be reproduced by the following steps: dd if=/dev/zero of=test.img bs=1M count=10240 mkfs.f2fs -s 128 test.img mount -t f2fs test.img /mnt -o mode=fragment:block echo 1 > /sys/fs/f2fs/loop0/max_fragment_chunk echo 512 > /sys/fs/f2fs/loop0/max_fragment_hole dd if=/dev/zero of=/mnt/testfile bs=4K count=100 umount /mnt F2FS-fs (loop0): Inconsistent segment (4377) type [0, 1] in SSA and SIT In order to allow simulating segment fragmentation in large section scenario, this patch reduces the candidate range: * if curseg is the last segment in the section, return curseg->segno to make get_new_segment() itself find the next free segment. * if curseg is in the middle of the section, select candicate randomly in the range of [curseg + 1, last_seg_in_the_same_section] to keep type consistent. Reviewed-by: Chao Yu Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim commit f06c0f82e38bbda7264d6ef3c90045ad2810e0f3 Author: Chao Yu Date: Tue Jun 25 10:32:39 2024 +0800 f2fs: fix to update user block counts in block_operations() Commit 59c9081bc86e ("f2fs: allow write page cache when writting cp") allows write() to write data to page cache during checkpoint, so block count fields like .total_valid_block_count, .alloc_valid_block_count and .rf_node_block_count may encounter race condition as below: CP Thread A - write_checkpoint - block_operations - f2fs_down_write(&sbi->node_change) - __prepare_cp_block : ckpt->valid_block_count = .total_valid_block_count - f2fs_up_write(&sbi->node_change) - write - f2fs_preallocate_blocks - f2fs_map_blocks(,F2FS_GET_BLOCK_PRE_AIO) - f2fs_map_lock - f2fs_down_read(&sbi->node_change) - f2fs_reserve_new_blocks - inc_valid_block_count : percpu_counter_add(&sbi->alloc_valid_block_count, count) : sbi->total_valid_block_count += count - f2fs_up_read(&sbi->node_change) - do_checkpoint : sbi->last_valid_block_count = sbi->total_valid_block_count : percpu_counter_set(&sbi->alloc_valid_block_count, 0) : percpu_counter_set(&sbi->rf_node_block_count, 0) - fsync - need_do_checkpoint - f2fs_space_for_roll_forward : alloc_valid_block_count was reset to zero, so, it may missed last data during checkpoint Let's change to update .total_valid_block_count, .alloc_valid_block_count and .rf_node_block_count in block_operations(), then their access can be protected by .node_change and .cp_rwsem lock, so that it can avoid above race condition. Fixes: 59c9081bc86e ("f2fs: allow write page cache when writting cp") Cc: Yunlei He Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 54f43a10fa257ad4af02a1d157fefef6ebcfa7dc Author: Eric Sandeen Date: Fri Jun 28 23:38:17 2024 -0500 f2fs: remove unreachable lazytime mount option parsing The lazytime/nolazytime options are now handled in the VFS, and are never seen in filesystem parsers, so remove handling of these options from f2fs. Note: when lazytime support was added in 6d94c74ab85f it made lazytime the default in default_options() - as a result, lazytime cannot be disabled (because Opt_nolazytime is never seen in f2fs parsing). If lazytime is desired to be configurable, and default off is OK, default_options() could be updated to stop setting it by default and allow mount option control. Signed-off-by: Eric Sandeen Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c82bc1ab2a8a5e73d9728e80c4c2ed87e8921a38 Author: Daejun Park Date: Thu Jul 4 10:01:21 2024 +0900 f2fs: fix null reference error when checking end of zone This patch fixes a potentially null pointer being accessed by is_end_zone_blkaddr() that checks the last block of a zone when f2fs is mounted as a single device. Fixes: e067dc3c6b9c ("f2fs: maintain six open zones for zoned devices") Signed-off-by: Daejun Park Reviewed-by: Chao Yu Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit 450a60ef607900bb9affb0e822fea9726679c512 Merge: f21711bbdbf0d 3c1ff93b4deea Author: Mark Brown Date: Wed Jul 10 23:05:45 2024 +0100 regmap: Implement regmap_multi_reg_read() Merge series from Guenter Roeck : regmap_multi_reg_read() is similar to regmap_bilk_read() but reads from an array of non-sequential registers. It is helpful if multiple non- sequential registers need to be read in a single operation which would otherwise have to be mutex protected. The name of the new function was chosen to match the existing function regmap_multi_reg_write(). commit f24c9bfcd423e2b2bb0d198456412f614ec2030a Author: Jiwei Sun Date: Wed Jun 5 20:48:44 2024 +0800 PCI: vmd: Create domain symlink before pci_bus_add_devices() The vmd driver creates a "domain" symlink in sysfs for each VMD bridge. Previously this symlink was created after pci_bus_add_devices() added devices below the VMD bridge and emitted udev events to announce them to userspace. This led to a race between userspace consumers of the udev events and the kernel creation of the symlink. One such consumer is mdadm, which assembles block devices into a RAID array, and for devices below a VMD bridge, mdadm depends on the "domain" symlink. If mdadm loses the race, it may be unable to assemble a RAID array, which may cause a boot failure or other issues, with complaints like this: (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: Unable to get real path for '/sys/bus/pci/drivers/vmd/0000:c7:00.5/domain/device'' (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: /dev/nvme1n1 is not attached to Intel(R) RAID controller.' (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: No OROM/EFI properties for /dev/nvme1n1' (udev-worker)[2149]: nvme1n1: '/sbin/mdadm -I /dev/nvme1n1'(err) 'mdadm: no RAID superblock on /dev/nvme1n1.' (udev-worker)[2149]: nvme1n1: Process '/sbin/mdadm -I /dev/nvme1n1' failed with exit code 1. This symptom prevents the OS from booting successfully. After a NVMe disk is probed/added by the nvme driver, udevd invokes mdadm to detect if there is a mdraid associated with this NVMe disk, and mdadm determines if a NVMe device is connected to a particular VMD domain by checking the "domain" symlink. For example: Thread A Thread B Thread mdadm vmd_enable_domain pci_bus_add_devices __driver_probe_device ... work_on_cpu schedule_work_on : wakeup Thread B nvme_probe : wakeup scan_work to scan nvme disk and add nvme disk then wakeup udevd : udevd executes mdadm command flush_work main : wait for nvme_probe done ... __driver_probe_device find_driver_devices : probe next nvme device : 1) Detect domain symlink ... 2) Find domain symlink ... from vmd sysfs ... 3) Domain symlink not ... created yet; failed sysfs_create_link : create domain symlink Create the VMD "domain" symlink before invoking pci_bus_add_devices() to avoid this race. Suggested-by: Adrian Huang Link: https://lore.kernel.org/linux-pci/20240605124844.24293-1-sjiwei@163.com Signed-off-by: Jiwei Sun Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Nirmal Patel commit fb9086e95ad84f14e4f4db97ed96422c74407830 Author: Thorsten Blum Date: Wed Jul 10 22:24:18 2024 +0200 riscv: Remove unnecessary int cast in variable_fls() __builtin_clz() returns an int and casting the whole expression to int is unnecessary. Remove it. Signed-off-by: Thorsten Blum Signed-off-by: Yury Norov commit 692a68ee9c3c4ab984ae45a74a7569f14222d5aa Author: Wei Yang Date: Wed Jul 10 17:27:01 2024 +0000 radix tree test suite: put definition of bitmap_clear() into lib/bitmap.c In tools/ directory, function bitmap_clear() is currently only used in object file tools/testing/radix-tree/xarray.o. But instead of keeping a bitmap.c with only bitmap_clear() definition in radix-tree's own directory, it would be more proper to put it in common directory lib/. Sync the kernel definition and link some related libs, no functional change is expected. Signed-off-by: Wei Yang CC: Matthew Wilcox CC: Yury Norov Signed-off-by: Yury Norov commit 00c7ded68012c5a6adb0b14635a9aae573eb81c6 Author: Nathan Chancellor Date: Wed Jul 10 10:07:52 2024 -0700 clk: sophgo: Avoid -Wsometimes-uninitialized in sg2042_clk_pll_set_rate() Clang warns (or errors with CONFIG_WERROR=y): drivers/clk/sophgo/clk-sg2042-pll.c:396:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 396 | if (sg2042_pll_enable(pll, 0)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/sophgo/clk-sg2042-pll.c:418:9: note: uninitialized use occurs here 418 | return ret; | ^~~ drivers/clk/sophgo/clk-sg2042-pll.c:396:2: note: remove the 'if' if its condition is always false 396 | if (sg2042_pll_enable(pll, 0)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 397 | pr_warn("Can't disable pll(%s), status error\n", pll->hw.init->name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 398 | goto out; | ~~~~~~~~~ 399 | } | ~ drivers/clk/sophgo/clk-sg2042-pll.c:393:9: note: initialize the variable 'ret' to silence this warning 393 | int ret; | ^ | = 0 1 error generated. sg2042_pll_enable() only ever returns zero, so this situation cannot happen, but clang does not perform interprocedural analysis, so it cannot know this to avoid the warning. Make it clearer to the compiler by making sg2042_pll_enable() void and eliminate the error handling in sg2042_clk_pll_set_rate(), which clears up the warning, as ret will always be initialized. Fixes: 48cf7e01386e ("clk: sophgo: Add SG2042 clock driver") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20240710-clk-sg2042-fix-sometimes-uninitialized-pll_set_rate-v1-1-538fa82dd539@kernel.org Signed-off-by: Stephen Boyd commit 1f7a04a0e673c19cc10bf4039047e11367ac5735 Author: Li Qiang Date: Tue Jul 9 14:36:38 2024 +0800 clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() In general it's a good idea to avoid using bare unreachable() because it introduces undefined behavior in compiled code. but it caused a compilation warning, Using BUG() instead of unreachable() to resolve compilation warnings. Fixes the following warnings: drivers/clk/sophgo/clk-cv18xx-ip.o: warning: objtool: mmux_round_rate() falls through to next function bypass_div_round_rate() Fixes: 80fd61ec46124 ("clk: sophgo: Add clock support for CV1800 SoC") Signed-off-by: Li Qiang Link: https://lore.kernel.org/r/c8e66d51f880127549e2a3e623be6787f62b310d.1720506143.git.liqiang01@kylinos.cn Signed-off-by: Stephen Boyd commit 77aeb1b685f9db73d276bad4bb30d48505a6fd23 Author: Zqiang Date: Thu Jul 4 14:52:13 2024 +0800 smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu() For CONFIG_DEBUG_OBJECTS_WORK=y kernels sscs.work defined by INIT_WORK_ONSTACK() is initialized by debug_object_init_on_stack() for the debug check in __init_work() to work correctly. But this lacks the counterpart to remove the tracked object from debug objects again, which will cause a debug object warning once the stack is freed. Add the missing destroy_work_on_stack() invocation to cure that. [ tglx: Massaged changelog ] Signed-off-by: Zqiang Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Link: https://lore.kernel.org/r/20240704065213.13559-1-qiang.zhang1211@gmail.com commit 16badacd8af48980c546839626d0329bab32b4c3 Author: Alexandre Ghiti Date: Fri Mar 22 12:26:29 2024 +0100 riscv: Improve sbi_ecall() code generation by reordering arguments The sbi_ecall() function arguments are not in the same order as the ecall arguments, so we end up re-ordering the registers before the ecall which is useless and costly. So simply reorder the arguments in the same way as expected by ecall. Instead of reordering directly the arguments of sbi_ecall(), use a proxy macro since the current ordering is more natural. Before: Dump of assembler code for function sbi_ecall: 0xffffffff800085e0 <+0>: add sp,sp,-32 0xffffffff800085e2 <+2>: sd s0,24(sp) 0xffffffff800085e4 <+4>: mv t1,a0 0xffffffff800085e6 <+6>: add s0,sp,32 0xffffffff800085e8 <+8>: mv t3,a1 0xffffffff800085ea <+10>: mv a0,a2 0xffffffff800085ec <+12>: mv a1,a3 0xffffffff800085ee <+14>: mv a2,a4 0xffffffff800085f0 <+16>: mv a3,a5 0xffffffff800085f2 <+18>: mv a4,a6 0xffffffff800085f4 <+20>: mv a5,a7 0xffffffff800085f6 <+22>: mv a6,t3 0xffffffff800085f8 <+24>: mv a7,t1 0xffffffff800085fa <+26>: ecall 0xffffffff800085fe <+30>: ld s0,24(sp) 0xffffffff80008600 <+32>: add sp,sp,32 0xffffffff80008602 <+34>: ret After: Dump of assembler code for function __sbi_ecall: 0xffffffff8000b6b2 <+0>: add sp,sp,-32 0xffffffff8000b6b4 <+2>: sd s0,24(sp) 0xffffffff8000b6b6 <+4>: add s0,sp,32 0xffffffff8000b6b8 <+6>: ecall 0xffffffff8000b6bc <+10>: ld s0,24(sp) 0xffffffff8000b6be <+12>: add sp,sp,32 0xffffffff8000b6c0 <+14>: ret Signed-off-by: Alexandre Ghiti Reviewed-by: Atish Patra Reviewed-by: Yunhui Cui Link: https://lore.kernel.org/r/20240322112629.68170-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 56c1c1a09ab93c7b7c957860f01f8600d6c03143 Author: Samuel Holland Date: Thu Mar 21 16:01:25 2024 -0700 riscv: Add tracepoints for SBI calls and returns These are useful for measuring the latency of SBI calls. The SBI HSM extension is excluded because those functions are called from contexts such as cpuidle where instrumentation is not allowed. Reviewed-by: Andrew Jones Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20240321230131.1838105-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 48d2245586452b8279a854970ce82f43477669d3 Merge: 28323a7561667 6ed9a85f1c44d Author: Arnd Bergmann Date: Wed Jul 10 22:23:01 2024 +0200 Merge tag 'sunxi-dt-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt Allwinner SoC device tree changes for 6.11 part 2 One additional peripheral enabled for the H616. - H616 crypto engine added * tag 'sunxi-dt-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h616: add crypto engine node Link: https://lore.kernel.org/r/Zo7O73Afx7lZcBRi@wens.tw Signed-off-by: Arnd Bergmann commit 77dc111f6da2f4ed5b7d50c6cb5157b6bf4edd63 Merge: 8cfda4059fe1e e4b5a39c2fca5 Author: Arnd Bergmann Date: Wed Jul 10 22:22:32 2024 +0200 Merge tag 'sunxi-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/drivers Allwinner SoC driver changes for 6.11 part 2 One additional minor cleanup - Const-ify |struct regmap_config| in SRAM driver - Const-ify |struct regmap_bus| in Allwinner RSB bus driver * tag 'sunxi-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: bus: sunxi-rsb: Constify struct regmap_bus soc: sunxi: sram: Constify struct regmap_config Link: https://lore.kernel.org/r/Zo7T4YsfamN0PbYK@wens.tw Signed-off-by: Arnd Bergmann commit a43fe27d650375cd9e5ea915c538f6f9eabd185e Author: Xiao Wang Date: Fri Jun 21 13:47:07 2024 +0800 riscv: Optimize crc32 with Zbc extension As suggested by the B-ext spec, the Zbc (carry-less multiplication) instructions can be used to accelerate CRC calculations. Currently, the crc32 is the most widely used crc function inside kernel, so this patch focuses on the optimization of just the crc32 APIs. Compared with the current table-lookup based optimization, Zbc based optimization can also achieve large stride during CRC calculation loop, meantime, it avoids the memory access latency of the table-lookup based implementation and it reduces memory footprint. If Zbc feature is not supported in a runtime environment, then the table-lookup based implementation would serve as fallback via alternative mechanism. By inspecting the vmlinux built by gcc v12.2.0 with default optimization level (-O2), we can see below instruction count change for each 8-byte stride in the CRC32 loop: rv64: crc32_be (54->31), crc32_le (54->13), __crc32c_le (54->13) rv32: crc32_be (50->32), crc32_le (50->16), __crc32c_le (50->16) The compile target CPU is little endian, extra effort is needed for byte swapping for the crc32_be API, thus, the instruction count change is not as significant as that in the *_le cases. This patch is tested on QEMU VM with the kernel CRC32 selftest for both rv64 and rv32. Running the CRC32 selftest on a real hardware (SpacemiT K1) with Zbc extension shows 65% and 125% performance improvement respectively on crc32_test() and crc32c_test(). Signed-off-by: Xiao Wang Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240621054707.1847548-1-xiao.w.wang@intel.com Signed-off-by: Palmer Dabbelt commit 99194e6db5d89c00ea8acd1eb3ff260e1c440f55 Author: Christian König Date: Fri Jan 19 14:57:29 2024 +0100 drm/amdgpu: reject gang submit on reserved VMIDs A gang submit won't work if the VMID is reserved and we can't flush out VM changes from multiple engines at the same time. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 320debca1ba3a81c87247eac84eff976ead09ee0) commit 12b02b6359598ed126c089e66b5766c461d3420e Author: Thorsten Blum Date: Wed Jul 10 16:33:10 2024 +0200 clk: mxs: Use clamp() in clk_ref_round_rate() and clk_ref_set_rate() Use clamp() instead of duplicating its implementation. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240710143309.706135-2-thorsten.blum@toblux.com Signed-off-by: Stephen Boyd commit 38bded815463f40bc36f28c5a60998f78c8259e6 Author: Javier Carrasco Date: Wed Jul 3 11:50:22 2024 +0200 clk: sunxi-ng r40: Constify struct regmap_config `sun8i_r40_ccu_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240703-clk-const-regmap-v1-9-7d15a0671d6f@gmail.com Reviewed-by: Andre Przywara Acked-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 18a8a4c88fb4c261f72a29b769c9463362d9687a Merge: ec5b8c76ab1c6 52b49ec1b2c78 Author: Martin KaFai Lau Date: Wed Jul 10 12:23:32 2024 -0700 Merge branch 'BPF selftests misc fixes' Geliang Tang says: ==================== v2: - only check the first "link" (link_nl) in test_mixed_links(). - Drop patch 2 in v1. This patchset fixes a segfault and a bpf object leak in test_progs. It is a resend patch 1 out of "skip ENOTSUPP BPF selftests" set as Eduard suggested. Together with another fix for xdp_adjust_tail. ==================== Signed-off-by: Martin KaFai Lau commit 52b49ec1b2c78deb258596c3b231201445ef5380 Author: Geliang Tang Date: Wed Jul 10 21:10:17 2024 +0800 selftests/bpf: Close obj in error path in xdp_adjust_tail If bpf_object__load() fails in test_xdp_adjust_frags_tail_grow(), "obj" opened before this should be closed. So use "goto out" to close it instead of using "return" here. Fixes: 110221081aac ("bpf: selftests: update xdp_adjust_tail selftest to include xdp frags") Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/f282a1ed2d0e3fb38cceefec8e81cabb69cab260.1720615848.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit eef0532e900c20a6760da829e82dac3ee18688c5 Author: Geliang Tang Date: Wed Jul 10 21:10:16 2024 +0800 selftests/bpf: Null checks for links in bpf_tcp_ca Run bpf_tcp_ca selftests (./test_progs -t bpf_tcp_ca) on a Loongarch platform, some "Segmentation fault" errors occur: ''' test_dctcp:PASS:bpf_dctcp__open_and_load 0 nsec test_dctcp:FAIL:bpf_map__attach_struct_ops unexpected error: -524 #29/1 bpf_tcp_ca/dctcp:FAIL test_cubic:PASS:bpf_cubic__open_and_load 0 nsec test_cubic:FAIL:bpf_map__attach_struct_ops unexpected error: -524 #29/2 bpf_tcp_ca/cubic:FAIL test_dctcp_fallback:PASS:dctcp_skel 0 nsec test_dctcp_fallback:PASS:bpf_dctcp__load 0 nsec test_dctcp_fallback:FAIL:dctcp link unexpected error: -524 #29/4 bpf_tcp_ca/dctcp_fallback:FAIL test_write_sk_pacing:PASS:open_and_load 0 nsec test_write_sk_pacing:FAIL:attach_struct_ops unexpected error: -524 #29/6 bpf_tcp_ca/write_sk_pacing:FAIL test_update_ca:PASS:open 0 nsec test_update_ca:FAIL:attach_struct_ops unexpected error: -524 settcpca:FAIL:setsockopt unexpected setsockopt: \ actual -1 == expected -1 (network_helpers.c:99: errno: No such file or directory) \ Failed to call post_socket_cb start_test:FAIL:start_server_str unexpected start_server_str: \ actual -1 == expected -1 test_update_ca:FAIL:ca1_ca1_cnt unexpected ca1_ca1_cnt: \ actual 0 <= expected 0 #29/9 bpf_tcp_ca/update_ca:FAIL #29 bpf_tcp_ca:FAIL Caught signal #11! Stack trace: ./test_progs(crash_handler+0x28)[0x5555567ed91c] linux-vdso.so.1(__vdso_rt_sigreturn+0x0)[0x7ffffee408b0] ./test_progs(bpf_link__update_map+0x80)[0x555556824a78] ./test_progs(+0x94d68)[0x5555564c4d68] ./test_progs(test_bpf_tcp_ca+0xe8)[0x5555564c6a88] ./test_progs(+0x3bde54)[0x5555567ede54] ./test_progs(main+0x61c)[0x5555567efd54] /usr/lib64/libc.so.6(+0x22208)[0x7ffff2aaa208] /usr/lib64/libc.so.6(__libc_start_main+0xac)[0x7ffff2aaa30c] ./test_progs(_start+0x48)[0x55555646bca8] Segmentation fault ''' This is because BPF trampoline is not implemented on Loongarch yet, "link" returned by bpf_map__attach_struct_ops() is NULL. test_progs crashs when this NULL link passes to bpf_link__update_map(). This patch adds NULL checks for all links in bpf_tcp_ca to fix these errors. If "link" is NULL, goto the newly added label "out" to destroy the skel. v2: - use "goto out" instead of "return" as Eduard suggested. Fixes: 06da9f3bd641 ("selftests/bpf: Test switching TCP Congestion Control algorithms.") Signed-off-by: Geliang Tang Reviewed-by: Alan Maguire Link: https://lore.kernel.org/r/b4c841492bd4ed97964e4e61e92827ce51bf1dc9.1720615848.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit 259043e3b730e0aa6408bff27af7edf7a5c9101c Author: Barry Song Date: Sun Jun 30 11:22:31 2024 +1200 mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N If CONFIG_ZSWAP is set to N, it means zswap cannot be enabled. zswap_never_enabled() should return true. The only effect of this issue is that with Barry's latest large folio swapin patches for zram ("mm: support mTHP swap-in for zRAM-like swapfile"), we will always fallback to order-0 swapin, even mistakenly when !CONFIG_ZSWAP. Basically this bug makes Barry's in progress patches not work at all. The API was created to inform the mm core that zswap has never been enabled, allowing the mm core to perform mTHP swap-in. This is a transitional solution until zswap supports mTHP. If zswap has been enabled, performing mTHP swap-in will result in corrupted data. You may find the answer in the mTHP swap-in series: https://lore.kernel.org/linux-mm/CAJD7tkZ4FQr6HZpduOdvmqgg_-whuZYE-Bz5O2t6yzw6Yg+v1A@mail.gmail.com/ Link: https://lkml.kernel.org/r/20240629232231.42394-1-21cnbao@gmail.com Fixes: 0300e17d67c3 ("mm: zswap: add zswap_never_enabled()") Signed-off-by: Barry Song Reviewed-by: Chengming Zhou Acked-by: Yosry Ahmed Acked-by: Chris Li Acked-by: David Hildenbrand Reviewed-by: Nhat Pham Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit e5a119c4a6835a53f93fcfba6c177daef58467e3 Author: Barry Song Date: Sun Jun 30 11:41:55 2024 +1200 mm/vmscan: drop checking if _deferred_list is empty before using TTU_SYNC The optimization of list_empty(&folio->_deferred_list) aimed to prevent increasing the PTL duration when a large folio is partially unmapped, for example, from subpage 0 to subpage (nr - 2). But Ryan's commit 5ed890ce5147 ("mm: vmscan: avoid split during shrink_folio_list()") actually splits this kind of large folios. This makes the "optimization" useless. Additionally, the list_empty() technically required a data_race() annotation. Link: https://lkml.kernel.org/r/20240629234155.53524-1-21cnbao@gmail.com Signed-off-by: Barry Song Reviewed-by: Ryan Roberts Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 689d92cc81ac57ca6b674be8728b9c5ea5c725fd Author: Wei Yang Date: Tue Jul 2 02:09:31 2024 +0000 mm/page_alloc: remove prefetchw() on freeing page to buddy system The prefetchw() is introduced from an ancient patch[1]. The change log says: The basic idea is to free higher order pages instead of going through every single one. Also, some unnecessary atomic operations are done away with and replaced with non-atomic equivalents, and prefetching is done where it helps the most. For a more in-depth discusion of this patch, please see the linux-ia64 archives (topic is "free bootmem feedback patch"). So there are several changes improve the bootmem freeing, in which the most basic idea is freeing higher order pages. And as Matthew says, "Itanium CPUs of this era had no prefetchers." I did 10 round bootup tests before and after this change, the data doesn't prove prefetchw() help speeding up bootmem freeing. The sum of the 10 round bootmem freeing time after prefetchw() removal even 5.2% faster than before. [1]: https://lore.kernel.org/linux-ia64/40F46962.4090604@sgi.com/ Link: https://lkml.kernel.org/r/20240702020931.7061-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Suggested-by: Matthew Wilcox Reviewed-by: Matthew Wilcox Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 9325585288f2742b4b6effd5246154c374b9100f Author: Wei Yang Date: Mon Jul 1 01:34:10 2024 +0000 kernel/fork.c: put set_max_threads()/task_struct_whitelist() in __init section The functions set_max_threads() and task_struct_whitelist() are only used by fork_init() during bootup. Let's add __init tag to them. Link: https://lkml.kernel.org/r/20240701013410.17260-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang Suggested-by: Oleg Nesterov Cc: David Hildenbrand Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 66b4aaf7335c9e7f59ba93a45379ba2bbfe1b913 Author: Wei Yang Date: Mon Jul 1 01:34:09 2024 +0000 kernel/fork.c: get totalram_pages from memblock to calculate max_threads Since we plan to move the accounting into __free_pages_core(), totalram_pages may not represent the total usable pages on system at this point when defer_init is enabled. Instead we can get the total usable pages from memblock directly. Link: https://lkml.kernel.org/r/20240701013410.17260-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Mike Rapoport (IBM) Cc: David Hildenbrand Cc: Oleg Nesterov Signed-off-by: Andrew Morton commit 3a3b7fec3974f954600844e41d773c00857ef48a Author: Johannes Weiner Date: Mon Jul 1 11:31:15 2024 -0400 mm: remove CONFIG_MEMCG_KMEM CONFIG_MEMCG_KMEM used to be a user-visible option for whether slab tracking is enabled. It has been default-enabled and equivalent to CONFIG_MEMCG for almost a decade. We've only grown more kernel memory accounting sites since, and there is no imaginable cgroup usecase going forward that wants to track user pages but not the multitude of user-drivable kernel allocations. Link: https://lkml.kernel.org/r/20240701153148.452230-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Acked-by: David Hildenbrand Cc: Muchun Song Signed-off-by: Andrew Morton commit 6df13230b612af81ce04f20bb37a02e58ef71925 Author: Roman Gushchin Date: Mon Jul 1 18:59:32 2024 +0000 mm: memcg: add cache line padding to mem_cgroup_per_node Memcg v1-specific fields serve a buffer function between read-mostly and update often parts of the mem_cgroup_per_node structure. If CONFIG_MEMCG_V1 is not set and these fields are not present, an explicit cacheline padding is needed. Link: https://lkml.kernel.org/r/20240701185932.704807-2-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Suggested-by: Shakeel Butt Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 9fa001cf3bb0598aad09d15b2896f7db9ef87637 Author: Roman Gushchin Date: Mon Jul 1 18:59:31 2024 +0000 mm: memcg: drop obsolete cache line padding in struct mem_cgroup After the grouping of the cgroup v1-related fields and the corresponding reorganization of the struct mem_cgroup, the existing cache line padding doesn't make much sense anymore. Let's drop it for now and put back to new places, if necessary. Link: https://lkml.kernel.org/r/20240701185932.704807-1-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Suggested-by: Shakeel Butt Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit f6a6de245fdb1dfb4307b0a80ce7fa35ba2c35a6 Author: SeongJae Park Date: Mon Jul 1 12:27:06 2024 -0700 Docs/mm/damon/index: add links to admin-guide doc Readers of DAMON subsystem documents index would want to further learn how they can use DAMON from the user-space. Add the link to the admin guide. Link: https://lkml.kernel.org/r/20240701192706.51415-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 5fb9f0448fd9888e276fa5872fc37f27ae3f8acc Author: SeongJae Park Date: Mon Jul 1 12:27:05 2024 -0700 Docs/mm/damon/index: add links to design DAMON subsystem documents index page provides a short intro of DAMON core concepts. Add links to sections of the design document to let users easily browse to the details. Link: https://lkml.kernel.org/r/20240701192706.51415-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit d31f5626a0e11eea6f12c72970d550d4837bbdfe Author: SeongJae Park Date: Mon Jul 1 12:27:04 2024 -0700 Docs/mm/damon/design: add links to sections of DAMON sysfs interface usage doc Readers of the design document would wonder how they can configure and use specific DAMON features. Add links to sections of DAMON sysfs interface usage document that provides the answers for easier browsing. Link: https://lkml.kernel.org/r/20240701192706.51415-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit ce15e8fe054cc5977ccb192d508e50ca4583cd1b Author: SeongJae Park Date: Mon Jul 1 12:27:03 2024 -0700 Docs/mm/damon/design: remove 'Programmable Modules' section in favor of 'Modules' section 'Programmable Modules' section provides high level descriptions of the DAMON API-based kernel modules layer. But 'Modules' section, which is at the end of the document, provides every detail about the layer including that of 'Programmable Modules' section. Since the brief summary of the layers at the beginning of the document has a link to the 'Modules' section, browsing to the section is not that difficult. Remove 'Programmable Modules' section in favor of 'Modules' section and reducing duplicates. Link: https://lkml.kernel.org/r/20240701192706.51415-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 92117a6e05f25cd87a01b20c841946d4b368e528 Author: SeongJae Park Date: Mon Jul 1 12:27:02 2024 -0700 Docs/mm/damon/design: move 'Configurable Operations Set' section into 'Operations Set Layer' section 'Configurable Operations Set' section is for providing a description of the pluggability of the operations set layer. Just after that, 'Operations Set Layer' section, which is dedicated for the entire things of the layer, follows. The layout is odd, and some descriptions are duplicated. Move 'Configurable Operations Set' section into 'Operations Set Layer' and re-write some of the detailed descriptions. Link: https://lkml.kernel.org/r/20240701192706.51415-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 316df988caf8cbb18a96ad7a02c9e65815acb059 Author: SeongJae Park Date: Mon Jul 1 12:27:01 2024 -0700 Docs/mm/damon/design: add links from overall architecture to sections of details DAMON design document briefly explains the overall layers architecture first, and then provides detailed explanations of each layer with dedicated sections. Letting readers go directly to the detailed sections for specific layers could help easy browsing of the not-very-short document. Add links from the overall summary to the sections of details. Link: https://lkml.kernel.org/r/20240701192706.51415-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 752f18b9d9c23791b0e9fc70054b972eb176796b Author: SeongJae Park Date: Mon Jul 1 12:27:00 2024 -0700 Docs/admin-guide/mm/damon/start: add access pattern snapshot example DAMON user-space tool (damo) provides access pattern snapshot feature, which is expected to be frequently used for real time access pattern analysis. The snapshot output is also showing what DAMON provides on its own, including the 'age' information. In contrast, the recorded access patterns, which is shown as an example usage on the quick start section, shows what users can make from what DAMON provided. It includes information that generated outside of DAMON and makes the 'age' concept bit unclear. Hence snapshot output is easier at understanding the raw realtime output of DAMON. Add the snapshot usage example on the quick start section. Link: https://lkml.kernel.org/r/20240701192706.51415-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 2081610d98abefdfbbcfd710d65309bccd2e2dfe Author: SeongJae Park Date: Mon Jul 1 12:26:59 2024 -0700 Docs/mm/damon/design: clarify regions merging operation DAMON design document is not explaining how min_nr_regions limit is kept, and what happens if the number of regions exceeds max_nr_regions. Add more clarification for those. Link: https://lkml.kernel.org/r/20240701192706.51415-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit efeacc2cb6b7a0f44757d7d50069189d592c2d5c Author: SeongJae Park Date: Mon Jul 1 12:26:58 2024 -0700 Docs/mm/damon/design: fix two typos Patch series "Docs/damon: minor fixups and improvements". Fixup typos, clarify regions merging operation design with recent change, add access pattern snapshot example use case, and improve readability of the design document and subsystem documents index by reorganizing/wordsmithing and adding links to other sections and/or documents for easy browsing. This patch (of 9): Fix two typos. The first one is just a simple typo: s/accurach/accuracy/ The second one is made by the author being out of their mind. 'Region Based Sampling' section of the doc is mistakenly calling the access frequency counter of region as 'nr_regions'. Fix it with the correct name, 'nr_accesses'. Link: https://lkml.kernel.org/r/20240701192706.51415-1-sj@kernel.org Link: https://lkml.kernel.org/r/20240701192706.51415-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 843a2e24c24c5311831860c6b78ceacdd4627000 Author: Bang Li Date: Fri Jun 28 11:23:27 2024 +0800 mm/shmem: fix input and output inconsistencies Commit 19eaf44954df ("mm: thp: support allocation of anonymous multi-size THP") added mTHP support for anonymous shmem. We can configure different policies through the multi-size THP sysfs interface for anonymous shmem. But when we configure the "advise" policy of /sys/kernel/mm/transparent_hugepage/hugepages-xxxkB/shmem_enabled, we cannot write the "advise", but write the "madvise", which is unreasonable. We should keep the output and input values consistent, which is more convenient for users. Link: https://lkml.kernel.org/r/20240628032327.16987-1-libang.li@antgroup.com Fixes: 61a57f1b1da9 ("mm: shmem: add multi-size THP sysfs interface for anonymous shmem") Signed-off-by: Bang Li Reviewed-by: Baolin Wang Cc: Bang Li Cc: David Hildenbrand Cc: Hugh Dickins Cc: Ryan Roberts Signed-off-by: Andrew Morton commit cc937dad85aea4ab9e4f9827d7ea55932c86906b Author: Edward Liaw Date: Tue Jun 25 22:34:45 2024 +0000 selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk Centralize the _GNU_SOURCE definition to CFLAGS in lib.mk. Remove redundant defines from Makefiles that import lib.mk. Convert any usage of "#define _GNU_SOURCE 1" to "#define _GNU_SOURCE". This uses the form "-D_GNU_SOURCE=", which is equivalent to "#define _GNU_SOURCE". Otherwise using "-D_GNU_SOURCE" is equivalent to "-D_GNU_SOURCE=1" and "#define _GNU_SOURCE 1", which is less commonly seen in source code and would require many changes in selftests to avoid redefinition warnings. Link: https://lkml.kernel.org/r/20240625223454.1586259-2-edliaw@google.com Signed-off-by: Edward Liaw Suggested-by: John Hubbard Acked-by: Shuah Khan Reviewed-by: Muhammad Usama Anjum Cc: Albert Ou Cc: André Almeida Cc: Darren Hart Cc: Dave Hansen Cc: Davidlohr Bueso Cc: David S. Miller Cc: Eric Dumazet Cc: Eric W. Biederman Cc: Fenghua Yu Cc: Ingo Molnar Cc: Jakub Kicinski Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Kees Cook Cc: Kevin Tian Cc: Palmer Dabbelt Cc: Paolo Abeni Cc: Paolo Bonzini Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Reinette Chatre Cc: Sean Christopherson Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 95139d9408453df05dc4dfde37a0eb70afae0f81 Author: Barry Song Date: Sat Jun 22 19:12:31 2024 +1200 tools/mm: introduce a tool to assess swap entry allocation for thp_swapout Both Ryan and Chris have been utilizing the small test program to aid in debugging and identifying issues with swap entry allocation. While a real or intricate workload might be more suitable for assessing the correctness and effectiveness of the swap allocation policy, a small test program presents a simpler means of understanding the problem and initially verifying the improvements being made. Let's endeavor to integrate it into tools/mm. Although it presently only accommodates 64KB and 4KB, I'm optimistic that we can expand its capabilities to support multiple sizes and simulate more complex systems in the future as required. Basically, we have 1. Use MADV_PAGEPUT for rapid swap-out, putting the swap allocation code under high exercise in a short time. 2. Use MADV_DONTNEED to simulate the behavior of libc and Java heap in freeing memory, as well as for munmap, app exits, or OOM killer scenarios. This ensures new mTHP is always generated, released or swapped out, similar to the behavior on a PC or Android phone where many applications are frequently started and terminated. 3. Swap in with or without the "-a" option to observe how fragments due to swap-in and the incoming swap-in of large folios will impact swap-out fallback. Due to 2, we ensure a certain proportion of mTHP. Similarly, because of 3, we maintain a certain proportion of small folios, as we don't support large folios swap-in, meaning any swap-in will immediately result in small folios. Therefore, with both 2 and 3, we automatically achieve a system containing both mTHP and small folios. Additionally, 1 provides the ability to continuously swap them out. We can also use "-s" to add a dedicated small folios memory area. [akpm@linux-foundation.org: thp_swap_allocator_test.c needs mman.h, per Kairui Song] Link: https://lkml.kernel.org/r/20240622071231.576056-2-21cnbao@gmail.com Signed-off-by: Barry Song Acked-by: Chris Li Tested-by: Chris Li Reviewed-by: Ryan Roberts Tested-by: Ryan Roberts Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kairui Song Cc: Kalesh Singh Signed-off-by: Andrew Morton commit ec5b8c76ab1c6d163762d60cfbedcd27e7527144 Merge: eeb23b54e447e 9004054b1629d Author: Martin KaFai Lau Date: Wed Jul 10 10:24:12 2024 -0700 Merge branch 'use network helpers, part 8' Geliang Tang says: ==================== v11: - new patches 2, 4, 6. - drop expect_errno from network_helper_opts as Eduard and Martin suggested. - drop sockmap_ktls patches from this set. v10: - a new patch 10 is added. - patches 1-6, 8-9 unchanged, only commit logs updated. - "err = -errno" is used in patches 7, 11, 12 to get the real error number before checking value of "err". v9: - new patches 5-7, new struct member expect_errno for network_helper_opts. - patches 1-4, 8-9 unchanged. - update patches 10-11 to make sure all tests pass. v8: - only patch 8 updated, to fix errors reported by CI. v7: - address Martin's comments in v6. (thanks) - use MAX(opts->backlog, 0) instead of opts->backlog. - use connect_to_fd_opts instead connect_to_fd. - more ASSERT_* to check errors. v6: - update patch 6 as Daniel suggested. (thanks) v5: - keep make_server and make_client as Eduard suggested. v4: - a new patch to use make_sockaddr in sockmap_ktls. - a new patch to close fd in error path in drop_on_reuseport. - drop make_server() in patch 7. - drop make_client() too in patch 9. v3: - a new patch to add backlog for network_helper_opts. - use start_server_str in sockmap_ktls now, not start_server. v2: - address Eduard's comments in v1. (thanks) - fix errors reported by CI. This patch set uses network helpers in sk_lookup, and drop the local helpers inetaddr_len() and make_socket(). ==================== Signed-off-by: Martin KaFai Lau commit 9004054b1629d481fedea2d92b880f79fc6fa81b Author: Geliang Tang Date: Tue Jul 9 17:16:22 2024 +0800 selftests/bpf: Use connect_fd_to_fd in sk_lookup This patch uses public helper connect_fd_to_fd() exported in network_helpers.h instead of using getsockname() + connect() in run_lookup_prog() in prog_tests/sk_lookup.c. This can simplify the code. Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/7077c277cde5a1864cdc244727162fb75c8bb9c5.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit d9810c43f660fd502c5003244a5e9c181aa7df99 Author: Geliang Tang Date: Tue Jul 9 17:16:21 2024 +0800 selftests/bpf: Use start_server_addr in sk_lookup This patch uses public helper start_server_addr() in udp_recv_send() in prog_tests/sk_lookup.c to simplify the code. And use ASSERT_OK_FD() to check fd returned by start_server_addr(). Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/f11cabfef4a2170ecb66a1e8e2e72116d8f621b3.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit 14fc6fcd35e7dde6d1de062b6711476b3050b22e Author: Geliang Tang Date: Tue Jul 9 17:16:20 2024 +0800 selftests/bpf: Use start_server_str in sk_lookup This patch uses public helper start_server_str() to simplify make_server() in prog_tests/sk_lookup.c. Add a callback setsockopts() to do all sockopts, set it to post_socket_cb pointer of struct network_helper_opts. And add a new struct cb_opts to save the data needed to pass to the callback. Then pass this network_helper_opts to start_server_str(). Also use ASSERT_OK_FD() to check fd returned by start_server_str(). Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/5981539f5591d2c4998c962ef2bf45f34c940548.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit adae187ebedcd95d02f045bc37dfecfd5b29434b Author: Geliang Tang Date: Tue Jul 9 17:16:19 2024 +0800 selftests/bpf: Close fd in error path in drop_on_reuseport In the error path when update_lookup_map() fails in drop_on_reuseport in prog_tests/sk_lookup.c, "server1", the fd of server 1, should be closed. This patch fixes this by using "goto close_srv1" lable instead of "detach" to close "server1" in this case. Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point") Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/86aed33b4b0ea3f04497c757845cff7e8e621a2d.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit 7046345d48adcc3f519e7b6192184f6049908bdb Author: Geliang Tang Date: Tue Jul 9 17:16:18 2024 +0800 selftests/bpf: Add ASSERT_OK_FD macro Add a new dedicated ASSERT macro ASSERT_OK_FD to test whether a socket FD is valid or not. It can be used to replace macros ASSERT_GT(fd, 0, ""), ASSERT_NEQ(fd, -1, "") or statements (fd < 0), (fd != -1). Suggested-by: Martin KaFai Lau Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/ded75be86ac630a3a5099739431854c1ec33f0ea.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit a3016a27cea8e6d10b200b9e19c19961c402d106 Author: Geliang Tang Date: Tue Jul 9 17:16:17 2024 +0800 selftests/bpf: Add backlog for network_helper_opts Some callers expect __start_server() helper to pass their own "backlog" value to listen() instead of the default of 1. So this patch adds struct member "backlog" for network_helper_opts to allow callers to set "backlog" value via start_server_str() helper. listen(fd, 0 /* backlog */) can be used to enforce syncookie. Meaning backlog 0 is a legit value. Using 0 as a default and changing it to 1 here is fine. It makes the test program easier to write for the common case. Enforcing syncookie mode by using backlog 0 is a niche use case but it should at least have a way for the caller to do that. Thus, -ve backlog value is used here for the syncookie use case. Please see the comment in network_helpers.h for the details. Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/1660229659b66eaad07aa2126e9c9fe217eba0dd.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit eeb23b54e447ea62b247d89681f0140abab00d7f Author: Alan Maguire Date: Wed Jul 10 16:00:51 2024 +0100 selftests/bpf: fix compilation failure when CONFIG_NF_FLOW_TABLE=m In many cases, kernel netfilter functionality is built as modules. If CONFIG_NF_FLOW_TABLE=m in particular, progs/xdp_flowtable.c (and hence selftests) will fail to compile, so add a ___local version of "struct flow_ports". Fixes: c77e572d3a8c ("selftests/bpf: Add selftest for bpf_xdp_flow_lookup kfunc") Signed-off-by: Alan Maguire Link: https://lore.kernel.org/r/20240710150051.192598-1-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov commit 0e2a9a03106cd5fa0dbc9047675e7645c55e2669 Author: Sibi Sankar Date: Wed Jun 12 18:10:53 2024 +0530 mailbox: Add support for QTI CPUCP mailbox controller Add support for CPUSS Control Processor (CPUCP) mailbox controller, this driver enables communication between AP and CPUCP by acting as a doorbell between them. Reviewed-by: Dmitry Baryshkov Signed-off-by: Sibi Sankar Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Jassi Brar commit 6e7c4cc55dbc461c08e00f0ef16867fe6bf014aa Author: Sibi Sankar Date: Wed Jun 12 18:10:52 2024 +0530 dt-bindings: mailbox: qcom: Add CPUCP mailbox controller bindings Add devicetree binding for CPUSS Control Processor (CPUCP) mailbox controller. Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Signed-off-by: Jassi Brar commit af5da7b0944c3616fa6add186043637092d94200 Author: Bartosz Golaszewski Date: Wed Jun 5 18:56:51 2024 +0200 dt-bindings: remoteproc: qcom,sa8775p-pas: Document the SA8775p ADSP, CDSP and GPDSP Document the components used to boot the ADSP, CDSP0, CDSP1, GPDSP0 and GPDSP1 on the SA8775p SoC. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 203e038d23c43e37f43e675e6cc7ac0e38ef939d Author: Jeff Johnson Date: Mon Jun 24 09:09:48 2024 -0700 mailbox: mtk-cmdq: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mailbox/mtk-cmdq-mailbox.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jeff Johnson Signed-off-by: Jassi Brar commit 63c31d4a9169fd4eebf08c259ba8688d15668ae5 Author: Dr. David Alan Gilbert Date: Thu May 23 21:37:41 2024 +0100 mailbox: bcm-pdc: remove unused struct 'pdc_dma_map' 'pdf_dma_map' has been unused since the original commit a24532f8d17b ("mailbox: Add Broadcom PDC mailbox driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Jassi Brar commit b5ef17917f3a797a7b12d1edd51f676554e44a07 Author: Peng Fan Date: Fri May 24 15:56:32 2024 +0800 mailbox: imx: fix TXDB_V2 channel race condition Two TXDB_V2 channels are used between Linux and System Manager(SM). Channel0 for normal TX, Channel 1 for notification completion. The TXDB_V2 trigger logic is using imx_mu_xcr_rmw which uses read/modify/update logic. Note: clear MUB GSR BITs, the MUA side GCR BITs will also got cleared per hardware design. Channel0 Linux read GCR->modify GCR->write GCR->M33 SM->read GSR----->clear GSR |-(1)-| Channel1 Linux start in time slot(1) read GCR->modify GCR->write GCR->M33 SM->read GSR->clear GSR So Channel1 read GCR will read back the GCR that Channel0 wrote, because M33 has not finish clear GSR, this means Channel1 GCR writing will trigger Channel1 and Channel0 interrupt both which is wrong. Channel0 will be freed(SCMI channel status set to FREE) in M33 SM when processing the 1st Channel0 interrupt. So when 2nd interrupt trigger (channel 0/1 trigger together), SM will see a freed Channel0, and report protocol error. To address the issue, not using read/modify/update logic, just use write, because write 0 to GCR will be ignored. And after write MUA GCR, wait the SM to clear MUB GSR by looping MUA GCR value. Fixes: 5bfe4067d350 ("mailbox: imx: support channel type tx doorbell v2") Reviewed-by: Ranjani Vaidyanathan Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 0a02bc0a34cd53c7fe5bf4bae6efb56ad47677fa Author: Andrew Davis Date: Tue Jun 11 12:04:56 2024 -0500 mailbox: omap: Fix mailbox interrupt sharing Multiple mailbox users can share one interrupt line. This flag was mistakenly dropped as part of the FIFO removal. Mark the IRQ as shared. Reported-by: Beleswar Padhi Fixes: 3f58c1f4206f ("mailbox: omap: Remove kernel FIFO message queuing") Signed-off-by: Andrew Davis Tested-by: Beleswar Padhi Signed-off-by: Jassi Brar commit aa1609f571caba0db102c611829d48adf226bb70 Author: AngeloGioacchino Del Regno Date: Thu Jun 20 12:07:49 2024 +0200 mailbox: mtk-cmdq: Dynamically allocate clk_bulk_data structure Now that the clock probing code uses devm_kasprintf(), there is no more restriction on the number of GCEs: dynamically allocate the clk_bulk_data clocks array to improve flexibility and also to get a slight memory saving on platforms featuring only one CMDQ mailbox (and consequently only one Global Command Engine). Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit 0af932c5fc44d2709c9f87a15bcd6cd376901e23 Author: AngeloGioacchino Del Regno Date: Thu Jun 20 12:07:48 2024 +0200 mailbox: mtk-cmdq: Move and partially refactor clocks probe Move the clocks probe to a new cmdq_get_clocks() function; while at it, partially refactor the code: Drop the clk_names[] array and assign clock names to the array of clk_bulk_data with devm_kasprintf() instead, slightly reduce the indentation for the multi-gce clock probe path and add a comment describing the reason why we get clocks of other GCE instance instead of just the clock from the one that it is getting probed. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit db9344804cfa7ceca17aab71a3130736a7a2ac9d Author: AngeloGioacchino Del Regno Date: Thu Jun 20 12:07:47 2024 +0200 mailbox: mtk-cmdq: Stop requiring name for GCE clock The Global Command Engine mailbox has only one clock hence requiring clock-names is useless. Get the first (and only) clock instead, without name checks. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit d1368f62a8dca89ce55ca1a7568ca273f50d60e4 Author: Jason-JH.Lin Date: Wed Jan 24 09:14:57 2024 +0800 dt-bindings: mailbox: Add mediatek,gce-props.yaml Add mediatek,gce-props.yaml for common GCE properties that is used for both mailbox providers and consumers. We place the common property "mediatek,gce-events" in this binding currently. The property "mediatek,gce-events" is used for GCE event ID corresponding to a hardware event signal sent by the hardware or a software driver. If the mailbox providers or consumers want to manipulate the value of the event ID, they need to know the specific event ID. Signed-off-by: Jason-JH.Lin Reviewed-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit e4b5a39c2fca597f10f1aa4c12f8f90dcd9431bd Author: Javier Carrasco Date: Fri Jul 5 08:05:18 2024 +0200 bus: sunxi-rsb: Constify struct regmap_bus `regmap_sunxi_rsb` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240705-sunxi-rsb-bus-const-regmap_bus-v1-1-129094960ce9@gmail.com Signed-off-by: Chen-Yu Tsai commit 022ec3b59c01a2bb6949fe61a5ef340c88b905bf Author: Claudiu Beznea Date: Fri May 31 09:57:23 2024 +0300 dt-bindings: watchdog: renesas,wdt: Document RZ/G3S support Document the support for the watchdog IP available on RZ/G3S SoC. The watchdog IP available on RZ/G3S SoC is identical to the one found on RZ/G2L SoC. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-10-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0aad7c4438b2e87359cd7b42c3e11b17f477ab8f Author: Claudiu Beznea Date: Fri May 31 09:57:22 2024 +0300 watchdog: rzg2l_wdt: Add suspend/resume support The RZ/G3S supports deep sleep states where power to most of the IP blocks is cut off. To ensure proper working of the watchdog when resuming from such states, the suspend function is stopping the watchdog and the resume function is starting it. There is no need to configure the watchdog in case the watchdog was stopped prior to starting suspend. Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-9-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d8997ed79ed7c7c32b2ae571e0d99a58bbfd01fe Author: Claudiu Beznea Date: Fri May 31 09:57:21 2024 +0300 watchdog: rzg2l_wdt: Rely on the reset driver for doing proper reset The reset driver has been adapted in commit da235d2fac21 ("clk: renesas: rzg2l: Check reset monitor registers") to check the reset monitor bits before declaring reset asserts/de-asserts as successful/failure operations. With that, there is no need to keep the reset workaround for RZ/V2M in place in the watchdog driver. Signed-off-by: Claudiu Beznea Reviewed-by: Philipp Zabel Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-8-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 900b938335f7fbd401dcba14c8069dbf38ed1f28 Author: Claudiu Beznea Date: Fri May 31 09:57:20 2024 +0300 watchdog: rzg2l_wdt: Remove comparison with zero devm_add_action_or_reset() could return -ENOMEM or zero. Thus, remove comparison with zero of the returning value to make code simpler. Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-7-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 064319c3fac88e04f53f3460cd24ae90de2d9fb6 Author: Claudiu Beznea Date: Fri May 31 09:57:19 2024 +0300 watchdog: rzg2l_wdt: Remove reset de-assert from probe There is no need to de-assert the reset signal on probe as the watchdog is not used prior executing start. Also, the clocks are not enabled in probe (pm_runtime_enable() doesn't do that), thus this is another indicator that the watchdog wasn't used previously like this. Instead, keep the watchdog hardware in its previous state at probe (by default it is in reset state), enable it when it is started and move it to reset state when it is stopped. This saves some extra power when the watchdog is unused. Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 471e45a33302852bf79bc140fe418782f50734f6 Author: Claudiu Beznea Date: Fri May 31 09:57:18 2024 +0300 watchdog: rzg2l_wdt: Check return status of pm_runtime_put() pm_runtime_put() may return an error code. Check its return status. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_stop() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f0ba0fcdd19943809b1a7f760f77f6673c6aa7f7 Author: Claudiu Beznea Date: Fri May 31 09:57:17 2024 +0300 watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get() pm_runtime_get_sync() may return with error. In case it returns with error dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get() takes care of this. Thus use it. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_start() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9e69846c68f5489e9a3d7375215beb1842ef89e1 Author: Claudiu Beznea Date: Fri May 31 09:57:16 2024 +0300 watchdog: rzg2l_wdt: Make the driver depend on PM The rzg2l_wdt watchdog driver cannot work w/o CONFIG_PM=y (e.g. the clocks are enabled though pm_runtime_* specific APIs). To avoid building a driver that doesn't work make explicit the dependency on CONFIG_PM. Suggested-by: Guenter Roeck Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5e7069f296fb681111388bc69b9950afb552e722 Author: Claudiu Beznea Date: Fri May 31 09:57:15 2024 +0300 watchdog: rzg2l_wdt: Restrict the driver to ARCH_RZG2L and ARCH_R9A09G011 The rzg2l_wdt driver is used only by ARCH_RZG2L and ARCH_R9A09G011 micro-architectures of Renesas. Thus, limit it's usage only to these. Suggested-by: Biju Das Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b771d14f417e9d8030ab000b3341cf71266be90e Author: Sascha Hauer Date: Wed Jul 3 13:16:03 2024 +0200 watchdog: imx7ulp_wdt: keep already running watchdog enabled When the bootloader enabled the watchdog before Kernel started then keep it enabled during initialization. Otherwise the time between the watchdog probing and the userspace taking over the watchdog won't be covered by the watchdog. When keeping the watchdog enabled inform the Kernel about this by setting the WDOG_HW_RUNNING so that the periodic watchdog feeder is started when desired. Signed-off-by: Sascha Hauer Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240703111603.1096424-1-s.hauer@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9dca7a0ae50c9cff5c510aeb6587f92e530fd1fe Author: Chen Ni Date: Fri Jun 28 11:35:08 2024 +0800 watchdog: starfive: Add missing clk_disable_unprepare() Add the missing clk_disable_unprepare() before return in starfive_wdt_enable_clock(). Signed-off-by: Chen Ni Reviewed-by: Xingyu Wu Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240628033508.281058-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d794a7410177f05b05232fc8cac46db196eafb00 Author: Thomas Weißschuh Date: Fri Jun 14 00:57:22 2024 +0200 watchdog: Make watchdog_class const Now that the driver core allows for struct class to be in read-only memory, mark watchdog_class as const. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240614-class-const-wdt-v1-1-f9a4e2b1ba76@weissschuh.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 275d05ce0680949085622bf38a365efcdd34fe11 Author: Claudio Imbrenda Date: Wed Jul 3 17:59:00 2024 +0200 s390/kvm: Move bitfields for dat tables Move and improve the struct definitions for DAT tables from gaccess.c to a new header. Once in a separate header, the structs become available everywhere. One possible usecase is to merge them in the s390 pte_t and p?d_t definitions, which is left as an exercise for the reader. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20240703155900.103783-3-imbrenda@linux.ibm.com Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 723ac2d6ba77be712b165b710c60adda6e657c9e Author: Claudio Imbrenda Date: Wed Jul 3 17:58:59 2024 +0200 s390/entry: Pass the asce as parameter to sie64a() Pass the guest ASCE explicitly as parameter, instead of having sie64a() take it from lowcore. This removes hidden state from lowcore, and makes things look cleaner. Signed-off-by: Claudio Imbrenda Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20240703155900.103783-2-imbrenda@linux.ibm.com Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b7a5e5dfbd68050e8582e901f397dc75451bb877 Author: Mete Durlu Date: Thu Jul 4 14:10:10 2024 +0200 s390/sthyi: Use cached data when diag is busy When sthyi is being emulated, data from diag204 is used. If diag204 returns busy, previously cached sthyi info block is returned to the caller and cache expiry is set to expired. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit 6fdf72c9a9f614115ac7f2889c1018bbff1af9b3 Author: Mete Durlu Date: Thu Jul 4 14:10:09 2024 +0200 s390/sthyi: Move diag operations Move diag204 related operations to their own functions for better error handling and better readability. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit f4493954215ceb8b22aca3ee6b10c6172f20a9fc Author: Mete Durlu Date: Thu Jul 4 14:10:08 2024 +0200 s390/hypfs_diag: Diag204 busy loop When diag204 busy-indiciation facility is installed and diag204 is returning busy, hypfs diag204 handler now does an interruptable busy wait until diag204 is no longer busy. If there is a signal pending, call would be restarted with -ERESTARTSYSCALL, except for fatal signals. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit 97999f8c62a43cf2af5d725b045b82f9b47d83ea Author: Mete Durlu Date: Thu Jul 4 14:10:07 2024 +0200 s390/diag: Add busy-indication-facility requirements To verify if busy indication facility is installed or not sclp bits has to be checked. Add a function that checks sclp to improve readability. Add busy-indication-request bit mask for diag204 subcodes. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit df7e714d6d6ca7921be2e5c7d599d9b4aa96d682 Author: Mete Durlu Date: Thu Jul 4 14:10:06 2024 +0200 s390/diag: Diag204 add busy return errno When diag204-busy-indication facility is installed, diag204 can return '8' which means device is busy and no operation is done. Add check for return codes of diag204 call. Return error codes according to diag204 return codes. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit bb9be93acb7e6a0fa78919d30e68410c401fe690 Author: Mete Durlu Date: Thu Jul 4 14:10:05 2024 +0200 s390/diag: Return errno's from diag204 Return different errno's from diag204 to allow users to handle them accordingly. Instead of returning -1 regardless of the failing condition, return -EINVAL on invalid memory address and -EOPNOTSUPP when diag instruction fails. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit 7455a33179e65267cd7c8910050b6f0be3ff6b83 Author: Mete Durlu Date: Thu Jul 4 14:10:04 2024 +0200 s390/sclp: Diag204 busy indication facility detection Detect diag204 busy indication facility. Acked-by: Heiko Carstens Reviewed-by: Tobias Huschle Signed-off-by: Mete Durlu Signed-off-by: Vasily Gorbik commit 279a0164e001a87aa7b9852969ed333c3c69b3aa Author: Heiko Carstens Date: Mon Jul 1 17:04:58 2024 +0200 s390/atomic_ops: Make use of flag output constraint With gcc 14.1.0 support for flag output constraint was added for s390. Use this for __atomic_cmpxchg_bool(). This allows for slightly better code, since the compiler can generate code depending on the condition code which is the result of an inline assembly. The size of the kernel image is reduced by ~12kb. Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ee19370c92f6db4e92e060b5e0c2aa99e4f85408 Author: Heiko Carstens Date: Mon Jul 1 17:04:57 2024 +0200 s390/atomic_ops: Improve __atomic_set() for small values Use mvhi/mvghi for small constant values within the __atomic_set() inline assemblies. This avoids loading the specified value into a register. The size of the kernel image is reduced by ~1.2kb. Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f2ed8367bfa55a2ad3adfe7a59b79b82905df740 Author: Heiko Carstens Date: Mon Jul 1 17:04:56 2024 +0200 s390/atomic_ops: Use symbolic names Consistently use symbolic names in all atomic ops inline assemblies. Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4a39f12e753d35682a473b2edb4581b65b958d92 Author: Sven Schnelle Date: Wed Jul 3 10:11:59 2024 +0200 s390/smp: Switch to GENERIC_CPU_DEVICES Instead of setting up non-boot CPUs early in architecture code, only setup the cpu present mask and let the generic code handle cpu bringup. Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 74d1412ac8f3719bc8dd08b5775276dd1cbc3997 Author: Alexander Lobakin Date: Thu Jun 20 15:53:47 2024 +0200 idpf: use libeth Rx buffer management for payload buffer idpf uses Page Pool for data buffers with hardcoded buffer lengths of 4k for "classic" buffers and 2k for "short" ones. This is not flexible and does not ensure optimal memory usage. Why would you need 4k buffers when the MTU is 1500? Use libeth for the data buffers and don't hardcode any buffer sizes. Let them be calculated from the MTU for "classics" and then divide the truesize by 2 for "short" ones. The memory usage is now greatly reduced and 2 buffer queues starts make sense: on frames <= 1024, you'll recycle (and resync) a page only after 4 HW writes rather than two. Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 90912f9f4f2d159e93cf9a4c732506342489a1d5 Author: Alexander Lobakin Date: Thu Jun 20 15:53:46 2024 +0200 idpf: convert header split mode to libeth + napi_build_skb() Currently, idpf uses the following model for the header buffers: * buffers are allocated via dma_alloc_coherent(); * when receiving, napi_alloc_skb() is called and then the header is copied to the newly allocated linear part. This is far from optimal as DMA coherent zone is slow on many systems and memcpy() neutralizes the idea and benefits of the header split. Not speaking of that XDP can't be run on DMA coherent buffers, but at the same time the idea of allocating an skb to run XDP program is ill. Instead, use libeth to create page_pools for the header buffers, allocate them dynamically and then build an skb via napi_build_skb() around them with no memory copy. With one exception... When you enable header split, you expect you'll always have a separate header buffer, so that you could reserve headroom and tailroom only there and then use full buffers for the data. For example, this is how TCP zerocopy works -- you have to have the payload aligned to PAGE_SIZE. The current hardware running idpf does *not* guarantee that you'll always have headers placed separately. For example, on my setup, even ICMP packets are written as one piece to the data buffers. You can't build a valid skb around a data buffer in this case. To not complicate things and not lose TCP zerocopy etc., when such thing happens, use the empty header buffer and pull either full frame (if it's short) or the Ethernet header there and build an skb around it. GRO layer will pull more from the data buffer later. This W/A will hopefully be removed one day. Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 5aaac1aece4e4db9d620791a33f7a4173c660e65 Author: Alexander Lobakin Date: Thu Jun 20 15:53:45 2024 +0200 libeth: support different types of buffers for Rx Unlike previous generations, idpf requires more buffer types for optimal performance. This includes: header buffers, short buffers, and no-overhead buffers (w/o headroom and tailroom, for TCP zerocopy when the header split is enabled). Introduce libeth Rx buffer type and calculate page_pool params accordingly. All the HW-related details like buffer alignment are still accounted. For the header buffers, pick 256 bytes as in most places in the kernel (have you ever seen frames with bigger headers?). Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 8030f6533ef0a40a81ab6113aa6a0ab6a8e981c4 Author: Alex Deucher Date: Mon Apr 29 18:11:11 2024 -0400 drm/amdgpu: remove exp hw support check for gfx12 Enable it by default. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3c1ff93b4deea502cd8b0869839557cab2a28b71 Author: Guenter Roeck Date: Tue Jul 9 18:56:20 2024 -0700 regmap: Implement regmap_multi_reg_read() regmap_multi_reg_read() is similar to regmap_bilk_read() but reads from an array of non-sequential registers. Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20240710015622.1960522-2-linux@roeck-us.net Signed-off-by: Mark Brown commit 0d1ebba74fad7b6b3eb0e2bc08d649d20c7aa7c9 Author: Paul Handrigan Date: Wed Jul 10 11:04:16 2024 -0500 ASoC: cs530x: Remove bclk from private structure Remove the bclk int from the private structure and pass it into the set_bclk function. Signed-off-by: Paul Handrigan Link: https://lore.kernel.org/r/20240710160416.2617173-2-paulha@opensource.cirrus.com Signed-off-by: Mark Brown commit c62bec0fe36873ab6c87c9ae84a6b661d09244c4 Author: Paul Handrigan Date: Wed Jul 10 11:04:15 2024 -0500 ASoC: cs530x: Calculate proper bclk rate using TDM Calculate the proper bclk rate using the number of tdm slots and the width of the tdm data. Fixes: 2884c29152c0 ("ASoC: cs530x: Support for cs530x ADCs") Signed-off-by: Paul Handrigan Link: https://lore.kernel.org/r/20240710160416.2617173-1-paulha@opensource.cirrus.com Signed-off-by: Mark Brown commit e021e0eecba99d7ec68f6e7972a72175f54ff6e3 Author: Animesh Agarwal Date: Wed Jul 10 00:12:25 2024 +0530 ASoC: dt-bindings: cirrus,cs4270: Convert to dtschema Convert the Cirrus Logic CS4270 audio CODEC bindings to DT schema. Add missing va-supply, vd-supply and vlc-supply properties, because they are already being used in the DTS and the driver for this device. Cc: Daniel Baluta Signed-off-by: Animesh Agarwal Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240709184231.125207-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit dc0e5ca8856dc6a97e3b117879dfb2b52bda06b6 Author: Richard Fitzgerald Date: Wed Jul 10 11:36:40 2024 +0100 firmware: cs_dsp: Rename fw_ver to wmfw_ver Rename the confusingly named struct member fw_ver to wmfw_ver. It contains the wmfw format version of the loaded wmfw file. This commit also contains an update to wm_adsp for the new name. Signed-off-by: Richard Fitzgerald Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240710103640.78197-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit a4939119055d5c97aff2cea040f1af8c4606bfa1 Author: Richard Fitzgerald Date: Wed Jul 10 11:36:39 2024 +0100 firmware: cs_dsp: Clarify wmfw format version log message Change the log message of the wmfw format version to include the file name, and change the message to say "format" instead of "Firmware version". Merge this with the message that logs the timestamp. The wmfw format version is information that is useful to have logged because the behaviour of firmware controls depends on the wmfw format. So "unexpected" behaviour could be caused by having expectations based on one format of wmfw when a different format has been loaded. But the original message was confusing. It reported the file format version but didn't actually log the name of the file it referred to. It also called it "Firmware version", which is confusing when a later message also logs a firmware version that is the version of the actual firmware within the wmfw. The logging of the firmware timestamp has been merged into this. That was originally a dbg-only message, but as we are already logging a line of info, we might as well add a few extra characters to log the timestamp. The timestamp is now logged in hexadecimal - it's not particularly useful as a decimal value. Signed-off-by: Richard Fitzgerald Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240710103640.78197-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 584e86e14c59d36688633002613792923620d8c0 Author: Richard Fitzgerald Date: Wed Jul 10 11:36:38 2024 +0100 firmware: cs_dsp: Make wmfw and bin filename arguments const char * The wmfw_filename and bin_filename strings passed into cs_dsp_power_up() and cs_dsp_adsp1_power_up() should be const char *. Signed-off-by: Richard Fitzgerald Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240710103640.78197-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit bff92858dfb9897e4c06c11aab0322e1aab822f7 Author: Richard Fitzgerald Date: Wed Jul 10 11:36:37 2024 +0100 firmware: cs_dsp: Don't allocate temporary buffer for info text Don't allocate a temporary buffer to hold a NUL-terminated copy of the NAME/INFO string from the wmfw/bin. It can be printed directly to the log. Also limit the maximum number of characters that will be logged from this string. The NAME/INFO blocks in the firmware files are an array of characters with a length, not a NUL-terminated C string. The original code allocated a temporary buffer to make a NUL-terminated copy of the string and then passed that to dev_info(). There's no need for this: printf formatting can use "%.*s" to print a character array of a given length. Signed-off-by: Richard Fitzgerald Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240710103640.78197-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 4309363f19598999b25a1e55fccf688daa4cc220 Author: Alexander Lobakin Date: Thu Jun 20 15:53:44 2024 +0200 idpf: remove legacy Page Pool Ethtool stats Page Pool Ethtool stats are deprecated since the Netlink Page Pool interface introduction. idpf receives big changes in Rx buffer management, including &page_pool layout, so keeping these deprecated stats does only harm, not speaking of that CONFIG_IDPF selects CONFIG_PAGE_POOL_STATS unconditionally, while the latter is often turned off for better performance. Remove all the references to PP stats from the Ethtool code. The stats are still available in their full via the generic Netlink interface. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 1b1b26208515482d8bc3d875267076f61f3355f7 Author: Alexander Lobakin Date: Thu Jun 20 15:53:43 2024 +0200 idpf: reuse libeth's definitions of parsed ptype structures idpf's in-kernel parsed ptype structure is almost identical to the one used in the previous Intel drivers, which means it can be converted to use libeth's definitions and even helpers. The only difference is that it doesn't use a constant table (libie), rather than one obtained from the device. Remove the driver counterpart and use libeth's helpers for hashes and checksums. This slightly optimizes skb fields processing due to faster checks. Also don't define big static array of ptypes in &idpf_vport -- allocate them dynamically. The pointer to it is anyway cached in &idpf_rx_queue. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 3cbda25e2db28b4352c73d4167f0dab10049ea54 Author: Rayyan Ansari Date: Wed Jul 10 12:36:08 2024 +0100 ASoC: dt-bindings: qcom,apq8096-sndcard: use dtschema Remove old txt bindings and add apq8096 soundcard entry to existing dt schema. Signed-off-by: Rayyan Ansari Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240710113833.39859-4-rayyan.ansari@linaro.org Signed-off-by: Mark Brown commit 054ac9c97c7d9eb55f471fc6f019b654d17332a7 Author: Rayyan Ansari Date: Wed Jul 10 12:36:06 2024 +0100 ASoC: dt-bindings: qcom,msm8916-wcd-digital-codec: convert to dtschema Convert the Qualcomm MSM8916 WCD Digital Audio Codec bindings from text to yaml dt schema format. Make bindings complete by adding #sound-dai-cells. Signed-off-by: Rayyan Ansari Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240710113833.39859-2-rayyan.ansari@linaro.org Signed-off-by: Mark Brown commit f771314d6b75181de7079c3c7d666293e4ed2b22 Author: Alexander Lobakin Date: Thu Jun 20 15:53:42 2024 +0200 idpf: compile singleq code only under default-n CONFIG_IDPF_SINGLEQ Currently, all HW supporting idpf supports the singleq model, but none of it advertises it by default, as splitq is supported and preferred for multiple reasons. Still, this almost dead code often times adds hotpath branches and redundant cacheline accesses. While it can't currently be removed, add CONFIG_IDPF_SINGLEQ and build the singleq code only when it's enabled manually. This corresponds to -10 Kb of object code size and a good bunch of hotpath checks. idpf_is_queue_model_split() works as a gate and compiles out to `true` when the config option is disabled. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 14f662b43bf8c765114f73d184af2702b2280436 Author: Alexander Lobakin Date: Thu Jun 20 15:53:41 2024 +0200 idpf: merge singleq and splitq &net_device_ops It makes no sense to have a second &net_device_ops struct (800 bytes of rodata) with only one difference in .ndo_start_xmit, which can easily be just one `if`. This `if` is a drop in the ocean and you won't see any difference. Define unified idpf_xmit_start(). The preparation for sending is the same, just call either idpf_tx_splitq_frame() or idpf_tx_singleq_frame() depending on the active model to actually map and send the skb. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 5a816aae2d463d74882e21672ac5366573b0c511 Author: Alexander Lobakin Date: Thu Jun 20 15:53:40 2024 +0200 idpf: strictly assert cachelines of queue and queue vector structures Now that the queue and queue vector structures are separated and laid out optimally, group the fields as read-mostly, read-write, and cold cachelines and add size assertions to make sure new features won't push something out of its place and provoke perf regression. Despite looking innocent, this gives up to 2% of perf bump on Rx. Reviewed-by: Przemek Kitszel Reviewed-by: Jacob Keller Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit bf9bf7042a38ebd2485592467772db50605bd4a2 Author: Alexander Lobakin Date: Thu Jun 20 15:53:39 2024 +0200 idpf: avoid bloating &idpf_q_vector with big %NR_CPUS With CONFIG_MAXSMP, sizeof(cpumask_t) is 1 Kb. The queue vector structure has them embedded, which means 1 additional Kb of not really hotpath data. We have cpumask_var_t, which is either an embedded cpumask or a pointer for allocating it dynamically when it's big. Use it instead of plain cpumasks and put &idpf_q_vector on a good diet. Also remove redundant pointer to the interrupt name from the structure. request_irq() saves it and free_irq() returns it on deinit, so that you can free the memory. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit e4891e4687c8dd136d80d6c1b857a02931ed6fc8 Author: Alexander Lobakin Date: Thu Jun 20 15:53:38 2024 +0200 idpf: split &idpf_queue into 4 strictly-typed queue structures Currently, sizeof(struct idpf_queue) is 32 Kb. This is due to the 12-bit hashtable declaration at the end of the queue. This HT is needed only for Tx queues when the flow scheduling mode is enabled. But &idpf_queue is unified for all of the queue types, provoking excessive memory usage. The unified structure in general makes the code less effective via suboptimal fields placement. You can't avoid that unless you make unions each 2 fields. Even then, different field alignment etc., doesn't allow you to optimize things to the limit. Split &idpf_queue into 4 structures corresponding to the queue types: RQ (Rx queue), SQ (Tx queue), FQ (buffer queue), and CQ (completion queue). Place only needed fields there and shortcuts handy for hotpath. Allocate the abovementioned hashtable dynamically and only when needed, keeping &idpf_tx_queue relatively short (192 bytes, same as Rx). This HT is used only for OOO completions, which aren't really hotpath anyway. Note that this change must be done atomically, otherwise it's really easy to get lost and miss something. Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 66c27e3b19d5aae58d7f0145113de61d6fba5e09 Author: Alexander Lobakin Date: Thu Jun 20 15:53:37 2024 +0200 idpf: stop using macros for accessing queue descriptors In C, we have structures and unions. Casting `void *` via macros is not only error-prone, but also looks confusing and awful in general. In preparation for splitting the queue structs, replace it with a union and direct array dereferences. Reviewed-by: Przemek Kitszel Reviewed-by: Mina Almasry Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 62c884256ea1f898b00f20729a306a4eeb1840b1 Author: Alexander Lobakin Date: Thu Jun 20 15:53:36 2024 +0200 libeth: add cacheline / struct layout assertion helpers Add helpers to assert struct field layout, a bit more crazy and networking-specific than in . They assume you have 3 CL-aligned groups (read-mostly, read-write, cold) in a struct you want to assert, and nothing besides them. For 64-bit with 64-byte cachelines, the assertions are as strict as possible, as the size can then be easily predicted. For the rest, make sure they don't cross the specified bound. Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 39daa09d34ada1bc7227d68def63e0a2105b5496 Author: Alexander Lobakin Date: Thu Jun 20 15:53:35 2024 +0200 page_pool: use __cacheline_group_{begin, end}_aligned() Instead of doing __cacheline_group_begin() __aligned(), use the new __cacheline_group_{begin,end}_aligned(), so that it will take care of the group alignment itself. Also replace open-coded `4 * sizeof(long)` in two places with a definition. Signed-off-by: Alexander Lobakin Signed-off-by: Tony Nguyen commit 7f296b25f2a6453bf052b03ed0676a18bee312a5 Author: Christoph Hellwig Date: Fri Jul 5 07:38:38 2024 +0200 nfs: remove nfs_page_length The nfs_page_length is not used anywhere, remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit b1043a3304d24e1be39e18dcb3fdee5220561ef1 Author: Christoph Hellwig Date: Fri Jul 5 15:32:59 2024 +0200 nfs: remove the unused max_deviceinfo_size field from struct pnfs_layoutdriver_type max_deviceinfo_size is not set anywhere, remove it. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 2cb13dec8c5e5e104fd2f71c2dee761d6ed9a333 Author: Alexander Lobakin Date: Thu Jun 20 15:53:34 2024 +0200 cache: add __cacheline_group_{begin, end}_aligned() (+ couple more) __cacheline_group_begin(), unfortunately, doesn't align the group anyhow. If it is wanted, then you need to do something like __cacheline_group_begin(grp) __aligned(ALIGN) which isn't really convenient nor compact. Add the _aligned() counterparts to align the groups automatically to either the specified alignment (optional) or ``SMP_CACHE_BYTES``. Note that the actual struct layout will then be (on x64 with 64-byte CL): struct x { u32 y; // offset 0, size 4, padding 56 __cacheline_group_begin__grp; // offset 64, size 0 u32 z; // offset 64, size 4, padding 4 __cacheline_group_end__grp; // offset 72, size 0 __cacheline_group_pad__grp; // offset 72, size 0, padding 56 u32 w; // offset 128 }; The end marker is aligned to long, so that you can assert the struct size more strictly, but the offset of the next field in the structure will be aligned to the group alignment, so that the next field won't fall into the group it's not intended to. Add __LARGEST_ALIGN definition and LARGEST_ALIGN() macro. __LARGEST_ALIGN is the value to which the compilers align fields when __aligned_largest is specified. Sometimes, it might be needed to get this value outside of variable definitions. LARGEST_ALIGN() is macro which just aligns a value to __LARGEST_ALIGN. Also add SMP_CACHE_ALIGN(), similar to L1_CACHE_ALIGN(), but using ``SMP_CACHE_BYTES`` instead of ``L1_CACHE_BYTES`` as the former also accounts L2, needed in some cases. Signed-off-by: Alexander Lobakin Reviewed-by: Przemek Kitszel Signed-off-by: Tony Nguyen commit c13fda93aca118b8e5cd202e339046728ee7dddb Author: Sebastian Andrzej Siewior Date: Wed Jul 10 16:16:31 2024 +0200 bpf: Remove tst_run from lwt_seg6local_prog_ops. The syzbot reported that the lwt_seg6 related BPF ops can be invoked via bpf_test_run() without without entering input_action_end_bpf() first. Martin KaFai Lau said that self test for BPF_PROG_TYPE_LWT_SEG6LOCAL probably didn't work since it was introduced in commit 04d4b274e2a ("ipv6: sr: Add seg6local action End.BPF"). The reason is that the per-CPU variable seg6_bpf_srh_states::srh is never assigned in the self test case but each BPF function expects it. Remove test_run for BPF_PROG_TYPE_LWT_SEG6LOCAL. Suggested-by: Martin KaFai Lau Reported-by: syzbot+608a2acde8c5a101d07d@syzkaller.appspotmail.com Fixes: d1542d4ae4df ("seg6: Use nested-BH locking for seg6_bpf_srh_states.") Fixes: 004d4b274e2a ("ipv6: sr: Add seg6local action End.BPF") Signed-off-by: Sebastian Andrzej Siewior Acked-by: Daniel Borkmann Link: https://lore.kernel.org/r/20240710141631.FbmHcQaX@linutronix.de Signed-off-by: Martin KaFai Lau commit 9bc1e34a7b0c91d790eab2db4eea05175d248c68 Author: Javier Carrasco Date: Fri Jul 5 12:52:27 2024 +0200 soc: sunxi: sram: Constify struct regmap_config `sunxi_sram_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20240705-sunxi-sram-const-regmap_config-v1-1-1b997cd65d0f@gmail.com Signed-off-by: Chen-Yu Tsai commit 6ed9a85f1c44d7049cf2d488bfe71252ce467dc2 Author: Andre Przywara Date: Tue Jun 25 00:21:10 2024 +0100 arm64: dts: allwinner: h616: add crypto engine node The Allwinner H616 SoC contains a crypto engine very similar to the H6 version, but with all base addresses in the DMA descriptors shifted by two bits. This requires a new compatible string. Also the H616 CE relies on the internal osciallator for the TRNG operation, so we need to reference this clock. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20240624232110.9817-5-andre.przywara@arm.com [wens@csie.org: fix up register range size] Signed-off-by: Chen-Yu Tsai commit c9a787b9456066d4bd34522f880bd16208d775dd Author: Uwe Kleine-König Date: Tue Jul 9 11:22:21 2024 +0200 pwm: atmel-tcb: Make private data variable naming consistent Currently the variables of type struct atmel_tcb_pwm_device are named "tcbpwm", and variables of type atmel_tcb_pwm_chip are either named "tcbpwm" (too!) or "tcbpwmc". Rename the chips with device name to "tcbpwmc" to get a consistent naming. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20240709092221.47025-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit c1330cb9a56d42632b1af54cda374e01e39dcc59 Author: Uwe Kleine-König Date: Tue Jul 9 12:18:06 2024 +0200 pwm: atmel-tcb: Simplify checking the companion output The two outputs provided by the supported hardware share some settings, so access to the other PWM is required when one of them is configured. Instead of an explicit if to deterimine the other PWM just use hwpwm ^ 1. Further atcbpwm is never NULL, so drop the corresponding check. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20240709101806.52394-4-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 9dd42d019e6399e6e7d9e90759a61ff430625285 Author: Uwe Kleine-König Date: Fri Jun 28 12:35:19 2024 +0200 pwm: Allow pwm state transitions from an invalid state While driving a PWM via the sysfs API it's hard to determine the right order of writes to the pseudo files "period" and "duty_cycle": If you want to go from duty_cycle/period = 50/100 to 150/300 you have to write period first (because 150/100 is invalid). If however you start at 400/500 the duty_cycle must be configured first. The rule that works is: If you increase period write period first, otherwise write duty_cycle first. A complication however is that it's usually sensible to configure the polarity before both period and duty_cycle. This can only be done if the current state's duty_cycle and period configuration isn't bogus though. It is still worse (but I think only theoretic) if you have a PWM that only supports inverted polarity and you start with period = 0 and polarity = normal. Then you can change neither period (because polarity = normal is refused) nor polarity (because there is still period = 0). To simplify the corner cases for userspace, let invalid target states pass if the current state is invalid already. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240628103519.105020-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 14b9dc66e93abbd16b22ac9153f658de1acaaf49 Author: Uwe Kleine-König Date: Fri Jun 28 08:35:23 2024 +0200 pwm: xilinx: Simplify using devm_ functions There are devm variants for clk_prepare_enable() and pwmchip_add(); and clk_prepare_enable() can be done together with devm_clk_get(). This allows to simplify the error paths in .probe() and drop .remove() completely. With the remove callback gone, the last user of platform_get_drvdata() is gone and so the call to platform_set_drvdata() can be dropped, too. Signed-off-by: Uwe Kleine-König Reviewed-by: Sean Anderson Link: https://lore.kernel.org/r/20240628063524.92907-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 0007fa1292a24ef23d662ec7afe178088ab7766d Author: Uwe Kleine-König Date: Thu Jun 27 22:31:21 2024 +0200 pwm: Use guards for pwm_lookup_lock instead of explicity mutex_lock + mutex_unlock With the compiler caring for unlocking the mutex several functions can be simplified. Benefit from that. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/28807cb5d9dbce66860f74829c0f57cd9c01373e.1719520143.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 4c50c71c6995a2546eedc36f8bd99fadd7883a46 Author: Uwe Kleine-König Date: Thu Jun 27 22:31:20 2024 +0200 pwm: Use guards for export->lock instead of explicity mutex_lock + mutex_unlock With the compiler caring for unlocking the mutex several functions can be simplified. Benefit from that. There is just one caller left for mutex_lock(&export->lock). The code flow is too complicated there to convert it to the compiler assisted variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/210010f2e579a92476462726e18e0135f6854909.1719520143.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 650af6c0833a7274a755f5ed4bae29e53bbae4fc Author: Uwe Kleine-König Date: Thu Jun 27 22:31:19 2024 +0200 pwm: Use guards for pwm_lock instead of explicity mutex_lock + mutex_unlock With the compiler caring for unlocking the mutex several functions can be simplified. Benefit from that. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/2102fe8189bdf1f02ff3785b551a69be27a65af4.1719520143.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 44ee95184e785c64e301498dec112bb1582bffd2 Author: Uwe Kleine-König Date: Thu Jun 27 00:25:27 2024 +0200 pwm: Register debugfs operations after the pwm class While the debugfs operations don't technically depend on an initialized class, they loop over the idr that only can get entries when the class is properly initialized. This also fixes the ugly (but harmless) corner case that the debugfs file stays around after the pwm class failed to initialize. While at it, add an appropriate error message when class initialization fails. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240626222529.2901200-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 9b22ceb31a7dda9a78959db3c6e35b04888032f9 Author: Shenwei Wang Date: Tue Jul 2 11:45:14 2024 -0500 pwm: imx-tpm: Enable pinctrl setting for sleep state Apply the pinctrl setting of sleep state when system enters suspend state. Restore to the default pinctrl setting when system resumes. Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20240702164514.11007-1-shenwei.wang@nxp.com Signed-off-by: Uwe Kleine-König commit f3a616e2a8755bb45f72d93aee3ac1b7e808182d Author: Raag Jadav Date: Wed Jun 5 18:45:33 2024 +0530 pwm: lpss: drop redundant runtime PM handles We no longer need empty runtime PM handles for PCI devices after commits [1] and [2]. Drop them and let PCI core take care of power state transitions. [1] c5eb1190074c ("PCI / PM: Allow runtime PM without callback functions") [2] fa885b06ec7e ("PCI/PM: Allow runtime PM with no PM callbacks at all") Reviewed-by: Andy Shevchenko Signed-off-by: Raag Jadav Link: https://lore.kernel.org/r/20240605131533.20037-3-raag.jadav@intel.com Signed-off-by: Uwe Kleine-König commit 07612a7621ce3fb5c450877b2ecc76ef4d3c0bf9 Author: Raag Jadav Date: Wed Jun 5 18:45:32 2024 +0530 pwm: lpss: use devm_pm_runtime_enable() helper Use devm_pm_runtime_enable() helper to enable runtime PM and drop redundant platform ->remove() callback. Reviewed-by: Andy Shevchenko Signed-off-by: Raag Jadav Link: https://lore.kernel.org/r/20240605131533.20037-2-raag.jadav@intel.com Signed-off-by: Uwe Kleine-König commit 7cea05ae1d4ecbb7a6c3d28f9c483b1f9105526a Author: Uwe Kleine-König Date: Wed Jun 19 12:11:46 2024 +0200 pwm-stm32: Make use of parametrised register definitions There is no semantic change, but it is a nicer on the eyes of a reader, because TIM_CCR1 + 4 * ch encodes internal register knowledge, while TIM_CCRx(ch + 1) keeps that information completely in the header defining the registers. While I expected this to not result in any changes in the binary, gcc 13 (as provided by Debian in the gcc-13-arm-linux-gnueabihf 13.2.0-12cross1 package) compiles the new version with an allmodconfig to more compact code: $ source/scripts/bloat-o-meter drivers/pwm/pwm-stm32.o-pre drivers/pwm/pwm-stm32.o add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-488 (-488) Function old new delta stm32_pwm_get_state 968 936 -32 stm32_pwm_apply_locked 1920 1464 -456 Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/d7ef7a6158df4ba6687233b0e00d37796b069fb3.1718791090.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 2b17a6eeb3e7bbae1194cbc070f19cddc7775034 Merge: 30122ce2b9a28 304d02aa71136 Author: Uwe Kleine-König Date: Wed Jul 10 17:53:40 2024 +0200 Merge tag 'ib-mfd-counter-v5.11' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into HEAD Immutable branch between MFD and Counter due for the v5.11 merge window commit 30122ce2b9a2890595d452c746bb07a08ac591d1 Author: Frank Li Date: Wed Jun 5 18:08:39 2024 -0400 dt-bindings: pwm: imx: remove interrupt property from required The driver "drivers/pwm/pwm-imx27.c" never use interrupt. Generally pwm hardware generate a waveform according to register timing setting. Needn't interrupt handle at all. So remove it from "required" list. Signed-off-by: Frank Li Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605220839.1398872-1-Frank.Li@nxp.com Signed-off-by: Uwe Kleine-König commit 2ed3284f3120caf0221276fa6cbc97f8867b354f Author: Junyi Zhao Date: Thu Jun 13 19:46:35 2024 +0800 pwm: meson: Add support for Amlogic S4 PWM Add support for Amlogic S4 PWM. Signed-off-by: Junyi Zhao Signed-off-by: Kelvin Zhang Reviewed-by: George Stark Link: https://lore.kernel.org/r/20240613-s4-pwm-v8-1-b5bd0a768282@amlogic.com Signed-off-by: Uwe Kleine-König commit 7f61257cd6e1ad4769b4b819668cab00f68f2556 Author: Vincent Whitchurch Date: Tue Jun 4 23:00:41 2024 +0200 pwm: Add GPIO PWM driver Add a software PWM which toggles a GPIO from a high-resolution timer. This will naturally not be as accurate or as efficient as a hardware PWM, but it is useful in some cases. I have for example used it for evaluating LED brightness handling (via leds-pwm) on a board where the LED was just hooked up to a GPIO, and for a simple verification of the timer frequency on another platform. Since high-resolution timers are used, sleeping GPIO chips are not supported and are rejected in the probe function. Signed-off-by: Vincent Whitchurch Co-developed-by: Stefan Wahren Signed-off-by: Stefan Wahren Co-developed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20240604-pwm-gpio-v7-2-6b67cf60db92@linaro.org Signed-off-by: Uwe Kleine-König commit 1577ddaa515e3af2614e1f52711c287bebc338cf Author: Nicola Di Lieto Date: Tue Jun 4 23:00:40 2024 +0200 dt-bindings: pwm: Add pwm-gpio Add bindings for PWM modulated by GPIO. Signed-off-by: Nicola Di Lieto Co-developed-by: Stefan Wahren Signed-off-by: Stefan Wahren Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dhruva Gole Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20240604-pwm-gpio-v7-1-6b67cf60db92@linaro.org Signed-off-by: Uwe Kleine-König commit da804fa9bc718e4210ec27cc0457ecc1eb073a14 Author: Uwe Kleine-König Date: Fri Jun 14 17:39:00 2024 +0200 pwm: Drop pwm_apply_state() This function is not supposed to be used any more since commit c748a6d77c06 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()") that is included in v6.8-rc1. Two kernel releases should be enough for everyone to adapt, so drop the old function that was introduced as a compatibility stub for the transition. Signed-off-by: Uwe Kleine-König commit f8b03e5c728ff6cf76f9db23dbfaf75b7eeb0a12 Author: Sean Young Date: Fri Jun 14 10:08:29 2024 +0100 bus: ts-nbus: Use pwm_apply_might_sleep() pwm_apply_state() is deprecated since commit c748a6d77c06a ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()"). Signed-off-by: Sean Young Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240614090829.560605-1-sean@mess.org Signed-off-by: Uwe Kleine-König commit a96d3659c9437673dbef5c05cba31a3c0b5a0a7b Author: Uwe Kleine-König Date: Fri Jun 7 12:42:31 2024 +0200 pwm: Remove wrong implementation details from pwm_ops's documentation When .get_state() is called is an implementation detail that implementors and users shouldn't care about and rely on. Additionally it's wrong, because with PWM_DEBUG enabled it is called more often. Just drop the wrong statement. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/611ba758d7e9fb2695e96b23cb7ceeefb6ba8513.1717756902.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit d6f66e292676db976c4d42df2631427236c36fdb Author: Uwe Kleine-König Date: Fri Jun 7 10:44:17 2024 +0200 pwm: Make pwm_request_from_chip() private to the core The last user of this function outside of core.c is gone, so it can be made static. Signed-off-by: Uwe Kleine-König Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240607084416.897777-8-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 40571a5b3b73c6c5189e55ff82b97a58bec371a1 Author: Uwe Kleine-König Date: Fri Jun 7 10:44:16 2024 +0200 pwm: cros-ec: Simplify device tree xlation The cros-ec device tree binding only uses #pwm-cells = <1>, and so there is no period provided in the device tree. Up to now this was handled by hardcoding the period to the only supported value in the custom xlate callback. Apart from that, the default xlate callback (i.e. of_pwm_xlate_with_flags()) handles this just fine (and better, e.g. by checking args->args_count >= 1 before accessing args->args[0]). To simplify make use of of_pwm_xlate_with_flags(), drop the custom callback and provide the default period in .probe() already. Apart from simplifying the driver this also drops the last non-core user of pwm_request_from_chip() and so makes further simplifications possible. Signed-off-by: Uwe Kleine-König Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240607084416.897777-7-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit f7d5463e2a8f1fef855af2b62a1f7b59b830ad05 Author: Uwe Kleine-König Date: Fri Jun 7 10:44:15 2024 +0200 pwm: cros-ec: Don't care about consumers in .get_state() The get_state() callback is never called (in a visible way) after there is a consumer for a pwm device. The core handles loosing the information about duty_cycle just fine. Simplify the driver accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240607084416.897777-6-u.kleine-koenig@baylibre.com [Drop kdoc comment for channel to make W=1 builds happy] Signed-off-by: Uwe Kleine-König commit 33c651a3fba9a3d380cb0e35ea207e048d39bed9 Author: Uwe Kleine-König Date: Fri Jun 7 18:00:13 2024 +0200 pwm: Make use of a symbol namespace for the core Define all pwm core's symbols in the namespace "PWM". The necessary module import statement is just added to the main header, this way every file that knows about the public functions automatically has this namespace available. Thanks to Biju Das for pointing out a cut'n'paste failure in my initial patch. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240607160012.1206874-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 2c69747c10d1203073aa4f74d1d09db1b4a89252 Author: Jeff Johnson Date: Mon Jun 10 07:51:15 2024 -0700 pwm: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-imx1.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-imx27.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-intel-lgm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-mediatek.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-pxa.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-samsung.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-spear.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pwm/pwm-visconti.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240610-md-drivers-pwm-v2-1-b337cfaa70ea@quicinc.com Signed-off-by: Uwe Kleine-König commit 3555f8ff30fe7d19cc2408e7d3bc18720b208e5f Author: Uwe Kleine-König Date: Thu Jun 6 18:40:47 2024 +0200 pwm: axi-pwmgen: Make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val=0, better use regmap_clear_bits(). Signed-off-by: Uwe Kleine-König Acked-by: Trevor Gamblin Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606164047.534741-6-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 32b4f1a4f07f1a74687d8de9d6d66038d4646525 Author: Uwe Kleine-König Date: Thu Jun 6 18:40:46 2024 +0200 pwm: jz4740: Another few conversions to regmap_{set,clear}_bits() Similar to commit 7d9199995412 ("pwm: jz4740: Use regmap_{set,clear}_bits") convert two more regmap_update_bits() calls to regmap_{set,clear}_bits() which were missed back then. Signed-off-by: Uwe Kleine-König Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20240606164047.534741-5-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 41814fe5c782bdf68c25bb99398d38619a2fb5e6 Author: Drew Fustini Date: Wed Jun 5 16:35:06 2024 -0400 pwm: Add driver for AXI PWM generator Add support for the Analog Devices AXI PWM Generator. This device is an FPGA-implemented peripheral used as PWM signal generator and can be interfaced with AXI4. The register map of this peripheral makes it possible to configure the period and duty cycle of the output signal. Link: https://analogdevicesinc.github.io/hdl/library/axi_pwm_gen/index.html Co-developed-by: Sergiu Cuciurean Signed-off-by: Sergiu Cuciurean Co-developed-by: David Lechner Signed-off-by: David Lechner Signed-off-by: Drew Fustini Acked-by: Nuno Sa Co-developed-by: Trevor Gamblin Signed-off-by: Trevor Gamblin Link: https://lore.kernel.org/r/20240605203507.1934434-3-tgamblin@baylibre.com Signed-off-by: Uwe Kleine-König commit 1edf2c2a2841f41e95287abe4b779840a17193d4 Author: Drew Fustini Date: Wed Jun 5 16:35:05 2024 -0400 dt-bindings: pwm: Add AXI PWM generator Add Analog Devices AXI PWM generator. Link: https://analogdevicesinc.github.io/hdl/library/axi_pwm_gen/index.html Signed-off-by: Drew Fustini Reviewed-by: Krzysztof Kozlowski Acked-by: Michael Hennerich Acked-by: Nuno Sa Co-developed-by: Trevor Gamblin Signed-off-by: Trevor Gamblin Link: https://lore.kernel.org/r/20240605203507.1934434-2-tgamblin@baylibre.com Signed-off-by: Uwe Kleine-König commit 307d0a70d029fa26c93c070341ba3acd6ba31db9 Author: Frank Li Date: Tue May 28 16:20:24 2024 -0400 dt-bindings: pwm: fsl-ftm: Convert to yaml format Convert dt-bindings pwm-fsl-ftm.txt to yaml format. Additional change during convert: - "big-endian" is not required property. - Add "sleep" to pinctrl-names. - Change pinctrl-NNN to pinctrl-0 and pinctrl-1. - Remove label "pwm0" in example. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240528202025.2919358-1-Frank.Li@nxp.com Signed-off-by: Uwe Kleine-König commit 37f7707077f5ea2515bf4b1dc7fad43f8e12993e Author: Uwe Kleine-König Date: Tue Jul 9 12:18:05 2024 +0200 pwm: atmel-tcb: Fix race condition and convert to guards The hardware only supports a single period length for both PWM outputs. So atmel_tcb_pwm_config() checks the configuration of the other output if it's compatible with the currently requested setting. The register values are then actually updated in atmel_tcb_pwm_enable(). To make this race free the lock must be held during the whole process, so grab the lock in .apply() instead of individually in atmel_tcb_pwm_disable() and atmel_tcb_pwm_enable() which then also covers atmel_tcb_pwm_config(). To simplify handling, use the guard helper to let the compiler care for unlocking. Otherwise unlocking would be more difficult as there is more than one exit path in atmel_tcb_pwm_apply(). Fixes: 9421bade0765 ("pwm: atmel: add Timer Counter Block PWM driver") Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20240709101806.52394-3-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit efa9c5be2caecae7dfa4f29c6ab3d4a2f341eb15 Author: Valentin Caron Date: Mon Jul 8 17:34:34 2024 +0200 rtc: stm32: add new st,stm32mp25-rtc compatible and check RIF configuration Introduce new st,stm32mp25-rtc compatible. It is based on st,stm32mp1-rtc. Difference is that stm32mp25 soc implements a triple protection on RTC registers: - Secure bit based protection - Privileged context based protection - Compartment ID filtering based protection This driver will now check theses configurations before probing to avoid exceptions and fake reads on register. At this time, driver needs only to check two resources: INIT and ALARM_A. Other resources are not used. Resource isolation framework (RIF) is a comprehensive set of hardware blocks designed to enforce and manage isolation of STM32 hardware resources, like memory and peripherals. Link: https://www.st.com/resource/en/reference_manual/rm0457-stm32mp25xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf#page=4081 Signed-off-by: Valentin Caron Link: https://lore.kernel.org/r/20240708153434.416287-3-valentin.caron@foss.st.com Signed-off-by: Alexandre Belloni commit 1746a61a0248f93fee11b9ab44c71720d45d713b Author: Valentin Caron Date: Mon Jul 8 17:34:33 2024 +0200 dt-bindings: rtc: stm32: introduce new st,stm32mp25-rtc compatible Introduce new st,stm32mp25-rtc compatible. It is based on st,stm32mp1-rtc. Difference is that stm32mp25 soc implements a triple protection on RTC registers: - Secure bit based protection - Privileged context based protection - Compartment ID filtering based protection This driver will now check theses configurations before probing to avoid exceptions and fake reads on register. Link: https://www.st.com/resource/en/reference_manual/rm0457-stm32mp25xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf#page=4081 Signed-off-by: Valentin Caron Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240708153434.416287-2-valentin.caron@foss.st.com Signed-off-by: Alexandre Belloni commit e23300dfffa178b19abc1b1b94ed7de74b0e0930 Author: YiPeng Chai Date: Tue Jul 2 17:53:02 2024 +0800 drm/amdgpu: timely save bad pages to eeprom after gpu ras reset is completed The problem case is as follows: 1. GPU A triggers a gpu ras reset, and GPU A drives GPU B to also perform a gpu ras reset. 2. After gpu B ras reset started, gpu B queried a DE data. Since the DE data was queried in the ras reset thread instead of the page retirement thread, bad page retirement work would not be triggered. Then even if all gpu resets are completed, the bad pages will be cached in RAM until GPU B's bad page retirement work is triggered again and then saved to eeprom. This patch can save the bad pages to eeprom in time after gpu ras reset is completed. v2: 1. Add the above description to code comments. 2. Reuse existing function. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c04706914ddeb9098a509a5647c0b46c7e07cf11 Author: YiPeng Chai Date: Tue Jul 2 18:16:52 2024 +0800 drm/amdgpu: flush all cached ras bad pages to eeprom Before uninstalling gpu driver, flush all cached ras bad pages to eeprom. v2: Put the same code into a function and reuse the function. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c39385710cfd9ef22f6a2405d01ebcd6019e8767 Author: Sunil Khatri Date: Tue Jul 9 11:28:22 2024 +0530 drm/amdgpu: select compute ME engines dynamically GFX ME right now is one but this could change in future SOC's. Use no of ME for GFX as start point for ME for compute for GFX12. Signed-off-by: Sunil Khatri Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 21e6f6085bbc979b5cc3f97857e66387ec550c48 Author: Aurabindo Pillai Date: Wed Jul 3 16:34:58 2024 +0000 drm/amd/display: Allow display DCC for DCN401 To enable mesa to use display dcc, DM should expose them in the supported modifiers. Add the best (most efficient) modifiers first. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a85cc86cce4183962c9ab80bf9c9c666aae174f8 Author: Sunil Khatri Date: Tue Jul 9 11:24:39 2024 +0530 drm/amdgpu: select compute ME engines dynamically GFX ME right now is one but this could change in future SOC's. Use no of ME for GFX as start point for ME for compute for GFX11. Signed-off-by: Sunil Khatri Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7d570f56f1e1005cf5bb34ceec608432d2acb157 Author: Alex Deucher Date: Mon Jul 8 15:02:40 2024 -0400 drm/amdgpu/job: Replace DRM_INFO/ERROR logging Use the dev_info/err variants so we get per device logging in multi-GPU cases. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 948f2828a676d323c18dfa16e6a91c8103a97e4d Author: Sunil Khatri Date: Tue Jul 9 10:59:36 2024 +0530 drm/amdgpu: select compute ME engines dynamically GFX ME right now is one but this could change in future SOC's. Use no of ME for GFX as start point for ME for compute for GFX10. Signed-off-by: Sunil Khatri Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 708f220567d4a398ee1553ee6519f7e73ae5ed6c Author: Danijel Slivka Date: Fri Jul 5 14:15:32 2024 +0200 drm/amd/pm: Ignore initial value in smu response register Why: If the reg mmMP1_SMN_C2PMSG_90 is being written to during amdgpu driver load or driver unload, subsequent amdgpu driver load will fail at smu_hw_init. The default of mmMP1_SMN_C2PMSG_90 register at a clean environment is 0x1 and if value differs from expected, amdgpu driver load will fail. How to fix: Ignore the initial value in smu response register before the first smu message is sent,if smc in SMU_FW_INIT state, just proceed further to send the message. If register holds an unexpected value after smu message was sent set, smc_state to SMU_FW_HANG state and no further smu messages will be sent. v2: Set SMU_FW_INIT state at the start of smu hw_init/resume. Check smc_fw_state before sending smu message if in hang state skip sending message. Set SMU_FW_HANG only in case unexpected value is detected Signed-off-by: Danijel Slivka Reviewed-by: Kenneth Feng Reviewed-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit d02ddefc7eedaa6394279bad522c70fd5d63e163 Author: Lijo Lazar Date: Wed Jul 3 11:52:47 2024 +0530 drm/amdgpu: Initialize VF partition mode For SOCs with GFX v9.4.3, a VF may have multiple compute partitions. Fetch the partition information during init and initialize partition nodes. There is no support to switch partition mode in VF mode, hence disable the same. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5d64af40e3a99c3bbe7a66c3cfe23295f8e97130 Author: Gavin Wan Date: Mon Jul 8 17:07:04 2024 +0000 drm/amd/amdgpu: fix SDMA IRQ client ID <-> req mapping. sdma has 2 instances in SRIOV cpx mode. Odd numbered VFs have sdma0/sdma1 instances. Even numbered vfs have sdma2/sdma3. For Even numbered vfs, the sdma2 & sdma3 (irq srouce id CLIENTID_SDMA2 and CLIENTID_SDMA3) should map to irq seq 0 & 1. Signed-off-by: Gavin Wan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 89d568ab9037e77964281cb5e916e8aa219802cf Author: Alex Deucher Date: Wed Jul 3 15:34:16 2024 -0400 MAINTAINERS: fix Xinhui's name Switch to fist last for consistency. Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: Xinhui Pan commit 1fe5fa5ba194953e40aa74b5389bcd656c3080ce Author: Alex Deucher Date: Wed Jul 3 15:32:16 2024 -0400 MAINTAINERS: update powerplay and swsmu Evan is no longer maintaining powerplay and swsmu. Add Kenneth Feng as his replacement. Acked-by: Christian König Signed-off-by: Alex Deucher Cc: Kenneth Feng commit 04e3bb0b00a872e5bed0457c3e2c48a7828eaf28 Author: Uwe Kleine-König Date: Wed Jul 10 10:35:45 2024 +0200 hwmon: (pmbus/ltc4286) Drop unused i2c device ids The driver doesn't make use of the different numbers assigned to the different devices. So drop them. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/9a48ba0368e0c8cddc94c5e4cf3edd7eadc03a2d.1720600141.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck commit a11dda723c6493bb1853bbc61c093377f96e2d47 Author: Jason Gunthorpe Date: Fri Jun 28 13:11:11 2024 -0300 iommufd: Require drivers to supply the cache_invalidate_user ops If drivers don't do this then iommufd will oops invalidation ioctls with something like: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Mem abort info: ESR = 0x0000000086000004 EC = 0x21: IABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault user pgtable: 4k pages, 48-bit VAs, pgdp=0000000101059000 [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 371 Comm: qemu-system-aar Not tainted 6.8.0-rc7-gde77230ac23a #9 Hardware name: linux,dummy-virt (DT) pstate: 81400809 (Nzcv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=-c) pc : 0x0 lr : iommufd_hwpt_invalidate+0xa4/0x204 sp : ffff800080f3bcc0 x29: ffff800080f3bcf0 x28: ffff0000c369b300 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 x23: 0000000000000000 x22: 00000000c1e334a0 x21: ffff0000c1e334a0 x20: ffff800080f3bd38 x19: ffff800080f3bd58 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffff8240d6d8 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : 0000001000000002 x7 : 0000fffeac1ec950 x6 : 0000000000000000 x5 : ffff800080f3bd78 x4 : 0000000000000003 x3 : 0000000000000002 x2 : 0000000000000000 x1 : ffff800080f3bcc8 x0 : ffff0000c6034d80 Call trace: 0x0 iommufd_fops_ioctl+0x154/0x274 __arm64_sys_ioctl+0xac/0xf0 invoke_syscall+0x48/0x110 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x34/0xb4 el0t_64_sync_handler+0x120/0x12c el0t_64_sync+0x190/0x194 All existing drivers implement this op for nesting, this is mostly a bisection aid. Fixes: 8c6eabae3807 ("iommufd: Add IOMMU_HWPT_INVALIDATE") Link: https://lore.kernel.org/r/0-v1-e153859bd707+61-iommufd_check_ops_jgg@nvidia.com Reviewed-by: Nicolin Chen Reviewed-by: Yi Liu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit e60284b63245b84c3ae352427ed5ff8b79266b91 Author: John Keeping Date: Mon Jul 8 15:25:53 2024 +0100 usb: gadget: f_uac2: fix non-newline-terminated function name Most writes to configfs handle an optional newline, but do not require it. By using the number of bytes written as the limit for scnprintf() it is guaranteed that the final character in the buffer will be overwritten. This is expected if it is a newline but is undesirable when a string is written "as-is" (as libusbgx does, for example). Update the store function to strip an optional newline, matching the behaviour of usb_string_copy(). Signed-off-by: John Keeping Link: https://lore.kernel.org/r/20240708142553.3995022-1-jkeeping@inmusicbrands.com Signed-off-by: Greg Kroah-Hartman commit af46fe8c41de5b79358c3007e3854dda9c61c7dc Author: Geert Uytterhoeven Date: Wed Jul 10 09:44:52 2024 +0200 dio: Have dio_bus_match() callback take a const * drivers/dio/dio-driver.c:128:11: error: initialization of ‘int (*)(struct device *, const struct device_driver *)’ from incompatible pointer type ‘int (*)(struct device *, struct device_driver *)’ [-Werror=incompatible-pointer-types] 128 | .match = dio_bus_match, | ^~~~~~~~~~~~~ drivers/dio/dio-driver.c:128:11: note: (near initialization for ‘dio_bus_type.match’) Reported-by: noreply@ellerman.id.au Fixes: d69d804845985c29 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240710074452.2841173-1-geert@linux-m68k.org [ added dio.h change - gregkh ] Signed-off-by: Greg Kroah-Hartman commit ab11dac93d2d568d151b1918d7b84c2d02bacbd5 Author: tuhaowen Date: Mon Jul 8 16:04:30 2024 +0800 dev/parport: fix the array out-of-bounds risk Fixed array out-of-bounds issues caused by sprintf by replacing it with snprintf for safer data copying, ensuring the destination buffer is not overflowed. Below is the stack trace I encountered during the actual issue: [ 66.575408s] [pid:5118,cpu4,QThread,4]Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: do_hardware_base_addr+0xcc/0xd0 [parport] [ 66.575408s] [pid:5118,cpu4,QThread,5]CPU: 4 PID: 5118 Comm: QThread Tainted: G S W O 5.10.97-arm64-desktop #7100.57021.2 [ 66.575439s] [pid:5118,cpu4,QThread,6]TGID: 5087 Comm: EFileApp [ 66.575439s] [pid:5118,cpu4,QThread,7]Hardware name: HUAWEI HUAWEI QingYun PGUX-W515x-B081/SP1PANGUXM, BIOS 1.00.07 04/29/2024 [ 66.575439s] [pid:5118,cpu4,QThread,8]Call trace: [ 66.575469s] [pid:5118,cpu4,QThread,9] dump_backtrace+0x0/0x1c0 [ 66.575469s] [pid:5118,cpu4,QThread,0] show_stack+0x14/0x20 [ 66.575469s] [pid:5118,cpu4,QThread,1] dump_stack+0xd4/0x10c [ 66.575500s] [pid:5118,cpu4,QThread,2] panic+0x1d8/0x3bc [ 66.575500s] [pid:5118,cpu4,QThread,3] __stack_chk_fail+0x2c/0x38 [ 66.575500s] [pid:5118,cpu4,QThread,4] do_hardware_base_addr+0xcc/0xd0 [parport] Signed-off-by: tuhaowen Cc: stable Link: https://lore.kernel.org/r/20240708080430.8221-1-tuhaowen@uniontech.com Signed-off-by: Greg Kroah-Hartman commit feb1f0cba17a05c145cbe9dcf6c4736990e106d7 Author: Jeff Johnson Date: Sat Jun 1 17:12:01 2024 -0700 samples: configfs: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/configfs/configfs_sample.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Nacked-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240601-md-samples-configfs-v1-1-83ef2d3c0088@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 5f67eef6dff39421215e9134f1eaae51b67a73b7 Author: Vamsi Attunuru Date: Sat Jul 6 08:30:09 2024 -0700 misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver Adds a misc driver for Marvell CN10K DPI(DMA Engine) device's physical function which initializes DPI DMA hardware's global configuration and enables hardware mailbox channels between physical function (PF) and it's virtual functions (VF). VF device drivers (User space drivers) use this hw mailbox to communicate any required device configuration on it's respective VF device. Accordingly, this DPI PF driver provisions the VF device resources. At the hardware level, the DPI physical function (PF) acts as a management interface to setup the VF device resources, VF devices are only provisioned to handle or control the actual DMA Engine's data transfer capabilities. Signed-off-by: Vamsi Attunuru Reviewed-by: Srujana Challa Link: https://lore.kernel.org/r/20240706153009.3775333-1-vattunuru@marvell.com Signed-off-by: Greg Kroah-Hartman commit 104e004739ef03890a1e175b3c2672d50c6d1a6a Author: Philipp Hortmann Date: Tue Jul 9 08:26:34 2024 +0200 staging: rtl8723bs: Remove constant result function CheckNegative() Remove function CheckNegative() that returns always true to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240709062634.9454-1-philipp.hortmann@emerson.com Signed-off-by: Greg Kroah-Hartman commit 51ece2cfaa2c558a4a6783962ff0416e8395efe1 Author: Philipp Hortmann Date: Sun Jul 7 08:54:59 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_mlme_ext.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7178388b14033c24e9c6a3912a1cf19d342b9b22.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 74e27871887627d16533c774d66df8084565070d Author: Philipp Hortmann Date: Sun Jul 7 08:54:48 2024 +0200 staging: rtl8723bs: Remove unused macros in hal_pwr_seq.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7e8117fe3d3f82d69897675c36dc9ee229b9f2ad.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d93f09e696c3988b95831b00b28adb878c0093ce Author: Philipp Hortmann Date: Sun Jul 7 08:54:37 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_efuse.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/dda48a640142abbddb846bddf656ac5adada2971.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d231705f2d56c90932b459dbee841beaf2ff7955 Author: Philipp Hortmann Date: Sun Jul 7 08:54:26 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_mlme.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e04836b646ccd0a97ee0658dc61db7ac748bcb40.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit df6d6cc7e2b7c2b88659f03fb75c395eeabbf3de Author: Philipp Hortmann Date: Sun Jul 7 08:54:00 2024 +0200 staging: rtl8723bs: Remove unused macros in HalPwrSeqCmd.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ac52d73666090a70e8c1edc87e511f1ea2c139e4.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 551977b74ce4ecee4f0b06f6dc9596472a6721b0 Author: Philipp Hortmann Date: Sun Jul 7 08:53:45 2024 +0200 staging: rtl8723bs: Remove unused macros in Hal8723BReg.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e01262b91c33d7f0b8370f74d95d688d7c813655.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 319ce38b5bf8ab814f2b75d167fb0c00318aaf45 Author: Philipp Hortmann Date: Sun Jul 7 08:53:32 2024 +0200 staging: rtl8723bs: Remove unused macros in Hal8192CPhyReg.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/59ee254104cee474b4647d605d4b3380829202a5.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6fdb66209d86359b524b8e737ddf766ea4170e9 Author: Philipp Hortmann Date: Sun Jul 7 08:52:56 2024 +0200 staging: rtl8723bs: Delete file hal_phy_reg_8723b.h Delete file hal_phy_reg_8723b.h to increase overview. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/04db91723915fc5e542a49b37d07ac85f1f853f4.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2dc61f379d1f930841320a114602a6bc1144fafe Author: Philipp Hortmann Date: Sun Jul 7 08:52:47 2024 +0200 staging: rtl8723bs: Move last macro from hal_phy_reg_8723b.h Move last macro from hal_phy_reg_8723b.h to Hal8192CPhyReg.h to prepare removal of hal_phy_reg_8723b.h. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7e1e5591af85a452415fb137767e21d0d1d163a1.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 94a51131b21a9a5ecf4285c6c2c6d7fc09ffc82f Author: Philipp Hortmann Date: Sun Jul 7 08:52:38 2024 +0200 staging: rtl8723bs: Remove unused macros in hal_phy_reg_8723b.h Remove unused and double defined macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a478e607d4fcf22f547594c4a569c27da4fb2645.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d46baf048f762a82ab23b00de8180ec4ce46a14e Author: Philipp Hortmann Date: Sun Jul 7 08:52:29 2024 +0200 staging: rtl8723bs: Remove unused macros in hal_com_reg.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b632a4d6cd05c53b174db4994c3107cfcec42e8d.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ca75eaa246f7a5e851c83417f49469abaad7bd27 Author: Philipp Hortmann Date: Sun Jul 7 08:52:20 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_ht.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7bab6def02a4a89c481d20547375d894d538458a.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0d879102ea8d612d4a0e6723942a96102826701 Author: Philipp Hortmann Date: Sun Jul 7 08:52:10 2024 +0200 staging: rtl8723bs: Remove unused macros in hal_com_h2c.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/68933c5020b21a32fdf56552db0460667f1c9113.1720245061.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 863a756aaf49ed23d25bbb1dad999a85f09e1836 Author: Umang Jain Date: Wed Jul 3 18:40:52 2024 +0530 staging: vc04_services: vchiq_core: Stop kthreads on vchiq module unload The various kthreads thread functions (slot_handler_func, sync_func, recycle_func) in vchiq_core and vchiq_keepalive_thread_func in vchiq_arm should be stopped when the module is unloaded. Previous attempt were made to address this but later reverted [1] due to VC04 firmware corruption. The issue around wait_event_interruptible() handling on stopping a kthread has been handled in the previous commit. Hence, it is now safe to stop kthreads on module unload, without any firmware corruption. This also completes the "Fix kernel module support" TODO item, hence drop it from the list. [1] commit ebee9ca2f59e ("Revert "staging: vc04_services: vchiq_core: Stop kthreads on shutdown"") Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20240703131052.597443-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit c22502cb84d4c963f754e6d943d3133cfa80ba97 Author: Umang Jain Date: Wed Jul 3 18:40:51 2024 +0530 staging: vchiq_core: Bubble up wait_event_interruptible() return value wait_event_interruptible() returns if the condition evaluates to true it receives a signal. However, the current code always assume that the wait_event_interruptible() returns only when the event is fired. This should not be the case as wait_event_interruptible() can return on receiving a signal (with -ERESTARTSYS as return value). We should consider this and bubble up the return value of wait_event_interruptible() to exactly know if the wait has failed and error out. This will also help to properly stop kthreads in the subsequent patch. Meanwhile at it, remote_wait_event() is modified to return 0 on success, and an error code (from wait_event_interruptible()) on failure. The return value is now checked for remote_wait_event() calls. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20240703131052.597443-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit dfda97e37de4c2fa4a079ae77737c6b9ed021f79 Author: Chen Ni Date: Wed Jul 10 16:28:13 2024 +0800 gpio: mc33880: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: 1e5db00687c1 ("gpio: add MC33880 driver") Signed-off-by: Chen Ni Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20240710082813.2287329-1-nichen@iscas.ac.cn [Bartosz: fixed the Fixes: tag] Signed-off-by: Bartosz Golaszewski commit 3db80c999debbadd5d627fb30f8b06fee331ffb6 Author: Arnd Bergmann Date: Wed Apr 24 09:14:39 2024 +0200 riscv: convert to generic syscall table The uapi/asm/unistd_{32,64}.h and asm/syscall_table_{32,64}.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. riscv has two extra system call that gets added to scripts/syscall.tbl. The newstat and rlimit entries in the syscall_abis_64 line are for system calls that were part of the generic ABI when riscv64 got added but are no longer enabled by default for new architectures. Both riscv32 and riscv64 also implement memfd_secret, which is optional for all architectures. Unlike all the other 32-bit architectures, the time32 and stat64 sets of syscalls are not enabled on riscv32. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. Signed-off-by: Arnd Bergmann commit 77122bf9e3dfd927de4bf4a75b6297f928313e7e Author: Arnd Bergmann Date: Tue Apr 23 23:14:14 2024 +0200 openrisc: convert to generic syscall table The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. openrisc has one extra system call that gets added to scripts/syscall.tbl. The time32, stat64, rlimit and renameat entries in the syscall_abis_32 line are for system calls that were part of the generic ABI when arch/nios2 got added but are no longer enabled by default for new architectures. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. When asm/syscalls.h is included in kernel/fork.c for the purpose of type checking, the redirection macros cause problems. Move these so only the references get redirected. Signed-off-by: Arnd Bergmann commit ef608c5767f983123b7d7f18b1b940e934419a3c Author: Arnd Bergmann Date: Tue Apr 23 17:52:56 2024 +0200 nios2: convert to generic syscall table The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. nios2 has one extra system call that gets added to scripts/syscall.tbl. The time32, stat64, and rlimit entries in the syscall_abis_32 line are for system calls that were part of the generic ABI when arch/nios2 got added but are no longer enabled by default for new architectures. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. Signed-off-by: Arnd Bergmann commit 26a3b85bac08fa48bf06c6e2b75e5f5d714147f3 Author: Arnd Bergmann Date: Tue Apr 23 17:41:56 2024 +0200 loongarch: convert to generic syscall table The uapi/asm/unistd_64.h and asm/syscall_table_64.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. Unlike the other architectures using the asm-generic header, loongarch uses none of the deprecated system calls at the moment. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. Signed-off-by: Arnd Bergmann commit 36d69c29759ec2299c1537e292a466eab3824087 Author: Arnd Bergmann Date: Thu Jun 20 15:36:30 2024 +0200 hexagon: use new system call table The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. The time32, stat64, rlimit and renameat entries in the syscall_abis_32 line are for system calls that were part of the generic ABI when arch/hexagon got added but are no longer enabled by default for new architectures. As a side-effect, calling an unimplemented syscall now return -ENOSYS rather than branching into a NULL pointer. Signed-off-by: Arnd Bergmann commit f840cab63efe802638bf536221deecfbf3f569ed Author: Arnd Bergmann Date: Wed Jul 3 17:09:22 2024 +0200 csky: convert to generic syscall table The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. csky has two architecture specific system calls, which I add to the generic table. The time32, stat64 and rlimit entries in the syscall_abis_32 line are for system calls that were part of the generic ABI when arch/csky got added but are no longer enabled by default for new architectures. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. Signed-off-by: Arnd Bergmann commit d2a4a07190f42e4f82805daf58e708400b703f1c Author: Arnd Bergmann Date: Wed May 8 23:50:07 2024 +0200 arm64: rework compat syscall macros The generated asm/unistd_compat_32.h header file now contains macros that can be used directly in the vdso and the signal trampolines, so remove the duplicate definitions. Acked-by: Catalin Marinas Signed-off-by: Arnd Bergmann commit e632bca07c8eef1de9dc50f4e4066c56e9d68b07 Author: Arnd Bergmann Date: Thu Jul 4 14:33:34 2024 +0200 arm64: generate 64-bit syscall.tbl Change the asm/unistd.h header for arm64 to no longer include asm-generic/unistd.h itself, but instead generate both the asm/unistd.h contents and the list of entry points using the syscall.tbl scripts that we use on most other architectures. Once his is done for the remaining architectures, the generic unistd.h header can be removed and the generated tbl file put in its place. The Makefile changes are more complex than they should be, I need a little help to improve those. Ideally this should be done in an architecture-independent way as well. Acked-by: Catalin Marinas Signed-off-by: Arnd Bergmann commit 7fe33e9f662c0a2f5110be4afff0a24e0c123540 Author: Arnd Bergmann Date: Tue Nov 8 16:46:27 2022 +0100 arm64: convert unistd_32.h to syscall.tbl format This is a straight conversion from the old asm/unistd32.h into the format used by 32-bit arm and most other architectures, calling scripts to generate the asm/unistd32.h header and a new asm/syscalls32.h headers. I used a semi-automated text replacement method to do the conversion, and then used 'vimdiff' to synchronize the whitespace and the (unused) names of the non-compat syscalls with the arm version. There are two differences between the generated syscalls names and the old version: - the old asm/unistd32.h contained only a __NR_sync_file_range2 entry, while the arm32 version also defines __NR_arm_sync_file_range with the same number. I added this duplicate back in asm/unistd32.h. - __NR__sysctl was removed from the arm64 file a while ago, but all the tables still contain it. This should probably get removed everywhere but I added it here for consistency. On top of that, the arm64 version does not contain any references to the 32-bit OABI syscalls that are not supported by arm64. If we ever want to share the file between arm32 and arm64, it would not be hard to add support for both in one file. Acked-by: Catalin Marinas Signed-off-by: Arnd Bergmann commit 4414ad8eb4c209aa782916016be175b61a357088 Author: Arnd Bergmann Date: Tue Apr 23 16:12:55 2024 +0200 arc: convert to generic syscall table The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. arc has a couple of architecture specific system calls, which I add to the generic table. This for some reason includes the deprecated sys_sysfs() syscall that was presumably added by accident. The time32, renameat, stat64 and rlimit entries in the syscall_abis_32 entry are for system calls that were part of the generic ABI when arch/arc got added but are no longer enabled by default for new architectures. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. Signed-off-by: Arnd Bergmann commit 505d66d1abfb90853e24ab6cbdf83b611473d6fc Author: Arnd Bergmann Date: Wed May 8 17:13:34 2024 +0200 clone3: drop __ARCH_WANT_SYS_CLONE3 macro When clone3() was introduced, it was not obvious how each architecture deals with setting up the stack and keeping the register contents in a fork()-like system call, so this was left for the architecture maintainers to implement, with __ARCH_WANT_SYS_CLONE3 defined by those that already implement it. Five years later, we still have a few architectures left that are missing clone3(), and the macro keeps getting in the way as it's fundamentally different from all the other __ARCH_WANT_SYS_* macros that are meant to provide backwards-compatibility with applications using older syscalls that are no longer provided by default. Address this by reversing the polarity of the macro, adding an __ARCH_BROKEN_SYS_CLONE3 macro to all architectures that don't already provide the syscall, and remove __ARCH_WANT_SYS_CLONE3 from all the other ones. Acked-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann commit fbb5c0606fa4506e9085e7a62c9e0098e573ce7a Author: Arnd Bergmann Date: Fri Apr 26 15:19:48 2024 +0200 kbuild: add syscall table generation to scripts/Makefile.asm-headers There are 11 copies of arch/*/kernel/syscalls/Makefile that all implement the same basic logic in a somewhat awkward way. I tried out various ways of unifying the existing copies and ended up with something that hooks into the logic for generating the redirections to asm-generic headers. This gives a nicer syntax of being able to list the generated files in $(syscall-y) inside of arch/*/include/asm/Kbuild instead of both $(generated-y) in that place and also in another Makefile. The configuration for which syscall.tbl file to use and which ABIs to enable is now done in arch/*/kernel/Makefile.syscalls. I have done patches for all architectures and made sure that the new generic rules implement a superset of all the architecture specific corner cases. ince the header file is not specific to asm-generic/*.h redirects now, I ended up renaming the file to scripts/Makefile.asm-headers. Signed-off-by: Arnd Bergmann commit b70f12e962bc73a091a7b853f24ae2049613c684 Author: Arnd Bergmann Date: Fri Apr 26 08:44:51 2024 +0200 kbuild: verify asm-generic header list In order to integrate the system call header generation with generating the asm-generic wrappers, restrict the generated headers to those that actually exist in include/asm-generic/. The path is already known, so add these as a dependency. The asm-generic/bugs.h header was removed in commit 61235b24b9cb ("init: Remove check_bugs() leftovers"), which now causes a build failure, so drop it from the list. Signed-off-by: Arnd Bergmann commit ff96f5c6971c79473b384ab22543ada4ac61bab5 Author: Arnd Bergmann Date: Wed Jun 5 16:27:14 2024 +0200 loongarch: avoid generating extra header files The list of generated headers is rather outdated, some of these no longer exist, while others are already listed in include/asm-generic/Kbuild so there is no need to list them here. As we start validating the list of headers against the files that exist, the outdated ones now cause a warning. Signed-off-by: Arnd Bergmann commit 0dd0e9437f8e500a384f12ec16bb407a49676147 Author: Arnd Bergmann Date: Mon May 13 17:13:55 2024 +0000 um: don't generate asm/bpf_perf_event.h If we start validating the existence of the asm-generic side of generated headers, this one causes a warning: make[3]: *** No rule to make target 'arch/um/include/generated/asm/bpf_perf_event.h', needed by 'all'. Stop. The problem is that the asm-generic header only exists for the uapi variant, but arch/um has no uapi headers and instead uses the x86 userspace API. Add a custom file with an explicit redirect to avoid this. Signed-off-by: Arnd Bergmann commit ed8023ae9d79eeebf694751d5c290b72ef871dc0 Author: Arnd Bergmann Date: Wed Jun 5 14:41:26 2024 +0200 csky: drop asm/gpio.h wrapper The asm/gpio.h header is gone now that all architectures just use gpiolib, and so the redirect is no longer valid. Acked-by: Guo Ren Signed-off-by: Arnd Bergmann commit 1d8267bcbb7aa2176365299ad57e067f73b5174d Author: Bartosz Golaszewski Date: Tue Jul 9 17:12:34 2024 +0200 gpio: virtuser: actually use the "trimmed" local variable This variable is set with the intention of being passed to the subsequent strcmp() but something went wrong and it was left unused. Use it now. Fixes: 91581c4b3f29 ("gpio: virtuser: new virtual testing driver for the GPIO API") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407092245.BPnW2mr6-lkp@intel.com/ Link: https://lore.kernel.org/r/20240709151235.90523-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit b577060ac7ba6085d54f2066d185de4a318c913c Author: David Heidelberg Date: Fri Jul 5 15:14:54 2024 -0700 dt-bindings: iommu: Convert msm,iommu-v0 to yaml Convert Qualcomm IOMMU v0 implementation to yaml format. iommus part being ommited for the other bindings, as mdp4 one. Signed-off-by: David Heidelberg Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240705221520.109540-1-david@ixit.cz Signed-off-by: Will Deacon commit 0a3f6b3463014b03f6ad10eacc4d1d9af75d54a1 Author: Lu Baolu Date: Tue Jul 9 23:26:43 2024 +0800 iommu/vt-d: Fix aligned pages in calculate_psi_aligned_address() The helper calculate_psi_aligned_address() is used to convert an arbitrary range into a size-aligned one. The aligned_pages variable is calculated from input start and end, but is not adjusted when the start pfn is not aligned and the mask is adjusted, which results in an incorrect number of pages returned. The number of pages is used by qi_flush_piotlb() to flush caches for the first-stage translation. With the wrong number of pages, the cache is not synchronized, leading to inconsistencies in some cases. Fixes: c4d27ffaa8eb ("iommu/vt-d: Add cache tag invalidation helpers") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240709152643.28109-3-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit c420a2b4e8be06f16f3305472bd25a1dd12059ec Author: Lu Baolu Date: Tue Jul 9 23:26:42 2024 +0800 iommu/vt-d: Limit max address mask to MAX_AGAW_PFN_WIDTH Address mask specifies the number of low order bits of the address field that must be masked for the invalidation operation. Since address bits masked start from bit 12, the max address mask should be MAX_AGAW_PFN_WIDTH, as defined in Table 19 ("Invalidate Descriptor Address Mask Encodings") of the spec. Limit the max address mask returned from calculate_psi_aligned_address() to MAX_AGAW_PFN_WIDTH to prevent potential integer overflow in the following code: qi_flush_dev_iotlb(): ... addr |= (1ULL << (VTD_PAGE_SHIFT + mask - 1)) - 1; ... Fixes: c4d27ffaa8eb ("iommu/vt-d: Add cache tag invalidation helpers") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240709152643.28109-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 42bebc7cca79d545f4eb9ec131560cfdd07762e0 Author: Jeff Johnson Date: Tue Jul 9 15:07:55 2024 -0700 perf: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/arm-ccn.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/fsl_imx8_ddr_perf.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/marvell_cn10k_ddr_pmu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/arm_cspmu/arm_cspmu_module.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/arm_cspmu/nvidia_cspmu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/arm_cspmu/ampere_cspmu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/cxl_pmu.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes drivers/perf/hisilicon/hisi_uncore_pmu.c which, although it did not produce a warning with the x86 allmodconfig configuration, may cause this warning with arm64 configurations. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240709-md-drivers-perf-v3-1-513275b75ed0@quicinc.com Signed-off-by: Will Deacon commit 4920d370092bbf9281e1d98c132c1b266648e35f Author: Kerem Karabay Date: Sat Jul 6 12:04:49 2024 +0000 USB: uas: Implement the new shutdown callback A standard implementation of shutdown callback has been implemented for USB drivers. Since the UAS driver implements a shutdown callback this patch enables it to use the new standard implementation. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg Link: https://lore.kernel.org/r/E3A502A9-6572-4F1B-9EB2-2F6F0C4E6EA8@live.com Signed-off-by: Greg Kroah-Hartman commit a5f81642a7228489292f842a106e33c558121e8b Author: Kerem Karabay Date: Sat Jul 6 12:03:23 2024 +0000 USB: core: add 'shutdown' callback to usb_driver Currently there is no standardized method for USB drivers to handle shutdown events. This patch simplifies running code on shutdown for USB devices by adding a shutdown callback to usb_driver. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg Link: https://lore.kernel.org/r/7AAC1BF4-8B60-448D-A3C1-B7E80330BE42@live.com Signed-off-by: Greg Kroah-Hartman commit 41ea26a06ae5e329fb6ae22526999c8a23d82737 Author: Uwe Kleine-König Date: Wed Jul 10 09:30:50 2024 +0200 usb: typec: Drop explicit initialization of struct i2c_device_id::driver_data to 0 These driver 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 Link: https://lore.kernel.org/r/20240710073050.192806-2-u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman commit d504bfa6cfd1a37efd257b00f49cc47a58ebdabe Author: Radhey Shyam Pandey Date: Tue Jul 9 23:40:51 2024 +0530 usb: dwc3: enable CCI support for AMD-xilinx DWC3 controller The GSBUSCFG0 register bits [31:16] are used to configure the cache type settings of the descriptor and data write/read transfers (Cacheable, Bufferable/Posted). When CCI is enabled in the design, DWC3 core GSBUSCFG0 cache bits must be updated to support CCI enabled transfers in USB. To program GSBUSCFG0 cache bits create a software node property in AMD-xilinx dwc3 glue driver and pass it to dwc3 core. The core then reads this property value and configures it in dwc3_core_init() sequence. Signed-off-by: Radhey Shyam Pandey Reviewed-by: Frank Li Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/1720548651-726412-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Greg Kroah-Hartman commit 5af43708d21c30e2f418cb25d337779c56d235f6 Author: Hauke Mehrtens Date: Tue Jul 9 00:20:54 2024 +0200 usb: dwc2: add support for other Lantiq SoCs The size of the internal RAM of the DesignWare USB controller changed between the different Lantiq SoCs. We have the following sizes: Amazon + Danube: 8 KByte Amazon SE + arx100: 2 KByte xrx200 + xrx300: 2.5 KByte For Danube SoC we do not provide the params and let the driver decide to use sane defaults, for the Amazon SE and arx100 we use small fifos and for the xrx200 and xrx300 SCs a little bit bigger periodic fifo. The auto detection of max_transfer_size and max_packet_count should work, so remove it. This patch is included in OpenWrt for many years. Signed-off-by: Hauke Mehrtens Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20240708222054.2727789-1-hauke@hauke-m.de Signed-off-by: Greg Kroah-Hartman commit 2bb6b10ebe5d42c119827b57ee8123175b7ecc3d Author: Kees Cook Date: Tue Jul 9 08:49:56 2024 -0700 usb: gadget: Use u16 types for 16-bit fields Since the beginning of time, struct usb_ep::maxpacket was a bitfield, and when new 16-bit members were added, the convention was followed: 1da177e4c3f41 (Linus Torvalds 2005-04-16 236) unsigned maxpacket:16; e117e742d3106 (Robert Baldyga 2013-12-13 237) unsigned maxpacket_limit:16; a59d6b91cbca5 (Tatyana Brokhman 2011-06-28 238) unsigned max_streams:16; However, there is no need for this as a simple u16 can be used instead, simplifying the struct and the resulting compiler binary output. Switch to u16 for all three, and rearrange struct slightly to minimize holes. No change in the final size of the struct results; the 2 byte gap is just moved to the end, as seen with pahole: - /* XXX 2 bytes hole, try to pack */ ... /* size: 72, cachelines: 2, members: 15 */ ... + /* padding: 2 */ Changing this simplifies future introspection[1] of maxpacket's type during allocations: drivers/usb/gadget/function/f_tcm.c:330:24: error: 'typeof' applied to a bit-field 330 | fu->cmd.buf = kmalloc(fu->ep_out->maxpacket, GFP_KERNEL); Link: https://lore.kernel.org/all/202407090928.6UaOAZAJ-lkp@intel.com [1] Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20240709154953.work.953-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3eb27d3e32c78badbc4db6ae76614b5961e32291 Author: Takashi Iwai Date: Mon Jul 8 11:57:17 2024 +0200 usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup The MIDI2 gadget driver handled the default MIDI protocol version incorrectly due to the confusion of the protocol version passed via configfs (either 1 or 2) and UMP protocol bits (0x100 / 0x200). As a consequence, the default protocol always resulted in MIDI1. This patch addresses the misunderstanding of the protocol handling. Fixes: 29ee7a4dddd5 ("usb: gadget: midi2: Add configfs support") Cc: stable Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20240708095719.25627-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit dabcfd5e116800496eb9bec2ba7c015ca2043aa0 Merge: 408ac28c62f0b d53ab629cff57 Author: Kalle Valo Date: Wed Jul 10 14:50:14 2024 +0300 Merge tag 'mt76-for-kvalo-2024-07-08' of https://github.com/nbd168/wireless mt76 patches for 6.11 - mt7925 MLO support - mt7925 fix commit 81caa5d519a2e5573e0763630a503def7cb480a5 Author: Rafael J. Wysocki Date: Tue Jul 2 16:43:36 2024 +0200 thermal: imx: Drop critical trip check from imx_set_trip_temp() Because the IMX thermal driver does not flag its critical trip as writable, imx_set_trip_temp() will never be invoked for it and so the critical trip check can be dropped from there. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/2272035.iZASKD2KPV@rjwysocki.net commit d176fadb9e783c152d0820a50f84882b6c5ae314 Author: Heinz Mauelshagen Date: Tue Jul 9 13:56:38 2024 +0200 dm raid: fix stripes adding reshape size issues Adding stripes to an existing raid4/5/6/10 mapped device grows its capacity though it'll be only made available _after_ the respective reshape finished as of MD kernel reshape semantics. Such reshaping involves moving a window forward starting at BOD reading content from previous lesser stripes and writing them back in the new layout with more stripes. Once that process finishes at end of previous data, the grown size may be announced and used. In order to avoid writing over any existing data in place, out-of-place space is added to the beginning of each data device by lvm2 before starting the reshape process. That reshape space wasn't taken into acount for data device size calculation. Fixes resulting from above: - correct event handling conditions in do_table_event() to set the device's capacity after the stripe adding reshape ended - subtract mentioned out-of-place space doing data device and array size calculations - conditionally set capacity as of superblock in preresume Testing: - passes all LVM2 RAID tests including new lvconvert-raid-reshape-size.sh one Tested-by: Heinz Mauelshagen Signed-off-by: Heinz Mauelshagen Signed-off-by: Mikulas Patocka commit 453496b899b5f62ff193bca46097f0f7211cec46 Author: Heinz Mauelshagen Date: Tue Jul 9 13:56:12 2024 +0200 dm raid: move _get_reshape_sectors() as prerequisite to fixing reshape size issues rs_set_dev_and_array_sectors() needs this function to calculate device and array size properly in case leg data devices have out-of-place reshape space allocated. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mikulas Patocka commit 6a6c56130aaaeb893a237b2db058251d0f2800de Author: Mikulas Patocka Date: Mon Jul 8 22:06:58 2024 +0200 dm-crypt: support for per-sector NVMe metadata Support per-sector NVMe metadata in dm-crypt. This commit changes dm-crypt, so that it can use NVMe metadata to store authentication information. We can put dm-crypt directly on the top of NVMe device, without using dm-integrity. This commit improves write throughput twice, becase the will be no writes to the dm-integrity journal. Signed-off-by: Mikulas Patocka commit a48f6b82c5c444b6c4e2f3394c7e5719031c6b00 Author: Benjamin Marzinski Date: Thu Jul 4 16:18:44 2024 +0200 dm mpath: don't call dm_get_device in multipath_message When mutipath_message is called with an action and a device, it needs to find the pgpath that matches that device. dm_get_device() is not the right function for this. dm_get_device() will look for a table_device matching the requested path in use by either the live or inactive table. If it doesn't find the device, dm_get_device() will open it and add it to the table. Means that multipath_message will accept any block device, add it to the table if not present, and then look through the pgpaths to see if it finds a match. Afterwards it will remove the device if it was not previously in the table devices list. This is the only function that can modify the device list of a table besides the constructors and destructors, and it can only do this when it was passed an invalid message. Instead, multipath_message() should call dm_devt_from_path() to get the device dev_t, and match that against its pgpaths. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit a21f9edb13b0d8066775cbd5efa7261e41871182 Author: Benjamin Marzinski Date: Thu Jul 4 16:17:15 2024 +0200 dm: factor out helper function from dm_get_device Factor out a helper function, dm_devt_from_path(), from dm_get_device() for use in dm targets. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 3708c7269593b836b1d684214cd9f5d83e4ed3fd Author: Eric Biggers Date: Thu Jul 4 16:09:57 2024 +0200 dm-verity: fix dm_is_verity_target() when dm-verity is builtin When CONFIG_DM_VERITY=y, dm_is_verity_target() returned true for any builtin dm target, not just dm-verity. Fix this by checking for verity_target instead of THIS_MODULE (which is NULL for builtin code). Fixes: b6c1c5745ccc ("dm: Add verity helpers for LoadPin") Cc: stable@vger.kernel.org Cc: Matthias Kaehlcke Cc: Kees Cook Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit 9d45db03acf9cee4f83148c403d105b1a38a0f23 Author: Damien Le Moal Date: Thu Jul 4 15:45:25 2024 +0200 dm: Remove max_secure_erase_granularity The max_secure_erase_granularity boolean of struct dm_target is used in __process_abnormal_io() but never set by any target. Remove this field and the dead code using it. Signed-off-by: Damien Le Moal Signed-off-by: Mikulas Patocka commit 396a27e91265a6632be17bebacb6743f0b9447be Author: Damien Le Moal Date: Thu Jul 4 15:45:00 2024 +0200 dm: Remove max_write_zeroes_granularity The max_write_zeroes_granularity boolean of struct dm_target is used in __process_abnormal_io() but never set by any target. Remove this field and the dead code using it. Signed-off-by: Damien Le Moal Signed-off-by: Mikulas Patocka commit 7017ded001076593e03540840a5f5b80209bab67 Author: Jiapeng Chong Date: Fri May 24 15:41:09 2024 +0800 dm vdo indexer: use swap() instead of open coding it Use existing swap() macro rather than duplicating its implementation. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9173 Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit b956d1a30f77bdeb7b7931bad0cee5fa8db25cbc Author: Dr. David Alan Gilbert Date: Thu May 23 22:07:16 2024 +0100 dm vdo: remove unused struct 'uds_attribute' 'uds_attribute' is unused since commit a9da0fb6d8c6 ("dm vdo: remove all sysfs interfaces"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit 0a94a469a4f02bdcc223517fd578810ffc21c548 Author: Christoph Hellwig Date: Wed Jul 3 15:12:08 2024 +0200 dm: stop using blk_limits_io_{min,opt} Remove use of the blk_limits_io_{min,opt} and assign the values directly to the queue_limits structure. For the io_opt this is a completely mechanical change, for io_min it removes flooring the limit to the physical and logical block size in the particular caller. But as blk_validate_limits will do the same later when actually applying the limits, there still is no change in overall behavior. Signed-off-by: Christoph Hellwig Signed-off-by: Mikulas Patocka commit 0d815e3400e631d227a3a95968b8c8e7e0c0ef9e Author: Mikulas Patocka Date: Wed Jul 3 15:00:29 2024 +0200 dm-crypt: limit the size of encryption requests There was a performance regression reported where dm-crypt would perform worse on new kernels than on old kernels. The reason is that the old kernels split the bios to NVMe request size (that is usually 65536 or 131072 bytes) and the new kernels pass the big bios through dm-crypt and split them underneath. If a big 1MiB bio is passed to dm-crypt, dm-crypt processes it on a single core without parallelization and this is what causes the performance degradation. This commit introduces new tunable variables /sys/module/dm_crypt/parameters/max_read_size and /sys/module/dm_crypt/parameters/max_write_size that specify the maximum bio size for dm-crypt. Bios larger than this value are split, so that they can be encrypted in parallel by multiple cores. If these variables are '0', a default 131072 is used. Splitting bios may cause performance regressions in other workloads - if this happens, the user should increase the value in max_read_size and max_write_size variables. max_read_size: 128k 2399MiB/s 256k 2368MiB/s 512k 1986MiB/s 1024 1790MiB/s max_write_size: 128k 1712MiB/s 256k 1651MiB/s 512k 1537MiB/s 1024k 1332MiB/s Note that if you run dm-crypt inside a virtual machine, you may need to do "echo numa >/sys/module/workqueue/parameters/default_affinity_scope" to improve performance. Signed-off-by: Mikulas Patocka Tested-by: Laurence Oberman commit 83c2ec72efa29b0e508dfe56d3198c28cc44387c Merge: 233323f9b9f82 c7cfe9bfceb7a Author: Rafael J. Wysocki Date: Wed Jul 10 13:05:40 2024 +0200 Merge back ACPI processor driver material for 6.11. commit 9dabb5b48fe5e7bf74ee4d1912c0403cf12885d4 Merge: d92467ad9d9ee 7ad9eab9d4b29 Author: Rafael J. Wysocki Date: Wed Jul 10 13:03:11 2024 +0200 Merge back cpufreq material for 6.11. commit 462be1c353400fa0bdd34c19897cf001ba6a5f60 Merge: 94eacc1c583dd efde8bfdc1c76 Author: Rafael J. Wysocki Date: Wed Jul 10 13:01:38 2024 +0200 Merge back thermal control material for 6.11. commit 1c076f1f4d7fc7cfb45dba10b3b49d574b4c4c28 Author: Hongzhen Luo Date: Wed Jul 10 16:34:59 2024 +0800 erofs: get rid of z_erofs_map_blocks_iter_* tracepoints Consolidate them under erofs_map_blocks_* for simplicity since we have many other ways to know if a given inode is compressed or not. Signed-off-by: Hongzhen Luo Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20240710083459.208362-1-hongzhen@linux.alibaba.com Signed-off-by: Gao Xiang commit 408ac28c62f0b869d5477be12dd9eddc0c37242e Author: Johannes Berg Date: Tue Jul 9 16:08:50 2024 +0200 wifi: mac80211: fix AP chandef capturing in CSA When the CSA is announced with only HT elements, the AP chandef isn't captured correctly, leading to crashes in the later code that checks for TPE changes during CSA. Capture the AP chandef correctly in both cases to fix this. Reported-by: Jouni Malinen Fixes: 4540568136fe ("wifi: mac80211: handle TPE element during CSA") Link: https://patch.msgid.link/20240709160851.47805f24624d.I024091f701447f7921e93bb23b46e01c2f46347d@changeid Signed-off-by: Johannes Berg commit 003eae5a28c6c9d50290a4ac9b955be912f24c9f Author: Benjamin Berg Date: Tue Jul 9 14:31:49 2024 +0200 wifi: iwlwifi: correctly reference TSO page information The code got copied from get_workaround_page, but here p->page is the correct way to reference the page. Signed-off-by: Benjamin Berg Fixes: adc902ceada2 ("wifi: iwlwifi: keep the TSO and workaround pages mapped") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202407062135.NNjnmMdR-lkp@intel.com/ Link: https://patch.msgid.link/20240709123149.1848315-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 12a01f66f0910aee3e8cbdb35f4d6351be2fc8dd Author: Ard Biesheuvel Date: Wed Jul 10 12:22:46 2024 +0200 arm64/efistub: Clean up KASLR logic Clean up some redundant code in the KASLR placement handling logic. No functional change intended. Signed-off-by: Ard Biesheuvel commit ce2f84ebcd857556f5ae9fc2d4ac720df1eb49d1 Merge: 40ab9e0dc8653 0ebc581f8a4b7 Author: David S. Miller Date: Wed Jul 10 11:13:04 2024 +0100 Merge branch 'aquantia-phy-aqr115c' into main Bartosz Golaszewski says: ==================== net: phy: aquantia: enable support for aqr115c This series addesses two issues with the aqr115c PHY on Qualcomm sa8775p-ride-r3 board and adds support for this PHY to the aquantia driver. While the manufacturer calls the 2.5G PHY mode OCSGMII, we reuse the existing 2500BASEX mode in the kernel to avoid extending the uAPI. It took me a while to resend because I noticed an issue with the PHY coming out of suspend with no possible interfaces listed and tracked it to the GLOBAL_CFG registers for different modes returning 0. A workaround has been added to the series. Unfortunately the HPG doesn't mention a proper way of doing it or even mention any such issue at all. Changes since v2: - add a patch that addresses an issue with GLOBAL_CFG registers returning 0 - reuse aqr113c_config_init() for aqr115c - improve commit messages, give more details on the 2500BASEX mode reuse Link to v2: https://lore.kernel.org/lkml/Zn4Nq1QvhjAUaogb@makrotopia.org/T/ Changes since v1: - split out the PHY patches into their own series - don't introduce new mode (OCSGMII) but use existing 2500BASEX instead - split the wait-for-FW patch into two: one renaming and exporting the relevant function and the second using it before checking the FW ID Link to v1: https://lore.kernel.org/linux-arm-kernel/20240619184550.34524-1-brgl@bgdev.pl/T/ ==================== Signed-off-by: David S. Miller commit b8ec9dba02a74797421c52b1226b23a4302362a6 Author: Frank Li Date: Mon Jul 1 15:57:16 2024 -0400 dt-bindings: fsl-qdma: fix interrupts 'if' check logic All compatible string include 'fsl,ls1021a-qdma'. Previous if check are always true. if: properties: compatible: contains: enum: - fsl,ls1021a-qdma Change to check other compatible strings to get correct logic and fix below CHECK_DTB warnings. arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dtb: dma-controller@8380000: interrupts: [[0, 43, 4], [0, 251, 4], [0, 252, 4], [0, 253, 4], [0, 254, 4]] is too long Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240701195717.1843041-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 5bcf62748f37b81fb41b112cc87c2788c8ddd972 Author: Stanislav Jakubek Date: Thu Jul 4 21:20:26 2024 +0200 dt-bindings: dma: sprd,sc9860-dma: convert to YAML Convert the Spreadtrum SC9860 DMA bindings to DT schema. Changes during conversion: - rename file to match compatible - make interrupts optional, the AGCP DMA controller doesn't need it - describe the optional ashb_eb clock for the AGCP DMA controller Signed-off-by: Stanislav Jakubek Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/Zob1+kGW1xeBKehA@standask-GA-A55M-S2HP Signed-off-by: Vinod Koul commit 492ac37fa38faf520b5beae44c930063265ee183 Author: Bibo Mao Date: Wed Jul 10 16:50:27 2024 +0800 perf kvm: Add kvm-stat for loongarch64 Add support for 'perf kvm stat' on loongarch64 platform, now only kvm exit event is supported. Here is example output about "perf kvm --host stat report" command Event name Samples Sample% Time (ns) Time% Mean Time (ns) Mem Store 83969 51.00% 625697070 8.00% 7451 Mem Read 37641 22.00% 112485730 1.00% 2988 Interrupt 15542 9.00% 20620190 0.00% 1326 IOCSR 15207 9.00% 94296190 1.00% 6200 Hypercall 4873 2.00% 12265280 0.00% 2516 Idle 3713 2.00% 6322055860 87.00% 1702681 FPU 1819 1.00% 2750300 0.00% 1511 Inst Fetch 502 0.00% 1341740 0.00% 2672 Mem Modify 324 0.00% 602240 0.00% 1858 CPUCFG 55 0.00% 77610 0.00% 1411 CSR 12 0.00% 19690 0.00% 1640 LASX 3 0.00% 4870 0.00% 1623 LSX 2 0.00% 2100 0.00% 1050 Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit dbf35b4deabb5706e739cec7ce35c12631bb8c87 Merge: 62a05f4ae9c1f 32a120f52a4c0 Author: Daniel Vetter Date: Wed Jul 10 10:36:46 2024 +0200 Merge tag 'drm-intel-next-2024-06-28' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next drm/i915 feature pull #2 for v6.11: Features and functionality: - More eDP Panel Replay enabling (Jouni) - Add async flip and flip done tracepoints (Ville) Refactoring and cleanups: - Clean up BDW+ pipe interrupt register definitions (Ville) - Prep work for DSB based plane programming (Ville) - Relocate encoder suspend/shutdown helpers (Imre) - Polish plane surface alignment handling (Ville) Fixes: - Enable more fault interrupts on TGL+/MTL+ (Ville) - Fix CMRR 32-bit build (Mitul) - Fix PSR Selective Update Region Scan Line Capture Indication (Jouni) - Fix cursor fb unpinning (Maarten, Ville) - Fix Cx0 PHY PLL state verification in TBT mode (Imre) - Fix unnecessary MG DP programming on MTL+ Type-C (Imre) DRM changes: - Rename drm_plane_check_pixel_format() to drm_plane_has_format() and export (Ville) - Add drm_vblank_work_flush_all() (Maarten) Xe driver changes: - Call encoder .suspend_complete() hook also on Xe (Imre) Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/875xttazx2.fsf@intel.com commit b1263411112305acf2af728728591465becb45b0 Author: Miguel Ojeda Date: Tue Jul 9 18:06:08 2024 +0200 docs: rust: quick-start: add section on Linux distributions Now that we are starting to support several Rust compiler and `bindgen` versions, there is a good chance some Linux distributions work out of the box. Thus, provide some instructions on how to set the toolchain up for a few major Linux distributions. This simplifies the setup users need to build the kernel. In addition, add an introduction to the document so that it is easier to understand its structure and move the LLVM+Rust kernel.org toolchains paragraph there (removing "depending on the Linux version"). We may want to reorganize the document or split it in the future, but I wanted to focus this commit on the new information added about each particular distribution. Finally, remove the `rustup`'s components mention in `changes.rst` since users do not need it if they install the toolchain via the distributions (and anyway it was too detailed for that main document). Cc: Jan Alexander Steffens Cc: Johannes Löthberg Cc: Fabian Grünbichler Cc: Josh Stone Cc: Randy Barlow Cc: Anna (navi) Figueiredo Gomes Cc: Matoro Mahri Cc: Ryan Scheel Cc: figsoda Cc: Jörg Thalheim Cc: Theodore Ni <43ngvg@masqt.com> Cc: Winter Cc: William Brown Cc: Xiaoguang Wang Cc: Andrea Righi Cc: Zixing Liu Cc: Nathan Chancellor Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-14-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 981ad93c89a3c600dee9795d3ead105acc805483 Author: Miguel Ojeda Date: Tue Jul 9 18:06:05 2024 +0200 rust: warn about `bindgen` versions 0.66.0 and 0.66.1 `bindgen` versions 0.66.0 and 0.66.1 panic due to C string literals with NUL characters [1]: panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.66.0/codegen/mod.rs:717:71: called `Result::unwrap()` on an `Err` value: FromBytesWithNulError { kind: InteriorNul(4) } Thus, in preparation for supporting several `bindgen` versions, add a version check to warn the user about it. Since some distributions may have patched it (e.g. Debian did [2]), check if that seems to be the case (after the version check matches), in order to avoid printing a warning in that case. We could make it an error, but 1) it is going to fail anyway later in the build, 2) we would disable `RUST`, which is also painful, 3) someone could have patched it in a way that still makes our extra check fail (however unlikely), 4) the interior NUL may go away in the headers (however unlikely). Thus just warn about it so that users know why it is failing. In addition, add a couple tests for the new cases. Link: https://github.com/rust-lang/rust-bindgen/pull/2567 [1] Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069047 [2] Link: https://lore.kernel.org/r/20240709160615.998336-11-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit c844fa64a2d46982fe75e834f4a46c46d2b3b2e5 Author: Miguel Ojeda Date: Tue Jul 9 18:06:04 2024 +0200 rust: start supporting several `bindgen` versions With both the workaround for `bindgen` 0.69.0 and the warning about 0.66.0 and 0.66.1 in place, start supporting several `bindgen` versions, like it was done for the Rust compiler in a previous patch. All other versions, including the latest 0.69.4, build without errors. The `bindgen` project, like Rust, has also agreed to have the kernel in their CI [1] -- thanks! This should help both projects: `bindgen` will be able to detect early issues like those mentioned above, and the kernel will be very likely build with new releases (at least for the basic configuration being tested). Link: https://github.com/rust-lang/rust-bindgen/pull/2851 [1] Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-10-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 9e98db17837093cb0f4dcfcc3524739d93249c45 Author: Miguel Ojeda Date: Tue Jul 9 18:06:03 2024 +0200 rust: work around `bindgen` 0.69.0 issue `bindgen` 0.69.0 contains a bug: `--version` does not work without providing a header [1]: error: the following required arguments were not provided:
Usage: bindgen
-- ... Thus, in preparation for supporting several `bindgen` versions, work around the issue by passing a dummy argument. Include a comment so that we can remove the workaround in the future. Link: https://github.com/rust-lang/rust-bindgen/pull/2678 [1] Reviewed-by: Finn Behrens Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-9-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit d49082faf6a001019693a837dea7b958048c731c Author: Miguel Ojeda Date: Tue Jul 9 18:06:02 2024 +0200 rust: avoid assuming a particular `bindgen` build `bindgen`'s logic to find `libclang` (via `clang-sys`) may change over time, and depends on how it was built (e.g. Linux distributions may decide to build it differently, and we are going to provide documentation on installing it via distributions later in this series). Therefore, clarify that `bindgen` may be built in several ways and simplify the documentation by only mentioning the most prominent environment variable (`LIBCLANG_PATH`) as an example on how to tweak the search of the library at runtime (i.e. when `bindgen` is built as our documentation explains). This also avoids duplicating the documentation, like `bindgen` itself does (i.e. it refers to `clang-sys`). Similarly, replace the test we had for this (which used the real program) with a mocked one, to avoid depending on the particular build as well. Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-8-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 63b27f4a0074bc6ef987a44ee9ad8bf960b568c2 Author: Miguel Ojeda Date: Tue Jul 9 18:06:01 2024 +0200 rust: start supporting several compiler versions It is time to start supporting several Rust compiler versions and thus establish a minimum Rust version. We may still want to upgrade the minimum sometimes in the beginning since there may be important features coming into the language that improve how we write code (e.g. field projections), which may or may not make sense to support conditionally. We will start with a window of two stable releases, and widen it over time. Thus this patch does not move the current minimum (1.78.0), but instead adds support for the recently released 1.79.0. This should already be enough for kernel developers in distributions that provide recent Rust compiler versions routinely, such as Arch Linux, Debian Unstable (outside the freeze period), Fedora Linux, Gentoo Linux (especially the testing channel), Nix (unstable) and openSUSE Tumbleweed. See the documentation patch about it later in this series. In addition, Rust for Linux is now being built-tested in Rust's pre-merge CI [1]. That is, every change that is attempting to land into the Rust compiler is tested against the kernel, and it is merged only if it passes -- thanks to the Rust project for that! Thus, with the pre-merge CI in place, both projects hope to avoid unintentional changes to Rust that break the kernel. This means that, in general, apart from intentional changes on their side (that we will need to workaround conditionally on our side), the upcoming Rust compiler versions should generally work. For instance, currently, the beta (1.80.0) and nightly (1.81.0) branches work as well. Of course, the Rust for Linux CI job in the Rust toolchain may still need to be temporarily disabled for different reasons, but the intention is to help bring Rust for Linux into stable Rust. Link: https://github.com/rust-lang/rust/pull/125209 [1] Reviewed-by: Finn Behrens Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-7-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit bb421b517e4b05d1e971c1fbf6af2f241accbf52 Author: Miguel Ojeda Date: Tue Jul 9 18:06:00 2024 +0200 rust: simplify Clippy warning flags set All Clippy lint groups that we enable, except `correctness`, have a default `warn` level, thus they may be removed now that we relaxed all lints to `warn`. Moreover, Clippy provides an `all` lint group that covers the groups we enable by default. Thus just use `all` instead -- the only change is that, if Clippy introduces a new lint group or splits an existing one, we will cover that one automatically. In addition, `let_unit_value` is in `style` since Rust 1.62.0, thus it does not need to be enabled manually. Reviewed-by: Finn Behrens Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-6-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit f8f88aa25a03ce1e0fc8a9842840988b870f0c37 Author: Miguel Ojeda Date: Tue Jul 9 18:05:59 2024 +0200 rust: relax most deny-level lints to warnings Since we are starting to support several Rust toolchains, lints (including Clippy ones) now may behave differently and lint groups may include new lints. Therefore, to maximize the chances a given version works, relax some deny-level lints to warnings. It may also make our lives a bit easier while developing new code or refactoring. To be clear, the requirements for in-tree code are still the same, since Rust code still needs to be warning-free (patches should be clean under `WERROR=y`) and the set of lints is not changed. `unsafe_op_in_unsafe_fn` is left unmodified, i.e. as an error, since it is becoming the default in the language (warn-by-default in Rust 2024 [1] and ideally an error later on) and thus it should also be very well tested. In addition, it is simple enough that it should not have false positives (unlike e.g. `rust_2018_idioms`'s `explicit_outlives_requirements`). `non_ascii_idents` is left unmodified as well, i.e. as an error, since it is unlikely one gains any productivity during development if it were a warning (in fact, it may be worse, since it is likely one made a typo). In addition, it should not have false positives. Finally, put the two `-D` ones at the top and take the chance to do one per line. Link: https://github.com/rust-lang/rust/pull/112038 [1] Reviewed-by: Finn Behrens Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-5-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit f85bea18f71b2817ea45d63c6d1b91f9bc4a811f Author: Miguel Ojeda Date: Tue Jul 9 18:05:58 2024 +0200 rust: allow `dead_code` for never constructed bindings Starting with the upcoming Rust 1.80.0 (since upstream commit 35130d7233e9 ("Detect pub structs never constructed and unused associated constants in traits")), the `dead_code` pass detects more cases, which triggers in the `bindings` crate: warning: struct `boot_params` is never constructed --> rust/bindings/bindings_generated.rs:10684:12 | 10684 | pub struct boot_params { | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default As well as in the `uapi` one: warning: struct `boot_params` is never constructed --> rust/uapi/uapi_generated.rs:10392:12 | 10392 | pub struct boot_params { | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default These are all expected, since we do not use all the structs in the bindings that `bindgen` generates from the C headers. Therefore, allow them. Reviewed-by: Björn Roy Baron Reviewed-by: Finn Behrens Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-4-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit dee1396a486cf2b6e7840322f6d104680649f2ff Author: Miguel Ojeda Date: Tue Jul 9 18:05:57 2024 +0200 rust: init: simplify from `map_err` to `inspect_err` A new complexity lint, `manual_inspect` [1], has been introduced in the upcoming Rust 1.81 (currently in nightly), which checks for uses of `map*` which return the original item: error: --> rust/kernel/init.rs:846:23 | 846 | (self.1)(val).map_err(|e| { | ^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect = note: `-D clippy::manual-inspect` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::manual_inspect)]` help: try | 846 ~ (self.1)(val).inspect_err(|e| { 847 | // SAFETY: `slot` was initialized above. 848 ~ unsafe { core::ptr::drop_in_place(slot) }; | Thus clean them up. Link: https://rust-lang.github.io/rust-clippy/master/index.html#/manual_inspect [1] Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-3-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit e516211f615fb54ce3429870eefc17469ae289b8 Author: Miguel Ojeda Date: Tue Jul 9 18:05:56 2024 +0200 rust: macros: indent list item in `paste!`'s docs A new style lint, `doc_lazy_continuation` [1], has been introduced in the upcoming Rust 1.80 (currently in beta), which detects missing indentation in code documentation. We have one such case: error: doc list item missing indentation --> rust/macros/lib.rs:315:5 | 315 | /// default the span of the `[< >]` group is used. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `-D clippy::doc-lazy-continuation` implied by `-D clippy::style` = help: to override `-D clippy::style` add `#[allow(clippy::doc_lazy_continuation)]` help: indent this line | 315 | /// default the span of the `[< >]` group is used. | ++ While the rendering of the docs by `rustdoc` is not affected, we apply this kind of indentation elsewhere since it looks better. Thus clean it up. Link: https://rust-lang.github.io/rust-clippy/master/index.html#/doc_lazy_continuation [1] Reviewed-by: Björn Roy Baron Reviewed-by: Finn Behrens Tested-by: Benno Lossin Tested-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240709160615.998336-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit c9add2e607a1ca63cc84bd1a7ab04d513096f37e Author: Greg Kroah-Hartman Date: Wed Jul 10 09:34:14 2024 +0200 zorro: make match function take a const pointer In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match callback for busses was changed to take a const pointer to struct device_driver. Unfortunately I missed fixing up the zorro code, and was only noticed after-the-fact by the kernel test robot. Resolve this issue by properly changing the zorro_bus_match() function. Cc: Geert Uytterhoeven Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Reported-by: kernel test robot Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240710073413.495541-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2a1bd7a180ed9d5ab5688c8ecab074f6589ef5cf Author: Wolfram Sang Date: Sun Jul 7 10:28:48 2024 +0200 i2c: rcar: minor changes to adhere to coding style A newline was missing and closing braces of functions do not need a semicolon. Signed-off-by: Wolfram Sang Signed-off-by: Andi Shyti commit 3291d2327e4f1e83f290c26ab7e9d17fd8e1bb2e Author: Wolfram Sang Date: Sun Jul 7 10:28:47 2024 +0200 i2c: rcar: WARN about spurious irqs The FIXME is very old and probably needed because of some driver bug like insufficient initialization. It may well be that it was fixed meanwhile but we never know because the spurious irq is silently ignored. Add now a call trace when this happens so we have more information in case the issue still exists. Signed-off-by: Wolfram Sang Signed-off-by: Andi Shyti commit 67c1ba551eed771d18c48b7bf7e97379ad8f616d Author: Greg Kroah-Hartman Date: Mon Jul 8 10:15:47 2024 +0200 driver core: module: make module_[add|remove]_driver take a const * The functions module_add_driver() and module_remove_driver() do not modify the struct device_driver structure directly, so they are safe to be marked as a constant pointer type. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/2024070850-entering-grandson-205e@gregkh Signed-off-by: Greg Kroah-Hartman commit f8fb469147e7db57e3f78d46f3f427705b4a1935 Author: Greg Kroah-Hartman Date: Mon Jul 8 10:15:46 2024 +0200 driver core: make driver_find_device() take a const * The function driver_find_device() does not modify the struct device_driver structure directly, so it is safe to be marked as a constant pointer type. As that is fixed up, also change the function signature on the inline functions that call this, which are: driver_find_device_by_name() driver_find_device_by_of_node() driver_find_device_by_devt() driver_find_next_device() driver_find_device_by_acpi_dev() Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/2024070849-broken-front-9eb5@gregkh Signed-off-by: Greg Kroah-Hartman commit ab7a880263c30b1675850a584c206770f5545c2f Author: Greg Kroah-Hartman Date: Mon Jul 8 10:15:45 2024 +0200 driver core: make driver_[create|remove]_file take a const * The functions driver_create_file() and driver_remove_file() do not modify the struct device_driver structure directly, so they are safe to be marked as a constant pointer type. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/2024070844-volley-hatchling-c812@gregkh Signed-off-by: Greg Kroah-Hartman commit a23b018c3bf646274f02edd46bf448c20c826d94 Author: Danilo Krummrich Date: Mon Jul 8 22:07:21 2024 +0200 firmware_loader: fix soundness issue in `request_internal` `request_internal` must be called with one of the following function pointers: request_firmware(), firmware_request_nowarn(), firmware_request_platform() or request_firmware_direct(). The previous `FwFunc` alias did not guarantee this, which is unsound. In order to fix this up, implement `FwFunc` as new type with a corresponding type invariant. Reported-by: Gary Guo Closes: https://lore.kernel.org/lkml/20240620143611.7995e0bb@eugeo/ Signed-off-by: Danilo Krummrich Reviewed-by: Christian Schrefl Link: https://lore.kernel.org/r/20240708200724.3203-2-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit 2c61b8c51d21d1b10c2881aa9c9918ff49f6fb7d Author: Danilo Krummrich Date: Mon Jul 8 22:07:20 2024 +0200 firmware_loader: annotate doctests as `no_run` The doctests of `Firmware` are compile-time only tests, since they require a proper `Device` and a valid path to a (firmware) blob in order to do something sane on runtime - we can't satisfy both of those requirements. Hence, configure the example as `no_run`. Unfortunately, the kernel's Rust build system can't consider the `no_run` attribute yet. Hence, for the meantime, wrap the example code into a new function and never actually call it. Fixes: de6582833db0 ("rust: add firmware abstractions") Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240708200724.3203-1-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit c537fb4e3d36e7cd1a0837dd577cd30d3d64f1bc Author: Thomas Zimmermann Date: Mon Jul 8 16:21:37 2024 +0200 drm/qxl: Pin buffer objects for internal mappings Add qxl_bo_pin_and_vmap() that pins and vmaps a buffer object in one step. Update callers of the regular qxl_bo_vmap(). Fixes a bug where qxl accesses an unpinned buffer object while it is being moved; such as with the monitor-description BO. An typical error is shown below. [ 4.303586] [drm:drm_atomic_helper_commit_planes] *ERROR* head 1 wrong: 65376256x16777216+0+0 [ 4.586883] [drm:drm_atomic_helper_commit_planes] *ERROR* head 1 wrong: 65376256x16777216+0+0 [ 4.904036] [drm:drm_atomic_helper_commit_planes] *ERROR* head 1 wrong: 65335296x16777216+0+0 [ 5.374347] [drm:qxl_release_from_id_locked] *ERROR* failed to find id in release_idr Commit b33651a5c98d ("drm/qxl: Do not pin buffer objects for vmap") removed the implicit pin operation from qxl's vmap code. This is the correct behavior for GEM and PRIME interfaces, but the pin is still needed for qxl internal operation. Also add a corresponding function qxl_bo_vunmap_and_unpin() and remove the old qxl_bo_vmap() helpers. Future directions: BOs should not be pinned or vmapped unnecessarily. The pin-and-vmap operation should be removed from the driver and a temporary mapping should be established with a vmap_local-like helper. See the client helper drm_client_buffer_vmap_local() for semantics. v2: - unreserve BO on errors in qxl_bo_pin_and_vmap() (Dmitry) Signed-off-by: Thomas Zimmermann Fixes: b33651a5c98d ("drm/qxl: Do not pin buffer objects for vmap") Reported-by: David Kaplan Closes: https://lore.kernel.org/dri-devel/ab0fb17d-0f96-4ee6-8b21-65d02bb02655@suse.de/ Tested-by: David Kaplan Reviewed-by: Daniel Vetter Cc: Thomas Zimmermann Cc: Dmitry Osipenko Cc: Christian König Cc: Zack Rusin Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux.dev Cc: spice-devel@lists.freedesktop.org Reviewed-by: Dmitry Osipenko Reviewed-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20240708142208.194361-1-tzimmermann@suse.de commit 5bd8d7071e54580a20268ffb661dafd06e1d557e Author: Jeff Johnson Date: Tue Jul 9 14:39:11 2024 -0700 HID: add more missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-holtek-mouse.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-ite.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-kensington.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-keytouch.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-kye.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lcpower.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lenovo.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-winwing.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/20240709-md-drivers-hid-v2-1-67faf2f2ec90@quicinc.com Signed-off-by: Benjamin Tissoires commit 500c20fe3ea4a241f7ea58a414343367ab2e4085 Author: Wolfram Sang Date: Thu Jul 4 05:28:59 2024 +0200 i2c: add debug message for detected HostNotify alerts Setting up HostNotify can be tricky. Support debugging by stating when a HostNotify alert was received independent of the irq being mapped. Especially useful with the in-kernel i2c testunit. Update documentation as well. Signed-off-by: Wolfram Sang Reviewed-by: Andi Shyti commit 711703013e340caac3e4a6a3a605324691292621 Merge: 97ca843f6ad38 3a9ba4e32230d Author: Wolfram Sang Date: Wed Jul 10 08:26:55 2024 +0200 Merge tag 'at24-updates-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-mergewindow at24 updates for v6.11-rc1 - add support for two new Microchip models - document even more new models in DT bindings (those use fallback compatibles so no code changes) commit 3c1743a685b19bc17cf65af4a2eb149fd3b15c50 Author: Jeff Johnson Date: Sun Jun 2 17:05:31 2024 -0700 floppy: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/floppy.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Denis Efremov Link: https://lore.kernel.org/r/20240602-md-block-floppy-v1-1-bc628ea5eb84@quicinc.com Signed-off-by: Jens Axboe commit 7d4425d2c9db957f0040c255ba29db61b993b4db Author: Jeff Johnson Date: Sun Jun 2 17:15:09 2024 -0700 loop: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/loop.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-block-loop-v1-1-b9b7e2603e72@quicinc.com Signed-off-by: Jens Axboe commit c25a271c294b8f064f5628ea4fc3c6b8d47bf227 Author: Jeff Johnson Date: Sun Jun 2 17:23:26 2024 -0700 ublk_drv: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/ublk_drv.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20240602-md-block-ublk_drv-v1-1-995474cafff0@quicinc.com Signed-off-by: Jens Axboe commit 4c33e39f6201ab130719d44d6f6f25ec02e1b306 Author: Jeff Johnson Date: Sun Jun 2 17:37:28 2024 -0700 xen/blkback: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/xen-blkback/xen-blkback.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-block-xen-blkback-v1-1-6ff5b58bdee1@quicinc.com Signed-off-by: Jens Axboe commit f7c696a56cc7d70515774a24057b473757ec6089 Author: Thorsten Blum Date: Wed Jul 10 03:05:21 2024 +0200 io_uring/napi: Remove unnecessary s64 cast Since the do_div() macro casts the divisor to u32 anyway, remove the unnecessary s64 cast and fix the following Coccinelle/coccicheck warning reported by do_div.cocci: WARNING: do_div() does a 64-by-32 division, please consider using div64_s64 instead Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240710010520.384009-2-thorsten.blum@toblux.com Signed-off-by: Jens Axboe commit 7296f2301a057493e97b07739213c6e864f76891 Author: Michael Kelley Date: Mon Jul 8 12:41:00 2024 -0700 swiotlb: reduce swiotlb pool lookups With CONFIG_SWIOTLB_DYNAMIC enabled, each round-trip map/unmap pair in the swiotlb results in 6 calls to swiotlb_find_pool(). In multiple places, the pool is found and used in one function, and then must be found again in the next function that is called because only the tlb_addr is passed as an argument. These are the six call sites: dma_direct_map_page: 1. swiotlb_map -> swiotlb_tbl_map_single -> swiotlb_bounce dma_direct_unmap_page: 2. dma_direct_sync_single_for_cpu -> is_swiotlb_buffer 3. dma_direct_sync_single_for_cpu -> swiotlb_sync_single_for_cpu -> swiotlb_bounce 4. is_swiotlb_buffer 5. swiotlb_tbl_unmap_single -> swiotlb_del_transient 6. swiotlb_tbl_unmap_single -> swiotlb_release_slots Reduce the number of calls by finding the pool at a higher level, and passing it as an argument instead of searching again. A key change is for is_swiotlb_buffer() to return a pool pointer instead of a boolean, and then pass this pool pointer to subsequent swiotlb functions. There are 9 occurrences of is_swiotlb_buffer() used to test if a buffer is a swiotlb buffer before calling a swiotlb function. To reduce code duplication in getting the pool pointer and passing it as an argument, introduce inline wrappers for this pattern. The generated code is essentially unchanged. Since is_swiotlb_buffer() no longer returns a boolean, rename some functions to reflect the change: * swiotlb_find_pool() becomes __swiotlb_find_pool() * is_swiotlb_buffer() becomes swiotlb_find_pool() * is_xen_swiotlb_buffer() becomes xen_swiotlb_find_pool() With these changes, a round-trip map/unmap pair requires only 2 pool lookups (listed using the new names and wrappers): dma_direct_unmap_page: 1. dma_direct_sync_single_for_cpu -> swiotlb_find_pool 2. swiotlb_tbl_unmap_single -> swiotlb_find_pool These changes come from noticing the inefficiencies in a code review, not from performance measurements. With CONFIG_SWIOTLB_DYNAMIC, __swiotlb_find_pool() is not trivial, and it uses an RCU read lock, so avoiding the redundant calls helps performance in a hot path. When CONFIG_SWIOTLB_DYNAMIC is *not* set, the code size reduction is minimal and the perf benefits are likely negligible, but no harm is done. No functional change is intended. Signed-off-by: Michael Kelley Reviewed-by: Petr Tesarik Signed-off-by: Christoph Hellwig commit 044b45be04cb16125a0eccba532e88dc529f64de Author: Dan Carpenter Date: Mon Jul 8 13:05:38 2024 -0500 PCI: qcom: Prevent use of uninitialized data in qcom_pcie_suspend_noirq() Smatch complains that "ret" could be uninitialized if "pcie->icc_mem" is NULL and "pm_suspend_target_state == PM_SUSPEND_MEM". Silence this warning by initializing ret to zero. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-4-dan.carpenter@linaro.org Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Tested-by: Anders Roxell Reviewed-by: Manivannan Sadhasivam commit 9553636b5757789536d0d23c83e7fba11812f958 Author: Dan Carpenter Date: Mon Jul 8 13:05:37 2024 -0500 PCI: qcom: Prevent potential error pointer dereference Only call dev_pm_opp_put() if dev_pm_opp_find_freq_exact() succeeds; otherwise it leads to an error pointer dereference. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-3-dan.carpenter@linaro.org Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Tested-by: Anders Roxell Reviewed-by: Manivannan Sadhasivam commit 101e5c5c4e766901492b51c33b34af5f775b043f Author: Dan Carpenter Date: Mon Jul 8 13:05:36 2024 -0500 PCI: qcom: Fix missing error code in qcom_pcie_probe() Return a negative error code if dev_pm_opp_find_freq_floor() fails; don't return success. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-2-dan.carpenter@linaro.org Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Tested-by: Anders Roxell Reviewed-by: Manivannan Sadhasivam commit 2c3e842f125fc1c57cd2824840d04e401c0542c2 Author: Philipp Stanner Date: Thu Jun 13 13:50:22 2024 +0200 PCI: Give pcim_set_mwi() its own devres cleanup callback Managing pci_set_mwi() with devres can easily be done with its own callback, without the necessity to store any state about it in a device-related struct. Remove the MWI state from struct pci_devres. Give pcim_set_mwi() a separate devres cleanup callback. Link: https://lore.kernel.org/r/20240613115032.29098-10-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 1b9469cf15976a7cb7378caaa8a1772e7901514d Author: Philipp Stanner Date: Thu Jun 13 13:50:21 2024 +0200 PCI: Move struct pci_devres.pinned bit to struct pci_dev The bit describing whether the PCI device is currently pinned is stored in struct pci_devres. To clean up and simplify the PCI devres API, it's better if this information is stored in struct pci_dev. This will later permit simplifying pcim_enable_device(). Move the 'pinned' boolean bit to struct pci_dev. Restructure bits in struct pci_dev so the pm / pme fields are next to each other. Link: https://lore.kernel.org/r/20240613115032.29098-9-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 77f79ac8de0f490fca4f0a5f2e1e38eeee191f05 Author: Philipp Stanner Date: Thu Jun 13 13:50:20 2024 +0200 PCI: Remove struct pci_devres.enabled status bit The struct pci_devres has a separate boolean to track whether a device is enabled. That, however, can easily be tracked in an agnostic manner through the function pci_is_enabled(). Using it allows for simplifying the PCI devres implementation. Replace the separate 'enabled' status bit from struct pci_devres with calls to pci_is_enabled() at the appropriate places. Link: https://lore.kernel.org/r/20240613115032.29098-8-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 81fcf28e74a3ffda67a6896cd38843d80bc9ec68 Author: Philipp Stanner Date: Thu Jun 13 13:50:19 2024 +0200 PCI: Document hybrid devres hazards These functions: pci_request_region() pci_request_regions() pci_request_regions_exclusive() pci_request_selected_regions() pci_request_selected_regions_exclusive() pci_intx() are "hybrid" functions that are managed if pcim_enable_device() has been called, but unmanaged otherwise. This is confusing and has already caused a bug (in 8558de401b5f ("drm/vboxvideo: use managed pci functions")) because users believe all PCI functions, such as pci_iomap_range(), can become managed that way, which is not the case. Add comments to the relevant functions' docstrings that warn users about this behavior. Link: https://lore.kernel.org/r/20240613115032.29098-7-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas commit d47bde708086c77b1ceeb7643e600089f63dd03b Author: Philipp Stanner Date: Thu Jun 13 13:50:18 2024 +0200 PCI: Add managed pcim_request_region() These existing functions: pci_request_region() pci_request_selected_regions() pci_request_selected_regions_exclusive() are "hybrid" functions built on __pci_request_region() and are managed if pcim_enable_device() has been called, but unmanaged otherwise. Add these new functions: pcim_request_region() pcim_request_region_exclusive() These are *always* managed and use the new pcim_addr_devres tracking infrastructure instead of find_pci_dr() and struct pci_devres.region_mask. Implement the hybrid functions using the new "pure" functions and remove struct pci_devres.region_mask, which is no longer needed. Link: https://lore.kernel.org/r/20240613115032.29098-6-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas commit e354bb84a4c1cbb928e052260cc5ce12ec6722ff Author: Philipp Stanner Date: Thu Jun 13 13:50:17 2024 +0200 PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all() Deprecate pcim_iomap_table(). It returns a pointer to a table of ioremapped BARs, or NULL if it fails. This makes uses like this: addr = pcim_iomap_table(pdev)[0]; problematic because it causes a NULL pointer dereference on failure. Callers should use pcim_iomap() instead. Deprecate pcim_iomap_regions_request_all() because it is built on __pci_request_region() and is managed if pcim_enable_device() has been called, but unmanaged otherwise, which is prone to errors. Callers should either use pcim_iomap_regions() to request and map BARs, or use pcim_request_region() followed by pcim_iomap(). Link: https://lore.kernel.org/r/20240613115032.29098-5-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log, sphinx markup] Signed-off-by: Bjorn Helgaas commit bbaff68bf4a404bee5f5e20e7b1e30301b26304a Author: Philipp Stanner Date: Thu Jun 13 13:50:16 2024 +0200 PCI: Add managed partial-BAR request and map infrastructure The pcim_iomap_devres table tracks entire-BAR mappings, so we can't use it to build a managed version of pci_iomap_range(), which maps partial BARs. Add struct pcim_addr_devres, which can track request and mapping of both entire BARs and partial BARs. Add the following internal devres functions based on struct pcim_addr_devres: pcim_iomap_region() # request & map entire BAR pcim_iounmap_region() # unmap & release entire BAR pcim_request_region() # request entire BAR pcim_release_region() # release entire BAR pcim_request_all_regions() # request all entire BARs pcim_release_all_regions() # release all entire BARs Rework the following public interfaces using the new infrastructure listed above: pcim_iomap() # map partial BAR pcim_iounmap() # unmap partial BAR pcim_iomap_regions() # request & map specified BARs pcim_iomap_regions_request_all() # request all BARs, map specified BARs pcim_iounmap_regions() # unmap & release specified BARs Link: https://lore.kernel.org/r/20240613115032.29098-4-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas commit d5fe8207d8786142061fb18c8fb671b34649f114 Author: Philipp Stanner Date: Thu Jun 13 13:50:15 2024 +0200 PCI: Add devres helpers for iomap table The pcim_iomap_devres.table administrated by pcim_iomap_table() has its entries set and unset at several places throughout devres.c using manual iterations which are effectively code duplications. Add pcim_add_mapping_to_legacy_table() and pcim_remove_mapping_from_legacy_table() helper functions and use them where possible. Link: https://lore.kernel.org/r/20240613115032.29098-3-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit dee37e90b41f7b41a63b894ded5b3840a9dddbd7 Author: Philipp Stanner Date: Thu Jun 13 13:50:14 2024 +0200 PCI: Add and use devres helper for bit masks The current devres implementation uses manual shift operations to check whether a bit in a mask is set. The code can be made more readable by writing a small helper function for that. Implement mask_contains_bar() and use it where applicable. Link: https://lore.kernel.org/r/20240613115032.29098-2-pstanner@redhat.com Signed-off-by: Philipp Stanner Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 0ebc581f8a4b7e992bd3bab4d3ad4783245ad09c Author: Bartosz Golaszewski Date: Mon Jul 8 09:50:23 2024 +0200 net: phy: aquantia: add support for aqr115c Add support for a new model to the Aquantia driver. This PHY supports 2.5 gigabit speeds. The PHY mode is referred to by the manufacturer as Overclocked SGMII (OCSGMII) but this actually is just 2500BASEX without in-band signalling so reuse the existing mode to avoid changing the uAPI. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 708405f3e56e3bee086f46a43398ee300c36a1d8 Author: Bartosz Golaszewski Date: Mon Jul 8 09:50:22 2024 +0200 net: phy: aquantia: wait for the GLOBAL_CFG to start returning real values When the PHY is first coming up (or resuming from suspend), it's possible that although the FW status shows as running, we still see zeroes in the GLOBAL_CFG set of registers and cannot determine available modes. Since all models support 10M, add a poll and wait the config to become available. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit ad649a1fac37e390de5b4211b902ec666c4cd202 Author: Bartosz Golaszewski Date: Mon Jul 8 09:50:21 2024 +0200 net: phy: aquantia: wait for FW reset before checking the vendor ID Checking the firmware register before it complete the boot process makes no sense, it will report 0 even if FW is available from internal memory. Always wait for FW to boot before continuing or we'll unnecessarily try to load it from nvmem/filesystem and fail. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 663117327a39d1ad8be79d3c6451173c37e97c56 Author: Bartosz Golaszewski Date: Mon Jul 8 09:50:20 2024 +0200 net: phy: aquantia: rename and export aqr107_wait_reset_complete() This function is quite generic in this driver and not limited to aqr107. We will use it outside its current compilation unit soon so rename it and declare it in the header. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 605c96997d89c01c11bbddb4db820ede570581c7 Author: Matt Bobrowski Date: Tue Jul 9 21:09:39 2024 +0000 bpf: relax zero fixed offset constraint on KF_TRUSTED_ARGS/KF_RCU Currently, BPF kfuncs which accept trusted pointer arguments i.e. those flagged as KF_TRUSTED_ARGS, KF_RCU, or KF_RELEASE, all require an original/unmodified trusted pointer argument to be supplied to them. By original/unmodified, it means that the backing register holding the trusted pointer argument that is to be supplied to the BPF kfunc must have its fixed offset set to zero, or else the BPF verifier will outright reject the BPF program load. However, this zero fixed offset constraint that is currently enforced by the BPF verifier onto BPF kfuncs specifically flagged to accept KF_TRUSTED_ARGS or KF_RCU trusted pointer arguments is rather unnecessary, and can limit their usability in practice. Specifically, it completely eliminates the possibility of constructing a derived trusted pointer from an original trusted pointer. To put it simply, a derived pointer is a pointer which points to one of the nested member fields of the object being pointed to by the original trusted pointer. This patch relaxes the zero fixed offset constraint that is enforced upon BPF kfuncs which specifically accept KF_TRUSTED_ARGS, or KF_RCU arguments. Although, the zero fixed offset constraint technically also applies to BPF kfuncs accepting KF_RELEASE arguments, relaxing this constraint for such BPF kfuncs has subtle and unwanted side-effects. This was discovered by experimenting a little further with an initial version of this patch series [0]. The primary issue with relaxing the zero fixed offset constraint on BPF kfuncs accepting KF_RELEASE arguments is that it'd would open up the opportunity for BPF programs to supply both trusted pointers and derived trusted pointers to them. For KF_RELEASE BPF kfuncs specifically, this could be problematic as resources associated with the backing pointer could be released by the backing BPF kfunc and cause instabilities for the rest of the kernel. With this new fixed offset semantic in-place for BPF kfuncs accepting KF_TRUSTED_ARGS and KF_RCU arguments, we now have more flexibility when it comes to the BPF kfuncs that we're able to introduce moving forward. Early discussions covering the possibility of relaxing the zero fixed offset constraint can be found using the link below. This will provide more context on where all this has stemmed from [1]. Notably, pre-existing tests have been updated such that they provide coverage for the updated zero fixed offset functionality. Specifically, the nested offset test was converted from a negative to positive test as it was already designed to assert zero fixed offset semantics of a KF_TRUSTED_ARGS BPF kfunc. [0] https://lore.kernel.org/bpf/ZnA9ndnXKtHOuYMe@google.com/ [1] https://lore.kernel.org/bpf/ZhkbrM55MKQ0KeIV@google.com/ Signed-off-by: Matt Bobrowski Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20240709210939.1544011-1-mattbobrowski@google.com Signed-off-by: Alexei Starovoitov commit 02779af2419a91f847c22e488f8d13ec301cf833 Merge: 746d684ea5799 a459f4bb27f2e Author: Alexei Starovoitov Date: Tue Jul 9 19:00:25 2024 -0700 Merge branch 'fix-libbpf-bpf-skeleton-forward-backward-compat' Andrii Nakryiko says: ==================== Fix libbpf BPF skeleton forward/backward compat Fix recently identified (but long standing) bug with handling BPF skeleton forward and backward compatibility. On libbpf side, even though BPF skeleton was always designed to be forward and backwards compatible through recording actual size of constrituents of BPF skeleton itself (map/prog/var skeleton definitions), libbpf implementation did implicitly hard-code those sizes by virtue of using a trivial array access syntax. This issue will only affect libbpf used as a shared library. Statically compiled libbpfs will always be in sync with BPF skeleton, bypassing this problem altogether. This patch set fixes libbpf, but also mitigates the problem for old libbpf versions by teaching bpftool to generate more conservative BPF skeleton, if possible (i.e., if there are no struct_ops maps defined). v1->v2: - fix SOB, add acks, typo fixes (Quentin, Eduard); - improve reporting of skipped map auto-attachment (Alan, Eduard). ==================== Link: https://lore.kernel.org/r/20240708204540.4188946-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a459f4bb27f2e2730039c57786b82288742c8c74 Author: Andrii Nakryiko Date: Mon Jul 8 13:45:40 2024 -0700 libbpf: improve old BPF skeleton handling for map auto-attach Improve how we handle old BPF skeletons when it comes to BPF map auto-attachment. Emit one warn-level message per each struct_ops map that could have been auto-attached, if user provided recent enough BPF skeleton version. Don't spam log if there are no relevant struct_ops maps, though. This should help users realize that they probably need to regenerate BPF skeleton header with more recent bpftool/libbpf-cargo (or whatever other means of BPF skeleton generation). Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20240708204540.4188946-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 99fb9531886d8ffa0aa9a693089784c7338518a3 Author: Andrii Nakryiko Date: Mon Jul 8 13:45:39 2024 -0700 libbpf: fix BPF skeleton forward/backward compat handling BPF skeleton was designed from day one to be extensible. Generated BPF skeleton code specifies actual sizes of map/prog/variable skeletons for that reason and libbpf is supposed to work with newer/older versions correctly. Unfortunately, it was missed that we implicitly embed hard-coded most up-to-date (according to libbpf's version of libbpf.h header used to compile BPF skeleton header) sizes of those structs, which can differ from the actual sizes at runtime when libbpf is used as a shared library. We have a few places were we just index array of maps/progs/vars, which implicitly uses these potentially invalid sizes of structs. This patch aims to fix this problem going forward. Once this lands, we'll backport these changes in Github repo to create patched releases for older libbpfs. Acked-by: Eduard Zingerman Reviewed-by: Alan Maguire Fixes: d66562fba1ce ("libbpf: Add BPF object skeleton support") Fixes: 430025e5dca5 ("libbpf: Add subskeleton scaffolding") Fixes: 08ac454e258e ("libbpf: Auto-attach struct_ops BPF maps in BPF skeleton") Co-developed-by: Mykyta Yatsenko Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240708204540.4188946-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 06e71ad534881d2a09ced7509d2ab0daedac4c96 Author: Andrii Nakryiko Date: Mon Jul 8 13:45:38 2024 -0700 bpftool: improve skeleton backwards compat with old buggy libbpfs Old versions of libbpf don't handle varying sizes of bpf_map_skeleton struct correctly. As such, BPF skeleton generated by newest bpftool might not be compatible with older libbpf (though only when libbpf is used as a shared library), even though it, by design, should. Going forward libbpf will be fixed, plus we'll release bug fixed versions of relevant old libbpfs, but meanwhile try to mitigate from bpftool side by conservatively assuming older and smaller definition of bpf_map_skeleton, if possible. Meaning, if there are no struct_ops maps. If there are struct_ops, then presumably user would like to have auto-attaching logic and struct_ops map link placeholders, so use the full bpf_map_skeleton definition in that case. Acked-by: Quentin Monnet Co-developed-by: Mykyta Yatsenko Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20240708204540.4188946-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 40ab9e0dc86535acebe78ee3d38c576bc932df78 Author: Geert Uytterhoeven Date: Mon Jul 8 11:25:14 2024 +0200 netxen_nic: Use {low,upp}er_32_bits() helpers Use the existing {low,upp}er_32_bits() helpers instead of defining custom variants. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://patch.msgid.link/319d4a5313ac75f7bbbb6b230b6802b18075c3e0.1720430602.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit fe3e948954f434bf7bdb32836bfc50243b61d586 Merge: 8ce2dddbeb262 f1ac0b7dcd49e Author: Jakub Kicinski Date: Tue Jul 9 18:59:36 2024 -0700 Merge branch 'mlx5-misc-patches-2023-07-08' Tariq Toukan says: ==================== mlx5 misc patches 2023-07-08 This patchset contains features and small enhancements from the team to the mlx5 core and Eth drivers. ==================== Link: https://patch.msgid.link/20240708080025.1593555-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit f1ac0b7dcd49edf3ea5cc9345fdae70b6c2b199b Author: Cosmin Ratiu Date: Mon Jul 8 11:00:25 2024 +0300 net/mlx5e: CT: Initialize err to 0 to avoid warning It is theoretically possible to return bogus uninitialized values from mlx5_tc_ct_entry_replace_rules, even though in practice this will never be the case as the flow rule will be part of at least the regular ct table or the ct nat table, if not both. But to reduce noise, initialize err to 0. Fixes: 49d37d05f216 ("net/mlx5: CT: Separate CT and CT-NAT tuple entries") Signed-off-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240708080025.1593555-11-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 7204730b330460a3622bdbe038c492272d4d9a00 Author: Dragos Tatulea Date: Mon Jul 8 11:00:24 2024 +0300 net/mlx5e: SHAMPO, Add missing aggregate counter When the rx_hds_nodata_packets/bytes counters were added, the aggregate counters were omitted. This patch adds them. Fixes: e95c5b9e8912 ("net/mlx5e: SHAMPO, Add header-only ethtool counters for header data split") Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240708080025.1593555-10-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit e829a331ec28d194f1e2d7ea218c6be0a6be0e56 Author: Yevgeny Kliteynik Date: Mon Jul 8 11:00:23 2024 +0300 net/mlx5: DR, Remove definer functions from SW Steering API No need to expose definer get/put functions as part of SW Steering API - they are internal functions. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20240708080025.1593555-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 8ce2dddbeb262942ee61a1789b44e52f395803b2 Merge: 746d684ea5799 0970836c348b6 Author: Jakub Kicinski Date: Tue Jul 9 18:46:46 2024 -0700 Merge branch 'mlxsw-improvements' Petr Machata says: ==================== mlxsw: Improvements This patchset contains assortments of improvements to the mlxsw driver. Please see individual patches for details. ==================== Link: https://patch.msgid.link/cover.1720447210.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 0970836c348b6bc2ea77ce4348a136d6febfd440 Author: Ido Schimmel Date: Mon Jul 8 16:23:42 2024 +0200 mlxsw: pci: Lock configuration space of upstream bridge during reset The driver triggers a "Secondary Bus Reset" (SBR) by calling __pci_reset_function_locked() which asserts the SBR bit in the "Bridge Control Register" in the configuration space of the upstream bridge for 2ms. This is done without locking the configuration space of the upstream bridge port, allowing user space to access it concurrently. Linux 6.11 will start warning about such unlocked resets [1][2]: pcieport 0000:00:01.0: unlocked secondary bus reset via: pci_reset_bus_function+0x51c/0x6a0 Avoid the warning and the concurrent access by locking the configuration space of the upstream bridge prior to the reset and unlocking it afterwards. [1] https://lore.kernel.org/all/171711746953.1628941.4692125082286867825.stgit@dwillia2-xfh.jf.intel.com/ [2] https://lore.kernel.org/all/20240531213150.GA610983@bhelgaas/ Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/9937b0afdb50f2f2825945393c94c093c04a5897.1720447210.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit a22f3bc80075c10c3835b9ec1c7da17496386904 Author: Ido Schimmel Date: Mon Jul 8 16:23:41 2024 +0200 mlxsw: core_thermal: Report valid current state during cooling device registration Commit 31a0fa0019b0 ("thermal/debugfs: Pass cooling device state to thermal_debug_cdev_add()") changed the thermal core to read the current state of the cooling device as part of the cooling device's registration. This is incompatible with the current implementation of the cooling device operations in mlxsw, leading to initialization failure with errors such as: mlxsw_spectrum 0000:01:00.0: Failed to register cooling device mlxsw_spectrum 0000:01:00.0: cannot register bus device The reason for the failure is that when the get current state operation is invoked the driver tries to derive the index of the cooling device by walking a per thermal zone array and looking for the matching cooling device pointer. However, the pointer is returned from the registration function and therefore only set in the array after the registration. The issue was later fixed by commit 1af89dedc8a5 ("thermal: core: Do not fail cdev registration because of invalid initial state") by not failing the registration of the cooling device if it cannot report a valid current state during registration, although drivers are responsible for ensuring that this will not happen. Therefore, make sure the driver is able to report a valid current state for the cooling device during registration by passing to the registration function a per cooling device private data that already has the cooling device index populated. While at it, call thermal_cooling_device_unregister() unconditionally since the function returns immediately if the cooling device pointer is NULL. Reviewed-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/c823c4678b6b7afb902c35b3551c81a053afd110.1720447210.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit b45c76e5f43fa66868e874a42a29bd0288a5ddce Author: Petr Machata Date: Mon Jul 8 16:23:40 2024 +0200 mlxsw: Warn about invalid accesses to array fields A forgotten or buggy variable initialization can cause out-of-bounds access to a register or other item array field. For an overflow, such access would mangle adjacent parts of the register payload. For an underflow, due to all variables being unsigned, the access would likely trample unrelated memory. Since neither is correct, replace these accesses with accesses at the index of 0, and warn about the issue. Suggested-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/b988fb265c2f6c1206fe12d5bfdcfa188b7672d1.1720447210.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit b10545b6b86b7a0b3e26b4c2a5c99b72d49bc4de Author: Masami Hiramatsu (Google) Date: Wed Jul 10 08:36:31 2024 +0900 tracing/kprobes: Fix build error when find_module() is not available The kernel test robot reported that the find_module() is not available if CONFIG_MODULES=n. Fix this error by hiding find_modules() in #ifdef CONFIG_MODULES with related rcu locks as try_module_get_by_name(). Link: https://lore.kernel.org/all/172056819167.201571.250053007194508038.stgit@devnote2/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407070744.RcLkn8sq-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202407070917.VVUCBlaS-lkp@intel.com/ Signed-off-by: Masami Hiramatsu (Google) commit 746d684ea579927015cde53cff8fc365caaf93b7 Merge: d694711355748 933048fec4dda Author: Jakub Kicinski Date: Tue Jul 9 16:31:18 2024 -0700 Merge branch 'selftests-drv-net-rss_ctx-more-tests' Jakub Kicinski says: ==================== selftests: drv-net: rss_ctx: more tests Add a few more tests for RSS. v1: https://lore.kernel.org/all/20240705015725.680275-1-kuba@kernel.org/ ==================== Link: https://patch.msgid.link/20240708213627.226025-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 933048fec4dda42a5e3fdee26653db6d5904d727 Author: Jakub Kicinski Date: Mon Jul 8 14:36:27 2024 -0700 selftests: drv-net: rss_ctx: test flow rehashing without impacting traffic Some workloads may want to rehash the flows in response to an imbalance. Most effective way to do that is changing the RSS key. Check that changing the key does not cause link flaps or traffic disruption. Disrupting traffic for key update is not incorrect, but makes the key update unusable for rehashing under load. Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240708213627.226025-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7e3e5b0bc51d03c452e1f752b7656bbc4df87ee2 Author: Jakub Kicinski Date: Mon Jul 8 14:36:26 2024 -0700 selftests: drv-net: rss_ctx: check behavior of indirection table resizing Some devices dynamically increase and decrease the size of the RSS indirection table based on the number of enabled queues. When that happens driver must maintain the balance of entries (preferably duplicating the smaller table). Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240708213627.226025-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e2c9703d424e7a7a60f325cb16ddcd45b2213c70 Author: Jakub Kicinski Date: Mon Jul 8 14:36:25 2024 -0700 selftests: drv-net: rss_ctx: test queue changes vs user RSS config By default main RSS table should change to include all queues. When user sets a specific RSS config the driver should preserve it, even when queue count changes. Driver should refuse to deactivate queues used in the user-set RSS config. For additional contexts driver should still refuse to deactivate queues in use. Whether the contexts should get resized like context 0 when queue count increases is a bit unclear. I anticipate most drivers today don't do that. Since main use case for additional contexts is to set the indir table - it doesn't seem worthwhile to care about behavior of the default table too much. Don't test that. Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240708213627.226025-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 847aa551fa7897dbe457bfd8badd4ca22d44add1 Author: Jakub Kicinski Date: Mon Jul 8 14:36:24 2024 -0700 selftests: drv-net: rss_ctx: factor out send traffic and check Wrap up sending traffic and checking in which queues it landed in a helper. The method used for testing is to send a lot of iperf traffic and check which queues received the most packets. Those should be the queues where we expect iperf to land - either because we installed a filter for the port iperf uses, or we didn't and expect it to use context 0. Contexts get disjoint queue sets, but the main context (AKA context 0) may receive some background traffic (noise). Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240708213627.226025-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a0aab7d7c8605f53ea77dfaafec1dcc0bfb1f232 Author: Jakub Kicinski Date: Mon Jul 8 14:36:23 2024 -0700 selftests: drv-net: rss_ctx: fix cleanup in the basic test The basic test may fail without resetting the RSS indir table. Use the .exec() method to run cleanup early since we re-test with traffic that returning to default state works. While at it reformat the doc a tiny bit. Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240708213627.226025-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 84e30b878aed9353d74904d72cba9f968ae5675b Author: Niklas Cassel Date: Sat Jun 22 15:20:25 2024 +0200 PCI: dw-rockchip: Use pci_epc_init_notify() directly A previous commit ("PCI: dwc: ep: Remove dw_pcie_ep_init_notify() wrapper") removed the dw_pcie_ep_init_notify() wrapper and changed the DWC glue drivers to instead use pci_epc_init_notify() directly. The endpoint support for the dw-rockchip had not been merged at that point in time, so the previous commit wrapper") did not update dw-rockchip. Do the same change for dw-rockchip, so that the driver will not try to use a function that has now been removed. Link: https://lore.kernel.org/linux-pci/20240622132024.2927799-2-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit e242f26f6320e30e77e0455473a9d7f037ddb8a0 Author: Niklas Cassel Date: Fri Jun 7 13:14:30 2024 +0200 PCI: dw-rockchip: Add endpoint mode support The PCIe controller in rk3568 and rk3588 can operate in endpoint mode. This endpoint mode support heavily leverages the existing code in pcie-designware-ep.c. Add support for endpoint mode to the existing pcie-dw-rockchip glue driver. [kwilczynski: squash with patch adding the PCI_ENDPOINT dependency] Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-10-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 49a0925d17332415683e5f692ad932ab86c2d3ad Author: Niklas Cassel Date: Fri Jun 7 13:14:29 2024 +0200 PCI: dw-rockchip: Refactor the driver to prepare for EP mode Refactor the driver to prepare for EP mode. Add of-match data to the existing compatible, and explicitly define it as DW_PCIE_RC_TYPE. This way, we will be able to add EP mode in a follow-up commit in a much less intrusive way, which makes the follow-up commit much easier to review. No functional change intended. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-9-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit d8b864c95dcb1ad943cdecaf3cdab08217fb70e0 Author: Niklas Cassel Date: Fri Jun 7 13:14:28 2024 +0200 PCI: dw-rockchip: Add rockchip_pcie_get_ltssm() helper Add a rockchip_pcie_ltssm() helper function that reads the LTSSM status. This helper will be used in additional places in follow-up commits. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-8-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 2baa5fc389b9f7c724d683d213d107f8c87f6715 Author: Niklas Cassel Date: Fri Jun 7 13:14:27 2024 +0200 PCI: dw-rockchip: Fix weird indentation Fix the indentation of rockchip_pcie_{readl,writel}_apb() parameters to match the opening parenthesis. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-7-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 28b8d7793b8573563b3d45321376f36168d77b1e Author: Niklas Cassel Date: Wed Apr 17 18:42:26 2024 +0200 PCI: dw-rockchip: Fix initial PERST# GPIO value PERST# is active low according to the PCIe specification. However, the existing pcie-dw-rockchip.c driver does: gpiod_set_value(..., 0); msleep(100); gpiod_set_value(..., 1); when asserting + deasserting PERST#. This is of course wrong, but because all the device trees for this compatible string have also incorrectly marked this GPIO as ACTIVE_HIGH: $ git grep -B 10 reset-gpios arch/arm64/boot/dts/rockchip/rk3568* $ git grep -B 10 reset-gpios arch/arm64/boot/dts/rockchip/rk3588* The actual toggling of PERST# is correct, and we cannot change it anyway, since that would break device tree compatibility. However, this driver does request the GPIO to be initialized as GPIOD_OUT_HIGH, which does cause a silly sequence where PERST# gets toggled back and forth for no good reason. Fix this by requesting the GPIO to be initialized as GPIOD_OUT_LOW (which for this driver means PERST# asserted). This will avoid an unnecessary signal change where PERST# gets deasserted (by devm_gpiod_get_optional()) and then gets asserted (by rockchip_pcie_start_link()) just a few instructions later. Before patch, debug prints on EP side, when booting RC: [ 845.606810] pci: PERST# asserted by host! [ 852.483985] pci: PERST# de-asserted by host! [ 852.503041] pci: PERST# asserted by host! [ 852.610318] pci: PERST# de-asserted by host! After patch, debug prints on EP side, when booting RC: [ 125.107921] pci: PERST# asserted by host! [ 132.111429] pci: PERST# de-asserted by host! This extra, very short, PERST# assertion + deassertion has been reported to cause issues with certain WLAN controllers, e.g. RTL8822CE. Fixes: 0e898eb8df4e ("PCI: rockchip-dwc: Add Rockchip RK356X host controller driver") Link: https://lore.kernel.org/linux-pci/20240417164227.398901-1-cassel@kernel.org Tested-by: Heiko Stuebner Tested-by: Jianfeng Liu Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Heiko Stuebner Reviewed-by: Manivannan Sadhasivam Cc: stable@vger.kernel.org # v5.15+ commit 206c4f778b3c7c8950f5c6be518e0a113102a13e Author: Uwe Kleine-König Date: Tue Feb 27 15:12:54 2024 +0100 PCI: dw-rockchip: Add error messages in .probe() error paths Drivers that silently fail to probe provide a bad user experience and make it unnecessarily hard to debug such a failure. Fix it by using dev_err_probe() instead of a plain return. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240227141256.413055-2-ukleinek@debian.org Signed-off-by: Uwe Kleine-König Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Heiko Stuebner Reviewed-by: Jesper Nilsson Reviewed-by: Manivannan Sadhasivam commit 840b7a5edf88fe678c60dee88a135647c0ea4375 Author: Manivannan Sadhasivam Date: Tue Apr 16 11:12:35 2024 +0530 PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio Rockchip platforms use 'GPIO_ACTIVE_HIGH' flag in the devicetree definition for ep_gpio. This means, whatever the logical value set by the driver for the ep_gpio, physical line will output the same logic level. For instance, gpiod_set_value_cansleep(rockchip->ep_gpio, 0); --> Level low gpiod_set_value_cansleep(rockchip->ep_gpio, 1); --> Level high But while requesting the ep_gpio, GPIOD_OUT_HIGH flag is currently used. Now, this also causes the physical line to output 'high' creating trouble for endpoint devices during host reboot. When host reboot happens, the ep_gpio will initially output 'low' due to the GPIO getting reset to its POR value. Then during host controller probe, it will output 'high' due to GPIOD_OUT_HIGH flag. Then during rockchip_pcie_host_init_port(), it will first output 'low' and then 'high' indicating the completion of controller initialization. On the endpoint side, each output 'low' of ep_gpio is accounted for PERST# assert and 'high' for PERST# deassert. With the above mentioned flow during host reboot, endpoint will witness below state changes for PERST#: (1) PERST# assert - GPIO POR state (2) PERST# deassert - GPIOD_OUT_HIGH while requesting GPIO (3) PERST# assert - rockchip_pcie_host_init_port() (4) PERST# deassert - rockchip_pcie_host_init_port() Now the time interval between (2) and (3) is very short as both happen during the driver probe(), and this results in a race in the endpoint. Because, before completing the PERST# deassertion in (2), endpoint got another PERST# assert in (3). A proper way to fix this issue is to change the GPIOD_OUT_HIGH flag in (2) to GPIOD_OUT_LOW. Because the usual convention is to request the GPIO with a state corresponding to its 'initial/default' value and let the driver change the state of the GPIO when required. As per that, the ep_gpio should be requested with GPIOD_OUT_LOW as it corresponds to the POR value of '0' (PERST# assert in the endpoint). Then the driver can change the state of the ep_gpio later in rockchip_pcie_host_init_port() as per the initialization sequence. This fixes the firmware crash issue in Qcom based modems connected to Rockpro64 based board. Fixes: e77f847df54c ("PCI: rockchip: Add Rockchip PCIe controller support") Closes: https://lore.kernel.org/mhi/20240402045647.GG2933@thinkpad/ Link: https://lore.kernel.org/linux-pci/20240416-pci-rockchip-perst-fix-v1-1-4800b1d4d954@linaro.org Reported-by: Slark Xiao Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Cc: stable@vger.kernel.org # v4.9 commit 70a7bfb1e515b03e54491254a4375cdfb9515227 Author: Damien Le Moal Date: Sat Apr 13 09:41:20 2024 +0900 PCI: rockchip-host: Wait 100ms after reset before starting configuration PCIe r6.0, sec 6.6.1, states that the host should wait for at least 100 msec from the end of a conventional reset (PERST# is de-asserted) before sending a configuration request to ensure that the device is able to respond with a "Request Retry Status" completion. Add the PCIE_T_RRS_READY_MS macro to define this wait time and modify rockchip_pcie_host_init_port() to add this 100ms sleep after deasserting PERST# using the ep_gpio GPIO. Link: https://lore.kernel.org/linux-pci/20240413004120.1099089-3-dlemoal@kernel.org Suggested-by: Bjorn Helgaas Signed-off-by: Damien Le Moal Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit c47f90be4c89d14051d43f0c88eafddf67c834ea Author: Damien Le Moal Date: Sat Apr 13 09:41:19 2024 +0900 PCI: rockchip-host: Fix rockchip_pcie_host_init_port() PERST# handling PCIe CEM r5.1, sec 2.9.2, mandates that the PERST# signal must remain asserted for at least 100 usec (Tperst-clk) after the PCIe reference clock becomes stable (if a reference clock is supplied), and for at least 100 msec after the power is stable (Tpvperl, defined by the macro PCIE_T_PVPERL_MS). Modify rockchip_pcie_host_init_port() to satisfy these constraints by adding a sleep period before deasserting PERST# using the ep_gpio GPIO. Since Tperst-clk is the shorter wait time, add an msleep() call for the longer PCIE_T_PVPERL_MS milliseconds to handle both timing requirements. Link: https://lore.kernel.org/linux-pci/20240413004120.1099089-2-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 9b10e877fc847f161aa4e6c918799002ad6dad23 Author: Niklas Cassel Date: Tue May 28 15:48:40 2024 +0200 PCI: dwc: ep: Enforce DWC specific 64-bit BAR limitation From the DWC EP databook 5.96a, section "3.5.7.1.4 General Rules for BAR Setup (Fixed Mask or Programmable Mask Schemes Only)": "Any pair (for example BARs 0 and 1) can be configured as one 64-bit BAR, two 32-bit BARs, or one 32-bit BAR." "BAR pairs cannot overlap to form a 64-bit BAR. For example, you cannot combine BARs 1 and 2 to form a 64-bit BAR." While this limitation does exist in some other PCI endpoint controllers, e.g. cdns_pcie_ep_set_bar(), the limitation does not appear to be defined in the PCIe specification itself, thus add an explicit check for this in dw_pcie_ep_set_bar() (rather than pci_epc_set_bar()). Link: https://lore.kernel.org/linux-pci/20240528134839.8817-2-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit b8747e10fde9573834b9f320593422e37af1af97 Author: Manivannan Sadhasivam Date: Thu Jun 6 12:56:38 2024 +0530 PCI: layerscape-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event Now that dw_pcie_ep_linkdown() is available, use it. This also handles the reinitialization of DWC non-sticky registers in addition to sending the notification to EPF drivers. Closes: https://lore.kernel.org/linux-pci/20240528195539.GA458945@bhelgaas Link: https://lore.kernel.org/linux-pci/20240606-pci-deinit-v1-5-4395534520dc@linaro.org Reported-by: Bjorn Helgaas Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Niklas Cassel commit 574621166c8f60c2d0534cdb3a3cf6e1a37a19d0 Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:50 2024 +0530 PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event Now that the generic dw_pcie_ep_linkdown() API is available, use it. This also handles the reinitialization of DWC non-sticky registers in addition to sending the notification to EPF drivers. Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-9-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 245b9ebf7b8e2a79c207337ee78061ff8e0c774b Author: Manivannan Sadhasivam Date: Thu Jun 6 12:56:34 2024 +0530 PCI: dwc: ep: Remove dw_pcie_ep_init_notify() wrapper Currently dw_pcie_ep_init_notify() wrapper just calls pci_epc_init_notify() directly, so this wrapper provides no benefit to the glue drivers. Remove it and call pci_epc_init_notify() directly from glue drivers. Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/linux-pci/20240606-pci-deinit-v1-1-4395534520dc@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Siddharth Vadapalli Reviewed-by: Frank Li Reviewed-by: Niklas Cassel commit 867ab111b2420ca97e9156ad1e186d2face5c62c Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:49 2024 +0530 PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event Per PCIe r6.0, sec 5.2, a Link Down event can happen under any of the following circumstances: 1. Fundamental/Hot reset 2. Link disable transmission by upstream component 3. Moving from L2/L3 to L0 In those cases, Link Down causes some non-sticky DWC registers to lose the state (like REBAR, etc.), so drivers need to reinitialize them to function properly once the link comes back again. This is not a problem for drivers supporting PERST# IRQ, since they can reinitialize the registers in the PERST# IRQ callback. But for the drivers not supporting PERST#, there is no way they can reinitialize the registers other than relying on Link Down IRQ received when the link goes down. So add a DWC generic API dw_pcie_ep_linkdown() that reinitializes the non-sticky registers and also notifies the EPF drivers about link going down. This API can also be used by the drivers supporting PERST# to handle the scenario (2) mentioned above. NOTE: For the sake of code organization, move the dw_pcie_ep_linkup() definition just above dw_pcie_ep_linkdown(). Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-8-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński [bhelgaas: update spec citation] Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit e1a4ec1a9520bf048a7ee09f7f7a82b1d44750ac Author: Frank Li Date: Thu Apr 18 12:04:28 2024 -0400 PCI: dwc: Add generic MSG TLP support for sending PME_Turn_Off when system suspend Instead of relying on the vendor specific implementations to send the PME_Turn_Off message, introduce a generic way of sending the message using the MSG TLP. This is achieved by reserving a region for MSG TLP of size 'pci->region_align', at the end of the first IORESOURCE_MEM window of the host bridge. And then sending the PME_Turn_Off message during system suspend with the help of iATU. The reason for reserving the MSG TLP region at the end of the IORESOURCE_MEM is to avoid generating holes in between, because when the region is allocated using allocate_resource(), memory will be allocated from the start of the window. Later, if memory gets allocated for an endpoint of size bigger than 'region_align', there will be a hole between MSG TLP region and endpoint memory. This generic implementation is optional for the glue drivers and can be overridden by a custom 'pme_turn_off' callback. Link: https://lore.kernel.org/linux-pci/20240418-pme_msg-v8-5-a54265c39742@nxp.com Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 9972b17712e434f1284bc85d77a2fdbb33db6c51 Author: Frank Li Date: Thu Apr 18 12:04:27 2024 -0400 PCI: Add PCIE_MSG_CODE_PME_TURN_OFF message macro Add PCIE_MSG_CODE_PME_TURN_OFF macros to enable a PCIe host driver to send PME_Turn_Off messages. Link: https://lore.kernel.org/linux-pci/20240418-pme_msg-v8-4-a54265c39742@nxp.com Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 95cb8ff68851ed0d249fb8a1d9657987cd844e08 Author: Yoshihiro Shimoda Date: Thu Apr 18 12:04:24 2024 -0400 PCI: Add PCIE_MSG_CODE_ASSERT_INTx message macros Add "Message Routing" and "INTx Mechanism Messages" macros to enable a PCIe driver to send messages for INTx Interrupt Signaling. Values from PCIe r6.1, sec 2.2.8 and 2.2.8.1. Link: https://lore.kernel.org/linux-pci/20240418-pme_msg-v8-1-a54265c39742@nxp.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin commit cd02e4b684fd3244bd55425e683e26a4003a2925 Author: Yoshihiro Shimoda Date: Thu Apr 18 12:04:26 2024 -0400 PCI: dwc: Add outbound MSG TLPs support Add "code" and "routing" into struct dw_pcie_ob_atu_cfg for triggering INTx IRQs by iATU in the PCIe endpoint mode in near the future. PCIE_ATU_INHIBIT_PAYLOAD is set to issue TLP type of Msg instead of MsgD. This implementation supports the data-less messages only for now. Link: https://lore.kernel.org/linux-pci/20240418-pme_msg-v8-3-a54265c39742@nxp.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin commit aa85ef61d841dc5506861f71c28c351e17a9f472 Author: Yoshihiro Shimoda Date: Thu Apr 18 12:04:25 2024 -0400 PCI: dwc: Consolidate args of dw_pcie_prog_outbound_atu() into a structure This is a preparation before adding the Msg-type outbound iATU mapping. The respective update will require two more arguments added to __dw_pcie_prog_outbound_atu(). That will make the already complicated function prototype even more hard to comprehend accepting _eight_ arguments. To prevent that and keep the code more-or-less readable, move all the outbound iATU-related arguments to a new config structure: struct dw_pcie_ob_atu_cfg, and pass a pointer to dw_pcie_prog_outbound_atu(). The structure should be locally defined and populated with the outbound iATU settings implied by the caller context. As a result of this change there is no longer need in having the two distinctive methods for the Host and Endpoint outbound iATU setups since the code can directly call the dw_pcie_prog_outbound_atu() method with the config structure populated, so drop dw_pcie_prog_ep_outbound_atu(). [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240418-pme_msg-v8-2-a54265c39742@nxp.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin commit c2a57ee0f2f1ad8c970ff58b78a43e85abbdeb7f Author: Frank Li Date: Fri Apr 12 12:08:41 2024 -0400 PCI: dwc: Fix index 0 incorrectly being interpreted as a free ATU slot When PERST# assert and deassert happens on the PERST# supported platforms, both iATU0 and iATU6 will map inbound window to BAR0. DMA will access the area that was previously allocated (iATU0) for BAR0, instead of the new area (iATU6) for BAR0. Right now, this isn't an issue because both iATU0 and iATU6 should translate inbound accesses to BAR0 to the same allocated memory area. However, having two separate inbound mappings for the same BAR is a disaster waiting to happen. The mappings between PCI BAR and iATU inbound window are maintained in the dw_pcie_ep::bar_to_atu[] array. While allocating a new inbound iATU map for a BAR, dw_pcie_ep_inbound_atu() API checks for the availability of the existing mapping in the array and if it is not found (i.e., value in the array indexed by the BAR is found to be 0), it allocates a new map value using find_first_zero_bit(). The issue is the existing logic failed to consider the fact that the map value '0' is a valid value for BAR0, so find_first_zero_bit() will return '0' as the map value for BAR0 (note that it returns the first zero bit position). Due to this, when PERST# assert + deassert happens on the PERST# supported platforms, the inbound window allocation restarts from BAR0 and the existing logic to find the BAR mapping will return '6' for BAR0 instead of '0' due to the fact that it considers '0' as an invalid map value. Fix this issue by always incrementing the map value before assigning to bar_to_atu[] array and then decrementing it while fetching. This will make sure that the map value '0' always represents the invalid mapping." Fixes: 4284c88fff0e ("PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address") Closes: https://lore.kernel.org/linux-pci/ZXsRp+Lzg3x%2Fnhk3@x1-carbon/ Link: https://lore.kernel.org/linux-pci/20240412160841.925927-1-Frank.Li@nxp.com Reported-by: Niklas Cassel Tested-by: Niklas Cassel Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel commit b262518262f5a13978eb2b17574a70411908e665 Author: Konrad Dybcio Date: Wed Mar 27 19:24:49 2024 +0100 PCI: dwc: Use msleep() in dw_pcie_wait_for_link() According to [1], msleep should be used for large sleeps, such as the 100-ish ms one in this function. Comply with the guide and use it. [1] https://docs.kernel.org/timers/timers-howto.html [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240215-topic-pci_sleep-v2-1-79334884546b@linaro.org Signed-off-by: Konrad Dybcio Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam commit 96447ede32d81a88c7a40ca2d0ac078268f648e0 Author: Alexander Stein Date: Thu Apr 18 10:49:24 2024 +0200 Documentation: PCI: pci-endpoint: Fix EPF ops list With commit 5779dd0a7dbd7 ("PCI: endpoint: Use notification chain mechanism to notify EPC events to EPF") the linkup callback has been removed and replaced by EPC event notifications. With commit 256ae475201b1 ("PCI: endpoint: Add pci_epf_ops to expose function-specific attrs") a new (optional) add_cfs callback was added. Update documentation accordingly. Link: https://lore.kernel.org/linux-pci/20240418084924.1724703-1-alexander.stein@ew.tq-group.com Signed-off-by: Alexander Stein Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam commit 1ae27dacae42c0259d17097eb7dcb98d16568cce Author: Jiapeng Chong Date: Thu Jul 4 10:32:27 2024 +0800 misc: pci_endpoint_test: Remove unused pci_endpoint_test_bar_{readl,writel} functions These two functions are defined in the pci_endpoint_test.c file, but not called elsewhere, so delete these unused functions. This fixes the following warning: drivers/misc/pci_endpoint_test.c:144:19: warning: unused function 'pci_endpoint_test_bar_readl'. drivers/misc/pci_endpoint_test.c:150:20: warning: unused function 'pci_endpoint_test_bar_writel'. No functional changes intended. [kwilczynski: commit log] Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9064 Link: https://lore.kernel.org/linux-pci/20240704023227.87039-1-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 76084965a91df915c47f59c938bb5b8eb467b16e Author: Yoshihiro Shimoda Date: Tue Jun 11 21:50:57 2024 +0900 misc: pci_endpoint_test: Document policy about adding pci_device_id Add a comment suggesting that if the endpoint controller Vendor and Device ID are programmable, an existing entry might be usable for testing without having to add an entry to pci_endpoint_test_tbl[]. Link: https://lore.kernel.org/linux-pci/20240611125057.1232873-6-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li commit a50c7de0607c65af588900b1236d88faf561374e Author: Frank Li Date: Thu May 2 15:59:03 2024 -0400 misc: pci_endpoint_test: Refactor dma_set_mask_and_coherent() logic dma_set_mask_and_coherent() should never fail when the mask is >= 32bit, unless the architecture has no DMA support. So no need to check for the error and also no need to set dma_set_mask_and_coherent(32) as a fallback. Even if dma_set_mask_and_coherent(48) fails due to the lack of DMA support (theoretically), then dma_set_mask_and_coherent(32) will also fail for the same reason. So the fallback doesn't make sense. Simplify the code by setting the streaming and coherent DMA mask to 48 bits. Link: https://lore.kernel.org/linux-pci/20240502195903.3191049-1-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Niklas Cassel commit 2a35703a6a00e87bf65d61e70516ae2524f70ec7 Author: Niklas Cassel Date: Fri Mar 22 17:41:38 2024 +0100 misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests The current code uses writel()/readl(), which has an implicit memory barrier for every single readl()/writel(). Additionally, reading 4 bytes at a time over the PCI bus is not really optimal, considering that this code is running in an ioctl handler. Use memcpy_toio()/memcpy_fromio() for BAR tests. Before patch with a 4MB BAR: $ time /usr/bin/pcitest -b 1 BAR1: OKAY real 0m 1.56s After patch with a 4MB BAR: $ time /usr/bin/pcitest -b 1 BAR1: OKAY real 0m 0.54s Link: https://lore.kernel.org/linux-pci/20240322164139.678228-1-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: Kuppuswamy Sathyanarayanan commit 199b03db86b9d9e263cb136d6c8902d443725ca3 Author: Niklas Cassel Date: Fri Jun 7 13:14:31 2024 +0200 misc: pci_endpoint_test: Add support for Rockchip rk3588 Rockchip rk3588 requires 64KB alignment for BARs. While there is an existing device_id:vendor_id in the driver with 64KB alignment, that device_id:vendor_id is am654, which uses BAR2 instead of BAR0 as the test_reg_bar, and also has special is_am654_pci_dev() checks in the driver to disallow BAR0. In order to allow testing all BARs, add a new rk3588 entry in the driver. We intentionally do not add the vendor id to pci_ids.h, since the policy for that file is that the vendor id has to be used by multiple drivers. Hopefully, this new entry will be short-lived, as there is a series on the mailing list which intends to move the address alignment restrictions from this driver to the endpoint side. Add a new entry for rk3588 in order to allow us to test all BARs. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-11-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit d03b2dd785323ee0e0c854f9ad4305e80ed33782 Author: Andy Shevchenko Date: Mon May 6 17:20:41 2024 +0300 PCI: kirin: Convert to use agnostic GPIO API The of_gpio.h legacy API is going to be removed. In preparation for that, convert the driver to the agnostic API. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240506142142.4042810-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring commit f4a180247e06c69e7d8fac4eb14d172c3a5d43a3 Author: Guenter Roeck Date: Tue Jul 9 15:41:07 2024 -0700 hwmon: (g762) Initialize fans after configuring clock Adding support for G761 included adding support for an internal clock. Enabling the internal clock requires setting a bit in the FAN_CMD2 register. This is implemented in g762_fan_init(). However, g762_fan_init() is called before clock support is selected, and the flag indicating that the internal clock should be used is not yet set. Initialize the clock before initializing the fan to solve the problem. While at it, also add "g7621" to the i2c_device_id array. Cc: Christian Marangi Fixes: 6ce402327a6f ("hwmon: g672: add support for g761") Signed-off-by: Guenter Roeck commit 7e8e4fc5321bfa824def6fb66de43fe33c04bb5f Author: Javier Carrasco Date: Sun Jun 9 12:56:14 2024 +0200 PCI: kirin: Convert kirin_pcie_parse_port() to scoped iterator Convert loops in kirin_pcie_parse_port() to use the _scoped() version of for_each_available_child_of_node() so the refcounts of children are implicitly decremented when the loop is exited. No functional change intended here, but it will make future error exits from these loops easier. Link: https://lore.kernel.org/linux-pci/20240609-pcie-kirin-memleak-v1-1-62b45b879576@gmail.com Signed-off-by: Javier Carrasco Signed-off-by: Krzysztof Wilczyński [bhelgaas: move to GPIO series to avoid bisection hole, commit log] Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Manivannan Sadhasivam Reviewed-by: Jonathan Cameron commit 12d638f48c082831388358cc12a1c6ee58185ad8 Author: Rob Herring (Arm) Date: Tue Jul 9 09:13:03 2024 -0600 scripts/dtc: Update to upstream version v1.7.0-93-g1df7b047fe43 This adds the following commits from upstream: 1df7b047fe43 pylibfdt/Makefile.pylibfdt: use project's flags to compile the extension 61e88fdcec52 libfdt: overlay: Fix phandle overwrite check for new subtrees 49d30894466e meson: fix installation with meson-python d54aaf93673c pylibfdt: clean up python build directory ab86f1e9fda8 pylibfdt: add VERSION.txt to Python sdist 7b8a30eceabe pylibfdt: fix Python version ff4f17eb5865 pylibfdt/Makefile.pylibfdt: fix Python library being rebuild during install 9e313b14e684 pylibfdt/meson.build: fix Python library being rebuilt during install d598fc3648ec tests/run_tests.sh: fix Meson library path being dropped b98239da2f18 tests/meson.build: fix python and yaml tests not running c17d76ab5e84 checks: Check the overall length of "interrupt-map" ae26223a056e libfdt: overlay: Refactor overlay_fixup_phandle 4dd831affd01 libfdt: tests: Update test case for overlay_bad_fixup e6d294200837 tests: Remove two_roots and named_root from LIBTREE_TESTS_L and add all dtb filenames generated by dumptrees to TESTS_TREES_L in Makefile.tests 855c934e26ae tests: fix tests broken under Meson 4fd3f4f0a95d github: enforce testing pylibfdt and yaml support 9ca7d62dbf0b meson: split run-tests by type bb51223083a4 meson: fix dependencies of tests e81900635c95 meson: fix pylibfdt missing dependency on libfdt 822123856980 pylibfdt: fix get_mem_rsv for newer Python versions 1fad065080e6 libfdt: overlay: ensure that existing phandles are not overwritten b0aacd0a7735 github: add windows/msys CI build ae97d9745862 github: Don't accidentally suppress test errors 057a7dbbb777 github: Display meson test logs on failure 92b5d4e91678 pylibfdt: Remove some apparently deprecated options from setup.py 417e3299dbd1 github: Update to newer checkout action 5e6cefa17e2d fix MinGW format attribute 24f60011fd43 libfdt: Simplify adjustment of values for local fixups da39ee0e68b6 libfdt: rework shared/static libraries a669223f7a60 Makefile: do not hardcode the `install` program path 3fbfdd08afd2 libfdt: fix duplicate meson target dcef5f834ea3 tests: use correct pkg-config when cross compiling 0b8026ff254f meson: allow building from shallow clones 95c74d71f090 treesource: Restore string list output when no type markers 2283dd78eff5 libfdt: fdt_path_offset_namelen: Reject empty path 79b9e326a162 libfdt: fdt_get_alias_namelen: Validate aliases 52157f13ef3d pylibfdt: Support boolean properties d77433727566 dtc: fix missing string in usage_opts_help ad8bf9f9aa39 libfdt: Fix fdt_appendprop_addrrange documentation 6c5e189fb952 github: add workflow for Meson builds a3dc9f006a78 libfdt: rename libfdt-X.Y.Z.so to libfdt.so.X.Y.Z 35019949c4c7 workflows: build: remove setuptools_scm hack cd3e2304f4a9 pylibfdt: use fallback version in tarballs 0f5864567745 move release version into VERSION.txt 38165954c13b libfdt: add missing version symbols 5e98b5979354 editorconfig: use tab indentation for version.lds d030a893be25 tests: generate dtbs in Meson build directory 8d8372b13706 tests: fix use of deprecated meson methods 761114effaf7 pylibtfdt: fix use of deprecated meson method bf6377a98d97 meson: set minimum Meson version to 0.56.0 4c68e4b16b22 libfdt: fix library version to match project version bdc5c8793a13 meson: allow disabling tests f088e381f29e Makefile: allow to install libfdt without building executables 6df5328a902c Fix use of functions ccf1f62d59ad libfdt: Fix a typo in libfdt.h 71a8b8ef0adf libfdt: meson: Fix linking on macOS linker 589d8c7653c7 dtc: Add an option to generate __local_fixups__ and __fixups__ e8364666d5ac CI: Add build matrix with multiple Linux distributions 3b02a94b486f dtc: Correct invalid dts output with mixed phandles and integers d4888958d64b tests: Add additional tests for device graph checks ea3b9a1d2c5a checks: Fix crash in graph_child_address if 'reg' cell size != 1 b2b9671583e9 livetree: fix off-by-one in propval_cell_n() bounds check ab481e483061 Add definition for a GitHub Actions CI job c88038c9b8ca Drop obsolete/broken CI definitions 0ac8b30ba5a1 yaml: Depend on libyaml >= 0.2.3 f1657b2fb5be tests: Add test cases for bad endpoint node and remote-endpoint prop checks 44bb89cafd3d checks: Fix segmentation fault in check_graph_node 60bcf1cde1a8 improve documentation for fdt_path_offset() a6f997bc77d4 add fdt_get_symbol() and fdt_get_symbol_namelen() functions 18f5ec12a10e use fdt_path_getprop_namelen() in fdt_get_alias_namelen() df093279282c add fdt_path_getprop_namelen() helper 129bb4b78bc6 doc: dt-object-internal: Fix a typo 390f481521c3 fdtoverlay: Drop a a repeated article 9f8b382ed45e manual: Fix and improve documentation about -@ 2cdf93a6d402 fdtoverlay: Fix usage string to not mention "" 72fc810c3025 build-sys: add -Wwrite-strings 083ab26da83b tests: fix leaks spotted by ASAN 6f8b28f49609 livetree: fix leak spotted by ASAN fd68bb8c5658 Make name_node() xstrdup its name argument 4718189c4ca8 Delay xstrdup() of node and property names coming from a flat tree 0b842c3c8199 Make build_property() xstrdup its name argument 9cceabea1ee0 checks: correct I2C 10-bit address check 0d56145938fe yamltree.c: fix -Werror=discarded-qualifiers & -Werror=cast-qual 61fa22b05f69 checks: make check.data const 7a1d72a788e0 checks.c: fix check_msg() leak ee5799938697 checks.c: fix heap-buffer-overflow 44c9b73801c1 tests: fix -Wwrite-strings 5b60f5104fcc srcpos.c: fix -Wwrite-strings 32174a66efa4 meson: Fix cell overflow tests when running from meson 64a907f08b9b meson.build: bump version to 1.7.0 e3cde0613bfd Add -Wsuggest-attribute=format warning, correct warnings thus generated 41821821101a Use #ifdef NO_VALGRIND 71c19f20b3ef Do not redefine _GNU_SOURCE if already set 039a99414e77 Bump version to v1.7.0 9b62ec84bb2d Merge remote-tracking branch 'gitlab/main' 3f29d6d85c24 pylibfdt: add size_hint parameter for get_path 2022bb10879d checks: Update #{size,address}-cells check for 'dma-ranges' Signed-off-by: Rob Herring (Arm) commit 5b6272e0efd53c487bfc5d2921d71ecae37b0446 Author: Krishna chaitanya chundru Date: Wed Jun 19 20:41:13 2024 +0530 PCI: qcom: Add OPP support to scale performance QCOM Resource Power Manager-hardened (RPMh) is a hardware block which maintains hardware state of a regulator by performing max aggregation of the requests made by all of the clients. PCIe controller can operate on different RPMh performance state of power domain based on the speed of the link. And this performance state varies from target to target, like some controllers support GEN3 in NOM (Nominal) voltage corner, while some other supports GEN3 in low SVS (static voltage scaling). The SoC can be more power efficient if we scale the performance state based on the aggregate PCIe link bandwidth. Add Operating Performance Points (OPP) support to vote for RPMh state based on the aggregate link bandwidth. OPP can handle ICC bw voting also, so move ICC bw voting through OPP framework if OPP entries are present. As we are moving ICC voting as part of OPP, don't initialize ICC if OPP is supported. Before PCIe link is initialized vote for highest OPP in the OPP table, so that we are voting for maximum voltage corner for the link to come up in maximum supported speed. Link: https://lore.kernel.org/linux-pci/20240619-opp_support-v15-4-aa769a2173a3@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Krzysztof Wilczyński [bhelgaas: wrap comments to fit in 80 columns] Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 100ae5d77f07f9f046106e228778c7aa1c6d3af3 Author: Krishna chaitanya chundru Date: Wed Jun 19 20:41:12 2024 +0530 PCI: Bring the PCIe speed to MBps logic to new pcie_dev_speed_mbps() Bring the switch case in pcie_link_speed_mbps() to new function to the header file so that it can be used in other places like in controller driver. Link: https://lore.kernel.org/linux-pci/20240619-opp_support-v15-3-aa769a2173a3@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 980136d1c2b95644b96df6c7ec00ca5d7c87f37f Author: Krishna chaitanya chundru Date: Wed Jun 19 20:41:10 2024 +0530 PCI: qcom: Add ICC bandwidth vote for CPU to PCIe path To access the host controller registers of the host controller and the endpoint BAR/config space, the CPU-PCIe ICC (interconnect) path should be voted otherwise it may lead to NoC (Network on chip) timeout. We are surviving because of other driver voting for this path. As there is less access on this path compared to PCIe to mem path add minimum vote i.e 1KBps bandwidth always which is sufficient enough to keep the path active and is recommended by HW team. During S2RAM (Suspend-to-RAM), the DBI access can happen very late (while disabling the boot CPU). So do not disable the CPU-PCIe interconnect path during S2RAM as that may lead to NoC error. Link: https://lore.kernel.org/linux-pci/20240619-opp_support-v15-1-aa769a2173a3@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Bryan O'Donoghue Reviewed-by: Manivannan Sadhasivam commit 912315715d7b74f7abdb6f063ebace44ee288af9 Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:42 2024 +0530 PCI: qcom-ep: Disable resources unconditionally during PERST# assert All EP specific resources are enabled during PERST# deassert. As a counter operation, all resources should be disabled during PERST# assert. There is no point in skipping that if the link was not enabled. This will also result in enablement of the resources twice if PERST# got deasserted again. So remove the check from qcom_pcie_perst_assert() and disable all the resources unconditionally. Fixes: f55fee56a631 ("PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver") Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-1-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit c71b5eb3b86448aa4bad6b2ca94c6e1d1962a5fb Author: Mrinmay Sarkar Date: Mon Mar 11 19:41:36 2024 +0530 PCI: qcom-ep: Override NO_SNOOP attribute for SA8775P EP Due to some hardware changes, SA8775P has set the NO_SNOOP attribute in its TLP for all the PCIe controllers. NO_SNOOP attribute when set, the requester is indicating that no cache coherency issues exist for the addressed memory on the host i.e., memory is not cached. But in reality, requester cannot assume this unless there is a complete control/visibility over the addressed memory on the host. And worst case, if the memory is cached on the host, it may lead to memory corruption issues. It should be noted that the caching of memory on the host is not solely dependent on the NO_SNOOP attribute in TLP. So to avoid the corruption, this patch overrides the NO_SNOOP attribute by setting the PCIE_PARF_NO_SNOOP_OVERIDE register. This patch is not needed for other upstream supported platforms since they do not set NO_SNOOP attribute by default. Link: https://lore.kernel.org/linux-pci/1710166298-27144-3-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Mrinmay Sarkar Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 1d648bf79d4dca909f242b1a0cdc458e4f9d0253 Author: Mrinmay Sarkar Date: Mon Mar 11 19:41:35 2024 +0530 PCI: qcom: Override NO_SNOOP attribute for SA8775P RC Due to some hardware changes, SA8775P has set the NO_SNOOP attribute in its TLP for all the PCIe controllers. NO_SNOOP attribute when set, the requester is indicating that no cache coherency issue exist for the addressed memory on the endpoint i.e., memory is not cached. But in reality, requester cannot assume this unless there is a complete control/visibility over the addressed memory on the endpoint. And worst case, if the memory is cached on the endpoint, it may lead to memory corruption issues. It should be noted that the caching of memory on the endpoint is not solely dependent on the NO_SNOOP attribute in TLP. So to avoid the corruption, this patch overrides the NO_SNOOP attribute by setting the PCIE_PARF_NO_SNOOP_OVERIDE register. This patch is not needed for other upstream supported platforms since they do not set NO_SNOOP attribute by default. 8775 has IP version 1.34.0 so introduce a new cfg(cfg_1_34_0) for this platform. Assign override_no_snoop flag into struct qcom_pcie_cfg and set it true in cfg_1_34_0 and enable cache snooping if this particular flag is true. Link: https://lore.kernel.org/linux-pci/1710166298-27144-2-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Mrinmay Sarkar Signed-off-by: Krzysztof Wilczyński [bhelgaas: wrap comments to fit in 80 columns] Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit a8915e2fe86c29304a3038f269f4667b371b87d2 Author: Krzysztof Kozlowski Date: Mon Jul 1 19:19:17 2024 +0200 ASoC: qcom: topology: Simplify with cleanup.h Allocate memory, which is being freed at end of the scope, with scoped/cleanup.h to reduce number of error paths and make code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701171917.596173-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d0f4ce8a28dd992579949b8ea2df810c4b5fe9b5 Author: Krzysztof Kozlowski Date: Mon Jul 1 19:19:16 2024 +0200 ASoC: codecs: aw88395: Simplify with cleanup.h Allocate memory, which is being freed at end of the scope, with scoped/cleanup.h to reduce number of error paths and make code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701171917.596173-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 00fa2450c11138c1c3171224cd2727a3a6240bae Author: Thomas Bonnefille Date: Tue Jun 18 09:42:38 2024 +0200 dt-bindings: i2c: dw: Document compatible thead,th1520-i2c Add documentation for compatible string thead,th1520-i2c which can be used specifically for the TH1520 SoC. Signed-off-by: Thomas Bonnefille Acked-by: Conor Dooley Reviewed-by: Jarkko Nikula Signed-off-by: Andi Shyti commit 28323a7561667b7a7e6da9ffaef9f5eef32c1eb2 Merge: 4b1a54b2696f9 2881fcfc8f32c Author: Arnd Bergmann Date: Tue Jul 9 23:22:17 2024 +0200 Merge tag 'qcom-arm64-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt A few more Arm64 DeviceTree updates for v6.11 This introduces support for Lenovo Thinkpad Yoga slim 7x, LG Leon LTE, and LG K10 (K420n). In addition to this, all Gen-1 platforms gets the DWC3 quirk to disable "SuperSpeed in park mode", which resolves an instabliity issue seen in host mode. For Fairphone 4, PM6150L and PMK8003 thermal sensors are added and thermal zones defined. Two fastrpc contexts on SM6350 are marked as non-secure, to allow non-secure usage. The video clock controller on SM8150 is introduced. IPQ9574 GCC is marked as a interconnect provider. The vibrator block in the PM6150 is described. On SC7280 the download mode register is defined for SCM, allowing it to enable/disable the ramdump support during a system crash. Lastly, add a mailmap entry for Luca Weiss. * tag 'qcom-arm64-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (22 commits) mailmap: Update Luca Weiss's email address arm64: dts: qcom: msm8916-lg-c50: add initial dts for LG Leon LTE arm64: dts: qcom: msm8916-lg-m216: Add initial device tree dt-bindings: arm: qcom: Add msm8916 based LG devices arm64: dts: qcom: ipq9574: Add icc provider ability to gcc dt-bindings: interconnect: Add Qualcomm IPQ9574 support arm64: dts: qcom: sm8150: Add video clock controller node arm64: dts: qcom: pm6150: Add vibrator arm64: dts: qcom: sc7280: Enable download mode register write arm64: dts: qcom: sm7225-fairphone-fp4: Add PM6150L thermals arm64: dts: qcom: sm7225-fairphone-fp4: Add PMK8003 thermals arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB ... Link: https://lore.kernel.org/r/20240709193406.3966-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 4b1a54b2696f9fcb714c94d5a58db59f867e4caa Merge: 95ab7b209bd94 c1842643a3df6 Author: Arnd Bergmann Date: Tue Jul 9 23:21:43 2024 +0200 Merge tag 'qcom-arm32-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt One more Arm32 DeviceTree update for v6.11 This fixes the DeviceTree validation warning about MSM8960 /memory node not having a unit address. * tag 'qcom-arm32-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: msm8960: correct memory base Link: https://lore.kernel.org/r/20240709191506.3285-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit d53ab629cff57e450fe69fc90eb1ddc372e8da2d Author: Michael Lo Date: Thu May 23 19:21:31 2024 +0800 wifi: mt76: mt792x: fix scheduler interference in drv own process Add some time to wait for LP engine to complete its operation before polling pmctrl register. Signed-off-by: Michael Lo Signed-off-by: Ming Yen Hsieh Tested-by: David Ruth Acked-by: Sean Wang Link: https://patch.msgid.link/20240523112131.31437-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau commit 86c051f2c418abd7eefd8c545a01bdffd220cb95 Author: Sean Wang Date: Sat Jul 6 01:28:17 2024 -0700 wifi: mt76: mt7925: enabling MLO when the firmware supports it Register MLD capability for the firmware supporting MLO. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/49c796b101e792c84bc2c0d74753022b75fd3355.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 67e9847b0208ae02efbe42dbcda4c1a9a1a853cd Author: Sean Wang Date: Sat Jul 6 01:28:16 2024 -0700 wifi: mt76: mt7925: remove the unused mt7925_mcu_set_chan_info remove the unused function mt7925_mcu_set_chan_info Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/0aa0abe7fc661380ae812c6bc879a7705de401b2.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 0cb349d742d17707b5b42f0db1df7f3963fc3a8a Author: Sean Wang Date: Sat Jul 6 01:28:15 2024 -0700 wifi: mt76: mt7925: update mt7925_mac_link_bss_add for MLO Update band_idx in per-link BSS to be auto for the MLO-enabled firmware and the MLO-enabled firmware only supports omac index in 0. The change remains compatible with the non-MLO mode and the older firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/37fcf3ea7b4883840d61f97231277b297e1b15a3.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 696d9f3baf03f59584c7c46b62ae28dfd1a731ae Author: Sean Wang Date: Sat Jul 6 01:28:14 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_bss_basic_tlv for MLO update mt7925_mcu_bss_basic_tlv for the MLO-enabled firmware. The change remains compatible with the non-MLO mode and the older firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/583a3ac10583cfef0028f9a0b5a4802fc4070b99.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit cfbe7f78346e00d33a6461f3f8d94f72c6256acb Author: Sean Wang Date: Sat Jul 6 01:28:13 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_set_timing for MLO Set the BSS index from the per-linked BSS for the firmware to identify which link the command is operating on. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/dde970c748586d03fbecbccb10cb9903284719aa.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit beef8d1643663d501ccbd9637fc314ea79ee09ac Author: Sean Wang Date: Sat Jul 6 01:28:12 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_sta_phy_tlv for MLO when we serve MLO during the multiple-linked connection, the chanctx may be not available in the internal driver, we should get the proper the band information from link_conf for the MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/6620e00fbeef686fb2041556deba346411eab0f1.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 677f19e161afb1096f30d993ae28140aa61a9847 Author: Sean Wang Date: Sat Jul 6 01:28:11 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_sta_rate_ctrl_tlv for MLO Get band information from the per-link BSS. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/4f6ca2d082627bb93f79d5a4df80dc08998ee5d2.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 6db8639bc813a7670b365b8ed2b77e93ef96cf67 Author: Sean Wang Date: Sat Jul 6 01:28:10 2024 -0700 wifi: mt76: mt7925: add mt7925_mcu_sta_eht_mld_tlv for MLO add mt7925_mcu_sta_eht_mld_tlv for the MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/a1001592eeef4e4ee2c3e15dc94cca0815d64e59.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit a5942a3979d6553c09790553c9f0a6daa986ad58 Author: Sean Wang Date: Sat Jul 6 01:28:09 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_sta_update for MLO update mt7925_mcu_sta_update for the MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/2e25bfc2d8aa503ecd1ba8099c6e54dce0c27b99.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 790e3e1ec8aa232abdbfaa26401167580e789366 Author: Sean Wang Date: Sat Jul 6 01:28:08 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_add_bss_info for MLO Update mt7925_mcu_bss_mld_tlv for the MLO-enabled firmware The change remains compatible with the non-MLO mode and the older firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/a3d03b0a1ca916b2b8b2e7c0afcdcd7e258d97c3.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit f8a80a4eed42499f5b923c60d6a51d00e3b6b7d4 Author: Sean Wang Date: Sat Jul 6 01:28:07 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_bss_mld_tlv for MLO update mt7925_mcu_bss_mld_tlv for the MLO-enabled firmware, the change remains compatible with the non-MLO mode and the older firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/2d89b93bcfd92e7c6987aaa0a3c4637e605ac154.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 254f777a9e842e2325f2ee8ba3d0cf45625c71b7 Author: Sean Wang Date: Sat Jul 6 01:28:06 2024 -0700 wifi: mt76: mt7925: update mt7925_mcu_sta_mld_tlv for MLO Update mt7925_mcu_sta_mld_tlv for the MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/25ea3ffd3875083577ab440ec63f3dcd9dc233f4.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 621e9e22b8d031da5c026b913de903f2e2180d79 Author: Sean Wang Date: Sat Jul 6 01:28:05 2024 -0700 wifi: mt76: mt7925: add mt7925_[assign,unassign]_vif_chanctx add mt7925_[assign,unassign]_vif_chanctx to assign and unassign chanctx to the specific link configuration. If the chctx is not pass in the parameter, we will look up the channel information from link_conf->chanreq.oper. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/15261879a16cb12674d6dea7703410baa6883799.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b1d21403c0cfe712ce7ad4020f40c5ca6a013ec5 Author: Sean Wang Date: Sat Jul 6 01:28:04 2024 -0700 wifi: mt76: add def_wcid to struct mt76_wcid add def_wcid to struct mt76_wcid to allow per-link wcid to retrieve the struct ieee80211_sta structure. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/d5188ca633666eaad7e90a8061d1a0585487e128.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 4f0f33d2747f207ba552dd065042c2d7f3063402 Author: Sean Wang Date: Sat Jul 6 01:28:03 2024 -0700 wifi: mt76: mt7925: report link information in rx status report link information in rx status Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/c7cdc17d94375a76802a5c4a825ea3e51cdb53af.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 3fa01f055c41d20ec11485cd12fa0f82ee5557c1 Author: Sean Wang Date: Sat Jul 6 01:28:02 2024 -0700 wifi: mt76: mt7925: update rate index according to link id Update rate index according to link id. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/e0bbc0932edbd9225fe7b7736693c137cf433a52.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 9f8f587cab696e68804e2c4460f4ac1f1a686c8b Author: Sean Wang Date: Sat Jul 6 01:28:01 2024 -0700 wifi: mt76: mt7925: add link handling in the mt7925_ipv6_addr_change add link handling in the mt7925_ipv6_addr_change Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/ed429b1896cc10c8db25dc2ade3e59bec78d7131.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 147324292979fdd0e612199f898db7162ae083c6 Author: Sean Wang Date: Sat Jul 6 01:28:00 2024 -0700 wifi: mt76: mt7925: add link handling in the BSS_CHANGED_ARP_FILTER handler add link handling in the BSS_CHANGED_ARP_FILTER handler. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/6e26e2ce253630ab29702693a7822f9961de6a18.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 14061994184df6bb89cba31657ee1db24480e92a Author: Sean Wang Date: Sat Jul 6 01:27:59 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_vif_connect_iter add link handling in mt7925_vif_connect_iter Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/c8d66043a4d31801249d53dd23f695c28a97a933.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b859ad65309a5f1654e8b284de582831fc88e2d8 Author: Sean Wang Date: Sat Jul 6 01:27:58 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_sta_set_decap_offload add link handling in mt7925_sta_set_decap_offload Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/df2524e3a63a93699bde441e4ab70a70bbac53ef.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 9f89f05bef1a57352e908910e0065b15d542038c Author: Sean Wang Date: Sat Jul 6 01:27:57 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_mac_sta_assoc add links handling in mt7925_mac_sta_assoc Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/0ddf1834783b111d626b05d298478f520d7c0caa.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 44eb173bdd4f1775e13fce483d9e44ea8929717f Author: Sean Wang Date: Sat Jul 6 01:27:56 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_txwi_free add link handling in mt7925_txwi_free. MT7996 should have the similar the logic, we try to copy from there to ensure consistency between both. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/f8084e19d388c6b0807618ac6d1bb8ac633dc8cd.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit acc7a4a6257fb88734125ab89fd6ca5857d77682 Author: Sean Wang Date: Sat Jul 6 01:27:55 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_mcu_set_beacon_filter add link handling in mt7925_mcu_set_beacon_filter Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/b814718a40ad5df6100e63d15c87ba95a318bc22.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit a03abb5045c4f47d4b70bf8b8bb1328bffbb2a74 Author: Sean Wang Date: Sat Jul 6 01:27:54 2024 -0700 wifi: mt76: mt7925: add link handling in the BSS_CHANGED_PS handler Added link handling in the BSS_CHANGED_PS handler. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/542ca29261af0cac007d2cb821ed36284d51c679.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b880cb3caa3e19610701322451b8bdb6f1f6813b Author: Sean Wang Date: Sat Jul 6 01:27:53 2024 -0700 wifi: mt76: mt7925: add link handling to mt7925_change_chanctx add link handling to mt7925_change_chanctx Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/49f2a2f8230979a4e123bc1dab70a8496875cc6c.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 3e758e9f777cde8e9d0106e7b36c6eca389e5856 Author: Sean Wang Date: Sat Jul 6 01:27:52 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_set_key add link handling in mt7925_set_key to support MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/164608d96ce10a40e673bc6f252189c94bc48da7.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit ebb1406813c6ea60d2d95efc69ce6d53bbe43b31 Author: Sean Wang Date: Sat Jul 6 01:27:51 2024 -0700 wifi: mt76: mt7925: add link handling to txwi add link handling to mt792x_tx and writing txwi. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/c0a7c0b33ea2640bcb4f13a5f79a8976b73fa8f2.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 39d80be9951434755566272b401c1619eab37d4d Author: Sean Wang Date: Sat Jul 6 01:27:50 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_mac_sta_remove Added link handling to mt7925_mac_sta_remove, supporting the MLO-enabled firmware. The change remains comptabile with the non-MLO mode. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20d53511fe1f64984d893f4d3ec87cb9f87d3070.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 61c92cc3adcfd84d76dfe3f5889206ab968055e2 Author: Sean Wang Date: Sat Jul 6 01:27:49 2024 -0700 wifi: mt76: mt7925: add link handling in mt7925_mac_sta_add Added link handling to mt7925_mac_sta_add to support MLD devices. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/632faefe8c82cd5609c2af00aabee15ccc9616ed.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 43aa4033eb18f46332860db061b135bd9e51be2c Author: Sean Wang Date: Sat Jul 6 01:27:48 2024 -0700 wifi: mt76: mt7925: add mt7925_change_sta_links add mt7925_change_sta_links to change the valid links of a station, supporting the MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/eeedec88f0576315791a8b1b453464173a4addbe.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 69acd6d910b0c83842bd45c36224d4f8fe59d1d4 Author: Sean Wang Date: Sat Jul 6 01:27:47 2024 -0700 wifi: mt76: mt7925: add mt7925_change_vif_links Add mt7925_change_vif_links to change the valid links on an interface, supporting the MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/31c9de30c3a18592c8e100f909845383b66f8677.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 49681949b99a3a4bb1eae08e139752b2ffa05df2 Author: Sean Wang Date: Sat Jul 6 01:27:46 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_uni_roc_event We extended the function to be able multiple pieces of information in a single event, supporting the future MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/4be7b34904034d521dab147883b898b5402fd29f.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 7cf7785a922b920a048fe8edbe9f30d4ea5b9ffe Author: Sean Wang Date: Sat Jul 6 01:27:45 2024 -0700 wifi: mt76: mt7925: add mt7925_set_link_key add mt7925_set_link_key to set up the key according to the link id Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/e8cd7d37484be238a4eb9e500ef2b8aa46e43667.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 00e1ca0cad2e072df173ac6e8290109288352307 Author: Sean Wang Date: Sat Jul 6 01:27:44 2024 -0700 wifi: mt76: mt7925: set mt7925_mcu_sta_key_tlv according to link id configure mt7925_mcu_sta_key_tlv according to link id We created a link id field in the common structure mt76_wcid so that mt7925_mcu_sta_key_tlv can access per-link STA/BSS. Additionally, .link_id will be required when reporting the link information of Rx status to mac80211. We will submit the changes for reporting the Rx status in a separate patch. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/16d65aae010113f9be3c4e6e759b4226d396a1be.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 882b97c16ab861d7e267262df48b32d6db4121f1 Author: Sean Wang Date: Sat Jul 6 01:27:43 2024 -0700 wifi: mt76: mt7925: set Tx queue parameters according to link id Configure TX queue parameters according to link id. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/84a401891b8942f66d1ffbd0a3f10866c94d1bc0.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 3878b4333602498a6af3df75e78d5fe255fa5b17 Author: Sean Wang Date: Sat Jul 6 01:27:42 2024 -0700 wifi: mt76: mt7925: update mt7925_mac_link_sta_[add, assoc, remove] for MLO [add, assoc, remove] the per-link STA from the corresponding to per-link BSS with the same link id. The change remains compatible with the non-MLO mode. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/2410cc73eec3849c2185b5cfa613b7e903e68abb.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 2938b50917a5431efa8c00c9c8b2ee89c406cf05 Author: Sean Wang Date: Wed Jul 3 14:42:06 2024 -0700 wifi: mt76: mt7925: update mt76_connac_mcu_uni_add_dev for MLO Set OMAC address with the per-link BSS. The change remains compatible with the non-MLO mode and the older firmware. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/6b2502d0c3a53093f83ae33329e9d782ba2465b3.1720042294.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 8b7eb93b7a75f453d2b35c5b904895b628949593 Author: Sean Wang Date: Wed Jun 12 20:02:41 2024 -0700 wifi: mt76: mt7925: simpify mt7925_mcu_sta_cmd logic by removing fw_offload The mt7925 only supports offload firmware making the fw_offload check redundant. This update simplifies the logic in "mt7925_mcu_sta_cmd" by removing the unnecessary check for fw_offoad. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-48-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 1541d63c5fe2cebce85b2af84a2850a302ffda9c Author: Sean Wang Date: Wed Jun 12 20:02:40 2024 -0700 wifi: mt76: mt7925: add mt7925_mac_link_bss_remove to remove per-link BSS The mt7925_mac_link_bss_remove function currently removes the per-link BSS. We will extend this function when we implement the MLO functionality. This patch only includes structural changes and does not involve any logic changes. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-47-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 95977b1d10cfeb12b67a76dc2eefa86300c396d1 Author: Sean Wang Date: Wed Jun 12 20:02:39 2024 -0700 wifi: mt76: mt7925: add mt7925_mac_link_bss_add to create per-link BSS The mt7925_mac_link_bss_add function currently creates the per-link BSS. We will extend this function when we implement the MLO functionality. This patch only includes structural changes and does not involve any logic changes. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-46-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 5f5b6a745c697c1a80cfd9eacf1f91613d29b050 Author: Sean Wang Date: Wed Jun 12 20:02:38 2024 -0700 wifi: mt76: mt7925: add mt7925_mac_link_sta_remove to remove per-link STA The mt7925_mac_link_sta_remove function currently removes the per-link STA. We will extend this function when we implement the MLO functionality. This patch only includes structural changes and does not involve any logic changes. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-45-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 89397bccc882a446373874cd8c4164e1612d8494 Author: Sean Wang Date: Wed Jun 12 20:02:37 2024 -0700 wifi: mt76: mt7925: add mt7925_mac_link_sta_assoc to associate per-link STA The mt7925_mac_link_sta_add function currently associates the per-link STA. We will extend this function when we implement the MLO functionality. This patch only includes structural changes and does not involve any logic changes. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-44-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 5029871583c3cf42f3320b7709820ad44a1313fc Author: Sean Wang Date: Wed Jun 12 20:02:36 2024 -0700 wifi: mt76: mt7925: add mt7925_mac_link_sta_add to create per-link STA The mt7925_mac_link_sta_add function currently adds the per-link STA. We will extend this function when we implement the MLO functionality. This patch only includes structural changes and does not involve any logic changes. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-43-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit c1c98696de70e378a70b5b34ecf6193a8ccad4e5 Author: Sean Wang Date: Wed Jun 12 20:02:35 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_basic_tlv for per-link STA Extend mt7925_mcu_bss_basic_tlv with the per-link STA configuration. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-42-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 523f5d9c256079fe21087b3dfc4c3c0c1fffab53 Author: Sean Wang Date: Wed Jun 12 20:02:34 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_mld_tlv for per-link STA Extend mt7925_mcu_bss_mld_tlv with the per-link STA configuration. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-41-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 064a5955aa2732844ca1e30b93d66c9ce179e811 Author: Sean Wang Date: Wed Jun 12 20:02:33 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_add_bss_info for per-link STA Extend mt7925_mcu_add_bss_info with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-40-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 612004dd7480b0a039909f3959a73cbc59523f65 Author: Sean Wang Date: Wed Jun 12 20:02:32 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_hdr_trans_tlv for per-link STA Extend mt7925_mcu_sta_hdr_trans_tlv with per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-39-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 6e226666efc06dadc0fc92c63c8fe9fa17898b8b Author: Sean Wang Date: Wed Jun 12 20:02:31 2024 -0700 wifi: mt76: mt762x: extend mt76_connac_mcu_sta_basic_tlv for per-link STA Extend mt76_connac_mcu_sta_basic_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-38-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 45020d10d276f4e9678572207962fcf6d32f625b Author: Sean Wang Date: Wed Jun 12 20:02:30 2024 -0700 wifi: mt76: mt792x: extend mt76_connac_get_phy_mode_v2 for per-link STA Extend mt76_connac_get_phy_mode_v2 with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-37-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 9d345e15ef58f7ac6e3ad0f1b99169f6b0bcd521 Author: Sean Wang Date: Wed Jun 12 20:02:29 2024 -0700 wifi: mt76: mt7925: extend mt7925_get_phy_mode for per-link STA Extend mt7925_get_phy_mode with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-36-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 15ced2a624a534df601d7e74e512177dca3901d5 Author: Sean Wang Date: Wed Jun 12 20:02:28 2024 -0700 wifi: mt76: mt7925: extend mt7925_get_phy_mode_ext for per-link STA Extend mt7925_get_phy_mode_ext with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-35-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit e7a9853e6b8ae7f3da4134364e010894cbb9a754 Author: Sean Wang Date: Wed Jun 12 20:02:27 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_phy_tlv for per-link STA Extend mt7925_mcu_sta_phy_tlv with per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-34-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 872b5a03369c97f8e8c51d018618c25c04442d77 Author: Sean Wang Date: Wed Jun 12 20:02:26 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_ht_tlv for per-link STA Extend mt7925_mcu_sta_ht_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-33-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit f75b6ee03aecfe5b74885a1042a5f80189b47144 Author: Sean Wang Date: Wed Jun 12 20:02:25 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_vht_tlv for per-link STA Extend mt7925_mcu_sta_vht_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-32-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 8ebb1a61b41e3c803c99b2828953c21eca181fcd Author: Sean Wang Date: Wed Jun 12 20:02:24 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_amsdu_tlv for per-link STA Extend mt7925_mcu_sta_amsdu_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-31-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit e2f10f5bdd687c0ebfdb5dc9f452c05121a45f86 Author: Sean Wang Date: Wed Jun 12 20:02:23 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_he_tlv for per-link STA Extend mt7925_mcu_sta_he_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-30-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 6805b190d2e13f6ddbdfe3bfd434ae2a1aba1d89 Author: Sean Wang Date: Wed Jun 12 20:02:22 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_he_6g_tlv for per-link STA Extend mt7925_mcu_sta_he_6g_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-29-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b2f597730619202a9d11f65d1b642a771d6c2658 Author: Sean Wang Date: Wed Jun 12 20:02:21 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_eht_tlv for per-link STA Extend mt7925_mcu_sta_eht_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-28-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 22e177d2a72e8e8cbdb62722795e36769964b6eb Author: Sean Wang Date: Wed Jun 12 20:02:20 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_rate_ctrl_tlv with per-link STA Extend mt7925_mcu_sta_rate_ctrl_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-27-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit ec8a86b2f09ca14d8492a625f637c9fbf7264f40 Author: Sean Wang Date: Wed Jun 12 20:02:19 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_state_v2_tlv for per-link STA Extend mt7925_mcu_sta_state_v2_tlv with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-26-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit f7cc8944039c0066f1e7b78a7f8c02bf558d098f Author: Sean Wang Date: Wed Jun 12 20:02:18 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_sta_update for per-link STA Extend mt7925_mcu_sta_update with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-25-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 22d66ef6653bb62c7b3eb6974b86435ff55af3a7 Author: Sean Wang Date: Wed Jun 12 20:02:17 2024 -0700 wifi: mt76: mt7925: mt7925_mcu_set_chctx rely on mt7925_mcu_bss_rlm_tlv make mt7925_mcu_set_chctx rely on mt7925_mcu_bss_rlm_tlv to get rid of the redundant code. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-24-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit ca64503a8f06ec712c372a7436ffb2b371e4d93c Author: Sean Wang Date: Wed Jun 12 20:02:16 2024 -0700 wifi: mt76: mt7925: add mt7925_mcu_bss_rlm_tlv to constitue the RLM TLV add mt7925_mcu_bss_rlm_tlv to maintain consistency with the other TLVs that constitute the command for creating the per-link BSS. Co-developed-by: Ming Yen Hsieh Signed-off-by: Ming Yen Hsieh Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-23-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 3a0c8d2908297b63f0e5a3364721ffd32e5a0c0c Author: Sean Wang Date: Wed Jun 12 20:02:15 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_ps for per-link BSS Extend mt7925_mcu_uni_bss_ps with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-22-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit d1c5f3719faa782efe7b0dd26b8f263345e1d314 Author: Sean Wang Date: Wed Jun 12 20:02:14 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_bcnft for per-link BSS Extend mt7925_mcu_uni_bss_bcnft with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-21-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 0aa5e96c6df77aa8c0e5b3f77afa0a4fc84ffe4c Author: Sean Wang Date: Wed Jun 12 20:02:13 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_[abort, set]_roc for per-link BSS The channel context has to be bound with the per-link BSS, thus, we extend mt7925_mcu_[abort, set]_roc to work with the per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-20-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b6749ee8b466d5f0fe0a8b80991bc44866ce0be5 Author: Sean Wang Date: Wed Jun 12 20:02:12 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_set_bss_pm for per-link BSS Extend mt7925_mcu_set_bss_pm with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-19-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 21760dcd2ab61333533e9d72c1e585f6bf25bb7b Author: Sean Wang Date: Wed Jun 12 20:02:11 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_basic_tlv for per-link BSS Extend mt7925_mcu_bss_basic_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-18-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit ff5efcd4f8cb264ba86236785f5d32ba604625ef Author: Sean Wang Date: Wed Jun 12 20:02:10 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_sec_tlv for per-link BSS Extend mt7925_mcu_bss_sec_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-17-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 0637256a79ecf22d483876263881329b35ad788c Author: Sean Wang Date: Wed Jun 12 20:02:09 2024 -0700 wifi: mt76: mt7925: remove unused parameters in mt7925_mcu_bss_bmc_tlv remove unused parameters in mt7925_mcu_bss_bmc_tlv Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-16-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 1d1f12689919588050afe89d5577a009774f4439 Author: Sean Wang Date: Wed Jun 12 20:02:08 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_bmc_tlv for per-link BSS Extend mt7925_mcu_bss_bmc_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-15-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 220865160cf624c8630de76b5a6013562399eb2e Author: Sean Wang Date: Wed Jun 12 20:02:07 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_mld_tlv for per-link BSS Extend mt7925_mcu_bss_mld_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-14-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit eff53d6ee11bb45d7dbcd348fbf4a1734f97d753 Author: Sean Wang Date: Wed Jun 12 20:02:06 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_qos_tlv for per-link BSS Extend mt7925_mcu_bss_qos_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-13-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit a5c372f77aa7969db9cde1b71c3193bdb126259b Author: Sean Wang Date: Wed Jun 12 20:02:05 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_he_tlv for per-link BSS Extend mt7925_mcu_bss_he_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-12-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b698264e1ec20b22dad6f58323f3d53d7680cc2d Author: Sean Wang Date: Wed Jun 12 20:02:04 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_color_tlv for per-link BSS Extend mt7925_mcu_bss_color_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-11-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit d62f77e3477819ddda50e62974ee160eb4c7734f Author: Sean Wang Date: Wed Jun 12 20:02:03 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_bss_ifs_tlv for per-link BSS Extend mt7925_mcu_bss_ifs_tlv with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-10-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit b8b04b6616bacca2ddd3eeefeb54b1bcdb2d7f4b Author: Sean Wang Date: Wed Jun 12 20:02:02 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_set_timing for per-link BSS Extend mt7925_mcu_set_timing with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-9-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit fa5f44463f51944a2f33caf92c47e2d02217e3f1 Author: Sean Wang Date: Wed Jun 12 20:02:01 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_add_bss_info for per-link BSS Extend mt7925_mcu_add_bss_info with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-8-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit acdfc3e79899871ef8146efd9be74a9b78858b67 Author: Deren Wu Date: Wed Jun 12 20:02:00 2024 -0700 wifi: mt76: mt7925: extend mt7925_mcu_set_tx with for per-link BSS Extend mt7925_mcu_set_tx with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Deren Wu Link: https://patch.msgid.link/20240613030241.5771-7-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 7cebb6a66ac6a08b5fc80c1e6cfb337473f4f4d2 Author: Sean Wang Date: Wed Jun 12 20:01:59 2024 -0700 wifi: mt76: mt792x: extend mt76_connac_mcu_uni_add_dev for per-link BSS Extend mt76_connac_mcu_uni_add_dev with per-link BSS configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. We also extend link_idx field in mt76_connac_bss_basic_tlv for the firmware to able to identify the link index in the MLO mode that is not harmful for the current non-MLO mode. Signed-off-by: Sean Wang Link: https://patch.msgid.link/20240613030241.5771-6-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 43626f0e0c991593ff196a886ccb9455701e4e2e Author: Deren Wu Date: Wed Jun 12 20:01:58 2024 -0700 wifi: mt76: mt7925: support for split bss_info_changed method The .bss_info_changed method is being split into .vif_cfg_changed and .link_info_changed to support MLD devices, but it will still support non-MLD devices. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Deren Wu Link: https://patch.msgid.link/20240613030241.5771-5-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit f3898da2e86e43b83165347acf9194914a9146e0 Author: Deren Wu Date: Wed Jun 12 20:01:57 2024 -0700 wifi: mt76: mt792x: add struct mt792x_chanctx We are introducing a new structure, mt792x_chanctx, to quickly identify the linked BSS it is working on. This eliminates the need to search in mt7921_ctx_iter() or mt7925_ctx_iter() when the channel context changes. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Deren Wu Link: https://patch.msgid.link/20240613030241.5771-4-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 4c28c0976ed83c3e8240e80ea918c4d1a3f9c5bc Author: Deren Wu Date: Wed Jun 12 20:01:56 2024 -0700 wifi: mt76: mt792x: add struct mt792x_link_sta We are introducing a new structure, mt792x_link_sta, to manage per-link configurations in preparation for future station (STA) support of Multi-Link Operation (MLO). This patch only includes structural changes and does not involve any logic changes. We have moved relevant parameters, such as the wcid from the mt76_wcid structure, from the mt7921x_sta structure to the mt792x_link_sta structure. For current drivers that do not support MLO, there is only one link STA, and link information is accessed via the deflink member. However, we have not yet created the per-link BSS configuration indexed by link ID for Multi-Link Device (MLD) support in mt7921x_sta. This step needs to be completed before adding MLD support for STA mode. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Deren Wu Link: https://patch.msgid.link/20240613030241.5771-3-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 30e89baeb01fc765824ed931b33b0faf4d8d1461 Author: Deren Wu Date: Wed Jun 12 20:01:55 2024 -0700 wifi: mt76: mt792x: add struct mt792x_bss_conf We are introducing a new structure, mt792x_bss_conf, to manage per-link configurations in preparation for future STA support of Multi-Link Operation (MLO). The patch does not include any logic changes, only structural changes. We have moved relevant parameters from the mt7921x_vif structure such as to mt76 of mt76_vif structure, rssi and Tx queue parameters to mt7921x_bss_conf structure. We can access those members to configure the BSS for this interface, whether it is our own BSS or the one we are associated with. However, we have not yet created the per-link BSS configuration indexed by link ID for Multi-Link Device (MLD) support. This step needs to be extended before adding MLD support for AP mode. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Deren Wu Link: https://patch.msgid.link/20240613030241.5771-2-sean.wang@kernel.org Signed-off-by: Felix Fietkau commit 8cfda4059fe1e45dcb1326a5e117e1371a7cf0e6 Merge: 782b726201471 55751d3e9e96d Author: Arnd Bergmann Date: Tue Jul 9 22:50:24 2024 +0200 Merge tag 'qcom-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers A few more Qualcomm driver updates for v6.11 This adds a quirk to skip using the newly introduced SHM Bridge implementation while regressions are being investigated. One occurance of return no_free_ptr() is replaced with return_ptr() to make code easier to read. llcc, mdt_loader, ocmem, pdr, socinfo and wcnss drivers gets simplified using cleanup.h. * tag 'qcom-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: firmware: qcom: tzmem: blacklist more platforms for SHM Bridge soc: qcom: wcnss: simplify with cleanup.h soc: qcom: pdr: simplify with cleanup.h soc: qcom: ocmem: simplify with cleanup.h soc: qcom: mdt_loader: simplify with cleanup.h soc: qcom: llcc: simplify with cleanup.h firmware: qcom: tzmem: simplify returning pointer without cleanup soc: qcom: socinfo: Add PM6350 PMIC Link: https://lore.kernel.org/r/20240709191246.3053-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 691a01804086527bd2b4413fb0a4fbcc92f8002e Merge: 01a0a6cc8cfd9 23711cabe122e Author: Stephen Boyd Date: Tue Jul 9 12:54:12 2024 -0700 Merge tag 'qcom-clk-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull more qcom clk driver updates from Bjorn Andersson: - Introduces helper logic to expose clock controllers as simple interconnect providers - Use the interconnect helper above on Qualcomm ipq9574 - Add CLK_SET_RATE_PARENT to the remaining USB pipe clocks on Qualcomm X1Elite. - Improve error handling in Qualcomm kpss-xcc driver - Mark Qualcomm SC8280XP LPASS clock controller regmap_config const * tag 'qcom-clk-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: clk: qcom: ipq9574: Use icc-clk for enabling NoC related clocks clk: qcom: common: Add interconnect clocks support interconnect: icc-clk: Add devm_icc_clk_register interconnect: icc-clk: Specify master/slave ids dt-bindings: clock: qcom: Add AHB clock for SM8150 clk: qcom: gcc-x1e80100: Set parent rate for USB3 sec and tert PHY pipe clks dt-bindings: interconnect: Add Qualcomm IPQ9574 support clk: qcom: kpss-xcc: Return of_clk_add_hw_provider to transfer the error clk: qcom: lpasscc-sc8280xp: Constify struct regmap_config commit 8c409989678e92e4a737e7cd2bb04f3efb81071a Author: Sheng Yong Date: Mon Jul 8 20:04:07 2024 +0800 f2fs: fix start segno of large section get_ckpt_valid_blocks() checks valid ckpt blocks in current section. It counts all vblocks from the first to the last segment in the large section. However, START_SEGNO() is used to get the first segno in an SIT block. This patch fixes that to get the correct start segno. Fixes: 61461fc921b7 ("f2fs: fix to avoid touching checkpointed data in get_victim()") Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit dd44477e7fa15ba3b100dfc67bf7cf083f3dccf6 Author: Paul Moore Date: Wed Jul 3 17:00:20 2024 -0400 selinux,smack: remove the capability checks in the removexattr hooks Commit 61df7b828204 ("lsm: fixup the inode xattr capability handling") moved the responsibility of doing the inode xattr capability checking out of the individual LSMs and into the LSM framework itself. Unfortunately, while the original commit added the capability checks to both the setxattr and removexattr code in the LSM framework, it only removed the setxattr capability checks from the individual LSMs, leaving duplicated removexattr capability checks in both the SELinux and Smack code. This patch removes the duplicated code from SELinux and Smack. Fixes: 61df7b828204 ("lsm: fixup the inode xattr capability handling") Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit d694711355748d9b835d29f4678ae011ed4ce9b6 Author: Guillaume La Roque Date: Mon Jul 8 16:31:34 2024 +0200 net: ti: icssg-prueth: add missing deps Add missing dependency on NET_SWITCHDEV. Fixes: abd5576b9c57 ("net: ti: icssg-prueth: Add support for ICSSG switch firmware") Reviewed-by: Andrew Lunn Signed-off-by: Guillaume La Roque Reviewed-by: MD Danish Anwar Link: https://patch.msgid.link/20240708-net-deps-v2-1-b22fb74da2a3@baylibre.com Signed-off-by: Jakub Kicinski commit 5618ced0197932d8a87760f430e53534ec169919 Author: Frank Li Date: Mon Jul 8 14:09:49 2024 -0400 dt-bindings: net: fsl,fman: add ptimer-handle property Add ptimer-handle property to link to ptp-timer node handle. Fix below warning: arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: fman@1a00000: 'ptimer-handle' do not match any of the regexes: '^ethernet@[a-f0-9]+$', '^mdio@[a-f0-9]+$', '^muram@[a-f0-9]+$', '^phc@[a-f0-9]+$', '^port@[a-f0-9]+$', 'pinctrl-[0-9]+' Reviewed-by: Rob Herring (Arm) Signed-off-by: Frank Li Link: https://patch.msgid.link/20240708180949.1898495-2-Frank.Li@nxp.com Signed-off-by: Jakub Kicinski commit dd84d831ef27036031f9e11a67df1efebef78916 Author: Frank Li Date: Mon Jul 8 14:09:48 2024 -0400 dt-bindings: net: fsl,fman: allow dma-coherent property Add dma-coherent property to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: fman@1a00000: 'dma-coherent', 'ptimer-handle' do not match any of the regexes: '^ethernet@[a-f0-9]+$', '^mdio@[a-f0-9]+$', '^muram@[a-f0-9]+$', '^phc@[a-f0-9]+$', '^port@[a-f0-9]+$', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/net/fsl,fman.yaml# Reviewed-by: Rob Herring (Arm) Signed-off-by: Frank Li Link: https://patch.msgid.link/20240708180949.1898495-1-Frank.Li@nxp.com Signed-off-by: Jakub Kicinski commit 0d9e699d3421b5db83eb0cb7a708882440ee78ef Author: Simon Horman Date: Mon Jul 8 08:27:19 2024 +0100 net: tls: Pass union tls_crypto_context pointer to memzero_explicit Pass union tls_crypto_context pointer, rather than struct tls_crypto_info pointer, to memzero_explicit(). The address of the pointer is the same before and after. But the new construct means that the size of the dereferenced pointer type matches the size being zeroed. Which aids static analysis. As reported by Smatch: .../tls_main.c:842 do_tls_setsockopt_conf() error: memzero_explicit() 'crypto_info' too small (4 vs 56) No functional change intended. Compile tested only. Reviewed-by: Przemek Kitszel Signed-off-by: Simon Horman Link: https://patch.msgid.link/20240708-tls-memzero-v2-1-9694eaf31b79@kernel.org Signed-off-by: Jakub Kicinski commit 3699e57aae8817b232c311229ab531ee0ec39fc8 Author: Ido Schimmel Date: Sun Jul 7 12:54:58 2024 +0300 selftests: forwarding: Make vxlan-bridge-1d pass on debug kernels The ageing time used by the test is too short for debug kernels and results in entries being aged out prematurely [1]. Fix by increasing the ageing time. The same change was done for the VLAN-aware version of the test in commit dfbab74044be ("selftests: forwarding: Make vxlan-bridge-1q pass on debug kernels"). [1] # ./vxlan_bridge_1d.sh [...] # TEST: VXLAN: flood before learning [ OK ] # TEST: VXLAN: show learned FDB entry [ OK ] # TEST: VXLAN: learned FDB entry [FAIL] # veth3: Expected to capture 0 packets, got 4. # RTNETLINK answers: No such file or directory # TEST: VXLAN: deletion of learned FDB entry [ OK ] # TEST: VXLAN: Ageing of learned FDB entry [FAIL] # veth3: Expected to capture 0 packets, got 2. [...] Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240707095458.2870260-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit cb520c3f366c77e8d69e4e2e2781a8ce48d98e79 Author: Ma Ke Date: Tue Jul 9 19:33:11 2024 +0800 drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes In cdv_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: stable@vger.kernel.org Fixes: 6a227d5fd6c4 ("gma500: Add support for Cedarview") Signed-off-by: Ma Ke Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20240709113311.37168-1-make24@iscas.ac.cn commit 2df7aac81070987b0f052985856aa325a38debf6 Author: Ma Ke Date: Tue Jul 9 17:20:11 2024 +0800 drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes In psb_intel_lvds_get_modes(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a possible NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. Cc: stable@vger.kernel.org Fixes: 89c78134cc54 ("gma500: Add Poulsbo support") Signed-off-by: Ma Ke Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20240709092011.3204970-1-make24@iscas.ac.cn commit e4eaca5e30c55c83c547974188afc2b2d02d4f0c Author: Christophe JAILLET Date: Mon Jul 8 20:11:30 2024 +0200 block/rnbd: Constify struct kobj_type 'struct kobj_type' is not modified in this driver. It is only used with kobject_init_and_add() which takes a "const struct kobj_type *" parameter. 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 4082 792 8 4882 1312 drivers/block/rnbd/rnbd-srv-sysfs.o After: ===== text data bss dec hex filename 4210 672 8 4890 131a drivers/block/rnbd/rnbd-srv-sysfs.o Signed-off-by: Christophe JAILLET Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/e3d454173ffad30726c9351810d3aa7b75122711.1720462252.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe commit 18dcca24963a3401c7194e259aec689181a5c130 Merge: 53e6b65693b68 d1211768b62d0 Author: Jason Gunthorpe Date: Tue Jul 9 13:55:05 2024 -0300 Merge branch 'iommufd_pri' into iommufd for-next Lu Baolu says: ==================== This series implements the functionality of delivering IO page faults to user space through the IOMMUFD framework. One feasible use case is the nested translation. Nested translation is a hardware feature that supports two-stage translation tables for IOMMU. The second-stage translation table is managed by the host VMM, while the first-stage translation table is owned by user space. This allows user space to control the IOMMU mappings for its devices. When an IO page fault occurs on the first-stage translation table, the IOMMU hardware can deliver the page fault to user space through the IOMMUFD framework. User space can then handle the page fault and respond to the device top-down through the IOMMUFD. This allows user space to implement its own IO page fault handling policies. User space application that is capable of handling IO page faults should allocate a fault object, and bind the fault object to any domain that it is willing to handle the fault generatd for them. On a successful return of fault object allocation, the user can retrieve and respond to page faults by reading or writing to the file descriptor (FD) returned. The iommu selftest framework has been updated to test the IO page fault delivery and response functionality. ==================== * iommufd_pri: iommufd/selftest: Add coverage for IOPF test iommufd/selftest: Add IOPF support for mock device iommufd: Associate fault object with iommufd_hw_pgtable iommufd: Fault-capable hwpt attach/detach/replace iommufd: Add iommufd fault object iommufd: Add fault and response message definitions iommu: Extend domain attach group with handle support iommu: Add attach handle to struct iopf_group iommu: Remove sva handle list iommu: Introduce domain attachment handle Link: https://lore.kernel.org/all/20240702063444.105814-1-baolu.lu@linux.intel.com Signed-off-by: Jason Gunthorpe commit e56af94b9b5487a71f8c705c83ac5f7bc28ae1a2 Author: Gerhard Engleder Date: Mon Jul 8 20:00:49 2024 +0200 misc: keba: Fix missing AUXILIARY_BUS dependency The cp500 driver creates auxiliary devices. Kernel configs without CONFIG_AUXILIARY_BUS lead to warnings like this: cp500.c: undefined reference to `auxiliary_device_init' cp500.c: undefined reference to `__auxiliary_device_add' Add missing dependency to AUXILIARY_BUS to KEBA_CP500 Kconfig. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407081327.2DR4Ltu9-lkp@intel.com/ Fixes: a1944676767e ("misc: keba: Add basic KEBA CP500 system FPGA support") Signed-off-by: Gerhard Engleder Link: https://lore.kernel.org/r/20240708180049.12713-1-gerhard@engleder-embedded.com Signed-off-by: Greg Kroah-Hartman commit d1211768b62d02e27b46a3ff78f739c4776a0f03 Author: Lu Baolu Date: Tue Jul 2 14:34:44 2024 +0800 iommufd/selftest: Add coverage for IOPF test Extend the selftest tool to add coverage of testing IOPF handling. This would include the following tests: - Allocating and destroying an iommufd fault object. - Allocating and destroying an IOPF-capable HWPT. - Attaching/detaching/replacing an IOPF-capable HWPT on a device. - Triggering an IOPF on the mock device. - Retrieving and responding to the IOPF through the file interface. Link: https://lore.kernel.org/r/20240702063444.105814-11-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit ddee19971081b42615d62f4fdada21274708ed4d Author: Lu Baolu Date: Tue Jul 2 14:34:43 2024 +0800 iommufd/selftest: Add IOPF support for mock device Extend the selftest mock device to support generating and responding to an IOPF. Also add an ioctl interface to userspace applications to trigger the IOPF on the mock device. This would allow userspace applications to test the IOMMUFD's handling of IOPFs without having to rely on any real hardware. Link: https://lore.kernel.org/r/20240702063444.105814-10-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 34765cbc679c59ea5d952d738d2d16bf4aadc497 Author: Lu Baolu Date: Tue Jul 2 14:34:42 2024 +0800 iommufd: Associate fault object with iommufd_hw_pgtable When allocating a user iommufd_hw_pagetable, the user space is allowed to associate a fault object with the hw_pagetable by specifying the fault object ID in the page table allocation data and setting the IOMMU_HWPT_FAULT_ID_VALID flag bit. On a successful return of hwpt allocation, the user can retrieve and respond to page faults by reading and writing the file interface of the fault object. Once a fault object has been associated with a hwpt, the hwpt is iopf-capable, indicated by hwpt->fault is non NULL. Attaching, detaching, or replacing an iopf-capable hwpt to an RID or PASID will differ from those that are not iopf-capable. Link: https://lore.kernel.org/r/20240702063444.105814-9-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit b7d8833677baad8c80ed1aac8c396d687e64a376 Author: Lu Baolu Date: Tue Jul 2 14:34:41 2024 +0800 iommufd: Fault-capable hwpt attach/detach/replace Add iopf-capable hw page table attach/detach/replace helpers. The pointer to iommufd_device is stored in the domain attachment handle, so that it can be echo'ed back in the iopf_group. The iopf-capable hw page tables can only be attached to devices that support the IOMMU_DEV_FEAT_IOPF feature. On the first attachment of an iopf-capable hw_pagetable to the device, the IOPF feature is enabled on the device. Similarly, after the last iopf-capable hwpt is detached from the device, the IOPF feature is disabled on the device. The current implementation allows a replacement between iopf-capable and non-iopf-capable hw page tables. This matches the nested translation use case, where a parent domain is attached by default and can then be replaced with a nested user domain with iopf support. Link: https://lore.kernel.org/r/20240702063444.105814-8-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 07838f7fd529c8a6de44b601d4b7057e6c8d36ed Author: Lu Baolu Date: Tue Jul 2 14:34:40 2024 +0800 iommufd: Add iommufd fault object An iommufd fault object provides an interface for delivering I/O page faults to user space. These objects are created and destroyed by user space, and they can be associated with or dissociated from hardware page table objects during page table allocation or destruction. User space interacts with the fault object through a file interface. This interface offers a straightforward and efficient way for user space to handle page faults. It allows user space to read fault messages sequentially and respond to them by writing to the same file. The file interface supports reading messages in poll mode, so it's recommended that user space applications use io_uring to enhance read and write efficiency. A fault object can be associated with any iopf-capable iommufd_hw_pgtable during the pgtable's allocation. All I/O page faults triggered by devices when accessing the I/O addresses of an iommufd_hw_pgtable are routed through the fault object to user space. Similarly, user space's responses to these page faults are routed back to the iommu device driver through the same fault object. Link: https://lore.kernel.org/r/20240702063444.105814-7-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit c714f15860fcca02fe0fd7c3f1f1fc35b1768ac1 Author: Lu Baolu Date: Tue Jul 2 14:34:39 2024 +0800 iommufd: Add fault and response message definitions iommu_hwpt_pgfaults represent fault messages that the userspace can retrieve. Multiple iommu_hwpt_pgfaults might be put in an iopf group, with the IOMMU_PGFAULT_FLAGS_LAST_PAGE flag set only for the last iommu_hwpt_pgfault. An iommu_hwpt_page_response is a response message that the userspace should send to the kernel after finishing handling a group of fault messages. The @dev_id, @pasid, and @grpid fields in the message identify an outstanding iopf group for a device. The @cookie field, which matches the cookie field of the last fault in the group, will be used by the kernel to look up the pending message. Link: https://lore.kernel.org/r/20240702063444.105814-6-baolu.lu@linux.intel.com Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit e52a73e694522c7c94369a7741717a9f50baca0b Author: Chen Ni Date: Tue Jul 9 11:09:21 2024 +0800 ASoC: Intel: sof_sdw: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni Link: https://patch.msgid.link/20240709030921.585740-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit be5db7581f59621ed9cb9cbf6bebccda38263eb5 Author: Shenghao Ding Date: Tue Jul 9 12:33:40 2024 +0800 ASoc: TAS2781: rename the tas2781_reset as tasdevice_reset Rename the tas2781_reset as tasdevice_reset in case of misunderstanding. RESET register for both tas2563 and tas2781 is same and the use of reset pin is also same. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240709043342.946-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit b755367602d70deade956cbe0b8a3f5a12f569dc Author: Zhang Rui Date: Wed Jul 3 13:54:45 2024 +0800 thermal: intel: hfi: Give HFI instances package scope The Intel Software Developer's Manual defines the scope of HFI (registers and memory buffer) as a package. Use package scope(*) in the software representation of an HFI instance. Using die scope in HFI instances has the effect of creating multiple conflicting instances for the same package: each instance allocates its own memory buffer and configures the same package-level registers. Specifically, only one of the allocated memory buffers can be set in the MSR_IA32_HW_FEEDBACK_PTR register. CPUs get incorrect HFI data from the table. The problem does not affect current HFI-capable platforms because they all have single-die processors. (*) We used die scope for HFI instances because there had been processors with packages enumerated as dies. None of those systems supported HFI, though. If such a system emerged, it would need to be quirked. Co-developed-by: Chen Yu Signed-off-by: Chen Yu Signed-off-by: Zhang Rui Reviewed-by: Ricardo Neri Link: https://patch.msgid.link/20240703055445.125362-1-rui.zhang@intel.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit d1fbf18a0f9403df2edeffa1c7f5a2d66e82c20a Author: Rafael J. Wysocki Date: Tue Jul 2 16:41:03 2024 +0200 thermal: trip: Add conversion macros for thermal trip priv field Some drivers will need to store integers in the priv field of struct thermal_trip, so add conversion macros for doing this in a consistent way and switch over the int340x_thermal driver that already does it and uses custom conversion functions to using the new macros. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3297884.aeNJFYEL58@rjwysocki.net commit 463b86fed2b25ddb5f576376bfea00134dd23030 Author: Rafael J. Wysocki Date: Tue Jul 2 16:39:55 2024 +0200 thermal: helpers: Introduce thermal_trip_is_bound_to_cdev() Introduce a new helper function thermal_trip_is_bound_to_cdev() for checking whether or not a given trip point has been bound to a given cooling device. The primary user of it will be the Tegra thermal driver. Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/13545762.uLZWGnKmhe@rjwysocki.net commit d05374dee295d771261d382f97c0c23cb15aa104 Author: Rafael J. Wysocki Date: Fri Jul 5 21:44:50 2024 +0200 thermal: core: Change passive_delay and polling_delay data type It is better to use unsigned int as the data type for the passive_delay and polling_delay arguments of thermal_zone_device_register_with_trips() because they are implicitly cast to unsigned int anyway in thermal_set_delay_jiffies() and if they happen to be negative at that point, the resulting behavior may not be as desired. Update the thermal_zone_device_register_with_trips() definition accordingly. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Link: https://patch.msgid.link/5803791.DvuYhMxLoT@rjwysocki.net Signed-off-by: Rafael J. Wysocki commit e2e7f037b400aebbb3892d8010fb3d9cae6f426e Author: Tamim Khan Date: Sun Jul 7 20:05:50 2024 -0400 ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ Similar to other Asus Vivobooks, the Asus Vivobook Pro N6506MJ has a DSDT table that describes IRQ 1 as ActiveLow, whereas the kernel overrides it to Edge_High. This discrepancy prevents the internal keyboard from functioning properly. This patch resolves this issue by adding this laptop to the override table that prevents the kernel from overriding this IRQ. Link: https://bugzilla.kernel.org/show_bug.cgi?id=218929 Tested-by: Amber Connelly Signed-off-by: Tamim Khan Link: https://patch.msgid.link/20240708000557.83539-1-tamim@fusetak.com Signed-off-by: Rafael J. Wysocki commit 4e89a5309a7537b205854bcc6c4bb84a4779706b Merge: 256abd8e550ce e3943f00afdb7 Author: Rafael J. Wysocki Date: Tue Jul 9 18:00:18 2024 +0200 Merge tag 'opp-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp Merge OPP Updates for 6.11 from Viresh Kumar: "- Introduce an OF helper function to inform if required-opps is used (Ulf Hansson). - Generic cleanups (Ulf Hansson and Viresh Kumar)." * tag 'opp-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Introduce an OF helper function to inform if required-opps is used OPP: Drop a redundant in-parameter to _set_opp_level() OPP: Fix missing cleanup on error in _opp_attach_genpd() commit 7ad9eab9d4b299c837aadb0789102d27c3f1c1e1 Merge: e23f41cc4f747 d992f881764cc Author: Rafael J. Wysocki Date: Tue Jul 9 17:58:20 2024 +0200 Merge tag 'cpufreq-arm-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Merge ARM cpufreq updates for 6.11 from Viresh Kumar: "- cpufreq: Add Loongson-3 CPUFreq driver support (Huacai Chen). - Make exit() callback return void (Lizhe and Viresh Kumar). - Minor cleanups and fixes in several drivers (Bryan Brattlof, Javier Carrasco, Jagadeesh Kona, Jeff Johnson, Nícolas F. R. A. Prado, Primoz Fiser, Raphael Gallais-Pou, and Riwen Lu)." * tag 'cpufreq-arm-updates-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (21 commits) cpufreq: sti: fix build warning cpufreq: mediatek: Use dev_err_probe in every error path in probe cpufreq: Add Loongson-3 CPUFreq driver support cpufreq: Make cpufreq_driver->exit() return void cpufreq: pcc: Remove empty exit() callback cpufreq: loongson2: Remove empty exit() callback cpufreq: nforce2: Remove empty exit() callback cpufreq: sti: add missing MODULE_DEVICE_TABLE entry for stih418 cpufreq: ti: update OPP table for AM62Px SoCs cpufreq: ti: update OPP table for AM62Ax SoCs cpufreq: sun50i: add Allwinner H700 speed bin cpufreq/cppc: Don't compare desired_perf in target() OPP: ti: Fix ti_opp_supply_probe wrong return values cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe() cpufreq: dt-platdev: add missing MODULE_DESCRIPTION() macro cpufreq: longhaul: Fix kernel-doc param for longhaul_setstate cpufreq: qcom-nvmem: eliminate uses of of_node_put() cpufreq: qcom-nvmem: fix memory leaks in probe error paths cpufreq: scmi: Avoid overflow of target_freq in fast switch cpufreq: sun50i: replace of_node_put() with automatic cleanup handler ... commit 3ccea4784fddd96fbd6c4497eb28b45dab638c2a Author: Yanjun Yang Date: Tue Jun 11 18:09:47 2024 +0800 ARM: Remove address checking for MMUless devices Commit 169f9102f9198b ("ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()") added the function to check address before use. However, for devices without MMU, addr > TASK_SIZE will always fail. This patch move this function after the #ifdef CONFIG_MMU statement. Signed-off-by: Yanjun Yang Acked-by: Ard Biesheuvel Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218953 Fixes: 169f9102f9198b ("ARM: 9350/1: fault: Implement copy_from_kernel_nofault_allowed()") Link: https://lore.kernel.org/r/20240611100947.32241-1-yangyj.ee@gmail.com Signed-off-by: Kees Cook commit d010a0282e045f02895f88299e5442506585b46c Author: Orlando Chamberlain Date: Fri Jul 5 13:56:24 2024 +0000 ACPI: video: force native for some T2 macbooks The intel backlight is needed for these, previously users had nothing in /sys/class/backlight. Signed-off-by: Orlando Chamberlain Signed-off-by: Aditya Garg Reviewed-by: Hans de Goede Link: https://patch.msgid.link/3DA0EAE3-9EB7-492B-96FC-988503BBDCCC@live.com Signed-off-by: Rafael J. Wysocki commit a695949b2e9bb6b6700a764c704731a306c4bebf Author: Yao Zi Date: Wed Jul 3 15:58:27 2024 +0000 drm/meson: fix canvas release in bind function Allocated canvases may not be released on the error exit path of meson_drv_bind_master(), leading to resource leaking. Rewrite exit path to release canvases on error. Fixes: 2bf6b5b0e374 ("drm/meson: exclusively use the canvas provider module") Signed-off-by: Yao Zi Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240703155826.10385-2-ziyao@disroot.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240703155826.10385-2-ziyao@disroot.org commit ec85147a3529fded4bba12b48623f3a2587af83f Author: Douglas Anderson Date: Mon Jul 8 10:52:21 2024 -0700 drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove Commit d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove") had a subtle bug. We should be calling sharp_panel_del() when the "sharp" variable is non-NULL, not when it's NULL. Fix. Fixes: d7d473d8464e ("drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove") Cc: Thierry Reding Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202406261525.SkhtM3ZV-lkp@intel.com/ Reviewed-by: Neil Armstrong Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240708105221.1.I576751c661c7edb6b804dda405d10e2e71153e32@changeid commit 0a0d5f32b01cbc184a0c3b07cbe291f03f7c8a35 Author: Sergio González Collado Date: Sun Jul 7 21:50:47 2024 +0200 docs/sp_SP: Add translation for scheduler/sched-design-CFS.rst Translate Documentation/scheduler/sched-design-CFS.rst into Spanish Signed-off-by: Sergio González Collado Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240707195047.14359-1-sergio.collado@gmail.com commit 7f60f33d46b3e119201c48c008fa0bd89798fa83 Author: Richard Genoud Date: Tue Jun 18 17:19:38 2024 +0200 writing_musb_glue_layer.rst: Fix broken URL The http://processors.wiki.ti.com EOL in january 2021 The old documentation is still available through the wayback machine. Signed-off-by: Richard Genoud Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240618151938.1827064-1-richard.genoud@bootlin.com commit e7b5c6301910427d546603e3cfbf5b1e9304c92e Author: Tao Zou Date: Fri Jul 5 10:28:41 2024 +0800 zh_CN/admin-guide: one typo fix Fix one chinese typo error. Signed-off-by: Tao Zou Reviewed-by: Dongliang Mu Reviewed-by: Yanteng Si Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240705022842.51451-1-wodemia@linux.alibaba.com commit 0ee9fb1ab77b4145b2d23741fe51081147bd24cd Author: Zenghui Yu Date: Mon Jul 8 00:14:44 2024 +0800 docs/zh_CN/virt: Update the translation of guest-halt-polling.rst Update to commit 1954d51592b5 ("Documentation: virt: correct location of haltpoll module params") to fix the obvious mistake. Signed-off-by: Zenghui Yu Reviewed-by: Yanteng Si Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240707161444.98715-1-zenghui.yu@linux.dev commit 7b769adc2612b495d94a4b4537ffaa725861d763 Merge: 870a1dbcbc2eb 90dc946059b7d Author: Paolo Abeni Date: Tue Jul 9 17:01:46 2024 +0200 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2024-07-08 The following pull-request contains BPF updates for your *net-next* tree. We've added 102 non-merge commits during the last 28 day(s) which contain a total of 127 files changed, 4606 insertions(+), 980 deletions(-). The main changes are: 1) Support resilient split BTF which cuts down on duplication and makes BTF as compact as possible wrt BTF from modules, from Alan Maguire & Eduard Zingerman. 2) Add support for dumping kfunc prototypes from BTF which enables both detecting as well as dumping compilable prototypes for kfuncs, from Daniel Xu. 3) Batch of s390x BPF JIT improvements to add support for BPF arena and to implement support for BPF exceptions, from Ilya Leoshkevich. 4) Batch of riscv64 BPF JIT improvements in particular to add 12-argument support for BPF trampolines and to utilize bpf_prog_pack for the latter, from Pu Lehui. 5) Extend BPF test infrastructure to add a CHECKSUM_COMPLETE validation option for skbs and add coverage along with it, from Vadim Fedorenko. 6) Inline bpf_get_current_task/_btf() helpers in the arm64 BPF JIT which gives a small 1% performance improvement in micro-benchmarks, from Puranjay Mohan. 7) Extend the BPF verifier to track the delta between linked registers in order to better deal with recent LLVM code optimizations, from Alexei Starovoitov. 8) Fix bpf_wq_set_callback_impl() kfunc signature where the third argument should have been a pointer to the map value, from Benjamin Tissoires. 9) Extend BPF selftests to add regular expression support for test output matching and adjust some of the selftest when compiled under gcc, from Cupertino Miranda. 10) Simplify task_file_seq_get_next() and remove an unnecessary loop which always iterates exactly once anyway, from Dan Carpenter. 11) Add the capability to offload the netfilter flowtable in XDP layer through kfuncs, from Florian Westphal & Lorenzo Bianconi. 12) Various cleanups in networking helpers in BPF selftests to shave off a few lines of open-coded functions on client/server handling, from Geliang Tang. 13) Properly propagate prog->aux->tail_call_reachable out of BPF verifier, so that x86 JIT does not need to implement detection, from Leon Hwang. 14) Fix BPF verifier to add a missing check_func_arg_reg_off() to prevent an out-of-bounds memory access for dynpointers, from Matt Bobrowski. 15) Fix bpf_session_cookie() kfunc to return __u64 instead of long pointer as it might lead to problems on 32-bit archs, from Jiri Olsa. 16) Enhance traffic validation and dynamic batch size support in xsk selftests, from Tushar Vyavahare. bpf-next-for-netdev * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (102 commits) selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep selftests/bpf: amend for wrong bpf_wq_set_callback_impl signature bpf: helpers: fix bpf_wq_set_callback_impl signature libbpf: Add NULL checks to bpf_object__{prev_map,next_map} selftests/bpf: Remove exceptions tests from DENYLIST.s390x s390/bpf: Implement exceptions s390/bpf: Change seen_reg to a mask bpf: Remove unnecessary loop in task_file_seq_get_next() riscv, bpf: Optimize stack usage of trampoline bpf, devmap: Add .map_alloc_check selftests/bpf: Remove arena tests from DENYLIST.s390x selftests/bpf: Add UAF tests for arena atomics selftests/bpf: Introduce __arena_global s390/bpf: Support arena atomics s390/bpf: Enable arena s390/bpf: Support address space cast instruction s390/bpf: Support BPF_PROBE_MEM32 s390/bpf: Land on the next JITed instruction after exception s390/bpf: Introduce pre- and post- probe functions s390/bpf: Get rid of get_probe_mem_regno() ... ==================== Link: https://patch.msgid.link/20240708221438.10974-1-daniel@iogearbox.net Signed-off-by: Paolo Abeni commit 9784f29bf59b2fe7a968be9394afb39a25ac0114 Author: Daniel Lublin Date: Tue Jul 9 15:51:57 2024 +0200 Documentation: add reference from dynamic debug to loglevel kernel params This is useful information for somebody who has managed to dig into enabling debug output, but is wondering why there is no such output appearing on the console. Signed-off-by: Daniel Lublin Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/4633bdb82c1c7c014d79840887878624a55c59f8.1720533043.git.daniel@lublin.se commit 94a2bc0f611cd9fa4d26e4679bf7ea4b01b12d56 Author: Linus Torvalds Date: Sat Jun 8 13:22:31 2024 -0700 arm64: add 'runtime constant' support This implements the runtime constant infrastructure for arm64, allowing the dcache d_hash() function to be generated using as a constant for hash table address followed by shift by a constant of the hash index. [ Fixed up to deal with the big-endian case as per Mark Rutland ] Signed-off-by: Linus Torvalds commit fdd3d14ca3c8c5269174f10d33d6181173cbd0b4 Author: Krzysztof Kozlowski Date: Wed Jul 3 12:16:01 2024 +0200 soundwire: debugfs: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-9-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit b72d4af98cae2f74dc8061befcc3c0c2a174894f Author: Krzysztof Kozlowski Date: Wed Jul 3 12:16:00 2024 +0200 soundwire: cadence: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-8-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit 3dce65898e0911aa76a0a321540b78e9218b9a6a Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:59 2024 +0200 soundwire: intel_ace2x: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-7-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit 13814ed162687be08e34762040cfc2e58831219d Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:58 2024 +0200 soundwire: intel_ace2x: simplify return path in hw_params Remove unused error path (label+goto) to make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-6-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit e4fcf153d91809aefa6860d285e747fd7dd9e61c Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:57 2024 +0200 soundwire: intel: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-5-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit ba874a8c2f895d898bbaf67f9e952425aff1557d Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:56 2024 +0200 soundwire: intel: simplify return path in hw_params Remove unused error path (label+goto) to make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-4-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit 1f93cb229b0e2d78233690c9ca65715e1f798803 Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:55 2024 +0200 soundwire: amd_init: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-3-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit 02611eeec5893c17ad85769007ecfb5cbe7a5987 Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:54 2024 +0200 soundwire: amd: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-2-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit 89cc1354d388ba8c8f8b41095736202a83591497 Author: Krzysztof Kozlowski Date: Wed Jul 3 12:15:53 2024 +0200 soundwire: amd: simplify return path in hw_params Remove unused error path (label+goto) to make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-1-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul commit c326356188f1dc2d7a2c55b30dac6a8b76087bc6 Author: Pierre-Louis Bossart Date: Thu Jul 4 08:34:11 2024 +0800 soundwire: intel_auxdevice: start the bus at default frequency When platform firmware exposes multiple supported bus frequencies, the existing SoundWire support selects the maximum frequency. This is not aligned with the SoundWire 1.2 directions: the MIPI recommendation is to start at a 'safe' speed, compatible with the default frame rate and shape, and only increase the clock when vendor and codec PHY parameters are updated. However, clock changes are not supported for now by the SoundWire core, so in practice this patch has the effect of discarding frequencies different to the implicit default. Dynamic clock changes will be required at some point, and this limitation will be removed after the core is updated, specifically to perform synchronous clock scale changes on manager and peripheral sides with a bank switch. On Intel LunarLake platforms with a 'standard' DSDT, this forces the use of 4.8MHz. On older platforms this patch has no effect. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20240704003411.10347-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9ca5a7d9d2e05de6b80676c4289575f2762fcf68 Author: Frank Li Date: Wed Jul 3 14:08:11 2024 -0400 dt-bindings: soc: fsl: Add fsl,ls1028a-reset for reset syscon node ls1028a has a reset module that includes reboot, reset control word, and service processor control. Add platform specific compatible string to fix the below warning. syscon@1e60000: compatible: 'anyOf' conditional failed, one must be fixed: ['syscon'] is too short 'syscon' is not one of ['al,alpine-sysfabric-service', ...] Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240703-ls_reset_syscon-v1-1-338f41b3902d@nxp.com Signed-off-by: Rob Herring (Arm) commit ecbfc6ff94a21a87bfff3d0f65351964e3380839 Author: Frank Li Date: Wed Jul 3 12:49:39 2024 -0400 dt-bindings: soc: fsl: cpm_qe: convert to yaml format Convert binding doc qe.txt to yaml format. Split it to fsl,qe-firmware.yaml, fsl,qe-ic.yaml, fsl,qe-muram.yaml, fsl,qe-si.yaml fsl,qe-siram.yaml, fsl,qe.yaml. Additional Changes: - Fix error in example. - Change to low case for hex value. - Remove fsl,qe-num-riscs and fsl,qe-snums from required list. - Add #address-cell and #size-cell. - Add interrupts description for qe-ic. - Add compatible string fsl,ls1043-qe-si for fsl,qe-si.yaml - Add compatible string fsl,ls1043-qe-siram for fsl,qe-siram.yaml - Add child node for fsl,qe.yaml Fix below warning: arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: /soc/uqe@2400000/muram@10000: failed to match any schema with compatible: ['fsl,qe-muram', 'fsl,cpm-muram'] arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: /soc/uqe@2400000/muram@10000: failed to match any schema with compatible: ['fsl,qe-muram', 'fsl,cpm-muram'] arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: /soc/uqe@2400000/muram@10000/data-only@0: failed to match any schema with compatible: ['fsl,qe-muram-data', 'fsl,cpm-muram-data'] arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: /soc/uqe@2400000: failed to match any schema with compatible: ['fsl,qe', 'simple-bus'] arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: /soc/uqe@2400000/muram@10000/data-only@0: failed to match any schema with compatible: ['fsl,qe-muram-data', 'fsl,cpm-muram-data'] arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: /soc/uqe@2400000/qeic@80: failed to match any schema with compatible: ['fsl,qe-ic'] Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240703-ls_qe_warning-v1-1-7fe4af5b0bb0@nxp.com Signed-off-by: Rob Herring (Arm) commit 1a73912f9f64e1596c8db234f5f0e6ec9662a3d6 Author: Eddie James Date: Wed May 22 14:25:15 2024 -0500 dt-bindings: i2c: i2c-fsi: Convert to json-schema Convert to json-schema for the FSI-attached I2C controller. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Reviewed-by: Ninad Palsule Link: https://lore.kernel.org/r/20240522192524.3286237-12-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 51a3f7c52981024dcd1a6f05f118f1f1903126e1 Author: Eddie James Date: Wed May 22 14:25:14 2024 -0500 dt-bindings: fsi: Document the FSI Hub Controller Document the FSI Hub Controller CFAM engine. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-11-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 7a609bc30cc572e028c2d991c969e55b1e6d6601 Author: Eddie James Date: Wed May 22 14:25:13 2024 -0500 dt-bindings: fsi: Document the AST2700 FSI controller Add the appropriate compatible string, and document the new reg properties of the AST2700 FSI controller, which can directly access the FSI controller registers as well as the FSI link address space. Signed-off-by: Eddie James Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-10-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 7767cd04ca7c2f0760570b413a04a0e1373ebb0e Author: Eddie James Date: Wed May 22 14:25:12 2024 -0500 dt-bindings: fsi: ast2600-fsi-master: Convert to json-schema Convert to json-schema for the AST2600 FSI master documentation. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-9-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 07f8b91277c943f502692278e61f6ebc1a75edc9 Author: Eddie James Date: Wed May 22 14:25:11 2024 -0500 dt-bindings: fsi: ibm,i2cr-fsi-master: Reference common FSI controller Remove the common properties from the I2CR documentation and instead point to the common FSI controller documentation. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-8-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit a3d5095eb61755aa8247df92c7a8e1e5890ba78c Author: Eddie James Date: Wed May 22 14:25:10 2024 -0500 dt-bindings: fsi: Document the FSI controller common properties Since there are multiple FSI controllers documented, the common properties should be documented separately and then referenced from the specific controller documentation. Add bus-frequency for the FSI bus and CFAM local bus frequencies. Add interrupt controller properties. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-7-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 76ee122efe360cb49e704cba902b0f78cc647e2f Author: Eddie James Date: Wed May 22 14:25:09 2024 -0500 dt-bindings: fsi: Document the IBM SBEFIFO engine The SBEFIFO engine provides an interface to the POWER processor Self Boot Engine (SBE). Signed-off-by: Eddie James Acked-by: Conor Dooley Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20240522192524.3286237-6-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 408f50d1cebf2c725fc88da0715b3482326d9e32 Author: Eddie James Date: Wed May 22 14:25:08 2024 -0500 dt-bindings: fsi: p9-occ: Convert to json-schema Conver to json-schema for the OCC documentation. Also document the fact that the OCC "bridge" device will often have the hwmon node as a child. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-5-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit 29aa58d5b14eda4a30fe7bc05f7348f8afe2453f Author: Eddie James Date: Wed May 22 14:25:07 2024 -0500 dt-bindings: fsi: Document the IBM SCOM engine The SCOM engine provides an interface to the POWER processor PIB (Pervasive Interconnect Bus). Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-4-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit c7bcbb8e8f50a009d2efd9dd2af325a68d63ebaa Author: Eddie James Date: Wed May 22 14:25:06 2024 -0500 dt-bindings: fsi: fsi2spi: Document SPI controller child nodes The FSI2SPI bridge has several SPI controllers behind it, which should be documented. Also, therefore the node needs to specify address and size cells. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522192524.3286237-3-eajames@linux.ibm.com Signed-off-by: Rob Herring (Arm) commit c184d44a132429380d53f7b678e38b811fc9386a Author: Frank Li Date: Thu Jun 27 10:42:07 2024 -0400 dt-bindings: interrupt-controller: convert fsl,ls-scfg-msi to yaml Convert device tree binding fsl,ls-scfg-msi to yaml format. Additional changes: - Include gic.h and use predefined macro in example. - Remove label in example. - Change node name to interrupt-controller in example. - Fix error in example. - ls1046a allow 4 irqs, other platform only 1 irq. - Add $ref: msi-controller.yaml - Add #msi-cells. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627144207.4003708-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit 304a90c4f75dadd0f80d0b27e61e8ed04b36ad95 Author: Frank Li Date: Wed Jun 26 15:37:53 2024 -0400 dt-bindings: soc: fsl: Convert q(b)man-* to yaml format Convert qman, bman, qman-portals, bman-portals to yaml format. Additional Change for fsl,q(b)man-portal: - Only keep one example. - Add fsl,qman-channel-id property. - Use interrupt type macro. - Remove top level qman-portals@ff4200000 at example. Additional change for fsl,q(b)man: - Fixed example error. - Remove redundent part, only keep fsl,qman node. - Change memory-regions to memory-region. - fsl,q(b)man-portals is not required property Additional change for fsl,qman-fqd.yaml: - Fixed example error. - Only keep one example. - Ref to reserve-memory.yaml - Merge fsl,bman reserver memory part Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240626193753.2088926-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit bfb921b2a9d5d1123d1d10b196a39db629ddef87 Author: Frank Li Date: Mon Jun 17 13:09:34 2024 -0400 dt-bindings: misc: fsl,qoriq-mc: convert to yaml format Convert fsl,qoriq-mc from txt to yaml format. Addition changes: - Child node name allow 'ethernet'. - Use 32bit address in example. - Fixed missed ';' in example. - Allow dma-coherent. - Remove smmu, its part in example. - Change child node name as 'ethernet' Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240617170934.813321-1-Frank.Li@nxp.com Signed-off-by: Rob Herring (Arm) commit 499f5e3c7cf77355f663ed602334a1b42223c78a Author: Krzysztof Kozlowski Date: Mon Jun 17 08:58:28 2024 +0200 dt-bindings: drop stale Anson Huang from maintainers Emails to Anson Huang bounce: Diagnostic-Code: smtp; 550 5.4.1 Recipient address rejected: Access denied. Add IMX platform maintainers for bindings which would become orphaned. Acked-by: Uwe Kleine-König Reviewed-by: Fabio Estevam Acked-by: Peng Fan Acked-by: Wolfram Sang # for I2C Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Acked-by: Jonathan Cameron # for IIO Acked-by: Andi Shyti Acked-by: Abel Vesa Link: https://lore.kernel.org/r/20240617065828.9531-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit 49636c5680b977d8a39263c6c8db6061c427346e Author: Dmitry Baryshkov Date: Mon May 27 14:34:24 2024 +0300 kbuild: verify dtoverlay files against schema Currently only the single part device trees are validated against DT schema. For the multipart DT files only the base DTB is validated. Extend the fdtoverlay commands to validate the resulting DTB file against schema. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240527-dtbo-check-schema-v1-1-ee1094f88f74@linaro.org Signed-off-by: Rob Herring (Arm) commit 2bcc89698602ec49a0bc8911e6d3322f66ea3405 Author: Stanislav Jakubek Date: Sun Jun 16 13:13:29 2024 +0200 dt-bindings: clock: drop obsolete stericsson,abx500.txt These bindings are already (better) described in mfd/stericsson,ab8500.yaml, drop these now obsolete bindings. Signed-off-by: Stanislav Jakubek Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/Zm7I2Zbq1JNPoEJp@standask-GA-A55M-S2HP Signed-off-by: Rob Herring (Arm) commit fe600c8e2dc5dde62aefc73cb1cdcc5bff3dfed7 Author: Bard Liao Date: Fri Jul 5 11:43:05 2024 +0000 soundwire: intel_auxdevice: add cs42l43 codec to wake_capable_list cs42l43 has wake capability. Add it to the wake_capable_list. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20240705114305.160233-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 478a01016c08d33635359254fc1ab61a8c83dd1a Author: Patryk Wlazlyn Date: Tue Jul 9 14:53:14 2024 +0200 tools/power turbostat: Fix typo in turbostat.8 "After" was missing an "r", nothing to see here. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 9f50066b0dd47cff045ba6da37e6def52783ba55 Author: Patryk Wlazlyn Date: Tue Jul 9 14:46:20 2024 +0200 tools/power turbostat: Add perf added counter example to turbostat.8 We had few lines about the feature, but without any complete examples. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 25826c20da55a114c2cba8c4f237dfe7a7b4f8f6 Author: Patryk Wlazlyn Date: Tue Jul 9 14:22:30 2024 +0200 tools/power turbostat: Fix formatting in turbostat.8 We had an extra "+" at the beginning of some lines that look like a poorly formated patch. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 782b726201471326575f386128fa03db90c83ad8 Merge: dc3c836f9b0f1 9b003e14801cf Author: Arnd Bergmann Date: Tue Jul 9 15:36:08 2024 +0200 Merge tag 'zynqmp-soc2-for-6.11' of https://github.com/Xilinx/linux-xlnx into soc/drivers arm64: Xilinx SoC changes for 6.11 Timer - Fix u32 overflow issue in 32-bit width PWM mode. Event manager: - rename cpu_number1 to dummy_cpu_number Power: - Add cb event for subsystem restart - check return status of get_api_version() Firmware: - Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h * tag 'zynqmp-soc2-for-6.11' of https://github.com/Xilinx/linux-xlnx: drivers: soc: xilinx: check return status of get_api_version() firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h soc: xilinx: Add cb event for subsystem restart soc: xilinx: rename cpu_number1 to dummy_cpu_number pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode. Link: https://lore.kernel.org/r/CAHTX3dKMtqgNpkEvrw0p2w+SPN83Ai1_kzhefUGOO5rMkPaH_w@mail.gmail.com Signed-off-by: Arnd Bergmann commit ed75ace541049fa1a758715578165366cc3dc72a Author: Krzysztof Kozlowski Date: Wed Jun 12 10:40:37 2024 +0200 ti: omap: MAINTAINERS: move Benoît Cousson to CREDITS Last email from Benoît Cousson was in 2014 [1], so remove him from maintainers of the TI OMAP platform. Stale maintainer entries hide information whether subsystem needs help, has a bus-factor or is even orphaned. Benoît Cousson, thank you for TI OMAP contributions and maintenance. [1] https://lore.kernel.org/all/?q=f%3Abcousson%40baylibre.com Acked-by: Benoît Cousson Cc: Benoît Cousson Cc: Tony Lindgren Cc: Paul Walmsley Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612084038.18519-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit ff12af710b3088d06d933a839e59ab57d7c122e5 Author: Krzysztof Kozlowski Date: Wed Jun 12 10:40:38 2024 +0200 amazon: MAINTAINERS: change to odd fixes and Tsahee Zidenberg to CREDITS Last email from Tsahee Zidenberg was in 2016 [1], so move Tsahee from Amazon platform maintainers to credits (thank you for your contributions and maintenance!). Stale maintainer entries hide information whether subsystem needs help, has a bus-factor or is even orphaned. The Amazon platform still has active maintainer - Antoine Tenart - however there was no maintenance activities coming from Antoine. All my patches from last 4 years related to Amazon remained unanswered - no acks, no picks - so document the actual not active status of the platform by changing it to Odd Fixes. [1] https://lore.kernel.org/all/?q=f%3Atsahee%40annapurnalabs.com Cc: Tsahee Zidenberg Cc: Antoine Tenart Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612084038.18519-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 480d9a6083f45b782d7ee635743a49e9f8ed84ff Author: Drew Fustini Date: Thu Jul 4 11:09:17 2024 -0700 MAINTAINERS: thead: add git tree Add git tree for T-Head device tree files and, in the future, drivers for the T-Head TH1520 SoC. Signed-off-by: Drew Fustini Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240704180913.2516959-1-drew@pdp7.com Signed-off-by: Arnd Bergmann commit 1ba6c6f466151e7feb6b5c0315651f69b7f623ae Merge: 38b2482a27c8d e2106e6ad20e4 Author: Arnd Bergmann Date: Tue Jul 9 15:21:35 2024 +0200 Merge tag 'imx-soc-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/arm i.MX SoC change for 6.11: - Remove redundant EDAC_SUPPORT selection from ARCH_LAYERSCAPE * tag 'imx-soc-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: layerscape: remove redundant EDAC_SUPPORT selection Link: https://lore.kernel.org/r/20240702142153.413061-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit 38b2482a27c8da8c9c3f2079b5bf7ef719b1b7e8 Author: Linus Walleij Date: Fri Jun 28 11:08:50 2024 -0700 ARM: spitz: Use software nodes for the ADS7846 touchscreen Convert the Spitz to use software nodes to describe GPIOs for the ADS7846 touchscreen. As part of the conversion switch from the custom wait_for_sync() callback to defining hsync GPIO that can be used by the ads7846 driver to detect hsync. Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-11-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 29c4e69f8e12b6fd26d3ac589b3706635928a44d Author: Dmitry Torokhov Date: Fri Jun 28 11:08:49 2024 -0700 ARM: spitz: Use software nodes to describe LED GPIOs Convert Spitz to use software nodes for specifying GPIOs for the LEDs. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-10-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 444b89875fc0937ece181fa865c75c9d22649986 Author: Dmitry Torokhov Date: Fri Jun 28 11:08:48 2024 -0700 ARM: spitz: Use software nodes to describe MMC GPIOs Convert Spitz to use software nodes for specifying GPIOs for the MMC. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-9-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 1447c7df3820e7f729c4210020a18caccd8cb9cf Author: Dmitry Torokhov Date: Fri Jun 28 11:08:47 2024 -0700 ARM: spitz: Use software nodes to describe LCD GPIOs Convert Spitz to use software nodes for specifying GPIOs for the LCD. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-8-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 9d91c7c39e3cb32e1d4ab7d1f0cfcc20feb90809 Author: Dmitry Torokhov Date: Fri Jun 28 11:08:46 2024 -0700 ARM: spitz: Use software nodes to describe audio GPIOs Convert Spitz to use software nodes for specifying GPIOs for the audio chip. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-7-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 224b9329fb9f567c53a0cbeec837c11bc7d71643 Author: Linus Walleij Date: Fri Jun 28 11:08:45 2024 -0700 ARM: spitz: Use software nodes to describe SPI CS lines Convert the Spitz to use software nodes for specifying SPI CS. Because the SPI core can figure out the number of chipselects from the number of GPIO handles specified in properties, setting "num-cs" property is no longer needed. Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-6-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 6eabaf9d6e2a9ec8e995ab404c7d46eb297b4430 Author: Dmitry Torokhov Date: Fri Jun 28 11:08:44 2024 -0700 ARM: spitz: Simplify instantiating SPI controller platform_device_register_full() to instantiate SPI controller in one go instead of allocating it, creating a software node, and registering the platform device as separate steps. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-5-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit f1d6588af93b7115ed31d531dd8572556a43081f Author: Dmitry Torokhov Date: Fri Jun 28 11:08:43 2024 -0700 ARM: pxa/gumstix: convert vbus gpio to use software nodes Switch vbus gpios from using a custom GPIO lookup table to software properties using PROPERTY_ENTRY_GPIO() constructs which closely mimic device tree gpio properties. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-4-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 917195d6f8293c35fcf9ed4bfe18f52cc1c9d2e6 Author: Dmitry Torokhov Date: Fri Jun 28 11:08:42 2024 -0700 ARM: pxa: consolidate GPIO chip platform data The platform data for the GPIO controllers for the boards using non-DT setup is the same between PXA25x (gumstix) and PXA27x (Spitz) devices. Move it into devices.c to consolidate code. It will help with conversion to software nodes/properties. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240628180852.1738922-3-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 78ab3d352f2982bf3f7e506bfbaba7afee1ed8a9 Author: Dmitry Torokhov Date: Fri Jun 28 11:08:41 2024 -0700 ARM: spitz: fix GPIO assignment for backlight GPIOs controlling backlight on Spitz and Akita are coming from GPIO expanders, not the pxa27xx-gpio block, correct it. Additionally GPIO lookup tables operate with pin numbers rather than legacy GPIO numbers, fix that as well. Use raw numbers instead of legacy GPIO names to avoid confusion. Fixes: ee0c8e494cc3 ("backlight: corgi: Convert to use GPIO descriptors") Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20240628180852.1738922-2-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann commit 696a2af22824e56f94a37d104dbb834e24c87da8 Merge: c03088be18b4c 237c5c9581b4f Author: Arnd Bergmann Date: Tue Jul 9 15:20:19 2024 +0200 Merge tag 'tegra-for-6.11-arm-core' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/arm ARM: tegra: Core changes for v6.11-rc1 Uses software nodes to describe rfkill instead of using a GPIO lookup table. * tag 'tegra-for-6.11-arm-core' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: paz00: Use software nodes to describe GPIOs for WiFi rfkill Link: https://lore.kernel.org/r/20240628210818.3627404-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 361b8fc73cf63dc0c3be3778720631f1a33ba9db Author: Patryk Wlazlyn Date: Tue May 28 15:46:10 2024 +0200 tools/power turbostat: Extend --add option with perf counters User can now read perf counters using "--add perf//". Other details work similarly to how --add works with MSRs. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 67bab430f4e71332aced7562a67d73444f5b4b77 Author: Patryk Wlazlyn Date: Fri May 24 14:31:52 2024 +0200 tools/power turbostat: Group SMI counter with APERF and MPERF These three counters now are treated similar to other perf counters groups. This simplifies and gets rid of a lot of special cases for APERF and MPERF. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit dc3c836f9b0f1e615e5143a2afd542fc1162cd86 Author: Marek Behún Date: Mon Jul 8 13:40:02 2024 +0200 platform: cznic: turris-omnia-mcu: Depend on WATCHDOG Add depend on WATCHDOG, otherwise modpost fails with ERROR: modpost: "watchdog_init_timeout" [drivers/platform/cznic/turris-omnia-mcu.ko] undefined! ERROR: modpost: "devm_watchdog_register_device" [drivers/platform/cznic/turris-omnia-mcu.ko] undefined! Fixes: ab89fb5fb92c ("platform: cznic: turris-omnia-mcu: Add support for MCU watchdog") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407040711.g19y3cWq-lkp@intel.com/ Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240708114002.4285-3-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 5423a01df8c5cdce58138fae4eef64b4ca5ff9e5 Author: Marek Behún Date: Mon Jul 8 13:40:01 2024 +0200 platform: cznic: turris-omnia-mcu: Depend on OF Add depend on OF, otherwise the compilation fails with error: no member named 'of_gpio_n_cells' in 'struct gpio_chip' error: no member named 'of_xlate' in 'struct gpio_chip' Fixes: dfa556e45ae9 ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407031646.trNSwajF-lkp@intel.com/ Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240708114002.4285-2-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 870a1dbcbc2ebd2114d5f18bb0bd88a7ff07540f Author: Oleksij Rempel Date: Sat Jul 6 17:42:01 2024 +0200 net: phy: microchip: lan937x: add support for 100BaseTX PHY Add support of 100BaseTX PHY build in to LAN9371 and LAN9372 switches. Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli Reviewed-by: Michal Kubiak Acked-by: Arun Ramadoss Link: https://patch.msgid.link/20240706154201.1456098-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 8e0751af1b1162342904dcb0410e8a8ef9cbf70b Author: Dragos Tatulea Date: Wed Jun 26 13:27:00 2024 +0300 vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready() VQ indices in the range [cur_num_qps, max_vqs) represent queues that have not yet been activated. .set_vq_ready should not activate these VQs. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-24-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 2638134f710364c9e696a155bf16c6847959b1d9 Author: Dragos Tatulea Date: Wed Jun 26 13:26:59 2024 +0300 vdpa/mlx5: Don't reset VQs more than necessary The vdpa device can be reset many times in sequence without any significant state changes in between. Previously this was not a problem: VQs were torn down only on first reset. But after VQ pre-creation was introduced, each reset will delete and re-create the hardware VQs and their associated resources. To solve this problem, avoid resetting hardware VQs if the VQs are still in a blank state. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-23-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 0fe963d6fc162cd8c9b6c82205ea62e69088c063 Author: Dragos Tatulea Date: Wed Jun 26 13:26:58 2024 +0300 vdpa/mlx5: Re-create HW VQs under certain conditions There are a few conditions under which the hardware VQs need a full teardown and setup: - VQ size changed to something else than default value. Hardware VQ size modification is not supported. - User turns off certain device features: mergeable buffers, checksum virtio 1.0 compliance. In these cases, the TIR and RQT need to be re-created. Add a needs_teardown configuration variable and set it when detecting the above scenarios. On next DRIVER_OK, the resources will be torn down first. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-22-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit ffb1aae43ed5078598318042bac1ae1057e57e2d Author: Dragos Tatulea Date: Wed Jun 26 13:26:57 2024 +0300 vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time Currently, hardware VQs are created right when the vdpa device gets into DRIVER_OK state. That is easier because most of the VQ state is known by then. This patch switches to creating all VQs and their associated resources at device creation time. The motivation is to reduce the vdpa device live migration downtime by moving the expensive operation of creating all the hardware VQs and their associated resources out of downtime on the destination VM. The VQs are now created in a blank state. The VQ configuration will happen later, on DRIVER_OK. Then the configuration will be applied when the VQs are moved to the Ready state. When .set_vq_ready() is called on a VQ before DRIVER_OK, special care is needed: now that the VQ is already created a resume_vq() will be triggered too early when no mr has been configured yet. Skip calling resume_vq() in this case, let it be handled during DRIVER_OK. For virtio-vdpa, the device configuration is done earlier during .vdpa_dev_add() by vdpa_register_device(). Avoid calling setup_vq_resources() a second time in that case. On a 64 CPU, 256 GB VM with 1 vDPA device of 16 VQps, the full VQ resource creation + resume time was ~370ms. Now it's down to 60 ms (only VQ config and resume). The measurements were done on a ConnectX6DX based vDPA device. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-21-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 3b3adb3bbfce275400b21f7a0d54db0ba0a46cc9 Author: Dragos Tatulea Date: Wed Jun 26 13:26:56 2024 +0300 vdpa/mlx5: Use suspend/resume during VQP change Resume a VQ if it is already created when the number of VQ pairs increases. This is done in preparation for VQ pre-creation which is coming in a later patch. It is necessary because calling setup_vq() on an already created VQ will return early and will not enable the queue. For symmetry, suspend a VQ instead of tearing it down when the number of VQ pairs decreases. But only if the resume operation is supported. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-20-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit ac85cd904dc9a5e83643ec9da0c43b0a95193158 Author: Dragos Tatulea Date: Wed Jun 26 13:26:55 2024 +0300 vdpa/mlx5: Forward error in suspend/resume device Start using the suspend/resume_vq() error return codes previously added. Reviewed-by: Cosmin Ratiu Reviewed-by: Zhu Yanjun Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-19-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Eugenio Pérez Reviewed-by: Eugenio Pérez commit 843250271bdb16f3b38ed1d6f727a9e9e8632893 Author: Dragos Tatulea Date: Wed Jun 26 13:26:54 2024 +0300 vdpa/mlx5: Consolidate all VQ modify to Ready to use resume_vq() There are a few more places modifying the VQ to Ready directly. Let's consolidate them into resume_vq(). The redundant warnings for resume_vq() errors can also be dropped. There is one special case that needs to be handled for virtio-vdpa: the initialized flag must be set to true earlier in setup_vq() so that resume_vq() doesn't return early. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-18-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit b89bb349f276d7d6688527312eef03d12493b9d4 Author: Dragos Tatulea Date: Wed Jun 26 13:26:53 2024 +0300 vdpa/mlx5: Add error code for suspend/resume VQ Instead of blindly calling suspend/resume_vqs(), make then return error codes. To keep compatibility, keep suspending or resuming VQs on error and return the last error code. The assumption here is that the error code would be the same. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-17-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit fc9af25d04d635ea4590681d044284f97766da48 Author: Dragos Tatulea Date: Wed Jun 26 13:26:52 2024 +0300 vdpa/mlx5: Accept Init -> Ready VQ transition in resume_vq() Until now resume_vq() was used only for the suspend/resume scenario. This change also allows calling resume_vq() to bring it from Init to Ready state (VQ initialization). Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-16-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez Acked-by: Eugenio Pérez commit e60e9eeb3659776d3e450a5a86ca8b6f6594bced Author: Dragos Tatulea Date: Wed Jun 26 13:26:51 2024 +0300 vdpa/mlx5: Allow creation of blank VQs Based on the filled flag, create VQs that are filled or blank. Blank VQs will be filled in later through VQ modify. Downstream patches will make use of this to pre-create blank VQs at vdpa device creation. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-15-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez Acked-by: Eugenio Pérez commit ebebaf45e8a5da3c23459e91fbc441ee98bef8fd Author: Dragos Tatulea Date: Wed Jun 26 13:26:50 2024 +0300 vdpa/mlx5: Set mkey modified flags on all VQs Otherwise, when virtqueues are moved from INIT to READY the latest mkey will not be set appropriately. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-14-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 1e8dac7bb6ca9cdd7263d1526fa974353cf4ef05 Author: Dragos Tatulea Date: Wed Jun 26 13:26:49 2024 +0300 vdpa/mlx5: Start off rqt_size with max VQPs Currently rqt_size is initialized during device flag configuration. That's because it is the earliest moment when device knows if MQ (multi queue) is on or off. Shift this configuration earlier to device creation time. This implies that non-MQ devices will have a larger RQT size. But the configuration will still be correct. This is done in preparation for the pre-creation of hardware virtqueues at device add time. When that change will be added, RQT will be created at device creation time so it needs to be initialized to its max size. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-13-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit ad9758fdafeeee52b4b31cad20acfaa8adca8b6a Author: Dragos Tatulea Date: Wed Jun 26 13:26:48 2024 +0300 vdpa/mlx5: Set an initial size on the VQ The virtqueue size is a pre-requisite for setting up any virtqueue resources. For the upcoming optimization of creating virtqueues at device add, the virtqueue size has to be configured. The queue size check in setup_vq() will always be false. So remove it. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-12-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit cdc3c7eaae695738b37f374866950602ec5af9c2 Author: Dragos Tatulea Date: Wed Jun 26 13:26:47 2024 +0300 vdpa/mlx5: Add support for modifying the VQ features field This is done in preparation for the pre-creation of hardware virtqueues at device add time. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-11-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit f70080c5bc39716f434e7c0888662aa077eb4405 Author: Dragos Tatulea Date: Wed Jun 26 13:26:46 2024 +0300 vdpa/mlx5: Add support for modifying the virtio_version VQ field This is done in preparation for the pre-creation of hardware virtqueues at device add time. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-10-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 4a19f2942a0fe5e4aba7925eda4dc845bd276d25 Author: Dragos Tatulea Date: Wed Jun 26 13:26:45 2024 +0300 vdpa/mlx5: Rename init_mvqs Function is used to set default values, so name it accordingly. Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-9-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Eugenio Pérez commit e5bcbd1de67611201873806d4d11ddfd172d0d12 Author: Dragos Tatulea Date: Wed Jun 26 13:26:44 2024 +0300 vdpa/mlx5: Clear and reinitialize software VQ data on reset The hardware VQ configuration is mirrored by data in struct mlx5_vdpa_virtqueue . Instead of clearing just a few fields at reset, fully clear the struct and initialize with the appropriate default values. As clear_vqs_ready() is used only during reset, get rid of it. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-8-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 1835ed4a5d49d2280731cfcc43a55473d77ea666 Author: Dragos Tatulea Date: Wed Jun 26 13:26:43 2024 +0300 vdpa/mlx5: Initialize and reset device with one queue pair The virtio spec says that a vdpa device should start off with one queue pair. The driver is already compliant. This patch moves the initialization to device add and reset times. This is done in preparation for the pre-creation of hardware virtqueues at device add time. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Message-Id: <20240626-stage-vdpa-vq-precreate-v2-7-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez commit a366465b4828b55e12f3a4cc0738bd5755d7077d Author: Dragos Tatulea Date: Wed Jun 26 13:26:42 2024 +0300 vdpa/mlx5: Remove duplicate suspend code Use the dedicated suspend_vqs() function instead. Reviewed-by: Cosmin Ratiu Reviewed-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-6-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 34bd86c7202222ee588a33aee993fa29cd181e83 Author: Dragos Tatulea Date: Wed Jun 26 13:26:41 2024 +0300 vdpa/mlx5: Iterate over active VQs during suspend/resume No need to iterate over max number of VQs. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-5-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit ad80739262b5aed3621accbd6015d55a6e662294 Author: Dragos Tatulea Date: Wed Jun 26 13:26:40 2024 +0300 vdpa/mlx5: Drop redundant check in teardown_virtqueues() The check is done inside teardown_vq(). Reviewed-by: Cosmin Ratiu Reviewed-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-4-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 4c90a60ac2e09bcf615f7276d2fd1b2ba96bdce0 Author: Dragos Tatulea Date: Wed Jun 26 13:26:39 2024 +0300 vdpa/mlx5: Drop redundant code Originally, the second loop initialized the CVQ. But (acde3929492b ("vdpa/mlx5: Use consistent RQT size") initialized all the queues in the first loop, so the second iteration in init_mvqs() is never called because the first one will iterate up to max_vqs. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-3-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 63f0cbad9781ae69b421f33114f26079c903a024 Author: Dragos Tatulea Date: Wed Jun 26 13:26:38 2024 +0300 vdpa/mlx5: Make setup/teardown_vq_resources() symmetrical ... by changing the setup_vq_resources() parameter type. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-2-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 1f5d6476f12152bfdfcc362b3413f58ab8be397c Author: Dragos Tatulea Date: Wed Jun 26 13:26:37 2024 +0300 vdpa/mlx5: Clarify meaning thorough function rename setup_driver()/teardown_driver() are a bit vague. These functions are used for virtqueue resources. Same for alloc_resources()/teardown_resources(): they represent fixed resources that are meant to exist during the device lifetime. Reviewed-by: Cosmin Ratiu Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20240626-stage-vdpa-vq-precreate-v2-1-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 106e4df1206b2c239ba13a9ec2fd1e9b754bd455 Author: Peter-Jan Gootzen Date: Fri May 17 21:04:35 2024 +0200 virtio-fs: improved request latencies when Virtio queue is full Currently, when the Virtio queue is full, a work item is scheduled to execute in 1ms that retries adding the request to the queue. This is a large amount of time on the scale on which a virtio-fs device can operate. When using a DPU this is around 30-40us baseline without going to a remote server (4k, QD=1). This patch changes the retrying behavior to immediately filling the Virtio queue up again when a completion has been received. This reduces the 99.9th percentile latencies in our tests by 60x and slightly increases the overall throughput, when using a workload IO depth 2x the size of the Virtio queue and a DPU-powered virtio-fs device (NVIDIA BlueField DPU). Signed-off-by: Peter-Jan Gootzen Reviewed-by: Max Gurtovoy Reviewed-by: Yoray Zack Message-Id: <20240517190435.152096-3-pgootzen@nvidia.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi commit 2106e1f444d9d79f5c3784e5847bfdb6cc3ca69f Author: Peter-Jan Gootzen Date: Fri May 17 21:04:34 2024 +0200 virtio-fs: let -ENOMEM bubble up or burst gently Currently, when the enqueueing of a request or forget operation fails with -ENOMEM, the enqueueing is retried after a timeout. This patch removes this behavior and treats -ENOMEM in these scenarios like any other error. By bubbling up the error to user space in the case of a request, and by dropping the operation in case of a forget. This behavior matches that of the FUSE layer above, and also simplifies the error handling. The latter will come in handy for upcoming patches that optimize the retrying of operations in case of -ENOSPC. Signed-off-by: Peter-Jan Gootzen Reviewed-by: Max Gurtovoy Reviewed-by: Yoray Zack Message-Id: <20240517190435.152096-2-pgootzen@nvidia.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi commit e7909ad6cbab24b9fa0f4b81645d0590ce4ec413 Author: Jeff Johnson Date: Tue Jun 11 12:22:08 2024 -0700 vDPA: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vdpa/vdpa.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vdpa/ifcvf/ifcvf.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Message-Id: <20240611-md-drivers-vdpa-v1-1-efaf2de15152@quicinc.com> Signed-off-by: Michael S. Tsirkin commit ab0727f3ddb808d63f862a6fcd658ee65884a22d Author: Jeff Johnson Date: Tue Jul 2 13:10:18 2024 -0700 virtio: add missing MODULE_DESCRIPTION() macros With ARCH=sh, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/virtio/virtio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/virtio/virtio_ring.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Message-Id: <20240702-md-sh-drivers-virtio-v1-1-cf7325ab6ccc@quicinc.com> Signed-off-by: Michael S. Tsirkin commit e400ddf0fb76f451bcf0c7de8a1dbdb1fa0359d5 Author: Jeff Johnson Date: Thu May 16 18:57:32 2024 -0700 vringh: add MODULE_DESCRIPTION() Fix the allmodconfig 'make w=1' issue: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vhost/vringh.o Signed-off-by: Jeff Johnson Message-Id: <20240516-md-vringh-v1-1-31bf37779a5a@quicinc.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 9be237df09ce0c58b09fa979452bfe3f217e41ce Author: Zhu Lingshan Date: Wed May 15 00:51:25 2024 +0800 MAINTAINERS: Change lingshan's email to kernel.org This commit changes lingshan's email from intel.com to kernel.org. Signed-off-by: Zhu Lingshan Message-Id: <20240514165125.74802-1-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 7ad4723976672b7d359403a555e0ce5c75529153 Author: Michael S. Tsirkin Date: Tue Apr 30 09:27:48 2024 +1000 vhost: move smp_rmb() into vhost_get_avail_idx() All callers of vhost_get_avail_idx() use smp_rmb() to order the available ring entry read and avail_idx read. Make vhost_get_avail_idx() call smp_rmb() itself whenever the avail_idx is accessed. This way, the callers don't need to worry about the memory barrier. As a side benefit, we also validate the index on all paths now, which will hopefully help prevent/catch earlier future bugs. Note that current code is inconsistent in how the errors are handled. They are treated as an empty ring in some places, but as non-empty ring in other places. This patch doesn't attempt to change the existing behaviour. No functional change intended. Signed-off-by: Michael S. Tsirkin Reviewed-by: Gavin Shan Acked-by: Will Deacon Message-Id: <20240429232748.642356-1-gshan@redhat.com> commit fdba68d2adf8d9ae680e23e8b8ba79330baa45bc Author: zhenwei pi Date: Tue Apr 23 11:41:06 2024 +0800 virtio_balloon: separate vm events into a function All the VM events related statistics have dependence on 'CONFIG_VM_EVENT_COUNTERS', separate these events into a function to make code clean. Then we can remove 'CONFIG_VM_EVENT_COUNTERS' from 'update_balloon_stats'. Signed-off-by: zhenwei pi Message-Id: <20240423034109.1552866-2-pizhenwei@bytedance.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand commit 8b6c724cdab85d8923dd8c474a5a9464228379c5 Author: Srujana Challa Date: Fri Jun 14 20:16:59 2024 +0530 virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices This commit introduces a new vDPA driver specifically designed for managing the virtio control plane over the vDPA bus for OCTEON DPU devices. The driver consists of two layers: 1. Octep HW Layer (Octeon Endpoint): Responsible for handling hardware operations and configurations related to the DPU device. 2. Octep Main Layer: Compliant with the vDPA bus framework, this layer implements device operations for the vDPA bus. It handles device probing, bus attachment, vring operations, and other relevant tasks. Signed-off-by: Srujana Challa Signed-off-by: Vamsi Attunuru Signed-off-by: Shijith Thotton Signed-off-by: Nithin Dabilpuram Acked-by: Jason Wang Message-Id: <20240614144659.1776067-1-schalla@marvell.com> Signed-off-by: Michael S. Tsirkin commit 9d2877a51f203bf3a3e7c17217917e512e141099 Merge: 1ebab783647a9 226e58b209750 Author: Greg Kroah-Hartman Date: Tue Jul 9 14:40:31 2024 +0200 Merge tag 'icc-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.11 This pull request contains the interconnect changes for the 6.11-rc1 merge window. It contains just driver changes with the following highlights: Driver changes: - New driver for MediaTek MT8183/8195 platforms - New driver for MSM8953 platforms - New QoS support for RPMh-based platforms with SC7280 being the first one to benefit from it. - Fix incorrect master-id value in qcm2290 driver - Add missing MODULE_DESCRIPTION in a few drivers Signed-off-by: Georgi Djakov * tag 'icc-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: Fix DT backwards compatibility for QoS interconnect: qcom: Add MSM8953 driver dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID interconnect: qcom: sc7280: enable QoS configuration interconnect: qcom: icc-rpmh: Add QoS configuration support dt-bindings: interconnect: add clock property to enable QOS on SC7280 interconnect: mediatek: remove unneeded semicolon interconnect: qcom: add missing MODULE_DESCRIPTION() macros interconnect: imx: add missing MODULE_DESCRIPTION() macros interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings commit d2343023349441173cefcdeb517fc7d5273b4fab Author: Alexis Belmonte Date: Mon Jul 8 14:55:55 2024 +0200 platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops Fix a platform profile option switch/getter bug on some Omen and Victus laptops dismissing userspace choice when selecting performance mode in inadequate conditions (e.g. by being disconnected from the AC power plug) by - hooking an ACPI notify handler through the omen_register_powersource_event_handler method that listens to AC power source changes (plugging in/out the AC power plug) - keeping an intermediate active_platform_profile variable that is set when userspace changes the platform profile setting - restoring the selected platform profile kept in active_platform_profile when AC power is plugged back into the laptop through the power_supply_is_system_supplied call check, unless if the user decided to alter the platform profile mid-way Add a dependency to the POWER_SUPPLY subsystem to be able to check for power_supply_is_system_supplied. Introduce intermediary functions to leverage platform profile <-> internal thermal profile translation code from platform_profile_omen_set and callers. These changes makes the module compliant with the principles defined in the Platform Profile Selection page of the Kernel documentation on those kind of laptops; which is to not "(...) let userspace know about any sub-optimal conditions which are impeding reaching the requested performance level". Since the Omen and Victus laptops share the same embedded controller system, the fix is applicable to both categories of laptops. Signed-off-by: Alexis Belmonte Link: https://lore.kernel.org/r/Zovh22-7B1jI7sfF@alexis-pc [ij: Made active_platform_profile_lock static] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 0787ab206f802deb7edbae32ba021d6b1101472a Author: Thorsten Blum Date: Sat Jul 6 09:11:33 2024 +0200 udp: Remove duplicate included header file trace/events/udp.h Remove duplicate included header file trace/events/udp.h and the following warning reported by make includecheck: trace/events/udp.h is included more than once Compile-tested only. Signed-off-by: Thorsten Blum Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240706071132.274352-2-thorsten.blum@toblux.com Signed-off-by: Paolo Abeni commit 6c2a4c2f70e5b6c9c57d6d8adc893c55ba318613 Author: FUJITA Tomonori Date: Sat Jul 6 15:43:24 2024 +0900 net: tn40xx: add per queue netdev-genl stats support Add support for the netdev-genl per queue stats API. ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump qstats-get --json '{"scope":"queue"}' [{'ifindex': 4, 'queue-id': 0, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 266613, 'rx-packets': 3325}, {'ifindex': 4, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 142823367, 'tx-packets': 2387}] Signed-off-by: FUJITA Tomonori Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20240706064324.137574-1-fujita.tomonori@gmail.com Signed-off-by: Paolo Abeni commit fa0c1c9d283b37fdb7fc1dcccbb88fc8f48a4aa4 Author: Kan Liang Date: Mon Jul 8 12:33:35 2024 -0700 perf/x86/intel: Add a distinct name for Granite Rapids Currently, the Sapphire Rapids and Granite Rapids share the same PMU name, sapphire_rapids. Because from the kernel’s perspective, GNR is similar to SPR. The only key difference is that they support different extra MSRs. The code path and the PMU name are shared. However, from end users' perspective, they are quite different. Besides the extra MSRs, GNR has a newer PEBS format, supports Retire Latency, supports new CPUID enumeration architecture, doesn't required the load-latency AUX event, has additional TMA Level 1 Architectural Events, etc. The differences can be enumerated by CPUID or the PERF_CAPABILITIES MSR. They weren't reflected in the model-specific kernel setup. But it is worth to have a distinct PMU name for GNR. Fixes: a6742cb90b56 ("perf/x86/intel: Fix the FRONTEND encoding on GNR and MTL") Suggested-by: Ahmad Yasin Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20240708193336.1192217-3-kan.liang@linux.intel.com commit e5f32ad56b22ebe384a6e7ddad6e9520c5495563 Author: Kan Liang Date: Mon Jul 8 12:33:36 2024 -0700 perf/x86/intel/ds: Fix non 0 retire latency on Raptorlake A non-0 retire latency can be observed on a Raptorlake which doesn't support the retire latency feature. By design, the retire latency shares the PERF_SAMPLE_WEIGHT_STRUCT sample type with other types of latency. That could avoid adding too many different sample types to support all kinds of latency. For the machine which doesn't support some kind of latency, 0 should be returned. Perf doesn’t clear/init all the fields of a sample data for the sake of performance. It expects the later perf_{prepare,output}_sample() to update the uninitialized field. However, the current implementation doesn't touch the field of the retire latency if the feature is not supported. The memory garbage is dumped into the perf data. Clear the retire latency if the feature is not supported. Fixes: c87a31093c70 ("perf/x86: Support Retire Latency") Reported-by: "Bayduraev, Alexey V" Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: "Bayduraev, Alexey V" Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20240708193336.1192217-4-kan.liang@linux.intel.com commit 556a7c039a52c21da33eaae9269984a1ef59189b Author: Kan Liang Date: Mon Jul 8 12:33:34 2024 -0700 perf/x86/intel: Hide Topdown metrics events if the feature is not enumerated The below error is observed on Ice Lake VM. $ perf stat Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (slots). /bin/dmesg | grep -i perf may provide additional information. In a virtualization env, the Topdown metrics and the slots event haven't been supported yet. The guest CPUID doesn't enumerate them. However, the current kernel unconditionally exposes the slots event and the Topdown metrics events to sysfs, which misleads the perf tool and triggers the error. Hide the perf-metrics topdown events and the slots event if the perf-metrics feature is not enumerated. The big core of a hybrid platform can also supports the perf-metrics feature. Fix the hybrid platform as well. Closes: https://lore.kernel.org/lkml/CAM9d7cj8z+ryyzUHR+P1Dcpot2jjW+Qcc4CPQpfafTXN=LEU0Q@mail.gmail.com/ Reported-by: Dongli Zhang Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Dongli Zhang Link: https://lkml.kernel.org/r/20240708193336.1192217-2-kan.liang@linux.intel.com commit a5a6ff3d639d088d4af7e2935e1ee0d8b4e817d4 Author: Kan Liang Date: Mon Jul 8 11:55:24 2024 -0700 perf/x86/intel/uncore: Fix the bits of the CHA extended umask for SPR The perf stat errors out with UNC_CHA_TOR_INSERTS.IA_HIT_CXL_ACC_LOCAL event. $perf stat -e uncore_cha_55/event=0x35,umask=0x10c0008101/ -a -- ls event syntax error: '..0x35,umask=0x10c0008101/' \___ Bad event or PMU The definition of the CHA umask is config:8-15,32-55, which is 32bit. However, the umask of the event is bigger than 32bit. This is an error in the original uncore spec. Add a new umask_ext5 for the new CHA umask range. Fixes: 949b11381f81 ("perf/x86/intel/uncore: Add Sapphire Rapids server CHA support") Closes: https://lore.kernel.org/linux-perf-users/alpine.LRH.2.20.2401300733310.11354@Diego/ Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ian Rogers Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20240708185524.1185505-1-kan.liang@linux.intel.com commit 2b84def990d388bed4afe4f21ae383a01991046c Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:41 2024 +0200 perf: Split __perf_pending_irq() out of perf_pending_irq() perf_pending_irq() invokes perf_event_wakeup() and __perf_pending_irq(). The former is in charge of waking any tasks which waits to be woken up while the latter disables perf-events. The irq_work perf_pending_irq(), while this an irq_work, the callback is invoked in thread context on PREEMPT_RT. This is needed because all the waking functions (wake_up_all(), kill_fasync()) acquire sleep locks which must not be used with disabled interrupts. Disabling events, as done by __perf_pending_irq(), expects a hardirq context and disabled interrupts. This requirement is not fulfilled on PREEMPT_RT. Split functionality based on perf_event::pending_disable into irq_work named `pending_disable_irq' and invoke it in hardirq context on PREEMPT_RT. Rename the split out callback to perf_pending_disable(). Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marco Elver Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20240704170424.1466941-8-bigeasy@linutronix.de commit 16b9569df9d2ab07eeee075cb7895e9d3e08e8f0 Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:40 2024 +0200 perf: Don't disable preemption in perf_pending_task(). perf_pending_task() is invoked in task context and disables preemption because perf_swevent_get_recursion_context() used to access per-CPU variables. The other reason is to create a RCU read section while accessing the perf_event. The recursion counter is no longer a per-CPU accounter so disabling preemption is no longer required. The RCU section is needed and must be created explicit. Replace the preemption-disable section with a explicit RCU-read section. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marco Elver Link: https://lore.kernel.org/r/20240704170424.1466941-7-bigeasy@linutronix.de commit 0d40a6d83e3e6751f1107ba33587262d937c969f Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:39 2024 +0200 perf: Move swevent_htable::recursion into task_struct. The swevent_htable::recursion counter is used to avoid creating an swevent while an event is processed to avoid recursion. The counter is per-CPU and preemption must be disabled to have a stable counter. perf_pending_task() disables preemption to access the counter and then signal. This is problematic on PREEMPT_RT because sending a signal uses a spinlock_t which must not be acquired in atomic on PREEMPT_RT because it becomes a sleeping lock. The atomic context can be avoided by moving the counter into the task_struct. There is a 4 byte hole between futex_state (usually always on) and the following perf pointer (perf_event_ctxp). After the recursion lost some weight it fits perfectly. Move swevent_htable::recursion into task_struct. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marco Elver Link: https://lore.kernel.org/r/20240704170424.1466941-6-bigeasy@linutronix.de commit 5af42f928f3ac555c228740fb4a92d05b19fdd49 Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:38 2024 +0200 perf: Shrink the size of the recursion counter. There are four recursion counter, one for each context. The type of the counter is `int' but the counter is used as `bool' since it is only incremented if zero. The main goal here is to shrink the whole struct into 32bit int which can later be added task_struct into an existing hole. Reduce the type of the recursion counter to an unsigned char, keep the increment/ decrement operation. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marco Elver Link: https://lore.kernel.org/r/20240704170424.1466941-5-bigeasy@linutronix.de commit c5d93d23a26012a98b77f9e354ab9b3afd420059 Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:37 2024 +0200 perf: Enqueue SIGTRAP always via task_work. A signal is delivered by raising irq_work() which works from any context including NMI. irq_work() can be delayed if the architecture does not provide an interrupt vector. In order not to lose a signal, the signal is injected via task_work during event_sched_out(). Instead going via irq_work, the signal could be added directly via task_work. The signal is sent to current and can be enqueued on its return path to userland. Queue signal via task_work and consider possible NMI context. Remove perf_event::pending_sigtrap and and use perf_event::pending_work instead. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marco Elver Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20240704170424.1466941-4-bigeasy@linutronix.de commit 466e4d801cd438a1ab2c8a2cce1bef6b65c31bbb Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:36 2024 +0200 task_work: Add TWA_NMI_CURRENT as an additional notify mode. Adding task_work from NMI context requires the following: - The kasan_record_aux_stack() is not NMU safe and must be avoided. - Using TWA_RESUME is NMI safe. If the NMI occurs while the CPU is in userland then it will continue in userland and not invoke the `work' callback. Add TWA_NMI_CURRENT as an additional notify mode. In this mode skip kasan and use irq_work in hardirq-mode to for needed interrupt. Set TIF_NOTIFY_RESUME within the irq_work callback due to k[ac]san instrumentation in test_and_set_bit() which does not look NMI safe in case of a report. Suggested-by: Peter Zijlstra Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240704170424.1466941-3-bigeasy@linutronix.de commit 058244c683111d44a5de16ac74f19a1754dd7a0c Author: Sebastian Andrzej Siewior Date: Thu Jul 4 19:03:35 2024 +0200 perf: Move irq_work_queue() where the event is prepared. Only if perf_event::pending_sigtrap is zero, the irq_work accounted by increminging perf_event::nr_pending. The member perf_event::pending_addr might be overwritten by a subsequent event if the signal was not yet delivered and is expected. The irq_work will not be enqeueued again because it has a check to be only enqueued once. Move irq_work_queue() to where the counter is incremented and perf_event::pending_sigtrap is set to make it more obvious that the irq_work is scheduled once. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marco Elver Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20240704170424.1466941-2-bigeasy@linutronix.de commit 3a5465418f5fd970e86a86c7f4075be262682840 Author: Frederic Weisbecker Date: Fri Jun 21 11:16:01 2024 +0200 perf: Fix event leak upon exec and file release The perf pending task work is never waited upon the matching event release. In the case of a child event, released via free_event() directly, this can potentially result in a leaked event, such as in the following scenario that doesn't even require a weak IRQ work implementation to trigger: schedule() prepare_task_switch() =======> perf_event_overflow() event->pending_sigtrap = ... irq_work_queue(&event->pending_irq) <======= perf_event_task_sched_out() event_sched_out() event->pending_sigtrap = 0; atomic_long_inc_not_zero(&event->refcount) task_work_add(&event->pending_task) finish_lock_switch() =======> perf_pending_irq() //do nothing, rely on pending task work <======= begin_new_exec() perf_event_exit_task() perf_event_exit_event() // If is child event free_event() WARN(atomic_long_cmpxchg(&event->refcount, 1, 0) != 1) // event is leaked Similar scenarios can also happen with perf_event_remove_on_exec() or simply against concurrent perf_event_release(). Fix this with synchonizing against the possibly remaining pending task work while freeing the event, just like is done with remaining pending IRQ work. This means that the pending task callback neither need nor should hold a reference to the event, preventing it from ever beeing freed. Fixes: 517e6a301f34 ("perf: Fix perf_pending_task() UaF") Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240621091601.18227-5-frederic@kernel.org commit 2fd5ad3f310de22836cdacae919dd99d758a1f1b Author: Frederic Weisbecker Date: Fri Jun 21 11:16:00 2024 +0200 perf: Fix event leak upon exit When a task is scheduled out, pending sigtrap deliveries are deferred to the target task upon resume to userspace via task_work. However failures while adding an event's callback to the task_work engine are ignored. And since the last call for events exit happen after task work is eventually closed, there is a small window during which pending sigtrap can be queued though ignored, leaking the event refcount addition such as in the following scenario: TASK A ----- do_exit() exit_task_work(tsk); perf_event_overflow() event->pending_sigtrap = pending_id; irq_work_queue(&event->pending_irq); =========> PREEMPTION: TASK A -> TASK B event_sched_out() event->pending_sigtrap = 0; atomic_long_inc_not_zero(&event->refcount) // FAILS: task work has exited task_work_add(&event->pending_task) [...] perf_pending_irq() // early return: event->oncpu = -1 [...] =========> TASK B -> TASK A perf_event_exit_task(tsk) perf_event_exit_event() free_event() WARN(atomic_long_cmpxchg(&event->refcount, 1, 0) != 1) // leak event due to unexpected refcount == 2 As a result the event is never released while the task exits. Fix this with appropriate task_work_add()'s error handling. Fixes: 517e6a301f34 ("perf: Fix perf_pending_task() UaF") Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240621091601.18227-4-frederic@kernel.org commit f409530e4db9dd11b88cb7703c97c8f326ff6566 Author: Frederic Weisbecker Date: Fri Jun 21 11:15:59 2024 +0200 task_work: Introduce task_work_cancel() again Re-introduce task_work_cancel(), this time to cancel an actual callback and not *any* callback pointing to a given function. This is going to be needed for perf events event freeing. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240621091601.18227-3-frederic@kernel.org commit 68cbd415dd4b9c5b9df69f0f091879e56bf5907a Author: Frederic Weisbecker Date: Fri Jun 21 11:15:58 2024 +0200 task_work: s/task_work_cancel()/task_work_cancel_func()/ A proper task_work_cancel() API that actually cancels a callback and not *any* callback pointing to a given function is going to be needed for perf events event freeing. Do the appropriate rename to prepare for that. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240621091601.18227-2-frederic@kernel.org commit e81859fe64ad42dccefe134d1696e0635f78d763 Author: John Stultz Date: Mon Jul 8 23:08:27 2024 -0700 locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers Apparently despite it being marked inline, the compiler may not inline __down_write_common() which makes it difficult to identify the cause of lock contention, as the wchan of the blocked function will always be listed as __down_write_common(). So add __always_inline annotation to the common function (as well as the inlined helper callers) to force it to be inlined so a more useful blocking function will be listed (via wchan). This mirrors commit 92cc5d00a431 ("locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers") which did the same for __down_read_common. I sort of worry that I'm playing wack-a-mole here, and talking with compiler people, they tell me inline means nothing, which makes me want to cry a little. So I'm wondering if we need to replace all the inlines with __always_inline, or remove them because either we mean something by it, or not. Fixes: c995e638ccbb ("locking/rwsem: Fold __down_{read,write}*()") Reported-by: Tim Murray Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Link: https://lkml.kernel.org/r/20240709060831.495366-1-jstultz@google.com commit 337049890b8cbbb4fb527c58976ea19f4dc747a0 Author: Manikandan Muralidharan Date: Tue Jul 9 14:53:53 2024 +0530 dt-bindings: gpio: convert Atmel GPIO to json-schema Convert the Atmel GPIO controller binding document to DT schema format using json-schema. The at91 pinctrl driver uses "atmel,at91rm9200-gpio" compatible string to find the number of active GPIO banks and identify the pinmux nodes. "atmel,at91sam9x5-gpio" and "microchip,sam9x60-gpio" have additional registers to handle drive-strength, slew-rate, pull-down to drive the pinmux configs. The new compatible string "microchip,sam9x7-gpio" is added. Signed-off-by: Manikandan Muralidharan Acked-by: Linus Walleij Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240709092354.191643-5-manikandan.m@microchip.com Signed-off-by: Bartosz Golaszewski commit 67ce905f5f725c0ff4675b1aea381df0d80a5f03 Merge: 3324a8196ab91 ddab91f4b2de5 Author: Ulf Hansson Date: Tue Jul 9 13:12:41 2024 +0200 mdomain: Merge branch fixes into next Merge the pmdomain fixes for v6.10-rc[n] into the next branch, to allow them to get tested together with the new changes that are targeted for v6.11. Signed-off-by: Ulf Hansson commit 3324a8196ab91051bd4528ca16dce1dbc7bfabb7 Author: Christophe JAILLET Date: Mon Jul 1 21:53:16 2024 +0200 pmdomain: amlogic: Constify struct meson_secure_pwrc_domain_desc 'struct meson_secure_pwrc_domain_desc' is not modified in this driver. 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 4909 4072 0 8981 2315 drivers/pmdomain/amlogic/meson-secure-pwrc.o After: ===== text data bss dec hex filename 8605 392 0 8997 2325 drivers/pmdomain/amlogic/meson-secure-pwrc.o Signed-off-by: Christophe JAILLET Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/871d6b708de8bb42e1fabd8a601dc9a9a217cf00.1719863475.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson commit 84a2ceefff99633d8f88c7c1f9bbd2c139b8f805 Author: Gao Xiang Date: Tue Jul 9 17:41:06 2024 +0800 erofs: tidy up stream decompressors Just use a generic helper to prepare buffers for all supported stream decompressors, eliminating similar logic. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240709094106.3018109-3-hsiangkao@linux.alibaba.com commit 5a7cce827ee9e2c56fcecf5cda0ad39d9568283d Author: Gao Xiang Date: Tue Jul 9 17:41:05 2024 +0800 erofs: refine z_erofs_{init,exit}_subsystem() Introduce z_erofs_{init,exit}_decompressor() to unexport z_erofs_{deflate,lzma,zstd}_{init,exit}(). Besides, call them in z_erofs_{init,exit}_subsystem() for simplicity. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240709094106.3018109-2-hsiangkao@linux.alibaba.com commit 392d20ccef22cb471856f41860737e6306bee0b9 Author: Gao Xiang Date: Tue Jul 9 17:41:04 2024 +0800 erofs: move each decompressor to its own source file Thus *_config() function declarations can be avoided. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240709094106.3018109-1-hsiangkao@linux.alibaba.com commit ec9a652e514903df887791b669b70e86ab4e3ec5 Author: Jagadeesh Kona Date: Mon Jun 24 10:18:09 2024 +0530 venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode on V6 The Venus driver requires vcodec GDSC to be ON in SW mode for clock operations and move it back to HW mode to gain power benefits. Earlier, as there is no interface to switch the GDSC mode from GenPD framework, the GDSC is moved to HW control mode as part of GDSC enable callback and venus driver is writing to its POWER_CONTROL register to keep the GDSC ON from SW whereever required. But the POWER_CONTROL register addresses are not constant and can vary across the variants. Also as per the HW recommendation, the GDSC mode switching needs to be controlled from respective GDSC register and this is a uniform approach across all the targets. Hence use dev_pm_genpd_set_hwmode() API which controls GDSC mode switching using its respective GDSC register. In venus V6 variants, the vcodec gdsc gets enabled in SW mode by default with new HW_CTRL_TRIGGER flag and there is no need to switch it to SW mode again after enable, hence add check to avoid switching gdsc to SW mode again after gdsc enable. Similarly add check to avoid switching GDSC to HW mode before disabling the GDSC, so GDSC gets enabled in SW mode in the next enable. Signed-off-by: Jagadeesh Kona Signed-off-by: Abel Vesa Tested-by: Bryan O'Donoghue Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20240624044809.17751-6-quic_jkona@quicinc.com Signed-off-by: Ulf Hansson commit 4c2aecac62a442327f1e770055ecc3d5f7894101 Author: Jagadeesh Kona Date: Mon Jun 24 10:18:08 2024 +0530 clk: qcom: videocc: Use HW_CTRL_TRIGGER for SM8250, SC7280 vcodec GDSC's For Venus V6 variant SoCs(sm8250, sc7280), the venus driver uses the newly introduced dev_pm_genpd_set_hwmode() API to switch the vcodec GDSC to HW/SW control modes at runtime. Hence use HW_CTRL_TRIGGER flag for vcodec GDSC's on sm8250, sc7280 to register the set_hwmode_dev & get_hwmode_dev callbacks for vcodec GDSC and allow the GDSC mode to be changed using dev_pm_genpd_set_hwmode() API. Signed-off-by: Jagadeesh Kona Signed-off-by: Abel Vesa Reviewed-by: Taniya Das Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240624044809.17751-5-quic_jkona@quicinc.com Signed-off-by: Ulf Hansson commit f7ccdaad612a093c4a7c1840245c77eaffce09ab Author: Jagadeesh Kona Date: Mon Jun 24 10:18:07 2024 +0530 clk: qcom: gdsc: Add set and get hwmode callbacks to switch GDSC mode Some GDSC client drivers require the GDSC mode to be switched dynamically to HW mode at runtime to gain the power benefits. Typically such client drivers require the GDSC to be brought up in SW mode initially to enable the required dependent clocks and configure the hardware to proper state. Once initial hardware set up is done, they switch the GDSC to HW mode to save power. At the end of usecase, they switch the GDSC back to SW mode and disable the GDSC. Introduce HW_CTRL_TRIGGER flag to register the set_hwmode_dev and get_hwmode_dev callbacks for GDSC's whose respective client drivers require the GDSC mode to be switched dynamically at runtime using dev_pm_genpd_set_hwmode() API. Signed-off-by: Jagadeesh Kona Signed-off-by: Abel Vesa Reviewed-by: Bryan O'Donoghue Reviewed-by: Taniya Das Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240624044809.17751-4-quic_jkona@quicinc.com Signed-off-by: Ulf Hansson commit 0155aaf95a2a09bad567e5f775bfa8559e79f395 Author: Abel Vesa Date: Mon Jun 24 10:18:06 2024 +0530 PM: domains: Add the domain HW-managed mode to the summary Now that genpd supports dynamically switching the control for an attached device between hardware- and software-mode, let's add this information to the genpd summary under managed by column in debugfs. Suggested-by: Taniya Das Signed-off-by: Abel Vesa Signed-off-by: Jagadeesh Kona Reviewed-by: Ulf Hansson Reviewed-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Dhruva Gole Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20240624044809.17751-3-quic_jkona@quicinc.com Signed-off-by: Ulf Hansson commit 95f6454da936e4e6418facddf66596442a842d74 Author: Ulf Hansson Date: Mon Jun 24 10:18:05 2024 +0530 PM: domains: Allow devices attached to genpd to be managed by HW Some power-domains may be capable of relying on the HW to control the power for a device that's hooked up to it. Typically, for these kinds of configurations the consumer driver should be able to change the behavior of power domain at runtime, control the power domain in SW mode for certain configurations and handover the control to HW mode for other usecases. To allow a consumer driver to change the behaviour of the PM domain for its device, let's provide a new function, dev_pm_genpd_set_hwmode(). Moreover, let's add a corresponding optional genpd callback, ->set_hwmode_dev(), which the genpd provider should implement if it can support switching between HW controlled mode and SW controlled mode. Similarly, add the dev_pm_genpd_get_hwmode() to allow consumers to read the current mode and its corresponding optional genpd callback, ->get_hwmode_dev(), which the genpd provider can also implement to synchronize the initial HW mode state in genpd_add_device() by reading back the mode from the hardware. Signed-off-by: Ulf Hansson Signed-off-by: Abel Vesa Signed-off-by: Jagadeesh Kona Reviewed-by: Dmitry Baryshkov Reviewed-by: Dhruva Gole Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20240624044809.17751-2-quic_jkona@quicinc.com commit 8fbed2d7fbb5e1141ec2fbd6d4e426d9bf572e7c Author: Xianwei Zhao Date: Thu Jun 27 19:47:52 2024 +0800 pmdomain: amlogic: Add support for A5 power domains controller Add support for the A5 power controller, whose registers are in the secure domain and should be accessed via SMC. Signed-off-by: Hongyu Chen Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240627-a5_secpower-v1-2-1f47dde1270c@amlogic.com Signed-off-by: Ulf Hansson commit 1a53b80e862030458cd4245abb27da235d2fe7a5 Merge: cc647e931a249 32625ac9e110d Author: Ulf Hansson Date: Tue Jul 9 12:50:03 2024 +0200 pmdomain: Merge branch dt into next Merge the immutable branch dt into next, to allow the DT bindings to be tested together with changes that are targeted for v6.11. Signed-off-by: Ulf Hansson commit 32625ac9e110da530db4f0faf918b1f5674e7ca3 Author: Xianwei Zhao Date: Thu Jun 27 19:47:51 2024 +0800 dt-bindings: power: add Amlogic A5 power domains Add devicetree binding document and related header file for Amlogic A5 secure power domains. Signed-off-by: Hongyu Chen Signed-off-by: Xianwei Zhao Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240627-a5_secpower-v1-1-1f47dde1270c@amlogic.com Signed-off-by: Ulf Hansson commit 0321e45737b8a1a7571edad9b4173fbb7b86c0ed Merge: 3588e6438a1c2 85099c7ce4f9e Author: Kalle Valo Date: Tue Jul 9 13:17:09 2024 +0300 Merge tag 'rtw-next-2024-07-05' of https://github.com/pkshih/rtw rtw-next patches for v6.11 Some cleanups of rtl8xxxu and rtlwifi, and some fixes of rtw88. The major change is to develop WoWLAN and preparation of RTL8852BE-VT listed below: rtw89: - preparation of RTL8852BE-VT * add RF calibration code * move shared code with RTL8852BE to common module - add WoWLAN for WiFi 6 chips - support 36-bit PCI DMA commit 3588e6438a1c2e353616959ce16bce06aef0e424 Author: Chen Ni Date: Thu Jul 4 17:06:22 2024 +0800 wifi: ipw2x00: Use kzalloc() instead of kmalloc()/memset() Replace kmalloc() + memset() to kzalloc() for better code readability and simplicity. Signed-off-by: Chen Ni Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240704090622.2260102-1-nichen@iscas.ac.cn commit c145eea2f75ff7949392aebecf7ef0a81c1f6c14 Author: Sascha Hauer Date: Wed Jul 3 09:24:09 2024 +0200 wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id() mwifiex_get_priv_by_id() returns the priv pointer corresponding to the bss_num and bss_type, but without checking if the priv is actually currently in use. Unused priv pointers do not have a wiphy attached to them which can lead to NULL pointer dereferences further down the callstack. Fix this by returning only used priv pointers which have priv->bss_mode set to something else than NL80211_IFTYPE_UNSPECIFIED. Said NULL pointer dereference happened when an Accesspoint was started with wpa_supplicant -i mlan0 with this config: network={ ssid="somessid" mode=2 frequency=2412 key_mgmt=WPA-PSK WPA-PSK-SHA256 proto=RSN group=CCMP pairwise=CCMP psk="12345678" } When waiting for the AP to be established, interrupting wpa_supplicant with and starting it again this happens: | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000140 | 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=0000000046d96000 | [0000000000000140] pgd=0000000000000000, p4d=0000000000000000 | Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP | Modules linked in: caam_jr caamhash_desc spidev caamalg_desc crypto_engine authenc libdes mwifiex_sdio +mwifiex crct10dif_ce cdc_acm onboard_usb_hub fsl_imx8_ddr_perf imx8m_ddrc rtc_ds1307 lm75 rtc_snvs +imx_sdma caam imx8mm_thermal spi_imx error imx_cpufreq_dt fuse ip_tables x_tables ipv6 | CPU: 0 PID: 8 Comm: kworker/0:1 Not tainted 6.9.0-00007-g937242013fce-dirty #18 | Hardware name: somemachine (DT) | Workqueue: events sdio_irq_work | pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : mwifiex_get_cfp+0xd8/0x15c [mwifiex] | lr : mwifiex_get_cfp+0x34/0x15c [mwifiex] | sp : ffff8000818b3a70 | x29: ffff8000818b3a70 x28: ffff000006bfd8a5 x27: 0000000000000004 | x26: 000000000000002c x25: 0000000000001511 x24: 0000000002e86bc9 | x23: ffff000006bfd996 x22: 0000000000000004 x21: ffff000007bec000 | x20: 000000000000002c x19: 0000000000000000 x18: 0000000000000000 | x17: 000000040044ffff x16: 00500072b5503510 x15: ccc283740681e517 | x14: 0201000101006d15 x13: 0000000002e8ff43 x12: 002c01000000ffb1 | x11: 0100000000000000 x10: 02e8ff43002c0100 x9 : 0000ffb100100157 | x8 : ffff000003d20000 x7 : 00000000000002f1 x6 : 00000000ffffe124 | x5 : 0000000000000001 x4 : 0000000000000003 x3 : 0000000000000000 | x2 : 0000000000000000 x1 : 0001000000011001 x0 : 0000000000000000 | Call trace: | mwifiex_get_cfp+0xd8/0x15c [mwifiex] | mwifiex_parse_single_response_buf+0x1d0/0x504 [mwifiex] | mwifiex_handle_event_ext_scan_report+0x19c/0x2f8 [mwifiex] | mwifiex_process_sta_event+0x298/0xf0c [mwifiex] | mwifiex_process_event+0x110/0x238 [mwifiex] | mwifiex_main_process+0x428/0xa44 [mwifiex] | mwifiex_sdio_interrupt+0x64/0x12c [mwifiex_sdio] | process_sdio_pending_irqs+0x64/0x1b8 | sdio_irq_work+0x4c/0x7c | process_one_work+0x148/0x2a0 | worker_thread+0x2fc/0x40c | kthread+0x110/0x114 | ret_from_fork+0x10/0x20 | Code: a94153f3 a8c37bfd d50323bf d65f03c0 (f940a000) | ---[ end trace 0000000000000000 ]--- Signed-off-by: Sascha Hauer Acked-by: Brian Norris Reviewed-by: Francesco Dolcini Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240703072409.556618-1-s.hauer@pengutronix.de commit 228159802bcebd95438b54b0bd7c97798582178b Author: Mark-PK Tsai Date: Tue Jul 2 20:05:39 2024 +0800 docs: iommu: Remove outdated Documentation/userspace-api/iommu.rst The Documentation/userspace-api/iommu.rst file has become outdated due to the removal of associated structures and APIs. Specifically, struct such as iommu_cache_invalidate_info and guest pasid related uapi were removed in commit 0c9f17877891 ("iommu: Remove guest pasid related interfaces and definitions"). And the corresponding uapi/linux/iommu.h file was removed in commit 00a9bc607043 ("iommu: Move iommu fault data to linux/iommu.h"). Signed-off-by: Mark-PK Tsai Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20240702120617.26882-1-mark-pk.tsai@mediatek.com [will: Remove stale reference to 'iommu' from index.rst] Signed-off-by: Will Deacon commit 70b46487b1558eb25ea6e533c905131b10596dc0 Author: Wolfram Sang Date: Tue Feb 13 23:02:25 2024 +0100 mfd: tmio: Move header to platform_data All the MFD components are gone from the header meanwhile. Only the MMC relevant data is left which makes it a platform_data for the MMC controller. Move the header to the now fitting directory. Signed-off-by: Wolfram Sang Acked-by: Ulf Hansson # For MMC Acked-by: John Paul Adrian Glaubitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240213220221.2380-14-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit 763135b819ad3e3e0301b66094d50923e64092a7 Author: Wolfram Sang Date: Tue Feb 13 23:02:24 2024 +0100 mfd: tmio: Sanitize comments Reformat the comments to utilize the maximum line length and use single line comments where appropriate. Remove superfluous comments, too. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240213220221.2380-13-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit d411ccbe103d665a31861987e2f1b36944ab63f2 Author: Wolfram Sang Date: Tue Feb 13 23:02:23 2024 +0100 mfd: tmio: Update include files Remove meanwhile unneeded includes, only add types.h for dma_addr_t. Also, remove an obsolete forward declaration while here. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240213220221.2380-12-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit 4377aef83d0db25efc928a633ee80698b8520c8e Author: Wolfram Sang Date: Tue Feb 13 23:02:22 2024 +0100 mmc: tmio/sdhi: Fix includes TMIO uses an of_* function, and SDHI uses pm_runtime functions. Add the includes directly, so we can clean up another header properly. Sort the pagemap include while we are here. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402070323.JpYfFtkQ-lkp@intel.com/ Signed-off-by: Wolfram Sang Acked-by: Ulf Hansson Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240213220221.2380-11-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit 6bec678b9872271ce2e0879c360ad7a1a524c7fa Author: Wolfram Sang Date: Tue Feb 13 23:02:21 2024 +0100 mfd: tmio: Remove obsolete io accessors Since commit 568494db6809 ("mtd: remove tmio_nand driver") and commit aceae7848624 ("fbdev: remove tmiofb driver"), these accessors have no users anymore. Remove them. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240213220221.2380-10-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit ef6dfcbcbbf7d9a414feb44aa093d2d8592a2e20 Author: Wolfram Sang Date: Tue Feb 13 23:02:20 2024 +0100 mfd: tmio: Remove obsolete platform_data With commit 8971bb812e3c ("mfd: remove toshiba tmio drivers"), all users of platform data for NAND and framebuffers are gone. So, remove definitions from the header, too. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240213220221.2380-9-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones commit 8b6742e5b31e213412d8a5a1b745ca03c6fd8409 Author: Matti Vaittinen Date: Mon Jul 1 10:56:49 2024 +0300 watchdog: bd96801_wdt: Add missing include for FIELD_*() The FIELD_PREP() and FIELD_GET() macros are defined in the linux/bitfield.h. Include this header to avoid missing the macro definitions. Signed-off-by: Matti Vaittinen Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406300817.hcJ9VtLf-lkp@intel.com/ Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/ZoJhQVF-U6sSJ_Sg@fedora Signed-off-by: Lee Jones commit d2601e34a1024cb2466e6bd13bd943e19fd54fa6 Author: Felix Fietkau Date: Tue Jul 9 10:38:38 2024 +0200 wifi: mac80211_hwsim: add support for multi-radio wiphy This registers one wiphy radio per supported band. Number of different channels is set per radio. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/3a16838bb7a7d1a072bd7c9d586d17f70fcd8a60.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit 27d4c03441eb951142c79fff0a25dd8ba3263875 Author: Felix Fietkau Date: Tue Jul 9 10:38:37 2024 +0200 wifi: mac80211: add wiphy radio assignment and validation Validate number of channels and interface combinations per radio. Assign each channel context to a radio. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/1d3e9ba70a30ce18aaff337f0a76d7aeb311bafb.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit 6265c67f2668047c97834c5c434f6abcf86e3406 Author: Felix Fietkau Date: Tue Jul 9 10:38:36 2024 +0200 wifi: mac80211: move code in ieee80211_link_reserve_chanctx to a helper Reduces indentation in preparation for further changes Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/cce95007092336254d51570f4a27e05a6f150a53.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit 0874bcd0e1c97db0bada32df0934d5cf2507bedd Author: Felix Fietkau Date: Tue Jul 9 10:38:35 2024 +0200 wifi: mac80211: extend ifcomb check functions for multi-radio Add support for counting global and per-radio max/current number of channels, as well as checking radio-specific interface combinations. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/e76307f8ce562a91a74faab274ae01f6a5ba0a2e.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit 2920bc8d916d30b5273ec16e6878f13b24e3851f Author: Felix Fietkau Date: Tue Jul 9 10:38:34 2024 +0200 wifi: mac80211: add radio index to ieee80211_chanctx_conf Will be used to explicitly assign a channel context to a wiphy radio. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/59f76f57d935f155099276be22badfa671d5bfd9.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit a01b1e9f9955679fa04adead06c100022e313e55 Author: Felix Fietkau Date: Tue Jul 9 10:38:33 2024 +0200 wifi: mac80211: add support for DFS with multiple radios DFS can be supported with multi-channel combinations, as long as each DFS capable radio only supports one channel. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/4d27a4adca99fa832af1f7cda4f2e71016bd9fda.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit 510dba80ed669d6123901ccf0476706122b008b1 Author: Felix Fietkau Date: Tue Jul 9 10:38:32 2024 +0200 wifi: cfg80211: add helper for checking if a chandef is valid on a radio Check if the full channel width is in the radio's frequency range. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/7c8ea146feb6f37cee62e5ba6be5370403695797.1720514221.git-series.nbd@nbd.name [add missing Return: documentation] Signed-off-by: Johannes Berg commit 417d88189ccf645a157a3dc3da7e894c1f2829d1 Author: Thorsten Blum Date: Thu Jul 4 22:25:59 2024 +0200 sctp: Fix typos and improve comments Fix typos s/steam/stream/ and spell out Schedule/Unschedule in the comments. Compile-tested only. Signed-off-by: Thorsten Blum Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240704202558.62704-2-thorsten.blum@toblux.com Signed-off-by: Paolo Abeni commit abb4cfe3661aa05426916b21164f88ca5a405a3a Author: Felix Fietkau Date: Tue Jul 9 10:38:31 2024 +0200 wifi: cfg80211: extend interface combination check for multi-radio Add a field in struct iface_combination_params to check per-radio interface combinations instead of per-wiphy ones. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/32b28da89c2d759b0324deeefe2be4cee91de18e.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit e6c06ca8f21d1cdb444c708e385d86a54bc5fc60 Author: Felix Fietkau Date: Tue Jul 9 10:38:30 2024 +0200 wifi: cfg80211: add support for advertising multiple radios belonging to a wiphy The prerequisite for MLO support in cfg80211/mac80211 is that all the links participating in MLO must be from the same wiphy/ieee80211_hw. To meet this expectation, some drivers may need to group multiple discrete hardware each acting as a link in MLO under single wiphy. With this change, supported frequencies and interface combinations of each individual radio are reported to user space. This allows user space to figure out the limitations of what combination of channels can be used concurrently. Even for non-MLO devices, this improves support for devices capable of running on multiple channels at the same time. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/18a88f9ce82b1c9f7c12f1672430eaf2bb0be295.1720514221.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit 19b815ed71aadee9a2d31b7a700ef61ae8048010 Author: Zong-Zhe Yang Date: Tue Jul 9 15:35:31 2024 +0800 wifi: mac80211: chanctx emulation set CHANGE_CHANNEL when in_reconfig Chanctx emulation didn't info IEEE80211_CONF_CHANGE_CHANNEL to drivers during ieee80211_restart_hw (ieee80211_emulate_add_chanctx). It caused non-chanctx drivers to not stand on the correct channel after recovery. RX then behaved abnormally. Finally, disconnection/reconnection occurred. So, set IEEE80211_CONF_CHANGE_CHANNEL when in_reconfig. Signed-off-by: Zong-Zhe Yang Link: https://patch.msgid.link/20240709073531.30565-1-kevin_yang@realtek.com Cc: stable@vger.kernel.org Fixes: 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx drivers") Signed-off-by: Johannes Berg commit 97c4264f62a73664a2934203346a3e04c109b8ec Author: Peter Griffin Date: Tue Jul 2 08:35:09 2024 +0200 soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers Not all registers in PMU_ALIVE block support atomic set/clear operations. GS101_SYSIP_DAT0 and GS101_SYSTEM_CONFIGURATION registers are two regs where attempting atomic access fails. As documentation on exactly which registers support atomic operations is not forthcoming. We default to atomic access, unless the register is explicitly added to the tensor_is_atomic() function. Update the comment to reflect this as well. Reviewed-by: Will McVicker Tested-by: Will McVicker Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20240628223506.1237523-4-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240702063514.6215-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 0b07feb910520b1391e2b7959156ee289a5909f2 Merge: 097d4193b16c3 815cc7715ab18 Author: Arnd Bergmann Date: Tue Jul 9 11:15:35 2024 +0200 Merge tag 'memory-controller-drv-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.11 Make the Freescale IFC driver selectable because it is used now by two drivers: Freescale NAND and generic NOR flash. The patches adjusting defconfig are waiting on the mailing lists to be picked up. * tag 'memory-controller-drv-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: dt-bindings: memory: fsl: replace maintainer memory: fsl_ifc: Make FSL_IFC config visible and selectable Link: https://lore.kernel.org/r/20240702070212.8291-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 097d4193b16c35d081e7bcecd15598943d56d187 Merge: 2bb1acc608cb7 3a6fb9025cdf9 Author: Arnd Bergmann Date: Tue Jul 9 11:13:50 2024 +0200 Merge tag 'sunxi-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/drivers Allwinner SoC driver changes for 6.11 - DT binding addition of regulator node under SRAM node - Cleanup of unused list in SRAM driver * tag 'sunxi-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: dt-bindings: sram: sunxi-sram: Add regulators child soc: sunxi: sram: Remove unused list 'claimed_sram' Link: https://lore.kernel.org/r/ZoQZguQ6taJziJ11@wens.tw Signed-off-by: Arnd Bergmann commit 2bb1acc608cb74f325324b56de1aa397e85cd35f Merge: ee22fbd705444 c1267e1afae60 Author: Arnd Bergmann Date: Tue Jul 9 11:12:54 2024 +0200 Merge tag 'reset-for-v6.11-2' of git://git.pengutronix.de/pza/linux into soc/drivers Reset controller updates for v6.11, part 2 This tag adds USB VBUS regulator control for Renesas RZ/G2L SoCs, which also touches PHY driver and device tree, and pulls in a new regulator_hardware_enable() helper. The Tegra BPMP reset driver can be compiled under COMPILE_TEST now. * tag 'reset-for-v6.11-2' of git://git.pengutronix.de/pza/linux: arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs reset: renesas: Add USB VBUS regulator device as child dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator reset: tegra-bpmp: allow building under COMPILE_TEST regulator: core: Add helper for allow HW access to enable/disable regulator Link: https://lore.kernel.org/r/20240703100809.2773890-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit ee22fbd7054449abfc0f40653a85c79a422a6bf8 Merge: e9a316affb9a8 e49380c155940 Author: Arnd Bergmann Date: Tue Jul 9 11:09:07 2024 +0200 Merge tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.11 Support for Shared Memory (shm) Bridge is added, which provides a stricter interface for handling of buffers passed to TrustZone. The X1Elite platform is added to uefisecapp allow list, to instantiate the efivars implementation. A new in-kernel implementation of the pd-mapper (or servreg) service is introduced, to replace the userspace dependency for USB Type-C and battery management. Support for sharing interrupts across multiple bwmon instances is added, and a refcount imbalance issue is corrected. The LLCC support for recent platforms is corrected, and SA8775P support is added. A new interface is added to SMEM, to expose "feature codes". One example of the usecase for this is to indicate to the GPU driver which frequencies are available on the given device. The interrupt consumer and provider side of SMP2P is updated to provide more useful names in interrupt stats. Support for using the mailbox binding and driver for outgoing IPC interrupt in the SMSM driver is introduced. socinfo driver learns about SDM670 and IPQ5321, as well as get some updates to the X1E PMICs. pmic_glink is bumped to now support managing 3 USB Type-C ports. * tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (48 commits) soc: qcom: smp2p: Use devname for interrupt descriptions soc: qcom: smsm: Add missing mailbox dependency to Kconfig soc: qcom: add missing pd-mapper dependencies soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instances dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the required list firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new() soc: qcom: add pd-mapper implementation soc: qcom: pdr: extract PDR message marshalling data soc: qcom: pdr: fix parsing of domains lists soc: qcom: pdr: protect locator_addr with the main mutex firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image() firmware: qcom: scm: add support for SHM bridge memory carveout firmware: qcom: tzmem: enable SHM Bridge support firmware: qcom: scm: add support for SHM bridge operations firmware: qcom: qseecom: convert to using the TZ allocator firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator ... Link: https://lore.kernel.org/r/20240705034410.13968-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit e9a316affb9a80db824c436d9298a01eeff185cb Author: Pascal Paillet Date: Fri Jul 5 15:45:54 2024 +0200 arm64: stm32: enable scmi regulator for stm32 Add SCMI ARM REGULATOR configuration for stm32. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue Acked-by: Mark Brown Link: https://lore.kernel.org/r/20240705134554.2833835-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann commit 9c148cb47a1ece34853b4e86286d2fc0670195e9 Merge: 9f511474895ea b87a1cbb3385a Author: Arnd Bergmann Date: Tue Jul 9 11:07:32 2024 +0200 Merge tag 'ti-driver-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers TI SoC driver updates for v6.11 - Update TISCI protocol URL link which was dead - socinfo: Add j721E SR 2.0 detection support - MAINTAINER list additions: ti,pruss.yaml and ti,j721e-system-controller.yaml - pm33xx: log statement improvement - knav_qmss: minor data structure optimization * tag 'ti-driver-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: dt-bindings: soc: ti: Move ti,j721e-system-controller.yaml to soc/ti MAINTAINERS: Add entry for ti,pruss.yaml to TI KEYSTONE MULTICORE NAVIGATOR DRIVERS soc: ti: k3-socinfo: Add J721E SR2.0 soc: ti: knav_qmss: Constify struct knav_range_ops firmware: ti_sci: fix TISCI protocol URL link dt-bindings: ti: fix TISCI protocol URL link soc: ti: pm33xx: Fix missing newlines in log statements Link: https://lore.kernel.org/r/20240705151449.s4rngkehjn73favn@stream Signed-off-by: Arnd Bergmann commit f8ad00f3fb2af98f29aacd7ceb4ecdd5ad3c9a7f Author: James Chapman Date: Thu Jul 4 16:25:08 2024 +0100 l2tp: fix possible UAF when cleaning up tunnels syzbot reported a UAF caused by a race when the L2TP work queue closes a tunnel at the same time as a userspace thread closes a session in that tunnel. Tunnel cleanup is handled by a work queue which iterates through the sessions contained within a tunnel, and closes them in turn. Meanwhile, a userspace thread may arbitrarily close a session via either netlink command or by closing the pppox socket in the case of l2tp_ppp. The race condition may occur when l2tp_tunnel_closeall walks the list of sessions in the tunnel and deletes each one. Currently this is implemented using list_for_each_safe, but because the list spinlock is dropped in the loop body it's possible for other threads to manipulate the list during list_for_each_safe's list walk. This can lead to the list iterator being corrupted, leading to list_for_each_safe spinning. One sequence of events which may lead to this is as follows: * A tunnel is created, containing two sessions A and B. * A thread closes the tunnel, triggering tunnel cleanup via the work queue. * l2tp_tunnel_closeall runs in the context of the work queue. It removes session A from the tunnel session list, then drops the list lock. At this point the list_for_each_safe temporary variable is pointing to the other session on the list, which is session B, and the list can be manipulated by other threads since the list lock has been released. * Userspace closes session B, which removes the session from its parent tunnel via l2tp_session_delete. Since l2tp_tunnel_closeall has released the tunnel list lock, l2tp_session_delete is able to call list_del_init on the session B list node. * Back on the work queue, l2tp_tunnel_closeall resumes execution and will now spin forever on the same list entry until the underlying session structure is freed, at which point UAF occurs. The solution is to iterate over the tunnel's session list using list_first_entry_not_null to avoid the possibility of the list iterator pointing at a list item which may be removed during the walk. Also, have l2tp_tunnel_closeall ref each session while it processes it to prevent another thread from freeing it. cpu1 cpu2 --- --- pppol2tp_release() spin_lock_bh(&tunnel->list_lock); for (;;) { session = list_first_entry_or_null(&tunnel->session_list, struct l2tp_session, list); if (!session) break; list_del_init(&session->list); spin_unlock_bh(&tunnel->list_lock); l2tp_session_delete(session); l2tp_session_delete(session); spin_lock_bh(&tunnel->list_lock); } spin_unlock_bh(&tunnel->list_lock); Calling l2tp_session_delete on the same session twice isn't a problem per-se, but if cpu2 manages to destruct the socket and unref the session to zero before cpu1 progresses then it would lead to UAF. Reported-by: syzbot+b471b7c936301a59745b@syzkaller.appspotmail.com Reported-by: syzbot+c041b4ce3a6dfd1e63e2@syzkaller.appspotmail.com Fixes: d18d3f0a24fc ("l2tp: replace hlist with simple list for per-tunnel session list") Signed-off-by: James Chapman Signed-off-by: Tom Parkin Link: https://patch.msgid.link/20240704152508.1923908-1-jchapman@katalix.com Signed-off-by: Paolo Abeni commit 9f511474895ea45548c9d5f705d44d325f0bf342 Merge: 9e6b81559330f d930eb4fdfee3 Author: Arnd Bergmann Date: Tue Jul 9 11:05:26 2024 +0200 Merge tag 'riscv-firmware-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V firmware drivers for v6.11 Microchip: Support for writing "bitstream info" to the flash using the auto-update driver. At this point the "bitstream info" is a glorified dtbo wrapper, but there's plans to add more info there in the future. Additionally, rework some allocations in the driver and use scope-based cleanup on them. Signed-off-by: Conor Dooley * tag 'riscv-firmware-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: firmware: microchip: use scope-based cleanup where possible firmware: microchip: move buffer allocation into mpfs_auto_update_set_image_address() firmware: microchip: support writing bitstream info to flash Link: https://lore.kernel.org/r/20240707-lukewarm-film-8a9da40a1c27@spud Signed-off-by: Arnd Bergmann commit 9e6b81559330f3c5fa1a5352af7e9682efe1f7df Merge: a4dd55f8c2c06 3d41249c1dee0 Author: Arnd Bergmann Date: Tue Jul 9 10:53:48 2024 +0200 Merge tag 'riscv-cache-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V cache drivers for v6.11 StarFive: A new driver for the cache controller on the jh8100, which didn't implement Zicbom and thus needs an implementation of non-standard cache management operations. Signed-off-by: Conor Dooley * tag 'riscv-cache-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: MAINTAINERS: add microchip soc binding directory to microchip soc driver entry MAINTAINERS: add cache binding directory to cache driver entry cache: Add StarFive StarLink cache management dt-bindings: cache: Add docs for StarFive Starlink cache controller Link: https://lore.kernel.org/r/20240707-whoever-undesired-c5f6e96ae403@spud Signed-off-by: Arnd Bergmann commit 95ab7b209bd94ef5beea9419b8e8464788b28e75 Merge: ad828298af0bf b1240a39511b9 Author: Arnd Bergmann Date: Tue Jul 9 10:50:42 2024 +0200 Merge tag 'riscv-sophgo-dt-for-v6.11' of https://github.com/sophgo/linux into soc/dt RISC-V Devicetrees for v6.11 Sopgho: Add clock support for SG2042. Signed-off-by: Chen Wang * tag 'riscv-sophgo-dt-for-v6.11' of https://github.com/sophgo/linux: riscv: dts: add clock generator for Sophgo SG2042 SoC Link: https://lore.kernel.org/r/PN1P287MB281861EA2B1706B430D2FA3EFEDB2@PN1P287MB2818.INDP287.PROD.OUTLOOK.COM Signed-off-by: Arnd Bergmann commit ad828298af0bf87030539adbd79698da82a5d30e Merge: 6cf4e8f4ca3ad d79d713d602e8 Author: Arnd Bergmann Date: Tue Jul 9 08:22:56 2024 +0200 Merge tag 'v6.11-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt These are two additional boards, the Xunlong Orange Pi 3B and the Add Radxa ROCK 3B. * tag 'v6.11-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add Xunlong Orange Pi 3B dt-bindings: arm: rockchip: Add Xunlong Orange Pi 3B arm64: dts: rockchip: Add Radxa ROCK 3B dt-bindings: arm: rockchip: Add Radxa ROCK 3B Link: https://lore.kernel.org/r/2191200.GUh0CODmnK@diego Signed-off-by: Arnd Bergmann commit 680e7863de0c3d3551d247200fd1cb41ec874650 Author: Paul Burton Date: Sat May 11 12:43:29 2024 +0200 MIPS: GIC: Generate redirect block accessors With CM 3.5 the "core-other" register block evolves into the "redirect" register block, which is capable of accessing not only the core local registers of other cores but also the shared/global registers of other clusters. This patch generates accessor functions for shared/global registers accessed via the redirect block, with "redir_" inserted after "gic_" in their names. For example the accessor function: read_gic_config() ...accesses the GIC_CONFIG register of the GIC in the local cluster. With this patch a new function: read_gic_redir_config() ...is added which accesses the GIC_CONFIG register of the GIC in whichever cluster the GCR_CL_REDIRECT register is configured to access. This mirrors the similar redirect block accessors already provided for the CM & CPC. Reviewed-by: Jiaxun Yang Signed-off-by: Paul Burton Signed-off-by: Chao-ying Fu Signed-off-by: Dragan Mladjenovic Signed-off-by: Aleksandar Rikalo Signed-off-by: Thomas Bogendoerfer commit 36675ac2a759c6dc99e3155fd6b9ebcc75ef8a45 Author: Paul Burton Date: Sat May 11 12:43:28 2024 +0200 MIPS: CPS: Add a couple of multi-cluster utility functions This patch introduces a couple of utility functions which help later patches with introducing support for multi-cluster systems. - mips_cps_multicluster_cpus() allows its caller to determine whether the system includes CPUs spread across multiple clusters. This is useful because in some cases behaviour can be more optimal taking this knowledge into account. The means by which we check this is dependent upon the way we probe CPUs & assign their numbers, so keeping this knowledge confined here in arch/mips/ seems appropriate. - mips_cps_first_online_in_cluster() allows its caller to determine whether it is running upon the first CPU online within its cluster. This information is useful in cases where some cluster-wide configuration may need to occur, but should not be repeated if another CPU in the cluster is already online. Similarly to the above this is determined based upon knowledge of CPU numbering so it makes sense to keep that knowledge in arch/mips/. The function is defined in mips-cm.c rather than in asm/mips-cps.h in order to allow us to use asm/cpu-info.h & linux/smp.h without encountering an include nightmare. Signed-off-by: Paul Burton Signed-off-by: Chao-ying Fu Signed-off-by: Dragan Mladjenovic Signed-off-by: Aleksandar Rikalo Signed-off-by: Thomas Bogendoerfer commit f75efefb6db305b5b5c56a9b9ae2d72b54f20780 Author: Andreas Gruenbacher Date: Mon Jul 8 21:46:16 2024 +0200 gfs2: Clean up glock demote logic The logic for determining when to demote a glock in glock_work_func(), introduced in commit 7cf8dcd3b68a ("GFS2: Automatically adjust glock min hold time"), doesn't make sense: inode glocks have a minimum hold time that delays demotion, while all other glocks are expected to be demoted immediately. Instead of demoting non-inode glocks immediately, glock_work_func() schedules glock work for them to be demoted, however. Get rid of that unnecessary indirection. Signed-off-by: Andreas Gruenbacher commit 89c7f5078935872cf47a713a645affb5037be694 Author: Dominique Martinet Date: Fri Jul 5 16:48:30 2024 +0900 MIPS: Octeron: remove source file executable bit This does not matter the least, but there is no other .[ch] file in the repo that is executable, so clean this up. Fixes: 29b83a64df3b ("MIPS: Octeon: Add PCIe link status check") Signed-off-by: Dominique Martinet Signed-off-by: Thomas Bogendoerfer commit 03779999ac3053122c33173a652100c8fa6c61c5 Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Add PV steal time support in guest side Per-cpu struct kvm_steal_time is added here, its size is 64 bytes and also defined as 64 bytes, so that the whole structure is in one physical page. When a VCPU is online, function pv_enable_steal_time() is called. This function will pass guest physical address of struct kvm_steal_time and tells hypervisor to enable steal time. When a vcpu is offline, physical address is set as 0 and tells hypervisor to disable steal time. Here is an output of vmstat on guest when there is workload on both host and guest. It shows steal time stat information. procs -----------memory---------- -----io---- -system-- ------cpu----- r b swpd free inact active bi bo in cs us sy id wa st 15 1 0 7583616 184112 72208 20 0 162 52 31 6 43 0 20 17 0 0 7583616 184704 72192 0 0 6318 6885 5 60 8 5 22 16 0 0 7583616 185392 72144 0 0 1766 1081 0 49 0 1 50 16 0 0 7583616 184816 72304 0 0 6300 6166 4 62 12 2 20 18 0 0 7583632 184480 72240 0 0 2814 1754 2 58 4 1 35 Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit b4ba157044ea433a66126603ad7140e12dbc794b Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Add PV steal time support in host side Add ParaVirt steal time feature in host side, VM can search supported features provided by KVM hypervisor, a feature KVM_FEATURE_STEAL_TIME is added here. Like x86, steal time structure is saved in guest memory, one hypercall function KVM_HCALL_FUNC_NOTIFY is added to notify KVM to enable this feature. One CPU attr ioctl command KVM_LOONGARCH_VCPU_PVTIME_CTRL is added to save and restore the base address of steal time structure when a VM is migrated. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit d7ad41a31d91abd01a4d9b040074d808899636ea Author: Jia Qingtong Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: always make pte young in page map's fast path It seems redundant to check if pte is young before the call to kvm_pte_mkyoung() in kvm_map_page_fast(). Just remove the check. Reviewed-by: Bibo Mao Signed-off-by: Jia Qingtong Signed-off-by: Huacai Chen commit ebf00272da5c32ecd9f28e56b71bdfd5f11227e6 Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Mark page accessed and dirty with page ref added Function kvm_map_page_fast() is fast path of secondary mmu page fault flow, pfn is parsed from secondary mmu page table walker. However the corresponding page reference is not added, it is dangerious to access page out of mmu_lock. Here page ref is added inside mmu_lock, function kvm_set_pfn_accessed() and kvm_set_pfn_dirty() is called with page ref added, so that the page will not be freed by others. Also kvm_set_pfn_accessed() is removed here since it is called in the following function kvm_release_pfn_clean(). Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 8c347042527058976e8a1cb10c0ae31e55145f76 Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Add dirty bitmap initially all set support Add KVM_DIRTY_LOG_INITIALLY_SET support on LoongArch system, this feature comes from other architectures like x86 and arm64. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 32d4b999dadee0a84ac7fe709cae21d29364e1d1 Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Add memory barrier before update pmd entry When updating pmd entry such as allocating new pmd page or splitting huge page into normal page, it is necessary to firstly update all pte entries, and then update pmd entry. It is weak order with LoongArch system, there will be problem if other VCPUs see pmd update firstly while ptes are not updated. Here smp_wmb() is added to assure this. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit b072cbf0233b1fd9d84730cbe5cd1706dcacd354 Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Discard dirty page tracking on readonly memslot For readonly memslot such as UEFI BIOS or UEFI var space, guest cannot write this memory space directly. So it is not necessary to track dirty pages for readonly memslot. Here we make such optimization in function kvm_arch_commit_memory_region(). Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 2f56f9ea4dc3892c1265751a1c09038f365107ed Author: Bibo Mao Date: Tue Jul 9 16:25:51 2024 +0800 LoongArch: KVM: Select huge page only if secondary mmu supports it Currently page level selection about secondary mmu depends on memory slot and page level about host mmu. There will be problems if page level of secondary mmu is zero already. Huge page cannot be selected if there is normal page mapped in secondary mmu already, since it is not supported to merge normal pages into huge pages now. So page level selection should depend on the following three conditions. 1. Memslot is aligned for huge page and vm is not migrating. 2. Page level of host mmu is also huge page. 3. Page level of secondary mmu is suituable for huge page. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit b5d4e2325db29e063ff23772adb5846f1299b2e2 Author: Bibo Mao Date: Tue Jul 9 16:25:50 2024 +0800 LoongArch: KVM: Delay secondary mmu tlb flush until guest entry With hardware assisted virtualization, there are two level HW mmu, one is GVA to GPA mapping, the other is GPA to HPA mapping which is called secondary mmu in generic. If there is page fault for secondary mmu, there needs tlb flush operation indexed with fault GPA address and VMID. VMID is stored at register CSR.GSTAT and will be reload or recalculated before guest entry. Currently CSR.GSTAT is not saved and restored during VCPU context switch, instead it is recalculated during guest entry. So CSR.GSTAT is effective only when a VCPU runs in guest mode, however it may not be effective if the VCPU exits to host mode. Since register CSR.GSTAT may be stale, it may records the VMID of the last schedule-out VCPU, rather than the current VCPU. Function kvm_flush_tlb_gpa() should be called with its real VMID, so here move it to the guest entrance. Also an arch-specific request id KVM_REQ_TLB_FLUSH_GPA is added to flush tlb for secondary mmu, and it can be optimized if VMID is updated, since all guest tlb entries will be invalid if VMID is updated. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit e306e514906c444c3678b9c94dd92584b0859859 Author: Bibo Mao Date: Tue Jul 9 16:25:50 2024 +0800 LoongArch: KVM: Sync pending interrupt when getting ESTAT from user mode Currently interrupts are posted and cleared with the asynchronous mode, meanwhile they are saved in SW state vcpu::arch::irq_pending and vcpu:: arch::irq_clear. When vcpu is ready to run, pending interrupt is written back to CSR.ESTAT register from SW state vcpu::arch::irq_pending at the guest entrance. During VM migration stage, vcpu is put into stopped state, however pending interrupts are not synced to CSR.ESTAT register. So there will be interrupt lost when VCPU is migrated to another host machines. Here in this patch when ESTAT CSR register is read from VMM user mode, pending interrupts are synchronized to ESTAT also. So that VMM can get correct pending interrupts. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 91581c4b3f29e2e22aeb1a62e842d529ca638b2d Author: Bartosz Golaszewski Date: Mon Jul 8 16:29:12 2024 +0200 gpio: virtuser: new virtual testing driver for the GPIO API The GPIO subsystem used to have a serious problem with undefined behavior and use-after-free bugs on hot-unplug of GPIO chips. This can be considered a corner-case by some as most GPIO controllers are enabled early in the boot process and live until the system goes down but most GPIO drivers do allow unbind over sysfs, many are loadable modules that can be (force) unloaded and there are also GPIO devices that can be dynamically detached, for instance CP2112 which is a USB GPIO expender. Bugs can be triggered both from user-space as well as by in-kernel users. We have the means of testing it from user-space via the character device but the issues manifest themselves differently in the kernel. This is a proposition of adding a new virtual driver - a configurable GPIO consumer that can be configured over configfs (similarly to gpio-sim) or described on the device-tree. This driver is aimed as a helper in spotting any regressions in hot-unplug handling in GPIOLIB. Link: https://lore.kernel.org/r/20240708142912.120570-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 21b9e722ad28c19c2bc83f18f540b3dbd89bf762 Author: Thorsten Blum Date: Tue Jul 2 05:41:17 2024 +0200 m68k: cmpxchg: Fix return value for default case in __arch_xchg() The return value of __invalid_xchg_size() is assigned to tmp instead of the return variable x. Assign it to x instead. Fixes: 2501cf768e4009a0 ("m68k: Fix xchg/cmpxchg to fail to link if given an inappropriate pointer") Signed-off-by: Thorsten Blum Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240702034116.140234-2-thorsten.blum@toblux.com Signed-off-by: Geert Uytterhoeven commit d2eb433c8546363134cabca7a85c73086700aeec Author: Uwe Kleine-König Date: Mon Jul 8 15:02:53 2024 +0200 ALSA: ppc: keywest: Drop explicit initialization of struct i2c_device_id::driver_data to 0 The driver doesn'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 Link: https://patch.msgid.link/20240708130254.9631-2-u.kleine-koenig@baylibre.com Signed-off-by: Takashi Iwai commit 61353a63a22890f2c642232ae1ab4a2e02e6a27c Author: Christoph Hellwig Date: Tue Jul 9 09:01:25 2024 +0200 block: take offset into account in blk_bvec_map_sg again The rebase of commit 09595e0c9d65 ("block: pass a phys_addr_t to get_max_segment_size") lost adding the total to to the offset in blk_bvec_map_sg. Add it back. Fixes: 09595e0c9d65 ("block: pass a phys_addr_t to get_max_segment_size") Reported-by: Yi Zhang Reported-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240709070126.3019940-1-hch@lst.de Signed-off-by: Jens Axboe commit 6e909f489191b365364e9d636dec33b5dfd4e5eb Author: Johannes Berg Date: Tue Jul 9 08:34:09 2024 +0200 wifi: virt_wifi: don't use strlen() in const context Looks like not all compilers allow strlen(constant) as a constant, so don't do that. Instead, revert back to defining the length as the first submission had it. Fixes: b5d14b0c6716 ("wifi: virt_wifi: avoid reporting connection success with wrong SSID") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407090934.NnR1TUbW-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202407090944.mpwLHGt9-lkp@intel.com/ Signed-off-by: Johannes Berg commit 05a01ce77349f60b8f8d8b09df4e02a99d1f16df Merge: 43528789a0b9d 465830ad25346 Author: Arnd Bergmann Date: Tue Jul 9 08:21:26 2024 +0200 Merge tag 'imx-defconfig-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig change for 6.11: - Enable a few drivers needed by TQMa7x/MBa7x and i.MX53 QSB/QSRB in imx_v6_v7_defconfig - Enable IWLWIFI driver support in arm64 defconfig * tag 'imx-defconfig-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Enable the IWLWIFI driver ARM: imx_v6_v7_defconfig: enable DRM_SII902X and DRM_DISPLAY_CONNECTOR ARM: imx_v6_v7_defconfig: Enable drivers for TQMa7x/MBa7x Link: https://lore.kernel.org/r/20240709012534.3106441-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit 0ffc46eb1b6d0b9dd07e4f2b1019edd4fe678b9e Author: Chaitanya Kulkarni Date: Mon Jul 8 21:54:32 2024 -0700 block: fix get_max_segment_size() warning Correct the parameter name in the comment of get_max_segment_size() to fix following warning:- block/blk-merge.c:220: warning: Function parameter or struct member 'len' not described in 'get_max_segment_size' block/blk-merge.c:220: warning: Excess function parameter 'max_len' description in 'get_max_segment_size' Signed-off-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240709045432.8688-1-kch@nvidia.com Signed-off-by: Jens Axboe commit 9423c653fe611070d875b374fb322dc44acce3f2 Author: John Garry Date: Mon Jul 8 09:16:51 2024 +0000 loop: Don't bother validating blocksize The block queue limits validation does this for us now. The loop_configure() -> WARN_ON_ONCE() call is dropped, as an invalid block size would trigger this now. We don't want userspace to be able to directly trigger WARNs. Reviewed-by: Christoph Hellwig Signed-off-by: John Garry Reviewed-by: Damien Le Moal Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20240708091651.177447-6-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit af2817229158cea7960b9132e0a8c4470ebbfef5 Author: John Garry Date: Mon Jul 8 09:16:50 2024 +0000 virtio_blk: Don't bother validating blocksize The block queue limits validation does this for us now. Reviewed-by: Christoph Hellwig Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: John Garry Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240708091651.177447-5-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit addc3a68de850fa25dcf937705e721d8eec22470 Author: John Garry Date: Mon Jul 8 09:16:49 2024 +0000 null_blk: Don't bother validating blocksize The block queue limits validation does this for us now. Reviewed-by: Christoph Hellwig Signed-off-by: John Garry Reviewed-by: Zhu Yanjun Reviewed-by: Damien Le Moal Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20240708091651.177447-4-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit fe3d508ba95bc63adba661355115be340275c0d1 Author: John Garry Date: Mon Jul 8 09:16:48 2024 +0000 block: Validate logical block size in blk_validate_limits() Some drivers validate that their own logical block size. It is no harm to always do this, so validate in blk_validate_limits(). This allows us to remove the validation in most of those drivers. Add a comment to blk_validate_block_size() to inform users that self- validation of LBS is usually unnecessary. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240708091651.177447-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 4ff3d01275dee10ed1f40c314ba5133e3c7a6e1b Author: John Garry Date: Mon Jul 8 09:16:47 2024 +0000 virtio_blk: Fix default logical block size fallback If we fail to read a logical block size in virtblk_read_limits() -> virtio_cread_feature(), then we default to what is in lim->logical_block_size, but that would be 0. We can deal with lim->logical_block_size = 0 later in the blk_mq_alloc_disk(), but the code in virtblk_read_limits() needs a proper default, so give a default of SECTOR_SIZE. Fixes: 27e32cd23fed ("block: pass a queue_limits argument to blk_mq_alloc_disk") Reviewed-by: Christoph Hellwig Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240708091651.177447-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 6b43537faef35eb3d2657e2a1ec668a31b5ba5d1 Merge: 09595e0c9d654 89f58f96d1e23 Author: Jens Axboe Date: Mon Jul 8 23:57:02 2024 -0600 Merge tag 'nvme-6.11-2024-07-08' of git://git.infradead.org/nvme into for-6.11/block Pull NVMe updates from Keith: "nvme updates for Linux 6.11 - Device initialization memory leak fixes (Keith) - More constants defined (Weiwen) - Target debugfs support (Hannes) - PCIe subsystem reset enhancements (Keith) - Queue-depth multipath policy (Redhat and PureStorage) - Implement get_unique_id (Christoph) - Authentication error fixes (Gaosheng)" * tag 'nvme-6.11-2024-07-08' of git://git.infradead.org/nvme: (21 commits) nvmet-auth: fix nvmet_auth hash error handling nvme: implement ->get_unique_id nvme-multipath: implement "queue-depth" iopolicy nvme-multipath: prepare for "queue-depth" iopolicy nvme-pci: do not directly handle subsys reset fallout lpfc_nvmet: implement 'host_traddr' nvme-fcloop: implement 'host_traddr' nvmet-fc: implement host_traddr() nvmet-rdma: implement host_traddr() nvmet-tcp: implement host_traddr() nvmet: add 'host_traddr' callback for debugfs nvmet: add debugfs support mailmap: add entry for Weiwen Hu nvme: rename CDR/MORE/DNR to NVME_STATUS_* nvme: fix status magic numbers nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err nvme: split device add from initialization nvme: fc: split controller bringup handling nvme: rdma: split controller bringup handling nvme: tcp: split controller bringup handling ... commit 54624acf8843375a6de3717ac18df3b5104c39c5 Author: Yicong Yang Date: Thu Jun 20 17:28:55 2024 +0800 dma-mapping: benchmark: Don't starve others when doing the test The test thread will start N benchmark kthreads and then schedule out until the test time finished and notify the benchmark kthreads to stop. The benchmark kthreads will keep running until notified to stop. There's a problem with current implementation when the benchmark kthreads number is equal to the CPUs on a non-preemptible kernel: since the scheduler will balance the kthreads across the CPUs and when the test time's out the test thread won't get a chance to be scheduled on any CPU then cannot notify the benchmark kthreads to stop. This can be easily reproduced on a VM (simulated with 16 CPUs) with PREEMPT_VOLUNTARY: estuary:/mnt$ ./dma_map_benchmark -t 16 -s 1 rcu: INFO: rcu_sched self-detected stall on CPU rcu: 10-...!: (5221 ticks this GP) idle=ed24/1/0x4000000000000000 softirq=142/142 fqs=0 rcu: (t=5254 jiffies g=-559 q=45 ncpus=16) rcu: rcu_sched kthread starved for 5255 jiffies! g-559 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=12 rcu: Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_sched state:R running task stack:0 pid:16 tgid:16 ppid:2 flags:0x00000008 Call trace __switch_to+0xec/0x138 __schedule+0x2f8/0x1080 schedule+0x30/0x130 schedule_timeout+0xa0/0x188 rcu_gp_fqs_loop+0x128/0x528 rcu_gp_kthread+0x1c8/0x208 kthread+0xec/0xf8 ret_from_fork+0x10/0x20 Sending NMI from CPU 10 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 332 Comm: dma-map-benchma Not tainted 6.10.0-rc1-vanilla-LSE #8 Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : arm_smmu_cmdq_issue_cmdlist+0x218/0x730 lr : arm_smmu_cmdq_issue_cmdlist+0x488/0x730 sp : ffff80008748b630 x29: ffff80008748b630 x28: 0000000000000000 x27: ffff80008748b780 x26: 0000000000000000 x25: 000000000000bc70 x24: 000000000001bc70 x23: ffff0000c12af080 x22: 0000000000010000 x21: 000000000000ffff x20: ffff80008748b700 x19: ffff0000c12af0c0 x18: 0000000000010000 x17: 0000000000000001 x16: 0000000000000040 x15: ffffffffffffffff x14: 0001ffffffffffff x13: 000000000000ffff x12: 00000000000002f1 x11: 000000000001ffff x10: 0000000000000031 x9 : ffff800080b6b0b8 x8 : ffff0000c2a48000 x7 : 000000000001bc71 x6 : 0001800000000000 x5 : 00000000000002f1 x4 : 01ffffffffffffff x3 : 000000000009aaf1 x2 : 0000000000000018 x1 : 000000000000000f x0 : ffff0000c12af18c Call trace: arm_smmu_cmdq_issue_cmdlist+0x218/0x730 __arm_smmu_tlb_inv_range+0xe0/0x1a8 arm_smmu_iotlb_sync+0xc0/0x128 __iommu_dma_unmap+0x248/0x320 iommu_dma_unmap_page+0x5c/0xe8 dma_unmap_page_attrs+0x38/0x1d0 map_benchmark_thread+0x118/0x2c0 kthread+0xec/0xf8 ret_from_fork+0x10/0x20 Solve this by adding scheduling point in the kthread loop, so if there're other threads in the system they may have a chance to run, especially the thread to notify the test end. However this may degrade the test concurrency so it's recommended to run this on an idle system. Signed-off-by: Yicong Yang Acked-by: Barry Song Signed-off-by: Christoph Hellwig commit b80cc4df1124702c600fd43b784e423a30919204 Author: Chen Ni Date: Mon Jul 8 16:04:04 2024 +0800 ipc: mqueue: remove assignment from IS_ERR argument Remove assignment from IS_ERR() argument. This is detected by coccinelle. Signed-off-by: Chen Ni Link: https://lore.kernel.org/r/20240708080404.3859094-1-nichen@iscas.ac.cn Signed-off-by: Christian Brauner commit 83f4414b8f84249d538905825b088ff3ae555652 Author: Wojciech Gładysz Date: Wed Jul 3 09:01:12 2024 +0200 ext4: sanity check for NULL pointer after ext4_force_shutdown Test case: 2 threads write short inline data to a file. In ext4_page_mkwrite the resulting inline data is converted. Handling ext4_grp_locked_error with description "block bitmap and bg descriptor inconsistent: X vs Y free clusters" calls ext4_force_shutdown. The conversion clears EXT4_STATE_MAY_INLINE_DATA but fails for ext4_destroy_inline_data_nolock and ext4_mark_iloc_dirty due to ext4_forced_shutdown. The restoration of inline data fails for the same reason not setting EXT4_STATE_MAY_INLINE_DATA. Without the flag set a regular process path in ext4_da_write_end follows trying to dereference page folio private pointer that has not been set. The fix calls early return with -EIO error shall the pointer to private be NULL. Sample crash report: Unable to handle kernel paging request at virtual address dfff800000000004 KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] 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 [dfff800000000004] address between user and kernel address ranges Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 20274 Comm: syz-executor185 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __block_commit_write+0x64/0x2b0 fs/buffer.c:2167 lr : __block_commit_write+0x3c/0x2b0 fs/buffer.c:2160 sp : ffff8000a1957600 x29: ffff8000a1957610 x28: dfff800000000000 x27: ffff0000e30e34b0 x26: 0000000000000000 x25: dfff800000000000 x24: dfff800000000000 x23: fffffdffc397c9e0 x22: 0000000000000020 x21: 0000000000000020 x20: 0000000000000040 x19: fffffdffc397c9c0 x18: 1fffe000367bd196 x17: ffff80008eead000 x16: ffff80008ae89e3c x15: 00000000200000c0 x14: 1fffe0001cbe4e04 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000001 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : 0000000000000004 x7 : 0000000000000000 x6 : 0000000000000000 x5 : fffffdffc397c9c0 x4 : 0000000000000020 x3 : 0000000000000020 x2 : 0000000000000040 x1 : 0000000000000020 x0 : fffffdffc397c9c0 Call trace: __block_commit_write+0x64/0x2b0 fs/buffer.c:2167 block_write_end+0xb4/0x104 fs/buffer.c:2253 ext4_da_do_write_end fs/ext4/inode.c:2955 [inline] ext4_da_write_end+0x2c4/0xa40 fs/ext4/inode.c:3028 generic_perform_write+0x394/0x588 mm/filemap.c:3985 ext4_buffered_write_iter+0x2c0/0x4ec fs/ext4/file.c:299 ext4_file_write_iter+0x188/0x1780 call_write_iter include/linux/fs.h:2110 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x968/0xc3c fs/read_write.c:590 ksys_write+0x15c/0x26c fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:652 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Code: 97f85911 f94002da 91008356 d343fec8 (38796908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 97f85911 bl 0xffffffffffe16444 4: f94002da ldr x26, [x22] 8: 91008356 add x22, x26, #0x20 c: d343fec8 lsr x8, x22, #3 * 10: 38796908 ldrb w8, [x8, x25] <-- trapping instruction Reported-by: syzbot+18df508cf00a0598d9a6@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=18df508cf00a0598d9a6 Link: https://lore.kernel.org/all/000000000000f19a1406109eb5c5@google.com/T/ Signed-off-by: Wojciech Gładysz Link: https://patch.msgid.link/20240703070112.10235-1-wojciech.gladysz@infogain.com Signed-off-by: Theodore Ts'o commit a794c9ad026f0a28044347f31929fcdb0270eadc Author: Jan Kara Date: Mon Jul 1 15:28:00 2024 +0200 jbd2: increase maximum transaction size Originally, we were quite conservative in limiting maximum transaction size to a quarter of the journal because we were not accounting transaction descriptor and revoke blocks. These days we do properly account them and reserve space for them from the total transaction credits. Thus there's no need to be so conservative and we can increase the maximum transaction size to one third of the journal (even half should work fine in principle but the performance will likely suffer in that case). This also fixes failures to grow filesystems with tiny journals. Link: CA+hUFcuGs04JHZ_WzA1zGN57+ehL2qmHOt5a7RMpo+rv6Vyxtw@mail.gmail.com Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240701132800.7158-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 1cf5b024a3ffa479ed14e520f81549fce037f322 Author: Jan Kara Date: Mon Jun 24 19:01:20 2024 +0200 jbd2: drop pointless shrinker batch initialization In jbd2_journal_init_common() we set batch size of a shrinker shrinking checkpointed buffers to journal->j_max_transaction_buffers. But that is guaranteed to be 0 at that point so we effectively stay with the default shrinker batch size of 128. It has been like this since introduction of jbd2 shrinkers so just drop the pointless initialization. Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240624170127.3253-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit 27ba5b67312a944576addc4df44ac3b709aabede Author: Jan Kara Date: Mon Jun 24 19:01:19 2024 +0200 jbd2: avoid infinite transaction commit loop Commit 9f356e5a4f12 ("jbd2: Account descriptor blocks into t_outstanding_credits") started to account descriptor blocks into transactions outstanding credits. However it didn't appropriately decrease the maximum amount of credits available to userspace. Thus if the filesystem requests a transaction smaller than j_max_transaction_buffers but large enough that when descriptor blocks are added the size exceeds j_max_transaction_buffers, we confuse add_transaction_credits() into thinking previous handles have grown the transaction too much and enter infinite journal commit loop in start_this_handle() -> add_transaction_credits() trying to create transaction with enough credits available. Fix the problem by properly accounting for transaction space reserved for descriptor blocks when verifying requested transaction handle size. CC: stable@vger.kernel.org Fixes: 9f356e5a4f12 ("jbd2: Account descriptor blocks into t_outstanding_credits") Reported-by: Alexander Coffin Link: https://lore.kernel.org/all/CA+hUFcuGs04JHZ_WzA1zGN57+ehL2qmHOt5a7RMpo+rv6Vyxtw@mail.gmail.com Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240624170127.3253-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit e3a00a23781c1f2fcda98a7aecaac515558e7a35 Author: Jan Kara Date: Mon Jun 24 19:01:18 2024 +0200 jbd2: precompute number of transaction descriptor blocks Instead of computing the number of descriptor blocks a transaction can have each time we need it (which is currently when starting each transaction but will become more frequent later) precompute the number once during journal initialization together with maximum transaction size. We perform the precomputation whenever journal feature set is updated similarly as for computation of journal->j_revoke_records_per_block. CC: stable@vger.kernel.org Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240624170127.3253-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 4aa99c71e42ad60178c1154ec24e3df9c684fb67 Author: Jan Kara Date: Mon Jun 24 19:01:17 2024 +0200 jbd2: make jbd2_journal_get_max_txn_bufs() internal There's no reason to have jbd2_journal_get_max_txn_bufs() public function. Currently all users are internal and can use journal->j_max_transaction_buffers instead. This saves some unnecessary recomputations of the limit as a bonus which becomes important as this function gets more complex in the following patch. CC: stable@vger.kernel.org Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240624170127.3253-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 0bab8db4152c4a2185a1367db09cc402bdc62d5e Author: Ye Bin Date: Thu Jun 20 15:24:05 2024 +0800 jbd2: avoid mount failed when commit block is partial submitted We encountered a problem that the file system could not be mounted in the power-off scenario. The analysis of the file system mirror shows that only part of the data is written to the last commit block. The valid data of the commit block is concentrated in the first sector. However, the data of the entire block is involved in the checksum calculation. For different hardware, the minimum atomic unit may be different. If the checksum of a committed block is incorrect, clear the data except the 'commit_header' and then calculate the checksum. If the checkusm is correct, it is considered that the block is partially committed, Then continue to replay journal. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240620072405.3533701-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o commit 65121eff3e4c8c90f8126debf3c369228691c591 Author: Jan Kara Date: Thu Jun 13 17:02:34 2024 +0200 ext4: avoid writing unitialized memory to disk in EA inodes If the extended attribute size is not a multiple of block size, the last block in the EA inode will have uninitialized tail which will get written to disk. We will never expose the data to userspace but still this is not a good practice so just zero out the tail of the block as it isn't going to cause a noticeable performance overhead. Fixes: e50e5129f384 ("ext4: xattr-in-inode support") Reported-by: syzbot+9c1fe13fcb51574b249b@syzkaller.appspotmail.com Reported-by: Hugh Dickins Signed-off-by: Jan Kara Link: https://patch.msgid.link/20240613150234.25176-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 7882b0187bbeb647967a7b5998ce4ad26ef68a9a Author: Luis Henriques (SUSE) Date: Tue Jun 18 15:43:12 2024 +0100 ext4: don't track ranges in fast_commit if inode has inlined data When fast-commit needs to track ranges, it has to handle inodes that have inlined data in a different way because ext4_fc_write_inode_data(), in the actual commit path, will attempt to map the required blocks for the range. However, inodes that have inlined data will have it's data stored in inode->i_block and, eventually, in the extended attribute space. Unfortunately, because fast commit doesn't currently support extended attributes, the solution is to mark this commit as ineligible. Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039883 Signed-off-by: Luis Henriques (SUSE) Tested-by: Ben Hutchings Fixes: 9725958bb75c ("ext4: fast commit may miss tracking unwritten range during ftruncate") Link: https://patch.msgid.link/20240618144312.17786-1-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o commit 63469662cc45d41705f14b4648481d5d29cf5999 Author: Luis Henriques (SUSE) Date: Wed May 29 10:20:30 2024 +0100 ext4: fix possible tid_t sequence overflows In the fast commit code there are a few places where tid_t variables are being compared without taking into account the fact that these sequence numbers may wrap. Fix this issue by using the helper functions tid_gt() and tid_geq(). Signed-off-by: Luis Henriques (SUSE) Reviewed-by: Jan Kara Reviewed-by: Harshad Shirwadkar Link: https://patch.msgid.link/20240529092030.9557-3-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o commit 2bf6e353542d233486195953dc9c346331f82dcb Author: Christoph Hellwig Date: Mon Jul 8 14:02:57 2024 +0200 xfs: fix rtalloc rotoring when delalloc is in use If we're trying to allocate real space for a delalloc reservation at offset 0, we should use the rotor to spread files across the rt volume. Switch the rtalloc to use the XFS_ALLOC_INITIAL_USER_DATA flag that is set for any write at startoff to make it match the behavior for the main data device. Based on a patch from Darrick J. Wong. Fixes: 6a94b1acda7e ("xfs: reinstate delalloc for RT inodes (if sb_rextsize == 1)") Reported-by: Darrick J. Wong Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 06cd3d4bb319fcf7a1e792fea120293fc8b6e7d3 Merge: 946b6c48cca48 3c466d6537b99 Author: Jakub Kicinski Date: Mon Jul 8 20:23:59 2024 -0700 Merge branch 'net-stmmac-qcom-ethqos-enable-2-5g-ethernet-on-sa8775p-ride' Bartosz Golaszewski says: ==================== net: stmmac: qcom-ethqos: enable 2.5G ethernet on sa8775p-ride Here are the changes required to enable 2.5G ethernet on sa8775p-ride. As advised by Andrew Lunn and Russell King, I am reusing the existing stmmac infrastructure to enable the SGMII loopback and so I dropped the patches adding new callbacks to the driver core. I also added more details to the commit message and made sure the workaround is only enabled on Rev 3 of the board (with AQR115C PHY). Also: dropped any mentions of the OCSGMII mode. v2: https://lore.kernel.org/20240627113948.25358-1-brgl@bgdev.pl v1: https://lore.kernel.org/20240619184550.34524-1-brgl@bgdev.pl ==================== Link: https://patch.msgid.link/20240703181500.28491-1-brgl@bgdev.pl Signed-off-by: Jakub Kicinski commit 3c466d6537b99f801b3f68af3d8124d4312437a0 Author: Bartosz Golaszewski Date: Wed Jul 3 20:14:59 2024 +0200 net: stmmac: qcom-ethqos: enable SGMII loopback during DMA reset on sa8775p-ride-r3 On sa8775p-ride-r3 the RX clocks from the AQR115C PHY are not available at the time of the DMA reset. We can however extract the RX clock from the internal SERDES block. Once the link is up, we can revert to the previous state. The AQR115C PHY doesn't support in-band signalling so we can count on getting the link up notification and safely reuse existing callbacks which are already used by another HW quirk workaround which enables the functional clock to avoid a DMA reset due to timeout. Only enable loopback on revision 3 of the board - check the phy_mode to make sure. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240703181500.28491-3-brgl@bgdev.pl Signed-off-by: Jakub Kicinski commit 61e9be0efbe88b5cb6be6a859167a0f3724b6305 Author: Bartosz Golaszewski Date: Wed Jul 3 20:14:58 2024 +0200 net: stmmac: qcom-ethqos: add support for 2.5G BASEX mode Add support for 2.5G speed in 2500BASEX mode to the QCom ethqos driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20240703181500.28491-2-brgl@bgdev.pl Signed-off-by: Jakub Kicinski commit 946b6c48cca48591fb495508c5dbfade767173d0 Author: Johannes Berg Date: Fri Jul 5 13:42:06 2024 +0200 net: page_pool: fix warning code WARN_ON_ONCE("string") doesn't really do what appears to be intended, so fix that. Signed-off-by: Johannes Berg Fixes: 90de47f020db ("page_pool: fragment API support for 32-bit arch with 64-bit DMA") Link: https://patch.msgid.link/20240705134221.2f4de205caa1.I28496dc0f2ced580282d1fb892048017c4491e21@changeid Signed-off-by: Jakub Kicinski commit d992f881764cc89444aa5a9752ff508a1baeb61e Author: Raphael Gallais-Pou Date: Mon Jul 8 19:14:34 2024 +0200 cpufreq: sti: fix build warning Building this driver yields the following: .../drivers/cpufreq/sti-cpufreq.c:215:50: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=] 215 | snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode); | ^~ .../drivers/cpufreq/sti-cpufreq.c:215:44: note: directive argument in the range [0, 2147483647] 215 | snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode); | ^~~~~~~~~ .../drivers/cpufreq/sti-cpufreq.c:215:9: note: ‘snprintf’ output between 7 and 16 bytes into a destination of size 7 215 | snprintf(name, MAX_PCODE_NAME_LEN, pcode%d, pcode); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix the buffer size to avoid the warning at build time. Signed-off-by: Raphael Gallais-Pou Signed-off-by: Viresh Kumar commit ce87974811e015eb0e002c1b64a980d7a9d4c167 Author: Nícolas F. R. A. Prado Date: Fri Jul 5 11:54:43 2024 -0400 cpufreq: mediatek: Use dev_err_probe in every error path in probe Use the dev_err_probe() helper to log the errors on every error path in the probe function and its sub-functions. This includes * adding error messages where there was none * converting over dev_err/dev_warn * removing the top-level error message after mtk_cpu_dvfs_info_init() is called, since every error path inside that function already logs the error reason. This gets rid of the misleading error message when probe is deferred: mtk-cpufreq mtk-cpufreq: failed to initialize dvfs info for cpu0 Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Viresh Kumar commit ccf51454145bffd98e31cdbe54a4262473c609e2 Author: Huacai Chen Date: Fri Jul 5 14:06:49 2024 +0800 cpufreq: Add Loongson-3 CPUFreq driver support Some of LoongArch processors (Loongson-3 series) support DVFS, their IOCSR.FEATURES has IOCSRF_FREQSCALE set. And they has a micro-core in the package called SMC (System Management Controller), which can be used to detect temperature, control fans, scale frequency and voltage, etc. The Loongson-3 CPUFreq driver is very simple now, it communicate with SMC, get DVFS info, set target frequency from CPUFreq core, and so on. There is a command list to interact with SMC, widely-used commands in the CPUFreq driver include: CMD_GET_VERSION: Get SMC firmware version. CMD_GET_FEATURE: Get enabled SMC features. CMD_SET_FEATURE: Enable SMC features, such as basic DVFS, BOOST. CMD_GET_FREQ_LEVEL_NUM: Get the number of all frequency levels. CMD_GET_FREQ_BOOST_LEVEL: Get the first boost frequency level. CMD_GET_FREQ_LEVEL_INFO: Get the detail info of a frequency level. CMD_GET_FREQ_INFO: Get the current frequency. CMD_SET_FREQ_INFO: Set the target frequency. In future we will add automatic frequency scaling, which is similar to Intel's HWP (HardWare P-State). Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen [ Viresh: Minor formatting cleanups, change return type of exit() to void and use devm_mutex_init() ] Signed-off-by: Viresh Kumar commit b4b1ddc9dfe997a5f492fa3a36487f8e7a5de30d Author: Lizhe Date: Thu Jul 4 12:23:55 2024 +0530 cpufreq: Make cpufreq_driver->exit() return void The cpufreq core doesn't check the return type of the exit() callback and there is not much the core can do on failures at that point. Just drop the returned value and make it return void. Signed-off-by: Lizhe [ Viresh: Reworked the patches to fix all missing changes together. ] Signed-off-by: Viresh Kumar Reviewed-by: AngeloGioacchino Del Regno # Mediatek Acked-by: Sudeep Holla # scpi, scmi, vexpress Acked-by: Mario Limonciello # amd Reviewed-by: Florian Fainelli # bmips Acked-by: Rafael J. Wysocki Acked-by: Kevin Hilman # omap commit 465830ad25346aa7945e8e0ac5b8ca7d53217043 Author: Fabio Estevam Date: Sun Jun 23 22:01:57 2024 -0300 arm64: defconfig: Enable the IWLWIFI driver The IOT-GATE-iMX8 board has an Intel Wifi 6 AX200 module. Enable the IWLWIFI driver so that Wifi can work by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit b1240a39511b9206293b82ac372c5114d6e15821 Author: Chen Wang Date: Fri Nov 24 14:26:02 2023 +0800 riscv: dts: add clock generator for Sophgo SG2042 SoC Add clock generator node to device tree for SG2042, and enable clock for uart. Signed-off-by: Chen Wang Reviewed-by: Guo Ren commit 3c552a66a5d82d710a9166b7a817a30d78e31822 Author: Andre Przywara Date: Tue Jun 18 17:04:50 2024 +0100 dt-bindings: arm: cpus: Add new Cortex and Neoverse names Add compatible strings for the Arm Cortex-A725 and Cortex-A925 CPUs, as well as new Neoverse cores: Arm Neoverse N3, Neoverse V2, Neoverse V3, and Neoverse V3AE. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240618160450.3168005-1-andre.przywara@arm.com Signed-off-by: Rob Herring (Arm) commit e69956584ddf90b83fa89b113f4960b8d653d4d2 Author: Bjorn Andersson Date: Sat May 25 11:05:31 2024 -0700 dt-bindings: interrupt-controller: qcom,pdc: Add sc8180x PDC The SC8180X platform has a PDC block, add a compatible for this. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240525-sc8180x-pdc-binding-compatible-v1-1-17031c85ed69@quicinc.com Signed-off-by: Rob Herring (Arm) commit dc12273fa3d8a84f1e2def49bcf93bea59480f68 Author: Herve Codina Date: Mon May 27 18:14:44 2024 +0200 PCI: of_property: Add interrupt-controller property in PCI device nodes PCI devices and bridges DT nodes created during the PCI scan are created with the interrupt-map property set to handle interrupts. In order to set this interrupt-map property at a specific level, a phandle to the parent interrupt controller is needed. On systems that are not fully described by a device-tree, the parent interrupt controller may be unavailable (i.e. not described by the device-tree). As mentioned in the [1], avoiding the use of the interrupt-map property and considering a PCI device as an interrupt controller itself avoid the use of a parent interrupt phandle. In that case, the PCI device itself as an interrupt controller is responsible for routing the interrupts described in the device-tree world (DT overlay) to the PCI interrupts. Add the 'interrupt-controller' property in the PCI device DT node. [1]: https://lore.kernel.org/lkml/CAL_Jsq+je7+9ATR=B6jXHjEJHjn24vQFs4Tvi9=vhDeK9n42Aw@mail.gmail.com/ Signed-off-by: Herve Codina Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240527161450.326615-18-herve.codina@bootlin.com Signed-off-by: Rob Herring (Arm) commit 1e4368395febf7f72adda39b80015f9f0054dd73 Author: Herve Codina Date: Mon May 27 18:14:43 2024 +0200 of: unittest: Add a test case for of_changeset_add_prop_bool() Improve of_unittest_changeset_prop() to have a test case for the newly introduced of_changeset_add_prop_bool(). Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20240527161450.326615-17-herve.codina@bootlin.com Signed-off-by: Rob Herring (Arm) commit f2b388d63e6c7c6151bb295e5cbf48a2ac91e51a Author: Herve Codina Date: Mon May 27 18:14:42 2024 +0200 of: dynamic: Introduce of_changeset_add_prop_bool() APIs to add some properties in a changeset exist but nothing to add a DT boolean property (i.e. a property without any values). Fill this lack with of_changeset_add_prop_bool(). Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20240527161450.326615-16-herve.codina@bootlin.com Signed-off-by: Rob Herring (Arm) commit aa5545ae62e890d01ce056021c8818460062672a Author: Herve Codina Date: Mon May 27 18:14:41 2024 +0200 of: unittest: Add tests for changeset properties adding No test cases are present to test the of_changes_add_prop_*() function family. Add a new test to fill this lack. Functions tested are: - of_changes_add_prop_string() - of_changes_add_prop_string_array() - of_changeset_add_prop_u32() - of_changeset_add_prop_u32_array() Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20240527161450.326615-15-herve.codina@bootlin.com Signed-off-by: Rob Herring (Arm) commit 6badc62f8fa4a1165f3f440943045b73c7a47735 Author: Herve Codina Date: Mon May 27 18:14:40 2024 +0200 of: dynamic: Constify parameter in of_changeset_add_prop_string_array() The str_array parameter has no reason to be an un-const array. Indeed, elements of the 'str_array' array are not changed by the code. Constify the 'str_array' array parameter. With this const qualifier added, the following construction is allowed: static const char * const tab_str[] = { "string1", "string2" }; of_changeset_add_prop_string_array(..., tab_str, ARRAY_SIZE(tab_str)); Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20240527161450.326615-14-herve.codina@bootlin.com Signed-off-by: Rob Herring (Arm) commit 38da7fa47efc41efc91a7d52600a9d0c173b2305 Author: Rohit Agarwal Date: Fri May 17 15:34:22 2024 +0530 dt-bindings: dma: qcom,gpi: document the SDX75 GPI DMA Engine Document the GPI DMA Engine on the SDX75 Platform. Signed-off-by: Rohit Agarwal Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240517100423.2006022-2-quic_rohiagar@quicinc.com Signed-off-by: Rob Herring (Arm) commit fdd81e90639a51479e917bfd6be01a8c80e46c05 Author: Shresth Prasad Date: Tue May 28 01:28:12 2024 +0530 dt-bindings: watchdog: img,pdc-wdt: Convert to dtschema Convert txt bindings of ImgTec's PDC watchdog timer to dtschema to allow for validation. Signed-off-by: Shresth Prasad Reviewed-by: Guenter Roeck Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240527195811.7897-2-shresthprasad7@gmail.com Signed-off-by: Rob Herring (Arm) commit bd7db321884a48e93e675d36ac4f34f1f0bf997a Author: Geert Uytterhoeven Date: Wed May 29 14:32:32 2024 +0200 dt-bindings: timer: renesas,tmu: Make interrupt-names required Now all in-tree users have been updated with interrupt-names properties according to commit 0076a37a426b6c85 ("dt-bindings: timer: renesas,tmu: Document input capture interrupt"), make interrupt-names required. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/65fdd0425be0cc1bae9e6f7996aceaa5ad34e510.1716985947.git.geert+renesas@glider.be Signed-off-by: Rob Herring (Arm) commit d8d301a1d220bdc5e31f4f70e66c1df0cd01a7ca Author: Alexander Stein Date: Tue May 28 09:11:40 2024 +0200 dt-bindings: interrupt-controller: fsl,irqsteer: Add imx8mp/imx8qxp support Some SoC like i.MX8MP or i.MX8QXP use a power-domain for this IP. Add SoC-specific compatibles, which also requires a power-domain. Signed-off-by: Alexander Stein Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240528071141.92003-2-alexander.stein@ew.tq-group.com Signed-off-by: Rob Herring (Arm) commit 5e91cef94426d71e3156864d52753ace4cee721a Author: Felix Kaechele Date: Thu Jun 20 10:50:06 2024 -0400 Input: himax_hx83112b - add support for HX83100A The HX83100A is a bit of an outlier in the Himax HX831xxx series of touch controllers as it requires reading touch events through the AHB interface of the MCU rather than providing a dedicated FIFO address like the other chips do. This patch implements the specific read function and introduces the HX83100A chip with an appropriate i2c ID and DT compatible string. The HX83100A doesn't have a straightforward way to do chip identification, which is why it is not implemented in this patch. Tested on: Lenovo ThinkSmart View (CD-18781Y) / Innolux P080DDD-AB2 LCM Signed-off-by: Felix Kaechele Tested-by: Paul Gale Link: https://lore.kernel.org/r/20240620145019.156187-6-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit aa9007ed2d3880d41566625dd4df40886e4f45cb Author: Felix Kaechele Date: Thu Jun 20 10:50:05 2024 -0400 Input: himax_hx83112b - add himax_chip struct for multi-chip support In preparation for HX83100A support allow defining separate functions for specific chip operations. Signed-off-by: Felix Kaechele Link: https://lore.kernel.org/r/20240620145019.156187-5-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit 0944829d491e0f342924154d2e58c6b2e61e3595 Author: Felix Kaechele Date: Thu Jun 20 10:50:04 2024 -0400 Input: himax_hx83112b - implement MCU register reading Implement reading from the MCU in a more universal fashion. This allows properly handling reads of more than 4 bytes using the AHB FIFO implemented in the chip. Signed-off-by: Felix Kaechele Link: https://lore.kernel.org/r/20240620145019.156187-4-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit 05eab5456b24230a30b65bcd6793937cb84d3de8 Author: Felix Kaechele Date: Thu Jun 20 10:50:03 2024 -0400 Input: himax_hx83112b - use more descriptive register defines Himax uses an AHB-style bus to communicate with different parts of the display driver and touch controller system. Use more descriptive names for the register and address defines. The names were taken from a driver submission for the similar HX83102J chip. Signed-off-by: Felix Kaechele Link: https://lore.kernel.org/all/TY0PR06MB561105A3386E9D76F429110D9E0F2@TY0PR06MB5611.apcprd06.prod.outlook.com/ Link: https://lore.kernel.org/r/20240620145019.156187-3-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit a742e61dbb7198b51af772c7b80ed81ed298a88f Author: Felix Kaechele Date: Thu Jun 20 10:50:02 2024 -0400 dt-bindings: input: touchscreen: himax,hx83112b: add HX83100A Add a compatible string for the Himax HX83100A touch controller. The HX83100A presents touch events on the internal bus rather than offering a dedicated event register like the other chips in this family do. Signed-off-by: Felix Kaechele Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240620145019.156187-2-felix@kaechele.ca Signed-off-by: Dmitry Torokhov commit 735877fde06304ae9d90e17102dc2b139e8d802a Author: Dmitry Torokhov Date: Wed Jul 3 14:37:54 2024 -0700 Input: do not check number of events in input_pass_values() Now that the input_dev->vals array is always there we can be assured that input_pass_values() is always called with a non-0 number of events. Remove the check. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-8-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 0cd58773520584ccb4ce1eeebd8d43f1b27bb24a Author: Dmitry Torokhov Date: Wed Jul 3 14:37:53 2024 -0700 Input: preallocate memory to hold event values Preallocate memory for holding event values (input_dev->vals) so that there is no need to check if it was allocated or not in the event processing code. The amount of memory will be adjusted after input device has been fully set up upon registering device with the input core. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 3544cf574a577d92111f0b29e6d649b7ea3210ed Author: Dmitry Torokhov Date: Wed Jul 3 14:37:52 2024 -0700 Input: rearrange input_alloc_device() to prepare for preallocating of vals In preparation to have dev->vals memory pre-allocated rearrange code in input_alloc_device() so that it allows handling multiple points of failure. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit d469647bafd9353730e0f74ec5fbefcd431c576b Author: Dmitry Torokhov Date: Wed Jul 3 14:37:51 2024 -0700 Input: simplify event handling logic Streamline event handling code by providing batch implementations for filtering and event processing and using them in place of the main event handler, as needed, instead of having complex branching logic in the middle of the event processing code. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 14498e993fb77adce75f0106162902b2f8b1d480 Author: Dmitry Torokhov Date: Wed Jul 3 14:37:50 2024 -0700 Input: make events() method return number of events processed In preparation to consolidating filtering and event processing in the input core change events() method to return number of events processed by it. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit a184cf98b1d4397fe7eca881da596059fea36a18 Author: Dmitry Torokhov Date: Wed Jul 3 14:37:49 2024 -0700 Input: make sure input handlers define only one processing method Input core expects input handlers to be either filters, or regular handlers, but not both. Additionally, for regular handlers it does not make sense to define both single event method and batch method. Refuse registering handler if it defines more than one method. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit b3d65108ac8abd79e0367d77598d539b117044a3 Author: Dmitry Torokhov Date: Wed Jul 3 14:37:48 2024 -0700 Input: evdev - remove ->event() method Input core favors ->events() (batch) method over ->event() method if the former is defined, so there is no point in defining evdev_event() as it is never called. Remove it. Reviewed-by: Jeff LaBundy Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240703213756.3375978-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 1e48ee99f603000688ea8d65ef7e58627bb4c8d1 Author: Raymond Hackley Date: Thu Jun 13 02:57:11 2024 +0000 Input: imagis - add supports for Imagis IST3038 Imagis IST3038 is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). Unlike IST3038C/IST3032C, IST3038 has different registers for commands, which means IST3038 doesn't use protocol B. Similar to IST3032C and maybe the other variants, IST3038 has touch keys support, which provides KEY_APPSELECT and KEY_BACK. Add support for IST3038 with touch keys. Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240613025631.5425-4-raymondhackley@protonmail.com Signed-off-by: Dmitry Torokhov commit 72d45b66587aefdb192ba4e8667ce4ce669cc9de Author: Raymond Hackley Date: Thu Jun 13 02:57:03 2024 +0000 dt-bindings: input/touchscreen: imagis: Document ist3038 Imagis IST3038 is a variant of Imagis touchscreen IC. Document it in imagis,ist3038c bindings. Signed-off-by: Raymond Hackley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240613025631.5425-3-raymondhackley@protonmail.com Signed-off-by: Dmitry Torokhov commit ff2f28c7714130db5ebb31e616c8b03bbdc500c8 Author: Raymond Hackley Date: Thu Jun 13 02:56:54 2024 +0000 Input: imagis - clarify the usage of protocol_b protocol_b is a property, which tells Imagis panel to use a different format for coordinates. IST30XXC series is known for using protocol B, while the other series aren't. Note this could be confusing, unlike the model name implies. Adjust the usage of protocol_b to avoid confusion. Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240613025631.5425-2-raymondhackley@protonmail.com Signed-off-by: Dmitry Torokhov commit fd6acb0d21b8683fd8804129beeb4fe629488aff Author: Lorenzo Bianconi Date: Tue Jul 9 00:42:38 2024 +0200 i2c: mt7621: Add Airoha EN7581 i2c support Introduce i2c support to Airoha EN7581 SoC through the i2c-mt7621 driver. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Ray Liu Signed-off-by: Lorenzo Bianconi Signed-off-by: Andi Shyti commit 21ac0359f72a90b16bb0e2f9e6b40dbac54c4e31 Author: Javier Carrasco Date: Fri Jul 5 20:06:25 2024 +0200 i2c: designware: Constify read-only struct regmap_config `bt1_i2c_cfg` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Signed-off-by: Andi Shyti commit ee1691d0ae103ba7fd9439800ef454674fadad27 Author: Marc Ferland Date: Mon May 13 12:03:24 2024 -0400 i2c: xiic: improve error message when transfer fails to start xiic_start_xfer can fail for different reasons: - EBUSY: bus is busy or i2c messages still in tx_msg or rx_msg - ETIMEDOUT: timed-out trying to clear the RX fifo - EINVAL: wrong clock settings Both EINVAL and ETIMEDOUT will currently print a specific error message followed by a generic one, for example: Failed to clear rx fifo Error xiic_start_xfer however EBUSY will simply output the generic message: Error xiic_start_xfer which is not really helpful. This commit adds a new error message when a busy condition is detected and also removes the generic message since it does not provide any relevant information to the user. Signed-off-by: Marc Ferland Acked-by: Michal Simek Signed-off-by: Andi Shyti commit d5adffc46fde8338ec9264175e789716dc39194a Author: Kanak Shilledar Date: Tue Jun 25 12:29:32 2024 +0530 dt-bindings: i2c: nxp,lpc1788-i2c: convert to dt schema Convert the NXP I2C controller for LPC2xxx/178x/18xx/43xx to newer DT schema. Created DT schema based on the .txt file which had `compatible`, `reg`, `interrupts`, `clocks`, `#address-cells` and `#size-cells` as required properties. Additional changes to the original .txt binding - added maintainer from the MAINTAINERS file. - added resets property required by the corresponding DTS files. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kanak Shilledar Signed-off-by: Andi Shyti commit 2362c730026dde1c50081ff2170656df14d7135b Author: Krzysztof Kozlowski Date: Thu Jun 20 13:34:55 2024 +0200 dt-bindings: i2c: adjust indentation in DTS example to coding style Bindings coding style expects 2- or 4-space indentation in the DTS example. Correct files having something odd (6- or 8-space) to 4-space while re-ordering few properties according to DTS coding style (the first property should be compatible, then reg/ranges). No functional impact. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Signed-off-by: Andi Shyti commit a95ab3d2ee4c60ec980dbad3965d43b6226ece01 Author: Krzysztof Kozlowski Date: Thu Jun 20 13:34:54 2024 +0200 dt-bindings: i2c: ti,omap4: reference i2c-controller.yaml schema Reference the core I2C controller schema to properly define common properties. This allows to drop several (now redundant) properties. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Signed-off-by: Andi Shyti commit 502ebea6542524c3d80c1e2273709c92af0699fb Author: Krzysztof Kozlowski Date: Thu Jun 20 13:34:53 2024 +0200 dt-bindings: i2c: samsung,s3c2410: drop unneeded address/size-cells The reference i2c-controller.yaml already defines 'address-cells' and 'size-cells', so drop them from list of properties. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Signed-off-by: Andi Shyti commit 738799b0fddb1175be25ad1c1363ee8ffefbcfb0 Author: Krzysztof Kozlowski Date: Thu Jun 20 13:34:52 2024 +0200 dt-bindings: i2c: nvidia,tegra20: drop unneeded address/size-cells The reference i2c-controller.yaml already defines 'address-cells' and 'size-cells', so drop them from list of properties. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Signed-off-by: Andi Shyti commit b239c3f4a1e91ae9bb4e61cddb64d3839b7e2f97 Author: Krzysztof Kozlowski Date: Thu Jun 20 13:34:51 2024 +0200 dt-bindings: i2c: atmel,at91sam: drop unneeded address/size-cells The reference i2c-controller.yaml already defines 'address-cells' and 'size-cells', so drop them from list of properties. Drop them as well from required properties, even though i2c-controller.yaml does not require them, because I2C controller could be enabled without any children in DTS for user-space usage. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Signed-off-by: Andi Shyti commit 7da7fd7e66ac9b0d4287aefba516795145f3c722 Author: Thomas Richard Date: Thu Jun 13 15:13:28 2024 +0200 i2c: omap: wakeup the controller during suspend() callback A device may need the controller up during suspend_noirq() or resume_noirq(). But if the controller is autosuspended, there is no way to wakeup it during suspend_noirq() or resume_noirq() because runtime pm is disabled at this time. The suspend() callback wakes up the controller, so it is available until its suspend_noirq() callback (pm_runtime_force_suspend()). During the resume, it's restored by resume_noirq() callback (pm_runtime_force_resume()). Then resume() callback enables autosuspend. So the controller is up during a little time slot in suspend and resume sequences even if it's not used. Reviewed-by: Andi Shyti Acked-by: Wolfram Sang Reviewed-by: Tony Lindgren Signed-off-by: Thomas Richard Signed-off-by: Andi Shyti commit 2cb21a62bacc53587095b2050e92ce3e7a3574d7 Author: Thomas Richard Date: Thu Jun 13 15:13:27 2024 +0200 i2c: omap: switch to NOIRQ_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() Replace SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() by NOIRQ_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS(). The usage of pm_ptr() and these more recent macros allows the compiler to see and drop the dead code. The unnecessary '__maybe_unused' annotations on PM functions can be removed. Signed-off-by: Thomas Richard Signed-off-by: Andi Shyti commit 69ab71bdd3006a98e13048bcb698004866225dc4 Author: Jeff Johnson Date: Fri Jun 7 09:28:43 2024 -0700 i2c: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/i2c/busses/i2c-ccgx-ucsi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/i2c/busses/i2c-ali1563.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/i2c/busses/i2c-pxa.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/i2c/busses/i2c-qup.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Andi Shyti commit f0eda4ddb2146a9f29d31b54c396f741bd0c82f1 Author: Jarkko Nikula Date: Mon Jun 10 13:18:01 2024 +0300 i2c: i801: Add support for Intel Arrow Lake-H Add SMBus PCI ID on Intel Arrow Lake-H. Signed-off-by: Jarkko Nikula Signed-off-by: Andi Shyti commit 86588139b84386a47108b024d703c3c24ddbbec8 Author: Dan Williams Date: Wed Jul 3 18:01:35 2024 -0700 Documentation: CXL Maturity Map Provide a survey of the work-in-progress maturity (implementation status) of various aspects of the CXL subsystem. Clarify that in addition to ongoing upkeep relative to specification updates, there are some long running themes in the driver that respond to the discovery of new corner cases (bugs) and new use cases (feature extensions). The primary audience is distribution maintainers, but it also serves as a guide for kernel developers to understand what aspects of the CXL subsystem need more help. It is a landing page to document ongoing progress, and a guide to discern exposure to work-in-progress features. Reviewed-by: Adam Manzanares Signed-off-by: Dan Williams Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Reviewed-by: Alison Schofield Link: https://patch.msgid.link/172005486862.2048248.6668794717827294862.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dave Jiang commit d79d713d602e8b32cf935ddfdf61769cb74ba1dc Author: Jonas Karlman Date: Wed Jun 26 23:03:12 2024 +0000 arm64: dts: rockchip: Add Xunlong Orange Pi 3B The Xunlong Orange Pi 3B is a single-board computer based on the Rockchip RK3566 SoC. Add initial support for eMMC, SD-card, Ethernet, HDMI, PCIe and USB. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240626230319.1425316-3-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 6d48d5045d99a938b42ee875ae6be80b832e6d77 Author: Jonas Karlman Date: Wed Jun 26 23:03:11 2024 +0000 dt-bindings: arm: rockchip: Add Xunlong Orange Pi 3B Add devicetree binding for the Xunlong Orange Pi 3B board. Signed-off-by: Jonas Karlman Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626230319.1425316-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 846ef7748fa9124c8eea76e2d5e833fa69b3ef7c Author: Jonas Karlman Date: Thu Jun 27 21:17:31 2024 +0000 arm64: dts: rockchip: Add Radxa ROCK 3B The Radxa ROCK 3B is a single-board computer based on the Pico-ITX form factor (100mm x 75mm). Two versions of the ROCK 3B exists, a community version based on the RK3568 SoC and an industrial version based on the RK3568J SoC. Add initial support for eMMC, SD-card, Ethernet, HDMI, PCIe and USB. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240627211737.1985549-3-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 056abbd100ce9ce6dae3e5e64ffee92b56439c0c Author: Jonas Karlman Date: Thu Jun 27 21:17:30 2024 +0000 dt-bindings: arm: rockchip: Add Radxa ROCK 3B Add devicetree binding documentation for the Radxa ROCK 3B board. The Radxa ROCK 3B is a single-board computer based on the Pico-ITX form factor (100mm x 75mm). Two versions of the ROCK 3B exists, a community version based on the RK3568 SoC and an industrial version based on the RK3568J SoC. Signed-off-by: Jonas Karlman Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627211737.1985549-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit fc6e66f4696b63b8a2645a2bcea407cb04bd0666 Author: Alice Ryhl Date: Tue May 28 14:58:05 2024 +0000 rust: add abstraction for `struct page` Adds a new struct called `Page` that wraps a pointer to `struct page`. This struct is assumed to hold ownership over the page, so that Rust code can allocate and manage pages directly. The page type has various methods for reading and writing into the page. These methods will temporarily map the page to allow the operation. All of these methods use a helper that takes an offset and length, performs bounds checks, and returns a pointer to the given offset in the page. This patch only adds support for pages of order zero, as that is all Rust Binder needs. However, it is written to make it easy to add support for higher-order pages in the future. To do that, you would add a const generic parameter to `Page` that specifies the order. Most of the methods do not need to be adjusted, as the logic for dealing with mapping multiple pages at once can be isolated to just the `with_pointer_into_page` method. Rust Binder needs to manage pages directly as that is how transactions are delivered: Each process has an mmap'd region for incoming transactions. When an incoming transaction arrives, the Binder driver will choose a region in the mmap, allocate and map the relevant pages manually, and copy the incoming transaction directly into the page. This architecture allows the driver to copy transactions directly from the address space of one process to another, without an intermediate copy to a kernel buffer. This code is based on Wedson's page abstractions from the old rust branch, but it has been modified by Alice by removing the incomplete support for higher-order pages, by introducing the `with_*` helpers to consolidate the bounds checking logic into a single place, and various other changes. Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Reviewed-by: Andreas Hindborg Reviewed-by: Trevor Gross Reviewed-by: Benno Lossin Reviewed-by: Boqun Feng Signed-off-by: Alice Ryhl Link: https://lore.kernel.org/r/20240528-alice-mm-v7-4-78222c31b8f4@google.com [ Fixed typos and added a few intra-doc links. - Miguel ] Signed-off-by: Miguel Ojeda commit b33bf37adbb2ae35881e7fdd997ce3334d71b129 Author: Alice Ryhl Date: Tue May 28 14:58:04 2024 +0000 rust: uaccess: add typed accessors for userspace pointers Add safe methods for reading and writing Rust values to and from userspace pointers. The C methods for copying to/from userspace use a function called `check_object_size` to verify that the kernel pointer is not dangling. However, this check is skipped when the length is a compile-time constant, with the assumption that such cases trivially have a correct kernel pointer. In this patch, we apply the same optimization to the typed accessors. For both methods, the size of the operation is known at compile time to be size_of of the type being read or written. Since the C side doesn't provide a variant that skips only this check, we create custom helpers for this purpose. The majority of reads and writes to userspace pointers in the Rust Binder driver uses these accessor methods. Benchmarking has found that skipping the `check_object_size` check makes a big difference for the cases being skipped here. (And that the check doesn't make a difference for the cases that use the raw read/write methods.) This code is based on something that was originally written by Wedson on the old rust branch. It was modified by Alice to skip the `check_object_size` check, and to update various comments, including the notes about kernel pointers in `WritableToBytes`. Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Reviewed-by: Benno Lossin Reviewed-by: Boqun Feng Reviewed-by: Trevor Gross Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl Link: https://lore.kernel.org/r/20240528-alice-mm-v7-3-78222c31b8f4@google.com [ Wrapped docs to 100 and added a few intra-doc links. - Miguel ] Signed-off-by: Miguel Ojeda commit 1f9a8286bc0c3df7d789ea625d9d9db3d7779f2d Author: Arnd Bergmann Date: Tue May 28 14:58:03 2024 +0000 uaccess: always export _copy_[from|to]_user with CONFIG_RUST Rust code needs to be able to access _copy_from_user and _copy_to_user so that it can skip the check_copy_size check in cases where the length is known at compile-time, mirroring the logic for when C code will skip check_copy_size. To do this, we ensure that exported versions of these methods are available when CONFIG_RUST is enabled. Alice has verified that this patch passes the CONFIG_TEST_USER_COPY test on x86 using the Android cuttlefish emulator. Signed-off-by: Arnd Bergmann Tested-by: Alice Ryhl Reviewed-by: Boqun Feng Reviewed-by: Kees Cook Signed-off-by: Alice Ryhl Acked-by: Andrew Morton Link: https://lore.kernel.org/r/20240528-alice-mm-v7-2-78222c31b8f4@google.com Signed-off-by: Miguel Ojeda commit 1b580e7b9ba2e5939c4b94da2cb4888605b39955 Author: Wedson Almeida Filho Date: Tue May 28 14:58:02 2024 +0000 rust: uaccess: add userspace pointers A pointer to an area in userspace memory, which can be either read-only or read-write. All methods on this struct are safe: attempting to read or write on bad addresses (either out of the bound of the slice or unmapped addresses) will return `EFAULT`. Concurrent access, *including data races to/from userspace memory*, is permitted, because fundamentally another userspace thread/process could always be modifying memory at the same time (in the same way that userspace Rust's `std::io` permits data races with the contents of files on disk). In the presence of a race, the exact byte values read/written are unspecified but the operation is well-defined. Kernelspace code should validate its copy of data after completing a read, and not expect that multiple reads of the same address will return the same value. These APIs are designed to make it difficult to accidentally write TOCTOU bugs. Every time you read from a memory location, the pointer is advanced by the length so that you cannot use that reader to read the same memory location twice. Preventing double-fetches avoids TOCTOU bugs. This is accomplished by taking `self` by value to prevent obtaining multiple readers on a given `UserSlice`, and the readers only permitting forward reads. If double-fetching a memory location is necessary for some reason, then that is done by creating multiple readers to the same memory location. Constructing a `UserSlice` performs no checks on the provided address and length, it can safely be constructed inside a kernel thread with no current userspace process. Reads and writes wrap the kernel APIs `copy_from_user` and `copy_to_user`, which check the memory map of the current process and enforce that the address range is within the user range (no additional calls to `access_ok` are needed). This code is based on something that was originally written by Wedson on the old rust branch. It was modified by Alice by removing the `IoBufferReader` and `IoBufferWriter` traits, and various other changes. Signed-off-by: Wedson Almeida Filho Reviewed-by: Benno Lossin Reviewed-by: Trevor Gross Reviewed-by: Boqun Feng Co-developed-by: Alice Ryhl Signed-off-by: Alice Ryhl Link: https://lore.kernel.org/r/20240528-alice-mm-v7-1-78222c31b8f4@google.com [ Wrapped docs to 100 and added a few intra-doc links. - Miguel ] Signed-off-by: Miguel Ojeda commit 5045b460843adf5bb31774b9464df5ae8e4da0d4 Author: John Hubbard Date: Thu Jun 27 17:43:56 2024 -0700 kbuild: rust-analyzer: improve comment documentation Replace the cryptic phrase ("IDE support targets") that initially appears to be about how to support old hard drives, with a few sentences that explain what "make rust-analyzer" provides. Signed-off-by: John Hubbard Reviewed-by: Finn Behrens Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20240628004356.1384486-3-jhubbard@nvidia.com [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda commit 6dc9d9ca9a728c8b30976d3ca353563ba0bfb949 Author: John Hubbard Date: Thu Jun 27 17:43:55 2024 -0700 kbuild: rust-analyzer: better error handling 1) Provide a better error message for the "Rust not available" case. Without this patch, one gets various misleading messages, such as: "No rule to make target 'rust-analyzer'" Instead, run scripts/rust_is_available.sh directly, as a prerequisite, and let that script report the cause of any problems, as well as providing a link to the documentation. Thanks to Miguel Ojeda for the idea of just letting rust_is_available.sh report its results directly. The new output in the failure case looks like this: $ make rust-analyzer *** *** Rust compiler 'rustc' could not be found. *** *** *** Please see Documentation/rust/quick-start.rst for details *** on how to set up the Rust support. *** make[1]: *** [/kernel_work/linux-github/Makefile:1975: rust-analyzer] Error 1 make: *** [Makefile:240: __sub-make] Error 2 Reviewed-by: Finn Behrens Reviewed-by: Alice Ryhl Tested-by: Alice Ryhl Signed-off-by: John Hubbard Link: https://lore.kernel.org/r/20240628004356.1384486-2-jhubbard@nvidia.com [ Reworded title. - Miguel ] Signed-off-by: Miguel Ojeda commit b63c455d38be5f62a0665f3080c67334db5b4c41 Author: Dirk Behme Date: Mon Jun 10 14:23:32 2024 +0200 docs: rust: no_std is used Using the #![no_std] attribute in the Rust kernel support is different to the default Rust usage. Mention this in the Documentation. Signed-off-by: Dirk Behme Reviewed-by: Trevor Gross Link: https://lore.kernel.org/r/20240610122332.3858571-1-dirk.behme@de.bosch.com [ Avoided breaking links in two lines. - Miguel ] Signed-off-by: Miguel Ojeda commit 58c53d43142f222221e5a76a7016c4d8f3b84b97 Author: Lorenzo Bianconi Date: Mon Jun 17 11:25:49 2024 +0200 clk: en7523: fix rate divider for slic and spi clocks Introduce div_offset field in en_clk_desc struct in order to fix rate divider estimation in en7523_get_div routine for slic and spi fixed rate clocks. Moreover, fix base_shift for crypto clock. Fixes: 1e6273179190 ("clk: en7523: Add clock driver for Airoha EN7523 SoC") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/c491bdea05d847f1f1294b94f14725d292eb95d0.1718615934.git.lorenzo@kernel.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd commit e0ee68a8bef9cf27e324a017691ee64b235c310e Author: Jakub Kicinski Date: Thu Jul 4 18:52:22 2024 -0700 selftests: net: ksft: interrupt cleanly on KeyboardInterrupt It's very useful to be able to interrupt the tests during development. Detect KeyboardInterrupt, run the cleanups and exit. Link: https://patch.msgid.link/20240705015222.675840-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ee98fb71baa8728156b4d75740f82cb0cfe6d923 Author: Zhigang Luo Date: Tue Jun 25 13:53:56 2024 -0400 drm/amdgpu: set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 to avoid reading wrong WPTR from doorbell in sriov vf, set CP_HQD_PQ_DOORBELL_CONTROL.DOORBELL_MODE to 1 to read WPTR from MQD. Signed-off-by: Zhigang Luo Acked-by: Lijo Lazar Signed-off-by: Alex Deucher commit 9e4c9ee0ba97a646298464a84314afe505f4c9b7 Author: Kent Russell Date: Thu Jul 4 10:51:44 2024 -0400 Documentation/amdgpu: Clarify MI200 and MI300 entries Add "Series" to MI200 and MI300 to clarify that they represent the series of cards, and to more closely match the product information materials. This also matches other entries in this list Also correct a typo in the MI300 codename (Vangaram->Vanjaram) Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 59f488be7631513acc9a266e9d006358545b7074 Author: Yang Wang Date: Wed Jul 3 10:23:13 2024 +0800 drm/amdgpu: add ras event state device attribute support add amdgpu ras 'event_state' sysfs device attribute support Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1dd34092c1f1fa1e9e3b0a294f7ea0658e676ae0 Author: Li Ma Date: Mon Jul 1 15:56:12 2024 +0800 drm/amd/swsmu: enable more Pstates profile levels for SMU v14.0.0 and v14.0.1 V1: This patch enables following UMD stable Pstates profile levels for power_dpm_force_performance_level interface. - profile_peak - profile_min_mclk - profile_min_sclk - profile_standard V2: Fix conflict with commit "drm/amd/pm: smu v14.0.4 reuse smu v14.0.0 dpmtable " V3: Add VCLK1 and DCLK1 support for SMU V14.0.1 And avoid to set VCLK1 and DCLK1 for SMU v14.0.0 Signed-off-by: Li Ma Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 12b435a40cb5b05378ca244a9d524b125b0c1f6d Author: Yang Wang Date: Fri Jun 28 16:24:39 2024 +0800 drm/amdgpu: add ras POSION_CONSUMPTION event id support add amdgpu ras POSION_CONSUMPTION event id support. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 91ba536ead3ad86952979b1944cf3b612a7f944a Author: Stanley.Yang Date: Wed Jul 3 15:34:35 2024 +0800 drm/amdkfd: Use mode1 reset for GFX v9.4.4 GFX v9.4.4 uses mode1 reset to handle poison consumption. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5b9de2596f17fb328945676293a956f3d7f53a9d Author: Yang Wang Date: Thu Jun 27 11:43:09 2024 +0800 drm/amdgpu: add ras POSION_CREATION event id support add amdgpu ras POSION_CREATION event id support. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 75ac6a250632d2fff62039ae728c842033dceddb Author: Yang Wang Date: Tue Jun 25 14:23:42 2024 +0800 drm/amdgpu: refine amdgpu ras event id core code v1: - use unified event id to manage ras events - add a new function amdgpu_ras_query_error_status_with_event() to accept event type as parameter. v2: add a warn log to show the location of function failure when calling amdgpu_ras_mark_event(). (Tao Zhou) v3: change RAS_EVENT_TYPE_ISR to RAS_EVENT_TYPE_FATAL. v4: rename amdgpu_ras_get_recovery_event() to amdgpu_ras_get_fatal_error_event(). Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e33697141bac18906345ea46533a240f1ad3cd21 Author: Wayne Lin Date: Thu May 23 12:18:07 2024 +0800 drm/amd/display: Solve mst monitors blank out problem after resume [Why] In dm resume, we firstly restore dc state and do the mst resume for topology probing thereafter. If we change dpcd DP_MSTM_CTRL value after LT in mst reume, it will cause light up problem on the hub. [How] Revert commit 202dc359adda ("drm/amd/display: Defer handling mst up request in resume"). And adjust the reason to trigger dc_link_detect by DETECT_REASON_RESUMEFROMS3S4. Cc: stable@vger.kernel.org Fixes: 202dc359adda ("drm/amd/display: Defer handling mst up request in resume") Signed-off-by: Wayne Lin Reviewed-by: Fangzhi Zuo Signed-off-by: Alex Deucher commit 320debca1ba3a81c87247eac84eff976ead09ee0 Author: Christian König Date: Fri Jan 19 14:57:29 2024 +0100 drm/amdgpu: reject gang submit on reserved VMIDs A gang submit won't work if the VMID is reserved and we can't flush out VM changes from multiple engines at the same time. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b6ad1091666732e8750357f9d2fb599f81bf6bff Author: Saleemkhan Jamadar Date: Thu Jul 4 15:19:35 2024 +0530 drm/amdgpu: enable dpg for vcn and jpeg on GC 11_5_2 DPG mode is enabled for vcn and jpeg on VCN v4_0_5 Signed-off-by: Saleemkhan Jamadar Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 332210c13ac0595c34516caf9a61430b45e16d21 Author: Yang Wang Date: Thu Jul 4 13:48:19 2024 +0800 drm/amdgpu: remove redundant semicolons in RAS_EVENT_LOG remove redundant semicolons in RAS_EVENT_LOG to avoid code format check warning. Fixes: b712d7c20133 ("drm/amdgpu: fix compiler 'side-effect' check issue for RAS_EVENT_LOG()") Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 54837bd2be229cc386298c5eab7d05f36f26e1fc Author: Frank Min Date: Thu May 30 15:01:59 2024 +0800 drm/amdgpu: restore dcc bo tilling configs while moving While moving buffer which has dcc tiling config, it is needed to restore its original dcc tiling. 1. extend copy flag to cover tiling bits 2. add logic to restore original dcc tiling config Signed-off-by: Frank Min Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c8714ac982e54e758eb937c0d82d4d265dd6e7f0 Author: Sunil Khatri Date: Thu Jun 27 18:13:11 2024 +0530 drm/amdgpu: add gfx queue support for gfx12 ipdump Add support of all the CP GFX queues for gfx12 ipdump to be used by devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 495e6173a4176ef578e8ada9f17e1685fe45d00d Author: Sunil Khatri Date: Thu Jun 27 18:39:55 2024 +0530 drm/amdgpu: add cp queue registers for gfx12 ipdump Add gfx12 support of CP queue registers for all queues to be used by devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit f0c6b79bfc9216bf0e4e35389d4e3e4fc7bbc2ad Author: Sunil Khatri Date: Wed Jul 3 23:04:11 2024 +0530 drm/amdgpu: enable redirection of irq's for IH v7.0 Enable redirection of irq for pagefaults for specific clients to avoid overflow without dropping interrupts. So here we redirect the interrupts to another IH ring i.e ring1 where only these interrupts are processed. Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 906219ec94d0a51e4929d6860789656bab02cfa5 Author: Sunil Khatri Date: Wed Jul 3 23:00:46 2024 +0530 drm:amdgpu: enable IH ring1 for IH v7.0 We need IH ring1 for handling the pagefault interrupts which over flow in default ring for specific usecases. Enable ring1 allows software to redirect high interrupts to ring1 from default IH ring. Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 33f23fc3155b13c4a96d94a0a22dc26db767440b Author: Yifan Zha Date: Thu Jun 27 15:06:23 2024 +0800 drm/amdgpu: Set no_hw_access when VF request full GPU fails [Why] If VF request full GPU access and the request failed, the VF driver can get stuck accessing registers for an extended period during the unload of KMS. [How] Set no_hw_access flag when VF request for full GPU access fails This prevents further hardware access attempts, avoiding the prolonged stuck state. Signed-off-by: Yifan Zha Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2262acad0ae911cd45b6cb976f803a74db9e9ea7 Author: Sunil Khatri Date: Thu Jun 27 12:25:46 2024 +0530 drm/amdgpu: add print support for gfx12 ipdump Add support of gfx12 ipdump print so devcoredump could trigger it to dump the captured registers in devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit fbbbb62112a8788f76e28bfb7e822bf33ab1075e Author: Sunil Khatri Date: Thu Jun 27 12:22:06 2024 +0530 drm/amdgpu: add gfx12 register support in ipdump Add general registers of gfx12 in ipdump for devcoredump support. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit ffcc5745ed56d5c4e7ddf2774ab7ad26e93143d2 Author: Frank Min Date: Thu Jun 20 13:57:55 2024 +0800 drm/amdgpu: update gfxhub client id for gfx12 update gfxhub client id for gfx12 Signed-off-by: Frank Min Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 064d92436b6924937ef414894d9174fa4465f788 Author: Tim Huang Date: Thu Jun 13 10:34:13 2024 +0800 drm/amd/pm: avoid to load smu firmware for APUs Certain call paths still load the SMU firmware for APUs, which needs to be skipped. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 78347b651aa5be8b48462c48fee7e8302dcc5819 Author: YiPeng Chai Date: Mon Jul 1 14:43:17 2024 +0800 drm/amdgpu: sysfs node disable query error count during gpu reset Sysfs node disable query error count during gpu reset. Signed-off-by: YiPeng Chai Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit ab44079e2869c9f1743d167d5f9b5befe375b6d9 Author: Alice Ryhl Date: Fri Jun 7 08:23:41 2024 +0000 rust: alloc: add __GFP_HIGHMEM flag Make it possible to allocate memory that doesn't need to mapped into the kernel's address space. This flag is useful together with Page::alloc_page [1]. Rust Binder needs this for the memory that holds incoming transactions for each process. Each process will have a few megabytes of memory allocated with this flag, which is mapped into the process using vm_insert_page. When the kernel copies data for an incoming transaction into a process's memory region, it will use kmap_local_page to temporarily map pages that are being modified. There is no need for them to take up address space in the kernel when the kernel is not writing an incoming transaction into the page. Link: https://lore.kernel.org/all/20240528-alice-mm-v7-4-78222c31b8f4@google.com/ [1] Signed-off-by: Alice Ryhl Link: https://lore.kernel.org/r/20240607-highmem-v1-1-d18c5ca4072f@google.com Signed-off-by: Miguel Ojeda commit d3ee24cce4e558041cbf21a5bc9cd9a4b1b3c7e7 Author: Alice Ryhl Date: Wed May 29 08:34:52 2024 +0000 rust: alloc: fix typo in docs for GFP_NOWAIT Fix a typo in alloc.rs by replacing Ror with For. Signed-off-by: Alice Ryhl Reviewed-by: Vincenzo Palazzo Link: https://lore.kernel.org/r/20240529083452.779865-1-aliceryhl@google.com Signed-off-by: Miguel Ojeda commit 9ffc80c819739ab60c42223c46b7351cec6a0e97 Author: Miguel Ojeda Date: Tue May 28 18:35:02 2024 +0200 kbuild: rust: remove now-unneeded `rusttest` custom sysroot handling Since we dropped our custom `alloc` in commit 9d0441bab775 ("rust: alloc: remove our fork of the `alloc` crate"), there is no need anymore to keep the custom sysroot hack. Thus delete it, which makes the target way simpler and faster too. This also means we are not using Cargo for anything at the moment, and that no download is required anymore, so update the main `Makefile` and the documentation accordingly. Link: https://lore.kernel.org/r/20240528163502.411600-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit fe7d9d804337180d2377f0654537970c6cd863f7 Author: Roland Xu Date: Thu May 23 00:08:46 2024 +0800 rust: kernel: make impl_has_work compatible with more generics Make the impl_has_work macro compatible with more complex generics such as lifetimes and const generic arguments. Signed-off-by: Roland Xu Link: https://lore.kernel.org/r/ME0P282MB4890A180B99490CC65EF64FDCCEB2@ME0P282MB4890.AUSP282.PROD.OUTLOOK.COM Suggested-by: Benno Lossin Link: https://github.com/Rust-for-Linux/linux/issues/1077 [ Wrapped message to 72 columns. - Miguel ] Signed-off-by: Miguel Ojeda commit 526c539452cec6e7e65776d5807e6c66dd65d636 Author: Nathan Chancellor Date: Fri May 17 19:06:15 2024 +0200 docs: rust: introduce the new kernel.org LLVM+Rust toolchains These combined LLVM+Rust toolchains are now available, thanks to Nathan Chancellor (ClangBuiltLinux). Thus introduce them in the Rust Quick Start guide. Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20240517170615.377786-1-ojeda@kernel.org Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda commit 7b34303d9dc4f9cf2ea64285bbea26cd01a112c2 Author: Javier Carrasco Date: Wed Jul 3 11:50:20 2024 +0200 clk: lpc32xx: Constify struct regmap_config `lpc32xx_scb_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240703-clk-const-regmap-v1-7-7d15a0671d6f@gmail.com Signed-off-by: Stephen Boyd commit db8061ef919aade4c8a0e0b6aec5944de488b314 Author: Javier Carrasco Date: Wed Jul 3 11:50:23 2024 +0200 clk: xilinx: Constify struct regmap_config `vcu_settings_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240703-clk-const-regmap-v1-10-7d15a0671d6f@gmail.com Signed-off-by: Stephen Boyd commit 90dc946059b7d346f077b870a8d8aaf03b4d0772 Author: Puranjay Mohan Date: Fri Jul 5 14:50:09 2024 +0000 selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep fexit_sleep test runs successfully now on the BPF CI so remove it from the deny list. ftrace direct calls was blocking tracing programs on arm64 but it has been resolved by now. For more details see also discussion in [*]. Signed-off-by: Puranjay Mohan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240705145009.32340-1-puranjay@kernel.org [*] commit 549d3c2ffbea44fe123a67983fd8b15ab6989d8d Author: FUJITA Tomonori Date: Wed May 1 21:35:48 2024 +0900 rust: add 'firmware' field support to module! macro This adds 'firmware' field support to module! macro, corresponds to MODULE_FIRMWARE macro. You can specify the file names of binary firmware that the kernel module requires. The information is embedded in the modinfo section of the kernel module. For example, a tool to build an initramfs uses this information to put the firmware files into the initramfs image. Signed-off-by: FUJITA Tomonori Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20240501123548.51769-1-fujita.tomonori@gmail.com Signed-off-by: Miguel Ojeda commit 63249a070eb5187d5caec995d171b53e374a0741 Author: Aswin Unnikrishnan Date: Sun May 12 11:23:21 2024 +0000 rust: fix datatype in docs for `module` macro arguments Remove the mention of byte array as datatype for `module` macro arguments since the arguments are defined as string, and `alias` is a string array. Signed-off-by: Aswin Unnikrishnan Reviewed-by: Vincenzo Palazzo Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20240512112324.8514-2-aswinunni01@gmail.com Signed-off-by: Miguel Ojeda commit 67f9c312b0a7f4bc869376d2a68308e673235954 Author: Aswin Unnikrishnan Date: Sun May 12 11:23:20 2024 +0000 rust: add example for `alias` argument in `module` macro documentation Add example for `alias` argument supported by `module` macro. `alias` accepts an array of alternate names for the module as string. Reviewed-by: Alice Ryhl Signed-off-by: Aswin Unnikrishnan Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20240512112324.8514-1-aswinunni01@gmail.com Signed-off-by: Miguel Ojeda commit 19a01155ddfe525e3a4e7cef734f18cce640b1ef Author: Uwe Kleine-König Date: Mon Jul 8 17:09:12 2024 +0200 ipmi: 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 at it, also remove commas after the sentinel entries. Signed-off-by: Uwe Kleine-König Message-Id: <20240708150914.18190-2-u.kleine-koenig@baylibre.com> Signed-off-by: Corey Minyard commit cb52b5c8b81bfbc34df13537d82cd1849725d6c7 Author: Oliver Upton Date: Mon Jul 8 19:50:51 2024 +0000 Revert "KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity" This reverts commit eb9d53d4a949c6d6d7c9f130e537f6b5687fedf9. As Marc pointed out on the list [*], this patch is wrong, and those who find themselves in the SOB chain should have their heads checked. Annoyingly, the architecture has some FGT trap bits that are negative (i.e. 0 implies trap), and there was some confusion how KVM handles this for nested guests. However, it is clear now that KVM honors the RES0-ness of FGT traps already, meaning traps for features never exposed to the guest hypervisor get handled at L0. As they should. Link: https://lore.kernel.org/kvmarm/86bk3c3uss.wl-maz@kernel.org/T/#mb9abb3dd79f6a4544a91cb35676bd637c3a5e836 Signed-off-by: Oliver Upton commit a4dd55f8c2c06e2741a74e49b95b6db0a772e345 Merge: 276d7eab387a6 cfcd6c46fec46 Author: Arnd Bergmann Date: Mon Jul 8 21:35:03 2024 +0200 Merge tag 'tegra-for-6.11-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Changes for v6.11-rc1 This is a simple change that condenses two function calls into one in two places to save some boilerplate. * tag 'tegra-for-6.11-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Simplify resource lookup Link: https://lore.kernel.org/r/20240628210818.3627404-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 43528789a0b9df73b318e9e8cbab3138d0187f2c Merge: fa38c957982fe d8a7d89abb091 Author: Arnd Bergmann Date: Mon Jul 8 21:33:23 2024 +0200 Merge tag 'riscv-config-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/defconfig RISC-V config update for v6.11 StarFive: Enable most of the options needed for the jh7100 based boards to be properly testable with defconfig. Signed-off-by: Conor Dooley * tag 'riscv-config-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: defconfig: Enable StarFive JH7110 drivers Link: https://lore.kernel.org/r/20240707-unused-outflank-aa127ccb2cfe@spud Signed-off-by: Arnd Bergmann commit fa38c957982fe581bf0d34679b9856b759c10cc5 Merge: 31f62c5d88115 f5a27053293fa Author: Arnd Bergmann Date: Mon Jul 8 21:32:07 2024 +0200 Merge tag 'qcom-arm64-defconfig-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig Qualcomm Arm64 defconfig updates for v6.11 This enables the newly introduce Shared Memory Bridge driver which improves the mechansim with which buffers are shared with TrustZone. It turns MSM8996, SM8150 and SM8350 interconnect providers to builtin, as debug UART now depends on these. The SM8350 GPU clock controller is enabled. The secure QFPROM driver is enabled, to provide access to OTP configuration for the LLCC driver on the QDU1000 platform. * tag 'qcom-arm64-defconfig-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable SHM Bridge support for the TZ memory allocator arm64: defconfig: Enable secure QFPROM driver arm64: defconfig: enable several Qualcomm interconnects arm64: defconfig: make CONFIG_INTERCONNECT_QCOM_SM8350 built-in arm64: defconfig: enable CONFIG_SM_GPUCC_8350 Link: https://lore.kernel.org/r/20240706155347.16207-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 31f62c5d88115df9fb3c1dd95f6a446bb154c0db Merge: d7d906675de29 e05bc47431033 Author: Arnd Bergmann Date: Mon Jul 8 21:31:34 2024 +0200 Merge tag 'ti-k3-config-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig TI K3 defconfig updates for v6.11 Enable Hyperbus support present on various J7xx EVMs OMAP_USB2 driver for AM65 SoC LP873X PMIC related drivers for am642-phyboard-electra * tag 'ti-k3-config-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable TI LP873X PMIC arm64: defconfig: Enable USB2 PHY Driver arm64: defconfig: Enable MTD support for Hyperbus Link: https://lore.kernel.org/r/c6b2a0c3-e8c3-4e7a-90ca-a3b9834c63c9@ti.com Signed-off-by: Arnd Bergmann commit d7d906675de29eb4cd088b3ff68670acad4937a4 Author: Christophe Roullier Date: Fri Jul 5 15:44:07 2024 +0200 ARM: multi_v7_defconfig: Add MCP23S08 pinctrl support Enable MCP23S08 I/O expanders to manage Ethernet PHY reset in STM32MP135F-DK board. Signed-off-by: Christophe Roullier Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20240705134407.2833659-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann commit 18c18b1ff6c648ea62571554dfd698110757f894 Author: Thorsten Blum Date: Sun Jun 30 01:36:09 2024 +0200 gcc-plugins: Remove duplicate included header file stringpool.h The header file stringpool.h is included for GCC version >= 8 and then again for all versions. Since the header file stringpool.h was added in GCC 4.9 and the kernel currently requires GCC 5.1 as a minimum, remove the conditional include. Including the header file only once removes the following warning reported by make includecheck: stringpool.h is included more than once However, it's important to include stringpool.h before attribs.h because attribs.h uses some of its functions. Compile-tested with GCC 14. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240629233608.278028-2-thorsten.blum@toblux.com Signed-off-by: Kees Cook commit 50b040ef373293b4ae2ecdc5873daa4656724868 Author: Bert Karwatzki Date: Sun Jul 7 20:38:28 2024 +0200 PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled If of_platform_populate() is called when CONFIG_OF is not defined this leads to spurious error messages of the following type: pci 0000:00:01.1: failed to populate child OF nodes (-19) pci 0000:00:02.1: failed to populate child OF nodes (-19) Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node") Signed-off-by: Bert Karwatzki Closes: https://lore.kernel.org/all/20240702173255.39932-1-superm1@kernel.org/ Reviewed-by: Lukas Wunner Acked-by: Krzysztof Wilczyński Reported-by: Praveenkumar Patil Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240707183829.41519-1-spasswolf@web.de Signed-off-by: Bartosz Golaszewski commit bf288bd25d6232310abb81db417376ce460eb032 Author: Lorenzo Bianconi Date: Thu Jun 27 13:04:25 2024 +0200 clk: en7523: Remove PCIe reset open drain configuration for EN7581 PCIe reset open drain configuration will be managed by pinctrl driver. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/43276af5f08a554b4ab2e52e8d437fff5c06a732.1719485847.git.lorenzo@kernel.org Signed-off-by: Stephen Boyd commit db7a4a11e8be375b0a9c159f688e0cea49eacc5d Author: Lorenzo Bianconi Date: Thu Jun 27 13:04:24 2024 +0200 clk: en7523: Remove pcie prepare/unpreare callbacks for EN7581 SoC Get rid of prepare and unpreare callbacks for PCIe clock since they can be modeled as a reset line cosumed by the PCIe driver (pcie-mediatek-gen3) Reviewed-by: AngeloGioacchino Del Regno Tested-by: Zhengping Zhang Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/16df149975514d3030499c48fc1c64f090093595.1719485847.git.lorenzo@kernel.org Signed-off-by: Stephen Boyd commit e0d8ea4ed5fa70fd085a54d0b574a044b9407c39 Author: Lorenzo Bianconi Date: Thu Jun 27 13:04:23 2024 +0200 clk: en7523: Add reset-controller support for EN7581 SoC Introduce reset API support to EN7581 clock driver. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Zhengping Zhang Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/4f735d17e549ea53769bf5a3f50406debb879a44.1719485847.git.lorenzo@kernel.org Signed-off-by: Stephen Boyd commit 7aa291962f4c3b7afb9a12fa60b406b95e5eacb4 Author: Lorenzo Bianconi Date: Thu Jun 27 13:04:22 2024 +0200 dt-bindings: clock: airoha: Add reset support to EN7581 clock binding Introduce reset capability to EN7581 device-tree clock binding documentation. Add reset register mapping between misc scu and pb scu ones in order to follow the memory order. This change is not introducing any backward compatibility issue since the EN7581 dts is not upstream yet. Fixes: 0a382be005cf ("dt-bindings: clock: airoha: add EN7581 binding") Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring (Arm) Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/28fef3e83062d5d71e7b4be4b47583f851a15bf8.1719485847.git.lorenzo@kernel.org Signed-off-by: Stephen Boyd commit 6681afbb9cce51d49769a714a4efaffcaf3c9a1e Author: AngeloGioacchino Del Regno Date: Wed Jun 19 10:53:21 2024 +0200 dt-bindings: clock: mediatek: Document reset cells for MT8188 sys The MT8188 sys clocks embed a reset controller: add #reset-cells to the binding to allow using resets. Fixes: 1086a5310f9c ("dt-bindings: clock: mediatek: Add new MT8188 clock") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240619085322.66716-2-angelogioacchino.delregno@collabora.com Acked-by: Conor Dooley Signed-off-by: Stephen Boyd commit 7f294d10eb13bd5b09fa1dc9abe60d22974a2a20 Author: Alper Nebi Yasak Date: Wed Jun 12 23:11:00 2024 +0300 clk: mediatek: mt8173-infracfg: Handle unallocated infracfg when module The MT8173 infracfg clock driver does initialization in two steps, via a CLK_OF_DECLARE_DRIVER declaration. However its early init function doesn't get to run when it's built as a module, presumably since it's not loaded by the time it would have been called by of_clk_init(). This causes its second-step probe() to return -ENOMEM when trying to register clocks, as the necessary clock_data struct isn't initialized by the first step. MT2701 and MT6797 clock drivers also use this mechanism, but they try to allocate the necessary clock_data structure if missing in the second step. Mimic that for the MT8173 infracfg clock as well to make it work as a module. Signed-off-by: Alper Nebi Yasak Link: https://lore.kernel.org/r/20240612201211.91683-1-alpernebiyasak@gmail.com Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd commit 9f7809c6a8824b7147595b3c36e633ffc81fe2ab Author: Christian Marangi Date: Fri Jun 28 12:55:41 2024 +0200 dt-bindings: clock: mediatek: add syscon compatible for mt7622 pciesys Add required syscon compatible for mt7622 pciesys. This is required for SATA interface as the regs are shared. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240628105542.5456-2-ansuelsmth@gmail.com Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit db469084e3abbcbc21103157c73beeee703e9869 Author: Stanislav Jakubek Date: Thu Jul 4 19:48:54 2024 +0200 dt-bindings: clock: sprd,sc9860-clk: convert to YAML Convert the Spreadtrum SC9860 clock bindings to DT schema. Signed-off-by: Stanislav Jakubek Link: https://lore.kernel.org/r/ZobghvwZAyMjl4eB@standask-GA-A55M-S2HP Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit 0d796569e13b7b2d2a98880d3f0968dff8105f07 Author: Frank Li Date: Mon Jul 1 16:58:08 2024 -0400 dt-bindings: clock: qoriq-clock: convert to yaml format Convert qoria-clock DT binding to yaml format. Split to two files qoriq-clock.yaml and qoriq-clock-legancy.yaml. Addtional change: - Remove clock consumer part in example - Fixed example dts error - Deprecated legancy node - fsl,b4420-clockgen and fsl,b4860-clockgen fallback to fsl,b4-clockgen. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240701205809.1978389-1-Frank.Li@nxp.com Reviewed-by: Rob Herring (Arm) Signed-off-by: Stephen Boyd commit 54cb3bb483379b0c070528974843e06aecbc9390 Merge: 1613e604df0cd 48cf7e01386e7 Author: Stephen Boyd Date: Mon Jul 8 11:46:31 2024 -0700 Merge tag 'riscv-sg2042-clk-for-v6.11' of https://github.com/sophgo/linux into clk-sophgo Pull RISC-V SG2042 clock driver changes from Chen Wang: - Add sg2042 clk driver * tag 'riscv-sg2042-clk-for-v6.11' of https://github.com/sophgo/linux: clk: sophgo: Add SG2042 clock driver dt-bindings: clock: sophgo: add clkgen for SG2042 dt-bindings: clock: sophgo: add RP gate clocks for SG2042 dt-bindings: clock: sophgo: add pll clocks for SG2042 commit 04718d1e4dbfd94d3fe2d4e77d5d1c607beb340d Merge: 1613e604df0cd d89e8096957e3 Author: Stephen Boyd Date: Mon Jul 8 11:34:41 2024 -0700 Merge tag 'v6.11-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: - Export more clocks for Rockchip rk3128 peripherals - Convert Rockchip clk drivers to use kmemdup_array() - Drop CLK_NR_CLKS from Rockchip rk3128 and rk3188 binding headers * tag 'v6.11-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: dt-bindings: clock: rk3188-cru-common: remove CLK_NR_CLKS clk: rockchip: rk3188: Drop CLK_NR_CLKS usage clk: rockchip: Switch to use kmemdup_array() clk: rockchip: rk3128: Add HCLK_SFC dt-bindings: clock: rk3128: Add HCLK_SFC dt-bindings: clock: rk3128: Drop CLK_NR_CLKS clk: rockchip: rk3128: Drop CLK_NR_CLKS usage clk: rockchip: rk3128: Add hclk_vio_h2p to critical clocks clk: rockchip: rk3128: Export PCLK_MIPIPHY dt-bindings: clock: rk3128: Add PCLK_MIPIPHY commit 01a0a6cc8cfd9952e72677d48d56cf6bc4e3a561 Author: Stephen Boyd Date: Thu May 2 15:47:02 2024 -0700 clk: qcom: Park shared RCGs upon registration There's two problems with shared RCGs. The first problem is that they incorrectly report the parent after commit 703db1f5da1e ("clk: qcom: rcg2: Cache CFG register updates for parked RCGs"). That's because the cached CFG register value needs to be populated when the clk is registered. clk_rcg2_shared_enable() writes the cached CFG register value 'parked_cfg'. This value is initially zero due to static initializers. If a driver calls clk_enable() before setting a rate or parent, it will set the parent to '0' which is (almost?) always XO, and may not reflect the parent at registration. In the worst case, this switches the RCG from sourcing a fast PLL to the slow crystal speed. The second problem is that the force enable bit isn't cleared. The force enable bit is only used during parking and unparking of shared RCGs. Otherwise it shouldn't be set because it keeps the RCG enabled even when all the branches on the output of the RCG are disabled (the hardware has a feedback mechanism so that any child branches keep the RCG enabled when the branch enable bit is set). This problem wastes power if the clk is unused, and is harmful in the case that the clk framework disables the parent of the force enabled RCG. In the latter case, the GDSC the shared RCG is associated with will get wedged if the RCG's source clk is disabled and the GDSC tries to enable the RCG to do "housekeeping" while powering on. Both of these problems combined with incorrect runtime PM usage in the display driver lead to a black screen on Qualcomm sc7180 Trogdor chromebooks. What happens is that the bootloader leaves the 'disp_cc_mdss_rot_clk' enabled and the 'disp_cc_mdss_rot_clk_src' force enabled and parented to 'disp_cc_pll0'. The mdss driver probes and runtime suspends, disabling the mdss_gdsc which uses the 'disp_cc_mdss_rot_clk_src' for "housekeeping". The 'disp_cc_mdss_rot_clk' is disabled during late init because the clk is unused, but the parent 'disp_cc_mdss_rot_clk_src' is still force enabled because the force enable bit was never cleared. Then 'disp_cc_pll0' is disabled because it is also unused. That's because the clk framework believes the parent of the RCG is XO when it isn't. A child device of the mdss device (e.g. DSI) runtime resumes mdss which powers on the mdss_gdsc. This wedges the GDSC because 'disp_cc_mdss_rot_clk_src' is parented to 'disp_cc_pll0' and that PLL is off. With the GDSC wedged, mdss_runtime_resume() tries to enable 'disp_cc_mdss_mdp_clk' but it can't because the GDSC has wedged all the clks associated with the GDSC causing clks to stay stuck off. This leads to the following warning seen at boot and a black screen because the display driver fails to probe. disp_cc_mdss_mdp_clk status stuck at 'off' WARNING: CPU: 1 PID: 81 at drivers/clk/qcom/clk-branch.c:87 clk_branch_toggle+0x114/0x168 Modules linked in: CPU: 1 PID: 81 Comm: kworker/u16:4 Not tainted 6.7.0-g0dd3ee311255 #1 f5757d475795053fd2ad52247a070cd50dd046f2 Hardware name: Google Lazor (rev1 - 2) with LTE (DT) Workqueue: events_unbound deferred_probe_work_func pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : clk_branch_toggle+0x114/0x168 lr : clk_branch_toggle+0x110/0x168 sp : ffffffc08084b670 pmr_save: 00000060 x29: ffffffc08084b680 x28: ffffff808006de00 x27: 0000000000000001 x26: ffffff8080dbd4f4 x25: 0000000000000000 x24: 0000000000000000 x23: 0000000000000000 x22: ffffffd838461198 x21: ffffffd838007997 x20: ffffffd837541d5c x19: 0000000000000001 x18: 0000000000000004 x17: 0000000000000000 x16: 0000000000000010 x15: ffffffd837070fac x14: 0000000000000003 x13: 0000000000000004 x12: 0000000000000001 x11: c0000000ffffdfff x10: ffffffd838347aa0 x9 : 08dadf92e516c000 x8 : 08dadf92e516c000 x7 : 0000000000000000 x6 : 0000000000000027 x5 : ffffffd8385a61f2 x4 : 0000000000000000 x3 : ffffffc08084b398 x2 : ffffffc08084b3a0 x1 : 00000000ffffdfff x0 : 00000000fffffff0 Call trace: clk_branch_toggle+0x114/0x168 clk_branch2_enable+0x24/0x30 clk_core_enable+0x5c/0x1c8 clk_enable+0x38/0x58 clk_bulk_enable+0x40/0xb0 mdss_runtime_resume+0x68/0x258 pm_generic_runtime_resume+0x30/0x44 __genpd_runtime_resume+0x30/0x80 genpd_runtime_resume+0x124/0x214 __rpm_callback+0x7c/0x15c rpm_callback+0x30/0x88 rpm_resume+0x390/0x4d8 rpm_resume+0x43c/0x4d8 __pm_runtime_resume+0x54/0x98 __device_attach+0xe0/0x170 device_initial_probe+0x1c/0x28 bus_probe_device+0x48/0xa4 device_add+0x52c/0x6fc mipi_dsi_device_register_full+0x104/0x1a8 devm_mipi_dsi_device_register_full+0x28/0x78 ti_sn_bridge_probe+0x1dc/0x2bc auxiliary_bus_probe+0x4c/0x94 really_probe+0xf8/0x270 __driver_probe_device+0xa8/0x130 driver_probe_device+0x44/0x104 __device_attach_driver+0xa4/0xcc bus_for_each_drv+0x94/0xe8 __device_attach+0xf8/0x170 device_initial_probe+0x1c/0x28 bus_probe_device+0x48/0xa4 deferred_probe_work_func+0x9c/0xd8 Fix these problems by parking shared RCGs at boot. This will properly initialize the parked_cfg struct member so that the parent is reported properly and ensure that the clk won't get stuck on or off because the RCG is parented to the safe source (XO). Fixes: 703db1f5da1e ("clk: qcom: rcg2: Cache CFG register updates for parked RCGs") Reported-by: Stephen Boyd Closes: https://lore.kernel.org/r/1290a5a0f7f584fcce722eeb2a1fd898.sboyd@kernel.org Closes: https://issuetracker.google.com/319956935 Reported-by: Laura Nao Closes: https://lore.kernel.org/r/20231218091806.7155-1-laura.nao@collabora.com Cc: Bjorn Andersson Cc: Dmitry Baryshkov Cc: Douglas Anderson Cc: Taniya Das Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20240502224703.103150-1-swboyd@chromium.org Reviewed-by: Douglas Anderson Tested-by: Nícolas F. R. A. Prado Signed-off-by: Stephen Boyd commit 54e49a3c9d093c6b5c4ee541b9dea9e1a901fa77 Merge: 0c6c65111ed3b 4359caadd17fb Author: Mark Brown Date: Mon Jul 8 19:30:39 2024 +0100 ASoC: fsl-asoc-card: add S/PDIF controller support Merge series from Elinor Montmasson : This is a series of patches aiming to make the machine driver `fsl-asoc-card` compatible with S/PDIF controllers on imx boards. The main goal is to allow the use of S/PDIF controllers with ASRC modules. The `imx-spdif` machine driver already has specific support for S/PDIF controllers but doesn't support using an ASRC with it. However, the `fsl-asoc-card` machine driver has the necessary code to create a sound card which can use an ASRC module. It is then possible to extend the support for S/PDIF audio cards by merging the `imx-spdif` driver into `fsl-asoc-card`. The first three patches adapt the `fsl-asoc-card` driver to support multiple codec use cases. The driver can get 2 codec phandles from the device tree, and codec-related variables are doubled. `for_each_codecs` macros are also used when possible to ease adding other multi-codec use cases in the future. It makes possible to use the two S/PDIF dummy codec drivers `spdif_receiver` and `spdif_transmitter` instead of `snd-soc-dummy`, which was used in `imx-spdif`. The fourth patch merges the S/PDIF support from `imx-spdif` to `fsl-asoc-card`. `fsl-asoc-card` offers the same functionalities as `imx-spdif` did, but this merge also extends the S/PDIF support with the possibility of using an ASRC. Compatible "fsl,imx-audio-spdif" is kept, but `fsl-asoc-card` uses different DT properties compared to `imx-spdif`: * The "spdif-controller" property from `imx-spdif` is named "audio-cpu" in `fsl-asoc-card`. * `fsl-asoc-card` uses codecs explicitly declared in DT with "audio-codec". With an S/PDIF, codec drivers `spdif_transmitter` and `spdif_receiver` should be used. Driver `imx-spdif` used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". Backward compatibility is therefore implemented in `fsl-asoc-card`. However, it is recommended to use the new properties when needed. Especially, declaring and using S/PDIF transmitter and/or receiver nodes is better than using the dummy codec. The last three patches update the device tree bindings of `fsl-asoc-card` and update all in-tree device trees to use the `fsl-asoc-card` properties. Note that as the old properties are still supported: * previous versions of in-tree device trees are still supported. * out-of-tree device trees are still supported. This series of patches was successfully built for arm64 and x86 on top of the latest "for-next" branch of the ASoC git tree on the 26th of June 2024. These modifications have also been tested on an i.MX8MN evaluation board with a linux kernel RT v6.1.26-rt8. commit a3123341dc358952ce2bf8067fbdfb7eaadf71bb Author: Gaosheng Cui Date: Sat Jul 6 14:50:08 2024 +0800 gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey If we fail to call crypto_sync_skcipher_setkey, we should free the memory allocation for cipher, replace err_return with err_free_cipher to free the memory of cipher. Fixes: 4891f2d008e4 ("gss_krb5: import functionality to derive keys into the kernel") Signed-off-by: Gaosheng Cui Reviewed-by: Simon Horman Signed-off-by: Chuck Lever commit f436833a3dc1d767aa754010bc8e6f341dba2544 Author: Chuck Lever Date: Mon Jun 24 17:14:16 2024 -0400 MAINTAINERS: Add a bugzilla link for NFSD I recently found out about B: for noting where subsystem bugs can be filed. I do pay attention to bugzilla.kernel.org. The Linux NFS community has decided to steer kernel NFS issues to the kernel.org bugzilla instead of bugzilla.linux-nfs.org. Remove the W: entry; the sourceforge information is stale and unmaintained. Cc: Thorsten Leemhuis Signed-off-by: Chuck Lever commit 00506072d70829196849e835ee4ef0b350b61fb9 Author: Jeff Layton Date: Fri Jun 14 08:59:10 2024 -0400 nfsd: new netlink ops to get/set server pool_mode Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 5f71f3c325534da55dfda487a67208e2e0f0cd1b Author: Jeff Layton Date: Thu Jun 13 14:34:33 2024 -0400 sunrpc: refactor pool_mode setting code Allow the pool_mode setting code to be called from internal callers so we can call it from a new netlink op. Add a new svc_pool_map_get function to return the current setting. Change the existing module parameter handling to use the new interfaces under the hood. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 7f5c330b2620aaee668b206b8876300745c98221 Author: Jeff Layton Date: Thu Jun 13 14:34:32 2024 -0400 nfsd: allow passing in array of thread counts via netlink Now that nfsd_svc can handle an array of thread counts, fix up the netlink threads interface to construct one from the netlink call and pass it through so we can start a pooled server the same way we would start a normal one. Note that any unspecified values in the array are considered zeroes, so it's possible to shut down a pooled server by passing in a short array that has only zeros, or even an empty array. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit b4d8f228915f98f09974ef84ec028cbfe7a84273 Author: Jeff Layton Date: Thu Jun 13 14:34:31 2024 -0400 nfsd: make nfsd_svc take an array of thread counts Now that the refcounting is fixed, rework nfsd_svc to use the same thread setup as the pool_threads interface. Have it take an array of thread counts instead of just a single value, and pass that from the netlink threads set interface. Since the new netlink interface doesn't have the same restriction as pool_threads, move the guard against shutting down all threads to write_pool_threads. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 8e0c8d23952f338180d19718195d4f9fd10a1809 Author: Jeff Layton Date: Thu Jun 13 14:34:30 2024 -0400 sunrpc: fix up the special handling of sv_nrpools == 1 Only pooled services take a reference to the svc_pool_map. The sunrpc code has always used the sv_nrpools value to detect whether the service is pooled. The problem there is that nfsd is a pooled service, but when it's running in "global" pool_mode, it doesn't take a reference to the pool map because it has a sv_nrpools value of 1. This means that we have two separate codepaths for starting the server, depending on whether it's pooled or not. Fix this by adding a new flag to the svc_serv, that indicates whether the serv is pooled. With this we can have the nfsd service unconditionally take a reference, regardless of pool_mode. Note that this is a behavior change for /sys/module/sunrpc/parameters/pool_mode. Usually this file does not allow you to change the pool-mode while there are nfsd threads running, but if the pool-mode is "global" it's allowed. My assumption is that this is a bug, since it probably should never have worked this way. This patch changes the behavior such that you get back EBUSY even when nfsd is running in global mode. I think this is more reasonable behavior, and given that most people set this today using the module parameter, it's doubtful anyone will notice. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 3a6adfcae8c4ac45f19c141958e8778359f40173 Author: Chuck Lever Date: Wed Jun 12 10:48:21 2024 -0400 SUNRPC: Add a trace point in svc_xprt_deferred_close The trace point in svc_xprt_close() reports only some local close requests. Try to capture more local close requests. Note that "trace-cmd record -T -e sunrpc:svc_xprt_close" will neatly capture the identity of the caller requesting the close. Signed-off-by: Chuck Lever commit abc02e5602f7bf9bbae1e8999570a2ad5114578c Author: Chuck Lever Date: Tue Jun 11 15:36:46 2024 -0400 NFSD: Support write delegations in LAYOUTGET I noticed LAYOUTGET(LAYOUTIOMODE4_RW) returning NFS4ERR_ACCESS unexpectedly. The NFS client had created a file with mode 0444, and the server had returned a write delegation on the OPEN(CREATE). The client was requesting a RW layout using the write delegation stateid so that it could flush file modifications. Creating a read-only file does not seem to be problematic for NFSv4.1 without pNFS, so I began looking at NFSD's implementation of LAYOUTGET. The failure was because fh_verify() was doing a permission check as part of verifying the FH presented during the LAYOUTGET. It uses the loga_iomode value to specify the @accmode argument to fh_verify(). fh_verify(MAY_WRITE) on a file whose mode is 0444 fails with -EACCES. To permit LAYOUT* operations in this case, add OWNER_OVERRIDE when checking the access permission of the incoming file handle for LAYOUTGET and LAYOUTCOMMIT. Cc: Christoph Hellwig Cc: stable@vger.kernel.org # v6.6+ Message-Id: 4E9C0D74-A06D-4DC3-A48A-73034DC40395@oracle.com Reviewed-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: Chuck Lever commit e5d85ec52b1158ea6ea4834e5372bd7ba5862ffa Author: Andy Shevchenko Date: Wed May 8 18:19:38 2024 +0300 lockd: Use *-y instead of *-objs in Makefile *-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Andy Shevchenko Reviewed-by: Benjamin Coddington Signed-off-by: Chuck Lever commit 18a5450684c312e98eb2253f0acf88b3f780af20 Author: Chuck Lever Date: Tue Jun 4 11:24:00 2024 -0400 NFSD: Fix nfsdcld warning Since CONFIG_NFSD_LEGACY_CLIENT_TRACKING is a new config option, its initial default setting should have been Y (if we are to follow the common practice of "default Y, wait, default N, wait, remove code"). Paul also suggested adding a clearer remedy action to the warning message. Reported-by: Paul Menzel Message-Id: Fixes: 74fd48739d04 ("nfsd: new Kconfig option for legacy client tracking") Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit d1b586e75ec619dde1af47e21a41a6b1b51874c2 Author: Chuck Lever Date: Fri May 31 09:15:53 2024 -0400 svcrdma: Handle ADDR_CHANGE CM event properly Sagi tells me that when a bonded device reports an address change, the consumer must destroy its listener IDs and create new ones. See commit a032e4f6d60d ("nvmet-rdma: fix bonding failover possible NULL deref"). Suggested-by: Sagi Grimberg Reviewed-by: Sagi Grimberg Signed-off-by: Chuck Lever commit 283d28546234b1764a0a37cb3df30cc3321c75b4 Author: Chuck Lever Date: Fri May 31 09:15:52 2024 -0400 svcrdma: Refactor the creation of listener CMA ID In a moment, I will add a second consumer of CMA ID creation in svcrdma. Refactor so this code can be reused. Reviewed-by: Sagi Grimberg Signed-off-by: Chuck Lever commit 022d0574eff0b9093fec5a515c00638eefec6474 Author: Dr. David Alan Gilbert Date: Fri May 31 01:08:38 2024 +0100 NFSD: remove unused structs 'nfsd3_voidargs' 'nfsd3_voidargs' in nfs[23]acl.c is unused since commit 788f7183fba8 ("NFSD: Add common helpers to decode void args and encode void results"). Remove them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit dbc834e5db447bcc5d77fa76a46897c4f206a5a4 Author: Dan Carpenter Date: Thu May 9 13:48:28 2024 +0300 NFSD: harden svcxdr_dupstr() and svcxdr_tmpalloc() against integer overflows These lengths come from xdr_stream_decode_u32() and so we should be a bit careful with them. Use size_add() and struct_size() to avoid integer overflows. Saving size_add()/struct_size() results to a u32 is unsafe because it truncates away the high bits. Also generally storing sizes in longs is safer. Most systems these days use 64 bit CPUs. It's harder for an addition to overflow 64 bits than it is to overflow 32 bits. Also functions like vmalloc() can successfully allocate UINT_MAX bytes, but nothing can allocate ULONG_MAX bytes. Signed-off-by: Dan Carpenter Signed-off-by: Chuck Lever commit ef0ae098a13eb2299e1b34fc4aeea1d756ccec16 Merge: 1613e604df0cd f27e42c7d3ff8 Author: Stephen Boyd Date: Mon Jul 8 10:57:49 2024 -0700 Merge tag 'qcom-clk-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: - Add clk drivers for Qualcomm SM7150 camera, display and video - Add Qualcomm QCM2290 GPU clk driver - Add Qualcomm QCS8386/QCS8084 NSS clk driver - Add Qualcomm SM8650 camera and video drivers - Make qcom_cc_really_probe() take a struct device to allow reuse in non-platform-drivers - Introduce prepare-only branch clock ops in the qcom clk driver to support clocks on buses that take locks - Describe parent/child relationship for Qualcomm SC7280 camera GDSCs - Support Qualcomm Huayra 2290 alpha PLL - Adjust the highest SDCC clock frequency on Qualcomm IPQ6018 to match HS200 support - Add missing PCIe PIPE clocks on Qualcomm IPQ9574 - Fix various configurations and properties in the Qualcomm SA8775P, X1E80100 and SM7280 drivers - Park Qualcomm SM8350 GPU RCGs on XO while disabled - Remove unused CONFIG_QCOM_RPMCC Kconfig symbol - Add missing MODULE_DESCRIPTIONs to some qcom clk drivers * tag 'qcom-clk-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (61 commits) clk: qcom: gcc-x1e80100: Fix halt_check for all pipe clocks clk: qcom: gcc-ipq6018: update sdcc max clock frequency clk: qcom: camcc-sm8650: Add SM8650 camera clock controller driver dt-bindings: clock: qcom: Add SM8650 camera clock controller dt-bindings: clock: qcom: Update the order of SC8280XP camcc header clk: qcom: videocc-sm8550: Add SM8650 video clock controller clk: qcom: videocc-sm8550: Add support for videocc XO clk ares dt-bindings: clock: qcom: Add SM8650 video clock controller dt-bindings: clock: qcom: Update SM8450 videocc header file name clk: qcom: gpucc-sa8775p: Update wait_val fields for GPU GDSC's clk: qcom: gpucc-sa8775p: Park RCG's clk source at XO during disable clk: qcom: gpucc-sa8775p: Remove the CLK_IS_CRITICAL and ALWAYS_ON flags clk: qcom: gcc-sa8775p: Set FORCE_MEM_CORE_ON for gcc_ufs_phy_ice_core_clk clk: qcom: gcc-sa8775p: Update the GDSC wait_val fields and flags clk: qcom: gcc-sa8775p: Remove support for UFS hw ctl clocks clk: qcom: gpucc-sm8350: Park RCG's clk source at XO during disable clk: qcom: nsscc-qca8k: Fix the MDIO functions undefined issue clk: qcom: select right config in CLK_QCM2290_GPUCC definition clk: qcom: Remove QCOM_RPMCC symbol clk: qcom: Add QCM2290 GPU clock controller driver ... commit b571cfcb9dcac187c6d967987792d37cb0688610 Author: Christoph Hellwig Date: Mon Jul 1 07:26:54 2024 +0200 nfs: don't reuse partially completed requests in nfs_lock_and_join_requests When NFS requests are split into sub-requests, nfs_inode_remove_request calls nfs_page_group_sync_on_bit to set PG_REMOVE on this sub-request and only completes the head requests once PG_REMOVE is set on all requests. This means that when nfs_lock_and_join_requests sees a PG_REMOVE bit, I/O on the request is in progress and has partially completed. If such a request is returned to nfs_try_to_update_request, it could be extended with the newly dirtied region and I/O for the combined range will be re-scheduled, leading to extra I/O. Change the logic to instead restart the search for a request when any PG_REMOVE bit is set, as the completion handler will remove the request as soon as it can take the page group lock. This not only avoid extending the I/O but also does the right thing for the callers that want to cancel or flush the request. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit f1b7c7552cbcf89e56b15ff481f3d19b53046291 Author: Christoph Hellwig Date: Mon Jul 1 07:26:53 2024 +0200 nfs: move nfs_wait_on_request to write.c nfs_wait_on_request is now only used in write.c. Move it there and mark it static. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 25edbcac6e32eab345e470d56ca9974a577b878b Author: Christoph Hellwig Date: Mon Jul 1 07:26:52 2024 +0200 nfs: fold nfs_page_group_lock_subrequests into nfs_lock_and_join_requests Fold nfs_page_group_lock_subrequests into nfs_lock_and_join_requests to prepare for future changes to this code, and move the helpers to write.c as well. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit c3f2235782c395896e835650f25f985713146592 Author: Christoph Hellwig Date: Mon Jul 1 07:26:51 2024 +0200 nfs: fold nfs_folio_find_and_lock_request into nfs_lock_and_join_requests Fold nfs_folio_find_and_lock_request into the only caller to prepare for changes to this code. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 9eb7c484db1ae993648fc9b9d48a295f4d99afb8 Author: Christoph Hellwig Date: Mon Jul 1 07:26:50 2024 +0200 nfs: simplify nfs_folio_find_and_lock_request nfs_folio_find_and_lock_request and the nfs_page_group_lock_head helper called by it spend quite some effort to deal with head vs subrequests. But given that only the head request can be stashed in the folio private data, non of that is required. Fold the locking logic from nfs_page_group_lock_head into nfs_folio_find_and_lock_request and simplify the result based on the invariant that we always find the head request in the folio private data. Signed-off-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 02e61ec1e2c1da136bbf7f6bbabc46733c53b035 Author: Christoph Hellwig Date: Mon Jul 1 07:26:49 2024 +0200 nfs: remove nfs_folio_private_request nfs_folio_private_request is a trivial wrapper around, which itself has fallen out of favor and has been replaced with plain ->private dereferences in recent folio conversions. Do the same for nfs. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 7e8e78a0ba00c88f0ded86de64bdddc82e06b196 Author: Christoph Hellwig Date: Mon Jul 1 07:26:48 2024 +0200 nfs: remove dead code for the old swap over NFS implementation Remove the code testing folio_test_swapcache either explicitly or implicitly in pagemap.h headers, as is now handled using the direct I/O path and not the buffered I/O path that these helpers are located in. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 4840c00003a2275668a13b82c9f5b1aed80183aa Author: Olga Kornievskaia Date: Mon Jun 24 09:28:27 2024 -0400 NFSv4.1 another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server Previously in order to mark the communication with the DS server, we tried to use NFS_CS_DS in cl_flags. However, this flag would only be saved for the DS server and in case where DS equals MDS, the client would not find a matching nfs_client in nfs_match_client that represents the MDS (but is also a DS). Instead, don't rely on the NFS_CS_DS but instead use NFS_CS_PNFS. Fixes: 379e4adfddd6 ("NFSv4.1: fixup use EXCHGID4_FLAG_USE_PNFS_DS for DS server") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 2f1f31042ef07719a0d5cb4784b8a32d20c13110 Author: Jan Kara Date: Mon Jul 1 12:50:48 2024 +0200 nfs: Block on write congestion Commit 6df25e58532b ("nfs: remove reliance on bdi congestion") introduced NFS-private solution for limiting number of writes outstanding against a particular server. Unlike previous bdi congestion this algorithm actually works and limits number of outstanding writeback pages to nfs_congestion_kb which scales with amount of client's memory and is capped at 256 MB. As a result some workloads such as random buffered writes over NFS got slower (from ~170 MB/s to ~126 MB/s). The fio command to reproduce is: fio --direct=0 --ioengine=sync --thread --invalidate=1 --group_reporting=1 --runtime=300 --fallocate=posix --ramp_time=10 --new_group --rw=randwrite --size=64256m --numjobs=4 --bs=4k --fsync_on_close=1 --end_fsync=1 This happens because the client sends ~256 MB worth of dirty pages to the server and any further background writeback request is ignored until the number of writeback pages gets below the threshold of 192 MB. By the time this happens and clients decides to trigger another round of writeback, the server often has no pages to write and the disk is idle. To fix this problem and make the client react faster to eased congestion of the server by blocking waiting for congestion to resolve instead of aborting writeback. This improves the random 4k buffered write throughput to 184 MB/s. Reviewed-by: Sagi Grimberg Reviewed-by: Jeff Layton Signed-off-by: Jan Kara Signed-off-by: Anna Schumaker commit f8a3955083f5cc5d62257c6e1103f89f566d3a87 Author: Jan Kara Date: Mon Jul 1 12:50:47 2024 +0200 nfs: Properly initialize server->writeback Atomic types should better be initialized with atomic_long_set() instead of relying on zeroing done by kzalloc(). Clean this up. Reviewed-by: Sagi Grimberg Signed-off-by: Jan Kara Acked-by: Jeff Layton Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 37d4159dd25ade59ce0fecc75984240e5f7abc14 Author: Jan Kara Date: Mon Jul 1 12:50:46 2024 +0200 nfs: Drop pointless check from nfs_commit_release_pages() nfss->writeback is updated only when we are ending page writeback and at that moment we also clear nfss->write_congested. So there's no point in rechecking congestion state in nfs_commit_release_pages(). Drop the pointless check. Reviewed-by: Sagi Grimberg Reviewed-by: Jeff Layton Signed-off-by: Jan Kara Signed-off-by: Anna Schumaker commit 7d09d6bb66709f33e85b9fc78b25b0055f4b9d7c Author: Chuck Lever Date: Tue Jun 25 16:02:08 2024 -0400 nfs/blocklayout: SCSI layout trace points for reservation key reg/unreg An administrator cannot take action on these messages, but the reported errors might be helpful for troubleshooting. Transition them to trace points so these events appear in the trace log and can be easily lined up with other traced NFS client operations. Examples: append_writer-6147 [000] 80.247393: bl_pr_key_reg: dev=8,0 (sda) key=0x6675bfcf59112e98 append_writer-6147 [000] 80.247842: bl_pr_key_unreg: dev=8,0 (sda) key=0x6675bfcf59112e98 umount.nfs4-6172 [002] 84.950409: bl_pr_key_unreg_err: dev=8,0 (sda) key=0x6675bfcf59112e98 status=RESERVATION_CONFLICT Reviewed-by: Benjamin Coddington Reviewed-by: Christoph Hellwig Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 450b4b3b2f742d5b3fce51e8f808ff1ed2fe9f89 Author: Chuck Lever Date: Tue Jun 25 16:02:07 2024 -0400 nfs/blocklayout: Report only when /no/ device is found Since commit f931d8374cad ("nfs/blocklayout: refactor block device opening"), an error is reported when no multi-path device is found. But this isn't a fatal error if the subsequent device open is successful. On systems without multi-path devices, this message always appears whether there is a problem or not. Instead, generate less system journal noise by reporting an error only when both open attempts fail. The new error message is more actionable since it indicates that there is a real configuration issue to be addressed. Reviewed-by: Christoph Hellwig Reviewed-by: Benjamin Coddington Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit d869da91cccb90320e101a2758f1e2b3803ade5c Author: Chuck Lever Date: Tue Jun 25 16:02:06 2024 -0400 nfs/blocklayout: Fix premature PR key unregistration During generic/069 runs with pNFS SCSI layouts, the NFS client emits the following in the system journal: kernel: pNFS: failed to open device /dev/disk/by-id/dm-uuid-mpath-0x6001405e3366f045b7949eb8e4540b51 (-2) kernel: pNFS: using block device sdb (reservation key 0x666b60901e7b26b3) kernel: pNFS: failed to open device /dev/disk/by-id/dm-uuid-mpath-0x6001405e3366f045b7949eb8e4540b51 (-2) kernel: pNFS: using block device sdb (reservation key 0x666b60901e7b26b3) kernel: sd 6:0:0:1: reservation conflict kernel: sd 6:0:0:1: [sdb] tag#16 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s kernel: sd 6:0:0:1: [sdb] tag#16 CDB: Write(10) 2a 00 00 00 00 50 00 00 08 00 kernel: reservation conflict error, dev sdb, sector 80 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 2 kernel: sd 6:0:0:1: reservation conflict kernel: sd 6:0:0:1: reservation conflict kernel: sd 6:0:0:1: [sdb] tag#18 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s kernel: sd 6:0:0:1: [sdb] tag#17 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s kernel: sd 6:0:0:1: [sdb] tag#18 CDB: Write(10) 2a 00 00 00 00 60 00 00 08 00 kernel: sd 6:0:0:1: [sdb] tag#17 CDB: Write(10) 2a 00 00 00 00 58 00 00 08 00 kernel: reservation conflict error, dev sdb, sector 96 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0 kernel: reservation conflict error, dev sdb, sector 88 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0 systemd[1]: fstests-generic-069.scope: Deactivated successfully. systemd[1]: fstests-generic-069.scope: Consumed 5.092s CPU time. systemd[1]: media-test.mount: Deactivated successfully. systemd[1]: media-scratch.mount: Deactivated successfully. kernel: sd 6:0:0:1: reservation conflict kernel: failed to unregister PR key. This appears to be due to a race. bl_alloc_lseg() calls this: 561 static struct nfs4_deviceid_node * 562 bl_find_get_deviceid(struct nfs_server *server, 563 const struct nfs4_deviceid *id, const struct cred *cred, 564 gfp_t gfp_mask) 565 { 566 struct nfs4_deviceid_node *node; 567 unsigned long start, end; 568 569 retry: 570 node = nfs4_find_get_deviceid(server, id, cred, gfp_mask); 571 if (!node) 572 return ERR_PTR(-ENODEV); nfs4_find_get_deviceid() does a lookup without the spin lock first. If it can't find a matching deviceid, it creates a new device_info (which calls bl_alloc_deviceid_node, and that registers the device's PR key). Then it takes the nfs4_deviceid_lock and looks up the deviceid again. If it finds it this time, bl_find_get_deviceid() frees the spare (new) device_info, which unregisters the PR key for the same device. Any subsequent I/O from this client on that device gets EBADE. The umount later unregisters the device's PR key again. To prevent this problem, register the PR key after the deviceid_node lookup. Signed-off-by: Christoph Hellwig Signed-off-by: Chuck Lever Reviewed-by: Christoph Hellwig Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 5468fc8298a97ca504aca8ac0c7b9e6fd7c1b588 Author: Trond Myklebust Date: Thu Jun 13 01:00:55 2024 -0400 NFSv4/pNFS: Do layout state recovery upon reboot Some pNFS implementations, such as flexible files, want the client to send the layout stats and layout errors that may have incurred while the metadata server was booting. To do so, the client sends a layoutreturn with an all-zero stateid while the server is in grace during reboot recovery. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit ad3c436dace5538c8d4b424958a723bc23b901dc Author: Trond Myklebust Date: Thu Jun 13 01:00:54 2024 -0400 NFSv4/pNFS: Remove redundant call to unhash the layout The layout will be automatically unhashed on final release of the reference count. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 42375c2bfa3f7673f438e6dbf9acf17f69a98f77 Author: Trond Myklebust Date: Thu Jun 13 01:00:53 2024 -0400 NFSv4/pnfs: Give nfs4_proc_layoutreturn() a flags argument Replace the boolean in nfs4_proc_layoutreturn() with a set of flags that will allow us to craft a version that is appropriate for reboot recovery. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit bbbff6d5edd1079b9984da927d9cd4d49095fca9 Author: Trond Myklebust Date: Thu Jun 13 01:00:52 2024 -0400 NFSv4/pNFS: Retry the layout return later in case of a timeout or reboot If the layout return failed due to a timeout or reboot, then leave the layout segments on the list so that the layout return gets replayed later. The exception would be if we're freeing the inode. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 50379c9f095115147f6c9666c0bbb71ee1cd4796 Author: Trond Myklebust Date: Thu Jun 13 01:00:51 2024 -0400 NFSv4/pNFS: Handle server reboots in pnfs_poc_release() If the server reboots, then handle it by deferring the layout return. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 6e7be9e7b71e38d5965f0a52323316e4e8202b40 Author: Trond Myklebust Date: Thu Jun 13 01:00:50 2024 -0400 NFSv4/pNFS: Add a helper to defer failed layoutreturn calls If the layoutreturn-on-close fails due to an RPC layer problem, such as a timeout, then we want to retry at a later time. Add a helper function to allow this. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 41d0a8ead97209c0e3e1f64e6484c31a98e31154 Author: Trond Myklebust Date: Thu Jun 13 01:00:49 2024 -0400 NFSv4/pnfs: Add support for the PNFS_LAYOUT_FILE_BULK_RETURN flag Add a flag PNFS_LAYOUT_FILE_BULK_RETURN, that will attempt to return all the layouts in a pnfs_layout_destroy_byfsid/pnfs_layout_destroy_byclid call, instead of just invalidating them. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 8adc8302109f868a7f17f29b8a336cea8deaa96e Author: Trond Myklebust Date: Thu Jun 13 01:00:48 2024 -0400 pNFS: Add a flag argument to pnfs_destroy_layouts_byclid() Change the bool argument to a flag so that we can add different modes for doing bulk destroy of a layout. In particular, we will want the ability to schedule return of all the layouts associated with a given NFS server when it reboots. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 5d2db0898a569984c37c7afcfbb902fc5ff2817d Author: Trond Myklebust Date: Thu Jun 13 01:00:47 2024 -0400 NFSv4: Clean up encode_nfs4_stateid() Ensure that we encode the actual stateid, and not any metadata. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 924cf3c91fe29c7ebd1b9d56e10f513c1bd7d4bd Author: Trond Myklebust Date: Thu Jun 13 01:00:46 2024 -0400 NFSv4.1: constify the stateid argument in nfs41_test_stateid() Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit b8ec59cbba383cced18bafb316ed426ec68fbe6b Author: Trond Myklebust Date: Thu Jun 13 01:00:45 2024 -0400 NFSv4/pnfs: Remove redundant list check pnfs_layout_free_bulk_destroy_list() already checks for whether the list is empty or not. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit cf453bfe92fd5a2a189305130c5e076b9871ec43 Author: Trond Myklebust Date: Sun Jun 16 21:21:37 2024 -0400 NFSv4: Don't send delegation-related share access modes to CLOSE When we set the new share access modes for CLOSE in nfs4_close_prepare(). we should only set a mode of NFS4_SHARE_ACCESS_READ, NFS4_SHARE_ACCESS_WRITE or NFS4_SHARE_ACCESS_BOTH. Currently, we may also be passing in the NFSv4.1 share modes for controlling delegation requests in OPEN, which is wrong. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit adb4b42d19aea91826621a8d0bac94cf2c08f8bc Author: Lance Shelton Date: Sun Jun 16 21:21:36 2024 -0400 Return the delegation when deleting sillyrenamed files Add a callback to return the delegation in order to allow generic NFS code to return the delegation when appropriate. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit d79ed371d51c57b2af74781466f1c0e821964b48 Author: Trond Myklebust Date: Sun Jun 16 21:21:35 2024 -0400 NFSv4: Ask for a delegation or an open stateid in OPEN Turn on the optimisation to allow the client to request that the server not return the open stateid when it returns a delegation. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 1f0a6b3fa7a9405b74516611afa005075a21e810 Author: Trond Myklebust Date: Sun Jun 16 21:21:34 2024 -0400 NFSv4: Add support for OPEN4_RESULT_NO_OPEN_STATEID If the server returns a delegation stateid only, then don't try to set an open stateid. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit d2a00cceb93a4df2afaceb836297628d0aeec7ad Author: Trond Myklebust Date: Sun Jun 16 21:21:33 2024 -0400 NFSv4: Detect support for OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION If the server supports the NFSv4.2 protocol extension to optimise away returning a stateid when it returns a delegation, then we cache that information in another capability flag. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 707f13b3d081ea811c40014e7b61f2c487ee9a4f Author: Trond Myklebust Date: Sun Jun 16 21:21:32 2024 -0400 NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute Query the server for the OPEN arguments that it supports so that we can figure out which extensions we can use. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 32215c1f893a11c5b0c6e1d70907cb40b54925ab Author: Trond Myklebust Date: Sun Jun 16 21:21:31 2024 -0400 NFSv4: Don't request atime/mtime/size if they are delegated to us If the timestamps and size are delegated to the client, then it is authoritative w.r.t. their values, so we should not be requesting those values from the server. Note that this allows us to optimise away most GETATTR calls if the only changes to the attributes are the result of read() or write(). Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 0a741f59c331254a2fc7eb57cfdd25e75c2ce48f Author: Trond Myklebust Date: Sun Jun 16 21:21:30 2024 -0400 NFSv4: Fix up delegated attributes in nfs_setattr nfs_setattr calls nfs_update_inode() directly, so we have to reset the m/ctime there. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit b81aca09617cd768d07601a0ac96135d00b82bfe Author: Trond Myklebust Date: Sun Jun 16 21:21:29 2024 -0400 NFSv4: Delegreturn must set m/atime when they are delegated If the atime or mtime attributes were delegated, then we need to propagate their new values back to the server when returning the delegation. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit e3e9d44de13f91fae4565c7d6dfc7ec3eb03b108 Author: Trond Myklebust Date: Sun Jun 16 21:21:28 2024 -0400 NFSv4: Enable attribute delegations If we see that the server supports attribute delegations, then request them by setting the appropriate OPEN arguments. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit dcb3c20f741993efbd95be78aab93fac29516323 Author: Trond Myklebust Date: Sun Jun 16 21:21:27 2024 -0400 NFSv4: Add a capability for delegated attributes Cache whether or not the server may have support for delegated attributes in a capability flag. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 86e1c54d152e2799671e149d6e4d1c1a4a2be857 Author: Trond Myklebust Date: Sun Jun 16 21:21:26 2024 -0400 NFSv4: Add recovery of attribute delegations After a reboot of the NFSv4.2 server, the recovery code needs to specify whether the delegation to be recovered is an attribute delegation or not. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit e12912d94137ab36ee704a91f465ff15c8b423da Author: Trond Myklebust Date: Sun Jun 16 21:21:25 2024 -0400 NFSv4: Add support for delegated atime and mtime attributes Ensure that we update the mtime and atime correctly when we read or write data to the file and when we truncate. Let the server manage ctime on other attribute updates. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 4201916f2ab13577d45876f4bc784be55e4a83da Author: Trond Myklebust Date: Sun Jun 16 21:21:24 2024 -0400 NFSv4: Add a flags argument to the 'have_delegation' callback This argument will be used to allow the caller to specify whether or not they need to know that this is an attribute delegation. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 43df7110f4a90dbdb4be1bc71ca71e4f6a03a11f Author: Trond Myklebust Date: Sun Jun 16 21:21:23 2024 -0400 NFSv4: Add CB_GETATTR support for delegated attributes When the client holds an attribute delegation, the server may retrieve all the timestamps through a CB_GETATTR callback. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 90f9ae74422d7e7447cb0ea21e1227142b58c52a Author: Trond Myklebust Date: Sun Jun 16 21:21:22 2024 -0400 NFSv4: Plumb in XDR support for the new delegation-only setattr op We want to send the updated atime and mtime as part of the delegreturn compound. Add a special structure to hold those variables. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 6a68aed602d7b770552c7f890d0c30c53725c7b8 Author: Trond Myklebust Date: Sun Jun 16 21:21:21 2024 -0400 NFSv4: Add new attribute delegation definitions Add the attribute delegation XDR definitions from the spec. Signed-off-by: Tom Haynes Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 7cca0e962eb50b5321317a491d9fe6578ca8419f Author: Trond Myklebust Date: Sun Jun 16 21:21:20 2024 -0400 NFSv4: Refactor nfs4_opendata_check_deleg() Modify it to no longer depend directly on the struct opendata. This will enable sharing with WANT_DELEGATION. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 820620516993c151c88e9b59edc79ed12d1c31cd Author: Trond Myklebust Date: Sun Jun 16 21:21:19 2024 -0400 NFSv4: Clean up open delegation return structure Instead of having the fields open coded in the struct nfs_openres, add a separate structure for them so that we can reuse that code for the WANT_DELEGATION case. Signed-off-by: Trond Myklebust Signed-off-by: Lance Shelton Reviewed-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit d3318990193df72260447d9de064014c0ce74ebc Author: Jeff Johnson Date: Tue Jun 25 09:42:49 2024 -0700 fs: nfs: add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nfs_common/nfs_acl.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nfs_common/grace.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nfs/nfs.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nfs/nfsv2.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nfs/nfsv3.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nfs/nfsv4.o Signed-off-by: Jeff Johnson Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 53185f2df0ea0d2d2d0922ab91055e958efcda41 Author: Dr. David Alan Gilbert Date: Fri May 31 01:00:33 2024 +0100 NFS: remove unused struct 'mnt_fhstatus' 'mnt_fhstatus' has been unused since commit 065015e5efff ("NFS: Remove unused XDR decoder functions"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 6258cf25d5e3155c3219ab5a79b970eef7996356 Author: NeilBrown Date: Wed Jun 19 11:05:13 2024 +1000 SUNRPC: avoid soft lockup when transmitting UDP to reachable server. Prior to the commit identified below, call_transmit_status() would handle -EPERM and other errors related to an unreachable server by falling through to call_status() which added a 3-second delay and handled the failure as a timeout. Since that commit, call_transmit_status() falls through to handle_bind(). For UDP this moves straight on to handle_connect() and handle_transmit() so we immediately retransmit - and likely get the same error. This results in an indefinite loop in __rpc_execute() which triggers a soft-lockup warning. For the errors that indicate an unreachable server, call_transmit_status() should fall back to call_status() as it did before. This cannot cause the thundering herd that the previous patch was avoiding, as the call_status() will insert a delay. Fixes: ed7dc973bd91 ("SUNRPC: Prevent thundering herd when the socket is not connected") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 0e13dd9ea8be46f980a46c3ffd8cb786f3e2fb5b Author: Chuck Lever Date: Tue Jun 4 15:45:27 2024 -0400 xprtrdma: Remove temp allocation of rpcrdma_rep objects The original code was designed so that most calls to rpcrdma_rep_create() would occur on the NUMA node that the device preferred. There are a few cases where that's not possible, so those reps are marked as temporary. However, we have the device (and its preferred node) already in rpcrdma_rep_create(), so let's use that to guarantee the memory is allocated from the correct node. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 9d53378c2c145991fb5bc986c82eb9030212c2ea Author: Chuck Lever Date: Tue Jun 4 15:45:26 2024 -0400 xprtrdma: Clean up synopsis of frwr_mr_unmap() Commit 7a03aeb66c41 ("xprtrdma: Micro-optimize MR DMA-unmapping") removed the last use of the @r_xprt parameter in this function, but neglected to remove the parameter itself. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 3f4eb9ff923413cdb4c7e171c06d3564f6286712 Author: Chuck Lever Date: Tue Jun 4 15:45:25 2024 -0400 xprtrdma: Handle device removal outside of the CM event handler Wait for all disconnects to complete to ensure the transport has divested all of its hardware resources before the underlying RDMA device can be removed. Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 7e86845a0346efc95fddaa97ce5cd6a8bda8c71c Author: Chuck Lever Date: Tue Jun 4 15:45:24 2024 -0400 rpcrdma: Implement generic device removal Commit e87a911fed07 ("nvme-rdma: use ib_client API to detect device removal") explains the benefits of handling device removal outside of the CM event handler. Sketch in an IB device removal notification mechanism that can be used by both the client and server side RPC-over-RDMA transport implementations. Suggested-by: Sagi Grimberg Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit acd9f2dd23c632568156217aac7a05f5a0313152 Author: Chuck Lever Date: Tue Jun 4 15:45:23 2024 -0400 xprtrdma: Fix rpcrdma_reqs_reset() Avoid FastReg operations getting MW_BIND_ERR after a reconnect. rpcrdma_reqs_reset() is called on transport tear-down to get each rpcrdma_req back into a clean state. MRs on req->rl_registered are waiting for a FastReg, are already registered, or are waiting for invalidation. If the transport is being torn down when reqs_reset() is called, the matching LocalInv might never be posted. That leaves these MR registered /and/ on req->rl_free_mrs, where they can be re-used for the next connection. Since xprtrdma does not keep specific track of the MR state, it's not possible to know what state these MRs are in, so the only safe thing to do is release them immediately. Fixes: 5de55ce951a1 ("xprtrdma: Release in-flight MRs on disconnect") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 89f58f96d1e2357601c092d85b40a2109cf25ef3 Author: Gaosheng Cui Date: Sat Jul 6 14:46:25 2024 +0800 nvmet-auth: fix nvmet_auth hash error handling If we fail to call nvme_auth_augmented_challenge, or fail to kmalloc for shash, we should free the memory allocation for challenge, so add err path out_free_challenge to fix the memory leak. Fixes: 7a277c37d352 ("nvmet-auth: Diffie-Hellman key exchange support") Signed-off-by: Gaosheng Cui Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 18f03a063d41a90115373dc41c1fc22bd3e0a6ad Author: Christoph Hellwig Date: Fri Jul 5 18:46:26 2024 +0200 nvme: implement ->get_unique_id Implement the get_unique_id method to allow pNFS SCSI layout access to NVMe namespaces. This is the server side implementation of RFC 9561 "Using the Parallel NFS (pNFS) SCSI Layout to Access Non-Volatile Memory Express (NVMe) Storage Devices". Signed-off-by: Christoph Hellwig Acked-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 2881fcfc8f32c536a4bf708066d6fea9ba762e86 Author: Luca Weiss Date: Fri Jun 28 19:40:55 2024 +0200 mailmap: Update Luca Weiss's email address I'm slowly migrating my mail to a new domain, add an entry to map the mail address. Just for clarity, my work-related @fairphone.com email stays unchanged. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240628-mailmap-v1-1-a0d12ffd1cd9@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 3b42b9ade16bfb758dd581cdbf39e4f7d1233ac6 Author: Andrew Davis Date: Wed Jun 12 10:07:11 2024 -0500 dt-bindings: input: ti,nspire-keypad: convert to YAML format Convert TI-NSPIRE Keypad controller bindings to DT schema. Signed-off-by: Andrew Davis Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240612150711.26706-1-afd@ti.com Signed-off-by: Dmitry Torokhov commit 916b93f4e865b35563902f5862b443fc122631b4 Author: Jinjie Ruan Date: Thu Jun 20 14:36:00 2024 +0800 arm64: smp: Fix missing IPI statistics commit 83cfac95c018 ("genirq: Allow interrupts to be excluded from /proc/interrupts") is to avoid IPIs appear twice in /proc/interrupts. But the commit 331a1b3a836c ("arm64: smp: Add arch support for backtrace using pseudo-NMI") and commit 2f5cd0c7ffde("arm64: kgdb: Implement kgdb_roundup_cpus() to enable pseudo-NMI roundup") set CPU_BACKTRACE and KGDB_ROUNDUP IPIs "IRQ_HIDDEN" flag but not show them in arch_show_interrupts(), which cause the interrupt kstat_irqs accounting is missing in display. Before this patch, CPU_BACKTRACE and KGDB_ROUNDUP IPIs are missing: / # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 11: 466 600 309 332 GICv3 27 Level arch_timer 13: 24 0 0 0 GICv3 33 Level uart-pl011 15: 64 0 0 0 GICv3 78 Edge virtio0 16: 0 0 0 0 GICv3 79 Edge virtio1 17: 0 0 0 0 GICv3 34 Level rtc-pl031 18: 3 3 3 3 GICv3 23 Level arm-pmu 19: 0 0 0 0 9030000.pl061 3 Edge GPIO Key Poweroff IPI0: 7 14 9 26 Rescheduling interrupts IPI1: 354 93 233 255 Function call interrupts IPI2: 0 0 0 0 CPU stop interrupts IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts IPI4: 0 0 0 0 Timer broadcast interrupts IPI5: 1 0 0 0 IRQ work interrupts Err: 0 After this pacth, CPU_BACKTRACE and KGDB_ROUNDUP IPIs are displayed: / # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 11: 393 281 532 449 GICv3 27 Level arch_timer 13: 15 0 0 0 GICv3 33 Level uart-pl011 15: 64 0 0 0 GICv3 78 Edge virtio0 16: 0 0 0 0 GICv3 79 Edge virtio1 17: 0 0 0 0 GICv3 34 Level rtc-pl031 18: 2 2 2 2 GICv3 23 Level arm-pmu 19: 0 0 0 0 9030000.pl061 3 Edge GPIO Key Poweroff IPI0: 11 19 4 23 Rescheduling interrupts IPI1: 279 347 222 72 Function call interrupts IPI2: 0 0 0 0 CPU stop interrupts IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts IPI4: 0 0 0 0 Timer broadcast interrupts IPI5: 1 0 0 1 IRQ work interrupts IPI6: 0 0 0 0 CPU backtrace interrupts IPI7: 0 0 0 0 KGDB roundup interrupts Err: 0 Fixes: 331a1b3a836c ("arm64: smp: Add arch support for backtrace using pseudo-NMI") Signed-off-by: Jinjie Ruan Suggested-by: Doug Anderson Acked-by: Will Deacon Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240620063600.573559-1-ruanjinjie@huawei.com Signed-off-by: Catalin Marinas commit 06507c7536f747867d6d83d605af6bd753fec6d3 Merge: cedc12c5b57f7 16e86f2e8199c Author: Alexei Starovoitov Date: Mon Jul 8 10:01:48 2024 -0700 Merge branch 'small-api-fix-for-bpf_wq' Benjamin Tissoires says: ==================== Small API fix for bpf_wq I realized this while having a map containing both a struct bpf_timer and a struct bpf_wq: the third argument provided to the bpf_wq callback is not the struct bpf_wq pointer itself, but the pointer to the value in the map. Which means that the users need to double cast the provided "value" as this is not a struct bpf_wq *. This is a change of API, but there doesn't seem to be much users of bpf_wq right now, so we should be able to go with this right now. Signed-off-by: Benjamin Tissoires --- Changes in v2: - amended the selftests to retrieve something from the third argument of the callback - Link to v1: https://lore.kernel.org/r/20240705-fix-wq-v1-0-91b4d82cd825@kernel.org --- ==================== Link: https://lore.kernel.org/r/20240708-fix-wq-v2-0-667e5c9fbd99@kernel.org Signed-off-by: Alexei Starovoitov commit 16e86f2e8199cdb8789573c8784eb5c1cd478f13 Author: Benjamin Tissoires Date: Mon Jul 8 11:52:58 2024 +0200 selftests/bpf: amend for wrong bpf_wq_set_callback_impl signature See the previous patch: the API was wrong, we were provided the pointer to the value, not the actual struct bpf_wq *. Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240708-fix-wq-v2-2-667e5c9fbd99@kernel.org Signed-off-by: Alexei Starovoitov commit f56f4d541eab1ae060a46b56dd6ec9130d6e3a98 Author: Benjamin Tissoires Date: Mon Jul 8 11:52:57 2024 +0200 bpf: helpers: fix bpf_wq_set_callback_impl signature I realized this while having a map containing both a struct bpf_timer and a struct bpf_wq: the third argument provided to the bpf_wq callback is not the struct bpf_wq pointer itself, but the pointer to the value in the map. Which means that the users need to double cast the provided "value" as this is not a struct bpf_wq *. This is a change of API, but there doesn't seem to be much users of bpf_wq right now, so we should be able to go with this right now. Fixes: 81f1d7a583fa ("bpf: wq: add bpf_wq_set_callback_impl") Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20240708-fix-wq-v2-1-667e5c9fbd99@kernel.org Signed-off-by: Alexei Starovoitov commit f275b3ae3aeef8831290ecce4156a365fea13737 Author: Javier Carrasco Date: Fri Jul 5 19:38:51 2024 +0200 Input: fsl-imx25-tcq - constify struct regmap_config `mx25_tcq_regconfig` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240705-input-const-regmap_config-v1-2-f712a4494883@gmail.com Signed-off-by: Dmitry Torokhov commit 366d586684701ee23c1e891664422be64c981c1a Author: Javier Carrasco Date: Fri Jul 5 19:38:50 2024 +0200 Input: qt1050 - constify struct regmap_config `qt1050_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240705-input-const-regmap_config-v1-1-f712a4494883@gmail.com Signed-off-by: Dmitry Torokhov commit 23711cabe122ef55bcb2e5c3e3835b5a2a688fc0 Author: Varadarajan Narayanan Date: Tue Apr 30 12:12:13 2024 +0530 clk: qcom: ipq9574: 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 Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240430064214.2030013-6-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 8737ec830ee32162858af7c1504169b05b313ab1 Author: Varadarajan Narayanan Date: Tue Apr 30 12:12:12 2024 +0530 clk: qcom: common: Add interconnect clocks support Unlike MSM platforms that manage NoC related clocks and scaling from RPM, IPQ SoCs dont involve RPM in managing NoC related clocks and there is no NoC scaling. However, there is a requirement to enable some NoC interface clocks for accessing the peripheral controllers present on these NoCs. Though exposing these as normal clocks would work, having a minimalistic interconnect driver to handle these clocks would make it consistent with other Qualcomm platforms resulting in common code paths. This is similar to msm8996-cbf's usage of icc-clk framework. Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240430064214.2030013-5-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit d3153113619216e87038a20bebf82582f9be10e7 Author: Varadarajan Narayanan Date: Tue Apr 30 12:12:11 2024 +0530 interconnect: icc-clk: Add devm_icc_clk_register Wrap icc_clk_register to create devm_icc_clk_register to be able to release the resources properly. Acked-by: Georgi Djakov Reviewed-by: Dmitry Baryshkov Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240430064214.2030013-4-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit f45b94ffc5f1204b35b5c695ed265b1385951616 Author: Varadarajan Narayanan Date: Tue Apr 30 12:12:09 2024 +0530 interconnect: icc-clk: Specify master/slave ids Presently, icc-clk driver autogenerates the master and slave ids. However, devices with multiple nodes on the interconnect could have other constraints and may not match with the auto generated node ids. Hence, modify the driver to use the master/slave ids provided by the caller instead of auto generating. Also, update clk-cbf-8996 accordingly. Acked-by: Georgi Djakov Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240430064214.2030013-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit b3d57c5582671831022c65ca83dedd6ce71a125a Merge: 6a98844a5abde d1f1570f3d6db Author: Bjorn Andersson Date: Sat Jul 6 13:13:37 2024 -0500 Merge branch '20240430064214.2030013-3-quic_varada@quicinc.com' into clk-for-6.11 Merge the IPQ9574 interconnect binding through a topic branch, to make it possible to use the constants in the DeviceTree source branch as well. commit 6a98844a5abde99db6bb7ab048e0723a375b4cf8 Author: Satya Priya Kakitapalli Date: Thu May 9 15:54:03 2024 +0530 dt-bindings: clock: qcom: Add AHB clock for SM8150 SM8150 videocc needs AHB clock, so update the bindings for sm8150 to add the AHB clock. Fixes: df3f61d2cdc9 ("dt-bindings: clock: add SM8150 QCOM video clock bindings") Signed-off-by: Satya Priya Kakitapalli Link: https://lore.kernel.org/r/20240509-videocc-sm8150-dt-node-v4-1-e9617f65e946@quicinc.com Signed-off-by: Bjorn Andersson commit 14539c88972bd984f1f04c9e601c1a2835d3e5d2 Author: Abel Vesa Date: Thu May 30 17:05:24 2024 +0300 clk: qcom: gcc-x1e80100: Set parent rate for USB3 sec and tert PHY pipe clks Allow the USB3 second and third GCC PHY pipe clocks to propagate the rate to the pipe clocks provided by the QMP combo PHYs. The first instance is already doing that. Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100") Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240530-x1e80100-clk-gcc-usb3-sec-tert-set-parent-rate-v1-1-7b2b04cad545@linaro.org Signed-off-by: Bjorn Andersson commit b3603133d3b727b0b07a7094ab74cf27c8aee3bd Author: Johannes Berg Date: Fri Jul 5 13:39:21 2024 +0200 wifi: mac80211_hwsim: fix warning WARN_ON("string") will unconditionally trigger a warning, but not really do what it may look like. Use WARN(1, ...) instead and add the mode number as well. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20240705133921.a50aa5b15ece.I9a25b7448b0498c0c2e503986978dae165c8bdf8@changeid Signed-off-by: Johannes Berg commit 4044b23781104801f70c4a4ec3ca090730a161c5 Author: Michael-CY Lee Date: Fri Jul 5 15:43:46 2024 +0800 wifi: mac80211: do not check BSS color collision in certain cases Do not check BSS color collision in following cases 1. already under a color change 2. color change is disabled Signed-off-by: Michael-CY Lee Link: https://patch.msgid.link/20240705074346.11228-1-michael-cy.lee@mediatek.com Signed-off-by: Johannes Berg commit 7cd445635562a38c1e3534e3e691c25d2737be54 Author: Michael-CY Lee Date: Fri Jul 5 15:43:26 2024 +0800 wifi: mac80211: cancel color change finalize work when link is stopped The color change finalize work might be called after the link is stopped, which might lead to a kernel crash. Signed-off-by: Michael-CY Lee Link: https://patch.msgid.link/20240705074326.11172-1-michael-cy.lee@mediatek.com Signed-off-by: Johannes Berg commit b5d14b0c6716fad7f0c94ac6e1d6f60a49f985c7 Author: En-Wei Wu Date: Fri Jul 5 10:37:56 2024 +0800 wifi: virt_wifi: avoid reporting connection success with wrong SSID When user issues a connection with a different SSID than the one virt_wifi has advertised, the __cfg80211_connect_result() will trigger the warning: WARN_ON(bss_not_found). The issue is because the connection code in virt_wifi does not check the SSID from user space (it only checks the BSSID), and virt_wifi will call cfg80211_connect_result() with WLAN_STATUS_SUCCESS even if the SSID is different from the one virt_wifi has advertised. Eventually cfg80211 won't be able to find the cfg80211_bss and generate the warning. Fixed it by checking the SSID (from user space) in the connection code. Fixes: c7cdba31ed8b ("mac80211-next: rtnetlink wifi simulation device") Reported-by: syzbot+d6eb9cee2885ec06f5e3@syzkaller.appspotmail.com Signed-off-by: En-Wei Wu Link: https://patch.msgid.link/20240705023756.10954-1-en-wei.wu@canonical.com Signed-off-by: Johannes Berg commit 574e609c4e6a0843a9ed53de79e00da8fb3e7437 Author: Felix Fietkau Date: Thu Jul 4 15:09:47 2024 +0200 wifi: mac80211: clear vif drv_priv after remove_interface when stopping Avoid reusing stale driver data when an interface is brought down and up again. In order to avoid having to duplicate the memset in every single driver, do it here. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/20240704130947.48609-1-nbd@nbd.name Signed-off-by: Johannes Berg commit cedc12c5b57f7efa6dbebfb2b140e8675f5a2616 Author: Andreas Ziegler Date: Wed Jul 3 10:34:36 2024 +0200 libbpf: Add NULL checks to bpf_object__{prev_map,next_map} In the current state, an erroneous call to bpf_object__find_map_by_name(NULL, ...) leads to a segmentation fault through the following call chain: bpf_object__find_map_by_name(obj = NULL, ...) -> bpf_object__for_each_map(pos, obj = NULL) -> bpf_object__next_map((obj = NULL), NULL) -> return (obj = NULL)->maps While calling bpf_object__find_map_by_name with obj = NULL is obviously incorrect, this should not lead to a segmentation fault but rather be handled gracefully. As __bpf_map__iter already handles this situation correctly, we can delegate the check for the regular case there and only add a check in case the prev or next parameter is NULL. Signed-off-by: Andreas Ziegler Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240703083436.505124-1-ziegler.andreas@siemens.com commit 8846739f52afa07e63395c80227dc544f54bd7b1 Author: Johannes Thumshirn Date: Mon Jul 8 17:49:28 2024 +0200 spi: add ch341a usb2spi driver Add a driver for the QiHeng Electronics ch341a USB-to-SPI adapter. This driver is loosely based on the ch341a module from the flashrom project. Signed-off-by: Johannes Thumshirn Link: https://patch.msgid.link/20240708-spi-ch341a-v3-1-cf7f9b2c1e31@kernel.org Signed-off-by: Mark Brown commit 19cb6058620620e68f1a9aed99393be5c3629db4 Author: Jason Chen Date: Wed Jul 3 11:44:09 2024 +0800 remoteproc: mediatek: Increase MT8188/MT8195 SCP core0 DRAM size The current DRAM size is insufficient for the HEVC feature, which requires more memory for proper functionality. This change ensures the feature has the necessary resources. Signed-off-by: Jason Chen Reviewed-by: AngeloGioacchino Del Regno Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240703034409.698-1-Jason-ch.Chen@mediatek.com Signed-off-by: Mathieu Poirier commit 95b5b10f03931f5248f8977e41f9570daa29b111 Merge: b326382444406 f919a823b1530 Author: Arnd Bergmann Date: Mon Jul 8 17:53:44 2024 +0200 Merge tag 'at91-defconfig-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/defconfig Microchip AT91 defconfig updates for v6.11 It contains: - Enable LVDS serializer support on at91_dt_defconfig * tag 'at91-defconfig-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: Enable LVDS serializer support Link: https://lore.kernel.org/r/20240629173634.664081-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit b3263824444065a7b636cbe5c9a60214cda9df7d Merge: f2745d399ab0f fa071acfefe84 Author: Arnd Bergmann Date: Mon Jul 8 17:52:28 2024 +0200 Merge tag 'tegra-for-6.11-arm64-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/defconfig arm64: tegra: Default configuration changes for v6.11-rc1 A single change to enable the driver for the NVIDIA CoreSight PMU. * tag 'tegra-for-6.11-arm64-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable NVIDIA CoreSight PMU driver Link: https://lore.kernel.org/r/20240628210818.3627404-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit f2745d399ab0f03871674a119945897ff2fddf88 Merge: f2661062f16b2 4b45a978b25da Author: Arnd Bergmann Date: Mon Jul 8 17:51:22 2024 +0200 Merge tag 'renesas-arm-defconfig-for-v6.11-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.11 - Enable support for Renesas R-Car Gen4 PCIe controllers and Marvell 88Q2XXX 100/1000BASE-T1 Automotive Ethernet PHYs in the ARM64 defconfig. * tag 'renesas-arm-defconfig-for-v6.11-tag1' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable Marvell 88Q2XXX PHY support arm64: defconfig: Enable Renesas R-Car Gen4 PCIe controller Link: https://lore.kernel.org/r/cover.1718355311.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 0c6c65111ed3b662e179e1ab35a0a6e6b362560a Merge: 1cc509edbe23b 522133d440101 Author: Mark Brown Date: Mon Jul 8 16:50:14 2024 +0100 ASoC: Simplify code with cleanup.h Merge series from Krzysztof Kozlowski : Allocate the memory with scoped/cleanup.h to reduce error handling (simpler error paths) and make the code a bit smaller. commit 6cf4e8f4ca3ad33fdc5097280bef34735e8b0787 Merge: 6355edbb3dfe3 9c29e5d7a2d1d Author: Arnd Bergmann Date: Mon Jul 8 17:49:21 2024 +0200 Merge tag 'v6.11-rockchip-dts32-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt Removal of a fallback ethernet-phy compatible that is not conformant to the binding. * tag 'v6.11-rockchip-dts32-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Drop ethernet-phy-ieee802.3-c22 from PHY compatible string on edgeble-neu2 Link: https://lore.kernel.org/r/2169115.3Lj2Plt8kZ@diego Signed-off-by: Arnd Bergmann commit 6355edbb3dfe322f0748b1eb3987973a568bbb42 Merge: 31f6b5a651f92 31390eb8ffbf2 Author: Arnd Bergmann Date: Mon Jul 8 17:47:25 2024 +0200 Merge tag 'v6.11-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt One new board, the pretty interesting Rock 5 ITX, some improvements for the Lunzn Fastrhino R6xS boards, allowing dma on uarts connected to bluetooth modules and an update for the gpu operating points on rk356x. As well as some minor fixes for missing power-dmains and ethernet phy binding adherence. * tag 'v6.11-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add ROCK 5 ITX board dt-bindings: arm: rockchip: Add ROCK 5 ITX board arm64: dts: rockchip: Add dma-names to uart1 on Pine64 rk3566 devices arm64: dts: rockchip: Add avdd supplies to hdmi on rock64 arm64: dts: rockchip: fixes PHY reset for Lunzn Fastrhino R68S arm64: dts: rockchip: disable display subsystem for Lunzn Fastrhino R6xS arm64: dts: rockchip: remove unused usb2 nodes for Lunzn Fastrhino R6xS arm64: dts: rockchip: fix pmu_io supply for Lunzn Fastrhino R6xS arm64: dts: rockchip: fix usb regulator for Lunzn Fastrhino R6xS arm64: dts: rockchip: fix regulator name for Lunzn Fastrhino R6xS arm64: dts: rockchip: Add dma-names to uart1 on quartz64-b arm64: dts: rockchip: Update GPU OPP voltages in RK356x SoC dtsi arm64: dts: rockchip: Add GPU OPP voltage ranges to RK356x SoC dtsi arm64: dts: rockchip: Drop ethernet-phy-ieee802.3-c22 from PHY compatible string on all RK3588 boards arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu Link: https://lore.kernel.org/r/1998182.CrzyxZ31qj@diego Signed-off-by: Arnd Bergmann commit 34ce9c8b8ada0c03ea8f2a99fcc7a1b297ccaa95 Author: Felix Fietkau Date: Tue Jul 2 13:35:56 2024 +0200 wifi: nl80211: split helper function from nl80211_put_iface_combinations Create a helper function that puts the data from struct ieee80211_iface_combination to a nl80211 message. This will be used for adding per-radio interface combination data. Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/22a0eee19dbcf98627239328bc66decd3395122c.1719919832.git-series.nbd@nbd.name Signed-off-by: Johannes Berg commit b48b342dd5e6e9b0cda26ba07925e61c26e02578 Merge: d763debcb6458 3a5bb5066f4c7 Author: Rafael J. Wysocki Date: Mon Jul 8 17:25:36 2024 +0200 Merge tag 'linux-cpupower-6.11-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux into pm-tools Merge more cpupower utility changes for 6.11-rc1 from Shuah Khan: "This cpupower second update for Linux 6.11-rc1 consists of -- fix to install cpupower library in standard librray intall location - /usr/lib -- disable direct build of cpupower bench as it can only be built from the cpupower main makefile." * tag 'linux-cpupower-6.11-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: fix lib default installation path cpupower: Disable direct build of the 'bench' subproject commit 4359caadd17fbde64d656c10bd6f2dc91b675a11 Author: Elinor Montmasson Date: Thu Jun 27 10:31:02 2024 +0200 ASoC: dt-bindings: update fsl-asoc-card bindings after imx-spdif merge The S/PDIF audio card support with compatible "fsl,imx-audio-spdif" was merged from imx-spdif into the fsl-asoc-card driver. It makes possible to use an S/PDIF with an ASRC. This merge introduces new DT bindings to use with compatible "fsl,imx-audio-spdif" to follow the way fsl-asoc-card works: * the "spdif-controller" property from imx-spdif is named "audio-cpu" in fsl-asoc-card. * fsl-asoc-card uses codecs explicitly declared in DT with "audio-codec". With an SPDIF, codec drivers spdif_transmitter and spdif_receiver should be used. Driver imx-spdif used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". In an upcoming commit, in-tree DTs will be modified to follow these new properties: * Property "spdif-controller" will be renamed "audio-cpu". * spdif_transmitter and spdif_receiver nodes will be declared and linked to the fsl-asoc-card node with the property "audio-codec". To keep backward compatibility with other DTs, support for "spdif-controller", "spdif-in" and "spdif-out" properties is kept. However, it is recommended to use the new properties if possible. It is better to declare transmitter and/or receiver in DT than using the dummy codec. DTs using compatible "fsl,imx-audio-spdif" are still supported, and fsl-asoc-card will behave the same as imx-spdif for these DTs. Signed-off-by: Elinor Montmasson Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240627083104.123357-6-elinor.montmasson@savoirfairelinux.com Signed-off-by: Mark Brown commit 6d174cc4f22461ad3fe383570527e86bf1948a2e Author: Elinor Montmasson Date: Thu Jun 27 10:31:01 2024 +0200 ASoC: fsl-asoc-card: merge spdif support from imx-spdif.c The imx-spdif machine driver creates audio card to directly use an S/PDIF device. However, it doesn't support interacting with an ASRC. fsl-asoc-card already has the support to create audio card which can use the ASRC. Merge the S/PDIF support from imx-spdif into driver fsl-asoc-card to extend the support of S/PDIF audio card with the use of ASRC devices. fsl-asoc-card uses slightly different DT properties than imx-spdif: * the "spdif-controller" property from imx-spdif is named "audio-cpu" in fsl-asoc-card. * fsl-asoc-card uses codecs explicitly declared in DT with "audio-codec". With an SPDIF, codec drivers spdif_transmitter and spdif_receiver should be used. Driver imx-spdif used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". To keep backward compatibility, support for "spdif-controller", "spdif-in" and "spdif-out" is also added to fsl-asoc-card. However, it is recommended to use the new properties if possible. It is better to declare transmitter and/or receiver in DT than using the dummy codec. DTs using compatible "fsl,imx-audio-spdif" are still compatible, and fsl-asoc-card will behave the same as imx-spdif for these DTs. Signed-off-by: Elinor Montmasson Link: https://patch.msgid.link/20240627083104.123357-5-elinor.montmasson@savoirfairelinux.com Signed-off-by: Mark Brown commit fcc6ace84f1f6ce2211af25c3c8fb30a0fb2bb2c Author: Elinor Montmasson Date: Thu Jun 27 10:31:00 2024 +0200 ASoC: fsl-asoc-card: add compatibility to use 2 codecs in dai-links Adapt the driver to work with configurations using two codecs or more. Modify fsl_asoc_card_probe() to handle use cases where 2 codecs are given in the device tree. This will be needed to add support for the SPDIF. Use cases using one codec will ignore any given codecs other than the first. Co-developed-by: Philip-Dylan Gleonec Signed-off-by: Philip-Dylan Gleonec Signed-off-by: Elinor Montmasson Link: https://patch.msgid.link/20240627083104.123357-4-elinor.montmasson@savoirfairelinux.com Signed-off-by: Mark Brown commit c68fa0d9b0f8cc7c3ae7d29c02adbc97622a73f5 Author: Elinor Montmasson Date: Thu Jun 27 10:30:59 2024 +0200 ASoC: fsl-asoc-card: add second dai link component for codecs Add a second dai link component for codecs that will be used for use cases with 2 codecs. It is needed for future integration of the SPDIF support, which will use spdif_receiver and spdif_transmitter drivers. To prevent deferring in use cases using only one codec, also set by default the number of codecs to 1 for the relevant dai links. Co-developed-by: Philip-Dylan Gleonec Signed-off-by: Philip-Dylan Gleonec Signed-off-by: Elinor Montmasson Link: https://patch.msgid.link/20240627083104.123357-3-elinor.montmasson@savoirfairelinux.com Signed-off-by: Mark Brown commit a613b63db233b6e7d46ec72f009c1cbb7db8be66 Author: Elinor Montmasson Date: Thu Jun 27 10:30:58 2024 +0200 ASoC: fsl-asoc-card: add support for dai links with multiple codecs Add support for dai links using multiple codecs for multi-codec use cases. Co-developed-by: Philip-Dylan Gleonec Signed-off-by: Philip-Dylan Gleonec Signed-off-by: Elinor Montmasson Link: https://patch.msgid.link/20240627083104.123357-2-elinor.montmasson@savoirfairelinux.com Signed-off-by: Mark Brown commit 31f6b5a651f92ab83ab0c25f9acbb774b1e98642 Merge: 2d61b9303cec9 2904244a8c46b Author: Arnd Bergmann Date: Mon Jul 8 16:58:37 2024 +0200 Merge tag 'riscv-dt-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt RISC-V Devicetrees for v6.11 T-Head: Last change from me before this starts going via Drew's tree is the addition of the SBI PMU events node for the th1520. StarFive: A dts for the Pin64 Star64, another board with a jh7110 SoC. This board is almost identical to the existing Milk-v Mars and VisionFive 2 boards that are already support - just with a different PHY configuration and only one of the two PCIe ports exposed. Additionally, the Mars and VisionFive 2 get their PCie configuration added. Microchip: A dts for the BeagleV Fire. PCIe is disabled on it for now, as some binding and driver changes are required. Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: add PCIe dts configuration for JH7110 riscv: dts: microchip: add an initial devicetree for the BeagleV Fire dt-bindings: riscv: microchip: document beaglev-fire riscv: dts: starfive: Update flash partition layout riscv: dts: thead: th1520: Add PMU event node riscv: dts: starfive: add Star64 board devicetree dt-bindings: riscv: starfive: add Star64 board compatible dt-bindings: riscv: Add T-HEAD C908 compatible Link: https://lore.kernel.org/r/20240707-nuttiness-lustfully-4aaf03c991b2@spud Signed-off-by: Arnd Bergmann commit 49b29a573da83b65d5f4ecf2db6619bab7aa910c Author: Christoph Hellwig Date: Mon May 27 18:36:09 2024 +0200 nfs: add support for large folios NFS already is void of folio size assumption, so just pass the chunk size to __filemap_get_folio and set the large folio address_space flag for all regular files. Signed-off-by: Christoph Hellwig Tested-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 9aac777aaf9459786bc8463e6cbfc7e7e1abd1f9 Author: Matthew Wilcox (Oracle) Date: Mon May 27 18:36:08 2024 +0200 filemap: Convert generic_perform_write() to support large folios Modelled after the loop in iomap_write_iter(), copy larger chunks from userspace if the filesystem has created large folios. [hch: use mapping_max_folio_size to keep supporting file systems that do not support large folios] Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Christoph Hellwig Tested-by: Shaun Tancheff Tested-by: Sagi Grimberg Signed-off-by: Anna Schumaker commit 146a99aefe4a45f68ed371709103cd1dbba6128c Author: Tanzir Hasan Date: Tue Jan 2 22:22:18 2024 +0000 xprtrdma: removed asm-generic headers from verbs.c asm-generic/barrier.h and asm/bitops.h are already brought into the file through the header linux/sunrpc/svc_rdma.h and the file can still be built with their removal. They have been replaced with the preferred linux/bitops.h and asm/barrier.h to remove the need for the asm-generic header. Suggested-by: Al Viro Signed-off-by: Tanzir Hasan Acked-by: Chuck Lever Signed-off-by: Anna Schumaker commit 8060be2489f9bfa0c603373fa71cc2f93e46e462 Author: Frieder Schrempf Date: Mon Jul 8 10:40:31 2024 +0200 dt-bindings: gpio: vf610: Allow gpio-line-names to be set Describe common "gpio-line-names" property to allow DTs to specify names for GPIO lines. Signed-off-by: Frieder Schrempf Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240708084107.38986-2-frieder@fris.de Signed-off-by: Bartosz Golaszewski commit 4814241a5817ce8140dda8f1375bf76f99e68697 Author: Guenter Roeck Date: Mon Jul 1 08:57:58 2024 -0700 hwmon: (amc6821) Add support for pwm1_mode attribute AMC6821 supports configuring if a fan is DC or PWM controlled. Add support for the pwm1_mode attribute to make it runtime configurable. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit e98ab50e1f2dd6ab8d1bddae4f9857725defafbc Author: Guenter Roeck Date: Wed Jun 26 17:20:40 2024 -0700 hwmon: (amc6821) Convert to with_info API Convert to use with_info API to simplify the code and make it easier to maintain. This also reduces code size by approximately 20%. No functional change intended. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit a051d507ba1718e0e833f3d8d80defc85ca20c2d Author: Guenter Roeck Date: Thu Jun 27 10:48:27 2024 -0700 hwmon: (amc6821) Convert to use regmap Use regmap for register accesses and caching. While at it, use sysfs_emit() instead of sprintf() to write sysfs attribute data, and remove spurious debug messages which would only be seen as result of a bug in the code. Also make sure that error codes are propagated and not replaced with -EIO. While at it, introduce rounding of written temperature values and for internal calculations to reduce deviation from written values and as much as possible. No functional change intended except for differences introduced by rounding. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit 8d061050fd826b0cc425765b1ac22b4c088dedbb Author: Guenter Roeck Date: Thu Jun 27 11:08:14 2024 -0700 hwmon: (amc6821) Drop unnecessary enum chips The driver only supports a single chip, so an enum to determine the chip type is unnecessary. Drop it. No functional change intended. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit a9c2f41f02aba3ceb0f9f795dc00753a52b284cd Author: Guenter Roeck Date: Thu Jun 27 09:46:12 2024 -0700 hwmon: (amc6821) Use BIT() and GENMASK() Use BIT() and GENMASK() for bit and mask definitions to help distinguish bit and mask definitions from other defines and to make the code easier to read. No functional change intended. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit d632e82993899a837ba0efb6679584aa3efc16b6 Author: Guenter Roeck Date: Thu Jun 27 09:41:41 2024 -0700 hwmon: (amc6821) Use tabs for column alignment in defines Using tabs for column alignment makes the code easier to read. No functional change intended. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit e5cd7dd9a4e6e0692938e00fb43f14fb4711c17b Author: Guenter Roeck Date: Thu Jun 27 08:27:53 2024 -0700 hwmon: (amc6821) Reorder include files, drop unnecessary ones Reorder include files to alphabetic order to simplify maintenance, and drop the unnecessary kernel.h include. No functional change intended. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit becbd16ed2f8f427239ffda66b5d894008bc56af Author: Guenter Roeck Date: Thu Jun 27 07:50:48 2024 -0700 hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4 After setting fan1_target and setting pwm1_enable to 4, the fan controller tries to achieve the requested fan speed. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit 154a0c2bd6694c45d34a1688e1d9a41f5a854b3f Author: Guenter Roeck Date: Thu Jun 27 07:05:35 2024 -0700 hwmon: (amc6821) Rename fan1_div to fan1_pulses The chip does not have a fan divisor. What it does have is a configuration to set either 2 or 4 pulses per fan rotation. Rename the attribute to reflect its use. Update documentation accordingly. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit 8f4fd97df27ea4bc8b569c647fb2189a57047cac Author: Guenter Roeck Date: Wed Jun 26 17:46:04 2024 -0700 hwmon: (amc6821) Make reading and writing fan speed limits consistent The default value of the maximum fan speed limit register is 0, essentially translating to an unlimited fan speed. When reading the limit, a value of 0 is reported in this case. However, writing a value of 0 results in writing a value of 0xffff into the register, which is inconsistent. To solve the problem, permit writing a limit of 0 for the maximim fan speed, effectively translating to "no limit". Write 0 into the register if a limit value of 0 is written. Otherwise limit the range to <1..6000000> and write 1..0xffff into the register. This ensures that reading and writing from and to a limit register return the same value while at the same time not changing reported values when reading the speed or limits. While at it, restrict fan limit writes to non-negative numbers; writing a negative limit does not make sense and should be reported instead of being corrected. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit af4d04b8ce08a734889fb0777059063635242614 Author: Guenter Roeck Date: Wed Jun 26 17:21:54 2024 -0700 hwmon: (amc6821) Stop accepting invalid pwm values The pwm value range is well defined from 0..255. Don't accept any values outside this range. This changes the valid range of pwm1_auto_point2_pwm from 0..254 to 0..255, meaning it can now be equivalent to not only pwm1_auto_point1_pwm (which is always 0) but also to pwm1_auto_point3_pwm (which is always 255). While that may not be practical, there seems to be no technical reason for preventing a user from doing it. Reviewed-by: Quentin Schulz Signed-off-by: Guenter Roeck commit 2d61b9303cec948fb619d18c6d5808ae7767e58b Merge: 462eeb978db80 968178e35e78e Author: Arnd Bergmann Date: Mon Jul 8 16:40:03 2024 +0200 Merge tag 'qcom-arm64-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm Arm64 DeviceTree updates for v6.11 This introduces 11 new boards, namely: * ASUS Vivobook S 15 * Lenovo Smart Tab M10 DTS * Motorola Moto E 2015 LTE (surnia) * Motorola Moto G 2015 (osprey) * Motorola Moto G4 Play (harpia) * Qualcomm AIM300 AIoT development board * Qualcomm SM8650 Hardware Development Kit (HDK) * SHIFTphone 8 * Samsung Galaxy Z Fold5 * Schneider HMIBSC board DTS * TP-Link Archer AX55 v1 Of particular interest here is the Asus Vivobook, the first supported X1 Elite consumer laptop. For IPQ6018 an SDHCI controller is added and on IPQ9574 an MDIO bus is described. The improvements to MSM8916-based devices continues, with sound and mdoem support added to Acer Iconia Talk S and GPLUS FL8005A, the latter also gaining BMS support. Samsung Galaxy devices gains PMIC and charger definitions, NFC support and MUIC. Accelerometer and magnetometer support is added to the Samsung Galaxy Grand Prime devices. On MSM8976 definitions for IOMMU, the display subsystem, wifi subsystem, and Adreno GPU are added. On MSM8996 UFS core clock frequencies are specified, FastRPC nodes are added for the audio DSP, glink-edges are described where available, the display subsystem reset is added. Venus is introduced on MSM8998 and the "No MSA Ready" quirk is added to allow ath10k to come up. GPU support is added to QCM2290 and enabled on the RB1 development board. The I2C controller used for communicating with the LT9611UXC HDMI bridge is temporarily replaced with i2c-gpio while issues with the builtin controller is diagnosed. The same is done for RB2, on the QRB4210 platform. On RB2 TCPM max current draw is corrected and the vreg_l9a regulator is marked as always on to match expectations. On the QDU1000 platform, USB is added, secure QFPROM is introduced to allow LLCC to access OTP data. USB is enabled on the two IDP boards. SA8775p gains PCIe endpoint definitions, LLCCC support, IMEM and PIL info regions. Nodes are marked as dma-coherent as needed, a dedicated carveout for shared memory bridge allocations is introduced. The SA8775P ride device is split in the two versions r2 and r3. The SC7180 Trogdor clamshell/detachable fragments are refactored for convenience, and pwmleds are disabled where unused. On SC7280 the APR nodes for interfacing with the audio services in audio DSP firmware are introduced. The Qualcomm SMMU TBUs are described, to enable improved debug support. QoS clocks are added to interconnects, as needed in order to operate the QoS settings on some buses. SuperSpeed in park is disabled for the primary DWC3 instance to address host controller issues under load. The PM8008 (camera PMIC) is introduced in Fairphone 5, regulators are named for better output, and firmware name for IPA is adjusted to the preferred file format. The HDMI bridge on Rb3gen2 is described, rtc, gpi-dma and qup nodes are enabled. The Type-C port manager found in PM7250b is enabled, for targets not using pmic-glink firmware for Type-C management. SC8180X gets a number of smaller corrections, and some cleanups - related to both functional issues and DeviceTree validation. The PSHOLD node is marked reserved, after reports that this causes issues during shutdown. Description of the USB signals are updated to match the signal path. The PM8008 camera PMIC is added to Lenovo ThinkPad X13s. The PM660 PMIC is extended with charger and rradc definitions, and the SDM670 gains a SMEM region definition. On SDM845 the Qualcomm SMMU TBU nodes are described, to enable improved debug output during faults etc. The UFS PHY is associated with its GDSC, and the DisplayPort controller is wired up to the QMP PHY. The Lenovo Yoga C630 Embedded Controller is introduced, adding battery and Type-C port management and altmode support. The C630 also gains WiFI calibration variant information, to cause selection of the right data. The missing IPA firmware path is corrected. For the SDX75 platform, AOSS, IPCC, SDHCI, TCSR, modem SMP2P, I2C and SPI nodes are introduced. SD-card support is added to the IDP board. CPUfreq support is introduced for the SM4450 platform. Missing reset is added to the SDHC controller of SM6115. The UFS PHY is associated with its GDSC, so is the PHY on SM6350. On Fairphone 4, the camera pmic (PM8008) is introduced, regulators are named for more informative debug output, and USB role switching is enabled. On the Fairphone 3, vibrator support is added and enabled. On SM8250, the USB signal paths are properly described in the OF graph, the UFS PHY gains its required power-domains description. Thanks to the introduction of PCI power sequence support, the QRB5165 RB5 WiFi chip can now be powered up, so this is added. Touchscreen interrupt flags are corrected accross a number of Sony Xperia devices, to remove the unexpected traces from downstream. On SM8450 an OPP-table is introduced for the PCIe controllers, to specify the bandwidth and performance state requirements for the different genrations and link widths. For this the PCIe controllers also gains interconnect path definitions. The LLCC register layout is corrected, and the UFS PHY is associated with its GDSC. On the SM8550 development boards speaker port mapping is added. WiFi support is finally enabled on the QRD board. The new AIM300 development platform/board is introduced. For SM8650 video and camera clock controller are introduced. SCM node gains details necessary to trigger USB ramdump (download mode) upon a system crash. WiFi support and speaker port mapping is added to the QRD and the newly introduced HDK. On the MTP the USB Type-C connector is describe to be routed to the PHY. In addition to the base HDK, a Display Card overlay is also introduced. For X1 Elite bwmon, fastrpc and GPU support, tsens, and the missing PCIe 6a instance are added. Thermal zones are described. Pmic-glink is introduced for both CRD and QCP devices, and remaining PMICs are described. Audio support is also added to the QCP. An explicit, larger, chunk of CMA memory is added to the various devices, in order to compensate for the lack of IOMMU for PCIe. Across a wide range of platforms, the thermal zone polling delays are removed as supplies are interrupt driven anyways. Also thermal related is the introduction of GPU thermal throttling, across many SoCs. The old SMSM implementation is finally transitioned to using the mailbox-based description and implementation for invoking interrupts on remote processors. As such interrupt-triggering is converted to use this mechanism on related platforms. The usb-role-switch property is removed for all USB instances hard coded to either host or peripheral across a range of boards. * tag 'qcom-arm64-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (279 commits) dt-bindings: arm: qcom: Document samsung,ms013g arm64: dts: qcom: Add device tree for ASUS Vivobook S 15 dt-bindings: arm: qcom: Add ASUS Vivobook S 15 arm64: dts: qcom: qrb4210-rb2: Correct max current draw for VBUS arm64: dts: qcom: msm8998: add venus node arm64: dts: qcom: sa8775p-ride-r3: add new board file arm64: dts: qcom: move common parts for sa8775p-ride variants into a .dtsi dt-bindings: arm: qcom: add sa8775p-ride Rev 3 arm64: dts: qcom: sm8550-qrd: add port mapping to speakers arm64: dts: qcom: sm8550-mtp: add port mapping to speakers arm64: dts: qcom: sm8550-hdk: add port mapping to speakers arm64: dts: qcom: sm8650-qrd: add port mapping to speakers arm64: dts: qcom: sm8650-mtp: add port mapping to speakers arm64: dts: qcom: sm8650-hdk: add port mapping to speakers arm64: dts: qcom: sm7225-fairphone-fp4: Name the regulators arm64: dts: qcom: pm8916: correct thermal zone name arm64: dts: qcom: x1e80100: Add gpu support arm64: dts: qcom: x1e80100: Fix USB HS PHY 0.8V supply arm64: dts: qcom: qcs6490-rb3gen2: enable hdmi bridge arm64: dts: qcom: sm6115: add resets for sdhc_1 ... Link: https://lore.kernel.org/r/20240706173140.18887-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 02480fe8a6a6d44c16900b1d3a2a66d140d0a005 Author: Ilya Leoshkevich Date: Wed Jul 3 02:48:49 2024 +0200 selftests/bpf: Remove exceptions tests from DENYLIST.s390x Now that the s390x JIT supports exceptions, remove the respective tests from the denylist. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240703005047.40915-4-iii@linux.ibm.com commit fa7bd4b000a7ae32eb6fc049125943561e5b46f3 Author: Ilya Leoshkevich Date: Wed Jul 3 02:48:48 2024 +0200 s390/bpf: Implement exceptions Implement the following three pieces required from the JIT: - A "top-level" BPF prog (exception_boundary) must save all non-volatile registers, and not only the ones that it clobbers. - A "handler" BPF prog (exception_cb) must switch stack to that of exception_boundary, and restore the registers that exception_boundary saved. - arch_bpf_stack_walk() must unwind the stack and provide the results in a way that satisfies both bpf_throw() and exception_cb. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240703005047.40915-3-iii@linux.ibm.com commit 7ba4f43e16de351fe9821de80e15d88c884b2967 Author: Ilya Leoshkevich Date: Wed Jul 3 02:48:47 2024 +0200 s390/bpf: Change seen_reg to a mask Using a mask instead of an array saves a small amount of memory and allows marking multiple registers as seen with a simple "or". Another positive side-effect is that it speeds up verification with jitterbug. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240703005047.40915-2-iii@linux.ibm.com commit 462eeb978db8071722a3a546039943d42a297114 Merge: f01b3260d9eb9 e9ff907f40768 Author: Arnd Bergmann Date: Mon Jul 8 16:37:48 2024 +0200 Merge tag 'mvebu-dt64-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt64 for 6.11 (part 1) armada-3720: align GPIO keys and LED node namee with bindings Add description for solidrun cn9130 som and clearfog boards * tag 'mvebu-dt64-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: add description for solidrun cn9132 cex7 module and clearfog board arm64: dts: add description for solidrun cn9131 solidwan board arm64: dts: add description for solidrun cn9130 som and clearfog boards dt-bindings: arm64: marvell: add solidrun cn9132 CEX-7 evaluation board dt-bindings: arm64: marvell: add solidrun cn9130 som based boards arm64: dts: armada-3720: align LED node name with bindings arm64: dts: armada-3720: align GPIO keys node name with bindings Link: https://lore.kernel.org/r/87wmlzixln.fsf@BLaptop.bootlin.com Signed-off-by: Arnd Bergmann commit f01b3260d9eb96ed617f405671cd7de1f34db481 Merge: b4f8192afb401 731daaa5093d5 Author: Arnd Bergmann Date: Mon Jul 8 16:37:05 2024 +0200 Merge tag 'mvebu-dt-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt for 6.11 (part 1) armada-385: Add 7-segment LED display on x530 armada-385: Add Turris Omnia MCU related node armada-370 irqchip DT changes: Drop #size-cells from mpic node orion / kirkwood: few cleanups * tag 'mvebu-dt-6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: turris-omnia: Add GPIO key node for front button ARM: dts: turris-omnia: Add MCU system-controller node ARM: dts: marvell: orion: align LED node name with bindings ARM: dts: marvell: orion5x-lswsgl: use 'gpios' property for LEDs ARM: dts: marvell: orion: drop incorrect address/size-cells in GPIO keys ARM: dts: marvell: orion: align GPIO keys node name with bindings ARM: dts: marvell: kirkwood: align LED node name with bindings ARM: dts: marvell: kirkwood: drop incorrect address/size-cells in GPIO keys ARM: dts: marvell: kirkwood: align GPIO keys node name with bindings ARM: dts: armada-{370-xp,375,38x,39x}: Drop #size-cells from mpic node ARM: dts: marvell: Add 7-segment LED display on x530 Link: https://lore.kernel.org/r/87zfqvixn4.fsf@BLaptop.bootlin.com Signed-off-by: Arnd Bergmann commit b4f8192afb401a0bb3c784dd94a0ea086939dd74 Merge: 03b4edd51f290 6406c5d5512c0 Author: Arnd Bergmann Date: Mon Jul 8 16:34:32 2024 +0200 Merge tag 'ti-k3-dt-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt TI K3 device tree updates for v6.11 Generic Fixups/Cleanups: - main_pktdma reg ranges fixes - dtbs_check warning cleanups with addition of cpsw-mac-efuse node and dropping "syscon", "simple-mfd" compatibles in favor of simple-bus - Disable McASP FIFOs across SoCs for better latency - Add memory node to bootloader stage with bootph-all - Restructure am62p and j722s dtsi for share nodes across these SoCs - DT warning fixes around USB type-C connector node (AM62/AM62P) SoC Specific features and Fixes: AM62 - GPMC and ELM addition AM62A - Enable RTC by default - Crypto accelerator support AM64 and AM65 - PRU system event support AM69/J784S4: - CPSW2G and CPSW9G addition with QSGMII and UXSGMII board support - PCIe, USB, McASP, EHRPWM node additions AM67/J722s - Fix to update GPIO count - Add gpio-ranges definition - McASP support for audio - PCIe, USB, Serdes support Board Specific features and fixes: AM62 - am62x-phyboard-lyra carrier board support - am625-verdin: nau8822 PLL support - sk: CMA node addition - lp-sk: NAND expansion card overlay AM62A - New phyboard-lyra-am62ax from phytec - CMA node addition AM64: - phycore-board: PMIC support - hummingbird-t: RS485 RTS pin polarity update - am6xx-phycore-som: overlays for variants w/o SPI, RTC, ETH PHY or w/ QSPI - EVM: GPMC NAND expansion card overlay - EVM: ICSSG ethernet MII mode overlay support - SK: power supply temp sensors support AM68 - SK: PMIC, OSPI J721e - SK: MCAN Support - Overlay for infotainment expansion board AM69/J784S4 - EVM: PCIe RC/EP, USB3, MCAN support - SK: PMIC support * tag 'ti-k3-dt-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (89 commits) arm64: dts: ti: k3-am62a7-sk: Reserve 576MiB of global CMA arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA arm64: dts: ti: k3-am62x-sk-common: Fix graph_child_address warns arm64: dts: ti: k3-am62p5-sk: fix graph_child_address warnings arm64: dts: ti: k3-j722s: Add gpio-ranges properties arm64: dts: ti: k3-am62p: Add gpio-ranges properties arm64: dts: ti: k3-pinctrl: Define a generic GPIO MUX Mode arm64: dts: ti: k3-am62: Add cpsw-mac-efuse node to wkup_conf arm64: dts: ti: k3-am62a: Add cpsw-mac-efuse node to wkup_conf arm64: dts: ti: k3-j784s4: Add cpsw-mac-efuse node to mcu_conf arm64: dts: ti: k3-j721s2: Add cpsw-mac-efuse node to mcu_conf arm64: dts: ti: k3-j721e: Add cpsw-mac-efuse node to mcu_conf arm64: dts: ti: k3-j7200: Add cpsw-mac-efuse node to mcu_conf arm64: dts: ti: k3-am65: Add cpsw-mac-efuse node to mcu_conf arm: dts: k3-am642-evm-nand: Add bootph-all to NAND related nodes arm64: dts: ti: Add basic support for phyBOARD-Lyra-AM62Ax dt-bindings: arm: ti: Add bindings for PHYTEC AM62Ax based hardware arm64: dts: ti: Add am62x-phyboard-lyra carrier board arm64: dts: ti: k3-am62a: Enable AUDIO_REFCLKx arm64: dts: ti: k3-j784s4-evm: Enable analog audio support ... Link: https://lore.kernel.org/r/37f251a1-f3bd-402f-ab22-cf786c3871d7@ti.com Signed-off-by: Arnd Bergmann commit 03b4edd51f290fbb414a8baa9cdae3ae8fc403fd Merge: a9fe0720f2441 419ed754a3b62 Author: Arnd Bergmann Date: Mon Jul 8 16:33:02 2024 +0200 Merge tag 'stm32-dt-for-v6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt STM32 DT for v6.11, round 1 Highlights: ---------- -MCU: - Add syscfg missing clock on stm32f429. - MPU: - STM32MP13: - Add camera support on stm32mp135f-dk bord using DCMIPP and GC2145 sensor. - Document PWM output for stm32mp135f-dk - Add goodix touchscreen support on stm32mp135f-dk board. - Add new DH DHCOR / DHSBC board (Som + carrier board) based on STM32MP135F SoC. SOM part contains: STM32MP135F SoC, 512MB DDR2L RAM and eMMC/SDIO wifi module. The carrier boards embedds 2 RGMII ETH ports, USB-A,USB-C and an extansion connector. - Add Ethernet controller support on stm32mp135f-dk. It uses LAN8742A PHY based on RMII. - STMP32MP15: - Rework Octavo OSD32MP1 split for USB phy. - Add OP-TEE IRQ for asynchronous notification support. It allows OP-TEE to trig Linux. - STM32MP25: - Add OP-TEE IRQ for asynchronous notification support. It allows OP-TEE to trig Linux. - Enable firewall for RCC. - Add all U(s)ART nodes for stm32mp25. - Add 3 power domains for low power modes. - Add HPDMA support. - Add Ethernet controller (ETH2) support on stm32mp257f-ev1. It uses Realtek PHY based on RGMII. - Add and enable SCMI regulator support. * tag 'stm32-dt-for-v6.11-1' of https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (31 commits) arm64: dts: st: describe power supplies for stm32mp257f-ev1 board arm64: dts: st: add scmi regulators on stm32mp25 regulator: Add STM32MP25 regulator bindings ARM: dts: stm32: omit unused pinctrl groups from stm32mp13 dtb files arm64: dts: st: enable Ethernet2 on stm32mp257f-ev1 board arm64: dts: st: add eth2 pinctrl entries in stm32mp25-pinctrl.dtsi arm64: dts: st: add ethernet1 and ethernet2 support on stm32mp25 arm64: dts: st: add HPDMA nodes on stm32mp251 ARM: dts: stm32: Add ethernet support for DH STM32MP13xx DHCOR DHSBC board ARM: dts: stm32: order stm32mp13-pinctrl nodes ARM: dts: stm32: add ethernet1 for STM32MP135F-DK board ARM: dts: stm32: add ethernet1/2 RMII pins for STM32MP13F-DK board ARM: dts: stm32: add ethernet1 and ethernet2 support on stm32mp13 ARM: dts: stm32: Document output pins for PWMs on stm32mp135f-dk ARM: dts: stm32: OP-TEE async notif interrupt for ST STM32MP15x boards ARM: dts: stm32: Missing clocks for stm32f429's syscfg. ARM: dts: stm32: Add support for STM32MP13xx DHCOR SoM and DHSBC board ARM: dts: stm32: Add pinmux nodes for DH electronics STM32MP13xx DHCOR SoM and DHSBC board dt-bindings: arm: stm32: Add compatible string for DH electronics STM32MP13xx DHCOR DHSBC board ARM: dts: stm32: osd32: move pwr_regulators to common ... Link: https://lore.kernel.org/r/8f10bd29-d067-4060-89ff-2e1a605f3141@foss.st.com Signed-off-by: Arnd Bergmann commit a9fe0720f2441574f732c937c63461b4e9710a14 Merge: 8b5d415c4f9cc 2a5454d0fe568 Author: Arnd Bergmann Date: Mon Jul 8 16:31:46 2024 +0200 Merge tag 'qcom-arm32-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm Arm32 DeviceTree updates for v6.11 This introduces new support for the Sony Xperia Z3 Compact, HTC One (M8), Samsung Galaxy Tab 4 8.0 Wi-Fi, Samsung Galaxy Grand 2, and Samsung Galaxy Note 3 devices. The Motorola Moto G and Motorola Moto G 4G gains accelerometer and magnetometer support, with the latter also getting framebuffer supplies and a temperature sensor wired up. The SMBB (charger block) is enabled across all MSM8x26 Lumia devices, as this is used for USB state changes. The operating mode for SDC regulator is set to HPM on Sony Xperia "Shinano" family to avoid brownouts on uSD-cards. The panel on LGE Nexus 5 is connected to the backlight, to make this turn off on blanking. MSM8974 is transitioned to use the mailbox-abstraction for invoking PC interrupts on remote processors. * tag 'qcom-arm32-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (24 commits) ARM: dts: qcom: qcom-msm8226-samsung-ms013g: Add initial device tree ARM: dts: qcom: apq8064: drop incorrect ranges from QFPROM ARM: dts: qcom: msm8926-motorola-peregrine: Add framebuffer supplies ARM: dts: qcom: msm8926-motorola-peregrine: Update temperature sensor ARM: dts: qcom: msm8926-motorola-peregrine: Add accelerometer, magnetometer, regulator ARM: dts: qcom: msm8974: Use mboxes in smsm node ARM: dts: qcom: msm8974-sony-shinano: increase load on l21 for sdhc2 ARM: dts: qcom: Add Sony Xperia Z3 Compact smartphone ARM: dts: qcom: use generic node names for Adreno and QFPROM ARM: dts: qcom: motorola-falcon: add accelerometer, magnetometer ARM: dts: qcom: Add initial support for HTC One (M8) ARM: dts: qcom: msm8974: Use mboxes properties for APCS ARM: dts: qcom: mdm9615: drop #power-domain-cells property of GCC ARM: dts: qcom: ipq8064: drop #power-domain-cells property of GCC ARM: dts: qcom: ipq4019: drop #power-domain-cells property of GCC ARM: dts: qcom: msm8960: drop #power-domain-cells property of GCC ARM: dts: qcom: msm8660: drop #power-domain-cells property of GCC ARM: dts: qcom: apq8064: drop #power-domain-cells property of GCC ARM: dts: qcom: msm8974: Use proper compatible for APCS syscon ARM: dts: qcom: msm8974-hammerhead: Update gpio hog node name ... Link: https://lore.kernel.org/r/20240705032926.13333-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 8b5d415c4f9cc5a147c791d0300ee0b0cd8deae0 Author: Linus Walleij Date: Wed Jul 3 15:23:41 2024 +0200 ARM: dts: ixp4xx: nslu2: beeper uses PWM The beeper in the NSLU2 is just a GPIO connected to a speaker, so we need to use PWM on the GPIO to get any kind of sound out. Tested with some random beeps by enabling INPUT_EVDEV and running beep.c with e.g. beep 400 for a 400 Hz tone. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/20240627-ixp4xx-dts-v1-1-cdbbe1150873@linaro.org Link: https://lore.kernel.org/r/20240703-ixp4xx-dts-v1-1-e5149da36f6e@linaro.org Signed-off-by: Arnd Bergmann commit 9289b97a672dca3236f2bf8fb5e40f7e78b056d6 Merge: b85aad3db17d1 0ce1d34678e5d Author: Arnd Bergmann Date: Mon Jul 8 16:30:22 2024 +0200 Merge tag 'sunxi-dt-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt Allwinner SoC device tree changes for 6.11 This includes a commit shared with the clk tree. This commit adds clock and reset indices to the device tree binding, and thus is needed for both the device tree and driver changes. ARM64 device tree and binding-only changes - Add LRADC (low resolution ADC for resistor network based keys) for H616 SoC - Add cache information for A64, H6, and H616 SoCs - Correct model names and descriptions for Pine64 boards - Add GPADC (general purpose ADC) for H616 SoC - Add ADC joysticks based on GPADC for anbernic-rg35xx-h board - Add additional CPU OPPs for the H700 on top of existing H616 ones - Enable DVFS for rg35xx boards - Add IOMMU for H616 SoC RISC-V device tree changes - Add system LDOs to D1s/T113 SoC - Add ClockworkPi and DevTerm device trees * tag 'sunxi-dt-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: dts: allwinner: Add ClockworkPi and DevTerm devicetrees riscv: dts: allwinner: d1s-t113: Add system LDOs arm64: dts: allwinner: h616: add IOMMU node arm64: dts: allwinner: rg35xx: Enable DVFS CPU frequency scaling arm64: dts: allwinner: h616: add additional CPU OPPs for the H700 arm64: dts: allwinner: anbernic-rg35xx-h: Add ADC joysticks arm64: dts: allwinner: h616: Add GPADC device node dt-bindings: clock: sun50i-h616-ccu: Add GPADC clocks ARM: dts: sunxi: remove duplicated entries in makefile arm64: dts: allwinner: Add cache information to the SoC dtsi for H616 arm64: dts: allwinner: Add cache information to the SoC dtsi for A64 arm64: dts: allwinner: Correct the model names for Pine64 boards dt-bindings: arm: sunxi: Correct the descriptions for Pine64 boards arm64: dts: allwinner: Add cache information to the SoC dtsi for H6 ARM: dts: sun50i: Add LRADC node dt-bindings: input: sun4i-lradc-keys: Add H616 compatible Link: https://lore.kernel.org/r/ZoQa8r1N8yi7FlPV@wens.tw Signed-off-by: Arnd Bergmann commit b85aad3db17d144b5c975479d9623c3075d5cf2f Merge: f01448addcb9e e796887c06d17 Author: Arnd Bergmann Date: Mon Jul 8 16:28:41 2024 +0200 Merge tag 'imx-dt64-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm64 device tree change for 6.11: - New board support: imx8mm-iot-gateway, imx93-9x9-qsb, imx95-19x19-evk, imx8mp-tqma8mpql-mba8mp-ras314, etc. - A series from Adam Ford that improves imx8mp-beacon-kit support by fixing dtschema issues and enabling HDMI bridge HPD - A set of changes from Alexander Stein that adds partitions subnode to spi-nor - A great number of changes from Frank Li that add audio, flexcan, gpmi related devices for imx8dxl, imx8qm based boards - A bunch of layerscape dtschema issue fixes from Frank Li - A series from Krzysztof Kozlowski to use defines for interrupts - A number of improvements on i.MX8MP DHCOM devices from Marek Vasut - A couple of changes from Parthiban Nallathambi that add PCIe PHY and RS232/RS485 overlays for phygate-tauri-l board - A series from Shengjiu Wang that adds bt-sco and XCVR sound card support for imx8mp-evk - A series from Tim Harvey that fixes dt-schema warnings and adds DP83867 configuration for i.MX8M Venice devices - Other random feature additions and improvments on various boards * tag 'imx-dt64-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (91 commits) arm64: dts: imx8mp: Remove 'snps,rx-sched-sp' arm64: dts: imx8mm-verdin: add TPM device arm64: dts: imx8mp-evk: Add audio XCVR sound card arm64: dts: imx8mp: Add audio XCVR device node arm64: dts: imx8mp: Update Fast ethernet PHY MDIO addresses to match DH i.MX8MP DHCOM rev.200 arm64: dts: imx8mp: Do not reconfigure Audio PLL2 on DH i.MX8M Plus DHCOM SoM arm64: dts: layerscape: rename b(q)man-portals to b(q)man-portals-bus arm64: dts: fsl-ls1046a: rename thermal node name arm64: dts: fsl-ls1043a: remove unused clk-name at watchdog node arm64: dts: layerscape: rename aux_bus to aux-bus arm64: dts: layerscape: change pcie interrupt order arm64: dts: layerscape: rename node name "wdt" to "watchdog" arm64: dts: layerscape: add #dma-cells for qdma arm64: dts: layerscape: remove compatible string 'fsl,fman-xmdio' for fman3 arm64: dts: layerscape: replace node name 'nor' with 'flash' arm64: dts: fsl-ls1012a: remove property 'snps,host-vbus-glitches' arm64: dts: fsl-lx2160a: fix #address-cells for pinctrl-single arm64: dts: layerscape: add platform special compatible string for gpio arm64: dts: layerscape: rename node 'timer' as 'rtc' arm64: dts: imx8qxp-mek: Pass memory-region to the DSP node ... Link: https://lore.kernel.org/r/20240702142153.413061-4-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit cb31c58e8c294ff31ea842ee1fa2c06c9a9f1cc3 Author: Thomas Huth Date: Tue Jul 2 14:17:37 2024 +0200 drm/fbdev-dma: Fix framebuffer mode for big endian devices The drm_mode_legacy_fb_format() function only generates formats suitable for little endian devices. switch to drm_driver_legacy_fb_format() here instead to take the device endianness into consideration, too. Suggested-by: Thomas Zimmermann Signed-off-by: Thomas Huth Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Thomas Zimmermann Fixes: 6ae2ff23aa43 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()") Cc: Geert Uytterhoeven Cc: Javier Martinez Canillas Cc: Hamza Mahfooz Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: # v6.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20240702121737.522878-1-thuth@redhat.com commit f01448addcb9ede2d5d2762229cd26fc2540813a Merge: 07fd5cc010bfc dac1c5043a083 Author: Arnd Bergmann Date: Mon Jul 8 16:27:30 2024 +0200 Merge tag 'imx-dt-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX ARM device tree change for 6.11: - A few changes from Krzysztof Kozlowski to fix dtschema issues - A series from Michael Walle to improve kontron-samx6i SoM support by fixing various errors and add kontron-samx6i-ads2 board - Add LVDS port data mapping for M53 Menlo board - Convert NVMEM usage to layout syntax on MBA6 boards * tag 'imx-dt-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6qdl-kontron-samx6i: add actual device trees ARM: dts: imx6qdl-kontron-samx6i: remove wake-up-gpio property ARM: dts: imx6qdl-kontron-samx6i: fix PCIe reset polarity ARM: dts: imx6qdl-kontron-samx6i: fix node names ARM: dts: imx6qdl-kontron-samx6i: add SDIO_PWR_EN support ARM: dts: imx6qdl-kontron-samx6i: always enable eMMC ARM: dts: imx6qdl-kontron-samx6i: fix product name ARM: dts: imx6qdl-kontron-samx6i: fix SPI0 chip selects ARM: dts: imx6qdl-kontron-samx6i: cleanup the PMIC node ARM: dts: imx6qdl-kontron-samx6i: fix board reset ARM: dts: imx6qdl-kontron-samx6i: fix PHY reset ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode ARM: dts: nxp: imx6: convert NVMEM content to layout syntax ARM: dts: e60k02: fix aliases for mmc ARM: dts: imx: Add LVDS port data mapping on M53 Menlo ARM: dts: imx28-tx28: drop redundant 'panel-name' property ARM: dts: imx: drop redundant 'u-boot,panel-name' property ARM: dts: imx6dl-aristainetos2_4: drop redundant 'power-on-delay' property ARM: dts: imx: correct choice of panel native mode ARM: dts: imx: align panel timings node name with dtschema Link: https://lore.kernel.org/r/20240702142153.413061-3-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit 07fd5cc010bfcd5b6d19baebe22e4c9b1dc25dfb Merge: 7120733d1d124 189375a4b36ac Author: Arnd Bergmann Date: Mon Jul 8 16:26:49 2024 +0200 Merge tag 'imx-bindings-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX DT bindings for 6.11: - Add compatible string for various new boards - Drop Li Yang as maintainer for bindings as his email bounces * tag 'imx-bindings-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: document Kontron SMARC-sAMX6i boards dt-bindings: arm: add MBa8MP-RAS314 SBC dt-bindings: arm: fsl: add i.MX93 9x9 QSB board dt-bindings: arm: fsl: add i.MX95 19x19 EVK board dt-bindings: arm: fsl: Document Compulab IOT-GATE-iMX8 dt-bindings: Drop Li Yang as maintainer for all bindings Link: https://lore.kernel.org/r/20240702142153.413061-2-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit 7120733d1d124626b424d1e61db43ff6f5e25f87 Merge: 90a4146de8f85 90b6de4550aac Author: Arnd Bergmann Date: Mon Jul 8 16:25:58 2024 +0200 Merge tag 'dt-cleanup-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM DTS for v6.11 Few cleanups and improvements which were missed by their maintainers: 1. Add Krzysztof as odd-fixer for old ARM platforms: Alphascale, AXM LSI, Moxa, TI Nspire and VT8500 (with Alexey Charkov). 2. VT8500: align node names with bindings (USB, panel timings). 3. Cirrus: align node names with bindings (panel timings). 4. TI Nspire: correct unit addresses, correct watchdog compatible and properties while making it disabled (never tested). 5. Nuvoton, Aspeed: align node names with bindings (I2C). IMPORTANT: At least for Aspeed it is known to affect some user-space tools, because that user-space looks for specific node path via /sys/firmware/devicetree. The /sys/firmware/devicetree is not the ABI and any user-space relying on it: - Prevents any changes in DTS, e.g. node renaming or moving, changing unit addresses (re-arranging child bus addressing). - Is using undocumented interface. - Is neither reliable nor understandable. 6. TI OMAP and Davinci: align node names with bindings (panel timings), drop incorrect property. 7. STI: document in bindings codec child to fix dtbs_checks. * tag 'dt-cleanup-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: omap am5729-beagleboneai: drop unneeded ti,enable-id-detection dt-bindings: soc: sti: st,sti-syscon: document codec node ARM: dts: ti: align panel timings node name with dtschema arm: dts: aspeed: Use standard 'i2c' bus node name arm: dts: nuvoton: Use standard 'i2c' bus node name MAINTAINERS: ARM: alphascale: add Krzysztof Kozlowski as maintainer ARM: dts: nspire: Add full compatible for watchdog node ARM: dts: nspire: Add unit name addresses to memory nodes MAINTAINERS: ARM: nspire: add Krzysztof Kozlowski as maintainer MAINTAINERS: ARM: vt8500: add Alexey and Krzysztof as maintainers MAINTAINERS: ARM: axm: add Krzysztof Kozlowski as maintainer MAINTAINERS: ARM: moxa: add Krzysztof Kozlowski as maintainer ARM: dts: cirrus: align panel timings node name with dtschema ARM: dts: vt8500: align panel timings node name with dtschema ARM: dts: vt8500: replace "uhci" nodename with generic name "usb" Link: https://lore.kernel.org/r/20240702065359.7378-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 31390eb8ffbf2b6be7d789708ec08b635d7a3eb8 Author: Heiko Stuebner Date: Thu Jul 4 17:38:15 2024 +0200 arm64: dts: rockchip: add ROCK 5 ITX board The ROCK 5 ITX as the name suggests is made in the ITX form factor and actually built in a form to be used in a regular case even providing connectors for regular front-panel io. It can be powered either by 12V, ATX power-supply or PoE. Notable peripherals are the 4 SATA ports, M.2 M-Key slot, M.2 E-key slot, 2*2.5Gb PCIe-connected Ethernet NICs. As of yet unsupported display options consist of 2*HDMI, DP via USB-c, eDP + 2*DSI via PCB connectors. USB ports are 4*USB3 + 2*USB2 on the back panel and 2-port front-panel connector. Schematics for the board can be found on - https://dl.radxa.com/rock5/5itx/radxa_rock_5_itx_X1100_schematic.pdf - https://dl.radxa.com/rock5/5itx/v1110/radxa_rock_5itx_v1110_schematic.pdf Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240704153815.837392-3-heiko@sntech.de commit 8687469a51af609ad4180c3ac2624b836fd55ff8 Author: Heiko Stuebner Date: Thu Jul 4 17:38:14 2024 +0200 dt-bindings: arm: rockchip: Add ROCK 5 ITX board Add devicetree binding for the ROCK 5 ITX board, built around the rk3588. Acked-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240704153815.837392-2-heiko@sntech.de commit 3087576e1c706bcd3623b48478ea8c9b23173107 Author: Diederik de Haas Date: Fri Jul 5 18:22:14 2024 +0200 arm64: dts: rockchip: Add dma-names to uart1 on Pine64 rk3566 devices Similar to bf6f26deb0e8 ("arm64: dts: rockchip: Add dma-names to uart1 on quartz64-b") also add the dma-names property to the other rk3566 devices from Pine64 with bluetooth functionality. Signed-off-by: Diederik de Haas Tested-by: Riley Trautman Link: https://lore.kernel.org/r/20240705163004.29678-4-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit dbdadc14b94e1c0326a430c1f84592a9b5c6b6d2 Author: Diederik de Haas Date: Thu Jul 4 21:18:33 2024 +0200 arm64: dts: rockchip: Add avdd supplies to hdmi on rock64 Pine64's Rock64 was missing the avdd supply properties on the hdmi node, causing the following warnings: dwhdmi-rockchip ff3c0000.hdmi: supply avdd-0v9 not found, using dummy regulator dwhdmi-rockchip ff3c0000.hdmi: supply avdd-1v8 not found, using dummy regulator In the Rock64 Schematic document version 2.0 those supplies are marked as DVIDEO_AVDD_1V0 and DVIDEO_AVDD_1V8 respectively, but in version 3.0 those are named HDMI_AVDD_1V0 and HDMI_AVDD_1V8, which is a bit clearer. In both versions those are connected to LDO3 and LDO1 respectively. While the DeviceTree property is named 'avdd-0v9-supply' the 'rockchip,dw-hdmi.yaml' binding document notes the following: A 0.9V supply that powers up the SoC internal circuitry. The actual pin name varies between the different SoCs and is usually HDMI_TX_AVDD_0V9 or sometimes HDMI_AVDD_1V0. So the 'vdd_10' reference is not an error. Signed-off-by: Diederik de Haas Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20240704191919.38856-1-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit 90a4146de8f859312ef003e843d3c80c4cad6bed Merge: c36a19ed7ed0e c030444661153 Author: Arnd Bergmann Date: Mon Jul 8 16:24:55 2024 +0200 Merge tag 'dt64-cleanup-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM64 DTS for v6.11 Few cleanups and improvements which were missed by their maintainers: 1. Spreadtrum: correct PMU nodes - split per clusters. 2. HiSilicon: add dedicated compatible to syscon node ("syscon" alone is not allowed). 3. APM: add dedicated compatible to syscon node (binding applied to MFD tree). * tag 'dt64-cleanup-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: apm: Add dedicated syscon poweroff compatibles arm64: dts: hisilicon: hi3660: add dedicated hi3660-usb3-otg-bc compatible dt-bindings: soc: hisilicon: document hi3660-usb3-otg-bc arm64: dts: sprd: Split PMU nodes for heterogeneous CPUs Link: https://lore.kernel.org/r/20240702065359.7378-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit c36a19ed7ed0edfa9bc129e1887cbdf027ca09f5 Merge: cdb3f6ba4b4c3 64c7ea42fcc2b Author: Arnd Bergmann Date: Mon Jul 8 16:23:59 2024 +0200 Merge tag 'samsung-dt64-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.10 1. Google GS101: Minor cleanup and add fake regulators to USB phy, to satisfy dtbs_check. The PMIC providing these regulators is not yet implemented. 2. Exynos850: Add True Random Number Generator. * tag 'samsung-dt64-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos850: Enable TRNG arm64: dts: exynos: gs101-oriole: add placeholder regulators for USB phy arm64: dts: exynos: gs101: reorder properties as per guidelines Link: https://lore.kernel.org/r/20240702063514.6215-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit bc239eb271e5f35fcade689c6782c962ef3704c8 Author: Dan Carpenter Date: Thu Jul 4 10:19:19 2024 -0500 bpf: Remove unnecessary loop in task_file_seq_get_next() After commit 0ede61d8589c ("file: convert to SLAB_TYPESAFE_BY_RCU") this loop always iterates exactly one time. Delete the for statement and pull the code in a tab. Signed-off-by: Dan Carpenter Signed-off-by: Daniel Borkmann Reviewed-by: Christian Brauner Acked-by: Jiri Olsa Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/ZoWJF51D4zWb6f5t@stanley.mountain commit cdb3f6ba4b4c3b92b0a7c24432fe7ae508eec562 Merge: 35b94a99fc67e 5e4bbe52207c3 Author: Arnd Bergmann Date: Mon Jul 8 16:21:53 2024 +0200 Merge tag 'tegra-for-6.11-arm64-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt arm64: tegra: Device tree changes for v6.11-rc1 This contains one patch that reworks the device tree structure for Jetson Orin NX and Jetson Orin Nano, which are both within the same family. This restructuring makes it easier to extend both platforms in a consistent way in the future. * tag 'tegra-for-6.11-arm64-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Restructure Orin NX/Nano device tree Link: https://lore.kernel.org/r/20240628210818.3627404-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 2080ca1ed3e43233c4e8480c0b9d2840886de01e Author: Gao Xiang Date: Wed Jul 3 20:00:51 2024 +0800 erofs: tidy up `struct z_erofs_bvec` After revisiting the design, I believe `struct z_erofs_bvec` should be page-based instead of folio-based due to the reasons below: - The minimized memory mapping block is a page; - Under the certain circumstances, only temporary pages needs to be used instead of folios since refcount, mapcount for such pages are unnecessary; - Decompressors handle all types of pages including temporary pages, not only folios. When handling `struct z_erofs_bvec`, all folio-related information is now accessed using the page_folio() helper. The final goal of this round adaptation is to eliminate direct accesses to `struct page` in the EROFS codebase, except for some exceptions like `z_erofs_is_shortlived_page()` and `z_erofs_page_is_invalidated()`, which require a new helper to determine the memdesc type of an arbitrary page. Actually large folios of compressed files seem to work now, yet I tend to conduct more tests before officially enabling this for all scenarios. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240703120051.3653452-4-hsiangkao@linux.alibaba.com commit 5b9654efb60423284dd0f8845812ac7216f60858 Author: Gao Xiang Date: Wed Jul 3 20:00:50 2024 +0800 erofs: teach z_erofs_scan_folios() to handle multi-page folios Previously, a folio just contains one page. In order to enable large folios, z_erofs_scan_folios() needs to handle multi-page folios. First, this patch eliminates all gotos. Instead, the new loop deal with multiple parts in each folio. It's simple to handle the parts which belong to unmapped extents or fragment extents; but for encoded extents, the page boundaries needs to be considered for `tight` and `split` to keep inplace I/Os work correctly: when a part crosses the page boundary, they needs to be reseted properly. Besides, simplify `tight` derivation since Z_EROFS_PCLUSTER_HOOKED has been removed for quite a while. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240703120051.3653452-3-hsiangkao@linux.alibaba.com commit 90cd33d79338b9df75ae91d1452be10e40443527 Author: Gao Xiang Date: Wed Jul 3 20:00:49 2024 +0800 erofs: convert z_erofs_read_fragment() to folios Just a straight-forward conversion. No logic changes. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240703120051.3653452-2-hsiangkao@linux.alibaba.com commit 1a4821a0a037f6bedd796a589d07d44547763da4 Author: Gao Xiang Date: Wed Jul 3 20:00:48 2024 +0800 erofs: convert z_erofs_pcluster_readmore() to folios Unlike `pagecache_get_page()`, `__filemap_get_folio()` returns error pointers instead of NULL, thus switching to `IS_ERR_OR_NULL`. Apart from that, it's just a straightforward conversion. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240703120051.3653452-1-hsiangkao@linux.alibaba.com commit a5912c37faf723c0812a6a2c9dd18ffbd34a233b Author: Puranjay Mohan Date: Mon Jul 8 11:47:58 2024 +0000 riscv, bpf: Optimize stack usage of trampoline When BPF_TRAMP_F_CALL_ORIG is not set, stack space for passing arguments on stack doesn't need to be reserved because the original function is not called. Only reserve space for stacked arguments when BPF_TRAMP_F_CALL_ORIG is set. Signed-off-by: Puranjay Mohan Signed-off-by: Daniel Borkmann Acked-by: Pu Lehui Link: https://lore.kernel.org/bpf/20240708114758.64414-1-puranjay@kernel.org commit 91f9f4a37124044089debb02a3965c59b5b10c21 Author: Adam Ford Date: Sun Jun 30 17:19:31 2024 -0500 drm/bridge: adv7511: Fix Intermittent EDID failures In the process of adding support for shared IRQ pins, a scenario was accidentally created where adv7511_irq_process returned prematurely causing the EDID to fail randomly. Since the interrupt handler is broken up into two main helper functions, update both of them to treat the helper functions as IRQ handlers. These IRQ routines process their respective tasks as before, but if they determine that actual work was done, mark the respective IRQ status accordingly, and delay the check until everything has been processed. This should guarantee the helper functions don't return prematurely while still returning proper values of either IRQ_HANDLED or IRQ_NONE. Reported-by: Liu Ying Fixes: f3d9683346d6 ("drm/bridge: adv7511: Allow IRQ to share GPIO pins") Signed-off-by: Adam Ford Tested-by: Liu Ying # i.MX8MP EVK ADV7535 EDID retrieval w/o IRQ Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240630221931.1650565-1-aford173@gmail.com Signed-off-by: Dmitry Baryshkov V3: Remove unnecessary declaration of ret by evaluating the return code of regmap_read directly. V2: Fix uninitialized cec_status Cut back a little on error handling to return either IRQ_NONE or IRQ_HANDLED. commit c17aecf85800ac91ec67fd7134107526a4bab3b0 Author: Liming Sun Date: Wed Jun 12 18:52:38 2024 -0400 mmc: dw_mmc-bluefield: Add support for eMMC HW reset The eMMC RST_N register is implemented as secure register on the BlueField SoC and controlled by TF-A. This commit sends an SMC call to TF-A for the eMMC HW reset. Reviewed-by: David Thompson Signed-off-by: Liming Sun Link: https://lore.kernel.org/r/2c459196c6867e325f9386ec0559efea464cfdd6.1718213918.git.limings@nvidia.com Signed-off-by: Ulf Hansson commit f21adcb86653e2b2784bbc0f180c332b50c404df Author: Liming Sun Date: Wed Jun 12 18:52:37 2024 -0400 mmc: dw_mmc: Add support for platform specific eMMC HW reset This commit adds a new callback to allow drivers to support platform specific eMMC HW reset. Reviewed-by: David Thompson Signed-off-by: Liming Sun Link: https://lore.kernel.org/r/3df02ffa8bdaa74f5261c8914d2545b97fb3478a.1718213918.git.limings@nvidia.com Signed-off-by: Ulf Hansson commit 5483cbfd863f01126c08703898a9e71d991a9bfe Author: Oleksij Rempel Date: Fri Jul 5 10:47:15 2024 +0200 net: dsa: microchip: lan9371/2: update MAC capabilities for port 4 Set proper MAC capabilities for port 4 on LAN9371 and LAN9372 switches with integrated 100BaseTX PHY. And introduce the is_lan937x_tx_phy() function to reuse it where applicable. Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli Acked-by: Arun Ramadoss Signed-off-by: David S. Miller commit 0f17a12787573dda66d2528fff27cd7362b34bfd Author: Frank Li Date: Wed Jul 3 12:59:31 2024 -0400 spi: dt-bindings: fsl-dspi: add compatible string 'fsl,lx2160a-dspi' Add compatible string 'fsl,lx2160a-dspi' and allow fall back to 'fsl,ls2085a-dspi'. Fix below CHECK_DTBS warning. arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: spi@2100000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,lx2160a-dspi', 'fsl,ls2085a-dspi'] is too long Signed-off-by: Frank Li Link: https://patch.msgid.link/20240703165931.2325807-2-Frank.Li@nxp.com Signed-off-by: Mark Brown commit 2de9ae2044c4f6490dbbfb8d93fe6b8cc60c91d1 Author: Frank Li Date: Wed Jul 3 12:59:30 2024 -0400 spi: dt-bindings: fsl-dspi: add dmas and dma-names properties Add dmas and dma-names properties because dspi support dma transfer. Fix below warnings: arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dtb: spi@2120000: Unevaluated properties are not allowed ('dma-names', 'dmas', 'little-endian' were unexpected) from schema $id: http://devicetree.org/schemas/spi/fsl,dspi.yaml# Reviewed-by: Krzysztof Kozlowski Signed-off-by: Frank Li Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240703165931.2325807-1-Frank.Li@nxp.com Signed-off-by: Mark Brown commit 3bca1a3808a9674c410dcae2ca07fb3fbd74e614 Author: Li zeming Date: Mon Jul 8 12:14:11 2024 +0800 spi: spi: Remove unnecessary ‘0’ values from status status is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Link: https://patch.msgid.link/20240708041411.14424-1-zeming@nfschina.com Signed-off-by: Mark Brown commit 0f2ecc3f6136a922f9d54499c80004bae6c42348 Author: Li zeming Date: Mon Jul 8 11:53:20 2024 +0800 spi: spi: Remove unnecessary ‘0’ values from rc rc is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Link: https://patch.msgid.link/20240708035320.14241-1-zeming@nfschina.com Signed-off-by: Mark Brown commit ef0b29e744965e8abc14260503a559366219035c Author: Frieder Schrempf Date: Mon Jul 8 10:40:32 2024 +0200 regulator: dt-bindings: pca9450: Make interrupt optional The interrupt is optional in hardware and not connected on some boards. Make it optional in the binding. Signed-off-by: Frieder Schrempf Link: https://patch.msgid.link/20240708084107.38986-3-frieder@fris.de Signed-off-by: Mark Brown commit 83808c54064eef620ad8645dfdcaffe125551532 Author: Frieder Schrempf Date: Mon Jul 8 10:40:34 2024 +0200 regulator: pca9450: Make IRQ optional The IRQ line might not be connected on some boards. Allow the driver to be probed without it. Signed-off-by: Frieder Schrempf Link: https://patch.msgid.link/20240708084107.38986-5-frieder@fris.de Signed-off-by: Mark Brown commit f21711bbdbf0d95a389bfaad54ce444b46830d58 Author: Thomas Weißschuh Date: Sat Jul 6 13:13:42 2024 +0200 regmap-irq: handle const struct regmap_irq_sub_irq_map The struct instances supplied by the drivers are never modified. Handle them as const in the regmap core allowing the drivers to put them into .rodata. Also add a new entry to const_structs.checkpatch to make sure future instances of this struct already enter the tree as const. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20240706-regmap-const-structs-v1-2-d08c776da787@weissschuh.net Signed-off-by: Mark Brown commit 0f02ba48cdaf482d6756515e6936c1e23a316eac Author: Thomas Weißschuh Date: Sat Jul 6 13:13:41 2024 +0200 const_structs.checkpatch: add regmap structs Many structs used by regmap should be const by default. Add entries to const_structs.checkpatch for them for checkpatch.pl to warn on new non-const additions. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20240706-regmap-const-structs-v1-1-d08c776da787@weissschuh.net Signed-off-by: Mark Brown commit 1cc509edbe23b61e8c245611bd15d88edb635a38 Author: Shenghao Ding Date: Sun Jul 7 16:30:07 2024 +0800 ASoc: TAS2781: replace beXX_to_cpup with get_unaligned_beXX for potentially broken alignment Use get_unaligned_be16 instead of be16_to_cpup and get_unaligned_be32 instead of be32_to_cpup for potentially broken alignment. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240707083011.98-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 522133d4401010d936b0588a5a975c2c965cb88e Author: Krzysztof Kozlowski Date: Wed Jul 3 14:11:05 2024 +0200 ASoC: dapm: Simplify snd_soc_dai_link_event_pre_pmu() with cleanup.h Allocate the memory with scoped/cleanup.h in snd_soc_dai_link_event_pre_pmu() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-11-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 5b3cc85673bcc7bb961a3a6fa229cbc4fe0441ac Author: Krzysztof Kozlowski Date: Wed Jul 3 14:11:04 2024 +0200 ASoC: dapm: Simplify dapm_cnew_widget() with cleanup.h Allocate the memory with scoped/cleanup.h in dapm_cnew_widget() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-10-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 1a7b846818210cbdf8994bfee1340c09342a5b3b Author: Krzysztof Kozlowski Date: Wed Jul 3 14:11:03 2024 +0200 ASoC: ops: Simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-9-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 7d996c8a5fea700e816379e57f4983e2611519a0 Author: Krzysztof Kozlowski Date: Wed Jul 3 14:11:02 2024 +0200 ASoC: simple-card: Use cleanup.h instead of devm_kfree() Allocate the memory with scoped/cleanup.h, instead of devm interface, to make the code more obvious that memory is not used outside this scope. Signed-off-by: Krzysztof Kozlowski Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-8-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit b39f7713ece62b2b0a3cfad7a75a0eb0ab71aa4e Author: Krzysztof Kozlowski Date: Wed Jul 3 14:11:01 2024 +0200 ASoC: audio-graph-card2: Use cleanup.h instead of devm_kfree() Allocate the memory with scoped/cleanup.h, instead of devm interface, to make the code more obvious that memory is not used outside this scope. Signed-off-by: Krzysztof Kozlowski Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-7-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 5725c16af2678d334de0bcb85b42cfa50b32e04c Author: Krzysztof Kozlowski Date: Wed Jul 3 14:11:00 2024 +0200 ASoC: audio-graph-card: Use cleanup.h instead of devm_kfree() Allocate the memory with scoped/cleanup.h, instead of devm interface, to make the code more obvious that memory is not used outside this scope. Signed-off-by: Krzysztof Kozlowski Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-6-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 6440e7b2a058c50a05ebcc58f35693c50522fc1a Author: Krzysztof Kozlowski Date: Wed Jul 3 14:10:59 2024 +0200 ASoC: simple-card-utils: Simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-5-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 56d426f5525d1ad919e20663ad01a58238652df7 Author: Krzysztof Kozlowski Date: Wed Jul 3 14:10:58 2024 +0200 ASoC: codecs: wcd934x: Simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-4-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 6344ab5d0826640799e0c054ed4c0846b3f87ccb Author: Krzysztof Kozlowski Date: Wed Jul 3 14:10:57 2024 +0200 ASoC: codecs: wcd9335: Simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-3-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit f9cbfb66127bfc2a47dece3dfcdab2b79ab06c50 Author: Krzysztof Kozlowski Date: Wed Jul 3 14:10:56 2024 +0200 ASoC: codecs: audio-iio-aux: Simplify audio_iio_aux_probe() with cleanup.h Allocate the memory with scoped/cleanup.h in audio_iio_aux_probe() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-2-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 408e49381750ca22fc584a37636f5035d2cd4c25 Author: Krzysztof Kozlowski Date: Wed Jul 3 14:10:55 2024 +0200 ASoC: codecs: audio-iio-aux: Simplify audio_iio_aux_add_dapms() with cleanup.h Allocate the memory with scoped/cleanup.h in audio_iio_aux_add_dapms() to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703-asoc-cleanup-h-v1-1-71219dfd0aef@linaro.org Signed-off-by: Mark Brown commit 89a2aefe4b084686c2ffc1ee939585111ea4fc0f Author: Jianbo Liu Date: Mon Jul 8 09:58:12 2024 +0300 xfrm: call xfrm_dev_policy_delete when kill policy xfrm_policy_kill() is called at different places to delete xfrm policy. It will call xfrm_pol_put(). But xfrm_dev_policy_delete() is not called to free the policy offloaded to hardware. The three commits cited here are to handle this issue by calling xfrm_dev_policy_delete() outside xfrm_get_policy(). But they didn't cover all the cases. An example, which is not handled for now, is xfrm_policy_insert(). It is called when XFRM_MSG_UPDPOLICY request is received. Old policy is replaced by new one, but the offloaded policy is not deleted, so driver doesn't have the chance to release hardware resources. To resolve this issue for all cases, move xfrm_dev_policy_delete() into xfrm_policy_kill(), so the offloaded policy can be deleted from hardware when it is called, which avoids hardware resources leakage. Fixes: 919e43fad516 ("xfrm: add an interface to offload policy") Fixes: bf06fcf4be0f ("xfrm: add missed call to delete offloaded policies") Fixes: 982c3aca8bac ("xfrm: delete offloaded policy") Signed-off-by: Jianbo Liu Reviewed-by: Cosmin Ratiu Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit 9199b915e9fad7f5eff6160d24ff6b38e970107d Author: Jianbo Liu Date: Mon Jul 8 09:58:11 2024 +0300 xfrm: fix netdev reference count imbalance In cited commit, netdev_tracker_alloc() is called for the newly allocated xfrm state, but dev_hold() is missed, which causes netdev reference count imbalance, because netdev_put() is called when the state is freed in xfrm_dev_state_free(). Fix the issue by replacing netdev_tracker_alloc() with netdev_hold(). Fixes: f8a70afafc17 ("xfrm: add TX datapath support for IPsec packet offload mode") Signed-off-by: Jianbo Liu Reviewed-by: Cosmin Ratiu Signed-off-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit 3abbd7ed8b768ff37798e81910b47c2e05156d49 Author: Florian Westphal Date: Thu Jul 4 13:29:20 2024 +0200 act_ct: prepare for stolen verdict coming from conntrack and nat engine At this time, conntrack either returns NF_ACCEPT or NF_DROP. To improve debuging it would be nice to be able to replace NF_DROP verdict with NF_DROP_REASON() helper, This helper releases the skb instantly (so drop_monitor can pinpoint exact location) and returns NF_STOLEN. Prepare call sites to deal with this before introducing such changes in conntrack and nat core. Signed-off-by: Florian Westphal Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e23f41cc4f7476c6e82563b3794dbe159c2ca396 Merge: 29acea1a043fa 738d7d03571c7 Author: Rafael J. Wysocki Date: Mon Jul 8 12:17:26 2024 +0200 Merge tag 'amd-pstate-v6.11-2024-07-07' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge more amd-pstate changes for 6.11 from Mario Liminciello: "This adds fixes for setting scaling max frequency on systems without a dedicated MSR for setting CPPC requests." * tag 'amd-pstate-v6.11-2024-07-07' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Fix the scaling_max_freq setting on shared memory CPPC systems cpufreq/amd-pstate-ut: Convert nominal_freq to khz during comparisons commit 1535085f99c554460966995ecec934b74185cd5c Author: Javier Carrasco Date: Fri Jul 5 12:51:23 2024 +0200 mmc: sdhci_am654: Constify struct regmap_config `sdhci_am654_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240705-sdhci_am654-const-regmap_config-v1-1-c166a8d48a66@gmail.com Signed-off-by: Ulf Hansson commit 921c87ba3893b5d3608e7f248366266b40b86c75 Author: Allen Pais Date: Mon Jul 1 03:07:33 2024 -0700 mmc: Convert from tasklet to BH workqueue The only generic interface to execute asynchronously in the BH context is tasklet; however, it's marked deprecated and has some design flaws. To replace tasklets, BH workqueue support was recently added. A BH workqueue behaves similarly to regular workqueues except that the queued work items are executed in the BH context. This patch converts drivers/mmc/* from tasklet to BH workqueue. Based on the work done by Tejun Heo Tested-by: Christian Loehle Tested-by: Aubin Constans Acked-by: Aubin Constans Acked-by: Michał Mirosław Reviewed-by: Christian Loehle Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20240701100736.4001658-1-allen.lkml@gmail.com Signed-off-by: Ulf Hansson commit 85683fb39d9b671620b5a9343fab3356e486a9a6 Author: Allen Pais Date: Wed Jun 26 10:48:21 2024 +0200 mmc: sdhi: Convert from tasklet to BH workqueue The only generic interface to execute asynchronously in the BH context is tasklet; however, it's marked deprecated and has some design flaws. To replace tasklets, BH workqueue support was recently added. A BH workqueue behaves similarly to regular workqueues except that the queued work items are executed in the BH context. This patch converts the SDHI driver from tasklet to BH workqueue. Based on the work done by Tejun Heo Signed-off-by: Allen Pais [wsa: fixed build faliures, corrected whitespace issues] Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240626085015.32171-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit a1382d193ca449de550b393dd6f763ff7dc8cf75 Author: Conor Dooley Date: Tue Jun 25 13:33:21 2024 +0100 mmc: mmc_spi: allow for spi controllers incapable of getting as low as 400k Some controllers may not be able to reach a bus clock as low as 400 KHz due to a lack of sufficient divisors. In these cases, the SD card slot becomes non-functional as Linux continuously attempts to set the bus clock to 400 KHz. If the controller is incapable of getting that low, set its minimum frequency instead. While this may eliminate some SD cards, it allows those capable of operating at the controller's minimum frequency to be used. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20240625-gigantic-frown-1ef4afa3e6fa@wendy Signed-off-by: Ulf Hansson commit d0f459259c13163336242fecca8468be8e543849 Author: Kai-Heng Feng Date: Thu Jun 20 11:11:59 2024 +0800 memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver Commit c0e5f4e73a71 ("misc: rtsx: Add support for RTS5261") silently removed RTSX_MS_CARD from its MFD cell, so rtsx_pci_ms isn't used by any driver anymore. Since there doesn't seem to any complaint, hence drop the driver. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20240620031159.142637-1-kai.heng.feng@canonical.com Signed-off-by: Ulf Hansson commit 395a02d04ed4d9b9ae2d7cadfd9b14a64fe240b5 Author: Günther Noack Date: Mon Jun 10 08:21:15 2024 +0000 landlock: Use bit-fields for storing handled layer access masks When defined using bit-fields, the compiler takes care of packing the bits in a memory-efficient way and frees us from defining LANDLOCK_SHIFT_ACCESS_* by hand. The exact memory layout does not matter in our use case. The manual definition of LANDLOCK_SHIFT_ACCESS_* has resulted in bugs in at least two recent patch sets [1] [2] where new kinds of handled access rights were introduced. Cc: Mikhail Ivanov Cc: Tahera Fahimi Link: https://lore.kernel.org/r/ebd680cc-25d6-ee14-4856-310f5e5e28e4@huawei-partners.com [1] Link: https://lore.kernel.org/r/ZmLEoBfHyUR3nKAV@google.com [2] Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20240610082115.1693267-1-gnoack@google.com Signed-off-by: Mickaël Salaün commit 142a41da39d1467b7ff7dad64fc421249d06565d Author: Jeff Johnson Date: Wed Jun 26 10:07:01 2024 -0700 PCI: controller: Add missing MODULE_DESCRIPTION() macros When ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/dwc/pci-exynos.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pci-host-generic.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-altera.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-altera-msi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-mediatek.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-mediatek-gen3.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/vmd.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-apple.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-mt7621.o Add the missing MODULE_DESCRIPTION() macro. [kwilczynski: update MODULE_DESCRIPTION() text, commit log] Link: https://lore.kernel.org/linux-pci/20240626-md-drivers-pci-controller-v2-1-94c811db7a51@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Acked-by: Nirmal Patel Acked-by: Sergio Paracuellos # MT7621 commit 359efc9d7f3de3e74afacb0fe1b41fb58a458c28 Author: Jeff Johnson Date: Mon Jun 10 18:21:16 2024 -0700 PCI: Add missing MODULE_DESCRIPTION() macros When ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/pci-stub.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/pci-pf-stub.o Add the missing MODULE_DESCRIPTION() macro. Link: https://lore.kernel.org/r/20240610-md-drivers-pci-v1-1-139c135853ea@quicinc.com Signed-off-by: Jeff Johnson [bhelgaas: update MODULE_DESCRIPTION() text] Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof Wilczyński commit ebf5a79acf9a2970e93d30a9e97b08913ef15711 Author: Ard Biesheuvel Date: Thu Jul 4 11:03:24 2024 +0200 x86/efistub: Drop redundant clearing of BSS As it turns out, clearing the BSS was not the right fix for the issue that was ultimately fixed by commit decd347c2a75 ("x86/efistub: Reinstate soft limit for initrd loading"), and given that the Windows EFI loader becomes very unhappy when entered with garbage in BSS, this is one thing that x86 PC EFI implementations can be expected to get right. So drop it from the pure PE entrypoint. The handover protocol entrypoint still needs this - it is used by the flaky distro bootloaders that barely implement PE/COFF at all. Signed-off-by: Ard Biesheuvel commit fb318ca0a522295edd6d796fb987e99ec41f0ee5 Author: Ard Biesheuvel Date: Thu Jul 4 10:59:23 2024 +0200 x86/efistub: Avoid returning EFI_SUCCESS on error The fail label is only used in a situation where the previous EFI API call succeeded, and so status will be set to EFI_SUCCESS. Fix this, by dropping the goto entirely, and call efi_exit() with the correct error code. Signed-off-by: Ard Biesheuvel commit 71e49eccdca6328eecc335ed8f5557bd0ed70fc6 Author: Aditya Garg Date: Sun Jun 30 19:24:54 2024 +0000 x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs 0c18184de990 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs") brought support for T2 Macs in apple-gmux. But in order to use dual GPU, the integrated GPU has to be enabled. On such dual GPU EFI Macs, the EFI stub needs to report that it is booting macOS in order to prevent the firmware from disabling the iGPU. This patch is also applicable for some non T2 Intel Macs. Based on this patch for GRUB by Andreas Heider : https://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html Credits also goto Kerem Karabay for helping porting the patch to the Linux kernel. Cc: Orlando Chamberlain Signed-off-by: Aditya Garg [ardb: limit scope using list of DMI matches provided by Lukas and Orlando] Reviewed-by: Lukas Wunner Tested-by: Aditya Garg Signed-off-by: Ard Biesheuvel commit cd6193877c603f4b0c3c7e5607ffa3d52815403f Author: Ard Biesheuvel Date: Mon Jul 1 09:35:33 2024 +0200 x86/efistub: Enable SMBIOS protocol handling for x86 The smbios.c source file is not currently included in the x86 build, and before we can do so, it needs some tweaks to build correctly in combination with the EFI mixed mode support. Reviewed-by: Lukas Wunner Signed-off-by: Ard Biesheuvel commit 356eda93fa48b2cd6c4a4628a6b9c94743f270f8 Merge: 4dea807fa7e75 d8d4f57ed6ce9 Author: Ilpo Järvinen Date: Mon Jul 8 10:59:57 2024 +0300 Merge remote-tracking branch 'intel-speed-select/intel-sst' into review-ilpo Summary of change: - Fix setting of TRL MSR after SST-TF is disabled in auto mode. Use correct units. commit 09595e0c9d654743483197b2f21dd4ec37c90a27 Author: Christoph Hellwig Date: Sat Jul 6 09:52:18 2024 +0200 block: pass a phys_addr_t to get_max_segment_size Work on a single address to simplify the logic, and prepare the callers from using better helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240706075228.2350978-3-hch@lst.de Signed-off-by: Jens Axboe commit 25f76c3db2f08428b5acd082a52787164001eb6e Author: Christoph Hellwig Date: Sat Jul 6 09:52:17 2024 +0200 block: add a bvec_phys helper Get callers out of poking into bvec internals a bit more. Not a huge win right now, but with the proposed new DMA mapping API we might end up with a lot more of this otherwise. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240706075228.2350978-2-hch@lst.de Signed-off-by: Jens Axboe commit 4dea807fa7e75275efa75f4d6caa72a082f3c86d Author: Xi Pardee Date: Mon Jun 24 13:32:18 2024 -0700 platform/x86:intel/pmc: Add support to undo ltr_ignore Add ltr_restore support to undo the ltr_ignore action. It sets the ltr_ignore bit of the corresponding IP to 0. Ltr_restore reuses some functionality of pmc_core_ltr_ignore_write() so moved the common functionality into a helper function. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-10-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9e7f1e71561899e669ecc205e56027960c37a50c Author: Xi Pardee Date: Mon Jun 24 13:32:17 2024 -0700 platform/x86:intel/pmc: Use the Elvis operator Replace ternary operator with Elvis operator in pmc_core_ltr_ignore_write() for better readability of the code. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-9-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 590a87fe36f1aa43e2d145a0b16d223f2f374899 Author: Xi Pardee Date: Mon Jun 24 13:32:16 2024 -0700 platform/x86:intel/pmc: Use DEFINE_SHOW_STORE_ATTRIBUTE macro DEFINE_SHOW_STORE_ATTRIBUTE() macro can be used for the ltr_ignore attribute for better readability. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-8-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 97eb32b0ff3917ab4ec2745aafc318042c95e4a7 Author: Xi Pardee Date: Mon Jun 24 13:32:15 2024 -0700 platform/x86:intel/pmc: Remove unneeded min_t check min_t() check is not needed in pmc_core_ltr_ignore_write(). kstrtox() has a built-in overflow check. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-7-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 438aef8270579d4f8dee976709f015deb084e665 Author: Xi Pardee Date: Mon Jun 24 13:32:14 2024 -0700 platform/x86:intel/pmc: Add support to show ltr_ignore value Add a column in ltr_show output to show if the IP has been ignored. A mutex lock is used to protect the critical section as other processes might try to write to the LTR ignore register at the same time. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-6-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4455e2b1c80cd0838d8883b18022e5bafdf2d1f4 Author: Xi Pardee Date: Mon Jun 24 13:32:13 2024 -0700 platform/x86:intel/pmc: Move pmc assignment closer to first usage Move pmc variable assignment closer to the conditional statement of its first use for better readability. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-5-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a57a94d185004013e05734ffb626b0341742f9fb Author: Xi Pardee Date: Mon Jun 24 13:32:12 2024 -0700 platform/x86:intel/pmc: Convert index variables to be unsigned Convert the index variables type to unsigned to avoid confusion and errors. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-4-xi.pardee@linux.intel.com [ij: Converted also pmc_core_lpm_get_arr_size() to return unsigned int] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 6d413a1f60fb2417061e8f26124f6bc41e09e504 Author: Xi Pardee Date: Mon Jun 24 13:32:11 2024 -0700 platform/x86:intel/pmc: Simplify mutex usage with cleanup helpers Use macros defined in cleanup.h to automate the mutex lock/unlock flow. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-3-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 40fdf3f623041eda2a8f825d0ccd4c18f8571ffb Author: Xi Pardee Date: Mon Jun 24 13:32:10 2024 -0700 platform/x86:intel/pmc: Use the return value of pmc_core_send_msg Use the return value of pmc_core_send_msg() directly instead of assigning another code when an error occurs. Signed-off-by: Xi Pardee Link: https://lore.kernel.org/r/20240624203218.2428475-2-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4bed843b10004d9101b49ac7270131051c39a92b Author: Christian Brauner Date: Thu Jul 4 10:58:35 2024 +0200 fs: reject invalid last mount id early Unique mount ids start past the last valid old mount id value to not confuse the two. If a last mount id has been specified, reject any invalid values early. Link: https://lore.kernel.org/r/20240704-work-mount-fixes-v1-2-d007c990de5f@kernel.org Signed-off-by: Christian Brauner commit 80744d0e7a81c35795a2754049eafff76abbe371 Author: Christian Brauner Date: Thu Jul 4 10:58:34 2024 +0200 fs: refuse mnt id requests with invalid ids early Unique mount ids start past the last valid old mount id value to not confuse the two so reject invalid values early in copy_mnt_id_req(). Link: https://lore.kernel.org/r/20240704-work-mount-fixes-v1-1-d007c990de5f@kernel.org Signed-off-by: Christian Brauner commit 9f349e8e532d7e50b57a3e10367a8eb64d89e104 Author: Takashi Sakamoto Date: Sun Jul 7 22:45:23 2024 +0900 Revert "firewire: ohci: use common macro to interpret be32 data in le32 buffer" This reverts commit f26a38e61c03fdfacb6b596e1daf665cf4526a60, since it causes the following sparse warnings: sparse warnings: (new ones prefixed by >>) >> drivers/firewire/ohci.c:891:23: sparse: sparse: cast to restricted __be32 >> drivers/firewire/ohci.c:891:23: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:892:23: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:892:23: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:893:23: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:893:23: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:905:31: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:905:31: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:914:31: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:914:31: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:939:18: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:939:18: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:2033:23: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:2033:23: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:2037:27: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:2037:27: sparse: sparse: cast from restricted __le32 drivers/firewire/ohci.c:2038:27: sparse: sparse: cast to restricted __be32 drivers/firewire/ohci.c:2038:27: sparse: sparse: cast from restricted __le32 Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407050656.03bw1YXA-lkp@intel.com/ Link: https://lore.kernel.org/r/20240707134523.11784-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 13694f0dbc077f28fcb613e7e37018d87997abb9 Author: Linus Torvalds Date: Mon Jun 17 09:05:52 2024 -0700 vfs: link_path_walk: move more of the name hashing into hash_name() This avoids having to return the length of the component entirely by just doing all of the name processing in hash_name(). We can just return the end of the path component, and a flag for the DOT and DOTDOT cases. Signed-off-by: Linus Torvalds commit 58b0afa038bb404ff82b358b68db5ffa8f53c404 Author: Linus Torvalds Date: Sun Jun 16 15:00:35 2024 -0700 vfs: link_path_walk: improve may_lookup() code generation Instead of having separate calls to 'inode_permission()' depending on whether we're in RCU lookup or not, just share the first call. Note that the initial "conditional" on LOOKUP_RCU really turns into just a "convert the LOOKUP_RCU bit in the nameidata into the MAY_NOT_BLOCK bit in the argument", which is just a trivial bitwise and and shift operation. So the initial conditional goes away entirely, and then the likely case is that it will succeed independently of us being in RCU lookup or not, and the possible "we may need to fall out of RCU and redo it all" fixups that are needed afterwards all go in the unlikely path. [ This also marks 'nd' restrict, because that means that the compiler can know that there is no other alias, and can cache the LOOKUP_RCU value over the call to inode_permission(). ] Signed-off-by: Linus Torvalds commit 738d7d03571c7e38565bd245c0815a2c74665018 Author: Dhananjay Ugwekar Date: Tue Jul 2 08:14:14 2024 +0000 cpufreq/amd-pstate: Fix the scaling_max_freq setting on shared memory CPPC systems On shared memory CPPC systems, with amd_pstate=active mode, the change in scaling_max_freq doesn't get written to the shared memory region. Due to this, the writes to the scaling_max_freq sysfs file don't take effect. Fix this by propagating the scaling_max_freq changes to the shared memory region. Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors") Reported-by: David Arcari Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240702081413.5688-3-Dhananjay.Ugwekar@amd.com Signed-off-by: Mario Limonciello commit f21ab5ed4e8758b06230900f44b9dcbcfdc0c3ae Author: Dhananjay Ugwekar Date: Tue Jul 2 08:14:13 2024 +0000 cpufreq/amd-pstate-ut: Convert nominal_freq to khz during comparisons cpudata->nominal_freq being in MHz whereas other frequencies being in KHz breaks the amd-pstate-ut frequency sanity check. This fixes it. Fixes: e4731baaf294 ("cpufreq: amd-pstate: Fix the inconsistency in max frequency units") Reported-by: David Arcari Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/20240702081413.5688-2-Dhananjay.Ugwekar@amd.com Signed-off-by: Mario Limonciello commit 5c1de37969b7bc0abcb20b86e91e70caebbd4f89 Author: Guenter Roeck Date: Sat Jul 6 23:51:34 2024 -0700 hwmon: (w83627ehf) Fix underflows seen when writing limit attributes DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck commit 0403e10bf0824bf0ec2bb135d4cf1c0cc3bf4bf0 Author: Guenter Roeck Date: Sat Jul 6 23:50:08 2024 -0700 hwmon: (nct6775-core) Fix underflows seen when writing limit attributes DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck commit af64e3e1537896337405f880c1e9ac1f8c0c6198 Author: Guenter Roeck Date: Sat Jul 6 23:48:42 2024 -0700 hwmon: (lm95234) Fix underflows seen when writing limit attributes DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck commit 8cad724c8537fe3e0da8004646abc00290adae40 Author: Guenter Roeck Date: Sat Jul 6 23:43:04 2024 -0700 hwmon: (adc128d818) Fix underflows seen when writing limit attributes DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck commit d8d4f57ed6ce9fef9b975807ae0252cf92f1c55f Author: Srinivas Pandruvada Date: Sun Jul 7 00:08:56 2024 -0700 tools/power/x86/intel-speed-select: v1.20 release This version addresses one issue: - Fix updating TRL MSR after SST-TF is disabled in auto mode. Signed-off-by: Srinivas Pandruvada commit fd77d7fde0818bcc70b63f99c306e5a0f0d3f1a2 Author: Srinivas Pandruvada Date: Sat Jul 6 01:17:55 2024 -0400 tools/power/x86/intel-speed-select: Set TRL MSR in 100 MHz units When SST-TF is disabled in auto mode, the performance is getting limited. This is caused by wrong programming of Turbo Ratio Limit (TRL) MSR. This MSR always accepts the frequency ratio in 100 MHz unit. When the TPMI is sending TRL in 1 MHz unit, change to 100 MHz, before updating TRL MSR. Signed-off-by: Srinivas Pandruvada commit a47d377e22c4a896a87a18db33f26cc6d5cc9771 Author: Uwe Kleine-König Date: Wed May 15 21:43:37 2024 +0200 rtc: 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 a comma after the sentinel entry in rtc-hym8563. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240515194336.58342-2-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 463927a8902a9f22c3633960119410f57d4c8920 Author: Csókás, Bence Date: Wed Jun 19 16:04:52 2024 +0200 rtc: interface: Add RTC offset to alarm after fix-up `rtc_add_offset()` is called by `__rtc_read_time()` and `__rtc_read_alarm()` to add the RTC's offset to the raw read-outs from the device drivers. However, in the latter case, a fix-up algorithm is run if the RTC device does not report a full `struct rtc_time` alarm value. In that case, the offset was forgot to be added. Fixes: fd6792bb022e ("rtc: fix alarm read and set offset") Signed-off-by: Csókás, Bence Link: https://lore.kernel.org/r/20240619140451.2800578-1-csokas.bence@prolan.hu Signed-off-by: Alexandre Belloni commit 68f78c720da4088d254250867126c6ae5b68fa2a Author: Csókás, Bence Date: Tue Jun 11 09:24:09 2024 +0200 rtc: ds1307: Clamp year to valid BCD (0-99) in `set_time()` `tm_year` may go up to 299 if the device supports the century bit. Therefore, subtracting may not give us a valid 2-digit number, but modulo does. Co-developed-by: Szentendrei, Tamás Signed-off-by: Szentendrei, Tamás Signed-off-by: Csókás, Bence Link: https://lore.kernel.org/r/20240611072411.671600-2-csokas.bence@prolan.hu Signed-off-by: Alexandre Belloni commit 35a34f09baed51216455740e01bd132cf60c71cf Author: Csókás, Bence Date: Tue Jun 11 09:24:08 2024 +0200 rtc: ds1307: Detect oscillator fail on mcp794xx This patch enables the detection of the oscillator failure on mcp794xx chips. Co-developed-by: Szentendrei, Tamás Signed-off-by: Szentendrei, Tamás Signed-off-by: Csókás, Bence Link: https://lore.kernel.org/r/20240611072411.671600-1-csokas.bence@prolan.hu Signed-off-by: Alexandre Belloni commit 88bf3be9c327f2d78c65e7e4c10c677d4b36128a Author: Anton Bambura Date: Sun Jun 23 14:26:32 2024 +0500 arm64: dts: qcom: msm8916-lg-c50: add initial dts for LG Leon LTE Add initial device-tree for LG Leon LTE (lg-c50), currently supported features: - eMMC; - MicroSD; - usb in peripheral mode; - WiFi/BT; - vibration; - keys. Signed-off-by: Anton Bambura Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240623-msm8916-lg-initial-v1-3-6fbcf714d69b@trvn.ru Signed-off-by: Bjorn Andersson commit 0655b447461607f93c55435b32a7783aa7d711ef Author: Cristian Cozzolino Date: Sun Jun 23 14:26:31 2024 +0500 arm64: dts: qcom: msm8916-lg-m216: Add initial device tree This commit adds initial support for the LG K10 smartphone. Support for the following features is included: - Serial - Keys - Battery and charger - Accelerometer, magnetometer - Touchscreen - Sound and modem - Haptic Signed-off-by: Cristian Cozzolino [Nikita: Minor cleanup] Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240623-msm8916-lg-initial-v1-2-6fbcf714d69b@trvn.ru Signed-off-by: Bjorn Andersson commit 2c69048c5dafb315e11c257f7100f7fb3cabfa8a Author: Nikita Travkin Date: Sun Jun 23 14:26:30 2024 +0500 dt-bindings: arm: qcom: Add msm8916 based LG devices Add compatible values for the msm8916 based LG smartphones. Signed-off-by: Nikita Travkin Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240623-msm8916-lg-initial-v1-1-6fbcf714d69b@trvn.ru Signed-off-by: Bjorn Andersson commit c1842643a3df6004d1bc9df74e34d8b72997d886 Author: David Heidelberg Date: Sat Jul 6 15:00:30 2024 -0700 ARM: dts: qcom: msm8960: correct memory base DeviceTree validation requires a unit address on the memory node, adjust the base to match [Ref] and use this as unit address. The bootloader will update the information with the actual values during boot. Ref: https://github.com/msm8916-mainline/lk2nd/blob/main/target/msm8960/rules.mk Reviewed-by: Dmitry Baryshkov Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20240706220041.241839-1-david@ixit.cz Signed-off-by: Bjorn Andersson commit 3f59493713534b61abcbe2e57582cf7e31a42d51 Author: Kefeng Wang Date: Wed Jun 26 16:53:28 2024 +0800 mm: migrate: remove folio_migrate_copy() The folio_migrate_copy() is just a wrapper of folio_copy() and folio_migrate_flags(), it is simple and only aio use it for now, unfold it and remove folio_migrate_copy(). Link: https://lkml.kernel.org/r/20240626085328.608006-7-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Jane Chu Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tony Luck Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit f00b295b9b61bb332b4f5951f479ab3aaeada5b8 Author: Kefeng Wang Date: Wed Jun 26 16:53:27 2024 +0800 fs: hugetlbfs: support poisoned recover from hugetlbfs_migrate_folio() This is similar to __migrate_folio(), use folio_mc_copy() in HugeTLB folio migration to avoid panic when copy from poisoned folio. Link: https://lkml.kernel.org/r/20240626085328.608006-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jane Chu Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tony Luck Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 060913999d7a9e50c283fdb15253fc27974ddadc Author: Kefeng Wang Date: Wed Jun 26 16:53:26 2024 +0800 mm: migrate: support poisoned recover from migrate folio The folio migration is widely used in kernel, memory compaction, memory hotplug, soft offline page, numa balance, memory demote/promotion, etc, but once access a poisoned source folio when migrating, the kerenl will panic. There is a mechanism in the kernel to recover from uncorrectable memory errors, ARCH_HAS_COPY_MC, which is already used in other core-mm paths, eg, CoW, khugepaged, coredump, ksm copy, see copy_mc_to_{user,kernel}, copy_mc_{user_}highpage callers. In order to support poisoned folio copy recover from migrate folio, we chose to make folio migration tolerant of memory failures and return error for folio migration, because folio migration is no guarantee of success, this could avoid the similar panic shown below. CPU: 1 PID: 88343 Comm: test_softofflin Kdump: loaded Not tainted 6.6.0 pc : copy_page+0x10/0xc0 lr : copy_highpage+0x38/0x50 ... Call trace: copy_page+0x10/0xc0 folio_copy+0x78/0x90 migrate_folio_extra+0x54/0xa0 move_to_new_folio+0xd8/0x1f0 migrate_folio_move+0xb8/0x300 migrate_pages_batch+0x528/0x788 migrate_pages_sync+0x8c/0x258 migrate_pages+0x440/0x528 soft_offline_in_use_page+0x2ec/0x3c0 soft_offline_page+0x238/0x310 soft_offline_page_store+0x6c/0xc0 dev_attr_store+0x20/0x40 sysfs_kf_write+0x4c/0x68 kernfs_fop_write_iter+0x130/0x1c8 new_sync_write+0xa4/0x138 vfs_write+0x238/0x2d8 ksys_write+0x74/0x110 Note, folio copy is moved in the begin of the __migrate_folio(), which could simplify the error handling since there is no turning back if folio_migrate_mapping() return success, the downside is the folio copied even though folio_migrate_mapping() return fail, an optimization is to check whether source folio does not have extra refs before we do folio copy. Link: https://lkml.kernel.org/r/20240626085328.608006-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jane Chu Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tony Luck Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 528815392f873f0af8c6cdc279c89bd0154cbf6a Author: Kefeng Wang Date: Wed Jun 26 16:53:25 2024 +0800 mm: migrate: split folio_migrate_mapping() The folio refcount check is moved out for both !mapping and mapping folio, also update comment from page to folio for folio_migrate_mapping(). No functional change intended. Link: https://lkml.kernel.org/r/20240626085328.608006-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jane Chu Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tony Luck Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 02f4ee5a144cef6b26421cb42cca64bb4138d459 Author: Kefeng Wang Date: Wed Jun 26 16:53:24 2024 +0800 mm: add folio_mc_copy() Add a #MC variant of folio_copy() which uses copy_mc_highpage() to support #MC handled during folio copy, it will be used in folio migration soon. Link: https://lkml.kernel.org/r/20240626085328.608006-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Jane Chu Reviewed-by: Miaohe Lin Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tony Luck Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 28bdacbcb36d093e23734acccecd139f5fc05f67 Author: Kefeng Wang Date: Wed Jun 26 16:53:23 2024 +0800 mm: move memory_failure_queue() into copy_mc_[user]_highpage() Patch series "mm: migrate: support poison recover from migrate folio", v5. The folio migration is widely used in kernel, memory compaction, memory hotplug, soft offline page, numa balance, memory demote/promotion, etc, but once access a poisoned source folio when migrating, the kernel will panic. There is a mechanism in the kernel to recover from uncorrectable memory errors, ARCH_HAS_COPY_MC(eg, Machine Check Safe Memory Copy on x86), which is already used in NVDIMM or core-mm paths(eg, CoW, khugepaged, coredump, ksm copy), see copy_mc_to_{user,kernel}, copy_mc_{user_}highpage callers. This series of patches provide the recovery mechanism from folio copy for the widely used folio migration. Please note, because folio migration is no guarantee of success, so we could chose to make folio migration tolerant of memory failures, adding folio_mc_copy() which is a #MC versions of folio_copy(), once accessing a poisoned source folio, we could return error and make the folio migration fail, and this could avoid the similar panic shown below. CPU: 1 PID: 88343 Comm: test_softofflin Kdump: loaded Not tainted 6.6.0 pc : copy_page+0x10/0xc0 lr : copy_highpage+0x38/0x50 ... Call trace: copy_page+0x10/0xc0 folio_copy+0x78/0x90 migrate_folio_extra+0x54/0xa0 move_to_new_folio+0xd8/0x1f0 migrate_folio_move+0xb8/0x300 migrate_pages_batch+0x528/0x788 migrate_pages_sync+0x8c/0x258 migrate_pages+0x440/0x528 soft_offline_in_use_page+0x2ec/0x3c0 soft_offline_page+0x238/0x310 soft_offline_page_store+0x6c/0xc0 dev_attr_store+0x20/0x40 sysfs_kf_write+0x4c/0x68 kernfs_fop_write_iter+0x130/0x1c8 new_sync_write+0xa4/0x138 vfs_write+0x238/0x2d8 ksys_write+0x74/0x110 This patch (of 5): There is a memory_failure_queue() call after copy_mc_[user]_highpage(), see callers, eg, CoW/KSM page copy, it is used to mark the source page as h/w poisoned and unmap it from other tasks, and the upcomming poison recover from migrate folio will do the similar thing, so let's move the memory_failure_queue() into the copy_mc_[user]_highpage() instead of adding it into each user, this should also enhance the handling of poisoned page in khugepaged. Link: https://lkml.kernel.org/r/20240626085328.608006-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20240626085328.608006-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Jane Chu Reviewed-by: Miaohe Lin Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tony Luck Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 8ef6fd0e9ea83a792ba53882ddc6e0d38ce0d636 Merge: 44195d1eba826 1e3d28fe03cda Author: Andrew Morton Date: Sat Jul 6 11:44:41 2024 -0700 Merge branch 'mm-hotfixes-stable' into mm-stable to pick up "mm: fix crashes from deferred split racing folio migration", needed by "mm: migrate: split folio_migrate_mapping()". commit 5d0ab61a700214366dfcca5893b87655261e8c94 Author: Varadarajan Narayanan Date: Tue Apr 30 12:12:14 2024 +0530 arm64: dts: qcom: ipq9574: Add icc provider ability to gcc IPQ SoCs dont involve RPM in managing NoC related clocks and there is no NoC scaling. Linux itself handles these clocks. However, these should not be exposed as just clocks and align with other Qualcomm SoCs that handle these clocks from a interconnect provider. Hence include icc provider capability to the gcc node so that peripherals can use the interconnect facility to enable these clocks. Reviewed-by: Dmitry Baryshkov Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240430064214.2030013-7-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 47c7823be60ad5eb2db72d8c26ecbde5902a1b42 Merge: cfe9685473add d1f1570f3d6db Author: Bjorn Andersson Date: Sat Jul 6 13:15:59 2024 -0500 Merge branch '20240430064214.2030013-3-quic_varada@quicinc.com' into arm64-for-6.11 Merge IPQ9574 interconnect clock DeviceTree binding to gain access to the interconnect constants. commit d1f1570f3d6db5d35642092a671812e62bfba79d Author: Varadarajan Narayanan Date: Tue Apr 30 12:12:10 2024 +0530 dt-bindings: interconnect: Add Qualcomm IPQ9574 support Add interconnect-cells to clock provider so that it can be used as icc provider. Add master/slave ids for Qualcomm IPQ9574 Network-On-Chip interfaces. This will be used by the gcc-ipq9574 driver that will for providing interconnect services using the icc-clk framework. Acked-by: Georgi Djakov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240430064214.2030013-3-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit cfe9685473add0ae76952f0eb54489c3547db335 Author: Satya Priya Kakitapalli Date: Thu May 9 15:54:04 2024 +0530 arm64: dts: qcom: sm8150: Add video clock controller node Add device node for video clock controller on Qualcomm SM8150 platform. Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240509-videocc-sm8150-dt-node-v4-2-e9617f65e946@quicinc.com Signed-off-by: Bjorn Andersson commit e3e169cd28d0ba80d25ad683e076b299a39e8526 Author: Jens Reidel Date: Thu Jun 6 20:10:27 2024 +0200 arm64: dts: qcom: pm6150: Add vibrator Add a node for the vibrator module found inside the PM6150. Signed-off-by: Jens Reidel Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240606181027.98537-3-adrian@travitia.xyz Signed-off-by: Bjorn Andersson commit 134a4b2f3be287358542953c9540bee4296bf593 Author: Mukesh Ojha Date: Fri Jul 5 20:04:43 2024 +0530 arm64: dts: qcom: sc7280: Enable download mode register write Enable download mode setting for sc7280 which can help collect ramdump for this SoC. Signed-off-by: Mukesh Ojha Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240705143443.1491956-1-quic_mojha@quicinc.com Signed-off-by: Bjorn Andersson commit 8cf636a03260352853ff1c949f30c418600e7b2b Author: Luca Weiss Date: Fri Jul 5 14:40:10 2024 +0200 arm64: dts: qcom: sm7225-fairphone-fp4: Add PM6150L thermals Configure the thermals for the PA_THERM1, MSM_THERM, PA_THERM0, RFC_CAM_THERM, CAM_FLASH_THERM and QUIET_THERM thermistors connected to PM6150L. Due to hardware constraints we can only register 4 zones with pm6150l_adc_tm, the other 2 we can register via generic-adc-thermal. The trip points can really only be considered as placeholders, more configuration with cooling etc. can be added later. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240705-fp4-thermals-v2-2-a4870a8d084f@fairphone.com Signed-off-by: Bjorn Andersson commit 4d37847187b3fd7ff1fac23248a8ec11d89b3e55 Author: Luca Weiss Date: Fri Jul 5 14:40:09 2024 +0200 arm64: dts: qcom: sm7225-fairphone-fp4: Add PMK8003 thermals Configure the thermals for the XO_THERM thermistor connected to the PMK8003 (which is called PMK8350 in software). The ADC configuration for PMK8350_ADC7_AMUX_THM1_100K_PU has already been added in the past. The trip points can really only be considered as placeholders, more configuration with cooling etc. can be added later. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240705-fp4-thermals-v2-1-a4870a8d084f@fairphone.com Signed-off-by: Bjorn Andersson commit 81008068ee4f2c4c26e97a0404405bb4b450241b Author: Luca Weiss Date: Fri Jul 5 09:43:11 2024 +0200 arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property By default the DSP domains are secure, add the missing qcom,non-secure-domain property to mark them as non-secure. Fixes: efc33c969f23 ("arm64: dts: qcom: sm6350: Add ADSP nodes") Fixes: 8eb5287e8a42 ("arm64: dts: qcom: sm6350: Add CDSP nodes") Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240705-sm6350-fastrpc-fix-v2-1-89a43166c9bb@fairphone.com Signed-off-by: Bjorn Andersson commit cf4d6d54eadb60d2ee4d31c9d92299f5e8dcb55c Author: Krishna Kurapati Date: Thu Jul 4 20:58:48 2024 +0530 arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB For Gen-1 targets like SDM845, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for SDM845 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-9-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 44ea1ae3cf95db97e10d6ce17527948121f1dd4b Author: Krishna Kurapati Date: Thu Jul 4 20:58:47 2024 +0530 arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB For Gen-1 targets like MSM8996, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for MSM8996 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: 1e39255ed29d ("arm64: dts: msm8996: Add device node for qcom,dwc3") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-8-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit c5d57eb7d06df16c07037cea5dacfd74d49d1833 Author: Krishna Kurapati Date: Thu Jul 4 20:58:46 2024 +0530 arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB For Gen-1 targets like SM6350, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for SM6350 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: 23737b9557fe ("arm64: dts: qcom: sm6350: Add USB1 nodes") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-7-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 074992a1163295d717faa21d1818c4c19ef6e676 Author: Krishna Kurapati Date: Thu Jul 4 20:58:45 2024 +0530 arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB For Gen-1 targets like SM6115, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for SM6115 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-6-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit fad58a41b84667cb6c9232371fc3af77d4443889 Author: Krishna Kurapati Date: Thu Jul 4 20:58:44 2024 +0530 arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB For Gen-1 targets like SDM630, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for SDM630 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: c65a4ed2ea8b ("arm64: dts: qcom: sdm630: Add USB configuration") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-5-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Author: Krishna Kurapati Date: Thu Jul 4 20:58:43 2024 +0530 arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB For Gen-1 targets like MSM8998, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for MSM8998 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Author: Krishna Kurapati Date: Thu Jul 4 20:58:42 2024 +0530 arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB For Gen-1 targets like IPQ8074, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for IPQ8074 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 4ae4837871ee8c8b055cf8131f65d31ee4208fa0 Author: Krishna Kurapati Date: Thu Jul 4 20:58:41 2024 +0530 arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB For Gen-1 targets like IPQ6018, it is seen that stressing out the controller in host mode results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instance in park mode for IPQ6018 to mitigate this issue. Cc: stable@vger.kernel.org Fixes: 20bb9e3dd2e4 ("arm64: dts: qcom: ipq6018: add usb3 DT description") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240704152848.3380602-2-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 55751d3e9e96d5d64dc6ebb5bbdf70f45098f279 Author: Dmitry Baryshkov Date: Thu Jul 4 14:12:46 2024 +0300 firmware: qcom: tzmem: blacklist more platforms for SHM Bridge The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on corresponding platforms using SoC-level compat string. If later it's found that the bad behaviour is limited just to the particular boards rather than SoC, the compat strings can be adjusted. Reported-by: Neil Armstrong Fixes: f86c61498a57 ("firmware: qcom: tzmem: enable SHM Bridge support") Signed-off-by: Dmitry Baryshkov Acked-by: Bartosz Golaszewski Tested-by: Neil Armstrong # on Qualcomm RB3 Link: https://lore.kernel.org/r/20240704-shmbridge-blacklist-v1-1-14b027b3b2dc@linaro.org Signed-off-by: Bjorn Andersson commit 9db4585eca22fcd0422a94ac792f87dcbf74b643 Author: Chen Ni Date: Thu Jul 4 15:36:06 2024 +0800 clk: qcom: kpss-xcc: Return of_clk_add_hw_provider to transfer the error Return of_clk_add_hw_provider() in order to transfer the error if it fails. Fixes: 09be1a39e685 ("clk: qcom: kpss-xcc: register it as clk provider") Signed-off-by: Chen Ni Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240704073606.1976936-1-nichen@iscas.ac.cn Signed-off-by: Bjorn Andersson commit 45247fe17db25594bec804f9db751635c7b6e473 Author: Srinivas Kandagatla Date: Wed Jul 3 20:45:06 2024 +0100 arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree Add an initial devicetree for the Lenovo Yoga slim 7x with support for Display, usb, keyboard, touchpad, touchscreen, PMICs, speaker audio, gpu, NVMe and remoteprocs. Signed-off-by: Srinivas Kandagatla Tested-by: Rob Clark Link: https://lore.kernel.org/r/20240703-yoga-slim7x-v2-2-3b297dab8db1@linaro.org Signed-off-by: Bjorn Andersson commit c46a239a24908dda57031589f0db944a5d2e9246 Author: Srinivas Kandagatla Date: Wed Jul 3 20:45:05 2024 +0100 dt-bindings: arm: qcom: Add Lenovo Yoga Slim 7x Document the x1e80100 based Lenovo Yoga Slim 7x laptop. Signed-off-by: Srinivas Kandagatla Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-yoga-slim7x-v2-1-3b297dab8db1@linaro.org Signed-off-by: Bjorn Andersson commit bd2d330ee608f16a0b93ea753b75c98a1898bdd0 Author: Javier Carrasco Date: Wed Jul 3 11:50:21 2024 +0200 clk: qcom: lpasscc-sc8280xp: Constify struct regmap_config `lpass_audiocc_sc8280xp_regmap_config` and `lpasscc_sc8280x_regmap_config` are not modified and can be declared as const to move their data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240703-clk-const-regmap-v1-8-7d15a0671d6f@gmail.com Signed-off-by: Bjorn Andersson commit b066a2c430f3f8d0aedba44991e0a69e21b512d3 Author: Krzysztof Kozlowski Date: Wed Jul 3 11:42:40 2024 +0200 soc: qcom: wcnss: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-thermal-const-v1-5-6e59e139c65d@linaro.org Signed-off-by: Bjorn Andersson commit 0ed06fcc7a84ea4861564862545dc7805c0f132e Author: Krzysztof Kozlowski Date: Wed Jul 3 11:42:39 2024 +0200 soc: qcom: pdr: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-thermal-const-v1-4-6e59e139c65d@linaro.org Signed-off-by: Bjorn Andersson commit 20635bcc12d5feb1b0005d559cf7cf27743045df Author: Krzysztof Kozlowski Date: Wed Jul 3 11:42:38 2024 +0200 soc: qcom: ocmem: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling (less error paths) and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-thermal-const-v1-3-6e59e139c65d@linaro.org Signed-off-by: Bjorn Andersson commit 01dd825d2b54edc90394f297830c63047b424da1 Author: Krzysztof Kozlowski Date: Wed Jul 3 11:42:37 2024 +0200 soc: qcom: mdt_loader: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-thermal-const-v1-2-6e59e139c65d@linaro.org Signed-off-by: Bjorn Andersson commit 04e60d7a72b65f8aa45ef04458c818e9c95fe584 Author: Krzysztof Kozlowski Date: Wed Jul 3 11:42:36 2024 +0200 soc: qcom: llcc: simplify with cleanup.h Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703-thermal-const-v1-1-6e59e139c65d@linaro.org Signed-off-by: Bjorn Andersson commit d99b680b4a9a33d0c47a68a4c1a45775023426ff Author: Krzysztof Kozlowski Date: Wed Jul 3 10:30:46 2024 +0200 firmware: qcom: tzmem: simplify returning pointer without cleanup Use 'return_ptr' helper for returning a pointer without cleanup for shorter code. Signed-off-by: Krzysztof Kozlowski Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240703083046.95811-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 6e697467c4d1f07839ad934dea322fea6a460e4e Author: Luca Weiss Date: Wed Jul 3 09:01:03 2024 +0200 soc: qcom: socinfo: Add PM6350 PMIC Add the ID for the PM6350 PMIC found on e.g. SM7225 Fairphone 4. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240703-socinfo-pm6350-v1-1-e12369af3ed6@fairphone.com Signed-off-by: Bjorn Andersson commit 4bf1ea3fc914faef37d8c793b7144d4765ff4a00 Author: Devin Bayer Date: Fri Jun 28 10:46:03 2024 +0200 platform/x86: asus-wmi: support the disable camera LED on F10 of Zenbook 2023 Adds a sysfs entry for the LED on F10 above the crossed out camera icon on 2023 Zenbooks. Signed-off-by: Devin Bayer Link: https://lore.kernel.org/r/20240628084603.217106-1-dev@doubly.so Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1ebab783647a9e3bf357002d5c4ff060c8474a0a Merge: f7e46d45c597f 65bc58c3dcad0 Author: Greg Kroah-Hartman Date: Sat Jul 6 11:16:51 2024 +0200 Merge tag 'mhi-for-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Used unique 'mhi_pci_dev_info' struct for product families instead of reusing a shared struct. This allows displaying the actual product name for the MHI devices during driver probe. - Added support for Foxconn SDX72 based modems, T99W515 and DW5934E. - Added a 'name' field to 'struct mhi_controller' for allowing the MHI client drivers to uniquely identify each MHI device based on its product/device name. This is useful in applying any device specific quirks in the client drivers. WWAN MHI Client driver ====================== - Due to the build dependency with the MHI patch exposing 'name' field to client drivers, the WWAN MHI client driver patch that is making use of the 'name' field to apply custom data mux id for Foxconn modems is also included. Collected Ack from Networking maintainer for this patch. MHI EP ====== - Fixed the MHI EP stack to not allocate memory for MHI objects from DMA zone. This was done accidentally while adding the slab cache support and causes the MHI EP stack to run out of memory while doing high bandwidth transfers. * tag 'mhi-for-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: net: wwan: mhi: make default data link id configurable bus: mhi: host: Allow controller drivers to specify name for the MHI controller bus: mhi: host: Add support for Foxconn SDX72 modems bus: mhi: host: pci_generic: Use unique 'mhi_pci_dev_info' for product families bus: mhi: ep: Do not allocate memory for MHI objects from DMA zone commit cf25477c52123fd18373ea43336e44185f4744c0 Merge: 618ba6abfc57b ec7c0f34157e8 Author: Ilpo Järvinen Date: Sat Jul 6 11:40:29 2024 +0300 Merge branch 'pdx86/platform-drivers-x86-lenovo-c630' into review-ilpo commit ec7c0f34157e884e0eb9c94dde3bf84c57488441 Author: Dmitry Baryshkov Date: Wed Jun 26 06:26:26 2024 +0300 platform: arm64: lenovo-yoga-c630: select AUXILIARY_BUS Add missing selection of AUXILIARY_BUS as the driver uses aux bus to create subdevices. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406260704.roVRkyPi-lkp@intel.com/ Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240626-yoga-fix-aux-v1-1-6aaf9099b18e@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit fefbbdfb59d3a20fd98734363e6dd9fa7cc65c70 Author: Takashi Iwai Date: Fri Jul 5 18:03:42 2024 +0200 ALSA: seq: Add tempo base unit for MIDI2 Set Tempo messages MIDI2 Set Tempo message defines the tempo in 10ns unit for finer accuracy, while MIDI1 was defined in 1us unit. For adapting this different unit, introduce "tempo_base" field to snd_seq_queue_tempo struct so that user-space can pass the proper tempo base unit. The accepted value is limited, it must be either 0, 10 or 1000. The protocol version is bumped to 1.0.4 along with this. The access with the older protocol version ignores the tempo-base value in ioctls and always treats as 1000. Reviewed-by: Jaroslav Kysela Link: https://patch.msgid.link/20240705160344.6481-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5e8a9cebc5580ca7c01d6c151017187785dc0dfe Author: Christian Brauner Date: Fri Jul 5 13:08:54 2024 +0200 fs: find rootfs mount of the mount namespace The method we used was predicated on the assumption that the mount immediately following the root mount of the mount namespace would be the rootfs mount of the namespace. That's not always the case though. For example: ID PARENT ID 408 412 0:60 /containers/overlay-containers/bc391117192b32071b22ef2083ebe7735d5c390f87a5779e02faf79ba0746ceb/userdata/hosts /etc/hosts rw,nosuid,nodev,relatime - tmpfs tmpfs rw,size=954664k,nr_inodes=238666,mode=700,uid=1000,gid=1000,inode64 409 414 0:61 / /dev/shm rw,nosuid,nodev,noexec,relatime - tmpfs shm rw,size=64000k,uid=1000,gid=1000,inode64 410 412 0:60 /containers/overlay-containers/bc391117192b32071b22ef2083ebe7735d5c390f87a5779e02faf79ba0746ceb/userdata/.containerenv /run/.containerenv rw,nosuid,nodev,relatime - tmpfs tmpfs rw,size=954664k,nr_inodes=238666,mode=700,uid=1000,gid=1000,inode64 411 412 0:60 /containers/overlay-containers/bc391117192b32071b22ef2083ebe7735d5c390f87a5779e02faf79ba0746ceb/userdata/hostname /etc/hostname rw,nosuid,nodev,relatime - tmpfs tmpfs rw,size=954664k,nr_inodes=238666,mode=700,uid=1000,gid=1000,inode64 412 363 0:65 / / rw,relatime - overlay overlay rw,lowerdir=/home/user1/.local/share/containers/storage/overlay/l/JS65SUCGTPCP2EEBHLRP4UCFI5:/home/user1/.local/share/containers/storage/overlay/l/DLW22KVDWUNI4242D6SDJ5GKCL [...] 413 412 0:68 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw 414 412 0:69 / /dev rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755,uid=1000,gid=1000,inode64 415 412 0:70 / /sys ro,nosuid,nodev,noexec,relatime - sysfs sysfs rw 416 414 0:71 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=100004,mode=620,ptmxmode=666 417 414 0:67 / /dev/mqueue rw,nosuid,nodev,noexec,relatime - mqueue mqueue rw 418 415 0:27 / /sys/fs/cgroup ro,nosuid,nodev,noexec,relatime - cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot 419 414 0:6 /null /dev/null rw,nosuid,noexec - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 420 414 0:6 /zero /dev/zero rw,nosuid,noexec - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 422 414 0:6 /full /dev/full rw,nosuid,noexec - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 423 414 0:6 /tty /dev/tty rw,nosuid,noexec - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 430 414 0:6 /random /dev/random rw,nosuid,noexec - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 431 414 0:6 /urandom /dev/urandom rw,nosuid,noexec - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 433 413 0:72 / /proc/acpi ro,relatime - tmpfs tmpfs rw,size=0k,uid=1000,gid=1000,inode64 440 413 0:6 /null /proc/kcore ro,nosuid - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 441 413 0:6 /null /proc/keys ro,nosuid - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 442 413 0:6 /null /proc/timer_list ro,nosuid - devtmpfs devtmpfs rw,size=4096k,nr_inodes=1179282,mode=755,inode64 443 413 0:73 / /proc/scsi ro,relatime - tmpfs tmpfs rw,size=0k,uid=1000,gid=1000,inode64 444 415 0:74 / /sys/firmware ro,relatime - tmpfs tmpfs rw,size=0k,uid=1000,gid=1000,inode64 445 415 0:75 / /sys/dev/block ro,relatime - tmpfs tmpfs rw,size=0k,uid=1000,gid=1000,inode64 446 413 0:68 /bus /proc/bus ro,nosuid,nodev,noexec,relatime - proc proc rw 447 413 0:68 /fs /proc/fs ro,nosuid,nodev,noexec,relatime - proc proc rw 448 413 0:68 /irq /proc/irq ro,nosuid,nodev,noexec,relatime - proc proc rw 449 413 0:68 /sys /proc/sys ro,nosuid,nodev,noexec,relatime - proc proc rw 450 413 0:68 /sysrq-trigger /proc/sysrq-trigger ro,nosuid,nodev,noexec,relatime - proc proc rw 364 414 0:71 /0 /dev/console rw,relatime - devpts devpts rw,gid=100004,mode=620,ptmxmode=666 In this mount table the root mount of the mount namespace is the mount with id 363 (It isn't visible because it's literally just what the rootfs mount is mounted upon and usually it's just a copy of the real rootfs). The rootfs mount that's mounted on the root mount of the mount namespace is the mount with id 412. But the mount namespace contains mounts that were created before the rootfs mount and thus have earlier mount ids. So the first call to listmnt_next() would return the mount with the mount id 408 and not the rootfs mount. So we need to find the actual rootfs mount mounted on the root mount of the mount namespace. This logic is also present in mntns_install() where vfs_path_lookup() is used. We can't use this though as we're holding the namespace semaphore. We could look at the children of the root mount of the mount namespace directly but that also seems a bit out of place while we have the rbtree. So let's just iterate through the rbtree starting from the root mount of the mount namespace and find the mount whose parent is the root mount of the mount namespace. That mount will usually appear very early in the rbtree and afaik there can only be one. IOW, it would be very strange if we ended up with a root mount of a mount namespace that has shadow mounts. Fixes: 0a3deb11858a ("fs: Allow listmount() in foreign mount namespace") # mainline only Signed-off-by: Christian Brauner commit 2f5e6395714d0ee53c150da38b25975fe37755c2 Merge: 73d4d645a668e a87e699c9d331 Author: Jakub Kicinski Date: Fri Jul 5 18:30:02 2024 -0700 Merge branch 'net-pse-pd-add-new-pse-c33-features' Kory Maincent says: ==================== net: pse-pd: Add new PSE c33 features This patch series adds new c33 features to the PSE API. - Expand the PSE PI informations status with power, class and failure reason - Add the possibility to get and set the PSE PIs power limit v5: https://lore.kernel.org/r/20240628-feature_poe_power_cap-v5-0-5e1375d3817a@bootlin.com v4: https://lore.kernel.org/r/20240625-feature_poe_power_cap-v4-0-b0813aad57d5@bootlin.com v3: https://lore.kernel.org/r/20240614-feature_poe_power_cap-v3-0-a26784e78311@bootlin.com v2: https://lore.kernel.org/r/20240607-feature_poe_power_cap-v2-0-c03c2deb83ab@bootlin.com v1: https://lore.kernel.org/r/20240529-feature_poe_power_cap-v1-0-0c4b1d5953b8@bootlin.com ==================== Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-0-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit a87e699c9d3315f2253626c8c66e75dec1e551b7 Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:12:02 2024 +0200 net: pse-pd: pd692x0: Enhance with new current limit and voltage read callbacks This patch expands PSE callbacks with newly introduced pi_get/set_current_limit() and pi_get_voltage() callback. It also add the power limit ranges description in the status returned. The only way to set ps692x0 port power limit is by configure the power class plus a small power supplement which maximum depends on each class. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-7-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit dac3de193095a0cb579e5d31c237e3e447e4a9b6 Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:12:01 2024 +0200 netlink: specs: Expand the PSE netlink command with C33 pw-limit attributes Expand the c33 PSE attributes with power limit to be able to set and get the PSE Power Interface power limit. ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get --json '{"header":{"dev-name":"eth1"}}' {'c33-pse-actual-pw': 1700, 'c33-pse-admin-state': 3, 'c33-pse-avail-pw-limit': 97500, 'c33-pse-pw-class': 4, 'c33-pse-pw-d-status': 4, 'c33-pse-pw-limit-ranges': [{'max': 18100, 'min': 15000}, {'max': 38000, 'min': 30000}, {'max': 65000, 'min': 60000}, {'max': 97500, 'min': 90000}], 'header': {'dev-index': 5, 'dev-name': 'eth1'}} ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-set --json '{"header":{"dev-name":"eth1"}, "c33-pse-avail-pw-limit":19000}' None Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-6-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit 30d7b6727724ce3729f2cb5b8be985d2d1931d2b Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:12:00 2024 +0200 net: ethtool: Add new power limit get and set features This patch expands the status information provided by ethtool for PSE c33 with available power limit and available power limit ranges. It also adds a call to pse_ethtool_set_pw_limit() to configure the PSE control power limit. Reviewed-by: Oleksij Rempel Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-5-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit 4a83abcef5f4f36be4e04ba18edd64226f6f4a19 Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:11:59 2024 +0200 net: pse-pd: Add new power limit get and set c33 features This patch add a way to get and set the power limit of a PSE PI. For that it uses regulator API callbacks wrapper like get_voltage() and get/set_current_limit() as power is simply V * I. We used mW unit as defined by the IEEE 802.3-2022 standards. set_current_limit() uses the voltage return by get_voltage() and the desired power limit to calculate the current limit. get_voltage() callback is then mandatory to set the power limit. get_current_limit() callback is by default looking at a driver callback and fallback to extracting the current limit from _pse_ethtool_get_status() if the driver does not set its callback. We prefer let the user the choice because ethtool_get_status return much more information than the current limit. expand pse status with c33_pw_limit_ranges to return the ranges available to configure the power limit. Reviewed-by: Sai Krishna Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-4-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit ae37dc574259f2750e9e2666591b752678fcd7cc Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:11:58 2024 +0200 net: pse-pd: pd692x0: Expand ethtool status message This update expands pd692x0_ethtool_get_status() callback with newly introduced details such as the detected class, current power delivered, and extended state information. Acked-by: Oleksij Rempel Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-3-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit c8149739af864227485abe4f79184c25a601211f Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:11:57 2024 +0200 netlink: specs: Expand the PSE netlink command with C33 new features Expand the c33 PSE attributes with PSE class, extended state information and power consumption. ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get --json '{"header":{"dev-name":"eth0"}}' {'c33-pse-actual-pw': 1700, 'c33-pse-admin-state': 3, 'c33-pse-pw-class': 4, 'c33-pse-pw-d-status': 4, 'header': {'dev-index': 4, 'dev-name': 'eth0'}} ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get --json '{"header":{"dev-name":"eth0"}}' {'c33-pse-admin-state': 3, 'c33-pse-ext-state': 'mr-mps-valid', 'c33-pse-ext-substate': 2, 'c33-pse-pw-d-status': 2, 'header': {'dev-index': 4, 'dev-name': 'eth0'}} Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-2-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit e46296002113b4556baffd5dc68c4f9e22dae13a Author: Kory Maincent (Dent Project) Date: Thu Jul 4 10:11:56 2024 +0200 net: ethtool: pse-pd: Expand C33 PSE status with class, power and extended state This update expands the status information provided by ethtool for PSE c33. It includes details such as the detected class, current power delivered, and extended state information. Reviewed-by: Oleksij Rempel Signed-off-by: Kory Maincent Link: https://patch.msgid.link/20240704-feature_poe_power_cap-v6-1-320003204264@bootlin.com Signed-off-by: Jakub Kicinski commit 73d4d645a668e5fca71aa6717b24acfb12ef8ef6 Merge: 064fbc4e9b5a6 30d772a03582b Author: Jakub Kicinski Date: Fri Jul 5 17:45:49 2024 -0700 Merge branch 'net-openvswitch-add-sample-multicasting' Adrian Moreno says: ==================== net: openvswitch: Add sample multicasting. ** Background ** Currently, OVS supports several packet sampling mechanisms (sFlow, per-bridge IPFIX, per-flow IPFIX). These end up being translated into a userspace action that needs to be handled by ovs-vswitchd's handler threads only to be forwarded to some third party application that will somehow process the sample and provide observability on the datapath. A particularly interesting use-case is controller-driven per-flow IPFIX sampling where the OpenFlow controller can add metadata to samples (via two 32bit integers) and this metadata is then available to the sample-collecting system for correlation. ** Problem ** The fact that sampled traffic share netlink sockets and handler thread time with upcalls, apart from being a performance bottleneck in the sample extraction itself, can severely compromise the datapath, yielding this solution unfit for highly loaded production systems. Users are left with little options other than guessing what sampling rate will be OK for their traffic pattern and system load and dealing with the lost accuracy. Looking at available infrastructure, an obvious candidated would be to use psample. However, it's current state does not help with the use-case at stake because sampled packets do not contain user-defined metadata. ** Proposal ** This series is an attempt to fix this situation by extending the existing psample infrastructure to carry a variable length user-defined cookie. The main existing user of psample is tc's act_sample. It is also extended to forward the action's cookie to psample. Finally, a new OVS action (OVS_SAMPLE_ATTR_PSAMPLE) is created. It accepts a group and an optional cookie and uses psample to multicast the packet and the metadata. ==================== Link: https://patch.msgid.link/20240704085710.353845-1-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 30d772a03582bd10447af1bcdd1c731c89b54174 Author: Adrian Moreno Date: Thu Jul 4 10:57:01 2024 +0200 selftests: openvswitch: add psample test Add a test to verify sampling packets via psample works. In order to do that, create a subcommand in ovs-dpctl.py to listen to on the psample multicast group and print samples. Reviewed-by: Aaron Conole Tested-by: Ilya Maximets Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-11-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit b192bf12dbb015d37bb904d61751cad431ceb578 Author: Adrian Moreno Date: Thu Jul 4 10:57:00 2024 +0200 selftests: openvswitch: parse trunc action The trunc action was supported decode-able but not parse-able. Add support for parsing the action string. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-10-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit c7815abbea457afa2a1ab3ded46d29c19da377d2 Author: Adrian Moreno Date: Thu Jul 4 10:56:59 2024 +0200 selftests: openvswitch: add userspace parsing The userspace action lacks parsing support plus it contains a bug in the name of one of its attributes. This patch makes userspace action work. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-9-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 60ccf62d3ceb37c89391e60d5ba402f52b720b62 Author: Adrian Moreno Date: Thu Jul 4 10:56:58 2024 +0200 selftests: openvswitch: add psample action Add sample and psample action support to ovs-dpctl.py. Refactor common attribute parsing logic into an external function. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-8-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 71763d8a8203c28178d7be7f18af73d4dddb36ba Author: Adrian Moreno Date: Thu Jul 4 10:56:57 2024 +0200 net: openvswitch: store sampling probability in cb. When a packet sample is observed, the sampling rate that was used is important to estimate the real frequency of such event. Store the probability of the parent sample action in the skb's cb area and use it in psample action to pass it down to psample module. Reviewed-by: Aaron Conole Acked-by: Eelco Chaudron Reviewed-by: Ilya Maximets Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-7-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit aae0b82b46cb5004bdf82a000c004d69a0885c33 Author: Adrian Moreno Date: Thu Jul 4 10:56:56 2024 +0200 net: openvswitch: add psample action Add support for a new action: psample. This action accepts a u32 group id and a variable-length cookie and uses the psample multicast group to make the packet available for observability. The maximum length of the user-defined cookie is set to 16, same as tc_cookie, to discourage using cookies that will not be offloadable. Reviewed-by: Michal Kubiak Reviewed-by: Aaron Conole Reviewed-by: Ilya Maximets Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-6-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 7b1b2b60c63f070e0dfbe072ccaae13168b38d01 Author: Adrian Moreno Date: Thu Jul 4 10:56:55 2024 +0200 net: psample: allow using rate as probability Although not explicitly documented in the psample module itself, the definition of PSAMPLE_ATTR_SAMPLE_RATE seems inherited from act_sample. Quoting tc-sample(8): "RATE of 100 will lead to an average of one sampled packet out of every 100 observed." With this semantics, the rates that we can express with an unsigned 32-bits number are very unevenly distributed and concentrated towards "sampling few packets". For example, we can express a probability of 2.32E-8% but we cannot express anything between 100% and 50%. For sampling applications that are capable of sampling a decent amount of packets, this sampling rate semantics is not very useful. Add a new flag to the uAPI that indicates that the sampling rate is expressed in scaled probability, this is: - 0 is 0% probability, no packets get sampled. - U32_MAX is 100% probability, all packets get sampled. Reviewed-by: Aaron Conole Acked-by: Eelco Chaudron Reviewed-by: Ido Schimmel Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-5-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit c35d86a23029f1186e3c7a65df7c38b762fb0434 Author: Adrian Moreno Date: Thu Jul 4 10:56:54 2024 +0200 net: psample: skip packet copy if no listeners If nobody is listening on the multicast group, generating the sample, which involves copying packet data, seems completely unnecessary. Return fast in this case. Reviewed-by: Aaron Conole Acked-by: Eelco Chaudron Reviewed-by: Ido Schimmel Reviewed-by: Simon Horman Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-4-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 03448444ae5c6e1de1ae7ff9fa19dc320eeb2d49 Author: Adrian Moreno Date: Thu Jul 4 10:56:53 2024 +0200 net: sched: act_sample: add action cookie to sample If the action has a user_cookie, pass it along to the sample so it can be easily identified. Reviewed-by: Michal Kubiak Reviewed-by: Aaron Conole Acked-by: Eelco Chaudron Reviewed-by: Ido Schimmel Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-3-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 093b0f366567aa3fed85c316f832607069202b23 Author: Adrian Moreno Date: Thu Jul 4 10:56:52 2024 +0200 net: psample: add user cookie Add a user cookie to the sample metadata so that sample emitters can provide more contextual information to samples. If present, send the user cookie in a new attribute: PSAMPLE_ATTR_USER_COOKIE. Reviewed-by: Michal Kubiak Acked-by: Eelco Chaudron Reviewed-by: Simon Horman Reviewed-by: Ido Schimmel Signed-off-by: Adrian Moreno Link: https://patch.msgid.link/20240704085710.353845-2-amorenoz@redhat.com Signed-off-by: Jakub Kicinski commit 064fbc4e9b5a6dbda7fe7b67dc7e9e95d31f8d75 Author: Daniel Golle Date: Thu Jul 4 11:14:55 2024 +0100 net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Implement operations to get and set flow-control link parameters. Both is done by simply calling phylink_ethtool_{get,set}_pauseparam(). Fix whitespace in mtk_ethtool_ops while at it. Signed-off-by: Daniel Golle Reviewed-by: Michal Kubiak Reviewed-by: Russell King (Oracle) Tested-by: Rui Salvaterra Link: https://patch.msgid.link/e3ece47323444631d6cb479f32af0dfd6d145be0.1720088047.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 9d8616034f161222a4ac166c1b42b6d79961c005 Author: Masami Hiramatsu (Google) Date: Fri Jul 5 16:11:25 2024 +0900 tracing/kprobes: Add symbol counting check when module loads Currently, kprobe event checks whether the target symbol name is unique or not, so that it does not put a probe on an unexpected place. But this skips the check if the target is on a module because the module may not be loaded. To fix this issue, this patch checks the number of probe target symbols in a target module when the module is loaded. If the probe is not on the unique name symbols in the module, it will be rejected at that point. Note that the symbol which has a unique name in the target module, it will be accepted even if there are same-name symbols in the kernel or other modules, Link: https://lore.kernel.org/all/172016348553.99543.2834679315611882137.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) commit ca18300e00d584d5693127eb60c108b84883b8ac Author: Shengyu Qu Date: Fri Jul 5 01:26:26 2024 +0800 net: ethernet: mtk_ppe: Change PPE entries number to 16K MT7981,7986 and 7988 all supports 32768 PPE entries, and MT7621/MT7620 supports 16384 PPE entries, but only set to 8192 entries in driver. So incrase max entries to 16384 instead. Signed-off-by: Elad Yifee Signed-off-by: Shengyu Qu Reviewed-by: Simon Horman Link: https://patch.msgid.link/TY3P286MB261103F937DE4EEB0F88437D98DE2@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Jakub Kicinski commit 8323c036789b8b4a61925fce439a89dba17b7f2f Author: Jia Jie Ho Date: Wed Jun 26 09:40:43 2024 +0800 crypto: starfive - Fix nent assignment in rsa dec Missing src scatterlist nent assignment in rsa decrypt function. Removing all unneeded assignment and use nents value from req->src instead. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit 6aad7019f697ab0bed98eba737d19bd7f67713de Author: Jia Jie Ho Date: Wed Jun 26 09:40:42 2024 +0800 crypto: starfive - Align rsa input data to 32-bit Hardware expects RSA input plain/ciphertext to be 32-bit aligned. Set fixed length for preallocated buffer to the maximum supported keysize of the hardware and shift input text accordingly. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit f0622894c59458fceb33c4197462bc2006f3fc6b Author: Hareshx Sankar Raj Date: Tue Jun 25 15:41:19 2024 +0100 crypto: qat - fix unintentional re-enabling of error interrupts The logic that detects pending VF2PF interrupts unintentionally clears the section of the error mask register(s) not related to VF2PF. This might cause interrupts unrelated to VF2PF, reported through errsou3 and errsou5, to be reported again after the execution of the function disable_pending_vf2pf_interrupts() in dh895xcc and GEN2 devices. Fix by updating only section of errmsk3 and errmsk5 related to VF2PF. Signed-off-by: Hareshx Sankar Raj Reviewed-by: Damian Muszynski Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 6424da7d8b938fe66e7e771eaa949bc7b6c29c00 Author: Nivas Varadharajan Mugunthakumar Date: Tue Jun 25 15:38:50 2024 +0100 crypto: qat - extend scope of lock in adf_cfg_add_key_value_param() The function adf_cfg_add_key_value_param() attempts to access and modify the key value store of the driver without locking. Extend the scope of cfg->lock to avoid a potential race condition. Fixes: 92bf269fbfe9 ("crypto: qat - change behaviour of adf_cfg_add_key_value_param()") Signed-off-by: Nivas Varadharajan Mugunthakumar Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit d26cb4f53dab654d337595cd247e6c435b571ca7 Author: Damian Muszynski Date: Tue Jun 25 15:36:44 2024 +0100 Documentation: qat: fix auto_reset attribute details The auto_reset attribute was introduced in kernel 6.9. Fix version and date in documentation. Fixes: f5419a4239af ("crypto: qat - add auto reset on error") Signed-off-by: Damian Muszynski Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 1611f74974d8b64711375bcd5dc33d80f28104cb Author: Andre Przywara Date: Tue Jun 25 00:21:09 2024 +0100 crypto: sun8i-ce - add Allwinner H616 support The crypto engine in the Allwinner H616 is very similar to the H6, but needs the base address for the task descriptor and the addresses within it to be expressed in words, not in bytes. Add a new variant struct entry for the H616, and set the new flag to mark the use of 34 bit addresses. Also the internal 32K oscillator is required for TRNG operation, so specify all four clocks. Signed-off-by: Andre Przywara Reviewed-by: Chen-Yu Tsai Tested-by: Ryan Walklin Tested-by: Philippe Simons Signed-off-by: Herbert Xu commit e0740bee6c21c209191f55d8dfff7c16aeb3578a Author: Andre Przywara Date: Tue Jun 25 00:21:08 2024 +0100 crypto: sun8i-ce - wrap accesses to descriptor address fields The Allwinner H616 (and later) SoCs support more than 32 bits worth of physical addresses. To accommodate the larger address space, the CE task descriptor fields holding addresses are now encoded as "word addresses", so take the actual address divided by four. This is true for the fields within the descriptor, but also for the descriptor base address, in the CE_TDA register. Wrap all accesses to those fields in a function, which will do the required division if needed. For now this in unused, so there should be no change in behaviour. Signed-off-by: Andre Przywara Reviewed-by: Chen-Yu Tsai Signed-off-by: Herbert Xu commit 996f8a9654d0c7b8742379d4e2f1052fccac6643 Author: Andre Przywara Date: Tue Jun 25 00:21:07 2024 +0100 dt-bindings: crypto: sun8i-ce: Add compatible for H616 The Allwinner H616 has a crypto engine very similar to the one in the H6, although all addresses in the DMA descriptors are shifted by 2 bits, to accommodate for the larger physical address space. That makes it incompatible to the H6 variant, and thus requires a new compatible string. Clock wise it relies on the internal oscillator for the TRNG, so needs all four possible clocks specified. Add the compatible string to the list of recognised names, and add the H616 to list of devices requiring all four clocks. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Acked-by: Chen-Yu Tsai Signed-off-by: Herbert Xu commit fcf3c8ccd085967d88e4cff0c47d0841948e9d27 Merge: fecef4cd42c68 3b05c7995cae6 Author: Jakub Kicinski Date: Fri Jul 5 17:02:23 2024 -0700 Merge branch 'net-constify-struct-regmap_bus-regmap_config' Javier Carrasco says: ==================== net: constify struct regmap_bus/regmap_config This series adds the const modifier to the remaining regmap_bus and regmap_config structs within the net subsystem that are effectively used as const (i.e., only read after their declaration), but kept as writtable data. ==================== Link: https://patch.msgid.link/20240703-net-const-regmap-v1-0-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski commit 3b05c7995cae66c263547084ed2f7771f2d3b3a4 Author: Javier Carrasco Date: Wed Jul 3 23:46:36 2024 +0200 net: dsa: ar9331: constify struct regmap_bus `ar9331_sw_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240703-net-const-regmap-v1-4-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski commit 9969163c447229af8d144913500ef14e57b68235 Author: Javier Carrasco Date: Wed Jul 3 23:46:35 2024 +0200 net: encx24j600: constify struct regmap_bus/regmap_config `regmap_encx24j600`, `phycfg` and `phymap_encx24j600` are not modified and can be declared as const to move their data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-net-const-regmap-v1-3-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski commit 7f805f6396d496e9b7b7e92389c987178afeef7b Author: Javier Carrasco Date: Wed Jul 3 23:46:34 2024 +0200 net: ti: icss-iep: constify struct regmap_config `am654_icss_iep_regmap_config` is only assigned to a pointer that passes the data as read-only. Add the const modifier to the struct and pointer to move the data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Roger Quadros Reviewed-by: MD Danish Anwar Link: https://patch.msgid.link/20240703-net-const-regmap-v1-2-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski commit 8dfbb068a4e14a3ff497661d211bfb4b2acc3563 Author: Javier Carrasco Date: Wed Jul 3 23:46:33 2024 +0200 net: dsa: qca8k: constify struct regmap_config `qca8k_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240703-net-const-regmap-v1-1-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski commit fecef4cd42c689a200bdd39e6fffa71475904bc1 Author: Sebastian Andrzej Siewior Date: Thu Jul 4 16:48:15 2024 +0200 tun: Assign missing bpf_net_context. During the introduction of struct bpf_net_context handling for XDP-redirect, the tun driver has been missed. Jakub also pointed out that there is another call chain to do_xdp_generic() originating from netif_receive_skb() and drivers may use it outside from the NAPI context. Set the bpf_net_context before invoking BPF XDP program within the TUN driver. Set the bpf_net_context also in do_xdp_generic() if a xdp program is available. Reported-by: syzbot+0b5c75599f1d872bea6f@syzkaller.appspotmail.com Reported-by: syzbot+5ae46b237278e2369cac@syzkaller.appspotmail.com Reported-by: syzbot+c1e04a422bbc0f0f2921@syzkaller.appspotmail.com Fixes: 401cb7dae8130 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.") Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240704144815.j8xQda5r@linutronix.de Signed-off-by: Jakub Kicinski commit 3b2aef99221d395ce37efa426d7b50e7dcd621d6 Author: Daniel Golle Date: Mon Jul 1 20:28:14 2024 +0100 net: ethernet: mediatek: Allow gaps in MAC allocation Some devices with MediaTek SoCs don't use the first but only the second MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY connected to the second MAC this is quite common. Make sure to reset and enable PSE also in those cases by skipping gaps using 'continue' instead of aborting the loop using 'break'. Fixes: dee4dd10c79a ("net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs") Suggested-by: Elad Yifee Signed-off-by: Daniel Golle Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/379ae584cea112db60f4ada79c7e5ba4f3364a64.1719862038.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 0811b8b03bb30b82c84283dde1ff697bc192abc0 Author: Javier Carrasco Date: Fri Jul 5 20:27:28 2024 +0200 hwmon: (gsc-hwmon) constify read-only struct regmap_bus `gsc_hwmon_regmap_bus` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240705-hwmon-const-regmap-v1-1-7cde543ba818@gmail.com Signed-off-by: Guenter Roeck commit 32207e9ddf7400a5676cb27559560cadee062577 Author: Conor Dooley Date: Fri May 17 18:38:46 2024 +0100 dt-bindings: pwm: describe the cells in #pwm-cells in pwm.yaml When commit 89650a1e3b6f ("dt-bindings: pwm: Convert PWM bindings to json-schema") converted the pwm provider section of the text binding to dt-schema it also updated all references to pwm.txt in pwm provider bindings to pwm.yaml. Most pwm provider bindings had a reference to pwm.txt as it contains a description of what the cells in #pwm-cells are, albeit in the consumer section of the document. Only information in the provider section of the document was moved to the yaml binding, and it contains no information about the cell format, making all references to it for the cell format unhelpful. Fixes: 89650a1e3b6f ("dt-bindings: pwm: Convert PWM bindings to json-schema") Signed-off-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240517-patient-stingily-30611f73e792@spud Signed-off-by: Uwe Kleine-König commit 7346e7a058a2c9aa9ff1cc699c7bf18a402d9f84 Author: Uwe Kleine-König Date: Wed Jul 3 13:00:06 2024 +0200 pwm: stm32: Always do lazy disabling When the state changes from enabled to disabled, polarity, duty_cycle and period are not configured in hardware and TIM_CCER_CCxE is just cleared. However if the state changes from one disabled state to another, all parameters are written to hardware because the early exit from stm32_pwm_apply() is only taken if the pwm is currently enabled. This yields surprises like: Applying { .period = 1, .duty_cycle = 0, .enabled = false } succeeds if the pwm is initially on, but fails if it's already off because 1 is a too small period. Update the check for lazy disable to always exit early if the target state is disabled, no matter what is currently configured. Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240703110010.672654-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König commit 2d4d6bda0f7ba0f188a22698855a1397c8999df3 Author: Luis Henriques (SUSE) Date: Mon May 27 17:14:47 2024 +0100 ext4: use ext4_update_inode_fsync_trans() helper in inode creation Call helper function ext4_update_inode_fsync_trans() instead of open coding it in __ext4_new_inode(). This helper checks both that the handle is valid *and* that it hasn't been aborted due to some fatal error in the journalling layer, using is_handle_aborted(). Signed-off-by: Luis Henriques (SUSE) Link: https://patch.msgid.link/20240527161447.21434-1-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o commit 7378e8991a459f3e5672e4b06bf346adce062fd8 Author: Jeff Johnson Date: Mon May 27 11:02:29 2024 -0700 ext4: add missing MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/ext4/ext4-inode-test.o Signed-off-by: Jeff Johnson Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240527-md-fs-ext4-v1-1-07aad5936bb1@quicinc.com Signed-off-by: Theodore Ts'o commit 449b31ad2937406981685348ad75abefb1f63cba Author: Lai Jiangshan Date: Thu Jul 4 11:49:14 2024 +0800 workqueue: Init rescuer's affinities as the wq's effective cpumask Make it consistent with apply_wqattrs_commit(). Link: https://lore.kernel.org/lkml/20240203154334.791910-5-longman@redhat.com/ Cc: Juri Lelli Cc: Waiman Long Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 1726a17135905e2d2773f18d47bd4e17dd26e1ed Author: Lai Jiangshan Date: Thu Jul 4 11:49:13 2024 +0800 workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S. The PWQ allocation and WQ enlistment are not within the same lock-held critical section; therefore, their states can become out of sync when the user modifies the unbound mask or if CPU hotplug events occur in the interim since those operations only update the WQs that are already in the list. Make the PWQ allocation and WQ enlistment atomic. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 4e9a37389ec2d062e02f6647d1d60c3d11150896 Author: Lai Jiangshan Date: Thu Jul 4 11:49:12 2024 +0800 workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs() kthread_flush_worker() can't be called with wq_pool_mutex held. Prepare for moving wq_pool_mutex and cpu hotplug lock out of alloc_and_link_pwqs(). Cc: Zqiang Link: https://lore.kernel.org/lkml/20230920060704.24981-1-qiang.zhang1211@gmail.com/ Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit c5178e6ca6c8063edc103b75f410add7e4565e63 Author: Lai Jiangshan Date: Thu Jul 4 11:49:11 2024 +0800 workqueue: Make rescuer initialization as the last step of the creation of a new wq For early wq allocation, rescuer initialization is the last step of the creation of a new wq. Make the behavior the same for all allocations. Prepare for initializing rescuer's affinities with the default pwq's affinities. Prepare for moving the whole workqueue initializing procedure into wq_pool_mutex and cpu hotplug locks. Cc: Juri Lelli Cc: Waiman Long Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit c3138f3881920d1391e435aa4144b929d5237617 Author: Lai Jiangshan Date: Thu Jul 4 11:49:10 2024 +0800 workqueue: Register sysfs after the whole creation of the new wq workqueue creation includes adding it to the workqueue list. Prepare for moving the whole workqueue initializing procedure into wq_pool_mutex and cpu hotplug locks. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit b824766504e49f3fdcbb8c722e70996a78c3636e Author: Chen Ridong Date: Thu Jul 4 14:01:19 2024 +0000 cgroup/rstat: add force idle show helper In the function cgroup_base_stat_cputime_show, there are five instances of #ifdef, which makes the code not concise. To address this, add the function cgroup_force_idle_show to make the code more succinct. Signed-off-by: Chen Ridong Signed-off-by: Tejun Heo commit e2e89f96308add00fed632ecb416d84c9313f6aa Author: Nuno Sa Date: Fri Jul 5 17:12:42 2024 +0200 spi: xcomm: fix coding style Just cosmetics. No functional change intended. While at it, removed a couple of redundant else if() statements. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240705-dev-spi-xcomm-gpiochip-v2-4-b10842fc9636@analog.com Signed-off-by: Mark Brown commit 5e7d4755c58a347b4fe7663cef9b169b0965d09d Author: Nuno Sa Date: Fri Jul 5 17:12:41 2024 +0200 spi: xcomm: remove i2c_set_clientdata() i2c_get_clientdata() is not being called anywhere so that we do not need to set clientdata. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240705-dev-spi-xcomm-gpiochip-v2-3-b10842fc9636@analog.com Signed-off-by: Mark Brown commit e8ba259764c745e7de20ec517ae920ecd491b687 Author: Nuno Sa Date: Fri Jul 5 17:12:40 2024 +0200 spi: xcomm: make use of devm_spi_alloc_host() Use devm_spi_alloc_host() so that there's no need to call spi_controller_put() in the error path. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240705-dev-spi-xcomm-gpiochip-v2-2-b10842fc9636@analog.com Signed-off-by: Mark Brown commit 5211070c3309bb3679f4522c77b900f551db5739 Author: Michael Hennerich Date: Fri Jul 5 17:12:39 2024 +0200 spi: xcomm: add gpiochip support The hardware can expose one pin as a GPO. Hence, register a simple gpiochip to support it. Signed-off-by: Michael Hennerich Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240705-dev-spi-xcomm-gpiochip-v2-1-b10842fc9636@analog.com Signed-off-by: Mark Brown commit 89a8718cef859091239fa60b4b5749ecea93f55d Author: Jeff Johnson Date: Sun May 26 11:53:49 2024 -0700 jbd2: add missing MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/jbd2/jbd2.o Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/20240526-md-fs-jbd2-v1-1-7bba6665327d@quicinc.com Signed-off-by: Theodore Ts'o commit be27cd64461c45a6088a91a04eba5cd44e1767ef Author: Kees Cook Date: Thu May 23 15:54:12 2024 -0700 ext4: use memtostr_pad() for s_volume_name As with the other strings in struct ext4_super_block, s_volume_name is not NUL terminated. The other strings were marked in commit 072ebb3bffe6 ("ext4: add nonstring annotations to ext4.h"). Using strscpy() isn't the right replacement for strncpy(); it should use memtostr_pad() instead. Reported-by: syzbot+50835f73143cc2905b9e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/00000000000019f4c00619192c05@google.com/ Fixes: 744a56389f73 ("ext4: replace deprecated strncpy with alternatives") Signed-off-by: Kees Cook Link: https://patch.msgid.link/20240523225408.work.904-kees@kernel.org Signed-off-by: Theodore Ts'o commit 7c73ddb7589fb8ddb1136b6306dfb72089c81511 Author: Zhang Yi Date: Mon May 20 21:18:31 2024 +0800 jbd2: speed up jbd2_transaction_committed() jbd2_transaction_committed() is used to check whether a transaction with the given tid has already committed, it holds j_state_lock in read mode and check the tid of current running transaction and committing transaction, but holding the j_state_lock is expensive. We have already stored the sequence number of the most recently committed transaction in journal t->j_commit_sequence, we could do this check by comparing it with the given tid instead. If the given tid isn't smaller than j_commit_sequence, we can ensure that the given transaction has been committed. That way we could drop the expensive lock and achieve about 10% ~ 20% performance gains in concurrent DIOs on may virtual machine with 100G ramdisk. fio -filename=/mnt/foo -direct=1 -iodepth=10 -rw=$rw -ioengine=libaio \ -bs=4k -size=10G -numjobs=10 -runtime=60 -overwrite=1 -name=test \ -group_reporting Before: overwrite IOPS=88.2k, BW=344MiB/s read IOPS=95.7k, BW=374MiB/s rand overwrite IOPS=98.7k, BW=386MiB/s randread IOPS=102k, BW=397MiB/s After: overwrite IOPS=105k, BW=410MiB/s read IOPS=112k, BW=436MiB/s rand overwrite IOPS=104k, BW=404MiB/s randread IOPS=111k, BW=432MiB/s CC: Dave Chinner Suggested-by: Dave Chinner Link: https://lore.kernel.org/linux-ext4/ZjILCPNZRHeazSqV@dread.disaster.area/ Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/20240520131831.2910790-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit e9ff907f40768351a3a86f5aa9b819436ee0ef19 Author: Josua Mayer Date: Thu Jul 4 17:03:23 2024 +0200 arm64: dts: add description for solidrun cn9132 cex7 module and clearfog board Add description for the SolidRun CN9132 COM-Express Type 7 module, and the Clearfog evaluation board. The COM-Express module includes: - CN9130 SoC - 2x 88F8215 Southbridges - eMMC - SPI Flash - DDR-4 SODIMM connector - 1GBase-T Ethernet PHY The Clearfog Evaluation board provides: - 1x 10Gbps SFP+ - 2x 5GBase-T RJ45 - 4x 1GBase-T RJ45 on DSA switch with 2.5Gbps cpu link - 1x full-size PCI-E x4 - 2x M.2 with PCI-E x1 - 1x M.2 with PCI-E x2 - 2x M.2 with PCI-E x1 and USB-2.0 - 1x M.2 with USB-2.0, USB-3.0 and 2x SIM slots - 1x mini-PCI-E x1 - 2x SATA (Laptop-Style connector with data and power) - 3x USB-3.0 Type-A - microSD slot Signed-off-by: Josua Mayer Signed-off-by: Gregory CLEMENT commit 1280840d20305e01901fa4361d792c4a69704ac5 Author: Josua Mayer Date: Thu Jul 4 17:03:22 2024 +0200 arm64: dts: add description for solidrun cn9131 solidwan board Add description for the SolidRun CN9131 SolidWAN, based on CN9130 SoM with an extra communication processor on the carrier board. This board differentiates itself from CN9130 Clearfog by providing additional SoC native network interfaces and pci buses: 2x 10Gbps SFP+ 4x 1Gbps RJ45 1x miniPCI-E 1x m.2 b-key with sata, usb-2.0 and usb-3.0 1x m.2 m-key with pcie and usb-2.0 1x m.2 b-key with pcie, usb-2.0, usb-3.0 and 2x sim slots 1x mpcie with pcie only 2x type-a usb-2.0/3.0 Signed-off-by: Josua Mayer Signed-off-by: Gregory CLEMENT commit 1c510c7d82e52142953255896288eaac716efd72 Author: Josua Mayer Date: Thu Jul 4 17:03:21 2024 +0200 arm64: dts: add description for solidrun cn9130 som and clearfog boards Add description for the SolidRun CN9130 SoM, and Clearfog Base / Pro reference boards. The SoM has been designed as a pin-compatible replacement for the older Armada 388 based SoM. Therefore it supports the same boards and a similar feature set. Most notable upgrades: - 4x Cortex-A72 - 10Gbps SFP - Both eMMC and SD supported at the same time The developer first supporting this product at SolidRun decided to use different filenames for the DTBs: Armada 388 uses the full "clearfog" string while cn9130 uses the abbreviation "cf". This name is already hard-coded in pre-installed vendor u-boot and can not be changed easily. NOTICE IN CASE ANYBODY WANTS TO SELF-UPGRADE: CN9130 SoM has a different footprint from Armada 388 SoM. Components on the carrier board below the SoM may collide causing damage, such as on Clearfog Base. Signed-off-by: Josua Mayer Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 099e1d034f009ead74137c191f687f0a617520f8 Author: Josua Mayer Date: Thu Jul 4 17:03:20 2024 +0200 dt-bindings: arm64: marvell: add solidrun cn9132 CEX-7 evaluation board Add bindings for the SolidRun CN9132 COM-Express Type 7 evaluation board. The CEX is based on CN9130 SoC and includes two southbridges. Because CN9132 and 9131 are just names for different designs around the same SoC, no soc compatibles beside marvell,cn9130 are needed. Signed-off-by: Josua Mayer Acked-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 5f5eb24090bec383b32e39b9c61e45da82dd6812 Author: Josua Mayer Date: Thu Jul 4 17:03:19 2024 +0200 dt-bindings: arm64: marvell: add solidrun cn9130 som based boards Add bindings for SolidRun boards based on CN9130 SoM. Three boards are added in total: - Clearfog Base - Clearfog Pro - SolidWAN The Clearfog boards are identical to the older Armada 388 based boards, upgraded with a new SoM and SoC. However the feature set and performance characteristics are different, therefore compatible strings from armada 388 versions are not included. SolidWAN uses the same SoM adding a southbridge on the carrier. Since 2019 there are bindings in-tree for two boards based on cn9130 and 9131. These are extremely verbose by listing cn9132, cn9131, cn9130, ap807-quad, ap807 for the SoC alone. CN9130 SoC combines an application processor (ap807) and a communication processor (cp115) in a single package. The communication processor (short CP) is also available separately as a southbridge. It only functions in combination with the CN9130 SoC. Complete systems adding one or two southbridges are by convention called CN9131 and CN9132 respectively. Despite different naming all systems are built around the same SoC. Therefore marvell,cn9131 and marvell,cn9132 can be omitted. The number of CPs is part of a board's BoM and can be reflected in the board compatible string instead. Existing bindings also describe cn9130 as a specialisation of ap807-quad. Usually board-level compatibles stop at the SoC without going into silicon versions or individual dies. There is no programming model at this layer, and in particular not for parts of an SoC. Therefore the ap compatibles can also be omitted. Signed-off-by: Josua Mayer Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit cf8b7454ec916449210f3e9670c871e525006d52 Author: Krzysztof Kozlowski Date: Mon Jul 1 17:03:40 2024 +0200 arm64: dts: armada-3720: align LED node name with bindings Bindings expect the LED node names to follow certain pattern, see dtbs_check warnings: armada-3720-gl-mv1000.dtb: leds: 'power', 'vpn', 'wan' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit a0342414431101629aece5d43f3cc83da71ff8cc Author: Krzysztof Kozlowski Date: Mon Jul 1 17:03:39 2024 +0200 arm64: dts: armada-3720: align GPIO keys node name with bindings Bindings expect the GPIO key node names to follow certain pattern, see dtbs_check warnings: armada-3720-gl-mv1000.dtb: keys: 'reset' does not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)... Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 731daaa5093d5c93c3b46dfbe46970cc52e15335 Author: Marek Behún Date: Mon Jul 1 13:30:10 2024 +0200 ARM: dts: turris-omnia: Add GPIO key node for front button Now that we have the MCU device-tree node, which acts as a GPIO controller, add GPIO key node for the front button. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit cfa65ef7c84adafcbd1f9c7ba349812e1692d0a2 Author: Marek Behún Date: Mon Jul 1 13:30:09 2024 +0200 ARM: dts: turris-omnia: Add MCU system-controller node Turris Omnia's MCU provides various features that can be configured over I2C at address 0x2a. Add device-tree node. This does not carry a Fixes tag - we do not want this to get backported to stable kernels for the following reason: U-Boot since v2022.10 inserts a phy-reset-gpio property into the WAN ethernet node pointing to the MCU node if it finds the MCU node with a cznic,turris-omnia-mcu compatible. Thus if this change got backported to a stable kernel, the WAN interface driver would defer probe indefinitely (since it would wait for the turris-omnia-mcu driver which would not be present). Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 419ed754a3b6279f748909dd552fe425c7fce4a2 Author: Pascal Paillet Date: Fri Jun 28 10:58:13 2024 +0200 arm64: dts: st: describe power supplies for stm32mp257f-ev1 board Describe power supplies for stm32mp257f-ev1 board. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit 387abbb94535a74dbbd37fcfb33094daa0c56129 Author: Pascal Paillet Date: Fri Jun 28 10:58:12 2024 +0200 arm64: dts: st: add scmi regulators on stm32mp25 Add SCMI regulators description on STM32MP25. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit 87b6426ab92efd91a17aed1f5b1d94f36938e28f Author: Pascal Paillet Date: Fri Jun 28 10:58:11 2024 +0200 regulator: Add STM32MP25 regulator bindings These bindings will be used for the SCMI voltage domain. Signed-off-by: Pascal Paillet Acked-by: Krzysztof Kozlowski Acked-by: Mark Brown Signed-off-by: Alexandre Torgue commit 81e7b432f144155d791ae4ed8cb0ef78ddb532cf Author: Alexandre Torgue Date: Fri Jul 5 11:36:35 2024 +0200 ARM: dts: stm32: omit unused pinctrl groups from stm32mp13 dtb files stm32mp13-pinctrl.dtsi contains nearly all pinctrl groups collected from all boards. Most of them end up unused by a board and only waste binary space. Add /omit-if-no-ref/ to the groups to scrub the unused groups from the dtbs. Use the following regex to update the file and drop two useless newlines too: s@^\t[^:]\+: [^ ]\+ {$@\t/omit-if-no-ref/\r&@ Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue commit e0fc47d897fbf89bd556a898624490e7171f3adb Author: Christophe Roullier Date: Wed Jun 19 14:58:15 2024 +0200 arm64: dts: st: enable Ethernet2 on stm32mp257f-ev1 board ETHERNET2 instance is connected to Realtek PHY in RGMII mode Ethernet is SNSP IP with GMAC5 version. Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue commit b4c354b1b226af0855b43cdae8fbb0361995e407 Author: Christophe Roullier Date: Wed Jun 19 14:58:14 2024 +0200 arm64: dts: st: add eth2 pinctrl entries in stm32mp25-pinctrl.dtsi Add pinctrl entry related to ETH2 in stm32mp25-pinctrl.dtsi ethernet2: RGMII with crystal. Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue commit ed4dd5b795738a14ceb58299b6456c84b0ad6c5e Author: Christophe Roullier Date: Wed Jun 19 14:58:13 2024 +0200 arm64: dts: st: add ethernet1 and ethernet2 support on stm32mp25 Both instances ethernet based on GMAC SNPS IP on stm32mp25. GMAC IP version is SNPS 5.3 Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue commit 7253ddc6a38d39951d3f06cbf80bbfe236dae3e8 Author: Amelie Delaunay Date: Fri May 31 17:07:12 2024 +0200 arm64: dts: st: add HPDMA nodes on stm32mp251 The High Performance Direct Memory Access (HPDMA) controller is used to perform programmable data transfers between memory-mapped peripherals and memories (or between memories) via linked-lists. There are 3 instances of HPDMA on stm32mp251, using stm32-dma3 driver, with 16 channels per instance and with one interrupt per channel. Channels 0 to 7 are implemented with a FIFO of 8 bytes. Channels 8 to 11 are implemented with a FIFO of 32 bytes. Channels 12 to 15 are implemented with a FIFO of 128 bytes. Thanks to stm32-dma3 bindings, the user can ask for a channel with specific FIFO size. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 1b02383c385b16b4b275e30a3dd5860c0fd95c4a Author: Marek Vasut Date: Sun Jun 23 21:51:56 2024 +0200 ARM: dts: stm32: Add ethernet support for DH STM32MP13xx DHCOR DHSBC board Add ethernet support for the DH STM32MP13xx DHCOR DHSBC carrier board. This carrier board is populated with two gigabit ethernet ports and two Realtek RTL8211F PHYs, both are described in this DT patch. Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue commit bf016e1db918ae5574b1f0e6d1fe844f9f125498 Author: Alexandre Torgue Date: Thu Jun 27 14:27:49 2024 +0200 ARM: dts: stm32: order stm32mp13-pinctrl nodes Keep alphabetic order for pins definition nodes for a better read. Signed-off-by: Alexandre Torgue commit e9442f1fa4d2545dd6c0aaf7cb7a125cb04f8f2f Author: Christophe Roullier Date: Mon Jun 10 10:03:09 2024 +0200 ARM: dts: stm32: add ethernet1 for STM32MP135F-DK board Ethernet1: RMII with crystal Ethernet2: RMII with no cristal, need "phy-supply" property to work, today this property was managed by Ethernet glue, but should be present and managed in PHY node. So I will push second Ethernet in next step. PHYs used are SMSC (LAN8742A) Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue commit fbbfbdfe03522c72f22cb79b7bd920b99bc7c674 Author: Christophe Roullier Date: Mon Jun 10 10:03:08 2024 +0200 ARM: dts: stm32: add ethernet1/2 RMII pins for STM32MP13F-DK board Those pins are used for Ethernet 1 and 2 on STM32MP13F-DK board. ethernet1: RMII with crystal. ethernet2: RMII without crystal. Add analog gpio pin configuration ("sleep") to manage power mode on stm32mp13. Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Alexandre Torgue commit 0872f840edc9a163a9be46760f81631a8c7efa0f Author: Christophe Roullier Date: Mon Jun 10 10:03:07 2024 +0200 ARM: dts: stm32: add ethernet1 and ethernet2 support on stm32mp13 Both instances ethernet based on GMAC SNPS IP on stm32mp13. GMAC IP version is SNPS 4.20. Signed-off-by: Christophe Roullier Signed-off-by: Alexandre Torgue commit 710d4f79bd430aec8c2b1edbd54b4370ac0b5f1b Author: Uwe Kleine-König Date: Thu Jun 13 10:02:28 2024 +0200 ARM: dts: stm32: Document output pins for PWMs on stm32mp135f-dk To simplify identifying the pins where the PWM output is routed to, add a comment to each PWM device about the respective pin on the expansion connector. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Torgue commit 3333d21af6fade5215bf0803fd8ef3c4c9d46fd4 Author: Etienne Carriere Date: Mon Jun 17 11:14:18 2024 +0200 ARM: dts: stm32: OP-TEE async notif interrupt for ST STM32MP15x boards Define the GIC interrupt (PPI 15) to be used on ST STM32MP15x boards for OP-TEE async notif. Signed-off-by: Etienne Carriere Signed-off-by: Alexandre Torgue commit 5b3566a75f2d749fbfef5fb4f5acfd1754333252 Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:40 2024 +0200 ARM: dts: marvell: orion: align LED node name with bindings Bindings expect the LED node names to follow certain pattern, see dtbs_check warnings: orion5x-lswsgl.dtb: gpio-leds: led-alarm: Unevaluated properties are not allowed ('gpio' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit d8fff5ef3ef5345cc68b470e59832339890d2fd3 Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:39 2024 +0200 ARM: dts: marvell: orion5x-lswsgl: use 'gpios' property for LEDs The 'gpio' property in GPIO LEDs is deprecated, as reported by dtbs_check: orion5x-lswsgl.dtb: gpio-leds: led-alarm: Unevaluated properties are not allowed ('gpio' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 7d751583a086123768be06ef8acdec7a516ffcbc Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:38 2024 +0200 ARM: dts: marvell: orion: drop incorrect address/size-cells in GPIO keys Bindings do not allow address/size-cells in GPIO keys and the GPIO keys is not a bus, see dtbs_check warnings: orion5x-lacie-ethernet-disk-mini-v2.dtb: gpio-keys: '#address-cells', '#size-cells' do not match any of the regexes: '^(button|event|key|switch|... Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 85860863a4b2c216f399896d4fb1ec75b2dea64f Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:37 2024 +0200 ARM: dts: marvell: orion: align GPIO keys node name with bindings Bindings expect the GPIO key node names to follow certain pattern, see dtbs_check warnings: orion5x-lacie-d2-network.dtb: gpio-keys: 'front_button', 'power_rocker_sw_off', 'power_rocker_sw_on' do not match any of the regexes: '^(button|event|key|switch| ... Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 9d0120b72b972fb564940a252d994864fb9d6524 Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:36 2024 +0200 ARM: dts: marvell: kirkwood: align LED node name with bindings Bindings expect the LED node names to follow certain pattern, see dtbs_check warnings: kirkwood-ds409slim.dtb: gpio-leds-alarm-12: 'hdd1-green' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 28be5af95a79c841e8dee5ec2cde990519c8df73 Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:35 2024 +0200 ARM: dts: marvell: kirkwood: drop incorrect address/size-cells in GPIO keys Bindings do not allow address/size-cells in GPIO keys and the GPIO keys is not a bus, see dtbs_check warnings: kirkwood-openblocks_a7.dtb: gpio_keys: '#address-cells', '#size-cells' do not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)... Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit b98a91911d24babe20600ad19697570ea335356f Author: Krzysztof Kozlowski Date: Mon Jul 1 16:56:34 2024 +0200 ARM: dts: marvell: kirkwood: align GPIO keys node name with bindings Bindings expect the GPIO key node names to follow certain pattern, see dtbs_check warnings: kirkwood-laplug.dtb: gpio_keys: 'power' does not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)... Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit e62f7f6b48e3473278edc18e439cd60b87ae2644 Author: Marek Behún Date: Mon Jun 24 16:53:54 2024 +0200 ARM: dts: armada-{370-xp,375,38x,39x}: Drop #size-cells from mpic node The marvell,mpic interrupt controller has no children nodes. Drop the Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit 7852134db3c6fca65e6cbdf081e40113e9222997 Author: Chris Packham Date: Fri May 31 11:16:08 2024 +1200 ARM: dts: marvell: Add 7-segment LED display on x530 The Allied Telesis x530 products have a 7-segment LED display which is used for node identification when the devices are stacked. Represent this as a gpio-7-segment device. Signed-off-by: Chris Packham Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT commit 6070471088b9db1f7e2aee4b648ce53fdbb3e5aa Author: Stanislav Jakubek Date: Thu Jul 4 21:01:54 2024 +0200 dt-bindings: regulator: sprd,sc2731-regulator: convert to YAML Convert the Spreadtrum SC2731 regulator bindings to DT schema. Change during conversion: - switch compatible from sprd,sc27xx-regulator to sprd,sc2731-regulator, same as the only in-tree user has done back in 2019 [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm64/boot/dts/sprd/sc2731.dtsi?h=v6.9&id=0419a75b1808dda225b17ba1509f195f23c0db88 Signed-off-by: Stanislav Jakubek Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/ZobxoobZvA8k3pyi@standask-GA-A55M-S2HP Signed-off-by: Mark Brown commit ccb367c5ab5814bb731eb517544a2ba6b7c3b689 Author: Shenghao Ding Date: Fri Jul 5 14:48:46 2024 +0800 ASoc: pcm6240: Remove unnecessary name-prefix for all the controls Adding name-prefix for each audio controls is a redundant, because name-prefix will be automatically added behind the control name when creating a new control. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240705064846.1723-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit a67a1deb11d9a692366100d9ba9fb3aeb0c7707b Author: Benjamin Tissoires Date: Fri Jul 5 14:06:22 2024 +0200 HID: samples: fix the 2 struct_ops definitions Turns out that this is not compiling anymore because the hid_bpf_ops struct_ops definition had a change during the revisions. Fixes: e342d6f6f7d8 ("HID: samples: convert the 2 HID-BPF samples into struct_ops") Signed-off-by: Benjamin Tissoires commit 3a904d2c771115154380caaae7ffaaf0095fb88f Author: Benjamin Tissoires Date: Fri Jul 5 14:07:06 2024 +0200 HID: fix for amples in for-6.11/bpf To: Jiri Kosina Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Benjamin Tissoires --- Changes in v2: - EDITME: describe what is new in this series revision. - EDITME: use bulletpoints and terse descriptions. - Link to v1: https://lore.kernel.org/r/20240705-for-6-11-bpf-v1-1-1960e3165c9e@kernel.org --- b4-submit-tracking --- # This section is used internally by b4 prep for tracking purposes. { "series": { "revision": 2, "change-id": "20240705-for-6-11-bpf-a349efc08df8", "prefixes": [], "history": { "v1": [ "20240705-for-6-11-bpf-v1-1-1960e3165c9e@kernel.org" ] } } } commit df8c0b8a03e871431587a13a6765cb4c601e1573 Author: Javier Carrasco Date: Wed Jun 19 21:42:45 2024 +0200 USB: serial: garmin_gps: use struct_size() to allocate pkt Use the struct_size macro to calculate the size of the pkt, which includes a trailing flexible array. Suggested-by: Nathan Chancellor Signed-off-by: Javier Carrasco Reviewed-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Johan Hovold commit 55a15b3a713a3f24360cf9d8dcfd2a3e337321d6 Author: Javier Carrasco Date: Wed Jun 19 21:42:44 2024 +0200 USB: serial: garmin_gps: annotate struct garmin_packet with __counted_by Use the __counted_by compiler attribute for the data[] flexible array member to improve the results of array bound sanitizers. Reviewed-by: Nathan Chancellor Signed-off-by: Javier Carrasco Reviewed-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Johan Hovold commit 080402007007ca1bed8bcb103625137a5c8446c6 Author: Catalin Marinas Date: Fri Jul 5 12:54:29 2024 +0100 irqchip/gic-v3: Fix 'broken_rdists' unused warning when !SMP and !ACPI Compiling the GICv3 driver on arm32 with CONFIG_SMP disabled (CONFIG_ACPI is not available) generates an unused variable warning for 'broken_rdists'. Add a __maybe_unused attribute to silence the compiler. Fixes: d633da5d3ab1 ("irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs") Cc: # .x Acked-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 9f4dc05107a6db3743e6b9ea4014cbdc3795682d Author: Jeff Johnson Date: Tue Jun 11 10:52:54 2024 -0700 USB: serial: add missing MODULE_DESCRIPTION() macros Since commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing"), ARCH=x86 make allmodconfig && make W=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/ch341.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/usb_debug.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/mxuport.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/navman.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/qcaux.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/usb-serial-simple.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/serial/symbolserial.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson [ johan: amend commit message with commit introducing W=1 warning; tweak some descriptions ] Signed-off-by: Johan Hovold commit f666604321f1da2b9bd237ef8a1afdd47460e74b Author: Dr. David Alan Gilbert Date: Thu May 30 00:47:22 2024 +0100 USB: serial: spcp8x5: remove unused struct 'spcp8x5_usb_ctrl_arg' 'spcp8x5_usb_ctrl_arg' has been unused since the original commit 619a6f1d1423 ("USB: add usb-serial spcp8x5 driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Johan Hovold commit 62a05f4ae9c1fb70bc75d494c9c1c373d2c2e374 Merge: d076e2bd09f22 fe34394ecdad4 Author: Daniel Vetter Date: Fri Jul 5 12:45:40 2024 +0200 Merge tag 'drm-msm-next-2024-07-04' of https://gitlab.freedesktop.org/drm/msm into drm-next Updates for v6.11 Core: - SM7150 support DPU: - SM7150 support - Fix DSC support for DSI panels in video mode - Fixed TE vsync source support for DSI command-mode panels - Fix for devices without UBWC in the display controller (ie. QCM2290) DSI: - Remove unused register-writing wrappers - Fix DSC support for panels in video mode - Add support for parsing TE vsync source - Add support for MSM8937 (28nm DSI PHY) MDP5: - Add support for MSM8937 - Fix configuration for MSM8953 GPU: - Split giant device table into per-gen "hw catalog" similar to what is done on the display side of the driver - Fix a702 UBWC mode - Fix unused variably warnings - GPU memory traces - Add param for userspace to know if raytracing is supported - Memory barrier cleanup and GBIF unhalt fix - X185 support (aka gpu in X1 laptop chips) - a505 support - fixes Signed-off-by: Daniel Vetter From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvZQpYEHpSCgXGJ2kaHJDK6QFAFfTsfiWm4b2zZOnjXGw@mail.gmail.com commit d076e2bd09f22db8a181a081479008524674b5b3 Merge: bfc109361cfc7 896868eded124 Author: Daniel Vetter Date: Fri Jul 5 12:37:21 2024 +0200 Merge tag 'drm-misc-next-2024-07-04' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for $kernel-version: UAPI Changes: Cross-subsystem Changes: Core Changes: - dp/mst: Fix daisy-chaining at resume - dsc: Add helper to dump the DSC configuration - tests: Add tests for the new monochrome TV mode variant Driver Changes: - ast: Refactor the mode setting code - panfrost: Fix devfreq job reporting - stm: Add LDVS support, DSI PHY updates - panels: - New panel: AUO G104STN01, K&d kd101ne3-40ti, Signed-off-by: Daniel Vetter From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240704-curvy-outstanding-lizard-bcea78@houat commit bfc109361cfc7b3251ed3b7993156825fa895a0d Merge: 6be146cf57b64 3b85152cb167b Author: Daniel Vetter Date: Fri Jul 5 12:14:58 2024 +0200 Merge tag 'drm-intel-gt-next-2024-07-04' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Driver Changes: Fixes/improvements/new stuff: - Downgrade stolen lmem setup warning [gem] (Jonathan Cavitt) - Evaluate GuC priority within locks [gt/uc] (Andi Shyti) - Fix potential UAF by revoke of fence registers [gt] (Janusz Krzysztofik) - Return NULL instead of '0' [gem] (Andi Shyti) - Use the correct format specifier for resource_size_t [gem] (Andi Shyti) - Suppress oom warning in favour of ENOMEM to userspace [gem] (Nirmoy Das) Miscellaneous: - Evaluate forcewake usage within locks [gt] (Andi Shyti) - Fix typo in comment [gt/uc] (Andi Shyti) Signed-off-by: Daniel Vetter From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/ZoZP6mUSergfzFMh@linux commit 11eaac6e8e72001c28d2043eb160736187b7977d Merge: 30b7748b2bc88 2453e858e945e Author: Linus Walleij Date: Fri Jul 5 12:08:48 2024 +0200 Merge tag 'renesas-pinctrl-for-v6.11-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.11 (take three) - Support output enable on RZ/G2L. Signed-off-by: Linus Walleij commit c7f79f2620b7776586c626edf21eb6ed6ed3d1eb Author: Florian Westphal Date: Wed Jul 3 12:46:34 2024 +0200 openvswitch: prepare for stolen verdict coming from conntrack and nat engine At this time, conntrack either returns NF_ACCEPT or NF_DROP. To improve debuging it would be nice to be able to replace NF_DROP verdict with NF_DROP_REASON() helper, This helper releases the skb instantly (so drop_monitor can pinpoint precise location) and returns NF_STOLEN. Prepare call sites to deal with this before introducing such changes in conntrack and nat core. Signed-off-by: Florian Westphal Reviewed-by: Aaron Conole Signed-off-by: David S. Miller commit 6be146cf57b642d35a11dee2af4d534ebea97dde Merge: 71e9f407fd42d 4ed6a3689caba Author: Daniel Vetter Date: Fri Jul 5 12:02:11 2024 +0200 Merge tag 'amd-drm-next-6.11-2024-07-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.11-2024-07-03: amdgpu: - Use vmalloc for dc_state - Replay fixes - Freesync fixes - DCN 4.0.1 fixes - DML fixes - DCC updates - Misc code cleanups and bug fixes - 8K display fixes - DCN 3.5 fixes - Restructure DIO code - DML1 fixes - DML2 fixes - GFX11 fix - GFX12 updates - GFX12 modifiers fixes - RAS fixes - IP dump fixes - Add some updated IP version checks _ Silence UBSAN warning radeon: - GPUVM fix Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240703211314.2041893-1-alexander.deucher@amd.com commit 0fc78aa67b3f9a7cc6b67ddbc511e4a5022cfd01 Author: Yanjun Yang Date: Fri Jun 14 09:00:12 2024 +0800 ARM: dts: stm32: Missing clocks for stm32f429's syscfg. Without clock definition, SYSCFG will not work, EXTI interrupt for port other than GPIOA will fail to operate. Signed-off-by: Yanjun Yang Signed-off-by: Alexandre Torgue commit 6331bddce649829afb2c2e462df812f8e8657a61 Author: Marek Vasut Date: Sun Apr 28 00:10:12 2024 +0200 ARM: dts: stm32: Add support for STM32MP13xx DHCOR SoM and DHSBC board This stm32mp135f-dhcor-dhsbc board is a stack of DHCOR SoM based on STM32MP135F SoC (900MHz / crypto capabilities) populated on DHSBC carrier board. The SoM contains the following peripherals: - STPMIC (power delivery) - 512MB DDR3L memory - eMMC and SDIO WiFi module The DHSBC carrier board contains the following peripherals: - Two RGMII Ethernet ports - USB-A Host port, USB-C peripheral port, USB-C power supply plug - Expansion connector Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue commit 690c66656e99ebc962451afbc1f15d074646773a Author: Marek Vasut Date: Sun Apr 28 00:10:11 2024 +0200 ARM: dts: stm32: Add pinmux nodes for DH electronics STM32MP13xx DHCOR SoM and DHSBC board Add new pinmux nodes for DH electronics STM32MP13xx DHCOR SoM and DHSBC board. The following pinmux nodes are added: - ADC pins - ADC CC pins - ETH1 pins - ETH2 pins - I2C5 pins - MCAN1 pins - MCAN2 pins - PWM13 pins - PWM5 pins - QSPI pins - SAI1 pins - SDMMC2 D4..D7 pins - SPI2 pins - SPI3 pins - UART4 pins - UART7 pins - USART1 pins - USART2 pins Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue commit 71e9f407fd42d8ce28ff40c4d9cda08c9f3c0f99 Merge: 6256274c0182b 15eb8573ad72a Author: Daniel Vetter Date: Fri Jul 5 11:39:22 2024 +0200 Merge tag 'amd-drm-next-6.11-2024-06-28' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.11-2024-06-28: amdgpu: - JPEG 5.x fixes - More FW loading cleanups - Misc code cleanups - GC 12.x fixes - ASPM fix - DCN 4.0.1 updates - SR-IOV fixes - HDCP fix - USB4 fixes - Silence UBSAN warnings - MES submission fixes - Update documentation for new products - DCC updates - Initial ISP 4.x plumbing - RAS fixes - Misc small fixes amdkfd: - Fix missing unlock in error path for adding queues Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240628213135.427214-1-alexander.deucher@amd.com commit 6256274c0182b584e7011077d071f905f2385f64 Merge: 6cab3e2638beb 8ad49a92cff4b Author: Daniel Vetter Date: Fri Jul 5 11:36:24 2024 +0200 Merge tag 'mediatek-drm-next-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 6.11 1. Convert to platform remove callback returning void 2. Drop chain_mode_fixup call in mode_valid() 3. Fixes the errors of MediaTek display driver found by IGT. 4. Add display support for the MT8365-EVK board 5. Fix bit depth overwritten for mtk_ovl_set bit_depth() 6. Remove less-than-zero comparison of an unsigned value 7. Call drm_atomic_helper_shutdown() at shutdown time 8. Log errors in probe with dev_err_probe() 9. Fix possible_crtcs calculation 10. Fix spurious kfree() Signed-off-by: Daniel Vetter From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20240628134632.28672-1-chunkuang.hu@kernel.org commit 6cab3e2638beb9623502b0726536f5e162ea70be Merge: 3ccf1b83a57b3 704d3d60fec45 Author: Daniel Vetter Date: Fri Jul 5 11:29:59 2024 +0200 Merge tag 'drm-etnaviv-next-2024-06-28' of https://git.pengutronix.de/git/lst/linux into drm-next - fix i.MX8MP NPU clock gating - workaround FE register cdc issues on some cores - fix DMA sync handling for cached buffers - fix job timeout handling - keep TS enabled on MMUv2 cores for improved performance Signed-off-by: Daniel Vetter From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/e8b91e2f18e6eaa722569dd21f559009064b1730.camel@pengutronix.de commit 3ccf1b83a57b3a09df66a005cde3b404c4130319 Merge: 86634fa4e6aef 2210093478443 Author: Daniel Vetter Date: Fri Jul 5 11:21:34 2024 +0200 Merge tag 'exynos-drm-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Some cleanups to Exynos Virtual Display driver - Use drm_edid_duplicate() instead of kmemdup(). - Replace existing EDID handling with struct drm_edid functions for improved management. - Keep an allocated raw_edid or NULL and handle fake_edid_info in get_modes(). Signed-off-by: Daniel Vetter From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20240703075912.37106-1-inki.dae@samsung.com commit 86634fa4e6aeff2e190616c304156899beb4d76b Merge: 27aec396c48c6 22a40d14b572d Author: Daniel Vetter Date: Fri Jul 5 10:35:14 2024 +0200 Merge v6.10-rc6 into drm-next The exynos-next pull is based on a newer -rc than drm-next. hence backmerge first to make sure the unrelated conflicts we accumulated don't end up randomly in the exynos merge pull, but are separated out. Conflicts are all benign: Adjacent changes in amdgpu and fbdev-dma code, and cherry-pick conflict in xe. Signed-off-by: Daniel Vetter commit aba43bdfdccf15da1dfdc657bd9dada9010d77a4 Merge: 390b14b5e9f6e 357768c7e7924 Author: David S. Miller Date: Fri Jul 5 09:35:52 2024 +0100 Merge branch 'pcs-xpcs-mmap' into main Serge Semin commit 357768c7e79242995f71ff51d2bc49623be8fb7d Author: Serge Semin Date: Mon Jul 1 21:28:41 2024 +0300 net: stmmac: Add DW XPCS specified via "pcs-handle" support Recently the DW XPCS DT-bindings have been introduced and the DW XPCS driver has been altered to support the DW XPCS registered as a platform device. In order to have the DW XPCS DT-device accessed from the STMMAC driver let's alter the STMMAC PCS-setup procedure to support the "pcs-handle" property containing the phandle reference to the DW XPCS device DT-node. The respective fwnode will be then passed to the xpcs_create_fwnode() function which in its turn will create the DW XPCS descriptor utilized in the main driver for the PCS-related setups. Signed-off-by: Serge Semin Signed-off-by: David S. Miller commit 351066bad6ade5ad0f5f90fde2dc759759959969 Author: Serge Semin Date: Mon Jul 1 21:28:40 2024 +0300 net: stmmac: Create DW XPCS device with particular address Currently the only STMMAC platform driver using the DW XPCS code is the Intel mGBE device driver. (It can be determined by finding all the drivers having the stmmac_mdio_bus_data::has_xpcs flag set.) At the same time the low-level platform driver masks out the DW XPCS MDIO-address from being auto-detected as PHY by the MDIO subsystem core. Seeing the PCS MDIO ID is known the procedure of the DW XPCS device creation can be simplified by dropping the loop over all the MDIO IDs. From now the DW XPCS device descriptor will be created for the MDIO-bus address pre-defined by the platform drivers via the stmmac_mdio_bus_data::pcs_mask field. Note besides this shall speed up a bit the Intel mGBE probing. Signed-off-by: Serge Semin Signed-off-by: David S. Miller commit 9cad7275463ab9e52aeae8d2ecb169afee6876f3 Author: Serge Semin Date: Mon Jul 1 21:28:39 2024 +0300 net: pcs: xpcs: Add fwnode-based descriptor creation method It's now possible to have the DW XPCS device defined as a standard platform device for instance in the platform DT-file. Although that functionality is useless unless there is a way to have the device found by the client drivers (STMMAC/DW *MAC, NXP SJA1105 Eth Switch, etc). Provide such ability by means of the xpcs_create_fwnode() method. It needs to be called with the device DW XPCS fwnode instance passed. That node will be then used to find the MDIO-device instance in order to create the DW XPCS descriptor. Note the method semantics and name is similar to what has been recently introduced in the Lynx PCS driver. Signed-off-by: Serge Semin Signed-off-by: David S. Miller commit f6bb3e9d98c2e8d70587d5ddaf9426ef30d7865c Author: Serge Semin Date: Mon Jul 1 21:28:38 2024 +0300 net: pcs: xpcs: Add Synopsys DW xPCS platform device driver Synopsys DesignWare XPCS IP-core can be synthesized with the device CSRs being accessible over the MCI or APB3 interface instead of the MDIO bus (see the CSR_INTERFACE HDL parameter). Thus all the PCS registers can be just memory mapped and be a subject of the standard MMIO operations of course taking into account the peculiarities of the Clause C45 CSRs mapping. From that perspective the DW XPCS devices would look as just normal platform devices for the kernel. On the other hand in order to have the DW XPCS devices handled by the pcs-xpcs.c driver they need to be registered in the framework of the MDIO-subsystem. So the suggested change is about providing a DW XPCS platform device driver registering a virtual MDIO-bus with a single MDIO-device representing the DW XPCS device. DW XPCS platform device is supposed to be described by the respective compatible string "snps,dw-xpcs" (or with the PMA-specific compatible string), CSRs memory space and optional peripheral bus and reference clock sources. Depending on the INDIRECT_ACCESS IP-core synthesize parameter the memory-mapped reg-space can be represented as either directly or indirectly mapped Clause 45 space. In the former case the particular address is determined based on the MMD device and the registers offset (5 + 16 bits all together) within the device reg-space. In the later case there is only 8 lower address bits are utilized for the registers mapping (255 CSRs). The upper bits are supposed to be written into the respective viewport CSR in order to select the respective MMD sub-page. Note, only the peripheral bus clock source is requested in the platform device probe procedure. The core and pad clocks handling has been implemented in the framework of the xpcs_create() method intentionally since the clocks-related setups are supposed to be performed later, during the DW XPCS main configuration procedures. (For instance they will be required for the DW Gen5 10G PMA configuration.) Signed-off-by: Serge Semin Signed-off-by: David S. Miller commit 664690eb08f71290c2e67c5a1d234075077b4f5b Author: Serge Semin Date: Mon Jul 1 21:28:37 2024 +0300 dt-bindings: net: Add Synopsys DW xPCS bindings Synopsys DesignWare XPCS IP-core is a Physical Coding Sublayer (PCS) layer providing an interface between the Media Access Control (MAC) and Physical Medium Attachment Sublayer (PMA) through a Media independent interface. From software point of view it exposes IEEE std. Clause 45 CSR space and can be accessible either by MDIO or MCI/APB3 bus interfaces. In the former case the PCS device is supposed to be defined under the respective MDIO bus DT-node. In the later case the DW xPCS will be just a normal IO memory-mapped device. Besides of that DW XPCS DT-nodes can have an interrupt signal and clock source properties specified. The former one indicates the Clause 73/37 auto-negotiation events like: negotiation page received, AN is completed or incompatible link partner. The clock DT-properties can describe up to three clock sources: peripheral bus clock source, internal reference clock and the externally connected reference clock. Finally the DW XPCS IP-core can be optionally synthesized with a vendor-specific interface connected to the Synopsys PMA (also called DesignWare Consumer/Enterprise PHY). Alas that isn't auto-detectable in a portable way. So if the DW XPCS device has the respective PMA attached then it should be reflected in the DT-node compatible string so the driver would be aware of the PMA-specific device capabilities (mainly connected with CSRs available for the fine-tunings). Signed-off-by: Serge Semin Signed-off-by: David S. Miller commit bcac735cf653ef8dc6d7c08ed311e0a77f2665f0 Author: Serge Semin Date: Mon Jul 1 21:28:36 2024 +0300 net: pcs: xpcs: Introduce DW XPCS info structure The being introduced structure will preserve the PCS and PMA IDs retrieved from the respective DW XPCS MMDs or potentially pre-defined by the client drivers. (The later change will be introduced later in the framework of the commit adding the memory-mapped DW XPCS devices support.) The structure fields are filled in in the xpcs_get_id() function, which used to be responsible for the PCS Device ID getting only. Besides of the PCS ID the method now fetches the PMA/PMD IDs too from MMD 1, which used to be done in xpcs_dev_flag(). The retrieved PMA ID will be from now utilized for the PMA-specific tweaks like it was introduced for the Wangxun TxGBE PCS in the commit f629acc6f210 ("net: pcs: xpcs: support to switch mode for Wangxun NICs"). Note 1. The xpcs_get_id() error-handling semantics has been changed. From now the error number will be returned from the function. There is no point in the next IOs or saving 0xffs and then looping over the actual device IDs if device couldn't be reached. -ENODEV will be returned if the very first IO operation failed thus indicating that no device could be found. Note 2. The PCS and PMA IDs macros have been converted to enum'es. The enum'es will be populated later in another commit with the virtual IDs identifying the DW XPCS devices which have some platform-specifics, but have been synthesized with the default PCS/PMA ID. Signed-off-by: Serge Semin Signed-off-by: David S. Miller commit 410232ab3c07f999674a7f254b33decdd5492c46 Author: Serge Semin Date: Mon Jul 1 21:28:35 2024 +0300 net: pcs: xpcs: Convert xpcs_compat to dw_xpcs_compat The xpcs_compat structure has been left as the only dw-prefix-less structure since the previous commit. Let's unify at least the structures naming in the driver by adding the dw_-prefix to it. Signed-off-by: Serge Semin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 71b200b388ef2ff1b547114f17dc1fd088bfc2c6 Author: Serge Semin Date: Mon Jul 1 21:28:34 2024 +0300 net: pcs: xpcs: Convert xpcs_id to dw_xpcs_desc A structure with the PCS/PMA MMD IDs data is being introduced in one of the next commits. In order to prevent the names ambiguity let's convert the xpcs_id structure name to dw_xpcs_desc. The later version is more suitable since the structure content is indeed the device descriptor containing the data and callbacks required for the driver to correctly set the device up. Signed-off-by: Serge Semin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 03b3be07c69a5fd71e4c01a35b511c13d2adb3c5 Author: Serge Semin Date: Mon Jul 1 21:28:33 2024 +0300 net: pcs: xpcs: Split up xpcs_create() body to sub-functions As an initial preparation before adding the fwnode-based DW XPCS device support let's split the xpcs_create() function code up to a set of the small sub-functions. Thus the xpcs_create() implementation will get to look simpler and turn to be more coherent. Further updates will just touch the new sub-functions a bit: add platform-specific device info, add the reference clock getting and enabling. The xpcs_create() method will now contain the next static methods calls: xpcs_create_data() - create the DW XPCS device descriptor, pre-initialize it' fields and increase the mdio device refcount-er; xpcs_init_id() - find XPCS ID instance and save it in the device descriptor; xpcs_init_iface() - find MAC/PCS interface descriptor and perform basic initialization specific to it: soft-reset, disable polling. The update doesn't imply any semantic change but merely makes the code looking simpler and more ready for adding new features support. Note the xpcs_destroy() has been moved to being defined below the xpcs_create_mdiodev() function as the driver now implies having the protagonist-then-antagonist functions definition order. Signed-off-by: Serge Semin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f37bee9508885ce5edd4875c744e1af28cfac76c Author: Serge Semin Date: Mon Jul 1 21:28:32 2024 +0300 net: pcs: xpcs: Move native device ID macro to linux/pcs/pcs-xpcs.h One of the next commits will alter the DW XPCS driver to support setting a custom device ID for the particular MDIO-device detected on the platform. The generic DW XPCS ID can be used as a custom ID as well in case if the DW XPCS-device was erroneously synthesized with no or some undefined ID. In addition to that having all supported DW XPCS device IDs defined in a single place will improve the code maintainability and readability. Note while at it rename the macros to being shorter and looking alike to the already defined NXP XPCS ID macro. Signed-off-by: Serge Semin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9364a7e40d54e6858479f0a96e1a04aa1204be16 Author: Wei Yang Date: Mon Jun 24 01:54:32 2024 +0000 memblock tests: fix implicit declaration of function 'numa_valid_node' commit 8043832e2a12 ("memblock: use numa_valid_node() helper to check for invalid node ID") introduce a new helper numa_valid_node(), which is not defined in memblock tests. Let's add it in the corresponding header file. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20240624015432.31134-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport commit f7e46d45c597fa083e266252392908f3ea0e7ef4 Author: Amit Vadhavana Date: Fri Jul 5 09:02:34 2024 +0100 slimbus: Fix struct and documentation alignment in stream.c The placement of the `segdist_codes` array documentation was corrected to conform with kernel documentation guidelines. The `@segdist_codes` was placed incorrectly within the struct `segdist_code` documentation block, which led to a potential misinterpretation of the code structure. The `segdist_codes` array documentation was moved outside the struct block, and a separate comment block was provided for it. This change ensures that clarity and proper alignment with kernel documentation standards are maintained. A kernel-doc warning was addressed: ./drivers/slimbus/stream.c:49: warning: Excess struct member 'segdist_codes' description in 'segdist_code' Signed-off-by: Amit Vadhavana Reviewed-by: Ricardo B. Marliere Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705080234.424587-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a892b700e63bcb3679ebed1a0c3160e7b9225138 Author: Jaroslav Kysela Date: Fri Jul 5 09:58:28 2024 +0200 ALSA: pcm: Fix id copying in snd_pcm_set_sync_per_card() Avoid to use strncpy and do proper length limiting (12 bytes) to avoid out of array access. Fixes: d712c58c55d9 ("ALSA: pcm: optimize and clarify stream synchronization ID API") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407050501.o5Z3bibi-lkp@intel.com/ Signed-off-by: Jaroslav Kysela Link: https://patch.msgid.link/20240705075828.19746-1-perex@perex.cz Signed-off-by: Takashi Iwai commit c66c0e7c511cde3f129af4792751074905fc248a Author: Dmitry Baryshkov Date: Fri Jul 5 08:59:00 2024 +0100 MAINTAINERS: CC dri-devel list on Qualcomm FastRPC patches FastRPC is a way to offload method invocation to the DSPs on Qualcomm platforms. As the driver uses dma-bufs, add dri-devel mailing list to the MAINTAINERS's entry, so that DRM maintainers are notified about the uAPI changes. This follows the usual practice established by the "DMA BUFFER SHARING FRAMEWORK" entry in the file. Suggested-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705075900.424100-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ba2174057252b296ed73fdfa60235a9e20e807ce Author: Dylan Van Assche Date: Fri Jul 5 08:58:59 2024 +0100 misc: fastrpc: use coherent pool for untranslated Compute Banks Use fastrpc_remote_heap_alloc to allocate from the FastRPC device instead of the Compute Bank when the session ID is 0. This ensures that the allocation is inside the coherent DMA pool which is already accessible to the DSP. This is necessary to support FastRPC devices which do not have dedicated Compute Banks such as the SLPI on the SDM845. The latter uses an allocated CMA region instead of FastRPC Compute Banks. Signed-off-by: Dylan Van Assche Reviewed-by: Caleb Connolly Reviewed-by: Ekansh Gupta Reviewed-by: Dmitry Baryshkov Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705075900.424100-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c3c0363bc72d4d0907a6d446d7424b3f022ce82a Author: Dylan Van Assche Date: Fri Jul 5 08:58:58 2024 +0100 misc: fastrpc: support complete DMA pool access to the DSP To support FastRPC Context Banks which aren't mapped via the SMMU, make the whole reserved memory region available to the DSP to allow access to coherent buffers. This is performed by assigning the memory to the DSP via a hypervisor call to set the correct permissions for the Virtual Machines on the DSP. This is only necessary when a memory region is provided for SLPI DSPs so guard this with a domain ID check. Signed-off-by: Dylan Van Assche Reviewed-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov Reviewed-by: Ekansh Gupta Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705075900.424100-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 65cf378a2bec9d140f506e4f62b0128fe6659e71 Author: Jeff Johnson Date: Fri Jul 5 08:58:57 2024 +0100 misc: fastrpc: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/misc/fastrpc.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Bryan O'Donoghue Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705075900.424100-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a150c68ae6369ea65b786fefd0b8aa0b075c041a Author: Ekansh Gupta Date: Fri Jul 5 08:58:56 2024 +0100 misc: fastrpc: Add missing dev_err newlines Few dev_err calls are missing newlines. This can result in unrelated lines getting appended which might make logs difficult to understand. Add trailing newlines to avoid this. Signed-off-by: Ekansh Gupta Reviewed-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705075900.424100-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit f0f53369af368b7ffc8a12bff508d7c958cce8b2 Author: Thorsten Blum Date: Fri Jul 5 08:58:55 2024 +0100 misc: fastrpc: Use memdup_user() Switching to memdup_user() overwrites the allocated memory only once, whereas kzalloc() followed by copy_from_user() initializes the allocated memory to zero and then immediately overwrites it. Fixes the following Coccinelle/coccicheck warning reported by memdup_user.cocci: WARNING opportunity for memdup_user Signed-off-by: Thorsten Blum Acked-by: Arnd Bergmann Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705075900.424100-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9d7eb234ac7a56b88aea8a52ed81553a730fe25c Author: Marek Vasut Date: Fri Jul 5 08:48:52 2024 +0100 nvmem: core: Implement force_ro sysfs attribute Implement "force_ro" sysfs attribute to allow users to set read-write devices as read-only and back to read-write from userspace. The choice of the name is based on MMC core 'force_ro' attribute. This solves a situation where an AT24 I2C EEPROM with GPIO based nWP signal may have to be occasionally updated. Such I2C EEPROM device is usually set as read-only during most of the regular system operation, but in case it has to be updated in a controlled manner, it could be unlocked using this new "force_ro" sysfs attribute and then re-locked again. The "read-only" DT property and config->read_only configuration is respected and is used to set default state of the device, read-only or read-write, for devices which do implement .reg_write function. For devices which do not implement .reg_write function, the device is unconditionally read-only and the "force_ro" attribute is not visible. Signed-off-by: Marek Vasut Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-16-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 08c367e45b6d322956878774f0b88bf5e52c6d54 Author: Marek Vasut Date: Fri Jul 5 08:48:51 2024 +0100 nvmem: Use sysfs_emit() for type attribute Use sysfs_emit() instead of sprintf() to follow best practice per Documentation/filesystems/sysfs.rst " show() should only use sysfs_emit()... " Signed-off-by: Marek Vasut Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-15-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a5f65c7735bd783689ceb42cffccb1ad0365d4b5 Author: Marek Vasut Date: Fri Jul 5 08:48:50 2024 +0100 nvmem: Document type attribute Document a type attribute used by userspace to discern different types of NVMEM devices. The implementation is already present, the ABI document is missing, add it. Reviewed-by: Alexandre Belloni Signed-off-by: Marek Vasut Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-14-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ac871d6bd83581999297b6162e074db4a294bbd5 Author: Marek Vasut Date: Fri Jul 5 08:48:49 2024 +0100 nvmem: Replace spaces with tab in documentation Replace two spaces with tab in the sysfs attribute documentation. No functional change. Signed-off-by: Marek Vasut Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-13-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 588773802c386d38f9c4e91acd47369e89d95a30 Author: Thomas Weißschuh Date: Fri Jul 5 08:48:48 2024 +0100 nvmem: core: drop unnecessary range checks in sysfs callbacks The same checks have already been done in sysfs_kf_bin_write() and sysfs_kf_bin_read() just before the callbacks are invoked. Signed-off-by: Thomas Weißschuh Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6839fed062b7898665983368c88269a6fb1fc10f Author: Thomas Weißschuh Date: Fri Jul 5 08:48:47 2024 +0100 nvmem: core: remove global nvmem_cells_group nvmem_cells_groups is a global variable that is also mutated. This is complicated and error-prone. Instead use a normal stack variable. Signed-off-by: Thomas Weißschuh Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6188f233161c6a5b2d1c396a221dfafc77dc9eec Author: Thomas Weißschuh Date: Fri Jul 5 08:48:46 2024 +0100 nvmem: core: add single sysfs group The sysfs core provides a function to easily register a single group. Use it and remove the now unnecessary nvmem_cells_groups array. Signed-off-by: Thomas Weißschuh Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2cf7e4dcfb3bbd3fcea5d8918e294b9855ab639b Author: Rafał Miłecki Date: Fri Jul 5 08:48:45 2024 +0100 dt-bindings: nvmem: mediatek: efuse: add support for MT7988 Add compatible for MT7988 SoC. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 70907fd5ed00e0ccb7213882b4d901794cc749e7 Author: Neil Armstrong Date: Fri Jul 5 08:48:44 2024 +0100 dt-bindings: nvmem: amlogic,meson-gx-efuse: add optional power-domains On newer SoCs, the eFuse hardware can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong Acked-by: Rob Herring (Arm) Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ba64a04474d2989f397982c48e405cfd785e2dd5 Author: Heiko Stuebner Date: Fri Jul 5 08:48:43 2024 +0100 nvmem: rockchip-efuse: set type to OTP This device currently reports an "Unknown" type in sysfs. Since it is an eFuse hardware device, set its type to OTP. Signed-off-by: Heiko Stuebner Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 39f95600d8c53355b212a117e91a6ba15e0cac47 Author: Heiko Stuebner Date: Fri Jul 5 08:48:42 2024 +0100 nvmem: rockchip-otp: Set type to OTP The Rockchip OTP is obviously an OTP memory, so document this fact. Signed-off-by: Heiko Stuebner Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2933e79db3c00a8cdc56f6bb050a857fec1875ad Author: Heiko Stuebner Date: Fri Jul 5 08:48:41 2024 +0100 nvmem: rockchip-otp: set add_legacy_fixed_of_cells config option The Rockchip OTP describes its layout via devicetree subnodes, so set the appropriate property. Fixes: 2cc3b37f5b6d ("nvmem: add explicit config option to read old syntax fixed OF cells") Signed-off-by: Heiko Stuebner Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5fecb932607d83d37a703c731268e9d9051457f5 Author: MarileneGarcia Date: Fri Jul 5 08:48:40 2024 +0100 nvmem: meson-efuse: Replacing the use of of_node_put to __free Use __free for device_node values, and thus drop calls to of_node_put. The goal is to reduce memory management issues by using this scope-based of_node_put() cleanup to simplify function exit handling. When using __free a resource is allocated within a block, it is automatically freed at the end of the block. Suggested-by: Julia Lawall Signed-off-by: MarileneGarcia Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e499d4b7d8c08784e4e49d9e32ebade2cf4596dc Author: Rafał Miłecki Date: Fri Jul 5 08:48:39 2024 +0100 dt-bindings: nvmem: mediatek: efuse: add support for MT7981 Add compatible for MT7981 SoC. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c553bad4c5fc5ae44bd2fcaa73e1d6bedfb1c35c Author: Jeff Johnson Date: Fri Jul 5 08:48:38 2024 +0100 nvmem: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvmem/nvmem-apple-efuses.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvmem/nvmem_brcm_nvram.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvmem/nvmem_u-boot-env.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240705074852.423202-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit bc7540b794df29f6ec0b24996381d6e68779d02f Author: Takashi Iwai Date: Fri Jul 5 08:35:53 2024 +0200 ALSA: pcm: Fix missing export of snd_pcm_set_sync_per-card() The recent change for the PCM sync API forgot to export a new API function that is currently used in emu10k1 driver. This patch adds the missing export. Fixes: d712c58c55d9 ("ALSA: pcm: optimize and clarify stream synchronization ID API") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407051343.1Sz8AKFt-lkp@intel.com/ Reviewed-by: Jaroslav Kysela Link: https://patch.msgid.link/20240705063555.17220-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 27aec396c48c6407a7586a35d79ac3fe387f2054 Merge: fb625bf6187d9 aaa08078e7251 Author: Daniel Vetter Date: Fri Jul 5 09:12:19 2024 +0200 Merge tag 'drm-xe-next-2024-07-02' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Driver Changes: - Fix in migration code (Auld) - Simplification in HWMon related code (Karthik) - Fix in forcewake logic (Nirmoy) - Fix engine utilization information (umesh) - Clean up on MOCS related code (Roper) - Fix on multicast register (Roper) - Fix TLB invalidation timeout (Nirmoy) - More SRIOV preparation (Michal) - Fix out-of-bounds array access (Lucas) - Fixes around some mutex utilization (Ashutosh, Vinay) - Expand LNL workaround to BMG (Vinay) Signed-off-by: Daniel Vetter From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZoROvquFrTFhk3Pb@intel.com commit bf86bcdb40123ee99669ee91b67e023669433a1a Author: Christoph Hellwig Date: Mon Jul 1 18:51:20 2024 +0200 blk-lib: check for kill signal in ioctl BLKZEROOUT Zeroout can access a significant capacity and take longer than the user expected. A user may change their mind about wanting to run that command and attempt to kill the process and do something else with their device. But since the task is uninterruptable, they have to wait for it to finish, which could be many hours. Add a new BLKDEV_ZERO_KILLABLE flag for blkdev_issue_zeroout that checks for a fatal signal at each iteration so the user doesn't have to wait for their regretted operation to complete naturally. Heavily based on an earlier patch from Keith Busch. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240701165219.1571322-11-hch@lst.de Signed-off-by: Jens Axboe commit 39722a2f2bcd82bdecc226711412d88b54fcb05b Author: Christoph Hellwig Date: Mon Jul 1 18:51:19 2024 +0200 block: limit the Write Zeroes to manually writing zeroes fallback Only fall back from hardware Write Zeroes failures when blkdev_issue_write_zeroes returns -EOPNOTSUPP; Note that blkdev_issue_write_zeroes turns any failure into -EOPNOTSUPP when the write zeroes queue limit has been cleared to 0, so this still catches all I/O errors where the driver detected missing support for the hardware acceleration. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240701165219.1571322-10-hch@lst.de Signed-off-by: Jens Axboe commit 99800ced26b9d87a918aa9824881bdb90a3c1b03 Author: Christoph Hellwig Date: Mon Jul 1 18:51:18 2024 +0200 block: refacto blkdev_issue_zeroout Split out two well-defined helpers for hardware supported Write Zeroes and manually writing zeroes using the Write command. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240701165219.1571322-9-hch@lst.de Signed-off-by: Jens Axboe commit f6eacb26541ad1eabc40d7e9f5cd86bae7dc0b46 Author: Christoph Hellwig Date: Mon Jul 1 18:51:17 2024 +0200 block: move read-only and supported checks into (__)blkdev_issue_zeroout Move these checks out of the lower level helpers and into the higher level ones to prepare for refactoring. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240701165219.1571322-8-hch@lst.de Signed-off-by: Jens Axboe commit ff760a8f0d09f4ba7574ae2ca8be987854f5246d Author: Christoph Hellwig Date: Mon Jul 1 18:51:16 2024 +0200 block: remove the LBA alignment check in __blkdev_issue_zeroout __blkdev_issue_zeroout is a purely kernel internal API and thus can rely on the block layer sector alignment checks. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240701165219.1571322-7-hch@lst.de Signed-off-by: Jens Axboe commit 73a768d5f95533574bb8ace34eb683a88c40509e Author: Christoph Hellwig Date: Mon Jul 1 18:51:15 2024 +0200 block: factor out a blk_write_zeroes_limit helper Contrary to the comment in __blkdev_issue_write_zeroes, nothing here checks for a potential bi_size overflow. Add a helper mirroring the secure erase code for the check. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240701165219.1571322-6-hch@lst.de Signed-off-by: Jens Axboe commit 0f3819e8c483771a59cf9d3190cd68a7a990083c Author: Ryusuke Konishi Date: Wed Jul 3 03:35:12 2024 +0900 nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro According to the C standard 3.4.3p3, the result of signed integer overflow is undefined. The macro nilfs_cnt32_ge(), which compares two sequence numbers, uses signed integer subtraction that can overflow, and therefore the result of the calculation may differ from what is expected due to undefined behavior in different environments. Similar to an earlier change to the jiffies-related comparison macros in commit 5a581b367b5d ("jiffies: Avoid undefined behavior from signed overflow"), avoid this potential issue by changing the definition of the macro to perform the subtraction as unsigned integers, then cast the result to a signed integer for comparison. Link: https://lkml.kernel.org/r/20130727225828.GA11864@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/20240702183512.6390-1-konishi.ryusuke@gmail.com Fixes: 9ff05123e3bf ("nilfs2: segment constructor") Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 8547d1150f0dbd1d04f397c780182fc83ec2ab16 Author: Jeff Johnson Date: Tue Jul 2 15:47:59 2024 -0700 math: rational: add missing MODULE_DESCRIPTION() macro With ARCH=sh, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/math/rational.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240702-md-sh-lib-math-v1-1-93f4ac4fa8fd@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton commit bee6c683de2f7c086963b20afffb40b03e6c264d Author: Jeff Johnson Date: Thu Jun 13 22:01:09 2024 -0700 lib/zlib: add missing MODULE_DESCRIPTION() macro With ARCH=csky, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/zlib_deflate/zlib_deflate.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240613-md-csky-lib-zlib_deflate-v1-1-83504d9a27d6@quicinc.com Signed-off-by: Jeff Johnson Cc: Guo Ren Signed-off-by: Andrew Morton commit c61d7259a6a9b2403097dce9f0b5f465a60bd62a Author: Jeff Johnson Date: Fri May 10 12:02:15 2024 -0700 fs: ufs: add MODULE_DESCRIPTION() Fix make W=1 warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/ufs/ufs.o Link: https://lkml.kernel.org/r/20240510-ufs-md-v1-1-85eaff8c6beb@quicinc.com Signed-off-by: Jeff Johnson Cc: Evgeniy Dushistov Cc: Christian Brauner Signed-off-by: Andrew Morton commit cedb08caac587b55c79d0463400839acab4638c0 Author: Hsin Chang Yu Date: Fri Jun 28 22:22:29 2024 +0800 lib/rbtree.c: fix the example typo Replace the "Sr" with "sr", the example is wrong if sl and N don't have child nodes, so sr should be red node. Link: https://lkml.kernel.org/r/20240628142229.69419-1-zxcvb600870024@gmail.com Signed-off-by: Hsin Chang Yu Signed-off-by: Andrew Morton commit 255547c6bb8940a97eea94ef9d464ea5967763fb Author: lei lu Date: Wed Jun 26 18:44:33 2024 +0800 ocfs2: add bounds checking to ocfs2_check_dir_entry() This adds sanity checks for ocfs2_dir_entry to make sure all members of ocfs2_dir_entry don't stray beyond valid memory region. Link: https://lkml.kernel.org/r/20240626104433.163270-1-llfamsec@gmail.com Signed-off-by: lei lu Reviewed-by: Heming Zhao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton commit 937b2972ce900fcfad87c13432e36f39da06a0df Author: Yang Li Date: Fri Mar 22 14:37:18 2024 +0800 fs: add kernel-doc comments to ocfs2_prepare_orphan_dir() This commit adds kernel-doc style comments with complete parameter descriptions for the function ocfs2_prepare_orphan_dir. Link: https://lkml.kernel.org/r/20240322063718.88183-1-yang.lee@linux.alibaba.com Signed-off-by: Yang Li Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton commit 1e3fa25fca48b25e0483c95bec626dd1007a9adf Author: Oleg Nesterov Date: Tue Jun 25 16:03:11 2024 +0200 coredump: simplify zap_process() After commit 0258b5fd7c71 ("coredump: Limit coredumps to a single thread group") zap_process() doesn't need the "task_struct *start" arg, zap_threads() can pass "signal_struct *signal" instead. This simplifies the code and allows to use __for_each_thread() which is slightly more efficient. Link: https://lkml.kernel.org/r/20240625140311.GA20787@redhat.com Signed-off-by: Oleg Nesterov Cc: Christian Brauner Cc: Eric W. Biederman Signed-off-by: Andrew Morton commit 2f20872ed43185780a5f30581472599342c86d4a Author: Damien Le Moal Date: Thu Jul 4 14:28:16 2024 +0900 block: Remove blk_alloc_zone_bitmap() Remove the helper function blk_alloc_zone_bitmap() and replace its single call site with a call to bitmap_alloc(). To be consistent with this change, use bitmap_free() to free a disk convnetional zone bitmap. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240704052816.623865-6-dlemoal@kernel.org Signed-off-by: Jens Axboe commit f2a7bea23710fceb99dac6da4ef82c3cc8932f7f Author: Damien Le Moal Date: Thu Jul 4 14:28:15 2024 +0900 block: Remove REQ_OP_ZONE_RESET_ALL emulation Now that device mapper can handle resetting all zones of a mapped zoned device using REQ_OP_ZONE_RESET_ALL, all zoned block device drivers support this operation. With this, the request queue feature BLK_FEAT_ZONE_RESETALL is not necessary and the emulation code in blk-zone.c can be removed. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240704052816.623865-5-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 81e7706345f06e1e97a092f59697b7e20a0ee868 Author: Damien Le Moal Date: Thu Jul 4 14:28:14 2024 +0900 dm: handle REQ_OP_ZONE_RESET_ALL This commit implements processing of the REQ_OP_ZONE_RESET_ALL operation for zoned mapped devices. Given that this operation always has a BIO sector of 0 and a 0 size, processing through the regular BIO __split_and_process_bio() function does not work because this function would always select the first target. Instead, handling of this operation is implemented using the function __send_zone_reset_all(). Similarly to the __send_empty_flush() function, the new __send_zone_reset_all() function manually goes through all targets of a mapped device table doing the following: 1) If the target can natively support REQ_OP_ZONE_RESET_ALL, __send_duplicate_bios() is used to forward the reset all operation to the target. This case is handled with the __send_zone_reset_all_native() function. 2) For other targets, the function __send_zone_reset_all_emulated() is executed to emulate the execution of REQ_OP_ZONE_RESET_ALL using regular REQ_OP_ZONE_RESET operations. Targets that can natively support REQ_OP_ZONE_RESET_ALL are identified using the new target field zone_reset_all_supported. This boolean is set to true in for targets that have reliable zone limits, that is, targets that map all sequential write required zones of their zoned device(s). Setting this field is handled in dm_set_zones_restrictions() and device_get_zone_resource_limits(). For targets with unreliable zone limits, REQ_OP_ZONE_RESET_ALL must be emulated (case 2 above). This is implemented with __send_zone_reset_all_emulated() and is similar to the block layer function blkdev_zone_reset_all_emulated(): first a report zones is done for the zones of the target to identify zones that need reset, that is, any sequential write required zone that is not already empty. This is done using a bitmap and the function dm_zone_get_reset_bitmap() which sets to 1 the bit corresponding to a zone that needs reset. Next, this zone bitmap is inspected and a clone BIO modified to use the REQ_OP_ZONE_RESET operation issued for any zone with its bit set in the zone bitmap. This implementation is more efficient than what the block layer does with blkdev_zone_reset_all_emulated(), which is always used for DM zoned devices currently: as we can natively use REQ_OP_ZONE_RESET_ALL on targets mapping all sequential write required zones, resetting all zones of a zoned mapped device can be much faster compared to always emulating this operation using regular per-zone reset. In the worst case, this implementation is as-efficient as the block layer emulation. This reduction in the time it takes to reset all zones of a zoned mapped device depends directly on the mapped device targets mapping (reliable zone limits or not). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240704052816.623865-4-dlemoal@kernel.org Signed-off-by: Jens Axboe commit ae7e965b36e3132238d16b4ccd223f65162397b5 Author: Damien Le Moal Date: Thu Jul 4 14:28:13 2024 +0900 dm: Refactor is_abnormal_io() Use a single switch-case to simplify is_abnormal_io() and make this function more readable and easier to modify. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240704052816.623865-3-dlemoal@kernel.org Signed-off-by: Jens Axboe commit f4d5dc33c823ef1d7ccbbd2d1e40b871fad0012b Author: Damien Le Moal Date: Thu Jul 4 14:28:12 2024 +0900 null_blk: Introduce the zone_full parameter Allow creating a zoned null_blk device with the initial state of its sequential write required zones to be FULL. This is convenient to avoid having to first write these zones to perform read performance evaluation or test zone management operations such as zone reset (and zone reset all). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240704052816.623865-2-dlemoal@kernel.org Signed-off-by: Jens Axboe commit dd54fd4e1780b349043f2d74784b8b702dbd84e9 Author: Christoph Hellwig Date: Fri Jul 5 07:31:14 2024 +0200 loop: remove the unused inode variable in loop_configure Remove the inode variable now that the last user is gone. Fixes: a17ece76bcfe ("loop: regularize upgrading the block size for direct I/O") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240705053114.2042976-1-hch@lst.de Signed-off-by: Jens Axboe commit dfd3e8b90b3660b706c3031b0f746377c571b324 Author: Viresh Kumar Date: Thu Jul 4 12:23:54 2024 +0530 cpufreq: pcc: Remove empty exit() callback The exit() callback is optional, remove the empty one. Signed-off-by: Viresh Kumar Acked-by: Rafael J. Wysocki commit fa9037727820dd8af33ed4f4fbabd69f132463e7 Author: Viresh Kumar Date: Thu Jul 4 12:23:53 2024 +0530 cpufreq: loongson2: Remove empty exit() callback The exit() callback is optional, remove the empty one. Signed-off-by: Viresh Kumar Reviewed-by: Huacai Chen Acked-by: Rafael J. Wysocki commit bf8a44c07ba61c408e42e5075380de9ddcdc8cb3 Author: Viresh Kumar Date: Thu Jul 4 12:23:52 2024 +0530 cpufreq: nforce2: Remove empty exit() callback The exit() callback is optional, remove the empty one. Signed-off-by: Viresh Kumar Acked-by: Rafael J. Wysocki commit 6cd48c8f62ade6260ff9a13724e49b3854392fe4 Merge: 34438552c933c cf82b9e866b64 Author: Martin K. Petersen Date: Thu Jul 4 23:38:16 2024 -0400 Merge patch series "mpi3mr: Support PCI Error Recovery" Sumit Saxena says: This patch series contains the changes done in the driver to support PCI error recovery. It is rework of older patch series from Ranjan Kumar, see [1]. [1] https://lore.kernel.org/all/20231214205900.270488-1-ranjan.kumar@broadcom.com/ Link: https://lore.kernel.org/r/20240627101735.18286-1-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit cf82b9e866b644d5eca38b55403e1efa8f1cc8da Author: Sumit Saxena Date: Thu Jun 27 15:47:35 2024 +0530 scsi: mpi3mr: Driver version update Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20240627101735.18286-4-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit 1c342b0548e3f53a4478f8d7bcb5af34b361787f Author: Sumit Saxena Date: Thu Jun 27 15:47:34 2024 +0530 scsi: mpi3mr: Prevent PCI writes from driver during PCI error recovery Prevent interaction with the hardware while the error recovery in progress. Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Co-developed-by: Ranjan Kumar Signed-off-by: Ranjan Kumar Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20240627101735.18286-3-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit 30bafe1774f0aa17d3247466a2d51ce1351c3331 Author: Sumit Saxena Date: Thu Jun 27 15:47:33 2024 +0530 scsi: mpi3mr: Support PCI Error Recovery callback handlers PCI Error recovery support is required to recover the controller upon detection of PCI errors. Add support for the PCI error recovery callback handlers in mpi3mr driver. Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Co-developed-by: Ranjan Kumar Signed-off-by: Ranjan Kumar Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20240627101735.18286-2-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit 34438552c933c4567fad5ff316c45afc920fca53 Merge: 76a20140ef768 41972df1a56bd Author: Martin K. Petersen Date: Thu Jul 4 23:25:40 2024 -0400 Merge patch series "Update lpfc to revision 14.4.0.3" Justin Tee says: Update lpfc to revision 14.4.0.3 This patch set contains bug fixes related to discovery, submission of mailbox commands, and proper endianness conversions. The patches were cut against Martin's 6.11/scsi-queue tree. Link: https://lore.kernel.org/r/20240628172011.25921-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 41972df1a56bd926a14d9670936f5278cf351968 Author: Justin Tee Date: Fri Jun 28 10:20:11 2024 -0700 scsi: lpfc: Update lpfc version to 14.4.0.3 Update lpfc version to 14.4.0.3. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 8bc7c617642db6d8d20ee671fb6c4513017e7a7e Author: Justin Tee Date: Fri Jun 28 10:20:10 2024 -0700 scsi: lpfc: Revise lpfc_prep_embed_io routine with proper endian macro usages On big endian architectures, it is possible to run into a memory out of bounds pointer dereference when FCP targets are zoned. In lpfc_prep_embed_io, the memcpy(ptr, fcp_cmnd, sgl->sge_len) is referencing a little endian formatted sgl->sge_len value. So, the memcpy can cause big endian systems to crash. Redefine the *sgl ptr as a struct sli4_sge_le to make it clear that we are referring to a little endian formatted data structure. And, update the routine with proper le32_to_cpu macro usages. Fixes: af20bb73ac25 ("scsi: lpfc: Add support for 32 byte CDBs") Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-8-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit f65f31ac120bd2c308bf16b18e5ee74445c06446 Author: Justin Tee Date: Fri Jun 28 10:20:09 2024 -0700 scsi: lpfc: Fix incorrect request len mbox field when setting trunking via sysfs When setting trunk modes through sysfs, the SLI_CONFIG mailbox command's command payload length is incorrectly hardcoded to 12 bytes. SLI_CONFIG's payload length field should be specified large enough to encompass both the submailbox command header and the submailbox request itself. Thus, replace the hardcoded 12 bytes with a clearer calculation by way of sizeof(struct lpfc_mbx_set_trunk_mode) - sizeof(struct lpfc_sli4_cfg_mhdr). Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit ede596b1434b57c0b3fd5c02b326efe5c54f6e48 Author: Justin Tee Date: Fri Jun 28 10:20:08 2024 -0700 scsi: lpfc: Handle mailbox timeouts in lpfc_get_sfp_info The MBX_TIMEOUT return code is not handled in lpfc_get_sfp_info and the routine unconditionally frees submitted mailbox commands regardless of return status. The issue is that for MBX_TIMEOUT cases, when firmware returns SFP information at a later time, that same mailbox memory region references previously freed memory in its cmpl routine. Fix by adding checks for the MBX_TIMEOUT return code. During mailbox resource cleanup, check the mbox flag to make sure that the wait did not timeout. If the MBOX_WAKE flag is not set, then do not free the resources because it will be freed when firmware completes the mailbox at a later time in its cmpl routine. Also, increase the timeout from 30 to 60 seconds to accommodate boot scripts requiring longer timeouts. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 15e21dc6d6b7d7feb6b0262422b45da5e3c4b34f Author: Justin Tee Date: Fri Jun 28 10:20:07 2024 -0700 scsi: lpfc: Fix handling of fully recovered fabric node in dev_loss callbk In rare cases when a fabric node is recovered after a link bounce and before dev_loss_tmo callbk is reached, the driver may leave the fabric node in an inconsistent state with the NLP_IN_DEV_LOSS flag perpetually set. In lpfc_dev_loss_tmo_callbk, a check is added for a recovered fabric node. If the node is recovered, then don't queue the lpfc_dev_loss_tmo_handler work. In lpfc_dev_loss_tmo_handler, the path taken for the recovered fabric nodes is updated to clear the NLP_IN_DEV_LOSS flag. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit aeaf117cc7d28b994652491c87b929d853519d20 Author: Justin Tee Date: Fri Jun 28 10:20:06 2024 -0700 scsi: lpfc: Relax PRLI issue conditions after GID_FT response If previously in REG_LOGIN_ISSUE state, then remove the requirement that PLOGI must have been received from the remote port before issuing a PRLI. After GID_FT completes, it does not matter whether the driver itself sent a PLOGI or received one. The fact that we're in REG_LOGIN_ISSUE state simply means that the next state should be issuing the PRLI to continue discovery of the remote port. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 9609385dd91b26751019b22ca9bfa4bec7602ae1 Author: Justin Tee Date: Fri Jun 28 10:20:05 2024 -0700 scsi: lpfc: Allow DEVICE_RECOVERY mode after RSCN receipt if in PRLI_ISSUE state Certain vendor specific targets initially register with the fabric as an initiator function first and then re-register as a target function afterwards. The timing of the target function re-registration can cause a race condition such that the driver is stuck assuming the remote port as an initiator function and never discovers the target's hosted LUNs. Expand the nlp_state qualifier to also include NLP_STE_PRLI_ISSUE because the state means that PRLI was issued but we have not quite reached MAPPED_NODE state yet. If we received an RSCN in the PRLI_ISSUE state, then we should restart discovery again by going into DEVICE_RECOVERY. Fixes: dded1dc31aa4 ("scsi: lpfc: Modify when a node should be put in device recovery mode during RSCN") Cc: # v6.6+ Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit e999ef15423b35473c0d94ff3dd2011a0f7ddb04 Author: Justin Tee Date: Fri Jun 28 10:20:04 2024 -0700 scsi: lpfc: Cancel ELS WQE instead of issuing abort when SLI port is inactive During SLI port errata events, there should be no expectation that submitted outstanding WQEs will return back CQEs. In these situations, the driver should not rely on receiving CQEs from the SLI port to signal WQE resource clean up. Put an sli_flag LPFC_SLI_ACTIVE check in lpfc_els_flush_cmd() when walking the txcmplq. The sli_flag check helps determine whether to issue an abort or driver based cancel on outstanding WQEs. If !LPFC_SLI_ACTIVE, then there's no point to issue anything to the SLI port. Instead, let the driver based cancel logic clean up the submitted WQE resources. Also, enhance some abort log messages that help with future debugging. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240628172011.25921-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 76a20140ef768133697c04dc19bf7e81706905c7 Author: Terrence Adams Date: Thu Jun 27 15:59:24 2024 +0000 scsi: pm8001: Update log level when reading config table Reading the main config table occurs as a part of initialization in pm80xx_chip_init(). Because of this it makes more sense to have it be a part of the INIT logging. Signed-off-by: Terrence Adams Link: https://lore.kernel.org/r/20240627155924.2361370-3-tadamsjr@google.com Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit e4f949ef1516c0d74745ee54a0f4882c1f6c7aea Author: Igor Pylypiv Date: Thu Jun 27 15:59:23 2024 +0000 scsi: pm80xx: Set phy->enable_completion only when we wait for it pm8001_phy_control() populates the enable_completion pointer with a stack address, sends a PHY_LINK_RESET / PHY_HARD_RESET, waits 300 ms, and returns. The problem arises when a phy control response comes late. After 300 ms the pm8001_phy_control() function returns and the passed enable_completion stack address is no longer valid. Late phy control response invokes complete() on a dangling enable_completion pointer which leads to a kernel crash. Signed-off-by: Igor Pylypiv Signed-off-by: Terrence Adams Link: https://lore.kernel.org/r/20240627155924.2361370-2-tadamsjr@google.com Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 7cbff570dbe8907e23bba06f6414899a0fbb2fcc Author: Kyoungrul Kim Date: Thu Jun 27 17:51:04 2024 +0900 scsi: ufs: core: Remove SCSI host only if added If host tries to remove ufshcd driver from a UFS device it would cause a kernel panic if ufshcd_async_scan fails during ufshcd_probe_hba before adding a SCSI host with scsi_add_host and MCQ is enabled since SCSI host has been defered after MCQ configuration introduced by commit 0cab4023ec7b ("scsi: ufs: core: Defer adding host to SCSI if MCQ is supported"). To guarantee that SCSI host is removed only if it has been added, set the scsi_host_added flag to true after adding a SCSI host and check whether it is set or not before removing it. Signed-off-by: Kyoungrul Kim Signed-off-by: Minwoo Im Link: https://lore.kernel.org/r/20240627085104epcms2p5897a3870ea5c6416aa44f94df6c543d7@epcms2p5 Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit ed7dac86f1406d73aed21d0cd1563922031a2fd8 Author: Ram Prakash Gupta Date: Thu Jun 27 14:07:56 2024 +0530 scsi: ufs: qcom: Enable suspending clk scaling on no request Enable suspending clk scaling on no request for Qualcomm SoC. Signed-off-by: Ram Prakash Gupta Link: https://lore.kernel.org/r/20240627083756.25340-3-quic_rampraka@quicinc.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 50183ac2cfb54e027dd36fb22ea1bd1e91e3a08b Author: Ram Prakash Gupta Date: Thu Jun 27 14:07:55 2024 +0530 scsi: ufs: core: Suspend clk scaling on no request Currently UFS clk scaling is getting suspended only when the clks are scaled down. When high load is generated, a huge amount of latency is added due to scaling up the clk and completing the request post that. Suspending the scaling in its existing state when high load is generated improves the random performance KPI by 28%. So suspending the scaling when there are no requests. And the clk would be put in low scaled state when the actual request load is low. Make this change optional by having the check enabled using vops since for some devices suspending without bringing the clk in low scaled state might have impact on power consumption of the SoC. Signed-off-by: Ram Prakash Gupta Link: https://lore.kernel.org/r/20240627083756.25340-2-quic_rampraka@quicinc.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit de24085328c09e5a6dd8a8d95ad65876f097e9c1 Author: Tomas Henzl Date: Thu Jun 27 09:48:27 2024 +0200 scsi: mpi3mr: Correct a test in mpi3mr_sas_port_add() The test for a possible shift overflow is not correct. Fix it by replacing the '>' with a '>='. Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20240627074827.13672-1-thenzl@redhat.com Suggested-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 390b14b5e9f6e987381a5dc96b3d636000a44b53 Author: Rob Herring (Arm) Date: Wed Jul 3 13:58:27 2024 -0600 dt-bindings: net: Define properties at top-level Convention is DT schemas should define all properties at the top-level and not inside of if/then schemas. That minimizes the if/then schemas and is more future proof. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Reviewed-by: Serge Semin Link: https://patch.msgid.link/20240703195827.1670594-2-robh@kernel.org Signed-off-by: Jakub Kicinski commit 85099c7ce4f9e64c66aa397cd9a37473637ab891 Author: Aleksandr Mishin Date: Thu Jul 4 00:05:10 2024 +0300 wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter() In rtw89_sta_info_get_iter() 'status->he_gi' is compared to array size. But then 'rate->he_gi' is used as array index instead of 'status->he_gi'. This can lead to go beyond array boundaries in case of 'rate->he_gi' is not equal to 'status->he_gi' and is bigger than array size. Looks like "copy-paste" mistake. Fix this mistake by replacing 'rate->he_gi' with 'status->he_gi'. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Aleksandr Mishin Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240703210510.11089-1-amishin@t-argos.ru commit a1e7eafd12c415a6ac2a65d8ddf32569acd1ecf0 Author: Fredrik Lönnegren Date: Wed Jul 3 09:06:23 2024 +0200 wifi: rtlwifi: fix default typo Change 'defult' to 'default' in comments in several rtlwifi drivers. Signed-off-by: Fredrik Lönnegren Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240703070627.135328-1-fredrik@frelon.se commit 8095364696d38092f34bbd3989b1a73b180a3aaf Author: Zong-Zhe Yang Date: Tue Jul 2 20:44:52 2024 +0800 wifi: rtw89: unify the selection logic of RFK table when MCC Driver will notify FW the target index of RFK table to use at some moments. When MCC (multi-channel concurrent), the correctness of the notification is especially important. We now unify the selection logic of RFK table as below among chips. 1. check each table if it matches target channel 2. check all tables if any is idle by iterating active channels 3. replace the first table if all are busy unexpectedly Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240702124452.18747-2-pkshih@realtek.com commit 4baf1cc54433ff7c6e5178517bc8768001416681 Author: Dan Carpenter Date: Thu Jul 4 10:20:03 2024 -0500 power: supply: cros_charge-control: Fix signedness bug in charge_behaviour_store() The C standard is vague about the signedness of enums, but in this case here, they are treated as unsigned so the error handling does not work. Use an int type to fix this. Fixes: c6ed48ef5259 ("power: supply: add ChromeOS EC based charge control driver") Signed-off-by: Dan Carpenter Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/ZoWKEs4mCqeLyTOB@stanley.mountain Signed-off-by: Tzung-Bi Shih commit 1e71be6a344628d3a6041dfcf26220ad5d66e699 Author: Zong-Zhe Yang Date: Tue Jul 2 20:44:51 2024 +0800 wifi: rtw89: mac: parse MRC C2H failure report MRC (multi-role concurrency) has a C2H event for status report. Newer FW will report some kinds of failures. We parse them now and show by debug log. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240702124452.18747-1-pkshih@realtek.com commit 52bc83ad2ed5b115c33e3acc19cbf636dd2f37c9 Author: Ping-Ke Shih Date: Mon Jul 1 09:46:19 2024 +0800 wifi: rtw89: 8852bx: add extra handles of BTC for 8852BT in 8852b_common For 8852BT, the initial settings of BT-coexistence is a little bit different, so add the extra handles. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240701014619.7300-2-pkshih@realtek.com commit 0e557c5c1a61ff4d896a21b00e4e7397e3c123b5 Author: Ping-Ke Shih Date: Mon Jul 1 09:46:18 2024 +0800 wifi: rtw89: 8852bx: move BTC common code from 8852b to 8852b_common The BT coexistence part of 8852B and 8852BT are similar, so move shared code into common module. Don't change logic for existing RTL8852BE. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240701014619.7300-1-pkshih@realtek.com commit adc539784c98a7cc602cbf557debfc2e7b9be8b3 Author: Marcin Ślusarz Date: Tue May 28 13:02:46 2024 +0200 wifi: rtw88: usb: schedule rx work after everything is set up Right now it's possible to hit NULL pointer dereference in rtw_rx_fill_rx_status on hw object and/or its fields because initialization routine can start getting USB replies before rtw_dev is fully setup. The stack trace looks like this: rtw_rx_fill_rx_status rtw8821c_query_rx_desc rtw_usb_rx_handler ... queue_work rtw_usb_read_port_complete ... usb_submit_urb rtw_usb_rx_resubmit rtw_usb_init_rx rtw_usb_probe So while we do the async stuff rtw_usb_probe continues and calls rtw_register_hw, which does all kinds of initialization (e.g. via ieee80211_register_hw) that rtw_rx_fill_rx_status relies on. Fix this by moving the first usb_submit_urb after everything is set up. For me, this bug manifested as: [ 8.893177] rtw_8821cu 1-1:1.2: band wrong, packet dropped [ 8.910904] rtw_8821cu 1-1:1.2: hw->conf.chandef.chan NULL in rtw_rx_fill_rx_status because I'm using Larry's backport of rtw88 driver with the NULL checks in rtw_rx_fill_rx_status. Link: https://lore.kernel.org/linux-wireless/CA+shoWQ7P49jhQasofDcTdQhiuarPTjYEDa--NiVVx494WcuQw@mail.gmail.com/ Signed-off-by: Marcin Ślusarz Cc: Tim K Cc: Ping-Ke Shih Cc: Larry Finger Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240528110246.477321-1-marcin.slusarz@gmail.com commit 99bf7c2eccff82760fa23ce967cc67c8c219c6a6 Author: Dan Carpenter Date: Thu Jul 4 10:18:59 2024 -0500 hwmon: (ltc2991) re-order conditions to fix off by one bug LTC2991_T_INT_CH_NR is 4. The st->temp_en[] array has LTC2991_MAX_CHANNEL (4) elements. Thus if "channel" is equal to LTC2991_T_INT_CH_NR then we have read one element beyond the end of the array. Flip the conditions around so that we check if "channel" is valid before using it as an array index. Fixes: 2b9ea4262ae9 ("hwmon: Add driver for ltc2991") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Zoa9Y_UMY4_ROfhF@stanley.mountain Signed-off-by: Guenter Roeck commit 44195d1eba826a8af0afbcfa69ab4cc26f6ead7f Author: Jiaqi Yan Date: Wed Jun 26 05:08:18 2024 +0000 docs: mm: add enable_soft_offline sysctl Add the documentation for soft offline behaviors / costs, and what the new enable_soft_offline sysctl is for. [jiaqiyan@google.com: fix kerneldoc warnings] Link: https://lkml.kernel.org/r/CACw3F52=GxTCDw-PqFh3-GDM-fo3GbhGdu0hedxYXOTT4TQSTg@mail.gmail.com [jiaqiyan@google.com: there are more blank lines needed] Link: https://lkml.kernel.org/r/CACw3F52_obAB742XeDRNun4BHBYtrxtbvp5NkUincXdaob0j1g@mail.gmail.com Link: https://lkml.kernel.org/r/20240626050818.2277273-5-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: Oscar Salvador Acked-by: Miaohe Lin Acked-by: David Rientjes Cc: Frank van der Linden Cc: Jane Chu Cc: Jonathan Corbet Cc: Lance Yang Cc: Muchun Song Cc: Naoya Horiguchi Cc: Randy Dunlap Cc: Shuah Khan Signed-off-by: Andrew Morton commit 72ead83dad5c9f7a3ac00d4ee5f92a0794836bb1 Author: Jiaqi Yan Date: Wed Jun 26 05:08:17 2024 +0000 selftest/mm: test enable_soft_offline behaviors Add regression and new tests when hugepage has correctable memory errors, and how userspace wants to deal with it: * if enable_soft_offline=1, mapped hugepage is soft offlined * if enable_soft_offline=0, mapped hugepage is intact Free hugepages case is not explicitly covered by the tests. Hugepage having corrected memory errors is emulated with MADV_SOFT_OFFLINE. [jiaqiyan@google.com: v7] Link: https://lkml.kernel.org/r/20240628205958.2845610-4-jiaqiyan@google.com Link: https://lkml.kernel.org/r/20240626050818.2277273-4-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: Miaohe Lin Acked-by: David Rientjes Cc: Frank van der Linden Cc: Jane Chu Cc: Jonathan Corbet Cc: Lance Yang Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Randy Dunlap Cc: Shuah Khan Signed-off-by: Andrew Morton commit 56374430c5dfcf6d4f1df79514f797b45fbd0485 Author: Jiaqi Yan Date: Wed Jun 26 05:08:16 2024 +0000 mm/memory-failure: userspace controls soft-offlining pages Correctable memory errors are very common on servers with large amount of memory, and are corrected by ECC. Soft offline is kernel's additional recovery handling for memory pages having (excessive) corrected memory errors. Impacted page is migrated to a healthy page if inuse; the original page is discarded for any future use. The actual policy on whether (and when) to soft offline should be maintained by userspace, especially in case of an 1G HugeTLB page. Soft-offline dissolves the HugeTLB page, either in-use or free, into chunks of 4K pages, reducing HugeTLB pool capacity by 1 hugepage. If userspace has not acknowledged such behavior, it may be surprised when later failed to mmap hugepages due to lack of hugepages. In case of a transparent hugepage, it will be split into 4K pages as well; userspace will stop enjoying the transparent performance. In addition, discarding the entire 1G HugeTLB page only because of corrected memory errors sounds very costly and kernel better not doing under the hood. But today there are at least 2 such cases doing so: 1. when GHES driver sees both GHES_SEV_CORRECTED and CPER_SEC_ERROR_THRESHOLD_EXCEEDED after parsing CPER. 2. RAS Correctable Errors Collector counts correctable errors per PFN and when the counter for a PFN reaches threshold In both cases, userspace has no control of the soft offline performed by kernel's memory failure recovery. This commit gives userspace the control of softofflining any page: kernel only soft offlines raw page / transparent hugepage / HugeTLB hugepage if userspace has agreed to. The interface to userspace is a new sysctl at /proc/sys/vm/enable_soft_offline. By default its value is set to 1 to preserve existing behavior in kernel. When set to 0, soft-offline (e.g. MADV_SOFT_OFFLINE) will fail with EOPNOTSUPP. [jiaqiyan@google.com: v7] Link: https://lkml.kernel.org/r/20240628205958.2845610-3-jiaqiyan@google.com Link: https://lkml.kernel.org/r/20240626050818.2277273-3-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: Miaohe Lin Acked-by: David Rientjes Cc: Frank van der Linden Cc: Jane Chu Cc: Jonathan Corbet Cc: Lance Yang Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Randy Dunlap Cc: Shuah Khan Signed-off-by: Andrew Morton commit 865319f772e6d5b8c932ff0abd7a9e57fe1c04e0 Author: Jiaqi Yan Date: Wed Jun 26 05:08:15 2024 +0000 mm/memory-failure: refactor log format in soft offline code Patch series "Userspace controls soft-offline pages", v6. Correctable memory errors are very common on servers with large amount of memory, and are corrected by ECC, but with two pain points to users: 1. Correction usually happens on the fly and adds latency overhead 2. Not-fully-proved theory states excessive correctable memory errors can develop into uncorrectable memory error. Soft offline is kernel's additional solution for memory pages having (excessive) corrected memory errors. Impacted page is migrated to healthy page if it is in use, then the original page is discarded for any future use. The actual policy on whether (and when) to soft offline should be maintained by userspace, especially in case of an 1G HugeTLB page. Soft-offline dissolves the HugeTLB page, either in-use or free, into chunks of 4K pages, reducing HugeTLB pool capacity by 1 hugepage. If userspace has not acknowledged such behavior, it may be surprised when later mmap hugepages MAP_FAILED due to lack of hugepages. In case of a transparent hugepage, it will be split into 4K pages as well; userspace will stop enjoying the transparent performance. In addition, discarding the entire 1G HugeTLB page only because of corrected memory errors sounds very costly and kernel better not doing under the hood. But today there are at least 2 such cases: 1. GHES driver sees both GHES_SEV_CORRECTED and CPER_SEC_ERROR_THRESHOLD_EXCEEDED after parsing CPER. 2. RAS Correctable Errors Collector counts correctable errors per PFN and when the counter for a PFN reaches threshold In both cases, userspace has no control of the soft offline performed by kernel's memory failure recovery. This patch series give userspace the control of softofflining any page: kernel only soft offlines raw page / transparent hugepage / HugeTLB hugepage if userspace has agreed to. The interface to userspace is a new sysctl called enable_soft_offline under /proc/sys/vm. By default enable_soft_line is 1 to preserve existing behavior in kernel. This patch (of 4): Logs from soft_offline_page and soft_offline_in_use_page have different formats than majority of the memory failure code: "Memory failure: 0x${pfn}: ${lower_case_message}" Convert them to the following format: "Soft offline: 0x${pfn}: ${lower_case_message}" No functional change in this commit. Link: https://lkml.kernel.org/r/20240626050818.2277273-1-jiaqiyan@google.com Link: https://lkml.kernel.org/r/20240626050818.2277273-2-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: Miaohe Lin Reviewed-by: Lance Yang Cc: David Rientjes Cc: Frank van der Linden Cc: Jane Chu Cc: Jonathan Corbet Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Randy Dunlap Cc: Shuah Khan Signed-off-by: Andrew Morton commit c2fad56b3c12a5fc6ea7426d2e39459e85e5b55e Author: Xiu Jianfeng Date: Fri Jun 28 07:23:33 2024 +0000 mm: memcg: adjust the warning when seq_buf overflows Currently it uses WARN_ON_ONCE() if seq_buf overflows when user reads memory.stat, the only advantage of WARN_ON_ONCE is that the splat is so verbose that it gets noticed. And also it panics the system if panic_on_warn is enabled. It seems like the warning is just an over reaction and a simple pr_warn should just achieve the similar effect. Link: https://lkml.kernel.org/r/20240628072333.2496527-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Suggested-by: Michal Hocko Cc: Johannes Weiner Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit 1c46cc09896f3c2a896c152bcfb8c2987810fde5 Author: Xiu Jianfeng Date: Wed Jun 26 09:42:32 2024 +0000 mm: memcg: remove redundant seq_buf_has_overflowed() Both the end of memory_stat_format() and memcg_stat_format() will call WARN_ON_ONCE(seq_buf_has_overflowed()). However, memory_stat_format() is the only caller of memcg_stat_format(), when memcg is on the default hierarchy, seq_buf_has_overflowed() will be executed twice, so remove the redundant one. Link: https://lkml.kernel.org/r/20240626094232.2432891-1-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Cc: Michal Hocko Cc: Roman Gushchin Cc: Johannes Weiner Cc: Shakeel Butt Cc: Muchun Song Signed-off-by: Andrew Morton commit a591d35c40237df735e8ffb4792acb6e56bbca48 Author: Audra Mitchell Date: Wed Jun 26 09:05:13 2024 -0400 mm: turn off test_uffdio_wp if CONFIG_PTE_MARKER_UFFD_WP is not configured. If CONFIG_PTE_MARKER_UFFD_WP is disabled, then we turn off three features in userfaultfd_api (UFFD_FEATURE_WP_HUGETLBFS_SHMEM, UFFD_FEATURE_WP_UNPOPULATED, and UFFD_FEATURE_WP_ASYNC). Currently this test always will call uffdio_regsiter with the flag UFFDIO_REGISTER_MODE_WP. However, the kernel ensures in vma_can_userfault that if the feature UFFD_FEATURE_WP_HUGETLBFS_SHMEM is disabled, only allow the VM_UFFD_WP on anonymous vmas, meaning our call to uffdio_regsiter will fail. We still want to be able to run the test even if we have CONFIG_PTE_MARKER_UFFD_WP disabled, so check to see if the feature UFFD_FEATURE_WP_HUGETLBFS_SHMEM has been turned off in the test and if so, disable us from calling uffdio_regsiter with the flag UFFDIO_REGISTER_MODE_WP. Link: https://lkml.kernel.org/r/20240626130513.120193-3-audra@redhat.com Signed-off-by: Audra Mitchell Reviewed-by: Peter Xu Cc: Al Viro Cc: Andrea Arcangeli Cc: Christian Brauner Cc: Jan Kara Cc: Mike Rapoport Cc: Rafael Aquini Cc: Shaohua Li Cc: Shuah Khan Signed-off-by: Andrew Morton commit a47a7af9b5118442dcfd2214a810033948a579ec Author: Audra Mitchell Date: Wed Jun 26 09:05:12 2024 -0400 mm: update uffd-stress to handle EINVAL for unset config features Now that we have updated userfaultfd_api to correctly return EINVAL when a feature is requested but not available, let's fix the uffd-stress test to only set the UFFD_FEATURE_WP_UNPOPULATED feature when the config is set. In addition, still run the test if the CONFIG_PTE_MARKER_UFFD_WP is not set, just dont use the corresponding UFFD_FEATURE_WP_UNPOPULATED feature. Link: https://lkml.kernel.org/r/20240626130513.120193-2-audra@redhat.com Signed-off-by: Audra Mitchell Cc: Al Viro Cc: Andrea Arcangeli Cc: Christian Brauner Cc: Jan Kara Cc: Mike Rapoport Cc: Peter Xu Cc: Rafael Aquini Cc: Shaohua Li Cc: Shuah Khan Signed-off-by: Andrew Morton commit 8ac5dc66599c5c545cefd314dd34a109edce2784 Author: Oleg Nesterov Date: Wed Jun 26 21:10:17 2024 +0200 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/20240626191017.GA20031@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Eric W. Biederman Signed-off-by: Andrew Morton commit d73d00352145fb51d31771047aa939850d87fa50 Author: Oleg Nesterov Date: Wed Jun 26 17:29:30 2024 +0200 memcg: mm_update_next_owner: move for_each_thread() into try_to_set_owner() mm_update_next_owner() checks the children / real_parent->children to avoid the "everything else" loop in the likely case, but this won't work if a child/sibling has a zombie leader with ->mm == NULL. Move the for_each_thread() logic into try_to_set_owner(), if nothing else this makes the children/siblings/everything searches more consistent. Link: https://lkml.kernel.org/r/20240626152930.GA17936@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jens Axboe Cc: Jinliang Zheng Cc: Mateusz Guzik Cc: Matthew Wilcox (Oracle) Cc: Tycho Andersen Signed-off-by: Andrew Morton commit 2a22b773b15f5aa97c029acad79bda11ce5f2b4d Author: Oleg Nesterov Date: Wed Jun 26 17:29:24 2024 +0200 memcg: mm_update_next_owner: kill the "retry" logic Add the new helper, try_to_set_owner(), which tries to update mm->owner once we see c->mm == mm. This way mm_update_next_owner() doesn't need to restart the list_for_each_entry/for_each_process loops from the very beginning if it races with exit/exec, it can just continue. Unlike the current code, try_to_set_owner() re-checks tsk->mm == mm before it drops tasklist_lock, so it doesn't need get/put_task_struct(). Link: https://lkml.kernel.org/r/20240626152924.GA17933@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Christian Brauner Cc: Eric W. Biederman Cc: Jens Axboe Cc: Jinliang Zheng Cc: Mateusz Guzik Cc: Matthew Wilcox (Oracle) Cc: Tycho Andersen Signed-off-by: Andrew Morton commit 1419ff984aad4c08d121793f71a520b432ead88a Author: Roman Gushchin Date: Fri Jun 28 21:03:17 2024 +0000 mm: memcg: put struct task_struct::in_user_fault under CONFIG_MEMCG_V1 The struct task_struct's in_user_fault member is not used by the cgroup v2's memory controller, so it can be put under the CONFIG_MEMCG_V1 config option. To do so, mem_cgroup_enter_user_fault() and mem_cgroup_exit_user_fault() are moved under the CONFIG_MEMCG_V1 option as well. Link: https://lkml.kernel.org/r/20240628210317.272856-10-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 1c3a0b3d0b11fb98c40360f849563185218c2dd4 Author: Roman Gushchin Date: Fri Jun 28 21:03:16 2024 +0000 mm: memcg: put struct task_struct::memcg_in_oom under CONFIG_MEMCG_V1 The memcg_in_oom field of the struct task_struct is not used by the cgroup v2's memory controller, so it can be happily compiled out if CONFIG_MEMCG_V1 is not set. Link: https://lkml.kernel.org/r/20240628210317.272856-9-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 98c9daf5ae6be008f78c07b744bcff7bcc6e98da Author: Roman Gushchin Date: Fri Jun 28 21:03:15 2024 +0000 mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node Put memcg1-specific members of struct mem_cgroup_per_node under the CONFIG_MEMCG_V1 config option. Link: https://lkml.kernel.org/r/20240628210317.272856-8-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 94b7e5bf09b08aa4cce4625d0a4b307399b77e2c Author: Roman Gushchin Date: Fri Jun 28 21:03:14 2024 +0000 mm: memcg: put memcg1-specific struct mem_cgroup's members under CONFIG_MEMCG_V1 Put memcg1-specific members of struct mem_cgroup under the CONFIG_MEMCG_V1 config option. Also group them close to the end of struct mem_cgroup just before the dynamic per-node part. Link: https://lkml.kernel.org/r/20240628210317.272856-7-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 05dfec123ddefd058b72b3de8eaf6e4d0de11292 Author: Roman Gushchin Date: Fri Jun 28 21:03:13 2024 +0000 mm: memcg: guard memcg1-specific fields accesses in mm/memcontrol.c There are only few memcg1-specific struct mem_cgroup's members accesses left in mm/memcontrol.c. Let's guard them with the CONFIG_MEMCG_V1 config option. Link: https://lkml.kernel.org/r/20240628210317.272856-6-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit b5855a26dedf210bcc1deb4cb30f9f657571a28a Author: Roman Gushchin Date: Fri Jun 28 21:03:12 2024 +0000 mm: memcg: gather memcg1-specific fields initialization in memcg1_memcg_init() Gather all memcg1-specific struct mem_cgroup's members initialization in a new memcg1_memcg_init() function, defined in mm/memcontrol-v1.c. Obviously, if CONFIG_MEMCG_V1 is not set, there is no need to initialize these fields, so the function becomes trivial. Link: https://lkml.kernel.org/r/20240628210317.272856-5-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 47d2702b20f514296dbd1e065ff93f926ca112bd Author: Roman Gushchin Date: Fri Jun 28 21:03:11 2024 +0000 mm: memcg: guard cgroup v1-specific code in mem_cgroup_print_oom_meminfo() Put cgroup v1-specific code in mem_cgroup_print_oom_meminfo() under CONFIG_MEMCG_V1. Link: https://lkml.kernel.org/r/20240628210317.272856-4-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 773e9ae77fe777ac09739d8c32b32fff147f2d66 Author: Roman Gushchin Date: Fri Jun 28 21:03:10 2024 +0000 mm: memcg: factor out legacy socket memory accounting code Move out the legacy cgroup v1 socket memory accounting code into mm/memcontrol-v1.c. This commit introduces three new functions: memcg1_tcpmem_active(), memcg1_charge_skmem() and memcg1_uncharge_skmem(), which contain all cgroup v1-specific code and become trivial if CONFIG_MEMCG_V1 isn't set. Note, that !!memcg->tcpmem_pressure check in mem_cgroup_under_socket_pressure() can't be easily moved into memcontrol-v1.h without including memcontrol-v1.h from memcontrol.h which isn't a good idea, so it's better to just #ifdef it. Link: https://lkml.kernel.org/r/20240628210317.272856-3-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 04fbe921d3b1f521df7830888054a79fae9ac45a Author: Roman Gushchin Date: Fri Jun 28 21:03:09 2024 +0000 mm: memcg: move memcg_account_kmem() to memcontrol-v1.c Patch series "mm: memcg: put cgroup v1-specific memcg data under CONFIG_MEMCG_V1". This patchset puts all cgroup v1's members of struct mem_cgroup, struct mem_cgroup_per_node and struct task_struct under the CONFIG_MEMCG_V1 config option. If cgroup v1 support is not required (and it's true for many cgroup users these days), it allows to save a bit of memory and compile out some code, some of which is on relatively hot paths. It also structures the code a bit better by grouping cgroup v1-specific stuff in one place. This patch (of 9): memcg_account_kmem() consists of a trivial statistics change via mod_memcg_state() call and a relatively large memcg1-specific part. Let's factor out the mod_memcg_state() call and move the rest into the mm/memcontrol-v1.c file. Also rename memcg_account_kmem() into memcg1_account_kmem() for consistency. Link: https://lkml.kernel.org/r/20240628210317.272856-1-roman.gushchin@linux.dev Link: https://lkml.kernel.org/r/20240628210317.272856-2-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit 68cd9050d871e4db5433420b5ceb32f5512d18bc Author: Dan Schatzberg Date: Wed Jan 3 08:48:37 2024 -0800 mm: add swappiness= arg to memory.reclaim Allow proactive reclaimers to submit an additional swappiness= argument to memory.reclaim. This overrides the global or per-memcg swappiness setting for that reclaim attempt. For example: echo "2M swappiness=0" > /sys/fs/cgroup/memory.reclaim will perform reclaim on the rootcg with a swappiness setting of 0 (no swap) regardless of the vm.swappiness sysctl setting. Userspace proactive reclaimers use the memory.reclaim interface to trigger reclaim. The memory.reclaim interface does not allow for any way to effect the balance of file vs anon during proactive reclaim. The only approach is to adjust the vm.swappiness setting. However, there are a few reasons we look to control the balance of file vs anon during proactive reclaim, separately from reactive reclaim: * Swapout should be limited to manage SSD write endurance. In near-OOM situations we are fine with lots of swap-out to avoid OOMs. As these are typically rare events, they have relatively little impact on write endurance. However, proactive reclaim runs continuously and so its impact on SSD write endurance is more significant. Therefore it is desireable to control swap-out for proactive reclaim separately from reactive reclaim * Some userspace OOM killers like systemd-oomd[1] support OOM killing on swap exhaustion. This makes sense if the swap exhaustion is triggered due to reactive reclaim but less so if it is triggered due to proactive reclaim (e.g. one could see OOMs when free memory is ample but anon is just particularly cold). Therefore, it's desireable to have proactive reclaim reduce or stop swap-out before the threshold at which OOM killing occurs. In the case of Meta's Senpai proactive reclaimer, we adjust vm.swappiness before writes to memory.reclaim[2]. This has been in production for nearly two years and has addressed our needs to control proactive vs reactive reclaim behavior but is still not ideal for a number of reasons: * vm.swappiness is a global setting, adjusting it can race/interfere with other system administration that wishes to control vm.swappiness. In our case, we need to disable Senpai before adjusting vm.swappiness. * vm.swappiness is stateful - so a crash or restart of Senpai can leave a misconfigured setting. This requires some additional management to record the "desired" setting and ensure Senpai always adjusts to it. With this patch, we avoid these downsides of adjusting vm.swappiness globally. [1]https://www.freedesktop.org/software/systemd/man/latest/systemd-oomd.service.html [2]https://github.com/facebookincubator/oomd/blob/main/src/oomd/plugins/Senpai.cpp#L585-L598 Link: https://lkml.kernel.org/r/20240103164841.2800183-3-schatzberg.dan@gmail.com Signed-off-by: Dan Schatzberg Suggested-by: Yosry Ahmed Acked-by: Michal Hocko Acked-by: David Rientjes Acked-by: Chris Li Cc: David Hildenbrand Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shakeel Butt Cc: Tejun Heo Cc: Yue Zhao Cc: Zefan Li Cc: Nhat Pham Signed-off-by: Andrew Morton commit 410abb20acaea9679fc1b2276d47e70fba331451 Author: Dan Schatzberg Date: Wed Jan 3 08:48:36 2024 -0800 mm: add defines for min/max swappiness Patch series "Add swappiness argument to memory.reclaim", v6. This patch proposes augmenting the memory.reclaim interface with a swappiness= argument that overrides the swappiness value for that instance of proactive reclaim. Userspace proactive reclaimers use the memory.reclaim interface to trigger reclaim. The memory.reclaim interface does not allow for any way to effect the balance of file vs anon during proactive reclaim. The only approach is to adjust the vm.swappiness setting. However, there are a few reasons we look to control the balance of file vs anon during proactive reclaim, separately from reactive reclaim: * Swapout should be limited to manage SSD write endurance. In near-OOM situations we are fine with lots of swap-out to avoid OOMs. As these are typically rare events, they have relatively little impact on write endurance. However, proactive reclaim runs continuously and so its impact on SSD write endurance is more significant. Therefore it is desireable to control swap-out for proactive reclaim separately from reactive reclaim * Some userspace OOM killers like systemd-oomd[1] support OOM killing on swap exhaustion. This makes sense if the swap exhaustion is triggered due to reactive reclaim but less so if it is triggered due to proactive reclaim (e.g. one could see OOMs when free memory is ample but anon is just particularly cold). Therefore, it's desireable to have proactive reclaim reduce or stop swap-out before the threshold at which OOM killing occurs. In the case of Meta's Senpai proactive reclaimer, we adjust vm.swappiness before writes to memory.reclaim[2]. This has been in production for nearly two years and has addressed our needs to control proactive vs reactive reclaim behavior but is still not ideal for a number of reasons: * vm.swappiness is a global setting, adjusting it can race/interfere with other system administration that wishes to control vm.swappiness. In our case, we need to disable Senpai before adjusting vm.swappiness. * vm.swappiness is stateful - so a crash or restart of Senpai can leave a misconfigured setting. This requires some additional management to record the "desired" setting and ensure Senpai always adjusts to it. With this patch, we avoid these downsides of adjusting vm.swappiness globally. Previously, this exact interface addition was proposed by Yosry[3]. In response, Roman proposed instead an interface to specify precise file/anon/slab reclaim amounts[4]. More recently Huan also proposed this as well[5] and others similarly questioned if this was the proper interface. Previous proposals sought to use this to allow proactive reclaimers to effectively perform a custom reclaim algorithm by issuing proactive reclaim with different settings to control file vs anon reclaim (e.g. to only reclaim anon from some applications). Responses argued that adjusting swappiness is a poor interface for custom reclaim. In contrast, I argue in favor of a swappiness setting not as a way to implement custom reclaim algorithms but rather to bias the balance of anon vs file due to differences of proactive vs reactive reclaim. In this context, swappiness is the existing interface for controlling this balance and this patch simply allows for it to be configured differently for proactive vs reactive reclaim. Specifying explicit amounts of anon vs file pages to reclaim feels inappropriate for this prupose. Proactive reclaimers are un-aware of the relative age of file vs anon for a cgroup which makes it difficult to manage proactive reclaim of different memory pools. A proactive reclaimer would need some amount of anon reclaim attempts separate from the amount of file reclaim attempts which seems brittle given that it's difficult to observe the impact. [1]https://www.freedesktop.org/software/systemd/man/latest/systemd-oomd.service.html [2]https://github.com/facebookincubator/oomd/blob/main/src/oomd/plugins/Senpai.cpp#L585-L598 [3]https://lore.kernel.org/linux-mm/CAJD7tkbDpyoODveCsnaqBBMZEkDvshXJmNdbk51yKSNgD7aGdg@mail.gmail.com/ [4]https://lore.kernel.org/linux-mm/YoPHtHXzpK51F%2F1Z@carbon/ [5]https://lore.kernel.org/lkml/20231108065818.19932-1-link@vivo.com/ This patch (of 2): We use the constants 0 and 200 in a few places in the mm code when referring to the min and max swappiness. This patch adds MIN_SWAPPINESS and MAX_SWAPPINESS #defines to improve clarity. There are no functional changes. Link: https://lkml.kernel.org/r/20240103164841.2800183-1-schatzberg.dan@gmail.com Link: https://lkml.kernel.org/r/20240103164841.2800183-2-schatzberg.dan@gmail.com Signed-off-by: Dan Schatzberg Acked-by: David Rientjes Acked-by: Chris Li Reviewed-by: Nhat Pham Cc: David Hildenbrand Cc: Hugh Dickins Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shakeel Butt Cc: Tejun Heo Cc: Yosry Ahmed Cc: Yue Zhao Cc: Zefan Li Signed-off-by: Andrew Morton commit 5ff3bd0c54f2744a0e29148d17f4f31922682b19 Author: Roman Gushchin Date: Mon Jun 24 17:59:06 2024 -0700 MAINTAINERS: add mm/memcontrol-v1.c/h to the list of maintained files Link: https://lkml.kernel.org/r/20240625005906.106920-15-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit e93d4166b40a84df83c4d5cb4c709d022808ef9b Author: Roman Gushchin Date: Mon Jun 24 17:59:05 2024 -0700 mm: memcg: put cgroup v1-specific code under a config option Put legacy cgroup v1 memory controller code under a new CONFIG_MEMCG_V1 config option. The option is turned off by default. Nobody except those who are still using cgroup v1 should turn it on. If the option is not set, memory controller can still be mounted under cgroup v1, but none of memcg-specific control files are present. Please note, that not all cgroup v1's memory controller code is guarded yet (but most of it), it's a subject for some follow-up work. Thanks to Michal Hocko for providing a better Kconfig option description. [roman.gushchin@linux.dev: better config option description provided by Michal] Link: https://lkml.kernel.org/r/ZnxXNtvqllc9CDoo@google.com Link: https://lkml.kernel.org/r/20240625005906.106920-14-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 6f1173d6845974aeb654a7f070c0c9f21283e1b3 Author: Roman Gushchin Date: Mon Jun 24 17:59:04 2024 -0700 mm: memcg: group cgroup v1 memcg related declarations Group all cgroup v1-related declarations at the end of memcontrol.h and mm/memcontrol-v1.h with an intention to put them all together under a config option later on. It should make things easier to follow and maintain too. Link: https://lkml.kernel.org/r/20240625005906.106920-13-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 34926e10bb54eb369637b8363fb2b6fda8baa687 Author: Roman Gushchin Date: Mon Jun 24 17:59:03 2024 -0700 mm: memcg: make memcg1_update_tree() static memcg1_update_tree() is not used outside of mm/memcontrol-v1.c anymore, define it as static and remove the declaration from the header file. Link: https://lkml.kernel.org/r/20240625005906.106920-12-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit ea1e879631ffdf640bfcb11439d61a151067bb39 Author: Roman Gushchin Date: Mon Jun 24 17:59:02 2024 -0700 mm: memcg: move cgroup v1 interface files to memcontrol-v1.c Move legacy cgroup v1 memory controller interfaces and corresponding code into memcontrol-v1.c. [roman.gushchin@linux.dev: move two functions] Link: https://lkml.kernel.org/r/20240704002712.2077812-1-roman.gushchin@linux.dev Link: https://lkml.kernel.org/r/20240625005906.106920-11-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 8d49b69920dd4ff2848128dc9efa9d564da67cdc Author: Roman Gushchin Date: Mon Jun 24 17:59:01 2024 -0700 mm: memcg: rename memcg_oom_recover() Rename memcg_oom_recover() into memcg1_oom_recover() for consistency with other memory cgroup v1-related functions. Move the declaration in mm/memcontrol-v1.h to be nearby other memcg v1 oom handling functions. Link: https://lkml.kernel.org/r/20240625005906.106920-10-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 292fc2e0204aa02a24f6d2684d71801068fec803 Author: Roman Gushchin Date: Mon Jun 24 17:59:00 2024 -0700 mm: memcg: move cgroup v1 oom handling code into memcontrol-v1.c Cgroup v1 supports a complicated OOM handling in userspace mechanism, which is not supported by cgroup v2. Let's move the corresponding code into memcontrol-v1.c. Aside from mechanical code movement this patch introduces two new functions: memcg1_oom_prepare() and memcg1_oom_finish(). Those are implementing cgroup v1-specific parts of the common memcg OOM handling path. Link: https://lkml.kernel.org/r/20240625005906.106920-9-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit cc7b8504f624157c9be7aea9c9a9d5010fd908c9 Author: Roman Gushchin Date: Mon Jun 24 17:58:59 2024 -0700 mm: memcg: rename memcg_check_events() Rename memcg_check_events() into memcg1_check_events() for consistency with other cgroup v1-specific functions. Link: https://lkml.kernel.org/r/20240625005906.106920-8-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 66d60c428b23c5b171218985b6880958fb7edbe3 Author: Roman Gushchin Date: Mon Jun 24 17:58:58 2024 -0700 mm: memcg: move legacy memcg event code into memcontrol-v1.c Cgroup v1's memory controller contains a pretty complicated event notifications mechanism which is not used on cgroup v2. Let's move the corresponding code into memcontrol-v1.c. Please, note, that mem_cgroup_event_ratelimit() remains in memcontrol.c, otherwise it would require exporting too many details on memcg stats outside of memcontrol.c. Link: https://lkml.kernel.org/r/20240625005906.106920-7-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit b9eaacb1db2b8855c1363dceadf774519a941719 Author: Roman Gushchin Date: Mon Jun 24 17:58:57 2024 -0700 mm: memcg: rename charge move-related functions Rename exported function related to the charge move to have the memcg1_ prefix. Link: https://lkml.kernel.org/r/20240625005906.106920-6-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit e548ad4a7cbf765f3ab74f6aa1aecc2df390a0b2 Author: Roman Gushchin Date: Mon Jun 24 17:58:56 2024 -0700 mm: memcg: move charge migration code to memcontrol-v1.c Unlike the legacy cgroup v1 memory controller, cgroup v2 memory controller doesn't support moving charged pages between cgroups. It's a fairly large and complicated code which created a number of problems in the past. Let's move this code into memcontrol-v1.c. It shaves off 1k lines from memcontrol.c. It's also another step towards making the legacy memory controller code optionally compiled. Link: https://lkml.kernel.org/r/20240625005906.106920-5-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 87024f5837485c2f9541283747428df54c0f9183 Author: Roman Gushchin Date: Mon Jun 24 17:58:55 2024 -0700 mm: memcg: rename soft limit reclaim-related functions Rename exported function related to the softlimit reclaim to have memcg1_ prefix. Link: https://lkml.kernel.org/r/20240625005906.106920-4-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit d12f6d22416bb77e76a93903a717e029b66df002 Author: Roman Gushchin Date: Mon Jun 24 17:58:54 2024 -0700 mm: memcg: move soft limit reclaim code to memcontrol-v1.c Soft limits are cgroup v1-specific and are not supported by cgroup v2, so let's move the corresponding code into memcontrol-v1.c. Aside from simple moving the code, this commits introduces a trivial memcg1_soft_limit_reset() function to reset soft limits and also moves the global soft limit tree initialization code into a new memcg1_init() function. It also moves corresponding declarations shared between memcontrol.c and memcontrol-v1.c into mm/memcontrol-v1.h. Link: https://lkml.kernel.org/r/20240625005906.106920-3-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 1b1e13440c1c17efac1000788730468cde16bdd3 Author: Roman Gushchin Date: Mon Jun 24 17:58:53 2024 -0700 mm: memcg: introduce memcontrol-v1.c Patch series "mm: memcg: separate legacy cgroup v1 code and put under config option", v2. Cgroups v2 have been around for a while and many users have fully adopted them, so they never use cgroups v1 features and functionality. Yet they have to "pay" for the cgroup v1 support anyway: 1) the kernel binary contains an unused cgroup v1 code, 2) some code paths have additional checks which are not needed, 3) some common structures like task_struct and mem_cgroup contain unused cgroup v1-specific members. Cgroup v1's memory controller has a number of features that are not supported by cgroup v2 and their implementation is pretty much self contained. Most notably, these features are: soft limit reclaim, oom handling in userspace, complicated event notification system, charge migration. Cgroup v1-specific code in memcontrol.c is close to 4k lines in size and it's intervened with generic and cgroup v2-specific code. It's a burden on developers and maintainers. This patchset aims to solve these problems by: 1) moving cgroup v1-specific memcg code to the new mm/memcontrol-v1.c file, 2) putting definitions shared by memcontrol.c and memcontrol-v1.c into the mm/memcontrol-v1.h header, 3) introducing the CONFIG_MEMCG_V1 config option, turned off by default, 4) making memcontrol-v1.c to compile only if CONFIG_MEMCG_V1 is set. If CONFIG_MEMCG_V1 is not set, cgroup v1 memory controller is still available for mounting, however no memory-specific control knobs are present. This patch (of 14): This patch introduces the mm/memcontrol-v1.c source file which will be used for all legacy (cgroup v1) memory cgroup code. It also introduces mm/memcontrol-v1.h to keep declarations shared between mm/memcontrol.c and mm/memcontrol-v1.c. As of now, let's compile it if CONFIG_MEMCG is set, similar to mm/memcontrol.c. Later on it can be switched to use a separate config option, so that the legacy code won't be compiled if not required. Link: https://lkml.kernel.org/r/20240625005906.106920-1-roman.gushchin@linux.dev Link: https://lkml.kernel.org/r/20240625005906.106920-2-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit a0b856b617c585b86a077aae5176c946e1462b7d Author: Chengming Zhou Date: Fri Jun 21 15:54:31 2024 +0800 mm/ksm: optimize the chain()/chain_prune() interfaces Now the implementation of stable_node_dup() causes chain()/chain_prune() interfaces and usages are overcomplicated. Why? stable_node_dup() only find and return a candidate stable_node for sharing, so the users have to recheck using stable_node_dup_any() if any non-candidate stable_node exist. And try to ksm_get_folio() from it again. Actually, stable_node_dup() can just return a best stable_node as it can, then the users can check if it's a candidate for sharing or not. The code is simplified too and fewer corner cases: such as stable_node and stable_node_dup can't be NULL if returned tree_folio is not NULL. Link: https://lkml.kernel.org/r/20240621-b4-ksm-scan-optimize-v2-3-1c328aa9e30b@linux.dev Signed-off-by: Chengming Zhou Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: Hugh Dickins Cc: Stefan Roesch Signed-off-by: Andrew Morton commit d58a361b0350128bf5a5cf47773edaedbb6ea838 Author: Chengming Zhou Date: Fri Jun 21 15:54:30 2024 +0800 mm/ksm: don't waste time searching stable tree for fast changing page The code flow in cmp_and_merge_page() is suboptimal for handling the ksm page and non-ksm page at the same time. For example: - ksm page 1. Mostly just return if this ksm page is not migrated and this rmap_item has been on the rmap hlist. Or we have to fix this rmap_item mapping. 2. But we absolutely don't need to checksum for this ksm page, since it can't change. - non-ksm page 1. First don't need to waste time searching stable tree if fast changing. 2. Should try to merge with zero page before search the stable tree. 3. Then search stable tree to find mergeable ksm page. This patch optimizes the code flow so the handling differences between ksm page and non-ksm page become clearer and more efficient too. Link: https://lkml.kernel.org/r/20240621-b4-ksm-scan-optimize-v2-2-1c328aa9e30b@linux.dev Signed-off-by: Chengming Zhou Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: Hugh Dickins Cc: Stefan Roesch Signed-off-by: Andrew Morton commit ac90c56bbd734addc9bfb4567f64f1c180c64f5d Author: Chengming Zhou Date: Fri Jun 21 15:54:29 2024 +0800 mm/ksm: refactor out try_to_merge_with_zero_page() Patch series "mm/ksm: cmp_and_merge_page() optimizations and cleanup", v2. This series mainly optimizes cmp_and_merge_page() to have more efficient separate code flow for ksm page and non-ksm anon page. - ksm page: don't need to calculate the checksum obviously. - anon page: don't need to search stable tree if changing fast and try to merge with zero page before searching ksm page on stable tree. Please see the patch-2 for details. Patch-3 is cleanup also a little optimization for the chain()/chain_prune interfaces, which made the stable_tree_search()/stable_tree_insert() over complex. I have done simple testing using "hackbench -g 1 -l 300000" (maybe I need to use a better workload) on my machine, have seen a little CPU usage decrease of ksmd and some improvements of cmp_and_merge_page() latency: We can see the latency of cmp_and_merge_page() when handling non-ksm anon pages has been improved. This patch (of 3): In preparation for later changes, refactor out a new function called try_to_merge_with_zero_page(), which tries to merge with zero page. Link: https://lkml.kernel.org/r/20240621-b4-ksm-scan-optimize-v2-0-1c328aa9e30b@linux.dev Link: https://lkml.kernel.org/r/20240621-b4-ksm-scan-optimize-v2-1-1c328aa9e30b@linux.dev Signed-off-by: Chengming Zhou Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: Hugh Dickins Cc: Stefan Roesch Signed-off-by: Andrew Morton commit 003af997c8a945493859dd1a2d015cc9387ff27a Author: Aristeu Rozanski Date: Fri Jun 21 15:00:50 2024 -0400 hugetlb: force allocating surplus hugepages on mempolicy allowed nodes When trying to allocate a hugepage with no reserved ones free, it may be allowed in case a number of overcommit hugepages was configured (using /proc/sys/vm/nr_overcommit_hugepages) and that number wasn't reached. This allows for a behavior of having extra hugepages allocated dynamically, if there're resources for it. Some sysadmins even prefer not reserving any hugepages and setting a big number of overcommit hugepages. But while attempting to allocate overcommit hugepages in a multi node system (either NUMA or mempolicy/cpuset) said allocations might randomly fail even when there're resources available for the allocation. This happens due to allowed_mems_nr() only accounting for the number of free hugepages in the nodes the current process belongs to and the surplus hugepage allocation is done so it can be allocated in any node. In case one or more of the requested surplus hugepages are allocated in a different node, the whole allocation will fail due allowed_mems_nr() returning a lower value. So allocate surplus hugepages in one of the nodes the current process belongs to. Easy way to reproduce this issue is to use a 2+ NUMA nodes system: # echo 0 >/proc/sys/vm/nr_hugepages # echo 1 >/proc/sys/vm/nr_overcommit_hugepages # numactl -m0 ./tools/testing/selftests/mm/map_hugetlb 2 Repeating the execution of map_hugetlb test application will eventually fail when the hugepage ends up allocated in a different node. [aris@ruivo.org: v2] Link: https://lkml.kernel.org/r/20240701212343.GG844599@cathedrallabs.org Link: https://lkml.kernel.org/r/20240621190050.mhxwb65zn37doegp@redhat.com Signed-off-by: Aristeu Rozanski Cc: Muchun Song Cc: Aristeu Rozanski Cc: David Hildenbrand Cc: Vishal Moola Cc: Signed-off-by: Andrew Morton commit 64548bc5347bd0517ae25f8a7076e7f3193f4f19 Author: SeongJae Park Date: Mon Jul 1 09:53:32 2024 -0700 mm/damon/paddr: initialize nr_succeeded in __damon_pa_migrate_folio_list() The variable is supposed to be set via later migrate_pages() call. However, the function does not do that when CONFIG_MIGRATION is unset. Initialize the variable to zero. Link: https://lkml.kernel.org/r/20240701165332.47495-1-sj@kernel.org Fixes: 5311c0a2eee3 ("mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion") Signed-off-by: SeongJae Park Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202406251102.GE07hqfQ-lkp@intel.com/ Cc: Honggyu Kim Cc: Hyeongtak Ji Signed-off-by: Andrew Morton commit 593a10dabe08dcf93259fce2badd8dc2528859a8 Author: Kefeng Wang Date: Tue May 21 21:03:15 2024 +0800 mm: refactor folio_undo_large_rmappable() Folios of order <= 1 are not in deferred list, the check of order is added into folio_undo_large_rmappable() from commit 8897277acfef ("mm: support order-1 folios in the page cache"), but there is a repeated check for small folio (order 0) during each call of the folio_undo_large_rmappable(), so only keep folio_order() check inside the function. In addition, move all the checks into header file to save a function call for non-large-rmappable or empty deferred_list folio. Link: https://lkml.kernel.org/r/20240521130315.46072-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: David Hildenbrand Reviewed-by: Vishal Moola (Oracle) Cc: Johannes Weiner Cc: Lance Yang Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit caa93b7c25945d302689de07bd404655db93ae6e Author: Edward Cree Date: Wed Jul 3 13:18:49 2024 +0100 ethtool: move firmware flashing flag to struct ethtool_netdev_state Commit 31e0aa99dc02 ("ethtool: Veto some operations during firmware flashing process") added a flag module_fw_flash_in_progress to struct net_device. As this is ethtool related state, move it to the recently created struct ethtool_netdev_state, accessed via the 'ethtool' member of struct net_device. Suggested-by: Jakub Kicinski Signed-off-by: Edward Cree Reviewed-by: Michal Kubiak Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20240703121849.652893-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski commit 76ed626479ebe0227728eff16bb44544ebd98920 Merge: 7829b376f2a9f 033771c085c2e Author: Jakub Kicinski Date: Thu Jul 4 14:11:03 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/phy/aquantia/aquantia.h 219343755eae ("net: phy: aquantia: add missing include guards") 61578f679378 ("net: phy: aquantia: add support for PHY LEDs") drivers/net/ethernet/wangxun/libwx/wx_hw.c bd07a9817846 ("net: txgbe: remove separate irq request for MSI and INTx") b501d261a5b3 ("net: txgbe: add FDIR ATR support") https://lore.kernel.org/all/20240703112936.483c1975@canb.auug.org.au/ include/linux/mlx5/mlx5_ifc.h 048a403648fc ("net/mlx5: IFC updates for changing max EQs") 99be56171fa9 ("net/mlx5e: SHAMPO, Re-enable HW-GRO") https://lore.kernel.org/all/20240701133951.6926b2e3@canb.auug.org.au/ Adjacent changes: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 4130c67cd123 ("wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference") 3f3126515fbe ("wifi: iwlwifi: mvm: add mvm-specific guard") include/net/mac80211.h 816c6bec09ed ("wifi: mac80211: fix BSS_CHANGED_UNSOL_BCAST_PROBE_RESP") 5a009b42e041 ("wifi: mac80211: track changes in AP's TPE") Signed-off-by: Jakub Kicinski commit 02219caa92b5b0ed97f8d8b9cf580f6f34a9be31 Merge: a3fbf8606351e 55d4669ef1b76 677ab23bdf416 e4f7805729160 399ced9594dfa 0ac55d095d375 e206f33e2c077 Author: Paul E. McKenney Date: Thu Jul 4 13:54:17 2024 -0700 Merge branches 'doc.2024.06.06a', 'fixes.2024.07.04a', 'mb.2024.06.28a', 'nocb.2024.06.03a', 'rcu-tasks.2024.06.06a', 'rcutorture.2024.06.06a' and 'srcu.2024.06.18a' into HEAD doc.2024.06.06a: Documentation updates. fixes.2024.07.04a: Miscellaneous fixes. mb.2024.06.28a: Grace-period memory-barrier redundancy removal. nocb.2024.06.03a: No-CB CPU updates. rcu-tasks.2024.06.06a: RCU-Tasks updates. rcutorture.2024.06.06a: Torture-test updates. srcu.2024.06.18a: SRCU polled-grace-period updates. commit 55d4669ef1b76823083caecfab12a8bd2ccdcf64 Author: Frederic Weisbecker Date: Fri May 24 16:05:24 2024 +0200 rcu: Fix rcu_barrier() VS post CPUHP_TEARDOWN_CPU invocation When rcu_barrier() calls rcu_rdp_cpu_online() and observes a CPU off rnp->qsmaskinitnext, it means that all accesses from the offline CPU preceding the CPUHP_TEARDOWN_CPU are visible to RCU barrier, including callbacks expiration and counter updates. However interrupts can still fire after stop_machine() re-enables interrupts and before rcutree_report_cpu_dead(). The related accesses happening between CPUHP_TEARDOWN_CPU and rnp->qsmaskinitnext clearing are _NOT_ guaranteed to be seen by rcu_barrier() without proper ordering, especially when callbacks are invoked there to the end, making rcutree_migrate_callback() bypass barrier_lock. The following theoretical race example can make rcu_barrier() hang: CPU 0 CPU 1 ----- ----- //cpu_down() smpboot_park_threads() //ksoftirqd is parked now rcu_sched_clock_irq() invoke_rcu_core() do_softirq() rcu_core() rcu_do_batch() // callback storm // rcu_do_batch() returns // before completing all // of them // do_softirq also returns early because of // timeout. It defers to ksoftirqd but // it's parked stop_machine() take_cpu_down() rcu_barrier() spin_lock(barrier_lock) // observes rcu_segcblist_n_cbs(&rdp->cblist) != 0 do_softirq() rcu_core() rcu_do_batch() //completes all pending callbacks //smp_mb() implied _after_ callback number dec rcutree_report_cpu_dead() rnp->qsmaskinitnext &= ~rdp->grpmask; rcutree_migrate_callback() // no callback, early return without locking // barrier_lock //observes !rcu_rdp_cpu_online(rdp) rcu_barrier_entrain() rcu_segcblist_entrain() // Observe rcu_segcblist_n_cbs(rsclp) == 0 // because no barrier between reading // rnp->qsmaskinitnext and rsclp->len rcu_segcblist_add_len() smp_mb__before_atomic() // will now observe the 0 count and empty // list, but too late, we enqueue regardless WRITE_ONCE(rsclp->len, rsclp->len + v); // ignored barrier callback // rcu barrier stall... This could be solved with a read memory barrier, enforcing the message passing between rnp->qsmaskinitnext and rsclp->len, matching the full memory barrier after rsclp->len addition in rcu_segcblist_add_len() performed at the end of rcu_do_batch(). However the rcu_barrier() is complicated enough and probably doesn't need too many more subtleties. CPU down is a slowpath and the barrier_lock seldom contended. Solve the issue with unconditionally locking the barrier_lock on rcutree_migrate_callbacks(). This makes sure that either rcu_barrier() sees the empty queue or its entrained callback will be migrated. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 6f4cec22c38a33c1981e8f39cdc698119903f1cb Author: Oleg Nesterov Date: Sun May 12 08:02:07 2024 -0700 rcu: Eliminate lockless accesses to rcu_sync->gp_count The rcu_sync structure's ->gp_count field is always accessed under the protection of that same structure's ->rss_lock field, with the exception of a pair of WARN_ON_ONCE() calls just prior to acquiring that lock in functions rcu_sync_exit() and rcu_sync_dtor(). These lockless accesses are unnecessary and impair KCSAN's ability to catch bugs that might be inserted via other lockless accesses. This commit therefore moves those WARN_ON_ONCE() calls under the lock. Signed-off-by: Oleg Nesterov Signed-off-by: Paul E. McKenney commit 7f09e70f9eae95b12488b931ee249f36e35df542 Author: Paul E. McKenney Date: Thu May 9 17:03:06 2024 -0700 MAINTAINERS: Add Uladzislau Rezki as RCU maintainer Signed-off-by: Paul E. McKenney Cc: Uladzislau Rezki commit 68d124b0999919015e6d23008eafea106ec6bb40 Author: Paul E. McKenney Date: Wed May 8 20:11:58 2024 -0700 rcu: Add rcutree.nohz_full_patience_delay to reduce nohz_full OS jitter If a CPU is running either a userspace application or a guest OS in nohz_full mode, it is possible for a system call to occur just as an RCU grace period is starting. If that CPU also has the scheduling-clock tick enabled for any reason (such as a second runnable task), and if the system was booted with rcutree.use_softirq=0, then RCU can add insult to injury by awakening that CPU's rcuc kthread, resulting in yet another task and yet more OS jitter due to switching to that task, running it, and switching back. In addition, in the common case where that system call is not of excessively long duration, awakening the rcuc task is pointless. This pointlessness is due to the fact that the CPU will enter an extended quiescent state upon returning to the userspace application or guest OS. In this case, the rcuc kthread cannot do anything that the main RCU grace-period kthread cannot do on its behalf, at least if it is given a few additional milliseconds (for example, given the time duration specified by rcutree.jiffies_till_first_fqs, give or take scheduling delays). This commit therefore adds a rcutree.nohz_full_patience_delay kernel boot parameter that specifies the grace period age (in milliseconds, rounded to jiffies) before which RCU will refrain from awakening the rcuc kthread. Preliminary experimentation suggests a value of 1000, that is, one second. Increasing rcutree.nohz_full_patience_delay will increase grace-period latency and in turn increase memory footprint, so systems with constrained memory might choose a smaller value. Systems with less-aggressive OS-jitter requirements might choose the default value of zero, which keeps the traditional immediate-wakeup behavior, thus avoiding increases in grace-period latency. [ paulmck: Apply Leonardo Bras feedback. ] Link: https://lore.kernel.org/all/20240328171949.743211-1-leobras@redhat.com/ Reported-by: Leonardo Bras Suggested-by: Leonardo Bras Suggested-by: Sean Christopherson Signed-off-by: Paul E. McKenney Reviewed-by: Leonardo Bras commit 2fd4e52e442c42e01722f5d4cfef693a2da478dd Author: Thorsten Blum Date: Thu Jul 4 06:51:34 2024 +0200 parisc: Use max() to calculate parisc_tlb_flush_threshold Use max() to reduce 4 lines of code to a single line and improve its readability. Fixes the following Coccinelle/coccicheck warning reported by minmax.cocci: WARNING opportunity for max() Signed-off-by: Thorsten Blum Signed-off-by: Helge Deller commit f1b5644862c5b594f48ad01d7880a96b95d83a2f Author: Paul E. McKenney Date: Thu May 30 10:11:31 2024 -0700 ARM: Emulate one-byte cmpxchg Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on ARM systems with ARCH == ARMv6K. [ paulmck: Apply Arnd Bergmann and Nathan Chancellor feedback. ] [ paulmck: Apply Linus Walleij feedback. ] Reported-by: Mark Brown Closes: https://lore.kernel.org/all/54798f68-48f7-4c65-9cba-47c0bf175143@sirena.org.uk/ Reported-by: Naresh Kamboju Closes: https://lore.kernel.org/all/CA+G9fYuZ+pf6p8AXMZWtdFtX-gbG8HMaBKp=XbxcdzA_QeLkxQ@mail.gmail.com/ Signed-off-by: Paul E. McKenney Tested-by: Nathan Chancellor Reviewed-by: Linus Walleij Cc: "Russell King (Oracle)" Cc: Arnd Bergmann Cc: Andrew Davis Cc: Andrew Morton Cc: Eric DeVolder Cc: Rob Herring Cc: commit 226e58b20975000960cb40b7488f55f173007489 Merge: 19990ff048a44 8b6bd8391f91d Author: Georgi Djakov Date: Thu Jul 4 22:45:20 2024 +0300 Merge branch 'icc-rpmh-qos' into icc-next This series adds QoS support for QNOC type device which can be found on SC7280 platform. It adds support for programming priority, priority forward disable and urgency forwarding. This helps in priortizing the traffic originating from different interconnect masters at NOC (Network On Chip). * icc-rpmh-qos dt-bindings: interconnect: add clock property to enable QOS on SC7280 interconnect: qcom: icc-rpmh: Add QoS configuration support interconnect: qcom: sc7280: enable QoS configuration interconnect: qcom: Fix DT backwards compatibility for QoS Link: https://lore.kernel.org/r/20240607173927.26321-1-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov commit 8b6bd8391f91dc85621547fe3c0af8086a012bcb Author: Odelu Kukatla Date: Thu Jul 4 18:25:15 2024 +0530 interconnect: qcom: Fix DT backwards compatibility for QoS Add qos_clks_required flag to skip QoS configuration if clocks property is not populated in devicetree for providers which require clocks to be enabled for accessing registers. This is to keep the QoS configuration backwards compatible with devices that have older DTB. Reported-by: Bjorn Andersson Closes: https://lore.kernel.org/all/ciji6nlxn752ina4tmh6kwvek52nxpnguomqek6plwvwgvoqef@yrtexkpmn5br/ Signed-off-by: Odelu Kukatla Tested-by: Bjorn Andersson Fixes: fbd908bb8bc0 ("interconnect: qcom: sc7280: enable QoS configuration") Link: https://lore.kernel.org/r/20240704125515.22194-1-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov commit 19990ff048a44a3972b8c7ca36eb7700588fe156 Merge: f61207ad09cce 90b400170bcd9 Author: Georgi Djakov Date: Thu Jul 4 22:41:12 2024 +0300 Merge branch 'icc-msm8953' into icc-next Add interconnect driver for MSM8953-based devices. * icc-msm8953 dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC interconnect: qcom: Add MSM8953 driver Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-0-a70d582182dc@mainlining.org Signed-off-by: Georgi Djakov commit f61207ad09ccebf8e2203e0ecef7bc1825a99574 Merge: de0818e945e63 cd5ce45890811 Author: Georgi Djakov Date: Thu Jul 4 22:40:33 2024 +0300 Merge branch 'icc-fixes' into icc-next * icc-fixes interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID Signed-off-by: Georgi Djakov commit e261bd74000ca80e5483ba8a8bda509de8cbe7fd Author: Chukun Pan Date: Sun Jun 30 23:00:07 2024 +0800 arm64: dts: rockchip: fixes PHY reset for Lunzn Fastrhino R68S Fixed the PHY address and reset GPIOs (does not match the corresponding pinctrl) for gmac0 and gmac1. Fixes: b9f8ca655d80 ("arm64: dts: rockchip: Add Lunzn Fastrhino R68S") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240630150010.55729-7-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 2bf5d445df2ec89689d15ea259a916260c936959 Author: Chukun Pan Date: Mon Jul 1 22:30:27 2024 +0800 arm64: dts: rockchip: disable display subsystem for Lunzn Fastrhino R6xS The R66S and R68S boards do not have HDMI output, so disable the display subsystem. Fixes: c79dab407afd ("arm64: dts: rockchip: Add Lunzn Fastrhino R66S") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240701143028.1203997-3-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit cd77139a307fbabe75e6b5cb8a3753e3c700f394 Author: Chukun Pan Date: Sun Jun 30 23:00:05 2024 +0800 arm64: dts: rockchip: remove unused usb2 nodes for Lunzn Fastrhino R6xS Fix the following error when booting: [ 15.851853] platform fd800000.usb: deferred probe pending [ 15.852384] platform fd840000.usb: deferred probe pending [ 15.852881] platform fd880000.usb: deferred probe pending This is due to usb2phy1 is not enabled. There is no USB 2.0 port on the board, just remove it. Fixes: c79dab407afd ("arm64: dts: rockchip: Add Lunzn Fastrhino R66S") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240630150010.55729-5-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit cfeac8e5d05815521f5c5568680735a92ee91fe4 Author: Chukun Pan Date: Sun Jun 30 23:00:04 2024 +0800 arm64: dts: rockchip: fix pmu_io supply for Lunzn Fastrhino R6xS Fixes pmu_io_domains supply according to the schematic. Among them, the vccio3 is responsible for the io voltage of sdcard. There is no sdcard slot on the R68S, and it's connected to vcc_3v3, so describe the supply of vccio3 separately. Fixes: c79dab407afd ("arm64: dts: rockchip: Add Lunzn Fastrhino R66S") Fixes: b9f8ca655d80 ("arm64: dts: rockchip: Add Lunzn Fastrhino R68S") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240630150010.55729-4-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 9e823ba92118510c0d1c050b67bb000f9b9a73d7 Author: Chukun Pan Date: Mon Jul 1 22:30:26 2024 +0800 arm64: dts: rockchip: fix usb regulator for Lunzn Fastrhino R6xS Remove the non-existent usb_host regulator and fix the supply according to the schematic. Also remove the unnecessary always-on and boot-on for the usb_otg regulator. Fixes: c79dab407afd ("arm64: dts: rockchip: Add Lunzn Fastrhino R66S") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240701143028.1203997-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 2dad31528de9ea8b05245ce6ac4f76ebf8dae947 Author: Chukun Pan Date: Sun Jun 30 23:00:02 2024 +0800 arm64: dts: rockchip: fix regulator name for Lunzn Fastrhino R6xS Make the regulator name the same as those marked by schematics. Fixes: c79dab407afd ("arm64: dts: rockchip: Add Lunzn Fastrhino R66S") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240630150010.55729-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 32d1171014a74c788218e0a8a5fd6fef65fb10ba Author: Javier Carrasco Date: Thu Jul 4 20:13:08 2024 +0200 regulator: max77857: Constify struct regmap_config `max77857_remgap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240704-regulator-const-regmap-v1-2-bce0ddef63ea@gmail.com Signed-off-by: Mark Brown commit 05db2e27b92302a43f996561dbb58ecabc3cc85d Author: Javier Carrasco Date: Thu Jul 4 20:13:07 2024 +0200 regulator: da9121: Constify struct regmap_config `da9121_1ch_regmap_config` and `da9121_2ch_regmap_config` are not modified and can be declared as const to move their data to a read-only section. The pointer that references those structs has been converted to const accordingly. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240704-regulator-const-regmap-v1-1-bce0ddef63ea@gmail.com Signed-off-by: Mark Brown commit bf6f26deb0e84089700c1b864f643442e262e16b Author: Diederik de Haas Date: Fri Jun 28 14:00:43 2024 +0200 arm64: dts: rockchip: Add dma-names to uart1 on quartz64-b There have been several attempts to set the dma-names property on the SoC level (in rk356x.dtsi), but that appears to cause problems when set on channels without flow control. Quoting part of a previous attempt for clarification: > Nah, enabling it for bluetooth is fine because you have flow control. > My issues have been on channels without flow control. Without DMA it > simply drops messages or the channel hangs until you close and reopen > it. With DMA, when an overflow locks up the channel it is usually > unavailable until the board is rebooted. Setting it on the board level for the bluetooth connection was deemed safe, so do so for the Quartz64 Model B. This fixes the following error/warning: of_dma_request_slave_channel: dma-names property of node '/serial@fe650000' missing or empty dw-apb-uart fe650000.serial: failed to request DMA Signed-off-by: Diederik de Haas Link: https://libera.irclog.whitequark.org/armlinux/2024-02-29 Link: https://lore.kernel.org/linux-rockchip/18284546.sWSEgdgrri@diego/ Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20240628120130.24076-1-didi.debian@cknow.org Signed-off-by: Heiko Stuebner commit eb665b1c06bcaf16df10018550d8f467ed4b2887 Author: Dragan Simic Date: Sun Jun 30 18:00:41 2024 +0200 arm64: dts: rockchip: Update GPU OPP voltages in RK356x SoC dtsi Update the values for the exact Rockchip RK356x GPU OPP voltages and the lower limits for the GPU OPP voltage ranges, using the most conservative values (i.e. the highest per-OPP voltages) found in the vendor kernel source (cf. downstream commit f8b9431ee38e ("arm64: dts: rockchip: rk3568: support adjust opp-table by otp")). [1][2] Using the most conservative per-OPP voltages ensures reliable GPU operation regardless of the actual GPU binning, with the downside of possibly using a bit more power than absolutely needed. [1] https://github.com/rockchip-linux/kernel/commit/f8b9431ee38ed561650be7092ab93f564598daa9 [2] https://raw.githubusercontent.com/rockchip-linux/kernel/f8b9431ee38ed561650be7092ab93f564598daa9/arch/arm64/boot/dts/rockchip/rk3568.dtsi Suggested-by: Diederik de Haas Helped-by: Jonas Karlman Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/80301764e8983c8410c806ed2256403823709897.1719763100.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit 2e1fae80023a38ea03dfca3eab65b3b46617ef3b Author: Dragan Simic Date: Sun Jun 30 18:00:40 2024 +0200 arm64: dts: rockchip: Add GPU OPP voltage ranges to RK356x SoC dtsi Add support for voltage ranges to the GPU OPPs defined in the SoC dtsi for Rockchip RK356x. This is, for example, useful for RK356x-based boards that are designed to use the same power supply for the GPU and NPU portions of the SoC, which is described further in the following documents: - Rockchip RK3566 Hardware Design Guide, version 1.1.0, page 37 - Rockchip RK3568 Hardware Design Guide, version 1.2, page 78 The values for the exact GPU OPP voltages and the lower limits for the GPU OPP voltage ranges differ from the values found in the vendor kernel source (cf. downstream commit f8b9431ee38e ("arm64: dts: rockchip: rk3568: support adjust opp-table by otp")), [1][2] and present the exact GPU OPP voltage values that have served us well so far. [1] https://github.com/rockchip-linux/kernel/commit/f8b9431ee38ed561650be7092ab93f564598daa9 [2] https://raw.githubusercontent.com/rockchip-linux/kernel/f8b9431ee38ed561650be7092ab93f564598daa9/arch/arm64/boot/dts/rockchip/rk3568.dtsi Suggested-by: Diederik de Haas Helped-by: Jonas Karlman Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/7e9ba70fd54a21d6f1f267df11e0acabff8d24e0.1719763100.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit 3573653dcf29a254a274b50f699af14e987b1925 Author: Marek Vasut Date: Sun Jun 30 05:48:42 2024 +0200 arm64: dts: rockchip: Drop ethernet-phy-ieee802.3-c22 from PHY compatible string on all RK3588 boards The rtl82xx DT bindings do not require ethernet-phy-ieee802.3-c22 as the fallback compatible string. There are fewer users of the Realtek PHY compatible string with fallback compatible string than there are users without fallback compatible string, so drop the fallback compatible string from the few remaining users: $ git grep -ho ethernet-phy-id001c....... | sort | uniq -c 1 ethernet-phy-id001c.c816", 2 ethernet-phy-id001c.c915", 2 ethernet-phy-id001c.c915"; 5 ethernet-phy-id001c.c916", 13 ethernet-phy-id001c.c916"; Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406290316.YvZdvLxu-lkp@intel.com/ Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240630034910.173552-2-marex@denx.de Signed-off-by: Heiko Stuebner commit 9d42c3ee3ce37cdad6f98c9e77bfbd0d791ac7da Author: Cristian Ciocaltea Date: Tue Jul 2 04:12:52 2024 +0300 arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu The iommu@fe043e00 on RK356x SoC shares the VOP power domain, but the power-domains property was not provided when the node has been added. The consequence is that an attempt to reload the rockchipdrm module will freeze the entire system. That is because on probe time, pm_runtime_get_suppliers() gets called for vop@fe040000, which blocks when pm_runtime_get_sync() is being invoked for iommu@fe043e00. Fix the issue by adding the missing property. Fixes: 9d6c6d978f97 ("arm64: dts: rockchip: rk356x: Add VOP2 nodes") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20240702-rk356x-fix-vop-mmu-v1-1-a66d1a0c45ea@collabora.com Signed-off-by: Heiko Stuebner commit d89e8096957e35742c9922d3f6628f24de0d6163 Author: Johan Jonker Date: Thu Jun 27 23:17:45 2024 +0200 dt-bindings: clock: rk3188-cru-common: remove CLK_NR_CLKS CLK_NR_CLKS should not be part of the binding. Remove since the kernel code no longer uses it. Signed-off-by: Johan Jonker Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/6f21c09b-e8d2-4749-aca6-572c79df775d@gmail.com Signed-off-by: Heiko Stuebner commit 9c29e5d7a2d1d91c29976c0c8aa7f42780e4a254 Author: Marek Vasut Date: Sun Jun 30 05:48:41 2024 +0200 ARM: dts: rockchip: Drop ethernet-phy-ieee802.3-c22 from PHY compatible string on edgeble-neu2 The rtl82xx DT bindings do not require ethernet-phy-ieee802.3-c22 as the fallback compatible string. There are fewer users of the Realtek PHY compatible string with fallback compatible string than there are users without fallback compatible string, so drop the fallback compatible string from the few remaining users: $ git grep -ho ethernet-phy-id001c....... | sort | uniq -c 1 ethernet-phy-id001c.c816", 2 ethernet-phy-id001c.c915", 2 ethernet-phy-id001c.c915"; 5 ethernet-phy-id001c.c916", 13 ethernet-phy-id001c.c916"; Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406290316.YvZdvLxu-lkp@intel.com/ Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240630034910.173552-1-marex@denx.de Signed-off-by: Heiko Stuebner commit fc800b84b41627f7c045b8efbb88931503828fa6 Merge: ecaec47b88d63 188d9cae54388 Author: Mark Brown Date: Thu Jul 4 18:41:11 2024 +0100 Add support for non-interleaved mode in qmc_audio Merge series from Herve Codina : The qmc_audio driver supports only audio in interleaved mode. Non-interleaved mode can be easily supported using several QMC channel per DAI. In that case, data related to ch0 are sent to (received from) the first QMC channel, data related to ch1 use the next QMC channel and so on up to the last channel. In terms of constraints and settings, the interleaved and non-interleaved modes are slightly different. In interleaved mode: - The sample size should fit in the number of time-slots available for the QMC channel. - The number of audio channels should fit in the number of time-slots (taking into account the sample size) available for the QMC channel. In non-interleaved mode: - The number of audio channels is the number of available QMC channels. - Each QMC channel should have the same number of time-slots. - The sample size equals the number of time-slots of one QMC channel. This series add support for the non-interleaved mode in the qmc_audio driver and is composed of the following parts: - Patches 1 and 2: Fix some issues in the qmc_audio - Patches 3 to 6: Prepare qmc_audio for the non-interleaved mode - Patches 7 and 8: Extend the QMC driver API - Patches 9 and 10: The support for non-interleaved mode itself Compared to the previous iteration, this v2 series mainly improves qmc_audio_access_is_interleaved(). commit ecaec47b88d63d9f83947038334a1c8096f378d5 Merge: cabf0b0cff07b 67820eb9f4895 Author: Mark Brown Date: Thu Jul 4 18:41:03 2024 +0100 ASoC: codecs: lpass-rx-macro: Few code cleanups Merge series from Krzysztof Kozlowski : Improve a bit the Qualcomm LPASS RX macro driver and align similar parts of code with LPASS WSA macro driver for consistency. No external dependencies. commit 2453e858e945e5e2fa8da9fde8584995e7dd17d1 Author: Paul Barker Date: Tue Jun 25 21:03:10 2024 +0100 pinctrl: renesas: rzg2l: Support output enable on RZ/G2L On the RZ/G2L SoC family, the direction of the Ethernet TXC/TX_CLK signal is selectable to support an Ethernet PHY operating in either MII or RGMII mode. By default, the signal is configured as an input and MII mode is supported. The ETH_MODE register can be modified to configure this signal as an output to support RGMII mode. As this signal is by default an input, and can optionally be switched to an output, it maps neatly onto an `output-enable` property in the device tree. Signed-off-by: Paul Barker Acked-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625200316.4282-4-paul.barker.ct@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a9024a323af2235a6d11cbbde924c6dde8bd355b Author: Paul Barker Date: Tue Jun 25 21:03:09 2024 +0100 pinctrl: renesas: rzg2l: Clean up and refactor OEN read/write functions The variable naming in the various OEN functions has been confusing. We were passing the _pin & bit variables from rzg2l_pinctrl_pinconf_get() and rzg2l_pinctrl_pinconf_set() as the offset & pin argument to the oen_read() and oen_write() functions. This doesn't make sense, the first of these isn't actually an offset and the second is not needed for RZ/V2H but leads to confusion with the bit variable used within these functions. To tidy this up, instead pass the _pin variable directly to the oen_read() and oen_write() functions with consistent naming. Then rzg3s_read_oen() and rzg3s_write_oen() can use macros to get the port and pin numbers it needs. Instead of passing the pin capabilities into oen_read() and oen_write(), check that the pin supports OEN before calling these functions. Also, merge rzg3s_oen_is_supported() into rzg3s_pin_to_oen_bit() to give a single translation function which returns an error if the pin doesn't support OEN. While we're here, remove an unnecessary branch and clarify the variable naming. Lastly, check that we are not dealing with a dedicated pin before calling RZG2L_PIN_ID_TO_{PORT,PIN}(). Signed-off-by: Paul Barker Acked-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625200316.4282-3-paul.barker.ct@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 07dd08c39eb4b645a0e2f2440a54326b49944705 Author: Paul Barker Date: Tue Jun 25 21:03:08 2024 +0100 pinctrl: renesas: rzg2l: Clarify OEN read/write support We currently support OEN read/write for the RZ/G3S SoC but not the RZ/G2L SoC family (consisting of RZ/G2L, RZ/G2LC, RZ/G2UL, RZ/V2L & RZ/Five). The appropriate functions are renamed to clarify this and to match the callback names. We should also only set the oen_read and oen_write function pointers for the devices which support these operations. This requires us to check that these function pointers are valid before calling them. Signed-off-by: Paul Barker Acked-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625200316.4282-2-paul.barker.ct@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7829b376f2a9ff1343e855551e0d9e0b87a52d93 Merge: aa77b11280161 0e1a4d427f58b Author: Jakub Kicinski Date: Thu Jul 4 10:19:25 2024 -0700 Merge branch 'crypto-caam-unembed-net_dev' Breno Leitao says: ==================== crypto: caam: Unembed net_dev This will un-embed the net_device struct from inside other struct, so we can add flexible array into net_device. This also enable COMPILE test for FSL_CAAM, as any config option that depends on ARCH_LAYERSCAPE. ==================== Link: https://patch.msgid.link/20240702185557.3699991-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 0e1a4d427f58b843864d835ccb79c32a118c6a77 Author: Breno Leitao Date: Tue Jul 2 11:55:54 2024 -0700 crypto: caam: Unembed net_dev structure in dpaa2 Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_devices from struct dpaa2_caam_priv_per_cpu by converting them into pointers, and allocating them dynamically. Use the leverage alloc_netdev_dummy() to allocate the net_device object at dpaa2_dpseci_setup(). The free of the device occurs at dpaa2_dpseci_disable(). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240702185557.3699991-5-leitao@debian.org Signed-off-by: Jakub Kicinski commit 82c81e740defbe2cd9889ba76da15f99d7cba252 Author: Breno Leitao Date: Tue Jul 2 11:55:53 2024 -0700 crypto: caam: Unembed net_dev structure from qi Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_devices from struct caam_qi_pcpu_priv by converting them into pointers, and allocating them dynamically. Use the leverage alloc_netdev_dummy() to allocate the net_device object at caam_qi_init(). The free of the device occurs at caam_qi_shutdown(). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240702185557.3699991-4-leitao@debian.org Signed-off-by: Jakub Kicinski commit beba3771d9e049dd552ce42a31f263e098392407 Author: Breno Leitao Date: Tue Jul 2 11:55:52 2024 -0700 crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST As most of the drivers that depend on ARCH_LAYERSCAPE, make CRYPTO_DEV_FSL_CAAM depend on COMPILE_TEST for compilation and testing. # grep -r depends.\*ARCH_LAYERSCAPE.\*COMPILE_TEST | wc -l 29 Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240702185557.3699991-3-leitao@debian.org Signed-off-by: Jakub Kicinski commit 9b5c33b1a3b7593c0e1d44d92c0093cc44e635fe Author: Breno Leitao Date: Tue Jul 2 11:55:51 2024 -0700 crypto: caam: Avoid unused imx8m_machine_match variable If caam module is built without OF support, the compiler returns the following warning: drivers/crypto/caam/ctrl.c:83:34: warning: 'imx8m_machine_match' defined but not used [-Wunused-const-variable=] imx8m_machine_match is only referenced by of_match_node(), which is set to NULL if CONFIG_OF is not set, as of commit 5762c20593b6b ("dt: Add empty of_match_node() macro"): #define of_match_node(_matches, _node) NULL Do not create imx8m_machine_match if CONFIG_OF is not set. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407011309.cpTuOGdg-lkp@intel.com/ Suggested-by: Jakub Kicinski Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240702185557.3699991-2-leitao@debian.org Signed-off-by: Jakub Kicinski commit 75c3d85083ff27bcaaa748cc3acf951f14d18ab6 Author: Krzysztof Kozlowski Date: Thu Jun 27 12:32:23 2024 +0200 dt-bindings: mfd: syscon: Add APM poweroff mailbox Add compatible for an already used syscon poweroff/mailbox block in APM. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240627-dt-bindings-mfd-syscon-split-v4-7-dc6699a9f3e4@linaro.org Signed-off-by: Lee Jones commit f97b0435c8572b16305d68cfc14ddc901878a9e7 Author: Krzysztof Kozlowski Date: Thu Jun 27 12:32:22 2024 +0200 dt-bindings: mfd: syscon: Split and enforce documenting MFD children Simple syscon nodes can be documented in common syscon.yaml, however devices with simple-mfd compatible, thus with some children, should have their own schema listing these children. Such listing makes the binding specific, allows better validation (so the incorrect child would not appear in the simple-mfd node) and actually enforces repeated rule for simple-mfd devices: "simple-mfd" is only for simple devices, where the children do not depend on the parent. Currently the syscon+simple-mfd binding is quite broad and allows any child or property, thus above rule cannot be enforced. Split the syscon.yaml binding into: 1. Common syscon properties, used potentially by many bindings. 2. Simple syscon devices (NO simple-mfd!). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240627-dt-bindings-mfd-syscon-split-v4-6-dc6699a9f3e4@linaro.org Signed-off-by: Lee Jones commit f11121314a6e4ac505233fb7ae777311fb45a6a3 Author: Cristian Ciocaltea Date: Sat Jun 22 00:57:19 2024 +0300 dt-bindings: mfd: rk817: Merge support for RK809 The Rockchip RK809 PMIC is compatible with RK817 and provides the same capabilities, except for the battery charger manager. There are also minor regulator related differences: BOOST and OTG_SWITCH are specific to RK817, while DCDC_REG5, SWITCH_REG1 and SWITCH_REG2 are provided RK809. The current binding for RK809 doesn't document the audio codec properties, although it has been already in use by several boards: rk3566-quartz64-b, k3566-roc-pc, rk3568-evb1-v10, rk3568-lubancat-2, rk3568-odroid-m1, rk3568-rock-3a. Therefore dtbs_check fails for all of them: DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb rk3568-rock-3a.dtb: pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks', 'clock-names', 'clocks', 'codec' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml# Additionally, the example in rockchip,rk809 binding is not able to actually test the schema since it uses a wrong compatible 'rockchip,rk808' instead of the expected 'rockchip,rk809'. Instead of duplicating even more content, merge the RK809 support into the more inclusive RK817 schema and drop the now obsolete rockchip,rk809 related file. Fixes: 6c38ca03406e ("dt-bindings: mfd: rk808: Convert bindings to yaml") Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-2-c0db420d3639@collabora.com Signed-off-by: Lee Jones commit e7865de24e8d83b4f12bbca8be2f9d5de464b5fa Author: Cristian Ciocaltea Date: Sat Jun 22 00:57:18 2024 +0300 dt-bindings: mfd: rk817: Fixup clocks and reference dai-common Ensure 'clocks' property does not allow more than one item and add the missing reference to dai-common schema. While at it, move 'clocks*' and '#sound-dai-cells' properties to keep the list ordered alphabetically. Additionally, drop all useless/redundant descriptions. Fixes: 6c38ca03406e ("dt-bindings: mfd: rk808: Convert bindings to yaml") Signed-off-by: Cristian Ciocaltea Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-1-c0db420d3639@collabora.com Signed-off-by: Lee Jones commit 279322ad683153cbcce27d73aab6031648cbf2a3 Author: Bryan Brattlof Date: Fri Jun 21 11:39:39 2024 -0500 dt-bindings: mfd: syscon: Add TI's opp table compatible The JTAG_USER_ID_USERCODE efuse address, which is located inside the WKUP_CTRL_MMR0 range holds information to identify the speed grades of various components on TI's K3 SoCs. Add a compatible to allow the cpufreq driver to obtain the data to limit the maximum frequency for the CPUs under Linux control. Signed-off-by: Bryan Brattlof Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240621-ti-opp-updates-v3-3-d857be6dac8b@ti.com Signed-off-by: Lee Jones commit 40176714c818b0b6a2ca8213cdb7654fbd49b742 Author: Javier Carrasco Date: Wed Jun 26 21:37:03 2024 +0200 mfd: omap-usb-tll: Use struct_size to allocate tll Commit 16c2004d9e4d ("mfd: omap-usb-tll: Allocate driver data at once") changed the memory allocation of 'tll' to consolidate it into a single allocation, introducing an incorrect size calculation. In particular, the allocation for the array of pointers was converted into a single-pointer allocation. The memory allocation used to occur in two steps: tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL); tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch, GFP_KERNEL); And it turned that into the following allocation: tll = devm_kzalloc(dev, sizeof(*tll) + sizeof(tll->ch_clk[nch]), GFP_KERNEL); sizeof(tll->ch_clk[nch]) returns the size of a single pointer instead of the expected nch pointers. This bug went unnoticed because the allocation size was small enough to fit within the minimum size of a memory allocation for this particular case [1]. The complete allocation can still be done at once with the struct_size macro, which comes in handy for structures with a trailing flexible array. Fix the memory allocation to obtain the original size again. Link: https://lore.kernel.org/all/202406261121.2FFD65647@keescook/ [1] Fixes: 16c2004d9e4d ("mfd: omap-usb-tll: Allocate driver data at once") Reviewed-by: Kees Cook Signed-off-by: Javier Carrasco Fixes: commit 16c2004d9e4d ("mfd: omap-usb-tll: Allocate driver data at once") Link: https://lore.kernel.org/r/20240626-omap-usb-tll-counted_by-v2-1-4bedf20d1b51@gmail.com Signed-off-by: Lee Jones commit b0a5cde57cf14383205ed147bb51320372b8c113 Author: Krzysztof Kozlowski Date: Sun Jun 23 15:46:00 2024 +0200 dt-bindings: mfd: Explain lack of child dependency in simple-mfd Common mistake of usage of 'simple-mfd' compatible is a dependency of children on resources acquired and managed by the parent, e.g. clocks. Extend the simple-mfd documentation to cover this case. Cc: Linus Walleij Cc: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240623134600.115098-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 1d845319dc819c39e2ee568f1c6bd0cdb2fbc035 Author: Etienne Carriere Date: Mon Jun 17 11:20:16 2024 +0200 dt-bindings: mfd: Dual licensing for st,stpmic1 bindings Change include/dt-bindings/mfd/st,stpmic1.h license model from GPLv2.0 only to dual GPLv2.0 or BSD-2-Clause. I have every legitimacy to request this change on behalf of STMicroelectronics. This change clarifies that this DT binding header file can be shared with software components as bootloaders and OSes that are not published under GPLv2 terms. In CC are all the contributors to this header file. Cc: Pascal Paillet Cc: Lee Jones Cc: Rob Herring Signed-off-by: Etienne Carriere Acked-by: Rob Herring (Arm) Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240617092016.2958046-1-etienne.carriere@foss.st.com Signed-off-by: Lee Jones commit fa0c3667d0bf41442927f79d4453b52a265ab601 Author: Javier Carrasco Date: Thu Jun 20 23:22:33 2024 +0200 mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by Use the __counted_by compiler attribute for the "struct clk *ch_clk[]" flexible array member to improve the results of array bound sanitizers. The comments for the variables are no longer needed as it is now clear what is what. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240620-omap-usb-tll-counted_by-v1-1-77797834bb9a@gmail.com Signed-off-by: Lee Jones commit 6b10f1c581f302b12bdd77d06038984a0709e0b0 Author: Yang Li Date: Tue Jun 18 09:18:54 2024 +0800 mfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode() Abaci Robot reports: drivers/mfd/tps6594-core.c:516:2-3: Unneeded semicolon Let's remove it. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9346 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20240618011854.109426-1-yang.lee@linux.alibaba.com Signed-off-by: Lee Jones commit d7636117ca976e217b6452c082e7f7c041f4019c Author: Andy Shevchenko Date: Wed Jun 5 22:14:16 2024 +0300 mfd: lm3533: Move to new GPIO descriptor-based APIs Legacy GPIO APIs are subject to remove. Convert the driver to new APIs. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240605191458.2536819-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 13c151a919a876521c16810756764aa38683eb62 Author: Andrew Davis Date: Thu Jun 13 12:54:30 2024 -0500 mfd: tps65912: Use devm helper functions to simplify probe This simplifies probe and also allows us to remove the remove callbacks from the core and interface drivers. Do that here. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240613175430.57698-1-afd@ti.com Signed-off-by: Lee Jones commit 0ddabc8c6e80d06b02794d818a36d7b6c16d4c66 Author: Krzysztof Kozlowski Date: Thu Jun 6 16:24:57 2024 +0200 mfd: madera: Simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240606142457.130553-2-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit a49d9bae9cbd650137df9f6ae043389199b47137 Author: Krzysztof Kozlowski Date: Thu Jun 6 16:24:56 2024 +0200 mfd: arizona: Simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240606142457.130553-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 7b28133dd63681164d87ea2a97e27cd2f9f692fb Author: Krzysztof Kozlowski Date: Thu Jun 6 16:36:48 2024 +0200 mfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning (again) 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: wm8994-core.c:625:17: error: cast to smaller integer type 'enum wm8994_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240606143648.152668-3-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 105d4b4a36d8d5872da77d8c3e0855b86fcc6c8c Author: Krzysztof Kozlowski Date: Thu Jun 6 16:36:47 2024 +0200 mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again) 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: mxs-lradc.c:140:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240606143648.152668-2-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 81c8920d46d449bec93c20b5083365a7cf2561aa Author: Krzysztof Kozlowski Date: Thu Jun 6 16:36:46 2024 +0200 mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again) 'type' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: max14577.c:400:23: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Year ago this was solved, although LKML discussion suggested warning is not suitable for kernel. Nothing changed in this regard for a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240606143648.152668-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 5fed47abb330818534a5a0d969f6634e5bd225d8 Author: Jeff Johnson Date: Sun Jun 9 19:21:28 2024 -0700 mfd: Add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/arizona.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/pcf50633-gpio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/timberdale.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/ssbi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/rt4831.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/intel_soc_pmic_bxtwc.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes mfd-core.c and vexpress-sysreg.c which, although they did not produce a warning with the x86 allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Reviewed-by: Charles Keepax Acked-by: Liviu Dudau Acked-by: Andy Shevchenko # for Intel Broxton PMIC Link: https://lore.kernel.org/r/20240609-md-drivers-mfd-v1-1-47cdd0b394e9@quicinc.com Signed-off-by: Lee Jones commit d502645bc839ecff7837efd65928e085225dfce2 Author: Jeff Johnson Date: Mon Jun 3 17:05:44 2024 -0700 mfd: qcom-pm8008: Add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/qcom-pm8008.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240603-md-drivers-mfd-qcom-v1-1-88e48013eccc@quicinc.com Signed-off-by: Lee Jones commit 4c4ade1aba55ca90b49c59dd229a952b1610775b Author: Rob Herring (Arm) Date: Mon Jun 3 08:12:27 2024 -0500 dt-bindings: mfd: syscon: Add more simple compatibles Add another batch of various "simple" syscon compatibles which were undocumented or still documented with old text bindings. Remove the old text binding docs for the ones which were documented. Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Acked-by: Stephen Boyd Acked-by: Krzysztof Kozlowski Reviewed-by: Miquel Raynal # mtd Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240603131230.136196-2-robh@kernel.org Signed-off-by: Lee Jones commit 9cc3b409beeeb8ffaed8adde43160645686eef41 Author: Ilpo Järvinen Date: Fri May 31 17:25:05 2024 +0300 mfd: intel-lpss: Rename SPI intel_lpss_platform_info structs The driver has intel_lpss_platform_info structs for I2C, SPI, and UART. The I2C and UART structs are named with "i2c" and "uart" in the variable name, whereas SPI ones do not mention "spi". Rename the SPI related info structs to include "spi" in their names for consistency and to make it obvious in the device ID list what kind of device the line relates to. Signed-off-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531142505.1888-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Lee Jones commit 51e3b257099d10a87de58f1d40fe0b9641bd1f0e Author: Andy Shevchenko Date: Thu May 30 14:51:47 2024 +0300 mfd: core: Make use of device_set_node() Use device_set_node() instead of assigning pdev->dev.of_node directly because it also sets the firmware node. Signed-off-by: Andy Shevchenko Reviewed-by: Herve Codina Link: https://lore.kernel.org/r/20240530115147.1112498-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 316b8ab386d1fdcc0f515ece6c4bd5a5f3d9449e Author: AngeloGioacchino Del Regno Date: Thu May 30 11:34:09 2024 +0200 mfd: mt6397-core: Add support for AUXADCs on MT6357/58/59 PMICs Add the relevant AUXADC driver entries to the MFD cells of the MT6357, MT6358, MT6359 PMICs to support their Auxiliary ADCs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240530093410.112716-4-angelogioacchino.delregno@collabora.com Signed-off-by: Lee Jones commit 5bbd03db27826b562caad1c9b53576a5a78a2bad Author: Konrad Dybcio Date: Wed May 29 13:17:17 2024 +0200 dt-bindings: mfd: qcom,spmi-pmic: Document PMC8380 These are just some more PMICs adjacent to X1 SoCs. Document them. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240529-topic-x1e_pmic-v1-1-9de0506179eb@linaro.org Signed-off-by: Lee Jones commit c879a8c39dd55e7fabdd8d13341f7bc5200db377 Author: Arnd Bergmann Date: Wed May 29 11:48:47 2024 +0200 mfd: rsmu: Split core code into separate module Linking a file into two modules can have unintended side-effects and produces a W=1 warning: scripts/Makefile.build:236: drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi Make this one a separate module instead. Fixes: a1867f85e06e ("mfd: Add Renesas Synchronization Management Unit (SMU) support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240529094856.1869543-1-arnd@kernel.org Signed-off-by: Lee Jones commit 6ca6a63e9639c82d4e3863e0e26bf431a55ee5cb Author: Thomas Weißschuh Date: Wed May 29 08:27:13 2024 +0200 mfd: cros_ec: Register hardware monitoring subdevice Add ChromeOS EC-based hardware monitoring as EC subdevice. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-3-5cdf0c5db50a@weissschuh.net Signed-off-by: Lee Jones commit 555b5fcdb8443dd1fe9e82545f2ec27eedf89f8d Author: Thomas Weißschuh Date: Tue May 28 22:04:12 2024 +0200 mfd: cros_ec: Register charge control subdevice Add ChromeOS EC-based charge control as EC subdevice. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240528-cros_ec-charge-control-v2-3-81fb27e1cff4@weissschuh.net Signed-off-by: Lee Jones commit b5f743b122141b14c1b170f3fe749382efa7c867 Author: Abel Vesa Date: Mon May 27 10:02:03 2024 +0300 dt-bindings: mfd: qcom-spmi-pmic: Document SMB2360 PMIC Add bindings for SMB2360 PMIC. This PMIC is found in boards like X1 Elite CRD and QCP. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240527-smb2360-bindings-mfd-qcom-spmi-pmic-v1-1-31a2c051529c@linaro.org Signed-off-by: Lee Jones commit ddeeca130059e2cb246e5f996c38fd9c4074f769 Author: Hans de Goede Date: Mon May 27 13:49:50 2024 +0200 mfd: intel_soc_pmic_crc: Use PWM_LOOKUP_WITH_MODULE() for the PWM lookup The primary use of the CRC PMIC's PWM is for LCD panel backlight control by the i915 driver. Due to its complexity the probe() function of the i915 driver does not support -EPROBE_DEFER handling. So far the pwm-crc driver must be built into the kernel to ensure that the pwm_get() done by the i915 driver succeeds at once (rather then returning -EPROBE_DEFER). But the PWM core can load the module from pwm_get() if a module-name is provided in the pwm_lookup associated with the consumer device. Switch to using PWM_LOOKUP_WITH_MODULE() for the lookup added for the Intel integrated GPU, so that the PWM core can load the module from pwm_get() as needed allowing the pwm-crc driver to be safely built as module. This has been successfully tested on an Asus T100TAM with pwm-crc build as a module. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11081 Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240527114950.326659-1-hdegoede@redhat.com Signed-off-by: Lee Jones commit bd1ae9bbc49de21dd7ad017de7925bf51862f06d Author: Krzysztof Kozlowski Date: Sat May 18 23:11:56 2024 +0200 dt-bindings: mfd: mediatek,mt8195-scpsys: Add mediatek,mt8365-scpsys Add a new mediatek,mt8365-scpsys compatible, for the SCPSYS syscon block having power controller. Previously the DTS was re-using SYSCFG compatible, but that does not seem right, because SYSCFG does not have children. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240518211159.142920-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones commit 0577ca9750d4a5038dceb9a470c709cc37f2a51f Author: AngeloGioacchino Del Regno Date: Mon May 27 11:39:04 2024 +0200 dt-bindings: mfd: mediatek,mt8195-scpsys: Add support for MT8188 Add a compatible string for the scpsys block found in the MediaTek MT8188 SoC. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240527093908.97574-2-angelogioacchino.delregno@collabora.com Signed-off-by: Lee Jones commit 8aa950491d97d626dff95ef838ed750490d54a30 Author: Aradhya Bhatia Date: Sun May 12 20:08:24 2024 +0530 dt-bindings: mfd: syscon: Add ti,am625-dss-oldi-io-ctrl compatible Add TI DSS OLDI-IO control registers compatible for AM625 DSS. This is a region of 10 32bit registers found in the TI AM625 CTRL_MMR0 register space[0]. They are used to control the characteristics of the OLDI DATA/CLK IO as needed by the OLDI TXes controller node. [0]: https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Aradhya Bhatia Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240512143824.1862290-1-a-bhatia1@ti.com Signed-off-by: Lee Jones commit 5e9ea43c63ffadec2cd906fab169be94ebc9e0a8 Author: Uwe Kleine-König Date: Fri May 10 23:10:11 2024 +0200 mfd: 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240510211011.2273978-2-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 93411db51826197b3e2d1827feded19ba47ebfc9 Author: Andy Shevchenko Date: Wed May 8 14:40:33 2024 +0300 mfd: menelaus: Remove unused linux/gpio.h linux/gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240508114033.952578-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 22ff67ad8c3b792591b45fa14dc72d400114509b Author: Andy Shevchenko Date: Wed May 8 14:43:21 2024 +0300 mfd: omap-usb-host: Remove unused linux/gpio.h linux/gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240508114321.964374-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 326ae03d772de6e082d346466671c3b66de2962d Author: Simon Horman Date: Tue May 7 17:53:56 2024 +0100 mfd: idt8a340_reg: Start comments with '/*' Several comments in idt8a340_reg.h start with '/**', which denotes the start of a Kernel doc, but are otherwise not Kernel docs. Resolve this conflict by starting these comments with '/*' instead. Flagged by ./scripts/kernel-doc -none Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20240507-clockmatrix-kernel-doc-v2-1-3138d74192dd@kernel.org Signed-off-by: Lee Jones commit f1c6a7e0f07f54718f8cbf9f30ecd2cca9df7334 Merge: 2a2ca717cee53 35d6b98c62586 Author: Lee Jones Date: Thu Jul 4 17:07:34 2024 +0100 Merge branch 'ib-mfd-soc-samsung-6.11' into ibs-for-mfd-merged commit 2a2ca717cee531788a0e0cbbe71bd0fea5038ff1 Merge: 04f3893327094 fcf1f960a6aa4 Author: Lee Jones Date: Thu Jul 4 17:07:26 2024 +0100 Merge branch 'ib-mfd-regulator-watchdog-6.11' into ibs-for-mfd-merged commit 04f3893327094fa6b3b4bea64627d4e73518447d Merge: 5ffe70d81e08c 11d861d227ed1 Author: Lee Jones Date: Thu Jul 4 17:07:21 2024 +0100 Merge branch 'ib-mfd-regulator-pm8008-6.11' into ibs-for-mfd-merged commit 5ffe70d81e08cc101e9d609f69fd587e2bed4b8c Merge: f5ace55524395 970c3a6b7aa3c Author: Lee Jones Date: Thu Jul 4 17:07:01 2024 +0100 Merge branch 'ib-mfd-leds-platform-6.11' into ibs-for-mfd-merged commit f5ace555243953d12031679712e8594a40873ed0 Merge: 2d21e9745f7b7 f53d3efa366b1 Author: Lee Jones Date: Thu Jul 4 17:06:42 2024 +0100 Merge branch 'ib-mfd-input-regulator-6.11' into ibs-for-mfd-merged commit 2d21e9745f7b76fa32f941aa9df876b8c4bda1ca Merge: ecad8fb868aad c486def5b3ba6 Author: Lee Jones Date: Thu Jul 4 17:06:36 2024 +0100 Merge branch 'ib-mfd-firmware-input-sound-soc-6.11' into ibs-for-mfd-merged commit ecad8fb868aad03a3caf1d6e03a6a55fdd93370a Merge: b107093f433c3 174614d889a23 Author: Lee Jones Date: Thu Jul 4 17:06:22 2024 +0100 Merge branch 'ib-mfd-dt-soc-6.11' into ibs-for-mfd-merged commit 9dfd8d92f7b19ba8eaf5391380a923396f8a9dd0 Author: Garrett Giordano Date: Wed Jun 26 12:14:38 2024 -0700 remoteproc: k3-dsp: Fix log levels where appropriate Driver was logging information as errors. Changed dev_err to dev_dbg where appropriate. Signed-off-by: Garrett Giordano Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20240626191438.490524-1-ggiordano@phytec.com Signed-off-by: Mathieu Poirier commit bca4b02ef92e0652d07e39c1f16f40aee800dafe Author: Tanmay Shah Date: Thu Jun 27 10:29:38 2024 -0700 remoteproc: xlnx: Add attach detach support It is possible that remote processor is already running before linux boot or remoteproc platform driver probe. Implement required remoteproc framework ops to provide resource table address and connect or disconnect with remote processor in such case. Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20240627172936.227439-1-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit 1df5aa3754cac2045998ca505edb84d994786c67 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:12 2024 +0200 backlight: sky81452-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-18-tzimmermann@suse.de Signed-off-by: Lee Jones commit 22f8a85ef0c563ba7e53d9ece39c1f2dc99f53ed Author: Thomas Zimmermann Date: Mon Jun 24 17:20:11 2024 +0200 backlight: rave-sp-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-17-tzimmermann@suse.de Signed-off-by: Lee Jones commit eb1c4b6ddde6867498ead8d4b92d6abb5f736a7d Author: Thomas Zimmermann Date: Mon Jun 24 17:20:10 2024 +0200 backlight: pwm-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-16-tzimmermann@suse.de Signed-off-by: Lee Jones commit eca6b3ddfc554a9a51795cf035ccd60f2d842074 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:09 2024 +0200 backlight: pcf50633-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-15-tzimmermann@suse.de Signed-off-by: Lee Jones commit d4db2f193490415386ee13f714a0940943cbb149 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:08 2024 +0200 backlight: pandora-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-14-tzimmermann@suse.de Signed-off-by: Lee Jones commit c2d9c4934bf4e12b531312bbf02a8543f6a23aae Author: Thomas Zimmermann Date: Mon Jun 24 17:20:07 2024 +0200 backlight: mp3309c: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-13-tzimmermann@suse.de Signed-off-by: Lee Jones commit 761c83910b3d10e731b03438b883d271c295a9a5 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:06 2024 +0200 backlight: lm3533-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-12-tzimmermann@suse.de Signed-off-by: Lee Jones commit 814d3e820039348f1467ada9a8a812c0b80733de Author: Thomas Zimmermann Date: Mon Jun 24 17:20:05 2024 +0200 backlight: led-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-11-tzimmermann@suse.de Signed-off-by: Lee Jones commit def5831f09db8937218be50fc652d20c0a68e417 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:04 2024 +0200 backlight: ktd253-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-10-tzimmermann@suse.de Signed-off-by: Lee Jones commit cebc25971f7f988dfd4d6c7269deea4c1ca5898e Author: Thomas Zimmermann Date: Mon Jun 24 17:20:03 2024 +0200 backlight: kb3886-bl: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-9-tzimmermann@suse.de Signed-off-by: Lee Jones commit 6910d19bb861db0721a171f4e351c290a40f1d19 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:02 2024 +0200 backlight: journada_bl: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-8-tzimmermann@suse.de Signed-off-by: Lee Jones commit b6675c59473a26dec33281e4e872cf09f6321523 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:01 2024 +0200 backlight: ipaq-micro-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-7-tzimmermann@suse.de Signed-off-by: Lee Jones commit ef51815c5f970b228a775ceb3bb06ce46fe9ff86 Author: Thomas Zimmermann Date: Mon Jun 24 17:20:00 2024 +0200 backlight: gpio-backlight: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-6-tzimmermann@suse.de Signed-off-by: Lee Jones commit e263c051910190feba884179aef15e548273a7aa Author: Thomas Zimmermann Date: Mon Jun 24 17:19:59 2024 +0200 backlight: corgi-lcd: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Only change the driver's backlight device, but leave the LCD device as-is. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-5-tzimmermann@suse.de Signed-off-by: Lee Jones commit 1adf98242e0ec33f15c4f7a1e86ad76abf209665 Author: Thomas Zimmermann Date: Mon Jun 24 17:19:58 2024 +0200 backlight: ams369fb06: Use backlight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-4-tzimmermann@suse.de Signed-off-by: Lee Jones commit 26dcf62333f1c1ec33a469339a287ab8eecfb06e Author: Thomas Zimmermann Date: Mon Jun 24 17:19:57 2024 +0200 backlight: aat2870-backlight: Use blacklight power constants Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-3-tzimmermann@suse.de Signed-off-by: Lee Jones commit a1cacb8a8e70c38ec0c78910c668abda99fcb780 Author: Thomas Zimmermann Date: Mon Jun 24 17:19:56 2024 +0200 backlight: Add BACKLIGHT_POWER_ constants for power states Duplicate FB_BLANK_ constants as BACKLIGHT_POWER__ constants in the backlight header file. Allows backlight drivers to avoid including the fbdev header file and removes a compile-time dependency between the two subsystems. The new BACKLIGHT_POWER_ constants have the same values as their FB_BLANK_ counterparts. Hence UAPI and internal semantics do not change. The backlight drivers can be converted one by one. Each instance of FB_BLANK_UNBLANK becomes BACKLIGHT_POWER_ON, each of FB_BLANK_POWERDOWN becomes BACKLIGHT_POWER_OFF, and FB_BLANK_NORMAL becomes BACKLIGHT_POWER_REDUCED. Backlight code or drivers do not use FB_BLANK_VSYNC_SUSPEND and FB_BLANK_HSYNC_SUSPEND, so no new constants for these are being added. The semantics of FB_BLANK_NORMAL appear inconsistent. In fbdev, NORMAL means display off with sync enabled. In backlight code, this translates to turn the backlight off, but some drivers interpret it as backlight on. So we keep the current code as is, but mark BACKLIGHT_POWER_REDUCED as deprecated. Drivers should be fixed and the constant removed. This affects ams369fg06 and a few DRM panel drivers. v2: - rename BL_CORE_ power constants to BACKLIGHT_POWER_ (Sam) - fix documentation Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240624152033.25016-2-tzimmermann@suse.de Signed-off-by: Lee Jones commit 8eac0379d3bd9d048b1144d74d9309a198fd3f40 Author: Christian Marangi Date: Thu Jun 27 00:15:12 2024 +0200 leds: leds-lp5523: Convert to sysfs_emit API Convert sprintf to the much safer sysfs_emit API to handle output for sysfs. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626221520.2846-2-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 6f2fdde9096f3c4d35a7711c91a78c086be66aed Author: Christian Marangi Date: Thu Jun 27 00:15:11 2024 +0200 leds: leds-lp5569: Convert to sysfs_emit API Convert sprintf to the much safer sysfs_emit API to handle output for sysfs. Also better handle situation where on the same chip there may be LED open and shorted at the same time. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626221520.2846-1-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit f5a4af3c752704272e9094466e66e21d4ee4e414 Author: Liu Wei Date: Tue Jun 25 11:05:04 2024 +0800 ACPI: Add acpi=nospcr to disable ACPI SPCR as default console on ARM64 For varying privacy and security reasons, sometimes we would like to completely silence the _serial_ console, and only enable it when needed. But there are many existing systems that depend on this _serial_ console, so add acpi=nospcr to disable console in ACPI SPCR table as default _serial_ console. Signed-off-by: Liu Wei Suggested-by: Prarit Bhargava Suggested-by: Will Deacon Suggested-by: Andrew Lunn Reviewed-by: Hanjun Guo Reviewed-by: Prarit Bhargava Link: https://lore.kernel.org/r/20240625030504.58025-1-liuwei09@cestc.cn Signed-off-by: Catalin Marinas commit cabf0b0cff07bc8d6e80ab6a8f8a127a2708147b Author: Shenghao Ding Date: Thu Jul 4 17:49:37 2024 +0800 ASoc: tas2781: Set "Speaker Force Firmware Load" as the common kcontrol for both tas27871 and tas2563 Set "Speaker Force Firmware Load" as the common kcontrol for both tas27871 and tas2563 and move it into newly-created tasdevice_snd_controls, and keep the digital gain and analog gain in tas2781_snd_controls. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240704094939.1824-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit e269d79c7d35aa3808b1f3c1737d63dab504ddc8 Author: Denis Arefev Date: Thu Jun 13 12:54:48 2024 +0300 net: missing check virtio Two missing check in virtio_net_hdr_to_skb() allowed syzbot to crash kernels again 1. After the skb_segment function the buffer may become non-linear (nr_frags != 0), but since the SKBTX_SHARED_FRAG flag is not set anywhere the __skb_linearize function will not be executed, then the buffer will remain non-linear. Then the condition (offset >= skb_headlen(skb)) becomes true, which causes WARN_ON_ONCE in skb_checksum_help. 2. The struct sk_buff and struct virtio_net_hdr members must be mathematically related. (gso_size) must be greater than (needed) otherwise WARN_ON_ONCE. (remainder) must be greater than (needed) otherwise WARN_ON_ONCE. (remainder) may be 0 if division is without remainder. offset+2 (4191) > skb_headlen() (1116) WARNING: CPU: 1 PID: 5084 at net/core/dev.c:3303 skb_checksum_help+0x5e2/0x740 net/core/dev.c:3303 Modules linked in: CPU: 1 PID: 5084 Comm: syz-executor336 Not tainted 6.7.0-rc3-syzkaller-00014-gdf60cee26a2e #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:skb_checksum_help+0x5e2/0x740 net/core/dev.c:3303 Code: 89 e8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 52 01 00 00 44 89 e2 2b 53 74 4c 89 ee 48 c7 c7 40 57 e9 8b e8 af 8f dd f8 90 <0f> 0b 90 90 e9 87 fe ff ff e8 40 0f 6e f9 e9 4b fa ff ff 48 89 ef RSP: 0018:ffffc90003a9f338 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff888025125780 RCX: ffffffff814db209 RDX: ffff888015393b80 RSI: ffffffff814db216 RDI: 0000000000000001 RBP: ffff8880251257f4 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 000000000000045c R13: 000000000000105f R14: ffff8880251257f0 R15: 000000000000105d FS: 0000555555c24380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000f000 CR3: 0000000023151000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ip_do_fragment+0xa1b/0x18b0 net/ipv4/ip_output.c:777 ip_fragment.constprop.0+0x161/0x230 net/ipv4/ip_output.c:584 ip_finish_output_gso net/ipv4/ip_output.c:286 [inline] __ip_finish_output net/ipv4/ip_output.c:308 [inline] __ip_finish_output+0x49c/0x650 net/ipv4/ip_output.c:295 ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x13b/0x2a0 net/ipv4/ip_output.c:433 dst_output include/net/dst.h:451 [inline] ip_local_out+0xaf/0x1a0 net/ipv4/ip_output.c:129 iptunnel_xmit+0x5b4/0x9b0 net/ipv4/ip_tunnel_core.c:82 ipip6_tunnel_xmit net/ipv6/sit.c:1034 [inline] sit_tunnel_xmit+0xed2/0x28f0 net/ipv6/sit.c:1076 __netdev_start_xmit include/linux/netdevice.h:4940 [inline] netdev_start_xmit include/linux/netdevice.h:4954 [inline] xmit_one net/core/dev.c:3545 [inline] dev_hard_start_xmit+0x13d/0x6d0 net/core/dev.c:3561 __dev_queue_xmit+0x7c1/0x3d60 net/core/dev.c:4346 dev_queue_xmit include/linux/netdevice.h:3134 [inline] packet_xmit+0x257/0x380 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3087 [inline] packet_sendmsg+0x24ca/0x5240 net/packet/af_packet.c:3119 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 __sys_sendto+0x255/0x340 net/socket.c:2190 __do_sys_sendto net/socket.c:2202 [inline] __se_sys_sendto net/socket.c:2198 [inline] __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2198 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Found by Linux Verification Center (linuxtesting.org) with Syzkaller Fixes: 0f6925b3e8da ("virtio_net: Do not pull payload in skb->head") Signed-off-by: Denis Arefev Message-Id: <20240613095448.27118-1-arefev@swemel.ru> Signed-off-by: Michael S. Tsirkin commit ede9c33ec568eed53f8f6bb42ed1d04af712cf02 Author: Yunseong Kim Date: Tue Jun 25 02:49:06 2024 +0900 tools/virtio: creating pipe assertion in vringh_test parallel_test() function in vringh_test needs to verify the creation of the guest/host pipe. Signed-off-by: Yunseong Kim Message-Id: <20240624174905.27980-2-yskelg@gmail.com> Signed-off-by: Michael S. Tsirkin commit 840b2d39a2dc1b96deb3f5c7fef76c9b24f08f51 Author: Xuan Zhuo Date: Thu Jun 6 19:13:45 2024 +0800 virtio_ring: fix KMSAN error for premapped mode Add kmsan for virtqueue_dma_map_single_attrs to fix: BUG: KMSAN: uninit-value in receive_buf+0x45ca/0x6990 receive_buf+0x45ca/0x6990 virtnet_poll+0x17e0/0x3130 net_rx_action+0x832/0x26e0 handle_softirqs+0x330/0x10f0 [...] Uninit was created at: __alloc_pages_noprof+0x62a/0xe60 alloc_pages_noprof+0x392/0x830 skb_page_frag_refill+0x21a/0x5c0 virtnet_rq_alloc+0x50/0x1500 try_fill_recv+0x372/0x54c0 virtnet_open+0x210/0xbe0 __dev_open+0x56e/0x920 __dev_change_flags+0x39c/0x2000 dev_change_flags+0xaa/0x200 do_setlink+0x197a/0x7420 rtnl_setlink+0x77c/0x860 [...] Signed-off-by: Xuan Zhuo Tested-by: Alexander Potapenko Message-Id: <20240606111345.93600-1-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin Tested-by: Ilya Leoshkevich # s390x Acked-by: Jason Wang commit 1e1fdcbdde3b7663e5d8faeb2245b9b151417d22 Author: Michael S. Tsirkin Date: Mon Apr 22 10:03:13 2024 -0400 vhost/vsock: always initialize seqpacket_allow There are two issues around seqpacket_allow: 1. seqpacket_allow is not initialized when socket is created. Thus if features are never set, it will be read uninitialized. 2. if VIRTIO_VSOCK_F_SEQPACKET is set and then cleared, then seqpacket_allow will not be cleared appropriately (existing apps I know about don't usually do this but it's legal and there's no way to be sure no one relies on this). To fix: - initialize seqpacket_allow after allocation - set it unconditionally in set_features Reported-by: syzbot+6c21aeb59d0e82eb2782@syzkaller.appspotmail.com Reported-by: Jeongjun Park Fixes: ced7b713711f ("vhost/vsock: support SEQPACKET for transport"). Tested-by: Arseny Krasnov Cc: David S. Miller Cc: Stefan Hajnoczi Message-ID: <20240422100010-mutt-send-email-mst@kernel.org> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella Reviewed-by: Eugenio Pérez Acked-by: Jakub Kicinski commit 8d42877ad65b02741c9099392a001b7209baa5d4 Author: Christian Brauner Date: Thu Jul 4 17:00:19 2024 +0200 fs: only copy to userspace on success in listmount() Avoid copying when we failed to, or didn't have any mounts to list. Fixes: cb54ef4f050e ("fs: don't copy to userspace under namespace semaphore") # mainline only Signed-off-by: Christian Brauner commit 30e7c6cc88b044a7f89636dd55e9eb6b5a666b14 Author: Abel Vesa Date: Wed Jun 5 11:19:01 2024 +0300 dt-bindings: PCI: qcom: x1e80100: Make the MHI reg region mandatory All PCIe controllers found on X1E80100 have MHI register region. So change the schema to reflect that. Fixes: 692eadd51698 ("dt-bindings: PCI: qcom: Document the X1E80100 PCIe Controller") Link: https://lore.kernel.org/linux-pci/20240605-x1e80100-pci-bindings-fix-v2-1-c465e87966fc@linaro.org Signed-off-by: Abel Vesa Signed-off-by: Krzysztof Wilczyński Reviewed-by: Rob Herring (Arm) Reviewed-by: Manivannan Sadhasivam Reviewed-by: Krzysztof Kozlowski commit 631b2e7318d45bb0f1a5490c9a9e0509b67629ee Author: Jean-Philippe Brucker Date: Fri Jun 7 11:54:14 2024 +0100 dt-bindings: PCI: generic: Add ats-supported property Add a way for firmware to tell the OS that ATS is supported by the PCI root complex. An endpoint with ATS enabled may send Translation Requests and Translated Memory Requests, which look just like Normal Memory Requests with a non-zero AT field. So a root controller that ignores the AT field may simply forward the request to the IOMMU as a Normal Memory Request, which could end badly. In any case, the endpoint will be unusable. The ats-supported property allows the OS to only enable ATS in endpoints if the root controller can handle ATS requests. Only add the property to pcie-host-ecam-generic for the moment. For non-generic root controllers, availability of ATS can be inferred from the compatible string. Link: https://lore.kernel.org/linux-pci/20240607105415.2501934-3-jean-philippe@linaro.org Signed-off-by: Jean-Philippe Brucker Signed-off-by: Krzysztof Wilczyński Reviewed-by: Jason Gunthorpe Reviewed-by: Liviu Dudau Reviewed-by: Nicolin Chen Reviewed-by: Rob Herring Reviewed-by: Robin Murphy commit bc9792f32cbd1a3bf8afef78efa5a9116323ca83 Author: Sergio Paracuellos Date: Wed May 22 06:43:21 2024 +0200 dt-bindings: PCI: mediatek,mt7621-pcie: Add PCIe host topology ASCII graph MediaTek MT7621 PCIe sub-system supports a single Root Complex (RC) with 3 Root Ports. Add PCIe host topology ASCII graph to the binding for completeness. Suggested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/linux-pci/20240522044321.3205160-1-sergio.paracuellos@gmail.com Signed-off-by: Sergio Paracuellos Signed-off-by: Krzysztof Wilczyński Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski commit bdf8e4d5d68ff78ea5c0f3f61c4f93c2305d69cf Author: Krishna chaitanya chundru Date: Wed Jun 19 20:41:11 2024 +0530 dt-bindings: PCI: qcom: Add OPP table PCIe needs to choose the appropriate performance state of RPMh power domain based on the PCIe gen speed. Adding the Operating Performance Points table allows to adjust power domain performance state and ICC peak bw, depending on the PCIe data rate and link width. Link: https://lore.kernel.org/linux-pci/20240619-opp_support-v15-2-aa769a2173a3@quicinc.com Signed-off-by: Krishna chaitanya chundru Signed-off-by: Krzysztof Wilczyński Reviewed-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam commit a3ec59e982e08366fa755730bbe803f7ed042391 Author: Thippeswamy Havalige Date: Mon Jun 24 16:40:22 2024 +0530 dt-bindings: PCI: xilinx-cpm: Fix overlapping of bridge register and 32-bit BAR addresses The current configuration had non-prefetchable memory overlapping with bridge registers by 64KB from base address. This patch fixes the 'ranges' property in the device tree by adjusting the non-prefetchable memory addresses beyond the 64KB mark to prevent conflicts. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240624111022.133780-1-thippesw@amd.com Signed-off-by: Thippeswamy Havalige Signed-off-by: Krzysztof Wilczyński Acked-by: Krzysztof Kozlowski commit 743025b0e072dafa6e176409eaac6e0ee203b6b3 Author: Niklas Cassel Date: Fri Jun 7 13:14:26 2024 +0200 dt-bindings: PCI: rockchip: Add DesignWare based PCIe Endpoint controller Document DT bindings for PCIe Endpoint controller found in Rockchip SoCs. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-6-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) commit 6bba3c0ac5dc54737998a0982b2e272242c87e0f Author: Dan Carpenter Date: Mon Jun 10 12:33:49 2024 +0300 PCI: endpoint: Fix error handling in epf_ntb_epc_cleanup() There are two issues related to epf_ntb_epc_cleanup(): 1) It should call epf_ntb_config_sspad_bar_clear() 2) The epf_ntb_bind() function should call epf_ntb_epc_cleanup() to cleanup. I also changed the ordering a bit. Unwinding should be done in the mirror order from how they are allocated. Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Link: https://lore.kernel.org/linux-pci/aaffbe8d-7094-4083-8146-185f4a84e8a1@moroto.mountain Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen commit 8e0f5a96c534f781e8c57ca30459448b3bfe5429 Author: Dan Carpenter Date: Mon Jun 10 12:33:39 2024 +0300 PCI: endpoint: Clean up error handling in vpci_scan_bus() Smatch complains about inconsistent NULL checking in vpci_scan_bus(): drivers/pci/endpoint/functions/pci-epf-vntb.c:1024 vpci_scan_bus() error: we previously assumed 'vpci_bus' could be null (see line 1021) Instead of printing an error message and then crashing we should return an error code and clean up. Also the NULL check is reversed so it prints an error for success instead of failure. Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Link: https://lore.kernel.org/linux-pci/68e0f6a4-fd57-45d0-945b-0876f2c8cb86@moroto.mountain Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen commit 03377a698926e829321fcd42789892cb5974b6b6 Author: Greg Kroah-Hartman Date: Mon Jun 10 10:20:12 2024 +0200 PCI: endpoint: Make pci_epc_class struct constant Now that the driver core allows for struct class to be in read-only memory, we should make all 'class' structures declared at build time placing them into read-only memory, instead of having to be dynamically allocated at runtime. Link: https://lore.kernel.org/linux-pci/2024061011-citable-herbicide-1095@gregkh Signed-off-by: Greg Kroah-Hartman Signed-off-by: Krzysztof Wilczyński commit 473b2cf9c4d1711146da1d8574c61e92c6672892 Author: Manivannan Sadhasivam Date: Thu Jun 6 12:56:35 2024 +0530 PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers As like the 'epc_init' event, that is used to signal the EPF drivers about the EPC initialization, let's introduce 'epc_deinit' event that is used to signal EPC deinitialization. The EPC deinitialization applies only when any sort of fundamental reset is supported by the endpoint controller as per the PCIe spec. Reference: PCIe r6.0, sec 4.2.5.9.1 and 6.6.1. Currently, some EPC drivers like pcie-qcom-ep and pcie-tegra194 support PERST# as the fundamental reset. So the 'deinit' event will be notified to the EPF drivers when PERST# assert happens in the above mentioned EPC drivers. The EPF drivers, on receiving the event through the epc_deinit() callback should reset the EPF state machine and also cleanup any configuration that got affected by the fundamental reset like BAR, DMA etc... This change also warrants skipping the cleanups in unbind() if already done in epc_deinit(). Link: https://lore.kernel.org/r/20240606-pci-deinit-v1-2-4395534520dc@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Reviewed-by: Niklas Cassel Reviewed-by: Siddharth Vadapalli Reviewed-by: Frank Li commit 302a3ea38aec5ecee773aa4e5478aaa576919bb4 Author: Suren Baghdasaryan Date: Thu Jul 4 06:59:41 2024 -0700 mm, slab: move allocation tagging code in the alloc path into a hook Move allocation tagging specific code in the allocation path into alloc_tagging_slab_alloc_hook, similar to how freeing path uses alloc_tagging_slab_free_hook. No functional changes, just code cleanup. Suggested-by: Vlastimil Babka Signed-off-by: Suren Baghdasaryan Signed-off-by: Vlastimil Babka commit ac4e52c69f2d20b13f37397f44fa3d59dc4a87f9 Merge: a4ce399973d21 0b4eeee2876f2 Author: Will Deacon Date: Thu Jul 4 15:13:53 2024 +0100 Merge branch 'for-joerg/arm-smmu/updates' into for-joerg/arm-smmu/next * for-joerg/arm-smmu/updates: (29 commits) iommu/arm-smmu-qcom: Register the TBU driver in qcom_smmu_impl_init iommu/arm-smmu-v3: Enable HTTU for stage1 with io-pgtable mapping iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc iommu/io-pgtable-arm: Add read_and_clear_dirty() support iommu/arm-smmu-v3: Add feature detection for HTTU iommu/arm-smmu-v3: Add support for domain_alloc_user fn iommu/arm-smmu-qcom: record reason for deferring probe iommu/arm-smmu: Pretty-print context fault related regs iommu/arm-smmu-qcom-debug: Do not print for handled faults iommu/arm-smmu: Add CB prefix to register bitfields iommu/arm-smmu-v3: add missing MODULE_DESCRIPTION() macro iommu/arm-smmu-v3: Shrink the strtab l1_desc array iommu/arm-smmu-v3: Do not zero the strtab twice iommu/arm-smmu-v3: Allow setting a S1 domain to a PASID iommu/arm-smmu-v3: Allow a PASID to be set when RID is IDENTITY/BLOCKED iommu/arm-smmu-v3: Test the STE S1DSS functionality iommu/arm-smmu-v3: Allow IDENTITY/BLOCKED to be set while PASID is used iommu/arm-smmu-v3: Put the SVA mmu notifier in the smmu_domain iommu/arm-smmu-v3: Keep track of arm_smmu_master_domain for SVA iommu/arm-smmu-v3: Make SVA allocate a normal arm_smmu_domain ... commit a4ce399973d21494eab12e7049f38d47c0c4cb30 Merge: c3f38fa61af77 d6c102881b302 Author: Will Deacon Date: Thu Jul 4 15:13:48 2024 +0100 Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/next * for-joerg/arm-smmu/bindings: dt-bindings: arm-smmu: Add X1E80100 GPU SMMU dt-bindings: arm-smmu: Fix Qualcomm SC8180X binding commit 5e30c16b58a486ff8700512e43eac9949c32621b Author: Kevin Brodsky Date: Tue Jul 2 10:13:49 2024 +0100 Documentation: arm64: Update memory.rst for TBI Most of memory.rst was written very early, at a time where TBI (Top Byte Ignore) was not enabled. Nowadays TBI0 is always enabled, and TBI1 may be enabled, depending on the kernel configuration. This means that VA bits 63:56 cannot generally be assumed to have any particular value. Regardless of TBI, TTBRx selection is done based on bit 55; update memory.rst accordingly. Signed-off-by: Kevin Brodsky Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240702091349.356008-1-kevin.brodsky@arm.com Signed-off-by: Catalin Marinas commit 57e11990f45f89bc29d0f84dd7b13a4e4263eeb2 Author: Sandipan Das Date: Wed Jun 26 13:19:42 2024 +0530 perf/x86/amd/uncore: Fix DF and UMC domain identification For uncore PMUs, a single context is shared across all CPUs in a domain. The domain can be a CCX, like in the case of the L3 PMU, or a socket, like in the case of DF and UMC PMUs. This information is available via the PMU's cpumask. For contexts shared across a socket, the domain is currently determined from topology_die_id() which is incorrect after the introduction of commit 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf") as it now returns a CCX identifier on Zen 4 and later systems which support CPUID leaf 0x80000026. Use topology_logical_package_id() instead as it always returns a socket identifier irrespective of the availability of CPUID leaf 0x80000026. Fixes: 63edbaa48a57 ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf") Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240626074942.1044818-1-sandipan.das@amd.com commit f997e208b6c96858a2f6c0855debfbdb9b52f131 Author: Sandipan Das Date: Wed Jun 26 13:14:04 2024 +0530 perf/x86/amd/uncore: Avoid PMU registration if counters are unavailable X86_FEATURE_PERFCTR_NB and X86_FEATURE_PERFCTR_LLC are derived from CPUID leaf 0x80000001 ECX bits 24 and 28 respectively and denote the availability of DF and L3 counters. When these bits are not set, the corresponding PMUs have no counters and hence, should not be registered. Fixes: 07888daa056e ("perf/x86/amd/uncore: Move discovery and registration") Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240626074404.1044230-1-sandipan.das@amd.com commit 149fd4712bcd492a031945f92e5ce19879f62311 Author: Kan Liang Date: Wed Jun 26 07:35:40 2024 -0700 perf/x86/intel: Support Perfmon MSRs aliasing The architectural performance monitoring V6 supports a new range of counters' MSRs in the 19xxH address range. They include all the GP counter MSRs, the GP control MSRs, and the fixed counter MSRs. The step between each sibling counter is 4. Add intel_pmu_addr_offset() to calculate the correct offset. Add fixedctr in struct x86_pmu to store the address of the fixed counter 0. It can be used to calculate the rest of the fixed counters. The MSR address of the fixed counter control is not changed. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-9-kan.liang@linux.intel.com commit dce0c74d2d180ce21d074b4f977821a567ab0020 Author: Kan Liang Date: Wed Jun 26 07:35:39 2024 -0700 perf/x86/intel: Support PERFEVTSEL extension Two new fields (the unit mask2, and the equal flag) are added in the IA32_PERFEVTSELx MSRs. They can be enumerated by the CPUID.23H.0.EBX. Update the config_mask in x86_pmu and x86_hybrid_pmu for the true layout of the PERFEVTSEL. Expose the new formats into sysfs if they are available. The umask extension reuses the same format attr name "umask" as the previous umask. Add umask2_show to determine/display the correct format for the current machine. Co-developed-by: Dapeng Mi Signed-off-by: Dapeng Mi Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-8-kan.liang@linux.intel.com commit e8fb5d6e765838e913253ef7c9b6fd8ec76c8d53 Author: Kan Liang Date: Wed Jun 26 07:35:38 2024 -0700 perf/x86: Add config_mask to represent EVENTSEL bitmask Different vendors may support different fields in EVENTSEL MSR, such as Intel would introduce new fields umask2 and eq bits in EVENTSEL MSR since Perfmon version 6. However, a fixed mask X86_RAW_EVENT_MASK is used to filter the attr.config. Introduce a new config_mask to record the real supported EVENTSEL bitmask. Only apply it to the existing code now. No functional change. Co-developed-by: Dapeng Mi Signed-off-by: Dapeng Mi Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-7-kan.liang@linux.intel.com commit 608f6976c309793ceea37292c54b057dab091944 Author: Kan Liang Date: Wed Jun 26 07:35:37 2024 -0700 perf/x86/intel: Support new data source for Lunar Lake A new PEBS data source format is introduced for the p-core of Lunar Lake. The data source field is extended to 8 bits with new encodings. A new layout is introduced into the union intel_x86_pebs_dse. Introduce the lnl_latency_data() to parse the new format. Enlarge the pebs_data_source[] accordingly to include new encodings. Only the mem load and the mem store events can generate the data source. Introduce INTEL_HYBRID_LDLAT_CONSTRAINT and INTEL_HYBRID_STLAT_CONSTRAINT to mark them. Add two new bits for the new cache-related data src, L2_MHB and MSC. The L2_MHB is short for L2 Miss Handling Buffer, which is similar to LFB (Line Fill Buffer), but to track the L2 Cache misses. The MSC stands for the memory-side cache. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-6-kan.liang@linux.intel.com commit 090262439f66df03d4e9d0e52e14104b729e2ef8 Author: Kan Liang Date: Wed Jun 26 07:35:36 2024 -0700 perf/x86/intel: Rename model-specific pebs_latency_data functions The model-specific pebs_latency_data functions of ADL and MTL use the "small" as a postfix to indicate the e-core. The postfix is too generic for a model-specific function. It cannot provide useful information that can directly map it to a specific uarch, which can facilitate the development and maintenance. Use the abbr of the uarch to rename the model-specific functions. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-5-kan.liang@linux.intel.com commit a932aa0e868f92c5219d84b58c1131fc05ddcf79 Author: Kan Liang Date: Wed Jun 26 07:35:35 2024 -0700 perf/x86: Add Lunar Lake and Arrow Lake support From PMU's perspective, Lunar Lake and Arrow Lake are similar to the previous generation Meteor Lake. Both are hybrid platforms, with e-core and p-core. The key differences include: - The e-core supports 3 new fixed counters - The p-core supports an updated PEBS Data Source format - More GP counters (Updated event constraint table) - New Architectural performance monitoring V6 (New Perfmon MSRs aliasing, umask2, eq). - New PEBS format V6 (Counters Snapshotting group) - New RDPMC metrics clear mode The legacy features, the 3 new fixed counters and updated event constraint table are enabled in this patch. The new PEBS data source format, the architectural performance monitoring V6, the PEBS format V6, and the new RDPMC metrics clear mode are supported in the following patches. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-4-kan.liang@linux.intel.com commit 722e42e45c2f1c6d1adec7813651dba5139f52f4 Author: Kan Liang Date: Wed Jun 26 07:35:34 2024 -0700 perf/x86: Support counter mask The current perf assumes that both GP and fixed counters are contiguous. But it's not guaranteed on newer Intel platforms or in a virtualization environment. Use the counter mask to replace the number of counters for both GP and the fixed counters. For the other ARCHs or old platforms which don't support a counter mask, using GENMASK_ULL(num_counter - 1, 0) to replace. There is no functional change for them. The interface to KVM is not changed. The number of counters still be passed to KVM. It can be updated later separately. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-3-kan.liang@linux.intel.com commit a23eb2fc1d818cdac9b31f032842d55483a6a040 Author: Kan Liang Date: Wed Jun 26 07:35:33 2024 -0700 perf/x86/intel: Support the PEBS event mask The current perf assumes that the counters that support PEBS are contiguous. But it's not guaranteed with the new leaf 0x23 introduced. The counters are enumerated with a counter mask. There may be holes in the counter mask for future platforms or in a virtualization environment. Store the PEBS event mask rather than the maximum number of PEBS counters in the x86 PMU structures. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Reviewed-by: Ian Rogers Link: https://lkml.kernel.org/r/20240626143545.480761-2-kan.liang@linux.intel.com commit 26579860fbd5129e18de9d6fa0751a48420b26b7 Author: Zhang Rui Date: Fri Jun 28 11:17:58 2024 +0800 perf/x86/intel/cstate: Add Lunarlake support Compared with previous client platforms, PC8 is removed from Lunarlake. It supports CC1/CC6/CC7 and PC2/PC3/PC6/PC10 residency counters. Signed-off-by: Zhang Rui Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20240628031758.43103-4-rui.zhang@intel.com commit a31000753d41305d2fb7faa8cc80a8edaeb7b56b Author: Zhang Rui Date: Fri Jun 28 11:17:57 2024 +0800 perf/x86/intel/cstate: Add Arrowlake support Like Alderlake, Arrowlake supports CC1/CC6/CC7 and PC2/PC3/PC6/PC8/PC10. Signed-off-by: Zhang Rui Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20240628031758.43103-3-rui.zhang@intel.com commit 2c3aedd9db6295619d21e50ad29efda614023bf1 Author: Zhang Rui Date: Fri Jun 28 11:17:56 2024 +0800 perf/x86/intel/cstate: Fix Alderlake/Raptorlake/Meteorlake For Alderlake, the spec changes after the patch submitted and PC7/PC9 are removed. Raptorlake and Meteorlake, which copy the Alderlake cstate PMU, also don't have PC7/PC9. Remove PC7/PC9 support for Alderlake/Raptorlake/Meteorlake. Fixes: d0ca946bcf84 ("perf/x86/cstate: Add Alder Lake CPU support") Signed-off-by: Zhang Rui Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20240628031758.43103-2-rui.zhang@intel.com commit 4fe53bf2ba0a45cd708dcd4c3e8e1950731b3d4d Author: Arnd Bergmann Date: Wed Jul 3 09:43:01 2024 +0200 syscalls: add generic scripts/syscall.tbl The asm-generic/unistd.h header still follows the old style of defining system call numbers and the table. Most architectures got the new syscall.tbl format as part of the y2038 conversion back in 2018, but the newer architectures that share a single table never did. I did a semi-automated conversion of the asm-generic/unistd.h contents into a syscall.tbl format, using the ABI field to take care of all the relevant differences that are encoded using #ifdef checks in the existing header. Conversion of the architectures is done one at a time in order to be able to review or revert them as needed. Signed-off-by: Arnd Bergmann commit 0c8ea05e9b3d8e5287e2a968f2a2e744dfd31b99 Merge: 0ca4da2412da0 34b3fc558b537 Author: Peter Zijlstra Date: Thu Jul 4 16:00:24 2024 +0200 Merge branch 'tip/x86/cpu' The Lunarlake patches rely on the new VFM stuff. Signed-off-by: Peter Zijlstra commit 0ca4da2412da05fb9dd0b5d90dcc8026219f0f29 Author: Adrian Hunter Date: Mon Jun 24 23:11:01 2024 +0300 perf: Make rb_alloc_aux() return an error immediately if nr_pages <= 0 rb_alloc_aux() should not be called with nr_pages <= 0. Make it more robust and readable by returning an error immediately in that case. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240624201101.60186-8-adrian.hunter@intel.com commit 43deb76b19663a96ec2189d8f4eb9a9dc2d7623f Author: Adrian Hunter Date: Mon Jun 24 23:11:00 2024 +0300 perf: Fix default aux_watermark calculation The default aux_watermark is half the AUX area buffer size. In general, on a 64-bit architecture, the AUX area buffer size could be a bigger than fits in a 32-bit type, but the calculation does not allow for that possibility. However the aux_watermark value is recorded in a u32, so should not be more than U32_MAX either. Fix by doing the calculation in a correctly sized type, and limiting the result to U32_MAX. Fixes: d68e6799a5c8 ("perf: Cap allocation order at aux_watermark") Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240624201101.60186-7-adrian.hunter@intel.com commit dbc48c8f41c208082cfa95e973560134489e3309 Author: Adrian Hunter Date: Mon Jun 24 23:10:59 2024 +0300 perf: Prevent passing zero nr_pages to rb_alloc_aux() nr_pages is unsigned long but gets passed to rb_alloc_aux() as an int, and is stored as an int. Only power-of-2 values are accepted, so if nr_pages is a 64_bit value, it will be passed to rb_alloc_aux() as zero. That is not ideal because: 1. the value is incorrect 2. rb_alloc_aux() is at risk of misbehaving, although it manages to return -ENOMEM in that case, it is a result of passing zero to get_order() even though the get_order() result is documented to be undefined in that case. Fix by simply validating the maximum supported value in the first place. Use -ENOMEM error code for consistency with the current error code that is returned in that case. Fixes: 45bfb2e50471 ("perf: Add AUX area to ring buffer for raw data streams") Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240624201101.60186-6-adrian.hunter@intel.com commit 3df94a5b1078dfe2b0c03f027d018800faf44c82 Author: Adrian Hunter Date: Mon Jun 24 23:10:58 2024 +0300 perf: Fix perf_aux_size() for greater-than 32-bit size perf_buffer->aux_nr_pages uses a 32-bit type, so a cast is needed to calculate a 64-bit size. Fixes: 45bfb2e50471 ("perf: Add AUX area to ring buffer for raw data streams") Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240624201101.60186-5-adrian.hunter@intel.com commit 3520b251dcae2b4a27b95cd6f745c54fd658bda5 Author: Adrian Hunter Date: Mon Jun 24 23:10:57 2024 +0300 perf/x86/intel/pt: Fix pt_topa_entry_for_page() address calculation Currently, perf allocates an array of page pointers which is limited in size by MAX_PAGE_ORDER. That in turn limits the maximum Intel PT buffer size to 2GiB. Should that limitation be lifted, the Intel PT driver can support larger sizes, except for one calculation in pt_topa_entry_for_page(), which is limited to 32-bits. Fix pt_topa_entry_for_page() address calculation by adding a cast. Fixes: 39152ee51b77 ("perf/x86/intel/pt: Get rid of reverse lookup table for ToPA") Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240624201101.60186-4-adrian.hunter@intel.com commit ad97196379d0b8cb24ef3d5006978a6554e6467f Author: Adrian Hunter Date: Mon Jun 24 23:10:56 2024 +0300 perf/x86/intel/pt: Fix a topa_entry base address calculation topa_entry->base is a bit-field. Bit-fields are not promoted to a 64-bit type, even if the underlying type is 64-bit, and so, if necessary, must be cast to a larger type when calculations are done. Fix a topa_entry->base address calculation by adding a cast. Without the cast, the address was limited to 36-bits i.e. 64GiB. The address calculation is used on systems that do not support Multiple Entry ToPA (only Broadwell), and affects physical addresses on or above 64GiB. Instead of writing to the correct address, the address comprising the first 36 bits would be written to. Intel PT snapshot and sampling modes are not affected. Fixes: 52ca9ced3f70 ("perf/x86/intel/pt: Add Intel PT PMU driver") Reported-by: Dave Hansen Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240624201101.60186-3-adrian.hunter@intel.com commit 5638bd722a44bbe97c1a7b3fae5b9efddb3e70ff Author: Marco Cavenati Date: Mon Jun 24 23:10:55 2024 +0300 perf/x86/intel/pt: Fix topa_entry base length topa_entry->base needs to store a pfn. It obviously needs to be large enough to store the largest possible x86 pfn which is MAXPHYADDR-PAGE_SIZE (52-12). So it is 4 bits too small. Increase the size of topa_entry->base from 36 bits to 40 bits. Note, systems where physical addresses can be 256TiB or more are affected. [ Adrian: Amend commit message as suggested by Dave Hansen ] Fixes: 52ca9ced3f70 ("perf/x86/intel/pt: Add Intel PT PMU driver") Signed-off-by: Marco Cavenati Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240624201101.60186-2-adrian.hunter@intel.com commit d329605287020c3d1c3b0dadc63d8208e7251382 Author: Tejun Heo Date: Tue Jun 25 15:29:58 2024 -1000 sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks When a task's weight is being changed, set_load_weight() is called with @update_load set. As weight changes aren't trivial for the fair class, set_load_weight() calls fair.c::reweight_task() for fair class tasks. However, set_load_weight() first tests task_has_idle_policy() on entry and skips calling reweight_task() for SCHED_IDLE tasks. This is buggy as SCHED_IDLE tasks are just fair tasks with a very low weight and they would incorrectly skip load, vlag and position updates. Fix it by updating reweight_task() to take struct load_weight as idle weight can't be expressed with prio and making set_load_weight() call reweight_task() for SCHED_IDLE tasks too when @update_load is set. Fixes: 9059393e4ec1 ("sched/fair: Use reweight_entity() for set_user_nice()") Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org # v4.15+ Link: http://lkml.kernel.org/r/20240624102331.GI31592@noisy.programming.kicks-ass.net commit 0ec208ce9834929769ace0e2a506106192d08069 Author: Tvrtko Ursulin Date: Tue Jun 25 14:50:00 2024 +0100 sched/psi: Optimise psi_group_change a bit The current code loops over the psi_states only to call a helper which then resolves back to the action needed for each state using a switch statement. That is effectively creating a double indirection of a kind which, given how all the states need to be explicitly listed and handled anyway, we can simply remove. Both the for loop and the switch statement that is. The benefit is both in the code size and CPU time spent in this function. YMMV but on my Steam Deck, while in a game, the patch makes the CPU usage go from ~2.4% down to ~1.2%. Text size at the same time went from 0x323 to 0x2c1. Signed-off-by: Tvrtko Ursulin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chengming Zhou Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20240625135000.38652-1-tursulin@igalia.com commit 6bac3388889cec379ecb06e5557dd6f31a31544e Author: Jean-Philippe Brucker Date: Fri Jun 7 11:54:16 2024 +0100 arm64: dts: fvp: Enable PCIe ATS for Base RevC FVP Declare that the host controller supports ATS, so the OS can enable it for ATS-capable PCIe endpoints. Acked-by: Sudeep Holla Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20240607105415.2501934-5-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 86e02a88bedc1072beb5445d408e379674b0b7f3 Author: Jean-Philippe Brucker Date: Fri Jun 7 11:54:15 2024 +0100 iommu/of: Support ats-supported device-tree property Device-tree declares whether a PCI root-complex supports ATS by setting the "ats-supported" property. Copy this flag into device fwspec to let IOMMU drivers quickly check if they can enable ATS for a device. Tested-by: Ketan Patil Reviewed-by: Jason Gunthorpe Reviewed-by: Liviu Dudau Reviewed-by: Robin Murphy Reviewed-by: Nicolin Chen Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20240607105415.2501934-4-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 40929e8e5449a18bc98baf7a907dd6674bd60049 Author: Jean-Philippe Brucker Date: Fri Jun 7 11:54:14 2024 +0100 dt-bindings: PCI: generic: Add ats-supported property Add a way for firmware to tell the OS that ATS is supported by the PCI root complex. An endpoint with ATS enabled may send Translation Requests and Translated Memory Requests, which look just like Normal Memory Requests with a non-zero AT field. So a root controller that ignores the AT field may simply forward the request to the IOMMU as a Normal Memory Request, which could end badly. In any case, the endpoint will be unusable. The ats-supported property allows the OS to only enable ATS in endpoints if the root controller can handle ATS requests. Only add the property to pcie-host-ecam-generic for the moment. For non-generic root controllers, availability of ATS can be inferred from the compatible string. Reviewed-by: Rob Herring Reviewed-by: Liviu Dudau Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20240607105415.2501934-3-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 17199dfccd4b7f7e0c059ef43bef6e0078423476 Author: Tony Lindgren Date: Wed Jul 3 13:06:10 2024 +0300 Documentation: kernel-parameters: Add DEVNAME:0.0 format for serial ports Document the console option for DEVNAME:0.0 style addressing for serial ports. Suggested-by: Sebastian Reichel Signed-off-by: Tony Lindgren Reviewed-by: Dhruva Gole Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20240703100615.118762-4-tony.lindgren@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 12c91cec3155f79216641162a32e04a59abb6e37 Author: Tony Lindgren Date: Wed Jul 3 13:06:09 2024 +0300 serial: core: Add serial_base_match_and_update_preferred_console() Let's add serial_base_match_and_update_preferred_console() for consoles using DEVNAME:0.0 style naming. The earlier approach to add it caused issues in the kernel command line ordering as we were calling __add_preferred_console() again for the deferred consoles. Signed-off-by: Tony Lindgren Reviewed-by: Petr Mladek Tested-by: Petr Mladek Link: https://lore.kernel.org/r/20240703100615.118762-3-tony.lindgren@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7640f1a44eba0cc1a41b312080c236f5c668cd50 Author: Tony Lindgren Date: Wed Jul 3 13:06:08 2024 +0300 printk: Add match_devname_and_update_preferred_console() Let's add match_devname_and_update_preferred_console() for driver subsystems to call during init when the console is ready, and it's character device name is known. For now, we use it only for the serial layer to allow console=DEVNAME:0.0 style hardware based addressing for consoles. The earlier attempt on doing this caused a regression with the kernel command line console order as it added calling __add_preferred_console() again later on during init. A better approach was suggested by Petr where we add the deferred console to the console_cmdline[] and update it later on when the console is ready. Suggested-by: Petr Mladek Co-developed-by: Petr Mladek Signed-off-by: Tony Lindgren Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20240703100615.118762-2-tony.lindgren@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3e36c15fc1cce65cccc93ed16f86d8ff9d2f9992 Author: Robin Murphy Date: Tue Jul 2 12:40:51 2024 +0100 iommu: Remove iommu_fwspec ops The ops in iommu_fwspec are only needed for the early configuration and probe process, and by now are easy enough to derive on-demand in those couple of places which need them, so remove the redundant stored copy. Tested-by: Jean-Philippe Brucker Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/55c1410b2cd09531eab4f8e2f18f92a0faa0ea75.1719919669.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 5f937bc48a6aa63970648c54fb40ea8f96b633dc Author: Robin Murphy Date: Tue Jul 2 12:40:50 2024 +0100 OF: Simplify of_iommu_configure() We no longer have a notion of partially-initialised fwspecs existing, and we also no longer need to use an iommu_ops pointer to return status to of_dma_configure(). Clean up the remains of those, which lends itself to clarifying the logic around the dma_range_map allocation as well. Acked-by: Rob Herring (Arm) Tested-by: Jean-Philippe Brucker Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/61972f88e31a6eda8bf5852f0853951164279a3c.1719919669.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 78596b5c321c9d74eeef1ad51c964563a4081f79 Author: Robin Murphy Date: Tue Jul 2 12:40:49 2024 +0100 ACPI: Retire acpi_iommu_fwspec_ops() Now that iommu_fwspec_init() can signal for probe deferral directly, acpi_iommu_fwspec_ops() is unneeded and can be cleaned up. Acked-by: Rafael J. Wysocki Tested-by: Jean-Philippe Brucker Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/011e39e275aba3ad451c5a1965ca8ddf20ed36c2.1719919669.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 3f7c320916282c26812d70cfe8830abb9e4dc696 Author: Robin Murphy Date: Tue Jul 2 12:40:48 2024 +0100 iommu: Resolve fwspec ops automatically There's no real need for callers to resolve ops from a fwnode in order to then pass both to iommu_fwspec_init() - it's simpler and more sensible for that to resolve the ops itself. This in turn means we can centralise the notion of checking for a present driver, and enforce that fwspecs aren't allocated unless and until we know they will be usable. Also use this opportunity to modernise with some "new" helpers that arrived shortly after this code was first written; the generic fwnode_handle_get() clears up that ugly get/put mismatch, while of_fwnode_handle() can now abstract those open-coded dereferences. Tested-by: Jean-Philippe Brucker Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/0e2727adeb8cd73274425322f2f793561bdc927e.1719919669.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit e7acc36f26b0b1a71dd068f4afd33d871352d67d Author: Robin Murphy Date: Tue Jul 2 12:40:47 2024 +0100 iommu/mediatek-v1: Clean up redundant fwspec checks The driver explicitly clears any existing fwspec before calling mtk_iommu_v1_create_mapping(), but even if it didn't, the checks it's doing there duplicate what iommu_fwspec_init() would do anyway. Clean them up. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407020415.KKnhPTUj-lkp@intel.com/ Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/7d6ebec135483f889af00eb376aa31c012efc3b2.1719919669.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit afeea2758b4f1210361ce2a91d8fa3e7df606ad2 Merge: 539d33b578380 896868eded124 Author: Maxime Ripard Date: Thu Jul 4 15:19:33 2024 +0200 Merge drm-misc-next-2024-07-04 into drm-misc-next-fixes Let's start the drm-misc-next-fixes cycle. Signed-off-by: Maxime Ripard commit 20ce0c247b2500cb7060cb115274ba71abda2626 Author: Krishna Kumar Date: Mon Jul 1 13:15:07 2024 +0530 powerpc/pci: Hotplug driver bridge support There is an issue with the hotplug operation when it's done on the bridge/switch slot. The bridge-port and devices behind the bridge, which become offline by hot-unplug operation, don't get hot-plugged/enabled by doing hot-plug operation on that slot. Only the first port of the bridge gets enabled and the remaining port/devices remain unplugged. The hot plug/unplug operation is done by the hotplug driver (drivers/pci/ hotplug/pnv_php.c). This behavior is due to missing code for the switch/bridge. The existing driver depends on pci_hp_add_devices() function for device enablement. This function calls pci_scan_slot() on only one device-node/port of the bridge, not on all the siblings' device-node/port. The missing code needs to be added which will find all the sibling device-nodes/bridge-ports and will run explicit pci_scan_slot() on those. A new function has been added for this purpose which is invoked from pci_hp_add_devices(). This new function traverse_siblings_and_scan_slot() gets all the sibling bridge-ports by traversal and explicitly invokes pci_scan_slot() on them. Tested-by: Shawn Anastasio Signed-off-by: Krishna Kumar [mpe: Move the code into pci-hotplug.c] Signed-off-by: Michael Ellerman Link: https://msgid.link/20240701074513.94873-3-krishnak@linux.ibm.com commit 335e35b748527f0c06ded9eebb65387f60647fda Author: Krishna Kumar Date: Mon Jul 1 13:15:06 2024 +0530 pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv The hotplug driver for powerpc (pci/hotplug/pnv_php.c) causes a kernel crash when we try to hot-unplug/disable the PCIe switch/bridge from the PHB. The crash occurs because although the MSI data structure has been released during disable/hot-unplug path and it has been assigned with NULL, still during unregistration the code was again trying to explicitly disable the MSI which causes the NULL pointer dereference and kernel crash. The patch fixes the check during unregistration path to prevent invoking pci_disable_msi/msix() since its data structure is already freed. Reported-by: Timothy Pearson Closes: https://lore.kernel.org/all/1981605666.2142272.1703742465927.JavaMail.zimbra@raptorengineeringinc.com/ Acked-by: Bjorn Helgaas Tested-by: Shawn Anastasio Signed-off-by: Krishna Kumar Signed-off-by: Michael Ellerman Link: https://msgid.link/20240701074513.94873-2-krishnak@linux.ibm.com commit 45547a0a93d85f704b49788cde2e1d9ab9cd363b Author: Esben Haabendal Date: Thu May 30 16:46:37 2024 +0200 powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC With CONFIG_FSL_IFC now being user-visible, and thus changed from a select to depends in CONFIG_MTD_NAND_FSL_IFC, the dependencies needs to be selected in defconfigs. Depends-on: 9ba0cae3cac0 ("memory: fsl_ifc: Make FSL_IFC config visible and selectable") Signed-off-by: Esben Haabendal Reviewed-by: Krzysztof Kozlowski Signed-off-by: Michael Ellerman Link: https://msgid.link/20240530-fsl-ifc-config-v3-2-1fd2c3d233dd@geanix.com commit 3b10f25704beefd0534f89db8323398c89b720e1 Author: Lu Baolu Date: Mon Jun 10 16:55:48 2024 +0800 RDMA/usnic: Use iommu_paging_domain_alloc() usnic_uiom_alloc_pd() allocates a paging domain for a given device. In this case, iommu_domain_alloc(dev->bus) is equivalent to  iommu_paging_domain_alloc(dev). Replace it as iommu_domain_alloc() has been deprecated. Signed-off-by: Lu Baolu Acked-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-15-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit ef50d41fbf1c95b07f636f4e268c53488a39284b Author: Lu Baolu Date: Mon Jun 10 16:55:45 2024 +0800 wifi: ath11k: Use iommu_paging_domain_alloc() An iommu domain is allocated in ath11k_ahb_fw_resources_init() and is attached to ab_ahb->fw.dev in the same function. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu Acked-by: Jeff Johnson Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-12-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit d5b7485588dffb39c5687e965623124ab7ebcd51 Author: Lu Baolu Date: Mon Jun 10 16:55:44 2024 +0800 wifi: ath10k: Use iommu_paging_domain_alloc() An iommu domain is allocated in ath10k_fw_init() and is attached to ar_snoc->fw.dev in the same function. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu Acked-by: Jeff Johnson Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-11-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 45acf35af200b305d1e6119ca9de47aa4c3c45b9 Author: Lu Baolu Date: Mon Jun 10 16:55:39 2024 +0800 drm/msm: Use iommu_paging_domain_alloc() The domain allocated in msm_iommu_new() is for the @dev. Replace iommu_domain_alloc() with iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu Acked-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240610085555.88197-6-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 9c159f6de1aedf200ac94eace47f6082399b561c Author: Lu Baolu Date: Mon Jun 10 16:55:38 2024 +0800 vhost-vdpa: Use iommu_paging_domain_alloc() Replace iommu_domain_alloc() with iommu_paging_domain_alloc(). Signed-off-by: Lu Baolu Acked-by: Michael S. Tsirkin Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 60ffc45017229ee8288ba139ee12c5ebf07c6f6a Author: Lu Baolu Date: Mon Jun 10 16:55:37 2024 +0800 vfio/type1: Use iommu_paging_domain_alloc() Replace iommu_domain_alloc() with iommu_paging_domain_alloc(). Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-4-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 26a581606fab44ff76b394f0ba44cd19c6ec0a6e Author: Lu Baolu Date: Mon Jun 10 16:55:36 2024 +0800 iommufd: Use iommu_paging_domain_alloc() If the iommu driver doesn't implement its domain_alloc_user callback, iommufd_hwpt_paging_alloc() rolls back to allocate an iommu paging domain. Replace iommu_domain_alloc() with iommu_user_domain_alloc() to pass the device pointer along the path. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-3-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit a27bf2743cb80d3b36b5b43e8e2e702412c41668 Author: Lu Baolu Date: Mon Jun 10 16:55:35 2024 +0800 iommu: Add iommu_paging_domain_alloc() interface Commit <17de3f5fdd35> ("iommu: Retire bus ops") removes iommu ops from bus. The iommu subsystem no longer relies on bus for operations. So the bus parameter in iommu_domain_alloc() is no longer relevant. Add a new interface named iommu_paging_domain_alloc(), which explicitly indicates the allocation of a paging domain for DMA managed by a kernel driver. The new interface takes a device pointer as its parameter, that better aligns with the current iommu subsystem. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20240610085555.88197-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 5f9f982dd71b418aeba7a0b37f87312545c06df4 Author: Stefan Binding Date: Wed Jul 3 15:07:28 2024 +0100 ALSA: hda: cs35l41: Fix missing Speaker ID GPIO description in _DSD Laptop 10431A63 contains valid _DSD, but missing Speaker ID description. Add this discription, but keep the rest of the _DSD to ensure the correct firmware and tuning is loaded for this laptop. Signed-off-by: Stefan Binding Link: https://patch.msgid.link/20240703140802.27688-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 8519e689834a3ecf9a36332a9abb1844bd34e459 Author: Lu Baolu Date: Tue Jul 2 14:34:38 2024 +0800 iommu: Extend domain attach group with handle support Unlike the SVA case where each PASID of a device has an SVA domain attached to it, the I/O page faults are handled by the fault handler of the SVA domain. The I/O page faults for a user page table might be handled by the domain attached to RID or the domain attached to the PASID, depending on whether the PASID table is managed by user space or kernel. As a result, there is a need for the domain attach group interfaces to have attach handle support. The attach handle will be forwarded to the fault handler of the user domain. Add some variants of the domain attaching group interfaces so that they could support the attach handle and export them for use in IOMMUFD. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240702063444.105814-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 06cdcc32d65759d42c6340700796e2906045b6a5 Author: Lu Baolu Date: Tue Jul 2 14:34:37 2024 +0800 iommu: Add attach handle to struct iopf_group Previously, the domain that a page fault targets is stored in an iopf_group, which represents a minimal set of page faults. With the introduction of attach handle, replace the domain with the handle so that the fault handler can obtain more information as needed when handling the faults. iommu_report_device_fault() is currently used for SVA page faults, which handles the page fault in an internal cycle. The domain is retrieved with iommu_get_domain_for_dev_pasid() if the pasid in the fault message is valid. This doesn't work in IOMMUFD case, where if the pasid table of a device is wholly managed by user space, there is no domain attached to the PASID of the device, and all page faults are forwarded through a NESTING domain attaching to RID. Add a static flag in iommu ops, which indicates if the IOMMU driver supports user-managed PASID tables. In the iopf deliver path, if no attach handle found for the iopf PASID, roll back to RID domain when the IOMMU driver supports this capability. iommu_get_domain_for_dev_pasid() is no longer used and can be removed. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240702063444.105814-4-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 3e7f57d1ef3f5fbed58974fae38d35e430f57d35 Author: Lu Baolu Date: Tue Jul 2 14:34:36 2024 +0800 iommu: Remove sva handle list The struct sva_iommu represents an association between an SVA domain and a PASID of a device. It's stored in the iommu group's pasid array and also tracked by a list in the per-mm data structure. Removes duplicate tracking of sva_iommu by eliminating the list. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240702063444.105814-3-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 14678219cf4093e897ab353fd78eab7994d1be7d Author: Lu Baolu Date: Tue Jul 2 14:34:35 2024 +0800 iommu: Introduce domain attachment handle Currently, when attaching a domain to a device or its PASID, domain is stored within the iommu group. It could be retrieved for use during the window between attachment and detachment. With new features introduced, there's a need to store more information than just a domain pointer. This information essentially represents the association between a domain and a device. For example, the SVA code already has a custom struct iommu_sva which represents a bond between sva domain and a PASID of a device. Looking forward, the IOMMUFD needs a place to store the iommufd_device pointer in the core, so that the device object ID could be quickly retrieved in the critical fault handling path. Introduce domain attachment handle that explicitly represents the attachment relationship between a domain and a device or its PASID. Co-developed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240702063444.105814-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 9c5f64734f895528128605e2f3b170d220be086d Author: Jeff Johnson Date: Sat Jun 15 10:06:18 2024 -0700 powerpc: add missing MODULE_DESCRIPTION() macros With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/kernel/rtas_flash.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/sysdev/rtc_cmos_setup.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/platforms/pseries/papr_scm.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/platforms/cell/spufs/spufs.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/platforms/cell/cbe_thermal.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/platforms/cell/cpufreq_spudemand.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/platforms/cell/cbe_powerbutton.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes 85xx/t1042rdb_diu.c and chrp/nvram.c which, although they did not produce a warning with the powerpc allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Michael Ellerman Link: https://msgid.link/20240615-md-powerpc-arch-powerpc-v1-1-ba4956bea47a@quicinc.com commit 50b5fed94e21c0992c79fafdd041c9863c1fd2d2 Author: Jeff Johnson Date: Thu May 9 18:23:37 2024 -0700 macintosh/mac_hid: add MODULE_DESCRIPTION() Fix the make W=1 warning: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/macintosh/mac_hid.o Signed-off-by: Jeff Johnson [mpe: Change the description to just "Mouse button 2+3 emulation"] Signed-off-by: Michael Ellerman Link: https://msgid.link/20240509-mac_hid-md-v1-1-4091f1e4e4e0@quicinc.com commit 0b4eeee2876f2b08442eb32081451bf130e01a4c Author: Georgi Djakov Date: Wed Jul 3 18:07:59 2024 -0700 iommu/arm-smmu-qcom: Register the TBU driver in qcom_smmu_impl_init Currently the TBU driver will only probe when CONFIG_ARM_SMMU_QCOM_DEBUG is enabled. The driver not probing would prevent the platform to reach sync_state and the system will remain in sub-optimal power consumption mode while waiting for all consumer drivers to probe. To address this, let's register the TBU driver in qcom_smmu_impl_init(), so that it can probe, but still enable its functionality only when the debug option in Kconfig is enabled. Reported-by: Dmitry Baryshkov Closes: https://lore.kernel.org/r/CAA8EJppcXVu72OSo+OiYEiC1HQjP3qCwKMumOsUhcn6Czj0URg@mail.gmail.com Fixes: 414ecb030870 ("iommu/arm-smmu-qcom-debug: Add support for TBUs") Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20240704010759.507798-1-quic_c_gdjako@quicinc.com Signed-off-by: Will Deacon commit 4acab508eb03dc1827db6005764de29299e07569 Author: Krzysztof Kozlowski Date: Wed Jul 3 10:31:41 2024 +0200 thermal: core: constify 'type' in devm_thermal_of_cooling_device_register() The 'type' string passed to thermal_of_cooling_device_register() is a 'const char *', so do the same in the devm interface. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240703083141.96013-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rafael J. Wysocki commit 82fe56c6fe02fde86784bad7f59a340306967efe Author: Stanislav Jakubek Date: Wed Jul 3 22:16:28 2024 +0200 dt-bindings: regulator: ti,tps65132: document VIN supply TPS65132 is powered by its VIN supply, document it. Signed-off-by: Stanislav Jakubek Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/ZoWxnEY944ht2EWf@standask-GA-A55M-S2HP Signed-off-by: Mark Brown commit cfc38d432dba5601db6ea225742e21715b2b901f Author: Muhammad Qasim Abdul Majeed Date: Wed Jul 3 13:41:25 2024 +0500 ACPI: video: Use strscpy() instead of strcpy() Replace strcpy() with strscpy() in the ACPI backlight code. strcpy() has been deprecated because it is generally unsafe, so help to eliminate if from the kernel source. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Muhammad Qasim Abdul Majeed Link: https://patch.msgid.link/20240703084124.11530-1-qasim.majeed20@gmail.com [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit ca8dad0415162efea3597abe06b2025f34213eb5 Author: Jeff Johnson Date: Sat Jun 15 08:18:59 2024 -0700 KVM: PPC: add missing MODULE_DESCRIPTION() macros With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/kvm/test-guest-state-buffer.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/kvm/kvm-pr.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/powerpc/kvm/kvm-hv.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson [mpe: Change kvm-hv description to mention POWER8 & later] Signed-off-by: Michael Ellerman Link: https://msgid.link/20240615-md-powerpc-arch-powerpc-kvm-v1-1-7478648b3100@quicinc.com commit cf08b628cd146a3cb597999f4d4dc590068bf011 Author: Rob Herring (Arm) Date: Tue Jul 2 15:03:44 2024 -0600 powerpc/kexec: Use of_property_read_reg() Replace open-coded parsing of "reg" property with of_property_read_reg(). Signed-off-by: Rob Herring (Arm) [mpe: Rename end to size, add comment to the bail out case] Signed-off-by: Michael Ellerman Link: https://msgid.link/20240702210344.722364-1-robh@kernel.org commit 353d7a84c214f184d5a6b62acdec8b4424159b7c Author: Hari Bathini Date: Mon Jul 1 18:30:21 2024 +0530 powerpc/64s/radix/kfence: map __kfence_pool at page granularity When KFENCE is enabled, total system memory is mapped at page level granularity. But in radix MMU mode, ~3GB additional memory is needed to map 100GB of system memory at page level granularity when compared to using 2MB direct mapping.This is not desired considering KFENCE is designed to be enabled in production kernels [1]. Mapping only the memory allocated for KFENCE pool at page granularity is sufficient to enable KFENCE support. So, allocate __kfence_pool during bootup and map it at page granularity instead of mapping all system memory at page granularity. Without patch: # cat /proc/meminfo MemTotal: 101201920 kB With patch: # cat /proc/meminfo MemTotal: 104483904 kB Note that enabling KFENCE at runtime is disabled for radix MMU for now, as it depends on the ability to split page table mappings and such APIs are not currently implemented for radix MMU. All kfence_test.c testcases passed with this patch. [1] https://lore.kernel.org/all/20201103175841.3495947-2-elver@google.com/ Signed-off-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://msgid.link/20240701130021.578240-1-hbathini@linux.ibm.com commit af199e6ca29c77fb8fea9a78f18dfb165af37cd7 Author: Shivaprasad G Bhat Date: Thu Jul 4 10:22:37 2024 +0000 powerpc/pseries/iommu: Define spapr_tce_table_group_ops only with CONFIG_IOMMU_API The patch fixes the below warning: arch/powerpc/platforms/pseries/iommu.c:1824:37: warning: 'spapr_tce_table_group_ops' defined but not used Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407020357.Hz8kQkKf-lkp@intel.com/ Fixes: b09c031d9433 ("powerpc/iommu: Move pSeries specific functions to pseries/iommu.c") Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/172008854222.784.13666247605789409729.stgit@linux.ibm.com commit 1b431ba4ef9a760e7643d6fbc53bf522d59650f3 Author: Miri Korenblit Date: Wed Jul 3 13:27:37 2024 +0300 wifi: iwlwifi: mvm: re-enable MLO MLO was temporarily disabled by commit 5f404005055 ("wifi: iwlwifi: mvm: disable MLO for the time being"), until it will stabilize. Now, that all the bugs were fixed and the minimum FW version was bumped to a stable one, we can re-enable MLO back. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703132713.8f77a71c3902.Ib302054cbd8fba82db97eb5298b2aaf8bbe106df@changeid Signed-off-by: Johannes Berg commit ef7ddf4e2f949633bd7b2b01c2e0f023aefb6987 Author: Anjaneyulu Date: Wed Jul 3 12:59:06 2024 +0300 wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12 Add support for activate/deactivate unii4 in USA, Canada and WW by reading DSM function 8 from UEFI or ACPI and sending it to the FW. Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.674604cbb6d1.Ibb946ae8ce7a760940a3c9d101e7f4f1808c43e4@changeid Signed-off-by: Johannes Berg commit 1895712afd1cab549b143717d6f1b6534383a9e0 Author: Mukesh Sisodiya Date: Wed Jul 3 12:59:05 2024 +0300 wifi: iwlwifi: Remove debug message Debug logs related to reset_fw are logged with all notification/response and polluting the trace. Remove the debug message related to reset_fw setting when dump is collected. Signed-off-by: Mukesh Sisodiya Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.8fc59cb17526.Ibb5d68b2fe5f7df709db3570de55a566d5af3f24@changeid Signed-off-by: Johannes Berg commit 8d4f5969f7c7d3a8f0e93d37a1a2fc23048dd12f Author: Johannes Berg Date: Wed Jul 3 12:59:04 2024 +0300 wifi: iwlwifi: mvm: document remaining mvm data Many iwl_mvm_vif members are not documented, add that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.371664e5e8cd.I593ebee1ab984554b6d269dc2dddc67fbf3bb537@changeid Signed-off-by: Johannes Berg commit 6188855fbb76a3b9b7c2e5f9744988b3e8b3e641 Author: Johannes Berg Date: Wed Jul 3 12:59:03 2024 +0300 wifi: iwlwifi: fw: api: fix missing RX descriptor kernel-doc The v1/v3 remaining bits are not annotated in kernel-doc, fix that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.d7adf8b235fe.I91f75e292d1648f61e5e341e1fe58096f858853d@changeid Signed-off-by: Johannes Berg commit 137579d65db426dbc2e026c1e42cc34ff5ceed85 Author: Johannes Berg Date: Wed Jul 3 12:59:02 2024 +0300 wifi: iwlwifi: document PPAG table command union correctly This is not documented correctly, fix it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.2ff5ee61e9ec.I3a1299061e472490c38a9fff4bea319ba20f313a@changeid Signed-off-by: Johannes Berg commit 94c97e1178d5714d2c02f73da426655adbc24937 Author: Johannes Berg Date: Wed Jul 3 12:59:01 2024 +0300 wifi: iwlwifi: fw: api: add puncturing to PHY context docs Document the puncture_mask field in the PHY context. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.8ba6536ea36b.I181d8da205a14f4fcbf1d8cc6011dcf194a1638a@changeid Signed-off-by: Johannes Berg commit 6009de8014a85e952e09d6c1944bfe8409114d94 Author: Johannes Berg Date: Wed Jul 3 12:59:00 2024 +0300 wifi: iwlwifi: fw: api: mac: fix kernel-doc Fix kernel-doc for MAC context APIs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.a7179f1b0e7e.Idd7ce381960707978ff0b16035101a2a725a4fd9@changeid Signed-off-by: Johannes Berg commit 3a84161cd3fb0756f640d842cb1278713808f887 Author: Johannes Berg Date: Wed Jul 3 12:58:59 2024 +0300 wifi: iwlwifi: fw: api: fix memory region kernel-doc Add the missing special_mem union member and use constant formatting (%) for the type constants. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.9344b2b94d45.Id770b4f1893308ba43fc039a8851c526312ad2b5@changeid Signed-off-by: Johannes Berg commit 5fdbde79eafe45888f41f6947132f63e8d39f485 Author: Johannes Berg Date: Wed Jul 3 12:58:58 2024 +0300 wifi: iwlwifi: mvm: add missing string for ROC EMLSR block This should be labeled for the debug output, add the missing string. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.03d428f4ff4d.I858f17a5173fe8337cea4e7665fec00dbb15e514@changeid Signed-off-by: Johannes Berg commit a2ed933dfefac8976ac915e1b1b60028b9c344b3 Author: Benjamin Berg Date: Wed Jul 3 12:58:57 2024 +0300 wifi: iwlwifi: release TXQ lock during reclaim Much of the work during reclaim can be done without holding the TXQ lock and releasing the lock means that command submission can happen at the same time. Add a new reclaim_lock to prevent parallel cleanup. Release the lock while working with an internal copy of the txq->read_ptr and only take the lock again when updating the read pointer after the cleanup is done. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.2a81021d49ac.I53698ae92fb75a0461d41176db115462cf8be1cd@changeid Signed-off-by: Johannes Berg commit 1a3364e963989dbcd1465dd8e94d9c5babd3474a Author: Benjamin Berg Date: Wed Jul 3 12:58:56 2024 +0300 wifi: iwlwifi: keep BHs disabled when TXing from reclaim During reclaim, we may release the txq->lock spinlock in order to call iwl_trans_tx to queue new frames. The iwl_trans_tx function expects to be called with BHs disabled and iwl_pcie_reclaim is most of the times called with BHs disabled already. However, reclaim can also happen after flushing a STA and in that case BHs will not be disabled. Solve this corner case by only releasing the spinlock but keeping BHs disabled. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.5d12e0e54e9f.Ic53a7ff75f1163eb38bdcf5d66b503e91e6ce5ca@changeid Signed-off-by: Johannes Berg commit 90db50755228252f94b143bbf2380242688b1104 Author: Benjamin Berg Date: Wed Jul 3 12:58:55 2024 +0300 wifi: iwlwifi: use already mapped data when TXing an AMSDU The previous commits added mappings for the SKB and TSO page. This switches the code to use these mappings instead of creating new ones. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20240703125541.35d89c5e4ae8.I4feb8d34e7b30768d21365ec22c944bacc274d0b@changeid Signed-off-by: Johannes Berg commit adc902ceada26add77ad75426805e973a7c67f01 Author: Benjamin Berg Date: Wed Jul 3 12:58:54 2024 +0300 wifi: iwlwifi: keep the TSO and workaround pages mapped Map the pages when allocating them so that we will not need to map each of the used fragments at a later point. For now the mapping is not used, this will be changed in a later commit. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20240703125541.7ced468fe431.Ibb109867dc680c37fe8d891e9ab9ef64ed5c5d2d@changeid Signed-off-by: Johannes Berg commit 7f5e3038f02902a1409c9ad0f07e3b11c581c113 Author: Benjamin Berg Date: Wed Jul 3 12:58:53 2024 +0300 wifi: iwlwifi: map entire SKB when sending AMSDUs This adds logic to map the entire SKB for AMSDUs. The required scatter gather list is allocated together with the space for TSO headers. Unmapping happens again when free'ing the TSO header page. For now the mapping is unused, this will be changed in a later commit. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.96c6006f40ff.I55b74bc97c4026761397a7513a559c88a10b6489@changeid Signed-off-by: Johannes Berg commit d023a228e927c142c5c418dae346f63d1c8ba105 Author: Benjamin Berg Date: Wed Jul 3 12:58:52 2024 +0300 wifi: iwlwifi: return a new allocation for hdr page space Instead of returning the pointer to the structure describing the header page, return the pointer to the newly allocated area. This disentangles the user from the allocation within the page as it does not need to advance the position itself. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20240703125541.044f2cb373f1.I52a807ac6f311b89530e18deacc7452638a6f5d8@changeid Signed-off-by: Johannes Berg commit f27579ff8b9344226db63a902dc9e9cbddf07b74 Author: Johannes Berg Date: Wed Jul 3 12:58:51 2024 +0300 wifi: iwlwifi: mvm: simplify EMLSR blocking If EMLSR is already blocked for the same reason that it's blocked for again, there's no need to actually do any work, so exit early from the function. Also, print the state after modifying it, so it's clearer. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.6995464f0bac.Iac9fe3546ca0a0d6bc6666c822a667ab257419a9@changeid Signed-off-by: Johannes Berg commit d81bf4b63006330d1f70a59414eae61e1a60e677 Author: Johannes Berg Date: Wed Jul 3 12:58:50 2024 +0300 wifi: iwlwifi: mvm: align reorder buffer entries to cacheline The entries[] array needs to be cacheline aligned to avoid false sharing between different queues, each queue has a set of entries in it that it writes to. While it is aligned in practice today given that each array entry before it is aligned, it's still clearer to explicitly require it to be aligned, so add the annotation for that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.3bc7a55ac867.Id3c1df6d40e92c3de9caededcbc32d0e57e4423d@changeid Signed-off-by: Johannes Berg commit eb801f4fabdf877d38c4746333e3454c4e7603cc Author: Johannes Berg Date: Wed Jul 3 12:58:49 2024 +0300 wifi: iwlwifi: mvm: clean up reorder buffer data We really don't need to maintain the buffer size per queue buffer, it's the same for the whole BA session. Also, we no longer use the mvm pointer inside each queue's data structure. Clean that up. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240703125541.64ea1ba75379.I2a25af040061efaf82379e96a84a76c5fb65c677@changeid Signed-off-by: Johannes Berg commit 187accaa328dc4de98064eef176841b8a4716f96 Author: Emmanuel Grumbach Date: Wed Jul 3 06:43:17 2024 +0300 wifi: iwlwifi: mvm: don't send an ROC command with max_delay = 0 The firmware can't handle that (it will crash with ASSERT 300A). This happened because we looked at vif->bss_conf which is not the right bss_conf to look at in case of an MLD connection. Fix iwl_mvm_roc_duration_and_delay to iterate on the active links to get the right value for the dtim_interval. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20240703064027.e12f8d84c8fd.I3dd9f720c678c06ec7a5bf7ca56e21cf0b614c8c@changeid Signed-off-by: Johannes Berg commit 4278d88fedcfde1b91a5cfa96acb0e06d7742e12 Author: Johannes Berg Date: Tue Jul 2 13:00:00 2024 +0200 wifi: iwlwifi: mvm: fix interface combinations The NAN code referenced in this commit isn't actually present in the driver (any more), and the commit didn't add the extra NAN entry. Thus, the -1 is incorrect. Reported-by: Alexander Wetzel Closes: https://lore.kernel.org/20240702104128.26394-1-Alexander@wetzel-home.de Fixes: 5c38bedac16a ("wifi: iwlwifi: mvm: unify and fix interface combinations") Link: https://patch.msgid.link/20240702130001.8c871a3f0b5a.I08a6542f52f63c5bd66bf3feb09e1998ce7c60e5@changeid Signed-off-by: Johannes Berg commit 5080808c3339de2220c602ab7c7fa23dc6c1a5a3 Author: Aleksandr Mishin Date: Wed Jul 3 22:10:07 2024 +0300 ASoC: amd: Adjust error handling in case of absent codec device acpi_get_first_physical_node() can return NULL in several cases (no such device, ACPI table error, reference count drop to 0, etc). Existing check just emit error message, but doesn't perform return. Then this NULL pointer is passed to devm_acpi_dev_add_driver_gpios() where it is dereferenced. Adjust this error handling by adding error code return. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Aleksandr Mishin Link: https://patch.msgid.link/20240703191007.8524-1-amishin@t-argos.ru Signed-off-by: Mark Brown commit 9f3ae72c5dbca9ba558c752f1ef969ed6908be01 Author: Krzysztof Kozlowski Date: Mon Jul 1 14:26:16 2024 +0200 ASoC: codecs: wcd939x: Fix typec mux and switch leak during device removal Driver does not unregister typec structures (typec_mux_dev and typec_switch_desc) during removal leading to leaks. Fix this by moving typec registering parts to separate function and using devm interface to release them. This also makes code a bit simpler: - Smaller probe() function with less error paths and no #ifdefs, - No need to store typec_mux_dev and typec_switch_desc in driver state container structure. Cc: stable@vger.kernel.org Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://patch.msgid.link/20240701122616.414158-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 1e0dff741b0a8af35645e5c3ffc4050893002a9c Author: Shengjiu Wang Date: Wed Jul 3 20:26:15 2024 +0800 ASoC: ak4458: remove "reset-gpios" property handler commit c721f189e89c0 ("reset: Instantiate reset GPIO controller for shared reset-gpios") check if there is no "resets" property will fallback to "reset-gpios". So don't need to handle "reset-gpios" separately in the driver, the "reset-gpios" handler is duplicated with "resets" control handler, remove it. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1720009575-11677-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 6558e8737af2067763e115ce3759372cd068b897 Author: Peter Ujfalusi Date: Thu Jul 4 10:59:44 2024 +0200 ASoC: SOF: ipc4-topology: Use single token list for the copiers There is no need to keep separate token list for dai and 'common' copier token list when the 'common' list is actually the aif list, the SOF_COPIER_DEEP_BUFFER_TOKENS are not applicable for buffers. We could have separate lists for all types but it is probably simpler to just use a single list for all types of copiers. Function specific tokens will be only parsed by function specific code anyways. Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240704085944.371450-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6fb75c967162c28b2a50cb4673cce36e0e70e3dc Author: Rafael J. Wysocki Date: Mon Jun 17 20:07:35 2024 +0200 thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points It is generally inefficient to iterate over trip indices and call thermal_zone_get_trip() every time to get the struct thermal_trip corresponding to the given trip index, so modify the uniphier thermal driver to use thermal_zone_for_each_trip() for walking trips. Signed-off-by: Rafael J. Wysocki Reviewed-by: Kunihiko Hayashi Link: https://patch.msgid.link/2148114.bB369e8A3T@kreacher [ rjw: Add missing return statement, remove unused local variable ] Signed-off-by: Rafael J. Wysocki commit 188d9cae54388171d28bd632a2561863db4b9f8b Author: Herve Codina Date: Mon Jul 1 13:30:37 2024 +0200 ASoC: fsl: fsl_qmc_audio: Add support for non-interleaved mode. The current fsl_qmc_audio works in interleaved mode. The audio samples are interleaved and all data are sent to (received from) one QMC channel. Using several QMC channels, non interleaved mode can be easily supported. In that case, data related to ch0 are sent to (received from) the first QMC channel, data related to ch1 use the next QMC channel and so on up to the last channel. In terms of constraints and settings, the two modes are slightly different: - Interleaved mode: - The sample size should fit in the number of time-slots available for the QMC channel. - The number of audio channels should fit in the number of time-slots (taking into account the sample size) available for the QMC channel. - Non-interleaved mode: - The number of audio channels is the number of available QMC channels. - Each QMC channel should have the same number of time-slots. - The sample size equals the number of time-slots of one QMC channel. Add support for the non-interleaved mode allowing multiple QMC channel per DAI. The DAI switches in non-interleaved mode when more that one QMC channel is available. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-11-herve.codina@bootlin.com Signed-off-by: Mark Brown commit fb6013168fa94d5863ed6085b24eaeb89102ad74 Author: Herve Codina Date: Mon Jul 1 13:30:36 2024 +0200 dt-bindings: sound: fsl,qmc-audio: Add support for multiple QMC channels per DAI The QMC audio uses one QMC channel per DAI and uses this QMC channel to transmit interleaved audio channel samples. In order to work in non-interleave mode, a QMC audio DAI needs to use multiple QMC channels. In that case, the DAI maps each QMC channel to exactly one audio channel. Allow QMC audio DAIs with multiple QMC channels attached. Signed-off-by: Herve Codina Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240701113038.55144-10-herve.codina@bootlin.com Signed-off-by: Mark Brown commit af8432b2e41abc0a20bdc01a3b144ea7b2f1ee09 Author: Herve Codina Date: Mon Jul 1 13:30:35 2024 +0200 soc: fsl: cpm1: qmc: Introduce qmc_chan_count_phandles() No function in the QMC API is available to get the number of phandles present in a phandle list. Fill this lack introducing qmc_chan_count_phandles(). Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-9-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 37797c605da33445adc112561695f70bfaa11133 Author: Herve Codina Date: Mon Jul 1 13:30:34 2024 +0200 soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list qmc_chan_get_byphandle() and the resource managed version retrieve a channel from a simple phandle. Extend the API and introduce qmc_chan_get_byphandles_index() and the resource managed version in order to retrieve a channel from a phandle list using the provided index to identify the phandle in the list. Also update qmc_chan_get_byphandle() and the resource managed version to use qmc_chan_get_byphandles_index() and so avoid code duplication. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-8-herve.codina@bootlin.com Signed-off-by: Mark Brown commit b81cfa66435bdab896b4c24e11d24ec33bdb0601 Author: Herve Codina Date: Mon Jul 1 13:30:33 2024 +0200 ASoC: fsl: fsl_qmc_audio: Introduce qmc_dai_constraints_interleaved() Constraints are set by qmc_dai_startup(). These constraints are specific to the interleaved mode. With the future introduction of support for non-interleaved mode, a new set of constraints will be set. To make the code clear and keep qmc_dai_startup() simple, extract the current interleaved mode constraints settings to a specific function. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-7-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 33a6969fbc653f25d5204b17fb67d5a21e6295e6 Author: Herve Codina Date: Mon Jul 1 13:30:32 2024 +0200 ASoC: fsl: fsl_qmc_audio: Introduce qmc_audio_pcm_{read,write}_submit() Submitting data to QMC channels is done in several places: transfer completions and DAI start. The operation done is simple and consist in one function call. With the future introduction of support for non-interleaved mode, submitting data will be more complex. To avoid copy/paste of code in several places, introduce qmc_audio_pcm_{read,write}_submit() whose goal is to handle this data submission. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-6-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 5e51a1f9dfd90de6e44cfb5340d48263f9e8f8d8 Author: Herve Codina Date: Mon Jul 1 13:30:31 2024 +0200 ASoC: fsl: fsl_qmc_audio: Identify the QMC channel involved in completion routines The current QMC audio driver uses only one QMC channel per DAI. The context used by QMC channel transfer (read and write) completion routines does not contains any QMC channel and the only one available per DAI is used to schedule the next transfer. This works pretty well with only one QMC channel per DAI. The future support for non-inlerleave mode will use several QMC channel per DAI. In that case, QMC channel transfer completion routines need to identify the QMC channel related to the completion. In order to fill this lack, even if identifying the current QMC channel among several QMC channels is not needed for the current code, add one indirection level and introduce the qmc_dai_chan data structrure. This structure contains the QMC channel involved in the completion and refererences to the runtime context (capture and playback) used by the DAI. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-5-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 42212b2ce8b1182d536452eee2880d2de7cce059 Author: Herve Codina Date: Mon Jul 1 13:30:30 2024 +0200 ASoC: fsl: fsl_qmc_audio: Split channel buffer and PCM pointer handling The driver mixes some internal values for channel DMA buffer handling and PCM pointer handling. In the currently supported interleaved mode, this mix does not lead to any issues but in order to prepare the support for the non-interleaved mode, having them clearly separated will ease the support and avoid additional computation to convert values used in channel DMA buffer management in values usable for PCM pointer. Use a specific set of variable for PCM pointer handling and an other set for channel DMA buffer. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-4-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 86dd725b57a88869acfe15b0405937450d0aef30 Author: Herve Codina Date: Mon Jul 1 13:30:29 2024 +0200 ASoC: fsl: fsl_qmc_audio: Fix issues detected by checkpatch ./scripts/checkpatch.pl --strict --codespell detected several issues when running on the fsl_qmc_audio.c file: - CHECK: spaces preferred around that '*' (ctx:VxV) - CHECK: Alignment should match open parenthesis - CHECK: Comparison to NULL could be written "!prtd" - CHECK: spaces preferred around that '/' (ctx:VxV) - CHECK: Lines should not end with a '(' - CHECK: Please don't use multiple blank lines Some of them are present several times. Fix all of these issues without any functional changes. Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-3-herve.codina@bootlin.com Signed-off-by: Mark Brown commit e62599902327d27687693f6e5253a5d56583db58 Author: Herve Codina Date: Mon Jul 1 13:30:28 2024 +0200 ASoC: fsl: fsl_qmc_audio: Check devm_kasprintf() returned value devm_kasprintf() can return a NULL pointer on failure but this returned value is not checked. Fix this lack and check the returned value. Fixes: 075c7125b11c ("ASoC: fsl: Add support for QMC audio") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Link: https://patch.msgid.link/20240701113038.55144-2-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 056600ff73307cadb89a07d068c9348b17eb530a Author: Anshuman Khandual Date: Thu Jun 13 15:57:10 2024 +0530 arm64/cpufeature: Replace custom macros with fields from ID_AA64PFR0_EL1 This replaces custom macros usage (i.e ID_AA64PFR0_EL1_ELx_64BIT_ONLY and ID_AA64PFR0_EL1_ELx_32BIT_64BIT) and instead directly uses register fields from ID_AA64PFR0_EL1 sysreg definition. Finally let's drop off both these custom macros as they are now redundant. Cc: Will Deacon Cc: Mark Rutland Cc: Mark Brown Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240613102710.3295108-3-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 42b9fed388a510cdb17d25c0dc1c8b72c4828cea Author: Anshuman Khandual Date: Thu Jun 13 15:57:09 2024 +0530 KVM: arm64: Replace custom macros with fields from ID_AA64PFR0_EL1 This replaces custom macros usage (i.e ID_AA64PFR0_EL1_ELx_64BIT_ONLY and ID_AA64PFR0_EL1_ELx_32BIT_64BIT) and instead directly uses register fields from ID_AA64PFR0_EL1 sysreg definition. Cc: Marc Zyngier Cc: Oliver Upton Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: kvmarm@lists.linux.dev Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240613102710.3295108-2-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit aa77b112801613d394f893509d8187f1a332c1a4 Author: Oleksij Rempel Date: Wed Jul 3 10:38:20 2024 +0200 net: dsa: microchip: lan937x: Add error handling in lan937x_setup Introduce error handling for lan937x_cfg function calls in lan937x_setup. This change ensures that if any lan937x_cfg or ksz_rmw32 calls fails, the function will return the appropriate error code. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Link: https://patch.msgid.link/20240703083820.3152100-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 47c130130de2fd68d9e4f591b0ea25975bdad68a Author: Thorsten Blum Date: Wed Jul 3 08:11:48 2024 +0200 l2tp: Remove duplicate included header file trace.h Remove duplicate included header file trace.h and the following warning reported by make includecheck: trace.h is included more than once Compile-tested only. Signed-off-by: Thorsten Blum Reviewed-by: Michal Kubiak Link: https://patch.msgid.link/20240703061147.691973-2-thorsten.blum@toblux.com Signed-off-by: Paolo Abeni commit 997197b58bf6e22b8c6ef88a168d8292fa9acec9 Author: Zijun Hu Date: Tue Jul 2 22:51:54 2024 +0800 devres: Correct code style for functions that return a pointer type Correct code style for several functions that return a pointer type. Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/1719931914-19035-6-git-send-email-quic_zijuhu@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 56a20ad349b5c51909cf8810f7c79b288864ad33 Author: Zijun Hu Date: Tue Jul 2 22:51:52 2024 +0800 devres: Initialize an uninitialized struct member Initialize an uninitialized struct member for driver API devres_open_group(). Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/1719931914-19035-4-git-send-email-quic_zijuhu@quicinc.com Signed-off-by: Greg Kroah-Hartman commit bd50a974097bb82d52a458bd3ee39fb723129a0c Author: Zijun Hu Date: Tue Jul 2 22:51:51 2024 +0800 devres: Fix memory leakage caused by driver API devm_free_percpu() It will cause memory leakage when use driver API devm_free_percpu() to free memory allocated by devm_alloc_percpu(), fixed by using devres_release() instead of devres_destroy() within devm_free_percpu(). Fixes: ff86aae3b411 ("devres: add devm_alloc_percpu()") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/1719931914-19035-3-git-send-email-quic_zijuhu@quicinc.com Signed-off-by: Greg Kroah-Hartman commit c884e3249f753dcef7a2b2023541ac1dc46b318e Author: Zijun Hu Date: Tue Jul 2 22:51:50 2024 +0800 devres: Fix devm_krealloc() wasting memory Driver API devm_krealloc() calls alloc_dr() with wrong argument @total_new_size, so causes more memory to be allocated than required fix this memory waste by using @new_size as the argument for alloc_dr(). Fixes: f82485722e5d ("devres: provide devm_krealloc()") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/1719931914-19035-2-git-send-email-quic_zijuhu@quicinc.com Signed-off-by: Greg Kroah-Hartman commit d2b88700ead3be641d565a359fd522f71b4737e4 Author: Sebastian Ene Date: Wed Jul 3 15:37:32 2024 +0000 misc: Register a PPI for the vcpu stall detection virtual device Request a PPI for each vCPU during probe which will be used by the host to communicate a stall detected event on the vCPU. When the host raises this interrupt from the virtual machine monitor, the guest is expected to handle the interrupt and panic. Signed-off-by: Sebastian Ene Link: https://lore.kernel.org/r/20240703153732.3214238-3-sebastianene@google.com Signed-off-by: Greg Kroah-Hartman commit 173c044752b79949335298a3c2566b19831750c1 Author: Sebastian Ene Date: Wed Jul 3 15:37:31 2024 +0000 dt-bindings: vcpu_stall_detector: Add a PPI interrupt to the virtual device The vcpu stall detector allows the host to monitor the availability of a guest VM. Introduce a PPI interrupt which can be injected from the host into the virtual gic to let the guest reboot itself. Acked-by: Conor Dooley Signed-off-by: Sebastian Ene Link: https://lore.kernel.org/r/20240703153732.3214238-2-sebastianene@google.com Signed-off-by: Greg Kroah-Hartman commit be6299c6e55e971ffc060495708740a59aa0e45b Author: Thomas Weißschuh Date: Sat Jun 8 21:19:37 2024 +0200 power: supply: sysfs: use power_supply_property_is_writeable() Instead of open-coding the helper use it directly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240608-power-supply-extensions-v2-1-2dcd35b012ad@weissschuh.net Signed-off-by: Sebastian Reichel commit a1944676767e855869b6af8e1c7e185372feaf31 Author: Gerhard Engleder Date: Sun Jun 30 21:47:39 2024 +0200 misc: keba: Add basic KEBA CP500 system FPGA support The KEBA CP500 system FPGA is a PCIe device, which consists of multiple IP cores. Every IP core has its own auxiliary driver. The cp500 driver registers an auxiliary device for each device and the corresponding drivers are loaded by the Linux driver infrastructure. Currently 3 variants of this device exists. Every variant has its own PCI device ID, which is used to determine the list of available IP cores. In this first version only the auxiliary device for the I2C controller is registered. Besides the auxiliary device registration some other basic functions of the FPGA are implemented; e.g, FPGA version sysfs file, keep FPGA configuration on reset sysfs file, error message for errors on the internal AXI bus of the FPGA. Signed-off-by: Gerhard Engleder Link: https://lore.kernel.org/r/20240630194740.7137-2-gerhard@engleder-embedded.com Signed-off-by: Greg Kroah-Hartman commit 98ff534ec2cd02496c166614e6c1391d8e092e51 Author: Johannes Berg Date: Wed Jul 3 18:46:23 2024 +0200 um: vector: always reset vp->opened If open fails, we have already set vp->opened, but it's not reset so that any further attempts will just return -ENXIO. Reset vp->opened even if close has nothing to do. This helps e.g. with slirp4netns handling only a single connection, you can then restart it and open the device again. Link: https://patch.msgid.link/20240703184622.df40c5c38461.Id4e20b48938c6019d99e6133227a34ac059db466@changeid Acked-By: Anton Ivanov Signed-off-by: Johannes Berg commit a0470a9f699a847e519293db9e33a4dae169467d Author: Johannes Berg Date: Wed Jul 3 18:46:07 2024 +0200 um: vector: remove vp->lock This lock is useless, all the places that are using it for some locking will already hold the RTNL. Just remove it. Link: https://patch.msgid.link/20240703184606.19aa35b14959.I9cf5f2c4e35abd06cc89bf2e990fa755eb8e5f0f@changeid Acked-By: Anton Ivanov Signed-off-by: Johannes Berg commit 86abcd6eeb56e49311aea2f4695af0b3b5eaeb26 Author: Johannes Berg Date: Wed Jul 3 17:38:40 2024 +0200 um: register power-off handler Otherwise we always get reboot: Power off not available: System halted instead which is really quite pointless. Link: https://patch.msgid.link/20240703173839.fcbb538c6686.I3d333f4773cff93c4337c4d128ee0b1b501b3dfa@changeid Acked-By: Anton Ivanov Signed-off-by: Johannes Berg commit 824ac4a5edd3f7494ab1996826c4f47f8ef0f63d Author: Johannes Berg Date: Wed Jul 3 17:22:36 2024 +0200 um: line: always fill *error_out in setup_one_line() The pointer isn't initialized by callers, but I have encountered cases where it's still printed; initialize it in all possible cases in setup_one_line(). Link: https://patch.msgid.link/20240703172235.ad863568b55f.Iaa1eba4db8265d7715ba71d5f6bb8c7ff63d27e9@changeid Acked-By: Anton Ivanov Signed-off-by: Johannes Berg commit bc94745d042bff9c5888451816d1a1efc7566fc3 Author: Johannes Berg Date: Wed Jul 3 17:20:14 2024 +0200 um: remove pcap driver from documentation We just removed the driver, but forgot the row in the documentation table mentioning it. Remove that. Link: https://patch.msgid.link/20240703172013.c3232dc5cbe9.I7f9941095d45a39d0f1e83680a408b3c6d445242@changeid Acked-By: Anton Ivanov Signed-off-by: Johannes Berg commit 6150e5e1ae2d8ad72f52217f8f41fe446cae9e27 Author: Guenter Roeck Date: Sat Jun 29 10:37:16 2024 -0700 eeprom: ee1004: Instantiate jc42 devices for DIMMS implementing Rev.1 SPD DDR4 DIMMS implementing SPD Annex L, Revision 1 do not implement SPD byte 14 (Module Temperature Sensor); this byte was only added in revision 2 of the standard. This only applies to DDR4, not DDR4E or LPDDR4, since those DDR types were only introduced in revision 3 of the standard. Use this information to instantiate the jc42 device if the module is a DDR4 following SPD revision 1.0 and a device is detected at the expected thermal sensor address, even if the Module Temperature Sensor byte suggests that the thermal sensor is not supported. Cc: Heiner Kallweit Cc: Thomas Weißschuh Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20240629173716.20389-2-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 249b4deaff71cfc6ac9a8e436af876be6d84052b Author: Guenter Roeck Date: Sat Jun 29 10:37:15 2024 -0700 eeprom: ee1004: Call i2c_new_scanned_device to instantiate thermal sensor Instantiating a device by calling i2c_new_client_device() assumes that the device is not already instantiated. If that is not the case, it will return an error and generate a misleading kernel log message. i2c i2c-0: Failed to register i2c client jc42 at 0x18 (-16) This can be reproduced by unloading the ee1004 driver and loading it again. Avoid this by calling i2c_new_scanned_device() instead, which returns silently if a device is already instantiated or does not exist. Fixes: 393bd1000f81 ("eeprom: ee1004: add support for temperature sensor") Cc: Heiner Kallweit Cc: Thomas Weißschuh Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20240629173716.20389-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 79d0df36b54179ac2192e56ad7fdb29c952f35e2 Author: Armin Wolf Date: Tue Jun 25 08:34:59 2024 +0200 eeprom: ee1004: Add nvmem support Currently the driver does not register a nvmem provider, which means that userspace programs cannot access the ee1004 EEPROM through the standard nvmem sysfs API. Fix this by replacing the custom sysfs attribute with a standard nvmem interface, which also takes care of backwards compatibility. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20240625063459.429953-2-W_Armin@gmx.de Signed-off-by: Greg Kroah-Hartman commit 55d57ef6fa97ca631d393cccc641cbe1b16cc382 Author: Armin Wolf Date: Tue Jun 25 08:34:58 2024 +0200 eeprom: ee1004: Use devres for bus data cleanup Use devm_add_action_or_reset() to clean up the bus data at driver removal or when an error occurs during probe. This will allow us to use other devres-based APIs later. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20240625063459.429953-1-W_Armin@gmx.de Signed-off-by: Greg Kroah-Hartman commit 23c6859677066fa3d6bb3672703636dd673cb5dd Author: Andy Shevchenko Date: Thu Jun 6 19:49:26 2024 +0300 driver core: platform: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606164926.3031358-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f97106b10d9ac0b5472be45cbc2d3de7d654648a Author: Niklas Cassel Date: Wed Jul 3 20:44:26 2024 +0200 ata: ahci: Add debug print for external port Add a debug print that tells us if LPM is not getting enabled because the port is external. Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-20-cassel@kernel.org Signed-off-by: Niklas Cassel commit 0d3603acffe294ffacaf75b18b46f182b68a50df Author: Niklas Cassel Date: Wed Jul 3 20:44:25 2024 +0200 ata,scsi: Remove wrapper ata_sas_port_alloc() The ata_sas_port_alloc() wrapper mainly exists in order to export the internal libata function which it wraps. The secondary reason is that it initializes some ata_port struct members. However, ata_sas_port_alloc() is only used in a single location, sas_ata_init(), which already performs some ata_port struct member initialization, so it does not make sense to spread this initialization out over two separate locations. Thus, remove the wrapper and instead export the libata function directly, and move the libsas specific ata_port initialization to sas_ata_init(), which already does some ata_port initialization. Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-19-cassel@kernel.org Signed-off-by: Niklas Cassel commit 1228713c75b891291e86c4b1ff0228862fad096a Author: Niklas Cassel Date: Wed Jul 3 20:44:24 2024 +0200 ata: libata-core: Reuse available ata_port print_ids Currently, the ata_port print_ids are increased indefinitely, even when there are lower ids available. E.g. on first boot you will have ata1-ata6 assigned. After a rmmod + modprobe, you will instead have ata7-ata12 assigned. Move to use the ida_alloc() API, such that print_ids will get reused. This means that even after a rmmod + modprobe, the ports will be assigned print_ids ata1-ata6. Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-18-cassel@kernel.org Signed-off-by: Niklas Cassel commit 1c1fbb865d713d667d62c9c676b79cf9c14ba39e Author: Niklas Cassel Date: Wed Jul 3 20:44:23 2024 +0200 ata: libata: Assign print_id at port allocation time While the assignment of ap->print_id could have been moved to ata_host_alloc(), let's simply move it to ata_port_alloc(). If you allocate a port, you want to give it a unique name that can be used for printing. By moving the ap->print_id assignment to ata_port_alloc(), means that we can also remove the ap->print_id assignment from ata_sas_port_alloc(). This will allow a LLD to use the ata_port_*() print functions before ata_host_register() has been called. Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-17-cassel@kernel.org Signed-off-by: Niklas Cassel commit 1dd63a6b573ffb989ca618e60b6469f885454606 Author: Niklas Cassel Date: Wed Jul 3 20:44:22 2024 +0200 ata: libata-core: Remove local_port_no struct member ap->local_port_no is simply ap->port_no + 1. Since ap->local_port_no can be derived from ap->port_no, there is no need for the ap->local_port_no struct member, so remove ap->local_port_no. Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-16-cassel@kernel.org Signed-off-by: Niklas Cassel commit 6933eb8e50a3e4dc129095cb795261454476f111 Author: Niklas Cassel Date: Wed Jul 3 20:44:21 2024 +0200 ata: libata-sata: Remove superfluous assignment in ata_sas_port_alloc() ata_sas_port_alloc() calls ata_port_alloc() which already assigns ap->lock so there is no need for ata_sas_port_alloc() to assign it again. Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-15-cassel@kernel.org Signed-off-by: Niklas Cassel commit 23262cce529e9f437ce2fa8fe4c2fa5b2b182318 Author: Niklas Cassel Date: Wed Jul 3 20:44:20 2024 +0200 ata: libata-core: Remove support for decreasing the number of ports Commit f31871951b38 ("libata: separate out ata_host_alloc() and ata_host_register()") added ata_host_alloc(), where the API allowed a LLD to overallocate the number of ports supplied to ata_host_alloc(), as long as the LLD decreased host->n_ports before calling ata_host_register(). However, this functionally has never ever been used by a single LLD. Because of the current API design, the assignment of ap->print_id is deferred until registration time, which is bad, because that means that the ata_port_*() print functions cannot be used by a LLD until after registration time, which means that a LLD is forced to use a print function that is non-port specific, even for a port specific error. Remove the support for decreasing the number of ports, such that it will be possible to assign ap->print_id earlier. Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-14-cassel@kernel.org Signed-off-by: Niklas Cassel commit 2199d6ff565d66ccf0ff1ea1c6466c379e7cbb58 Author: Niklas Cassel Date: Wed Jul 3 20:44:19 2024 +0200 ata: libata: Remove unused function declaration for ata_scsi_detect() Remove unused function declaration for ata_scsi_detect(). Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-13-cassel@kernel.org Signed-off-by: Niklas Cassel commit c10bc5614ce0027fa2282ad11827629d81957a3a Author: Niklas Cassel Date: Wed Jul 3 20:44:18 2024 +0200 ata,scsi: Remove wrappers ata_sas_tport_{add,delete}() The ata_sas_tport_add() and ata_sas_tport_delete() wrappers only exist in order to export the internal libata functions which they wrap. Remove the wrappers and instead export the libata functions directly. Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240703184418.723066-12-cassel@kernel.org Signed-off-by: Niklas Cassel commit 831d83a5374af5c03d7771ef85fd9d46d685cf55 Merge: 816be86c7993d eeb25a09c5e08 Author: Niklas Cassel Date: Thu Jul 4 11:19:58 2024 +0200 Merge remote-tracking branch 'libata/for-6.10-fixes' into for-6.11 Pull in bug fixes. commit 49cdc4e834e46d7c11a91d7adcfa04f56d19efaf Author: Long Li Date: Wed Jul 3 14:42:26 2024 +0800 xfs: get rid of xfs_ag_resv_rmapbt_alloc The pag in xfs_ag_resv_rmapbt_alloc() is already held when the struct xfs_btree_cur is initialized in xfs_rmapbt_init_cursor(), so there is no need to get pag again. On the other hand, in xfs_rmapbt_free_block(), the similar function xfs_ag_resv_rmapbt_free() was removed in commit 92a005448f6f ("xfs: get rid of unnecessary xfs_perag_{get,put} pairs"), xfs_ag_resv_rmapbt_alloc() was left because scrub used it, but now scrub has removed it. Therefore, we could get rid of xfs_ag_resv_rmapbt_alloc() just like the rmap free block, make the code cleaner. Signed-off-by: Long Li Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 14c4dc8bb620c4c75b06d267a542eb1ac44cdd29 Merge: dfd19866d1a3f 529d2e1900642 Author: Greg Kroah-Hartman Date: Thu Jul 4 11:04:20 2024 +0200 Merge tag 'iio-for-6.11b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of new device support, features and cleanup for 6.11 The big one here is we finally have Paul Cercueil's (and others) DMA buffer support for IIO devices enabling high speed zero copy transfer of data to and from sensors supported by IIO (and for example USB). This should aid with upstream support of a range of higher performance ADCs and DACs. Two merges from other trees - spi/spi_devm_optimize used for simplification in ad7944. - dmaengine/topic_dma_vec to enable the DMABUF series. One feature with impact outside IIO. - Richer set of dev_err_probe() like helpers to cover ERR_PTR() cases. New device support ================== adi,ad7173 - Add support for AD4111, AD4112, AD4114, AD4115 and ADC4116 pseudo differential ADCs. Major driver rework was needed to enabled these. adi,ad7944 - Use devm_spi_optimize_message() to avoid a local devm cleanup callback. This is the example case from the patch set, others will follow. mediatek,mt6359-auxadc - New driver for this ADC IP found in MT6357, MT6358 and MT6359 PMICs. st,accel - Add support for the LIS2DS12 accelerometer ti,ads1119 - New driver for this 16 bit 2-differential or 4-single ended channel ADC. Features ======== dt-bindings - Introduce new common-mode-channel property to help handle pseudo differential ADCs where we have something that looks like one side of differential input, but which is only suited for use with a slow moving reference. adi,adf4350 - Support use as a clock provider. iio-hmwon - Support reading of labels from IIO devices by their consumers and use this in the hwmon bridge. Cleanup and minor fixes ======================= Treewide - Use regmap_clear_bits() / regmap_set_bits() to simplify open coded equivalents. - Use devm_regulator_get_enable_read_voltage() to replace equivalent opencoded boilerplate. In some cases enabled complete conversion to devm handling and removal of explicit remove() callbacks. - Introduce dev_err_ptr_probe() and other variants and make use of of them in a couple of examples driver cleanups. Will find use in many more drivers soon. adi,ad7192 - Introduce local struct device *dev and use dev_err_probe() to give more readable code. adi,adi-axi-adc/dac - Improved consistency of messages using dev_err_probe() adi,adis - Split the trigger handling into cases that needed paging and those that don't resulting in more readable code. - Use cleanup.h to simplify error paths via scoped cleanup. - Add adis specific lock helpers and make use of them in a number of drivers. adi,ad7192 - Update maintainer (Alisa-Dariana Roman) adi,ad7606 - dt-binding cleanup. avago,apds9306 - Add a maintainer entry (Subhajit Ghosh) linear,ltc2309 - Fix a wrong endian type. st,stm32-dfsdm - Fix a missing port property in the dt-binding. st,sensors - Relax whoami match failure to a warning print rather than probe failure. This enables fallback compatibles to existing parts from those that don't necessarily even exit yet. * tag 'iio-for-6.11b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (112 commits) iio: adc: ad7173: Fix uninitialized symbol is_current_chan iio: adc: Add support for MediaTek MT6357/8/9 Auxiliary ADC math.h: Add unsigned 8 bits fractional numbers type dt-bindings: iio: adc: Add MediaTek MT6359 PMIC AUXADC iio: common: scmi_iio: convert to dev_err_probe() iio: backend: make use of dev_err_cast_probe() iio: temperature: ltc2983: convert to dev_err_probe() dev_printk: add new dev_err_probe() helpers iio: xilinx-ams: Add labels iio: adc: ad7944: use devm_spi_optimize_message() Documentation: iio: Document high-speed DMABUF based API iio: buffer-dmaengine: Support new DMABUF based userspace API iio: buffer-dma: Enable support for DMABUFs iio: core: Add new DMABUF interface infrastructure MAINTAINERS: Update AD7192 driver maintainer iio: adc: ad7192: use devm_regulator_get_enable_read_voltage iio: st_sensors: relax WhoAmI check in st_sensors_verify_id() MAINTAINERS: Add AVAGO APDS9306 dt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names dt-bindings: iio: adc: adi,ad7606: add missing datasheet link ... commit 29832adac01a1057e89579c977ef4776623ee463 Author: Abel Vesa Date: Fri Jun 21 10:16:35 2024 +0300 power: supply: qcom_battmgr: Enable battery support on x1e80100 The x1e80100, being a compute platform, provides functionality for the exact same power supplies as sc8280xp. Add the compatible and assign the sc8280xp match data. Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20240621-x1e80100-power-supply-qcom-battmgr-v1-1-40cb89a0c144@linaro.org Signed-off-by: Sebastian Reichel commit 896868eded124059023be0af92d68cdaf9b4de70 Author: Steven Price Date: Wed Jul 3 16:56:46 2024 +0100 drm/panthor: Record devfreq busy as soon as a job is started If a queue is already assigned to the hardware, then a newly submitted job can start straight away without waiting for the tick. However in this case the devfreq infrastructure isn't notified that the GPU is busy. By the time the tick happens the job might well have finished and no time will be accounted for the GPU being busy. Fix this by recording the GPU as busy directly in queue_run_job() in the case where there is a CSG assigned and therefore we just ring the doorbell. Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") Signed-off-by: Steven Price Reviewed-by: Boris Brezillon Reviewed-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240703155646.80928-1-steven.price@arm.com commit 479b6d04964b5abe66c9f5080fad3389b34e2a70 Author: Dimitri Fedrau Date: Tue Jul 2 11:03:08 2024 +0200 power: supply: add support for MAX1720x standalone fuel gauge The MAX17201 monitors a single cell pack. The MAX17205 monitors and balances a 2S or 3S pack or monitors a multiple-series cell pack. Both devices use a I2C interface. Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20240702090308.8848-3-dima.fedrau@gmail.com Signed-off-by: Sebastian Reichel commit ad0aa2361c8c0d1f29db3d6da4a11be41813296d Author: Dimitri Fedrau Date: Tue Jul 2 11:03:07 2024 +0200 dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge Adding documentation for MAXIMs MAX17201/MAX17205 fuel gauge. Reviewed-by: Conor Dooley Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20240702090308.8848-2-dima.fedrau@gmail.com Signed-off-by: Sebastian Reichel commit ba942238056584efd3adc278a76592258d500918 Author: Anuj Gupta Date: Tue Jul 2 15:37:53 2024 +0530 block: reuse original bio_vec array for integrity during clone Modify bio_integrity_clone to reuse the original bvec array instead of allocating and copying it, similar to how bio data path is cloned. Suggested-by: Christoph Hellwig Signed-off-by: Anuj Gupta Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20240702100753.2168-1-anuj20.g@samsung.com Signed-off-by: Jens Axboe commit a18df07b7d3dbfa7ae54962cc59569002eaafd6d Author: Zhu Yanjun Date: Thu Jul 4 03:06:38 2024 +0200 null_blk: don't initialize static 'g_virt_boundary' to false No functional changes intended. Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20240704010638.324349-1-yanjun.zhu@linux.dev Signed-off-by: Jens Axboe commit 7d251bec70171bde2c6fc5b51800d067245a9506 Merge: 162e06871e6dc 25b3a8237a03e Author: Jens Axboe Date: Thu Jul 4 02:03:34 2024 -0600 Merge tag 'md-6.11-20240704' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.11/block Merge MD fixes from Song: "This PR contains various small fixes by Yu Kuai, Benjamin Marzinski, Christophe JAILLET, and Yang Li." * tag 'md-6.11-20240704' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: recheck if reshape has finished with device_lock held md: Don't wait for MD_RECOVERY_NEEDED for HOT_REMOVE_DISK ioctl md-cluster: Constify struct md_cluster_operations md: Remove unneeded semicolon md/raid5: fix spares errors about rcu usage commit 162e06871e6dcde861ef608e0c00a8b6a2d35d43 Author: Anuj Gupta Date: Thu Jul 4 11:45:15 2024 +0530 block: t10-pi: Return correct ref tag when queue has no integrity profile Commit c6e56cf6b2e7 ("block: move integrity information into queue_limits") changed the ref tag calculation logic. It would break if there is no integrity profile. This in turn causes read/write failures for such cases. Fixes: c6e56cf6b2e7 ("block: move integrity information into queue_limits") Signed-off-by: Anuj Gupta Link: https://lore.kernel.org/r/20240704061515.282343-1-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 394ba612f9419ec5bfebbffb72212fd3b2094986 Author: Orlando Chamberlain Date: Wed Jul 3 17:54:11 2024 +0000 HID: apple: Add support for magic keyboard backlight on T2 Macs Unlike T2 Macs with Butterfly keyboard, who have their keyboard backlight on the USB device the T2 Macs with Magic keyboard have their backlight on the Touchbar backlight device (05ac:8102). Support for Butterfly keyboards has already been added in commit 9018eacbe623 ("HID: apple: Add support for keyboard backlight on certain T2 Macs.") This patch adds support for the Magic keyboards. Signed-off-by: Orlando Chamberlain Co-developed-by: Aditya Garg Signed-off-by: Aditya Garg Link: https://patch.msgid.link/E1D444EA-7FD0-42DA-B198-50B0F03298FB@live.com Signed-off-by: Benjamin Tissoires commit 9d9c1796a6ae70290c2e013fe4d79e99039a1015 Author: Bartosz Golaszewski Date: Mon Jun 24 11:39:33 2024 +0200 gpio: sim: lock GPIOs as interrupts when they are requested Use the extended irq_sim interface to supply the simulated interrupt domain with callbacks allowing the GPIO sim to lock/unlock GPIOs requested as interrupts. Reviewed-by: Linus Walleij Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20240624093934.17089-3-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 011f583781fa46699f1d4c4e9c39ad68f05ced2d Author: Bartosz Golaszewski Date: Mon Jun 24 11:39:32 2024 +0200 genirq/irq_sim: add an extended irq_sim initializer Currently users of the interrupt simulator don't have any way of being notified about interrupts from the simulated domain being requested or released. This causes a problem for one of the users - the GPIO simulator - which is unable to lock the pins as interrupts. Define a structure containing callbacks to be executed on various irq_sim-related events (for now: irq request and release) and provide an extended function for creating simulated interrupt domains that takes it and a pointer to custom user data (to be passed to said callbacks) as arguments. Reviewed-by: Linus Walleij Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20240624093934.17089-2-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit f3f7ae68a4ea23aa9c49530733f1faaa6996b03a Author: Dave Chinner Date: Thu Jun 20 09:21:28 2024 +0200 xfs: skip flushing log items during push The AIL pushing code spends a huge amount of time skipping over items that are already marked as flushing. It is not uncommon to see hundreds of thousands of items skipped every second due to inode clustering marking all the inodes in a cluster as flushing when the first one is flushed. However, to discover an item is already flushing and should be skipped we have to call the iop_push() method for it to try to flush the item. For inodes (where this matters most), we have to first check that inode is flushable first. We can optimise this overhead away by tracking whether the log item is flushing internally. This allows xfsaild_push() to check the log item directly for flushing state and immediately skip the log item. Whilst this doesn't remove the CPU cache misses for loading the log item, it does avoid the overhead of an indirect function call and the cache misses involved in accessing inode and backing cluster buffer structures to determine flushing state. When trying to flush hundreds of thousands of inodes each second, this CPU overhead saving adds up quickly. It's so noticeable that the biggest issue with pushing on the AIL on fast storage becomes the 10ms back-off wait when we hit enough pinned buffers to break out of the push loop but not enough for the AIL pushing to be considered stuck. This limits the xfsaild to about 70% total CPU usage, and on fast storage this isn't enough to keep the storage 100% busy. The xfsaild will block on IO submission on slow storage and so is self throttling - it does not need a backoff in the case where we are really just breaking out of the walk to submit the IO we have gathered. Further with no backoff we don't need to gather huge delwri lists to mitigate the impact of backoffs, so we can submit IO more frequently and reduce the time log items spend in flushing state by breaking out of the item push loop once we've gathered enough IO to batch submission effectively. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit c1220522ef405a9ebf19447330c9e9de5dfc649c Author: Dave Chinner Date: Thu Jun 20 09:21:27 2024 +0200 xfs: grant heads track byte counts, not LSNs The grant heads in the log track the space reserved in the log for running transactions. They do this by tracking how far ahead of the tail that the reservation has reached, and the units for doing this are {cycle,bytes} for the reserve head rather than {cycle,blocks} which are normal used by LSNs. This is annoyingly complex because we have to split, crack and combined these tuples for any calculation we do to determine log space and targets. This is computationally expensive as well as difficult to do atomically and locklessly, as well as limiting the size of the log to 2^32 bytes. Really, though, all the grant heads are tracking is how much space is currently available for use in the log. We can track this as a simply byte count - we just don't care what the actual physical location in the log the head and tail are at, just how much space we have remaining before the head and tail overlap. So, convert the grant heads to track the byte reservations that are active rather than the current (cycle, offset) tuples. This means an empty log has zero bytes consumed, and a full log is when the reservations reach the size of the log minus the space consumed by the AIL. This greatly simplifies the accounting and checks for whether there is space available. We no longer need to crack or combine LSNs to determine how much space the log has left, nor do we need to look at the head or tail of the log to determine how close to full we are. There is, however, a complexity that needs to be handled. We know how much space is being tracked in the AIL now via log->l_tail_space and the log tickets track active reservations and return the unused portions to the grant heads when ungranted. Unfortunately, we don't track the used portion of the grant, so when we transfer log items from the CIL to the AIL, the space accounted to the grant heads is transferred to the log tail space. Hence when we move the AIL head forwards on item insert, we have to remove that space from the grant heads. We also remove the xlog_verify_grant_tail() debug function as it is no longer useful. The check it performs has been racy since delayed logging was introduced, but now it is clearly only detecting false positives so remove it. The result of this substantially simpler accounting algorithm is an increase in sustained transaction rate from ~1.3 million transactions/s to ~1.9 million transactions/s with no increase in CPU usage. We also remove the 32 bit space limitation on the grant heads, which will allow us to increase the journal size beyond 2GB in future. Note that this renames the sysfs files exposing the log grant space now that the values are exported in bytes. This allows xfstests to auto-detect the old or new ABI. [hch: move xlog_grant_sub_space out of line, update the xlog_grant_{add,sub}_space prototypes, rename the sysfs files to allow auto-detection in xfstests] Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit de302cea1e3b812e89a15b4eb349d063b2ab3aa1 Author: Dave Chinner Date: Thu Jun 20 09:21:26 2024 +0200 xfs: pass the full grant head to accounting functions Because we are going to need them soon. API change only, no logic changes. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 551bf13ba8b24a9b938e85061c9e03bd452ea28d Author: Dave Chinner Date: Thu Jun 20 09:21:25 2024 +0200 xfs: track log space pinned by the AIL Currently we track space used in the log by grant heads. These store the reserved space as a physical log location and combine both space reserved for future use with space already used in the log in a single variable. The amount of space consumed in the log is then calculated as the distance between the log tail and the grant head. The problem with tracking the grant head as a physical location comes from the fact that it tracks both log cycle count and offset into the log in bytes in a single 64 bit variable. because the cycle count on disk is a 32 bit number, this also limits the offset into the log to 32 bits. ANd because that is in bytes, we are limited to being able to track only 2GB of log space in the grant head. Hence to support larger physical logs, we need to track used space differently in the grant head. We no longer use the grant head for guiding AIL pushing, so the only thing it is now used for is determining if we've run out of reservation space via the calculation in xlog_space_left(). What we really need to do is move the grant heads away from tracking physical space in the log. The issue here is that space consumed in the log is not directly tracked by the current mechanism - the space consumed in the log by grant head reservations gets returned to the free pool by the tail of the log moving forward. i.e. the space isn't directly tracked or calculated, but the used grant space gets "freed" as the physical limits of the log are updated without actually needing to update the grant heads. Hence to move away from implicit, zero-update log space tracking we need to explicitly track the amount of physical space the log actually consumes separately to the in-memory reservations for operations that will be committed to the journal. Luckily, we already track the information we need to calculate this in the AIL itself. That is, the space currently consumed by the journal is the maximum LSN that the AIL has seen minus the current log tail. As we update both of these items dynamically as the head and tail of the log moves, we always know exactly how much space the journal consumes. This means that we also know exactly how much space the currently active reservations require, and exactly how much free space we have remaining for new reservations to be made. Most importantly, we know what these spaces are indepedently of the physical locations of the head and tail of the log. Hence by separating out the physical space consumed by the journal, we can now track reservations in the grant heads purely as a byte count, and the log can be considered full when the tail space + reservation space exceeds the size of the log. This means we can use the full 64 bits of grant head space for reservation space, completely removing the 32 bit byte count limitation on log size that they impose. Hence the first step in this conversion is to track and update the "log tail space" every time the AIL tail or maximum seen LSN changes. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit be5abd323bf4bee137d80d605ff30a7a66dad96d Author: Dave Chinner Date: Thu Jun 20 09:21:24 2024 +0200 xfs: collapse xlog_state_set_callback in caller The function is called from a single place, and it isn't just setting the iclog state to XLOG_STATE_CALLBACK - it can mark iclogs clean, which moves them to states after CALLBACK. Hence the function is now badly named, and should just be folded into the caller where the iclog completion logic makes a whole lot more sense. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 0dcd5a10d9878dc5a3fd17c0331646a69ebb5da6 Author: Dave Chinner Date: Thu Jun 20 09:21:23 2024 +0200 xfs: l_last_sync_lsn is really AIL state The current implementation of xlog_assign_tail_lsn() assumes that when the AIL is empty, the log tail matches the LSN of the last written commit record. This is recorded in xlog_state_set_callback() as log->l_last_sync_lsn when the iclog state changes to XLOG_STATE_CALLBACK. This change is then immediately followed by running the callbacks on the iclog which then insert the log items into the AIL at the "commit lsn" of that checkpoint. The AIL tracks log items via the start record LSN of the checkpoint, not the commit record LSN. This is because we can pipeline multiple checkpoints, and so the start record of checkpoint N+1 can be written before the commit record of checkpoint N. i.e: start N commit N +-------------+------------+----------------+ start N+1 commit N+1 The tail of the log cannot be moved to the LSN of commit N when all the items of that checkpoint are written back, because then the start record for N+1 is no longer in the active portion of the log and recovery will fail/corrupt the filesystem. Hence when all the log items in checkpoint N are written back, the tail of the log most now only move as far forwards as the start LSN of checkpoint N+1. Hence we cannot use the maximum start record LSN the AIL sees as a replacement the pointer to the current head of the on-disk log records. However, we currently only use the l_last_sync_lsn when the AIL is empty - when there is no start LSN remaining, the tail of the log moves to the LSN of the last commit record as this is where recovery needs to start searching for recoverable records. THe next checkpoint will have a start record LSN that is higher than l_last_sync_lsn, and so everything still works correctly when new checkpoints are written to an otherwise empty log. l_last_sync_lsn is an atomic variable because it is currently updated when an iclog with callbacks attached moves to the CALLBACK state. While we hold the icloglock at this point, we don't hold the AIL lock. When we assign the log tail, we hold the AIL lock, not the icloglock because we have to look up the AIL. Hence it is an atomic variable so it's not bound to a specific lock context. However, the iclog callbacks are only used for CIL checkpoints. We don't use callbacks with unmount record writes, so the l_last_sync_lsn variable only gets updated when we are processing CIL checkpoint callbacks. And those callbacks run under AIL lock contexts, not icloglock context. The CIL checkpoint already knows what the LSN of the iclog the commit record was written to (obtained when written into the iclog before submission) and so we can update the l_last_sync_lsn under the AIL lock in this callback. No other iclog callbacks will run until the currently executing one completes, and hence we can update the l_last_sync_lsn under the AIL lock safely. This means l_last_sync_lsn can move to the AIL as the "ail_head_lsn" and it can be used to replace the atomic l_last_sync_lsn in the iclog code. This makes tracking the log tail belong entirely to the AIL, rather than being smeared across log, iclog and AIL state and locking. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit a07776ab814d432190a902c2c3fac867c4e76934 Author: Dave Chinner Date: Thu Jun 20 09:21:22 2024 +0200 xfs: ensure log tail is always up to date Whenever we write an iclog, we call xlog_assign_tail_lsn() to update the current tail before we write it into the iclog header. This means we have to take the AIL lock on every iclog write just to check if the tail of the log has moved. This doesn't avoid races with log tail updates - the log tail could move immediately after we assign the tail to the iclog header and hence by the time the iclog reaches stable storage the tail LSN has moved forward in memory. Hence the log tail LSN in the iclog header is really just a point in time snapshot of the current state of the AIL. With this in mind, if we simply update the in memory log->l_tail_lsn every time it changes in the AIL, there is no need to update the in memory value when we are writing it into an iclog - it will already be up-to-date in memory and checking the AIL again will not change this. Hence xlog_state_release_iclog() does not need to check the AIL to update the tail lsn and can just sample it directly without needing to take the AIL lock. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit b50b4c49d8d79af05ac3bb3587f58589713139cc Author: Dave Chinner Date: Thu Jun 20 09:21:21 2024 +0200 xfs: background AIL push should target physical space Currently the AIL attempts to keep 25% of the "log space" free, where the current used space is tracked by the reserve grant head. That is, it tracks both physical space used plus the amount reserved by transactions in progress. When we start tail pushing, we are trying to make space for new reservations by writing back older metadata and the log is generally physically full of dirty metadata, and reservations for modifications in flight take up whatever space the AIL can physically free up. Hence we don't really need to take into account the reservation space that has been used - we just need to keep the log tail moving as fast as we can to free up space for more reservations to be made. We know exactly how much physical space the journal is consuming in the AIL (i.e. max LSN - min LSN) so we can base push thresholds directly on this state rather than have to look at grant head reservations to determine how much to physically push out of the log. This also allows code that needs to know if log items in the current transaction need to be pushed or re-logged to simply sample the current target - they don't need to calculate the current target themselves. This avoids the need for any locking when doing such checks. Further, moving to a physical target means we don't need "push all until empty semantics" like were introduced in the previous patch. We can now test and clear the "push all" as a one-shot command to set the target to the current head of the AIL. This allows the xfsaild to maximise the use of log space right up to the point where conditions indicate that the xfsaild is not keeping up with load and it needs to work harder, and as soon as those constraints go away (i.e. external code no longer needs everything pushed) the xfsaild will return to maintaining the normal 25% free space thresholds. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 9adf40249e6cfd7231c2973bb305f6c20902bfd9 Author: Dave Chinner Date: Thu Jun 20 09:21:20 2024 +0200 xfs: AIL doesn't need manual pushing We have a mechanism that checks the amount of log space remaining available every time we make a transaction reservation. If the amount of space is below a threshold (25% free) we push on the AIL to tell it to do more work. To do this, we end up calculating the LSN that the AIL needs to push to on every reservation and updating the push target for the AIL with that new target LSN. This is silly and expensive. The AIL is perfectly capable of calculating the push target itself, and it will always be running when the AIL contains objects. What the target does is determine if the AIL needs to do any work before it goes back to sleep. If we haven't run out of reservation space or memory (or some other push all trigger), it will simply go back to sleep for a while if there is more than 25% of the journal space free without doing anything. If there are items in the AIL at a lower LSN than the target, it will try to push up to the target or to the point of getting stuck before going back to sleep and trying again soon after.` Hence we can modify the AIL to calculate it's own 25% push target before it starts a push using the same reserve grant head based calculation as is currently used, and remove all the places where we ask the AIL to push to a new 25% free target. We can also drop the minimum free space size of 256BBs from the calculation because the 25% of a minimum sized log is *always going to be larger than 256BBs. This does still require a manual push in certain circumstances. These circumstances arise when the AIL is not full, but the reservation grants consume the entire of the free space in the log. In this case, we still need to push on the AIL to free up space, so when we hit this condition (i.e. reservation going to sleep to wait on log space) we do a single push to tell the AIL it should empty itself. This will keep the AIL moving as new reservations come in and want more space, rather than keep queuing them and having to push the AIL repeatedly. The reason for using the "push all" when grant space runs out is that we can run out of grant space when there is more than 25% of the log free. Small logs are notorious for this, and we have a hack in the log callback code (xlog_state_set_callback()) where we push the AIL because the *head* moved) to ensure that we kick the AIL when we consume space in it because that can push us over the "less than 25% available" available that starts tail pushing back up again. Hence when we run out of grant space and are going to sleep, we have to consider that the grant space may be consuming almost all the log space and there is almost nothing in the AIL. In this situation, the AIL pins the tail and moving the tail forwards is the only way the grant space will come available, so we have to force the AIL to push everything to guarantee grant space will eventually be returned. Hence triggering a "push all" just before sleeping removes all the nasty corner cases we have in other parts of the code that work around the "we didn't ask the AIL to push enough to free grant space" condition that leads to log space hangs... Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 613e2fdbbc7b4bd0cd324e3a025b3061eb8c947d Author: Dave Chinner Date: Thu Jun 20 09:21:19 2024 +0200 xfs: move and rename xfs_trans_committed_bulk Ever since the CIL and delayed logging was introduced, xfs_trans_committed_bulk() has been a purely CIL checkpoint completion function and not a transaction commit completion function. Now that we are adding log specific updates to this function, it really does not have anything to do with the transaction subsystem - it is really log and log item level functionality. This should be part of the CIL code as it is the callback that moves log items from the CIL checkpoint to the AIL. Move it and rename it to xlog_cil_ail_insert(). Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 9ff4490e2ab364ec433f15668ef3f5edfb53feca Author: Christoph Hellwig Date: Thu Jun 20 09:21:18 2024 +0200 xfs: fix the contact address for the sysfs ABI documentation oss.sgi.com is long dead, refer to the current linux-xfs list instead. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 94a0333b9212a114d19096a77903f76d0d5bca26 Author: Zizhi Wo Date: Mon Jul 1 14:02:36 2024 +0800 xfs: Avoid races with cnt_btree lastrec updates A concurrent file creation and little writing could unexpectedly return -ENOSPC error since there is a race window that the allocator could get the wrong agf->agf_longest. Write file process steps: 1) Find the entry that best meets the conditions, then calculate the start address and length of the remaining part of the entry after allocation. 2) Delete this entry and update the -current- agf->agf_longest. 3) Insert the remaining unused parts of this entry based on the calculations in 1), and update the agf->agf_longest again if necessary. Create file process steps: 1) Check whether there are free inodes in the inode chunk. 2) If there is no free inode, check whether there has space for creating inode chunks, perform the no-lock judgment first. 3) If the judgment succeeds, the judgment is performed again with agf lock held. Otherwire, an error is returned directly. If the write process is in step 2) but not go to 3) yet, the create file process goes to 2) at this time, it may be mistaken for no space, resulting in the file system still has space but the file creation fails. We have sent two different commits to the community in order to fix this problem[1][2]. Unfortunately, both solutions have flaws. In [2], I discussed with Dave and Darrick, realized that a better solution to this problem requires the "last cnt record tracking" to be ripped out of the generic btree code. And surprisingly, Dave directly provided his fix code. This patch includes appropriate modifications based on his tmp-code to address this issue. The entire fix can be roughly divided into two parts: 1) Delete the code related to lastrec-update in the generic btree code. 2) Place the process of updating longest freespace with cntbt separately to the end of the cntbt modifications. Move the cursor to the rightmost firstly, and update the longest free extent based on the record. Note that we can not update the longest with xfs_alloc_get_rec() after find the longest record, as xfs_verify_agbno() may not pass because pag->block_count is updated on the outside. Therefore, use xfs_btree_get_rec() as a replacement. [1] https://lore.kernel.org/all/20240419061848.1032366-2-yebin10@huawei.com [2] https://lore.kernel.org/all/20240604071121.3981686-1-wozizhi@huawei.com Reported by: Ye Bin Signed-off-by: Zizhi Wo Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 4cdbfe457a32cf31c44b8ed7caf1697b0cd51ffc Merge: 584aa150d5b78 783e8a7c9cab6 Author: Chandan Babu R Date: Thu Jul 4 12:40:32 2024 +0530 Merge tag 'refcount-intent-cleanups-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.11-mergeB xfs: refcount log intent cleanups This series cleans up the refcount intent code before we start adding support for realtime devices. Similar to previous intent cleanup patchsets, we start transforming the tracepoints so that the data extraction are done inside the tracepoint code, and then we start passing the intent itself to the _finish_one function. This reduces the boxing and unboxing of parameters. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'refcount-intent-cleanups-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: move xfs_refcount_update_defer_add to xfs_refcount_item.c xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one xfs: don't bother calling xfs_refcount_finish_one_cleanup in xfs_refcount_finish_one xfs: reuse xfs_refcount_update_cancel_item xfs: add a ci_entry helper xfs: remove xfs_trans_set_refcount_flags xfs: clean up refcount log intent item tracepoint callsites xfs: pass btree cursors to refcount btree tracepoints xfs: create specialized classes for refcount tracepoints xfs: give refcount btree cursor error tracepoints their own class commit 7816e58967d0e6cadce05c8540b47ed027dc2499 Author: Christoph Schlameuss Date: Mon Jun 24 11:59:02 2024 +0200 kvm: s390: Reject memory region operations for ucontrol VMs This change rejects the KVM_SET_USER_MEMORY_REGION and KVM_SET_USER_MEMORY_REGION2 ioctls when called on a ucontrol VM. This is necessary since ucontrol VMs have kvm->arch.gmap set to 0 and would thus result in a null pointer dereference further in. Memory management needs to be performed in userspace and using the ioctls KVM_S390_UCAS_MAP and KVM_S390_UCAS_UNMAP. Also improve s390 specific documentation for KVM_SET_USER_MEMORY_REGION and KVM_SET_USER_MEMORY_REGION2. Signed-off-by: Christoph Schlameuss Fixes: 27e0393f15fc ("KVM: s390: ucontrol: per vcpu address spaces") Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20240624095902.29375-1-schlameuss@linux.ibm.com Signed-off-by: Janosch Frank [frankja@linux.ibm.com: commit message spelling fix, subject prefix fix] Message-ID: <20240624095902.29375-1-schlameuss@linux.ibm.com> commit 33a729a1770b5e03b9dbc7ecb065ae7997b7544d Author: Eric Farman Date: Fri Mar 1 21:43:42 2024 +0100 KVM: s390: vsie: retry SIE instruction on host intercepts It's possible that SIE exits for work that the host needs to perform rather than something that is intended for the guest. A Linux guest will ignore this intercept code since there is nothing for it to do, but a more robust solution would rewind the PSW back to the SIE instruction. This will transparently resume the guest once the host completes its work, without the guest needing to process what is effectively a NOP and re-issue SIE itself. Signed-off-by: Eric Farman Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20240301204342.3217540-1-farman@linux.ibm.com Signed-off-by: Janosch Frank Message-ID: <20240301204342.3217540-1-farman@linux.ibm.com> commit 584aa150d5b78f5cd8bb235c5406bd6fd36ba244 Merge: 06e4e940c57ec ea7b0820d960d Author: Chandan Babu R Date: Thu Jul 4 12:32:42 2024 +0530 Merge tag 'rmap-intent-cleanups-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.11-mergeB xfs: rmap log intent cleanups This series cleans up the rmap intent code before we start adding support for realtime devices. Similar to previous intent cleanup patchsets, we start transforming the tracepoints so that the data extraction are done inside the tracepoint code, and then we start passing the intent itself to the _finish_one function. This reduces the boxing and unboxing of parameters. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'rmap-intent-cleanups-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: move xfs_rmap_update_defer_add to xfs_rmap_item.c xfs: simplify usage of the rcur local variable in xfs_rmap_finish_one xfs: don't bother calling xfs_rmap_finish_one_cleanup in xfs_rmap_finish_one xfs: reuse xfs_rmap_update_cancel_item xfs: add a ri_entry helper xfs: remove xfs_trans_set_rmap_flags xfs: clean up rmap log intent item tracepoint callsites xfs: pass btree cursors to rmap btree tracepoints xfs: give rmap btree cursor error tracepoints their own class commit 06e4e940c57ec5d5b8bd2896c2dde06f1413c5eb Merge: 2f6ebd4cf5bc8 84a3c1576c5aa Author: Chandan Babu R Date: Thu Jul 4 12:28:42 2024 +0530 Merge tag 'extfree-intent-cleanups-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.11-mergeB xfs: extent free log intent cleanups This series cleans up some warts in the extent freeing log intent code. We start by acknowledging that this mechanism does not have anything to do with the bmap code by moving it to xfs_alloc.c and giving the function a more descriptive name. Then we clean up the tracepoints and the _finish_one call paths to pass the intent structure around. This reduces the overhead when the tracepoints are disabled and will make things much cleaner when we start adding realtime support in the next patch. I also incorporated a bunch of cleanups from Christoph Hellwig. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'extfree-intent-cleanups-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: move xfs_extent_free_defer_add to xfs_extfree_item.c xfs: remove xfs_defer_agfl_block xfs: remove duplicate asserts in xfs_defer_extent_free xfs: factor out a xfs_efd_add_extent helper xfs: reuse xfs_extent_free_cancel_item xfs: add a xefi_entry helper xfs: pass the fsbno to xfs_perag_intent_get xfs: convert "skip_discard" to a proper flags bitset xfs: clean up extent free log intent item tracepoint callsites commit 2f6ebd4cf5bc8096b950786fa92c2668b9ded86a Merge: 3ba3ab1f67192 ac3a0275165b4 Author: Chandan Babu R Date: Thu Jul 4 12:10:04 2024 +0530 Merge tag 'inode-refactor-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.11-mergeB xfs: hoist inode operations to libxfs This series hoists inode creation, renaming, and deletion operations to libxfs in anticipation of the metadata inode directory feature, which maintains a directory tree of metadata inodes. This will be necessary for further enhancements to the realtime feature, subvolume support. There aren't supposed to be any functional changes in this intense refactoring -- we just split the functions into pieces that are generic and pieces that are specific to libxfs clients. As a bonus, we can remove various open-coded pieces of mkfs.xfs and xfs_repair when this series gets to xfsprogs. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'inode-refactor-6.11_2024-07-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb xfs: get rid of trivial rename helpers xfs: move dirent update hooks to xfs_dir2.c xfs: create libxfs helper to rename two directory entries xfs: create libxfs helper to exchange two directory entries xfs: create libxfs helper to remove an existing inode/name from a directory xfs: hoist inode free function to libxfs xfs: create libxfs helper to link an existing inode into a directory xfs: create libxfs helper to link a new inode into a directory xfs: separate the icreate logic around INIT_XATTRS xfs: hoist xfs_{bump,drop}link to libxfs xfs: hoist xfs_iunlink to libxfs xfs: wrap inode creation dqalloc calls xfs: push xfs_icreate_args creation out of xfs_create* xfs: hoist new inode initialization functions to libxfs xfs: split new inode creation into two pieces xfs: use xfs_trans_ichgtime to set times when allocating inode xfs: implement atime updates in xfs_trans_ichgtime xfs: pack icreate initialization parameters into a separate structure xfs: hoist project id get/set functions to libxfs xfs: hoist inode flag conversion functions to libxfs xfs: hoist extent size helpers to libxfs xfs: move inode copy-on-write predicates to xfs_inode.[ch] xfs: use consistent uid/gid when grabbing dquots for inodes xfs: verify buffer, inode, and dquot items every tx commit commit 25b3a8237a03ec0b67b965b52d74862e77ef7115 Author: Benjamin Marzinski Date: Tue Jul 2 11:18:02 2024 -0400 md/raid5: recheck if reshape has finished with device_lock held When handling an IO request, MD checks if a reshape is currently happening, and if so, where the IO sector is in relation to the reshape progress. MD uses conf->reshape_progress for both of these tasks. When the reshape finishes, conf->reshape_progress is set to MaxSector. If this occurs after MD checks if the reshape is currently happening but before it calls ahead_of_reshape(), then ahead_of_reshape() will end up comparing the IO sector against MaxSector. During a backwards reshape, this will make MD think the IO sector is in the area not yet reshaped, causing it to use the previous configuration, and map the IO to the sector where that data was before the reshape. This bug can be triggered by running the lvm2 lvconvert-raid-reshape-linear_to_raid6-single-type.sh test in a loop, although it's very hard to reproduce. Fix this by factoring the code that checks where the IO sector is in relation to the reshape out to a helper called get_reshape_loc(), which reads reshape_progress and reshape_safe while holding the device_lock, and then rechecks if the reshape has finished before calling ahead_of_reshape with the saved values. Also use the helper during the REQ_NOWAIT check to see if the location is inside of the reshape region. Fixes: fef9c61fdfabf ("md/raid5: change reshape-progress measurement to cope with reshaping backwards.") Signed-off-by: Benjamin Marzinski Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240702151802.1632010-1-bmarzins@redhat.com commit a1fd37f97808db4fa1bf55da0275790c42521e45 Author: Yu Kuai Date: Thu Jun 27 19:23:21 2024 +0800 md: Don't wait for MD_RECOVERY_NEEDED for HOT_REMOVE_DISK ioctl Commit 90f5f7ad4f38 ("md: Wait for md_check_recovery before attempting device removal.") explained in the commit message that failed device must be reomoved from the personality first by md_check_recovery(), before it can be removed from the array. That's the reason the commit add the code to wait for MD_RECOVERY_NEEDED. However, this is not the case now, because remove_and_add_spares() is called directly from hot_remove_disk() from ioctl path, hence failed device(marked faulty) can be removed from the personality by ioctl. On the other hand, the commit introduced a performance problem that if MD_RECOVERY_NEEDED is set and the array is not running, ioctl will wait for 5s before it can return failure to user. Since the waiting is not needed now, fix the problem by removing the waiting. Fixes: 90f5f7ad4f38 ("md: Wait for md_check_recovery before attempting device removal.") Reported-by: Mateusz Kusiak Closes: https://lore.kernel.org/all/814ff6ee-47a2-4ba0-963e-cf256ee4ecfa@linux.intel.com/ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240627112321.3044744-1-yukuai1@huaweicloud.com commit 1f4a72ff00cafa74b43b0c8a37573c78f86ed1a8 Author: Christophe JAILLET Date: Sun Jun 23 22:17:54 2024 +0200 md-cluster: Constify struct md_cluster_operations 'struct md_cluster_operations' is not modified in this driver. 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 51941 1442 80 53463 d0d7 drivers/md/md-cluster.o After: ===== text data bss dec hex filename 52133 1246 80 53459 d0d3 drivers/md/md-cluster.o Signed-off-by: Christophe JAILLET Signed-off-by: Song Liu Link: https://lore.kernel.org/r/3727f3ce9693cae4e62ae6778ea13971df805479.1719173852.git.christophe.jaillet@wanadoo.fr commit ae720670b9fc5ef3588efd5b95e6a0f59a36dec0 Author: Yang Li Date: Tue Jun 18 09:07:59 2024 +0800 md: Remove unneeded semicolon ./drivers/md/md.c:630:21-22: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9344 Signed-off-by: Yang Li Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240618010759.85416-1-yang.lee@linux.alibaba.com commit 2314c2e3a70521f055dd011245dccf6fd97c7ee0 Author: Yu Kuai Date: Sat Jun 15 16:51:43 2024 +0800 md/raid5: fix spares errors about rcu usage As commit ad8606702f26 ("md/raid5: remove rcu protection to access rdev from conf") explains, rcu protection can be removed, however, there are three places left, there won't be any real problems. drivers/md/raid5.c:8071:24: error: incompatible types in comparison expression (different address spaces): drivers/md/raid5.c:8071:24: struct md_rdev [noderef] __rcu * drivers/md/raid5.c:8071:24: struct md_rdev * drivers/md/raid5.c:7569:25: error: incompatible types in comparison expression (different address spaces): drivers/md/raid5.c:7569:25: struct md_rdev [noderef] __rcu * drivers/md/raid5.c:7569:25: struct md_rdev * drivers/md/raid5.c:7573:25: error: incompatible types in comparison expression (different address spaces): drivers/md/raid5.c:7573:25: struct md_rdev [noderef] __rcu * drivers/md/raid5.c:7573:25: struct md_rdev * Fixes: ad8606702f26 ("md/raid5: remove rcu protection to access rdev from conf") Cc: stable@vger.kernel.org Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240615085143.1648223-1-yukuai1@huaweicloud.com commit af48f95492dc1af36d9636a750ec492035c0ed7d Author: Mark Zhang Date: Mon Jul 1 15:40:48 2024 +0300 RDMA/core: Introduce "name_assign_type" for an IB device The name_assign_type indicates how the name is provided. Currently these types are supported: - RDMA_NAME_ASSIGN_TYPE_UNKNOWN: Unknown or not set; - RDMA_NAME_ASSIGN_TYPE_USER: Name is provided by the user; The user-created sub device, rxe and siw device has this type. When filling nl device info, it is set in the new attribute RDMA_NLDEV_ATTR_NAME_ASSIGN_TYPE. User-space tools like udev "rdma_rename" could check this attribute to determine if this device needs to be renamed or not. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/522591bef9a369cc8e5dcb77787e017bffee37fe.1719837610.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit f802078d3cb882b9be555fd903040388e29eae87 Author: Leon Romanovsky Date: Mon Jul 1 15:42:29 2024 +0300 RDMA/qib: Fix truncation compilation warnings in qib_verbs.c Reduce nodename string size to fit IB_DEVICE_NODE_DESC_MAX. drivers/infiniband/hw/qib/qib_verbs.c: In function ‘qib_register_ib_device’: drivers/infiniband/hw/qib/qib_verbs.c:1554:40: error: ‘%s’ directive output may be truncated writing up to 64 bytes into a region of size 43 [-Werror=format-truncation=] 1554 | "Intel Infiniband HCA %s", init_utsname()->nodename); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/qib/qib_verbs.c:1553:9: note: ‘snprintf’ output between 22 and 86 bytes into a destination of size 64 1553 | snprintf(ibdev->node_desc, sizeof(ibdev->node_desc), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | "Intel Infiniband HCA %s", init_utsname()->nodename); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Link: https://lore.kernel.org/r/1fb6393fa2e0702fef995834c3c7db972bbc4d06.1719837715.git.leon@kernel.org Acked-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit 1b8ca05469315ef7636f898ff83890c39e3deeb8 Author: Leon Romanovsky Date: Mon Jul 1 15:42:28 2024 +0300 RDMA/qib: Fix truncation compilation warnings in qib_init.c drivers/infiniband/hw/qib/qib_init.c: In function ‘qib_init_one’: drivers/infiniband/hw/qib/qib_init.c:586:67: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 3 [-Werror=format-truncation=] 586 | snprintf(wq_name, sizeof(wq_name), "qib%d_%d", | ^~ In function ‘qib_create_workqueues’, inlined from ‘qib_init_one’ at drivers/infiniband/hw/qib/qib_init.c:1438:8: drivers/infiniband/hw/qib/qib_init.c:586:60: note: directive argument in the range [-2147483643, 254] 586 | snprintf(wq_name, sizeof(wq_name), "qib%d_%d", | ^~~~~~~~~~ drivers/infiniband/hw/qib/qib_init.c:586:25: note: ‘snprintf’ output between 7 and 27 bytes into a destination of size 8 586 | snprintf(wq_name, sizeof(wq_name), "qib%d_%d", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 587 | dd->unit, pidx); | ~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Link: https://lore.kernel.org/r/ab5222c414a01e9d2c5129ef26836aace9ee2aa5.1719837715.git.leon@kernel.org Acked-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit 8bf890c8161215bd1fbd1a6d9b61acbb8eac165b Author: SeongJae Park Date: Tue Jun 25 11:05:38 2024 -0700 selftests/damon/damon_nr_regions: test online-tuned max_nr_regions User could update max_nr_regions parameter while DAMON is running to a value that smaller than the current number of regions that DAMON is seeing. Such update could be done for reducing the monitoring overhead. In the case, DAMON should merge regions aggressively more than normal situation to ensure the new limit is successfully applied. Implement a kselftest to ensure that. Link: https://lkml.kernel.org/r/20240625180538.73134-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 5ac9adecf0cf07b99d4eeda24a89d27447acd860 Author: SeongJae Park Date: Tue Jun 25 11:05:37 2024 -0700 _damon_sysfs: implement commit() for online parameters update Users can update DAMON parameters while it is running, using 'commit' DAMON sysfs interface command. For testing the feature in future tests, implement a function for doing that on the test-purpose DAMON sysfs interface wrapper Python module. Link: https://lkml.kernel.org/r/20240625180538.73134-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 781497347d1bcb8c95fca8356575cfd42fff1354 Author: SeongJae Park Date: Tue Jun 25 11:05:36 2024 -0700 selftests/damon: implement test for min/max_nr_regions Implement a kselftest for DAMON's {min,max}_nr_regions' parameters. The test ensures both the minimum and the maximum number of regions limit is respected even if the workload's real number of regions is less than the minimum or larger than the maximum limits. Link: https://lkml.kernel.org/r/20240625180538.73134-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit f60636047a6cc2a3076cb202b462cff4347c07d6 Author: SeongJae Park Date: Tue Jun 25 11:05:35 2024 -0700 selftests/damon/_damon_sysfs: implement kdamonds stop function Implement DAMON stop function on the test-purpose DAMON sysfs interface wrapper Python module, _damon_sysfs.py. This feature will be used by future DAMON tests that need to start/stop DAMON multiple times. Link: https://lkml.kernel.org/r/20240625180538.73134-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit c9a3003a358df357b1eba44b05a5bb164621d5f5 Author: SeongJae Park Date: Tue Jun 25 11:05:34 2024 -0700 selftests/damon: implement DAMOS tried regions test Implement a test for DAMOS tried regions command of DAMON sysfs interface. It ensures the expected number of monitoring regions are created using an artificial memory access pattern generator program. Link: https://lkml.kernel.org/r/20240625180538.73134-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit c94df805c774ff87022396bb8120d5872cd7e5ed Author: SeongJae Park Date: Tue Jun 25 11:05:33 2024 -0700 selftests/damon: implement a program for even-numbered memory regions access To test schemes_tried_regions feature, we need to have a program having specific number of regions that having different access pattern. Existing artificial access pattern generator, 'access_memory', cannot be used for the purpose, since it accesses only one region at a given time. Extending it could be an option, but since the purpose and the implementation are pretty simple, implementing another one from the scratch is better. Implement such another artificial memory access program that allocates user-defined number/size regions and accesses even-numbered regions. Link: https://lkml.kernel.org/r/20240625180538.73134-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 209e6313fb17dbc66cec7230902ba4427717e6ee Author: SeongJae Park Date: Tue Jun 25 11:05:32 2024 -0700 selftests/damon/_damon_sysfs: support schemes_update_tried_regions Implement schemes_update_tried_regions DAMON sysfs command on _damon_sysfs.py, to use on implementations of future tests for the feature. Link: https://lkml.kernel.org/r/20240625180538.73134-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 34ec4344a5dabbb39e23e8daf30779892c0211a6 Author: SeongJae Park Date: Tue Jun 25 11:05:31 2024 -0700 selftests/damon/access_memory: use user-defined region size Patch series "selftests/damon: test DAMOS tried regions and {min,max}_nr_regions". This patch series fix a minor issue in a program for DAMON selftest, and implement new functionality selftests for DAMOS tried regions and {min,max}_nr_regions. The test for max_nr_regions also test the recovery from online tuning-caused limit violation, which was fixed by a previous patch [1] titled "mm/damon/core: merge regions aggressively when max_nr_regions is unmet". The first patch fixes a minor problem in the articial memory access pattern generator for tests. Following 3 patches (2-4) implement schemes tried regions test. Then a couple of patches (5-6) implementing static setup based {min,max}_nr_regions functionality test follows. Final two patches (7-8) implement dynamic max_nr_regions update test. [1] https://lore.kernel.org/20240624210650.53960C2BBFC@smtp.kernel.org This patch (of 8): 'access_memory' is an artificial memory access pattern generator for DAMON tests. It creates and accesses memory regions that the user specified the number and size via the command line. However, real access part of the program ignores the user-specified size of each region. Instead, it uses a hard-coded value, 10 MiB. Fix it to use user-defined size. Note that all existing 'access_memory' users are setting the region size as 10 MiB. Hence no real problem has happened so far. Link: https://lkml.kernel.org/r/20240625180538.73134-1-sj@kernel.org Link: https://lkml.kernel.org/r/20240625180538.73134-2-sj@kernel.org Fixes: b5906f5f7359 ("selftests/damon: add a test for update_schemes_tried_regions sysfs command") Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 58540f5cde404f512c80fb7b868b12005f0e2747 Author: Jan Kara Date: Tue Jun 25 12:19:00 2024 +0200 readahead: simplify gotos in page_cache_sync_ra() Unify all conditions for initial readahead to simplify goto logic in page_cache_sync_ra(). No functional changes. Link: https://lkml.kernel.org/r/20240625101909.12234-10-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit a6eccd5be3e99fd7e707edd73e959d38722bbade Author: Jan Kara Date: Tue Jun 25 12:18:59 2024 +0200 readahead: fold try_context_readahead() into its single caller try_context_readahead() has a single caller page_cache_sync_ra(). Fold the function there to make ra state modifications more obvious. No functional changes. Link: https://lkml.kernel.org/r/20240625101909.12234-9-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 3a7a11a57e464a05bf2ae7ad1e28667890727ed8 Author: Jan Kara Date: Tue Jun 25 12:18:58 2024 +0200 readahead: disentangle async and sync readahead Both async and sync readahead are handled by ondemand_readahead() function. However there isn't actually much in common. Just move async related parts into page_cache_ra_async() and sync related parts to page_cache_ra_sync(). No functional changes. Link: https://lkml.kernel.org/r/20240625101909.12234-8-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 0b1efc3e78d12278a8c0f2c665d66564a2cb965f Author: Jan Kara Date: Tue Jun 25 12:18:57 2024 +0200 readahead: drop dead code in ondemand_readahead() ondemand_readahead() scales up the readahead window if the current read would hit the readahead mark placed by itself. However the condition is mostly dead code because: a) In case of async readahead we always increase ra->start so ra->start == index is never true. b) In case of sync readahead we either go through try_context_readahead() in which case ra->async_size == 1 < ra->size or we go through initial_readahead where ra->async_size == ra->size iff ra->size == max_pages. So the only practical effect is reducing async_size for large initial reads. Make the code more obvious. Link: https://lkml.kernel.org/r/20240625101909.12234-7-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8eaf93ac70f3e1bbbe7e28a4f34289ef2d0d0bef Author: Jan Kara Date: Tue Jun 25 12:18:56 2024 +0200 readahead: drop dead code in page_cache_ra_order() page_cache_ra_order() scales folio order down so that is fully fits within readahead window. Thus the code handling the case where we walked past the readahead window is a dead code. Remove it. Link: https://lkml.kernel.org/r/20240625101909.12234-6-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit bb82ac31ddcedd6a1e6ee30b7afec7acdef811e1 Author: Jan Kara Date: Tue Jun 25 12:18:55 2024 +0200 readahead: drop index argument of page_cache_async_readahead() The index argument of page_cache_async_readahead() is just folio->index so there's no point in passing is separately. Drop it. Link: https://lkml.kernel.org/r/20240625101909.12234-5-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 878343dfa491e5c29bb6741a798229f051d3c8eb Author: Jan Kara Date: Tue Jun 25 12:18:54 2024 +0200 readahead: drop pointless index from force_page_cache_ra() Current index to readahead is tracked in readahead_control and properly updated by page_cache_ra_unbounded() (read_pages() in fact). So there's no need to track the index separately in force_page_cache_ra(). Link: https://lkml.kernel.org/r/20240625101909.12234-4-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 7c877586da3178974a8a94577b6045a48377ff25 Author: Jan Kara Date: Tue Jun 25 12:18:53 2024 +0200 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. Link: https://lkml.kernel.org/r/20240625101909.12234-3-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 901a269ff3d59c9ee0e6be35c6044dc4bf2c0fdf Author: Jan Kara Date: Tue Jun 25 12:18:52 2024 +0200 filemap: fix page_cache_next_miss() when no hole found page_cache_next_miss() should return value outside of the specified range when no hole is found. However currently it will return the last index *in* the specified range confusing ondemand_readahead() to think there's a hole in the searched range and upsetting readahead logic. Link: https://lkml.kernel.org/r/20240625101909.12234-2-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8051b82a0be05751e41be1dfa4201c131e589450 Author: Jan Kara Date: Tue Jun 25 12:18:51 2024 +0200 readahead: make sure sync readahead reads needed page Patch series "mm: Fix various readahead quirks". When we were internally testing performance of recent kernels, we have noticed quite variable performance of readahead arising from various quirks in readahead code. So I went on a cleaning spree there. This is a batch of patches resulting out of that. A quick testing in my test VM with the following fio job file: [global] direct=0 ioengine=sync invalidate=1 blocksize=4k size=10g readwrite=read [reader] numjobs=1 shows that this patch series improves the throughput from variable one in 310-340 MB/s range to rather stable one at 350 MB/s. As a side effect these cleanups also address the issue noticed by Bruz Zhang [1]. [1] https://lore.kernel.org/all/20240618114941.5935-1-zhangpengpeng0808@gmail.com/ Zhang Peng reported: : I test this batch of patch with fio, it indeed has a huge sppedup : in sequential read when block size is 4KiB. The result as follow, : for async read, iodepth is set to 128, and other settings : are self-evident. : : casename                upstream   withFix speedup : ----------------        --------   -------- ------- : randread-4k-sync        48991      47 : seqread-4k-sync         1162758    14229 : seqread-1024k-sync      1460208    1452522 : randread-4k-libaio      47467      4730 : randread-4k-posixaio    49190      49512 : seqread-4k-libaio       1085932    1234635 : seqread-1024k-libaio    1423341    1402214 -1 : seqread-4k-posixaio     1165084    1369613 1 : seqread-1024k-posixaio  1435422    1408808 -1.8 This patch (of 10): page_cache_sync_ra() is called when a folio we want to read is not in the page cache. It is expected that it creates the folio (and perhaps the following folios as well) and submits reads for them unless some error happens. However if index == ra->start + ra->size, ondemand_readahead() will treat the call as another async readahead hit. Thus ra->start will be advanced and we create pages and queue reads from ra->start + ra->size further. Consequentially the page at 'index' is not created and filemap_get_pages() has to always go through filemap_create_folio() path. This behavior has particularly unfortunate consequences when we have two IO threads sequentially reading from a shared file (as is the case when NFS serves sequential reads). In that case what can happen is: suppose ra->size == ra->async_size == 128, ra->start = 512 T1 T2 reads 128 pages at index 512 - hits async readahead mark filemap_readahead() ondemand_readahead() if (index == expected ...) ra->start = 512 + 128 = 640 ra->size = 128 ra->async_size = 128 page_cache_ra_order() blocks in ra_alloc_folio() reads 128 pages at index 640 - no page found page_cache_sync_readahead() ondemand_readahead() if (index == expected ...) ra->start = 640 + 128 = 768 ra->size = 128 ra->async_size = 128 page_cache_ra_order() submits reads from 768 - still no page found at index 640 filemap_create_folio() - goes on to index 641 page_cache_sync_readahead() ondemand_readahead() - founds ra is confused, trims is to small size finds pages were already inserted And as a result read performance suffers. Fix the problem by triggering async readahead case in ondemand_readahead() only if we are calling the function because we hit the readahead marker. In any other case we need to read the folio at 'index' and thus we cannot really use the current ra state. Note that the above situation could be viewed as a special case of file->f_ra state corruption. In fact two thread reading using the shared file can also seemingly corrupt file->f_ra in interesting ways due to concurrent access. I never saw that in practice and the fix is going to be much more complex so for now at least fix this practical problem while we ponder about the theoretically correct solution. Link: https://lkml.kernel.org/r/20240625100859.15507-1-jack@suse.cz Link: https://lkml.kernel.org/r/20240625101909.12234-1-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Josef Bacik Tested-by: Zhang Peng Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit ee86814b0562f18255b55c5e6a01a022895994cf Author: David Hildenbrand Date: Thu Jun 20 23:29:35 2024 +0200 mm/migrate: move NUMA hinting fault folio isolation + checks under PTL Currently we always take a folio reference even if migration will not even be tried or isolation failed, requiring us to grab+drop an additional reference. Further, we end up calling folio_likely_mapped_shared() while the folio might have already been unmapped, because after we dropped the PTL, that can easily happen. We want to stop touching mapcounts and friends from such context, and only call folio_likely_mapped_shared() while the folio is still mapped: mapcount information is pretty much stale and unreliable otherwise. So let's move checks into numamigrate_isolate_folio(), rename that function to migrate_misplaced_folio_prepare(), and call that function from callsites where we call migrate_misplaced_folio(), but still with the PTL held. We can now stop taking temporary folio references, and really only take a reference if folio isolation succeeded. Doing the folio_likely_mapped_shared() + folio isolation under PT lock is now similar to how we handle MADV_PAGEOUT. While at it, combine the folio_is_file_lru() checks. [david@redhat.com: fix list_del() corruption] Link: https://lkml.kernel.org/r/8f85c31a-e603-4578-bf49-136dae0d4b69@redhat.com Link: https://lkml.kernel.org/r/20240626191129.658CFC32782@smtp.kernel.org Link: https://lkml.kernel.org/r/20240620212935.656243-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Baolin Wang Reviewed-by: Zi Yan Tested-by: Donet Tom Signed-off-by: Andrew Morton commit 4b88c23ab8c9bc3857f7c8847e2c6bed95185530 Author: David Hildenbrand Date: Thu Jun 20 23:29:34 2024 +0200 mm/migrate: make migrate_misplaced_folio() return 0 on success Patch series "mm/migrate: move NUMA hinting fault folio isolation + checks under PTL". Let's just return 0 on success, which is less confusing. ... especially because we got it wrong in the migrate.h stub where we have "return -EAGAIN; /* can't migrate now */" instead of "return 0;". Likely this wrong return value doesn't currently matter, but it certainly adds confusion. We'll add migrate_misplaced_folio_prepare() next, where we want to use the same "return 0 on success" approach, so let's just clean this up. Link: https://lkml.kernel.org/r/20240620212935.656243-1-david@redhat.com Link: https://lkml.kernel.org/r/20240620212935.656243-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Baolin Wang Cc: Donet Tom Signed-off-by: Andrew Morton commit 7d6be67cfdd4a53cea7147313ca13c531e3a470f Author: Tetsuo Handa Date: Fri Jun 21 10:08:41 2024 +0900 mm: mmap_lock: replace get_memcg_path_buf() with on-stack buffer Commit 2b5067a8143e ("mm: mmap_lock: add tracepoints around lock acquisition") introduced TRACE_MMAP_LOCK_EVENT() macro using preempt_disable() in order to let get_mm_memcg_path() return a percpu buffer exclusively used by normal, softirq, irq and NMI contexts respectively. Commit 832b50725373 ("mm: mmap_lock: use local locks instead of disabling preemption") replaced preempt_disable() with local_lock(&memcg_paths.lock) based on an argument that preempt_disable() has to be avoided because get_mm_memcg_path() might sleep if PREEMPT_RT=y. But syzbot started reporting inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. and inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. messages, for local_lock() does not disable IRQ. We could replace local_lock() with local_lock_irqsave() in order to suppress these messages. But this patch instead replaces percpu buffers with on-stack buffer, for the size of each buffer returned by get_memcg_path_buf() is only 256 bytes which is tolerable for allocating from current thread's kernel stack memory. Link: https://lkml.kernel.org/r/ef22d289-eadb-4ed9-863b-fbc922b33d8d@I-love.SAKURA.ne.jp Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=40905bca570ae6784745 Fixes: 832b50725373 ("mm: mmap_lock: use local locks instead of disabling preemption") Signed-off-by: Tetsuo Handa Reviewed-by: Axel Rasmussen Cc: Nicolas Saenz Julienne Cc: Signed-off-by: Andrew Morton commit b1a80f4be7691a1ea007e24ebb3c8ca2e4a20f00 Author: Ilya Leoshkevich Date: Thu Jun 27 16:57:47 2024 +0200 kmsan: do not pass NULL pointers as 0 sparse complains about passing NULL pointers as 0. Fix all instances. Link: https://lkml.kernel.org/r/20240627145754.27333-3-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406272033.KejtfLkw-lkp@intel.com/ Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit b072880d69adf2e3dd3e4320f553cc8b9174fea6 Author: Ilya Leoshkevich Date: Thu Jun 27 16:57:46 2024 +0200 kmsan: add missing __user tags sparse complains that __user pointers are being passed to functions that expect non-__user ones. In all cases, these functions are in fact working with user pointers, only the tag is missing. Add it. Link: https://lkml.kernel.org/r/20240627145754.27333-2-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406272033.KejtfLkw-lkp@intel.com/ Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 3a8f6f3b469b4075919a3613e182f9a70df92d46 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:22 2024 +0200 kmsan: enable on s390 Now that everything else is in place, enable KMSAN in Kconfig. Link: https://lkml.kernel.org/r/20240621113706.315500-39-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Acked-by: Heiko Carstens Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 2a48c8c9cf8793a0d23267c0f9ae3c9990819c90 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:21 2024 +0200 s390/kmsan: implement the architecture-specific functions arch_kmsan_get_meta_or_null() finds the lowcore shadow by querying the prefix and calling kmsan_get_metadata() again. kmsan_virt_addr_valid() delegates to virt_addr_valid(). Link: https://lkml.kernel.org/r/20240621113706.315500-38-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Acked-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 7e17eac28a7f72f9c96892709eb7056b01dc0d3d Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:20 2024 +0200 s390/unwind: disable KMSAN checks The unwind code can read uninitialized frames. Furthermore, even in the good case, KMSAN does not emit shadow for backchains. Therefore disable it for the unwinding functions. Link: https://lkml.kernel.org/r/20240621113706.315500-37-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit e0bebfd63af82e69419165770002420830fd32ec Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:19 2024 +0200 s390/uaccess: add the missing linux/instrumented.h #include uaccess.h uses instrument_get_user() and instrument_put_user(), which are defined in linux/instrumented.h. Currently we get this header from somewhere else by accident; prefer to be explicit about it and include it directly. Link: https://lkml.kernel.org/r/20240621113706.315500-36-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Suggested-by: Alexander Potapenko Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit eb6efdfeaeca355f12967d8109bc313213678c9b Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:18 2024 +0200 s390/uaccess: add KMSAN support to put_user() and get_user() put_user() uses inline assembly with precise constraints, so Clang is in principle capable of instrumenting it automatically. Unfortunately, one of the constraints contains a dereferenced user pointer, and Clang does not currently distinguish user and kernel pointers. Therefore KMSAN attempts to access shadow for user pointers, which is not a right thing to do. An obvious fix to add __no_sanitize_memory to __put_user_fn() does not work, since it's __always_inline. And __always_inline cannot be removed due to the __put_user_bad() trick. A different obvious fix of using the "a" instead of the "+Q" constraint degrades the code quality, which is very important here, since it's a hot path. Instead, repurpose the __put_user_asm() macro to define __put_user_{char,short,int,long}_noinstr() functions and mark them with __no_sanitize_memory. For the non-KMSAN builds make them __always_inline in order to keep the generated code quality. Also define __put_user_{char,short,int,long}() functions, which call the aforementioned ones and which *are* instrumented, because they call KMSAN hooks, which may be implemented as macros. The same applies to get_user() as well. Link: https://lkml.kernel.org/r/20240621113706.315500-35-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Acked-by: Heiko Carstens Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit c1057a707abadb347968087a139bf40a4cca95f4 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:17 2024 +0200 s390/traps: unpoison the kernel_stack_overflow()'s pt_regs This is normally done by the generic entry code, but the kernel_stack_overflow() flow bypasses it. Link: https://lkml.kernel.org/r/20240621113706.315500-34-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 05a6dde667854629f305ae687966d5e57032ab87 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:16 2024 +0200 s390/string: add KMSAN support Add KMSAN support for the s390 implementations of the string functions. Do this similar to how it's already done for KASAN, except that the optimized memset{16,32,64}() functions need to be disabled: it's important for KMSAN to know that they initialized something. The way boot code is built with regard to string functions is problematic, since most files think it's configured with sanitizers, but boot/string.c doesn't. This creates various problems with the memset64() definitions, depending on whether the code is built with sanitizers or fortify. This should probably be streamlined, but in the meantime resolve the issues by introducing the IN_BOOT_STRING_C macro, similar to the existing IN_ARCH_STRING_C macro. Link: https://lkml.kernel.org/r/20240621113706.315500-33-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 65ca73f9fb36740b0788620c783245fdb22e1535 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:15 2024 +0200 s390/mm: define KMSAN metadata for vmalloc and modules The pages for the KMSAN metadata associated with most kernel mappings are taken from memblock by the common code. However, vmalloc and module metadata needs to be defined by the architectures. Be a little bit more careful than x86: allocate exactly MODULES_LEN for the module shadow and origins, and then take 2/3 of vmalloc for the vmalloc shadow and origins. This ensures that users passing small vmalloc= values on the command line do not cause module metadata collisions. Link: https://lkml.kernel.org/r/20240621113706.315500-32-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Acked-by: Alexander Gordeev Acked-by: Heiko Carstens Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1b301f5f28bae33087ec0d8a8730a02c87ba6235 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:14 2024 +0200 s390/irqflags: do not instrument arch_local_irq_*() with KMSAN Lockdep generates the following false positives with KMSAN on s390x: [ 6.063666] DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled()) [ ...] [ 6.577050] Call Trace: [ 6.619637] [<000000000690d2de>] check_flags+0x1fe/0x210 [ 6.665411] ([<000000000690d2da>] check_flags+0x1fa/0x210) [ 6.707478] [<00000000006cec1a>] lock_acquire+0x2ca/0xce0 [ 6.749959] [<00000000069820ea>] _raw_spin_lock_irqsave+0xea/0x190 [ 6.794912] [<00000000041fc988>] __stack_depot_save+0x218/0x5b0 [ 6.838420] [<000000000197affe>] __msan_poison_alloca+0xfe/0x1a0 [ 6.882985] [<0000000007c5827c>] start_kernel+0x70c/0xd50 [ 6.927454] [<0000000000100036>] startup_continue+0x36/0x40 Between trace_hardirqs_on() and `stosm __mask, 3` lockdep thinks that interrupts are on, but on the CPU they are still off. KMSAN instrumentation takes spinlocks, giving lockdep a chance to see and complain about this discrepancy. KMSAN instrumentation is inserted in order to poison the __mask variable. Disable instrumentation in the respective functions. They are very small and it's easy to see that no important metadata updates are lost because of this. Link: https://lkml.kernel.org/r/20240621113706.315500-31-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 0cfd60a6a1401b58f79c83328bce0eb9a2d2d9ad Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:13 2024 +0200 s390/ftrace: unpoison ftrace_regs in kprobe_ftrace_handler() s390 uses assembly code to initialize ftrace_regs and call kprobe_ftrace_handler(). Therefore, from the KMSAN's point of view, ftrace_regs is poisoned on kprobe_ftrace_handler() entry. This causes KMSAN warnings when running the ftrace testsuite. Fix by trusting the assembly code and always unpoisoning ftrace_regs in kprobe_ftrace_handler(). Link: https://lkml.kernel.org/r/20240621113706.315500-30-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1f4cf6397952431694e20eeaee6290911bdca759 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:12 2024 +0200 s390/diag: unpoison diag224() output buffer Diagnose 224 stores 4k bytes, which currently cannot be deduced from the inline assembly constraints. This leads to KMSAN false positives. Fix the constraints by using a 4k-sized struct instead of a raw pointer. While at it, prettify them too. Link: https://lkml.kernel.org/r/20240621113706.315500-29-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Suggested-by: Heiko Carstens Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 81b6bde8ba0867910d5442c14c22cdb23d21cd84 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:11 2024 +0200 s390/cpumf: unpoison STCCTM output buffer stcctm() uses the "Q" constraint for dest, therefore KMSAN does not understand that it fills multiple doublewords pointed to by dest, not just one. This results in false positives. Unpoison the whole dest manually with kmsan_unpoison_memory(). Link: https://lkml.kernel.org/r/20240621113706.315500-28-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reported-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 8c208bc5b299a817beafbda239800d4d1eca48db Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:10 2024 +0200 s390/cpacf: unpoison the results of cpacf_trng() Prevent KMSAN from complaining about buffers filled by cpacf_trng() being uninitialized. Link: https://lkml.kernel.org/r/20240621113706.315500-27-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Tested-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Acked-by: Heiko Carstens Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit e1b1c7f941712f20e0ce71ad181eba568865cdc2 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:09 2024 +0200 s390/checksum: add a KMSAN check Add a KMSAN check to the CKSM inline assembly, similar to how it was done for ASAN in commit e42ac7789df6 ("s390/checksum: always use cksm instruction"). Link: https://lkml.kernel.org/r/20240621113706.315500-26-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Acked-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 008dead43d1e16b9849b388a47f7e3e647dd09ec Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:08 2024 +0200 s390/boot: add the KMSAN runtime stub It should be possible to have inline functions in the s390 header files, which call kmsan_unpoison_memory(). The problem is that these header files might be included by the decompressor, which does not contain KMSAN runtime, causing linker errors. Not compiling these calls if __SANITIZE_MEMORY__ is not defined - either by changing kmsan-checks.h or at the call sites - may cause unintended side effects, since calling these functions from an uninstrumented code that is linked into the kernel is valid use case. One might want to explicitly distinguish between the kernel and the decompressor. Checking for a decompressor-specific #define is quite heavy-handed, and will have to be done at all call sites. A more generic approach is to provide a dummy kmsan_unpoison_memory() definition. This produces some runtime overhead, but only when building with CONFIG_KMSAN. The benefit is that it does not disturb the existing KMSAN build logic and call sites don't need to be changed. Link: https://lkml.kernel.org/r/20240621113706.315500-25-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 435dc41efdd3f0a98bd3e128799b0e04697a2d2c Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:07 2024 +0200 s390: use a larger stack for KMSAN Adjust the stack size for the KMSAN-enabled kernel like it was done for the KASAN-enabled one in commit 7fef92ccadd7 ("s390/kasan: double the stack size"). Both tools have similar requirements. Link: https://lkml.kernel.org/r/20240621113706.315500-24-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit c5944a7ec148b4c3e004d7f9243501094571cdd7 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:06 2024 +0200 s390/boot: turn off KMSAN All other sanitizers are disabled for boot as well. While at it, add a comment explaining why we need this. Link: https://lkml.kernel.org/r/20240621113706.315500-23-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit cd613bd699fe4652c3be24d81f4e447cd646c5b2 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:05 2024 +0200 kmsan: accept ranges starting with 0 on s390 On s390 the virtual address 0 is valid (current CPU's lowcore is mapped there), therefore KMSAN should not complain about it. Disable the respective check on s390. There doesn't seem to be a Kconfig option to describe this situation, so explicitly check for s390. Link: https://lkml.kernel.org/r/20240621113706.315500-22-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 89f42df66c32690a2d0087b12948bcf9e336d56e Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:04 2024 +0200 lib/zlib: unpoison DFLTCC output buffers The constraints of the DFLTCC inline assembly are not precise: they do not communicate the size of the output buffers to the compiler, so it cannot automatically instrument it. Add the manual kmsan_unpoison_memory() calls for the output buffers. The logic is the same as in [1]. [1] https://github.com/zlib-ng/zlib-ng/commit/1f5ddcc009ac3511e99fc88736a9e1a6381168c5 Link: https://lkml.kernel.org/r/20240621113706.315500-21-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reported-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4d7b5a2cec6efb4dfd42a3fddf321d4d828e794d Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:03 2024 +0200 mm: kfence: disable KMSAN when checking the canary KMSAN warns about check_canary() accessing the canary. The reason is that, even though set_canary() is properly instrumented and sets shadow, slub explicitly poisons the canary's address range afterwards. Unpoisoning the canary is not the right thing to do: only check_canary() is supposed to ever touch it. Instead, disable KMSAN checks around canary read accesses. Link: https://lkml.kernel.org/r/20240621113706.315500-20-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Tested-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit adea98761806642500003b252e095b151c47e807 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:02 2024 +0200 mm: slub: disable KMSAN when checking the padding bytes Even though the KMSAN warnings generated by memchr_inv() are suppressed by metadata_access_enable(), its return value may still be poisoned. The reason is that the last iteration of memchr_inv() returns `*start != value ? start : NULL`, where *start is poisoned. Because of this, somewhat counterintuitively, the shadow value computed by visitSelectInst() is equal to `(uintptr_t)start`. One possibility to fix this, since the intention behind guarding memchr_inv() behind metadata_access_enable() is to touch poisoned metadata without triggering KMSAN, is to unpoison its return value. However, this approach is too fragile. So simply disable the KMSAN checks in the respective functions. Link: https://lkml.kernel.org/r/20240621113706.315500-19-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 0e9a8550f320db944e4cf036d93c5debf0e574a7 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:01 2024 +0200 mm: slub: let KMSAN access metadata Building the kernel with CONFIG_SLUB_DEBUG and CONFIG_KMSAN causes KMSAN to complain about touching redzones in kfree(). Fix by extending the existing KASAN-related metadata_access_enable() and metadata_access_disable() functions to KMSAN. Link: https://lkml.kernel.org/r/20240621113706.315500-18-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Acked-by: Vlastimil Babka Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit e6553e2f79b2673b239c3dd47a88451119eb82d9 Author: Ilya Leoshkevich Date: Fri Jun 21 13:35:00 2024 +0200 kmsan: expose KMSAN_WARN_ON() KMSAN_WARN_ON() is required for implementing s390-specific KMSAN functions, but right now it's available only to the KMSAN internal functions. Expose it to subsystems through . Link: https://lkml.kernel.org/r/20240621113706.315500-17-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d1dac751f438dc69225e5580031cead2c005de83 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:59 2024 +0200 kmsan: do not round up pg_data_t size x86's alloc_node_data() rounds up node data size to PAGE_SIZE. It's not explained why it's needed, but it's most likely for performance reasons, since the padding bytes are not used anywhere. Some other architectures do it as well, e.g., mips rounds it up to the cache line size. kmsan_init_shadow() initializes metadata for each node data and assumes the x86 rounding, which does not match other architectures. This may cause the range end to overshoot the end of available memory, in turn causing virt_to_page_or_null() in kmsan_init_alloc_meta_for_range() to return NULL, which leads to kernel panic shortly after. Since the padding bytes are not used, drop the rounding. Link: https://lkml.kernel.org/r/20240621113706.315500-16-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f6a202f3643cd1468b012eab842e59ec23d726a9 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:58 2024 +0200 kmsan: use ALIGN_DOWN() in kmsan_get_metadata() Improve the readability by replacing the custom aligning logic with ALIGN_DOWN(). Unlike other places where a similar sequence is used, there is no size parameter that needs to be adjusted, so the standard macro fits. Link: https://lkml.kernel.org/r/20240621113706.315500-15-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f416817197e102b9bc6118101c3be652dac01a44 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:57 2024 +0200 kmsan: support SLAB_POISON Avoid false KMSAN negatives with SLUB_DEBUG by allowing kmsan_slab_free() to poison the freed memory, and by preventing init_object() from unpoisoning new allocations by using __memset(). There are two alternatives to this approach. First, init_object() can be marked with __no_sanitize_memory. This annotation should be used with great care, because it drops all instrumentation from the function, and any shadow writes will be lost. Even though this is not a concern with the current init_object() implementation, this may change in the future. Second, kmsan_poison_memory() calls may be added after memset() calls. The downside is that init_object() is called from free_debug_processing(), in which case poisoning will erase the distinction between simply uninitialized memory and UAF. Link: https://lkml.kernel.org/r/20240621113706.315500-14-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1fdb3c7006d9914e4b070f7eee98dfbdf743ee16 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:56 2024 +0200 kmsan: introduce memset_no_sanitize_memory() Add a wrapper for memset() that prevents unpoisoning. This is useful for filling memory allocator redzones. Link: https://lkml.kernel.org/r/20240621113706.315500-13-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit ec3e837d8fd96c68599b2861dd412094b7bc335c Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:55 2024 +0200 kmsan: allow disabling KMSAN checks for the current task Like for KASAN, it's useful to temporarily disable KMSAN checks around, e.g., redzone accesses. Introduce kmsan_disable_current() and kmsan_enable_current(), which are similar to their KASAN counterparts. Make them reentrant in order to handle memory allocations in interrupt context. Repurpose the allow_reporting field for this. Link: https://lkml.kernel.org/r/20240621113706.315500-12-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f2d62702d48a536308e06a90188d666b10e3089d Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:54 2024 +0200 kmsan: export panic_on_kmsan When building the kmsan test as a module, modpost fails with the following error message: ERROR: modpost: "panic_on_kmsan" [mm/kmsan/kmsan_test.ko] undefined! Export panic_on_kmsan in order to improve the KMSAN usability for modules. Link: https://lkml.kernel.org/r/20240621113706.315500-11-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 6b1709d4b7fce27c6c79fc78c17c458f9848a4d8 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:53 2024 +0200 kmsan: expose kmsan_get_metadata() Each s390 CPU has lowcore pages associated with it. Each CPU sees its own lowcore at virtual address 0 through a hardware mechanism called prefixing. Additionally, all lowcores are mapped to non-0 virtual addresses stored in the lowcore_ptr[] array. When lowcore is accessed through virtual address 0, one needs to resolve metadata for lowcore_ptr[raw_smp_processor_id()]. Expose kmsan_get_metadata() to make it possible to do this from the arch code. Link: https://lkml.kernel.org/r/20240621113706.315500-10-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 61849c89e70da3e38b16a317a474f6166ad89572 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:52 2024 +0200 kmsan: remove an x86-specific #include from kmsan.h Replace the x86-specific asm/pgtable_64_types.h #include with the linux/pgtable.h one, which all architectures have. While at it, sort the headers alphabetically for the sake of consistency with other KMSAN code. Link: https://lkml.kernel.org/r/20240621113706.315500-9-iii@linux.ibm.com Fixes: f80be4571b19 ("kmsan: add KMSAN runtime core") Signed-off-by: Ilya Leoshkevich Suggested-by: Heiko Carstens Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit e54024f00b0df734183d0590fc510a9406a3d6be Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:51 2024 +0200 kmsan: remove a useless assignment from kmsan_vmap_pages_range_noflush() The value assigned to prot is immediately overwritten on the next line with PAGE_KERNEL. The right hand side of the assignment has no side-effects. Link: https://lkml.kernel.org/r/20240621113706.315500-8-iii@linux.ibm.com Fixes: b073d7f8aee4 ("mm: kmsan: maintain KMSAN metadata for page operations") Signed-off-by: Ilya Leoshkevich Suggested-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f926e9326f3a79f7e01ac790e2361f44d8ca8320 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:50 2024 +0200 kmsan: fix kmsan_copy_to_user() on arches with overlapping address spaces Comparing pointers with TASK_SIZE does not make sense when kernel and userspace overlap. Assume that we are handling user memory access in this case. Link: https://lkml.kernel.org/r/20240621113706.315500-7-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reported-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 59af94563059a111ea150301c311ddaddee1a6a6 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:49 2024 +0200 kmsan: fix is_bad_asm_addr() on arches with overlapping address spaces Comparing pointers with TASK_SIZE does not make sense when kernel and userspace overlap. Skip the comparison when this is the case. Link: https://lkml.kernel.org/r/20240621113706.315500-6-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 95044e1dc55c89accda6480cf1ebbfdf8ad95b89 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:48 2024 +0200 kmsan: increase the maximum store size to 4096 The inline assembly block in s390's chsc() stores that much. Link: https://lkml.kernel.org/r/20240621113706.315500-5-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 854fa98d1dffd65fee741c742b527a7cf8630dd0 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:47 2024 +0200 kmsan: disable KMSAN when DEFERRED_STRUCT_PAGE_INIT is enabled KMSAN relies on memblock returning all available pages to it (see kmsan_memblock_free_pages()). It partitions these pages into 3 categories: pages available to the buddy allocator, shadow pages and origin pages. This partitioning is static. If new pages appear after kmsan_init_runtime(), it is considered an error. DEFERRED_STRUCT_PAGE_INIT causes this, so mark it as incompatible with KMSAN. Link: https://lkml.kernel.org/r/20240621113706.315500-4-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 7d1c8e99b28ad583385532649f186dbc0e0043a6 Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:46 2024 +0200 kmsan: make the tests compatible with kmsan.panic=1 It's useful to have both tests and kmsan.panic=1 during development, but right now the warnings, that the tests cause, lead to kernel panics. Temporarily set kmsan.panic=0 for the duration of the KMSAN testing. Link: https://lkml.kernel.org/r/20240621113706.315500-3-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit c02525a33969000fa7b595b743deb4d79804916b Author: Ilya Leoshkevich Date: Fri Jun 21 13:34:45 2024 +0200 ftrace: unpoison ftrace_regs in ftrace_ops_list_func() Patch series "kmsan: Enable on s390", v7. Architectures use assembly code to initialize ftrace_regs and call ftrace_ops_list_func(). Therefore, from the KMSAN's point of view, ftrace_regs is poisoned on ftrace_ops_list_func entry(). This causes KMSAN warnings when running the ftrace testsuite. Fix by trusting the architecture-specific assembly code and always unpoisoning ftrace_regs in ftrace_ops_list_func. The issue was not encountered on x86_64 so far only by accident: assembly-allocated ftrace_regs was overlapping a stale partially unpoisoned stack frame. Poisoning stack frames before returns [1] makes the issue appear on x86_64 as well. [1] https://github.com/iii-i/llvm-project/commits/msan-poison-allocas-before-returning-2024-06-12/ Link: https://lkml.kernel.org/r/20240621113706.315500-1-iii@linux.ibm.com Link: https://lkml.kernel.org/r/20240621113706.315500-2-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Acked-by: Steven Rostedt (Google) Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 437881bc1c6b2edc269857874690b359f1ad1985 Author: SeongJae Park Date: Fri Jun 21 09:36:26 2024 -0700 Docs/mm/damon/maintainer-profile: document DAMON community meetups DAMON bi-weekly community meetup series has continued since 2022-08-15 for community members who prefer synchronous chat over asynchronous mails. Recently I got some feedbacks about the series from a few people. They told me the series is helpful for understanding of the project and particiapting to the development, but it could be further better in terms of the visibility. Based on that, I started sending meeting reminder for every occurrence. For people who don't subscribe the mailing list, however, adding an announcement on the official document could be helpful. Document the series on DAMON maintainer's profile for the purpose. Link: https://lkml.kernel.org/r/20240621163626.74815-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 3fe17dd0969850bb6b80ee343ba75d3d8eb151e1 Author: SeongJae Park Date: Fri Jun 21 09:36:25 2024 -0700 Docs/mm/damon/maintainer-profile: introduce HacKerMaiL Patch series "Docs/mm/damon/maintaier-profile: document a mailing tool and community meetup series", v2. There is a mailing tool that developed and maintained by DAMON maintainer aiming to support DAMON community. Also there are DAMON community meetup series. Both are known to have rooms of improvements in terms of their visibility. Document those on the maintainer's profile document. This patch (of 2): Since DAMON was merged into mainline, I periodically received some questions around DAMON's mailing lists based workflow. The workflow is not different from the normal ones that well documented, but it is also true that it is not always easy and familiar for everyone. I personally overcame it by developing and using a simple tool, named HacKerMaiL (hkml)[1]. Based on my experience, I believe it is matured enough to be used for simple workflows like that of DAMON. Actually some DAMON contributors and Linux kernel developers other than myself told me they are using the tool. As DAMON maintainer, I also believe helping new DAMON community members onboarding to the worklow is one of the most important parts of my responsibilities. For the reason, the tool is announced[2] to support DAMON community. To further increasing the visibility of the fact, document the tool and the support plan on DAMON maintainer's profile. [1] https://github.com/damonitor/hackermail [2] https://github.com/damonitor/hackermail/commit/3909dad91301 Link: https://lkml.kernel.org/r/20240621163626.74815-1-sj@kernel.org Link: https://lkml.kernel.org/r/20240621163626.74815-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton commit dc9e6f7053dd540db2c9fba30c31a07de5edab01 Author: David Hildenbrand Date: Fri May 31 14:56:16 2024 +0200 mm: read page_type using READ_ONCE KCSAN complains about possible data races: while we check for a page_type -- for example for sanity checks -- we might concurrently modify the mapcount that overlays page_type. Let's use READ_ONCE to avoid load tearing (shouldn't make a difference) and to make KCSAN happy. Likely, we might also want to use WRITE_ONCE for the writer side of page_type, if KCSAN ever complains about that. But we'll not mess with that for now. Note: nothing should really be broken besides wrong KCSAN complaints. The sanity check that triggers this was added in commit 68f0320824fa ("mm/rmap: convert folio_add_file_rmap_range() into folio_add_file_rmap_[pte|ptes|pmd]()"). Even before that similar races likely where possible, ever since we added page_type in commit 6e292b9be7f4 ("mm: split page_type out from _mapcount"). Link: https://lkml.kernel.org/r/20240531125616.2850153-1-david@redhat.com Signed-off-by: David Hildenbrand Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202405281431.c46a3be9-lkp@intel.com Reviewed-by: Oscar Salvador Reviewed-by: Miaohe Lin Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 2f9f0854360f0ed0f530dbc4566b052a4a7f3637 Author: Kefeng Wang Date: Tue Jun 18 17:12:42 2024 +0800 mm: memory: rename pages_per_huge_page to nr_pages Since the callers are converted to use nr_pages naming, use it inside too. Link: https://lkml.kernel.org/r/20240618091242.2140164-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 530dd9926dc16220d2fae0997f45cda94f5f0864 Author: Kefeng Wang Date: Tue Jun 18 17:12:41 2024 +0800 mm: memory: improve copy_user_large_folio() Use nr_pages instead of pages_per_huge_page and move the address alignment from copy_user_large_folio() into the callers since it is only needed when we don't know which address will be accessed. Link: https://lkml.kernel.org/r/20240618091242.2140164-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 5132633ee7b46f3b62ae834539ae6ef74fd27873 Author: Kefeng Wang Date: Tue Jun 18 17:12:40 2024 +0800 mm: memory: use folio in struct copy_subpage_arg Directly use folio in struct copy_subpage_arg. Link: https://lkml.kernel.org/r/20240618091242.2140164-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 78fefd04c123493bbf28434768fa577b2153c79b Author: Kefeng Wang Date: Tue Jun 18 17:12:39 2024 +0800 mm: memory: convert clear_huge_page() to folio_zero_user() Patch series "mm: improve clear and copy user folio", v2. Some folio conversions. An improvement is to move address alignment into the caller as it is only needed if we don't know which address will be accessed when clearing/copying user folios. This patch (of 4): Replace clear_huge_page() with folio_zero_user(), and take a folio instead of a page. Directly get number of pages by folio_nr_pages() to remove pages_per_huge_page argument, furthermore, move the address alignment from folio_zero_user() to the callers since the alignment is only needed when we don't know which address will be accessed. Link: https://lkml.kernel.org/r/20240618091242.2140164-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20240618091242.2140164-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Signed-off-by: Andrew Morton commit 08af2c12e3ef379de94ba5653f2f9ae9a588ecd9 Author: Wei Yang Date: Wed Jun 19 01:06:12 2024 +0000 mm/page_alloc: reword the comment of buddy_merge_likely() For page with order O, we are checking its order (O + 1)'s buddy. If it is free, we would like to put it to the tail and expect it would be merged to a page with order (O + 2). Reword the comment to reflect it. Link: https://lkml.kernel.org/r/20240619010612.20740-4-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit b719efa22d1ebe00ca7f9cfa80e5222e12a2dbfd Author: Wei Yang Date: Wed Jun 19 01:06:11 2024 +0000 mm/page_alloc: fix a typo in comment about GFP flag The GFP flags used to choose the zonelist is __GFP_THISNODE. Let's change it to what exactly it should be. Link: https://lkml.kernel.org/r/20240619010612.20740-3-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 64e0ba3948ddb99246e8f3c2c34a67be324220db Author: Wei Yang Date: Wed Jun 19 01:06:10 2024 +0000 mm/mm_init.c: move build check on MAX_ZONELISTS out of ifdef Current check on MAX_ZONELISTS is wrapped in CONFIG_DEBUG_MEMORY_INIT, which may not be triggered all the time. Let's move it out to a more general place. Link: https://lkml.kernel.org/r/20240619010612.20740-2-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 861dd8b9e34fc3fc05762a952ad8dd701dc0f0f1 Author: Wei Yang Date: Wed Jun 19 01:06:09 2024 +0000 mm/sparse: nr_pages won't be 0 Function subsection_map_init() is only used in free_area_init() in the loop of for_each_mem_pfn_range(). And we are sure in each iteration of for_each_mem_pfn_range(), start_pfn < end_pfn. So nr_pages is not possible to be 0 and we can remove the check. Link: https://lkml.kernel.org/r/20240619010612.20740-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 5cea5666e4b556f4daa414a7379790ce8d225a48 Author: Jiaqi Yan Date: Wed Jun 19 06:33:55 2024 +0000 mm/memory-failure: refactor log format in unpoison_memory Logs from memory_failure and other memory-failure.c code follow the format: "Memory failure: 0x{pfn}: ${lower_case_message}" Convert the logs in unpoison_memory to follow similar format: "Unpoison: 0x${pfn}: ${lower_case_message}" For example (from local test): [ 1331.938397] Unpoison: 0x144bc8: page was already unpoisoned No functional change in this commit. Link: https://lkml.kernel.org/r/20240619063355.171313-1-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: Miaohe Lin Cc: Jane Chu Cc: Lance Yang Cc: Naoya Horiguchi Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 34f7c5288a4d3a17db190dd19b0a4a19c26cf3ae Author: Javier Martinez Canillas Date: Wed Jun 19 10:30:38 2024 +0200 mm/Kconfig: mention arm64 in DEFAULT_MMAP_MIN_ADDR symbol help text Currently ppc64 and x86 are mentioned as architectures where a 65536 value is reasonable but arm64 isn't listed and it is also a 64-bit architecture. The help text says that for "arm" the value should be no higher than 32768 but it's only talking about 32-bit ARM. Adding arm64 to the above list can make this more clear and avoid confusing users who may think that the 32k limit would also apply to 64-bit ARM. Link: https://lkml.kernel.org/r/20240619083047.114613-1-javierm@redhat.com Signed-off-by: Javier Martinez Canillas Cc: Brian Masney Cc: Javier Martinez Canillas Cc: Maxime Ripard Signed-off-by: Andrew Morton commit 739820a6178b03b1b6b99a467c85e9e7146d51c1 Author: JaeJoon Jung Date: Fri Jun 14 18:24:28 2024 +0900 maple_tree: modified return type of mas_wr_store_entry() Since the return value of mas_wr_store_entry() is not used, the return type can be changed to void. Link: https://lkml.kernel.org/r/20240614092428.29491-1-rgbi3307@gmail.com Signed-off-by: JaeJoon Jung Reviewed-by: Liam R. Howlett Cc: Sidhartha Kumar Signed-off-by: Andrew Morton commit 4c1171f1d22484f2419b07ab688548350db521cb Author: Barry Song Date: Tue Jun 18 11:11:37 2024 +1200 mm: remove folio_test_anon(folio)==false path in __folio_add_anon_rmap() The folio_test_anon(folio)==false cases has been relocated to folio_add_new_anon_rmap(). Additionally, four other callers consistently pass anonymous folios. stack 1: remove_migration_pmd -> folio_add_anon_rmap_pmd -> __folio_add_anon_rmap stack 2: __split_huge_pmd_locked -> folio_add_anon_rmap_ptes -> __folio_add_anon_rmap stack 3: remove_migration_pmd -> folio_add_anon_rmap_pmd -> __folio_add_anon_rmap (RMAP_LEVEL_PMD) stack 4: try_to_merge_one_page -> replace_page -> folio_add_anon_rmap_pte -> __folio_add_anon_rmap __folio_add_anon_rmap() only needs to handle the cases folio_test_anon(folio)==true now. We can remove the !folio_test_anon(folio)) path within __folio_add_anon_rmap() now. Link: https://lkml.kernel.org/r/20240617231137.80726-4-21cnbao@gmail.com Signed-off-by: Barry Song Suggested-by: David Hildenbrand Tested-by: Shuai Yuan Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Chris Li Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Ryan Roberts Cc: Suren Baghdasaryan Cc: Yang Shi Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton commit 9ae2feacedde16067014f11414675f385c68eedc Author: Barry Song Date: Tue Jun 18 11:11:36 2024 +1200 mm: use folio_add_new_anon_rmap() if folio_test_anon(folio)==false For the !folio_test_anon(folio) case, we can now invoke folio_add_new_anon_rmap() with the rmap flags set to either EXCLUSIVE or non-EXCLUSIVE. This action will suppress the VM_WARN_ON_FOLIO check within __folio_add_anon_rmap() while initiating the process of bringing up mTHP swapin. static __always_inline void __folio_add_anon_rmap(struct folio *folio, struct page *page, int nr_pages, struct vm_area_struct *vma, unsigned long address, rmap_t flags, enum rmap_level level) { ... if (unlikely(!folio_test_anon(folio))) { VM_WARN_ON_FOLIO(folio_test_large(folio) && level != RMAP_LEVEL_PMD, folio); } ... } It also improves the code's readability. Currently, all new anonymous folios calling folio_add_anon_rmap_ptes() are order-0. This ensures that new folios cannot be partially exclusive; they are either entirely exclusive or entirely shared. A useful comment from Hugh's fix: : Commit "mm: use folio_add_new_anon_rmap() if folio_test_anon(folio)== : false" has extended folio_add_new_anon_rmap() to use on non-exclusive : folios, already visible to others in swap cache and on LRU. : : That renders its non-atomic __folio_set_swapbacked() unsafe: it risks : overwriting concurrent atomic operations on folio->flags, losing bits : added or restoring bits cleared. Since it's only used in this risky way : when folio_test_locked and !folio_test_anon, many such races are excluded; : but, for example, isolations by folio_test_clear_lru() are vulnerable, and : setting or clearing active. : : It could just use the atomic folio_set_swapbacked(); but this function : does try to avoid atomics where it can, so use a branch instead: just : avoid setting swapbacked when it is already set, that is good enough. : (Swapbacked is normally stable once set: lazyfree can undo it, but only : later, when found anon in a page table.) : : This fixes a lot of instability under compaction and swapping loads: : assorted "Bad page"s, VM_BUG_ON_FOLIO()s, apparently even page double : frees - though I've not worked out what races could lead to the latter. [akpm@linux-foundation.org: comment fixes, per David and akpm] [v-songbaohua@oppo.com: lock the folio to avoid race] Link: https://lkml.kernel.org/r/20240622032002.53033-1-21cnbao@gmail.com [hughd@google.com: folio_add_new_anon_rmap() careful __folio_set_swapbacked()] Link: https://lkml.kernel.org/r/f3599b1d-8323-0dc5-e9e0-fdb3cfc3dd5a@google.com Link: https://lkml.kernel.org/r/20240617231137.80726-3-21cnbao@gmail.com Signed-off-by: Barry Song Signed-off-by: Hugh Dickins Suggested-by: David Hildenbrand Tested-by: Shuai Yuan Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Chris Li Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Ryan Roberts Cc: Suren Baghdasaryan Cc: Yang Shi Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton commit 15bde4abab734c687c1f81704886aba3a70c268e Author: Barry Song Date: Tue Jun 18 11:11:35 2024 +1200 mm: extend rmap flags arguments for folio_add_new_anon_rmap Patch series "mm: clarify folio_add_new_anon_rmap() and __folio_add_anon_rmap()", v2. This patchset is preparatory work for mTHP swapin. folio_add_new_anon_rmap() assumes that new anon rmaps are always exclusive. However, this assumption doesn’t hold true for cases like do_swap_page(), where a new anon might be added to the swapcache and is not necessarily exclusive. The patchset extends the rmap flags to allow folio_add_new_anon_rmap() to handle both exclusive and non-exclusive new anon folios. The do_swap_page() function is updated to use this extended API with rmap flags. Consequently, all new anon folios now consistently use folio_add_new_anon_rmap(). The special case for !folio_test_anon() in __folio_add_anon_rmap() can be safely removed. In conclusion, new anon folios always use folio_add_new_anon_rmap(), regardless of exclusivity. Old anon folios continue to use __folio_add_anon_rmap() via folio_add_anon_rmap_pmd() and folio_add_anon_rmap_ptes(). This patch (of 3): In the case of a swap-in, a new anonymous folio is not necessarily exclusive. This patch updates the rmap flags to allow a new anonymous folio to be treated as either exclusive or non-exclusive. To maintain the existing behavior, we always use EXCLUSIVE as the default setting. [akpm@linux-foundation.org: cleanup and constifications per David and akpm] [v-songbaohua@oppo.com: fix missing doc for flags of folio_add_new_anon_rmap()] Link: https://lkml.kernel.org/r/20240619210641.62542-1-21cnbao@gmail.com [v-songbaohua@oppo.com: enhance doc for extend rmap flags arguments for folio_add_new_anon_rmap] Link: https://lkml.kernel.org/r/20240622030256.43775-1-21cnbao@gmail.com Link: https://lkml.kernel.org/r/20240617231137.80726-1-21cnbao@gmail.com Link: https://lkml.kernel.org/r/20240617231137.80726-2-21cnbao@gmail.com Signed-off-by: Barry Song Suggested-by: David Hildenbrand Tested-by: Shuai Yuan Acked-by: David Hildenbrand Cc: Baolin Wang Cc: Chris Li Cc: "Huang, Ying" Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Ryan Roberts Cc: Suren Baghdasaryan Cc: Yang Shi Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton commit 55ccad6fc1a03c814c26f0e6b35db50feda2c59e Author: Shubhang Kaushik OS Date: Mon Jun 10 17:22:58 2024 +0000 vmalloc: modify the alloc_vmap_area() error message for better diagnostics 'vmap allocation for size %lu failed: use vmalloc= to increase size' The above warning is seen in the kernel functionality for allocation of the restricted virtual memory range till exhaustion. This message is misleading because 'vmalloc=' is supported on arm32, x86 platforms and is not a valid kernel parameter on a number of other platforms (in particular its not supported on arm64, alpha, loongarch, arc, csky, hexagon, microblaze, mips, nios2, openrisc, parisc, m64k, powerpc, riscv, sh, um, xtensa, s390, sparc). With the update, the output gets modified to include the function parameters along with the start and end of the virtual memory range allowed. The warning message after fix on kernel version 6.10.0-rc1+: vmalloc_node_range for size 33619968 failed: Address range restricted between 0xffff800082640000 - 0xffff800084650000 Backtrace with the misleading error message: vmap allocation for size 33619968 failed: use vmalloc= to increase size insmod: vmalloc error: size 33554432, vm_struct allocation failed, mode:0xcc0(GFP_KERNEL), nodemask=(null),cpuset=/,mems_allowed=0 CPU: 46 PID: 1977 Comm: insmod Tainted: G E 6.10.0-rc1+ #79 Hardware name: INGRASYS Yushan Server iSystem TEMP-S000141176+10/Yushan Motherboard, BIOS 2.10.20230517 (SCP: xxx) yyyy/mm/dd Call trace: dump_backtrace+0xa0/0x128 show_stack+0x20/0x38 dump_stack_lvl+0x78/0x90 dump_stack+0x18/0x28 warn_alloc+0x12c/0x1b8 __vmalloc_node_range_noprof+0x28c/0x7e0 custom_init+0xb4/0xfff8 [test_driver] do_one_initcall+0x60/0x290 do_init_module+0x68/0x250 load_module+0x236c/0x2428 init_module_from_file+0x8c/0xd8 __arm64_sys_finit_module+0x1b4/0x388 invoke_syscall+0x78/0x108 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x3c/0x130 el0t_64_sync_handler+0x100/0x130 el0t_64_sync+0x190/0x198 [Shubhang@os.amperecomputing.com: v5] Link: https://lkml.kernel.org/r/CH2PR01MB5894B0182EA0B28DF2EFB916F5C72@CH2PR01MB5894.prod.exchangelabs.com Link: https://lkml.kernel.org/r/MN2PR01MB59025CC02D1D29516527A693F5C62@MN2PR01MB5902.prod.exchangelabs.com Signed-off-by: Shubhang Kaushik Reviewed-by: Christoph Lameter (Ampere) Cc: Christoph Lameter Cc: Guo Ren Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Cc: Uladzislau Rezki (Sony) Cc: Xiongwei Song Signed-off-by: Andrew Morton commit 50625744220c101705a989d7c57a6c16e945f3b1 Author: David Hildenbrand Date: Fri Jun 7 11:09:38 2024 +0200 mm/memory_hotplug: skip adjust_managed_page_count() for PageOffline() pages when offlining We currently have a hack for virtio-mem in place to handle memory offlining with PageOffline pages for which we already adjusted the managed page count. Let's enlighten memory offlining code so we can get rid of that hack, and document the situation. Link: https://lkml.kernel.org/r/20240607090939.89524-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oscar Salvador Cc: Alexander Potapenko Cc: Dexuan Cui Cc: Dmitry Vyukov Cc: Eugenio Pérez Cc: Haiyang Zhang Cc: Jason Wang Cc: Juergen Gross Cc: "K. Y. Srinivasan" Cc: Marco Elver Cc: Michael S. Tsirkin Cc: Mike Rapoport (IBM) Cc: Oleksandr Tyshchenko Cc: Stefano Stabellini Cc: Wei Liu Cc: Xuan Zhuo Signed-off-by: Andrew Morton commit 503b158fc30f203a1854c87183ca3467c6466001 Author: David Hildenbrand Date: Fri Jun 7 11:09:37 2024 +0200 mm/memory_hotplug: initialize memmap of !ZONE_DEVICE with PageOffline() instead of PageReserved() We currently initialize the memmap such that PG_reserved is set and the refcount of the page is 1. In virtio-mem code, we have to manually clear that PG_reserved flag to make memory offlining with partially hotplugged memory blocks possible: has_unmovable_pages() would otherwise bail out on such pages. We want to avoid PG_reserved where possible and move to typed pages instead. Further, we want to further enlighten memory offlining code about PG_offline: offline pages in an online memory section. One example is handling managed page count adjustments in a cleaner way during memory offlining. So let's initialize the pages with PG_offline instead of PG_reserved. generic_online_page()->__free_pages_core() will now clear that flag before handing that memory to the buddy. Note that the page refcount is still 1 and would forbid offlining of such memory except when special care is take during GOING_OFFLINE as currently only implemented by virtio-mem. With this change, we can now get non-PageReserved() pages in the XEN balloon list. From what I can tell, that can already happen via decrease_reservation(), so that should be fine. HV-balloon should not really observe a change: partial online memory blocks still cannot get surprise-offlined, because the refcount of these PageOffline() pages is 1. Update virtio-mem, HV-balloon and XEN-balloon code to be aware that hotplugged pages are now PageOffline() instead of PageReserved() before they are handed over to the buddy. We'll leave the ZONE_DEVICE case alone for now. Note that self-hosted vmemmap pages will no longer be marked as reserved. This matches ordinary vmemmap pages allocated from the buddy during memory hotplug. Now, really only vmemmap pages allocated from memblock during early boot will be marked reserved. Existing PageReserved() checks seem to be handling all relevant cases correctly even after this change. Link: https://lkml.kernel.org/r/20240607090939.89524-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Oscar Salvador [generic memory-hotplug bits] Cc: Alexander Potapenko Cc: Dexuan Cui Cc: Dmitry Vyukov Cc: Eugenio Pérez Cc: Haiyang Zhang Cc: Jason Wang Cc: Juergen Gross Cc: "K. Y. Srinivasan" Cc: Marco Elver Cc: Michael S. Tsirkin Cc: Mike Rapoport (IBM) Cc: Oleksandr Tyshchenko Cc: Stefano Stabellini Cc: Wei Liu Cc: Xuan Zhuo Signed-off-by: Andrew Morton commit 13c526540b316937a16946e75d459e011be0ce2e Author: David Hildenbrand Date: Fri Jun 7 11:09:36 2024 +0200 mm: pass meminit_context to __free_pages_core() Patch series "mm/memory_hotplug: use PageOffline() instead of PageReserved() for !ZONE_DEVICE". This can be a considered a long-overdue follow-up to some parts of [1]. The patches are based on [2], but they are not strictly required -- just makes it clearer why we can use adjust_managed_page_count() for memory hotplug without going into details about highmem. We stop initializing pages with PageReserved() in memory hotplug code -- except when dealing with ZONE_DEVICE for now. Instead, we use PageOffline(): all pages are initialized to PageOffline() when onlining a memory section, and only the ones actually getting exposed to the system/page allocator will get PageOffline cleared. This way, we enlighten memory hotplug more about PageOffline() pages and can cleanup some hacks we have in virtio-mem code. What about ZONE_DEVICE? PageOffline() is wrong, but we might just stop using PageReserved() for them later by simply checking for is_zone_device_page() at suitable places. That will be a separate patch set / proposal. This primarily affects virtio-mem, HV-balloon and XEN balloon. I only briefly tested with virtio-mem, which benefits most from these cleanups. [1] https://lore.kernel.org/all/20191024120938.11237-1-david@redhat.com/ [2] https://lkml.kernel.org/r/20240607083711.62833-1-david@redhat.com This patch (of 3): In preparation for further changes, let's teach __free_pages_core() about the differences of memory hotplug handling. Move the memory hotplug specific handling from generic_online_page() to __free_pages_core(), use adjust_managed_page_count() on the memory hotplug path, and spell out why memory freed via memblock cannot currently use adjust_managed_page_count(). [david@redhat.com: add missed CONFIG_DEFERRED_STRUCT_PAGE_INIT] Link: https://lkml.kernel.org/r/b72e6efd-fb0a-459c-b1a0-88a98e5b19e2@redhat.com [david@redhat.com: fix up the memblock comment, per Oscar] Link: https://lkml.kernel.org/r/2ed64218-7f3b-4302-a5dc-27f060654fe2@redhat.com [david@redhat.com: add the parameter name also in the declaration] Link: https://lkml.kernel.org/r/ca575956-f0dd-4fb9-a307-6b7621681ed9@redhat.com Link: https://lkml.kernel.org/r/20240607090939.89524-1-david@redhat.com Link: https://lkml.kernel.org/r/20240607090939.89524-2-david@redhat.com Signed-off-by: David Hildenbrand Cc: Alexander Potapenko Cc: Dexuan Cui Cc: Dmitry Vyukov Cc: Eugenio Pérez Cc: Haiyang Zhang Cc: Jason Wang Cc: Juergen Gross Cc: "K. Y. Srinivasan" Cc: Marco Elver Cc: Michael S. Tsirkin Cc: Mike Rapoport (IBM) Cc: Oleksandr Tyshchenko Cc: Oscar Salvador Cc: Stefano Stabellini Cc: Wei Liu Cc: Xuan Zhuo Signed-off-by: Andrew Morton commit a929e0d10f3db1a53668f6b9845db27d7fb63759 Author: Kefeng Wang Date: Tue Jun 4 19:48:22 2024 +0800 mm: remove page_mkclean() There are no more users of page_mkclean(), remove it and update the document and comment. Link: https://lkml.kernel.org/r/20240604114822.2089819-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand Cc: Daniel Vetter Cc: Helge Deller Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 645b1399fa67baff565fa82c48976c53822a393f Author: Kefeng Wang Date: Tue Jun 4 19:48:21 2024 +0800 fb_defio: use a folio in fb_deferred_io_work() Replaces three calls to compound_head() with one, which removes last caller of page_mkclean(). Link: https://lkml.kernel.org/r/20240604114822.2089819-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand Cc: Daniel Vetter Cc: Helge Deller Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2669324b81e5f67d409d3ad988da77c7c2a09045 Author: Kefeng Wang Date: Tue Jun 4 19:48:20 2024 +0800 mm: remove page_maybe_dma_pinned() After the last user of page_maybe_dma_pinned() is converted to folio_maybe_dma_pinned(), remove page_maybe_dma_pinned() and update the document and comment. [wangkefeng.wang@huawei.com: fix pin_user_pages.rst underlining] Link: https://lkml.kernel.org/r/61b256c7-4989-44ec-83db-f34a1bd4be2d@huawei.com Link: https://lkml.kernel.org/r/20240604114822.2089819-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand Cc: Daniel Vetter Cc: Helge Deller Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit aca08acce76f1f7de12dd22a2ab36411ce02074a Author: Kefeng Wang Date: Tue Jun 4 19:48:19 2024 +0800 fs/proc/task_mmu: use folio API in pte_is_pinned() Patch series "mm: remove page_maybe_dma_pinned() and page_mkclean()". Most page_maybe_dma_pinned() and page_mkclean() callers have been converted to the folio equivalents, after two more convertsions, remove them and update the comment and documention. This patch (of 4): Convert to use vm_normal_folio() and folio_maybe_dma_pinned() API, which helps to remove page_maybe_dma_pinned() in the subsequent change. Link: https://lkml.kernel.org/r/20240604114822.2089819-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20240604114822.2089819-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand Cc: Daniel Vetter Cc: Helge Deller Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 11d5401b011e3557894d824dac210f0b18cc3911 Author: David Hildenbrand Date: Wed May 29 13:19:04 2024 +0200 mm/mm_init: initialize page->_mapcount directly in __init_single_page() Let's simply reinitialize the page->_mapcount directly. We can now get rid of page_mapcount_reset(). Link: https://lkml.kernel.org/r/20240529111904.2069608-7-david@redhat.com Signed-off-by: David Hildenbrand Tested-by: Sergey Senozhatsky [zram/zsmalloc workloads] Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Minchan Kim Signed-off-by: Andrew Morton commit 9bf46441ad86da901c902bf78df2d213cc601185 Author: David Hildenbrand Date: Wed May 29 13:19:03 2024 +0200 mm/filemap: reinitialize folio->_mapcount directly Let's get rid of the page_mapcount_reset() call and simply reinitialize folio->_mapcount directly. Link: https://lkml.kernel.org/r/20240529111904.2069608-6-david@redhat.com Signed-off-by: David Hildenbrand Tested-by: Sergey Senozhatsky [zram/zsmalloc workloads] Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Minchan Kim Signed-off-by: Andrew Morton commit e4d970acfb1e7d1e83ce3101dc3c01eae44938e1 Author: David Hildenbrand Date: Wed May 29 13:19:02 2024 +0200 mm/page_alloc: clear PageBuddy using __ClearPageBuddy() for bad pages Let's stop using page_mapcount_reset() and clear PageBuddy using __ClearPageBuddy() instead. Link: https://lkml.kernel.org/r/20240529111904.2069608-5-david@redhat.com Signed-off-by: David Hildenbrand Tested-by: Sergey Senozhatsky [zram/zsmalloc workloads] Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Minchan Kim Signed-off-by: Andrew Morton commit 43d746dc49bb4c82034fce01a92fe67344d664cf Author: David Hildenbrand Date: Wed May 29 13:19:01 2024 +0200 mm/zsmalloc: use a proper page type Let's clean it up: use a proper page type and store our data (offset into a page) in the lower 16 bit as documented. We won't be able to support 256 KiB base pages, which is acceptable. Teach Kconfig to handle that cleanly using a new CONFIG_HAVE_ZSMALLOC. Based on this, we should do a proper "struct zsdesc" conversion, as proposed in [1]. This removes the last _mapcount/page_type offender. [1] https://lore.kernel.org/all/20231130101242.2590384-1-42.hyeyoo@gmail.com/ Link: https://lkml.kernel.org/r/20240529111904.2069608-4-david@redhat.com Signed-off-by: David Hildenbrand Tested-by: Sergey Senozhatsky [zram/zsmalloc workloads] Reviewed-by: Sergey Senozhatsky Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Minchan Kim Signed-off-by: Andrew Morton commit 8db00ad5646171880239b7f10e333278f63d8fcf Author: David Hildenbrand Date: Wed May 29 13:19:00 2024 +0200 mm: allow reuse of the lower 16 bit of the page type with an actual type As long as the owner sets a page type first, we can allow reuse of the lower 16 bit: sufficient to store an offset into a 64 KiB page, which is the maximum base page size in *common* configurations (ignoring the 256 KiB variant). Restrict it to the head page. We'll use that for zsmalloc next, to set a proper type while still reusing that field to store information (offset into a base page) that cannot go elsewhere for now. Let's reserve the lower 16 bit for that purpose and for catching mapcount underflows, and let's reduce PAGE_TYPE_BASE to a single bit. Note that we will still have to overflow the mapcount quite a lot until we would actually indicate a valid page type. Start handing out the type bits from highest to lowest, to make it clearer how many bits for types we have left. Out of 15 bit we can use for types, we currently use 6. If we run out of bits before we have better typing (e.g., memdesc), we can always investigate storing a value instead [1]. [1] https://lore.kernel.org/all/00ba1dff-7c05-46e8-b0d9-a78ac1cfc198@redhat.com/ [akpm@linux-foundation.org: fix PG_hugetlb typo, per David] Link: https://lkml.kernel.org/r/20240529111904.2069608-3-david@redhat.com Signed-off-by: David Hildenbrand Tested-by: Sergey Senozhatsky [zram/zsmalloc workloads] Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Minchan Kim Signed-off-by: Andrew Morton commit 6d21dde7adc0a2deb9e0c6b06f42be3f88ca180d Author: David Hildenbrand Date: Wed May 29 13:18:59 2024 +0200 mm: update _mapcount and page_type documentation Patch series "mm: page_type, zsmalloc and page_mapcount_reset()", v2. Wanting to remove the remaining abuser of _mapcount/page_type along with page_mapcount_reset(), I stumbled over zsmalloc, which is yet to be converted away from "struct page" [1]. Unfortunately, we cannot stop using the page_type field in zsmalloc code completely for its own purposes. All other fields in "struct page" are used one way or the other. Could we simply store a 2-byte offset value at the beginning of each page? Likely, but that will require a bit more work; and once we have memdesc we might want to move the offset in there (struct zsalloc?) again. ... but we can limit the abuse to 16 bit, glue it to a page type that must be set, and document it. page_has_type() will always successfully indicate such zsmalloc pages, and such zsmalloc pages only. We lose zsmalloc support for PAGE_SIZE > 64KB, which should be tolerable. We could use more bits from the page type, but 16 bit sounds like a good idea for now. So clarify the _mapcount/page_type documentation, use a proper page_type for zsmalloc, and remove page_mapcount_reset(). [1] https://lore.kernel.org/all/20231130101242.2590384-1-42.hyeyoo@gmail.com/ This patch (of 6): Let's make it clearer that _mapcount must no longer be used for own purposes, and how _mapcount and page_type behaves nowadays (also in the context of hugetlb folios, which are typed folios that will be mapped to user space). Move the documentation regarding "-1" over from page_mapcount_reset(), which we will remove next. Move "page_type" before "mapcount", to make it clearer what typed folios are. Link: https://lkml.kernel.org/r/20240529111904.2069608-1-david@redhat.com Link: https://lkml.kernel.org/r/20240529111904.2069608-2-david@redhat.com Signed-off-by: David Hildenbrand Tested-by: Sergey Senozhatsky [zram/zsmalloc workloads] Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Minchan Kim Signed-off-by: Andrew Morton commit a5c6bc590094a1a73cf6fa3f505e1945d2bf2461 Author: John Hubbard Date: Mon Jun 17 19:24:22 2024 -0700 selftests/mm: remove local __NR_* definitions This continues the work on getting the selftests to build without requiring people to first run "make headers" [1]. Now that the system call numbers are in the correct, checked-in locations in the kernel tree (./tools/include/uapi/asm/unistd*.h), make sure that the mm selftests include that file (indirectly). Doing so provides guaranteed definitions at build time, so remove all of the checks for "ifdef __NR_xxx" in the mm selftests, because they will always be true (defined). [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Link: https://lkml.kernel.org/r/20240618022422.804305-7-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: 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 Signed-off-by: Andrew Morton commit d40f74ab9d6158979a20957ead0e0dec7040ec37 Author: Andrew Morton Date: Tue Jun 25 14:51:36 2024 -0700 mm/huge_memory.c: fix used-uninitialized Fix used-uninitialized of `page'. Fixes: dce7d10be4bb ("mm/madvise: optimize lazyfreeing with mTHP in madvise_free") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406260514.SLhNM9kQ-lkp@intel.com Cc: Lance Yang Signed-off-by: Andrew Morton commit f41e355f8b48d894324a3fdc9727e08b1bce78e2 Author: Ryusuke Konishi Date: Sun Jun 23 14:11:35 2024 +0900 nilfs2: fix incorrect inode allocation from reserved inodes If the bitmap block that manages the inode allocation status is corrupted, nilfs_ifile_create_inode() may allocate a new inode from the reserved inode area where it should not be allocated. Previous fix commit d325dc6eb763 ("nilfs2: fix use-after-free bug of struct nilfs_root"), fixed the problem that reserved inodes with inode numbers less than NILFS_USER_INO (=11) were incorrectly reallocated due to bitmap corruption, but since the start number of non-reserved inodes is read from the super block and may change, in which case inode allocation may occur from the extended reserved inode area. If that happens, access to that inode will cause an IO error, causing the file system to degrade to an error state. Fix this potential issue by adding a wraparound option to the common metadata object allocation routine and by modifying nilfs_ifile_create_inode() to disable the option so that it only allocates inodes with inode numbers greater than or equal to the inode number read in "nilfs->ns_first_ino", regardless of the bitmap status of reserved inodes. Link: https://lkml.kernel.org/r/20240623051135.4180-4-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: Hillf Danton Cc: Jan Kara Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 49ae997f8f0d5e268bbd271c5fd66166ce8287fe Author: Ryusuke Konishi Date: Sun Jun 23 14:11:34 2024 +0900 nilfs2: add missing check for inode numbers on directory entries Syzbot reported that mounting and unmounting a specific pattern of corrupted nilfs2 filesystem images causes a use-after-free of metadata file inodes, which triggers a kernel bug in lru_add_fn(). As Jan Kara pointed out, this is because the link count of a metadata file gets corrupted to 0, and nilfs_evict_inode(), which is called from iput(), tries to delete that inode (ifile inode in this case). The inconsistency occurs because directories containing the inode numbers of these metadata files that should not be visible in the namespace are read without checking. Fix this issue by treating the inode numbers of these internal files as errors in the sanity check helper when reading directory folios/pages. Also thanks to Hillf Danton and Matthew Wilcox for their initial mm-layer analysis. Link: https://lkml.kernel.org/r/20240623051135.4180-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+d79afb004be235636ee8@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d79afb004be235636ee8 Reported-by: Jan Kara Closes: https://lkml.kernel.org/r/20240617075758.wewhukbrjod5fp5o@quack3 Tested-by: Ryusuke Konishi Cc: Hillf Danton Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 1ab8425091dba7ce8bf59e09e183aaca6c2a12ac Author: Ryusuke Konishi Date: Sun Jun 23 14:11:33 2024 +0900 nilfs2: fix inode number range checks Patch series "nilfs2: fix potential issues related to reserved inodes". This series fixes one use-after-free issue reported by syzbot, caused by nilfs2's internal inode being exposed in the namespace on a corrupted filesystem, and a couple of flaws that cause problems if the starting number of non-reserved inodes written in the on-disk super block is intentionally (or corruptly) changed from its default value. This patch (of 3): In the current implementation of nilfs2, "nilfs->ns_first_ino", which gives the first non-reserved inode number, is read from the superblock, but its lower limit is not checked. As a result, if a number that overlaps with the inode number range of reserved inodes such as the root directory or metadata files is set in the super block parameter, the inode number test macros (NILFS_MDT_INODE and NILFS_VALID_INODE) will not function properly. In addition, these test macros use left bit-shift calculations using with the inode number as the shift count via the BIT macro, but the result of a shift calculation that exceeds the bit width of an integer is undefined in the C specification, so if "ns_first_ino" is set to a large value other than the default value NILFS_USER_INO (=11), the macros may potentially malfunction depending on the environment. Fix these issues by checking the lower bound of "nilfs->ns_first_ino" and by preventing bit shifts equal to or greater than the NILFS_USER_INO constant in the inode number test macros. Also, change the type of "ns_first_ino" from signed integer to unsigned integer to avoid the need for type casting in comparisons such as the lower bound check introduced this time. Link: https://lkml.kernel.org/r/20240623051135.4180-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20240623051135.4180-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Cc: Hillf Danton Cc: Jan Kara Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 68ed2a394a0190433ba982b353579075a29099bd Author: Jan Kara Date: Fri Jun 21 16:42:38 2024 +0200 mm: avoid overflows in dirty throttling logic The dirty throttling logic is interspersed with assumptions that dirty limits in PAGE_SIZE units fit into 32-bit (so that various multiplications fit into 64-bits). If limits end up being larger, we will hit overflows, possible divisions by 0 etc. Fix these problems by never allowing so large dirty limits as they have dubious practical value anyway. For dirty_bytes / dirty_background_bytes interfaces we can just refuse to set so large limits. For dirty_ratio / dirty_background_ratio it isn't so simple as the dirty limit is computed from the amount of available memory which can change due to memory hotplug etc. So when converting dirty limits from ratios to numbers of pages, we just don't allow the result to exceed UINT_MAX. This is root-only triggerable problem which occurs when the operator sets dirty limits to >16 TB. Link: https://lkml.kernel.org/r/20240621144246.11148-2-jack@suse.cz Signed-off-by: Jan Kara Reported-by: Zach O'Keefe Reviewed-By: Zach O'Keefe Cc: Signed-off-by: Andrew Morton commit 8dfcffa37094fef2c8cf8b602316766a86956d07 Author: Jan Kara Date: Fri Jun 21 16:42:37 2024 +0200 Revert "mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again" Patch series "mm: Avoid possible overflows in dirty throttling". Dirty throttling logic assumes dirty limits in page units fit into 32-bits. This patch series makes sure this is true (see patch 2/2 for more details). This patch (of 2): This reverts commit 9319b647902cbd5cc884ac08a8a6d54ce111fc78. The commit is broken in several ways. Firstly, the removed (u64) cast from the multiplication will introduce a multiplication overflow on 32-bit archs if wb_thresh * bg_thresh >= 1<<32 (which is actually common - the default settings with 4GB of RAM will trigger this). Secondly, the div64_u64() is unnecessarily expensive on 32-bit archs. We have div64_ul() in case we want to be safe & cheap. Thirdly, if dirty thresholds are larger than 1<<32 pages, then dirty balancing is going to blow up in many other spectacular ways anyway so trying to fix one possible overflow is just moot. Link: https://lkml.kernel.org/r/20240621144017.30993-1-jack@suse.cz Link: https://lkml.kernel.org/r/20240621144246.11148-1-jack@suse.cz Fixes: 9319b647902c ("mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again") Signed-off-by: Jan Kara Reviewed-By: Zach O'Keefe Cc: Signed-off-by: Andrew Morton commit 76ba6acfcce871db13ad51c6dc8f56fec2e92853 Author: Jinliang Zheng Date: Thu Jun 20 20:21:24 2024 +0800 mm: optimize the redundant loop of mm_update_owner_next() When mm_update_owner_next() is racing with swapoff (try_to_unuse()) or /proc or ptrace or page migration (get_task_mm()), it is impossible to find an appropriate task_struct in the loop whose mm_struct is the same as the target mm_struct. If the above race condition is combined with the stress-ng-zombie and stress-ng-dup tests, such a long loop can easily cause a Hard Lockup in write_lock_irq() for tasklist_lock. Recognize this situation in advance and exit early. Link: https://lkml.kernel.org/r/20240620122123.3877432-1-alexjlzheng@tencent.com Signed-off-by: Jinliang Zheng Acked-by: Michal Hocko Cc: Christian Brauner Cc: Jens Axboe Cc: Mateusz Guzik Cc: Matthew Wilcox (Oracle) Cc: Oleg Nesterov Cc: Tycho Andersen Cc: Signed-off-by: Andrew Morton commit 9b94b5a2f9a95d693cfa8db6e34dcb3f1cd91204 Author: Hongfu Li Date: Tue Jun 18 09:45:17 2024 +0800 khugepaged: simplify the allocation of slab caches Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Link: https://lkml.kernel.org/r/20240618014517.25954-1-lihongfu@kylinos.cn Signed-off-by: Hongfu Li Acked-by: David Hildenbrand Signed-off-by: Andrew Morton commit aa1b94891cbf48296b4571bf4625c0a13bd5e3f5 Author: Kefeng Wang Date: Tue Jun 18 16:12:01 2024 +0800 mm: ksm: drop KSM_KMEM_CACHE() After commit 21fbd59136e0 ("ksm: add the ksm prefix to the names of the ksm private structures"), we could directly use KMEM_CACHE(). Link: https://lkml.kernel.org/r/20240618081201.134985-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: David Hildenbrand Signed-off-by: Andrew Morton commit d4fbcf0b566a38c9deb00e9b9f82afb3a596abde Author: SeongJae Park Date: Tue Jun 18 11:18:09 2024 -0700 mm/damon/lru_sort: remove unnecessary online tuning handling code DAMON_LRU_SORT contains code for handling of online DAMON parameters update edge cases. It is no more necessary since damon_commit_ctx() takes care of the cases. Remove the unnecessary code. Link: https://lkml.kernel.org/r/20240618181809.82078-13-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit a3096943642828b16e58e02b435710c565061d53 Author: SeongJae Park Date: Tue Jun 18 11:18:08 2024 -0700 mm/damon/lru_sort: use damon_commit_ctx() DAMON_LRU_SORT manually manipulates the DAMON context struct for online parameters update. Since the struct contains not only input parameters but also internal status and operation results, it is not that simple. Indeed, we found and fixed a few bugs in the code. Now DAMON core layer provides a function for the usage, namely damon_commit_ctx(). Replace the manual manipulation logic with the function. The core layer function could have its own bugs, but this change removes a source of bugs. Link: https://lkml.kernel.org/r/20240618181809.82078-12-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit b94322b10bd42ce18d492952dea7b8899d5c17e3 Author: SeongJae Park Date: Tue Jun 18 11:18:07 2024 -0700 mm/damon/reclaim: remove unnecessary code for online tuning DAMON_RECLAIM contains code for handling of online DAMON parameters update edge cases. It is no more necessary since damon_commit_ctx() takes care of the cases. Remove the unnecessary code. Link: https://lkml.kernel.org/r/20240618181809.82078-11-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 11ddcfc257a3e8d7b13b42148ee7e783f4876da4 Author: SeongJae Park Date: Tue Jun 18 11:18:06 2024 -0700 mm/damon/reclaim: use damon_commit_ctx() DAMON_RECLAIM manually manipulates the DAMON context struct for online parameters update. Since the struct contains not only input parameters but also internal status and operation results, it is not that simple. Indeed, we found and fixed a few bugs in the code. Now DAMON core layer provides a function for the usage, namely damon_commit_ctx(). Replace the manual manipulation logic with the function. The core layer function could have its own bugs, but this change removes a source of bugs. Link: https://lkml.kernel.org/r/20240618181809.82078-10-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit a83364a2164acf01fae9e5388648502388b4a12e Author: SeongJae Park Date: Tue Jun 18 11:18:05 2024 -0700 mm/damon/sysfs-schemes: rename *_set_{schemes,scheme_filters,quota_score,schemes}() The functions were for updating DAMON structs that may or may not be partially populated. Hence it was not for only adding items, but also removing unnecessary items and updating items in-place. A previous commit has changed the functions to assume the structs are not partially populated, and do only adding items. Make the names better explain the behavior. Link: https://lkml.kernel.org/r/20240618181809.82078-9-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 0fddd6047692b1eb9e9655e2faeb8c3035c214c6 Author: SeongJae Park Date: Tue Jun 18 11:18:04 2024 -0700 mm/damon/sysfs-schemes: remove unnecessary online tuning handling code damon/sysfs-schemes.c contains code for handling of online DAMON parameters update edge cases. The logics are no more necessary since damon_commit_ctx() and damon_commit_quota_goals() takes care of the cases. Remove the unnecessary code. Link: https://lkml.kernel.org/r/20240618181809.82078-8-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 2caef83db9f8e082cbdd5afaf00894adaaa8ab17 Author: SeongJae Park Date: Tue Jun 18 11:18:03 2024 -0700 mm/damon/sysfs: rename damon_sysfs_set_targets() to ...add_targets() The function was for updating DAMON structs that may or may not be partially populated. Hence it was not for only adding items, but also removing unnecessary items and updating items in-place. A previous commit has changed the function to assume the structs are not partially populated, and do only adding items. Make the function name better explain the behavior. Link: https://lkml.kernel.org/r/20240618181809.82078-7-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit d96727a251fd2b9330c5cfc8246ce208cb4e99f6 Author: SeongJae Park Date: Tue Jun 18 11:18:02 2024 -0700 mm/damon/sysfs: remove unnecessary online tuning handling code damon/sysfs.c contains code for handling of online DAMON parameters update edge cases. It is no more necessary since damon_commit_ctx() takes care of the cases. Remove the unnecessary code. Link: https://lkml.kernel.org/r/20240618181809.82078-6-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 77ed1eb64256cd8c42e42eba5161104e9cd7fa78 Author: SeongJae Park Date: Tue Jun 18 11:18:01 2024 -0700 mm/damon/sysfs-schemes: use damos_commit_quota_goals() DAMON_SYSFS manually manipulates the DAMOS quota structs for online quotal goals parameter update. Since the struct contains not only input parameters but also internal status and operation results, it is not that simple. Now DAMON core layer provides a function for the usage, namely damon_commit_quota_goals(). Replace the manual manipulation logic with the function. The core layer function could have its own bugs, but this change removes a source of bugs. Link: https://lkml.kernel.org/r/20240618181809.82078-5-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 83dc7bbaecae6e69e338355e9a137f0e7a0ecc40 Author: SeongJae Park Date: Tue Jun 18 11:18:00 2024 -0700 mm/damon/sysfs: use damon_commit_ctx() DAMON_SYSFS manually manipulates DAMON context structs for online parameters update. Since the struct contains not only input parameters but also internal status and operation results, it is not that simple. Indeed, we found and fixed a few bugs in the code. Now DAMON core layer provides a function for the usage, namely damon_commit_ctx(). Replace the manual manipulation logic with the function. The core layer function could have its own bugs, but this change removes a source of bugs. Link: https://lkml.kernel.org/r/20240618181809.82078-4-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a Author: SeongJae Park Date: Tue Jun 18 11:17:59 2024 -0700 mm/damon/core: implement DAMON context commit function Implement functions for supporting online DAMON context level parameters update. The function receives two DAMON context structs. One is the struct that currently being used by a kdamond and therefore to be updated. The other one contains the parameters to be applied to the first one. The function applies the new parameters to the destination struct while keeping/updating the internal status and operation results. The function should be called from DAMON context-update-safe place, like DAMON callbacks. Link: https://lkml.kernel.org/r/20240618181809.82078-3-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 3ad1dce6c30175dfd3da29d76853a69affbf7489 Author: SeongJae Park Date: Tue Jun 18 11:17:58 2024 -0700 mm/damon/core: implement DAMOS quota goals online commit function Patch series "mm/damon: introduce DAMON parameters online commit function". DAMON context struct (damon_ctx) contains user requests (parameters), internal status, and operation results. For flexible usages, DAMON API users are encouraged to manually manipulate the struct. That works well for simple use cases. However, it has turned out that it is not that simple at least for online parameters udpate. It is easy to forget properly maintaining internal status and operation results. Also, such manual manipulation for online tuning is implemented multiple times on DAMON API users including DAMON sysfs interface, DAMON_RECLAIM and DAMON_LRU_SORT. As a result, we have multiple sources of bugs for same problem. Actually we found and fixed a few bugs from online parameter updating of DAMON API users. Implement a function for online DAMON parameters update in core layer, and replace DAMON API users' manual manipulation code for the use case. The core layer function could still have bugs, but this change reduces the source of bugs for the problem to one place. This patch (of 12): Implement functions for supporting online DAMOS quota goals parameters update. The function receives two DAMOS quota structs. One is the struct that currently being used by a kdamond and therefore to be updated. The other one contains the parameters to be applied to the first one. The function applies the new parameters to the destination struct while keeping/updating the internal status. The function should be called from parameters-update safe place, like DAMON callbacks. Link: https://lkml.kernel.org/r/20240618181809.82078-1-sj@kernel.org Link: https://lkml.kernel.org/r/20240618181809.82078-2-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit a6ab9c82d371e0ffae02ae6ea375dfd27db6297f Author: Baolin Wang Date: Fri Jun 14 09:07:42 2024 +0800 mm: memcontrol: add VM_BUG_ON_FOLIO() to catch lru folio in mem_cgroup_migrate() mem_cgroup_migrate() will clear the memcg data of the old folio, therefore, the callers must make sure the old folio is no longer on the LRU list, otherwise the old folio can not get the correct lruvec object without the memcg data, which could lead to potential problems [1]. Thus adding a VM_BUG_ON_FOLIO() to catch this issue. [1] https://lore.kernel.org/all/5ab860d8ee987955e917748f9d6da525d3b52690.1718326003.git.baolin.wang@linux.alibaba.com/ Link: https://lkml.kernel.org/r/66d181c41b7ced35dbd39ffd3f5774a11aef266a.1718327124.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Suggested-by: Shakeel Butt Acked-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 83d0d46a80340baa9bf7e6039f3ad5d097c1af77 Author: Honggyu Kim Date: Fri Jun 14 12:00:09 2024 +0900 Docs/damon: document damos_migrate_{hot,cold} This patch adds damon description for "migrate_hot" and "migrate_cold" actions for both usage and design documents as long as a new "target_nid" knob to set the migration target node. [sj@kernel.org: trivial fixups for DAMOS_MIGRATE_{HOT,COLD} documentation] Link: https://lkml.kernel.org/r/20240618213630.84846-2-sj@kernel.org Link: https://lkml.kernel.org/r/20240614030010.751-8-honggyu.kim@sk.com Signed-off-by: Honggyu Kim Signed-off-by: SeongJae Park Reviewed-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Hyeongtak Ji Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit b696722d784fb3610183281d2fd514b0efe97e3b Author: Hyeongtak Ji Date: Fri Jun 14 12:00:08 2024 +0900 mm/damon/paddr: introduce DAMOS_MIGRATE_HOT action for promotion This patch introduces DAMOS_MIGRATE_HOT action, which is similar to DAMOS_MIGRATE_COLD, but proritizes hot pages. It migrates pages inside the given region to the 'target_nid' NUMA node in the sysfs. Here is one of the example usage of this 'migrate_hot' action. $ cd /sys/kernel/mm/damon/admin/kdamonds/ $ cat contexts//schemes//action migrate_hot $ echo 0 > contexts//schemes//target_nid $ echo commit > state $ numactl -p 2 ./hot_cold 500M 600M & $ numastat -c -p hot_cold Per-node process memory usage (in MBs) PID Node 0 Node 1 Node 2 Total -------------- ------ ------ ------ ----- 701 (hot_cold) 501 0 601 1101 Link: https://lkml.kernel.org/r/20240614030010.751-7-honggyu.kim@sk.com Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim Signed-off-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit b51820ebea656be3b48bb16dcdc5ad3f203c4fd7 Author: Honggyu Kim Date: Fri Jun 14 12:00:07 2024 +0900 mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion This patch introduces DAMOS_MIGRATE_COLD action, which is similar to DAMOS_PAGEOUT, but migrate folios to the given 'target_nid' in the sysfs instead of swapping them out. The 'target_nid' sysfs knob informs the migration target node ID. Here is one of the example usage of this 'migrate_cold' action. $ cd /sys/kernel/mm/damon/admin/kdamonds/ $ cat contexts//schemes//action migrate_cold $ echo 2 > contexts//schemes//target_nid $ echo commit > state $ numactl -p 0 ./hot_cold 500M 600M & $ numastat -c -p hot_cold Per-node process memory usage (in MBs) PID Node 0 Node 1 Node 2 Total -------------- ------ ------ ------ ----- 701 (hot_cold) 501 0 601 1101 Since there are some common routines with pageout, many functions have similar logics between pageout and migrate cold. damon_pa_migrate_folio_list() is a minimized version of shrink_folio_list(). Link: https://lkml.kernel.org/r/20240614030010.751-6-honggyu.kim@sk.com Signed-off-by: Honggyu Kim Signed-off-by: Hyeongtak Ji Signed-off-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit ced816a76b8fd1288d48523cc48ed308964d12ed Author: Honggyu Kim Date: Fri Jun 14 12:00:06 2024 +0900 mm/migrate: add MR_DAMON to migrate_reason The current patch series introduces DAMON based migration across NUMA nodes so it'd be better to have a new migrate_reason in trace events. Link: https://lkml.kernel.org/r/20240614030010.751-5-honggyu.kim@sk.com Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Hyeongtak Ji Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit e36287c6e12d00f2087dc0c4899d8a9c54e22e1c Author: Hyeongtak Ji Date: Fri Jun 14 12:00:05 2024 +0900 mm/damon/sysfs-schemes: add target_nid on sysfs-schemes This patch adds target_nid under /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes// The 'target_nid' can be used as the destination node for DAMOS actions such as DAMOS_MIGRATE_{HOT,COLD} in the follow up patches. [sj@kernel.org: document target_nid file] Link: https://lkml.kernel.org/r/20240618213630.84846-3-sj@kernel.org Link: https://lkml.kernel.org/r/20240614030010.751-4-honggyu.kim@sk.com Signed-off-by: Hyeongtak Ji Signed-off-by: Honggyu Kim Signed-off-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit 8f75267d22bdf8e3baf70f2fa7092d8c2f58da71 Author: Honggyu Kim Date: Fri Jun 14 12:00:04 2024 +0900 mm: rename alloc_demote_folio to alloc_migrate_folio The alloc_demote_folio can also be used for general migration including both demotion and promotion so it'd be better to rename it from alloc_demote_folio to alloc_migrate_folio. Link: https://lkml.kernel.org/r/20240614030010.751-3-honggyu.kim@sk.com Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Hyeongtak Ji Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit a00ce85af2a1be494d3b0c9457e8e81cdcce2a89 Author: Honggyu Kim Date: Fri Jun 14 12:00:03 2024 +0900 mm: make alloc_demote_folio externally invokable for migration Patch series "DAMON based tiered memory management for CXL memory", v6. Introduction ============ With the advent of CXL/PCIe attached DRAM, which will be called simply as CXL memory in this cover letter, some systems are becoming more heterogeneous having memory systems with different latency and bandwidth characteristics. They are usually handled as different NUMA nodes in separate memory tiers and CXL memory is used as slow tiers because of its protocol overhead compared to local DRAM. In this kind of systems, we need to be careful placing memory pages on proper NUMA nodes based on the memory access frequency. Otherwise, some frequently accessed pages might reside on slow tiers and it makes performance degradation unexpectedly. Moreover, the memory access patterns can be changed at runtime. To handle this problem, we need a way to monitor the memory access patterns and migrate pages based on their access temperature. The DAMON(Data Access MONitor) framework and its DAMOS(DAMON-based Operation Schemes) can be useful features for monitoring and migrating pages. DAMOS provides multiple actions based on DAMON monitoring results and it can be used for proactive reclaim, which means swapping cold pages out with DAMOS_PAGEOUT action, but it doesn't support migration actions such as demotion and promotion between tiered memory nodes. This series supports two new DAMOS actions; DAMOS_MIGRATE_HOT for promotion from slow tiers and DAMOS_MIGRATE_COLD for demotion from fast tiers. This prevents hot pages from being stuck on slow tiers, which makes performance degradation and cold pages can be proactively demoted to slow tiers so that the system can increase the chance to allocate more hot pages to fast tiers. The DAMON provides various tuning knobs but we found that the proactive demotion for cold pages is especially useful when the system is running out of memory on its fast tier nodes. Our evaluation result shows that it reduces the performance slowdown compared to the default memory policy from 11% to 3~5% when the system runs under high memory pressure on its fast tier DRAM nodes. DAMON configuration =================== The specific DAMON configuration doesn't have to be in the scope of this patch series, but some rough idea is better to be shared to explain the evaluation result. The DAMON provides many knobs for fine tuning but its configuration file is generated by HMSDK[3]. It includes gen_config.py script that generates a json file with the full config of DAMON knobs and it creates multiple kdamonds for each NUMA node when the DAMON is enabled so that it can run hot/cold based migration for tiered memory. Evaluation Workload =================== The performance evaluation is done with redis[4], which is a widely used in-memory database and the memory access patterns are generated via YCSB[5]. We have measured two different workloads with zipfian and latest distributions but their configs are slightly modified to make memory usage higher and execution time longer for better evaluation. The idea of evaluation using these migrate_{hot,cold} actions covers system-wide memory management rather than partitioning hot/cold pages of a single workload. The default memory allocation policy creates pages to the fast tier DRAM node first, then allocates newly created pages to the slow tier CXL node when the DRAM node has insufficient free space. Once the page allocation is done then those pages never move between NUMA nodes. It's not true when using numa balancing, but it is not the scope of this DAMON based tiered memory management support. If the working set of redis can be fit fully into the DRAM node, then the redis will access the fast DRAM only. Since the performance of DRAM only is faster than partially accessing CXL memory in slow tiers, this environment is not useful to evaluate this patch series. To make pages of redis be distributed across fast DRAM node and slow CXL node to evaluate our migrate_{hot,cold} actions, we pre-allocate some cold memory externally using mmap and memset before launching redis-server. We assumed that there are enough amount of cold memory in datacenters as TMO[6] and TPP[7] papers mentioned. The evaluation sequence is as follows. 1. Turn on DAMON with DAMOS_MIGRATE_COLD action for DRAM node and DAMOS_MIGRATE_HOT action for CXL node. It demotes cold pages on DRAM node and promotes hot pages on CXL node in a regular interval. 2. Allocate a huge block of cold memory by calling mmap and memset at the fast tier DRAM node, then make the process sleep to make the fast tier has insufficient space for redis-server. 3. Launch redis-server and load prebaked snapshot image, dump.rdb. The redis-server consumes 52GB of anon pages and 33GB of file pages, but due to the cold memory allocated at 2, it fails allocating the entire memory of redis-server on the fast tier DRAM node so it partially allocates the remaining on the slow tier CXL node. The ratio of DRAM:CXL depends on the size of the pre-allocated cold memory. 4. Run YCSB to make zipfian or latest distribution of memory accesses to redis-server, then measure its execution time when it's completed. 5. Repeat 4 over 50 times to measure the average execution time for each run. 6. Increase the cold memory size then repeat goes to 2. For each test at 4 took about a minute so repeating it 50 times almost took about 1 hour for each test with a specific cold memory from 440GB to 500GB in 10GB increments for each evaluation. So it took about more than 10 hours for both zipfian and latest workloads to get the entire evaluation results. Repeating the same test set multiple times doesn't show much difference so I think it might be enough to make the result reliable. Evaluation Results ================== All the result values are normalized to DRAM-only execution time because the workload cannot be faster than DRAM-only unless the workload hits the peak bandwidth but our redis test doesn't go beyond the bandwidth limit. So the DRAM-only execution time is the ideal result without affected by the gap between DRAM and CXL performance difference. The NUMA node environment is as follows. node0 - local DRAM, 512GB with a CPU socket (fast tier) node1 - disabled node2 - CXL DRAM, 96GB, no CPU attached (slow tier) The following is the result of generating zipfian distribution to redis-server and the numbers are averaged by 50 times of execution. 1. YCSB zipfian distribution read only workload memory pressure with cold memory on node0 with 512GB of local DRAM. ====================+================================================+========= | cold memory occupied by mmap and memset | | 0G 440G 450G 460G 470G 480G 490G 500G | ====================+================================================+========= Execution time normalized to DRAM-only values | GEOMEAN --------------------+------------------------------------------------+--------- DRAM-only | 1.00 - - - - - - - | 1.00 CXL-only | 1.19 - - - - - - - | 1.19 default | - 1.00 1.05 1.08 1.12 1.14 1.18 1.18 | 1.11 DAMON tiered | - 1.03 1.03 1.03 1.03 1.03 1.07 *1.05 | 1.04 DAMON lazy | - 1.04 1.03 1.04 1.05 1.06 1.06 *1.06 | 1.05 ====================+================================================+========= CXL usage of redis-server in GB | AVERAGE --------------------+------------------------------------------------+--------- DRAM-only | 0.0 - - - - - - - | 0.0 CXL-only | 51.4 - - - - - - - | 51.4 default | - 0.6 10.6 20.5 30.5 40.5 47.6 50.4 | 28.7 DAMON tiered | - 0.6 0.5 0.4 0.7 0.8 7.1 5.6 | 2.2 DAMON lazy | - 0.5 3.0 4.5 5.4 6.4 9.4 9.1 | 5.5 ====================+================================================+========= Each test result is based on the execution environment as follows. DRAM-only: redis-server uses only local DRAM memory. CXL-only: redis-server uses only CXL memory. default: default memory policy(MPOL_DEFAULT). numa balancing disabled. DAMON tiered: DAMON enabled with DAMOS_MIGRATE_COLD for DRAM nodes and DAMOS_MIGRATE_HOT for CXL nodes. DAMON lazy: same as DAMON tiered, but turn on DAMON just before making memory access request via YCSB. The above result shows the "default" execution time goes up as the size of cold memory is increased from 440G to 500G because the more cold memory used, the more CXL memory is used for the target redis workload and this makes the execution time increase. However, "DAMON tiered" and other DAMON results show less slowdown because the DAMOS_MIGRATE_COLD action at DRAM node proactively demotes pre-allocated cold memory to CXL node and this free space at DRAM increases more chance to allocate hot or warm pages of redis-server to fast DRAM node. Moreover, DAMOS_MIGRATE_HOT action at CXL node also promotes hot pages of redis-server to DRAM node actively. As a result, it makes more memory of redis-server stay in DRAM node compared to "default" memory policy and this makes the performance improvement. Please note that the result numbers of "DAMON tiered" and "DAMON lazy" at 500G are marked with * stars, which means their test results are replaced with reproduced tests that didn't have OOM issue. That was needed because sometimes the test processes get OOM when DRAM has insufficient space. The DAMOS_MIGRATE_HOT doesn't kick reclaim but just gives up migration when there is not enough space at DRAM side. The problem happens when there is competition between normal allocation and migration and the migration is done before normal allocation, then the completely unrelated normal allocation can trigger reclaim, which incurs OOM. Because of this issue, I have also tested more cases with "demotion_enabled" flag enabled to make such reclaim doesn't trigger OOM, but just demote reclaimed pages. The following test results show more tests with "kswapd" marked. 2. YCSB zipfian distribution read only workload (with demotion_enabled true) memory pressure with cold memory on node0 with 512GB of local DRAM. ====================+================================================+========= | cold memory occupied by mmap and memset | | 0G 440G 450G 460G 470G 480G 490G 500G | ====================+================================================+========= Execution time normalized to DRAM-only values | GEOMEAN --------------------+------------------------------------------------+--------- DAMON tiered | - 1.03 1.03 1.03 1.03 1.03 1.07 1.05 | 1.04 DAMON lazy | - 1.04 1.03 1.04 1.05 1.06 1.06 1.06 | 1.05 DAMON tiered kswapd | - 1.03 1.03 1.03 1.03 1.02 1.02 1.03 | 1.03 DAMON lazy kswapd | - 1.04 1.04 1.04 1.03 1.05 1.04 1.05 | 1.04 ====================+================================================+========= CXL usage of redis-server in GB | AVERAGE --------------------+------------------------------------------------+--------- DAMON tiered | - 0.6 0.5 0.4 0.7 0.8 7.1 5.6 | 2.2 DAMON lazy | - 0.5 3.0 4.5 5.4 6.4 9.4 9.1 | 5.5 DAMON tiered kswapd | - 0.0 0.0 0.4 0.5 0.1 0.8 1.0 | 0.4 DAMON lazy kswapd | - 4.2 4.6 5.3 1.7 6.8 8.1 5.8 | 5.2 ====================+================================================+========= Each test result is based on the exeuction environment as follows. DAMON tiered: same as before DAMON lazy: same as before DAMON tiered kswapd: same as DAMON tiered, but turn on /sys/kernel/mm/numa/demotion_enabled to make kswapd or direct reclaim does demotion. DAMON lazy kswapd: same as DAMON lazy, but turn on /sys/kernel/mm/numa/demotion_enabled to make kswapd or direct reclaim does demotion. The "DAMON tiered kswapd" and "DAMON lazy kswapd" didn't trigger OOM at all unlike other tests because kswapd and direct reclaim from DRAM node can demote reclaimed pages to CXL node independently from DAMON actions and their results are slightly better than without having "demotion_enabled". In summary, the evaluation results show that DAMON memory management with DAMOS_MIGRATE_{HOT,COLD} actions reduces the performance slowdown compared to the "default" memory policy from 11% to 3~5% when the system runs with high memory pressure on its fast tier DRAM nodes. Having these DAMOS_MIGRATE_HOT and DAMOS_MIGRATE_COLD actions can make tiered memory systems run more efficiently under high memory pressures. This patch (of 7): The alloc_demote_folio can be used out of vmscan.c so it'd be better to remove static keyword from it. Link: https://lkml.kernel.org/r/20240614030010.751-1-honggyu.kim@sk.com Link: https://lkml.kernel.org/r/20240614030010.751-2-honggyu.kim@sk.com Signed-off-by: Honggyu Kim Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park Cc: Gregory Price Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Hyeongtak Ji Cc: Masami Hiramatsu (Google) Cc: Mathieu Desnoyers Cc: Rakie Kim Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit 972b89c1f05f49bac53ea977d20b49330b81b0fa Author: Wei Yang Date: Wed Jun 12 02:04:21 2024 +0000 mm/mm_init.c: simplify logic of deferred_[init|free]_pages Function deferred_[init|free]_pages are only used in deferred_init_maxorder(), which makes sure the range to init/free is within MAX_ORDER_NR_PAGES size. With this knowledge, we can simplify these two functions. Since * only the first pfn could be IS_MAX_ORDER_ALIGNED() Also since the range passed to deferred_[init|free]_pages is always from memblock.memory for those we have already allocated memmap to cover, pfn_valid() always return true. Then we can remove related check. [richard.weiyang@gmail.com: adjust function declaration indention per David] Link: https://lkml.kernel.org/r/20240613114525.27528-1-richard.weiyang@gmail.com Link: https://lkml.kernel.org/r/20240612020421.31975-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Reviewed-by: Mike Rapoport (IBM) Cc: Kirill A. Shutemov Cc: David Hildenbrand Signed-off-by: Andrew Morton commit e5d896703d1318d539a972ff01dc887c124af427 Author: Miaohe Lin Date: Wed Jun 12 15:18:35 2024 +0800 mm/memory-failure: correct comment in me_swapcache_dirty Dirty swap cache page could live both in page table (not page cache) and swap cache when freshly swapped in. Correct comment. Link: https://lkml.kernel.org/r/20240612071835.157004-14-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit d49f2366e98081471dbef5c1bc0da00d10fa0776 Author: Miaohe Lin Date: Wed Jun 12 15:18:34 2024 +0800 mm/memory-failure: remove obsolete comment in kill_proc() When user sets SIGBUS to SIG_IGN, it won't cause loop now. For action required mce error, SIGBUS cannot be blocked. Also when a hwpoisoned page is re-accessed, kill_accessing_process() will be called to kill the process. Link: https://lkml.kernel.org/r/20240612071835.157004-13-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit b71340ef56a4cd5a5ed7f61a5c268ee346ff0640 Author: Miaohe Lin Date: Wed Jun 12 15:18:33 2024 +0800 mm/memory-failure: fix comment of get_hwpoison_page() When return value is 0, it could also means the page is free hugetlb page or free buddy page. Fix the corresponding comment. Link: https://lkml.kernel.org/r/20240612071835.157004-12-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 3a78f77fd1fb82c32cb7971a8a97c5cbc83ab69e Author: Miaohe Lin Date: Wed Jun 12 15:18:32 2024 +0800 mm/memory-failure: move some function declarations into internal.h There are some functions only used inside mm. Move them into internal.h. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-11-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405251049.hxjwX7zO-lkp@intel.com/ Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 28eab7d4e7b4fefed7122d49eb8148c623540739 Author: Miaohe Lin Date: Wed Jun 12 15:18:31 2024 +0800 mm/memory-failure: remove obsolete comment in unpoison_memory() Since commit 130d4df57390 ("mm/sl[au]b: rearrange struct slab fields to allow larger rcu_head"), folio->_mapcount is not overloaded with SLAB. Update corresponding comment. Link: https://lkml.kernel.org/r/20240612071835.157004-10-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Cc: Borislav Petkov (AMD) Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 96e13a4ea2ba720619f220bead2864dcf913b173 Author: Miaohe Lin Date: Wed Jun 12 15:18:30 2024 +0800 mm/memory-failure: use helper macro task_pid_nr() Use helper macro task_pid_nr() to get the pid of a task. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-9-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 5a8b01be4f6f50838b094509a49e1e5ed32c1c5c Author: Miaohe Lin Date: Wed Jun 12 15:18:29 2024 +0800 mm/memory-failure: don't export hwpoison_filter() when !CONFIG_HWPOISON_INJECT When CONFIG_HWPOISON_INJECT is not enabled, there is no user of the hwpoison_filter() outside memory-failure. So there is no need to export it in that case. Link: https://lkml.kernel.org/r/20240612071835.157004-8-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406070136.hGQwVbsv-lkp@intel.com/ Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 4d64ab2f407a2ace43c799e84df7f169422d7a4b Author: Miaohe Lin Date: Wed Jun 12 15:18:28 2024 +0800 mm/memory-failure: remove confusing initialization to count It's meaningless and confusing to init local variable count to 1. Remove it. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-7-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 7f8de2065d85d88951dc31e257a43e7b431c6b14 Author: Miaohe Lin Date: Wed Jun 12 15:18:27 2024 +0800 mm/memory-failure: remove unneeded empty string Remove unneeded empty string in definition of macro pr_fmt. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit b7c3afba248f603290be3464fb681da174299246 Author: Miaohe Lin Date: Wed Jun 12 15:18:26 2024 +0800 mm/memory-failure: save some page_folio() calls Use local variable folio directly to save a page_folio() call. Also use folio_mapped() to save more page_folio() calls. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Cc: Borislav Petkov (AMD) Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit babde18650aa49ee1a78a0f235503462a308cc2a Author: Miaohe Lin Date: Wed Jun 12 15:18:25 2024 +0800 mm/memory-failure: add macro GET_PAGE_MAX_RETRY_NUM Add helper macro GET_PAGE_MAX_RETRY_NUM to replace magic number 3. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit ceb32d6aa93ce3282a724f3a0828b4b84d5035f1 Author: Miaohe Lin Date: Wed Jun 12 15:18:24 2024 +0800 mm/memory-failure: remove MF_MSG_SLAB Since commit 46df8e73a4a3 ("mm: free up PG_slab"), MF_MSG_SLAB becomes unused. Remove it. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton commit 16117532744deac0d2efecf8a422b73a33afd216 Author: Miaohe Lin Date: Wed Jun 12 15:18:23 2024 +0800 mm/memory-failure: simplify put_ref_page() Patch series "Some cleanups for memory-failure", v3. This series contains a few cleanup patches to avoid exporting unused function, add helper macro, fix some obsolete comments and so on. More details can be found in the respective changelogs. This patch (of 13): Remove unneeded page != NULL check. pfn_to_page() won't return NULL. No functional change intended. Link: https://lkml.kernel.org/r/20240612071835.157004-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20240612071835.157004-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: Naoya Horiguchi Cc: Tony Luck Cc: David Hildenbrand Cc: kernel test robot Signed-off-by: Andrew Morton commit 09a5336228420af4803c7bbdf91f8f24fc0942bf Author: Oscar Salvador Date: Wed Jun 12 10:29:36 2024 +0200 mm/hugetlb: guard dequeue_hugetlb_folio_nodemask against NUMA_NO_NODE uses dequeue_hugetlb_folio_nodemask() expects a preferred node where to get the hugetlb page from. It does not expect, though, users to pass NUMA_NO_NODE, otherwise we will get trash when trying to get the zonelist from that node. All current users are careful enough to not pass NUMA_NO_NODE, but it opens the door for new users to get this wrong since it is not documented [0]. Guard against this by getting the local nid if NUMA_NO_NODE was passed. [0] https://lore.kernel.org/linux-mm/0000000000004f12bb061a9acf07@google.com/ Closes: https://lore.kernel.org/linux-mm/0000000000004f12bb061a9acf07@google.com/ Link: https://lkml.kernel.org/r/20240612082936.10867-1-osalvador@suse.de Signed-off-by: Oscar Salvador Reported-by: syzbot+569ed13f4054f271087b@syzkaller.appspotmail.com Tested-by: syzbot+569ed13f4054f271087b@syzkaller.appspotmail.com Reviewed-by: Muchun Song Acked-by: Vivek Kasireddy Cc: Oscar Salvador Signed-off-by: Andrew Morton commit b79d715c43354010775862cfcd2d01cb04d0de47 Author: Xiu Jianfeng Date: Wed Jun 12 09:24:09 2024 +0000 mm/hugetlb_cgroup: switch to the new cftypes The previous patch has already reconstructed the cftype attributes based on the templates and saved them in dfl_cftypes and legacy_cftypes. then remove the old procedure and switch to the new cftypes. Link: https://lkml.kernel.org/r/20240612092409.2027592-4-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Cc: Muchun Song Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 47179fe03588caa13a9bae642b058901709ddc55 Author: Xiu Jianfeng Date: Wed Jun 12 09:24:08 2024 +0000 mm/hugetlb_cgroup: prepare cftypes based on template Unlike other cgroup subsystems, the hugetlb cgroup does not provide a static array of cftype that explicitly displays the properties, handling functions, etc., of each file. Instead, it dynamically creates the attribute of cftypes based on the hstate during the startup procedure. This reduces the readability of the code. To fix this issue, introduce two templates of cftypes, and rebuild the attributes according to the hstate to make it ready to be added to cgroup framework. Link: https://lkml.kernel.org/r/20240612092409.2027592-3-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Cc: Muchun Song Cc: Oscar Salvador Cc: kernel test robot From: Xiu Jianfeng Subject: mm/hugetlb_cgroup: register lockdep key for cftype Date: Tue, 18 Jun 2024 07:19:22 +0000 When CONFIG_DEBUG_LOCK_ALLOC is enabled, the following commands can trigger a bug, mount -t cgroup2 none /sys/fs/cgroup cd /sys/fs/cgroup echo "+hugetlb" > cgroup.subtree_control The log is as below: BUG: key ffff8880046d88d8 has not been registered! ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 3 PID: 226 at kernel/locking/lockdep.c:4945 lockdep_init_map_type+0x185/0x220 Modules linked in: CPU: 3 PID: 226 Comm: bash Not tainted 6.10.0-rc4-next-20240617-g76db4c64526c #544 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:lockdep_init_map_type+0x185/0x220 Code: 00 85 c0 0f 84 6c ff ff ff 8b 3d 6a d1 85 01 85 ff 0f 85 5e ff ff ff 48 c7 c6 21 99 4a 82 48 c7 c7 60 29 49 82 e8 3b 2e f5 RSP: 0018:ffffc9000083fc30 EFLAGS: 00000282 RAX: 0000000000000000 RBX: ffffffff828dd820 RCX: 0000000000000027 RDX: ffff88803cd9cac8 RSI: 0000000000000001 RDI: ffff88803cd9cac0 RBP: ffff88800674fbb0 R08: ffffffff828ce248 R09: 00000000ffffefff R10: ffffffff8285e260 R11: ffffffff828b8eb8 R12: ffff8880046d88d8 R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880067281c0 FS: 00007f68601ea740(0000) GS:ffff88803cd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005614f3ebc740 CR3: 000000000773a000 CR4: 00000000000006f0 Call Trace: ? __warn+0x77/0xd0 ? lockdep_init_map_type+0x185/0x220 ? report_bug+0x189/0x1a0 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? lockdep_init_map_type+0x185/0x220 __kernfs_create_file+0x79/0x100 cgroup_addrm_files+0x163/0x380 ? find_held_lock+0x2b/0x80 ? find_held_lock+0x2b/0x80 ? find_held_lock+0x2b/0x80 css_populate_dir+0x73/0x180 cgroup_apply_control_enable+0x12f/0x3a0 cgroup_subtree_control_write+0x30b/0x440 kernfs_fop_write_iter+0x13a/0x1f0 vfs_write+0x341/0x450 ksys_write+0x64/0xe0 do_syscall_64+0x4b/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f68602d9833 Code: 8b 15 61 26 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 08 RSP: 002b:00007fff9bbdf8e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f68602d9833 RDX: 0000000000000009 RSI: 00005614f3ebc740 RDI: 0000000000000001 RBP: 00005614f3ebc740 R08: 000000000000000a R09: 0000000000000008 R10: 00005614f3db6ba0 R11: 0000000000000246 R12: 0000000000000009 R13: 00007f68603bd6a0 R14: 0000000000000009 R15: 00007f68603b8880 For lockdep, there is a sanity check in lockdep_init_map_type(), the lock-class key must either have been allocated statically or must have been registered as a dynamic key. However the commit e18df2889ff9 ("mm/hugetlb_cgroup: prepare cftypes based on template") has changed the cftypes from static allocated objects to dynamic allocated objects, so the cft->lockdep_key must be registered proactively. [xiujianfeng@huawei.com: fix BUG()] Link: https://lkml.kernel.org/r/20240619015527.2212698-1-xiujianfeng@huawei.com Link: https://lkml.kernel.org/r/20240618071922.2127289-1-xiujianfeng@huawei.com Link: https://lore.kernel.org/all/602186b3-5ce3-41b3-90a3-134792cc2a48@samsung.com/ Fixes: e18df2889ff9 ("mm/hugetlb_cgroup: prepare cftypes based on template") Signed-off-by: Xiu Jianfeng Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202406181046.8d8b2492-oliver.sang@intel.com Tested-by: Marek Szyprowski Tested-by: SeongJae Park Closes: https://lore.kernel.org/20240618233608.400367-1-sj@kernel.org Cc: Muchun Song Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 520de595b403eb3f5c1d3f7760fdfac7ad02a564 Author: Xiu Jianfeng Date: Wed Jun 12 09:24:07 2024 +0000 mm/hugetlb_cgroup: identify the legacy using cgroup_subsys_on_dfl() Patch series "mm/hugetlb_cgroup: rework on cftypes", v3. This patchset provides an intuitive view of the control files through static templates of cftypes. This improves the readability of the code. This patch (of 3): Currently the numa_stat file encodes 1 into .private using the micro MEMFILE_PRIVATE() to identify the legacy. Actually, we can use cgroup_subsys_on_dfl() instead. This is helpful to handle .private in the static templates in the next patch. Link: https://lkml.kernel.org/r/20240612092409.2027592-1-xiujianfeng@huawei.com Link: https://lkml.kernel.org/r/20240612092409.2027592-2-xiujianfeng@huawei.com Signed-off-by: Xiu Jianfeng Reviewed-by: Oscar Salvador Cc: Muchun Song Signed-off-by: Andrew Morton commit 15995a35247442aefa0ffe36a6dad51cb46b0918 Author: Sourav Panda Date: Wed Jun 5 22:27:51 2024 +0000 mm: report per-page metadata information Today, we do not have any observability of per-page metadata and how much it takes away from the machine capacity. Thus, we want to describe the amount of memory that is going towards per-page metadata, which can vary depending on build configuration, machine architecture, and system use. This patch adds 2 fields to /proc/vmstat that can used as shown below: Accounting per-page metadata allocated by boot-allocator: /proc/vmstat:nr_memmap_boot * PAGE_SIZE Accounting per-page metadata allocated by buddy-allocator: /proc/vmstat:nr_memmap * PAGE_SIZE Accounting total Perpage metadata allocated on the machine: (/proc/vmstat:nr_memmap_boot + /proc/vmstat:nr_memmap) * PAGE_SIZE Utility for userspace: Observability: Describe the amount of memory overhead that is going to per-page metadata on the system at any given time since this overhead is not currently observable. Debugging: Tracking the changes or absolute value in struct pages can help detect anomalies as they can be correlated with other metrics in the machine (e.g., memtotal, number of huge pages, etc). page_ext overheads: Some kernel features such as page_owner page_table_check that use page_ext can be optionally enabled via kernel parameters. Having the total per-page metadata information helps users precisely measure impact. Furthermore, page-metadata metrics will reflect the amount of struct pages reliquished (or overhead reduced) when hugetlbfs pages are reserved which will vary depending on whether hugetlb vmemmap optimization is enabled or not. For background and results see: lore.kernel.org/all/20240220214558.3377482-1-souravpanda@google.com Link: https://lkml.kernel.org/r/20240605222751.1406125-1-souravpanda@google.com Signed-off-by: Sourav Panda Acked-by: David Rientjes Reviewed-by: Pasha Tatashin Cc: Alexey Dobriyan Cc: Bjorn Helgaas Cc: Chen Linxuan Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Ivan Babrou Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Kefeng Wang Cc: Kirill A. Shutemov Cc: Liam R. Howlett Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Muchun Song Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Shakeel Butt Cc: Suren Baghdasaryan Cc: Tomas Mudrunka Cc: Vlastimil Babka Cc: Wei Xu Cc: Yang Yang Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 8192bc03d908c60c95b72dd0acfc8e37a33ab2f7 Author: Edward Liaw Date: Wed Jun 5 22:36:35 2024 +0000 selftests/mm: guard defines from shm thuge-gen.c defines SHM_HUGE_* macros that are provided by the uapi since 4.14. These macros get redefined when compiling with Android's bionic because its sys/shm.h will import the uapi definitions. However if linux/shm.h is included, with glibc, sys/shm.h will clash on some struct definitions: /usr/include/linux/shm.h:26:8: error: redefinition of ‘struct shmid_ds’ 26 | struct shmid_ds { | ^~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/shm.h:45, from /usr/include/x86_64-linux-gnu/sys/shm.h:30: /usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h:24:8: note: originally defined here 24 | struct shmid_ds | ^~~~~~~~ For now, guard the SHM_HUGE_* defines with ifndef to prevent redefinition warnings on Android bionic. Link: https://lkml.kernel.org/r/20240605223637.1374969-3-edliaw@google.com Signed-off-by: Edward Liaw Reviewed-by: Carlos Llamas Reviewed-by: Muhammad Usama Anjum Cc: Bill Wendling Cc: Carlos Llamas Cc: Justin Stitt Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Shuah Khan Signed-off-by: Andrew Morton commit 05f3f75cf13faf4f16bbb86709ea4d482de2573d Author: Edward Liaw Date: Wed Jun 5 22:36:34 2024 +0000 selftests/mm: include linux/mman.h thuge-gen defines MAP_HUGE_* macros that are provided by linux/mman.h since 4.15. Removes the macros and includes linux/mman.h instead. Link: https://lkml.kernel.org/r/20240605223637.1374969-2-edliaw@google.com Signed-off-by: Edward Liaw Reviewed-by: Carlos Llamas Reviewed-by: Muhammad Usama Anjum Cc: Bill Wendling Cc: Justin Stitt Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Shuah Khan Signed-off-by: Andrew Morton commit 5958d35917e1296f46dfc8b8c959732efd6d8d5d Author: Anastasia Belova Date: Thu Jun 6 11:06:59 2024 +0300 mm/memory_hotplug: prevent accessing by index=-1 nid may be equal to NUMA_NO_NODE=-1. Prevent accessing node_data array by invalid index with check for nid. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lkml.kernel.org/r/20240606080659.18525-1-abelova@astralinux.ru Fixes: e83a437faa62 ("mm/memory_hotplug: introduce "auto-movable" online policy") Signed-off-by: Anastasia Belova Acked-by: David Hildenbrand Acked-by: Oscar Salvador Signed-off-by: Andrew Morton commit f742829d32e242b542f8b6628d75141c2dd2dc2d Author: Lance Yang Date: Tue Jun 11 09:04:18 2024 +0800 mm/mlock: implement folio_mlock_step() using folio_pte_batch() Let's make folio_mlock_step() simply a wrapper around folio_pte_batch(), which will greatly reduce the cost of ptep_get() when scanning a range of contptes. Link: https://lkml.kernel.org/r/20240611010418.70797-1-ioworker0@gmail.com Signed-off-by: Lance Yang Acked-by: David Hildenbrand Reviewed-by: Baolin Wang Suggested-by: Barry Song <21cnbao@gmail.com> Suggested-by: Matthew Wilcox Cc: Bang Li Cc: "Huang, Ying" Cc: Ryan Roberts Cc: Yin Fengwei Cc: Zi Yan Signed-off-by: Andrew Morton commit c63f210d4891f5b1b1057a0d7c91d2b0d15431d1 Author: Yosry Ahmed Date: Tue Jun 11 02:45:16 2024 +0000 mm: zswap: handle incorrect attempts to load large folios Zswap does not support storing or loading large folios. Until proper support is added, attempts to load large folios from zswap are a bug. For example, if a swapin fault observes that contiguous PTEs are pointing to contiguous swap entries and tries to swap them in as a large folio, swap_read_folio() will pass in a large folio to zswap_load(), but zswap_load() will only effectively load the first page in the folio. If the first page is not in zswap, the folio will be read from disk, even though other pages may be in zswap. In both cases, this will lead to silent data corruption. Proper support needs to be added before large folio swapins and zswap can work together. Looking at callers of swap_read_folio(), it seems like they are either allocated from __read_swap_cache_async() or do_swap_page() in the SWP_SYNCHRONOUS_IO path. Both of which allocate order-0 folios, so everything is fine for now. However, there is ongoing work to add to support large folio swapins [1]. To make sure new development does not break zswap (or get broken by zswap), add minimal handling of incorrect loads of large folios to zswap. First, move the call folio_mark_uptodate() inside zswap_load(). If a large folio load is attempted, and zswap was ever enabled on the system, return 'true' without calling folio_mark_uptodate(). This will prevent the folio from being read from disk, and will emit an IO error because the folio is not uptodate (e.g. do_swap_fault() will return VM_FAULT_SIGBUS). It may not be reliable recovery in all cases, but it is better than nothing. This was tested by hacking the allocation in __read_swap_cache_async() to use order 2 and __GFP_COMP. In the future, to handle this correctly, the swapin code should: (a) Fall back to order-0 swapins if zswap was ever used on the machine, because compressed pages remain in zswap after it is disabled. (b) Add proper support to swapin large folios from zswap (fully or partially). Probably start with (a) then followup with (b). [1]https://lore.kernel.org/linux-mm/20240304081348.197341-6-21cnbao@gmail.com/ Link: https://lkml.kernel.org/r/20240611024516.1375191-3-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Barry Song Cc: Barry Song Cc: Chengming Zhou Cc: Chris Li Cc: David Hildenbrand Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Nhat Pham Signed-off-by: Andrew Morton commit 2d4d2b1cfb85cc07f6d5619acb882d8b11e55cf4 Author: Yosry Ahmed Date: Tue Jun 11 02:45:15 2024 +0000 mm: zswap: add zswap_never_enabled() Add zswap_never_enabled() to skip the xarray lookup in zswap_load() if zswap was never enabled on the system. It is implemented using static branches for efficiency, as enabling zswap should be a rare event. This could shave some cycles off zswap_load() when CONFIG_ZSWAP is used but zswap is never enabled. However, the real motivation behind this patch is two-fold: - Incoming large folio swapin work will need to fallback to order-0 folios if zswap was ever enabled, because any part of the folio could be in zswap, until proper handling of large folios with zswap is added. - A warning and recovery attempt will be added in a following change in case the above was not done incorrectly. Zswap will fail the read if the folio is large and it was ever enabled. Expose zswap_never_enabled() in the header for the swapin work to use it later. [yosryahmed@google.com: expose zswap_never_enabled() in the header] Link: https://lkml.kernel.org/r/Zmjf0Dr8s9xSW41X@google.com Link: https://lkml.kernel.org/r/20240611024516.1375191-2-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: Nhat Pham Cc: Barry Song Cc: Chengming Zhou Cc: Chris Li Cc: David Hildenbrand Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2b33a97c94bc44468fc1d54b745269c0cf0b7bb2 Author: Yosry Ahmed Date: Tue Jun 11 02:45:14 2024 +0000 mm: zswap: rename is_zswap_enabled() to zswap_is_enabled() In preparation for introducing a similar function, rename is_zswap_enabled() to use zswap_* prefix like other zswap functions. Link: https://lkml.kernel.org/r/20240611024516.1375191-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: Barry Song Reviewed-by: Nhat Pham Cc: Chengming Zhou Cc: Chris Li Cc: David Hildenbrand Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 4f66da89d31ca56d4c41de01dd663f79d697904b Author: Wei Yang Date: Tue Jun 11 14:52:23 2024 +0000 mm/mm_init.c: print mem_init info after defer_init is done Current call flow looks like this: start_kernel mm_core_init mem_init mem_init_print_info rest_init kernel_init kernel_init_freeable page_alloc_init_late deferred_init_memmap If CONFIG_DEFERRED_STRUCT_PAGE_INIT, the time mem_init_print_info() calls, pages are not totally initialized and freed to buddy. This has one issue * nr_free_pages() just contains partial free pages in the system, which is not we expect. Let's print the mem info after defer_init is done. Also this would help changing totalram_pages accounting, since we plan to move the accounting into __free_pages_core(). Link: https://lkml.kernel.org/r/20240611145223.16872-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: David Hildenbrand Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit afb90a36c643112bc8cabefb71c110ee2b757ca3 Author: Leesoo Ahn Date: Tue Jun 11 00:15:28 2024 +0900 mm/sparse: use MEMBLOCK_ALLOC_ACCESSIBLE enum instead of 0 Setting 'limit' variable to 0 might seem like it means "no limit". But in the memblock API, 0 actually means the 'MEMBLOCK_ALLOC_ACCESSIBLE' enum, which limits the physical address range end based on 'memblock.current_limit'. This could be confusing. Use the enum instead of 0 to make it clear. Link: https://lkml.kernel.org/r/20240610151528.943680-1-lsahn@wewakecorp.com Signed-off-by: Leesoo Ahn Acked-by: Mike Rapoport (IBM) Reviewed-by: Wei Yang Signed-off-by: Andrew Morton commit 735ecdfaf4e802209caf34b7ac45adf448c54ccc Author: Lance Yang Date: Fri Jun 14 09:51:38 2024 +0800 mm/vmscan: avoid split lazyfree THP during shrink_folio_list() When the user no longer requires the pages, they would use madvise(MADV_FREE) to mark the pages as lazy free. Subsequently, they typically would not re-write to that memory again. During memory reclaim, if we detect that the large folio and its PMD are both still marked as clean and there are no unexpected references (such as GUP), so we can just discard the memory lazily, improving the efficiency of memory reclamation in this case. On an Intel i5 CPU, reclaiming 1GiB of lazyfree THPs using mem_cgroup_force_empty() results in the following runtimes in seconds (shorter is better): -------------------------------------------- | Old | New | Change | -------------------------------------------- | 0.683426 | 0.049197 | -92.80% | -------------------------------------------- [ioworker0@gmail.com: minor changes per David] Link: https://lkml.kernel.org/r/20240622100057.3352-1-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240614015138.31461-4-ioworker0@gmail.com Signed-off-by: Lance Yang Suggested-by: Zi Yan Suggested-by: David Hildenbrand Cc: Bang Li Cc: Baolin Wang Cc: Barry Song Cc: Fangrui Song Cc: Jeff Xie Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Minchan Kim Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: SeongJae Park Cc: Yang Shi Cc: Yin Fengwei Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 29e847d2ade3cdff36afe095fdbeb9b5f71a197a Author: Lance Yang Date: Fri Jun 14 09:51:37 2024 +0800 mm/rmap: integrate PMD-mapped folio splitting into pagewalk loop In preparation for supporting try_to_unmap_one() to unmap PMD-mapped folios, start the pagewalk first, then call split_huge_pmd_address() to split the folio. Link: https://lkml.kernel.org/r/20240614015138.31461-3-ioworker0@gmail.com Signed-off-by: Lance Yang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Suggested-by: Baolin Wang Acked-by: Zi Yan Cc: Bang Li Cc: Barry Song Cc: Fangrui Song Cc: Jeff Xie Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Minchan Kim Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: SeongJae Park Cc: Yang Shi Cc: Yin Fengwei Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 26d21b18d971c8ba3343240ca22cfd03daad4926 Author: Lance Yang Date: Fri Jun 14 09:51:36 2024 +0800 mm/rmap: remove duplicated exit code in pagewalk loop Patch series "Reclaim lazyfree THP without splitting", v8. This series adds support for reclaiming PMD-mapped THP marked as lazyfree without needing to first split the large folio via split_huge_pmd_address(). When the user no longer requires the pages, they would use madvise(MADV_FREE) to mark the pages as lazy free. Subsequently, they typically would not re-write to that memory again. During memory reclaim, if we detect that the large folio and its PMD are both still marked as clean and there are no unexpected references(such as GUP), so we can just discard the memory lazily, improving the efficiency of memory reclamation in this case. Performance Testing =================== On an Intel i5 CPU, reclaiming 1GiB of lazyfree THPs using mem_cgroup_force_empty() results in the following runtimes in seconds (shorter is better): -------------------------------------------- | Old | New | Change | -------------------------------------------- | 0.683426 | 0.049197 | -92.80% | -------------------------------------------- This patch (of 8): Introduce the labels walk_done and walk_abort as exit points to eliminate duplicated exit code in the pagewalk loop. Link: https://lkml.kernel.org/r/20240614015138.31461-1-ioworker0@gmail.com Link: https://lkml.kernel.org/r/20240614015138.31461-2-ioworker0@gmail.com Signed-off-by: Lance Yang Reviewed-by: Zi Yan Reviewed-by: Baolin Wang Reviewed-by: David Hildenbrand Reviewed-by: Barry Song Cc: Bang Li Cc: Fangrui Song Cc: Jeff Xie Cc: Kefeng Wang Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Minchan Kim Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: SeongJae Park Cc: Yang Shi Cc: Yin Fengwei Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 9ba85f5529f1110aa6d787f8f12553a713f945fc Author: Usama Arif Date: Mon Jun 10 15:30:37 2024 +0100 mm: do not start/end writeback for pages stored in zswap Most of the work done in folio_start_writeback is reversed in folio_end_writeback. For e.g. NR_WRITEBACK and NR_ZONE_WRITE_PENDING are incremented in start_writeback and decremented in end_writeback. Calling end_writeback immediately after start_writeback (separated by folio_unlock) cancels the affect of most of the work done in start hence can be removed. There is some extra work done in folio_end_writeback, however it is incorrect/not applicable to zswap: - folio_end_writeback incorrectly increments NR_WRITTEN counter, eventhough the pages aren't written to disk, hence this change corrects this behaviour. - folio_end_writeback calls folio_rotate_reclaimable, but that only makes sense for async writeback pages, while for zswap pages are synchronously reclaimed. Link: https://lkml.kernel.org/r/20240612100109.1616626-1-usamaarif642@gmail.com Link: https://lkml.kernel.org/r/20240610143037.812955-1-usamaarif642@gmail.com Signed-off-by: Usama Arif Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Yosry Ahmed Reviewed-by: Chengming Zhou Suggested-by: Matthew Wilcox (Oracle) Cc: Nhat Pham Signed-off-by: Andrew Morton commit ecc1793b2d08efeb2d1795814d2ea350c9d6992b Author: Pankaj Raghav Date: Thu Jun 6 20:36:19 2024 +0000 selftests/mm: use asm volatile to not optimize mmap read variable create_pagecache_thp_and_fd() in split_huge_page_test.c used the variable dummy to perform mmap read. However, this test was skipped even on XFS which has large folio support. The issue was compiler (gcc 13.2.0) was optimizing out the dummy variable, therefore, not creating huge page in the page cache. Use asm volatile() trick to force the compiler not to optimize out the loop where we read from the mmaped addr. This is similar to what is being done in other tests (cow.c, etc) As the variable is now used in the asm statement, remove the unused attribute. Link: https://lkml.kernel.org/r/20240606203619.677276-1-kernel@pankajraghav.com Signed-off-by: Pankaj Raghav Reviewed-by: Zi Yan Acked-by: David Hildenbrand Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Pankaj Raghav Cc: Shuah Khan Signed-off-by: Andrew Morton commit 20dfa5b7adc5a1f8b5b7ff9b014d0bd1845c990b Author: Barry Song Date: Sat Jun 8 09:13:58 2024 +1200 mm: set pte writable while pte_soft_dirty() is true in do_swap_page() This patch leverages the new pte_needs_soft_dirty_wp() helper to optimize a scenario where softdirty is enabled, but the softdirty flag has already been set in do_swap_page(). In this situation, we can use pte_mkwrite instead of applying write-protection since we don't depend on write faults. Link: https://lkml.kernel.org/r/20240607211358.4660-3-21cnbao@gmail.com Signed-off-by: Barry Song Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Cc: Chris Li Cc: Kairui Song Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Ryan Roberts Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit f38ee2851918134c1e04730b79714a1a5c895aed Author: Barry Song Date: Sat Jun 8 09:13:57 2024 +1200 mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty write-protect Patch series "mm: introduce pmd|pte_needs_soft_dirty_wp helpers and utilize them", v2. This patchset introduces the pte_need_soft_dirty_wp and pmd_need_soft_dirty_wp helpers to determine if write protection is required for softdirty tracking. These helpers enhance code readability and improve the overall appearance. They are then utilized in gup, mprotect, swap, and other related functions. This patch (of 2): This patch introduces the pte_needs_soft_dirty_wp and pmd_needs_soft_dirty_wp helpers to determine if write protection is required for softdirty tracking. This can enhance code readability and improve its overall appearance. These new helpers are then utilized in gup, huge_memory, and mprotect. Link: https://lkml.kernel.org/r/20240607211358.4660-1-21cnbao@gmail.com Link: https://lkml.kernel.org/r/20240607211358.4660-2-21cnbao@gmail.com Signed-off-by: Barry Song Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Cc: Chris Li Cc: Kairui Song Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Ryan Roberts Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit c142850fbc956058ff2f2987d3d11eb2c628f710 Author: John Hubbard Date: Mon Jun 17 19:24:21 2024 -0700 selftests/mm: kvm, mdwe fixes to avoid requiring "make headers" On Ubuntu 23.04, the kvm and mdwe selftests/mm build fails due to missing a few items that are found in prctl.h. Here is an excerpt of the build failures: ksm_tests.c:252:13: error: use of undeclared identifier 'PR_SET_MEMORY_MERGE' ... mdwe_test.c:26:18: error: use of undeclared identifier 'PR_SET_MDWE' mdwe_test.c:38:18: error: use of undeclared identifier 'PR_GET_MDWE' Fix these errors by adding a new tools/include/uapi/linux/prctl.h . This file was created by running "make headers", and then copying a snapshot over from ./usr/include/linux/prctl.h, as per the approach we settled on in [1]. [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Link: https://lkml.kernel.org/r/20240618022422.804305-6-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: David Hildenbrand Cc: Andrei Vagin Cc: Axel Rasmussen Cc: Christian Brauner Cc: Jeff Xu Cc: Kees Cook Cc: Kent Overstreet Cc: Liam R. Howlett Cc: Muhammad Usama Anjum Cc: Peter Xu Cc: Rich Felker Cc: Shuah Khan Signed-off-by: Andrew Morton commit e20194725bb25bb94c238fd9056108ea50a760c0 Author: John Hubbard Date: Mon Jun 17 19:24:20 2024 -0700 selftests/mm: fix vm_util.c build failures: add snapshot of fs.h On Ubuntu 23.04, on a clean git tree, the selftests/mm build fails due 10 or 20 missing items, all of which are found in fs.h, which is created via "make headers". However, as per [1], the idea is to stop requiring "make headers", and instead, take a snapshot of the files and check them in. Here are a few of the build errors: vm_util.c:34:21: error: variable has incomplete type 'struct pm_scan_arg' struct pm_scan_arg arg; ... vm_util.c:45:28: error: use of undeclared identifier 'PAGE_IS_WPALLOWED' ... vm_util.c:55:21: error: variable has incomplete type 'struct page_region' ... vm_util.c:105:20: error: use of undeclared identifier 'PAGE_IS_SOFT_DIRTY' To fix this, add fs.h, taken from a snapshot of ./usr/include/linux/fs.h after running "make headers". [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Link: https://lkml.kernel.org/r/20240618022422.804305-5-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: David Hildenbrand Cc: Andrei Vagin Cc: Axel Rasmussen Cc: Christian Brauner Cc: Jeff Xu Cc: Kees Cook Cc: Kent Overstreet Cc: Liam R. Howlett Cc: Muhammad Usama Anjum Cc: Peter Xu Cc: Rich Felker Cc: Shuah Khan Signed-off-by: Andrew Morton commit eef07d69d3a4c2002f3d49149296c56f2abccf89 Author: John Hubbard Date: Mon Jun 17 19:24:19 2024 -0700 selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS Now that the test macros are factored out into their final location, and simplified, it's time to rename TEST_END_CHECK to something that represents its new functionality: REPORT_TEST_PASS. Link: https://lkml.kernel.org/r/20240618022422.804305-4-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: David Hildenbrand Reviewed-by: Jeff Xu Tested-by: 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 Signed-off-by: Andrew Morton commit 5f9b7511b21e88bfaf4a469becc7fc2c0c74f597 Author: John Hubbard Date: Mon Jun 17 19:24:18 2024 -0700 selftests/mm: mseal, self_elf: factor out test macros and other duplicated items Clean up and move some copy-pasted items into a new mseal_helpers.h. 1. The test macros can be made safer and simpler, by observing that they are invariably called when about to return. This means that the macros do not need an intrusive label to goto; they can simply return. 2. PKEY* items. We cannot, unfortunately use pkey-helpers.h. The best we can do is to factor out these few items into mseal_helpers.h. 3. These tests still need their own definition of u64, so also move that to the header file. 4. Be sure to include the new mseal_helpers.h in the Makefile dependencies. [jhubbard@nvidia.com: include the new mseal_helpers.h in Makefile dependencies] Link: https://lkml.kernel.org/r/01685978-f6b1-4c24-8397-22cd3c24b91a@nvidia.com Link: https://lkml.kernel.org/r/20240618022422.804305-3-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: 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 Signed-off-by: Andrew Morton commit 504d8a5e0fd4def825a58d69ca783dcfa424d012 Author: John Hubbard Date: Mon Jun 17 19:24:17 2024 -0700 selftests/mm: mseal, self_elf: fix missing __NR_mseal Patch series "cleanups, fixes, and progress towards avoiding "make headers"", v3. Eventually, once the build succeeds on a sufficiently old distro, the idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then after that, from selftests/lib.mk and all of the other selftest builds. For now, this series merely achieves a clean build of selftests/mm on a not-so-old distro: Ubuntu 23.04. In other words, after this series is applied, it is possible to delete $(KHDR_INCLUDES) from selftests/mm/Makefile and the build will still succeed. 1. Add tools/uapi/asm/unistd_[32|x32|64].h files, which include definitions of __NR_mseal, and include them (indirectly) from the files that use __NR_mseal. The new files are copied from ./usr/include/asm, which is how we have agreed to do this sort of thing, see [1]. 2. Add fs.h, similarly created: it was copied directly from a snapshot of ./usr/include/linux/fs.h after running "make headers". 3. Add a few selected prctl.h values that the ksm and mdwe tests require. 4. Factor out some common code from mseal_test.c and seal_elf.c, into a new mseal_helpers.h file. 5. Remove local __NR_* definitions and checks. [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") This patch (of 6): The selftests/mm build isn't exactly "broken", according to the current documentation, which still claims that one must run "make headers", before building the kselftests. However, according to the new plan to get rid of that requirement [1], they are future-broken: attempting to build selftests/mm *without* first running "make headers" will fail due to not finding __NR_mseal. Therefore, include asm-generic/unistd.h, which has all of the system call numbers that are needed, abstracted across the various CPU arches. Some explanation in support of this "asm-generic" approach: For most user space programs, the header file inclusion behaves as per this microblaze example, which comes from David Hildenbrand (thanks!): arch/microblaze/include/asm/unistd.h -> #include arch/microblaze/include/uapi/asm/unistd.h -> #include -> Generated during "make headers" usr/include/asm/unistd_32.h is generated via arch/microblaze/kernel/syscalls/Makefile with the syshdr command. So we never end up including asm-generic/unistd.h directly on microblaze... [2] However, those programs are installed on a single computer that has a single set of asm and kernel headers installed. In contrast, the kselftests are quite special, because they must provide a set of user space programs that: a) Mostly avoid using the installed (distro) system header files. b) Build (and run) on all supported CPU architectures c) Occasionally use symbols that have so new that they have not yet been included in the distro's header files. Doing (a) creates a new problem: how to get a set of cross-platform headers that works in all cases. Fortunately, asm-generic headers solve that one. Which is why we need to use them here--at least, for particularly difficult headers such as unistd.h. The reason this hasn't really come up yet, is that until now, the kselftests requirement (which I'm trying to eventually remove) was that "make headers" must first be run. That allowed the selftests to get a snapshot of sufficiently new header files that looked just like (and conflict with) the installed system headers. And as an aside, this is also an improvement over past practices of simply open-coding in a single (not per-arch) definition of a new symbol, directly into the selftest code. [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") [2] https://lore.kernel.org/all/0b152bea-ccb6-403e-9c57-08ed5e828135@redhat.com/ Link: https://lkml.kernel.org/r/20240618022422.804305-1-jhubbard@nvidia.com Link: https://lkml.kernel.org/r/20240618022422.804305-2-jhubbard@nvidia.com Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing") Signed-off-by: John Hubbard Acked-by: 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 Signed-off-by: Andrew Morton commit b2d1f38b524121130befa3a9b37dca790cfa9ab9 Author: Yosry Ahmed Date: Fri Jun 7 04:55:15 2024 +0000 mm: swap: remove 'synchronous' argument to swap_read_folio() Commit [1] introduced IO polling support duding swapin to reduce swap read latency for block devices that can be polled. However later commit [2] removed polling support. Commit [3] removed the remnants of polling support from read_swap_cache_async() and __read_swap_cache_async(). However, it left behind some remnants in swap_read_folio(), the 'synchronous' argument. swap_read_folio() reads the folio synchronously if synchronous=true or if SWP_SYNCHRONOUS_IO is set in swap_info_struct. The only caller that passes synchronous=true is in do_swap_page() in the SWP_SYNCHRONOUS_IO case. Hence, the argument is redundant, it is only set to true when the swap read would have been synchronous anyway. Remove it. [1] Commit 23955622ff8d ("swap: add block io poll in swapin path") [2] Commit 9650b453a3d4 ("block: ignore RWF_HIPRI hint for sync dio") [3] Commit b243dcbf2f13 ("swap: remove remnants of polling from read_swap_cache_async") Link: https://lkml.kernel.org/r/20240607045515.1836558-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: "Huang, Ying" Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton commit 90b8fab5cdc441735d388e286c715da7c85b24f1 Author: David Hildenbrand Date: Fri Jun 7 10:37:11 2024 +0200 mm/highmem: make nr_free_highpages() return "unsigned long" It looks rather weird that totalhigh_pages() returns an "unsigned long" but nr_free_highpages() returns an "unsigned int". Let's return an "unsigned long" from nr_free_highpages() to be consistent. While at it, use a plain "0" instead of a "0UL" in the !CONFIG_HIGHMEM totalhigh_pages() implementation, to make these look alike as well. Link: https://lkml.kernel.org/r/20240607083711.62833-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang Signed-off-by: Andrew Morton commit 7a581204b1fa4fed233ed3b7ffcf6847cc383dbc Author: David Hildenbrand Date: Fri Jun 7 10:37:10 2024 +0200 mm/highmem: reimplement totalhigh_pages() by walking zones Patch series "mm/highmem: don't track highmem pages manually". Let's remove highmem special-casing from adjust_managed_page_count(), to result in less confusion why memblock manually adjusts totalram_pages, and __free_pages_core() only adjusts the zone's managed pages -- what about the highmem pages that adjust_managed_page_count() updates? Now, we only maintain totalram_pages and a zone's managed pages independent of highmem support. We can derive the number of highmem pages simply by looking at the relevant zone's managed pages. I don't think there is any particular fast path that needs a maximum-efficient totalhigh_pages() implementation. Note that highmem memory is currently initialized using free_highmem_page()->free_reserved_page(), not __free_pages_core(). In the future we might want to also use __free_pages_core() to initialize highmem memory, to make that less special, and consider moving totalram_pages updates into __free_pages_core() [1], so we can just use adjust_managed_page_count() in there as well. Booting a simple kernel in QEMU reveals no highmem accounting change: Before: Memory: 3095448K/3145208K available (14802K kernel code, 2073K rwdata, 5000K rodata, 740K init, 556K bss, 49760K reserved, 0K cma-reserved, 2244488K highmem) After: Memory: 3095276K/3145208K available (14802K kernel code, 2073K rwdata, 5000K rodata, 740K init, 556K bss, 49932K reserved, 0K cma-reserved, 2244488K highmem) [1] https://lkml.kernel.org/r/20240601133402.2675-1-richard.weiyang@gmail.com This patch (of 2): Can we get rid of the highmem ifdef in adjust_managed_page_count()? Likely yes: we don't have that many totalhigh_pages() users, and they all don't seem to be very performance critical. So let's implement totalhigh_pages() like nr_free_highpages(), collecting information from all zones. This is now similar to what we do in si_meminfo_node() to collect the per-node highmem page count. In the common case (single node, 3-4 zones), we really shouldn't care. We could optimize a bit further (only walk ZONE_HIGHMEM and ZONE_MOVABLE if required), but there doesn't seem a real need for that. [david@redhat.com: fix build bot complaint] Link: https://lkml.kernel.org/r/b57e5bc4-eb72-40e3-add4-57dfa6e03df6@redhat.com Link: https://lkml.kernel.org/r/20240607083711.62833-1-david@redhat.com Link: https://lkml.kernel.org/r/20240607083711.62833-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton commit 478fd0d8ec1286cb03cf8ebf6beed46746775c9e Author: David Hildenbrand Date: Fri Jun 7 14:23:57 2024 +0200 Documentation/admin-guide/mm/pagemap.rst: drop "Using pagemap to do something useful" That example was added in 2008. In 2015, we restricted access to the PFNs in the pagemap to CAP_SYS_ADMIN, making that approach quite less usable. It's 2024 now, and using that racy and low-lewel mechanism to calculate the USS should not be considered a good example anymore. /proc/$pid/smaps and /proc/$pid/smaps_rollup can do a much better job without any of that low-level handling. Let's just drop that example. Link: https://lkml.kernel.org/r/20240607122357.115423-7-david@redhat.com Signed-off-by: David Hildenbrand Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Lance Yang Cc: Oscar Salvador Signed-off-by: Andrew Morton commit cdd9a571b7d8465353fe2e2d8d1edd8a58d82021 Author: David Hildenbrand Date: Fri Jun 7 14:23:56 2024 +0200 fs/proc: move page_mapcount() to fs/proc/internal.h ... and rename it to folio_precise_page_mapcount(). fs/proc is the last remaining user, and that should stay that way. While at it, cleanup kpagecount_read() a bit: there are still some legacy leftovers -- when the interface was introduced it returned the page refcount, but was changed briefly afterwards to return the page mapcount. Further, some simple folio conversion. Once we stop using the per-page mapcounts of large folios, all folio_precise_page_mapcount() users will have to implement an alternative way to achieve what they are trying to achieve, possibly in a less precise way. [dan.carpenter@linaro.org: fix uninitialized variable in pagemap_pmd_range()] Link: https://lkml.kernel.org/r/9d6eaba7-92f8-4a70-8765-38a519680a87@moroto.mountain Link: https://lkml.kernel.org/r/20240607122357.115423-6-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Dan Carpenter Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Lance Yang Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 3689c3ebdd542de1f8c9224a315b3389f28c331b Author: David Hildenbrand Date: Fri Jun 7 14:23:55 2024 +0200 fs/proc/task_mmu: account non-present entries as "maybe shared, but no idea how often" We currently rely on mapcount information for pages referenced by non-present entries to calculate the USS (shared vs. private) and the PSS. However, relying on mapcounts for non-present entries doesn't make any sense. We have to treat such entries as "maybe shared, but no idea how often", implying that they will *not* get accounted towards the USS, and will get fully accounted to the PSS (no idea how often shared). There is one exception: device exclusive entries essentially behave like present entries (e.g., mapcount incremented). In smaps_pmd_entry(), use is_pfn_swap_entry() instead of is_migration_entry(), which should not make a real difference but makes the code look more similar to the PTE variant. While at it, adjust the comments in smaps_account(). Link: https://lkml.kernel.org/r/20240607122357.115423-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Lance Yang Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 2c1f057e5be63e890f2dd89e4c25ab5eef084a91 Author: David Hildenbrand Date: Fri Jun 7 14:23:54 2024 +0200 fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of PMD-mapped THPs We added PM_MMAP_EXCLUSIVE in 2015 via commit 77bb499bb60f ("pagemap: add mmap-exclusive bit for marking pages mapped only here"), when THPs could not be partially mapped and page_mapcount() returned something that was true for all pages of the THP. In 2016, we added support for partially mapping THPs via commit 53f9263baba6 ("mm: rework mapcount accounting to enable 4k mapping of THPs") but missed to determine PM_MMAP_EXCLUSIVE as well per page. Checking page_mapcount() on the head page does not tell the whole story. We should check each individual page. In a future without per-page mapcounts it will be different, but we'll change that to be consistent with PTE-mapped THPs once we deal with that. Link: https://lkml.kernel.org/r/20240607122357.115423-4-david@redhat.com Fixes: 53f9263baba6 ("mm: rework mapcount accounting to enable 4k mapping of THPs") Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Kirill A. Shutemov Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Lance Yang Signed-off-by: Andrew Morton commit da7f31ed0f4df8f61e8195e527aa83dd54896ba3 Author: David Hildenbrand Date: Fri Jun 7 14:23:53 2024 +0200 fs/proc/task_mmu: don't indicate PM_MMAP_EXCLUSIVE without PM_PRESENT Relying on the mapcount for non-present PTEs that reference pages doesn't make any sense: they are not accounted in the mapcount, so page_mapcount() == 1 won't return the result we actually want to know. While we don't check the mapcount for migration entries already, we could end up checking it for swap, hwpoison, device exclusive, ... entries, which we really shouldn't. There is one exception: device private entries, which we consider fake-present (e.g., incremented the mapcount). But we won't care about that for now for PM_MMAP_EXCLUSIVE, because indicating PM_SWAP for them although they are fake-present already sounds suspiciously wrong. Let's never indicate PM_MMAP_EXCLUSIVE without PM_PRESENT. Link: https://lkml.kernel.org/r/20240607122357.115423-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Lance Yang Signed-off-by: Andrew Morton commit 3f9f022e975d930709848a86a1c79775b0585202 Author: David Hildenbrand Date: Fri Jun 7 14:23:52 2024 +0200 fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP Patch series "fs/proc: move page_mapcount() to fs/proc/internal.h". With all other page_mapcount() users in the tree gone, move page_mapcount() to fs/proc/internal.h, rename it and extend the documentation to prevent future (ab)use. ... of course, I find some issues while working on that code that I sort first ;) We'll now only end up calling page_mapcount() [now folio_precise_page_mapcount()] on pages mapped via present page table entries. Except for /proc/kpagecount, that still does questionable things, but we'll leave that legacy interface as is for now. Did a quick sanity check. Likely we would want some better selfestest for /proc/$/pagemap + smaps. I'll see if I can find some time to write some more. This patch (of 6): Looks like we never taught pagemap_pmd_range() about the existence of PMD-mapped file THPs. Seems to date back to the times when we first added support for non-anon THPs in the form of shmem THP. Link: https://lkml.kernel.org/r/20240607122357.115423-1-david@redhat.com Link: https://lkml.kernel.org/r/20240607122357.115423-2-david@redhat.com Signed-off-by: David Hildenbrand Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Acked-by: Kirill A. Shutemov Reviewed-by: Lance Yang Reviewed-by: Oscar Salvador Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Alexey Dobriyan Signed-off-by: Andrew Morton commit 3c666d0a32d83ea5f500ec1ce02c801520044da1 Author: Jeff Johnson Date: Fri May 31 16:26:03 2024 -0700 lib: test_hmm: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hmm.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-lib-md-test_hmm-v1-1-e4aa17daa57b@quicinc.com Signed-off-by: Jeff Johnson Cc: Jérôme Glisse Signed-off-by: Andrew Morton commit a619dd394883ca01e19f81f8a2108cb616907538 Author: Jeff Johnson Date: Fri May 31 17:13:16 2024 -0700 test_maple_tree: add the missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_maple_tree.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-test_maple_tree-v1-1-7b1b485aeec3@quicinc.com Signed-off-by: Jeff Johnson Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 2ec83987a53e30f3b07090ebd3a03cc7febfc34c Author: Jeff Johnson Date: Fri May 31 19:06:48 2024 -0700 ubsan: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ubsan.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-test_ubsan-v1-1-c2a80d258842@quicinc.com Signed-off-by: Jeff Johnson Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Kees Cook Cc: Marco Elver Signed-off-by: Andrew Morton commit 757234f1ad673e0f86698d75f7fc3bff930b5636 Author: Jeff Johnson Date: Fri May 31 20:08:37 2024 -0700 test_xarray: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_xarray.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-test_xarray-v1-1-42fd6833bdd4@quicinc.com Signed-off-by: Jeff Johnson Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit c18160dba5ff633f7ccd779f23ee97603eda0094 Author: Barry Song Date: Sun Jun 2 12:45:02 2024 +1200 mm: swap: reuse exclusive folio directly instead of wp page faults After swapping out, we perform a swap-in operation. If we first read and then write, we encounter a major fault in do_swap_page for reading, along with additional minor faults in do_wp_page for writing. However, the latter appears to be unnecessary and inefficient. Instead, we can directly reuse in do_swap_page and completely eliminate the need for do_wp_page. This patch achieves that optimization specifically for exclusive folios. The following microbenchmark demonstrates the significant reduction in minor faults. #define DATA_SIZE (2UL * 1024 * 1024) #define PAGE_SIZE (4UL * 1024) static void *read_write_data(char *addr) { char tmp; for (int i = 0; i < DATA_SIZE; i += PAGE_SIZE) { tmp = *(volatile char *)(addr + i); *(volatile char *)(addr + i) = tmp; } } int main(int argc, char **argv) { struct rusage ru; char *addr = mmap(NULL, DATA_SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); memset(addr, 0x11, DATA_SIZE); do { long old_ru_minflt, old_ru_majflt; long new_ru_minflt, new_ru_majflt; madvise(addr, DATA_SIZE, MADV_PAGEOUT); getrusage(RUSAGE_SELF, &ru); old_ru_minflt = ru.ru_minflt; old_ru_majflt = ru.ru_majflt; read_write_data(addr); getrusage(RUSAGE_SELF, &ru); new_ru_minflt = ru.ru_minflt; new_ru_majflt = ru.ru_majflt; printf("minor faults:%ld major faults:%ld\n", new_ru_minflt - old_ru_minflt, new_ru_majflt - old_ru_majflt); } while(0); return 0; } w/o patch, / # ~/a.out minor faults:512 major faults:512 w/ patch, / # ~/a.out minor faults:0 major faults:512 Minor faults decrease to 0! Link: https://lkml.kernel.org/r/20240602004502.26895-1-21cnbao@gmail.com Signed-off-by: Barry Song Acked-by: David Hildenbrand Cc: Chris Li Cc: Kairui Song Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: Ryan Roberts Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 7b09fa7ea4ee91ec2ad8ea6e9560f63901f2b76a Author: Jonathan Cameron Date: Wed Jun 5 11:20:49 2024 +0300 mm/memory_hotplug: drop memblock_phys_free() call in try_remove_memory() The call for memblock_phys_free() in try_remove_memory() does not balance any call to memblock_alloc() (or memblock_reserve() for that matter). There are no memblock_reserve() calls in mm/memory_hotplug.c, no memblock allocations possible after mm_core_init(), and even if memblock_add_node() called from add_memory_resource() would need to allocate memory, that memory would ba allocated from slab. The patch f9126ab9241f ("memory-hotplug: fix wrong edge when hot add a new node") that introduced that call to memblock_free() does not provide adequate description why that was required and tinkering with memblock in the context of memory hotplug on x86 seems bogus because x86 never kept memblock after boot anyway. Drop memblock_phys_free() call in try_remove_memory(). [rppt@kernel.org: rewrite the commit message] Link: https://lkml.kernel.org/r/20240605082049.973242-1-rppt@kernel.org Signed-off-by: Jonathan Cameron Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Acked-by: Oscar Salvador Signed-off-by: Andrew Morton commit 656fe3ee455e8d8dfa1c18292c508da26b29a39c Author: Jeff Johnson Date: Sat Jun 1 18:05:00 2024 -0700 kmemleak-test: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kmemleak/kmemleak-test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240601-md-samples-kmemleak-v1-1-47186be7f0a8@quicinc.com Signed-off-by: Jeff Johnson Acked-by: Catalin Marinas Signed-off-by: Andrew Morton commit 66f44583f9b617d74ffa2487e75a9c3adf344ddb Author: Baolin Wang Date: Tue Jun 11 18:11:10 2024 +0800 mm: shmem: add mTHP counters for anonymous shmem Add mTHP counters for anonymous shmem. [baolin.wang@linux.alibaba.com: update Documentation/admin-guide/mm/transhuge.rst] Link: https://lkml.kernel.org/r/d86e2e7f-4141-432b-b2ba-c6691f36ef0b@linux.alibaba.com Link: https://lkml.kernel.org/r/4fd9e467d49ae4a747e428bcd821c7d13125ae67.1718090413.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Lance Yang Cc: Barry Song Cc: Daniel Gomez Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kefeng Wang Cc: Pankaj Raghav Cc: Ryan Roberts Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 5a9dd10380a16b343aa87d80d5bcc24409a03f5b Author: Baolin Wang Date: Tue Jun 11 18:11:09 2024 +0800 mm: shmem: add mTHP size alignment in shmem_get_unmapped_area Although the top-level hugepage allocation can be turned off, anonymous shmem can still use mTHP by configuring the sysfs interface located at '/sys/kernel/mm/transparent_hugepage/hugepage-XXkb/shmem_enabled'. Therefore, add alignment for mTHP size to provide a suitable alignment address in shmem_get_unmapped_area(). Link: https://lkml.kernel.org/r/0c549b57cf7db07503af692d8546ecfad0fcce52.1718090413.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Tested-by: Lance Yang Cc: Barry Song Cc: Daniel Gomez Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kefeng Wang Cc: Pankaj Raghav Cc: Ryan Roberts Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit e7a2ab7b3bb5d87f99f2ea3d4481d52fc5ceb52d Author: Baolin Wang Date: Tue Jun 11 18:11:08 2024 +0800 mm: shmem: add mTHP support for anonymous shmem Commit 19eaf44954df adds multi-size THP (mTHP) for anonymous pages, that can allow THP to be configured through the sysfs interface located at '/sys/kernel/mm/transparent_hugepage/hugepage-XXkb/enabled'. However, the anonymous shmem will ignore the anonymous mTHP rule configured through the sysfs interface, and can only use the PMD-mapped THP, that is not reasonable. Users expect to apply the mTHP rule for all anonymous pages, including the anonymous shmem, in order to enjoy the benefits of mTHP. For example, lower latency than PMD-mapped THP, smaller memory bloat than PMD-mapped THP, contiguous PTEs on ARM architecture to reduce TLB miss etc. In addition, the mTHP interfaces can be extended to support all shmem/tmpfs scenarios in the future, especially for the shmem mmap() case. The primary strategy is similar to supporting anonymous mTHP. Introduce a new interface '/mm/transparent_hugepage/hugepage-XXkb/shmem_enabled', which can have almost the same values as the top-level '/sys/kernel/mm/transparent_hugepage/shmem_enabled', with adding a new additional "inherit" option and dropping the testing options 'force' and 'deny'. By default all sizes will be set to "never" except PMD size, which is set to "inherit". This ensures backward compatibility with the anonymous shmem enabled of the top level, meanwhile also allows independent control of anonymous shmem enabled for each mTHP. Link: https://lkml.kernel.org/r/65796c1e72e51e15f3410195b5c2d5b6c160d411.1718090413.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Barry Song Cc: Daniel Gomez Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Pankaj Raghav Cc: Ryan Roberts Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 4b98995530b77a97912230d8e1564ba7738db19c Author: Baolin Wang Date: Tue Jun 11 18:11:07 2024 +0800 mm: shmem: add multi-size THP sysfs interface for anonymous shmem To support the use of mTHP with anonymous shmem, add a new sysfs interface 'shmem_enabled' in the '/sys/kernel/mm/transparent_hugepage/hugepages-kB/' directory for each mTHP to control whether shmem is enabled for that mTHP, with a value similar to the top level 'shmem_enabled', which can be set to: "always", "inherit (to inherit the top level setting)", "within_size", "advise", "never". An 'inherit' option is added to ensure compatibility with these global settings, and the options 'force' and 'deny' are dropped, which are rather testing artifacts from the old ages. By default, PMD-sized hugepages have enabled="inherit" and all other hugepage sizes have enabled="never" for '/sys/kernel/mm/transparent_hugepage/hugepages-xxkB/shmem_enabled'. In addition, if top level value is 'force', then only PMD-sized hugepages have enabled="inherit", otherwise configuration will be failed and vice versa. That means now we will avoid using non-PMD sized THP to override the global huge allocation. [baolin.wang@linux.alibaba.com: fix transhuge.rst indentation] Link: https://lkml.kernel.org/r/b189d815-998b-4dfd-ba89-218ff51313f8@linux.alibaba.com [akpm@linux-foundation.org: reflow transhuge.rst addition to 80 cols] [baolin.wang@linux.alibaba.com: move huge_shmem_orders_lock under CONFIG_SYSFS] Link: https://lkml.kernel.org/r/eb34da66-7f12-44f3-a39e-2bcc90c33354@linux.alibaba.com [akpm@linux-foundation.org: huge_memory.c needs mm_types.h] Link: https://lkml.kernel.org/r/ffddfa8b3cb4266ff963099ab78cfd7184c57ac7.1718090413.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Barry Song Cc: Daniel Gomez Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Pankaj Raghav Cc: Ryan Roberts Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 3d95bc21cea558c7cdb2942b4d0223a571e93f27 Author: Baolin Wang Date: Tue Jun 11 18:11:06 2024 +0800 mm: shmem: add THP validation for PMD-mapped THP related statistics In order to extend support for mTHP, add THP validation for PMD-mapped THP related statistics to avoid statistical confusion. Link: https://lkml.kernel.org/r/c4b04cbd51e6951cc2436a87be8eaa4a1516faec.1718090413.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Barry Song Cc: Daniel Gomez Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Kefeng Wang Cc: Lance Yang Cc: Pankaj Raghav Cc: Ryan Roberts Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 43e027e414232b1ce4fa6c96a582417e2c027f2d Author: Baolin Wang Date: Tue Jun 11 18:11:05 2024 +0800 mm: memory: extend finish_fault() to support large folio Patch series "add mTHP support for anonymous shmem", v5. Anonymous pages have already been supported for multi-size (mTHP) allocation through commit 19eaf44954df, that can allow THP to be configured through the sysfs interface located at '/sys/kernel/mm/transparent_hugepage/hugepage-XXkb/enabled'. However, the anonymous shmem will ignore the anonymous mTHP rule configured through the sysfs interface, and can only use the PMD-mapped THP, that is not reasonable. Many implement anonymous page sharing through mmap(MAP_SHARED | MAP_ANONYMOUS), especially in database usage scenarios, therefore, users expect to apply an unified mTHP strategy for anonymous pages, also including the anonymous shared pages, in order to enjoy the benefits of mTHP. For example, lower latency than PMD-mapped THP, smaller memory bloat than PMD-mapped THP, contiguous PTEs on ARM architecture to reduce TLB miss etc. As discussed in the bi-weekly MM meeting[1], the mTHP controls should control all of shmem, not only anonymous shmem, but support will be added iteratively. Therefore, this patch set starts with support for anonymous shmem. The primary strategy is similar to supporting anonymous mTHP. Introduce a new interface '/mm/transparent_hugepage/hugepage-XXkb/shmem_enabled', which can have almost the same values as the top-level '/sys/kernel/mm/transparent_hugepage/shmem_enabled', with adding a new additional "inherit" option and dropping the testing options 'force' and 'deny'. By default all sizes will be set to "never" except PMD size, which is set to "inherit". This ensures backward compatibility with the anonymous shmem enabled of the top level, meanwhile also allows independent control of anonymous shmem enabled for each mTHP. Use the page fault latency tool to measure the performance of 1G anonymous shmem with 32 threads on my machine environment with: ARM64 Architecture, 32 cores, 125G memory: base: mm-unstable user-time sys_time faults_per_sec_per_cpu faults_per_sec 0.04s 3.10s 83516.416 2669684.890 mm-unstable + patchset, anon shmem mTHP disabled user-time sys_time faults_per_sec_per_cpu faults_per_sec 0.02s 3.14s 82936.359 2630746.027 mm-unstable + patchset, anon shmem 64K mTHP enabled user-time sys_time faults_per_sec_per_cpu faults_per_sec 0.08s 0.31s 678630.231 17082522.495 From the data above, it is observed that the patchset has a minimal impact when mTHP is not enabled (some fluctuations observed during testing). When enabling 64K mTHP, there is a significant improvement of the page fault latency. [1] https://lore.kernel.org/all/f1783ff0-65bd-4b2b-8952-52b6822a0835@redhat.com/ This patch (of 6): Add large folio mapping establishment support for finish_fault() as a preparation, to support multi-size THP allocation of anonymous shmem pages in the following patches. Keep the same behavior (per-page fault) for non-anon shmem to avoid inflating the RSS unintentionally, and we can discuss what size of mapping to build when extending mTHP to control non-anon shmem in the future. [baolin.wang@linux.alibaba.com: avoid going beyond the PMD pagetable size] Link: https://lkml.kernel.org/r/b0e6a8b1-a32c-459e-ae67-fde5d28773e6@linux.alibaba.com [baolin.wang@linux.alibaba.com: use 'PTRS_PER_PTE' instead of 'PTRS_PER_PTE - 1'] Link: https://lkml.kernel.org/r/e1f5767a-2c9b-4e37-afe6-1de26fe54e41@linux.alibaba.com Link: https://lkml.kernel.org/r/cover.1718090413.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/3a190892355989d42f59cf9f2f98b94694b0d24d.1718090413.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Zi Yan Reviewed-by: Kefeng Wang Cc: Daniel Gomez Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Lance Yang Cc: Pankaj Raghav Cc: Ryan Roberts Cc: Yang Shi Cc: Barry Song Signed-off-by: Andrew Morton commit 29e9412b250e51d0d11a57907c06b166a14e6676 Author: Matthew Wilcox (Oracle) Date: Fri May 31 04:29:25 2024 +0100 mm/memory-failure: stop setting the folio error flag Nobody checks the error flag any more, so setting it accomplishes nothing. Remove the obsolete parts of this comment; it hasn't been true since errseq_t was used to track writeback errors in 2017. Link: https://lkml.kernel.org/r/20240531032938.2712870-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Oscar Salvador Acked-by: Miaohe Lin Signed-off-by: Andrew Morton commit ba518f4d4b84c2c99fd03e77479e5c7f6767faf6 Author: Huang Ying Date: Fri May 31 16:12:30 2024 +0800 mm,swap: simplify VMA based swap readahead window calculation Replace PFNs with addresses in readahead window calculation. This simplified the logic and reduce the code line number. No functionality change is expected. Link: https://lkml.kernel.org/r/20240531081230.310128-4-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Hugh Dickins Cc: Alistair Popple Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Mel Gorman Cc: Miaohe Lin Cc: Minchan Kim Cc: Ryan Roberts Cc: Yang Shi Cc: Yu Zhao Cc: Kairui Song Cc: Barry Song Cc: Chris Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit dce08dd2e86b600d2c53b0d6cdb851f94fb455b2 Author: Huang Ying Date: Fri May 31 16:12:29 2024 +0800 mm,swap: remove struct vma_swap_readahead When VMA based swap readahead is introduced in commit ec560175c0b6 ("mm, swap: VMA based swap readahead"), "struct vma_swap_readahead" is defined to describe the readahead window. Because we wanted to save the PTE entries in the struct at that time. But after commit 4f8fcf4ced0b ("mm/swap: swap_vma_readahead() do the pte_offset_map()"), we no longer save PTE entries in the struct. The size of the struct becomes so small, that it's better to use the fields of the struct directly. This can simplify the code to improve the code readability. The line number of source code reduces too. No functionality change is expected in this patch. Link: https://lkml.kernel.org/r/20240531081230.310128-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Hugh Dickins Cc: Alistair Popple Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Mel Gorman Cc: Miaohe Lin Cc: Minchan Kim Cc: Ryan Roberts Cc: Yang Shi Cc: Yu Zhao Cc: Kairui Song Cc: Barry Song Cc: Chris Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 653ea80e666b5c4b157740f600ca13ad7fe22033 Author: Huang Ying Date: Fri May 31 16:12:28 2024 +0800 mm,swap: fix a theoretical underflow in readahead window calculation Patch series "mm,swap: cleanup VMA based swap readahead window calculation". When VMA based swap readahead is introduced in commit ec560175c0b6 ("mm, swap: VMA based swap readahead"), "struct vma_swap_readahead" is defined to describe the readahead window. Because we wanted to save the PTE entries in the struct at that time. But after commit 4f8fcf4ced0b ("mm/swap: swap_vma_readahead() do the pte_offset_map()"), we no longer save PTE entries in the struct. The size of the struct becomes so small, that it's better to use the fields of the struct directly. This can simplify the code to improve the code readability. The line number of source code reduces too. A theoretical underflow issue and some related code cleanup is done in the series too. This patch (of 3): In swap readahead window calculation, if the fault PFN is smaller than the readahead window size, underflow may occurs. This is only possible in theory, because the start of the virtual address space will not be used for anonymous pages in practice. Even if underflow occurs, there will be no functional bugs. In the worst cases, some swap entries may be swapped in incorrectly and some pages may be allocate on the wrong nodes. Anyway, we still needs to fix the issue via some underflow checking. Link: https://lkml.kernel.org/r/20240531081230.310128-1-ying.huang@intel.com Link: https://lkml.kernel.org/r/20240531081230.310128-2-ying.huang@intel.com Fixes: ec560175c0b6 ("mm, swap: VMA based swap readahead") Signed-off-by: "Huang, Ying" Cc: Hugh Dickins Cc: Alistair Popple Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Mel Gorman Cc: Miaohe Lin Cc: Minchan Kim Cc: Ryan Roberts Cc: Yang Shi Cc: Yu Zhao Cc: Kairui Song Cc: Barry Song Cc: Chris Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 37a4b34ac92aae258a08c23f255356746ded0571 Author: Jiapeng Chong Date: Fri May 31 17:16:43 2024 +0800 mm: userfaultfd: use swap() in double_pt_lock() Use existing swap() function rather than duplicating its implementation. ./mm/userfaultfd.c:1006:13-14: WARNING opportunity for swap() Link: https://lkml.kernel.org/r/20240531091643.67778-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jiapeng Chong Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9266 Reviewed-by: David Hildenbrand Reviewed-by: Wei Yang Signed-off-by: Andrew Morton commit fe91eca6802c139367ee4e4a09907fe929bb552f Author: Dev Jain Date: Fri May 31 18:11:44 2024 +0530 mm: sparse: consistently use _nr Consistently name the return variable with an _nr suffix, whenever calling pfn_to_section_nr(), to avoid confusion with a (struct mem_section *). Link: https://lkml.kernel.org/r/20240531124144.240399-1-dev.jain@arm.com Signed-off-by: Dev Jain Reviewed-by: Anshuman Khandual Acked-by: Oscar Salvador Signed-off-by: Andrew Morton commit 7bc131c56853cd6c1d51d8cfc1befc0a23278395 Author: Oscar Salvador Date: Mon May 27 06:45:23 2024 +0200 arch/x86: do not explicitly clear Reserved flag in free_pagetable In free_pagetable() we use the non-atomic version for clearing the PageReserved bit from the page. free_pagetable() will either call free_reserved_page() or put_page_bootmem(), which will eventually end up calling free_reserved_page(), and in there we already clear the PageReserved flag. Link: https://lkml.kernel.org/r/20240527044523.29207-1-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Dave Hansen Signed-off-by: Andrew Morton commit d39b6af2189095f2c411a0a261d44e0ac4be3ad1 Author: Peter Xu Date: Mon May 27 11:48:55 2024 -0400 mm: drop leftover comment references to pxx_huge() pxx_huge() has been removed in recent commit 9636f055dae1 ("mm/treewide: remove pXd_huge()"), however there are still three comments referencing the API that got overlooked. Remove them. Link: https://lkml.kernel.org/r/20240527154855.528816-1-peterx@redhat.com Signed-off-by: Peter Xu Reported-by: Christophe Leroy Reviewed-by: David Hildenbrand Cc: Jason Gunthorpe Signed-off-by: Andrew Morton commit 7005e7ec28855f3aa8355c39a7786d859ec92888 Author: Brian Johannesmeyer Date: Tue May 28 12:48:07 2024 +0200 kmsan: introduce test_unpoison_memory() Add a regression test to ensure that kmsan_unpoison_memory() works the same as an unpoisoning operation added by the instrumentation. The test has two subtests: one that checks the instrumentation, and one that checks kmsan_unpoison_memory(). Each subtest initializes the first byte of a 4-byte buffer, then checks that the other 3 bytes are uninitialized. [glider@google.com: change description, remove comment about failing test case] Link: https://lkml.kernel.org/r/20240528104807.738758-2-glider@google.com Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/lkml/20240524232804.1984355-1-bjohannesmeyer@gmail.com/T/ Signed-off-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Kees Cook Cc: Marco Elver Signed-off-by: Andrew Morton commit f56810c94ca828ab5c223a3528cc44c823cace16 Author: Uros Bizjak Date: Tue May 28 16:43:14 2024 +0200 mm/vmalloc: use __this_cpu_try_cmpxchg() in preload_this_cpu_lock() Use __this_cpu_try_cmpxchg() instead of __this_cpu_cmpxchg (*ptr, old, new) == old in preload_this_cpu_lock(). x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg. The generated code improves from: 4bb6: 48 85 f6 test %rsi,%rsi 4bb9: 0f 84 10 fa ff ff je 45cf <...> 4bbf: 4c 89 e8 mov %r13,%rax 4bc2: 65 48 0f b1 35 00 00 cmpxchg %rsi,%gs:0x0(%rip) 4bc9: 00 00 4bcb: 48 85 c0 test %rax,%rax 4bce: 0f 84 fb f9 ff ff je 45cf <...> to: 4bb6: 48 85 f6 test %rsi,%rsi 4bb9: 0f 84 10 fa ff ff je 45cf <...> 4bbf: 4c 89 e8 mov %r13,%rax 4bc2: 65 48 0f b1 35 00 00 cmpxchg %rsi,%gs:0x0(%rip) 4bc9: 00 00 4bcb: 0f 84 fe f9 ff ff je 45cf <...> No functional change intended. Link: https://lkml.kernel.org/r/20240528144345.5980-2-ubizjak@gmail.com Signed-off-by: Uros Bizjak Reviewed-by: Uladzislau Rezki (Sony) Cc: Christoph Hellwig Cc: Lorenzo Stoakes Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Signed-off-by: Andrew Morton commit 21664442be1bf79094dd9d21b8833acbfbd80ea7 Author: Uros Bizjak Date: Tue May 28 16:43:13 2024 +0200 percpu: add __this_cpu_try_cmpxchg() Add __this_cpu_try_cmpxchg() version of the percpu op. Link: https://lkml.kernel.org/r/20240528144345.5980-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Reviewed-by: Uladzislau Rezki (Sony) Acked-by: Dennis Zhou Cc: Christoph Hellwig Cc: Lorenzo Stoakes Cc: Tejun Heo Cc: Christoph Lameter Signed-off-by: Andrew Morton commit fefc6e6631ff43427e81f08c8e49f7787ff0213a Author: Shakeel Butt Date: Tue May 28 09:40:50 2024 -0700 memcg: rearrange fields of mem_cgroup_per_node Kernel test robot reported [1] performance regression for will-it-scale test suite's page_fault2 test case for the commit 70a64b7919cb ("memcg: dynamically allocate lruvec_stats"). After inspection it seems like the commit has unintentionally introduced false cache sharing. After the commit the fields of mem_cgroup_per_node which get read on the performance critical path share the cacheline with the fields which get updated often on LRU page allocations or deallocations. This has caused contention on that cacheline and the workloads which manipulates a lot of LRU pages are regressed as reported by the test report. The solution is to rearrange the fields of mem_cgroup_per_node such that the false sharing is eliminated. Let's move all the read only pointers at the start of the struct, followed by memcg-v1 only fields and at the end fields which get updated often. Experiment setup: Ran fallocate1, fallocate2, page_fault1, page_fault2 and page_fault3 from the will-it-scale test suite inside a three level memcg with /tmp mounted as tmpfs on two different machines, one a single numa node and the other one, two node machine. $ ./[testcase]_processes -t $NR_CPUS -s 50 Results for single node, 52 CPU machine: Testcase base with-patch fallocate1 1031081 1431291 (38.80 %) fallocate2 1029993 1421421 (38.00 %) page_fault1 2269440 3405788 (50.07 %) page_fault2 2375799 3572868 (50.30 %) page_fault3 28641143 28673950 ( 0.11 %) Results for dual node, 80 CPU machine: Testcase base with-patch fallocate1 2976288 3641185 (22.33 %) fallocate2 2979366 3638181 (22.11 %) page_fault1 6221790 7748245 (24.53 %) page_fault2 6482854 7847698 (21.05 %) page_fault3 28804324 28991870 ( 0.65 %) Link: https://lkml.kernel.org/r/20240528164050.2625718-1-shakeel.butt@linux.dev Fixes: 70a64b7919cb ("memcg: dynamically allocate lruvec_stats") Signed-off-by: Shakeel Butt Reported-by: kernel test robot Reviewed-by: Yosry Ahmed Reviewed-by: Roman Gushchin Cc: Feng Tang Cc: "Huang, Ying" Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 16540dae959d862909716d5c854e9b3aee285609 Author: Sidhartha Kumar Date: Thu May 30 10:14:27 2024 -0700 mm/hugetlb: mm/memory_hotplug: use a folio in scan_movable_pages() By using a folio in scan_movable_pages() we convert the last user of the page-based hugetlb information macro functions to the folio version. After this conversion, we can safely remove the page-based definitions from include/linux/hugetlb.h. Link: https://lkml.kernel.org/r/20240530171427.242018-1-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 508758960b8d89fa464abce2f9897973c8e8d4f0 Author: Chuanhua Han Date: Wed May 29 20:28:24 2024 +1200 mm: swap: entirely map large folios found in swapcache When a large folio is found in the swapcache, the current implementation requires calling do_swap_page() nr_pages times, resulting in nr_pages page faults. This patch opts to map the entire large folio at once to minimize page faults. Additionally, redundant checks and early exits for ARM64 MTE restoring are removed. Link: https://lkml.kernel.org/r/20240529082824.150954-7-21cnbao@gmail.com Signed-off-by: Chuanhua Han Co-developed-by: Barry Song Signed-off-by: Barry Song Reviewed-by: Ryan Roberts Reviewed-by: "Huang, Ying" Cc: Andreas Larsson Cc: Baolin Wang Cc: Chris Li Cc: Christoph Hellwig Cc: David Hildenbrand Cc: "David S. Miller" Cc: Gao Xiang Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kairui Song Cc: Khalid Aziz Cc: Len Brown Cc: Matthew Wilcox (Oracle) Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Suren Baghdasaryan Cc: Yosry Ahmed Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 4c3f966436873435600b00e5c2c6c8933607e236 Author: Chuanhua Han Date: Wed May 29 20:28:23 2024 +1200 mm: swap: make should_try_to_free_swap() support large-folio The function should_try_to_free_swap() operates under the assumption that swap-in always occurs at the normal page granularity, i.e., folio_nr_pages() = 1. However, in reality, for large folios, add_to_swap_cache() will invoke folio_ref_add(folio, nr). To accommodate large folio swap-in, this patch eliminates this assumption. Link: https://lkml.kernel.org/r/20240529082824.150954-6-21cnbao@gmail.com Signed-off-by: Chuanhua Han Co-developed-by: Barry Song Signed-off-by: Barry Song Acked-by: Chris Li Reviewed-by: Ryan Roberts Reviewed-by: "Huang, Ying" Reviewed-by: David Hildenbrand Cc: Andreas Larsson Cc: Baolin Wang Cc: Christoph Hellwig Cc: "David S. Miller" Cc: Gao Xiang Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kairui Song Cc: Khalid Aziz Cc: Len Brown Cc: Matthew Wilcox (Oracle) Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Suren Baghdasaryan Cc: Yosry Ahmed Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 29f252cdc293f4a50b5d3dcbed53701d8444614d Author: Barry Song Date: Wed May 29 20:28:22 2024 +1200 mm: introduce arch_do_swap_page_nr() which allows restore metadata for nr pages Should do_swap_page() have the capability to directly map a large folio, metadata restoration becomes necessary for a specified number of pages denoted as nr. It's important to highlight that metadata restoration is solely required by the SPARC platform, which, however, does not enable THP_SWAP. Consequently, in the present kernel configuration, there exists no practical scenario where users necessitate the restoration of nr metadata. Platforms implementing THP_SWAP might invoke this function with nr values exceeding 1, subsequent to do_swap_page() successfully mapping an entire large folio. Nonetheless, their arch_do_swap_page_nr() functions remain empty. Link: https://lkml.kernel.org/r/20240529082824.150954-5-21cnbao@gmail.com Signed-off-by: Barry Song Reviewed-by: Ryan Roberts Reviewed-by: Khalid Aziz Cc: "David S. Miller" Cc: Andreas Larsson Cc: Baolin Wang Cc: Chris Li Cc: Christoph Hellwig Cc: Chuanhua Han Cc: David Hildenbrand Cc: Gao Xiang Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kairui Song Cc: Len Brown Cc: Matthew Wilcox (Oracle) Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Suren Baghdasaryan Cc: Yosry Ahmed Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 3f9abcaa3e9c3910893ccbe6085aa0452e72896d Author: Barry Song Date: Wed May 29 20:28:21 2024 +1200 mm: introduce pte_move_swp_offset() helper which can move offset bidirectionally There could arise a necessity to obtain the first pte_t from a swap pte_t located in the middle. For instance, this may occur within the context of do_swap_page(), where a page fault can potentially occur in any PTE of a large folio. To address this, the following patch introduces pte_move_swp_offset(), a function capable of bidirectional movement by a specified delta argument. Consequently, pte_next_swp_offset() will directly invoke it with delta = 1. Link: https://lkml.kernel.org/r/20240529082824.150954-4-21cnbao@gmail.com Signed-off-by: Barry Song Suggested-by: "Huang, Ying" Reviewed-by: Ryan Roberts Reviewed-by: "Huang, Ying" Cc: Andreas Larsson Cc: Baolin Wang Cc: Chris Li Cc: Christoph Hellwig Cc: Chuanhua Han Cc: David Hildenbrand Cc: "David S. Miller" Cc: Gao Xiang Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kairui Song Cc: Khalid Aziz Cc: Len Brown Cc: Matthew Wilcox (Oracle) Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Suren Baghdasaryan Cc: Yosry Ahmed Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 54f7a49c20ebb5189980c53e6e66709d22bee572 Author: Barry Song Date: Wed May 29 20:28:20 2024 +1200 mm: remove the implementation of swap_free() and always use swap_free_nr() To streamline maintenance efforts, we propose removing the implementation of swap_free(). Instead, we can simply invoke swap_free_nr() with nr set to 1. swap_free_nr() is designed with a bitmap consisting of only one long, resulting in overhead that can be ignored for cases where nr equals 1. A prime candidate for leveraging swap_free_nr() lies within kernel/power/swap.c. Implementing this change facilitates the adoption of batch processing for hibernation. Link: https://lkml.kernel.org/r/20240529082824.150954-3-21cnbao@gmail.com Signed-off-by: Barry Song Suggested-by: "Huang, Ying" Reviewed-by: "Huang, Ying" Acked-by: Chris Li Reviewed-by: Ryan Roberts Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Len Brown Cc: Hugh Dickins Cc: Christoph Hellwig Cc: Andreas Larsson Cc: Baolin Wang Cc: Chuanhua Han Cc: David Hildenbrand Cc: "David S. Miller" Cc: Gao Xiang Cc: Johannes Weiner Cc: Kairui Song Cc: Khalid Aziz Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Cc: Yosry Ahmed Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit ebfba0045176cb013f49cb3e5bd9f0b16eba203c Author: Chuanhua Han Date: Wed May 29 20:28:19 2024 +1200 mm: swap: introduce swap_free_nr() for batched swap_free() Patch series "large folios swap-in: handle refault cases first", v5. This patchset is extracted from the large folio swapin series[1], primarily addressing the handling of scenarios involving large folios in the swap cache. Currently, it is particularly focused on addressing the refaulting of mTHP, which is still undergoing reclamation. This approach aims to streamline code review and expedite the integration of this segment into the MM tree. It relies on Ryan's swap-out series[2], leveraging the helper function swap_pte_batch() introduced by that series. Presently, do_swap_page only encounters a large folio in the swap cache before the large folio is released by vmscan. However, the code should remain equally useful once we support large folio swap-in via swapin_readahead(). This approach can effectively reduce page faults and eliminate most redundant checks and early exits for MTE restoration in recent MTE patchset[3]. The large folio swap-in for SWP_SYNCHRONOUS_IO and swapin_readahead() will be split into separate patch sets and sent at a later time. [1] https://lore.kernel.org/linux-mm/20240304081348.197341-1-21cnbao@gmail.com/ [2] https://lore.kernel.org/linux-mm/20240408183946.2991168-1-ryan.roberts@arm.com/ [3] https://lore.kernel.org/linux-mm/20240322114136.61386-1-21cnbao@gmail.com/ This patch (of 6): While swapping in a large folio, we need to free swaps related to the whole folio. To avoid frequently acquiring and releasing swap locks, it is better to introduce an API for batched free. Furthermore, this new function, swap_free_nr(), is designed to efficiently handle various scenarios for releasing a specified number, nr, of swap entries. Link: https://lkml.kernel.org/r/20240529082824.150954-1-21cnbao@gmail.com Link: https://lkml.kernel.org/r/20240529082824.150954-2-21cnbao@gmail.com Signed-off-by: Chuanhua Han Co-developed-by: Barry Song Signed-off-by: Barry Song Reviewed-by: Ryan Roberts Acked-by: Chris Li Reviewed-by: "Huang, Ying" Cc: Baolin Wang Cc: David Hildenbrand Cc: Gao Xiang Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kairui Song Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Cc: Yosry Ahmed Cc: Yu Zhao Cc: Zi Yan Cc: Andreas Larsson Cc: Christoph Hellwig Cc: "David S. Miller" Cc: Khalid Aziz Cc: Len Brown Cc: Pavel Machek Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton commit 15c0536fb57fd989e24335020a443486bac01dac Author: Yosry Ahmed Date: Mon May 6 21:13:33 2024 +0000 mm: rmap: abstract updating per-node and per-memcg stats A lot of intricacies go into updating the stats when adding or removing mappings: which stat index to use and which function. Abstract this away into a new static helper in rmap.c, __folio_mod_stat(). This adds an unnecessary call to folio_test_anon() in __folio_add_anon_rmap() and __folio_add_file_rmap(). However, the folio struct should already be in the cache at this point, so it shouldn't cause any noticeable overhead. No functional change intended. [hughd@google.com: fix /proc/meminfo] Link: https://lkml.kernel.org/r/49914517-dfc7-e784-fde0-0e08fafbecc2@google.com Link: https://lkml.kernel.org/r/20240506211333.346605-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Signed-off-by: Hugh Dickins Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 5a3f572a592850e8b0a4a8668781820391a2e2e7 Author: Yosry Ahmed Date: Fri May 24 03:38:18 2024 +0000 mm: zswap: make same_filled functions folio-friendly A variable name 'page' is used in zswap_is_folio_same_filled() and zswap_fill_page() to point at the kmapped data in a folio. Use 'data' instead to avoid confusion and stop it from showing up when searching for 'page' references in mm/zswap.c. While we are at it, move the kmap/kunmap calls into zswap_fill_page(), make it take in a folio, and rename it to zswap_fill_folio(). Link: https://lkml.kernel.org/r/20240524033819.1953587-4-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: Chengming Zhou Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Nhat Pham Signed-off-by: Andrew Morton commit 30a28baafc882fc2cf0f512256081dba03218c8f Author: Yosry Ahmed Date: Fri May 24 03:38:17 2024 +0000 mm :zswap: use kmap_local_folio() in zswap_load() Eliminate the last explicit 'struct page' reference in mm/zswap.c. Link: https://lkml.kernel.org/r/20240524033819.1953587-3-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: Chengming Zhou Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Nhat Pham Signed-off-by: Andrew Morton commit 5d19f5de673bdee5e711c85737dd5ce5d438d8a3 Author: Yosry Ahmed Date: Fri May 24 03:38:16 2024 +0000 mm: zswap: use sg_set_folio() in zswap_{compress/decompress}() Patch series "mm: zswap: trivial folio conversions". Some trivial folio conversions in zswap code. This patch (of 3): sg_set_folio() is equivalent to sg_set_page() for order-0 folios, which are the only ones supported by zswap. Now zswap_decompress() can take in a folio directly. Link: https://lkml.kernel.org/r/20240524033819.1953587-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20240524033819.1953587-2-yosryahmed@google.com Signed-off-by: Yosry Ahmed Reviewed-by: Chengming Zhou Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Nhat Pham Signed-off-by: Andrew Morton commit 906632843d00a4a42072b19c423b30a9e7adef3c Author: Kefeng Wang Date: Fri May 24 13:28:43 2024 +0800 mm: remove MIGRATE_SYNC_NO_COPY mode Commit 2916ecc0f9d4 ("mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY") introduce a new MIGRATE_SYNC_NO_COPY mode to allow to offload the copy to a device DMA engine, which is only used __migrate_device_pages() to decide whether or not copy the old page, and the MIGRATE_SYNC_NO_COPY mode only set in hmm, as the MIGRATE_SYNC_NO_COPY set is removed by previous cleanup, it seems that we could remove the unnecessary MIGRATE_SYNC_NO_COPY. Link: https://lkml.kernel.org/r/20240524052843.182275-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Jane Chu Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Tony Luck Cc: Vishal Moola (Oracle) Cc: Zi Yan Signed-off-by: Andrew Morton commit 940d6683c79950b21b3762124eabfa9b2f6fee96 Author: Kefeng Wang Date: Fri May 24 13:28:42 2024 +0800 mm: migrate: remove migrate_folio_extra() migrate_folio_extra() is only called in migrate.c now, convert it a static function and take a new src_private argument which could be shared by migrate_folio() and filemap_migrate_folio() to simplify code a bit. Link: https://lkml.kernel.org/r/20240524052843.182275-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Jane Chu Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Tony Luck Cc: Vishal Moola (Oracle) Cc: Zi Yan Signed-off-by: Andrew Morton commit 15b0c79cfadad6f84ad773b9e4bd95e8a93a0846 Author: Kefeng Wang Date: Fri May 24 13:28:41 2024 +0800 mm: migrate_device: unify migrate folio for MIGRATE_SYNC_NO_COPY The __migrate_device_pages() won't copy page so MIGRATE_SYNC_NO_COPY passed into migrate_folio()/migrate_folio_extra(), actually a easy way is just to call folio_migrate_mapping()/folio_migrate_flags(), converting it to unify and simplify the migrate device pages, which also remove the only call for MIGRATE_SYNC_NO_COPY. Link: https://lkml.kernel.org/r/20240524052843.182275-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Jane Chu Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Muchun Song Cc: Naoya Horiguchi Cc: Tony Luck Cc: Vishal Moola (Oracle) Cc: Zi Yan Signed-off-by: Andrew Morton commit 6aaaef5b6fe3f5dd5049f66251e89c6d5456b987 Author: Kefeng Wang Date: Fri May 24 13:28:40 2024 +0800 mm: migrate_device: use a newfolio in __migrate_device_pages() Use a newfolio instead of newpage and convert to more folio api in __migrate_device_pages(). Link: https://lkml.kernel.org/r/20240524052843.182275-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Miaohe Lin Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Muchun Song Cc: Naoya Horiguchi Cc: Tony Luck Cc: Zi Yan Signed-off-by: Andrew Morton commit 01878f10f8e01e6ca1040ccc19b76e10ff7678ad Author: Kefeng Wang Date: Fri May 24 13:28:39 2024 +0800 mm: migrate: simplify __buffer_migrate_folio() Patch series "mm: cleanup MIGRATE_SYNC_NO_COPY mode". Commit 2916ecc0f9d4 ("mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY") introduce a new MIGRATE_SYNC_NO_COPY mode to allow to offload the copy to a device DMA engine, which is only used __migrate_device_pages() to decide whether or not copy the old page, and the MIGRATE_SYNC_NO_COPY mode only used in hmm, a easy way is just to call the folio_migrate_mapping() and folio_migrate_flags(), which help to remove the MIGRATE_SYNC_NO_COPY mode. This patch (of 5): Use filemap_migrate_folio() helper to simplify __buffer_migrate_folio(). Link: https://lkml.kernel.org/r/20240524052843.182275-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20240524052843.182275-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Miaohe Lin Cc: Alistair Popple Cc: Benjamin LaHaise Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jérôme Glisse Cc: Jiaqi Yan Cc: Muchun Song Cc: Naoya Horiguchi Cc: Tony Luck Cc: Zi Yan Signed-off-by: Andrew Morton commit 1df07243483c1a32c8f2f93b06dc52a583a4dd1c Author: Kefeng Wang Date: Fri May 24 13:36:18 2024 +0800 rmap: remove DEFINE_PAGE_VMA_WALK() This are no users since commit 40d707f33db5 ("mm/ksm: use folio in write_protect_page"), so remove DEFINE_PAGE_VMA_WALK(). Link: https://lkml.kernel.org/r/20240524053618.208895-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: David Hildenbrand Cc: Alex Shi Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 06668257a355a05483c188e35a18c80471d06987 Author: Matthew Wilcox (Oracle) Date: Fri May 24 19:18:10 2024 +0100 mm: remove page_mapping() All callers are now converted, delete this compatibility wrapper. Also fix up some comments which referred to page_mapping. Link: https://lkml.kernel.org/r/20240423225552.4113447-7-willy@infradead.org Link: https://lkml.kernel.org/r/20240524181813.698813-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Cc: Eric Biggers Cc: Sidhartha Kumar Signed-off-by: Andrew Morton commit ffc3c8a631eeadd0de63605cecfb6ba544245352 Author: Kefeng Wang Date: Fri May 24 09:49:50 2024 +0800 mm: memcontrol: remove page_memcg() The page_memcg() only called by mod_memcg_page_state(), so squash it to cleanup page_memcg(). Link: https://lkml.kernel.org/r/20240524014950.187805-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit 1e25501dbcee8fdfe687ec66e773d04edd1807af Author: Yifei Li Date: Mon May 13 15:58:30 2024 +0800 mm/memory-failure: use helper llist_for_each_entry() Change the llist_for_each_entry_safe function to the llist_for_each_entry function and delete the next variable. Because the linked list is not modified,the llist_for_each_entry_safe function is not required. No functional changes are intended. Link: https://lkml.kernel.org/r/20240513075830.2611-1-liyifei28@huawei.com Signed-off-by: Yifei Li Acked-by: Miaohe Lin Cc: Jiaqi Yan Cc: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Cc: Ryan Roberts Cc: Shiyang Ruan Signed-off-by: Andrew Morton commit 3a103b5315b78a0d58fa8dc95d70d9b907400f5e Author: Donet Tom Date: Thu May 23 01:39:05 2024 -0500 selftest: mm: Test if hugepage does not get leaked during __bio_release_pages() Commit 1b151e2435fc ("block: Remove special-casing of compound pages") caused a change in behaviour when releasing the pages if the buffer does not start at the beginning of the page. This was because the calculation of the number of pages to release was incorrect. This was fixed by commit 38b43539d64b ("block: Fix page refcounts for unaligned buffers in __bio_release_pages()"). We pin the user buffer during direct I/O writes. If this buffer is a hugepage, bio_release_page() will unpin it and decrement all references and pin counts at ->bi_end_io. However, if any references to the hugepage remain post-I/O, the hugepage will not be freed upon unmap, leading to a memory leak. This patch verifies that a hugepage, used as a user buffer for DIO operations, is correctly freed upon unmapping, regardless of whether the offsets are aligned or unaligned w.r.t page boundary. Test Result Fail Scenario (Without the fix) -------------------------------------------------------- []# ./hugetlb_dio TAP version 13 1..4 No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 1 : Huge pages freed successfully ! No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 2 : Huge pages freed successfully ! No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 3 : Huge pages freed successfully ! No. Free pages before allocation : 7 No. Free pages after munmap : 6 not ok 4 : Huge pages not freed! Totals: pass:3 fail:1 xfail:0 xpass:0 skip:0 error:0 Test Result PASS Scenario (With the fix) --------------------------------------------------------- []#./hugetlb_dio TAP version 13 1..4 No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 1 : Huge pages freed successfully ! No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 2 : Huge pages freed successfully ! No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 3 : Huge pages freed successfully ! No. Free pages before allocation : 7 No. Free pages after munmap : 7 ok 4 : Huge pages freed successfully ! Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0 [donettom@linux.ibm.com: address review comments from Muhammad] Link: https://lkml.kernel.org/r/20240604132801.23377-1-donettom@linux.ibm.com [donettom@linux.ibm.com: add this test to run_vmtests.sh] Link: https://lkml.kernel.org/r/20240607182000.6494-1-donettom@linux.ibm.com Link: https://lkml.kernel.org/r/20240523063905.3173-1-donettom@linux.ibm.com Fixes: 38b43539d64b ("block: Fix page refcounts for unaligned buffers in __bio_release_pages()") Signed-off-by: Donet Tom Signed-off-by: Ritesh Harjani (IBM) Co-developed-by: Ritesh Harjani (IBM) Reviewed-by: Muhammad Usama Anjum Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Mike Rapoport (IBM) Cc: Muchun Song Cc: Ritesh Harjani (IBM) Cc: Shuah Khan Cc: Tony Battersby Cc: Jens Axboe Signed-off-by: Andrew Morton commit a831896a0c35356c5b6eef2b7f61b8ec0a5720ed Author: Jeff Johnson Date: Mon May 13 12:37:41 2024 -0700 mm/zsmalloc: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in mm/zsmalloc.o Link: https://lkml.kernel.org/r/20240513-mm-md-v1-4-8c20e7d26842@quicinc.com Signed-off-by: Jeff Johnson Reviewed-by: Sergey Senozhatsky Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit eed4c0e5e9f4b1c2ea32e820c8d5aaf0551bc6d5 Author: Jeff Johnson Date: Mon May 13 12:37:40 2024 -0700 mm/kfence: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in mm/kfence/kfence_test.o Link: https://lkml.kernel.org/r/20240513-mm-md-v1-3-8c20e7d26842@quicinc.com Signed-off-by: Jeff Johnson Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 669de9f2ea39a19088b1aa1831e354150f3138d8 Author: Jeff Johnson Date: Mon May 13 12:37:39 2024 -0700 mm/dmapool: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in mm/dmapool_test.o Link: https://lkml.kernel.org/r/20240513-mm-md-v1-2-8c20e7d26842@quicinc.com Signed-off-by: Jeff Johnson Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 2f57ced636bc3f9fb7c1f7d9888f7f13ae0e7074 Author: Jeff Johnson Date: Mon May 13 12:37:38 2024 -0700 mm/hwpoison: add MODULE_DESCRIPTION() Patch series "mm: add missing MODULE_DESCRIPTION() macros". This fixes the instances of "WARNING: modpost: missing MODULE_DESCRIPTION()" that I'm seeing in mm/. This patch (of 4): Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in mm/hwpoison-inject.o Link: https://lkml.kernel.org/r/20240513-mm-md-v1-0-8c20e7d26842@quicinc.com Link: https://lkml.kernel.org/r/20240513-mm-md-v1-1-8c20e7d26842@quicinc.com Signed-off-by: Jeff Johnson Acked-by: Miaohe Lin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 188f87f2648b13f5de17d5e068f18d317e0c1f98 Author: Eric Chanudet Date: Wed May 22 16:38:01 2024 -0400 mm/mm_init: use node's number of cpus in deferred_page_init_max_threads x86_64 is already using the node's cpu as maximum threads. Make that the default for all archs setting DEFERRED_STRUCT_PAGE_INIT. This returns to the behavior prior making the function arch-specific with commit ecd096506922 ("mm: make deferred init's max threads arch-specific"). Setting DEFERRED_STRUCT_PAGE_INIT and testing on a few arm64 platforms shows faster deferred_init_memmap completions: | | x13s | SA8775p-ride | Ampere R137-P31 | Ampere HR330 | | | Metal, 32GB | VM, 36GB | VM, 58GB | Metal, 128GB | | | 8cpus | 8cpus | 8cpus | 32cpus | |---------|-------------|--------------|-----------------|--------------| | threads | ms (%) | ms (%) | ms (%) | ms (%) | |---------|-------------|--------------|-----------------|--------------| | 1 | 108 (0%) | 72 (0%) | 224 (0%) | 324 (0%) | | cpus | 24 (-77%) | 36 (-50%) | 40 (-82%) | 56 (-82%) | Michael Ellerman reported: : On a machine here (1TB, 40 cores, 4KB pages) the existing code gives: : : [ 0.500124] node 2 deferred pages initialised in 210ms : [ 0.515790] node 3 deferred pages initialised in 230ms : [ 0.516061] node 0 deferred pages initialised in 230ms : [ 0.516522] node 7 deferred pages initialised in 230ms : [ 0.516672] node 4 deferred pages initialised in 230ms : [ 0.516798] node 6 deferred pages initialised in 230ms : [ 0.517051] node 5 deferred pages initialised in 230ms : [ 0.523887] node 1 deferred pages initialised in 240ms : : vs with the patch: : : [ 0.379613] node 0 deferred pages initialised in 90ms : [ 0.380388] node 1 deferred pages initialised in 90ms : [ 0.380540] node 4 deferred pages initialised in 100ms : [ 0.390239] node 6 deferred pages initialised in 100ms : [ 0.390249] node 2 deferred pages initialised in 100ms : [ 0.390786] node 3 deferred pages initialised in 110ms : [ 0.396721] node 5 deferred pages initialised in 110ms : [ 0.397095] node 7 deferred pages initialised in 110ms : : Which is a nice speedup. [echanude@redhat.com: v3] Link: https://lkml.kernel.org/r/20240528185455.643227-4-echanude@redhat.com Link: https://lkml.kernel.org/r/20240522203758.626932-4-echanude@redhat.com Signed-off-by: Eric Chanudet Tested-by: Michael Ellerman (powerpc) Reviewed-by: Baoquan He Acked-by: Alexander Gordeev Acked-by: Mike Rapoport (IBM) Cc: Andy Lutomirski Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 3577dbb192419e37b6f54aced8777b6c81cd03d4 Author: Mateusz Guzik Date: Wed May 22 01:43:21 2024 +0200 mm: batch unlink_file_vma calls in free_pgd_range Execs of dynamically linked binaries at 20-ish cores are bottlenecked on the i_mmap_rwsem semaphore, while the biggest singular contributor is free_pgd_range inducing the lock acquire back-to-back for all consecutive mappings of a given file. Tracing the count of said acquires while building the kernel shows: [1, 2) 799579 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [2, 3) 0 | | [3, 4) 3009 | | [4, 5) 3009 | | [5, 6) 326442 |@@@@@@@@@@@@@@@@@@@@@ | So in particular there were 326442 opportunities to coalesce 5 acquires into 1. Doing so increases execs per second by 4% (~50k to ~52k) when running the benchmark linked below. The lock remains the main bottleneck, I have not looked at other spots yet. Bench can be found here: http://apollo.backplane.com/DFlyMisc/doexec.c $ cc -O2 -o shared-doexec doexec.c $ ./shared-doexec $(nproc) Note this particular test makes sure binaries are separate, but the loader is shared. Stats collected on the patched kernel (+ "noinline") with: bpftrace -e 'kprobe:unlink_file_vma_batch_process { @ = lhist(((struct unlink_vma_file_batch *)arg0)->count, 0, 8, 1); }' Link: https://lkml.kernel.org/r/20240521234321.359501-1-mjguzik@gmail.com Signed-off-by: Mateusz Guzik Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1a3798dececa8cb26b9eee26840195ccc1a4d6c1 Author: Jane Chu Date: Fri May 24 15:53:06 2024 -0600 mm/memory-failure: send SIGBUS in the event of thp split fail While handling hwpoison in a THP page, it is possible that try_to_split_thp_page() fails. For example, when the THP page has been RDMA pinned. At this point, the kernel cannot isolate the poisoned THP page, all it could do is to send a SIGBUS to the user process with meaningful payload to give user-level recovery a chance. Link: https://lkml.kernel.org/r/20240524215306.2705454-6-jane.chu@oracle.com Signed-off-by: Jane Chu Reviewed-by: Oscar Salvador Acked-by: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 9b0ab153d76972a3bee4f363058ff06edf9255a3 Author: Jane Chu Date: Fri May 24 15:53:05 2024 -0600 mm/memory-failure: move hwpoison_filter() higher up Move hwpoison_filter() higher up as there is no need to spend a lot cycles only to find out later that the page is supposed to be skipped from hwpoison handling. Link: https://lkml.kernel.org/r/20240524215306.2705454-5-jane.chu@oracle.com Signed-off-by: Jane Chu Reviewed-by: Oscar Salvador Acked-by: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Signed-off-by: Andrew Morton commit b8b9488d50b7150bd4830dfff487e8d4ef6589ba Author: Jane Chu Date: Fri May 24 15:53:04 2024 -0600 mm/memory-failure: improve memory failure action_result messages Added two explicit MF_MSG messages describing failure in get_hwpoison_page. Attemped to document the definition of various action names, and made a few adjustment to the action_result() calls. Link: https://lkml.kernel.org/r/20240524215306.2705454-4-jane.chu@oracle.com Signed-off-by: Jane Chu Reviewed-by: Oscar Salvador Acked-by: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 66802526298ea0e7ae37e3d6b33c384dee737b42 Author: Jane Chu Date: Fri May 24 15:53:03 2024 -0600 mm/madvise: add MF_ACTION_REQUIRED to madvise(MADV_HWPOISON) The soft hwpoison injector via madvise(MADV_HWPOISON) operates in a synchrous way in a sense, the injector is also a process under test, and should it have the poisoned page mapped in its address space, it should get killed as much as in a real UE situation. Doing so align with what the madvise(2) man page says: " "This operation may result in the calling process receiving a SIGBUS and the page being unmapped." Link: https://lkml.kernel.org/r/20240524215306.2705454-3-jane.chu@oracle.com Signed-off-by: Jane Chu Reviewed-by: Oscar Salvador Acked-by: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Signed-off-by: Andrew Morton commit aa298fdf535d47df1279b12a0212deb2389f709a Author: Jane Chu Date: Fri May 24 15:53:02 2024 -0600 mm/memory-failure: try to send SIGBUS even if unmap failed Patch series "Enhance soft hwpoison handling and injection", v4. This series is aimed at the following enhancements: - Let one hwpoison injector, that is, madvise(MADV_HWPOISON) to behave more like as if a real UE occurred. Because the other two injectors such as hwpoison-inject and the 'einj' on x86 can't, and it seems to me we need a better simulation to real UE scenario. - For years, if the kernel is unable to unmap a hwpoisoned page, it send a SIGKILL instead of SIGBUS to prevent user process from potentially accessing the page again. But in doing so, the user process also lose important information: vaddr, for recovery. Fortunately, the kernel already has code to kill process re-accessing a hwpoisoned page, so remove the '!unmap_success' check. - Right now, if a thp page under GUP longterm pin is hwpoisoned, and kernel cannot split the thp page, memory-failure simply ignores the UE and returns. That's not ideal, it could deliver a SIGBUS with useful information for userspace recovery. This patch (of 5): For years when it comes down to kill a process due to hwpoison, a SIGBUS is delivered only if unmap has been successful. Otherwise, a SIGKILL is delivered. And the reason for that is to prevent the involved process from accessing the hwpoisoned page again. Since then a lot has changed, a hwpoisoned page is marked and upon being re-accessed, the memory-failure handler invokes kill_accessing_process() to kill the process immediately. So let's take out the '!unmap_success' factor and try to deliver SIGBUS if possible. Link: https://lkml.kernel.org/r/20240524215306.2705454-1-jane.chu@oracle.com Link: https://lkml.kernel.org/r/20240524215306.2705454-2-jane.chu@oracle.com Signed-off-by: Jane Chu Reviewed-by: Oscar Salvador Acked-by: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 6faa49d1c4404e0b949fd92f1e891c24870d4f86 Author: Bang Li Date: Wed May 22 14:12:04 2024 +0800 mm: use update_mmu_tlb_range() to simplify code Let us simplify the code by update_mmu_tlb_range(). Link: https://lkml.kernel.org/r/20240522061204.117421-4-libang.li@antgroup.com Signed-off-by: Bang Li Reviewed-by: Lance Yang Acked-by: David Hildenbrand Cc: Chris Zankel Cc: Huacai Chen Cc: Max Filippov Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Ryan Roberts Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 8f65aa32239f1c3f11b7a25bd5921223bafc5fed Author: Bang Li Date: Wed May 22 14:12:03 2024 +0800 mm: implement update_mmu_tlb() using update_mmu_tlb_range() Let's make update_mmu_tlb() simply a generic wrapper around update_mmu_tlb_range(). Only the latter can now be overridden by the architecture. We can now remove __HAVE_ARCH_UPDATE_MMU_TLB as well. Link: https://lkml.kernel.org/r/20240522061204.117421-3-libang.li@antgroup.com Signed-off-by: Bang Li Acked-by: David Hildenbrand Cc: Chris Zankel Cc: Huacai Chen Cc: Lance Yang Cc: Max Filippov Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Ryan Roberts Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 23b1b44e6c61295084284aa7d87db863a7802b92 Author: Bang Li Date: Wed May 22 14:12:02 2024 +0800 mm: add update_mmu_tlb_range() Patch series "Add update_mmu_tlb_range() to simplify code", v4. This series of commits mainly adds the update_mmu_tlb_range() to batch update tlb in an address range and implement update_mmu_tlb() using update_mmu_tlb_range(). After commit 19eaf44954df ("mm: thp: support allocation of anonymous multi-size THP"), We may need to batch update tlb of a certain address range by calling update_mmu_tlb() in a loop. Using the update_mmu_tlb_range(), we can simplify the code and possibly reduce the execution of some unnecessary code in some architectures. This patch (of 3): Add update_mmu_tlb_range(), we can batch update tlb of an address range. Link: https://lkml.kernel.org/r/20240522061204.117421-1-libang.li@antgroup.com Link: https://lkml.kernel.org/r/20240522061204.117421-2-libang.li@antgroup.com Signed-off-by: Bang Li Acked-by: David Hildenbrand Cc: Chris Zankel Cc: Huacai Chen Cc: Lance Yang Cc: Max Filippov Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Ryan Roberts Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit e4a4ba4154199ca9728c85589e2889389ef33c2a Author: Dev Jain Date: Wed May 22 12:34:35 2024 +0530 selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing Post FEAT_LPA2, the Aarch64 Linux kernel extends higher address support to 4K and 16K translation granules. To support testing this out, we need to do away with static initialization of page size, while still maintaining the nice array of testcases; this can be achieved by initializing and populating the array as a stack variable, and filling in the page size and hugepage size at runtime. Link: https://lkml.kernel.org/r/20240522070435.773918-3-dev.jain@arm.com Signed-off-by: Dev Jain Suggested-by: Andrew Morton Cc: Anshuman Khandual Cc: Kirill A. Shutemov Cc: Shuah Khan Signed-off-by: Andrew Morton commit 85e8bcb4190efb0b4443b637fd7a62ca2f05de6f Author: Dev Jain Date: Wed May 22 12:34:34 2024 +0530 selftests/mm: va_high_addr_switch: reduce test noise Patch series "Restructure va_high_addr_switch". The va_high_addr_switch memory selftest tests out some corner cases related to allocation and page/hugepage faulting around the switch boundary. Currently, the page size and hugepage size have been statically defined. Post FEAT_LPA2, the Aarch64 Linux kernel adds support for 4k and 16k translation granules on higher addresses; we restructure the test to support the same. In addition, we avoid invocation of the binary twice, in the shell script, to reduce test noise. This patch (of 2): When invoking the binary with "--run-hugetlb" flag, the testcases involving the base page are anyways going to be run. Therefore, remove duplication by invoking the binary only once. Link: https://lkml.kernel.org/r/20240522070435.773918-1-dev.jain@arm.com Link: https://lkml.kernel.org/r/20240522070435.773918-2-dev.jain@arm.com Signed-off-by: Dev Jain Cc: Anshuman Khandual Cc: Kirill A. Shutemov Cc: Shuah Khan Signed-off-by: Andrew Morton commit 6ad28e7e52e2bae76b1d3eb4466999d04d50db92 Author: David Hildenbrand Date: Wed May 22 14:57:13 2024 +0200 mm/rmap: sanity check that zeropages are not passed to RMAP Using insert_page() we might have previously ended up passing the zeropage into rmap code. Make sure that won't happen again. Note that we won't check the huge zeropage for now, which might still end up in RMAP code. Link: https://lkml.kernel.org/r/20240522125713.775114-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Dan Williams Cc: Vincent Donnefort Signed-off-by: Andrew Morton commit fce831c92092ad898d559e8657ec3e84e281160b Author: David Hildenbrand Date: Wed May 22 14:57:12 2024 +0200 mm/memory: cleanly support zeropage in vm_insert_page*(), vm_map_pages*() and vmf_insert_mixed() For now we only get the (small) zeropage mapped to user space in four cases (excluding VM_PFNMAP mappings, such as /proc/vmstat): (1) Read page faults in anonymous VMAs (MAP_PRIVATE|MAP_ANON): do_anonymous_page() will not refcount it and map it pte_mkspecial() (2) UFFDIO_ZEROPAGE on anonymous VMA or COW mapping of shmem (MAP_PRIVATE). mfill_atomic_pte_zeropage() will not refcount it and map it pte_mkspecial(). (3) KSM in mergeable VMA (anonymous VMA or COW mapping). cmp_and_merge_page() will not refcount it and map it pte_mkspecial(). (4) FSDAX as an optimization for holes. vmf_insert_mixed()->__vm_insert_mixed() might end up calling insert_page() without CONFIG_ARCH_HAS_PTE_SPECIAL, refcounting the zeropage and not mapping it pte_mkspecial(). With CONFIG_ARCH_HAS_PTE_SPECIAL, we'll call insert_pfn() where we will not refcount it and map it pte_mkspecial(). In case (4), we might not have VM_MIXEDMAP set: while fs/fuse/dax.c sets VM_MIXEDMAP, we removed it for ext4 fsdax in commit e1fb4a086495 ("dax: remove VM_MIXEDMAP for fsdax and device dax") and for XFS in commit e1fb4a086495 ("dax: remove VM_MIXEDMAP for fsdax and device dax"). Without CONFIG_ARCH_HAS_PTE_SPECIAL and with VM_MIXEDMAP, vm_normal_page() would currently return the zeropage. We'll refcount the zeropage when mapping and when unmapping. Without CONFIG_ARCH_HAS_PTE_SPECIAL and without VM_MIXEDMAP, vm_normal_page() would currently refuse to return the zeropage. So we'd refcount it when mapping but not when unmapping it ... do we have fsdax without CONFIG_ARCH_HAS_PTE_SPECIAL in practice? Hard to tell. Independent of that, we should never refcount the zeropage when we might be holding that reference for a long time, because even without an accounting imbalance we might overflow the refcount. As there is interest in using the zeropage also in other VM_MIXEDMAP mappings, let's add clean support for that in the cases where it makes sense: (A) Never refcount the zeropage when mapping it: In insert_page(), special-case the zeropage, do not refcount it, and use pte_mkspecial(). Don't involve insert_pfn(), adjusting insert_page() looks cleaner than branching off to insert_pfn(). (B) Never refcount the zeropage when unmapping it: In vm_normal_page(), also don't return the zeropage in a VM_MIXEDMAP mapping without CONFIG_ARCH_HAS_PTE_SPECIAL. Add a VM_WARN_ON_ONCE() sanity check if we'd ever return the zeropage, which could happen if someone forgets to set pte_mkspecial() when mapping the zeropage. Document that. (C) Allow the zeropage only where reasonable s390x never wants the zeropage in some processes running legacy KVM guests that make use of storage keys. So disallow that. Further, using the zeropage in COW mappings is unproblematic (just what we do for other COW mappings), because FAULT_FLAG_UNSHARE can just unshare it and GUP with FOLL_LONGTERM would work as expected. Similarly, mappings that can never have writable PTEs (implying no write faults) are also not problematic, because nothing could end up mapping the PTE writable by mistake later. But in case we could have writable PTEs, we'll only allow the zeropage in FSDAX VMAs, that are incompatible with GUP and are blocked there completely. We'll always require the zeropage to be mapped with pte_special(). GUP-fast will reject the zeropage that way, but GUP-slow will allow it. (Note that GUP does not refcount the zeropage with FOLL_PIN, because there were issues with overflowing the refcount in the past). Add sanity checks to can_change_pte_writable() and wp_page_reuse(), to catch early during testing if we'd ever find a zeropage unexpectedly in code that wants to upgrade write permissions. Convert the BUG_ON in vm_mixed_ok() to an ordinary check and simply fail with VM_FAULT_SIGBUS, like we do for other sanity checks. Drop the stale comment regarding reserved pages from insert_page(). Note that: * we won't mess with VM_PFNMAP mappings for now. remap_pfn_range() and vmf_insert_pfn() would allow the zeropage in some cases and not refcount it. * vmf_insert_pfn*() will reject the zeropage in VM_MIXEDMAP mappings and we'll leave that alone for now. People can simply use one of the other interfaces. * we won't bother with the huge zeropage for now. It's never PTE-mapped and also GUP does not special-case it yet. Link: https://lkml.kernel.org/r/20240522125713.775114-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Dan Williams Cc: Vincent Donnefort Signed-off-by: Andrew Morton commit 11b914ee9e3bda062262fa2f2ba08dbf4374d18e Author: David Hildenbrand Date: Wed May 22 14:57:11 2024 +0200 mm/memory: move page_count() check into validate_page_before_insert() Patch series "mm/memory: cleanly support zeropage in vm_insert_page*(), vm_map_pages*() and vmf_insert_mixed()", v2. There is interest in mapping zeropages via vm_insert_pages() [1] into MAP_SHARED mappings. For now, we only get zeropages in MAP_SHARED mappings via vmf_insert_mixed() from FSDAX code, and I think it's a bit shaky in some cases because we refcount the zeropage when mapping it but not necessarily always when unmapping it ... and we should actually never refcount it. It's all a bit tricky, especially how zeropages in MAP_SHARED mappings interact with GUP (FOLL_LONGTERM), mprotect(), write-faults and s390x forbidding the shared zeropage (rewrite [2] s now upstream). This series tries to take the careful approach of only allowing the zeropage where it is likely safe to use (which should cover the existing FSDAX use case and [1]), preventing that it could accidentally get mapped writable during a write fault, mprotect() etc, and preventing issues with FOLL_LONGTERM in the future with other users. Tested with a patch from Vincent that uses the zeropage in context of [1]. [1] https://lkml.kernel.org/r/20240430111354.637356-1-vdonnefort@google.com [2] https://lkml.kernel.org/r/20240411161441.910170-1-david@redhat.com This patch (of 3): We'll now also cover the case where insert_page() is called from __vm_insert_mixed(), which sounds like the right thing to do. Link: https://lkml.kernel.org/r/20240522125713.775114-2-david@redhat.com Signed-off-by: David Hildenbrand Cc: Dan Williams Cc: Vincent Donnefort Signed-off-by: Andrew Morton commit c66b0a052c6448d05289b82d789304f1361e995d Author: Muhammad Usama Anjum Date: Mon May 20 11:52:48 2024 -0700 selftests: mm: check return values Check return value and return error/skip the tests. Link: https://lkml.kernel.org/r/20240520185248.1801945-1-usama.anjum@collabora.com Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests") Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit 63818aaf0da8c036d600424ac961620dcdc13ce2 Author: Sidhartha Kumar Date: Mon May 20 15:44:07 2024 -0700 mm/hugetlb: remove {Set,Clear}Hpage macros All users have been converted to use the folio version of these macros, we can safely remove the page based interface. Link: https://lkml.kernel.org/r/20240520224407.110062-1-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit 7aad25b4b47ea5b67e1eb8be0db211b899dce60d Author: Kairui Song Date: Wed May 22 01:58:53 2024 +0800 mm/swap: reduce swap cache search space Currently we use one swap_address_space for every 64M chunk to reduce lock contention, this is like having a set of smaller swap files inside one swap device. But when doing swap cache look up or insert, we are still using the offset of the whole large swap device. This is OK for correctness, as the offset (key) is unique. But Xarray is specially optimized for small indexes, it creates the radix tree levels lazily to be just enough to fit the largest key stored in one Xarray. So we are wasting tree nodes unnecessarily. For 64M chunk it should only take at most 3 levels to contain everything. But if we are using the offset from the whole swap device, the offset (key) value will be way beyond 64M, and so will the tree level. Optimize this by using a new helper swap_cache_index to get a swap entry's unique offset in its own 64M swap_address_space. I see a ~1% performance gain in benchmark and actual workload with high memory pressure. Test with `time memhog 128G` inside a 8G memcg using 128G swap (ramdisk with SWP_SYNCHRONOUS_IO dropped, tested 3 times, results are stable. The test result is similar but the improvement is smaller if SWP_SYNCHRONOUS_IO is enabled, as swap out path can never skip swap cache): Before: 6.07user 250.74system 4:17.26elapsed 99%CPU (0avgtext+0avgdata 8373376maxresident)k 0inputs+0outputs (55major+33555018minor)pagefaults 0swaps After (1.8% faster): 6.08user 246.09system 4:12.58elapsed 99%CPU (0avgtext+0avgdata 8373248maxresident)k 0inputs+0outputs (54major+33555027minor)pagefaults 0swaps Similar result with MySQL and sysbench using swap: Before: 94055.61 qps After (0.8% faster): 94834.91 qps Radix tree slab usage is also very slightly lower. Link: https://lkml.kernel.org/r/20240521175854.96038-12-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 05b0c7edad9b8a5ccf1b46b01e1b96fcd10b50d8 Author: Kairui Song Date: Wed May 22 01:58:52 2024 +0800 mm: drop page_index and simplify folio_index There are two helpers for retrieving the index within address space for mixed usage of swap cache and page cache: - page_index - folio_index This commit drops page_index, as we have eliminated all users, and converts folio_index's helper __page_file_index to use folio to avoid the page conversion. Link: https://lkml.kernel.org/r/20240521175854.96038-11-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 564a2ee9f9f66ceef135b7208cff705d48ad76c4 Author: Kairui Song Date: Wed May 22 01:58:51 2024 +0800 mm: remove page_file_offset and folio_file_pos These two helpers were useful for mixed usage of swap cache and page cache, which help retrieve the corresponding file or swap device offset of a page or folio. They were introduced in commit f981c5950fa8 ("mm: methods for teaching filesystems about PG_swapcache pages") and used in commit d56b4ddf7781 ("nfs: teach the NFS client how to treat PG_swapcache pages"), suppose to be used with direct_IO for swap over fs. But after commit e1209d3a7a67 ("mm: introduce ->swap_rw and use it for reads from SWP_FS_OPS swap-space"), swap with direct_IO is no more, and swap cache mapping is never exposed to fs. Now we have dropped all users of page_file_offset and folio_file_pos, so they can be deleted. Link: https://lkml.kernel.org/r/20240521175854.96038-10-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 545ebe71d38c13c76c20dfd84d3397dc14a129e3 Author: Kairui Song Date: Wed May 22 01:58:50 2024 +0800 mm/swap: get the swap device offset directly folio_file_pos and page_file_offset are for mixed usage of swap cache and page cache, it can't be page cache here, so introduce a new helper to get the swap offset in swap device directly. Need to include swapops.h in mm/swap.h to ensure swp_offset is always defined before use. Link: https://lkml.kernel.org/r/20240521175854.96038-9-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 237d29075ca71feeadf38e801ef657858d9e9598 Author: Kairui Song Date: Wed May 22 01:58:49 2024 +0800 nfs: drop usage of folio_file_pos folio_file_pos is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio_pos instead. After commit e1209d3a7a67 ("mm: introduce ->swap_rw and use it for reads from SWP_FS_OPS swap-space"), swap cache should never be exposed to nfs. So remove the usage of folio_file_pos in following NFS functions / helpers: - nfs_vm_page_mkwrite It's only used by nfs_file_vm_ops.page_mkwrite - trace event helper: nfs_folio_event - trace event helper: nfs_folio_event_done These two are used through DEFINE_NFS_FOLIO_EVENT and DEFINE_NFS_FOLIO_EVENT_DONE, which defined following events: - trace_nfs_aop_readpage{_done}: only called by nfs_read_folio - trace_nfs_writeback_folio: only called by nfs_wb_folio - trace_nfs_invalidate_folio: only called by nfs_invalidate_folio - trace_nfs_launder_folio_done: only called by nfs_launder_folio None of them could possibly be used on swap cache folio, nfs_read_folio only called by: .write_begin -> nfs_read_folio .read_folio nfs_wb_folio only called by nfs mapping: .release_folio -> nfs_wb_folio .launder_folio -> nfs_wb_folio .write_begin -> nfs_read_folio -> nfs_wb_folio .read_folio -> nfs_wb_folio .write_end -> nfs_update_folio -> nfs_writepage_setup -> nfs_setup_write_request -> nfs_try_to_update_request -> nfs_wb_folio .page_mkwrite -> nfs_update_folio -> nfs_writepage_setup -> nfs_setup_write_request -> nfs_try_to_update_request -> nfs_wb_folio .write_begin -> nfs_flush_incompatible -> nfs_wb_folio .page_mkwrite -> nfs_vm_page_mkwrite -> nfs_flush_incompatible -> nfs_wb_folio nfs_invalidate_folio is only called by .invalidate_folio. nfs_launder_folio is only called by .launder_folio - nfs_grow_file - nfs_update_folio nfs_grow_file is only called by nfs_update_folio, and all possible callers of them are: .write_end -> nfs_update_folio .page_mkwrite -> nfs_update_folio - nfs_wb_folio_cancel .invalidate_folio -> nfs_wb_folio_cancel Also, seeing from the swap side, swap_rw is now the only interface calling into fs, the offset info is always in iocb.ki_pos now. So we can remove all these folio_file_pos call safely. Link: https://lkml.kernel.org/r/20240521175854.96038-8-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: Trond Myklebust Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 7084021c04d62a79f86fe5331f54d1d89a9652a5 Author: Kairui Song Date: Wed May 22 01:58:48 2024 +0800 netfs: drop usage of folio_file_pos folio_file_pos is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio_pos instead. It can't be a swap cache page here. Swap mapping may only call into fs through swap_rw and that is not supported for netfs. So just drop it and use folio_pos instead. Link: https://lkml.kernel.org/r/20240521175854.96038-7-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: David Howells Cc: Jeff Layton Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit d4f439865f97492c1931962c8a90fc9d7204d655 Author: Kairui Song Date: Wed May 22 01:58:47 2024 +0800 afs: drop usage of folio_file_pos folio_file_pos is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio_pos instead. It can't be a swap cache page here. Swap mapping may only call into fs through swap_rw and that is not supported for afs. So just drop it and use folio_pos instead. Link: https://lkml.kernel.org/r/20240521175854.96038-6-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: David Howells Cc: Marc Dionne Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 8586be3ddf9a6133ec9f5915b35cd4e704d4131b Author: Kairui Song Date: Wed May 22 01:58:46 2024 +0800 NFS: remove nfs_page_lengthg and usage of page_index This function is no longer used after commit 4fa7a717b432 ("NFS: Fix up nfs_vm_page_mkwrite() for folios"), all users have been converted to use folio instead, just delete it to remove usage of page_index. Link: https://lkml.kernel.org/r/20240521175854.96038-5-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: Trond Myklebust Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 5e425300af15f8fcf6d0fec188c8bf5207c1456d Author: Kairui Song Date: Wed May 22 01:58:45 2024 +0800 ceph: drop usage of page_index page_index is needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use page->index instead. It can't be a swap cache page here, so just drop it. Link: https://lkml.kernel.org/r/20240521175854.96038-4-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: Xiubo Li Cc: Ilya Dryomov Cc: Jeff Layton Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Jaegeuk Kim Cc: Marc Dionne Cc: Matthew Wilcox (Oracle) Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Ryusuke Konishi Cc: Trond Myklebust Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 1f49c1476d09168eeaed462e587ed9161784a561 Author: Kairui Song Date: Wed May 22 01:58:44 2024 +0800 nilfs2: drop usage of page_index Patch series "mm/swap: clean up and optimize swap cache index", v6. Currently we use one swap_address_space for every 64M chunk to reduce lock contention, this is like having a set of smaller files inside a swap device. But when doing swap cache look up or insert, we are still using the offset of the whole large swap device. This is OK for correctness, as the offset (key) is unique. But Xarray is specially optimized for small indexes, it creates the redix tree levels lazily to be just enough to fit the largest key stored in one Xarray. So we are wasting tree nodes unnecessarily. For 64M chunk it should only take at most 3 level to contain everything. But if we are using the offset from the whole swap device, the offset (key) value will be way beyond 64M, and so will the tree level. Optimize this by reduce the swap cache search space into 64M scope. Test with `time memhog 128G` inside a 8G memcg using 128G swap (ramdisk with SWP_SYNCHRONOUS_IO dropped, tested 3 times, results are stable. The test result is similar but the improvement is smaller if SWP_SYNCHRONOUS_IO is enabled, as swap out path can never skip swap cache): Before: 6.07user 250.74system 4:17.26elapsed 99%CPU (0avgtext+0avgdata 8373376maxresident)k 0inputs+0outputs (55major+33555018minor)pagefaults 0swaps After (+1.8% faster): 6.08user 246.09system 4:12.58elapsed 99%CPU (0avgtext+0avgdata 8373248maxresident)k 0inputs+0outputs (54major+33555027minor)pagefaults 0swaps Similar result with MySQL and sysbench using swap: Before: 94055.61 qps After (+0.8% faster): 94834.91 qps There is alse a very slight drop of radix tree node slab usage: Before: 303952K After: 302224K For this series: There are multiple places that expect mixed type of pages (page cache or swap cache), eg. migration, huge memory split; There are four helpers for that: - page_index - page_file_offset - folio_index - folio_file_pos To keep the code clean and compatible, this series first cleaned up usage of them. page_file_offset and folio_file_pos are historical helpes that can be simply dropped after clean up. And page_index can be all converted to folio_index or folio->index. Then introduce two new helpers swap_cache_index and swap_dev_pos for swap. Replace swp_offset with swap_cache_index when used to retrieve folio from swap cache, and use swap_dev_pos when needed to retrieve the device position of a swap entry. This way, swap_cache_index can return the optimized value with no compatibility issue. The result is better performance and reduced LOC. Idealy, in the future, we may want to reduce SWAP_ADDRESS_SPACE_SHIFT from 14 to 12: Default Xarray chunk offset is 6, so we have 3 level trees instead of 2 level trees just for 2 extra bits. But swap cache is based on address_space struct, with 4 times more metadata sparsely distributed in memory it waste more cacheline, the performance gain from this series is almost canceled according to my test. So first, just have a cleaner seperation of offsets and smaller search space. This patch (of 10): page_index is only for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use page->index instead. It can't be a swap cache page here (being part of buffer head), so just drop it. And while we are at it, optimize the code by retrieving the offset of the buffer head within the folio directly using bh_offset, and get rid of the loop and usage of page helpers. Link: https://lkml.kernel.org/r/20240521175854.96038-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20240521175854.96038-3-ryncsn@gmail.com Suggested-by: Matthew Wilcox Signed-off-by: Kairui Song Acked-by: Ryusuke Konishi Cc: Ryusuke Konishi Cc: Anna Schumaker Cc: Barry Song Cc: Chao Yu Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Jeff Layton Cc: Marc Dionne Cc: Minchan Kim Cc: NeilBrown Cc: Ryan Roberts Cc: Trond Myklebust Cc: Xiubo Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 8246291eccdd44cc81684991259680d543bb29b7 Author: Kemeng Shi Date: Tue May 14 20:52:54 2024 +0800 writeback: factor out balance_wb_limits to remove repeated code Factor out balance_wb_limits to remove repeated code [shikemeng@huaweicloud.com: add comment] Link: https://lkml.kernel.org/r/20240606033547.344376-1-shikemeng@huaweicloud.com [akpm@linux-foundation.org: s/fileds/fields/ in comment] Link: https://lkml.kernel.org/r/20240514125254.142203-9-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Cc: Matthew Wilcox (Oracle) Cc: Tejun Heo Signed-off-by: Andrew Morton commit 236d0f16eb9d1773ea51ed53c3538c1f589591f1 Author: Kemeng Shi Date: Tue May 14 20:52:53 2024 +0800 writeback: factor out wb_dirty_exceeded to remove repeated code Factor out wb_dirty_exceeded to remove repeated code Link: https://lkml.kernel.org/r/20240514125254.142203-8-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8c9918dedf78e0ed11b236e528e3f3aed5cad458 Author: Kemeng Shi Date: Tue May 14 20:52:52 2024 +0800 writeback: factor out balance_domain_limits to remove repeated code Factor out balance_domain_limits to remove repeated code. Link: https://lkml.kernel.org/r/20240514125254.142203-7-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2530e2399b84b91b1dbb200e0c3b4eb76d3870ce Author: Kemeng Shi Date: Tue May 14 20:52:51 2024 +0800 writeback: factor out wb_dirty_freerun to remove more repeated freerun code Factor out wb_dirty_freerun to remove more repeated freerun code. Link: https://lkml.kernel.org/r/20240514125254.142203-6-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 9bb48a70386326acf22e4523d1f72c912f5854fe Author: Kemeng Shi Date: Tue May 14 20:52:50 2024 +0800 writeback: factor out code of freerun to remove repeated code Factor out code of freerun into new helper functions domain_poll_intv and domain_dirty_freerun to remove repeated code. Link: https://lkml.kernel.org/r/20240514125254.142203-5-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 6e208329687e8a6a9db4f63ef351c0d0c43a39e0 Author: Kemeng Shi Date: Tue May 14 20:52:49 2024 +0800 writeback: factor out domain_over_bg_thresh to remove repeated code Factor out domain_over_bg_thresh from wb_over_bg_thresh to remove repeated code. Link: https://lkml.kernel.org/r/20240514125254.142203-4-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit ba62d5cfe181845ae850f5af45cf258b9b8f703f Author: Kemeng Shi Date: Tue May 14 20:52:48 2024 +0800 writeback: add general function domain_dirty_avail to calculate dirty and avail of domain Add general function domain_dirty_avail to calculate dirty and avail for either dirty limit or background writeback in either global domain or wb domain. Link: https://lkml.kernel.org/r/20240514125254.142203-3-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 7c0c629be5189b86acfd4a960c90e20eface9d84 Author: Kemeng Shi Date: Tue May 14 20:52:47 2024 +0800 writeback: factor out wb_bg_dirty_limits to remove repeated code Patch series "Add helper functions to remove repeated code and improve readability of cgroup writeback", v2. This series adds a lot of helpers to remove repeated code between domain and wb; dirty limit and dirty background; global domain and wb domain. The helpers also improve readability. More details can be found in the respective patches. A simple domain hierarchy is tested: global domain (> 20G) | cgroup domain1(10G) | wb1 | fio Test steps: /* make it easy to observe */ echo 300000 > /proc/sys/vm/dirty_expire_centisecs echo 3000 > /proc/sys/vm/dirty_writeback_centisecs /* create cgroup domain */ cd /sys/fs/cgroup echo "+memory +io" > cgroup.subtree_control mkdir group1 cd group1 echo 10G > memory.high echo 10G > memory.max echo $$ > cgroup.procs mkfs.ext4 -F /dev/vdb mount /dev/vdb /bdi1/ /* run fio to generate dirty pages */ fio -name test -filename=/bdi1/file -size=xxx -ioengine=libaio -bs=4K \ -iodepth=1 -rw=write -direct=0 --time_based -runtime=600 -invalidate=0 When fio size is 1G, the wb is in freerun state and dirty pages are only written back when dirty inode is expired after 30 seconds. When fio size is 2G, the dirty pages keep being written back and bandwidth of fio is limited. This patch (of 8): Similar to wb_dirty_limits which calculates dirty and thresh of wb, wb_bg_dirty_limits calculates background dirty and background thresh of wb. With wb_bg_dirty_limits, we could remove repeated code in wb_over_bg_thresh. Link: https://lkml.kernel.org/r/20240514125254.142203-1-shikemeng@huaweicloud.com Link: https://lkml.kernel.org/r/20240514125254.142203-2-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Acked-by: Tejun Heo Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 462966dc7d701b5c251f280e1c90e8fd301f11e3 Author: Shakeel Butt Date: Wed May 29 08:49:11 2024 -0700 mm: vmscan: reset sc->priority on retry The commit 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") added a retry reclaim heuristic to iterate all the cgroups before returning an unsuccessful reclaim but missed to reset the sc->priority. Let's fix it. Link: https://lkml.kernel.org/r/20240529154911.3008025-1-shakeel.butt@linux.dev Fixes: 6be5e186fd65 ("mm: vmscan: restore incremental cgroup iteration") Signed-off-by: Shakeel Butt Reported-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Tested-by: syzbot+17416257cb95200cba44@syzkaller.appspotmail.com Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton commit b82b530740b960eb949813043c4187c254039ac1 Author: Johannes Weiner Date: Tue May 14 16:26:41 2024 -0400 mm: vmscan: restore incremental cgroup iteration Currently, reclaim always walks the entire cgroup tree in order to ensure fairness between groups. While overreclaim is limited in shrink_lruvec(), many of our systems have a sizable number of active groups, and an even bigger number of idle cgroups with cache left behind by previous jobs; the mere act of walking all these cgroups can impose significant latency on direct reclaimers. In the past, we've used a save-and-restore iterator that enabled incremental tree walks over multiple reclaim invocations. This ensured fairness, while keeping the work of individual reclaimers small. However, in edge cases with a lot of reclaim concurrency, individual reclaimers would sometimes not see enough of the cgroup tree to make forward progress and (prematurely) declare OOM. Consequently we switched to comprehensive walks in 1ba6fc9af35b ("mm: vmscan: do not share cgroup iteration between reclaimers"). To address the latency problem without bringing back the premature OOM issue, reinstate the shared iteration, but with a restart condition to do the full walk in the OOM case - similar to what we do for memory.low enforcement and active page protection. In the worst case, we do one more full tree walk before declaring OOM. But the vast majority of direct reclaim scans can then finish much quicker, while fairness across the tree is maintained: - Before this patch, we observed that direct reclaim always takes more than 100us and most direct reclaim time is spent in reclaim cycles lasting between 1ms and 1 second. Almost 40% of direct reclaim time was spent on reclaim cycles exceeding 100ms. - With this patch, almost all page reclaim cycles last less than 10ms, and a good amount of direct page reclaim finishes in under 100us. No page reclaim cycles lasting over 100ms were observed anymore. The shared iterator state is maintaned inside the target cgroup, so fair and incremental walks are performed during both global reclaim and cgroup limit reclaim of complex subtrees. Link: https://lkml.kernel.org/r/20240514202641.2821494-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Signed-off-by: Rik van Riel Reported-by: Rik van Riel Reviewed-by: Shakeel Butt Reviewed-by: Roman Gushchin Cc: Facebook Kernel Team Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton commit 7f83bf14603ef41a44dc907594d749a283e22c37 Author: Ran Xiaokai Date: Wed May 15 10:47:54 2024 +0800 mm/huge_memory: mark racy access onhuge_anon_orders_always huge_anon_orders_always is accessed lockless, it is better to use the READ_ONCE() wrapper. This is not fixing any visible bug, hopefully this can cease some KCSAN complains in the future. Also do that for huge_anon_orders_madvise. Link: https://lkml.kernel.org/r/20240515104754889HqrahFPePOIE1UlANHVAh@zte.com.cn Signed-off-by: Ran Xiaokai Acked-by: David Hildenbrand Reviewed-by: Lu Zhongjun Reviewed-by: xu xin Cc: Yang Yang Cc: Matthew Wilcox (Oracle) Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 6f775463d0027733caebfb75d62ec7c4f807f834 Author: Kefeng Wang Date: Wed May 15 15:07:09 2024 +0800 mm: shmem: use folio_alloc_mpol() in shmem_alloc_folio() Let's change shmem_alloc_folio() to take a order and use folio_alloc_mpol() helper, then directly use it for normal or large folio to cleanup code. Link: https://lkml.kernel.org/r/20240515070709.78529-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton commit 1d9cb7852bae9884eef413c213f82158ea84bebf Author: Kefeng Wang Date: Wed May 15 15:07:08 2024 +0800 mm: mempolicy: use folio_alloc_mpol() in alloc_migration_target_by_mpol() Convert to use folio_alloc_mpol() to make vma_alloc_folio_noprof() to use folio throughout. Link: https://lkml.kernel.org/r/20240515070709.78529-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton commit 3174d70cf694c7c1c506fecffdefa0d26a78cf60 Author: Kefeng Wang Date: Wed May 15 15:07:07 2024 +0800 mm: mempolicy: use folio_alloc_mpol_noprof() in vma_alloc_folio_noprof() Convert to use folio_alloc_mpol_noprof() to make vma_alloc_folio_noprof() to use folio throughout. Link: https://lkml.kernel.org/r/20240515070709.78529-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton commit a19621ed4e0ac9e1d296d07dc8ff8c27d5c03b43 Author: Kefeng Wang Date: Wed May 15 15:07:06 2024 +0800 mm: add folio_alloc_mpol() Patch series "mm: convert to folio_alloc_mpol()". This patch (of 4): This adds a new folio_alloc_mpol() like folio_alloc() but allocate folio according to NUMA mempolicy. Link: https://lkml.kernel.org/r/20240515070709.78529-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20240515070709.78529-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Hugh Dickins Signed-off-by: Andrew Morton commit 6584a14a377d087b91eeb53feb40a971cca51d6d Author: Oscar Salvador Date: Thu May 16 10:10:35 2024 +0200 mm/hugetlb: drop node_alloc_noretry from alloc_fresh_hugetlb_folio Since commit d67e32f26713 ("hugetlb: restructure pool allocations"), the parameter node_alloc_noretry from alloc_fresh_hugetlb_folio() is not used, so drop it. Link: https://lkml.kernel.org/r/20240516081035.5651-1-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: Sidhartha Kumar Reviewed-by: Anshuman Khandual Reviewed-by: Vishal Moola (Oracle) Reviewed-by: Muchun Song Cc: Oscar Salvador Cc: Peter Xu Signed-off-by: Andrew Morton commit 0ba5e806e14e97a4dd34e21ae2994693bcdd0406 Author: Illia Ostapyshyn Date: Fri May 17 11:13:48 2024 +0200 mm/vmscan: update stale references to shrink_page_list Commit 49fd9b6df54e ("mm/vmscan: fix a lot of comments") renamed shrink_page_list() to shrink_folio_list(). Fix up the remaining references to the old name in comments and documentation. Link: https://lkml.kernel.org/r/20240517091348.1185566-1-illia@yshyn.com Signed-off-by: Illia Ostapyshyn Cc: Jonathan Corbet Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 525c30304928ff0efee4dfab8319a9d4f254ab46 Author: Thomas Weißschuh Date: Sat May 18 16:00:04 2024 +0200 mm/hugetlb: constify ctl_table arguments of utility functions The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Link: https://lkml.kernel.org/r/20240518-sysctl-const-handler-hugetlb-v1-1-47e34e2871b2@weissschuh.net Signed-off-by: Thomas Weißschuh Reviewed-by: Muchun Song Cc: Joel Granados Cc: Luis Chamberlain Signed-off-by: Andrew Morton commit e19f67df9ccbfec5a670df8b8b043b8da9444692 Merge: 1a16cdf77e0d7 7abfd8ecb7858 Author: Jakub Kicinski Date: Wed Jul 3 19:29:17 2024 -0700 Merge branch 'selftests-openvswitch-address-some-flakes-in-the-ci-environment' Aaron Conole says: ==================== selftests: openvswitch: Address some flakes in the CI environment These patches aim to make using the openvswitch testsuite more reliable. These should address the major sources of flakiness in the openvswitch test suite allowing the CI infrastructure to exercise the openvswitch module for patch series. There should be no change for users who simply run the tests (except that patch 3/3 does make some of the debugging a bit easier by making some output more verbose). ==================== Link: https://patch.msgid.link/20240702132830.213384-1-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 7abfd8ecb7858006edceeeb49c82a1eece2982f5 Author: Aaron Conole Date: Tue Jul 2 09:28:30 2024 -0400 selftests: openvswitch: Be more verbose with selftest debugging. The openvswitch selftest is difficult to debug for anyone that isn't directly familiar with the openvswitch module and the specifics of the test cases. Many times when something fails, the debug log will be sparsely populated and it takes some time to understand where a failure occured. Increase the amount of details logged to the debug log by trapping all 'info' logs, and all 'ovs_sbx' commands. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240702132830.213384-4-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 818481db3df41e58396d13fd9fad77542a0706be Author: Aaron Conole Date: Tue Jul 2 09:28:29 2024 -0400 selftests: openvswitch: Attempt to autoload module. Previously, the openvswitch.sh test suites would not attempt to autoload the openvswitch module. The idea was that a user who is manually running tests might not even have the OVS module loaded or configured for their own development. However, if the kernel module is configured, and the module can be autoloaded then we should just attempt to load it and run the tests. This is especially true in the CI environments, where the CI tests should be able to rely on auto loading to get the test suite running. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Tested-by: Simon Horman Link: https://patch.msgid.link/20240702132830.213384-3-aconole@redhat.com Signed-off-by: Jakub Kicinski commit ff015706fc7385c51e8418ced2484b98b239a3a8 Author: Aaron Conole Date: Tue Jul 2 09:28:28 2024 -0400 selftests: openvswitch: Bump timeout to 15 minutes. We found that since some tests rely on the TCP SYN timeouts to cause flow misses, the default test suite timeout of 45 seconds is quick to be exceeded. Bump the timeout to 15 minutes. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Tested-by: Simon Horman Link: https://patch.msgid.link/20240702132830.213384-2-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 1a16cdf77e0d7de0fb640e65d65c0898b38c1b4b Author: Jakub Kicinski Date: Tue Jul 2 09:41:57 2024 -0700 net: ethtool: fix compat with old RSS context API Device driver gets access to rxfh_dev, while rxfh is just a local copy of user space params. We need to check what RSS context ID driver assigned in rxfh_dev, not rxfh. Using rxfh leads to trying to store all contexts at index 0xffffffff. From the user perspective it leads to "driver chose duplicate ID" warnings when second context is added and inability to access any contexts even tho they were successfully created - xa_load() for the actual context ID will return NULL, and syscall will return -ENOENT. Looks like a rebasing mistake, since rxfh_dev was added relatively recently by commit fb6e30a72539 ("net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops"). Fixes: eac9122f0c41 ("net: ethtool: record custom RSS contexts in the XArray") Reviewed-by: Edward Cree Link: https://patch.msgid.link/20240702164157.4018425-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0b8774586be5b2f3aa9a0e665846c985e15f621e Author: Jakub Kicinski Date: Tue Jul 2 16:37:28 2024 -0700 selftests: drv-net: rss_ctx: allow more noise on default context As predicted by David running the test on a machine with a single interface is a bit unreliable. We try to send 20k packets with iperf and expect fewer than 10k packets on the default context. The test isn't very quick, iperf will usually send 100k packets by the time we stop it. So we're off by 5x on the number of iperf packets but still expect default context to only get the hardcoded 10k. The intent is to make sure we get noticeably less traffic on the default context. Use half of the resulting iperf traffic instead of the hard coded 10k. Link: https://patch.msgid.link/20240702233728.4183387-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8c5a9f290e37123d28cda7728b53705643a2916f Author: Paolo Abeni Date: Tue Jul 2 16:29:31 2024 +0200 tools: ynl: use ident name for Family, too. This allow consistent naming convention between Family and others element's name. Signed-off-by: Paolo Abeni Link: https://patch.msgid.link/9bbcab3094970b371bd47aa18481ae6ca5a93687.1719930479.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 608c3b1e612a91fc1b811d2ae6a30ed8dbc7cab7 Author: Nicolas Schier Date: Thu May 23 10:06:40 2024 +0200 perf install: Don't propagate subdir to Documentation submake Explicitly reset 'subdir' variable when descending to tools/perf/Documentation. Similar to commit f89fb55714b62 ("perf build: Don't propagate subdir to submakes for install_headers", 2023-01-02), calling the 'tools/perf_install' target via top-levels Makefile results in repeated subdir components when attempting to call the perf documentation installation rules: $ make tools/perf_install NO_LIBTRACEEVENT=1 JOBS=1 [...] /bin/sh: 1: cd: can't cd to /data/linux/kbuild/tools/perf/tools/perf/ ../../scripts/Makefile.include:17: *** output directory "/data/linux/kbuild/tools/perf/tools/perf/" does not exist. Stop. make[5]: *** [Makefile.perf:1096: try-install-man] Error 2 make[4]: *** [Makefile.perf:264: sub-make] Error 2 make[3]: *** [Makefile:113: install] Error 2 make[2]: *** [Makefile:131: perf_install] Error 2 Resetting 'subdir' fixes the call from top-level Makefile. Reported-by: Uwe Kleine-König Signed-off-by: Nicolas Schier Acked-by: Uwe Kleine-König Tested-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240523-make-tools-perf-install-v1-1-3903499e637f@avm.de Signed-off-by: Namhyung Kim commit 526e21a2aa6fa7ac3309a8c87f4d6e5f7e407cb6 Author: Takashi Sakamoto Date: Wed Jul 3 07:20:34 2024 +0900 firewire: ohci: add tracepoints event for data of Self-ID DMA In 1394 OHCI, the SelfIDComplete event occurs when the hardware has finished transmitting all of the self ID packets received during the bus initialization process to the host memory by DMA. This commit adds a tracepoints event for this event to trace the timing and packet data of Self-ID DMA. It is the part of following tracepoints events helpful to debug some events at bus reset; e.g. the issue addressed at a commit d0b06dc48fb1 ("firewire: core: use long bus reset on gap count error")[1]: * firewire_ohci:irqs * firewire_ohci:self_id_complete * firewire:bus_reset_handle * firewire:self_id_sequence They would be also helpful in the problem about invocation timing of hardIRQ and process (workqueue) contexts. We can often see this kind of problem with -rt kernel[2]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0b06dc48fb1 [2] https://lore.kernel.org/linux-rt-users/YAwPoaUZ1gTD5y+k@hmbx/ Link: https://lore.kernel.org/r/20240702222034.1378764-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 3710578d2d580d42abe27f17bab9a4cafb6aad67 Author: Xu Yang Date: Wed May 29 16:03:58 2024 +0800 perf vendor events arm64:: Add i.MX95 DDR Performance Monitor metrics Add JSON metrics for i.MX95 DDR Performance Monitor. Reviewed-by: John Garry Reviewed-by: Ian Rogers Reviewed-by: Frank Li Signed-off-by: Xu Yang Cc: festevam@gmail.com Cc: conor+dt@kernel.org Cc: robh+dt@kernel.org Cc: shawnguo@kernel.org Cc: will@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org Cc: mike.leach@linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: imx@lists.linux.dev Cc: kernel@pengutronix.de Cc: s.hauer@pengutronix.de Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20240529080358.703784-8-xu.yang_2@nxp.com Signed-off-by: Namhyung Kim commit 2697b79a469b68e3ad3640f55284359c1396278d Author: Xu Yang Date: Wed May 29 16:03:57 2024 +0800 perf vendor events arm64:: Add i.MX93 DDR Performance Monitor metrics Add JSON metrics for i.MX93 DDR Performance Monitor. Reviewed-by: Frank Li Signed-off-by: Xu Yang Cc: festevam@gmail.com Cc: conor+dt@kernel.org Cc: robh+dt@kernel.org Cc: shawnguo@kernel.org Cc: will@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org Cc: mike.leach@linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: imx@lists.linux.dev Cc: john.g.garry@oracle.com Cc: kernel@pengutronix.de Cc: s.hauer@pengutronix.de Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20240529080358.703784-7-xu.yang_2@nxp.com Signed-off-by: Namhyung Kim commit 4a13617ef311cb01160bdecfa338e2148940059c Author: Takashi Sakamoto Date: Wed Jul 3 07:20:33 2024 +0900 firewire: ohci: use inline functions to operate data of self-ID DMA The code of 1394 OHCI driver includes hard-coded magic number to operate data of Self-ID DMA. This commit replaces them with the inline functions added/tested in the former commit. Link: https://lore.kernel.org/r/20240702222034.1378764-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 7a14f78d70dd9fde77275a3cc9427de862969c4c Author: Takashi Sakamoto Date: Wed Jul 3 07:20:32 2024 +0900 firewire: ohci: add static inline functions to deserialize for Self-ID DMA operation The SelfI-ID is one type of DMAs defined in 1394 OHCI specification. It is operated by two registers, one interrupt, and has one format of buffer. This commit adds some static inline functions to deserialize the data in the buffer and registers. Some KUnit tests are also added to check their reliability. Link: https://lore.kernel.org/r/20240702222034.1378764-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit c538b06de6ce2966f72a7cf3b63e46e2f604a49e Author: Takashi Sakamoto Date: Wed Jul 3 07:20:31 2024 +0900 firewire: ohci: use static function to handle endian issue on PowerPC platform It is preferable to use static function instead of functional macro in some points. It checks type of argument, but would be optimized to embedded code instead of function calls. This commit obsoletes the functional macro with the static function. Additionally this commit refactors quirk detection to ease the later work. Link: https://lore.kernel.org/r/20240702222034.1378764-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit f26a38e61c03fdfacb6b596e1daf665cf4526a60 Author: Takashi Sakamoto Date: Wed Jul 3 07:20:30 2024 +0900 firewire: ohci: use common macro to interpret be32 data in le32 buffer The 1394 OHCI driver configures the hardware to transfer the data quadlets of packet via DMA after converting it to little endian, therefore the data is typed as __le32. Nevertheless some actual hardware ignores the configuration. In the case, the data in DMA buffer is aligned to big endian (__be32). For the case in big-endian machine, the driver includes the following interpretation from __le32 to u32 (host-endian = __be32): * (__force __u32)(v) In include/linux/byteorder/generic.h, be32_to_cpu() is available. It is expanded to the following expression in 'include/uapi/linux/byteorder/big_endian.h': * (__force __u32)(__be32)(x) This commit replace the ad-hoc endian interpretation with the above. Link: https://lore.kernel.org/r/20240702222034.1378764-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 127734e23aed3746d7dd14c7070ea3f2d634912d Author: Konstantin Ryabitsev Date: Wed Jun 19 14:24:07 2024 -0400 Documentation: best practices for using Link trailers Based on multiple conversations, most recently on the ksummit mailing list [1], add some best practices for using the Link trailer, such as: - how to use markdown-like bracketed numbers in the commit message to indicate the corresponding link - when to use lore.kernel.org vs patch.msgid.link domains Cc: ksummit@lists.linux.dev Link: https://lore.kernel.org/20240617-arboreal-industrious-hedgehog-5b84ae@meerkat # [1] Signed-off-by: Konstantin Ryabitsev Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240619-docs-patch-msgid-link-v2-2-72dd272bfe37@linuxfoundation.org commit 413e775efaec9b4525480be570cae46406dd759d Author: Konstantin Ryabitsev Date: Wed Jun 19 14:24:06 2024 -0400 Documentation: fix links to mailing list services There have been some changes to the way mailing lists are hosted at kernel.org. This patch does the following: 1. fixes links that are pointing at the outdated resources 2. removes an outdated patchbomb admonition We still don't particularly want or welcome huge patchbombs, but they are less likely to overload our systems. Acked-by: Dan Williams Signed-off-by: Konstantin Ryabitsev Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240619-docs-patch-msgid-link-v2-1-72dd272bfe37@linuxfoundation.org commit b393590992b78e8753173b99da81209f4376dbb1 Author: Li Zhijian Date: Fri Jun 14 09:00:28 2024 +0800 Documentation: exception-tables.rst: Fix the wrong steps referenced When it was in text format, it correctly hardcoded steps 8a to 8c. However, after it was converted to RST, the sequence numbers were auto-generated during rendering and became incorrect after some steps were inserted. Change it to refer to steps a to c in a relative way. Signed-off-by: Li Zhijian [jc: Indented the line to make the relative reference more clear] Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614010028.48262-1-lizhijian@fujitsu.com commit 3cfde36df7aba306e31209ec882a9e015f2d5963 Author: Marc Zyngier Date: Wed Jul 3 16:47:43 2024 +0100 KVM: arm64: nv: Truely enable nXS TLBI operations Although we now have support for nXS-flavoured TLBI instructions, we still don't expose the feature to the guest thanks to a mixture of misleading comment and use of a bunch of magic values. Fix the comment and correctly express the masking of LS64, which is enough to expose nXS to the world. Not that anyone cares... Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240703154743.824824-1-maz@kernel.org Signed-off-by: Oliver Upton commit 0e5fbf627fb9f9b2718c7a484d686e4f73a3175a Author: Dongliang Mu Date: Fri Jun 14 11:21:44 2024 +0800 docs/zh_CN: add process/researcher-guidelines Chinese translation Finish the translation of researcher-guidelines and add it to the index file. Update to commit 27103dddc2da ("Documentation: update mailing list addresses") Reviewed-by: Alex Shi Signed-off-by: Dongliang Mu Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614032211.241899-1-dzm91@hust.edu.cn commit b38fdfebbab9de7fdf3faa7035155188751bc797 Author: Jiri Kastner Date: Wed Jun 26 22:39:06 2024 +0200 Documentation/tools/rv: fix document header align header of document with filename and rest of the content Signed-off-by: Jiri Kastner Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240626203906.191841-1-cz172638@gmail.com commit 96408beeef35863805709d48cb6b412a12d62727 Author: Carlos Bilbao Date: Wed Jun 26 17:19:41 2024 -0500 docs/sp_SP: Add translation of process/maintainer-kvm-x86.rst Translate Documentation/process/maintainer-kvm-x86.rst into Spanish. Co-developed-by: Juan Embid Signed-off-by: Juan Embid Signed-off-by: Carlos Bilbao Signed-off-by: Jonathan Corbet [jc: fixed apply- and build-time warnings] Link: https://lore.kernel.org/r/20240626221942.2780668-1-carlos.bilbao.osdev@gmail.com commit 6b2fa426df5d11c46d364288e21fe1f2205a7738 Author: Daniel Watson Date: Sat Jun 29 23:59:12 2024 -0700 docs/admin-guide/mm: correct typo 'quired' to 'queried' Convert the word "quired" to the word "queried" which makes more sense in this context. Signed-off-by: Daniel Watson Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/878qymrjrg.fsf@trent-reznor commit df472c2b699fe3650d106a8e93025dafce2f3208 Author: Dmitry Torokhov Date: Mon Jul 1 13:24:38 2024 -0700 Add libps2 to the input section of driver-api libps2 has been using kerneldoc to document its methods, but was not actually plugged into driver-api. Signed-off-by: Dmitry Torokhov Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/ZoMQhkyUQYi1Bx4t@google.com commit d436a97181eb04bddbf94b16dc3414c93a340bb2 Author: SeongJae Park Date: Mon Jul 1 12:05:12 2024 -0700 Docs/mm/index: move allocation profiling document to unsorted documents chapter The memory allocation profiling document was added to the bottom of the new outline. Apparently it was not decided by well-defined guidelines or a thorough discussions. Rather than that, it was added there just because there was no place for such unsorted documents. Now there is the chapter. Move the document to the new place. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240701190512.49379-5-sj@kernel.org commit 9472274c923389bbcdbfd1b1e394b638d37b4b0a Author: SeongJae Park Date: Mon Jul 1 12:05:11 2024 -0700 Docs/mm/index: rename 'Legacy Documentation' to 'Unsorted Documentation' The intention of 'Legacy Documentation' chapter is to keep the old documents that not yet sorted into the new outline, and encourage new documents to be integrated in the new outline from the beginning. However, the new outline will take some more time to be completed. It has started about two years ago, and still many parts are not yet written. Also, there is no clear guidline for placing each document for all cases, for not only the 'legacy' documents, but also for new documents. For example, memory allocation profiling document has been added to the bottom of the new outline. Apparently it was not following some well-defined guideliens or a result of a discussion. Furthermore, the title ("legacy") makes people feel the documents on the chapter might be outdated or not actively maintained. Rename 'Legacy Documentation' to 'Unsorted Documentation' and remove the description saying it is for 'older' documents. After this change, new documents that not clear enough where it should be placed on the new outline can be added on the chapter while well-defined guidelines or discussion for the new outline is made. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240701190512.49379-4-sj@kernel.org commit 8c678c9ca7cefff42130ec4a7531e2b7660e41b0 Author: SeongJae Park Date: Mon Jul 1 12:05:10 2024 -0700 Docs/mm/index: Remove 'Memory Management Guide' chapter marker 'Memory Management Guide' chapter aims to be not an additional chapter of the document, but the ultimate single outline of the document. In the sense, marking it as a chapter under the document makes no sense, and the rendered document looks odd. Remove the chapter marker. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240701190512.49379-3-sj@kernel.org commit 51c702b0ae0e55ac3189e3264cf75defd0350a29 Author: SeongJae Park Date: Mon Jul 1 12:05:09 2024 -0700 Docs/mm/allocation-profiling: mark 'Theory of operation' as chapter 'Theory of operation' part of allocation-profiling document is apparently a chapter. However, it is mistakenly marked as a document title. As a result, rendered mm document index page shows two items for the document. Fix it to be marked as a chapter. Signed-off-by: SeongJae Park Acked-by: Suren Baghdasaryan Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240701190512.49379-2-sj@kernel.org commit 1059fb529114a4ac524e4c366f0a0933810efddf Author: Ian Rogers Date: Wed Jul 3 10:21:17 2024 -0700 perf dsos: When adding a dso into sorted dsos maintain the sort order dsos__add would add at the end of the dso array possibly requiring a later find to re-sort the array. Patterns of find then add were becoming O(n*log n) due to the sorts. Change the add routine to be O(n) rather than O(1) but to maintain the sorted-ness of the dsos array so that later finds don't need the O(n*log n) sort. Fixes: 3f4ac23a9908 ("perf dsos: Switch backing storage to array from rbtree/list") Reported-by: Namhyung Kim Signed-off-by: Ian Rogers Cc: Steinar Gunderson Cc: Athira Rajeev Cc: Matt Fleming Link: https://lore.kernel.org/r/20240703172117.810918-3-irogers@google.com Signed-off-by: Namhyung Kim commit feaaa8be0b1efce6e8fb4222654413246bdc30aa Author: Ian Rogers Date: Wed Jul 3 10:21:16 2024 -0700 perf comm str: Avoid sort during insert The array is sorted, so just move the elements and insert in order. Fixes: 13ca628716c6 ("perf comm: Add reference count checking to 'struct comm_str'") Reported-by: Matt Fleming Signed-off-by: Ian Rogers Tested-by: Matt Fleming Cc: Steinar Gunderson Cc: Athira Rajeev Link: https://lore.kernel.org/r/20240703172117.810918-2-irogers@google.com Signed-off-by: Namhyung Kim commit fea93a3e5d5e6a09eb153866d2ce60ea3287a70d Author: Wei Liu Date: Mon Jul 1 20:26:05 2024 +0000 PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN The intent of the code snippet is to always return 0 for both PCI_INTERRUPT_LINE and PCI_INTERRUPT_PIN. The check misses PCI_INTERRUPT_PIN. This patch fixes that. This is discovered by this call in VFIO: pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin); The old code does not set *val to 0 because it misses the check for PCI_INTERRUPT_PIN. Garbage is returned in that case. Fixes: 4daace0d8ce8 ("PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs") Link: https://lore.kernel.org/linux-pci/20240701202606.129606-1-wei.liu@kernel.org Signed-off-by: Wei Liu Signed-off-by: Krzysztof Wilczyński Reviewed-by: Michael Kelley Cc: stable@kernel.org commit 80e64b6d34812d037e4edcaca88719da51a943be Author: Andreas Kemnade Date: Wed Jun 12 15:40:39 2024 +0200 dt-bindings: mfd: twl: Fix example Fix example to also conform to rules specified in the separate not-included gpadc binding. Fixes: 62e4f3396197 ("dt-bindings: regulator: twl-regulator: convert to yaml") Signed-off-by: Andreas Kemnade Reported-by: Rob Herring (Arm) Acked-by: Lee Jones Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240612134039.1089839-1-andreas@kemnade.info Signed-off-by: Mark Brown commit 5e13bea78df88c7185ce2f06645a7e4d8a2ba042 Author: Dmitry Torokhov Date: Fri Jun 28 15:47:27 2024 -0700 Input: cypress_ps2 - use u8 when dealing with byte data When dealing with byte data use u8 instead of unsigned char or int. Stop layering error handling in cypress_ps2_sendbyte() and simply pass on error code from ps2_sendbyte(). Additionally use u8 instead of unisgned char throughout the code. Link: https://lore.kernel.org/r/20240628224728.2180126-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 93f25f92fc7dda195c3a7ec38d6bc67c1cbed2c6 Author: Dmitry Torokhov Date: Fri Jun 28 15:47:26 2024 -0700 Input: cypress_ps2 - propagate errors from lower layers Do not override errors reported by lower layers with generic "-1", but propagate them to the callers. Change the checks for errors to be in the form of "if (error)" to maintain consistency. Link: https://lore.kernel.org/r/20240628224728.2180126-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 8bccf667f62a2351fd0b2a2fe5ba90806702c048 Author: Dmitry Torokhov Date: Fri Jun 28 15:47:25 2024 -0700 Input: cypress_ps2 - report timeouts when reading command status Report -ETIMEDOUT error code from cypress_ps2_read_cmd_status() when device does not send enough data within the allotted time in response to a command. Link: https://lore.kernel.org/r/20240628224728.2180126-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit e8688b93ce00230614406d189e8286315832469a Author: Dmitry Torokhov Date: Fri Jun 28 15:47:24 2024 -0700 Input: cypress_ps2 - fix error handling when sending command fails Stop layering error handling in cypress_ps2_sendbyte() and simply pass on error code from ps2_sendbyte() and use it in the callers. This fixes mishandling of error condition in cypress_ps2_read_cmd_status() which expects errors to be negative. Reported-by: Igor Artemiev Link: https://lore.kernel.org/r/20240628224728.2180126-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit c1a339001191e60f70c4da827569b3bb27500a9a Author: Dmitry Torokhov Date: Fri Jun 28 15:47:23 2024 -0700 Input: cypress_ps2 - clean up setting reporting rate Casting an integer field containing desired rate to a pointer to bytes works on little endian architectures where the driver is used, but not a good practice. Use a temporary of proper type instead. Link: https://lore.kernel.org/r/20240628224728.2180126-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 67820eb9f4895791da46df42ff7942dfc1353bb2 Author: Krzysztof Kozlowski Date: Mon Jul 1 09:39:38 2024 +0200 ASoC: codecs: lpass-wsa-macro: Simplify with cleanup.h Driver's probe() has two allocations which are needed only within the probe() itself - for devm_regmap_init_mmio(). Usage of devm interface is a bit misleading here, because these can be freed right after each scope finishes. This makes the code a bit more obvious and self documenting. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-6-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown commit c72585d79249fb07ca3e3c91022e312d21f20f40 Author: Krzysztof Kozlowski Date: Mon Jul 1 09:39:37 2024 +0200 ASoC: codecs: lpass-rx-macro: Use unsigned for number of widgets Driver uses ARRAY_SIZE() to get number of widgets later passed to snd_soc_dapm_new_controls(), which is an 'unsigned int'. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-5-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown commit bf95919fe1917efa8f5da83057ff9fc11130aa55 Author: Krzysztof Kozlowski Date: Mon Jul 1 09:39:36 2024 +0200 ASoC: dapm: Use unsigned for number of widgets in snd_soc_dapm_new_controls() Number of widgets in array passed to snd_soc_dapm_new_controls() cannot be negative, so make it explicit by using 'unsigned int', just like snd_soc_add_component_controls() is doing. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-4-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown commit 0c02cacf62fd90bf9f0c6c33e9a4862cfc50aab4 Author: Krzysztof Kozlowski Date: Mon Jul 1 09:39:35 2024 +0200 ASoC: codecs: lpass-rx-macro: Keep static regmap_config as const The driver has static 'struct regmap_config', which is then customized depending on device version. This works fine, because there should not be two devices in a system simultaneously and even less likely that such two devices would have different versions, thus different regmap config. However code is cleaner and more obvious when static data in the driver is also const - it serves as a template. Mark the 'struct regmap_config' as const and duplicate it in the probe() with kmemdup to allow customizing per detected device variant. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-3-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown commit ee5e13b2c92324938c2bffc44b36b5a29fc28087 Author: Krzysztof Kozlowski Date: Mon Jul 1 09:39:34 2024 +0200 ASoC: codecs: lpass-rx-macro: Simplify with cleanup.h Allocate the default register values array with scoped/cleanup.h to reduce number of error paths and make code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-2-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown commit 891168dc4a6c637ca76c64e7bde6917b96b9cd54 Author: Krzysztof Kozlowski Date: Mon Jul 1 09:39:33 2024 +0200 ASoC: codecs: lpass-rx-macro: Simplify PDS cleanup with devm Eliminate PDS cleanup by using devm_add_action_or_reset() which results in one less error path and smaller cleanup in remove(). Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-1-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown commit 3b628e617b21144579bbca806a26737e8485d93a Author: Linus Walleij Date: Mon Jul 1 09:02:12 2024 +0200 ASoC: tas5086: Convert to GPIO descriptors Switch the driver to use GPIO descriptors. Notice that we let the gpiolib handle line inversion for the active low reset line (nreset !reset). There are no upstream device trees using the tas5086 compatible string, if there were, we would need to ascertain that they all set the GPIO_ACTIVE_LOW flag on their GPIO lines. Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20240701-asoc-tas-gpios-v1-1-d69ec5d79939@linaro.org Signed-off-by: Mark Brown commit 6fce1f40e95182ebbfe1ee3096b8fc0b37903269 Author: Luca Boccassi Date: Tue Jul 2 18:16:57 2024 +0200 dm verity: add support for signature verification with platform keyring Add a new configuration CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_PLATFORM_KEYRING that enables verifying dm-verity signatures using the platform keyring, which is populated using the UEFI DB certificates. This is useful for self-enrolled systems that do not use MOK, as the secondary keyring which is already used for verification, if the relevant kconfig is enabled, is linked to the machine keyring, which gets its certificates loaded from MOK. On datacenter/virtual/cloud deployments it is more common to deploy one's own certificate chain directly in DB on first boot in unattended mode, rather than relying on MOK, as the latter typically requires interactive authentication to enroll, and is more suited for personal machines. Default to the same value as DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING if not otherwise specified, as it is likely that if one wants to use MOK certificates to verify dm-verity volumes, DB certificates are going to be used too. Keys in DB are allowed to load a full kernel already anyway, so they are already highly privileged. Signed-off-by: Luca Boccassi Signed-off-by: Mikulas Patocka commit 3199a34bfaf7561410e0be1e33a61eba870768fc Author: Benjamin Marzinski Date: Tue Jul 2 17:02:48 2024 +0200 dm-raid: Fix WARN_ON_ONCE check for sync_thread in raid_resume rm-raid devices will occasionally trigger the following warning when being resumed after a table load because DM_RECOVERY_RUNNING is set: WARNING: CPU: 7 PID: 5660 at drivers/md/dm-raid.c:4105 raid_resume+0xee/0x100 [dm_raid] The failing check is: WARN_ON_ONCE(test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)); This check is designed to make sure that the sync thread isn't registered, but md_check_recovery can set MD_RECOVERY_RUNNING without the sync_thread ever getting registered. Instead of checking if MD_RECOVERY_RUNNING is set, check if sync_thread is non-NULL. Fixes: 16c4770c75b1 ("dm-raid: really frozen sync_thread during suspend") Suggested-by: Yu Kuai Signed-off-by: Benjamin Marzinski Reviewed-by: Yu Kuai Signed-off-by: Mikulas Patocka commit b76ad8844234bd0d394105d7d784cd05f1bf269a Author: Eric Biggers Date: Tue Jul 2 16:41:08 2024 +0200 dm-verity: hash blocks with shash import+finup when possible Currently dm-verity computes the hash of each block by using multiple calls to the "ahash" crypto API. While the exact sequence depends on the chosen dm-verity settings, in the vast majority of cases it is: 1. crypto_ahash_init() 2. crypto_ahash_update() [salt] 3. crypto_ahash_update() [data] 4. crypto_ahash_final() This is inefficient for two main reasons: - It makes multiple indirect calls, which is expensive on modern CPUs especially when mitigations for CPU vulnerabilities are enabled. Since the salt is the same across all blocks on a given dm-verity device, a much more efficient sequence would be to do an import of the pre-salted state, then a finup. - It uses the ahash (asynchronous hash) API, despite the fact that CPU-based hashing is almost always used in practice, and therefore it experiences the overhead of the ahash-based wrapper for shash. Because dm-verity was intentionally converted to ahash to support off-CPU crypto accelerators, a full reversion to shash might not be acceptable. Yet, we should still provide a fast path for shash with the most common dm-verity settings. Another reason for shash over ahash is that the upcoming multibuffer hashing support, which is specific to CPU-based hashing, is much better suited for shash than for ahash. Supporting it via ahash would add significant complexity and overhead. And it's not possible for the "same" code to properly support both multibuffer hashing and HW accelerators at the same time anyway, given the different computation models. Unfortunately there will always be code specific to each model needed (for users who want to support both). Therefore, this patch adds a new shash import+finup based fast path to dm-verity. It is used automatically when appropriate. This makes dm-verity optimized for what the vast majority of users want: CPU-based hashing with the most common settings, while still retaining support for rarer settings and off-CPU crypto accelerators. In benchmarks with veritysetup's default parameters (SHA-256, 4K data and hash block sizes, 32-byte salt), which also match the parameters that Android currently uses, this patch improves block hashing performance by about 15% on x86_64 using the SHA-NI instructions, or by about 5% on arm64 using the ARMv8 SHA2 instructions. On x86_64 roughly two-thirds of the improvement comes from the use of import and finup, while the remaining third comes from the switch from ahash to shash. Note that another benefit of using "import" to handle the salt is that if the salt size is equal to the input size of the hash algorithm's compression function, e.g. 64 bytes for SHA-256, then the performance is exactly the same as no salt. This doesn't seem to be much better than veritysetup's current default of 32-byte salts, due to the way SHA-256's finalization padding works, but it should be marginally better. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit e8f5e933013af36f4042fea955a00df40105643a Author: Eric Biggers Date: Tue Jul 2 16:40:41 2024 +0200 dm-verity: make verity_hash() take dm_verity_io instead of ahash_request In preparation for adding shash support to dm-verity, change verity_hash() to take a pointer to a struct dm_verity_io instead of a pointer to the ahash_request embedded inside it. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit cf715f4b7eb521a5bf67d391387b754c2fcde8d2 Author: Eric Biggers Date: Tue Jul 2 16:40:20 2024 +0200 dm-verity: always "map" the data blocks dm-verity needs to access data blocks by virtual address in three different cases (zeroization, recheck, and forward error correction), and one more case (shash support) is coming. Since it's guaranteed that dm-verity data blocks never cross pages, and kmap_local_page and kunmap_local are no-ops on modern platforms anyway, just unconditionally "map" every data block's page and work with the virtual buffer directly. This simplifies the code and eliminates unnecessary overhead. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit 09d1430896e38933470045408d7a350dac7d841b Author: Eric Biggers Date: Tue Jul 2 16:39:51 2024 +0200 dm-verity: provide dma_alignment limit in io_hints Since Linux v6.1, some filesystems support submitting direct I/O that is aligned to only dma_alignment instead of the logical_block_size alignment that was required before. I/O that is not aligned to the logical_block_size is difficult to handle in device-mapper targets that do cryptographic processing of data, as it makes the units of data that are hashed or encrypted possibly be split across pages, creating rarely used and rarely tested edge cases. As such, dm-crypt and dm-integrity have already opted out of this by setting dma_alignment to 'logical_block_size - 1'. Although dm-verity does have code that handles these cases (or at least is intended to do so), supporting direct I/O with such a low amount of alignment is not really useful on dm-verity devices. So, opt dm-verity out of it too so that it's not necessary to handle these edge cases. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit a7ddb3d49d16e1774b4d5b814d3469ee9c3830c0 Author: Eric Biggers Date: Tue Jul 2 16:39:13 2024 +0200 dm-verity: make real_digest and want_digest fixed-length Change the digest fields in struct dm_verity_io from variable-length to fixed-length, since their maximum length is fixed at HASH_MAX_DIGESTSIZE, i.e. 64 bytes, which is not too big. This is simpler and makes the fields a bit faster to access. (HASH_MAX_DIGESTSIZE did not exist when this code was written, which may explain why it wasn't used.) This makes the verity_io_real_digest() and verity_io_want_digest() functions trivial, but this patch leaves them in place temporarily since most of their callers will go away in a later patch anyway. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit 59dbee7d4d59425658b1d86238732c575216b718 Author: Anna-Maria Behnsen Date: Mon Jun 10 12:35:52 2024 +0200 tick/sched: Combine WARN_ON_ONCE and print_once When the WARN_ON_ONCE() triggers, the printk() of the additional information related to the warning will not happen in print level "warn". When reading dmesg with a restriction to level "warn", the information published by the printk_once() will not show up there. Transform WARN_ON_ONCE() and printk_once() into a WARN_ONCE(). Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240610103552.25252-1-anna-maria@linutronix.de commit e41e52e59e51992368092a0555fd7b889662653f Author: Eric Biggers Date: Tue Jul 2 16:38:21 2024 +0200 dm-verity: move data hash mismatch handling into its own function Move the code that handles mismatches of data block hashes into its own function so that it doesn't clutter up verity_verify_io(). Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit 2b83be20ae60308f5da31c696137a9561c44c24c Author: Anna-Maria Behnsen Date: Mon Jul 1 16:47:58 2024 +0200 x86/vdso: Remove unused include Including hrtimer.h is not required and is probably a historical leftover. Remove it. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20240701-vdso-cleanup-v1-5-36eb64e7ece2@linutronix.de commit ee6664d7326bb42c86692b3fdac4edcfb2beab2f Author: Anna-Maria Behnsen Date: Mon Jul 1 16:47:57 2024 +0200 x86/vgtod: Remove unused typedef gtod_long_t The typedef gtod_long_t is not used anymore so remove it. The header file contains then only includes dependent on CONFIG_GENERIC_GETTIMEOFDAY to not break ARCH=um. Nevertheless, keep the header file only with those includes to prevent spreading ifdeffery all over the place. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20240701-vdso-cleanup-v1-4-36eb64e7ece2@linutronix.de commit 7239ae7f8349fba53c74b559b2059b1c20e8966d Author: Anna-Maria Behnsen Date: Mon Jul 1 16:47:56 2024 +0200 x86/vdso: Fix function reference in comment Replace the reference to the non-existent function arch_vdso_cycles_valid() by the proper function arch_vdso_cycles_ok(). Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20240701-vdso-cleanup-v1-3-36eb64e7ece2@linutronix.de commit d00106bbdfa82732c23cba44491c38f8c410d865 Author: Anna-Maria Behnsen Date: Mon Jul 1 16:47:55 2024 +0200 vdso: Add comment about reason for vdso struct ordering struct vdso_data is optimized for fast access to the often required struct members. The optimization is not documented in the struct description but it should be kept in mind, when working with the vdso_data struct. Add a comment to the struct description. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20240701-vdso-cleanup-v1-2-36eb64e7ece2@linutronix.de commit f48955e038eaf43812c3701079c7371abe0315a4 Author: Anna-Maria Behnsen Date: Mon Jul 1 16:47:54 2024 +0200 vdso/gettimeofday: Clarify comment about open coded function The two comments state, that the following code open codes something but they lack to specify what exactly is open coded. Expand comments by mentioning the reference to the open coded function. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20240701-vdso-cleanup-v1-1-36eb64e7ece2@linutronix.de commit 57b56d16800e8961278ecff0dc755d46c4575092 Author: Waiman Long Date: Wed Jul 3 14:52:29 2024 -0400 cgroup: Protect css->cgroup write under css_set_lock The writing of css->cgroup associated with the cgroup root in rebind_subsystems() is currently protected only by cgroup_mutex. However, the reading of css->cgroup in both proc_cpuset_show() and proc_cgroup_show() is protected just by css_set_lock. That makes the readers susceptible to racing problems like data tearing or caching. It is also a problem that can be reported by KCSAN. This can be fixed by using READ_ONCE() and WRITE_ONCE() to access css->cgroup. Alternatively, the writing of css->cgroup can be moved under css_set_lock as well which is done by this patch. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 1028f391d5f9d4248e2f49193e6de2516ad630f8 Author: Xiu Jianfeng Date: Wed Jul 3 00:36:46 2024 +0000 cgroup/misc: Introduce misc.peak Introduce misc.peak to record the historical maximum usage of the resource, as in some scenarios the value of misc.max could be adjusted based on the peak usage of the resource. Signed-off-by: Xiu Jianfeng Signed-off-by: Tejun Heo commit 4c29ab84cfec17081aae7a7a28f8d2c93c42dcae Author: John David Anglin Date: Mon Jul 1 09:42:41 2024 -0400 parisc: Fix warning at drivers/pci/msi/msi.h:121 Fix warning at drivers/pci/msi/msi.h:121. Recently, I added a PCI to PCIe bridge adaptor and a PCIe NVME card to my rp3440. Then, I noticed this warning at boot: WARNING: CPU: 0 PID: 10 at drivers/pci/msi/msi.h:121 pci_msi_setup_msi_irqs+0x68/0x90 CPU: 0 PID: 10 Comm: kworker/u32:0 Not tainted 6.9.7-parisc64 #1 Debian 6.9.7-1 Hardware name: 9000/800/rp3440 Workqueue: async async_run_entry_fn We need to select PCI_MSI_ARCH_FALLBACKS when PCI_MSI is selected. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Helge Deller commit e15cc906b9c5af5414bb6002b6a036550bca6bd8 Author: Javier Carrasco Date: Wed Jul 3 18:21:05 2024 +0200 ASoC: wsa884x: Constify struct regmap_config `wsa884x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-9-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 22c361dc7ce4d4d6a688febee57d6e4b130b96b3 Author: Javier Carrasco Date: Wed Jul 3 18:21:04 2024 +0200 ASoC: wsa883x: Constify struct regmap_config `wsa883x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-8-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 5ffab1d3f3f3281869b894070fe4438f307759ec Author: Javier Carrasco Date: Wed Jul 3 18:21:03 2024 +0200 ASoC: wsa881x: Constify struct regmap_config `wsa881x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-7-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 7abfa29ba6a43c5e25622de1ba1f1846b9c9b5e8 Author: Javier Carrasco Date: Wed Jul 3 18:21:02 2024 +0200 ASoC: jz4770: Constify struct regmap_config `jz4760_codec_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-6-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 8d9c0ede48f29c9fccd095952d657fc5696da9ac Author: Javier Carrasco Date: Wed Jul 3 18:21:01 2024 +0200 ASoC: jz4760: Constify struct regmap_config `jz4760_codec_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-5-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 52f0aa5fb9437013f7f35d61426de497a8927891 Author: Javier Carrasco Date: Wed Jul 3 18:21:00 2024 +0200 ASoC: cs53l30: Constify struct regmap_config `cs53l30_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-4-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 0271df05e6fe92b7000dcce5058a0ed6af127ef6 Author: Javier Carrasco Date: Wed Jul 3 18:20:59 2024 +0200 ASoC: cs35l36: Constify struct regmap_config `cs35l36_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-3-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 306e0317bddfbb6bea1ad31c3daeecaec0304295 Author: Javier Carrasco Date: Wed Jul 3 18:20:58 2024 +0200 ASoC: cs35l35: Constify struct regmap_config `cs35l35_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-2-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit cb148180125ef88a4c1c20ecf25337f1e45657bb Author: Javier Carrasco Date: Wed Jul 3 18:20:57 2024 +0200 ASoC: cs35l34: Constify struct regmap_config `cs35l34_regmap` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://patch.msgid.link/20240703-sound-const-regmap_config-v1-1-2e379b0446a7@gmail.com Signed-off-by: Mark Brown commit 91419b0d9ab203945e0ed4efb3cab84c45df0a21 Merge: c288f0a1c08ef 244389bd42870 Author: Mark Brown Date: Wed Jul 3 17:30:47 2024 +0100 ASoC: cs35l56: Set correct upper volume limit Merge series from Richard Fitzgerald : These two commits set the upper limit of the Speaker Volume control to +12dB instead of +100dB. This should have been a simple 1-line change to the #define in the header file, but only the HDA cs35l56 driver is using this define. The ASoC cs35l56 driver was using hardcoded numbers instead of the header defines. So the first commit changes the ASoC driver to use the #defined constants. The second commit corrects the value of the constant. commit 74cc150282e41c6c0704cd305c9a4392dc64ef4d Author: Christoph Hellwig Date: Tue Jul 2 17:10:24 2024 +0200 block: don't free the integrity payload in bio_integrity_unmap_free_user Now that the integrity payload is always freed in bio_uninit, don't bother freeing it a little earlier in bio_integrity_unmap_free_user. With that the separate bio_integrity_unmap_free_user can go away by just passing the bio to bio_integrity_unmap_user. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Kanchan Joshi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240702151047.1746127-7-hch@lst.de Signed-off-by: Jens Axboe commit 85253bac4d02b1f95d6109c221aeccd7a262ec4d Author: Christoph Hellwig Date: Tue Jul 2 17:10:23 2024 +0200 block: don't free submitter owned integrity payload on I/O completion Currently __bio_integrity_endio frees the integrity payload unless it is explicitly marked as user-mapped. This means in-kernel callers that allocate their own integrity payload never get to see it on I/O completion. The current two users don't need it as they just pre-mapped PI tuples received over the network, but this limits uses of integrity data lot. Change bio_integrity_endio to call __bio_integrity_endio for block layer generated integrity data only, and leave freeing of submitter allocated integrity data to bio_uninit which also gets called from the final bio_put. This requires that unmapping user mapped or copied integrity data is now always done by the caller, and the special BIP_INTEGRITY_USER flag can go away. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Kanchan Joshi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240702151047.1746127-6-hch@lst.de Signed-off-by: Jens Axboe commit f8924374fd37a8b41d554acd8b7407af7d354c0d Author: Christoph Hellwig Date: Tue Jul 2 17:10:22 2024 +0200 block: call bio_integrity_unmap_free_user from blk_rq_unmap_user blk_rq_unmap_user always unmaps user space pass-through request. If such a request has integrity data attached it must come from a user mapping as well. Call bio_integrity_unmap_free_user from blk_rq_unmap_user and remove the nvme_unmap_bio wrapper in the nvme driver. Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Anuj Gupta Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240702151047.1746127-5-hch@lst.de Signed-off-by: Jens Axboe commit bf4c89fc8797f5c0964a0c3d561fbe7e8483b62f Author: Christoph Hellwig Date: Tue Jul 2 17:10:21 2024 +0200 block: don't call bio_uninit from bio_endio Commit b222dd2fdd53 ("block: call bio_uninit in bio_endio") added a call to bio_uninit in bio_endio to work around callers that use bio_init but fail to call bio_uninit after they are done to release the resources. While this is an abuse of the bio_init API we still have quite a few of those left. But this early uninit causes a problem for integrity data, as at least some users need the bio_integrity_payload. Right now the only one is the NVMe passthrough which archives this by adding a special case to skip the freeing if the BIP_INTEGRITY_USER flag is set. Sort this out by only putting bi_blkg in bio_endio as that is the cause of the actual leaks - the few users of the crypto context and integrity data all properly call bio_uninit, usually through bio_put for dynamically allocated bios. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240702151047.1746127-4-hch@lst.de Signed-off-by: Jens Axboe commit 21671a1ed1ff22e158ebe9d619943f926f03f5cd Author: Christoph Hellwig Date: Tue Jul 2 17:10:20 2024 +0200 block: also return bio_integrity_payload * from stubs struct bio_integrity_payload is defined unconditionally. No need to return void * from bio_integrity() and bio_integrity_alloc(). Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Anuj Gupta Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240702151047.1746127-3-hch@lst.de Signed-off-by: Jens Axboe commit da042a3655151157c06e71a583e883ab2d86d1ff Author: Christoph Hellwig Date: Tue Jul 2 17:10:19 2024 +0200 block: split integrity support out of bio.h Split struct bio_integrity_payload and the related prototypes out of bio.h into a separate bio-integrity.h header so that it is only pulled in by the few places that need it. Signed-off-by: Christoph Hellwig Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240702151047.1746127-2-hch@lst.de Signed-off-by: Jens Axboe commit 1a50d1467077c0d6f504bdbb66e6fa0dcd5b3b01 Merge: 98d34c087249d 22a40d14b572d Author: Jens Axboe Date: Wed Jul 3 10:20:05 2024 -0600 Merge tag 'v6.10-rc6' into for-6.11/block-post Pull in v6.10-rc6 to resolve a conflict for the integrity cleanups. * tag 'v6.10-rc6': (778 commits) Linux 6.10-rc6 ata: ahci: Clean up sysfs file on error ata: libata-core: Fix double free on error ata,scsi: libata-core: Do not leak memory for ata_port struct members ata: libata-core: Fix null pointer dereference on error x86-32: fix cmpxchg8b_emu build error with clang x86: stop playing stack games in profile_pc() i2c: testunit: discard write requests while old command is running i2c: testunit: don't erase registers after STOP tty: mxser: Remove __counted_by from mxser_board.ports[] randomize_kstack: Remove non-functional per-arch entropy filtering string: kunit: add missing MODULE_DESCRIPTION() macros ata: libata-core: Add ATA_HORKAGE_NOLPM for all Crucial BX SSD1 models MAINTAINERS: Update IOMMU tree location tools/power turbostat: Add local build_bug.h header for snapshot target tools/power turbostat: Fix unc freq columns not showing with '-q' or '-l' tools/power turbostat: option '-n' is ambiguous drm/drm_file: Fix pid refcounting race kallsyms: rework symbol lookup return codes gpiolib: cdev: Ignore reconfiguration without direction ... Signed-off-by: Jens Axboe commit 685505219723147b10353b9018ab0c8706934290 Author: Thomas Zimmermann Date: Thu Dec 5 17:01:40 2019 +0100 drm/mgag200: Rename constant MGAREG_Status to MGAREG_STATUS Register constants are upper case. Fix MGAREG_Status accordingly. Signed-off-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Reviewed-by: Emil Velikov Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191205160142.3588-3-tzimmermann@suse.de commit 3753311c9190f833963fb47336dfe17221d93706 Author: Lu Baolu Date: Tue Jul 2 21:08:39 2024 +0800 iommu/vt-d: Refactor PCI PRI enabling/disabling callbacks Commit 0095bf83554f8 ("iommu: Improve iopf_queue_remove_device()") specified the flow for disabling the PRI on a device. Refactor the PRI callbacks in the intel iommu driver to better manage PRI enabling and disabling and align it with the device queue interfaces in the iommu core. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240701112317.94022-3-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20240702130839.108139-8-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit f90584f4beb84211c4d21b319cc13f391fe9f3c2 Author: Lu Baolu Date: Tue Jul 2 21:08:38 2024 +0800 iommu/vt-d: Add helper to flush caches for context change This helper is used to flush the related caches following a change in a context table entry that was previously present. The VT-d specification provides guidance for such invalidations in section 6.5.3.3. This helper replaces the existing open code in the code paths where a present context entry is being torn down. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240701112317.94022-2-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20240702130839.108139-7-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 2b989ab9bc89b29dd4b5509408b8fa42337eda56 Author: Lu Baolu Date: Tue Jul 2 21:08:37 2024 +0800 iommu/vt-d: Add helper to allocate paging domain The domain_alloc_user operation is currently implemented by allocating a paging domain using iommu_domain_alloc(). This is because it needs to fully initialize the domain before return. Add a helper to do this to avoid using iommu_domain_alloc(). Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240610085555.88197-16-baolu.lu@linux.intel.com Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20240702130839.108139-6-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 804f98e224e41c16e3b70f97790f84894745a392 Author: Lu Baolu Date: Tue Jul 2 21:08:36 2024 +0800 iommu/vt-d: Downgrade warning for pre-enabled IR Emitting a warning is overkill in intel_setup_irq_remapping() since the interrupt remapping is pre-enabled. For example, there's no guarantee that kexec will explicitly disable interrupt remapping before booting a new kernel. As a result, users are seeing warning messages like below when they kexec boot a kernel, though there is nothing wrong: DMAR-IR: IRQ remapping was enabled on dmar18 but we are not in kdump mode DMAR-IR: IRQ remapping was enabled on dmar17 but we are not in kdump mode DMAR-IR: IRQ remapping was enabled on dmar16 but we are not in kdump mode ... ... Downgrade the severity of this message to avoid user confusion. CC: Paul Menzel Link: https://lore.kernel.org/linux-iommu/5517f76a-94ad-452c-bae6-34ecc0ec4831@molgen.mpg.de/ Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240625043912.258036-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20240702130839.108139-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit e995fcde6070f0981e083c1e2e17e401e6c17ad9 Author: Lu Baolu Date: Tue Jul 2 21:08:35 2024 +0800 iommu/vt-d: Remove control over Execute-Requested requests The VT-d specification has removed architectural support of the requests with pasid with a value of 1 for Execute-Requested (ER). And the NXE bit in the pasid table entry and XD bit in the first-stage paging Entries are deprecated accordingly. Remove the programming of these bits to make it consistent with the spec. Suggested-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240624032351.249858-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20240702130839.108139-4-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 5fbf97371dc0a48794280445bc94e2e15dd81a63 Author: Lu Baolu Date: Tue Jul 2 21:08:34 2024 +0800 iommu/vt-d: Remove comment for def_domain_type The comment for def_domain_type is outdated. Part of it is irrelevant. Furthermore, it could just be deleted since the iommu_ops::def_domain_type callback is properly documented in iommu.h, so individual implementations shouldn't need to repeat that. Remove it to avoid confusion. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240624024327.234979-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20240702130839.108139-3-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit b5e86a95541cea737394a1da967df4cd4d8f7182 Author: Jacob Pan Date: Tue Jul 2 21:08:33 2024 +0800 iommu/vt-d: Handle volatile descriptor status read Queued invalidation wait descriptor status is volatile in that IOMMU hardware writes the data upon completion. Use READ_ONCE() to prevent compiler optimizations which ensures memory reads every time. As a side effect, READ_ONCE() also enforces strict types and may add an extra instruction. But it should not have negative performance impact since we use cpu_relax anyway and the extra time(by adding an instruction) may allow IOMMU HW request cacheline ownership easier. e.g. gcc 12.3 BEFORE: 81 38 ad de 00 00 cmpl $0x2,(%rax) AFTER (with READ_ONCE()) 772f: 8b 00 mov (%rax),%eax 7731: 3d ad de 00 00 cmp $0x2,%eax //status data is 32 bit Signed-off-by: Jacob Pan Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20240607173817.3914600-1-jacob.jun.pan@linux.intel.com Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20240702130839.108139-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 6fe920b4fc18bed2f1946dab9b4d6784958cafc4 Author: Théo Lebrun Date: Fri Jun 28 18:11:52 2024 +0200 MAINTAINERS: Mobileye: add OLB drivers and dt-bindings Register OLB-related files part of the "MOBILEYE MIPS SOCS" MAINTAINERS section. Those include: - drivers (clk-eyeq, reset-eyeq, pinctrl-eyeq5), - dt-bindings (mobileye,eyeq5-olb.yaml file), - bindings includes file . Signed-off-by: Théo Lebrun Signed-off-by: Thomas Bogendoerfer commit 9b7e81a9bf2c65af2f78c51da61d9e0647f36fd1 Author: Théo Lebrun Date: Fri Jun 28 18:11:51 2024 +0200 MIPS: mobileye: eyeq5: add OLB system-controller node The OLB ("Other Logic Block") is a system-controller region hosting clock, reset and pin controllers. It contains registers such as I2C speed mode that need to be accessible by other nodes. Remove fixed-clocks previously used; replace references. Add parent crystal clock, fixed at 30MHz. Add pin nodes for all functions. Add mobileye,eyeq5-olb compatible node, hosting clk, reset and pinctrl. Add reset and pinctrl references to UART nodes. Signed-off-by: Théo Lebrun Signed-off-by: Thomas Bogendoerfer commit bde4b22dc526dea5c1170f2645f268c1d78c924e Author: Théo Lebrun Date: Fri Jun 28 18:11:50 2024 +0200 dt-bindings: soc: mobileye: add EyeQ OLB system controller Add documentation to describe the "Other Logic Block" system-controller. It deals with three platforms: EyeQ5, EyeQ6L and EyeQ6H. First two have a single instance, whereas EyeQ6H has seven named instances. Features provided are: - Clocks, children to main crystal. Some PLLs and divider clocks. - Resets. Some instances DO NOT have reset. - Pinctrl. Only EyeQ5 has such feature. Those are NOT the only features exposed in OLB system-controllers! Many individual registers, related to IP block integration, can be found. Additional features will be exposed over time. We simplify devicetree phandles to OLB in two ways: - Compatibles exposing a single clock do not ask for a index argument. This means we use EyeQ6H OLB south (it has four clocks): clocks = <&olb_south EQ6HC_SOUTH_PLL_PER>; But use EyeQ6H OLB east (it has one clock): clocks = <&olb_east>; - Compatibles exposing a single reset domain do not ask for a domain index, only a reset index. This means we use EyeQ5 OLB (it has three domains): resets = <&olb 0 10>; But use EyeQ6H west reset (it has one domain): resets = <&olb_west 3>; About pinctrl subnodes: all pins have two functionality, either GPIO or something-else. The latter is pin dependent, we express constraints using many if-then. Reviewed-by: Rob Herring (Arm) Signed-off-by: Théo Lebrun Signed-off-by: Thomas Bogendoerfer commit 02c76df921ae76634933107e082e1c1d00b21120 Author: Dmitry Torokhov Date: Mon Jul 1 16:48:42 2024 -0700 MIPS: Alchemy: switch to use software nodes for GPIOs Switch to use software nodes/properties to describe GPIOs for the ADS7846 touchscreen and the SPI controller (away from using GPIO lookup tables). This allows removing use of ADS7846 platform data, which will be going away. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Signed-off-by: Thomas Bogendoerfer commit cd01672d64a358cccc087c8b845ebe6b7e9e2ca4 Author: Anton Ivanov Date: Tue Jul 2 10:25:50 2024 +0200 um: Enable preemption in UML Since userspace state is saved in the MM process, kernel using FPU still doesn't really need to do anything, so this really is as simple as enabling preemption. The irq critical section in sigio_handler() needs preempt_disable()/preempt_enable(). Signed-off-by: Anton Ivanov Link: https://patch.msgid.link/20240702102549.d2fcea450854.I12f5a53d80ec1e425e66ef272b1e95cb523b608e@changeid [rebase, remove FPU save/restore, fix x86/um Makefile, rewrite commit message] Signed-off-by: Johannes Berg commit bcf3d957c63d8b6d718b862fea18c5f14ce803e2 Author: Benjamin Berg Date: Wed Jul 3 15:45:36 2024 +0200 um: refactor TLB update handling Conceptually, we want the memory mappings to always be up to date and represent whatever is in the TLB. To ensure that, we need to sync them over in the userspace case and for the kernel we need to process the mappings. The kernel will call flush_tlb_* if page table entries that were valid before become invalid. Unfortunately, this is not the case if entries are added. As such, change both flush_tlb_* and set_ptes to track the memory range that has to be synchronized. For the kernel, we need to execute a flush_tlb_kern_* immediately but we can wait for the first page fault in case of set_ptes. For userspace in contrast we only store that a range of memory needs to be synced and do so whenever we switch to that process. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-13-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 573a446fc8ea4ca9be60b1db2091297da48d0a0d Author: Benjamin Berg Date: Wed Jul 3 15:45:35 2024 +0200 um: simplify and consolidate TLB updates The HVC update was mostly used to compress consecutive calls into one. This is mostly relevant for userspace where it is already handled by the syscall stub code. Simplify the whole logic and consolidate it for both kernel and userspace. This does remove the sequential syscall compression for the kernel, however that shouldn't be the main factor in most runs. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-12-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit ef714f15027ca6f72e90d9a198c72e93b855e2a8 Author: Benjamin Berg Date: Wed Jul 3 15:45:34 2024 +0200 um: remove force_flush_all from fork_handler There should be no need for this. It may be that this used to work around another issue where after a clone the MM was in a bad state. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-11-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 5168f6b4a4d8fb5f731f2107924f72dffeae84fc Author: Benjamin Berg Date: Wed Jul 3 15:45:33 2024 +0200 um: Do not flush MM in flush_thread There should be no need to flush the memory in flush_thread. Doing this likely worked around some issue where memory was still incorrectly mapped when creating or cloning an MM. With the removal of the special clone path, that isn't relevant anymore. However, add the flush into MM initialization so that any new userspace MM is guaranteed to be clean. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-10-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 3c83170d7cdf3df12e430c429462776dcb52ff87 Author: Benjamin Berg Date: Wed Jul 3 15:45:32 2024 +0200 um: Delay flushing syscalls until the thread is restarted As running the syscalls is expensive due to context switches, we should do so as late as possible in case more syscalls need to be queued later on. This will also benefit a later move to a SECCOMP enabled userspace as in that case the need for extra context switches is removed entirely. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-9-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit a5d2cfe749e2917266956751262328da35e0925d Author: Benjamin Berg Date: Wed Jul 3 15:45:31 2024 +0200 um: remove copy_context_skas0 The kernel flushes the memory ranges anyway for CoW and does not assume that the userspace process has anything set up already. So, start with a fresh process for the new mm context. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-8-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 7911b650a0708a3ee3412d80838b9574b21a53c8 Author: Benjamin Berg Date: Wed Jul 3 15:45:30 2024 +0200 um: remove LDT support The current LDT code has a few issues that mean it should be redone in a different way once we always start with a fresh MM even when cloning. In a new and better world, the kernel would just ensure its own LDT is clear at startup. At that point, all that is needed is a simple function to populate the LDT from another MM in arch_dup_mmap combined with some tracking of the installed LDT entries for each MM. Note that the old implementation was even incorrect with regard to reading, as it copied out the LDT entries in the internal format rather than converting them to the userspace structure. Removal should be fine as the LDT is not used for thread-local storage anymore. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-7-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 6d8992e49e2aed3ee2d73b88050f40f26ae6bf86 Author: Benjamin Berg Date: Wed Jul 3 15:45:29 2024 +0200 um: compress memory related stub syscalls while adding them To keep the number of syscalls that the stub has to do lower, compress two consecutive syscalls of the same type if the second is just a continuation of the first. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-6-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 76ed9158e1d474e963fc59da7a461b27a2212c5a Author: Benjamin Berg Date: Wed Jul 3 15:45:28 2024 +0200 um: Rework syscall handling Rework syscall handling to be platform independent. Also create a clean split between queueing of syscalls and flushing them out, removing the need to keep state in the code that triggers the syscalls. The code adds syscall_data_len to the global mm_id structure. This will be used later to allow surrounding code to track whether syscalls still need to run and if errors occurred. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-5-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 542dc79f6ea601788704a79ff54283c2bea265e9 Author: Benjamin Berg Date: Wed Jul 3 15:45:27 2024 +0200 um: Add generic stub_syscall6 function This function will be used by the new syscall handling code. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-4-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit dc26184a9d4acde988e996a437b0301b81c1ae2d Author: Benjamin Berg Date: Wed Jul 3 15:45:26 2024 +0200 um: Create signal stack memory assignment in stub_data When we switch to use seccomp, we need both the signal stack and other data (i.e. syscall information) to co-exist in the stub data. To facilitate this, start by defining separate memory areas for the stack and syscall data. This moves the signal stack onto a new page as the memory area is not sufficient to hold both signal stack and syscall information. Only change the signal stack setup for now, as the syscall code will be reworked later. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-3-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit d1d3a2e69b2419d77f8f99315ac931c5ba3cb475 Author: Benjamin Berg Date: Wed Jul 3 15:45:25 2024 +0200 um: Remove stub-data.h include from common-offsets.h Further commits will require values from common-offsets.h inside stub-data.h. Resolve the possible circular dependency and simply use offsetof() inside stub_32.h and stub_64.h. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20240703134536.1161108-2-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 2cf3a3c4b84def5406b830452b1cb8bbfffe0ebe Author: Johannes Berg Date: Wed Jul 3 13:01:45 2024 +0200 um: time-travel: fix signal blocking race/hang When signals are hard-blocked in order to do time-travel socket processing, we set signals_blocked and then handle SIGIO signals by setting the SIGIO bit in signals_pending. When unblocking, we first set signals_blocked to 0, and then handle all pending signals. We have to set it first, so that we can again properly block/unblock inside the unblock, if the time-travel handlers need to be processed. Unfortunately, this is racy. We can get into this situation: // signals_pending = SIGIO_MASK unblock_signals_hard() signals_blocked = 0; if (signals_pending && signals_enabled) { block_signals(); unblock_signals() ... sig_handler_common(SIGIO, NULL, NULL); sigio_handler() ... sigio_reg_handler() irq_do_timetravel_handler() reg->timetravel_handler() == vu_req_interrupt_comm_handler() vu_req_read_message() vhost_user_recv_req() vhost_user_recv() vhost_user_recv_header() // reads 12 bytes header of // 20 bytes message <-- receive SIGIO here <-- sig_handler() int enabled = signals_enabled; // 1 if ((signals_blocked || !enabled) && (sig == SIGIO)) { if (!signals_blocked && time_travel_mode == TT_MODE_EXTERNAL) sigio_run_timetravel_handlers() _sigio_handler() sigio_reg_handler() ... as above ... vhost_user_recv_header() // reads 8 bytes that were message payload // as if it were header - but aborts since // it then gets -EAGAIN ... --> end signal handler --> // continue in vhost_user_recv() // full_read() for 8 bytes payload busy loops // entire process hangs here Conceptually, to fix this, we need to ensure that the signal handler cannot run while we hard-unblock signals. The thing that makes this more complex is that we can be doing hard-block/unblock while unblocking. Introduce a new signals_blocked_pending variable that we can keep at non-zero as long as pending signals are being processed, then we only need to ensure it's decremented safely and the signal handler will only increment it if it's already non-zero (or signals_blocked is set, of course.) Note also that only the outermost call to hard-unblock is allowed to decrement signals_blocked_pending, since it could otherwise reach zero in an inner call, and leave the same race happening if the timetravel_handler loops, but that's basically required of it. Fixes: d6b399a0e02a ("um: time-travel/signals: fix ndelay() in interrupt") Link: https://patch.msgid.link/20240703110144.28034-2-johannes@sipsolutions.net Signed-off-by: Johannes Berg commit 45610225885564dc1f962cc5be02e3b33ca81de2 Author: Johannes Berg Date: Wed Jul 3 13:01:05 2024 +0200 um: time-travel: remove time_exit() This function is unused and unneeded, remove it. Link: https://patch.msgid.link/20240703130105.02b3a974acb7.I7264821f7cfa17ea713b7a3e4787aa41a3107d01@changeid Signed-off-by: Johannes Berg commit 74c3f5da233637bdf828e1ce67a5c1083630a47b Author: Imre Deak Date: Fri Jun 28 19:44:43 2024 +0300 drm/display/dsc: Add a helper to dump the DSC configuration Add a helper to dump the Display Stream Compression configuration, taken into use in the i915 driver by a later patch. v2: - Rebase on the s/DRM_X16/FXP_Q4 change. - s/DSC configration/DSC configuration in the function documentation. Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240628164451.1177612-3-imre.deak@intel.com commit 58cd0cba82976a5a21bdfc78783952b147837a84 Author: Imre Deak Date: Fri Jun 28 19:44:42 2024 +0300 drm: Add helpers for q4 fixed point values Add helpers to convert between q4 fixed point and integer/fraction values. Also add the format/argument macros required to printk q4 fixed point variables. The q4 notation is based on the short variant described by https://en.wikipedia.org/wiki/Q_(number_format) where only the number of fraction bits in the fixed point value are defined, while the full size is deducted from the container type, that is the size of int for these helpers. Using the fxp_ prefix, which makes moving these helpers outside of drm to a more generic place easier, if they prove to be useful. These are needed by later patches dumping the Display Stream Compression configuration in DRM core and in the i915 driver to replace the corresponding bpp_x16 helpers defined locally in the driver. v2: Use the more generic/descriptive fxp_q4 prefix instead of drm_x16. (Jani) Cc: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240628164451.1177612-2-imre.deak@intel.com commit eea6a8322efd3982e59c41a5b61948a0b043ca58 Author: Eric Sandeen Date: Tue Jul 2 17:23:24 2024 -0500 fuse: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/4e1a4efa-4ca5-4358-acee-40efd07c3c44@redhat.com Reviewed-by: Christian Brauner Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 525bd65aa759ec320af1dc06e114ed69733e9e23 Author: Eric Sandeen Date: Tue Jul 2 17:22:41 2024 -0500 fuse: verify {g,u}id mount options correctly As was done in 0200679fc795 ("tmpfs: verify {g,u}id mount options correctly") we need to validate that the requested uid and/or gid is representable in the filesystem's idmapping. Cribbing from the above commit log, The contract for {g,u}id mount options and {g,u}id values in general set from userspace has always been that they are translated according to the caller's idmapping. In so far, fuse has been doing the correct thing. But since fuse is mountable in unprivileged contexts it is also necessary to verify that the resulting {k,g}uid is representable in the namespace of the superblock. Fixes: c30da2e981a7 ("fuse: convert to use the new mount API") Cc: stable@vger.kernel.org # 5.4+ Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/8f07d45d-c806-484d-a2e3-7a2199df1cd2@redhat.com Reviewed-by: Christian Brauner Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 580724fce27f2b71b3e4d58bbe6d83b671929b33 Author: Jiaxun Yang Date: Wed Jun 12 09:54:32 2024 +0100 MIPS: sync-r4k: Rework based on x86 tsc_sync The original sync-r4k did a good job on reducing jitter by determine the "next time value", but it has a limitation that when synchronization being performed too many times due to high core count or CPU hotplug, the timewrap on CPU0 will become unaccpetable. Rework the mechanism based on latest x86 tsc_sync. (It seems like the original implementation is based on tsc_sync at that time, so it's just a refresh.) To improve overall performance. Tesed on Loongson64, Boston, QEMU. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 7464c0762e96904b6bf686a4dc8b3255adf1c890 Author: Jiaxun Yang Date: Wed Jun 12 09:54:31 2024 +0100 MIPS: csrc-r4k: Don't register as sched_clock if unfit When we have more than one CPU in system, counter synchronisation overhead can lead to a scenario that sched_clock goes backward when being read from different CPUs. This is accommodated by CONFIG_HAVE_UNSTABLE_SCHED_CLOCK, but it's unavailable on 32bit kernel. We don't want to risk sched_clock correctness, so if we have multiple CPU in system and CONFIG_HAVE_UNSTABLE_SCHED_CLOCK is not set, we just don't use counter as sched_clock source. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 426fa8e4fe7bb914b5977cbce453a9926bf5b2e6 Author: Jiaxun Yang Date: Wed Jun 12 09:54:30 2024 +0100 MIPS: csrc-r4k: Select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT csrc-r4k suffers from SMP synchronization overhead. Select HAVE_UNSTABLE_SCHED_CLOCK to workaround drift between the CPUs on the system. HAVE_UNSTABLE_SCHED_CLOCK requires cmpxchg64, so enable it for 64 bits only. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 25c776dd03b3e3ee16ad3402feabe20d811c7cb2 Author: Kunkun Jiang Date: Wed Jul 3 11:16:04 2024 +0100 iommu/arm-smmu-v3: Enable HTTU for stage1 with io-pgtable mapping If io-pgtable quirk flag indicates support for hardware update of dirty state, enable HA/HD bits in the SMMU CD and also set the DBM bit in the page descriptor. Now report the dirty page tracking capability of SMMUv3 and select IOMMUFD_DRIVER for ARM_SMMU_V3 if IOMMUFD is enabled. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Kunkun Jiang Signed-off-by: Joao Martins Reviewed-by: Ryan Roberts Reviewed-by: Jason Gunthorpe Reviewed-by: Nicolin Chen Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20240703101604.2576-6-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit eb054d67b21a53f6ccf3af49a62fb99397b48fc2 Author: Joao Martins Date: Wed Jul 3 11:16:03 2024 +0100 iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc This provides all the infrastructure to enable dirty tracking if the hardware has the capability and domain alloc request for it. Also, add a device_iommu_capable() check in iommufd core for IOMMU_CAP_DIRTY_TRACKING before we request a user domain with dirty tracking support. Please note, we still report no support for IOMMU_CAP_DIRTY_TRACKING as it will finally be enabled in a subsequent patch. Signed-off-by: Joao Martins Reviewed-by: Ryan Roberts Reviewed-by: Jason Gunthorpe Reviewed-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20240703101604.2576-5-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit 4fe88fd8b4aecb7f9680bf898811db76b94095a9 Author: Shameer Kolothum Date: Wed Jul 3 11:16:02 2024 +0100 iommu/io-pgtable-arm: Add read_and_clear_dirty() support .read_and_clear_dirty() IOMMU domain op takes care of reading the dirty bits (i.e. PTE has DBM set and AP[2] clear) and marshalling into a bitmap of a given page size. While reading the dirty bits we also set the PTE AP[2] bit to mark it as writeable-clean depending on read_and_clear_dirty() flags. PTE states with respect to DBM bit: DBM bit AP[2]("RDONLY" bit) 1. writable_clean 1 1 2. writable_dirty 1 0 3. read-only 0 1 Reviewed-by: Ryan Roberts Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20240703101604.2576-4-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit 2f8d6178b4fe3e2f50782fa640921a9ee46b6d6f Author: Jean-Philippe Brucker Date: Wed Jul 3 11:16:01 2024 +0100 iommu/arm-smmu-v3: Add feature detection for HTTU If the SMMU supports it and the kernel was built with HTTU support, Probe support for Hardware Translation Table Update (HTTU) which is essentially to enable hardware update of access and dirty flags. Probe and set the smmu::features for Hardware Dirty and Hardware Access bits. This is in preparation, to enable it on the context descriptors of stage 1 format. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Joao Martins Reviewed-by: Jason Gunthorpe Reviewed-by: Ryan Roberts Reviewed-by: Kevin Tian Reviewed-by: Nicolin Chen Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20240703101604.2576-3-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit 52acd7d8a4130ad4dda6540dbbb821a92e1c0138 Author: Shameer Kolothum Date: Wed Jul 3 11:16:00 2024 +0100 iommu/arm-smmu-v3: Add support for domain_alloc_user fn This will be used by iommufd for allocating usr managed domains and is also required when we add support for iommufd based dirty tracking support. Reviewed-by: Jason Gunthorpe Reviewed-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20240703101604.2576-2-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit 7190401fc56fb5f02ee3d04476778ab000bbaf32 Author: Jiaxun Yang Date: Wed Jun 12 09:54:29 2024 +0100 MIPS: csrc-r4k: Apply verification clocksource flags CP0 counter suffers from various problems like SMP sync, behaviour on wait. Set CLOCK_SOURCE_MUST_VERIFY and CLOCK_SOURCE_VERIFY_PERCPU, as what x86 did to TSC, to let kernel test it before use. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit c171186c177970d3ec22dd814f2693f1f7fc1e7d Author: Jiaxun Yang Date: Wed Jun 12 09:54:28 2024 +0100 MIPS: csrc-r4k: Refine rating computation Increase frequency addend dividend to 10000000 (10MHz) to reasonably accommodate multi GHz level mips_hpt_frequency. Cap rating of csrc-r4k into 299 to ensure it doesn't go into "Desired" range, given all the drama we have with CP0 count registers (SMP sync, behaviour on wait etc). Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit dfd19866d1a3f681cc12aae67ab05011eb3aa3d8 Author: Dr. David Alan Gilbert Date: Thu May 2 16:48:23 2024 +0100 parport: Remove parport_driver.devmodel 'devmodel' hasn't actually been used since: 'commit 3275158fa52a ("parport: remove use of devmodel")' and everyone now has it set to true and has been fixed up; remove the flag. (There are still comments all over about it) Signed-off-by: Dr. David Alan Gilbert Acked-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20240502154823.67235-4-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit ed06e054906c5e7853a36d9ddad8fc94dbb8c252 Author: Dr. David Alan Gilbert Date: Thu May 2 16:48:22 2024 +0100 parport: Remove attach function pointer The attach function pointers haven't actually been called since: 'commit 3275158fa52a ("parport: remove use of devmodel")' topped adding entries to the drivers list. If you're converting a driver, look at the 'match_port' function pointer instead. (There are lots of comment references to 'attach' all over, but they probably need some deeper understanding to check the semantics to see if they can be replaced by match_port). Signed-off-by: Dr. David Alan Gilbert Acked-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20240502154823.67235-3-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit f9a748fa5ce0958bea2a03c25f092fbc22e72c67 Author: Dr. David Alan Gilbert Date: Thu May 2 16:48:21 2024 +0100 parport: Remove 'drivers' list The list has been empty since: 'commit 3275158fa52a ("parport: remove use of devmodel")' This also means we can remove the 'list_head' from struct parport_driver. Signed-off-by: Dr. David Alan Gilbert Acked-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20240502154823.67235-2-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit 2f3fd91b9e6e744fce3cde4e1f8dd6f320548c0e Author: Dr. David Alan Gilbert Date: Mon Jun 24 11:01:04 2024 +0200 mcb: remove unused struct 'mcb_parse_priv' 'mcb_parse_priv' has been unused since the initial commit 3764e82e5150 ("drivers: Introduce MEN Chameleon Bus"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240624090104.12871-2-jth@kernel.org Signed-off-by: Greg Kroah-Hartman commit b45c696c27d6a93917f980a55eaf96a4d08f0e0d Author: Uwe Kleine-König Date: Mon Jun 24 14:51:01 2024 +0200 misc: 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240624125101.1242750-2-u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 822d7335f2a65fe60789e648f5ee3653ad3dd245 Author: Jeff Johnson Date: Sat Jun 15 14:14:36 2024 -0700 bsr: add missing MODULE_DESCRIPTION() macro With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/bsr.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-powerpc-drivers-char-v1-1-bff22fd778a4@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 6e03b4ae257d97714c30f264854ef701fba6c689 Author: Jeff Johnson Date: Sat Jun 15 14:34:06 2024 -0700 platform/goldfish: goldfish_pipe: add missing MODULE_DESCRIPTION() macro With arch=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/goldfish/goldfish_pipe.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-goldfish_pipe-md-v2-1-b4323a969594@quicinc.com Signed-off-by: Greg Kroah-Hartman commit e9d053f4222e79958fbea3c71c563a2d528d0d5e Author: Jeff Johnson Date: Sat Jun 15 14:44:08 2024 -0700 dca: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dca/dca.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-dca-md-v2-1-c4062275a3f1@quicinc.com Signed-off-by: Greg Kroah-Hartman commit d2c5426e5af577f571e8b1b8da090b3d3f7eedfc Author: Jeff Johnson Date: Wed Jun 26 13:41:09 2024 -0700 greybus: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/greybus/greybus.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/greybus/gb-es2.o Add all missing invocations of the MODULE_DESCRIPTION() macro. Acked-by: Alex Elder Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240626-md-drivers-greybus-v2-1-d520ffb9a489@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f060860419172776bb346b608ce7c0923efe2433 Author: Jeff Johnson Date: Thu May 30 21:55:33 2024 -0700 intel_th: msu-sink: add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwtracing/intel_th/intel_th_msu_sink.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240530-md-intel_th_msu_sink-v1-1-ae796336e7b9@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 341bdda64533f11a0cfe87cad3c607019256d6f0 Author: Jeff Johnson Date: Mon Jun 17 22:02:11 2024 -0700 dsp56k: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/dsp56k.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240617-md-m68k-drivers-char-dsp56k-v1-1-56e435ffa664@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 538a00a9fcb2dcb6b16d37e5cef7e8d66911b413 Author: Jeff Johnson Date: Mon Jun 17 22:15:56 2024 -0700 dtlk: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/dtlk.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240617-md-m68k-drivers-char-dtlk-v1-1-a53a237f1f06@quicinc.com Signed-off-by: Greg Kroah-Hartman commit d97fb2571a4babec09c5d1bc701a36824ccfa805 Author: Wolfram Sang Date: Tue Jun 4 23:22:39 2024 +0200 misc: ti-st: st_kim: use 'time_left' variable with wait_for_completion_interruptible_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_interruptible_timeout() causing patterns like: timeout = wait_for_completion_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20240604212240.4529-5-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 4c0fb1af44b98872320bfb0612b1d05be827fc91 Author: Wolfram Sang Date: Tue Jun 4 23:22:38 2024 +0200 misc: tifm: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20240604212240.4529-4-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 531a185d549e1c6225d7e1e553ba1c14dc391d69 Author: Wolfram Sang Date: Tue Jun 4 23:22:37 2024 +0200 misc: bh1770glc: use 'time_left' variable with wait_event_interruptible_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_interruptible_timeout() causing patterns like: timeout = wait_event_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20240604212240.4529-3-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 71f592d204ba2199a8d4fe174a1024cceb9e9096 Author: Wolfram Sang Date: Tue Jun 4 23:22:36 2024 +0200 misc: apds990x: use 'time_left' variable with wait_event_interruptible_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_interruptible_timeout() causing patterns like: timeout = wait_event_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20240604212240.4529-2-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 36c55ce8703ceedfd8cbea1f46d787978f3d2f66 Author: Lei Liu Date: Wed Jun 19 19:38:40 2024 +0800 binder_alloc: Replace kcalloc with kvcalloc to mitigate OOM issues In binder_alloc, there is a frequent need for order3 memory allocation, especially on small-memory mobile devices, which can lead to OOM and cause foreground applications to be killed, resulting in flashbacks. We use kvcalloc to allocate memory, which can reduce system OOM occurrences, as well as decrease the time and probability of failure for order3 memory allocations. Additionally, It has little impact on the throughput of the binder. (as verified by Google's binder_benchmark testing tool). We have conducted multiple tests on an 8GB memory phone, kvcalloc has little performance degradation and resolves frequent OOM issues, Below is a partial excerpt of the test data. throughput(TH_PUT) = (size * Iterations)/Time kcalloc->kvcalloc: Sample with kcalloc(): adb shell stop/ kcalloc /8+256G --------------------------------------------------------------------- Benchmark Time CPU Iterations TH-PUT TH-PUTCPU (ns) (ns) (GB/s) (GB/s) --------------------------------------------------------------------- BM_sendVec_binder4 39126 18550 38894 3.976282 8.38684 BM_sendVec_binder8 38924 18542 37786 7.766108 16.3028 BM_sendVec_binder16 38328 18228 36700 15.32039 32.2141 BM_sendVec_binder32 38154 18215 38240 32.07213 67.1798 BM_sendVec_binder64 39093 18809 36142 59.16885 122.977 BM_sendVec_binder128 40169 19188 36461 116.1843 243.2253 BM_sendVec_binder256 40695 19559 35951 226.1569 470.5484 BM_sendVec_binder512 41446 20211 34259 423.2159 867.8743 BM_sendVec_binder1024 44040 22939 28904 672.0639 1290.278 BM_sendVec_binder2048 47817 25821 26595 1139.063 2109.393 BM_sendVec_binder4096 54749 30905 22742 1701.423 3014.115 BM_sendVec_binder8192 68316 42017 16684 2000.634 3252.858 BM_sendVec_binder16384 95435 64081 10961 1881.752 2802.469 BM_sendVec_binder32768 148232 107504 6510 1439.093 1984.295 BM_sendVec_binder65536 326499 229874 3178 637.8991 906.0329 NORAML TEST SUM 10355.79 17188.15 stressapptest eat 2G SUM 10088.39 16625.97 Sample with kvcalloc(): adb shell stop/ kvcalloc /8+256G ---------------------------------------------------------------------- Benchmark Time CPU Iterations TH-PUT TH-PUTCPU (ns) (ns) (GB/s) (GB/s) ---------------------------------------------------------------------- BM_sendVec_binder4 39673 18832 36598 3.689965 7.773577 BM_sendVec_binder8 39869 18969 37188 7.462038 15.68369 BM_sendVec_binder16 39774 18896 36627 14.73405 31.01355 BM_sendVec_binder32 40225 19125 36995 29.43045 61.90013 BM_sendVec_binder64 40549 19529 35148 55.47544 115.1862 BM_sendVec_binder128 41580 19892 35384 108.9262 227.6871 BM_sendVec_binder256 41584 20059 34060 209.6806 434.6857 BM_sendVec_binder512 42829 20899 32493 388.4381 796.0389 BM_sendVec_binder1024 45037 23360 29251 665.0759 1282.236 BM_sendVec_binder2048 47853 25761 27091 1159.433 2153.735 BM_sendVec_binder4096 55574 31745 22405 1651.328 2890.877 BM_sendVec_binder8192 70706 43693 16400 1900.105 3074.836 BM_sendVec_binder16384 96161 64362 10793 1838.921 2747.468 BM_sendVec_binder32768 147875 107292 6296 1395.147 1922.858 BM_sendVec_binder65536 330324 232296 3053 605.7126 861.3209 NORAML TEST SUM 10033.56 16623.35 stressapptest eat 2G SUM 9958.43 16497.55 Signed-off-by: Lei Liu Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20240619113841.3362-1-liulei.rjpt@vivo.com Signed-off-by: Greg Kroah-Hartman commit 15d9da3f818cae676f822a04407d3c17b53357d2 Author: Carlos Llamas Date: Wed Jun 12 04:25:13 2024 +0000 binder: use bitmap for faster descriptor lookup When creating new binder references, the driver assigns a descriptor id that is shared with userspace. Regrettably, the driver needs to keep the descriptors small enough to accommodate userspace potentially using them as Vector indexes. Currently, the driver performs a linear search on the rb-tree of references to find the smallest available descriptor id. This approach, however, scales poorly as the number of references grows. This patch introduces the usage of bitmaps to boost the performance of descriptor assignments. This optimization results in notable performance gains, particularly in processes with a large number of references. The following benchmark with 100,000 references showcases the difference in latency between the dbitmap implementation and the legacy approach: [ 587.145098] get_ref_desc_olocked: 15us (dbitmap on) [ 602.788623] get_ref_desc_olocked: 47343us (dbitmap off) Note the bitmap size is dynamically adjusted in line with the number of references, ensuring efficient memory usage. In cases where growing the bitmap is not possible, the driver falls back to the slow legacy method. A previous attempt to solve this issue was proposed in [1]. However, such method involved adding new ioctls which isn't great, plus older userspace code would not have benefited from the optimizations either. Link: https://lore.kernel.org/all/20240417191418.1341988-1-cmllamas@google.com/ [1] Cc: Tim Murray Cc: Arve Hjønnevåg Cc: Alice Ryhl Cc: Martijn Coenen Cc: Todd Kjos Cc: John Stultz Cc: Steven Moreland Suggested-by: Nick Chen Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20240612042535.1556708-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 6406c5d5512c0814b8c155df7f833a98d9069a72 Author: Devarsh Thakkar Date: Thu Jun 13 20:39:01 2024 +0530 arm64: dts: ti: k3-am62a7-sk: Reserve 576MiB of global CMA Reserve 576MiB of CMA as global CMA pool starting after initial 1GiB of DDR. AM62ax has different multimedia components such as Camera, Display, H.264 VPU and JPEG Encoder which use CMA for buffer allocations. The 12x 720x480 realtime VPU decode use-case requires 544MiB of CMA, additional 32MiB is kept as buffer in case some other peripheral also require it while VPU is running. The reason to choose latter 1GiB is to not overlap with existing memory map which is utilizing initial 1GiB for remoteproc firmwares as shared here [1]. Also some drivers such as JPEG require 32bit addressing so not allocating from higher DDR address. Link: https://lore.kernel.org/all/20240605124859.3034-5-hnagalla@ti.com [1] Signed-off-by: Devarsh Thakkar Tested-by: Brandon Brnich Reviewed-by: Randolph Sapp Link: https://lore.kernel.org/r/20240613150902.2173582-3-devarsht@ti.com Signed-off-by: Vignesh Raghavendra commit 9e8560556f9c41da28118af3385b4e9dc832ae2b Author: Devarsh Thakkar Date: Thu Jun 13 20:39:00 2024 +0530 arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA Reserve 128MiB of global CMA which is also marked as re-usable so that OS can also use the same if peripheral drivers are not using the same. AM62x supports multimedia components such as GPU, dual Display and Camera. Assuming the worst-case scenario where all 3 are run in parallel below is the calculation : 1) OV5640 camera sensor supports 1920x1080 resolution -> 1920 width x 1080 height x 2 bytesperpixel x 8 buffers (default in yavta) : 32MiB 2) 1920x1200 Microtips LVDS panel supported -> 1920 width x 1080 height x 4 bytesperpixel x 2 buffers : 16 MiB 3) 1920x1080 HDMI display supported -> 1920 width x 1080 height x 4 bytesperpixel x 2 buffers : 15.82 MiB which is ~16 MiB 4) IMG GPU shares with display allocated buffers while rendering but in case some dedicated operation viz color conversion, keeping same window of ~16 MiB for GPU too. Total is 80 MiB and adding 32 MiB for other peripherals and extra 16 MiB to keep as buffer for fragmentation thus rounding total to 128 MiB. Signed-off-by: Devarsh Thakkar Reviewed-by: Randolph Sapp Link: https://lore.kernel.org/r/20240613150902.2173582-2-devarsht@ti.com Signed-off-by: Vignesh Raghavendra commit c288f0a1c08efa65f9e3bb7954eb3cefb966c97d Author: Chancel Liu Date: Fri Jun 28 18:43:54 2024 +0900 ASoC: fsl_xcvr: Improve suspend/resume flow in fsl_xcvr_trigger() In the current flow all interrupts are disabled in runtime suspend phase. However interrupts enablement only exists in fsl_xcvr_prepare(). After resume fsl_xcvr_prepare() may not be called so it will cause all interrupts still disabled even if resume from suspend. Interrupts should be explictily enabled after resume. Also, DPATH reset setting only exists in fsl_xcvr_prepare(). After resume from suspend DPATH should be reset otherwise there'll be channel swap issue. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://patch.msgid.link/20240628094354.780720-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit d3401cefd0f793037df0f36e12c2effdac517de1 Author: Tom Mounet Date: Sat Jun 29 19:47:04 2024 +0200 staging: nvec: Use x instead of x != NULL to improve readability. Use x instead of x != NULL to improve readability. Issue identified by checkpatch. Signed-off-by: Tom Mounet Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/66804898.5d0a0220.6df0f.4f0a@mx.google.com Signed-off-by: Greg Kroah-Hartman commit 179264157bbaf3d169b184160d0b5283f8a50e73 Author: Thinh Nguyen Date: Tue Jul 2 00:19:14 2024 +0000 usb: dwc3: core: Check all ports when set phy suspend The dwc3_enable_susphy() applies to all available ports. After the introduction of multi-port in dwc3, we now know the number of ports. Go through the phy suspend registers of each port to enable/disable phy suspend in dwc3_enable_susphy(). Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/31e18192c607dff0a7e5ca139dd5737d2224122a.1719879346.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 62ce9ef1479729b1a3f8a1b19900e28d68b3625e Author: Marco Felsch Date: Mon Jul 1 15:21:24 2024 +0200 usb: typec: tcpci: add support to set connector orientation This add the support to set the optional connector orientation bit which is part of the optional CONFIG_STANDARD_OUTPUT register 0x18 [1]. This allows system designers to connect the tcpc orientation pin directly to the 2:1 ss-mux. [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf Signed-off-by: Marco Felsch Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240701132133.3054394-1-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 89b5a5a60771c60642d34019b3885d1d20934db8 Author: Frank Li Date: Thu Jun 27 10:48:15 2024 -0400 dt-bindings: usb: Convert fsl-usb to yaml Convert fsl-usb binding doc to yaml format. Additional change: - Remove port0 and port1 from required list. - Use common usb-drd.yaml for dr_mode property - Keep two difference examples. - Add interrupts to required property list. - Remove #address-cells and #size-cells in example. - Use predefined irq type macro. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627144815.4014179-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 6cbb7fc91085b39f681aa94ab1a9ce566a93f27b Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:46 2024 +0300 usb: typec: ucsi: reorder operations in ucsi_run_command() Streamline control stream of ucsi_run_command(). Reorder operations so that there is only one call to ucsi_acknowledge(), making sure that all complete commands are acknowledged. This also makes sure that the command is acknowledged even if reading MESSAGE_IN data returns an error. Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-7-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit 584e8df58942338602c70686b451b5c3093543a1 Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:45 2024 +0300 usb: typec: ucsi: extract common code for command handling Extract common functions to handle command sending and to handle events from UCSI. This ensures that all UCSI glue drivers handle the ACKs in the same way. The CCG driver used DEV_CMD_PENDING both for internal firmware-related commands and for UCSI control handling. Leave the former use case intact. Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-6-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit e1870c17e550b7a114833e392f2e340117941b7f Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:44 2024 +0300 usb: typec: ucsi: inline ucsi_read_message_in There is no need to have a separate wrapper for reading MESSAGE_IN data, inline it to ucsi_run_command(). Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-5-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5e9c1662a89b1d5dc3042d8a2f1614bd8124ded5 Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:43 2024 +0300 usb: typec: ucsi: rework command execution functions Rework command execution code to remove recursive calls of ucsi_exec_command. This also streamlines the sync_control / read(CCI) read (MESSAGE_IN) sequence, allowing further rework of the command code. Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-4-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit 467399d989d799433ec7dd8da2ebbfbc70207d03 Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:42 2024 +0300 usb: typec: ucsi: split read operation The read operation is only used to read fixed data at fixed offsets (UCSI_VERSION, UCSI_CCI, UCSI_MESSAGE_IN). In some cases drivers apply offset-specific overrides. Split the read() operation into three operations, read_version(), read_cci(), read_message_in(). Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-3-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit 13f2ec3115c845d7f2cd5525316ef4a3fbe908e3 Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:41 2024 +0300 usb: typec: ucsi: simplify command sending API The sync_write and async_write are used only for writing UCSI commands to the UCSI_CONTROL offsets. Rename sync_write and async_write operations to sync_control and async_control accordingly. Drop the offset and length fields and pass u64 command instead. Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-2-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit a7d2fa776976294d39d4cf36b25ca43be8325c3f Author: Dmitry Baryshkov Date: Thu Jun 27 17:44:40 2024 +0300 usb: typec: ucsi: move ucsi_acknowledge() from ucsi_read_error() As a preparation for reworking UCSI command handling, move ucsi_acknowledge() for the failed command from ucsi_read_error() to ucsi_exec_command(). Tested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-1-289ddc6874c7@linaro.org Signed-off-by: Greg Kroah-Hartman commit c1cacb01f35589bd41360cdb7535afc792c08a7c Merge: 8c62617295d3c 5344fc76f8944 Author: Kalle Valo Date: Wed Jul 3 16:57:16 2024 +0300 Merge tag 'ath-next-20240702' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath ath.git patches for v6.11 We have moved to a new group-managed repo, and this is the first pull request from that repo, and from me. Fingers crossed... We have some new features in ath12k along with some cleanups in ath11k and ath12k. Also notable are some device-tree changes to allow certain ath11k and ath12k devices to work with a new power sequencing subsystem. Major changes: ath12k * DebugFS support for datapath statistics * WCN7850: support for WoW (Wake on WLAN) * WCN7850: device-tree bindings ath11k * QCA6390: device-tree bindings commit ddf983488c3e8d30d5c2e2b315ae7d9cd87096ed Author: Wayne Lin Date: Wed Jun 26 16:48:24 2024 +0800 drm/dp_mst: Skip CSN if topology probing is not done yet [Why] During resume, observe that we receive CSN event before we start topology probing. Handling CSN at this moment based on uncertain topology is unnecessary. [How] Add checking condition in drm_dp_mst_handle_up_req() to skip handling CSN if the topology is yet to be probed. Cc: Lyude Paul Cc: Harry Wentland Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: stable@vger.kernel.org Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20240626084825.878565-3-Wayne.Lin@amd.com commit d63d81094d208abb20fc444514b2d9ec2f4b7c4e Author: Wayne Lin Date: Wed Jun 26 16:48:23 2024 +0800 drm/dp_mst: Fix all mstb marked as not probed after suspend/resume [Why] After supend/resume, with topology unchanged, observe that link_address_sent of all mstb are marked as false even the topology probing is done without any error. It is caused by wrongly also include "ret == 0" case as a probing failure case. [How] Remove inappropriate checking conditions. Cc: Lyude Paul Cc: Harry Wentland Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: stable@vger.kernel.org Fixes: 37dfdc55ffeb ("drm/dp_mst: Cleanup drm_dp_send_link_address() a bit") Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20240626084825.878565-2-Wayne.Lin@amd.com commit a7351f0d3668b449fdc2cfd90403b1cb1f03ed6d Author: Alain Volmat Date: Wed Jul 3 13:59:16 2024 +0200 media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs Correct error handling within the dcmipp_create_subdevs by properly decrementing the i counter when releasing the subdevs. Fixes: 28e0f3772296 ("media: stm32-dcmipp: STM32 DCMIPP camera interface driver") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus [hverkuil: correct the indices: it's [i], not [i - 1].] commit 7269d767245651ea4b99b6ed6ff0137f42bc53f7 Merge: 7254a298cfa71 2e5657aa59669 Author: Greg Kroah-Hartman Date: Wed Jul 3 15:50:32 2024 +0200 Merge tag 'coresight-next-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: Updates for v6.11 Coresight/hwtracing subsystem updates targeting v6.11 includes a few minor fixes and cleanups Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux: hwtracing: use for_each_endpoint_of_node() coresight: constify the struct device_type usage coresight: tmc: Remove duplicated include in coresight-tmc-core.c coresight: Fix ref leak when of_coresight_parse_endpoint() fails commit 7254a298cfa7127d39acef9ca5d5d8f26f822c50 Merge: f6663a96d8731 988609f2aaf1c Author: Greg Kroah-Hartman Date: Wed Jul 3 15:49:51 2024 +0200 Merge tag 'counter-updates-for-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: Counter updates for 6.11 Primarily consists of cleanups and updates for ti-eqep; ti-eqep now supports over/underflow events and can be build for K3 devices. In addition, ftm-quaddec is updated to add a missing MODULE_DESCRIPTION() macro. * tag 'counter-updates-for-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: ti-eqep: Allow eQEP driver to be built for K3 devices counter/ti-eqep: Add new ti-am62-eqep compatible dt-bindings: counter: Add new ti,am62-eqep compatible counter: ti-eqep: remove counter_priv() wrapper counter: ti-eqep: remove unused struct member counter: ti-eqep: implement over/underflow events counter: ftm-quaddec: add missing MODULE_DESCRIPTION() macro commit f6663a96d873189950e2ee1a8839b4ee98bd420d Merge: e78c87b141943 26bf5fc860331 Author: Greg Kroah-Hartman Date: Wed Jul 3 15:49:05 2024 +0200 Merge tag 'w1-drv-6.11' 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.11 Just two cleanups for W1 core code. * tag 'w1-drv-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1: w1: Drop allocation error message w1: Add missing newline and fix typos in w1_bus_master comment commit e78c87b141943b381f130c60488b965a5e6368a8 Merge: 19ed3bb5587b3 3a0fa8e97d302 Author: Greg Kroah-Hartman Date: Wed Jul 3 15:48:09 2024 +0200 Merge tag 'fpga-for-6.11-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.11-rc1 FPGA unit test: - Macro's change re-enables FPGA KUnit test suites been configured as loadable module. Altera: - David's change removes unused structure definition. All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-for-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: altera-fpga2sdram: remove unused struct 'prop_map' Revert "fpga: disable KUnit test suites when module support is enabled" commit 65bc58c3dcad0d9bd17762e22603894a2d2880d6 Author: Slark Xiao Date: Mon Jul 1 10:12:16 2024 +0800 net: wwan: mhi: make default data link id configurable For SDX72 MBIM mode, it starts data mux id from 112 instead of 0. This would lead to device can't ping outside successfully. Also MBIM side would report "bad packet session (112)". In order to fix this issue, we decide to use the device name of MHI controller to do a match in wwan side. Then wwan driver could set a corresponding mux_id value according to the MHI product. Signed-off-by: Slark Xiao Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240701021216.17734-3-slark_xiao@163.com Signed-off-by: Manivannan Sadhasivam commit 633478695d6b52e0b52f1273d8d11275b627b87d Author: Slark Xiao Date: Mon Jul 1 10:12:15 2024 +0800 bus: mhi: host: Allow controller drivers to specify name for the MHI controller MHI devices usually have a product/device name to identify each device uniquely. So let's specify that name in 'struct mhi_controller' so that the client drivers can use this name to uniquely identify the devices and apply any device specific quirks. Signed-off-by: Slark Xiao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240701021216.17734-2-slark_xiao@163.com [mani: reworked subject and description] Signed-off-by: Manivannan Sadhasivam commit bf30a75e6e0001c3d473f2bf46d026eb0c4a0bd2 Author: Slark Xiao Date: Mon Jul 1 10:12:14 2024 +0800 bus: mhi: host: Add support for Foxconn SDX72 modems Add support for Foxconn SDX72 based modems, T99W515 and DW5934E. Existing SDX55 channel/event configs are reused with the custom ready_timeout_ms value to workaround firmware issue. Signed-off-by: Slark Xiao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240701021216.17734-1-slark_xiao@163.com [mani: reworded subject and description] Signed-off-by: Manivannan Sadhasivam commit 80f4e62730a91572b7fdc657f7bb747e107ae308 Author: Dragan Simic Date: Mon Jun 17 22:17:48 2024 +0200 drm/panfrost: Mark simple_ondemand governor as softdep Panfrost DRM driver uses devfreq to perform DVFS, while using simple_ondemand devfreq governor by default. This causes driver initialization to fail on boot when simple_ondemand governor isn't built into the kernel statically, as a result of the missing module dependency and, consequently, the required governor module not being included in the initial ramdisk. Thus, let's mark simple_ondemand governor as a softdep for Panfrost, to have its kernel module included in the initial ramdisk. This is a rather longstanding issue that has forced distributions to build devfreq governors statically into their kernels, [1][2] or has forced users to introduce some unnecessary workarounds. [3] For future reference, not having support for the simple_ondemand governor in the initial ramdisk produces errors in the kernel log similar to these below, which were taken from a Pine64 RockPro64: panfrost ff9a0000.gpu: [drm:panfrost_devfreq_init [panfrost]] *ERROR* Couldn't initialize GPU devfreq panfrost ff9a0000.gpu: Fatal error during GPU init panfrost: probe of ff9a0000.gpu failed with error -22 Having simple_ondemand marked as a softdep for Panfrost may not resolve this issue for all Linux distributions. In particular, it will remain unresolved for the distributions whose utilities for the initial ramdisk generation do not handle the available softdep information [4] properly yet. However, some Linux distributions already handle softdeps properly while generating their initial ramdisks, [5] and this is a prerequisite step in the right direction for the distributions that don't handle them properly yet. [1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/linux61/config?ref_type=heads#L8180 [2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/1066 [3] https://forum.pine64.org/showthread.php?tid=15458 [4] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0b59052999de577ab732b719cfbeb89504d [5] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f4489054668ad Cc: Diederik de Haas Cc: Furkan Kardame Cc: stable@vger.kernel.org Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Signed-off-by: Dragan Simic Reviewed-by: Steven Price Reviewed-by: Boris Brezillon Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/4e1e00422a14db4e2a80870afb704405da16fd1b.1718655077.git.dsimic@manjaro.org commit d69d804845985c29ab5be5a4b3b1f4787893daf8 Author: Greg Kroah-Hartman Date: Mon Jul 1 14:07:37 2024 +0200 driver core: have match() callback in struct bus_type take a const * In the match() callback, the struct device_driver * should not be changed, so change the function callback to be a const *. This is one step of many towards making the driver core safe to have struct device_driver in read-only memory. Because the match() callback is in all busses, all busses are modified to handle this properly. This does entail switching some container_of() calls to container_of_const() to properly handle the constant *. For some busses, like PCI and USB and HV, the const * is cast away in the match callback as those busses do want to modify those structures at this point in time (they have a local lock in the driver structure.) That will have to be changed in the future if they wish to have their struct device * in read-only-memory. Cc: Rafael J. Wysocki Reviewed-by: Alex Elder Acked-by: Sumit Garg Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh Signed-off-by: Greg Kroah-Hartman commit d688ffa269421cec73c7e13fd0cb03879b07db89 Author: Rob Herring (Arm) Date: Wed Jun 26 16:32:29 2024 -0600 perf: arm_pmuv3: Include asm/arm_pmuv3.h from linux/perf/arm_pmuv3.h The arm64 asm/arm_pmuv3.h depends on defines from linux/perf/arm_pmuv3.h. Rather than depend on include order, follow the usual pattern of "linux" headers including "asm" headers of the same name. With this change, the include of linux/kvm_host.h is problematic due to circular includes: In file included from ../arch/arm64/include/asm/arm_pmuv3.h:9, from ../include/linux/perf/arm_pmuv3.h:312, from ../include/kvm/arm_pmu.h:11, from ../arch/arm64/include/asm/kvm_host.h:38, from ../arch/arm64/mm/init.c:41: ../include/linux/kvm_host.h:383:30: error: field 'arch' has incomplete type Switching to asm/kvm_host.h solves the issue. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-5-c9784b4f4065@kernel.org Signed-off-by: Will Deacon commit 12f051c987dc91d3bf7c4dbb740321f8b24070b4 Author: Rob Herring (Arm) Date: Wed Jun 26 16:32:28 2024 -0600 perf: arm_v6/7_pmu: Drop non-DT probe support There are no non-DT based PMU users for v6 or v7, so drop the custom non-DT probe table. Unfortunately XScale still needs non-DT probing. Note that this drops support for arm1156 PMU, but there are no arm1156 based systems supported in the kernel. Acked-by: Mark Rutland Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-4-c9784b4f4065@kernel.org Signed-off-by: Will Deacon commit 8d75537bebfa14fcd493b1f840b07a8cff5a640d Author: Rob Herring (Arm) Date: Wed Jun 26 16:32:27 2024 -0600 perf/arm: Move 32-bit PMU drivers to drivers/perf/ It is preferred to put drivers under drivers/ rather than under arch/. The PMU drivers also depend on arm_pmu.c, so it's better to place them all together. Acked-by: Mark Rutland Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-3-c9784b4f4065@kernel.org Signed-off-by: Will Deacon commit 598c1a2d9f4ba8a04cf92af8e988052179e31199 Author: Rob Herring (Arm) Date: Wed Jun 26 16:32:26 2024 -0600 perf: arm_pmuv3: Drop unnecessary IS_ENABLED(CONFIG_ARM64) check The IS_ENABLED(CONFIG_ARM64) check for threshold support is unnecessary. The purpose is to not enable thresholds on arm32, but if threshold is non-zero, the check against threshold_max() just above here will have errored out because threshold_max() is always 0 on arm32. Signed-off-by: Rob Herring (Arm) Acked-by: Mark rutland Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-2-c9784b4f4065@kernel.org Signed-off-by: Will Deacon commit 81e15ca3e523a508d62806fe681c1d289361ca16 Author: Rob Herring (Arm) Date: Wed Jun 26 16:32:25 2024 -0600 perf: arm_pmuv3: Avoid assigning fixed cycle counter with threshold If the user has requested a counting threshold for the CPU cycles event, then the fixed cycle counter can't be assigned as it lacks threshold support. Currently, the thresholds will work or not randomly depending on which counter the event is assigned. While using thresholds for CPU cycles doesn't make much sense, it can be useful for testing purposes. Fixes: 816c26754447 ("arm64: perf: Add support for event counting threshold") Signed-off-by: Rob Herring (Arm) Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-1-c9784b4f4065@kernel.org Signed-off-by: Will Deacon commit fe34394ecdad459d2d7b1f30e4a39ac27fcd77f8 Author: Danila Tikhonov Date: Fri Jun 28 11:23:43 2024 +0300 dt-bindings: display/msm: dsi-controller-main: Add SM7150 Add the DSI host found on SM7150. Signed-off-by: Danila Tikhonov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/601231/ Signed-off-by: Rob Clark commit 30b7748b2bc888ac1283a2715119b32d6d50cead Author: Nishanth Menon Date: Thu Jun 27 10:06:10 2024 -0500 dt-bindings: pinctrl: pinctrl-single: Fix pinctrl-single,gpio-range description The binding is supposed to describe the properties of each element of the pinctrl-single,gpio-range array entry, however when we use "- items:" instead of "items:", it explicitly describes that there is just a single entry in the array. The pinctrl-single,gpio-range property should describe more than one entry in the array. Fix the typo and adjust the alignment of the description of the entries appropriately. Fixes: 677a62482bd6 ("dt-bindings: pinctrl: Update pinctrl-single to use yaml") Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/20240627150610.469645-1-nm@ti.com Signed-off-by: Linus Walleij commit 1024f5356715aa0699361a08e9dc1e5f798c8ae7 Author: Tomer Maimon Date: Sun Jun 30 12:01:04 2024 +0300 dt-bindings: pinctrl: npcm8xx: add missing pin group and mux function Add the following missing pin group and mux function: smb6b, smb6c, smb6d, smb7b, smb7c, smb7d, bu4, bu4b, bu5, bu5b, bu6, gpo187. Signed-off-by: Tomer Maimon Acked-by: Conor Dooley Link: https://lore.kernel.org/20240630090104.565779-1-tmaimon77@gmail.com Signed-off-by: Linus Walleij commit 78d8815031fb6542c81f4625376489a99e208d47 Author: Inochi Amaoto Date: Thu Jun 20 07:14:47 2024 +0800 dt-bindings: pinctrl: pinctrl-single: fix schmitt related properties The "pinctrl-single,input-schmitt" have four arguments in the bindings but the driver needs two. According to the meaning of other properties and driver, it should have "enable" suffix. Fortunately, there is no dts using this property, so it is safe to correct this property with the right name. Rename existed property "pinctrl-single,input-schmitt" to "pinctrl-single,input-schmitt-enable" and add the right description for property "pinctrl-single,input-schmitt" used by the driver. Fixes: 677a62482bd6 ("dt-bindings: pinctrl: Update pinctrl-single to use yaml") Signed-off-by: Inochi Amaoto Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/IA1PR20MB4953D5E7D7D68DDCE31C0031BBCF2@IA1PR20MB4953.namprd20.prod.outlook.com Signed-off-by: Linus Walleij commit cb3cb99a7fc72a1fded80f67065fd61c704e4b3d Author: Peng Fan Date: Thu Jun 27 21:17:21 2024 +0800 pinctrl: freescale: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/20240627131721.678727-4-peng.fan@oss.nxp.com Signed-off-by: Linus Walleij commit 2677d53d5c346eef62dbd71ce0916389580d1a43 Author: Peng Fan Date: Thu Jun 27 21:17:20 2024 +0800 pinctrl: equilibrium: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/20240627131721.678727-3-peng.fan@oss.nxp.com Signed-off-by: Linus Walleij commit 791a8bb202a85f707c20ef04a471519e35f089dc Author: Peng Fan Date: Thu Jun 27 21:17:19 2024 +0800 pinctrl: ti: iodelay: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/20240627131721.678727-2-peng.fan@oss.nxp.com Signed-off-by: Linus Walleij commit d1cddd6e5e95ab32a6a3537dee5991c4cf54f8d3 Author: Alexey Klimov Date: Thu Jun 27 01:36:54 2024 +0100 pinctrl: qcom: lpass-lpi: increase MAX_NR_GPIO to 32 Account for more than only 23 GPIOs in LPASS Low Power Island pinctrl generic driver. The previous value 23 was chosen to satisfy existing SoC-specific drivers. However SM4250 LPI pinctrl uses more than 23 GPIOs and its probe routine fails on: if (WARN_ON(data->npins > MAX_NR_GPIO)) return -EINVAL; with the following message: [ 10.709014] ------------[ cut here ]------------ [ 10.719085] WARNING: CPU: 1 PID: 56 at drivers/pinctrl/qcom/pinctrl-lpass-lpi.c:446 lpi_pinctrl_probe+0x308/0x388 [pinctrl_lpass_lpi] [ 10.719108] Modules linked in: [...] [ 10.719238] CPU: 1 PID: 56 Comm: kworker/u33:0 Not tainted 6.10.0-rc2-00012-ge45ddb1f8d34-dirty #7 [ 10.719245] Hardware name: Qualcomm Technologies, Inc. QRB4210 RB2 (DT) [ 10.719250] Workqueue: events_unbound deferred_probe_work_func [ 10.719265] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 10.719271] pc : lpi_pinctrl_probe+0x308/0x388 [pinctrl_lpass_lpi] [ 10.719278] lr : lpi_pinctrl_probe+0x44/0x388 [pinctrl_lpass_lpi] ... [ 10.719357] Call trace: [ 10.719361] lpi_pinctrl_probe+0x308/0x388 [pinctrl_lpass_lpi] [ 10.719369] platform_probe+0x68/0xc4 [ 10.719378] really_probe+0xbc/0x29c [ 10.719384] __driver_probe_device+0x78/0x12c [ 10.719390] driver_probe_device+0xd8/0x15c [ 10.719395] __device_attach_driver+0xb8/0x134 [ 10.719401] bus_for_each_drv+0x88/0xe8 [ 10.719407] __device_attach+0xa0/0x190 [ 10.719412] device_initial_probe+0x14/0x20 [ 10.719418] bus_probe_device+0xac/0xb0 [ 10.719423] deferred_probe_work_func+0x88/0xc0 [ 10.719429] process_one_work+0x150/0x294 [ 10.719439] worker_thread+0x2f8/0x408 [ 10.719445] kthread+0x110/0x114 [ 10.719452] ret_from_fork+0x10/0x20 [ 10.719459] ---[ end trace 0000000000000000 ]--- [ 10.719589] qcom-sm4250-lpass-lpi-pinctrl a7c0000.pinctrl: probe with driver qcom-sm4250-lpass-lpi-pinctrl failed with error -22 Fixes: c2e5a25e8d88 ("pinctrl: qcom: Introduce SM4250 LPI pinctrl driver") Signed-off-by: Alexey Klimov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20240627003654.242870-1-alexey.klimov@linaro.org Signed-off-by: Linus Walleij commit 244389bd42870640c4b5ef672a360da329b579ed Author: Richard Fitzgerald Date: Wed Jul 3 10:55:17 2024 +0100 ASoC: cs35l56: Limit Speaker Volume to +12dB maximum Change CS35L56_MAIN_RENDER_USER_VOLUME_MAX to 48, to limit the maximum value of the Speaker Volume control to +12dB. The minimum value is unchanged so that the default 0dB has the same integer control value. The original maximum of 400 (+100dB) was the largest value that can be mathematically handled by the DSP. The actual maximum amplification is +12dB. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240703095517.208077-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit c66995ae403073212f5ba60d2079003866c6e130 Author: Richard Fitzgerald Date: Wed Jul 3 10:55:16 2024 +0100 ASoC: cs35l56: Use header defines for Speaker Volume control definition The "Speaker Volume" control was being defined using four hardcoded magic numbers. There are #defines in the cs35l56.h header for these numbers, so change the code to use the defined constants. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240703095517.208077-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 98f770389f46663b828c296e2e4220dd0018f7eb Author: Claudio Imbrenda Date: Tue Jul 2 17:56:06 2024 +0200 KVM: s390: remove useless include arch/s390/include/asm/kvm_host.h includes linux/kvm_host.h, but linux/kvm_host.h includes asm/kvm_host.h . It turns out that arch/s390/include/asm/kvm_host.h only needs linux/kvm_types.h, which it already includes. Stop including linux/kvm_host.h from arch/s390/include/asm/kvm_host.h . Due to the #ifdef guards, the code works as it is today, but it's ugly and it will get in the way of future patches. Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20240702155606.71398-1-imbrenda@linux.ibm.com Signed-off-by: Janosch Frank Message-ID: <20240702155606.71398-1-imbrenda@linux.ibm.com> commit bda79f8fb30eaa99ac98b430d17beb3ee71cc754 Author: Patrick Rudolph Date: Wed Jun 26 10:45:23 2024 +0200 pinctrl: cy8c95x0: Update cache modification In the previous review cycle the regmap cache update code was questioned since it seems and odd way of using regmap_update_bits(). Thus update the regmap cache modification code to better explain what it does and why it's done. This is no functional change, but it's improving code maintainability. Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/20240626084525.787298-2-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit 710894c9d37f993bb521ed1ccda625642c04193e Author: Patrick Rudolph Date: Wed Jun 26 10:45:22 2024 +0200 pinctrl: cy8c95x0: Use cleanup.h Use the guard mutex from cleanup.h to make the code more readable. Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/20240626084525.787298-1-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit be5d511d1a2b242b35a42f9d512bcf3de6f35bde Author: Jeff Johnson Date: Tue Jul 2 13:27:34 2024 -0700 hostfs: add missing MODULE_DESCRIPTION() macro With ARCH=um, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/hostfs/hostfs.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/20240702-md-um-fs-hostfs-v1-1-fd2b565027e7@quicinc.com Signed-off-by: Johannes Berg commit 36c5005f11bec763ae296732c71170aaea8ea204 Author: Jeff Johnson Date: Tue Jul 2 12:50:02 2024 -0700 um: harddog: add missing MODULE_DESCRIPTION() macro With ARCH=um, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/um/drivers/harddog.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/20240702-md-um-arch-um-drivers-v1-1-79e4f50b5bab@quicinc.com Signed-off-by: Johannes Berg commit bfb80d8bc92fa70f5b44a57ed2b24d57685fe188 Author: Johannes Berg Date: Tue Jul 2 19:21:21 2024 +0200 um: add shared memory optimisation for time-travel=ext With external time travel, a LOT of message can end up being exchanged on the socket, taking a significant amount of time just to do that. Add a new shared memory optimisation to that, where a number of changes are made: - the controller sends a client ID and a shared memory FD (and a logging FD we don't use) in the ACK message to the initial START - the shared memory holds the current time and the free_until value, so that there's no need to exchange messages for that - if the client that's running has shared memory support, any client (the running one included) can request the next time it wants to run inside the shared memory, rather than sending a message, by also updating the free_until value - when shared memory is enabled, RUN/WAIT messages no longer have an ACK, further cutting down on messages Together, this can reduce the number of messages very significantly, and reduce overall test/simulation run time. Co-developed-by: Mordechay Goodstein Signed-off-by: Mordechay Goodstein Link: https://patch.msgid.link/20240702192118.6ad0a083f574.Ie41206c8ce4507fe26b991937f47e86c24ca7a31@changeid Signed-off-by: Johannes Berg commit e20f9b3c59041d82199e7a622efa4495dade66c5 Author: Johannes Berg Date: Tue Jul 2 19:21:20 2024 +0200 um: add mmap/mremap OS calls For the upcoming shared-memory time-travel external optimisations, we need to be able to mmap/mremap. Add the necessary OS calls. Link: https://patch.msgid.link/20240702192118.ca4472963638.Ic2da1d3a983fe57340c1b693badfa9c5bd2d8c61@changeid Signed-off-by: Johannes Berg commit 5cde6096a4dd114b7dc5ac37a71778ea68507938 Author: Johannes Berg Date: Tue Jul 2 19:21:19 2024 +0200 um: generalize os_rcv_fd Change os_rcv_fd() to os_rcv_fd_msg() that can more generally receive any number of FDs in any kind of message. Link: https://patch.msgid.link/20240702192118.40b78b2bfe4e.Ic6ec12d72630e5bcae1e597d6bd5c6f29f441563@changeid Signed-off-by: Johannes Berg commit 6555acdefc758a4dae7038c3f2301f311e287218 Author: Mordechay Goodstein Date: Tue Jul 2 19:21:18 2024 +0200 um: time-travel: support time-travel protocol broadcast messages Add a message type to the time-travel protocol to broadcast a small (64-bit) value to all participants in a simulation. The main use case is to have an identical message come to all participants in a simulation, e.g. to separate out logs for different tests running in a single simulation. Down in the guts of time_travel_handle_message() we can't use printk() and not even printk_deferred(), so just store the message and print it at the start of the userspace() function. Unfortunately this means that other prints in the kernel can actually bypass the message, but in most cases where this is used, for example to separate test logs, userspace will be involved. Also, even if we could use printk_deferred(), we'd still need to flush it out in the userspace() function since otherwise userspace messages might cross it. As a result, this is a reasonable compromise, there's no need to have any core changes and it solves the main use case we have for it. Signed-off-by: Mordechay Goodstein Link: https://patch.msgid.link/20240702192118.c4093bc5b15e.I2ca8d006b67feeb866ac2017af7b741c9e06445a@changeid Signed-off-by: Johannes Berg commit d73778e4b86755d527a0c6b249cde846770b2f66 Author: Kees Cook Date: Mon Jul 1 12:13:03 2024 -0700 mm/util: Use dedicated slab buckets for memdup_user() Both memdup_user() and vmemdup_user() handle allocations that are regularly used for exploiting use-after-free type confusion flaws in the kernel (e.g. prctl() PR_SET_VMA_ANON_NAME[1] and setxattr[2][3][4] respectively). Since both are designed for contents coming from userspace, it allows for userspace-controlled allocation sizes. Use a dedicated set of kmalloc buckets so these allocations do not share caches with the global kmalloc buckets. After a fresh boot under Ubuntu 23.10, we can see the caches are already in active use: # grep ^memdup /proc/slabinfo memdup_user-8k 4 4 8192 4 8 : ... memdup_user-4k 8 8 4096 8 8 : ... memdup_user-2k 16 16 2048 16 8 : ... memdup_user-1k 0 0 1024 16 4 : ... memdup_user-512 0 0 512 16 2 : ... memdup_user-256 0 0 256 16 1 : ... memdup_user-128 0 0 128 32 1 : ... memdup_user-64 256 256 64 64 1 : ... memdup_user-32 512 512 32 128 1 : ... memdup_user-16 1024 1024 16 256 1 : ... memdup_user-8 2048 2048 8 512 1 : ... memdup_user-192 0 0 192 21 1 : ... memdup_user-96 168 168 96 42 1 : ... Link: https://starlabs.sg/blog/2023/07-prctl-anon_vma_name-an-amusing-heap-spray/ [1] Link: https://duasynt.com/blog/linux-kernel-heap-spray [2] Link: https://etenal.me/archives/1336 [3] Link: https://github.com/a13xp0p0v/kernel-hack-drill/blob/master/drill_exploit_uaf.c [4] Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka commit 734bbc1c97ea7e46e0e53b087de16c87c03bd65f Author: Kees Cook Date: Mon Jul 1 12:13:02 2024 -0700 ipc, msg: Use dedicated slab buckets for alloc_msg() The msg subsystem is a common target for exploiting[1][2][3][4][5][6][7] use-after-free type confusion flaws in the kernel for both read and write primitives. Avoid having a user-controlled dynamically-size allocation share the global kmalloc cache by using a separate set of kmalloc buckets via the kmem_buckets API. Link: https://blog.hacktivesecurity.com/index.php/2022/06/13/linux-kernel-exploit-development-1day-case-study/ [1] Link: https://hardenedvault.net/blog/2022-11-13-msg_msg-recon-mitigation-ved/ [2] Link: https://www.willsroot.io/2021/08/corctf-2021-fire-of-salvation-writeup.html [3] Link: https://a13xp0p0v.github.io/2021/02/09/CVE-2021-26708.html [4] Link: https://google.github.io/security-research/pocs/linux/cve-2021-22555/writeup.html [5] Link: https://zplin.me/papers/ELOISE.pdf [6] Link: https://syst3mfailure.io/wall-of-perdition/ [7] Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka commit b32801d1255be1da62ea8134df3ed9f3331fba12 Author: Kees Cook Date: Mon Jul 1 12:13:01 2024 -0700 mm/slab: Introduce kmem_buckets_create() and family Dedicated caches are available for fixed size allocations via kmem_cache_alloc(), but for dynamically sized allocations there is only the global kmalloc API's set of buckets available. This means it isn't possible to separate specific sets of dynamically sized allocations into a separate collection of caches. This leads to a use-after-free exploitation weakness in the Linux kernel since many heap memory spraying/grooming attacks depend on using userspace-controllable dynamically sized allocations to collide with fixed size allocations that end up in same cache. While CONFIG_RANDOM_KMALLOC_CACHES provides a probabilistic defense against these kinds of "type confusion" attacks, including for fixed same-size heap objects, we can create a complementary deterministic defense for dynamically sized allocations that are directly user controlled. Addressing these cases is limited in scope, so isolating these kinds of interfaces will not become an unbounded game of whack-a-mole. For example, many pass through memdup_user(), making isolation there very effective. In order to isolate user-controllable dynamically-sized allocations from the common system kmalloc allocations, introduce kmem_buckets_create(), which behaves like kmem_cache_create(). Introduce kmem_buckets_alloc(), which behaves like kmem_cache_alloc(). Introduce kmem_buckets_alloc_track_caller() for where caller tracking is needed. Introduce kmem_buckets_valloc() for cases where vmalloc fallback is needed. Note that these caches are specifically flagged with SLAB_NO_MERGE, since merging would defeat the entire purpose of the mitigation. This can also be used in the future to extend allocation profiling's use of code tagging to implement per-caller allocation cache isolation[1] even for dynamic allocations. Memory allocation pinning[2] is still needed to plug the Use-After-Free cross-allocator weakness (where attackers can arrange to free an entire slab page and have it reallocated to a different cache), but that is an existing and separate issue which is complementary to this improvement. Development continues for that feature via the SLAB_VIRTUAL[3] series (which could also provide guard pages -- another complementary improvement). Link: https://lore.kernel.org/lkml/202402211449.401382D2AF@keescook [1] Link: https://googleprojectzero.blogspot.com/2021/10/how-simple-linux-kernel-memory.html [2] Link: https://lore.kernel.org/lkml/20230915105933.495735-1-matteorizzo@google.com/ [3] Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka commit 2e8000b826fcd2716449d09753d5ed843067881e Author: Kees Cook Date: Mon Jul 1 12:13:00 2024 -0700 mm/slab: Introduce kvmalloc_buckets_node() that can take kmem_buckets argument Plumb kmem_buckets arguments through kvmalloc_node_noprof() so it is possible to provide an API to perform kvmalloc-style allocations with a particular set of buckets. Introduce kvmalloc_buckets_node() that takes a kmem_buckets argument. Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka commit 67f2df3b82d091ed095d0e47e1f3a9d3e18e4e41 Author: Kees Cook Date: Mon Jul 1 12:12:59 2024 -0700 mm/slab: Plumb kmem_buckets into __do_kmalloc_node() Introduce CONFIG_SLAB_BUCKETS which provides the infrastructure to support separated kmalloc buckets (in the following kmem_buckets_create() patches and future codetag-based separation). Since this will provide a mitigation for a very common case of exploits, it is recommended to enable this feature for general purpose distros. By default, the new Kconfig will be enabled if CONFIG_SLAB_FREELIST_HARDENED is enabled (and it is added to the hardening.config Kconfig fragment). To be able to choose which buckets to allocate from, make the buckets available to the internal kmalloc interfaces by adding them as the second argument, rather than depending on the buckets being chosen from the fixed set of global buckets. Where the bucket is not available, pass NULL, which means "use the default system kmalloc bucket set" (the prior existing behavior), as implemented in kmalloc_slab(). To avoid adding the extra argument when !CONFIG_SLAB_BUCKETS, only the top-level macros and static inlines use the buckets argument (where they are stripped out and compiled out respectively). The actual extern functions can then be built without the argument, and the internals fall back to the global kmalloc buckets unconditionally. Co-developed-by: Vlastimil Babka Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka commit 72e0fe2241ce113cbba339ca8c2450b167774530 Author: Kees Cook Date: Mon Jul 1 12:12:58 2024 -0700 mm/slab: Introduce kmem_buckets typedef Encapsulate the concept of a single set of kmem_caches that are used for the kmalloc size buckets. Redefine kmalloc_caches as an array of these buckets (for the different global cache buckets). Signed-off-by: Kees Cook Signed-off-by: Vlastimil Babka commit 267ed02c2121b75e0eaaa338240453b576039e4a Author: Johannes Berg Date: Tue Jul 2 09:24:41 2024 +0200 hostfs: fix dev_t handling dev_t is a kernel type and may have different definitions in kernel and userspace. On 32-bit x86 this currently makes the stat structure being 4 bytes longer in the user code, causing stack corruption. However, this is (potentially) not the only problem, since dev_t is a different type on user/kernel side, so we don't know that the major/minor encoding isn't also different. Decode/encode it instead to address both problems. Cc: stable@vger.kernel.org Fixes: 74ce793bcbde ("hostfs: Fix ephemeral inodes") Link: https://patch.msgid.link/20240702092440.acc960585dd5.Id0767e12f562a69c6cd3c3262dc3d765db350cf6@changeid Signed-off-by: Johannes Berg commit 53585f9ea40a9466ab9c1151f15984513eb542f7 Author: Johannes Berg Date: Mon Jul 1 22:00:35 2024 +0200 um: enable UBSAN We can select ARCH_HAS_UBSAN, it works just fine. It had been enabled and we even used it, but then commit 890a64810d59 ("ubsan: Restore dependency on ARCH_HAS_UBSAN") (correctly) disabled it again, enable ARCH_HAS_UBSAN to get it. Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20240701220034.995eb04d656d.Ia29fe091b207fe66b5e26298c1e427ebcf131642@changeid Signed-off-by: Johannes Berg commit ad59baa3169591e0b4cf1a217c9139f2145f4c7f Author: Vlastimil Babka Date: Wed Jul 3 09:25:21 2024 +0200 slab, rust: extend kmalloc() alignment guarantees to remove Rust padding Slab allocators have been guaranteeing natural alignment for power-of-two sizes since commit 59bb47985c1d ("mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two)"), while any other sizes are guaranteed to be aligned only to ARCH_KMALLOC_MINALIGN bytes (although in practice are aligned more than that in non-debug scenarios). Rust's allocator API specifies size and alignment per allocation, which have to satisfy the following rules, per Alice Ryhl [1]: 1. The alignment is a power of two. 2. The size is non-zero. 3. When you round up the size to the next multiple of the alignment, then it must not overflow the signed type isize / ssize_t. In order to map this to kmalloc()'s guarantees, some requested allocation sizes have to be padded to the next power-of-two size [2]. For example, an allocation of size 96 and alignment of 32 will be padded to an allocation of size 128, because the existing kmalloc-96 bucket doesn't guarantee alignent above ARCH_KMALLOC_MINALIGN. Without slab debugging active, the layout of the kmalloc-96 slabs however naturally align the objects to 32 bytes, so extending the size to 128 bytes is wasteful. To improve the situation we can extend the kmalloc() alignment guarantees in a way that 1) doesn't change the current slab layout (and thus does not increase internal fragmentation) when slab debugging is not active 2) reduces waste in the Rust allocator use case 3) is a superset of the current guarantee for power-of-two sizes. The extended guarantee is that alignment is at least the largest power-of-two divisor of the requested size. For power-of-two sizes the largest divisor is the size itself, but let's keep this case documented separately for clarity. For current kmalloc size buckets, it means kmalloc-96 will guarantee alignment of 32 bytes and kmalloc-196 will guarantee 64 bytes. This covers the rules 1 and 2 above of Rust's API as long as the size is a multiple of the alignment. The Rust layer should now only need to round up the size to the next multiple if it isn't, while enforcing the rule 3. Implementation-wise, this changes the alignment calculation in create_boot_cache(). While at it also do the calulation only for caches with the SLAB_KMALLOC flag, because the function is also used to create the initial kmem_cache and kmem_cache_node caches, where no alignment guarantee is necessary. In the Rust allocator's krealloc_aligned(), remove the code that padded sizes to the next power of two (suggested by Alice Ryhl) as it's no longer necessary with the new guarantees. Reported-by: Alice Ryhl Reported-by: Boqun Feng Link: https://lore.kernel.org/all/CAH5fLggjrbdUuT-H-5vbQfMazjRDpp2%2Bk3%3DYhPyS17ezEqxwcw@mail.gmail.com/ [1] Link: https://lore.kernel.org/all/CAH5fLghsZRemYUwVvhk77o6y1foqnCeDzW4WZv6ScEWna2+_jw@mail.gmail.com/ [2] Reviewed-by: Boqun Feng Acked-by: Roman Gushchin Reviewed-by: Alice Ryhl Signed-off-by: Vlastimil Babka commit 5cd93c7532ea31108e83720cbe25589a4ee57c50 Author: Wei Yang Date: Sat Jun 15 03:41:50 2024 +0000 um/mm: remove redundant assignment of max_low_pfn Current calculation of max_low_pfn is introduced in commit af84eab20891 ("[PATCH] uml: fix LVM crash"). It is intended to set max_low_pfn to the same value as max_pfn. But I am not sure why the max_pfn is set to totalram_pages, which represents the number of usable pages in system instead of an absolute page frame number. (The change history stops there.) While we have already calculate it in setup_physmem(), so not necessary to do it again. Also this would help changing totalram_pages accounting, since we plan to move the accounting into __free_pages_core(). With this change, totalram_pages may not represent the total usable pages at this point, since some pages would be deferred initialized. Signed-off-by: Wei Yang CC: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Alasdair G Kergon CC: Andrew Morton CC: Mike Rapoport (IBM) CC: David Hildenbrand Acked-by: Mike Rapoport (IBM) Link: https://patch.msgid.link/20240615034150.2958-1-richard.weiyang@gmail.com Signed-off-by: Johannes Berg commit ab0f4cedc3554f921691ce5b63d59e258154e799 Author: David Gow Date: Wed Jun 5 06:40:50 2024 +0800 arch: um: rust: Add i386 support for Rust At present, Rust in the kernel only supports 64-bit x86, so UML has followed suit. However, it's significantly easier to support 32-bit i386 on UML than on bare metal, as UML does not use the -mregparm option (which alters the ABI), which is not yet supported by rustc[1]. Add support for CONFIG_RUST on um/i386, by adding a new target config to generate_rust_target, and replacing various checks on CONFIG_X86_64 to also support CONFIG_X86_32. We still use generate_rust_target, rather than a built-in rustc target, in order to match x86_64, provide a future place for -mregparm, and more easily disable floating point instructions. With these changes, the KUnit tests pass with: kunit.py run --make_options LLVM=1 --kconfig_add CONFIG_RUST=y --kconfig_add CONFIG_64BIT=n --kconfig_add CONFIG_FORTIFY_SOURCE=n An earlier version of these changes was proposed on the Rust-for-Linux github[2]. [1]: https://github.com/rust-lang/rust/issues/116972 [2]: https://github.com/Rust-for-Linux/linux/pull/966 Signed-off-by: David Gow Link: https://patch.msgid.link/20240604224052.3138504-1-davidgow@google.com Signed-off-by: Johannes Berg commit 9a2123b397bbe0da5e853273369d63779ac97c8c Author: David Gow Date: Wed May 29 17:33:35 2024 +0800 arch: um: rust: Use the generated target.json again The Rust compiler can take a target config from 'target.json', which is generated by scripts/generate_rust_target.rs. It used to be that all Linux architectures used this to generate a target.json, but now architectures must opt-in to this, or they will default to the Rust compiler's built-in target definition. This is mostly okay for (64-bit) x86 and UML, except that it can generate SSE instructions, which we can't use in the kernel. So re-instate the custom target.json, which disables SSE (and generally enables the 'soft-float' feature). This fixes the following compile error: error: :0:0: in function _RNvMNtCs5QSdWC790r4_4core3f32f7next_up float (float): SSE register return with SSE disabled Fixes: f82811e22b48 ("rust: Refactor the build target to allow the use of builtin targets") Signed-off-by: David Gow Reviewed-by: Boqun Feng Tested-by: Miguel Ojeda Reviewed-by: Miguel Ojeda Link: https://patch.msgid.link/20240529093336.4075206-1-davidgow@google.com Signed-off-by: Johannes Berg commit cb2759431acae9c6093f6f4cb270e3a3bd0f4e73 Author: Tiwei Bie Date: Mon May 27 21:40:24 2024 +0800 um: Remove /proc/sysemu support code Currently /proc/sysemu will never be registered, as sysemu_supported is initialized to zero implicitly and no code updates it. And there is also nothing to configure via sysemu in UML anymore. Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20240527134024.1539848-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 6fdae1da764abeff77d0d884101f42c114b8f93b Author: Tiwei Bie Date: Mon May 27 21:40:23 2024 +0800 um: Remove unused ncpus variable It's no longer used. And uml_ncpus_setup doesn't exist anymore. Signed-off-by: Tiwei Bie Link: https://patch.msgid.link/20240527134024.1539848-2-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg commit 1cf855ded6962825da8623b467c4650a80776cad Author: Dr. David Alan Gilbert Date: Sun May 5 01:15:08 2024 +0100 ubd: Remove unused mutex 'ubd_mutex' Commit fb5d1d389c9e ("ubd: open the backing files in ubd_add") removed the last use of ubd_mutex. Remove it. Build and kernel startup test only. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20240505001508.255096-1-linux@treblig.org Signed-off-by: Johannes Berg commit 7d0a8a490aa3a2a82de8826aaf1dfa38575cb77a Author: Johannes Berg Date: Wed Apr 17 10:27:45 2024 +0200 um: time-travel: fix time-travel-start option We need to have the = as part of the option so that the value can be parsed properly. Also document that it must be given in nanoseconds, not seconds. Fixes: 065038706f77 ("um: Support time travel mode") Link: https://patch.msgid.link/20240417102744.14b9a9d4eba0.Ib22e9136513126b2099d932650f55f193120cd97@changeid Signed-off-by: Johannes Berg commit ddd268c42871b78c75e12a5c28207fb481138f41 Author: Niklas Schnelle Date: Wed Apr 3 14:43:00 2024 +0200 um: Select HAS_IOREMAP for UML_IOMEM_EMULATION In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at compile time. UML supports these via its UML_IOMEM_EMULATION so let that select HAS_IOPORT and also reflect this in NO_IOPORT_MAP. Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Niklas Schnelle Link: https://patch.msgid.link/20240403124300.65379-2-schnelle@linux.ibm.com Signed-off-by: Johannes Berg commit 12b8e7e69aa7a008323d7a903392686ad0903828 Author: Anton Ivanov Date: Thu Mar 28 13:24:24 2024 +0000 um: Remove obsolete pcap driver Remove the pcap driver in UML. It is obsolete. It does not build on recent systems due to changes in libpcap and its dependencies. The vector driver's raw transport in UML provides identical functionality. Signed-off-by: Anton Ivanov Link: https://patch.msgid.link/20240328132424.376456-1-anton.ivanov@cambridgegreys.com Signed-off-by: Johannes Berg commit b2f9b77c7f7f377534ba75508162390432a9945a Author: Benjamin Berg Date: Wed Oct 18 14:36:43 2023 +0200 um: chan: use blocking IO for console output for time-travel When in time-travel mode (infinite-cpu or external) time should not pass for writing to the console. As such, it makes sense to put the FD for the output side into blocking mode and simply let any write to it hang. If we did not do this, then time could pass waiting for the console to become writable again. This is not desirable as it has random effects on the clock between runs. Implement this by duplicating the FD if output is active in a relevant mode and setting the duplicate to be blocking. This avoids changing the input channel to be blocking should it exists. After this, use the blocking FD for all write operations and do not allocate an IRQ it is set. Without time-travel mode fd_out will always match fd_in and IRQs are registered. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20231018123643.1255813-4-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 4cfb44df8d12a5fc2b801d18dc41b03bf7e6cd7b Author: Benjamin Berg Date: Wed Oct 18 14:36:42 2023 +0200 um: chan_user: retry partial writes In the next commit, we are going to set the output FD to be blocking. Once that is done, the write() may be short if an interrupt happens while it is writing out data. As such, to properly catch an EINTR error, we need to retry the write. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20231018123643.1255813-3-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit c6c4cbaa01b61eff2232d8cf4d441565535aa53a Author: Benjamin Berg Date: Wed Oct 18 14:36:41 2023 +0200 um: chan_user: catch EINTR when reading and writing If the read/write function returns an error then we expect to see an event/IRQ later on. However, this will only happen after an EAGAIN as we are using edge based event triggering. As such, EINTR needs to be caught should it happen. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20231018123643.1255813-2-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit c140a5bd5da48de353be8bf9356f71a66f622a68 Author: Benjamin Berg Date: Wed Oct 18 14:36:40 2023 +0200 um: irqs: process outstanding IRQs when unblocking signals When in time-travel mode, the eventfd events are read even when signals are blocked as SIGIO still needs to be processed. In this case, the event is cleared on the eventfd but the IRQ still needs to be fired later. We did already ensure that the SIGIO handler is run again. However, the FDs are configured to be level triggered, so that eventfd will not notify again. As such, add some logic to mark the IRQ as pending and process it at the next opportunity. To avoid duplication, reuse the logic used for the suspend/resume case. This does not really change anything except for delaying running the IRQs with timetravel_handler at a slightly later point in time (and possibly running non-timetravel IRQs that shouldn't happen earlier). While at it, move marking as pending into irq_event_handler as that is the more logical place for it to happen. Signed-off-by: Benjamin Berg Link: https://patch.msgid.link/20231018123643.1255813-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit f2e395629747e718a67b567cb84b49d14792b312 Author: Frank Li Date: Tue Jul 2 16:17:24 2024 -0400 dt-bindings: gpio: fsl,qoriq-gpio: Add compatible string fsl,ls1046a-gpio Add compatible string for chip ls1046 to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dtb: /soc/gpio@2300000: failed to match any schema with compatible: ['fsl,ls1046a-gpio', 'fsl,qoriq-gpio'] Signed-off-by: Frank Li Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240702201724.96681-1-Frank.Li@nxp.com Signed-off-by: Bartosz Golaszewski commit 3a9ba4e32230df6c48cda1fd5cbca6facacc74c2 Author: Frieder Schrempf Date: Tue Jul 2 12:31:14 2024 +0200 dt-bindings: eeprom: at24: Add compatible for ONSemi N24S64B The ONSemi N24S64B is a 64 KBit serial EEPROM that is compatible with atmel,24c64. Signed-off-by: Frieder Schrempf Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240702103155.321855-3-frieder@fris.de Signed-off-by: Bartosz Golaszewski commit d83c217778e7425d10105001150c5670e07f88fe Author: Frieder Schrempf Date: Tue Jul 2 12:31:13 2024 +0200 dt-bindings: eeprom: at24: Move compatible for Belling BL24C16A to proper place Merge the compatibles for the 24c16 types into a single list. Signed-off-by: Frieder Schrempf Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240702103155.321855-2-frieder@fris.de Signed-off-by: Bartosz Golaszewski commit c1ec80e54afd0460d02b29a5731fd2a7b31f400b Author: Andrei Simion Date: Wed Jul 3 11:47:04 2024 +0300 dt-bindings: eeprom: at24: Add Microchip 24AA025E48/24AA025E64 Add support for compatible Microchip 24AA025E48/24AA025E64 EEPROMs. Reviewed-by: Conor Dooley Signed-off-by: Andrei Simion Link: https://lore.kernel.org/r/20240703084704.197697-4-andrei.simion@microchip.com Signed-off-by: Bartosz Golaszewski commit b61ea8705095e5d242762268cfebf48c848315f6 Author: Claudiu Beznea Date: Wed Jul 3 11:47:02 2024 +0300 eeprom: at24: Add support for Microchip 24AA025E48/24AA025E64 EEPROMs Add "microchip,24aa025e48", "microchip,24aa025e64" compatible for the usage w/ 24AA025E{48, 64} type of EEPROMs where "24aa025e48" stands for EUI-48 address and "24aa025e64" stands for EUI-64 address. [andrei.simion@microchip.com: Use AT24_DATA_CHIP with AT24_FLAG_READONLY for 24AA025E{48, 64} type of EEPROMs. Reword commit message.] Signed-off-by: Claudiu Beznea Signed-off-by: Andrei Simion Link: https://lore.kernel.org/r/20240703084704.197697-2-andrei.simion@microchip.com Signed-off-by: Bartosz Golaszewski commit eba6d0f88ba2c4e9175aae8556125a05980ff8f5 Author: Krzysztof Kozlowski Date: Wed Jul 3 10:30:38 2024 +0200 power: sequencing: simplify returning pointer without cleanup Use 'return_ptr' helper for returning a pointer without cleanup for shorter code. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240703083038.95777-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bartosz Golaszewski commit c1267e1afae60e0b1d17d3a2e55515ecccb22a3e Author: Biju Das Date: Tue Jul 2 19:00:18 2024 +0100 arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS Replace the fixed regulator for USB VBUS and use the proper one that controls regulator based on VBUS detection. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240702180032.207275-5-biju.das.jz@bp.renesas.com Signed-off-by: Philipp Zabel commit 24843404efe47eab1ee88d7475a0be0f2f6fd9db Author: Biju Das Date: Tue Jul 2 19:00:17 2024 +0100 phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs Use regulator_hardware_enable() for controlling VBUS enable for RZ/G2L alike SoCs in interrupt context. Signed-off-by: Biju Das Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20240702180032.207275-4-biju.das.jz@bp.renesas.com Signed-off-by: Philipp Zabel commit 4068f22e4b47f7352fc369c22800e04d2860416b Author: Biju Das Date: Tue Jul 2 19:00:16 2024 +0100 reset: renesas: Add USB VBUS regulator device as child As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit of the VBUS Control Register(VBENCTL) register in the USBPHY Control. Expose this register as regmap and instantiate the USB VBUS regulator device, so that consumer can control the vbus using regulator API's Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20240702180032.207275-3-biju.das.jz@bp.renesas.com Signed-off-by: Philipp Zabel commit f64f2d6fdda459b10bc8f774ed87e9980a5021e5 Author: Biju Das Date: Tue Jul 2 19:00:15 2024 +0100 dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document USB VBUS regulator The VBUS enable can be controlled by the VBOUT bit of the VBUS control register. This register is part of usbphy-ctrl IP. Document the USB VBUS regulator object. Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240702180032.207275-2-biju.das.jz@bp.renesas.com Signed-off-by: Philipp Zabel commit 816be86c7993d3c5832c3017c0056297e86f978c Author: Igor Pylypiv Date: Tue Jul 2 02:47:35 2024 +0000 ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf qc->result_tf contents are only valid when the ATA_QCFLAG_RTF_FILLED flag is set. The ATA_QCFLAG_RTF_FILLED flag should be always set for commands that failed or for commands that have the ATA_QCFLAG_RESULT_TF flag set. Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20240702024735.1152293-8-ipylypiv@google.com Signed-off-by: Niklas Cassel commit 18676c6aab0863618eb35443e7b8615eea3535a9 Author: Igor Pylypiv Date: Tue Jul 2 02:47:34 2024 +0000 ata: libata-core: Set ATA_QCFLAG_RTF_FILLED in fill_result_tf() ATA_QCFLAG_RTF_FILLED is not specific to ahci and can be used generally to check if qc->result_tf contains valid data. Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20240702024735.1152293-7-ipylypiv@google.com Signed-off-by: Niklas Cassel commit ea3b26a9bb97082ced4686c830265da03db7c435 Author: Igor Pylypiv Date: Tue Jul 2 02:47:33 2024 +0000 ata: libata-scsi: Do not pass ATA device id to ata_to_sense_error() ATA device id is not used in ata_to_sense_error(). Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20240702024735.1152293-6-ipylypiv@google.com Signed-off-by: Niklas Cassel commit 3f6d903b54a137e9e438d9c3b774b5d0432917bc Author: Igor Pylypiv Date: Tue Jul 2 02:47:32 2024 +0000 ata: libata-scsi: Remove redundant sense_buffer memsets SCSI layer clears sense_buffer in scsi_queue_rq() so there is no need for libata to clear it again. Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20240702024735.1152293-5-ipylypiv@google.com Signed-off-by: Niklas Cassel commit 28ab9769117ca944cb6eb537af5599aa436287a4 Author: Igor Pylypiv Date: Tue Jul 2 02:47:31 2024 +0000 ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error SAT-5 revision 8 specification removed the text about the ANSI INCITS 431-2007 compliance which was requiring SCSI/ATA Translation (SAT) to return descriptor format sense data for the ATA PASS-THROUGH commands regardless of the setting of the D_SENSE bit. Let's honor the D_SENSE bit for ATA PASS-THROUGH commands while generating the "ATA PASS-THROUGH INFORMATION AVAILABLE" sense data. SAT-5 revision 7 ================ 12.2.2.8 Fixed format sense data Table 212 shows the fields returned in the fixed format sense data (see SPC-5) for ATA PASS-THROUGH commands. SATLs compliant with ANSI INCITS 431-2007, SCSI/ATA Translation (SAT) return descriptor format sense data for the ATA PASS-THROUGH commands regardless of the setting of the D_SENSE bit. SAT-5 revision 8 ================ 12.2.2.8 Fixed format sense data Table 211 shows the fields returned in the fixed format sense data (see SPC-5) for ATA PASS-THROUGH commands. Cc: stable@vger.kernel.org # 4.19+ Reported-by: Niklas Cassel Closes: https://lore.kernel.org/linux-ide/Zn1WUhmLglM4iais@ryzen.lan Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240702024735.1152293-4-ipylypiv@google.com Signed-off-by: Niklas Cassel commit 97981926224afe17ba3e22e0c2b7dd8b516ee574 Author: Igor Pylypiv Date: Tue Jul 2 02:47:30 2024 +0000 ata: libata-scsi: Do not overwrite valid sense data when CK_COND=1 Current ata_gen_passthru_sense() code performs two actions: 1. Generates sense data based on the ATA 'status' and ATA 'error' fields. 2. Populates "ATA Status Return sense data descriptor" / "Fixed format sense data" with ATA taskfile fields. The problem is that #1 generates sense data even when a valid sense data is already present (ATA_QCFLAG_SENSE_VALID is set). Factoring out #2 into a separate function allows us to generate sense data only when there is no valid sense data (ATA_QCFLAG_SENSE_VALID is not set). As a bonus, we can now delete a FIXME comment in atapi_qc_complete() which states that we don't want to translate taskfile registers into sense descriptors for ATAPI. Additionally, always set SAM_STAT_CHECK_CONDITION when CK_COND=1 because SAT specification mandates that SATL shall return CHECK CONDITION if the CK_COND bit is set. The ATA PASS-THROUGH handling logic in ata_scsi_qc_complete() is hard to read/understand. Improve the readability of the code by moving checks into self-explanatory boolean variables. Cc: stable@vger.kernel.org # 4.19+ Co-developed-by: Niklas Cassel Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20240702024735.1152293-3-ipylypiv@google.com Signed-off-by: Niklas Cassel commit 38dab832c3f4154968f95b267a3bb789e87554b0 Author: Igor Pylypiv Date: Tue Jul 2 02:47:29 2024 +0000 ata: libata-scsi: Fix offsets for the fixed format sense data Correct the ATA PASS-THROUGH fixed format sense data offsets to conform to SPC-6 and SAT-5 specifications. Additionally, set the VALID bit to indicate that the INFORMATION field contains valid information. INFORMATION =========== SAT-5 Table 212 — "Fixed format sense data INFORMATION field for the ATA PASS-THROUGH commands" defines the following format: +------+------------+ | Byte | Field | +------+------------+ | 0 | ERROR | | 1 | STATUS | | 2 | DEVICE | | 3 | COUNT(7:0) | +------+------------+ SPC-6 Table 48 - "Fixed format sense data" specifies that the INFORMATION field starts at byte 3 in sense buffer resulting in the following offsets for the ATA PASS-THROUGH commands: +------------+-------------------------+ | Field | Offset in sense buffer | +------------+-------------------------+ | ERROR | 3 | | STATUS | 4 | | DEVICE | 5 | | COUNT(7:0) | 6 | +------------+-------------------------+ COMMAND-SPECIFIC INFORMATION ============================ SAT-5 Table 213 - "Fixed format sense data COMMAND-SPECIFIC INFORMATION field for ATA PASS-THROUGH" defines the following format: +------+-------------------+ | Byte | Field | +------+-------------------+ | 0 | FLAGS | LOG INDEX | | 1 | LBA (7:0) | | 2 | LBA (15:8) | | 3 | LBA (23:16) | +------+-------------------+ SPC-6 Table 48 - "Fixed format sense data" specifies that the COMMAND-SPECIFIC-INFORMATION field starts at byte 8 in sense buffer resulting in the following offsets for the ATA PASS-THROUGH commands: Offsets of these fields in the fixed sense format are as follows: +-------------------+-------------------------+ | Field | Offset in sense buffer | +-------------------+-------------------------+ | FLAGS | LOG INDEX | 8 | | LBA (7:0) | 9 | | LBA (15:8) | 10 | | LBA (23:16) | 11 | +-------------------+-------------------------+ Reported-by: Akshat Jain Fixes: 11093cb1ef56 ("libata-scsi: generate correct ATA pass-through sense") Cc: stable@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: Niklas Cassel Signed-off-by: Igor Pylypiv Link: https://lore.kernel.org/r/20240702024735.1152293-2-ipylypiv@google.com Signed-off-by: Niklas Cassel commit 197c22b65ea6a70eb377760282e7a634c3a812ab Merge: fd88137bfbb83 1cb7d29157603 Author: Philipp Zabel Date: Wed Jul 3 10:50:10 2024 +0200 Merge tag 'regulator-hw-enable-helper' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into reset/next regulator: Add helper to allow enable/disable in interrupt context Add a helper function that enables exclusive consumers to bypass locking and do an enable/disable from within interrupt context. Link: https://lore.kernel.org/r/988df019-00d4-4209-8716-39e82c565bf1@sirena.org.uk Signed-off-by: Philipp Zabel commit d02f0bb332d52c0330a1ef11cf98b7ec6448b99b Author: Eric Sandeen Date: Tue Jul 2 17:45:57 2024 -0500 fat: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/1a67d2a8-0aae-42a2-9c0f-21cd4cd87d13@redhat.com Acked-by: OGAWA Hirofumi Signed-off-by: Christian Brauner commit 634440b69c7f7c67478bc775f2c6977afd4adc82 Author: Eric Sandeen Date: Tue Jul 2 17:44:27 2024 -0500 fat: Convert to new mount api vfat and msdos share a common set of options, with additional, unique options for each filesystem. Each filesystem calls common fc initialization and parsing routines, with an "is_vfat" parameter. For parsing, if the option is not found in the common parameter_spec, parsing is retried with the fs-specific parameter_spec. This patch leaves nls loading to fill_super, so the codepage and charset options are not validated as they are requested. This matches current behavior. It would be possible to test-load as each option is parsed, but that would make i.e. mount -o "iocharset=nope,iocharset=iso8859-1" fail, where it does not fail today because only the last iocharset option is considered. The obsolete "conv=" option is set up with an enum of acceptable values; currently invalid "conv=" options are rejected as such, even though the option is obsolete, so this patch preserves that behavior. Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/a9411b02-5f8e-4e1e-90aa-0c032d66c312@redhat.com Acked-by: OGAWA Hirofumi Signed-off-by: Christian Brauner commit 206d3d8e006c77b8016de586423de37dbff9e6fc Author: Eric Sandeen Date: Tue Jul 2 17:41:22 2024 -0500 fat: move debug into fat_mount_options Move the debug variable into fat_mount_options for consistency and to facilitate conversion to new mount API. Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/f6155247-32ee-4cfe-b808-9102b17f7cd1@redhat.com Acked-by: OGAWA Hirofumi Signed-off-by: Christian Brauner commit cda91d5b911a5a168a1c6e6917afda43b0e458c8 Author: Xin Long Date: Mon Jul 1 13:48:49 2024 -0400 sctp: cancel a blocking accept when shutdown a listen socket As David Laight noticed, "In a multithreaded program it is reasonable to have a thread blocked in accept(). With TCP a subsequent shutdown(listen_fd, SHUT_RDWR) causes the accept to fail. But nothing happens for SCTP." sctp_disconnect() is eventually called when shutdown a listen socket, but nothing is done in this function. This patch sets RCV_SHUTDOWN flag in sk->sk_shutdown there, and adds the check (sk->sk_shutdown & RCV_SHUTDOWN) to break and return in sctp_accept(). Note that shutdown() is only supported on TCP-style SCTP socket. Reported-by: David Laight Signed-off-by: Xin Long Signed-off-by: David S. Miller commit dc99c0ff53f588bb210b1e8b3314c7581cde68a2 Author: Christian Brauner Date: Tue Jun 18 14:12:28 2024 +0200 fs: fix dentry size On CONFIG_SMP=y and on 32bit we need to decrease DNAME_INLINE_LEN to 36 btyes to end up with 128 bytes in total. Reported-by: Linus Torvalds Links: https://lore.kernel.org/r/CAHk-=whtoqTSCcAvV-X-KPqoDWxS4vxmWpuKLB+Vv8=FtUd5vA@mail.gmail.com Signed-off-by: Christian Brauner commit 18a5daf0e4974ded74b2ed8a6aed1da49bde356d Author: Mateusz Guzik Date: Thu Jun 13 02:12:15 2024 +0200 vfs: move d_lockref out of the area used by RCU lookup Stock kernel scales worse than FreeBSD when doing a 20-way stat(2) on the same tmpfs-backed file. According to perf top: 38.09% lockref_put_return 26.08% lockref_get_not_dead 25.60% __d_lookup_rcu 0.89% clear_bhb_loop __d_lookup_rcu is participating in cacheline ping pong due to the embedded name sharing a cacheline with lockref. Moving it out resolves the problem: 41.50% lockref_put_return 41.03% lockref_get_not_dead 1.54% clear_bhb_loop benchmark (will-it-scale, Sapphire Rapids, tmpfs, ops/s): FreeBSD:7219334 before: 5038006 after: 7842883 (+55%) One minor remark: the 'after' result is unstable, fluctuating in the range ~7.8 mln to ~9 mln during different runs. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240613001215.648829-3-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 2e3ed20c17e719cbe7b13feaa3e7c46cf6a85887 Author: Lucas Stach Date: Mon Jul 1 10:53:43 2024 +0200 net: dsa: microchip: lan937x: disable VPHY support As described by the microchip article "LAN937X - The required configuration for the external MAC port to operate at RGMII-to-RGMII 1Gbps link speed." [1]: "When VPHY is enabled, the auto-negotiation process following IEEE 802.3 standard will be triggered and will result in RGMII-to-RGMII signal failure on the interface because VPHY will try to poll the PHY status that is not available in the scenario of RGMII-to-RGMII connection (normally the link partner is usually an external processor). Note that when VPHY fails on accessing PHY registers, it will fall back to 100Mbps speed, it indicates disabling VPHY is optional if you only need the port to link at 100Mbps speed. Again, VPHY must and can only be disabled by writing VPHY_DISABLE bit in the register below as there is no strapping pin for the control." This patch was tested on LAN9372, so far it seems to not to affect VPHY based clock crossing optimization for the ports with integrated PHYs. [1]: https://microchip.my.site.com/s/article/LAN937X-The-required-configuration-for-the-external-MAC-port-to-operate-at-RGMII-to-RGMII-1Gbps-link-speed Signed-off-by: Lucas Stach Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit c3db39468a42fec7e83add335765f8d81e1864c3 Author: Lucas Stach Date: Mon Jul 1 10:53:42 2024 +0200 net: dsa: microchip: lan937x: disable in-band status support for RGMII interfaces This driver do not support in-band mode and in case of CPU<->Switch link, this mode is not working any way. So, disable it otherwise ingress path of the switch MAC will stay disabled. Note: lan9372 manual do not document 0xN301 BIT(2) for the RGMII mode and recommend[1] to disable in-band link status update for the RGMII RX path by clearing 0xN302 BIT(0). But, 0xN301 BIT(2) seems to work too, so keep it unified with other KSZ switches. [1] https://microchip.my.site.com/s/article/LAN937X-The-required-configuration-for-the-external-MAC-port-to-operate-at-RGMII-to-RGMII-1Gbps-link-speed Signed-off-by: Lucas Stach Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Acked-by: Arun Ramadoss Signed-off-by: David S. Miller commit 8d7330b3a9c6db53d4462820df566c0b1e77d831 Author: Lucas Stach Date: Mon Jul 1 10:53:41 2024 +0200 net: dsa: microchip: lan9371/2: add 100BaseTX PHY support On the LAN9371 and LAN9372, the 4th internal PHY is a 100BaseTX PHY instead of a 100BaseT1 PHY. The 100BaseTX PHYs have a different base register offset. Signed-off-by: Lucas Stach Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Signed-off-by: David S. Miller commit 3f5ea7ed705e8effe9cfabf912e769ccb6b7d389 Author: Thorsten Blum Date: Mon Jul 1 21:56:08 2024 +0200 drm/managed: Simplify if condition The if condition !A || A && B can be simplified to !A || B. Fixes the following Coccinelle/coccicheck warning reported by excluded_middle.cocci: WARNING !A || A && B is equivalent to !A || B Compile-tested only. Acked-by: Thomas Zimmermann Signed-off-by: Thorsten Blum Reviewed-by: Dmitry Baryshkov Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240701195607.228852-1-thorsten.blum@toblux.com commit b84c28f33d35361282d27ac304c888dc1ad38a15 Author: Thomas Zimmermann Date: Thu Jun 27 17:27:53 2024 +0200 drm/ast: Use drm_atomic_helper_commit_tail() helper Ast has no special requirements for runtime power management. So replace drm_atomic_helper_commit_tail_rpm() with the regular helper drm_atomic_helper_commit_tail(). Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-9-tzimmermann@suse.de commit 633743ed18461061441af69d1ec669bb7b8c4269 Author: Thomas Zimmermann Date: Thu Jun 27 17:27:52 2024 +0200 drm/ast: Inline ast_crtc_dpms() into callers The function ast_crtc_dpms() is left over from when the ast driver did not implement atomic modesetting. But DPMS is not supported by atomic modesetting and the helper is only called to enable or disable the CRTC sync pulses. Inline the function into its callers. To disable the CRTC, ast sets (AST_DPMS_VSYNC_OFF | AST_DPMS_HSYNC_OFF) in VGACRB6. Replace the constants with the correct register constants for VGACRB6. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-8-tzimmermann@suse.de commit 171b357d18eea64988ae774aa25b32bbfeb16880 Author: Thomas Zimmermann Date: Thu Jun 27 17:27:51 2024 +0200 drm/ast: Only set VGA SCREEN_DISABLE bit in CRTC code The SCREEN_DISABLE bit controls scanout from display memory. The bit affects all planes, so set it only in the CRTC's atomic enable and disable functions. A number of bugs affect this fix. First of all, ast_set_std_regs() tries to set VGASR1 except for the SD bit. But the read bitmask is invert, so it preserves anything except the SD bit. Fix this by re-inverting the read mask. The second issue is that primary-plane and CRTC helpers modify the SD bit. The bit controls scanout for all planes, primary and HW cursor, so set it only in the CRTC code. Further add a constant to represent the SD bit in VGASR1. Keep the plane's atomic_disable around to make the DRM framework happy. v2: - fix typos in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-7-tzimmermann@suse.de commit bb5367d17e83af95b56d2cc455a09316d6ff3349 Author: Thomas Zimmermann Date: Thu Jun 27 17:27:50 2024 +0200 drm/ast: Remove gamma LUT updates from DPMS code The DPMS code, called from the CRTC's atomic_enable, rewrites the gamma LUT. This is already done by the CRTC's atomic_flush. Remove the duplication. v2: - fix a typo in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-6-tzimmermann@suse.de commit 4f3265b85fed99d279dac114a5aaf0c13353420a Author: Thomas Zimmermann Date: Thu Jun 27 17:27:49 2024 +0200 drm/ast: Handle primary-plane format setup in atomic_update Several color registers are programmed in the DPMS code of the CRTC's atomic_enable helper and the primary plane's atomic_update. It requires the color format and the display mode. Both code paths handle different cases: the DPMS's code will not be executed if the color format changes without a full mode switch. The plane's code only runs if the color format changes, but ignores display-mode changes. The color format is a property of the primary plane, so consolidate all color-format code in the plane's atomic_update. Remove it from the DPMS helper. v2: - clarify commit message (Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-5-tzimmermann@suse.de commit fd63bf978b7b0f106c72b6392436f4223b16ab85 Author: Thomas Zimmermann Date: Thu Jun 27 17:27:48 2024 +0200 drm/ast: Move mode-setting code into mode_set_nofb CRTC helper Do all mode setting in ast_crtc_helper_mode_set_nofb(), which always runs after disabling the CRTC and before programming the planes. Removes implicit synchronization between the CRTC's atomic disable, enable and the vertical retrace. Display-mode updates require HW cursors to be disabled. The HW cursor only picks up changes at vertical retrace periods. So the CRTC's atomic_disable helper waited for the retrace to delay any following mode-setting operations, which then happened in atomic_enable. See [1] for a description of the problem. With the CRTC helper callback mode_set_nofb, we can now synchronize and reprogram in the same place. As it always runs before the plane update, the plane code can be reordered with the CRTC's later atomic_enable et al. Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/series/79914/ # 1 Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-4-tzimmermann@suse.de commit 7b8a74bc42016173ddb4872d113f132c8ca59fc1 Author: Thomas Zimmermann Date: Thu Jun 27 17:27:47 2024 +0200 drm/ast: Program mode for AST DP in atomic_mode_set The CRTC's atomic_flush function contains code to program the display mode to the AST DP chip. Move the code to the encoder's atomic_mode_set callback. The DRM atomic-modesetting code invoke this callback as part of the atomic commit. v2: - fix typos in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-3-tzimmermann@suse.de commit 2a7e5f45314cfd99eacd9301a196c2f7cb67237d Author: Thomas Zimmermann Date: Thu Jun 27 17:27:46 2024 +0200 drm/ast: Implement atomic enable/disable for encoders The CRTC helpers contain code to enable and disable DisplayPort connectors. Implement this functionality in the respective connector's atomic_enable/atomic_disable callbacks. DRM's atomic-modesetting helpers will call the functions as part of the atomic commit. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-2-tzimmermann@suse.de commit 8e366d83edce3065ff3372bedc281c5e217c0550 Author: Alexandre Chartre Date: Thu Jun 20 16:47:47 2024 +0200 objtool/x86: objtool can confuse memory and stack access The encoding of an x86 instruction can include a ModR/M and a SIB (Scale-Index-Base) byte to describe the addressing mode of the instruction. objtool processes all addressing mode with a SIB base of 5 as having %rbp as the base register. However, a SIB base of 5 means that the effective address has either no base (if ModR/M mod is zero) or %rbp as the base (if ModR/M mod is 1 or 2). This can cause objtool to confuse an absolute address access with a stack operation. For example, objtool will see the following instruction: 4c 8b 24 25 e0 ff ff mov 0xffffffffffffffe0,%r12 as a stack operation (i.e. similar to: mov -0x20(%rbp), %r12). [Note that this kind of weird absolute address access is added by the compiler when using KASAN.] If this perceived stack operation happens to reference the location where %r12 was pushed on the stack then the objtool validation will think that %r12 is being restored and this can cause a stack state mismatch. This kind behavior was seen on xfs code, after a minor change (convert kmem_alloc() to kmalloc()): >> fs/xfs/xfs.o: warning: objtool: xfs_da_grow_inode_int+0x6c1: stack state mismatch: reg1[12]=-2-48 reg2[12]=-1+0 Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402220435.MGN0EV6l-lkp@intel.com/ Signed-off-by: Alexandre Chartre Link: https://lore.kernel.org/r/20240620144747.2524805-1-alexandre.chartre@oracle.com Signed-off-by: Josh Poimboeuf commit b13e9f6da4cc34240dae05418b9876b2758ebe35 Author: Siddh Raman Pant Date: Fri May 10 15:02:57 2024 +0530 objtool: Use "action" in error message to be consistent with help The help message mentions the main options as "actions", which is different from the optional "options". But the check error messages outputs "option" or "command" for referring to actions. Make the error messages consistent with help. Signed-off-by: Siddh Raman Pant Signed-off-by: Josh Poimboeuf commit c02904f05ff805d6c0631634d5751ebd338f75ec Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:38 2024 +0200 scripts/faddr2line: Check only two symbols when calculating symbol size Rather than looping through each symbol in a particular section to calculate a symbol's size, grep for the symbol and its immediate successor, and only use those two symbols. Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-8-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit 406b5c12aad8110e1b1f9355f176cac43cd1fecb Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:37 2024 +0200 scripts/faddr2line: Remove call to addr2line from find_dir_prefix() Use the single long-running faddr2line process from find_dir_prefix(). Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-7-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit e36b69e918112430ee53e24238bb87f5146f9acf Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:36 2024 +0200 scripts/faddr2line: Invoke addr2line as a single long-running process Rather than invoking a separate addr2line process for each address, invoke a single addr2line coprocess, and pass each address to its stdin. Previous work [0] applied a similar change to perf, leading to a ~60x speed-up [1]. If using an object file that is _not_ vmlinux, faddr2line passes a section name argument to addr2line. Because we do not know until runtime which section names will be passed to addr2line, we cannot apply this change to non-vmlinux object files. Hence, it only applies to vmlinux. [0] commit be8ecc57f180 ("perf srcline: Use long-running addr2line per DSO") [1] Link: https://eighty-twenty.org/2021/09/09/perf-addr2line-speed-improvement Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-6-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit 5b280de46d2bcea9def0dd84b1e86f8b42ca70b9 Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:35 2024 +0200 scripts/faddr2line: Pass --addresses argument to addr2line In preparation for identifying an addr2line sentinel. See previous work [0], which applies a similar change to perf. [0] commit 8dc26b6f718a ("perf srcline: Make sentinel reading for binutils addr2line more robust") Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-5-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit 2c809186ccf0e3a4cb952da181f9c28436133081 Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:34 2024 +0200 scripts/faddr2line: Check vmlinux only once Rather than checking whether the object file is vmlinux for each invocation of __faddr2line, check it only once beforehand. Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-4-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit b8d9d9496c1e78a8fd89f4fe9923d12b3c9ad8a3 Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:33 2024 +0200 scripts/faddr2line: Combine three readelf calls into one Rather than calling readelf three separate times to collect three different types of info, call it only once, and parse out the different types of info from its output. Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-3-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit 39cf650d68289d41d484f4c29fea0124df2e09aa Author: Brian Johannesmeyer Date: Mon Apr 15 16:55:32 2024 +0200 scripts/faddr2line: Reduce number of readelf calls to three Rather than calling readelf several times for each invocation of __faddr2line, call readelf only three times at the beginning, and save its result for future use. Signed-off-by: Brian Johannesmeyer Link: https://lore.kernel.org/r/20240415145538.1938745-2-bjohannesmeyer@gmail.com Signed-off-by: Josh Poimboeuf commit c98f17fec35e46629272226a898ebb0a653ee270 Author: Nathan Chancellor Date: Tue Jul 2 07:48:48 2024 -0700 power: supply: cros_charge-control: Avoid accessing attributes out of bounds Clang warns (or errors with CONFIG_WERROR=y): drivers/power/supply/cros_charge-control.c:319:2: error: array index 3 is past the end of the array (that has type 'struct attribute *[3]') [-Werror,-Warray-bounds] 319 | priv->attributes[_CROS_CHCTL_ATTR_COUNT] = NULL; | ^ ~~~~~~~~~~~~~~~~~~~~~~ drivers/power/supply/cros_charge-control.c:49:2: note: array 'attributes' declared here 49 | struct attribute *attributes[_CROS_CHCTL_ATTR_COUNT]; | ^ 1 error generated. In earlier revisions of the driver, the attributes array in cros_chctl_priv had four elements with four distinct assignments but during review, the number of elements was changed to three through use of an enum and the assignments became a for loop, except for this one, which is now out of bounds. This assignment is no longer necessary because the size of the attributes array no longer accounts for it, so just remove it to clear up the warning. Fixes: c6ed48ef5259 ("power: supply: add ChromeOS EC based charge control driver") Signed-off-by: Nathan Chancellor Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240702-cros_charge-control-fix-clang-array-bounds-warning-v1-1-ae04d995cd1d@kernel.org Signed-off-by: Tzung-Bi Shih commit 2210093478443cd57cff5950379fec31ee8a5f79 Author: Jani Nikula Date: Thu May 30 13:01:54 2024 +0300 drm/exynos/vidi: convert to struct drm_edid Prefer the struct drm_edid based functions for storing the EDID and updating the connector. It would be better if the vidi connection ioctl passed in the EDID size separately instead of relying on the extension count specified in the EDID, but that's what we have to rely on. Signed-off-by: Jani Nikula Signed-off-by: Inki Dae commit 10b566f21beaba03bcc519055ff03b515d3c4137 Author: Jani Nikula Date: Thu May 30 13:01:53 2024 +0300 drm/exynos/vidi: simplify fake edid handling Avoid assigning fake_edid_info to ctx->raw_edid. Always keep ctx->raw_edid either an allocated pointer or NULL. Defer fake_edid_info handling to .get_modes(). This should be functionally equivalent but slightly easier to follow. Signed-off-by: Jani Nikula Signed-off-by: Inki Dae commit 679ca523843004bd656a712e703489e15be992c8 Author: Jani Nikula Date: Thu May 30 13:01:52 2024 +0300 drm/exynos/vidi: use drm_edid_duplicate() Don't open code drm_edid_duplicate(). While at it, drop the error message on allocation failure. Signed-off-by: Jani Nikula Signed-off-by: Inki Dae commit 98e05e40e9900818346adfcf0c6ef98664224dea Merge: fb625bf6187d9 38e3825631b1f Author: Inki Dae Date: Wed Jul 3 13:00:01 2024 +0900 Merge tag 'exynos-drm-fixes-for-v6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into exynos-drm-next Regression fix - Fix an regression issue by adding 640x480 fallback mode for Exynos HDMI driver. Bug fix - Fix a memory leak by ensuring the duplicated EDID is properly freed in the get_modes function. Code cleanup - Remove redundant driver owner initialization since platform_driver_register() sets it automatically. commit 2a5454d0fe5684855581f8ad958afbcdc476fd64 Author: Raymond Hackley Date: Sun Jun 30 13:29:41 2024 +0000 ARM: dts: qcom: qcom-msm8226-samsung-ms013g: Add initial device tree Samsung Galaxy Grand 2 is a phone based on MSM8226. It's similar to the other Samsung devices based on MSM8226 with only a few minor differences. The device trees contain initial support with: - GPIO keys - Regulator haptic - SDHCI (internal and external storage) - UART (on USB connector via the TI TSU6721 MUIC) - Regulators - Touchscreen - Accelerometer Signed-off-by: Raymond Hackley Reviewed-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240630132859.2885-3-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 968178e35e78e566f75dbb7fbfc4dd1436ce8309 Author: Raymond Hackley Date: Sun Jun 30 13:29:26 2024 +0000 dt-bindings: arm: qcom: Document samsung,ms013g Document samsung,ms013g for Galaxy Grand 2. Signed-off-by: Raymond Hackley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240630132859.2885-2-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit d0e2f8f62dff11ce399937fa51d09c24b46049be Author: Xilin Wu Date: Mon Jul 1 11:05:18 2024 +0800 arm64: dts: qcom: Add device tree for ASUS Vivobook S 15 ASUS Vivobook S 15 is a laptop based on the Qualcomm Snapdragon X Elite SoC (X1E78100). Add the device tree for the laptop with support for the following features: - CPU frequency scaling up to 3.4GHz - NVMe storage on PCIe 6a (capable of Gen4x4, currently limited to Gen4x2) - Keyboard and touchpad - WCN7850 Wi-Fi - Two Type-C ports on the left side (USB3 only in one orientation) - internal eDP display - ADSP and CDSP remoteprocs Further details could be found in the cover letter. Signed-off-by: Xilin Wu Link: https://lore.kernel.org/r/20240701-asus-vivobook-s15-v4-2-ce7933b4d4e5@gmail.com Signed-off-by: Bjorn Andersson commit ef7025079a9de1ed06a049a0c69afe822d0b7fb0 Author: Xilin Wu Date: Mon Jul 1 11:05:17 2024 +0800 dt-bindings: arm: qcom: Add ASUS Vivobook S 15 Add the compatible for this device. Signed-off-by: Xilin Wu Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240701-asus-vivobook-s15-v4-1-ce7933b4d4e5@gmail.com Signed-off-by: Bjorn Andersson commit c6050d45cd372e4a34f9f501b30243caf2e810c6 Author: Dang Huynh Date: Tue Jul 2 13:01:19 2024 +0700 arm64: dts: qcom: qrb4210-rb2: Correct max current draw for VBUS According to downstream sources, maximum current for PMI632 VBUS is 1A. Taken from msm-4.19 (631561973a034e46ccacd0e53ef65d13a40d87a4) Line 685-687 in drivers/power/supply/qcom/qpnp-smb5.c Fixes: a06a2f12f9e2 ("arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling") Reviewed-by: Luca Weiss Signed-off-by: Dang Huynh Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240702-qrd4210rb2-vbus-volt-v3-1-fbd24661eec4@riseup.net Signed-off-by: Bjorn Andersson commit df18948d331eacc213cfc9e8ffc84a07dfd4dcd1 Merge: ac26327635d64 07c3cc51a0853 Author: Jakub Kicinski Date: Tue Jul 2 18:59:33 2024 -0700 Merge branch 'device-memory-tcp' Prep patches for Device Memory TCP Pick up a couple of prep patches for Device Memory TCP which stand on their own. Link: https://patch.msgid.link/20240628003253.1694510-1-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 07c3cc51a0853986af0fc52d0544b1b67b391ea8 Author: Jakub Kicinski Date: Fri Jun 28 00:32:50 2024 +0000 tools: net: package libynl for use in selftests Support building the C YNL userspace library into one big static file. We can then link selftests against it for easy to use C netlink interface. Signed-off-by: Mina Almasry Link: https://patch.msgid.link/20240628003253.1694510-14-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 4dec64c52e24c2c9a15f81c115f1be5ea35121cb Author: Mina Almasry Date: Fri Jun 28 00:32:42 2024 +0000 page_pool: convert to use netmem Abstract the memory type from the page_pool so we can later add support for new memory types. Convert the page_pool to use the new netmem type abstraction, rather than use struct page directly. As of this patch the netmem type is a no-op abstraction: it's always a struct page underneath. All the page pool internals are converted to use struct netmem instead of struct page, and the page pool now exports 2 APIs: 1. The existing struct page API. 2. The new struct netmem API. Keeping the existing API is transitional; we do not want to refactor all the current drivers using the page pool at once. The netmem abstraction is currently a no-op. The page_pool uses page_to_netmem() to convert allocated pages to netmem, and uses netmem_to_page() to convert the netmem back to pages to pass to mm APIs, Follow up patches to this series add non-paged netmem support to the page_pool. This change is factored out on its own to limit the code churn to this 1 patch, for ease of code review. Signed-off-by: Mina Almasry Reviewed-by: Pavel Begunkov Link: https://patch.msgid.link/20240628003253.1694510-6-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 2eae307ec529a48dd6de89c86d0df62c7f5fc537 Author: Abhishek Dubey Date: Fri Jun 28 14:32:24 2024 -0400 perf report: Calling available function for stats printing For printing dump_trace, just use existing stats_print() function. Signed-off-by: Abhishek Dubey Link: https://lore.kernel.org/r/20240628183224.452055-1-adubey@linux.ibm.com Signed-off-by: Namhyung Kim commit 7fd3569219fab998b011514df15197e431004db4 Author: Jeff Johnson Date: Thu Jun 13 14:55:17 2024 -0700 clk: vexpress-osc: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/versatile/clk-vexpress-osc.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-clk-versatile-v1-1-6b8a5e5e00ef@quicinc.com Acked-by: Sudeep Holla Reviewed-by: Linus Walleij Signed-off-by: Stephen Boyd commit a6c3da03ead11396a8777d1935bb0b2bd4e63a12 Author: Audra Mitchell Date: Tue Jul 2 08:55:39 2024 -0400 clk: disable clk gate tests for s390 Currently clk-gate tests for s390 fail as the tests create a pretend clk-gate and use a "fake_reg" to emulate the expected behavior of the clk_gate->reg. I added some debug statements to the driver and noticed that the reg changes after initialization to -1, which is coming from an error coming from zpci_load(). This is likely because the test is using fake iomem and the s390 architecture likely isn't designed to handle that. Turn off the clk-gate tests for s390 for now as there is no clear work around for this problem as discussed in upstream conversation [1]. [1] https://lore.kernel.org/all/301cd41e6283c12ac67fb8c0f8d5c929.sboyd@kernel.org/T/#t Signed-off-by: Audra Mitchell Link: https://lore.kernel.org/r/20240702125539.524489-1-audra@redhat.com Signed-off-by: Stephen Boyd commit 88a0a4f6068c63f002cadaacaeade1d916c953ca Author: Oliver Upton Date: Fri Jun 28 22:21:47 2024 +0000 MAINTAINERS: Include documentation in KVM/arm64 entry Ensure updates to the KVM/arm64 documentation get sent to the right place. Acked-by: Zenghui Yu Link: https://lore.kernel.org/r/20240628222147.3153682-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 31a45f9190b5b4f5cd8cdec8471babd5215eee04 Author: Rob Herring (Arm) Date: Tue Jul 2 15:54:01 2024 -0600 ASoC: tas2781: Use of_property_read_reg() Replace the open-coded parsing of "reg" with of_property_read_reg(). The #ifdef is also easily replaced with IS_ENABLED(). Signed-off-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240702215402.839673-1-robh@kernel.org Signed-off-by: Mark Brown commit 4aad1d9471108a5023e224422b2522323521174c Author: Rob Herring (Arm) Date: Tue Jul 2 15:53:49 2024 -0600 ASoC: PCM6240: Use of_property_read_reg() Replace the open-coded parsing of "reg" with of_property_read_reg(). The #ifdef is also easily replaced with IS_ENABLED(). Signed-off-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240702215349.839350-1-robh@kernel.org Signed-off-by: Mark Brown commit b40934ae32232140e85dc7dc1c3ea0e296986723 Author: Adrian Hunter Date: Tue Jun 25 13:45:32 2024 +0300 perf intel-pt: Fix exclude_guest setting In the past, the exclude_guest setting has had no effect on Intel PT tracing, but that may not be the case in the future. Set the flag correctly based upon whether KVM is using Intel PT "Host/Guest" mode, which is determined by the kvm_intel module parameter pt_mode: pt_mode=0 System-wide mode : host and guest output to host buffer pt_mode=1 Host/Guest mode : host/guest output to host/guest buffers respectively Fixes: 6e86bfdc4a60 ("perf intel-pt: Support decoding of guest kernel") Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20240625104532.11990-3-adrian.hunter@intel.com Signed-off-by: Namhyung Kim commit 36b4cd990a8fd3f5b748883050e9d8c69fe6398d Author: Adrian Hunter Date: Tue Jun 25 13:45:31 2024 +0300 perf intel-pt: Fix aux_watermark calculation for 64-bit size aux_watermark is a u32. For a 64-bit size, cap the aux_watermark calculation at UINT_MAX instead of truncating it to 32-bits. Fixes: 874fc35cdd55 ("perf intel-pt: Use aux_watermark") Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20240625104532.11990-2-adrian.hunter@intel.com Signed-off-by: Namhyung Kim commit 4ed6a3689caba239e6df18c60af9489001f481c3 Author: Alex Deucher Date: Mon Jul 1 12:50:10 2024 -0400 drm/amdgpu/atomfirmware: silence UBSAN warning This is a variable sized array. Link: https://lists.freedesktop.org/archives/amd-gfx/2024-June/110420.html Tested-by: Jeff Layton Signed-off-by: Alex Deucher commit ea67deb03cc0b3f6e00b4aab87732672d73295b5 Author: Sunil Khatri Date: Tue Jul 2 13:49:20 2024 +0530 drm/amdgpu: fix out of bounds access in gfx11 during ip dump During ip dump in gfx11 the index variable is reused but is not reinitialized to 0 and this causes the index calculation to be wrong and access out of bound access. Acked-by: Christian König Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 94845ea05758ae94cc305a7bf3d536cad40bf15c Author: Tim Huang Date: Tue Jun 4 13:33:05 2024 +0800 drm/amdgpu: add firmware for PSP IP v14.0.4 This patch is to add firmware for PSP 14.0.4. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b709f949f0e5576cd5e8949bfd21474f60ba3df5 Author: Tim Huang Date: Tue May 14 16:41:48 2024 +0800 drm/amdgpu: enable mode2 reset for SMU IP v14.0.4 Set the default reset method to mode2 for SMU 14.0.4. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 38a16bfe6fae93d3d4b7273f0d3add9ffcc4ff03 Author: Tim Huang Date: Tue May 14 16:38:48 2024 +0800 drm/amdgpu: add SMU IP v14.0.4 discovery support This patch is to add SMU 14.0.4 support Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 80ffdc273a75f5049277f590b0c287df979a5169 Author: Tim Huang Date: Wed May 15 12:57:02 2024 +0800 drm/amd/pm: add SMU IP v14.0.4 support This patch is to add SMU 14.0.4 support. Signed-off-by: Li Ma Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 11382d02fb5ad2d6d3145c9d1c863720add7efa5 Author: Li Ma Date: Tue May 28 16:30:56 2024 +0800 drm/amd/pm: smu v14.0.4 reuse smu v14.0.0 dpmtable Replace IP VERSION with smu->is_apu in if condition. And the dpmtable of smu v14.0.4 is same as smu v14.0.0. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9cd2ad14d88d6a99fb1f9364fabaf6bca5b1fc9a Author: Tim Huang Date: Tue May 14 15:56:37 2024 +0800 drm/amdgpu: add PSP IP v14.0.4 discovery support This patch is to add PSP 14.0.4 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c7c3f786b931f89a5b645e01a7cc3214e791e73b Author: Tim Huang Date: Tue May 14 15:53:25 2024 +0800 drm/amdgpu: add PSP IP v14.0.4 support This patch is to add PSP 14.0.4 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 614a9f5ed5b079af9cb933b9ebc6b3e128a2560d Author: Tim Huang Date: Tue Jun 4 13:51:30 2024 +0800 drm/amdgpu: add firmware for VPE IP v6.1.3 This patch is to add firmware for VPE 6.1.3. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ca15cd559fd841c968989ee44d3fda6e75974198 Author: Tim Huang Date: Wed May 15 16:32:28 2024 +0800 drm/amdgpu: add VPE IP v6.1.3 discovery support This patch is to add VPE 6.1.3 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f3e2a425c6b212d88d26c7d194e09508e520a5e8 Author: Tim Huang Date: Wed May 15 16:27:06 2024 +0800 drm/amdgpu: add VPE IP v6.1.3 support This patch is to add VPE 6.1.3 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 410bb279a8ca540cb8101160fefba5891b89d03a Author: Tim Huang Date: Tue May 14 15:04:02 2024 +0800 drm/amdgpu: Add NBIO IP v7.11.3 support Enable setting soc21 common clockgating for NBIO 7.11.3. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5aea87169414101686c90c23719cce30c96d6ef0 Author: Tim Huang Date: Tue May 14 15:01:42 2024 +0800 drm/amdgpu: add NBIO IP v7.11.3 discovery support This patch is to add NBIO 7.11.3 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6857669a2276fdc31f53b0edec46661149237112 Author: Tim Huang Date: Tue Jun 4 13:27:23 2024 +0800 drm/amdgpu: add firmware for SDMA IP v6.1.2 This patch is to add firmware for SDMA 6.1.2. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 71d8af38d3a9d9e17c255c13b6ff5fc1379ebade Author: Tim Huang Date: Tue May 14 14:50:12 2024 +0800 drm/amdkfd: add KFD support for SDMA IP v6.1.2 Enable KFD setting SDMA info for SDMA 6.1.2. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit dfeccf4d5437bdba1bf9cec14490d989677743c5 Author: Tim Huang Date: Tue May 14 14:48:01 2024 +0800 drm/amdgpu: add SDMA IP v6.1.2 discovery support This patch is to add SDMA 6.1.2 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4448b1ff4d267873575a7b74a3786b9c7c114c1d Author: Tim Huang Date: Tue Jun 4 13:22:39 2024 +0800 drm/amdgpu: add firmware for GC IP v11.5.2 This patch is to add firmware for GC 11.5.2. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 53c3a37436c400a00d05702334920354f2e3fdc2 Author: Tim Huang Date: Tue May 14 14:24:44 2024 +0800 drm/amdkfd: add KFD support for GC IP v11.5.2 Enable KFD for GC 11.5.2. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 23c1ea02417d10ddcf4d50b5cd5ea7b02c69cceb Author: Tim Huang Date: Tue May 14 14:22:09 2024 +0800 drm/amdgpu: add GC IP v11.5.2 to GC 11.5.0 family This patch is to add GC 11.5.2 to GC 11.5.0 family. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Veerabadhran Gopalakrishnan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 43e4cc22994290668b1ac63a0da4c74388c1cfe8 Author: Tim Huang Date: Tue May 14 14:17:13 2024 +0800 drm/amdgpu: add GC IP v11.5.2 soc21 support Add CG and PG flags for GFX IP v11.5.2 and PG flags for VCN IP v4.0.5. Signed-off-by: Saleemkhan Jamadar Signed-off-by: Li Ma Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Veerabadhran Gopalakrishnan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 98392782df666cee2b9d4161494bb23177d67605 Author: Tim Huang Date: Tue May 14 14:14:17 2024 +0800 drm/amdgpu: add tmz support for GC IP v11.5.2 Add tmz support for GC 11.5.2. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 02cf3ed62783ba42b66605408666fd648ac3a090 Author: Tim Huang Date: Tue May 14 14:11:22 2024 +0800 drm/amdgpu: add GFXHUB IP v11.5.2 support This patch is to add GFXHUB 11.5.2 support. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b6a343df46d69070a7073405e470e6348180ea34 Author: Tim Huang Date: Tue May 14 14:06:03 2024 +0800 drm/amdgpu: initialize GC IP v11.5.2 Initialize GC 11.5.2 and set gfx hw configuration. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 425c4a6f8ba62f77669a6a10ce9678153dee3e03 Author: Sunil Khatri Date: Tue Jul 2 13:46:50 2024 +0530 drm/amdgpu: fix out of bounds access in gfx10 during ip dump During ip dump in gfx10 the index variable is reused but is not reinitialized to 0 and this causes the index calculation to be wrong and access out of bound access. Acked-by: Christian König Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit e931ab3eea505535abd0369c5da27e3a5d0057bb Author: Jiapeng Chong Date: Mon Jul 1 15:04:51 2024 +0800 drm/amd/display: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c:14:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit f4b1dbf413624ad07cc2ca2a6e6ec25c3f1e733b Author: Jiapeng Chong Date: Mon Jul 1 15:04:52 2024 +0800 drm/amd/display: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c:24:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit dcac51bd102cdb2aff1ad337d3c2fd354491ba42 Author: Jiapeng Chong Date: Mon Jul 1 15:04:53 2024 +0800 drm/amd/display: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c:19:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 5380092f65b84cb843f363a145526047ef48d1fe Author: Jiapeng Chong Date: Mon Jul 1 15:04:54 2024 +0800 drm/amd/display: Fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c:31:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit fcb2f988ef4905ac787fef040a28d0f0f610ad83 Author: Jiapeng Chong Date: Mon Jul 1 10:50:28 2024 +0800 drm/amd/display: Fix unsigned comparison with less than zero The return value from the call to dml21_find_dc_pipes_for_plane() is int. However, the return value is being assigned to an unsigned int variable 'num_pipes', the condition if(num_pipes <= 0) is not rigorous enough, so making 'num_pipes' an int. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:318:6-15: WARNING: Unsigned expression compared with zero: num_pipes <= 0. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:360:6-15: WARNING: Unsigned expression compared with zero: num_pipes <= 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9454 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 3a5bb5066f4c7170e850b930e84b1075e25f8e90 Author: Roman Storozhenko Date: Tue Jul 2 09:56:25 2024 +0200 cpupower: fix lib default installation path Invocation the tool built with the default settings fails: $ cpupower cpupower: error while loading shared libraries: libcpupower.so.1: cannot open shared object file: No such file or directory The issue is that Makefile puts the library to "/usr/lib64" dir for a 64 bit machine. This is wrong. According to the "File hierarchy standard specification: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.pdf "/usr/lib" dirs are intended for alternative-format libraries (e.g., "/usr/lib32" for 32-bit libraries on a 64-bit machine (optional)). The utility is built for the current machine and doesn't handle 'CROSS_COMPILE' and 'ARCH' env variables. It also doesn't change bit depth. So the result is always the same - binary for x86_64 architecture. Therefore the library should be put in the '/usr/lib' dir regardless of the build options. This is the case for all the distros that comply with the 'File Hierarchy Standard 3.0" by Linux Foundation. Most of the distros comply with it. For example, one can check this by examining the "/usr/lb64" dir on debian-based distros and find that it contains only "/usr/lib64/ld-linux-x86-64.so.2". And examine that "/usr/lib" contains both 32 and 64 bit code: find /usr/lib -name "*.so*" -type f | xargs file | grep 32-bit find /usr/lib -name "*.so*" -type f | xargs file | grep 64-bit Fix the issue by changing library destination dir to "/usr/lib". Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit d06432b04603ea6f1b99bc0a933aa264b2fb6f4b Merge: 2858f8769a8ee 8f2942b9198c9 Author: Mark Brown Date: Tue Jul 2 21:32:07 2024 +0100 ASoC: topology: kcontrol registration cleanup Merge series from Amadeusz Sławiński : Code used to create standalone and widget controls is mostly same, with with exception that in standalone case dynamic object needs to be registered and control created directly. Following patches clean up and unify kcontrol creation code in topology code. commit f3d70720e92c24c22e0e63c2588636edba33eb1a Author: Huang Ying Date: Tue Jun 18 16:46:39 2024 +0800 cxl/region: Simplify cxl_region_nid() The node ID of the region can be gotten via resource start address directly. This simplifies the implementation of cxl_region_nid(). Signed-off-by: Huang Ying Suggested-by: Alison Schofield Cc: Dan Williams Cc: Andrew Morton Cc: Jonathan Cameron Cc: Dave Jiang Cc: Bharata B Rao Cc: Alistair Popple Cc: Aneesh Kumar K.V Cc: Davidlohr Bueso Cc: Vishal Verma Cc: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20240618084639.1419629-4-ying.huang@intel.com Signed-off-by: Dave Jiang commit 643e8e3e65290fdfe507bb23fa524c77e1345af3 Author: Huang Ying Date: Tue Jun 18 16:46:38 2024 +0800 cxl/region: Support to calculate memory tier abstract distance An abstract distance value must be assigned by the driver that makes the memory available to the system. It reflects relative performance and is used to place memory nodes backed by CXL regions in the appropriate memory tiers allowing promotion/demotion within the existing memory tiering mechanism. The abstract distance is calculated based on the memory access latency and bandwidth of CXL regions. Signed-off-by: Huang, Ying Acked-by: Dan Williams Cc: Alison Schofield Cc: Andrew Morton Cc: Jonathan Cameron Cc: Dave Jiang Cc: Bharata B Rao Cc: Alistair Popple Cc: Aneesh Kumar K.V Cc: Davidlohr Bueso Cc: Vishal Verma Cc: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20240618084639.1419629-3-ying.huang@intel.com Signed-off-by: Dave Jiang commit a3483ee7e6a7f2d12b5950246f4e0ef94f4a5df0 Author: Huang Ying Date: Tue Jun 18 16:46:37 2024 +0800 cxl/region: Fix a race condition in memory hotplug notifier In the memory hotplug notifier function of the CXL region, cxl_region_perf_attrs_callback(), the node ID is obtained by checking the host address range of the region. However, the address range information is not available when the region is registered in devm_cxl_add_region(). Additionally, this information may be removed or added under the protection of cxl_region_rwsem during runtime. If the memory notifier is called for nodes other than that backed by the region, a race condition may occur, potentially leading to a NULL dereference or an invalid address range. The race condition is addressed by checking the availability of the address range information under the protection of cxl_region_rwsem. To enhance code readability and use guard(), the relevant code has been moved into a newly added function: cxl_region_nid(). Fixes: 067353a46d8c ("cxl/region: Add memory hotplug notifier for cxl region") Signed-off-by: Huang, Ying Cc: Dan Williams Cc: Alison Schofield Cc: Andrew Morton Cc: Jonathan Cameron Cc: Dave Jiang Cc: Bharata B Rao Cc: Alistair Popple Cc: Aneesh Kumar K.V Cc: Davidlohr Bueso Cc: Vishal Verma Cc: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20240618084639.1419629-2-ying.huang@intel.com Signed-off-by: Dave Jiang commit a0caa19711ceb54c34368f66a746844fb03fde6c Author: Jeff Johnson Date: Fri Jun 7 06:57:15 2024 -0700 cxl: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/core/cxl_core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/cxl_pci.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/cxl_mem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/cxl_acpi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/cxl_pmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cxl/cxl_port.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20240607-md-drivers-cxl-v2-1-0c61d95ee7a7@quicinc.com Signed-off-by: Dave Jiang commit 675e979db473d08be346a3190c5f0db095a57153 Author: Fabio M. De Francesco Date: Fri Jun 7 16:43:58 2024 +0200 cxl/events: Use a common struct for DRAM and General Media events cxl_event_common was an unfortunate naming choice and caused confusion with the existing Common Event Record. Furthermore, its fields didn't map all the common information between DRAM and General Media Events. Remove cxl_event_common and introduce cxl_event_media_hdr to record common information between DRAM and General Media events. cxl_event_media_hdr, which is embedded in both cxl_event_gen_media and cxl_event_dram, leverages the commonalities between the two events to simplify their respective handling. Suggested-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: Dan Williams Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240607144423.48681-1-fabio.m.de.francesco@linux.intel.com Signed-off-by: Dave Jiang commit b1da66d28a8bad9130d7bd96decefd375847a77d Merge: 1613e604df0cd e61f400d6cf3d Author: Stephen Boyd Date: Tue Jul 2 12:40:30 2024 -0700 Merge tag 'samsung-clk-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung Pull Samsung SoC clk drivers updates from Krzysztof Kozlowski: - exynos-clkout: Remove usage of of_device_id table as .of_match_table, because the driver is instantiated as MFD cell, not as standalone platform driver. Populated .of_match_table confused people few times to convert the code to device_get_match_data(), which broke the driver. - Mark one of UFS clocks as critical, because having it off stops the system from shutdown - Use kmemdup_array() when applicable * tag 'samsung-clk-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: gs101: mark gout_hsi2_ufs_embd_i_clk_unipro as critical clk: samsung: Switch to use kmemdup_array() clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE commit cd228e7b65d43c441964a17f02c92f33d2c4af7b Author: Alex Vdovydchenko Date: Tue Jul 2 14:52:51 2024 +0300 hwmon: add MP5920 driver Add support for MPS Hot-Swap controller mp5920. This driver exposes telemetry and limit value readings and writings. Signed-off-by: Alex Vdovydchenko Reviewed-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240702115252.981416-3-xzeol@yahoo.com [groeck: Use min_t() to limit length of displayed model string] Signed-off-by: Guenter Roeck commit a50fbf8a52de59fbc1c06d643a3cb86495c1b3b2 Author: Alex Vdovydchenko Date: Tue Jul 2 14:52:50 2024 +0300 dt-bindings: hwmon: Add MPS mp5920 Add support for MPS mp5920 controller Signed-off-by: Alex Vdovydchenko Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240702115252.981416-2-xzeol@yahoo.com Signed-off-by: Guenter Roeck commit 2858f8769a8ee7177113ebc7133f47acbb91fb76 Merge: 83d43ab0a1cb8 1d3724c92dc20 Author: Mark Brown Date: Tue Jul 2 20:26:51 2024 +0100 Add master clock handling for nau8824 Merge series from Maxim Kochetkov : nau8824 has external MCLK pin. So add enable/disable external clock management. commit 5d5f67b3b23f42eafdba508d6075fa714cbe2ed2 Author: Roshan Khatri Date: Tue May 7 11:10:12 2024 +0545 media: atomisp: Fix spelling mistakes in sh_css_sp.c Codespell reported misspelled fields,suppress,separately and offset in file sh_css_sp.c. This patch fixes the misspellings. Signed-off-by: Roshan Khatri Link: https://lore.kernel.org/r/20240507052512.7296-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 41edaef5942b34f05e9be35679a57adc4662bfd5 Author: Roshan Khatri Date: Mon May 6 11:43:18 2024 +0545 media: atomisp: Fix spelling mistake in ia_css_debug.c codespell reported misspelled suppress and implicit on ia_css_debug.c. This patch fixes the misspellings. Signed-off-by: Roshan Khatri Link: https://lore.kernel.org/r/20240506055818.2532-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 0d0e892cd1be027ca75f355a8c68a0f98902c0e6 Author: Roshan Khatri Date: Sun May 5 19:08:44 2024 +0545 media: atomisp: Fix spelling mistake in hmm_bo.c codespell reported misspelled unchanged in hmm_bo.c at two places. This patch fixes the misspellings. Signed-off-by: Roshan Khatri Link: https://lore.kernel.org/r/20240505132345.135528-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 5b11fe4daf6878b99526899f261f7700b09b0e5b Author: Roshan Khatri Date: Sun May 5 09:14:30 2024 +0545 media: atomisp: Fix spelling mistake in ia_css_eed1_8.host.c codespell reported misspelled calculating in ia_css_eed1_8.host.c. This patch fixes the misspellings. Signed-off-by: Roshan Khatri Link: https://lore.kernel.org/r/20240505032931.133879-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 4306942df0f5f37c2fa4e55658e93d69d508c6ab Author: Roshan Khatri Date: Wed May 1 22:11:20 2024 +0545 media: atomisp: Fix spelling mistake in sh_css_internal.h codespell reported misspelled words still and member. This patch fixes misspellings. Signed-off-by: Roshan Khatri Link: https://lore.kernel.org/r/20240501162620.86865-1-topofeverest8848@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 06617337bf1ee819d022a13b4e7022fc9da283c4 Author: Colin Ian King Date: Mon Apr 29 08:51:46 2024 +0100 media: atomisp: Fix spelling mistake "pipline" -> "pipeline" There is a spelling mistake in a dev_err() message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20240429075146.1073869-1-colin.i.king@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit a7547337b878c310e137ad366b28d70a243b7140 Author: Andy Shevchenko Date: Thu Apr 25 00:08:00 2024 +0300 media: atomisp: Remove unused GPIO related defines and APIs Remove unused GPIO related defines and APIs. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240424210800.1776038-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 92a643eec731771d85a33280280d249dea3bcda7 Author: Andy Shevchenko Date: Wed Apr 24 21:43:32 2024 +0300 media: atomisp: Replace COMPILATION_ERROR_IF() by static_assert() Replace COMPILATION_ERROR_IF() by static_assert(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240424184421.1737776-3-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit 143fd8feb8eaf3f14eb42d330fb46152ff291693 Author: Andy Shevchenko Date: Wed Apr 24 21:43:31 2024 +0300 media: atomisp: Clean up unused macros from math_support.h Clean up unused macros from math_support.h and replace rarely used by generic ones from Linux kernel headers. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240424184421.1737776-2-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil commit e323de473d292a5c7f21e6c6c493bc94aab62739 Author: Hans de Goede Date: Mon Jun 3 15:20:57 2024 +0200 media: atomisp: csi2-bridge: Add DMI quirk for OV5693 on Xiaomi Mipad2 The OV5693 the Xiaomi Mipad2 is used as a front facing sensor and as such is connected to CsiPort 0, but the _DSM has CsiPort 1, add a DMI quirk to override the wrong _DSM setting. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240603132057.255917-5-hdegoede@redhat.com Signed-off-by: Hans Verkuil commit aa7a02089fb505a1658e968fb8ad4be643c5903f Author: Hans de Goede Date: Mon Jun 3 15:20:56 2024 +0200 media: atomisp: Update TODO Update the TODO list: - Remove comment about adding firmware to linux-firmware this has been done - Add a comment about removing unnecessary / unwanted module parameters Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240603132057.255917-4-hdegoede@redhat.com Signed-off-by: Hans Verkuil commit f99d675766bd7ed5e085249a617851548e05c629 Author: Hans de Goede Date: Mon Jun 3 15:20:55 2024 +0200 media: atomisp: Prefix firmware paths with "intel/ipu/" The atomisp firmwares have been added to upstream linux-firmware under intel/ipu/ add this prefix to the firmware name passed to request_firmware(). Fall back to the old location if this fails to avoid breaking existing setups. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240603132057.255917-3-hdegoede@redhat.com Signed-off-by: Hans Verkuil commit 19d933cf065229356c40753c836605ce8e1c59dc Author: Hans de Goede Date: Mon Jun 3 15:20:54 2024 +0200 media: atomisp: Remove firmware_name module parameter There is no need for the user to be able to specify a different name for the firmware being loaded. Most other kernel drivers do not have this and work fine without it. Drop this unnecessary module parameter. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240603132057.255917-2-hdegoede@redhat.com Signed-off-by: Hans Verkuil commit 9d0643da1162f1ee1f49420789f4203aaaae0f7e Author: Hans de Goede Date: Mon Jun 3 15:20:53 2024 +0200 media: atomisp: Remove unused mipicsi_flag module parameter The mipicsi_flag int is completely unused, remove it. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240603132057.255917-1-hdegoede@redhat.com Signed-off-by: Hans Verkuil commit 86932cd8ccd4add4ddb3e894a0c4471aab8233c2 Author: Prabhakar Pujeri Date: Wed Jun 26 09:09:40 2024 -0400 ACPI: CPPC: Replace ternary operator with umax() Replace ternary operator with umax() in cppc_find_dmi_mhz(). Signed-off-by: Prabhakar Pujeri [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/20240626130941.1527127-2-prabhakar.pujeri@gmail.com Signed-off-by: Rafael J. Wysocki commit 44d36a2ea426be14d2e5db72e2e7676346c8b802 Author: Eric Biggers Date: Tue Jul 2 16:37:45 2024 +0200 dm-verity: move hash algorithm setup into its own function Move the code that sets up the hash transformation into its own function. No change in behavior. Reviewed-by: Sami Tolvanen Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Mikulas Patocka commit 140ce37fd78a629105377e17842465258a5459ef Author: Benjamin Marzinski Date: Tue Jul 2 12:13:24 2024 +0200 dm init: Handle minors larger than 255 dm_parse_device_entry() simply copies the minor number into dmi.dev, but the dev_t format splits the minor number between the lowest 8 bytes and highest 12 bytes. If the minor number is larger than 255, part of it will end up getting treated as the major number Fix this by checking that the minor number is valid and then encoding it as a dev_t. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit c1a66a37d606d27bad037b34083464a7f515d619 Author: Dr. David Alan Gilbert Date: Tue Jul 2 12:10:32 2024 +0200 dm cache metadata: remove unused struct 'thunk' 'thunk' has been unused since commit f177940a8091 ("dm cache metadata: switch to using the new cursor api for loading metadata"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Matthew Sakai Signed-off-by: Mikulas Patocka commit 74ad3cb08b0166776c41a460b70034edb02acb65 Merge: a7cacaa0880e4 83a7eefedc9b5 Author: Namhyung Kim Date: Tue Jul 2 11:51:32 2024 -0700 Merge remote-tracking branch 'perf-tools' into perf-tools-next Merge fixes and updates in v6.10 into perf-tools-next to resolve changes in synthesizing the LOST_SAMPLES records and build fixes. Signed-off-by: Namhyung Kim commit 29acea1a043fa98d19d85a9bc614bed4aa0a58af Author: Raphael Gallais-Pou Date: Mon Jul 1 19:10:40 2024 +0200 cpufreq: docs: Add missing scaling_available_frequencies description Add a description of the scaling_available_frequencies attribute in sysfs to the documentation. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Bagas Sanjaya Acked-by: Viresh Kumar Link: https://patch.msgid.link/20240701171040.369030-1-rgallaispou@gmail.com Signed-off-by: Rafael J. Wysocki commit 529d2e1900642eba6df28307e26e19793e227546 Author: Jonathan Cameron Date: Tue Jul 2 19:43:46 2024 +0100 iio: adc: ad7173: Fix uninitialized symbol is_current_chan Move the definition down and make it a boolean that is initialized to false. Fixes: 13d12e3ad12d ("iio: adc: ad7173: Add support for AD411x devices") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202406232046.DKfBJq6o-lkp@intel.com/ Signed-off-by: Jonathan Cameron commit dc41751f9e07889d078e3f06adb6e892c80b7c10 Author: Tamim Khan Date: Tue Jul 2 08:58:06 2024 -0400 ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MU Like various other Asus laptops, the Asus Vivobook Pro N6506MV has a DSDT table that describes IRQ 1 as ActiveLow while the kernel is overriding it to Edge_High. This prevents the internal keyboard from working. This patch prevents this issue by adding this laptop to the override table that prevents the kernel from overriding this IRQ Link: https://bugzilla.kernel.org/show_bug.cgi?id=218954 Tested-by: Lefteris Signed-off-by: Tamim Khan Link: https://patch.msgid.link/20240702125918.34683-1-tamim@fusetak.com Signed-off-by: Rafael J. Wysocki commit 783e8a7c9cab6744ebc5dfe75081248ac39181b2 Author: Darrick J. Wong Date: Tue Jul 2 11:23:12 2024 -0700 xfs: move xfs_refcount_update_defer_add to xfs_refcount_item.c Move the code that adds the incore xfs_refcount_update_item deferred work data to a transaction live with the CUI log item code. This means that the refcount code no longer has to know about the inner workings of the CUI log items. As a consequence, we can get rid of the _{get,put}_group helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e51987a12cb57ca3702bff5df8a615037b2c8f8a Author: Darrick J. Wong Date: Tue Jul 2 11:23:11 2024 -0700 xfs: simplify usage of the rcur local variable in xfs_refcount_finish_one Only update rcur when we know the final *pcur value. Inspired-by: Christoph Hellwig [djwong: don't leave the caller with a dangling ref] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit bac3f784925299b5e69a857e7e03e59c88aa14be Author: Darrick J. Wong Date: Tue Jul 2 11:23:10 2024 -0700 xfs: don't bother calling xfs_refcount_finish_one_cleanup in xfs_refcount_finish_one In xfs_refcount_finish_one we know the cursor is non-zero when calling xfs_refcount_finish_one_cleanup and we pass a 0 error variable. This means xfs_refcount_finish_one_cleanup is just doing a xfs_btree_del_cursor. Open code that and move xfs_refcount_finish_one_cleanup to fs/xfs/xfs_refcount_item.c. Inspired-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 8aef79928b3ddd8c10a3235f982933addc15a977 Author: Darrick J. Wong Date: Tue Jul 2 11:23:10 2024 -0700 xfs: reuse xfs_refcount_update_cancel_item Reuse xfs_refcount_update_cancel_item to put the AG/RTG and free the item in a few places that currently open code the logic. Inspired-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 0e9254861f980bd60a58b7c2b57ba0414c038409 Author: Darrick J. Wong Date: Tue Jul 2 11:23:09 2024 -0700 xfs: add a ci_entry helper Add a helper to translate from the item list head to the refcount_intent_item structure and use it so shorten assignments and avoid the need for extra local variables. Inspired-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e69682e5a12d1ea7fd3f3b8243a506228665ee79 Author: Darrick J. Wong Date: Tue Jul 2 11:23:08 2024 -0700 xfs: remove xfs_trans_set_refcount_flags Remove this single-use helper. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 886f11c797722650d98c554b28e66f12317a33e4 Author: Darrick J. Wong Date: Tue Jul 2 11:23:07 2024 -0700 xfs: clean up refcount log intent item tracepoint callsites Pass the incore refcount intent structure to the tracepoints instead of open-coding the argument passing. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit ea7b0820d960d5a3ee72bc67cbd8b5d47c67aa4c Author: Darrick J. Wong Date: Tue Jul 2 11:23:04 2024 -0700 xfs: move xfs_rmap_update_defer_add to xfs_rmap_item.c Move the code that adds the incore xfs_rmap_update_item deferred work data to a transaction to live with the RUI log item code. This means that the rmap code no longer has to know about the inner workings of the RUI log items. As a consequence, we can get rid of the _{get,put}_group helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 8fbac2f1a0947dc45ecf13e9b5aa17b5942b4a2d Author: Darrick J. Wong Date: Tue Jul 2 11:23:06 2024 -0700 xfs: pass btree cursors to refcount btree tracepoints Prepare the rest of refcount btree tracepoints for use with realtime reflink by making them take the btree cursor object as a parameter. This will save us a lot of trouble later on. Remove the xfs_refcount_recover_extent tracepoint since it's already covered by other refcount tracepoints. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit bb0efb0d0a2885b4c65ca31e2815da2281b99153 Author: Darrick J. Wong Date: Tue Jul 2 11:23:05 2024 -0700 xfs: create specialized classes for refcount tracepoints The only user of the "ag" tracepoint event classes is the refcount btree, so rename them to make that obvious and make them take the btree cursor to simplify the arguments. This will save us a lot of trouble later on. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 7cf2663ff1cfb20f5fe025122016b68920b28041 Author: Darrick J. Wong Date: Tue Jul 2 11:23:05 2024 -0700 xfs: give refcount btree cursor error tracepoints their own class Convert all the refcount tracepoints to use the btree error tracepoint class. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 905af72610d90f58f994feff4ead1fc258f5d2b1 Author: Christoph Hellwig Date: Tue Jul 2 11:23:03 2024 -0700 xfs: simplify usage of the rcur local variable in xfs_rmap_finish_one Only update rcur when we know the final *pcur value. Signed-off-by: Christoph Hellwig [djwong: don't leave the caller with a dangling ref] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8363b4361997044ecb99880a1a9bfdebf9145eed Author: Christoph Hellwig Date: Tue Jul 2 11:23:02 2024 -0700 xfs: don't bother calling xfs_rmap_finish_one_cleanup in xfs_rmap_finish_one In xfs_rmap_finish_one we known the cursor is non-zero when calling xfs_rmap_finish_one_cleanup and we pass a 0 error variable. This means xfs_rmap_finish_one_cleanup is just doing a xfs_btree_del_cursor. Open code that and move xfs_rmap_finish_one_cleanup to fs/xfs/xfs_rmap_item.c. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [djwong: minor porting changes] Signed-off-by: Darrick J. Wong commit 37f9d1db03ba0511403c5d25ba0baaddf5208ba7 Author: Christoph Hellwig Date: Tue Jul 2 11:23:01 2024 -0700 xfs: reuse xfs_rmap_update_cancel_item Reuse xfs_rmap_update_cancel_item to put the AG/RTG and free the item in a few places that currently open code the logic. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f93963779b438a33ca4b13384c070a6864ce2b2b Author: Christoph Hellwig Date: Tue Jul 2 11:23:01 2024 -0700 xfs: add a ri_entry helper Add a helper to translate from the item list head to the rmap_intent_item structure and use it so shorten assignments and avoid the need for extra local variables. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c9099a28c264a9284171a3d56932e44f0e8b4cfa Author: Darrick J. Wong Date: Tue Jul 2 11:23:00 2024 -0700 xfs: remove xfs_trans_set_rmap_flags Remove this single-use helper. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 84a3c1576c5aade32170fae6c61d51bd2d16010f Author: Darrick J. Wong Date: Tue Jul 2 11:22:56 2024 -0700 xfs: move xfs_extent_free_defer_add to xfs_extfree_item.c Move the code that adds the incore xfs_extent_free_item deferred work data to a transaction to live with the EFI log item code. This means that the allocator code no longer has to know about the inner workings of the EFI log items. As a consequence, we can get rid of the _{get,put}_group helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit fbe8c7e167a6b226ae0234c26ebb65d8401473a5 Author: Darrick J. Wong Date: Tue Jul 2 11:22:59 2024 -0700 xfs: clean up rmap log intent item tracepoint callsites Pass the incore rmap structure to the tracepoints instead of open-coding the argument passing. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 47492ed124219b37acf65cd931c1e45d5bc0c274 Author: Darrick J. Wong Date: Tue Jul 2 11:22:58 2024 -0700 xfs: pass btree cursors to rmap btree tracepoints Prepare the rmap btree tracepoints for use with realtime rmap btrees by making them take the btree cursor object as a parameter. This will save us a lot of trouble later on. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 71f5a17e526775f001f643c9d54e5b59fa29d7ac Author: Darrick J. Wong Date: Tue Jul 2 11:22:57 2024 -0700 xfs: give rmap btree cursor error tracepoints their own class Create a new tracepoint class for btree-related errors, then convert all the rmap tracepoints to use it. Also fix the one tracepoint that was abusing the old class by making it a separate tracepoint. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 7272f77c67c0710918e5678266f8dad6e3bfc8d2 Author: Christoph Hellwig Date: Tue Jul 2 11:22:56 2024 -0700 xfs: remove xfs_defer_agfl_block xfs_free_extent_later can handle the extra AGFL special casing with very little extra logic. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 851a6781895a0f6e0ba75168dc7aecc132d13e6a Author: Christoph Hellwig Date: Tue Jul 2 11:22:55 2024 -0700 xfs: remove duplicate asserts in xfs_defer_extent_free The bno/len verification is already done by the calls to xfs_verify_rtbext / xfs_verify_fsbext, and reporting a corruption error seem like the better handling than tripping an assert anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 81927e6ec621e0607e2c061c7bc768f135cb5dc2 Author: Christoph Hellwig Date: Tue Jul 2 11:22:54 2024 -0700 xfs: factor out a xfs_efd_add_extent helper Factor out a helper to add an extent to and EFD instead of duplicating the logic in two places. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 61665fae4e4302f2a48de56749640a9f1a4c2ec5 Author: Christoph Hellwig Date: Tue Jul 2 11:22:53 2024 -0700 xfs: reuse xfs_extent_free_cancel_item Reuse xfs_extent_free_cancel_item to put the AG/RTG and free the item in a few places that currently open code the logic. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 649c0c2b86ee944a1a9962b310b1b97ead12e97a Author: Christoph Hellwig Date: Tue Jul 2 11:22:52 2024 -0700 xfs: add a xefi_entry helper Add a helper to translate from the item list head to the xfs_extent_free_item structure and use it so shorten assignments and avoid the need for extra local variables. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 62d597a197e390a89eadff60b98231e91b32ab83 Author: Christoph Hellwig Date: Tue Jul 2 11:22:51 2024 -0700 xfs: pass the fsbno to xfs_perag_intent_get All callers of xfs_perag_intent_get have a fsbno and need boilerplate code to turn that into an agno. Just pass the fsbno to xfs_perag_intent_get and look up the agno there. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 980faece91a60c279e7c24cb1d1a378bbbb74bb9 Author: Darrick J. Wong Date: Tue Jul 2 11:22:51 2024 -0700 xfs: convert "skip_discard" to a proper flags bitset Convert the boolean to skip discard on free into a proper flags field so that we can add more flags in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 4e0e2c0fe35b44cd4db6a138ed4316178ed60b5c Author: Darrick J. Wong Date: Tue Jul 2 11:22:50 2024 -0700 xfs: clean up extent free log intent item tracepoint callsites Pass the incore EFI structure to the tracepoints instead of open-coding the argument passing. This cleans up the call sites a bit. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit ac3a0275165b4f80d9b7b516d6a8f8b308644fff Author: Darrick J. Wong Date: Tue Jul 2 11:22:49 2024 -0700 xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb Currently, the XFS_SB_CRC_OFF macro uses the incore superblock struct (xfs_sb) to compute the address of sb_crc within the ondisk superblock struct (xfs_dsb). This is a landmine if we ever change the layout of the incore superblock (as we're about to do), so redefine the macro to use xfs_dsb to compute the layout of xfs_dsb. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 47d4d5961fb9069803576ed3adb85b57a575a1b9 Author: Darrick J. Wong Date: Tue Jul 2 11:22:48 2024 -0700 xfs: get rid of trivial rename helpers Get rid of the largely pointless xfs_cross_rename and xfs_finish_rename now that we've refactored its parent. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 62bbf50bea21b1c76990fd1bae58a65660a11c27 Author: Darrick J. Wong Date: Tue Jul 2 11:22:47 2024 -0700 xfs: move dirent update hooks to xfs_dir2.c Move the directory entry update hook code to xfs_dir2 so that it is mostly consolidated with the higher level directory functions. Retain the exports so that online fsck can still send notifications through the hooks. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 28d0d813444645689fefa232bcf88e86a5a3a746 Author: Darrick J. Wong Date: Tue Jul 2 11:22:46 2024 -0700 xfs: create libxfs helper to rename two directory entries Create a new libxfs function to rename two directory entries. The upcoming metadata directory feature will need this to replace a metadata inode directory entry. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a55712b35c065eee4ab1195233a5478fb7c93efa Author: Darrick J. Wong Date: Tue Jul 2 11:22:46 2024 -0700 xfs: create libxfs helper to exchange two directory entries Create a new libxfs function to exchange two directory entries. The upcoming metadata directory feature will need this to replace a metadata inode directory entry. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 90636e4531a8bfb5ef37d38a76eb97e5f5793deb Author: Darrick J. Wong Date: Tue Jul 2 11:22:45 2024 -0700 xfs: create libxfs helper to remove an existing inode/name from a directory Create a new libxfs function to remove a (name, inode) entry from a directory. The upcoming metadata directory feature will need this to create a metadata directory tree. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 1964435d19d947b8626379d09db3e33b9669f333 Author: Darrick J. Wong Date: Tue Jul 2 11:22:44 2024 -0700 xfs: hoist inode free function to libxfs Create a libxfs helper function that marks an inode free on disk. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c1f0bad4232fd309b2fe849153fcf473e775b1f7 Author: Darrick J. Wong Date: Tue Jul 2 11:22:43 2024 -0700 xfs: create libxfs helper to link an existing inode into a directory Create a new libxfs function to link an existing inode into a directory. The upcoming metadata directory feature will need this to create a metadata directory tree. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 1fa2e81957cf11620867729fb613b121692ee0d3 Author: Darrick J. Wong Date: Tue Jul 2 11:22:42 2024 -0700 xfs: create libxfs helper to link a new inode into a directory Create a new libxfs function to link a newly created inode into a directory. The upcoming metadata directory feature will need this to create a metadata directory tree. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b11b11e3b7a72606cfef527255a9467537bcaaa5 Author: Darrick J. Wong Date: Tue Jul 2 11:22:41 2024 -0700 xfs: separate the icreate logic around INIT_XATTRS INIT_XATTRS is overloaded here -- it's set during the creat process when we think that we're immediately going to set some ACL xattrs to save time. However, it's also used by the parent pointers code to enable the attr fork in preparation to receive ppptr xattrs. This results in xfs_has_parent() branches scattered around the codebase to turn on INIT_XATTRS. Linkable files are created far more commonly than unlinkable temporary files or directory tree roots, so we should centralize this logic in xfs_inode_init. For the three callers that don't want parent pointers (online repiar tempfiles, unlinkable tempfiles, rootdir creation) we provide an UNLINKABLE flag to skip attr fork initialization. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a9e583d34facc64b6edf3c9afb2ff4891038176d Author: Darrick J. Wong Date: Tue Jul 2 11:22:41 2024 -0700 xfs: hoist xfs_{bump,drop}link to libxfs Move xfs_bumplink and xfs_droplink to libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b8a6107921ca799330ff3efdd154b7fa0ff54582 Author: Darrick J. Wong Date: Tue Jul 2 11:22:40 2024 -0700 xfs: hoist xfs_iunlink to libxfs Move xfs_iunlink and xfs_iunlink_remove to libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c0223b8d66d2b3e8fed86fd80699ef2fef3e53af Author: Darrick J. Wong Date: Tue Jul 2 11:22:39 2024 -0700 xfs: wrap inode creation dqalloc calls Create a helper that calls dqalloc to allocate and grab a reference to dquots for the user, group, and project ids listed in an icreate structure. This simplifies the creat-related dqalloc callsites scattered around the code base. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit dfaf884233ba726bf389cbf6f629b3a3a7a93923 Author: Darrick J. Wong Date: Tue Jul 2 11:22:38 2024 -0700 xfs: push xfs_icreate_args creation out of xfs_create* Move the initialization of the xfs_icreate_args structure out of xfs_create and xfs_create_tempfile into their callers so that we can set the new inode's attributes in one place and pass that through instead of open coding the collection of attributes all over the code. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e9d2b35bb9d3ff372fad27998fc3969ced3f563d Author: Darrick J. Wong Date: Tue Jul 2 11:22:37 2024 -0700 xfs: hoist new inode initialization functions to libxfs Move all the code that initializes a new inode's attributes from the icreate_args structure and the parent directory into libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 38fd3d6a956f1b104f11cd6eee116c54bfe458c4 Author: Darrick J. Wong Date: Tue Jul 2 11:22:36 2024 -0700 xfs: split new inode creation into two pieces There are two parts to initializing a newly allocated inode: setting up the incore structures, and initializing the new inode core based on the parent inode and the current user's environment. The initialization code is not specific to the kernel, so we would like to share that with userspace by hoisting it to libxfs. Therefore, split xfs_icreate into separate functions to prepare for the next few patches. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a7b12718cb90188bc1a062d6cbb9d9a3f790e20a Author: Darrick J. Wong Date: Tue Jul 2 11:22:36 2024 -0700 xfs: use xfs_trans_ichgtime to set times when allocating inode Use xfs_trans_ichgtime to set the inode times when allocating an inode, instead of open-coding them here. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 3d1dfb6df9b7b9ffc95499b9ddd92d949e5a60d2 Author: Darrick J. Wong Date: Tue Jul 2 11:22:35 2024 -0700 xfs: implement atime updates in xfs_trans_ichgtime Enable xfs_trans_ichgtime to change the inode access time so that we can use this function to set inode times when allocating inodes instead of open-coding it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit ba4b39fe4c011078469dcd28f51447d75852d21c Author: Darrick J. Wong Date: Tue Jul 2 11:22:34 2024 -0700 xfs: pack icreate initialization parameters into a separate structure Callers that want to create an inode currently pass all possible file attribute values for the new inode into xfs_init_new_inode as ten separate parameters. This causes two code maintenance issues: first, we have large multi-line call sites which programmers must read carefully to make sure they did not accidentally invert a value. Second, all three file id parameters must be passed separately to the quota functions; any discrepancy results in quota count errors. Clean this up by creating a new icreate_args structure to hold all this information, some helpers to initialize them properly, and make the callers pass this structure through to the creation function, whose name we shorten to xfs_icreate. This eliminates the issues, enables us to keep the inode init code in sync with userspace via libxfs, and is needed for future metadata directory tree management. (A subsequent cleanup will also fix the quota alloc calls.) Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit fcea5b35f36233c04003ab8b3eb081b5e20e1aa4 Author: Darrick J. Wong Date: Tue Jul 2 11:22:33 2024 -0700 xfs: hoist project id get/set functions to libxfs Move the project id get and set functions into libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b7c477be396948ce88ea591b91070fa68ac12437 Author: Darrick J. Wong Date: Tue Jul 2 11:22:32 2024 -0700 xfs: hoist inode flag conversion functions to libxfs Hoist the inode flag conversion functions into libxfs so that we can keep them in sync. Do this by creating a new xfs_inode_util.c file in libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit acdddbe168040372a8b6b9b5876b92b715322910 Author: Darrick J. Wong Date: Tue Jul 2 11:22:31 2024 -0700 xfs: hoist extent size helpers to libxfs Move the extent size helpers to xfs_bmap.c in libxfs since they're used there already. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit d76e137057ae84e0ca1aac54a1f1ae7c0596c1cd Author: Darrick J. Wong Date: Tue Jul 2 11:22:31 2024 -0700 xfs: move inode copy-on-write predicates to xfs_inode.[ch] Move these inode predicate functions to xfs_inode.[ch] since they're not reflink functions. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 24a4e1cb322e2bf0f3a1afd1978b610a23aa8f36 Author: Darrick J. Wong Date: Tue Jul 2 11:22:30 2024 -0700 xfs: use consistent uid/gid when grabbing dquots for inodes I noticed that callers of xfs_qm_vop_dqalloc use the following code to compute the anticipated uid of the new file: mapped_fsuid(idmap, &init_user_ns); whereas the VFS uses a slightly different computation for actually assigning i_uid: mapped_fsuid(idmap, i_user_ns(inode)); Technically, these are not the same things. According to Christian Brauner, the only time that inode->i_sb->s_user_ns != &init_user_ns is when the filesystem was mounted in a new mount namespace by an unpriviledged user. XFS does not allow this, which is why we've never seen bug reports about quotas being incorrect or the uid checks in xfs_qm_vop_create_dqattach tripping debug assertions. However, this /is/ a logic bomb, so let's make the code consistent. Link: https://lore.kernel.org/linux-fsdevel/20240617-weitblick-gefertigt-4a41f37119fa@brauner/ Fixes: c14329d39f2d ("fs: port fs{g,u}id helpers to mnt_idmap") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 150bb10a28b9c8709ae227fc898d9cf6136faa1e Author: Darrick J. Wong Date: Tue Jul 2 11:23:23 2024 -0700 xfs: verify buffer, inode, and dquot items every tx commit generic/388 has an annoying tendency to fail like this during log recovery: XFS (sda4): Unmounting Filesystem 435fe39b-82b6-46ef-be56-819499585130 XFS (sda4): Mounting V5 Filesystem 435fe39b-82b6-46ef-be56-819499585130 XFS (sda4): Starting recovery (logdev: internal) 00000000: 49 4e 81 b6 03 02 00 00 00 00 00 07 00 00 00 07 IN.............. 00000010: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 10 ................ 00000020: 35 9a 8b c1 3e 6e 81 00 35 9a 8b c1 3f dc b7 00 5...>n..5...?... 00000030: 35 9a 8b c1 3f dc b7 00 00 00 00 00 00 3c 86 4f 5...?........<.O 00000040: 00 00 00 00 00 00 02 f3 00 00 00 00 00 00 00 00 ................ 00000050: 00 00 1f 01 00 00 00 00 00 00 00 02 b2 74 c9 0b .............t.. 00000060: ff ff ff ff d7 45 73 10 00 00 00 00 00 00 00 2d .....Es........- 00000070: 00 00 07 92 00 01 fe 30 00 00 00 00 00 00 00 1a .......0........ 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000090: 35 9a 8b c1 3b 55 0c 00 00 00 00 00 04 27 b2 d1 5...;U.......'.. 000000a0: 43 5f e3 9b 82 b6 46 ef be 56 81 94 99 58 51 30 C_....F..V...XQ0 XFS (sda4): Internal error Bad dinode after recovery at line 539 of file fs/xfs/xfs_inode_item_recover.c. Caller xlog_recover_items_pass2+0x4e/0xc0 [xfs] CPU: 0 PID: 2189311 Comm: mount Not tainted 6.9.0-rc4-djwx #rc4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20171121_152543-x86-ol7-builder-01.us.oracle.com-4.el7.1 04/01/2014 Call Trace: dump_stack_lvl+0x4f/0x60 xfs_corruption_error+0x90/0xa0 xlog_recover_inode_commit_pass2+0x5f1/0xb00 xlog_recover_items_pass2+0x4e/0xc0 xlog_recover_commit_trans+0x2db/0x350 xlog_recovery_process_trans+0xab/0xe0 xlog_recover_process_data+0xa7/0x130 xlog_do_recovery_pass+0x398/0x840 xlog_do_log_recovery+0x62/0xc0 xlog_do_recover+0x34/0x1d0 xlog_recover+0xe9/0x1a0 xfs_log_mount+0xff/0x260 xfs_mountfs+0x5d9/0xb60 xfs_fs_fill_super+0x76b/0xa30 get_tree_bdev+0x124/0x1d0 vfs_get_tree+0x17/0xa0 path_mount+0x72b/0xa90 __x64_sys_mount+0x112/0x150 do_syscall_64+0x49/0x100 entry_SYSCALL_64_after_hwframe+0x4b/0x53 XFS (sda4): Corruption detected. Unmount and run xfs_repair XFS (sda4): Metadata corruption detected at xfs_dinode_verify.part.0+0x739/0x920 [xfs], inode 0x427b2d1 XFS (sda4): Filesystem has been shut down due to log error (0x2). XFS (sda4): Please unmount the filesystem and rectify the problem(s). XFS (sda4): log mount/recovery failed: error -117 XFS (sda4): log mount failed This inode log item recovery failing the dinode verifier after replaying the contents of the inode log item into the ondisk inode. Looking back into what the kernel was doing at the time of the fs shutdown, a thread was in the middle of running a series of transactions, each of which committed changes to the inode. At some point in the middle of that chain, an invalid (at least according to the verifier) change was committed. Had the filesystem not shut down in the middle of the chain, a subsequent transaction would have corrected the invalid state and nobody would have noticed. But that's not what happened here. Instead, the invalid inode state was committed to the ondisk log, so log recovery tripped over it. The actual defect here was an overzealous inode verifier, which was fixed in a separate patch. This patch adds some transaction precommit functions for CONFIG_XFS_DEBUG=y mode so that we can detect these kinds of transient errors at transaction commit time, where it's much easier to find the root cause. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f642714b788b993c229fc9839cda15d9c5d965fc Author: Javier Carrasco Date: Tue Jul 2 12:09:32 2024 +0200 hwmon: (tps23861) Constify struct regmap_config `tps23861_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-3-63f6d4765fe0@gmail.com Signed-off-by: Guenter Roeck commit 4bc82dd20be09fa133bf3116be6afc933497f860 Author: Javier Carrasco Date: Tue Jul 2 12:09:31 2024 +0200 hwmon: (tmp513) Constify struct regmap_config `tmp51x_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-2-63f6d4765fe0@gmail.com Signed-off-by: Guenter Roeck commit 9d047eb05c079f35584d047cfbc8c9434d128d00 Author: Javier Carrasco Date: Tue Jul 2 12:09:30 2024 +0200 hwmon: (ina238) Constify struct regmap_config `ina238_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-1-63f6d4765fe0@gmail.com Signed-off-by: Guenter Roeck commit 83d43ab0a1cb83b1f3d731885a5d800ad8e84524 Author: Animesh Agarwal Date: Tue Jul 2 17:30:58 2024 +0530 ASoC: dt-bindings: realtek,rt5645: Convert to dtschema Convert the RT5650/RT5645 audio CODEC bindings to DT schema. Reviewed-by: Rob Herring (Arm) Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Link: https://patch.msgid.link/20240702120106.17100-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit ea34999f41873c96ac89e861e5fdfc7d0403f9e3 Author: Tony Luck Date: Fri Jun 28 14:56:19 2024 -0700 x86/resctrl: Update documentation with Sub-NUMA cluster changes With Sub-NUMA Cluster (SNC) mode enabled, the scope of monitoring resources is per-NODE instead of per-L3 cache. Backwards compatibility is maintained by providing files in the mon_L3_XX directories that sum event counts for all SNC nodes sharing an L3 cache. New files provide per-SNC node event counts. Users should be aware that SNC mode also affects the amount of L3 cache available for allocation within each SNC node. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-20-tony.luck@intel.com commit 13488150f5e2a9b84a335ae18bee33a918ead85d Author: Tony Luck Date: Fri Jun 28 14:56:18 2024 -0700 x86/resctrl: Detect Sub-NUMA Cluster (SNC) mode There isn't a simple hardware bit that indicates whether a CPU is running in Sub-NUMA Cluster (SNC) mode. Infer the state by comparing the number of CPUs sharing the L3 cache with CPU0 to the number of CPUs in the same NUMA node as CPU0. Add the missing definition of pr_fmt() to monitor.c. This wasn't noticed before as there are only "can't happen" console messages from this file. [ bp: Massage commit message. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-19-tony.luck@intel.com commit 21b362cc762aabb3e8496d33d7b4538154c95a0b Author: Tony Luck Date: Tue Jul 2 10:38:20 2024 -0700 x86/resctrl: Enable shared RMID mode on Sub-NUMA Cluster (SNC) systems Hardware has two RMID configuration options for SNC systems. The default mode divides RMID counters between SNC nodes. E.g. with 200 RMIDs and two SNC nodes per L3 cache RMIDs 0..99 are used on node 0, and 100..199 on node 1. This isn't compatible with Linux resctrl usage. On this example system a process using RMID 5 would only update monitor counters while running on SNC node 0. The other mode is "RMID Sharing Mode". This is enabled by clearing bit 0 of the RMID_SNC_CONFIG (0xCA0) model specific register. In this mode the number of logical RMIDs is the number of physical RMIDs (from CPUID leaf 0xF) divided by the number of SNC nodes per L3 cache instance. A process can use the same RMID across different SNC nodes. See the "Intel Resource Director Technology Architecture Specification" for additional details. When SNC is enabled, update the MSR when a monitor domain is marked online. Technically this is overkill. It only needs to be done once per L3 cache instance rather than per SNC domain. But there is no harm in doing it more than once, and this is not in a critical path. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20240702173820.90368-3-tony.luck@intel.com commit 9fbb303ec949a376f3cbdf6a2b66ad2212c24ebc Author: Tony Luck Date: Fri Jun 28 14:56:16 2024 -0700 x86/resctrl: Make __mon_event_count() handle sum domains Legacy resctrl monitor files must provide the sum of event values across all Sub-NUMA Cluster (SNC) domains that share an L3 cache instance. There are now two cases: 1) A specific domain is provided in struct rmid_read This is either a non-SNC system, or the request is to read data from just one SNC node. 2) Domain pointer is NULL. In this case the cacheinfo field in struct rmid_read indicates that all SNC nodes that share that L3 cache instance should have the event read and return the sum of all values. Update the CPU sanity check. The existing check that an event is read from a CPU in the requested domain still applies when reading a single domain. But when summing across domains a more relaxed check that the current CPU is in the scope of the L3 cache instance is appropriate since the MSRs to read events are scoped at L3 cache level. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-17-tony.luck@intel.com commit c8c7d3d904b76c45fe2b5dc982fb5090d12a63af Author: Tony Luck Date: Fri Jun 28 14:56:15 2024 -0700 x86/resctrl: Fill out rmid_read structure for smp_call*() to read a counter mon_event_read() fills out most fields of the struct rmid_read that is passed via an smp_call*() function to a CPU that is part of the correct domain to read the monitor counters. With Sub-NUMA Cluster (SNC) mode there are now two cases to handle: 1) Reading a file that returns a value for a single domain. + Choose the CPU to execute from the domain cpu_mask 2) Reading a file that must sum across domains sharing an L3 cache instance. + Indicate to called code that a sum is needed by passing a NULL rdt_mon_domain pointer. + Choose the CPU from the L3 shared_cpu_map. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-16-tony.luck@intel.com commit 6b48b80b08e6f08eea8eaf7e44555ada191b6bee Author: Tony Luck Date: Tue Jul 2 10:38:19 2024 -0700 x86/resctrl: Handle removing directories in Sub-NUMA Cluster (SNC) mode In SNC mode, there are multiple subdirectories in each L3 level monitor directory (one for each SNC node). If all the CPUs in an SNC node are taken offline, just remove the SNC directory for that node. In non-SNC mode, or when the last SNC node directory is removed, remove the L3 monitor directory. Add a helper function to avoid duplicated code. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20240702173820.90368-2-tony.luck@intel.com commit 0158ed6a1335ff37f0336a986d7b99d6e97d46e9 Author: Tony Luck Date: Fri Jun 28 14:56:13 2024 -0700 x86/resctrl: Create Sub-NUMA Cluster (SNC) monitor files When SNC mode is enabled, create subdirectories and files to monitor at the SNC node granularity. Legacy behavior is preserved by tagging the monitor files at the L3 granularity with the "sum" attribute. When the user reads these files the kernel will read monitor data from all SNC nodes that share the same L3 cache instance and return the aggregated value to the user. Note that the "domid" field for files that must sum across SNC domains has the L3 cache instance id, while non-summing files use the domain id. The "sum" files do not need to make a call to mon_event_read() to initialize the MBM counters. This will be handled by initializing the individual SNC nodes that share the L3. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-14-tony.luck@intel.com commit 92b5d0b1189ea9e9f00ae493fc99102fe7f2442f Author: Tony Luck Date: Fri Jun 28 14:56:12 2024 -0700 x86/resctrl: Allocate a new field in union mon_data_bits When Sub-NUMA Cluster (SNC) mode is enabled, the legacy monitor reporting files must report the sum of the data from all of the SNC nodes that share the L3 cache that is referenced by the monitor file. Resctrl squeezes all the attributes of these files into 32 bits so they can be stored in the "priv" field of struct kernfs_node. Currently, only three monitor events are defined by enum resctrl_event_id so reducing it from 8 bits to 7 bits still provides more than enough space to represent all the known event types. But note that this choice was arbitrary. The "rid" field is also far wider than needed for the current number of resource id types. This structure is purely internal to resctrl, no ABI issues with modifying it. Subsequent changes may rearrange the allocation of bits between each of the fields as needed. Give the bit to a new "sum" field that indicates that reading this file must sum across SNC nodes. This bit also indicates that the domid field is the id of an L3 cache (instead of a domain id) to find which domains must be summed. Fix up other issues in the kerneldoc description for mon_data_bits. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-13-tony.luck@intel.com commit 603cf1e28838a01e4f140c3054ce147f8b087d08 Author: Tony Luck Date: Fri Jun 28 14:56:11 2024 -0700 x86/resctrl: Refactor mkdir_mondata_subdir() with a helper function In Sub-NUMA Cluster (SNC) mode Linux must create the monitor files in the original "mon_L3_XX" directories and also in each of the "mon_sub_L3_YY" directories. Refactor mkdir_mondata_subdir() to move the creation of monitoring files into a helper function to avoid the need to duplicate code later. No functional change. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-12-tony.luck@intel.com commit 587edd7069b9e7dc7993d2df9371e7c37a4d2133 Author: Tony Luck Date: Fri Jun 28 14:56:10 2024 -0700 x86/resctrl: Initialize on-stack struct rmid_read instances New semantics rely on some struct rmid_read members having NULL values to distinguish between the SNC and non-SNC scenarios. resctrl can thus no longer rely on this struct not being initialized properly. Initialize all on-stack declarations of struct rmid_read: rdtgroup_mondata_show() mbm_update() mkdir_mondata_subdir() to ensure that garbage values from the stack are not passed down to other functions. [ bp: Massage commit message. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-11-tony.luck@intel.com commit fb1f51f677585f1b1ba17d2390963bbebe7a8cfa Author: Tony Luck Date: Fri Jun 28 14:56:09 2024 -0700 x86/resctrl: Add a new field to struct rmid_read for summation of domains When a user reads a monitor file rdtgroup_mondata_show() calls mon_event_read() to package up all the required details into an rmid_read structure which is passed across the smp_call*() infrastructure to code that will read data from hardware and return the value (or error status) in the rmid_read structure. Sub-NUMA Cluster (SNC) mode adds files with new semantics. These require the smp_call-ed code to sum event data from all domains that share an L3 cache. Add a pointer to the L3 "cacheinfo" structure to struct rmid_read for the data collection routines to use to pick the domains to be summed. [ Reinette: the rmid_read structure has become complex enough so document each of its fields and provide the kerneldoc documentation for struct rmid_read. ] Co-developed-by: Reinette Chatre Signed-off-by: Reinette Chatre Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-10-tony.luck@intel.com commit 328ea688746420e12ced6cfbc5064413180244cc Author: Tony Luck Date: Fri Jun 28 14:56:08 2024 -0700 x86/resctrl: Prepare for new Sub-NUMA Cluster (SNC) monitor files When SNC is enabled, monitoring data is collected at the SNC node granularity, but must be reported at L3-cache granularity for backwards compatibility in addition to reporting at the node level. Add a "ci" field to the rdt_mon_domain structure to save the cache information about the enclosing L3 cache for the domain. This provides: 1) The cache id which is needed to compose the name of the legacy monitoring directory, and to determine which domains should be summed to provide L3-scoped data. 2) The shared_cpu_map which is needed to determine which CPUs can be used to read the RMID counters with the MSR interface. This is the first step to an eventual goal of monitor reporting files like this (for a system with two SNC nodes per L3): $ cd /sys/fs/resctrl/mon_data $ tree mon_L3_00 mon_L3_00 <- 00 here is L3 cache id ├── llc_occupancy \ These files provide legacy support ├── mbm_local_bytes > for non-SNC aware monitor apps ├── mbm_total_bytes / that expect data at L3 cache level ├── mon_sub_L3_00 <- 00 here is SNC node id │   ├── llc_occupancy \ These files are finer grained │   ├── mbm_local_bytes > data from each SNC node │   └── mbm_total_bytes / └── mon_sub_L3_01 ├── llc_occupancy \ ├── mbm_local_bytes > As above, but for node 1. └── mbm_total_bytes / [ bp: Massage commit message. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-9-tony.luck@intel.com commit ac20aa423052553c005089b00f1e3caf79d3c1d3 Author: Tony Luck Date: Fri Jun 28 14:56:07 2024 -0700 x86/resctrl: Block use of mba_MBps mount option on Sub-NUMA Cluster (SNC) systems When SNC is enabled there is a mismatch between the MBA control function which operates at L3 cache scope and the MBM monitor functions which measure memory bandwidth on each SNC node. Block use of the mba_MBps when scopes for MBA/MBM do not match. Improve user diagnostics by adding invalfc() message when mba_MBps is not supported. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-8-tony.luck@intel.com commit e13db55b5a0d447dea63cde772c1078405bbbf96 Author: Tony Luck Date: Fri Jun 28 14:56:06 2024 -0700 x86/resctrl: Introduce snc_nodes_per_l3_cache Intel Sub-NUMA Cluster (SNC) is a feature that subdivides the CPU cores and memory controllers on a socket into two or more groups. These are presented to the operating system as NUMA nodes. This may enable some workloads to have slightly lower latency to memory as the memory controller(s) in an SNC node are electrically closer to the CPU cores on that SNC node. This cost may be offset by lower bandwidth since the memory accesses for each core can only be interleaved between the memory controllers on the same SNC node. Resctrl monitoring on an Intel system depends upon attaching RMIDs to tasks to track L3 cache occupancy and memory bandwidth. There is an MSR that controls how the RMIDs are shared between SNC nodes. The default mode divides them numerically. E.g. when there are two SNC nodes on a socket the lower number half of the RMIDs are given to the first node, the remainder to the second node. This would be difficult to use with the Linux resctrl interface as specific RMID values assigned to resctrl groups are not visible to users. RMID sharing mode divides the physical RMIDs evenly between SNC nodes but uses a logical RMID in the IA32_PQR_ASSOC MSR. For example a system with 200 physical RMIDs (as enumerated by CPUID leaf 0xF) that has two SNC nodes per L3 cache instance would have 100 logical RMIDs available for Linux to use. A task running on SNC node 0 with RMID 5 would accumulate LLC occupancy and MBM bandwidth data in physical RMID 5. Another task using RMID 5, but running on SNC node 1 would accumulate data in physical RMID 105. Even with this renumbering SNC mode requires several changes in resctrl behavior for correct operation. Add a static global to arch/x86/kernel/cpu/resctrl/monitor.c to indicate how many SNC domains share an L3 cache instance. Initialize this to "1". Runtime detection of SNC mode will adjust this value. Update all places to take appropriate action when SNC mode is enabled: 1) The number of logical RMIDs per L3 cache available for use is the number of physical RMIDs divided by the number of SNC nodes. 2) Likewise the "mon_scale" value must be divided by the number of SNC nodes. 3) Add a function to convert from logical RMID values (assigned to tasks and loaded into the IA32_PQR_ASSOC MSR on context switch) to physical RMID values to load into IA32_QM_EVTSEL MSR when reading counters on each SNC node. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-7-tony.luck@intel.com commit 1a171608ee8d40d22d604303e42f033c69151123 Author: Tony Luck Date: Fri Jun 28 14:56:05 2024 -0700 x86/resctrl: Add node-scope to the options for feature scope Currently supported resctrl features are all domain scoped the same as the scope of the L2 or L3 caches. Add RESCTRL_L3_NODE as a new option for features that are scoped at the same granularity as NUMA nodes. This is needed for Intel's Sub-NUMA Cluster (SNC) feature where monitoring features are divided between nodes that share an L3 cache. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-6-tony.luck@intel.com commit cae2bcb6a2c691ef7b537ad07e9819a5ed645bcc Author: Tony Luck Date: Fri Jun 28 14:56:04 2024 -0700 x86/resctrl: Split the rdt_domain and rdt_hw_domain structures The same rdt_domain structure is used for both control and monitor functions. But this results in wasted memory as some of the fields are only used by control functions, while most are only used for monitor functions. Split into separate rdt_ctrl_domain and rdt_mon_domain structures with just the fields required for control and monitoring respectively. Similar split of the rdt_hw_domain structure into rdt_hw_ctrl_domain and rdt_hw_mon_domain. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-5-tony.luck@intel.com commit cd84f72b6a5c10f79f19fab67b0edfbc4fdbc5b1 Author: Tony Luck Date: Fri Jun 28 14:56:03 2024 -0700 x86/resctrl: Prepare for different scope for control/monitor operations Resctrl assumes that control and monitor operations on a resource are performed at the same scope. Prepare for systems that use different scope (specifically Intel needs to split the RDT_RESOURCE_L3 resource to use L3 scope for cache control and NODE scope for cache occupancy and memory bandwidth monitoring). Create separate domain lists for control and monitor operations. Note that errors during initialization of either control or monitor functions on a domain would previously result in that domain being excluded from both control and monitor operations. Now the domains are allocated independently it is no longer required to disable both control and monitor operations if either fail. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-4-tony.luck@intel.com commit c103d4d48e1599a88001fa6215be27d55f3c025b Author: Tony Luck Date: Fri Jun 28 14:56:02 2024 -0700 x86/resctrl: Prepare to split rdt_domain structure The rdt_domain structure is used for both control and monitor features. It is about to be split into separate structures for these two usages because the scope for control and monitoring features for a resource will be different for future resources. To allow for common code that scans a list of domains looking for a specific domain id, move all the common fields ("list", "id", "cpu_mask") into their own structure within the rdt_domain structure. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-3-tony.luck@intel.com commit f436cb6913a57bf3e1e66d18bc663e6c20751929 Author: Tony Luck Date: Fri Jun 28 14:56:01 2024 -0700 x86/resctrl: Prepare for new domain scope Resctrl resources operate on subsets of CPUs in the system with the defining attribute of each subset being an instance of a particular level of cache. E.g. all CPUs sharing an L3 cache would be part of the same domain. In preparation for features that are scoped at the NUMA node level, change the code from explicit references to "cache_level" to a more generic scope. At this point the only options for this scope are groups of CPUs that share an L2 cache or L3 cache. Clean up the error handling when looking up domains. Report invalid ids before calling rdt_find_domain() in preparation for better messages when scope can be other than cache scope. This means that rdt_find_domain() will never return an error. So remove checks for error from the call sites. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-2-tony.luck@intel.com commit b3d209164dc0aca115057b00d6b466793a747c87 Author: Lai Jiangshan Date: Tue Jul 2 12:14:56 2024 +0800 workqueue: Simplify goto statement Use a simple if-statement to replace the cumbersome goto-statement in workqueue_set_unbound_cpumask(). Cc: Waiman Long Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 841658832335a32dd86f4e4d3aab7d14188b268b Author: Lai Jiangshan Date: Tue Jul 2 12:14:55 2024 +0800 workqueue: Update cpumasks after only applying it successfully Make workqueue_unbound_exclude_cpumask() and workqueue_set_unbound_cpumask() only update wq_isolated_cpumask and wq_requested_unbound_cpumask when workqueue_apply_unbound_cpumask() returns successfully. Fixes: fe28f631fa94("workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask") Cc: Waiman Long Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 7a4479680d7fd05c7a3efa87b41f421af48fbbdf Author: Randy Dunlap Date: Mon Jul 1 16:49:37 2024 -0700 cgroup_misc: add kernel-doc comments for enum misc_res_type Fully document enum misc_res_type with kernel-doc comments to prevent kernel-doc warnings: misc_cgroup.h:12: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Types of misc cgroup entries supported by the host. misc_cgroup.h:12: warning: missing initial short description on line: * Types of misc cgroup entries supported by the host. Fixes: a72232eabdfc ("cgroup: Add misc cgroup controller") Signed-off-by: Randy Dunlap Cc: cgroups@vger.kernel.org Signed-off-by: Tejun Heo commit fd8db07705c55a995c42b1e71afc42faad675b0b Author: Florian Lehner Date: Sat Jun 15 12:11:58 2024 +0200 bpf, devmap: Add .map_alloc_check Use the .map_allock_check callback to perform allocation checks before allocating memory for the devmap. Signed-off-by: Florian Lehner Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240615101158.57889-1-dev@der-flo.net commit 9796cf9b3eb9a0b9502dfe0b3acf63610090ef44 Author: Zhenhua Huang Date: Tue Jul 2 17:01:10 2024 +0800 iommu/arm-smmu-qcom: record reason for deferring probe To avoid deferring probe smmu driver silently, record reason for it. It can be checked through ../debugfs/devices_deferred as well: /sys/kernel/debug# cat devices_deferred 15000000.iommu arm-smmu: qcom_scm not ready Signed-off-by: Zhenhua Huang Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1719910870-25079-1-git-send-email-quic_zhenhuah@quicinc.com Signed-off-by: Will Deacon commit d525b0af0c3b8275e6f83fa0c0640338ed90661a Author: Rob Clark Date: Mon Jul 1 09:20:12 2024 -0700 iommu/arm-smmu: Pretty-print context fault related regs Parse out the bitfields for easier-to-read fault messages. Signed-off-by: Rob Clark Reviewed-by: Pranjal Shrivastava Link: https://lore.kernel.org/r/20240701162025.375134-4-robdclark@gmail.com Signed-off-by: Will Deacon commit 55089781ff7724dd10040231a6d8b791cf24afcd Author: Rob Clark Date: Mon Jul 1 09:20:11 2024 -0700 iommu/arm-smmu-qcom-debug: Do not print for handled faults Handled faults can be "normal", don't spam dmesg about them. Signed-off-by: Rob Clark Reviewed-by: Pranjal Shrivastava Link: https://lore.kernel.org/r/20240701162025.375134-3-robdclark@gmail.com Signed-off-by: Will Deacon commit d0166022be375ce72e7b220d688740b1c4424ad5 Author: Rob Clark Date: Mon Jul 1 09:20:10 2024 -0700 iommu/arm-smmu: Add CB prefix to register bitfields For consistency, add the "CB" prefix to the bitfield defines for context registers. Signed-off-by: Rob Clark Reviewed-by: Pranjal Shrivastava Link: https://lore.kernel.org/r/20240701162025.375134-2-robdclark@gmail.com Signed-off-by: Will Deacon commit d6c102881b302697802547d6abb6f24a49c79f2b Author: Akhil P Oommen Date: Sat Jun 29 07:19:37 2024 +0530 dt-bindings: arm-smmu: Add X1E80100 GPU SMMU Update the devicetree bindings to support the gpu present in X1E80100 platform. Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/r/20240629015111.264564-5-quic_akhilpo@quicinc.com Signed-off-by: Will Deacon commit 69716e44a74af464060faa68fa2b54f3af03c16a Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:30 2024 +0200 selftests/bpf: Remove arena tests from DENYLIST.s390x Now that the s390x JIT supports arena, remove the respective tests from the denylist. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-13-iii@linux.ibm.com commit 490c99d4ed99bb01dac8bf2896e27941403549c4 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:29 2024 +0200 selftests/bpf: Add UAF tests for arena atomics Check that __sync_*() functions don't cause kernel panics when handling freed arena pages. x86_64 does not support some arena atomics yet, and aarch64 may or may not support them, based on the availability of LSE atomics at run time. Do not enable this test for these architectures for simplicity. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-12-iii@linux.ibm.com commit b6349fd3448cf349af327f90585a712d60265429 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:28 2024 +0200 selftests/bpf: Introduce __arena_global While clang uses __attribute__((address_space(1))) both for defining arena pointers and arena globals, GCC requires different syntax for both. While __arena covers the first use case, introduce __arena_global to cover the second one. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-11-iii@linux.ibm.com commit 2f9469484a3b52c66b799de73bd1ca75617bc8d5 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:27 2024 +0200 s390/bpf: Support arena atomics s390x supports most BPF atomics using single instructions, which makes implementing arena support a matter of adding arena address to the base register (unfortunately atomics do not support index registers), and wrapping the respective native instruction in probing sequences. An exception is BPF_XCHG, which is implemented using two different memory accesses and a loop. Make sure there is enough extable entries for both instructions. Compute the base address once for both memory accesses. Since on exception we need to land after the loop, emit the nops manually. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-10-iii@linux.ibm.com commit 1e36027e39b8b3fa567ce3d743dbda5954dc0a56 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:26 2024 +0200 s390/bpf: Enable arena Now that BPF_PROBE_MEM32 and address space cast instructions are implemented, tell the verifier that the JIT supports arena. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-9-iii@linux.ibm.com commit 555469cc9be4a7f52c0ad07a4a237d63e8c5c5f4 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:25 2024 +0200 s390/bpf: Support address space cast instruction The new address cast instruction translates arena offsets to userspace addresses. NULL pointers must not be translated. The common code sets up the mappings in such a way that it's enough to replace the higher 32 bits to achieve the desired result. s390x has just an instruction for this: INSERT IMMEDIATE. Implement the sequence using 3 instruction: LOAD AND TEST, BRANCH RELATIVE ON CONDITION and INSERT IMMEDIATE. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-8-iii@linux.ibm.com commit 4d3a453b434fd2f389960890ae6d767f8d50c403 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:24 2024 +0200 s390/bpf: Support BPF_PROBE_MEM32 BPF_PROBE_MEM32 is a new mode for LDX, ST and STX instructions. The JIT is supposed to add the start address of the kernel arena mapping to the %dst register, and use a probing variant of the respective memory access. Reuse the existing probing infrastructure for that. Put the arena address into the literal pool, load it into %r1 and use that as an index register. Do not clear any registers in ex_handler_bpf() for failing ST and STX instructions. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-7-iii@linux.ibm.com commit a1c04bcc41f9638460a9c68f894fb770596380de Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:23 2024 +0200 s390/bpf: Land on the next JITed instruction after exception Currently we land on the nop, which is unnecessary: we can just as well begin executing the next instruction. Furthermore, the upcoming arena support for the loop-based BPF_XCHG implementation will require landing on an instruction that comes after the loop. So land on the next JITed instruction, which covers both cases. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-6-iii@linux.ibm.com commit 89b933a2013794d8272d432591a2a7a9c41f6351 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:22 2024 +0200 s390/bpf: Introduce pre- and post- probe functions Currently probe insns are handled by two "if" statements at the beginning and at the end of bpf_jit_insn(). The first one needs to be in sync with the huge insn->code statement that follows it, which was not a problem so far, since the check is small. The introduction of arena will make it significantly larger, and it will no longer be obvious whether it is in sync with the opcode switch. Move these statements to the new bpf_jit_probe_load_pre() and bpf_jit_probe_post() functions, and call them only from cases that need them. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-5-iii@linux.ibm.com commit 9a048587269174f218e8d8d737ebfa628589358f Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:21 2024 +0200 s390/bpf: Get rid of get_probe_mem_regno() Commit 7fc8c362e782 ("s390/bpf: encode register within extable entry") introduced explicit passing of the number of the register to be cleared to ex_handler_bpf(), which replaced deducing it from the respective native load instruction using get_probe_mem_regno(). Replace the second and last usage in the same manner, and remove this function. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-4-iii@linux.ibm.com commit d0736d8c491ddc7d31c7f839d281c907366e2562 Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:20 2024 +0200 s390/bpf: Factor out emitting probe nops The upcoming arena support for the loop-based BPF_XCHG implementation requires emitting nop and extable entries separately. Move nop handling into a separate function, and keep track of the nop offset. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-3-iii@linux.ibm.com commit df34ec9db6f521118895f22795da49f2ec01f8cf Author: Ilya Leoshkevich Date: Tue Jul 2 01:40:19 2024 +0200 bpf: Fix atomic probe zero-extension Zero-extending results of atomic probe operations fails with: verifier bug. zext_dst is set, but no reg is defined The problem is that insn_def_regno() handles BPF_ATOMICs, but not BPF_PROBE_ATOMICs. Fix by adding the missing condition. Fixes: d503a04f8bc0 ("bpf: Add support for certain atomics in bpf_arena to x86 JIT") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240701234304.14336-2-iii@linux.ibm.com commit da5f8fd1f0d393d5eaaba9ad8c22d1c26bb2bf9b Author: Tao Chen Date: Tue Jul 2 21:11:50 2024 +0800 bpftool: Mount bpffs when pinmaps path not under the bpffs As Quentin said [0], BPF map pinning will fail if the pinmaps path is not under the bpffs, like: libbpf: specified path /home/ubuntu/test/sock_ops_map is not on BPF FS Error: failed to pin all maps [0] https://github.com/libbpf/bpftool/issues/146 Fixes: 3767a94b3253 ("bpftool: add pinmaps argument to the load/loadall") Signed-off-by: Tao Chen Signed-off-by: Daniel Borkmann Tested-by: Quentin Monnet Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240702131150.15622-1-chen.dylane@gmail.com commit aaa08078e7251131f045ba248a68671db7f7bdf7 Author: Vinay Belgaumkar Date: Mon Jul 1 16:15:29 2024 -0700 drm/xe/bmg: Apply Wa_22019338487 Extend this WA to BMG GT as well. In this case media GT is not affected. The cap frequencies and max allowed ggtt writes are different as well. On BMG, we need to do a flush after 1100 GGTT writes, and we need to limit the GT frequency request to 2133 Mhz during driver load and leave it at that value after driver unloads. v3: Fix checkpatch issue Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240701231529.2582452-2-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi commit b0b2b50cdbd132cb78ed25c27081849a405b75e3 Author: Vinay Belgaumkar Date: Mon Jul 1 16:15:28 2024 -0700 drm/xe/guc: Prevent use of uninitialized mutex When skip_guc_pc is set and/or this is for a VF. Fixes: 3b1592fb7835 ("drm/xe/lnl: Apply Wa_22019338487") Signed-off-by: Vinay Belgaumkar Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240701231529.2582452-1-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi commit a35f443d837ffcd5e73b64c13a46d12701839213 Author: Jeff Johnson Date: Thu Jun 13 12:44:17 2024 -0700 iommu/arm-smmu-v3: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Fixes: da55da5a42d4 ("iommu/arm-smmu-v3: Make the kunit into a module") Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-iommu-arm-arm-smmu-v3-v1-1-0e9f7584a5c8@quicinc.com Signed-off-by: Will Deacon commit 67c9971cd6d309ecbcb87b942e22ffc194d7a376 Author: Jeff Johnson Date: Wed Jun 19 13:26:59 2024 -0700 kunit/usercopy: Add missing MODULE_DESCRIPTION() Fix warning seen with: $ make allmodconfig && make W=1 C=1 lib/usercopy_kunit.ko WARNING: modpost: missing MODULE_DESCRIPTION() in lib/usercopy_kunit.o Signed-off-by: Jeff Johnson Signed-off-by: Kees Cook Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 4d6cf248325f686f256f2446f3f9d5fbab6e4356 Author: Kees Cook Date: Wed Jun 19 13:25:17 2024 -0700 kunit/usercopy: Disable testing on !CONFIG_MMU Since arch_pick_mmap_layout() is an inline for non-MMU systems, disable this test there. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406160505.uBge6TMY-lkp@intel.com/ Signed-off-by: Kees Cook Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 93d8032f4143c8d2ac3e10c6504385c26acc511f Author: Jens Axboe Date: Tue Jul 2 09:16:46 2024 -0600 io_uring/net: cleanup io_recv_finish() bundle handling Combine the two cases that check for whether or not this is a bundle, rather than having them as separate checks. This is easier to reduce, and it reduces the text associated with it as well. Signed-off-by: Jens Axboe commit e123134b39dc40af94e8aec49227ae55b5e087a8 Author: Canfeng Guo Date: Sat Jun 29 12:10:12 2024 +0800 selinux: Use 1UL for EBITMAP_BIT to match maps type This patch modifies the definition of EBITMAP_BIT in security/selinux/ss/ebitmap.h from 1ULL to 1UL to match the type of elements in the ebitmap_node maps array. This change does not affect the functionality or correctness of the code but aims to enhance code quality by adhering to good programming practices and avoiding unnecessary type conversions. Signed-off-by: Canfeng Guo Signed-off-by: Paul Moore commit a4d75360f7a6d979edd66af577847b0f4dbf4377 Author: Jason Gunthorpe Date: Mon Jun 10 21:31:11 2024 -0300 iommu/arm-smmu-v3: Shrink the strtab l1_desc array The top of the 2 level stream table is (at most) 128k entries big, and two high order allocations are required. One of __le64 which is programmed into the HW (1M), and one of struct arm_smmu_strtab_l1_desc which holds the CPU pointer (3M). There is no reason to store the l2ptr_dma as nothing reads it. devm stores a copy of it and the DMA memory will be freed via devm mechanisms. span is a constant of 8+1. Remove both. This removes 16 bytes from each arm_smmu_l1_ctx_desc and saves up to 2M of memory per iommu instance. Tested-by: Nicolin Chen Reviewed-by: Mostafa Saleh Signed-off-by: Jason Gunthorpe Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/2-v2-318ed5f6983b+198f-smmuv3_tidy_jgg@nvidia.com Signed-off-by: Will Deacon commit c84c5ab76c9c04b5f1c8cc66ee9313198e89bb11 Author: Jason Gunthorpe Date: Mon Jun 10 21:31:10 2024 -0300 iommu/arm-smmu-v3: Do not zero the strtab twice dmam_alloc_coherent() already returns zero'd memory so cfg->strtab.l1_desc (the list of DMA addresses for the L2 entries) is already zero'd. arm_smmu_init_l1_strtab() goes through and calls arm_smmu_write_strtab_l1_desc() on the newly allocated (and zero'd) struct arm_smmu_strtab_l1_desc, which ends up computing 'val = 0' and zeroing it again. Remove arm_smmu_init_l1_strtab() and just call devm_kcalloc() from arm_smmu_init_strtab_2lvl to allocate the companion struct. Tested-by: Nicolin Chen Reviewed-by: Mostafa Saleh Signed-off-by: Jason Gunthorpe Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/1-v2-318ed5f6983b+198f-smmuv3_tidy_jgg@nvidia.com Signed-off-by: Will Deacon commit 1c6285e10d76b0cfb5b0384dc9c02e266a2ffd0a Author: Pierre-Hugues Husson Date: Tue Jun 4 18:44:24 2024 +0200 arm64: dts: qcom: msm8998: add venus node Now that the venus clocks are fixed, we can add the DT node. Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez Reviewed-by: Bryan O'Donoghue Acked-by: Vikash Garodia Link: https://lore.kernel.org/r/6d86a6a3-4d99-4fda-9a38-7688587237e6@freebox.fr Signed-off-by: Bjorn Andersson commit 98d34c087249d39838874b83e17671e7d5eb1ca7 Author: Christoph Hellwig Date: Tue Jun 25 07:52:38 2024 +0200 xen-blkfront: fix sector_size propagation to the block layer Ensure that info->sector_size and info->physical_sector_size are set before the call to blkif_set_queue_limits by doing away with the local variables and arguments that propagate them. Thanks to Marek Marczykowski-Górecki and Jürgen Groß for root causing the issue. Fixes: ba3f67c11638 ("xen-blkfront: atomically update queue limits") Reported-by: Rusty Bird Signed-off-by: Christoph Hellwig Reviewed-by: Roger Pau Monné Link: https://lore.kernel.org/r/20240625055238.7934-1-hch@lst.de Signed-off-by: Jens Axboe commit 1c0b3fca381bf879e2168b362692f83808677f95 Author: Damien Le Moal Date: Tue Jul 2 16:32:34 2024 +0900 null_blk: Fix description of the fua parameter The description of the fua module parameter is defined using MODULE_PARM_DESC() with the first argument passed being "zoned". That is the wrong name, obviously. Fix that by using the correct "fua" parameter name so that "modinfo null_blk" displays correct information. Fixes: f4f84586c8b9 ("null_blk: Introduce fua attribute") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240702073234.206458-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 920526928089b00be7881c7112a463fe8a63371b Author: Yafang Shao Date: Tue Jun 25 23:11:23 2024 +0800 livepatch: Replace snprintf() with sysfs_emit() Let's use sysfs_emit() instead of snprintf(). Suggested-by: Miroslav Benes Signed-off-by: Yafang Shao Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Link: https://lore.kernel.org/r/20240625151123.2750-4-laoar.shao@gmail.com Signed-off-by: Petr Mladek commit 40f9caa7b171d088b8244db280495402fd416c55 Author: Yafang Shao Date: Tue Jun 25 23:11:22 2024 +0800 selftests/livepatch: Add selftests for "replace" sysfs attribute Add selftests for both atomic replace and non atomic replace livepatches. The result is as follows, TEST: sysfs test ... ok TEST: sysfs test object/patched ... ok TEST: sysfs test replace enabled ... ok TEST: sysfs test replace disabled ... ok Suggested-by: Marcos Paulo de Souza Signed-off-by: Yafang Shao Tested-by: Marcos Paulo de Souza Reviewed-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Link: https://lore.kernel.org/r/20240625151123.2750-3-laoar.shao@gmail.com Signed-off-by: Petr Mladek commit adb68ed26a3e92224e04502c768f1bb03b7c7aeb Author: Yafang Shao Date: Tue Jun 25 23:11:21 2024 +0800 livepatch: Add "replace" sysfs attribute There are situations when it might make sense to combine livepatches with and without the atomic replace on the same system. For example, the livepatch without the atomic replace might provide a hotfix or extra tuning. Managing livepatches on such systems might be challenging. And the information which of the installed livepatches do not use the atomic replace would be useful. Add new sysfs interface 'replace'. It works as follows: $ cat /sys/kernel/livepatch/livepatch-non_replace/replace 0 $ cat /sys/kernel/livepatch/livepatch-replace/replace 1 [ commit log improved by Petr ] Signed-off-by: Yafang Shao Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Link: https://lore.kernel.org/r/20240625151123.2750-2-laoar.shao@gmail.com Signed-off-by: Petr Mladek commit 3b7c16be30e35ec035b2efcc0f7d7b368789c443 Author: Pavel Begunkov Date: Tue Jul 2 14:38:11 2024 +0100 io_uring/msg_ring: fix overflow posting The caller of io_cqring_event_overflow() should be holding the completion_lock, which is violated by io_msg_tw_complete. There is only one caller of io_add_aux_cqe(), so just add locking there for now. WARNING: CPU: 0 PID: 5145 at io_uring/io_uring.c:703 io_cqring_event_overflow+0x442/0x660 io_uring/io_uring.c:703 RIP: 0010:io_cqring_event_overflow+0x442/0x660 io_uring/io_uring.c:703 __io_post_aux_cqe io_uring/io_uring.c:816 [inline] io_add_aux_cqe+0x27c/0x320 io_uring/io_uring.c:837 io_msg_tw_complete+0x9d/0x4d0 io_uring/msg_ring.c:78 io_fallback_req_func+0xce/0x1c0 io_uring/io_uring.c:256 process_one_work kernel/workqueue.c:3224 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3305 worker_thread+0x86d/0xd40 kernel/workqueue.c:3383 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Fixes: f33096a3c99c0 ("io_uring: add io_add_aux_cqe() helper") Reported-by: syzbot+f7f9c893345c5c615d34@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c7350d07fefe8cce32b50f57665edbb6355ea8c1.1719927398.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 39823b47bbd40502632ffba90ebb34fff7c8b5e8 Author: Bart Van Assche Date: Thu May 9 10:01:49 2024 -0700 block/mq-deadline: Fix the tag reservation code The current tag reservation code is based on a misunderstanding of the meaning of data->shallow_depth. Fix the tag reservation code as follows: * By default, do not reserve any tags for synchronous requests because for certain use cases reserving tags reduces performance. See also Harshit Mogalapalli, [bug-report] Performance regression with fio sequential-write on a multipath setup, 2024-03-07 (https://lore.kernel.org/linux-block/5ce2ae5d-61e2-4ede-ad55-551112602401@oracle.com/) * Reduce min_shallow_depth to one because min_shallow_depth must be less than or equal any shallow_depth value. * Scale dd->async_depth from the range [1, nr_requests] to [1, bits_per_sbitmap_word]. Cc: Christoph Hellwig Cc: Damien Le Moal Cc: Zhiguo Niu Fixes: 07757588e507 ("block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests") Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240509170149.7639-3-bvanassche@acm.org Signed-off-by: Jens Axboe commit 6259151c04d4e0085e00d2dcb471ebdd1778e72e Author: Bart Van Assche Date: Thu May 9 10:01:48 2024 -0700 block: Call .limit_depth() after .hctx has been set Call .limit_depth() after data->hctx has been set such that data->hctx can be used in .limit_depth() implementations. Cc: Christoph Hellwig Cc: Damien Le Moal Cc: Zhiguo Niu Fixes: 07757588e507 ("block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests") Signed-off-by: Bart Van Assche Tested-by: Zhiguo Niu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240509170149.7639-2-bvanassche@acm.org Signed-off-by: Jens Axboe commit f3b273b7c7e42ff7ef5b6063834d768d33c7ba79 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:45 2024 -0300 iommu/arm-smmu-v3: Allow setting a S1 domain to a PASID The SVA cleanup made the SSID logic entirely general so all we need to do is call it with the correct cd table entry for a S1 domain. This is slightly tricky because of the ASID and how the locking works, the simple fix is to just update the ASID once we get the right locks. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/14-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 8ee9175c25827240dd84a7adffbfa9c16938ac5d Author: Jason Gunthorpe Date: Tue Jun 25 09:37:44 2024 -0300 iommu/arm-smmu-v3: Allow a PASID to be set when RID is IDENTITY/BLOCKED If the STE doesn't point to the CD table we can upgrade it by reprogramming the STE with the appropriate S1DSS. We may also need to turn on ATS at the same time. Keep track if the installed STE is pointing at the cd_table and the ATS state to trigger this path. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/13-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 3b5302cbb06af6b62022360066944a1ff6aea0d1 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:43 2024 -0300 iommu/arm-smmu-v3: Test the STE S1DSS functionality S1DSS brings in quite a few new transition pairs that are interesting. Test to/from S1DSS_BYPASS <-> S1DSS_SSID0, and BYPASS <-> S1DSS_SSID0. Test a contrived non-hitless flow to make sure that the logic works. Tested-by: Nicolin Chen Signed-off-by: Michael Shavit Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/12-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit ce26ea9e6e12df01432bd2a1cb8cbfa025b8a977 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:42 2024 -0300 iommu/arm-smmu-v3: Allow IDENTITY/BLOCKED to be set while PASID is used The HW supports this, use the S1DSS bits to configure the behavior of SSID=0 which is the RID's translation. If SSID's are currently being used in the CD table then just update the S1DSS bits in the STE, remove the master_domain and leave ATS alone. For iommufd the driver design has a small problem that all the unused CD table entries are set with V=0 which will generate an event if VFIO userspace tries to use the CD entry. This patch extends this problem to include the RID as well if PASID is being used. For BLOCKED with used PASIDs the F_STREAM_DISABLED (STRTAB_STE_1_S1DSS_TERMINATE) event is generated on untagged traffic and a substream CD table entry with V=0 (removed pasid) will generate C_BAD_CD. Arguably there is no advantage to using S1DSS over the CD entry 0 with V=0. As we don't yet support PASID in iommufd this is a problem to resolve later, possibly by using EPD0 for unused CD table entries instead of V=0, and not using S1DSS for BLOCKED. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/11-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit d38c28dbefeee03d7dd02004ad80d9676ac54d86 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:41 2024 -0300 iommu/arm-smmu-v3: Put the SVA mmu notifier in the smmu_domain This removes all the notifier de-duplication logic in the driver and relies on the core code to de-duplicate and allocate only one SVA domain per mm per smmu instance. This naturally gives a 1:1 relationship between SVA domain and mmu notifier. It is a significant simplication of the flow, as we end up with a single struct arm_smmu_domain for each MM and the invalidation can then be shifted to properly use the masters list like S1/S2 do. Remove all of the previous mmu_notifier, bond, shared cd, and cd refcount logic entirely. The logic here is tightly wound together with the unusued BTM support. Since the BTM logic requires holding all the iommu_domains in a global ASID xarray it conflicts with the design to have a single SVA domain per PASID, as multiple SMMU instances will need to have different domains. Following patches resolve this by making the ASID xarray per-instance instead of global. However, converting the BTM code over to this methodology requires many changes. Thus, since ARM_SMMU_FEAT_BTM is never enabled, remove the parts of the BTM support for ASID sharing that interact with SVA as well. A followup series is already working on fully enabling the BTM support, that requires iommufd's VIOMMU feature to bring in the KVM's VMID as well. It will come with an already written patch to bring back the ASID sharing using a per-instance ASID xarray. https://lore.kernel.org/linux-iommu/20240208151837.35068-1-shameerali.kolothum.thodi@huawei.com/ https://lore.kernel.org/linux-iommu/26-v6-228e7adf25eb+4155-smmuv3_newapi_p2_jgg@nvidia.com/ Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Michael Shavit Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/10-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 49db2ed23c52f8371c12ab8646df23fa1daad4b2 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:40 2024 -0300 iommu/arm-smmu-v3: Keep track of arm_smmu_master_domain for SVA Fill in the smmu_domain->devices list in the new struct arm_smmu_domain that SVA allocates. Keep track of every SSID and master that is using the domain reusing the logic for the RID attach. This is the first step to making the SVA invalidation follow the same design as S1/S2 invalidation. At present nothing will read this list. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/9-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit d7b2d2ba1b84f4ae7cd94de22f74d6c6c5419de6 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:39 2024 -0300 iommu/arm-smmu-v3: Make SVA allocate a normal arm_smmu_domain Currently the SVA domain is a naked struct iommu_domain, allocate a struct arm_smmu_domain instead. This is necessary to be able to use the struct arm_master_domain mechanism. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Michael Shavit Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/8-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 1d5f34f0002f9f56d0ca153022cfdead07d45dc6 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:38 2024 -0300 iommu/arm-smmu-v3: Thread SSID through the arm_smmu_attach_*() interface Allow creating and managing arm_smmu_mater_domain's with a non-zero SSID through the arm_smmu_attach_*() family of functions. This triggers ATC invalidation for the correct SSID in PASID cases and tracks the per-attachment SSID in the struct arm_smmu_master_domain. Generalize arm_smmu_attach_remove() to be able to remove SSID's as well by ensuring the ATC for the PASID is flushed properly. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/7-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit be7c90de39fdebdba4f9cce7575b71c6b2506ea0 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:37 2024 -0300 iommu/arm-smmu-v3: Do not use master->sva_enable to restrict attaches We no longer need a master->sva_enable to control what attaches are allowed. Instead we can tell if the attach is legal based on the current configuration of the master. Keep track of the number of valid CD entries for SSID's in the cd_table and if the cd_table has been installed in the STE directly so we know what the configuration is. The attach logic is then made into: - SVA bind, check if the CD is installed - RID attach of S2, block if SSIDs are used - RID attach of IDENTITY/BLOCKING, block if SSIDs are used arm_smmu_set_pasid() is already checking if it is possible to setup a CD entry, at this patch it means the RID path already set a STE pointing at the CD table. Tested-by: Nicolin Chen Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/6-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 64efb3def3a53effe01fa750eec6e7369f65e386 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:36 2024 -0300 iommu/arm-smmu-v3: Add ssid to struct arm_smmu_master_domain Prepare to allow a S1 domain to be attached to a PASID as well. Keep track of the SSID the domain is using on each master in the arm_smmu_master_domain. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Michael Shavit Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/5-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 7497f4211f4fbdcec5fc5bb4df7f6ccd345966e8 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:35 2024 -0300 iommu/arm-smmu-v3: Make changing domains be hitless for ATS The core code allows the domain to be changed on the fly without a forced stop in BLOCKED/IDENTITY. In this flow the driver should just continually maintain the ATS with no change while the STE is updated. ATS relies on a linked list smmu_domain->devices to keep track of which masters have the domain programmed, but this list is also used by arm_smmu_share_asid(), unrelated to ats. Create two new functions to encapsulate this combined logic: arm_smmu_attach_prepare() arm_smmu_attach_commit() The two functions can sequence both enabling ATS and disabling across the STE store. Have every update of the STE use this sequence. Installing a S1/S2 domain always enables the ATS if the PCIe device supports it. The enable flow is now ordered differently to allow it to be hitless: 1) Add the master to the new smmu_domain->devices list 2) Program the STE 3) Enable ATS at PCIe 4) Remove the master from the old smmu_domain This flow ensures that invalidations to either domain will generate an ATC invalidation to the device while the STE is being switched. Thus we don't need to turn off the ATS anymore for correctness. The disable flow is the reverse: 1) Disable ATS at PCIe 2) Program the STE 3) Invalidate the ATC 4) Remove the master from the old smmu_domain Move the nr_ats_masters adjustments to be close to the list manipulations. It is a count of the number of ATS enabled masters currently in the list. This is stricly before and after the STE/CD are revised, and done under the list's spin_lock. This is part of the bigger picture to allow changing the RID domain while a PASID is in use. If a SVA PASID is relying on ATS to function then changing the RID domain cannot just temporarily toggle ATS off without also wrecking the SVA PASID. The new infrastructure here is organized so that the PASID attach/detach flows will make use of it as well in following patches. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Michael Shavit Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit ad10dce61303d82f7bdd2dbb116e02146778f728 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:34 2024 -0300 iommu/arm-smmu-v3: Make smmu_domain->devices into an allocated list The next patch will need to store the same master twice (with different SSIDs), so allocate memory for each list element. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Michael Shavit Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 85f2fb6ef4137c631c9d2663716d998d7e4f164f Author: Jason Gunthorpe Date: Tue Jun 25 09:37:33 2024 -0300 iommu/arm-smmu-v3: Start building a generic PASID layer Add arm_smmu_set_pasid()/arm_smmu_remove_pasid() which are to be used by callers that already constructed the arm_smmu_cd they wish to program. These functions will encapsulate the shared logic to setup a CD entry that will be shared by SVA and S1 domain cases. Prior fixes had already moved most of this logic up into __arm_smmu_sva_bind(), move it to it's final home. Following patches will relieve some of the remaining SVA restrictions: - The RID domain is a S1 domain and has already setup the STE to point to the CD table - The programmed PASID is the mm_get_enqcmd_pasid() - Nothing changes while SVA is running (sva_enable) SVA invalidation will still iterate over the S1 domain's master list, later patches will resolve that. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 678d79b98028ce2365b30e35479bea0e555c23d3 Author: Jason Gunthorpe Date: Tue Jun 25 09:37:32 2024 -0300 iommu/arm-smmu-v3: Convert to domain_alloc_sva() This allows the driver the receive the mm and always a device during allocation. Later patches need this to properly setup the notifier when the domain is first allocated. Remove ops->domain_alloc() as SVA was the only remaining purpose. Tested-by: Nicolin Chen Tested-by: Shameer Kolothum Reviewed-by: Michael Shavit Reviewed-by: Nicolin Chen Reviewed-by: Jerry Snitselaar Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1-v9-5cd718286059+79186-smmuv3_newapi_p2b_jgg@nvidia.com Signed-off-by: Will Deacon commit 7775352a5f52f034d24fafdf3969c2003a53aa3a Author: Rob Clark Date: Mon Jul 1 14:32:14 2024 -0700 drm/msm/gem: Add missing rcu_dereference() Fixes a sparse "different address spaces" error. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406280050.syeEwLTE-lkp@intel.com/ Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/601612/ commit 0608235a2f43126f19305093559b935738e969e8 Merge: 0cd9f140389bc 71062e52fc0ae Author: Linus Walleij Date: Tue Jul 2 16:11:16 2024 +0200 Merge tag 'renesas-pinctrl-for-v6.11-tag2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel Signed-off-by: Linus Walleij commit ad7f52996bcd5a6ce489bb70e0f01a9b1cb76d78 Author: Rob Clark Date: Mon Jul 1 14:23:29 2024 -0700 drm/msm/a6xx: Add missing __always_unused The __build_asserts() function only exists to have a place to put build-time asserts. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407010401.rfunrBSx-lkp@intel.com/ Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/601606/ commit 9474f72cd6573ee788013147e3590be4a28e085a Author: Pu Lehui Date: Tue Jul 2 12:19:44 2024 +0000 selftests/bpf: Add testcase where 7th argment is struct Add testcase where 7th argument is struct for architectures with 8 argument registers, and increase the complexity of the struct. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Reviewed-by: Björn Töpel Acked-by: Björn Töpel Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240702121944.1091530-4-pulehui@huaweicloud.com commit 5d52ad36683af64f04da295d67fb943f94658929 Author: Pu Lehui Date: Tue Jul 2 12:19:43 2024 +0000 selftests/bpf: Factor out many args tests from tracing_struct Factor out many args tests from tracing_struct and rename some function names to make more sense. Meanwhile, remove unnecessary skeleton detach operation as it will be covered by skeleton destroy operation. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240702121944.1091530-3-pulehui@huaweicloud.com commit 6801b0aef79db475591c3146a701ea373e4663b7 Author: Pu Lehui Date: Tue Jul 2 12:19:42 2024 +0000 riscv, bpf: Add 12-argument support for RV64 bpf trampoline This patch adds 12 function arguments support for riscv64 bpf trampoline. The current bpf trampoline supports <= sizeof(u64) bytes scalar arguments [0] and <= 16 bytes struct arguments [1]. Therefore, we focus on the situation where scalars are at most XLEN bits and aggregates whose total size does not exceed 2×XLEN bits in the riscv calling convention [2]. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Reviewed-by: Björn Töpel Acked-by: Björn Töpel Acked-by: Puranjay Mohan Link: https://elixir.bootlin.com/linux/v6.8/source/kernel/bpf/btf.c#L6184 [0] Link: https://elixir.bootlin.com/linux/v6.8/source/kernel/bpf/btf.c#L6769 [1] Link: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/releases/download/draft-20230929-e5c800e661a53efe3c2678d71a306323b60eb13b/riscv-abi.pdf [2] Link: https://lore.kernel.org/bpf/20240702121944.1091530-2-pulehui@huaweicloud.com commit f227345f0a70f011647ae7ae12778bf258ff71f2 Author: Thomas Song Date: Tue Jun 25 08:26:05 2024 -0400 nvme-multipath: implement "queue-depth" iopolicy The round-robin path selector is inefficient in cases where there is a difference in latency between paths. In the presence of one or more high latency paths the round-robin selector continues to use the high latency path equally. This results in a bias towards the highest latency path and can cause a significant decrease in overall performance as IOs pile on the highest latency path. This problem is acute with NVMe-oF controllers. The queue-depth path selector sends I/O down the path with the lowest number of requests in its request queue. Paths with lower latency will clear requests more quickly and have less requests queued compared to higher latency paths. The goal of this path selector is to make more use of lower latency paths which will bring down overall IO latency and increase throughput and performance. Signed-off-by: Thomas Song [emilne: commandeered patch developed by Thomas Song @ Pure Storage] Co-developed-by: Ewan D. Milne Signed-off-by: Ewan D. Milne Co-developed-by: John Meneghini Signed-off-by: John Meneghini Link: https://lore.kernel.org/linux-nvme/20240509202929.831680-1-jmeneghi@redhat.com/ Tested-by: Marco Patalano Tested-by: Jyoti Rani Tested-by: John Meneghini Reviewed-by: Randy Jennings Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit ac26327635d643efe173e7460fa09eb39f0e5c54 Merge: d01e0e98de31f f8dbe58e2f1a3 Author: Paolo Abeni Date: Tue Jul 2 15:47:17 2024 +0200 Merge branch 'fixes-for-stm32-dwmac-driver-fails-to-probe' Christophe Roullier says: ==================== Fixes for stm32-dwmac driver fails to probe Mark Brown found issue during stm32-dwmac probe: For the past few days networking has been broken on the Avenger 96, a stm32mp157a based platform. The stm32-dwmac driver fails to probe: <6>[ 1.894271] stm32-dwmac 5800a000.ethernet: IRQ eth_wake_irq not found <6>[ 1.899694] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found <6>[ 1.905849] stm32-dwmac 5800a000.ethernet: IRQ sfty not found <3>[ 1.912304] stm32-dwmac 5800a000.ethernet: Unable to parse OF data <3>[ 1.918393] stm32-dwmac 5800a000.ethernet: probe with driver stm32-dwmac failed with error -75 which looks a bit odd given the commit contents but I didn't look at the driver code at all. Full boot log here: https://lava.sirena.org.uk/scheduler/job/467150 A working equivalent is here: https://lava.sirena.org.uk/scheduler/job/466518 I delivered 2 fixes to solve issue. ==================== Link: https://patch.msgid.link/20240701064838.425521-1-christophe.roullier@foss.st.com Signed-off-by: Paolo Abeni commit f8dbe58e2f1a3c091531b3f8ef86b393ceee67d1 Author: Christophe Roullier Date: Mon Jul 1 08:48:38 2024 +0200 net: stmmac: dwmac-stm32: update err status in case different of stm32mp13 The mask parameter of syscfg property is mandatory for MP13 but optional for all other cases. The function should not return error code because for non-MP13 the missing syscfg phandle in DT is not considered an error. So reset err to 0 in that case to support existing DTs without syscfg phandle. Fixes: 50bbc0393114 ("net: stmmac: dwmac-stm32: add management of stm32mp13 for stm32") Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Tested-by: Mark Brown Signed-off-by: Paolo Abeni commit 3cd1d4651cebe9776a0142ade36ff9f2e3545436 Author: Christophe Roullier Date: Mon Jul 1 08:48:37 2024 +0200 net: stmmac: dwmac-stm32: Add test to verify if ETHCK is used before checking clk rate When we want to use clock from RCC to clock Ethernet PHY (with ETHCK) we need to check if value of clock rate is authorized. If ETHCK is unused, the ETHCK frequency is 0Hz and validation fails. It makes no sense to validate unused ETHCK, so skip the validation. Fixes: 582ac134963e ("net: stmmac: dwmac-stm32: Separate out external clock rate validation") Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Tested-by: Mark Brown Signed-off-by: Paolo Abeni commit d01e0e98de31f9cc5cf328f5eb7ae3d7a13c1021 Author: Serge Semin Date: Fri Jun 28 18:45:12 2024 +0300 dt-bindings: net: dwmac: Validate PBL for all IP-cores Indeed the maximum DMA burst length can be programmed not only for DW xGMACs, Allwinner EMACs and Spear SoC GMAC, but in accordance with [1, 2, 3] for Generic DW *MAC IP-cores. Moreover the STMMAC driver parses the property and then apply the configuration for all supported DW MAC devices. All of that makes the property being available for all IP-cores the bindings supports. Let's make sure the PBL-related properties are validated for all of them by the common DW *MAC DT schema. [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a, October 2013, p.378. [2] DesignWare Cores Ethernet Quality-of-Service Databook, Revision 5.10a, December 2017, p.1223. [3] DesignWare Cores XGMAC - 10G Ethernet MAC Databook, Revision 2.11a, September 2015, p.469-473. Signed-off-by: Serge Semin Reviewed-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240628154515.8783-1-fancer.lancer@gmail.com Signed-off-by: Paolo Abeni commit 8f2942b9198c935862bc2400602780844b352667 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:50 2024 +0200 ASoC: topology: Unify code for creating standalone and widget enum control Code used to create standalone and widget enum control is same, with exception that in standalone case dynamic object needs to be registered and control created directly. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-14-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 4654ca7cc8d6b57c77436dd44b347cc7dd3f5f08 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:49 2024 +0200 ASoC: topology: Unify code for creating standalone and widget mixer control Code used to create standalone and widget mixer control is same, with exception that in standalone case dynamic object needs to be registered and control created directly. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-13-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 0867278200f787817036419fc87b56fb04a448e4 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:48 2024 +0200 ASoC: topology: Unify code for creating standalone and widget bytes control Code used to create standalone and widget bytes control is same, with exception that in standalone case dynamic object needs to be registered and control created directly. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-12-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit c2dad0db01fcacd44616e9d4c7263b187c4ff530 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:47 2024 +0200 ASoC: topology: Reshuffle function placement In preparation for following cleanups move functions around. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-11-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 76d8aa0f727e327a0ba9bcb904865c40d256c292 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:46 2024 +0200 ASoC: topology: Rename function creating widget kcontrol In following patches it will be reused to also create standalone kcontrol, so it makes sense to name it in more generic way. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-10-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit f14a33fcadbacc1d9728e9c75253145ae6e09bbf Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:45 2024 +0200 ASoC: topology: Align dynamic object initialization for controls soc_tplg_dbytes_create() missed se->dobj.index initialization, so add it there. Additionally separate dynamic object initialization into separate logical block code. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-9-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 963942f73b02b053f97e079ed6dae5f3602cc4b1 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:44 2024 +0200 ASoC: topology: Correctly set shift_r in soc_tplg_denum_create() This aligns soc_tplg_denum_create() with soc_tplg_dapm_widget_denum_create(), as there is no reason for difference in behavior. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-8-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit d1d0262a1f5c7a543271bd5899cdb4b3ddfe054b Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:43 2024 +0200 ASoC: topology: Cleanup soc_tplg_dapm_widget_denum_create Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-7-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 40a16442a048c5f2b4336edd4d202f1930fb9df5 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:42 2024 +0200 ASoC: topology: Cleanup soc_tplg_dapm_widget_dmixer_create Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 2a01a8895015ad479df7cfb8f127501d1c8da7c9 Merge: e27d7168f0c8c e3d69f585d651 Author: Paolo Abeni Date: Tue Jul 2 15:26:59 2024 +0200 Merge branch 'net-bpf_net_context-cleanups' Sebastian Andrzej Siewior says: ==================== net: bpf_net_context cleanups. a small series with bpf_net_context cleanups/ improvements. Jakub asked for #1 and #2 and while looking around I made #3. ==================== Link: https://patch.msgid.link/20240628103020.1766241-1-bigeasy@linutronix.de Signed-off-by: Paolo Abeni commit 52f4f7272c92d5be3988839a33be41b180bbc28e Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:41 2024 +0200 ASoC: topology: Cleanup soc_tplg_dapm_widget_dbytes_create Minor cleanups to increase readability. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 8ec2a2643544ce352f012ad3d248163199d05dfc Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:40 2024 +0200 ASoC: topology: Properly initialize soc_enum values soc_tplg_denum_create_values() should properly set its values field. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 7aa129706b4d6f7a2c649b359eea0336eb640feb Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:39 2024 +0200 ASoC: topology: Do not do unnecessary dobj management Widget kcontrols do not need to be managed as topology dynamic objects with an index and a linked list. As they are always associated with a widget which is already a topology dynamic object, thus all addition/removals of a widget will by design manage the kcontrol. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit e3d69f585d651aba877e18866de7e8cfa2476caa Author: Sebastian Andrzej Siewior Date: Fri Jun 28 12:18:56 2024 +0200 net: Move flush list retrieval to where it is used. The bpf_net_ctx_get_.*_flush_list() are used at the top of the function. This means the variable is always assigned even if unused. By moving the function to where it is used, it is possible to delay the initialisation until it is unavoidable. Not sure how much this gains in reality but by looking at bq_enqueue() (in devmap.c) gcc pushes one register less to the stack. \o/. Move flush list retrieval to where it is used. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Jesper Dangaard Brouer Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 97a05cb4ab12f55e19cf28f6ceca47bb6ed8fea4 Author: Amadeusz Sławiński Date: Thu Jun 27 12:18:38 2024 +0200 ASoC: topology: Simplify code Instead of using goto, when there is no controls, just do a loop when there are. Overall the check seems to be a bit redundant as num_kcontrols will only be above 0 if kcontrols are set anyway, but let's keep it, while simplifying code. Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20240627101850.2191513-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit d839a73179ae91c07f5f2f97ccb9c69b2b7c3306 Author: Sebastian Andrzej Siewior Date: Fri Jun 28 12:18:55 2024 +0200 net: Optimize xdp_do_flush() with bpf_net_context infos. Every NIC driver utilizing XDP should invoke xdp_do_flush() after processing all packages. With the introduction of the bpf_net_context logic the flush lists (for dev, CPU-map and xsk) are lazy initialized only if used. However xdp_do_flush() tries to flush all three of them so all three lists are always initialized and the likely empty lists are "iterated". Without the usage of XDP but with CONFIG_DEBUG_NET the lists are also initialized due to xdp_do_check_flushed(). Jakub suggest to utilize the hints in bpf_net_context and avoid invoking the flush function. This will also avoiding initializing the lists which are otherwise unused. Introduce bpf_net_ctx_get_all_used_flush_lists() to return the individual list if not-empty. Use the logic in xdp_do_flush() and xdp_do_check_flushed(). Remove the not needed .*_check_flush(). Suggested-by: Jakub Kicinski Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 2896624be30b049601ec3ef9b08df184d0c70495 Author: Sebastian Andrzej Siewior Date: Fri Jun 28 12:18:54 2024 +0200 net: Remove task_struct::bpf_net_context init on fork. There is no clone() invocation within a bpf_net_ctx_…() block. Therefore the task_struct::bpf_net_context has always to be NULL and an explicit initialisation is not required. Remove the NULL assignment in the clone() path. Suggested-by: Jakub Kicinski Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 2a011c3c12e8de461fb1fdce85fa38d308c4eb8b Author: Lorenzo Bianconi Date: Sat Jun 29 19:51:49 2024 +0200 phy: airoha: Add dtime and Rx AEQ IO registers Introduce Tx-Rx detection Time and Rx AEQ training mappings to phy-airoha-pcie driver. This is a preliminary patch to introduce PCIe support to En7581 SoC through the mediatek-gen3 PCIe driver. This change is not introducing any backward compatibility issue since the EN7581 dts is not upstream yet. Signed-off-by: Lorenzo Bianconi Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/edf3b28926177166c65256604d69f2f576cb6fb3.1719682943.git.lorenzo@kernel.org Signed-off-by: Vinod Koul commit 5854d0aa5226816575d2323e95bffdc9267d78b1 Author: Lorenzo Bianconi Date: Sat Jun 29 19:51:48 2024 +0200 dt-bindings: phy: airoha: Add dtime and Rx AEQ IO registers Introduce Tx-Rx detection time and Rx AEQ mappings in Airoha EN7581 PCIe-PHY binding. This change is not introducing any backward compatibility issue since the EN7581 dts is not upstream yet. Signed-off-by: Lorenzo Bianconi Acked-by: Conor Dooley Link: https://lore.kernel.org/r/a018329ff9678f3360bc6381294f95c62d34f3e3.1719682943.git.lorenzo@kernel.org Signed-off-by: Vinod Koul commit e245c725c72f8c94e5fe435fdefd6852851450b5 Author: Shresth Prasad Date: Fri Jun 21 02:58:07 2024 +0530 dt-bindings: phy: rockchip-emmc-phy: Convert to dtschema Convert txt bindings of Rockchip EMMC PHY to dtschema to allow for validation. Signed-off-by: Shresth Prasad Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240620212806.3011-2-shresthprasad7@gmail.com Signed-off-by: Vinod Koul commit 3d83abcae6e8fa6698f6b0a026ca650302bdbfd8 Author: Yijie Yang Date: Mon Jun 24 10:19:16 2024 +0800 dt-bindings: phy: qcom,qmp-usb: fix spelling error Correct the spelling error, changing 'com' to 'qcom'. Cc: stable@vger.kernel.org Fixes: f75a4b3a6efc ("dt-bindings: phy: qcom,qmp-usb: Add QDU1000 USB3 PHY") Signed-off-by: Yijie Yang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240624021916.2033062-1-quic_yijiyang@quicinc.com Signed-off-by: Vinod Koul commit 32267c29bc7d5c9654b71e4f354064217a5fb053 Author: André Draszik Date: Mon Jun 17 17:44:47 2024 +0100 phy: exynos5-usbdrd: support Exynos USBDRD 3.1 combo phy (HS & SS) Add support for the Exynos USB 3.1 DRD combo phy, as found in Exynos 9 SoCs like Google GS101. It supports USB SS, HS and DisplayPort. In terms of UTMI+, this is very similar to the existing Exynos850 support in this driver. The difference is that this combo phy supports both UTMI+ (HS) and PIPE3 (SS). It also supports DP alt mode. The number of ports for UTMI+ and PIPE3 can be determined using the LINKPORT register (which also exists on Exynos E850). For SuperSpeed (SS) a new SS phy is in use and its PIPE3 interface is new compared to Exynos E850, and also very different from the existing support for older Exynos SoCs in this driver. The SS phy needs a bit more configuration work and register tuning for signal quality to work reliably, presumably due to the higher frequency, e.g. to account for different board layouts. Additionally, power needs to be enabled before writing to the SS phy registers. This commit adds the necessary changes for USB HS and SS to work. DisplayPort is out of scope in this commit. Notes: * For the register tuning, exynos5_usbdrd_apply_phy_tunes() has been added with the appropriate data structures to support tuning at various stages during initialisation. Since these are hardware specific, the platform data is supposed to be populated accordingly. The implementation is loosely modelled after the Samsung UFS PHY driver. There is one tuning state for UTMI+, PTS_UTMI_POSTINIT, to execute after init and generally intended for HS signal tuning, as done in this commit. PTS_PIPE3_PREINIT PTS_PIPE3_INIT PTS_PIPE3_POSTINIT PTS_PIPE3_POSTLOCK are tuning states for PIPE3. In the downstream driver, preinit differs by Exynos SoC, and postinit and postlock are different per board. The latter haven't been implemented for gs101 here, because downstream doesn't use them on gs101 either. * Signal lock acquisition for SS depends on the orientation of the USB-C plug. Since there currently is no infrastructure to chain connector events to both the USB DWC3 driver and this phy driver, a work-around has been added in exynos5_usbdrd_usbdp_g2_v4_pma_check_cdr_lock() to check both registers if it failed in one of the orientations. * Equally, we can only establish SS speed in one of the connector orientations due to programming differences when selecting the lane mux in exynos5_usbdrd_usbdp_g2_v4_pma_lane_mux_sel(), which really needs to be dynamic, based on the orientation of the connector. * As is, we can establish a HS link using any cable, and an SS link in one orientation of the plug, falling back to HS if the orientation is reversed to the expectation. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Tested-by: Peter Griffin Tested-by: Will McVicker Link: https://lore.kernel.org/r/20240617-usb-phy-gs101-v3-6-b66de9ae7424@linaro.org Signed-off-by: Vinod Koul commit 497ddafe915e8d9fb4d11542d16a1ff95a3e8034 Author: André Draszik Date: Mon Jun 17 17:44:46 2024 +0100 phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk Using the regulator_bulk APIs, the handling of power supplies becomes much simpler. There is no need anymore to check if regulators have been acquired or not, the bulk APIs will do all the work for us. We can also drop the various handles to the individual power supplies in the driver runtime data and instead simply treat them all as one thing. Error cleanup also becomes much simpler. Converting to the regulator_bulk APIs also makes it easier to add support for those SoCs that have additional power supplies for the PHY. Google Tensor gs101 is one example of such a SoC. Otherwise we'd have to add all additional supplies individually via individual calls to regulator_get() and enable/disable handle them all individually, including complicated error handling. That doesn't scale and clutters the code. Just update the code to use the regulator_bulk APIs. Signed-off-by: André Draszik Tested-by: Will McVicker Reviewed-by: Peter Griffin Tested-by: Peter Griffin Link: https://lore.kernel.org/r/20240617-usb-phy-gs101-v3-5-b66de9ae7424@linaro.org Signed-off-by: Vinod Koul commit 26ba3261215b44d466bd2093daf3796031c09c0a Author: André Draszik Date: Mon Jun 17 17:44:45 2024 +0100 phy: exynos5-usbdrd: convert (phy) register access clock to clk_bulk In preparation for support for additional platforms, convert the phy register access clock to using the clk_bulk interfaces. Newer SoCs like Google Tensor gs101 require additional clocks for access to additional (different) register areas (PHY, PMA, PCS), and converting to clk_bulk simplifies addition of those extra clocks. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Tested-by: Peter Griffin Tested-by: Will McVicker Link: https://lore.kernel.org/r/20240617-usb-phy-gs101-v3-4-b66de9ae7424@linaro.org Signed-off-by: Vinod Koul commit 54290bd9811ecdd82c19b96093e2c78325f59574 Author: André Draszik Date: Mon Jun 17 17:44:44 2024 +0100 phy: exynos5-usbdrd: convert core clocks to clk_bulk Using the clk_bulk APIs, the clock handling for the core clocks becomes much simpler. No need to check any flags whether or not certain clocks exist or not. Further, we can drop the various handles to the individual clocks in the driver data and instead simply treat them all as one thing. So far, this driver assumes that all platforms have a clock "ref". It also assumes that the clocks "phy_pipe", "phy_utmi", and "itp" exist if the platform data "has_common_clk_gate" is set to true. It then goes and individually tries to acquire and enable and disable all the individual clocks one by one. Rather than relying on these implicit clocks and open-coding the clock handling, we can just explicitly spell out the clock names in the different device data and use that information to populate clk_bulk_data, allowing us to use the clk_bulk APIs for managing the clocks. As a side-effect, this change highlighted the fact that exynos5_usbdrd_phy_power_on() forgot to check the result of the clock enable calls. Using the clk_bulk APIs, the compiler now warns when return values are not checked - therefore add the necessary check instead of silently ignoring failures and continuing as if all is OK when it isn't. For consistency, also change a related dev_err() to dev_err_probe() in exynos5_usbdrd_phy_clk_handle() to get consistent error message formatting. Finally, exynos5_usbdrd_phy_clk_handle() prints an error message in all cases as necessary (except for -ENOMEM). There is no need to print another message in its caller (the probe() function), and printing errors during OOM conditions is usually discouraged. Drop the duplicated message in exynos5_usbdrd_phy_probe(). Signed-off-by: André Draszik Tested-by: Will McVicker Reviewed-by: Peter Griffin Tested-by: Peter Griffin Link: https://lore.kernel.org/r/20240617-usb-phy-gs101-v3-3-b66de9ae7424@linaro.org Signed-off-by: Vinod Koul commit bbb28a1d733a94330f5778b4cd0dbccf6c34597d Author: André Draszik Date: Mon Jun 17 17:44:43 2024 +0100 phy: exynos5-usbdrd: support isolating HS and SS ports independently Some versions of this IP have been integrated using separate PMU power control registers for the HS and SS parts. One example is the Google Tensor gs101 SoC. Such SoCs can now set pmu_offset_usbdrd0_phy_ss in their exynos5_usbdrd_phy_drvdata for the SS phy to the appropriate value. The existing 'usbdrdphy' alias can not be used in this case because that is meant for determining the correct PMU offset if multiple distinct PHYs exist in the system (as opposed to one PHY with multiple isolators). Signed-off-by: André Draszik Tested-by: Will McVicker Reviewed-by: Peter Griffin Tested-by: Peter Griffin Link: https://lore.kernel.org/r/20240617-usb-phy-gs101-v3-2-b66de9ae7424@linaro.org Signed-off-by: Vinod Koul commit e340c041b7a4c0321bfe2cb54817837c9040c739 Author: André Draszik Date: Mon Jun 17 17:44:42 2024 +0100 dt-bindings: phy: samsung,usb3-drd-phy: add gs101 compatible Add a dedicated google,gs101-usb31drd-phy compatible for Google Tensor gs101 SoC. It needs additional clocks enabled for register access, and additional memory regions (PCS & PMA) are required for successful configuration. It also requires various power supplies (regulators) for the internal circuitry to work. The required voltages are: * pll-supply: 0.85V * dvdd-usb20-supply: 0.85V (+10%, -7%) * vddh-usb20-supply: 1.8V (+10%, -7%) * vdd33-usb20-supply: 3.3V (+10%, -7%) * vdda-usbdp-supply: 0.85V * vddh-usbdp-supply: 1.8V Signed-off-by: André Draszik Reviewed-by: Krzysztof Kozlowski Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20240617-usb-phy-gs101-v3-1-b66de9ae7424@linaro.org Signed-off-by: Vinod Koul commit 4c75fe2a5ec409b773ed5edb0e83e2f0a88d1138 Author: Miaoqian Lin Date: Wed Jun 26 12:09:10 2024 +0400 phy: core: Fix documentation of of_phy_get of_phy_put is used for of_phy_get to release the reference count. Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20240626080911.203630-1-linmq006@gmail.com Signed-off-by: Vinod Koul commit 8d2a3539517dbf13e970b3aabdf94b04a65d276c Author: Changhuang Liang Date: Wed Jun 26 19:00:59 2024 -0700 phy: starfive: Correct the dphy configure process We actually want to calculate the alignment values first, then use the alignment value to look up the data from reg_configs[]. Fixes: d3ab79553308 ("phy: starfive: Add mipi dphy tx support") Reviewed-by: Shengyang Chen Signed-off-by: Changhuang Liang Link: https://lore.kernel.org/r/20240627020059.163535-1-changhuang.liang@starfivetech.com Signed-off-by: Vinod Koul commit 04490b621ab16d09ce5b7c62b2c8cc9fdb871421 Author: Sean Anderson Date: Fri Jun 28 16:55:40 2024 -0400 phy: zynqmp: Add debugfs support Add support for printing some basic status information to debugfs. This is helpful when debugging phy consumers to make sure they are configuring the phy appropriately. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240628205540.3098010-6-sean.anderson@linux.dev Signed-off-by: Vinod Koul commit d79c6840917097285e03a49f709321f5fb972750 Author: Sean Anderson Date: Fri Jun 28 16:55:39 2024 -0400 phy: zynqmp: Take the phy mutex in xlate Take the phy mutex in xlate to protect against concurrent modification/access to gtr_phy. This does not typically cause any issues, since in most systems the phys are only xlated once and thereafter accessed with the phy API (which takes the locks). However, we are about to allow userspace to access phys for debugging, so it's important to avoid any data races. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240628205540.3098010-5-sean.anderson@linux.dev Signed-off-by: Vinod Koul commit 235d8b663ab9e6cc13f8374abfffa559f50b57b6 Author: Sean Anderson Date: Fri Jun 28 16:55:38 2024 -0400 phy: zynqmp: Only wait for PLL lock "primary" instances For PCIe and DisplayPort, the phy instance represents the controller's logical lane. Wait for the instance 0 phy's PLL to lock as other instances will never lock. We do this in xpsgtr_wait_pll_lock so callers don't have to determine the correct lane themselves. The original comment is wrong about cumulative wait times. Since we are just polling a bit, all subsequent waiters will finish immediately. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240628205540.3098010-4-sean.anderson@linux.dev Signed-off-by: Vinod Koul commit 6959d2367bc3503ac4ba3eb4ec6584a43150d6b3 Author: Sean Anderson Date: Fri Jun 28 16:55:37 2024 -0400 phy: zynqmp: Store instance instead of type The phy "type" is just the combination of protocol and instance, and is never used apart from that. Store the instance directly, instead of converting to a type first. No functional change intended. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240628205540.3098010-3-sean.anderson@linux.dev Signed-off-by: Vinod Koul commit 687d6bccb28238fcfa65f7c1badfdfeac498c428 Author: Sean Anderson Date: Fri Jun 28 16:55:36 2024 -0400 phy: zynqmp: Enable reference clock correctly Lanes can use other lanes' reference clocks, as determined by refclk. Use refclk to determine the clock to enable/disable instead of always using the lane's own reference clock. This ensures the clock selected in xpsgtr_configure_pll is the one enabled. For the other half of the equation, always program REF_CLK_SEL even when we are selecting the lane's own clock. This ensures that Linux's idea of the reference clock matches the hardware. We use the "local" clock mux for this instead of going through the ref clock network. Fixes: 25d700833513 ("phy: xilinx: phy-zynqmp: dynamic clock support for power-save") Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240628205540.3098010-2-sean.anderson@linux.dev Signed-off-by: Vinod Koul commit 967969cf594ed3c1678a9918d6e9bb2d1591cbe9 Author: Ma Ke Date: Tue Jul 2 11:20:42 2024 +0800 phy: cadence-torrent: Check return value on register read cdns_torrent_dp_set_power_state() does not consider that ret might be overwritten. Add return value check of regmap_read_poll_timeout() after register read in cdns_torrent_dp_set_power_state(). Fixes: 5b16a790f18d ("phy: cadence-torrent: Reorder few functions to remove function declarations") Signed-off-by: Ma Ke Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20240702032042.3993031-1-make24@iscas.ac.cn Signed-off-by: Vinod Koul commit e4a195e2b95e4602c667ed19a20f71218df138c2 Author: Tushar Vyavahare Date: Tue Jul 2 05:59:16 2024 +0000 selftests/xsk: Enhance batch size support with dynamic configurations Introduce dynamic adjustment capabilities for fill_size and comp_size parameters to support larger batch sizes beyond the previous 2K limit. Update HW_SW_MAX_RING_SIZE test cases to evaluate AF_XDP's robustness by pushing hardware and software ring sizes to their limits. This test ensures AF_XDP's reliability amidst potential producer/consumer throttling due to maximum ring utilization. Signed-off-by: Tushar Vyavahare Signed-off-by: Daniel Borkmann Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20240702055916.48071-3-tushar.vyavahare@intel.com commit d80d61ab0609f7f7168d59ec82ee5f055a4b6be7 Author: Tushar Vyavahare Date: Tue Jul 2 05:59:15 2024 +0000 selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver Previously, HW_SW_MIN_RING_SIZE and HW_SW_MAX_RING_SIZE test cases were not validating Tx/Rx traffic at all due to early return after changing HW ring size in testapp_validate_traffic(). Fix the flow by checking return value of set_ring_size() and act upon it rather than terminating the test case there. Signed-off-by: Tushar Vyavahare Signed-off-by: Daniel Borkmann Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20240702055916.48071-2-tushar.vyavahare@intel.com commit db4eb418c71a4223b90cac34017ed1f627371da9 Author: Liu Jing Date: Mon Jul 1 19:25:17 2024 +0800 phy: Fix the cacography in phy-exynos5250-usb2.c The word 'swtich' is wrong, so fix it. Signed-off-by: Liu Jing Link: https://lore.kernel.org/r/20240701112517.6597-1-liujing@cmss.chinamobile.com Signed-off-by: Vinod Koul commit edf9e04955d2387032beac54ebf20b43aaca2adf Author: Cristian Ciocaltea Date: Sat Jun 29 03:26:58 2024 +0300 phy: phy-rockchip-samsung-hdptx: Select CONFIG_MFD_SYSCON Compile testing configurations without REGMAP support enabled results in a bunch of errors being reported: ../drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c:569:21: error: variable ‘rk_hdptx_phy_regmap_config’ has initializer but incomplete type 569 | static const struct regmap_config rk_hdptx_phy_regmap_config = { | ^~~~~~~~~~~~~ ../drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c:570:10: error: ‘const struct regmap_config’ has no member named ‘reg_bits’ 570 | .reg_bits = 32, | ^~~~~~~~ Note that selecting REGMAP alone is not enough, because of the following liker error: phy-rockchip-samsung-hdptx.c:(.text+0x10c): undefined reference to `__devm_regmap_init_mmio_clk' Instead of the obvious fix to enable REGMAP_MMIO, select MFD_SYSCON, which implicitly enables REGMAP_MMIO as well. The rationale is that the driver has been already relying on the syscon functionality. Moreover, without MFD_SYSCON enabled, the test coverage is reduced, since the linker might not detect any potential undefined references following syscon_regmap_lookup_by_phandle() invocation in rk_hdptx_phy_probe() body. That is because the function would unconditionally return -ENOTSUP, hence the compiler is free to optimize out any unreachable code. Finally ensure PHY_ROCKCHIP_SAMSUNG_HDPTX depends on HAS_IOMEM, as required by MFD_SYSCON. Fixes: 553be2830c5f ("phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20240629-rk-hdptx-compile-test-fix-v1-1-c86675ba8070@collabora.com Signed-off-by: Vinod Koul commit e27d7168f0c8c024344e9541513aa71d921402a5 Merge: e2dd0d0593c17 40eca00ae605d Author: Paolo Abeni Date: Tue Jul 2 15:00:14 2024 +0200 Merge branch 'page_pool-bnxt_en-unlink-old-page-pool-in-queue-api-using-helper' David Wei says: ==================== page_pool: bnxt_en: unlink old page pool in queue api using helper 56ef27e3 unexported page_pool_unlink_napi() and renamed it to page_pool_disable_direct_recycling(). This is because there was no in-tree user of page_pool_unlink_napi(). Since then Rx queue API and an implementation in bnxt got merged. In the bnxt implementation, it broadly follows the following steps: allocate new queue memory + page pool, stop old rx queue, swap, then destroy old queue memory + page pool. The existing NAPI instance is re-used so when the old page pool that is no longer used but still linked to this shared NAPI instance is destroyed, it will trigger warnings. In my initial patches I unlinked a page pool from a NAPI instance directly. Instead, export page_pool_disable_direct_recycling() and call that instead to avoid having a driver touch a core struct. ==================== Link: https://patch.msgid.link/20240627030200.3647145-1-dw@davidwei.uk Signed-off-by: Paolo Abeni commit 40eca00ae605d77b6d784824a6ce54c5b42dfce6 Author: David Wei Date: Wed Jun 26 20:02:00 2024 -0700 bnxt_en: unlink page pool when stopping Rx queue Have bnxt call page_pool_disable_direct_recycling() to unlink the old page pool when resetting a queue prior to destroying it, instead of touching a netdev core struct directly. Signed-off-by: David Wei Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit d7f39aee79f04eeaa42085728423501b33ac5be5 Author: David Wei Date: Wed Jun 26 20:01:59 2024 -0700 page_pool: export page_pool_disable_direct_recycling() 56ef27e3 unexported page_pool_unlink_napi() and renamed it to page_pool_disable_direct_recycling(). This is because there was no in-tree user of page_pool_unlink_napi(). Since then Rx queue API and an implementation in bnxt got merged. In the bnxt implementation, it broadly follows the following steps: allocate new queue memory + page pool, stop old rx queue, swap, then destroy old queue memory + page pool. The existing NAPI instance is re-used so when the old page pool that is no longer used but still linked to this shared NAPI instance is destroyed, it will trigger warnings. In my initial patches I unlinked a page pool from a NAPI instance directly. Instead, export page_pool_disable_direct_recycling() and call that instead to avoid having a driver touch a core struct. Suggested-by: Jakub Kicinski Signed-off-by: David Wei Reviewed-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 62412a9357b16a4e39dc582deb2e2a682b92524c Author: Richard Fitzgerald Date: Tue Jul 2 12:08:09 2024 +0100 firmware: cs_dsp: Don't allow writes to read-only controls Add a check to cs_dsp_coeff_write_ctrl() to abort if the control is not writeable. The cs_dsp code originated as an ASoC driver (wm_adsp) where all controls were exported as ALSA controls. It relied on ALSA to enforce the read-only permission. Now that the code has been separated from ALSA/ASoC it must perform its own permission check. This isn't currently causing any problems so there shouldn't be any need to backport this. If the client of cs_dsp exposes the control as an ALSA control, it should set permissions on that ALSA control to protect it. The few uses of cs_dsp_coeff_write_ctrl() inside drivers are for writable controls. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240702110809.16836-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 1d3724c92dc20584f76033347384b8c1536480af Author: Maxim Kochetkov Date: Tue Jul 2 00:16:22 2024 +0300 ASoC: codecs: nau8824: Add master clock handling Use master clock "mclk" if provided through device tree. Signed-off-by: Maxim Kochetkov Link: https://patch.msgid.link/20240701211631.92384-3-fido_max@inbox.ru Signed-off-by: Mark Brown commit fcad7177eb7854ce244ce863c82583d8a6ce5952 Author: Maxim Kochetkov Date: Tue Jul 2 00:16:21 2024 +0300 ASoC: dt-bindings: nau8824: Add master clock handling Use master clock "mclk" if provided through device tree. Signed-off-by: Maxim Kochetkov Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240701211631.92384-2-fido_max@inbox.ru Signed-off-by: Mark Brown commit a893a804c6bb09336a217780c722b7d1c88357c6 Merge: d0401d07a9daa 9337f15f4fd6e Author: Mark Brown Date: Tue Jul 2 13:03:13 2024 +0100 ASoC: simple-audio-mux: add state-labels Merge series from Kuninori Morimoto : simple-audio-mux is designed to be used generally, thus "Input 1" or "Input 2" are used to selecting MUX input. This numbered inputs would work, but might be not user friendly in some case, for example in case of system hardware design has some clear labels. Adds new "state-labels" property and enable to select MUX by own state names. Original > amixer set "MUX" "Input 1" > amixer set "MUX" "Input 2" Use mux-names sound_mux: mux { compatible = "simple-audio-mux"; mux-gpios = <...>; => state-labels = "Label_A", "Label_B"; }; > amixer set "MUX" "Label_A" > amixer set "MUX" "Label_B" commit d0401d07a9daa116cde127d68289f975a00100c2 Merge: cc1deba84035a e5524e3316ac5 Author: Mark Brown Date: Tue Jul 2 13:03:05 2024 +0100 ASoC: cs35l56: Remove obsolete and redundant code Merge series from Richard Fitzgerald : These commits remove various code that is either no longer needed, or is redundant. commit cc1deba84035abd21d07a468f463fb6eb2186c92 Merge: 765d3a2aa1958 e1bc5c324bcca Author: Mark Brown Date: Tue Jul 2 13:02:57 2024 +0100 ASoC: codecs: wsa88xx: add support for static port Merge series from srinivas.kandagatla@linaro.org: Existing way of allocating soundwire master ports on Qualcommm platforms is dynamic, and in linear order starting from 1 to MAX_PORTS. This will work as long as soundwire device ports are 1:1 mapped linearly. However on most Qcom SoCs like SM8550, SM8650, x1e80100, these are NOT mapped in that order. The result of this is that only one speaker among the pair of speakers is always silent, With recent changes for WSA codec to support codec versions and along with these patches we are able to get all speakers working on these SoCs. commit 746f4ae52a38459dbed792adb58cadaed370dcc2 Author: Ping-Ke Shih Date: Thu Jun 27 10:58:49 2024 +0800 wifi: rtw89: 8852bt: rfk: add RCK RCK is synchronize RC calibration. Driver triggers this calibration and writes the result to registers. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240627025849.25198-5-pkshih@realtek.com commit 39f0123e032192f13c843344a83e3132bff28f3c Author: Ping-Ke Shih Date: Thu Jun 27 10:58:48 2024 +0800 wifi: rtw89: 8852bt: rfk: add DACK DACK (digital-to-analog converters calibration) is used to calibrate DAC to output signals as expected. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240627025849.25198-4-pkshih@realtek.com commit c3d9705de5e7442afe8ce121b86f99b4b7de4ac8 Author: Ping-Ke Shih Date: Thu Jun 27 10:58:47 2024 +0800 wifi: rtw89: 8852bt: rfk: add RX DCK RX DCK stands for receiver DC calibration. With this calibration, we have proper DC offset to reflect correct received signal strength indicator. Do this calibration when bringing up interface and going to connect. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240627025849.25198-3-pkshih@realtek.com commit f77c5179bc9f6f22d6f1b064bda2e87a567ca7d5 Author: Ping-Ke Shih Date: Thu Jun 27 10:58:46 2024 +0800 wifi: rtw89: 8852bt: rfk: add IQK IQ signal calibration is a very important calibration to yield good RF performance. We do this calibration once we are going to an AP. During scanning phase, without this calibration RF performance is still acceptable because it transmits and receives with low data rate at this phase. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240627025849.25198-2-pkshih@realtek.com commit dcf920ff8c16868ce0f9738fb1dadf455f86bd94 Author: Zong-Zhe Yang Date: Wed Jun 26 10:32:37 2024 +0800 wifi: rtw89: constrain TX power according to Transmit Power Envelope Calculate a TX power constraint based on content of ieee80211 Transmit Power Envelope (TPE). Since HW control registers aren't designed as many as all kinds of TPE fields, we strictly intersect all TPE inputs in driver. Then, according to result, constrain TX power via TX power limit/limit_RU. Besides, extend dbgfs txpwr_table to show info about 6 GHz regulatory. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240626023237.7901-1-pkshih@realtek.com commit d2f299a4c9983022907ff8ec4d4ace49a409ce40 Author: Ching-Te Ku Date: Wed Jun 26 10:31:29 2024 +0800 wifi: rtw89: coex: Add coexistence policy for hardware scan Add additional policy option to let Bluetooth audio can play well during Wi-Fi is hardware scanning. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240626023129.7776-1-pkshih@realtek.com commit 518aee32c551d2f7d1e577f63df6dfcc80259b50 Author: Srinivas Kandagatla Date: Tue Jun 18 14:55:15 2024 +0100 drivers:soundwire: qcom: cleanup port maask calculations Cleanup the port map calculations, existing masks of having separate masks for in and out ports is not really required. Having a single mask for all the ports in the controller is simple and cuts of some unnecessary code. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240618-soundwire-port-map-v1-1-9644e5545b9b@linaro.org Signed-off-by: Vinod Koul commit 611ff1b1ae989a7bcce3e2a8e132ee30e968c557 Author: Viresh Kumar Date: Tue Jun 18 15:12:29 2024 +0530 xen: privcmd: Fix possible access to a freed kirqfd instance Nothing prevents simultaneous ioctl calls to privcmd_irqfd_assign() and privcmd_irqfd_deassign(). If that happens, it is possible that a kirqfd created and added to the irqfds_list by privcmd_irqfd_assign() may get removed by another thread executing privcmd_irqfd_deassign(), while the former is still using it after dropping the locks. This can lead to a situation where an already freed kirqfd instance may be accessed and cause kernel oops. Use SRCU locking to prevent the same, as is done for the KVM implementation for irqfds. Reported-by: Al Viro Suggested-by: Paolo Bonzini Signed-off-by: Viresh Kumar Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/9e884af1f1f842eacbb7afc5672c8feb4dea7f3f.1718703669.git.viresh.kumar@linaro.org Signed-off-by: Juergen Gross commit 1c682593096a487fd9aebc079a307ff7a6d054a3 Author: Viresh Kumar Date: Tue Jun 18 15:12:28 2024 +0530 xen: privcmd: Switch from mutex to spinlock for irqfds irqfd_wakeup() gets EPOLLHUP, when it is called by eventfd_release() by way of wake_up_poll(&ctx->wqh, EPOLLHUP), which gets called under spin_lock_irqsave(). We can't use a mutex here as it will lead to a deadlock. Fix it by switching over to a spin lock. Reported-by: Al Viro Signed-off-by: Viresh Kumar Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/a66d7a7a9001424d432f52a9fc3931a1f345464f.1718703669.git.viresh.kumar@linaro.org Signed-off-by: Juergen Gross commit e2dd0d0593c17f32c7263e9d6f7554ecaabb0baf Merge: 19e6ad2c75782 2ca58ed21cefd Author: Paolo Abeni Date: Tue Jul 2 12:06:52 2024 +0200 Merge branch 'zerocopy-tx-cleanups' Pavel Begunkov says: ==================== zerocopy tx cleanups Assorted zerocopy send path cleanups, the main part of which is moving some net stack specific accounting out of io_uring back to net/ in Patch 4. ==================== Link: https://patch.msgid.link/cover.1719190216.git.asml.silence@gmail.com Signed-off-by: Paolo Abeni commit 2ca58ed21cefdda45520a0a2b1980c008efe9874 Author: Pavel Begunkov Date: Thu Jun 27 13:59:45 2024 +0100 net: limit scope of a skb_zerocopy_iter_stream var skb_zerocopy_iter_stream() only uses @orig_uarg in the !link_skb path, and we can move the local variable in the appropriate block. Signed-off-by: Pavel Begunkov Reviewed-by: Willem de Bruijn Reviewed-by: Jens Axboe Signed-off-by: Paolo Abeni commit 060f4ba6e40338a70932603a3564903acf5f5734 Author: Pavel Begunkov Date: Thu Jun 27 13:59:44 2024 +0100 io_uring/net: move charging socket out of zc io_uring Currently, io_uring's io_sg_from_iter() duplicates the part of __zerocopy_sg_from_iter() charging pages to the socket. It'd be too easy to miss while changing it in net/, the chunk is not the most straightforward for outside users and full of internal implementation details. io_uring is not a good place to keep it, deduplicate it by moving out of the callback into __zerocopy_sg_from_iter(). Signed-off-by: Pavel Begunkov Reviewed-by: Willem de Bruijn Reviewed-by: Jens Axboe Signed-off-by: Paolo Abeni commit aeb320fc05c74e1d3b429aa0e3a777b8a931c189 Author: Pavel Begunkov Date: Thu Jun 27 13:59:43 2024 +0100 net: batch zerocopy_fill_skb_from_iter accounting Instead of accounting every page range against the socket separately, do it in batch based on the change in skb->truesize. It's also moved into __zerocopy_sg_from_iter(), so that zerocopy_fill_skb_from_iter() is simpler and responsible for setting frags but not the accounting. Signed-off-by: Pavel Begunkov Reviewed-by: Willem de Bruijn Reviewed-by: Jens Axboe Signed-off-by: Paolo Abeni commit 7fb05423fed41686ccc1a76c20d486728f62023f Author: Pavel Begunkov Date: Thu Jun 27 13:59:42 2024 +0100 net: split __zerocopy_sg_from_iter() Split a function out of __zerocopy_sg_from_iter() that only cares about the traditional path with refcounted pages and doesn't need to know about ->sg_from_iter. A preparation patch, we'll improve on the function later. Signed-off-by: Pavel Begunkov Reviewed-by: Willem de Bruijn Reviewed-by: Jens Axboe Signed-off-by: Paolo Abeni commit 9e2db9d3993e270b24fbc4ce1ca7e09756e8df25 Author: Pavel Begunkov Date: Thu Jun 27 13:59:41 2024 +0100 net: always try to set ubuf in skb_zerocopy_iter_stream skb_zcopy_set() does nothing if there is already a ubuf_info associated with an skb, and since ->link_skb should have set it several lines above the check here essentially does nothing and can be removed. It's also safer this way, because even if the callback is faulty we'll have it set. Signed-off-by: Pavel Begunkov Reviewed-by: Willem de Bruijn Reviewed-by: Jens Axboe Signed-off-by: Paolo Abeni commit babe69e86d0fcb11a4a8f629edf2951d94ef67ae Author: Benjamin Marzinski Date: Tue Jul 2 12:00:43 2024 +0200 dm io: remove code duplication between sync_io and aysnc_io The only difference between the code to setup and dispatch the io in sync_io() and async_io() is the sync argument to dispatch_io(), which is used to update the opf argument. Update the opf argument direcly in sync_io(), and remove the sync argument from dispatch_io(). Then, make sync_io() call async_io() instead of duplicting all of its code. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit b0042ba7684c90d9c8e7deb500c73d6ae3872cfe Author: Benjamin Marzinski Date: Tue Jul 2 11:58:56 2024 +0200 dm io: don't call the async_io notify.fn on invalid num_regions If dm_io() returned an error, callers that set a notify.fn and wanted it called on an error need to check the return value and call notify.fn themselves if it was -EINVAL but not if it was -EIO. None of them do this (granted, all the existing async_io users of dm_io call it in a way that is guaranteed to not return an error). Simplify the interface by never calling the notify.fn if dm_io returns an error. This works with the existing dm_io callers which check for an error and handle it using the same methods as the notify.fn. This also allows us to move the now equivalent num_regions checks out of sync_io() and async_io() and into dm_io() itself. Additionally, change async_io() into a void function, since it can no longer fail. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 06a0b333e58407970e9b109d054610d2f107ca87 Author: Benjamin Marzinski Date: Tue Jul 2 11:56:45 2024 +0200 dm io: bump num_bvecs to handle offset memory If dp->get_page() returns a non-zero offset, the bio might need an additional bvec to deal with the offset. For example, if remaining is exactly one page size, but there is an offset, the memory will span two pages. Signed-off-by: Benjamin Marzinski Signed-off-by: Mikulas Patocka commit 6f2a875024993449f1b19a144d3e4391411a1b51 Author: Bartosz Golaszewski Date: Tue Jun 25 09:38:15 2024 +0200 gpiolib: unexport gpiochip_get_desc() This function has been deprecated for some time and is now only used within the GPIOLIB core. Remove it from the public header and unexport it as all current users are linked against the compilation unit where it is defined. Link: https://lore.kernel.org/r/20240625073815.12376-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 657a292d679ae3a6c733ab0e939e24ae44b20faf Author: Linus Walleij Date: Thu Jun 27 09:22:09 2024 +0100 ARM: 9408/1: mm: CFI: Fix some erroneous reset prototypes I somehow got a few cpu_nn_reset() signatures wrong in my patch. Fix it up. Closes: https://lore.kernel.org/oe-kbuild-all/202406260432.6WGV2jCk-lkp@intel.com/ Fixes: 393999fa9627 ("ARM: 9389/2: mm: Define prototypes for all per-processor calls") Reported-by: kernel test robot Reported-by: Nathan Chancellor Reviewed-by: Sami Tolvanen Signed-off-by: Linus Walleij Signed-off-by: Russell King (Oracle) commit 2335c9cb831faba1a4efcc612886073b6f175fe4 Author: Jinjie Ruan Date: Thu Jun 27 08:38:44 2024 +0100 ARM: 9407/1: Add support for STACKLEAK gcc plugin Add the STACKLEAK gcc plugin to arm32 by adding the helper used by stackleak common code: on_thread_stack(). It initialize the stack with the poison value before returning from system calls which improves the kernel security. Additionally, this disables the plugin in EFI stub code and decompress code, which are out of scope for the protection. Before the test on Qemu versatilepb board: # echo STACKLEAK_ERASING > /sys/kernel/debug/provoke-crash/DIRECT lkdtm: Performing direct entry STACKLEAK_ERASING lkdtm: XFAIL: stackleak is not supported on this arch (HAVE_ARCH_STACKLEAK=n) After: # echo STACKLEAK_ERASING > /sys/kernel/debug/provoke-crash/DIRECT lkdtm: Performing direct entry STACKLEAK_ERASING lkdtm: stackleak stack usage: high offset: 80 bytes current: 280 bytes lowest: 696 bytes tracked: 696 bytes untracked: 192 bytes poisoned: 7220 bytes low offset: 4 bytes lkdtm: OK: the rest of the thread stack is properly erased Signed-off-by: Jinjie Ruan Acked-by: Ard Biesheuvel Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) commit 5f95843d51e7e0eb0d6ccea074f906214ef06fbc Author: Heiko Carstens Date: Fri Jun 28 10:35:24 2024 +0200 s390/hwcaps: Add documentation for HWCAP flags Describe that some HWCAP bits are reserved to avoid that they will be used by accident. Suggested-by: Stefan Liebler Reviewed-by: Stefan Liebler Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 02ee149198b4e4ad1a5b9e4c7806f924609b5fb3 Author: Claudio Imbrenda Date: Tue Jun 25 17:13:30 2024 +0200 s390/pgtable: Make crdte() and cspg() return a value Make the crdte() and cspg() wrappers return a boolean to indicate success, like the other already existing "compare and swap" type of wrappers. Add documentation for those functions as well. Acked-by: Alexander Gordeev Signed-off-by: Claudio Imbrenda Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit d6d1aa519c94367e8cd95d6f17ee4cba354aeb30 Author: Mete Durlu Date: Wed Jun 26 10:31:48 2024 +0200 s390/topology: Remove CPU KOBJ_CHANGE uevents s390 generates KOBJ_CHANGE uevents on CPUs whenever a topology update occurs. These uevents currently have no users and they are also not present on other architectures. As they are not necessary, remove these extra uevents. Suggested-by: Heiko Carstens Acked-by: Alexander Gordeev Signed-off-by: Mete Durlu Signed-off-by: Alexander Gordeev commit 4e7b4ff2dcaed228cb2fb7bfe720262c98ec1bb9 Author: Jinjie Ruan Date: Thu Jun 27 08:29:59 2024 +0100 ARM: 9406/1: Fix callchain_trace() return value perf_callchain_store() return 0 on success, -1 otherwise, fix callchain_trace() to return correct bool value. So walk_stackframe() can have a chance to stop walking the stack ahead. Fixes: 70ccc7c0667b ("ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code") Signed-off-by: Jinjie Ruan Signed-off-by: Russell King (Oracle) commit d712c58c55d9a4b4cc88ec2e1f8cd2e3b82359b5 Author: Jaroslav Kysela Date: Tue Jun 25 19:25:47 2024 +0200 ALSA: pcm: optimize and clarify stream synchronization ID API Optimize the memory usage in struct snd_pcm_runtime - use boolean value for the standard sync ID scheme. Introduce snd_pcm_set_sync_per_card function to build synchronization IDs. Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20240625172836.589380-3-perex@perex.cz commit f05c1ffc274516ef101d2e0f860bcb9b08c6c622 Author: Jaroslav Kysela Date: Tue Jun 25 19:25:46 2024 +0200 ALSA: pcm: reinvent the stream synchronization ID API Until the commit e11f0f90a626 ("ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command"), there was a possibility to pass information about the synchronized streams to the user space. The mentioned commit removed blindly the appropriate code with an irrelevant comment. The revert may be appropriate, but since this API was lost for several years without any complains, it's time to improve it. The hardware parameters may change the used stream clock source (e.g. USB hardware) so move this synchronization ID to hw_params as read-only field. It seems that pipewire can benefit from this API (disable adaptive resampling for perfectly synchronized PCM streams) now. Note that the contents of ID is not supposed to be used for direct comparison with a specific byte sequence. The "empty" case is when all bytes are zero (driver does not offer this information) and all other cases must be only used for equal comparison among PCM streams (including different sound cards) if they are using identical hardware clock. Cc: Takashi Sakamoto Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20240625172836.589380-2-perex@perex.cz commit 7cd23c1817b8f9df61dac67848d9593b1ca8882f Author: Jeff Johnson Date: Tue Jun 11 16:54:05 2024 -0700 xen: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/xen/xen-pciback/xen-pciback.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/xen/xen-evtchn.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/xen/xen-privcmd.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240611-md-drivers-xen-v1-1-1eb677364ca6@quicinc.com Signed-off-by: Juergen Gross commit 349d271416c61f82b853336509b1d0dc04c1fcbb Author: Chen Ni Date: Tue Jul 2 11:10:10 2024 +0800 x86/xen: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: 8310b77b48c5 ("Xen/gnttab: handle p2m update errors on a per-slot basis") Signed-off-by: Chen Ni Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240702031010.1411875-1-nichen@iscas.ac.cn Signed-off-by: Juergen Gross commit ad162488bbd359abda99c9819f5cbe9172f40935 Author: Frediano Ziglio Date: Wed Jun 19 11:40:15 2024 +0100 x86/xen/time: Reduce Xen timer tick Current timer tick is causing some deadline to fail. The current high value constant was probably due to an old bug in the Xen timer implementation causing errors if the deadline was in the future. This was fixed in Xen commit: 19c6cbd90965 xen/vcpu: ignore VCPU_SSHOTTMR_future Usage of VCPU_SSHOTTMR_future in Linux kernel was removed by: c06b6d70feb3 xen/x86: don't lose event interrupts Signed-off-by: Frediano Ziglio Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240619104015.30477-1-frediano.ziglio@cloud.com Signed-off-by: Juergen Gross commit da99d45bd55193690beee3acff7b69e0939405dd Author: Eric Sandeen Date: Thu Jun 27 19:42:25 2024 -0500 vboxsf: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers From: Eric Sandeen Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/58862d35-a026-4866-ab7f-fa09dda8ac1f@redhat.com Reviewed-by: Hans de Goede Signed-off-by: Christian Brauner commit b548291690d1afc33e66d956b82bbd3c250660ed Author: Eric Sandeen Date: Thu Jun 27 19:40:44 2024 -0500 tracefs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/6c9b0b16-e61b-4dfc-852d-e2eb5bb11b82@redhat.com Acked-by: Steven Rostedt (Google) Signed-off-by: Christian Brauner commit 3229e3a5a3745049f982818fb2ea9273e7b08f09 Author: Eric Sandeen Date: Thu Jun 27 19:39:26 2024 -0500 smb: client: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/2543358a-b97e-45ce-8cdc-3de1dd9a782f@redhat.com Signed-off-by: Christian Brauner commit 2ec07010b6a9a03f7aa45c2499cf8a03118d4428 Author: Eric Sandeen Date: Thu Jun 27 19:38:12 2024 -0500 tmpfs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/06b54c7c-4f08-4d99-93d1-32b9f6706209@redhat.com Signed-off-by: Christian Brauner commit c449cb5d1bcedb8dda85ef8d58e3fc7b246655c7 Author: Eric Sandeen Date: Thu Jun 27 19:37:21 2024 -0500 ntfs3: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/04bf30db-8542-48dc-9060-7f7dc08eda22@redhat.com Signed-off-by: Christian Brauner commit 6a265845db285bb90d29d0f223176ae2fdd422d2 Author: Eric Sandeen Date: Thu Jun 27 19:36:14 2024 -0500 isofs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/3e57caa1-33e0-4456-8e07-60922439e479@redhat.com Signed-off-by: Christian Brauner commit eefc132477226c54796cd5dafc1ddf1850b8ba90 Author: Eric Sandeen Date: Thu Jun 27 19:35:12 2024 -0500 hugetlbfs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/6cb0dcfd-f837-463f-b5ec-0e7d2608b837@redhat.com Signed-off-by: Christian Brauner commit 6b5732b5ca4f8af2e733726a2b3deef2909b3819 Author: Eric Sandeen Date: Thu Jun 27 19:32:45 2024 -0500 ext4: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/a84be40d-5110-4dac-83b1-0ea8e043f0fd@redhat.com Signed-off-by: Christian Brauner commit ffe1b94d7464bef15b6585f9e7f8192cd0668327 Author: Eric Sandeen Date: Thu Jun 27 19:31:51 2024 -0500 exfat: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/dda575de-11a7-4139-8a25-07957d311ed3@redhat.com Signed-off-by: Christian Brauner commit dcffad38c7677a975ca36db34da4f085995ca50e Author: Eric Sandeen Date: Thu Jun 27 19:30:56 2024 -0500 efivarfs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/ff7c415c-43d4-4a1e-a987-246c781f8850@redhat.com Signed-off-by: Christian Brauner commit 49abee5991e18f14ec822ef53acd173ae58ff594 Author: Eric Sandeen Date: Thu Jun 27 19:29:46 2024 -0500 debugfs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/b2f44ee0-3cee-49eb-a416-f26a9306eb56@redhat.com Signed-off-by: Christian Brauner commit 748cddf13de55d9b1ab1988647d3b19d8d03b2e2 Author: Eric Sandeen Date: Thu Jun 27 19:27:35 2024 -0500 autofs: Convert to new uid/gid option parsing helpers Convert to new uid/gid option parsing helpers Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/faccdd51-07d6-413f-aa55-41bb0e7660df@redhat.com Acked-by: Ian Kent Signed-off-by: Christian Brauner commit 9f111059e725f7ca79a136bfc734da3c8c1838b4 Author: Eric Sandeen Date: Thu Jun 27 19:26:24 2024 -0500 fs_parse: add uid & gid option option parsing helpers Multiple filesystems take uid and gid as options, and the code to create the ID from an integer and validate it is standard boilerplate that can be moved into common helper functions, so do that for consistency and less cut&paste. This also helps avoid the buggy pattern noted by Seth Jenkins at https://lore.kernel.org/lkml/CALxfFW4BXhEwxR0Q5LSkg-8Vb4r2MONKCcUCVioehXQKr35eHg@mail.gmail.com/ because uid/gid parsing will fail before any assignment in most filesystems. Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/de859d0a-feb9-473d-a5e2-c195a3d47abb@redhat.com Signed-off-by: Christian Brauner commit e796887c06d177155b7bb6e6b876bb3683e23fda Author: Fabio Estevam Date: Mon Jul 1 17:54:58 2024 -0300 arm64: dts: imx8mp: Remove 'snps,rx-sched-sp' According to nxp,dwmac-imx.yaml, 'snps,rx-sched-sp' is not a valid property. Remove it from the imx8mp board devicetree files to avoid dt-schema warnings: ... 'snps,tx-sched-sp' does not match any of the regexes Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit e49380c155940cb47e291a4b3fcb7fdffee6aa4d Author: Chris Lew Date: Thu Jun 27 16:18:30 2024 +0530 soc: qcom: smp2p: Use devname for interrupt descriptions When using /proc/interrupts to collect statistics on smp2p interrupt counts, it is hard to distinguish the different instances of smp2p from each other. For example to debug a processor boot issue, the ready and handover interrupts are checked for sanity to ensure the firmware reached a specific initialization stage. Remove "smp2p" string from the irq request so that the irq will default to the device name. Add an .irq_print_chip() callback to print the irq chip name as the device name. These two changes allow for a unique name to be used in /proc/interrupts as shown below. / # cat /proc/interrupts | grep smp2p 18: ... ipcc 196610 Edge smp2p-adsp 20: ... ipcc 131074 Edge smp2p-modem 170: ... smp2p-modem 1 Edge q6v5 ready 178: ... smp2p-adsp 1 Edge q6v5 ready Signed-off-by: Chris Lew Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240627104831.4176799-2-quic_sudeepgo@quicinc.com Signed-off-by: Bjorn Andersson commit 818c2676e5816dad5a77df5a1c0d99d0e160d0b1 Author: Bartosz Golaszewski Date: Thu Jun 27 13:42:12 2024 +0200 arm64: dts: qcom: sa8775p-ride-r3: add new board file Revision 3 of the sa8775p-ride board uses a different PHY for the two ethernet ports and supports 2.5G speed. Create a new file for the board reflecting the changes. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240627114212.25400-4-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit fe15631117f8d85b1bc4e0c3b434c78be483a43d Author: Bartosz Golaszewski Date: Thu Jun 27 13:42:11 2024 +0200 arm64: dts: qcom: move common parts for sa8775p-ride variants into a .dtsi In order to support multiple revisions of the sa8775p-ride board, create a .dtsi containing the common parts and split out the ethernet bits into the actual board file as they will change in revision 3. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240627114212.25400-3-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit 9ca49bb26ef64ffd0edd1a037e0b00b8e32617dc Author: Bartosz Golaszewski Date: Thu Jun 27 13:42:10 2024 +0200 dt-bindings: arm: qcom: add sa8775p-ride Rev 3 Document the compatible for revision 3 of the sa8775p-ride board. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627114212.25400-2-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit 6bf99fdb4c93b165e77b879606f2e9c2571399da Author: Krzysztof Kozlowski Date: Thu Jun 27 14:20:15 2024 +0200 arm64: dts: qcom: sm8550-qrd: add port mapping to speakers Add appropriate mappings of Soundwire ports of WSA8845 speaker. This solves second (south) speaker sound distortions when playing audio. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240627122015.30945-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 5ba3ba4d4439709c68b96aef3b0e71c63fd9d665 Author: Krzysztof Kozlowski Date: Thu Jun 27 14:20:14 2024 +0200 arm64: dts: qcom: sm8550-mtp: add port mapping to speakers Add appropriate mappings of Soundwire ports of WSA8845 speaker. This solves second (right) speaker sound distortions when playing audio. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240627122015.30945-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 21663c69b3f75ae52d9f1f6b844aa2bb314a6a3f Author: Krzysztof Kozlowski Date: Thu Jun 27 14:20:13 2024 +0200 arm64: dts: qcom: sm8550-hdk: add port mapping to speakers Add appropriate mappings of Soundwire ports of WSA8845 speaker. This solves second (south) speaker sound distortions when playing audio. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240627122015.30945-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 519df670e8921d0f9bea2be1049ad601742d749d Author: Neil Armstrong Date: Thu Jun 27 14:57:16 2024 +0200 arm64: dts: qcom: sm8650-qrd: add port mapping to speakers Add appropriate mappings of Soundwire ports of WSA8845 speaker to correctly map the Speaker ports to the WSA macro ports. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627-topic-sm8650-upstream-was-port-mapping-v1-3-4700bcc2489a@linaro.org Signed-off-by: Bjorn Andersson commit f3b84707c41fe1c2ca41588278ac1845d15a5006 Author: Neil Armstrong Date: Thu Jun 27 14:57:15 2024 +0200 arm64: dts: qcom: sm8650-mtp: add port mapping to speakers Add appropriate mappings of Soundwire ports of WSA8845 speaker to correctly map the Speaker ports to the WSA macro ports. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627-topic-sm8650-upstream-was-port-mapping-v1-2-4700bcc2489a@linaro.org Signed-off-by: Bjorn Andersson commit 1cda6acb8fbd9c1050737d50a60c0b91b8c64dfb Author: Neil Armstrong Date: Thu Jun 27 14:57:14 2024 +0200 arm64: dts: qcom: sm8650-hdk: add port mapping to speakers Add appropriate mappings of Soundwire ports of WSA8845 speaker to correctly map the Speaker ports to the WSA macro ports. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627-topic-sm8650-upstream-was-port-mapping-v1-1-4700bcc2489a@linaro.org Signed-off-by: Bjorn Andersson commit d870196e3383b92179dfc051fe6f038df9a94ea9 Author: Luca Weiss Date: Thu Jun 27 15:15:54 2024 +0200 arm64: dts: qcom: sm7225-fairphone-fp4: Name the regulators Without explicitly specifying names for the regulators they are named based on the DeviceTree node name. This results in multiple regulators with the same name, making debug prints and regulator_summary impossible to reason about. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240627-fp4-regulator-name-v1-1-66931111a006@fairphone.com Signed-off-by: Bjorn Andersson commit f27e42c7d3ff8ddfc57273efd1e8642ea89bad90 Author: Abel Vesa Date: Fri Jun 28 11:08:00 2024 +0300 clk: qcom: gcc-x1e80100: Fix halt_check for all pipe clocks In case of all pipe clocks, there is a QMP PHY clock that is feeding them. If, for whatever reason, the clock from the PHY is not enabled, halt bit will not get set, and the clock controller driver will assume the clock is stuck in a specific state. The way this is supposed to be properly fixed is to defer the checking of the halt bit until after the PHY clock has been initialized, but doing so complicates the clock controller driver. In fact, since these pipe clocks are consumed by the PHY, while the PHY is also the one providing the source, if clock gets stuck, the PHY driver would be to blame. So instead of checking the halt bit in here, just skip it and assume the PHY driver is handling the source clock correctly. Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100") Signed-off-by: Abel Vesa Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20240628-x1e80100-clk-gcc-fix-halt-check-for-usb-phy-pipe-clks-v2-1-db3be54b1143@linaro.org Signed-off-by: Bjorn Andersson commit 2a89f2b7e4b98ff684eff2950cbe62d8dd47da72 Author: Krzysztof Kozlowski Date: Mon Jul 1 08:22:53 2024 +0200 ARM: dts: qcom: apq8064: drop incorrect ranges from QFPROM There is no direct mapping between QFPROM children and parent/SoC MMIO bus, so 'ranges' property is not correct. Pointed by dtbs_check: qcom-apq8064-cm-qs600.dtb: efuse@700000: Unevaluated properties are not allowed ('ranges' was unexpected) Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406292139.yqPYyUfi-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240701062253.18149-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit ac3eb41a283adf861aa49408bd4a6ce1e9563f84 Author: Dmitry Baryshkov Date: Mon Jul 1 21:11:16 2024 +0300 arm64: dts: qcom: pm8916: correct thermal zone name Correct the name for the thermal zone on PM8916 PMIC. I ended up with c&p mistake, which wasn't noticed until the patch got merged. Reported-by: Konrad Dybcio Fixes: b7a28d8a7b80 ("arm64: dts: qcom: pm8916: add temp-alarm thermal zone") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240701-fix-pm8916-tz-v1-1-02f8a713f577@linaro.org Signed-off-by: Bjorn Andersson commit 05a21e8b5d006177bce7332523eea5e3f2ee23ab Author: Luca Weiss Date: Fri Jun 28 19:30:23 2024 +0200 soc: qcom: smsm: Add missing mailbox dependency to Kconfig Since the smsm driver got the ability to interact with the mailbox using the mailbox subsystem and not just syscon, we need to add the dependency to kconfig as well to avoid compile errors. Fixes: 75287992f58a ("soc: qcom: smsm: Support using mailbox interface") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406180006.Z397C67h-lkp@intel.com/ Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240628-smsm-kconfig-v1-1-117d5af4ba1f@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 721e38301b79a6ee8375cb0ebd586699a7f353e3 Author: Akhil P Oommen Date: Sat Jun 29 07:19:38 2024 +0530 arm64: dts: qcom: x1e80100: Add gpu support Add the necessary dt nodes for gpu support in X1E80100. Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240629015111.264564-6-quic_akhilpo@quicinc.com Signed-off-by: Bjorn Andersson commit 9c99c33a904c86d95ecf4e2690de6a826b88671c Author: Abel Vesa Date: Sat Jun 29 09:29:43 2024 +0300 arm64: dts: qcom: x1e80100: Fix USB HS PHY 0.8V supply According to the power grid documentation, the 0.8v HS PHY shared regulator is actually LDO3 from PM8550ve id J. Fix both CRD and QCP boards. Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240629-x1e80100-dts-fix-hsphy-0-8v-supplies-v1-1-de99ee030b27@linaro.org Signed-off-by: Bjorn Andersson commit 19e6ad2c75782bd15b3df24df7982da457d702c5 Author: Russell King (Oracle) Date: Fri Jun 28 11:32:11 2024 +0100 net: phy: fix potential use of NULL pointer in phy_suspend() phy_suspend() checks the WoL status, and then dereferences phydrv->flags if (and only if) we decided that WoL has been enabled on either the PHY or the netdev. We then check whether phydrv was NULL, but we've potentially already dereferenced the pointer. If phydrv is NULL, then phy_ethtool_get_wol() will return an error and leave wol.wolopts set to zero. However, if netdev->wol_enabled is true, then we would dereference a NULL pointer. Checking the PHY drivers, the only place that phydev->wol_enabled is checked by them is in their suspend/resume callbacks and nowhere else (which is correct, because phylib only updates this in phy_suspend()). So, move the NULL pointer check earlier to avoid a NULL pointer dereference. Leave the check for phydrv->suspend in place as a driver may populate the .resume method but not the .suspend method. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/E1sN8tn-00GDCZ-Jj@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 1eea11e937db67b5417934974e825c7101324b23 Merge: 74d6529b78f7a ae44fa998ee28 Author: Jakub Kicinski Date: Mon Jul 1 20:04:58 2024 -0700 Merge tag 'linux-can-next-for-6.11-20240629' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2024-06-29 Geert Uytterhoeven contributes 3 patches with small improvements and cleanups for the rcar_canfd driver. A patch by Christophe JAILLET constifies the struct m_can_ops in the m_can driver to reduce the code size. The last 9 patches are by me an work around erratum DS80000789E 6 of mcp2518fd. * tag 'linux-can-next-for-6.11-20240629' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd can: mcp251xfd: tef: prepare to workaround broken TEF FIFO tail index erratum can: mcp251xfd: rx: add workaround for erratum DS80000789E 6 of mcp2518fd can: mcp251xfd: rx: prepare to workaround broken RX FIFO head index erratum can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function can: mcp251xfd: clarify the meaning of timestamp can: mcp251xfd: move mcp251xfd_timestamp_start()/stop() into mcp251xfd_chip_start/stop() can: mcp251xfd: update errata references can: mcp251xfd: properly indent labels can: gs_usb: add VID/PID for Xylanta SAINT3 product family can: m_can: Constify struct m_can_ops can: rcar_canfd: Remove superfluous parentheses in address calculations can: rcar_canfd: Improve printing of global operational state can: rcar_canfd: Simplify clock handling ==================== Link: https://patch.msgid.link/20240629114017.1080160-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit b576d375b536568c85d42c15a189f6b6fdd75b74 Author: Jiapeng Chong Date: Tue Jun 18 15:20:14 2024 +0800 fgraph: Use str_plural() in test_graph_storage_single() Use existing str_plural() function rather than duplicating its implementation. ./kernel/trace/trace_selftest.c:880:56-60: opportunity for str_plural(size). Link: https://lore.kernel.org/linux-trace-kernel/20240618072014.20855-1-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9349 Signed-off-by: Jiapeng Chong Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit c40583e19eebae50f6b024d8285d2703e2522364 Author: Luis Claudio R. Goncalves Date: Mon Jun 10 10:23:14 2024 -0300 rtla/osnoise: set the default threshold to 1us Change the default threshold for osnoise to 1us, so that any noise equal or above this value is recorded. Let the user set a higher threshold if necessary. Link: https://lore.kernel.org/linux-trace-kernel/Zmb-QhiiiI6jM9To@uudg.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Jonathan Corbet Suggested-by: Daniel Bristot de Oliveira Reviewed-by: Clark Williams Signed-off-by: Luis Claudio R. Goncalves Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 39b24cced70fdc336dbc0070f8b3bde61d8513a8 Author: Wayne Tung Date: Mon Jul 1 15:32:52 2024 +0800 hwmon: (adt7475) Fix default duty on fan is disabled According to the comments on fan is disabled, we change to manual mode and set the duty cycle to 0. For setting the duty cycle part, the register is wrong. Fix it. Fixes: 1c301fc5394f ("hwmon: Add a driver for the ADT7475 hardware monitoring chip") Signed-off-by: Wayne Tung Link: https://lore.kernel.org/r/20240701073252.317397-1-chineweff@gmail.com Signed-off-by: Guenter Roeck commit 0dad9ee3c13930fe8122f2efc936fcd1c277a00d Author: Ard Biesheuvel Date: Mon Jul 1 18:29:59 2024 +0200 efistub/smbios: Simplify SMBIOS enumeration API Update the efi_get_smbios_string() macro to take a pointer to the entire record struct rather than the header. This removes the need to pass the type explicitly, as it can be inferred from the typed pointer. Also, drop 'type' from the prototype of __efi_get_smbios_string(), as it is never referenced. Signed-off-by: Ard Biesheuvel commit faf5a975ee3b94aac7c8a8054456a85d99a1b7ad Author: Yoshihiro Shimoda Date: Tue Jun 11 21:50:56 2024 +0900 PCI: rcar-gen4: Add support for R-Car V4H Add support for r8a779g0 (R-Car V4H). This driver previously supported r8a779f0 (R-Car S4-8). PCIe features of both r8a779f0 and r8a779g0 are almost all the same. For example: - PCI Express Base Specification Revision 4.0 - Root complex mode and endpoint mode are supported However, r8a779g0 requires specific firmware to be provided, to initialize the PHY. Otherwise, the PCIe controller will not work. [kwilczynski: drop the proprietary firmware conversion comment] Link: https://lore.kernel.org/linux-pci/20240611125057.1232873-5-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 37aee82c213d352dccb850dc4228dda2e7e591b1 Author: Ard Biesheuvel Date: Thu Jun 20 09:10:49 2024 +0200 x86/efi: Drop support for fake EFI memory maps Between kexec and confidential VM support, handling the EFI memory maps correctly on x86 is already proving to be rather difficult (as opposed to other EFI architectures which manage to never modify the EFI memory map to begin with) EFI fake memory map support is essentially a development hack (for testing new support for the 'special purpose' and 'more reliable' EFI memory attributes) that leaked into production code. The regions marked in this manner are not actually recognized as such by the firmware itself or the EFI stub (and never have), and marking memory as 'more reliable' seems rather futile if the underlying memory is just ordinary RAM. Marking memory as 'special purpose' in this way is also dubious, but may be in use in production code nonetheless. However, the same should be achievable by using the memmap= command line option with the ! operator. EFI fake memmap support is not enabled by any of the major distros (Debian, Fedora, SUSE, Ubuntu) and does not exist on other architectures, so let's drop support for it. Acked-by: Borislav Petkov (AMD) Acked-by: Dan Williams Signed-off-by: Ard Biesheuvel commit fa17fbb0e471fe8a7bbc8143be0056252ba9265a Author: Daniil Titov Date: Sun Jun 30 01:36:42 2024 +0200 drm/msm/adreno: Add support for Adreno 505 GPU This GPU is found on SoCs such as MSM8937 (450 MHz), MSM8940 (475 MHz), SDM439 (650 MHz). Signed-off-by: Daniil Titov Reviewed-by: Konrad Dybcio Signed-off-by: Barnabás Czémán Patchwork: https://patchwork.freedesktop.org/patch/601411/ Signed-off-by: Rob Clark commit 71c5c23be874d6e0d120c6e41b3191e354e6ebe3 Author: Abhinav Kumar Date: Fri Jun 28 16:39:27 2024 -0700 drm/msm/dpu: check ubwc support before adding compressed formats On QCM2290 chipset DPU does not support UBWC. Add a dpu cap to indicate this and do not expose compressed formats in this case. changes since RFC: - use ubwc enc and dec version of mdss_data instead of catalog to decide if ubwc is supported Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/601392/ Signed-off-by: Rob Clark commit c181b16fcbb6d9ed71b26a96d0eb750feaa4d95f Merge: 1613e604df0cd 002cf0dfa201e Author: Stephen Boyd Date: Mon Jul 1 13:21:07 2024 -0700 Merge tag 'sunxi-clk-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner SoC clk driver updates from Chen-Yu Tsai: - Remove unused 'struct gates_data' from old sunxi driver library - Add missing MODULE_DESCRIPTION() macros for sunxi-ng drivers - Add GPADC clock and reset for H616 * tag 'sunxi-clk-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: h616: Add clock/reset for GPADC dt-bindings: clock: sun50i-h616-ccu: Add GPADC clocks clk: sunxi: Remove unused struct 'gates_data' clk: sunxi-ng: add missing MODULE_DESCRIPTION() macros commit d424c029af5e210b7211e20f5420431e84ef75c1 Merge: 1613e604df0cd befe87380e21f Author: Stephen Boyd Date: Mon Jul 1 13:12:24 2024 -0700 Merge tag 'clk-meson-v6.11-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clock driver updates from Jerome Brunet: - Minor S4 clock fixes - DT bindings Yaml conversion of the AXG audio controller - C3 clock controllers support - Flag added to skip init of already enabled PLLs and avoid relocking - A1 DT bindings updates for system pll support - Add missing MODULE_DESCRIPTION where necessary. * tag 'clk-meson-v6.11-1' of https://github.com/BayLibre/clk-meson: clk: meson: add missing MODULE_DESCRIPTION() macros dt-bindings: clock: meson: a1: peripherals: support sys_pll input dt-bindings: clock: meson: a1: pll: introduce new syspll bindings clk: meson: add 'NOINIT_ENABLED' flag to eliminate init for enabled PLL clk: meson: c3: add c3 clock peripherals controller driver clk: meson: c3: add support for the C3 SoC PLL clock dt-bindings: clock: add Amlogic C3 peripherals clock controller dt-bindings: clock: add Amlogic C3 SCMI clock controller support dt-bindings: clock: add Amlogic C3 PLL clock controller dt-bindings: clock: meson: Convert axg-audio-clkc to YAML format clk: meson: s4: fix pwm_j_div parent clock clk: meson: s4: fix fixed_pll_dco clock commit f340f2bad1c790d2759680b7df853f548e7beadc Author: Marek Olšák Date: Sat Jun 1 14:31:39 2024 -0400 drm/amdgpu: rewrite convert_tiling_flags_to_modifier_gfx12 There were multiple bugs, like checking SWIZZLE_MODE before checking GFX12_SWIZZLE_MODE, which has undefined behavior. The function had no effect before (it always returned -EINVAL). Signed-off-by: Marek Olšák Acked-by: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ca280d291967dee97ad4340e1c68084c702d2b3c Author: Pierre-Eric Pelloux-Prayer Date: Tue Jun 25 14:31:34 2024 +0200 drm/radeon: check bo_va->bo is non-NULL before using it The call to radeon_vm_clear_freed might clear bo_va->bo, so we have to check it before dereferencing it. Signed-off-by: Pierre-Eric Pelloux-Prayer Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 62ec7d38b769ccf33b1080e69c2ae5b7344d116d Author: Lijo Lazar Date: Mon Jun 24 13:33:16 2024 +0530 drm/amdkfd: Use device based logging for errors Convert some pr_* to some dev_* APIs to identify the device. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d3dbccacfd2d47a73e2bb6f9be45a116de94cef3 Author: Hawking Zhang Date: Fri Jun 28 16:50:56 2024 +0800 drm/amdgpu: Fix hbm stack id in boot error report To align with firmware, hbm id field 0x1 refers to hbm stack 0, 0x2 refers to hbm statck 1. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 0d3157d04d9cafd54f32b68366f0fa227076aa0d Author: Marek Olšák Date: Sat Jun 1 15:05:20 2024 -0400 drm/amdgpu: add amdgpu_framebuffer::gfx12_dcc amdgpu_framebuffer doesn't have tiling_flags, so we need this. amdgpu_display_get_fb_info never gets NULL parameters, so checking for NULL was useless. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cc6e00a6c4f6504b61a11154f15140cf85b5980d Author: Marek Olšák Date: Wed Jun 26 14:01:33 2024 -0400 drm/amdgpu/display: add all gfx12 modifiers Signed-off-by: Marek Olšák Acked-by: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ce7985fd94a0eff154e13913e4ca553aa09e1097 Author: Marek Olšák Date: Sat Jun 1 16:37:22 2024 -0400 drm/amdgpu/display: set plane attributes for gfx12 correctly It used gfx9 flags, which has undefined behavior on gfx12. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ed17b63e7e25f03b40db66a8d5802b89aac40441 Author: Marek Olšák Date: Sat Jun 1 19:59:34 2024 -0400 drm/amdgpu/display: handle gfx12 in amdgpu_dm_plane_format_mod_supported All this code has undefined behavior on GFX12 and shouldn't be executed. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8dd1426e2c80e32ac1995007330c8f95ffa28ebb Author: Marek Olšák Date: Sat Jun 1 19:53:01 2024 -0400 drm/amdgpu: handle gfx12 in amdgpu_display_verify_sizes It verified GFX9-11 swizzle modes on GFX12, which has undefined behavior. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c2fad7317441be573175c4d98b28347ddec7fe77 Author: Hawking Zhang Date: Fri Jun 28 16:47:36 2024 +0800 drm/amdgpu: Correct register used to clear fault status Driver should write to fault_cntl registers to do one-shot address/status clear. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fd536d2e12d6fd8e6b199c343aa6475fa969ed99 Author: Marek Olšák Date: Sat Jun 1 17:25:51 2024 -0400 drm/amdgpu: don't use amdgpu_lookup_format_info on gfx12 It only uses fields for GFX9-11 related to the separate DCC buffer, which doesn't exist in GFX12. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f21373802da4e8c4fcf8acab60d98af307294b87 Author: Marek Olšák Date: Sat Jun 1 14:36:41 2024 -0400 drm/amdgpu/display: handle gfx12 in dm_check_cursor_fb Checking SWIZZLE_MODE has undefined behavior on gfx12. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8d9ffd15ff5c9da7bc6171f2536aaaff40bcab6e Author: Marek Olšák Date: Sat Jun 1 14:56:16 2024 -0400 drm/amdgpu: remove AMD_FMT_MOD_GFX12_DCC_MAX_COMPRESSED_BLOCK_* definitions They were added accidentally. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 30fb9cad6fbbd9d23d2d0ff7be8c59ce39b882bc Author: Marek Olšák Date: Fri May 31 19:48:05 2024 -0400 drm/amdgpu/gfx12: remove GDS leftovers GDS doesn't exist in gfx12. The incomplete packet allows userspace to hang the hw from the kernel. Signed-off-by: Marek Olšák Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e5f6bfe4025f881c17ae1829d76b19efcb353c81 Author: Marek Olšák Date: Fri May 31 19:38:18 2024 -0400 drm/amdgpu/gfx12: remove superfluous cache flags If any INV flags are needed, they should be executed via ACQUIRE_MEM before INDIRECT_BUFFER. GLM flags are also removed because the hw ignores them. Signed-off-by: Marek Olšák Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b16ec6300fc5c74f12622fca7de0255f7016b675 Author: Marek Olšák Date: Fri May 31 19:38:18 2024 -0400 drm/amdgpu/gfx11: remove superfluous cache flags If any INV flags are needed, they should be executed via ACQUIRE_MEM before INDIRECT_BUFFER. Signed-off-by: Marek Olšák Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 11317d2963fa79767cd7c6231a00a9d77f2e0f54 Author: Marek Olšák Date: Sat Jun 1 16:36:27 2024 -0400 drm/amdgpu: check for LINEAR_ALIGNED correctly in check_tiling_flags_gfx6 Fix incorrect check. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 230806dddc2601e58073740b74bf85a03d12ba53 Author: Aric Cyr Date: Sun Jun 23 16:45:28 2024 -0400 drm/amd/display: 3.2.291 * FW Release 0.0.224.0 * Fix bw issue for dcn351 * Fix FAMS2 logic issue for dcn401 * Fix Coverity issues * Fix cursor issues * Refactor dio sources Acked-by: Rodrigo Siqueira Signed-off-by: Jerry Zuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ef37ff38d01a616a670019330190ce1817df887 Author: Roman Li Date: Wed Jun 26 14:08:41 2024 -0400 drm/amd/display: Fix array-index-out-of-bounds in dml2/FCLKChangeSupport [Why] Potential out of bounds access in dml2_calculate_rq_and_dlg_params() because the value of out_lowest_state_idx used as an index for FCLKChangeSupport array can be greater than 1. [How] Currently dml2 core specifies identical values for all FCLKChangeSupport elements. Always use index 0 in the condition to avoid out of bounds access. Acked-by: Rodrigo Siqueira Signed-off-by: Jerry Zuo Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 882643a95fe60c23a70917f97ac0781e92c583dc Author: Fangzhi Zuo Date: Wed Jun 26 14:07:49 2024 -0400 drm/amd/display: Update efficiency bandwidth for dcn351 Fix 4k240 underflow on dcn351 Acked-by: Rodrigo Siqueira Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a638b837d0e6052678a686d42018271042e38408 Author: Tom Chung Date: Fri Jun 14 15:38:56 2024 +0800 drm/amd/display: Fix refresh rate range for some panel [Why] Some of the panels does not have the refresh rate range info in base EDID and only have the refresh rate range info in DisplayID block. It will cause the max/min freesync refresh rate set to 0. [How] Try to parse the refresh rate range info from DisplayID if the max/min refresh rate is 0. Reviewed-by: Sun peng Li Signed-off-by: Jerry Zuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ff3ba3e769361ebc22e59c76b18bc67427b541f Author: Xi (Alex) Liu Date: Wed Jun 12 12:45:19 2024 -0400 drm/amd/display: replace CRTC disable function call [Why] In OTG disable workarund, CRTC is disabled immediately to improve performance, but this may cause timing issue in DP HPO encoder FIFO and result in blank CRCs. [How] Replace the immediate CRTC disable call with normal disable call Reviewed-by: Nicholas Kazlauskas Signed-off-by: Jerry Zuo Signed-off-by: Xi (Alex) Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d19deabe5a4566851f6ecade5ebd2e63c3248cf2 Author: Bhuvanachandra Pinninti Date: Thu Jun 20 17:54:23 2024 +0530 drm/amd/display: Move dio files into dio folder [why] Refactor the code of dio to unit test. [how] Moved files to respective folders and changed cMakeLists and makefiles. Acked-by: Rodrigo Siqueira Signed-off-by: Jerry Zuo Signed-off-by: Bhuvanachandra Pinninti Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 057638597a9819e53fb2dcfb292c76c21c6140f5 Author: Alvin Lee Date: Thu Jun 20 15:11:38 2024 -0400 drm/amd/display: Account for cursor prefetch BW in DML1 mode support [Description] We need to ensure to take into account cursor prefetch BW in mode support or we may pass ModeQuery but fail an actual flip which will cause a hang. Flip may fail because the cursor_pre_bw is populated during mode programming (and mode programming is never called prior to ModeQuery). Reviewed-by: Chaitanya Dhere Reviewed-by: Nevenko Stupar Signed-off-by: Jerry Zuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b6d508533fa1371d870628a88b74c831c5881cde Author: Wenjing Liu Date: Mon Jun 17 12:58:35 2024 -0400 drm/amd/display: fix a crash when clock source is reference for non otg master pipe [why] The function enumerates all pipes without checking pipe type. It is only supposed to call program pixel clock for OTG master pipe only. Reviewed-by: Alvin Lee Signed-off-by: Jerry Zuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d6d884b68ad65c832be5ba22ac61dc7173059d9a Author: Fangzhi Zuo Date: Thu Jun 20 11:27:39 2024 -0400 drm/amd/display: Fix dmub timeout after fams2 enabled Reset fams stream count upon stream removal, otherwise fams2 state machine in dmub will get corrupted. Reviewed-by: Dillon Varone Signed-off-by: Jerry Zuo Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ea04ef19ebdcd22e8a21054a19c2c8fefae011ce Author: Nicholas Kazlauskas Date: Mon Jun 17 15:45:51 2024 -0400 drm/amd/display: Add debug option for disabling SLDO optimizations [Why] DM can hook this up to disable SLDO optimizations in firmware during DMCUB initialization for debug purposes. [How] Add the option and pass it through dmub_srv. Reviewed-by: Hansen Dsouza Signed-off-by: Jerry Zuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fe4b8c98dd1fcfab6e6c18bbc0f0f31a64bba7a5 Author: Paul Hsieh Date: Thu Jun 20 17:09:25 2024 +0800 drm/amd/display: un-block 8k with single dimm [Why] Driver doesn't validate multi-display with scaling when OS calls DDI. This behavior causes the validated result to be a mismatch between some automated test cases. To address this issue, some workaround was added that caused issues in 8k. [How] Since the origin issue had been root caused, revert the previous workaround and unblock 8k with a single dimm. Reviewed-by: Aric Cyr Signed-off-by: Jerry Zuo Signed-off-by: Paul Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d12b17e43aacc6a4a462f0918637b4097b72cf56 Author: Ryan Seto Date: Thu Jun 20 13:40:43 2024 -0400 drm/amd/display: Add available bandwidth calculation for audio [Why] Audio for 8K 240Hz monitor was not available when it should be [How] Added calculation based on stream state Co-developed-by: Ryan Seto Reviewed-by: George Shen Signed-off-by: Jerry Zuo Signed-off-by: Ryan Seto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e96b0420988a4b43adb8a5bb5b131f00a803092d Merge: 1613e604df0cd c7e58843d1e49 Author: Stephen Boyd Date: Mon Jul 1 13:08:15 2024 -0700 Merge tag 'renesas-clk-for-v6.11-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: - Remove obsolete clock DT binding header files - Add Battery Backup (VBATTB) and I2C clocks, resets, and power domains on RZ/G3S - Add audio clocks on R-Car V4M - Add video capture (ISPCS, CSI-2, VIN) clocks on R-Car V4M - Miscellaneous fixes and improvements * tag 'renesas-clk-for-v6.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r9a08g045: Add clock, reset and power domain support for I2C clk: renesas: r8a779h0: Add Audio clocks clk: renesas: r9a08g045: Add clock, reset and power domain support for the VBATTB IP dt-bindings: clock: rcar-gen2: Remove obsolete header files dt-bindings: clock: r8a7779: Remove duplicate newline clk: renesas: Drop "Renesas" from individual driver descriptions clk: renesas: r8a779h0: Fix PLL2/PLL4 multipliers in comments clk: renesas: r8a779h0: Add VIN clocks dt-bindings: clock: renesas,rzg2l-cpg: Update description for #reset-cells clk: renesas: rcar-gen2: Use DEFINE_SPINLOCK() for static spinlock clk: renesas: cpg-lib: Use DEFINE_SPINLOCK() for global spinlock clk: renesas: r8a77970: Use common cpg_lock clk: renesas: r8a779h0: Add CSI-2 clocks clk: renesas: r8a779h0: Add ISPCS clocks commit 9023ec5d55f3991aaa76f3c87a6fc4552e776172 Author: Tom Chung Date: Wed Jun 19 14:03:55 2024 +0800 drm/amd/display: Add refresh rate range check [Why] We only enable the VRR while monitor usable refresh rate range is greater than 10 Hz. But we did not check the range in DRM_EDID_FEATURE_CONTINUOUS_FREQ case. [How] Add a refresh rate range check before set the freesync_capable flag in DRM_EDID_FEATURE_CONTINUOUS_FREQ case. Reviewed-by: Mario Limonciello Reviewed-by: Rodrigo Siqueira Signed-off-by: Jerry Zuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit aa08d1143890ead78d28a5286fd53b45907743fc Author: Dillon Varone Date: Wed Jun 19 10:05:12 2024 -0400 drm/amd/display: Cleanup dce_get_dp_ref_freq_khz [WHY&HOW] Cleanup unnecessary code pathes as compile guards were added and removed overtime. Reviewed-by: Alvin Lee Signed-off-by: Jerry Zuo Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ea79068d4073bf303f8203f2625af7d9185a1bc6 Author: Alex Hung Date: Tue Jun 18 16:19:48 2024 -0600 drm/amd/display: Check denominator crb_pipes before used [WHAT & HOW] A denominator cannot be 0, and is checked before used. This fixes 2 DIVIDE_BY_ZERO issues reported by Coverity. Reviewed-by: Harry Wentland Signed-off-by: Jerry Zuo Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 116a678f3a9abc24f5c9d2525b7393d18d9eb58e Author: Alex Hung Date: Tue Jun 18 16:21:20 2024 -0600 drm/amd/display: Check denominator pbn_div before used [WHAT & HOW] A denominator cannot be 0, and is checked before used. This fixes 1 DIVIDE_BY_ZERO issue reported by Coverity. Reviewed-by: Harry Wentland Signed-off-by: Jerry Zuo Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cbe9d7c1d25ef6da67c9bf19eb02760632857f13 Author: Nevenko Stupar Date: Wed Jun 19 16:08:41 2024 -0400 drm/amd/display: Adjust cursor visibility between MPC slices [Why & How] When MPC enabled, need to adjust x and hot spot x position on one pipe when the cursor is between MPC slices i.e. when the cursor is moving from one MPC slice to next slice, while whole cursor size is not contained within one pipe, to make part of the cursor to be visible on the other pipe. Reviewed-by: Sridevi Arvindekar Signed-off-by: Jerry Zuo Signed-off-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3269d6fb7580e91313f40dffcff70c01cd3f0717 Author: Sherry Wang Date: Thu Jun 6 16:51:43 2024 +0800 drm/amd/display: Skip unnecessary abm disable [Why] We try to disable abm immediately when it's being gradually disabled, which causes backlight ramping being paused in the middle [How] Don't disable abm immediately if abm has been or is being disabled through set_abm_level path Reviewed-by: Anthony Koo Signed-off-by: Jerry Zuo Signed-off-by: Sherry Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bbd0d1c942cbac87404ed2bca0aa4f7907b8f47f Author: Alex Hung Date: Fri Jun 7 22:09:53 2024 -0600 drm/amd/display: Fix possible overflow in integer multiplication [WHAT & HOW] Integer multiplies integer may overflow in context that expects an expression of unsigned/siged long long (64 bits). This can be fixed by casting integer to unsigned/siged long long to force 64 bits results. This fixes 26 OVERFLOW_BEFORE_WIDEN issues reported by Coverity. Reviewed-by: Harry Wentland Signed-off-by: Jerry Zuo Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 95134e5852978a92d2290a3b1ee93189e75507ac Author: George Shen Date: Mon Jun 17 16:32:15 2024 -0400 drm/amd/display: Add ASIC cap to limit DCC surface width [Why] Certain configurations of DCN401 require ODM4:1 to support DCC for 10K surfaces. DCC should be conservatively disabled in those cases. The issue is that current logic limits 10K surface DCC for all configurations of DCN401. [How] Add DC ASIC cap to indicate max surface width that can support DCC. Disable DCC if this ASIC cap is non-zero and surface width exceeds it. Reviewed-by: Jun Lei Signed-off-by: Jerry Zuo Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 02b438afc63b79490abb3ce82acfd6b49b88b34e Author: Teeger Date: Wed Jun 19 09:26:40 2024 -0400 drm/amd/display: Revert Add workaround to restrict max frac urgent for DPM0 This reverts commit 871512e36f9c1c2cb4e62eb860ca0438800e4d63 due to multiple issues found. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Jerry Zuo Signed-off-by: Teeger Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 73b8a388eb0c1328dab1161e42eed3d7b507764b Author: Sung Joon Kim Date: Fri Jun 14 19:14:31 2024 -0400 drm/amd/display: Choose HUBP unbounded request based on DML output [why] Previously, we decide on the unbounded request purely based on pipe_cnt which is a wrong variable to use to determine how many pipes are in "use". DML already accounts for number of pipes in use along with other various factors and is a more reliable method of determination. [how] Use UnboundedRequestEnabledThisState to decide on unbounbded_req_enabled. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Jerry Zuo Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 032831f223bce58e2fea9542cade0ae9789dc378 Author: Joshua Aberback Date: Mon Jun 17 15:22:44 2024 -0400 drm/amd/display: Remove unnecessary error message [Why] This error message is unnecessary because returning when aconnector is uninitialized is the desired outcome during initialization. As well, there is no equivalent error message for read_dpcd. Reviewed-by: Aurabindo Pillai Signed-off-by: Jerry Zuo Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ac01f6ad710c41c8c2cfab24be8bb71586bf8c44 Author: George Shen Date: Fri Jun 14 21:13:43 2024 -0400 drm/amd/display: Fix divide by zero in CURSOR_DST_X_OFFSET calculation [Why] Certain situations cause pipes to have a recout of 0, such as when the dst_rect lies completely outside of a given ODM slice. [How] Skip calculation that transforms cursor coordinates to viewport space. Reviewed-by: Alvin Lee Signed-off-by: Jerry Zuo Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit eb6dfbb7a9c67c7d9bcdb9f9b9131270e2144e3d Author: Tom Chung Date: Mon Jun 17 15:59:06 2024 +0800 drm/amd/display: Reset freesync config before update new state [Why] Sometimes the new_crtc_state->vrr_infopacket did not sync up with the current state. It will affect the update_freesync_state_on_stream() does not update the state correctly. [How] Reset the freesync config before get_freesync_config_for_crtc() to make sure we have the correct new_crtc_state for VRR. Reviewed-by: Sun peng Li Signed-off-by: Jerry Zuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 21ba615af622a6bded6931499bb28a31749c840b Author: Anthony Koo Date: Sat Jun 15 12:51:44 2024 -0400 drm/amd/display: Add replay state entry to replay_state - Add new Replay states 2A (initial Replay entry) and 4E (frame update) to check is there is new frame update before sending Acked-by: Rodrigo Siqueira Signed-off-by: Jerry Zuo Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b73581329adb9e8105277a463a4d1801868b22e7 Author: Alex Deucher Date: Wed Jun 26 17:35:41 2024 -0400 drm/amd/display: use vmalloc for struct dc_state This is a big structure so use vmalloc as malloc can fail when there is memory pressure. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3454 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 5f82c1e04721e7cd98e604eb4e58f0724d8e5a65 Author: Dmitry Torokhov Date: Thu Jun 6 23:02:48 2024 -0700 Input: elan_i2c - do not leave interrupt disabled on suspend failure Make sure interrupts are not left disabled when we fail to suspend the touch controller. Fixes: 6696777c6506 ("Input: add driver for Elan I2C/SMbus touchpad") Link: https://lore.kernel.org/r/ZmKiiL-1wzKrhqBj@google.com Signed-off-by: Dmitry Torokhov commit 765d3a2aa195882e231835f5d9ac4d99affc8c07 Author: Krzysztof Kozlowski Date: Fri Jun 28 11:58:31 2024 +0200 ASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_err The 'wsa->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240628095831.207942-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 2e068fe01ecbf677d414d4c1b02eea1636dd614c Author: Krzysztof Kozlowski Date: Fri Jun 28 11:58:30 2024 +0200 ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err The 'rx->dev' is assigned closer to the end of the probe() function, so the dev_err() must not use it - it is still NULL at this point. Instead there is already a local 'dev' variable. Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240628095831.207942-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit f1afb360b6f1f49e943ac85b26d4224ec67d22d3 Author: Nathan Chancellor Date: Mon Jul 1 11:26:38 2024 -0700 ASoC: fsl: lpc3xxx-i2s: Include bitfield.h for FIELD_PREP bitfield.h is not explicitly included but it is required for FIELD_PREP to be expanded by the preprocessor. If it is not implicitly included, there will be a compiler error (as seen with ARCH=hexagon allmodconfig): sound/soc/fsl/lpc3xxx-i2s.c:169:10: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 169 | tmp |= LPC3XXX_I2S_WW8 | LPC3XXX_I2S_WS_HP(LPC3XXX_I2S_WW8_HP); | ^ sound/soc/fsl/lpc3xxx-i2s.h:42:30: note: expanded from macro 'LPC3XXX_I2S_WW8' 42 | #define LPC3XXX_I2S_WW8 FIELD_PREP(0x3, 0) /* Word width is 8bit */ | ^ sound/soc/fsl/lpc3xxx-i2s.c:205:34: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 205 | LPC3XXX_I2S_DMA1_TX_EN | LPC3XXX_I2S_DMA0_TX_DEPTH(4)); | ^ sound/soc/fsl/lpc3xxx-i2s.h:65:38: note: expanded from macro 'LPC3XXX_I2S_DMA0_TX_DEPTH' 65 | #define LPC3XXX_I2S_DMA0_TX_DEPTH(s) FIELD_PREP(0xF0000, s) /* Set the DMA1 TX Request level */ | ^ sound/soc/fsl/lpc3xxx-i2s.c:210:34: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 210 | LPC3XXX_I2S_DMA0_RX_EN | LPC3XXX_I2S_DMA1_RX_DEPTH(4)); | ^ sound/soc/fsl/lpc3xxx-i2s.h:70:38: note: expanded from macro 'LPC3XXX_I2S_DMA1_RX_DEPTH' 70 | #define LPC3XXX_I2S_DMA1_RX_DEPTH(s) FIELD_PREP(0x700, s) /* Set the DMA1 RX Request level */ | ^ Include bitfield.h explicitly, so that FIELD_PREP is always expanded, clearing up the compiler error. Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Nathan Chancellor Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-include-for-field_prep-v1-1-0c5d7f71921b@kernel.org Signed-off-by: Mark Brown commit 5344fc76f8944249026884157f846f88489edfc0 Author: Dinesh Karthikeyan Date: Tue Jun 25 09:52:17 2024 +0530 wifi: ath12k: Support TQM stats Add support to request pdev TQM stats from firmware through HTT stats type 6. This stat type gives information such as TQM error, MPDU related information and TQM pdev stats. Sample output: ------------- echo 6 > /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_TQM_ERROR_STATS_TLV: q_empty_failure = 0 q_not_empty_failure = 0 add_msdu_failure = 0 TQM_ERROR_RESET_STATS: tqm_cache_ctl_err = 0 tqm_soft_reset = 0 tqm_reset_total_num_in_use_link_descs = 0 ..... HTT_TX_TQM_GEN_MPDU_STATS_TLV: gen_mpdu_end_reason = 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, 14:0, 15:0, 16:0 HTT_TX_TQM_LIST_MPDU_STATS_TLV: list_mpdu_end_reason = 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 HTT_TX_TQM_LIST_MPDU_CNT_TLV_V: list_mpdu_cnt_hist = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 HTT_TX_TQM_PDEV_STATS_TLV_V: msdu_count = 0 mpdu_count = 0 remove_msdu = 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 Signed-off-by: Roopni Devanathan Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240625042217.1303332-4-quic_rdevanat@quicinc.com commit cf1187b3a683feb718a50ee19178dc6e90a73a64 Author: Dinesh Karthikeyan Date: Tue Jun 25 09:52:16 2024 +0530 wifi: ath12k: Support pdev error stats Add support to request pdev error stats from firmware through HTT stats type 5. This stats type gives information such as list of pdev errors, reasons for reset, logging information about recovery, drain and war stats. etc. Sample output: ------------- echo 5 > /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_HW_STATS_PDEV_ERRS_TLV: mac_id = 0 tx_abort = 0 tx_abort_fail_count = 0 rx_abort = 53 ..... PDEV_PHY_WARM_RESET_REASONS: phy_warm_reset_reason_phy_m3 = 0 phy_warm_reset_reason_tx_hw_stuck = 0 phy_warm_reset_reason_num_cca_rx_frame_stuck = 0 ..... WAL_RX_RECOVERY_STATS: wal_rx_recovery_rst_mac_hang_count = 0 wal_rx_recovery_rst_known_sig_count = 0 wal_rx_recovery_rst_no_rx_count = 0 ..... HTT_RX_DEST_DRAIN_STATS: rx_dest_drain_rx_descs_leak_prevention_done = 0 rx_dest_drain_rx_descs_saved_cnt = 0 rx_dest_drain_rxdma2reo_leak_detected = 0 ..... HTT_HW_STATS_INTR_MISC_TLV: hw_intr_name = AMPI mask = 0 count = 2 HTT_HW_STATS_WHAL_TX_TLV: mac_id = 0 last_unpause_ppdu_id = 0 hwsch_unpause_wait_tqm_write = 0 ..... HTT_HW_WAR_STATS_TLV: mac_id = 0 hw_war 0 = 0 hw_war 1 = 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 Signed-off-by: Roopni Devanathan Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240625042217.1303332-3-quic_rdevanat@quicinc.com commit 4b6dfc758c2f6ce61336637b22bc0db57fa6d649 Author: Dinesh Karthikeyan Date: Tue Jun 25 09:52:15 2024 +0530 wifi: ath12k: Support Transmit Scheduler stats Add support to request transmission scheduler stats from firmware through HTT stats type 4. This stat gives information such as pdev stats scheduled per transmission queue, transmission queue command posted and reaped, scheduler order, scheduler ineligibility and supercycle triggers. Sample output: ------------- echo 4 > /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_TX_SCHED_CMN_TLV: mac_id = 0 current_timestamp = 952546828 HTT_TX_PDEV_STATS_SCHED_PER_TXQ_TLV: mac_id = 0 txq_id = 14 sched_policy = 2 ..... HTT_SCHED_TXQ_CMD_POSTED_TLV: sched_cmd_posted = 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 HTT_SCHED_TXQ_CMD_REAPED_TLV: sched_cmd_reaped = 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 HTT_SCHED_TXQ_SCHED_ORDER_SU_TLV: sched_order_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, 14:0, 15:0, 16:0, 17:0, 18:0, 19:0 HTT_SCHED_TXQ_SCHED_INELIGIBILITY: sched_ineligibility = 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, 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 HTT_SCHED_TXQ_SUPERCYCLE_TRIGGER: supercycle_triggers = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6: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 Signed-off-by: Roopni Devanathan Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240625042217.1303332-2-quic_rdevanat@quicinc.com commit a9f2976f0e9ebc4a579cdd507b153a191692a72c Author: Ramya Gnanasekar Date: Thu Jun 27 19:37:02 2024 +0300 wifi: ath12k: Dump additional Tx PDEV HTT stats Support to dump additional Tx PDEV stats through HTT stats debugfs. Following stats dump are supported: 1. PDEV control path stat to dump Tx management frame count 2. Tx PDEV SIFS histogram stats 3. Tx MU MIMO PPDU stats for 802.11ac, 802.11ax and 802.11be Sample Output: --------------- echo 1 > /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_PDEV_STATS_CMN_TLV: mac_id = 0 comp_delivered = 0 self_triggers = 13 ...... ...... HTT_TX_PDEV_STATS_CTRL_PATH_TX_STATS: fw_tx_mgmt_subtype = 0:1, 1:0, 2:0, 3:0, 4:38, 5:0, 6:0, 7:0, 8:0, 9:0, 10:0, 11:1, 12:0, 13:7, 14:0, 15:0 HTT_TX_PDEV_STATS_SIFS_HIST_TLV: sifs_hist_status = 0:237, 1:185, 2:1, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 HTT_TX_PDEV_AC_MU_PPDU_DISTRIBUTION_STATS: ac_mu_mimo_num_seq_posted_nr4 = 0 ac_mu_mimo_num_ppdu_posted_per_burst_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ac_mu_mimo_num_ppdu_completed_per_burst_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ac_mu_mimo_num_seq_term_status_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0 ac_mu_mimo_num_seq_posted_nr8 = 0 ac_mu_mimo_num_ppdu_posted_per_burst_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ac_mu_mimo_num_ppdu_completed_per_burst_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ac_mu_mimo_num_seq_term_status_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0 HTT_TX_PDEV_AX_MU_PPDU_DISTRIBUTION_STATS: ax_mu_mimo_num_seq_posted_nr4 = 0 ax_mu_mimo_num_ppdu_posted_per_burst_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ax_mu_mimo_num_ppdu_completed_per_burst_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ax_mu_mimo_num_seq_term_status_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0 ax_mu_mimo_num_seq_posted_nr8 = 0 ax_mu_mimo_num_ppdu_posted_per_burst_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ax_mu_mimo_num_ppdu_completed_per_burst_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 ax_mu_mimo_num_seq_term_status_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0 HTT_TX_PDEV_BE_MU_PPDU_DISTRIBUTION_STATS: be_mu_mimo_num_seq_posted_nr4 = 0 be_mu_mimo_num_ppdu_posted_per_burst_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 be_mu_mimo_num_ppdu_completed_per_burst_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 be_mu_mimo_num_seq_term_status_nr4 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0 be_mu_mimo_num_seq_posted_nr8 = 0 be_mu_mimo_num_ppdu_posted_per_burst_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 be_mu_mimo_num_ppdu_completed_per_burst_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0 be_mu_mimo_num_seq_term_status_nr8 = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8: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.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Ramya Gnanasekar Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240626085854.2500681-5-quic_rgnanase@quicinc.com commit adf6df963c0325c6f3848ade1b73d2afc4948351 Author: Dinesh Karthikeyan Date: Thu Jun 27 19:36:56 2024 +0300 wifi: ath12k: Add support to parse requested stats_type Add extended htt stats parser and print the corresponding TLVs associated with the requested htt_stats_type. Add support for TX PDEV related htt stats. Sample output: -------------- echo 1 > /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_PDEV_STATS_CMN_TLV: mac_id = 0 comp_delivered = 0 self_triggers = 256 hw_queued = 275 hw_reaped = 275 underrun = 241 hw_paused = 0 hw_flush = 0 hw_filt = 1 tx_abort = 0 ppdu_ok = 246 mpdu_requeued = 0 tx_xretry = 0 data_rc = 3 mpdu_dropped_xretry = 0 illegal_rate_phy_err = 0 cont_xretry = 0 tx_timeout = 0 tx_time_dur_data = 0 pdev_resets = 0 phy_underrun = 0 txop_ovf = 0 seq_posted = 247 seq_failed_queueing = 0 seq_completed = 247 seq_restarted = 0 seq_txop_repost_stop = 0 next_seq_cancel = 0 dl_mu_mimo_seq_posted = 0 dl_mu_ofdma_seq_posted = 0 ul_mu_mimo_seq_posted = 0 ul_mu_ofdma_seq_posted = 0 mu_mimo_peer_blacklisted = 0 seq_qdepth_repost_stop = 0 seq_min_msdu_repost_stop = 0 mu_seq_min_msdu_repost_stop = 0 seq_switch_hw_paused = 0 next_seq_posted_dsr = 0 seq_posted_isr = 0 seq_ctrl_cached = 0 mpdu_count_tqm = 0 msdu_count_tqm = 0 mpdu_removed_tqm = 0 msdu_removed_tqm = 0 remove_mpdus_max_retries = 0 mpdus_sw_flush = 0 mpdus_hw_filter = 0 mpdus_truncated = 0 mpdus_ack_failed = 0 mpdus_expired = 0 mpdus_seq_hw_retry = 0 ack_tlv_proc = 0 coex_abort_mpdu_cnt_valid = 0 coex_abort_mpdu_cnt = 5 num_total_ppdus_tried_ota = 5 num_data_ppdus_tried_ota = 0 local_ctrl_mgmt_enqued = 247 local_ctrl_mgmt_freed = 247 local_data_enqued = 0 local_data_freed = 0 mpdu_tried = 0 isr_wait_seq_posted = 0 tx_active_dur_us_low = 0 tx_active_dur_us_high = 0 fes_offsets_err_cnt = 0 HTT_TX_PDEV_STATS_URRN_TLV: urrn_stats = 0:0, 1:241, 2:0 HTT_TX_PDEV_STATS_SIFS_TLV: sifs_status = 0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0 HTT_TX_PDEV_STATS_FLUSH_TLV: flush_errs = 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, 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, 38:0, 39:0, 40:0, 41:0, 42:0, 43:0, 44:0, 45:0, 46:0, 47:0, 48:0, 49:0, 50:0, 51:0, 52:0, 53:0, 54:0, 55:0, 56:0, 57:0, 58:0, 59:0, 60:0, 61:0, 62:0, 63:0, 64:0, 65:0, 66:0, 67:0, 68:0, 69:0, 70:0, 71:0, 72:0, 73:0, 74:0, 75:0, 76:0, 77:0, 78:0, 79:0, 80:0, 81:0, 82:0, 83:0, 84:0, 85:0, 86:0, 87:0, 88:0, 89:0, 90:0, 91:0, 92:0, 93:0, 94:0, 95:0, 96:0, 97:0, 98:0, 99:0, 100:0, 101:0, 102:0, 103:0, 104:0, 105:0, 106:0, 107:0, 108:0, 109:0, 110:0, 111:0, 112:0, 113:0, 114:0, 115:0, 116:0, 117:0, 118:0, 119:0, 120:0, 121:0, 122:0, 123:0, 124:0, 125:0, 126:0, 127: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.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Dinesh Karthikeyan Co-developed-by: Ramya Gnanasekar Signed-off-by: Ramya Gnanasekar Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240626085854.2500681-4-quic_rgnanase@quicinc.com commit ad201b35d3ec48d81da6c873b9a50586afd8defa Author: Dinesh Karthikeyan Date: Thu Jun 27 19:36:50 2024 +0300 wifi: ath12k: Add htt_stats_dump file ops support Add dump_htt_stats file operation to dump the stats value requested for the requested stats_type. Stats sent from firmware will be cumulative. Hence add debugfs to reset the requested stats type. Example with one ath12k device: ath12k `-- pci-0000:06:00.0 |-- mac0 `-- htt_stats |-- htt_stats_type |-- htt_stats_reset 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: Dinesh Karthikeyan Co-developed-by: Ramya Gnanasekar Signed-off-by: Ramya Gnanasekar Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240626085854.2500681-3-quic_rgnanase@quicinc.com commit 3f73c24f28b317f22df7870c25ff82f1d625c6c2 Author: Dinesh Karthikeyan Date: Wed Jun 26 14:28:51 2024 +0530 wifi: ath12k: Add support to enable debugfs_htt_stats Create debugfs_htt_stats file when ath12k debugfs support is enabled. Add basic ath12k_debugfs_htt_stats_register and handle htt_stats_type file operations. 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: Dinesh Karthikeyan Co-developed-by: Ramya Gnanasekar Signed-off-by: Ramya Gnanasekar Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240626085854.2500681-2-quic_rgnanase@quicinc.com commit 3587914bf61df7924933530353d840378cdc4973 Author: AngeloGioacchino Del Regno Date: Tue Jun 4 14:30:07 2024 +0200 iio: adc: Add support for MediaTek MT6357/8/9 Auxiliary ADC Add a driver to support reading the Auxiliary ADC IP found in the MediaTek MT6357, MT6358 and MT6359 Power Management ICs, featuring a different register layout, configuration reset and ADC reading sequence from the other already supported MediaTek SoC or PMIC (aux)ADC HW. This driver provides multiple ADC channels for system monitoring, such as battery voltage, PMIC temperature, PMIC-internal voltage regulators temperature, and others. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20240604123008.327424-5-angelogioacchino.delregno@collabora.com Signed-off-by: Jonathan Cameron commit e38a82df2c9924577d39ce5ccee9e9edcadc3b5d Author: AngeloGioacchino Del Regno Date: Tue Jun 4 14:30:06 2024 +0200 math.h: Add unsigned 8 bits fractional numbers type Some users may be requiring only rather small numbers as both numerator and denominator: add signed and unsigned 8 bits structs {s8,u8}_fract. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20240604123008.327424-4-angelogioacchino.delregno@collabora.com Signed-off-by: Jonathan Cameron commit 4d8aa430624006ba06254aa607f8756a75e42c8d Author: AngeloGioacchino Del Regno Date: Tue Jun 4 14:30:04 2024 +0200 dt-bindings: iio: adc: Add MediaTek MT6359 PMIC AUXADC Add a new binding for the MT6350 Series (MT6357/8/9) PMIC AUXADC, providing various ADC channels for both internal temperatures and voltages, audio accessory detection (hp/mic/hp+mic and buttons, usually on a 3.5mm jack) other than some basic battery statistics on boards where the battery is managed by this PMIC. Also add the necessary dt-binding headers for devicetree consumers. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://patch.msgid.link/20240604123008.327424-2-angelogioacchino.delregno@collabora.com Signed-off-by: Jonathan Cameron commit 2d46ecc958c9cb7b0f116aa52cf9296b6c71d784 Author: Ashutosh Dixit Date: Thu Jun 27 22:21:25 2024 -0700 drm/xe/oa: Destroy the stream_lock mutex The mutex allocated in xe_oa_stream_init() was never previously destroyed. Do so now. Fixes: e936f885f1e9 ("drm/xe/oa/uapi: Expose OA stream fd") Cc: Michal Wajdeczko Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20240628052125.1847989-1-ashutosh.dixit@intel.com commit cfff1997aafa25ea98c2ceb7251642276745266a Author: Christophe JAILLET Date: Sat Jun 29 08:58:42 2024 +0200 ACPI: PMIC: Constify struct pmic_table 'struct pmic_table' 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 3811 786 0 4597 11f5 drivers/acpi/pmic/intel_pmic_xpower.o text data bss dec hex filename 4147 450 0 4597 11f5 drivers/acpi/pmic/intel_pmic_xpower.o Signed-off-by: Christophe JAILLET Link: https://patch.msgid.link/a6c9b1bcdf259adabbcaf91183d3f5ab87a98600.1719644292.git.christophe.jaillet@wanadoo.fr Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 7dc10eff223b0e9fed5d48159820556a576be592 Author: Lucas De Marchi Date: Fri Jun 28 09:17:26 2024 -0700 drm/xe/rtp: Fix out-of-bounds array access Increment the counter before checking for number of rules, otherwise when there's no XE_RTP_MATCH_OR an out-of-bounds access is done, as reported by kasan: BUG: KASAN: global-out-of-bounds in rule_matches+0xb6d/0x11c0 [xe] Read of size 1 at addr ffffffffa0a50b70 by task systemd-udevd/243 Fixes: dc72c52a42e0 ("drm/xe/rtp: Allow to OR rules") Cc: Mika Kuoppala Reviewed-by: Rodrigo Vivi Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240628161726.836734-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 411220808ceeaf91b11a9fa9bc992d59568a7ee0 Author: Michal Wajdeczko Date: Mon Jul 1 12:27:37 2024 +0200 drm/xe/pf: Restart VFs provisioning after GT reset Any prior configurations pushed to the GuC are lost when the GT is reset. Push again all non-empty VF configurations to the GuC as part of the GuC reset procedure. This will also help restore early manual provisioning, when the PF was in the meantime suspended and then resumed. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240701102738.934-3-michal.wajdeczko@intel.com commit 234670cea9a2995554dad6e084e5e18b0bcd151d Author: Michal Wajdeczko Date: Mon Jul 1 12:27:36 2024 +0200 drm/xe/pf: Skip fair VFs provisioning if already provisioned Our debugfs allows to view and change VFs' provisioning configs. If we attempt to experiment with VFs provisioning before enabling them, this early config will affect fair provisioning calculations, and will also be overwritten, which is undesirable behavior. To improve this, check if the VFs configs are empty (unprovisioned) before starting the fair provisioning procedure. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240701102738.934-2-michal.wajdeczko@intel.com commit face1c543e89ebc657f7948b0541a76954cf9382 Author: Armin Wolf Date: Thu Jun 20 21:14:10 2024 +0200 ACPI: bus: Indicate support for battery charge limiting thru _OSC The ACPI battery driver can handle the "charge limiting" state of the battery, so the platform can advertise this state. Indicate this by setting bit 19 ("Battery Charge Limiting Support") when evaluating _OSC. Tested on a Lenovo Ideapad S145-14IWL. Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20240620191410.3646-2-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki commit 526294e1eb8e43bce5088806abeedeea31018641 Author: Armin Wolf Date: Thu Jun 20 21:14:09 2024 +0200 ACPI: battery: Add support for charge limiting state The ACPI specification says that bit 3 inside the battery state signals that the battery is in charge limiting state. In this state, the platform limits the battery from reaching its full capacity, the exact limit is platform-specific. This might explain why a number of batteries reported a "Unknown" battery state in the past when using platform-specific interfaces to stop battery charging at a user defined level. Unfortunately not all platforms set this bit in such cases, so "non-charging" is still the default state when the battery is neither charging, discharging or full. Tested on a Lenovo Ideapad S145-14IWL. Signed-off-by: Armin Wolf Link: https://patch.msgid.link/20240620191410.3646-1-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki commit 6c387fb263363347185bd7a213ad175c174d35dc Author: Kanak Shilledar Date: Mon Jul 1 17:43:52 2024 +0530 spi: dt-bindings: snps,dw-apb-ssi.yaml: update compatible property updated compatible property to include "thead,th1520-spi" for the TH1520 SoC SPI Controller. Signed-off-by: Kanak Shilledar Acked-by: Conor Dooley Link: https://patch.msgid.link/20240701121355.262259-3-kanakshilledar@gmail.com Signed-off-by: Mark Brown commit e9b854382c8df07385c778bd8b25c03442bfa9e2 Author: Dmitry Baryshkov Date: Wed Jun 26 22:12:38 2024 +0300 remoteproc: qcom: select AUXILIARY_BUS The QCOM_PD_MAPPER implementation made Qualcomm remoteproc drivers use auxiliary bus for the pd-mapper subdevice. Add necessary dependency. Reported-by: Mark Brown Fixes: 5b9f51b200dc ("remoteproc: qcom: enable in-kernel PD mapper") Signed-off-by: Dmitry Baryshkov Reviewed-by: Chris Lew Link: https://lore.kernel.org/r/20240626-qcom-pd-mapper-fix-deps-v1-2-644678dc4663@linaro.org Signed-off-by: Bjorn Andersson commit 4b20b07ce72f4bc7edd9c42e646314d06f30be59 Author: Christian Loehle Date: Sat Jun 29 09:22:48 2024 +0100 cpuidle: teo: Don't count non-existent intercepts When bailing out early, teo will not query the sleep length anymore since commit 6da8f9ba5a87 ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases") with an expected sleep_length_ns value of KTIME_MAX. This lead to state0 accumulating lots of 'intercepts' because the actually measured sleep length was < KTIME_MAX, so query the sleep length instead for teo to recognize if it still is in an intercept-likely scenario without alternating between the two modes. Fundamentally we can only do one of the two: 1. Skip sleep_length_ns query when we think intercept is likely. 2. Have accurate data if sleep_length_ns is actually intercepted when we believe it is currently intercepted. Previously teo did the former while this patch chooses the latter as the additional time it takes to query the sleep length was found to be negligible and the variants of option 1 (count all unknowns as misses or count all unknown as hits) had significant regressions (as misses had lots of too shallow idle state selections and as hits had terrible performance in intercept-heavy workloads). Fixes: 6da8f9ba5a87 ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases") Link: https://patch.msgid.link/c40acf72-010f-4a8b-80e4-33f133ba266b@arm.com Signed-off-by: Christian Loehle Signed-off-by: Rafael J. Wysocki commit b89c5bc72102469a87f0c6ec0ee7112ef2eba01f Author: Dmitry Baryshkov Date: Wed Jun 26 22:12:37 2024 +0300 soc: qcom: add missing pd-mapper dependencies The pd-mapper driver uses auxiliary bus and Qualcomm PDR message format data. Add missing dependencies to the driver's Kconfig entry. Reported-by: Mark Brown Fixes: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation") Signed-off-by: Dmitry Baryshkov Reviewed-by: Chris Lew Link: https://lore.kernel.org/r/20240626-qcom-pd-mapper-fix-deps-v1-1-644678dc4663@linaro.org Signed-off-by: Bjorn Andersson commit f4662e6d51ffc0826f975429d3c1b6d1f1a295f1 Author: Nathan Chancellor Date: Mon Jul 1 09:24:16 2024 -0700 ASoC: fsl: lpc3xxx-i2s: Avoid using ret uninitialized in lpc32xx_i2s_probe() clang points out that ret may be used uninitialized in lpc32xx_i2s_probe() in an error pointer path (which becomes fatal with CONFIG_WERROR): sound/soc/fsl/lpc3xxx-i2s.c:326:47: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] 326 | "failed to init register map: %d\n", ret); | ^~~ sound/soc/fsl/lpc3xxx-i2s.c:310:9: note: initialize the variable 'ret' to silence this warning 310 | int ret; | ^ | = 0 1 error generated. One solution would be a small refactoring of the second parameter in dev_err_probe(), PTR_ERR(i2s_info_p->regs), to be the value of ret in the if statement. However, a nicer solution for debugging purposes, which is the point of this statement, would be to use the '%pe' specifier to symbolically print the error pointer value. Do so, which eliminates the uninitialized use of ret, clearing up the warning. Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs") Signed-off-by: Nathan Chancellor Link: https://patch.msgid.link/20240701-lpc32xx-asoc-fix-uninitialized-ret-v1-1-985d86189739@kernel.org Signed-off-by: Mark Brown commit 4381b88b24a2edf9ce130adc9acd53258ba44116 Author: Animesh Agarwal Date: Thu Jun 27 16:20:26 2024 +0530 ASoC: dt-bindings: realtek,rt5677: Convert to dtschema Convert the RT5677 audio CODEC bindings to DT schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240627105030.14360-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit a8631f6d6344d976096b1efafdb2fbb3111bd790 Author: Richard Genoud Date: Fri Jun 21 17:00:55 2024 +0200 remoteproc: k3-r5: Fix IPC-only mode detection ret variable was used to test reset status, get from reset_control_status() call. But this variable was overwritten by ti_sci_proc_get_status() a few lines bellow. And as ti_sci_proc_get_status() returns 0 or a negative value (in this latter case, followed by a return), the expression !ret was always true, Clearly, this was not what was intended: In the comment above it's said that "requires both local and module resets to be deasserted"; if reset_control_status() returns 0 it means that the reset line is deasserted. So, it's pretty clear that the return value of reset_control_status() was intended to be used instead of ti_sci_proc_get_status() return value. This could lead in an incorrect IPC-only mode detection if reset line is asserted (so reset_control_status() return > 0) and c_state != 0 and halted == 0. In this case, the old code would have detected an IPC-only mode instead of a mismatched mode. Fixes: 1168af40b1ad ("remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs") Signed-off-by: Richard Genoud Reviewed-by: Hari Nagalla Link: https://lore.kernel.org/r/20240621150058.319524-2-richard.genoud@bootlin.com Signed-off-by: Mathieu Poirier commit 46800e38ef0e45a73839ded0347885ada2b4f7bb Author: Gavin Shan Date: Mon Jul 1 10:11:32 2024 +1000 arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU Both ACPI_PROCESSOR and HOTPLUG_CPU are needed by ACPI_HOTPLUG_CPU. Otherwise, we can have compiling error with the following configurations. CONFIG_HOTPLUG_CPU=n CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y arch/arm64/kernel/smp.c: In function ‘arch_unregister_cpu’: arch/arm64/kernel/smp.c:563:9: error: implicit declaration of \ function ‘unregister_cpu’; did you mean ‘register_cpu’? \ [-Werror=implicit-function-declaration] 563 | unregister_cpu(c); | ^~~~~~~~~~~~~~ | register_cpu Fix it by enabling ACPI_HOTPLUG_CPU when both ACPI_PROCESSOR and HOTPLUG_CPU are enabled, consistent with other architectures like x86 and loongarch. Fixes: 9d0873892f4d ("arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled.") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406300437.XnuW0n34-lkp@intel.com/ Signed-off-by: Gavin Shan Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240701001132.1585153-1-gshan@redhat.com Signed-off-by: Catalin Marinas commit f08d4bdad612dcff6827f8cd2b20f13413c392d3 Author: Manivannan Sadhasivam Date: Wed Jun 26 11:02:37 2024 +0530 bus: mhi: host: pci_generic: Use unique 'mhi_pci_dev_info' for product families Currently, a single 'mhi_pci_dev_info' is shared across different product families. Even though it makes the device functional, it misleads the users by sharing the common product name. For instance, below message will be printed for Foxconn SDX62 modem during boot: "MHI PCI device found: foxconn-sdx65" But this is quite misleading to the users since the actual modem plugged in could be 'T99W373' which is based on SDX62. So fix this issue by using a unique 'mhi_pci_dev_info' for product families. This allows us to specify a unique product name for each product family. Also, once this name is exposed to client drivers, they may use this name to identify the modems and use any modem specific configuration. Modems of unknown product families are not impacted by this change. CC: Slark Xiao Reviewed-by: Slark Xiao Link: https://lore.kernel.org/r/20240626053237.4227-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit cf645197f045147cd0232c7a205cdfed49590756 Author: Dhruva Gole Date: Wed Jun 26 15:45:20 2024 +0530 arm64: dts: ti: k3-am62x-sk-common: Fix graph_child_address warns Fix the following warnings when compiling dtbs with W=1: ../arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi:343.10-353.6: Warning (graph_child_address): /bus@f0000/i2c@20000000/tps6598x@3f/connector/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary ../arch/arm64/boot/dts/ti/k3-am62-main.dtsi:633.22-643.5: Warning (graph_child_address): /bus@f0000/dwc3-usb@f900000/usb@31000000: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary Cc: Roger Quadros Signed-off-by: Dhruva Gole Tested-by: Roger Quadros Link: https://lore.kernel.org/r/20240626101520.1782320-3-d-gole@ti.com Signed-off-by: Vignesh Raghavendra commit 28a950c404679aba602e3311c733a19b7c945ab4 Author: Dhruva Gole Date: Wed Jun 26 15:45:19 2024 +0530 arm64: dts: ti: k3-am62p5-sk: fix graph_child_address warnings Fix the following warnings that are thrown when building dtbs with W=1: ../arch/arm64/boot/dts/ti/k3-am62p5-sk.dts:367.10-376.6: Warning (graph_child_address): /bus@f0000/i2c@20000000/usb-power-controller@3f/connector/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary ../arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi:647.22-657.5: Warning (graph_child_address): /bus@f0000/usb@f900000/usb@31000000: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary also defined at ../arch/arm64/boot/dts/ti/k3-am62p5-sk.dts:517.7-528.3 Cc: Roger Quadros Signed-off-by: Dhruva Gole Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20240626101520.1782320-2-d-gole@ti.com Signed-off-by: Vignesh Raghavendra commit 5e5c50964e2e524a7537c97303e9266b11f372d8 Author: Jared McArthur Date: Thu Jun 27 11:25:39 2024 -0500 arm64: dts: ti: k3-j722s: Add gpio-ranges properties The AM67A/J722S/TDA4AEN platform is a derivative of AM62P platform and we have no single 1:1 relation regarding index of GPIO and pin controller. The GPIOs and pin controller registers have mapping and holes in the map. These have been extracted from the J722S data sheet. The MCU mapping is carried forward as is with J722S, however the main GPIO block has differences that needs to be accounted for. Mux mode input is selected as it is bi-directional. In case a specific pull type or a specific pin level drive setting is desired, the board device tree files will have to explicitly mux those pins for the GPIO with the desired setting. Ref: J722S Data sheet https://www.ti.com/lit/gpn/tda4aen-q1 Signed-off-by: Jared McArthur Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20240627162539.691223-4-nm@ti.com Signed-off-by: Vignesh Raghavendra commit d72d73a44c3c98109764bfb56c329cd628c518cc Author: Nishanth Menon Date: Thu Jun 27 11:25:38 2024 -0500 arm64: dts: ti: k3-am62p: Add gpio-ranges properties On the AM62P platform we have no single 1:1 relation regarding index of GPIO and pin controller. The GPIOs and pin controller registers have mapping and holes in the map. These have been extracted from the AM62P data sheet. MCU pinctrl definition is shared as it is common between AM62P and J722S, but that is not the case for main domain. Ref: AM62P Data sheet https://www.ti.com/lit/gpn/am62p Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20240627162539.691223-3-nm@ti.com Signed-off-by: Vignesh Raghavendra commit 50d9981fa12212cdc0110c42db0411209bb5d765 Author: Nishanth Menon Date: Thu Jun 27 11:25:37 2024 -0500 arm64: dts: ti: k3-pinctrl: Define a generic GPIO MUX Mode Introduce a GPIO mux mode macro for easier readability. All K3 devices use mux mode 7 to switch to GPIO mux and this allows the gpio-ranges to be defined for pinctrl-single clearly. Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20240627162539.691223-2-nm@ti.com Signed-off-by: Vignesh Raghavendra commit c870321e4317ea28443e12445f070b35089fd45e Author: Andrew Davis Date: Fri Jun 28 10:15:18 2024 -0500 arm64: dts: ti: k3-am62: Add cpsw-mac-efuse node to wkup_conf The WKUP system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-8-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 00d20114b515b4697af228cf3c01120ca1335270 Author: Andrew Davis Date: Fri Jun 28 10:15:17 2024 -0500 arm64: dts: ti: k3-am62a: Add cpsw-mac-efuse node to wkup_conf The WKUP system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-7-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 74e074d22a4161c86b3acc12d6fc1dbd60b177f9 Author: Andrew Davis Date: Fri Jun 28 10:15:16 2024 -0500 arm64: dts: ti: k3-j784s4: Add cpsw-mac-efuse node to mcu_conf The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-6-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 418291e705a9824b09f76858c374b04cf4e7a1d3 Author: Andrew Davis Date: Fri Jun 28 10:15:15 2024 -0500 arm64: dts: ti: k3-j721s2: Add cpsw-mac-efuse node to mcu_conf The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-5-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 1147fa465a82db96f9883477c3351b77a48e457c Author: Andrew Davis Date: Fri Jun 28 10:15:14 2024 -0500 arm64: dts: ti: k3-j721e: Add cpsw-mac-efuse node to mcu_conf The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-4-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 3128edb3c4a8ad8f7c53d11fc5a21da5d6b597ba Author: Andrew Davis Date: Fri Jun 28 10:15:13 2024 -0500 arm64: dts: ti: k3-j7200: Add cpsw-mac-efuse node to mcu_conf The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-3-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 0ab18cecc806586144ea8f245d15a8da71c332eb Author: Andrew Davis Date: Fri Jun 28 10:15:12 2024 -0500 arm64: dts: ti: k3-am65: Add cpsw-mac-efuse node to mcu_conf The MCU system controller address region contains an eFuse block with MAC addresses to be used by the Ethernet controller. The property “ti,syscon-efuse” contains a phandle to a syscon region and an offset into this region where the MAC addresses can be found. Currently "ti,syscon-efuse" points to the entire system controller address space node with an offset to the eFuse IP address. Instead add a cpsw-mac-efuse node to describe the exact eFuse area. Then point the Ethernet controller directly to this region, no offset needed. This makes it so the system controller memory area does not need to be one big syscon area, describe this bus address area as the simple-bus it is. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240628151518.40100-2-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 447f85b70f6553218e0aa7889e8615e4b31c8a2f Author: Roger Quadros Date: Fri Jun 28 13:30:38 2024 +0300 arm: dts: k3-am642-evm-nand: Add bootph-all to NAND related nodes NAND boot would require these nodes to be present at early stage. Ensure that by adding "bootph-all" to relevant nodes. Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20240628-am642-evm-nand-bootph-v2-1-387bfa1533a6@kernel.org Signed-off-by: Vignesh Raghavendra commit d69383885576954033b537c29c7d259f18e75293 Author: Garrett Giordano Date: Wed Jun 26 08:52:44 2024 -0700 arm64: dts: ti: Add basic support for phyBOARD-Lyra-AM62Ax The phyCORE-AM62Ax [1] is a SoM (System on Module) featuring TI's AM62Ax SoC. It can be used in combination with different carrier boards. This module can come with different sizes and models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM62Ax family. A development Kit, called phyBOARD-Lyra [2] is used as a carrier board reference design with a mapper board being used to allow the phyCORE-AM62Ax to fit the phyBOARD-Lyra. Supported features: * Debug UART * SPI NOR Flash * eMMC * 2x Ethernet * Micro SD card * I2C EEPROM * I2C RTC * GPIO Expander * LEDs * USB * HDMI * USB-C * Audio For more details, see: [1] Product page SoM: https://www.phytec.com/product/phycore-am62a [2] Product page CB: https://www.phytec.com/product/phyboard-am62a Signed-off-by: Garrett Giordano Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20240626155244.3311436-4-ggiordano@phytec.com Signed-off-by: Vignesh Raghavendra commit 567c373f441b29414157c00cfff09f1c60e83bf6 Author: Garrett Giordano Date: Wed Jun 26 08:52:43 2024 -0700 dt-bindings: arm: ti: Add bindings for PHYTEC AM62Ax based hardware Add devicetree bindings for AM62Ax based phyCORE-AM62A7 SoM and phyBOARD-Lyra RDK. Signed-off-by: Garrett Giordano Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626155244.3311436-3-ggiordano@phytec.com Signed-off-by: Vignesh Raghavendra commit f1b3adade0459a9a2d9fb0964f975e9541fb1ac9 Author: Garrett Giordano Date: Wed Jun 26 08:52:42 2024 -0700 arm64: dts: ti: Add am62x-phyboard-lyra carrier board PHYTECs phyBOARD-Lyra carrier board is able to accomidate multiple SoMs. Refactor k3-am625-phyboard-lyra-rdk.dts into an include file so it can be reused in combination with our phyCORE-AM62Ax SoM. Signed-off-by: Garrett Giordano Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20240626155244.3311436-2-ggiordano@phytec.com Signed-off-by: Vignesh Raghavendra commit fe6a73eee30173695d3a56e30033d7bb1f4c79eb Author: Garrett Giordano Date: Wed Jun 26 08:52:41 2024 -0700 arm64: dts: ti: k3-am62a: Enable AUDIO_REFCLKx On AM62a SoCs the AUDIO_REFCLKx clocks can be used as an input to external peripherals when configured through CTRL_MMR, so add the clock nodes. Based on: Link: https://lore.kernel.org/lkml/20230807202159.13095-2-francesco@dolcini.it/ Signed-off-by: Garrett Giordano Link: https://lore.kernel.org/r/20240626155244.3311436-1-ggiordano@phytec.com Signed-off-by: Vignesh Raghavendra commit 479112c9f5315604b5a96e10efddcd375a0e56a3 Author: Jayesh Choudhary Date: Wed Jun 26 15:46:45 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Enable analog audio support The audio support on J784S4-EVM is using PCM3168A[0] codec connected to McASP0 serializers. - Add the nodes for sound-card, audio codec, MAIN_I2C3 and McASP0. - Add pinmux for I2C3, McASP0 and AUDIO_EXT_REFCLK1. - Add necessary GPIO hogs to route the MAIN_I2C3 lines and McASP serializer. - Add idle-state as 1 in mux1 to route McASP clock signals. [0]: Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20240626101645.36764-4-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit 3ea5142a97346653ed797438495503025062ec02 Author: Jayesh Choudhary Date: Wed Jun 26 15:46:44 2024 +0530 arm64: dts: ti: k3-j784s4-main: Add audio_refclk node On J784S4 SoC, the AUDIO_REFCLK1 can be used as input to external peripherals when configured through CTRL_MMR. Add audio_refclk1 node which would be used as system clock for audio codec PCM3168A. Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20240626101645.36764-3-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit 5095ec4aa1ea3d253c09486eaab42fa1a8b48c9a Author: Jayesh Choudhary Date: Wed Jun 26 15:46:43 2024 +0530 arm64: dts: ti: k3-j784s4-main: Add McASP nodes Add McASP 0-4 instances and keep them disabled because several required properties are missing as they are board specific. Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20240626101645.36764-2-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit e569152274fec9ffdd3cf40d865d2b21ce46f75b Author: Roger Quadros Date: Sat Jun 22 14:59:57 2024 +0300 arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card The NAND expansion card (PROC143E1) connects over the User/MCU/PRU Expansion port on the am62-lp-sk EVM. The following pins are shared between McASP1 and GPMC-NAND so both cannot work simultaneously. Pin name McASP1 function GPMC function ======== =============== ============= J17 MCASP1_AXR0 GPMC0_WEN P21 MCASP1_AFSX GPMC0_WAIT0 K17 MCASP1_ACLKX GPMC0_BE0N_CLE K20 MCASP1_AXR2 GPMC0_ADVN_ALE The factory default sets the pins for McASP1 use. (i.e. Resistor Array RA1 installed, RA4 not installed). For NAND use, RA1 has to be removed and RA4 must be installed. Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20240622-am62lp-sk-nand-v1-2-caee496eaf42@kernel.org Signed-off-by: Vignesh Raghavendra commit a0286c7bf091ac6bf542a00a305b3ae510242127 Author: Nitin Yadav Date: Sat Jun 22 14:59:56 2024 +0300 arm64: dts: ti: k3-am62: Add GPMC and ELM nodes Add GPMC and ELM device tree nodes for AM62 SoC family. Signed-off-by: Nitin Yadav Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20240622-am62lp-sk-nand-v1-1-caee496eaf42@kernel.org Signed-off-by: Vignesh Raghavendra commit 3a36c535dfd279ff093cc9271f474a99531bea21 Author: Jayesh Choudhary Date: Tue Jun 25 17:03:01 2024 +0530 arm64: dts: ti: k3-j722s-evm: Enable analog audio support The audio support on J722S-EVM is using TLV320AIC3106[0] codec connected to McASP1 serializers. - Add the nodes for sound-card, audio codec and McASP1. - Add hog for TRC_MUX_SEL to select between McASP and TRACE signals - Add hogs for GPIO_AUD_RSTn and MCASP1_FET_SEL which is used to switch between HDMI audio and codec audio. - Add pinmux for MCASP1 and AUDIO_EXT_REFCLK1. [0]: Signed-off-by: Jayesh Choudhary Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20240625113301.217369-3-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit a5cd7067e45c33907afe20c0d1ab5e75b09a1ee2 Author: Jayesh Choudhary Date: Tue Jun 25 17:03:00 2024 +0530 arm64: dts: ti: k3-j722s-main: Add audio_refclk node On J722S SoC, the AUDIO_REFCLK1 can be used as input to external peripherals when configured through CTRL_MMR. Add audio_refclk1 node which would be used as system clock for the audio codec TLV320AIC3106. Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20240625113301.217369-2-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit 73f1f26e2e4cda4e105476708961f0c3aff4515e Author: Sinthu Raja Date: Sat Jun 22 21:48:35 2024 +0530 arm64: dts: ti: k3-am68-sk-som: Add support for OSPI flash AM68 SK has an OSPI NOR flash on its SOM connected to OSPI0 instance. Enable support for the same. Also, describe the OSPI flash partition information through the device tree, according to the offsets in the bootloader. Signed-off-by: Sinthu Raja Signed-off-by: Udit Kumar Link: https://lore.kernel.org/r/20240622161835.3610348-1-u-kumar1@ti.com Signed-off-by: Vignesh Raghavendra commit 45a792b5131a02cfa9771b8e1ad9df797b01263a Author: Nathan Morrisson Date: Fri Jun 21 16:31:43 2024 -0700 arm64: dts: ti: k3-am6xx-phycore-qspi-nor: Add overlay to enable QSPI NOR Add an overlay to change from the default OSPI NOR to QSPI NOR for all am6xx-phycore-som boards. The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an ospi nor, but if qspi nor is populated, the EEPROM will indicate that change and we can use this overlay to cleanly change to qspi nor. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240621233143.2077941-1-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit 60c2f9784d0ea1fad07a28c03a0576274beabdc3 Author: Matthias Schiffer Date: Tue Jun 25 13:02:44 2024 +0200 arm64: dts: ti: k3-am64-tqma64xxl: relicense to GPL-2.0-only OR MIT MIT license was added to the AM64x SoC DTSIs in commit 6248b20e3203 ("arm64: dts: ti: k3-am64: Add MIT license along with GPL-2.0"). Apply the same license change to the TQMa64xxL SoM and MBaX4XxL baseboard Device Trees. The copyright year is updated to indicate the license change. Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20240625110244.9881-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Vignesh Raghavendra commit feebfe95a6654e991befca7dee45788979fd7f72 Author: Andrejs Cainikovs Date: Thu Apr 18 12:57:30 2024 +0200 arm64: dts: k3-am625-verdin: enable nau8822 pll In current configuration, nau8822 codec on development carrier board provides distorted audio output. This happens due to reference clock is fixed to 25MHz and no PLL is enabled. Following is the calculation of deviation error for different frequencies: 44100Hz: fs = 256 (fixed) prescaler = 2 target frequency = 44100 * 256 * 2 = 22579200 deviation = 22579200 vs 25000000 = 9.6832% 48000Hz: fs = 256 (fixed) prescaler = 2 target frequency = 48000 * 256 * 2 = 24576000 deviation = 24576000 vs 25000000 = 1.696% Enabling nau822 PLL via providing mclk-fs property to simple-audio-card configures clocks properly, but also adjusts audio reference clock (mclk), which in case of TI AM62 should be avoided, as it only supports 25MHz output [1][2]. This change enables PLL on nau8822 by providing mclk-fs, and moves away audio reference clock from DAI configuration, which prevents simple-audio-card to adjust it before every playback [3]. [1]: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1175479/processor-sdk-am62x-output-audio_ext_refclk0-as-mclk-for-codec-and-mcbsp/4444986#4444986 [2]: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1188051/am625-audio_ext_refclk1-clock-output---dts-support/4476322#4476322 [3]: sound/soc/generic/simple-card-utils.c#L441 Signed-off-by: Andrejs Cainikovs Reviewed-by: Francesco Dolcini Link: https://lore.kernel.org/r/20240418105730.120913-1-andrejs.cainikovs@gmail.com Signed-off-by: Vignesh Raghavendra commit d2d5409786fda857e44478e5fa27c9441a128219 Author: Michal Wajdeczko Date: Thu Jun 27 12:43:05 2024 +0200 drm/xe/pf: Remove inlined #ifdef CONFIG_PCI_IOV We can remove #ifdef CONFIG_PCI_IOV in .c files if we provide dummy replacement of the xe_pci_sriov_configure() function. Suggested-by: Jani Nikula Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240627104305.1477-1-michal.wajdeczko@intel.com commit 0543f29408a151c1c4a12e5da07ec45c2779b9b8 Author: Vitor Soares Date: Fri Jun 21 10:50:45 2024 +0100 tpm_tis_spi: add missing attpm20p SPI device ID entry "atmel,attpm20p" DT compatible is missing its SPI device ID entry, not allowing module autoloading and leading to the following message: "SPI driver tpm_tis_spi has no spi_device_id for atmel,attpm20p" Based on: commit 7eba41fe8c7b ("tpm_tis_spi: Add missing SPI ID") Fix this by adding the corresponding "attpm20p" spi_device_id entry. Fixes: 3c45308c44ed ("tpm_tis_spi: Add compatible string atmel,attpm20p") Cc: stable@vger.kernel.org # +v6.9 Signed-off-by: Vitor Soares Reviewed-by: Lukas Wunner Signed-off-by: Jarkko Sakkinen commit 5d8e2971e817bb64225fc0b6327a78752f58a9aa Author: Joe Hattori Date: Thu Jun 27 15:31:09 2024 +0900 char: tpm: Fix possible memory leak in tpm_bios_measurements_open() In tpm_bios_measurements_open(), get_device() is called on the device embedded in struct tpm_chip. In the error path, however, put_device() is not called. This results in a reference count leak, which prevents the device from being properly released. This commit makes sure to call put_device() when the seq_open() call fails. Cc: stable@vger.kernel.org # +v4.18 Fixes: 9b01b5356629 ("tpm: Move shared eventlog functions to common.c") Signed-off-by: Joe Hattori Signed-off-by: Jarkko Sakkinen commit bb748badfdfb4c6e5c5cb40ded1721f99d32072f Author: Peter Oberparleiter Date: Thu Jun 20 14:20:28 2024 +0200 s390/sclp: Add timeout to Store Data requests Due to a bug in some firmware versions, Store Data requests might not get an event response in certain situations. As a result, the boot process will be blocked indefinitely. Fix this by introducing timeout handling for Store Data requests. In case a timeout occurs, the Store Data operation is halted and no data is retrieved from the SCLP facility. Note: A minority of installed systems rely on Store Data result for device auto-configuration. These systems will fail to boot in case of a Store Data timeout and will need to be switched to manual device configuration as workaround. Reviewed-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev commit bf365071ea92b9579d5a272679b74052a5643e35 Author: Peter Oberparleiter Date: Thu Jun 20 14:20:27 2024 +0200 s390/sclp: Prevent release of buffer in I/O When a task waiting for completion of a Store Data operation is interrupted, an attempt is made to halt this operation. If this attempt fails due to a hardware or firmware problem, there is a chance that the SCLP facility might store data into buffers referenced by the original operation at a later time. Handle this situation by not releasing the referenced data buffers if the halt attempt fails. For current use cases, this might result in a leak of few pages of memory in case of a rare hardware/firmware malfunction. Reviewed-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev commit ecec74bbfc6fb1885355aa0337f3452146e8caff Author: Peter Oberparleiter Date: Thu Jun 20 14:20:26 2024 +0200 s390/sclp: Suppress unnecessary Store Data warning On systems that do not support Store Data events (such as when running as KVM guest) the following warning message appears during boot: sclp_sd: Store Data request failed (eq=2, di=3, response=0x40f0, flags=0x00, status=0, rc=-5) This warning does not add any useful information since the result is expected due to missing support for that event type. Suppress this message by checking the associated masks of supported events before issuing a Store Data event. Suggested-by: Heiko Carstens Reviewed-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev commit eb523ec38269889cef15494635a2bc4b608602a3 Author: Nirmoy Das Date: Fri Jun 28 10:58:45 2024 +0200 drm/xe/guc: Configure TLB timeout based on CT buffer size GuC TLB invalidation depends on GuC to process the request from the CT queue and then the real time to invalidate TLB. Add a function to return overestimated possible time a TLB inval H2G might take which can be used as timeout value for TLB invalidation wait time. v4: Make sure CTB is in 4K blocks(Michal) and other doc fixes v3: Pass CT to xe_guc_ct_queue_proc_time_jiffies() (Michal) Add tlb_timeout_jiffies() that replaces TLB_TIMEOUT(Michal) v2: Address reviews from Michal. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1622 Cc: Matthew Brost Cc: Michal Wajdeczko Suggested-by: Daniele Ceraolo Spurio Acked-by: Matthew Brost Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240628085845.2369-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit 8515f1661ca1f9ad63850a5e1e86599399420d2e Author: Jens Axboe Date: Mon Jul 1 09:23:26 2024 -0600 MAINTAINERS: change Pavel Begunkov from io_uring reviewer to maintainer This more accurately describes Pavel's role for the project, so let's make the change to reflect that. Signed-off-by: Jens Axboe commit 03922e97bc305c6b2e8bc4b7cc765959ca63b05d Author: Zhu Jun Date: Wed Jun 26 20:19:05 2024 -0700 selftests/bpf: Delete extra blank lines in test_sockmap Delete extra blank lines inside of test_selftest(). Signed-off-by: Zhu Jun Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240627031905.7133-1-zhujun2@cmss.chinamobile.com commit 55f0a1fa6ea4e339c797e9a3292ca0caa4ab3885 Author: Shenghao Ding Date: Sat Jun 29 18:11:10 2024 +0800 ASoc: tas2781: Add name_prefix as the prefix name of DSP firmwares and calibrated data files Add name_prefix as the prefix name of DSP firmwares and calibrated data files which stored speaker calibrated impedance. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240629101112.628-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit be4f5d9c992ba1d89ce63ad9e40a99f120882038 Author: Jens Axboe Date: Mon Jul 1 08:46:25 2024 -0600 io_uring/msg_ring: use kmem_cache_free() to free request The change adding caching around the request allocated and freed for data messages changed a kmem_cache_free() to a kfree(), which isn't correct as the request came from slab in the first place. Fix that up and use the right freeing function if the cache is already at its limit. Note that the current mixing of kmem_cache_alloc and kfree is fine, but consistent alloc/free functions should be used as it's otherwise somewhat confusing. Fixes: 50cf5f3842af ("io_uring/msg_ring: add an alloc cache for io_kiocb entries") Signed-off-by: Jens Axboe commit 2382a405c581ae8f39f898055654e2000e7dd0d3 Author: Pu Lehui Date: Sat Jun 22 03:04:37 2024 +0000 riscv, bpf: Use bpf_prog_pack for RV64 bpf trampoline We used bpf_prog_pack to aggregate bpf programs into huge page to relieve the iTLB pressure on the system. We can apply it to bpf trampoline, as Song had been implemented it in core and x86 [0]. This patch is going to use bpf_prog_pack to RV64 bpf trampoline. Since Song and Puranjay have done a lot of work for bpf_prog_pack on RV64, implementing this function will be easy. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel #riscv Link: https://lore.kernel.org/all/20231206224054.492250-1-song@kernel.org [0] Link: https://lore.kernel.org/bpf/20240622030437.3973492-4-pulehui@huaweicloud.com commit 9f1e16fb1fc9826001c69e0551d51fbbcd2d74e9 Author: Pu Lehui Date: Sat Jun 22 03:04:36 2024 +0000 riscv, bpf: Fix out-of-bounds issue when preparing trampoline image We get the size of the trampoline image during the dry run phase and allocate memory based on that size. The allocated image will then be populated with instructions during the real patch phase. But after commit 26ef208c209a ("bpf: Use arch_bpf_trampoline_size"), the `im` argument is inconsistent in the dry run and real patch phase. This may cause emit_imm in RV64 to generate a different number of instructions when generating the 'im' address, potentially causing out-of-bounds issues. Let's emit the maximum number of instructions for the "im" address during dry run to fix this problem. Fixes: 26ef208c209a ("bpf: Use arch_bpf_trampoline_size") Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240622030437.3973492-3-pulehui@huaweicloud.com commit d1a426171d76b2cdf3dea5d52f6266090e4aa254 Author: Pu Lehui Date: Sat Jun 22 03:04:35 2024 +0000 bpf: Use precise image size for struct_ops trampoline For trampoline using bpf_prog_pack, we need to generate a rw_image buffer with size of (image_end - image). For regular trampoline, we use the precise image size generated by arch_bpf_trampoline_size to allocate rw_image. But for struct_ops trampoline, we allocate rw_image directly using close to PAGE_SIZE size. We do not need to allocate for that much, as the patch size is usually much smaller than PAGE_SIZE. Let's use precise image size for it too. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel #riscv Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20240622030437.3973492-2-pulehui@huaweicloud.com commit 5b747c23f17d791e08fdf4baa7e14b704625518c Author: Alan Maguire Date: Sat Jun 29 11:00:58 2024 +0100 libbpf: Fix error handling in btf__distill_base() Coverity points out that after calling btf__new_empty_split() the wrong value is checked for error. Fixes: 58e185a0dc35 ("libbpf: Add btf__distill_base() creating split BTF with distilled base BTF") Reported-by: Andrii Nakryiko Signed-off-by: Alan Maguire Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240629100058.2866763-1-alan.maguire@oracle.com commit c77e572d3a8c0e21c5dca4cc2883c7cd8cbe981f Author: Lorenzo Bianconi Date: Sun Jun 30 00:26:50 2024 +0200 selftests/bpf: Add selftest for bpf_xdp_flow_lookup kfunc Introduce e2e selftest for bpf_xdp_flow_lookup kfunc through xdp_flowtable utility. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/b74393fb4539aecbbd5ac7883605f86a95fb0b6b.1719698275.git.lorenzo@kernel.org commit 391bb6594fd3a567efb1cd3efc8136c78c4c9e31 Author: Lorenzo Bianconi Date: Sun Jun 30 00:26:49 2024 +0200 netfilter: Add bpf_xdp_flow_lookup kfunc Introduce bpf_xdp_flow_lookup kfunc in order to perform the lookup of a given flowtable entry based on a fib tuple of incoming traffic. bpf_xdp_flow_lookup can be used as building block to offload in xdp the processing of sw flowtable when hw flowtable is not available. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Kumar Kartikeya Dwivedi Acked-by: Pablo Neira Ayuso Link: https://lore.kernel.org/bpf/55d38a4e5856f6d1509d823ff4e98aaa6d356097.1719698275.git.lorenzo@kernel.org commit 89cc8f1c5f22568142b7ad118c738204708e4207 Author: Florian Westphal Date: Sun Jun 30 00:26:48 2024 +0200 netfilter: nf_tables: Add flowtable map for xdp offload This adds a small internal mapping table so that a new bpf (xdp) kfunc can perform lookups in a flowtable. As-is, xdp program has access to the device pointer, but no way to do a lookup in a flowtable -- there is no way to obtain the needed struct without questionable stunts. This allows to obtain an nf_flowtable pointer given a net_device structure. In order to keep backward compatibility, the infrastructure allows the user to add a given device to multiple flowtables, but it will always return the first added mapping performing the lookup since it assumes the right configuration is 1:1 mapping between flowtables and net_devices. Co-developed-by: Lorenzo Bianconi Signed-off-by: Florian Westphal Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Pablo Neira Ayuso Link: https://lore.kernel.org/bpf/9f20e2c36f494b3bf177328718367f636bb0b2ab.1719698275.git.lorenzo@kernel.org commit b0727b1243cd084260e47c51c7950020bfddb636 Author: Jens Axboe Date: Mon Jul 1 08:40:29 2024 -0600 io_uring/msg_ring: check for dead submitter task The change for improving the handling of the target CQE posting inadvertently dropped the NULL check for the submitter task on the target ring, reinstate that. Fixes: 0617bb500bfa ("io_uring/msg_ring: improve handling of target CQE posting") Reported-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d0d7c66c537d36fbb87c515edb695c1e8ea3cdcb Author: Xu Yang Date: Wed May 29 16:03:56 2024 +0800 perf: imx_perf: add support for i.MX95 platform i.MX95 has a DDR PMU which is almostly same as i.MX93, it now supports read beat and write beat filter capabilities. This will add support for i.MX95 and enhance the driver to support specific filter handling for it. Usage: For read beat: ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt2,axi_mask=ID_MASK,axi_id=ID/ ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt1,axi_mask=ID_MASK,axi_id=ID/ ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt0,axi_mask=ID_MASK,axi_id=ID/ eg: For edma2: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_rd_beat_filt0,axi_mask=0x00f,axi_id=0x00c/ For write beat: ~# perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_beat_filt,axi_mask=ID_MASK,axi_id=ID/ eg: For edma2: perf stat -a -I 1000 -e imx9_ddr0/eddrtq_pm_wr_beat_filt,axi_mask=0x00f,axi_id=0x00c/ Reviewed-by: Frank Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240529080358.703784-6-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit ac9aa295f7a89d38656739628796f086f0b160e2 Author: Xu Yang Date: Wed May 29 16:03:55 2024 +0800 perf: imx_perf: fix counter start and config sequence In current driver, the counter will start firstly and then be configured. This sequence is not correct for AXI filter events since the correct AXI_MASK and AXI_ID are not set yet. Then the results may be inaccurate. Reviewed-by: Frank Li Fixes: 55691f99d417 ("drivers/perf: imx_ddr: Add support for NXP i.MX9 SoC DDRC PMU driver") cc: stable@vger.kernel.org Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240529080358.703784-5-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit fab5e5a866e86054a78bedd1bd1d6707421149a5 Author: Xu Yang Date: Wed May 29 16:03:54 2024 +0800 perf: imx_perf: refactor driver for imx93 This driver is initinally used to support imx93 Soc and now it's time to add support for imx95 Soc. However, some macro definitions and events are different on these two Socs. For preparing imx95 supports, this will refactor driver for imx93. Reviewed-by: Frank Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240529080358.703784-4-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit 27e4a6523edd2aaf78abd72556d30629a38490b2 Author: Xu Yang Date: Wed May 29 16:03:53 2024 +0800 perf: imx_perf: let the driver manage the counter usage rather the user In current design, the user of perf app needs to input counter ID to count events. However, this is not user-friendly since the user needs to lookup the map table to find the counter. Instead of letting the user to input the counter, let this driver to manage the counters in this patch. This will be implemented by: 1. allocate counter 0 for cycle event. 2. find unused counter from 1-10 for reference events. 3. allocate specific counter for counter-specific events. In this patch, counter attr will be kept for back-compatible but all the value passed down by counter= will be ignored. To mark counter-specific events, counter ID will be encoded into perf_pmu_events_attr.id. Reviewed-by: Frank Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240529080358.703784-3-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit 4773dd10fda0e12a08a231d2fb773646817da343 Author: Xu Yang Date: Wed May 29 16:03:52 2024 +0800 perf: imx_perf: add macro definitions for parsing config attr The user can set event and counter in cmdline and the driver need to parse it using 'config' attr value. This will add macro definitions to avoid hard-code in driver. Reviewed-by: Frank Li Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240529080358.703784-2-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit f26f374824573706a3f3264d54fd17d1e161cab4 Author: Xu Yang Date: Wed May 29 16:03:51 2024 +0800 dt-bindings: perf: fsl-imx-ddr: Add i.MX95 compatible i.MX95 has a DDR pmu. This will add a compatible for it. Acked-by: Conor Dooley Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240529080358.703784-1-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit 9db27bc55bd8363570c5a259ff4dc77bd6a0b2cd Author: Vitor Soares Date: Fri Jun 28 10:07:51 2024 +0100 arm64: dts: imx8mm-verdin: add TPM device Add TPM device found on Verdin iMX8M Mini PID4 0090 variant. While adding the node, rename `pinctrl_pmic_tpm_ena` to `pinctrl_tpm_spi_cs`. Signed-off-by: Vitor Soares Signed-off-by: Shawn Guo commit 710bdbee25893a838c22a217a6be98c78d241ff5 Author: Shengjiu Wang Date: Thu Jun 27 17:53:01 2024 +0800 arm64: dts: imx8mp-evk: Add audio XCVR sound card Add audio XCVR sound card, which supports SPDIF TX & RX, eARC RX, ARC RX functions. HDMI_HPD is shared with the HDMI module so use pinctrl_hog. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 29c4d4c54cdd7aeb9dceb4274dbbfb9b687f442a Author: Shengjiu Wang Date: Thu Jun 27 17:53:00 2024 +0800 arm64: dts: imx8mp: Add audio XCVR device node XCVR (Audio Transceiver) is a on-chip functional module found on i.MX8MP. It supports HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. The reset controller is provided by the audio block control driver. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit a38d101e46080fd32135b139d8eafb778a214f68 Author: Marek Vasut Date: Fri Jun 28 01:30:09 2024 +0200 arm64: dts: imx8mp: Update Fast ethernet PHY MDIO addresses to match DH i.MX8MP DHCOM rev.200 The production DH i.MX8MP DHCOM SoM rev.200 uses updated PHY MDIO addresses for the Fast ethernet PHYs. Update the base SoM DT to cater for this change. Prototype rev.100 SoM was never publicly available and was manufactured in limited series, anything currently available is rev.200 or newer, so it is safe to update the DT this way. Signed-off-by: Marek Vasut Reviewed-by: Peng Fan Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 037ee58e0ae5bc48e770c2256dc06d6a82ade428 Author: Marek Vasut Date: Tue Jun 25 14:11:09 2024 +0200 arm64: dts: imx8mp: Do not reconfigure Audio PLL2 on DH i.MX8M Plus DHCOM SoM The DH i.MX8M Plus DHCOM SoM uses Audio PLL2 to supply clock to CLKOUT2 output. Those clock are used to supply on-SoM TC9595 DSI-to-(e)DP bridge with RefClk and must not be reconfigured, otherwise the bridge cannot work correctly. Stop reconfiguring Audio PLL2 on this SoM. Fixes: f560da940e32 ("arm64: dts: imx8mp: Initialize audio PLLs from audiomix subsystem") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 8b898acb51da6e13e8b42a269f72097e07ca1cdf Author: Frank Li Date: Wed Jun 26 16:25:33 2024 -0400 arm64: dts: layerscape: rename b(q)man-portals to b(q)man-portals-bus Rename b(q)man-portals to b(q)man-portals-bus to fix below CHECK_DTB warnings. arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: bman-portals@508000000: $nodename:0: 'bman-portals@508000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit a1107e7c8823b88b17c8d71e36e325cca66ccd1b Author: Frank Li Date: Wed Jun 26 16:25:32 2024 -0400 arm64: dts: fsl-ls1046a: rename thermal node name Add thermal subfix for thermal node to fix below CHECK_DTB warnings. thermal-zones: '...' do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$' Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit dcb38239320fd19432b70679a9b0c52af6da6782 Author: Frank Li Date: Wed Jun 26 16:25:31 2024 -0400 arm64: dts: fsl-ls1043a: remove unused clk-name at watchdog node clk-name is undocument property and never used in watchdog driver. Remove it and fix below CHECK_DTB warning. arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: watchdog@2ad0000: Unevaluated properties are not allowed ('big-endian', 'clock-names' were unexpected) Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 8cd751f27ade9edb099a58d4fea4f9c15ca483ba Author: Frank Li Date: Wed Jun 26 16:25:30 2024 -0400 arm64: dts: layerscape: rename aux_bus to aux-bus Rename aux_bus to aux-bus to fix below CHECK_DTBS warning. arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dtb: aux_bus: $nodename:0: 'aux_bus' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' from schema $id: http://devicetree.org/schemas/simple-bus.yam Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 7dcd914ba1e3caff3ddf2ac1123fd2651a676a17 Author: Frank Li Date: Wed Jun 26 16:25:29 2024 -0400 arm64: dts: layerscape: change pcie interrupt order Change pcie interrupt order to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: pcie@3400000: interrupt-names:0: 'pme' was expected from schema $id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml# arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: pcie@3400000: interrupt-names:1: 'aer' was expected from schema $id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie.yaml# Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit cfd95678a6fc814f16c16e6dd62934d5c3528ab5 Author: Frank Li Date: Wed Jun 26 16:25:28 2024 -0400 arm64: dts: layerscape: rename node name "wdt" to "watchdog" Rename node name "wdt" to "watchdog" to fix below warning: arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: wdt@c000000: $nodename:0: 'wdt@c000000' does not match '^(timer|watchdog)(@.*|-([0-9]|[1-9][0-9]+))?$ Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 327d71aa59bdf8400f909e35183f74f2c7cfa660 Author: Frank Li Date: Wed Jun 26 16:25:27 2024 -0400 arm64: dts: layerscape: add #dma-cells for qdma Add #dma-cells for qdma to fix below warning. dma-controller@8380000: '#dma-cells' is a required property Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 04b22497dfafde06bf007cbd226ce27ab187b4a2 Author: Frank Li Date: Wed Jun 26 16:25:26 2024 -0400 arm64: dts: layerscape: remove compatible string 'fsl,fman-xmdio' for fman3 Fman3 should use 'fsl,fman-memac-mdio'. 'fsl,fman-xmdio' is for fman2. Fix below CHECK_DTBS warning. fman@1a00000: mdio@eb000:compatible: ['fsl,fman-memac-mdio', 'fsl,fman-xmdio'] is too long Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 6fc79a90a7498330eb4f10ccb1122a7b9762fcc1 Author: Frank Li Date: Wed Jun 26 16:25:25 2024 -0400 arm64: dts: layerscape: replace node name 'nor' with 'flash' Replace node name 'nor' with 'flash' to fix below CHECK_DTBS warning. nor@0,0: $nodename:0: 'nor@0,0' does not match '^(flash|.*sram|nand)(@.*)?$' Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit b4ce7305f804b3ced9e70960cd7b8db47a7a6fd4 Author: Frank Li Date: Wed Jun 26 16:25:24 2024 -0400 arm64: dts: fsl-ls1012a: remove property 'snps,host-vbus-glitches' Workaround already applied unconditional at commit a6ba1e453174 ("usb: dwc3: apply snps,host-vbus-glitches workaround unconditionally") Remove it to fix CHECK_DTBS warning: usb@2f00000: Unevaluated properties are not allowed ('snps,host-vbus-glitches' was unexpected) Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 9ba8e6c55f1c45b8814b3a449260d9798dd6b4d0 Author: Frank Li Date: Wed Jun 26 16:25:23 2024 -0400 arm64: dts: fsl-lx2160a: fix #address-cells for pinctrl-single Change #addres-cells to 1 and #size-cells to 0 to align binding doc requiremement. Fix below warning: arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dtb: pinmux@70010012c: #address-cells:0:0: 1 was expected from schema $id: http://devicetree.org/schemas/pinctrl/pinctrl-single.yaml# Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit b26f63cf5b088253a0baac744fe2f222f8a9c01e Author: Frank Li Date: Wed Jun 26 16:25:22 2024 -0400 arm64: dts: layerscape: add platform special compatible string for gpio Add platform special compatible string for all gpio controller to fix below warning. gpio@2300000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,qoriq-gpio'] is too short 'fsl,qoriq-gpio' is not one of ['fsl,mpc5121-gpio', 'fsl,mpc5125-gpio', 'fsl,mpc8349-gpio', 'fsl,mpc8572-gpio', 'fsl,mpc8610-gpio', 'fsl,pq3-gpio'] 'fsl,qoriq-gpio' is not one of ['fsl,ls1021a-gpio', 'fsl,ls1028a-gpio', 'fsl,ls1043a-gpio', 'fsl,ls1088a-gpio', 'fsl,ls2080a-gpio'] Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 45c5e504b34d36b05ced8a4aefa6532e838b0c6a Author: Frank Li Date: Wed Jun 26 16:25:21 2024 -0400 arm64: dts: layerscape: rename node 'timer' as 'rtc' ftm_alarm is rtc. Correct the name as 'rtc' to fix DTB_CHECK warning. timer@29d0000: $nodename:0: 'timer@29d0000' does not match '^rtc(@.*|-([0-9]|[1-9][0-9]+))?$' from schema $id: http://devicetree.org/schemas/rtc/fsl,ls-ftm-alarm.yaml Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 14949fe3f79945957e33dee6de75e3f475ac3308 Author: Fabio Estevam Date: Wed Jun 26 11:05:32 2024 -0300 arm64: dts: imx8qxp-mek: Pass memory-region to the DSP node According to fsl,dsp.yaml, 'memory-region' is a required property. Pass 'memory-region' to fix the following dt-schema warning: imx8qxp-mek.dtb: dsp@596e8000: 'memory-region' is a required property Signed-off-by: Fabio Estevam Reviewed-by: Frank Li Signed-off-by: Shawn Guo commit 418ecfca8b115935696121efa0fa018bec496f68 Author: Frank Li Date: Thu Jun 20 12:16:22 2024 -0400 arm64: dts: imx95-19x19-evk: add PCIe[0,1] support Add PCIe[0,1] and all dependent nodes. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 9ceb5cb24d36613edb0165686dfd6ea465b81f28 Author: Frank Li Date: Thu Jun 20 12:16:21 2024 -0400 arm64: dts: imx95-19x19-evk: add lpi2c7 and expander gpio pcal6524 Add lpi2c7 and expander gpio pcal6524. Signed-off-by: Frank Li Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 3b1d5deb29ffdc2f4fa7db1e25f7ca3af9d375a2 Author: Frank Li Date: Thu Jun 20 12:16:20 2024 -0400 arm64: dts: imx95: add pcie[0,1] and pcie-ep[0,1] support Add pcie[0,1] and pcie-ep[0,1] support. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit d9c34491268880775334032aa48c3157eef7ed1b Author: Frank Li Date: Thu Jun 20 12:16:19 2024 -0400 arm64: dts: imx95: add '#address-cells' and '#size-cells' for all i2c Add '#address-cells' and '#size-cells' for all I2C to avoid duplicate these at every board files. Reviewed-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 227b474081d35da895948d79758c89aeef7d6beb Author: Frank Li Date: Mon Jun 24 14:55:29 2024 -0400 arm64: dts: fsl-ls1043a-rdb: use common spi-cs-setup(hold)-delay-ns Use SPI common properties 'spi-cs-setup-delay-ns' and 'spi-cs-hold-delay-ns', mark private properties 'fsl,spi-cs-sck-delay' and 'fsl,spi-sck-cs-delay' as deprecated. Signed-off-by: Frank Li Reviewed-by: Vladimir Oltean Signed-off-by: Shawn Guo commit 16d41d987f32a41b6fa2d47ae4b0239e8abbaabc Author: Joy Zou Date: Thu Jun 20 10:26:37 2024 +0800 arm64: dts: imx93-11x11-evk: reorder lpi2c2, lpi2c3, mu1 and mu2 label Reorder lpi2c2, lpi2c3, mu1 and mu2 label in alphabetical order. Signed-off-by: Joy Zou Signed-off-by: Shawn Guo commit 9684ba497754383c47e342b8bc05538f7b57de44 Author: Joy Zou Date: Thu Jun 20 10:26:36 2024 +0800 arm64: dts: imx93-11x11-evk: fix duplicated lpi2c3 labels Move node "rtc@53" to existed "&lpi2c3" and remove redundant "&lpi2c3" label. Signed-off-by: Joy Zou Signed-off-by: Shawn Guo commit d77a66c54013a14be511df70cab0b9c01c738b80 Merge: 2f8405fb077bc dfd239a039b35 Author: Shawn Guo Date: Mon Jul 1 22:21:22 2024 +0800 Merge tag 'imx-fixes-6.10' into imx/dt64 i.MX fixes for 6.10: - Fix GPIO number for reg_usdhc2_vmmc on imx8qm-mek board. - Enable hysteresis for SODIMM_17 pin on imx8mm-verdin board to increase immunity against noise. - Remove 'no-sdio' property for uSDHC2 on imx93-11x11-evk board, so that SDIO cards could also work. - Fix BT shutdown GPIO for imx8mp-venice-gw73xx-2x board. - Fix panel node deleting on imx53-qsb-hdmi, as /delete-node/ directive doesn't really delete a node in a DT overlay. - Fix TC9595 input clock on DH i.MX8M Plus DHCOM SoM. - Fix GPU speed for imx8mm-verdin board by enabling overdrive mode in the SOM dtsi. commit 2f8405fb077bcb8e98c8cd87c2a0a238b15d8da8 Author: Adam Ford Date: Wed Jun 19 05:10:44 2024 -0500 arm64: dts: imx8mp: Fix pgc vpu locations The various pgv_vpu nodes have a mismatch between the value after the @ symbol and what is referenced by 'reg' so reorder the nodes to align. Fixes: df680992dd62 ("arm64: dts: imx8mp: add vpu pgc nodes") Suggested-by: Alexander Stein Signed-off-by: Adam Ford Reviewd-by: Alexander Stein Signed-off-by: Shawn Guo commit 9f05b20ceedee5df991db1681d9806935b1fd099 Author: Tim Harvey Date: Tue Jun 18 13:09:01 2024 -0700 arm64: dts: imx8mp-venice-gw74xx: add DP83867 configuration The GW7400 has an onboard DP83867 RGMII GbE PHY: - add RGMII delay and FIFO configuration - add LED configuration required to use them via netdev trigger: two LED's (LED1 and LED2, skipping LED0). Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit fdf7a55d3f499adfb7b66f644fc1ddca83ffeaca Author: Tim Harvey Date: Tue Jun 18 13:05:52 2024 -0700 arm64: dts: imx8mp-venice-gw702x: add support for PHY LED's The GW702x SoM has an onboard DP83867 RGMII GbE PHY that drives two LED's (LED1 and LED2, skipping LED0). Add the appropriate dt bindings to allow these PHY LED's to be controlled via a netdev trigger. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 2a93ce597484a927b14bcb611ffc6b0b47af2683 Author: Tim Harvey Date: Tue Jun 18 13:02:54 2024 -0700 arm64: dts: imx8mm-venice-gw700x: add support for PHY LED's The GW700x SoM has an onboard DP83867 RGMII GbE PHY that drives two LED's (LED1 and LED2, skipping LED0). Add the appropriate dt bindings to allow these PHY LED's to be controlled via a netdev trigger. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 3343ab4cc698e8f32b360fed610da5d3c0dbeb50 Author: Tim Harvey Date: Tue Jun 18 10:21:51 2024 -0700 arm64: dts: freescale: imx8m*-venice-*: fix gw,gsc dt-schema warnings Fix the dt-schema warnings due to #address-cells/#size-cells being unnecessary when there are no children with reg cells. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 106f68fc9da3d4835070b55a2229d2c54ef5cba1 Author: Adam Ford Date: Mon Jun 17 17:39:51 2024 -0500 arm64: dts: imx8mp: Fix pgc_mlmix location The pgc_mlmix shows a power-domain@24, but the reg value is IMX8MP_POWER_DOMAIN_MLMIX which is set to 4. The stuff after the @ symbol should match the stuff referenced by 'reg' so reorder the pgc_mlmix so it to appear as power-domain@4. Fixes: 834464c8504c ("arm64: dts: imx8mp: add mlmix power domain") Fixes: 4bedc468b725 ("arm64: dts: imx8mp: Add NPU Node") Signed-off-by: Adam Ford Reviewed-by: Peng Fan Reviewed-by: Marek Vasut Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit ee39dbd9a6cbd07a9297693f599e22eb0d34c30c Author: Frank Li Date: Mon Jun 17 14:47:07 2024 -0400 arm64: dts: imx8dxl-evk: add imx8dxl_cm4, lsio mu5, related memory region Add imx8dxl_cm4, lsio mu5 and related memory region. Reviewed-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit ddabb3ce3f908a40d0f154defcf5ed327537d0ff Author: Martin Schmiedel Date: Mon Jun 17 10:12:29 2024 +0200 arm64: dts: freescale: add TQMa8MPQL on MBa8MP-RAS314 This adds support for TQMa8MPQL module on MBa8MP-RAS314 board. Signed-off-by: Martin Schmiedel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 84edd7adcc9de7c37d1d5f856601aa159a184c74 Author: Jeff Johnson Date: Thu Jun 6 18:47:07 2024 -0700 KEYS: encrypted: add missing MODULE_DESCRIPTION() During kbuild, with W=1, modpost will warn when a module doesn't have a MODULE_DESCRIPTION(). The encrypted-keys module does not have a MODULE_DESCRIPTION(). But currently, even with an allmodconfig configuration, this module is built-in, and as a result, kbuild does not currently warn about the missing MODULE_DESCRIPTION(). However, just in case it is built as a module in the future, add the missing MODULE_DESCRIPTION() macro invocation. Signed-off-by: Jeff Johnson Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 0a1ba36536c62b48b911eb2c122d892af3ac6991 Author: Jeff Johnson Date: Thu Jun 6 18:47:06 2024 -0700 KEYS: trusted: add missing MODULE_DESCRIPTION() kbuild reports: WARNING: modpost: missing MODULE_DESCRIPTION() in security/keys/trusted-keys/trusted.o Add the missing MODULE_DESCRIPTION() macro invocation. Signed-off-by: Jeff Johnson Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c99d00ef9e73f3be162ff44cf32e30ff6a1c2e65 Author: Andre Przywara Date: Fri Jun 28 15:56:12 2024 +0100 perf: pmuv3: Add new Cortex and Neoverse PMUs Add support for the Arm Cortex-A725, Cortex-X925, Neoverse N3, Neoverse V2, Neoverse V3 and Neoverse V3AE. This just adds the names and connects them with their DT compatible strings. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20240628145612.1291329-3-andre.przywara@arm.com Signed-off-by: Will Deacon commit 695b1fd0851004c4616ad538217a2242e06149b1 Author: Andre Przywara Date: Fri Jun 28 15:56:11 2024 +0100 dt-bindings: arm: pmu: Add new Cortex and Neoverse cores Add compatible strings for the PMUs in the Arm Cortex-A725, Cortex-X925, Neoverse N3, Neoverse V2, Neoverse V3 and Neoverse V3AE cores. Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20240628145612.1291329-2-andre.przywara@arm.com Signed-off-by: Will Deacon commit f9a7a91f64064216572d0914e452704bbcfa3130 Author: Ilkka Koskinen Date: Mon Jun 17 17:50:56 2024 -0700 perf/arm-cmn: Enable support for tertiary match group Add support for tertiary match group. Signed-off-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20240618005056.3092866-3-ilkka@os.amperecomputing.com Signed-off-by: Will Deacon commit 4a112585ebe8cb89edf1cae5ba41940c3b9ae307 Author: Ilkka Koskinen Date: Mon Jun 17 17:50:55 2024 -0700 perf/arm-cmn: Decouple wp_config registers from filter group number Previously, wp_config0/2 registers were used for primary match group and wp_config1/3 registers for secondary match group. In order to support tertiary match group, this patch decouples the registers and the groups. Signed-off-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20240618005056.3092866-2-ilkka@os.amperecomputing.com Signed-off-by: Will Deacon commit e1bc5c324bcca3acdbe817ccbf9aa7992d89479d Author: Srinivas Kandagatla Date: Thu Jun 27 15:44:41 2024 +0100 ASoC: codecs: wsa884x: parse port-mapping information Add support to parse static master port map information from device tree. This is required for correct port mapping between soundwire device and master ports. Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8650-HDK Signed-off-by: Srinivas Kandagatla Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240626-port-map-v2-4-6cc1c5608cdd@linaro.org Signed-off-by: Mark Brown commit d47abee9fede21b19d5227061c5a8761ec1659fb Author: Srinivas Kandagatla Date: Thu Jun 27 15:44:40 2024 +0100 ASoC: dt-bindings: wsa8840: Document port mapping property Document port mapping property for wsa884x. Port mapping is required to be able map correct master ports. All the device ports are not mapped in same order as master ports, so there is a need for having static port mapping for WSA codecs. Reviewed-by: Krzysztof Kozlowski Tested-by: Neil Armstrong # on SM8650-HDK Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20240626-port-map-v2-3-6cc1c5608cdd@linaro.org Signed-off-by: Mark Brown commit 1cf3295bd108abbd7f128071ae9775fd18394ca9 Author: Srinivas Kandagatla Date: Thu Jun 27 15:44:39 2024 +0100 ASoC: codecs: wsa883x: parse port-mapping information Add support to parse static master port map information from device tree. Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Tested-by: Neil Armstrong # on SM8650-HDK Signed-off-by: Srinivas Kandagatla Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240626-port-map-v2-2-6cc1c5608cdd@linaro.org Signed-off-by: Mark Brown commit 49beb4d2e85634ec1e1c82d76461d9552676045d Author: Manikantan R Date: Thu Jun 27 15:44:38 2024 +0100 ASoC: dt-bindings: wsa883x: Document port mapping property Document port mapping property for wsa883x. Port mapping is required to be able map correct master ports for VI feedback. All the device ports are not mapped in same order as master ports, so there is a need for having static port mapping for WSA codecs. Signed-off-by: Manikantan R Reviewed-by: Krzysztof Kozlowski Tested-by: Neil Armstrong # on SM8650-HDK Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20240626-port-map-v2-1-6cc1c5608cdd@linaro.org Signed-off-by: Mark Brown commit 35b94a99fc67e1886e3be68179cc7477370f0b2a Merge: 04f08ef291d4b 1443b6ea806df Author: Arnd Bergmann Date: Mon Jul 1 15:51:10 2024 +0200 Merge tag 'amlogic-arm64-dt-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT changes for v6.11: - New Boards: - OSMC Vero 4K - Dreambox One & Two - GXLX/S905L p271 Reference Boards - Amlogic A4 Power Domain - A bunch of DT fixes to allmost solve all remaining check errors - Amlogic S4 PWM - Fixes for: - SM1 SPDIF compatibles - Bump G12 SPDIF driver strength - Add power domain to HDMI TX - Correct HDMI TX clocks * tag 'amlogic-arm64-dt-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: (32 commits) arm64: dts: amlogic: setup hdmi system clock arm64: dts: amlogic: gx: correct hdmi clocks arm64: dts: amlogic: Add Amlogic S4 PWM arm64: dts: amlogic: add power domain to hdmitx arm64: dts: amlogic: g12: bump spdif output drive strength arm64: dts: amlogic: sm1: fix spdif compatibles arm64: dts: amlogic: ad402: fix thermal zone node name arm64: dts: meson: add initial support for Dreambox One/Two dt-bindings: arm: amlogic: add support for Dreambox One/Two dt-bindings: add dream vendor prefix arm64: dts: meson: add support for OSMC Vero 4K dt-bindings: arm: amlogic: add OSMC Vero 4K arm64: dts: amlogic: gxbb-odroidc2: fix invalid reset-gpio property arm64: dts: amlogic: a1: drop the invalid reset-name for usb@fe004400 arm64: dts: amlogic: a1: use correct node name for mmc controller arm64: dts: amlogic: c3: use correct compatible for gpio_intc node arm64: dts: amlogic: axg: fix tdm audio-controller clock order arm64: dts: amlogic: g12a-u200: add missing AVDD-supply to acodec arm64: dts: amlogic: g12a-u200: drop invalid sound-dai-cells arm64: dts: amlogic: sm1: fix tdm controllers compatible ... Link: https://lore.kernel.org/r/7f71e76c-c793-429a-b0ed-7296553a3eff@linaro.org Signed-off-by: Arnd Bergmann commit 04f08ef291d4b8d76f8d198bf2929ad43b96eecf Author: Rob Herring (Arm) Date: Sun Jun 30 00:15:35 2024 +0200 arm/arm64: dts: arm: Use generic clock and regulator nodenames With the recent defining of preferred naming for fixed clock and regulator nodes, convert the Arm Ltd. boards to use the preferred names. In the cases which had a unit-address, warnings about missing "reg" property are fixed. Signed-off-by: Rob Herring (Arm) Reviewed-by: Linus Walleij Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/20240528191536.1444649-2-robh@kernel.org Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20240630-arm-dts-fixes-2-v1-1-a32ba57e5b1d@linaro.org Signed-off-by: Arnd Bergmann commit 7f8165eee188536e3ca9f65564d4872dc1c2df06 Merge: ade9906194442 3a94fa4cb86e9 Author: Arnd Bergmann Date: Mon Jul 1 15:49:30 2024 +0200 Merge tag 'microchip-dt64-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt Microchip ARM64 device tree updates for v6.11 It contains: - cleanups for simple-bus nodes to comply with dtbs_check * tag 'microchip-dt64-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: arm64: dts: microchip: sparx5_pcb135: move non-MMIO nodes out of axi arm64: dts: microchip: sparx5_pcb134: move non-MMIO nodes out of axi Link: https://lore.kernel.org/r/20240629174051.665027-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit 276d7eab387a6fbbd423996d585b3ba3e91b346a Merge: 41bb142a40289 5375986e16207 Author: Arnd Bergmann Date: Mon Jul 1 15:48:46 2024 +0200 Merge tag 'amlogic-drivers-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers Amlogic drivers changes for v6.11: - Add S905L & A113X SoC IDs - add missing MODULE_DESCRIPTION() macro for meson_sm driver * tag 'amlogic-drivers-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: firmware: meson_sm: add missing MODULE_DESCRIPTION() macro soc: amlogic: meson-gx-socinfo: add new A113X SoC id soc: amlogic: meson-gx-socinfo: Add S905L ID Link: https://lore.kernel.org/r/35093904-c4a8-432d-b010-a994fc1ee536@linaro.org Signed-off-by: Arnd Bergmann commit ade990619444234d96ee5a79ca6305474c6c687b Author: Marek Behún Date: Mon Jul 1 13:30:10 2024 +0200 ARM: dts: turris-omnia: Add GPIO key node for front button Now that we have the MCU device-tree node, which acts as a GPIO controller, add GPIO key node for the front button. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Reviewed-by: Andy Shevchenko Reviewed-by: Conor Dooley Acked-by: Bartosz Golaszewski Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20240701113010.16447-9-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 04515932e52cbe517cf0e933fd22b254034874c4 Author: Marek Behún Date: Mon Jul 1 13:30:09 2024 +0200 ARM: dts: turris-omnia: Add MCU system-controller node Turris Omnia's MCU provides various features that can be configured over I2C at address 0x2a. Add device-tree node. This does not carry a Fixes tag - we do not want this to get backported to stable kernels for the following reason: U-Boot since v2022.10 inserts a phy-reset-gpio property into the WAN ethernet node pointing to the MCU node if it finds the MCU node with a cznic,turris-omnia-mcu compatible. Thus if this change got backported to a stable kernel, the WAN interface driver would defer probe indefinitely (since it would wait for the turris-omnia-mcu driver which would not be present). Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Reviewed-by: Andy Shevchenko Reviewed-by: Conor Dooley Acked-by: Bartosz Golaszewski Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20240701113010.16447-8-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 41bb142a4028949a0c8c505f7f4963067b0a739f Author: Marek Behún Date: Mon Jul 1 13:30:08 2024 +0200 platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG Add support for true random number generator provided by the MCU. New Omnia boards come without the Atmel SHA204-A chip. Instead the crypto functionality is provided by new microcontroller, which has a TRNG peripheral. Signed-off-by: Marek Behún Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240701113010.16447-7-kabel@kernel.org Signed-off-by: Arnd Bergmann commit ab89fb5fb92c77a9486b6769bc8681251f094c67 Author: Marek Behún Date: Mon Jul 1 13:30:07 2024 +0200 platform: cznic: turris-omnia-mcu: Add support for MCU watchdog Add support for the watchdog mechanism provided by the MCU. Signed-off-by: Marek Behún Reviewed-by: Andy Shevchenko Reviewed-by: Guenter Roeck Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240701113010.16447-6-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 90e700fd12b618449d2f61e6f933ba5ac435831d Author: Marek Behún Date: Mon Jul 1 13:30:06 2024 +0200 platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup Add support for true board poweroff (MCU can disable all unnecessary voltage regulators) and wakeup at a specified time, implemented via a RTC driver so that the rtcwake utility can be used to configure it. Signed-off-by: Marek Behún Reviewed-by: Andy Shevchenko Acked-by: Alexandre Belloni Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240701113010.16447-5-kabel@kernel.org Signed-off-by: Arnd Bergmann commit dfa556e45ae9ecc199e598222debc8f1883a7cce Author: Marek Behún Date: Mon Jul 1 13:30:05 2024 +0200 platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs Add support for GPIOs connected to the MCU on the Turris Omnia board. This includes: - front button pin - enable pins for USB regulators - MiniPCIe / mSATA card presence pins in MiniPCIe port 0 - LED output pins from WAN ethernet PHY, LAN switch and MiniPCIe ports - on board revisions 32+ also various peripheral resets and another voltage regulator enable pin Signed-off-by: Marek Behún Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240701113010.16447-4-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 992f1a3d4e88498de04b0b13b94705d8540f3d81 Author: Marek Behún Date: Mon Jul 1 13:30:04 2024 +0200 platform: cznic: Add preliminary support for Turris Omnia MCU Add the basic skeleton for a new platform driver for the microcontroller found on the Turris Omnia board. Signed-off-by: Marek Behún Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240701113010.16447-3-kabel@kernel.org Signed-off-by: Arnd Bergmann commit f5e6f47f2af07e14f29ae509cbab838df93d224c Author: Marek Behún Date: Mon Jul 1 13:30:03 2024 +0200 dt-bindings: firmware: add cznic,turris-omnia-mcu binding Add binding for cznic,turris-omnia-mcu, the device-tree node representing the system-controller features provided by the MCU on the Turris Omnia router. Signed-off-by: Marek Behún Reviewed-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240701113010.16447-2-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 8181a2f151deacf0e806ee124b157e0c2cc99683 Merge: c5003718cb5ab 07e777318911d Author: Arnd Bergmann Date: Mon Jul 1 15:35:24 2024 +0200 Merge tag 'renesas-dts-for-v6.11-tag2-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt * tag 'renesas-dts-for-v6.11-tag2-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a779h0: R-Car Sound support arm64: dts: renesas: r8a779g0: Tidy up sound DT settings arm64: dts: renesas: Add interrupt-names to arch timer nodes ARM: dts: renesas: Add interrupt-names to arch timer nodes arm64: dts: renesas: r9a08g045: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r9a07g054: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r9a07g044: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r9a07g043u: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r8a779g0: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r8a779f0: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ arm64: dts: renesas: r8a779h0: Drop "opp-shared" from opp-table-0 Link: https://lore.kernel.org/r/cover.1719837594.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 3664706e875f84bd4e3fa25ed1c6e46934cb32cd Author: Thomas Weißschuh Date: Sun Jun 30 22:54:12 2024 +0200 power: supply: cros_charge-control: don't load if Framework control is present Framework laptops implement a custom charge control EC command. The upstream CrOS EC command is also present and functional but can get overridden by the custom one. Until Framework make both commands compatible or remove their custom one, don't load the driver on those machines. If the user knows they are not going to use the custom command they can use a module parameter to load cros_charge-control anyways. Note that the UEFI setup configuration for battery control also uses their custom command. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240630-cros_ec-charge-control-v5-5-8f649d018c52@weissschuh.net Signed-off-by: Tzung-Bi Shih commit c6ed48ef52599098498a8442fd60bea5bd8cd309 Author: Thomas Weißschuh Date: Sun Jun 30 22:54:11 2024 +0200 power: supply: add ChromeOS EC based charge control driver The ChromeOS Embedded Controller implements a command to control charge thresholds and behaviour. Use it to implement the standard Linux charge_control_start_threshold, charge_control_end_threshold and charge_behaviour sysfs UAPIs. The driver is designed to be probed via the cros_ec mfd device. Acked-by: Sebastian Reichel Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240630-cros_ec-charge-control-v5-4-8f649d018c52@weissschuh.net Signed-off-by: Tzung-Bi Shih commit 69a13742b7c64ed89894caf7091539e164b3e97c Author: Thomas Weißschuh Date: Sun Jun 30 22:54:10 2024 +0200 platform/chrome: cros_ec_proto: Introduce cros_ec_get_cmd_versions() Retrieving the supported versions of a command is a fairly common operation. Provide a helper for it. If the command is not supported at all the EC returns -EINVAL/EC_RES_INVALID_PARAMS. This error is translated into an empty version mask as that is easier to handle for callers and they don't need to know about the error details. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240630-cros_ec-charge-control-v5-3-8f649d018c52@weissschuh.net Signed-off-by: Tzung-Bi Shih commit c05cb5bdf413a2a5051701a397082380758e37ec Author: Thomas Weißschuh Date: Sun Jun 30 22:54:09 2024 +0200 platform/chrome: Update binary interface for EC-based charge control The charge-control command v2/v3 is more featureful than v1, it additionally supports charge thresholds. The definitions were imported from ChromeOS EC commit 32870d602317 ("squirtle: modify motionsense rotation matrix") Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240630-cros_ec-charge-control-v5-2-8f649d018c52@weissschuh.net Signed-off-by: Tzung-Bi Shih commit 2681bbaa39cc2b5711494cc7e0166538f24e9c16 Author: Thomas Weißschuh Date: Sun Jun 30 22:54:08 2024 +0200 ACPI: battery: add devm_battery_hook_register() Add a utility function for device-managed registration of battery hooks. The function makes it easier to manage the lifecycle of a hook. Acked-by: Rafael J. Wysocki Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240630-cros_ec-charge-control-v5-1-8f649d018c52@weissschuh.net Signed-off-by: Tzung-Bi Shih commit 9337f15f4fd6ebd35d911225c4a88ec82d27b2a2 Author: Kuninori Morimoto Date: Mon Jul 1 00:38:59 2024 +0000 ASoC: dt-bindings: simple-audio-mux: add state-labels property simple-audio-mux is designed to be used generally, thus "Input 1" or "Input 2" are used to selecting MUX input. This numbered inputs would work, but might be not user friendly in some case, for example in case of system hardware design has some clear labels. Adds new "state-labels" property and enable to select MUX by own state names. Signed-off-by: Kuninori Morimoto Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/87le2m7xp8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3913ecb38833e8926467a17f1f1679ccd25a7230 Author: Kuninori Morimoto Date: Mon Jul 1 00:38:51 2024 +0000 ASoC: simple-audio-mux: enable to select MUX names simple-audio-mux is designed to be used generally, thus "Input 1" or "Input 2" are used to selecting MUX input. This numbered inputs would work, but might be not user friendly in some case, for example in case of system hardware design has some clear labels. Adds new "state-labels" property and enable to select MUX by own state names. Original > amixer set "MUX" "Input 1" Use mux-names sound_mux: mux { compatible = "simple-audio-mux"; mux-gpios = <...>; state-labels = "Label_A", "Label_B"; }; > amixer set "MUX" "Label_A" Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87msn27xpg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b87a1cbb3385a806f8abfd9b8a2191e4c6620347 Author: Roger Quadros Date: Mon May 20 15:05:41 2024 +0300 dt-bindings: soc: ti: Move ti,j721e-system-controller.yaml to soc/ti soc/ti is the more appropriate location for the system controller device tree binding documentation so move there. Update Kishon's email address to a working one. Signed-off-by: Roger Quadros Acked-by: Krzysztof Kozlowski Acked-by: Lee Jones Link: https://lore.kernel.org/r/20240520-for-v6-11-j721e-syscon-v1-1-f57a93e12cad@kernel.org Signed-off-by: Nishanth Menon commit f3bf25d5135539603f24e377c6dec3016fbd9786 Author: Christoph Hellwig Date: Mon Jul 1 07:17:52 2024 +0200 nvme: don't set io_opt if NOWS is zero NOWS is one of the annoying "0's based values" in NVMe, where 0 means one and we thus can't detect if it isn't set. Thus a NOWS value of 0 means that the Namespace Optimal Write Size is a single LBA, which is clearly bogus. Ignore the value in that case and don't propagate an io_opt value to the block layer. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Nitesh Shetty Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240701051800.1245240-4-hch@lst.de Signed-off-by: Jens Axboe commit 37105615f73125cb0466c09796f277a4c46d9295 Author: Christoph Hellwig Date: Mon Jul 1 07:17:51 2024 +0200 block: don't reduce max_sectors based on io_opt Don't reduce the max_sectors value below the normal cap when the driver advertsizes a very low io_opt. This restores the behavior we had before the recent changes to the max_sectors calculation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Nitesh Shetty Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240701051800.1245240-3-hch@lst.de Signed-off-by: Jens Axboe commit f62e8edc0a9fda84fe5bf32d5f5874b489d6c301 Author: Christoph Hellwig Date: Mon Jul 1 07:17:50 2024 +0200 block: remove a duplicate io_min check in blk_validate_limits If io_min is larger than the cap, it must by definition be non-zero. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Nitesh Shetty Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240701051800.1245240-2-hch@lst.de Signed-off-by: Jens Axboe commit 4e63aeb5d0101ddada36a2f64f048e2f9d2202fc Author: Baokun Li Date: Tue Jun 4 11:05:22 2024 +0800 blk-wbt: don't throttle swap writes in direct reclaim Now we avoid throttling swap writes by determining whether the current process is kswapd (aka current_is_kswapd()), but swap writes can come from either kswapd or direct reclaim, so the swap writes from direct reclaim will still be throttled. When a process holds a lock to allocate a free page, and enters direct reclaim because there is no free memory, then it might trigger a hung due to the wbt throttling that causes other processes to fail to get the lock. Both kswapd and direct reclaim set the REQ_SWAP flag, so use REQ_SWAP instead of current_is_kswapd() to avoid throttling swap writes. Also renamed WBT_KSWAPD to WBT_SWAP and WBT_RWQ_KSWAPD to WBT_RWQ_SWAP. Signed-off-by: Baokun Li Reviewed-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240604030522.3686177-1-libaokun@huaweicloud.com Signed-off-by: Jens Axboe commit f58e7f404da44c94e46bfe657b8707195aebd25a Author: Benjamin Tissoires Date: Thu Jun 27 11:54:22 2024 +0200 HID: bpf: Thrustmaster TCA Yoke Boeing joystick fix This joystick's original HID descriptor is wrong & it shows a ABS_MISC axis in Linux that doesn't exist on the hardware. Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/82 Signed-off-by: K S Iyer Link: https://patch.msgid.link/20240627-import-bpf-v1-6-0dbcda4a5b1f@kernel.org Signed-off-by: Benjamin Tissoires commit 9b52d81115db681efc1f83ded1d572e5b0b4fd49 Author: Benjamin Tissoires Date: Thu Jun 27 11:54:21 2024 +0200 HID: bpf: Add Huion Dial 2 bpf fixup Pretty much similar to the Inspiroy 2, but with 2 wheels and 8 buttons. This bpf also works in both normal and vendor mode. If the device is switched into vendor mode by huion-switcher, a udev property is set which is then retrieved by this bpf object. This allows to hide the now unused normal collections. Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/103 Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/104 Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/111 Link: https://patch.msgid.link/20240627-import-bpf-v1-5-0dbcda4a5b1f@kernel.org Signed-off-by: Benjamin Tissoires commit f03741540dbab48f8a65da44aaadbe04216d9a42 Author: Benjamin Tissoires Date: Thu Jun 27 11:54:20 2024 +0200 HID: bpf: Add support for the XP-PEN Deco Mini 4 The XP-PEN Deco Mini 4 is a UGEE device with a frame with 6 buttons. Its pen has 2 buttons and supports pressure reporting. Fix their report descriptors and transform the frame button events to support it. Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/88 Signed-off-by: José Expósito Link: https://patch.msgid.link/20240627-import-bpf-v1-4-0dbcda4a5b1f@kernel.org Signed-off-by: Benjamin Tissoires commit c4015aa7d8faa43ca53608dccad681eafc22db09 Author: Benjamin Tissoires Date: Thu Jun 27 11:54:19 2024 +0200 HID: bpf: move the BIT() macro to hid_bpf_helpers.h This macro can be useful in mopre than one place Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/commit/7970a9c17aa0756bad63e89fccb6ee4f2ec83ccc Signed-off-by: José Expósito Link: https://patch.msgid.link/20240627-import-bpf-v1-3-0dbcda4a5b1f@kernel.org Signed-off-by: Benjamin Tissoires commit 09c555faedb855b07d62503e0a4cd8cdf726da20 Author: Benjamin Tissoires Date: Thu Jun 27 11:54:18 2024 +0200 HID: bpf: add a driver for the Huion Inspiroy 2S (H641P) This is a a driver for the Huion Inspiroy 2S in both modes (firmware mode and tablet mode). This device has 6 buttons and a wheel, all of which send key combinations (see the comments for the defaults). Luckily the device is quite limited in that it only supports one button down at a time, so with this BPF we can simply remap the 8 possible report IDs to our own custom-built report descriptor. If the device is in tablet mode (e.g. using huion-switcher it sends everything through the vendor report instead). This BPF program converts both, depending which devices you attach to you get both. Or if you attach to all hid devices you get a duplicate device but it'll work either way. This BPF should be mostly compatible for the M and L as well though they have more buttons so the rdescs will need some minor rework. Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/85 Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/109 Signed-off-by: Peter Hutterer Link: https://patch.msgid.link/20240627-import-bpf-v1-2-0dbcda4a5b1f@kernel.org Signed-off-by: Benjamin Tissoires commit 8a89db51873ca574de45b25fce68103f34266459 Author: Benjamin Tissoires Date: Thu Jun 27 11:54:17 2024 +0200 HID: bpf: Add a HID report composition helper macros These macros make it slightly easier and more modular to create a HID report descriptor from scratch. Since they carry the annotation we don't need to comment it and they cannot get stale. For comparison, before we had this: 0x15, 0x00, // Logical Minimum (0) 0x25, 0x01, // Logical Maximum (1) 0x95, 0x04, // Report Count (4) 0x75, 0x01, // Report Size (1) Now we can write this as: LogicalRange_i8(0, 1) ReportCount(4) ReportSize(1) Because these macros are for creating new report descriptors, some bits aren't directly exposed. e.g in the example above: there is a logical range as one macro that sets both min and max. There is seldom a good use case for skipping either anyway. These macros will need to be expanded over time. For Usage Pages and Usage IDs, we use a tool to parse the HUT JSON (attached to the HUT 1.5 PDF [1]) and generate all #defines for all usage pages and usages in the form: #define UsagePage_Foo_Bar #define Usage_FB_SomeOrOther Where the FB is simply the acronym based on the capital letters in the Usage Page name or the first three letters, whichever makes slightly more sense. [1] https://usb.org/document-library/hid-usage-tables-15 Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/92 Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/96 Signed-off-by: Peter Hutterer Link: https://patch.msgid.link/20240627-import-bpf-v1-1-0dbcda4a5b1f@kernel.org Signed-off-by: Benjamin Tissoires commit c79de517a226b86419a5baa867e65e3f8118829f Author: Benjamin Tissoires Date: Mon Jul 1 14:39:52 2024 +0200 HID: bpf: doc fixes for hid_hw_request() hooks We had the following errors while doing make htmldocs: Documentation/hid/hid-bpf:185: include/linux/hid_bpf.h:167: ERROR: Unexpected indentation. Also ensure consistency with the rest of the __u64 vs u64. Reported-by: Stephen Rothwell Fixes: 9286675a2aed ("HID: bpf: add HID-BPF hooks for hid_hw_output_report") Link: https://patch.msgid.link/20240701-fix-cki-v2-4-20564e2e1393@kernel.org Signed-off-by: Benjamin Tissoires commit 260ffc9676b635c2ededc39285bfa41f83536ee1 Author: Benjamin Tissoires Date: Mon Jul 1 14:39:51 2024 +0200 HID: bpf: doc fixes for hid_hw_request() hooks We had the following errors while doing make htmldocs: Documentation/hid/hid-bpf:185: include/linux/hid_bpf.h:144: ERROR: Unexpected indentation. Documentation/hid/hid-bpf:185: include/linux/hid_bpf.h:145: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/hid/hid-bpf:185: include/linux/hid_bpf.h:147: ERROR: Unexpected indentation. Reported-by: Stephen Rothwell Fixes: 8bd0488b5ea5 ("HID: bpf: add HID-BPF hooks for hid_hw_raw_requests") Link: https://patch.msgid.link/20240701-fix-cki-v2-3-20564e2e1393@kernel.org Signed-off-by: Benjamin Tissoires commit 762ced1630a97a457ad2fd5f5a36849009808431 Author: Benjamin Tissoires Date: Mon Jul 1 14:39:50 2024 +0200 HID: bpf: fix gcc warning and unify __u64 into u64 I've got multiple reports of: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]. Let's use the same trick than kernel/bpf/helpers.c to shut up that warning. Even if we were on an architecture with addresses on more than 64 bits, this isn't much of an issue as the address is not used as a pointer, but as an hash and the caller is not supposed to go back to the kernel address ever. And while we change those, make sure we use u64 instead of __u64 for consistency Reported-by: Stephen Rothwell Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406280633.OPB5uIFj-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202406282304.UydSVncq-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202406282242.Fk738zzy-lkp@intel.com/ Reported-by: Mirsad Todorovac Fixes: 67eccf151d76 ("HID: add source argument to HID low level functions") Link: https://patch.msgid.link/20240701-fix-cki-v2-2-20564e2e1393@kernel.org Signed-off-by: Benjamin Tissoires commit fcdf830ea634cf0ee6543b6cd6a4932f92464fc7 Author: Benjamin Tissoires Date: Mon Jul 1 14:39:49 2024 +0200 selftests/hid: ensure CKI can compile our new tests on old kernels In the same way than commit ae7487d112cf ("selftests/hid: ensure we can compile the tests on kernels pre-6.3") we should expose struct hid_bpf_ops when it's not available in vmlinux.h. So unexpose an eventual struct hid_bpf_ops, include vmlinux.h, and re-export struct hid_bpf_ops. Fixes: d7696738d66b ("selftests/hid: convert the hid_bpf selftests with struct_ops") Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406270328.bscLN1IF-lkp@intel.com/ Link: https://patch.msgid.link/20240701-fix-cki-v2-1-20564e2e1393@kernel.org Signed-off-by: Benjamin Tissoires commit 74d6529b78f7a440a10aa7f4904ca9f27d1d2f3c Author: Heng Qi Date: Fri Jun 28 12:40:18 2024 +0800 net: ethtool: Fix the panic caused by dev being null when dumping coalesce syzbot reported a general protection fault caused by a null pointer dereference in coalesce_fill_reply(). The issue occurs when req_base->dev is null, leading to an invalid memory access. This panic occurs if dumping coalesce when no device name is specified. Fixes: f750dfe825b9 ("ethtool: provide customized dim profile management") Reported-by: syzbot+e77327e34cdc8c36b7d3@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e77327e34cdc8c36b7d3 Signed-off-by: Heng Qi Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 346d2fc606a85a728a02cb26ff8304f80b114b2d Author: Michael Margolin Date: Mon Jul 1 09:57:52 2024 +0000 RDMA/efa: Add EFA 0xefa3 PCI ID Add support for 0xefa3 devices. Reviewed-by: Yonatan Nachum Reviewed-by: Yossi Leybovich Signed-off-by: Michael Margolin Link: https://lore.kernel.org/r/20240701095752.20246-1-mrgolin@amazon.com Signed-off-by: Leon Romanovsky commit 7a2210a57d423cbdb9c5f2e8b12c65d7472ff147 Author: Mark Zhang Date: Sun Jun 16 19:08:44 2024 +0300 RDMA/mlx5: Support per-plane port IB counters by querying PPCNT register Supports per-plane port counters by querying PPCNT register with the "extended port counters" group, as the query_vport_counter command doesn't support plane ports. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/06ffb582d67159b7def4654c8272d3d6e8bd2f2f.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit c6b6677d85d47f5562020aa082d9b5f90738fdcd Author: Mark Zhang Date: Sun Jun 16 19:08:43 2024 +0300 net/mlx5: mlx5_ifc update for accessing ppcnt register of plane ports This patch adds new fields to support multi-plane and the extend port counters group. Actual support will be added in the next patch. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/70221cdd79aad0e21cbf385d9567e3ebffbc5137.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 3b43399b297c52cfe4dfe0194b6ad89d52bf8c35 Author: Mark Zhang Date: Sun Jun 16 19:08:42 2024 +0300 RDMA/mlx5: Add plane index support when querying PTYS registers Support the new "plane_ind" field when querying port PTYS registers. This is needed when querying the rate of a plane port. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/1f703c36306aa46917fcd88eadbb23b3e380d526.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 294424839b5ec2ecd17f4c8409796846b2b8dd31 Author: Mark Zhang Date: Sun Jun 16 19:08:41 2024 +0300 RDMA/nldev: Add support to dump device type and parent device if exists If a device has a specific type or a parent device, dump them as well. Example: $ rdma dev show smi1 3: smi1: node_type ca fw 20.38.1002 node_guid 9803:9b03:009f:d5ef sys_image_guid 9803:9b03:009f:d5ee type smi parent ibp8s0f1 Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/4c022e3e34b5de1254a3b367d502a362cdd0c53a.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 060c642b2ab8b40b39f9db99c1d14c7d19ba507f Author: Mark Zhang Date: Sun Jun 16 19:08:40 2024 +0300 RDMA/nldev: Add support to add/delete a sub IB device through netlink Add new netlink commands and attributes to support adding and deleting a sub IB device with admin privilege. Examples: $ rdma dev add smi1 type SMI parent ibp8s0f1 $ rdma dev del smi1 Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/77cbf1b36359642be8a8d8c5c2f4e585b544282f.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 026a425990af6969a15b57d6d7fa0138a7e21958 Author: Mark Zhang Date: Sun Jun 16 19:08:39 2024 +0300 RDMA/mlx5: Support plane device and driver APIs to add and delete it This patch supports driver APIs "add_sub_dev" and "del_sub_dev", to add and delete a plane device respectively. A mlx5 plane device is a rdma SMI device; It provides the SMI capability through user MAD for it's parent, the logical multi-plane aggregated device. For a plane port: - It supports QP0 only; - When adding a plane device, all plane ports are added; - For some commands like mad_ifc, both plane_index and native portnum is needed; - When querying or modifying a plane port context, the native portnum must be used, as the query/modify_hca_vport_context command doesn't support plane port. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/e933cd0562aece181f8657af2ca0f5b387d0f14e.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit a9e0facacfd16117ab69a73e29b1335b4648773d Author: Mark Zhang Date: Sun Jun 16 19:08:38 2024 +0300 RDMA/core: Create GSI QP only when CM is supported GSI QP is not needed if the port doesn't support connection management. In following patches mlx5 is going to support IB ports that doesn't support CM. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/c449ebd955923b0e54c58832fd322f9d461b37a0.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 36e97bbc2dca61751c5b4b7f248cd850a7654a19 Author: Mark Zhang Date: Sun Jun 16 19:08:37 2024 +0300 RDMA: Set type of rdma_ah to IB for a SMI sub device An address handle created on a SMI port has type IB, as a SMI port it's used for SMI management through umad. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/195be77aae0cce93522269f22f1303d2ccbef605.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit bca51197620a257e2954be99b16f05115c3b2630 Author: Mark Zhang Date: Sun Jun 16 19:08:36 2024 +0300 RDMA/core: Support IB sub device with type "SMI" This patch adds 2 APIs, as well as driver operations to support adding and deleting an IB sub device, which provides part of functionalities of it's parent. A sub device has a type; for a sub device with type "SMI", it provides the smi capability through umad for its parent, meaning uverb is not supported. A sub device cannot live without a parent. So when a parent is released, all it's sub devices are released as well. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/44253f7508b21eb2caefea3980c2bc072869116c.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 64c7ea42fcc2b972fc8d108642f4b8fabf0999c3 Author: Sam Protsenko Date: Tue Jun 18 15:45:23 2024 -0500 arm64: dts: exynos850: Enable TRNG Add True Random Number Generator (TRNG) node to Exynos850 SoC dtsi. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240618204523.9563-8-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 75d3891ca19efe82392aa5e2810334979075a87a Author: Geert Uytterhoeven Date: Mon May 27 12:19:11 2024 +0200 m68k: defconfig: Update defconfigs for v6.10-rc1 - Enable modular build of the new Packet Forwarding Control Protocol (PFCP). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/442176a8cd763e366ab9199b297919486c7f75f4.1716805119.git.geert@linux-m68k.org commit f70065a9fd988983b2c693631b801f25a615fc04 Author: Eero Tamminen Date: Mon Jun 24 17:49:01 2024 +0300 m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages Avoid freeze on Atari TT / MegaSTe boot with continuous messages of: unexpected interrupt from 112 Which was due to VBL interrupt being enabled in SCU sys mask, but there being no handler for that any more. (Bug and fix were first verified on real Atari TT HW by Christian, this patch later on in Hatari emulator.) Fixes: 1fa0b29f3a43f9dd ("fbdev: Kill Atari vblank cursor blinking") Reported-by: Nicolas Pomarède Closes: https://listengine.tuxfamily.org/lists.tuxfamily.org/hatari-devel/2024/06/msg00016.html Closes: https://lore.kernel.org/all/9aa793d7-82ed-4fbd-bce5-60810d8a9119@helsinkinet.fi Tested-by: Christian Zietz Signed-off-by: Eero Tamminen Reviewed-by: Michael Schmitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240624144901.5236-1-oak@helsinkinet.fi Signed-off-by: Geert Uytterhoeven commit 2904244a8c46bdd0fee181df693a495f4628a575 Author: Minda Chen Date: Fri Jun 21 16:22:31 2024 +0800 riscv: dts: starfive: add PCIe dts configuration for JH7110 Add PCIe dts configuraion for JH7110 SoC platform. The Star64 only has one exposed PCIe port, so only the Mars and VisionFive 2 get two enabled. Signed-off-by: Minda Chen Reviewed-by: Hal Feng [conor: squash in star64's single exposed port] Signed-off-by: Conor Dooley commit d67f063101f551dde4fb67f17cafcd98064238ee Merge: d11cbdee25953 22a40d14b572d Author: Greg Kroah-Hartman Date: Mon Jul 1 14:19:36 2024 +0200 Merge 6.10-rc6 into staging-next We need the staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 33827dc4ad8982c987ad4066d643693403ce7fd0 Merge: 4fb92bdb8e84e 22a40d14b572d Author: Greg Kroah-Hartman Date: Mon Jul 1 14:16:48 2024 +0200 Merge 6.10-rc6 into tty-next This resolves the merge issues in the 8250 code due to some reverts in 6.10-rc6 in the console changes. Signed-off-by: Greg Kroah-Hartman commit 94f19d076218a193d170da6d5ab2a87c080cc69c Author: Frank Li Date: Mon Jun 24 14:55:28 2024 -0400 spi: dt-bindings: fsl-dspi: Convert to yaml format Convert dt-binding spi-fsl-dspi.txt to yaml format. Use part Vladimir Oltean's work at of https://lore.kernel.org/linux-spi/20221111224651.577729-1-vladimir.oltean@nxp.com/ Additional changes during convert: - compatible string "fsl,ls1028a-dspi" can be followed by fsl,ls1021a-v1.0-dspi. - Change "dspi0@4002c000" to "spi@4002c000" in example. - Reorder properties in example. - Use GIC include in example. - Deprecated fsl,spi-cs-sck-delay and fsl,spi-sck-cs-delay by use common SPI property. - Use compatible string 'jedec,spi-nor' in example. - Split peripheral part to fsl,dspi-peripheral-props.yaml. - Remove 'interrupts' and 'pinctrl' from required list. - Update 'bus-num' description. - Update 'spi-num-chipselects' description by add "cs-gpios don't count against this number". - Remove 'big-endian' description. Co-developed-by: Kuldeep Singh Signed-off-by: Kuldeep Singh Co-developed-by: Vladimir Oltean Signed-off-by: Vladimir Oltean Signed-off-by: Frank Li Reviewed-by: Vladimir Oltean Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240624-ls_qspi-v4-2-3d1c6f5005bf@nxp.com Signed-off-by: Mark Brown commit 52e78777b6bfd4bc47448791a99d5f97c82ff81c Author: Frank Li Date: Mon Jun 24 14:55:27 2024 -0400 spi: fsl-dspi: use common proptery 'spi-cs-setup(hold)-delay-ns' Use SPI common DT binding properties 'spi-cs-setup-delay-ns' and 'spi-cs-hold-delay-ns'. If these properties do not exist, fall back to legacy 'fsl,spi-cs-sck-delay' and 'fsl,spi-sck-cs-delay'. Signed-off-by: Frank Li Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240624-ls_qspi-v4-1-3d1c6f5005bf@nxp.com Signed-off-by: Mark Brown commit 878f4c36f9235e8a15fe0c2ecde066d92c50c8ff Author: Animesh Agarwal Date: Mon Jun 24 18:59:44 2024 +0530 ASoC: dt-bindings: realtek,rt5659: Convert to dtschema Convert the RT5659/RT5658 audio CODEC bindings to DT schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240624132949.124228-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit 19dec6650e3fd02de8752c4e0ab1c4894ce7fcb7 Author: Chancel Liu Date: Wed Jun 26 16:12:02 2024 +0900 ASoC: fsl_rpmsg: Add support for i.MX95 platform Add compatible string and specific soc data to support rpmsg sound card on i.MX95 platform. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://patch.msgid.link/20240626071202.7149-2-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 8e5c11963c5ca4af90b36147cabb4835e59990aa Author: Chancel Liu Date: Wed Jun 26 16:12:01 2024 +0900 ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX95 Add compatible string for i.MX95 platform which supports audio function through rpmsg channel between Cortex-A and Cortex-M core. Signed-off-by: Chancel Liu Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240626071202.7149-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit e5524e3316ac54ca04dde3bfef4565bacf72c594 Author: Richard Fitzgerald Date: Mon Jul 1 11:44:44 2024 +0100 ASoC: cs35l56: Remove redundant clearing of clk_stop_mode1 struct sdw_slave_prop is zero-initialized by the SoundWire core so there is no need to clear clk_stop_mode1 to false. Removing this also avoids having an unnecessary build dependency on a struct member. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240701104444.172556-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit e2996141d6db0d8b353e1c221a37c8e1be109d4a Author: Richard Fitzgerald Date: Mon Jul 1 11:44:43 2024 +0100 ASoC: cs35l56: Remove support for A1 silicon No product was ever released with A1 silicon so there is no need for the driver to include support for it. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240701104444.172556-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 5d7e328e20b3d2bd3e1e8bea7a868ab8892aeed1 Author: Richard Fitzgerald Date: Mon Jul 1 11:44:42 2024 +0100 ASoC: cs35l56: Revert support for dual-ownership of ASP registers This patch reverts a series of commits that allowed for the ASP registers to be owned by either the driver or the firmware. Nothing currently depends on the functionality that is being reverted, so it is safe to remove. The commits being reverted are (last 3 are bugfixes to the first 2): commit 72a77d7631c6 ("ASoC: cs35l56: Fix to ensure ASP1 registers match cache") commit 07f7d6e7a124 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers") commit 4703b014f28b ("ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put()") commit c14f09f010cc ("ASoC: cs35l56: Fix deadlock in ASP1 mixer register initialization") commit dfd2ffb37399 ("ASoC: cs35l56: Prevent overwriting firmware ASP config") These reverts have been squashed into a single commit because there would be no reason to revert only some of them (which would just reintroduce bugs). The changes introduced by the commits were well-intentioned but somewhat misguided. ACPI does not provide any information about how audio hardware is linked together, so that information has to be hardcoded into drivers. On Windows the firmware is customized to statically setup appropriate configuration of the audio links, and the intent of the commits was to re-use this information if the Linux host drivers aren't taking control of the ASP. This would avoid having to hardcode the ASP config into the machine driver on some systems. However, this added complexity and race conditions into the driver. It also complicates implementation of new code. The only case where the ASP is used but the host is not taking ownership is when CS35L56 is used in SoundWire mode with the ASP as a reference audio interconnect. But even in that case it's not necessarily required even if the firmware initialized it. Typically it is used to avoid the host SDCA drivers having to be capable of aggregating capture paths from multiple SoundWire peripherals. But the SOF SoundWire support is capable of doing that aggregation. Reverting all these commits significantly simplifies the driver. Let's just use the normal Linux mechanisms of the machine driver and ALSA controls to set things up instead of trying to use the firmware to do use-case setup. Signed-off-by: Richard Fitzgerald Link: https://patch.msgid.link/20240701104444.172556-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit f61c72be2dc5880bcba6a467cda5e6059e885eb3 Merge: 2e7b471121b09 0f0023c649c7b Author: David S. Miller Date: Mon Jul 1 13:11:57 2024 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue into main Tony nguyen says: ==================== Intel Wired LAN Driver Updates 2024-06-28 (MAINTAINERS, ice) This series contains updates to MAINTAINERS file and ice driver. Jesse replaces himself with Przemek in the maintainers file. Karthik Sundaravel adds support for VF get/set MAC address via devlink. Eric checks for errors from ice_vsi_rebuild() during queue reconfiguration. Paul adjusts FW API version check for E830 devices. Piotr adds differentiation of unload type when shutting down AdminQ. Przemek changes ice_adapter initialization to occur once per physical card. ==================== Signed-off-by: David S. Miller commit 2a5db20fa532198639671713c6213f96ff285b85 Author: Mark Zhang Date: Sun Jun 16 19:08:35 2024 +0300 RDMA/mlx5: Add support to multi-plane device and port When multi-plane is supported, a logical port, which is aggregation of multiple physical plane ports, is exposed for data transmission. Compared with a normal mlx5 IB port, this logical port supports all functionalities except Subnet Management. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/7e37c06c9cb243be9ac79930cd17053903785b95.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 65528cfb21fdb68de8ae6dccae19af180d93e143 Author: Mark Zhang Date: Sun Jun 16 19:08:34 2024 +0300 net/mlx5: mlx5_ifc update for multi-plane support Add new fields to support mlx5 multi-plane feature. Actual support will be added in following patches. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/36a74a1b1d2b7b59c99cda4abad1794ddde30230.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 50660c5197f52b8137e223dc3ba8d43661179a1d Author: Mark Zhang Date: Sun Jun 16 19:08:33 2024 +0300 RDMA/core: Create "issm*" device nodes only when SMI is supported For an IB port create it's issm device node only when it has SMI capability. In following patches mlx5 is going to support IB devices without this cap. Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/359f73c9a388d5e3ae971e40d8507888b1ba6f93.1718553901.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit f7697db8b1b3e80d8cd5af071a5af42c8b445fc4 Merge: 2ea6d07efe538 22a40d14b572d Author: Greg Kroah-Hartman Date: Mon Jul 1 13:59:29 2024 +0200 Merge 6.10-rc6 into usb-next We need the USB fixes in here as well for some follow-on patches. Signed-off-by: Greg Kroah-Hartman commit 19ed3bb5587b30ace275cb604fb2b9c60dc49de0 Merge: 783100f6ea0ae 22a40d14b572d Author: Greg Kroah-Hartman Date: Mon Jul 1 13:55:39 2024 +0200 Merge 6.10-rc6 into char-misc-next We need the char/misc/iio fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman commit 24943dcdc156cf294d97a36bf5c51168bf574c22 Author: Selvin Xavier Date: Wed Jun 26 19:41:05 2024 -0700 RDMA/bnxt_re: Disable doorbell moderation if hardware register read fails If the HW register read fails, the FIFO will be always shown as full. DB moderation doesn't work in that case and the traffic fails. So disable this feature and log a message. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1719456065-27394-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit f2f4dc9124019dfc8c4f41a344ee43bffaa36d3f Author: Selvin Xavier Date: Wed Jun 26 19:41:04 2024 -0700 RDMA/bnxt_re: Enable DB moderation for genP7 adapters Enable DB moderation support for GenP7 adapters also. Query from FW and update the status. Signed-off-by: Chandramohan Akula Signed-off-by: Ajit Khaparde Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1719456065-27394-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 8e6e5ac7c468cf330c55158fcaa4ab5ad84949c9 Author: Selvin Xavier Date: Wed Jun 26 19:41:03 2024 -0700 RDMA/bnxt_re: Update the correct DB FIFO depth and mask for GenP7 GenP5 and P7 devices have different DB FIFO depth. Use different values based on the chip context. Instead of hardcoding doorbell FIFO related values, get it from the HWRM interface. Maintain backward compatibility by having default values when FW is not providing the doorbell FIFO related values. Signed-off-by: Chandramohan Akula Signed-off-by: Ajit Khaparde Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1719456065-27394-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 17c743b9da9e0d073ff19fd5313f521744514939 Author: Michael Ellerman Date: Mon May 20 16:26:47 2024 +1000 selftests/sigaltstack: Fix ppc64 GCC build Building the sigaltstack test with GCC on 64-bit powerpc errors with: gcc -Wall sas.c -o /home/michael/linux/.build/kselftest/sigaltstack/sas In file included from sas.c:23: current_stack_pointer.h:22:2: error: #error "implement current_stack_pointer equivalent" 22 | #error "implement current_stack_pointer equivalent" | ^~~~~ sas.c: In function ‘my_usr1’: sas.c:50:13: error: ‘sp’ undeclared (first use in this function); did you mean ‘p’? 50 | if (sp < (unsigned long)sstack || | ^~ This happens because GCC doesn't define __ppc__ for 64-bit builds, only 32-bit builds. Instead use __powerpc__ to detect powerpc builds, which is defined by clang and GCC for 64-bit and 32-bit builds. Fixes: 05107edc9101 ("selftests: sigaltstack: fix -Wuninitialized") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Michael Ellerman Link: https://msgid.link/20240520062647.688667-1-mpe@ellerman.id.au commit 917918f57a7b139c043e78c502876f2c286f4f0a Author: Leon Romanovsky Date: Mon Jun 24 16:24:32 2024 +0300 RDMA/device: Return error earlier if port in not valid There is no need to allocate port data if port provided is not valid. Fixes: c2261dd76b54 ("RDMA/device: Add ib_device_set_netdev() as an alternative to get_netdev") Link: https://lore.kernel.org/r/022047a8b16988fc88d4426da50bf60a4833311b.1719235449.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 0d3db1f14abb4eb28613fbeb1e2ad92bac76debf Author: Borislav Petkov (AMD) Date: Tue Jun 18 21:57:27 2024 +0200 x86/alternatives, kvm: Fix a couple of CALLs without a frame pointer objtool complains: arch/x86/kvm/kvm.o: warning: objtool: .altinstr_replacement+0xc5: call without frame pointer save/setup vmlinux.o: warning: objtool: .altinstr_replacement+0x2eb: call without frame pointer save/setup Make sure %rSP is an output operand to the respective asm() statements. The test_cc() hunk and ALT_OUTPUT_SP() courtesy of peterz. Also from him add some helpful debugging info to the documentation. Now on to the explanations: tl;dr: The alternatives macros are pretty fragile. If I do ALT_OUTPUT_SP(output) in order to be able to package in a %rsp reference for objtool so that a stack frame gets properly generated, the inline asm input operand with positional argument 0 in clear_page(): "0" (page) gets "renumbered" due to the added : "+r" (current_stack_pointer), "=D" (page) and then gcc says: ./arch/x86/include/asm/page_64.h:53:9: error: inconsistent operand constraints in an ‘asm’ The fix is to use an explicit "D" constraint which points to a singleton register class (gcc terminology) which ends up doing what is expected here: the page pointer - input and output - should be in the same %rdi register. Other register classes have more than one register in them - example: "r" and "=r" or "A": ‘A’ The ‘a’ and ‘d’ registers. This class is used for instructions that return double word results in the ‘ax:dx’ register pair. Single word values will be allocated either in ‘ax’ or ‘dx’. so using "D" and "=D" just works in this particular case. And yes, one would say, sure, why don't you do "+D" but then: : "+r" (current_stack_pointer), "+D" (page) : [old] "i" (clear_page_orig), [new1] "i" (clear_page_rep), [new2] "i" (clear_page_erms), : "cc", "memory", "rax", "rcx") now find the Waldo^Wcomma which throws a wrench into all this. Because that silly macro has an "input..." consume-all last macro arg and in it, one is supposed to supply input *and* clobbers, leading to silly syntax snafus. Yap, they need to be cleaned up, one fine day... Closes: https://lore.kernel.org/oe-kbuild-all/202406141648.jO9qNGLa-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240625112056.GDZnqoGDXgYuWBDUwu@fat_crate.local commit 2d5317753e5f02a66e6d0afb9b25105d0beab1be Author: Steffen Klassert Date: Fri Jun 28 10:46:25 2024 +0200 xfrm: Export symbol xfrm_dev_state_delete. This fixes a build failure if xfrm_user is build as a module. Fixes: 07b87f9eea0c ("xfrm: Fix unregister netdevice hang on hardware offload.") Reported-by: Mark Brown Tested-by: Leon Romanovsky Signed-off-by: Steffen Klassert commit 2e7b471121b09e7fa8ffb437bfa0e59d13f96053 Merge: 42c45ac1419ca 060338390787c Author: David S. Miller Date: Mon Jul 1 11:23:22 2024 +0100 Merge branch 'bnxt_en-ptp' into main Michael Chan says: ==================== bnxt_en: PTP updates for net-next The first 5 patches implement the PTP feature on the new BCM5760X chips. The main new hardware feature is the new TX timestamp completion which enables the driver to retrieve the TX timestamp in NAPI without deferring to the PTP worker. The last 5 patches increase the number of TX PTP packets in-flight from 1 to 4 on the older BCM5750X chips. On these older chips, we need to call firmware in the PTP worker to retrieve the timestamp. We use an arry to keep track of the in-flight TX PTP packets. v2: Patch #2: Fix the unwind of txr->is_ts_pkt when bnxt_start_xmit() aborts. Patch #4: Set the SKBTX_IN_PROGRESS flag for timestamp packets. ==================== Signed-off-by: David S. Miller commit 060338390787ccbfd71f0796d420b7cd063bcac6 Author: Pavan Chebbi Date: Fri Jun 28 12:30:05 2024 -0700 bnxt_en: Remove atomic operations on ptp->tx_avail Now that we require the spinlock to protect ptp->txts_prod, change ptp->tx_avail to non-atomic and protect it under the same spinlock. Add a new helper function bnxt_ptp_get_txts_prod() to decrement ptp->tx_avail under spinlock and return the producer. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8aa2a79e9b95eadec5c2a97662adb5b0a8f333ad Author: Pavan Chebbi Date: Fri Jun 28 12:30:04 2024 -0700 bnxt_en: Increase the max total outstanding PTP TX packets to 4 Start accepting up to 4 TX TS requests on BCM5750X (P5) chips. These PTP TX packets will be queued in the ptp->txts_req[] array waiting for the TX timestamp to complete. The entries in the array will be managed by a producer and consumer index. The producer index is updated under spinlock since multiple TX rings can try to send PTP packets at the same time. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9bf688d40d66e86310d241e77d6c51967300cc1c Author: Pavan Chebbi Date: Fri Jun 28 12:30:03 2024 -0700 bnxt_en: Let bnxt_stamp_tx_skb() return error code Change the function bnxt_stamp_tx_skb() to return 0 for suceess or -EAGAIN if the timestamp is still pending in firmware. The calling PTP aux worker will reschedule based on the return code. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 573f2a4bfcd49e0073aed51093291c7203b2d406 Author: Pavan Chebbi Date: Fri Jun 28 12:30:02 2024 -0700 bnxt_en: Remove an impossible condition check for PTP TX pending SKB In the current 5750X PTP code paths, there is always at most one TX SKB requested for timestamp and we won't accept another one until we have retrieved the timestamp or it has timed out. Remove the unnecessary check in bnxt_get_tx_ts_p5() for a pending SKB and change the function to void. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 92595a0c022387dd855806c7d9dc0ad4a8b1accd Author: Pavan Chebbi Date: Fri Jun 28 12:30:01 2024 -0700 bnxt_en: Refactor all PTP TX timestamp fields into a struct On the older 5750X (P5) chips, we currently support only 1 TX PTP packet in-flight waiting for the timestamp. Refactor the datastructures to prepare to support up to 4 TX PTP packets. Combine all fields required for PTP TX timestamp query into one structure. An array of this structure will be added in follow-on patches to support multiple outstanding TX timestamps. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 4d588d32b0321aaacf20bf90e5bbcc0f3a587b5e Author: Pavan Chebbi Date: Fri Jun 28 12:30:00 2024 -0700 bnxt_en: Add BCM5760X specific PHC registers mapping BCM5760X firmware will advertise direct 64-bit PHC registers access for the driver from BAR0. Make the necessary changes in handling HWRM_PORT_MAC_PTP_QCFG's response and PHC register mapping for 5760X chips. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1d294b4f903fc3beb18f8f20da3cec46d333daab Author: Michael Chan Date: Fri Jun 28 12:29:59 2024 -0700 bnxt_en: Add TX timestamp completion logic The new BCM5760X chips will return the timestamp of TX packets in a new completion. Add logic in __bnxt_poll_work() to handle this completion type to retrieve the timestamp. This feature eliminates the limit on the number of in-flight PTP TX packets. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ba0155f1e9fca8e5c59c840cf5451101b8360fe6 Author: Michael Chan Date: Fri Jun 28 12:29:58 2024 -0700 bnxt_en: Allow some TX packets to be unprocessed in NAPI The driver's current logic will always free all the TX SKBs up to txr->tx_hw_cons within NAPI. In the next patches, we'll be adding logic to handle TX timestamp completion and we may need to hold some remaining TX SKBs if we don't have the timestamp completions yet. Modify __bnxt_poll_work_done() to clear each event bit separately to allow bnapi->tx_int() to decide whether to clear BNXT_TX_CMP_EVENT or not. bnapi->tx_int() will not clear BNXT_TX_CMP_EVENT if some TX SKBs are held waiting for TX timestamps. Note that legacy chips will never hold any SKBs this way. The SKB is always deferred to the PTP worker slow path to retrieve the timestamp from firmware. On the new P7 chips, the timestamp is returned by the hardware directly and we can retrieve it directly from NAPI. Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 449da97512f3bac1520a4d649038f7357f394e5b Author: Michael Chan Date: Fri Jun 28 12:29:57 2024 -0700 bnxt_en: Add is_ts_pkt field to struct bnxt_sw_tx_bd Remove the unused is_gso field and add the is_ts_pkt field to struct bnxt_sw_tx_bd. This field will mark the TX BD that has requested HW TX timestamp. The field needs to be cleared if the timestamp packet is later aborted. This field will be useful when processing the new TX timestamp completion from the hardware in the next patches. Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit be6b7ca3c2ae47a7b1a51cd9bc15d638bc348dad Author: Michael Chan Date: Fri Jun 28 12:29:56 2024 -0700 bnxt_en: Add new TX timestamp completion definitions The new BCM5760X chips will generate this new TX timestamp completion when a TX packet's timestamp has been taken right before transmission. The driver logic to retrieve the timestamp will be added in the next few patches. Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 988609f2aaf1c0dd1498eef6dec21c8a5fa34046 Author: Judith Mendez Date: Wed Jun 12 08:55:38 2024 -0500 counter: ti-eqep: Allow eQEP driver to be built for K3 devices TI K3 SoC's support eQEP hardware, so add ARCH_K3 to the depends so the TI eQEP driver can be built for K3 devices. Signed-off-by: Judith Mendez Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20240612135538.2447938-9-jm@ti.com Signed-off-by: William Breathitt Gray commit 42c45ac1419cad82f7f6ced6f57950ff40dfa689 Author: Nithin Dabilpuram Date: Fri Jun 28 22:01:26 2024 +0530 octeontx2-af: Sync NIX and NPA contexts from NDC to LLC/DRAM Octeontx2 hardware uses Near Data Cache(NDC) block to cache contexts in it so that access to LLC/DRAM can be avoided. It is recommended in HRM to sync the NDC contents before releasing/resetting LF resources. Hence implement NDC_SYNC mailbox and sync contexts during driver teardown. Signed-off-by: Nithin Dabilpuram Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit 7433d034ac3c2ea745ee345228122dbfbeca5b20 Author: FUJITA Tomonori Date: Fri Jun 28 22:41:16 2024 +0900 net: tn40xx: add initial ethtool_ops support Call phylink_ethtool_ksettings_get() for get_link_ksettings method and ethtool_op_get_link() for get_link method. Signed-off-by: FUJITA Tomonori Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2538af030d6fa74dfe66121d6c53757e47d224a4 Author: Csókás, Bence Date: Tue Jun 25 11:31:47 2024 +0200 mtd: cmdlinepart: Replace `dbg()` macro with `pr_debug()` This macro was left over from the dawn of Git history. For some reason it was defined in such a way that you needed double brackets around it. Replace it with the now-standard `pr_debug()`. Signed-off-by: Csókás, Bence Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240625093148.3579660-1-csokas.bence@prolan.hu commit f32ded4b55753131272129c58e743d175d0a3c7e Author: Jeff Johnson Date: Mon Jun 10 22:07:13 2024 -0700 mtd: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/parsers/brcm_u-boot.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/parsers/tplink_safeloader.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/chips/cfi_util.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/chips/cfi_cmdset_0020.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/maps/map_funcs.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240610-md-drivers-mtd-v1-1-0f59183e4005@quicinc.com commit a5cf054d325e6f362e82fe6d124a1871a4af8174 Author: Arnd Bergmann Date: Wed May 29 11:50:39 2024 +0200 mtd: make mtd_test.c a separate module This file gets linked into nine different modules, which causes a warning: scripts/Makefile.build:236: drivers/mtd/tests/Makefile: mtd_test.o is added to multiple modules: mtd_nandbiterrs mtd_oobtest mtd_pagetest mtd_readtest mtd_speedtest mtd_stresstest mtd_subpagetest mtd_torturetest Make it a separate module instead. Fixes: a995c792280d ("mtd: tests: rename sources in order to link a helper object") Signed-off-by: Arnd Bergmann Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240529095049.1915393-1-arnd@kernel.org commit 70cdc145c42e604a76ec5476af07d862ed2fbf70 Author: Frank Li Date: Mon May 20 12:09:12 2024 -0400 dt-bindings: mtd: gpmi-nand: Add 'fsl,imx8qxp-gpmi-nand' compatible string Add 'fsl,imx8qxp-gpmi-nand' compatible string and clock-names restriction. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240520-gpmi_nand-v2-1-e3017e4c9da5@nxp.com commit 8675330ac7b729514740d693013b343b5edee69e Author: Dr. David Alan Gilbert Date: Sat May 25 21:25:29 2024 +0100 mtd: rawnand: cadence: remove unused struct 'ecc_info' 'ecc_info' has been unused since the original commit ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240525202529.120792-1-linux@treblig.org commit 726005052d2a8e8e2afa6a8cb1973d10d449964c Author: Sascha Hauer Date: Wed May 22 07:39:53 2024 +0200 mtd: rawnand: mxc: support software ECC With these changes the driver can be used with software BCH ECC which is useful for NAND chips that require a stronger ECC than the i.MX hardware supports. The controller normally interleaves user data with OOB data when accessing the NAND chip. With Software BCH ECC we write the data to the NAND in a way that the raw data on the NAND chip matches the way the NAND layer sees it. This way commands like NAND_CMD_RNDOUT work as expected. This was tested on i.MX27 but should work on the other SoCs supported by this driver as well. Signed-off-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240522-mtd-nand-mxc-nand-exec-op-v4-3-75b611e0ac44@pengutronix.de commit d3dfbae6d4adee33deb804d28d10045878974471 Author: Sascha Hauer Date: Wed May 22 07:39:52 2024 +0200 mtd: rawnand: mxc: implement exec_op This converts the driver to the more modern exec_op which gets us rid of a bunch of legacy code. Tested on i.MX27 and i.MX25. Signed-off-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240522-mtd-nand-mxc-nand-exec-op-v4-2-75b611e0ac44@pengutronix.de commit 94beaa25c78e67787d72b9cf5765fdc5216b226e Author: Sascha Hauer Date: Wed May 22 07:39:51 2024 +0200 mtd: rawnand: mxc: separate page read from ecc calc Our read_page hook currently reads out a page and also counts and returns the number of bitflips. In upcoming exec_op conversion we'll need to read the page data in exec_op, but the bitflip information will be needed in mxc_nand_read_page(). To ease exec_op conversion separate the page read out from the bitflip evaluation. For the v2/v3 controllers we can leave the bitflip information in the status register for later evaluation. For the v1 controller this is not possible, because the status register is overwritten with each subpage read. We therefore store the bitflip information in the private data. Signed-off-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240522-mtd-nand-mxc-nand-exec-op-v4-1-75b611e0ac44@pengutronix.de commit e315384899082843193116060e147703d85546e6 Author: Dave Stevenson Date: Thu Jun 20 12:09:47 2024 +0100 drm/tests: Add tests for the new Monochrome value of tv_mode Adds test for the cmdline parser, connector property, and drm_analog_tv_mode to ensure the behaviour of the new value is correct. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240620110947.3615207-1-dave.stevenson@raspberrypi.com commit 07e777318911d76fa787fc57f02b595481382291 Author: Kuninori Morimoto Date: Mon Jun 24 00:16:30 2024 +0000 arm64: dts: renesas: r8a779h0: R-Car Sound support Add sound support for R-Car V4M. [Kuninori: adjusted to latest upstream kernel] Co-developed-by: Khanh Le Signed-off-by: Khanh Le Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/87ed8nkxeq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit bd8d7546f9f74a0a70ea79885d5abcf3d66ad5c0 Author: Kuninori Morimoto Date: Mon Jun 24 00:16:24 2024 +0000 arm64: dts: renesas: r8a779g0: Tidy up sound DT settings R-Car V4H (R8A779G0) supports only 1 AUDIO_CLKOUT and 1 SSI, thus, #clock-cells / #sound-dai-cells are both fixed to zero. (#sound-dai-cells is needed for Simple-Audio-Card, but not needed for Audio-Graph-Card). Fix this up. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/87frt3kxew.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 659c0b4444b24c872ab19e5fa4b96d32043a0a6c Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:39 2024 +0200 arm64: dts: renesas: Add interrupt-names to arch timer nodes Add interrupt-names properties to device nodes that represent ARM architected timers for clarity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/e5e2767011322daaebcc8dd6ecfcadc6966042d5.1718890849.git.geert+renesas@glider.be commit 9d30bd7bdfe373f3e9f7e3e047afd8dd2e585feb Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:38 2024 +0200 ARM: dts: renesas: Add interrupt-names to arch timer nodes Add interrupt-names properties to device nodes that represent ARM architected timers for clarity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/b964e2f916cc23b6272e158c7b24597c971a82a5.1718890849.git.geert+renesas@glider.be commit 10f9badc473d43ebfddd1ddedbcb8eb3f8f3fdd9 Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:37 2024 +0200 arm64: dts: renesas: r9a08g045: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: e20396d65b959a65 ("arm64: dts: renesas: Add initial DTSI for RZ/G3S SoC") Signed-off-by: Geert Uytterhoeven Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Link: https://lore.kernel.org/884c683fb6c1d1bf7d0d383a8df8f65a0a424dc7.1718890849.git.geert+renesas@glider.be commit 2918674704aad620215c41979a331021fe3f1ec4 Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:36 2024 +0200 arm64: dts: renesas: r9a07g054: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: 7c2b8198f4f321df ("arm64: dts: renesas: Add initial DTSI for RZ/V2L SoC") Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/834244e77e5f407ee6fab1ab5c10c98a8a933085.1718890849.git.geert+renesas@glider.be commit ecbc5206a1a0532258144a4703cccf4e70f3fe6c Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:35 2024 +0200 arm64: dts: renesas: r9a07g044: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: 68a45525297b2e9a ("arm64: dts: renesas: Add initial DTSI for RZ/G2{L,LC} SoC's") Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/21f556eb7e903d5b9f4c96188fd4b6ae0db71856.1718890849.git.geert+renesas@glider.be commit 4036bae6dfd782d414040e7d714abc525b2e8792 Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:34 2024 +0200 arm64: dts: renesas: r9a07g043u: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: cf40c9689e5109bf ("arm64: dts: renesas: Add initial DTSI for RZ/G2UL SoC") Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/15cc7a7522b1658327a2bd0c4990d0131bbcb4d7.1718890849.git.geert+renesas@glider.be commit 6775165fc95052a03acc91e25bc20fcf286910a7 Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:33 2024 +0200 arm64: dts: renesas: r8a779g0: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: 987da486d84a5643 ("arm64: dts: renesas: Add Renesas R8A779G0 SoC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/5eeabbeaea1c5fd518a608f2e8013d260b00fd7e.1718890849.git.geert+renesas@glider.be commit b1c34567aebe300f9a0f70320eaeef0b3d56ffc7 Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:32 2024 +0200 arm64: dts: renesas: r8a779f0: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: c62331e8222f8f21 ("arm64: dts: renesas: Add Renesas R8A779F0 SoC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/46deba1008f73e4b6864f937642d17f9d4ae7205.1718890849.git.geert+renesas@glider.be commit 6fca24a07e1de664c3d0b280043302e0387726df Author: Geert Uytterhoeven Date: Thu Jun 20 15:57:31 2024 +0200 arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity, Fixes: 834c310f541839b6 ("arm64: dts: renesas: Add Renesas R8A779A0 SoC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/671416fb31e3992101c32fe7e46147fe4cd623ae.1718890849.git.geert+renesas@glider.be commit f3acb237a17962349b61eed813f62dddf7aead29 Author: Geert Uytterhoeven Date: Thu Jun 20 15:38:45 2024 +0200 arm64: dts: renesas: r8a779h0: Drop "opp-shared" from opp-table-0 The four Cortex-A76 CPU cores on R-Car V4M share their Operating Performance Points (OPP) table, but they have independent clocks. All cores in the cluster can switch DVFS states independently, hence the cluster's OPP table should not have an "opp-shared" property. Fixes: 6bd8b0bc444eae56 ("arm64: dts: renesas: r8a779h0: Add CA76 operating points") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/4e0227ff4388485cdb1ca2855ee6df92754e756e.1718890585.git.geert+renesas@glider.be commit 71062e52fc0aea0f3477aaaaa789226388a7eeaf Author: Geert Uytterhoeven Date: Fri Jun 14 17:29:53 2024 +0200 pinctrl: renesas: r8a779h0: Remove unneeded separators Usually there are no separators between alternate functions. Remove them to increase uniformity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/1fcd4f8734d063c9a691d9ab8ca0543892eb8388.1718378979.git.geert+renesas@glider.be commit 10544ec1b343603715b07d6f74114450440e8892 Author: Geert Uytterhoeven Date: Fri Jun 14 17:29:29 2024 +0200 pinctrl: renesas: r8a779g0: Add INTC-EX pins, groups, and function Add pins, groups, and function for the Interrupt Controller for External Devices (INTC-EX) on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/9c33c36d13a5e38d79fa53085339b14631888b50.1718378943.git.geert+renesas@glider.be commit 52227b60f8cddaa28387c6656508a30215cf0c3d Author: Geert Uytterhoeven Date: Fri Jun 14 17:28:51 2024 +0200 pinctrl: renesas: r8a779g0: Remove unneeded separators Usually there are no separators between alternate functions. Remove them to increase uniformity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/2375711d5edd03a209b4ed996f136e1f3c649773.1718378859.git.geert+renesas@glider.be commit 6d8fc3e4c575869762771ed121ca28ce1dddf0e6 Author: Geert Uytterhoeven Date: Fri Jun 14 17:26:45 2024 +0200 pinctrl: renesas: r8a779h0: Add AVB MII pins and groups EtherAVB instances 0 and 1 support both RGMII and MII interfaces. Add the missing pins and groups for MII. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/4a0a12227f2145ef53b18bc08f45b19dcd745fc6.1718378739.git.geert+renesas@glider.be commit 3d144ef10a448f89065dcff39c40d90ac18e035e Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:55 2024 +0200 pinctrl: renesas: r8a779g0: Fix TPU suffixes The Timer Pulse Unit channels have two alternate pin groups: "tpu_to[0-3]" and "tpu_to[0-3]_a". Increase uniformity by adopting R-Car V4M naming: - Rename "tpu_to[0-3]_a" to "tpu_to[0-3]_b", - Rename "tpu_to[0-3]" to "tpu_to[0-3]_a", Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 050442ae4c74f830 ("pinctrl: renesas: r8a779g0: Add pins, groups and functions") Fixes: 85a9cbe4c57bb958 ("pinctrl: renesas: r8a779g0: Add missing TPU0TOx_A") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/0dd9428bc24e97e1001ed3976b1cb98966f5e7e3.1717754960.git.geert+renesas@glider.be commit bfd2428f3a80647af681df4793e473258aa755da Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:54 2024 +0200 pinctrl: renesas: r8a779g0: Fix TCLK suffixes The Pin Multiplex attachment in Rev.1.10 of the R-Car V4H Series Hardware User's Manual still has two alternate pins named both TCLK3 and TCLK4. To differentiate, the pin control driver uses "TCLK[34]" and "TCLK[34]_X". In addition, there are alternate pins without suffix, and with an "_A" or "_B" suffix. Increase uniformity by adopting R-Car V4M naming: - Rename "TCLK2_B" to "TCLK2_C", - Rename "TCLK[12]_A" to "TCLK[12]_B", - Rename "TCLK[12]" to "TCLK[12]_A", - Rename "TCLK[34]_A" to "TCLK[34]_C", - Rename "TCLK[34]_X" to "TCLK[34]_A", - Rename "TCLK[34]" to "TCLK[34]_B". Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 0df46188a58895e1 ("pinctrl: renesas: r8a779g0: Add missing TCLKx_A/TCLKx_B/TCLKx_X") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/2845ff1f8fe1fd8d23d2f307ad5e8eb8243da608.1717754960.git.geert+renesas@glider.be commit 0aabdc9a4d3644fd57d804b283b2ab0f9c28dc6c Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:53 2024 +0200 pinctrl: renesas: r8a779g0: FIX PWM suffixes PWM channels 0, 2, 8, and 9 do not have alternate pins. Remove their "_a" or "_b" suffixes to increase uniformity. Fixes: c606c2fde2330547 ("pinctrl: renesas: r8a779g0: Add missing PWM") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/abb748e6e1e4e7d78beac7d96e7a0a3481b32e75.1717754960.git.geert+renesas@glider.be commit c391dcde3884dbbea37f57dd2625225d8661da97 Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:52 2024 +0200 pinctrl: renesas: r8a779g0: Fix IRQ suffixes The suffixes of the IRQ identifiers for external interrupts 0-3 are inconsistent: - "IRQ0" and "IRQ0_A", - "IRQ1" and "IRQ1_A", - "IRQ2" and "IRQ2_A", - "IRQ3" and "IRQ3_B". The suffixes for external interrupts 4 and 5 do follow conventional naming: - "IRQ4A" and IRQ4_B", - "IRQ5". Fix this by adopting R-Car V4M naming: - Rename "IRQ[0-2]_A" to "IRQ[0-2]_B", - Rename "IRQ[0-3]" to "IRQ[0-3]_A". Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 1b23d8a478bea9d1 ("pinctrl: renesas: r8a779g0: Add missing IRQx_A/IRQx_B") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/8ce9baf0a0f9346544a3ac801fd962c7c12fd247.1717754960.git.geert+renesas@glider.be commit 5350f38150a171322b50c0a48efa671885f87050 Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:51 2024 +0200 pinctrl: renesas: r8a779g0: Fix (H)SCIF3 suffixes (H)SCIF instance 3 has two alternate pin groups: "hscif3" and "hscif3_a", resp. "scif3" and "scif3_a", but the actual meanings of the pins within the groups do not match. Increase uniformity by adopting R-Car V4M naming: - Rename "hscif3_a" to "hscif3_b", - Rename "hscif3" to "hscif3_a", - Rename "scif3" to "scif3_b". While at it, remove unneeded separators. Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 050442ae4c74f830 ("pinctrl: renesas: r8a779g0: Add pins, groups and functions") Fixes: 213b713255defaa6 ("pinctrl: renesas: r8a779g0: Add missing HSCIF3_A") Fixes: 49e4697656bdd1cd ("pinctrl: renesas: r8a779g0: Add missing SCIF3") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/61fdde58e369e8070ffd3c5811c089e6219c7ecc.1717754960.git.geert+renesas@glider.be commit 3cf834a1669ea433aeee4c82c642776899c87451 Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:50 2024 +0200 pinctrl: renesas: r8a779g0: Fix (H)SCIF1 suffixes The Pin Multiplex attachment in Rev.1.10 of the R-Car V4H Series Hardware User's Manual still has two alternate pin groups (GP0_14-18 and GP1_6-10) each named both HSCIF1 and SCIF1. To differentiate, the pin control driver uses "(h)scif1" and "(h)scif1_x", which were considered temporary names until the conflict was sorted out. Fix this by adopting R-Car V4M naming: - Rename "(h)scif1" to "(h)scif1_a", - Rename "(h)scif1_x" to "(h)scif1_b". Adopt the R-Car V4M naming "(h)scif1_a" and "(h)scif1_b" to increase uniformity. While at it, remove unneeded separators. Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 050442ae4c74f830 ("pinctrl: renesas: r8a779g0: Add pins, groups and functions") Fixes: cf4f7891847bc558 ("pinctrl: renesas: r8a779g0: Add missing HSCIF1_X") Fixes: 9c151c2be92becf2 ("pinctrl: renesas: r8a779g0: Add missing SCIF1_X") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/5009130d1867e12abf9b231c8838fd05e2b28bee.1717754960.git.geert+renesas@glider.be commit 4976d61ca39ce51f422e094de53b46e2e3ac5c0d Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:49 2024 +0200 pinctrl: renesas: r8a779g0: Fix FXR_TXEN[AB] suffixes The Pin Multiplex attachment in Rev.1.10 of the R-Car V4H Series Hardware User's Manual still has two alternate pins named both "FXR_TXEN[AB]". To differentiate, the pin control driver uses "FXR_TXEN[AB]" and "FXR_TXEN[AB]_X", which were considered temporary names until the conflict was sorted out. Fix this by adopting R-Car V4M naming: - Rename "FXR_TXEN[AB]" to "FXR_TXEN[AB]_A", - Rename "FXR_TXEN[AB]_X" to "FXR_TXEN[AB]_B". Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 1c2646b5cebfff07 ("pinctrl: renesas: r8a779g0: Add missing FlexRay") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/5e1e9abb46c311d4c54450d991072d6d0e66f14c.1717754960.git.geert+renesas@glider.be commit 77fa9007ac31e80674beadc452d3f3614f283e18 Author: Geert Uytterhoeven Date: Fri Jun 7 12:13:48 2024 +0200 pinctrl: renesas: r8a779g0: Fix CANFD5 suffix CAN-FD instance 5 has two alternate pin groups: "canfd5" and "canfd5_b". Rename the former to "canfd5_a" to increase uniformity. While at it, remove the unneeded separator. Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Fixes: 050442ae4c74f830 ("pinctrl: renesas: r8a779g0: Add pins, groups and functions") Fixes: c2b4b2cd632d17e7 ("pinctrl: renesas: r8a779g0: Add missing CANFD5_B") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/10b22d54086ed11cdfeb0004583029ccf249bdb9.1717754960.git.geert+renesas@glider.be commit cd8894d603585ebef0fbe2bcb7607dafca66aa9a Author: Michał Mirosław Date: Wed May 1 13:15:58 2024 +0200 pinctrl: renesas: sh73a0: Use rdev_get_drvdata() Replace `reg_data` access with the official wrapper. The field is going away soon. Signed-off-by: Michał Mirosław Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/bb6b85722d80d665779e3043d1499c4fc38f0ff3.1714562004.git.mirq-linux@rere.qmqm.pl Signed-off-by: Geert Uytterhoeven commit 2e5657aa59669698f0f3bf7742d83577a18eb830 Author: Kuninori Morimoto Date: Mon Jul 1 02:32:35 2024 +0000 hwtracing: use for_each_endpoint_of_node() We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto Reviewed-by: Suzuki K Poulose Reviewed-by: Laurent Pinchart Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/878qyl970c.wl-kuninori.morimoto.gx@renesas.com commit 7828b7bbbf2074dd7dd14d87f50bc5ce9036d692 Author: Wolfram Sang Date: Thu Jun 20 11:41:58 2024 +0200 gpio: add sloppy logic analyzer using polling This is a sloppy logic analyzer using GPIOs. It comes with a script to isolate a CPU for polling. While this is definitely not a production level analyzer, it can be a helpful first view when remote debugging. Read the documentation for details. Signed-off-by: Wolfram Sang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240620094159.6785-2-wsa+renesas@sang-engineering.com [Bartosz: moved the Kconfig entry into a different category] Signed-off-by: Bartosz Golaszewski commit 1c5fc27bc48a7f33302536c42184e5208ee66783 Merge: a051091cc3154 f4ebd03496f6b Author: David S. Miller Date: Mon Jul 1 09:52:35 2024 +0100 Merge tag 'nf-next-24-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next into main Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for net-next: Patch #1 to #11 to shrink memory consumption for transaction objects: struct nft_trans_chain { /* size: 120 (-32), cachelines: 2, members: 10 */ struct nft_trans_elem { /* size: 72 (-40), cachelines: 2, members: 4 */ struct nft_trans_flowtable { /* size: 80 (-48), cachelines: 2, members: 5 */ struct nft_trans_obj { /* size: 72 (-40), cachelines: 2, members: 4 */ struct nft_trans_rule { /* size: 80 (-32), cachelines: 2, members: 6 */ struct nft_trans_set { /* size: 96 (-24), cachelines: 2, members: 8 */ struct nft_trans_table { /* size: 56 (-40), cachelines: 1, members: 2 */ struct nft_trans_elem can now be allocated from kmalloc-96 instead of kmalloc-128 slab. Series from Florian Westphal. For the record, I have mangled patch #1 to add nft_trans_container_*() and use if for every transaction object. I have also added BUILD_BUG_ON to ensure struct nft_trans always comes at the beginning of the container transaction object. And few minor cleanups, any new bugs are of my own. Patch #12 simplify check for SCTP GSO in IPVS, from Ismael Luceno. Patch #13 nf_conncount key length remains in the u32 bound, from Yunjian Wang. Patch #14 removes unnecessary check for CTA_TIMEOUT_L3PROTO when setting default conntrack timeouts via nfnetlink_cttimeout API, from Lin Ma. Patch #15 updates NFT_SECMARK_CTX_MAXLEN to 4096, SELinux could use larger secctx names than the existing 256 bytes length. Patch #16 adds a selftest to exercise nfnetlink_queue listeners leaving nfnetlink_queue, from Florian Westphal. Patch #17 increases hitcount from 255 to 65535 in xt_recent, from Phil Sutter. ==================== Signed-off-by: David S. Miller commit a051091cc3154be7dc533771070e90736654a1aa Merge: 17784801d8882 85674625e0bc2 Author: David S. Miller Date: Mon Jul 1 09:44:27 2024 +0100 Merge branch 'tcp_metrics-netlink-specs' into main Jakub Kicinski says: ==================== tcp_metrics: add netlink protocol spec in YAML Add a netlink protocol spec for the tcp_metrics generic netlink family. First patch adjusts the uAPI header guards to make it easier to build tools/ with non-system headers. v1: https://lore.kernel.org/all/20240626201133.2572487-1-kuba@kernel.org ==================== Signed-off-by: David S. Miller commit 85674625e0bc25be4dbaa165a556ef6037328379 Author: Jakub Kicinski Date: Thu Jun 27 14:35:51 2024 -0700 tcp_metrics: add netlink protocol spec in YAML Add a protocol spec for tcp_metrics, so that it's accessible via YNL. Useful at the very least for testing fixes. In this episode of "10,000 ways to complicate netlink" the metric nest has defines which are off by 1. iproute2 does: struct rtattr *m[TCP_METRIC_MAX + 1 + 1]; parse_rtattr_nested(m, TCP_METRIC_MAX + 1, a); for (i = 0; i < TCP_METRIC_MAX + 1; i++) { // ... attr = m[i + 1]; This is too weird to support in YNL, add a new set of defines with _correct_ values to the official kernel header. Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Signed-off-by: David S. Miller commit 7c8110057b1bb9ab9f47ac0efc554d5c3a53b693 Author: Jakub Kicinski Date: Thu Jun 27 14:35:50 2024 -0700 tcp_metrics: add UAPI to the header guard tcp_metrics' header lacks the customary _UAPI in the header guard. This makes YNL build rules work less seamlessly. We can easily fix that on YNL side, but this could also be problematic if we ever needed to create a kernel-only tcp_metrics.h. Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Signed-off-by: David S. Miller commit 17784801d888238571a0c4101b9ac4401fffeaa0 Author: Marek Vasut Date: Tue Jun 25 22:42:17 2024 +0200 net: phy: realtek: Add support for PHY LEDs on RTL8211F Realtek RTL8211F Ethernet PHY supports 3 LED pins which are used to indicate link status and activity. Add minimal LED controller driver supporting the most common uses with the 'netdev' trigger. Signed-off-by: Marek Vasut Signed-off-by: David S. Miller commit c0304446611536a771462f27d98db6775d222b38 Author: Krzysztof Kozlowski Date: Sun May 19 20:42:23 2024 +0200 arm64: dts: apm: Add dedicated syscon poweroff compatibles syscon nodes should always have dedicated compatible for full/accurate hardware description. Link: https://lore.kernel.org/r/20240519-dt-bindings-mfd-syscon-split-v1-8-aaf996e2313a@linaro.org Signed-off-by: Krzysztof Kozlowski commit 11a1f4bc47362700fcbde717292158873fb847ed Author: Lukas Wunner Date: Tue Jun 18 12:54:55 2024 +0200 PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal Keith reports a use-after-free when a DPC event occurs concurrently to hot-removal of the same portion of the hierarchy: The dpc_handler() awaits readiness of the secondary bus below the Downstream Port where the DPC event occurred. To do so, it polls the config space of the first child device on the secondary bus. If that child device is concurrently removed, accesses to its struct pci_dev cause the kernel to oops. That's because pci_bridge_wait_for_secondary_bus() neglects to hold a reference on the child device. Before v6.3, the function was only called on resume from system sleep or on runtime resume. Holding a reference wasn't necessary back then because the pciehp IRQ thread could never run concurrently. (On resume from system sleep, IRQs are not enabled until after the resume_noirq phase. And runtime resume is always awaited before a PCI device is removed.) However starting with v6.3, pci_bridge_wait_for_secondary_bus() is also called on a DPC event. Commit 53b54ad074de ("PCI/DPC: Await readiness of secondary bus after reset"), which introduced that, failed to appreciate that pci_bridge_wait_for_secondary_bus() now needs to hold a reference on the child device because dpc_handler() and pciehp may indeed run concurrently. The commit was backported to v5.10+ stable kernels, so that's the oldest one affected. Add the missing reference acquisition. Abridged stack trace: BUG: unable to handle page fault for address: 00000000091400c0 CPU: 15 PID: 2464 Comm: irq/53-pcie-dpc 6.9.0 RIP: pci_bus_read_config_dword+0x17/0x50 pci_dev_wait() pci_bridge_wait_for_secondary_bus() dpc_reset_link() pcie_do_recovery() dpc_handler() Fixes: 53b54ad074de ("PCI/DPC: Await readiness of secondary bus after reset") Closes: https://lore.kernel.org/r/20240612181625.3604512-3-kbusch@meta.com/ Link: https://lore.kernel.org/linux-pci/8e4bcd4116fd94f592f2bf2749f168099c480ddf.1718707743.git.lukas@wunner.de Reported-by: Keith Busch Tested-by: Keith Busch Signed-off-by: Lukas Wunner Signed-off-by: Krzysztof Wilczyński Reviewed-by: Keith Busch Reviewed-by: Mika Westerberg Cc: stable@vger.kernel.org # v5.10+ commit e61f400d6cf3d598ac3ff88a47b34823f9e1f2d5 Author: Peter Griffin Date: Fri Jun 28 23:35:06 2024 +0100 clk: samsung: gs101: mark gout_hsi2_ufs_embd_i_clk_unipro as critical The system hangs on poweroff when this UFS clock is turned off, meaning the system never powers down. For the moment mark the clock as critical. Reviewed-by: Will McVicker Tested-by: Will McVicker Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20240628223506.1237523-5-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit fd88137bfbb83bee678abef840dcafa13262f5ca Author: Philipp Zabel Date: Tue Jun 25 14:51:41 2024 +0200 reset: tegra-bpmp: allow building under COMPILE_TEST The Tegra BPMP reset driver can be compiled without TEGRA_BPMP being enabled. Allow it to be built under COMPILE_TEST. Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20240625-reset-compile-bpmp-v1-1-647e846303d8@pengutronix.de Signed-off-by: Philipp Zabel commit 6a9c15083b1662a4b7b36e787272deb696d72c24 Author: Kent Gibson Date: Wed Jun 26 13:29:25 2024 +0800 Documentation: gpio: Reconfiguration with unset direction (uAPI v2) Update description of reconfiguration rules, adding requirement that a direction flag be set to enable changing configuration for a line. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240626052925.174272-5-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit e48fe75afa539d110753f7420aa398ef89f8e383 Author: Kent Gibson Date: Wed Jun 26 13:29:24 2024 +0800 Documentation: gpio: Reconfiguration with unset direction (uAPI v1) Update description of reconfiguration rules, adding requirement that a direction flag be set or the configuration is considered invalid. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240626052925.174272-4-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit e51d31c454fbd64e5de8d85c94bb519228f4c78a Author: Christophe JAILLET Date: Sun Jun 23 11:26:50 2024 +0200 xen/manage: Constify struct shutdown_handler 'struct shutdown_handler' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 7043 788 8 7839 1e9f drivers/xen/manage.o After: ===== text data bss dec hex filename 7164 676 8 7848 1ea8 drivers/xen/manage.o Signed-off-by: Christophe JAILLET Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/ca1e75f66aed43191cf608de6593c7d6db9148f1.1719134768.git.christophe.jaillet@wanadoo.fr Signed-off-by: Juergen Gross commit 3ba3ab1f6719287674cf77a1208944cf38ef71c7 Author: Darrick J. Wong Date: Mon Jun 24 08:04:21 2024 -0700 xfs: enable FITRIM on the realtime device Implement FITRIM for the realtime device by pretending that it's "space" immediately after the data device. We have to hold the rtbitmap ILOCK while the discard operations are ongoing because there's no busy extent tracking for the rt volume to prevent reallocations. Cc: Konst Mayer Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit a330cae8a7147890262b06e1aa13db048e3b130f Author: Wenchao Hao Date: Thu Jun 6 17:17:54 2024 +0800 xfs: Remove header files which are included more than once Following warning is reported, so remove these duplicated header including: ./fs/xfs/libxfs/xfs_trans_resv.c: xfs_da_format.h is included more than once. ./fs/xfs/scrub/quota_repair.c: xfs_format.h is included more than once. ./fs/xfs/xfs_handle.c: xfs_da_btree.h is included more than once. ./fs/xfs/xfs_qm_bhv.c: xfs_mount.h is included more than once. ./fs/xfs/xfs_trace.c: xfs_bmap.h is included more than once. This is just a clean code, no logic changed. Signed-off-by: Wenchao Hao Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 4818fd60db5feeeecb84d36d0162c3fb3eccb522 Author: Christoph Hellwig Date: Sun Jun 23 07:44:31 2024 +0200 xfs: fold xfs_ilock_for_write_fault into xfs_write_fault Now that the page fault handler has been refactored, the only caller of xfs_ilock_for_write_fault is simple enough and calls it unconditionally. Fold the logic and expand the comments explaining it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 4e82fa11fbbcc5426366dc2ddc839fd56b9d53de Author: Christoph Hellwig Date: Sun Jun 23 07:44:30 2024 +0200 xfs: always take XFS_MMAPLOCK shared in xfs_dax_read_fault After the previous refactoring, xfs_dax_fault is now never used for write faults, so don't bother with the xfs_ilock_for_write_fault logic to protect against writes when remapping is in progress. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 6a39ec1d394458e59f411edecf7b08ce34bdc7c8 Author: Christoph Hellwig Date: Sun Jun 23 07:44:29 2024 +0200 xfs: refactor __xfs_filemap_fault Split the write fault and DAX fault handling into separate helpers so that the main fault handler is easier to follow. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 9092b1de35a45ec7291156382db7a7ee13bdbb27 Author: Christoph Hellwig Date: Sun Jun 23 07:44:28 2024 +0200 xfs: simplify xfs_dax_fault Replace the separate stub with an IS_ENABLED check, and take the call to dax_finish_sync_fault into xfs_dax_fault instead of leaving it in the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 29bc0dd0a2f6d738fd339826af57cd17f7a39bd9 Author: Christoph Hellwig Date: Sun Jun 23 07:44:27 2024 +0200 xfs: cleanup xfs_ilock_iocb_for_write Move the relock path out of the straight line and add a comment explaining why it exists. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 8626b67acfa424834ad2f321cecc1f768e7f0106 Author: Christoph Hellwig Date: Sun Jun 23 07:44:26 2024 +0200 xfs: move the dio write relocking out of xfs_ilock_for_iomap About half of xfs_ilock_for_iomap deals with a special case for direct I/O writes to COW files that need to take the ilock exclusively. Move this code into the one callers that cares and simplify xfs_ilock_for_iomap. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 0c7fcdb6d06cdf8b19b57c17605215b06afa864a Author: lei lu Date: Fri Jun 14 10:22:53 2024 +0800 xfs: don't walk off the end of a directory data block This adds sanity checks for xfs_dir2_data_unused and xfs_dir2_data_entry to make sure don't stray beyond valid memory region. Before patching, the loop simply checks that the start offset of the dup and dep is within the range. So in a crafted image, if last entry is xfs_dir2_data_unused, we can change dup->length to dup->length-1 and leave 1 byte of space. In the next traversal, this space will be considered as dup or dep. We may encounter an out of bound read when accessing the fixed members. In the patch, we make sure that the remaining bytes large enough to hold an unused entry before accessing xfs_dir2_data_unused and xfs_dir2_data_unused is XFS_DIR2_DATA_ALIGN byte aligned. We also make sure that the remaining bytes large enough to hold a dirent with a single-byte name before accessing xfs_dir2_data_entry. Signed-off-by: lei lu Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit fb63435b7c7dc112b1ae1baea5486e0a6e27b196 Author: lei lu Date: Mon Jun 3 17:46:08 2024 +0800 xfs: add bounds checking to xlog_recover_process_data There is a lack of verification of the space occupied by fixed members of xlog_op_header in the xlog_recover_process_data. We can create a crafted image to trigger an out of bounds read by following these steps: 1) Mount an image of xfs, and do some file operations to leave records 2) Before umounting, copy the image for subsequent steps to simulate abnormal exit. Because umount will ensure that tail_blk and head_blk are the same, which will result in the inability to enter xlog_recover_process_data 3) Write a tool to parse and modify the copied image in step 2 4) Make the end of the xlog_op_header entries only 1 byte away from xlog_rec_header->h_size 5) xlog_rec_header->h_num_logops++ 6) Modify xlog_rec_header->h_crc Fix: Add a check to make sure there is sufficient space to access fixed members of xlog_op_header. Signed-off-by: lei lu Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit f23660f059470ec7043748da7641e84183c23bc8 Author: John Garry Date: Tue May 28 17:15:10 2024 +0000 xfs: Fix xfs_prepare_shift() range for RT The RT extent range must be considered in the xfs_flush_unmap_range() call to stabilize the boundary. This code change is originally from Dave Chinner. Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: John Garry Signed-off-by: Chandan Babu R commit d3b689d7c711a9f36d3e48db9eaa75784a892f4c Author: John Garry Date: Tue May 28 17:15:09 2024 +0000 xfs: Fix xfs_flush_unmap_range() range for RT Currently xfs_flush_unmap_range() does unmap for a full RT extent range, which we also want to ensure is clean and idle. This code change is originally from Dave Chinner. Reviewed-by: Christoph Hellwig 4 Reviewed-by: Darrick J. Wong Signed-off-by: John Garry Signed-off-by: Chandan Babu R commit d40c2865bdbbbba6418436b0a877daebe1d7c63e Author: Gao Xiang Date: Tue May 28 12:12:39 2024 +0800 xfs: avoid redundant AGFL buffer invalidation Currently AGFL blocks can be filled from the following three sources: - allocbt free blocks, as in xfs_allocbt_free_block(); - rmapbt free blocks, as in xfs_rmapbt_free_block(); - refilled from freespace btrees, as in xfs_alloc_fix_freelist(). Originally, allocbt free blocks would be marked as stale only when they put back in the general free space pool as Dave mentioned on IRC, "we don't stale AGF metadata btree blocks when they are returned to the AGFL .. but once they get put back in the general free space pool, we have to make sure the buffers are marked stale as the next user of those blocks might be user data...." However, after commit ca250b1b3d71 ("xfs: invalidate allocbt blocks moved to the free list") and commit edfd9dd54921 ("xfs: move buffer invalidation to xfs_btree_free_block"), even allocbt / bmapbt free blocks will be invalidated immediately since they may fail to pass V5 format validation on writeback even writeback to free space would be safe. IOWs, IMHO currently there is actually no difference of free blocks between AGFL freespace pool and the general free space pool. So let's avoid extra redundant AGFL buffer invalidation, since otherwise we're currently facing unnecessary xfs_log_force() due to xfs_trans_binval() again on buffers already marked as stale before as below: [ 333.507469] Call Trace: [ 333.507862] xfs_buf_find+0x371/0x6a0 <- xfs_buf_lock [ 333.508451] xfs_buf_get_map+0x3f/0x230 [ 333.509062] xfs_trans_get_buf_map+0x11a/0x280 [ 333.509751] xfs_free_agfl_block+0xa1/0xd0 [ 333.510403] xfs_agfl_free_finish_item+0x16e/0x1d0 [ 333.511157] xfs_defer_finish_noroll+0x1ef/0x5c0 [ 333.511871] xfs_defer_finish+0xc/0xa0 [ 333.512471] xfs_itruncate_extents_flags+0x18a/0x5e0 [ 333.513253] xfs_inactive_truncate+0xb8/0x130 [ 333.513930] xfs_inactive+0x223/0x270 xfs_log_force() will take tens of milliseconds with AGF buffer locked. It becomes an unnecessary long latency especially on our PMEM devices with FSDAX enabled and fsops like xfs_reflink_find_shared() at the same time are stuck due to the same AGF lock. Removing the double invalidation on the AGFL blocks does not make this issue go away, but this patch fixes for our workloads in reality and it should also work by the code analysis. Note that I'm not sure I need to remove another redundant one in xfs_alloc_ag_vextent_small() since it's unrelated to our workloads. Also fstests are passed with this patch. Signed-off-by: Gao Xiang Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 5b8feca8dee443055049c8ccfdd97f64a0e1d2b4 Author: Daisuke Nojiri Date: Thu Jun 27 16:53:08 2024 -0700 dt-bindings: input: cros-ec-keyboard: Add keyboard matrix v3.0 Add support for keyboard matrix version 3.0, which reduces keyboard ghosting. Signed-off-by: Daisuke Nojiri Acked-by: Krzysztof Kozlowski Reviewed-by: Dmitry Torokhov Link: https://lore.kernel.org/r/9ae4d96cc2ce8c9de8755b9beffb78c641100fe7.1719531519.git.dnojiri@chromium.org Signed-off-by: Tzung-Bi Shih commit 61842868de13aa7fd7391c626e889f4d6f1450bf Author: Jose Ignacio Tornos Martinez Date: Fri May 10 10:57:22 2024 +0200 module: create weak dependecies It has been seen that for some network mac drivers (i.e. lan78xx) the related module for the phy is loaded dynamically depending on the current hardware. In this case, the associated phy is read using mdio bus and then the associated phy module is loaded during runtime (kernel function phy_request_driver_module). However, no software dependency is defined, so the user tools will no be able to get this dependency. For example, if dracut is used and the hardware is present, lan78xx will be included but no phy module will be added, and in the next restart the device will not work from boot because no related phy will be found during initramfs stage. In order to solve this, we could define a normal 'pre' software dependency in lan78xx module with all the possible phy modules (there may be some), but proceeding in that way, all the possible phy modules would be loaded while only one is necessary. The idea is to create a new type of dependency, that we are going to call 'weak' to be used only by the user tools that need to detect this situation. In that way, for example, dracut could check the 'weak' dependency of the modules involved in order to install these dependencies in initramfs too. That is, for the commented lan78xx module, defining the 'weak' dependency with the possible phy modules list, only the necessary phy would be loaded on demand keeping the same behavior, but all the possible phy modules would be available from initramfs. The 'weak' dependency support has been included in kmod: https://github.com/kmod-project/kmod/commit/05828b4a6e9327a63ef94df544a042b5e9ce4fe7 But, take into account that this can only be used if depmod is new enough. If it isn't, depmod will have the same behavior as always (keeping backward compatibility) and the information for the 'weak' dependency will not be provided. Signed-off-by: Jose Ignacio Tornos Martinez Reviewed-by: Lucas De Marchi Signed-off-by: Luis Chamberlain commit 210457b651acd61fced405cf7fef12a482932ca1 Author: Judith Mendez Date: Wed Jun 12 08:55:32 2024 -0500 counter/ti-eqep: Add new ti-am62-eqep compatible Add new compatible for ti-am62-eqep for TI K3 SoC's. Signed-off-by: Judith Mendez Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20240612135538.2447938-3-jm@ti.com Signed-off-by: William Breathitt Gray commit 151ebcf0797b1a3ba53c8843dc21748c80e098c7 Author: Judith Mendez Date: Wed Jun 12 08:55:31 2024 -0500 dt-bindings: counter: Add new ti,am62-eqep compatible Add new compatible ti,am62-eqep for TI K3 devices. If a device uses this compatible, require power-domains property. Since there is only one functional and interface clock for eqep, clock-names is not really required, so removed from required section, make it optional for ti,am3352-eqep compatible, and update the example. The clock-name also changed for TI K3 SoCs so do not allow clock-names property for the new compatible. Signed-off-by: Judith Mendez Acked-by: Conor Dooley Reviewed-by: David Lechner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612135538.2447938-2-jm@ti.com Signed-off-by: William Breathitt Gray commit 1a84aaadb06b46f044eebf0de3bd3ac77a6ec52e Author: David Lechner Date: Sun Jun 9 15:06:16 2024 -0500 counter: ti-eqep: remove counter_priv() wrapper The ti_eqep_count_from_counter() function is just a wrapper around counter_priv(). counter_priv() can be used directly, so we don't need the wrapper function. Remove it. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20240609-ti-eqep-cleanup-v1-2-9d67939c763a@baylibre.com Signed-off-by: William Breathitt Gray commit bc4666be63bdc7c562cfb2e9ea42cdb2c444a5b2 Author: David Lechner Date: Sun Jun 9 15:06:15 2024 -0500 counter: ti-eqep: remove unused struct member Since commit 8817c2d03a85 ("counter: ti-eqep: Convert to counter_priv() wrapper") the counter field in struct ti_eqep_cnt is not used anymore. Remove it. Signed-off-by: David Lechner Reviewed-by: Judith Mendez Link: https://lore.kernel.org/r/20240609-ti-eqep-cleanup-v1-1-9d67939c763a@baylibre.com Signed-off-by: William Breathitt Gray commit 10365dd4c1842d0da422b56c5aa3827db0ca08d8 Author: David Lechner Date: Sun Jun 9 16:49:33 2024 -0500 counter: ti-eqep: implement over/underflow events This adds support to the TI eQEP counter driver for subscribing to overflow and underflow events using the counter chrdev interface. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20240609-counter-ti-eqep-over-under-events-v1-1-74fe1632f5ab@baylibre.com Signed-off-by: William Breathitt Gray commit 5f81aa76771eb43769c919064d4d5a52424857c3 Author: Jeff Johnson Date: Sun Jun 2 15:05:20 2024 -0700 counter: ftm-quaddec: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/counter/ftm-quaddec.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-ftm-quaddec-v1-1-1bbdf705ad31@quicinc.com Signed-off-by: William Breathitt Gray commit b3e992f69c239b0eb99c408c1ca9cd4253d2e7ad Author: Guenter Roeck Date: Sun Jun 30 13:08:40 2024 -0700 hwmon: (jc42) Strengthen detect function Configuration register bit 5 must read 0 for all JC42.4 compliant chips. Several capability register bits must be set for all TSE2004 compliant chips. Use that information to strengthen the detect function. Signed-off-by: Guenter Roeck commit c98cf41dfbab71e3c6d71061c182fafde0bf0f99 Author: Guenter Roeck Date: Sun Jun 30 09:32:10 2024 -0700 hwmon: (jc42) Use common device ID for TSE2004av compliant sensors TSE2004av standardizes the device ID of compliant temperature sensors to be 0x22xx, where xx is the device revision. Use a single define for all TSE2004av compliant temperature sensors, and relax the device id mask to match the upper 8 bit of the device id register. Signed-off-by: Guenter Roeck commit ef8df816eea8b985bec1b8fc838c737fbdb4f8b0 Author: Armin Wolf Date: Fri Jun 28 23:47:23 2024 +0200 hwmon: (dell-smm) Add Dell OptiPlex 7060 to DMI table The BIOS on this machine is buggy and will in some cases return an error when trying to get the fan state, but reading of the RPM values and the temperature sensors still works. Closes: https://github.com/vitorafsr/i8kutils/issues/38 Signed-off-by: Armin Wolf Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20240628214723.19665-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 0ce1d34678e5d214746ee4887f9f7714c39e331f Author: Samuel Holland Date: Sat Jun 22 23:07:31 2024 +0800 riscv: dts: allwinner: Add ClockworkPi and DevTerm devicetrees Clockwork Tech manufactures several SoMs for their RasPi CM3-compatible "ClockworkPi" mainboard. Their R-01 SoM features the Allwinner D1 SoC. The R-01 contains only the CPU, DRAM, and always-on voltage regulation; it does not merit a separate devicetree. The ClockworkPi mainboard features analog audio, a MIPI-DSI panel, USB host and peripheral ports, an Ampak AP6256 WiFi/Bluetooth module, and an X-Powers AXP228 PMIC for managing a Li-ion battery. The DevTerm is a complete system which extends the ClockworkPi mainboard with a MIPI-DSI panel and a pair of expansion boards. These expansion boards provide a fan, a USB keyboard, speakers, and a thermal printer. Acked-by: Palmer Dabbelt Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20240622150731.1105901-4-wens@kernel.org Signed-off-by: Chen-Yu Tsai commit 8f2cf4442b49365031f62f7d97484989251b0707 Author: Chen-Yu Tsai Date: Sat Jun 22 23:07:30 2024 +0800 riscv: dts: allwinner: d1s-t113: Add system LDOs Now that the bindings for the system LDOs have been merged, the nodes for the system LDOs can be added. These are used on the ClockworkPi. This was originally part of Samuel's D1 device tree series [1], but was dropped in v5 as the regulator bindings weren't merged at the time. [1] https://lore.kernel.org/linux-sunxi/20221231233851.24923-1-samuel@sholland.org/ Link: https://lore.kernel.org/r/20240622150731.1105901-3-wens@kernel.org Signed-off-by: Chen-Yu Tsai commit 3a6fb9025cdf975146b2f2e3771b67f03c4ca3dc Author: Samuel Holland Date: Sat Jun 22 23:07:29 2024 +0800 dt-bindings: sram: sunxi-sram: Add regulators child Some sunxi SoCs have in-package regulators controlled by a register in the system control MMIO block. Allow a child node for this regulator device in addition to SRAM child nodes. Signed-off-by: Samuel Holland Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240622150731.1105901-2-wens@kernel.org Signed-off-by: Chen-Yu Tsai commit 0630e3bc0e91b57288921df2927859b23184ca45 Author: Jeff Johnson Date: Fri Jun 7 15:02:58 2024 -0700 pcmcia: add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/pcmcia_rsrc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/yenta_socket.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/i82092.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes files which did not produce a warning with the x86 allmodconfig since they may cause this warning with other configurations. Signed-off-by: Jeff Johnson [linux@dominikbrodowski.net: modify some descriptions] Signed-off-by: Dominik Brodowski commit 24a025497e7e883bd2adef5d0ece1e9b9268009f Author: Jules Irenge Date: Sun May 12 23:31:21 2024 +0100 pcmcia: Use resource_size function on resource object Cocinnele reports a warning WARNING: Suspicious code. resource_size is maybe missing with root The root cause is the function resource_size is not used when needed Use resource_size() on variable "root" of type resource Signed-off-by: Jules Irenge Signed-off-by: Dominik Brodowski commit 02d51503324cb699ef248ece47cbdc2f2a61eb73 Author: Krzysztof Kozlowski Date: Wed Mar 27 18:46:47 2024 +0100 pcmcia: bcm63xx: drop driver owner assignment Core in platform_driver_register() already sets the .owner, so driver does not need to. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dominik Brodowski commit 6dba0c39fa788e07d1b94edeaac35e7e02ed9a79 Author: Nuno Sa Date: Thu Jun 6 09:22:40 2024 +0200 iio: common: scmi_iio: convert to dev_err_probe() Make use of dev_err_probe() and dev_err_ptr_probe() to simplify error paths during probe. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240606-dev-add_dev_errp_probe-v3-4-51bb229edd79@analog.com Signed-off-by: Jonathan Cameron commit ac5189293acb85b3d6da4fc18c3374f0daf69594 Author: Nuno Sa Date: Thu Jun 6 09:22:39 2024 +0200 iio: backend: make use of dev_err_cast_probe() Using dev_err_cast_probe() to simplify the code. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240606-dev-add_dev_errp_probe-v3-3-51bb229edd79@analog.com Signed-off-by: Jonathan Cameron commit a00838cae079b9b9b90969c2b7b031b1bfd9ab3a Author: Nuno Sa Date: Thu Jun 6 09:22:38 2024 +0200 iio: temperature: ltc2983: convert to dev_err_probe() Use dev_err_probe() (and variants) in the probe() path. While at it, made some simple improvements: * Explicitly included the err.h and errno.h headers; * Removed some unnecessary line breaks; * Removed a redundant 'else'; * Added some missing \n to prink. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240606-dev-add_dev_errp_probe-v3-2-51bb229edd79@analog.com Signed-off-by: Jonathan Cameron commit dbbe7eaf0e4795bf003ac06872aaf52b6b6b1310 Author: Nuno Sa Date: Thu Jun 6 09:22:37 2024 +0200 dev_printk: add new dev_err_probe() helpers This is similar to dev_err_probe() but for cases where an ERR_PTR() or ERR_CAST() is to be returned simplifying patterns like: dev_err_probe(dev, ret, ...); return ERR_PTR(ret) or dev_err_probe(dev, PTR_ERR(ptr), ...); return ERR_CAST(ptr) Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240606-dev-add_dev_errp_probe-v3-1-51bb229edd79@analog.com Signed-off-by: Jonathan Cameron commit aa9e366bb0bf457c7cff3d72276f5dfa43d5a244 Author: Sean Anderson Date: Thu Jun 20 16:48:42 2024 -0400 iio: xilinx-ams: Add labels Label all the channels using names from the reference manual. Some of the "control" channels are duplicates of other channels. The reference manual describes it like: > The AMS register set includes several measurement registers that are > written to by the PS SYSMON unit using the single-channel mode > (sequencer off). These voltage measurements are performed using the > unipolar sampling circuit with a 0 to 3V range and do not have alarms > or minimum/maximum registers. So I think these really are measuring the same voltages but in a different location. In which case, sharing labels makes sense to me. Signed-off-by: Sean Anderson Link: https://patch.msgid.link/20240620204842.817237-1-sean.anderson@linux.dev Signed-off-by: Jonathan Cameron commit 340fa834ae229a952db04a57ed13fd5d35d75818 Author: David Lechner Date: Mon Jun 24 15:46:08 2024 -0500 iio: adc: ad7944: use devm_spi_optimize_message() Use new devm_spi_optimize_message() helper to simplify repeated code in the ad7944 driver. Signed-off-by: David Lechner Link: https://patch.msgid.link/20240624-devm_spi_optimize_message-v3-2-912138c27b66@baylibre.com Signed-off-by: Jonathan Cameron commit 4f291b30163737103e60bdc7c4d62a7121b0d715 Merge: ebe061b9cc80d 7e74a45c7afdd Author: Jonathan Cameron Date: Sun Jun 30 11:36:58 2024 +0100 Merge tag 'spi-devm-optimize' into togreg spi: add devm_spi_optimize_message() helper Helper from David Lechner : In the IIO subsystem, we are finding that it is common to call spi_optimize_message() during driver probe since the SPI message doesn't change for the lifetime of the driver. This patch adds a devm_spi_optimize_message() helper to simplify this common pattern. commit ebe061b9cc80dfff68fa6a46d412d85d67b68be3 Author: Paul Cercueil Date: Thu Jun 20 14:27:25 2024 +0200 Documentation: iio: Document high-speed DMABUF based API Document the new DMABUF based API. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Reviewed-by: Bagas Sanjaya Link: https://patch.msgid.link/20240620122726.41232-7-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit 7a86d469983ace116c320680643f4991019e87f1 Author: Paul Cercueil Date: Thu Jun 20 14:27:24 2024 +0200 iio: buffer-dmaengine: Support new DMABUF based userspace API Use the functions provided by the buffer-dma core to implement the DMABUF userspace API in the buffer-dmaengine IIO buffer implementation. Since we want to be able to transfer an arbitrary number of bytes and not necesarily the full DMABUF, the associated scatterlist is converted to an array of DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240620122726.41232-6-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit d85318900c1c06a251ad3d86fba6bbab116a95d5 Author: Paul Cercueil Date: Thu Jun 20 14:27:23 2024 +0200 iio: buffer-dma: Enable support for DMABUFs Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240620122726.41232-5-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit 3e26d9f08fbe0b73e951a5e810fdb7a332b7e37f Author: Paul Cercueil Date: Thu Jun 20 14:27:22 2024 +0200 iio: core: Add new DMABUF interface infrastructure Add the necessary infrastructure to the IIO core to support a new optional DMABUF based interface. With this new interface, DMABUF objects (externally created) can be attached to a IIO buffer, and subsequently used for data transfer. A userspace application can then use this interface to share DMABUF objects between several interfaces, allowing it to transfer data in a zero-copy fashion, for instance between IIO and the USB stack. The userspace application can also memory-map the DMABUF objects, and access the sample data directly. The advantage of doing this vs. the read() interface is that it avoids an extra copy of the data between the kernel and userspace. This is particularly userful for high-speed devices which produce several megabytes or even gigabytes of data per second. As part of the interface, 3 new IOCTLs have been added: IIO_BUFFER_DMABUF_ATTACH_IOCTL(int fd): Attach the DMABUF object identified by the given file descriptor to the buffer. IIO_BUFFER_DMABUF_DETACH_IOCTL(int fd): Detach the DMABUF object identified by the given file descriptor from the buffer. Note that closing the IIO buffer's file descriptor will automatically detach all previously attached DMABUF objects. IIO_BUFFER_DMABUF_ENQUEUE_IOCTL(struct iio_dmabuf *): Request a data transfer to/from the given DMABUF object. Its file descriptor, as well as the transfer size and flags are provided in the "iio_dmabuf" structure. These three IOCTLs have to be performed on the IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240620122726.41232-4-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit da5a6fa00170cf8beb5fcc31566ef39547f7c2d9 Merge: 13ed07f45944a 380afccc2a55e Author: Jonathan Cameron Date: Sun Jun 30 11:25:15 2024 +0100 Merge tag 'dmaengine_topic_dma_vec' into togreg Dmaengine topic - New device_prep_peripheral_dma_vec, documentation and user commit 0c94f58cef319ad054fd909b3bf4b7d09c03e11c Author: Dragan Simic Date: Mon Jun 17 22:22:02 2024 +0200 drm/lima: Mark simple_ondemand governor as softdep Lima DRM driver uses devfreq to perform DVFS, while using simple_ondemand devfreq governor by default. This causes driver initialization to fail on boot when simple_ondemand governor isn't built into the kernel statically, as a result of the missing module dependency and, consequently, the required governor module not being included in the initial ramdisk. Thus, let's mark simple_ondemand governor as a softdep for Lima, to have its kernel module included in the initial ramdisk. This is a rather longstanding issue that has forced distributions to build devfreq governors statically into their kernels, [1][2] or may have forced some users to introduce unnecessary workarounds. Having simple_ondemand marked as a softdep for Lima may not resolve this issue for all Linux distributions. In particular, it will remain unresolved for the distributions whose utilities for the initial ramdisk generation do not handle the available softdep information [3] properly yet. However, some Linux distributions already handle softdeps properly while generating their initial ramdisks, [4] and this is a prerequisite step in the right direction for the distributions that don't handle them properly yet. [1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/blob/6.7-megi/config?ref_type=heads#L5749 [2] https://gitlab.com/postmarketOS/pmaports/-/blob/7f64e287e7732c9eaa029653e73ca3d4ba1c8598/main/linux-postmarketos-allwinner/config-postmarketos-allwinner.aarch64#L4654 [3] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0b59052999de577ab732b719cfbeb89504d [4] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f4489054668ad Cc: Philip Muller Cc: Oliver Smith Cc: Daniel Smith Cc: stable@vger.kernel.org Fixes: 1996970773a3 ("drm/lima: Add optional devfreq and cooling device support") Signed-off-by: Dragan Simic Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/fdaf2e41bb6a0c5118ff9cc21f4f62583208d885.1718655070.git.dsimic@manjaro.org commit 13ed07f45944aedcfc2154218c34bb8ad5f5147e Author: Alisa-Dariana Roman Date: Mon Jun 24 15:49:41 2024 +0300 MAINTAINERS: Update AD7192 driver maintainer Alexandru Tachici has not been active. Also the email address included is not reachable anymore. I was assigned to work on the driver instead. Remove Alexandru Tachici and add myself as maintainer of AD7192 driver. Signed-off-by: Alisa-Dariana Roman Reviewed-by: Conor Dooley Link: https://patch.msgid.link/20240624124941.113010-7-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit 0d2775c18b5d7bfa33bddb575b88e53c4cfdf644 Author: David Lechner Date: Mon Jun 24 15:49:36 2024 +0300 iio: adc: ad7192: use devm_regulator_get_enable_read_voltage This makes use of the new devm_regulator_get_enable_read_voltage() function to reduce boilerplate code. Error messages have changed slightly since there are now fewer places where we print an error. The rest of the logic of selecting which supply to use as the reference voltage remains the same. Also 1000 is replaced by MILLI in a few places for consistency. Signed-off-by: David Lechner Signed-off-by: Alisa-Dariana Roman Reviewed-by: Conor Dooley Link: https://patch.msgid.link/20240624124941.113010-2-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit a0157b5aa34eb43ec4c5510f9c260bbb03be937e Author: Dikshita Agarwal Date: Thu May 9 10:44:29 2024 +0530 media: venus: fix use after free in vdec_close There appears to be a possible use after free with vdec_close(). The firmware will add buffer release work to the work queue through HFI callbacks as a normal part of decoding. Randomly closing the decoder device from userspace during normal decoding can incur a read after free for inst. Fix it by cancelling the work in vdec_close. Cc: stable@vger.kernel.org Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Signed-off-by: Dikshita Agarwal Acked-by: Vikash Garodia Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 193b3dac29a441fb72d2bbc3b4c4ebf2961e3c27 Author: Pierre-Hugues Husson Date: Tue Jun 4 18:43:07 2024 +0200 media: venus: add msm8998 support Add the missing bits for msm8998 support. Downstream vendor code for reference: https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/ kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi#L42-53 qcom,load-freq-tbl = /* Encoders */ <972000 465000000 0x55555555>, /* 4k UHD @ 30 */ <489600 360000000 0x55555555>, /* 1080p @ 60 */ <244800 186000000 0x55555555>, /* 1080p @ 30 */ <108000 100000000 0x55555555>, /* 720p @ 30 */ /* Decoders */ <1944000 465000000 0xffffffff>, /* 4k UHD @ 60 */ < 972000 360000000 0xffffffff>, /* 4k UHD @ 30 */ < 489600 186000000 0xffffffff>, /* 1080p @ 60 */ < 244800 100000000 0xffffffff>; /* 1080p @ 30 */ Signed-off-by: Pierre-Hugues Husson Signed-off-by: Marc Gonzalez Reviewed-by: Bryan O'Donoghue Acked-by: Vikash Garodia Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 599a0bc7f1eddf9311678b8b6c1e0969c868681f Author: Marc Gonzalez Date: Tue Jun 4 18:42:04 2024 +0200 dt-bindings: media: add qcom,msm8998-venus msm8998 has the same video encode/decode accelerator as msm8996. Signed-off-by: Marc Gonzalez Reviewed-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 02e92ea83b9166b87771c90c76754bd661c5645f Author: Dikshita Agarwal Date: Wed Mar 6 11:23:26 2024 +0530 media: venus: avoid multiple core dumps Core dump is generated whenever there is system error reported by firmware. Right now, multiple such dumps are generated if recovery fails in first attempt, since the sys error handler is invoked again for every failed recovery. To avoid it, add conditional check to generate core dump only once during every system error notification from firmware. Signed-off-by: Dikshita Agarwal Reviewed-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil [hverkuil: document new dump_core field] commit e750a4b1224142bd8dd057b0d5adf8a5608b7e77 Author: Dikshita Agarwal Date: Wed Jan 10 11:42:14 2024 +0530 media: venus: flush all buffers in output plane streamoff For scenarios, when source change is followed by VIDIOC_STREAMOFF on output plane, driver should discard any queued OUTPUT buffers, which are not decoded or dequeued. Flush with HFI_FLUSH_INPUT does not have any actual impact. So, fix it, by invoking HFI_FLUSH_ALL, which will flush all queued buffers. Fixes: 85872f861d4c ("media: venus: Mark last capture buffer") Signed-off-by: Dikshita Agarwal Tested-by: Nathan Hebert Reviewed-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 2c4c53f316f6922211c41ff391ea4eff09e00339 Author: Akhil P Oommen Date: Sat Jun 29 07:19:36 2024 +0530 drm/msm/adreno: Introduce gmu_chipid for a740 & a750 To simplify, introduce the new gmu_chipid for a740 & a750 GPUs. Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/601396/ Signed-off-by: Rob Clark commit d6225e0cd096ade35b136a7d2cc5f4f2da63971c Author: Akhil P Oommen Date: Sat Jun 29 07:19:35 2024 +0530 drm/msm/adreno: Add support for X185 GPU Add support in drm/msm driver for the Adreno X185 gpu found in Snapdragon X1 Elite chipset. Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/601399/ Signed-off-by: Rob Clark commit e5598ffcdc5b87fb4b5e9b143d6dca85eb4f6730 Author: Akhil P Oommen Date: Sat Jun 29 07:19:34 2024 +0530 dt-bindings: display/msm/gmu: Add Adreno X185 GMU Document Adreno X185 GMU in the dt-binding specification. Signed-off-by: Akhil P Oommen Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/601395/ Signed-off-by: Rob Clark commit cc2ccd19d9ffc0e2b711edf6291b4ae825e28912 Author: Neil Armstrong Date: Wed Jun 26 14:04:21 2024 +0200 drm/msm/adreno: fix a743 and a740 cx mem init Disable the call to qcom_scm_gpu_init_regs() for a730 and a740 after init failures on the HDK8550 and HDK8450 platforms: msm_dpu ae01000.display-controller: failed to load adreno gpu msm_dpu ae01000.display-controller: failed to bind 3d00000.gpu (ops a3xx_ops [msm]): -5 msm_dpu ae01000.display-controller: adev bind failed: -5 While debugging, it happens the call to: qcom_scm_gpu_init_regs(QCOM_SCM_GPU_ALWAYS_EN_REQ) returns -5 and makes the gpu fail to initialize. Remove the scm call since it's not done downstream either and works fine without. Fixes: 14b27d5df3ea ("drm/msm/a7xx: Initialize a750 "software fuse"") Signed-off-by: Neil Armstrong Reviewed-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/600972/ Signed-off-by: Rob Clark commit 181914b1de65913c0a73485c3cbda4741699147e Author: Neil Armstrong Date: Wed Jun 26 09:53:16 2024 +0200 drm/msm/adreno: fix a7xx gpu init The gpulist has twice the a6xx gpulist, replace the second one with the a7xx gpulist. Solves: msm_dpu ae01000.display-controller: Unknown GPU revision: 7.3.0.1 msm_dpu ae01000.display-controller: Unknown GPU revision: 67.5.10.1 msm_dpu ae01000.display-controller: Unknown GPU revision: 67.5.20.1 on SM8450, SM8550 & SM8560. Fixes: 8ed322f632a9 ("drm/msm/adreno: Split up giant device table") Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/600939/ Signed-off-by: Rob Clark commit add158507aeb7bddbf61d5ec4af7268c04ca4655 Author: Konrad Dybcio Date: Tue Jun 25 20:54:42 2024 +0200 Revert "drm/msm/a6xx: Poll for GBIF unhalt status in hw_init" Commit f6ebff4fe810 ("drm/msm/adreno: De-spaghettify the use of memory barriers") made some fixups relating to write arrival, ensuring that the GPU's memory interface has *really really really* been told to come out of reset. That in turn rendered the hacky commit being reverted no longer necessary. Get rid of it. This reverts commit b77532803d11 ("drm/msm/a6xx: Poll for GBIF unhalt status in hw_init") Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/600870/ Reviewed-by: Akhil P Oommen Signed-off-by: Rob Clark commit 43ec1a202cfa9f765412d325b93873284e7c3d82 Author: Konrad Dybcio Date: Tue Jun 25 20:54:41 2024 +0200 drm/msm/adreno: De-spaghettify the use of memory barriers Memory barriers help ensure instruction ordering, NOT time and order of actual write arrival at other observers (e.g. memory-mapped IP). On architectures employing weak memory ordering, the latter can be a giant pain point, and it has been as part of this driver. Moreover, the gpu_/gmu_ accessors already use non-relaxed versions of readl/writel, which include r/w (respectively) barriers. Replace the barriers with a readback (or drop altogether where possible) that ensures the previous writes have exited the write buffer (as the CPU must flush the write to the register it's trying to read back). Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/600869/ Reviewed-by: Akhil P Oommen Signed-off-by: Rob Clark commit 2c49151b3fff6d8fbb87c4582c14ab548dc23538 Author: Yoshihiro Shimoda Date: Tue Jun 11 21:50:55 2024 +0900 PCI: rcar-gen4: Add .ltssm_control() for other SoC support Sequence for controlling the LTSSM state machine is going to change for SoCs like r8a779f0. Move the LTSSM code to a new callback ltssm_control() and populate it for each SoCs. This also warrants the addition of new compatibles for r8a779g0 and r8a779h0. But since they are already part of the DT binding, it won't make any difference. Link: https://lore.kernel.org/linux-pci/20240611125057.1232873-4-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit ac1d89f8dcc3c7ffad2948839b8aef1260f30bf9 Author: Yoshihiro Shimoda Date: Tue Jun 11 21:50:54 2024 +0900 PCI: rcar-gen4: Add struct rcar_gen4_pcie_drvdata In order to support future SoCs such as r8a779g0 (R-Car V4H) and r8a779h0 (R-Car V4M) that require different initialization settings, introduce SoC specific driver data with the initial member being the device mode. No functional change. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240611125057.1232873-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 544a18c936f99245bca5b990039152b816abc4ee Author: Yoshihiro Shimoda Date: Tue Jun 11 21:50:53 2024 +0900 PCI: dwc: Add PCIE_PORT_{FORCE,LANE_SKEW} macros R-Car Gen4 PCIe controller needs to use the Synopsys-specific PCIe configuration registers. So, add the macros. Link: https://lore.kernel.org/linux-pci/20240611125057.1232873-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit a3c2c5c937ed7562b6d120670f2743e979c05881 Author: Kaustabh Chakraborty Date: Tue Jun 25 13:57:55 2024 +0530 iio: st_sensors: relax WhoAmI check in st_sensors_verify_id() Hard matching against the WhoAmI values isn't ideal for using devices which are compatible with existing ones. Instead of raising an error, issue a warning instead, thus allowing the driver to continue probing. Suggested-by: Jonathan Cameron Signed-off-by: Kaustabh Chakraborty Link: https://patch.msgid.link/20240625082800.62305-1-kauschluss@disroot.org Signed-off-by: Jonathan Cameron commit fd2adf37c26593f3e4587bfa824bac64b1149b33 Author: Subhajit Ghosh Date: Wed Jun 26 23:22:31 2024 +0930 MAINTAINERS: Add AVAGO APDS9306 Add myself as maintainer of APDS9306 ambient light sensor driver. Signed-off-by: Subhajit Ghosh Link: https://patch.msgid.link/20240626135231.8937-1-subhajit.ghosh@tweaklogic.com Signed-off-by: Jonathan Cameron commit 555b1a1f208fd200c3fb618378faa5b1c0cdd786 Author: Guillaume Stols Date: Fri Jun 28 14:48:20 2024 +0000 dt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names AD7606-8 is referred to as AD7606 by Analog Devices. This comment aims to avoid confusion. Also the compatible names were not sorted by alphabetical order. Signed-off-by: Guillaume Stols Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240628-cleanup-ad7606-v2-2-96e02f90256d@baylibre.com Signed-off-by: Jonathan Cameron commit 93a81104629dcee04b5b39f48d43320fcda80fda Author: Guillaume Stols Date: Fri Jun 28 14:48:19 2024 +0000 dt-bindings: iio: adc: adi,ad7606: add missing datasheet link Add AD7606-5 datasheet link. Signed-off-by: Guillaume Stols Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240628-cleanup-ad7606-v2-1-96e02f90256d@baylibre.com Signed-off-by: Jonathan Cameron commit 3afa157f43b3671f8453ac41dc8651c1feb76179 Author: Jeff Johnson Date: Mon Jun 17 12:53:52 2024 -0700 EDAC: Add missing MODULE_DESCRIPTION() macros With ARCH=arm64 make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/edac/layerscape_edac_mod.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes mpc85xx_edac.c and four octeon_edac-*.c files which, although they did not produce a warning with the arm64 allmodconfig configuration, may cause this warning with other configurations. [ bp: s/module/driver/ for layerscape_edac ] Signed-off-by: Jeff Johnson Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240617-md-arm64-drivers-edac-v2-1-6d6c5dd1e5da@quicinc.com commit 34b3fc558b537bdf99644dcde539e151716f6331 Author: Andrew Cooper Date: Wed May 29 19:36:05 2024 +0100 x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines The outer if () should have been dropped when switching to c->x86_vfm. Fixes: 6568fc18c2f6 ("x86/cpu/intel: Switch to new Intel CPU model defines") Signed-off-by: Andrew Cooper Signed-off-by: Borislav Petkov (AMD) Acked-by: Tony Luck Link: https://lore.kernel.org/r/20240529183605.17520-1-andrew.cooper3@citrix.com commit 8e04a24ba5ddfb43fa29028ee31bb35c133e665c Author: Jeff Johnson Date: Wed Jun 26 10:15:43 2024 -0700 media: videobuf2: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/common/videobuf2/videobuf2-dvb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil [hverkuil: helpers library -> helper library] commit 361e2ff5cefe10da266ced01845ab0b08112a1fd Author: Nils Rothaug Date: Sun Jun 23 12:46:47 2024 +0200 media: em28xx: Set GPIOs for non-audio boards when switching input Fixes changing the Line Out audio source with the video input on MyGica UTV3 board. Previously, GPIOs were only set in em28xx_set_audio_source(), which only boards with USB audio support reach. Signed-off-by: Nils Rothaug Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit ceac017e1292913a256f1d90ff367e9e868f1c86 Author: Nils Rothaug Date: Sun Jun 23 12:46:46 2024 +0200 media: em28xx: Add support for MyGica UTV3 The MyGica UTV3 Analog USB2.0 TV Box is a USB video capture card that has analog TV, composite video, and FM radio inputs, an IR remote, and provides audio only as Line Out, but not over USB. Mine is prepared for an FM tuner, but not equipped with one. Support for FM radio is therefore missing. The device contains: - Empia EM2860 USB bridge - Philips SAA7113 video decoder - NXP TDA9801T demodulator - Tena TNF931D-DFDR1 tuner - ST HCF4052 demux, switches input audio to Line Out Signed-off-by: Nils Rothaug Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit fbf657d5fde81413e19938a629ad3018ee82c6ca Author: Nils Rothaug Date: Sun Jun 23 12:46:45 2024 +0200 media: dt-bindings: rc: add rc-mygica-utv3 Add a binding for the rc-mygica-utv3 keymap Signed-off-by: Nils Rothaug Acked-by: Rob Herring (Arm) Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit e31604d5922ef76a58bd3f9ae719486887eb266e Author: Nils Rothaug Date: Sun Jun 23 12:46:44 2024 +0200 media: rc: add keymap for MyGica UTV3 remote Add keymap for the simple IR (RC-5) remote that comes with the MyGica UTV3 Analog USB2.0 TV Box video capture card. Signed-off-by: Nils Rothaug Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 32c1935280f11ef03efdb069aa46c0bc631eab7d Author: Nils Rothaug Date: Sun Jun 23 12:46:43 2024 +0200 media: tuner-simple: Add support for Tena TNF931D-DFDR1 Tuner ranges were determined by USB capturing the vendor driver of a MyGica UTV3 video capture card. Signed-off-by: Nils Rothaug Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 4caf6d93d9f2c11d6441c64e1c549c445fa322ed Author: Chen Ni Date: Fri Jun 21 09:35:22 2024 +0800 media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse Add check for the return value of v4l2_fwnode_endpoint_parse() and return the error if it fails in order to catch the error. Signed-off-by: Chen Ni Signed-off-by: Hans Verkuil commit 4f0200f0c373231d4a03dcbb1a834aca72cd8cd8 Author: Jeff Johnson Date: Wed Jun 12 21:04:30 2024 -0700 media: dvb-usb: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/usb/dvb-usb/dvb-usb-dibusb-common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/usb/dvb-usb/dvb-usb-dibusb-mc-common.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 33a1ec476d6fb889e26781052c59f00259ec15a4 Author: Jeff Johnson Date: Wed Jun 12 16:58:59 2024 -0700 usb: uvc: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/common/uvc.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil commit bec6bec031943c3a6b797d3af99dade3586e3b91 Author: Jeff Johnson Date: Wed Jun 12 11:19:49 2024 -0700 media: uda1342: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/i2c/uda1342.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit ddaa23afcb2e1a8e1b9b212c96d5af5b40a8f078 Author: Jeff Johnson Date: Tue Jun 11 20:21:34 2024 -0700 media: dvb-frontends: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/dvb-frontends/au8522_decoder.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/dvb-frontends/mb86a16.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 427527e701e28ebeddba70f08b4f576e42ae5a27 Author: Jeff Johnson Date: Mon Jun 10 17:34:04 2024 -0700 media: atomisp: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/media/atomisp/i2c/atomisp-mt9m114.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/media/atomisp/i2c/atomisp-libmsrlisthelper.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 9d7d3a3b00ff2068ef73d6de904f08e331d07e00 Author: Jeff Johnson Date: Sun Jun 9 14:32:49 2024 -0700 media: ti: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/ti/vpe/ti-vpdma.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit e28bfde3f0cd6d59b2b1b7b3b443848d75b7dcad Author: Jeff Johnson Date: Sun Jun 9 14:03:08 2024 -0700 media: exynos4-is: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/samsung/exynos4-is/exynos-fimc-lite.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/samsung/exynos4-is/exynos-fimc-is.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/samsung/exynos4-is/exynos4-is-common.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit b1e6eef535dfc4ad32332e227c5757ded4512aa2 Author: Milen Mitkov Date: Wed May 22 18:46:59 2024 +0300 media: qcom: camss: Decouple VFE from CSID Decouple the direct calls to VFE's vfe_get/put in the CSID subdev in order to prepare for the introduction of IFE subdev. Also decouple CSID base address from VFE since on the Titan platform CSID register base address resides within VFE's base address. Signed-off-by: Milen Mitkov Signed-off-by: Gjorgji Rosikopulos Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 73ac545caf45fbb7a8ab45df47a0fd9e401d51f8 Author: Atanas Filipov Date: Wed May 22 18:46:58 2024 +0300 media: qcom: camss: Decompose register and link operations Split link and register operations. Add dedicated link callback according to SoC identifier. Signed-off-by: Atanas Filipov Signed-off-by: Gjorgji Rosikopulos Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 729fc005c8e2a8533edad8b3cdd9d8ec8057fed7 Author: Milen Mitkov Date: Wed May 22 18:46:57 2024 +0300 media: qcom: camss: Split testgen, RDI and RX for CSID 170 Split the RAW interface (RDI), the CSID receiver (RX) and test pattern generator (testgen), configurations for CSID on Titan 170 Signed-off-by: Milen Mitkov Signed-off-by: Gjorgji Rosikopulos Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil [hverkuil: folded https://lore.kernel.org/linux-media/20240626074730.85-1-quic_grosikop@quicinc.com/ into this patch] commit ad458cb90f2c380b750294e72baf53b609a911e1 Author: Radoslav Tsvetkov Date: Wed May 22 18:46:56 2024 +0300 media: qcom: camss: Move format related functions Move out the format related helper functions from vfe and video in a separate file. The goal here is to create a format API. Signed-off-by: Radoslav Tsvetkov Signed-off-by: Gjorgji Rosikopulos Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit e05d1be95880cc359c5a32f9f168e18b4538d776 Author: Radoslav Tsvetkov Date: Wed May 22 18:46:55 2024 +0300 media: qcom: camss: Attach formats to CSIPHY resources Following the example of VFE and CSID, attach the CSIPHY formats to the subdevices resources. Signed-off-by: Radoslav Tsvetkov Signed-off-by: Gjorgji Rosikopulos Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 57cf33cc204bffab75a79b98a5932b48a6653d12 Author: Radoslav Tsvetkov Date: Wed May 22 18:46:54 2024 +0300 media: qcom: camss: Attach formats to CSID resources Following the example of VFE, move all formats of the decoder to camss-csid.c and attach them to the subdevices resources. Signed-off-by: Radoslav Tsvetkov Signed-off-by: Gjorgji Rosikopulos Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 6c46cb0d0aa0a9339d317d55fd3895caa0e655d4 Author: Radoslav Tsvetkov Date: Wed May 22 18:46:53 2024 +0300 media: qcom: camss: Attach formats to VFE resources Video node formats have direct dependency by the sub-device pad formats. Remove dependency for SoC version and move format definitions in device which creates video node. This commit attaches a struct to the VFE resources that holds format description, so it is much easier to assign them to the video node. No need to use a switch-case. NOTE: The mbus_bpp is used to calculate the clock rates and is different from bpp which is the bits per pixel written to memory. We need to keep both values to not break the calcualtions. Signed-off-by: Radoslav Tsvetkov Signed-off-by: Gjorgji Rosikopulos Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit ae44829a4a97a34486a89dbafc2653e9cbf896dd Author: Radoslav Tsvetkov Date: Wed May 22 18:46:52 2024 +0300 media: qcom: camss: Add per sub-device type resources Currently resources structure grows with additional parameters required for each sub-deivce. However each sub-device has some specific resources or configurations which need to be passed during the initialization. This change adds per sub-device type structure to simplify the things and removes the magical void pointer to hw_ops. Signed-off-by: Radoslav Tsvetkov Signed-off-by: Gjorgji Rosikopulos Signed-off-by: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # sc8280xp/sm8250/sdm845/apq8016 Acked-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b Author: Thomas Weißschuh Date: Fri Apr 26 13:08:58 2024 +0200 selftests: kselftest: also use strerror() on nolibc nolibc gained an implementation of strerror() recently. Use it and drop the ifdeffery. Acked-by: Shuah Khan Signed-off-by: Thomas Weißschuh commit d20d0b10f883085a44afd1a3af1bbd77ed53acf7 Author: Thomas Weißschuh Date: Fri Apr 26 13:08:57 2024 +0200 tools/nolibc: implement strerror() strerror() is commonly used. For example in kselftest which currently needs to do an #ifdef NOLIBC to handle the lack of strerror(). Keep it simple and reuse the output format of perror() for strerror(). Acked-by: Shuah Khan Signed-off-by: Thomas Weißschuh commit 582facfa5a71c8211714ffe74f5167d403b968a7 Author: Thomas Weißschuh Date: Fri Apr 26 13:08:56 2024 +0200 selftests/nolibc: introduce condition to run tests only on nolibc Some tests only make sense on nolibc. To avoid gaps in the test numbers do to inline "#ifdef NOLIBC", add a condition to formally skip these tests. Acked-by: Shuah Khan Signed-off-by: Thomas Weißschuh commit 0cf24d36bb2723da861edb5cca30656fe2637cf7 Author: Thomas Weißschuh Date: Thu Apr 25 18:09:27 2024 +0200 tools/nolibc: implement strtol() and friends The implementation always works on uintmax_t values. This is inefficient when only 32bit are needed. However for all functions this only happens for strtol() on 32bit platforms. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20240425-nolibc-strtol-v1-2-bfeef7846902@weissschuh.net commit 8c3bd8bc40c2c6b1569c042407f9efedf2f1dee5 Author: Thomas Weißschuh Date: Thu Apr 25 18:09:26 2024 +0200 tools/nolibc: add limits for {u,}intmax_t, ulong and {u,}llong They are useful for users and necessary for strtol() and friends. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20240425-nolibc-strtol-v1-1-bfeef7846902@weissschuh.net commit 774e6ef284a90ba317992387ddebedddae29b910 Author: Thomas Weißschuh Date: Tue Apr 23 18:26:06 2024 +0200 selftests/nolibc: run-tests.sh: use -Werror by default run-tests.sh hides the output from the compiler unless the compilation fails. To recognize newly introduced warnings use -Werror by default. Also add a switch to disable -Werror in case the warnings are expected. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20240423-nolibc-werror-v1-1-e6f0bd66eb45@weissschuh.net commit 6cada28465f692a730051c9586a324926c034152 Author: Thomas Weißschuh Date: Wed Apr 24 00:15:33 2024 +0200 selftests/nolibc: disable brk()/sbrk() tests on musl On musl calls to brk() and sbrk() always fail with ENOMEM. Detect this and skip the tests on musl. Tested on glibc 2.39 and musl 1.2.5 in addition to nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20240424-nolibc-musl-brk-v1-1-b49882dd9a93@weissschuh.net commit 92098b1c10cb29bcc6fa0908a766dc9e16b1e889 Author: Thomas Weißschuh Date: Mon May 27 18:15:58 2024 +0200 selftests/nolibc: fix printf format mismatch in expect_str_buf_eq() Fix the following compiler warning on 32bit: i386-linux-gcc -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra -fno-stack-protector -m32 -mstack-protector-guard=global -fstack-protector-all -o nolibc-test \ -nostdlib -nostdinc -static -Isysroot/i386/include nolibc-test.c nolibc-test-linkage.c -lgcc nolibc-test.c: In function 'expect_str_buf_eq': nolibc-test.c:610:30: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] 610 | llen += printf(" = %lu <%s> ", expr, buf); | ~~^ ~~~~ | | | | | size_t {aka unsigned int} | long unsigned int | %u Fixes: 1063649cf531 ("selftests/nolibc: Add tests for strlcat() and strlcpy()") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh commit 2a49c8b6b6d0dba9c5a4e921f07fbd7a8ad7a5f1 Author: Jeff Johnson Date: Sat Jun 22 07:55:05 2024 -0700 selftests/fpu: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 now reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_fpu.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240622-md-i386-lib-test_fpu_glue-v1-1-a4e40b7b1264@quicinc.com Fixes: 9613736d852d ("selftests/fpu: move FP code to a separate translation unit") Signed-off-by: Jeff Johnson Reviewed-by: Samuel Holland Signed-off-by: Andrew Morton commit 7c812814e8c34a41bff6fe49987760ffaf8702af Author: Alexey Dobriyan Date: Mon Jun 24 18:39:49 2024 +0300 compiler.h: simplify data_race() macro -Wdeclaration-after-statement used since forever required statement expressions to inject __kcsan_disable_current(), __kcsan_enable_current() to mark data race. Now that it is gone, make macro expansion simpler. __unqual_scalar_typeof() is wordy macro by itself. "expr" is expanded twice. Link: https://lkml.kernel.org/r/fb62163f-ba21-4661-be5b-bb5124abc87d@p183 Signed-off-by: Alexey Dobriyan Reviewed-by: Marco Elver Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 961a2851324561caed579764ffbee3db82b32829 Author: Alexey Dobriyan Date: Fri Jun 21 21:39:33 2024 +0300 build-id: require program headers to be right after ELF header Neither ELF spec not ELF loader require program header to be placed right after ELF header, but build-id code very much assumes such placement: See find_get_page(vma->vm_file->f_mapping, 0); line and checks against PAGE_SIZE. Returns errors for now until someone rewrites build-id parser to be more inline with load_elf_binary(). Link: https://lkml.kernel.org/r/d58bc281-6ca7-467a-9a64-40fa214bd63e@p183 Signed-off-by: Alexey Dobriyan Reviewed-by: Jiri Olsa Signed-off-by: Andrew Morton commit 6073496a20c5e2e8eee63c50af4b30fb2f521643 Author: Jeff Johnson Date: Wed May 29 16:31:58 2024 -0700 resource: add missing MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/resource_kunit.o Link: https://lkml.kernel.org/r/20240529-md-kernel-resource_kunit-v1-1-bb719784b714@quicinc.com Signed-off-by: Jeff Johnson Cc: Andy Shevchenko Cc: Greg Kroah-Hartman Cc: Rafael J. Wysocki Signed-off-by: Andrew Morton commit 9059044b6717b0c100e3ad63c5bad3ec13df0fc4 Author: Jeff Johnson Date: Sat Jun 1 17:50:27 2024 -0700 kfifo: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/bytestream-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/dma-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/inttype-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/record-example.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240601-md-samples-kfifo-v1-1-de34345c5fd8@quicinc.com Signed-off-by: Jeff Johnson Cc: Greg Kroah-Hartman Cc: Stefani Seibold Signed-off-by: Andrew Morton commit 9d938f40b228a18a9521936337f2da7f393d5120 Author: Kuan-Ying Lee Date: Wed Jun 19 15:49:11 2024 +0800 scripts/gdb: rename pool_index to pool_index_plus_1 We encounter the following issue after commit a6c1d9cb9a68 ("stackdepot: rename pool_index to pool_index_plus_1"). (gdb) lx-dump-page-owner --pfn 262144 ... Python Exception : There is no member named pool_index. Error occurred in Python: There is no member named pool_index. We rename pool_index to pool_index_plus_1 to fix this issue. Link: https://lkml.kernel.org/r/20240619074911.100434-7-kuan-ying.lee@canonical.com Fixes: a6c1d9cb9a68 ("stackdepot: rename pool_index to pool_index_plus_1") Signed-off-by: Kuan-Ying Lee Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kirill A. Shutemov Cc: Michael Ellerman Signed-off-by: Andrew Morton commit 7d8742bf853cc1d4faf08840cc64414ad5f34061 Author: Kuan-Ying Lee Date: Wed Jun 19 15:49:10 2024 +0800 scripts/gdb: change VA_BITS_MIN when we use 16K page Change VA_BITS_MIN when we use 16K page. Link: https://lkml.kernel.org/r/20240619074911.100434-6-kuan-ying.lee@canonical.com Fixes: 9684ec186f8f ("arm64: Enable LPA2 at boot if supported by the system") Signed-off-by: Kuan-Ying Lee Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kirill A. Shutemov Cc: Michael Ellerman Signed-off-by: Andrew Morton commit 04a40baec04fa0634d71ebfa0c91469160a9976e Author: Kuan-Ying Lee Date: Wed Jun 19 15:49:09 2024 +0800 scripts/gdb: set vabits_actual based on TCR_EL1 We encounter the following issue after commit 9cce9c6c2c3b ("arm64: mm: Handle LVA support as a CPU feature"). (gdb) lx-slabinfo Python Exception : No symbol "vabits_actual" in current context. Error occurred in Python: No symbol "vabits_actual" in current context. We set vabits_actual based on TCR_EL1 value when VA_BITS is bigger than 48. Link: https://lkml.kernel.org/r/20240619074911.100434-5-kuan-ying.lee@canonical.com Fixes: 9cce9c6c2c3b ("arm64: mm: Handle LVA support as a CPU feature") Signed-off-by: Kuan-Ying Lee Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kirill A. Shutemov Cc: Michael Ellerman Signed-off-by: Andrew Morton commit 3c0e9a200434e8bb4a2bffbaaeb381bdff5a5938 Author: Kuan-Ying Lee Date: Wed Jun 19 15:49:08 2024 +0800 scripts/gdb: change the layout of vmemmap We need to change the layout of vmemmap in gdb scripts after commit 32697ff38287 ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") changed it. Link: https://lkml.kernel.org/r/20240619074911.100434-4-kuan-ying.lee@canonical.com Fixes: 32697ff38287 ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") Signed-off-by: Kuan-Ying Lee Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kirill A. Shutemov Cc: Michael Ellerman Signed-off-by: Andrew Morton commit f2eaed1565acc2bdeb5c433f5f6c7bd7a0d62db1 Author: Kuan-Ying Lee Date: Wed Jun 19 15:49:07 2024 +0800 scripts/gdb: rework module VA range After we enlarge the module VA range, we also change the module VA range in gdb scripts. Link: https://lkml.kernel.org/r/20240619074911.100434-3-kuan-ying.lee@canonical.com Fixes: 3e35d303ab7d ("arm64: module: rework module VA range selection") Signed-off-by: Kuan-Ying Lee Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kirill A. Shutemov Cc: Michael Ellerman Signed-off-by: Andrew Morton commit 63ce5947ef45071d825d4712d6c5ece13f1ce2f6 Author: Kuan-Ying Lee Date: Wed Jun 19 15:49:06 2024 +0800 scripts/gdb: redefine MAX_ORDER sanely Patch series "Fix GDB command error". This patchset fixes some GDB command errors. 1. Since memory layout of AARCH64 has been changed, we need to modify the layout in GDB scripts as well. 2. Fix pool_index naming of stackdepot. This patch (of 6): Change the definition of MAX_ORDER to be inclusive. Link: https://lkml.kernel.org/r/20240619074911.100434-1-kuan-ying.lee@canonical.com Link: https://lkml.kernel.org/r/20240619074911.100434-2-kuan-ying.lee@canonical.com Fixes: 23baf831a32c ("mm, treewide: redefine MAX_ORDER sanely") Signed-off-by: Kuan-Ying Lee Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kirill A. Shutemov Cc: Michael Ellerman Signed-off-by: Andrew Morton commit b8c7dd15ceb87e5f37ec1ed7b56c279d98f3eb53 Author: Jesse Brandeburg Date: Tue Jun 11 17:12:22 2024 -0700 kernel-wide: fix spelling mistakes like "assocative" -> "associative" There were several instances of the string "assocat" in the kernel, which should have been spelled "associat", with the various endings of -ive, -ed, -ion, and sometimes beginnging with dis-. Add to the spelling dictionary the corrections so that future instances will be caught by checkpatch, and fix the instances found. Originally noticed by accident with a 'git grep socat'. Link: https://lkml.kernel.org/r/20240612001247.356867-1-jesse.brandeburg@intel.com Signed-off-by: Jesse Brandeburg Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 2d87af0666d0b5838e3e3e6430c6498df8bf6ad5 Author: Amer Al Shanawany Date: Mon Jun 3 14:42:20 2024 +0200 selftests: proc: remove unreached code and fix build warning fix the following warning: proc-empty-vm.c:385:17: warning: ignoring return value of `write' declared with attribute `warn_unused_result' [-Wunused-result] 385 | write(1, buf, rv); | ^~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/20240603124220.33778-1-amer.shanawany@gmail.com Signed-off-by: Amer Al Shanawany Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202404010211.ygidvMwa-lkp@intel.com/ Cc: Alexey Dobriyan Cc: Hugh Dickins Cc: Javier Carrasco Cc: Shuah Khan Cc: Swarup Laxman Kotiaklapudi Signed-off-by: Andrew Morton commit 6f3283df275b19bdea8158a2e2d8ad181995022b Author: Sidhartha Kumar Date: Wed Jun 26 16:21:00 2024 -0700 tools/testing/radix-tree/idr-test: add missing MODULE_DESCRIPTION define Userspace builds of the radix-tree testing suite fails because of patch KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.ko. Add the proper defines to tools/testing/radix-tree/idr-test.c so MODULE_DESCRIPTION has a definition. This allows the build to succeed. Link: https://lkml.kernel.org/r/20240626232100.306130-1-sidhartha.kumar@oracle.com Fixes: f069e33dafe1 ("KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.ko") Signed-off-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett Cc: Jeff Johnson Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 30972a4ea092bacb9784fe251327571be6a99f9c Merge: c2dd2139e0cd0 b859316e82181 Author: Jakub Kicinski Date: Fri Jun 28 18:51:38 2024 -0700 Merge branch 'ethtool-track-custom-rss-contexts-in-the-core' Edward Cree says: ==================== ethtool: track custom RSS contexts in the core Make the core responsible for tracking the set of custom RSS contexts, their IDs, indirection tables, hash keys, and hash functions; this lets us get rid of duplicative code in drivers, and will allow us to support netlink dumps later. This series only moves the sfc EF10 & EF100 driver over to the new API; other drivers (mvpp2, octeontx2, mlx5, sfc/siena, bnxt_en) can be converted afterwards and the legacy API removed. ==================== Link: https://patch.msgid.link/cover.1719502239.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit b859316e8218107f03dab83f1455fa46e949cd7c Author: Edward Cree Date: Thu Jun 27 16:33:54 2024 +0100 sfc: remove get_rxfh_context dead code The core now always satisfies 'ethtool -x context nonzero' from its own tracking, so our lookup code for that case is never called. Remove it. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/b426fcc416dedc8f203e52eebef6891eccebe4c1.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 7964e7884643d56d4ecd0e2b92190f8a361cea48 Author: Edward Cree Date: Thu Jun 27 16:33:53 2024 +0100 net: ethtool: use the tracking array for get_rxfh on custom RSS contexts On 'ethtool -x' with rss_context != 0, instead of calling the driver to read the RSS settings for the context, just get the settings from the rss_ctx xarray, and return them to the user with no driver involvement. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/2d0190fa29638f307ea720f882ebd41f6f867694.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit a9ee8d4a97d8ea0004615fe1f2c1ce6aff5c1a14 Author: Edward Cree Date: Thu Jun 27 16:33:52 2024 +0100 sfc: use new rxfh_context API The core is now responsible for allocating IDs and a memory region for us to store our state (struct efx_rss_context_priv), so we no longer need efx_alloc_rss_context_entry() and friends. Since the contexts are now maintained by the core, use the core's lock (net_dev->ethtool->rss_lock), rather than our own mutex (efx->rss_lock), to serialise access against changes; and remove the now-unused efx->rss_lock from struct efx_nic. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/150274740ea8cc137fef5502541ce573d32fb319.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 87925151191b64d9623e63ccf11e517eacc99d7d Author: Edward Cree Date: Thu Jun 27 16:33:51 2024 +0100 net: ethtool: add a mutex protecting RSS contexts While this is not needed to serialise the ethtool entry points (which are all under RTNL), drivers may have cause to asynchronously access dev->ethtool->rss_ctx; taking dev->ethtool->rss_lock allows them to do this safely without needing to take the RTNL. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/7f9c15eb7525bf87af62c275dde3a8570ee8bf0a.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 30a32cdf6b130356805b3193a6208de25cbb2015 Author: Edward Cree Date: Thu Jun 27 16:33:50 2024 +0100 net: ethtool: add an extack parameter to new rxfh_context APIs Currently passed as NULL, but will allow drivers to report back errors when ethnl support for these ops is added. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/6e0012347d175fdd1280363d7bfa76a2f2777e17.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 847a8ab186767be6ee95643f9739fa9d0f839589 Author: Edward Cree Date: Thu Jun 27 16:33:49 2024 +0100 net: ethtool: let the core choose RSS context IDs Add a new API to create/modify/remove RSS contexts, that passes in the newly-chosen context ID (not as a pointer) rather than leaving the driver to choose it on create. Also pass in the ctx, allowing drivers to easily use its private data area to store their hardware-specific state. Keep the existing .set_rxfh API for now as a fallback, but deprecate it for custom contexts (rss_context != 0). Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/45f1fe61df2163c091ec394c9f52000c8b16cc3b.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit eac9122f0c41b832065e01977c34946ec8e76c24 Author: Edward Cree Date: Thu Jun 27 16:33:48 2024 +0100 net: ethtool: record custom RSS contexts in the XArray Since drivers are still choosing the context IDs, we have to force the XArray to use the ID they've chosen rather than picking one ourselves, and handle the case where they give us an ID that's already in use. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/801f5faa4cec87c65b2c6e27fb220c944bce593a.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 6ad2962f8adfd53fca52dce7f830783e95d99ce7 Author: Edward Cree Date: Thu Jun 27 16:33:47 2024 +0100 net: ethtool: attach an XArray of custom RSS contexts to a netdevice Each context stores the RXFH settings (indir, key, and hfunc) as well as optionally some driver private data. Delete any still-existing contexts at netdev unregister time. Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/cbd1c402cec38f2e03124f2ab65b4ae4e08bd90d.1719502240.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit 3ebbd9f6de7ec6d538639ebb657246f629ace81e Author: Edward Cree Date: Thu Jun 27 16:33:46 2024 +0100 net: move ethtool-related netdev state into its own struct net_dev->ethtool is a pointer to new struct ethtool_netdev_state, which currently contains only the wol_enabled field. Suggested-by: Jakub Kicinski Signed-off-by: Edward Cree Reviewed-by: Przemek Kitszel Link: https://patch.msgid.link/293a562278371de7534ed1eb17531838ca090633.1719502239.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski commit c2dd2139e0cd0a567d68f0ca7215dcfe627e7afc Merge: bf7bb7b43097d 0759356bf5fad Author: Jakub Kicinski Date: Fri Jun 28 18:39:43 2024 -0700 Merge branch 'selftests-drv-net-add-ability-to-schedule-cleanup-with-defer' Jakub Kicinski says: ==================== selftests: drv-net: add ability to schedule cleanup with defer() Introduce a defer / cleanup mechanism for driver selftests. More detailed info in the second patch. ==================== Link: https://patch.msgid.link/20240627185502.3069139-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0759356bf5fadbd16794bec982a9af48351a02ff Author: Jakub Kicinski Date: Thu Jun 27 11:55:02 2024 -0700 selftests: drv-net: rss_ctx: convert to defer() Use just added defer(). Reviewed-by: Petr Machata Link: https://patch.msgid.link/20240627185502.3069139-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8510801a9dbd9f0d64079d7061d3452efc752550 Author: Jakub Kicinski Date: Thu Jun 27 11:55:01 2024 -0700 selftests: drv-net: add ability to schedule cleanup with defer() This implements what I was describing in [1]. When writing a test author can schedule cleanup / undo actions right after the creation completes, eg: cmd("touch /tmp/file") defer(cmd, "rm /tmp/file") defer() takes the function name as first argument, and the rest are arguments for that function. defer()red functions are called in inverse order after test exits. It's also possible to capture them and execute earlier (in which case they get automatically de-queued). undo = defer(cmd, "rm /tmp/file") # ... some unsafe code ... undo.exec() As a nice safety all exceptions from defer()ed calls are captured, printed, and ignored (they do make the test fail, however). This addresses the common problem of exceptions in cleanup paths often being unhandled, leading to potential leaks. There is a global action queue, flushed by ksft_run(). We could support function level defers too, I guess, but there's no immediate need.. Link: https://lore.kernel.org/all/877cedb2ki.fsf@nvidia.com/ # [1] Reviewed-by: Przemek Kitszel Reviewed-by: Petr Machata Link: https://patch.msgid.link/20240627185502.3069139-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 147997afaad0ce4835233e7fddacc9e2be7eb087 Author: Jakub Kicinski Date: Thu Jun 27 11:55:00 2024 -0700 selftests: net: ksft: avoid continue when handling results Exception handlers print the result and use continue to skip the non-exception result printing. This makes inserting common post-test code hard. Refactor to avoid the continues and have only one ktap_result() call. Reviewed-by: Petr Machata Link: https://patch.msgid.link/20240627185502.3069139-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit bf7bb7b43097d8c2b8673c5ea8a6b64a1f6090b0 Author: Jon Kohler Date: Thu Jun 27 13:20:13 2024 -0700 enic: add ethtool get_channel support Add .get_channel to enic_ethtool_ops to enable basic ethtool -l support to get the current channel configuration. Note that the driver does not support dynamically changing queue configuration, so .set_channel is intentionally unused. Instead, users should use Cisco's hardware management tools (UCSM/IMC) to modify virtual interface card configuration out of band. Signed-off-by: Jon Kohler Link: https://patch.msgid.link/20240627202013.2398217-1-jon@nutanix.com Signed-off-by: Jakub Kicinski commit db2dede28d824261cd79db98f37c4437371d11b8 Merge: 748e3bbf47212 3e400219c04dc Author: Jakub Kicinski Date: Fri Jun 28 18:13:07 2024 -0700 Merge branch 'lift-udp_segment-restriction-for-egress-via-device-w-o-csum-offload' Jakub Sitnicki says: ==================== Lift UDP_SEGMENT restriction for egress via device w/o csum offload This is a follow-up to an earlier question [1] if we can make UDP GSO work with any egress device, even those with no checksum offload capability. That's the default setup for TUN/TAP. Because there is a change in behavior - sendmsg() does no longer return EIO error - I'm submitting through net-next tree, rather than net, as per Willem's advice. [1] https://lore.kernel.org/netdev/87jzqsld6q.fsf@cloudflare.com/ v1: https://lore.kernel.org/r/20240622-linux-udpgso-v1-0-d2344157ab2a@cloudflare.com ==================== Link: https://patch.msgid.link/20240626-linux-udpgso-v2-0-422dfcbd6b48@cloudflare.com Signed-off-by: Jakub Kicinski commit 3e400219c04dcfcada224303c8efa2c91beaae0b Author: Jakub Sitnicki Date: Wed Jun 26 19:51:27 2024 +0200 selftests/net: Add test coverage for UDP GSO software fallback Extend the existing test to exercise UDP GSO egress through devices with various offload capabilities, including lack of checksum offload, which is the default case for TUN/TAP devices. Test against a dummy device because it is simpler to set up then TUN/TAP. Signed-off-by: Jakub Sitnicki Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240626-linux-udpgso-v2-2-422dfcbd6b48@cloudflare.com Signed-off-by: Jakub Kicinski commit 10154dbded6d6a2fecaebdfda206609de0f121a9 Author: Jakub Sitnicki Date: Wed Jun 26 19:51:26 2024 +0200 udp: Allow GSO transmit from devices with no checksum offload Today sending a UDP GSO packet from a TUN device results in an EIO error: import fcntl, os, struct from socket import * TUNSETIFF = 0x400454CA IFF_TUN = 0x0001 IFF_NO_PI = 0x1000 UDP_SEGMENT = 103 tun_fd = os.open("/dev/net/tun", os.O_RDWR) ifr = struct.pack("16sH", b"tun0", IFF_TUN | IFF_NO_PI) fcntl.ioctl(tun_fd, TUNSETIFF, ifr) os.system("ip addr add 192.0.2.1/24 dev tun0") os.system("ip link set dev tun0 up") s = socket(AF_INET, SOCK_DGRAM) s.setsockopt(SOL_UDP, UDP_SEGMENT, 1200) s.sendto(b"x" * 3000, ("192.0.2.2", 9)) # EIO This is due to a check in the udp stack if the egress device offers checksum offload. While TUN/TAP devices, by default, don't advertise this capability because it requires support from the TUN/TAP reader. However, the GSO stack has a software fallback for checksum calculation, which we can use. This way we don't force UDP_SEGMENT users to handle the EIO error and implement a segmentation fallback. Lift the restriction so that UDP_SEGMENT can be used with any egress device. We also need to adjust the UDP GSO code to match the GSO stack expectation about ip_summed field, as set in commit 8d63bee643f1 ("net: avoid skb_warn_bad_offload false positives on UFO"). Otherwise we will hit the bad offload check. Users should, however, expect a potential performance impact when batch-sending packets with UDP_SEGMENT without checksum offload on the egress device. In such case the packet payload is read twice: first during the sendmsg syscall when copying data from user memory, and then in the GSO stack for checksum computation. This double memory read can be less efficient than a regular sendmsg where the checksum is calculated during the initial data copy from user memory. Signed-off-by: Jakub Sitnicki Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240626-linux-udpgso-v2-1-422dfcbd6b48@cloudflare.com Signed-off-by: Jakub Kicinski commit 82222ee7e84cb03158935e053c4c4960ac1debbd Author: Isaku Yamahata Date: Wed Jun 12 11:16:12 2024 -0700 KVM: selftests: Add test for configure of x86 APIC bus frequency Test if KVM emulates the APIC bus clock at the expected frequency when userspace configures the frequency via KVM_CAP_X86_APIC_BUS_CYCLES_NS. Set APIC timer's initial count to the maximum value and busy wait for 100 msec (largely arbitrary) using the TSC. Read the APIC timer's "current count" to calculate the actual APIC bus clock frequency based on TSC frequency. Suggested-by: Sean Christopherson Signed-off-by: Isaku Yamahata Co-developed-by: Reinette Chatre Signed-off-by: Reinette Chatre Link: https://lore.kernel.org/r/2fccf35715b5ba8aec5e5708d86ad7015b8d74e6.1718214999.git.reinette.chatre@intel.com Signed-off-by: Sean Christopherson commit 7c459517252ebbad515a0b6f972454962ca549e2 Author: Dmitry Torokhov Date: Sun Jun 9 16:47:55 2024 -0700 Input: ili210x - use guard notation when disabling and reenabling IRQ This makes the code more compact and error handling more robust. Link: https://lore.kernel.org/r/20240609234757.610273-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit ac7e0839daf19a125c4d8f26a102868770cfd48f Author: Dmitry Torokhov Date: Sun Jun 9 16:47:54 2024 -0700 Input: ili210x - switch to using cleanup functions in firmware code Start using __free() attributes to simplify the code and error handling. Link: https://lore.kernel.org/r/20240609234757.610273-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 17f5eebf6780eee50f887542e1833fda95f53e4d Author: Dmitry Torokhov Date: Sun Jun 9 16:47:53 2024 -0700 Input: ili210x - use kvmalloc() to allocate buffer for firmware update Allocating a contiguous buffer of 64K may fail if memory is sufficiently fragmented, and may cause OOM kill of an unrelated process. However we do not need to have contiguous memory. We also do not need to zero out the buffer since it will be overwritten with firmware data. Switch to using kvmalloc() instead of kzalloc(). Link: https://lore.kernel.org/r/20240609234757.610273-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit f2845b4f1b2d459ca2ddbcaf165b1dab0b366ea6 Author: Dmitry Torokhov Date: Sun Jun 9 16:51:32 2024 -0700 Input: rohm_bu21023 - switch to using cleanup functions Start using __free() and guard() primitives to simplify the code and error handling. Link: https://lore.kernel.org/r/20240609235134.614592-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit bf5cba8cf5c5843c5e6f51f0db846181904ef6f8 Author: Dmitry Torokhov Date: Sun Jun 9 16:51:31 2024 -0700 Input: rohm_bu21023 - switch to using sysfs_emit() sysfs_emit() is preferred over snprintf() for sysfs attribute handling. Link: https://lore.kernel.org/r/20240609235134.614592-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 4a56aea539c9c5e8bf6a6a8b72d2d82ca8d5a311 Author: Dmitry Torokhov Date: Sun Jun 9 16:51:30 2024 -0700 Input: rohm_bu21023 - factor out settings update code The code to toggle axis swapping and inversion is repetitive and can be factored out. Link: https://lore.kernel.org/r/20240609235134.614592-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 03db8425cc716b60b6254e1f4368f7b967b30149 Author: Dmitry Torokhov Date: Tue Jun 11 22:42:32 2024 -0700 Input: goodix_berlin - use __free() cleanup in SPI transport Switch the driver to use __free(kfree) cleanup facility instead of freeing memory by hand. Link: https://lore.kernel.org/r/Zmk1SGwVt3rIbbMU@google.com Signed-off-by: Dmitry Torokhov commit 68bf7a8cc5f3ec6630d6a8b2675288694b1a5f63 Author: Dmitry Torokhov Date: Tue Jun 11 22:31:42 2024 -0700 Input: wacom_w8001 - use "guard" notation when acquiring mutex Switch the driver to use guard notation when acquiring mutex to have it released automatically. Link: https://lore.kernel.org/r/Zmkyvkr9AFyywy1V@google.com Signed-off-by: Dmitry Torokhov commit 810ecbefdd54b4c18aea467b68d45d2b86865142 Author: Changyuan Lyu Date: Sun Jun 23 09:45:41 2024 -0700 KVM: Documentation: Correct the VGIC V2 CPU interface addr space size In arch/arm64/include/uapi/asm/kvm.h, we have #define KVM_VGIC_V2_CPU_SIZE 0x2000 So the CPU interface address space should cover 8 KByte not 4 KByte. Signed-off-by: Changyuan Lyu Link: https://lore.kernel.org/r/20240623164542.2999626-3-changyuanl@google.com Signed-off-by: Oliver Upton commit 03bd36a387b85089a38ff37a9646f7e0a1249fe4 Author: Changyuan Lyu Date: Sun Jun 23 09:45:40 2024 -0700 KVM: Documentation: Enumerate allowed value macros of `irq_type` The expression `irq_type[n]` may confuse readers to interpret `n` as the bit position and think of CPU = 1 << 0, SPI = 1 << 1, and PPI = 1 << 2. Since arch/arm64/include/uapi/asm/kvm.h already has macro definitions for the allowed values, this commit uses these symbols to clear up the ambiguity. Signed-off-by: Changyuan Lyu Link: https://lore.kernel.org/r/20240623164542.2999626-2-changyuanl@google.com Signed-off-by: Oliver Upton commit dc1d234cdd4ac5bf1aa903d9ef0d34470b3faa14 Author: Changyuan Lyu Date: Sun Jun 23 09:45:39 2024 -0700 KVM: Documentation: Fix typo `BFD` BDF is the acronym for Bus, Device, Function. Signed-off-by: Changyuan Lyu Link: https://lore.kernel.org/r/20240623164542.2999626-1-changyuanl@google.com Signed-off-by: Oliver Upton commit cdaed24abf835d9e94322b5298120a104b2775bb Author: Roman Storozhenko Date: Wed Jun 26 18:45:17 2024 +0200 cpupower: Disable direct build of the 'bench' subproject Execution of the 'make' command in the 'bench' subfolder causes the following error: $ make O=cpupower/build/ DESTDIR=cpupower/install/ -j8 " CC " cpupower/build//main.o " CC " cpupower/build//parse.o /bin/sh: 1: " CC "cpupower/build//system.o CC : not found make: *** [Makefile:21: cpupower/build//main.o] Error 127 make: *** Waiting for unfinished jobs.... /bin/sh: 1: CC : not found /bin/sh: 1: CC : not found make: *** [Makefile:21: cpupower/build//parse.o] Error 127 make: *** [Makefile:21: cpupower/build//system.o] Error 127 The makefile uses variables defined in the main project makefile and it is not intended to run standalone. The reason is that 'bench' subproject depends on the 'libcpupower' library, see the 'compile-bench' target in the main makefile. Add a check that prevents standalone execution of the 'bench' makefile. Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit ae44fa998ee280303ee5dffe99cb669e4c245706 Merge: 69e2326a21ef4 3a0a88fcbaf9e Author: Marc Kleine-Budde Date: Fri Jun 28 23:49:37 2024 +0200 Merge patch series "can: mcp251xfd: workaround for erratum DS80000789E 6 of mcp2518fd" Marc Kleine-Budde says: This patch series tries to work around erratum DS80000789E 6 of the mcp2518fd, found by Stefan Althöfer, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. Erratum DS80000789E 6 says "reading of the FIFOCI bits in the FIFOSTA register for an RX FIFO may be corrupted". However observation shows that this problem is not limited to RX FIFOs but also effects the TEF FIFO. In the bad case, the driver reads a too large head index. In the original code, the driver always trusted the read value. For the RX FIDO this caused old, already processed CAN frames or new, incompletely written CAN frames to be (re-)processed. To work around this issue, keep a per FIFO timestamp of the last valid received CAN frame and compare against the timestamp of every received CAN frame. Further tests showed that this workaround can recognize old CAN frames, but a small time window remains in which partially written CAN frames are not recognized but then processed. These CAN frames have the correct data and time stamps, but the DLC has not yet been updated. For the TEF FIFO the original driver already detects the error, update the error handling with the knowledge that it is causes by this erratum. Link: https://lore.kernel.org/all/20240628-mcp251xfd-workaround-erratum-6-v4-0-53586f168524@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 3a0a88fcbaf9e027ecca3fe8775be9700b4d6460 Author: Marc Kleine-Budde Date: Sun Jan 22 22:35:03 2023 +0100 can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd This patch updates the workaround for a problem similar to erratum DS80000789E 6 of the mcp2518fd, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. Erratum DS80000789E 6 says "reading of the FIFOCI bits in the FIFOSTA register for an RX FIFO may be corrupted". However observation shows that this problem is not limited to RX FIFOs but also effects the TEF FIFO. In the bad case, the driver reads a too large head index. As the FIFO is implemented as a ring buffer, this results in re-handling old CAN transmit complete events. Every transmit complete event contains with a sequence number that equals to the sequence number of the corresponding TX request. This way old TX complete events can be detected. If the original driver detects a non matching sequence number, it prints an info message and tries again later. As wrong sequence numbers can be explained by the erratum DS80000789E 6, demote the info message to debug level, streamline the code and update the comments. Keep the behavior: If an old CAN TX complete event is detected, abort the iteration and mark the number of valid CAN TX complete events as processed in the chip by incrementing the FIFO's tail index. Cc: Stefan Althöfer Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit b8e0ddd36ce9536ad7478dd27df06c9ae92370ba Author: Marc Kleine-Budde Date: Sun Jan 22 21:30:41 2023 +0100 can: mcp251xfd: tef: prepare to workaround broken TEF FIFO tail index erratum This is a preparatory patch to work around a problem similar to erratum DS80000789E 6 of the mcp2518fd, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. Erratum DS80000789E 6 says "reading of the FIFOCI bits in the FIFOSTA register for an RX FIFO may be corrupted". However observation shows that this problem is not limited to RX FIFOs but also effects the TEF FIFO. When handling the TEF interrupt, the driver reads the FIFO header index from the TEF FIFO STA register of the chip. In the bad case, the driver reads a too large head index. In the original code, the driver always trusted the read value, which caused old CAN transmit complete events that were already processed to be re-processed. Instead of reading and trusting the head index, read the head index and calculate the number of CAN frames that were supposedly received - replace mcp251xfd_tef_ring_update() with mcp251xfd_get_tef_len(). The mcp251xfd_handle_tefif() function reads the CAN transmit complete events from the chip, iterates over them and pushes them into the network stack. The original driver already contains code to detect old CAN transmit complete events, that will be updated in the next patch. Cc: Stefan Althöfer Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 24436be590c6fbb05f6161b0dfba7d9da60214aa Author: Marc Kleine-Budde Date: Wed Jan 11 11:53:50 2023 +0100 can: mcp251xfd: rx: add workaround for erratum DS80000789E 6 of mcp2518fd This patch tries to works around erratum DS80000789E 6 of the mcp2518fd, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. In the bad case, the driver reads a too large head index. In the original code, the driver always trusted the read value, which caused old, already processed CAN frames or new, incompletely written CAN frames to be (re-)processed. To work around this issue, keep a per FIFO timestamp [1] of the last valid received CAN frame and compare against the timestamp of every received CAN frame. If an old CAN frame is detected, abort the iteration and mark the number of valid CAN frames as processed in the chip by incrementing the FIFO's tail index. Further tests showed that this workaround can recognize old CAN frames, but a small time window remains in which partially written CAN frames [2] are not recognized but then processed. These CAN frames have the correct data and time stamps, but the DLC has not yet been updated. [1] As the raw timestamp overflows every 107 seconds (at the usual clock rate of 40 MHz) convert it to nanoseconds with the timecounter framework and use this to detect stale CAN frames. Link: https://lore.kernel.org/all/BL3PR11MB64844C1C95CA3BDADAE4D8CCFBC99@BL3PR11MB6484.namprd11.prod.outlook.com [2] Reported-by: Stefan Althöfer Closes: https://lore.kernel.org/all/FR0P281MB1966273C216630B120ABB6E197E89@FR0P281MB1966.DEUP281.PROD.OUTLOOK.COM Tested-by: Stefan Althöfer Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 85505e585637a737e4713c1386c30e37c325b82e Author: Marc Kleine-Budde Date: Wed Jan 11 21:07:03 2023 +0100 can: mcp251xfd: rx: prepare to workaround broken RX FIFO head index erratum This is a preparatory patch to work around erratum DS80000789E 6 of the mcp2518fd, the other variants of the chip family (mcp2517fd and mcp251863) are probably also affected. When handling the RX interrupt, the driver iterates over all pending FIFOs (which are implemented as ring buffers in hardware) and reads the FIFO header index from the RX FIFO STA register of the chip. In the bad case, the driver reads a too large head index. In the original code, the driver always trusted the read value, which caused old CAN frames that were already processed, or new, incompletely written CAN frames to be (re-)processed. Instead of reading and trusting the head index, read the head index and calculate the number of CAN frames that were supposedly received - replace mcp251xfd_rx_ring_update() with mcp251xfd_get_rx_len(). The mcp251xfd_handle_rxif_ring() function reads the received CAN frames from the chip, iterates over them and pushes them into the network stack. Prepare that the iteration can be stopped if an old CAN frame is detected. The actual code to detect old or incomplete frames and abort will be added in the next patch. Link: https://lore.kernel.org/all/BL3PR11MB64844C1C95CA3BDADAE4D8CCFBC99@BL3PR11MB6484.namprd11.prod.outlook.com Reported-by: Stefan Althöfer Closes: https://lore.kernel.org/all/FR0P281MB1966273C216630B120ABB6E197E89@FR0P281MB1966.DEUP281.PROD.OUTLOOK.COM Tested-by: Stefan Althöfer Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit d49184b7b585f9da7ee546b744525f62117019f6 Author: Marc Kleine-Budde Date: Wed Jan 11 20:25:48 2023 +0100 can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function This is a preparation patch. Sending the UINC messages followed by incrementing the tail pointer will be called in more than one place in upcoming patches, so factor this out into a separate function. Also make mcp251xfd_handle_rxif_ring_uinc() safe to be called with a "len" of 0. Tested-by: Stefan Althöfer Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit e793c724b48ca8cae9693bc3be528e85284c126a Author: Marc Kleine-Budde Date: Wed Jan 11 11:48:16 2023 +0100 can: mcp251xfd: clarify the meaning of timestamp The mcp251xfd chip is configured to provide a timestamp with each received and transmitted CAN frame. The timestamp is derived from the internal free-running timer, which can also be read from the TBC register via SPI. The timer is 32 bits wide and is clocked by the external oscillator (typically 20 or 40 MHz). To avoid confusion, we call this timestamp "timestamp_raw" or "ts_raw" for short. Using the timecounter framework, the "ts_raw" is converted to 64 bit nanoseconds since the epoch. This is what we call "timestamp". This is a preparation for the next patches which use the "timestamp" to work around a bug where so far only the "ts_raw" is used. Tested-by: Stefan Althöfer Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit a7801540f325d104de5065850a003f1d9bdc6ad3 Author: Marc Kleine-Budde Date: Wed Jan 11 12:10:04 2023 +0100 can: mcp251xfd: move mcp251xfd_timestamp_start()/stop() into mcp251xfd_chip_start/stop() The mcp251xfd wakes up from Low Power or Sleep Mode when SPI activity is detected. To avoid this, make sure that the timestamp worker is stopped before shutting down the chip. Split the starting of the timestamp worker out of mcp251xfd_timestamp_init() into the separate function mcp251xfd_timestamp_start(). Call mcp251xfd_timestamp_init() before mcp251xfd_chip_start(), move mcp251xfd_timestamp_start() to mcp251xfd_chip_start(). In this way, mcp251xfd_timestamp_stop() can be called unconditionally by mcp251xfd_chip_stop(). Signed-off-by: Marc Kleine-Budde commit 71c45e6e0b4297433a8a64a1d24f01823a6a8dd1 Author: Marc Kleine-Budde Date: Sun May 5 14:40:10 2024 +0200 can: mcp251xfd: update errata references Since the errata references have been added to the driver, new errata sheets have been published. Update the references for the mcp2517fd and mcp2518fd. For completeness add references for the mcp251863. Signed-off-by: Marc Kleine-Budde commit 51b2a721612236335ddec4f3fb5f59e72a204f3a Author: Marc Kleine-Budde Date: Thu Apr 25 10:14:45 2024 +0200 can: mcp251xfd: properly indent labels To fix the coding style, remove the whitespace in front of labels. Signed-off-by: Marc Kleine-Budde commit 86f271f22bbb6391410a07e08d6ca3757fda01fa Author: Kishon Vijay Abraham I Date: Fri Jun 28 13:45:29 2024 +0200 PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0) Errata #i2037 in AM65x/DRA80xM Processors Silicon Revision 1.0 (SPRZ452D_July 2018_Revised December 2019 [1]) mentions when an inbound PCIe TLP spans more than two internal AXI 128-byte bursts, the bus may corrupt the packet payload and the corrupt data may cause associated applications or the processor to hang. The workaround for Errata #i2037 is to limit the maximum read request size and maximum payload size to 128 bytes. Add workaround for Errata #i2037 here. The errata and workaround is applicable only to AM65x SR 1.0 and later versions of the silicon will have this fixed. [1] -> https://www.ti.com/lit/er/sprz452i/sprz452i.pdf Link: https://lore.kernel.org/linux-pci/16e1fcae-1ea7-46be-b157-096e05661b15@siemens.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Achal Verma Signed-off-by: Vignesh Raghavendra Signed-off-by: Jan Kiszka Signed-off-by: Krzysztof Wilczyński Reviewed-by: Siddharth Vadapalli commit 4f82ac6102788112e599a6074d2c1f2afce923df Author: Matt Roper Date: Wed Jun 26 14:05:37 2024 -0700 drm/xe/mcr: Avoid clobbering DSS steering A couple copy/paste mistakes in the code that selects steering targets for OADDRM and INSTANCE0 unintentionally clobbered the steering target for DSS ranges in some cases. The OADDRM/INSTANCE0 values were also not assigned as intended, although that mistake wound up being harmless since the desired values for those specific ranges were '0' which the kzalloc of the GT structure should have already taken care of implicitly. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240626210536.1620176-2-matthew.d.roper@intel.com commit 62e35f942231e372f8e465d8484de66a60221226 Author: Christoph Hellwig Date: Thu Jun 27 13:14:03 2024 +0200 block: pass a gendisk to the queue_sysfs_entry methods The kobject for the queue entries is embedded into a struct gendisk. Pass it to the sysfs methods instead of the request_queue derived from it. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240627111407.476276-4-hch@lst.de Signed-off-by: Jens Axboe commit 319e8cfdf3caf41b98f50ef13542a35acd897bb6 Author: Christoph Hellwig Date: Thu Jun 27 13:14:02 2024 +0200 block: add helper macros to de-duplicate the queue sysfs attributes A lof the code to implement the queue sysfs attributes is repetitive. Add a few macros to generate the common cases. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20240627111407.476276-3-hch@lst.de Signed-off-by: Jens Axboe commit 5476394aa9f27d670dd2bac426fdb6ac12b12cb3 Author: Christoph Hellwig Date: Thu Jun 27 13:14:01 2024 +0200 block: simplify queue_logical_block_size queue_logical_block_size is never called with a 0 queue, and the logical_block_size field in queue_limits is always initialized for a live queue. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20240627111407.476276-2-hch@lst.de Signed-off-by: Jens Axboe commit 4279635e562953c08aa27d9737311a958ce9e753 Author: Matt Roper Date: Thu Jun 27 13:37:43 2024 -0700 drm/xe/mocs: Clarify difference between hw and sw sizes It's not very obvious what the difference is between the 'size' and 'n_entries' fields of the MOCS structure. Rename both fields slightly and add some comments explaining that one is the documentation-defined table size, while the other is the number of entries that can be programmed into the hardware (and the documented table size can potentially be smaller than the number of hardware entries). Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240627203741.2042752-4-matthew.d.roper@intel.com commit 25b1f6cbd8c55216e02bd1c116a5f62f10f4d535 Author: Matt Roper Date: Thu Jun 27 13:37:42 2024 -0700 drm/xe/mocs: Update MOCS assertions and remove redundant checks Rely more heavily on assertions to describe the MOCS programming invariants. CI checks these assertions and will ensure no violations sneak in due to programmer error, so we can remove some of the redundant WARN and silent return checks from non-debug builds. Also tweak/augment some of the existing assertions: there's no reason we'd ever want a platform not to have a MOCS 'ops' structure hooked up so ensure info->ops is non-NULL. Likewise, we should never have a case where the bspec-defined MOCS setting table is larger than the number of MOCS registers exposed by the hardware, so add an extra assert on those sizes as well. Cc: Michal Wajdeczko Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240627203741.2042752-3-matthew.d.roper@intel.com commit 1beabab88ecee0698ecee7b54afa9cce7046ef96 Author: Yu Kuai Date: Tue Jun 18 14:21:08 2024 +0800 blk-throttle: fix lower control under super low iops limit User will configure allowed iops limit in 1s, and calculate_io_allowed() will calculate allowed iops in the slice by: limit * HZ / throtl_slice However, if limit is quite low, the result can be 0, then allowed IO in the slice is 0, this will cause missing dispatch and control will be lower than limit. For example, set iops_limit to 5 with HD disk, and test will found that iops will be 3. This is usually not a big deal, because user will unlikely to configure such low iops limit, however, this is still a problem in the extreme scene. Fix the problem by making sure the wait time calculated by tg_within_iops_limit() should allow at least one IO to be dispatched. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20240618062108.3680835-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 3991657ae7074c3c497bf095093178bed37ea1b4 Author: Anuj Gupta Date: Wed Jun 26 15:36:52 2024 +0530 block: set bip_vcnt correctly Set the bip_vcnt correctly in bio_integrity_init_user and bio_integrity_copy_user. If the bio gets split at a later point, this value is required to set the right bip_vcnt in the cloned bio. Signed-off-by: Anuj Gupta Signed-off-by: Kanchan Joshi Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240626100700.3629-3-anuj20.g@samsung.com Signed-off-by: Jens Axboe commit 5b026e34120766408e76ba19a0e33a9dc996f9f0 Author: Andreas Hindborg Date: Fri Jun 28 11:11:52 2024 +0200 rust: block: fix generated bindings after refactoring of features Block device features and flags were refactored from `enum` to `#define`. This broke Rust binding generation. This patch fixes the binding generation. Fixes: fcf865e357f8 ("block: convert features and flags to __bitwise types") Signed-off-by: Andreas Hindborg Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20240628091152.2185241-1-nmi@metaspace.dk Signed-off-by: Jens Axboe commit 0f0023c649c7bc50543fbe6e1801eb6357b8bd63 Author: Przemek Kitszel Date: Mon Jun 17 15:24:07 2024 +0200 ice: do not init struct ice_adapter more times than needed Allocate and initialize struct ice_adapter object only once per physical card instead of once per port. This is not a big deal by now, but we want to extend this struct more and more in the near future. Our plans include PTP stuff and a devlink instance representing whole-device/physical card. Transactions requiring to be sleep-able (like those doing user (here ice) memory allocation) must be performed with an additional (on top of xarray) mutex. Adding it here removes need to xa_lock() manually. Since this commit is a reimplementation of ice_adapter_get(), a rather new scoped_guard() wrapper for locking is used to simplify the logic. It's worth to mention that xa_insert() use gives us both slot reservation and checks if it is already filled, what simplifies code a tiny bit. Reviewed-by: Wojciech Drewek Signed-off-by: Przemek Kitszel Reviewed-by: Simon Horman Reviewed-by: Michal Schmidt Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit a7cacaa0880e427642cb305010ea2a62c7b0e1ac Author: Madadi Vineeth Reddy Date: Fri Jun 28 12:48:21 2024 +0530 perf sched replay: Fix -r/--repeat command line option for infinity Currently, the -r/--repeat option accepts values from 0 and complains for -1. The help section specifies: -r, --repeat repeat the workload replay N times (-1: infinite) The -r -1 option raises an error because replay_repeat is defined as an unsigned int. In the current implementation, the workload is repeated n times when -r is used, except when n is 0. When -r is set to 0, the workload is also repeated once. This happens because when -r=0, the run_one_test function is not called. (Note that mutex unlocking, which is essential for child threads spawned to emulate the workload, happens in run_one_test.) However, mutex unlocking is still performed in the destroy_tasks function. Thus, -r=0 results in the workload running once coincidentally. To clarify and maintain the existing logic for -r >= 1 (which runs the workload the specified number of times) and to fix the issue with infinite runs, make -r=0 perform an infinite run. Reviewed-by: James Clark Signed-off-by: Madadi Vineeth Reddy Cc: Athira Rajeev Link: https://lore.kernel.org/r/20240628071821.15264-1-vineethr@linux.ibm.com Signed-off-by: Namhyung Kim commit 5484fd2767e4b31ca3320fe1375c37922c132c52 Author: Yang Li Date: Fri Jun 28 13:30:49 2024 +0800 perf: pmus: Remove unneeded semicolon ./tools/perf/util/pmu.c:1776:49-50: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9443 Signed-off-by: Yang Li Reviewed-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20240628053049.44521-1-yang.lee@linux.alibaba.com Signed-off-by: Namhyung Kim commit 440db4075fa0cb517bb18ea7ec555d927f8fc030 Author: Sean Anderson Date: Mon Jun 24 13:46:01 2024 -0400 hwmon: iio: Add labels from IIO channels Add labels from IIO channels to our channels. This allows userspace to display more meaningful names instead of "in0" or "temp5". Although lm-sensors gracefully handles errors when reading channel labels, the ABI says the label attribute > Should only be created if the driver has hints about what this voltage > channel is being used for, and user-space doesn't. Therefore, we test to see if the channel has a label before creating the attribute. Signed-off-by: Sean Anderson Acked-by: Guenter Roeck Link: https://patch.msgid.link/20240624174601.1527244-3-sean.anderson@linux.dev Signed-off-by: Jonathan Cameron commit 0214b27fc949a7bcaf57e71a7f9f534d6481d08b Author: Sean Anderson Date: Mon Jun 24 13:46:00 2024 -0400 iio: Add iio_read_channel_label to inkern API It can be convenient for other in-kernel drivers to reuse IIO channel labels. Export the iio_read_channel_label function to allow this. The signature is different depending on where we are calling it from, so the meat is moved to do_iio_read_channel_label. Signed-off-by: Sean Anderson Acked-by: Jonathan Cameron Link: https://patch.msgid.link/20240624174601.1527244-2-sean.anderson@linux.dev Signed-off-by: Jonathan Cameron commit 9641972917d69790ef55ef4d434b564955432d1f Author: Jonathan Cameron Date: Mon Jun 24 20:32:10 2024 +0100 iio: adc: ltc2309: Fix endian type passed to be16_to_cpu() Picked up by sparse. Cc: Liam Beguin Reviewed-by: Liam Beguin Link: https://patch.msgid.link/20240624193210.347434-1-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 449914398083148f93d070a8aace04f9ec296ce3 Author: Christian Loehle Date: Fri Jun 28 10:59:54 2024 +0100 cpuidle: teo: Remove recent intercepts metric The logic for recent intercepts didn't work, there is an underflow of the 'recent' value that can be observed during boot already, which teo usually doesn't recover from, making the entire logic pointless. Furthermore the recent intercepts also were never reset, thus not actually being very 'recent'. Having underflowed 'recent' values lead to teo always acting as if we were in a scenario were expected sleep length based on timers is too high and it therefore unnecessarily selecting shallower states. Experiments show that the remaining 'intercept' logic is enough to quickly react to scenarios in which teo cannot rely on the timer expected sleep length. See also here: https://lore.kernel.org/lkml/0ce2d536-1125-4df8-9a5b-0d5e389cd8af@arm.com/ Fixes: 77577558f25d ("cpuidle: teo: Rework most recent idle duration values treatment") Link: https://patch.msgid.link/20240628095955.34096-3-christian.loehle@arm.com Signed-off-by: Christian Loehle Signed-off-by: Rafael J. Wysocki commit 0a2998fa48f0b00c20628b02b80bd7fa3582626d Author: Christian Loehle Date: Fri Jun 28 10:59:53 2024 +0100 Revert: "cpuidle: teo: Introduce util-awareness" This reverts commit 9ce0f7c4bc64d820b02a1c53f7e8dba9539f942b. Util-awareness was reported to be too aggressive in selecting shallower states. Additionally a single threshold was found to not be suitable for reasoning about sleep length as, for all practical purposes, almost arbitrary sleep lengths are still possible for any load value. Fixes: 9ce0f7c4bc64 ("cpuidle: teo: Introduce util-awareness") Link: https://patch.msgid.link/20240628095955.34096-2-christian.loehle@arm.com Reported-by: Qais Yousef Reported-by: Vincent Guittot Reviewed-by: Qais Yousef Tested-by: Vincent Guittot Signed-off-by: Christian Loehle Signed-off-by: Rafael J. Wysocki commit 43c0226c9ba56ffebdef9a858dbcf6eb0d376291 Author: Dhruva Gole Date: Thu Jun 27 11:31:17 2024 +0530 cpufreq: make cpufreq_boost_enabled() return bool Since this function is supposed to return boost_enabled which is anyway a bool type make sure that it's return value is also marked as bool. This helps maintain better consistency in data types being used. Signed-off-by: Dhruva Gole Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20240627060117.1809477-1-d-gole@ti.com Signed-off-by: Rafael J. Wysocki commit 92436305b663039485ced5c38a9c12c4ed2e0851 Author: Olivier Moysan Date: Tue Jun 18 13:59:12 2024 +0200 dt-bindings: iio: stm32: dfsdm: fix dtbs warnings on dfsdm audio port Fix warnings on DFSDM dtbs check Unevaluated properties are not allowed ('dfsdm-dai' was unexpected) 'port' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: 11183ac07a74 ("dt-bindings: stm32: convert dfsdm to json-schema") Signed-off-by: Olivier Moysan Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240618115912.706912-1-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron commit d845cd901b28f1b6c02a208b864fc3fc46d14536 Author: Srinivas Pandruvada Date: Mon Jun 24 09:11:09 2024 -0700 cpufreq: intel_pstate: Support highest performance change interrupt On some systems, the HWP (Hardware P-states) highest performance level can change from the value set at boot-up. This behavior can lead to two issues: - The 'cpuinfo_max_freq' within the 'cpufreq' sysfs will not reflect the CPU's highest achievable performance. - Even if the CPU's highest performance level is increased after booting, the CPU may not reach the full expected performance. The availability of this feature is indicated by the CPUID instruction: if CPUID[6].EAX[15] is set to 1, the feature is supported. When supported, setting bit 2 of the MSR_HWP_INTERRUPT register enables notifications of the highest performance level changes. Therefore, as part of enabling the HWP interrupt, bit 2 of the MSR_HWP_INTERRUPT should also be set when this feature is supported. Upon a change in the highest performance level, a new HWP interrupt is generated, with bit 3 of the MSR_HWP_STATUS register set, and the MSR_HWP_CAPABILITIES register is updated with the new highest performance limit. The processing of the interrupt is the same as the guaranteed performance change. Notify change to cpufreq core and update MSR_HWP_REQUEST with new performance limits. The current driver implementation already takes care of the highest performance change as part of: commit dfeeedc1bf57 ("cpufreq: intel_pstate: Update cpuinfo.max_freq on HWP_CAP changes") For example: Before highest performance change interrupt: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 3700000 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 3700000 After highest performance changes interrupt: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 3900000 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 3900000 Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240624161109.1427640-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 7ea81936b85317aee8a73cd35d7f9cd6ce654dee Author: Srinivas Pandruvada Date: Mon Jun 24 09:11:08 2024 -0700 x86/cpufeatures: Add HWP highest perf change feature flag When CPUID[6].EAX[15] is set to 1, this CPU supports notification for HWP (Hardware P-states) highest performance change. Add a feature flag to check if the CPU supports HWP highest performance change. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240624161109.1427640-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 0f54a19262154cb3965ba910c8b081417d97c6c8 Author: Umesh Nerlige Ramappa Date: Thu Jun 27 16:51:05 2024 -0700 drm/xe: Get hwe domain specific FW to read RING_TIMESTAMP Per client engine utilization uses RING_TIMESTAMP to return drm-total-cycles to the user. Current code uses XE_FW_GT to read this register on the first available engine in a GT. When testing on DG2, it is observed that this value is 0 when running test on some engines. To resolve that, get the hwe domain specific FW for reading the engine timestamp. v2: - update commit message - use domain specific FW (Matt) v3: - Drop check for hwe in the helper (Matt, Michal) v4: - checkpatch fixes v5: Rebase Fixes: 188ced1e0ff8 ("drm/xe/client: Print runtime to fdinfo") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240627235105.2631135-1-umesh.nerlige.ramappa@intel.com commit 6b878cbb87bf4fc4c07906ada431624911e3d85a Author: Reinette Chatre Date: Wed Jun 12 11:16:11 2024 -0700 KVM: selftests: Add guest udelay() utility for x86 Add udelay() for x86 tests to allow busy waiting in the guest for a specific duration, and to match ARM and RISC-V's udelay() in the hopes of eventually making udelay() available on all architectures. Get the guest's TSC frequency using KVM_GET_TSC_KHZ and expose it to all VMs via a new global, guest_tsc_khz. Assert that KVM_GET_TSC_KHZ returns a valid frequency, instead of simply skipping tests, which would require detecting which tests actually need/want udelay(). KVM hasn't returned an error for KVM_GET_TSC_KHZ since commit cc578287e322 ("KVM: Infrastructure for software and hardware based TSC rate scaling"), which predates KVM selftests by 6+ years (KVM_GET_TSC_KHZ itself predates KVM selftest by 7+ years). Note, if the GUEST_ASSERT() in udelay() somehow fires and the test doesn't check for guest asserts, then the test will fail with a very cryptic message. But fixing that, e.g. by automatically handling guest asserts, is a much larger task, and practically speaking the odds of a test afoul of this wart are infinitesimally small. Signed-off-by: Reinette Chatre Link: https://lore.kernel.org/r/5aa86285d1c1d7fe1960e3fe490f4b22273977e6.1718214999.git.reinette.chatre@intel.com Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit fdd288e9b7647557c51a28e72fd1003e3a9bf906 Author: Piotr Gardocki Date: Fri Jun 14 12:38:11 2024 +0200 ice: Distinguish driver reset and removal for AQ shutdown Admin queue command for shutdown AQ contains a flag to indicate driver unload. However, the flag is always set in the driver, even for resets. It can cause the firmware to consider driver as unloaded once the PF reset is triggered on all ports of device, which could lead to unexpected results. Add an additional function parameter to functions that shutdown AQ, indicating whether the driver is actually unloading. Reviewed-by: Ahmed Zaki Reviewed-by: Przemek Kitszel Signed-off-by: Piotr Gardocki Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 7dfefd0b90488da91de125f7383f966e58bcb034 Author: Paul Greenwalt Date: Thu Jun 6 09:48:46 2024 -0400 ice: Allow different FW API versions based on MAC type Allow the driver to be compatible with different FW API versions based on the device's MAC type. Currently, E810 is only compatible with one FW API version. Now the driver can be compatible with different FW API versions for both E810 and E830. For example, E810 FW API version is 1.5.0 and E830 is 1.7.0. Signed-off-by: Paul Greenwalt Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit d47bf9a495cf424fad674321d943123dc12b926d Author: Eric Joyner Date: Mon Jun 17 14:46:25 2024 +0200 ice: Check all ice_vsi_rebuild() errors in function Check the return value from ice_vsi_rebuild() and prevent the usage of incorrectly configured VSI. Reviewed-by: Michal Swiatkowski Reviewed-by: Przemek Kitszel Signed-off-by: Eric Joyner Signed-off-by: Karen Ostrowska Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 90b400170bcd93c61c2e0ac3990b57c54250d114 Author: Vladimir Lypak Date: Fri Jun 28 16:01:45 2024 +0200 interconnect: qcom: Add MSM8953 driver Add driver for interconnect busses found in MSM8953 based platforms. The topology consists of four NoCs that are partially controlled by a RPM processor. Note that one of NoCs (System NoC) has a counterpart (System NoC MM) that is modelled as child device to avoid resource conflicts, since it uses same MMIO space for configuration. Signed-off-by: Vladimir Lypak Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-2-a70d582182dc@mainlining.org Signed-off-by: Georgi Djakov commit 791ed23f735b0fb1b984772edddf1571195780d8 Author: Vladimir Lypak Date: Fri Jun 28 16:01:44 2024 +0200 dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC Add the device-tree bindings for interconnect providers used on MSM8953 platform. Signed-off-by: Vladimir Lypak Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-1-a70d582182dc@mainlining.org Signed-off-by: Georgi Djakov commit b195701e9f0f78f30d500ada246b3693f26e11ee Author: Namhyung Kim Date: Thu Jun 27 17:06:04 2024 -0700 perf stat: Use field separator in the metric header It didn't use the passed field separator (using -x option) when it prints the metric headers and always put "," between the fields. Before: $ sudo ./perf stat -a -x : --per-core -M tma_core_bound --metric-only true core,cpus,% tma_core_bound: <<<--- here: "core,cpus," but ":" expected S0-D0-C0:2:10.5: S0-D0-C1:2:14.8: S0-D0-C2:2:9.9: S0-D0-C3:2:13.2: After: $ sudo ./perf stat -a -x : --per-core -M tma_core_bound --metric-only true core:cpus:% tma_core_bound: S0-D0-C0:2:10.5: S0-D0-C1:2:15.0: S0-D0-C2:2:16.5: S0-D0-C3:2:12.5: Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20240628000604.1296808-2-namhyung@kernel.org Signed-off-by: Namhyung Kim commit 67ca3f98070ffdf308b91e08a477fcb1e9684ae8 Author: Nícolas F. R. A. Prado Date: Thu Jun 27 17:20:55 2024 -0400 remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing The current code doesn't check whether platform_get_resource_byname() succeeded to get the l1tcm memory, which is optional, before attempting to map it. This results in the following error message when it is missing: mtk-scp 10500000.scp: error -EINVAL: invalid resource (null) Add a check so that the remapping is only attempted if the memory region exists. This also allows to simplify the logic handling failure to remap, since a failure then is always a failure. Fixes: ca23ecfdbd44 ("remoteproc/mediatek: support L1TCM") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Tzung-Bi Shih Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240627-scp-invalid-resource-l1tcm-v1-1-7d221e6c495a@collabora.com Signed-off-by: Mathieu Poirier commit caa463bb79a82ac5fce05a0dcf7893d94c84fc5e Author: Namhyung Kim Date: Thu Jun 27 17:06:03 2024 -0700 perf stat: Fix a segfault with --per-cluster --metric-only The new --per-cluster option was added recently but it forgot to update the aggr_header fields which are used for --metric-only option. And it resulted in a segfault due to NULL string in fputs(). Fixes: cbc917a1b03b ("perf stat: Support per-cluster aggregation") Reviewed-by: Yicong Yang Tested-by: Yicong Yang Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20240628000604.1296808-1-namhyung@kernel.org Signed-off-by: Namhyung Kim commit 4e1a7df4548003fc081360b0f4edce3f7a991bfc Author: James Morse Date: Wed May 29 14:34:46 2024 +0100 cpumask: Add enabled cpumask for present CPUs that can be brought online The 'offline' file in sysfs shows all offline CPUs, including those that aren't present. User-space is expected to remove not-present CPUs from this list to learn which CPUs could be brought online. CPUs can be present but not-enabled. These CPUs can't be brought online until the firmware policy changes, which comes with an ACPI notification that will register the CPUs. With only the offline and present files, user-space is unable to determine which CPUs it can try to bring online. Add a new CPU mask that shows this based on all the registered CPUs. Signed-off-by: James Morse Tested-by: Miguel Luis Tested-by: Vishnu Pajjuri Tested-by: Jianyong Wu Acked-by: Thomas Gleixner Signed-off-by: Russell King (Oracle) Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-20-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 828ce929d1c3aff0e9a330fea40d29980e17e256 Author: James Morse Date: Wed May 29 14:34:45 2024 +0100 arm64: document virtual CPU hotplug's expectations Add a description of physical and virtual CPU hotplug, explain the differences and elaborate on what is required in ACPI for a working virtual hotplug system. Signed-off-by: James Morse Reviewed-by: Jonathan Cameron Signed-off-by: Russell King (Oracle) Tested-by: Miguel Luis Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-19-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 9d0873892f4d4bf62a351897e91e5169b4c6f4aa Author: Jonathan Cameron Date: Wed May 29 14:34:44 2024 +0100 arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled. In order to move arch_register_cpu() to be called via the same path for initially present CPUs described by ACPI and hotplugged CPUs ACPI_HOTPLUG_CPU needs to be enabled. The protection against invalid IDs in acpi_map_cpu() is needed as at least one production BIOS is in the wild which reports entries in DSDT (with no _STA method, so assumed enabled and present) that don't match MADT. Tested-by: Miguel Luis Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-18-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit eba4675008a6e4cbff27b579a837bd29be2642de Author: Jonathan Cameron Date: Wed May 29 14:34:43 2024 +0100 arm64: arch_register_cpu() variant to check if an ACPI handle is now available. The ARM64 architecture does not support physical CPU HP today. To avoid any possibility of a bug against such an architecture if defined in future, check for the physical CPU HP case (not present) and return an error on any such attempt. On ARM64 virtual CPU Hotplug relies on the status value that can be queried via the AML method _STA for the CPU object. There are two conditions in which the CPU can be registered. 1) ACPI disabled. 2) ACPI enabled and the acpi_handle is available. _STA evaluates to the CPU is both enabled and present. (Note that in absence of the _STA method they are always in this state). If neither of these conditions is met the CPU is not 'yet' ready to be used and -EPROBE_DEFER is returned. Success occurs in the early attempt to register the CPUs if we are booting with DT (no concept yet of vCPU HP) if not it succeeds for already enabled CPUs when the ACPI Processor driver attaches to them. Finally it may succeed via the CPU Hotplug code indicating that the CPU is now enabled. For ACPI if CONFIG_ACPI_PROCESSOR the only path to get to arch_register_cpu() with that handle set is via acpi_processor_hot_add_init() which is only called from an ACPI bus scan in which _STA has already been queried there is no need to repeat it here. Add a comment to remind us of this in the future. Suggested-by: Rafael J. Wysocki Tested-by: Miguel Luis Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-17-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 643e12da4a4983a34658e33f2b1581caee9cac8c Author: Jean-Philippe Brucker Date: Wed May 29 14:34:42 2024 +0100 arm64: psci: Ignore DENIED CPUs When a CPU is marked as disabled, but online capable in the MADT, PSCI applies some firmware policy to control when it can be brought online. PSCI returns DENIED to a CPU_ON request if this is not currently permitted. The OS can learn the current policy from the _STA enabled bit. Handle the PSCI DENIED return code gracefully instead of printing an error. Note the alternatives to the PSCI cpu_boot() callback do not return -EPERM so the change in smp.c has no affect. See https://developer.arm.com/documentation/den0022/f/?lang=en page 58. Signed-off-by: Jean-Philippe Brucker [ morse: Rewrote commit message ] Signed-off-by: James Morse Tested-by: Miguel Luis Tested-by: Vishnu Pajjuri Tested-by: Jianyong Wu Reviewed-by: Gavin Shan Signed-off-by: Russell King (Oracle) Signed-off-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-16-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit d633da5d3ab1a0eb26a2213d65da1e189e82f8ab Author: James Morse Date: Wed May 29 14:34:41 2024 +0100 irqchip/gic-v3: Add support for ACPI's disabled but 'online capable' CPUs To support virtual CPU hotplug, ACPI has added an 'online capable' bit to the MADT GICC entries. This indicates a disabled CPU entry may not be possible to online via PSCI until firmware has set enabled bit in _STA. This means that a "usable" GIC redistributor is one that is marked as either enabled, or online capable. The meaning of the acpi_gicc_is_usable() would become less clear than just checking the pair of flags at call sites. As such, drop that helper function. The test in gic_acpi_match_gicc() remains as testing just the enabled bit so the count of enabled distributors is correct. What about the redistributor in the GICC entry? ACPI doesn't want to say. Assume the worst: When a redistributor is described in the GICC entry, but the entry is marked as disabled at boot, assume the redistributor is inaccessible. The GICv3 driver doesn't support late online of redistributors, so this means the corresponding CPU can't be brought online either. Rather than modifying cpu masks that may already have been used, register a new cpuhp callback to fail this case. This must run earlier than the main gic_starting_cpu() so that this case can be rejected before the section of cpuhp that runs on the CPU that is coming up as that is not allowed to fail. This solution keeps the handling of this broken firmware corner case local to the GIC driver. As precise ordering of this callback doesn't need to be controlled as long as it is in that initial prepare phase, use CPUHP_BP_PREPARE_DYN. Systems that want CPU hotplug in a VM can ensure their redistributors are always-on, and describe them that way with a GICR entry in the MADT. Suggested-by: Marc Zyngier Signed-off-by: James Morse Signed-off-by: Russell King (Oracle) Tested-by: Miguel Luis Co-developed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20240529133446.28446-15-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit fa2dabe57220e6af78ed7a2f7016bf250a618204 Author: James Morse Date: Wed May 29 14:34:40 2024 +0100 irqchip/gic-v3: Don't return errors from gic_acpi_match_gicc() gic_acpi_match_gicc() is only called via gic_acpi_count_gicr_regions(). It should only count the number of enabled redistributors, but it also tries to sanity check the GICC entry, currently returning an error if the Enabled bit is set, but the gicr_base_address is zero. Adding support for the online-capable bit to the sanity check will complicate it, for no benefit. The existing check implicitly depends on gic_acpi_count_gicr_regions() previous failing to find any GICR regions (as it is valid to have gicr_base_address of zero if the redistributors are described via a GICR entry). Instead of complicating the check, remove it. Failures that happen at this point cause the irqchip not to register, meaning no irqs can be requested. The kernel grinds to a panic() pretty quickly. Without the check, MADT tables that exhibit this problem are still caught by gic_populate_rdist(), which helpfully also prints what went wrong: | CPU4: mpidr 100 has no re-distributor! Signed-off-by: James Morse Reviewed-by: Gavin Shan Tested-by: Miguel Luis Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240529133446.28446-14-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 2488444274c70038eb6b686cba5f1ce48ebb9cdd Author: Jonathan Cameron Date: Wed May 29 14:34:39 2024 +0100 arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry In a review discussion of the changes to support vCPU hotplug where a check was added on the GICC being enabled if was online, it was noted that there is need to map back to the cpu and use that to index into a cpumask. As such, a valid ID is needed. If an MPIDR check fails in acpi_map_gic_cpu_interface() it is possible for the entry in cpu_madt_gicc[cpu] == NULL. This function would then cause a NULL pointer dereference. Whilst a path to trigger this has not been established, harden this caller against the possibility. Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-13-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 8d34b6f17b9ac93faa2791eb037dcb08bdf755de Author: James Morse Date: Wed May 29 14:34:38 2024 +0100 arm64: acpi: Move get_cpu_for_acpi_id() to a header ACPI identifies CPUs by UID. get_cpu_for_acpi_id() maps the ACPI UID to the Linux CPU number. The helper to retrieve this mapping is only available in arm64's NUMA code. Move it to live next to get_acpi_id_for_cpu(). Signed-off-by: James Morse Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan Tested-by: Miguel Luis Tested-by: Vishnu Pajjuri Tested-by: Jianyong Wu Signed-off-by: Russell King (Oracle) Acked-by: Hanjun Guo Signed-off-by: Jonathan Cameron Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20240529133446.28446-12-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 3b9d0a78aeda194994892f7c42f6ca5feb45eadd Author: James Morse Date: Wed May 29 14:34:37 2024 +0100 ACPI: Add post_eject to struct acpi_scan_handler for cpu hotplug struct acpi_scan_handler has a detach callback that is used to remove a driver when a bus is changed. When interacting with an eject-request, the detach callback is called before _EJ0. This means the ACPI processor driver can't use _STA to determine if a CPU has been made not-present, or some of the other _STA bits have been changed. acpi_processor_remove() needs to know the value of _STA after _EJ0 has been called. Add a post_eject callback to struct acpi_scan_handler. This is called after acpi_scan_hot_remove() has successfully called _EJ0. Because acpi_scan_check_and_detach() also clears the handler pointer, it needs to be told if the caller will go on to call acpi_bus_post_eject(), so that acpi_device_clear_enumerated() and clearing the handler pointer can be deferred. An extra flag is added to flags field introduced in the previous patch to achieve this. Signed-off-by: James Morse Reviewed-by: Gavin Shan Tested-by: Miguel Luis Tested-by: Vishnu Pajjuri Tested-by: Jianyong Wu Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-11-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 1859a671bdb9b3df114c3fdf85b1032a9a8d208d Author: Jonathan Cameron Date: Wed May 29 14:34:36 2024 +0100 ACPI: scan: switch to flags for acpi_scan_check_and_detach() Precursor patch adds the ability to pass a uintptr_t of flags into acpi_scan_check_and detach() so that additional flags can be added to indicate whether to defer portions of the eject flow. The new flag follows in the next patch. Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Reviewed-by: Gavin Shan Tested-by: Miguel Luis Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-10-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit b398a91decd9d4b399389a12675ea7716039b964 Author: James Morse Date: Wed May 29 14:34:35 2024 +0100 ACPI: processor: Register deferred CPUs from acpi_processor_get_info() The arm64 specific arch_register_cpu() call may defer CPU registration until the ACPI interpreter is available and the _STA method can be evaluated. If this occurs, then a second attempt is made in acpi_processor_get_info(). Note that the arm64 specific call has not yet been added so for now this will be called for the original hotplug case. For architectures that do not defer until the ACPI Processor driver loads (e.g. x86), for initially present CPUs there will already be a CPU device. If present do not try to register again. Systems can still be booted with 'acpi=off', or not include an ACPI description at all as in these cases arch_register_cpu() will not have deferred registration when first called. This moves the CPU register logic back to a subsys_initcall(), while the memory nodes will have been registered earlier. Note this is where the call was prior to the cleanup series so there should be no side effects of moving it back again for this specific case. [PATCH 00/21] Initial cleanups for vCPU HP. https://lore.kernel.org/all/ZVyz%2FVe5pPu8AWoA@shell.armlinux.org.uk/ commit 5b95f94c3b9f ("x86/topology: Switch over to GENERIC_CPU_DEVICES") Signed-off-by: James Morse Signed-off-by: Russell King (Oracle) Reviewed-by: Gavin Shan Tested-by: Miguel Luis Tested-by: Vishnu Pajjuri Tested-by: Jianyong Wu Reviewed-by: Hanjun Guo Acked-by: Rafael J. Wysocki Co-developed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-9-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 36b921637e900c77f5f9bd5b45db522124068a96 Author: Jonathan Cameron Date: Wed May 29 14:34:34 2024 +0100 ACPI: processor: Add acpi_get_processor_handle() helper If CONFIG_ACPI_PROCESSOR provide a helper to retrieve the acpi_handle for a given CPU allowing access to methods in DSDT. Tested-by: Miguel Luis Reviewed-by: Gavin Shan Acked-by: Rafael J. Wysocki Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-8-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit cd9239660b8c0357a7338a33d40a429e48273e77 Author: Jonathan Cameron Date: Wed May 29 14:34:33 2024 +0100 ACPI: processor: Move checks and availability of acpi_processor earlier Make the per_cpu(processors, cpu) entries available earlier so that they are available in arch_register_cpu() as ARM64 will need access to the acpi_handle to distinguish between acpi_processor_add() and earlier registration attempts (which will fail as _STA cannot be checked). Reorder the remove flow to clear this per_cpu() after arch_unregister_cpu() has completed, allowing it to be used in there as well. Note that on x86 for the CPU hotplug case, the pr->id prior to acpi_map_cpu() may be invalid. Thus the per_cpu() structures must be initialized after that call or after checking the ID is valid (not hotplug path). Acked-by: Rafael J. Wysocki Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-7-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 47ec9b417ed9b6b8ec2a941cd84d9de62adc358a Author: Jonathan Cameron Date: Wed May 29 14:34:32 2024 +0100 ACPI: processor: Fix memory leaks in error paths of processor_add() If acpi_processor_get_info() returned an error, pr and the associated pr->throttling.shared_cpu_map were leaked. The unwind code was in the wrong order wrt to setup, relying on some unwind actions having no affect (clearing variables that were never set etc). That makes it harder to reason about so reorder and add appropriate labels to only undo what was actually set up in the first place. Acked-by: Rafael J. Wysocki Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-6-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit fadf231f0a06a6748a7fc4a2c29ac9ef7bca6bfd Author: Jonathan Cameron Date: Wed May 29 14:34:31 2024 +0100 ACPI: processor: Return an error if acpi_processor_get_info() fails in processor_add() Rafael observed [1] that returning 0 from processor_add() will result in acpi_default_enumeration() being called which will attempt to create a platform device, but that makes little sense when the processor is known to be not available. So just return the error code from acpi_processor_get_info() instead. Link: https://lore.kernel.org/all/CAJZ5v0iKU8ra9jR+EmgxbuNm=Uwx2m1-8vn_RAZ+aCiUVLe3Pw@mail.gmail.com/ [1] Suggested-by: Rafael J. Wysocki Acked-by: Rafael J. Wysocki Reviewed-by: Gavin Shan Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-5-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 157080f03c7abb7df58c4cb519e18c188cfb7404 Author: Jonathan Cameron Date: Wed May 29 14:34:30 2024 +0100 ACPI: processor: Drop duplicated check on _STA (enabled + present) The ACPI bus scan will only result in acpi_processor_add() being called if _STA has already been checked and the result is that the processor is enabled and present. Hence drop this additional check. Suggested-by: Rafael J. Wysocki Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Reviewed-by: Gavin Shan Tested-by: Miguel Luis Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-4-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit d830ef3ac56941089f49ec13c80ea4aaa3c2e6c0 Author: Jonathan Cameron Date: Wed May 29 14:34:29 2024 +0100 cpu: Do not warn on arch_register_cpu() returning -EPROBE_DEFER For arm64 the CPU registration cannot complete until the ACPI interpreter us up and running so in those cases the arch specific arch_register_cpu() will return -EPROBE_DEFER at this stage and the registration will be attempted later. Suggested-by: Rafael J. Wysocki Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Reviewed-by: Gavin Shan Tested-by: Miguel Luis Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-3-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit c1385c1f0ba3b80bd12f26c440612175088c664c Author: Jonathan Cameron Date: Wed May 29 14:34:28 2024 +0100 ACPI: processor: Simplify initial onlining to use same path for cold and hotplug Separate code paths, combined with a flag set in acpi_processor.c to indicate a struct acpi_processor was for a hotplugged CPU ensured that per CPU data was only set up the first time that a CPU was initialized. This appears to be unnecessary as the paths can be combined by letting the online logic also handle any CPUs online at the time of driver load. Motivation for this change, beyond simplification, is that ARM64 virtual CPU HP uses the same code paths for hotplug and cold path in acpi_processor.c so had no easy way to set the flag for hotplug only. Removing this necessity will enable ARM64 vCPU HP to reuse the existing code paths. Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Tested-by: Miguel Luis Reviewed-by: Gavin Shan Reviewed-by: Miguel Luis Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240529133446.28446-2-Jonathan.Cameron@huawei.com Signed-off-by: Catalin Marinas commit 38b2b022363d8c911dba40cf30af46febf4974fe Author: Noah Wang Date: Wed Jun 26 17:46:01 2024 +0800 hwmon: add MP2891 driver Add support for MPS VR controller mp2891. This driver exposes telemetry and limit value readings and writtings. Signed-off-by: Noah Wang Link: https://lore.kernel.org/r/SEYPR04MB64828A352836982C0184AA10FAD62@SEYPR04MB6482.apcprd04.prod.outlook.com Signed-off-by: Guenter Roeck commit 45158b93d02bea7f32a2918641697731439f3e15 Author: Noah Wang Date: Wed Jun 26 17:46:00 2024 +0800 dt-bindings: hwmon: Add MPS mp2891 Add support for MPS mp2891 controller Reviewed-by: Rob Herring (Arm) Signed-off-by: Noah Wang Link: https://lore.kernel.org/r/SEYPR04MB6482BC95D1242A5675FF9DAEFAD62@SEYPR04MB6482.apcprd04.prod.outlook.com Signed-off-by: Guenter Roeck commit 4dbb4f9b8fc679fb6c3db79989f64946fc7ff789 Author: Karthik Sundaravel Date: Tue May 28 20:32:13 2024 +0530 ice: Add get/set hw address for VFs using devlink commands Changing the MAC address of the VFs is currently unsupported via devlink. Add the function handlers to set and get the HW address for the VFs. Signed-off-by: Karthik Sundaravel Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 28cf7829a77fdd0597edb3978bebeb1f8f245b72 Author: Jesse Brandeburg Date: Mon Jun 17 12:07:46 2024 -0700 MAINTAINERS: update Intel Ethernet maintainers Since Jesse has moved to a new role, replace him with a new maintainer to work with Tony on representing Intel networking drivers in the kernel. Cc: Przemek Kitszel Signed-off-by: Jesse Brandeburg Acked-by: Paul Menzel Signed-off-by: Tony Nguyen commit 1be59c97c83ccd67a519d8a49486b3a8a73ca28a Author: Chen Ridong Date: Fri Jun 28 01:36:04 2024 +0000 cgroup/cpuset: Prevent UAF in proc_cpuset_show() An UAF can happen when /proc/cpuset is read as reported in [1]. This can be reproduced by the following methods: 1.add an mdelay(1000) before acquiring the cgroup_lock In the cgroup_path_ns function. 2.$cat /proc//cpuset repeatly. 3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/ $umount /sys/fs/cgroup/cpuset/ repeatly. The race that cause this bug can be shown as below: (umount) | (cat /proc//cpuset) css_release | proc_cpuset_show css_release_work_fn | css = task_get_css(tsk, cpuset_cgrp_id); css_free_rwork_fn | cgroup_path_ns(css->cgroup, ...); cgroup_destroy_root | mutex_lock(&cgroup_mutex); rebind_subsystems | cgroup_free_root | | // cgrp was freed, UAF | cgroup_path_ns_locked(cgrp,..); When the cpuset is initialized, the root node top_cpuset.css.cgrp will point to &cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will allocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated &cgroup_root.cgrp. When the umount operation is executed, top_cpuset.css.cgrp will be rebound to &cgrp_dfl_root.cgrp. The problem is that when rebinding to cgrp_dfl_root, there are cases where the cgroup_root allocated by setting up the root for cgroup v1 is cached. This could lead to a Use-After-Free (UAF) if it is subsequently freed. The descendant cgroups of cgroup v1 can only be freed after the css is released. However, the css of the root will never be released, yet the cgroup_root should be freed when it is unmounted. This means that obtaining a reference to the css of the root does not guarantee that css.cgrp->root will not be freed. Fix this problem by using rcu_read_lock in proc_cpuset_show(). As cgroup_root is kfree_rcu after commit d23b5c577715 ("cgroup: Make operations on the cgroup root_list RCU safe"), css->cgroup won't be freed during the critical section. To call cgroup_path_ns_locked, css_set_lock is needed, so it is safe to replace task_get_css with task_css. [1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd Fixes: a79a908fd2b0 ("cgroup: introduce cgroup namespaces") Signed-off-by: Chen Ridong Signed-off-by: Tejun Heo commit 4235c80ba40c9cfba917d207fa2415a25d2309ea Merge: 730674b21db12 0959de657a10c Author: Mark Brown Date: Fri Jun 28 18:07:12 2024 +0100 Add audio support for LPC32XX CPUs Merge series from Piotr Wojtaszczyk : This pach set is to bring back audio to machines with a LPC32XX CPU. The legacy LPC32XX SoC used to have audio spport in linux 2.6.27. The support was dropped due to lack of interest from mainaeners. commit dd103407ca315b467074d74b3580abe210c4c695 Author: Peng Hao Date: Mon Jun 24 09:20:16 2024 +0800 KVM: X86: Remove unnecessary GFP_KERNEL_ACCOUNT for temporary variables Some variables allocated in kvm_arch_vcpu_ioctl are released when the function exits, so there is no need to set GFP_KERNEL_ACCOUNT. Signed-off-by: Peng Hao Link: https://lore.kernel.org/r/20240624012016.46133-1-flyingpeng@tencent.com Signed-off-by: Sean Christopherson commit 1392cb2649e5389a6a87ab3cc1f9c6a760f7b0be Merge: 30c577a852c4c 58de63ddd0ecc Author: Arnd Bergmann Date: Fri Jun 28 18:40:53 2024 +0200 Merge tag 'mtk-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers MediaTek driver updates for v6.11 This adds the previously missed Tone Curve Conversion (TCC) MuteX bit to enable the same in MDP3 on the the MT8188 SoC, disables 9-bit Alpha for display HDR support in MT8195 and adds math operation support in the Global Command Engine for all MediaTek SoCs, which will be used in the near future in the ISP driver. * tag 'mtk-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation soc: mediatek: Disable 9-bit alpha in ETHDR soc: mediatek: mtk-mutex: Add MDP_TCC0 mod to MT8188 mutex table Link: https://lore.kernel.org/r/20240628093801.126013-3-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit caffa7cdce47718a0c2e3195c9a1bcf786d655a4 Author: Christoph Hellwig Date: Thu Jun 27 14:49:15 2024 +0200 rnbd-cnt: don't set QUEUE_FLAG_SAME_FORCE QUEUE_FLAG_SAME_FORCE has been set by rnbd-cnt since the initial merge. There is no good reason for a driver to force exact core delivery, which is tunable for very specific workloads and not a driver setting. Signed-off-by: Christoph Hellwig Acked-by: Jack Wang Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240627124926.512662-6-hch@lst.de Signed-off-by: Jens Axboe commit 40988f15907baee227d3b83bd4d8f8fdfeb95dd3 Author: Christoph Hellwig Date: Thu Jun 27 14:49:14 2024 +0200 rnbd: don't set QUEUE_FLAG_SAME_COMP QUEUE_FLAG_SAME_COMP is already set by default. Signed-off-by: Christoph Hellwig Acked-by: Jack Wang Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240627124926.512662-5-hch@lst.de Signed-off-by: Jens Axboe commit 8b77f23fadcbb030a898f168bebe74f465e5d5a2 Author: Christoph Hellwig Date: Thu Jun 27 14:49:13 2024 +0200 mpt3sas_scsih: don't set QUEUE_FLAG_NOMERGES Setting QUEUE_FLAG_NOMERGES was added in commit d1b01d14b7ba ("scsi: mpt3sas: Set NVMe device queue depth as 128") without any explanation. Drivers should second guess the block layer merge decisions, so remove the flag. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240627124926.512662-4-hch@lst.de Signed-off-by: Jens Axboe commit aa57abe6a7f91fafe53fb98d0f1e74db951bce24 Author: Christoph Hellwig Date: Thu Jun 27 14:49:12 2024 +0200 megaraid_sas: don't set QUEUE_FLAG_NOMERGES Setting QUEUE_FLAG_NOMERGES was added in commit 15dd03811d99dcf ("scsi: megaraid_sas: NVME Interface detection and prop settings") without any explanation. Drivers should second guess the block layer merge decisions, so remove the flag. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240627124926.512662-3-hch@lst.de Signed-off-by: Jens Axboe commit 667ea36378cf7f669044b27871c496e1559c872a Author: Christoph Hellwig Date: Thu Jun 27 14:49:11 2024 +0200 loop: don't set QUEUE_FLAG_NOMERGES QUEUE_FLAG_NOMERGES isn't really a driver interface, but a user tunable. There also isn't any good reason to set it in the loop driver. The original commit adding it (5b5e20f421c0b6d "block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop") claims that "It doesn't make sense to enable merge because the I/O submitted to backing file is handled page by page." which of course isn't true for multi-page bvec now, and it never has been for direct I/O, for which commit 40326d8a33d ("block/loop: allow request merge for directio mode") alredy disabled the nomerges flag. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240627124926.512662-2-hch@lst.de Signed-off-by: Jens Axboe commit f0c508faea645da58d6ae6b644a1b68020d5a9d2 Author: Andrei Vagin Date: Fri Jun 28 02:10:14 2024 +0000 selftests/seccomp: check that a zombie leader doesn't affect others Ensure that a dead thread leader doesn't prevent installing new filters with SECCOMP_FILTER_FLAG_TSYNC from other threads. Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20240628021014.231976-5-avagin@google.com Reviewed-by: Tycho Andersen Signed-off-by: Kees Cook commit 39a73b4aa69aeb1adcf9960710c12842a4092b7a Author: Andrei Vagin Date: Fri Jun 28 02:10:13 2024 +0000 selftests/seccomp: add test for NOTIF_RECV and unused filters Add a new test case to check that SECCOMP_IOCTL_NOTIF_RECV returns when all tasks have gone. Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20240628021014.231976-4-avagin@google.com Reviewed-by: Tycho Andersen Signed-off-by: Kees Cook commit bfafe5efa9754ebc991750da0bcca2a6694f3ed3 Author: Andrei Vagin Date: Fri Jun 28 02:10:12 2024 +0000 seccomp: release task filters when the task exits Previously, seccomp filters were released in release_task(), which required the process to exit and its zombie to be collected. However, exited threads/processes can't trigger any seccomp events, making it more logical to release filters upon task exits. This adjustment simplifies scenarios where a parent is tracing its child process. The parent process can now handle all events from a seccomp listening descriptor and then call wait to collect a child zombie. seccomp_filter_release takes the siglock to avoid races with seccomp_sync_threads. There was an idea to bypass taking the lock by checking PF_EXITING, but it can be set without holding siglock if threads have SIGNAL_GROUP_EXIT. This means it can happen concurently with seccomp_filter_release. This change also fixes another minor problem. Suppose that a group leader installs the new filter without SECCOMP_FILTER_FLAG_TSYNC, exits, and becomes a zombie. Without this change, SECCOMP_FILTER_FLAG_TSYNC from any other thread can never succeed, seccomp_can_sync_threads() will check a zombie leader and is_ancestor() will fail. Reviewed-by: Oleg Nesterov Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20240628021014.231976-3-avagin@google.com Reviewed-by: Tycho Andersen Signed-off-by: Kees Cook commit 95036a79e7b56178e2fa9c485114be61d24c1695 Author: Andrei Vagin Date: Fri Jun 28 02:10:11 2024 +0000 seccomp: interrupt SECCOMP_IOCTL_NOTIF_RECV when all users have exited SECCOMP_IOCTL_NOTIF_RECV promptly returns when a seccomp filter becomes unused, as a filter without users can't trigger any events. Previously, event listeners had to rely on epoll to detect when all processes had exited. The change is based on the 'commit 99cdb8b9a573 ("seccomp: notify about unused filter")' which implemented (E)POLLHUP notifications. Reviewed-by: Christian Brauner Signed-off-by: Andrei Vagin Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20240628021014.231976-2-avagin@google.com Reviewed-by: Tycho Andersen Signed-off-by: Kees Cook commit 0676c434a99be42f3bacca4adfd27df65edbf903 Author: Ming Lei Date: Thu Jun 20 11:06:31 2024 +0800 block: check bio alignment in blk_mq_submit_bio IO logical block size is one fundamental queue limit, and every IO has to be aligned with logical block size because our bio split can't deal with unaligned bio. The check has to be done with queue usage counter grabbed because device reconfiguration may change logical block size, and we can prevent the reconfiguration from happening by holding queue usage counter. logical_block_size stays in the 1st cache line of queue_limits, and this cache line is always fetched in fast path via bio_may_exceed_limits(), so IO perf won't be affected by this check. Cc: Yi Zhang Cc: Christoph Hellwig Cc: Ye Bin Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240620030631.3114026-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit aa6ff4eb7c10d9a6532db3ea9e78124bf14e70ae Author: Dongliang Cui Date: Fri Jun 14 15:49:36 2024 +0800 block: Add ioprio to block_rq tracepoint Sometimes we need to track the processing order of requests with ioprio set. So the ioprio of request can be useful information. Example: block_rq_insert: 8,0 RA 16384 () 6500840 + 32 be,0,6 [binder:815_3] block_rq_issue: 8,0 RA 16384 () 6500840 + 32 be,0,6 [binder:815_3] block_rq_complete: 8,0 RA () 6500840 + 32 be,0,6 [0] Signed-off-by: Dongliang Cui Reviewed-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240614074936.113659-1-dongliang.cui@unisoc.com Signed-off-by: Jens Axboe commit d19b46340b3c0ea66bef0f6c58876cc085813ba8 Author: Christoph Hellwig Date: Wed Jun 26 06:59:38 2024 +0200 block: remove bio_integrity_process Move the bvec interation into the generate/verify helpers to avoid a bit of argument passing churn. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240626045950.189758-6-hch@lst.de Signed-off-by: Jens Axboe commit df3c485e0e60e8ad87f168092f1513a3d621fa4b Author: Christoph Hellwig Date: Wed Jun 26 06:59:37 2024 +0200 block: switch on bio operation in bio_integrity_prep Use a single switch to perform read and write specific checks and exit early for other operations instead of having two checks using different predicates. Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240626045950.189758-5-hch@lst.de Signed-off-by: Jens Axboe commit dac18fabba59149acec42621b9b603654e9459b2 Author: Christoph Hellwig Date: Wed Jun 26 06:59:36 2024 +0200 block: remove allocation failure warnings in bio_integrity_prep Allocation failures already leave a stack trace, so don't spew another warning. Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240626045950.189758-4-hch@lst.de Signed-off-by: Jens Axboe commit c096df908393b0b3445f4335dd9bbd9d98252951 Author: Christoph Hellwig Date: Wed Jun 26 06:59:35 2024 +0200 block: simplify adding the payload in bio_integrity_prep bio_integrity_add_page can add physically contiguous regions of any size, so don't bother chunking up the kmalloced buffer. Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240626045950.189758-3-hch@lst.de Signed-off-by: Jens Axboe commit c546d6f438338017480d105ab597292da67f6f6a Author: Christoph Hellwig Date: Wed Jun 26 06:59:34 2024 +0200 block: only zero non-PI metadata tuples in bio_integrity_prep The PI generation helpers already zero the app tag, so relax the zeroing to non-PI metadata. Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240626045950.189758-2-hch@lst.de Signed-off-by: Jens Axboe commit f1e46758e8b2b04c725ac706b5f455c0de0486a4 Author: Christoph Hellwig Date: Fri Jun 28 15:16:48 2024 +0200 bcache: work around a __bitwise to bool conversion sparse warning Sparse is a bit dumb about bitwise operation on __bitwise types used in boolean contexts. Add a !! to explicitly propagate to boolean without a warning. Fixes: fcf865e357f8 ("block: convert features and flags to __bitwise types") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Acked-by: Kent Overstreet Link: https://lore.kernel.org/r/20240628131657.667797-1-hch@lst.de Signed-off-by: Jens Axboe commit 53e6b65693b68519dcfd384280bfc3d34c7398e2 Author: Joao Martins Date: Thu Jun 27 12:01:05 2024 +0100 iommufd/iova_bitmap: Remove iterator logic The newly introduced dynamic pinning/windowing greatly simplifies the code and there's no obvious performance advantage that has been identified that justifies maintinaing both schemes. Remove the iterator logic and have iova_bitmap_for_each() just invoke the callback with the total iova/length. Fixes: 2780025e01e2 ("iommufd/iova_bitmap: Handle recording beyond the mapped pages") Link: https://lore.kernel.org/r/20240627110105.62325-12-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit 7a7bba16244a5c55861d8fefea72cdbb8b05323e Author: Joao Martins Date: Thu Jun 27 12:01:04 2024 +0100 iommufd/iova_bitmap: Dynamic pinning on iova_bitmap_set() Today zerocopy iova bitmaps use a static iteration scheme where it walks the bitmap data in a max iteration size of 2M of bitmap of data at a time. That translates to a fixed window of IOVA space that can span up to 64G (e.g. base pages, x86). Here 'window' refers to the IOVA space represented by the bitmap data it is iterating. This static scheme is the ideal one where the reported page-size is the same as the one behind the dirty tracker. However, problems start to appear when the dirty tracker may dirty in many PTE sizes beyond or unaligned at the boundaries of the iteration window. Such is the case for the IOMMU and commit 2780025e01e2 ("iommufd/iova_bitmap: Handle recording beyond the mapped pages") tried to fix the problem by handling the PTEs that get dirty which surprass the end of the iteration. But the fix was incomplete and it didn't handle all the data structure issues namely: 1) when there's nothing to dirty but the end of the iteration IOVA range is a IOMMU hugepage PTE that crosses iterations, when it goes to the next iteration it finds the other end of the said hugepage but don't account that it had checked for that IOPTE already. iommu driver then walk the IOVA space as if it is a new page without accounting that it is past the start of a bigger page which ends up setting (future) dirty bits slightly offset-ed. Note that the partial ranges here are self induced due as a result of the fixed 'window' scheme being unaligned to this hugepage IOPTE. 2) on the same line of thinking between pinning pages of different iterations it could allow DMA to mark PTEs as dirty on the second part of this previously mentioned partial hugepage. This leads to marking part of the hugepage as dirty but still clearing IOPTE leading to missed dirty data. So to fix these problems more fundamentally and avoid future ones: instead of iterating the whole bitmap in fixed chunks, instead only pin the bitmap pages when it has dirty bits to set. The logic is simple in iova_bitmap_set(): check where the current iova range to be marked as dirty is pinned and pin the bitmap pages where to-be-recorded @iova starts if it's not. If it's partially mapped out of the whole set, continue pinning it and set bits until the whole dirty-size is covered. The latter is more relevant with AMD iommu pgtable v1 format where you can have up 64G/128G/256G page sizes and thus you can set 64G at a time. Code also gets simpler and easier to follow. Fixing this without changing this iteration scheme means changing iommu drivers to ignore any partial pages and not clear dirty bits, which is a bit hacky. Though getting to walk only part of a IOMMU hugepage is a self-induced due to this iteration scheme as it doesn't (and can't) align the iteration boundary to the huge IOPTE at the end. Thus it can't know what the hugepage size the iteration should align to until it walks the begin/end. Dynamically pinning adds some comparisons inside iova_bitmap_set() to check if something needs to be pinned if the IOVA range is out of range. Though it has the benefit that non-dirty IOVA ranges only walk page tables without needing to pin any bitmap pages. This dynamic scheme should be better for IOMMUs where upper layers don't need or know what PTE sizes IOVAs map into (and there could be more than one PTE size[*]) until they walk the IOMMU page tables. A follow-up change will remove the iteration logic. [*] Specially on AMD v1 iommu pgtable format where most powers of two are supported as page-size. Link: https://lore.kernel.org/linux-iommu/6b90f949-48da-4cb3-ad9a-ed54f1351a9a@oracle.com/ Fixes: 2780025e01e2 ("iommufd/iova_bitmap: Handle recording beyond the mapped pages") Link: https://lore.kernel.org/r/20240627110105.62325-11-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit 00fa1a89917fbc319909231e648439b26e8857af Author: Joao Martins Date: Thu Jun 27 12:01:03 2024 +0100 iommufd/iova_bitmap: Consolidate iova_bitmap_set exit conditionals There's no need to have two conditionals when they are closely tied together. Move the setting of bitmap::set_ahead_length after it checks for ::pages array out of bounds access. Link: https://lore.kernel.org/r/20240627110105.62325-10-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit 781bc08797a2146400332acf2d7706793b51e20f Author: Joao Martins Date: Thu Jun 27 12:01:02 2024 +0100 iommufd/iova_bitmap: Move initial pinning to iova_bitmap_for_each() The pinned pages are only relevant when it starts iterating the bitmap so defer that into iova_bitmap_for_each(). Link: https://lore.kernel.org/r/20240627110105.62325-9-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit a84c690e10ae03f1cddec908ac7f5068ceed67a8 Author: Joao Martins Date: Thu Jun 27 12:01:01 2024 +0100 iommufd/iova_bitmap: Cache mapped length in iova_bitmap_map struct The amount of IOVA mapped will be used more often in iova_bitmap_set() in preparation to dynamically iterate the bitmap. Cache said length to avoid having to calculate it all the time. Link: https://lore.kernel.org/r/20240627110105.62325-8-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit 792583656f554e35383d6b2325371c8fe056a56b Author: Joao Martins Date: Thu Jun 27 12:01:00 2024 +0100 iommufd/iova_bitmap: Check iova_bitmap_done() after set ahead After iova_bitmap_set_ahead() returns it may be at the end of the range. Move iova_bitmap_set_ahead() earlier to avoid unnecessary attempt in trying to pin the next pages by reusing iova_bitmap_done() check. Fixes: 2780025e01e2 ("iommufd/iova_bitmap: Handle recording beyond the mapped pages") Link: https://lore.kernel.org/r/20240627110105.62325-7-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit dceb5304d7263f72333d25e5940254f98b663010 Author: Joao Martins Date: Thu Jun 27 12:00:59 2024 +0100 iommufd/selftest: Do not record head iova to better match iommu drivers Do not set a hugepage-aligned IOVA for incrementing an IOVA, to better match current IOMMU driver implementations. Keep the logic of clearing all IOPTE dirty bits for a whole hugepage, even if the range being dirtied starts from part of the hugepage. This is also similar to AMD driver (iommu v1 format) where IOMMU uses various subpage PTE data for dirty tracking (for non-standard page sizes). Link: https://lore.kernel.org/r/20240627110105.62325-6-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit ffa3c799ce157493615f9f3c2b3c9ba602d320b9 Author: Joao Martins Date: Thu Jun 27 12:00:58 2024 +0100 iommufd/selftest: Fix tests to use MOCK_PAGE_SIZE based buffer sizes commit a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") added tests covering edge cases in the boundaries of iova bitmap. Although it used buffer sizes thinking in PAGE_SIZE (4K) as opposed to the MOCK_PAGE_SIZE (2K) that is used in iommufd mock selftests. This meant that isn't correctly exercising everything specifically the u32 and 4K bitmap test cases. Fix selftests buffer sizes to be based on mock page size. Link: https://lore.kernel.org/r/20240627110105.62325-5-joao.m.martins@oracle.com Reported-by: Kevin Tian Closes: https://lore.kernel.org/linux-iommu/96efb6cf-a41c-420f-9673-2f0b682cac8c@oracle.com/ Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit 33335584eb78c0bda21ff8d759c39e035abb48ac Author: Joao Martins Date: Thu Jun 27 12:00:57 2024 +0100 iommufd/selftest: Add tests for <= u8 bitmap sizes Add more tests for bitmaps smaller than or equal to an u8, though skip the tests if the IOVA buffer size is smaller than the mock page size. Link: https://lore.kernel.org/r/20240627110105.62325-4-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit 9560393b830b415b2151b3dd8e065257cccbffa7 Author: Joao Martins Date: Thu Jun 27 12:00:56 2024 +0100 iommufd/selftest: Fix iommufd_test_dirty() to handle Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit ec61f820a2ff07d1717583bd57d6ee45d2763a6e Author: Joao Martins Date: Thu Jun 27 12:00:55 2024 +0100 iommufd/selftest: Fix dirty bitmap tests with u8 bitmaps With 64k base pages, the first 128k iova length test requires less than a byte for a bitmap, exposing a bug in the tests that assume that bitmaps are at least a byte. Rather than dealing with bytes, have _test_mock_dirty_bitmaps() pass the number of bits. The caller functions are adjusted to also use bits as well, and converting to bytes when clearing, allocating and freeing the bitmap. Link: https://lore.kernel.org/r/20240627110105.62325-2-joao.m.martins@oracle.com Reported-by: Matt Ochs Fixes: a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") Signed-off-by: Joao Martins Reviewed-by: Kevin Tian Tested-by: Matt Ochs Signed-off-by: Jason Gunthorpe commit f287bef6ddc208cae49c8d3833aeecda47872608 Author: Dapeng Mi Date: Thu Jun 27 10:17:55 2024 +0800 KVM: x86/pmu: Introduce distinct macros for GP/fixed counter max number Refine the macros which define maximum General Purpose (GP) and fixed counter numbers. Currently the macro KVM_INTEL_PMC_MAX_GENERIC is used to represent the maximum supported General Purpose (GP) counter number ambiguously across Intel and AMD platforms. This would cause issues if AMD begins to support more GP counters than Intel. Thus a bunch of new macros including vendor specific and vendor independent are introduced to replace the old macros. The vendor independent macros are used in x86 common code to hide vendor difference and eliminate the ambiguity. No logic changes are introduced in this patch. Signed-off-by: Dapeng Mi Link: https://lore.kernel.org/r/20240627021756.144815-1-dapeng1.mi@linux.intel.com Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 45405155d876c326da89162b8173b8cc9ab7ed75 Author: Sean Christopherson Date: Fri Jun 7 10:26:09 2024 -0700 KVM: x86: WARN if a vCPU gets a valid wakeup that KVM can't yet inject WARN if a blocking vCPU is awakened by a valid wake event that KVM can't inject, e.g. because KVM needs to complete a nested VM-enter, or needs to re-inject an exception. For the nested VM-Enter case, KVM is supposed to clear "nested_run_pending" if L1 puts L2 into HLT, i.e. entering HLT "completes" the nested VM-Enter. And for already-injected exceptions, it should be impossible for the vCPU to be in a blocking state if a VM-Exit occurred while an exception was being vectored. Link: https://lore.kernel.org/r/20240607172609.3205077-7-seanjc@google.com Signed-off-by: Sean Christopherson commit 321ef62b0c5f6f57bb8500a2ca5986052675abbf Author: Sean Christopherson Date: Fri Jun 7 10:26:08 2024 -0700 KVM: nVMX: Fold requested virtual interrupt check into has_nested_events() Check for a Requested Virtual Interrupt, i.e. a virtual interrupt that is pending delivery, in vmx_has_nested_events() and drop the one-off kvm_x86_ops.guest_apic_has_interrupt() hook. In addition to dropping a superfluous hook, this fixes a bug where KVM would incorrectly treat virtual interrupts _for L2_ as always enabled due to kvm_arch_interrupt_allowed(), by way of vmx_interrupt_blocked(), treating IRQs as enabled if L2 is active and vmcs12 is configured to exit on IRQs, i.e. KVM would treat a virtual interrupt for L2 as a valid wake event based on L1's IRQ blocking status. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240607172609.3205077-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 27c4fa42b11af780d49ce704f7fa67b3c2544df4 Author: Sean Christopherson Date: Fri Jun 7 10:26:07 2024 -0700 KVM: nVMX: Check for pending posted interrupts when looking for nested events Check for pending (and notified!) posted interrupts when checking if L2 has a pending wake event, as fully posted/notified virtual interrupt is a valid wake event for HLT. Note that KVM must check vmx->nested.pi_pending to avoid prematurely waking L2, e.g. even if KVM sees a non-zero PID.PIR and PID.0N=1, the virtual interrupt won't actually be recognized until a notification IRQ is received by the vCPU or the vCPU does (nested) VM-Enter. Fixes: 26844fee6ade ("KVM: x86: never write to memory from kvm_vcpu_check_block()") Cc: stable@vger.kernel.org Cc: Maxim Levitsky Reported-by: Jim Mattson Closes: https://lore.kernel.org/all/20231207010302.2240506-1-jmattson@google.com Link: https://lore.kernel.org/r/20240607172609.3205077-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 322a569c4b4188a0da2812f9e952780ce09b74ba Author: Sean Christopherson Date: Fri Jun 7 10:26:06 2024 -0700 KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked() Move the non-VMX chunk of the "interrupt blocked" checks to a separate helper so that KVM can reuse the code to detect if interrupts are blocked for L2, e.g. to determine if a virtual interrupt _for L2_ is a valid wake event. If L1 disables HLT-exiting for L2, nested APICv is enabled, and L2 HLTs, then L2 virtual interrupts are valid wake events, but if and only if interrupts are unblocked for L2. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240607172609.3205077-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 32f55e475ce2c4b8b124d335fcfaf1152ba977a1 Author: Sean Christopherson Date: Fri Jun 7 10:26:05 2024 -0700 KVM: nVMX: Request immediate exit iff pending nested event needs injection When requesting an immediate exit from L2 in order to inject a pending event, do so only if the pending event actually requires manual injection, i.e. if and only if KVM actually needs to regain control in order to deliver the event. Avoiding the "immediate exit" isn't simply an optimization, it's necessary to make forward progress, as the "already expired" VMX preemption timer trick that KVM uses to force a VM-Exit has higher priority than events that aren't directly injected. At present time, this is a glorified nop as all events processed by vmx_has_nested_events() require injection, but that will not hold true in the future, e.g. if there's a pending virtual interrupt in vmcs02.RVI. I.e. if KVM is trying to deliver a virtual interrupt to L2, the expired VMX preemption timer will trigger VM-Exit before the virtual interrupt is delivered, and KVM will effectively hang the vCPU in an endless loop of forced immediate VM-Exits (because the pending virtual interrupt never goes away). Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240607172609.3205077-3-seanjc@google.com Signed-off-by: Sean Christopherson commit d83c36d822be44db4bad0c43bea99c8908f54117 Author: Sean Christopherson Date: Fri Jun 7 10:26:04 2024 -0700 KVM: nVMX: Add a helper to get highest pending from Posted Interrupt vector Add a helper to retrieve the highest pending vector given a Posted Interrupt descriptor. While the actual operation is straightforward, it's surprisingly easy to mess up, e.g. if one tries to reuse lapic.c's find_highest_vector(), which doesn't work with PID.PIR due to the APIC's IRR and ISR component registers being physically discontiguous (they're 4-byte registers aligned at 16-byte intervals). To make PIR handling more consistent with respect to IRR and ISR handling, return -1 to indicate "no interrupt pending". Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240607172609.3205077-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 92c1e3cbf0d02916ae0c6fc3b78864dcb77624ad Author: Kai Huang Date: Thu Jun 27 13:05:24 2024 +1200 KVM: VMX: Switch __vmx_exit() and kvm_x86_vendor_exit() in vmx_exit() In the vmx_init() error handling path, the __vmx_exit() is done before kvm_x86_vendor_exit(). They should follow the same order in vmx_exit(). But currently __vmx_exit() is done after kvm_x86_vendor_exit() in vmx_exit(). Switch the order of them to fix. Fixes: e32b120071ea ("KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace") Signed-off-by: Kai Huang Link: https://lore.kernel.org/r/20240627010524.3732488-1-kai.huang@intel.com Signed-off-by: Sean Christopherson commit f4ebd03496f6b67940b0af92ce885c1d0dc9e121 Author: Phil Sutter Date: Thu Jun 27 00:35:05 2024 +0200 netfilter: xt_recent: Lift restrictions on max hitcount value Support tracking of up to 65535 packets per table entry instead of just 255 to better facilitate longer term tracking or higher throughput scenarios. Note how this aligns sizes of struct recent_entry's 'nstamps' and 'index' fields when 'nstamps' was larger before. This is unnecessary as the value of 'nstamps' grows along with that of 'index' after being initialized to 1 (see recent_entry_update()). Its value will thus never exceed that of 'index' and therefore does not need to provide space for larger values. Requested-by: Fabio Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1745 Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 742ad979f500c7707258b368c413c7215af09ed5 Author: Florian Westphal Date: Tue Jun 25 21:07:44 2024 +0200 selftests: netfilter: nft_queue.sh: add test for disappearing listener If userspace program exits while the queue its subscribed to has packets those need to be discarded. commit dc21c6cc3d69 ("netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()") fixed a (harmless) rcu splat that could be triggered in this case. Add a test case to cover this. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 23b2c5088d01dc7dfdb68aab76a7757704f09c6e Author: Sean Christopherson Date: Fri Jun 7 17:10:03 2024 -0700 KVM: VMX: Remove unnecessary INVEPT[GLOBAL] from hardware enable path Remove the completely pointess global INVEPT, i.e. EPT TLB flush, from KVM's VMX enablement path. KVM always does a targeted TLB flush when using a "new" EPT root, in quotes because "new" simply means a root that isn't currently being used by the vCPU. KVM also _deliberately_ runs with stale TLB entries for defunct roots, i.e. doesn't do a TLB flush when vCPUs stop using roots, precisely because KVM does the flush on first use. As called out by the comment in kvm_mmu_load(), the reason KVM flushes on first use is because KVM can't guarantee the correctness of past hypervisors. Jumping back to the global INVEPT, when the painfully terse commit 1439442c7b25 ("KVM: VMX: Enable EPT feature for KVM") was added, the effective TLB flush being performed was: static void vmx_flush_tlb(struct kvm_vcpu *vcpu) { vpid_sync_vcpu_all(to_vmx(vcpu)); } I.e. KVM was not flushing EPT TLB entries when allocating a "new" root, which very strongly suggests that the global INVEPT during hardware enabling was a misguided hack that addressed the most obvious symptom, but failed to fix the underlying bug. Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20240608001003.3296640-1-seanjc@google.com Signed-off-by: Sean Christopherson commit cb9fb5fc12ef8a7c5129c7db0f80df45726b8dcd Author: Sean Christopherson Date: Thu Jun 13 12:01:03 2024 -0700 KVM: nVMX: Update VMCS12_REVISION comment to state it should never change Rewrite the comment above VMCS12_REVISION to unequivocally state that the ID must never change. KVM_{G,S}ET_NESTED_STATE have been officially supported for some time now, i.e. changing VMCS12_REVISION would break userspace. Opportunistically add a blurb to the CHECK_OFFSET() comment to make it explicitly clear that new fields are allowed, i.e. that the restriction on the layout is all about backwards compatibility. No functional change intended. Cc: Jim Mattson Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20240613190103.1054877-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 704ec48fc2fbd4e41ec982662ad5bf1eee33eeb2 Author: Sean Christopherson Date: Mon Jun 17 14:04:31 2024 -0700 KVM: SVM: Use sev_es_host_save_area() helper when initializing tsc_aux Use sev_es_host_save_area() instead of open coding an equivalent when setting the MSR_TSC_AUX field during setup. No functional change intended. Link: https://lore.kernel.org/r/20240617210432.1642542-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 34830b3c02aec1fe6eaac7b178a05c25620a25b0 Author: Sean Christopherson Date: Mon Jun 17 14:04:30 2024 -0700 KVM: SVM: Force sev_es_host_save_area() to be inlined (for noinstr usage) Force sev_es_host_save_area() to be always inlined, as it's used in the low level VM-Enter/VM-Exit path, which is non-instrumentable. vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0xb0: call to sev_es_host_save_area() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0xbf: call to sev_es_host_save_area.isra.0() leaves .noinstr.text section Fixes: c92be2fd8edf ("KVM: SVM: Save/restore non-volatile GPRs in SEV-ES VMRUN via host save area") Reported-by: Borislav Petkov Tested-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240617210432.1642542-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 237c5c9581b4f66c0ad37c6f67c14c79f0847595 Author: Dmitry Torokhov Date: Wed Jun 26 21:46:13 2024 -0700 ARM: tegra: paz00: Use software nodes to describe GPIOs for WiFi rfkill Complete conversion of the WiFi rfkill device to use device properties/ software nodes by utilizing PROPERTY_ENTRY_GPIO() instead of a lookup table. Signed-off-by: Dmitry Torokhov Signed-off-by: Thierry Reding commit c5003718cb5ab71b75139a237741f413a147876e Merge: aff39a02b5b12 313da6f69fa41 Author: Arnd Bergmann Date: Fri Jun 28 17:51:55 2024 +0200 Merge tag 'v6.11-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt More attention for the rk3128 soc (dsi, i2c, spdif, sfc), hdmi-sound for a rk3066a board and some minor cleanups. * tag 'v6.11-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add #sound-dai-cells to hdmi node on rk3128 ARM: dts: rockchip: add #sound-dai-cells to hdmi node no rk3036 ARM: dts: rockchip: enable hdmi_sound and i2s0 for mk808 hdmi ARM: dts: rockchip: Add SFC for RK3128 ARM: dts: rockchip: add hdmi-sound node to rk3066a ARM: dts: rockchip: Add spdif node for RK3128 ARM: dts: rockchip: Add i2s nodes for RK3128 ARM: dts: rockchip: Add DSI for RK3128 ARM: dts: rockchip: Add D-PHY for RK3128 dt-bindings: clock: rk3128: Add PCLK_MIPIPHY Link: https://lore.kernel.org/r/2187283.irdbgypaU6@diego Signed-off-by: Arnd Bergmann commit 25bc6af60f6121071ab4aa924a24cf6011125614 Author: Jeff Johnson Date: Sat Jun 22 22:44:55 2024 -0700 KVM: Add missing MODULE_DESCRIPTION() Add a module description for kvm.ko to fix a 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kvm/kvm.o Opportunistically update kvm_main.c's comically stale file comment to match the module description. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240622-md-kvm-v2-1-29a60f7c48b1@quicinc.com [sean: split x86 changes to a separate commit, remove stale VT-x comment] Signed-off-by: Sean Christopherson commit aff39a02b5b12fffa75922fedeaf133d1cb7213e Merge: 24c7b96472179 9417909e253ff Author: Arnd Bergmann Date: Fri Jun 28 17:50:29 2024 +0200 Merge tag 'v6.11-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt New boards, the Radxa ROCK S0, Radxa ZERO 3W/3E, CM3588 NAS solution and Neardi LBA3368. Interesting core changes: dropping of the rk3399pro dtsi - Dragan dug through available information, boards and found out that the pcie-stuff described in the existing rk3399pro dtsi is actually not true and the file can go away. And also a bit of reorganizing of rk3588 dtsi files. There are number of rk3588 variants in existence that select between two sets of peripherals and also multiple sets of operating points. So the change sorts it differently so that we stop including one soc-variant into others and also make room for the operating points. The rk3308 got io domains, a number of additions to the rk3308-rock-pi-s board (wifi, io-domains, otp, ethernet, uart, sdmmc). And then there are of course the usual set of new additions like rk3588 pcie endpoint support and individual peripherals for boards. * tag 'v6.11-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (42 commits) arm64: dts: rockchip: Delete the SoC variant dtsi for RK3399Pro arm64: dts: rockchip: Fix mic-in-differential usage on rk3568-evb1-v10 arm64: dts: rockchip: Fix mic-in-differential usage on rk3566-roc-pc arm64: dts: rockchip: Drop invalid mic-in-differential on rk3568-rock-3a arm64: dts: rockchip: Add rock5b overlays for PCIe endpoint mode arm64: dts: rockchip: Add PCIe endpoint mode support arm64: dts: rockchip: Increase VOP clk rate on RK3328 arm64: dts: rockchip: add gpio-line-names to radxa-zero-3 arm64: dts: rockchip: Split GPU OPPs of RK3588 and RK3588j arm64: dts: rockchip: Add OPP data for CPU cores on RK3588j arm64: dts: rockchip: Add OPP data for CPU cores on RK3588 arm64: dts: rockchip: Add CPU/memory regulator coupling for 2 RK3588 boards arm64: dts: rockchip: fix mmc aliases for Radxa ZERO 3E/3W arm64: dts: rockchip: Add Neardi LBA3368 board dt-bindings: arm: rockchip: Add Neardi LBA3368 dt-bindings: vendor-prefixes: Add Neardi Technology arm64: dts: rockchip: Enable PinePhone Pro vibrator arm64: dts: rockchip: Enable PinePhone Pro IMU sensor arm64: dts: rockchip: Add Pinephone Pro support for GPIO LEDs arm64: dts: rockchip: Enable SPI flash on PinePhone Pro ... Link: https://lore.kernel.org/r/4901395.GXAFRqVoOG@diego Signed-off-by: Arnd Bergmann commit 8815d77cbc99ef817a58b02af206706890ae2b80 Author: Jeff Johnson Date: Sat Jun 22 22:44:55 2024 -0700 KVM: x86: Add missing MODULE_DESCRIPTION() macros Add module descriptions for the vendor modules to fix allmodconfig 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kvm/kvm-intel.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kvm/kvm-amd.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240622-md-kvm-v2-1-29a60f7c48b1@quicinc.com [sean: split kvm.ko change to separate commit] Signed-off-by: Sean Christopherson commit 24c7b96472179f1675799626cdf07ecf7838c523 Merge: c48081f41efac 8a3d2ad6129c1 Author: Arnd Bergmann Date: Fri Jun 28 17:45:38 2024 +0200 Merge tag 'renesas-dt-bindings-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DT binding updates for v6.11 - Document support for R-Car E-FUSE controllers. * tag 'renesas-dt-bindings-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: fuse: Document R-Car E-FUSE / OTP_MEM dt-bindings: fuse: Document R-Car E-FUSE / PFC Link: https://lore.kernel.org/r/cover.1719578279.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit c48081f41efac44d551f24263251ab1d5ff61dd2 Merge: c4043e7655ffd c04774af7ae39 Author: Arnd Bergmann Date: Fri Jun 28 17:44:32 2024 +0200 Merge tag 'mtk-dts32-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt MediaTek ARM32 DTS updates for v6.11 This adds a single commit that cleans up the drive-strength value assignment on all devicetrees using the deprecated MTK_DRIVE_(x)mA definition. * tag 'mtk-dts32-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: arm: dts: mediatek: Declare drive-strength numerically Link: https://lore.kernel.org/r/20240628093801.126013-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 4669de42aa6c78669975d58c92433cdedeb7c2c3 Author: Maxim Levitsky Date: Thu Jun 27 17:55:57 2024 -0700 KVM: selftests: Increase robustness of LLC cache misses in PMU counters test Currently the PMU counters test does a single CLFLUSH{,OPT} on the loop's code, but due to speculative execution this might not cause LLC misses within the measured section. Instead of doing a single flush before the loop, do a cache flush on each iteration of the loop to confuse the prediction and ensure that at least one cache miss occurs within the measured section. Signed-off-by: Maxim Levitsky [sean: keep MFENCE, massage changelog] Link: https://lore.kernel.org/r/20240628005558.3835480-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 5bb9af07d37c95ac83725ed0f92c2a4315ade0ae Author: Sean Christopherson Date: Thu Jun 27 17:55:56 2024 -0700 KVM: selftests: Rework macros in PMU counters test to prep for multi-insn loop Tweak the macros in the PMU counters test to prepare for moving the CLFLUSH+MFENCE instructions into the loop body, to fix an issue where a single CLFUSH doesn't guarantee an LLC miss. Link: https://lore.kernel.org/r/20240628005558.3835480-2-seanjc@google.com Signed-off-by: Sean Christopherson commit c4043e7655ffd31dafc3bce9227f139a196e1dbd Merge: 7fd04cf2576e6 d79603c2be61c Author: Arnd Bergmann Date: Fri Jun 28 17:41:42 2024 +0200 Merge tag 'mtk-dts64-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt MediaTek ARM64 DTS updates for v6.11 This introduces the new Airoha (MediaTek) EN7581 home networking platform (routers) in early stages, but with support for its Evaluation Board, a few more MediaTek based machines, and improvements for existing ones. For the MT7981 router SoC we get pinctrl support, along with the enablement of its watchdog, eFuse/nvmem, I2C and integrated WiFi controller, other than the introduction of new machines based on this chip: the Cudy WR3000 V1 router and the OpenWRT One. MT7986 gets a new machine: the BananaPi R3 Mini. Some advancements have been done also on the MT7988 SoC, which gains support for its I2C, PWM and USB XHCI controllers. MediaTek Genio SoCs also get attention, with the introduction of a basic device tree for the MT8390 Genio 700-EVK board, and for the MT8395 Genio 1200 powered Kontron 3.5"-SBC-i1200. Additionally, the Genio 1200 Radxa NIO12L board gets support for USB Role Switching and proper PCI-Express controller PM suspend and resume, other than finally enabling CPU and GPU frequency and voltage scaling for improved efficiency. Speaking of MediaTek Kompanio SoCs (Chromebooks) instead, thanks to community interest and help in testing, there comes support for the MT8195-powered HP Chromebook X360 13b-ca0002sa, while Google contributed support for the MT8186-powered Acer Chromebook 311. Moreover, MT8188 gets support for its integrated power domains, other than its Global Command Engine (GCE) mailboxes, initial basic support for the VDO0/1 blocks for multimedia, and its GPU (ARM Mali G57-MC3, Valhall-JM) with Panfrost. Besides that, this also adds a few other cleanups and improvements for all machines using the MT8183, MT8192, MT8195/MT8395 SoCs and adds generation of symbols on base devicetrees of machines using Device Tree Overlay(s) (DTBO). In particular: - The MediaTek Smart Voltage Scaling (SVS) is now fully working those SoCs, bringing further power efficiency improvements; - Thermal zones were refactored on MT8183 for consistency with the other MediaTek SoCs and for readability - Sound DAI links are now consistently specified in device tree on MT8195 and MT8186 machines - Newly supported machines/boards - EN7581: EVK - MT7981: Cudy WR3000 V1, OpenWRT One - MT7986: BananaPi R3 Mini - MT8186: Acer Chromebook 311 (Corsola Voltorb) - MT8195: HP Chromebook X360 13b-ca0002sa (Cherry Dojo) - MT8390/8188: Genio 700 EVK - Some cleanups for unused/legacy devicetree properties * tag 'mtk-dts64-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: (58 commits) arm64: dts: mediatek: Declare drive-strength numerically arm64: dts: mt7622: fix switch probe on bananapi-r64 arm64: dts: mediatek: Add MT8186 Voltorb Chromebooks dt-bindings: arm: mediatek: Add MT8186 Voltorb Chromebooks arm64: dts: mediatek: Makefile: Generate symbols for DTBO support arm64: dts: mediatek: mt8183-kukui-jacuzzi: Add ports node for anx7625 arm64: dts: mediatek: mt8183-pico6: Fix wake-on-X event node names arm64: dts: mt8173: Add G2Touch touchscreen node arm64: dts: mediatek: mt8183-kukui: Fix the value of `dlg,jack-det-rate` mismatch arm64: dts: mediatek: mt8188: Add support for Mali GPU on Panfrost arm64: dts: mediatek: mt8188: Add support for SoC power domains arm64: dts: mediatek: mt8188: Add VDOSYS0/1 support for multimedia arm64: dts: mediatek: mt8188: Add Global Command Engine mailboxes arm64: dts: mediatek: mt8173-elm: drop PMIC's syscon node arm64: dts: mediatek: mt8365: use a specific SCPSYS compatible arm64: dts: mediatek: mt8365: drop incorrect power-domain-cells arm64: dts: mediatek: mt7981: add I2C controller arm64: dts: mediatek: mt7622: fix "emmc" pinctrl mux arm64: dts: mediatek: mt7988: add I2C controllers arm64: dts: mediatek: mt7988: add PWM controller ... Link: https://lore.kernel.org/r/20240628093801.126013-1-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 5e4bbe52207c3927dd2690e46bdbef6392d7bde4 Author: Vedant Deshpande Date: Thu Jun 27 21:53:16 2024 +0000 arm64: tegra: Restructure Orin NX/Nano device tree The Orin NX and Orin Nano boards share a common carrier board and the module boards for both platforms are very similar. Therefore, restructure the Orin NX/Nano device-tree source files to adhere to a simple hierarchical format. This will help make clear where changes should go, and eliminates redundancy within the files. Previously the carrier board file was independent. However, given that it is so tightly coupled with the module design, it will be more practical to combine files together for a simpler layout. Following changes are made to restructure the device tree source files: 1) Change include hierarchy. Top-level dts includes board dtsi. Board dtsi includes module dtsi. Module dtsi includes SoC dtsi. 2) Data from the top level dts file that is common to both Orin NX and Orin Nano is in tegra234-p3768-0000+p3767.dtsi. 3) Only data that is unique to NX/Nano is present in the top-level dts. Signed-off-by: Vedant Deshpande Signed-off-by: Thierry Reding commit 7fd04cf2576e6004c2a298e5514d6094be898515 Merge: b1a4e71d4fc46 b664f6f7a77a4 Author: Arnd Bergmann Date: Fri Jun 28 17:31:49 2024 +0200 Merge tag 'sti-dt-for-v6.11-round1' of https://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into soc/dt STi DT for v6.11 : _ Add #thermal-sensor-cells property on stih410.dtsi and stih418.dtsi _ Add thermal-zones support on stih418 _ commit ebbdf37ce9abb597015fa85df6630ebfa7d0a97f Author: Pei Li Date: Thu Jun 27 08:03:56 2024 -0700 KVM: Validate hva in kvm_gpc_activate_hva() to fix __kvm_gpc_refresh() WARN Check that the virtual address is "ok" when activating a gfn_to_pfn_cache with a host VA to ensure that KVM never attempts to use a bad address. This fixes a bug where KVM fails to check the incoming address when handling KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA in kvm_xen_vcpu_set_attr(). Reported-by: syzbot+fd555292a1da3180fc82@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=fd555292a1da3180fc82 Tested-by: syzbot+fd555292a1da3180fc82@syzkaller.appspotmail.com Signed-off-by: Pei Li Reviewed-by: Paul Durrant Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20240627-bug5-v2-1-2c63f7ee6739@gmail.com [sean: rewrite changelog with --verbose] Signed-off-by: Sean Christopherson commit b1a4e71d4fc463934b6b00cc3460f93b4816816d Author: Rob Herring Date: Thu Jun 27 21:57:38 2024 +0200 arm: dts: arm: Drop redundant fixed-factor clocks There's not much reason to have multiple fixed-factor-clock instances which are all the same factor and clock input. Drop the nodes, but keep the labels to minimize the changes and keep some distinction of the different clocks. Signed-off-by: Rob Herring (Arm) Reviewed-by: Linus Walleij Link: https://lore.kernel.org/20240528191536.1444649-1-robh@kernel.org Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20240627-arm-dts-fixes-v1-1-40a2cb7d344b@linaro.org Signed-off-by: Arnd Bergmann commit f7e642bcd622e1fccd150eae5b894ad3fe38930e Author: Marek Behún Date: Mon Jun 24 16:53:55 2024 +0200 dt-bindings: interrupt-controller: convert marvell,mpic binding to YAML Convert the marvell,mpic device-tree binding to YAML. Add myself as maintainer. Signed-off-by: Marek Behún Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240624145355.8034-3-kabel@kernel.org Signed-off-by: Arnd Bergmann commit 2af8d8a583a483530ce3cbb06a953fa5aacdb557 Author: Marek Behún Date: Mon Jun 24 16:53:54 2024 +0200 ARM: dts: armada-{370-xp,375,38x,39x}: Drop #size-cells from mpic node The marvell,mpic interrupt controller has no children nodes. Drop the Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20240624145355.8034-2-kabel@kernel.org Signed-off-by: Arnd Bergmann commit c03088be18b4c0c23191f033631f5f62852babb0 Author: Krzysztof Kozlowski Date: Fri Jun 28 11:50:43 2024 +0200 MAINTAINERS: ARM: airoha: add entry to cover Airoha SoC Airoha SoC is not covered by any maintainer entry so relevant patches can be missed. It seems Mediatek SoC maintainers were covering some parts of Airoha and Airoha itself is subsidiary of Mediatek, so assign the Airoha maintenance to Matthias and AngeloGioacchino. Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Signed-off-by: Krzysztof Kozlowski Acked-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240628095044.132276-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit fa071acfefe84dc0a6a612afd1d8a35b97feb99e Author: Besar Wicaksono Date: Thu May 9 21:58:08 2024 +0000 arm64: defconfig: Enable NVIDIA CoreSight PMU driver Enable NVIDIA driver for Coresight PMU arch device. Signed-off-by: Besar Wicaksono Signed-off-by: Thierry Reding commit f53d3efa366b1754f0389944401bb53397d22468 Author: Karel Balej Date: Fri May 31 19:35:00 2024 +0200 MAINTAINERS: Add myself for Marvell 88PM886 PMIC Add an entry to MAINTAINERS for the Marvell 88PM886 PMIC MFD, onkey and regulator drivers. Signed-off-by: Karel Balej Link: https://lore.kernel.org/r/20240531175109.15599-6-balejk@matfyz.cz Signed-off-by: Lee Jones commit 914089db309ccc590314b6c21df5a1f812e9ab0b Author: Karel Balej Date: Fri May 31 19:34:59 2024 +0200 input: Add onkey driver for Marvell 88PM886 PMIC Marvell 88PM886 PMIC provides onkey among other things. Add client driver to handle it. The driver currently only provides a basic support omitting additional functions found in the vendor version, such as long onkey and GPIO integration. Signed-off-by: Karel Balej Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20240531175109.15599-5-balejk@matfyz.cz Signed-off-by: Lee Jones commit 5d1a5144396e9570efea02d467df0a68fd28db6f Author: Karel Balej Date: Fri May 31 19:34:58 2024 +0200 regulator: Add regulators driver for Marvell 88PM886 PMIC Support the LDO and buck regulators of the Marvell 88PM886 PMIC. Signed-off-by: Karel Balej Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20240531175109.15599-4-balejk@matfyz.cz Signed-off-by: Lee Jones commit 860f8e3beac0b800bbe20f23c5f3440b1c470b8f Author: Karel Balej Date: Fri May 31 19:34:57 2024 +0200 mfd: Add driver for Marvell 88PM886 PMIC Marvell 88PM886 is a PMIC which provides various functions such as onkey, battery, charger and regulators. It is found for instance in the samsung,coreprimevelte smartphone with which this was tested. Implement basic support to allow for the use of regulators and onkey. Signed-off-by: Karel Balej Link: https://lore.kernel.org/r/20240531175109.15599-3-balejk@matfyz.cz Signed-off-by: Lee Jones commit c4725350a9f76fbec45cbbfffb20be2e574eb6ef Author: Karel Balej Date: Fri May 31 19:34:56 2024 +0200 dt-bindings: mfd: Add entry for Marvell 88PM886 PMIC Marvell 88PM886 is a PMIC with several subdevices such as onkey, regulators or battery and charger. It comes in at least two revisions, A0 and A1 -- only A1 is described here at the moment. Signed-off-by: Karel Balej Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240531175109.15599-2-balejk@matfyz.cz Signed-off-by: Lee Jones commit c486def5b3ba6c55294cee9abc7396d9dc18f223 Author: James Ogletree Date: Thu Jun 20 16:17:45 2024 +0000 ASoC: cs40l50: Support I2S streaming to CS40L50 Introduce support for Cirrus Logic Device CS40L50: a haptic driver with waveform memory, integrated DSP, and closed-loop algorithms. The ASoC driver enables I2S streaming to the device. Reviewed-by: David Rhodes Signed-off-by: James Ogletree Reviewed-by: Jeff LaBundy Reviewed-by: Ricardo Rivera-Matos Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20240620161745.2312359-6-jogletre@opensource.cirrus.com Signed-off-by: Lee Jones commit c38fe1bb5d21c2ce0857965ee06174ee587d6b42 Author: James Ogletree Date: Thu Jun 20 16:17:44 2024 +0000 Input: cs40l50 - Add support for the CS40L50 haptic driver Introduce support for Cirrus Logic Device CS40L50: a haptic driver with waveform memory, integrated DSP, and closed-loop algorithms. The input driver provides the interface for control of haptic effects through the device. Signed-off-by: James Ogletree Reviewed-by: Jeff LaBundy Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20240620161745.2312359-5-jogletre@opensource.cirrus.com Signed-off-by: Lee Jones commit cb626376cbd00cd69329371519a8e9568baef715 Author: James Ogletree Date: Thu Jun 20 16:17:43 2024 +0000 mfd: cs40l50: Add support for CS40L50 core driver Introduce support for Cirrus Logic Device CS40L50: a haptic driver with waveform memory, integrated DSP, and closed-loop algorithms. The MFD component registers and initializes the device. Signed-off-by: James Ogletree Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20240620161745.2312359-4-jogletre@opensource.cirrus.com Signed-off-by: Lee Jones commit 2fab5abad124fe7e1b99ccba3305aa4c5a24496b Author: James Ogletree Date: Thu Jun 20 16:17:42 2024 +0000 dt-bindings: input: cirrus,cs40l50: Add initial DT binding CS40L50 is a haptic driver with waveform memory, integrated DSP, and closed-loop algorithms. Add a YAML DT binding document for this device. Reviewed-by: Krzysztof Kozlowski Signed-off-by: James Ogletree Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20240620161745.2312359-3-jogletre@opensource.cirrus.com Signed-off-by: Lee Jones commit 205fdba5d0ffe1ad8de61763d74323e88b640d41 Author: James Ogletree Date: Thu Jun 20 16:17:41 2024 +0000 firmware: cs_dsp: Add write sequence interface A write sequence is a sequence of register addresses and values executed by some Cirrus DSPs following certain power state transitions. Add support for Cirrus drivers to update or add to a write sequence present in firmware. Reviewed-by: Charles Keepax Signed-off-by: James Ogletree Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20240620161745.2312359-2-jogletre@opensource.cirrus.com Signed-off-by: Lee Jones commit 0dabf24cf4afce9990ef9e7b2465f9713e1f77e2 Merge: 6ba59ff422792 69a6661b6f2f1 Author: Arnd Bergmann Date: Fri Jun 28 16:28:59 2024 +0200 Merge tag 'vexpress-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/arm Arm Vexpress updates for v6.11 Remove obsolete RTSM DCSCB support which was only ever implemented on a software model which is neither available to download nor maintained. It predates the very first bL cluster based platforms. Other change include addition of the missing MODULE_DESCRIPTION macro in vexpress config bus driver. * tag 'vexpress-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: bus: vexpress-config: Add missing MODULE_DESCRIPTION() macro dt-bindings: arm: Remove obsolete RTSM DCSCB binding arm: vexpress: Remove obsolete RTSM DCSCB support Link: https://lore.kernel.org/r/20240620093924.375244-4-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 677ab23bdf416ec8f3ecaf10d7cc8d0ccb46adab Author: Frederic Weisbecker Date: Wed May 15 14:53:32 2024 +0200 rcu/exp: Remove redundant full memory barrier at the end of GP A full memory barrier is necessary at the end of the expedited grace period to order: 1) The grace period completion (pictured by the GP sequence number) with all preceding accesses. This pairs with rcu_seq_end() performed by the concurrent kworker. 2) The grace period completion and subsequent post-GP update side accesses. Pairs again against rcu_seq_end(). This full barrier is already provided by the final sync_exp_work_done() test, making the subsequent explicit one redundant. Remove it and improve comments. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Boqun Feng Reviewed-by: Neeraj Upadhyay commit 55911a9f4287c19bf7ef29aeace14044a6ed88cb Author: Frederic Weisbecker Date: Wed May 15 14:53:31 2024 +0200 rcu: Remove full memory barrier on RCU stall printout RCU stall printout fetches the EQS state of a CPU with a preceding full memory barrier. However there is nothing to order this read against at this debugging stage. It is inherently racy when performed remotely. Do a plain read instead. This was the last user of rcu_dynticks_snap(). Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Boqun Feng Reviewed-by: Neeraj Upadhyay commit e7a3c8ea6e2509f71150fa13b00da3ef2bbe2387 Author: Frederic Weisbecker Date: Wed May 15 14:53:30 2024 +0200 rcu: Remove full memory barrier on boot time eqs sanity check When the boot CPU initializes the per-CPU data on behalf of all possible CPUs, a sanity check is performed on each of them to make sure none is initialized in an extended quiescent state. This check involves a full memory barrier which is useless at this early boot stage. Do a plain access instead. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Boqun Feng Reviewed-by: Neeraj Upadhyay commit 33c0860bf7e7ace39eba96f51cc6d898ab253202 Author: Frederic Weisbecker Date: Thu Jun 27 13:36:58 2024 +0200 rcu/exp: Remove superfluous full memory barrier upon first EQS snapshot When the grace period kthread checks the extended quiescent state counter of a CPU, full ordering is necessary to ensure that either: * If the GP kthread observes the remote target in an extended quiescent state, then that target must observe all accesses prior to the current grace period, including the current grace period sequence number, once it exits that extended quiescent state. or: * If the GP kthread observes the remote target NOT in an extended quiescent state, then the target further entering in an extended quiescent state must observe all accesses prior to the current grace period, including the current grace period sequence number, once it enters that extended quiescent state. This ordering is enforced through a full memory barrier placed right before taking the first EQS snapshot. However this is superfluous because the snapshot is taken while holding the target's rnp lock which provides the necessary ordering through its chain of smp_mb__after_unlock_lock(). Remove the needless explicit barrier before the snapshot and put a comment about the implicit barrier newly relied upon here. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Boqun Feng Reviewed-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit 9a7e73c9bedfecd00370403b5d35514b2d3aba3d Author: Frederic Weisbecker Date: Thu Jun 27 13:32:36 2024 +0200 rcu: Remove superfluous full memory barrier upon first EQS snapshot When the grace period kthread checks the extended quiescent state counter of a CPU, full ordering is necessary to ensure that either: * If the GP kthread observes the remote target in an extended quiescent state, then that target must observe all accesses prior to the current grace period, including the current grace period sequence number, once it exits that extended quiescent state. or: * If the GP kthread observes the remote target NOT in an extended quiescent state, then the target further entering in an extended quiescent state must observe all accesses prior to the current grace period, including the current grace period sequence number, once it enters that extended quiescent state. This ordering is enforced through a full memory barrier placed right before taking the first EQS snapshot. However this is superfluous because the snapshot is taken while holding the target's rnp lock which provides the necessary ordering through its chain of smp_mb__after_unlock_lock(). Remove the needless explicit barrier before the snapshot and put a comment about the implicit barrier newly relied upon here. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Boqun Feng Reviewed-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit 0a5e9bd31e128001939719aa507469ab7bd4f5ec Author: Frederic Weisbecker Date: Thu Jun 27 13:27:57 2024 +0200 rcu: Remove full ordering on second EQS snapshot When the grace period kthread checks the extended quiescent state counter of a CPU, full ordering is necessary to ensure that either: * If the GP kthread observes the remote target in an extended quiescent state, then that target must observe all accesses prior to the current grace period, including the current grace period sequence number, once it exits that extended quiescent state. Also the GP kthread must observe all accesses performed by the target prior it entering in EQS. or: * If the GP kthread observes the remote target NOT in an extended quiescent state, then the target further entering in an extended quiescent state must observe all accesses prior to the current grace period, including the current grace period sequence number, once it enters that extended quiescent state. Also the GP kthread later observing that EQS must also observe all accesses performed by the target prior it entering in EQS. This ordering is explicitly performed both on the first EQS snapshot and on the second one as well through the combination of a preceding full barrier followed by an acquire read. However the second snapshot's full memory barrier is redundant and not needed to enforce the above guarantees: GP kthread Remote target ---- ----- // Access prior GP WRITE_ONCE(A, 1) // first snapshot smp_mb() x = smp_load_acquire(EQS) // Access prior GP WRITE_ONCE(B, 1) // EQS enter // implied full barrier by atomic_add_return() atomic_add_return(RCU_DYNTICKS_IDX, EQS) // implied full barrier by atomic_add_return() READ_ONCE(A) // second snapshot y = smp_load_acquire(EQS) z = READ_ONCE(B) If the GP kthread above fails to observe the remote target in EQS (x not in EQS), the remote target will observe A == 1 after further entering in EQS. Then the second snapshot taken by the GP kthread only need to be an acquire read in order to observe z == 1. Therefore remove the needless full memory barrier on second snapshot. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Reviewed-by: Boqun Feng Reviewed-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit 42c141fbb651b64db492aab35bc1d96eb4c20261 Author: Josh Poimboeuf Date: Tue Jun 25 23:02:02 2024 -0700 x86/bugs: Add 'spectre_bhi=vmexit' cmdline option In cloud environments it can be useful to *only* enable the vmexit mitigation and leave syscalls vulnerable. Add that as an option. This is similar to the old spectre_bhi=auto option which was removed with the following commit: 36d4fe147c87 ("x86/bugs: Remove CONFIG_BHI_MITIGATION_AUTO and spectre_bhi=auto") with the main difference being that this has a more descriptive name and is disabled by default. Mitigation switch requested by Maksim Davydov . [ bp: Massage. ] Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Daniel Sneddon Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/2cbad706a6d5e1da2829e5e123d8d5c80330148c.1719381528.git.jpoimboe@kernel.org commit 4586c93ebf410c2b7f480cc4762edd59012a66c0 Author: Josh Poimboeuf Date: Tue Jun 25 23:02:01 2024 -0700 x86/bugs: Remove duplicate Spectre cmdline option descriptions Duplicating the documentation of all the Spectre kernel cmdline options in two separate files is unwieldy and error-prone. Instead just add a reference to kernel-parameters.txt from spectre.rst. Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Daniel Sneddon Link: https://lore.kernel.org/r/450b5f4ffe891a8cc9736ec52b0c6f225bab3f4b.1719381528.git.jpoimboe@kernel.org commit 9142be9e6443fd641ca37f820efe00d9cd890eb1 Author: Josh Poimboeuf Date: Tue Jun 25 23:02:00 2024 -0700 x86/syscall: Mark exit[_group] syscall handlers __noreturn The direct-call syscall dispatch function doesn't know that the exit() and exit_group() syscall handlers don't return, so the call sites aren't optimized accordingly. Fix that by marking the exit syscall declarations __noreturn. Fixes the following warnings: vmlinux.o: warning: objtool: x64_sys_call+0x2804: __x64_sys_exit() is missing a __noreturn annotation vmlinux.o: warning: objtool: ia32_sys_call+0x29b6: __ia32_sys_exit_group() is missing a __noreturn annotation Fixes: 1e3ad78334a6 ("x86/syscall: Don't force use of indirect calls for system calls") Closes: https://lkml.kernel.org/lkml/6dba9b32-db2c-4e6d-9500-7a08852f17a3@paulmck-laptop Reported-by: Paul E. McKenney Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov (AMD) Tested-by: Paul E. McKenney Link: https://lore.kernel.org/r/5d8882bc077d8eadcc7fd1740b56dfb781f12288.1719381528.git.jpoimboe@kernel.org commit 8ad49a92cff4bab13eb2f2725243f5f31eff3f3b Author: Michael Walle Date: Tue Jun 4 10:33:37 2024 +0200 drm/mediatek/dp: Fix spurious kfree() drm_edid_to_sad() might return an error or just zero. If that is the case, we must not free the SADs because there was no allocation in the first place. Fixes: dab12fa8d2bd ("drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection") Signed-off-by: Michael Walle Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Jani Nikula Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20240604083337.1879188-1-mwalle@kernel.org/ Signed-off-by: Chun-Kuang Hu commit f219af8a3f9e54bad10021defe04cd8b5867cb89 Author: Jeff Johnson Date: Sat Jun 15 20:01:17 2024 -0700 s390/3270: Add missing MODULE_DESCRIPTION() macros With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/char/raw3270.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/char/con3270.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/char/fs3270.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Acked-by: Heiko Carstens Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-s390-drivers-s390-char-v1-1-d1cd23ff6476@quicinc.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit b051271dba2a7568125b0d901825cc134fb85071 Author: Jeff Johnson Date: Sat Jun 15 19:34:50 2024 -0700 s390/dcssblk: Add missing MODULE_DESCRIPTION() macro With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dcssblk.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Acked-by: Heiko Carstens Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-s390-drivers-s390-block-dcssblk-v1-1-d9d19703abcb@quicinc.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 7a6d19c3c78f8cf8e192b6615073ec712fb6f16a Author: Jeff Johnson Date: Sat Jun 15 18:23:21 2024 -0700 s390/mm: Add missing MODULE_DESCRIPTION() macro With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/s390/mm/cmm.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Acked-by: Heiko Carstens Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-s390-arch-s390-mm-v1-1-a360eed8c7c3@quicinc.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 4657a8a1c0538abc9e841fa64692d2c59edac2c0 Author: Jeff Johnson Date: Sat Jun 15 17:47:26 2024 -0700 s390/lib: Add missing MODULE_DESCRIPTION() macros With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/s390/lib/test_kprobes_s390.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/s390/lib/test_unwind.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/s390/lib/test_modules.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Acked-by: Heiko Carstens Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-s390-arch-s390-lib-v1-1-d7424b943973@quicinc.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 68d7bb54215f4b941fc58cfa22e6e0ea54e70f42 Author: Jeff Johnson Date: Sat Jun 15 16:46:50 2024 -0700 s390/crc32: Add missing MODULE_DESCRIPTION() macro With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/s390/crypto/crc32-vx_s390.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Acked-by: Heiko Carstens Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-s390-arch-s390-crypto-v1-1-7120d406e7c7@quicinc.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 730674b21db12be6ea6b3034c618de5d7a16987d Author: Jerome Brunet Date: Fri Jun 28 14:32:54 2024 +0200 ASoC: meson: tdm: add sample rate support up to 768kHz Add support for 705.6kHz and 768kHz sample rates Signed-off-by: Jerome Brunet Link: https://patch.msgid.link/20240628123256.2019224-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 288921232dd97bb2e35cff2ee38957db5b3e5ef1 Author: Shengjiu Wang Date: Thu Jun 27 17:52:59 2024 +0800 ASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts On i.MX8MP, there are 3 interrupts, the third interrupt is SPDIF wakeup interrupt from PHY Add ref: dai-common.yaml for #sound-dai-cells is needed and XCVR is a DAI device. Signed-off-by: Shengjiu Wang Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/1719481981-4069-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1a70579723fde3624a72dfea6e79e55be6e36659 Author: Chen Ni Date: Fri Jun 28 16:05:34 2024 +0800 ASoC: max98088: Check for clk_prepare_enable() error clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Fixes: 62a7fc32a628 ("ASoC: max98088: Add master clock handling") Signed-off-by: Chen Ni Link: https://patch.msgid.link/20240628080534.843815-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 061505a1a61169bd25dd908f95ba22f33dffdd69 Author: Yang Li Date: Fri Jun 28 13:24:06 2024 +0800 ASoC: Remove unneeded semicolon ./sound/soc/codecs/ak4619.c:757:2-3: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9442 Signed-off-by: Yang Li Link: https://patch.msgid.link/20240628052406.36644-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 4adf454ff62883ee64b0b9818b951f34aa078d5a Author: Jerome Brunet Date: Fri Jun 28 14:01:29 2024 +0200 ASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai The dummy DAI should allow any (reasonable) rates possible. Make the rate continuous for dummy and set range from 5512Hz to 768kHz The change is mostly cosmetic as dummy is skipped when setting the hwparams. Signed-off-by: Jerome Brunet Link: https://patch.msgid.link/20240628120130.2015665-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 0959de657a10cc40b2cc41cff9169ab0e0fd4456 Author: Piotr Wojtaszczyk Date: Thu Jun 27 17:00:29 2024 +0200 ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs This driver was ported from an old version in linux 2.6.27 and adjusted for the new ASoC framework and DMA API. Signed-off-by: Piotr Wojtaszczyk Link: https://patch.msgid.link/20240627150046.258795-12-piotr.wojtaszczyk@timesys.com Signed-off-by: Mark Brown commit 752fea92d9b3e4255a2f75e7efa6fe148562ccbf Author: Piotr Wojtaszczyk Date: Thu Jun 27 17:00:21 2024 +0200 ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding Add nxp,lpc3220-i2s DT binding documentation. Signed-off-by: Piotr Wojtaszczyk Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240627150046.258795-4-piotr.wojtaszczyk@timesys.com Signed-off-by: Mark Brown commit 69e2326a21ef409d6c709cb990565331727b9f27 Author: Marc Kleine-Budde Date: Tue Jun 25 16:03:52 2024 +0200 can: gs_usb: add VID/PID for Xylanta SAINT3 product family Add support for the Xylanta SAINT3 product family. Cc: Andy Jackson Cc: Ken Aitchison Tested-by: Andy Jackson Link: https://lore.kernel.org/all/20240625140353.769373-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 682d12148c264484562f130f0c8584839ebc36fc Merge: d842379313a2c e2f718e25537d Author: Christian Brauner Date: Wed Jun 26 11:23:58 2024 +0200 Merge patch series "Add the ability to query mount options in statmount" Josef Bacik says: Currently if you want to get mount options for a mount and you're using statmount(), you still have to open /proc/mounts to parse the mount options. statmount() does have the ability to store an arbitrary string however, additionally the way we do that is with a seq_file, which is also how we use ->show_options for the individual file systems. Extent statmount() to have a flag for fetching the mount options of a mount. This allows users to not have to parse /proc mount for anything related to a mount. I've extended the existing statmount() test to validate this feature works as expected. As you can tell from the ridiculous amount of silly string parsing, this is a huge win for users and climate change as we will no longer have to waste several cycles parsing strings anymore. Josef Bacik (4): fs: rename show_mnt_opts -> show_vfsmnt_opts fs: add a helper to show all the options for a mount fs: export mount options via statmount() sefltests: extend the statmount test for mount options fs/internal.h | 5 + fs/namespace.c | 7 + fs/proc_namespace.c | 29 ++-- include/uapi/linux/mount.h | 3 +- .../filesystems/statmount/statmount_test.c | 131 +++++++++++++++++- 5 files changed, 164 insertions(+), 11 deletions(-) Link: https://lore.kernel.org/r/cover.1719257716.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit e2f718e25537d3567ababbe4276306efd3f23f47 Author: Josef Bacik Date: Mon Jun 24 15:40:53 2024 -0400 sefltests: extend the statmount test for mount options Now that we support exporting mount options, via statmount(), add a test to validate that it works. Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/cabe09f0933d9c522da6e7b6cc160254f4f6c3b9.1719257716.git.josef@toxicpanda.com Reviewed-by: Jeff Layton [brauner: simplify and fix] Signed-off-by: Christian Brauner commit d842379313a2c205dae64dbfd0aa13dba142a867 Author: Christian Brauner Date: Tue Jun 25 14:33:45 2024 +0200 fs: use guard for namespace_sem in statmount() Signed-off-by: Christian Brauner commit f9af549d1fd31487bbbc666b5b158cfc940ccc17 Author: Josef Bacik Date: Mon Jun 24 15:40:52 2024 -0400 fs: export mount options via statmount() statmount() can export arbitrary strings, so utilize the __spare1 slot for a mnt_opts string pointer, and then support asking for and setting the mount options during statmount(). This calls into the helper for showing mount options, which already uses a seq_file, so fits in nicely with our existing mechanism for exporting strings via statmount(). Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/3aa6bf8bd5d0a21df9ebd63813af8ab532c18276.1719257716.git.josef@toxicpanda.com Reviewed-by: Jeff Layton [brauner: only call sb->s_op->show_options()] Signed-off-by: Christian Brauner commit a7ebb0fe43edfc869db3725a5d984de3e47c646c Merge: d04bccd8c19d6 d896f71ce1f2e Author: Christian Brauner Date: Tue Jun 25 11:19:24 2024 +0200 Merge patch series "Support foreign mount namespace with statmount/listmount" Josef Bacik says: Currently the only way to iterate over mount entries in mount namespaces that aren't your own is to trawl through /proc in order to find /proc/$PID/mountinfo for the mount namespace that you want. This is hugely inefficient, so extend both statmount() and listmount() to allow specifying a mount namespace id in order to get to mounts in other mount namespaces. There are a few components to this 1. Having a global index of the mount namespace based on the ->seq value in the mount namespace. This gives us a unique identifier that isn't re-used. 2. Support looking up mount namespaces based on that unique identifier, and validating the user has permission to access the given mount namespace. 3. Provide a new ioctl() on nsfs in order to extract the unique identifier we can use for statmount() and listmount(). The code is relatively straightforward, and there is a selftest provided to validate everything works properly. This is based on vfs.all as of last week, so must be applied onto a tree that has Christians error handling rework in this area. If you wish you can pull the tree directly here https://github.com/josefbacik/linux/tree/listmount.combined Christian and I collaborated on this series, which is why there's patches from both of us in this series. Christian Brauner (4): fs: relax permissions for listmount() fs: relax permissions for statmount() fs: Allow listmount() in foreign mount namespace fs: Allow statmount() in foreign mount namespace Josef Bacik (4): fs: keep an index of current mount namespaces fs: export the mount ns id via statmount fs: add an ioctl to get the mnt ns id from nsfs selftests: add a test for the foreign mnt ns extensions fs/mount.h | 2 + fs/namespace.c | 240 ++++++++++-- fs/nsfs.c | 14 + include/uapi/linux/mount.h | 6 +- include/uapi/linux/nsfs.h | 2 + .../selftests/filesystems/statmount/Makefile | 2 +- .../filesystems/statmount/statmount.h | 46 +++ .../filesystems/statmount/statmount_test.c | 53 +-- .../filesystems/statmount/statmount_test_ns.c | 360 ++++++++++++++++++ 9 files changed, 659 insertions(+), 66 deletions(-) create mode 100644 tools/testing/selftests/filesystems/statmount/statmount.h create mode 100644 tools/testing/selftests/filesystems/statmount/statmount_test_ns.c Link: https://lore.kernel.org/r/cover.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit c72b6b72240508f2ed9308f0d845e3cd35a92759 Author: Josef Bacik Date: Mon Jun 24 15:40:50 2024 -0400 fs: rename show_mnt_opts -> show_vfsmnt_opts This name is more consistent with what the helper does, which is to just show the vfsmount options. Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/fb363c62ffbf78a18095d596a19b8412aa991251.1719257716.git.josef@toxicpanda.com Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit d896f71ce1f2e73813dc6f639eb0cf6f4beefdaa Author: Josef Bacik Date: Mon Jun 24 11:49:51 2024 -0400 selftests: add a test for the foreign mnt ns extensions This tests both statmount and listmount to make sure they work with the extensions that allow us to specify a mount ns to enter in order to find the mount entries. Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/2d1a35bc9ab94b4656c056c420f25e429e7eb0b1.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit 7bdd1c6c87de758750d419eedab7285b95b66417 Author: Nathan Lynch Date: Mon Jun 3 07:36:55 2024 -0500 powerpc/prom: Add CPU info to hardware description string later cur_cpu_spec->cpu_name is appended to ppc_hw_desc before cur_cpu_spec has taken on its final value. This is illustrated on pseries by comparing the CPU name as reported at boot ("POWER8E (raw)") to the contents of /proc/cpuinfo ("POWER8 (architected)"): $ dmesg | grep Hardware Hardware name: IBM,8408-E8E POWER8E (raw) 0x4b0201 0xf000004 \ of:IBM,FW860.50 (SV860_146) hv:phyp pSeries $ grep -m 1 ^cpu /proc/cpuinfo cpu : POWER8 (architected), altivec supported Some 44x models would appear to be affected as well; see identical_pvr_fixup(). This results in incorrect CPU information in stack dumps -- ppc_hw_desc is an input to dump_stack_set_arch_desc(). Delay gathering the CPU name until after all potential calls to identify_cpu(). Signed-off-by: Nathan Lynch Fixes: bd649d40e0f2 ("powerpc: Add PVR & CPU name to hardware description") Signed-off-by: Michael Ellerman Link: https://msgid.link/20240603-fix-cpu-hwdesc-v1-1-945f2850fcaa@linux.ibm.com commit 0974d03eb479384466d828d65637814bee6b26d7 Author: Nathan Lynch Date: Thu May 30 19:44:12 2024 -0500 powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas() Smatch warns: arch/powerpc/kernel/rtas.c:1932 __do_sys_rtas() warn: potential spectre issue 'args.args' [r] (local cap) The 'nargs' and 'nret' locals come directly from a user-supplied buffer and are used as indexes into a small stack-based array and as inputs to copy_to_user() after they are subject to bounds checks. Use array_index_nospec() after the bounds checks to clamp these values for speculative execution. Signed-off-by: Nathan Lynch Reported-by: Breno Leitao Reviewed-by: Breno Leitao Signed-off-by: Michael Ellerman Link: https://msgid.link/20240530-sys_rtas-nargs-nret-v1-1-129acddd4d89@linux.ibm.com commit d5d1a1a55a7f227c0f41847b0598982f0a93170d Author: Christophe Leroy Date: Fri Jun 28 22:12:01 2024 +1000 powerpc/platforms: Move files from 4xx to 44x Only 44x uses 4xx now, so only keep one directory. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-7-mpe@ellerman.id.au commit 7bf5f0562b62ae94b4da577994b7b0e04e71d37b Author: Michael Ellerman Date: Fri Jun 28 22:12:00 2024 +1000 powerpc: Replace CONFIG_4xx with CONFIG_44x Replace 4xx usage with 44x, and replace 4xx_SOC with 44x. Also, as pointed out by Christophe, if 44x || BOOKE can be simplified to just test BOOKE, because 44x always selects BOOKE. Retain the CONFIG_4xx symbol, as there are drivers that use it to mean 4xx || 44x, those will need updating before CONFIG_4xx can be removed. Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-6-mpe@ellerman.id.au commit 002b27a51b364a59eac99b8d080afe3924c2e064 Author: Michael Ellerman Date: Fri Jun 28 22:11:59 2024 +1000 powerpc/4xx: Remove CONFIG_BOOKE_OR_40x Now that 40x is gone, replace CONFIG_BOOKE_OR_40x by CONFIG_BOOKE. Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-5-mpe@ellerman.id.au commit 732b32daef80567a7ef5be3d87ae79b6bfd9d82d Author: Christophe Leroy Date: Fri Jun 28 22:11:58 2024 +1000 powerpc: Remove core support for 40x Now that 40x platforms have gone, remove support for 40x in the core of powerpc arch. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-4-mpe@ellerman.id.au commit e939da89d024a0de66b0270f1f1fab5fc44c74dd Author: Michael Ellerman Date: Fri Jun 28 22:11:57 2024 +1000 powerpc: Remove 40x from Kconfig and defconfig Remove 40x from Kconfig, making the code unreachable. Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-3-mpe@ellerman.id.au commit 839ff58e63ce30988205706aa9ed22bd6bf229f3 Author: Christophe Leroy Date: Fri Jun 28 22:11:56 2024 +1000 powerpc/boot: Remove all 40x platforms from boot Remove 40x platforms from the boot directory. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-2-mpe@ellerman.id.au commit 47d13a269bbddd794e4ae393894103eed3dd84bc Author: Christophe Leroy Date: Fri Jun 28 22:11:55 2024 +1000 powerpc/40x: Remove 40x platforms. 40x platforms have been orphaned for many years. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20240628121201.130802-1-mpe@ellerman.id.au commit 9ff6df49e6cbcc9834865870d7c4f3059b0891d3 Author: Michael Walle Date: Thu Jun 6 11:21:22 2024 +0200 drm/mediatek: dpi/dsi: Fix possible_crtcs calculation mtk_find_possible_crtcs() assumes that the main path will always have the CRTC with id 0, the ext id 1 and the third id 2. This is only true if the paths are all available. But paths are optional (see also comment in mtk_drm_kms_init()), e.g. the main path might not be enabled or available at all. Then the CRTC IDs will shift one up, e.g. ext will be 0 and the third path will be 1. To fix that, dynamically calculate the IDs by the presence of the paths. While at it, make the return code a signed one and return -ENODEV if no path is found and handle the error in the callers. Fixes: 5aa8e7647676 ("drm/mediatek: dpi/dsi: Change the getting possible_crtc way") Suggested-by: Nícolas F. R. A. Prado Signed-off-by: Michael Walle Link: https://patchwork.kernel.org/project/dri-devel/patch/20240606092122.2026313-1-mwalle@kernel.org/ Signed-off-by: Chun-Kuang Hu commit 38767dde5f7b691026a8481904a0ae1c9d74e647 Author: Uwe Kleine-König Date: Mon Jun 24 15:24:33 2024 +0200 macintosh: 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 Signed-off-by: Michael Ellerman Link: https://msgid.link/20240624132433.1244750-2-u.kleine-koenig@baylibre.com commit 9417909e253ffa57f014822a79cca9b1f2b25492 Author: Dragan Simic Date: Sun Jun 2 08:25:38 2024 +0200 arm64: dts: rockchip: Delete the SoC variant dtsi for RK3399Pro The commit 587b4ee24fc7 ("arm64: dts: rockchip: add core dtsi file for RK3399Pro SoCs") describes the RK3399Pro's PCI Express interface as the way built-in NPU communicates with the rest of the SoC. All available evidence shows this not to be accurate, as described in detail below. Moreover, the rk3399pro.dtsi isn't used anywhere, so let's delete it. The publicly available schematics of the Radxa Rock Pi N10 carrier board [1] and the Vamrs VMARC RK3399Pro SoM, [2] which put together form the currently single supported RK3399Pro-based board, clearly show that the PCI Express x4 interface of this SoC is fully functional and actually not used by the SoC to communicate with the built-in NPU. In more detail, the VMARC SoM exports the SoC's PCI Express interface at its board-to-board connector, and the Rock Pi N10 routes it to an M.2 M-key slot with four PCI Express lanes. Both the Rockchip RK3399Pro datasheet, version 1.1, [3] and the Rockchip RK3399Pro technical reference manual (TRM), first part of the version 1.0, [4] don't describe that the SoC's PCI Express interface is reserved for the NPU. Instead, the RK3399Pro TRM describes that the NPU uses AHB and AXI interfaces as the host interface (HIF). The RK3399Pro datasheet clearly describes that the PCI Express x4 interface is available for general-purpose use, just like it's the case with the standard Rockchip RK3399 SoC, [5] albeit with a bit shorter feature list provided in the RK3399Pro datasheet. Even the publicly available reference RK3399Pro schematic from Rockchip [6] shows the availability of a standard PCI Express slot with four lanes, which would be pretty much impossible if the PCI Express interface was reserved for the communication with the built-in NPU. Based on the RK3399Pro datasheet [3] and the board schematics, [2][6] the built-in NPU actually exports NPU_PCIE as a separate PCI Express x2 interface that's partially pinmuxed with the NPU's separate USB 3.0 interface, which is described further in the next paragraph. However, the NPU's separate PCI Express x2 interface is left undocumented in the publicly available RK3399Pro documentation, in which it's clearly described as reserved for internal use and not intended for the communication with the NPU. Finally, the evidently independent nature of the separate NPU_PCIE x2 interface makes ignoring it safe when it comes to determining the nature and the availability of the RK3399Pro's main PCI Express x4 interface. The actual application-level communication with the built-in NPU, including powering it up and down and uploading the NPU firmware, is performed through the separate USB 2.0 and USB 3.0 interfaces exported by the NPU, [7] which the VMARC SoM [2] and the reference board design from Rockchip [6] route to the SoC's standard USB 2.0 and USB 3.0 interfaces, to make the NPU accessible to software running on the SoC's ARM cores. [1] https://dl.radxa.com/rockpin10/docs/hw/rockpi_n10_sch_v1.1_20190909.pdf [2] https://dl.radxa.com/rockpin10/docs/hw/VMARC_RK3399Pro_sch_V1.1_20190619.pdf [3] https://www.rockchip.fr/RK3399Pro%20datasheet%20V1.1.pdf [4] https://www.rockchip.fr/Rockchip%20RK3399Pro%20TRM%20V1.0%20Part1.pdf [5] https://www.rockchip.fr/RK3399%20datasheet%20V1.8.pdf [6] https://opensource.rock-chips.com/images/e/e4/RK_EVB_RK3399PRO_LP3S178P332SD8_V11_20181113_RZF.pdf [7] https://wiki.radxa.com/RockpiN10/dev/NPU-booting Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/4449f7d4eead787308300e2d1d37b88c9d1446b2.1717308862.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit ec03073888ad23223ebb986e62583c20a9ed3c07 Author: Cristian Ciocaltea Date: Sat Jun 22 00:57:22 2024 +0300 arm64: dts: rockchip: Fix mic-in-differential usage on rk3568-evb1-v10 The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,': DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dtb rk3568-evb1-v10.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml# Make use of the correct property name. Fixes: 3e4c629ca680 ("arm64: dts: rockchip: enable rk809 audio codec on the rk3568 evb1-v10") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-5-c0db420d3639@collabora.com Signed-off-by: Heiko Stuebner commit e643e4eb4bef6a2f95bf0c61a20c991bccecb212 Author: Cristian Ciocaltea Date: Sat Jun 22 00:57:21 2024 +0300 arm64: dts: rockchip: Fix mic-in-differential usage on rk3566-roc-pc The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,': DTC_CHK arch/arm64/boot/dts/rockchip/rk3566-roc-pc.dtb rk3566-roc-pc.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml# Make use of the correct property name. Fixes: a8e35c4bebe4 ("arm64: dts: rockchip: add audio nodes to rk3566-roc-pc") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-4-c0db420d3639@collabora.com Signed-off-by: Heiko Stuebner commit 406a554b382200abfabd1df423a425f6efee53e0 Author: Cristian Ciocaltea Date: Sat Jun 22 00:57:20 2024 +0300 arm64: dts: rockchip: Drop invalid mic-in-differential on rk3568-rock-3a The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,': DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb rk3568-rock-3a.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml# However, the board doesn't make use of differential signaling, hence drop the incorrect property and the now unnecessary 'codec' node. Fixes: 22a442e6586c ("arm64: dts: rockchip: add basic dts for the radxa rock3 model a") Reported-by: Jonas Karlman Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-3-c0db420d3639@collabora.com Signed-off-by: Heiko Stuebner commit 40658534756f8369e93b84fa75c20bde6528cb82 Author: Niklas Cassel Date: Fri Jun 7 13:14:33 2024 +0200 arm64: dts: rockchip: Add rock5b overlays for PCIe endpoint mode Add rock5b overlays for PCIe endpoint mode support. If using the rock5b as an endpoint against a normal PC, only the rk3588-rock-5b-pcie-ep.dtbo needs to be applied. If using two rock5b:s, with one board as EP and the other board as RC, rk3588-rock-5b-pcie-ep.dtbo and rk3588-rock-5b-pcie-srns.dtbo has to be applied to the respective boards. Signed-off-by: Niklas Cassel Link: https://lore.kernel.org/r/20240607-rockchip-pcie-ep-v1-v5-13-0a042d6b0049@kernel.org Signed-off-by: Heiko Stuebner commit 7ef44e179af0e84962b5c450f09ea92a427981d8 Author: Niklas Cassel Date: Fri Jun 7 13:14:32 2024 +0200 arm64: dts: rockchip: Add PCIe endpoint mode support Add a device tree node representing PCIe endpoint mode. The controller can either be configured to run in Root Complex or Endpoint mode. If a user wants to run the controller in endpoint mode, the user has to disable the pcie3x4 node and enable the pcie3x4_ep node. Signed-off-by: Niklas Cassel Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240607-rockchip-pcie-ep-v1-v5-12-0a042d6b0049@kernel.org Signed-off-by: Heiko Stuebner commit 748e3bbf47212d5e2e22d731328b0c15ee3b85ae Merge: c977ac49feada 098ba97d0e895 Author: David S. Miller Date: Fri Jun 28 10:55:38 2024 +0100 Merge branch 'net-selftests-mirroring-cleanup' into main Petr Machata says: ==================== selftest: Clean-up and stabilize mirroring tests The mirroring selftests work by sending ICMP traffic between two hosts. Along the way, this traffic is mirrored to a gretap netdevice, and counter taps are then installed strategically along the path of the mirrored traffic to verify the mirroring took place. The problem with this is that besides mirroring the primary traffic, any other service traffic is mirrored as well. At the same time, because the tests need to work in HW-offloaded scenarios, the ability of the device to do arbitrary packet inspection should not be taken for granted. Most tests therefore simply use matchall, one uses flower to match on IP address. As a result, the selftests are noisy. mirror_test() accommodated this noisiness by giving the counters an allowance of several packets. But that only works up to a point, and on busy systems won't be always enough. In this patch set, clean up and stabilize the mirroring selftests. The original intention was to port the tests over to UDP, but the logic of ICMP ends up being so entangled in the mirroring selftests that the changes feel overly invasive. Instead, ICMP is kept, but where possible, we match on ICMP message type, thus filtering out hits by other ICMP messages. Where this is not practical (where the counter tap is put on a device that carries encapsulated packets), switch the counter condition to _at least_ X observed packets. This is less robust, but barely so -- probably the only scenario that this would not catch is something like erroneous packet duplication, which would hopefully get caught by the numerous other tests in this extensive suite. - Patches #1 to #3 clean up parameters at various helpers. - Patches #4 to #6 stabilize the mirroring selftests as described above. - Mirroring tests currently allow testing SW datapath even on HW netdevices by trapping traffic to the SW datapath. This complicates the tests a bit without a good reason: to test SW datapath, just run the selftests on the veth topology. Thus in patch #7, drop support for this dual SW/HW testing. - At this point, some cleanups were either made possible by the previous patches, or were always possible. In patches #8 to #11, realize these cleanups. - In patch #12, fix mlxsw mirror_gre selftest to respect setting TESTS. ==================== Signed-off-by: David S. Miller commit 098ba97d0e895c204de95f933bfbfad9344206a5 Author: Petr Machata Date: Thu Jun 27 16:48:49 2024 +0200 selftests: mlxsw: mirror_gre: Obey TESTS This test is unusual in that overriding TESTS does not change the tests to be run. Split the individual tests into several functions and invoke them through tests_run() as appropriate. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 06704a0d5e6789be52dfcb2401216c9a02140789 Author: Petr Machata Date: Thu Jun 27 16:48:48 2024 +0200 selftests: libs: Drop unused functions Nothing calls these. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 4e9cd3d03af26eda951af577ddad72c4a468502a Author: Petr Machata Date: Thu Jun 27 16:48:47 2024 +0200 selftests: libs: Drop slow_path_trap_install()/_uninstall() These functions are not used anymore. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 95d33989cee5844a4bcc561dcad0f78a72a24a6d Author: Petr Machata Date: Thu Jun 27 16:48:46 2024 +0200 selftests: mirror_gre_lag_lacp: Drop unnecessary code The selftest does not use functions from mirror_gre_lib, ditch the import. It does not use arping either, so drop the require_command as well. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 388b2d985a136c241d918e0647b1c421de229abb Author: Petr Machata Date: Thu Jun 27 16:48:45 2024 +0200 selftests: mlxsw: mirror_gre: Simplify After the previous patch, the function test_span_failable() is always called with should_fail=1. Drop the argument and streamline the code. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit d361d78fe2cc8a7a60e8c71825f84e70d34938af Author: Petr Machata Date: Thu Jun 27 16:48:44 2024 +0200 selftests: mirror: Drop dual SW/HW testing The mirroring tests are currently run in a skip_hw and optionally a skip_sw mode. The former tests the SW datapath, the latter the HW datapath, if available. In order to be able to test SW datapath on HW loopbacks, traps are installed on ingress to get traffic from the HW datapath to the SW one. This adds an unnecessary complexity when it would be much simpler to just use a veth-based topology to test the SW datapath. Thus drop all the code that supports this dual testing. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit a86e0df9ce25d33e84ba26fa2876a2e67b8d48ff Author: Petr Machata Date: Thu Jun 27 16:48:43 2024 +0200 selftests: mirror: mirror_test(): Allow exact count of packets The mirroring selftests work by sending ICMP traffic between two hosts. Along the way, this traffic is mirrored to a gretap netdevice, and counter taps are then installed strategically along the path of the mirrored traffic to verify the mirroring took place. The problem with this is that besides mirroring the primary traffic, any other service traffic is mirrored as well. At the same time, because the tests need to work in HW-offloaded scenarios, the ability of the device to do arbitrary packet inspection should not be taken for granted. Most tests therefore simply use matchall, one uses flower to match on IP address. As a result, the selftests are noisy, because besides the primary ICMP traffic, any amount of other service traffic is mirrored as well. mirror_test() accommodated this noisiness by giving the counters an allowance of several packets. But in the previous patch, where possible, counter taps were changed to match only on an exact ICMP message. At least in those cases, we can demand an exact number of packets to match. Where the tap is installed on a connective netdevice, the exact matching is not practical (though with u32, anything is possible). In those places, there should still be some leeway -- and probably bigger than before, because experience shows that these tests are very noisy. To that end, change mirror_test() so that it can be either called with an exact number to expect, or with an expression. Where leeway is needed, adjust callers to pass a ">= 10" instead of mere 10. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 833415358f341941f35b6ffc53c569db057b2ab5 Author: Petr Machata Date: Thu Jun 27 16:48:42 2024 +0200 selftests: mirror: do_test_span_dir_ips(): Install accurate taps The mirroring selftests work by sending ICMP traffic between two hosts. Along the way, this traffic is mirrored to a gretap netdevice, and counter taps are then installed strategically along the path of the mirrored traffic to verify the mirroring took place. The problem with this is that besides mirroring the primary traffic, any other service traffic is mirrored as well. At the same time, because the tests need to work in HW-offloaded scenarios, the ability of the device to do arbitrary packet inspection should not be taken for granted. Most tests therefore simply use matchall, one uses flower to match on IP address. As a result, the selftests are noisy, because besides the primary ICMP traffic, any amount of other service traffic is mirrored as well. However, often the counter tap is installed at the remote end of the gretap tunnel. Since this is a SW-datapath scenario anyway, we can make the filter arbitrarily accurate. Thus in this patch, add parameters forward_type and backward_type to several mirroring test helpers, as some other helpers already have. Then change do_test_span_dir_ips() to instead of installing one generic tap and using it for test in both directions, install the tap for each direction separately, matching on the ICMP type given by these parameters. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 95e7b860e16dbdfb07a0f36c9f954764799a3632 Author: Petr Machata Date: Thu Jun 27 16:48:41 2024 +0200 selftests: mirror_gre_lag_lacp: Check counters at tunnel The test works by sending packets through a tunnel, whence they are forwarded to a LAG. One of the LAG children is removed from the LAG prior to the exercise, and the test then counts how many packets pass through the other one. The issue with this is that it counts all packets, not just the encapsulated ones. So instead add a second gretap endpoint to receive the sent packets, and check reception counters there. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 9b5d5f272654ca4b97f39b6ef809e4edef794fdc Author: Petr Machata Date: Thu Jun 27 16:48:40 2024 +0200 selftests: lib: tc_rule_stats_get(): Move default to argument definition The argument $dir has a fallback value of "ingress". Move the fallback from the usage site to the argument definition block to make the fact clearer. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 28e67746b73da72f57609c7250d514051e787e65 Author: Petr Machata Date: Thu Jun 27 16:48:39 2024 +0200 selftests: mirror: Drop direction argument from several functions The argument is not used by these functions except to propagate it for ultimately no purpose. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit d5fbb2eb33c287450dadd6e2b5f6b698f0243a14 Author: Petr Machata Date: Thu Jun 27 16:48:38 2024 +0200 selftests: libs: Expand "$@" where possible In some functions, argument-forwarding through "$@" without listing the individual arguments explicitly is fundamental to the operation of a function. E.g. xfail_on_veth() should be able to run various tests in the fail-to-xfail regime, and usage of "$@" is appropriate as an abstraction mechanism. For functions such as simple_if_init(), $@ is a handy way to pass an array. In other functions, it's merely a mechanism to save some typing, which however ends up obscuring the real arguments and makes life hard for those that end up reading the code. This patch adds some of the implicit function arguments and correspondingly expands $@'s. In several cases this will come in handy as following patches adjust the parameter lists. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: David S. Miller commit 32a120f52a4c0121bca8f2328d4680d283693d60 Author: Imre Deak Date: Wed Jun 26 20:08:13 2024 +0300 drm/i915/mtl: Skip PLL state verification in TBT mode In TBT-alt mode the driver doesn't program the PHY's PLL, which is handled instead by Thunderbolt driver/FW components, hence the PLL's HW vs. SW state verification should be skipped. During HW readout set a flag in the PLL state if the port was at the moment in TBT-alt mode and skip the verification of PLL parameters in this case. Fixes: 45fe957ae769 ("drm/i915/display: Add compare config for MTL+ platforms") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11258 Cc: Mika Kahola Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240626170813.806470-1-imre.deak@intel.com commit c977ac49feada8dc938cfd77d333699e81b29154 Merge: 8fda53719a596 32b4c8b53ee77 Author: David S. Miller Date: Fri Jun 28 10:49:35 2024 +0100 Merge branch 'net-flash-modees-firmware' into main Danielle Ratson says: ==================== Add ability to flash modules' firmware CMIS compliant modules such as QSFP-DD might be running a firmware that can be updated in a vendor-neutral way by exchanging messages between the host and the module as described in section 7.2.2 of revision 4.0 of the CMIS standard. According to the CMIS standard, the firmware update process is done using a CDB commands sequence. CDB (Command Data Block Message Communication) reads and writes are performed on memory map pages 9Fh-AFh according to the CMIS standard, section 8.12 of revision 4.0. Add a pair of new ethtool messages that allow: * User space to trigger firmware update of transceiver modules * The kernel to notify user space about the progress of the process The user interface is designed to be asynchronous in order to avoid RTNL being held for too long and to allow several modules to be updated simultaneously. The interface is designed with CMIS compliant modules in mind, but kept generic enough to accommodate future use cases, if these arise. The kernel interface that will implement the firmware update using CDB command will include 2 layers that will be added under ethtool: * The upper layer that will be triggered from the module layer, is cmis_ fw_update. * The lower one is cmis_cdb. In the future there might be more operations to implement using CDB commands. Therefore, the idea is to keep the cmis_cdb interface clean and the cmis_fw_update specific to the cdb commands handling it. The communication between the kernel and the driver will be done using two ethtool operations that enable reading and writing the transceiver module EEPROM. The operation ethtool_ops::get_module_eeprom_by_page, that is already implemented, will be used for reading from the EEPROM the CDB reply, e.g. reading module setting, state, etc. The operation ethtool_ops::set_module_eeprom_by_page, that is added in the current patchset, will be used for writing to the EEPROM the CDB command such as start firmware image, run firmware image, etc. Therefore in order for a driver to implement module flashing, that driver needs to implement the two functions mentioned above. Patchset overview: Patch #1-#2: Implement the EEPROM writing in mlxsw. Patch #3: Define the interface between the kernel and user space. Patch #4: Add ability to notify the flashing firmware progress. Patch #5: Veto operations during flashing. Patch #6: Add extended compliance codes. Patch #7: Add the cdb layer. Patch #8: Add the fw_update layer. Patch #9: Add ability to flash transceiver modules' firmware. v8: Patch #7: * In the ethtool_cmis_wait_for_cond() evaluate the condition once more to decide if the error code should be -ETIMEDOUT or something else. * s/netdev_err/netdev_err_once. v7: Patch #4: * Return -ENOMEM instead of PTR_ERR(attr) on ethnl_module_fw_flash_ntf_put_err(). Patch #9: * Fix Warning for not unlocking the spin_lock in the error flow on module_flash_fw_work_list_add(). * Avoid the fall-through on ethnl_sock_priv_destroy(). v6: * Squash some of the last patch to patch #5 and patch #9. Patch #3: * Add paragraph in .rst file. Patch #4: * Reserve '1' more place on SKB for NUL terminator in the error message string. * Add more prints on error flow, re-write the printing function and add ethnl_module_fw_flash_ntf_put_err(). * Change the communication method so notification will be sent in unicast instead of multicast. * Add new 'struct ethnl_module_fw_flash_ntf_params' that holds the relevant info for unicast communication and use it to send notification to the specific socket. * s/nla_put_u64_64bit/nla_put_uint/ Patch #7: * In ethtool_cmis_cdb_init(), Use 'const' for the 'params' parameter. Patch #8: * Add a list field to struct ethtool_module_fw_flash for module_fw_flash_work_list that will be presented in the next patch. * Move ethtool_cmis_fw_update() cleaning to a new function that will be represented in the next patch. * Move some of the fields in struct ethtool_module_fw_flash to a separate struct, so ethtool_cmis_fw_update() will get only the relevant parameters for it. * Edit the relevant functions to get the relevant params for them. * s/CMIS_MODULE_READY_MAX_DURATION_USEC/CMIS_MODULE_READY_MAX_DURATION_MSEC Patch #9: * Add a paragraph in the commit message. * Rename labels in module_flash_fw_schedule(). * Add info to genl_sk_priv_*() and implement the relevant callbacks, in order to handle properly a scenario of closing the socket from user space before the work item was ended. * Add a list the holds all the ethtool_module_fw_flash struct that corresponds to the in progress work items. * Add a new enum for the socket types. * Use both above to identify a flashing socket, add it to the list and when closing socket affect only the flashing type. * Create a new function that will get the work item instead of ethtool_cmis_fw_update(). * Edit the relevant functions to get the relevant params for them. * The new function will call the old ethtool_cmis_fw_update(), and do the cleaning, so the existence of the list should be completely isolated in module.c. =================== Signed-off-by: David S. Miller commit 32b4c8b53ee7799e34a2b1634d32d3ce1e36c44e Author: Danielle Ratson Date: Thu Jun 27 17:08:56 2024 +0300 ethtool: Add ability to flash transceiver modules' firmware Add the ability to flash the modules' firmware by implementing the interface between the user space and the kernel. Example from a succeeding implementation: # ethtool --flash-module-firmware swp40 file test.bin Transceiver module firmware flashing started for device swp40 Transceiver module firmware flashing in progress for device swp40 Progress: 99% Transceiver module firmware flashing completed for device swp40 In addition, add infrastructure that allows modules to set socket-specific private data. This ensures that when a socket is closed from user space during the flashing process, the right socket halts sending notifications to user space until the work item is completed. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit c4f78134d45c9619339c96b4bea380b1d0699788 Author: Danielle Ratson Date: Thu Jun 27 17:08:55 2024 +0300 ethtool: cmis_fw_update: add a layer for supporting firmware update using CDB According to the CMIS standard, the firmware update process is done using a CDB commands sequence. Implement a work that will be triggered from the module layer in the next patch the will initiate and execute all the CDB commands in order, to eventually complete the firmware update process. This flashing process includes, writing the firmware image, running the new firmware image and committing it after testing, so that it will run upon reset. This work will also notify user space about the progress of the firmware update process. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit a39c84d796254e6b1662ca0c46dbc313379e9291 Author: Danielle Ratson Date: Thu Jun 27 17:08:54 2024 +0300 ethtool: cmis_cdb: Add a layer for supporting CDB commands CDB (Command Data Block Message Communication) reads and writes are performed on memory map pages 9Fh-AFh according to the CMIS standard, section 8.20 of revision 5.2. Page 9Fh is used to specify the CDB command to be executed and also provides an area for a local payload (LPL). According to the CMIS standard, the firmware update process is done using a CDB commands sequence that will be implemented in the next patch. The kernel interface that will implement the firmware update using CDB command will include 2 layers that will be added under ethtool: * The upper layer that will be triggered from the module layer, is cmis_fw_update. * The lower one is cmis_cdb. In the future there might be more operations to implement using CDB commands. Therefore, the idea is to keep the CDB interface clean and the cmis_fw_update specific to the CDB commands handling it. These two layers will communicate using the API the consists of three functions: - struct ethtool_cmis_cdb * ethtool_cmis_cdb_init(struct net_device *dev, struct ethtool_module_fw_flash_params *params); - void ethtool_cmis_cdb_fini(struct ethtool_cmis_cdb *cdb); - int ethtool_cmis_cdb_execute_cmd(struct net_device *dev, struct ethtool_cmis_cdb_cmd_args *args); Add the CDB layer to support initializing, finishing and executing CDB commands: * The initialization process will include creating of an ethtool_cmis_cdb instance, querying the module CDB support, entering and validating the password from user space (CMD 0x0000) and querying the module features (CMD 0x0040). * The finishing API will simply free the ethtool_cmis_cdb instance. * The executing process will write the CDB command to EEPROM using set_module_eeprom_by_page() that was presented earlier, and will process the reply from EEPROM. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit e4f91936993ce4d0954688ec3cb80b3471b9eda5 Author: Danielle Ratson Date: Thu Jun 27 17:08:53 2024 +0300 net: sfp: Add more extended compliance codes SFF-8024 is used to define various constants re-used in several SFF SFP-related specifications. Add SFF-8024 extended compliance code definitions for CMIS compliant modules and use them in the next patch to determine the firmware flashing work. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Reviewed-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 31e0aa99dc02b2b038a270b0670fc8201b69ec8a Author: Danielle Ratson Date: Thu Jun 27 17:08:52 2024 +0300 ethtool: Veto some operations during firmware flashing process Some operations cannot be performed during the firmware flashing process. For example: - Port must be down during the whole flashing process to avoid packet loss while committing reset for example. - Writing to EEPROM interrupts the flashing process, so operations like ethtool dump, module reset, get and set power mode should be vetoed. - Split port firmware flashing should be vetoed. In order to veto those scenarios, add a flag in 'struct net_device' that indicates when a firmware flash is taking place on the module and use it to prevent interruptions during the process. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d7d4cfc4c97c7cf49cb2893ef60e8ab59dcac047 Author: Danielle Ratson Date: Thu Jun 27 17:08:51 2024 +0300 ethtool: Add flashing transceiver modules' firmware notifications ability Add progress notifications ability to user space while flashing modules' firmware by implementing the interface between the user space and the kernel. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 46fb3ba95b93d1887e6dfa02a535e0526062de95 Author: Danielle Ratson Date: Thu Jun 27 17:08:50 2024 +0300 ethtool: Add an interface for flashing transceiver modules' firmware CMIS compliant modules such as QSFP-DD might be running a firmware that can be updated in a vendor-neutral way by exchanging messages between the host and the module as described in section 7.3.1 of revision 5.2 of the CMIS standard. Add a pair of new ethtool messages that allow: * User space to trigger firmware update of transceiver modules * The kernel to notify user space about the progress of the process The user interface is designed to be asynchronous in order to avoid RTNL being held for too long and to allow several modules to be updated simultaneously. The interface is designed with CMIS compliant modules in mind, but kept generic enough to accommodate future use cases, if these arise. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1983a8007032321327a2c31b40d45dab544fcdf9 Author: Ido Schimmel Date: Thu Jun 27 17:08:49 2024 +0300 mlxsw: Implement ethtool operation to write to a transceiver module EEPROM Implement the ethtool_ops::set_module_eeprom_by_page operation to allow ethtool to write to a transceiver module EEPROM, in a similar fashion to the ethtool_ops::get_module_eeprom_by_page operation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 69540b7987ef05d1dff36981d4cc7c31e9716b36 Author: Ido Schimmel Date: Thu Jun 27 17:08:48 2024 +0300 ethtool: Add ethtool operation to write to a transceiver module EEPROM Ethtool can already retrieve information from a transceiver module EEPROM by invoking the ethtool_ops::get_module_eeprom_by_page operation. Add a corresponding operation that allows ethtool to write to a transceiver module EEPROM. The new write operation is purely an in-kernel API and is not exposed to user space. The purpose of this operation is not to enable arbitrary read / write access, but to allow the kernel to write to specific addresses as part of transceiver module firmware flashing. In the future, more functionality can be implemented on top of these read / write operations. Adjust the comments of the 'ethtool_module_eeprom' structure as it is no longer used only for read access. Signed-off-by: Ido Schimmel Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 185f99b614427360ec3a91dc5b3fc6220bed4742 Author: Raphael Gallais-Pou Date: Mon Jan 29 11:41:06 2024 +0100 drm/stm: dsi: expose DSI PHY internal clock DSISRC __________ __\_ | \ pll4_p_ck ->| 1 |____dsi_k ck_dsi_phy ->| 0 | |____/ A DSI clock is missing in the clock framework. Looking at the clk_summary, it appears that 'ck_dsi_phy' is not implemented. Since the DSI kernel clock is based on the internal DSI pll. The common clock driver can not directly expose this 'ck_dsi_phy' clock because it does not contain any common registers with the DSI. Thus it needs to be done directly within the DSI phy driver. Signed-off-by: Raphael Gallais-Pou Acked-by: Yannick Fertre Tested-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20240129104106.43141-4-raphael.gallais-pou@foss.st.com commit b0e83c2c857f6eb5fb9ac76c2c218ac5687a04f5 Author: Yannick Fertre Date: Mon Jan 29 11:41:05 2024 +0100 drm/stm: dsi: add pm runtime ops Update control of clocks and supply thanks to the PM runtime mechanism to avoid kernel crash during a system suspend. Signed-off-by: Yannick Fertre Signed-off-by: Raphael Gallais-Pou Acked-by: Yannick Fertre Tested-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20240129104106.43141-3-raphael.gallais-pou@foss.st.com commit 884d7d03e59d5dc985b2dfb09ff7409a77bc1209 Author: Raphael Gallais-Pou Date: Mon Jan 29 11:41:04 2024 +0100 drm/stm: dsi: use new SYSTEM_SLEEP_PM_OPS() macro Use RUNTIME_PM_OPS() instead of the old SET_SYSTEM_SLEEP_PM_OPS(). This means we don't need __maybe_unused on the functions. Signed-off-by: Raphael Gallais-Pou Acked-by: Yannick Fertre Tested-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20240129104106.43141-2-raphael.gallais-pou@foss.st.com commit aca1cbc1c9860e39736d33626e5a1b45ff762f0a Author: Raphael Gallais-Pou Date: Mon Feb 26 11:48:06 2024 +0100 drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver The Low-Voltage Differential Signaling (LVDS) Display Interface Transmitter handles the LVDS protocol: it maps the pixels received from the upstream Pixel-DMA LCD-TFT Display Controller (LTDC) onto the LVDS PHY. It is composed of three sub blocks: * LVDS host: handles the LVDS protocol (FPD / OpenLDI) and maps its input pixels onto the data lanes of the PHY * LVDS PHY: parallelize the data and drives the LVDS data lanes * LVDS wrapper: handles top-level settings The LVDS controller driver supports the following high-level features: * FDP-Link-I and OpenLDI (v0.95) protocols * Single-Link or Dual-Link operation * Single-Display or Double-Display (with the same content duplicated on both) * Flexible Bit-Mapping, including JEIDA and VESA * RGB888 or RGB666 output * Synchronous design, with one input pixel per clock cycle Signed-off-by: Raphael Gallais-Pou Acked-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20240226-lvds-v6-2-15e3463fbe70@foss.st.com commit 3f12669b436996e0ddbb35c903ec602a577ab352 Author: Raphael Gallais-Pou Date: Mon Feb 26 11:48:05 2024 +0100 dt-bindings: display: add STM32 LVDS device Add "st,stm32mp25-lvds" compatible. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Conor Dooley Acked-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20240226-lvds-v6-1-15e3463fbe70@foss.st.com commit 5b08bd408534bfb3a7cf5778da5b27d4e4fffe12 Author: Christian Brauner Date: Thu Jun 27 16:11:42 2024 +0200 pidfs: allow retrieval of namespace file descriptors For users that hold a reference to a pidfd procfs might not even be available nor is it desirable to parse through procfs just for the sake of getting namespace file descriptors for a process. Make it possible to directly retrieve namespace file descriptors from a pidfd. Pidfds already can be used with setns() to change a set of namespaces atomically. Link: https://lore.kernel.org/r/20240627-work-pidfs-v1-4-7e9ab6cc3bb1@kernel.org Reviewed-by: Jeff Layton Reviewed-by: Josef Bacik Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 460695a294e63de4e4f30ad1679ffddeec932bb8 Author: Christian Brauner Date: Thu Jun 27 16:11:41 2024 +0200 nsfs: add open_namespace() and call it from open_related_ns(). Link: https://lore.kernel.org/r/20240627-work-pidfs-v1-3-7e9ab6cc3bb1@kernel.org Reviewed-by: Jeff Layton Reviewed-by: Josef Bacik Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 85e4daaeb70bc68ec920e0c268eb428113d31b21 Author: Christian Brauner Date: Fri Jun 28 10:05:19 2024 +0200 nsproxy: add helper to go from arbitrary namespace to ns_common They all contains struct ns_common ns and if there ever is one where that isn't the case we'll catch it here at build time. Signed-off-by: Christian Brauner commit d057c108155ab8d02b603c7ee5da7df615c2f32f Author: Christian Brauner Date: Thu Jun 27 16:11:40 2024 +0200 nsproxy: add a cleanup helper for nsproxy Add a simple cleanup helper for nsproxy. Link: https://lore.kernel.org/r/20240627-work-pidfs-v1-2-7e9ab6cc3bb1@kernel.org Reviewed-by: Jeff Layton Reviewed-by: Josef Bacik Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit c6269149cbf7053272d918101981869438ff7c1e Author: Christian Brauner Date: Thu Jun 27 16:11:39 2024 +0200 file: add take_fd() cleanup helper Add a helper that returns the file descriptor and ensures that the old variable contains a negative value. This makes it easy to rely on CLASS(get_unused_fd). Link: https://lore.kernel.org/r/20240627-work-pidfs-v1-1-7e9ab6cc3bb1@kernel.org Reviewed-by: Jeff Layton Reviewed-by: Josef Bacik Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit e1c550898f75eec9c6dcfc16a584d5bc58eebf77 Author: Zhaoxiong Lv Date: Mon Jun 24 22:19:26 2024 +0800 drm/panel: jd9365da: Add the function of adjusting orientation This driver does not have the function to adjust the orientation, so this function is added. Signed-off-by: Zhaoxiong Lv Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20240624141926.5250-6-lvzhaoxiong@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240624141926.5250-6-lvzhaoxiong@huaqin.corp-partner.google.com commit 2b976ad760dc3a62e4ff4c4e5afa02ec16e4013a Author: Zhaoxiong Lv Date: Mon Jun 24 22:19:25 2024 +0800 drm/panel: jd9365da: Support for kd101ne3-40ti MIPI-DSI panel The K&d kd101ne3-40ti is a 10.1" WXGA TFT-LCD panel, use jd9365da controller,which fits in nicely with the existing panel-jadard-jd9365da-h3 driver.Hence,we add a new compatible with panel specific config. Although they have the same control IC, the two panels are different, and the timing will be slightly different, so we added some variables in struct jadard_panel_desc to control the timing. Signed-off-by: Zhaoxiong Lv Acked-by: Jessica Zhang Link: https://lore.kernel.org/r/20240624141926.5250-5-lvzhaoxiong@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240624141926.5250-5-lvzhaoxiong@huaqin.corp-partner.google.com commit 35583e129995164aebb169103fe64614482ccf8e Author: Zhaoxiong Lv Date: Mon Jun 24 22:19:24 2024 +0800 drm/panel: panel-jadard-jd9365da-h3: use wrapped MIPI DCS functions Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to simplify driver's init/enable/exit code. Signed-off-by: Zhaoxiong Lv Reviewed-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240624141926.5250-4-lvzhaoxiong@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240624141926.5250-4-lvzhaoxiong@huaqin.corp-partner.google.com commit e7f5112ae111a125366039666e9c6ff8dd71d0a4 Author: Zhaoxiong Lv Date: Mon Jun 24 22:19:23 2024 +0800 dt-bindings: display: panel: Add compatible for kingdisplay-kd101ne3 The kingdisplay-kd101ne3 is a 10.1" WXGA TFT-LCD panel with jadard-jd9365da controller. Hence, we add a new compatible with panel specific config. Signed-off-by: Zhaoxiong Lv Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240624141926.5250-3-lvzhaoxiong@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240624141926.5250-3-lvzhaoxiong@huaqin.corp-partner.google.com commit 38cae7b626ec7b89cd14f15efb36f64682c76371 Author: Zhaoxiong Lv Date: Mon Jun 24 22:19:22 2024 +0800 drm/panel: jd9365da: Modify the method of sending commands Currently, the init_code of the jd9365da driver is placed in the enable() function and sent, but this seems to take a long time. It takes 17ms to send each instruction (an init code consists of about 200 instructions), so it takes about 3.5s to send the init_code. So we moved the sending of the inti_code to the prepare() function, and each instruction seemed to take only 25μs. We checked the DSI host and found that the difference in command sending time is caused by the different modes of the DSI host in prepare() and enable() functions. Our DSI Host only supports sending cmd in LP mode, The prepare() function can directly send init_code (LP->cmd) in LP mode, but the enable() function is in HS mode and needs to switch to LP mode before sending init code (HS->LP->cmd->HS). Therefore, it takes longer to send the command. Signed-off-by: Zhaoxiong Lv Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240624141926.5250-2-lvzhaoxiong@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240624141926.5250-2-lvzhaoxiong@huaqin.corp-partner.google.com commit 6c2b2cd33705b43cb19699500bbf7bd77bc8b60b Author: Paul Gerber Date: Thu Jun 27 10:44:44 2024 +0200 drm/panel: simple: Add AUO G104STN01 panel entry Add support for the AUO G104STN01 10.4" (800x600) LCD-TFT panel. Signed-off-by: Paul Gerber Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240627084446.3197196-3-paul.gerber@ew.tq-group.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240627084446.3197196-3-paul.gerber@ew.tq-group.com commit 21335cf6af98d524d01296865fd0a1c6886ace54 Author: Paul Gerber Date: Thu Jun 27 10:44:43 2024 +0200 dt-bindings: display: simple: Add AUO G104STN01 panel Add AUO G104STN01 10.4" LCD-TFT LVDS panel compatible string. Signed-off-by: Paul Gerber Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627084446.3197196-2-paul.gerber@ew.tq-group.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240627084446.3197196-2-paul.gerber@ew.tq-group.com commit b664f6f7a77a41b0e8da7e12534debc94c9d23db Author: Raphael Gallais-Pou Date: Tue Jun 25 23:32:42 2024 +0200 ARM: dts: sti: add thermal-zones support on stih418 Add a 'thermal-zones' node for stih418. A thermal-zone needs three components: - thermal sensors, described in an earlier commit[1] - cooling devices, specified for each CPU - a thermal zone, describing the overall behavior. The thermal zone needs references to both CPUs and thermal sensors, which phandle are also added. The thermal management will then be achieved on CPUs using the cpufreq framework. [1] https://lore.kernel.org/lkml/20240320-thermal-v3-2-700296694c4a@gmail.com/ Reviewed-by: Patrice Chotard Signed-off-by: Raphael Gallais-Pou Signed-off-by: Patrice Chotard commit e00d100a94a15531eec0caf2dddfeec439690097 Author: Raphael Gallais-Pou Date: Wed Mar 20 22:33:49 2024 +0100 ARM: dts: st: add thermal property on stih410.dtsi and stih418.dtsi "#thermal-sensor-cells" is required and missing in thermal nodes. Add it. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Patrice Chotard Signed-off-by: Patrice Chotard commit 3550b5db3af4d0ff7f2ad07367af6427534620f0 Author: Frank Li Date: Thu Jun 27 16:21:51 2024 -0400 dt-bindings: gpio: fsl,qoriq-gpio: add common property gpio-line-names Add common gpio-line-names property for fsl,qoriq-gpio to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dtb: gpio@2300000: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/gpio/fsl,qoriq-gpio.yaml Signed-off-by: Frank Li Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240627202151.456812-1-Frank.Li@nxp.com Signed-off-by: Bartosz Golaszewski commit 1443b6ea806dfcdcee6c894784332c9c947ac319 Author: Jerome Brunet Date: Wed Jun 26 17:27:31 2024 +0200 arm64: dts: amlogic: setup hdmi system clock HDMI Tx needs the system clock set on the xtal rate. This clock is managed by the main clock controller of the related SoCs. Currently 2 part of the display drivers race to setup the HDMI system clock by directly poking the controller register. The clock API should be used to setup the rate instead. Use assigned-clock to setup the HDMI system clock. Fixes: 6939db7e0dbf ("ARM64: dts: meson-gx: Add support for HDMI output") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240626152733.1350376-3-jbrunet@baylibre.com Signed-off-by: Neil Armstrong commit 0602ba0dcd0e76067a0b7543e92b2de3fb231073 Author: Jerome Brunet Date: Wed Jun 26 17:27:30 2024 +0200 arm64: dts: amlogic: gx: correct hdmi clocks The clocks provided to HDMI tx are not consistent between gx and g12: * gx receives the peripheral clock as 'isfr' while g12 receives it as 'iahb' * g12 gets the HDMI system clock as 'isfr' but gx does not even get it. It surely needs that clock since the driver is directly poking around the clock controller's registers for that clock. Align gx SoCs with g12 and provide: * the HDMI peripheral clock as 'iahb' * the HDMI system clock as 'isfr' Fixes: 6939db7e0dbf ("ARM64: dts: meson-gx: Add support for HDMI output") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240626152733.1350376-2-jbrunet@baylibre.com Signed-off-by: Neil Armstrong commit 8c62617295d3c4cd03f1a02c3b9bf9d4e6d6e0c6 Author: Johannes Berg Date: Thu Jun 27 13:25:27 2024 +0200 wifi: mac80211: remove DEAUTH_NEED_MGD_TX_PREP This flag is annoying because it puts a lot of logic into mac80211 that could just as well be in the driver (only iwlmvm uses it) and the implementation is also broken for MLO. Remove the flag in favour of calling drv_mgd_prepare_tx() without any conditions even for the deauth-while-assoc case. The drivers that implement it can take the appropriate actions, which for the only user of DEAUTH_NEED_MGD_TX_PREP (iwlmvm) is a bit more tricky than the implementation in mac80211 is anyway, and all others have no need and can just exit if info->was_assoc is set. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240627132527.94924bcc9c9e.I328a219e45f2e2724cd52e75bb9feee3bf21a463@changeid Signed-off-by: Johannes Berg commit 4314bb46cb56851f13bda9db356ebc3cf750b7f1 Author: Johannes Berg Date: Thu Jun 27 10:46:22 2024 +0200 wifi: mac80211_hwsim: fix kernel-doc Some kernel-doc in the header file was mismatched, fix that. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240627104621.3b2dd62adb2c.I8a4c469b674e5eac737378a1ed2358b57d01613f@changeid Signed-off-by: Johannes Berg commit 3f5d7ff7c533af6f06a39becb77a7afbfaa8b782 Author: Ilan Peer Date: Thu Jun 27 10:46:00 2024 +0200 wifi: mac80211: Use the link BSS configuration for beacon processing The beacon processing should be fully done in the context of the link. This also resolves a bug with CQM handling with MLO as in such a case the RSSI thresholds configuration is maintained in the link context and not in the interface context. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Ilan Peer Link: https://patch.msgid.link/20240627104600.bb2f0f697881.I675b6a8a186b717f3eef79113c27361fd1a7622c@changeid Signed-off-by: Johannes Berg commit 8fda53719a596fa2a2880c42b5fa4126fbbbfc3d Author: Marek Vasut Date: Tue Jun 25 20:42:28 2024 +0200 dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings Extract known PHY IDs from Linux kernel realtek PHY driver and convert them into supported compatible string list for this DT binding document. Signed-off-by: Marek Vasut Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0a3d5991438fcf89c3aebf55c30231faee31567e Author: Johannes Berg Date: Thu Jun 27 10:44:12 2024 +0200 wifi: mac80211: remove key data from get_key callback This is now unused in nl80211, so there's no need to set the pointer/length. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240627104411.f8ac49a8cfe0.Ic01f775903f0acd10b9ba77eb39d4ed50e709173@changeid Signed-off-by: Johannes Berg commit a7e5793035792cc46a1a4b0a783655ffa897dfe9 Author: Johannes Berg Date: Thu Jun 27 10:44:11 2024 +0200 wifi: nl80211: don't give key data to userspace When a key is requested by userspace, there's really no need to include the key data, the sequence counter is really what userspace needs in this case. The fact that it's included is just a historic quirk. Remove the key data. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240627104411.b6a4f097e4ea.I7e6cc976cb9e8a80ef25a3351330f313373b4578@changeid Signed-off-by: Johannes Berg commit e8e43a1fcc5c07575f37e40f8a2cd78aee46f9a0 Author: Josef Bacik Date: Mon Jun 24 11:49:50 2024 -0400 fs: add an ioctl to get the mnt ns id from nsfs In order to utilize the listmount() and statmount() extensions that allow us to call them on different namespaces we need a way to get the mnt namespace id from user space. Add an ioctl to nsfs that will allow us to extract the mnt namespace id in order to make these new extensions usable. Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/180449959d5a756af7306d6bda55f41b9d53e3cb.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit 71aacb4c8c3d19da053363a5fe7538a8af082d56 Author: Christian Brauner Date: Mon Jun 24 11:49:49 2024 -0400 fs: Allow statmount() in foreign mount namespace This patch makes use of the new mnt_ns_id field in struct mnt_id_req to allow users to stat mount entries not in their mount namespace. The rules are the same as listmount(), the user must have CAP_SYS_ADMIN in their user namespace and the target mount namespace must be a child of the current namespace. Co-developed-by: Josef Bacik Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/52a2e17e50ba7aa420bc8bae1d9e88ff593395c1.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit 0a3deb11858ae8a0b3849b5fda45512ad383f0e1 Author: Christian Brauner Date: Mon Jun 24 11:49:48 2024 -0400 fs: Allow listmount() in foreign mount namespace Expand struct mnt_id_req to add an optional mnt_ns_id field. When this field is populated, listmount() will be performed on the specified mount namespace, provided the currently application has CAP_SYS_ADMIN in its user namespace and the mount namespace is a child of the current namespace. Co-developed-by: Josef Bacik Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/49930bdce29a8367a213eb14c1e68e7e49284f86.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit 09b31295f833031c88419550172703d45c5401e3 Author: Josef Bacik Date: Mon Jun 24 11:49:47 2024 -0400 fs: export the mount ns id via statmount In order to allow users to iterate through children mount namespaces via listmount we need a way for them to know what the ns id for the mount. Add a new field to statmount called mnt_ns_id which will carry the ns id for the given mount entry. Co-developed-by: Christian Brauner Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/6dabf437331fb7415d886f7c64b21cb2a50b1c66.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit 1901c92497bd90caf608a474f1bf4d8795b372a2 Author: Josef Bacik Date: Mon Jun 24 11:49:46 2024 -0400 fs: keep an index of current mount namespaces In order to allow for listmount() to be used on different namespaces we need a way to lookup a mount ns by its id. Keep a rbtree of the current !anonymous mount name spaces indexed by ID that we can use to look up the namespace. Co-developed-by: Christian Brauner Signed-off-by: Josef Bacik Link: https://lore.kernel.org/r/e5fdd78a90f5b00a75bd893962a70f52a2c015cd.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit f3107df39df123328a9d3c8f40c006834b37287d Author: Christian Brauner Date: Mon Jun 24 11:49:45 2024 -0400 fs: relax permissions for statmount() It is sufficient to have capabilities in the owning user namespace of the mount namespace to stat a mount regardless of whether it's reachable or not. Link: https://lore.kernel.org/r/bf5961d71ec479ba85806766b0d8d96043e67bba.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit d04bccd8c19d601232ed3e3c9e248c0040167d47 Author: Christian Brauner Date: Fri Jun 7 16:55:37 2024 +0200 listmount: allow listing in reverse order util-linux is about to implement listmount() and statmount() support. Karel requested the ability to scan the mount table in backwards order because that's what libmount currently does in order to get the latest mount first. We currently don't support this in listmount(). Add a new LISTMOUNT_REVERSE flag to allow listing mounts in reverse order. For example, listing all child mounts of /sys without LISTMOUNT_REVERSE gives: /sys/kernel/security @ mnt_id: 4294968369 /sys/fs/cgroup @ mnt_id: 4294968370 /sys/firmware/efi/efivars @ mnt_id: 4294968371 /sys/fs/bpf @ mnt_id: 4294968372 /sys/kernel/tracing @ mnt_id: 4294968373 /sys/kernel/debug @ mnt_id: 4294968374 /sys/fs/fuse/connections @ mnt_id: 4294968375 /sys/kernel/config @ mnt_id: 4294968376 whereas with LISTMOUNT_REVERSE it gives: /sys/kernel/config @ mnt_id: 4294968376 /sys/fs/fuse/connections @ mnt_id: 4294968375 /sys/kernel/debug @ mnt_id: 4294968374 /sys/kernel/tracing @ mnt_id: 4294968373 /sys/fs/bpf @ mnt_id: 4294968372 /sys/firmware/efi/efivars @ mnt_id: 4294968371 /sys/fs/cgroup @ mnt_id: 4294968370 /sys/kernel/security @ mnt_id: 4294968369 Link: https://lore.kernel.org/r/20240607-vfs-listmount-reverse-v1-4-7877a2bfa5e5@kernel.org Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit dd7cb142f467c4660698bcaa4a48c688b443ab81 Author: Christian Brauner Date: Mon Jun 24 11:49:44 2024 -0400 fs: relax permissions for listmount() It is sufficient to have capabilities in the owning user namespace of the mount namespace to list all mounts regardless of whether they are reachable or not. Link: https://lore.kernel.org/r/8adc0d3f4f7495faacc6a7c63095961f7f1637c7.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner commit 17e70161281bb66316e94e63a15d1a8498bf6f01 Author: Christian Brauner Date: Fri Jun 7 16:55:36 2024 +0200 fs: simplify error handling Rely on cleanup helper and simplify error handling Link: https://lore.kernel.org/r/20240607-vfs-listmount-reverse-v1-3-7877a2bfa5e5@kernel.org Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit cb54ef4f050e7c504ed87114276a296d727e918a Author: Christian Brauner Date: Mon Jun 10 14:49:54 2024 +0200 fs: don't copy to userspace under namespace semaphore Don't copy mount ids to userspace while holding the namespace semaphore. We really shouldn't do that and I've gone through lenghts avoiding that in statmount() already. Limit the number of mounts that can be retrieved in one go to 1 million mount ids. That's effectively 10 times the default limt of 100000 mounts that we put on each mount namespace by default. Since listmount() is an iterator limiting the number of mounts retrievable in one go isn't a problem as userspace can just pick up where they left off. Karel menti_ned that libmount will probably be reading the mount table in "in small steps, 512 nodes per request. Nobody likes a tool that takes too long in the kernel, and huge servers are unusual use cases. Libmount will very probably provide API to define size of the step (IDs per request)." Reported-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240610-frettchen-liberal-a9a5c53865f8@brauner Signed-off-by: Christian Brauner commit ff2c570ef7eaa9ded58e7a02dd7a68874a897508 Author: Christian Brauner Date: Fri Jun 7 16:55:35 2024 +0200 path: add cleanup helper Add a simple cleanup helper so we can cleanup struct path easily. No need for any extra machinery. Avoid DEFINE_FREE() as it causes a local copy of struct path to be used. Just rely on path_put() directly called from a cleanup helper. Link: https://lore.kernel.org/r/20240607-vfs-listmount-reverse-v1-2-7877a2bfa5e5@kernel.org Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 316d1225b1126286952d1e1a3da9da911cc00dd6 Author: Jeff Johnson Date: Thu Jun 13 11:57:14 2024 -0700 dmaengine: fsl-dpaa2-qdma: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/fsl-dpaa2-qdma/dpdmai.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-dma-fsl-dpaa2-qdma-v1-1-815d148740e6@quicinc.com Signed-off-by: Vinod Koul commit 62d73261a0cfa309fd07d0da41a74b3f47f25b6f Author: Christophe JAILLET Date: Sun Jun 23 22:01:50 2024 +0200 can: m_can: Constify struct m_can_ops 'struct m_can_ops' 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 4806 520 0 5326 14ce drivers/net/can/m_can/m_can_pci.o After: ===== text data bss dec hex filename 4862 464 0 5326 14ce drivers/net/can/m_can/m_can_pci.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/all/a17b96d1be5341c11f263e1e45c9de1cb754e416.1719172843.git.christophe.jaillet@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit 580d1712a4b0a1242792b1207f7c0679a2de9078 Merge: 94833addfaba8 f9a83965d40ef Author: Marc Kleine-Budde Date: Fri Jun 28 09:35:07 2024 +0200 Merge patch series "can: rcar_canfd: Small improvements and cleanups" Geert Uytterhoeven says: This series contains some improvements and cleanups for the R-Car CAN-FD driver. It has been tested on R-Car V4H (White Hawk and White Hawk Single). Link: https://lore.kernel.org/all/cover.1716973640.git.geert+renesas@glider.be [mkl: fixed typo in cover letter] Signed-off-by: Marc Kleine-Budde commit f9a83965d40ef162bab1e3af338523b8da69cb82 Author: Geert Uytterhoeven Date: Wed May 29 11:12:15 2024 +0200 can: rcar_canfd: Remove superfluous parentheses in address calculations There is no need to wrap simple variables or multiplications inside parentheses. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/b5aee80895fa029070fd37d1d837cf1c0ecb52dc.1716973640.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 0c1d0a69c5e7314f3787bc4272e286d800dbfc56 Author: Geert Uytterhoeven Date: Wed May 29 11:12:14 2024 +0200 can: rcar_canfd: Improve printing of global operational state Replace the printing of internal numerical values by the printing of strings reflecting their meaning, to make the message self-explanatory. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/14c8c5ce026e9fec128404706d1c73c8ffa11ced.1716973640.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit dd20d16dae83733d7c98c167b8d935e7b63db7c7 Author: Geert Uytterhoeven Date: Wed May 29 11:12:13 2024 +0200 can: rcar_canfd: Simplify clock handling The main CAN clock is either the internal CANFD clock, or the external CAN clock. Hence replace the two-valued enum by a simple boolean flag. Consolidate all CANFD clock handling inside a single branch. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/2cf38c10b83c8e5c04d68b17a930b6d9dbf66f40.1716973640.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 61879ffd6f6f72fe984ee343d2499e96bcf10e3c Author: Jeff Johnson Date: Thu Jun 13 12:27:22 2024 -0700 dmaengine: ti: add missing MODULE_DESCRIPTION() macros With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/k3-udma.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/k3-udma-glue.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/k3-psil-lib.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-dma-ti-v1-1-b1154603f341@quicinc.com Signed-off-by: Vinod Koul commit 6c026a3e4ecf68616c6ea0beb0d7a3462ae6f843 Author: Jeff Johnson Date: Sat Jun 15 22:51:47 2024 -0700 dmaengine: ti: cppi41: add missing MODULE_DESCRIPTION() macro With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/cppi41.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240615-md-arm-drivers-dma-ti-v1-1-496d243158dd@quicinc.com Signed-off-by: Vinod Koul commit 4db6b030257283166a11de3731a39f4f7ab9656e Author: Jeff Johnson Date: Sun Jun 16 17:58:33 2024 -0700 dmaengine: virt-dma: add missing MODULE_DESCRIPTION() macro With ARCH=loongarch, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/virt-dma.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240616-md-loongarch-drivers-dma-virt-dma-v1-1-70ed3dcbf8aa@quicinc.com Signed-off-by: Vinod Koul commit 372f8b3621294173f539b32976e41e6e12f5decf Author: Vignesh Raghavendra Date: Fri Jun 7 23:41:03 2024 +0530 dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels Unlike other channel counts in CAPx registers, BCDMA BCHAN CNT doesn't include UHC and HC BC channels. So include them explicitly to arrive at total BC channel in the instance. Fixes: 8844898028d4 ("dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling") Signed-off-by: Vignesh Raghavendra Signed-off-by: Jai Luthra Tested-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.com Signed-off-by: Vinod Koul commit 0e53aa3464e9a0a82bd3b926ba5999a11569c9ba Author: Biju Das Date: Tue Jun 25 18:01:16 2024 +0100 dmaengine: sh: rz-dmac: Fix lockdep assert warning Fix the below lockdep assert warning by holding vc.lock for vchan_get_all_descriptors(). WARNING: virt-dma.h:188 rz_dmac_terminate_all pc : rz_dmac_terminate_all Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240625170119.173595-1-biju.das.jz@bp.renesas.com Signed-off-by: Vinod Koul commit 7ee6cfe6d9cf53df926386801a006cc9c22e8a36 Author: Chen Ni Date: Fri Jun 28 11:28:12 2024 +0800 fbdev: omap2: Return clk_prepare_enable to transfer the error Return clk_prepare_enable() in order to transfer the error if it fails. Signed-off-by: Chen Ni Signed-off-by: Helge Deller commit f431a8cde7f102fce412546db6e62fdbde1131a7 Author: Shivaprasad G Bhat Date: Mon Jun 24 12:39:23 2024 +0000 powerpc/iommu: Reimplement the iommu_table_group_ops for pSeries PPC64 IOMMU API defines iommu_table_group_ops which handles DMA windows for PEs, their ownership transfer, create/set/unset the TCE tables for the Dynamic DMA wundows(DDW). VFIOS uses these APIs for support on POWER. The commit 9d67c9433509 ("powerpc/iommu: Add "borrowing" iommu_table_group_ops") implemented partial support for this API with "borrow" mechanism wherein the DMA windows if created already by the host driver, they would be available for VFIO to use. Also, it didn't have the support to control/modify the window size or the IO page size. The current patch implements all the necessary iommu_table_group_ops APIs there by avoiding the "borrrowing". So, just the way it is on the PowerNV platform, with this patch the iommu table group ownership is transferred to the VFIO PPC subdriver, the iommu table, DMA windows creation/deletion all driven through the APIs. The pSeries uses the query-pe-dma-window, create-pe-dma-window and reset-pe-dma-window RTAS calls for DMA window creation, deletion and reset to defaul. The RTAs calls do show some minor differences to the way things are to be handled on the pSeries which are listed below. * On pSeries, the default DMA window size is "fixed" cannot be custom sized as requested by the user. For non-SRIOV VFs, It is fixed at 2GB and for SRIOV VFs, its variable sized based on the capacity assigned to it during the VF assignment to the LPAR. So, for the default DMA window alone the size if requested less than tce32_size, the smaller size is enforced using the iommu table->it_size. * The DMA start address for 32-bit window is 0, and for the 64-bit window in case of PowerNV is hardcoded to TVE select (bit 59) at 512PiB offset. This address is returned at the time of create_table() API call (even before the window is created), the subsequent set_window() call actually opens the DMA window. On pSeries, the DMA start address for 32-bit window is known from the 'ibm,dma-window' DT property. However, the 64-bit window start address is not known until the create-pe-dma RTAS call is made. So, the create_table() which returns the DMA window start address actually opens the DMA window and returns the DMA start address as returned by the Hypervisor for the create-pe-dma RTAS call. * The reset-pe-dma RTAS call resets the DMA windows and restores the default DMA window, however it does not clear the TCE table entries if there are any. In case of ownership transfer from platform domain which used direct mapping, the patch chooses remove-pe-dma instead of reset-pe for the 64-bit window intentionally so that the clear_dma_window() is called. Other than the DMA window management changes mentioned above, the patch also brings back the userspace view for the single level TCE as it existed before commit 090bad39b237a ("powerpc/powernv: Add indirect levels to it_userspace") along with the relavent refactoring. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171923275958.1397.907964437142542242.stgit@linux.ibm.com commit 35146eadcb81d72153a1621f3cc0d5588cae19d3 Author: Shivaprasad G Bhat Date: Mon Jun 24 12:39:10 2024 +0000 powerpc/iommu: Move dev_has_iommu_table() to iommu.c Move function dev_has_iommu_table() to powerpc/kernel/iommu.c as it is going to be used by machine specific iommu code as well in subsequent patches. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171923274748.1397.6274953248403106679.stgit@linux.ibm.com commit 4ba2fdff2eb174114786784926d0efb6903c88a6 Author: Shivaprasad G Bhat Date: Mon Jun 24 12:38:58 2024 +0000 vfio/spapr: Always clear TCEs before unsetting the window The PAPR expects the TCE table to have no entries at the time of unset window(i.e. remove-pe). The TCE clear right now is done before freeing the iommu table. On pSeries, the unset window makes those entries inaccessible to the OS and the H_PUT/GET calls fail on them with H_CONSTRAINED. On PowerNV, this has no side effect as the TCE clear can be done before the DMA window removal as well. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171923273535.1397.1236742071894414895.stgit@linux.ibm.com commit aed6e4946ed9654fc965482b045b84f9b9572bb8 Author: Shivaprasad G Bhat Date: Mon Jun 24 12:38:46 2024 +0000 powerpc/pseries/iommu: Use the iommu table[0] for IOV VF's DDW This patch basically brings consistency with PowerNV approach to use the first freely available iommu table when the default window is removed. The pSeries iommu code convention has been that the table[0] is for the default 32 bit DMA window and the table[1] is for the 64 bit DDW. With VFs having only 1 DMA window, the default has to be removed for creating the larger DMA window. The existing code uses the table[1] for that, while marking the table[0] as NULL. This is fine as long as the host driver itself uses the device. For the VFIO user, on pSeries there is no way to skip table[0] as the VFIO subdriver uses the first freely available table. The window 0, when created as 64-bit DDW in that context would still be on table[0], as the maximum number of windows is 1. This won't have any impact for the host driver as the table is fetched from the device's iommu_table_base. Signed-off-by: Shivaprasad G Bhat [mpe: Rebase and resolve conflicts] Signed-off-by: Michael Ellerman Link: https://msgid.link/171923272328.1397.1817843961216868850.stgit@linux.ibm.com commit 6af67f2ddfcbbca551d786415beda14c48fb6ddf Author: Shivaprasad G Bhat Date: Mon Jun 24 12:38:34 2024 +0000 powerpc/pseries/iommu: Fix the VFIO_IOMMU_SPAPR_TCE_GET_INFO ioctl output The ioctl VFIO_IOMMU_SPAPR_TCE_GET_INFO is not reporting the actuals on the platform as not all the details are correctly collected during the platform probe/scan into the iommu_table_group. Collect the information during the device setup time as the DMA window property is already looked up on parent nodes anyway. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171923271138.1397.7908302630061814623.stgit@linux.ibm.com commit b09c031d9433dda3186190e5845ba0d720212567 Author: Shivaprasad G Bhat Date: Mon Jun 24 12:38:21 2024 +0000 powerpc/iommu: Move pSeries specific functions to pseries/iommu.c The PowerNV specific table_group_ops are defined in powernv/pci-ioda.c. The pSeries specific table_group_ops are sitting in the generic powerpc file. Move it to where it actually belong(pseries/iommu.c). The functions are currently defined even for CONFIG_PPC_POWERNV which are unused on PowerNV. Only code movement, no functional changes intended. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171923269701.1397.15758640002786937132.stgit@linux.ibm.com commit f5306b757cb78aeec45e03ee52ec038c6423ad7a Author: Dorcas Anono Litunya Date: Mon Jun 24 12:53:06 2024 +0300 documentation: media: vivid: Update documentation on vivid loopback support Modify section "Video and Sliced VBI Looping" in Documentation to explain the vivid loopback support for video across multiple vivid instances. Previous documentation is out-of-date as it was explaining looping in a single vivid instance only. Also, in "Some Future Improvements" the item "Add support to loop from a specific output to a specific input across vivid instances" can be dropped since that's now implemented. Signed-off-by: Dorcas Anono Litunya Signed-off-by: Hans Verkuil commit 4c4dacb052d44b3af612e3e0c0e70a413b8dded0 Author: Hans Verkuil Date: Mon Jun 24 12:53:04 2024 +0300 media: vivid: loopback based on 'Connected To' controls Instead of using hardwired video loopback limited to a single vivid instance, use the new 'Connected To' controls to only loopback if an HDMI or S-Video input is connected to another output, which can be in another vivid instance. Effectively this emulates connecting and disconnecting an HDMI/S-Video cable. The Loop Video control is dropped since it has now been replaced by the new 'Connected To' controls. The Display Present has also been dropped since it no longer fits. Signed-off-by: Hans Verkuil Co-developed-by: Dorcas Anono Litunya Signed-off-by: Dorcas Anono Litunya commit d7c969f37515d78dc1a026d12b94b90e319a5a61 Author: Dorcas Anono Litunya Date: Mon Jun 24 12:53:02 2024 +0300 media: vivid: Add 'Is Connected To' menu controls The video loopback functionality in vivid is very crude. What we really want is to be able to emulate connecting an HDMI or S-Video input to an HDMI or S-Video output, and the input and output can be in different vivid instances. Effectively this emulates what happens when you physically connect an HDMI or S-Video cable between two devices. In particular, this makes prototyping with vivid much more realistic. This patch creates a menu control for each HDMI or S-Video input. The menu control starts with "Test Pattern Generator" and "None" (i.e. disconnected). After that up to 62 HDMI or S-Video outputs are listed that you can connect the input to. If there are more than 62 HDMI or S-Video outputs, then those will not be included in the menu (currently menucontrols have max 64 entries). If an input is connected to an output, then all other 'Connected To' controls are updated to exclude that output to avoid having multiple inputs connected to the same output. Signed-off-by: Dorcas Anono Litunya Signed-off-by: Hans Verkuil [hverkuil: use u8 in loops in vivid_create_controls() to avoid truncate warning] commit 3d023ff2ef03960a4072585c0a59e7c45d608487 Author: Hans Verkuil Date: Mon Jun 24 12:53:00 2024 +0300 media: vivid: add instance number to input/output names Add the instance number before the input or output number. So "HDMI 1" becomes "HDMI 000-1". This is helps identifying which input or output belongs to which vivid instance. Signed-off-by: Hans Verkuil commit 17763960b1784578e8fe915304b330922f646209 Author: Hans Verkuil Date: Mon Jun 24 12:52:59 2024 +0300 media: vivid: don't set HDMI TX controls if there are no HDMI outputs When setting the EDID it would attempt to update two controls that are only present if there is an HDMI output configured. If there isn't any (e.g. when the vivid module is loaded with node_types=1), then calling VIDIOC_S_EDID would crash. Fix this by first checking if outputs are present. Signed-off-by: Hans Verkuil commit e03549dd025392bffc47264d53894e48a387b25d Author: Hans Verkuil Date: Mon Jun 24 12:52:58 2024 +0300 media: vivid: vidioc_g_edid: do not change the original input EDID Returning an EDID for a connected output would modify the original input EDID with the physical address of the output. That causes problems, and it should just update the physical address of the output EDID. Update vivid_hdmi_edid to set the physical address to 0.0.0.0. Signed-off-by: Hans Verkuil commit 0bc9574a7a2cac8cf05d1821081cc701e48e75fc Author: Dorcas Anono Litunya Date: Mon Jun 24 12:52:57 2024 +0300 media: Documentation: vivid.rst: Remove documentation for Capture Overlay Modifying documentation to remove 'Capture Overlay section' as destructive capture overlay support was removed. See commit ccaa9d50ca73 ("media: vivid: drop overlay support") Signed-off-by: Dorcas Anono Litunya Signed-off-by: Hans Verkuil commit 3883822e17f7237d07da4970e642a50de991a76b Author: Hans Verkuil Date: Mon Jun 24 12:52:55 2024 +0300 media: Documentation: vivid.rst: add supports_requests The module option supports_requests was not documented, add it. Signed-off-by: Hans Verkuil commit 50e2eba54d0d865cbb7a4e03fd721d5b396083d1 Author: Hans Verkuil Date: Mon Jun 24 12:52:54 2024 +0300 media: Documentation: vivid.rst: drop "Video, VBI and RDS Looping" Drop the "Video, VBI and RDS Looping" section, instead moving the Video/VBI info to section "Video and Sliced VBI looping" and the RDS info to section "Radio & RDS Looping". Signed-off-by: Hans Verkuil commit 2513996024de58855d452d96b52484e489524f91 Author: Hans Verkuil Date: Mon Jun 24 12:52:53 2024 +0300 media: Documentation: vivid.rst: fix confusing section refs The documentation contained several instances of "section X" references, which no longer map to whatever X was. Replace these by the section titles. Also fix a single confusing typo in the "Radio & RDS Looping" section: "are regular frequency intervals" -> "at regular frequency intervals" Signed-off-by: Hans Verkuil commit 25e713c6b54a899b5a8b5e09b58f4b87a5b3664b Author: Patryk Wlazlyn Date: Fri May 24 13:04:33 2024 +0200 tools/power turbostat: Add ZERO_ARRAY for zero initializing builtin array It makes it harder to shoot yourself in the foot, by using additional __must_be_array() check. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 73ed3c941a76ff3348022477975c84b8d183599a Author: Patryk Wlazlyn Date: Fri May 24 12:22:57 2024 +0200 tools/power turbostat: Replace enum rapl_source and cstate_source with counter_source Reuse the enum. It means the same thing in both cases. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit c81c8ee445e84703cd90171365ed596ef94399cc Author: Patryk Wlazlyn Date: Fri May 24 12:06:39 2024 +0200 tools/power turbostat: Remove anonymous union from rapl_counter_info_t fd_perf field used to be part of the union, but later moved out of it, because we test it with fd_perf != -1 to determine if any perf counter is opened, making the union unused. Signed-off-by: Patryk Wlazlyn Signed-off-by: Len Brown commit 1b3bf0747d4f1a963e59c26e602868bdce195318 Author: Tony Luck Date: Tue Jun 11 10:19:50 2024 -0700 tools/power/turbostat: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. N.B. Copied VFM_*() defines here from to avoid an application picking a second internal kernel header file. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Len Brown commit 7afbf90ea2e238c4d049ff59dbb6c5f1a938e669 Author: James Clark Date: Wed Jun 26 15:54:46 2024 +0100 perf pmu: Don't de-duplicate core PMUs Arm PMUs have a suffix, either a single decimal (armv8_pmuv3_0) or 3 hex digits which (armv8_cortex_a53) which Perf assumes are both strippable suffixes for the purposes of deduplication. S390 "cpum_cf" is a similarly suffixed core PMU but is only two characters so is not treated as strippable because the rules are a minimum of 3 hex characters or 1 decimal character. There are two paths involved in listing PMU events: * HW/cache event printing assumes core PMUs don't have suffixes so doesn't try to strip. * Sysfs PMU events share the printing function with uncore PMUs which strips. This results in slightly inconsistent Perf list behavior if a core PMU has a suffix: # perf list ... armv8_pmuv3_0/branch-load-misses/ armv8_pmuv3/l3d_cache_wb/ [Kernel PMU event] ... Fix it by partially reverting back to the old list behavior where stripping was only done for uncore PMUs. For example commit 8d9f5146f5da ("perf pmus: Sort pmus by name then suffix") mentions that only PMUs starting 'uncore_' are considered to have a potential suffix. This change doesn't go back that far, but does only strip PMUs that are !is_core. This keeps the desirable behavior where the many possibly duplicated uncore PMUs aren't repeated, but it doesn't break listing for core PMUs. Searching for a PMU continues to use the new stripped comparison functions, meaning that it's still possible to request an event by specifying the common part of a PMU name, or even open events on multiple similarly named PMUs. For example: # perf stat -e armv8_cortex/inst_retired/ 5777173628 armv8_cortex_a53/inst_retired/ (99.93%) 7469626951 armv8_cortex_a57/inst_retired/ (49.88%) Fixes: 3241d46f5f54 ("perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu") Suggested-by: Ian Rogers Signed-off-by: James Clark Reviewed-by: Ian Rogers Cc: robin.murphy@arm.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240626145448.896746-3-james.clark@arm.com commit 3e0bf9fde29844694ad9912aa290fbdb2c3fa767 Author: James Clark Date: Wed Jun 26 15:54:45 2024 +0100 perf pmu: Restore full PMU name wildcard support Commit b2b9d3a3f021 ("perf pmu: Support wildcards on pmu name in dynamic pmu events") gives the following example for wildcarding a subset of PMUs: E.g., in a system with the following dynamic pmus: mypmu_0 mypmu_1 mypmu_2 mypmu_4 perf stat -e mypmu_[01]// Since commit f91fa2ae6360 ("perf pmu: Refactor perf_pmu__match()"), only "*" has been supported, removing the ability to subset PMUs, even though parse-events.l still supports ? and [] characters. Fix it by using fnmatch() when any glob character is detected and add a test which covers that and other scenarios of perf_pmu__match_ignoring_suffix(). Fixes: f91fa2ae6360 ("perf pmu: Refactor perf_pmu__match()") Signed-off-by: James Clark Reviewed-by: Ian Rogers Cc: robin.murphy@arm.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240626145448.896746-2-james.clark@arm.com commit 4553c431e7dd259dafc1c7ed31797b8b3d7fe034 Author: Namhyung Kim Date: Thu Jun 27 11:19:16 2024 -0700 perf report: Display pregress bar on redirected pipe data It's possible to save pipe output of perf record into a file. $ perf record -o- ... > pipe.data And you can use the data same as the normal perf data. $ perf report -i pipe.data In that case, perf tools will treat the input as a pipe, but it can get the total size of the input. This means it can show the progress bar unlike the normal pipe input (which doesn't know the total size in advance). While at it, fix the string in __perf_session__process_dir_events(). Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240627181916.1202110-1-namhyung@kernel.org commit 95c0f5c3b8bb7acdc5c4f04bc6a7d3f40d319e9e Author: Harald Freudenberger Date: Fri Jun 21 17:02:24 2024 +0200 hwrng: core - Fix wrong quality calculation at hw rng registration When there are rng sources registering at the hwrng core via hwrng_register() a struct hwrng is delivered. There is a quality field in there which is used to decide which of the registered hw rng sources will be used by the hwrng core. With commit 16bdbae39428 ("hwrng: core - treat default_quality as a maximum and default to 1024") there came in a new default of 1024 in case this field is empty and all the known hw rng sources at that time had been reworked to not fill this field and thus use the default of 1024. The code choosing the 'better' hw rng source during registration of a new hw rng source has never been adapted to this and thus used 0 if the hw rng implementation does not fill the quality field. So when two rng sources register, one with 0 (meaning 1024) and the other one with 999, the 999 hw rng will be chosen. As the later invoked function hwrng_init() anyway adjusts the quality field of the hw rng source, this adjustment is now done during registration of this new hw rng source. Tested on s390 with two hardware rng sources: crypto cards and trng true random generator device driver. Fixes: 16bdbae39428 ("hwrng: core - treat default_quality as a maximum and default to 1024") Reported-by: Christian Rund Suggested-by: Herbert Xu Signed-off-by: Harald Freudenberger Signed-off-by: Herbert Xu commit b0c2036df8868b97176f9a97b777846620c9a74d Author: Sam Protsenko Date: Thu Jun 20 18:13:39 2024 -0500 hwrng: exynos - Enable Exynos850 support Add Exynos850 compatible and its driver data. It's only possible to access TRNG block via SMC calls in Exynos850, so specify that fact using EXYNOS_SMC flag in the driver data. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Acked-by: Łukasz Stelmach Signed-off-by: Herbert Xu commit 10bb6ac8f86f4b65ef8d227504868a61e0bcb148 Author: Sam Protsenko Date: Thu Jun 20 18:13:38 2024 -0500 hwrng: exynos - Add SMC based TRNG operation On some Exynos chips like Exynos850 the access to Security Sub System (SSS) registers is protected with TrustZone, and therefore only possible from EL3 monitor software. The Linux kernel is running in EL1, so the only way for the driver to obtain TRNG data is via SMC calls to EL3 monitor. Implement such SMC operation and use it when EXYNOS_SMC flag is set in the corresponding chip driver data. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit e003d67067043488595f33f3a82230a4281686ca Author: Sam Protsenko Date: Thu Jun 20 18:13:37 2024 -0500 hwrng: exynos - Implement bus clock control Some SoCs like Exynos850 might require the SSS bus clock (PCLK) to be enabled in order to access TRNG registers. Add and handle the optional PCLK clock accordingly to make it possible. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Anand Moon Signed-off-by: Herbert Xu commit 81da8056e92bd255178413d36382653ed5a1a230 Author: Sam Protsenko Date: Thu Jun 20 18:13:36 2024 -0500 hwrng: exynos - Use devm_clk_get_enabled() to get the clock Use devm_clk_get_enabled() helper instead of calling devm_clk_get() and then clk_prepare_enable(). It simplifies the error handling and makes the code more compact. Also use dev_err_probe() to handle possible -EPROBE_DEFER errors if the clock is not available yet. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Anand Moon Signed-off-by: Herbert Xu commit 76536caabedbeafb01d364690914c88ebadab5b3 Author: Sam Protsenko Date: Thu Jun 20 18:13:35 2024 -0500 hwrng: exynos - Improve coding style Fix obvious style issues. Some of those were found with checkpatch, and some just contradict the kernel coding style guide. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Acked-by: Łukasz Stelmach Signed-off-by: Herbert Xu commit 70003f512c5ff488081460c664340b11b57b1293 Author: Sam Protsenko Date: Thu Jun 20 18:13:34 2024 -0500 dt-bindings: rng: Add Exynos850 support to exynos-trng The TRNG block in Exynos850 is pretty much the same as in Exynos5250, but there are two clocks that has to be controlled to make it work: 1. Functional (operating) clock: called ACLK in Exynos850, the same as "secss" clock in Exynos5250 2. Interface (bus) clock: called PCLK in Exynos850. It has to be enabled in order to access TRNG registers Document Exynos850 compatible and the related clock changes. Signed-off-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit ccacbbc3176277bbfc324f85fa827d1a2656bedf Author: Jiwei Sun Date: Thu Jun 20 16:51:10 2024 +0800 crypto: qat - initialize user_input.lock for rate_limiting If the following configurations are set, CONFIG_DEBUG_RWSEMS=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_RWSEM_SPIN_ON_OWNER=y And run the following command, [root@localhost sys]# cat /sys/devices/pci0000:6b/0000:6b:00.0/qat_rl/pir The following warning log appears, ------------[ cut here ]------------ DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x0, magic = 0x0, owner = 0x1, curr 0xff11000119288040, list not empty WARNING: CPU: 131 PID: 1254984 at kernel/locking/rwsem.c:1280 down_read+0x439/0x7f0 CPU: 131 PID: 1254984 Comm: cat Kdump: loaded Tainted: G W 6.10.0-rc4+ #86 b2ae60c8ceabed15f4fd2dba03c1c5a5f7f4040c Hardware name: Lenovo ThinkServer SR660 V3/SR660 V3, BIOS T8E166X-2.54 05/30/2024 RIP: 0010:down_read+0x439/0x7f0 Code: 44 24 10 80 3c 02 00 0f 85 05 03 00 00 48 8b 13 41 54 48 c7 c6 a0 3e 0e b4 48 c7 c7 e0 3e 0e b4 4c 8b 4c 24 08 e8 77 d5 40 fd <0f> 0b 59 e9 bc fc ff ff 0f 1f 44 00 00 e9 e2 fd ff ff 4c 8d 7b 08 RSP: 0018:ffa0000035f67a78 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ff1100012b03a658 RCX: 0000000000000000 RDX: 0000000080000002 RSI: 0000000000000008 RDI: 0000000000000001 RBP: 1ff4000006becf53 R08: fff3fc0006becf17 R09: fff3fc0006becf17 R10: fff3fc0006becf16 R11: ffa0000035f678b7 R12: ffffffffb40e3e60 R13: ffffffffb627d1f4 R14: ff1100012b03a6d0 R15: ff1100012b03a6c8 FS: 00007fa9ff9a6740(0000) GS:ff1100081e600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa9ff984000 CR3: 00000002118ae006 CR4: 0000000000771ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: pir_show+0x5d/0xe0 [intel_qat 9e297e249ab040329cf58b657b06f418fd5c5855] dev_attr_show+0x3f/0xc0 sysfs_kf_seq_show+0x1ce/0x400 seq_read_iter+0x3fa/0x10b0 vfs_read+0x6f5/0xb20 ksys_read+0xe9/0x1d0 do_syscall_64+0x8a/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fa9ff6fd9b2 Code: c0 e9 b2 fe ff ff 50 48 8d 3d ea 1d 0c 00 e8 c5 fd 01 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24 RSP: 002b:00007ffc0616b968 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007fa9ff6fd9b2 RDX: 0000000000020000 RSI: 00007fa9ff985000 RDI: 0000000000000003 RBP: 00007fa9ff985000 R08: 00007fa9ff984010 R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000022000 R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x21e6/0x6e70 softirqs last enabled at (0): [] copy_process+0x2236/0x6e70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace 0000000000000000 ]--- The rate_limiting->user_input.lock rwsem lock is not initialized before use. Let's initialize it. Signed-off-by: Jiwei Sun Reviewed-by: Adrian Huang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit e0eece0cebe4b739c47abad958d17669ff8c005d Author: Kyle Meyer Date: Mon Jun 17 15:33:17 2024 -0500 crypto: deflate - Add aliases to deflate iaa_crypto depends on the deflate compression algorithm that's provided by deflate. If the algorithm is not available because CRYPTO_DEFLATE=m and deflate is not inserted, iaa_crypto will request "crypto-deflate-generic". Deflate will not be inserted because "crypto-deflate-generic" is not a valid alias. Add deflate-generic and crypto-deflate-generic aliases to deflate. Signed-off-by: Kyle Meyer Signed-off-by: Herbert Xu commit 7b3058eb3f3b04e534d6cda6820ef8c7cf519a79 Author: Sergey Portnoy Date: Mon Jun 17 17:08:29 2024 +0100 crypto: tcrypt - add skcipher speed for given alg Allow to run skcipher speed for given algorithm. Case 600 is modified to cover ENCRYPT and DECRYPT directions. Example: modprobe tcrypt mode=600 alg="qat_aes_xts" klen=32 If succeed, the performance numbers will be printed in dmesg: testing speed of multibuffer qat_aes_xts (qat_aes_xts) encryption test 0 (256 bit key, 16 byte blocks): 1 operation in 14596 cycles (16 bytes) ... test 6 (256 bit key, 4096 byte blocks): 1 operation in 8053 cycles (4096 bytes) Signed-off-by: Sergey Portnoy Signed-off-by: Herbert Xu commit 502099acb8cbf08acb6b43ff2b8da43d2bf85166 Author: Colin Ian King Date: Thu Jun 27 18:08:47 2024 +0100 firewire: core: Fix spelling mistakes in tracepoint messages There are two spelling mistakes in the tracepoint message text. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20240627170847.125531-1-colin.i.king@gmail.com Signed-off-by: Takashi Sakamoto commit 94833addfaba89d12e5dbd82e350a692c00648ab Author: Breno Leitao Date: Wed Jun 26 10:35:02 2024 -0700 net: thunderx: Unembed netdev structure Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_devices from struct lmac by converting them into pointers, and allocating them dynamically. Use the leverage alloc_netdev() to allocate the net_device object at bgx_lmac_enable(). The free of the device occurs at bgx_lmac_disable(). Do not free_netdevice() if bgx_lmac_enable() fails after lmac->netdev is allocated, since bgx_lmac_disable() is called if bgx_lmac_enable() fails, and lmac->netdev will be freed there (similarly to lmac->dmacs). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Signed-off-by: Breno Leitao Link: https://patch.msgid.link/20240626173503.87636-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 2d5f6801db8ec0ce97bc520ecd51a7be06a35042 Author: Sagi Grimberg Date: Wed Jun 26 10:01:53 2024 +0300 Revert "net: micro-optimize skb_datagram_iter" This reverts commit 934c29999b57b835d65442da6f741d5e27f3b584. This triggered a usercopy BUG() in systems with HIGHMEM, reported by the test robot in: https://lore.kernel.org/oe-lkp/202406161539.b5ff7b20-oliver.sang@intel.com Signed-off-by: Sagi Grimberg Link: https://patch.msgid.link/20240626070153.759257-1-sagi@grimberg.me Signed-off-by: Jakub Kicinski commit fb625bf6187d97c3cd28d680b14bf80f84207e5a Merge: 91fdc5e76513e 9dec27bb8ae4e Author: Dave Airlie Date: Fri Jun 28 09:41:03 2024 +1000 Merge tag 'drm-habanalabs-next-2024-06-23' of https://github.com/HabanaAI/drivers.accel.habanalabs.kernel into drm-next This tag contains habanalabs driver changes for v6.11. The notable changes are: - uAPI changes: - Use device-name directory in debugfs-driver-habanalabs. - Expose server type in debugfs. - New features and improvements: - Gradual sleep in polling memory macro. - Reduce Gaudi2 MSI-X interrupt count to 128. - Add Gaudi2-D revision support. - Firmware related changes: - Add timestamp to CPLD info. - Gaudi2: Assume hard-reset by firmware upon MC SEI severe error. - Align Gaudi2 interrupt names. - Check for errors after preboot is ready. - Bug fixes and code cleanups: - Move heartbeat work initialization to early init. - Fix a race when receiving events during reset. - Change the heartbeat scheduling point. - Maintainers: - Change habanalabs maintainer and git repo path. Signed-off-by: Dave Airlie From: Ofir Bitton Link: https://patchwork.freedesktop.org/patch/msgid/ZnfIjTH5AYQvPe7n@obitton-vm-u22.habana-labs.com commit 3a158e2e8e48a4a53874957761545c37b19b318d Merge: 346a03e5fbdb8 6f437f5c91b03 Author: Jakub Kicinski Date: Thu Jun 27 15:50:19 2024 -0700 Merge branch 'selftests-net-switch-pmtu-sh-to-use-the-internal-ovs-script' Aaron Conole says: ==================== selftests: net: Switch pmtu.sh to use the internal ovs script. Currently, if a user wants to run pmtu.sh and cover all the provided test cases, they need to install the Open vSwitch userspace utilities. This dependency is difficult for users as well as CI environments, because the userspace build and setup may require lots of support and devel packages to be installed, system setup to be correct, and things like permissions and selinux policies to be properly configured. The kernel selftest suite includes an ovs-dpctl.py utility which can interact with the openvswitch module directly. This lets developers and CI environments run without needing too many extra dependencies - just the pyroute2 python package. This series enhances the ovs-dpctl utility to provide support for set() and tunnel() flow specifiers, better ipv6 handling support, and the ability to add tunnel vports, and LWT interfaces. Finally, it modifies the pmtu.sh script to call the ovs-dpctl.py utility rather than the typical OVS userspace utilities. The pmtu.sh can still fall back on the Open vSwitch userspace utilities if the ovs-dpctl.py script can't be used. ==================== Link: https://patch.msgid.link/20240625172245.233874-1-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 6f437f5c91b03b105c0efa128a687746254049e4 Author: Aaron Conole Date: Tue Jun 25 13:22:45 2024 -0400 selftests: net: add config for openvswitch The pmtu testing will require that the OVS module is installed, so do that. Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Aaron Conole Link: https://patch.msgid.link/20240625172245.233874-8-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 13020adf6be9603ba71a9e269f130046dcea8cc8 Author: MD Danish Anwar Date: Tue Jun 25 21:03:15 2024 +0530 MAINTAINERS: Add entry for ti,pruss.yaml to TI KEYSTONE MULTICORE NAVIGATOR DRIVERS Currently there is no entry for Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml file. The driver file corresponding to this binding file is drivers/soc/ti/pruss.c which is maintained in TI KEYSTONE MULTICORE NAVIGATOR DRIVERS. Add the binding file also to the same section so that this could be maintained. Signed-off-by: MD Danish Anwar Link: https://lore.kernel.org/r/20240625153319.795665-2-danishanwar@ti.com Signed-off-by: Nishanth Menon commit e44097c6d535163f28c6106605452a2fdb1d8cba Author: Neha Malcom Francis Date: Mon Jun 24 12:22:05 2024 +0530 soc: ti: k3-socinfo: Add J721E SR2.0 Add support to detect J721E SR2.0 Signed-off-by: Neha Malcom Francis Link: https://lore.kernel.org/r/20240624065205.718449-1-n-francis@ti.com Signed-off-by: Nishanth Menon commit ca16cb2b9073e2f2a968a04c794275aa21ee1aa3 Author: Christophe JAILLET Date: Sun Jun 23 18:11:31 2024 +0200 soc: ti: knav_qmss: Constify struct knav_range_ops 'struct knav_range_ops' 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: Before: ====== text data bss dec hex filename 7498 1193 0 8691 21f3 drivers/soc/ti/knav_qmss_acc.o After: ===== text data bss dec hex filename 7566 1145 0 8711 2207 drivers/soc/ti/knav_qmss_acc.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/a8b4b428f97fc584f38bf45100aa9da241aeb935.1719159074.git.christophe.jaillet@wanadoo.fr Signed-off-by: Nishanth Menon commit f1de10ae7bbfbb2c443bf18f15e4b1b497868b45 Author: Richard Genoud Date: Tue Jun 18 17:09:33 2024 +0200 firmware: ti_sci: fix TISCI protocol URL link The http://processors.wiki.ti.com EOL in january 2021 Fix the old URL with the new one. Signed-off-by: Richard Genoud Link: https://lore.kernel.org/r/20240618150933.1824185-3-richard.genoud@bootlin.com Signed-off-by: Nishanth Menon commit 9040d64f58d275c9f2fc563887ec245f249b0e8f Author: Richard Genoud Date: Tue Jun 18 17:09:32 2024 +0200 dt-bindings: ti: fix TISCI protocol URL link The http://processors.wiki.ti.com EOL in january 2021 Fix the old URL with the new one. Signed-off-by: Richard Genoud Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240618150933.1824185-2-richard.genoud@bootlin.com Signed-off-by: Nishanth Menon commit b7ce46fc614d4d31d438878ade1e4d0c3ef890c7 Author: Aaron Conole Date: Tue Jun 25 13:22:44 2024 -0400 selftests: net: Use the provided dpctl rather than the vswitchd for tests. The current pmtu test infrastucture requires an installed copy of the ovs-vswitchd userspace. This means that any automated or constrained environments may not have the requisite tools to run the tests. However, the pmtu tests don't require any special classifier processing. Indeed they are only using the vswitchd in the most basic mode - as a NORMAL switch. However, the ovs-dpctl kernel utility can now program all the needed basic flows to allow traffic to traverse the tunnels and provide support for at least testing some basic pmtu scenarios. More complicated flow pipelines can be added to the internal ovs test infrastructure, but that is work for the future. For now, enable the most common cases - wide mega flows with no other prerequisites. Enhance the pmtu testing to try testing using the internal utility, first. As a fallback, if the internal utility isn't running, then try with the ovs-vswitchd userspace tools. Additionally, make sure that when the pyroute2 package is not available the ovs-dpctl utility will error out to properly signal an error has occurred and skip using the internal utility. Reviewed-by: Stefano Brivio Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Tested-by: Simon Horman Link: https://patch.msgid.link/20240625172245.233874-7-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 51458e1084d0f3938a5b96e5d85974d9c5ee1f21 Author: Aaron Conole Date: Tue Jun 25 13:22:43 2024 -0400 selftests: openvswitch: Support implicit ipv6 arguments. The current iteration of IPv6 support requires explicit fields to be set in addition to not properly support the actual IPv6 addresses properly. With this change, make it so that the ipv6() bare option is usable to create wildcarded flows to match broad swaths of ipv6 traffic. Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Aaron Conole Link: https://patch.msgid.link/20240625172245.233874-6-aconole@redhat.com Signed-off-by: Jakub Kicinski commit fefe3b7d6bec12a4018ea98469f569087d1d7980 Author: Aaron Conole Date: Tue Jun 25 13:22:42 2024 -0400 selftests: openvswitch: Add support for tunnel() key. This will be used when setting details about the tunnel to use as transport. There is a difference between the ODP format between tunnel(): the 'key' flag is not actually a flag field, so we don't support it in the same way that the vswitchd userspace supports displaying it. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Tested-by: Simon Horman Link: https://patch.msgid.link/20240625172245.233874-5-aconole@redhat.com Signed-off-by: Jakub Kicinski commit a4126f90a35f53c4bce1f18bde6e477fa4d81f85 Author: Aaron Conole Date: Tue Jun 25 13:22:41 2024 -0400 selftests: openvswitch: Add set() and set_masked() support. These will be used in upcoming commits to set specific attributes for interacting with tunnels. Since set() will use the key parsing routine, we also make sure to prepend it with an open paren, for the action parsing to properly understand it. Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Aaron Conole Link: https://patch.msgid.link/20240625172245.233874-4-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 37de65a764ed329408a7ce339ee6283a4a5b682c Author: Aaron Conole Date: Tue Jun 25 13:22:40 2024 -0400 selftests: openvswitch: Refactor actions parsing. Until recently, the ovs-dpctl utility was used with a limited actions set and didn't need to have support for multiple similar actions. However, when adding support for tunnels, it will be important to support multiple set() actions in a single flow. When printing these actions, the existing code will be unable to print all of the sets - it will only print the first. Refactor this code to be easier to read and support multiple actions of the same type in an action list. Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Aaron Conole Link: https://patch.msgid.link/20240625172245.233874-3-aconole@redhat.com Signed-off-by: Jakub Kicinski commit f94ecbc920925d5922d68a434f76aa8ef8d7f21e Author: Aaron Conole Date: Tue Jun 25 13:22:39 2024 -0400 selftests: openvswitch: Support explicit tunnel port creation. The OVS module can operate in conjunction with various types of tunnel ports. These are created as either explicit tunnel vport types, OR by creating a tunnel interface which acts as an anchor for the lightweight tunnel support. This patch adds the ability to add tunnel ports to an OVS datapath for testing various scenarios with tunnel ports. With this addition, the vswitch "plumbing" will at least be able to push packets around using the tunnel vports. Future patches will add support for setting required tunnel metadata for lwts in the datapath. The end goal will be to push packets via these tunnels, and will be used in an upcoming commit for testing the path MTU. Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Aaron Conole Link: https://patch.msgid.link/20240625172245.233874-2-aconole@redhat.com Signed-off-by: Jakub Kicinski commit d77b1befb18ac1fecfdde9110eb1400f0601ca93 Author: Vasyl Gomonovych Date: Fri May 17 14:29:10 2024 -0700 soc: ti: pm33xx: Fix missing newlines in log statements Add the missing newline characters to two pm33xx log statements to ensure proper log formatting. Signed-off-by: Vasyl Gomonovych Link: https://lore.kernel.org/r/20240517212930.2019962-1-gomonovych@gmail.com Signed-off-by: Nishanth Menon commit 43696b3a9e46cf622bfeb70856b9b1cfa5a9fb23 Author: Biju Das Date: Tue Jun 18 16:26:31 2024 +0100 rtc: isl1208: Update correct procedure for clearing alarm As per the latest HW manual[1], there is an internal delay(~250 microsec) from setting ALME = 0 to disabling the alarm function, so the user must add a short delay of greater than 250µs between setting ALME = 0 and clearing ALM. Currently setting of ALME = 0 is done after clearing the ALM, so just reverse the operation and add a delay of 275 microsec. [1]https://www.renesas.com/us/en/document/dst/raa215300-datasheet?r=1506351 Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20240618152635.48956-3-biju.das.jz@bp.renesas.com Signed-off-by: Alexandre Belloni commit 0dbd610c426ed695eef5d26584259d96b6250c76 Author: Biju Das Date: Tue Jun 18 16:26:30 2024 +0100 rtc: isl1208: Add a delay for clearing alarm As per the latest HW manual[1], the INT# output is pulled low after the alarm is triggered. After the INT# output is pulled low, it is low for at least 250ms, even if the correct action is taken to clear it. It is impossible to clear ALM if it is still active. The host must wait for the RTC to progress past the alarm time plus the 250ms delay before clearing ALM. [1]https://www.renesas.com/us/en/document/dst/raa215300-datasheet?r=1506351 Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20240618152635.48956-2-biju.das.jz@bp.renesas.com Signed-off-by: Alexandre Belloni commit 840ac611fbbec3a5dff37ee4fba6b2130eb6cc50 Author: Frank Li Date: Tue May 28 14:43:59 2024 -0400 dt-bindings: rtc: Convert rtc-fsl-ftm-alarm.txt to yaml format Convert dt-binding doc "rtc-fsl-ftm-alarm.txt" to yaml format. Change example's reg to 32bit address and length. Remove unrelated rcpm@1e34040 in example. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240528184359.2685109-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 86e9b5085d756aa05665248cc7eb503d5246a9d1 Author: Jeff Johnson Date: Sat Jun 8 22:52:03 2024 -0700 rtc: add missing MODULE_DESCRIPTION() macro On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/lib_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-goldfish.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-omap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-rc5t583.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-tps65910.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-twl.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes rtc-mpc5121.c, which does not produce a warning with the x86 allmodconfig since it is not built for x86, but it may cause this warning with Freescale PPC configurations. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240608-md-drivers-rtc-v1-1-5f44222adfae@quicinc.com Signed-off-by: Alexandre Belloni commit fc82336b50e7652530bc32caec80be0f8792513b Author: Joy Chakraborty Date: Thu Jun 13 12:07:50 2024 +0000 rtc: abx80x: Fix return value of nvmem callback on read Read callbacks registered with nvmem core expect 0 to be returned on success and a negative value to be returned on failure. abx80x_nvmem_xfer() on read calls i2c_smbus_read_i2c_block_data() which returns the number of bytes read on success as per its api description, this return value is handled as an error and returned to nvmem even on success. Fix to handle all possible values that would be returned by i2c_smbus_read_i2c_block_data(). Fixes: e90ff8ede777 ("rtc: abx80x: Add nvmem support") Cc: stable@vger.kernel.org Signed-off-by: Joy Chakraborty Reviewed-by: Dan Carpenter Reviewed-by: Sean Anderson Link: https://lore.kernel.org/r/20240613120750.1455209-1-joychakr@google.com Signed-off-by: Alexandre Belloni commit 1c184baccf0d5e2ef4cc1562261d0e48508a1c2b Author: Joy Chakraborty Date: Wed Jun 12 08:36:35 2024 +0000 rtc: cmos: Fix return value of nvmem callbacks Read/write callbacks registered with nvmem core expect 0 to be returned on success and a negative value to be returned on failure. cmos_nvram_read()/cmos_nvram_write() currently return the number of bytes read or written, fix to return 0 on success and -EIO incase number of bytes requested was not read or written. Fixes: 8b5b7958fd1c ("rtc: cmos: use generic nvmem") Cc: stable@vger.kernel.org Signed-off-by: Joy Chakraborty Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612083635.1253039-1-joychakr@google.com Signed-off-by: Alexandre Belloni commit 91fdc5e76513e280595279ef78d3170fbfb9d369 Merge: 275fee9dccf76 61bfcd190820d Author: Dave Airlie Date: Fri Jun 28 08:10:08 2024 +1000 Merge tag 'drm-misc-next-2024-06-27' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.11: UAPI Changes: Cross-subsystem Changes: Core Changes: - panic: Monochrome logo support, Various fixes - ttm: Improve the number of page faults on some platforms, Fix test build breakage with PREEMPT_RT, more test coverage and various test improvements Driver Changes: - Add missing MODULE_DESCRIPTION where needed - ipu-v3: Various fixes - vc4: Monochrome TV support - bridge: - analogix_dp: Various improvements and reworks, handle AUX transfers timeout - tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR, Fix clock calculations - panels: - More transitions to mipi_dsi wrapped functions - New panels: Lincoln Technologies LCD197, Ortustech COM35H3P70ULC, Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240627-congenial-pistachio-nyala-848cf4@houat commit 70f1ae5f0e7f44edf842444044615da7b59838c1 Author: Joy Chakraborty Date: Wed Jun 12 08:08:31 2024 +0000 rtc: isl1208: Fix return value of nvmem callbacks Read/write callbacks registered with nvmem core expect 0 to be returned on success and a negative value to be returned on failure. isl1208_nvmem_read()/isl1208_nvmem_write() currently return the number of bytes read/written on success, fix to return 0 on success and negative on failure. Fixes: c3544f6f51ed ("rtc: isl1208: Add new style nvmem support to driver") Cc: stable@vger.kernel.org Signed-off-by: Joy Chakraborty Link: https://lore.kernel.org/r/20240612080831.1227131-1-joychakr@google.com Signed-off-by: Alexandre Belloni commit c88014c7aa5c4cd39c3a5f4830f6fb525c730693 Author: Richard Genoud Date: Tue Jun 18 16:18:51 2024 +0200 rtc: tps6594: Add power management support Add power management support to the driver. This allows a SoC to wake from suspend using the nINT provided by the RTC. It takes care of the case when the interrupt has not been caught because the kernel has not yet woke up. (This is the case when only edges interrupt are caught) Signed-off-by: Richard Genoud Link: https://lore.kernel.org/r/20240618141851.1810000-4-richard.genoud@bootlin.com Signed-off-by: Alexandre Belloni commit 29bf97586f189c404c39fe32925c8aea79efbb24 Author: Richard Genoud Date: Tue Jun 18 16:18:50 2024 +0200 rtc: tps6594: introduce private structure as drvdata This patch will prepare for the next one (power management support) by introducing struct tps6594_rtc. No functionnal change. Signed-off-by: Richard Genoud Link: https://lore.kernel.org/r/20240618141851.1810000-3-richard.genoud@bootlin.com Signed-off-by: Alexandre Belloni commit 94d4154792abf30ee6081d35beaeef035816e294 Author: Richard Genoud Date: Tue Jun 18 16:18:49 2024 +0200 rtc: tps6594: Fix memleak in probe struct rtc_device is allocated twice in probe(), once with devm_kzalloc(), and then with devm_rtc_allocate_device(). The allocation with devm_kzalloc() is lost and superfluous. Fixes: 9f67c1e63976 ("rtc: tps6594: Add driver for TPS6594 RTC") Signed-off-by: Richard Genoud Link: https://lore.kernel.org/r/20240618141851.1810000-2-richard.genoud@bootlin.com Signed-off-by: Alexandre Belloni commit 3b85152cb167bd24fe84ceb91b719b5904ca354f Author: Nirmoy Das Date: Wed Jun 26 16:33:18 2024 +0200 drm/i915/gem: Suppress oom warning in favour of ENOMEM to userspace We report object allocation failures to userspace with ENOMEM so add __GFP_NOWARN to remove superfluous oom warnings. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4936 Cc: Andi Shyti Signed-off-by: Nirmoy Das Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240626143318.11600-1-nirmoy.das@intel.com commit 18048c1af7836b8e31739d9eaefebc2bf76261f7 Author: Gulam Mohamed Date: Tue Jun 18 16:40:42 2024 +0000 loop: Fix a race between loop detach and loop open 1. Userspace sends the command "losetup -d" which uses the open() call to open the device 2. Kernel receives the ioctl command "LOOP_CLR_FD" which calls the function loop_clr_fd() 3. If LOOP_CLR_FD is the first command received at the time, then the AUTOCLEAR flag is not set and deletion of the loop device proceeds ahead and scans the partitions (drop/add partitions) if (disk_openers(lo->lo_disk) > 1) { lo->lo_flags |= LO_FLAGS_AUTOCLEAR; loop_global_unlock(lo, true); return 0; } 4. Before scanning partitions, it will check to see if any partition of the loop device is currently opened 5. If any partition is opened, then it will return EBUSY: if (disk->open_partitions) return -EBUSY; 6. So, after receiving the "LOOP_CLR_FD" command and just before the above check for open_partitions, if any other command (like blkid) opens any partition of the loop device, then the partition scan will not proceed and EBUSY is returned as shown in above code 7. But in "__loop_clr_fd()", this EBUSY error is not propagated 8. We have noticed that this is causing the partitions of the loop to remain stale even after the loop device is detached resulting in the IO errors on the partitions Fix: Defer the detach of loop device to release function, which is called when the last close happens, by setting the lo_flags to LO_FLAGS_AUTOCLEAR at the time of detach i.e in loop_clr_fd() function. Test case involves the following two scripts: script1.sh: while [ 1 ]; do losetup -P -f /home/opt/looptest/test10.img blkid /dev/loop0p1 done script2.sh: while [ 1 ]; do losetup -d /dev/loop0 done Without fix, the following IO errors have been observed: kernel: __loop_clr_fd: partition scan of loop0 failed (rc=-16) kernel: I/O error, dev loop0, sector 20971392 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 kernel: I/O error, dev loop0, sector 108868 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 kernel: Buffer I/O error on dev loop0p1, logical block 27201, async page read Signed-off-by: Gulam Mohamed Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240618164042.343777-1-gulam.mohamed@oracle.com Signed-off-by: Jens Axboe commit 8262fe9a902c8a7b68c8521ebe18360a9145bada Author: Zhang Yi Date: Fri May 17 20:40:05 2024 +0800 ext4: make ext4_da_map_blocks() buffer_head unaware After calling the ext4_da_map_blocks(), a delalloc extent state could be identified through the EXT4_MAP_DELAYED flag in map. So factor out buffer_head related handles in ext4_da_map_blocks(), make this function buffer_head unaware and becomes a common helper, and also update the stale function commtents, preparing for the iomap da write path in the future. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-11-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1850d76c1b781ad9c7dc3c4968fb40c1915231c0 Author: Zhang Yi Date: Fri May 17 20:40:04 2024 +0800 ext4: make ext4_insert_delayed_block() insert multi-blocks Rename ext4_insert_delayed_block() to ext4_insert_delayed_blocks(), pass length parameter to make it insert multiple delalloc blocks at a time. For non-bigalloc case, just reserve len blocks and insert delalloc extent. For bigalloc case, we can ensure that the clusters in the middle of a extent must be unallocated, we only need to check whether the start and end clusters are delayed/allocated. We should subtract the space for the start and/or end block(s) if they are allocated. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-10-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 49bf6ab4d30b7a39d86a585e0a58f6c449d2e009 Author: Zhang Yi Date: Fri May 17 20:40:03 2024 +0800 ext4: factor out a helper to check the cluster allocation state Factor out a common helper ext4_clu_alloc_state(), check whether the cluster containing a delalloc block to be added has been allocated or has delalloc reservation, no logic changes. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-9-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 0d66b23d79c750276f791411d81a524549a64852 Author: Zhang Yi Date: Fri May 17 20:40:02 2024 +0800 ext4: make ext4_da_reserve_space() reserve multi-clusters Add 'nr_resv' parameter to ext4_da_reserve_space(), which indicates the number of clusters wants to reserve, make it reserve multiple clusters at a time. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-8-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 12eba993b94c9186e44a01f46e38b3ab3c635f2d Author: Zhang Yi Date: Fri May 17 20:40:01 2024 +0800 ext4: make ext4_es_insert_delayed_block() insert multi-blocks Rename ext4_es_insert_delayed_block() to ext4_es_insert_delayed_extent() and pass length parameter to make it insert multiple delalloc blocks at a time. For the case of bigalloc, split the allocated parameter to lclu_allocated and end_allocated. lclu_allocated indicates the allocation state of the cluster which is containing the lblk, end_allocated indicates the allocation state of the extent end, clusters in the middle of delay allocated extent must be unallocated. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-7-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit bb6b18057f18e9b7f53a524721060652de151e8a Author: Zhang Yi Date: Fri May 17 20:40:00 2024 +0800 ext4: drop iblock parameter The start block of the delalloc extent to be inserted is equal to map->m_lblk, just drop the duplicate iblock input parameter. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/20240517124005.347221-6-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 14a210c110d1ffbef4ed56e88e3c34de04790ff8 Author: Zhang Yi Date: Fri May 17 20:39:59 2024 +0800 ext4: trim delalloc extent In ext4_da_map_blocks(), we could find four kind of extents in the extent status tree: hole, unwritten, written and delayed extent. Now we only trim the map len if we found an unwritten extent or a written extent. This is okay now since map->m_len is always set to one and we always insert one delayed block at a time. But this will become isn't okay for other two cases if ext4_insert_delayed_block() and ext4_da_map_blocks() support inserting multiple map->len blocks later. 1. If we found a hole in the extent status tree which es->es_len is shorter than the length we want to write, we should trim the map->m_len to prevent adding extra delay more blocks than we expected. For example, assume we write data [A, C) to a file that contains a hole extent [A, B) and a written extent [B, D) in the cache. A B C D before da write: ...hhhhhh|wwwwww.... Then we will get extent [A, B), we should trim map->m_len to B-A before inserting new delalloc blocks, if not, the range [B, C) will be duplicated. 2. If we found a delayed extent in the extent status tree which es->es_len is shorter than the length we want to write, we should trim the map->m_len to es->es_len and return directly since the front part of this map has been delayed, we can't insert the delalloc extent that contains the latter part in this round, we should return the delayed length and the caller should increase the position and call ext4_da_map_blocks() again. For example, assume we write data [A, C) to a file that contains a delayed extent [A, B) in the cache. A B C before da write: ...dddddd|hhh.... Then we will get delayed extent [A, B), we should also trim map->m_len to B-A and return, if not, we will incorrectly assume that the write is complete and won't insert [B, C). So we need to always trim the map->m_len if the found es->es_len in the extent status tree is shorter than the map->m_len, prearing for inserting a extent with multiple delalloc blocks. This patch only does a pre-fix, the handle is crude and ext4_da_map_blocks() deserve a cleanup, we will do that later. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-5-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit b37c907073e80016333b442c845c3acc198e570f Author: Zhang Yi Date: Fri May 17 20:39:58 2024 +0800 ext4: warn if delalloc counters are not zero on inactive The per-inode i_reserved_data_blocks count the reserved delalloc blocks in a regular file, it should be zero when destroying the file. The per-fs s_dirtyclusters_counter count all reserved delalloc blocks in a filesystem, it also should be zero when umounting the filesystem. Now we have only an error message if the i_reserved_data_blocks is not zero, which is unable to be simply captured, so add WARN_ON_ONCE to make it more visable. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 0ea6560abb3bac1ffcfa4bf6b2c4d344fdc27b3c Author: Zhang Yi Date: Fri May 17 20:39:57 2024 +0800 ext4: check the extent status again before inserting delalloc block ext4_da_map_blocks looks up for any extent entry in the extent status tree (w/o i_data_sem) and then the looks up for any ondisk extent mapping (with i_data_sem in read mode). If it finds a hole in the extent status tree or if it couldn't find any entry at all, it then takes the i_data_sem in write mode to add a da entry into the extent status tree. This can actually race with page mkwrite & fallocate path. Note that this is ok between 1. ext4 buffered-write path v/s ext4_page_mkwrite(), because of the folio lock 2. ext4 buffered write path v/s ext4 fallocate because of the inode lock. But this can race between ext4_page_mkwrite() & ext4 fallocate path ext4_page_mkwrite() ext4_fallocate() block_page_mkwrite() ext4_da_map_blocks() //find hole in extent status tree ext4_alloc_file_blocks() ext4_map_blocks() //allocate block and unwritten extent ext4_insert_delayed_block() ext4_da_reserve_space() //reserve one more block ext4_es_insert_delayed_block() //drop unwritten extent and add delayed extent by mistake Then, the delalloc extent is wrong until writeback and the extra reserved block can't be released any more and it triggers below warning: EXT4-fs (pmem2): Inode 13 (00000000bbbd4d23): i_reserved_data_blocks(1) not cleared! Fix the problem by looking up extent status tree again while the i_data_sem is held in write mode. If it still can't find any entry, then we insert a new da entry into the extent status tree. Cc: stable@vger.kernel.org Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240517124005.347221-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 8e4e5cdf2fdeb99445a468b6b6436ad79b9ecb30 Author: Zhang Yi Date: Fri May 17 20:39:56 2024 +0800 ext4: factor out a common helper to query extent map Factor out a new common helper ext4_map_query_blocks() from the ext4_da_map_blocks(), it query and return the extent map status on the inode's extent path, no logic changes. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/20240517124005.347221-2-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 346a03e5fbdb868c5d36052b82bb8eacd1cb83b7 Author: Jeff Johnson Date: Tue Jun 25 09:35:41 2024 -0700 s390/lcs: add missing MODULE_DESCRIPTION() macro With ARCH=s390, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/net/lcs.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Alexandra Winter Link: https://patch.msgid.link/20240625-md-s390-drivers-s390-net-v2-1-5a8a2b2f2ae3@quicinc.com Signed-off-by: Jakub Kicinski commit 15eb8573ad72a97b8f70e3c88b9bef6ddc861f77 Author: Mario Limonciello Date: Tue Jun 18 11:43:05 2024 -0500 drm/amd: Don't initialize ISP hardware without FW Although designs may contain an ISP IP block, the camera might be a USB camera. Because of this the ISP firmware is considered optional from amdgpu. However if the firmware doesn't get loaded the hardware should not be initialized. Adjust the return code for early init to ensure the IP block doesn't go through the other init and fini sequences. Also decrease the message about firmware load failure to debug so it's not as alarming to users. Acked-by: Alex Deucher Reviewed-by: Pratap Nirujogi Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 71fe4494847f03dda3932417769418c02431615c Author: Yang Wang Date: Thu May 30 22:48:34 2024 +0800 drm/amdgpu: refine isp firmware loading refine isp firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 75be61aa77feb09f829104fa74b359bee74f0363 Author: Pratap Nirujogi Date: Tue May 28 15:21:44 2024 -0400 drm/amd/amdgpu: Enable MMHUB prefetch for ISP v4.1.0 and 4.1.1 Remove temporary WA to disable ISP prefetch as MMHUB SAW is initialized to support ISP HW access GART memory using the TLSi path with prefetch enabled. Signed-off-by: Pratap Nirujogi Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 7c2d3112b212c9eb64dad7b28a8b1a4a7ad03062 Author: Pratap Nirujogi Date: Mon May 27 15:05:47 2024 -0400 drm/amd/amdgpu: Fix 'snprintf' output truncation warning snprintf can truncate the output fw filename if the isp ucode_prefix exceeds 29 characters. Knowing ISP ucode_prefix is in the format isp_x_x_x, limiting the size of ucode_prefix[] to 10 characters to fix the warning. Fixes the below warning: drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c: In function 'isp_early_init': drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c:192:58: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=] 192 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix); | ^ In function 'isp_load_fw_by_psp', inlined from 'isp_early_init' at drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c:218:8: drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c:192:9: note: 'snprintf' output between 12 and 41 bytes into a destination of size 40 192 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit 062666ffbc80e15154315550d2aa171c23e76c61 Author: Pratap Nirujogi Date: Thu May 16 02:39:14 2024 -0400 drm/amd/amdgpu: Disable MMHUB prefetch for ISP v4.1.1 Disable MMHUB prefetch for ISP v4.1.1 as a temporary WA until the GART supports MMHUB TLSi and SAW for ISP HW to access GART memory using the TLSi path. Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit 05bafe95e580587ff5febf8ce242fa2f401a1f17 Author: Pratap Nirujogi Date: Fri May 17 00:39:48 2024 -0400 drm/amd/amdgpu: Add ISP4.1.0 and ISP4.1.1 modules Add independent IP centric modules for ISP4.1.0 and ISP4.1.1 hw blocks. Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit 0253d718a070ba109046299847fe8f3cf7568c3c Author: Pratap Nirujogi Date: Tue May 7 22:49:46 2024 -0400 drm/amd/amdgpu: Map ISP interrupts as generic IRQs Map ISP IH interrupts to Linux generic IRQ for ISP driver to handle the interrupts using MFD IORESOURCE_IRQ resource. Reviewed-by: Alex Deucher Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit 8930b90be637972ccbc683887353e71c52a918d9 Author: Alex Deucher Date: Tue May 14 16:45:45 2024 -0400 drm/amdgpu: fix Kconfig for ISP v2 Add new config option and set proper dependencies for ISP. v2: add missed guards, drop separate Kconfig Reviewed-by: Pratap Nirujogi Signed-off-by: Alex Deucher Cc: Pratap Nirujogi commit d232584ae369f13fea6b904cd7486357d5367ea5 Author: Pratap Nirujogi Date: Thu May 2 19:05:57 2024 -0400 drm/amd/amdgpu: Enable ISP in amdgpu_discovery Enable ISP for ISP V4.1.0 and V4.1.1 in amdgpu_discovery. Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit 8fcbfd53ead3d5faf8c79b7179aa1caecd44384c Author: Pratap Nirujogi Date: Thu May 2 18:54:05 2024 -0400 drm/amd/amdgpu: Add ISP driver support Add the isp driver in amdgpu to support ISP device on the APUs that supports ISP IP block. ISP hw block is used for camera front-end, pre and post processing operations. Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit 772e4d56dab5448eb120f74811eaa71d7a474c1f Author: Pratap Nirujogi Date: Thu May 2 16:51:39 2024 -0400 drm/amd/amdgpu: Add ISP support to amdgpu_discovery ISP hw block is supported in some of the AMD GPU versions, add support to discover ISP IP in amdgpu_discovery. v2: squash in documentation update (Alex) Reviewed-by: Mario Limonciello Signed-off-by: Pratap Nirujogi Signed-off-by: Alex Deucher commit d4b8386c86800bd9616dcfc82724243609c01c55 Author: Sonny Jiang Date: Tue Jun 18 14:37:05 2024 -0400 drm/amdgpu/jpeg5: Add support for DPG mode Add DPG support for JPEG 5.0 Signed-off-by: Sonny Jiang Acked-by: Saleemkhan Jamadar Reviewed-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 291af3f59849c54aba2d96256680a5d4688f97f3 Author: Frank Min Date: Mon May 13 20:51:18 2024 +0800 drm/amdgpu: tolerate allocating GTT bo with dcc flag Do not return failure for allocating GTT bo with dcc flag on gfx12. This will improve compatibility for UMD. Signed-off-by: Frank Min Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ecbf60782662f0a388493685b85a645a0ba1613c Author: Aurabindo Pillai Date: Wed Jun 26 13:13:57 2024 -0400 drm/amd/display: Fix null pointer deref in dcn20_resource.c Fixes a hang thats triggered when MPV is run on a DCN401 dGPU: mpv --hwdec=vaapi --vo=gpu --hwdec-codecs=all and then enabling fullscreen playback (double click on the video) The following calltrace will be seen: [ 181.843989] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 181.843997] #PF: supervisor instruction fetch in kernel mode [ 181.844003] #PF: error_code(0x0010) - not-present page [ 181.844009] PGD 0 P4D 0 [ 181.844020] Oops: 0010 [#1] PREEMPT SMP NOPTI [ 181.844028] CPU: 6 PID: 1892 Comm: gnome-shell Tainted: G W OE 6.5.0-41-generic #41~22.04.2-Ubuntu [ 181.844038] Hardware name: System manufacturer System Product Name/CROSSHAIR VI HERO, BIOS 6302 10/23/2018 [ 181.844044] RIP: 0010:0x0 [ 181.844079] Code: Unable to access opcode bytes at 0xffffffffffffffd6. [ 181.844084] RSP: 0018:ffffb593c2b8f7b0 EFLAGS: 00010246 [ 181.844093] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000004 [ 181.844099] RDX: ffffb593c2b8f804 RSI: ffffb593c2b8f7e0 RDI: ffff9e3c8e758400 [ 181.844105] RBP: ffffb593c2b8f7b8 R08: ffffb593c2b8f9c8 R09: ffffb593c2b8f96c [ 181.844110] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb593c2b8f9c8 [ 181.844115] R13: 0000000000000001 R14: ffff9e3c88000000 R15: 0000000000000005 [ 181.844121] FS: 00007c6e323bb5c0(0000) GS:ffff9e3f85f80000(0000) knlGS:0000000000000000 [ 181.844128] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 181.844134] CR2: ffffffffffffffd6 CR3: 0000000140fbe000 CR4: 00000000003506e0 [ 181.844141] Call Trace: [ 181.844146] [ 181.844153] ? show_regs+0x6d/0x80 [ 181.844167] ? __die+0x24/0x80 [ 181.844179] ? page_fault_oops+0x99/0x1b0 [ 181.844192] ? do_user_addr_fault+0x31d/0x6b0 [ 181.844204] ? exc_page_fault+0x83/0x1b0 [ 181.844216] ? asm_exc_page_fault+0x27/0x30 [ 181.844237] dcn20_get_dcc_compression_cap+0x23/0x30 [amdgpu] [ 181.845115] amdgpu_dm_plane_validate_dcc.constprop.0+0xe5/0x180 [amdgpu] [ 181.845985] amdgpu_dm_plane_fill_plane_buffer_attributes+0x300/0x580 [amdgpu] [ 181.846848] fill_dc_plane_info_and_addr+0x258/0x350 [amdgpu] [ 181.847734] fill_dc_plane_attributes+0x162/0x350 [amdgpu] [ 181.848748] dm_update_plane_state.constprop.0+0x4e3/0x6b0 [amdgpu] [ 181.849791] ? dm_update_plane_state.constprop.0+0x4e3/0x6b0 [amdgpu] [ 181.850840] amdgpu_dm_atomic_check+0xdfe/0x1760 [amdgpu] Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c96140000915b610d86f941450e15ca552de154a Author: Ma Ke Date: Wed Jun 26 21:06:50 2024 +0800 drm/amd/display: Add null check before access structs In enable_phantom_plane, we should better check null pointer before accessing various structs. Fixes: 09a4ec5da92c ("drm/amd/display: Refactor dc_state interface") Signed-off-by: Ma Ke Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit b17eecc08fba0c1d256f9a78fe13e5e568fe7081 Author: Jane Jian Date: Tue Jun 25 19:37:43 2024 +0800 drm/amdgpu: normalize registers as local xcc to read/write in gfx_v9_4_3 [WHY] sriov has the higher bit violation when flushing tlb [HOW] normalize the registers to keep lower 16-bit(dword aligned) to aviod higher bit violation RLCG will mask xcd out and always assume it's accessing its own xcd v2 add check in wait mem that only do the normalization on regspace Signed-off-by: Jane Jian Reviewed-by: Lijo Lazar Acked-by: Christian König Acked-by: Yiqing Yao Signed-off-by: Alex Deucher commit ad89e904e3aaa93628785546034ec77f3100cf79 Author: Aurabindo Pillai Date: Tue Jun 25 14:17:46 2024 -0400 drm/amd: Add some missing register definitions Add some register offsets that are required for Display DCC on DCN401 Fixes: 2d072b445622 ("drm/amd: Add reg definitions for DCN401 DCC") Reported-by: Tom St Denis Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f852c9795c80361c4193ff02367c3390ebace7d9 Author: YiPeng Chai Date: Mon Jun 24 11:38:27 2024 +0800 drm/amdgpu: add gpu reset check and exception handling Add gpu reset check and exception handling for page retirement. v2: Clear poison consumption messages cached in fifo after non mode-1 reset. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e278849cb2b663bca7dd67ba5d531ecb5b4557df Author: YiPeng Chai Date: Mon Jun 24 11:33:19 2024 +0800 drm/amdgpu: refine poison consumption interrupt handler 1. The poison fifo is only used for poison consumption requests. 2. Merge reset requests when poison fifo caches multiple poison consumption messages Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5f08275cfd88609c86ee86d92efdb196d27c732d Author: YiPeng Chai Date: Mon Jun 24 11:26:00 2024 +0800 drm/amdgpu: refine poison creation interrupt handler In order to apply to the case where a large number of ras poison interrupts: 1. Change to use variable to record poison creation requests to avoid fifo full. 2. Prioritize handling poison creation requests instead of following the order of requests received by the driver. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cbda2758d8bfae323b846210a3e52f0ad5fe7164 Author: Vignesh Chander Date: Mon Jun 24 16:44:26 2024 -0500 drm/amdgpu: process RAS fatal error MB notification For RAS error scenario, VF guest driver will check mailbox and set fed flag to avoid unnecessary HW accesses. additionally, poll for reset completion message first to avoid accidentally spamming multiple reset requests to host. v2: add another mailbox check for handling case where kfd detects timeout first v3: set host_flr bit and use wait_for_reset Signed-off-by: Vignesh Chander Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 78146c1dcd220ae98fd5f4114f992299fc5ee161 Author: YiPeng Chai Date: Mon Jun 24 11:21:06 2024 +0800 drm/amdgpu: add variable to record the deferred error number read by driver Add variable to record the deferred error number read by driver. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 29b6985de50b6bf4de77aa680b875a4362d7b30d Author: Vignesh Chander Date: Sun Jun 16 16:22:10 2024 -0500 drm/amdgpu: Use dev_ prints for virtualization as it supports multi adapter So we can get clearer per device logging. Signed-off-by: Vignesh Chander Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit afbf7955ff01e952dbdd465fa25a2ba92d00291c Author: Danijel Slivka Date: Mon Jun 24 07:58:24 2024 +0200 drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts Why: Setting IH_RB_WPTR register to 0 will not clear the RB_OVERFLOW bit if RB_ENABLE is not set. How to fix: Set WPTR_OVERFLOW_CLEAR bit after RB_ENABLE bit is set. The RB_ENABLE bit is required to be set, together with WPTR_OVERFLOW_ENABLE bit so that setting WPTR_OVERFLOW_CLEAR bit would clear the RB_OVERFLOW. Signed-off-by: Danijel Slivka Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2a901623f0056ccdb64dbfd3d98f9072f704f065 Author: Jakub Kicinski Date: Wed Jun 26 13:12:34 2024 -0700 tools: ynl: use display hints for formatting of scalar attrs Use display hints for formatting scalar attrs. This is specifically useful for formatting IPv4 addresses carried typically as u32. Reviewed-by: Donald Hunter Link: https://patch.msgid.link/20240626201234.2572964-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit fd513b922e34edb0db1284a4abee7f6c10ffd9a7 Author: Venkata Prahlad Valluru Date: Tue May 28 19:49:54 2024 +0530 arm64: dts: qcom: qcs6490-rb3gen2: enable hdmi bridge Rb3Gen2 has a lt9611uxc DSI-to-HDMI bridge on i2c0, with reset gpio from pm7250b gpio2 and irq gpio from tlmm gpio24. Bridge supplies are Vdd connected to input supply directly and vcc to L11c. Enable HDMI output, bridge and corresponding DSI output. Signed-off-by: Venkata Prahlad Valluru Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240528141954.7567-1-quic_vvalluru@quicinc.com Signed-off-by: Bjorn Andersson commit bf826ba9b4b17fb2bff507b8391a8e4babd227fa Author: Kenneth Feng Date: Wed Jun 19 14:10:59 2024 +0800 Revert "drm/amd/amdgpu: add module parameter for jpeg" This reverts commit d3620eeae82cccf8316e6754f8ddb52473e2e5ea. Revert this due to a final solution: commit ed3165d660d8 ("drm/amdgpu/jpeg5: reprogram doorbell setting after power up for each playback") Signed-off-by: Kenneth Feng Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit 82c006509750351631738de6aa7e71d51e4d7a18 Author: Mario Limonciello Date: Mon Jun 24 14:14:44 2024 -0500 Documentation/amdgpu: Add Ryzen 9000 series processors These have been announced so add them to the table. Acked-by: Alex Deucher Link: https://www.amd.com/en/products/processors/desktops/ryzen/9000-series/amd-ryzen-9-9950x.html Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 0b5f9e91ae39586aeeadddf51d0357d76ee5e49a Author: Mario Limonciello Date: Mon Jun 24 14:12:57 2024 -0500 Documentation/amdgpu: Add Ryzen AI 300 series processors These have been announced so add them to the table. Acked-by: Alex Deucher Link: https://www.amd.com/en/products/processors/laptop/ryzen/300-series/amd-ryzen-ai-9-hx-370.html Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit e97db6d9f068098b35ff1f37db89826c77ea037e Author: Jiapeng Chong Date: Mon Jun 24 09:57:07 2024 +0800 drm/amd/display: use swap() in is_config_schedulable() Use existing swap() function rather than duplicating its implementation. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c:1171:103-104: WARNING opportunity for swap(). ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c:1231:99-100: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9400 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 68936346b67d8a4605d8b66f0d345d6bb1f95f4d Author: Jiapeng Chong Date: Mon Jun 24 10:22:25 2024 +0800 drm/amd/display: Remove unused function reverse_planes_order The function are defined in the amdgpu_dm.c file, but not called anywhere, so delete the unused function. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:371:20: warning: unused function 'reverse_planes_order'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9402 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit b72585f1c2228630e5fc5bf1b8a1f68cdcd8a446 Author: Jiapeng Chong Date: Mon Jun 24 11:11:58 2024 +0800 drm/amd/display: Use ARRAY_SIZE for array length Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c:164:45-46: WARNING: Use ARRAY_SIZE. ./drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c:183:47-48: WARNING: Use ARRAY_SIZE. ./drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c:237:45-46: WARNING: Use ARRAY_SIZE. ./drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c:257:47-48: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9405 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 429508c84d95811dd1300181dfe84743caff9a38 Author: Alex Deucher Date: Mon Jun 24 09:54:37 2024 -0400 drm/amd/display: Fix Makefile copyright notices Leftover copy pasta from original code. Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher Cc: Harry.Wentland@amd.com commit fe86c4d1a24e0a09688110d217576347b162df99 Author: Lijo Lazar Date: Mon Jun 3 12:12:18 2024 +0530 drm/amdgpu: Don't show false warning for reg list If reg list is already loaded on PSP 13.0.2 SOCs, psp will give TEE_ERR_CANCEL response on second time load. Avoid printing warn message for it. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 79ea35c7d84b73733ee5281a089168e71d0168d7 Author: Julia Zhang Date: Mon Jun 3 19:31:09 2024 +0800 drm/amdgpu: avoid using null object of framebuffer Instead of using state->fb->obj[0] directly, get object from framebuffer by calling drm_gem_fb_get_obj() and return error code when object is null to avoid using null object of framebuffer. Reported-by: Fusheng Huang Signed-off-by: Julia Zhang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bdbdc7cecd00305dc844a361f9883d3a21022027 Author: Hawking Zhang Date: Fri Jun 21 17:53:30 2024 +0800 drm/amdgpu: Fix smatch static checker warning adev->gfx.imu.funcs could be NULL Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 9ff2e14cf013fa887e269bdc5ea3cffacada8635 Author: Bob Zhou Date: Thu Jun 20 15:40:06 2024 +0800 drm/amdgpu: add missing error handling in function amdgpu_gmc_flush_gpu_tlb_pasid Fix the unchecked return value warning reported by Coverity, so add error handling. Signed-off-by: Bob Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 94534f41fdf1ff1eb6c98e2e3e24d90fc5a99d04 Author: Aric Cyr Date: Sun Jun 16 17:41:14 2024 -0400 drm/amd/display: 3.2.290 This version brings along the following: - Enable DCC on DCN401 - Add reg definitions for DCN401 DCC - Remove duplicate null check - Remove always true condition - Validate function returns - Ensure curve to hw translation succeed - Use periodic detection for ipx/headless - Fix 1DLUT setting for NL SDR blending - Adjust reg field for DSC wait for disconnect - Remove a redundant check in authenticated_dp - Add HW cursor visual confirm - Fix cursor issues with ODMs and magnification - Wait for double buffer update on ODM changes - Reset DSC memory status - Program CURSOR_DST_X_OFFSET in viewport space - Add null checks before accessing struct elements - Fix reduced resolution and refresh rate - Make DML2.1 P-State method force per stream - Add workaround to restrict max frac urgent for DPM0 - Call dpmm when checking mode support - resync OTG after DIO FIFO resync - Always enable HPO for DCN4 dGPU - Use sw cursor for DCN401 with rotation - Add Replay general cmd - Check HDCP returned status - Check and log for function error codes - Check and log for function error codes - Remove useless function call - Fix uninitialized variables in dcn401 - Fix cursor size issues - Run DC_LOG_DC after checking link->link_enc - Remove redundant checks for pipe_ctx->stream - Send DP_TOTAL_LTTPR_CNT during detection if LTTPR is present - Fix cursor issues with ODMs and HW rotations - Remove unnecessary variable - Remove redundant var from display_rq_dig_calc in dml - Refactor dccg401_get_other_enable_symclk_fe Acked-by: Alex Hung Signed-off-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 78f608d7aff05c245bf0aab00ce7273a7d9f04b9 Author: Aurabindo Pillai Date: Fri Jun 14 15:44:12 2024 -0400 drm/amd/display: Enable DCC on DCN401 [WHAT] Add registers and entry points to enable DCC on DCN4x Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2d072b445622b90f8a961c0376887120da75221f Author: Aurabindo Pillai Date: Fri Jun 14 15:42:55 2024 -0400 drm/amd: Add reg definitions for DCN401 DCC [WHAT] Add the necessary register definitions to enable DCC on DCN4x Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bc180e26837ec238d05d7c7ac05d73ee35dc1076 Author: Alex Hung Date: Fri Jun 14 19:06:59 2024 -0600 drm/amd/display: Remove duplicate null check [WHAT & HOW] The same display null check was a few lines above. This fixes 1 DEADCODE issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4de670dcdef04feee864a110dd6c1737f29f6dd0 Author: Alex Hung Date: Fri Jun 14 19:10:40 2024 -0600 drm/amd/display: Remove always true condition [WHAT & HOW] advanced_pstate_switching was initialized to false and never assigned to another value; as a result !advanced_pstate_switching is always true and should be removed. This fixes 2 DEADCODE issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 673f816b9e1e92d1f70e1bf5f21b531e0ff9ad6c Author: Alex Hung Date: Tue Jun 11 11:45:42 2024 -0600 drm/amd/display: Validate function returns [WHAT & HOW] Function return values must be checked before data can be used in subsequent functions. This fixes 4 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c53bb80f49a7cea933ccb4b7a458e6983820e9a5 Author: Alex Hung Date: Tue Jun 11 10:43:12 2024 -0600 drm/amd/display: Ensure curve to hw translation succeed [WHAT & HOW] Check cm3_helper_translate_curve_to_hw_format runs successfully so the regamma_params is valid and can be used. Also revmoed two result assignments. This fixes 2 CHECKED_RETURN UNUSED_VALUE issues reported by Coverity. Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9862ef7bae47b9292a38a0a1b30bff7f56d7815b Author: Roman Li Date: Thu Jun 13 10:41:51 2024 -0400 drm/amd/display: Use periodic detection for ipx/headless [WHY] Hotplug is not detected in headless (no eDP) mode on dcn35x. With no display dcn35x goes to IPS2 powersaving state where HPD interrupt is not handled. [HOW] Use idle worker thread for periodic detection of HPD in headless mode. Reviewed-by: Aurabindo Pillai Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 58acedd7849a238d2d06430b030b365cf069cca8 Author: Relja Vojvodic Date: Fri Jun 14 16:49:44 2024 -0400 drm/amd/display: Fix 1DLUT setting for NL SDR blending [WHY] Enabling NL SDR blending caused the 1D LUTs to be set/populated in two different functions. This caused flickering as the LUT was set differently by the two functions, one of which should only have been modifying the 1D LUT if 3D LUT was enabled. [HOW] Added check to only modify the 1D LUT in populate_mcm if 3D LUT was enabled. Added blend_tf function update for non-main planes if the 3D LUT path was taken. Reviewed-by: Ilya Bakoulin Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Relja Vojvodic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 569d7db70e5dcf13fbf072f10e9096577ac1e565 Author: Ryan Seto Date: Fri Jun 14 14:56:15 2024 -0400 drm/amd/display: Adjust reg field for DSC wait for disconnect [WHY] DSC was waiting for the wrong field to disconnect cleanly. [HOW] Changed field the DSC disconnect was waiting on. Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Ryan Seto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4b22869f76563ce1e10858d2ae3305affa8d4a6a Author: Wenjing Liu Date: Fri Jun 14 11:01:59 2024 -0400 drm/amd/display: Remove a redundant check in authenticated_dp [WHY] mod_hdcp_execute_and_set returns (*status == MOD_HDCP_STATUS_SUCCESS). When it return 0, it is guaranteed that status == MOD_HDCP_STATUS_SUCCESS will be evaluated as false. Since now we are using goto out already, all 3 if (status == MOD_HDCP_STATUS_SUCCESS) clauses are guaranteed to enter. Therefore we are removing the if statements due to redundancy. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0b8de7a04f7c14abd28bd8b9f3e1e5737a3702e2 Author: Ryan Seto Date: Fri Jun 14 14:23:41 2024 -0400 drm/amd/display: Add HW cursor visual confirm [WHY] Added HW cursor visual confirm [HOW] Added visual confirm logic when programming cursor positions. HW is programmed on cursor updates since cursor can change without flips. Reviewed-by: Alvin Lee Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Ryan Seto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit adcd67e0bbea5fb504d6de50e5ccf74ebf96bc29 Author: Nevenko Stupar Date: Thu Jun 13 17:19:42 2024 -0400 drm/amd/display: Fix cursor issues with ODMs and magnification [WHY & HOW] Adjust hot spot positions between ODM slices when cursor magnification is used. Reviewed-by: Sridevi Arvindekar Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4228900a64592f9c5d4f3b3d48d158948b08ec98 Author: Alvin Lee Date: Mon Jun 10 12:34:25 2024 -0400 drm/amd/display: Wait for double buffer update on ODM changes [WHAT & HOW] We must wait for ODM double buffer updates to complete before exiting the pipe update sequence or we may reduce DISPCLK and hit some transient underflow (pixel rate is reduced before the pipes have ODM enabled). Reviewed-by: Samson Tam Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7210195f1bc51ba02cffa45b27ddb5c962faa606 Author: Duncan Ma Date: Mon May 27 16:59:59 2024 -0400 drm/amd/display: Reset DSC memory status [WHY] When system exits idle state followed by enabling the display, DSC memory may still be forced in a deep sleep or shutdown state. Intermittent DSC corruption is seen when display is visible. [HOW] When DSC is enabled, reset dsc memory to force and disable status. Reviewed-by: Nicholas Kazlauskas Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e1e75cf7334c0e31f4c37d715b964784d45685fa Author: Alvin Lee Date: Thu Jun 13 16:10:16 2024 -0400 drm/amd/display: Program CURSOR_DST_X_OFFSET in viewport space [WHAT & HOW] According to register specifications, the CURSOR_DST_X_OFFSET is relative to the start of the data viewport, not RECOUT space. In this case we must transform the cursor coordinates passed to hubp401_cursor_set_position into viewport space to program this register. This fixes an underflow issue that occurs in scaled mode with low refresh rate. Reviewed-by: Nevenko Stupar Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e1f4805bcc6b39e1c249777c237e419705266234 Author: Alex Hung Date: Thu Jun 6 15:42:36 2024 -0600 drm/amd/display: Add null checks before accessing struct elements [WHAT] 1. is_pwrseq0 needs to check link before accessing link->link_index. 2. context is checked before accessing its bw_ctx.dml2 3. clk_mgr_base->bw_params is checked before clk_table.num_entries_per_cl This fixes 4 REVERSE_INULL issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0dd1190faff7f7b389291266e118deb381b6c8d9 Author: Daniel Sa Date: Thu Jun 13 15:38:06 2024 -0400 drm/amd/display: Fix reduced resolution and refresh rate [WHY] Some monitors are forced to a lower resolution and refresh rate after system restarts. [HOW] Some monitors may give invalid LTTPR information when queried such as indicating they have one DP lane instead of 4. If given an invalid DPCD version, skip over getting lttpr link rate and lane counts. Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Daniel Sa Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 020fccbe8fe7552e57804bba0c7578d227f561c2 Author: Dillon Varone Date: Thu Jun 13 12:08:16 2024 -0400 drm/amd/display: Make DML2.1 P-State method force per stream [WHY & HOW] Currently the force only works for a single display, make it so it can be forced per stream. Reviewed-by: Alvin Lee Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 871512e36f9c1c2cb4e62eb860ca0438800e4d63 Author: Sung-huai Wang Date: Thu Jun 13 15:22:17 2024 +0800 drm/amd/display: Add workaround to restrict max frac urgent for DPM0 [WHY] Underflow occurs on some platforms when urgent BW is close to the maximum in DPM0. [HOW] It does not occur at DPM1, so as a workaround restrict the maximum amount and increase the lowest state index for clock states until we're out of DPM0. Adds DML2 config options to specify this pe platform as required. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Hung Signed-off-by: Sung-huai Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a42e74391783603b28f266fc7bbfc1011eb0a151 Author: George Shen Date: Tue Jun 4 10:11:23 2024 -0400 drm/amd/display: Call dpmm when checking mode support [WHY] In check_mode_supported, we should validate that the required clocks can be successfully mapped to DPM levels. This ensures we only apply dynamic ODM optimizations to modes that are supported without dynamic ODM optimizations to begin with. [HOW] Call dpmm to check that the display config can successfully be mapped to a DPM level. Reviewed-by: Chaitanya Dhere Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f86b47bee6343c9f74630d7fc2fb8f5e41db0440 Author: TungYu Lu Date: Wed Jun 12 22:34:33 2024 +0800 drm/amd/display: resync OTG after DIO FIFO resync [WHY] Tiled displays showed not aligned on 8K60hz when system resumed from S3/S4. [HOW] Do dc_trigger_sync to re-sync pipes to ensure OTG become synced. Reviewed-by: Alvin Lee Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: TungYu Lu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a4758aa3d1d9ff1c7a05da58387d217c2cd0c38b Author: Leo (Hanghong) Ma Date: Tue Jun 11 14:12:43 2024 -0400 drm/amd/display: Always enable HPO for DCN4 dGPU [WHY && HOW] Some DP EDID CTS tests fail due to HPO disable, and we should keep it enable on DCN4 dGPU. Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Leo (Hanghong) Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2ffa97c50a8b0598975e47c890032e71958425a0 Author: Aurabindo Pillai Date: Mon Jun 10 18:22:59 2024 +0000 drm/amd/display: Use sw cursor for DCN401 with rotation [WHAT & HOW] On DCN401, the cursor composition to the plane happens after scaler. So the cursor isn't stretched with the rest of the surface. Temporarily disable hardware cursor in case when hardware rotation is enabled such that userspace falls back to software cursor. Reviewed-by: Sun peng Li Reviewed-by: Rodrigo Siqueira Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e5a290fa5df4efdc026ff36fe86d53c58d944fe6 Author: Joan Lee Date: Wed Jun 12 10:12:52 2024 +0800 drm/amd/display: Add Replay general cmd [WHY & HOW] Driver side adding replay general cmd interface. Replay general command will config at most two uint_32 parameters, with a replay general command subtype to set relative configurations. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Hung Signed-off-by: Joan Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5d93060d430b359e16e7c555c8f151ead1ac614b Author: Alex Hung Date: Tue Jun 11 10:36:49 2024 -0600 drm/amd/display: Check HDCP returned status [WHAT & HOW] Check mod_hdcp_execute_and_set() return values in authenticated_dp. This fixes 3 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2c2ee1d1329881d8e6bb23c3b9f3b41df8a8055c Author: Alex Hung Date: Tue Jun 11 10:51:31 2024 -0600 drm/amd/display: Check and log for function error codes [WHAT & HOW] dm_dmub_hw_init and drm_dp_mst_topology_mgr_set_mst can return error codes and errors should be reported. This fixes 2 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a171cce57792b0a6206d532050179a381ad74f8f Author: Alex Hung Date: Tue Jun 11 11:41:32 2024 -0600 drm/amd/display: Check and log for function error codes [WHAT & HOW] BIOS_CMD_TABLE_REVISION and link_transmitter_control can return error codes and errors should be reported. This fixes 3 CHECKED_RETURN issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e094992bd1caa1fbd42221c7c305fc3b54172b5c Author: Alex Hung Date: Tue Jun 11 10:47:35 2024 -0600 drm/amd/display: Remove useless function call [WHAT & HOW] clk_mgr_helper_get_active_display_cnt returns display count and itself alone has no use. This fixes 1 CHECKED_RETURN issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3bc73bc096e64752961060cdf9d460e0a6bb0e6b Author: Alex Hung Date: Fri Jun 7 20:03:31 2024 -0600 drm/amd/display: Fix uninitialized variables in dcn401 [WHAT & HOW] surf_linear_128_l/c are used in CalculateBytePerPixelAndBlockSizes before they are assigned, so initializing them before passing them into the function. This fixes 2 UNINIT issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 51dbe0239b1fc7c435867ce28e5eb4394b6641e1 Author: Nevenko Stupar Date: Tue Jun 11 12:31:38 2024 -0400 drm/amd/display: Fix cursor size issues [WHY & HOW] Fix the cursor size between ODM slices. Reviewed-by: Sridevi Arvindekar Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3a82f62b0d9d7687eac47603bb6cd14a50fa718b Author: Alex Hung Date: Fri Jun 7 09:21:30 2024 -0600 drm/amd/display: Run DC_LOG_DC after checking link->link_enc [WHAT] The DC_LOG_DC should be run after link->link_enc is checked, not before. This fixes 1 REVERSE_INULL issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cd80e7ee47d2fd5c97563c003ff31ce8240ca2d8 Author: Alex Hung Date: Thu Jun 6 14:43:36 2024 -0600 drm/amd/display: Remove redundant checks for pipe_ctx->stream [WHAT & HOW] The null checks for pipe_ctx->stream and pipe_ctx->stream_res.tg are redundant as they were already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 6 REVERSE_INULL issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d03415f60b3401914fabd27a20017f8056fd5e40 Author: Michael Strauss Date: Tue Nov 28 10:31:12 2023 -0500 drm/amd/display: Send DP_TOTAL_LTTPR_CNT during detection if LTTPR is present [WHY] New register field added in DP2.1 SCR, needed for auxless ALPM [HOW] Echo value read from 0xF0007 back to sink Reviewed-by: Wenjing Liu Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Alex Hung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ee8287e068a3995b0f8001dd6931e221dfb7c530 Author: Nevenko Stupar Date: Mon Jun 10 15:32:05 2024 -0400 drm/amd/display: Fix cursor issues with ODMs and HW rotations [WHY & HOW] Current code for cursor positions does not work properly with different ODM options and HW rotations like ODM 2to1, 3to1 and 4to1, and has different issues depending on angle of HW rotations. [HOW] Fixed these issues so to work properly when ODM is used with HW rotations. Reviewed-by: Sridevi Arvindekar Signed-off-by: Alex Hung Signed-off-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c6dfe8f20b00d0ac6addc0024d4c70693e78e7cd Author: Ivan Lipski Date: Fri May 31 16:54:24 2024 -0400 drm/amd/display: Remove unnecessary variable [WHY] Coverity analysis flagged this code as DEADCODE because the condition '(!need_recovery)' is never true. The variable 'need_recovery' is initialized as 'true', is not assigned to 'false' anywhere before the conditional statement. Since the variable is only used for the conditional check, but the check can never be true, the variable itself is redundant. [HOW] Removed the variable 'need_recovery'. Reviewed-by: Alex Hung Signed-off-by: Alex Hung Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9da0f7736763aa0fbf63bb15060c6827135f3f67 Author: Hawking Zhang Date: Fri Jun 21 11:25:30 2024 +0800 drm/amdgpu: Fix register access violation fault_status is read only register. fault_cntl is not accessible from guest environment. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 4fa0046f11d998c39689ece909b912527081e558 Author: Ivan Lipski Date: Fri Jun 7 10:10:38 2024 -0400 drm/amd/display: Remove redundant var from display_rq_dig_calc in dml [WHY] Coverity analysis flagged these files as containing DEADCODE, i. e. redundant or unreachabale. In these files, variable 'mode_422' is always the same file (0 or false), so any code logic with it is redundant. [HOW] Removed 'mode_422' variable and all code with it from 'display_rq_dlg_calc_' functions in dml. Reviewed-by: Alex Hung Signed-off-by: Alex Hung Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8aa5aff2bf2d5cf793946f1415dfbeea9f936ad5 Author: Relja Vojvodic Date: Mon Jun 10 14:37:06 2024 -0400 drm/amd/display: Refactor dccg401_get_other_enable_symclk_fe [WHY] Function was used to check the number of FEs connected to the current BE. This was then used to determine if the symclk could be disabled, if all FEs were disconnected. However, the function would skip over the primary FE and return 0 when the primary FE was still connected. This caused black screens on driver disable with an MST daisy chain hooked up. [HOW] Refactored the function to correctly return the number of FEs connected to the input BE. Also renamed it for clarity. Reviewed-by: Wenjing Liu Signed-off-by: Alex Hung Signed-off-by: Relja Vojvodic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6e3eb2766731c6bd2bfae5a0fbb538ec85e7e822 Author: Nicholas Susanto Date: Fri Jun 7 14:39:01 2024 -0400 drm/amd/display: Temporarily disable HPO PG on DCN35 [WHY] On hotpluggin a 4k144 HDMI FRL setup, display fails FRL link training and falls back to TMDS which is caused by driver not ungating HPO before doing FRL link training. [HOW] Enable debug flag to disable HPO power gate in DCN35 Reviewed-by: Nicholas Kazlauskas Reviewed-by: Charlene Liu Signed-off-by: Alex Hung Signed-off-by: Nicholas Susanto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 748bd8ebae91fc0aee76d13026427d0de02e9e1e Author: Frank Min Date: Wed Jun 19 15:54:38 2024 +0800 drm/amdgpu: access ltr through pci cfg space Access ltr through pci cfg space instead of mmio while programing aspm on gfx12 Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6bab222b8b767aa773a8aeac7a3a43b958fcd694 Author: Yang Wang Date: Fri May 31 14:05:37 2024 +0800 drm/amdgpu: refine gfx12 firmware loading refine gfx12 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 78beaba9796365dfe264a93e0f33e0793c551367 Author: Kenneth Feng Date: Wed Jun 19 13:58:33 2024 +0800 Revert "drm/amd/pm: workaround to pass jpeg unit test" This reverts commit 6b18376ef37c3dd2bbf34ed4b42fefaa1f348a3d. Revert this due to a final solution: commit ed3165d660d8 ("drm/amdgpu/jpeg5: reprogram doorbell setting after power up for each playback") Signed-off-by: Kenneth Feng Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit 541fe90ee699658134c26539fdc0ea31c8f47fa9 Author: Frank Min Date: Tue Jun 18 14:34:24 2024 +0800 drm/amdgpu: update MTYPE mapping for gfx12 gfx12 only support MTYPE UC and NC, so update it accordingly. Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 39de69c4f935aa66fd4675c1d000643e46083842 Author: Dan Carpenter Date: Thu Jun 20 11:49:30 2024 +0300 drm/amdgpu/kfd: Add unlock() on error path to add_queue_mes() We recently added locking to add_queue_mes() but this error path was overlooked. Add an unlock to the error path. Fixes: 1802b042a343 ("drm/amdgpu/kfd: remove is_hws_hang and is_resetting") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 35665ca2cdef314bf0bde0c568a0ad38db3020ce Author: Jiapeng Chong Date: Thu Jun 20 16:10:52 2024 +0800 drm/amd/display: Remove redundant code and semicolons No functional modification involved. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:3171:2-3: Unneeded semicolon. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:3185:2-3: Unneeded semicolon. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:3200:2-3: Unneeded semicolon. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9365 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 1a0c9c218250fe53f530fcdfa1ac16c59f2762e4 Author: Dan Carpenter Date: Thu Jun 20 11:49:43 2024 +0300 drm/amd/display: Clean up indenting in dm_dp_mst_is_port_support_mode() This code works, but it's not aligned correctly. Add a couple missing tabs. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit c71c9aafd5faa579e6ffe32018071c7af97d5a2e Author: Pierre-Eric Pelloux-Prayer Date: Mon Jun 3 10:46:10 2024 +0200 amdgpu: don't dereference a NULL resource in sysfs code dma_resv_trylock being successful doesn't guarantee that bo->tbo.base.resv is not NULL, so check its validity before using it. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e779af8e8b51b4b3d403fa002e579b56b1931296 Author: Lijo Lazar Date: Tue Jun 18 14:04:38 2024 +0530 drm/amdgpu: Fix pci state save during mode-1 reset Cache the PCI state before bus master is disabled. The saved state is later used for other cases like restoring config space after mode-2 reset. Fixes: 5c03e5843e6b ("drm/amdgpu:add smu mode1/2 support for aldebaran") Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit dab70d9f653665aec5cdffd2d512aa98b1b38bdb Author: Yang Wang Date: Fri May 31 14:04:01 2024 +0800 drm/amdgpu: refine gfx11 firmware loading refine gfx11 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ed3165d660d8c4e4ba540bfaa461594e01b3815b Author: Sonny Jiang Date: Tue Jun 18 11:11:11 2024 -0400 drm/amdgpu/jpeg5: reprogram doorbell setting after power up for each playback Doorbell needs to be configured after power up during each playback Signed-off-by: Sonny Jiang Reviewed-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 83edf00d8972eecd849865a34bd4fada09444ec4 Author: Alex Deucher Date: Fri Jun 14 13:48:26 2024 -0400 drm/amdgpu/atomfirmware: fix parsing of vram_info v3.x changed the how vram width was encoded. The previous implementation actually worked correctly for most boards. Fix the implementation to work correctly everywhere. This fixes the vram width reported in the kernel log on some boards. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 56bf02c26a362a270c7f12f1e36aeced95bc2287 Merge: 193b9b200224d f3f942d6e5889 Author: Jakub Kicinski Date: Thu Jun 27 13:53:43 2024 -0700 Merge tag 'wireless-next-2024-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Highlights this time are: - cfg80211/nl80211: * improvements for 6 GHz regulatory flexibility - mac80211: * use generic netdev stats * multi-link improvements/fixes - brcmfmac: * MFP support (to enable WPA3) - wilc1000: * suspend/resume improvements - iwlwifi: * remove support for older FW for new devices * fast resume (keeping the device configured) - wl18xx: * support newer firmware versions * tag 'wireless-next-2024-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (100 commits) wifi: brcmfmac: of: Support interrupts-extended wifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3 net: rfkill: Correct return value in invalid parameter case wifi: mac80211: fix NULL dereference at band check in starting tx ba session wifi: iwlwifi: mvm: fix rs.h kernel-doc wifi: iwlwifi: fw: api: datapath: fix kernel-doc wifi: iwlwifi: fix remaining mistagged kernel-doc comments wifi: iwlwifi: fix prototype mismatch kernel-doc warnings wifi: iwlwifi: fix kernel-doc in iwl-fh.h wifi: iwlwifi: fix kernel-doc in iwl-trans.h wifi: iwlwifi: pcie: fix kernel-doc wifi: iwlwifi: dvm: fix kernel-doc warnings wifi: iwlwifi: mvm: don't log error for failed UATS table read wifi: iwlwifi: trans: make bad state warnings wifi: iwlwifi: fw: api: fix some kernel-doc wifi: iwlwifi: mvm: remove init_dbg module parameter wifi: iwlwifi: update the BA notification API wifi: iwlwifi: mvm: always unblock EMLSR on ROC end wifi: iwlwifi: mvm: use IWL_FW_CHECK for link ID check wifi: iwlwifi: mvm: don't flush BSSes on restart with MLD API ... ==================== Link: https://patch.msgid.link/20240627114135.28507-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 275fee9dccf76a31124232a8167d9289432e2e9e Merge: a78313bb206e0 406d058dc323a Author: Dave Airlie Date: Fri Jun 28 05:39:58 2024 +1000 Merge tag 'drm-xe-next-2024-06-26' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next UAPI Changes: - New uapi adding OA functionality to Xe (Ashutosh) Cross-subsystem Changes: - devcoredump: Add dev_coredumpm_timeout (Jose) Driver Changes: - More SRIOV preparation, including GuC communication improvements (Michal) - Kconfig update: do not select ACPI_BUTTON (Jani) - Rework GPU page fault handling (Brost) - Forcewake clean-up and fixes (Himal, Michal) - Drop EXEC_QUEUE_FLAG_BANNED (Brost) - Xe/Xe2 Workarounds fixes and additions (Tejas, Akshata, Sai, Vinay) - Xe devcoredump changes (Jose) - Tracing cleanup and add mmio tracing (RK) - Add BMG PCI IDs (Roper) - Scheduler fixes and improvements (Brost) - Some overal driver clean-up around headers and print macros (Michal) - Rename xe_exec_queue::compute to xe_exec_queue::lr (Francois) - Improve RTP rules to allow easier 'OR' conditions in WA declaration (Lucas) - Use ttm_uncached for BO with NEEDS_UC flag (Michal) - Other OA related work and fixes (Ashutosh, Michal, Jose) - Simplify locking in new_vma (Brost) - Remove xe_irq_shutdown (Ilia) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZnyW9RdC_aWSla_q@intel.com commit 589b844f1bf04850d9fabcaa2e943325dc6768b4 Author: Akiva Goldberger Date: Thu Jun 27 21:23:50 2024 +0300 RDMA/mlx5: Send UAR page index as ioctl attribute Add UAR page index as a driver ioctl attribute to increase the number of supported indices, previously limited to 16 bits by mlx5_ib_create_cq struct. Link: https://lore.kernel.org/r/0e18b34d7ec3b1ae02d694b0d545aed7413c0ef7.1719512393.git.leon@kernel.org Signed-off-by: Akiva Goldberger Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit dd6d7f8574d7f8b6a0bf1aeef0b285d2706b8c2a Author: Akiva Goldberger Date: Thu Jun 27 21:23:49 2024 +0300 RDMA: Pass entire uverbs attr bundle to create cq function Changes the create_cq verb signature by sending the entire uverbs attr bundle as a parameter. This allows drivers to send driver specific attrs through ioctl for the create_cq verb and access them in their driver specific code. Also adds a new enum value for driver specific ioctl attributes for methods already supporting UHW. Link: https://lore.kernel.org/r/ed147343987c0d43fd391c1b2f85e2f425747387.1719512393.git.leon@kernel.org Signed-off-by: Akiva Goldberger Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a9f6282b27762fa9e33187d84dd562c98c7d93de Author: Shiraz Saleem Date: Thu Jun 27 21:23:04 2024 +0530 MAINTAINERS: Update Maintainers for irdma driver Remove Shiraz Saleem and add Tatyana Nikolova as co-maintainer for irdma driver. Link: https://lore.kernel.org/r/20240627155304.219-1-shiraz.saleem@intel.com Signed-off-by: Shiraz Saleem Acked-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit f53b4bb83d5e29e0bce4d7505a89cc88302f1e72 Merge: b11ec63abec1d 6d588891a90c5 Author: Rafael J. Wysocki Date: Thu Jun 27 21:26:36 2024 +0200 Merge tag 'amd-pstate-v6.11-2024-06-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge more amd-pstate driver updates for 6.11 from Mario Limonciello: "Add support for amd-pstate core performance boost support which allows controlling which CPU cores can operate above nominal frequencies for short periods of time." * tag 'amd-pstate-v6.11-2024-06-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method cpufreq: amd-pstate: Cap the CPPC.max_perf to nominal_perf if CPB is off cpufreq: amd-pstate: initialize core precision boost state cpufreq: acpi: move MSR_K7_HWCR_CPB_DIS_BIT into msr-index.h commit d763debcb6458b6e602655a9ab12514947e30019 Merge: 8b2f0cb63e6f5 3e1f12c26646e Author: Rafael J. Wysocki Date: Thu Jun 27 21:24:35 2024 +0200 Merge tag 'linux-cpupower-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux Merge cpupower utility updates for 6.11 from Shuah Khan: "This cpupower update for Linux 6.11-rc1 consists of cleanups to man pages, README files, and enhancements to add help to Makefile." * tag 'linux-cpupower-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: Change the var type of the 'monitor' subcommand display mode cpupower: Remove absent 'v' parameter from monitor man page cpupower: Improve cpupower build process description cpupower: Add 'help' target to the main Makefile cpupower: Replace a dead reference link with working ones commit efde8bfdc1c76b4eefc5de0eb4c14738580d97d6 Merge: 529038146ba18 06d55c4278dcb Author: Rafael J. Wysocki Date: Thu Jun 27 21:22:15 2024 +0200 Merge back thermal control material for v6.11. commit b11ec63abec1dcaebfc3999cc3a53c903e511fd6 Merge: a1ff59784b277 acfc429e42f09 Author: Rafael J. Wysocki Date: Thu Jun 27 21:20:10 2024 +0200 Merge back cpufreq material for v6.11. commit 193b9b200224dab4eaec407eb2955303a521f5b6 Merge: cce346d441399 ffb7aa9fedad8 Author: Jakub Kicinski Date: Thu Jun 27 12:12:07 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. No conflicts. Adjacent changes: e3f02f32a050 ("ionic: fix kernel panic due to multi-buffer handling") d9c04209990b ("ionic: Mark error paths in the data path as unlikely") Signed-off-by: Jakub Kicinski commit ec2265dc91307622e43a7d602c3ea425da6f5de1 Author: Johan Jonker Date: Mon Jun 24 13:40:03 2024 +0200 clk: rockchip: rk3188: Drop CLK_NR_CLKS usage In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/1cd309fa-a4d3-4283-aa47-1330a40448a7@gmail.com Signed-off-by: Heiko Stuebner commit 313da6f69fa41d044b03f2ea37e56fe49f1e8a42 Author: Johan Jonker Date: Mon Jun 24 19:26:48 2024 +0200 ARM: dts: rockchip: add #sound-dai-cells to hdmi node on rk3128 '#sound-dai-cells' is required to properly interpret the list of DAI specified in the 'sound-dai' property, so add them to the 'hdmi' node for 'rk3128.dtsi'. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/9d0fabb0-70b0-4b4b-ac7c-389b1c7afe20@gmail.com Signed-off-by: Heiko Stuebner commit d45db4fcd3ae0d13191c8db00583f0bc49d9795d Author: Johan Jonker Date: Mon Jun 24 19:43:29 2024 +0200 ARM: dts: rockchip: add #sound-dai-cells to hdmi node no rk3036 '#sound-dai-cells' is required to properly interpret the list of DAI specified in the 'sound-dai' property, so add them to the 'hdmi' node for 'rk3036.dtsi'. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/55d302e5-c018-4b93-84c1-8cf75162e939@gmail.com Signed-off-by: Heiko Stuebner commit e71cf19e3119de446cc37ddabb2e161ebbf7357c Author: Nirmoy Das Date: Tue Jun 25 11:42:28 2024 +0200 drm/xe/client: Check return value of xe_force_wake_get xe_force_wake_get() can return error so check it's return value before reading gpu_timestamp value. v2: set HWE to NULL instead of setting timestamp to 0(Lucas) Add a warn on for xe_force_wake_put(Himal) Fixes: 188ced1e0ff8 ("drm/xe/client: Print runtime to fdinfo") Cc: Himal Prasad Ghimiray Cc: Lucas De Marchi Cc: Rodrigo Vivi Signed-off-by: Nirmoy Das Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240625094228.5327-1-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi commit 63db4a1f795a19e4e12f036a12a5f61c48b03e5c Author: John Garry Date: Thu Jun 27 16:07:35 2024 +0000 block: Delete blk_queue_flag_test_and_set() Since commit 70200574cc22 ("block: remove QUEUE_FLAG_DISCARD"), blk_queue_flag_test_and_set() has not been used, so delete it. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240627160735.842189-1-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit f4efd274d93b5000efc58bbfa14f8f863a57642d Author: Karthik Poosa Date: Wed Jun 26 22:37:46 2024 +0530 drm/xe/hwmon: Remove xe_hwmon_process_reg Remove xe_hwmon_process_reg as it is a umbrella function which can be avoided (Lucas). v2: Improve commit message. (Badal) v3: Add couple of comments. (Lucas) Signed-off-by: Karthik Poosa Suggested-by: Lucas De Marchi Cc: Badal Nilawar Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240626170746.2926011-2-karthik.poosa@intel.com Signed-off-by: Lucas De Marchi commit 661404644db468f0f56c1dd8c4085358c1c35ba0 Author: Thomas Huth Date: Thu Jun 27 18:24:58 2024 +0200 Documentation: Remove IA-64 from kernel-parameters IA-64 has been removed from the tree, so we should also remove the corresponding kernel-parameters documentation now. Signed-off-by: Thomas Huth Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240627162458.387700-1-thuth@redhat.com commit 19a3e1600671b54b2a11203479ed7358d5a8d8d8 Merge: 866a5c7e2781c 8685f22b5bfda Author: Dmitry Torokhov Date: Thu Jun 27 10:17:15 2024 -0700 Merge branch 'ib/ads7846-hsync' into next Bring in ADS7846 hsync changes. commit f378ec4eec8b7e607dbc0112913fd3d5d84eb1b8 Author: Mateusz Guzik Date: Thu Jun 27 18:11:52 2024 +0200 vfs: rename parent_ino to d_parent_ino and make it use RCU The routine is used by procfs through dir_emit_dots. The combined RCU and lock fallback implementation is too big for an inline. Given that the routine takes a dentry argument fs/dcache.c seems like the place to put it in. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240627161152.802567-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 3d41249c1dee0fa22ebd8d27aa0a280edf943a0e Author: Conor Dooley Date: Wed Jun 26 16:54:16 2024 +0100 MAINTAINERS: add microchip soc binding directory to microchip soc driver entry I noticed that there's technically not an explicit maintainer for this directory, even if the files currently in it are covered by either the Mircochip FPGA or AT91 entries. Add it to the entry covering the corresponding driver directory. Acked-by: Nicolas Ferre Acked-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit 0ef625bba6fb2bc0c8ed2aab9524fdf423f67dd5 Author: Mateusz Guzik Date: Tue Jun 25 17:18:06 2024 +0200 vfs: support statx(..., NULL, AT_EMPTY_PATH, ...) The newly used helper also checks for empty ("") paths. NULL paths with any flag value other than AT_EMPTY_PATH go the usual route and end up with -EFAULT to retain compatibility (Rust is abusing calls of the sort to detect availability of statx). This avoids path lookup code, lockref management, memory allocation and in case of NULL path userspace memory access (which can be quite expensive with SMAP on x86_64). Benchmarked with statx(..., AT_EMPTY_PATH, ...) running on Sapphire Rapids, with the "" path for the first two cases and NULL for the last one. Results in ops/s: stock: 4231237 pre-check: 5944063 (+40%) NULL path: 6601619 (+11%/+56%) Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240625151807.620812-1-mjguzik@gmail.com Tested-by: Xi Ruoyao [brauner: use path_mounted() and other tweaks] Signed-off-by: Christian Brauner commit 27a2d0cb2f38c67b58285e6124b14f7fff3fd1a8 Author: Christian Brauner Date: Tue Apr 30 13:57:58 2024 +0200 stat: use vfs_empty_path() helper Use the newly added helper for this. Signed-off-by: Christian Brauner commit 1bc6d4452d5c91beb09e37a98a590808e1997b79 Author: Christian Brauner Date: Tue Apr 30 13:54:46 2024 +0200 fs: new helper vfs_empty_path() Make it possible to quickly check whether AT_EMPTY_PATH is valid. Note, after some discussion we decided to also allow NULL to be passed instead of requiring the empty string. Signed-off-by: Christian Brauner commit 9fb9ff7ed1656dbd2168ebfc21b8c33666a994fa Author: Christian Brauner Date: Wed Jun 26 14:23:04 2024 +0200 fs: reflow may_create_in_sticky() This function is so messy and hard to read, let's reflow it to make it more readable. Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240621-affekt-denkzettel-3c115f68355a@brauner Signed-off-by: Christian Brauner commit 4ca47d8bcca09af570e7133dbdf550980c86ca7b Author: Conor Dooley Date: Wed Jun 26 16:54:17 2024 +0100 MAINTAINERS: add cache binding directory to cache driver entry The directory covering cache controller bindings has no MAINTAINER other than the fallback to myself, Rob and Krzysztof. Add it to the entry for the corresponding drivers. Acked-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit 9783e0407421a4dfc25e3a3001d0e0cff4236806 Author: Rameshkumar Sundaram Date: Wed Jun 26 08:12:57 2024 +0530 wifi: ath12k: fix driver initialization for WoW unsupported devices Commit 4a3c212eee0e ("wifi: ath12k: add basic WoW functionalities") broke driver initialization, now mac registration is allowed only for devices that advertise WMI_TLV_SERVICE_WOW, but QCN9274 doesn't support WoW and hence mac registration is aborted and driver is de-initialized. Allow mac registration to proceed without WoW Support for devices that don't advertise WMI_TLV_SERVICE_WOW. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: 4a3c212eee0e ("wifi: ath12k: add basic WoW functionalities") Signed-off-by: Rameshkumar Sundaram Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240626024257.709460-1-quic_ramess@quicinc.com commit c7e58843d1e49a6b54d528a8ea34933cafb713f2 Author: Claudiu Beznea Date: Tue Jun 25 15:13:47 2024 +0300 clk: renesas: r9a08g045: Add clock, reset and power domain support for I2C Add clock, reset and power domain support for the I2C channels available on the Renesas RZ/G3S SoC. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240625121358.590547-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 1f5ed3ae020a0624c9f51ed9720f8279bb0cae60 Author: Kuninori Morimoto Date: Mon Jun 24 00:16:17 2024 +0000 clk: renesas: r8a779h0: Add Audio clocks Add module clocks for the Audio (SSI/SSIU) blocks on the Renesas R-Car V4M (R8A779H0) SoC. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/87h6djkxf2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit c8bd9bd6446fa034a1877b553bf118606b37c025 Author: Claudiu Beznea Date: Fri Jun 14 10:19:21 2024 +0300 clk: renesas: r9a08g045: Add clock, reset and power domain support for the VBATTB IP The Renesas RZ/G3S SoC has an IP named Battery Backup Function (VBATTB) that generates the RTC clock. Add clock, reset and power domain support for it. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/20240614071932.1014067-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ea09ace3f8f31fa32f6674c95329a6caf5ef629d Author: Sean Christopherson Date: Thu Jun 27 10:17:56 2024 +0800 KVM: selftests: Print the seed for the guest pRNG iff it has changed Print the guest's random seed during VM creation if and only if the seed has changed since the seed was last printed. The vast majority of tests, if not all tests at this point, set the seed during test initialization and never change the seed, i.e. printing it every time a VM is created is useless noise. Snapshot and print the seed during early selftest init to play nice with tests that use the kselftests harness, at the cost of printing an unused seed for tests that change the seed during test-specific initialization, e.g. dirty_log_perf_test. The kselftests harness runs each testcase in a separate process that is forked from the original process before creating each testcase's VM, i.e. waiting until first VM creation will result in the seed being printed by each testcase despite it never changing. And long term, the hope/goal is that setting the seed will be handled by the core framework, i.e. that the dirty_log_perf_test wart will naturally go away. Reported-by: Yi Lai Reported-by: Dapeng Mi Link: https://lore.kernel.org/r/20240627021756.144815-2-dapeng1.mi@linux.intel.com Signed-off-by: Sean Christopherson commit 30c577a852c4ca77fedb1730c4546d9033beeb90 Merge: f42af02c0a9da 14ca6401d8703 Author: Arnd Bergmann Date: Thu Jun 27 16:44:37 2024 +0200 Merge tag 'optee-notif-wait-timeout-for-v6.11' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers optee: add timeout parameter for notification wait * tag 'optee-notif-wait-timeout-for-v6.11' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: add timeout value to optee_notif_wait() to support timeout Link: https://lore.kernel.org/r/20240627095325.GA2585076@rayden Signed-off-by: Arnd Bergmann commit f42af02c0a9dadb32f766cf6afc11570f4d20ffd Merge: a862a3f7b1b7f eb5d88b153885 Author: Arnd Bergmann Date: Thu Jun 27 16:43:17 2024 +0200 Merge tag 'reset-for-v6.11' of git://git.pengutronix.de/pza/linux into soc/drivers Reset controller updates for v6.11 Move reset controller registration to the end in rzg2l-usbphy-ctrl, to simplify the probe error path, add a new i.MX8MP AudioMix reset driver, allow to build some drivers under COMPILE_TEST with fewer dependencies, and use the devm_clk_get_enabled convenience wrapper in meson-audio-arb. The latter causes a trivial merge conflict [1] with b99e9c096148f ("reset: meson-audio-arb: Convert to platform remove callback returning void") because I didn't manage to send that in last round. There is no overlap though. [1] https://lore.kernel.org/all/Znmufb9L78FCoSSS@sirena.org.uk/ * tag 'reset-for-v6.11' of git://git.pengutronix.de/pza/linux: reset: RESET_IMX8MP_AUDIOMIX should depend on ARCH_MXC reset: zynqmp: allow building under COMPILE_TEST reset: imx8mp-audiomix: Add AudioMix Block Control reset driver reset: meson-audio-arb: Use devm_clk_get_enabled() reset: sti: allow building under COMPILE_TEST reset: rzg2l-usbphy-ctrl: Move reset controller registration Link: https://lore.kernel.org/r/20240626163258.61222-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit a862a3f7b1b7f71211ac0ab7ab6dbb4afd8e50c5 Author: Jeff Johnson Date: Tue Jun 25 10:04:15 2024 -0700 soc: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/imx/soc-imx8m.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/ixp4xx/ixp4xx-qmgr.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/ixp4xx/ixp4xx-npe.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/mediatek/mtk-cmdq-helper.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/amlogic/meson-clk-measure.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Reviewed-by: Linus Walleij Acked-by: Shawn Guo Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Neil Armstrong # for amlogic/meson-clk-measure.c Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240625-md-drivers-soc-v2-1-8bc7c03e3e69@quicinc.com Signed-off-by: Arnd Bergmann commit 87dcb2f0791bbbbe7e22ccc4321b81b8d3636ef4 Merge: 7cab811dfe7bb 18c250bd7ed0f Author: Arnd Bergmann Date: Thu Jun 27 16:41:41 2024 +0200 Merge tag 'ffa-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm FF-A driver updates for v6.11 The main addition is the split of bus and driver into distinct modules The FF-A bus module is initialized at subsys_initcall level when builtin. FF-A drivers initialization is now changed to module_init level so that pKVM ffa proxy is all setup and running in case pKVM hypervisor needs to trap and handle FF-A calls. One of the reason for not having this split from the beginning is the need to workaround the FF-A v1.0 NULL UUID. The FF-A bus layer called into FF-A driver and populated the device UUID if it matches with the driver attempting to match. Moving the workaround away from the FF-A bus layer to the FF-A core driver as a bus notifier will help to remove the dependency. * tag 'ffa-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Split bus and driver into distinct modules firmware: arm_ffa: Move the FF-A v1.0 NULL UUID workaround to bus notifier Link: https://lore.kernel.org/r/20240624103451.2870146-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 7cab811dfe7bbdc75d34624d15e0f416e0f592ca Merge: f2661062f16b2 fa8b28ba22d95 Author: Arnd Bergmann Date: Thu Jun 27 16:40:33 2024 +0200 Merge tag 'scmi-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI driver updates for v6.11 The main addition this time is the support for platform to agent(p2a also referred sometimes as notification or Rx) channel completion via interrupt driven method. Currently, the OSPM agent clears or acknowledge the receipt of the norification or delayed response by updating the flags in the shared memory region which the platform is expected to poll. On some platforms that are completely interrupt driven, the OSPM agent is expected to send a response message instead. This change adds the support for the same. Other changes include addition of a separate mailing list specific to SCMI to allow open discussions about the interface itself in addition to the kernel driver updates and support for system suspend via the platform noification used on some systems. * tag 'scmi-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Add support for platform to agent channel completion dt-bindings: firmware: arm,scmi: Add support for notification completion channel firmware: arm_scmi: Add support for system suspend in power control driver MAINTAINERS: Add mailing list for SCMI drivers Link: https://lore.kernel.org/r/20240620093924.375244-3-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 4bd85abedac99b87e6861ad91880661289d4367c Merge: 02295aa2a4612 1536dc8edc653 Author: Arnd Bergmann Date: Thu Jun 27 16:39:15 2024 +0200 Merge tag 'socfpga_dts_updates_for_v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into soc/dt SoCFPGA DTS updates for v6.11 - Drop unneeded flash address - Add L2 Cache info for Stratix10 * tag 'socfpga_dts_updates_for_v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: socfpga: stratix10: add L2 cache info arm64: dts: n5x: socdk: drop unneeded flash address/size-cells arm64: dts: agilex: socdk: drop unneeded flash address/size-cells arm64: dts: stratix10: socdk_nand: drop unneeded flash address/size-cells arm64: dts: stratix10: socdk: drop unneeded flash address/size-cells Link: https://lore.kernel.org/r/20240626210728.21295-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 02295aa2a4612d5fd8f8e5091325c694ed7706b1 Merge: c02138cf7cb30 f9508ef9976e8 Author: Arnd Bergmann Date: Thu Jun 27 16:38:07 2024 +0200 Merge tag 'zynqmp-soc-for-6.11' of https://github.com/Xilinx/linux-xlnx into soc/dt arm64: Xilinx DT changes for 6.11 - Add remoteproc TCM support - Add coresight cpu debug support - Describe OCM controller - Disable Tri-state for SDIO on kv260 - Add compatibility strings for kv260 overlays - Add support for k26-rev2 SOM - Describe ina260/DP/TTC and PWM on kv260 DT schema alignments and fixes - Align soc-nvmem binding with dt-schema - Fix fpga region node - Add description for efuses - Describe USB wakeup interrupt - Fix ams-pl node * tag 'zynqmp-soc-for-6.11' of https://github.com/Xilinx/linux-xlnx: arm64: zynqmp: Add pwm-fan node and fix ttc0 pwm-cells property arm64: zynqmp: Add support for K26 rev2 boards arm64: zynqmp: Describe DisplayPort connector for Kria arm64: zynqmp: Add description for ina260 on kv260 arm64: zynqmp: Add compatible string for kv260 arm64: zynqmp: Disable Tri-state for SDIO arm64: zynqmp: Remove address/size-cells from ams node arm64: zynqmp: Describe OCM controller arm64: zynqmp: Describe USB wakeup interrupt arm64: zynqmp: Add missing description for efuses arm64: zynqmp: Use fpga-region as node name arm64: zynqmp: Align nvmem node with dt schema arm64: zynqmp: Add coresight cpu debug support dts: zynqmp: add properties for TCM in remoteproc Link: https://lore.kernel.org/r/CAHTX3dLbNAYL4hm+bs=GByA4DqjRr3Rt6WESram8VyU1By8Mow@mail.gmail.com Signed-off-by: Arnd Bergmann commit c02138cf7cb30ba48e9eb752485df40c00bc9e62 Merge: 88d81c8643697 75895aa2bc1e0 Author: Arnd Bergmann Date: Thu Jun 27 16:36:51 2024 +0200 Merge tag 'juno-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/dt Arm Juno updates for v6.11 Addition of dedicated FPGA syscon compatible for Juno platforms. Also enablement of GPU device node now that the panfrost driver is already enabled as a module in defconfig. * tag 'juno-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Enable GPU arm64: dts: juno: add dedicated FPGA syscon compatible dt-bindings: arm: arm,juno-fpga-apb-regs: document FPGA syscon Link: https://lore.kernel.org/r/20240620093924.375244-2-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 88d81c864369729729dc695781d3d26ae50deb94 Merge: f2661062f16b2 2bb78d9fb7c99 Author: Arnd Bergmann Date: Thu Jun 27 16:35:39 2024 +0200 Merge tag 'renesas-dts-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.11 - Add support for the second and third Ethernet interfaces on the White Hawk development board, - Add support for the second Ethernet interface on the RZ/N1 SoC, - Add I2C EEPROM support for the Condor-I development board, - Add video capture support for the R-Car V4M SoC, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a779h0: Add video capture nodes arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes arm64: dts: renesas: rzg2l: Update fallback string for SDHI nodes arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes arm64: dts: renesas: s4sk: Add aliases for I2C buses arm64: dts: renesas: spider-cpu: Add aliases for I2C buses arm64: dts: renesas: white-hawk-cpu: Add aliases for I2C buses arm64: dts: renesas: condor-i: Add I2C EEPROM arm64: dts: renesas: gray-hawk-single: Add aliases for I2C buses ARM: dts: renesas: r9a06g032: Describe GMAC1 arm64: dts: renesas: white-hawk: ethernet: Describe AVB1 and AVB2 arm64: dts: renesas: r8a779g0: Use MDIO node for all AVB devices Link: https://lore.kernel.org/r/cover.1718355312.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 907c3fe532253a6ef4eb9c4d67efb71fab58c706 Author: Luis Henriques (SUSE) Date: Wed May 15 09:28:57 2024 +0100 ext4: fix infinite loop when replaying fast_commit When doing fast_commit replay an infinite loop may occur due to an uninitialized extent_status struct. ext4_ext_determine_insert_hole() does not detect the replay and calls ext4_es_find_extent_range(), which will return immediately without initializing the 'es' variable. Because 'es' contains garbage, an integer overflow may happen causing an infinite loop in this function, easily reproducible using fstest generic/039. This commit fixes this issue by unconditionally initializing the structure in function ext4_es_find_extent_range(). Thanks to Zhang Yi, for figuring out the real problem! Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Luis Henriques (SUSE) Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240515082857.32730-1-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o commit 2ea6d07efe5388d47afdb49079423334c97fe22b Author: Dmitry Baryshkov Date: Mon Jun 24 18:08:13 2024 +0300 usb: typec: ucsi: add Lenovo Yoga C630 glue driver The Lenovo Yoga C630 WOS laptop provides implements UCSI interface in the onboard EC. Add glue driver to interface the platform's UCSI implementation. Reviewed-by: Bryan O'Donoghue Reviewed-by: Heikki Krogerus Reviewed-by: Ilpo Järvinen Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240624-ucsi-yoga-ec-driver-v9-2-53af411a9bd6@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6694d31702674964af9bc8bf84ff16fcb16e69f2 Merge: fe1b01a82f9d2 13bbe1c83bc40 Author: Greg Kroah-Hartman Date: Thu Jun 27 16:20:49 2024 +0200 Merge tag 'platform-drivers-x86-ib-lenovo-c630-v6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 into usb-next Immutable branch between pdx86 lenovo c630 branch, power/supply and USB subsystems due for the v6.11 merge window. platform-drivers-x86-ib-lenovo-c630-v6.11-2: platform-drivers-x86-ib-lenovo-c630-v6.11 + platform-drivers-x86-lenovo-c630 for merging into the power/supply and USB subsystems for v6.11. * tag 'platform-drivers-x86-ib-lenovo-c630-v6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/arm64: build drivers even on non-ARM64 platforms platform: arm64: add Lenovo Yoga C630 WOS EC driver dt-bindings: platform: Add Lenovo Yoga C630 EC commit b07855348b305c234d9fabb7ab9b50fa9b3a7759 Author: Kemeng Shi Date: Tue May 14 19:24:38 2024 +0800 jbd2: remove unnecessary "should_sleep" in kjournald2 We only need to sleep if no running transaction is expired. Simply remove unnecessary "should_sleep". Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-10-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 136d3e0703e807b14ed6f9b8a5a544b6ba08d940 Author: Kemeng Shi Date: Tue May 14 19:24:37 2024 +0800 jbd2: remove dead check of JBD2_UNMOUNT in kjournald2 We always set JBD2_UNMOUNT with j_state_lock held in journal_kill_thread. In kjournald2, we check JBD2_UNMOUNT flag two times under the same j_state_lock. Then the second check is unnecessary. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-9-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit d5c545735aa0d6443460ac407d35f8fa235d5102 Author: Kemeng Shi Date: Tue May 14 19:24:36 2024 +0800 jbd2: remove dead equality check of j_commit_[sequence/request] in kjournald2 The j_commit_[sequence/request] are updated with j_state_lock held during runtime. In kjournald2, two equality checks of j_commit_[sequence/request] are under the same j_state_lock, then the second check is unnecessary. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-8-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 4eb9bd13eba3c168e91460972a76ddd53ac3b2b0 Author: Kemeng Shi Date: Tue May 14 19:24:35 2024 +0800 jbd2: use bh_in instead of jh2bh(jh_in) to simplify code We save jh2bh(jh_in) to bh_in, so use bh_in directly instead of jh2bh(jh_in) to simplify the code. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-7-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit daabedd664021afa9e7e3225489888a4fee99bad Author: Kemeng Shi Date: Tue May 14 19:24:34 2024 +0800 jbd2: remove unneeded kmap to do escape in jbd2_journal_write_metadata_buffer The data to do escape could be accessed directly from b_frozen_data, just remove unneeded kmap. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-6-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 4c15129aaad54af2df4665ddde9245788ee9fa9c Author: Kemeng Shi Date: Tue May 14 19:24:33 2024 +0800 jbd2: jump to new copy_done tag when b_frozen_data is created concurrently If b_frozen_data is created concurrently, we can update new_folio and new_offset with b_frozen_data and then move forward Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 5dd3e8c0758a7c7a8c8f3002b2632a3c9d31c808 Author: Kemeng Shi Date: Tue May 14 19:24:32 2024 +0800 jbd2: remove unnedded "need_copy_out" in jbd2_journal_write_metadata_buffer As we only need to copy out when we should do escape, need_copy_out could be simply replaced by "do_escape". Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-4-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit abe48a52250a91f0d1f9b5052a246c63cb845827 Author: Kemeng Shi Date: Tue May 14 19:24:31 2024 +0800 jbd2: remove unused return info from jbd2_journal_write_metadata_buffer The done_copy_out info from jbd2_journal_write_metadata_buffer is not used. Simply remove it. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit cc102aa24638b90e04364d64e4f58a1fa91a1976 Author: Kemeng Shi Date: Tue May 14 19:24:30 2024 +0800 jbd2: avoid memleak in jbd2_journal_write_metadata_buffer The new_bh is from alloc_buffer_head, we should call free_buffer_head to free it in error case. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit fe1b01a82f9d2af8e792db539324607676d8f35f Author: Pooja Katiyar Date: Mon Jun 24 14:33:59 2024 -0700 usb: typec: ucsi: UCSI2.0 Get Error Status changes Add support for UCSI 2.0 Get Error Status command to add connector number field to the command structure. Connector number field is extracted from the previous UCSI command which has failed and is used to get the failure reason/Error using Get Error Status command. Reviewed-by: Heikki Krogerus Signed-off-by: Pooja Katiyar Link: https://lore.kernel.org/r/20240624213359.1270018-1-pooja.katiyar@intel.com Signed-off-by: Greg Kroah-Hartman commit d58a7671078a67c46bee4dd56efca073b25f11bb Author: Pooja Katiyar Date: Wed Jun 26 11:58:53 2024 -0700 usb: typec: ucsi: UCSI2.0 Get Error Status data structure changes Add support for UCSI 2.0 Get Error Status data structure changes to add more error codes to the data structure. Reviewed-by: Heikki Krogerus Signed-off-by: Pooja Katiyar Link: https://lore.kernel.org/r/20240626185853.2956700-1-pooja.katiyar@intel.com Signed-off-by: Greg Kroah-Hartman commit 22d96a285449ba78abeaf3e197caca46bc24f8e5 Author: Jameson Thies Date: Tue Jun 25 00:46:07 2024 +0000 usb: typec: ucsi: Only set number of plug altmodes after registration Move the setting of the plug's number of alternate modes into the same condition as the plug's registration to prevent dereferencing the connector's plug pointer while it is null. Fixes: c313a44ac9cd ("usb: typec: ucsi: Always set number of alternate modes") Suggested-by: Jon Hunter Signed-off-by: Jameson Thies Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Tested-by: Jon Hunter Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20240625004607.3223757-1-jthies@google.com Signed-off-by: Greg Kroah-Hartman commit 8dc9c3da79c84b13fdb135e2fb0a149a8175bffe Author: Xiaxi Shen Date: Tue Apr 30 20:30:17 2024 -0700 ext4: fix uninitialized variable in ext4_inlinedir_to_tree Syzbot has found an uninit-value bug in ext4_inlinedir_to_tree This error happens because ext4_inlinedir_to_tree does not handle the case when ext4fs_dirhash returns an error This can be avoided by checking the return value of ext4fs_dirhash and propagating the error, similar to how it's done with ext4_htree_store_dirent Signed-off-by: Xiaxi Shen Reported-and-tested-by: syzbot+eaba5abe296837a640c0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=eaba5abe296837a640c0 Link: https://patch.msgid.link/20240501033017.220000-1-shenxiaxi26@gmail.com Signed-off-by: Theodore Ts'o commit 36b1235a8ae79caacd6f2bbd7120ac7860cab734 Author: Mathias Nyman Date: Wed Jun 26 15:48:35 2024 +0300 xhci: sort out TRB Endpoint ID bitfield macros xhci macros that read and write endpoint ID bitfields of TRBs are mixing the 1-based Endpoint ID as described in the xHCI specification, and 0-based endpoint index used by driver as an array index. Sort this out by naming macros that deal with 1 based Endpoint ID fields to *_EP_ID_*, and 0 based endpoint index values to *_EP_INDEX_*. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-22-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b4c87bc5ce9292d494d9354e25cc8ea152fbcbbd Author: Reka Norman Date: Wed Jun 26 15:48:34 2024 +0300 xhci: Apply XHCI_RESET_TO_DEFAULT quirk to TGL TGL systems have the same issue as ADL, where a large boot firmware delay is seen if USB ports are left in U3 at shutdown. So apply the XHCI_RESET_TO_DEFAULT quirk to TGL as well. The issue it fixes is a ~20s boot time delay when booting from S5. It affects TGL devices, and TGL support was added starting from v5.3. Cc: stable@vger.kernel.org Signed-off-by: Reka Norman Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-21-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1b349f214ac7b87fd2b854db0d4ce34895776642 Author: Niklas Neronin Date: Wed Jun 26 15:48:33 2024 +0300 usb: xhci: add 'goto' for halted endpoint check in handle_tx_event() Add 'goto' statement for a halted endpoint, streamlining the error handling process. In future handle_tx_event() changes this 'goto' statement will have more uses. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-20-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c43e43e8a7a8ed5ecad9e2d6a7ea89f607d710e8 Author: Niklas Neronin Date: Wed Jun 26 15:48:32 2024 +0300 usb: xhci: move process TD code out of the while loop This part is and should only performed once, so it's moved out of the while loop to improve code readability. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-19-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 132dcf65fc2d5a308fc44833dbb7f73a211a02e9 Author: Niklas Neronin Date: Wed Jun 26 15:48:31 2024 +0300 usb: xhci: remove infinite loop prevention If a buggy HW reports some unpredicted event (for example, an overrun event following a MSE event while the EP ring is actually not empty), the driver will never find the TD, and it will loop until the TD list is empty. Before commits [1][2], the spin lock was released when giving back a URB in the do-while loop. This could cause more TD to be added to TD list, causing an infinite loop. Because of commits [1][2] the spin lock is not released any more, thus the infinite loop prevention is unnecessary and is removed. [1], commit 0c03d89d0c71 ("xhci: Giveback urb in finish_td directly") [2], commit 36dc01657b49 ("usb: host: xhci: Support running urb giveback in tasklet context") Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-18-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5ea8a885c85edee318c8daa8f0a5ecb5e409ecd6 Author: Niklas Neronin Date: Wed Jun 26 15:48:30 2024 +0300 usb: xhci: remove false xhci_giveback_urb_in_irq() header comment The function doesn't releases and re-acquires the lock, this was removed in commit 36dc01657b49 ("usb: host: xhci: Support running urb giveback in tasklet context") Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-17-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d56b0b2ab142940b06eac56dcb3ab1ab88df38a2 Author: Niklas Neronin Date: Wed Jun 26 15:48:29 2024 +0300 usb: xhci: ensure skipped isoc TDs are returned when isoc ring is stopped Missed service event tells the driver that the hardware wasn't able to process some queued isoc TDs in their right time slots, and some TDs will be skipped. The driver sets a 'skip' flag to indicate that the next transfer event after this event will point to some future TD instead of the next queued TD. Once the driver receives the next event, it will skip and give back all those hardware skipped TDs. However, should this subsequent event be a stop endpoint which does not point to the next pending TD, the driver fails to return the skipped TDs. Instead, it loops for a period before outputting an erroneous message. Fix this by repositioning the 'stop endpoint' check to follow the isoc skip check, ensuring the skipped TDs are properly returned. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-16-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 21b224d7475751a398dfb811e4f987671ef37ade Author: Mathias Nyman Date: Wed Jun 26 15:48:28 2024 +0300 xhci: rework xhci internal endpoint halt state detection. When xhci_requires_manual_halt_cleanup() was written it wasn't clear that the xhci internal endpoint halt state always needs to be cleared with a reset endpoint command. Functional stall cases additionally halt the device side endpoint which requires class driver to clear the device side halt with a CLEAR_FEATURE(ENDPOINT_HALT) request as well. Clean up, rename, and make sure the new function always return true when internal endpoint state is halted, including stall cases. Based on related cleanup suggestion code by Niklas Neronin cc: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-15-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bde66d2dc4885241acdab811deebf5f93cc8378e Author: Niklas Neronin Date: Wed Jun 26 15:48:27 2024 +0300 usb: xhci: remove obsolete sanity check debug messages Remove debug messages that served as sanity checks during the initial implementation phase of underrun/overrun completion codes. These checks are now unnecessary. Instead, improve the default debug messages for underrun/overrun events, so that they are consistent with the reset of the completion codes. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-14-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 43061949ec1ba12d048d004d173688fe9c8cf3c3 Author: Niklas Neronin Date: Wed Jun 26 15:48:26 2024 +0300 usb: xhci: improve error message for targetless transfer event Improve error message for unknown transfer event without a TRB, by also printing the event code number. This removes the inevitable question; "what was the unknown event code exactly?" Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-13-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2acd0c22232d7681bc5ae993ca586affed083506 Author: Niklas Neronin Date: Wed Jun 26 15:48:25 2024 +0300 usb: xhci: move untargeted transfer event handling to a separate function Move handling transfer events without a target transfer TRB into handle_transferless_tx_event(), this type of event does not utilize the rest of handle_tx_event() and as a result it's better to separate it into a dedicated function. Additionally, this change reduces handle_tx_event()'s size and makes it more readable. [Mathias: Simplify code to return helper function value directly. This removes the second xhci_err() message for untargeted and unexpected event completion types] Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bbdd82c752d6e5fc8465092467e13d1c2961c1dd Author: Niklas Neronin Date: Wed Jun 26 15:48:24 2024 +0300 usb: xhci: move all segment re-numbering to xhci_link_rings() This is a preparation patch for switching from custom segment list handling to using list.h functions. Contain all segment re-numbering in xhci_link_rings() which links two segments lists together, and performs all necessary adjustments for them to fit together. No need to send segment number to xhci_alloc_segments_for_ring() as a parameter after this. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7476a2215c07703db5e95efaa3fc5b9f957b9417 Author: Niklas Neronin Date: Wed Jun 26 15:48:23 2024 +0300 usb: xhci: move link chain bit quirk checks into one helper function. Older 0.95 xHCI hosts and some other specific newer hosts require the chain bit to be set for Link TRBs even if the link TRB is not in the middle of a transfer descriptor (TD). move the checks for all those cases into one xhci_link_chain_quirk() function to clean up and avoid code duplication. No functional changes. [skip renaming chain_links flag, reword commit message -Mathias] Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2c0df12a3e91075302d4e9adff3a2f0488e315a4 Author: Niklas Neronin Date: Wed Jun 26 15:48:22 2024 +0300 usb: xhci: remove unused argument from handle_port_status() Argument struct 'xhci_interrupter *ir' is not used, and as a consequence is removed. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ec3cdfd6d91380f8ea81d7b13cc2a6788c8d9678 Author: Niklas Neronin Date: Wed Jun 26 15:48:21 2024 +0300 usb: xhci: remove unused argument from xhci_handle_cmd_config_ep() Argument u32 'cmd_comp_code' is not used, and as a consequence is removed. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3dd91ff610454f2a81b132afc7ea3c3e1b7bba53 Author: Niklas Neronin Date: Wed Jun 26 15:48:20 2024 +0300 usb: xhci: remove unused 'xhci' argument Remove argument 'struct xhci_hcd *xhci' from functions which do not utilize it. This change contributes to a simpler codebase by avoiding redundant arguments. Functions which have the argument removed: check_interval() xhci_num_trbs_free() xhci_handle_cmd_enable_slot() xhci_clear_interrupt_pending() xhci_requires_manual_halt_cleanup() Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 81c8c0781527f1ccfc258f982747757cb638d2bf Author: Niklas Neronin Date: Wed Jun 26 15:48:19 2024 +0300 usb: xhci: remove 'num_trbs' from struct 'xhci_td' Remove 'num_trbs' from 'xhci_td' as it's no longer used following the removal of 'num_trbs_free' tracking in commit 2710f8186f88 ("xhci: Stop unnecessary tracking of free trbs in a ring"). Tracking of 'num_trbs_free' is still performed in xhci DbC, but it does not utilize 'num_trbs'. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit de3edd47a18fe05a560847cc3165871474e08196 Author: Uday M Bhat Date: Wed Jun 26 15:48:18 2024 +0300 xhci: dbc: Allow users to modify DbC poll interval via sysfs xhci DbC driver polls the host controller for DbC events at a reduced rate when DbC is enabled but there are no active data transfers. Allow users to modify this reduced poll interval via dbc_poll_interval_ms sysfs entry. Unit is milliseconds and accepted range is 0 to 5000. Max interval of 5000 ms is selected as it matches the common 5 second timeout used in usb stack. Default value is 64 milliseconds. A long interval is useful when users know there won't be any activity on systems connected via DbC for long periods, and want to avoid battery drainage due to unnecessary CPU usage. Example being Android Debugger (ADB) usage over DbC on ChromeOS systems running Android Runtime. [minor changes and rewording -Mathias] Co-developed-by: Samuel Jacob Signed-off-by: Samuel Jacob Signed-off-by: Uday M Bhat Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7b59c0362af8a79d3fb11c48a1d6e4cfc9570c0e Author: Mathias Nyman Date: Wed Jun 26 15:48:17 2024 +0300 xhci: Set correct transferred length for cancelled isoc transfers The transferred length is incorrectly zeroed for cancelled isoc transfer TDs when the transfer ring stops on a cancelled TD with a 'Stop - Length Invalid' completion code. Length was always set to zero in these cases even if it should be set to the sum of the TRB transfer block lengths up to the TRB the ring stopped on, _excluding_ the one stopped on. No issues reported due to this isoc case. Found while inspecting related case in bulk transfer 'Stop - Length Invalid' handling. Change this so that 'Stop - Length Invalid' transfer completion cases always sum up TRB lengths instead of report a zero length. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fef267a6c29bb2377e344a060c151041bd4de677 Author: Mathias Nyman Date: Wed Jun 26 15:48:16 2024 +0300 xhci: show usb device name in xhci urb tracing parsing xhci traces on systems with several xHCI controllers and connected usb devices is difficult as entries are all interleaved. showing usb devname in urb tracing reveals both which device, and which bus/controller the entry is for. old: xhci_urb_enqueue: ep2in-bulk: urb 0000000039224498 ... new: xhci_urb_enqueue: 3-9.4 ep1in-bulk: urb 0000000013bf21e7 ... Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e6092feacf3f52b447fa2225453b566f32b998af Author: Hector Martin Date: Wed Jun 26 15:48:15 2024 +0300 xhci: Remove dead code in xhci_move_dequeue_past_td() This codepath is trivially dead, since the function is never called with a non-NULL td (the only callsite is immediately preceded by a NULL guard). [remove unused label 'deq_found' -Mathias] Signed-off-by: Hector Martin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240626124835.1023046-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ee0d382feb44ec0f445e2ad63786cd7f3f6a8199 Author: Ma Ke Date: Tue Jun 25 10:23:06 2024 +0800 usb: gadget: aspeed_udc: validate endpoint index for ast udc We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Found by static analysis. Signed-off-by: Ma Ke Reviewed-by: Andrew Jeffery Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20240625022306.2568122-1-make24@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 859976e8e744dc5e23903baca2724eebe85d9d27 Author: Fabio Estevam Date: Tue Jun 25 20:10:23 2024 -0300 usb: chipidea: ci_hdrc_tegra: Switch to RUNTIME_PM_OPS() Replace SET_RUNTIME_PM_OPS() with its modern RUNTIME_PM_OPS() alternative. The combined usage of pm_ptr() and RUNTIME_PM_OPS allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20240625231023.436403-2-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 26faae34a61a62b60cee947bf3c4195c85507028 Author: Fabio Estevam Date: Tue Jun 25 20:10:22 2024 -0300 usb: chipidea: ci_hdrc_imx: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS() Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives. The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20240625231023.436403-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit c456c5763da4042348040e2ad727f10f7ac17982 Author: Matthias Kaehlcke Date: Wed Jun 12 18:04:48 2024 +0000 usb: misc: onboard_usb_dev: Add match function Add a match function for the onboard_usb_dev driver. Primary matching is still done through the VID:PID pair, as usual for USB devices. The new match function checks in addition whether the device has a device tree node, which is a needed for using the onboard_usb_dev driver. Remove the check for a device tree node from _probe(), the new match functions prevents devices without DT node from probing. Signed-off-by: Matthias Kaehlcke Tested-by: Jameson Thies Reviewed-by: Jameson Thies Link: https://lore.kernel.org/r/20240612180448.1.I805556c176c626872c15ce001f0e8198e1f95ae1@changeid Signed-off-by: Greg Kroah-Hartman commit b38aa697bcdc6529a912c18ddd093b1329b3d8b1 Author: Neil Armstrong Date: Mon Jun 24 10:58:23 2024 +0200 dt-bindings: usb: dwc2: switch to unevaluatedProperties Define "unevaluatedProperties" instead of "additionalProperties" to allow properties from common schemas but still disallow undefined properties. This allow defining a device subnode and fixes: meson-gxbb-odroidc2.dtb: usb@c9100000: '#address-cells', '#size-cells', 'hub@1' do not match any of the regexes: 'p inctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/dwc2.yaml# Fixes: bb88dbbee2c9 ("dt-bindings: usb: dwc2: Add reference to usb-drd.yaml") Fixes: 54bd6c9a3b7b ("dt-bindings: usb: dwc2: document TPL support") Signed-off-by: Neil Armstrong Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240624-topic-amlogic-upstream-bindings-fixes-dwc2-subnodes-v1-1-f2544f21f594@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9d32685a251a754f1823d287df233716aa23bcb9 Author: Shantanu Goel Date: Thu Jun 6 23:32:57 2024 -0400 usb: uas: set host status byte on data completion error Set the host status byte when a data completion error is encountered otherwise the upper layer may end up using the invalid zero'ed data. The following output was observed from scsi/sd.c prior to this fix. [ 11.872824] sd 0:0:0:1: [sdf] tag#9 data cmplt err -75 uas-tag 1 inflight: [ 11.872826] sd 0:0:0:1: [sdf] tag#9 CDB: Read capacity(16) 9e 10 00 00 00 00 00 00 00 00 00 00 00 20 00 00 [ 11.872830] sd 0:0:0:1: [sdf] Sector size 0 reported, assuming 512. Signed-off-by: Shantanu Goel Acked-by: Oliver Neukum Link: https://lore.kernel.org/r/87msnx4ec6.fsf@yahoo.com Signed-off-by: Greg Kroah-Hartman commit 45b70f71a1c161fc2848395f6cb1ef1ac2222d3b Author: Nícolas F. R. A. Prado Date: Thu Jun 6 19:52:29 2024 -0400 drm/mediatek: Log errors in probe with dev_err_probe() Use dev_err_probe() to log errors in the probe function of all drm mediatek drivers. This avoids -EPROBE_DEFER return values from being logged as errors, like the following: mediatek-disp-rdma 1c002000.rdma: Failed to add component: -517 As a side benefit it also standardizes the format of the error in the log messages. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20240606-mtk-disp-rdma-dev-err-probe-v2-1-3898621767b8@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 0c85e2e377c368e1e0f04ea28dcbc5aa06302551 Author: Andre Przywara Date: Sun Jun 16 23:40:56 2024 +0100 arm64: dts: allwinner: h616: add IOMMU node The Allwinner H616 contains a scatter-gather IOMMU connected to some video related devices. It's almost compatible to the one used in the H6, though with minor incompatibilities. Add the DT node describing its resources, so that devices like the video or display engine can connect to it. Signed-off-by: Andre Przywara Tested-by: Ryan Walklin Link: https://lore.kernel.org/r/20240616224056.29159-6-andre.przywara@arm.com [wens@csie.org: Move IOMMU node after GIC node for address order] Signed-off-by: Chen-Yu Tsai commit 20fb7ca6bf04bc381636ae7e8898cb8d5c9e81ae Author: Douglas Anderson Date: Tue Jun 11 10:27:44 2024 -0700 drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time Based on grepping through the source code this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart comes straight out of the kernel doc "driver instance overview" in drm_drv.c. This driver users the component model and shutdown happens in the base driver. The "drvdata" for this driver will always be valid if shutdown() is called and as of commit 2a073968289d ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop") we don't need to confirm that "drm" is non-NULL. Suggested-by: Maxime Ripard Reviewed-by: Maxime Ripard Reviewed-by: Fei Shao Tested-by: Fei Shao Signed-off-by: Douglas Anderson Reviewed-by: Linus Walleij Link: https://patchwork.kernel.org/project/dri-devel/patch/20240611102744.v2.1.I2b014f90afc4729b6ecc7b5ddd1f6dedcea4625b@changeid/ Signed-off-by: Chun-Kuang Hu commit 4ed9dd7fde22ed614384c03f8049723cbe7e6a58 Author: Hsiao Chien Sung Date: Fri Jun 14 11:49:37 2024 +0800 drm/mediatek: Remove less-than-zero comparison of an unsigned value Fix a Coverity error that less-than-zero comparison of an unsigned value is never true. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20240614034937.23978-1-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit d11cbdee25953d528ccbeaab1a03733c4e07399e Author: Teddy Engel Date: Tue Jun 25 17:33:34 2024 +0100 staging: rtl8192e: Fix conflicting types error with net_device. Add a pre-declaration of struct net_device so the compiler is able to use rtl_pci.h / rtl_cam.h. Signed-off-by: Teddy Engel Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406250858.L8rJMHQm-lkp@intel.com/ Fixes: 7dff0b27d9c8 ("staging: rtl8192e: Remove unnecessary pre-declaration of struct net_device") Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240625163334.11117-1-engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit 22b65ba43b2d0256e95d6502297f5b0b72d00802 Author: Philipp Hortmann Date: Tue Jun 25 21:46:01 2024 +0200 staging: rtl8723bs: Remove unused variable pwdev_priv Remove unused variable pwdev_priv. Fixes: bdee203cd80c ("staging: rtl8723bs: Remove switch(type) as type is constant") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406250759.FnxzD3PK-lkp@intel.com/ Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240625194601.GA16828@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman commit d0fa70aca54c8643248e89061da23752506ec0d4 Author: lei lu Date: Wed May 29 02:30:40 2024 +0800 jfs: don't walk off the end of ealist Add a check before visiting the members of ea to make sure each ea stays within the ealist. Signed-off-by: lei lu Signed-off-by: Dave Kleikamp commit be210737fe6cef2d0d578e23342261688c9317e1 Author: Thorsten Blum Date: Tue Apr 2 12:51:58 2024 +0200 jbd2: use str_plural() to fix Coccinelle warning Fixes the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_plural(dropped) Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20240402105157.254389-2-thorsten.blum@toblux.com Signed-off-by: Theodore Ts'o commit 57802c73bf1ba7adf17f3d39b68bab7f4d9a5635 Author: Li zeming Date: Tue Apr 2 10:23:00 2024 +0800 ext4: block_validity: Remove unnecessary ‘NULL’ values from new_node new_node is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Reviewed-by: Andreas Dilger Link: https://patch.msgid.link/20240402022300.25858-1-zeming@nfschina.com Signed-off-by: Theodore Ts'o commit 36ac1e29f49ff4cbf1500465db311b17d8ba9213 Author: Krzysztof Kozlowski Date: Thu Jun 27 14:52:03 2024 +0200 ASoC: codecs: lpass-wsa-macro: add missing select of common code The Qualcomm LPASS WSA macro codec driver uses now parts of common module, so it has to select SND_SOC_LPASS_MACRO_COMMON. sound/soc/codecs/lpass-wsa-macro.o: in function `wsa_macro_probe': sound/soc/codecs/lpass-wsa-macro.c:2767:(.text+0x1c9c): undefined reference to `lpass_macro_get_codec_version' Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406272231.th1LtuLk-lkp@intel.com/ Fixes: 5dcf442bbbca ("ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions") Signed-off-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240627125203.171048-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit a9422ec92a6388c8a19fad759f7ed0d533734cc6 Author: Ville Syrjälä Date: Tue Jun 11 16:33:44 2024 +0300 drm/i915/dsb: Try to document that DSB_STATUS bit 16 is level triggered DSB_STATUS bit 16 is supposed to be a sticky bit informing us whether the DSB was idle or not when the pipe's delayed vblank (when double buffered registers latch) occurred. Unfortunately it turns out this is a level triggred signal, ie. the bit will be set whenever the DSB is busy during the scanline window between start of delayed vblank and vtotal. Try to document that fact by renaming the bit. Sadly this also thwarts my plan to use this bit to sanity check that the (to be introduced) DSB based vblank evasion did its job correctly. That would require an edge triggered signal instead. So looks like we'll have to rely mostly on luck instead :( Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-12-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e269537e491da6336776b5548a3c73f62273aa15 Author: Li Nan Date: Tue Jun 25 19:55:17 2024 +0800 block: clean up the check in blkdev_iomap_begin() It is odd to check the offset amidst a series of assignments. Moving this check to the beginning of the function makes the code look better. Signed-off-by: Li Nan Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240625115517.1472120-1-linan666@huaweicloud.com Signed-off-by: Jens Axboe commit d2b19556565b8d068de03f7438bceba4d1f93c3b Merge: 6a0d3607f58b3 05d996e113481 Author: Mark Brown Date: Thu Jun 27 12:30:52 2024 +0100 ASoC: imx-audmix: Split capture device to be a new Merge series from Shengjiu Wang : The transmitter and receiver part of the SAI interface need to be configured with different master/slave mode, especially to work with the audiomix module. The SAI1 TX is in master mode, but SAI1 RX is in slave mode. So add another two DAIs for TX and RX separately in fsl_sai driver. There will be three devices for audiomix sound card, hw:x,0 is the playback device for one SAI, hw:x,1 is the playback device for another SAI, hw:x,2 is the capture device for audmix output. commit 6a0d3607f58b385636294bbc16824f5bdc4be0bf Merge: 936abb09c1c7c e64343fa57335 Author: Mark Brown Date: Thu Jun 27 12:30:40 2024 +0100 ASoC: simple-card / audio-graph: Merge series from Kuninori Morimoto : Introduce the ability for sound cards to manually order the startup of the various components in the card. commit 89c2657429c4822a2697077bbb3a8d126d826ced Author: David Lechner Date: Wed Jun 26 14:45:17 2024 -0500 spi: axi-spi-engine: remove platform_set_drvdata() platform_get_drvdata() is never called in the AXI SPI Engine driver, so platform_set_drvdata() is not needed. Remove it. This also lets us avoid the final error check in the probe function. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240626-spi-axi-spi-engine-remove-drvdata-v1-1-1752e372dd5d@baylibre.com Signed-off-by: Mark Brown commit 57dd8f2f77bc85374fc06962110cad0259a1a495 Author: Hans Verkuil Date: Thu Jun 27 13:15:31 2024 +0200 Revert "media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs" This reverts commit 77d32b7e2a7b2e5389b67363d25371b4b8cad140. This patch is obviously wrong (causes array accesses at index -1), and I caught that just too late. commit 7b9b9306cba0d60c6e8551366fba3bbbffb929e1 Author: Laurent Pinchart Date: Thu Jun 20 02:24:31 2024 +0300 media: imx-mipi-csis: Use v4l2_subdev_enable_streams() To support sources that implement the .enable_streams() and .disable_streams() operations, replace the manual calls to the subdev .s_stream() operation with the v4l2_subdev_enable_streams() and v4l2_subdev_disable_streams() helpers. The helpers fall back to .s_stream() if the source doesn't implement the new operations, so backward compatibility is preserved. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Rui Miguel Silva Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 40f8c2bfa616ed486af5b9e9d14248e4172a5bdc Author: Alain Volmat Date: Tue Jun 25 10:29:55 2024 +0200 media: i2c: gc2145: use CCI_REG16_LE for little-endian registers Use CCI_REG16_LE macro in order to access little-endian encoded registers of the P3 (CSI) section. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 24d76ba94ca811e5d6c9731f468c420cfcfb272a Author: Alain Volmat Date: Tue Jun 25 10:29:54 2024 +0200 media: i2c: gc2145: addition of RAW8 formats support Adds support for RAW8 formats (BGGR/RGGB/RBRG/BRBG). Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: fix typo: colospace -> colorspace] commit 77d32b7e2a7b2e5389b67363d25371b4b8cad140 Author: Alain Volmat Date: Mon Jun 24 10:41:22 2024 +0200 media: stm32: dcmipp: correct error handling in dcmipp_create_subdevs Correct error handling within the dcmipp_create_subdevs by properly decrementing the i counter when releasing the subdeves. Fixes: 28e0f3772296 ("media: stm32-dcmipp: STM32 DCMIPP camera interface driver") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5b683b20309c0f45f2894ac0d01af25a61feffc5 Author: Jacopo Mondi Date: Wed Jun 26 20:14:38 2024 +0200 media: admin-guide: Document the Raspberry Pi PiSP BE Add documentation for the PiSP Back End memory-to-memory ISP. Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 12187bd5d4f8c128c9deca1b7f95fde78eecf99b Author: Naushir Patuck Date: Wed Jun 26 20:14:37 2024 +0200 media: raspberrypi: Add support for PiSP BE Add support for the Raspberry Pi PiSP Back End. The driver has been upported from the Raspberry Pi kernel at revision f74893f8a0c2 ("drivers: media: pisp_be: Update seqeuence numbers of the buffers"). The ISP documentation is available at: https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf Signed-off-by: David Plowman Signed-off-by: Naushir Patuck Signed-off-by: Nick Hollinghurst Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: drop dev_err after platform_get_irq to fix a coccinelle check] commit cbc775e060cecbdb7210f46d8e7a65df2a865ee7 Author: Jacopo Mondi Date: Wed Jun 26 20:14:36 2024 +0200 media: dt-bindings: Add bindings for Raspberry Pi PiSP Back End Add bindings for the Raspberry Pi PiSP Back End memory-to-memory image signal processor. Datasheet: https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Naushir Patuck Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d260c1224786c870edbae09ef6ecf5f35361821e Author: Jacopo Mondi Date: Wed Jun 26 20:14:35 2024 +0200 media: uapi: Add PiSP Compressed RAW Bayer formats Add Raspberry Pi compressed RAW Bayer formats. The compression algorithm description is provided by Nick Hollinghurst from Raspberry Pi. Signed-off-by: Jacopo Mondi Reviewed-by: Naushir Patuck Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8f6c2202222faffa0959929d8cd9090254a60831 Author: Jacopo Mondi Date: Wed Jun 26 20:14:34 2024 +0200 media: uapi: Add meta pixel format for PiSP BE config Add format description for the PiSP Back End configuration parameter buffer. Signed-off-by: Jacopo Mondi Reviewed-by: Naushir Patuck Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c6c49bac8770ef95518faf20083e8b3e6150f45f Author: Jacopo Mondi Date: Wed Jun 26 20:14:33 2024 +0200 media: uapi: Add Raspberry Pi PiSP Back End uAPI Add the Raspberry Pi PiSP Back End uAPI header. The header defines the data type used to configure the PiSP Back End ISP. The detailed description of the types and of the ISP configuration procedure is available at https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d1741141d03f8f5535adaf5a2d5000da3be9fe90 Author: Jacopo Mondi Date: Wed Jun 26 20:14:32 2024 +0200 media: uapi: Add a pixel format for BGR48 and RGB48 Add BGR48 and RGB48 16-bit per component image formats. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Naushir Patuck Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit dd6aa1e1de44e9bb4b0f5d96dbf3f84d1e3f35b1 Author: Jacopo Mondi Date: Wed Jun 26 20:14:31 2024 +0200 media: uapi: pixfmt-luma: Document MIPI CSI-2 packing The Y10P, Y12P and Y14P format variants are packed according to the RAW10, RAW12 and RAW14 formats as defined by the MIPI CSI-2 specification. Document it. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Naushir Patuck Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 58de63ddd0ecc84548b8fd24c72deb3739365c78 Author: Jason-JH.Lin Date: Tue Jun 25 16:39:57 2024 +0800 soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation Add cmdq_pkt_logic_command to support math operation. cmdq_pkt_logic_command can append logic command to the CMDQ packet, ask GCE to execute a arithmetic calculate instruction, such as add, subtract, multiply, AND, OR and NOT, etc. Note that all arithmetic instructions are unsigned calculations. If there are any overflows, GCE will sent the invalid IRQ to notify CMDQ driver. Signed-off-by: Jason-JH.Lin Signed-off-by: Hsiao Chien Sung Link: https://lore.kernel.org/r/20240625083957.3540-1-jason-jh.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 7cc069d9286c21e0acb399da26a181bafdca4d7e Author: Hsiao Chien Sung Date: Thu Jun 20 00:50:24 2024 +0800 soc: mediatek: Disable 9-bit alpha in ETHDR When 9-bit alpha is enabled, its value will be converted from 0-255 to 0-256 (255 = not defined). This is designed for special HDR related calculation, which should be disabled by default, otherwise, alpha blending will not work correctly. Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240620-9bit_alpha-v1-1-13c69daaf29f@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 161ee1eb9ab2440553dac55ada8329de704b1ffd Author: AngeloGioacchino Del Regno Date: Wed Jun 19 12:30:34 2024 +0200 soc: mediatek: mtk-mutex: Add MDP_TCC0 mod to MT8188 mutex table MT8188's MDP3 is able to use MDP_TCC0, this mutex_mod bit does actually exist and it's the same as MT8195: add it to the table. Fixes: 26bb17dae6fa ("soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS") Reviewed-by: Fei Shao Link: https://lore.kernel.org/r/20240619103034.110377-1-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit ce6b63336f79ec5f3996de65f452330e395f99ae Author: Matthew Auld Date: Thu Jun 20 11:20:26 2024 +0100 drm/xe: fix error handling in xe_migrate_update_pgtables Don't call drm_suballoc_free with sa_bo pointing to PTR_ERR. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2120 Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Cc: # v6.8+ Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240620102025.127699-2-matthew.auld@intel.com commit 61bfcd190820d1dce846e58a4c9ddca8db4751ed Author: Lucas Stach Date: Wed Jun 19 20:22:00 2024 +0200 drm/bridge: analogix_dp: handle AUX transfer timeouts Timeouts on the AUX bus are to be expected in certain normal operating conditions. There is no need to raise an error log or re-initialize the whole AUX state machine. Simply acknowledge the AUX_ERR interrupt and let upper layers know about the timeout. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-14-l.stach@pengutronix.de commit e857142bbb6491693051f112c833072b9beb5627 Author: Lucas Stach Date: Wed Jun 19 20:21:59 2024 +0200 drm/bridge: analogix_dp: only read AUX status when an error occured All AUX error responses raise the AUX_ERR interrupt, so there is no need to read the AUX status register in normal operation. Only read the status when an error occurred and we can expect a different status than OK. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-13-l.stach@pengutronix.de commit 0fa5e37f874850e4cd09ba45e79ec698f4630da5 Author: Lucas Stach Date: Wed Jun 19 20:21:58 2024 +0200 drm/bridge: analogix_dp: simplify and correct PLL lock checks Move the wait loop into its own function, so it doesn't need to be replicated in multiple locations. Also move the PLL lock checks between setting the link bandwidth, which may cause the PLL to unlock, and the MACRO_RST which needs the PLL to be locked. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-12-l.stach@pengutronix.de commit 917c8d192ba6ada16b4cf11c786f3dbfe70de0d9 Author: Lucas Stach Date: Wed Jun 19 20:21:57 2024 +0200 drm/bridge: analogix_dp: don't wait for PLL lock too early The PLL will be reconfigured later, which may cause it to go out of lock anyway, so there is no point in waiting for the PLL to lock here. Instead we can continue execution of the link setup, which will properly set the PLL parameters and will wait for the PLL to lock at the appropriate times. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-11-l.stach@pengutronix.de commit 90986e356c7a81d32550475f7de5bdc4cd878c2f Author: Lucas Stach Date: Wed Jun 19 20:21:56 2024 +0200 drm/bridge: analogix_dp: move macro reset after link bandwidth setting Setting the link bandwidth may change the PLL parameters, which will cause the PLL to go out of lock, so make sure to apply the MACRO_RST, which according to the comment is required to be pulsed after the PLL is locked. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-10-l.stach@pengutronix.de commit b8a4cdbb01312ac72e189072a1058f7948c07f9e Author: Lucas Stach Date: Wed Jun 19 20:21:55 2024 +0200 drm/bridge: analogix_dp: remove PLL lock check from analogix_dp_config_video This check is way too late in the DP enable flow. The PLL must be locked much earlier, before any link training can happen. If the PLL is unlocked at that point in time there is something seriously wrong in the enable flow. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Reviewed-by: Robet Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-9-l.stach@pengutronix.de commit 3efe2ace7f5b1199c1d6f250aa9bb50e19c38f50 Author: Lucas Stach Date: Wed Jun 19 20:21:54 2024 +0200 drm/bridge: analogix_dp: move basic controller init into runtime PM Make sure the controller is in a basic working state after runtime resume. Keep the analog function enable in the mode set path as this enables parts of the PHY that are only required to be powered when there is a data stream being sent out. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-8-l.stach@pengutronix.de commit 73f613908eb1c8a1361bac9d6e15d054ab959457 Author: Lucas Stach Date: Wed Jun 19 20:21:53 2024 +0200 drm/bridge: analogix_dp: move platform and PHY power handling into runtime PM Platform and PHY power isn't only required when the actual display data stream is active, but may be required earlier to support AUX channel transactions. Move them into the runtime PM calls, so they are properly managed whenever various other parts of the driver need them to be active. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-7-l.stach@pengutronix.de commit dcbaaa239dd3bf3d9edc01cdb4661a16d9a73520 Author: Lucas Stach Date: Wed Jun 19 20:21:52 2024 +0200 drm/bridge: analogix_dp: remove clk handling from analogix_dp_set_bridge The clock is already managed by runtime PM, which is properly invoked from the analogix_dp_set_bridge function, so there is no need for an additional reference. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-6-l.stach@pengutronix.de commit e7514df007e3b034b65367a32ba19dc61aaa3980 Author: Lucas Stach Date: Wed Jun 19 20:21:51 2024 +0200 drm/bridge: analogix_dp: remove unused analogix_dp_remove Now that the clock is handled dynamically through analogix_dp_resume/suspend and it isn't statically enabled in the driver probe routine, there is no need for the remove function anymore. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-5-l.stach@pengutronix.de commit f37952339cc234ede318722f85729471f8a87c85 Author: Lucas Stach Date: Wed Jun 19 20:21:50 2024 +0200 drm/bridge: analogix_dp: handle clock via runtime PM There is no reason to enable the controller clock in driver probe, as there is no HW initialization done in this function. Instead rely on either runtime PM to handle the controller clock or statically enable it in the driver bind routine, after which real hardware access is required to work. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-4-l.stach@pengutronix.de commit 2d192f4a3acc1c6fe47456e13327701e62074c95 Author: Lucas Stach Date: Wed Jun 19 20:21:49 2024 +0200 drm/bridge: analogix_dp: register AUX bus after enabling runtime PM AUX transactions require the controller to be in working state and take a runtime PM reference. To avoid potential races beween the first transactions on the bus and runtime PM being set up, move the AUX registration behind the runtime PM setup. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-3-l.stach@pengutronix.de commit c91b5bd7b1f40c46f3aaba460169457db1a78e5e Author: Lucas Stach Date: Wed Jun 19 20:21:48 2024 +0200 drm/rockchip: analogix_dp: add runtime PM handling Hook up the runtime PM suspend/resume paths to make the rockchip glue behave more like the exynos one. The same suspend/resume functions are used for system sleep via the runtime PM force suspend/resume. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-2-l.stach@pengutronix.de commit 6d4618ad04e1a14202410648f638b62d3f666d45 Author: Lucas Stach Date: Wed Jun 19 20:21:47 2024 +0200 drm/bridge: analogix_dp: remove unused platform power_on_end callback This isn't used, but gives the impression of the power on and power off platform calls being non-symmetrical. Remove the unused callback and rename the power_on_start to simply power_on. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240619182200.3752465-1-l.stach@pengutronix.de commit 54be78446d0ac117c1781b0f67e77f3a78f08529 Author: Geert Uytterhoeven Date: Wed Jun 26 10:41:45 2024 +0200 drm/panic: Restrict graphical logo handling to built-in When CONFIG_DRM_PANIC=y, but CONFIG_DRM=m: ld: drivers/gpu/drm/drm_panic.o: in function `drm_panic_setup_logo': drivers/gpu/drm/drm_panic.c:99: multiple definition of `init_module'; drivers/gpu/drm/drm_drv.o:drivers/gpu/drm/drm_drv.c:1079: first defined here Fix this by restricting the graphical logo handling and its device_initcall() to the built-in case. Logos are freed during late kernel initialization, so they are no longer available at module load time anyway. Fixes: 294bbd1f2697 ("drm/panic: Add support for drawing a monochrome graphical logo") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406261341.GYsbLpN1-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/4009fca99a7c05f617cc9899c6d0a5748415595d.1719391132.git.geert+renesas@glider.be commit e044e707fc97dac693691178cdf41fe1a8da928f Author: Geert Uytterhoeven Date: Wed Jun 26 10:41:44 2024 +0200 drm/panic: Do not select DRM_KMS_HELPER DRM core code cannot call into DRM helper code, as this would lead to circular references in the modular case. Hence drop the selection of DRM_KMS_HELPER. It was unused anyway, as v10 switched from using the DRM format helpers to its own color format conversion, cfr. commit 9544309775c3 ("drm/panic: Add support for color format conversion"). Remove the unneeded include of . Fixes: bf9fb17c6672 ("drm/panic: Add a drm panic handler") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/60155f8c939ed286e324a7c12a1daa69fe49fcf6.1719391132.git.geert+renesas@glider.be commit d79603c2be61ca9d4fafa89ac7f5d8cc78568af4 Author: AngeloGioacchino Del Regno Date: Thu Jun 20 12:16:55 2024 +0200 arm64: dts: mediatek: Declare drive-strength numerically On some devicetrees, the drive-strength property gets assigned a MTK_DRIVE_(x)_mA definition, which matches with (x). For example, MTK_DRIVE_8mA equals to 8 and MTK_DRIVE_30mA equals to 30. Also keeping in mind that the drive-strength property is, by (binding) definition, taking a number in milliamperes unit, change all devicetrees to avoid the usage of any MTK_DRIVE_(x) definition. Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240620101656.1096374-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 86b0e0c1ad47a01ad75ef0519d02d1f774fead55 Author: Marek Vasut Date: Tue Jun 25 14:02:34 2024 +0200 Revert "drm/bridge: tc358767: Set default CLRSIPO count" This reverts commit 01338bb82fed40a6a234c2b36a92367c8671adf0. With clock improvements in place, this seems to be no longer necessary. Set the CLRSIPO to default setting recommended by manufacturer. Reviewed-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240625120334.145320-5-marex@denx.de commit 9c433c87e81c2dfc005b72b9fe822b065ffa044e Author: Marek Vasut Date: Tue Jun 25 14:02:33 2024 +0200 drm/bridge: tc358767: Set LSCLK divider for SYSCLK to 1 The only information in the datasheet regarding this divider is a note in SYS_PLLPARAM register documentation which states that when LSCLK is 270 MHz, LSCLK_DIV should be 1. What should LSCLK_DIV be set to when LSCLK is 162 MHz (for DP 1.62G mode) is unclear, but empirical test confirms using LSCLK_DIV 1 has no adverse effects either. In the worst case, the internal TC358767 clock would run faster. Reviewed-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240625120334.145320-4-marex@denx.de commit 3f13e53bcf30583ab804d94973157d515330dd6e Author: Marek Vasut Date: Tue Jun 25 14:02:32 2024 +0200 drm/bridge: tc358767: Drop line_pixel_subtract This line_pixel_subtract is no longer needed now that the bridge can request and obtain specific pixel clock on input to the bridge, with clock frequency that matches the Pixel PLL frequency. The line_pixel_subtract is now always 0, so drop it entirely. The line_pixel_subtract was not reliable as it never worked when the Pixel PLL and input clock were off just so that the required amount of pixels to subtract would not be whole integer. Reviewed-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240625120334.145320-3-marex@denx.de commit a723d434009e8b8ac0bcbb322188061a94de1000 Author: Marek Vasut Date: Tue Jun 25 14:02:31 2024 +0200 drm/bridge: tc358767: Use tc_pxl_pll_calc() to correct adjusted_mode clock Use tc_pxl_pll_calc() to find out the exact clock frequency generated by the Pixel PLL. Use the Pixel PLL frequency as adjusted_mode clock frequency and pass it down the display pipeline to obtain exactly this frequency on input into this bridge. The precise input frequency that matches the Pixel PLL frequency is important for this bridge, as if the frequencies do not match, the bridge does suffer VFIFO overruns or underruns. Reviewed-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240625120334.145320-2-marex@denx.de commit 84708c2d180c32e216bf753f6627f00c03297bea Author: Marek Vasut Date: Tue Jun 25 14:02:30 2024 +0200 drm/bridge: tc358767: Split tc_pxl_pll_en() into parameter calculation and enablement Split tc_pxl_pll_en() into tc_pxl_pll_calc() which does only Pixel PLL parameter calculation and tc_pxl_pll_en() which calls tc_pxl_pll_calc() and then configures the Pixel PLL register. This is a preparatory patch for further rework, where tc_pxl_pll_calc() will also be used to find out the exact clock frequency generated by the Pixel PLL. This frequency will be used as adjusted_mode clock frequency and passed down the display pipeline to obtain exactly this frequency on input into this bridge. The precise input frequency that matches the Pixel PLL frequency is important for this bridge, as if the frequencies do not match, the bridge does suffer VFIFO overruns or underruns. Reviewed-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240625120334.145320-1-marex@denx.de commit d3e15189bfd4d0a9d3a7ad8bd0e6ebb1c0419f93 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:34 2024 +0200 selftests/hid: add an infinite loop test for hid_bpf_try_input_report We don't want this call to allow an infinite loop in HID-BPF, so let's have some tests. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-13-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 62f2e1a096cd4380eca7e55fa4369d50a8536ab8 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:33 2024 +0200 selftests/hid: add another test for injecting an event from an event hook Similar to test_multiply_events_wq: we receive one event and inject a new one. But given that this time we are already in the event hook, we can use hid_bpf_try_input_report() directly as this function will not sleep. Note that the injected event gets processed before the original one this way. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-12-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 9acbb7ba4589d4715141d4e14230a828ddc95f3d Author: Benjamin Tissoires Date: Wed Jun 26 15:46:32 2024 +0200 HID: bpf: allow hid_device_event hooks to inject input reports on self This is the same logic than hid_hw_raw_request or hid_hw_output_report: we can allow hid_bpf_try_input_report to be called from a hook on hid_input_report if we ensure that the call can not be made twice in a row. There is one extra subtlety in which there is a lock in hid_input_report. But given that we can detect if we are already in the hook, we can notify hid_input_report to not take the lock. This is done by checking if ctx_kern data is valid or null, and if it is equal to the dedicated incoming data buffer. In order to have more control on whether the lock needs to be taken or not we introduce a new kfunc for it: hid_bpf_try_input_report() Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-11-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit fe8d561db3e82a1130c59ebc143d557b0bdb0cff Author: Benjamin Tissoires Date: Wed Jun 26 15:46:31 2024 +0200 selftests/hid: add wq test for hid_bpf_input_report() Now that bpf_wq is available, we can write a test with it. Having hid_bpf_input_report() waiting for the device means that we can directly call it, and we get that event when the device is ready. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-10-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit fa03f398a8ac46f46927e0b509b302ebe0ed7e8a Author: Benjamin Tissoires Date: Wed Jun 26 15:46:30 2024 +0200 HID: bpf: make hid_bpf_input_report() sleep until the device is ready hid_bpf_input_report() is already marked to be used in sleepable context only. So instead of hammering with timers the device to hopefully get an available slot where the device is not sending events, we can make that kfunc wait for the current event to be terminated before it goes in. This allows to work with the following pseudo code: in struct_ops/hid_device_event: - schedule a bpf_wq, which calls hid_bpf_input_report() - once this struct_ops function terminates, hid_bpf_input_report() immediately starts before the next event Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-9-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 3ac83fcd6e67c86d25040e6818972f2c36b51d23 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:29 2024 +0200 selftests/hid: add tests for hid_hw_output_report HID-BPF hooks We add 3 new tests: - first, we make sure we can prevent the output_report to happen - second, we make sure that we can detect that a given hidraw client was actually doing the request, and for that client only, call ourself hid_bpf_hw_output_report(), returning a custom value - last, we ensure that we can not loop between hooks for hid_hw_output_report() and manual calls to hid_bpf_hw_output_report() from that same hook Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-8-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 9286675a2aed40a517be8cc4e283a04f473275b5 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:28 2024 +0200 HID: bpf: add HID-BPF hooks for hid_hw_output_report Same story than hid_hw_raw_requests: This allows to intercept and prevent or change the behavior of hid_hw_output_report() from a bpf program. The intent is to solve a couple of use case: - firewalling a HID device: a firewall can monitor who opens the hidraw nodes and then prevent or allow access to write operations on that hidraw node. - change the behavior of a device and emulate a new HID feature request The hook is allowed to be run as sleepable so it can itself call hid_hw_output_report(), which allows to "convert" one feature request into another or even call the feature request on a different HID device on the same physical device. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-7-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 015a4a2a439b285943da471d38b2721bbe4d8b39 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:27 2024 +0200 selftests/hid: add tests for hid_hw_raw_request HID-BPF hooks We add 3 new tests: - first, we make sure we can prevent the raw_request to happen - second, we make sure that we can detect that a given hidraw client was actually doing the request, and for that client only, call ourself hid_bpf_hw_request(), returning a custom value - last, we ensure that we can not loop between hooks for hid_hw_raw_request() and manual calls to hid_bpf_hw_request() from that hook Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-6-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 75839101ce52e319cb2154a027d14f1f0aa3be09 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:26 2024 +0200 HID: bpf: prevent infinite recursions with hid_hw_raw_requests hooks When we attach a sleepable hook to hid_hw_raw_requests, we can (and in many cases should) call ourself hid_bpf_raw_request(), to actually fetch data from the device itself. However, this means that we might enter an infinite loop between hid_hw_raw_requests hooks and hid_bpf_hw_request() call. To prevent that, if a hid_bpf_hw_request() call is emitted, we prevent any new call of this kfunc by storing the information in the context. This way we can always trace/monitor/filter the incoming bpf requests, while preventing those loops to happen. I don't think exposing "from_bpf" is very interesting because while writing such a bpf program, you need to match at least the report number and/or the source of the call. So a blind "if there is a hid_hw_raw_request() call, I'm emitting another one" makes no real sense. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-5-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:25 2024 +0200 HID: bpf: add HID-BPF hooks for hid_hw_raw_requests This allows to intercept and prevent or change the behavior of hid_hw_raw_request() from a bpf program. The intent is to solve a couple of use case: - firewalling a HID device: a firewall can monitor who opens the hidraw nodes and then prevent or allow access to write operations on that hidraw node. - change the behavior of a device and emulate a new HID feature request The hook is allowed to be run as sleepable so it can itself call hid_bpf_hw_request(), which allows to "convert" one feature request into another or even call the feature request on a different HID device on the same physical device. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-4-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 6cd735f0e57a6c8510ad92f5b63837a8d0cff3a7 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:24 2024 +0200 HID: bpf: protect HID-BPF prog_list access by a SRCU We want to add sleepable callbacks for hid_hw_raw_request() and hid_hw_output_report(), but we can not use a plain RCU for those. Prepare for a SRCU so we can extend HID-BPF. This changes a little bit how hid_bpf_device_init() behaves, as it may now fail, so there is a tiny hid-core.c change to accommodate for this. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-3-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 67eccf151d76a9939ad8a50c6db5cb486b01df24 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:23 2024 +0200 HID: add source argument to HID low level functions This allows to know who actually sent what when we process the request to the device. This will be useful for a BPF firewall program to allow or not requests coming from a dedicated hidraw node client. Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-2-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit ebae0b2a6f4b3b949f30f076fbc65d3b0bb04785 Author: Benjamin Tissoires Date: Wed Jun 26 15:46:22 2024 +0200 HID: bpf: fix dispatch_hid_bpf_device_event uninitialized ret value Looks like if a bpf program gets inserted and then removed, hdev->bpf.device_data is then allocated, but the loop iterating over the bpf program is never assigning ret. This is a problem and also revealed another bug in which only the last value of ret was checked. This effectively meant than only the last program in the chain could change the size of the incoming buffer. Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/00f7b624-219f-4a05-a7ad-5335f15a41c7@moroto.mountain Fixes: 4a86220e046d ("HID: bpf: remove tracing HID-BPF capability") Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-1-cfd60fb6c79f@kernel.org Acked-by: Jiri Kosina Signed-off-by: Benjamin Tissoires commit 04f38d1a4db017f17e82442727b91ce03dd72759 Author: Daniel González Cabanelas Date: Thu Jun 20 17:26:45 2024 +0200 mips: bmips: enable RAC on BMIPS4350 The data RAC is left disabled by the bootloader in some SoCs, at least in the core it boots from. Enabling this feature increases the performance up to +30% depending on the task. Signed-off-by: Daniel González Cabanelas Signed-off-by: Álvaro Fernández Rojas [ rework code and reduce code duplication ] Acked-by: Florian Fainelli Signed-off-by: Christian Marangi Signed-off-by: Thomas Bogendoerfer commit b95b30e50aed225d26e20737873ae2404941901c Author: Christian Marangi Date: Thu Jun 20 17:26:44 2024 +0200 mips: bmips: setup: make CBR address configurable Add support to provide CBR address from DT to handle broken SoC/Bootloader that doesn't correctly init it. This permits to use the RAC flush even in these condition. To provide a CBR address from DT, the property "brcm,bmips-cbr-reg" needs to be set in the "cpus" node. On DT init, this property presence will be checked and will set the bmips_cbr_addr value accordingly. Also bmips_rac_flush_disable will be set to false as RAC flush can be correctly supported. The CBR address from DT will overwrite the cached one and the one set in the CBR register will be ignored. Also the DT CBR address is validated on being outside DRAM window. Signed-off-by: Christian Marangi Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 3de96d810ffd712b7ad2bd764c1390fac2436551 Author: Christian Marangi Date: Thu Jun 20 17:26:43 2024 +0200 dt-bindings: mips: brcm: Document brcm,bmips-cbr-reg property Document brcm,bmips-cbr-reg property. Some SoC suffer from a BUG where CBR(Core Base Register) address might be badly or never initialized by the Bootloader or reading it from co-processor registers, if the system boots from secondary CPU, results in invalid address. The CBR address is always the same on the SoC. Usage of this property is to give an address also in these broken configuration/bootloader. Signed-off-by: Christian Marangi Acked-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit a5c05453a13ab324ad8719e8a23dfb6af01f3652 Author: Christian Marangi Date: Thu Jun 20 17:26:42 2024 +0200 mips: bmips: rework and cache CBR addr handling Rework the handling of the CBR address and cache it. This address doesn't change and can be cached instead of reading the register every time. This is in preparation of permitting to tweak the CBR address in DT with broken SoC or bootloader. bmips_cbr_addr is defined in setup.c for each arch to keep compatibility with legacy brcm47xx/brcm63xx and generic BMIPS target. Acked-by: Florian Fainelli Signed-off-by: Christian Marangi Signed-off-by: Thomas Bogendoerfer commit 7c48090af524410fe72754be5f4cfd92d9487957 Merge: 77543269ff23c 0d5679a0aae2d Author: Thomas Bogendoerfer Date: Thu Jun 27 10:42:37 2024 +0200 Merge branch 'mips-fixes' into mips-next commit fcf1f960a6aa45a22efd4d49114c672ed305b85f Author: Matti Vaittinen Date: Thu Jun 27 10:44:16 2024 +0300 MAINTAINERS: Add ROHM BD96801 'scalable PMIC' entries Add maintainer entries for ROHM BD96801 a.k.a 'scalable PMIC' drivers to be reviewed by ROHM people. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/5ff9616567983611ea0b07a91403ea848451a339.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 09dad69757b6600f6de5b547323e81235fc61d6c Author: Matti Vaittinen Date: Thu Jun 27 10:43:55 2024 +0300 watchdog: ROHM BD96801 PMIC WDG driver Introduce driver for WDG block on ROHM BD96801 scalable PMIC. This driver only supports watchdog with I2C feeding and delayed response detection. Whether the watchdog toggles PRSTB pin or just causes an interrupt can be configured via device-tree. The BD96801 PMIC HW supports also window watchdog (too early feeding detection) and Q&A mode. These are not supported by this driver. Signed-off-by: Matti Vaittinen Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/bb3a49d606e793a61b0c033170ff2a9f30f3c2a5.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit a9b7ce28fd02aade85ce0baadcf6eedcf6147726 Author: Matti Vaittinen Date: Thu Jun 27 10:43:40 2024 +0300 regulator: bd96801: ROHM BD96801 PMIC regulators The ROHM BD96801 "Scalable PMIC" is an automotive grade PMIC which can scale to different applications by allowing chaining of PMICs. The PMIC also supports various protection features which can be configured either to fire IRQs - or to shut down power outputs when failure is detected. The driver implements basic voltage control and sending error notifications. NOTE: The driver does not support doing configuration which require the PMIC to be in STBY state. The omitted feature set includes setting safety limit values, changing LDO voltages and controlling enable state for some regulators. Also, the ERRB IRQ is not handled. Signed-off-by: Matti Vaittinen Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/50cf02b046df218a21a0f9c4820531d821fc20d4.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 7276f425b744a81eb5a8e519b0c452d5e64b530c Author: Matti Vaittinen Date: Thu Jun 27 10:43:27 2024 +0300 mfd: support ROHM BD96801 PMIC core The ROHM BD96801 PMIC is highly customizable automotive grade PMIC which integrates regulator and watchdog funtionalities. Provide INTB IRQ and register accesses for regulator/watchdog drivers. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/c5260e2dd222e3c64cdf410802bba195637ccb93.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 8b1a39362ba989849bc3978d03f56f6eb3f290b3 Author: Matti Vaittinen Date: Thu Jun 27 10:43:12 2024 +0300 dt-bindings: mfd: bd96801 PMIC core ROHM BD96801 is a highly configurable automotive grade PMIC. Introduce DT bindings for the BD96801 core. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/9fa3f30dede2b85871a89b20fe1eb13549418489.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit fd6e053d23ddf7c1b2c94d2aa8e53d8bc698c052 Author: Matti Vaittinen Date: Thu Jun 27 10:42:56 2024 +0300 dt-bindings: ROHM BD96801 PMIC regulators ROHM BD96801 is a highly configurable automotive grade PMIC. Introduce DT bindings for the BD96801 regulators. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/53a05b77833cb3f06ecada906411c2f46eecea64.1719473802.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones commit 174614d889a2315ebe48b7138db5cde9cc6428e5 Author: Krzysztof Kozlowski Date: Wed Jun 26 12:09:14 2024 +0200 dt-bindings: soc: ti: am654-serdes-ctrl: Move to dedicated schema ti,am654-serdes-ctrl is not a simple syscon device - it has children - thus it should be fully documented in its own binding. Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-5-3409903bb99b@linaro.org Signed-off-by: Lee Jones commit 430ed952ed57bab9164a4bdfd0e73c6c523f11b0 Author: Krzysztof Kozlowski Date: Wed Jun 26 12:09:13 2024 +0200 dt-bindings: soc: microchip: sparx5-cpu-syscon: Move to dedicated schema microchip,sparx5-cpu-syscon is not a simple syscon device - it has children and implements simple-mfd compatible - thus it should be fully documented in its own binding. Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-4-3409903bb99b@linaro.org Signed-off-by: Lee Jones commit c94ee67abd9d22d2f8cff93b3581d99695babe9f Author: Krzysztof Kozlowski Date: Wed Jun 26 12:09:12 2024 +0200 dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema intel,lgm-syscon is not a simple syscon device - it has children - thus it should be fully documented in its own binding. Reviewed-by: Conor Dooley Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-3-3409903bb99b@linaro.org Signed-off-by: Lee Jones commit cf87496ba236989a30995e9b98abd65651f5e629 Author: Krzysztof Kozlowski Date: Wed Jun 26 12:09:11 2024 +0200 dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon Document sprd,sc9863a-glbregs compatible already used in DTS and other bindings example. Reviewed-by: Rob Herring (Arm) Reviewed-by: Baolin Wang Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-2-3409903bb99b@linaro.org Signed-off-by: Lee Jones commit 7661e680692e8cb70bf92f0e9b567849e2b6405a Author: Krzysztof Kozlowski Date: Wed Jun 26 12:09:10 2024 +0200 dt-bindings: mfd: syscon: Drop hwlocks Apparently there is no in-tree DTS syscon node having hwlocks, so drop the property to simplify the binding. Acked-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-1-3409903bb99b@linaro.org Signed-off-by: Lee Jones commit df768350a87031971a3c834b480aef6ad6f1f1a0 Author: Frank Wunderlich Date: Thu May 16 22:48:47 2024 +0200 arm64: dts: mt7622: fix switch probe on bananapi-r64 After commit 868ff5f4944a ("net: dsa: mt7530-mdio: read PHY address of switch from device tree") the mt7531 switch on Bananapi-R64 was not detected. mt7530-mdio mdio-bus:00: reset timeout mt7530-mdio mdio-bus:00: probe with driver mt7530-mdio failed with error -110 Fix this by adding phy address in devicetree. Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20240516204847.171029-1-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 321ad586e6073e33dd576ec33ae1803db3b1e717 Author: Chen-Yu Tsai Date: Thu Jun 20 17:47:38 2024 +0800 arm64: dts: mediatek: Add MT8186 Voltorb Chromebooks Add device trees for the MT8186 based Voltorb Chromebooks, also known as the Acer Chromebook 311 (C723/C723T). The devices are clamshell style laptops with an optional touchscreen. The devices differ from the other existing MT8186 Chromebooks in that it uses a higher speced / binned SoC which also requires a separate PMIC for the big core cluster. Also, a different codec is used for the internal speakers. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240620094746.2404753-4-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 9b4e41428498651da04e0ceca879958a6703b4dd Author: Chen-Yu Tsai Date: Thu Jun 20 17:47:37 2024 +0800 dt-bindings: arm: mediatek: Add MT8186 Voltorb Chromebooks Add an entry for the MT8186 based Voltorb Chromebooks, also known as the Acer Chromebook 311 (C723/C723T). The device is a clamshell style laptop with an optional touchscreen. Signed-off-by: Chen-Yu Tsai Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240620094746.2404753-3-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit db77778a405aa0431835939f8482bea0adb26fe5 Author: AngeloGioacchino Del Regno Date: Thu Jun 20 12:18:30 2024 +0200 arm64: dts: mediatek: Makefile: Generate symbols for DTBO support Add DTC_FLAGS '-@' for mt7986a-bananapi-bpi-r3 and -mini to instruct the devicetree compiler to enable generation of symbols. This allows proper support for Device Tree Overlay(s) for those boards; future boards that need DTBO support are expected to add their own DTC_FLAGS_{dtb-name}. Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240620101830.1097548-1-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 4055416e6c51347e7dd5784065263fe0ced0bb7d Author: Chen-Yu Tsai Date: Wed Jan 31 16:39:29 2024 +0800 arm64: dts: mediatek: mt8183-kukui-jacuzzi: Add ports node for anx7625 The anx7625 binding requires a "ports" node as a container for the "port" nodes. The jacuzzi dtsi file is missing it. Add a "ports" node under the anx7625 node, and move the port related nodes and properties under it. Fixes: cabc71b08eb5 ("arm64: dts: mt8183: Add kukui-jacuzzi-damu board") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240131083931.3970388-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 70bf81dd2c2dedbed1f19dfc5d1d2f22474a5296 Author: Chen-Yu Tsai Date: Wed Jan 31 16:40:41 2024 +0800 arm64: dts: mediatek: mt8183-pico6: Fix wake-on-X event node names The wake-on-bt and wake-on-wlan nodes don't have a button- or event- prefix that the gpio-keys binding requires. Fix up the node names to satisfy the binding. While at it, also fix up the GPIO overriding structure for the wake-on-wlan node. Instead of referencing the gpio-keys node and then open coding the node, add a label for the event node, and use that to reference and override the GPIO settings. Fixes: 055ef10ccdd4 ("arm64: dts: mt8183: Add jacuzzi pico/pico6 board") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240131084043.3970576-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 0b2f9d0e397b6c2d510d118bac036f7f6bb3c3db Author: Pin-yen Lin Date: Wed Nov 15 12:35:01 2023 +0800 arm64: dts: mt8173: Add G2Touch touchscreen node Lenovo Ideapad C330 Chromebook (MTK) uses G2Touch touchscreen as a second source component. Signed-off-by: Pin-yen Lin Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20231115043511.2670477-1-treapking@chromium.org [Angelo: Rebased and added comment] Signed-off-by: AngeloGioacchino Del Regno commit 95173af725e6f41eb470466a52ddf2054439409c Author: Hsin-Te Yuan Date: Thu Jun 13 11:58:54 2024 +0000 arm64: dts: mediatek: mt8183-kukui: Fix the value of `dlg,jack-det-rate` mismatch According to Documentation/devicetree/bindings/sound/dialog,da7219.yaml, the value of `dlg,jack-det-rate` property should be "32_64" instead of "32ms_64ms". Fixes: dc0ff0fa3a9b ("ASoC: da7219: Add Jack insertion detection polarity") Signed-off-by: Hsin-Te Yuan Link: https://lore.kernel.org/r/20240613-jack-rate-v2-1-ebc5f9f37931@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit c44589a890ffd64fbb2813eaadab143c347ef909 Author: AngeloGioacchino Del Regno Date: Mon May 27 11:39:08 2024 +0200 arm64: dts: mediatek: mt8188: Add support for Mali GPU on Panfrost Add the necessary OPP table for the GPU and also add a GPU node to enable support for the Valhall-JM G57 MC3 found on this SoC, using the Panfrost driver. Link: https://lore.kernel.org/r/20240527093908.97574-6-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit eaf73e4224a348ef228de6b0b6fa0c7da91d0e25 Author: AngeloGioacchino Del Regno Date: Mon May 27 11:39:07 2024 +0200 arm64: dts: mediatek: mt8188: Add support for SoC power domains In preparation for adding support for hardware IP that requires power switching, add the necessary power domains nodes for the MT8188 SoC. Link: https://lore.kernel.org/r/20240527093908.97574-5-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit e15d0dd73eacf8cce08725631b99e45ff58061f9 Author: AngeloGioacchino Del Regno Date: Mon May 27 11:39:06 2024 +0200 arm64: dts: mediatek: mt8188: Add VDOSYS0/1 support for multimedia Add support for the two VDOSYS blocks in MT8188, later on used for various Multimedia related IP, including display and video codecs. Link: https://lore.kernel.org/r/20240527093908.97574-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 45682a4fffdd9abd6e2df9c5c534d22f2eda94f9 Author: AngeloGioacchino Del Regno Date: Mon May 27 11:39:05 2024 +0200 arm64: dts: mediatek: mt8188: Add Global Command Engine mailboxes In preparation for adding multimedia nodes and power domains, add support for the two Global Command Engine (GCE) mailboxes found in this SoC. Link: https://lore.kernel.org/r/20240527093908.97574-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b220332f9849e82b55d566a40f9c8457b177e232 Author: Krzysztof Kozlowski Date: Wed Jun 12 11:24:21 2024 +0200 arm64: dts: mediatek: mt8173-elm: drop PMIC's syscon node According to AngeloGioacchino Del Regno, the syscon node in PMIC is neither needed nor used. It looks like a solution to expose some of the registers of PMIC. Drop it to solve also incorrect number of entries in the "reg" property and fix dtbs_check warning: mt8173-elm.dtb: syscon@c000: reg: [[0, 49152], [0, 264]] is too long Link: https://lore.kernel.org/all/671a4b1e-3d95-438c-beae-d967e0ad1c77@collabora.com/ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612092421.52917-3-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno commit cc827572ad153d63b5f1a3b376727681bcba567e Author: Krzysztof Kozlowski Date: Wed Jun 12 11:24:20 2024 +0200 arm64: dts: mediatek: mt8365: use a specific SCPSYS compatible SoCs should use dedicated compatibles for each of their syscon nodes to precisely describe the block. Using an incorrect compatible does not allow to properly match/validate children of the syscon device. Replace SYSCFG compatible, which does not have children, with a new dedicated one for SCPSYS block. Reviewed-by: Alexandre Mergnat Tested-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612092421.52917-2-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno commit 1e8a1a9ea21831a32555e25174b7587668326bbc Author: Krzysztof Kozlowski Date: Wed Jun 12 11:24:19 2024 +0200 arm64: dts: mediatek: mt8365: drop incorrect power-domain-cells The top SCPSYS node is not a power domain provider. It's child "power-controller" is instead. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612092421.52917-1-krzysztof.kozlowski@linaro.org Signed-off-by: AngeloGioacchino Del Regno commit c3e87229b0fd8917af8dad6af94744c94929ed95 Author: Rafał Miłecki Date: Tue Jun 4 08:31:59 2024 +0200 arm64: dts: mediatek: mt7981: add I2C controller MT7981 has one on-SoC I2C controller that differs from recent Mediatek blocks by having a different SLAVE_ADDR register offset (thus a custom binding compatible string). Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20240604063159.29216-1-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit aebba1030a5766cdf894ed4ab0cac7aed5aee9c1 Author: Rafał Miłecki Date: Tue Jun 4 09:49:16 2024 +0200 arm64: dts: mediatek: mt7622: fix "emmc" pinctrl mux Value "emmc_rst" is a group name and should be part of the "groups" property. This fixes: arch/arm64/boot/dts/mediatek/mt7622-rfb1.dtb: pinctrl@10211000: emmc-pins-default:mux:function: ['emmc', 'emmc_rst'] is too long from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7622-pinctrl.yaml# arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dtb: pinctrl@10211000: emmc-pins-default:mux:function: ['emmc', 'emmc_rst'] is too long from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7622-pinctrl.yaml# Fixes: 3725ba3f5574 ("arm64: dts: mt7622: add pinctrl related device nodes") Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board") Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240604074916.7929-1-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 660c230bf30280334931bfcb4fb815998433ff57 Author: Rafał Miłecki Date: Tue Jun 4 08:43:02 2024 +0200 arm64: dts: mediatek: mt7988: add I2C controllers MT7988 has three on-SoC I2C controllers that are the same hardware blocks as already noticed on MT7981 chipsets. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20240604064302.487-2-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 09ff2216a035709967096210cea144563bbc3259 Author: Rafał Miłecki Date: Tue Jun 4 08:43:01 2024 +0200 arm64: dts: mediatek: mt7988: add PWM controller MT7988 has on-SoC controller that can control up to 8 PWM interfaces. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20240604064302.487-1-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 95c465c439541bd5f38ced2f827f0f069bcc118e Author: Rafał Miłecki Date: Mon May 27 13:59:33 2024 +0200 arm64: dts: mediatek: Add OpenWrt One OpenWrt One is the first ever OpenWrt product. It's based on MT7981B (AKA Filogic 820) and has 1 GiB or DDR4 RAM. The rest of peripherals remains to be added later. Signed-off-by: Rafał Miłecki Reviewed-by: Linus Walleij Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240527115933.7396-4-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit ff31b980c4e198e9807092c25bc96ed89231dd8a Author: Rafał Miłecki Date: Mon May 27 13:59:32 2024 +0200 dt-bindings: arm64: dts: mediatek: Add OpenWrt One OpenWrt One is the first ever OpenWrt product. It's based on MT7981B and has entered an early production stage. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240527115933.7396-3-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 1061f1b6610a87e1064cc914cb20210a0ca7b83d Author: Rafał Miłecki Date: Mon May 27 13:59:31 2024 +0200 dt-bindings: vendor-prefixes: add OpenWrt OpenWrt project (with the help of MediaTek and Banana Pi) has produced its very first own hardware. It needs its own prefix. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240527115933.7396-2-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit a098310bee5dbdfdea1265f137afad3e96d5ae86 Author: Frank Wunderlich Date: Fri May 10 11:57:07 2024 +0200 arm64: dts: mediatek: Add mt7986 based Bananapi R3 Mini Add devicetree for Bananapi R3 Mini SBC. Key features: - MediaTek MT7986A(Filogic 830) Quad core ARM Cortex A53 - Wifi 6 2.4G/5G (MT7976C) - 2G DDR RAM - 8G eMMC flash - 128MB Nand flash - 2x 2.5GbE network port - 1x M.2 Key B USB interface - 1x M.2 KEY M PCIe interface - 1x USB2.0 interface source: https://wiki.banana-pi.org/Banana_Pi_BPI-R3_Mini Co-developed-by: Eric Woudstra Signed-off-by: Eric Woudstra Co-developed-by: Tianling Shen Signed-off-by: Tianling Shen Signed-off-by: Frank Wunderlich Reviewed-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240510095707.6895-3-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 4e293c219e8e6b4a0c3aeeb4388836947ca478e3 Author: Frank Wunderlich Date: Fri May 10 11:57:06 2024 +0200 dt-bindings: arm64: mediatek: add BananaPi R3 Mini Add MT7988A based BananaPi R3 Mini. Signed-off-by: Frank Wunderlich Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240510095707.6895-2-linux@fw-web.de Signed-off-by: AngeloGioacchino Del Regno commit 454880d6168cc908d5f45a81a9aa6bdddf2ebc55 Author: Rafał Miłecki Date: Tue May 14 03:51:54 2024 +0200 arm64: dts: mediatek: mt7981: add efuse block MT7981 (Filogic 820) uses efuse for storing calibration data. Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240514015154.11206-2-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit f80cfe9616b7448eca709a3e87ca57201cd5787c Author: Rafał Miłecki Date: Fri Apr 5 12:50:30 2024 +0200 arm64: dts: mediatek: mt7981: fix code alignment for PWM clocks Align "clocks" array entries to start at the same column. Fixes: cf29427573cc ("arm64: dts: mediatek: Add initial MT7981B and Xiaomi AX3000T") Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20240405105030.24559-1-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit f14cdf03d1b9c1ce45b3752a54c500c36d26d3dc Author: Geert Uytterhoeven Date: Wed May 29 14:06:14 2024 +0200 arm64: dts: mediatek: mt7986a: bpi-r3: Convert to sugar syntax Overlay syntactic sugar for generating target-path fragments is supported by the version of dtc supplied with the kernel since commit 50aafd60898a8b3e ("scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc"). Hence convert the Bananapi R3 overlay devicetree source files to sugar syntax, improving readability. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/2fd900a30b5a0f7de4ea68f60bac250794b8cdb4.1716984213.git.geert+renesas@glider.be Signed-off-by: AngeloGioacchino Del Regno commit 897a7edba9330974726c564dfdbf4fb5e203b9ac Author: Pin-yen Lin Date: Thu May 2 23:39:51 2024 +0800 arm64: dts: mediatek: mt8192-asurada: Add off-on-delay-us for pp3300_mipibrdg Set off-on-delay-us to 500000 us for pp3300_mipibrdg to make sure it complies with the panel's unprepare delay (the time to power down completely) of the power sequence. Explicit configuration on the regulator node is required because mt8192-asurada uses the same power supply for the panel and the anx7625 DP bridge. For example, the power sequence could be violated in this sequence: 1. Bridge on: panel goes off, but regulator doesn't turn off (refcount=1). 2. Bridge off: regulator turns off (refcount=0). 3. Bridge resume -> regulator turns on but the bridge driver doesn't check the delay. Or in this sequence: 1. Bridge on: panel goes off. The regulator doesn't turn off (refcount=1), but the .unprepared_time in panel_edp is still updated. 2. Bridge off, regulator goes off (refcount=0). 3. Panel on, but the panel driver uses the wrong .unprepared_time to check the unprepare delay. Fixes: f9f00b1f6b9b ("arm64: dts: mediatek: asurada: Add display regulators") Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240502154455.3427793-1-treapking@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 94aaf79a6af5d64bad9f6de72a241722a1d8b9df Author: Michael Walle Date: Mon Apr 8 10:08:16 2024 +0200 arm64: dts: mediatek: add Kontron 3.5"-SBC-i1200 Add basic support for the Kontron 3.5" single board computer featuring a Mediatek i1200 SoC (MT8395/MT8195). Signed-off-by: Michael Walle Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240408080816.4134370-2-mwalle@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit 1b4472430f659369694fe7483995fd39c8d543b6 Author: Michael Walle Date: Mon Apr 8 10:08:15 2024 +0200 dt-bindings: arm64: mediatek: add Kontron 3.5"-SBC-i1200 Add the compatible string for the Kontron 3.5"-SBC-i1200 single board computer. Signed-off-by: Michael Walle Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240408080816.4134370-1-mwalle@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit 666e6f39faff05fe12bfc64c64aa9015135ce783 Author: Macpaul Lin Date: Fri Feb 16 17:57:51 2024 +0800 arm64: dts: mediatek: mt8395-genio-1200-evk: add u3port1 for xhci1 This patch fixes an issue where xhci1 was not functioning properly because the state and PHY settings were incorrect. The introduction of the 'force-mode' property in the phy-mtk-tphy driver allows for the correct initialization of xhci1 by updating the Device Tree settings accordingly. The necessary fixup which added support for the 'force-mode' switch in the phy-mtk-tphy driver. commit 9b27303003f5 ("phy: mediatek: tphy: add support force phy mode switch") Link: https://lore.kernel.org/r/20231211025624.28991-2-chunfeng.yun@mediatek.com Prior to this fix, the system would exhibit the following probe failure messages for xhci1: xhci-mtk 11290000.usb: supply vbus not found, using dummy regulator xhci-mtk 11290000.usb: uwk - reg:0x400, version:104 xhci-mtk 11290000.usb: xHCI Host Controller xhci-mtk 11290000.usb: new USB bus registered, assigned bus number 5 xhci-mtk 11290000.usb: clocks are not stable (0x1003d0f) xhci-mtk 11290000.usb: can't setup: -110 xhci-mtk 11290000.usb: USB bus 5 deregistered xhci-mtk: probe of 11290000.usb failed with error -110 With the application of this dts fixup, the aforementioned initialization errors are resolved and xhci1 is working. Signed-off-by: Macpaul Lin Link: https://lore.kernel.org/r/20240216095751.4937-1-macpaul.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 52b7afd5b9afa96b36633256abebd995872f1c76 Author: AngeloGioacchino Del Regno Date: Thu Mar 14 11:35:00 2024 +0100 arm64: mediatek: mt8195-cherry: Introduce the MT8195 Dojo Chromebook Add a devicetree for the Cherry Dojo (HP Chromebook x360 13b-ca0002sa) convertible type machine. Differences with the already supported Tomato machines include: - Different speaker amplifiers (Dual MAX98380, one per channel) - I2C Touchscreen is on a different address (though still a HID device) - Has NVMe storage on the PCIe0 controller - Slightly different keyboard top row keymap Link: https://lore.kernel.org/r/20240314103500.93158-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit a43bf5bebd24e7bb5fc1b47f8c95d1a52378fc8a Author: AngeloGioacchino Del Regno Date: Thu Mar 14 11:34:59 2024 +0100 dt-bindings: arm: mediatek: Add MT8195 HP Chromebook x360 13b-ca0002sa Add the MT8195 Cherry platform's Dojo machine, a convertible design commercially known as the HP Chromebook x360 (13b-ca0002sa). Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240314103500.93158-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 458d92b55b87d2586d586f1e9ab010ce068dd14c Author: AngeloGioacchino Del Regno Date: Tue Apr 16 09:14:10 2024 +0200 arm64: dts: mediatek: mt8186-corsola: Specify sound DAI links and routing The drivers and bindings acquired support for specifying audio hardware and links in device tree: describe and link the sound related HW of this machine. Link: https://lore.kernel.org/r/20240416071410.75620-19-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 87728e3ccf352dd9fd482f894e73d12102bf9014 Author: AngeloGioacchino Del Regno Date: Tue Apr 16 09:14:09 2024 +0200 arm64: dts: mediatek: mt8195-cherry: Specify sound DAI links and routing The drivers and bindings acquired support for specifying audio hardware and links in device tree: describe and link the sound related HW of this machine. Link: https://lore.kernel.org/r/20240416071410.75620-18-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 27f0974a982998d59c645489da9dd99e4c6bafb2 Author: Chen-Yu Tsai Date: Fri Apr 12 15:55:14 2024 +0800 arm64: dts: mediatek: Drop mediatek,drive-strength-adv usage The "mediatek,drive-strength-adv" pin config property has been deprecated in favor of the generic "drive-strength-microamp" property. Drop or convert all instances. A value of 0 disables the advanced mode, which is the hardware default. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240412075516.1199846-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit e9a9055fdcdc1e5a27cef118c5b4f09cdd2fa28e Author: Chen-Yu Tsai Date: Fri Apr 12 15:56:12 2024 +0800 arm64: dts: mediatek: mt8183-kukui: Drop bogus output-enable property The "output-enable" property is set on uart1's RTS pin. This is bogus because the hardware does not actually have a controllable output buffer. Secondly, the implementation incorrectly treats this property as a request to switch the pin to GPIO output. This does not fit the intended semantic of "output-enable" and it does not have any affect either because the pin is muxed to the UART function, not the GPIO function. Drop the property. Fixes: cd894e274b74 ("arm64: dts: mt8183: Add krane-sku176 board") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240412075613.1200048-1-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 7ca7bbd28983e640c7b58e231d69911a84f5ec8a Author: AngeloGioacchino Del Regno Date: Tue Apr 9 13:42:11 2024 +0200 arm64: dts: mediatek: mt8395-nio-12l: Add power supplies for CPU/GPU scaling Add the necessary power supplies to safely enable CPU and GPU frequency scaling. Link: https://lore.kernel.org/r/20240409114211.310462-6-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 9af42385908bb4c33adf9f39af51ba269dbf9882 Author: AngeloGioacchino Del Regno Date: Tue Apr 9 13:42:10 2024 +0200 arm64: dts: mediatek: mt8395-nio-12l: Enable PHYs and USB role switch Enable the PCIe0 PHY to be able to set calibrations read from eFuses, improving the stability and performance of the PCIe link. While at it, also enable the T-PHYs for both PCIe1 and for USB, allowing the USB ports to finally switch to gadget mode if needed, and configure the VBUS/ID pins of both USB ports for the same. Link: https://lore.kernel.org/r/20240409114211.310462-5-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 048a70e3141a660d116bb86fe7e158235a9c4656 Author: AngeloGioacchino Del Regno Date: Tue Apr 9 13:42:09 2024 +0200 arm64: dts: mediatek: mt8395-nio-12l: Define RSEL in microamperes The paris pinctrl driver supports specifying the RSEL drive strength in microamperes as well as internal bits definitions: choose to specify those in uA to avoid using hardware specific values in device trees. Link: https://lore.kernel.org/r/20240409114211.310462-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 32b33be8894f3389d15b409140d663acbdf9de1d Author: AngeloGioacchino Del Regno Date: Tue Apr 9 13:42:08 2024 +0200 arm64: dts: medaitek: mt8395-nio-12l: Set i2c6 pins to bias-disable GPIOs 25 and 26 do not support pull-up/pull-down when those are muxed as I2C6's SDA6/SCL6 lines: set those to bias-disable to avoid warning messages from the pinctrl driver. Fixes: 96564b1e2ea4 ("arm64: dts: mediatek: Introduce the MT8395 Radxa NIO 12L board") Link: https://lore.kernel.org/r/20240409114211.310462-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 4a5191c5dd28c9016600af5e4be1db3a74791ab1 Author: AngeloGioacchino Del Regno Date: Wed Apr 10 10:30:02 2024 +0200 arm64: dts: mediatek: mt8183: Refactor thermal zones The thermal zones in MT8183 had cryptic names and all of them, apart from the cpu-thermal zone, had no thermal trips, hence those were not probed at all. Refactor the tzts1..5 and tztsABB thermal zones to add the correct thermal trips and give them a meaningful name, corresponding to the actually monitored thermal zone. While at it, also rename the thermal sensor node to "thermal-sensor". Now the thermal zones are probing and their temperatures can be read. Fixes: b325ce39785b ("arm64: dts: mt8183: add thermal zone node") Link: https://lore.kernel.org/r/20240410083002.1357857-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 86beeec5dd2b8e28217f67815a3fb15752031667 Author: AngeloGioacchino Del Regno Date: Wed Apr 10 10:30:01 2024 +0200 arm64: dts: mediatek: mt8192: Fix GPU thermal zone name for SVS This SoC has two GPU related thermal zones: the primary zone must be called "gpu-thermal" for SVS to pick it up. Fixes: c7a728051f4e ("arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones") Link: https://lore.kernel.org/r/20240410083002.1357857-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b2b6f2edb82a08abe8942535bc77da55a0f43e14 Author: AngeloGioacchino Del Regno Date: Wed Apr 10 10:30:00 2024 +0200 arm64: dts: mediatek: mt8195: Fix GPU thermal zone name for SVS This SoC has two GPU related thermal zones: the primary zone must be called "gpu-thermal" for SVS to pick it up. Fixes: 1e5b6725199f ("arm64: dts: mediatek: mt8195: Add AP domain thermal zones") Link: https://lore.kernel.org/r/20240410083002.1357857-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 7982bf7ec2e378bd60b8d785e379de0af85fecf1 Author: Macpaul Lin Date: Fri Sep 15 16:12:12 2023 +0800 arm64: dts: mediatek: add device-tree for Genio 700 EVK board Add basic device-tree for the Genio 700 EVK board. The Genio 700 EVK is based on MediaTek MT8390 SoC. MT8390 hardware register maps are identical to MT8188. The Genio 700 EVK has following features: - MT8390 SoC - MT6365 PMIC - MT6319 Buck IC - 12V DC Jack - 2x4GB LPDDR4X - 64GB eMMC 5.1 - 64Mb SPI NOR - M.2 Key A-E slot with PCIe Gen2 and USB 2.0 - 2x DSI LCM ports - 2x touch sensor ports - 2x MIPI-CSI, as camera daughter board slots - USB 2 micro USB connector - USB 3 with 1 to 2 hub: - M.2 Key B slot - Type-C connector, with DisplayPort over Type-C - HDMI 2.0 TX port with Type A HDMI connector - eDP port - Gigabit Ethernet with RJ45 connector - SD card slot - Earphone Jack - Analog Microphone - 2x Digital Microphone - 3x UART with serial-to-usb converters and micro USB connectors Signed-off-by: Chris-QJ Chen Signed-off-by: Pablo Sun Signed-off-by: Macpaul Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230915081212.13959-2-macpaul.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 341e4a070dc288ca6c2f3e47db23c112b7bdd0bd Author: Macpaul Lin Date: Fri Sep 15 16:12:11 2023 +0800 dt-bindings: arm64: mediatek: add mt8390-evk board 1. Add compatible for MT8390. 2. Add bindings for the MediaTek mt8390-evk board, also known as the "Genio 700-EVK". The MT8390 and MT8188 belong to the same SoC family, with only minor differences in their physical characteristics. They utilize unique efuse values for differentiation. The booting process and configurations are managed by boot loaders, firmware, and TF-A. Consequently, the part numbers and procurement channels vary. Signed-off-by: Macpaul Lin Reviewed-by: Krzysztof Kozlowski Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230915081212.13959-1-macpaul.lin@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 8f5a9d6b304a6599d5dfb315bb0b0de9edf5dce0 Author: Rafał Miłecki Date: Wed Feb 21 09:55:47 2024 +0100 arm64: dts: mediatek: mt7981: add watchdog & WiFi controllers MT7981 (Filogic 820) is a low cost version of MT7986 (Filogic 830) with the same watchdog controller. It also comes with on-SoC 802.11ax wireless. Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240221085547.27840-1-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 09346afaba0a89652da38966293ad321e2170a90 Author: Rafał Miłecki Date: Tue Feb 13 14:00:44 2024 +0100 arm64: dts: mediatek: mt7988: add XHCI controllers Add bindings of two on-SoC XHCI controllers. Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240213130044.1976-2-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit b376befe9c8897780dc7a92fca76f79b5053f8a1 Author: AngeloGioacchino Del Regno Date: Fri Mar 22 10:28:42 2024 +0100 dt-bindings: soc: mediatek: Add support for MT8188 VPPSYS Add compatible for MT8188 VPP mutex, having different bits to activate mute for various hardware IPs. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240322092845.381313-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 42aa8daecd80d18bc12c43d7be6fd82c6fd526a1 Author: AngeloGioacchino Del Regno Date: Wed Mar 13 15:15:38 2024 +0100 arm64: dts: mediatek: Add missing chassis-type to MT8192 Chromebooks None of the MT8192 Chromebooks had their chassis-type specified: add the right definition for each. Reviewed-by: David Heidelberg Link: https://lore.kernel.org/r/20240313141538.1438167-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 85f9e6c303600dc887ea05de7b54240b040c859d Author: AngeloGioacchino Del Regno Date: Wed Mar 13 15:15:37 2024 +0100 arm64: dts: mediatek: Complete chassis-type for MT8183 Chromebooks Define the chassis type on the remaining MT8183 Chromebooks. Link: https://lore.kernel.org/r/20240313141538.1438167-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit ab52c59103002b49f2455371e4b9c56ba3ef1781 Author: Daniel Danzberger Date: Sat Mar 9 10:32:15 2024 +0100 arm64: dts: Add Airoha EN7581 SoC and EN7581 Evaluation Board Introduce the Airoha EN7581 SoC's dtsi and the Airoha EN7581 Evaluation Board's dts file, as well as the required Makefiles. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Danzberger Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/f05a36dd7e8ef34ead8a63aa10fcffb542229404.1709975956.git.lorenzo@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit e4b4f4d21aa63cfe6bebc5ca734a965faef095c0 Author: Lorenzo Bianconi Date: Sat Mar 9 10:32:14 2024 +0100 dt-bindings: arm64: dts: airoha: Add en7581 entry Introduce Airoha EN7581 entry in Airoha dts binding. Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/ee9cda964dac62d38d1c239f7b189f707d3708a0.1709975956.git.lorenzo@kernel.org Signed-off-by: AngeloGioacchino Del Regno commit deb26f5bce5a2aec514a99141431f6a4360a12b1 Author: Rafał Miłecki Date: Sun Mar 17 23:32:06 2024 +0100 arm64: dts: mediatek: Add Cudy WR3000 V1 Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. It has 256 MiB of RAM, some LEDs & buttons and (not described yet) 4 Ethernet ports. Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240317223206.22033-5-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 62b24c7fdf0a039814e3eed33de0dced3fc10aa4 Author: Rafał Miłecki Date: Sun Mar 17 23:32:05 2024 +0100 arm64: dts: mediatek: mt7981: add pinctrl MT7981 contains on-SoC PIN controller that is also a GPIO provider. Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240317223206.22033-4-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit c016058b950470bacad0d06628bf396ef4feaba0 Author: Rafał Miłecki Date: Sun Mar 17 23:32:04 2024 +0100 dt-bindings: arm64: dts: mediatek: Add Cudy WR3000 V1 router Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240317223206.22033-3-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 666b76e9ae7ed2fd7ac5ed000807ad9bc9a344b7 Author: Rafał Miłecki Date: Sun Mar 17 23:32:03 2024 +0100 dt-bindings: vendor-prefixes: add Cudy Cudy is a Chinese company providing networking products. Signed-off-by: Rafał Miłecki Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240317223206.22033-2-zajec5@gmail.com Signed-off-by: AngeloGioacchino Del Regno commit 940b27161afc6ec53fc66245a4fb3518394cdc92 Author: Luca Ceresoli Date: Tue Jun 25 10:34:38 2024 +0200 Revert "leds: led-core: Fix refcount leak in of_led_get()" This reverts commit da1afe8e6099980fe1e2fd7436dca284af9d3f29. Commit 699a8c7c4bd3 ("leds: Add of_led_get() and led_put()"), introduced in 5.5, added of_led_get() and led_put() but missed a put_device() in led_put(), thus creating a leak in case the consumer device is removed. Arguably device removal was not very popular, so this went apparently unnoticed until 2022. In January 2023 two different patches got merged to fix the same bug: - commit da1afe8e6099 ("leds: led-core: Fix refcount leak in of_led_get()") - commit 445110941eb9 ("leds: led-class: Add missing put_device() to led_put()") They fix the bug in two different ways, which creates no patch conflicts, and both were merged in v6.2. The result is that now there is one more put_device() than get_device()s, instead of one less. Arguably device removal is not very popular yet, so this apparently hasn't been noticed as well up to now. But it blew up here while I'm working with device tree overlay insertion and removal. The symptom is an apparently unrelated list of oopses on device removal, with reasons: kernfs: can not remove 'uevent', no directory kernfs: can not remove 'brightness', no directory kernfs: can not remove 'max_brightness', no directory ... Here sysfs fails removing attribute files, which is because the device name changed and so the sysfs path. This is because the device name string got corrupted, which is because it got freed too early and its memory reused. Different symptoms could appear in different use cases. Fix by removing one of the two fixes. The choice was to remove commit da1afe8e6099 because: * it is calling put_device() inside of_led_get() just after getting the device, thus it is basically not refcounting the LED device at all during its entire lifetime * it does not add a corresponding put_device() in led_get(), so it fixes only the OF case The other fix (445110941eb9) is adding the put_device() in led_put() so it covers the entire lifetime, and it works even in the non-DT case. Fixes: da1afe8e6099 ("leds: led-core: Fix refcount leak in of_led_get()") Co-developed-by: Hervé Codina Signed-off-by: Hervé Codina Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20240625-led-class-device-leak-v2-1-75fdccf47421@bootlin.com Signed-off-by: Lee Jones commit 04aaa4dc97002ebe0c6ba566c55a4c4376ab618e Author: Thomas Zimmermann Date: Tue Jun 25 15:18:09 2024 +0200 drm/ast: Inline drm_simple_encoder_init() The function drm_simple_encoder_init() is a trivial helper and deprecated. Replace it with the regular call to drm_encoder_init(). Resolves the dependency on drm_simple_kms_helper.h. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240625131815.14514-1-tzimmermann@suse.de commit cce346d441399209bd582f1aaf190a7784dd12f8 Merge: f261aa15b2ca7 5bcc1afd02198 Author: Paolo Abeni Date: Thu Jun 27 09:59:27 2024 +0200 Merge branch 'series-to-deliver-ethernet-for-stm32mp25' Christophe Roullier says: ==================== Series to deliver Ethernet for STM32MP25 STM32MP25 is STM32 SOC with 2 GMACs instances. GMAC IP version is SNPS 5.3x. GMAC IP configure with 2 RX and 4 TX queue. DMA HW capability register supported RX Checksum Offload Engine supported TX Checksum insertion supported Wake-Up On Lan supported TSO supported ==================== Link: https://lore.kernel.org/r/20240624071052.118042-1-christophe.roullier@foss.st.com Signed-off-by: Paolo Abeni commit 5bcc1afd021989593b40562819e314d299fde849 Author: Christophe Roullier Date: Mon Jun 24 09:10:52 2024 +0200 net: stmmac: dwmac-stm32: stm32: add management of stm32mp25 for stm32 Add Ethernet support for STM32MP25. STM32MP25 is STM32 SOC with 2 GMACs instances. GMAC IP version is SNPS 5.3x. GMAC IP configure with 2 RX and 4 TX queue. DMA HW capability register supported RX Checksum Offload Engine supported TX Checksum insertion supported Wake-Up On Lan supported TSO supported Signed-off-by: Christophe Roullier Reviewed-by: Simon Horman Reviewed-by: Marek Vasut Signed-off-by: Paolo Abeni commit 3d94d1ac3792abee651274e3cfbb9a12c9f95988 Author: Christophe Roullier Date: Mon Jun 24 09:10:51 2024 +0200 dt-bindings: net: add STM32MP25 compatible in documentation for stm32 New STM32 SOC have 2 GMACs instances. GMAC IP version is SNPS 5.30 Signed-off-by: Christophe Roullier Reviewed-by: Conor Dooley Reviewed-by: Marek Vasut Signed-off-by: Paolo Abeni commit 5b707581c072bcef086ef4c122a2ea81470a1027 Author: Zhu Jun Date: Wed Jun 26 01:48:59 2024 -0700 selftests/alsa:Fix printf format string in pcm-test.c Inside of test_pcm_time() arguments are printed via printf but '%d' is used to print @flags (of type unsigned int). Use '%u' instead, just like we do everywhere else. Signed-off-by: Zhu Jun Reviewed-by: Mark Brown Link: https://patch.msgid.link/20240626084859.4350-1-zhujun2@cmss.chinamobile.com Signed-off-by: Takashi Iwai commit e227c1e14dfe06a54844014c076d11e9cdef87e4 Author: Junyi Zhao Date: Thu Jun 13 19:46:36 2024 +0800 arm64: dts: amlogic: Add Amlogic S4 PWM Add device nodes for PWM_AB, PWM_CD, PWM_EF, PWM_GH and PWM_IJ along with GPIO PIN configs of each channel. Signed-off-by: Junyi Zhao Reviewed-by: George Stark Signed-off-by: Kelvin Zhang Link: https://lore.kernel.org/r/20240613-s4-pwm-v8-2-b5bd0a768282@amlogic.com Signed-off-by: Neil Armstrong commit dac1c5043a083c570592dd048266e9f87b001c4e Author: Michael Walle Date: Mon Jun 17 11:13:41 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: add actual device trees For now, there wasn't any in-tree users of the dtsi files for the Kontron SMARC-sAMX6i board. Let's add device trees, for this board on a Kontron SMARC Eval 2.0 Carrier. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 62ee222c92aba06f32d2bedace4741a610370ac0 Author: Michael Walle Date: Mon Jun 17 11:13:39 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: remove wake-up-gpio property Remove the "wake-up-gpio" property within the PCIe controller node. There is no such property, thus just remove it. This will also make the schema validation happy. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit df35c6e9027cf9affe699e632a48082ab1bbba4c Author: Michael Walle Date: Mon Jun 17 11:13:38 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix PCIe reset polarity The PCIe reset line is active low. Fix it. Fixes: 2a51f9dae13d ("ARM: dts: imx6qdl-kontron-samx6i: Add iMX6-based Kontron SMARC-sAMX6i module") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit ffd0b96c3889ea9f65b31e863a76357b6b3a265b Author: Michael Walle Date: Mon Jun 17 11:13:37 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix node names Rename the nodes according to the schema. In particular, rename the bit bang I2C controller to "i2c-N" and the mux nodes of the audmux to "mux-*". While at it, fix the typo "adu", which should have been "aud". Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit ad851864b4d29e388368a1fdb662923855f76ad5 Author: Michael Walle Date: Mon Jun 17 11:13:36 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: add SDIO_PWR_EN support The module can enable/disable the SD card power supply and has it's dedicated pin SDIO_PWR_EN for that reason. This is esp. useful to be able to reset the SD card if it was in an UHS mode. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit fa5a518c8078a4b7dc9dcb8b5cf2c9181a3b48c3 Author: Michael Walle Date: Mon Jun 17 11:13:35 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: always enable eMMC There are no variants of this module without an eMMC. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 2005b36923dc74ac2e69475cdef6673716af96a7 Author: Michael Walle Date: Mon Jun 17 11:13:34 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix product name The correct name of the product is "Kontron SMARC-sAMX6i". See also https://www.kontron.com/en/products/smarc-samx6i/p89810 Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 74e1c956a68a65d642447d852e95b3fbb69bebaa Author: Michael Walle Date: Mon Jun 17 11:13:33 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix SPI0 chip selects There is a comment in the imx6q variant dtsi claiming that these modules will have one more chip select than the imx6dl variant. This is wrong. Ordinary GPIOs are used for chip selects and both variants of the module share the very same PCB and both have this GPIO routed to the SPI0_CS1# pin of the SMARC connector. Fix it by moving the third chip select description to the common dtsi. Fixes: 2125212785c9 ("ARM: dts: imx6qdl-kontron-samx6i: add Kontron SMARC SoM Support") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 73243146246f40fe01a6e2c5106ea160976e6f58 Author: Michael Walle Date: Mon Jun 17 11:13:32 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: cleanup the PMIC node Remove the comment, remove the unused phandle name for the VGEN5 output. VGEN5 is not used at all. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit b972d6b3b46345023aee56a95df8e2c137aa4ee4 Author: Michael Walle Date: Mon Jun 17 11:13:31 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix board reset On i.MX6 the board is reset by the watchdog. But in turn to do a complete board reset, we have to assert the WDOG_B output which is routed also to the CPLD which then do a complete power-cycle of the board. Fixes: 2125212785c9 ("ARM: dts: imx6qdl-kontron-samx6i: add Kontron SMARC SoM Support") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit edfea889a049abe80f0d55c0365bf60fbade272f Author: Michael Walle Date: Mon Jun 17 11:13:30 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix PHY reset The PHY reset line is connected to both the SoC (GPIO1_25) and the CPLD. We must not use the GPIO1_25 as it will drive against the output buffer of the CPLD. Instead there is another GPIO (GPIO2_01), an input to the CPLD, which will tell the CPLD to assert the PHY reset line. Fixes: 2a51f9dae13d ("ARM: dts: imx6qdl-kontron-samx6i: Add iMX6-based Kontron SMARC-sAMX6i module") Fixes: 5694eed98cca ("ARM: dts: imx6qdl-kontron-samx6i: move phy reset into phy-node") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 0df3c7d7a73d75153090637392c0b73a63cdc24a Author: Michael Walle Date: Mon Jun 17 11:13:29 2024 +0200 ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode The i.MX6 cannot add any RGMII delays. The PHY has to add both the RX and TX delays on the RGMII interface. Fix the interface mode. While at it, use the new phy-connection-type property name. Fixes: 5694eed98cca ("ARM: dts: imx6qdl-kontron-samx6i: move phy reset into phy-node") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 189375a4b36ac4b845541acce20485116f137ec9 Author: Michael Walle Date: Mon Jun 17 11:13:40 2024 +0200 dt-bindings: arm: fsl: document Kontron SMARC-sAMX6i boards The Kontron SMARC-sAMX6i is just a module. There was no device tree for an actual board for now. Document the binding to use the module on the evaluation carrier. Acked-by: Krzysztof Kozlowski Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit a78313bb206e0c456a989f380c4cbd8af8af7c76 Merge: 365aa9f573995 79655e867ad6d Author: Dave Airlie Date: Thu Jun 27 17:21:43 2024 +1000 Merge tag 'drm-intel-gt-next-2024-06-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next UAPI Changes: - Support replaying GPU hangs with captured context image (Tvrtko Ursulin) Driver Changes: Fixes/improvements/new stuff: - Automate CCS Mode setting during engine resets [gt] (Andi Shyti) - Revert "drm/i915: Remove extra multi-gt pm-references" (Janusz Krzysztofik) - Fix HAS_REGION() usage in intel_gt_probe_lmem() (Ville Syrjälä) - Disarm breadcrumbs if engines are already idle [gt] (Chris Wilson) - Shadow default engine context image in the context (Tvrtko Ursulin) - Support replaying GPU hangs with captured context image (Tvrtko Ursulin) - avoid FIELD_PREP warning [guc] (Arnd Bergmann) - Fix CCS id's calculation for CCS mode setting [gt] (Andi Shyti) - Increase FLR timeout from 3s to 9s (Andi Shyti) - Update workaround 14018575942 [mtl] (Angus Chen) Future platform enablement: - Enable w/a 16021333562 for DG2, MTL and ARL [guc] (John Harrison) Miscellaneous: - Pass the region ID rather than a bitmask to HAS_REGION() (Ville Syrjälä) - Remove counter productive REGION_* wrappers (Ville Syrjälä) - Fix typo [gem/i915_gem_ttm_move] (Deming Wang) - Delete the live_hearbeat_fast selftest [gt] (Krzysztof Niemiec) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/Zmmazub+U9ewH9ts@linux commit 9e16bada9299d74fcce1f6b03606a08a2c16da81 Author: Luis Felipe Hernandez Date: Tue Jun 25 06:55:51 2024 -0400 hid: bpf: Fix grammar * spelling fix: XBox -> Xbox, lowercase 'b' as per Microsoft branding * rephrase: paddle -> paddles, the controller itself has more than one paddle * rephrase: replace usage of "those" in favor of explicitly making reference to the paddles * grammatical fix: report -> reports, use present tense verb. * spelling fix: interpret * consistency: capitalize the first word in bullet points Signed-off-by: Luis Felipe Hernandez Link: https://patch.msgid.link/20240625105553.50830-1-luis.hernandez093@gmail.com [bentiss: renamed the file into Xbox, not XBox] Signed-off-by: Benjamin Tissoires commit 5041dc71d478721243533a8a7443f07b9cf67bcb Author: Alexander Stein Date: Mon Jun 17 10:12:28 2024 +0200 dt-bindings: arm: add MBa8MP-RAS314 SBC MBa8MP-RAS314 is an SBC based on the embedded module TQMa8MPxL. All relevant interfaces integrated in the CPU have been implemented on the MBa8MP-RAS314 for (an) industrial usage. Due to the numerous interfaces and the small size of this SBC the use in different applications is possible without the need of a [special,custom] design. Signed-off-by: Alexander Stein Acked-by: Conor Dooley Signed-off-by: Shawn Guo commit 365aa9f573995b46ca14a24165d85e31160e47b9 Merge: 541b1b0a8fc23 1ecef5589320f Author: Dave Airlie Date: Thu Jun 27 17:18:49 2024 +1000 Merge tag 'amd-drm-next-6.11-2024-06-22' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.11-2024-06-22: amdgpu: - HPD fixes - PSR fixes - DCC updates - DCN 4.0.1 fixes - FAMS fixes - Misc code cleanups - SR-IOV fixes - GPUVM TLB flush cleanups - Make VCN less verbose - ACPI backlight fixes - MES fixes - Firmware loading cleanups - Replay fixes - LTTPR fixes - Trap handler fixes - Cursor and overlay fixes - Primary plane zpos fixes - DML 2.1 fixes - RAS updates - USB4 fixes - MALL fixes - Reserved VMID fix - Silence UBSAN warnings amdkfd: - Misc code cleanups From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240622152523.2267072-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie commit cfcd6c46fec46cac3bf6658838d3ea329aff37aa Author: Jon Hunter Date: Tue Jun 11 08:56:03 2024 +0100 soc/tegra: pmc: Simplify resource lookup Commit 6f4429e21a7f ("soc/tegra: pmc: Update address mapping sequence for PMC apertures") updated the resource lookup code in the PMC driver. Instead of calling platform_get_resource_byname() and devm_ioremap_resource() simplify the code by simply calling devm_platform_ioremap_resource_byname(). Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 2fca3b6ba38034855dd0e2cfd6dbb877d5b2d25c Author: Frank Li Date: Mon May 20 12:09:17 2024 -0400 arm64: dts: imx8dxl-ss-conn: add gpmi nand Update gpmi nand and dma_apbh interrupt number for imx8dxl. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit f1cc2d88fddce24d978ace094bd89e5c05e011a0 Author: Frank Li Date: Mon May 20 12:09:16 2024 -0400 arm64: dts: imx8-ss-conn: add gpmi nand node Add gpmi nand support. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit e11997428fb3c7efe602eca698c739d186c009cb Author: Rafał Miłecki Date: Mon May 20 08:02:22 2024 +0200 ARM: dts: nxp: imx6: convert NVMEM content to layout syntax Use cleaner (and non-deprecated) bindings syntax. See commit bd912c991d2e ("dt-bindings: nvmem: layouts: add fixed-layout") for details. Signed-off-by: Rafał Miłecki Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit 06b91c00db396fafeed4c3201597bf3ed8261511 Merge: bdee2f1dcd84d 3f7e469987f85 Author: Martin K. Petersen Date: Wed Jun 26 23:30:54 2024 -0400 Merge patch series "mpi3mr: Host diag buffer support" Ranjan Kumar says: The controllers managed by mpi3mr driver requires system memory to save hardware and firmware diagnostic information, this patch set enhances the drivers to provide host memory to the controller for diagnostic information. This patch set also provides driver changes to push kernel messages into the diagnostic buffers reserved for the driver, so that the information will be available as part of debug data fetched from the controller. In addition, support for configuring automatic diagnostic information is added in the driver. Link: https://lore.kernel.org/r/20240626102646.14298-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 3f7e469987f85a16d968ae056c886ecb6207305f Author: Ranjan Kumar Date: Wed Jun 26 15:56:46 2024 +0530 scsi: mpi3mr: Update driver version to 8.9.1.0.50 Update driver version to 8.9.1.0.50 Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20240626102646.14298-5-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 78b506984ebeaefaf63172059422fc606dc23e68 Author: Ranjan Kumar Date: Wed Jun 26 15:56:45 2024 +0530 scsi: mpi3mr: Add ioctl support for HDB Add interface for applications to manage the host diagnostic buffers and update the automatic diag buffer capture triggers. Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20240626102646.14298-4-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit d8d08d1638ce1c237ce9c3f14649a3a4cf1b1749 Author: Ranjan Kumar Date: Wed Jun 26 15:56:44 2024 +0530 scsi: mpi3mr: Trigger support Add functions to process automatic diag triggers. If a condition defined in the triggers is met, the driver will call appropriate controller functions to save the diagnostic information. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405151955.BiAWI1SY-lkp@intel.com/ Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20240626102646.14298-3-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit fc4444941140c80088102b39eb130d2a7a048e58 Author: Ranjan Kumar Date: Wed Jun 26 15:56:43 2024 +0530 scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffers To be able to debug controller problems it is beneficial to allocate and configure system/host memory buffers which can be used to capture hardware and firmware diagnostic information. Add functions required to allocate and post firmware and hardware diagnostic buffers to the controller and to set up automatic diagnostic capture triggers. Captures will be triggered under the following circumstances: 1. Firmware is in FAULT state. 2. Admin commands time out. 3. Controller reset caused due to I/O timeout Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405151758.7xrJz6rp-lkp@intel.com/ Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20240626102646.14298-2-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit bdee2f1dcd84dcd76d9557cf55e8f3662c6506eb Author: Adrian Hunter Date: Tue Jun 18 10:31:58 2024 +0300 scsi: ufs: ufs-pci: Add support for Intel Panther Lake Add PCI ID to support Intel Panther Lake, same as MTL. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20240618073158.38504-1-adrian.hunter@intel.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 4d66ecc6e5a5df965b43edace2d41d19ed15a2ea Author: Jeff Johnson Date: Tue Jun 25 09:53:45 2024 -0700 scsi: ufs: qcom: Add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/ufs/host/ufs-qcom.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240625-md-drivers-ufs-host-v2-1-59a56974b05a@quicinc.com Signed-off-by: Martin K. Petersen commit 5e0bf3e8aec2cbc51123f84b29aaacbd91fc56fa Author: Huai-Yuan Liu Date: Fri Jun 21 16:25:45 2024 +0800 scsi: lpfc: Fix a possible null pointer dereference In function lpfc_xcvr_data_show, the memory allocation with kmalloc might fail, thereby making rdp_context a null pointer. In the following context and functions that use this pointer, there are dereferencing operations, leading to null pointer dereference. To fix this issue, a null pointer check should be added. If it is null, use scnprintf to notify the user and return len. Fixes: 479b0917e447 ("scsi: lpfc: Create a sysfs entry called lpfc_xcvr_data for transceiver info") Signed-off-by: Huai-Yuan Liu Link: https://lore.kernel.org/r/20240621082545.449170-1-qq810974084@gmail.com Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit f261aa15b2ca73d4f9dbb8b116b16743237edad9 Merge: 2e2de714d65d9 f898c16a0624e Author: Jakub Kicinski Date: Wed Jun 26 19:07:29 2024 -0700 Merge branch 'selftests-drv-net-rss_ctx-add-tests-for-rss-contexts' Jakub Kicinski says: ==================== selftests: drv-net: rss_ctx: add tests for RSS contexts Add a few tests exercising RSS context API. In addition to basic sanity checks, tests add RSS contexts, n-tuple rule to direct traffic to them (based on dst port), and qstats to make sure traffic landed where we expected. v2 adds a test for removing contexts out of order. When testing bnxt - either the new test or running more tests after the overlap test makes the device act strangely. To the point where it may start giving out ntuple IDs of 0 for all rules.. $ export NETIF=eth0 REMOTE_... $ ./drivers/net/hw/rss_ctx.py KTAP version 1 1..8 ok 1 rss_ctx.test_rss_key_indir ok 2 rss_ctx.test_rss_context ok 3 rss_ctx.test_rss_context4 # Increasing queue count 44 -> 66 # Failed to create context 32, trying to test what we got ok 4 rss_ctx.test_rss_context32 # SKIP Tested only 31 contexts, wanted 32 ok 5 rss_ctx.test_rss_context_overlap ok 6 rss_ctx.test_rss_context_overlap2 # .. sprays traffic like a headless chicken .. not ok 7 rss_ctx.test_rss_context_out_of_order ok 8 rss_ctx.test_rss_context4_create_with_cfg # Totals: pass:6 fail:1 xfail:0 xpass:0 skip:1 error:0 v2: https://lore.kernel.org/all/20240625010210.2002310-1-kuba@kernel.org v1: https://lore.kernel.org/all/20240620232902.1343834-1-kuba@kernel.org ==================== Link: https://patch.msgid.link/20240626012456.2326192-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f898c16a0624e7f2dcb0b1cda6916c9be6489197 Author: Jakub Kicinski Date: Tue Jun 25 18:24:56 2024 -0700 selftests: drv-net: rss_ctx: add tests for RSS configuration and contexts Add tests focusing on indirection table configuration and creating extra RSS contexts in drivers which support it. $ export NETIF=eth0 REMOTE_... $ ./drivers/net/hw/rss_ctx.py KTAP version 1 1..8 ok 1 rss_ctx.test_rss_key_indir ok 2 rss_ctx.test_rss_context ok 3 rss_ctx.test_rss_context4 # Increasing queue count 44 -> 66 # Failed to create context 32, trying to test what we got ok 4 rss_ctx.test_rss_context32 # SKIP Tested only 31 contexts, wanted 32 ok 5 rss_ctx.test_rss_context_overlap ok 6 rss_ctx.test_rss_context_overlap2 # .. sprays traffic like a headless chicken .. not ok 7 rss_ctx.test_rss_context_out_of_order ok 8 rss_ctx.test_rss_context4_create_with_cfg # Totals: pass:6 fail:1 xfail:0 xpass:0 skip:1 error:0 Note that rss_ctx.test_rss_context_out_of_order fails with the device I tested with, but it seems to be a device / driver bug. Reviewed-by: Petr Machata Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240626012456.2326192-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 94fecaa6dcd04889eff4291707b0433ddfc09039 Author: Jakub Kicinski Date: Tue Jun 25 18:24:55 2024 -0700 selftests: drv-net: add ability to wait for at least N packets to load gen Teach the load generator how to wait for at least given number of packets to be received. This will be useful for filtering where we'll want to send a non-trivial number of packets and make sure they landed in right queues. Reviewed-by: Breno Leitao Reviewed-by: Petr Machata Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240626012456.2326192-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit af8e51644a70f612974a6e767fa7d896d3c23f88 Author: Jakub Kicinski Date: Tue Jun 25 18:24:54 2024 -0700 selftests: drv-net: add helper to wait for HW stats to sync Some devices DMA stats to the host periodically. Add a helper which can wait for that to happen, based on frequency reported by the driver in ethtool. Reviewed-by: Petr Machata Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240626012456.2326192-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8b8fe280155d9fb6f3f6310f05f613cbdf30196b Author: Jakub Kicinski Date: Tue Jun 25 18:24:53 2024 -0700 selftests: drv-net: try to check if port is in use We use random ports for communication. As Willem predicted this leads to occasional failures. Try to check if port is already in use by opening a socket and binding to that port. Reviewed-by: Przemek Kitszel Reviewed-by: Petr Machata Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240626012456.2326192-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d0b4b8ef083ca46d5d318e66a30fb80e0abbb90d Author: Martin Kaistra Date: Mon Jun 24 16:00:37 2024 +0200 wifi: rtl8xxxu: 8188f: Limit TX power index TX power index is read from the efuse on init, the values get written to the TX power registers when the channel gets switched. When the chip has not yet been calibrated, the efuse values are 0xFF, which on some boards leads to USB timeouts for reading/writing registers after the first frames have been sent. The vendor driver (v5.11.5-1) checks for these invalid values and sets default values instead. Implement something similar in rtl8188fu_parse_efuse(). Fixes: c888183b21f3 ("wifi: rtl8xxxu: Support new chip RTL8188FU") Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240624140037.231657-1-martin.kaistra@linutronix.de commit 2f35712ab82683554c660bc2456f05785835efbe Author: Kuan-Chung Chen Date: Fri Jun 21 20:36:17 2024 +0800 wifi: rtw89: 8852b: fix definition of KIP register number An incorrect definition caused DPK to fail to backup and restore a set of KIP registers. Fixing this will improve RX throughput from 902 to 997 Mbps. Fixes: 5b8471ace5b1 ("wifi: rtw89: 8852b: rfk: add DPK") Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240621123617.6687-2-pkshih@realtek.com commit 5f7e92c59b8e03ac90130223c2ebb4449373b9cd Author: Ping-Ke Shih Date: Fri Jun 21 20:36:16 2024 +0800 wifi: rtw89: 8852b: set AMSDU limit to 5000 Enlarge AMSDU limit to improve MAC efficient to get better TX throughput from 851 to 895 Mbps. No change for RX throughput 902 Mbps. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240621123617.6687-1-pkshih@realtek.com commit 5b8c61b82eec9ed267d02331f7ff6b126d9f1253 Author: Ping-Ke Shih Date: Fri Jun 21 15:34:58 2024 +0800 wifi: rtw89: 8852bt: rfk: add DPK DPK is short for digital pre-distortion calibration. It can adjusts digital waveform according to PA linear characteristics dynamically to enhance TX EVM for high power. Do this calibration when we are going to run on AP channel. To prevent power offset out of boundary, it monitors thermal and set proper boundary to register. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240621073458.55187-3-pkshih@realtek.com commit 9f8852a92e8270c1684117753fcd114e7563a93d Author: Ping-Ke Shih Date: Fri Jun 21 15:34:57 2024 +0800 wifi: rtw89: 8852bt: rfk: add TSSI TSSI is transmitter signal strength indication, which is a close-loop hardware circuit to feedback actual transmitting power as a reference for next transmission. It does full calibration when we are going to connect an AP. When switching bands or channels for scanning or some reasons, reset hardware status to prevent use wrong power value feedback from previous transmission. It also loads tables of compensation values reflecting current temperature into registers according to channel and band group to transmit packets with expected power. Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240621073458.55187-2-pkshih@realtek.com commit 792586591f446c688821989a21ea3e65f192e6f1 Author: Chih-Kang Chang Date: Thu Jun 20 13:58:25 2024 +0800 wifi: rtw89: add polling for LPS H2C to ensure FW received We add polling after sending LPS H2C to ensure that the Firmware is received and executes RPWM thereafter. Otherwise, if the Firmware executes RPWM without receiving LPS H2C, it will cause beacon loss in WoWLAN mode due to the inability to obtain channel and bandwidth information from H2C. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-8-pkshih@realtek.com commit 2e2564877f57368c69a1ff09504447db63fb0640 Author: Chih-Kang Chang Date: Thu Jun 20 13:58:24 2024 +0800 wifi: rtw89: wow: enable beacon filter after swapping firmware To avoid wake up by AP disconnection, but no beacon filter setting and driver can't disconnect successfully. We need to enable beacon filter after swapping firmware in WoWLAN mode. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-7-pkshih@realtek.com commit 60757f28408bcc63c4c0676b2a69a38adce30fc7 Author: Chih-Kang Chang Date: Thu Jun 20 13:58:23 2024 +0800 wifi: rtw89: wow: prevent to send unexpected H2C during download Firmware While downloading Firmware in the resume flow, it is possible to receive beacon and send H2C to Firmware. However, if Firmware receives unexpected H2C during the download process, it will fail. Therefore, we prevent to send unexpected H2C during download Firmware in WoWLAN mode. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-6-pkshih@realtek.com commit dda364c345913fe03ddbe4d5ae14a2754c100296 Author: Chih-Kang Chang Date: Thu Jun 20 13:58:22 2024 +0800 wifi: rtw89: wow: fix GTK offload H2C skbuff issue We mistakenly put skb too large and that may exceed skb->end. Therefore, we fix it. skbuff: skb_over_panic: text:ffffffffc09e9a9d len:416 put:204 head:ffff8fba04eca780 data:ffff8fba04eca7e0 tail:0x200 end:0x140 dev: ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:192! invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 4747 Comm: kworker/u4:44 Tainted: G O 6.6.30-02659-gc18865c4dfbd #1 86547039b47e46935493f615ee31d0b2d711d35e Hardware name: HP Meep/Meep, BIOS Google_Meep.11297.262.0 03/18/2021 Workqueue: events_unbound async_run_entry_fn RIP: 0010:skb_panic+0x5d/0x60 Code: c6 63 8b 8f bb 4c 0f 45 f6 48 c7 c7 4d 89 8b bb 48 89 ce 44 89 d1 41 56 53 41 53 ff b0 c8 00 00 00 e8 27 5f 23 00 48 83 c4 20 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 RSP: 0018:ffffaa700144bad0 EFLAGS: 00010282 RAX: 0000000000000089 RBX: 0000000000000140 RCX: 14432c5aad26c900 RDX: 0000000000000000 RSI: 00000000ffffdfff RDI: 0000000000000001 RBP: ffffaa700144bae0 R08: 0000000000000000 R09: ffffaa700144b920 R10: 00000000ffffdfff R11: ffffffffbc28fbc0 R12: ffff8fba4e57a010 R13: 0000000000000000 R14: ffffffffbb8f8b63 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8fba7bd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007999c4ad1000 CR3: 000000015503a000 CR4: 0000000000350ee0 Call Trace: ? __die_body+0x1f/0x70 ? die+0x3d/0x60 ? do_trap+0xa4/0x110 ? skb_panic+0x5d/0x60 ? do_error_trap+0x6d/0x90 ? skb_panic+0x5d/0x60 ? handle_invalid_op+0x30/0x40 ? skb_panic+0x5d/0x60 ? exc_invalid_op+0x3c/0x50 ? asm_exc_invalid_op+0x16/0x20 ? skb_panic+0x5d/0x60 skb_put+0x49/0x50 rtw89_fw_h2c_wow_gtk_ofld+0xbd/0x220 [rtw89_core 778b32de31cd1f14df2d6721ae99ba8a83636fa5] rtw89_wow_resume+0x31f/0x540 [rtw89_core 778b32de31cd1f14df2d6721ae99ba8a83636fa5] rtw89_ops_resume+0x2b/0xa0 [rtw89_core 778b32de31cd1f14df2d6721ae99ba8a83636fa5] ieee80211_reconfig+0x84/0x13e0 [mac80211 818a894e3b77da6298269c59ed7cdff065a4ed52] ? __pfx_wiphy_resume+0x10/0x10 [cfg80211 1a793119e2aeb157c4ca4091ff8e1d9ae233b59d] ? dev_printk_emit+0x51/0x70 ? _dev_info+0x6e/0x90 ? __pfx_wiphy_resume+0x10/0x10 [cfg80211 1a793119e2aeb157c4ca4091ff8e1d9ae233b59d] wiphy_resume+0x89/0x180 [cfg80211 1a793119e2aeb157c4ca4091ff8e1d9ae233b59d] ? __pfx_wiphy_resume+0x10/0x10 [cfg80211 1a793119e2aeb157c4ca4091ff8e1d9ae233b59d] dpm_run_callback+0x3c/0x140 device_resume+0x1f9/0x3c0 ? __pfx_dpm_watchdog_handler+0x10/0x10 async_resume+0x1d/0x30 async_run_entry_fn+0x29/0xd0 process_scheduled_works+0x1d8/0x3d0 worker_thread+0x1fc/0x2f0 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 Modules linked in: ccm 8021q r8153_ecm cdc_ether usbnet r8152 mii dm_integrity async_xor xor async_tx lz4 lz4_compress zstd zstd_compress zram zsmalloc uinput rfcomm cmac algif_hash rtw89_8922ae(O) algif_skcipher rtw89_8922a(O) af_alg rtw89_pci(O) rtw89_core(O) btusb(O) snd_soc_sst_bxt_da7219_max98357a btbcm(O) snd_soc_hdac_hdmi btintel(O) snd_soc_intel_hda_dsp_common snd_sof_probes btrtl(O) btmtk(O) snd_hda_codec_hdmi snd_soc_dmic uvcvideo videobuf2_vmalloc uvc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_sof_pci_intel_apl snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda soundwire_intel soundwire_generic_allocation snd_sof_intel_hda_mlink soundwire_cadence snd_sof_pci snd_sof_xtensa_dsp mac80211 snd_soc_acpi_intel_match snd_soc_acpi snd_sof snd_sof_utils soundwire_bus snd_soc_max98357a snd_soc_avs snd_soc_hda_codec snd_hda_ext_core snd_intel_dspcfg snd_intel_sdw_acpi snd_soc_da7219 snd_hda_codec snd_hwdep snd_hda_core veth ip6table_nat xt_MASQUERADE xt_cgroup fuse bluetooth ecdh_generic cfg80211 ecc gsmi: Log Shutdown Reason 0x03 ---[ end trace 0000000000000000 ]--- Fixes: ed9a3c0d4dd9 ("wifi: rtw89: wow: construct EAPoL packet for GTK rekey offload") Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-5-pkshih@realtek.com commit 6a03a349be1b2b8de06e725329d11448e11766d5 Author: Chih-Kang Chang Date: Thu Jun 20 13:58:21 2024 +0800 wifi: rtw89: wow: update config mac for 802.11ax chip The 802.11ax chip also needs rtw89_mac_cpu_io_rx(), which notifies Firmware to start or stop WoWLAN and waits until Firmware process over. Then, the driver can continue processing to avoid unexpected behavior. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-4-pkshih@realtek.com commit 0e5210217768625b43f099bcaafe627b098655d5 Author: Chih-Kang Chang Date: Thu Jun 20 13:58:20 2024 +0800 wifi: rtw89: wow: update WoWLAN reason register for different FW Need to update WoWLAN wakeup reason register after firmware version 0.35.22.0 for RTL8922A, and 0.27.80.0 for RTL8852CE. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-3-pkshih@realtek.com commit 0065199f4303bc2b05467e64779d392f9a29d61d Author: Chih-Kang Chang Date: Thu Jun 20 13:58:19 2024 +0800 wifi: rtw89: wow: append security header offset for different cipher When creating EAPOL_KEY, SA_QUERY and ARP_RSP packet offload, we need to append security header offset for different cipher as required by the firmware. Only 8852A, 8852B, 8852BT and 8851B need it. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240620055825.17592-2-pkshih@realtek.com commit 69b6517687a4b1fb250bd8c9c193a0a304c8ba17 Author: Jens Axboe Date: Wed Jun 26 19:01:58 2024 -0600 block: use the right type for stub rq_integrity_vec() For !CONFIG_BLK_DEV_INTEGRITY, rq_integrity_vec() wasn't updated properly. Fix it up. Fixes: cf546dd289e0 ("block: change rq_integrity_vec to respect the iterator") Signed-off-by: Jens Axboe commit a12978712d9001b060bcc10eaae42ad5102abe2b Author: Jiri Olsa Date: Wed Jun 26 15:47:19 2024 +0200 selftests/bpf: Move ARRAY_SIZE to bpf_misc.h ARRAY_SIZE is used on multiple places, move its definition in bpf_misc.h header. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20240626134719.3893748-1-jolsa@kernel.org commit 91e9cc70b77516e766fd8b532c3a20aba37369d1 Author: Marc Zyngier Date: Tue Jun 25 14:00:42 2024 +0100 KVM: arm64: Honor trap routing for TCR2_EL1 TCR2_EL1 handling is missing the handling of its trap configuration: - HCRX_EL2.TCR2En must be handled in conjunction with HCR_EL2.{TVM,TRVM} - HFG{R,W}TR_EL2.TCR_EL1 does apply to TCR2_EL1 as well Without these two controls being implemented, it is impossible to correctly route TCR2_EL1 traps. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240625130042.259175-7-maz@kernel.org Signed-off-by: Oliver Upton commit 663abf04ee4d750229e8f47881d31a5204259ceb Author: Marc Zyngier Date: Tue Jun 25 14:00:41 2024 +0100 KVM: arm64: Make PIR{,E0}_EL1 save/restore conditional on FEAT_TCRX As per the architecture, if FEAT_S1PIE is implemented, then FEAT_TCRX must be implemented as well. Take advantage of this to avoid checking for S1PIE when TCRX isn't implemented. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240625130042.259175-6-maz@kernel.org Signed-off-by: Oliver Upton commit 1b04fd40275e09c2062e125593e7d2b0b9f87b0a Author: Marc Zyngier Date: Tue Jun 25 14:00:39 2024 +0100 KVM: arm64: Make TCR2_EL1 save/restore dependent on the VM features As for other registers, save/restore of TCR2_EL1 should be gated on the feature being actually present. In the case of a nVHE hypervisor, it is perfectly fine to leave the host value in the register, as HCRX_EL2.TCREn==0 imposes that TCR2_EL1 is treated as 0. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240625130042.259175-4-maz@kernel.org Signed-off-by: Oliver Upton commit a3ee9ce88ba3adc0a9bcb77dd40eca6aff3cef28 Author: Marc Zyngier Date: Tue Jun 25 14:00:38 2024 +0100 KVM: arm64: Get rid of HCRX_GUEST_FLAGS HCRX_GUEST_FLAGS gives random KVM hackers the impression that they can stuff bits in this macro and unconditionally enable features in the guest. In general, this is wrong (we have been there with FEAT_MOPS, and again with FEAT_TCRX). Document that HCRX_EL2.SMPME is an exception rather than the rule, and get rid of HCRX_GUEST_FLAGS. Signed-off-by: Marc Zyngier Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20240625130042.259175-3-maz@kernel.org Signed-off-by: Oliver Upton commit 9b58e665d6b25ff687380d14009d7cffe7f70df7 Author: Marc Zyngier Date: Tue Jun 25 14:00:37 2024 +0100 KVM: arm64: Correctly honor the presence of FEAT_TCRX We currently blindly enable TCR2_EL1 use in a guest, irrespective of the feature set. This is obviously wrong, and we should actually honor the guest configuration and handle the possible trap resulting from the guest being buggy. Signed-off-by: Marc Zyngier Reviewed-by: Joey Gouly Link: https://lore.kernel.org/r/20240625130042.259175-2-maz@kernel.org Signed-off-by: Oliver Upton commit 0f31c2c61f6923747628c65a0fe36b2d4d7e21b0 Author: Alan Maguire Date: Mon Jun 24 20:29:03 2024 +0100 libbpf: Fix clang compilation error in btf_relocate.c When building with clang for ARCH=i386, the following errors are observed: CC kernel/bpf/btf_relocate.o ./tools/lib/bpf/btf_relocate.c:206:23: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] 206 | info[id].needs_size = true; | ^ ~ ./tools/lib/bpf/btf_relocate.c:256:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] 256 | base_info.needs_size = true; | ^ ~ 2 errors generated. The problem is we use 1-bit, 31-bit bitfields in a signed int. Changing to bool needs_size: 1; unsigned int size:31; ...resolves the error and pahole reports that 4 bytes are used for the underlying representation: $ pahole btf_name_info tools/lib/bpf/btf_relocate.o struct btf_name_info { const char * name; /* 0 8 */ unsigned int needs_size:1; /* 8: 0 4 */ unsigned int size:31; /* 8: 1 4 */ __u32 id; /* 12 4 */ /* size: 16, cachelines: 1, members: 4 */ /* last cacheline: 16 bytes */ }; Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240624192903.854261-1-alan.maguire@oracle.com commit d07980f7373b4c57c85478f8e815cc7b9b394c05 Author: Ma Ke Date: Sun Jun 23 21:17:53 2024 +0800 selftests/bpf: Don't close(-1) in serial_test_fexit_stress() Guard close() with extra link_fd[i] > 0 and fexit_fd[i] > 0 check to prevent close(-1). Signed-off-by: Ma Ke Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240623131753.2133829-1-make24@iscas.ac.cn commit bcc14d6f83fc6e0152124eaa78e1590493eb0d6e Author: Tao Zou Date: Thu Jun 20 16:43:09 2024 +0800 zh_CN/admin-guide: Add zh_CN/admin-guide/numastat.rst translation document Add translation zh_CN/admin-guide/numastat.rst and link it to zh_CN/admin-guide/index.rst while clean its todo entry. commit 77691ee92d4a ("Documentation: update numastat explanation") Signed-off-by: Tao Zou Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/tencent_AB1A2D84652D748A2290F5305B94D4612307@qq.com commit 543d67deb54ac71b8f6833693645885eb616387d Author: Chih-Wei Chien Date: Thu Jun 20 00:00:57 2024 +0800 docs: genericirq.rst: remove extra parenthesis in function definition In the paragraph titled "Default flow implementations", the helper function definition (simplified excerpt) for noop(struct irq_data *data) had an extraneous closing parenthesis. This commit removes the unnecessary parenthesis, correcting the function definition. Signed-off-by: Chih-Wei Chien Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240619160057.128208-1-idoleat@taiker.tw commit 27a0781a31ef8ed5c98a6b59db4349b0f8a57a41 Author: Nir Lichtman Date: Thu Jun 20 00:45:14 2024 +0300 Documentation: English corrections in vmalloced kernel stacks Minor grammar fixes in vmalloced-kernel-stacks Signed-off-by: Nir Lichtman Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240619215944.GA3571421@lichtman.org commit ddb77059b270c7ea667d02eb88fd91fb47a9cb89 Author: Diederik de Haas Date: Thu Jun 20 10:13:37 2024 +0200 docs: verify/bisect: Fix rendered version URL When rendering the documentation, the 'html' file extension replaces the 'rst' file extension, not add it. So remove the 'rst' part of the URL. Signed-off-by: Diederik de Haas Reviewed-by: Thorsten Leemhuis Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240620081355.11549-1-didi.debian@cknow.org commit bbc0611a0fc43b29d5357bab2a7e309bc3202fc8 Author: Carlos Bilbao Date: Sat Jun 22 14:47:27 2024 -0500 docs: Extend and refactor index of further kernel docs Extend the Index of Further Kernel Documentation by adding entries for the Rust for Linux website, the Linux Foundation's YouTube channel, and notes on the second edition of Billimoria's kernel programming book. Also, perform some refactoring: format the text to 75 characters per line and sort per-section content in chronological order of publication. Signed-off-by: Carlos Bilbao Tested-by: Randy Dunlap Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20240622194727.2171845-1-carlos.bilbao.osdev@gmail.com Signed-off-by: Jonathan Corbet commit 7fe7de7be8286fddd9204efb248f4768f47ed690 Author: SeongJae Park Date: Mon Jun 24 11:53:12 2024 -0700 Docs/process/email-clients: Document HacKerMaiL HacKerMaiL (hkml) [1] is a simple tool for mailing lists-based development workflows such as that for most Linux kernel subsystems. It is actively being maintained by DAMON maintainer, and recommended for DAMON community[2]. Add a simple introduction of the tool on the email-clients document, too. [1] https://github.com/sjp38/hackermail [2] https://lore.kernel.org/20240621170353.BFB83C2BBFC@smtp.kernel.org Signed-off-by: SeongJae Park Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-8-sj@kernel.org commit 10db42766579ca91f76fbef32375ba21273fae7a Author: SeongJae Park Date: Mon Jun 24 11:53:11 2024 -0700 Docs/maintainer/maintainer-entry-profile: add DAMON maintainer profile DAMON has its maintainer entry profile document, but it's not listed on the existing profiles section of maintainer-entry-profile.rst. Add it. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-7-sj@kernel.org commit ccd46f62196702ee476d46a673883f5bf5779f89 Author: SeongJae Park Date: Mon Jun 24 11:53:10 2024 -0700 Docs/process/index: Remove unsorted docs section 'Other material' section on 'process/index' is no more necessary since we have 'staging/' directory. Also all documents on the section has moved to better places. Remove the section. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-6-sj@kernel.org commit e3b10a02ca2fe1e27ee008e9fcd8cf7076f7f776 Author: SeongJae Park Date: Mon Jun 24 11:53:09 2024 -0700 Docs: Move clang-format from process/ to dev-tools/ 'clang-format' is on 'Other material' section of 'process/index', but it may fit more under 'dev-tools/' directory. Move it. Signed-off-by: SeongJae Park Acked-by: Miguel Ojeda Acked-by: Federico Vaga Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-5-sj@kernel.org commit f9a4f4a0e1f5d8033d30d50f59ada1666a5cf38d Author: SeongJae Park Date: Mon Jun 24 11:53:08 2024 -0700 Docs: Move magic-number from process to staging 'Other material' section on 'process/index' is for unsorted documents. However we also have a dedicated place for the purpose, 'staging/'. Move 'magic-number' from the section to 'staging/' directory. Signed-off-by: SeongJae Park Acked-by: Federico Vaga Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-4-sj@kernel.org commit 7400d25a0a5cb2a1a782c4c49e6c8f883e5184d0 Author: SeongJae Park Date: Mon Jun 24 11:53:07 2024 -0700 Docs/process/index: Remove riscv/patch-acceptance from 'Other material' section 'patch-acceptance' on 'Other material' section of 'process/index', which is for unsorted documents, is actually well organized under 'arch/riscv/' directory, and linked on the index document of the directory. Remove it from the 'Other material' section. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-3-sj@kernel.org commit 346bc3d8cddb035ab85daa3b29b47433860ee542 Author: SeongJae Park Date: Mon Jun 24 11:53:06 2024 -0700 Docs/process/index: Remove unaligned-memory-access from 'Other material' 'unaligned-memory-access document' is linked on 'Other material' section of 'core-api/index', which is for unsorted documents. But it is actually well organized under 'core-api/' directory, and linked on the 'core-api/index'. Remove it from 'Other material' section of 'process/index' document. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240624185312.94537-2-sj@kernel.org commit 406d058dc323ae152d380ac90153eb56a75850c1 Author: Ashutosh Dixit Date: Wed Jun 26 11:18:17 2024 -0700 drm/xe/oa/uapi: Allow preemption to be disabled on the stream exec queue Mesa VK_KHR_performance_query use case requires preemption and timeslicing to be disabled for the stream exec queue. Implement this functionality here. v2: Minor change to debug print to print both ret values (Umesh) Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240626181817.1516229-3-ashutosh.dixit@intel.com Signed-off-by: Rodrigo Vivi commit 1bab7ecf5c10a0a529c06480692a544391053c20 Author: Ashutosh Dixit Date: Wed Jun 26 11:18:16 2024 -0700 drm/xe/oa: Allow stream enable/disable functions to return error Stream enable/disable functions previously had void return because failure during function execution was not possible. This will change when we introduce functionality to disable preemption on the stream exec queue. Therefore, in preparation for this functionality, prepare this code to be able to handle error returns. Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20240626181817.1516229-2-ashutosh.dixit@intel.com Signed-off-by: Rodrigo Vivi commit 8d789ff4a41a557de565b1778a7c620cbb22ae0e Author: Michal Wajdeczko Date: Wed Jun 26 13:18:26 2024 +0200 drm/xe/pf: Disable VFs on remove We shouldn't leave VFs enabled when unloading the PF driver. Otherwise we will get a message like: [ ] xe 0000:4d:00.0: driver left SR-IOV enabled after remove Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240626111827.1389-2-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 80bab5c5038f32c92f5d26ff9df7255247c8dd89 Author: Ilia Levi Date: Thu Jun 6 15:47:05 2024 +0300 drm/xe/irq: remove xe_irq_shutdown The cleanup is done by devres in irq_uninstall. Commit bbc9651fe9f4 ("drm/xe/irq: move irq_uninstall over to devm") resolved the ordering issue where irq_uninstall (registered with drmm) was called after pci_free_irq_vectors (registered with devm upon calling pci_alloc_irq_vectors). This happened because drmm action list is registered with devm very early in the init flow - before pci_alloc_irq_vectors. Now that irq_uninstall is registered with devm, it will be called before pci_free_irq_vectors and we can remove xe_irq_shutdown. Signed-off-by: Ilia Levi Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240606124705.822451-1-illevi@habana.ai Signed-off-by: Rodrigo Vivi commit 8511d9da2058ffca7c745c48e93c51840e2ed65e Author: Michal Wajdeczko Date: Tue Jun 25 21:45:46 2024 +0200 drm/xe/pf: Trigger explicit FLR while disabling VFs We attempt to unprovision all VFs GuC when disabling them, but GuC may reject such request if the target VF was previously active but VF driver didn't unload with explicit VF reset H2G action or the VMM has not started the VF FLR. To avoid mismatches between configs maintained the PF and GuC, trigger an explicit FLR sequences just before releasing resources. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240625194546.1301-2-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 92e9db6e1fa30c87f9c25fae9c9e275885cdd0b2 Author: Michal Wajdeczko Date: Tue Jun 25 16:12:58 2024 +0200 drm/xe/guc: Print GuC error codes as hex value We maintain GuC error code values in hex format. Also print them in that format for easier matching. While at it, slightly reformat the log and add missing \n. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240625141258.1257-4-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit b084dfaef2107bdc0cfc77d4940fb59b660dd901 Author: Michal Wajdeczko Date: Tue Jun 25 16:12:57 2024 +0200 drm/xe/guc: Add more GuC error codes to ABI There are many more error codes used that the GuC firmware can return in the RESPONSE_FAILURE message. Add to the ABI header those which are more likely to be seen by the PF or VF drivers. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240625141258.1257-3-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit be3bf9dd1c6d1c0b18396e4918a40a8f7ce6c591 Author: Michal Wajdeczko Date: Tue Jun 25 16:12:56 2024 +0200 drm/xe/guc: Demote the H2G retry log message to debug The G2H RETRY message sent by the GuC does not necessary indicate any serious problem and can be a part of the normal communication flow. Switch the log level from warning to more appropriate debug. This will also let the CI ignore these logs which were seen in few SR-IOV scenarios. While at it, use hex to print the reason and add missing \n. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240625141258.1257-2-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 20baedb8033d0ba6ae382fc9974b481fdb32e7ef Author: Michal Wajdeczko Date: Sat Jun 22 11:42:53 2024 +0200 drm/xe/vf: Skip attempt to start GuC PC if VF We have already marked the GuC PC feature as not applicable for VF devices, but we missed the fact that there may be still some privileged activities performed by this component, who does much more than its name suggests. Explicitly skip xe_guc_pc_start() if running as a VF driver and use a GT oriented message to report any error. v2: also skip xe_guc_pc_stop (Vinay) Signed-off-by: Michal Wajdeczko Cc: Vinay Belgaumkar Cc: Matthew Brost Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240622094253.1081-1-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 7e5161da9d267957b726a29f3efe6cb50fdfed04 Author: Ashutosh Dixit Date: Sun Jun 23 13:31:19 2024 -0700 drm/xe/oa: Fix kernel doc in xe_drm.h Fix kernel doc in xe_drm.h. Also eliminate private/non-abi enum definitions. v2: Remove __DRM_XE_PERF_TYPE_MAX since it is unused (Michal) v3: Also remove DRM_XE_OA_PROPERTY_MAX since it can also be eliminated (Michal) Suggested-by: Michal Wajdeczko Signed-off-by: Ashutosh Dixit Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240623203119.3840283-1-ashutosh.dixit@intel.com Signed-off-by: Rodrigo Vivi commit 701d9c4a199bba144d53cd47c80d42a788498962 Author: Michal Wajdeczko Date: Fri Jun 21 19:25:22 2024 +0200 drm/xe/huc: Use GT oriented error messages in xe_huc.c If applicable, we prefer GT oriented dmesg messages. Update all HuC related messages and use more user friendly error codes. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240621172522.1037-1-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 9d2ab8623e85843956c3d5fdbdcbbb7ec198610f Author: Vinay Belgaumkar Date: Thu Jun 20 15:49:28 2024 -0700 drm/xe/guc: Request max GT freq during resume We already request max freq in the load path, moving it to __xe_guc_upload will ensure this speeds up GuC load in the resume path as well. v2: Rename xe_guc_pc_init_early since we now call it per GuC load (Michal W) v3: Keep pc_init_early() and init RPx values there (Rodrigo) Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240620224928.3986377-3-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi commit 3b1592fb783549e968aa20035ab37be5fb124f02 Author: Vinay Belgaumkar Date: Thu Jun 20 15:49:27 2024 -0700 drm/xe/lnl: Apply Wa_22019338487 This WA requires us to limit media GT frequency requests to a certain cap value during driver load. Freq limits are restored after load completes, so perf will not be affected during normal operations. During normal driver operation, this WA requires dummy writes to media offset 0x380D8C after every ~63 GGTT writes. This will ensure completion of the LMEM writes originating from Gunit. During driver unload(before FLR), the WA requires that we set requested frequency to the cap value again. v3: Do not use WA number in function name. Call WA wrapper from xe_device. Rename some variables, check for locks in the correct function (Rodrigo). Ensure reset path is also covered for this WA. v4: Fix BAT failure v5: Add a function pointer for ggtt_ops (Michal W) v6: Fix name collision and use static function (Rodrigo) Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240620224928.3986377-2-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi commit 292db12f6066e3fac041fabea507c4ad393d3262 Author: Yanteng Si Date: Tue Jun 25 21:09:09 2024 +0800 docs/zh_CN: Add driver-api phy translation Translate driver-api/phy.rst into Chinese. commit d02aa181ee59 ("phy: Add devm_of_phy_optional_get() helper") Reviewed-by: Dongliang Mu Signed-off-by: Yanteng Si Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240625130909.3672446-1-siyanteng@loongson.cn commit 075136c1e9deeb58455a1ea03cabed336a3f76e2 Author: Thorsten Scherer Date: Tue Jun 25 23:04:53 2024 +0200 doc:it_IT: Fix typo in Reviewed-by tag Signed-off-by: Thorsten Scherer Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240625210455.13262-1-t.scherer@eckelmann.de commit 8664e7637388c013f4e953371d023ec7c2d84c8d Merge: 33991ae8f40a8 541b1b0a8fc23 Author: Rodrigo Vivi Date: Wed Jun 26 18:22:52 2024 -0400 Merge drm/drm-next into drm-xe-next Need to sync some header include that propagated through drm-intel-next. v2: After some changes in drm/drm-next Signed-off-by: Rodrigo Vivi commit 6d588891a90c5a946aaac11a93d06edd89ed9054 Author: Perry Yuan Date: Tue Jun 25 23:27:33 2024 -0500 Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method Updates the documentation in `amd-pstate.rst` to include information about the per CPU boost control feature. Users can now enable or disable the Core Performance Boost (CPB) feature on individual CPUs using the `boost` sysfs attribute. Reviewed-by: Gautham R. Shenoy Signed-off-by: Perry Yuan Co-developed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240626042733.3747-5-mario.limonciello@amd.com Signed-off-by: Mario Limonciello commit 89ac482d5105b0c6710775bab1aa7d3d0730c642 Author: Perry Yuan Date: Tue Jun 25 23:27:32 2024 -0500 cpufreq: amd-pstate: Cap the CPPC.max_perf to nominal_perf if CPB is off When Core Performance Boost is disabled by the user, the CPPC_REQ.max_perf should not exceed the nominal_perf since by definition the frequencies between nominal_perf and the highest_perf are in the boost range. Fix this in amd_pstate_update() Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Signed-off-by: Perry Yuan Link: https://lore.kernel.org/r/66f55232be01092c423f0523f68b82b80c293943.1718988436.git.perry.yuan@amd.com Link: https://lore.kernel.org/r/20240626042733.3747-4-mario.limonciello@amd.com Signed-off-by: Mario Limonciello commit c8c68c38b56f4036771ebe2f8d664a2e98728318 Author: Perry Yuan Date: Tue Jun 25 23:27:31 2024 -0500 cpufreq: amd-pstate: initialize core precision boost state The "Core Performance Boost (CPB) feature, when enabled in the BIOS, allows the OS to control the highest performance for each individual core. The active, passive and the guided modes of the amd-pstate driver do support controlling the core frequency boost when this BIOS feature is enabled. Additionally, the amd-pstate driver provides a sysfs interface allowing the user to activate/deactivate this core performance boost feature at runtime. Add support for the set_boost callback in the active mode driver to enable boost control via the cpufreq core. This ensures a consistent boost control interface across all pstate modes, including passive mode, guided mode, and active mode. With this addition, all three pstate modes can support the same boost control interface with unique interface and global CPB control. Each CPU also supports individual boost control, allowing global CPB to change all cores' boost states simultaneously. Specific CPUs can update their boost states separately, ensuring all cores' boost states are synchronized. Cc: Oleksandr Natalenko Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217931 Signed-off-by: Perry Yuan Co-developed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/20240626042733.3747-3-mario.limonciello@amd.com Signed-off-by: Mario Limonciello commit 4f460bff7b6ac53d7d8509501a9fba7292a4a11a Author: Perry Yuan Date: Tue Jun 25 23:27:30 2024 -0500 cpufreq: acpi: move MSR_K7_HWCR_CPB_DIS_BIT into msr-index.h There are some other drivers also need to use the MSR_K7_HWCR_CPB_DIS_BIT for CPB control bit, so it makes sense to move the definition to a common header file to allow other driver to use it. No intentional functional impact. Suggested-by: Gautham Ranjal Shenoy Signed-off-by: Perry Yuan Acked-by: Rafael J. Wysocki Acked-by: Huang Rui Link: https://lore.kernel.org/r/78b6c75e6cffddce3e950dd543af6ae9f8eeccc3.1718988436.git.perry.yuan@amd.com Link: https://lore.kernel.org/r/20240626042733.3747-2-mario.limonciello@amd.com Signed-off-by: Mario Limonciello commit aa293983d2020390e286544b120f3cd0a3d40749 Author: Matt Bobrowski Date: Tue Jun 25 06:28:57 2024 +0000 bpf: add new negative selftests to cover missing check_func_arg_reg_off() and reg->type check Add new negative selftests which are intended to cover the out-of-bounds memory access that could be performed on a CONST_PTR_TO_DYNPTR within functions taking a ARG_PTR_TO_DYNPTR | MEM_RDONLY as an argument, and acceptance of invalid register types i.e. PTR_TO_BTF_ID within functions taking a ARG_PTR_TO_DYNPTR | MEM_RDONLY. Reported-by: Kumar Kartikeya Dwivedi Acked-by: Kumar Kartikeya Dwivedi Acked-by: Eduard Zingerman Signed-off-by: Matt Bobrowski Link: https://lore.kernel.org/r/20240625062857.92760-2-mattbobrowski@google.com Signed-off-by: Alexei Starovoitov commit ec2b9a5e11e51fea1bb04c1e7e471952e887e874 Author: Matt Bobrowski Date: Tue Jun 25 06:28:56 2024 +0000 bpf: add missing check_func_arg_reg_off() to prevent out-of-bounds memory accesses Currently, it's possible to pass in a modified CONST_PTR_TO_DYNPTR to a global function as an argument. The adverse effects of this is that BPF helpers can continue to make use of this modified CONST_PTR_TO_DYNPTR from within the context of the global function, which can unintentionally result in out-of-bounds memory accesses and therefore compromise overall system stability i.e. [ 244.157771] BUG: KASAN: slab-out-of-bounds in bpf_dynptr_data+0x137/0x140 [ 244.161345] Read of size 8 at addr ffff88810914be68 by task test_progs/302 [ 244.167151] CPU: 0 PID: 302 Comm: test_progs Tainted: G O E 6.10.0-rc3-00131-g66b586715063 #533 [ 244.174318] Call Trace: [ 244.175787] [ 244.177356] dump_stack_lvl+0x66/0xa0 [ 244.179531] print_report+0xce/0x670 [ 244.182314] ? __virt_addr_valid+0x200/0x3e0 [ 244.184908] kasan_report+0xd7/0x110 [ 244.187408] ? bpf_dynptr_data+0x137/0x140 [ 244.189714] ? bpf_dynptr_data+0x137/0x140 [ 244.192020] bpf_dynptr_data+0x137/0x140 [ 244.194264] bpf_prog_b02a02fdd2bdc5fa_global_call_bpf_dynptr_data+0x22/0x26 [ 244.198044] bpf_prog_b0fe7b9d7dc3abde_callback_adjust_bpf_dynptr_reg_off+0x1f/0x23 [ 244.202136] bpf_user_ringbuf_drain+0x2c7/0x570 [ 244.204744] ? 0xffffffffc0009e58 [ 244.206593] ? __pfx_bpf_user_ringbuf_drain+0x10/0x10 [ 244.209795] bpf_prog_33ab33f6a804ba2d_user_ringbuf_callback_const_ptr_to_dynptr_reg_off+0x47/0x4b [ 244.215922] bpf_trampoline_6442502480+0x43/0xe3 [ 244.218691] __x64_sys_prlimit64+0x9/0xf0 [ 244.220912] do_syscall_64+0xc1/0x1d0 [ 244.223043] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 244.226458] RIP: 0033:0x7ffa3eb8f059 [ 244.228582] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 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 8b 0d 8f 1d 0d 00 f7 d8 64 89 01 48 [ 244.241307] RSP: 002b:00007ffa3e9c6eb8 EFLAGS: 00000206 ORIG_RAX: 000000000000012e [ 244.246474] RAX: ffffffffffffffda RBX: 00007ffa3e9c7cdc RCX: 00007ffa3eb8f059 [ 244.250478] RDX: 00007ffa3eb162b4 RSI: 0000000000000000 RDI: 00007ffa3e9c7fb0 [ 244.255396] RBP: 00007ffa3e9c6ed0 R08: 00007ffa3e9c76c0 R09: 0000000000000000 [ 244.260195] R10: 0000000000000000 R11: 0000000000000206 R12: ffffffffffffff80 [ 244.264201] R13: 000000000000001c R14: 00007ffc5d6b4260 R15: 00007ffa3e1c7000 [ 244.268303] Add a check_func_arg_reg_off() to the path in which the BPF verifier verifies the arguments of global function arguments, specifically those which take an argument of type ARG_PTR_TO_DYNPTR | MEM_RDONLY. Also, process_dynptr_func() doesn't appear to perform any explicit and strict type matching on the supplied register type, so let's also enforce that a register either type PTR_TO_STACK or CONST_PTR_TO_DYNPTR is by the caller. Reported-by: Kumar Kartikeya Dwivedi Acked-by: Kumar Kartikeya Dwivedi Acked-by: Eduard Zingerman Signed-off-by: Matt Bobrowski Link: https://lore.kernel.org/r/20240625062857.92760-1-mattbobrowski@google.com Signed-off-by: Alexei Starovoitov commit be8f4de61417c65715a7f7661ce4770414c9a5a0 Merge: 337b7b0b8b02a 4b3e381073837 Author: Takashi Iwai Date: Wed Jun 26 22:11:13 2024 +0200 Merge branch 'for-linus' into for-next Signed-off-by: Takashi Iwai commit 936abb09c1c7ce2c9c8b7838fc780e98c0140759 Author: Shuming Fan Date: Thu Jun 20 18:32:37 2024 +0800 ASoC: rt712-sdca: add the function for version B The version B will support the multi-lane function and integrate the DMIC function in one SoundWire interface. Due to some registers having different default values between version A and B, this patch also removes the redundant default registers to avoid confusion. Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20240620103237.2124196-1-shumingf@realtek.com Signed-off-by: Mark Brown commit db576ed76232875ca92372771bfd247ad47b46ce Merge: b147ae7ae5141 84fbd61987663 Author: Mark Brown Date: Wed Jun 26 20:09:28 2024 +0100 Add USB VBUS regulator for RZ/G2L Merge series from Biju Das : As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit of the VBUS Control Register(VBENCTL) register in the USBPHY Control. But this IP is in the Reset block. Reset driver exposes this register as regmap and instantiate the USB VBUS regulator device. Consumers(phy device) can use regulator APIs to control VBUS as controlling is done in the atomic context using a new API which is added for the purpose. commit e8b86f0311a4b721663df8105a680e5968f21d4c Author: Veronika Molnarova Date: Tue Jun 25 11:20:01 2024 +0200 perf test stat_bpf_counter.sh: Stabilize the test results The test has been failing for some time when two separate runs of perf benchmarks are recorded for cycles events and their counts are compared, while once the recording was done with option --bpf-counters and once without it. It is expected that the count of the samples should be within a certain range, firstly the difference was set to be within 10%, which was then later raised to 20%. However, the test case keeps failing on certain architectures as recording the provided benchmark can produce completely different counts based on the current load of the system. Sampling two separate runs on intel-eaglestream-spr-13 of "perf stat --no-big-num -e cycles -- perf bench sched messaging -g 1 -l 100 -t": Performance counter stats for 'perf bench sched messaging -g 1 -l 100 -t': 396782898 cycles 0.010051983 seconds time elapsed 0.008664000 seconds user 0.097058000 seconds sys Performance counter stats for 'perf bench sched messaging -g 1 -l 100 -t': 1431133032 cycles 0.021803714 seconds time elapsed 0.023377000 seconds user 0.349918000 seconds sys , which is ranging from 400mil to 1400mil samples. Instead of recording the cycles use instructions event, which provides more stable values. At the same time change the tested workload to one of the provided testing workloads by perf that is not based on a scheduler, which can provide another dependency on the current load. Sampling instructions event with the new workload provide much more stable results on intel-eaglestream-spr-13 of "perf stat --no-big-num -e instructions -- perf test -w brstack": Performance counter stats for 'perf test -w brstack': 64584494 instructions 0.009173945 seconds time elapsed 0.007262000 seconds user 0.002071000 seconds sys Performance counter stats for 'perf test -w brstack': 64672669 instructions 0.008888135 seconds time elapsed 0.005018000 seconds user 0.004018000 seconds sys Signed-off-by: Veronika Molnarova Acked-by: Namhyung Kim Cc: mpetlan@redhat.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625092001.10909-1-vmolnaro@redhat.com commit e4b19e2cc3e5f9be8f159ba0b4ba6aed8d993abf Author: Ian Rogers Date: Tue Jun 25 14:41:17 2024 -0700 perf python: Clean up build dependencies The python build now depends on libraries and doesn't use python-ext-sources except for the util/python.c dependency. Switch to just directly depending on that file and util/setup.py. This allows the removal of python-ext-sources. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-9-irogers@google.com commit 9dabf4003423c8d3a2f4f8915c3ff2f1158302a0 Author: Ian Rogers Date: Tue Jun 25 14:41:16 2024 -0700 perf python: Switch module to linking libraries from building source setup.py was building most perf sources causing setup.py to mimic the Makefile logic as well as flex/bison code to be stubbed out, due to complexity building. By using libraries fewer functions are stubbed out, the build is faster and the Makefile logic is reused which should simplify updating. The libraries are passed through LDFLAGS to avoid complexity in python. Force the -fPIC flag for libbpf.a to ensure it is suitable for linking into the perf python module. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-8-irogers@google.com commit e467705a9fb37f51595aa6deaca085ccb4005454 Author: Ian Rogers Date: Tue Jun 25 14:41:15 2024 -0700 perf util: Make util its own library Make the util directory into its own library. This is done to avoid compiling code twice, once for the perf tool and once for the perf python module. For convenience: arch/common.c scripts/perl/Perf-Trace-Util/Context.c scripts/python/Perf-Trace-Util/Context.c are made part of this library. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-7-irogers@google.com commit 21cc3bc00a68c1f4178feab1f89d1af3cfcfc84f Author: Ian Rogers Date: Tue Jun 25 14:41:14 2024 -0700 perf bench: Make bench its own library Make the benchmark code into a library so it may be linked against things like the python module to avoid compiling code twice. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-6-irogers@google.com commit 1dad99af1a8211e2afc1b711c0cda4fbdd445ae2 Author: Ian Rogers Date: Tue Jun 25 14:41:13 2024 -0700 perf test: Make tests its own library Make the tests code its own library. This is done to avoid compiling code twice, once for the perf tool and once for the perf python module. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-5-irogers@google.com commit 49f4ac4b949762119eb0fd57a1682cf3a47dea89 Author: Ian Rogers Date: Tue Jun 25 14:41:12 2024 -0700 perf pmu-events: Make pmu-events a library Make pmu-events into a library so it may be linked against things like the python module and not built from source. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-4-irogers@google.com commit 39f3ce5cabdcb0b3216e2ab0d05402b4e4cd4155 Author: Ian Rogers Date: Tue Jun 25 14:41:11 2024 -0700 perf ui: Make ui its own library Make the ui code its own library. This is done to avoid compiling code twice, once for the perf tool and once for the perf python module. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-3-irogers@google.com commit 7f240209ba0e931acfb4e21fbdc95956d84413e7 Author: Ian Rogers Date: Tue Jun 25 14:41:10 2024 -0700 perf build: Add '*.a' to clean targets Fix some excessively long lines by deploying '\'. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Suzuki K Poulose Cc: Kees Cook Cc: Palmer Dabbelt Cc: Albert Ou Cc: Nick Terrell Cc: Gary Guo Cc: Alex Gaynor Cc: Boqun Feng Cc: Wedson Almeida Filho Cc: Ze Gao Cc: Alice Ryhl Cc: Andrei Vagin Cc: Yicong Yang Cc: Jonathan Cameron Cc: Guo Ren Cc: Miguel Ojeda Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: Oliver Upton Cc: John Garry Cc: Benno Lossin Cc: Björn Roy Baron Cc: Andreas Hindborg Cc: Paul Walmsley Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240625214117.953777-2-irogers@google.com commit 7063b80268e2593e58bee8a8d709c2f3ff93e2f2 Author: Pei Li Date: Tue Jun 25 09:42:05 2024 -0700 jfs: Fix shift-out-of-bounds in dbDiscardAG When searching for the next smaller log2 block, BLKSTOL2() returned 0, causing shift exponent -1 to be negative. This patch fixes the issue by exiting the loop directly when negative shift is found. Reported-by: syzbot+61be3359d2ee3467e7e4@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=61be3359d2ee3467e7e4 Signed-off-by: Pei Li Signed-off-by: Dave Kleikamp commit f3f942d6e5889ea9d46cecf8fc0b7893b5ba9792 Author: Alex Bee Date: Sat Jun 22 23:54:16 2024 +0200 wifi: brcmfmac: of: Support interrupts-extended The currently existing of_property_present check for interrupts does not cover all ways interrupts can be defined in a device tree, e.g. "interrupts-extended". In order to support all current and future ways that can be done, drop that check and call of_irq_parse_one to figure out if an interrupt is defined and irq_create_of_mapping for the actual mapping and let it be handled by the interrupt subsystem. Signed-off-by: Alex Bee Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240622215416.659208-1-knaerzche@gmail.com commit dbb5265a5d7cca1cdba7736dba313ab7d07bc19d Author: Arend van Spriel Date: Mon Jun 17 14:26:09 2024 +0200 wifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3 After being asked about support for WPA3 for BCM43224 chipset it was found that all it takes is setting the MFP_CAPABLE flag and mac80211 will take care of all that is needed [1]. Link: https://lore.kernel.org/linux-wireless/20200526155909.5807-2-Larry.Finger@lwfinger.net/ [1] Signed-off-by: Arend van Spriel Tested-by: Reijer Boekhoff Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240617122609.349582-1-arend.vanspriel@broadcom.com commit f73f969b2eb39ad8056f6c7f3a295fa2f85e313a Author: Jeongjun Park Date: Thu May 30 22:28:09 2024 +0900 jfs: Fix array-index-out-of-bounds in diFree Reported-by: syzbot+241c815bda521982cb49@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jeongjun Park Signed-off-by: Dave Kleikamp commit f2177731b6cdaedfe1dea5ec7d185be579b14cc5 Author: Shuming Fan Date: Thu Jun 20 18:32:24 2024 +0800 ASoC: rt712-sdca: change the definition name of SDCA channel number This patch doesn't have any change of functionality. Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20240620103224.2124179-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 4faed8ca581c0307af4a58e6c0027ce2b2cbd5d3 Author: Neil Armstrong Date: Wed Jun 5 11:40:51 2024 +0200 ASoC: dt-bindings: amlogic,gx-sound-card: drop minItems for audio-widgets Like "audio-routing" drop the minItems: 2 from the "audio-widgets", because any limit here - lower or upper- is rather meaningless. This will also fix `dtbs_check` warnings like: sound: audio-widgets: ['Speaker', '7J4-14 LEFT', 'Speaker', '7J4-11 RIGHT'] is too long Signed-off-by: Neil Armstrong Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20240605-topic-amlogic-upstream-bindings-fixes-audio-widgets-v1-1-65bd7cc2e09b@linaro.org Signed-off-by: Mark Brown commit f9f7f29f64454bb20896c7d918c3abc3a1aa487b Author: Aleksandr Mishin Date: Wed Jun 5 13:49:53 2024 +0300 ASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe() If IORESOURCE_MEM "lpass-rxtx-cdc-dma-lpm" or "lpass-va-cdc-dma-lpm" resources is not provided in Device Tree due to any error, platform_get_resource_byname() will return NULL which is later dereferenced. According to sound/qcom,lpass-cpu.yaml, these resources are provided, but DT can be broken due to any error. In such cases driver must be able to protect itself, since the DT is external data for the driver. Adjust this issues by adding NULL return check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b138706225c9 ("ASoC: qcom: Add regmap config support for codec dma driver") Signed-off-by: Aleksandr Mishin Link: https://patch.msgid.link/20240605104953.12072-1-amishin@t-argos.ru Signed-off-by: Mark Brown commit b498ddb6f283c1a3efff98851aa58d66307be620 Author: Jeff Johnson Date: Sat Jun 8 21:02:54 2024 -0700 power: reset: piix4: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/power/reset/piix4-poweroff.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240608-md-drivers-power-reset-v1-1-08dbc1a546a2@quicinc.com Signed-off-by: Sebastian Reichel commit ce6dede912f064a855acf6f04a04cbb2c25b8c8c Author: Edward Adam Davis Date: Thu Apr 11 20:05:28 2024 +0800 jfs: fix null ptr deref in dtInsertEntry [syzbot reported] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 5061 Comm: syz-executor404 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:dtInsertEntry+0xd0c/0x1780 fs/jfs/jfs_dtree.c:3713 ... [Analyze] In dtInsertEntry(), when the pointer h has the same value as p, after writing name in UniStrncpy_to_le(), p->header.flag will be cleared. This will cause the previously true judgment "p->header.flag & BT-LEAF" to change to no after writing the name operation, this leads to entering an incorrect branch and accessing the uninitialized object ih when judging this condition for the second time. [Fix] After got the page, check freelist first, if freelist == 0 then exit dtInsert() and return -EINVAL. Reported-by: syzbot+bba84aef3a26fb93deb9@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: Dave Kleikamp commit 84fbd6198766336f627ba08f073fd9970729074e Author: Biju Das Date: Sun Jun 16 11:53:56 2024 +0100 regulator: Add Renesas RZ/G2L USB VBUS regulator driver As per the RZ/G2L HW manual, VBUSEN can be controlled by the VBOUT bit of the VBUS Control Register. This register is mapped in the reset framework. The reset driver expose this register as regmap and instantiates this driver. The consumer will use the regulator API to control the VBOUT bit as the control need to be done in the atomic context. Signed-off-by: Biju Das Link: https://patch.msgid.link/20240616105402.45211-5-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown commit 1cb7d29157603561af4c38535e936850ceb99f0f Author: Biju Das Date: Sun Jun 16 11:53:55 2024 +0100 regulator: core: Add helper for allow HW access to enable/disable regulator Add a helper function that allow regulator consumers to allow low-level HW access, in order to enable/disable regulator in atomic context. The use-case for RZ/G2L SoC is to enable VBUS selection register based on vbus detection that happens in interrupt context. Signed-off-by: Biju Das Link: https://patch.msgid.link/20240616105402.45211-4-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown commit 90b6de4550aac6ac97448d3d26429a0a55dbaa34 Author: Krzysztof Kozlowski Date: Sat Jun 15 19:49:04 2024 +0200 ARM: dts: omap am5729-beagleboneai: drop unneeded ti,enable-id-detection There is a ti,enable-id-detection property in the Extcon Palmas (extcon-palmas), but not in the Extcon USB GPIO binding and driver. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406152004.F2fNnorG-lkp@intel.com/ Link: https://lore.kernel.org/r/20240615174904.39012-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 05d996e113481fdd9ac40ccf5cadabd1e73f2404 Author: Shengjiu Wang Date: Wed Jun 12 14:40:52 2024 +0800 ASoC: imx-audmix: Split capture device for audmix There will be three devices for this sound card, hw:x,0 is the playback device for one SAI, hw:x,1 is the playback device for another SAI, hw:x,2 is the capture device for audmix output. then capture device and playback device can be configured with different master/slave mode. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1718174452-17596-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 6232a7eb1afc842d0daf1c0314e1eda65731783f Author: Shengjiu Wang Date: Wed Jun 12 14:40:51 2024 +0800 ASoC: fsl_audmix: Split playback and capture stream to different DAI As audmix requires playback and capture stream in different master/slave mode, so separate playback and capture stream to different DAI. There are three DAIs required, two DAIs for playback one DAI for capture. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1718174452-17596-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 15c958390460f964ec707ae6c5d1843638ebfe69 Author: Shengjiu Wang Date: Wed Jun 12 14:40:50 2024 +0800 ASoC: fsl_sai: Add separate DAI for transmitter and receiver The transmitter and receiver part of the SAI interface need to be configured with different master/slave mode, especially to work with the audiomix module. +-------+ +-----------+ | SAI1 | --TX--> | | | | <--RX-- | | +-------+ | | | AUDIOMIX | +-------+ | | | SAI2 | --TX--> | | +-------+ +-----------+ The SAI1 TX is in master mode, but SAI1 RX is in slave mode. So add another two DAIs for TX and RX separately. but only defined fsl_sai_set_dai_fmt_tx() and fsl_sai_set_dai_fmt_rx() ops function for current case, in the future, the other ops function for TX and RX can be defined if required. Signed-off-by: Shengjiu Wang Link: https://patch.msgid.link/1718174452-17596-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit e64343fa57335662b555477d9ddebd8285db2b66 Author: Kuninori Morimoto Date: Wed Jun 12 06:02:52 2024 +0000 ASoC: audio-graph-card2: add link-trigger-order support Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Audio Graph Card2 still not yet support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87msnqzoj8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4d4125d8f5e19476c006014d5530b8127ed5703f Author: Kuninori Morimoto Date: Wed Jun 12 06:02:46 2024 +0000 ASoC: audio-graph-card: add link-trigger-order support Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Audio Graph Card still not yet support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87o786zojd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8696d732f1c804312d44806242d4a91c49a7a154 Author: Kuninori Morimoto Date: Wed Jun 12 06:02:39 2024 +0000 ASoC: simple-audio-card: add link-trigger-order support Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Simple Audio Card still not yet support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87plsmzojk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5d9cacdccf17bd33dac3ea378324650159c2a863 Author: Kuninori Morimoto Date: Wed Jun 12 06:02:33 2024 +0000 ASoC: simple-card-utils: add link-trigger-order support Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Simple Audio Card / Audio Graph Card still not support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87r0d2zojq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit fafc20ded3f4659873c83c2af6d389983d480994 Author: Kuninori Morimoto Date: Wed Jun 12 06:02:26 2024 +0000 ASoC: audio-graph-port: add link-trigger-order Sound Card need to consider/adjust HW control ordering based on the combination of CPU/Codec. The controlling feature is already supported on ASoC, but Simple Audio Card / Audio Graph Card still not support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87sexizojx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3d7c2fd2ea704812867f9586270a2516377482a3 Author: John Meneghini Date: Tue Jun 25 08:26:04 2024 -0400 nvme-multipath: prepare for "queue-depth" iopolicy This patch prepares for the introduction of a new iopolicy by breaking up the nvme_find_path() code path into sub-routines. Signed-off-by: John Meneghini Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit baf272bac637d3275bb83c17ac849b44a4590655 Author: Michael Walle Date: Wed Jun 26 16:44:33 2024 +0200 drm/panel: add Ilitek ILI9806E panel driver The Ortustech COM35H3P70ULC panel is based on the ILI9806E DSI display controller. Co-developed-by: Gunnar Dibbern Signed-off-by: Gunnar Dibbern Signed-off-by: Michael Walle Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240626144433.3097793-3-mwalle@kernel.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240626144433.3097793-3-mwalle@kernel.org commit b7a0c0e9d80756da52d5c88f24b5253a08108724 Author: Michael Walle Date: Wed Jun 26 16:44:32 2024 +0200 dt-bindings: display: panel: add Ilitek ili9806e panel controller Add the device tree binding for the Ilitek ILI9806E controller which can be found on the Ortustech COME35H3P70ULC DSI display panel. There are no peculiarities except for two different power signals. Reviewed-by: Conor Dooley Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20240626144433.3097793-2-mwalle@kernel.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240626144433.3097793-2-mwalle@kernel.org commit c5207ed4638314aca89afb45629902288efe5f4e Author: Jerome Brunet Date: Wed Jun 26 16:22:09 2024 +0200 drm/panel: add lincolntech lcd197 support Add support for the Lincoln Technologies LCD197 1080x1920 DSI panel. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240626142212.1341556-4-jbrunet@baylibre.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240626142212.1341556-4-jbrunet@baylibre.com commit 3ebc76c424bc0f0768f5c346667e8f51217917ba Author: Jerome Brunet Date: Wed Jun 26 16:22:08 2024 +0200 drm/mipi-dsi: add mipi_dsi_usleep_range helper Like for mipi_dsi_msleep(), usleep_range() may often be called in between mipi_dsi_dcs_*() functions and needs a multi compatible counter part. Suggested-by: Dmitry Baryshkov Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240626142212.1341556-3-jbrunet@baylibre.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240626142212.1341556-3-jbrunet@baylibre.com commit 47d5c1934edcbda13d4fab4d7019b9ec8be0fe08 Author: Jerome Brunet Date: Wed Jun 26 16:22:07 2024 +0200 dt-bindings: panel-simple-dsi: add lincoln LCD197 panel bindings This adds the bindings for the 1080x1920 Lincoln LCD197 DSI panel to panel-simple-dsi. Signed-off-by: Jerome Brunet Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240626142212.1341556-2-jbrunet@baylibre.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240626142212.1341556-2-jbrunet@baylibre.com commit 68145ceb9b6dc5c11ecb470ccdab8e146ebf294b Author: Tejas Vipin Date: Wed Jun 26 10:22:41 2024 +0530 drm/panel: sitronix-st7703: transition to mipi_dsi wrapped functions Use functions introduced in commit 966e397e4f60 ("drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling") for sitronix-st7703 based panels. Signed-off-by: Tejas Vipin Reviewed-by: Guido Günther Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240626045244.48858-1-tejasvipin76@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240626045244.48858-1-tejasvipin76@gmail.com commit 30c6743cc89cdb357d1f8a98978da0f7c138130b Author: Christian Marangi Date: Wed Jun 26 18:00:25 2024 +0200 leds: leds-lp5569: Add support for Texas Instruments LP5569 Add support for Texas Instruments LP5569 LED driver. Texas Instruments LP5569 is 9 channels chip with programmable engines. It almost a copy of LP5523 with fundamental changes to regs order and regs content. Has difference in how the clock is handled and doesn't support detecting clock time automatically, different handling for selftest and different scheme for the status regs. LED chip supports ENGINE and MUX to group LED and run precompiled code with magic values to run patterns. This is loaded via the sysfs entry and it's passed as a string of ASCII HEX char. One some devices using this LED Controller (a NBG7815 Router) it was found loading big precompiled pattern with up to 96 bytes of code. To have support for this "extended" scenario, hardcode each engine to support 4 pages of precompiled pattern (128 bytes of code) and 1 page for each MUX. This gives plenty of space for any kind precompiled pattern keeping simple logic for page handling of each engine and mux. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-21-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 49d943a426d1e2c034ff2f132f65590dbdc01fbd Author: Christian Marangi Date: Wed Jun 26 18:00:24 2024 +0200 leds: leds-lp55xx: Drop deprecated defines Drop deprecated defines not used anymore as the related function got moved to lp55xx-common. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-20-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit b9d55087dfa950aecece1cf864d3918a12694c25 Author: Christian Marangi Date: Wed Jun 26 18:00:23 2024 +0200 leds: leds-lp55xx: Support ENGINE program up to 128 bytes Some LED chip supports up to 16 pages and with some magic they can be divided in 4 page for each ENGINE + 1 for each MUX. Following this we can support bigger programs up to 128 bytes. Rework the update_program_memory function to support program of multiple pages instead of hardcoding it to one page per programs. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-19-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 5a15b2ab57095a7c8597d42efbfe452844578785 Author: Christian Marangi Date: Wed Jun 26 18:00:22 2024 +0200 leds: leds-lp55xx: Generalize sysfs master_fader Generalize sysfs master_fader since their implementation is the same across some lp55xx based LED driver. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-18-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 8913c2c14728851f110e0d439d5bb2360c767cd2 Author: Christian Marangi Date: Wed Jun 26 18:00:21 2024 +0200 leds: leds-lp55xx: Generalize sysfs engine_leds Generalize sysfs engine_leds since their implementation is the same across some lp55xx based LED driver. While at it simplify the implementation for show_engine_leds. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-17-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 082a4d3f068734eb242e38892d0977ef271c0143 Author: Christian Marangi Date: Wed Jun 26 18:00:20 2024 +0200 leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode Generalize sysfs engine_load and engine_mode since their implementation is the same acrosso some lp55xx based LED driver. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-16-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 43e91e5eb9c8b36ddd1dc239e0d8c36cc034e8ca Author: Christian Marangi Date: Wed Jun 26 18:00:19 2024 +0200 leds: leds-lp55xx: Generalize stop_engine function Generalize stop_engine function as the implementation is the same for most of the lp55xx based LED driver. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-15-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit e35bc5d8a023a55a5f895d6648a455ed83dc0db2 Author: Christian Marangi Date: Wed Jun 26 18:00:18 2024 +0200 leds: leds-lp55xx: Generalize turn_off_channels function Generalize turn_off_channels function as the implementation is the same for most of the lp55xx based LED driver. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-14-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 01e0290d17b2fb9717ee80fed512b32e0460b14c Author: Christian Marangi Date: Wed Jun 26 18:00:17 2024 +0200 leds: leds-lp55xx: Generalize set_led_current function Generalize set_led_current function as the implementation is the same for most of the lp55xx based LED driver. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-13-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 794826b2d87538a0fa5429957439f82bb7f32b53 Author: Christian Marangi Date: Wed Jun 26 18:00:16 2024 +0200 leds: leds-lp55xx: Generalize multicolor_brightness function Generalize multicolor_brightness function as the implementation is the same for most of the lp55xx based LED driver. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-12-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit c63580b27a2c638cbae2fc26484b0bf29f303134 Author: Christian Marangi Date: Wed Jun 26 18:00:15 2024 +0200 leds: leds-lp55xx: Generalize led_brightness function Generalize led_brightness function as the implementation is the same for most of the lp55xx based LED driver. Introduce a new option in device_config, reg_led_pwm_base since the reg value is not the same for every LED chip. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-11-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit a3df1906fb9aa9ff45149e0a3c6434b2cef4f6e7 Author: Christian Marangi Date: Wed Jun 26 18:00:14 2024 +0200 leds: leds-lp55xx: Generalize firmware_loaded function Generalize firmware_loaded function as lp55xx based LED driver all share the same logic. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-10-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 31379a57cf2f155eb147ace86547b7143592945a Author: Christian Marangi Date: Wed Jun 26 18:00:13 2024 +0200 leds: leds-lp55xx: Generalize update_program_memory function LED Driver based on lp55xx all use the same logic to write memory in SMEM. The only difference is that legacy chip doesn't support pages and have the engine regs one after another. To handle this apply the same logic used for load_engine also for update_program_memory. Introduce a new config in device_config, base_prog. For LED chip that doesn't support pages, offset this values of 32 for each engine. Update all lp55xx based LED driver to use this new function and define all the required bits. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-9-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 42a9eaac9784e9b3df56f1947526d7d4d0ed9b26 Author: Christian Marangi Date: Wed Jun 26 18:00:12 2024 +0200 leds: leds-lp55xx: Generalize run_engine function Generalize run_engine function for lp55xx based LED driver. The logic is similar to every LED driver, rework it with more macro magic and account for LED model that might have OP MODE and EXEC at base offset in the reg. Update any lp55xx based LED driver to use this generalized function and declare required bits. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-8-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 409a9dc53682b9f02793584d17721ab3e1b9c86f Author: Christian Marangi Date: Wed Jun 26 18:00:11 2024 +0200 leds: leds-lp55xx: Generalize load_engine_and_select_page function Generalize load_engine_and_select_page by reworking the implementation and making it part of the generic load_engine function. Add a new option in device_config, pages_per_engine used to define pages assigned to each engine. With this option set, it's assumed LED chip supports pages and load_engine will correctly setup the write page. An equal amount of pages is assigned to each engine and they are assigned from page 0. Update any lp55xx based LED driver to define the option and use the new function. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-7-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 4d310b96f2db602830c40f82a75ede799b243cce Author: Christian Marangi Date: Wed Jun 26 18:00:10 2024 +0200 leds: leds-lp55xx: Generalize load_engine function LED driver based on lp55xx have all a very similar implementation for load_engine function. Move the function to lp55xx-common and rework the define to be more dynamic instead of having to declare a temp array for them. Engine mask are the same for every LED based on lp55xx. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-6-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit db30c2891bfc74acb8823edee5f39cbc36bd9a4d Author: Christian Marangi Date: Wed Jun 26 18:00:09 2024 +0200 leds: leds-lp55xx: Generalize probe/remove functions Now that stop_all_engine is generalized, probe and remove function are the same across every lp55xx based LED driver and can be generalized. To permit to use a common probe, make use of the OF match_data and i2c driver_data value to store the device_config struct specific for the LED. Also drop the now unused exported symbol in lp55xx-common and make them static. Update any lp55xx based LED driver to use the new generic probe/remove. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-5-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit a9b202b9cf0e817be756a720920ad4b522e6f6aa Author: Christian Marangi Date: Wed Jun 26 18:00:08 2024 +0200 leds: leds-lp55xx: Generalize stop_all_engine OP In all the lp55xx based driver, we have a similar implementation of the stop_all_engine function with the only difference of the required sleep for the OP MODE change. The main difference is legacy LEDs require a min of 152 us while new one use a generic 1-2ms. The new one use a 1-2ms sleep as suggested in the datasheet IN ALTERNATIVE to a much more robust approach by using the newly introduced ENGINE_BUSY bit in the STATUS reg. To better handle sleep after OP MODE change, add support for polling the ENGINE_BUSY bit and use the legacy sleep for old LEDs. With this change, stop_all_engine can be generalized and moved to lp55xx-common. To make more clear the double usage of lp55xx_reg, define a union for additional scope of mask and shift. Update all lp55xx based driver to use the new generalized function and define the required bits in the device_config struct. Suggested-by: Lee Jones Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240626160027.19703-4-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit a6ca48430de6e87644203bdca03f4065f5b9df7a Author: Christian Marangi Date: Wed Jun 26 18:00:07 2024 +0200 dt-bindings: leds-lp55xx: Add new ti,lp5569 compatible Add new ti,lp5569 compatible, this is similar to national,lp5523 with slight change to reg order and reg type and advanced way for LED fault. Signed-off-by: Christian Marangi Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240626160027.19703-3-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit 468434a059a7d1fad4b98c2ca080817b1520cbdc Author: Christian Marangi Date: Wed Jun 26 18:00:06 2024 +0200 dt-bindings: leds-lp55xx: Limit pwr-sel property to ti,lp8501 pwr-sel property is specific to ti,lp8501, make it conditional of the related compatible. Signed-off-by: Christian Marangi Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240626160027.19703-2-ansuelsmth@gmail.com Signed-off-by: Lee Jones commit c581f17a66b6a5bbd08f240da75f2418b50b2dc6 Author: André Apitzsch Date: Mon Jun 24 23:25:13 2024 +0200 leds: sy7802: Add support for Silergy SY7802 flash LED controller The SY7802 is a current-regulated charge pump which can regulate two current levels for Flash and Torch modes. It is a high-current synchronous boost converter with 2-channel high side current sources. Each channel is able to deliver 900mA current. Acked-by: Lee Jones Signed-off-by: André Apitzsch Link: https://lore.kernel.org/r/20240624-sy7802-v5-2-7abc9d96bfa6@apitzsch.eu Signed-off-by: Lee Jones commit a5aff5da79915a0e39be92c5e6bffae98f67f108 Author: André Apitzsch Date: Mon Jun 24 23:25:12 2024 +0200 dt-bindings: leds: Add Silergy SY7802 flash LED Document Silergy SY7802 flash LED driver devicetree bindings. Reviewed-by: Rob Herring Signed-off-by: André Apitzsch Link: https://lore.kernel.org/r/20240624-sy7802-v5-1-7abc9d96bfa6@apitzsch.eu Signed-off-by: Lee Jones commit 1dee6a4d62a987c17d7ec02b6fc059b2b196a250 Author: Bastien Curutchet Date: Mon Jun 17 16:39:10 2024 +0200 leds: pca9532: Change default blinking frequency to 1Hz Default blinking period is set to 2s. This is too long to be handled by the hardware (maximum is 1.69s). Set the default blinking period to 1s to match what is done in the other LED drivers. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240617143910.154546-5-bastien.curutchet@bootlin.com Signed-off-by: Lee Jones commit f51bc3cedfc4518101d16d965ab12787cb305366 Author: Bastien Curutchet Date: Mon Jun 17 16:39:09 2024 +0200 leds: pca9532: Explicitly disable hardware blink when PWM1 is unavailable When a LED is used to drive a beeper, it uses PWM1. This can cause conflicts if an other LED want to use PWM1 for blinking. Disable use of hardware for blinking when one or more LEDs are used to drive beepers. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240617143910.154546-4-bastien.curutchet@bootlin.com Signed-off-by: Lee Jones commit 48ca7f302cfcfa3d957e2305775532b1d67f5872 Author: Bastien Curutchet Date: Mon Jun 17 16:39:08 2024 +0200 leds: pca9532: Use PWM1 for hardware blinking PSC0/PWM0 are used by all LEDs for brightness and blinking. This causes conflicts when you set a brightness of a new LED while an other one is already using PWM0 for blinking. Use PSC1/PWM1 for blinking. Check that no other LED is already blinking with a different PSC1/PWM1 configuration to avoid conflict. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240617143910.154546-3-bastien.curutchet@bootlin.com Signed-off-by: Lee Jones commit 0e69c9062b406d9381eff8b6f585ce2a92c442f0 Author: Bastien Curutchet Date: Mon Jun 17 16:39:07 2024 +0200 leds: pca9532: Use defines to select PWM instance Two tables are used to configure the PWM and PSC registers of the two PWM available in the pca9532. Magic numbers are used to access this table instead of defines. Add defines PCA9532_PWM_ID_0 and PCA9532_PWM_ID_1 and use them in place of these magic numbers. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240617143910.154546-2-bastien.curutchet@bootlin.com Signed-off-by: Lee Jones commit a031c814976012c7ab50a41165f3fdca524341a8 Author: Hans de Goede Date: Sun Jun 2 18:02:03 2024 +0200 leds: trigger: input-events: Rewrite to fix a serious locking issue The input subsystem registers LEDs with default triggers while holding the input_lock and input_register_handler() takes the input_lock this means that a triggers activate method cannot directly call input_register_handler() as the old ledtrig-input-events code is doing. The initial implementation of the input-events trigger mainly did not use the simple LED trigger mechanism because that mechanism had an issue with the initial state of a newly activated LED not matching the last led_trigger_event() call for the trigger. This issue has been fixed in commit 822c91e72eac ("leds: trigger: Store brightness set by led_trigger_event()"). Rewrite the "input-events" trigger to use the simple LED trigger mechanism, registering a single input_handler at module_init() time and using led_trigger_event() to set the brightness for all LEDs controlled by this trigger. Compared to the old code this looses the ability for the user to configure a different brightness for the on state then LED_FULL, this is standard for simple LED triggers and since this trigger is only in for-leds-next ATM losing that functionality is not a regression. This also changes the configurability of the LED off timeout from a per LED setting to a global setting (runtime modifiable module-parameter). Switching to registering a single input_handler at module_init() time fixes the following locking issue reported by lockdep: [ 2840.220145] usb 1-1.3: new low-speed USB device number 3 using xhci_hcd [ 2840.307172] usb 1-1.3: New USB device found, idVendor=0603, idProduct=0002, bcdDevice= 2.21 [ 2840.307375] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2840.307423] usb 1-1.3: Product: USB Composite Device [ 2840.307456] usb 1-1.3: Manufacturer: SINO WEALTH [ 2840.333985] input: SINO WEALTH USB Composite Device as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:0603:0002.0007/input/input19 [ 2840.386545] ====================================================== [ 2840.386549] WARNING: possible circular locking dependency detected [ 2840.386554] 6.10.0-rc1+ #97 Tainted: G C E [ 2840.386558] ------------------------------------------------------ [ 2840.386562] kworker/1:1/52 is trying to acquire lock: [ 2840.386566] ffff98fcf1629300 (&led_cdev->led_access){+.+.}-{3:3}, at: led_classdev_register_ext+0x1c6/0x380 [ 2840.386590] but task is already holding lock: [ 2840.386593] ffffffff88130cc8 (input_mutex){+.+.}-{3:3}, at: input_register_device.cold+0x47/0x150 [ 2840.386608] which lock already depends on the new lock. [ 2840.386611] the existing dependency chain (in reverse order) is: [ 2840.386615] -> #3 (input_mutex){+.+.}-{3:3}: [ 2840.386624] __mutex_lock+0x8c/0xc10 [ 2840.386634] input_register_handler+0x1c/0xf0 [ 2840.386641] 0xffffffffc142c437 [ 2840.386655] led_trigger_set+0x1e1/0x2e0 [ 2840.386661] led_trigger_register+0x170/0x1b0 [ 2840.386666] do_one_initcall+0x5e/0x3a0 [ 2840.386675] do_init_module+0x60/0x220 [ 2840.386683] __do_sys_init_module+0x15f/0x190 [ 2840.386689] do_syscall_64+0x93/0x180 [ 2840.386696] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 2840.386705] -> #2 (&led_cdev->trigger_lock){+.+.}-{3:3}: [ 2840.386714] down_write+0x3b/0xd0 [ 2840.386720] led_trigger_register+0x12c/0x1b0 [ 2840.386725] rfkill_register+0xec/0x340 [rfkill] [ 2840.386739] wiphy_register+0x82a/0x930 [cfg80211] [ 2840.386907] brcmf_cfg80211_attach+0xcbd/0x1430 [brcmfmac] [ 2840.386952] brcmf_attach+0x1ba/0x4c0 [brcmfmac] [ 2840.386991] brcmf_pcie_setup+0x899/0xc70 [brcmfmac] [ 2840.387030] brcmf_fw_request_done+0x13b/0x180 [brcmfmac] [ 2840.387070] request_firmware_work_func+0x3b/0x70 [ 2840.387078] process_one_work+0x21a/0x590 [ 2840.387085] worker_thread+0x1d1/0x3e0 [ 2840.387090] kthread+0xee/0x120 [ 2840.387096] ret_from_fork+0x30/0x50 [ 2840.387105] ret_from_fork_asm+0x1a/0x30 [ 2840.387112] -> #1 (leds_list_lock){++++}-{3:3}: [ 2840.387123] down_write+0x3b/0xd0 [ 2840.387129] led_classdev_register_ext+0x29e/0x380 [ 2840.387134] 0xffffffffc0e6b74c [ 2840.387143] platform_probe+0x40/0xa0 [ 2840.387151] really_probe+0xde/0x340 [ 2840.387157] __driver_probe_device+0x78/0x110 [ 2840.387162] driver_probe_device+0x1f/0xa0 [ 2840.387168] __driver_attach+0xba/0x1c0 [ 2840.387173] bus_for_each_dev+0x6b/0xb0 [ 2840.387180] bus_add_driver+0x111/0x1f0 [ 2840.387185] driver_register+0x6e/0xc0 [ 2840.387191] do_one_initcall+0x5e/0x3a0 [ 2840.387197] do_init_module+0x60/0x220 [ 2840.387204] __do_sys_init_module+0x15f/0x190 [ 2840.387210] do_syscall_64+0x93/0x180 [ 2840.387217] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 2840.387224] -> #0 (&led_cdev->led_access){+.+.}-{3:3}: [ 2840.387233] __lock_acquire+0x11c6/0x1f20 [ 2840.387239] lock_acquire+0xc8/0x2b0 [ 2840.387244] __mutex_lock+0x8c/0xc10 [ 2840.387251] led_classdev_register_ext+0x1c6/0x380 [ 2840.387256] input_leds_connect+0x139/0x260 [ 2840.387262] input_attach_handler.isra.0+0x75/0x90 [ 2840.387268] input_register_device.cold+0xa1/0x150 [ 2840.387274] hidinput_connect+0x848/0xb00 [ 2840.387280] hid_connect+0x567/0x5a0 [ 2840.387288] hid_hw_start+0x3f/0x60 [ 2840.387294] hid_device_probe+0x10d/0x190 [ 2840.387298] really_probe+0xde/0x340 [ 2840.387304] __driver_probe_device+0x78/0x110 [ 2840.387309] driver_probe_device+0x1f/0xa0 [ 2840.387314] __device_attach_driver+0x85/0x110 [ 2840.387320] bus_for_each_drv+0x78/0xc0 [ 2840.387326] __device_attach+0xb0/0x1b0 [ 2840.387332] bus_probe_device+0x94/0xb0 [ 2840.387337] device_add+0x64a/0x860 [ 2840.387343] hid_add_device+0xe5/0x240 [ 2840.387349] usbhid_probe+0x4bb/0x600 [ 2840.387356] usb_probe_interface+0xea/0x2b0 [ 2840.387363] really_probe+0xde/0x340 [ 2840.387368] __driver_probe_device+0x78/0x110 [ 2840.387373] driver_probe_device+0x1f/0xa0 [ 2840.387378] __device_attach_driver+0x85/0x110 [ 2840.387383] bus_for_each_drv+0x78/0xc0 [ 2840.387390] __device_attach+0xb0/0x1b0 [ 2840.387395] bus_probe_device+0x94/0xb0 [ 2840.387400] device_add+0x64a/0x860 [ 2840.387405] usb_set_configuration+0x5e8/0x880 [ 2840.387411] usb_generic_driver_probe+0x3e/0x60 [ 2840.387418] usb_probe_device+0x3d/0x120 [ 2840.387423] really_probe+0xde/0x340 [ 2840.387428] __driver_probe_device+0x78/0x110 [ 2840.387434] driver_probe_device+0x1f/0xa0 [ 2840.387439] __device_attach_driver+0x85/0x110 [ 2840.387444] bus_for_each_drv+0x78/0xc0 [ 2840.387451] __device_attach+0xb0/0x1b0 [ 2840.387456] bus_probe_device+0x94/0xb0 [ 2840.387461] device_add+0x64a/0x860 [ 2840.387466] usb_new_device.cold+0x141/0x38f [ 2840.387473] hub_event+0x1166/0x1980 [ 2840.387479] process_one_work+0x21a/0x590 [ 2840.387484] worker_thread+0x1d1/0x3e0 [ 2840.387488] kthread+0xee/0x120 [ 2840.387493] ret_from_fork+0x30/0x50 [ 2840.387500] ret_from_fork_asm+0x1a/0x30 [ 2840.387506] other info that might help us debug this: [ 2840.387509] Chain exists of: &led_cdev->led_access --> &led_cdev->trigger_lock --> input_mutex [ 2840.387520] Possible unsafe locking scenario: [ 2840.387523] CPU0 CPU1 [ 2840.387526] ---- ---- [ 2840.387529] lock(input_mutex); [ 2840.387534] lock(&led_cdev->trigger_lock); [ 2840.387540] lock(input_mutex); [ 2840.387545] lock(&led_cdev->led_access); [ 2840.387550] *** DEADLOCK *** [ 2840.387552] 7 locks held by kworker/1:1/52: [ 2840.387557] #0: ffff98fcc1d07148 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x4af/0x590 [ 2840.387570] #1: ffffb67e00213e60 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x1d5/0x590 [ 2840.387583] #2: ffff98fcc6582190 (&dev->mutex){....}-{3:3}, at: hub_event+0x57/0x1980 [ 2840.387596] #3: ffff98fccb3c6990 (&dev->mutex){....}-{3:3}, at: __device_attach+0x26/0x1b0 [ 2840.387610] #4: ffff98fcc5260960 (&dev->mutex){....}-{3:3}, at: __device_attach+0x26/0x1b0 [ 2840.387622] #5: ffff98fce3999a20 (&dev->mutex){....}-{3:3}, at: __device_attach+0x26/0x1b0 [ 2840.387635] #6: ffffffff88130cc8 (input_mutex){+.+.}-{3:3}, at: input_register_device.cold+0x47/0x150 [ 2840.387649] stack backtrace: [ 2840.387653] CPU: 1 PID: 52 Comm: kworker/1:1 Tainted: G C E 6.10.0-rc1+ #97 [ 2840.387659] Hardware name: Xiaomi Inc Mipad2/Mipad, BIOS MIPad-P4.X64.0043.R03.1603071414 03/07/2016 [ 2840.387665] Workqueue: usb_hub_wq hub_event [ 2840.387674] Call Trace: [ 2840.387681] [ 2840.387689] dump_stack_lvl+0x68/0x90 [ 2840.387700] check_noncircular+0x10d/0x120 [ 2840.387710] ? register_lock_class+0x38/0x480 [ 2840.387717] ? check_noncircular+0x74/0x120 [ 2840.387727] __lock_acquire+0x11c6/0x1f20 [ 2840.387736] lock_acquire+0xc8/0x2b0 [ 2840.387743] ? led_classdev_register_ext+0x1c6/0x380 [ 2840.387753] __mutex_lock+0x8c/0xc10 [ 2840.387760] ? led_classdev_register_ext+0x1c6/0x380 [ 2840.387766] ? _raw_spin_unlock_irqrestore+0x35/0x60 [ 2840.387773] ? klist_next+0x158/0x160 [ 2840.387781] ? led_classdev_register_ext+0x1c6/0x380 [ 2840.387787] ? lockdep_init_map_type+0x58/0x250 [ 2840.387796] ? led_classdev_register_ext+0x1c6/0x380 [ 2840.387802] led_classdev_register_ext+0x1c6/0x380 [ 2840.387810] ? kvasprintf+0x70/0xb0 [ 2840.387820] ? kasprintf+0x3e/0x50 [ 2840.387829] input_leds_connect+0x139/0x260 [ 2840.387838] input_attach_handler.isra.0+0x75/0x90 [ 2840.387846] input_register_device.cold+0xa1/0x150 [ 2840.387854] hidinput_connect+0x848/0xb00 [ 2840.387862] ? usbhid_start+0x45b/0x7b0 [ 2840.387870] hid_connect+0x567/0x5a0 [ 2840.387878] ? __mutex_unlock_slowpath+0x2d/0x260 [ 2840.387891] hid_hw_start+0x3f/0x60 [ 2840.387899] hid_device_probe+0x10d/0x190 [ 2840.387906] ? __pfx___device_attach_driver+0x10/0x10 [ 2840.387913] really_probe+0xde/0x340 [ 2840.387919] ? pm_runtime_barrier+0x50/0x90 [ 2840.387927] __driver_probe_device+0x78/0x110 [ 2840.387934] driver_probe_device+0x1f/0xa0 [ 2840.387941] __device_attach_driver+0x85/0x110 [ 2840.387949] bus_for_each_drv+0x78/0xc0 [ 2840.387959] __device_attach+0xb0/0x1b0 [ 2840.387967] bus_probe_device+0x94/0xb0 [ 2840.387974] device_add+0x64a/0x860 [ 2840.387982] ? __debugfs_create_file+0x14a/0x1c0 [ 2840.387993] hid_add_device+0xe5/0x240 [ 2840.388002] usbhid_probe+0x4bb/0x600 [ 2840.388013] usb_probe_interface+0xea/0x2b0 [ 2840.388021] ? __pfx___device_attach_driver+0x10/0x10 [ 2840.388028] really_probe+0xde/0x340 [ 2840.388034] ? pm_runtime_barrier+0x50/0x90 [ 2840.388040] __driver_probe_device+0x78/0x110 [ 2840.388048] driver_probe_device+0x1f/0xa0 [ 2840.388055] __device_attach_driver+0x85/0x110 [ 2840.388062] bus_for_each_drv+0x78/0xc0 [ 2840.388071] __device_attach+0xb0/0x1b0 [ 2840.388079] bus_probe_device+0x94/0xb0 [ 2840.388086] device_add+0x64a/0x860 [ 2840.388094] ? __mutex_unlock_slowpath+0x2d/0x260 [ 2840.388103] usb_set_configuration+0x5e8/0x880 [ 2840.388114] ? __pfx___device_attach_driver+0x10/0x10 [ 2840.388121] usb_generic_driver_probe+0x3e/0x60 [ 2840.388129] usb_probe_device+0x3d/0x120 [ 2840.388137] really_probe+0xde/0x340 [ 2840.388142] ? pm_runtime_barrier+0x50/0x90 [ 2840.388149] __driver_probe_device+0x78/0x110 [ 2840.388156] driver_probe_device+0x1f/0xa0 [ 2840.388163] __device_attach_driver+0x85/0x110 [ 2840.388171] bus_for_each_drv+0x78/0xc0 [ 2840.388180] __device_attach+0xb0/0x1b0 [ 2840.388188] bus_probe_device+0x94/0xb0 [ 2840.388195] device_add+0x64a/0x860 [ 2840.388202] ? lockdep_hardirqs_on+0x78/0x100 [ 2840.388210] ? _raw_spin_unlock_irqrestore+0x35/0x60 [ 2840.388219] usb_new_device.cold+0x141/0x38f [ 2840.388227] hub_event+0x1166/0x1980 [ 2840.388242] process_one_work+0x21a/0x590 [ 2840.388249] ? move_linked_works+0x70/0xa0 [ 2840.388260] worker_thread+0x1d1/0x3e0 [ 2840.388268] ? __pfx_worker_thread+0x10/0x10 [ 2840.388273] kthread+0xee/0x120 [ 2840.388279] ? __pfx_kthread+0x10/0x10 [ 2840.388287] ret_from_fork+0x30/0x50 [ 2840.388294] ? __pfx_kthread+0x10/0x10 [ 2840.388301] ret_from_fork_asm+0x1a/0x30 [ 2840.388315] [ 2840.415630] hid-generic 0003:0603:0002.0007: input,hidraw6: USB HID v1.10 Keyboard [SINO WEALTH USB Composite Device] on usb-0000:00:14.0-1.3/input0 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240602160203.27339-2-hdegoede@redhat.com Signed-off-by: Lee Jones commit d35625734abea81299f75b3d05c6e2d0d6142b62 Author: MarileneGarcia Date: Sat Jun 1 00:17:13 2024 -0300 leds: powernv: Replace of_node_put to __free Use __free for device_node values, and thus drop calls to of_node_put. The variable attribute __free adds a scope based cleanup to the device node. The goal is to reduce memory management issues in the kernel code. The of_node_put calls were removed, and the for_each_available_child_of_node was replaced to the equivalent for_each_available_child_of_node_scoped which use the __free. Suggested-by: Julia Lawall Signed-off-by: MarileneGarcia Link: https://lore.kernel.org/r/20240601031713.1307859-1-marilene.agarcia@gmail.com Signed-off-by: Lee Jones commit e786348b247c704081378a40341b4b36866a0395 Author: Lee Jones Date: Thu Jun 13 18:23:53 2024 +0100 MAINTAINERS: Update LED's active maintainer tree Pavel's repo hasn't been used actively for quite some time. Let's make it official. Cc: Pavel Machek Signed-off-by: Lee Jones commit e41d574b359ccd8d99be65c6f11502efa2b83136 Author: Javier Carrasco Date: Tue Jun 11 00:40:26 2024 +0200 leds: mt6360: Fix memory leak in mt6360_init_isnk_properties() The fwnode_for_each_child_node() loop requires manual intervention to decrement the child refcount in case of an early return. Add the missing calls to fwnode_handle_put(child) to avoid memory leaks in the error paths. Cc: stable@vger.kernel.org Fixes: 679f8652064b ("leds: Add mt6360 driver") Signed-off-by: Javier Carrasco Acked-by: Pavel Machek Link: https://lore.kernel.org/r/20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com Signed-off-by: Lee Jones commit 8d89afc6359c228c51087d90a4a72af2ea95140c Author: Marilene A Garcia Date: Mon Jun 10 21:17:40 2024 -0300 leds: tlc591xx: Replace of_node_put to __free Use __free() for device_node values, and thus drop calls to of_node_put(). The variable attribute __free() adds a scope based cleanup to the device node. The goal is to reduce memory management issues in the kernel code. The for_each_available_child_of_node() was replaced to the equivalent for_each_available_child_of_node_scoped() which uses the __free(). Suggested-by: Julia Lawall Signed-off-by: Marilene A Garcia Link: https://lore.kernel.org/r/20240611001740.10490-1-marilene.agarcia@gmail.com Signed-off-by: Lee Jones commit 7e776e21255bf4c271e0df0a7d289a4963580e61 Author: Anjelique Melendez Date: Thu Jun 6 17:52:50 2024 -0700 leds: rgb: leds-qcom-lpg: Add PPG check for setting/clearing PBS triggers Currently, all LED LPG devices will call lpg_{set,clear}_pbs_trigger() when setting brightness regardless of if they support PPG and have PBS triggers. Check if device supports PPG before setting/clearing PBS triggers. Fixes: 6ab1f766a80a ("leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM") Fixes: 5e9ff626861a ("leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT SDAM") Signed-off-by: Anjelique Melendez Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240607005250.4047135-1-quic_amelende@quicinc.com Signed-off-by: Lee Jones commit ab477b766edd3bfb6321a6e3df4c790612613fae Author: Thomas Weißschuh Date: Thu Jun 13 17:24:51 2024 +0200 leds: triggers: Flush pending brightness before activating trigger The race fixed in timer_trig_activate() between a blocking set_brightness() call and trigger->activate() can affect any trigger. So move the call to flush_work() into led_trigger_set() where it can avoid the race for all triggers. Fixes: 0db37915d912 ("leds: avoid races with workqueue") Fixes: 8c0f693c6eff ("leds: avoid flush_work in atomic context") Cc: stable@vger.kernel.org Tested-by: Dustin L. Howett Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240613-led-trigger-flush-v2-1-f4f970799d77@weissschuh.net Signed-off-by: Lee Jones commit 25458b2a4070c339d11af78dbecff3e845e6ad04 Author: Andy Shevchenko Date: Thu Jun 6 20:29:23 2024 +0300 leds: spi-byte: Move OF ID table closer to their user There is no code that uses ID table directly, except the struct device_driver at the end of the file. Hence, move table closer to its user. It's always possible to access them via a pointer. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606173037.3091598-7-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 133f941f2239cbf8bd4b8a9c112e4811215149bf Author: Andy Shevchenko Date: Thu Jun 6 20:29:22 2024 +0300 leds: spi-byte: Use devm_mutex_init() for mutex initialization In this driver LEDs are registered using devm_led_classdev_register() so they are automatically unregistered after module's remove() is done. led_classdev_unregister() calls module's led_set_brightness() to turn off the LEDs and that callback uses mutex which was destroyed already in module's remove() so use devm API instead. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606173037.3091598-6-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 9ed388d1acb9b8d1136f429573d14ade963ba727 Author: Andy Shevchenko Date: Thu Jun 6 20:29:21 2024 +0300 leds: spi-byte: Utilise temporary variable for struct device We have a temporary variable to keep a pointer to struct device. Utilise it where it makes sense. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606173037.3091598-5-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 67b66160bdb266f11ce65003a3e22d0986ad256c Author: Andy Shevchenko Date: Thu Jun 6 20:29:20 2024 +0300 leds: spi-byte: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606173037.3091598-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 4b268456e0aa287595b3de82da673c2c9178dedb Author: Andy Shevchenko Date: Thu Jun 6 20:29:19 2024 +0300 leds: spi-byte: Get rid of custom led_init_default_state_get() LED core provides a helper to parse default state from firmware node. Use it instead of custom implementation. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606173037.3091598-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 7f9ab862e05c5bc755f65bf6db7edcffb3b49dfc Author: Andy Shevchenko Date: Thu Jun 6 20:29:18 2024 +0300 leds: spi-byte: Call of_node_put() on error path Add a missing call to of_node_put(np) on error. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606173037.3091598-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit e1524a62991f284b3a552c009759ea126d7a096a Author: Markus Elfring Date: Wed Jun 5 16:19:26 2024 +0200 leds: ncp5623: Use common error handling code in ncp5623_probe() Add a label so that a bit of exception handling can be better reused at the end of this function implementation. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/5faec5de-fc36-4b38-abcb-c61954a824cd@web.de Signed-off-by: Lee Jones commit d33d1214a1ddf9e7e4d14c62637518252927f0be Author: Lee Jones Date: Wed Jun 12 16:36:40 2024 +0100 leds: core: Omit set_brightness error message for a LED supporting hw trigger only If both set_brightness functions return -ENOTSUPP, then the LED doesn't support setting a fixed brightness value, and the error message isn't helpful. This can be the case e.g. for LEDs supporting a specific hw trigger only. Pinched the subject line and commit message from Heiner: Link: https://lore.kernel.org/all/44177e37-9512-4044-8991-bb23b184bf37@gmail.com/ Reworked the function to provide Heiner's required semantics whilst simultaneously increasing readability and flow. Cc: Pavel Machek Cc: linux-leds@vger.kernel.org Suggested-by: Heiner Kallweit Reviewed-by: Heiner Kallweit Signed-off-by: Lee Jones commit b337cc3ce47549528fc3ee0b8c7ebd33348a3126 Author: Javier Carrasco Date: Mon Jun 24 17:30:50 2024 +0200 backlight: lm3509_bl: Fix early returns in for_each_child_of_node() The for_each_child_of_node() macro automatically decrements the child refcount at the end of every iteration. On early exits, of_node_put() must be used to manually decrement the refcount and avoid memory leaks. The scoped version of the macro accounts for such early breaks, fixing the early exits without the need for explicit calls to of_node_put(). Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202406172314.2vVgelaS-lkp@intel.com/ Fixes: b72755f5b577 ("backlight: Add new lm3509 backlight driver") Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240624-lm3509_bl_scoped-v1-1-ceba9df38f23@gmail.com Signed-off-by: Lee Jones commit 35d6b98c625867209bc47df99cf03edf4280799f Author: Peter Griffin Date: Fri Jun 21 12:55:44 2024 +0100 soc: samsung: exynos-pmu: update to use of_syscon_register_regmap() For SoCs like gs101 that need a special regmap, register this with of_syscon_register_regmap api, so it can be returned by syscon_regmap_lookup_by_phandle() and friends. For SoCs that don't require a custom regmap, revert back to syscon creating the mmio regmap rather than duplicating the logic here. exynos_get_pmu_regmap_by_phandle() api is also updated to retrieve the regmap via syscon. The exynos_get_pmu_regmap_by_phandle() api is kept around until fw_devlink support for syscon property is added for the pinctrl-samsung driver that also runs at postcore_initcall level. All other exynos client drivers can revert back to syscon_regmap_lookup_by_phandle(). Signed-off-by: Peter Griffin Reviewed-by: Arnd Bergmann Reviewed-by: Sam Protsenko Tested-by: Will McVicker Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240621115544.1655458-3-peter.griffin@linaro.org Signed-off-by: Lee Jones commit 769cb63166d90f1fadafa4352f180cbd96b6cb77 Author: Peter Griffin Date: Fri Jun 21 12:55:43 2024 +0100 mfd: syscon: Add of_syscon_register_regmap() API The of_syscon_register_regmap() API allows an externally created regmap to be registered with syscon. This regmap can then be returned to client drivers using the syscon_regmap_lookup_by_phandle() APIs. The API is used by platforms where mmio access to the syscon registers is not possible, and a underlying soc driver like exynos-pmu provides a SoC specific regmap that can issue a SMC or hypervisor call to write the register. This approach keeps the SoC complexities out of syscon, but allows common drivers such as syscon-poweroff, syscon-reboot and friends that are used by many SoCs already to be re-used. Signed-off-by: Peter Griffin Reviewed-by: Arnd Bergmann Reviewed-by: Sam Protsenko Tested-by: Will McVicker Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240621115544.1655458-2-peter.griffin@linaro.org Signed-off-by: Lee Jones commit d5316cdd15da9b37ddaa531f0739e4886ecd6faa Author: Lucas Stach Date: Fri May 17 12:45:49 2024 +0200 gpu: ipu-v3: pre: don't use fixed timeout when waiting for safe window The timeout when waiting for the PRE safe window is rather short, as normally we would only need to wait a few dozen usecs for the problematic scanline region to pass and we don't want to spin too long in case something goes wrong. This however mixes badly with preemption, as we can easily get scheduled away from the CPU for a longer time than our timeout, in which case we would hit a spurious timeout and wrongly skip the PRE update. Instead of disabling preemption across the wait loop, potentially impacting the overall system latency, use a wait loop with a fixed max number of iterations, so time spent away from the CPU is not accounted against the timeout budget. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20240517104549.3648939-3-l.stach@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20240517104549.3648939-3-l.stach@pengutronix.de commit 4dbc7d5d61d5212bcfef794f47562ace58ac390b Author: Lucas Stach Date: Fri May 17 12:45:48 2024 +0200 gpu: ipu-v3: pre: add dynamic buffer layout reconfiguration imx-drm doesn't mandate a modeset when the framebuffer modifier changes, but currently the tile prefetch and resolve (TPR) configuration of the PRE is only set up on the initial modeset. As the TPR configuration is double buffered, same as all the other PRE states, we can support dynamic reconfiguration of the buffer layout from one frame to another. As switching between (super-)tiled and linear prefetch needs to touch the CTRL register make sure to do the reconfiguration inside the safe window. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20240517104549.3648939-2-l.stach@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20240517104549.3648939-2-l.stach@pengutronix.de commit ee7ff5e26b9d915667db75a2c79b04590afe3b80 Author: Lucas Stach Date: Fri May 17 12:45:47 2024 +0200 gpu: ipu-v3: pre: move state into struct Move the variables tracking the current dynamic state into a struct to separate it a bit better from the static device properties. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20240517104549.3648939-1-l.stach@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20240517104549.3648939-1-l.stach@pengutronix.de commit 81112c6f36b513cdcf2506ffacdb92c7674737f2 Author: R Sundar Date: Sat Apr 27 10:20:24 2024 +0530 gpu: ipu-v3: pre: replace of_node_put() with __free use the new cleanup magic to replace of_node_put() with __free(device_node) marking to auto release when they get out of scope. Suggested-by: Julia Lawall Signed-off-by: R Sundar Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20240427045024.7083-1-prosunofficial@gmail.com Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20240427045024.7083-1-prosunofficial@gmail.com commit 60a6707f582ebbdfb6b378f45d7bf929106a1cd5 Merge: d6ecd188937fc 4705c1571ad39 Author: Palmer Dabbelt Date: Wed Jun 26 08:43:07 2024 -0700 Merge patch series "riscv: Memory Hot(Un)Plug support" Björn Töpel says: From: Björn Töpel ================================================================ Memory Hot(Un)Plug support (and ZONE_DEVICE) for the RISC-V port ================================================================ Introduction ============ To quote "Documentation/admin-guide/mm/memory-hotplug.rst": "Memory hot(un)plug allows for increasing and decreasing the size of physical memory available to a machine at runtime." This series adds memory hot(un)plugging, and ZONE_DEVICE support for the RISC-V Linux port. MM configuration ================ RISC-V MM has the following configuration: * Memory blocks are 128M, analogous to x86-64. It uses PMD ("hugepage") vmemmaps. From that follows that 2M (PMD) worth of vmemmap spans 32768 pages á 4K which gets us 128M. * The pageblock size is the minimum minimum virtio_mem size, and on RISC-V it's 2M (2^9 * 4K). Implementation ============== The PGD table on RISC-V is shared/copied between for all processes. To avoid doing page table synchronization, the first patch (patch 1) pre-allocated the PGD entries for vmemmap/direct map. By doing that the init_mm PGD will be fixed at kernel init, and synchronization can be avoided all together. The following two patches (patch 2-3) does some preparations, followed by the actual MHP implementation (patch 4-5). Then, MHP and virtio-mem are enabled (patch 6-7), and finally ZONE_DEVICE support is added (patch 8). MHP and locking =============== TL;DR: The MHP does not step on any toes, except for ptdump. Additional locking is required for ptdump. Long version: For v2 I spent some time digging into init_mm synchronization/update. Here are my findings, and I'd love them to be corrected if incorrect. It's been a gnarly path... The `init_mm` structure is a special mm (perhaps not a "real" one). It's a "lazy context" that tracks kernel page table resources, e.g., the kernel page table (swapper_pg_dir), a kernel page_table_lock (more about the usage below), mmap_lock, and such. `init_mm` does not track/contain any VMAs. Having the `init_mm` is convenient, so that the regular kernel page table walk/modify functions can be used. Now, `init_mm` being special means that the locking for kernel page tables are special as well. On RISC-V the PGD (top-level page table structure), similar to x86, is shared (copied) with user processes. If the kernel PGD is modified, it has to be synched to user-mode processes PGDs. This is avoided by pre-populating the PGD, so it'll be fixed from boot. The in-kernel pgd regions are documented in `Documentation/arch/riscv/vm-layout.rst`. The distinct regions are: * vmemmap * vmalloc/ioremap space * direct mapping of all physical memory * kasan * modules, BPF * kernel Memory hotplug is the process of adding/removing memory to/from the kernel. Adding is done in two phases: 1. Add the memory to the kernel 2. Online memory, making it available to the page allocator. Step 1 is partially architecture dependent, and updates the init_mm page table: * Update the direct map page tables. The direct map is a linear map, representing all physical memory: `virt = phys + PAGE_OFFSET` * Add a `struct page` for each added page of memory. Update the vmemmap (virtual mapping to the `struct page`, so we can easily transform a kernel virtual address to a `struct page *` address. From an MHP perspective, there are two regions of the PGD that are updated: * vmemmap * direct mapping of all physical memory The `struct mm_struct` has a couple of locks in play: * `spinlock_t page_table_lock` protects the page table, and some counters * `struct rw_semaphore mmap_lock` protect an mm's VMAs Note again that `init_mm` does not contain any VMAs, but still uses the mmap_lock in some places. The `page_table_lock` was originally used to to protect all pages tables, but more recently a split page table lock has been introduced. The split lock has a per-table lock for the PTE and PMD tables. If split lock is disabled, all tables are guarded by `mm->page_table_lock` (for user processes). Split page table locks are not used for init_mm. MHP operations is typically synchronized using `DEFINE_STATIC_PERCPU_RWSEM(mem_hotplug_lock)`. Actors ------ The following non-MHP actors in the kernel traverses (read), and/or modifies the kernel PGD. * `ptdump` Walks the entire `init_mm`, via `ptdump_walk_pgd()` with the `mmap_write_lock(init_mm)` taken. Observation: ptdump can race with MHP, and needs additional locking to avoid crashes/races. * `set_direct_*` / `arch/riscv/mm/pageattr.c` The `set_direct_*` functionality is used to "synchronize" the direct map to other kernel mappings, e.g. modules/kernel text. The direct map is using "as large huge table mappings as possible", which means that the `set_direct_*` might need to split the direct map. The `set_direct_*` functions operates with the `mmap_write_lock(init_mm)` taken. Observation: `set_direct_*` uses the direct map, but will never modify the same entry as MHP. If there is a mapping, that entry will never race with MHP. Further, MHP acts when memory is offline. * HVO / `mm/hugetlb_vmemmap` HVO optimizes the backing `struct page` for hugetlb pages, which means changing the "vmemmap" region. HVO can split (merge?) a vmemmap pmd. However, it will never race with MHP, since HVO only operates at online memory. HVO cannot touch memory being MHP added or removed. * `apply_to_page_range` Walks a range, creates pages and applies a callback (setting permissions) for the page. When creating a table, it might use `int __pte_alloc_kernel(pmd_t *pmd)` which takes the `init_mm.page_table_lock` to synchronize pmd populate. Used by: `mm/vmalloc.c` and `mm/kasan/shadow.c`. The KASAN callback takes the `init_mm.page_table_lock` to synchronize pte creation. Observations: `apply_to_page_range` applies to the "vmalloc/ioremap space" region, and "kasan" region. *Not* affected by MHP. * `apply_to_existing_page_range` Walks a range, applies a callback (setting permissions) for the page (no page creation). Used by: `kernel/bpf/arena.c` and `mm/kasan/shadow.c`. The KASAN callback takes the `init_mm.page_table_lock` to synchronize pte creation. *Not* affected by MHP regions. * `apply_to_existing_page_range` applies to the "vmalloc/ioremap space" region, and "kasan" region. *Not* affected by MHP regions. * `ioremap_page_range` and `vmap_page_range` Uses the same internal function, and might create table entries at the "vmalloc/ioremap space" region. Can call `__pte_alloc_kernel()` which takes the `init_mm.page_table_lock` synchronizing pmd populate in the region. *Not* affected by MHP regions. Summary: * MHP add will never modify the same page table entries, as any of the other actors. * MHP remove is done when memory is offlined, and will not clash with any of the actors. * Functions that walk the entire kernel page table need synchronization * It's sufficient to add the MHP lock ptdump. Testing ======= This series adds basic DT supported hotplugging. There is a QEMU series enabling MHP for the RISC-V "virt" machine here: [1] ACPI/MSI support is still in the making for RISC-V, and prior proper (ACPI) PCI MSI support lands [2] and NUMA SRAT support [3], it hard to try it out. I've prepared a QEMU branch with proper ACPI GED/PC-DIMM support [4], and a this series with the required prerequisites [5] (AIA, ACPI AIA MADT, ACPI NUMA SRAT). To test with virtio-mem, e.g.: | qemu-system-riscv64 \ | -machine virt,aia=aplic-imsic \ | -cpu rv64,v=true,vlen=256,elen=64,h=true,zbkb=on,zbkc=on,zbkx=on,zkr=on,zkt=on,svinval=on,svnapot=on,svpbmt=on \ | -nodefaults \ | -nographic -smp 8 -kernel rv64-u-boot.bin \ | -drive file=rootfs.img,format=raw,if=virtio \ | -device virtio-rng-pci \ | -m 16G,slots=3,maxmem=32G \ | -object memory-backend-ram,id=mem0,size=16G \ | -numa node,nodeid=0,memdev=mem0 \ | -serial chardev:char0 \ | -mon chardev=char0,mode=readline \ | -chardev stdio,mux=on,id=char0 \ | -device pci-serial,id=serial0,chardev=char0 \ | -object memory-backend-ram,id=vmem0,size=2G \ | -device virtio-mem-pci,id=vm0,memdev=vmem0,node=0 where "rv64-u-boot.bin" is U-boot with EFI/ACPI-support (use [6] if you're lazy). In the QEMU monitor: | (qemu) info memory-devices | (qemu) qom-set vm0 requested-size 1G ...to test DAX/KMEM, use the follow QEMU parameters: | -object memory-backend-file,id=mem1,share=on,mem-path=virtio_pmem.img,size=4G \ | -device virtio-pmem-pci,memdev=mem1,id=nv1 and the regular ndctl/daxctl dance. If you're brave to try the ACPI branch, add "acpi=on" to "-machine virt", and test PC-DIMM MHP (in addition to virtio-{p},mem): In the QEMU monitor: | (qemu) object_add memory-backend-ram,id=mem1,size=1G | (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 You can also try hot-remove with some QEMU options, say: | -object memory-backend-file,id=mem-1,size=256M,mem-path=/pagesize-2MB | -device pc-dimm,id=mem1,memdev=mem-1 | -object memory-backend-file,id=mem-2,size=1G,mem-path=/pagesize-1GB | -device pc-dimm,id=mem2,memdev=mem-2 | -object memory-backend-file,id=mem-3,size=256M,mem-path=/pagesize-2MB | -device pc-dimm,id=mem3,memdev=mem-3 Remove "acpi=on" to run with DT. Thanks to Alex, Andrew, David, and Oscar for all comments/tests/fixups. References ========== [1] https://lore.kernel.org/qemu-devel/20240521105635.795211-1-bjorn@kernel.org/ [2] https://lore.kernel.org/linux-riscv/20240501121742.1215792-1-sunilvl@ventanamicro.com/ [3] https://lore.kernel.org/linux-riscv/cover.1713778236.git.haibo1.xu@intel.com/ [4] https://github.com/bjoto/qemu/commits/virtio-mem-pc-dimm-mhp-acpi-v2/ [5] https://github.com/bjoto/linux/commits/mhp-v4-acpi [6] https://github.com/bjoto/riscv-rootfs-utils/tree/acpi * b4-shazam-merge: riscv: Enable DAX VMEMMAP optimization riscv: mm: Add support for ZONE_DEVICE virtio-mem: Enable virtio-mem for RISC-V riscv: Enable memory hotplugging for RISC-V riscv: mm: Take memory hotplug read-lock during kernel page table dump riscv: mm: Add memory hotplugging support riscv: mm: Add pfn_to_kaddr() implementation riscv: mm: Refactor create_linear_mapping_range() for memory hot add riscv: mm: Change attribute from __init to __meminit for page functions riscv: mm: Pre-allocate vmemmap/direct map/kasan PGD entries riscv: mm: Properly forward vmemmap_populate() altmap parameter Link: https://lore.kernel.org/r/20240605114100.315918-1-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 4705c1571ad39d9469321d2817faf4c4b78ddffb Author: Björn Töpel Date: Wed Jun 5 13:40:54 2024 +0200 riscv: Enable DAX VMEMMAP optimization Now that DAX is usable, enable the DAX VMEMMAP optimization as well. Signed-off-by: Björn Töpel Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240605114100.315918-12-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 216e04bf1e4d933fe8338e486a9dff93c208601e Author: Björn Töpel Date: Wed Jun 5 13:40:53 2024 +0200 riscv: mm: Add support for ZONE_DEVICE ZONE_DEVICE pages need DEVMAP PTEs support to function (ARCH_HAS_PTE_DEVMAP). Claim another RSW (reserved for software) bit in the PTE for DEVMAP mark, add the corresponding helpers, and enable ARCH_HAS_PTE_DEVMAP for riscv64. Reviewed-by: Alexandre Ghiti Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-11-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 0546d7043e55becec78fa262f2e84c76a96f6e52 Author: Björn Töpel Date: Wed Jun 5 13:40:52 2024 +0200 virtio-mem: Enable virtio-mem for RISC-V Now that RISC-V has memory hotplugging support, virtio-mem can be used on the platform. Acked-by: David Hildenbrand Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-10-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit f8c2a240556eb4fcfcd3ee8e5ececce5be1ae734 Author: Björn Töpel Date: Wed Jun 5 13:40:51 2024 +0200 riscv: Enable memory hotplugging for RISC-V Enable ARCH_ENABLE_MEMORY_HOTPLUG and ARCH_ENABLE_MEMORY_HOTREMOVE for RISC-V. Reviewed-by: Alexandre Ghiti Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-9-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 37992b7f1097ba79ca75ba5a26ddcf0f54f91a08 Author: Björn Töpel Date: Wed Jun 5 13:40:50 2024 +0200 riscv: mm: Take memory hotplug read-lock during kernel page table dump During memory hot remove, the ptdump functionality can end up touching stale data. Avoid any potential crashes (or worse), by holding the memory hotplug read-lock while traversing the page table. This change is analogous to arm64's commit bf2b59f60ee1 ("arm64/mm: Hold memory hotplug lock while walking for kernel page table dump"). Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-8-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit c75a74f4ba19c904c0ae1e011ae2568449409ae4 Author: Björn Töpel Date: Wed Jun 5 13:40:49 2024 +0200 riscv: mm: Add memory hotplugging support For an architecture to support memory hotplugging, a couple of callbacks needs to be implemented: arch_add_memory() This callback is responsible for adding the physical memory into the direct map, and call into the memory hotplugging generic code via __add_pages() that adds the corresponding struct page entries, and updates the vmemmap mapping. arch_remove_memory() This is the inverse of the callback above. vmemmap_free() This function tears down the vmemmap mappings (if CONFIG_SPARSEMEM_VMEMMAP is enabled), and also deallocates the backing vmemmap pages. Note that for persistent memory, an alternative allocator for the backing pages can be used; The vmem_altmap. This means that when the backing pages are cleared, extra care is needed so that the correct deallocation method is used. arch_get_mappable_range() This functions returns the PA range that the direct map can map. Used by the MHP internals for sanity checks. The page table unmap/teardown functions are heavily based on code from the x86 tree. The same remove_pgd_mapping() function is used in both vmemmap_free() and arch_remove_memory(), but in the latter function the backing pages are not removed. Signed-off-by: Björn Töpel Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240605114100.315918-7-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 6e6c5e21b8cbe94b89d2e848afad4e6fe2a7abd8 Author: Björn Töpel Date: Wed Jun 5 13:40:48 2024 +0200 riscv: mm: Add pfn_to_kaddr() implementation The pfn_to_kaddr() function is used by KASAN's memory hotplugging path. Add the missing function to the RISC-V port, so that it can be built with MHP and CONFIG_KASAN. Signed-off-by: Björn Töpel Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240605114100.315918-6-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 007480fe84a9963b6deaa6dceb7039eec03ac007 Author: Björn Töpel Date: Wed Jun 5 13:40:47 2024 +0200 riscv: mm: Refactor create_linear_mapping_range() for memory hot add Add a parameter to the direct map setup function, so it can be used in arch_add_memory() later. Reviewed-by: Alexandre Ghiti Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-5-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit fe122b89da670be155f3474c0cb28af2fbcd2ecc Author: Björn Töpel Date: Wed Jun 5 13:40:46 2024 +0200 riscv: mm: Change attribute from __init to __meminit for page functions Prepare for memory hotplugging support by changing from __init to __meminit for the page table functions that are used by the upcoming architecture specific callbacks. Changing the __init attribute to __meminit, avoids that the functions are removed after init. The __meminit attribute makes sure the functions are kept in the kernel text post init, but only if memory hotplugging is enabled for the build. Reviewed-by: Alexandre Ghiti Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-4-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 66673099f734fd6512055fee353b5c81dafec216 Author: Björn Töpel Date: Wed Jun 5 13:40:45 2024 +0200 riscv: mm: Pre-allocate vmemmap/direct map/kasan PGD entries The RISC-V port copies the PGD table from init_mm/swapper_pg_dir to all userland page tables, which means that if the PGD level table is changed, other page tables has to be updated as well. Instead of having the PGD changes ripple out to all tables, the synchronization can be avoided by pre-allocating the PGD entries/pages at boot, avoiding the synchronization all together. This is currently done for the bpf/modules, and vmalloc PGD regions. Extend this scheme for the PGD regions touched by memory hotplugging. Prepare the RISC-V port for memory hotplug by pre-allocate vmemmap/direct map/kasan entries at the PGD level. This will roughly waste ~128 (plus 32 if KASAN is enabled) worth of 4K pages when memory hotplugging is enabled in the kernel configuration. Reviewed-by: Alexandre Ghiti Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-3-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit e3ecf2fdc8f39a898f9e06481e935b460a097e10 Author: Björn Töpel Date: Wed Jun 5 13:40:44 2024 +0200 riscv: mm: Properly forward vmemmap_populate() altmap parameter Make sure that the altmap parameter is properly passed on to vmemmap_populate_hugepages(). Reviewed-by: Alexandre Ghiti Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20240605114100.315918-2-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 1eeafd64c7b455381b77c546e41bc267e13e2809 Author: Karthikeyan Periyasamy Date: Mon Jun 24 20:24:18 2024 +0530 wifi: ath12k: fix peer metadata parsing Currently, the Rx data path only supports parsing peer metadata of version zero. However, the QCN9274 platform configures the peer metadata version as V1B. When V1B peer metadata is parsed using the version zero logic, invalid data is populated, causing valid packets to be dropped. To address this issue, refactor the peer metadata version and add the version based parsing to populate the data from peer metadata correctly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: 287033810990 ("wifi: ath12k: add support for peer meta data version") Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240624145418.2043461-1-quic_periyasa@quicinc.com commit 2c7857677d695166e913123b23ed7e55d80f72be Author: Lingbo Kong Date: Fri Jun 21 15:58:09 2024 +0530 wifi: ath12k: Fix pdev id sent to firmware for single phy devices Pdev id from mac phy capabilities will be sent as a part of HTT/WMI command to firmware. This causes issue with single pdev devices where firmware does not respond to the WMI/HTT request sent from host. For single pdev devices firmware expects pdev id as 1 for 5 GHz/6 GHz phy and 2 for 2 GHz band. Add wrapper ath12k_mac_get_target_pdev_id() to help fetch right pdev for single pdev devices. 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: Lingbo Kong Signed-off-by: Ramya Gnanasekar Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240621102809.3984004-1-quic_rgnanase@quicinc.com commit e94b45d08b5d1c230c0f59c3eed758d28658851e Author: Christoph Hellwig Date: Wed Jun 26 16:26:29 2024 +0200 block: move dma_pad_mask into queue_limits dma_pad_mask is a queue_limits by all ways of looking at it, so move it there and set it through the atomic queue limits APIs. Add a little helper that takes the alignment and pad into account to simplify the code that is touched a bit. Note that there never was any need for the > check in blk_queue_update_dma_pad, this probably was just copy and paste from dma_update_dma_alignment. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-9-hch@lst.de Signed-off-by: Jens Axboe commit abfc9d810926dfbf5645c7755c8d5ab96273f27d Author: Christoph Hellwig Date: Wed Jun 26 16:26:28 2024 +0200 block: remove the fallback case in queue_dma_alignment Now that all updates go through blk_validate_limits the default of 511 is set at initialization time. Also remove the unused NULL check as calling this helper on a NULL queue can't happen (and doesn't make much sense to start with). Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-8-hch@lst.de Signed-off-by: Jens Axboe commit 73781b3b81e76583708a652c853d54d03dce031d Author: Christoph Hellwig Date: Wed Jun 26 16:26:27 2024 +0200 block: remove disk_update_readahead Mark blk_apply_bdi_limits non-static and open code disk_update_readahead in the only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-7-hch@lst.de Signed-off-by: Jens Axboe commit 3302f6f09052274945f877beeb83f74641de2418 Author: Christoph Hellwig Date: Wed Jun 26 16:26:26 2024 +0200 block: conding style fixup for blk_queue_max_guaranteed_bio "static" never goes on a line of its own. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-6-hch@lst.de Signed-off-by: Jens Axboe commit fcf865e357f80285af12c0c9a49f89d71acb7f4b Author: Christoph Hellwig Date: Wed Jun 26 16:26:25 2024 +0200 block: convert features and flags to __bitwise types ... and let sparse help us catch mismatches or abuses. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-5-hch@lst.de Signed-off-by: Jens Axboe commit ec9b1cf0b0ebfb52274971a8a0e74e0a133f64fb Author: Christoph Hellwig Date: Wed Jun 26 16:26:24 2024 +0200 block: rename BLK_FEAT_MISALIGNED This is a flag for ->flags and not a feature for ->features. And fix the one place that actually incorrectly cleared it from ->features. Signed-off-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-4-hch@lst.de Signed-off-by: Jens Axboe commit 78887d004fb2bb03233122a048eaf46e850dabf4 Author: Christoph Hellwig Date: Wed Jun 26 16:26:23 2024 +0200 block: correctly report cache type Check the features flag and the override flag using the blk_queue_write_cache, helper otherwise we're going to always report "write through". Fixes: 1122c0c1cc71 ("block: move cache control settings out of queue->flags") Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: John Garry Link: https://lore.kernel.org/r/20240626142637.300624-3-hch@lst.de Signed-off-by: Jens Axboe commit 573d5abf3df00c879fbd25774e4cf3e22c9cabd0 Author: Christoph Hellwig Date: Wed Jun 26 16:26:22 2024 +0200 md: set md-specific flags for all queue limits The md driver wants to enforce a number of flags for all devices, even when not inheriting them from the underlying devices. To make sure these flags survive the queue_limits_set calls that md uses to update the queue limits without deriving them form the previous limits add a new md_init_stacking_limits helper that calls blk_set_stacking_limits and sets these flags. Fixes: 1122c0c1cc71 ("block: move cache control settings out of queue->flags") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240626142637.300624-2-hch@lst.de Signed-off-by: Jens Axboe commit fe0812e4bcfa33d640cfd0e2dc99dfeef830fa54 Author: Yonatan Nachum Date: Mon Jun 24 16:09:15 2024 +0000 RDMA/efa: Remove duplicate aenq enable macro We have the same macro in main and verbs files and we don't use the macro in the verbs file, remove it. Link: https://lore.kernel.org/r/20240624160918.27060-3-mrgolin@amazon.com Reviewed-by: Yossi Leybovich Signed-off-by: Yonatan Nachum Signed-off-by: Michael Margolin Reviewed-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 06462d6f3fb3c445b5abac7b134d9fe9e361113f Author: Krzysztof Kozlowski Date: Tue Jun 25 18:57:36 2024 +0200 ASoC: codecs: lpass-macro: Use enum for handling codec version Replace 'int' with proper 'enum lpass_codec_version' in every place which handles the parsed codec version (not raw register values!) to be explicit about contents of the variable. This makes code easier to read and compilers could check missing switch cases. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240625165736.722106-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ebc1a54051b58d1aa3a8855faac8bf16b88b8af7 Author: Krzysztof Kozlowski Date: Tue Jun 25 18:57:35 2024 +0200 ASoC: codecs: lpass-macro: Gracefully handle unknown version Qualcomm LPASS macro codec driver parses registers in order to detect version of the codec. It recognizes codecs v2.0 - v2.8, however we know that there are earlier versions and 'enum lpass_codec_version' has also v1.0, v1.1 and v1.2. If by any chance we run on unrecognized version, driver will use random value from the stack as the codec version. Fix it by mapping such cases to an enum of value 0: LPASS_CODEC_VERSION_UNKNOWN. Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240625165736.722106-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 47f9b4190a1d9db2db670c01af7deb648073e218 Author: Gal Pressman Date: Mon Jun 24 16:09:14 2024 +0000 RDMA/efa: Use offset_in_page() function Use offset_in_page() instead of open-coding it. Link: https://lore.kernel.org/r/20240624160918.27060-2-mrgolin@amazon.com Reviewed-by: Yossi Leybovich Reviewed-by: Firas Jahjah Signed-off-by: Gal Pressman Signed-off-by: Michael Margolin Signed-off-by: Jason Gunthorpe commit aaa53168cbcc486ca1927faac00bd99e81d4ff04 Author: Mikulas Patocka Date: Tue May 28 13:32:34 2024 +0200 dm: optimize flushes Device mapper sends flush bios to all the targets and the targets send it to the underlying device. That may be inefficient, for example if a table contains 10 linear targets pointing to the same physical device, then device mapper would send 10 flush bios to that device - despite the fact that only one bio would be sufficient. This commit optimizes the flush behavior. It introduces a per-target variable flush_bypasses_map - it is set when the target supports flush optimization - currently, the dm-linear and dm-stripe targets support it. When all the targets in a table have flush_bypasses_map, flush_bypasses_map on the table is set. __send_empty_flush tests if the table has flush_bypasses_map - and if it has, no flush bios are sent to the targets via the "map" method and the list dm_table->devices is iterated and the flush bios are sent to each member of the list. Signed-off-by: Mikulas Patocka Reviewed-by: Mike Snitzer Suggested-by: Yang Yang commit 0b209ec85b2b73c38a09ba71dc05fbe4aee7be67 Author: Christophe JAILLET Date: Sun Jun 23 10:04:45 2024 +0200 power: supply: samsung-sdi-battery: Constify struct power_supply_maintenance_charge_table 'struct power_supply_maintenance_charge_table' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, some code also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== $ size drivers/power/supply/samsung-sdi-battery.o text data bss dec hex filename 4055 4584 0 8639 21bf drivers/power/supply/samsung-sdi-battery.o After: ===== $ size drivers/power/supply/samsung-sdi-battery.o text data bss dec hex filename 4087 4552 0 8639 21bf drivers/power/supply/samsung-sdi-battery.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/6caafd0ac2556a40405273b1a4badc508ea8e9b0.1719125040.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit 5d55721d6e24c8e99cc86ee1fcb90d776ef47964 Author: Christophe JAILLET Date: Sun Jun 23 08:45:33 2024 +0200 power: supply: samsung-sdi-battery: Constify struct power_supply_vbat_ri_table 'struct power_supply_vbat_ri_table' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increase overall security. In order to do it, some code also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== $ size drivers/power/supply/samsung-sdi-battery.o text data bss dec hex filename 955 7664 0 8619 21ab drivers/power/supply/samsung-sdi-battery.o After: ===== $ size drivers/power/supply/samsung-sdi-battery.o text data bss dec hex filename 4055 4584 0 8639 21bf drivers/power/supply/samsung-sdi-battery.o Signed-off-by: Christophe JAILLET Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/d01818abd880bf435d1106a9a6cc11a7a8a3e661.1719125040.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit 23558d802a8e950783b956c457c002a612c09c2c Author: Hans Verkuil Date: Wed Jun 26 13:00:49 2024 +0200 media: vivid: fix CREATE_BUFS support in queue_setup() While queue_setup was correct for CREATE_BUFS support for video devices, for VBI, SDR and touch devices it was wrong. This was found after adding new v4l2-compliance tests. Signed-off-by: Hans Verkuil commit 0fd7c0c2c156270dceb8c15fad3120cdce03e539 Author: Hans Verkuil Date: Wed Jun 26 12:59:13 2024 +0200 media: vivid: fix wrong sizeimage value for mplane In several places a division by fmt->vdownsampling[p] was missing in the sizeimage[p] calculation, causing incorrect behavior for multiplanar formats were some planes are smaller than the first plane. Found by new v4l2-compliance tests. Signed-off-by: Hans Verkuil commit cf546dd289e0f6d2594c25e2fb4e19ee67c6d988 Author: Mikulas Patocka Date: Mon May 27 17:40:10 2024 +0200 block: change rq_integrity_vec to respect the iterator If we allocate a bio that is larger than NVMe maximum request size, attach integrity metadata to it and send it to the NVMe subsystem, the integrity metadata will be corrupted. Splitting the bio works correctly. The function bio_split will clone the bio, trim the iterator of the first bio and advance the iterator of the second bio. However, the function rq_integrity_vec has a bug - it returns the first vector of the bio's metadata and completely disregards the metadata iterator that was advanced when the bio was split. Thus, the second bio uses the same metadata as the first bio and this leads to metadata corruption. This commit changes rq_integrity_vec, so that it calls mp_bvec_iter_bvec instead of returning the first vector. mp_bvec_iter_bvec reads the iterator and uses it to build a bvec for the current position in the iterator. The "queue_max_integrity_segments(rq->q) > 1" check was removed, because the updated rq_integrity_vec function works correctly with multiple segments. Signed-off-by: Mikulas Patocka Reviewed-by: Anuj Gupta Reviewed-by: Kanchan Joshi Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/49d1afaa-f934-6ed2-a678-e0d428c63a65@redhat.com Signed-off-by: Jens Axboe commit 304d02aa711369da89b4f8c01702bf1b5d1f7abc Author: Uwe Kleine-König Date: Wed Jun 19 12:11:45 2024 +0200 mfd: stm32-timers: Drop unused TIM_DIER_CC_IE This macro is misleading as TIM_DIER_CC_IE(1) == TIM_DIER_CC2IE . The only user was updated to use TIM_DIER_CCxIE() instead which doesn't suffer from this mismatch, so TIM_DIER_CC_IE can be dropped. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/6c8fcc4ed159992a1dbb0796087e6ceb10c39c96.1718791090.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones commit 9d7809aaea0fb569a9707975d37a170dc0111761 Author: Uwe Kleine-König Date: Wed Jun 19 12:11:44 2024 +0200 counter: stm32-timer-cnt: Use TIM_DIER_CCxIE(x) instead of TIM_DIER_CCxIE(x) These two defines have the same purpose and this change doesn't introduce any differences in drivers/counter/stm32-timer-cnt.o. The only difference between the two is that TIM_DIER_CC_IE(1) == TIM_DIER_CC2IE while TIM_DIER_CCxIE(1) == TIM_DIER_CC1IE . That makes it necessary to have an explicit "+ 1" in the user code, but IMHO this is a good thing as this is the code locatation that "knows" that for software channel 1 you have to use TIM_DIER_CC2IE (because software guys start counting at 0, while the relevant hardware designer started at 1). Signed-off-by: Uwe Kleine-König Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/126bd153a03f39e42645573eecf44ffab5354fc7.1718791090.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones commit 796b942f65967af55684bf520812787b97522151 Author: Uwe Kleine-König Date: Wed Jun 19 12:11:43 2024 +0200 mfd: stm32-timers: Add some register definitions with a parameter There are some registers that belong together and are numbered from 1 to 4. Introduce a macro definition for these that takes the channel number as parameter and define the previously available constants using the new ones. This allows to simplify some users that up to now use constructs like TIM_CCER_CC1NE << (ch * 4) which is an ugly mix of using a predefined value and still knowing internal details about it. Note that there are several decrements by 1 involved. These are necessary because software guys start counting at 0 while the hardware designer started at 1 (and having TIM_CCER_CCxE(1) be TIM_CCER_CC2E isn't a sane option). The compiler is expected to optimize these out nicely. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/05df15f61dde81033407d3b4fcb67ee403ecc8db.1718791090.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones commit a6143bdcaf7e37ecce05df2a3d3c1c5d587f87b1 Author: Uwe Kleine-König Date: Wed Jun 19 12:11:42 2024 +0200 mfd: stm32-timers: Unify alignment of register definition Use tabs consistently for indention and properly align register names, values and comments. This improves readability (at least for my eyes). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/da3b7f9af5794d7463aa62cbaa7251abf1af2018.1718791090.git.u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones commit d6ecd188937fcddeffb37efc61b67a56809b266a Author: Haibo Xu Date: Thu Jun 13 14:55:07 2024 +0800 riscv: dmi: Add SMBIOS/DMI support Enable the dmi driver for riscv which would allow access the SMBIOS info through some userspace file(/sys/firmware/dmi/*). The change was based on that of arm64 and has been verified by dmidecode tool. Signed-off-by: Haibo Xu Reviewed-by: Ard Biesheuvel Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20240613065507.287577-1-haibo1.xu@intel.com Signed-off-by: Palmer Dabbelt commit 50b5bae5be1b5f0a778e1b1a0a4dcda54c76cdce Author: Alexandre Ghiti Date: Sun Jan 28 12:59:53 2024 +0100 riscv: Implement pte_accessible() Like other architectures, a pte is accessible if it is present or if there is a pending tlb flush and the pte is protnone (which could be the case when a pte is downgraded to protnone before a flush tlb is executed). Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240128115953.25085-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 914e618b4372550d58a5f3a378b2255d70a1ec08 Merge: d4b539adc8829 e212d92d1a863 Author: Palmer Dabbelt Date: Wed Jun 26 07:55:02 2024 -0700 Merge patch series "Add support for a few Zc* extensions, Zcmop and Zimop" Clément Léger says: Add support for (yet again) more RVA23U64 missing extensions. Add support for Zimop, Zcmop, Zca, Zcf, Zcd and Zcb extensions ISA string parsing, hwprobe and kvm support. Zce, Zcmt and Zcmp extensions have been left out since they target microcontrollers/embedded CPUs and are not needed by RVA23U64. Since Zc* extensions states that C implies Zca, Zcf (if F and RV32), Zcd (if D), this series modifies the way ISA string is parsed and now does it in two phases. First one parses the string and the second one validates it for the final ISA description. * b4-shazam-merge: KVM: riscv: selftests: Add Zcmop extension to get-reg-list test RISC-V: KVM: Allow Zcmop extension for Guest/VM riscv: hwprobe: export Zcmop ISA extension riscv: add ISA extension parsing for Zcmop dt-bindings: riscv: add Zcmop ISA extension description KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VM riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensions riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb riscv: add ISA extensions validation callback dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description KVM: riscv: selftests: Add Zimop extension to get-reg-list test RISC-V: KVM: Allow Zimop extension for Guest/VM riscv: hwprobe: export Zimop ISA extension riscv: add ISA extension parsing for Zimop dt-bindings: riscv: add Zimop ISA extension description Link: https://lore.kernel.org/r/20240619113529.676940-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit e212d92d1a863d77fc0237b37445ce7548233fe8 Author: Clément Léger Date: Wed Jun 19 13:35:26 2024 +0200 KVM: riscv: selftests: Add Zcmop extension to get-reg-list test The KVM RISC-V allows Zcmop extension for Guest/VM so add this extension to get-reg-list test. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240619113529.676940-17-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 29cf9b803e6e9f1421f090478e624ca4c637c835 Author: Clément Léger Date: Wed Jun 19 13:35:25 2024 +0200 RISC-V: KVM: Allow Zcmop extension for Guest/VM Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zcmop extension for Guest/VM. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240619113529.676940-16-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit fc078ea317cc856c1e82997da7e8fd4d6da7aa29 Author: Clément Léger Date: Wed Jun 19 13:35:24 2024 +0200 riscv: hwprobe: export Zcmop ISA extension Export Zcmop ISA extension through hwprobe. Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20240619113529.676940-15-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 164d644059cf30bb3a8d0ef9f868d52e2445bb76 Author: Clément Léger Date: Wed Jun 19 13:35:23 2024 +0200 riscv: add ISA extension parsing for Zcmop Add parsing for Zcmop ISA extension which was ratified in commit c732a4f39a4c ("Zcmop is ratified/1.0") of the riscv-isa-manual. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240619113529.676940-14-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 700556a73bc704e1c47207322f78a560ff10328e Author: Clément Léger Date: Wed Jun 19 13:35:22 2024 +0200 dt-bindings: riscv: add Zcmop ISA extension description Add description for the Zcmop (Compressed May-Be-Operations) ISA extension which was ratified in commit c732a4f39a4c ("Zcmop is ratified/1.0") of the riscv-isa-manual. Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240619113529.676940-13-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit d27c34a73514805ae4413550b9430b7e8fa06624 Author: Clément Léger Date: Wed Jun 19 13:35:21 2024 +0200 KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test The KVM RISC-V allows Zca, Zcf, Zcd and Zcb extensions for Guest/VM so add these extensions to get-reg-list test. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240619113529.676940-12-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit d964e8f2ae65dcc088345332d479d4fcc5a1d757 Author: Clément Léger Date: Wed Jun 19 13:35:20 2024 +0200 RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VM Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zca, Zcf, Zcd and Zcb extensions for Guest/VM. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240619113529.676940-11-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 0ad70db5eb21e50ed693fa274bea0346de453e29 Author: Clément Léger Date: Wed Jun 19 13:35:19 2024 +0200 riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensions Export Zca, Zcf, Zcd and Zcb ISA extension through hwprobe. Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240619113529.676940-10-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit ba4cd855839daa2e13f251b2e9db28e5b03b5f40 Author: Clément Léger Date: Wed Jun 19 13:35:18 2024 +0200 riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb The Zc* standard extension for code reduction introduces new extensions. This patch adds support for Zca, Zcf, Zcd and Zcb. Zce, Zcmt and Zcmp are left out of this patch since they are targeting microcontrollers/ embedded CPUs instead of application processors. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240619113529.676940-9-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 625034abd52a8c88e829be24c5624eba903a655a Author: Clément Léger Date: Wed Jun 19 13:35:17 2024 +0200 riscv: add ISA extensions validation callback Since a few extensions (Zicbom/Zicboz) already needs validation and future ones will need it as well (Zc*) add a validate() callback to struct riscv_isa_ext_data. This require to rework the way extensions are parsed and split it in two phases. First phase is isa string or isa extension list parsing and consists in enabling all the extensions in a temporary bitmask (source isa) without any validation. The second step "resolves" the final isa bitmap, handling potential missing dependencies. The mechanism is quite simple and simply validate each extension described in the source bitmap before enabling it in the resolved isa bitmap. validate() callbacks can return either 0 for success, -EPROBEDEFER if extension needs to be validated again at next loop. A previous ISA bitmap is kept to avoid looping multiple times if an extension dependencies are never satisfied until we reach a stable state. In order to avoid any potential infinite looping, allow looping a maximum of the number of extension we handle. Zicboz and Zicbom extensions are modified to use this validation mechanism. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240619113529.676940-8-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit e9f9946cad7b038837d58fc8e4abe15dedf39d75 Author: Clément Léger Date: Wed Jun 19 13:35:16 2024 +0200 dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description Add description for Zca, Zcf, Zcd and Zcb extensions which are part the Zc* standard extensions for code size reduction. Additional validation rules are added since Zcb depends on Zca, Zcf, depends on Zca and F, Zcd depends on Zca and D and finally, Zcf can not be present on rv64. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240619113529.676940-7-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit ca5446406914885d20ad7894bbfecc7e4598238b Author: Clément Léger Date: Wed Jun 19 13:35:15 2024 +0200 KVM: riscv: selftests: Add Zimop extension to get-reg-list test The KVM RISC-V allows Zimop extension for Guest/VM so add this extension to get-reg-list test. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240619113529.676940-6-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit fb2a3d63efefe6bd3718201daba479f4339bb4bf Author: Clément Léger Date: Wed Jun 19 13:35:14 2024 +0200 RISC-V: KVM: Allow Zimop extension for Guest/VM Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zimop extension for Guest/VM. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel Link: https://lore.kernel.org/r/20240619113529.676940-5-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 36f8960de887a5e2811c5d1c0517cfa6f419c1c4 Author: Clément Léger Date: Wed Jun 19 13:35:13 2024 +0200 riscv: hwprobe: export Zimop ISA extension Export Zimop ISA extension through hwprobe. Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240619113529.676940-4-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2467c2104f1fd4be1f0c415054b1d91f75fbe562 Author: Clément Léger Date: Wed Jun 19 13:35:12 2024 +0200 riscv: add ISA extension parsing for Zimop Add parsing for Zimop ISA extension which was ratified in commit 58220614a5f of the riscv-isa-manual. Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240619113529.676940-3-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit a57b68bc315ce941406c001a3630f7e26d753f13 Author: Clément Léger Date: Wed Jun 19 13:35:11 2024 +0200 dt-bindings: riscv: add Zimop ISA extension description Add description for the Zimop (May-Be-Operations) ISA extension which was ratified in commit 58220614a5f of the riscv-isa-manual. Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240619113529.676940-2-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2e2de714d65d9c2739c774f4759e530b9c311c0b Merge: a6a6a98094116 36437f469d7e9 Author: Jakub Kicinski Date: Wed Jun 26 07:43:59 2024 -0700 Merge branch 'mlxsw-reduce-memory-footprint-of-mlxsw-driver' Petr Machata says: ==================== mlxsw: Reduce memory footprint of mlxsw driver Amit Cohen writes: A previous patch-set used page pool to allocate buffers, to simplify the change, we first used one continuous buffer, which was allocated with order > 0. This set improves page pool usage to allocate the exact number of pages which are required for packet. This change requires using fragmented SKB, till now all the buffer was in the linear part. Note that 'skb->truesize' is decreased for small packets. This set significantly reduces memory consumption of mlxsw driver. The footprint is reduced by 26%. Patch set overview: Patch #1 calculates number of scatter/gather entries and stores the value Patch #2 converts the driver to use fragmented buffers ==================== Link: https://patch.msgid.link/cover.1719321422.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 36437f469d7e92635c8e07b63bd490f0c14c3cba Author: Amit Cohen Date: Tue Jun 25 15:47:35 2024 +0200 mlxsw: pci: Use fragmented buffers WQE (Work Queue Element) includes 3 scatter/gather entries for buffers. The buffer can be split into 3 parts, software should set address and byte count of each part. A previous patch-set used page pool to allocate buffers, to simplify the change, we first used one continuous buffer, which was allocated with order > 0. This patch improves page pool usage to allocate the exact number of pages which are required for packet. As part of init, fill WQE.address[x] and WQE.byte_count* with pages which are allocated from the pool. Fill x entries according to number of scatter/gather entries which are required for maximum packet size. When a packet is received, check the actual size and replace only the used pages. Save bytes for software overhead only as part of the first entry. This change also requires using fragmented SKB, till now all the buffer was in the linear part. Note that 'skb->truesize' is decreased for small packets. For now the maximum buffer size is 3 * PAGE_SIZE which is enough, in case that the driver will support larger MTU, we can use 'order' to allocate more than one page per scatter/gather entry. This change significantly reduces memory consumption of mlxsw driver. The footprint is reduced by 26%. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://patch.msgid.link/ee38898c692e7f644a7f3ea4d33aeddb4dd917d2.1719321422.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 8f8cea8f3ddbd8f64d4f08c2d8525989c4fb44d4 Author: Amit Cohen Date: Tue Jun 25 15:47:34 2024 +0200 mlxsw: pci: Store number of scatter/gather entries for maximum packet size A previous patch-set used page pool for Rx buffers allocations. To simplify the change, we first used page pool for one allocation per packet - one continuous buffer is allocated for each packet. This can be improved by using fragmented buffers, then memory consumption will be significantly reduced. WQE (Work Queue Element) includes up to 3 scatter/gather entries for data. As preparation for fragmented buffer usage, calculate number of scatter/gather entries which are required for packet according to maximum MTU and store it for future use. For now use PAGE_SIZE for each entry, which means that maximum buffer size is 3 * PAGE_SIZE. This is enough for the maximum MTU which is supported in the driver now (10K). Warn in an unlikely case of maximum MTU which requires more than 3 pages, for now this warn should not happen with standard page size (>=4K) and maximum MTU (10K). Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://patch.msgid.link/98c3e3adb7e727e571ac538faf67cef262cec4fc.1719321422.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 7603ac5a8a1cce6513fa5956b089843b1965689c Author: Laurent Pinchart Date: Thu Apr 25 02:57:41 2024 +0300 media: vimc: scaler: Use subdev active state Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allows using the v4l2_subdev_get_fmt() helper to implement the .get_fmt() operation. The active configuration that is used in the .process_frame() handler is still stored in the vimc_scaler_device structure. The driver could instead access the active state in the .process_frame() handler, but the required locking could interfere with the real time constraints of the frame processing. This data would be stored in registers in the .s_stream() handler for real hardware, storing it in dedicated storage thus mimics a real driver. To differentiate them from the rest of the device private data, move the corresponding fields to a sub-structure of vimc_scaler_device named hw. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit 4c46cb2a7f1d63fa7b027af05e0393e4fe9ccb52 Author: Laurent Pinchart Date: Thu Apr 25 02:57:40 2024 +0300 media: vimc: debayer: Use subdev active state Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allows using the v4l2_subdev_get_fmt() helper to implement the .get_fmt() operation. The active configuration that is used in the .process_frame() handler is still stored in the vimc_debayer_device structure. The driver could instead access the active state in the .process_frame() handler, but the required locking could interfere with the real time constraints of the frame processing. This data would be stored in registers in the .s_stream() handler for real hardware, storing it in dedicated storage thus mimics a real driver. To differentiate them from the rest of the device private data, move the corresponding fields to a sub-structure of vimc_debayer_device named hw. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit cf2552d87ac0e50f98c1e18d233a74ca58af819f Author: Laurent Pinchart Date: Thu Apr 25 02:57:39 2024 +0300 media: vimc: sensor: Use subdev active state Store the active formats and crop rectangle in the subdevice active state. This simplifies implementation of the format and selection accessors, and allows using the v4l2_subdev_get_fmt() helper to implement the .get_fmt() operation. The active configuration that is used in the .process_frame() handler is still stored in the vimc_sensor_device structure. The driver could instead access the active state in the .process_frame() handler, but the required locking could interfere with the real time constraints of the frame processing. This data would be stored in registers in the .s_stream() handler for real hardware, storing it in dedicated storage thus mimics a real driver. To differentiate them from the rest of the device private data, move the corresponding fields to a sub-structure of vimc_sensor_device named hw. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit b3f73b21887ecda4c03a61085c7290ce585016d0 Author: Laurent Pinchart Date: Thu Apr 25 02:57:38 2024 +0300 media: vimc: Initialize subdev active state Finalize subdev initialization for all subdevs that provide a .init_state() operation. This creates an active state for all those subdevs, which subsequent patches will use to simplify the implementation of individual vimc entities. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit 556d821ade98edd76c59368a3301fbb30014b851 Author: Laurent Pinchart Date: Thu Apr 25 02:57:37 2024 +0300 media: vimc: Centralize subdev internal_ops initialization Initialize the subdev internal_ops field in the vimc_ent_sd_register() function. This handles the internal ops the same way as the subdev ops, and prepares for moving to the V4L2 subdev active state API. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit 0b3b27bb69e4b5a043830176932c9b7f8fa09cf3 Author: Laurent Pinchart Date: Thu Apr 25 02:57:36 2024 +0300 media: vimc: scaler: Rename vic_sca_pad enum to vimc_scaler_pad The vic_sca_pad enum's name has been shortened to the extreme for no good reason. Rename it to vimc_scaler_pad. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit 27d8f61ee977e15bc1b6c36fca1abe5d08919782 Author: Laurent Pinchart Date: Thu Apr 25 02:57:35 2024 +0300 media: vimc: Constify the ent_config array The ent_config array contains data that is never modified. Make it const. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit 73a4385c6947df393ffb4bcdf84eef1294057d0c Author: Laurent Pinchart Date: Thu Apr 25 02:57:34 2024 +0300 media: vimc: Constify vimc_ent_type structures The vimc_ent_type structure contains static pointers to functions, and no other information that need to be modified after initialization. Make them const to avoid the risk of arbitrary code execution following an overflow that would overwrite the structure's contents. Signed-off-by: Laurent Pinchart Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit 2ef9a1e722688ccea824e5f224b91ab4b6fb1a47 Author: Laurent Pinchart Date: Thu Apr 25 02:57:33 2024 +0300 media: vimc: Don't iterate over single pad The .init_state() operations of the debayer and sensor entities iterate over the entity's pads. In practice, the iteration covers a single pad only. Access the pad directly and remove the loops. Signed-off-by: Laurent Pinchart Reviewed-by: Sakari Ailus Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil commit d4b539adc882978493fceeb7a529819332f3a595 Merge: c74f037dfd452 47742484ee162 Author: Palmer Dabbelt Date: Wed Jun 26 07:36:35 2024 -0700 Merge patch series "riscv: Various text patching improvements" Samuel Holland says: Here are a few changes to minimize calls to stop_machine() and flush_icache_*() in the various text patching functions, as well as to simplify the code. * b4-shazam-merge: riscv: Remove extra variable in patch_text_nosync() riscv: Use offset_in_page() in text patching functions riscv: Pass patch_text() the length in bytes riscv: Simplify text patching loops riscv: kprobes: Use patch_text_nosync() for insn slots riscv: jump_label: Simplify assembly syntax riscv: jump_label: Batch icache maintenance Link: https://lore.kernel.org/r/20240327160520.791322-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 47742484ee162394d6695e1c9b6894f5b6c226d4 Author: Samuel Holland Date: Wed Mar 27 09:04:46 2024 -0700 riscv: Remove extra variable in patch_text_nosync() This cast is superfluous, and is incorrect anyway if compressed instructions may be present. Reviewed-by: Björn Töpel Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240327160520.791322-8-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit eaee5487563089bff6ea6dbec38446826dc054cd Author: Samuel Holland Date: Wed Mar 27 09:04:45 2024 -0700 riscv: Use offset_in_page() in text patching functions This is a bit easier to parse than the equivalent bit manipulation. Reviewed-by: Björn Töpel Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240327160520.791322-7-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 51781ce8f4486c3738a6c85175b599ad1be71f89 Author: Samuel Holland Date: Wed Mar 27 09:04:44 2024 -0700 riscv: Pass patch_text() the length in bytes patch_text_nosync() already handles an arbitrary length of code, so this removes a superfluous loop and reduces the number of icache flushes. Reviewed-by: Björn Töpel Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240327160520.791322-6-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 5080ca0fe9b505282862bbeefbd0f875bade9353 Author: Samuel Holland Date: Wed Mar 27 09:04:43 2024 -0700 riscv: Simplify text patching loops This reduces the number of variables and makes the code easier to parse. Signed-off-by: Samuel Holland Reviewed-by: Björn Töpel Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240327160520.791322-5-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit b1756750a397f36ddc857989d31887c3f5081fb0 Author: Samuel Holland Date: Wed Mar 27 09:04:42 2024 -0700 riscv: kprobes: Use patch_text_nosync() for insn slots These instructions are not yet visible to the rest of the system, so there is no need to do the whole stop_machine() dance. Reviewed-by: Björn Töpel Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20240327160520.791322-4-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 2aa30d19cfbb3c2172f3c4f50abae447c4937772 Author: Samuel Holland Date: Wed Mar 27 09:04:41 2024 -0700 riscv: jump_label: Simplify assembly syntax The idiomatic way to write "jal zero" is "j". Reviewed-by: Björn Töpel Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20240327160520.791322-3-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 652b56b18439b7753eb0dcd5a2a4b6cc5b18cf67 Author: Samuel Holland Date: Wed Mar 27 09:04:40 2024 -0700 riscv: jump_label: Batch icache maintenance Switch to the batched version of the jump label update functions so instruction cache maintenance is deferred until the end of the update. Reviewed-by: Björn Töpel Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20240327160520.791322-2-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit a6a6a98094116b60e5523a571d9443c53325f5b1 Author: Uwe Kleine-König Date: Tue Jun 25 10:38:53 2024 +0200 net: 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. Signed-off-by: Uwe Kleine-König Reviewed-by: Petr Machata # For mlxsw Reviewed-by: Kory Maincent Reviewed-by: Jeremy Kerr # for mctp-i2c Reviewed-by: Oleksij Rempel Acked-by: Oleksij Rempel Link: https://patch.msgid.link/20240625083853.2205977-2-u.kleine-koenig@baylibre.com Signed-off-by: Jakub Kicinski commit 210b1f6576e8b367907e7ff51ef425062e1468e4 Author: Keith Busch Date: Mon Jun 24 08:56:17 2024 -0700 nvme-pci: do not directly handle subsys reset fallout Scheduling reset_work after a nvme subsystem reset is expected to fail on pcie, but this also prevents potential handling the platform's pcie services may provide that might successfully recovering the link without re-enumeration. Such examples include AER, DPC, and power's EEH. Provide a pci specific operation that safely initiates a subsystem reset, and instead of scheduling reset work, read back the status register to trigger a pcie read error. Since this only affects pci, the other fabrics drivers subscribe to a generic nvmf subsystem reset that is exactly the same as before. The loop fabric doesn't use it because nvmet doesn't support setting that property anyway. And since we're using the magic NSSR value in two places now, provide a symbolic define for it. Reported-by: Nilay Shroff Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 5a905e33b266f504e0b290055125e5002635e2e6 Author: Christophe JAILLET Date: Mon Jun 24 22:13:27 2024 +0200 RDMA/hfi1: Constify struct mmu_rb_ops 'struct mmu_rb_ops' is not modified in this driver. 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 10879 164 0 11043 2b23 drivers/infiniband/hw/hfi1/pin_system.o After: ===== text data bss dec hex filename 10907 140 0 11047 2b27 drivers/infiniband/hw/hfi1/pin_system.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b826dd05eefa5f4d6a7a1b4d191eaf37c714ed04.1719259997.git.christophe.jaillet@wanadoo.fr Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4adcaf969d77d3d3aa3871bbadc196258a38aec6 Author: Honggang LI Date: Mon Jun 24 10:03:48 2024 +0800 RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs BTH_ACK_MASK bit is used to indicate that an acknowledge (for this packet) should be scheduled by the responder. Both UC and UD QPs are unacknowledged, so don't set BTH_ACK_MASK for UC or UD QPs. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Honggang LI Link: https://lore.kernel.org/r/20240624020348.494338-1-honggangli@163.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 58945ddd7156b4d83206b7b21567e67fca16346a Author: Max Gurtovoy Date: Wed Jun 19 20:11:53 2024 +0300 IB/isert: remove the handling of last WQE reached event This event is raised for QPs that are associated with a Shared RQ (SRQ). The iSER target does not support SRQ. Remove this dead code. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20240619171153.34631-3-mgurtovoy@nvidia.com Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 844bc12e6da3e2d8ab0cd96d049fc695d5d8ba68 Author: Max Gurtovoy Date: Wed Jun 19 20:11:52 2024 +0300 IB/core: add support for draining Shared receive queues To avoid leakage for QPs assocoated with SRQ, according to IB spec (section 10.3.1): "Note, for QPs that are associated with an SRQ, the Consumer should take the QP through the Error State before invoking a Destroy QP or a Modify QP to the Reset State. The Consumer may invoke the Destroy QP without first performing a Modify QP to the Error State and waiting for the Affiliated Asynchronous Last WQE Reached Event. However, if the Consumer does not wait for the Affiliated Asynchronous Last WQE Reached Event, then WQE and Data Segment leakage may occur. Therefore, it is good programming practice to teardown a QP that is associated with an SRQ by using the following process: - Put the QP in the Error State; - wait for the Affiliated Asynchronous Last WQE Reached Event; - either: - drain the CQ by invoking the Poll CQ verb and either wait for CQ to be empty or the number of Poll CQ operations has exceeded CQ capacity size; or - post another WR that completes on the same CQ and wait for this WR to return as a WC; - and then invoke a Destroy QP or Reset QP." Catch the Last WQE Reached Event in the core layer during drain QP flow. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20240619171153.34631-2-mgurtovoy@nvidia.com Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0c5275bf75ec3708d95654195ae4ed80d946d088 Author: Or Har-Toov Date: Sun Jun 16 19:10:36 2024 +0300 RDMA/mlx5: Use sq timestamp as QP timestamp when RoCE is disabled When creating a QP, one of the attributes is TS format (timestamp). In some devices, we have a limitation that all QPs should have the same ts_format. The ts_format is chosen based on the device's capability. The qp_ts_format cap resides under the RoCE caps table, and the cap will be 0 when RoCE is disabled. So when RoCE is disabled, the value that should be queried is sq_ts_format under HCA caps. Consider the case when the system supports REAL_TIME_TS format (0x2), some QPs are created with REAL_TIME_TS as ts_format, and afterwards RoCE gets disabled. When trying to construct a new QP, we can't use the qp_ts_format, that is queried from the RoCE caps table, Since it leads to passing 0x0 (FREE_RUNNING_TS) as the value of the qp_ts_format, which is different than the ts_format of the previously allocated QPs REAL_TIME_TS format (0x2). Thus, to resolve this, read the sq_ts_format, which also reflect the supported ts format for the QP when RoCE is disabled. Fixes: 4806f1e2fee8 ("net/mlx5: Set QP timestamp mode to default") Signed-off-by: Maher Sanalla Signed-off-by: Or Har-Toov Link: https://lore.kernel.org/r/32801966eb767c7fd62b8dea3b63991d5fbfe213.1718554199.git.leon@kernel.org Reviewed-by: Simon Horman Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5953e0647cec703ef436ead37fed48943507b433 Author: Leon Romanovsky Date: Sun Jun 16 19:17:30 2024 +0300 RDMA/mlx4: Fix truncated output warning in alias_GUID.c drivers/infiniband/hw/mlx4/alias_GUID.c: In function ‘mlx4_ib_init_alias_guid_service’: drivers/infiniband/hw/mlx4/alias_GUID.c:878:74: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 5 [-Werror=format-truncation=] 878 | snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i); | ^~ drivers/infiniband/hw/mlx4/alias_GUID.c:878:63: note: directive argument in the range [-2147483641, 2147483646] 878 | snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i); | ^~~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/alias_GUID.c:878:17: note: ‘snprintf’ output between 12 and 22 bytes into a destination of size 15 878 | snprintf(alias_wq_name, sizeof alias_wq_name, "alias_guid%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: a0c64a17aba8 ("mlx4: Add alias_guid mechanism") Link: https://lore.kernel.org/r/1951c9500109ca7e36dcd523f8a5f2d0d2a608d1.1718554641.git.leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0d2e6992fc956e3308cd5376c18567def4cb3967 Author: Leon Romanovsky Date: Sun Jun 16 19:16:33 2024 +0300 RDMA/mlx4: Fix truncated output warning in mad.c Increase size of the name array to avoid truncated output warning. drivers/infiniband/hw/mlx4/mad.c: In function ‘mlx4_ib_alloc_demux_ctx’: drivers/infiniband/hw/mlx4/mad.c:2197:47: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 4 [-Werror=format-truncation=] 2197 | snprintf(name, sizeof(name), "mlx4_ibt%d", port); | ^~ drivers/infiniband/hw/mlx4/mad.c:2197:38: note: directive argument in the range [-2147483645, 2147483647] 2197 | snprintf(name, sizeof(name), "mlx4_ibt%d", port); | ^~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mad.c:2197:9: note: ‘snprintf’ output between 10 and 20 bytes into a destination of size 12 2197 | snprintf(name, sizeof(name), "mlx4_ibt%d", port); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mad.c:2205:48: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 3 [-Werror=format-truncation=] 2205 | snprintf(name, sizeof(name), "mlx4_ibwi%d", port); | ^~ drivers/infiniband/hw/mlx4/mad.c:2205:38: note: directive argument in the range [-2147483645, 2147483647] 2205 | snprintf(name, sizeof(name), "mlx4_ibwi%d", port); | ^~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mad.c:2205:9: note: ‘snprintf’ output between 11 and 21 bytes into a destination of size 12 2205 | snprintf(name, sizeof(name), "mlx4_ibwi%d", port); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mad.c:2213:48: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 3 [-Werror=format-truncation=] 2213 | snprintf(name, sizeof(name), "mlx4_ibud%d", port); | ^~ drivers/infiniband/hw/mlx4/mad.c:2213:38: note: directive argument in the range [-2147483645, 2147483647] 2213 | snprintf(name, sizeof(name), "mlx4_ibud%d", port); | ^~~~~~~~~~~~~ drivers/infiniband/hw/mlx4/mad.c:2213:9: note: ‘snprintf’ output between 11 and 21 bytes into a destination of size 12 2213 | snprintf(name, sizeof(name), "mlx4_ibud%d", port); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[6]: *** [scripts/Makefile.build:244: drivers/infiniband/hw/mlx4/mad.o] Error 1 Fixes: fc06573dfaf8 ("IB/mlx4: Initialize SR-IOV IB support for slaves in master context") Link: https://lore.kernel.org/r/f3798b3ce9a410257d7e1ec7c9e285f1352e256a.1718554569.git.leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit db9cc848128eb174b24a5dff82fc3e7589a3bf25 Author: Dmitry Baryshkov Date: Fri Jun 21 01:23:51 2024 +0300 power: supply: lenovo_yoga_c630_battery: add Lenovo C630 driver On the Lenovo Yoga C630 WOS laptop the EC provides access to the adapter and battery status. Add the driver to read power supply status on the laptop. Reviewed-by: Ilpo Järvinen Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240621-yoga-ec-driver-v8-1-daae67d0233d@linaro.org Signed-off-by: Sebastian Reichel commit 427eb7854e13a56b3cdc7d8bfb38c3d4eb865a02 Merge: f8b6c1eb76f73 13bbe1c83bc40 Author: Sebastian Reichel Date: Wed Jun 26 15:35:49 2024 +0200 Merge tag 'platform-drivers-x86-ib-lenovo-c630-v6.11-2' Immutable branch between pdx86 lenovo c630 branch, power/supply and USB subsystems due for the v6.11 merge window, which is required for the Lenovo C630 battery driver. Signed-off-by: Sebastian Reichel commit 704d3d60fec451f37706368d9d3e320322978986 Author: Lucas Stach Date: Fri Jun 21 21:59:19 2024 +0200 drm/etnaviv: don't block scheduler when GPU is still active Since 45ecaea73883 ("drm/sched: Partial revert of 'drm/sched: Keep s_fence->parent pointer'") still active jobs aren't put back in the pending list on drm_sched_start(), as they don't have a active parent fence anymore, so if the GPU is still working and the timeout is extended, all currently active jobs will be freed. To avoid prematurely freeing jobs that are still active on the GPU, don't block the scheduler until we are fully committed to actually reset the GPU. As the current job is already removed from the pending list and will not be put back when drm_sched_start() isn't called, we must make sure to put the job back on the pending list when extending the timeout. Cc: stable@vger.kernel.org #6.0 Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-by: Christian Gmeiner commit beb311ff0f2e1fcd0f033fcd1be45de083efc421 Author: Lucas Stach Date: Fri Jun 21 22:00:20 2024 +0200 drm/etnaviv: reduce number of ktime_get calls in IRQ handler A single IRQ might signal the completion of multiple jobs/fences at once. There is no point in attaching a new timestamp to each fence that only differs in when exactly the IRQ handler was able to process this fence. Get a single timestamp when the IRQ handler has determined that there are completed jobs and reuse this for all fences that get signalled by the handler. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-by: Christian Gmeiner commit 328ab5688f9865d06aa74599f34f5bc51905f9b9 Author: Dave Stevenson Date: Fri Jun 21 14:19:26 2024 +0100 MAINTAINERS: drm: vc4: Drop Emma's tree Emma stepped back from VC4 maintenance a while ago, and all patches are now merged through drm-misc. Drop Emma's tree from MAINTAINERS. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240621131926.3133484-2-dave.stevenson@raspberrypi.com commit 3cc9ec4ff76b39e928b0f42a4853594dbde167e9 Author: Dave Stevenson Date: Fri Jun 21 14:19:25 2024 +0100 MAINTAINERS: drm: vc4: Add Raspberry Pi as maintainers Add myself as maintainer for VC4 alongside Maxime, and our internal review list as reviewer. Signed-off-by: Dave Stevenson Acked-by: Daniel Stone Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240621131926.3133484-1-dave.stevenson@raspberrypi.com commit 7bd09a2db0f617377027a2bb0b9179e6959edff3 Author: Chen Ni Date: Fri Jun 21 15:10:31 2024 +0800 drm/qxl: Add check for drm_cvt_mode Add check for the return value of drm_cvt_mode() and return the error if it fails in order to avoid NULL pointer dereference. Fixes: 1b043677d4be ("drm/qxl: add qxl_add_mode helper function") Signed-off-by: Chen Ni Reviewed-by: Heng Qi Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240621071031.1987974-1-nichen@iscas.ac.cn commit 58979ad6330a70450ed78837be3095107d022ea9 Author: Lucas Stach Date: Fri Jun 21 19:11:06 2024 +0200 drm/etnaviv: fix DMA direction handling for cached RW buffers The dma sync operation needs to be done with DMA_BIDIRECTIONAL when the BO is prepared for both read and write operations. Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-by: Christian Gmeiner commit a3ecd97aa6aa444cc6c1b4c5b45d8d25068f19f6 Author: Lucas Stach Date: Fri Jun 21 19:13:07 2024 +0200 drm/etnaviv: switch devcoredump allocations to GFP_NOWAIT The etnaviv devcoredump is created in the GPU reset path, which must make forward progress to avoid stalling memory reclaim on unsignalled dma fences. The currently used __GFP_NORETRY does not prohibit sleeping on direct reclaim, breaking the forward progress guarantee. Switch to GFP_NOWAIT, which allows background reclaim to be triggered, but avoids any stalls waiting for direct reclaim. Signed-off-by: Lucas Stach Reviewed-by: Daniel Vetter commit b6ee5ac18403f908ad858704f828c6132808df21 Merge: 113ac3e239273 a047b66c0f05c Author: Hans Verkuil Date: Wed Jun 26 15:29:04 2024 +0200 Merge tag 'tags/next-media-20240626' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git - fix typo in v4l2-subdev.h - imx-pxp bug fix - media i2c Kconfig: add missing FW_UPLOAD select Signed-off-by: Hans Verkuil commit f8b6c1eb76f73ed721facd58d0cfb08513aad34c Author: Christophe JAILLET Date: Sun Jun 23 07:50:32 2024 +0200 power: supply: ingenic: Fix some error handling paths in ingenic_battery_get_property() If iio_read_channel_processed() fails, 'val->intval' is not updated, but it is still *1000 just after. So, in case of error, the *1000 accumulate and 'val->intval' becomes erroneous. So instead of rescaling the value after the fact, use the dedicated scaling API. This way the result is updated only when needed. In case of error, the previous value is kept, unmodified. This should also reduce any inaccuracies resulting from the scaling. Finally, this is also slightly more efficient as it saves a function call and a multiplication. Fixes: fb24ccfbe1e0 ("power: supply: add Ingenic JZ47xx battery driver.") Signed-off-by: Christophe JAILLET Acked-by: Artur Rojek Link: https://lore.kernel.org/r/51e49c18574003db1e20c9299061a5ecd1661a3c.1719121781.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit e325618349cdc1fbbe63574080249730e7cff9ea Author: Yu-Wei Hsu Date: Mon Apr 29 09:21:13 2024 +0000 RISC-V: KVM: Redirect AMO load/store access fault traps to guest The KVM RISC-V does not delegate AMO load/store access fault traps to VS-mode (hedeleg) so typically M-mode takes these traps and redirects them back to HS-mode. However, upon returning from M-mode, the KVM RISC-V running in HS-mode terminates VS-mode software. The KVM RISC-V should redirect AMO load/store access fault traps back to VS-mode and let the VS-mode trap handler determine the next steps. Signed-off-by: Yu-Wei Hsu Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20240429092113.70695-1-betterman5240@gmail.com Signed-off-by: Anup Patel commit da7b1b525e972b8c5b16640fa5b2ff2497b5c652 Author: Shenlin Liang Date: Mon Apr 22 08:08:33 2024 +0000 perf kvm/riscv: Port perf kvm stat to RISC-V 'perf kvm stat report/record' generates a statistical analysis of KVM events and can be used to analyze guest exit reasons. "report" reports statistical analysis of guest exit events. To record kvm events on the host: # perf kvm stat record -a To report kvm VM EXIT events: # perf kvm stat report --event=vmexit Signed-off-by: Shenlin Liang Reviewed-by: Atish Patra Tested-by: Atish Patra Link: https://lore.kernel.org/r/20240422080833.8745-3-liangshenlin@eswincomputing.com Signed-off-by: Anup Patel commit 91195a90f1d1ae72a1a49681ee30118c9f7ab8c3 Author: Shenlin Liang Date: Mon Apr 22 08:08:32 2024 +0000 RISCV: KVM: add tracepoints for entry and exit events Like other architectures, RISCV KVM also needs to add these event tracepoints to count the number of times kvm guest entry/exit. Signed-off-by: Shenlin Liang Reviewed-by: Anup Patel Tested-by: Atish Patra Link: https://lore.kernel.org/r/20240422080833.8745-2-liangshenlin@eswincomputing.com Signed-off-by: Anup Patel commit 3385339296d14fa16440aac87ee5b02dd4a47d08 Author: Anup Patel Date: Thu Apr 11 14:36:39 2024 +0530 RISC-V: KVM: Use IMSIC guest files when available Let us discover and use IMSIC guest files from the IMSIC global config provided by the IMSIC irqchip driver. Signed-off-by: Anup Patel Link: https://lore.kernel.org/r/20240411090639.237119-3-apatel@ventanamicro.com Signed-off-by: Anup Patel commit e5b088c1dc4de18aad500253c3dd26287f2bd9a0 Author: Anup Patel Date: Thu Apr 11 14:36:38 2024 +0530 RISC-V: KVM: Share APLIC and IMSIC defines with irqchip drivers We have common APLIC and IMSIC headers available under include/linux/irqchip/ directory which are used by APLIC and IMSIC irqchip drivers. Let us replace the use of kvm_aia_*.h headers with include/linux/irqchip/riscv-*.h headers. Signed-off-by: Anup Patel Link: https://lore.kernel.org/r/20240411090639.237119-2-apatel@ventanamicro.com Signed-off-by: Anup Patel commit f62b267adcac33c64a26ec55973dad92bc8a8358 Author: Christophe JAILLET Date: Sat Jun 22 09:04:26 2024 +0200 power: supply: ab8500: Clean some error messages There is an useless extra comma at the end of some error messages, remove them. Signed-off-by: Christophe JAILLET Reviewed-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/e7ac0fa83c6100cbe4e0efa90cf99291c2423b10.1719037737.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit dc6ce568afd3452ac682261ea0db570d28f7d82d Author: Christophe JAILLET Date: Sat Jun 22 09:04:25 2024 +0200 power: supply: ab8500: Use iio_read_channel_processed_scale() Instead of rescaling current or voltage channels after the fact, use the dedicated scaling API. This should reduce any inaccuracies resulting from the scaling. This is also slightly more efficient as it saves a function call and a multiplication. Signed-off-by: Christophe JAILLET Reviewed-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/5668d73b92eb6318c7f094a9a8fa914c909485ca.1719037737.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit 3288757087cbb93b91019ba6b7de53a1908c9d48 Author: Christophe JAILLET Date: Sat Jun 22 09:04:24 2024 +0200 power: supply: ab8500: Fix error handling when calling iio_read_channel_processed() The ab8500_charger_get_[ac|vbus]_[current|voltage]() functions should return an error code on error. Up to now, an un-initialized value is returned. This makes the error handling of the callers un-reliable. Return the error code instead, to fix the issue. Fixes: 97ab78bac5d0 ("power: supply: ab8500_charger: Convert to IIO ADC") Signed-off-by: Christophe JAILLET Reviewed-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/f9f65642331c9e40aaebb888589db043db80b7eb.1719037737.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit 113ac3e2392735bff728efe67969790c845573b0 Merge: bf9817d2ed3a4 1b9fd2f0b5133 Author: Hans Verkuil Date: Wed Jun 26 14:49:57 2024 +0200 Merge tag 'tags/next-media-renesas-20240619' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git - Conversion of max9286 and adv748x to V4L2 subdev active state - Cleanups and fixes for the Renesas R-Car VSP and VIN drivers - Miscellaneous cleanups to V4L2 core Signed-off-by: Hans Verkuil commit e7df7a200eaa636122be27d4a09ccbe83711a05a Author: Jason-JH.Lin Date: Mon Jun 24 17:57:26 2024 +0800 drm/mediatek: Fix bit depth overwritten for mtk_ovl_set bit_depth() Refine the value and mask define of bit depth for mtk_ovl_set bit_depth(). Use cmdq_pkt_write_mask() instead of cmdq_pkt_write() to avoid bit depth settings being overwritten. Fixes: fb36c5020c9c ("drm/mediatek: Add support for AR30 and BA30 overlays") Signed-off-by: Jason-JH.Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/20240624095726.18818-1-jason-jh.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 2f3e176fee66ac86ae387787bf06457b101d9f7a Author: Konstantin Komarov Date: Mon Jun 17 15:13:09 2024 +0300 fs/ntfs3: Fix field-spanning write in INDEX_HDR Fields flags and res[3] replaced with one 4 byte flags. Fixes: 4534a70b7056 ("fs/ntfs3: Add headers and misc files") Signed-off-by: Konstantin Komarov commit c091354d6bf60ec606d4c0772459ea2f3bbee271 Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:59 2024 +0100 ntfs3: Convert attr_wof_frame_info() to use a folio This involves converting all users of offs_page to offs_folio, but it's worth it because we get rid of a lot of hidden calls to compound_head(). We continue to use order-0 folios here, and convert back to a struct page to call ntfs_bio_pages(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit 4d89b6716b00bf52e2c4f98d5d7788d300469a5f Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:32:01 2024 +0100 ntfs3: Convert ni_readpage_cmpr() to take a folio We still use an array of pages for the decompression, but this removes a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit 584f60ba22f79c89e6708ab82a5b5d9b8fa21fb2 Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:32:00 2024 +0100 ntfs3: Convert ntfs_get_frame_pages() to use a folio The function still takes an array of pages, but use a folio internally. This function would deadlock against itself if used with large folios (as it locks each page), so we can be a little sloppy with the conversion back from folio to page for now. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit 326a6fd9600c52016c3c18c1aeafca2fab254146 Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:58 2024 +0100 ntfs3: Remove calls to set/clear the error flag Nobody checks the error flag on ntfs3 folios, so stop setting and clearing it. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit 562d060bed6637fbc3bc22802a0a0c5b00e12a38 Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:56 2024 +0100 ntfs3: Convert attr_make_nonresident to use a folio Fetch a folio from the page cache instead of a page and operate on it. Signed-off-by: Matthew Wilcox (Oracle) [almaz.alexandrovich@paragon-software.com: skip using folio_end_read] Signed-off-by: Konstantin Komarov commit d0c3df62779f875b9af953790e5e18bce2aed91e Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:55 2024 +0100 ntfs3: Convert attr_data_write_resident to use a folio Now that both callers of attr_data_write_resident() have a folio, pass it in and use memcpy_from_folio() to handle all the gnarly highmem multi-page problems. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit 0c1a1566447ebeccaa3694e04ae65c7642fa783e Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:54 2024 +0100 ntfs3: Convert ntfs_write_end() to work on a folio Convert the passed page back into a folio and use the folio APIs, saving a few hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit ab055cf9db2027f7cb59c80663578c053fb0afde Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:53 2024 +0100 ntfs3: Convert attr_data_read_resident() to take a folio Now that all three callers have a folio, pass it in and use folio_fill_tail() to do the hard work of filling the folio. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit 00c91073a34e81be35e01cf71ba15b5952006ccb Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:52 2024 +0100 ntfs3: Convert ntfs_write_begin to use a folio Retrieve a folio from the page cache instead of a precise page. This function is now large folio safe, but its called function is not. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit f27a8e2d3dfcede23782b1cae1ae4ca4bda4e8ef Author: Matthew Wilcox (Oracle) Date: Mon Apr 22 20:31:51 2024 +0100 ntfs3: Convert ntfs_read_folio to use a folio Remove the struct page conversion, and use a folio throughout. We still convert back to a struct page for calling some internal functions, but those will change soon. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Konstantin Komarov commit b366809dd151e8abb29decda02fd6a78b498831f Author: Andy Shevchenko Date: Wed Apr 24 00:01:01 2024 +0300 fs/ntfs3: Drop stray '\' (backslash) in formatting string CHECK /home/andy/prj/linux-topic-uart/fs/ntfs3/super.c fs/ntfs3/super.c:471:23: warning: unknown escape sequence: '\%' Drop stray '\' (backslash) in formatting string. Fixes: d27e202b9ac4 ("fs/ntfs3: Add more info into /proc/fs/ntfs3//volinfo") Signed-off-by: Andy Shevchenko Signed-off-by: Konstantin Komarov commit ea7376783a9688dc9b66461080bfe0ae65e0d13d Author: Konstantin Komarov Date: Mon Jun 3 14:07:04 2024 +0300 fs/ntfs3: Add some comments Signed-off-by: Konstantin Komarov commit 83cf2cf18cbb97bfe87ea6a58f91df20e82ff38c Author: Konstantin Komarov Date: Mon Jun 3 14:39:15 2024 +0300 fs/ntfs3: Rename variables New names make it easier to read code. Signed-off-by: Konstantin Komarov commit 702d4930eb06dcfda85a2fa67e8a1a27bfa2a845 Author: Konstantin Komarov Date: Mon Jun 3 13:13:17 2024 +0300 fs/ntfs3: Add a check for attr_names and oatbl Added out-of-bound checking for *ane (ATTR_NAME_ENTRY). Reported-by: lei lu Fixes: 865e7a7700d93 ("fs/ntfs3: Reduce stack usage") Signed-off-by: Konstantin Komarov commit 50c47879650b4c97836a0086632b3a2e300b0f06 Author: lei lu Date: Wed May 29 02:52:22 2024 +0800 fs/ntfs3: Validate ff offset This adds sanity checks for ff offset. There is a check on rt->first_free at first, but walking through by ff without any check. If the second ff is a large offset. We may encounter an out-of-bound read. Signed-off-by: lei lu Signed-off-by: Konstantin Komarov commit f28d0866d8ff798aa497971f93d0cc58f442d946 Author: Konstantin Komarov Date: Thu May 30 10:59:13 2024 +0300 fs/ntfs3: Correct undo if ntfs_create_inode failed Clusters allocated for Extended Attributes, must be freed when rolling back inode creation. Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Konstantin Komarov commit a0dde5d7a58b6bf9184ef3d8c6e62275c3645584 Author: Konstantin Komarov Date: Thu May 30 10:55:12 2024 +0300 fs/ntfs3: One more reason to mark inode bad In addition to returning an error, mark the node as bad. Signed-off-by: Konstantin Komarov commit 69505fe98f198ee813898cbcaf6770949636430b Author: Konstantin Komarov Date: Thu May 30 10:54:07 2024 +0300 fs/ntfs3: Replace inode_trylock with inode_lock The issue was detected due to xfstest 465 failing. Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov commit 519f38de57cd0c5e0043795b5fb0686c97311f6d Author: Konstantin Komarov Date: Thu May 30 10:44:17 2024 +0300 fs/ntfs3: Fix attr_insert_range at end of file If the offset is equal to or greater than the end of file, an error is returned. For such operations (i.e., inserting a hole at the end of file), ftruncate(2) should be used. Signed-off-by: Konstantin Komarov commit aaf9dc86bd806458f848c39057d59e5aa652a399 Author: Imre Deak Date: Tue Jun 25 14:18:40 2024 +0300 drm/i915/display: For MTL+ platforms skip mg dp programming For MTL+ platforms we use PICA chips for Type-C support and hence mg programming is not needed. Fixes issue with drm warn of TC port not being in legacy mode. Cc: stable@vger.kernel.org Signed-off-by: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20240625111840.597574-1-mika.kahola@intel.com commit 68c402fe5c5e5aa9a04c8bba9d99feb08a68afa7 Author: Krzysztof Kozlowski Date: Fri May 17 16:22:45 2024 +0200 dt-bindings: soc: sti: st,sti-syscon: document codec node st,stih407-core-syscfg syscon block comes with a child - the audio codec, whose binding is still in TXT format. Document the child to fix dtbs_check validation errors, while allowing later the binding to be converted to DT schema: stih410-b2260.dtb: core-syscfg@92b0000: 'sti-sasg-codec' does not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240517142245.178556-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 93ba8817f2ea13593d1c43e02a819cb7d9be048b Author: Krzysztof Kozlowski Date: Thu May 9 12:48:13 2024 +0200 ARM: dts: ti: align panel timings node name with dtschema DT schema expects panel timings node to follow certain pattern, dtbs_check warnings: am335x-pdu001.dtb: display-timings: '240x320p16' does not match any of the regexes: '^timing', 'pinctrl-[0-9]+' Linux drivers do not care about node name, so this should not have effect on Linux. Acked-by: Bartosz Golaszewski # For DaVinci Link: https://lore.kernel.org/r/20240509104813.216655-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit f531d13bdfe3f4f084aaa8acae2cb0f02295f5ae Author: Eyal Birger Date: Mon May 27 20:29:14 2024 -0700 xfrm: support sending NAT keepalives in ESP in UDP states Add the ability to send out RFC-3948 NAT keepalives from the xfrm stack. To use, Userspace sets an XFRM_NAT_KEEPALIVE_INTERVAL integer property when creating XFRM outbound states which denotes the number of seconds between keepalive messages. Keepalive messages are sent from a per net delayed work which iterates over the xfrm states. The logic is guarded by the xfrm state spinlock due to the xfrm state walk iterator. Possible future enhancements: - Adding counters to keep track of sent keepalives. - deduplicate NAT keepalives between states sharing the same nat keepalive parameters. - provisioning hardware offloads for devices capable of implementing this. - revise xfrm state list to use an rcu list in order to avoid running this under spinlock. Suggested-by: Paul Wouters Tested-by: Paul Wouters Tested-by: Antony Antony Signed-off-by: Eyal Birger Signed-off-by: Steffen Klassert commit 727de4fbc5466c7150482b532f2b7f7e514134f3 Author: Krzysztof Kozlowski Date: Tue Jun 25 18:58:47 2024 +0200 ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version Starting with v2.5 of Qualcomm LPASS Codec, few registers in the WSA macro block change. Bring proper support for this v2.5 and newer versions, to fix second speaker playback (speaker was silent). Signed-off-by: Krzysztof Kozlowski Acked-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-3-f65ffdfc368c@linaro.org Signed-off-by: Mark Brown commit 5dcf442bbbcada62631f5a376c44ff794596c2f0 Author: Krzysztof Kozlowski Date: Tue Jun 25 18:58:46 2024 +0200 ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions The driver for Qualcomm LPASS WSA macro codec was developed and tested on codec v2.1, however v2.5 has significant changes in the registers. The driver correctly works for v2.1 codec, but has issues when running on SoC with v2.5 codec (so starting with SM8450, even though playback works properly on that SoC). Prepare the driver for handling differences in register layouts of newer version. This does not have functional impact on older codec versions, but just: 1. Renames few soc_enums and widgets as v2.1, 2. For registers being different in v2.5, moves the defaults and regmap configuration to new structures, 3. Adds new 'struct wsa_reg_layout' with offsets and masks for few registers, so most of the code can stay unchaged on v2.5, 4. Chooses proper widgets, regmap config and register layout based on version of the codec. Signed-off-by: Krzysztof Kozlowski Acked-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-2-f65ffdfc368c@linaro.org Signed-off-by: Mark Brown commit 04f4de6f68eec73595682f32952467591f0cc016 Author: Krzysztof Kozlowski Date: Tue Jun 25 18:58:45 2024 +0200 ASoC: codecs: lpass-wsa-macro: Drop unused define WSA_MACRO_MUX_INP_MASK2 define is not used. Signed-off-by: Krzysztof Kozlowski Acked-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-1-f65ffdfc368c@linaro.org Signed-off-by: Mark Brown commit 322a6aff03937aa1ece33b4e46c298eafaf9ac41 Author: Jan Kara Date: Mon Jun 24 17:12:56 2024 +0200 ext2: Verify bitmap and itable block numbers before using them Verify bitmap block numbers and inode table blocks are sane before using them for checking bits in the block bitmap. CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit 56e69e59751d20993f243fb7dd6991c4e522424c Author: Roman Smirnov Date: Thu Jun 20 10:24:13 2024 +0300 udf: prevent integer overflow in udf_bitmap_free_blocks() An overflow may occur if the function is called with the last block and an offset greater than zero. It is necessary to add a check to avoid this. Found by Linux Verification Center (linuxtesting.org) with Svace. [JK: Make test cover also unalloc table freeing] Link: https://patch.msgid.link/20240620072413.7448-1-r.smirnov@omp.ru Suggested-by: Jan Kara Signed-off-by: Roman Smirnov Signed-off-by: Jan Kara commit ebbe26fd54a9621994bc16b14f2ba8f84c089693 Author: Jan Kara Date: Thu Jun 20 12:52:17 2024 +0200 udf: Avoid excessive partition lengths Avoid mounting filesystems where the partition would overflow the 32-bits used for block number. Also refuse to mount filesystems where the partition length is so large we cannot safely index bits in a block bitmap. Link: https://patch.msgid.link/20240620130403.14731-1-jack@suse.cz Signed-off-by: Jan Kara commit 8037da38d33cd354deafc41eee62da0fbcb5135c Author: Jan Kara Date: Mon Jun 17 17:41:53 2024 +0200 udf: Drop load_block_bitmap() wrapper The wrapper is completely pointless as all the checks are already done in __load_block_bitmap(). Just drop it and rename __load_block_bitmap(). Link: https://patch.msgid.link/20240617154201.29512-3-jack@suse.cz Signed-off-by: Jan Kara commit a90d4471146de21745980cba51ce88e7926bcc4f Author: Jan Kara Date: Mon Jun 17 17:41:52 2024 +0200 udf: Avoid using corrupted block bitmap buffer When the filesystem block bitmap is corrupted, we detect the corruption while loading the bitmap and fail the allocation with error. However the next allocation from the same bitmap will notice the bitmap buffer is already loaded and tries to allocate from the bitmap with mixed results (depending on the exact nature of the bitmap corruption). Fix the problem by using BH_verified bit to indicate whether the bitmap is valid or not. Reported-by: syzbot+5f682cd029581f9edfd1@syzkaller.appspotmail.com CC: stable@vger.kernel.org Link: https://patch.msgid.link/20240617154201.29512-2-jack@suse.cz Fixes: 1e0d4adf17e7 ("udf: Check consistency of Space Bitmap Descriptor") Signed-off-by: Jan Kara commit 97ca843f6ad38036472058c152fb294e5af9f147 Author: Jean Delvare Date: Fri May 31 11:34:07 2024 +0200 i2c: dev: Check for I2C_FUNC_I2C before calling i2c_transfer It is good practice to check that the underlying adapter supports I2C transfers before attempting them. The i2c core would eventually return an error, but it's more efficient to fail early. Signed-off-by: Jean Delvare Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit d08ed10623b3cba46102cd3d569a7517cbf48e40 Author: Uwe Kleine-König Date: Tue Jun 25 10:31:31 2024 +0200 i2c: 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 a comma after the sentinel entry. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 256ed3108b3c567456223d3f250af41b7b505f0f Author: Wolfram Sang Date: Tue Jun 11 11:50:31 2024 +0200 Documentation: i2c: testunit: use proper reST This document is hardly readable when converted to HTML. Mark code sections as such and use tables to improve readability a lot. Some content has slightly been moved around, but no significant changes were made. Signed-off-by: Wolfram Sang commit 0cd9f140389bcd876e23aa3c06eea07f42892ad4 Author: Chen Ni Date: Fri Jun 21 17:16:37 2024 +0800 pinctrl: mlxbf3: Fix return value check for devm_platform_ioremap_resource Fix return value check for devm_platform_ioremap_resource() in mlxbf3_pinctrl_probe(). Signed-off-by: Chen Ni Acked-by: Asmaa Mnebhi Link: https://lore.kernel.org/20240621091637.2299310-1-nichen@iscas.ac.cn Signed-off-by: Linus Walleij commit f775c242307777d6c7739e21d2ef30987b737104 Author: Potin Lai Date: Fri Jun 21 17:31:42 2024 +0800 pinctrl: aspeed-g6: Add NCSI pin group config Based on the NCSI pin table (Table 181) in NCSI spec[1], the reference clock output pin (RMIIXRCLKO) is not needed on the management controller side. To optimize pin usage, add new NCSI pin group that excludes RMIIXRCLKO, reducing the number of required pins. LINK: [1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.2.0a.pdf Signed-off-by: Potin Lai Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/20240621093142.698529-3-potin.lai.pt@gmail.com Signed-off-by: Linus Walleij commit 49b2b5c39e10fd442b89844ae6a510a207c0c8c9 Author: Potin Lai Date: Fri Jun 21 17:31:41 2024 +0800 dt-bindings: pinctrl: aspeed,ast2600-pinctrl: add NCSI groups In the NCSI pin table, the reference clock output pin (RMIIXRCLKO) is not needed on the management controller side. Add "NCSI" pin groups that are equivalent to the RMII pin groups, but without the RMIIXRCLKO pin. Acked-by: Krzysztof Kozlowski Signed-off-by: Potin Lai Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/20240621093142.698529-2-potin.lai.pt@gmail.com Signed-off-by: Linus Walleij commit c2e5a25e8d880638d771b19899b5a76feb8b82a0 Author: Srinivas Kandagatla Date: Sat Jun 22 17:49:31 2024 +0100 pinctrl: qcom: Introduce SM4250 LPI pinctrl driver Add support for the pin controller block on SM4250 Low Power Island. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/20240612-sm4250-lpi-v4-2-a0342e47e21b@linaro.org Signed-off-by: Linus Walleij commit 2ffa7a35466212f31a0ffda5d948c49a236fac55 Author: Srinivas Kandagatla Date: Sat Jun 22 17:49:30 2024 +0100 dt-bindings: pinctrl: qcom: Add SM4250 pinctrl Add device tree binding Documentation details for Qualcomm SM4250 LPASS LPI(Low power Island) pinctrl device. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20240612-sm4250-lpi-v4-1-a0342e47e21b@linaro.org Signed-off-by: Linus Walleij commit 3a882554a3bbd2fa7f671a48bdf1452bb0d961a1 Author: Peng Fan Date: Sat May 4 21:20:17 2024 +0800 pinctrl: k210: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-19-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 7f500f2011c0bbb6e1cacab74b4c99222e60248e Author: Peng Fan Date: Sat May 4 21:20:16 2024 +0800 pinctrl: freescale: mxs: Fix refcount of child of_get_next_child() will increase refcount of the returned node, need use of_node_put() on it when done. Per current implementation, 'child' will be override by for_each_child_of_node(np, child), so use of_get_child_count to avoid refcount leakage. Fixes: 17723111e64f ("pinctrl: add pinctrl-mxs support") Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-18-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit d7f5120a944a5b515d6307c8cbfcd4f1fde543fb Author: Peng Fan Date: Sat May 4 21:20:15 2024 +0800 pinctrl: pinconf-generic: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-17-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 240c5f238d59894c54df36ed5a157246bbae7e23 Author: Peng Fan Date: Sat May 4 21:20:14 2024 +0800 pinctrl: bcm: bcm63xx: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-16-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 3a0278cfb4486eb4fd218454050564d23606a000 Author: Peng Fan Date: Sat May 4 21:20:12 2024 +0800 pinctrl: mediatek: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-14-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit c957ae7e7e68451b792eeff6fed968effb1a8716 Author: Peng Fan Date: Sat May 4 21:20:11 2024 +0800 pinctrl: nomadik: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-13-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 3dcc01b36f18aafc0977d68f292414b2c2cfb874 Author: Peng Fan Date: Sat May 4 21:20:10 2024 +0800 pinctrl: s32cc: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-12-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 7c2aabb56f925a1f68373e857bce170e2fd29b46 Author: Peng Fan Date: Sat May 4 21:20:09 2024 +0800 pinctrl: at91: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-11-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 56c42f6c7b2cab1b531ba1a433320e10a613eb80 Author: Peng Fan Date: Sat May 4 21:20:07 2024 +0800 pinctrl: rockchip: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-9-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 8c5dc2a5b3a76f1ebf483dd2e3514746e97898cd Author: Peng Fan Date: Sat May 4 21:20:04 2024 +0800 pinctrl: spear: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-6-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 794e5dc533b070012d8e3cc9bf115596371ac040 Author: Peng Fan Date: Sat May 4 21:20:03 2024 +0800 pinctrl: sprd: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-5-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 8fa99c00351ce673986dffd9a6839ad611e170dc Author: Peng Fan Date: Sat May 4 21:20:02 2024 +0800 pinctrl: starfive: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Acked-by: Emil Renner Berthing Signed-off-by: Peng Fan Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-4-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 11eefc0ac884b753c885f1256be182af7c13eefb Author: Peng Fan Date: Sat May 4 21:20:00 2024 +0800 pinctrl: tegra: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Acked-by: Thierry Reding Link: https://lore.kernel.org/20240504-pinctrl-cleanup-v2-2-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 97370f8ed271405bab2af42b2d3abbb4002c9114 Author: Chen-Yu Tsai Date: Thu Jun 20 13:47:07 2024 +0800 drm/mediatek: select DRM_GEM_DMA_HELPER if DRM_FBDEV_EMULATION=y With the recent switch from fbdev-generic to fbdev-dma, the driver now requires the DRM GEM DMA helpers. This dependency is missing, and will cause a link failure if fbdev emulation is enabled. Add the missing dependency. Fixes: 0992284b4fe4 ("drm/mediatek: Use fbdev-dma") Signed-off-by: Chen-Yu Tsai Reviewed-by: Thomas Zimmermann Acked-by: Chun-Kuang Hu Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240620054708.2230665-1-wenst@chromium.org commit 1bbdb7f7a4ebf2596b06a6bb84505a4a37a66d2e Author: Zijun Hu Date: Thu Jun 13 22:04:36 2024 +0800 net: rfkill: Correct return value in invalid parameter case rfkill_set_hw_state_reason() does not return current combined block state when its parameter @reason is invalid, that is wrong according to its comments, fix it by correcting the value returned. Also reformat the WARN while at it. Signed-off-by: Zijun Hu Link: https://patch.msgid.link/1718287476-28227-1-git-send-email-quic_zijuhu@quicinc.com [edit/reformat commit message, remove unneeded variable] Signed-off-by: Johannes Berg commit 021d53a3d87eeb9dbba524ac515651242a2a7e3b Author: Zong-Zhe Yang Date: Mon Jun 17 19:52:17 2024 +0800 wifi: mac80211: fix NULL dereference at band check in starting tx ba session In MLD connection, link_data/link_conf are dynamically allocated. They don't point to vif->bss_conf. So, there will be no chanreq assigned to vif->bss_conf and then the chan will be NULL. Tweak the code to check ht_supported/vht_supported/has_he/has_eht on sta deflink. Crash log (with rtw89 version under MLO development): [ 9890.526087] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 9890.526102] #PF: supervisor read access in kernel mode [ 9890.526105] #PF: error_code(0x0000) - not-present page [ 9890.526109] PGD 0 P4D 0 [ 9890.526114] Oops: 0000 [#1] PREEMPT SMP PTI [ 9890.526119] CPU: 2 PID: 6367 Comm: kworker/u16:2 Kdump: loaded Tainted: G OE 6.9.0 #1 [ 9890.526123] Hardware name: LENOVO 2356AD1/2356AD1, BIOS G7ETB3WW (2.73 ) 11/28/2018 [ 9890.526126] Workqueue: phy2 rtw89_core_ba_work [rtw89_core] [ 9890.526203] RIP: 0010:ieee80211_start_tx_ba_session (net/mac80211/agg-tx.c:618 (discriminator 1)) mac80211 [ 9890.526279] Code: f7 e8 d5 93 3e ea 48 83 c4 28 89 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 49 8b 84 24 e0 f1 ff ff 48 8b 80 90 1b 00 00 <83> 38 03 0f 84 37 fe ff ff bb ea ff ff ff eb cc 49 8b 84 24 10 f3 All code ======== 0: f7 e8 imul %eax 2: d5 (bad) 3: 93 xchg %eax,%ebx 4: 3e ea ds (bad) 6: 48 83 c4 28 add $0x28,%rsp a: 89 d8 mov %ebx,%eax c: 5b pop %rbx d: 41 5c pop %r12 f: 41 5d pop %r13 11: 41 5e pop %r14 13: 41 5f pop %r15 15: 5d pop %rbp 16: c3 retq 17: cc int3 18: cc int3 19: cc int3 1a: cc int3 1b: 49 8b 84 24 e0 f1 ff mov -0xe20(%r12),%rax 22: ff 23: 48 8b 80 90 1b 00 00 mov 0x1b90(%rax),%rax 2a:* 83 38 03 cmpl $0x3,(%rax) <-- trapping instruction 2d: 0f 84 37 fe ff ff je 0xfffffffffffffe6a 33: bb ea ff ff ff mov $0xffffffea,%ebx 38: eb cc jmp 0x6 3a: 49 rex.WB 3b: 8b .byte 0x8b 3c: 84 24 10 test %ah,(%rax,%rdx,1) 3f: f3 repz Code starting with the faulting instruction =========================================== 0: 83 38 03 cmpl $0x3,(%rax) 3: 0f 84 37 fe ff ff je 0xfffffffffffffe40 9: bb ea ff ff ff mov $0xffffffea,%ebx e: eb cc jmp 0xffffffffffffffdc 10: 49 rex.WB 11: 8b .byte 0x8b 12: 84 24 10 test %ah,(%rax,%rdx,1) 15: f3 repz [ 9890.526285] RSP: 0018:ffffb8db09013d68 EFLAGS: 00010246 [ 9890.526291] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff9308e0d656c8 [ 9890.526295] RDX: 0000000000000000 RSI: ffffffffab99460b RDI: ffffffffab9a7685 [ 9890.526300] RBP: ffffb8db09013db8 R08: 0000000000000000 R09: 0000000000000873 [ 9890.526304] R10: ffff9308e0d64800 R11: 0000000000000002 R12: ffff9308e5ff6e70 [ 9890.526308] R13: ffff930952500e20 R14: ffff9309192a8c00 R15: 0000000000000000 [ 9890.526313] FS: 0000000000000000(0000) GS:ffff930b4e700000(0000) knlGS:0000000000000000 [ 9890.526316] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9890.526318] CR2: 0000000000000000 CR3: 0000000391c58005 CR4: 00000000001706f0 [ 9890.526321] Call Trace: [ 9890.526324] [ 9890.526327] ? show_regs (arch/x86/kernel/dumpstack.c:479) [ 9890.526335] ? __die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434) [ 9890.526340] ? page_fault_oops (arch/x86/mm/fault.c:713) [ 9890.526347] ? search_module_extables (kernel/module/main.c:3256 (discriminator 3)) [ 9890.526353] ? ieee80211_start_tx_ba_session (net/mac80211/agg-tx.c:618 (discriminator 1)) mac80211 Signed-off-by: Zong-Zhe Yang Link: https://patch.msgid.link/20240617115217.22344-1-kevin_yang@realtek.com Signed-off-by: Johannes Berg commit 9a473c2a093e0d1c466bf86073230e2c8b658977 Author: Shiji Yang Date: Wed Jun 26 08:33:18 2024 +0800 gpio: ath79: convert to dynamic GPIO base allocation ath79 target has already been converted to device tree based platform. Use dynamic GPIO numberspace base to suppress the warning: gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. Tested on Atheros AR7241 and AR9344. Signed-off-by: Shiji Yang Suggested-by: Jonas Gorski Link: https://lore.kernel.org/r/TYCP286MB089598EA71E964BD8AB9EFD3BCD62@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski commit a6db5c70efd79b5ae96c1c161b0b776b7529ed68 Author: Johannes Berg Date: Tue Jun 25 19:51:23 2024 +0300 wifi: iwlwifi: mvm: fix rs.h kernel-doc Some things are mislabeled here, fix that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.baa3bd60c8f8.Ibc4886f7fe696d57991689cc2885cde5cecc8f90@changeid Signed-off-by: Johannes Berg commit ba59cfb7417ca93e4240948a8767ffb1a2c366ec Author: Johannes Berg Date: Tue Jun 25 19:51:22 2024 +0300 wifi: iwlwifi: fw: api: datapath: fix kernel-doc Fix kernel-doc warnings in datapath.h. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.1a644d4c38f4.I6060819da2bfc948bee089a91626ff474300a896@changeid Signed-off-by: Johannes Berg commit 7c8afa63652ebc326fb659579db6d0e17a7fe217 Author: Johannes Berg Date: Tue Jun 25 19:51:21 2024 +0300 wifi: iwlwifi: fix remaining mistagged kernel-doc comments There are some comments left that aren't really kernel-doc, remove the extra * that tags them. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.98119856de4b.I9ca0cee675b166c4a7d58d619ce3278494398ea2@changeid Signed-off-by: Johannes Berg commit fa1a1eb21c9caf1ad633d4bd3cb3b9c299c6a3a3 Author: Johannes Berg Date: Tue Jun 25 19:51:20 2024 +0300 wifi: iwlwifi: fix prototype mismatch kernel-doc warnings Fix all the prototype mismatch and "wrong kernel-doc identifier" warnings, due to typos in or misformatting of the kernel-doc. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.6ec65cf9b88c.I7804114d7369f352e80a0e8430f7119af8e210de@changeid Signed-off-by: Johannes Berg commit e3f637b35f5d8a8031bfe2f60ffae7acd7e7f96c Author: Johannes Berg Date: Tue Jun 25 19:51:19 2024 +0300 wifi: iwlwifi: fix kernel-doc in iwl-fh.h Some blocks aren't really kernel-doc, and some are misformatted or with mismatched names. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.16865e5503ac.I5401edbf9ecbc25e07aad929bb56255410173711@changeid Signed-off-by: Johannes Berg commit 7fe5da1cd0aa77cfd6c3c70dd47af9854eb2d032 Author: Johannes Berg Date: Tue Jun 25 19:51:18 2024 +0300 wifi: iwlwifi: fix kernel-doc in iwl-trans.h One mismatched enum name, and some missing docs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.4846bf27dec1.I31fdfad01abc82b1340c59e51ece3db2242c8816@changeid Signed-off-by: Johannes Berg commit ab713d0c883dcb59400d8cbdaae1d6a970c957ec Author: Johannes Berg Date: Tue Jun 25 19:51:17 2024 +0300 wifi: iwlwifi: pcie: fix kernel-doc One typo, and a few things were missing. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.c667bc035757.Iae0e5903a35f8e42f86deb27429131f22329b8dd@changeid Signed-off-by: Johannes Berg commit 7b24e0b8a1533ae3519922f56935313e0338282e Author: Johannes Berg Date: Tue Jun 25 19:51:16 2024 +0300 wifi: iwlwifi: dvm: fix kernel-doc warnings Mostly the docs just aren't kernel-doc anyway, and one is a typo. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.8b12f56bf8c0.I64fa9df72ca0e862b96647c062b8c9464318e649@changeid Signed-off-by: Johannes Berg commit c0b047fd243360bc10dfff100d23de3eb08ebc73 Author: Benjamin Berg Date: Tue Jun 25 19:51:15 2024 +0300 wifi: iwlwifi: mvm: don't log error for failed UATS table read This causes unnecessary error level kernel messages if the platform does not have any UATS table. Signed-off-by: Benjamin Berg Reviewed-by: Mukesh Sisodiya Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.306b7eed8671.I6e9294335378dab38ef957866a0d39ec1a2df7f8@changeid Signed-off-by: Johannes Berg commit 924d1cd504f39689e88c22b8bb7df7f1405626d4 Author: Johannes Berg Date: Tue Jun 25 19:51:14 2024 +0300 wifi: iwlwifi: trans: make bad state warnings Kalle reported that this triggers very occasionally, but we don't even know which place, except that it wasn't one with a warning. Make all of them warnings since this is really not meant to happen and indicates driver bugs. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.be7a3a95afae.Ie8606d36783818c043c971bf0bc6f4df6a6e8f5b@changeid Signed-off-by: Johannes Berg commit 702935aeb1446b5e2ed1a41add14702ae2b09c77 Author: Johannes Berg Date: Tue Jun 25 19:51:13 2024 +0300 wifi: iwlwifi: fw: api: fix some kernel-doc There are naming issues of structs vs. kernel-doc, fix some that I noticed now. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.4c530804b4ff.I68b894b9cdbd9560d86b92646e9b6b17a6d5117e@changeid Signed-off-by: Johannes Berg commit 3778a17ab054313a5513e3341eaff49aea65a88a Author: Miri Korenblit Date: Tue Jun 25 19:51:12 2024 +0300 wifi: iwlwifi: mvm: remove init_dbg module parameter This is no longer used Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20240625194805.17a1484f2485.I095c7482ac517111081f8ff40312b48ffdd7ff94@changeid Signed-off-by: Johannes Berg commit c4fe1c84b2b301ed91dcfdc15f719fb94fd83e70 Author: Emmanuel Grumbach Date: Tue Jun 25 19:51:11 2024 +0300 wifi: iwlwifi: update the BA notification API We don't use the new field, but at least, document the change. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.3d7887e2e374.I37bf709969d069ff0392e0976e62e06fb7a87bc9@changeid Signed-off-by: Johannes Berg commit f9068fe4fd49f9e4409c30546d7e16238942ce62 Author: Johannes Berg Date: Tue Jun 25 19:51:10 2024 +0300 wifi: iwlwifi: mvm: always unblock EMLSR on ROC end Since we always block EMLSR for ROC, we also need to always unblock it, even if we don't have a P2P device interface. Fix this. Fixes: a1efeb823084 ("wifi: iwlwifi: mvm: Block EMLSR when a p2p/softAP vif is active") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.96bbf98b716d.Id5a36954f8ebaa95142fd3d3a7a52bab5363b0bd@changeid Signed-off-by: Johannes Berg commit 9215152677d4b321801a92b06f6d5248b2b4465f Author: Johannes Berg Date: Tue Jun 25 19:51:09 2024 +0300 wifi: iwlwifi: mvm: use IWL_FW_CHECK for link ID check The lookup function iwl_mvm_rcu_fw_link_id_to_link_conf() is normally called with input from the firmware, so it should use IWL_FW_CHECK() instead of WARN_ON(). Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.4ea8fb7c47d4.I1c22af213f97f69bfc14674502511c1bc504adfb@changeid Signed-off-by: Johannes Berg commit f9414f8067015b1db14d374a33fbafc8395eb958 Author: Johannes Berg Date: Tue Jun 25 19:51:08 2024 +0300 wifi: iwlwifi: mvm: don't flush BSSes on restart with MLD API If the firmware has MLD APIs, it will handle all timing and we don't need to give it timestamps. Therefore, we don't care about the timestamps stored in the BSS table, so there's no need to flush the BSS table. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.c6d86dc2377e.I246d0fae0d23ed34b7cd9c3400edb004eb5ac1d0@changeid Signed-off-by: Johannes Berg commit 8a4475a15b373bb5fcaf5ccd24f0f08217fa6d34 Author: Daniel Gabay Date: Tue Jun 25 19:51:07 2024 +0300 wifi: iwlwifi: remove MVM prefix from scan API These are not MVM specific. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240625194805.09f672318944.Idffeab6a4dfc12effebd1c50815ae5c540afca74@changeid Signed-off-by: Johannes Berg commit 6adae0b081454393ca5f7363fd3c7379c8e2a7a1 Author: Golan Ben Ami Date: Thu Jun 13 17:11:23 2024 +0300 wifi: iwlwifi: remove AX101, AX201 and AX203 support from LNL LNL is the codename for the upcoming Series 2 Core Ultra processors designed by Intel. AX101, AX201 and AX203 devices are not shiped on LNL platforms, so don't support them. Signed-off-by: Golan Ben Ami Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240613171043.f24a228dfd96.I989a2d3f1513211bc49ac8143ee4e9e341e1ee67@changeid Signed-off-by: Johannes Berg commit f9802d531835b7591a9ddf99996e0f3ae59093f0 Author: Johannes Berg Date: Tue Jun 18 19:59:45 2024 +0300 wifi: iwlwifi: mvm: don't limit VLP/AFC to UATS-enabled When UATS isn't enabled (no VLP/AFC AP support), we need to still set the right bits in the channel/regulatory flags, so remove the uats_enabled argument to the parsing etc. Also, firmware deals just fine with getting the UATS table if it supports the command even if the bits aren't set, so always send it, since it's also needed if BIT(31) is set, but the driver need not have any knowledge of that. Remove 'uats_enabled' entirely. Fixes: 0d2fc8821a7d ("wifi: iwlwifi: nvm: parse the VLP/AFC bit from regulatory") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618195731.a81e7234c4f6.Ic0131180d38e0f1ead2f7fa0e7583407ceaa0bd1@changeid Signed-off-by: Johannes Berg commit a9056a3716c5f77be845475e184daabaa771054c Author: Johannes Berg Date: Tue Jun 18 19:44:13 2024 +0300 wifi: iwlwifi: mvm: enable VLP AP on VLP channels If channels are marked VLP, then we're actually also allowed to be VLP AP/GO. Enable this. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.e15f24fc6bc8.I33ed7d141fec731e79370ba6c7cfbe28776944a0@changeid Signed-off-by: Johannes Berg commit 3591e3b9a7cae0f412665f3f5f5f53a29a950d87 Author: Johannes Berg Date: Tue Jun 18 19:44:12 2024 +0300 wifi: iwlwifi: mei: clarify iwl_mei_pldr_req() docs This isn't related to whether or not "fw can be loaded", but rather requesting that ME go into a state where doing a product reset is safe. This is related to FW load only in the specific case of where it's used today in iwlmvm, notably when it's known that the firmware itself will (or at least may) do a product reset during load. Clarify the documentation. I was tempted to rename things too, but on the ME side it really is also called PLDR (which is a Windows term and may not even match the complete behaviour since doing a full product reset from the driver also requires calling an ACPI method first.) So keep the name aligned with ME. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.ca2c55121a04.I889cd47210367ca9110411472ee696b796a37ab5@changeid Signed-off-by: Johannes Berg commit 67c638675dcdad588aeb71e67dde77b48a53a320 Author: Johannes Berg Date: Tue Jun 18 19:44:11 2024 +0300 wifi: iwlwifi: mvm: rename 'pldr_sync' PLDR (product level device reset) is a Windows term, and is something the driver triggers there, AFAICT. Really what 'pldr_sync' here wants to capture is whether or not the firmware will/may do a product reset during initialization, which makes the device drop off the bus, requiring a rescan. If this is the case, obviously the init will fail/time out, so we don't want to report all kinds of errors etc., hence this tracking variable. Rename it to 'fw_product_reset' to capture the meaning better. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.ccf849642af8.I01dded6b2393771b7baf8b4b17336784d987c7c2@changeid Signed-off-by: Johannes Berg commit a02079af2491b076a4bb6b1a5d668621efbb4b4e Author: Ilan Peer Date: Tue Jun 18 19:44:10 2024 +0300 wifi: iwlwifi: mvm: Fix associated initiator key setting When setting the keys for secure measurement with an AP the station is associated with, the TK should only be referenced and not copied. In addition set the cipher only when the correct station is found. Fixes: 626be4bf99f6 ("wifi: iwlwifi: mvm: modify iwl_mvm_ftm_set_secured_ranging() parameters") Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.be2a5327554d.Ie53220b075dacb23a8d073f6008aafd339368592@changeid Signed-off-by: Johannes Berg commit 7714a40561c3905764140cc3e971469671b07187 Author: Johannes Berg Date: Tue Jun 18 19:44:09 2024 +0300 wifi: iwlwifi: mvm: dissolve iwl_mvm_mac_remove_interface_common() Since the function isn't actually common (any more), just dissolve it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.adf54ab5bc4a.I90339f152bba73b622e05063d16ae914ae20053f@changeid Signed-off-by: Johannes Berg commit bffa3d04e4ab90dcd3ae74642977132df135417b Author: Emmanuel Grumbach Date: Tue Jun 18 19:44:08 2024 +0300 wifi: iwlwifi: trans: remove unused status bits Those bits are never used. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.cd26318d9513.I035ec7f3f022cdc19a650eca3b89455e3b5eca18@changeid Signed-off-by: Johannes Berg commit 2b94a6f792b0844a98c187eb35e090ce16bf5810 Author: Emmanuel Grumbach Date: Tue Jun 18 19:44:07 2024 +0300 wifi: iwlwifi: don't assume op_mode_nic_config exists The new op_mode won't have this callback. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20240618194245.718983e7b832.I02fb130aa3d2044958cba7dced357031b92e33bb@changeid Signed-off-by: Johannes Berg commit 74943017afdddcf682b1a162781b872d2188c5e6 Author: Miri Korenblit Date: Tue Jun 18 19:44:06 2024 +0300 wifi: iwlwifi: bump FW API to 92 for BZ/SC devices Start supporting API version 92 for new devices. Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.433cfbb6f042.I914da5bd0e2ed25148726f9fb55e7a60b895edfd@changeid Signed-off-by: Johannes Berg commit 2917d04bce3906750b9b746736c54cc68740723e Author: Miri Korenblit Date: Tue Jun 18 19:44:05 2024 +0300 wifi: iwlwifi: trans: remove unused function parameter iwl_trans_pcie_gen2_fw_alive doesn't use the scd_addr parameter, it was there only because we needed the functio to have a prototype same as iwl_trans_ops::fw_alive callback. But now the ops is removed so no reason to keep the parameter. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach Link: https://patch.msgid.link/20240618194245.1aa8bf13aea9.I9662c10c1db545dd8849af4bb4ab47708d4548d8@changeid Signed-off-by: Johannes Berg commit f77bd9491f7fad1f1e3d12ff25469f75d97cb1d4 Author: Miri Korenblit Date: Tue Jun 18 19:44:04 2024 +0300 wifi: iwlwifi: mvm: remove IWL_MVM_PARSE_NVM This debug is not in use anymore. Remove it. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://patch.msgid.link/20240618194245.bded22049fae.I980c4a941d769f93cf74bfc90a7d7d9fb384dea1@changeid Signed-off-by: Johannes Berg commit e8bb19c1d5906d2f31ae61853fea2a9abc71e951 Author: Emmanuel Grumbach Date: Tue Jun 18 19:44:03 2024 +0300 wifi: iwlwifi: support fast resume This will allow to suspend / resume the system without resetting the firmware. This will allow to reduce the resume time. In case the fast_resume fails, stop the device and bring it up from scratch. Raise the timeout for the D3_END notification since in some iterations, it took 240ms. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618194245.03b8d2801044.I613d17c712de7a0d611cde4e14f37ebbe0c3c964@changeid Signed-off-by: Johannes Berg commit 0091eda01412805e0d2c8025638ac0992102a7fc Author: Daniel Gabay Date: Tue Jun 18 20:03:03 2024 +0300 wifi: iwlwifi: fix iwl_mvm_get_valid_rx_ant() Fix incorrect use of _tx_ valid ant data in the function. Fixes: 4ea1ed1d14d8 ("wifi: iwlwifi: mvm: support set_antenna()") Signed-off-by: Daniel Gabay Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618200104.b7c6a320c7dc.I3092eb5275056f2162b9694e583c310c38568b2a@changeid Signed-off-by: Johannes Berg commit 5c38bedac16a946402b627621b3d4bfcc9952479 Author: Johannes Berg Date: Tue Jun 18 20:03:02 2024 +0300 wifi: iwlwifi: mvm: unify and fix interface combinations AP interfaces fundamentally cannot leave the channel, so multi- channel operation with them isn't really possible. We shouldn't advertise support for such, at least not as long as we don't have full multi-radio support. Thus, remove the AP bit from the interface combinations for two channels and add another set for just one channel that has it. Also, to avoid duplicating everything even more, unify the NAN and non-NAN cases. Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618200104.3213638262ef.I2a0031b37623d7763fd0c5405477ea7206a3e923@changeid Signed-off-by: Johannes Berg commit d1621b008e3ad866426499fd351983a01784fa34 Author: Emmanuel Grumbach Date: Tue Jun 18 20:03:01 2024 +0300 wifi: iwlwifi: pcie: fix a few legacy register accesses for new devices Do not access legacy bits for new devices, this has no effect. Somehow, wowlan worked despite the usage of the wrong bits. Now that we want to keep the firmware loaded during suspend even without wowlan, this change is needed. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618200104.399d4d215210.Id12e7fdb7bab9f2c4c0d292519b5c1b4753a8c84@changeid Signed-off-by: Johannes Berg commit 1decf05d0f4de78ef67dc3f794709258c689e09e Author: Emmanuel Grumbach Date: Tue Jun 18 19:25:56 2024 +0300 wifi: mac80211: inform the low level if drv_stop() is a suspend This will allow the low level driver to take different actions for different flows. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240618192529.739036208b6e.Ie18a2fe8e02bf2717549d39420b350cfdaf3d317@changeid Signed-off-by: Johannes Berg commit 5036eaffed3e29fb35c796989efb3c88ac79d87b Author: Ilan Peer Date: Fri Jun 14 09:35:41 2024 +0200 wifi: cfg80211: Always call tracing Call the tracing function even if the cfg80211 callbacks are not set. This would allow better understanding of user space actions. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Ilan Peer Link: https://patch.msgid.link/20240614093541.018cb816e176.I28f68740a6b42144346f5c175c7874b0a669a364@changeid Signed-off-by: Johannes Berg commit 9cc88678db5be1d67c865dbe60afb56867698301 Author: Johannes Berg Date: Wed Jun 12 14:38:10 2024 +0200 wifi: mac80211: check SSID in beacon Check that the SSID in beacons is correct, if it's not hidden and beacon protection is enabled (otherwise there's no value). If it doesn't match, disconnect. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143809.8b24a3d26a3d.I3e3ef31dbd2ec606be74d502a9d00dd9514c6885@changeid Signed-off-by: Johannes Berg commit 0b2d9d9aec2be212a28b7d14b5462c56d9adc3a3 Author: Johannes Berg Date: Wed Jun 12 14:35:57 2024 +0200 wifi: mac80211: correcty limit wider BW TDLS STAs When updating a channel context, the code can apply wider bandwidth TDLS STA channel definitions to each and every channel context used by the device, an approach that will surely lead to problems if there is ever more than one. Restrict the wider BW TDLS STA consideration to only TDLS STAs that are actually related to links using the channel context being updated. Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible") Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143707.1ad989acecde.I5c75c94d95c3f4ea84f8ff4253189f4b13bad5c3@changeid Signed-off-by: Johannes Berg commit d42fcaece03654a4b21d2da88d68ed913e0b6c46 Author: Johannes Berg Date: Wed Jun 12 14:35:56 2024 +0200 wifi: mac80211: add ieee80211_tdls_sta_link_id() We've open-coded this twice and will need it again, add ieee80211_tdls_sta_link_id() to get the one link ID for a TDLS STA. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143707.9f8141ae1725.I343822bbba0ae08dedb2f54a0ce87f2ae5ebeb2b@changeid Signed-off-by: Johannes Berg commit dd7b1bdb5614419305089de399b7e6aa2fde8301 Author: Johannes Berg Date: Wed Jun 12 14:32:06 2024 +0200 wifi: mac80211: update STA/chandef width during switch In channel switch without an additional channel context, where the reassign logic kicks in, we also need to update the station bandwidth and chandef minimum width correctly to avoid having station rate control configured to wider bandwidth than the channel context. Do that now. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143418.0bc3d28231b3.I51e76df86212057ca0469e235ba9bf4461cbee75@changeid Signed-off-by: Johannes Berg commit b27512368591fc959768df1f7dacf2a96b1bd036 Author: Johannes Berg Date: Wed Jun 12 14:32:05 2024 +0200 wifi: mac80211: make ieee80211_chan_bw_change() able to use reserved Make ieee80211_chan_bw_change() able to use the reserved chanreq (really the chandef part of it) for the calculations, so it can be used _without_ applying the changes first. Remove the comment that indicates this is required, since it no longer is. However, this capability only gets used later. Also, this is not ideal, we really should not different so much between reserved and non-reserved usage, to simplify. That's a further cleanup later though. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143418.1a08cf83b8cb.Ie567bb272eb25ce487651088f13ad041f549651c@changeid Signed-off-by: Johannes Berg commit 7d2bad829c449b8cb172d20cb51d62c586fca94d Author: Johannes Berg Date: Wed Jun 12 14:32:04 2024 +0200 wifi: mac80211: optionally pass chandef to ieee80211_sta_cur_vht_bw() We'll need this as well for channel switching cases, so add the ability now to pass the chandef to calculate for. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143418.f70e05d9f306.Ifa0ce267de4f0ef3c21d063fb0cbf50e84d7d6ff@changeid Signed-off-by: Johannes Berg commit 25af8ff51d7e027fbdf8ed84e349427311a6da4d Author: Johannes Berg Date: Wed Jun 12 14:32:03 2024 +0200 wifi: mac80211: optionally pass chandef to ieee80211_sta_cap_rx_bw() We'll need this function to take a new chandef in (some) channel switching cases, so prepare for that by allowing that to be passed and using it if so. Clean up the code a little bit while at it. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143418.772313f08b6a.If9708249e5870671e745d4c2b02e03b25092bea3@changeid Signed-off-by: Johannes Berg commit b777bdfc9be8a61ecf3c07962add3b5fc1279e98 Author: Johannes Berg Date: Wed Jun 12 14:28:37 2024 +0200 wifi: mac80211: handle protected dual of public action The code currently handles ECSA (extended channel switch announcement) public action frames. Handle also their protected dual, which actually is protected. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143037.db642feb8b2e.I184fa5c9bffb68099171701e403c2aa733f60fde@changeid Signed-off-by: Johannes Berg commit 414e090bc41d27af8196d2f36c2e883d7b4f1478 Author: Johannes Berg Date: Wed Jun 12 14:28:36 2024 +0200 wifi: mac80211: restrict public action ECSA frame handling Public action extended channel switch announcement (ECSA) frames cannot be protected well, the spec is unclear about what should happen in the presence of stations that can receive protected dual and stations that cannot. Mitigate these issues by not treating public action frames as the absolute truth, only treat them as a hint to stop transmitting (quiet mode), and do the remainder of the CSA handling only when receiving the next beacon (or protected action frame) that contains the CSA; or, if it doesn't, simply stop being quiet and continue operating normally. This limits the exposure to malicious ECSA public action frames, since they cannot cause a disconnect now, only a short interruption in traffic. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143037.ec7ccc45903e.Ife17d55c7ecbf98060f9c52889f3c8ba48798970@changeid Signed-off-by: Johannes Berg commit dc494fdc1f0657b4786d4f556b0462fe5198506b Author: Johannes Berg Date: Wed Jun 12 14:28:35 2024 +0200 wifi: mac80211: refactor CSA queue block/unblock This code is duplicated many times, refactor it into new separate functions. Reviewed-by: Miriam Rachel Korenblit Link: https://patch.msgid.link/20240612143037.1ad22f10392d.If21490c2c67aae28f3c54038363181ee920ce3d1@changeid Signed-off-by: Johannes Berg commit f1ab099d6591a353899a2ee09c89de0fc908e2d2 Author: Jerome Brunet Date: Tue Jun 25 16:50:15 2024 +0200 arm64: dts: amlogic: add power domain to hdmitx HDMI Tx needs HDMI Tx memory power domain turned on. This power domain is handled under the VPU power domain. The HDMI Tx currently works because it is enabling the PD by directly poking the power controller register. It is should not do that but properly use the power domain controller. Fix this by adding the power domain to HDMI Tx. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240625145017.1003346-3-jbrunet@baylibre.com Signed-off-by: Neil Armstrong commit c19f15b1e056a1ab896d54909f75febf70d98be6 Author: Jerome Brunet Date: Tue Jun 25 16:50:14 2024 +0200 dt-bindings: display: meson-dw-hdmi: add missing power-domain All Amlogic instances of the Synopsys HDMI controller need a power domain enabled. This is currently missing because the Amlogic HDMI driver directly pokes the power domain controller registers, which it should not do. Instead The HDMI controller should use the power controller. Fix the bindings accordingly. Signed-off-by: Jerome Brunet Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240625145017.1003346-2-jbrunet@baylibre.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240625145017.1003346-2-jbrunet@baylibre.com commit a047b66c0f05c668b4a6d41a3cacfe707efc9ecb Author: Laurent Pinchart Date: Thu Jun 20 01:53:43 2024 +0300 media: v4l: subdev: Fix typo in documentation Replace the incorrect reference to the v4l2_subdev_enable_stream() function with the correct v4l2_subdev_enable_streams() spelling. Fixes: d0749adb3070 ("media: v4l2-subdev: Add subdev .(enable|disable)_streams() operations") Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20240619225343.15873-1-laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart commit fea074e97886b7ee2fe04a17bd60fd41723da1b7 Author: Kory Maincent Date: Thu Jun 20 12:25:43 2024 +0200 media: i2c: Kconfig: Fix missing firmware upload config select FW_LOADER config only selects the firmware loader API, but we also need the sysfs_upload symbols for firmware_upload_unregister() and firmware_upload_register() to function properly. Fixes: 7a52ab415b43 ("media: i2c: Add driver for THine THP7312") Cc: stable@vger.kernel.org Signed-off-by: Kory Maincent Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Link: https://lore.kernel.org/r/20240620102544.1918105-1-kory.maincent@bootlin.com Signed-off-by: Laurent Pinchart commit 57e9ce68ae98551da9c161aaab12b41fe8601856 Author: Harshit Mogalapalli Date: Tue May 14 02:50:38 2024 -0700 media: imx-pxp: Fix ERR_PTR dereference in pxp_probe() devm_regmap_init_mmio() can fail, add a check and bail out in case of error. Fixes: 4e5bd3fdbeb3 ("media: imx-pxp: convert to regmap") Cc: stable@vger.kernel.org Signed-off-by: Harshit Mogalapalli Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240514095038.3464191-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Laurent Pinchart commit e3943f00afdb71684c4f209f9d3a90d6b79771fc Author: Ulf Hansson Date: Wed Jun 19 16:08:46 2024 +0200 OPP: Introduce an OF helper function to inform if required-opps is used As being shown from a subsequent change to genpd, it's useful to understand if a device's OF node has an OPP-table described and whether it contains OPP nodes that makes use of the required-opps DT property. For this reason, let's introduce an OPP OF helper function called dev_pm_opp_of_has_required_opp(). Signed-off-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 66d83a42f2a3f545c347a9612e9af39cc3804e9d Author: Caleb Connolly Date: Mon Jun 24 14:08:36 2024 +0200 arm64: dts: qcom: sm6115: add resets for sdhc_1 These are documented and supported everywhere, but not described in DT. Add them. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240624120849.2550621-2-caleb.connolly@linaro.org Signed-off-by: Bjorn Andersson commit 653f0a1e7d6123e2d6f1f9366f6093aa9b908229 Author: Sibi Sankar Date: Mon Jun 24 15:32:14 2024 +0530 arm64: dts: qcom: x1e80100: Add fastrpc nodes Add fastrpc nodes for ADSP and CDSP on X1E80100 SoC. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20240624100214.189991-1-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 740bc66960527754d4980e649953fb8ccecf67e5 Author: Sibi Sankar Date: Mon Jun 24 14:52:14 2024 +0530 arm64: dts: qcom: x1e80100: Add BWMONs Add the CPU and LLCC BWMONs on X1E80100 SoCs. Tested-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20240624092214.146935-5-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit dc18836435e7f8dda019db2c618c69194933157f Author: Sibi Sankar Date: Mon Jun 24 14:52:13 2024 +0530 soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances The multiple BWMONv4 instances available on the X1E80100 SoC use the same interrupt number. Mark them are shared to allow for re-use across instances. Using IRQF_SHARED coupled with devm_request_threaded_irq implies that the irq can still trigger during/after bwmon_remove due to other active bwmon instances. Handle this race by relying on bwmon_disable to disable the interrupt and coupled with explicit request/free irqs. Signed-off-by: Sibi Sankar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240624092214.146935-4-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 530c66142ec4871f71cf1d19e101426bd53e42dd Author: Sibi Sankar Date: Mon Jun 24 14:52:12 2024 +0530 dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instances Document X1E80100 BWMONs, which has multiple (one per cluster) BWMONv4 instances for the CPU->LLCC path and one BWMONv5 instance for LLCC->DDR path. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sibi Sankar Acked-by: Georgi Djakov Link: https://lore.kernel.org/r/20240624092214.146935-3-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit f92e224e7aa22626c24d5c5292a1540d37f1db01 Author: Sibi Sankar Date: Mon Jun 24 14:52:11 2024 +0530 dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the required list Remove opp-table from the required list as the bindings shouldn't care where the OPP tables (referenced by the operating-points-v2 property) comes from. Suggested-by: Konrad Dybcio Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Acked-by: Georgi Djakov Link: https://lore.kernel.org/r/20240624092214.146935-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 5db216f6e1f85394e79dca74ceceb83b2f8566b5 Author: Chukun Pan Date: Thu Jun 20 23:01:22 2024 +0800 arm64: dts: qcom: ipq6018: add sdhci node Add node to support mmc controller inside of IPQ6018. This controller supports both eMMC and SD cards. Tested with: eMMC (HS200) SD Card (SDR50/SDR104) Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240620150122.1406631-3-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit f2743ae3ff84579981ac513f512b9df945d109c0 Author: Chukun Pan Date: Thu Jun 20 23:01:21 2024 +0800 clk: qcom: gcc-ipq6018: update sdcc max clock frequency The mmc controller of the IPQ6018 does not support HS400 mode. So adjust the maximum clock frequency of sdcc to 200 MHz (HS200). Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20240620150122.1406631-2-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit fed1c79fc7fe10900d99a79a36e40443f3267ef3 Author: André Apitzsch Date: Mon Jun 17 23:22:29 2024 +0200 ARM: dts: qcom: msm8926-motorola-peregrine: Add framebuffer supplies Add regulators used by the framebuffer of Motorola Moto G 4G (2013). Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240617-peregrine-v2-3-c8835d2da7af@apitzsch.eu Signed-off-by: Bjorn Andersson commit c9c86387ea1c4034fec34690c7cf2a96f9c21196 Author: André Apitzsch Date: Mon Jun 17 23:22:28 2024 +0200 ARM: dts: qcom: msm8926-motorola-peregrine: Update temperature sensor Add alert interrupt for the temperature sensor of Motorola Moto G 4G (2013), although not used by the driver yet. Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240617-peregrine-v2-2-c8835d2da7af@apitzsch.eu Signed-off-by: Bjorn Andersson commit 65ec35baeb937e91970c5d88118c5638d8582bb3 Author: André Apitzsch Date: Mon Jun 17 23:22:27 2024 +0200 ARM: dts: qcom: msm8926-motorola-peregrine: Add accelerometer, magnetometer, regulator Add the accelerometer, magnetometer and regulator that are present on the Motorola Moto G 4G (2013) device. Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240617-peregrine-v2-1-c8835d2da7af@apitzsch.eu Signed-off-by: Bjorn Andersson commit 2b5004956affaa6dd1d23d431876ad533f10418b Author: Odelu Kukatla Date: Fri Jun 7 23:09:27 2024 +0530 arm64: dts: qcom: sc7280: Add clocks for QOS configuration Add clocks which need to be enbaled for configuring QoS on sc7280. Signed-off-by: Odelu Kukatla Reviewed-by: Konrad Dybcio Acked-by: Georgi Djakov Link: https://lore.kernel.org/r/20240607173927.26321-5-quic_okukatla@quicinc.com Signed-off-by: Bjorn Andersson commit 0bdb730e63f6628b0f8deb3f11991b1d10f9bca5 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:39 2024 +0530 arm64: dts: qcom: sm8650: Add video and camera clock controllers Add device nodes for video and camera clock controllers on Qualcomm SM8650 platform. Signed-off-by: Jagadeesh Kona Reviewed-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240602114439.1611-9-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit e2ebc65958ef89ce4b03e730b9aea5023381fd51 Merge: b7a28d8a7b80d 09ea421652a83 Author: Bjorn Andersson Date: Tue Jun 25 18:09:48 2024 -0500 Merge branch '20240602114439.1611-1-quic_jkona@quicinc.com' into arm64-for-6.11 Merge the SM8650 video and clock controller drivers to gain access to the constants from the DeviceTree binding. commit 03675e398b30b544887836518a071a16c29204fd Merge: 211681998d706 09ea421652a83 Author: Bjorn Andersson Date: Tue Jun 25 18:06:44 2024 -0500 Merge branch '20240602114439.1611-1-quic_jkona@quicinc.com' into clk-for-6.11 Merge SM8650 video and camera clock drivers through topic branch, to make available the DeviceTree binding includes to the DeviceTree source branches as well. commit 09ea421652a832083ea380a72addf383965f3682 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:38 2024 +0530 clk: qcom: camcc-sm8650: Add SM8650 camera clock controller driver Add support for the camera clock controller for camera clients to be able to request for camcc clocks on SM8650 platform. Signed-off-by: Jagadeesh Kona Reviewed-by: Bryan O'Donoghue Reviewed-by: Dmitry Baryshkov Reviewed-by: Vladimir Zapolskiy Tested-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20240602114439.1611-8-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit ce84b7beeb524e7b20983838687862454ba54df7 Author: Raphael Gallais-Pou Date: Wed Jun 26 00:00:56 2024 +0200 cpufreq: sti: add missing MODULE_DEVICE_TABLE entry for stih418 'st,stih418' is missing in the compatible list. Add it in order to use the driver with stih418 platform. Signed-off-by: Raphael Gallais-Pou Signed-off-by: Viresh Kumar commit 50b70845fc5c22cf7e7d25b57d57b3dca1725aa5 Merge: c0c68e4d52ed7 3082412242247 Author: Jakub Kicinski Date: Tue Jun 25 18:44:21 2024 -0700 Merge branch 'add-ethernet-driver-for-tehuti-networks-tn40xx-chips' FUJITA Tomonori says: ==================== add ethernet driver for Tehuti Networks TN40xx chips This patchset adds a new 10G ethernet driver for Tehuti Networks TN40xx chips. Note in mainline, there is a driver for Tehuti Networks (drivers/net/ethernet/tehuti/tehuti.[hc]), which supports TN30xx chips. Multiple vendors (DLink, Asus, Edimax, QNAP, etc) developed adapters based on TN40xx chips. Tehuti Networks went out of business but the drivers are still distributed under GPL2 with some of the hardware (and also available on some sites). With some changes, I try to upstream this driver with a new PHY driver in Rust. The major change is replacing the PHY abstraction layer in the original driver with phylink. TN40xx chips are used with various PHY hardware (AMCC QT2025, TI TLK10232, Aqrate AQR105, and Marvell MV88X3120, MV88X3310, and MV88E2010). I've also been working on a new PHY driver for QT2025 in Rust [1]. For now, I enable only adapters using QT2025 PHY in the PCI ID table of this driver. I've tested this driver and the QT2025 PHY driver with Edimax EN-9320 10G adapter and 10G-SR SFP+. In mainline, there are PHY drivers for AQR105 and Marvell PHYs, which could work for some TN40xx adapters with this driver. To make reviewing easier, this patchset has only basic functions. Once merged, I'll submit features like ethtool support. v11: https://lore.kernel.org/netdev/20240618051608.95208-7-fujita.tomonori@gmail.com/ v10: https://lore.kernel.org/netdev/20240611045217.78529-7-fujita.tomonori@gmail.com/ v9: https://lore.kernel.org/netdev/20240605232608.65471-1-fujita.tomonori@gmail.com/ v8: https://lore.kernel.org/netdev/20240603064955.58327-1-fujita.tomonori@gmail.com/ v7: https://lore.kernel.org/netdev/20240527203928.38206-7-fujita.tomonori@gmail.com/ v6: https://lore.kernel.org/netdev/20240512085611.79747-2-fujita.tomonori@gmail.com/ v5: https://lore.kernel.org/netdev/20240508113947.68530-1-fujita.tomonori@gmail.com/ v4: https://lore.kernel.org/netdev/20240501230552.53185-1-fujita.tomonori@gmail.com/ v3: https://lore.kernel.org/netdev/20240429043827.44407-1-fujita.tomonori@gmail.com/ v2: https://lore.kernel.org/netdev/20240425010354.32605-1-fujita.tomonori@gmail.com/ v1: https://lore.kernel.org/netdev/20240415104352.4685-1-fujita.tomonori@gmail.com/ [1] https://lore.kernel.org/netdev/20240415104701.4772-1-fujita.tomonori@gmail.com/ ==================== Link: https://patch.msgid.link/20240623235507.108147-1-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit 30824122422476bede5d8a25ed25bf7b720dc193 Author: FUJITA Tomonori Date: Mon Jun 24 08:55:07 2024 +0900 net: tn40xx: add phylink support This patch adds supports for multiple PHY hardware with phylink. The adapters with TN40xx chips use multiple PHY hardware; AMCC QT2025, TI TLK10232, Aqrate AQR105, and Marvell 88X3120, 88X3310, and MV88E2010. For now, the PCI ID table of this driver enables adapters using only QT2025 PHY. I've tested this driver and the QT2025 PHY driver (SFP+ 10G SR) with Edimax EN-9320 10G adapter. Signed-off-by: FUJITA Tomonori Reviewed-by: Hans-Frieder Vogt Reviewed-by: Russell King (Oracle) Link: https://patch.msgid.link/20240623235507.108147-8-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit 7fdbd2f2bb5dc33c50604ea66eb8ae16247cc518 Author: FUJITA Tomonori Date: Mon Jun 24 08:55:06 2024 +0900 net: tn40xx: add mdio bus support This patch adds supports for mdio bus. A later path adds PHYLIB support on the top of this. Signed-off-by: FUJITA Tomonori Link: https://patch.msgid.link/20240623235507.108147-7-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit 37c4947af44d51358cb03262c8e6eeac4a1cd642 Author: FUJITA Tomonori Date: Mon Jun 24 08:55:05 2024 +0900 net: tn40xx: add basic Rx handling This patch adds basic Rx handling. The Rx logic uses three major data structures; two ring buffers with NIC and one database. One ring buffer is used to send information to NIC about memory to be stored packets to be received. The other is used to get information from NIC about received packets. The database is used to keep the information about DMA mapping. After a packet arrived, the db is used to pass the packet to the network stack. Signed-off-by: FUJITA Tomonori Reviewed-by: Hans-Frieder Vogt Link: https://patch.msgid.link/20240623235507.108147-6-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit dd2a0ff554082f6972b6cc6ea8f9d67e123e054e Author: FUJITA Tomonori Date: Mon Jun 24 08:55:04 2024 +0900 net: tn40xx: add basic Tx handling This patch adds device specific structures to initialize the hardware with basic Tx handling. The original driver loads the embedded firmware in the header file. This driver is implemented to use the firmware APIs. The Tx logic uses three major data structures; two ring buffers with NIC and one database. One ring buffer is used to send information about packets to be sent for NIC. The other is used to get information from NIC about packet that are sent. The database is used to keep the information about DMA mapping. After a packet is sent, the db is used to free the resource used for the packet. Signed-off-by: FUJITA Tomonori Link: https://patch.msgid.link/20240623235507.108147-5-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit ffa28c748b388b8afaf658df15a6a1ed6d310663 Author: FUJITA Tomonori Date: Mon Jun 24 08:55:03 2024 +0900 net: tn40xx: add register defines This adds several defines to handle registers in Tehuti Networks TN40xx chips for later patches. Signed-off-by: FUJITA Tomonori Reviewed-by: Hans-Frieder Vogt Link: https://patch.msgid.link/20240623235507.108147-4-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit ab61adc60001c83c3130107ca25737addf42fd6f Author: FUJITA Tomonori Date: Mon Jun 24 08:55:02 2024 +0900 net: tn40xx: add pci driver for Tehuti Networks TN40xx chips This just adds the scaffolding for an ethernet driver for Tehuti Networks TN40xx chips. Signed-off-by: FUJITA Tomonori Reviewed-by: Jakub Kicinski Link: https://patch.msgid.link/20240623235507.108147-3-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit eee5528890d54b22b46f833002355a5ee94c3bb4 Author: FUJITA Tomonori Date: Mon Jun 24 08:55:01 2024 +0900 PCI: Add Edimax Vendor ID to pci_ids.h Add the Edimax Vendor ID (0x1432) for an ethernet driver for Tehuti Networks TN40xx chips. This ID can be used for Realtek 8180 and Ralink rt28xx wireless drivers. Signed-off-by: FUJITA Tomonori Acked-by: Bjorn Helgaas Link: https://patch.msgid.link/20240623235507.108147-2-fujita.tomonori@gmail.com Signed-off-by: Jakub Kicinski commit d65f3767de20782e75d8a665fdc54f822f344802 Author: Leon Hwang Date: Tue Jun 25 22:53:51 2024 +0800 bpf: Fix tailcall cases in test_bpf Since f663a03c8e35 ("bpf, x64: Remove tail call detection"), tail_call_reachable won't be detected in x86 JIT. And, tail_call_reachable is provided by verifier. Therefore, in test_bpf, the tail_call_reachable must be provided in test cases before running. Fix and test: [ 174.828662] test_bpf: #0 Tail call leaf jited:1 170 PASS [ 174.829574] test_bpf: #1 Tail call 2 jited:1 244 PASS [ 174.830363] test_bpf: #2 Tail call 3 jited:1 296 PASS [ 174.830924] test_bpf: #3 Tail call 4 jited:1 719 PASS [ 174.831863] test_bpf: #4 Tail call load/store leaf jited:1 197 PASS [ 174.832240] test_bpf: #5 Tail call load/store jited:1 326 PASS [ 174.832240] test_bpf: #6 Tail call error path, max count reached jited:1 2214 PASS [ 174.835713] test_bpf: #7 Tail call count preserved across function calls jited:1 609751 PASS [ 175.446098] test_bpf: #8 Tail call error path, NULL target jited:1 472 PASS [ 175.447597] test_bpf: #9 Tail call error path, index out of range jited:1 206 PASS [ 175.448833] test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202406251415.c51865bc-oliver.sang@intel.com Fixes: f663a03c8e35 ("bpf, x64: Remove tail call detection") Signed-off-by: Leon Hwang Link: https://lore.kernel.org/r/20240625145351.40072-1-hffilwlqm@gmail.com Signed-off-by: Alexei Starovoitov commit c0c68e4d52ed7fdecec7dab05cd5b8540ce4813e Author: Chris Packham Date: Tue Jun 25 09:18:57 2024 +1200 dt-bindings: net: dsa: mediatek,mt7530: Minor wording fixes Update the mt7530 binding with some minor updates that make the document easier to read. Signed-off-by: Chris Packham Acked-by: Arınç ÜNAL Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://patch.msgid.link/20240624211858.1990601-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit a425a973e9ceb13914ab5a790f8f22b10f3d6612 Merge: 63173885ccb25 6f3bc487565d3 Author: Jakub Kicinski Date: Tue Jun 25 17:48:35 2024 -0700 Merge branch 'gve-add-flow-steering-support' Ziwei Xiao says: ==================== gve: Add flow steering support To support flow steering in GVE driver, there are two adminq changes need to be made in advance. The first one is adding adminq mutex lock, which is to allow the incoming flow steering operations to be able to temporarily drop the rtnl_lock to reduce the latency for registering flow rules among several NICs at the same time. This could be achieved by the future changes to reduce the drivers' dependencies on the rtnl lock for particular ethtool ops. The second one is to add the extended adminq command so that we can support larger adminq command such as configure_flow_rule command. In that patch, there is a new added function called gve_adminq_execute_extended_cmd with the attribute of __maybe_unused. That attribute will be removed in the third patch of this series where it will use the previously unused function. And the other three patches are needed for the actual flow steering feature support in driver. ==================== Link: https://patch.msgid.link/20240625001232.1476315-1-ziweixiao@google.com Signed-off-by: Jakub Kicinski commit 6f3bc487565d30ae9535e338efad213dd74c04ec Author: Jeroen de Borst Date: Tue Jun 25 00:12:31 2024 +0000 gve: Add flow steering ethtool support Implement the ethtool commands that can be used to configure and query flow-steering rules. A large part of this change consists of translating the ethtool representation of 'ntuples' to our internal gve_flow_rule and vice-versa in the new created gve_flow_rule.c Considering the possible large amount of flow rules, the driver doesn't store all the rules locally. When the user runs 'ethtool -n ' to check the registered rules, the driver will send adminq command to query a limited amount of rules/rule ids(that filled in a 4096 bytes dma memory) at a time as a cache for the ethtool queries. The adminq query commands will be repeated for several times until the ethtool has queried all the needed rules. Signed-off-by: Jeroen de Borst Co-developed-by: Ziwei Xiao Signed-off-by: Ziwei Xiao Reviewed-by: Praveen Kaligineedi Reviewed-by: Harshitha Ramamurthy Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240625001232.1476315-6-ziweixiao@google.com Signed-off-by: Jakub Kicinski commit 57718b60df9b67366291d1e4ce3e5dde7a7cf5a5 Author: Jeroen de Borst Date: Tue Jun 25 00:12:30 2024 +0000 gve: Add flow steering adminq commands Add new adminq commands for the driver to configure and query flow rules that are stored in the device. Flow steering rules are assigned with a location that determines the relative order of the rules. Flow rules can run up to an order of millions. In such cases, storing a full copy of the rules in the driver to prepare for the ethtool query is infeasible while querying them from the device is better. That needs to be optimized too so that we don't send a lot of adminq commands. The solution here is to store a limited number of rules/rule ids in the driver in a cache. Use dma_pool to allocate 4k bytes which lets device write at most 46 flow rules(4096/88) or 1024 rule ids(4096/4) at a time. For configuring flow rules, there are 3 sub-commands: - ADD which adds a rule at the location supplied - DEL which deletes the rule at the location supplied - RESET which clears all currently active rules in the device For querying flow rules, there are also 3 sub-commands: - QUERY_RULES corresponds to ETHTOOL_GRXCLSRULE. It fills the rules in the allocated cache after querying the device - QUERY_RULES_IDS corresponds to ETHTOOL_GRXCLSRLALL. It fills the rule_ids in the allocated cache after querying the device - QUERY_RULES_STATS corresponds to ETHTOOL_GRXCLSRLCNT. It queries the device's current flow rule number and the supported max flow rule limit Signed-off-by: Jeroen de Borst Co-developed-by: Ziwei Xiao Signed-off-by: Ziwei Xiao Reviewed-by: Praveen Kaligineedi Reviewed-by: Harshitha Ramamurthy Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240625001232.1476315-5-ziweixiao@google.com Signed-off-by: Jakub Kicinski commit 3519c00557e0725906384c42e9f490d311c7b93f Author: Jeroen de Borst Date: Tue Jun 25 00:12:29 2024 +0000 gve: Add flow steering device option Add a new device option to signal to the driver that the device supports flow steering. This device option also carries the maximum number of flow steering rules that the device can store. Signed-off-by: Jeroen de Borst Co-developed-by: Ziwei Xiao Signed-off-by: Ziwei Xiao Reviewed-by: Praveen Kaligineedi Reviewed-by: Harshitha Ramamurthy Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240625001232.1476315-4-ziweixiao@google.com Signed-off-by: Jakub Kicinski commit fcfe6318dbac45e6c3c5c7a40f5dd5c08600a5e9 Author: Jeroen de Borst Date: Tue Jun 25 00:12:28 2024 +0000 gve: Add adminq extended command The adminq command is limited to 64 bytes per entry and it's 56 bytes for the command itself at maximum. To support larger commands, we need to dma_alloc a separate memory to put the command in that memory and send the dma memory address instead of the actual command. Introduce an extended adminq command to wrap the real command with the inner opcode and the allocated dma memory address specified. Once the device receives it, it can get the real command from the given dma memory address. As designed with the device, all the extended commands will use inner opcode larger than 0xFF. Signed-off-by: Jeroen de Borst Co-developed-by: Ziwei Xiao Signed-off-by: Ziwei Xiao Reviewed-by: Praveen Kaligineedi Reviewed-by: Harshitha Ramamurthy Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240625001232.1476315-3-ziweixiao@google.com Signed-off-by: Jakub Kicinski commit 1108566ca509e67aa8abfbf914b1cd31e9ff51f8 Author: Ziwei Xiao Date: Tue Jun 25 00:12:27 2024 +0000 gve: Add adminq mutex lock We were depending on the rtnl_lock to make sure there is only one adminq command running at a time. But some commands may take too long to hold the rtnl_lock, such as the upcoming flow steering operations. For such situations, it can temporarily drop the rtnl_lock, and replace it for these operations with a new adminq lock, which can ensure the adminq command execution to be thread-safe. Signed-off-by: Ziwei Xiao Reviewed-by: Praveen Kaligineedi Reviewed-by: Harshitha Ramamurthy Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240625001232.1476315-2-ziweixiao@google.com Signed-off-by: Jakub Kicinski commit 63173885ccb253ff76e1da5cb148d1ca4b69a019 Merge: c84f93243e542 dcb67f6a9ead6 Author: Jakub Kicinski Date: Tue Jun 25 17:15:10 2024 -0700 Merge branch 'ethtool-provide-the-dim-profile-fine-tuning-channel' Heng Qi says: ==================== ethtool: provide the dim profile fine-tuning channel The NetDIM library provides excellent acceleration for many modern network cards. However, the default profiles of DIM limits its maximum capabilities for different NICs, so providing a way which the NIC can be custom configured is necessary. Currently, the way is based on the commonly used "ethtool -C". For example, on the server side, the virtio-net NIC with rx dim enabled has 8 queues and runs nginx. The client uses the following command to send traffic to the server: ./wrk http://server_ip:80 -c 64 -t 5 -d 30 Then adjust the default rx-profile for server dim to {.usec = 1, .pkts = 256, .comps = n/a,}, {.usec = 8, .pkts = 256, .comps = n/a,}, {.usec = 30, .pkts = 256, .comps = n/a,}, {.usec = 64, .pkts = 256, .comps = n/a,}, {.usec = 128, .pkts = 256, .comps = n/a,} The server PPS is improved by 20%+. ==================== Link: https://patch.msgid.link/20240621101353.107425-1-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit dcb67f6a9ead650360a60009ba8a68be385c2bde Author: Heng Qi Date: Fri Jun 21 18:13:53 2024 +0800 virtio-net: support dim profile fine-tuning Virtio-net has different types of back-end device implementations. In order to effectively optimize the dim library's gains for different device implementations, let's use the new interface params to initialize and query dim results from a customized profile list. Signed-off-by: Heng Qi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240621101353.107425-6-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 13ba28c5cd047e272f9dbbeb5c62c403873d8987 Author: Heng Qi Date: Fri Jun 21 18:13:52 2024 +0800 dim: add new interfaces for initialization and getting results DIM-related mode and work have been collected in one same place, so new interfaces are added to provide convenience. Signed-off-by: Heng Qi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240621101353.107425-5-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit f750dfe825b904164688adeb147950e0e0c4d262 Author: Heng Qi Date: Fri Jun 21 18:13:51 2024 +0800 ethtool: provide customized dim profile management The NetDIM library, currently leveraged by an array of NICs, delivers excellent acceleration benefits. Nevertheless, NICs vary significantly in their dim profile list prerequisites. Specifically, virtio-net backends may present diverse sw or hw device implementation, making a one-size-fits-all parameter list impractical. On Alibaba Cloud, the virtio DPU's performance under the default DIM profile falls short of expectations, partly due to a mismatch in parameter configuration. I also noticed that ice/idpf/ena and other NICs have customized profilelist or placed some restrictions on dim capabilities. Motivated by this, I tried adding new params for "ethtool -C" that provides a per-device control to modify and access a device's interrupt parameters. Usage ======== The target NIC is named ethx. Assume that ethx only declares support for rx profile setting (with DIM_PROFILE_RX flag set in profile_flags) and supports modification of usec and pkt fields. 1. Query the currently customized list of the device $ ethtool -c ethx ... rx-profile: {.usec = 1, .pkts = 256, .comps = n/a,}, {.usec = 8, .pkts = 256, .comps = n/a,}, {.usec = 64, .pkts = 256, .comps = n/a,}, {.usec = 128, .pkts = 256, .comps = n/a,}, {.usec = 256, .pkts = 256, .comps = n/a,} tx-profile: n/a 2. Tune $ ethtool -C ethx rx-profile 1,1,n_2,n,n_3,3,n_4,4,n_n,5,n "n" means do not modify this field. $ ethtool -c ethx ... rx-profile: {.usec = 1, .pkts = 1, .comps = n/a,}, {.usec = 2, .pkts = 256, .comps = n/a,}, {.usec = 3, .pkts = 3, .comps = n/a,}, {.usec = 4, .pkts = 4, .comps = n/a,}, {.usec = 256, .pkts = 5, .comps = n/a,} tx-profile: n/a 3. Hint If the device does not support some type of customized dim profiles, the corresponding "n/a" will display. If the "n/a" field is being modified, -EOPNOTSUPP will be reported. Signed-off-by: Heng Qi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240621101353.107425-4-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit b65e697a7c9e0ae28a6255257d8b9b3271960426 Author: Heng Qi Date: Fri Jun 21 18:13:50 2024 +0800 dim: make DIMLIB dependent on NET DIMLIB's capabilities are supplied by the dim, net_dim, and rdma_dim objects, and dim's interfaces solely act as a base for net_dim and rdma_dim and are not explicitly used anywhere else. rdma_dim is utilized by the infiniband driver, while net_dim is for network devices, excluding the soc/fsl driver. In this patch, net_dim relies on some NET's interfaces, thus DIMLIB needs to explicitly depend on the NET Kconfig. The soc/fsl driver uses the functions provided by net_dim, so it also needs to depend on NET. Signed-off-by: Heng Qi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240621101353.107425-3-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 0e942053e4dc42a760f48c1981f3239825430f15 Author: Heng Qi Date: Fri Jun 21 18:13:49 2024 +0800 linux/dim: move useful macros to .h file Useful macros will be used effectively elsewhere. These will be utilized in subsequent patches. Signed-off-by: Heng Qi Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240621101353.107425-2-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit c84f93243e5420547f720df1bcb701ceead31d5b Merge: d891317fe4fbe 6e0713cc82068 Author: Jakub Kicinski Date: Tue Jun 25 17:07:06 2024 -0700 Merge branch 'ravb-add-mii-support-for-r-car-v4m' Geert Uytterhoeven says: ==================== ravb: Add MII support for R-Car V4M All EtherAVB instances on R-Car Gen3/Gen4 SoCs support the RGMII interface. In addition, the first two EtherAVB instances on R-Car V4M also support the MII interface, but this is not yet supported by the driver. This patch series adds support for MII on R-Car Gen4, after the customary cleanup. The corresponding pin control support is available in [1]. Compile-tested only, as all AVB interfaces on the Gray Hawk Single development board are connected to RGMII PHYs. No regressions on R-Car V4H. [1] "[PATCH/RFC] pinctrl: renesas: r8a779h0: Add AVB MII pins and groups" https://lore.kernel.org/4a0a12227f2145ef53b18bc08f45b19dcd745fc6.1718378739.git.geert+renesas@glider.be/ v1: https://lore.kernel.org/f0ef3e00aec461beb33869ab69ccb44a23d78f51.1718378166.git.geert+renesas@glider.be ==================== Link: https://patch.msgid.link/cover.1719234830.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit 6e0713cc820688deab490edd242f0bfec489738a Author: Geert Uytterhoeven Date: Mon Jun 24 15:25:25 2024 +0200 ravb: Add MII support for R-Car V4M All EtherAVB instances on R-Car Gen3/Gen4 SoCs support the RGMII interface. In addition, the first two EtherAVB instances on R-Car V4M also support the MII interface, but this is not yet supported by the driver. Add support for MII on R-Car Gen4 by adding an R-Car Gen4-specific EMAC initialization function that selects the MII clock instead of the RGMII clock when the PHY interface is MII. Note that all implementations of EtherAVB on R-Car Gen4 SoCs have the APSR register, but only MII-capable instances are documented to have the MIISELECT bit, which has a documented value of zero when reserved. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Sergey Shtylyov Link: https://patch.msgid.link/3a21d1d6680864aa85afff9260234c2b8054020a.1719234830.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit 8d653d26ffc7cbc80335ea74f498237c5709cdfa Author: Geert Uytterhoeven Date: Mon Jun 24 15:25:24 2024 +0200 ravb: Improve ravb_hw_info instance order Move ravb_gen2_hw_info before ravb_gen3_hw_info to match ravb_match_table[] order. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Sergey Shtylyov Link: https://patch.msgid.link/a76febe3737e26365a784e9193da9363f22aa550.1719234830.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit d891317fe4fbe5a85522dccb66d3a159915d7983 Author: Li RongQing Date: Fri Jun 21 17:45:52 2024 +0800 virtio_net: Remove u64_stats_update_begin()/end() for stats fetch This place is fetching the stats, u64_stats_update_begin()/end() should not be used, and the fetcher of stats is in the same context as the updater of the stats, so don't need any protection Suggested-by: Jakub Kicinski Acked-by: Michael S. Tsirkin Signed-off-by: Li RongQing Link: https://lore.kernel.org/20240621094552.53469-1-lirongqing@baidu.com Signed-off-by: Jakub Kicinski commit 1ae3f0578e0e623e774db45870c0e34c47d8dd15 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:37 2024 +0530 dt-bindings: clock: qcom: Add SM8650 camera clock controller Add device tree bindings for the camera clock controller on Qualcomm SM8650 platform. Signed-off-by: Jagadeesh Kona Reviewed-by: Krzysztof Kozlowski Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20240602114439.1611-7-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit 2bce2ce7ab20f85a33c3e45cb57fe8e400d4f2b0 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:36 2024 +0530 dt-bindings: clock: qcom: Update the order of SC8280XP camcc header Update the order of SC8280XP camcc header file in SM8450 camcc bindings. Signed-off-by: Jagadeesh Kona Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20240602114439.1611-6-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit da1f361c887c17e34a8c440690a5b3f347802ff7 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:35 2024 +0530 clk: qcom: videocc-sm8550: Add SM8650 video clock controller Add support to the SM8650 video clock controller by extending the SM8550 video clock controller, which is mostly identical but SM8650 has few additional clocks and minor differences. Signed-off-by: Jagadeesh Kona Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240602114439.1611-5-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit 6e18795a6acfd04cec3af23680e9051237d4fa94 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:34 2024 +0530 clk: qcom: videocc-sm8550: Add support for videocc XO clk ares Add support for videocc XO clk ares for consumer drivers to be able to request this reset. Fixes: f53153a37969 ("clk: qcom: videocc-sm8550: Add video clock controller driver for SM8550") Signed-off-by: Jagadeesh Kona Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240602114439.1611-4-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit a6a61b9701d1add3bb6d86d8e259d833ea91a1a6 Author: Jagadeesh Kona Date: Sun Jun 2 17:14:33 2024 +0530 dt-bindings: clock: qcom: Add SM8650 video clock controller SM8650 video clock controller has most clocks same as SM8450, but it also has few additional clocks and resets. Add device tree bindings for the video clock controller on Qualcomm SM8650 platform by defining these additional clocks and resets on top of SM8450. Signed-off-by: Jagadeesh Kona Reviewed-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Reviewed-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20240602114439.1611-3-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit 213e1b58475096e234abf6772183d23513782b5f Author: Jagadeesh Kona Date: Sun Jun 2 17:14:32 2024 +0530 dt-bindings: clock: qcom: Update SM8450 videocc header file name Correct the videocc header file name in SM8450 videocc bindings. Fixes: 1e910b2ba0ed ("dt-bindings: clock: qcom: Add SM8450 video clock controller") Signed-off-by: Jagadeesh Kona Reviewed-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240602114439.1611-2-quic_jkona@quicinc.com Signed-off-by: Bjorn Andersson commit b7a28d8a7b80dd5630a72d8d8cb9f2d1bde6a1ad Author: Dmitry Baryshkov Date: Tue Jun 25 23:16:18 2024 +0300 arm64: dts: qcom: pm8916: add temp-alarm thermal zone Define the themal zones using the temperature values in stage1 for this platform so that the spmi-temp-alarm driver becomes active. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20240625-pm8916-tz-v1-1-a4c1f61e92dd@linaro.org Signed-off-by: Bjorn Andersson commit e29630247be24c3987e2b048f8e152771b32d38b Author: Pablo Neira Ayuso Date: Mon Jun 3 20:16:59 2024 +0200 netfilter: nf_tables: rise cap on SELinux secmark context secmark context is artificially limited 256 bytes, rise it to 4Kbytes. Fixes: fb961945457f ("netfilter: nf_tables: add SECMARK support") Signed-off-by: Pablo Neira Ayuso commit fe87a8deaad46c9a45381624f7e5f2f4fd145721 Author: Lin Ma Date: Fri May 31 09:28:47 2024 +0800 netfilter: cttimeout: remove 'l3num' attr check After commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used any more in function cttimeout_default_set. However, the previous commit ea9cf2a55a7b ("netfilter: cttimeout: remove set but not used variable 'l3num'") forgot to remove the attribute present check when removing the related variable. This commit removes that check to ensure consistency. Signed-off-by: Lin Ma Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 0b88d1654d556264bcd24a9cb6383f0888e30131 Author: Yunjian Wang Date: Fri May 31 11:48:47 2024 +0800 netfilter: nf_conncount: fix wrong variable type Now there is a issue is that code checks reports a warning: implicit narrowing conversion from type 'unsigned int' to small type 'u8' (the 'keylen' variable). Fix it by removing the 'keylen' variable. Signed-off-by: Yunjian Wang Signed-off-by: Pablo Neira Ayuso commit 53796b03295cf7ab1fc8600016fa6dfbf4a494a0 Author: Ismael Luceno Date: Thu May 23 18:54:44 2024 +0200 ipvs: Avoid unnecessary calls to skb_is_gso_sctp In the context of the SCTP SNAT/DNAT handler, these calls can only return true. Fixes: e10d3ba4d434 ("ipvs: Fix checksumming on GSO of SCTP packets") Signed-off-by: Ismael Luceno Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit ca567df74a28a9fb368c6b2d93e864113f73f5c2 Author: Christian Brauner Date: Sun Jun 7 22:47:08 2020 +0200 nsfs: add pid translation ioctls Add ioctl()s to translate pids between pid namespaces. LXCFS is a tiny fuse filesystem used to virtualize various aspects of procfs. LXCFS is run on the host. The files and directories it creates can be bind-mounted by e.g. a container at startup and mounted over the various procfs files the container wishes to have virtualized. When e.g. a read request for uptime is received, LXCFS will receive the pid of the reader. In order to virtualize the corresponding read, LXCFS needs to know the pid of the init process of the reader's pid namespace. In order to do this, LXCFS first needs to fork() two helper processes. The first helper process setns() to the readers pid namespace. The second helper process is needed to create a process that is a proper member of the pid namespace. The second helper process then creates a ucred message with ucred.pid set to 1 and sends it back to LXCFS. The kernel will translate the ucred.pid field to the corresponding pid number in LXCFS's pid namespace. This way LXCFS can learn the init pid number of the reader's pid namespace and can go on to virtualize. Since these two forks() are costly LXCFS maintains an init pid cache that caches a given pid for a fixed amount of time. The cache is pruned during new read requests. However, even with the cache the hit of the two forks() is singificant when a very large number of containers are running. With this simple patch we add an ns ioctl that let's a caller retrieve the init pid nr of a pid namespace through its pid namespace fd. This significantly improves performance with a very simple change. Support translation of pids and tgids. Other concepts can be added but there are no obvious users for this right now. To protect against races pidfds can be used to check whether the process is still valid. If needed, this can also be extended to work on pidfds directly. Link: https://lore.kernel.org/r/20240619-work-ns_ioctl-v1-1-7c0097e6bb6b@kernel.org Reviewed-by: Alexander Mikhalitsyn Signed-off-by: Christian Brauner commit 1e210f462b367ccf9589110f33e5350f53c7ec96 Merge: 399af57ccca2f 81bbb2b891174 Author: Rob Clark Date: Tue Jun 25 09:52:00 2024 -0700 Merge remote-tracking branch 'qcom/20240430-a750-raytracing-v3-2-7f57c5ac082d@gmail.com' into msm-next-robclark Merge qcom drivers to pick up dependency for SMEM based speedbin. Signed-off-by: Rob Clark commit a8cce1ad72caa8ed305b40dec7c075bbebd1c2f3 Author: Srinivas Kandagatla Date: Mon Jun 24 17:33:41 2024 +0100 arm64: dts: qcom: x1e80100-qcp: add audio support Add audio support to QCP platform which includes 2 x Speakers Headset Mic and Headset support. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240624-qcp-audio-v1-1-323a6b5e1fe5@linaro.org Signed-off-by: Bjorn Andersson commit 3341d69268accb5294b569ec37e55212a8a28ac5 Author: David Lechner Date: Fri Jun 21 17:11:57 2024 -0500 iio: dac: ad3552r: use devm_regulator_get_enable_read_voltage() Use devm_regulator_get_enable_read_voltage() to simplify the code. Error message is slightly changed since there is only one error return now. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-10-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit a4a9fc32f8156c7e1a9d6dddd20f19ca6acab452 Author: David Lechner Date: Fri Jun 21 17:11:56 2024 -0500 iio: adc: ti-ads8688: drop ads8688_remove() By using a few devm_ functions, we can simplify the driver and remove the ads8688_remove() function. spi_set_drvdata() is removed since there are no more callers of spi_get_drvdata(). Also use dev_err_probe() to simplify error return. Signed-off-by: David Lechner Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-9-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 2867ccf4a253fe8ac54f01907f896591335c52b4 Author: David Lechner Date: Fri Jun 21 17:11:55 2024 -0500 iio: adc: ti-ads8688: use devm_regulator_get_enable_read_voltage() Use devm_regulator_get_enable_read_voltage() to simplify the code. Signed-off-by: David Lechner Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-8-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 71c8bea4832e7e6e0bc04b0f4e98cac27adbe19a Author: David Lechner Date: Fri Jun 21 17:11:54 2024 -0500 iio: adc: ti-adc108s102: use devm_regulator_get_enable_read_voltage() Use devm_regulator_get_enable_read_voltage() to simplify the code. Signed-off-by: David Lechner Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-7-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 0817c9543c345acd56e95fdf37be112248fbfc3a Author: David Lechner Date: Fri Jun 21 17:11:53 2024 -0500 iio: adc: max1363: use devm_regulator_get_enable_read_voltage() Use devm_regulator_get_enable_read_voltage() to simplify the code. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-6-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 890582c2a496d71aab53b3ff39fba1fd05fe9230 Author: David Lechner Date: Fri Jun 21 17:11:52 2024 -0500 iio: adc: ltc2309: use devm_regulator_get_enable_read_voltage() Use devm_regulator_get_enable_read_voltage() to simplify the code. Error message is changed since there is only one error return now. LTC2309_INTERNAL_REF_MV macro is added to make the internal reference voltage value self-documenting. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-5-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 95e17a54e4eb63f722be70c6488cf377cae8afc6 Author: David Lechner Date: Fri Jun 21 17:11:51 2024 -0500 iio: adc: hx711: use dev_err_probe() Use dev_err_probe() to simplify error returns in the probe function. Signed-off-by: David Lechner Reviewed-by: Andreas Klinger Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-4-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit bfe339ee8e010aee2295be5b051673526581dd75 Author: David Lechner Date: Fri Jun 21 17:11:50 2024 -0500 iio: adc: hx711: remove hx711_remove() By using a few more devm_ functions, we can remove the hx711_remove() function in the hx711 driver. platform_set_drvdata() is also removed since there are no more callers of platform_get_drvdata(). Signed-off-by: David Lechner Reviewed-by: Andreas Klinger Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-3-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 0099e82b132e4fa619c45b47f2f83a823d81eaaa Author: David Lechner Date: Fri Jun 21 17:11:49 2024 -0500 iio: adc: hx711: use devm_regulator_get_enable_read_voltage() Use the devm_regulator_get_enable_read_voltage() helper to simplify the code. Signed-off-by: David Lechner Reviewed-by: Andreas Klinger Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-2-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit 9a36aa0f36ab17819d8cb0974f18f32d0fcef2e8 Author: David Lechner Date: Fri Jun 21 17:11:48 2024 -0500 iio: adc: aspeed_adc: use devm_regulator_get_enable_read_voltage() This makes use of the devm_regulator_get_enable_read_voltage() helper function to simplify the code. The error return is moved closer to the function call to make it easier to follow the logic. And a few blank lines are added for readability. Signed-off-by: David Lechner Reviewed-by: Andrew Jeffery Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-1-49e50cd0b99a@baylibre.com Signed-off-by: Jonathan Cameron commit bb78ad627659fc7a738356951999f2ba79e68059 Author: Nuno Sa Date: Tue Jun 18 15:32:12 2024 +0200 iio: imu: adis: remove legacy lock helpers Since all users were converted to the new cleanup based helper, adis_dev_lock() and adis_dev_unlock() can now be removed from the lib. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-9-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit ad62e8b6fd91007aa25a034c087eaee2a7c1c4c0 Author: Nuno Sa Date: Tue Jun 18 15:32:11 2024 +0200 iio: imu: adis16475: make use of the new lock helpers Use the new auto cleanup based locks so error paths are simpler. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-8-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit d6a60d76173d47d25a9b6d804b5bb28921a36b0f Author: Nuno Sa Date: Tue Jun 18 15:32:10 2024 +0200 iio: imu: adis16480: make use of the new lock helpers Use the new auto cleanup based locks so error paths are simpler. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-7-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit 9d9dae6ae8ab440835981b209ebe6ba8465b46a4 Author: Nuno Sa Date: Tue Jun 18 15:32:09 2024 +0200 iio: imu: adis16400: make use of the new lock helpers Use the new auto cleanup based locks so error paths are simpler. While at it, removed 'ret' from adis16400_write_raw() by doing return adis_write_reg_16(); instead of ret = adis_write_reg_16(); return ret; Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-6-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit 8d61d01cdec275719b70295e98e4d45c5f284f29 Author: Nuno Sa Date: Tue Jun 18 15:32:08 2024 +0200 iio: gyro: adis16260: make use of the new lock helpers Use the new auto cleanup based locks so error paths are simpler. While at it, reduce a bit the scope of the lock as we did not needed it protecting all the data in the switch() branch. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-5-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit ccd52641f9afad7cf66a667e7004ac08443bd5d6 Author: Nuno Sa Date: Tue Jun 18 15:32:07 2024 +0200 iio: gyro: adis16260: make use of the new lock helpers Use the new auto cleanup based locks so error paths are simpler. While at it, turned a sprintf() call into sysfs_emit(). Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-4-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit e6cab1ad9769a6b03dd1ba7ace106c36de85b1a8 Author: Nuno Sa Date: Tue Jun 18 15:32:06 2024 +0200 iio: imu: adis: add cleanup based lock helpers Add two new lock helpers that make use of the cleanup guard() and scoped_guard() macros. Thus, users won't have to worry about unlocking which is less prone to errors and allows for simpler error paths. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-3-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit d305b7f34ee11c4901b8da150b641bcffbd3e951 Author: Nuno Sa Date: Tue Jun 18 15:32:05 2024 +0200 iio: imu: adis: move to the cleanup magic This makes locking and handling error paths simpler. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-2-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit d80d4a3ce3aa3b0d8ac6966cb15f79d0c4a542e2 Author: Nuno Sa Date: Tue Jun 18 15:32:04 2024 +0200 iio: imu: adis_buffer: split trigger handling Split trigger handling for devices that have paging and need to select the correct page to get the data. Although this actually introduces more LOC, it makes the code and the locking clear. It will also make the following move to the cleanup magic cleaner. Signed-off-by: Nuno Sa Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-1-bd93ce7845c7@analog.com Signed-off-by: Jonathan Cameron commit 4aa60bd98e77be185e845e222897f082a49d4611 Author: Kaustabh Chakraborty Date: Sat Jun 22 18:03:46 2024 +0530 dt-bindings: iio: st-sensors: add LIS2DS12 accelerometer LIS2DS12 is an accelerometer by STMicroelectronics. It is identifiable by its WhoAmI value 0x43. Its register interface is not compatible with existing parts. For example: - The full-scale values are present in register 0x20, in bits 2 and 3 (mask 0x0c). Most other supported sensors have the register address set to 0x21, 0x23, 0x24, or 0x25. There is one sensor setting though (bearing WhoAmI 0x3b) which has it's address set to 0x20, but the mask is set to 0x20, not 0x0c. - The full-scale values 2G, 4G, 8G, and 16G correspond to the register values 0x00, 0x02, 0x03, 0x01 respectively. None of the sensor settings have the value 0x01 associated with 16G. Add the compatible string without any fallback. Signed-off-by: Kaustabh Chakraborty Link: https://patch.msgid.link/20240622123520.39253-2-kauschluss@disroot.org Signed-off-by: Jonathan Cameron commit f168a6db111b83a44552a0006326178b2c92bd7d Author: Kaustabh Chakraborty Date: Sat Jun 22 18:03:45 2024 +0530 iio: accel: st_accel: add support for LIS2DS12 Define sensor settings for LIS2DS12 by STMicroelectronics (WhoAmI 0x43) and add support in the I2C and SPI drivers. Datasheet: https://www.st.com/resource/en/datasheet/lis2ds12.pdf Signed-off-by: Kaustabh Chakraborty Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20240622123520.39253-1-kauschluss@disroot.org Signed-off-by: Jonathan Cameron commit a1a09713b40dfc1c0b7d1f9233a7698c93a9af05 Author: Antoniu Miclaus Date: Fri Jun 21 15:13:59 2024 +0300 iio: frequency: adf4350: add clk provider Add clk provider feature for the adf4350. Even though the driver was sent as an IIO driver in most cases the device is actually seen as a clock provider. This patch aims to cover actual usecases requested by users in order to completely control the output frequencies from userspace. Signed-off-by: Antoniu Miclaus Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240621121403.47912-2-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit 200b81f1c42b5d8b0d4f2005ca22bc3979f0bc3f Author: Antoniu Miclaus Date: Fri Jun 21 15:13:58 2024 +0300 dt-bindings: iio: adf4350: add clk provider prop Add properties required for providing clock to other consumers. Signed-off-by: Antoniu Miclaus Acked-by: Conor Dooley Link: https://patch.msgid.link/20240621121403.47912-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit a9306887eba41c5fe7232727a8147da3d3c4f83c Author: João Paulo Gonçalves Date: Mon Jun 17 20:39:05 2024 +0200 iio: adc: ti-ads1119: Add driver The ADS1119 is a precision, 16-bit, analog-to-digital converter (ADC) that features two differential or four single-ended inputs through a flexible input multiplexer (MUX), rail-to-rail input buffers, a programmable gain stage, a voltage reference, and an oscillator. Apart from normal single conversion, the driver also supports continuous conversion mode using a triggered buffer. However, in this mode only one channel can be scanned at a time. Datasheet: https://www.ti.com/lit/gpn/ads1119 Signed-off-by: João Paulo Gonçalves Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20240617183905.4685-1-francesco@dolcini.it Signed-off-by: Jonathan Cameron commit 54b0825fdfc96166e57f0a78b1a90b37baf1a2c6 Author: João Paulo Gonçalves Date: Mon Jun 17 20:32:14 2024 +0200 dt-bindings: iio: adc: add ti,ads1119 Add devicetree bindings for Texas Instruments ADS1119 16-bit ADC with I2C interface. Datasheet: https://www.ti.com/lit/gpn/ads1119 Signed-off-by: João Paulo Gonçalves Signed-off-by: Francesco Dolcini Reviewed-by: Conor Dooley Link: https://patch.msgid.link/20240617183215.4080-2-francesco@dolcini.it Signed-off-by: Jonathan Cameron commit d9b329a9712280968fb4ba6dac09fabde24bf566 Author: Trevor Gamblin Date: Mon Jun 17 11:18:19 2024 -0400 iio: dac: adi-axi-dac: improve probe() error messaging The current error handling for calls such as devm_clk_get_enabled() in the adi-axi-dac probe() function means that, if a property such as 'clocks' (for example) is not present in the devicetree when booting a kernel with the driver enabled, the resulting error message will be vague, e.g.: |adi_axi_dac 44a00000.dac: probe with driver adi_axi_dac failed with error -2 Change the devm_clk_get_enabled(), devm_regmap_init_mmio(), and devm_iio_backend_register() checks to use dev_err_probe() with some context for easier debugging. After the change: |adi_axi_dac 44a00000.dac: error -ENOENT: failed to get clock |adi_axi_dac 44a00000.dac: probe with driver adi_axi_dac failed with error -2 Suggested-by: Nuno Sa Tested-by: Angelo Dureghello Signed-off-by: Trevor Gamblin Link: https://patch.msgid.link/20240617151820.3337034-1-tgamblin@baylibre.com Signed-off-by: Jonathan Cameron commit 04eb94997eb3ec4f2ce5dc05daa2a1db46201224 Author: Trevor Gamblin Date: Mon Jun 17 09:50:21 2024 -0400 iio: trigger: stm32-timer-trigger: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-41-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit ac403e8ca250c27e763408357eebdd04b01c8c17 Author: Trevor Gamblin Date: Mon Jun 17 09:50:20 2024 -0400 iio: temperature: mlx90632: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Acked-by: Crt Mori Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-40-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 9ba22652b6ef6e9f5e6b68b927b1713fc309bfd5 Author: Trevor Gamblin Date: Mon Jun 17 09:50:19 2024 -0400 iio: proximity: sx_common: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-39-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 734ecf98311e6f984367eb760db5f84cef645511 Author: Trevor Gamblin Date: Mon Jun 17 09:50:18 2024 -0400 iio: proximity: sx9500: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-38-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 3b8ec239b8e1db4fa35a235947995a759b7447c2 Author: Trevor Gamblin Date: Mon Jun 17 09:50:17 2024 -0400 iio: proximity: sx9360: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-37-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit f931cab767334ed0270534b27593c100c06ea4ef Author: Trevor Gamblin Date: Mon Jun 17 09:50:16 2024 -0400 iio: proximity: sx9324: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-36-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit c470071e561aec808e05707a88cbaf18227b7f2f Author: Trevor Gamblin Date: Mon Jun 17 09:50:15 2024 -0400 iio: pressure: bmp280-core: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Reviewed-by: Linus Walleij Tested-By: Vasileios Amoiridis Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-35-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 3b6f6e57ab86fa91a58658175076ee1d6b612e0b Author: Trevor Gamblin Date: Mon Jun 17 09:50:14 2024 -0400 iio: magnetometer: mmc35240: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-34-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit e93bd1721e2fa43db59903b35b96ebbd54d37aa7 Author: Trevor Gamblin Date: Mon Jun 17 09:50:13 2024 -0400 iio: magnetometer: ak8974: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Reviewed-by: Linus Walleij Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-33-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit df4083d3888a6f09ac5a0f47215ce45f5e59cc19 Author: Trevor Gamblin Date: Mon Jun 17 09:50:12 2024 -0400 iio: light: veml6030: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-32-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit feeae7fd1a96660cafbe2752d1d6286ea6b94240 Author: Trevor Gamblin Date: Mon Jun 17 09:50:11 2024 -0400 iio: light: st_uvis25_core: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-31-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 7832023d66bc72f6b64fe33255b97c6a3530b9f4 Author: Trevor Gamblin Date: Mon Jun 17 09:50:10 2024 -0400 iio: light: isl29018: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-30-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 9ff43d28765f17b550871d78ffe818c9a47bac1c Author: Trevor Gamblin Date: Mon Jun 17 09:50:09 2024 -0400 iio: light: iqs621-als: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-29-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 1131f1e7207e9d3219f992366b5182f03b3f7537 Author: Trevor Gamblin Date: Mon Jun 17 09:50:08 2024 -0400 iio: light: adux1020: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-28-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 0e59dc9e6bfb6bf5fb978400d43b86cd95c0affd Author: Trevor Gamblin Date: Mon Jun 17 09:50:07 2024 -0400 iio: imu: inv_icm42600: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Jean-Baptiste Maneyrol Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-27-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 513735883335a6435bf04a1c62330139496513c1 Author: Trevor Gamblin Date: Mon Jun 17 09:50:06 2024 -0400 iio: health: max30102: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-26-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 04f168577c79969a3c0e4b08e638ffb8b1afa711 Author: Trevor Gamblin Date: Mon Jun 17 09:50:05 2024 -0400 iio: health: max30100: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-25-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 9d0142fc9e74b8c8a4b5a0f7d15ea6a69a4376e0 Author: Trevor Gamblin Date: Mon Jun 17 09:50:04 2024 -0400 iio: health: afe4404: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-24-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 0c9f6639f588c8b628375b1a9279b2354cea5fd7 Author: Trevor Gamblin Date: Mon Jun 17 09:50:03 2024 -0400 iio: health: afe4403: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-23-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit eceddd01ebf94519df1620607930b3e29a647fda Author: Trevor Gamblin Date: Mon Jun 17 09:50:02 2024 -0400 iio: gyro: mpu3050-core: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-22-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit e5757bd8ceed272d133bdb79c8094b400a0743e5 Author: Trevor Gamblin Date: Mon Jun 17 09:50:01 2024 -0400 iio: gyro: bmg160_core: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-21-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit c1cf171365dcf383042cbea3e1c3475375c1e496 Author: Trevor Gamblin Date: Mon Jun 17 09:50:00 2024 -0400 iio: dac: stm32-dac-core: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-20-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 090510b902d9e474085989b32cdc8a6260a1ad13 Author: Trevor Gamblin Date: Mon Jun 17 09:49:59 2024 -0400 iio: dac: ltc2688: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-19-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 25091987c1890a1e96df42bb30e81e77b10744b8 Author: Trevor Gamblin Date: Mon Jun 17 09:49:58 2024 -0400 iio: adc: stm32-dfsdm-adc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-18-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 059fbfaa5d68c8d35974e567593fbb5e8f5c69f3 Author: Trevor Gamblin Date: Mon Jun 17 09:49:57 2024 -0400 iio: adc: sc27xx_adc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Reviewed-by: Baolin Wang Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-17-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit cb3f8e0c636a0c221172ae49bbefc9e99dbe9711 Author: Trevor Gamblin Date: Mon Jun 17 09:49:56 2024 -0400 iio: adc: rn5t618-adc: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-16-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 550c246dd3111c6ba709beb523411907ed1ae695 Author: Trevor Gamblin Date: Mon Jun 17 09:49:55 2024 -0400 iio: adc: qcom-spmi-rradc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-15-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 5dcd6eb3ef580e7d05fac5335df7160ae45075f3 Author: Trevor Gamblin Date: Mon Jun 17 09:49:48 2024 -0400 iio: adc: berlin2-adc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240617-review-v3-8-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit e3007f6d595c6f28e809bb7dd9d42ee58e0b3bed Author: Trevor Gamblin Date: Mon Jun 17 09:49:54 2024 -0400 iio: adc: mp2629_adc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-14-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 72df0511c1d9e0435964118c41a202edbd77ba54 Author: Trevor Gamblin Date: Mon Jun 17 09:49:53 2024 -0400 iio: adc: meson_saradc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Reviewed-by: George Stark Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-13-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 0544a8c2fb32c9e7534b787f4888ccd75990e67e Author: Trevor Gamblin Date: Mon Jun 17 09:49:52 2024 -0400 iio: adc: intel_mrfld_adc: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-12-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit a47d466d7c8d7a44b851e3a65980b0bebedc7293 Author: Trevor Gamblin Date: Mon Jun 17 09:49:51 2024 -0400 iio: adc: ina2xx-adc: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-11-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit b040275a7705aca4c307f5fd2c8b26d2bf9f0744 Author: Trevor Gamblin Date: Mon Jun 17 09:49:50 2024 -0400 iio: adc: fsl-imx25-gcq: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-10-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit c46a955a26faef570f02160444aa7b2cbfd7ad49 Author: Trevor Gamblin Date: Mon Jun 17 09:49:49 2024 -0400 iio: adc: cpcap-adc: make use of regmap_clear_bits(), regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-9-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit a0e3573e4b152d780a2e3b3cf9577e32e25c585a Author: Trevor Gamblin Date: Mon Jun 17 09:49:47 2024 -0400 iio: adc: bcm_iproc_adc: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-7-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 6e195872020b8a34d713db91bb9a9bd4fc7a2ead Author: Trevor Gamblin Date: Mon Jun 17 09:49:46 2024 -0400 iio: adc: axp288_adc: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-6-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 4796fed269f87d0ee5ca8558710bd467fdaf75fb Author: Trevor Gamblin Date: Mon Jun 17 09:49:45 2024 -0400 iio: adc: axp20x_adc: make use of regmap_set_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-5-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 52248aea53e1ad51942d4a425a5db7371f8d5e89 Author: Trevor Gamblin Date: Mon Jun 17 09:49:44 2024 -0400 iio: adc: ad4130: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Reviewed-by: Nuno Sa Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-4-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 4ed403d8230b9c316b8ab867d8bc15fc9201af16 Author: Trevor Gamblin Date: Mon Jun 17 09:49:43 2024 -0400 iio: accel: msa311: make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-3-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 41aea490533c172ed0cd4875198d9f74865fca5d Author: Trevor Gamblin Date: Mon Jun 17 09:49:42 2024 -0400 iio: accel: kxsd9: Make use of regmap_clear_bits() Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Reviewed-by: Linus Walleij Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-2-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 1b3d0fc286030193f66eabc46d3284994c34770f Author: Trevor Gamblin Date: Mon Jun 17 09:49:41 2024 -0400 iio: accel: fxls8962af-core: Make use of regmap_set_bits(), regmap_clear_bits() Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin Acked-by: Uwe Kleine-König Link: https://patch.msgid.link/20240617-review-v3-1-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron commit 13d12e3ad12dca5b496d8a5b8461728e63b3a205 Author: Dumitru Ceclan Date: Fri Jun 7 17:53:15 2024 +0300 iio: adc: ad7173: Add support for AD411x devices Add support for AD4111/AD4112/AD4114/AD4115/AD4116. The AD411X family encompasses a series of low power, low noise, 24-bit, sigma-delta analog-to-digital converters that offer a versatile range of specifications. This family of ADCs integrates an analog front end suitable for processing both fully differential and single-ended, bipolar voltage inputs addressing a wide array of industrial and instrumentation requirements. - All ADCs have inputs with a precision voltage divider with a division ratio of 10. - AD4116 has 5 low level inputs without a voltage divider. - AD4111 and AD4112 support current inputs (0 mA to 20 mA) using a 50ohm shunt resistor. Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-9-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit f87b076b934f720aca69cad8d95455a1f2d66215 Author: Dumitru Ceclan Date: Fri Jun 7 17:53:14 2024 +0300 iio: adc: ad7173: document sampling frequency behaviour The ADCs supported by this driver feature a sequencer that read in a loop all the enabled chanels. When setting the individual sampling frequency for each channel and enabling multiple channels, the effective of each channel will be lower than the actual set value. Document this behaviour in a comment. Reviewed-by: Nuno Sa Signed-off-by: Dumitru Ceclan Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-8-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit 0f360d489e33053cb1b4f2c73a15d306cbe11d81 Author: Dumitru Ceclan Date: Fri Jun 7 17:53:13 2024 +0300 iio: adc: ad7173: refactor device info structs Drop setting .has_temp and .has_input_buf to false in device info struct. Drop array of device info structs and use individual structs for all; drop models enum as no longer needed. This improves readability as the structs are pointed directly. Reviewed-by: Nuno Sa Signed-off-by: Dumitru Ceclan Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-7-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit ff05b4a86dea94f8689bb1e76ec03ea8ffe0e2fd Author: Dumitru Ceclan Date: Fri Jun 7 17:53:12 2024 +0300 iio: adc: ad7173: add support for special inputs Add support for selecting REF+ and REF- inputs on all models. Add support for selecting ((AVDD1 − AVSS)/5) inputs on supported models. Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-6-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit fc5cdff0654a2f77e68c4bd1c2f8426ab4a9de1e Author: Dumitru Ceclan Date: Fri Jun 7 17:53:11 2024 +0300 iio: adc: ad7173: refactor ain and vref selection Move validation of analog inputs and reference voltage selection to separate functions to reduce the size of the channel config parsing function and improve readability. Add defines for the number of analog inputs in a channel. Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-5-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit 137a83a66f355a9e22039ebf39581ce922119d97 Author: Dumitru Ceclan Date: Fri Jun 7 17:53:10 2024 +0300 iio: adc: ad7173: refactor channel configuration parsing Move configurations regarding number of channels from *_fw_parse_device_config to *_fw_parse_channel_config. Suggested-by: Jonathan Cameron Link: https://lore.kernel.org/all/20240303162148.3ad91aa2@jic23-huawei/ Reviewed-by: David Lechner Reviewed-by: Nuno Sa Signed-off-by: Dumitru Ceclan Link: https://patch.msgid.link/20240607-ad4111-v7-4-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit 98a563de231fcc91d65c6028c7f646fe28faf83a Author: Dumitru Ceclan Date: Fri Jun 7 17:53:09 2024 +0300 iio: adc: ad_sigma_delta: add disable_one callback Sigma delta ADCs with a sequencer need to disable the previously enabled channel when reading using ad_sigma_delta_single_conversion(). This was done manually in drivers for devices with sequencers. This patch implements handling of single channel disabling after a single conversion. Reviewed-by: Nuno Sa Signed-off-by: Dumitru Ceclan Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-3-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit be5e5f3a1120bada0cff1bc84c2a1805da308f6e Author: Thomas Gleixner Date: Tue Jun 25 21:30:48 2024 +0200 Revert "irqchip/dw-apb-ictl: Support building as module" This reverts commit 7cc4f309c933ec5d64eea31066fe86bbf9e48819. Causes build fails. Reported-by: Mark Brown Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Cc: Jisheng Zhang https://lore.kernel.org/oe-kbuild-all/202406250214.WZEjWnnU-lkp@intel.com/ commit 14201399457ce5314224c2898c936bfaa5849fcb Author: Fabio Estevam Date: Tue Jun 25 15:39:19 2024 -0300 spi: spi-fsl-lpspi: Pass pm_ptr() After coverting to SYSTEM_SLEEP_PM_OPS, it is necessary to pass pm_ptr() to the PM operations. Fix it accordingly. Fixes: 6765e859fac9 ("spi: spi-fsl-lpspi: Switch to SYSTEM_SLEEP_PM_OPS()") Signed-off-by: Fabio Estevam Link: https://patch.msgid.link/20240625183919.368770-2-festevam@gmail.com Signed-off-by: Mark Brown commit 2d4e40dcdc5590550704681f1b147c3dadfdbf31 Author: Fabio Estevam Date: Tue Jun 25 15:39:18 2024 -0300 spi: spi-imx: Pass pm_ptr() After coverting to RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS, it is necessary to pass pm_ptr() to the PM operations. Fix it accordingly. Fixes: a93f089ccf82 ("spi: spi-imx: Switch to RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS()") Signed-off-by: Fabio Estevam Link: https://patch.msgid.link/20240625183919.368770-1-festevam@gmail.com Signed-off-by: Mark Brown commit acfc429e42f09524653af52998548cd9317892a6 Author: Srinivas Pandruvada Date: Mon Jun 24 09:27:14 2024 -0700 cpufreq: intel_pstate: Replace boot_cpu_has() Replace boot_cpu_has() with cpu_feature_enabled(). Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240624162714.1431182-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit e169285f8c56b8d5702475de0582dc83650c6cee Author: Florian Westphal Date: Mon May 13 15:00:51 2024 +0200 netfilter: nf_tables: do not store nft_ctx in transaction objects nft_ctx is huge and most of the information stored within isn't used at all. Remove nft_ctx member from the base transaction structure and store only what is needed. After this change, relevant struct sizes are: struct nft_trans_chain { /* size: 120 (-32), cachelines: 2, members: 10 */ struct nft_trans_elem { /* size: 72 (-40), cachelines: 2, members: 4 */ struct nft_trans_flowtable { /* size: 80 (-48), cachelines: 2, members: 5 */ struct nft_trans_obj { /* size: 72 (-40), cachelines: 2, members: 4 */ struct nft_trans_rule { /* size: 80 (-32), cachelines: 2, members: 6 */ struct nft_trans_set { /* size: 96 (-24), cachelines: 2, members: 8 */ struct nft_trans_table { /* size: 56 (-40), cachelines: 1, members: 2 */ struct nft_trans_elem can now be allocated from kmalloc-96 instead of kmalloc-128 slab. A further reduction by 8 bytes would even allow for kmalloc-64. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0be908750162ed08ef0dfdec68e1619c8f693f83 Author: Florian Westphal Date: Mon May 13 15:00:50 2024 +0200 netfilter: nf_tables: pass nft_table to destroy function No functional change intended. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 551b3886401c3b25fd7a3d5ae31fb8ae29423cc4 Author: Florian Westphal Date: Mon May 13 15:00:49 2024 +0200 netfilter: nf_tables: reduce trans->ctx.chain references These objects are the trans_chain subtype, so use the helper instead of referencing trans->ctx, which will be removed soon. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 13f20bc9ec4f9f25935bf52337d3d1708787bd55 Author: Florian Westphal Date: Mon Jun 24 20:57:03 2024 +0200 netfilter: nf_tables: store chain pointer in rule transaction Currently the chain can be derived from trans->ctx.chain, but the ctx will go away soon. Thus add the chain pointer to nft_trans_rule structure itself. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d4f6f3994e133ff49e89d7e108500f45224a79e1 Author: Florian Westphal Date: Mon May 13 15:00:47 2024 +0200 netfilter: nf_tables: avoid usage of embedded nft_ctx nft_ctx is stored in nft_trans object, but nft_ctx is large (48 bytes on 64-bit platforms), it should not be embedded in the transaction structures. Reduce its usage so we can remove it eventually. This replaces trans->ctx.chain with the chain pointer already available in nft_trans_chain structure. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0c2e0ee861de071c2e02c44dda5c44329ea8394d Author: Florian Westphal Date: Mon May 13 15:00:46 2024 +0200 netfilter: nf_tables: pass more specific nft_trans_chain where possible These functions pass a pointer to the base object type, use the more specific one. No functional change intended. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8965d42bcf54d42cbc72fe34a9d0ec3f8527debd Author: Florian Westphal Date: Mon May 13 15:00:45 2024 +0200 netfilter: nf_tables: pass nft_chain to destroy function, not nft_ctx It would be better to not store nft_ctx inside nft_trans object, the netlink ctx strucutre is huge and most of its information is never needed in places that use trans->ctx. Avoid/reduce its usage if possible, no runtime behaviour change intended. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 06fcaca2ed1f7a1d02b18364fceac4525332f178 Author: Florian Westphal Date: Mon May 13 15:00:44 2024 +0200 netfilter: nf_tables: reduce trans->ctx.table references nft_ctx is huge, it should not be stored in nft_trans at all, most information is not needed. Preparation patch to remove trans->ctx, no change in behaviour intended. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b3f4c216f7af37fa60e50d2ebb3ec9dd0f93886c Author: Florian Westphal Date: Mon May 13 15:00:43 2024 +0200 netfilter: nf_tables: compact chain+ft transaction objects Cover holes to reduce both structures by 8 byte. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 17d8f3ad36a5fa5c93afab90ed03ba7ec748dd03 Author: Florian Westphal Date: Mon Jun 24 20:53:16 2024 +0200 netfilter: nf_tables: move bind list_head into relevant subtypes Only nft_trans_chain and nft_trans_set subtypes use the trans->binding_list member. Add a new common binding subtype and move the member there. This reduces size of all other subtypes by 16 bytes on 64bit platforms. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 605efd54b50437ed9f3915690539d0afddca9d95 Author: Florian Westphal Date: Mon May 13 15:00:41 2024 +0200 netfilter: nf_tables: make struct nft_trans first member of derived subtypes There is 'struct nft_trans', the basic structure for all transactional objects, and the the various different transactional objects, such as nft_trans_table, chain, set, set_elem and so on. Right now 'struct nft_trans' uses a flexible member at the tail (data[]), and casting is needed to access the actual type-specific members. Change this to make the hierarchy visible in source code, i.e. make struct nft_trans the first member of all derived subtypes. This has several advantages: 1. pahole output reflects the real size needed by the particular subtype 2. allows to use container_of() to convert the base type to the actual object type instead of casting ->data to the overlay structure. 3. It makes it easy to add intermediate types. 'struct nft_trans' contains a 'binding_list' that is only needed by two subtypes, so it should be part of the two subtypes, not in the base structure. But that makes it hard to interate over the binding_list, because there is no common base structure. A follow patch moves the bind list to a new struct: struct nft_trans_binding { struct nft_trans nft_trans; struct list_head binding_list; }; ... and makes that structure the new 'first member' for both nft_trans_chain and nft_trans_set. No functional change intended in this patch. Some numbers: struct nft_trans { /* size: 88, cachelines: 2, members: 5 */ struct nft_trans_chain { /* size: 152, cachelines: 3, members: 10 */ struct nft_trans_elem { /* size: 112, cachelines: 2, members: 4 */ struct nft_trans_flowtable { /* size: 128, cachelines: 2, members: 5 */ struct nft_trans_obj { /* size: 112, cachelines: 2, members: 4 */ struct nft_trans_rule { /* size: 112, cachelines: 2, members: 5 */ struct nft_trans_set { /* size: 120, cachelines: 2, members: 8 */ struct nft_trans_table { /* size: 96, cachelines: 2, members: 2 */ Of particular interest is nft_trans_elem, which needs to be allocated once for each pending (to be added or removed) set element. Add BUILD_BUG_ON to check struct nft_trans is placed at the top of the container structure. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 50b8affb5665efa028998ad2c116b1106623409e Author: Shuming Fan Date: Tue Jun 25 16:43:03 2024 +0800 ASoC: rt711-sdca: add GE selected mode control The SDCA spec defines a 'selected_mode' control which can override the 'detected_mode' reported by hardware. This is useful for platform integration as well as in cases where the hardware(e.g. 3.5mm jack cable) is not able to accurately detect the jack type. Signed-off-by: Shuming Fan Tested-by: yung-chuan.liao@linux.intel.com Link: https://patch.msgid.link/20240625084303.2273911-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 903e85093670c3e1107980b5e5a718682458f316 Author: Krzysztof Kozlowski Date: Tue Jun 25 18:06:14 2024 +0200 ASoC: codecs: lpass-rx-macro: add missing handling of v2.1 codec We have also v2.1 version of the codec (see 'enum lpass_codec_version'), so handle it as well in all switch cases. Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://patch.msgid.link/20240625160614.450506-1-krzysztof.kozlowski@linaro.org Reviewed-by: Dmitry Baryshkov Signed-off-by: Mark Brown commit c7a5592e8e4d5e0ece94694e3932891a744c2b96 Author: Namhyung Kim Date: Fri Jun 21 10:05:28 2024 -0700 perf mem: Fix a segfault with NULL event->name Guilherme reported a crash in perf mem record. It's because the perf_mem_event->name was NULL on his machine. It should just return a NULL string when it has no format string in the name. The backtrace at the crash is below: Program received signal SIGSEGV, Segmentation fault. __strchrnul_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:67 67 vmovdqu (%rdi), %ymm2 (gdb) bt #0 __strchrnul_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:67 #1 0x00007ffff6c982de in __find_specmb (format=0x0) at printf-parse.h:82 #2 __printf_buffer (buf=buf@entry=0x7fffffffc760, format=format@entry=0x0, ap=ap@entry=0x7fffffffc880, mode_flags=mode_flags@entry=0) at vfprintf-internal.c:649 #3 0x00007ffff6cb7840 in __vsnprintf_internal (string=, maxlen=, format=0x0, args=0x7fffffffc880, mode_flags=mode_flags@entry=0) at vsnprintf.c:96 #4 0x00007ffff6cb787f in ___vsnprintf (string=, maxlen=, format=, args=) at vsnprintf.c:103 #5 0x00005555557b9391 in scnprintf (buf=0x555555fe9320 "", size=100, fmt=0x0) at ../lib/vsprintf.c:21 #6 0x00005555557b74c3 in perf_pmu__mem_events_name (i=0, pmu=0x555556832180) at util/mem-events.c:106 #7 0x00005555557b7ab9 in perf_mem_events__record_args (rec_argv=0x55555684c000, argv_nr=0x7fffffffca20) at util/mem-events.c:252 #8 0x00005555555e370d in __cmd_record (argc=3, argv=0x7fffffffd760, mem=0x7fffffffcd80) at builtin-mem.c:156 #9 0x00005555555e49c4 in cmd_mem (argc=4, argv=0x7fffffffd760) at builtin-mem.c:514 #10 0x000055555569716c in run_builtin (p=0x555555fcde80 , argc=8, argv=0x7fffffffd760) at perf.c:349 #11 0x0000555555697402 in handle_internal_command (argc=8, argv=0x7fffffffd760) at perf.c:402 #12 0x0000555555697560 in run_argv (argcp=0x7fffffffd59c, argv=0x7fffffffd590) at perf.c:446 #13 0x00005555556978a6 in main (argc=8, argv=0x7fffffffd760) at perf.c:562 Reported-by: Guilherme Amadio Reviewed-by: Kan Liang Closes: https://lore.kernel.org/linux-perf-users/Zlns_o_IE5L28168@cern.ch Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240621170528.608772-5-namhyung@kernel.org commit 0eb739d87f1b4780af0168e479d87627a33b6e3d Author: Namhyung Kim Date: Fri Jun 21 10:05:27 2024 -0700 perf tools: Fix a compiler warning of NULL pointer A compiler warning on the second argument of bsearch() should not be NULL, but there's a case we might pass it. Let's return early if we don't have any DSOs to search in __dsos__find_by_longname_id(). util/dsos.c:184:8: runtime error: null pointer passed as argument 2, which is declared to never be null Reported-by: kernel test robot Reviewed-by: Kan Liang Closes: https://lore.kernel.org/oe-lkp/202406180932.84be448c-oliver.sang@intel.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240621170528.608772-4-namhyung@kernel.org commit e988a5b53ebd40c2fafc86250e95d69929796fbd Author: Namhyung Kim Date: Fri Jun 21 10:05:26 2024 -0700 perf symbol: Simplify kernel module checking In dso__load(), it checks if the dso is a kernel module by looking the symtab type. Actually dso has 'is_kmod' field to check that easily and dso__set_module_info() set the symtab type and the is_kmod bit. So it should have the same result to check the is_kmod bit. Reviewed-by: Kan Liang Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240621170528.608772-3-namhyung@kernel.org commit cb39d05e67dc24985ff9f5150e71040fa4d60ab8 Author: Namhyung Kim Date: Fri Jun 21 10:05:25 2024 -0700 perf report: Fix condition in sort__sym_cmp() It's expected that both hist entries are in the same hists when comparing two. But the current code in the function checks one without dso sort key and other with the key. This would make the condition true in any case. I guess the intention of the original commit was to add '!' for the right side too. But as it should be the same, let's just remove it. Fixes: 69849fc5d2119 ("perf hists: Move sort__has_dso into struct perf_hpp_list") Reviewed-by: Kan Liang Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240621170528.608772-2-namhyung@kernel.org commit dd9a426eade634bf794c7e0f1b0c6659f556942f Author: Junhao He Date: Fri Jun 14 17:43:18 2024 +0800 perf pmus: Fixes always false when compare duplicates aliases In the previous loop, all the members in the aliases[j-1] have been freed and set to NULL. But in this loop, the function pmu_alias_is_duplicate() compares the aliases[j] with the aliases[j-1] that has already been disposed, so the function will always return false and duplicate aliases will never be discarded. If we find duplicate aliases, it skips the zfree aliases[j], which is accompanied by a memory leak. We can use the next aliases[j+1] to theck for duplicate aliases to fixes the aliases NULL pointer dereference, then goto zfree code snippet to release it. After patch testing: $ perf list --unit=hisi_sicl,cpa pmu uncore cpa: cpa_p0_rd_dat_32b [Number of read ops transmitted by the P0 port which size is 32 bytes. Unit: hisi_sicl,cpa] cpa_p0_rd_dat_64b [Number of read ops transmitted by the P0 port which size is 64 bytes. Unit: hisi_sicl,cpa] Fixes: c3245d2093c1 ("perf pmu: Abstract alias/event struct") Signed-off-by: Junhao He Cc: ravi.bangoria@amd.com Cc: james.clark@arm.com Cc: prime.zeng@hisilicon.com Cc: cuigaosheng1@huawei.com Cc: jonathan.cameron@huawei.com Cc: linuxarm@huawei.com Cc: yangyicong@huawei.com Cc: robh@kernel.org Cc: renyu.zj@linux.alibaba.com Cc: kjain@linux.ibm.com Cc: john.g.garry@oracle.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240614094318.11607-1-hejunhao3@huawei.com commit 83da316a3bb6de327a070471584be4a0165bee7f Author: Yunseong Kim Date: Thu Jun 20 05:42:12 2024 +0900 perf unwind-libunwind: Add malloc() failure handling Add malloc() failure handling in unread_unwind_spec_debug_frame(). This make caller find_proc_info() works well when the allocation failure. Signed-off-by: Yunseong Kim Reviewed-by: Ian Rogers Cc: Ravi Bangoria Cc: Austin Kim Cc: shjy180909@gmail.com Cc: Ze Gao Cc: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240619204211.6438-2-yskelg@gmail.com commit e9ffa312ff06cde77c4a6395c411c5ebde738f04 Author: Yunseong Kim Date: Thu Jun 20 05:34:29 2024 +0900 util: constant -1 with expression of type char This patch resolve following warning. tools/perf/util/evsel.c:1620:9: error: result of comparison of constant -1 with expression of type 'char' is always false -Werror,-Wtautological-constant-out-of-range-compare 1620 | if (c == -1) | ~ ^ ~~ Signed-off-by: Yunseong Kim Reviewed-by: Ian Rogers Cc: Ravi Bangoria Cc: Austin Kim Cc: shjy180909@gmail.com Cc: Ze Gao Cc: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240619203428.6330-2-yskelg@gmail.com commit d363c2a880c611eea3d754a618b6125bac7f3044 Author: Fernand Sieber Date: Tue Jun 18 11:03:39 2024 +0200 perf: Timehist account sch delay for scheduled out running When using perf timehist, sch delay is only computed for a waking task, not for a pre empted task. This patches changes sch delay to account for both. This makes sense as testing scheduling policy need to consider the effect of scheduling delay globally, not only for waking tasks. Example of `perf timehist` report before the patch for `stress` task competing with each other. First column is wait time, second column sch delay, third column runtime. 1.492060 [0000] s stress[81] 1.999 0.000 2.000 R next: stress[83] 1.494060 [0000] s stress[83] 2.000 0.000 2.000 R next: stress[81] 1.496060 [0000] s stress[81] 2.000 0.000 2.000 R next: stress[83] 1.498060 [0000] s stress[83] 2.000 0.000 1.999 R next: stress[81] After the patch, it looks like this (note that all wait time is not zero anymore): 1.492060 [0000] s stress[81] 1.999 1.999 2.000 R next: stress[83] 1.494060 [0000] s stress[83] 2.000 2.000 2.000 R next: stress[81] 1.496060 [0000] s stress[81] 2.000 2.000 2.000 R next: stress[83] 1.498060 [0000] s stress[83] 2.000 2.000 1.999 R next: stress[81] Signed-off-by: Fernand Sieber Reviewed-by: Madadi Vineeth Reddy Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240618090339.87482-1-sieberf@amazon.com commit fcd094e52b71f490d4bedbda86851be8b2766754 Author: Adrian Hunter Date: Thu May 2 13:58:53 2024 +0300 perf tests: Add APX and other new instructions to x86 instruction decoder test Add samples of APX and other new instructions to the 'x86 instruction decoder - new instructions' test. Note the test is only available if the perf tool has been built with EXTRA_TESTS=1. Example: $ make EXTRA_TESTS=1 -C tools/perf $ tools/perf/perf test -F -v 'new ins' |& grep -i 'jmpabs\|popp\|pushp' Decoded ok: d5 00 a1 ef cd ab 90 78 56 34 12 jmpabs $0x1234567890abcdef Decoded ok: d5 08 53 pushp %rbx Decoded ok: d5 18 50 pushp %r16 Decoded ok: d5 19 57 pushp %r31 Decoded ok: d5 19 5f popp %r31 Decoded ok: d5 18 58 popp %r16 Decoded ok: d5 08 5b popp %rbx Signed-off-by: Adrian Hunter Cc: Borislav Petkov Cc: Chang S. Bae Cc: Masami Hiramatsu Cc: Thomas Gleixner Cc: Dave Hansen Cc: Nikolay Borisov Cc: H. Peter Anvin Cc: x86@kernel.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240502105853.5338-11-adrian.hunter@intel.com commit a44abd2c4c86e6e0b64cdee374e05f9964e3be5c Author: Adrian Hunter Date: Thu May 2 13:58:52 2024 +0300 perf intel pt: Add new JMPABS instruction to the Intel PT instruction decoder JMPABS is 64-bit absolute direct jump instruction, encoded with a mandatory REX2 prefix. JMPABS is designed to be used in the procedure linkage table (PLT) to replace indirect jumps, because it has better performance. In that case the jump target will be amended at run time. To enable Intel PT to follow the code, a TIP packet is always emitted when JMPABS is traced under Intel PT. Refer to the Intel Advanced Performance Extensions (Intel APX) Architecture Specification for details. Decode JMPABS as an indirect jump, because it has an associated TIP packet the same as an indirect jump and the control flow should follow the TIP packet payload, and not assume it is the same as the on-file object code JMPABS target address. Signed-off-by: Adrian Hunter Cc: Borislav Petkov Cc: Chang S. Bae Cc: Masami Hiramatsu Cc: Thomas Gleixner Cc: Dave Hansen Cc: Nikolay Borisov Cc: H. Peter Anvin Cc: x86@kernel.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240502105853.5338-10-adrian.hunter@intel.com commit abc0f0c444f1c485320961c98edf27737b465e03 Author: Chaitanya S Prakash Date: Sat Jun 1 18:29:46 2024 +0530 perf test: Check output of the probe ... --funcs command Test "perf probe of function from different CU" only checks if the perf command has failed and doesn't test the --funcs output. In the issue reported in the previous commit, the garbage output of the --funcs command was being ignored by the test when it could have been caught. The script first makes use of --funcs option with the perf probe command to check if the function "foo" exists in the testfile before adding a probe to it in the next command. The output of probe...--funcs command is redirected to stdout, therefore, add '| grep "foo"' to validate the result. Signed-off-by: Chaitanya S Prakash Reviewed-by: Masami Hiramatsu (Google) Cc: anshuman.khandual@arm.com Cc: james.clark@arm.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240601125946.1741414-11-ChaitanyaS.Prakash@arm.com commit 7d49ced808b169c8cb754da15a69ed0b2fb26567 Author: Athira Rajeev Date: Sun Jun 23 12:18:50 2024 +0530 tools/perf: Fix parallel-perf python script to replace new python syntax ":=" usage perf test "perf script tests" fails as below in systems with python 3.6 File "/home/athira/linux/tools/perf/tests/shell/../../scripts/python/parallel-perf.py", line 442 if line := p.stdout.readline(): ^ SyntaxError: invalid syntax --- Cleaning up --- ---- end(-1) ---- 92: perf script tests: FAILED! This happens because ":=" is a new syntax that assigns values to variables as part of a larger expression. This is introduced from python 3.8 and hence fails in setup with python 3.6 Address this by splitting the large expression and check the value in two steps: Previous line: if line := p.stdout.readline(): Current change: line = p.stdout.readline() if line: With patch ./perf test "perf script tests" 93: perf script tests: Ok Signed-off-by: Athira Rajeev Acked-by: Adrian Hunter Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240623064850.83720-3-atrajeev@linux.vnet.ibm.com commit b9241f150ac745698d0eabbf1d038efc32c24c34 Author: Athira Rajeev Date: Sun Jun 23 12:18:49 2024 +0530 tools/perf: Use is_perf_pid_map_name helper function to check dso's of pattern /tmp/perf-%d.map commit 80d496be89ed ("perf report: Add support for profiling JIT generated code") added support for profiling JIT generated code. This patch handles dso's of form "/tmp/perf-$PID.map". Some of the references doesn't check exactly for same pattern. some uses "if (!strncmp(dso_name, "/tmp/perf-", 10))". Fix this by using helper function perf_pid_map_tid and is_perf_pid_map_name which looks for proper pattern of form: "/tmp/perf-$PID.map" for these checks. Signed-off-by: Athira Rajeev Reviewed-by: Adrian Hunter Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240623064850.83720-2-atrajeev@linux.vnet.ibm.com commit b0979f008f1352a44cd3c8877e3eb8a1e3e1c6f3 Author: Athira Rajeev Date: Sun Jun 23 12:18:48 2024 +0530 tools/perf: Fix the string match for "/tmp/perf-$PID.map" files in dso__load Perf test for perf probe of function from different CU fails as below: ./perf test -vv "test perf probe of function from different CU" 116: test perf probe of function from different CU: --- start --- test child forked, pid 2679 Failed to find symbol foo in /tmp/perf-uprobe-different-cu-sh.Msa7iy89bx/testfile Error: Failed to add events. --- Cleaning up --- "foo" does not hit any event. Error: Failed to delete events. ---- end(-1) ---- 116: test perf probe of function from different CU : FAILED! The test does below to probe function "foo" : # gcc -g -Og -flto -c /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile-foo.c -o /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile-foo.o # gcc -g -Og -c /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile-main.c -o /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile-main.o # gcc -g -Og -o /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile-foo.o /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile-main.o # ./perf probe -x /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile foo Failed to find symbol foo in /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7/testfile Error: Failed to add events. Perf probe fails to find symbol foo in the executable placed in /tmp/perf-uprobe-different-cu-sh.XniNxNEVT7 Simple reproduce: # mktemp -d /tmp/perf-checkXXXXXXXXXX /tmp/perf-checkcWpuLRQI8j # gcc -g -o test test.c # cp test /tmp/perf-checkcWpuLRQI8j/ # nm /tmp/perf-checkcWpuLRQI8j/test | grep foo 00000000100006bc T foo # ./perf probe -x /tmp/perf-checkcWpuLRQI8j/test foo Failed to find symbol foo in /tmp/perf-checkcWpuLRQI8j/test Error: Failed to add events. But it works with any files like /tmp/perf/test. Only for patterns with "/tmp/perf-", this fails. Further debugging, commit 80d496be89ed ("perf report: Add support for profiling JIT generated code") added support for profiling JIT generated code. This patch handles dso's of form "/tmp/perf-$PID.map" . The check used "if (strncmp(self->name, "/tmp/perf-", 10) == 0)" to match "/tmp/perf-$PID.map". With this commit, any dso in /tmp/perf- folder will be considered separately for processing (not only JIT created map files ). Fix this by changing the string pattern to check for "/tmp/perf-%d.map". Add a helper function is_perf_pid_map_name to do this check. In "struct dso", dso->long_name holds the long name of the dso file. Since the /tmp/perf-$PID.map check uses the complete name, use dso___long_name for the string name. With the fix, # ./perf test "test perf probe of function from different CU" 117: test perf probe of function from different CU : Ok Fixes: 56cbeacf1435 ("perf probe: Add test for regression introduced by switch to die_get_decl_file()") Signed-off-by: Athira Rajeev Reviewed-by: Chaitanya S Prakash Reviewed-by: Adrian Hunter Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240623064850.83720-1-atrajeev@linux.vnet.ibm.com commit f01062881f8101f97d57e0ba97020808bfba9ccd Merge: 6765e859fac9a 7e74a45c7afdd Author: Mark Brown Date: Tue Jun 25 18:49:11 2024 +0100 spi: add devm_spi_optimize_message() helper Merge series from David Lechner : In the IIO subsystem, we are finding that it is common to call spi_optimize_message() during driver probe since the SPI message doesn't change for the lifetime of the driver. This patch adds a devm_spi_optimize_message() helper to simplify this common pattern. commit 399af57ccca2f4bdf6feba8a41b80967b10ea9f1 Author: Krzysztof Kozlowski Date: Sun Jun 23 22:03:03 2024 +0200 dt-bindings: display/msm/gpu: fix the schema being not applied dtschema v2024.4, v2024.5 and maybe earlier do not select device nodes for given binding validation if the schema contains compatible list with pattern and a const fallback. This leads to binding being a no-op - not being applied at all. Issue should be fixed in the dtschema but for now add a work-around do the binding can be used against DTS validation. Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/600507/ Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240623-qcom-adreno-dts-bindings-driver-v2-4-9496410de992@linaro.org Signed-off-by: Dmitry Baryshkov commit 6d69f8d37c85ac46bc8fd5bc2d0548293d07d316 Author: Krzysztof Kozlowski Date: Sun Jun 23 22:03:02 2024 +0200 dt-bindings: display/msm/gpu: simplify compatible regex Regex for newer Adreno compatibles can be simpler. Suggested-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Patchwork: https://patchwork.freedesktop.org/patch/600505/ Link: https://lore.kernel.org/r/20240623-qcom-adreno-dts-bindings-driver-v2-3-9496410de992@linaro.org Signed-off-by: Dmitry Baryshkov commit c808ece19640e02fe86ac073c0119d583473dfc0 Author: Krzysztof Kozlowski Date: Sun Jun 23 22:03:01 2024 +0200 dt-bindings: display/msm/gpu: define reg-names in top-level All devices should (and actually do) have same order of entries, if possible. That's the case for reg/reg-names, so define the reg-names in top-level to enforce that. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/600510/ Link: https://lore.kernel.org/r/20240623-qcom-adreno-dts-bindings-driver-v2-2-9496410de992@linaro.org Signed-off-by: Dmitry Baryshkov commit d6c7c411be788d1cf78a4fdec3ce080a8f2e39e1 Author: Krzysztof Kozlowski Date: Sun Jun 23 22:03:00 2024 +0200 dt-bindings: display/msm/gpu: constrain clocks in top-level We expect each schema with variable number of clocks, to have the widest constrains in top-level "properties:". This is more readable and also makes binding stricter, if there is no "if:then:" block for given variant. Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/600504/ Link: https://lore.kernel.org/r/20240623-qcom-adreno-dts-bindings-driver-v2-1-9496410de992@linaro.org Signed-off-by: Dmitry Baryshkov commit 98f887f820c993e05a12e8aa816c80b8661d4c87 Author: Nicholas Piggin Date: Tue Jun 25 21:42:45 2024 +1000 workqueue: Improve scalability of workqueue watchdog touch On a ~2000 CPU powerpc system, hard lockups have been observed in the workqueue code when stop_machine runs (in this case due to CPU hotplug). This is due to lots of CPUs spinning in multi_cpu_stop, calling touch_nmi_watchdog() which ends up calling wq_watchdog_touch(). wq_watchdog_touch() writes to the global variable wq_watchdog_touched, and that can find itself in the same cacheline as other important workqueue data, which slows down operations to the point of lockups. In the case of the following abridged trace, worker_pool_idr was in the hot line, causing the lockups to always appear at idr_find. watchdog: CPU 1125 self-detected hard LOCKUP @ idr_find Call Trace: get_work_pool __queue_work call_timer_fn run_timer_softirq __do_softirq do_softirq_own_stack irq_exit timer_interrupt decrementer_common_virt * interrupt: 900 (timer) at multi_cpu_stop multi_cpu_stop cpu_stopper_thread smpboot_thread_fn kthread Fix this by having wq_watchdog_touch() only write to the line if the last time a touch was recorded exceeds 1/4 of the watchdog threshold. Reported-by: Srikar Dronamraju Signed-off-by: Nicholas Piggin Reviewed-by: Paul E. McKenney Signed-off-by: Tejun Heo commit 18e24deb1cc92f2068ce7434a94233741fbd7771 Author: Nicholas Piggin Date: Tue Jun 25 21:42:44 2024 +1000 workqueue: wq_watchdog_touch is always called with valid CPU Warn in the case it is called with cpu == -1. This does not appear to happen anywhere. Signed-off-by: Nicholas Piggin Reviewed-by: Paul E. McKenney Signed-off-by: Tejun Heo commit 866a5c7e2781cf1b019072288f1f5c64186dcb63 Author: Andrei Lalaev Date: Mon Jun 17 20:30:18 2024 +0200 Input: qt1050 - handle CHIP_ID reading error If the device is missing, we get the following error: qt1050 3-0041: ID -1340767592 not supported Let's handle this situation and print more informative error when reading of CHIP_ID fails: qt1050 3-0041: Failed to read chip ID: -6 Fixes: cbebf5addec1 ("Input: qt1050 - add Microchip AT42QT1050 support") Signed-off-by: Andrei Lalaev Reviewed-by: Marco Felsch Link: https://lore.kernel.org/r/20240617183018.916234-1-andrey.lalaev@gmail.com Signed-off-by: Dmitry Torokhov commit b147ae7ae5141cb10c520d372ecabb2c520210c4 Author: AngeloGioacchino Del Regno Date: Mon Jun 10 10:57:29 2024 +0200 regulator: Add bindings for MediaTek DVFSRC Regulators The Dynamic Voltage and Frequency Scaling Resource Collector Regulators are controlled with votes to the DVFSRC hardware. This adds support for the regulators found in MT6873, MT8183, MT8192 and MT8195 SoCs. Reviewed-by: Rob Herring (Arm) Signed-off-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20240610085735.147134-2-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown commit d2ea920a4092b3c0a6a004b93ce198ca37455d90 Author: AngeloGioacchino Del Regno Date: Mon Jun 10 10:57:34 2024 +0200 regulator: Add refactored mtk-dvfsrc-regulator driver The previous driver never worked, and never got even compiled because it was missing the DVFSRC driver entirely, including needed neaders. This is a full (or nearly full) refactoring of the MediaTek DVFSRC controlled Regulators driver, retaining support for the MT6873, MT8183 and MT8192 SoC, and adding MT8195. As part of the refactoring, this driver is now probed using its own devicetree compatible, as this is a child of the main DVFSRC driver and gets probed as a subnode of that. Reviewed-by: Mark Brown Signed-off-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20240610085735.147134-7-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown commit cd102850e32c145661c6a0640dc6c5feba11af72 Author: AngeloGioacchino Del Regno Date: Mon Jun 10 10:57:33 2024 +0200 regulator: Remove mtk-dvfsrc-regulator.c This driver never worked, and never got even compiled, because it was missing the DVFSRC driver entirely, including headers it relies on! In preparation of a full refactoring of this driver, remove it. The Makefile and Kconfig entries are retained, as those are reused as-is for the refactored code. Acked-by: Mark Brown Signed-off-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20240610085735.147134-6-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown commit c4532232fa2a4f8d9b9a88135a666545157f3d13 Author: Yujie Liu Date: Mon Jun 24 13:55:39 2024 +0800 selftests: net: remove unneeded IP_GRE config It seems that there is no definition for config IP_GRE, and it is not a dependency of other configs, so remove it. linux$ find -name Kconfig | xargs grep "IP_GRE" <-- nothing There is a IPV6_GRE config defined in net/ipv6/Kconfig. It only depends on NET_IPGRE_DEMUX but not IP_GRE. Signed-off-by: Yujie Liu Acked-by: Jakub Kicinski Link: https://patch.msgid.link/20240624055539.2092322-1-yujie.liu@intel.com Signed-off-by: Jakub Kicinski commit a8a8d89dbd2bd2b762b6d0226a1201ec33f7aeac Author: James Chapman Date: Mon Jun 24 09:29:45 2024 +0100 l2tp: remove incorrect __rcu attribute This fixes a sparse warning. Fixes: d18d3f0a24fc ("l2tp: replace hlist with simple list for per-tunnel session list") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406220754.evK8Hrjw-lkp@intel.com/ Signed-off-by: James Chapman Link: https://patch.msgid.link/20240624082945.1925009-1-jchapman@katalix.com Signed-off-by: Jakub Kicinski commit 57b7b6acb41b51087ceb40c562efe392ec8c9677 Author: Alexey Makhalov Date: Thu Jun 13 12:16:50 2024 -0700 x86/vmware: Add TDX hypercall support VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add a call to __tdx_hypercall() in order to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. [ bp: Massage, clear on-stack struct tdx_module_args variable. ] Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-9-alexey.makhalov@broadcom.com commit 9dfb18031f0df2378b3d33a13fc485ef89caa285 Author: Alexey Makhalov Date: Thu Jun 13 12:16:49 2024 -0700 x86/vmware: Remove legacy VMWARE_HYPERCALL* macros No more direct use of these macros should be allowed. The vmware_hypercallX API still uses the new implementation of VMWARE_HYPERCALL macro internally, but it is not exposed outside of the vmware.h. Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-8-alexey.makhalov@broadcom.com commit 86cb65448d07fe516e18d9512ae5786cd90db9bf Author: Alexey Makhalov Date: Thu Jun 13 12:16:48 2024 -0700 x86/vmware: Correct macro names VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in the return value of the VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. And move the bit-shift operation into the macro body. Fixes: 4cca6ea04d31c ("x86/apic: Allow x2apic without IR on VMware platform") Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-7-alexey.makhalov@broadcom.com commit b2c13c23ea9c1f748315b8c2c028bb3ae18f1e12 Author: Alexey Makhalov Date: Thu Jun 13 12:16:47 2024 -0700 x86/vmware: Use VMware hypercall API Remove VMWARE_CMD macro and move to vmware_hypercall API. No functional changes intended. Use u32/u64 instead of uint32_t/uint64_t across the file. Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-6-alexey.makhalov@broadcom.com commit 90328eaaff34f5617b3ec9603681b08d4a8e72df Author: Alexey Makhalov Date: Thu Jun 13 12:16:46 2024 -0700 drm/vmwgfx: Use VMware hypercall API Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-5-alexey.makhalov@broadcom.com commit f0db90b4127c0e454cd9a19ec4256221b974b819 Author: Alexey Makhalov Date: Thu Jun 13 12:16:45 2024 -0700 input/vmmouse: Use VMware hypercall API Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-4-alexey.makhalov@broadcom.com commit 54651bb4dcfea0949afe72775212511ec4193b85 Author: Alexey Makhalov Date: Thu Jun 13 12:16:44 2024 -0700 ptp/vmware: Use VMware hypercall API Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-3-alexey.makhalov@broadcom.com commit 34bf25e820ae1ab38f9cd88834843ba76678a2fd Author: Alexey Makhalov Date: Thu Jun 13 12:16:43 2024 -0700 x86/vmware: Introduce VMware hypercall API Introduce a vmware_hypercall family of functions. It is a common implementation to be used by the VMware guest code and virtual device drivers in architecture independent manner. The API consists of vmware_hypercallX and vmware_hypercall_hb_{out,in} set of functions analogous to KVM's hypercall API. Architecture-specific implementation is hidden inside. It will simplify future enhancements in VMware hypercalls such as SEV-ES and TDX related changes without needs to modify a caller in device drivers code. Current implementation extends an idea from bac7b4e84323 ("x86/vmware: Update platform detection code for VMCALL/VMMCALL hypercalls") to have a slow, but safe path vmware_hypercall_slow() earlier during the boot when alternatives are not yet applied. The code inherits VMWARE_CMD logic from the commit mentioned above. Move common macros from vmware.c to vmware.h. [ bp: Fold in a fix: https://lore.kernel.org/r/20240625083348.2299-1-alexey.makhalov@broadcom.com ] Signed-off-by: Alexey Makhalov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613191650.9913-2-alexey.makhalov@broadcom.com commit 6765e859fac9acdc1265b6f16ed33f42317ed30e Author: Fabio Estevam Date: Mon Jun 24 21:20:23 2024 -0300 spi: spi-fsl-lpspi: Switch to SYSTEM_SLEEP_PM_OPS() Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS() alternative. The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://patch.msgid.link/20240625002023.228235-2-festevam@gmail.com Signed-off-by: Mark Brown commit a93f089ccf823dcb9cf678969e127047762a1473 Author: Fabio Estevam Date: Mon Jun 24 21:20:22 2024 -0300 spi: spi-imx: Switch to RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() Replace SET_RUNTIME_PM_OPS()/SET SYSTEM_SLEEP_PM_OPS() with their modern RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() alternatives. The combined usage of pm_ptr() and RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://patch.msgid.link/20240625002023.228235-1-festevam@gmail.com Signed-off-by: Mark Brown commit 6f9faf1410fe151350ece4a93df30b9e06deec92 Author: Uwe Kleine-König Date: Mon Jun 24 15:17:27 2024 +0200 ASoC: codecs: 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 Link: https://patch.msgid.link/20240624131728.1244053-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown commit 15c99e7fa9e2bb536e813478250d2a609863dcfb Author: Lukas Bulwahn Date: Tue Jun 25 05:34:19 2024 +0200 MAINTAINERS: adjust file entries after adding vendor prefix in sound dtbs Commit ae8fc2948b48 ("ASoC: dt-bindings: add missing vender prefix on filename") renames a few files in Documentation/devicetree/bindings/sound/, but misses to adjust the file entries pointing to those files in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about broken references. Adjust the file entries in NXP SGTL5000 DRIVER and TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS. Signed-off-by: Lukas Bulwahn Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20240625033419.149775-1-lukas.bulwahn@redhat.com Signed-off-by: Mark Brown commit 5b9f51b200dcb2c3924ecbff324fa52f1faa84d3 Author: Dmitry Baryshkov Date: Sat Jun 22 01:03:44 2024 +0300 remoteproc: qcom: enable in-kernel PD mapper Request in-kernel protection domain mapper to be started before starting Qualcomm DSP and release it once DSP is stopped. Once all DSPs are stopped, the PD mapper will be stopped too. Reviewed-by: Chris Lew Tested-by: Steev Klimaszewski Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-5-a84ee3591c8e@linaro.org Signed-off-by: Bjorn Andersson commit c15b4245aa98003842871de944cb46f8ac1b7cd5 Merge: 78aaf42921b75 1ebcde047c547 Author: Bjorn Andersson Date: Tue Jun 25 07:37:18 2024 -0700 Merge branch '20240622-qcom-pd-mapper-v9-0-a84ee3591c8e@linaro.org' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into rproc-next Merge the pd-mapper implementation from the Qualcomm SoC in order to provide the dependencies for the Qualcomm PAS remoteproc driver. commit 06d55c4278dcbd8f69e70fed312db738b6b03410 Merge: 3995904d54384 72196c20c38b5 Author: Rafael J. Wysocki Date: Tue Jun 25 16:27:38 2024 +0200 Merge branch 'thermal-core' Merge thermal core changes for v6.11: - Fix and clean up several minor shortcomings in thermal debug (Rafael Wysocki). - Rename __thermal_zone_set_trips() to thermal_zone_set_trips() and make it use trip thresholds (Rafael Wysocki). - Use READ_ONCE() for lockless access to trip temperature and hysteresis (Rafael Wysocki). - Drop unnecessary cooling device target state checks from the Bang-Bang thermal governor (Rafael Wysocki). - Avoid invoking thermal governor .trip_crossed() callback for critical and hot trip points (Rafael Wysocki). * thermal-core: thermal: core: Avoid calling .trip_crossed() for critical and hot trips thermal: gov_bang_bang: Drop unnecessary cooling device target state checks thermal: trip: Use READ_ONCE() for lockless access to trip properties thermal: trip: Make thermal_zone_set_trips() use trip thresholds thermal: trip: Rename __thermal_zone_set_trips() to thermal_zone_set_trips() thermal: trip: Use common set of trip type names thermal/debugfs: Move some statements from under thermal_dbg->lock thermal/debugfs: Compute maximum temperature for mitigation episode as a whole thermal/debugfs: Adjust check for trips without statistics in tze_seq_show() thermal/debugfs: Fix up units in "mitigations" files thermal/debugfs: Print mitigation timestamp value in milliseconds thermal/debugfs: Do not extend mitigation episodes beyond system resume thermal/debugfs: Use helper to update trip point overstepping duration commit 787025a462c7e85d1cfe6294a70c65f1f74031f2 Merge: 5e62d53c763aa 2240d3e60bb3e Author: Rafael J. Wysocki Date: Tue Jun 25 16:25:31 2024 +0200 Merge tag 'amd-pstate-v6.11-2024-06-24' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge the second round of changes for amd-pstate in 6.11 from Mario Limonciello: "* Enables amd-pstate by default in "shared memory" designs without a dedicated MSR. * Adds extra infrastructure for debugging problems. * Bug fixes found for init/unload failure." * tag 'amd-pstate-v6.11-2024-06-24' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq: simplify boolean parsing with kstrtobool in store function cpufreq: amd-pstate: Don't create attributes when registration fails cpufreq: amd-pstate: Make amd-pstate unit tests depend on amd-pstate cpufreq/amd-pstate: fix setting policy current frequency value cpufreq: amd-pstate: auto-load pstate driver by default cpufreq: amd-pstate: enable shared memory type CPPC by default cpufreq: amd-pstate: switch boot_cpu_has() to cpu_feature_enabled() Documentation: PM: amd-pstate: add guided mode to the Operation mode cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS cpufreq: amd-pstate: show CPPC debug message if CPPC is not supported cpufreq: amd-pstate: remove unused variable nominal_freq cpufreq: amd-pstate: optimize the initial frequency values verification cpufreq: amd-pstate: Allow users to write 'default' EPP string commit 73cfd947dbdb25ef9863ac49c4596a7d53ad4025 Author: Elad Yifee Date: Sun Jun 23 20:51:09 2024 +0300 net: ethernet: mtk_eth_soc: ppe: prevent ppe update for non-mtk devices Introduce an additional validation to ensure that the PPE index is modified exclusively for mtk_eth ingress devices. This primarily addresses the issue related to WED operation with multiple PPEs. Fixes: dee4dd10c79a ("net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs") Signed-off-by: Elad Yifee Link: https://lore.kernel.org/r/20240623175113.24437-1-eladwf@gmail.com Signed-off-by: Paolo Abeni commit 84f6ab5fedf735a447080e2fd286eff9859cd199 Author: Jerome Brunet Date: Tue Jun 25 13:54:41 2024 +0200 arm64: dts: amlogic: g12: bump spdif output drive strength Spdif output currently uses a 0.5mA drive strength by default. While the result depends on how the spdif output is hooked to rest of the system, this is a bit weak and signal quality may be poor. This was reported on the vim3l for example. Increase the drive strength to 3mA, as used for TDM, to be on the safe side. Fixes: 649675db939d ("arm64: dts: meson: g12a: add spdifouts") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240625115443.934763-1-jbrunet@baylibre.com Signed-off-by: Neil Armstrong commit b0aba467c329a89e8b325eda0cf60776958353fe Author: Jerome Brunet Date: Tue Jun 25 13:18:43 2024 +0200 arm64: dts: amlogic: sm1: fix spdif compatibles The spdif input and output of g12 and sm1 are compatible but sm1 should use the related compatible since it exists. Fixes: 86f2159468d5 ("arm64: dts: meson-sm1: add spdifin and pdifout nodes") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20240625111845.928192-1-jbrunet@baylibre.com Signed-off-by: Neil Armstrong commit 6a6aad7489b2aa9dae9807d2fc26992a82d5b438 Merge: 819984a0dd360 49056c95df448 Author: Greg Kroah-Hartman Date: Tue Jun 25 14:56:49 2024 +0200 Merge tag 'thunderbolt-for-v6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v6.11 merge window This includes following USB4/Thunderbolt changes for the v6.11 merge window: - Add receiver lane margining support for retimers - Add sideband register access to debugfs - Minor cleanups. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: debugfs: Use FIELD_GET() thunderbolt: Add receiver lane margining support for retimers thunderbolt: Make margining functions accept target and retimer index thunderbolt: Split out margining from USB4 port thunderbolt: Add sideband register access to debugfs thunderbolt: Make usb4_port_sb_read/write() available outside of usb4.c thunderbolt: Move usb4_port_margining_caps() declaration into correct place thunderbolt: Mention Thunderbolt/USB4 debugging tools in Kconfig commit 0d8914165dd17b0fd330538871968efabb3227c0 Author: Takashi Sakamoto Date: Tue Jun 25 12:18:06 2024 +0900 firewire: ohci: add tracepoints event for hardIRQ event 1394 OHCI hardware triggers PCI interrupts to notify any events to software. Current driver for the hardware is programmed by the typical way to utilize top- and bottom- halves, thus it has a timing gap to handle the notification in softIRQ (tasklet). This commit adds a tracepoint event for the hardIRQ event. The comparison of the tracepoint event to tracepoints events in firewire subsystem is helpful to diagnose the timing gap. Link: https://lore.kernel.org/r/20240625031806.956650-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 001c1ff5dc397bc26a3d1a0da8733c179f39c946 Author: Takashi Sakamoto Date: Tue Jun 25 12:18:05 2024 +0900 firewire: ohci: add support for Linux kernel tracepoints The Linux Kernel Tracepoints framework is enough useful to trace the interaction between 1394 OHCI hardware and its driver. This commit adds firewire_ohci subsystem to use the framework. It is defined as the different subsystem from the existing firewire subsystem. The definition file for the existing subsystem is slightly changed so that both subsystems are available in 1394 OHCI driver. Link: https://lore.kernel.org/r/20240625031806.956650-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit b65bd7874bc7dc709645fd8acb53603b73ae950a Author: Christophe JAILLET Date: Mon Jun 24 21:59:42 2024 +0200 fbdev: mmp: Constify struct mmp_overlay_ops 'struct mmp_overlay_ops' is not modified in this driver. 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 11798 555 16 12369 3051 drivers/video/fbdev/mmp/hw/mmp_ctrl.o After: ===== text data bss dec hex filename 11834 507 16 12357 3045 drivers/video/fbdev/mmp/hw/mmp_ctrl.o Signed-off-by: Christophe JAILLET Signed-off-by: Helge Deller commit eb5d88b1538850c6d9ddfcd0b59dc7c84831b530 Author: Geert Uytterhoeven Date: Tue Jun 25 13:57:48 2024 +0200 reset: RESET_IMX8MP_AUDIOMIX should depend on ARCH_MXC The i.MX8MP AudioMix reset controller is only present on Freescale i.MX8 SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without i.MX SoC support. Fixes: fe125601d17cc1ea ("reset: imx8mp-audiomix: Add AudioMix Block Control reset driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/6d8116a56186fbf468229e823c7c8dfcd9488959.1719316665.git.geert+renesas@glider.be Signed-off-by: Philipp Zabel commit 5b90752f961959ed0b2ff4db1372886f87c6e9bb Author: Dmitry Baryshkov Date: Tue Jun 25 01:38:25 2024 +0300 drm/msm/dpu: remove CRTC frame event callback registration The frame event callback is always set to dpu_crtc_frame_event_cb() (or to NULL) and the data is always either the CRTC itself or NULL (correpondingly). Thus drop the event callback registration, call the dpu_crtc_frame_event_cb() directly and gate on the dpu_enc->crtc assigned using dpu_encoder_assign_crtc(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/600751/ Link: https://lore.kernel.org/r/20240625-dpu-no-crtc-register-v3-1-1b161df13776@linaro.org commit b95a40122a8183873736e0506df8e3a881178099 Author: Uros Bizjak Date: Wed May 22 10:26:49 2024 +0200 iommufd: Use atomic_long_try_cmpxchg() in incr_user_locked_vm() Use atomic_long_try_cmpxchg() instead of atomic_long_cmpxchg (*ptr, old, new) != old in incr_user_locked_vm(). cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, atomic_long_try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg fails. There is no need to re-read the value in the loop. Signed-off-by: Uros Bizjak Cc: Jason Gunthorpe Cc: Kevin Tian Cc: Joerg Roedel Cc: Will Deacon Cc: Robin Murphy Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240522082729.971123-3-ubizjak@gmail.com Signed-off-by: Joerg Roedel commit 5c555f1f1c31f7dd60a7697be9bb0e98706bb10a Author: Uros Bizjak Date: Wed May 22 10:26:48 2024 +0200 iommu/vt-d: Use try_cmpxchg64() in intel_pasid_get_entry() Use try_cmpxchg64() instead of cmpxchg64 (*ptr, old, new) != old in intel_pasid_get_entry(). cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Signed-off-by: Uros Bizjak Cc: David Woodhouse Cc: Lu Baolu Cc: Joerg Roedel Cc: Will Deacon Cc: Robin Murphy Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20240522082729.971123-2-ubizjak@gmail.com Signed-off-by: Joerg Roedel commit 9a448e453151ec4e4b98a914b463539e790dd198 Author: Uros Bizjak Date: Wed May 22 10:26:47 2024 +0200 iommu/amd: Use try_cmpxchg64() in v2_alloc_pte() Use try_cmpxchg64() instead of cmpxchg64 (*ptr, old, new) != old in v2_alloc_pte(). cmpxchg returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). This is the same improvement as implemented for alloc_pte() in: commit 0d10fe759117 ("iommu/amd: Use try_cmpxchg64 in alloc_pte and free_clear_pte") Signed-off-by: Uros Bizjak Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: Will Deacon Cc: Robin Murphy Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20240522082729.971123-1-ubizjak@gmail.com Signed-off-by: Joerg Roedel commit 7f7f41c33bd400ab9975151e4a51f4e41a5db9ef Author: Neil Armstrong Date: Thu Jun 6 15:15:12 2024 +0200 dt-bindings: iommu: qcom,iommu: Add MSM8953 GPU IOMMU to SMMUv2 compatibles Add MSM8953 compatible string with "qcom,msm-iommu-v2" as fallback for the MSM8953 GPU IOMMU which is compatible with Qualcomm's secure fw "SMMU v2" implementation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240606-topic-sm8953-upstream-smmu-gpu-v2-1-67be88007d87@linaro.org Signed-off-by: Joerg Roedel commit 06ec7893a4b48a1fad9e94cb670862ddd65b6eab Author: Dmitry Baryshkov Date: Mon Jun 24 20:39:58 2024 +0300 drm/connector: hdmi: shorten too long function name If CONFIG_MODVERSIONS is enabled, then using the HDMI Connector framework can result in build failures. Rename the function to make it fit into the name requirements. ERROR: modpost: too long symbol "drm_atomic_helper_connector_hdmi_disable_audio_infoframe" [drivers/gpu/drm/msm/msm.ko] Reported-by: Mark Brown Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240624-hdmi-connector-shorten-name-v1-1-5bd3410138db@linaro.org Signed-off-by: Dmitry Baryshkov commit 8db07ce532c0b51fea974613002cdc6a27732929 Author: Andre Przywara Date: Sun Jun 16 23:40:55 2024 +0100 iommu: sun50i: Add H616 compatible string The IOMMU IP in the Allwinner H616 SoC is *almost* compatible to the H6, but uses a different reset value for the bypass register, and adds some more registers. While a driver *can* be written to support both variants (which we in fact do), the hardware itself is not fully compatible, so we require a separate compatible string. Add the new compatible string to the list, but without changing the behaviour, since the driver already supports both variants. Signed-off-by: Andre Przywara Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240616224056.29159-5-andre.przywara@arm.com Signed-off-by: Joerg Roedel commit 2d1d1969a7e5b0dd043df4a6ca02156717401856 Author: Andre Przywara Date: Sun Jun 16 23:40:54 2024 +0100 dt-bindings: iommu: add new compatible strings The Allwinner H616 and A523 contain IOMMU IP very similar to the H6, but use a different reset value for the bypass register, which makes them strictly speaking incompatible. Add a new compatible string for the H616, and a version for the A523, falling back to the H616. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240616224056.29159-4-andre.przywara@arm.com Signed-off-by: Joerg Roedel commit 7b9331a3ae93adfae54c6a56d23513e1f7db5dcb Author: Andre Przywara Date: Sun Jun 16 23:40:53 2024 +0100 iommu: sun50i: allocate page tables from below 4 GiB The Allwinner IOMMU is a strict 32-bit device, with its input addresses, the page table root pointer as well as both level's page tables and also the target addresses all required to be below 4GB. The Allwinner H6 SoC only supports 32-bit worth of physical addresses anyway, so this isn't a problem so far, but the H616 and later SoCs extend the PA space beyond 32 bit to accommodate more DRAM. To make sure we stay within the 32-bit PA range required by the IOMMU, force the memory for the page tables to come from below 4GB. by using allocations with the DMA32 flag. Also reject any attempt to map target addresses beyond 4GB, and print a warning to give users a hint while this fails. Signed-off-by: Andre Przywara Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240616224056.29159-3-andre.przywara@arm.com Signed-off-by: Joerg Roedel commit 927c70c93d929f4c2dcaf72f51b31bb7d118a51a Author: Jernej Skrabec Date: Sun Jun 16 23:40:52 2024 +0100 iommu: sun50i: clear bypass register The Allwinner H6 IOMMU has a bypass register, which allows to circumvent the page tables for each possible master. The reset value for this register is 0, which disables the bypass. The Allwinner H616 IOMMU resets this register to 0x7f, which activates the bypass for all masters, which is not what we want. Always clear this register to 0, to enforce the usage of page tables, and make this driver compatible with the H616 in this respect. Signed-off-by: Jernej Skrabec Signed-off-by: Andre Przywara Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240616224056.29159-2-andre.przywara@arm.com Signed-off-by: Joerg Roedel commit 694850baa4c85acf6fa6161d2a6d686f497d2efd Merge: 4006f157db67b c073f0757663c Author: Mark Brown Date: Tue Jun 25 12:34:52 2024 +0100 ASoC: Intel: boards: updates for 6.11 - part2 Merge series from Pierre-Louis Bossart : Minor additions and cleanups this time. commit 4006f157db67bd258b2058a148868431f2e07c5e Merge: 00dd4d86ed908 34fa846f52f9f Author: Mark Brown Date: Tue Jun 25 12:34:44 2024 +0100 ASoC: codecs: ES8326: Solving headphone detection and Merge series from Zhang Yi : We propose four patches to solve headphone detection and suspend issues. And there are several registers that should be read-only registers. So we create es8326_writeable_register, and set these registers to false. commit 337b7b0b8b02aa10b52386371433eb6f522dc550 Author: Takashi Iwai Date: Tue Jun 25 13:33:55 2024 +0200 ALSA: pcm_dmaengine: Unify two close functions Both snd_dmaengine_pcm_close() and snd_dmaengine_pcm_close_release_chan() are almost identical except for a call of dma_release_channel() in the latter. For code simplification, unify them internally. Just a code refactoring, and no functional changes. Link: https://patch.msgid.link/20240625113356.2123-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0d865221c8b13d8537fc7a1baa02061c428ad039 Author: Ulf Hansson Date: Wed Jun 19 16:08:44 2024 +0200 OPP: Drop a redundant in-parameter to _set_opp_level() The in-parameter "opp_table" isn't needed by _set_opp_level(). Let's therefore drop it. Signed-off-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 6f7dae64150229b898da0445480ede94b27d5522 Merge: 634f3b4e7dde3 6a7db25aad8ce Author: Takashi Iwai Date: Tue Jun 25 11:56:17 2024 +0200 Merge branch 'for-linus' into for-next Pull 6.10-rc devel branch for further cleanups of dmaengine and others. Signed-off-by: Takashi Iwai commit 1d706875927cae8e05742ee846d1bb7b85e4f12f Merge: 7e7c714a36a5b 783bfe279e542 Author: Paolo Abeni Date: Tue Jun 25 11:53:09 2024 +0200 Merge branch 'net-macb-wol-enhancements' Vineeth Karumanchi says: ==================== net: macb: WOL enhancements - Add provisioning for queue tie-off and queue disable during suspend. - Add support for ARP packet types to WoL. - Advertise WoL attributes by default. - Extend MACB supported WoL modes to the PHY supported WoL modes. - Deprecate magic-packet property. v6: https://lore.kernel.org/netdev/20240617070413.2291511-1-vineeth.karumanchi@amd.com/ v5: https://lore.kernel.org/netdev/20240611162827.887162-1-vineeth.karumanchi@amd.com/ v4: https://lore.kernel.org/lkml/20240610053936.622237-1-vineeth.karumanchi@amd.com/ v3: https://lore.kernel.org/netdev/20240605102457.4050539-1-vineeth.karumanchi@amd.com/ v2: https://lore.kernel.org/netdev/20240222153848.2374782-1-vineeth.karumanchi@amd.com/ v1: https://lore.kernel.org/lkml/20240130104845.3995341-1-vineeth.karumanchi@amd.com/#t ==================== Link: https://lore.kernel.org/r/20240621045735.3031357-1-vineeth.karumanchi@amd.com Signed-off-by: Paolo Abeni commit 783bfe279e5427fdcda54bc269005f39ac94d202 Author: Vineeth Karumanchi Date: Fri Jun 21 10:27:35 2024 +0530 dt-bindings: net: cdns,macb: Deprecate magic-packet property WOL modes such as magic-packet should be an OS policy. By default, advertise supported modes and use ethtool to activate the required mode. Suggested-by: Andrew Lunn Signed-off-by: Vineeth Karumanchi Reviewed-by: Andrew Lunn Acked-by: Krzysztof Kozlowski Signed-off-by: Paolo Abeni commit 0cb8de39a776e093c759e21d2c95df049f6ea9e9 Author: Vineeth Karumanchi Date: Fri Jun 21 10:27:34 2024 +0530 net: macb: Add ARP support to WOL Extend wake-on LAN support with an ARP packet. Currently, if PHY supports WOL, ethtool ignores the modes supported by MACB. This change extends the WOL modes with MACB supported modes. Advertise wake-on LAN supported modes by default without relying on dt node. By default, wake-on LAN will be in disabled state. Using ethtool, users can enable/disable or choose packet types. For wake-on LAN via ARP, ensure the IP address is assigned and report an error otherwise. Co-developed-by: Harini Katakam Signed-off-by: Harini Katakam Signed-off-by: Vineeth Karumanchi Reviewed-by: Andrew Lunn Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea # on SAMA7G5 Signed-off-by: Paolo Abeni commit 3650a8cc5b34b1032428724c1b74349a753237a4 Author: Vineeth Karumanchi Date: Fri Jun 21 10:27:33 2024 +0530 net: macb: Enable queue disable Enable queue disable for Versal devices. Signed-off-by: Vineeth Karumanchi Reviewed-by: Andrew Lunn Reviewed-by: Claudiu Beznea Signed-off-by: Paolo Abeni commit 759cc793ebfc2d1a02f357ae97e5dcdcd63f758f Author: Vineeth Karumanchi Date: Fri Jun 21 10:27:32 2024 +0530 net: macb: queue tie-off or disable during WOL suspend When GEM is used as a wake device, it is not mandatory for the RX DMA to be active. The RX engine in IP only needs to receive and identify a wake packet through an interrupt. The wake packet is of no further significance; hence, it is not required to be copied into memory. By disabling RX DMA during suspend, we can avoid unnecessary DMA processing of any incoming traffic. During suspend, perform either of the below operations: - tie-off/dummy descriptor: Disable unused queues by connecting them to a looped descriptor chain without free slots. - queue disable: The newer IP version allows disabling individual queues. Co-developed-by: Harini Katakam Signed-off-by: Harini Katakam Signed-off-by: Vineeth Karumanchi Reviewed-by: Andrew Lunn Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea # on SAMA7G5 Signed-off-by: Paolo Abeni commit bf6ab33d8487f5e2a0998ce75286eae65bb0a6d6 Author: Brian Johannesmeyer Date: Thu May 23 23:50:29 2024 +0200 x86/kmsan: Fix hook for unaligned accesses When called with a 'from' that is not 4-byte-aligned, string_memcpy_fromio() calls the movs() macro to copy the first few bytes, so that 'from' becomes 4-byte-aligned before calling rep_movs(). This movs() macro modifies 'to', and the subsequent line modifies 'n'. As a result, on unaligned accesses, kmsan_unpoison_memory() uses the updated (aligned) values of 'to' and 'n'. Hence, it does not unpoison the entire region. Save the original values of 'to' and 'n', and pass those to kmsan_unpoison_memory(), so that the entire region is unpoisoned. Signed-off-by: Brian Johannesmeyer Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Alexander Potapenko Link: https://lore.kernel.org/r/20240523215029.4160518-1-bjohannesmeyer@gmail.com commit 8e3447822d7d8c0f562c6851a7a31e24d1ede55e Author: Mateusz Guzik Date: Mon Jun 24 10:54:02 2024 +0200 vfs: remove redundant smp_mb for thp handling in do_dentry_open opening for write performs: if (f->f_mode & FMODE_WRITE) { [snip] smp_mb(); if (filemap_nr_thps(inode->i_mapping)) { [snip] } } filemap_nr_thps on kernels built without CONFIG_READ_ONLY_THP_FOR expands to 0, allowing the compiler to eliminate the entire thing, with exception of the fence (and the branch leading there). So happens required synchronisation between i_writecount and nr_thps changes is already provided by the full fence coming from get_write_access -> atomic_inc_unless_negative, thus the smp_mb instance above can be removed regardless of CONFIG_READ_ONLY_THP_FOR. While I updated commentary in places claiming to match the now-removed fence, I did not try to patch them to act on the compile option. I did not bother benchmarking it, not issuing a spurious full fence in the fast path does not warrant justification from perf standpoint. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240624085402.493630-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 153216cf7bd50842ffc3d500ea96adeb65db63ef Author: Youling Tang Date: Thu Jun 20 11:23:35 2024 +0800 fuse: Use in_group_or_capable() helper Use the in_group_or_capable() helper function to simplify the code. Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/20240620032335.147136-3-youling.tang@linux.dev Signed-off-by: Christian Brauner commit 8444ee22adb0c8b09ccf9c183bdf6d649d67ddda Author: Youling Tang Date: Thu Jun 20 11:23:34 2024 +0800 f2fs: Use in_group_or_capable() helper Use the in_group_or_capable() helper function to simplify the code. Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/20240620032335.147136-2-youling.tang@linux.dev Signed-off-by: Christian Brauner commit 9b6a14f08b4875aa22ea0b5bc35042e2580b311b Author: Youling Tang Date: Thu Jun 20 11:23:33 2024 +0800 fs: Export in_group_or_capable() Export in_group_or_capable() as a VFS helper function. Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/20240620032335.147136-1-youling.tang@linux.dev Signed-off-by: Christian Brauner commit 5e362bd5eecdd7ccafc9611a108a53423ccd5065 Author: Mateusz Guzik Date: Thu Jun 20 14:03:59 2024 +0200 vfs: reorder checks in may_create_in_sticky The routine is called for all directories on file creation and weirdly postpones the check if the dir is sticky to begin with. Instead it first checks fifos and regular files (in that order), while avoidably pulling globals. No functional changes. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240620120359.151258-1-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 26a2ed107929a855155429b11e1293b83e6b2a8b Author: Chao Yu Date: Sun Jun 16 09:38:41 2024 +0800 hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode() Syzbot reports uninitialized value access issue as below: loop0: detected capacity change from 0 to 64 ===================================================== BUG: KMSAN: uninit-value in hfs_revalidate_dentry+0x307/0x3f0 fs/hfs/sysdep.c:30 hfs_revalidate_dentry+0x307/0x3f0 fs/hfs/sysdep.c:30 d_revalidate fs/namei.c:862 [inline] lookup_fast+0x89e/0x8e0 fs/namei.c:1649 walk_component fs/namei.c:2001 [inline] link_path_walk+0x817/0x1480 fs/namei.c:2332 path_lookupat+0xd9/0x6f0 fs/namei.c:2485 filename_lookup+0x22e/0x740 fs/namei.c:2515 user_path_at_empty+0x8b/0x390 fs/namei.c:2924 user_path_at include/linux/namei.h:57 [inline] do_mount fs/namespace.c:3689 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x66b/0x810 fs/namespace.c:3875 __x64_sys_mount+0xe4/0x140 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b BUG: KMSAN: uninit-value in hfs_ext_read_extent fs/hfs/extent.c:196 [inline] BUG: KMSAN: uninit-value in hfs_get_block+0x92d/0x1620 fs/hfs/extent.c:366 hfs_ext_read_extent fs/hfs/extent.c:196 [inline] hfs_get_block+0x92d/0x1620 fs/hfs/extent.c:366 block_read_full_folio+0x4ff/0x11b0 fs/buffer.c:2271 hfs_read_folio+0x55/0x60 fs/hfs/inode.c:39 filemap_read_folio+0x148/0x4f0 mm/filemap.c:2426 do_read_cache_folio+0x7c8/0xd90 mm/filemap.c:3553 do_read_cache_page mm/filemap.c:3595 [inline] read_cache_page+0xfb/0x2f0 mm/filemap.c:3604 read_mapping_page include/linux/pagemap.h:755 [inline] hfs_btree_open+0x928/0x1ae0 fs/hfs/btree.c:78 hfs_mdb_get+0x260c/0x3000 fs/hfs/mdb.c:204 hfs_fill_super+0x1fb1/0x2790 fs/hfs/super.c:406 mount_bdev+0x628/0x920 fs/super.c:1359 hfs_mount+0xcd/0xe0 fs/hfs/super.c:456 legacy_get_tree+0x167/0x2e0 fs/fs_context.c:610 vfs_get_tree+0xdc/0x5d0 fs/super.c:1489 do_new_mount+0x7a9/0x16f0 fs/namespace.c:3145 path_mount+0xf98/0x26a0 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount+0x919/0x9e0 fs/namespace.c:3674 __ia32_sys_mount+0x15b/0x1b0 fs/namespace.c:3674 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178 do_fast_syscall_32+0x37/0x80 arch/x86/entry/common.c:203 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:246 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Uninit was created at: __alloc_pages+0x9a6/0xe00 mm/page_alloc.c:4590 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0x2d7/0x1400 mm/slub.c:2407 ___slab_alloc+0x16b5/0x3970 mm/slub.c:3540 __slab_alloc mm/slub.c:3625 [inline] __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc_lru+0x64d/0xb30 mm/slub.c:3879 alloc_inode_sb include/linux/fs.h:3018 [inline] hfs_alloc_inode+0x5a/0xc0 fs/hfs/super.c:165 alloc_inode+0x83/0x440 fs/inode.c:260 new_inode_pseudo fs/inode.c:1005 [inline] new_inode+0x38/0x4f0 fs/inode.c:1031 hfs_new_inode+0x61/0x1010 fs/hfs/inode.c:186 hfs_mkdir+0x54/0x250 fs/hfs/dir.c:228 vfs_mkdir+0x49a/0x700 fs/namei.c:4126 do_mkdirat+0x529/0x810 fs/namei.c:4149 __do_sys_mkdirat fs/namei.c:4164 [inline] __se_sys_mkdirat fs/namei.c:4162 [inline] __x64_sys_mkdirat+0xc8/0x120 fs/namei.c:4162 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b It missed to initialize .tz_secondswest, .cached_start and .cached_blocks fields in struct hfs_inode_info after hfs_alloc_inode(), fix it. Cc: stable@vger.kernel.org Reported-by: syzbot+3ae6be33a50b5aae4dab@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-fsdevel/0000000000005ad04005ee48897f@google.com Signed-off-by: Chao Yu Link: https://lore.kernel.org/r/20240616013841.2217-1-chao@kernel.org Signed-off-by: Christian Brauner commit 7f07ee5a23a5ed3da7ed3574913aada6f4143a22 Author: Christophe JAILLET Date: Sat Jun 8 16:34:20 2024 +0200 proc: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_max() is inclusive. So a -1 has been added when needed. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ae10003feb87d240163d0854de95f09e1f00be7d.1717855701.git.christophe.jaillet@wanadoo.fr Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Christian Brauner commit 7e7c714a36a5b10e391168e7e8145060e041ea12 Merge: bf2468f9afba8 22e5751b0524f Author: Paolo Abeni Date: Tue Jun 25 11:10:20 2024 +0200 Merge branch 'af_unix-remove-spin_lock_nested-and-convert-to-lock_cmp_fn' Kuniyuki Iwashima says: ==================== af_unix: Remove spin_lock_nested() and convert to lock_cmp_fn. This series removes spin_lock_nested() in AF_UNIX and instead defines the locking orders as functions tied to each lock by lockdep_set_lock_cmp_fn(). When the defined function returns a negative value, lockdep considers it will not cause deadlock. (See ->cmp_fn() in check_deadlock() and check_prev_add().) When we cannot define the total ordering, we return -1 for the allowed ordering and otherwise 0 as undefined. [0] [0]: https://lore.kernel.org/netdev/thzkgbuwuo3knevpipu4rzsh5qgmwhklihypdgziiruabvh46f@uwdkpcfxgloo/ Changes: v4: * Patch 4 * Make unix_state_lock_cmp_fn() symmetric. v3: https://lore.kernel.org/netdev/20240614200715.93150-1-kuniyu@amazon.com/ * Patch 3 * Cache sk->sk_state * s/unix_state_lock()/unix_state_unlock()/ * Patch 8 * Add embryo -> listener locking order v2: https://lore.kernel.org/netdev/20240611222905.34695-1-kuniyu@amazon.com/ * Patch 1 & 2 * Use (((l) > (r)) - ((l) < (r))) for comparison v1: https://lore.kernel.org/netdev/20240610223501.73191-1-kuniyu@amazon.com/ ==================== Link: https://lore.kernel.org/r/20240620205623.60139-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 22e5751b0524fedd4f345412d8d3394387471ab7 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:23 2024 -0700 af_unix: Don't use spin_lock_nested() in copy_peercred(). When (AF_UNIX, SOCK_STREAM) socket connect()s to a listening socket, the listener's sk_peer_pid/sk_peer_cred are copied to the client in copy_peercred(). Then, two sk_peer_locks are held there; one is client's and another is listener's. However, the latter is not needed because we hold the listner's unix_state_lock() there and unix_listen() cannot update the cred concurrently. Let's drop the unnecessary spin_lock() and use the bare spin_lock() for the client to protect concurrent read by getsockopt(SO_PEERCRED). Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit e4bd881d987121dbf1a288641491955a53d9f8f7 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:22 2024 -0700 af_unix: Remove put_pid()/put_cred() in copy_peercred(). When (AF_UNIX, SOCK_STREAM) socket connect()s to a listening socket, the listener's sk_peer_pid/sk_peer_cred are copied to the client in copy_peercred(). Then, the client's sk_peer_pid and sk_peer_cred are always NULL, so we need not call put_pid() and put_cred() there. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit faf489e6896d645a679d3d90a2d1d5d12c6b3e13 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:21 2024 -0700 af_unix: Set sk_peer_pid/sk_peer_cred locklessly for new socket. init_peercred() is called in 3 places: 1. socketpair() : both sockets 2. connect() : child socket 3. listen() : listening socket The first two need not hold sk_peer_lock because no one can touch the socket. Let's set cred/pid without holding lock for the two cases and rename the old init_peercred() to update_peercred() to properly reflect the use case. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit 8647ece4814f3bfdb5f7a8e19f882c9b89299a07 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:20 2024 -0700 af_unix: Define locking order for U_RECVQ_LOCK_EMBRYO in unix_collect_skb(). While GC is cleaning up cyclic references by SCM_RIGHTS, unix_collect_skb() collects skb in the socket's recvq. If the socket is TCP_LISTEN, we need to collect skb in the embryo's queue. Then, both the listener's recvq lock and the embroy's one are held. The locking is always done in the listener -> embryo order. Let's define it as unix_recvq_lock_cmp_fn() instead of using spin_lock_nested(). Note that the reverse order is defined for consistency. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit 7202cb591624b860bd7b688d4bd0f5bee79c7f44 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:19 2024 -0700 af_unix: Remove U_LOCK_GC_LISTENER. Commit 1971d13ffa84 ("af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().") added U_LOCK_GC_LISTENER for the old GC, but it's no longer needed for the new GC. Let's remove U_LOCK_GC_LISTENER and unix_state_lock_nested() as there's no user. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit c4da4661d985fd3cbaea3ea6101e2dd0d2ad4b74 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:18 2024 -0700 af_unix: Remove U_LOCK_DIAG. sk_diag_dump_icons() acquires embryo's lock by unix_state_lock_nested() to fetch its peer. The embryo's ->peer is set to NULL only when its parent listener is close()d. Then, unix_release_sock() is called for each embryo after unlinking skb by skb_dequeue(). In sk_diag_dump_icons(), we hold the parent's recvq lock, so we need not acquire unix_state_lock_nested(), and peer is always non-NULL. Let's remove unnecessary unix_state_lock_nested() and non-NULL test for peer. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit b380b18102a0b72a9726077474a2915dfe8bbc08 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:17 2024 -0700 af_unix: Don't acquire unix_state_lock() for sock_i_ino(). sk_diag_dump_peer() and sk_diag_dump() call unix_state_lock() for sock_i_ino() which reads SOCK_INODE(sk->sk_socket)->i_ino, but it's protected by sk->sk_callback_lock. Let's remove unnecessary unix_state_lock(). Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit 98f706de445b464f25220360210a4bcb9cc6c41a Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:16 2024 -0700 af_unix: Define locking order for U_LOCK_SECOND in unix_stream_connect(). While a SOCK_(STREAM|SEQPACKET) socket connect()s to another, we hold two locks of them by unix_state_lock() and unix_state_lock_nested() in unix_stream_connect(). Before unix_state_lock_nested(), the following is guaranteed by checking sk->sk_state: 1. The first socket is TCP_LISTEN 2. The second socket is not the first one 3. Simultaneous connect() must fail So, the client state can be TCP_CLOSE or TCP_LISTEN or TCP_ESTABLISHED. Let's define the expected states as unix_state_lock_cmp_fn() instead of using unix_state_lock_nested(). Note that 2. is detected by debug_spin_lock_before() and 3. cannot be expressed as lock_cmp_fn. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit 1ca27e0c8c13ac50a4acf9cdf77069e2d94a547d Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:15 2024 -0700 af_unix: Don't retry after unix_state_lock_nested() in unix_stream_connect(). When a SOCK_(STREAM|SEQPACKET) socket connect()s to another one, we need to lock the two sockets to check their states in unix_stream_connect(). We use unix_state_lock() for the server and unix_state_lock_nested() for client with tricky sk->sk_state check to avoid deadlock. The possible deadlock scenario are the following: 1) Self connect() 2) Simultaneous connect() The former is simple, attempt to grab the same lock, and the latter is AB-BA deadlock. After the server's unix_state_lock(), we check the server socket's state, and if it's not TCP_LISTEN, connect() fails with -EINVAL. Then, we avoid the former deadlock by checking the client's state before unix_state_lock_nested(). If its state is not TCP_LISTEN, we can make sure that the client and the server are not identical based on the state. Also, the latter deadlock can be avoided in the same way. Due to the server sk->sk_state requirement, AB-BA deadlock could happen only with TCP_LISTEN sockets. So, if the client's state is TCP_LISTEN, we can give up the second lock to avoid the deadlock. CPU 1 CPU 2 CPU 3 connect(A -> B) connect(B -> A) listen(A) --- --- --- unix_state_lock(B) B->sk_state == TCP_LISTEN READ_ONCE(A->sk_state) == TCP_CLOSE ^^^^^^^^^ ok, will lock A unix_state_lock(A) .--------------' WRITE_ONCE(A->sk_state, TCP_LISTEN) | unix_state_unlock(A) | | unix_state_lock(A) | A->sk_sk_state == TCP_LISTEN | READ_ONCE(B->sk_state) == TCP_LISTEN v ^^^^^^^^^^ unix_state_lock_nested(A) Don't lock B !! Currently, while checking the client's state, we also check if it's TCP_ESTABLISHED, but this is unlikely and can be checked after we know the state is not TCP_CLOSE. Moreover, if it happens after the second lock, we now jump to the restart label, but it's unlikely that the server is not found during the retry, so the jump is mostly to revist the client state check. Let's remove the retry logic and check the state against TCP_CLOSE first. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit ed99822817cb728eee8786c1c921c69c6be206fe Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:14 2024 -0700 af_unix: Define locking order for U_LOCK_SECOND in unix_state_double_lock(). unix_dgram_connect() and unix_dgram_{send,recv}msg() lock the socket and peer in ascending order of the socket address. Let's define the order as unix_state_lock_cmp_fn() instead of using unix_state_lock_nested(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Kent Overstreet Signed-off-by: Paolo Abeni commit 3955802f160b5c61ac00d7e54da8d746f2e4a2d5 Author: Kuniyuki Iwashima Date: Thu Jun 20 13:56:13 2024 -0700 af_unix: Define locking order for unix_table_double_lock(). When created, AF_UNIX socket is put into net->unx.table.buckets[], and the hash is stored in sk->sk_hash. * unbound socket : 0 <= sk_hash <= UNIX_HASH_MOD When bind() is called, the socket could be moved to another bucket. * pathname socket : 0 <= sk_hash <= UNIX_HASH_MOD * abstract socket : UNIX_HASH_MOD + 1 <= sk_hash <= UNIX_HASH_MOD * 2 + 1 Then, we call unix_table_double_lock() which locks a single bucket or two. Let's define the order as unix_table_lock_cmp_fn() instead of using spin_lock_nested(). The locking is always done in ascending order of sk->sk_hash, which is the index of buckets/locks array allocated by kvmalloc_array(). sk_hash_A < sk_hash_B <=> &locks[sk_hash_A].dep_map < &locks[sk_hash_B].dep_map So, the relation of two sk->sk_hash can be derived from the addresses of dep_map in the array of locks. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Kent Overstreet Signed-off-by: Paolo Abeni commit 07b87f9eea0c30675084d50c82532d20168da009 Author: Steffen Klassert Date: Thu Jun 20 08:47:24 2024 +0200 xfrm: Fix unregister netdevice hang on hardware offload. When offloading xfrm states to hardware, the offloading device is attached to the skbs secpath. If a skb is free is deferred, an unregister netdevice hangs because the netdevice is still refcounted. Fix this by removing the netdevice from the xfrm states when the netdevice is unregistered. To find all xfrm states that need to be cleared we add another list where skbs linked to that are unlinked from the lists (deleted) but not yet freed. Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Steffen Klassert commit 26149e6fe1e89dc1a74bf6475f7a6e22dc6f85ab Author: Jeff Johnson Date: Mon Jun 24 18:24:07 2024 -0700 drm/ttm/tests: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_device_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_pool_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_resource_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_tt_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_bo_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_mock_manager.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20240624-md-drivers-gpu-drm-ttm-tests-v2-1-76bb765e19c9@quicinc.com Signed-off-by: Christian König commit f6faea753ac8172956eabfafed6137e4c8683091 Author: Bryan Brattlof Date: Fri Jun 21 11:39:38 2024 -0500 cpufreq: ti: update OPP table for AM62Px SoCs More speed grades for the AM62Px SoC family have been defined which unfortunately no longer align with the AM62x table. So create a new table with these new speed grades defined for the AM62Px Reviewed-by: Dhruva Gole Signed-off-by: Bryan Brattlof Signed-off-by: Viresh Kumar commit bc5de740fbdaf2be6bd958e3fa45db87cf262ec1 Author: Bryan Brattlof Date: Fri Jun 21 11:39:37 2024 -0500 cpufreq: ti: update OPP table for AM62Ax SoCs As the AM62Ax SoC family matures more speed grades are being defined. These new grades unfortunately no longer align with the AM62x SoC family. Define a new table with new OPP speed grade limits for the AM62Ax Reviewed-by: Dhruva Gole Signed-off-by: Bryan Brattlof Signed-off-by: Viresh Kumar commit 8657af6c0a9afaa11947b7476119834898823b52 Author: Bartosz Golaszewski Date: Tue Jun 18 13:18:24 2024 +0200 pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc() In order to finally confine the unsafe gpiochip_get_desc() to drivers/gpio/, let's convert this driver to using the safer alternative that takes the gpio_device as argument. Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20240618111824.15593-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 18db1b6dbbe576c283f69f3e925fbeb57de40855 Author: Thomas Gleixner Date: Tue Jun 25 07:40:08 2024 +0200 Revert "Loongarch: Support loongarch avec" This reverts commit 760d7e719499d64beea62bfcf53938fb233bb6e7. This results in build failures and has other issues according to Tianyang. Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Cc: Tianyang Zhang Closes: https://lore.kernel.org/oe-kbuild-all/202406240451.ygBFNyJ3-lkp@intel.com/ commit 85582ad0bc44960def44c78674c0c9b8dc007817 Author: Jouni Högander Date: Wed Jun 19 09:21:31 2024 +0300 drm/i915/psr: Modify dg2_activate_panel_replay to support eDP There are couple of bits in PSR2_CTL which needs to be written in case of eDP Panel Replay Bspec: 68920 v2: use boolean instead of assuming eDP Panel Replay mean Early Transport Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-12-jouni.hogander@intel.com commit 623ad75a014864d3551ca2aa83ce19458ef1299e Author: Jouni Högander Date: Wed Jun 19 09:21:30 2024 +0300 drm/i915/psr: Check Early Transport for Panel Replay as well Move Early Transport validity check to be performed for Panel Replay as well and use Early Transport for eDP Panel Replay always. v2:set crtc_state->enable_psr2_su_region_et directly (not in if block) Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-11-jouni.hogander@intel.com commit 0cd2bdbf19ac4d77be47564a678618fa70681474 Author: Jouni Högander Date: Wed Jun 19 09:21:29 2024 +0300 drm/i915/psr: Perform scanline indication check for Panel Replay as well Scanline indication needs to be checked and configure for both PSR2 and Panel Replay Selective Update. Move this check to intel_sel_update_config_valid. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-10-jouni.hogander@intel.com commit a18114ebaaa89284d9da7d0f80bafcf8848ef520 Author: Jouni Högander Date: Wed Jun 19 09:21:28 2024 +0300 drm/i915/psr: Perform psr2 checks related to ALPM for Panel Replay eDP1.5 support ALPM with Panel Replay as well. We need to check ALPM related things for Panel Replay as well. Bspec: 68920 v5: - instead of using crtc_state->has_panel_replay provide aux_less flag v4: - do not move _compute_psr2_sdp_prior_scanline_indication - move ALPM related checks to separate function v3: move vblank check as well v2: do not move Vblank >= PSR2_CTL Block Count Number maximum line count check Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-9-jouni.hogander@intel.com commit 5d81c2986926d61dec0eb7dc5e96c4b40bf3d95e Author: Jouni Högander Date: Wed Jun 19 09:21:27 2024 +0300 drm/i915/alpm: Make crtc_state as const in intel_alpm_compute_params Intel_alpm_compute_params doesn't change crtc_state. Let's convert it as const. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-8-jouni.hogander@intel.com commit 0bc96a4ba99a9ef35a9cac55cc1772016ff890a2 Author: Jouni Högander Date: Wed Jun 19 09:21:26 2024 +0300 drm/i915/psr: HW will not allow PR on eDP when HDCP enabled Take into account in Panel Replay compute config that HW will not allow PR on eDP when HDCP enabled. v2: add debug message to print out why Panel Replay is not possible Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-7-jouni.hogander@intel.com commit 397b51ef1ab28b1c807c042f455b47c720984473 Author: Jouni Högander Date: Wed Jun 19 09:21:25 2024 +0300 drm/i915/psr: 128b/132b Panel Replay is not supported on eDP Take into account that 128b/132b Panel Replay is not supported on eDP. Bspec: 68920 v2: - make crtc_state as const - add debug message to print out why Panel Replay is not possible Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-6-jouni.hogander@intel.com commit 5d9993f88378a68458af101bfda82754d80fb33f Author: Jouni Högander Date: Wed Jun 19 09:21:24 2024 +0300 drm/i915/psr: Check panel Early Transport capability for eDP PR Our HW doesn't support panel replay without Early Transport on eDP. Bspec: 68920 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-5-jouni.hogander@intel.com commit 303474913271af4eb3ec1c5f955d1e01682f3e1f Author: Jeff Johnson Date: Wed Jun 19 13:59:15 2024 -0700 KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.ko make allmodconfig && make W=1 C=1 reports for lib/test_*.ko: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hexdump.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_dhry.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_firmware.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_sysctl.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hash.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ida.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_list_sort.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_min_heap.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_module.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_sort.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_static_keys.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_static_key_base.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_memcat_p.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_blackhole_dev.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_meminit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_free_pages.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_kprobes.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ref_tracker.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bits.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240619-md-lib-test-v2-1-301e30eeba1e@quicinc.com Signed-off-by: Jeff Johnson Reviewed-by: Kees Cook Reviewed-by: Masami Hiramatsu (Google) Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: Masami Hiramatsu (Google) Cc: "Naveen N. Rao" Signed-off-by: Andrew Morton commit d2917ff19962951399bc33f596648836cc5a0be4 Author: Suren Baghdasaryan Date: Fri Jun 14 21:13:58 2024 -0700 lib/dump_stack: report process UID in dump_stack_print_info() To make it easier to identify the crashing process, report effective UID when dumping the stack. Link: https://lkml.kernel.org/r/20240615041358.103791-1-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 326c34efe3d1761686c385ff774b00012f1e1fc0 Author: Sidhartha Kumar Date: Mon Jun 17 12:52:21 2024 -0700 tools/testing/radix-tree: add missing MODULE_DESCRIPTION definition Userspace builds of the radix-tree testing suite fails because of commit test_maple_tree: add the missing MODULE_DESCRIPTION() macro. Add the proper defines to tools/testing/radix-tree/maple.c and tools/testing/radix-tree/xarray.c so MODULE_DESCRIPTION has a definition. This allows the build to succeed. Link: https://lkml.kernel.org/r/20240617195221.106565-1-sidhartha.kumar@oracle.com Fixes: 9f8090e8c4d1 ("test_maple_tree: add the missing MODULE_DESCRIPTION() macro") Signed-off-by: Sidhartha Kumar Reviewed-by: Liam R. Howlett Cc: Jeff Johnson Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 03bf0044e13ad6f20b6b4513131b73b090b9dbb8 Author: Christophe JAILLET Date: Fri Jun 14 22:57:09 2024 +0200 ocfs2: constify struct ocfs2_stack_operations "struct ocfs2_stack_operations" are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct ocfs2_stack_plugin" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 6241 644 0 6885 1ae5 fs/ocfs2/stack_o2cb.o After: ===== text data bss dec hex filename 6337 548 0 6885 1ae5 fs/ocfs2/stack_o2cb.o Link: https://lkml.kernel.org/r/f52dab89ee0049ec6271de29183a781efbb275ab.1718398605.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton commit 3ebe69c0c3ae3ef5ecd1ad86aa98a3b7cbe3c7e9 Author: Christophe JAILLET Date: Fri Jun 14 18:25:07 2024 +0200 ocfs2: constify struct ocfs2_lock_res_ops "struct ocfs2_lock_res_ops" are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct ocfs2_lock_res" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 83038 2632 400 86070 15036 fs/ocfs2/dlmglue.o After: ===== text data bss dec hex filename 83806 1992 272 86070 15036 fs/ocfs2/dlmglue.o Link: https://lkml.kernel.org/r/43d3e2ae3a97d3cbe93d6ba6ce48ae5ec04d7526.1718382288.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton commit c8dab79f9eef6f1063128f1340f266321cccd17c Author: I Hsin Cheng Date: Fri Jun 14 23:46:03 2024 +0800 lib/plist.c: avoid worst case scenario in plist_add Worst case scenario of plist_add() happens when the priority of the inserted plist_node is going to be the largest after the insertion is done. The cost is going to be more significant when the original plist is longer, because the iterator is going to traverse the whole plist to find the correct position to insert the new node. The situation can be avoided by using a reverse iterator at the same time, doing so the maximum possible number of iteration is going to shrink from N to N/2. The proposed change of plist_add pasts the test in lib/plist.c to validate its correctness, also add the worst case scenario test for plist_add() in plist_test(). The worst case test are tested with the size of test_data and test_node growing from 200 to 1000. The result are showned in the following table, in which we can observed that the proposed change of plist_add performs better than the original version, and the difference between these two implementations are more significant with the size of N growing. The random case test [1], and best case test [2] are also provided, with result showing the proposed change performs slightly better in random case test while the original implementation performs slightly better in best case test, while the difference in both test are minor, we can see them as even in those two situations. ----------------------------------------------------------- | Test size | 200 | 400 | 600 | 800 | 1000 | ----------------------------------------------------------- | new_plist_add | 140911| 548681| 1220512| 2048493| 3763755| ----------------------------------------------------------- | old_plist_add | 188198| 774222| 1643547| 3008929| 4947435| ----------------------------------------------------------- Link: https://lkml.kernel.org/r/20240614154603.65203-1-richard120310@gmail.com Signed-off-by: I Hsin Cheng Signed-off-by: Ching-Chun (Jim) Huang Signed-off-by: Andrew Morton commit abd8ac05570cf1488a311f95c4c539fbe119d5da Author: Yongliang Gao Date: Thu Jun 13 11:31:59 2024 +0800 hung_task: ignore hung_task_warnings when hung_task_panic is enabled If hung_task_panic is enabled, don't consider the value of hung_task_warnings and display the information of the hung tasks. In some cases, hung_task_panic might not be initially set up, after several hung tasks occur, the hung_task_warnings count reaches zero. If hung_task_panic is set up later, it may not display any helpful hung task info in dmesg, only showing messages like: Kernel panic - not syncing: hung_task: blocked tasks CPU: 3 PID: 58 Comm: khungtaskd Not tainted 6.10.0-rc3 #19 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: panic+0x2f3/0x320 watchdog+0x2dd/0x510 ? __pfx_watchdog+0x10/0x10 kthread+0xe0/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2f/0x40 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Link: https://lkml.kernel.org/r/20240613033159.3446265-1-leonylgao@gmail.com Signed-off-by: Yongliang Gao Reviewed-by: Huang Cun Cc: Joel Granados Cc: John Siddle Cc: Kent Overstreet Signed-off-by: Andrew Morton commit d5d6281ae8e0c929c3ff188652f5b12c680fe8bf Author: Dan Carpenter Date: Tue Jun 11 16:43:29 2024 +0300 checkpatch: check for missing Fixes tags This check looks for common words that probably indicate a patch is a fix. For now the regex is: (?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/) Why are stable patches encouraged to have a fixes tag? Some people mark their stable patches as "# 5.10" etc. This is useful but a Fixes tag is still a good idea. For example, the Fixes tag helps in review. It helps people to not cherry-pick buggy patches without also cherry-picking the fix. Also if a bug affects the 5.7 kernel some people will round it up to 5.10+ because 5.7 is not supported on kernel.org. It's possible the Bad Binder bug was caused by this sort of gap where companies outside of kernel.org are supporting different kernels from kernel.org. Should it be counted as a Fix when a patch just silences harmless WARN_ON() stack trace. Yes. Definitely. Is silencing compiler warnings a fix? It seems unfair to the original authors, but we use -Werror now, and warnings break the build so let's just add Fixes tags. I tell people that silencing static checker warnings is not a fix but the rules on this vary by subsystem. Is fixing a minor LTP issue (Linux Test Project) a fix? Probably? It's hard to know what to do if the LTP test has technically always been broken. One clear false positive from this check is when someone updated their debug output and included before and after Call Traces. Or when crashes are introduced deliberately for testing. In those cases, you should just ignore checkpatch. Link: https://lkml.kernel.org/r/ZmhUgZBKeF_8ixA6@moroto Signed-off-by: Dan Carpenter Acked-by: Greg Kroah-Hartman Reviewed-by: Kees Cook Cc: Andy Whitcroft Cc: Arnd Bergmann Cc: Dwaipayan Ray Cc: Joe Perches Cc: Lukas Bulwahn Cc: Sasha Levin Cc: Thorsten Leemhuis Signed-off-by: Andrew Morton commit d6bb39519aafed9800213db064104dd29699b939 Author: Wolfram Sang Date: Mon Jun 10 17:02:09 2024 +0200 checkpatch: really skip LONG_LINE_* when LONG_LINE is ignored For a printout to happen, all types must be set to "show". So, AND is needed for the flags, not OR, if we want to ignore something. Link: https://lkml.kernel.org/r/20240610150420.2279-2-wsa+renesas@sang-engineering.com Fixes: 47e0c88b37a5 ("checkpatch: categorize some long line length checks") Signed-off-by: Wolfram Sang Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit 68142cb628f75a22f12fde9f5c0c69dfc1bdcf47 Author: Ryusuke Konishi Date: Tue Jun 11 01:00:29 2024 +0900 nilfs2: do not call inode_attach_wb() directly Call mark_buffer_dirty() for segment summary and super root block buffers on the backing device's page cache, thereby indirectly calling inode_attach_wb(). Then remove the no longer needed call to inode_attach_wb() in nilfs_attach_log_writer(), resolving the concern about its layer-violating use. Link: https://lkml.kernel.org/r/20240610160029.7673-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 25fa5f9923383784bbf2423ccc84f75615e4b12d Author: Ryusuke Konishi Date: Tue Jun 11 01:00:28 2024 +0900 nilfs2: prepare backing device folios for writing after adding checksums Patch series "nilfs2: eliminate the call to inode_attach_wb()". This series eliminates the inode_attach_wb() call from nilfs2, which was introduced as a workaround for a kernel bug but is suspected of layer violation (in fact, it is undesirable since it exposes a reference to the backing device). Removal of the inode_attach_wb() call is done by simply using mark_buffer_dirty() on the backing device's buffers. To use it safely, this series will prepare it in patch 1/2, and perform the replacement itself in patch 2/2. This patch (of 2): In preparation for inode_attach_wb(), which is currently called when attaching the log writer, to be done via mark_buffer_dirty(), change the order of preparation for log writing. Specifically, the function call that adds checksums to segment summary and super root blocks, which correspond to the log header and trailer, is made before starting writeback of folios containing those blocks. The current steps are as follows: 1. Put the folios of segment summary blocks in writeback state. 2. Put the folios of data blocks, metadata file blocks, and btree node blocks (collectively called payload blocks) into writeback state. 3. Put the super root block folio in writeback state. 4. Add checksums. Change these as follows: 1. Put the folios of payload blocks in writeback state. 2. Add checksums. 3. Put the folios of segment summary blocks in writeback state. 4. Put the super root block folio in writeback state. In this order, the contents of segment summaries and super root block that directly use buffer/folio of the backing device can be determined including the addition of checksums, before preparing to write. Step (1), which puts the payload block folios in writeback state, is performed first because if there are memory-mapped data blocks, a valid checksum can only be calculated after step (1). Link: https://lkml.kernel.org/r/20240610160029.7673-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit cda1c8e0c33d3e06ef8e912ab1b16f00e4d5d088 Author: Christophe JAILLET Date: Sat Jun 8 16:34:20 2024 +0200 proc: remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_max() is inclusive. So a -1 has been added when needed. Link: https://lkml.kernel.org/r/ae10003feb87d240163d0854de95f09e1f00be7d.1717855701.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Matthew Wilcox (Oracle) Cc: Alexey Dobriyan Cc: Alistar Popple Cc: Christian Gromm Cc: Eddie James Cc: Jeremy Kerr Cc: Joel Stanley Cc: Parthiban Veerasooran Signed-off-by: Andrew Morton commit b737a221702c7b6080a72ab671eac938f4768318 Author: Christophe JAILLET Date: Sat Jun 8 16:34:19 2024 +0200 most: remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Link: https://lkml.kernel.org/r/ddbb2e3f249ba90417dc7ab01713faa1091fb44c.1717855701.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Parthiban Veerasooran Cc: Alexey Dobriyan Cc: Alistar Popple Cc: Christian Gromm Cc: Eddie James Cc: Jeremy Kerr Cc: Joel Stanley Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 08ab0915831d454ecf220c14df5dea35933468e7 Author: Christophe JAILLET Date: Sat Jun 8 16:34:18 2024 +0200 fsi: occ: remove usage of the deprecated ida_simple_xx() API Patch series "Remove usage of the deprecated ida_simple_xx() API". The series removes the *last* usages of the deprecated ida_simple_xx() API. This patch (of 3): ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_range() is inclusive. So, this upper limit, INT_MAX, should have been changed to INT_MAX-1. But, it is likely that the INT_MAX 'idx' is valid that the max value passed to ida_simple_get() should have been 0. So, allow this INT_MAX 'idx' value now. Link: https://lkml.kernel.org/r/cover.1717855701.git.christophe.jaillet@wanadoo.fr Link: https://lkml.kernel.org/r/8e28b0c45fe8f28ca4475fe0027f8099c41259f0.1717855701.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Eddie James Cc: Alistar Popple Cc: Christian Gromm Cc: Jeremy Kerr Cc: Joel Stanley Cc: Matthew Wilcox (Oracle) Cc: Parthiban Veerasooran Cc: Alexey Dobriyan Signed-off-by: Andrew Morton commit 5eb1911a8c63f0e10a5f746f52fcc3c9bbfbc710 Author: Wenchao Hao Date: Thu Jun 6 17:14:27 2024 +0800 crash: remove header files which are included more than once Following warning is reported, so remove these duplicated header including: ./kernel/crash_reserve.c: linux/kexec.h is included more than once. This is just a clean code, no logic changed. Link: https://lkml.kernel.org/r/20240606091427.3512314-1-haowenchao22@gmail.com Signed-off-by: Wenchao Hao Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Signed-off-by: Andrew Morton commit e7679a5c820d0865d0900931a7341048d830917d Author: Alexey Dobriyan Date: Fri Jun 7 18:14:29 2024 +0300 proc: test "Kthread:" field /proc/${pid}/status got Kthread field recently. Test that userspace program is not reported as kernel thread. Test that kernel thread is reported as kernel thread. Use kthreadd with pid 2 for this. Link: https://lkml.kernel.org/r/818c4c41-8668-4566-97a9-7254abf819ee@p183 Signed-off-by: Alexey Dobriyan Cc: Chunguang Wu Cc: Shuah Khan Signed-off-by: Andrew Morton commit d0bff054053f7a46a3819aba55ad803aa639ed7e Author: Brian Masney Date: Fri Jun 7 11:24:43 2024 -0400 lib/Kconfig.debug: document panic= command line option and procfs entry for PANIC_TIMEOUT PANIC_TIMEOUT can also be controlled with the panic= kernel command line option and the file /proc/sys/kernel/panic. Let's document both of these in the Kconfig help text. Link: https://lkml.kernel.org/r/20240607152443.925168-1-bmasney@redhat.com Signed-off-by: Brian Masney Reviewed-by: Javier Martinez Canillas Signed-off-by: Andrew Morton commit 09aaf15a7826717b75d2b4305daaee099636ca5c Author: Jeff Johnson Date: Fri May 31 16:45:16 2024 -0700 lib/test_linear_ranges: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_linear_ranges.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-test_linear_ranges-v1-1-053a1aad37c6@quicinc.com Signed-off-by: Jeff Johnson Reviewed-by: Matti Vaittinen Cc: Mark Brown Signed-off-by: Andrew Morton commit 7ef148daa56dfcad7b554a79c28b8e94726771a5 Author: Jeff Johnson Date: Fri May 31 17:23:09 2024 -0700 lib/test_kmod: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_kmod.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-test_kmod-v1-1-fdf11bc6095e@quicinc.com Signed-off-by: Jeff Johnson Reviewed-by: Lucas De Marchi Cc: Luis Chamberlain Signed-off-by: Andrew Morton commit d46a555d3cd97132e21014b28a459c928925fa0f Author: Jeff Johnson Date: Fri May 31 18:49:47 2024 -0700 siphash: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/siphash_kunit.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-siphash_kunit-v1-1-38688065b796@quicinc.com Signed-off-by: Jeff Johnson Cc: Jason A. Donenfeld Signed-off-by: Andrew Morton commit 683da20738fd3e0687a939b684c4a94a09de096c Author: Jeff Johnson Date: Fri May 31 19:19:09 2024 -0700 uuid: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_uuid.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-test_uuid-v1-1-67fa498104c0@quicinc.com Signed-off-by: Jeff Johnson Acked-by: Andy Shevchenko Signed-off-by: Andrew Morton commit 1c5a13b39daf823b4b0349ef2345bf997cb8c257 Author: Jeff Johnson Date: Sat Jun 1 10:53:34 2024 -0700 kunit: add missing MODULE_DESCRIPTION() macros to lib/*.c make allmodconfig && make W=1 C=1 reports for lib/*kunit: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/bitfield_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/checksum_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/cmdline_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/is_signed_type_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/overflow_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/stackinit_kunit.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240601-md-lib-kunit-tests-v1-1-4493fe0032b9@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton commit 2e29fcb7743649649418e9aadcbcf032d2ec488f Author: Jeff Johnson Date: Sat Jun 1 16:09:47 2024 -0700 lib/asn1_encoder: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/asn1_encoder.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240601-md-lib-asn1_encoder-v1-1-8c634ed2d2e8@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton commit f069e33dafe17aab332e6671275cc61d16795064 Author: Jeff Johnson Date: Sat Jun 1 16:33:23 2024 -0700 KUnit: add missing MODULE_DESCRIPTION() macros for lib/*_test.ko make allmodconfig && make W=1 C=1 reports for lib/*_test.ko: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/atomic64_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/hashtable_test.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240601-md-lib-test2-v1-1-be764b785f17@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton commit e471831be2bea5f253396796c7691209c0065c65 Author: Jeff Johnson Date: Fri May 31 15:45:22 2024 -0700 kunit/fortify: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/memcpy_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/fortify_kunit.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-md-lib-fortify_source-v1-1-2c37f7fbaafc@quicinc.com Signed-off-by: Jeff Johnson Cc: Kees Cook Signed-off-by: Andrew Morton commit 2f183c68345a26213e5e7f798399bee68d1c4a97 Author: Jani Nikula Date: Fri May 31 12:04:57 2024 +0300 kernel/panic: add verbose logging of kernel taints in backtraces With nearly 20 taint flags and respective characters, it's getting a bit difficult to remember what each taint flag character means. Add verbose logging of the set taints in the format: Tainted: [P]=PROPRIETARY_MODULE, [W]=WARN in dump_stack_print_info() when there are taints. Note that the "negative flag" G is not included. Link: https://lkml.kernel.org/r/7321e306166cb2ca2807ab8639e665baa2462e9c.1717146197.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit f36fc96c15bd860776ffc66e53bdeeb791b6f442 Author: Jani Nikula Date: Fri May 31 12:04:56 2024 +0300 kernel/panic: initialize taint_flags[] using a macro Make it easier to extend struct taint_flags in follow-up. Link: https://lkml.kernel.org/r/8a2498285d37953cfad9dce939ed3abef61051bd.1717146197.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit aff1db0e4eb579a06290d7054871383aa0607015 Author: Jani Nikula Date: Fri May 31 12:04:55 2024 +0300 kernel/panic: convert print_tainted() to use struct seq_buf internally Convert print_tainted() to use struct seq_buf internally in order to be more aware of the buffer constraints as well as make it easier to extend in follow-up work. Link: https://lkml.kernel.org/r/cb6006fa7c0f82a6b6885e8eea2920fcdc4fc9d0.1717146197.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit f4b62423383e7a26eb1a6ce0fc52c472ed955d6f Author: Jani Nikula Date: Fri May 31 12:04:54 2024 +0300 kernel/panic: return early from print_tainted() when not tainted Reduce indent to make follow-up changes slightly easier on the eyes. Link: https://lkml.kernel.org/r/01d6c03de1c9d1b52b59c652a3704a0a9886ed63.1717146197.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit 21516c56ffe280d547af656fa9ba0ae62779ec98 Author: Jeff Johnson Date: Fri May 31 08:14:56 2024 -0700 lib/ts: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/ts_kmp.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/ts_bm.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/ts_fsm.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/20240531-lib-ts-v1-1-03d7f3546c49@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton commit 6d74e1e371d43a7b378d1cb8cd1bb1007f1a8580 Author: Kuan-Wei Chiu Date: Sun May 26 07:02:06 2024 +0800 tools/lib/list_sort: remove redundant code for cond_resched handling Since cond_resched() is not called in userspace, remove the redundant code in userspace's list_sort() implementation. This change eliminates the unused 'count' variable and the associated logic for invoking cmp() periodically, which was intended to trigger cond_resched() in kernel space. The removed code includes: - Declaration and increment of the 'count' variable. - Conditional invocation of cmp() based on 'count'. This cleanup simplifies merge_final(), avoids unnecessary overhead, and has no impact on the functionality of list_sort() in userspace. Link: https://lkml.kernel.org/r/20240525230206.1077536-1-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Ching-Chun (Jim) Huang Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit 7abcb84f953df037d40fad66f2109db318dd155b Author: I Hsin Cheng Date: Sun May 26 22:01:39 2024 +0800 lib/plist.c: enforce memory ordering in plist_check_list There exists an iteration over a plist in plist_check_list(), and memory dependency exists between variables "prev", "next" and "prev->next". As plist is used in the scheduling subsystem, we should guarantee the memory ordering between multiple processors. Using macro "WRITE_ONCE()" can help us to ensure the memory ordering as it was stated in "Documentation/memory-barriers.txt". Link: https://lkml.kernel.org/r/20240526140139.17220-1-richard120310@gmail.com Signed-off-by: I Hsin Cheng Signed-off-by: Andrew Morton commit 87beb66918f83700c8cfe8309b64b80dc48c6ef5 Author: Wen Yang Date: Mon May 27 08:02:00 2024 +0800 selftests: introduce additional eventfd test coverage Add several new test cases which assert corner cases on the eventfd mechanism, for example, the supplied buffer is less than 8 bytes, attempting to write a value that is too large, etc. ./eventfd_test # Starting 9 tests from 1 test cases. # RUN global.eventfd_check_flag_rdwr ... # OK global.eventfd_check_flag_rdwr ok 1 global.eventfd_check_flag_rdwr # RUN global.eventfd_check_flag_cloexec ... # OK global.eventfd_check_flag_cloexec ok 2 global.eventfd_check_flag_cloexec # RUN global.eventfd_check_flag_nonblock ... # OK global.eventfd_check_flag_nonblock ok 3 global.eventfd_check_flag_nonblock # RUN global.eventfd_chek_flag_cloexec_and_nonblock ... # OK global.eventfd_chek_flag_cloexec_and_nonblock ok 4 global.eventfd_chek_flag_cloexec_and_nonblock # RUN global.eventfd_check_flag_semaphore ... # OK global.eventfd_check_flag_semaphore ok 5 global.eventfd_check_flag_semaphore # RUN global.eventfd_check_write ... # OK global.eventfd_check_write ok 6 global.eventfd_check_write # RUN global.eventfd_check_read ... # OK global.eventfd_check_read ok 7 global.eventfd_check_read # RUN global.eventfd_check_read_with_nonsemaphore ... # OK global.eventfd_check_read_with_nonsemaphore ok 8 global.eventfd_check_read_with_nonsemaphore # RUN global.eventfd_check_read_with_semaphore ... # OK global.eventfd_check_read_with_semaphore ok 9 global.eventfd_check_read_with_semaphore # PASSED: 9 / 9 tests passed. # Totals: pass:9 fail:0 xfail:0 xpass:0 skip:0 error:0 Link: https://lkml.kernel.org/r/20240527000200.5615-1-wen.yang@linux.dev Signed-off-by: Wen Yang Cc: Shuah Khan Cc: Christian Brauner Cc: Andrei Vagin Cc: Mathieu Desnoyers Cc: Steven Rostedt Cc: Dave Young Cc: Tim Bird Signed-off-by: Andrew Morton commit 51d821654be4286b005ad2b7dc8b973d5008a2ec Author: Mateusz Guzik Date: Tue May 28 22:42:57 2024 +0200 percpu_counter: add a cmpxchg-based _add_batch variant Interrupt disable/enable trips are quite expensive on x86-64 compared to a mere cmpxchg (note: no lock prefix!) and percpu counters are used quite often. With this change I get a bump of 1% ops/s for negative path lookups, plugged into will-it-scale: void testcase(unsigned long long *iterations, unsigned long nr) { while (1) { int fd = open("/tmp/nonexistent", O_RDONLY); assert(fd == -1); (*iterations)++; } } The win would be higher if it was not for other slowdowns, but one has to start somewhere. Link: https://lkml.kernel.org/r/20240528204257.434817-1-mjguzik@gmail.com Signed-off-by: Mateusz Guzik Acked-by: Vlastimil Babka Acked-by: Dennis Zhou Cc: Hugh Dickins Cc: Tejun Heo Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 727759d748ed34cc8d3e1d215fbc1766010dee3d Author: John Hubbard Date: Mon May 27 13:08:35 2024 -0700 selftests/mqueue: fix 5 warnings about signed/unsigned mismatches When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about several cases of using a signed integer for the priority argument to mq_receive(3), which expects an unsigned int. Fix this by declaring the type as unsigned int in all cases. Link: https://lkml.kernel.org/r/20240527200835.143682-1-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Reviewed-by: Ryan Roberts Cc: David Hildenbrand Cc: Muhammad Usama Anjum Cc: SeongJae Park Cc: Shuah Khan Cc: Valentin Obst Signed-off-by: Andrew Morton commit 54ce43da25816e6134ffc777b02f9a720d07a8db Author: Kuan-Wei Chiu Date: Tue May 28 04:30:11 2024 +0800 lib/test_sort: add a testcase to ensure code coverage The addition of an if statement in lib/sort to handle the final unsorted 2 or 3 elements is not covered by existing test cases, leading to incomplete test coverage. To ensure comprehensive testing and maintain 100% code coverage, add a new testcase for scenarios where the if statement is triggered. Since the if statement is only triggered when the array length is odd and the first element is greater than the second element, a testcase is created using an array length of TEST_LEN - 1 and a suitable random seed to maintain full code coverage. Link: https://lkml.kernel.org/r/20240527203011.1644280-5-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Ching-Chun (Jim) Huang Signed-off-by: Andrew Morton commit 41ed7804350839608308fed0225894fdab8b71fd Author: Kuan-Wei Chiu Date: Tue May 28 04:30:10 2024 +0800 lib/sort: optimize heapsort for handling final 2 or 3 elements After building the heap, the code continuously pops two elements from the heap until only 2 or 3 elements remain, at which point it switches back to a regular heapsort with one element popped at a time. However, to handle the final 2 or 3 elements, an additional else-if statement in the while loop was introduced, potentially increasing branch misses. Moreover, when there are only 2 or 3 elements left, continuing with regular heapify operations is unnecessary as these cases are simple enough to be handled with a single comparison and 1 or 2 swaps outside the while loop. Eliminating the additional else-if statement and directly managing cases involving 2 or 3 elements outside the loop reduces unnecessary conditional branches resulting from the numerous loops and conditionals in heapify. This optimization maintains consistent numbers of comparisons and swaps for arrays with even lengths while reducing swaps and comparisons for arrays with odd lengths from 2.5 swaps and 1 comparison to 1.5 swaps and 1 comparison. Link: https://lkml.kernel.org/r/20240527203011.1644280-4-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Ching-Chun (Jim) Huang Signed-off-by: Andrew Morton commit f49ac9571b8f1de4dfcce941a936a4d19dd7bb8a Author: Kuan-Wei Chiu Date: Tue May 28 04:30:09 2024 +0800 lib/sort: fix outdated comment regarding glibc qsort() The existing comment in lib/sort refers to glibc qsort() using quicksort. However, glibc qsort() no longer uses quicksort; it now uses mergesort and falls back to heapsort if memory allocation for mergesort fails. This makes the comment outdated and incorrect. Update the comment to refer to quicksort in general rather than glibc's implementation to provide accurate information about the comparisons and trade-offs without implying an outdated implementation. Link: https://lkml.kernel.org/r/20240527203011.1644280-3-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Ching-Chun (Jim) Huang Signed-off-by: Andrew Morton commit 85fb11a87921a017e5551835eaaf58f9da173686 Author: Kuan-Wei Chiu Date: Tue May 28 04:30:08 2024 +0800 lib/sort: remove unused pr_fmt macro Patch series "lib/sort: Optimizations and cleanups". This patch series optimizes the handling of the last 2 or 3 elements in lib/sort and adds a testcase in lib/test_sort to maintain 100% code coverage reflecting this change. Additionally, it corrects outdated descriptions regarding glibc qsort() and removes the unused pr_fmt macro. This patch (of 4): The pr_fmt macro is defined but not used in lib/sort.c. Since there are no pr_* functions printing any messages, the pr_fmt macro is redundant and can be safely removed. Link: https://lkml.kernel.org/r/20240527203011.1644280-1-visitorckw@gmail.com Link: https://lkml.kernel.org/r/20240527203011.1644280-2-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Cc: Ching-Chun (Jim) Huang Signed-off-by: Andrew Morton commit e1b6705bcfb2797ea182e313d5ec4f57fa8571f2 Author: Yury Norov Date: Mon May 27 17:56:48 2024 -0700 cpumask: make core headers including cpumask_types.h where possible Now that cpumask types are split out to a separate smaller header, many frequently included core headers may switch to using it. Link: https://lkml.kernel.org/r/20240528005648.182376-7-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amit Daniel Kachhap Cc: Anna-Maria Behnsen Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Dennis Zhou Cc: Frederic Weisbecker Cc: Johannes Weiner Cc: Juri Lelli Cc: Kees Cook Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Rasmus Villemoes Cc: Tejun Heo Cc: Thomas Gleixner Cc: Ulf Hansson Cc: Vincent Guittot Cc: Viresh Kumar Cc: Yury Norov Signed-off-by: Andrew Morton commit 7f36688f126ba4a4ec510fa81466b1dacdec97ee Author: Yury Norov Date: Mon May 27 17:56:47 2024 -0700 cpumask: cleanup core headers inclusion Many core headers include cpumask.h for nothing. Drop it. Link: https://lkml.kernel.org/r/20240528005648.182376-6-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amit Daniel Kachhap Cc: Anna-Maria Behnsen Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Dennis Zhou Cc: Frederic Weisbecker Cc: Johannes Weiner Cc: Juri Lelli Cc: Kees Cook Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Rasmus Villemoes Cc: Tejun Heo Cc: Thomas Gleixner Cc: Ulf Hansson Cc: Vincent Guittot Cc: Viresh Kumar Cc: Yury Norov Signed-off-by: Andrew Morton commit 361c1f04f3b43b00997b2845c7a9e1d0a9b4c38a Author: Yury Norov Date: Mon May 27 17:56:46 2024 -0700 sched: drop sched.h dependency on cpumask sched.h needs cpumask.h mostly for types declaration. Now that we have cpumask_types.h, which is a significantly smaller header, we can rely on it. The only exception is UP stub for set_cpus_allowed_ptr(). The function needs to test bit #0 in a @new_mask, which can be trivially opencoded. Link: https://lkml.kernel.org/r/20240528005648.182376-5-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amit Daniel Kachhap Cc: Anna-Maria Behnsen Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Dennis Zhou Cc: Frederic Weisbecker Cc: Johannes Weiner Cc: Juri Lelli Cc: Kees Cook Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Rasmus Villemoes Cc: Tejun Heo Cc: Thomas Gleixner Cc: Ulf Hansson Cc: Vincent Guittot Cc: Viresh Kumar Cc: Yury Norov Signed-off-by: Andrew Morton commit eb4faa36d674eed60a522a72a3a40384f4b285d4 Author: Yury Norov Date: Mon May 27 17:56:45 2024 -0700 cpumask: split out include/linux/cpumask_types.h Many core headers, like sched.h, include cpumask.h mostly for struct cpumask and cpumask_var_t. Those are frequently used headers and shouldn't pull more than the bare minimum. Link: https://lkml.kernel.org/r/20240528005648.182376-4-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amit Daniel Kachhap Cc: Anna-Maria Behnsen Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Dennis Zhou Cc: Frederic Weisbecker Cc: Johannes Weiner Cc: Juri Lelli Cc: Kees Cook Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Rasmus Villemoes Cc: Tejun Heo Cc: Thomas Gleixner Cc: Ulf Hansson Cc: Vincent Guittot Cc: Viresh Kumar Signed-off-by: Andrew Morton commit 7c45d8282660cf4ce011d96bf918df50b7481b3c Author: Yury Norov Date: Mon May 27 17:56:44 2024 -0700 sched: avoid using ilog2() in sched.h indirectly via cpumask.h path includes the ilog2.h header to calculate ilog2(TASK_REPORT_MAX). The following patches drops sched.h dependency on cpumask.h, and to have a successful build, the header has to be included explicitly. sched.h is a frequently included header, and it's better to keep the dependency list as small as possible. So, instead of including ilog2.h for a single BUILD_BUG_ON() check, the same check may be implemented by taking exponent of the other part of equation. Link: https://lkml.kernel.org/r/20240528005648.182376-3-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amit Daniel Kachhap Cc: Anna-Maria Behnsen Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Dennis Zhou Cc: Frederic Weisbecker Cc: Johannes Weiner Cc: Juri Lelli Cc: Kees Cook Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Rasmus Villemoes Cc: Tejun Heo Cc: Thomas Gleixner Cc: Ulf Hansson Cc: Vincent Guittot Cc: Viresh Kumar Cc: Yury Norov Signed-off-by: Andrew Morton commit 5b1a6373aa61f2902ea4922ec4a168703f720b2c Author: Yury Norov Date: Mon May 27 17:56:43 2024 -0700 MAINTAINERS: add linux/nodemask_types.h to BITMAP API Patch series "Cleanup cpumask.h inclusion in core headers". Many core headers include linux/cpumask.h for nothing, and some others include it just for types. We already have nodemask_types.h, and this series adds cpumask_types.h to optimize core headers inclusion paths. Interestingly, it doesn't improve on build time for me, but the headers cleanup work should keep going. This patch (of 6): Commit bea32141764b ("nodemask: Split out include/linux/nodemask_types.h") added the nodemask_types.h but didn't cover it with corresponding record in the MAINTAINERS file. Link: https://lkml.kernel.org/r/20240528005648.182376-1-yury.norov@gmail.com Link: https://lkml.kernel.org/r/20240528005648.182376-2-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amit Daniel Kachhap Cc: Anna-Maria Behnsen Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Dennis Zhou Cc: Frederic Weisbecker Cc: Johannes Weiner Cc: Juri Lelli Cc: Kees Cook Cc: Mathieu Desnoyers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rafael J. Wysocki # for thermal Cc: Rasmus Villemoes Cc: Tejun Heo Cc: Thomas Gleixner Cc: Ulf Hansson Cc: Vincent Guittot Cc: Viresh Kumar Cc: Yury Norov Signed-off-by: Andrew Morton commit 78efbfb5b7675b88d987fda108df0a2f3e07e722 Author: Xiong Nandi Date: Fri May 24 12:26:00 2024 +0800 scripts/decode_stacktrace.sh: better support to ARM32 module stack trace Sometimes there are special characters around module names in stack traces, such as ARM32 with BACKTRACE_VERBOSE in "(%pS)" format, such as: [<806e4845>] (dump_stack_lvl) from [<7f806013>] (hello_init+0x13/0x1000 [test]) In this case, $module will be "[test])", the trace can be decoded by stripping the right parenthesis first: (dump_stack_lvl) from hello_init (/foo/test.c:10) test. Link: https://lkml.kernel.org/r/20240524042600.14738-3-xndchn@gmail.com Signed-off-by: Xiong Nandi Suggested-by: Elliot Berman Cc: Bjorn Andersson Cc: Carlos Llamas Signed-off-by: Andrew Morton commit b41838fe11ce1d2d994210c2c79582499c53e0ca Author: Xiong Nandi Date: Fri May 24 12:25:59 2024 +0800 scripts/decode_stacktrace.sh: wrap nm with UTIL_PREFIX and UTIL_SUFFIX Patch series "scripts/decode_stacktrace.sh: better support to ARM32". This patch (of 2): Since System.map is generated by cross-compile nm tool, we should use it here too. Otherwise host nm may not recognize ARM Thumb-2 instruction address well. Link: https://lkml.kernel.org/r/20240524042600.14738-1-xndchn@gmail.com Link: https://lkml.kernel.org/r/20240524042600.14738-2-xndchn@gmail.com Signed-off-by: Xiong Nandi Reviewed-by: Elliot Berman Cc: Bjorn Andersson Cc: Carlos Llamas Signed-off-by: Andrew Morton commit 1fcce6b8a768b7fc0bc788abd79658cbf9b21536 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:58 2024 +0800 bcachefs: remove heap-related macros and switch to generic min_heap Drop the heap-related macros from bcachefs and replacing them with the generic min_heap implementation from include/linux. By doing so, code readability is improved by using functions instead of macros. Moreover, the min_heap implementation in include/linux adopts a bottom-up variation compared to the textbook version currently used in bcachefs. This bottom-up variation allows for approximately 50% reduction in the number of comparison operations during heap siftdown, without changing the number of swaps, thus making it more efficient. [visitorckw@gmail.com: fix missing assignment of minimum element] Link: https://lkml.kernel.org/r/20240602174828.1955320-1-visitorckw@gmail.com Link: https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu Link: https://lkml.kernel.org/r/20240524152958.919343-17-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Acked-by: Kent Overstreet Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 866898efbb25bb44fd42848318e46db9e785973a Author: Kuan-Wei Chiu Date: Fri May 24 23:29:57 2024 +0800 bcache: remove heap-related macros and switch to generic min_heap Drop the heap-related macros from bcache and replacing them with the generic min_heap implementation from include/linux. By doing so, code readability is improved by using functions instead of macros. Moreover, the min_heap implementation in include/linux adopts a bottom-up variation compared to the textbook version currently used in bcache. This bottom-up variation allows for approximately 50% reduction in the number of comparison operations during heap siftdown, without changing the number of swaps, thus making it more efficient. Link: https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu Link: https://lkml.kernel.org/r/20240524152958.919343-16-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Acked-by: Coly Li Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 7099f74dc31058ee9ac01da5590321173c2b771a Author: Kuan-Wei Chiu Date: Fri May 24 23:29:56 2024 +0800 lib/test_min_heap: add test for heap_del() Add test cases for the min_heap_del() to ensure its functionality is thoroughly tested. Link: https://lkml.kernel.org/r/20240524152958.919343-15-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit e596930fc78b97b71df80df0fb1cbf2efb9fc6e4 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:55 2024 +0800 lib min_heap: update min_heap_push() to use min_heap_sift_up() Update min_heap_push() to use min_heap_sift_up() rather than its origin inline version. Link: https://lkml.kernel.org/r/20240524152958.919343-14-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit bfe3127180418f1b569999954cb653b9926f75ae Author: Kuan-Wei Chiu Date: Fri May 24 23:29:54 2024 +0800 lib min_heap: rename min_heapify() to min_heap_sift_down() After adding min_heap_sift_up(), the naming convention has been adjusted to maintain consistency with the min_heap_sift_up(). Consequently, min_heapify() has been renamed to min_heap_sift_down(). Link: https://lkml.kernel.org/CAP-5=fVcBAxt8Mw72=NCJPRJfjDaJcqk4rjbadgouAEAHz_q1A@mail.gmail.com Link: https://lkml.kernel.org/r/20240524152958.919343-13-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 2eb637c649a3d89c5483dc851ce98d56717a36d2 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:53 2024 +0800 lib min_heap: update min_heap_push() and min_heap_pop() to return bool values Modify the min_heap_push() and min_heap_pop() to return a boolean value. They now return false when the operation fails and true when it succeeds. Link: https://lkml.kernel.org/r/20240524152958.919343-12-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 420f171031207a13c83560b2ebb32ccc3c8ed6df Author: Kuan-Wei Chiu Date: Fri May 24 23:29:52 2024 +0800 lib min_heap: add min_heap_del() Add min_heap_del() to delete the element at index 'idx' in the heap. Link: https://lkml.kernel.org/r/20240524152958.919343-11-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit eaa0bc7119247942200b9209d40ffd86ace347d4 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:51 2024 +0800 lib min_heap: add min_heap_sift_up() Add min_heap_sift_up() to sift up the element at index 'idx' in the heap. Link: https://lkml.kernel.org/r/20240524152958.919343-10-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 267607e87599509a6a39a5f7dd3959365e58af27 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:50 2024 +0800 lib min_heap: add args for min_heap_callbacks Add a third parameter 'args' for the 'less' and 'swp' functions in the 'struct min_heap_callbacks'. This additional parameter allows these comparison and swap functions to handle extra arguments when necessary. Link: https://lkml.kernel.org/r/20240524152958.919343-9-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit b9d720e65a72c9754faf689e0859a5632853f4bc Author: Kuan-Wei Chiu Date: Fri May 24 23:29:49 2024 +0800 lib min_heap: add min_heap_full() Add min_heap_full() which returns a boolean value indicating whether the heap has reached its maximum capacity. Link: https://lkml.kernel.org/r/20240524152958.919343-8-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 0562d54ddc3dc195f338bd8e816dd8ff154f44ad Author: Kuan-Wei Chiu Date: Fri May 24 23:29:48 2024 +0800 lib min_heap: add min_heap_peek() Add min_heap_peek() to retrieve a pointer to the smallest element. The pointer is cast to the appropriate type of heap elements. Link: https://lkml.kernel.org/r/20240524152958.919343-7-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit e146683ccff9af2d26b70a9ea4c87f5a86eff0c4 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:47 2024 +0800 lib min_heap: add min_heap_init() Add min_heap_init() for initializing heap with data, nr, and size. Link: https://lkml.kernel.org/r/20240524152958.919343-6-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 873ce25766019dd017c1a3a10c19ac3fc4bf24aa Author: Kuan-Wei Chiu Date: Fri May 24 23:29:46 2024 +0800 lib min_heap: add type safe interface Implement a type-safe interface for min_heap using strong type pointers instead of void * in the data field. This change includes adding small macro wrappers around functions, enabling the use of __minheap_cast and __minheap_obj_size macros for type casting and obtaining element size. This implementation removes the necessity of passing element size in min_heap_callbacks. Additionally, introduce the MIN_HEAP_PREALLOCATED macro for preallocating some elements. Link: https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu Link: https://lkml.kernel.org/r/20240524152958.919343-5-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Randy Dunlap Signed-off-by: Andrew Morton commit fd60f7fe69609d6541e58853082ed63bd845aee0 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:45 2024 +0800 bcachefs: fix typo Replace 'utiility' with 'utility'. Link: https://lkml.kernel.org/r/20240524152958.919343-4-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Reviewed-by: Randy Dunlap Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit b42995607e9d7fc15f8626a2fb863b55d2281782 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:44 2024 +0800 bcache: fix typo Replace 'utiility' with 'utility'. Link: https://lkml.kernel.org/r/20240524152958.919343-3-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Reviewed-by: Randy Dunlap Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit ddd36b7ee19f3fd3faee5f97ce02204c85fda486 Author: Kuan-Wei Chiu Date: Fri May 24 23:29:43 2024 +0800 perf/core: fix several typos Patch series "treewide: Refactor heap related implementation", v6. This patch series focuses on several adjustments related to heap implementation. Firstly, a type-safe interface has been added to the min_heap, along with the introduction of several new functions to enhance its functionality. Additionally, the heap implementation for bcache and bcachefs has been replaced with the generic min_heap implementation from include/linux. Furthermore, several typos have been corrected. Previous discussion with Kent Overstreet: https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu This patch (of 16): Replace 'artifically' with 'artificially'. Replace 'irrespecive' with 'irrespective'. Replace 'futher' with 'further'. Replace 'sufficent' with 'sufficient'. Link: https://lkml.kernel.org/r/20240524152958.919343-1-visitorckw@gmail.com Link: https://lkml.kernel.org/r/20240524152958.919343-2-visitorckw@gmail.com Signed-off-by: Kuan-Wei Chiu Reviewed-by: Ian Rogers Reviewed-by: Randy Dunlap Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Bagas Sanjaya Cc: Brian Foster Cc: Ching-Chun (Jim) Huang Cc: Coly Li Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kent Overstreet Cc: Mark Rutland Cc: Matthew Sakai Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit cf28d7716e0c777f593948eea109dc273047dac7 Author: Wei-Hsin Yeh Date: Sun May 12 13:42:11 2024 +0800 include/linux/jhash.h: fix typos Drop one '-' to adhere to coding style. Replace 'arbitray' with 'arbitrary'. Link: https://lkml.kernel.org/r/20240512054211.24726-1-weihsinyeh168@gmail.com Signed-off-by: Wei-Hsin Yeh Signed-off-by: Andrew Morton commit 47e39c79336760031f98215c014c9800f5ed6481 Author: Uros Bizjak Date: Thu May 23 09:35:14 2024 +0200 fork: use this_cpu_try_cmpxchg() in try_release_thread_stack_to_cache() Use this_cpu_try_cmpxchg() instead of this_cpu_cmpxchg (*ptr, old, new) == old in try_release_thread_stack_to_cache. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. [ubizjak@gmail.com: simplify the for loop a bit] Link: https://lkml.kernel.org/r/20240523214442.21102-1-ubizjak@gmail.com Link: https://lkml.kernel.org/r/20240523073530.8128-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Cc: Oleg Nesterov Cc: Kees Cook Signed-off-by: Andrew Morton commit af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Author: Ferry Meng Date: Mon May 20 10:40:24 2024 +0800 ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry() xattr in ocfs2 maybe 'non-indexed', which saved with additional space requested. It's better to check if the memory is out of bound before memcmp, although this possibility mainly comes from crafted poisonous images. Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.com Signed-off-by: Ferry Meng Signed-off-by: Joseph Qi Reported-by: lei lu Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton commit 9e3041fecdc8f78a5900c3aa51d3d756e73264d6 Author: Ferry Meng Date: Mon May 20 10:40:23 2024 +0800 ocfs2: add bounds checking to ocfs2_xattr_find_entry() Add a paranoia check to make sure it doesn't stray beyond valid memory region containing ocfs2 xattr entries when scanning for a match. It will prevent out-of-bound access in case of crafted images. Link: https://lkml.kernel.org/r/20240520024024.1976129-1-joseph.qi@linux.alibaba.com Signed-off-by: Ferry Meng Signed-off-by: Joseph Qi Reported-by: lei lu Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton commit 82a9d6bdd4bb6fac3a080f49c0ba2013a3e65f72 Author: Jeff Johnson Date: Sat May 18 16:12:05 2024 -0700 backtracetest: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/backtracetest.o Link: https://lkml.kernel.org/r/20240518-md-backtracetest-v1-1-fab9f942c139@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Andrew Morton commit 67cf05473704e926d2b5302a68433a6aefde6fc5 Author: Jouni Högander Date: Wed Jun 19 09:21:23 2024 +0300 drm/i915/psr: enable sink for eDP1.5 Panel Replay eDP1.5 allows Panel Replay on eDP as well. Take this into account when enabling sink PSR/Panel Replay. Write also PANEL_REPLAY_CONFIG2 register accordingly. v3: - set DP_PANEL_REPLAY_CRC_VERIFICATION in PANEL_REPLAY_CONFIG2 - PANEL_REPLAY_CONFIG2 is available in DP2.1 as well v2: do not configure ALPM for DP2.0 Panel Replay Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-4-jouni.hogander@intel.com commit dfeb3a249f11787b269eb15d0de6c91dc4e3292f Author: Jouni Högander Date: Wed Jun 19 09:21:22 2024 +0300 drm/i915/psr: Inform Panel Replay source support on eDP as well Display version >= 20 support eDP 1.5. Inform Panel Replay source support on eDP for display version >= 20. Bspec: 68920 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-3-jouni.hogander@intel.com commit 897d29ce229569bb497861c9673e6f828521384d Author: Jouni Högander Date: Wed Jun 19 09:21:21 2024 +0300 drm/i915/psr: Check panel ALPM capability for eDP Panel Replay Our HW doesn't support Panel Replay without AUX_LESS ALPM on eDP. Check panel support for this and prevent eDP panel replay if it doesn't exits. Bspec: 68920 v3: remove excessive parens v2: use intel_alpm_aux_less_wake_supported Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-2-jouni.hogander@intel.com commit 637c26f9b02d9c72448fcd5c9c4e3b08015404fc Author: Andrii Nakryiko Date: Tue May 21 18:38:45 2024 -0700 selftests/bpf: add test validating uprobe/uretprobe stack traces Add a set of tests to validate that stack traces captured from or in the presence of active uprobes and uretprobes are valid and complete. For this we use BPF program that are installed either on entry or exit of user function, plus deep-nested USDT. One of target funtions (target_1) is recursive to generate two different entries in the stack trace for the same uprobe/uretprobe, testing potential edge conditions. If there is no fixes, we get something like this for one of the scenarios: caller: 0x758fff - 0x7595ab target_1: 0x758fd5 - 0x758fff target_2: 0x758fca - 0x758fd5 target_3: 0x758fbf - 0x758fca target_4: 0x758fb3 - 0x758fbf ENTRY #0: 0x758fb3 (in target_4) ENTRY #1: 0x758fd3 (in target_2) ENTRY #2: 0x758ffd (in target_1) ENTRY #3: 0x7fffffffe000 ENTRY #4: 0x7fffffffe000 ENTRY #5: 0x6f8f39 ENTRY #6: 0x6fa6f0 ENTRY #7: 0x7f403f229590 Entry #3 and #4 (0x7fffffffe000) are uretprobe trampoline addresses which obscure actual target_1 and another target_1 invocations. Also note that between entry #0 and entry #1 we are missing an entry for target_3. With fixes, we get desired full stack traces: caller: 0x758fff - 0x7595ab target_1: 0x758fd5 - 0x758fff target_2: 0x758fca - 0x758fd5 target_3: 0x758fbf - 0x758fca target_4: 0x758fb3 - 0x758fbf ENTRY #0: 0x758fb7 (in target_4) ENTRY #1: 0x758fc8 (in target_3) ENTRY #2: 0x758fd3 (in target_2) ENTRY #3: 0x758ffd (in target_1) ENTRY #4: 0x758ff3 (in target_1) ENTRY #5: 0x75922c (in caller) ENTRY #6: 0x6f8f39 ENTRY #7: 0x6fa6f0 ENTRY #8: 0x7f986adc4cd0 Now there is a logical and complete sequence of function calls. Link: https://lore.kernel.org/all/20240522013845.1631305-5-andrii@kernel.org/ Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 4a365eb8a6d9940e838739935f1ce21f1ec8e33f Author: Andrii Nakryiko Date: Tue May 21 18:38:43 2024 -0700 perf,uprobes: fix user stack traces in the presence of pending uretprobes When kernel has pending uretprobes installed, it hijacks original user function return address on the stack with a uretprobe trampoline address. There could be multiple such pending uretprobes (either on different user functions or on the same recursive one) at any given time within the same task. This approach interferes with the user stack trace capture logic, which would report suprising addresses (like 0x7fffffffe000) that correspond to a special "[uprobes]" section that kernel installs in the target process address space for uretprobe trampoline code, while logically it should be an address somewhere within the calling function of another traced user function. This is easy to correct for, though. Uprobes subsystem keeps track of pending uretprobes and records original return addresses. This patch is using this to do a post-processing step and restore each trampoline address entries with correct original return address. This is done only if there are pending uretprobes for current task. This is a similar approach to what fprobe/kretprobe infrastructure is doing when capturing kernel stack traces in the presence of pending return probes. Link: https://lore.kernel.org/all/20240522013845.1631305-3-andrii@kernel.org/ Reported-by: Riham Selim Signed-off-by: Andrii Nakryiko Signed-off-by: Masami Hiramatsu (Google) commit cd09a6ac85b9f7ee9ee249c2feede223bf97dbc4 Author: Christophe JAILLET Date: Mon Jun 24 22:18:20 2024 +0200 PCI: ls-gen4: Make struct mobiveil_rp_ops constant The struct mobiveil_rp_ops is not modified in this driver. Thus, make this struct constant, which also moves data to a read-only section decreasing object size and also improving overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 4446 336 32 4814 12ce drivers/pci/controller/mobiveil/pcie-layerscape-gen4.o After: ===== text data bss dec hex filename 4454 328 32 4814 12ce drivers/pci/controller/mobiveil/pcie-layerscape-gen4.o [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/189fd881cc8fd80220e74e91820e12cf3a5be114.1719260294.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński commit bf2468f9afba8001c7432d104756a5dd3537bc76 Merge: 568ebdaba6370 3f9fe37d9e16a Author: Jakub Kicinski Date: Mon Jun 24 16:41:25 2024 -0700 Merge branch 'locking-introduce-nested-bh-locking' Sebastian Andrzej Siewior says: ==================== locking: Introduce nested-BH locking. Disabling bottoms halves acts as per-CPU BKL. On PREEMPT_RT code within local_bh_disable() section remains preemtible. As a result high prior tasks (or threaded interrupts) will be blocked by lower-prio task (or threaded interrupts) which are long running which includes softirq sections. The proposed way out is to introduce explicit per-CPU locks for resources which are protected by local_bh_disable() and use those only on PREEMPT_RT so there is no additional overhead for !PREEMPT_RT builds. The series introduces the infrastructure and converts large parts of networking which is largest stake holder here. Once this done the per-CPU lock from local_bh_disable() on PREEMPT_RT can be lifted. Performance testing. Baseline is net-next as of commit 93bda33046e7a ("Merge branch'net-constify-ctl_table-arguments-of-utility-functions'") plus v6.10-rc1. A 10GiG link is used between two hosts. The command xdp-bench redirect-cpu --cpu 3 --remote-action drop eth1 -e was invoked on the receiving side with a ixgbe. The sending side uses pktgen_sample03_burst_single_flow.sh on i40e. Baseline: | eth1->? 9,018,604 rx/s 0 err,drop/s | receive total 9,018,604 pkt/s 0 drop/s 0 error/s | cpu:7 9,018,604 pkt/s 0 drop/s 0 error/s | enqueue to cpu 3 9,018,602 pkt/s 0 drop/s 7.00 bulk-avg | cpu:7->3 9,018,602 pkt/s 0 drop/s 7.00 bulk-avg | kthread total 9,018,606 pkt/s 0 drop/s 214,698 sched | cpu:3 9,018,606 pkt/s 0 drop/s 214,698 sched | xdp_stats 0 pass/s 9,018,606 drop/s 0 redir/s | cpu:3 0 pass/s 9,018,606 drop/s 0 redir/s | redirect_err 0 error/s | xdp_exception 0 hit/s perf top --sort cpu,symbol --no-children: | 18.14% 007 [k] bpf_prog_4f0ffbb35139c187_cpumap_l4_hash | 13.29% 007 [k] ixgbe_poll | 12.66% 003 [k] cpu_map_kthread_run | 7.23% 003 [k] page_frag_free | 6.76% 007 [k] xdp_do_redirect | 3.76% 007 [k] cpu_map_redirect | 3.13% 007 [k] bq_flush_to_queue | 2.51% 003 [k] xdp_return_frame | 1.93% 007 [k] try_to_wake_up | 1.78% 007 [k] _raw_spin_lock | 1.74% 007 [k] cpu_map_enqueue | 1.56% 003 [k] bpf_prog_57cd311f2e27366b_cpumap_drop With this series applied: | eth1->? 10,329,340 rx/s 0 err,drop/s | receive total 10,329,340 pkt/s 0 drop/s 0 error/s | cpu:6 10,329,340 pkt/s 0 drop/s 0 error/s | enqueue to cpu 3 10,329,338 pkt/s 0 drop/s 8.00 bulk-avg | cpu:6->3 10,329,338 pkt/s 0 drop/s 8.00 bulk-avg | kthread total 10,329,321 pkt/s 0 drop/s 96,297 sched | cpu:3 10,329,321 pkt/s 0 drop/s 96,297 sched | xdp_stats 0 pass/s 10,329,321 drop/s 0 redir/s | cpu:3 0 pass/s 10,329,321 drop/s 0 redir/s | redirect_err 0 error/s | xdp_exception 0 hit/s perf top --sort cpu,symbol --no-children: | 20.90% 006 [k] bpf_prog_4f0ffbb35139c187_cpumap_l4_hash | 12.62% 006 [k] ixgbe_poll | 9.82% 003 [k] page_frag_free | 8.73% 003 [k] cpu_map_bpf_prog_run_xdp | 6.63% 006 [k] xdp_do_redirect | 4.94% 003 [k] cpu_map_kthread_run | 4.28% 006 [k] cpu_map_redirect | 4.03% 006 [k] bq_flush_to_queue | 3.01% 003 [k] xdp_return_frame | 1.95% 006 [k] _raw_spin_lock | 1.94% 003 [k] bpf_prog_57cd311f2e27366b_cpumap_drop This diff appears to be noise. v8: https://lore.kernel.org/all/20240619072253.504963-1-bigeasy@linutronix.de v7: https://lore.kernel.org/all/20240618072526.379909-1-bigeasy@linutronix.de v6: https://lore.kernel.org/all/20240612170303.3896084-1-bigeasy@linutronix.de v5: https://lore.kernel.org/all/20240607070427.1379327-1-bigeasy@linutronix.de v4: https://lore.kernel.org/all/20240604154425.878636-1-bigeasy@linutronix.de v3: https://lore.kernel.org/all/20240529162927.403425-1-bigeasy@linutronix.de v2: https://lore.kernel.org/all/20240503182957.1042122-1-bigeasy@linutronix.de v1: https://lore.kernel.org/all/20231215171020.687342-1-bigeasy@linutronix.de ==================== Link: https://patch.msgid.link/20240620132727.660738-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 3f9fe37d9e16a6cfd5f4d1f536686ea71db3196f Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:22:05 2024 +0200 net: Move per-CPU flush-lists to bpf_net_context on PREEMPT_RT. The per-CPU flush lists, which are accessed from within the NAPI callback (xdp_do_flush() for instance), are per-CPU. There are subject to the same problem as struct bpf_redirect_info. Add the per-CPU lists cpu_map_flush_list, dev_map_flush_list and xskmap_map_flush_list to struct bpf_net_context. Add wrappers for the access. The lists initialized on first usage (similar to bpf_net_ctx_get_ri()). Cc: "Björn Töpel" Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Eduard Zingerman Cc: Hao Luo Cc: Jiri Olsa Cc: John Fastabend Cc: Jonathan Lemon Cc: KP Singh Cc: Maciej Fijalkowski Cc: Magnus Karlsson Cc: Martin KaFai Lau Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Acked-by: Jesper Dangaard Brouer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-16-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 401cb7dae8130fd34eb84648e02ab4c506df7d5e Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:22:04 2024 +0200 net: Reference bpf_redirect_info via task_struct on PREEMPT_RT. The XDP redirect process is two staged: - bpf_prog_run_xdp() is invoked to run a eBPF program which inspects the packet and makes decisions. While doing that, the per-CPU variable bpf_redirect_info is used. - Afterwards xdp_do_redirect() is invoked and accesses bpf_redirect_info and it may also access other per-CPU variables like xskmap_flush_list. At the very end of the NAPI callback, xdp_do_flush() is invoked which does not access bpf_redirect_info but will touch the individual per-CPU lists. The per-CPU variables are only used in the NAPI callback hence disabling bottom halves is the only protection mechanism. Users from preemptible context (like cpu_map_kthread_run()) explicitly disable bottom halves for protections reasons. Without locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. PREEMPT_RT has forced-threaded interrupts enabled and every NAPI-callback runs in a thread. If each thread has its own data structure then locking can be avoided. Create a struct bpf_net_context which contains struct bpf_redirect_info. Define the variable on stack, use bpf_net_ctx_set() to save a pointer to it, bpf_net_ctx_clear() removes it again. The bpf_net_ctx_set() may nest. For instance a function can be used from within NET_RX_SOFTIRQ/ net_rx_action which uses bpf_net_ctx_set() and NET_TX_SOFTIRQ which does not. Therefore only the first invocations updates the pointer. Use bpf_net_ctx_get_ri() as a wrapper to retrieve the current struct bpf_redirect_info. The returned data structure is zero initialized to ensure nothing is leaked from stack. This is done on first usage of the struct. bpf_net_ctx_set() sets bpf_redirect_info::kern_flags to 0 to note that initialisation is required. First invocation of bpf_net_ctx_get_ri() will memset() the data structure and update bpf_redirect_info::kern_flags. bpf_redirect_info::nh is excluded from memset because it is only used once BPF_F_NEIGH is set which also sets the nh member. The kern_flags is moved past nh to exclude it from memset. The pointer to bpf_net_context is saved task's task_struct. Using always the bpf_net_context approach has the advantage that there is almost zero differences between PREEMPT_RT and non-PREEMPT_RT builds. Cc: Andrii Nakryiko Cc: Eduard Zingerman Cc: Hao Luo Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-15-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 78f520b7bbe579438dfc202226b3dac5607d8c7f Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:22:03 2024 +0200 net: Use nested-BH locking for bpf_scratchpad. bpf_scratchpad is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Hao Luo Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-14-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit d1542d4ae4dfdc47c9b3205ebe849ed23af213dd Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:22:02 2024 +0200 seg6: Use nested-BH locking for seg6_bpf_srh_states. The access to seg6_bpf_srh_states is protected by disabling preemption. Based on the code, the entry point is input_action_end_bpf() and every other function (the bpf helper functions bpf_lwt_seg6_*()), that is accessing seg6_bpf_srh_states, should be called from within input_action_end_bpf(). input_action_end_bpf() accesses seg6_bpf_srh_states first at the top of the function and then disables preemption. This looks wrong because if preemption needs to be disabled as part of the locking mechanism then the variable shouldn't be accessed beforehand. Looking at how it is used via test_lwt_seg6local.sh then input_action_end_bpf() is always invoked from softirq context. If this is always the case then the preempt_disable() statement is superfluous. If this is not always invoked from softirq then disabling only preemption is not sufficient. Replace the preempt_disable() statement with nested-BH locking. This is not an equivalent replacement as it assumes that the invocation of input_action_end_bpf() always occurs in softirq context and thus the preempt_disable() is superfluous. Add a local_lock_t the data structure and use local_lock_nested_bh() for locking. Add lockdep_assert_held() to ensure the lock is held while the per-CPU variable is referenced in the helper functions. Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: David Ahern Cc: Hao Luo Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Song Liu Cc: Stanislav Fomichev Cc: Yonghong Song Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-13-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 3414adbd6a6ad3702d0bdc49081ee7c9e9e1c600 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:22:01 2024 +0200 lwt: Don't disable migration prio invoking BPF. There is no need to explicitly disable migration if bottom halves are also disabled. Disabling BH implies disabling migration. Remove migrate_disable() and rely solely on disabling BH to remain on the same CPU. Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-12-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit b22800f9d3b142bf2550dd47ff738b9feedc1093 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:22:00 2024 +0200 dev: Use nested-BH locking for softnet_data.process_queue. softnet_data::process_queue is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. softnet_data::input_queue_head can be updated lockless. This is fine because this value is only update CPU local by the local backlog_napi thread. Add a local_lock_t to softnet_data and use local_lock_nested_bh() for locking of process_queue. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-11-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit a8760d0d1497878d01f901ef2038c7389187a8af Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:59 2024 +0200 dev: Remove PREEMPT_RT ifdefs from backlog_lock.*(). The backlog_napi locking (previously RPS) relies on explicit locking if either RPS or backlog NAPI is enabled. If both are disabled then locking was achieved by disabling interrupts except on PREEMPT_RT. PREEMPT_RT was excluded because the needed synchronisation was already provided local_bh_disable(). Since the introduction of backlog NAPI and making it mandatory for PREEMPT_RT the ifdef within backlog_lock.*() is obsolete and can be removed. Remove the ifdefs in backlog_lock.*(). Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-10-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit ecefbc09e8ee768ae85b7bb7a1de8c8287397d68 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:58 2024 +0200 net: softnet_data: Make xmit per task. Softirq is preemptible on PREEMPT_RT. Without a per-CPU lock in local_bh_disable() there is no guarantee that only one device is transmitting at a time. With preemption and multiple senders it is possible that the per-CPU `recursion' counter gets incremented by different threads and exceeds XMIT_RECURSION_LIMIT leading to a false positive recursion alert. The `more' member is subject to similar problems if set by one thread for one driver and wrongly used by another driver within another thread. Instead of adding a lock to protect the per-CPU variable it is simpler to make xmit per-task. Sending and receiving skbs happens always in thread context anyway. Having a lock to protected the per-CPU counter would block/ serialize two sending threads needlessly. It would also require a recursive lock to ensure that the owner can increment the counter further. Make the softnet_data.xmit a task_struct member on PREEMPT_RT. Add needed wrapper. Cc: Ben Segall Cc: Daniel Bristot de Oliveira Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Mel Gorman Cc: Steven Rostedt Cc: Valentin Schneider Cc: Vincent Guittot Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-9-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit c67ef53a88db5bcc29a6da20dcbc09206d49d0a9 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:57 2024 +0200 netfilter: br_netfilter: Use nested-BH locking for brnf_frag_data_storage. brnf_frag_data_storage is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: Florian Westphal Cc: Jozsef Kadlecsik Cc: Nikolay Aleksandrov Cc: Pablo Neira Ayuso Cc: Roopa Prabhu Cc: bridge@lists.linux.dev Cc: coreteam@netfilter.org Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-8-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit ebad6d0334793f16a16e5320182f665292a31e0c Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:56 2024 +0200 net/ipv4: Use nested-BH locking for ipv4_tcp_sk. ipv4_tcp_sk is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Make a struct with a sock member (original ipv4_tcp_sk) and a local_lock_t and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: David Ahern Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-7-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 585aa621af6cd11d3d6f830965af3e45ee79ea51 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:55 2024 +0200 net/tcp_sigpool: Use nested-BH locking for sigpool_scratch. sigpool_scratch is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Make a struct with a pad member (original sigpool_scratch) and a local_lock_t and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Cc: David Ahern Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-6-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit bdacf3e34945232037979b977d7f409f734a7226 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:54 2024 +0200 net: Use nested-BH locking for napi_alloc_cache. napi_alloc_cache is a per-CPU variable and relies on disabled BH for its locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT this data structure requires explicit locking. Add a local_lock_t to the data structure and use local_lock_nested_bh() for locking. This change adds only lockdep coverage and does not alter the functional behaviour for !PREEMPT_RT. Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-5-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 43d7ca2907cb0e8a23d73934a5cf000e24b0aa22 Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:53 2024 +0200 net: Use __napi_alloc_frag_align() instead of open coding it. The else condition within __netdev_alloc_frag_align() is an open coded __napi_alloc_frag_align(). Use __napi_alloc_frag_align() instead of open coding it. Move fragsz assignment before page_frag_alloc_align() invocation because __napi_alloc_frag_align() also contains this statement. Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-4-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit c5bcab7558220bbad8bd4863576afd1b340ce29f Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:52 2024 +0200 locking/local_lock: Add local nested BH locking infrastructure. Add local_lock_nested_bh() locking. It is based on local_lock_t and the naming follows the preempt_disable_nested() example. For !PREEMPT_RT + !LOCKDEP it is a per-CPU annotation for locking assumptions based on local_bh_disable(). The macro is optimized away during compilation. For !PREEMPT_RT + LOCKDEP the local_lock_nested_bh() is reduced to the usual lock-acquire plus lockdep_assert_in_softirq() - ensuring that BH is disabled. For PREEMPT_RT local_lock_nested_bh() acquires the specified per-CPU lock. It does not disable CPU migration because it relies on local_bh_disable() disabling CPU migration. With LOCKDEP it performans the usual lockdep checks as with !PREEMPT_RT. Due to include hell the softirq check has been moved spinlock.c. The intention is to use this locking in places where locking of a per-CPU variable relies on BH being disabled. Instead of treating disabled bottom halves as a big per-CPU lock, PREEMPT_RT can use this to reduce the locking scope to what actually needs protecting. A side effect is that it also documents the protection scope of the per-CPU variables. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-3-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 07e4fd4c0592ad57fe4c5033393d30362dbfaa5d Author: Sebastian Andrzej Siewior Date: Thu Jun 20 15:21:51 2024 +0200 locking/local_lock: Introduce guard definition for local_lock. Introduce lock guard definition for local_lock_t. There are no users yet. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/20240620132727.660738-2-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit d96377892dd89bd4e7e5ae7293647f6bc7bddf7d Author: Bartosz Golaszewski Date: Mon Jun 24 21:06:14 2024 +0200 firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new() EXPORT_SYMBOL_GPL() is missing for devm_qcom_tzmem_pool_new() which causes build failures with randconfig. Add it and fix the issue. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406250127.8Pl2kqFp-lkp@intel.com Fixes: 84f5a7b67b61 ("firmware: qcom: add a dedicated TrustZone buffer allocator") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240624190615.36282-1-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit fb57b0275390d2acac24ac5ef9c93d5374b888a3 Merge: dcf5bd889a7ce 1ebcde047c547 Author: Bjorn Andersson Date: Sun Jun 23 22:41:51 2024 -0500 Merge branch '20240622-qcom-pd-mapper-v9-0-a84ee3591c8e@linaro.org' into drivers-for-6.11 Merge the in-kernel protection-domain mapper implementation through a feature branch, to allow sharing with the remoteproc tree. commit 1ebcde047c547134e894508468ead0b7bd3b967d Author: Dmitry Baryshkov Date: Sat Jun 22 01:03:43 2024 +0300 soc: qcom: add pd-mapper implementation Existing userspace protection domain mapper implementation has several issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't reread JSON files if firmware location is changed (or if firmware was not available at the time pd-mapper was started but the corresponding directory is mounted later), etc. Provide in-kernel service implementing protection domain mapping required to work with several services, which are provided by the DSP firmware. This module is loaded automatically by the remoteproc drivers when necessary via the symbol dependency. It uses a root node to match a protection domains map for a particular board. It is not possible to implement it as a 'driver' as there is no corresponding device. Tested-by: Steev Klimaszewski Tested-by: Alexey Minnekhanov Reviewed-by: Chris Lew Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-4-a84ee3591c8e@linaro.org [bjorn: include linux/slab.h] Signed-off-by: Bjorn Andersson commit daf763c2d6d1dc50586e351aca868c7786d3c84e Author: Takashi Sakamoto Date: Mon Jun 24 07:08:58 2024 +0900 firewire: core: add tracepoints events for completions of packets in isochronous context It is helpful to trace completion of packets in isochronous context when the core function is requested them by both in-kernel units driver and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 1f3c0d794df6d85834a0664db3658c422ec5c8d8 Author: Takashi Sakamoto Date: Mon Jun 24 07:08:57 2024 +0900 firewire: core: add tracepoints events for queueing packets of isochronous context It is helpful to trace the queueing packets of isochronous context when the core function is requested them by both in-kernel unit drivers and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 8320b63e028f62542942941b51951006403d8b4f Author: Takashi Sakamoto Date: Mon Jun 24 07:08:56 2024 +0900 firewire: core: add tracepoints events for flushing completions of isochronous context It is helpful to trace the flushing completions of isochronous context when the core function is requested them by both in-kernel unit drivers and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit c0b0ce6c47903ed2b9028933793801b3b4e72ca1 Author: Takashi Sakamoto Date: Mon Jun 24 07:08:55 2024 +0900 firewire: core: add tracepoints events for flushing of isochronous context It is helpful to trace the flushing of isochronous context when the core function is requested them by both in-kernel unit drivers and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 4e64210f67126e77d54ffcd3297a87539b858322 Author: Takashi Sakamoto Date: Mon Jun 24 07:08:54 2024 +0900 firewire: core: add tracepoints events for starting/stopping of isochronous context It is helpful to trace the starting and stopping of isochronous context when the core function is requested them by both in-kernel unit drivers and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 9f16ac725b233c53e2a043aa8d1b6f0453e94556 Author: Takashi Sakamoto Date: Mon Jun 24 07:08:53 2024 +0900 firewire: core: add tracepoints events for setting channels of multichannel context It is helpful to trace the channel setting for the multichannel isochronous context when the core function is requested it by both in-kernel unit drivers and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 25e6e00d3f78d73c30ee78fee8060cf68908be50 Author: Takashi Sakamoto Date: Mon Jun 24 07:08:52 2024 +0900 firewire: core: add tracepoints events for allocation/deallocation of isochronous context It is helpful to trace the allocation and dealocation of isochronous when the core function is requested them by both in-kernel unit drivers and userspace applications. This commit adds some tracepoints events for the aim. Link: https://lore.kernel.org/r/20240623220859.851685-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 2df0161959d1c76a8f5fb2c2e6bce12d87f22848 Author: Daniil Titov Date: Sun Jun 23 22:30:39 2024 +0200 drm/msm/dsi: Add phy configuration for MSM8937 Add phy configuration for 28nm dsi phy found on MSM8937 SoC. Only difference from existing msm8916 configuration is number of phy and io_start addresses. Signed-off-by: Daniil Titov Reviewed-by: Dmitry Baryshkov Signed-off-by: Barnabás Czémán Patchwork: https://patchwork.freedesktop.org/patch/600518/ Link: https://lore.kernel.org/r/20240623-dsi-v2-4-a0ca70fb4846@gmail.com Signed-off-by: Dmitry Baryshkov commit 60bdbaaf122099d9c959d326be532909ede3b0f6 Author: Barnabás Czémán Date: Sun Jun 23 22:30:38 2024 +0200 dt-bindings: msm: dsi-phy-28nm: Document msm8937 compatible The MSM8937 SoC uses a slightly different 28nm dsi phy. Add a new compatible for it. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Patchwork: https://patchwork.freedesktop.org/patch/600514/ Link: https://lore.kernel.org/r/20240623-dsi-v2-3-a0ca70fb4846@gmail.com Signed-off-by: Dmitry Baryshkov commit 13099cb03f98e19cfff11766cc5d98d2a18646ad Author: Daniil Titov Date: Sun Jun 23 22:30:37 2024 +0200 drm/msm/mdp5: Add MDP5 configuration for MSM8937 Add the mdp5_cfg_hw entry for MDP5 version v1.14 found on msm8937. Signed-off-by: Daniil Titov Signed-off-by: Barnabás Czémán Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/600513/ Link: https://lore.kernel.org/r/20240623-dsi-v2-2-a0ca70fb4846@gmail.com Signed-off-by: Dmitry Baryshkov commit c94dc5feb49410038a52b398815aecff1b9f7d01 Author: Barnabás Czémán Date: Sun Jun 23 22:30:36 2024 +0200 dt-bindings: display/msm: qcom, mdp5: Add msm8937 compatible Add the compatible for the MDP5 found on MSM8937. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Barnabás Czémán Patchwork: https://patchwork.freedesktop.org/patch/600512/ Link: https://lore.kernel.org/r/20240623-dsi-v2-1-a0ca70fb4846@gmail.com Signed-off-by: Dmitry Baryshkov commit a3a6b350eb6c2d5cf04e0d5454d5a189829be183 Author: Barnabás Czémán Date: Mon Jun 24 00:26:01 2024 +0200 drm/msm/mdp5: Remove MDP_CAP_SRC_SPLIT from msm8x53_config Remove MDP_CAP_SRC_SPLIT from msm8x53_config because it is not referenced in downstream. Fixes: fb25d4474fa0 ("drm/msm/mdp5: Add configuration for MDP v1.16") Signed-off-by: Barnabás Czémán Patchwork: https://patchwork.freedesktop.org/patch/600521/ Link: https://lore.kernel.org/r/20240624-msm8953-mdp-fix-v1-1-be4d3262ebe3@gmail.com Signed-off-by: Dmitry Baryshkov commit ff16aeb9b83441b8458d4235496cf320189a0c60 Author: James Clark Date: Wed Jun 12 15:03:14 2024 +0100 perf test: Make test_arm_callgraph_fp.sh more robust The 2 second sleep can cause the test to fail on very slow network file systems because Perf ends up being killed before it finishes starting up. Fix it by making the leafloop workload end after a fixed time like the other workloads so there is no need to kill it after 2 seconds. Also remove the 1 second start sampling delay because it is similarly fragile. Instead, search through all samples for a matching one, rather than just checking the first sample and hoping it's in the right place. Fixes: cd6382d82752 ("perf test arm64: Test unwinding using fame-pointer (fp) mode") Signed-off-by: James Clark Acked-by: Namhyung Kim Cc: German Gomez Cc: Spoorthy S Cc: Kajol Jain Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240612140316.3006660-1-james.clark@arm.com commit c74f037dfd452014f70eb21918a11eae5bafcf82 Merge: 6d8e604c95026 1f6e218859f18 Author: Palmer Dabbelt Date: Mon Jun 24 13:26:58 2024 -0700 Merge patch series "dt-bindings: interrupt-controller: riscv,cpu-intc" Kanak Shilledar says: This series of patches converts the RISC-V CPU interrupt controller to the newer dt-schema binding. Patch 1: This patch is currently at v4 as it has been previously rolled out. Contains the bindings for the interrupt controller. Patch 2: This patch is currently at v4. Contains the reference to the above interrupt controller. Thus, making all the RISC-V interrupt controller bindings in a centralized place. These patches are interdependent. Fixed the patch address mismatch error by changing DCO to @gmail.com Kanak Shilledar (3): dt-bindings: interrupt-controller: riscv,cpu-intc: convert to dtschema dt-bindings: riscv: cpus: add ref to interrupt-controller dt-bindings: serial: vt8500-uart: convert to json-schema .../interrupt-controller/riscv,cpu-intc.txt | 52 ------------- .../interrupt-controller/riscv,cpu-intc.yaml | 73 +++++++++++++++++++ .../devicetree/bindings/riscv/cpus.yaml | 21 +----- .../bindings/serial/via,vt8500-uart.yaml | 46 ++++++++++++ .../bindings/serial/vt8500-uart.txt | 27 ------- 5 files changed, 120 insertions(+), 99 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.yaml create mode 100644 Documentation/devicetree/bindings/serial/via,vt8500-uart.yaml delete mode 100644 Documentation/devicetree/bindings/serial/vt8500-uart.txt * b4-shazam-merge: dt-bindings: riscv: cpus: add ref to interrupt-controller dt-bindings: interrupt-controller: riscv,cpu-intc: convert to dtschema Link: https://lore.kernel.org/r/20240615021507.122035-1-kanakshilledar@gmail.com Signed-off-by: Palmer Dabbelt commit 2240d3e60bb3e7a00422596412d012aeb54c1573 Author: Perry Yuan Date: Sat Jun 22 00:50:57 2024 +0800 cpufreq: simplify boolean parsing with kstrtobool in store function Update the cpufreq store function to use kstrtobool for parsing boolean values. This simplifies the code and improves readability by using a standard kernel function for boolean string conversion. Reviewed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Signed-off-by: Perry Yuan Link: https://lore.kernel.org/r/d392eba3bad1231776124c321cef8c184ce1482d.1718988436.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit 1f6e218859f1833d8fa4054bf76fd59da743cb22 Author: Kanak Shilledar Date: Sat Jun 15 07:45:04 2024 +0530 dt-bindings: riscv: cpus: add ref to interrupt-controller removed the redundant properties for interrupt-controller and provide reference to the riscv,cpu-intc.yaml which defines the interrupt-controller. making the properties for riscv interrupt-controller at a central place. Reviewed-by: Conor Dooley Signed-off-by: Kanak Shilledar Link: https://lore.kernel.org/r/20240615021507.122035-3-kanakshilledar@gmail.com Signed-off-by: Palmer Dabbelt commit 9ff141042a6204ca69c2adcd0e35705fa2554950 Author: Kanak Shilledar Date: Sat Jun 15 07:45:03 2024 +0530 dt-bindings: interrupt-controller: riscv,cpu-intc: convert to dtschema Convert the RISC-V Hart-Level Interrupt Controller (HLIC) to newer DT schema, Created DT schema based on the .txt file which had `compatible`, `#interrupt-cells` and `interrupt-controller` as required properties. Changes made with respect to original file: - Changed the example to just use interrupt-controller instead of using the whole cpu block - Changed the example compatible string. Reviewed-by: Conor Dooley Signed-off-by: Kanak Shilledar Link: https://lore.kernel.org/r/20240615021507.122035-2-kanakshilledar@gmail.com Signed-off-by: Palmer Dabbelt commit 7e74a45c7afdd8a9f82d14fd79ae0383bbaaed1e Author: David Lechner Date: Mon Jun 24 15:10:30 2024 -0500 spi: add EXPORT_SYMBOL_GPL(devm_spi_optimize_message) devm_spi_optimize_message() is a public function and needs EXPORT_SYMBOL_GPL. Reported-by: Jonathan Cameron Closes: https://lore.kernel.org/linux-iio/20240624204424.6a91a5e4@jic23-huawei/ Fixes: d4a0055fdc22 ("spi: add devm_spi_optimize_message() helper") Signed-off-by: David Lechner Link: https://patch.msgid.link/20240624-devm_spi_optimize_message-v2-1-58155c0180c2@baylibre.com Signed-off-by: Mark Brown commit bf86e7d97b448eadf7959f025ce9e39c42eef92d Author: Hannes Reinecke Date: Mon May 27 07:15:25 2024 +0200 lpfc_nvmet: implement 'host_traddr' Implement the 'host_traddr' callback to display the host transport address for nvmet debugfs. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Justin Tee Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit bbb443e99cd34a49ab9f14c5519447cdabff1a46 Author: Hannes Reinecke Date: Mon May 27 07:15:24 2024 +0200 nvme-fcloop: implement 'host_traddr' Implement the 'host_traddr' callback to display the host transport address for nvmet debugfs. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: James Smart Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 99032e9dbabcfc64bf71e94a1b662c4bfe534ed1 Author: Hannes Reinecke Date: Mon May 27 07:15:23 2024 +0200 nvmet-fc: implement host_traddr() Implement callback to display the host transport address by adding a callback 'host_traddr' for nvmet_fc_target_template. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: James Smart Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit c7ea20c3afdb850c77a07ee71b00ea2712db7c4b Author: Hannes Reinecke Date: Mon May 27 07:15:22 2024 +0200 nvmet-rdma: implement host_traddr() Implement callback to display the host transport address. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit b4bbe00d2176f665d57fa454c144f99283dbf0e4 Author: Hannes Reinecke Date: Mon May 27 07:15:21 2024 +0200 nvmet-tcp: implement host_traddr() Implement callback to display the host transport address. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 7e5c3de3f2f25cdea850d8ecac5c28c7d119302d Author: Hannes Reinecke Date: Mon May 27 07:15:20 2024 +0200 nvmet: add 'host_traddr' callback for debugfs We want to display the transport address of the connected host in debugfs, but this is a property of the transport. So add a callback 'host_traddr' to allow the transport drivers to fill in the data. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 649fd41420a816b11b07423ebf4dbd4ac1ac2905 Author: Hannes Reinecke Date: Mon May 27 07:15:19 2024 +0200 nvmet: add debugfs support Add a debugfs hierarchy to display the configured subsystems and the controllers attached to the subsystems. Suggested-by: Redouane BOUFENGHOUR Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit d1237b3282f7b8319a225c05cbd47fd41149c950 Author: Weiwen Hu Date: Mon Jun 3 20:57:02 2024 +0800 mailmap: add entry for Weiwen Hu I have graduated from SCUT. My old email is not available now. Signed-off-by: Weiwen Hu Signed-off-by: Keith Busch commit dd0b0a4a2c5d7209457dc172997d1243ad269cfa Author: Weiwen Hu Date: Mon Jun 3 20:57:01 2024 +0800 nvme: rename CDR/MORE/DNR to NVME_STATUS_* CDR/MORE/DNR fields are not belonging to SC in the NVMe spec, rename them to NVME_STATUS_* to avoid confusion. Signed-off-by: Weiwen Hu Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit d89a5c6705998ddc42b104f8eabd3c4b9e8fde08 Author: Weiwen Hu Date: Mon Jun 3 20:57:00 2024 +0800 nvme: fix status magic numbers Replaced some magic numbers about SC and SCT with enum and macro. Signed-off-by: Weiwen Hu Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 22f19a584d7045e0509f103dbc5c0acfd6415163 Author: Weiwen Hu Date: Mon Jun 3 20:56:59 2024 +0800 nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err This should better match its semantic. "sc" is used in the NVMe spec to specifically refer to the last 8 bits in the status field. We should not reuse "sc" here. Signed-off-by: Weiwen Hu Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 1a9e218195a55d0a31e8cbe263aa2f618580ef1d Author: Keith Busch Date: Tue Jun 4 11:59:08 2024 -0700 nvme: split device add from initialization Combining both creates an ambiguous cleanup scenario for the caller if an error is returned: does the device reference need to be dropped or did the error occur before the device was initialized? If an error occurs after the device is added, then the existing cleanup routines will leak memory. Furthermore, the nvme core is taking it upon itself to free the device's kobj name under certain conditions rather than go through the core device API. We shouldn't be peaking into these implementation details. Split the device initialization from the addition to make it easier to know the error handling actions, fix the existing memory leaks, and stop the device layering violations. Link: https://lore.kernel.org/linux-nvme/c4050a37-ecc9-462c-9772-65e25166f439@grimberg.me/ Tested-by: Yi Zhang Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit 72cded7573c8c038f999e49c77d1097efcfd15aa Author: Keith Busch Date: Tue Jun 4 11:59:07 2024 -0700 nvme: fc: split controller bringup handling Drivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl. Split the allocation side out to make the error handling boundary easier to navigate. The nvme fc driver's error handling had different returns in the error goto label's, which harm readability. Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit ea47c471a2cf34a0ab3cd1c5f13b3625454f1fdd Author: Keith Busch Date: Tue Jun 4 11:59:06 2024 -0700 nvme: rdma: split controller bringup handling Drivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl. Split the allocation side out to make the error handling boundary easier to navigate. The nvme rdma driver's error handling had different returns in the error goto label's, which harm readability. Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit 10fd7fb676d71482b64bc61f5058b1011133f984 Author: Keith Busch Date: Tue Jun 4 11:59:05 2024 -0700 nvme: tcp: split controller bringup handling Drivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl. Split the allocation side out to make the error handling boundary easier to navigate. The nvme tcp driver's error handling had different returns in the error goto label's, which harm readability. Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit b9ecbfa45516182cd062fecd286db7907ba84210 Author: Keith Busch Date: Tue Jun 4 11:59:04 2024 -0700 nvme: apple: fix device reference counting Drivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl. Split the allocation side out to make the error handling boundary easier to navigate. The apple driver had been doing this wrong, leaking the controller device memory on a tagset failure. Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit 4a24bbabc826eaba6f94a9741712117b8e2b0587 Author: Chengming Zhou Date: Fri Jun 7 16:40:14 2024 +0800 slab: delete useless RED_INACTIVE and RED_ACTIVE These seem useless since we use the SLUB_RED_INACTIVE and SLUB_RED_ACTIVE, so just delete them, no functional change. Reviewed-by: Vlastimil Babka Signed-off-by: Chengming Zhou Reviewed-by: Christoph Lameter (Ampere) Signed-off-by: Vlastimil Babka commit 44348870de4b8f292f97b84583a298d66fbaf738 Author: Christoph Hellwig Date: Mon Jun 24 19:38:35 2024 +0200 block: fix the blk_queue_nonrot polarity Take care of the inverse polarity of the BLK_FEAT_ROTATIONAL flag vs the old nonrot helper. Fixes: bd4a633b6f7c ("block: move the nonrot flag to queue_limits") Reported-by: kernel test robot Reported-by: Keith Busch Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240624173835.76753-1-hch@lst.de Signed-off-by: Jens Axboe commit bc76f57574741cc8e7d04c53f199d8722ce09413 Author: Mario Limonciello Date: Sun Jun 23 15:09:18 2024 -0500 cpufreq: amd-pstate: Don't create attributes when registration fails If driver registration fails then immediately return the failure instead of continuing to register attributes. This fixes issues of falling back from amd-pstate to other drivers when cpufreq init has failed for any reason. Reported-by: alex.s.cochran@proton.me Reviewed-by: Gautham R. Shenoy Reviewed-by: Perry Yuan Link: https://lore.kernel.org/r/20240623200918.52104-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello commit e1a921f7fcd157ca898e453bbb56927ab39412e3 Author: Mario Limonciello Date: Sat Jun 22 16:52:19 2024 -0500 cpufreq: amd-pstate: Make amd-pstate unit tests depend on amd-pstate As the unit tests use a symbol from the driver an explicit dependency is required. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406222016.R4A2TMs8-lkp@intel.com/ Reviewed-by: Gautham R. Shenoy Reviewed-by: Perry Yuan Link: https://lore.kernel.org/r/20240622215219.47911-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello commit cf938f91784f5b35d16fa9fc746a3bb03659ab50 Author: Seongsu Park Date: Thu May 23 21:21:46 2024 +0900 arm64: Cleanup __cpu_set_tcr_t0sz() The T0SZ field of TCR_EL1 occupies bits 0-5 of the register and encode the virtual address space translated by TTBR0_EL1. When updating the field, for example because we are switching to/from the idmap page-table, __cpu_set_tcr_t0sz() erroneously treats its 't0sz' argument as unshifted, resulting in harmless but confusing double shifts by 0 in the code. Co-developed-by: Leem ChaeHoon Signed-off-by: Leem ChaeHoon Signed-off-by: Seongsu Park Link: https://lore.kernel.org/r/20240523122146.144483-1-sgsu.park@samsung.com Signed-off-by: Catalin Marinas commit 388a2a0640e16a8887f0d47dab207f344fbdb913 Author: Chao Yu Date: Thu Jun 6 17:55:51 2024 +0800 f2fs: remove redundant sanity check in sanity_check_inode() Commit f240d3aaf5a1 ("f2fs: do more sanity check on inode") missed to remove redundant sanity check on flexible_inline_xattr flag, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 618ba6abfc57bde2c2cea7c2b23e4c27fd5a04b4 Author: Armin Wolf Date: Mon Jun 24 19:31:16 2024 +0200 platform/x86: wmi: Add bus ABI documentation Add documentation for the WMI bus sysfs interface so userspace applications can use it to access additional data about WMI devices. Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20240624173116.31314-3-W_Armin@gmx.de Signed-off-by: Ilpo Järvinen commit 12046f8c77e0ed6d41beabde0edbb729499c970b Author: Armin Wolf Date: Mon Jun 24 19:31:15 2024 +0200 platform/x86: wmi: Add driver_override support Add support for forcing the WMI driver core to bind a certain WMI driver to a WMI device. This will be necessary to support generic WMI drivers without an ID table Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20240624173116.31314-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit bfe3f0df3e3c0afdbe147d2479fe9aee4d0683e9 Author: Youwan Wang Date: Mon Jun 24 10:31:01 2024 +0800 ACPI / amba: Drop unnecessary check for registered amba_dummy_clk amba_register_dummy_clk() is called only once from acpi_amba_init() and acpi_amba_init() itself is called once during the initialisation. amba_dummy_clk can't be initialised before this in any other code path and hence the check for already registered amba_dummy_clk is not necessary. Drop the same. Signed-off-by: Youwan Wang Acked-by: Sudeep Holla Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20240624023101.369633-1-youwan@nfschina.com Signed-off-by: Catalin Marinas commit 7821fa101eab529521aa4b724bf708149d70820c Author: Ilpo Järvinen Date: Mon May 27 15:55:38 2024 +0300 x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos iosf_mbi_pci_{read,write}_mdr() use pci_{read,write}_config_dword() that return PCIBIOS_* codes but functions also return -ENODEV which are not compatible error codes. As neither of the functions are related to PCI read/write functions, they should return normal errnos. Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning it. Fixes: 46184415368a ("arch: x86: New MailBox support driver for Intel SOC's") Signed-off-by: Ilpo Järvinen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240527125538.13620-4-ilpo.jarvinen@linux.intel.com commit e9d7b435dfaec58432f4106aaa632bf39f52ce9f Author: Ilpo Järvinen Date: Mon May 27 15:55:37 2024 +0300 x86/pci/xen: Fix PCIBIOS_* return code handling xen_pcifront_enable_irq() uses pci_read_config_byte() that returns PCIBIOS_* codes. The error handling, however, assumes the codes are normal errnos because it checks for < 0. xen_pcifront_enable_irq() also returns the PCIBIOS_* code back to the caller but the function is used as the (*pcibios_enable_irq) function which should return normal errnos. Convert the error check to plain non-zero check which works for PCIBIOS_* return codes and convert the PCIBIOS_* return code using pcibios_err_to_errno() into normal errno before returning it. Fixes: 3f2a230caf21 ("xen: handled remapped IRQs when enabling a pcifront PCI device.") Signed-off-by: Ilpo Järvinen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240527125538.13620-3-ilpo.jarvinen@linux.intel.com commit 724852059e97c48557151b3aa4af424614819752 Author: Ilpo Järvinen Date: Mon May 27 15:55:36 2024 +0300 x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling intel_mid_pci_irq_enable() uses pci_read_config_byte() that returns PCIBIOS_* codes. The error handling, however, assumes the codes are normal errnos because it checks for < 0. intel_mid_pci_irq_enable() also returns the PCIBIOS_* code back to the caller but the function is used as the (*pcibios_enable_irq) function which should return normal errnos. Convert the error check to plain non-zero check which works for PCIBIOS_* return codes and convert the PCIBIOS_* return code using pcibios_err_to_errno() into normal errno before returning it. Fixes: 5b395e2be6c4 ("x86/platform/intel-mid: Make IRQ allocation a bit more flexible") Signed-off-by: Ilpo Järvinen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240527125538.13620-2-ilpo.jarvinen@linux.intel.com commit 18fdb6348c480fb646799f621204f674815f05e7 Author: Mark Rutland Date: Mon Jun 17 12:18:41 2024 +0100 arm64: irqchip/gic-v3: Select priorities at boot time The distributor and PMR/RPR can present different views of the interrupt priority space dependent upon the values of GICD_CTLR.DS and SCR_EL3.FIQ. Currently we treat the distributor's view of the priority space as canonical, and when the two differ we change the way we handle values in the PMR/RPR, using the `gic_nonsecure_priorities` static key to decide what to do. This approach works, but it's sub-optimal. When using pseudo-NMI we manipulate the distributor rarely, and we manipulate the PMR/RPR registers very frequently in code spread out throughout the kernel (e.g. local_irq_{save,restore}()). It would be nicer if we could use fixed values for the PMR/RPR, and dynamically choose the values programmed into the distributor. This patch changes the GICv3 driver and arm64 code accordingly. PMR values are chosen at compile time, and the GICv3 driver determines the appropriate values to program into the distributor at boot time. This removes the need for the `gic_nonsecure_priorities` static key and results in smaller and better generated code for saving/restoring the irqflags. Before this patch, local_irq_disable() compiles to: | 0000000000000000 : | 0: d503201f nop | 4: d50343df msr daifset, #0x3 | 8: d65f03c0 ret | c: d503201f nop | 10: d2800c00 mov x0, #0x60 // #96 | 14: d5184600 msr icc_pmr_el1, x0 | 18: d65f03c0 ret | 1c: d2801400 mov x0, #0xa0 // #160 | 20: 17fffffd b 14 After this patch, local_irq_disable() compiles to: | 0000000000000000 : | 0: d503201f nop | 4: d50343df msr daifset, #0x3 | 8: d65f03c0 ret | c: d2801800 mov x0, #0xc0 // #192 | 10: d5184600 msr icc_pmr_el1, x0 | 14: d65f03c0 ret ... with 3 fewer instructions per call. For defconfig + CONFIG_PSEUDO_NMI=y, this results in a minor saving of ~4K of text, and will make it easier to make further improvements to the way we manipulate irqflags and DAIF bits. Signed-off-by: Mark Rutland Cc: Alexandru Elisei Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Link: https://lore.kernel.org/r/20240617111841.2529370-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas Acked-by: Thomas Gleixner commit d447bf09a4013541bbcbc7af898c26177734321e Author: Mark Rutland Date: Mon Jun 17 12:18:40 2024 +0100 irqchip/gic-v3: Detect GICD_CTRL.DS and SCR_EL3.FIQ earlier In subsequent patches the GICv3 driver will choose the regular interrupt priority at boot time, dependent on the configuration of GICD_CTRL.DS and SCR_EL3.FIQ. This will need to be chosen before we configure the distributor with default prioirities for all the interrupts, which happens before we currently detect these in gic_cpu_sys_reg_init(). Add a new gic_prio_init() function to detect these earlier and log them to the console so that any problems can be debugged more easily. This also allows the uniformity checks in gic_cpu_sys_reg_init() to be simplified, as we can compare directly with the boot CPU values which were recorded earlier. Signed-off-by: Mark Rutland Cc: Alexandru Elisei Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Link: https://lore.kernel.org/r/20240617111841.2529370-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas Acked-by: Thomas Gleixner commit a6156e70316b322b61739468e465bfb1345b7ae2 Author: Mark Rutland Date: Mon Jun 17 12:18:39 2024 +0100 irqchip/gic-v3: Make distributor priorities variables In subsequent patches the GICv3 driver will choose the regular interrupt priority at boot time. In preparation for using dynamic priorities, place the priorities in variables and update the code to pass these as parameters. Users of GICD_INT_DEF_PRI_X4 are modified to replicate the priority byte using REPEAT_BYTE_U32(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Alexandru Elisei Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Link: https://lore.kernel.org/r/20240617111841.2529370-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas Acked-by: Thomas Gleixner commit e95c64a7fb7185383a0edfd6c21477567bee4c26 Author: Mark Rutland Date: Mon Jun 17 12:18:38 2024 +0100 irqchip/gic-common: Remove sync_access callback The gic_configure_irq(), gic_dist_config(), and gic_cpu_config() functions each take an optional "sync_access" callback, but in almost all cases this is not used. The only user is the GICv3 driver's gic_cpu_init() function, which uses gic_redist_wait_for_rwp() as the "sync_access" callback for gic_cpu_config(). It would be simpler and clearer to remove the callback and have the GICv3 driver call gic_redist_wait_for_rwp() explicitly after gic_cpu_config(). Remove the "sync_access" callback, and call gic_redist_wait_for_rwp() explicitly in the GICv3 driver. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Alexandru Elisei Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Link: https://lore.kernel.org/r/20240617111841.2529370-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas Acked-by: Thomas Gleixner commit 118d777c4cb40f44e7b675955fd2da8b22f83913 Author: Mark Rutland Date: Mon Jun 17 12:18:37 2024 +0100 wordpart.h: Add REPEAT_BYTE_U32() In some cases it's necessary to replicate a byte across a u32 value, for which REPEAT_BYTE() would be helpful. Currently this requires explicit masking of the result to avoid sparse warnings, as e.g. (u32)REPEAT_BYTE(0xa0)) ... will result in a warning: cast truncates bits from constant value (a0a0a0a0a0a0a0a0 becomes a0a0a0a0) Add a new REPEAT_BYTE_U32() which does the necessary masking internally, so that we don't need to duplicate this for every usage. Signed-off-by: Mark Rutland Cc: Alexandru Elisei Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Link: https://lore.kernel.org/r/20240617111841.2529370-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas Acked-by: Thomas Gleixner commit ec0b4c4d45cf7cf9a6c9626a494a89cb1ae7c645 Author: Ilpo Järvinen Date: Mon May 27 15:55:35 2024 +0300 x86/of: Return consistent error type from x86_of_pci_irq_enable() x86_of_pci_irq_enable() returns PCIBIOS_* code received from pci_read_config_byte() directly and also -EINVAL which are not compatible error types. x86_of_pci_irq_enable() is used as (*pcibios_enable_irq) function which should not return PCIBIOS_* codes. Convert the PCIBIOS_* return code from pci_read_config_byte() into normal errno using pcibios_err_to_errno(). Fixes: 96e0a0797eba ("x86: dtb: Add support for PCI devices backed by dtb nodes") Signed-off-by: Ilpo Järvinen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240527125538.13620-1-ilpo.jarvinen@linux.intel.com commit 573611145fcb6325a28c462aca3753e257a0b2a6 Author: Anshuman Khandual Date: Tue Jun 18 09:17:03 2024 +0530 arm64/mm: Stop using ESR_ELx_FSC_TYPE during fault Fault status codes at page table level 0, 1, 2 and 3 for access, permission and translation faults are architecturally organized in a way, that masking out ESR_ELx_FSC_TYPE, fetches Level 0 status code for the respective fault. Helpers like esr_fsc_is_[translation|permission|access_flag]_fault() mask out ESR_ELx_FSC_TYPE before comparing against corresponding Level 0 status code as the kernel does not yet care about the page table level, where in the fault really occurred previously. This scheme is starting to crumble after FEAT_LPA2 when level -1 got added. Fault status code for translation fault at level -1 is 0x2B which does not follow ESR_ELx_FSC_TYPE, requiring esr_fsc_is_translation_fault() changes. This changes above helpers to compare against individual fault status code values for each page table level and stop using ESR_ELx_FSC_TYPE, which is losing its value as a common mask. Cc: Will Deacon Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Marc Zyngier Reviewed-by: Ryan Roberts Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240618034703.3622510-1-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 5bea90ad9743d2f3b2d788fbf8ad0491d1ceced2 Author: Jani Nikula Date: Tue May 14 15:55:14 2024 +0300 drm/msm/dp: switch to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Simplify the flow by updating the EDID property when the EDID is read instead of at .get_modes. Signed-off-by: Jani Nikula Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/593976/ Link: https://lore.kernel.org/r/93d6c446ed4831dadfb4a77635a67cf5f27e19ff.1715691257.git.jani.nikula@intel.com Signed-off-by: Dmitry Baryshkov commit f217b8b0bf4b2c16737fbe109707c3b100c54721 Author: Barnabás Czémán Date: Thu May 9 19:52:04 2024 +0200 drm/msm/dpu: guard ctl irq callback register/unregister CTLs on older qualcomm SOCs like msm8953 and msm8996 has not got interrupts, so better to skip CTL irq callback register/unregister make dpu_ctl_cfg be able to define without intr_start. Signed-off-by: Barnabás Czémán Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/596854/ Link: https://lore.kernel.org/r/20240509-ctl_irq-v1-1-9433f2da9dc7@gmail.com Signed-off-by: Dmitry Baryshkov commit 8ba16ca8cc96dfe2e2f09146fd386acc3390931c Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:11 2024 +0300 drm/msm/dpu: rename dpu_hw_setup_vsync_source functions Rename dpu_hw_setup_vsync_source functions to make the names match the implementation: on DPU 5.x the TOP only contains timer setup, while 3.x and 4.x used MDP_VSYNC_SEL register to select TE source. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/598745/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-8-67a0116b5366@linaro.org commit bb3db0eb6820796948db25327924c4d0e04d79a1 Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:10 2024 +0300 drm/msm/dpu: support setting the TE source Make the DPU driver use the TE source specified in the DT. If none is specified, the driver defaults to the first GPIO (mdp_vsync_p). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/598733/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-7-67a0116b5366@linaro.org commit 958d8d99ccb31ed5db02644bd138dbf70ace2051 Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:09 2024 +0300 drm/msm/dsi: parse vsync source from device tree Allow board's device tree to specify the vsync source (aka TE source). If the property is omitted, the display controller driver will use the default setting. Reviewed-by: Abhinav Kumar [DB: fixed clearing of return value if there is no TE property] Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/598740/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-6-67a0116b5366@linaro.org commit 47cda61fdc6497405a73f7845032649c03f12eb3 Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:08 2024 +0300 drm/msm/dpu: rework vsync_source handling The struct msm_display_info has is_te_using_watchdog_timer field which is neither set anywhere nor is flexible enough to specify different sources. Replace it with the field specifying the vsync source using enum dpu_vsync_source. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/598738/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-5-67a0116b5366@linaro.org commit ceb5d43e068376a7751565ce8126fb4ee4360240 Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:07 2024 +0300 drm/msm/dpu: pull the is_cmd_mode out of _dpu_encoder_update_vsync_source() Setting vsync source makes sense only for DSI CMD panels. Pull the is_cmd_mode condition out of the function into the calling code, so that it becomes more explicit. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/598736/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-4-67a0116b5366@linaro.org commit 36aa1f2bef25719d9567215291832fa09df0eabe Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:06 2024 +0300 drm/msm/dsi: drop unused GPIOs handling Neither disp-enable-gpios nor disp-te-gpios are defined in the schema. None of the board DT files use those GPIO pins. Drop them from the driver. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/598734/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-3-67a0116b5366@linaro.org commit 548eb2bcea3c3edcdad9b4ec5cb840eb23701e7b Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:05 2024 +0300 drm/msm/dpu: convert vsync source defines to the enum Add enum dpu_vsync_source instead of a series of defines. Use this enum to pass vsync information. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/598743/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-2-67a0116b5366@linaro.org commit ec66abb42d78c09c5a887e446f3d49c1af3560a0 Author: Dmitry Baryshkov Date: Thu Jun 13 20:05:04 2024 +0300 dt-bindings: display/msm/dsi: allow specifying TE source Command mode panels provide TE signal back to the DSI host to signal that the frame display has completed and update of the image will not cause tearing. Usually it is connected to the first GPIO with the mdp_vsync function, which is the default. In such case the property can be skipped. Acked-by: Krzysztof Kozlowski Reviewed-by: Rob Herring (Arm) Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/598732/ Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-1-67a0116b5366@linaro.org commit 7af01e5695295444d47f4ead3e27e91d8c9e60f4 Author: Baochen Qiang Date: Wed Jun 19 17:21:12 2024 +0300 wifi: ath12k: handle keepalive during WoWLAN suspend and resume With WoWLAN enabled and after sleeping for a rather long time, we are seeing that with some APs, it is not able to wake up the STA though the correct wake up pattern has been configured. This is because the host doesn't send keepalive command to firmware, thus firmware will not send any packet to the AP and after a specific time the AP kicks out the STA. So enable keepalive before going to suspend and disable it after resume back. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-9-quic_bqiang@quicinc.com commit aab4ae566fa15c19efadad16a8b54306b9b37e10 Author: Baochen Qiang Date: Wed Jun 19 17:21:12 2024 +0300 wifi: ath12k: support GTK rekey offload Host sets GTK related info to firmware before WoW is enabled, and gets rekey replay_count and then disables GTK rekey when WoW quits. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-8-quic_bqiang@quicinc.com commit 1666108c74c438180dd69973e57909420836fd49 Author: Baochen Qiang Date: Wed Jun 19 17:21:12 2024 +0300 wifi: ath12k: support ARP and NS offload Support ARP and NS offload in WoW state. Tested this way: put machine A with QCA6390 to WoW state, ping/ping6 machine A from another machine B, check sniffer to see any ARP response and Neighbor Advertisement from machine A. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-7-quic_bqiang@quicinc.com commit 66a9448b1b897793a3237f832b5ce3bb255e28e7 Author: Baochen Qiang Date: Wed Jun 19 17:21:12 2024 +0300 wifi: ath12k: implement hardware data filter Host needs to set hardware data filter before entering WoW to let firmware drop needless broadcast/multicast frames to avoid frequent wakeup. Host clears hardware data filter when leaving WoW. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-6-quic_bqiang@quicinc.com commit 16f474d6d49db5d93e79c2d4bdcc3a730cf1d1f1 Author: Baochen Qiang Date: Tue Jun 4 13:54:03 2024 +0800 wifi: ath12k: add WoW net-detect functionality Implement net-detect feature by setting flag WIPHY_WOWLAN_NET_DETECT if firmware supports this feature. Driver sets the related PNO configuration to firmware before entering WoW and firmware then scans periodically and wakes up host if a specific SSID is found. Note that firmware crashes if we enable it for both P2P vdev and station vdev simultaneously because firmware can only support one vdev at a time. Since there is rare scenario for a P2P vdev to do net-detect, skip it for P2P vdevs. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-5-quic_bqiang@quicinc.com commit 4a3c212eee0e36c1cd55bfbfb94041a0d3ad265b Author: Baochen Qiang Date: Wed Jun 19 17:21:11 2024 +0300 wifi: ath12k: add basic WoW functionalities Implement basic WoW functionalities such as magic-packet, disconnect and pattern. The logic is very similar to ath11k. When WoW is configured, ath12k_core_suspend and ath12k_core_resume are skipped (by checking ar->state) as we are not allowed to power cycle firmware. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-4-quic_bqiang@quicinc.com commit 5931741709195da9abb0fb0b8c0fed5d0898b275 Author: Baochen Qiang Date: Wed Jun 19 17:21:11 2024 +0300 wifi: ath12k: implement WoW enable and wakeup commands Implement WoW enable and WoW wakeup commands which are needed for suspend/resume. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-3-quic_bqiang@quicinc.com commit 3216b7bcd7197ca5da204d3eea81d308cae2a849 Author: Baochen Qiang Date: Wed Jun 19 17:21:11 2024 +0300 wifi: ath12k: add ATH12K_DBG_WOW log level Currently there is no dedicated log level for WoW, so create it for future use. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240604055407.12506-2-quic_bqiang@quicinc.com commit c73a9683cb21012b6c0f14217974837151c527a8 Author: Antoine Tenart Date: Mon Jun 24 11:09:07 2024 +0200 libbpf: Skip base btf sanity checks When upgrading to libbpf 1.3 we noticed a big performance hit while loading programs using CORE on non base-BTF symbols. This was tracked down to the new BTF sanity check logic. The issue is the base BTF definitions are checked first for the base BTF and then again for every module BTF. Loading 5 dummy programs (using libbpf-rs) that are using CORE on a non-base BTF symbol on my system: - Before this fix: 3s. - With this fix: 0.1s. Fix this by only checking the types starting at the BTF start id. This should ensure the base BTF is still checked as expected but only once (btf->start_id == 1 when creating the base BTF), and then only additional types are checked for each module BTF. Fixes: 3903802bb99a ("libbpf: Add basic BTF sanity validation") Signed-off-by: Antoine Tenart Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20240624090908.171231-1-atenart@kernel.org commit 0f2ddb128fa20f8441d903285632f2c69e90fae1 Author: Jonas Karlman Date: Sat Jun 15 17:03:52 2024 +0000 arm64: dts: rockchip: Increase VOP clk rate on RK3328 The VOP on RK3328 needs to run at a higher rate in order to produce a proper 3840x2160 signal. Change to use 300MHz for VIO clk and 400MHz for VOP clk, same rates used by vendor 4.4 kernel. Fixes: 52e02d377a72 ("arm64: dts: rockchip: add core dtsi file for RK3328 SoCs") Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240615170417.3134517-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit f7c742cbe664ebdedc075945e75443683d1175f7 Author: Trevor Woerner Date: Wed Jun 19 21:32:49 2024 -0400 arm64: dts: rockchip: add gpio-line-names to radxa-zero-3 Add names to the pins of the general-purpose expansion header as given in the Radxa documentation[1] following the conventions in the kernel[2] to make it easier for users to correlate pins with functions when using utilities such as 'gpioinfo'. [1] https://docs.radxa.com/en/zero/zero3/hardware-design/hardware-interface [2] https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio.txt Signed-off-by: Trevor Woerner Link: https://lore.kernel.org/r/20240620013301.33653-1-twoerner@gmail.com Signed-off-by: Heiko Stuebner commit a7b2070505a2a09ea65fa0c8c480c97f62d1978d Author: Alexey Charkov Date: Mon Jun 17 22:28:58 2024 +0400 arm64: dts: rockchip: Split GPU OPPs of RK3588 and RK3588j RK3588j uses a different set of OPPs for its GPU, both in terms of allowed frequencies and in terms of voltages. Move the GPU OPPs table into per-variant .dtsi files to accommodate for this difference. The table for RK3588j is adapted from Rockchip downstream sources [1], while RK3588 one is moved verbatim into the per-variant .dtsi file. The values provided for RK3588 in the downstream sources match those in the original commit. [1] https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3588s.dtsi Fixes: 6fca4edb93d3 ("arm64: dts: rockchip: Add rk3588 GPU node") Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-8-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit 667885a6865832eb0678c7e02e47a3392f177ecb Author: Alexey Charkov Date: Mon Jun 17 22:28:57 2024 +0400 arm64: dts: rockchip: Add OPP data for CPU cores on RK3588j RK3588j is the 'industrial' variant of RK3588, and it uses a different set of OPPs both in terms of allowed frequencies and in terms of applicable voltages at each frequency setpoint. Add the OPPs that apply to RK3588j (and apparently RK3588m too) to enable dynamic CPU frequency scaling. OPP values are derived from Rockchip downstream sources [1] by taking only those OPPs which have the highest frequency for a given voltage level and dropping the rest (if they are included, the kernel complains at boot time about them being inefficient) [1] https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3588s.dtsi Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-7-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit 276856db91b46eaa7a4c19226c096a9dc899a3e9 Author: Alexey Charkov Date: Mon Jun 17 22:28:56 2024 +0400 arm64: dts: rockchip: Add OPP data for CPU cores on RK3588 By default the CPUs on RK3588 start up in a conservative performance mode. Add frequency and voltage mappings to the device tree to enable dynamic scaling via cpufreq. OPP values are adapted from Radxa's downstream kernel for Rock 5B [1], stripping them down to the minimum frequency and voltage combinations as expected by the generic upstream cpufreq-dt driver, and also dropping those OPPs that don't differ in voltage but only in frequency (keeping the top frequency OPP in each case). Note that this patch ignores voltage scaling for the CPU memory interface which the downstream kernel does through a custom cpufreq driver, and which is why the downstream version has two sets of voltage values for each OPP (the second one being meant for the memory interface supply regulator). This is done instead via regulator coupling between CPU and memory interface supplies on affected boards. This has been tested on Rock 5B with u-boot 2023.11 compiled from Collabora's integration tree [2] with binary bl31 and appears to be stable both under active cooling and passive cooling (with throttling) [1] https://github.com/radxa/kernel/blob/stable-5.10-rock5/arch/arm64/boot/dts/rockchip/rk3588s.dtsi [2] https://gitlab.collabora.com/hardware-enablement/rockchip-3588/u-boot Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-6-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit 0ba0560982bc8d0c3fb3ca209fd0ed29f81402ac Author: Alexey Charkov Date: Mon Jun 17 22:28:55 2024 +0400 arm64: dts: rockchip: Add CPU/memory regulator coupling for 2 RK3588 boards RK3588 chips allow for their CPU cores to be powered by a different supply vs. their corresponding memory interfaces, and two of the boards currently upstream do that (EVB1 and QuartzPro64). The voltage of the memory interface though has to match that of the CPU cores that use it, which downstream kernels achieve by the means of a custom cpufreq driver which adjusts both at the same time. It seems that regulator coupling is a more appropriate generic interface for it, so this patch introduces coupling to affected device trees to ensure that memory interface voltage is also updated whenever cpufreq switches between CPU OPPs. Note that other boards, such as Radxa Rock 5B, define both the CPU and memory interface regulators as aliases to the same DT node, so this doesn't apply there. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-5-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit 060c1950037e4c54ca4d8186a8f46269e35db901 Author: FUKAUMI Naoki Date: Fri Jun 21 07:44:35 2024 +0900 arm64: dts: rockchip: fix mmc aliases for Radxa ZERO 3E/3W align with other Radxa products. - mmc0 is eMMC - mmc1 is microSD for ZERO 3E, there is no eMMC, but aliases should start at 0, so mmc0 is microSD as exception. Fixes: 1a5c8d307c83 ("arm64: dts: rockchip: Add Radxa ZERO 3W/3E") Signed-off-by: FUKAUMI Naoki Changes in v3: - fix syntax error in rk3566-radxa-zero-3e.dts Changes in v2: - microSD is mmc0 instead of mmc1 for ZERO 3E Link: https://lore.kernel.org/r/20240620224435.2752-1-naoki@radxa.com Signed-off-by: Heiko Stuebner commit 7b4a8097e58b608638d416bd57469f8a9ab70e7b Author: Alex Bee Date: Sun Jun 23 11:01:16 2024 +0200 arm64: dts: rockchip: Add Neardi LBA3368 board LBA3368 is a RK3368 based industrial board from Neardi. Specs: - 1 GB DDR3 DRAM - 8/16 GB eMMC - µSD slot - 100 mbit ethernet (optional 12V PoE) - Ampak AP6255 Wifi/BT combo - ADC button - 4 x USB 2.0 via onboard GL852G HUB connected to SoC's ehci host - 2 exposed as USB-A - 2 via 2-mm-4-pin connectors - micro USB OTG connector - 2 x UART TTL (2-mm-4-pin connectors) - CSI connector - DSI connector - eDP connector - HDMI 2.0a output (type A) - touchpad connector (I2C, 3.3V) - ALC5640 audio codec - combined headphone/microphone jack - speaker connector pads Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240623090116.670607-5-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit a30a6386ecc1f6ff71d4f7606bed25b7075476ab Author: Alex Bee Date: Sun Jun 23 11:01:14 2024 +0200 dt-bindings: arm: rockchip: Add Neardi LBA3368 Add Neardi LBA3368, a RK3368 based industrial board. Signed-off-by: Alex Bee Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240623090116.670607-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 79cba74263d96ab1848eb04862f72f8988eb0486 Author: Alex Bee Date: Sun Jun 23 11:01:13 2024 +0200 dt-bindings: vendor-prefixes: Add Neardi Technology Add vendor prefix for Shanghai Neardi Technology Co., Ltd. (http://neardi.com/) Signed-off-by: Alex Bee Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240623090116.670607-2-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 3f9cfd4f5e453aa33ca4dc40959a1cc524501160 Author: Peter Robinson Date: Sun Jun 23 17:53:22 2024 +0100 arm64: dts: rockchip: Enable PinePhone Pro vibrator The PinePhone Pro has a vibrator attached via GPIO so lets enable it. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20240623165326.1273944-3-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit c1d9ced35621bdc894321ad284a29922dd3e7251 Author: Peter Robinson Date: Sun Jun 23 17:53:21 2024 +0100 arm64: dts: rockchip: Enable PinePhone Pro IMU sensor Enable the IMU sensor on the PinePhone Pro including the i2c4 bus that it's attached to. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20240623165326.1273944-2-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit ee9b6b6414790223e8315ef0e25df69b3b5e6e50 Author: Peter Robinson Date: Sun Jun 23 17:53:20 2024 +0100 arm64: dts: rockchip: Add Pinephone Pro support for GPIO LEDs The PinePhone Pro has a cluster of 3 single RGB GPIO LEDs. Add the GPIO entries for the 3 red/green/blue LEDs and an entry for the multi-color group to allow them to be used as a combined RGB LED. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20240623165326.1273944-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit c7f024956d9f35d8b305fe90fe33d7f15055ef25 Author: Peter Robinson Date: Sun Jun 23 21:46:14 2024 +0100 arm64: dts: rockchip: Enable SPI flash on PinePhone Pro The PinePhone Pro as SPI flash on board so enable the SPI interface and the flash. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20240623204616.1344806-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit 06f6dd4d607766a527e37529f2f3f90dd1464293 Author: FUKAUMI Naoki Date: Sun Jun 23 11:33:29 2024 +0900 arm64: dts: rockchip: change spi-max-frequency for Radxa ROCK 3C SPI NOR flash chip may vary, so use safe(lowest) spi-max-frequency. Signed-off-by: FUKAUMI Naoki Link: https://lore.kernel.org/r/20240623023329.1044-3-naoki@radxa.com Signed-off-by: Heiko Stuebner commit 00224650dd45e166ea6eb1593f5f064583963ccf Author: FUKAUMI Naoki Date: Sun Jun 23 11:33:28 2024 +0900 arm64: dts: rockchip: add (but disabled) SFC node for Radxa ROCK 5A This commit adds SFC node for Radxa ROCK 5A. since sdhci and sfc on RK3588s share pins(i.e. exclusive), it cannot be enabled both nodes at the same time. so status = "okay" is omitted here. you may be able to enable sfc (and disable sdhci) by fdt overlay. SPI NOR flash chip may vary, so use safe(lowest) spi-max-frequency. Signed-off-by: FUKAUMI Naoki Link: https://lore.kernel.org/r/20240623023329.1044-2-naoki@radxa.com Signed-off-by: Heiko Stuebner commit 9204a7ecca96403ee3d61c14cb9eb87ec89b0fcd Author: FUKAUMI Naoki Date: Sun Jun 23 11:33:27 2024 +0900 arm64: dts: rockchip: add SFC support for Radxa ROCK 5B This commit adds support for SPI NOR flash on Radxa ROCK 5B. SPI NOR flash chip may vary, so use safe(lowest) spi-max-frequency. Signed-off-by: FUKAUMI Naoki Link: https://lore.kernel.org/r/20240623023329.1044-1-naoki@radxa.com Signed-off-by: Heiko Stuebner commit 4a152231b050590af771fa3cc8462ed08b691a24 Author: Alexey Charkov Date: Mon Jun 17 22:28:54 2024 +0400 arm64: dts: rockchip: enable automatic fan control on Rock 5B This links the PWM fan on Radxa Rock 5B as an active cooling device managed automatically by the thermal subsystem, with a target SoC temperature of 65C and a minimum-spin interval from 55C to 65C to ensure airflow when the system gets warm Helped-by: Dragan Simic Reviewed-by: Dragan Simic Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-4-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit b78f87940a79321a444083aca46ac3e8e53d1a90 Author: Alexey Charkov Date: Mon Jun 17 22:28:53 2024 +0400 arm64: dts: rockchip: add passive GPU cooling on RK3588 As the GPU support on RK3588 has been merged upstream, along with OPP values, add a corresponding cooling map for passive cooling using the GPU. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-3-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit 2f8064b9c4a012b4d4e8383818f13b682b6c156a Author: Alexey Charkov Date: Mon Jun 17 22:28:52 2024 +0400 arm64: dts: rockchip: enable thermal management on all RK3588 boards This enables the on-chip thermal monitoring sensor (TSADC) on all RK3588(s) boards that don't have it enabled yet. It provides temperature monitoring for the SoC and emergency thermal shutdowns, and is thus important to have in place before CPU DVFS is enabled, as high CPU operating performance points can overheat the chip quickly in the absence of thermal management. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-2-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit 510cd9e688453166b2bff3999ed21cac97385bb5 Author: Alexey Charkov Date: Mon Jun 17 22:28:51 2024 +0400 arm64: dts: rockchip: add thermal zones information on RK3588 This includes the necessary device tree data to allow thermal monitoring on RK3588(s) using the on-chip TSADC device, along with trip points for automatic thermal management. Each of the CPU clusters (one for the little cores and two for the big cores) get a passive cooling trip point at 85C, which will trigger DVFS throttling of the respective cluster upon reaching a high temperature condition. All zones also have a critical trip point at 115C, which will trigger a reset. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-1-c1f5f3267f1e@gmail.com Signed-off-by: Heiko Stuebner commit def88eb4d8365a4aa064d28405d03550a9d0a3be Author: Dragan Simic Date: Sun Jun 9 10:58:19 2024 +0200 arm64: dts: rockchip: Prepare RK3588 SoC dtsi files for per-variant OPPs Rename the Rockchip RK3588 SoC dtsi files and, consequently, adjust their contents appropriately, to prepare them for the ability to specify different CPU and GPU OPPs for each of the supported RK3588 SoC variants. As already discussed, [1][2][3][4] some of the RK3588 SoC variants require different OPPs, and it makes more sense to have the OPPs already defined when a board dts(i) file includes one of the SoC variant dtsi files (rk3588.dtsi, rk3588j.dtsi or rk3588s.dtsi), rather than requiring the board dts(i) file to also include a separate rk3588*-opp.dtsi file. The choice of the SoC variant is already made by the inclusion of the SoC dtsi file into the board dts(i) file, and it doesn't make much sense to, effectively, allow the board dts(i) file to include and use an incompatible set of OPPs for the already selected RK3588 SoC variant. The new naming scheme for the RK3588 SoC dtsi files uses "-base" and "-extra" suffixes to denote the DT data shared between all RK5588 SoC variants, and the DT data shared between the unrestricted SoC variants, respectively. For example, the DT data for the RK3588 includes both rk3588-base.dtsi and rk3588-extra.dtsi, because it's an unrestricted SoC variant, while the DT data for the RK3588S variant includes rk3588-base.dtsi only, because it's a restricted SoC variant, feature- and interface-wise. This achieves a more logical naming of the RK3588 SoC dtsi files, which reflects the way DT data for the SoC variants is built by "stacking" the SoC variant features made available through the "-base" and "-extra" SoC dtsi files. Additionally, the SoC variant dtsi files (rk3588.dtsi, rk3588j.dtsi and rk3588s.dtsi) are no longer parents to any other SoC variant dtsi files, which should help with making the new "stacking" approach cleaner and easier to follow. The RK3588 pinctrl dtsi files are also renamed in the same way, for the sake of consistency. This also keeps the "-base" and "-extra" groups of the dtsi files together when looked at in a directory listing, which is helpful. The per-SoC-variant OPPs should go directly into the SoC dtsi files, if no more than one SoC variant uses those OPPs, or be put into a separate "-opp" dtsi file that's shared between and included from two or more SoC variant dtsi files. An example for the former is the non-shared OPP data that should go directly into the RK3588J SoC variant dtsi file (i.e. rk3588j.dtsi), and an example for the latter is the shared OPP data that should be put into rk3588-opp.dtsi and be included from the RK3588 and RK3588S SoC variant dtsi files (i.e. rk3588.dtsi and rk3588s.dtsi, respectively). Consequently, if the OPPs for the RK3588 and RK3588S SoC variants are ever made different, the shared rk3588-opp.dtsi file should be deleted and the new OPPs should be put directly into rk3588.dtsi and rk3588s.dtsi. [4] No functional changes are introduced, which was validated by decompiling and comparing all affected dtb files before and after these changes. As a side note, due to the nature of introduced changes, this commit is best viewed using the --break-rewrites option for git-log(1). [1] https://lore.kernel.org/linux-rockchip/646a33e0-5c1b-471c-8183-2c0df40ea51a@cherry.de/ [2] https://lore.kernel.org/linux-rockchip/CABjd4Yxi=+3gkNnH3BysUzzYsji-=-yROtzEc8jM_g0roKB0-w@mail.gmail.com/ [3] https://lore.kernel.org/linux-rockchip/035a274be262528012173d463e25b55f@manjaro.org/ [4] https://lore.kernel.org/linux-rockchip/673dcf47596e7bc8ba065034e339bb1bbf9cdcb0.1716948159.git.dsimic@manjaro.org/T/#u Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/9ffedc0e2ca7f167d9d795b2a8f43cb9f56a653b.1717923308.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit e23819cf273c110662fdc392dcb55a75b3888609 Author: Sebastian Kropatsch Date: Sun Jun 16 23:48:30 2024 +0200 arm64: dts: rockchip: Add FriendlyElec CM3588 NAS board The CM3588 NAS by FriendlyElec pairs the CM3588 compute module, based on the Rockchip RK3588 SoC, with the CM3588 NAS Kit carrier board. To reflect the hardware setup, add device tree sources for the SoM and the NAS daughter board as separate files. Hardware features: - Rockchip RK3588 SoC - 4GB/8GB/16GB LPDDR4x RAM - 64GB eMMC - MicroSD card slot - 1x RTL8125B 2.5G Ethernet - 4x M.2 M-Key with PCIe 3.0 x1 (via bifurcation) for NVMe SSDs - 2x USB 3.0 (USB 3.1 Gen1) Type-A, 1x USB 2.0 Type-A - 1x USB 3.0 Type-C with DP AltMode support - 2x HDMI 2.1 out, 1x HDMI in - MIPI-CSI Connector, MIPI-DSI Connector - 40-pin GPIO header - 4 buttons: power, reset, recovery, MASK, user button - 3.5mm Headphone out, 2.0mm PH-2A Mic in - 5V Fan connector, PWM beeper, IR receiver, RTC battery connector PCIe bifurcation is used to handle all four M.2 sockets at PCIe 3.0 x1 speed. Data lane mapping in the DT is done like described in commit f8020dfb311d ("phy: rockchip-snps-pcie3: fix bifurcation on rk3588"). This device tree includes support for eMMC, SD card, ethernet, all USB2 and USB3 ports, all four M.2 slots, GPU, beeper, IR, RTC, UART debugging as well as the buttons and LEDs. The GPIOs are labeled according to the schematics. Reviewed-by: Space Meyer Signed-off-by: Sebastian Kropatsch Link: https://lore.kernel.org/r/20240616215354.40999-3-seb-dev@mail.de Signed-off-by: Heiko Stuebner commit 01eeea6b1afbe6c40a0915e40644efc0bebdb42a Author: Sebastian Kropatsch Date: Sun Jun 16 23:48:29 2024 +0200 dt-bindings: arm: rockchip: Add FriendlyElec CM3588 NAS Add devicetree bindings for the FriendlyElec CM3588 NAS board. The CM3588 NAS by FriendlyElec pairs the CM3588 compute module, based on the Rockchip RK3588 SoC, with the CM3588 NAS Kit carrier board. Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Kropatsch Link: https://lore.kernel.org/r/20240616215354.40999-2-seb-dev@mail.de Signed-off-by: Heiko Stuebner commit 4261031484d8f8fcbd2bd6517416b88545447597 Merge: 7b3ffe0d815d1 13bbe1c83bc40 Author: Ilpo Järvinen Date: Mon Jun 24 19:06:28 2024 +0300 Merge branch 'pdx86/platform-drivers-x86-lenovo-c630' into review-ilpo commit a441c0aca4552a1b959b26526854a97544d10ecb Author: Maarten Lankhorst Date: Wed May 22 07:33:41 2024 +0200 drm/i915: Use the same vblank worker for atomic unpin In case of legacy cursor update, the cursor VMA needs to be unpinned only after vblank. This exceeds the lifetime of the whole atomic commit. Any trick I attempted to keep the atomic commit alive didn't work, as drm_atomic_helper_setup_commit() force throttles on any old commit that wasn't cleaned up. The only option remaining is to remove the plane from the atomic commit, and use the same path as the legacy cursor update to clean the state after vblank. Changes since previous version: - Call the memset for plane state immediately when scheduling vblank, this prevents a use-after-free in cursor cleanup. Signed-off-by: Maarten Lankhorst Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240522053341.137592-4-maarten.lankhorst@linux.intel.com commit bb8624de096340daec29137f56ea711fbcdea450 Author: Ville Syrjälä Date: Wed May 22 07:33:40 2024 +0200 drm/i915: Use vblank worker to unpin old legacy cursor fb safely The cursor hardware only does sync updates, and thus the hardware will be scanning out from the old fb until the next start of vblank. So in order to make the legacy cursor fastpath actually safe we should not unpin the old fb until we're sure the hardware has ceased accessing it. The simplest approach is to just use a vblank work here to do the delayed unpin. Not 100% sure it's a good idea to put this onto the same high priority vblank worker as eg. our timing critical gamma updates. But let's keep it simple for now, and it we later discover that this is causing problems we can think about adding a lower priority worker for such things. This patch is slightly reworked by Maarten Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Signed-off-by: Maarten Lankhorst Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240522053341.137592-3-maarten.lankhorst@linux.intel.com commit 12f84e8793af19357e2270b24b9e8d453bb3a1f2 Author: Maarten Lankhorst Date: Wed May 22 07:33:39 2024 +0200 drm: Add drm_vblank_work_flush_all(). In some cases we want to flush all vblank work, right before vblank_off for example. Add a simple function to make this possible. Check that both pending_work and running work are empty when flushing. Co-Developed-by: Chaitanya Kumar Borah Signed-off-by: Maarten Lankhorst Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240522053341.137592-2-maarten.lankhorst@linux.intel.com commit 99a2b6d16b37258bcbdc2e07eb55e129362a182f Author: Johan Jonker Date: Thu Jun 20 16:11:38 2024 +0200 ARM: dts: rockchip: enable hdmi_sound and i2s0 for mk808 hdmi Enable the hdmi_sound node and add i2s0 as sound source for mk808 hdmi. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/aa79ff87-ea94-4f6d-a81b-5110724243f4@gmail.com Signed-off-by: Heiko Stuebner commit 13bbe1c83bc401c2538c758228d27b4042b08341 Author: Dmitry Baryshkov Date: Mon Jun 24 18:08:12 2024 +0300 platform/arm64: build drivers even on non-ARM64 platforms The Kconfig for platforms/arm64 has 'depends on ARM64 || COMPILE_TEST'. However due to Makefile having just obj-$(CONFIG_ARM64) the subdir will not be descended for !ARM64 platforms and thus the drivers won't get built. This breaks modular builds of other driver drivers which depend on arm64 platform drivers. Reported-by: Greg Kroah-Hartman Fixes: 363c8aea2572 ("platform: Add ARM64 platform directory") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240624-ucsi-yoga-ec-driver-v9-1-53af411a9bd6@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit f7e7e00f7b86bceb0816d25a0372096ac6de3fc5 Author: Wolfram Sang Date: Fri Jun 21 12:18:34 2024 +0200 MAINTAINERS: drop entry for VIA SD/MMC controller EMail addresses of both maintainers bounce. Since there have been only cleanups for the last 10 years, let it fall back to the default MMC entry. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20240621101833.24703-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit bf9817d2ed3a499d4ec1a5125fb700185b2f2499 Author: Wolfram Sang Date: Mon Jun 3 12:01:17 2024 +0200 MAINTAINERS: delete email for Anton Sviridenko The email address bounced. I couldn't find a newer one in recent git history, so update MAINTAINERS accordingly. Signed-off-by: Wolfram Sang Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9123419c3b12dda7f81442299758f3bcd1aa9883 Author: Samuel Wein Date: Mon Jun 17 18:53:09 2024 +0000 media: Documentation: ipu6: Fix examples in ipu6-isys admin-guide Fix flags in X1 Yoga example. MEDIA_LNK_FL_DYNAMIC (0x4 in the link flag) was removed in V4 Intel IPU6 and IPU6 input system drivers. Added -V flag to media-ctl commands for X1 Yoga, lower-case v only makes it verbose upper-case V sets the format. Signed-off-by: Samuel Wein [Sakari Ailus: Align subject line, rewrap commit message.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 355f5097262b17d930e880b35f88986d3f8c1c85 Author: Zhi Mao Date: Tue Jun 11 19:32:35 2024 +0800 media: i2c: Add GC05A2 image sensor driver Add a V4L2 sub-device driver for Galaxycore GC05A2 image sensor. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Zhi Mao [Sakari Ailus: Fold in MAINTAINERS change.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 783fb3f5751120108f0fb246ffc4a344d2e5acab Author: Zhi Mao Date: Tue Jun 11 19:32:34 2024 +0800 media: dt-bindings: i2c: add GalaxyCore GC05A2 image sensor Add YAML device tree binding for GC05A2 CMOS image sensor, and the relevant MAINTAINERS entries. Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Zhi Mao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1ad0cd5ed61b24929fcdeb9a38c15a3f2c18c1fe Author: Zhi Mao Date: Wed Jun 12 10:17:59 2024 +0800 media: i2c: Add GC08A3 image sensor driver Add a V4L2 sub-device driver for Galaxycore GC08A3 image sensor. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Zhi Mao [Sakari Ailus: Fold in MAINTAINERS change.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4ea1a3bfb0ee2a2a07cbd2f6aa76be8a2661e724 Author: Zhi Mao Date: Wed Jun 12 10:17:58 2024 +0800 media: dt-bindings: i2c: add GalaxyCore GC08A3 image sensor Add YAML device tree binding for GC08A3 CMOS image sensor, and the relevant MAINTAINERS entries. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Zhi Mao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5b5baba6222255d29626f63c41f101379ec5400b Author: Breno Leitao Date: Tue Jun 11 02:18:12 2024 -0700 debugobjects: Annotate racy debug variables KCSAN has identified a potential data race in debugobjects, where the global variable debug_objects_maxchain is accessed for both reading and writing simultaneously in separate and parallel data paths. This results in the following splat printed by KCSAN: BUG: KCSAN: data-race in debug_check_no_obj_freed / debug_object_activate write to 0xffffffff847ccfc8 of 4 bytes by task 734 on cpu 41: debug_object_activate (lib/debugobjects.c:199 lib/debugobjects.c:564 lib/debugobjects.c:710) call_rcu (kernel/rcu/rcu.h:227 kernel/rcu/tree.c:2719 kernel/rcu/tree.c:2838) security_inode_free (security/security.c:1626) __destroy_inode (./include/linux/fsnotify.h:222 fs/inode.c:287) ... read to 0xffffffff847ccfc8 of 4 bytes by task 384 on cpu 31: debug_check_no_obj_freed (lib/debugobjects.c:1000 lib/debugobjects.c:1019) kfree (mm/slub.c:2081 mm/slub.c:4280 mm/slub.c:4390) percpu_ref_exit (lib/percpu-refcount.c:147) css_free_rwork_fn (kernel/cgroup/cgroup.c:5357) ... value changed: 0x00000070 -> 0x00000071 The data race is actually harmless as this is just used for debugfs statistics, as all other debug variables. Annotate all debug variables as racy explicitly, since these variables are known to be racy and harmless. Signed-off-by: Breno Leitao Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240611091813.1189860-1-leitao@debian.org commit f86937afb446d056e9e385da05536eb26483874c Author: Geert Uytterhoeven Date: Thu Jun 20 17:39:46 2024 +0200 mmc: tmio: Remove obsolete .set_pwr() callback() Commit ca78476e4888f1f1 ("mfd: Remove toshiba tmio drivers") removed the last users of the .set_pwr() callback in the tmio_mmc_data structure. Remove the callback, and all related infrastructure. Signed-off-by: Geert Uytterhoeven Acked-by: Lee Jones Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/fbbc13ddd19df2c40933ffa3b82fb14841bf1d4c.1718897545.git.geert+renesas@glider.be commit 89f415b99050fbf7bcf3fca0cde30c09b62265eb Author: Geert Uytterhoeven Date: Thu Jun 20 17:39:45 2024 +0200 mfd: tmio: Remove obsolete .set_clk_div() callback Commit bef64d2908e825c5 ("mmc: remove tmio_mmc driver") removed the last user of the .set_clk_div() callback in the tmio_mmc_data structure. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Lad Prabhakar Acked-by: Lee Jones Link: https://lore.kernel.org/r/e0fa98f138a7b2836128178f8b3a757978517307.1718897545.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit 783100f6ea0ae74a4ff3d616d4bce3b54badf347 Author: Alexander Usyskin Date: Sat Jun 15 09:31:59 2024 +0300 mei: bus-fixup: set timeout for MKHI send operations Set a timeout for MKHI client send operations in the bus fixup routines to prevent potential lock-ups on the cl_bus_lock mutex. In rare conditions, such as when the i915 or Xe driver is stopping and not routing interrupts or when GSC FW is in unexpectedly reset the fixup routines can get stuck. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20240615063159.1460290-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 50cf5f3842af3135b88b041890e7e12a74425fcb Author: Jens Axboe Date: Thu Jun 6 12:25:01 2024 -0600 io_uring/msg_ring: add an alloc cache for io_kiocb entries With slab accounting, allocating and freeing memory has considerable overhead. Add a basic alloc cache for the io_kiocb allocations that msg_ring needs to do. Unlike other caches, this one is used by the sender, grabbing it from the remote ring. When the remote ring gets the posted completion, it'll free it locally. Hence it is separately locked, using ctx->msg_lock. Signed-off-by: Jens Axboe commit 0617bb500bfabf8447062f1e1edde92ed2b638f1 Author: Jens Axboe Date: Thu Mar 28 11:00:21 2024 -0600 io_uring/msg_ring: improve handling of target CQE posting Use the exported helper for queueing task_work for message passing, rather than rolling our own. Note that this is only done for strict data messages for now, file descriptor passing messages still rely on the kernel task_work. It could get converted at some point if it's performance critical. This improves peak performance of message passing by about 5x in some basic testing, with 2 threads just sending messages to each other. Before this change, it was capped at around 700K/sec, with the change it's at over 4M/sec. Signed-off-by: Jens Axboe commit f33096a3c99c0149be49fe1e107244a7ed860ecb Author: Jens Axboe Date: Thu Jun 6 10:28:26 2024 -0600 io_uring: add io_add_aux_cqe() helper This helper will post a CQE, and can be called from task_work where we now that the ctx is already properly locked and that deferred completions will get flushed later on. Signed-off-by: Jens Axboe commit c3ac76f9ca7a621428851149bc56bfca0aacaef4 Author: Jens Axboe Date: Thu Mar 28 12:38:44 2024 -0600 io_uring: add remote task_work execution helper All our task_work handling is targeted at the state in the io_kiocb itself, which is what it is being used for. However, MSG_RING rolls its own task_work handling, ignoring how that is usually done. In preparation for switching MSG_RING to be able to use the normal task_work handling, add io_req_task_work_add_remote() which allows the caller to pass in the target io_ring_ctx. Signed-off-by: Jens Axboe commit d57afd8bb7f2c4f0d86e9e9b276f7c3a7fedfc6d Author: Jens Axboe Date: Tue May 28 08:40:12 2024 -0600 io_uring/msg_ring: tighten requirement for remote posting Currently this is gated on whether or not the target ring needs a local completion - and if so, whether or not we're running on the right task. The use case for same thread cross posting is probably a lot less relevant than remote posting. And since we're going to improve this situation anyway, just gate it on local posting and ignore what task we're currently running on. Signed-off-by: Jens Axboe commit 876835b128976e2e9a7d18daab58b4cba7742787 Author: Jeff Johnson Date: Sun Jun 2 16:46:25 2024 -0700 brd: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: modpost: missing MODULE_DESCRIPTION() in drivers/block/brd.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-block-brd-v1-1-e71338e131b6@quicinc.com Signed-off-by: Jens Axboe commit 6a1326de591739784c74f1adaf2965c5e3255453 Author: Peter Robinson Date: Thu Jun 20 08:42:38 2024 +0100 mmc: sdhci-brcmstb: Add ARCH_BCM2835 option The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config. Signed-off-by: Peter Robinson Reviewed-by: Andrea della Porta Link: https://lore.kernel.org/r/20240620074248.152353-1-pbrobinson@gmail.com Signed-off-by: Ulf Hansson commit 8a3d2ad6129c1c43b683550802a93a9ca7f9645b Author: Geert Uytterhoeven Date: Wed May 29 11:29:31 2024 +0200 dt-bindings: fuse: Document R-Car E-FUSE / OTP_MEM Document support for E-FUSE non-volatile memory accessible through OTP_MEM on R-Car V4H and V4M. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/436506babe4ce468fda19380d9373470468e3752.1716974502.git.geert+renesas@glider.be commit 2f6b62e80a9662becd22599ae553de397efacc85 Author: Geert Uytterhoeven Date: Wed May 29 11:29:30 2024 +0200 dt-bindings: fuse: Document R-Car E-FUSE / PFC Document support for E-FUSE non-volatile memory accessible through PFC on R-Car V3U and S4-8. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/03e43e97941df238ef1a618852aecd7be68adbb0.1716974502.git.geert+renesas@glider.be commit f8fa26f4e09230137a304a5275d2633a6de11c7d Author: Ville Syrjälä Date: Wed Jun 12 23:47:12 2024 +0300 drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff I don't think the display hardware really has such chroma plane tile row alignment requirements as outlined in commit d156135e6a54 ("drm/i915/tgl: Make sure a semiplanar UV plane is tile row size aligned") Bspec had the same exact thing to say about earlier hardware as well, but we never cared and things work just fine. The one thing mentioned in that commit that is definitely true however is the fence alignment issue. But we don't deal with that on earlier hardware either. We do have code to deal with that issue for the first color plane, but not the chroma planes. So I think if we did want to check this more extensively we should do it in the same places where we already check the first color plane (namely convert_plane_offset_to_xy() and intel_fb_bo_framebuffer_init()). Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-10-ville.syrjala@linux.intel.com commit 7652126ce7070ddcd1b3f8791efcf7537a9ec01e Author: Ville Syrjälä Date: Wed Jun 12 23:47:11 2024 +0300 drm/i915: Update plane alignment requirements for TGL+ Currently we still use the SKL+ PLANE_SURF alignment even for TGL+ even though the hardware no longer needs it. Introduce a separate tgl_plane_min_alignment() and update it to more accurately reflect the hardware requirements. v2: Don't screw up DPT+semiplanar 2MiB alignment Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-9-ville.syrjala@linux.intel.com commit ee3c3e332d2f2c08a745a7652064dd05a9afeec5 Author: Ville Syrjälä Date: Wed Jun 12 23:47:10 2024 +0300 drm/i915: Move intel_surf_alignment() into skl_univerals_plane.c Now that all pre-skl platforms have their own .min_alignment() functions the remainder of intel_surf_alignment() can be hoisted into skl_univerals_plane.c (and renamed appropriately). Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-8-ville.syrjala@linux.intel.com commit e1488b7ccf3b71407c6479ccd4255c356a941697 Author: Ville Syrjälä Date: Wed Jun 12 23:47:09 2024 +0300 drm/i915: Split pre-skl platforms out from intel_surf_alignment() Extract the necessary chunks from intel_surf_alignment() into per-platform variants for all pre-skl primary/sprite planes. Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-7-ville.syrjala@linux.intel.com commit dde7b1d04433def5cf19123178db2e1e911d4059 Author: Ville Syrjälä Date: Wed Jun 12 23:47:08 2024 +0300 drm/i915: Split cursor alignment to per-platform vfuncs Split intel_cursor_alignment() into per-platform variants. Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-6-ville.syrjala@linux.intel.com commit c7bfd98f00f954e40356cbd80db2dc1992230e94 Author: Ville Syrjälä Date: Wed Jun 12 23:47:07 2024 +0300 drm/i915: Introduce fb->min_alignment Different planes could have different alignment requirements even for the same format/modifier. Collect the alignment requirements across all planes capable of scanning out the fb such that the alignment is satisfactory to all those planes. So far this was sort of handled by making sure intel_surf_alignment() declares the superset of all planes' alignment requirements, but maintaining that manually is annoying. So we're going to move towards each plane declaring only its own requirements, and thus we need code to generate the superset. v2: Drop the borked per-plane vma optimization (Imre) Assert that the plane's declared alignment is POT (Imre) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-5-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 4fb92bdb8e84e618f8c289dc56a923b914a72cac Author: Hui Wang Date: Tue Jun 18 19:26:20 2024 +0800 serial: sc16is7xx: hardware reset chip if reset-gpios is defined in DT Some boards connect a GPIO to the reset pin, and the reset pin needs to be set up correctly before accessing the chip. Add a function to handle the chip reset. If the reset-gpios is defined in the DT, do hardware reset through this GPIO, otherwise do software reset as before. Reviewed-by: Lech Perczak Tested-by: Hugo Villeneuve Reviewed-by: Hugo Villeneuve Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20240618112620.152848-2-hui.wang@canonical.com Signed-off-by: Greg Kroah-Hartman commit a9411ef13f8fada29775fd21a3dfab7dcc49216a Author: Hui Wang Date: Tue Jun 18 19:26:19 2024 +0800 dt-bindings: serial: sc16is7xx: add reset-gpios In some designs, the chip reset pin is connected to a GPIO, and this GPIO needs to be set correctly before probing the driver, so add a reset-gpios in the device tree. Acked-by: Conor Dooley Reviewed-by: Lech Perczak Tested-by: Hugo Villeneuve Reviewed-by: Hugo Villeneuve Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20240618112620.152848-1-hui.wang@canonical.com Signed-off-by: Greg Kroah-Hartman commit 418af7eeb4e187ce6049dc6c611cbc299cc8ec77 Author: Kanak Shilledar Date: Wed Jun 12 21:08:43 2024 +0530 dt-bindings: serial: vt8500-uart: convert to json-schema Convert the VIA VT8500 and WonderMedia WM8xxx UART Controller to newer DT schema. Created DT schema based on the .txt file which had `compatible`, `reg`, `interrupts` and `clocks` as required properties. Additions to the original binding - changed the file name from vt8500-uart to via,vt8500-uart.yaml - removed unnecessary alias from the example. Signed-off-by: Kanak Shilledar Acked-by: Alexey Charkov Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240612153847.52647-2-kanakshilledar@gmail.com Signed-off-by: Greg Kroah-Hartman commit efa6b0a1d66e189fa13e75f704dd8ee5948a3cd3 Author: Andy Shevchenko Date: Thu Jun 6 21:48:41 2024 +0300 serial: 8250_platform: Explicitly show we initialise ISA ports only once serial8250_isa_init_ports() uses home grown approach to make itself a singleton. Instead, explicitly show that we initialise ISA ports once by providing a helper function which calls the original function via DO_ONCE() macro. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606184841.3102545-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f0a17485cc2c6984381bac5c10e3564675dcbea5 Author: Jeff Johnson Date: Fri Jun 7 16:10:20 2024 -0700 tty: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/8250/8250_base.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/8250/8250_pxa.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/8250/serial_cs.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/esp32_uart.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/esp32_acm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/serial/owl-uart.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/n_hdlc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/n_gsm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/ttynull.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/tty/goldfish.o Add all missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240607-md-drivers-tty-v1-1-50a7efb8bed8@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 195b7a0d2ebe5672a58210992f3629d19d5a95ae Author: Ville Syrjälä Date: Wed Jun 12 23:47:06 2024 +0300 drm/i915: Introduce the plane->min_alignment() vfunc Different hardware generations have different scanout alignment requirements. Introduce a new vfunc that will allow us to make that distinction without horrible if-ladders. For now we directly plug in the existing intel_surf_alignment() and intel_cursor_alignment() functions. For fbdev we (temporarily) introduce intel_fbdev_min_alignment() that simply queries the alignment from the primary plane of the first crtc. TODO: someone will need to fix xe's alignment handling Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-4-ville.syrjala@linux.intel.com Acked-by: Rodrigo Vivi commit 638bf322452265fceec63448fb880c703df887e4 Author: Rafał Miłecki Date: Wed Jun 5 10:54:32 2024 +0200 dt-bindings: serial: mediatek,uart: add MT7988 Add compatible string for serial on MT7988 SoC. Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240605085433.26513-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f50304e9efb69604040feadc13f9590be8cd391 Author: Lad Prabhakar Date: Tue Jun 4 18:05:13 2024 +0100 serial: sh-sci: Add support for RZ/V2H(P) SoC Add serial support for RZ/V2H(P) SoC with earlycon. The SCIF interface in the Renesas RZ/V2H(P) is similar to that available in the RZ/G2L (R9A07G044) SoC, with the following differences: - RZ/V2H(P) SoC has three additional interrupts: one for Tx end/Rx ready and two for Rx and Tx buffer full, all of which are edge-triggered. - RZ/V2H(P) supports asynchronous mode, whereas RZ/G2L supports both synchronous and asynchronous modes. - There are differences in the configuration of certain registers such as SCSMR, SCFCR, and SCSPTR between the two SoCs. To handle these differences on RZ/V2H(P) SoC SCIx_RZV2H_SCIF_REGTYPE is added. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240604170513.522631-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 964a80cfbf56f5fa88f09d704c311ed6db0a361f Author: Lad Prabhakar Date: Tue Jun 4 18:05:12 2024 +0100 dt-bindings: serial: Add documentation for Renesas RZ/V2H(P) (R9A09G057) SCIF support Document support for the Serial Communication Interface with FIFO (SCIF) available in the Renesas RZ/V2H(P) (R9A09G057) SoC. The SCIF interface in the Renesas RZ/V2H(P) is similar to that available in the RZ/G2L (R9A07G044) SoC, with the following differences: - RZ/V2H(P) SoC has three additional interrupts: one for Tx end/Rx ready and two for Rx and Tx buffer full, all of which are edge-triggered. - RZ/V2H(P) supports asynchronous mode, whereas RZ/G2L supports both synchronous and asynchronous modes. - There are differences in the configuration of certain registers such as SCSMR, SCFCR, and SCSPTR between the two SoCs. To handle these differences in the driver, a new SoC-specific compatible string is added, ensuring proper handling of the unique features and register configurations of the RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240604170513.522631-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 034e4422ddb5ec9075d550f4668be0a3e85e6a3e Author: Lad Prabhakar Date: Tue Jun 4 18:05:11 2024 +0100 dt-bindings: serial: renesas,scif: Make 'interrupt-names' property as required As all the SoCs having multiple interrupts have 'interrupt-names' property in their respective DTSIs, make 'interrupt-names' property as required so that we can validate them using dtbs_check. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240604170513.522631-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit d057a1e3e475c6d9e24ce2e79c3f3daf367e33d8 Author: Lad Prabhakar Date: Tue Jun 4 18:05:10 2024 +0100 dt-bindings: serial: renesas,scif: Validate 'interrupts' and 'interrupt-names' This commit adds support to validate the 'interrupts' and 'interrupt-names' properties for every supported SoC. This ensures proper handling and configuration of interrupt-related properties across supported platforms. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240604170513.522631-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 220fb8ff6d326d91fed8a0a44e3ac0a2f34d3f9c Author: Lad Prabhakar Date: Tue Jun 4 18:05:09 2024 +0100 dt-bindings: serial: renesas,scif: Move ref for serial.yaml at the end In preparation for adding more validation checks move the ref for 'serial.yaml' to the end and also move reset check in 'allOf' block. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604170513.522631-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 4ed81d9dd75faa804360beb9623b8e53fea9ed2d Author: Hal Feng Date: Tue Jun 4 16:47:29 2024 +0800 riscv: dts: starfive: jh7110: Add the core reset and jh7110 compatible for uarts Add the core reset for uarts, which is necessary for uarts to work. Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20240604084729.57239-4-hal.feng@starfivetech.com Signed-off-by: Greg Kroah-Hartman commit 41424f5c3bef47ff1eedaf1f90e7ae37f1b1c165 Author: Hal Feng Date: Tue Jun 4 16:47:28 2024 +0800 serial: 8250_dw: Use reset array API to get resets Some SoCs like StarFive JH7110 require two or more resets. So change to use the reset array API to get resets. Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20240604084729.57239-3-hal.feng@starfivetech.com Signed-off-by: Greg Kroah-Hartman commit ac434f2877b97e18c3df7d9b1e8e2371befd9890 Author: Hal Feng Date: Tue Jun 4 16:47:27 2024 +0800 dt-bindings: serial: snps-dw-apb-uart: Add one more reset signal for StarFive JH7110 SoC The UART of StarFive JH7110 has two reset signals. Both of them are necessary for JH7110 to initialize UART. Signed-off-by: Hal Feng Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240604084729.57239-2-hal.feng@starfivetech.com Signed-off-by: Greg Kroah-Hartman commit 1c5f18d88eae348cf45f90aaee7b361f593b0701 Author: Ville Syrjälä Date: Wed Jun 19 14:31:44 2024 +0300 drm: Export drm_plane_has_format() Export drm_plane_has_format() so that drivers can use it. v2: add kerneldoc Reviewed-by: Jani Nikula Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240619113144.1616-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Daniel Stone Acked-by: Thomas Zimmermann commit 1d36db2b5173258e51015200c8ae86325268edec Author: Ville Syrjälä Date: Wed Jun 12 23:47:04 2024 +0300 drm: Rename drm_plane_check_pixel_format() to drm_plane_has_format() Rename drm_plane_check_pixel_format() to drm_plane_has_format() and change the return type accordingly. Allows one to write more natural code. Also matches drm_any_plane_has_format() better. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240612204712.31404-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann commit c260bda655993bf72d3f9a6df9e9021c3c1cd1be Author: Uwe Kleine-König Date: Mon Jun 24 15:29:04 2024 +0200 fbdev: 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 Signed-off-by: Helge Deller commit 87d084bcbf1e8dbe97753e20d30fe9d56a97e6be Author: Lad Prabhakar Date: Tue Jun 18 18:48:31 2024 +0100 pinctrl: renesas: rzg2l: Reorganize variable configuration macro The `PIN_CFG_VARIABLE` macro did not indicate the capabilities of a pin but served as a flag indicating that the pins of a port have different capabilities. To better reflect its purpose, move the `PIN_CFG_VARIABLE` macro beside `RZG2L_SINGLE_PIN` and rename it to `RZG2L_VARIABLE_CFG`. Additionally, introduce new macros for packing variable port configurations: - `RZG2L_GPIO_PORT_PACK_VARIABLE(n, a)`: Combines `RZG2L_VARIABLE_CFG` with `RZG2L_GPIO_PORT_PACK` to handle variable pin configurations for a packed port. - `RZG2L_GPIO_PORT_SPARSE_PACK_VARIABLE(m, a)`: Combines `RZG2L_VARIABLE_CFG` with `RZG2L_GPIO_PORT_SPARSE_PACK` to handle variable pin configurations for a sparse port. Due to the above change the configuration macros have been reorganized as follows: - Shift the bit positions of `PIN_CFG_NOGPIO_INT`, `PIN_CFG_NOD`, `PIN_CFG_SMT`, `PIN_CFG_ELC`, and `PIN_CFG_IOLH_RZV2H` down by one to accommodate the removal of `PIN_CFG_VARIABLE`. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 13dcd63dc704b33a8ad94f1d161c0f5dad243a5b Author: Lad Prabhakar Date: Tue Jun 18 18:48:30 2024 +0100 pinctrl: renesas: rzg2l: Move RZG2L_SINGLE_PIN definition to top of the file Define `RZG2L_SINGLE_PIN` at the top of the file to clarify its use for dedicated pins for improved readability. While at it update the comment for `RZG2L_SINGLE_PIN_PACK` macro and place it just above the macro for clarity. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f0cdf878a22b91141d6050deed0eac70ab982ebc Author: Lad Prabhakar Date: Tue Jun 18 18:48:29 2024 +0100 pinctrl: renesas: rzg2l: Adjust bit masks for PIN_CFG_VARIABLE to use BIT(62) Shift the bit masks for `PIN_CFG_PIN_MAP_MASK` and `PIN_CFG_PIN_REG_MASK`, to accommodate `PIN_CFG_VARIABLE` using `BIT(62)`. Previously, these bit masks were placed higher up in the bit range, which did not leave room for `PIN_CFG_VARIABLE` at `BIT(62)`. By adjusting these masks, we ensure that `PIN_CFG_VARIABLE` can occupy `BIT(62)` without any conflicts. The updated masks are now: - `PIN_CFG_PIN_MAP_MASK`: `GENMASK_ULL(61, 54)` (was `GENMASK_ULL(62, 55)`) - `PIN_CFG_PIN_REG_MASK`: `GENMASK_ULL(53, 46)` (was `GENMASK_ULL(54, 47)`) Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 0a5e40f9c29756dec3da573edce3f4b3194e6f91 Author: Lad Prabhakar Date: Tue Jun 18 18:48:28 2024 +0100 pinctrl: renesas: rzg2l: Update PIN_CFG_MASK() macro to be 32-bit wide Modify the `PIN_CFG_MASK()` macro to be 32-bit wide. The current maximum value for `PIN_CFG_*` is `BIT(21)`, which fits within a 32-bit mask. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240618174831.415583-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d6c5fc9add9eb7a0d5bd179ab07cbf43e32b28d8 Author: Geert Uytterhoeven Date: Wed Jun 19 13:22:46 2024 +0200 dt-bindings: clock: rcar-gen2: Remove obsolete header files The clock definitions in were superseded by those in a long time ago. The last DTS user of these files was removed in commit 362b334b17943d84 ("ARM: dts: r8a7791: Convert to new CPG/MSSR bindings") in v4.15. Driver support for the old bindings was removed in commit 58256143cff7c2e0 ("clk: renesas: Remove R-Car Gen2 legacy DT clock support") in v5.5, so there is no point to keep on carrying these. Signed-off-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/d4abb688d666be35e99577a25b16958cbb4c3c98.1718796005.git.geert+renesas@glider.be commit c5d1e53040efd3c630df3e2dba3df76372174aa6 Author: Marek Vasut Date: Sun Jun 16 18:00:20 2024 +0200 dt-bindings: clock: r8a7779: Remove duplicate newline Drop duplicate newline. No functional change. Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240616160038.45937-1-marek.vasut+renesas@mailbox.org Signed-off-by: Geert Uytterhoeven commit ebae969d2ffceca99116c44535f2fc3cbc74400f Author: Geert Uytterhoeven Date: Wed Jun 12 09:25:55 2024 +0200 clk: renesas: Drop "Renesas" from individual driver descriptions All configuration options are under the big "Renesas SoC clock support" umbrella, so there is no reason to repeat this for each driver. Hence drop "Renesas" from the few that do. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/185323de4d38b9b599775c1b64ce4171551b98d5.1718177124.git.geert+renesas@glider.be commit 362951fef4f9e0eaddfdad637474ed67d66ea60b Author: Geert Uytterhoeven Date: Wed Jun 12 09:25:16 2024 +0200 clk: renesas: r8a779h0: Fix PLL2/PLL4 multipliers in comments The multipliers for PLL2 and PLL4 as listed in the comments for the cpg_pll_configs[] array are incorrect. Fix them. Note that the actual values in the tables were correct. Fixes: f077cab34df3010d ("clk: renesas: cpg-mssr: Add support for R-Car V4M") Reported-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/07126b55807c1596422c9547e72f0a032487da1e.1718177076.git.geert+renesas@glider.be commit 921190437a4827667cceef10202b2150571ebe5c Author: Stefan Wahren Date: Fri Jun 21 15:19:58 2024 +0200 staging: vc04_services: Update testing instructions Since the initial version of the testing instructions a few things has changed. So consider the latest arm64/defconfig changes and the new debugfs entry. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20240621131958.98208-11-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit fcc938c2986836532b3275184253d8d53a247518 Author: Stefan Wahren Date: Fri Jun 21 15:19:57 2024 +0200 staging: vchiq_arm: Don't cast scatter-gather elements The kernel uses different types for DMA length & address, so better use them. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-10-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 0d49eee74a597ed0464e29b4724a53034e903b54 Author: Stefan Wahren Date: Fri Jun 21 15:19:56 2024 +0200 staging: vchiq_core: Add hex prefix to debugfs output The number format of VCHIQ debugfs isn't always clear. So let's add a prefix for all hex values, in order to make things clear. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-9-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 504b0e3881dada6bb16919ad8295f3dfb6c39c0b Author: Stefan Wahren Date: Fri Jun 21 15:19:55 2024 +0200 staging: vchiq_arm: Reduce indentation of service_callback The service_callback has 5 levels of indentation, which makes it hard to read. Reduce this by splitting the code in a new function service_single_message() as suggested by Laurent Pinchart. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20240621131958.98208-8-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 7852f7357e2ad2e00e2bed55b097bcbcfc61266b Author: Stefan Wahren Date: Fri Jun 21 15:19:54 2024 +0200 staging: vchiq_arm: Drop vchiq_arm_init_state After removal of struct vchiq_2835_state, the init of vchiq_arm_state can be simplified by doing it directly within vchiq_platform_init_state. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-7-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 4e2766102da632f26341d5539519b0abf73df887 Author: Stefan Wahren Date: Fri Jun 21 15:19:53 2024 +0200 staging: vchiq_arm: Get the rid off struct vchiq_2835_state The whole benefit of this encapsulating struct is questionable. It just stores a flag to signalize the init state of vchiq_arm_state. Beside the fact this flag is set too soon, the access to uninitialized members should be avoided. So initialize vchiq_arm_state properly before assign it directly to vchiq_state. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20240621131958.98208-6-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 935cb7670d378a1a3b3fc52790d355c4c9520335 Author: Stefan Wahren Date: Fri Jun 21 15:19:52 2024 +0200 staging: vchiq_arm: Drop unnecessary declarations These declarations are left from cleanups and not necessary anymore. So we can drop them. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-5-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 66adfe70cac971071854a9a4281359a3c09d4332 Author: Stefan Wahren Date: Fri Jun 21 15:19:51 2024 +0200 staging: vchiq_core: Drop non-functional struct members There are some struct members, which don't have a real function. So it's safe to drop them. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-4-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit ee3d3682105bfaaebbf02c966cc80f1377983168 Author: Stefan Wahren Date: Fri Jun 21 15:19:50 2024 +0200 staging: vchiq_arm: Drop obsolete comment The BUG_ON has been replaced with WARN_ON. So we can drop the comment. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-3-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 56df512ed9e4e2b549e6660eb21ef4f80cee75a2 Author: Stefan Wahren Date: Fri Jun 21 15:19:49 2024 +0200 staging: vchiq_arm: Unify return code variable The file vchiq_arm uses a wild mixture of variable names for return codes. Unify them by using the common name "ret". Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240621131958.98208-2-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 13cc09562eb3f80f110b552b3126560a94b865be Author: Philipp Hortmann Date: Sun Jun 23 19:58:23 2024 +0200 staging: rtl8723bs: Remove unused macro in ioctl_cfg80211.c Remove unused macro. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0a33ebb3e11558f41dc847dcaa9733bfe1cf4ba6.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 288970545df9d9a47f7a0be776e09e8cad6e4ca5 Author: Philipp Hortmann Date: Sun Jun 23 19:58:15 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_io.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/91e79b32292ba567c2ec624e130350a40a7866b5.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c6d3e63be61dfe5e1d509bd7bbf6e0adbe1ee23 Author: Philipp Hortmann Date: Sun Jun 23 19:58:09 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_mlme.h Remove unused macros. Removed also commented out macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/289075f2b84a1ad9be85417a8c9736059ef709ed.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c74a88a2cb01d48db7ea8f121da74f05a8b21da Author: Philipp Hortmann Date: Sun Jun 23 19:58:03 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_mp.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/49bf00c305b34f2d3ed1061b6a22d042edd3a2c1.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2691c8390e0b284e6ac8f01b9e357fbc3c0bfdc7 Author: Philipp Hortmann Date: Sun Jun 23 19:57:56 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_pwrctrl.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/41f7ed26b5a6de187a71bdc7f062f3817993ba5f.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e60f100608355665baa38eccf7cecabd20e0e38 Author: Philipp Hortmann Date: Sun Jun 23 19:57:49 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_recv.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e9f61bab428def7298212aecfab3708a32469cef.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0f13e59ce1bdf7b32e0622b50b08b0fe506a1fa9 Author: Philipp Hortmann Date: Sun Jun 23 19:57:44 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_security.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/59d13806a66afc571c9a7082f9436439113d3231.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a4ead061f2f022bb10bcbdc12c54a636691ad68 Author: Philipp Hortmann Date: Sun Jun 23 19:57:39 2024 +0200 staging: rtl8723bs: Remove unused macros in rtw_xmit.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3d0c5e727098f7eb3ceb5d3ebe0562515dd19bcd.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b368563e118bc1171fb9845b9e041ec35631777e Author: Philipp Hortmann Date: Sun Jun 23 19:57:31 2024 +0200 staging: rtl8723bs: Remove unused macros in sta_info.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/912fba119b3041c396bcb2ddf22219fa0025ee42.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 30b09d4bb197ccf1132b80e1c43f7b92e1591ff8 Author: Philipp Hortmann Date: Sun Jun 23 19:57:24 2024 +0200 staging: rtl8723bs: Remove unused macros in wifi.h Remove unused macros. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/26af5a910e84523d9040ee29967c9b3a4971daa5.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 859c3ebea45ffca581cc1de00b9d11240012cfd4 Author: Philipp Hortmann Date: Sun Jun 23 19:57:12 2024 +0200 staging: rtl8723bs: Remove empty file sdio_osintf.h Remove empty file sdio_osintf.h. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1536950be4d4e4fc4757e10070ffc38c0158f808.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f997e032052dea8677aa487654488590c29f35d Author: Philipp Hortmann Date: Sun Jun 23 19:57:04 2024 +0200 staging: rtl8723bs: Remove unused declarations start with sd_hal_bus_init Remove unused function declarations. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/37d2c677e5ef57a9aeb6857d7857d4512b8e3954.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bdee203cd80ce2d3b0a52015ecfde6ad45d01eb9 Author: Philipp Hortmann Date: Sun Jun 23 19:56:56 2024 +0200 staging: rtl8723bs: Remove switch(type) as type is constant Remove switch(type) as type is constant and never matches any of the cases. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1e3982de9a03e75931bf7977fca83c5402084aa4.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 129d829ddac59f76bde75fd30d176e2bcd4e6276 Author: Philipp Hortmann Date: Sun Jun 23 19:56:49 2024 +0200 staging: rtl8723bs: Remove unused structs starting with profile_info Remove unused structs. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0771ebf074f71fb484d0005241416144ca813859.1719155208.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71f738bb136bb289c0c9ec51d3e614dd1f861512 Author: Wolfram Sang Date: Thu Jun 20 20:25:38 2024 +0200 staging: vc04_services: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Reviewed-by: Stefan Wahren Link: https://lore.kernel.org/r/20240620182538.5497-2-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 7dff0b27d9c842f88149bf611cbc0b59be1dcd3c Author: Teddy Engel Date: Thu Jun 13 21:15:11 2024 +0100 staging: rtl8192e: Remove unnecessary pre-declaration of struct net_device Remove pre-declaration of struct. Signed-off-by: Teddy Engel Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/bb7d1aa7b336e4d68a30fd17dae7accfd2d5a26e.1718309120.git.engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit 91c2d350c79a20a00b787e0a7bc86ee75bbaff44 Author: Teddy Engel Date: Thu Jun 13 21:15:10 2024 +0100 staging: rtl8192e: Remove unused macro dm_tx_bb_gain_idx_to_amplify Remove unused macro. Signed-off-by: Teddy Engel Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/5ee3df2b02a84e6aeb2d1c4903cb018161d78b1b.1718309120.git.engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit dd113e9c39d04cf16e3be6dd08dda15c8d013fd9 Author: Teddy Engel Date: Thu Jun 13 21:15:09 2024 +0100 staging: rtl8192e: Capitalize constant RegC38_TH According to kernel coding style, capitalize defined constant. Signed-off-by: Teddy Engel Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/e78f4c30a838d8e98794d80126ca246614b14b68.1718309120.git.engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit c313e6b00b6463461da7e36cf8df7ff6c8ab5d0f Author: Teddy Engel Date: Thu Jun 13 21:15:08 2024 +0100 staging: rtl8192e: Remove unused struct phy_ofdm_rx_status_rxsc Remove unused struct declaration. Signed-off-by: Teddy Engel Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/ef5ffc1063323f6c1f22ab75f3b5ff01982c3061.1718309120.git.engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit f24974a6992e1a2531bd04a7e7ca37c96af569d5 Author: Teddy Engel Date: Thu Jun 13 21:15:07 2024 +0100 staging: rtl8192e: Remove unused constants Remove unused constants: IC_VersionCut_C, IC_VersionCut_E, WA_IOT_TH_VAL Signed-off-by: Teddy Engel Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/0ff436b8aa199829728ee11d0ed302e3fa6fd2ac.1718309120.git.engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit 49432bf4189132e1bf099c7748c1f80d1c67d5ec Author: Teddy Engel Date: Thu Jun 13 14:28:53 2024 +0100 staging: vt6656: Remove line from TODO Remove checkpatch.pl line from TODO as no valid checkpatch recommendations still present. Signed-off-by: Teddy Engel Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240613132853.2249-1-engel.teddy@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5962166211e834230c549d4de71ed8d8e46e050a Author: Tree Davies Date: Tue Jun 11 20:22:30 2024 -0700 Staging: rtl8192e: Fix alignment to match open parenthesis in rtllib_rx.c Add spaces and tabs to fix warning: Alignment should match open parenthesis. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-25-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 123ee3729d646fb30ecf40ad74be1bceebea9510 Author: Tree Davies Date: Tue Jun 11 20:22:29 2024 -0700 Staging: rtl8192e: Fix alignment to match open parenthesis in rtllib_tx.c Add spaces and tabs to fix warning: Alignment should match open parenthesis. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-24-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 6361c826905d355116418a7b77dae962b6c50875 Author: Tree Davies Date: Tue Jun 11 20:22:28 2024 -0700 Staging: rtl8192e: Remove variable IsAmsdu from rtllib_xmit_inter() Remove boolean variable, IsAmsdu, and code which does not execute because it is never set to true. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-23-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4219b10cfdcf802f16da2bc046ac93d8135fe765 Author: Tree Davies Date: Tue Jun 11 20:22:27 2024 -0700 Staging: rtl8192e: Remove parameter bIsAmsdu from rtllib_classify() Remove argument, bIsAmsdu from rtllib_classify() as it is never used. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-22-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 019a5b2a17a08e1667410ca5020f99704cc41ea4 Author: Tree Davies Date: Tue Jun 11 20:22:26 2024 -0700 Staging: rtl8192e: Rename variable bRTSSTBC Rename variable bRTSSTBC to rtsstbc to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-21-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit c74feb589c0d50647e8eefb6ce7e1662701e4a4d Author: Tree Davies Date: Tue Jun 11 20:22:25 2024 -0700 Staging: rtl8192e: Rename variable bUseShortPreamble Rename variable bUseShortPreamble to use_short_preamble to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-20-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 8b3d9e8c3454bbd4d39c335088b7ceb00ef9f1c6 Author: Tree Davies Date: Tue Jun 11 20:22:24 2024 -0700 Staging: rtl8192e: Rename function rtllib_query_HTCapShortGI Rename function rtllib_query_HTCapShortGI to rtllib_query_ht_cap_short_gi to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-19-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 23c48df4087aebed875ba18857fd245b98e1603f Author: Tree Davies Date: Tue Jun 11 20:22:23 2024 -0700 Staging: rtl8192e: Rename function rtllib_query_ShortPreambleMode Rename function rtllib_query_ShortPreambleMode to rtllib_query_short_preamble_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-18-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 404e172cc84e9b7eb7f5671e10a2262d031cd9c6 Author: Tree Davies Date: Tue Jun 11 20:22:22 2024 -0700 Staging: rtl8192e: Rename function rtllib_query_BandwidthMode Rename function rtllib_query_BandwidthMode to rtllib_query_bandwidth_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-17-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit b76cad8accc773ed561d60bda142827dc1bd9008 Author: Tree Davies Date: Tue Jun 11 20:22:21 2024 -0700 Staging: rtl8192e: Fix alignment to match open parenthesis Added tabs and spaces to fix warning: Alignment should match open parenthesis Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-16-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit c06cd8ad4ecc977d7d15e2781323609e529997d8 Author: Tree Davies Date: Tue Jun 11 20:22:20 2024 -0700 Staging: rtl8192e: Rename function TsStartAddBaProcess() Rename variable TsStartAddBaProcess to rtllib_ts_start_add_ba_process to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-15-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 128fb2e92575e8be8e0dbadec7851935c23334c1 Author: Tree Davies Date: Tue Jun 11 20:22:19 2024 -0700 Staging: rtl8192e: Rename variable bUseShortGI Rename variable bUseShortGI to use_short_gi to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-14-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit bb0d74d418554d90d2a3d248cc5156b376a30073 Author: Tree Davies Date: Tue Jun 11 20:22:18 2024 -0700 Staging: rtl8192e: Rename variable CntAfterLink Rename variable CntAfterLink to cnt_after_link to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-13-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit ced94ab7a349b93b94a09e17a881e74f77708af3 Author: Tree Davies Date: Tue Jun 11 20:22:17 2024 -0700 Staging: rtl8192e: Rename variable bBroadcast Rename variable bBroadcast to broadcast to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-12-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 9fff642f3b74d674c4505f536f014d8e1e4d3bf6 Author: Tree Davies Date: Tue Jun 11 20:22:16 2024 -0700 Staging: rtl8192e: Rename variable bPacketBW Rename variable bPacketBW to packet_bw to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit e919a2d7c4d560d9c8ef3f5822d63c7a36193a13 Author: Tree Davies Date: Tue Jun 11 20:22:15 2024 -0700 Staging: rtl8192e: Rename variable bforced_tx20Mhz Rename variable bforced_tx20Mhz to forced_tx_20MHz to remove hungarian notation and make it snake_case. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 6d757e58aca2b7de80303e16effb0a324300bcec Author: Tree Davies Date: Tue Jun 11 20:22:14 2024 -0700 Staging: rtl8192e: Rename variable bRTSUseShortGI Rename variable bRTSUseShortGI to rts_use_short_gi to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 7fe8dbbab5b43f7e47346691367c6a3d77896154 Author: Tree Davies Date: Tue Jun 11 20:22:13 2024 -0700 Staging: rtl8192e: Rename variable bCTSEnable Rename variable bCTSEnable to cts_enable to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit e3b3ccfcb7bb8cdab5a00a4e5a2d41f32345d608 Author: Tree Davies Date: Tue Jun 11 20:22:12 2024 -0700 Staging: rtl8192e: Rename variable bRTSBW Rename variable bRTSBW to rts_bw to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit ec1cc0fcc879c8f1490da80ca0184d16631e1176 Author: Tree Davies Date: Tue Jun 11 20:22:11 2024 -0700 Staging: rtl8192e: Rename variable bRTSEnable Rename variable bRTSEnable to rts_enable to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 24a9686dfcf1f1ee1b5dfc4e82cba79e4916c0d2 Author: Tree Davies Date: Tue Jun 11 20:22:10 2024 -0700 Staging: rtl8192e: Rename variable HTOpMode Rename variable HTOpMode to ht_op_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 8cc4efad8298ccbc15ba55fc6007a2229e5a7040 Author: Tree Davies Date: Tue Jun 11 20:22:09 2024 -0700 Staging: rtl8192e: Rename variable HTCurrentOperaRate Rename variable HTCurrentOperaRate to ht_curr_op_rate to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 08a35908ef68c240b3288f93ac480bc0ae0184c3 Author: Tree Davies Date: Tue Jun 11 20:22:08 2024 -0700 Staging: rtl8192e: Rename variable bIsMulticast Rename variable bIsMulticast to is_multicast to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 50acd717cba10536a0e0bc7b5e923e636f1f01c9 Author: Tree Davies Date: Tue Jun 11 20:22:07 2024 -0700 Staging: rtl8192e: Rename variable bHwSec Rename variable bHwSec to hw_sec to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240612032230.9738-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 50d61396e393b16f16a036bf07eb832353e017f7 Author: Jeff Johnson Date: Mon Jun 10 17:33:41 2024 -0700 staging: rtl8192e: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/rtl8192e/rtllib.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/rtl8192e/rtllib_crypt_ccmp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/rtl8192e/rtllib_crypt_tkip.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/rtl8192e/rtllib_crypt_wep.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240610-md-drivers-staging-rtl8192e-v1-1-b5d11ee98297@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f2278c6117c0f689d1a2be11a8701703439158e4 Author: Jeff Johnson Date: Sat Jun 8 20:21:47 2024 -0700 staging: fbtft: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/fbtft/fbtft.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240608-md-drivers-staging-fbtft-v1-1-e2ab70ec0614@quicinc.com Signed-off-by: Greg Kroah-Hartman commit baf41dbed78e1296621643da90c93ed5d3d3d695 Author: Jeff Johnson Date: Fri Jun 7 13:56:14 2024 -0700 staging: greybus: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-bootrom.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-spilib.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-hid.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-light.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-log.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-loopback.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-power-supply.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-raw.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-vibrator.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-audio-manager.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-gbphy.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-gpio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-i2c.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-pwm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-sdio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-spi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-uart.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/staging/greybus/gb-usb.o Add all missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240607-md-drivers-staging-greybus-v1-1-ff1a0dfa813e@quicinc.com Signed-off-by: Greg Kroah-Hartman commit cd5ce4589081190281cc2537301edd4275fe55eb Author: Konrad Dybcio Date: Tue Jun 18 16:42:18 2024 +0200 interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID The value was wrong, resulting in misprogramming of the hardware. Fix it. Fixes: 1a14b1ac3935 ("interconnect: qcom: Add QCM2290 driver support") Reported-by: Stephan Gerhold Closes: https://lore.kernel.org/linux-arm-msm/ZgMs_xZVzWH5uK-v@gerhold.net/ Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240618-topic-2290_icc_2-v1-1-64446888a133@linaro.org Signed-off-by: Georgi Djakov commit c073f0757663c104271c8749f7e6b19b29c7b8ac Author: Bard Liao Date: Mon Jun 24 14:11:19 2024 +0200 ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43 Cs42l43 bridge mode needs the two configurations. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240624121119.91552-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 92d5b5930e7d55ca07b483490d6298eee828bbe4 Author: Pierre-Louis Bossart Date: Mon Jun 24 14:11:18 2024 +0200 ASoC: Intel: sof_sdw: add quirk for Dell SKU 0B8C Jack detection needs to rely on JD2, as most other Dell AlderLake-based devices. Closes: https://github.com/thesofproject/linux/issues/5021 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://patch.msgid.link/20240624121119.91552-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e364ffceab9252c06388727250d7583d6e0aea87 Author: Brent Lu Date: Mon Jun 24 14:11:17 2024 +0200 ASoC: Intel: maxim-common: add max_98373_get_tx_mask function Add a helper function max_98373_get_tx_mask() to get tx mask from max98373 ACPI device properties at runtime. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240624121119.91552-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 65c90df918205bc84f5448550cde76a54dae5f52 Author: Pierre-Louis Bossart Date: Mon Jun 24 14:11:16 2024 +0200 ASoC: Intel: sof_sdw: fix jack detection on ADL-N variant RVP Experimental tests show that JD2_100K is required, otherwise the jack is detected always even with nothing plugged-in. To avoid matching with other known quirks the SKU information is used. Signed-off-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20240624121119.91552-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 61a98ffc2081ac1e9070150932d9eb91d3935cf8 Author: Robert Marko Date: Sun Jun 23 16:09:35 2024 +0200 regulator: userspace-consumer: quiet device deferral Trying to use userspace-consumer when the required supplies have not yet been probed will throw an error message on deferral: reg-userspace-consumer output-led-power: Failed to get supplies: -517 So, lets simply use dev_err_probe() instead of dev_err() to not print errors in case when driver probe is being deferred. Signed-off-by: Robert Marko Link: https://patch.msgid.link/20240623140947.1252376-1-robimarko@gmail.com Signed-off-by: Mark Brown commit 92955a25f77046c1900f95748f97bf77192e9fe8 Author: Jeff Johnson Date: Mon Jun 3 08:45:08 2024 -0700 regmap: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-ac97.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-ram.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-raw-ram.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-slimbus.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-spmi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-w1.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-sccb.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-spi-avmm.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/20240603-md-base-regmap-v1-1-ff7a2e5f990f@quicinc.com Signed-off-by: Mark Brown commit 00dd4d86ed908e70d912a96ad91d1248ff055b62 Author: Shenghao Ding Date: Fri Jun 21 21:23:07 2024 +0800 ASoc: tas2781: Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s. name_prefix is not mandatory. Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20240621132309.564-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit fe836c78ef1ff16da32912c22348091a0d67bda1 Author: Peter Ujfalusi Date: Mon Jun 24 14:15:18 2024 +0200 ASoC: SOF: ipc4-topology: Use correct queue_id for requesting input pin format It is incorrect to request the input pin format of the destination widget using the output pin index of the source module as the indexes are not necessarily matching. moduleA.out_pin1 can be connected to moduleB.in_pin0 for example. Use the dst_queue_id to request the input format of the destination module. This bug remained unnoticed likely because in nocodec topologies we don't have process modules after a module copier, thus the pin/queue index is ignored. For the process module case, the code was likely have been tested in a controlled way where all the pin/queue/format properties were present to work. Update the debug prints to have better information. Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Cc: stable@vger.kernel.org # v6.8+ Link: https://patch.msgid.link/20240624121519.91703-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4ae814dabcdae3e434820c64396e15ccb33cc0ce Author: Jiaxin Yu Date: Thu Jun 13 10:07:25 2024 +0800 ASoC: mediatek: mt6358: Add "Dmic Mode Switch" kcontrol for switch DMIC mode. There are two hardware connection methods for DMICs on the MT6358. In cases where more than two DMICs are used, we need to time-multiplex these DMICs. Therefore, we need to dynamically switch the modes of these DMICs based on the actual usage scenarios. ---- DMIC1 AU_VIN0 --- ---- DMIC2 AU_VIN2 --- ----DMIC3 When we want to use DMIC1/2, configure it to one-wire mode. When we want to use DMIC1/3, configure it to two-wire mode. Signed-off-by: Jiaxin Yu Link: https://patch.msgid.link/20240613020725.27874-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 34fa846f52f9fbef8aa262d3b39e71188e8dd884 Author: Zhang Yi Date: Mon Jun 24 11:06:07 2024 +0800 ASoC: codecs: ES8326: regcache_sync error issue We modified the regmap_config members to fix cach sync error. There are several registers that should be read-only registers. If these registers are written while synchronizing the register values, the codec will enter an error state.So we create es8326_writeable_register, and set these registers to false Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20240624030607.4307-5-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 7e7dbdee96cbc660e7e8d3d9d7a512acaa6ca69d Author: Zhang Yi Date: Mon Jun 24 11:06:06 2024 +0800 ASoC: codecs: ES8326: Minimize the pop noise Executing regcache_sync at initialization, we can hear a gentle pop noise. So we created es8326_init for initialization instead of executing es8326_resume Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20240624030607.4307-4-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit 4eed78198b30c4c5975e454e7b1e6e25a7ac7353 Author: Zhang Yi Date: Mon Jun 24 11:06:04 2024 +0800 ASoC: codecs: ES8326: Slove headphone detection issue We modified the headphone detection setting to avoid an error button state after codec resume from suspend state Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20240624030607.4307-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown commit fbd908bb8bc0e3714731467ac130d35492ed2187 Author: Odelu Kukatla Date: Fri Jun 7 23:09:25 2024 +0530 interconnect: qcom: sc7280: enable QoS configuration Enable QoS configuration for master ports with predefined values for priority and urgency forawrding. Signed-off-by: Odelu Kukatla Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240607173927.26321-3-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov commit 0a7be6b35da848323725b5a7ecbfcbae0eed62dd Author: Odelu Kukatla Date: Fri Jun 7 23:09:24 2024 +0530 interconnect: qcom: icc-rpmh: Add QoS configuration support Add QoS support for QNOC device for configuring priority, priority forward disable and urgency forwarding. QoS is required to prioritize the traffic originating from different interconnect masters at NoC (Network On Chip). Signed-off-by: Odelu Kukatla Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240607173927.26321-2-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov commit 6822b0c92b435dec18d4317ddb424a63632b6a31 Author: Odelu Kukatla Date: Fri Jun 7 23:09:26 2024 +0530 dt-bindings: interconnect: add clock property to enable QOS on SC7280 Add clock property to enable the clocks required for accessing QoS configuration registers. Signed-off-by: Odelu Kukatla Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20240607173927.26321-4-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov commit de0818e945e63203e71ad6441ade96a991c0a9b9 Merge: b14aa62c83ce6 9265ea04a7b50 Author: Georgi Djakov Date: Mon Jun 24 15:08:28 2024 +0300 Merge branch 'icc-mtk' into icc-next MediaTek DVFSRC Bus Bandwidth and Regulator knobs This series adds support for the MediaTek Dynamic Voltage and Frequency Scaling Resource Controller (DVFSRC), found on many MediaTek SoCs. This hardware collects requests from both software and the various remote processors embededd into the SoC, and decides about a minimum operating voltage and a minimum DRAM frequency to fulfill those requests, in an effort to provide the best achievable performance per watt. Such hardware IP is capable of transparently performing direct register R/W on all of the DVFSRC-controlled regulators and SoC bandwidth knobs. Summarizing how the DVFSRC works for Interconnect: ICC provider ICC Nodes ---- ---- _________ |CPU | |--- |VPU | _____ | |----- ---- | ---- | |->| DRAM | ---- | ---- |DRAM |->|scheduler|----- |GPU | |--- |DISP| | |->| (EMI) | ---- | ---- |_____|->|_________|---. ----- | ---- /|\ `-|MMSYS|--|--- |VDEC| | ----- | ---- | | ---- | change DRAM freq |--- |VENC| -------- | ---- SMC --> | DVFSRC | | ---- -------- |--- |IMG | | ---- | ---- |--- |CAM | ---- * icc-mtk dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver interconnect: mediatek: remove unneeded semicolon Link: https://lore.kernel.org/r/20240610085735.147134-1-angelogioacchino.delregno@collabora.com Signed-off-by: Georgi Djakov commit 9265ea04a7b501e45134de13c0cbb81e897adf33 Author: Jiapeng Chong Date: Mon Jun 24 10:53:26 2024 +0800 interconnect: mediatek: remove unneeded semicolon No functional modification involved. ./drivers/interconnect/mediatek/icc-emi.c:71:2-3: Unneeded semicolon. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9401 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20240624025326.69551-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Georgi Djakov commit 4f6a43ad2b05fd51e3294c67bb2e3da270324fbf Author: Philipp Zabel Date: Fri Jun 21 17:24:47 2024 +0200 reset: zynqmp: allow building under COMPILE_TEST The ZynqMP reset driver can be compiled without ARCH_ZYNQMP being enabled. Allow it to be built under COMPILE_TEST. Acked-by: Michal Simek Link: https://lore.kernel.org/r/20240621-reset-compile-zynqmp-v1-1-ede43ab18101@pengutronix.de Signed-off-by: Philipp Zabel commit 294bbd1f2697ff28af7f036b2cb19fee78eb100b Author: Geert Uytterhoeven Date: Thu Jun 13 21:18:05 2024 +0200 drm/panic: Add support for drawing a monochrome graphical logo Re-use the existing support for boot-up logos to draw a monochrome graphical logo in the DRM panic handler. When no suitable graphical logo is available, the code falls back to the ASCII art penguin logo. Note that all graphical boot-up logos are freed during late kernel initialization, hence a copy must be made for later use. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/3f1a5f56213f3e4584773eb2813e212b2dff6d14.1718305355.git.geert+renesas@glider.be commit a40d031d7b64df42dfd3a4c96ef19e62ce32b332 Author: Geert Uytterhoeven Date: Thu Jun 13 21:18:04 2024 +0200 drm/panic: Rename logo to logo_ascii Rename variables related to the ASCII logo, to prepare for the advent of support for graphical logos. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/df77372c16153655c321a290b5a3191ee2dcbc6b.1718305355.git.geert+renesas@glider.be commit a3dfb1d120aa214a76a9b26de3490d0b9eab572a Author: Geert Uytterhoeven Date: Thu Jun 13 21:18:02 2024 +0200 drm/panic: Spelling s/formater/formatter/ Fix a misspelling of "formatter". Fixes: 54034bebb22fd4be ("drm/panic: Add a kmsg panic screen") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/5a11f8caf8759aaa22d421034d3047368e9d5f33.1718305355.git.geert+renesas@glider.be commit a03a84bee36ab018d5757a29bb85e0fb804bb253 Author: Geert Uytterhoeven Date: Thu Jun 13 21:18:01 2024 +0200 lib/fonts: Fix visiblity of SUN12x22 and TER16x32 if DRM_PANIC When CONFIG_FONTS ("Select compiled-in fonts") is not enabled, the user should not be asked about any fonts. However, when CONFIG_DRM_PANIC is enabled, the user is still asked about the Sparc console 12x22 and Terminus 16x32 fonts. Fix this by moving the "|| DRM_PANIC" to where it belongs. Split the dependency in two rules to improve readability. Fixes: b94605a3889b9084 ("lib/fonts: Allow to select fonts for drm_panic") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/ac474c6755800e61e18bd5af407c6acb449c5149.1718305355.git.geert+renesas@glider.be commit 94ff11d3bd32506710ca43569d38420e7fc790c1 Author: Geert Uytterhoeven Date: Thu Jun 13 21:18:00 2024 +0200 drm/panic: Fix off-by-one logo size checks Logos that are either just as wide or just as high as the display work fine. Fixes: bf9fb17c6672868d ("drm/panic: Add a drm panic handler") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/1c9d02463cef3eac22cfac3ac6d1adad369f367b.1718305355.git.geert+renesas@glider.be commit a63ee07883dea5265ff00e606034e6c72b247cbc Author: Geert Uytterhoeven Date: Thu Jun 13 21:17:59 2024 +0200 drm/panic: Fix uninitialized drm_scanout_buffer.set_pixel() crash No implementations of drm_plane_helper_funcs.get_scanout_buffer() fill in the optional drm_scanout_buffer.set_pixel() member. Hence the member may contain non-zero garbage, causing a crash when deferencing it during drm panic. Fix this by pre-initializing the drm_scanout_buffer object before calling drm_plane_helper_funcs.get_scanout_buffer(). Fixes: 24d07f114e4ec760 ("drm/panic: Add a set_pixel() callback to drm_scanout_buffer") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/4c250d21880ca0b97e41da7b6a101bdf07e9d015.1718305355.git.geert+renesas@glider.be commit c04774af7ae392322e204dd20117e6c5162e0fe4 Author: AngeloGioacchino Del Regno Date: Thu Jun 20 12:16:56 2024 +0200 arm: dts: mediatek: Declare drive-strength numerically On some devicetrees, the drive-strength property gets assigned a MTK_DRIVE_(x)_mA definition, which matches with (x). For example, MTK_DRIVE_8mA equals to 8 and MTK_DRIVE_30mA equals to 30. Also keeping in mind that the drive-strength property is, by (binding) definition, taking a number in milliamperes unit, change all devicetrees to avoid the usage of any MTK_DRIVE_(x) definition. Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20240620101656.1096374-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 568ebdaba6370c03360860f1524f646ddd5ca523 Author: Lukas Bulwahn Date: Mon Jun 24 09:03:26 2024 +0200 MAINTAINERS: adjust file entry in FREESCALE QORIQ DPAA FMAN DRIVER Commit 243996d172a6 ("dt-bindings: net: Convert fsl-fman to yaml") splits the previous dt text file into four yaml files. It adjusts a corresponding file entry in MAINTAINERS from txt to yaml, but this adjustment misses that the file was split and renamed. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Adjust the file entry to match the four yaml files resulting from this commit above. Signed-off-by: Lukas Bulwahn Signed-off-by: David S. Miller commit 07430fa5248964d5338382b4b2e9ebea3904238e Author: Karolina Stolarek Date: Wed Jun 12 14:03:06 2024 +0200 drm/ttm/tests: Use u32 and u64 over uint*_t types Update the tests and helpers to use unsigned kernel types. Signed-off-by: Karolina Stolarek Suggested-by: Thomas Hellström Reviewed-by: Thomas Hellström Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/b36d71de78990ac5be1538cc3f735f7e40618cfe.1718192625.git.karolina.stolarek@intel.com commit be487a29896937d14caa3b00a14ab5c6ae29573c Author: Karolina Stolarek Date: Wed Jun 12 14:03:05 2024 +0200 drm/ttm/tests: Correct modules' licenses The test files are GPL and MIT, so update the definitions accordingly. Signed-off-by: Karolina Stolarek Reviewed-by: Thomas Hellström Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/54cd7289db67ec396b67ef48dbb45521d56ec03c.1718192625.git.karolina.stolarek@intel.com commit 99eec733e8236df37017a700ea9d040a91db62eb Author: Karolina Stolarek Date: Wed Jun 12 14:03:04 2024 +0200 drm/ttm/tests: Add TODO file List improvements for the test suite with some notes. Signed-off-by: Karolina Stolarek Reviewed-by: Thomas Hellström Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/3856fbbeaf40078d59b45971002b8f9d0d85f8f0.1718192625.git.karolina.stolarek@intel.com commit d6a82a1580c3b3f6a0a34f5189e9a5abba4d62a7 Author: Karolina Stolarek Date: Wed Jun 12 14:03:03 2024 +0200 drm/ttm/tests: Add tests for ttm_tt_populate Add tests for functions that add and release pages to TTs. Test the swapin operation. Export ttm_tt_unpopulate, ttm_tt_swapin and ttm_tt_swapout symbols for testing purposes. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/ee42d83a472ba6bca22b4bce58f332f800891186.1718192625.git.karolina.stolarek@intel.com commit 5fe3943385c987f73f99cdfa99785424a9d32a41 Author: Karolina Stolarek Date: Wed Jun 12 14:03:02 2024 +0200 drm/ttm/tests: Add eviction testing Add tests for ttm_bo_validate that focus on BO eviction and swapout. Update device funcs definition with eviction-related callbacks. Add alternative funcs where evict_flags() routes eviction to a domain that can't allocate resources (dubbed "busy manager" in the tests). Extract the common path of ttm_device init into a function. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/ae8e284d6c7e6bd0be259052bd4f42e07ce24641.1718192625.git.karolina.stolarek@intel.com commit 8eda41dfc9b2f04c03858cf33c79eb1e6e9249b1 Author: Karolina Stolarek Date: Wed Jun 12 14:03:01 2024 +0200 drm/ttm/tests: Add test cases dependent on fence signaling Add test cases that check how the state of dma fences in BO's reservation object influence the ttm_bo_validation() flow. Do similar tests for resource manager's move fence. Signed-off-by: Karolina Stolarek Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/068791a27abd05bf2605f23cc31864a22c20b308.1718192625.git.karolina.stolarek@intel.com commit 32d618e946388809b0fe62ad13f5d67d95dac1c5 Author: Karolina Stolarek Date: Wed Jun 12 14:03:00 2024 +0200 drm/ttm/tests: Add tests with mock resource managers Add mock resource manager to test ttm_bo_validate() with non-system placements. Update KConfig entry to enable DRM Buddy allocator, used by the mock manager. Update move function to do more than just assign a resource. Signed-off-by: Karolina Stolarek Tested-by: Somalapuram, Amaranath Reviewed-by: Thomas Hellström Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/664791dbb7cbada29e705d2fcaf176023f1b8649.1718192625.git.karolina.stolarek@intel.com commit 8bd1ff5ddc7bccabf5be7cf540b9af8d5f968866 Author: Karolina Stolarek Date: Wed Jun 12 14:02:59 2024 +0200 drm/ttm/tests: Test simple BO creation and validation Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use sys manager. Define a simple move function in ttm_device_funcs. Expose destroy callback of the buffer object to make testing of ttm_bo_init_reserved() behaviour easier. Signed-off-by: Karolina Stolarek Reviewed-by: Matthew Auld Reviewed-by: Somalapuram, Amaranath Tested-by: Somalapuram, Amaranath Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/ffba0d62eb98b2cbc61ae7ca90fee7dc0855719c.1718192625.git.karolina.stolarek@intel.com commit f7ed0a7e42c10cc0b6415203dcc3be7edbbbbdd1 Author: Karolina Stolarek Date: Wed Jun 12 14:02:58 2024 +0200 drm/ttm/tests: Use an init function from the helpers lib Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek Reviewed-by: Matthew Auld Reviewed-by: Somalapuram, Amaranath Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/235f110c1bdd2da7fac62ec03d177a5160dba1d5.1718192625.git.karolina.stolarek@intel.com commit dc50165601f5c24b3121defca60d267a980e8dbb Author: Karolina Stolarek Date: Wed Jun 12 14:02:57 2024 +0200 drm/ttm/tests: Set DMA mask in KUnit device In commit d393acce7b3f ("drm/tests: Switch to kunit devices"), DRM test helpers migrated away from using a dummy platform driver in favour of KUnit device. This means that DMA masks for the device are not set but are required by ttm_pool_alloc tests. Set the DMA mask for coherent mappings to unblock testing. Signed-off-by: Karolina Stolarek Reviewed-by: Nirmoy Das Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/dbd83b01bc835d922c070ad1c5bd9023e631e6c4.1718192625.git.karolina.stolarek@intel.com commit d0745846a37a3a37400aa721df6e4279e75dc582 Author: Karolina Stolarek Date: Wed Jun 12 14:02:56 2024 +0200 drm/ttm/tests: Delete unnecessary config option DRM KUnit helpers are selected automatically when TTM tests are enabled, so there's no need to do it directly in the .kunitconfig file. Signed-off-by: Karolina Stolarek Reviewed-by: Nirmoy Das Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/1f6f03ac5c6ba7d4b021c2a31638a0ae086486e8.1718192625.git.karolina.stolarek@intel.com commit 588c4c8d58c413b52c68193bdb741cfbf1040a77 Author: Karolina Stolarek Date: Wed Jun 12 14:02:55 2024 +0200 drm/ttm/tests: Fix a warning in ttm_bo_unreserve_bulk BOs in a bulk move have to share the same reservation object. That is not the case in the ttm_bo_unreserve_bulk subtest. Update ttm_bo_kunit_init() helper to accept dma_resv object so we can define buffer objects that share the same resv. Update calls to that helper accordingly. Fixes: 995279d280d1 ("drm/ttm/tests: Add tests for ttm_bo functions") Suggested-by: Christian König Signed-off-by: Karolina Stolarek Reviewed-by: Thomas Hellström Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/c5bd2df114781b4eb5c1e8295b2ae4ac2c30a179.1718192625.git.karolina.stolarek@intel.com commit 156872f08e33af7a23c1e4827f6127d7861b23fd Author: Jiapeng Chong Date: Tue Jun 18 15:32:05 2024 +0800 zorro: Use str_plural() in amiga_zorro_probe() Use the existing str_plural() function rather than duplicating its implementation. ./drivers/zorro/zorro.c:155:22-39: opportunity for str_plural(zorro_num_autocon). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9350 Signed-off-by: Jiapeng Chong Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240618073205.65303-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Geert Uytterhoeven commit ed58ae8554ee4a3d81a4db386d2150885109e63c Author: Jeff Johnson Date: Mon Jun 17 16:47:04 2024 -0700 m68k: emu: Add missing MODULE_DESCRIPTION() macros With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/m68k/emu/nfblock.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/m68k/emu/nfcon.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240617-md-m68k-arch-m68k-v1-1-57d38beaeb13@quicinc.com [geert: s/ARAnyM/Atari NatFeat/] Signed-off-by: Geert Uytterhoeven commit 213cc30331e9e8c92458c57a9565efc47933f34b Author: Mitul Golani Date: Fri Jun 21 13:04:54 2024 +0530 drm/i915/display: Consider adjusted_pixel_rate to be u64 Consider adjusted_pixel_rate to be a u64 to match the return type of mul_u32_u32() and avoid any compiler dependency for do_div. Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Nathan Chancellor Cc: intel-xe@lists.freedesktop.org Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/r/20240619154207.GA1125704@thelio-3990X Signed-off-by: Mitul Golani Reviewed-by: Rodrigo Vivi Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240621073454.1421676-1-mitulkumar.ajitkumar.golani@intel.com commit ca88b172eebfaa923ea752f6eb41ec5c9cb587c5 Author: Neil Armstrong Date: Mon Jun 24 10:59:36 2024 +0200 arm64: dts: amlogic: ad402: fix thermal zone node name Fixes the following: thermal-zones: 'soc_thermal' does not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# Fixes: 593ab951232b ("arm64: dts: amlogic: ad402: setup thermal-zones") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240624-topic-amlogic-upstream-bindings-fixes-dts-round-2-v1-1-0a21f456eb8d@linaro.org Signed-off-by: Neil Armstrong commit fe125601d17cc1eacea47059a67bd5163d872ad2 Author: Shengjiu Wang Date: Mon Jun 24 11:39:05 2024 +0800 reset: imx8mp-audiomix: Add AudioMix Block Control reset driver Add support for the resets on i.MX8MP Audio Block Control module, which includes the EARC PHY software reset and EARC controller software reset. The reset controller is created using the auxiliary device framework and set up in the clock driver. Signed-off-by: Shengjiu Wang Reviewed-by: Marco Felsch Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/1719200345-32006-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Philipp Zabel commit 37db17c1008c84f972da1ddd7bb10248670e6aa3 Author: Wei Yang Date: Sun Jun 16 01:35:37 2024 +0000 s390/mm: Get total ram pages from memblock On s390, zero page's size relies on total ram pages. Since we plan to move the accounting into __free_pages_core(), totalram_pages may not represent the total usable pages on system at this point when defer_init is enabled. We can get the total usable pages from memblock directly. The size maybe not accurate due to the alignment, but enough for the calculation. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) CC: David Hildenbrand Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20240616013537.20338-1-richard.weiyang@gmail.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 7c67928648188d193c9f73679f7e6aa67d088237 Author: Heiko Carstens Date: Sun Jun 9 21:02:19 2024 +0200 s390: Provide optimized __arch_hweight*() implementations Make use of the popcnt instruction to provide optimized __arch_hweight*() implementations. The generated code is shorter and avoids rather expensive functions calls. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit b178aa6f333b07bda0548d7e45085660a112414d Author: Hans Verkuil Date: Thu Jun 20 09:52:26 2024 +0200 media: b2c2: flexcop-usb: fix flexcop_usb_memory_req smatch generated this warning: drivers/media/usb/b2c2/flexcop-usb.c:199 flexcop_usb_memory_req() warn: iterator 'i' not incremented and indeed the function is not using i or updating buf. The reason this always worked is that this function is called to write just 6 bytes (a MAC address) to the USB device, and so in practice there is only a single chunk written. If we ever would need to write more than one chunk, this function would fail since each chunk would read from or write to the same buf address. Rewrite the function to properly handle this. Signed-off-by: Hans Verkuil commit e1bda64a5865113727869fe0303c8d07d004869f Author: Devarsh Thakkar Date: Wed Jun 19 01:06:51 2024 +0530 media: verisilicon : Use exported tables from v4l2-jpeg for hantro codec Use v4l2-jpeg core API to import reference quantization and huffman tables used for JPEG Encoding. Signed-off-by: Devarsh Thakkar Reviewed-by: Chen-Yu Tsai Acked-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit ceb9a33bbd94b70cb4f480b03e6b1cdc6ac97bbb Author: Devarsh Thakkar Date: Wed Jun 19 01:06:50 2024 +0530 media: imagination: Use exported tables from v4l2-jpeg core Use exported huffman and quantization tables from v4l2-jpeg core library. Signed-off-by: Devarsh Thakkar Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 7dfa3259d200c674b288d88e26ccc6327ca77525 Author: Devarsh Thakkar Date: Wed Jun 19 01:06:49 2024 +0530 media: Documentation: Document v4l2-jpeg helper functions Enable documentation for v4l2-jpeg header related helper functions which are useful for parsing jpeg files while decoding or creating jpeg headers while encoding. Signed-off-by: Devarsh Thakkar Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b5bad839c01e3a2a41056ac0bc07e7b1ea0ba412 Author: Devarsh Thakkar Date: Wed Jun 19 01:06:48 2024 +0530 media: v4l2-jpeg: Export reference quantization and huffman tables Export reference quantization and huffman tables as provided in ITU-T.81 so that they can be re-used by other JPEG drivers. These are example tables provided in ITU-T.81 as reference tables and the JPEG encoders are free to use either these or their own proprietary tables. Also add necessary prefixes to be used for huffman tables in global header file. Signed-off-by: Devarsh Thakkar Reviewed-by: Hans Verkuil Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit a1e2940458853d00c178c842c889e4ae3ef5eaec Author: Devarsh Thakkar Date: Wed Jun 19 01:06:47 2024 +0530 media: imagination: Add E5010 JPEG Encoder driver This adds support for stateful V4L2 M2M based driver for Imagination E5010 JPEG Encoder [1] which supports baseline encoding with two different quantization tables and compression ratio as demanded. Support for both contiguous and non-contiguous YUV420 and YUV422 semiplanar formats is added along with alignment restrictions as required by the hardware. System and runtime PM hooks are added in the driver along with v4l2 crop and selection API support. Minimum resolution supported is 64x64 and Maximum resolution supported is 8192x8192. All v4l2-compliance tests are passing [2] : v4l2-compliance -s -f -a -d /dev/video0 -e /dev/video1 Total for e5010 device /dev/video0: 79, Succeeded: 79, Failed: 0, Warnings: 0 NOTE: video1 here is VIVID test pattern generator Also tests [3] were run manually to verify below driver features: - Runtime Power Management - Multi-instance JPEG Encoding - DMABUF import, export support - NV12, NV21, NV16, NV61 video format support - Compression quality S_CTRL - Cropping support using S_SELECTION Existing V4L2 M2M based JPEG drivers namely s5p-jpeg, imx-jpeg and rcar_jpu were referred while making this. TODO: Add MMU and memory tiling support [1]: AM62A TRM (Section 7.6 is for JPEG Encoder) : Link: https://www.ti.com/lit/pdf/spruj16 [2]: v4l2-compliance test : Link: https://gist.github.com/devarsht/1f039c631ca953a57f405cfce1b69e49 [3]: E5010 JPEG Encoder Manual tests : Performance: Link: https://gist.github.com/devarsht/c40672944fd71c9a53ab55adbfd9e28b Functionality: Link: https://gist.github.com/devarsht/8e88fcaabff016bb2bac83d89c9d23ce Compression Quality: Link: https://gist.github.com/devarsht/cbcc7cd97e8c48ba1486caa2b7884655 Multi Instance: Link: https://gist.github.com/devarsht/22c2fca08cd3441fb40f2c7a4cebc95a Crop support: Link: https://gist.github.com/devarsht/de6f5142f678bb1a5338abfd9f814abd Runtime PM: Link: https://gist.github.com/devarsht/70cd95d4440ddc678489d93885ddd4dd Co-developed-by: David Huang Signed-off-by: David Huang Signed-off-by: Devarsh Thakkar Reviewed-by: Benjamin Gaignard Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit dacd54eb2da6e3b5e2ba7ff1ce7286c323f24285 Author: Devarsh Thakkar Date: Wed Jun 19 01:06:46 2024 +0530 media: dt-bindings: Add Imagination E5010 JPEG Encoder Add dt-bindings for Imagination E5010 JPEG Encoder [1] which is implemented as stateful V4L2 M2M driver. The device supports baseline encoding with two different quantization tables and compression ratio as demanded. Minimum resolution supported is 64x64 and Maximum resolution supported is 8192x8192. Link: https://www.ti.com/lit/pdf/spruj16 [1] (Section 7.6 JPEG Encoder) Co-developed-by: David Huang Signed-off-by: David Huang Signed-off-by: Devarsh Thakkar Reviewed-by: Rob Herring Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 699f411dceb4766aabcac05cb4fbeb530e6c257b Author: Tejas Vipin Date: Thu Jun 20 23:40:49 2024 +0530 drm/panel: raydium-rm692e5: transition to mipi_dsi wrapped functions Use functions introduced in commit 966e397e4f60 ("drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling") for the raydium-rm692e5 panel. Additionally, the error handling in rm692e5_prepare() is changed to properly power the panel off in the case of a wider range of initialization commands failing than before. Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Signed-off-by: Tejas Vipin Link: https://lore.kernel.org/r/20240620181051.102173-1-tejasvipin76@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240620181051.102173-1-tejasvipin76@gmail.com commit 47e851ec4c02e8cbee95614c3acc746ae7551dcc Author: Tejas Vipin Date: Fri Jun 21 18:46:46 2024 +0530 drm/panel: asus-z00t-tm5p5-n35596: transition to mipi_dsi wrapped functions Use functions introduced in commit 966e397e4f60 ("drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling") for the asus-z00t-tm5p5-n35596 panel. Signed-off-by: Tejas Vipin Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240621131648.131667-1-tejasvipin76@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240621131648.131667-1-tejasvipin76@gmail.com commit 83a6f4c62cb12aa902043fc1910fdbe483193f3c Author: Christian Hewitt Date: Sat Jun 22 14:01:12 2024 +0000 arm64: dts: meson: add initial support for Dreambox One/Two Dreambox One and Dreambox Two are based on the Amlogic W400 reference board with an S922X chip and the following specs: - 2GB DDR3 RAM - 16GB eMMC - 10/100/1000 Base-T Ethernet - AP6356 Wireless (802.11 b/g/n/ac, BT 5.0) - HDMI 2.1 video - S/PDIF optical output - 2x DVB-S2/T2 - Smartcard Reader Slot - 2x USB 2.0 port (1x micro-USB for service) - 1x USB 3.0 port - IR receiver - 1x Power LED (blue) - 1x Power button (top) - 1x Update/Reset button (underside) - 1x micro SD card slot Dreambox Two differences: - 3" Colour LCD display (MIPI-DSI) - Common Interface Slot Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240622140112.2609534-3-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 96cf7ca12bdcd44fcfdca74e56389c40ae47a7b1 Author: Christian Hewitt Date: Sat Jun 22 14:01:11 2024 +0000 dt-bindings: arm: amlogic: add support for Dreambox One/Two Dreambox One and Dreambox Two are DVBS/T2 receiver boxes based on the Amlogic W400 reference board with an S922X chip. Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240622140112.2609534-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 4132d13bfcdb3551b0d1a6a74e2063351b4bfcaa Author: Christian Hewitt Date: Sat Jun 22 14:01:10 2024 +0000 dt-bindings: add dream vendor prefix Add a vendor prefix for Dream Property GmbH Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240622140112.2609534-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 5feff053b08ce5d2167b9f44bcea3b466b5a81a0 Author: Christian Hewitt Date: Sat Jun 22 13:51:17 2024 +0000 arm64: dts: meson: add support for OSMC Vero 4K The OSMC Vero 4K device is based on the Amlogic S905X (P212) reference design with the following specifications: - 2GB DDR4 RAM - 16GB eMMC - HDMI 2.1 video - S/PDIF optical output - AV output - 10/100 Ethernet - AP6255 Wireless (802.11 a/b/g/n/ac, BT 4.2) - 2x USB 2.0 ports (1x OTG) - IR receiver (internal) - IR extender port (external) - 1x micro SD card slot - 1x Power LED (red) - 1x Reset button (in AV jack) Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240622135117.2608890-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 7d7dd631d1af471a6c909e197be2ef3df526d00f Author: Christian Hewitt Date: Sat Jun 22 13:51:16 2024 +0000 dt-bindings: arm: amlogic: add OSMC Vero 4K Add support for the OSMC Vero 4K Linux-based STB Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240622135117.2608890-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 5375986e16207e573c0493009d25b0c01f44e01d Author: Jeff Johnson Date: Thu Jun 13 14:18:48 2024 -0700 firmware: meson_sm: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/meson/meson_sm.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-firmware-meson-v1-1-28e4138a8597@quicinc.com Signed-off-by: Neil Armstrong commit 0e8b3bca280a78ed5e41366f8018e4067fa0ea8e Author: Philipp Zabel Date: Fri Jun 21 17:28:12 2024 +0200 reset: meson-audio-arb: Use devm_clk_get_enabled() Use devm_clk_get_enabled() to reduce a bit of boilerplate and to disable the clock in case devm_reset_controller_register() fails. Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20240621-reset-devm-clk-get-enabled-v1-1-8408c7962b6c@pengutronix.de Signed-off-by: Philipp Zabel commit 1359fc272bee9e0e8b7477d15b8d08518b818f0c Author: Philipp Zabel Date: Fri Jun 21 17:21:09 2024 +0200 reset: sti: allow building under COMPILE_TEST The STIH407 reset driver can be compiled without ARCH_STI being enabled. Allow it to be built under COMPILE_TEST. Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20240621-reset-compile-sti-v1-1-b7a66ce29911@pengutronix.de Signed-off-by: Philipp Zabel commit 3b85a2eacd3d886f4d4133a83cdfc2f3b48f06c0 Author: Michael Kelley Date: Tue Jun 18 09:50:59 2024 -0700 Documentation: hyperv: Add overview of Confidential Computing VM support Add documentation topic for Confidential Computing (CoCo) VM support in Linux guests on Hyper-V. Signed-off-by: Michael Kelley Reviewed-by: Easwar Hariharan Link: https://lore.kernel.org/r/20240618165059.10174-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240618165059.10174-1-mhklinux@outlook.com> commit 7f828d5fff7d24752e1ecf6bebb6617a81f97b93 Author: Dexuan Cui Date: Thu Jun 20 23:16:14 2024 -0700 clocksource: hyper-v: Use lapic timer in a TDX VM without paravisor In a TDX VM without paravisor, currently the default timer is the Hyper-V timer, which depends on the slow VM Reference Counter MSR: the Hyper-V TSC page is not enabled in such a VM because the VM uses Invariant TSC as a better clocksource and it's challenging to mark the Hyper-V TSC page shared in very early boot. Lower the rating of the Hyper-V timer so the local APIC timer becomes the the default timer in such a VM, and print a warning in case Invariant TSC is unavailable in such a VM. This change should cause no perceivable performance difference. Cc: stable@vger.kernel.org # 6.6+ Reviewed-by: Roman Kisel Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20240621061614.8339-1-decui@microsoft.com Signed-off-by: Wei Liu Message-ID: <20240621061614.8339-1-decui@microsoft.com> commit 90ac806c32952e4eb39fa21cc4e93f086a4047c3 Author: Rachel Menge Date: Thu Jun 20 18:50:40 2024 -0400 Drivers: hv: Remove deprecated hv_fcopy declarations There are lingering hv_fcopy declarations which do not have definitions. The fcopy driver was removed in commit ec314f61e4fc ("Drivers: hv: Remove fcopy driver"). Therefore, remove the hv_fcopy declarations which are no longer needed or defined. Fixes: ec314f61e4fc ("Drivers: hv: Remove fcopy driver") Signed-off-by: Rachel Menge Reviewed-by: Dexuan Cui Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20240620225040.700563-1-rachelmenge@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20240620225040.700563-1-rachelmenge@linux.microsoft.com> commit 541b1b0a8fc235bca355921eb7f3f59a8efa3e9a Author: Jeff Johnson Date: Mon Jun 3 09:55:25 2024 -0700 agp: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/amd64-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/intel-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/intel-gtt.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/sis-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/via-agp.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20240603-md-agp-v1-1-9a1582114ced@quicinc.com commit 582e372f068c813c852a48000f27c175fb11bb61 Author: Jouni Högander Date: Thu Jun 20 13:33:12 2024 +0300 drm/i915/psr: Set DP_PSR_SU_REGION_SCANLINE_CAPTURE bit when needed Setting DP_PSR_SU_REGION_SCANLINE_CAPTURE (Selective Update Region Scan Line Capture Indication in spec) bit was dropped when psr_enable_sink was split to _psr_enable_sink and _panel_replay_enable_sink. Add setting it back. Fixes: 32f0045f905c ("drm/i915/psr: Split enabling sink for PSR and Panel Replay") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240620103312.903977-1-jouni.hogander@intel.com commit 0ac5c7d933de6570e0efa62bb5ef9e440311a6fe Author: Dmitry Baryshkov Date: Sat Jun 22 01:03:42 2024 +0300 soc: qcom: pdr: extract PDR message marshalling data The in-kernel PD mapper is going to use same message structures as the QCOM_PDR_HELPERS module. Extract message marshalling data to separate module that can be used by both PDR helpers and by PD mapper. Reviewed-by: Bryan O'Donoghue Tested-by: Steev Klimaszewski Tested-by: Alexey Minnekhanov Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-3-a84ee3591c8e@linaro.org Signed-off-by: Bjorn Andersson commit 57f20d51f35780f240ecf39d81cda23612800a92 Author: Dmitry Baryshkov Date: Sat Jun 22 01:03:41 2024 +0300 soc: qcom: pdr: fix parsing of domains lists While parsing the domains list, start offsets from 0 rather than from domains_read. The domains_read is equal to the total count of the domains we have seen, while the domains list in the message starts from offset 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Steev Klimaszewski Tested-by: Alexey Minnekhanov Reviewed-by: Chris Lew Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-2-a84ee3591c8e@linaro.org Signed-off-by: Bjorn Andersson commit 107924c14e3ddd85119ca43c26a4ee1056fa9b84 Author: Dmitry Baryshkov Date: Sat Jun 22 01:03:40 2024 +0300 soc: qcom: pdr: protect locator_addr with the main mutex If the service locator server is restarted fast enough, the PDR can rewrite locator_addr fields concurrently. Protect them by placing modification of those fields under the main pdr->lock. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Steev Klimaszewski Tested-by: Alexey Minnekhanov Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-1-a84ee3591c8e@linaro.org Signed-off-by: Bjorn Andersson commit f2605e1715dd28e8943b557453fed3a40421d3b5 Author: Antonio Borneo Date: Thu Jun 20 10:31:15 2024 +0200 arm64: Kconfig: Allow build irq-stm32mp-exti driver as module Drop auto-selecting the driver, so it can be built either as a module or built-in. Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-9-antonio.borneo@foss.st.com commit 2751ee69c150fa3013924cadba6f47eb7215086f Author: Antonio Borneo Date: Thu Jun 20 10:31:14 2024 +0200 ARM: stm32: Allow build irq-stm32mp-exti driver as module Drop auto-selecting the driver, so it can be built either as a module or built-in. Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-8-antonio.borneo@foss.st.com commit 0be58e0553812fcbd37c0c2d89e2b5bc296f04ea Author: Antonio Borneo Date: Thu Jun 20 10:31:13 2024 +0200 irqchip/stm32mp-exti: Allow building as module Allow to build the driver as a module by adding the necessarily hooks in Kconfig and in the driver's code. Since all the probe dependencies linked to this driver have already been fixed, remove the not longer relevant 'arch_initcall'. Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-7-antonio.borneo@foss.st.com commit 211681998d706d1e0fff6b62f89efcdf29c24978 Author: Taniya Das Date: Wed Jun 12 16:38:26 2024 +0530 clk: qcom: gpucc-sa8775p: Update wait_val fields for GPU GDSC's Update wait_val fields as per the default hardware values of the GDSC as otherwise it would lead to GDSC FSM state stuck causing power on/off failures of the GSDC. Fixes: 0afa16afc36d ("clk: qcom: add the GPUCC driver for sa8775p") Signed-off-by: Taniya Das Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240612-sa8775p-v2-gcc-gpucc-fixes-v2-6-adcc756a23df@quicinc.com Signed-off-by: Bjorn Andersson commit dff68b2f74547617dbb75d0d12f404877ec8f8ce Author: Taniya Das Date: Wed Jun 12 16:38:25 2024 +0530 clk: qcom: gpucc-sa8775p: Park RCG's clk source at XO during disable The RCG's clk src has to be parked at XO while disabling as per the HW recommendation, hence use clk_rcg2_shared_ops to achieve the same. Also gpu_cc_cb_clk is recommended to be kept always ON, hence use clk_branch2_aon_ops to keep the clock always ON. Fixes: 0afa16afc36d ("clk: qcom: add the GPUCC driver for sa8775p") Signed-off-by: Taniya Das Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240612-sa8775p-v2-gcc-gpucc-fixes-v2-5-adcc756a23df@quicinc.com Signed-off-by: Bjorn Andersson commit e69386d4a42afa5da6bfdcd4ac5ec61e1db04c61 Author: Taniya Das Date: Wed Jun 12 16:38:24 2024 +0530 clk: qcom: gpucc-sa8775p: Remove the CLK_IS_CRITICAL and ALWAYS_ON flags The GPU clocks/GDSCs have been marked critical from the clock driver but the GPU driver votes on these resources as per the HW requirement. In the case where these clocks & GDSCs are left enabled, would have power impact and also cause GPU stability/corruptions. Fix the same by removing the CLK_IS_CRITICAL for clocks and ALWAYS_ON flags for the GPU GDSCs. Fixes: 0afa16afc36d ("clk: qcom: add the GPUCC driver for sa8775p") Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20240612-sa8775p-v2-gcc-gpucc-fixes-v2-4-adcc756a23df@quicinc.com Signed-off-by: Bjorn Andersson commit 955606a7b073d724a50a6ab1119987e189fc3e36 Author: Taniya Das Date: Wed Jun 12 16:38:23 2024 +0530 clk: qcom: gcc-sa8775p: Set FORCE_MEM_CORE_ON for gcc_ufs_phy_ice_core_clk Update the force mem core bit for UFS ICE clock to force the core on signal to remain active during halt state of the clk. If force mem core bit of the clock is not set, the memories of the subsystem will not retain the logic across power states. Fixes: 08c51ceb12f7 ("clk: qcom: add the GCC driver for sa8775p") Signed-off-by: Taniya Das Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240612-sa8775p-v2-gcc-gpucc-fixes-v2-3-adcc756a23df@quicinc.com Signed-off-by: Bjorn Andersson commit be208c0ccf7d861fc6109ca06c1a773512739af9 Author: Taniya Das Date: Wed Jun 12 16:38:22 2024 +0530 clk: qcom: gcc-sa8775p: Update the GDSC wait_val fields and flags Update the GDSC wait_val fields as per the default hardware values as otherwise they would lead to GDSC FSM state to be stuck and causing failures to power on/off. Also add the GDSC flags as applicable and add support to control PCIE GDSC's using collapse vote registers. Fixes: 08c51ceb12f7 ("clk: qcom: add the GCC driver for sa8775p") Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20240612-sa8775p-v2-gcc-gpucc-fixes-v2-2-adcc756a23df@quicinc.com Signed-off-by: Bjorn Andersson commit d3b33848627d2b0e02bfcd74ea1671d0d6df3aec Author: Taniya Das Date: Wed Jun 12 16:38:21 2024 +0530 clk: qcom: gcc-sa8775p: Remove support for UFS hw ctl clocks The UFS hw ctl clocks are not used by any consumers on SA8775P, and these clocks are not using the correct clock ops to manage the hw ctl of the branch clock, hence remove these clocks. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20240612-sa8775p-v2-gcc-gpucc-fixes-v2-1-adcc756a23df@quicinc.com Signed-off-by: Bjorn Andersson commit ae24ba769b5c108b00cdf49ed39b189eb012fbb8 Author: Takashi Sakamoto Date: Sun Jun 23 17:39:00 2024 +0900 firewire: core: undefine macros after use in tracepoints events Some macros are defined in tracepoints events. They should be back to undefined state after use. Link: https://lore.kernel.org/r/20240623083900.777897-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit d7aeff30093888649789dcad070fe954745adf53 Author: Bartosz Golaszewski Date: Mon May 27 14:55:05 2024 +0200 arm64: dts: qcom: sa8775p: add a dedicated memory carveout for TZ Add a 20MB reserved memory region for use by SCM calls. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-15-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit f5a27053293fa027349f8fdfe81b314cc709158a Author: Bartosz Golaszewski Date: Mon May 27 14:55:04 2024 +0200 arm64: defconfig: enable SHM Bridge support for the TZ memory allocator Enable SHM Bridge support in the Qualcomm TrustZone allocator by default as even on architectures that don't support it, we automatically fall back to the generic allocator. Signed-off-by: Bartosz Golaszewski Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-14-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit dcf5bd889a7ce3d9e53bd8075fbade59ebae9104 Author: Bartosz Golaszewski Date: Mon May 27 14:55:03 2024 +0200 firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image() The "memory protection" mechanism mentioned in the comment is the SHM Bridge. This is also the reason why we do not convert this call to using the TZ memory allocator. Signed-off-by: Bartosz Golaszewski Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-13-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit a33b2579c8d303b353a1f7c743b096f150da70fa Author: Bartosz Golaszewski Date: Mon May 27 14:55:02 2024 +0200 firmware: qcom: scm: add support for SHM bridge memory carveout Parse the "memory-region" property and - if present - use it to assign the dedicated reserved memory to the underlying DMA callbacks which will then allocate memory for the SCM calls from it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-12-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit f86c61498a573a19b19b0ba2784dc1bd4dcfc170 Author: Bartosz Golaszewski Date: Mon May 27 14:55:01 2024 +0200 firmware: qcom: tzmem: enable SHM Bridge support SHM Bridge is a safety mechanism allowing to limit the amount of memory shared between the kernel and the TrustZone to regions explicitly marked as such. Add a variant of the tzmem allocator that configures the memory pools as SHM bridges. It also enables the SHM bridge globally so non-SHM bridge memory will no longer work with SCM calls. If enabled at build-time, it will still be checked for availability at run-time. If the architecture doesn't support SHM Bridge, the allocator will fall back to the generic mode. Signed-off-by: Bartosz Golaszewski Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-11-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 178e19c0df1b1b27668fc6ca43b25a03eda01dad Author: Bartosz Golaszewski Date: Mon May 27 14:55:00 2024 +0200 firmware: qcom: scm: add support for SHM bridge operations SHM Bridge is a safety mechanism allowing to limit the amount of memory shared between the kernel and the TrustZone to regions explicitly marked as such. Add low-level primitives for enabling SHM bridge support as well as creating and destroying SHM bridges to qcom-scm. Signed-off-by: Bartosz Golaszewski Acked-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-10-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 6612103ec35af6058bb85ab24dae28e119b3c055 Author: Bartosz Golaszewski Date: Mon May 27 14:54:59 2024 +0200 firmware: qcom: qseecom: convert to using the TZ allocator Drop the DMA mapping operations from qcom_scm_qseecom_app_send() and convert all users of it in the qseecom module to using the TZ allocator for creating SCM call buffers. As this is largely a module separate from the SCM driver, let's use a separate memory pool. Set the initial size to 4K and - if we run out - add twice the current amount to the pool. Signed-off-by: Bartosz Golaszewski Reviewed-by: Elliot Berman Reviewed-by: Amirreza Zarrabi Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-9-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit bd6ad954e73374b49302731bfaada94270087863 Author: Bartosz Golaszewski Date: Mon May 27 14:54:58 2024 +0200 firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator Let's use the new TZ memory allocator to obtain a buffer for this call instead of manually kmalloc()ing it and then mapping to physical space. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Maximilian Luz Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-8-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit d7e23490bc2e3c449e75a40e6bda2b4e77a777f6 Author: Bartosz Golaszewski Date: Mon May 27 14:54:57 2024 +0200 firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator Let's use the new TZ memory allocator to obtain a buffer for this call instead of using dma_alloc_coherent(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-7-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit ab6902690d543a4bdcdf670f5742f2e030d72b06 Author: Bartosz Golaszewski Date: Mon May 27 14:54:56 2024 +0200 firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator Let's use the new TZ memory allocator to obtain a buffer for this call instead of using dma_alloc_coherent(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-6-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 2dcd12ca6f8595726122bbfc2520a1d3bcfdb110 Author: Bartosz Golaszewski Date: Mon May 27 14:54:55 2024 +0200 firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator Let's use the new TZ memory allocator to obtain a buffer for this call instead of using dma_alloc_coherent(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-5-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 449d0d84bcd8246b508d07995326d13c54488b8c Author: Bartosz Golaszewski Date: Mon May 27 14:54:54 2024 +0200 firmware: qcom: scm: smc: switch to using the SCM allocator We need to allocate, map and pass a buffer to the trustzone if we have more than 4 arguments for a given SCM call. Let's use the new TrustZone allocator for that memory and shrink the code in process. As this code lives in a different compilation unit than the rest of the SCM code, we need to provide a helper in the form of qcom_scm_get_tzmem_pool() that allows the SMC low-level routines to access the SCM memory pool. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-4-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 40289e35ca525f29a03989352ab207b6a9675475 Author: Bartosz Golaszewski Date: Mon May 27 14:54:53 2024 +0200 firmware: qcom: scm: enable the TZ mem allocator Select the TrustZone memory allocator in Kconfig and create a pool of memory shareable with the TrustZone when probing the SCM driver. This will allow a gradual conversion of all relevant SCM calls to using the dedicated allocator. The policy used for the pool is "on-demand" and the initial size is 0 as - depending on the config - it's possible that no SCM calls needing to allocate memory will be called. The sizes of possible allocations also vary substiantially further warranting the "on-demand" approach. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-3-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 84f5a7b67b61bfeb0a939ddc5eca8586cae101de Author: Bartosz Golaszewski Date: Mon May 27 14:54:52 2024 +0200 firmware: qcom: add a dedicated TrustZone buffer allocator We have several SCM calls that require passing buffers to the TrustZone on top of the SMC core which allocates memory for calls that require more than 4 arguments. Currently every user does their own thing which leads to code duplication. Many users call dma_alloc_coherent() for every call which is terribly unperformant (speed- and size-wise). Provide a set of library functions for creating and managing pools of memory which is suitable for sharing with the TrustZone, that is: page-aligned, contiguous and non-cachable as well as provides a way of mapping of kernel virtual addresses to physical space. Make the allocator ready for extending with additional modes of operation which will allow us to support the SHM bridge safety mechanism once all users convert. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi #sa8775p-ride Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-2-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 9164d2be21d42a0263b80af709fa40879c7f52be Author: Bartosz Golaszewski Date: Mon May 27 14:54:51 2024 +0200 dt-bindings: firmware: qcom,scm: add memory-region for sa8775p Document a new property (currently only for sa8775p) that describes the memory region reserved for communicating with the TrustZone. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-1-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson commit 585141c57a49315f6522d5f7265a3f1aa05424c1 Author: Luca Weiss Date: Wed Jun 19 18:42:31 2024 +0200 arm64: dts: qcom: msm8976: Use mboxes in smsm node With the smsm bindings and driver finally supporting mboxes, switch to that and stop using apcs as syscon. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240619-smsm-mbox-dts-v1-5-268ab7eef779@lucaweiss.eu Signed-off-by: Bjorn Andersson commit e36402b55684c64af23575f39e0a6ce27272b5f7 Author: Luca Weiss Date: Wed Jun 19 18:42:30 2024 +0200 arm64: dts: qcom: msm8953: Use mboxes in smsm node With the smsm bindings and driver finally supporting mboxes, switch to that and stop using apcs as syscon. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240619-smsm-mbox-dts-v1-4-268ab7eef779@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 9f8b7c4e3d8bbb6eb787752ad14a82e714d917ff Author: Luca Weiss Date: Wed Jun 19 18:42:29 2024 +0200 arm64: dts: qcom: msm8939: Use mboxes in smsm node With the smsm bindings and driver finally supporting mboxes, switch to that and stop using apcs as syscon. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240619-smsm-mbox-dts-v1-3-268ab7eef779@lucaweiss.eu Signed-off-by: Bjorn Andersson commit d605f9c75949997150dbb32bf082695326d3e110 Author: Luca Weiss Date: Wed Jun 19 18:42:28 2024 +0200 arm64: dts: qcom: msm8916: Use mboxes in smsm node With the smsm bindings and driver finally supporting mboxes, switch to that and stop using apcs as syscon. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240619-smsm-mbox-dts-v1-2-268ab7eef779@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 368a5aed131271600e75c715a5b79f0b613f0225 Author: Luca Weiss Date: Wed Jun 19 18:42:27 2024 +0200 ARM: dts: qcom: msm8974: Use mboxes in smsm node With the smsm bindings and driver finally supporting mboxes, switch to that and stop using apcs as syscon. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240619-smsm-mbox-dts-v1-1-268ab7eef779@lucaweiss.eu Signed-off-by: Bjorn Andersson commit 4e915987ff5b91ea531e716367373ff4442d9614 Author: Rajendra Nayak Date: Fri Jun 21 10:20:06 2024 +0300 arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes Add tsens and thermal zones nodes for x1e80100 SoC. Signed-off-by: Rajendra Nayak Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240621-x1e80100-dts-thermal-v3-1-abd6f416b609@linaro.org Signed-off-by: Bjorn Andersson commit 2cf5ec58e87bf4df1b360ab45c047d2b311930c8 Author: Luca Weiss Date: Fri Jun 21 10:42:31 2024 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Configure PM8008 regulators PM8008 regulators are used for the cameras found on FP5. Configure the chip and its voltages. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240621-fp4-fp5-pm8008-v1-2-dbedcd6f00f1@fairphone.com Signed-off-by: Bjorn Andersson commit d315b45ab8b312d6e74d85064ef916aafd1bbdef Author: Luca Weiss Date: Fri Jun 21 10:42:30 2024 +0200 arm64: dts: qcom: sm7225-fairphone-fp4: Configure PM8008 regulators PM8008 regulators are used for the cameras found on FP4. Configure the chip and its voltages. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240621-fp4-fp5-pm8008-v1-1-dbedcd6f00f1@fairphone.com Signed-off-by: Bjorn Andersson commit 313e2909023bef36ef7b6d1d9ff2d98febcaa28d Author: Taniya Das Date: Fri Jun 21 17:34:23 2024 +0530 clk: qcom: gpucc-sm8350: Park RCG's clk source at XO during disable The RCG's clk src has to be parked at XO while disabling as per the HW recommendation, hence use clk_rcg2_shared_ops to achieve the same. Fixes: 160758b05ab1 ("clk: qcom: add support for SM8350 GPUCC") Signed-off-by: Taniya Das Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # SM8350-HDK Link: https://lore.kernel.org/r/20240621-sm8350-gpucc-fixes-v1-1-22db60c7c5d3@quicinc.com Signed-off-by: Bjorn Andersson commit 61ba969e0e7d26a9260bcc658c54d2bf9a1f0a2b Author: Lin, Meng-Bo Date: Fri Jun 21 14:13:33 2024 +0000 arm64: dts: qcom: msm8916-gplus-fl8005a: Add BMS There is PM8916 Battery voltage monitor on GPLUS FL8005A. Add PM8916 BMS and the battery to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240621141319.347088-1-linmengbo06890@proton.me Signed-off-by: Bjorn Andersson commit a69274e1c6f557c2fa7f35f194acb51d723adbc8 Author: Valeriy Klimin Date: Fri Jun 21 17:26:42 2024 +0300 dt-bindings: arm: qcom: Add Sony Xperia Z3 Compact Add the compatible for this device. Signed-off-by: Valeriy Klimin Acked-by: Conor Dooley Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240621-sony-aries-v2-1-dddf10722522@gmail.com Signed-off-by: Bjorn Andersson commit f1a77eff4c60b9814d8b59abae21cfa80c00df79 Author: Valeriy Klimin Date: Fri Jun 21 17:26:44 2024 +0300 ARM: dts: qcom: msm8974-sony-shinano: increase load on l21 for sdhc2 SD cards would exhibit errors similar to ones described in commit 27fe0fc05f35 ("ARM: dts: msm8974-FP2: Increase load on l20 for sdhci") This patch applies the same change to the regulator for sdhc2. Signed-off-by: Valeriy Klimin Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240621-sony-aries-v2-3-dddf10722522@gmail.com Signed-off-by: Bjorn Andersson commit 5014e1e970dede6410c7b758c4f3665a0875bb7e Author: Valeriy Klimin Date: Fri Jun 21 17:26:43 2024 +0300 ARM: dts: qcom: Add Sony Xperia Z3 Compact smartphone Add the dts for the Z3 Compact. This is currently almost the same as the plain Z3 as they share almost the same hardware and nothing device-specific is currently supported. Signed-off-by: Valeriy Klimin Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240621-sony-aries-v2-2-dddf10722522@gmail.com Signed-off-by: Bjorn Andersson commit 54c799c3c4abe2c5e2c22d47dbcba5c34ec99aae Author: Alex Bee Date: Thu Jun 6 16:34:02 2024 +0200 ARM: dts: rockchip: Add SFC for RK3128 Add the Serial Flash Controller and it's pincontrols. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240606143401.32454-7-knaerzche@gmail.com [reference HCLK_SFC by its numeric id to prevent conflicts with the clock binding/controller changes] Signed-off-by: Heiko Stuebner commit 81fc54e62b5b391d78f741bf33c3a91f18464ffb Author: Krzysztof Kozlowski Date: Sun Jun 23 14:07:07 2024 +0200 ARM: dts: qcom: use generic node names for Adreno and QFPROM Use recommended generic node names for the Adreno GPU and QFPROM fused values device nodes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240623120707.45764-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit fc547ab06c87f7c4a7e2425a89759f7a9a6fd7c1 Author: Andy Shevchenko Date: Thu Jun 6 19:09:32 2024 +0300 clk: rockchip: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606161028.2986587-3-andriy.shevchenko@linux.intel.com Signed-off-by: Heiko Stuebner commit 5c0e997e57a66bd225318963193b8d006adbbb47 Author: Alex Bee Date: Thu Jun 6 16:34:01 2024 +0200 clk: rockchip: rk3128: Add HCLK_SFC The SFC IP exists only in RK3128 version of the SoC, thus the clock gets added to rk3128_clk_branches. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240606143401.32454-6-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit f9da49c3c4c43278d8d8fafb3df7f5514478eb28 Author: Alex Bee Date: Thu Jun 6 16:34:00 2024 +0200 dt-bindings: clock: rk3128: Add HCLK_SFC Add a clock id for SFC's AHB clock. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240606143401.32454-5-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit b7f5e0636f1d450c5df00fea194a8efd39f87a1b Author: Alex Bee Date: Thu Jun 6 16:33:59 2024 +0200 dt-bindings: clock: rk3128: Drop CLK_NR_CLKS CLK_NR_CLKS should not be part of the binding. Let's drop it, since the kernel code no longer uses it either. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240606143401.32454-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 041f240e4df6c49d5a928e0dd4c672d0d3326466 Author: Johan Jonker Date: Tue Jun 18 14:02:25 2024 +0200 ARM: dts: rockchip: add hdmi-sound node to rk3066a Add hdmi-sound node to rk3066a.dtsi, so that it can be reused by boards with HDMI support. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/5fe7c2fe-4a38-436a-8017-66989959329a@gmail.com Signed-off-by: Heiko Stuebner commit d244d6cc718a048672bfb148a6bc9c593a0e1207 Author: Alex Bee Date: Mon May 6 17:51:03 2024 +0200 ARM: dts: rockchip: Add spdif node for RK3128 The SoC has a S/PDIF TX controller which is fully compatible with older generation Rockchip SoCs. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240506155103.206592-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit f87427158d268fe4747cc223de7a2523617b7475 Author: Alex Bee Date: Mon May 6 17:51:02 2024 +0200 ARM: dts: rockchip: Add i2s nodes for RK3128 RK3128 SoCs have two i2s controllers. i2s_8ch has 8 tx and 2 rx channels and is internally hard-wired to the hdmi-controller respectivly the SoC's analog codec. i2s_2ch has 2 tx and 2 rx channels and can also be used externally as it's pins are exposed though pinctrl. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240506155103.206592-2-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 171ea1ff14e42041af420ed3745f6f480612baa0 Author: Alex Bee Date: Thu May 9 16:06:53 2024 +0200 ARM: dts: rockchip: Add DSI for RK3128 Add the Designware MIPI DSI controller and it's port nodes. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240509140653.168591-8-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 65896f4a3f852f868bd5bbc0abea072b2f6e0470 Author: Alex Bee Date: Thu May 9 16:06:52 2024 +0200 ARM: dts: rockchip: Add D-PHY for RK3128 The InnoSilicon D-PHY found in RK3128 SoCs supports DSI/LVDS/TTL with a maximum transfer rate of 1 Gbps per lane. While adding it, also add it's clocks to RK3128_PD_VIO powerdomain as the phy is part of it. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240509140653.168591-7-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 57c69c92fb5412a0db6f7daff6b51f67aa00bbd6 Merge: 1613e604df0cd 14a1d1dc35d34 Author: Heiko Stuebner Date: Sun Jun 23 22:03:36 2024 +0200 Merge branch 'v6.11-shared/clkids' into v6.11-armsoc/dts32 Signed-off-by: Heiko Stuebner commit 5a532459aa919d055d822d8db4ea2c5c8d511568 Author: Alan Maguire Date: Sun Jun 23 14:52:24 2024 +0100 bpf: fix build when CONFIG_DEBUG_INFO_BTF[_MODULES] is undefined Kernel test robot reports that kernel build fails with resilient split BTF changes. Examining the associated config and code we see that btf_relocate_id() is defined under CONFIG_DEBUG_INFO_BTF_MODULES. Moving it outside the #ifdef solves the issue. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406221742.d2srFLVI-lkp@intel.com/ Signed-off-by: Alan Maguire Link: https://lore.kernel.org/r/20240623135224.27981-1-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov commit e1b6a78b58aa859c66a32cfaeb121df87631d4ed Author: Yang Li Date: Fri Jun 7 17:06:56 2024 +0800 timekeeping: Add missing kernel-doc function comments Fixup the incomplete kernel-doc style comments for do_adjtimex() and hardpps() by documenting the function parameters. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240607090656.104883-1-yang.lee@linux.alibaba.com Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9301 commit c9d269469d2b9a06559cdc84d12dd3fb4d552581 Author: Antonio Borneo Date: Thu Jun 20 10:31:12 2024 +0200 irqchip/stm32mp-exti: Rename internal symbols Rename all the internal symbols accordingly to the new name of the driver. Renaming done automatically through sed rules: s/stm32_exti_set_type/stm32mp_exti_convert_type/g s/stm32_exti_h_/stm32mp_exti_/g s/stm32_exti/stm32mp_exti/g s/stm32_bank/bank/g s/stm32_/stm32mp_/g s/STM32_/STM32MP_/g s/STM32MP1_/STM32MP_/g s/stm32mp1_exti_/stm32mp_exti_/g s/stm32-exti-h/stm32mp-exti/g Manually fix some indentation after the rename. [ tglx: Mop up more coding style issues while at it ] Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-6-antonio.borneo@foss.st.com commit 350755e2e548ccbe941d045900b57233efa906cb Author: Antonio Borneo Date: Thu Jun 20 10:31:11 2024 +0200 irqchip/stm32-exti: Split MCU and MPU code Keep only the code for ARMv7m STM32 MCUs in in stm32-exti.c and split out the code for ARMv7a & ARMv8a STM32MPxxx MPUs into stm32mp-exti.c Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-5-antonio.borneo@foss.st.com commit 00f07f97276d9c4c09526798d41cb825095d2319 Author: Antonio Borneo Date: Thu Jun 20 10:31:10 2024 +0200 arm64: Kconfig: Select STM32MP_EXTI on STM32 platforms Use the new config flag to build the correct driver that will be extracted from the old code. Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-4-antonio.borneo@foss.st.com commit 721cdbd68c588a0e883d8a7658bc6a56237eaa71 Author: Antonio Borneo Date: Thu Jun 20 10:31:09 2024 +0200 ARM: stm32: Use different EXTI driver on ARMv7m and ARMv7a Build the proper driver by selecting the appropriate config flag. Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-3-antonio.borneo@foss.st.com commit b20cf2dcbe8b77afb4fcbe7af9349dfca6b7f22a Author: Antonio Borneo Date: Thu Jun 20 10:31:08 2024 +0200 irqchip/stm32-exti: Add CONFIG_STM32MP_EXTI To guarantee bisect-ability during the split of stm32-exti in MCU and MPU code, introduce CONFIG_STM32MP_EXTI. Signed-off-by: Antonio Borneo Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240620083115.204362-2-antonio.borneo@foss.st.com commit 7cc4f309c933ec5d64eea31066fe86bbf9e48819 Author: Jisheng Zhang Date: Fri Jun 14 23:34:49 2024 +0800 irqchip/dw-apb-ictl: Support building as module The driver is now always built in. In some synaptics ARM64 SoCs it is used as a second level interrupt controller hanging off the ARM GIC and is therefore loadable during boot. Enable it to be built as a module and handle built-in usage correctly, so that it continues working on systems where it is the main interrupt controller. [ tglx: Massage changelog ] Signed-off-by: Jisheng Zhang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614153449.2083-1-jszhang@kernel.org commit ef7080bd30bab81a1c4dd7c0afd942d2ab43081d Author: Jinjie Ruan Date: Mon Jun 3 12:56:52 2024 +0000 irqchip/riscv-aplic: Simplify the initialization code The initialization code has an is_of_node() check and invokes to_of_node() for every of_property_*() invocation. to_of_node() has a is_of_node() check already, so simplify the code by invoking to_of_node() and checking that for NULL. If not NULL hand in the node pointer to of_property_*(). The same applies to of_property_*() which fails when invoked with a NULL node pointer. [ tglx: Massaged change log ] Signed-off-by: Jinjie Ruan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20240603125652.791601-1-ruanjinjie@huawei.com commit 760d7e719499d64beea62bfcf53938fb233bb6e7 Author: Tianyang Zhang Date: Tue Jun 4 20:50:26 2024 +0800 Loongarch: Support loongarch avec Introduce the advanced extended interrupt controllers. This feature will allow each core to have 256 independent interrupt vectors and MSI interrupts can be independently routed to any vector on any CPU. [ tglx: Fixed up coding style. Made on/offline functions void ] Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Co-developed-by: Liupu Wang Signed-off-by: Liupu Wang Signed-off-by: Tianyang Zhang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240604125026.18745-1-zhangtianyang@loongson.cn commit 04efaebd72d1d3d9991841051fafc6b195f3676d Author: Dave Thaler Date: Sun Jun 23 08:04:53 2024 -0700 bpf, docs: Address comments from IETF Area Directors This patch does the following to address IETF feedback: * Remove mention of "program type" and reference future docs (and mention platform-specific docs exist) for helper functions and BTF. Addresses Roman Danyliw's comments based on GENART review from Ines Robles [0]. * Add reference for endianness as requested by John Scudder [1]. * Added bit numbers to top of 32-bit wide format diagrams as requested by Paul Wouters [2]. * Added more text about why BPF doesn't stand for anything, based on text from ebpf.io [3], as requested by Eric Vyncke and Gunter Van de Velde [4]. * Replaced "htobe16" (and similar) and the direction-specific description with just "be16" (and similar) and a direction-agnostic description, to match the direction-agnostic description in the Byteswap Instructions section. Based on feedback from Eric Vyncke [5]. [0] https://mailarchive.ietf.org/arch/msg/bpf/DvDgDWOiwk05OyNlWlAmELZFPlM/ [1] https://mailarchive.ietf.org/arch/msg/bpf/eKNXpU4jCLjsbZDSw8LjI29M3tM/ [2] https://mailarchive.ietf.org/arch/msg/bpf/hGk8HkYxeZTpdu9qW_MvbGKj7WU/ [3] https://ebpf.io/what-is-ebpf/#what-do-ebpf-and-bpf-stand-for [4] https://mailarchive.ietf.org/arch/msg/bpf/i93lzdN3ewnzzS_JMbinCIYxAIU/ [5] https://mailarchive.ietf.org/arch/msg/bpf/KBWXbMeDcSrq4vsKR_KkBbV6hI4/ Acked-by: David Vernet Signed-off-by: Dave Thaler Link: https://lore.kernel.org/r/20240623150453.10613-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit 986b6ad0c4c653940fab7e5decf0d847670bf407 Author: Pali Rohár Date: Fri Jun 21 11:38:31 2024 +0200 irqchip/armada-370-xp: Add support for 32 MSI interrupts on non-IPI platforms The doorbell interrupts have the following layout on IPI vs no-IPI platforms: | 0...7 | 8...15 | 16...31 | ------------------+---------+----------+---------------------+ IPI platform | IPI | n/a | MSI | ------------------+---------+----------+---------------------+ non-IPI platform | MSI | ------------------+------------------------------------------+ Currently the driver only allows for the upper 16...31 interrupts for MSI domain (i.e. the MSI domain has only 16 interrupts). On platforms where IPI is not available, we can use whole 32 MSI interrupts. Implement support also for the lower 16 MSI interrupts on non-IPI platforms. [ Marek: refactored, changed commit message ] Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn commit 9d80f6bd3ad8f2b49651d4685bb391399ecf80a2 Author: Pali Rohár Date: Fri Jun 21 11:38:30 2024 +0200 irqchip/armada-370-xp: Do not touch IPI registers on platforms without IPI On platforms where IPI is not available in the MPIC, the IPI registers instead represent an additional set of MSI interrupt registers (currently unused by the driver). Do not touch these registers on platforms where IPI is not available in the MPIC. [ Marek: refactored, changed commit message ] Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn commit de796fc184179de86fb87f94178459b5b20b1b1b Author: Pali Rohár Date: Fri Jun 21 11:38:29 2024 +0200 irqchip/armada-370-xp: Only call ipi_resume() if IPI is available IPI is available only on systems where the mpic controller does not have a parent interrupt defined (e.g. on Armada XP). If a parent interrupt is defined, inter-processor interrupts are handled by an interrupt controller higher in the hierarchy (most probably a parent GIC). Only call ipi_resume() on systems where IPI is available in the mpic controller. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn [ refactored a little and changed commit message ] commit 3cef738208e5c3cb7084e208caf9bbf684f24feb Author: Pali Rohár Date: Fri Jun 21 11:38:28 2024 +0200 irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 IRQs 0 (IPI) and 1 (MSI) are handled internally by this driver, generic_handle_domain_irq() is never called for these IRQs. Disallow mapping these IRQs. [ Marek: changed commit message ] Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn commit 50c43447f71c6d0eb9e320c4cc69822d396e52bc Author: Marek Behún Date: Thu Jun 20 11:52:33 2024 +0200 irqchip/armada-370-xp: Use atomic_io_modify() instead of another spinlock Use the dedicated atomic_io_modify() instead of a open coded spin_lock() + readl() + writel() + spin_unlock() sequence. This allows to drop the irq_controller_lock spinlock from the driver. Signed-off-by: Marek Behún Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn commit b1c387506d2738b655f0806d3ee3e6fc94ecb910 Author: Jeff Johnson Date: Sat Jun 8 09:14:37 2024 -0700 irqchip: Add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/irqchip/irq-ts4800.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/irqchip/irq-meson-gpio.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes a 3rd file, irq-mvebu-pic.c, which did not produce a warning with the x86 allmodconfig, but which may cause this warning with other kernel configurations. Signed-off-by: Jeff Johnson Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240608-md-drivers-irqchip-v1-1-dd02c3229277@quicinc.com commit 492eee82574b163fbb3f099c74ce3b4322d0af28 Author: Lad Prabhakar Date: Thu Jun 6 20:48:13 2024 +0100 irqchip/renesas-rzg2l: Reorder function calls in rzg2l_irqc_irq_disable() The order of function calls in the disable operation should be the reverse of that in the enable operation. Thus, reorder the function calls to first disable the parent IRQ chip before disabling the TINT IRQ. Reported-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Signed-off-by: Thomas Gleixner Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240606194813.676823-1-prabhakar.mahadev-lad.rj@bp.renesas.com commit 6dca724d61a1d10f772dcd06948c30ceca027069 Author: Anna-Maria Behnsen Date: Fri Jun 14 12:23:40 2024 +0200 irqdomain: Fix formatting irq_find_matching_fwspec() kerneldoc comment Modify the comment formatting in irq_find_matching_fwspec function to enhance code readability and maintain consistency. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614102403.13610-2-shivamurthy.shastri@linutronix.de commit 12c94f694e53b1bf105c56af4b800a32f1b0b10a Author: Anna-Maria Behnsen Date: Fri Jun 14 12:23:41 2024 +0200 irqchip/imx-mu-msi: Fix codingstyle in imx_mu_msi_domains_init() Fixes the coding style of irq_domain_create_linear() call within imx_mu_msi_domains_init() for better code readability. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614102403.13610-3-shivamurthy.shastri@linutronix.de commit bc9ec165d066af29661ece91f9cbf74e18ec0a5a Author: Krzysztof Kozlowski Date: Sat May 18 22:44:43 2024 +0200 arm64: dts: hisilicon: hi3660: add dedicated hi3660-usb3-otg-bc compatible Each syscon node must come with a dedicated/specific compatible, which is also reported by dtbs_check: hi3660-hikey960.dtb: usb3_otg_bc@ff200000: compatible: ['syscon', 'simple-mfd'] is too short Link: https://lore.kernel.org/r/20240518204443.122586-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 7613195d37d69ff92c9bc55599037615212ce19c Author: Krzysztof Kozlowski Date: Sat May 18 22:44:42 2024 +0200 dt-bindings: soc: hisilicon: document hi3660-usb3-otg-bc Add dedicated bindings for the Hisilicon Kirin 960 USB OTG Syscon, to fully document the block and also fix dtbs_check warning: hi3660-hikey960.dtb: usb3_otg_bc@ff200000: compatible: ['syscon', 'simple-mfd'] is too short Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240518204443.122586-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 11afaf16a6540754d618179bd01791fc03480146 Author: Rob Herring (Arm) Date: Fri May 31 14:31:14 2024 -0500 arm: dts: aspeed: Use standard 'i2c' bus node name The standard node name for I2C buses is 'i2c'. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240531193115.3814887-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit f873f24375c6d46bea92a2ed8ffe55b2f9d5509c Author: Rob Herring (Arm) Date: Fri May 31 14:31:04 2024 -0500 arm: dts: nuvoton: Use standard 'i2c' bus node name The standard node name for I2C buses is 'i2c'. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240531193104.3814663-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 17436001a6bc42c7f55dc547ca5b1a873208d91d Merge: 5d0c35feea339 d4a0055fdc223 Author: Mark Brown Date: Sun Jun 23 13:14:18 2024 +0100 spi: add devm_spi_optimize_message() helper Merge series from David Lechner : In the IIO subsystem, we are finding that it is common to call spi_optimize_message() during driver probe since the SPI message doesn't change for the lifetime of the driver. This patch adds a devm_spi_optimize_message() helper to simplify this common pattern. commit 2604faa7b71291b0ccd17f8d6009f3ff6dae287b Merge: eed139331bbad 93f12a7568269 Author: Mark Brown Date: Sun Jun 23 13:13:14 2024 +0100 ASoC: nau8822: add MCLK support Merge series from Andrejs Cainikovs : This change adds local MCLK handling, which would cover a case when a reference audio clock is present in a system, but is not allowed to be changed, see [1]. [1]: https://lore.kernel.org/all/ZfBdxrzX3EnPuGOn@ediswmail9.ad.cirrus.com/ commit eed139331bbad92fcd4f8377e8da1065130bfa58 Merge: 86a37eb60ba1f 24790a3cd1bdc Author: Mark Brown Date: Sun Jun 23 13:13:07 2024 +0100 ASoC: qcom: display port changes Merge series from srinivas.kandagatla@linaro.org: This patchset adds support for. 1. parse Display Port module tokens from ASoC topology 2. add support to DP/HDMI Jack events. 3. fixes a typo in function name in sm8250 Verified these patches on X13s along with changes to tplg in https://git.codelinaro.org/linaro/qcomlt/audioreach-topology/-/tree/topic/x13s-dp?ref_type=heads and ucm changes from https://github.com/Srinivas-Kandagatla/alsa-ucm-conf/tree/topic/x13s-dp x1e80100 is verified by Krzysztof with his changes in tplg https://git.codelinaro.org/linaro/qcomlt/audioreach-topology/-/merge_requests/7/commits commit 86a37eb60ba1f17cae8ac006d0de1a6091e5ba31 Merge: d6bb39fe4fa07 de267e7a6ea8e Author: Mark Brown Date: Sun Jun 23 13:13:00 2024 +0100 ASoC: Few constifications (mostly arguments) Merge series from Krzysztof Kozlowski : Make few pointers in ASoC functions as pointers to const, so the code is clearer to read, a bit safer and allows further constifications (e.g. placing some data as rodata). commit d6bb39fe4fa077883a409f6eaca569ce61a28a94 Merge: d332008962dc6 6469267afed4f Author: Mark Brown Date: Sun Jun 23 13:12:52 2024 +0100 ASoC: Add ak4619 codec support Merge series from Kuninori Morimoto : This is v3 patch-set for ak4619 driver. It was created by Khanh, and I updated/adjusted to upstream. It was tested on Renesas V4M GrayH Link: https://lore.kernel.org/r/877ceotnrg.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87frtb3x4k.wl-kuninori.morimoto.gx@renesas.com commit d332008962dc63b3225d86424661fd290a6519c9 Merge: f57d7f5289256 9427997a5e133 Author: Mark Brown Date: Sun Jun 23 13:12:45 2024 +0100 ASoC: add compatible for ti,pcm5242 Merge series from Christian Hewitt : Update bindings and add a driver compatible for the pcm5242 chip used on the Odroid HiFi-Shield2 i2c mezzanine board. commit f57d7f5289256373d9eb18f7f8e329b45a31ff96 Merge: 8ae105bec7022 34935cd4721f0 Author: Mark Brown Date: Sun Jun 23 13:12:38 2024 +0100 ASoC: codecs: wcd family: cleanups Merge series from Krzysztof Kozlowski : Set of simple cleanups from similar issues in all Qualcomm WCD93xx codecs. The first patch "ASoC: codecs: wcd-mbhc: Constify passed MBHC reg fields" is a requirement for few others, but except this they are independent. commit 8ae105bec702292046602df1edbad0eb3e2ce8be Merge: b493c97d088af 534a0e5e737f8 Author: Mark Brown Date: Sun Jun 23 13:12:31 2024 +0100 ASoC: dt-bindings: convert everest,es7134.txt & Merge series from Neil Armstrong : Convert the text bindings of the Everest ES7241/ES7134/7144/7154 2 channels I2S analog to digital converter to dt-schema. commit b493c97d088afa61245aa06a02f0b87369806062 Merge: f6272b59e8b86 6c01001414ce4 Author: Mark Brown Date: Sun Jun 23 13:12:24 2024 +0100 tlv320adc3xxx: Allow MICBIAS pins to be used as Merge series from Ricard Wanderlof : In some cases, depending on system design, the MICBIAS pins on the chip are not needed as such, but a couple of extra GPIO pins would be useful. This patch allows the MICBIAS pins to be configured in the device tree as general purpose output pins, controlled via the GPIO framework. Owing to their originally intended purpose there are some limitations: when the MICBIAS pins are deactivated, they will float, so will likely need a pulldown in many applications. When activated, they will assume the voltage specified by the micbias1-vg and micbias2-vg properties, respectively, meaning that the resulting output voltage will be 2.0 V, 2.5 V or AVDD . commit f6272b59e8b86efb1c18ea1d467471b1dd974561 Merge: 3722873d49a17 2884c29152c09 Author: Mark Brown Date: Sun Jun 23 13:12:16 2024 +0100 Cirrus Logic Family of ADCs Merge series from Paul Handrigan : This patchset provides ASoC support for the latest family of Cirrus Logic multichannel, high performance audio ADCs. The devices that are supported are CS5302 (2 channel ADC), CS5304 (4 channel ADC), and CS5308 (8 channel ADC). commit 84562f9953ec5f91a4922baa2bd4f2d4f64fac31 Merge: 185d72112b951 fff5cca345a66 Author: David S. Miller Date: Sun Jun 23 12:50:19 2024 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: prepare representor for SF support Michal Swiatkowski says: This is a series to prepare port representor for supporting also subfunctions. We need correct devlink locking and the possibility to update parent VSI after port representor is created. Refactor how devlink lock is taken to suite the subfunction use case. VSI configuration needs to be done after port representor is created. Port representor needs only allocated VSI. It doesn't need to be configured before. VSI needs to be reconfigured when update function is called. The code for this patchset was split from (too big) patchset [1]. [1] https://lore.kernel.org/netdev/20240213072724.77275-1-michal.swiatkowski@linux.intel.com/ --- Originally from https://lore.kernel.org/netdev/20240605-next-2024-06-03-intel-next-batch-v2-0-39c23963fa78@intel.com/ Changes: - delete ice_repr_get_by_vsi() from header - rephrase commit message in moving devlink locking ==================== Signed-off-by: David S. Miller commit 3974eeb925657091884a2a44f8b71ab56befdce7 Author: Krzysztof Kozlowski Date: Wed Jun 12 16:10:18 2024 +0200 MAINTAINERS: ARM: alphascale: add Krzysztof Kozlowski as maintainer Apparently there was never a maintainers entry for the ARM Alphascale ASM9260 SoC, thus patches end up nowhere. Add such entry, because even if platform is orphaned and on its way out of the kernel, it is nice to take patches if someone sends something. I do not plan to actively support/maintain ARM Alphascale but I can take odd fixes now and then. Cc: Oleksij Rempel Link: https://lore.kernel.org/r/20240612141018.7348-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c322d10fe52138b2d47e3b8dd65c20d705e1c313 Author: Andrew Davis Date: Wed Jun 12 10:13:14 2024 -0500 ARM: dts: nspire: Add full compatible for watchdog node The watchdog appears to be an ARM SP805, add the full compatible and the needed clocks properties. Leave this disabled for now as functionality is not fully tested. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240612151314.27967-2-afd@ti.com Signed-off-by: Krzysztof Kozlowski commit af88df12762dab540d02c13324a0767473322f1e Author: Andrew Davis Date: Wed Jun 12 10:13:13 2024 -0500 ARM: dts: nspire: Add unit name addresses to memory nodes Fixes the following DTB check warning: > node has a reg or ranges property, but no unit name Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240612151314.27967-1-afd@ti.com Signed-off-by: Krzysztof Kozlowski commit 997148228410f8e2fda78b848ae16fdc525158e9 Author: Krzysztof Kozlowski Date: Wed Jun 12 16:17:40 2024 +0200 MAINTAINERS: ARM: nspire: add Krzysztof Kozlowski as maintainer Apparently there was never a maintainers entry for the ARM Texas Instruments Nspire SoC, thus patches end up nowhere. Add such entry, because even if platform is orphaned and on its way out of the kernel, it is nice to take patches if someone sends something. I do not plan to actively support/maintain Nspire platform but I can take odd fixes now and then. Cc: Daniel Tang Cc: Andrew Davis Acked-by: Andrew Davis Link: https://lore.kernel.org/r/20240612141740.8470-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 084e77a12c3a1c255ea0e944e9d77d21c9d2247d Author: Krzysztof Kozlowski Date: Thu Jun 13 08:46:12 2024 +0200 MAINTAINERS: ARM: vt8500: add Alexey and Krzysztof as maintainers The ARM VIA/WonderMedia VT8500 platform became orphaned in commit 8f1b7ba55c61 ("MAINTAINERS: ARM/VT8500, remove defunct e-mail") and clearly it is on the way out of the kernel. However few folks send patches to it and it is nice to actually take them, till the platform is in the kernel. Alexey Charkov still has VT8500 hardware and plans to work on upstream, so add Alexey as the maintainer. Krzysztof will collect patches. Extend the maintainer entry to cover also VT8500 DTS. Cc: Alexey Charkov Acked-by: Alexey Charkov Link: https://lore.kernel.org/r/20240613064612.8589-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 296c0bb50e31f9077c391e57bf43f3e23a73835e Author: Krzysztof Kozlowski Date: Thu Jun 13 15:49:10 2024 +0200 MAINTAINERS: ARM: axm: add Krzysztof Kozlowski as maintainer There is no maintainers entry for the ARM LSI AXM SoC, thus patches end up nowhere. Add such entry, because even if platform is orphaned and on its way out of the kernel, it is nice to take patches if someone sends something. I do not plan to actively support/maintain AXM but I can take odd fixes now and then. Link: https://lore.kernel.org/r/20240613134910.7862-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4c54173d5965937b9e8280b7ec900fdec65d0c36 Author: Krzysztof Kozlowski Date: Thu Jun 13 15:59:56 2024 +0200 MAINTAINERS: ARM: moxa: add Krzysztof Kozlowski as maintainer There is no maintainers entry for the ARM MOXA ART SoC, thus patches end up nowhere. Add such entry, because even if platform is orphaned and on its way out of the kernel, it is nice to take patches if someone sends something. I do not plan to actively support/maintain MOXA but I can take odd fixes now and then. Cc: Jonas Jensen Link: https://lore.kernel.org/r/20240613135956.8899-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 420c324d59534a660f4d63fca1d6a02993c0c118 Author: Jai Arora Date: Tue Jun 18 16:32:26 2024 +0530 EDAC/dmc520: Use devm_platform_ioremap_resource() platform_get_resource() and devm_ioremap_resource() are wrapped up in the devm_platform_ioremap_resource() helper. Use the helper and get rid of the local variable for struct resource *. Signed-off-by: Jai Arora Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240618110226.97395-1-jai.arora@samsung.com commit 9dec27bb8ae4e0792c3a4cb8504bce8931676fb1 Author: Didi Freiman Date: Tue May 7 13:47:12 2024 +0300 accel/habanalabs: gradual sleep in polling memory macro It’s better to avoid long sleeps right from the beginning of the polling since the data may be available much sooner than the sleep period. Because polling host memory is inexpensive, this change gradually increases the sleep time up to the user-requested period. Signed-off-by: Didi Freiman Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 0199e6392e067299ece25863abd7453e4823f13b Author: Tomer Tayar Date: Mon May 13 14:40:35 2024 +0300 accel/habanalabs: move heartbeat work initialization to early init The device heartbeat work is currently initialized at device_heartbeat_schedule() which is called at the end of hl_device_init(). However hl_device_init() can fail at a previous step, and in such a case, a subsequent call to hl_device_fini() will lead to calling cleanup_resources() and accessing this work uninitialized. As there is no real need to re-initialize this work every time it is rescheduled, move this initialization to device_early_init() to be done once and early enough. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 5cb97d74c3c7ad93750fc3f11875159500380d1c Author: Tomer Tayar Date: Wed May 1 15:10:59 2024 +0300 accel/habanalabs: print timestamp of last PQ heartbeat on EQ heartbeat failure The test packet which is sent to FW for the PQ heartbeat is used also as the trigger in FW to send the EQ heartbeat event. Add the time of the last sent packet to the debug info which is printed upon a EQ heartbeat failure. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit c4548eee537ed7671170eb370c6c8db12dcfd3e8 Author: Tomer Tayar Date: Tue Apr 16 19:01:42 2024 +0300 accel/habanalabs: dump the EQ entries headers on EQ heartbeat failure Add a dump of the EQ entries headers upon a EQ heartbeat failure. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 795f93e650fc41c3f627d2733458c2f911bc9568 Author: Tomer Tayar Date: Tue Apr 16 17:01:12 2024 +0300 accel/habanalabs: revise print on EQ heartbeat failure Don't print the "previous EQ index" value in case of a EQ heartbeat failure, because it is incremented along with the EQ CI and therefore redundant. In addition, as the CPU-CP PI is zeroed when it reaches a value that is twice the queue size, add a value of the CI with a similar wrap around, to make it easier to compare the values. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 9ee446f9b5d0172a94681aae01fabde4891f7123 Author: Farah Kassabri Date: Tue Apr 9 14:46:19 2024 +0300 accel/habanalabs: add more info upon cpu pkt timeout In order to have better debuggability upon encountering FW issues, We are adding additional info once CPU packet timeout expires. Signed-off-by: Farah Kassabri Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit fda92282b09ed6dc85af22ab4195aec791cdde2f Author: Ilia Levi Date: Thu Apr 4 13:50:47 2024 +0300 accel/habanalabs: additional print in device-in-use info When device release triggers a hard reset, there is a printout of the cause. Currently listed causes (that increment context refcount) are active command submissions and exported DMA buffer objects. In any other case, the printout emits "unknown reason". We identify and print another reason - allocated command buffers. Signed-off-by: Ilia Levi Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit c0af30697c4321f482bef527ad6ba20d79e3aa89 Author: Oded Gabbay Date: Wed May 15 19:22:21 2024 +0300 MAINTAINERS: Change habanalabs maintainer and git repo path Because I left habana, Ofir Bitton is now the habanalabs driver maintainer. The git repo also changed location to the Habana GitHub website. Signed-off-by: Oded Gabbay Acked-by: Daniel Vetter Signed-off-by: Ofir Bitton commit f8422017b2e9331876efcfa07bb7579d5bc3e671 Author: Ofir Bitton Date: Sun Mar 31 15:37:32 2024 +0300 accel/habanalbs/gaudi2: reduce interrupt count to 128 Some systems allow a maximum number of 128 MSI-X interrupts. Hence we reduce the interrupt count to 128 instead of 512. Reviewed-by: Tomer Tayar Signed-off-by: Ofir Bitton commit 61f4f624eaaeefcdcbef368b31960b0336e014fb Author: Tal Cohen Date: Wed Apr 3 13:09:42 2024 +0300 accel/habanalabs: disable EQ interrupt after disabling pci When sending disable pci msg towards firmware, there is a possibility that an EQ packet is already pending, disabling EQ interrupt will prevent this from happening. The interrupt will be re-enabled after reset. Signed-off-by: Tal Cohen Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 52fbab90edb7cd29490422f2073e0f8a560eb150 Author: Farah Kassabri Date: Thu Apr 4 11:06:03 2024 +0300 accel/habanalabs: change the heartbeat scheduling point Currently we schedule the heartbeat thread at late init, only then we set the INTS_REGISTER packet which enables events to be received from firmware. Init may take some time and we want to give firmware 2 full cycles of heartbeat thread after it received INTS_REGISTER. The patch will move the heartbeat thread scheduling to be after driver is done with all initializations. Signed-off-by: Farah Kassabri Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 3309887c6ff8ca2ac05a74e1ee5d1c44829f63f2 Author: Rakesh Ughreja Date: Tue Mar 26 08:01:02 2024 +0200 accel/habanalabs/gaudi2: unsecure edma max outstanding register Netowrk EDMAs uses more outstanding transfers so this needs to be programmed by EDMA firmware. Signed-off-by: Rakesh Ughreja Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 2214cafd10f7ed9837eecdc1dec270dd6d359b85 Author: Ofir Bitton Date: Wed Mar 20 16:02:48 2024 +0200 accel/habanalabs: remove timestamp registration debug prints There are several timestamp registration debug prints which spams the kernel log whenever dyn debug is enabled. Remove those prints. Reviewed-by: Tomer Tayar Signed-off-by: Ofir Bitton commit cebb64f9335b073cc2877fed16c613c56bed82bc Author: Vitaly Margolin Date: Mon May 27 17:25:37 2024 +0300 accel/habanalabs: add cpld ts cpld_timestamp cpucp Add cpld_timestamp field to cpucp_info structure and return cpld timestamp as part of cpld version Signed-off-by: Vitaly Margolin Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 3d613b0cb5ef349ce93ae7e28f74ef8a75dc10ac Author: Tomer Tayar Date: Tue Mar 12 16:48:42 2024 +0200 accel/habanalabs: add a common handler for clock change events As the new dynamic EQ includes clock change events which are common and not ASIC-specific, add a common handler for these events. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 340dd775d7fde09e5784fe411cd87d5b398785ae Author: Tomer Tayar Date: Wed Feb 28 20:40:00 2024 +0200 accel/habanalabs: use device-name directory in debugfs-driver-habanalabs The device debugfs directory was modified to be named as the parent device name. Update the description of 'mmu' and 'mmu_error' to use the new path. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit cbac6f4088db9e697dee4a9456fd7ff5fbeaacb9 Author: Farah Kassabri Date: Thu Mar 14 12:36:04 2024 +0200 accel/habanalabs/gaudi2: add GAUDI2D revision support Gaudi2 with PCI revision ID with the value of '4' represents Gaudi2D device and should be detected and initialized as Gaudi2. Signed-off-by: Farah Kassabri Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 93a296dde180c65dd1a724d2b52526c352c0b315 Author: Tomer Tayar Date: Tue Mar 12 16:55:08 2024 +0200 accel/habanalabs: move hl_eq_heartbeat_event_handle() to common code hl_eq_heartbeat_event_handle() doesn't have ASIC specific code, and therefore can be moved from Gaudi2-only code to common code, and possibly used for other ASICs. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 5f6ad3c64ad14fd1c86999a462f98da04f49d068 Author: Tomer Tayar Date: Wed Mar 13 11:45:45 2024 +0200 accel/habanalabs: add an EQ size ASIC property Future supported ASICs might use the dynamic EQ mechanism with the firmware, and in that case the EQ size won't be equal to the default HL_EQ_SIZE_IN_BYTES value. Add an ASIC property to enable overriding this value. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit c2a27584ff3b7f17da3ed2abfa3956f9d376e3da Author: Dani Liberman Date: Mon Mar 11 18:31:10 2024 +0200 accel/habanalabs: separate nonce from max_size in cpucp_packet struct In struct cpucp_packet both nonce and data_max_size members are in an union overlapping each other. This is a problem as they both are used in attestation and info_signed packets. The solution here is to move the nonce member to a different union under the same structure. Signed-off-by: Dani Liberman Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit c8c10dcacafce3b6fb0238479b5e28e92b0366da Author: Tomer Tayar Date: Sun Mar 10 12:18:35 2024 +0200 accel/habanalabs/gaudi2: assume hard-reset by FW upon MC SEI severe error FW initiates a hard reset upon an MC SEI severe error. Align the driver to expect this reset and avoid accessing the device until the reset is done. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit c754bcf9dd06e9b532633ede41e7c5146d132249 Author: Tomer Tayar Date: Sun Mar 10 12:03:22 2024 +0200 accel/habanalabs/gaudi2: revise return value handling in gaudi2_hbm_sei_handle_read_err() The return value in gaudi2_hbm_sei_handle_read_err() is boolean and not a bitmask, so there is need for "|= true". In addition, rename the 'rc' variable, as no "return code" is returned here but an indication if a hard reset is required. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 990e0d91bf7d2e6dbacfa8af9048b9c4cedaa0f5 Author: Ariel Suller Date: Wed Mar 6 11:04:01 2024 +0200 accel/habanalabs/gaudi2: align interrupt names to table when reporting tpc events, the dcore and tpc in dcore should be reported and propagated, and not the generatl tpc number Signed-off-by: Ariel Suller Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit b94488be083090b0933c2092aa6bb6956f476b3a Author: Farah Kassabri Date: Sun Mar 3 18:06:11 2024 +0200 accel/habanalabs: check for errors after preboot is ready Driver should check and report any fatal errors detected by preboot, before it attempts to load the boot fit. Some errors may cause the driver to stop the boot process and mark the device as unusable. This check will allow the driver to fail and print the error reported by preboot and skip the time wasting attempt of trying to load the boot fit, which will fail due to the error. Signed-off-by: Farah Kassabri Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 25abbe7ac1d96775a692a85d4272490b09af5fa4 Author: Igal Zeltser Date: Sun Mar 3 16:32:08 2024 +0200 accel/habanalabs: use msg_header instead of desc_header Struct comms_desc_header is deprecated and replaced by struct comms_msg_header. As a preparation for removing comms_desc_header from FW, all it's usage in code is replaced by comms_msg_header. Signed-off-by: Igal Zeltser Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 31bd26931d036593531dbc9b5dd0669fe9d53155 Author: Farah Kassabri Date: Wed Feb 21 11:47:12 2024 +0200 accel/habanalabs: add heartbeat debug info It is hard to debug the reason for heartbeat check failures. As an attempt to ease this task, this patch will provide more information when this failure happens. Heartbeat checks the communication with FW, so printing the CPU queue pi/ci and the counter of how many times that event was received would help in debugging the issue. Signed-off-by: Farah Kassabri Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 42f04ca65c7294ce7c641d2195086f2c99323320 Author: Ohad Sharabi Date: Sun Feb 25 11:07:58 2024 +0200 accel/habanalabs: add device name to invalidation failure msg This addition helps log parsers better define the error without the need to go back and search the device name on former log lines. Signed-off-by: Ohad Sharabi Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 26250af92fb8bae06d9d7c0e7275e018232b47fd Author: Tal Risin Date: Mon Feb 26 11:56:35 2024 +0200 accel/habanalabs: expose server type in debugfs Exposing server type through debugfs to enable easier access via scripts. Signed-off-by: Tal Risin Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 3d4bd5e292b57d219ee6fd798f6f207b6742e70c Author: Tomer Tayar Date: Sun Feb 25 13:54:14 2024 +0200 accel/habanalabs: use parent device for trace events Trace events might still be recorded after the accel device is released, while the device name is no longer available. Modify the trace functions to use the parent device instead, which is available at that point and still informative as the device name. Signed-off-by: Tomer Tayar Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit ecda35d461f491f7aa2a0f2060a2c36a5950c3b7 Author: Ohad Sharabi Date: Sun Feb 18 11:54:29 2024 +0200 accel/habanalabs: no CPUCP prints on heartbeat failure If we detected heartbet event while some daemon in the background send (via driver interface) CPUCP messages the dmesg will be flooded. Instead, a slight refactor in hl_fw_send_cpu_message() returns -EAGAIN when CPU is disabled (i.e. heartbeat failure) and only then. Later, all calling functions that may be invoked by user space can issue prints only if the error code is not -EAGAIN. Signed-off-by: Ohad Sharabi Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 467cfe945656df044c8cf9121e5cdbe5b977b497 Author: Ofir Bitton Date: Mon Feb 19 13:43:55 2024 +0200 accel/habanalabs/gaudi2: align embedded specs headers Align embedded headers to latest release. Reviewed-by: Tomer Tayar Signed-off-by: Ofir Bitton commit 705e520dc58d0c9b48e8569ef95e0f96fba3d106 Author: Ohad Sharabi Date: Sun Feb 18 09:38:23 2024 +0200 accel/habanalabs: restructure function that checks heartbeat received The function returned an error code which isn't propagated up the stack (nor is it printed). The return value is only checked for =0 or !=0 which implies bool return value. The function signature is updated accordingly, renamed, and slightly refactored. Signed-off-by: Ohad Sharabi Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 5a558f369ef89c6fd8170ee1137274fcc08517ae Author: Farah Kassabri Date: Sun Feb 18 13:04:31 2024 +0200 accel/habanalabs/gaudi2: update interrupts related headers Align the interrupts related headers to latest release. Signed-off-by: Farah Kassabri Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 241fa91e7c0257351cbbd2d4d01f1372962b1f2d Author: Dani Liberman Date: Thu Feb 15 15:04:40 2024 +0200 accel/habanalabs: add device name to error print The extra info will help in better traceability and debug. Signed-off-by: Dani Liberman Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 892bc64827ddc021be9e9a402b96c6cc7eed89c6 Author: Ohad Sharabi Date: Wed Jan 10 14:27:44 2024 +0200 accel/habanalabs/gaudi2: use single function to compare FW versions Currently, the code contains 2 types of FW version comparison functions: - hl_is_fw_sw_ver_[below/equal_or_greater]() - gaudi2 specific function of the type gaudi2_is_fw_ver_[below/above]x_y_z() Moreover, some functions use the inner FW version which shuold be only stage during development but not version dependencies. Finally, some tests are done to deprecated FW version to which LKD should hold no compatibility. This commit aligns all APIs to a single function that just compares the version and return an integers indicator (similar in some way to strcmp()). In addition, this generic function now considers also the sub-minor FW version and also remove dead code resulting in deprecated FW versions compatibility. Signed-off-by: Ohad Sharabi Reviewed-by: Ofir Bitton Signed-off-by: Ofir Bitton commit 3d68e3dedd4b48f0358bdc187277e3315d8aa559 Author: Abhinav Kumar Date: Thu Jun 20 13:17:30 2024 -0700 drm/msm/dpu: drop validity checks for clear_pending_flush() ctl op clear_pending_flush() ctl op is always assigned irrespective of the DPU hardware revision. Hence there is no needed to check whether the op has been assigned before calling it. Drop the checks across the driver for clear_pending_flush() and also update its documentation that it is always expected to be assigned. changes in v2: - instead of adding more validity checks just drop the one for clear_pending_flush - update the documentation for clear_pending_flush() ctl op - update the commit text reflecting these changes changes in v3: - simplify the documentation of clear_pending_flush Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/464fbd84-0d1c-43c3-a40b-31656ac06456@moroto.mountain/T/ Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/600241/ Link: https://lore.kernel.org/r/20240620201731.3694593-1-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 0f478688128154a6c703415fe538b5e0aadbd057 Author: Danila Tikhonov Date: Sat Jun 15 00:58:55 2024 +0300 drm/msm: mdss: Add SM7150 support Add support for MDSS on SM7150. Signed-off-by: Danila Tikhonov Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/599133/ Link: https://lore.kernel.org/r/20240614215855.82093-5-danila@jiaxyga.com Signed-off-by: Dmitry Baryshkov commit 726eded12dd72a7a823b7ff690c8e67abf78051f Author: Danila Tikhonov Date: Sat Jun 15 00:58:54 2024 +0300 dt-bindings: display/msm: Add SM7150 MDSS Document the MDSS hardware found on the Qualcomm SM7150 platform. Signed-off-by: Danila Tikhonov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/599132/ Link: https://lore.kernel.org/r/20240614215855.82093-4-danila@jiaxyga.com Signed-off-by: Dmitry Baryshkov commit 75079df919efcc30eb5bf0427c83fb578f4fe4fc Author: Danila Tikhonov Date: Sat Jun 15 00:58:53 2024 +0300 drm/msm/dpu: Add SM7150 support Add definitions for the display hardware used on the Qualcomm SM7150 platform. Signed-off-by: Danila Tikhonov Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/599129/ Link: https://lore.kernel.org/r/20240614215855.82093-3-danila@jiaxyga.com Signed-off-by: Dmitry Baryshkov commit 64e2f4cb27e78e108f141f44585bb703ea2bfd9c Author: Danila Tikhonov Date: Sat Jun 15 00:58:52 2024 +0300 dt-bindings: display/msm: Add SM7150 DPU Document the DPU hardware found on the Qualcomm SM7150 platform. Signed-off-by: Danila Tikhonov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/599127/ Link: https://lore.kernel.org/r/20240614215855.82093-2-danila@jiaxyga.com Signed-off-by: Dmitry Baryshkov commit 85f86c5ede7697162c54744258908e657e456f57 Author: Jeff Johnson Date: Sat Jun 1 23:18:16 2024 +0100 cdrom: Add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cdrom/cdrom.o Add the missing MODULE_DESCRIPTION() macro invocation. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/lkml/20240530-cdrom-v1-1-51579c5c240a@quicinc.com Reviewed-by: Phillip Potter Link: https://lore.kernel.org/lkml/ZluYQbvrJkRlhnJC@KernelVM Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20240601221816.136977-2-phil@philpotter.co.uk Signed-off-by: Jens Axboe commit 5a31243aa2ce9b2a533a0b510a08989974313ab1 Merge: 48c1a30bf1601 6ba59ff422792 Author: Mark Brown Date: Sun Jun 23 01:16:30 2024 +0100 regmap: Merge up v6.10-rc4 There are fixes for kselftest build with clang which really help my CI. commit 7bbb71150e57875126efacc2efdc678e3cede919 Merge: ffe4b381e2ea9 6ba59ff422792 Author: Mark Brown Date: Sun Jun 23 00:03:15 2024 +0100 regulator: Merge up v6.10-rc4 There are fixes for kselftest with clang that really help my CI. commit 294b3810059588aa9459b9125a6b080c76cd19b3 Author: Jonathan Marek Date: Thu May 30 13:56:50 2024 +0800 drm/msm/dsi: add a comment to explain pkt_per_line encoding Make it clear why the pkt_per_line value is being "divided by 2". Signed-off-by: Jonathan Marek Reviewed-by: Dmitry Baryshkov Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/596236/ Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-6-2ab1d334c657@linaro.org Signed-off-by: Dmitry Baryshkov commit 9ecd0ddd223b68b4603e4766a1d51f6c6cda346e Author: Jonathan Marek Date: Thu May 30 13:56:49 2024 +0800 drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC Video mode DSC won't work if this field is not set correctly. Set it to fix video mode DSC (for slice_per_pkt==1 cases at least). Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jonathan Marek Reviewed-by: Dmitry Baryshkov Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/596234/ Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-5-2ab1d334c657@linaro.org Signed-off-by: Dmitry Baryshkov commit 007870b8eaf54739c7b417ddaf90bf364b7e4bc8 Author: Jonathan Marek Date: Thu May 30 13:56:48 2024 +0800 drm/msm/dsi: set video mode widebus enable bit when widebus is enabled The value returned by msm_dsi_wide_bus_enabled() doesn't match what the driver is doing in video mode. Fix that by actually enabling widebus for video mode. Fixes: efcbd6f9cdeb ("drm/msm/dsi: Enable widebus for DSI") Signed-off-by: Jonathan Marek Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Reviewed-by: Jessica Zhang Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Patchwork: https://patchwork.freedesktop.org/patch/596232/ Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-4-2ab1d334c657@linaro.org Signed-off-by: Dmitry Baryshkov commit 063557239c267a9256cb379b197a71a022d8c752 Author: Jun Nie Date: Thu May 30 13:56:47 2024 +0800 drm/msm/dpu: enable compression bit in cfg2 for DSC Enable compression bit in cfg2 register for DSC in the DSI case per hardware version. Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/596231/ Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-3-2ab1d334c657@linaro.org Signed-off-by: Dmitry Baryshkov commit 17236bc0ee0a78d58c03a28c3015b21bde5e445f Author: Jun Nie Date: Thu May 30 13:56:46 2024 +0800 drm/msm/dpu: adjust data width for widen bus case data is valid for only half the active window if widebus is enabled Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/596229/ Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-2-2ab1d334c657@linaro.org Signed-off-by: Dmitry Baryshkov commit f9ce482d7dc0ca47fff6d192d29d39f1df7c3441 Author: Jonathan Marek Date: Thu May 30 13:56:45 2024 +0800 drm/msm/dpu: fix video mode DSC for DSI Add width change in DPU timing for DSC compression case to work with DSI video mode. Signed-off-by: Jonathan Marek Signed-off-by: Jun Nie Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Patchwork: https://patchwork.freedesktop.org/patch/596227/ Link: https://lore.kernel.org/r/20240530-msm-drm-dsc-dsi-video-upstream-4-v6-1-2ab1d334c657@linaro.org Signed-off-by: Dmitry Baryshkov commit 5372db09f4ba1627e678e5fb2f9907c456e06ca2 Author: Konrad Dybcio Date: Tue Apr 23 00:37:00 2024 +0200 drm/msm/dsi: Remove dsi_phy_write_[un]delay() These are dummy wrappers that do literally nothing interesting. Remove them. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/590703/ Link: https://lore.kernel.org/r/20240423-topic-msm_cleanup-v1-2-b30f39f43b90@linaro.org Signed-off-by: Dmitry Baryshkov commit 8fd6f64ddba041c3cf252f928b8c446a37996f39 Author: Konrad Dybcio Date: Tue Apr 23 00:36:59 2024 +0200 drm/msm/dsi: Remove dsi_phy_read/write() These are dummy wrappers that do literally nothing interesting. Remove them. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/590700/ Link: https://lore.kernel.org/r/20240423-topic-msm_cleanup-v1-1-b30f39f43b90@linaro.org Signed-off-by: Dmitry Baryshkov commit b0539664cbc3cb4d8caf2265fb6242086288c89d Author: Oliver Upton Date: Fri Jun 21 22:50:45 2024 +0000 KVM: selftests: Assert that MPIDR_EL1 is unchanged across vCPU reset commit 606af8293cd8 ("KVM: selftests: arm64: Test vCPU-scoped feature ID registers") intended to test that MPIDR_EL1 is unchanged across vCPU reset but failed at actually doing so. Add the missing assertion. Link: https://lore.kernel.org/r/20240621225045.2472090-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 33d85a93c6c3c0c1fc2d168ee5a9ae604c439fa7 Author: Oliver Upton Date: Fri Jun 21 22:40:44 2024 +0000 KVM: arm64: nv: Unfudge ID_AA64PFR0_EL1 masking Marc reports that L1 VMs aren't booting with the NV series applied to today's kvmarm/next. After bisecting the issue, it appears that 44241f34fac9 ("KVM: arm64: nv: Use accessors for modifying ID registers") is to blame. Poking around at the issue a bit further, it'd appear that the value for ID_AA64PFR0_EL1 is complete garbage, as 'val' still contains the value we set ID_AA64ISAR1_EL1 to. Fix the read-modify-write pattern to actually use ID_AA64PFR0_EL1 as the starting point. Excuse me as I return to my shame cube. Reported-by: Marc Zyngier Fixes: 44241f34fac9 ("KVM: arm64: nv: Use accessors for modifying ID registers") Acked-by: Marc Zyngier Tested-by: Marc Zyngier Link: https://lore.kernel.org/r/20240621224044.2465901-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit e1e61fe3452d511e53aa50720833148b11719269 Author: Ryan Walklin Date: Fri Jun 7 21:20:35 2024 +1200 arm64: dts: allwinner: rg35xx: Enable DVFS CPU frequency scaling The Anbernic RG35XX device variants (-2024, -H, -Plus and -SP) are the only currently known devices to have an Allwinner H700 SoC. The closely related RG28XX also has the H700 but a mainline DT for this device has not yet been submitted. Include the H616 CPU OPP table in the base device DTS, and increase the DCDC1 regulator (vdd-cpu) upper voltage range to 1.16V, allowing the CPU to reach 1.5GHz. Signed-off-by: Ryan Walklin Tested-by: Philippe Simons Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20240607092140.33112-4-ryan@testtoast.com Signed-off-by: Chen-Yu Tsai commit b05f15d0fc15a21ffe480226b02d9352bddfa2e5 Author: Ryan Walklin Date: Fri Jun 7 21:20:34 2024 +1200 arm64: dts: allwinner: h616: add additional CPU OPPs for the H700 The H700 now shows stable operation with the 1.008, 1.032 and 1.512 GHz DVFS operating points. The 1.5GHz OPP requires a VDD-CPU of 1.16V, obtained from the vendor BSP. This voltage is slightly above the recommended operating voltage for the H616 (H700 datasheet not publicly available) but well within the absolute maximum of 1.3V. Add the additional 1.032 GHz operating point to the H616 CPU-OPP table, and enable the 1.008 and 1.512 points for the H700. Signed-off-by: Ryan Walklin Tested-by: Philippe Simons Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20240607092140.33112-3-ryan@testtoast.com Signed-off-by: Chen-Yu Tsai commit 9427997a5e13320a3c404a0cb67a292ad8e00b62 Author: Christian Hewitt Date: Sat Jun 22 13:12:44 2024 +0000 ASoC: dt-bindings: add ti,pcm5242 to pcm512x Add ti,pcm5242 to the pcm512x driver file Signed-off-by: Christian Hewitt Link: https://patch.msgid.link/20240622131245.2607533-2-christianshewitt@gmail.com Signed-off-by: Mark Brown commit 9c9b172fdd918c2f852140fc4a3cd827b78fa947 Author: Christian Hewitt Date: Sat Jun 22 13:12:45 2024 +0000 ASoC: Add support for ti,pcm5242 to the pcm512x driver Add a compatible string to enable support for the ti,pcm5242 DAC chip in the pcm512x driver. Signed-off-by: Christian Hewitt Link: https://patch.msgid.link/20240622131245.2607533-3-christianshewitt@gmail.com Signed-off-by: Mark Brown commit 4b12f91a06ee4a18bb30ffa462ff12aeea8b9927 Author: Aradhya Bhatia Date: Wed Nov 8 13:27:22 2023 +0200 drm/bridge: tc358767: Add format negotiation hooks for DPI/DSI to (e)DP With new connector model, tc358767 will not create the connector, when DRM_BRIDGE_ATTACH_NO_CONNECTOR is set and display-controller driver will rely on format negotiation to setup the encoder format. Add the missing bus format negotiation hooks in the drm_bridge_funcs to complete DRM_BRIDGE_ATTACH_NO_CONNECTOR support. Output format, for DPI/DSI to DP, is selected to MEDIA_BUS_FMT_RGB888_1X24 as default, keeping in mind what the older model used to support. Reported-by: Jan Kiszka Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@siemens.com/ Signed-off-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231108-tc358767-v2-1-25c5f70a2159@ideasonboard.com Signed-off-by: Dmitry Baryshkov commit e41e5973bf4559b0918c59d243ba8612f070f854 Author: Chris Morgan Date: Wed Jun 5 12:20:49 2024 -0500 arm64: dts: allwinner: anbernic-rg35xx-h: Add ADC joysticks Add support for the ADC joysticks found on the Anbernic RG35XX-H. The joysticks use one channel of the GPADC which is muxed 4 ways by an ADC mux. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20240605172049.231108-5-macroalpha82@gmail.com Signed-off-by: Chen-Yu Tsai commit 59678cc9cc54e556f83a58c52aaac8c149edab67 Author: Chris Morgan Date: Wed Jun 5 12:20:48 2024 -0500 arm64: dts: allwinner: h616: Add GPADC device node The H616 has a GPADC controller which is identical to the one found on the D1/T113s/R329/T507 SoCs. Reviewed-by: Andre Przywara Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20240605172049.231108-4-macroalpha82@gmail.com Signed-off-by: Chen-Yu Tsai commit c45281068fbe1a94b8d4295dc66ecbae4d853af4 Merge: bba474656dd85 532857c2a76ba Author: Chen-Yu Tsai Date: Sat Jun 22 20:10:05 2024 +0800 Merge branch 'sunxi/shared-clk-ids-for-6.11' into sunxi/dt-for-6.11 commit 002cf0dfa201e44685e3b96ae06b8de258b8b2c2 Author: Chris Morgan Date: Wed Jun 5 12:20:47 2024 -0500 clk: sunxi-ng: h616: Add clock/reset for GPADC Add the GPADC required clock and reset which is used for the onboard GPADC. Signed-off-by: Chris Morgan Acked-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20240605172049.231108-3-macroalpha82@gmail.com Signed-off-by: Chen-Yu Tsai commit 29f1841185ee1a42ae1bf7a7a5b0f29f24fa0aa8 Merge: 95fd34a8595cf 532857c2a76ba Author: Chen-Yu Tsai Date: Sat Jun 22 20:07:02 2024 +0800 Merge branch 'sunxi/shared-clk-ids-for-6.11' into sunxi/clk-for-6.11 commit 532857c2a76ba3553302cf2a2cbec7679fb5b4fe Author: Chris Morgan Date: Wed Jun 5 12:20:46 2024 -0500 dt-bindings: clock: sun50i-h616-ccu: Add GPADC clocks Add the required clock bindings for the GPADC. Signed-off-by: Chris Morgan Acked-by: Jernej Skrabec Reviewed-by: Andre Przywara Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240605172049.231108-2-macroalpha82@gmail.com Signed-off-by: Chen-Yu Tsai commit d4a0055fdc22381fa256e345095e88d134e354c5 Author: David Lechner Date: Fri Jun 21 15:51:31 2024 -0500 spi: add devm_spi_optimize_message() helper This adds a new helper function devm_spi_optimize_message() that automatically registers spi_unoptimize_message() to be called when the device is removed. Signed-off-by: David Lechner Link: https://patch.msgid.link/20240621-devm_spi_optimize_message-v1-2-3f9dcba6e95e@baylibre.com Signed-off-by: Mark Brown commit 9b894d65e9788ece0d51e76d2c184524900f5ec9 Author: David Lechner Date: Fri Jun 21 15:51:30 2024 -0500 Documentation: devres: add missing SPI helpers A few SPI devm_* helpers were missing from the devres documentation. This patch adds them. Signed-off-by: David Lechner Link: https://patch.msgid.link/20240621-devm_spi_optimize_message-v1-1-3f9dcba6e95e@baylibre.com Signed-off-by: Mark Brown commit 2884c29152c098c32e0041061f8327bcdb4e0697 Author: Paul Handrigan Date: Fri Jun 21 10:17:57 2024 -0500 ASoC: cs530x: Support for cs530x ADCs Add support for the cs530x family of high performance ADCs. Signed-off-by: Paul Handrigan Link: https://patch.msgid.link/20240621151757.1661265-3-paulha@opensource.cirrus.com Signed-off-by: Mark Brown commit 0e2407ae89b340c385afdca1e1c61dd651ae6b35 Author: Paul Handrigan Date: Fri Jun 21 10:17:56 2024 -0500 ASoC: dt-bindings: cirrus,cs530x: Add initial DT binding Add the YAML DT bindings for the cs530x high performance audio ADCs. Signed-off-by: Paul Handrigan Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240621151757.1661265-2-paulha@opensource.cirrus.com Signed-off-by: Mark Brown commit 185d72112b951404968cfaa9f77cd9ee19207205 Author: Sean Anderson Date: Thu Jun 20 16:39:43 2024 -0400 net: xilinx: axienet: Enable multicast by default We support multicast addresses, so enable it by default. Signed-off-by: Sean Anderson Signed-off-by: David S. Miller commit 561b5d5b7fbc1475e62ae68309f667ad2e18a669 Author: Dumitru Ceclan Date: Fri Jun 7 17:53:08 2024 +0300 dt-bindings: adc: ad7173: add support for ad411x Add support for: AD4111, AD4112, AD4114, AD4115, AD4116. AD411x family ADCs support a VCOM pin. The purpose of this pin is to offer a dedicated common-mode voltage input for single-ended channels. This pin is specified as supporting a differential channel with VIN10 on model AD4116. AD4111/AD4112 support current channels. Support is implemented using single-channel and "adi,current-channel". Reviewed-by: Conor Dooley Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-2-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit d86deaec1c5b0fb60c3619e8d2ae7a1d722fd2ad Author: Dumitru Ceclan Date: Fri Jun 7 17:53:07 2024 +0300 dt-bindings: iio: adc: Add common-mode-channel property There are ADCs that are differential but support to measure single-ended signals on the same channels by connecting a constant voltage to the negative input pin. This property allows to properly define a single-ended channel that requires two inputs to be specified. Software can use the presence of this property to mark the channel as not differential. Reviewed-by: Conor Dooley Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa Reviewed-by: David Lechner Link: https://patch.msgid.link/20240607-ad4111-v7-1-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron commit 182b6164115a8c6bbe8c3e4e5b80e0adee18355b Author: David Lechner Date: Wed Jun 12 16:03:09 2024 -0500 iio: adc: ad7944: use devm_regulator_get_enable_read_voltage This makes use of the new devm_regulator_get_enable_read_voltage() function to reduce boilerplate code. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-5-fa622e7354e9@baylibre.com Signed-off-by: Jonathan Cameron commit 8f485a164de33e3b57d213d49a7e745d273f895c Author: David Lechner Date: Wed Jun 12 16:03:08 2024 -0500 iio: adc: ad7793: use devm_regulator_get_enable_read_voltage This makes use of the new devm_regulator_get_enable_read_voltage() function to reduce boilerplate code. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-4-fa622e7354e9@baylibre.com Signed-off-by: Jonathan Cameron commit c53ccb4ee1e439bab2414fb32852fae029f901fd Author: David Lechner Date: Wed Jun 12 16:03:07 2024 -0500 iio: adc: ad7292: use devm_regulator_get_enable_read_voltage This makes use of the new devm_regulator_get_enable_read_voltage() function to reduce boilerplate code. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-3-fa622e7354e9@baylibre.com Signed-off-by: Jonathan Cameron commit 634c6b5ab6289be8f0c2934b9174c26d170da6d2 Author: David Lechner Date: Wed Jun 12 16:03:06 2024 -0500 iio: adc: ad7266: use devm_regulator_get_enable_read_voltage This makes use of the new devm_regulator_get_enable_read_voltage() function to reduce boilerplate code. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-2-fa622e7354e9@baylibre.com Signed-off-by: Jonathan Cameron commit 7347d295f54141515af76535134b3ee37d0c781c Author: Alisa-Dariana Roman Date: Thu Jun 13 14:39:57 2024 +0300 iio: adc: ad7192: Clean up dev Clean up by using a local variable struct device *dev. Also use dev_err_probe where possible. Signed-off-by: Alisa-Dariana Roman Link: https://patch.msgid.link/20240613114001.270233-2-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit 40c0f07528c795b83abb4550a16b7866c6db5778 Author: Trevor Gamblin Date: Thu Jun 13 12:34:06 2024 -0400 iio: adc: adi-axi-adc: improve probe() error messaging The current error handling for calls such as devm_clk_get_enabled() in the adi-axi-adc probe() function means that, if a property such as 'clocks' (for example) is not present in the devicetree when booting a kernel with the driver enabled, the resulting error message will be vague, e.g.: |adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with error -2 Change the devm_clk_get_enabled(), devm_regmap_init_mmio(), and devm_iio_backend_register() checks to use dev_err_probe() with some context for easier debugging. After the change: |adi_axi_adc 44a00000.backend: error -ENOENT: failed to get clock |adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with error -2 Signed-off-by: Trevor Gamblin Reviewed-by: Nuno Sa Link: https://patch.msgid.link/20240613163407.2147884-1-tgamblin@baylibre.com Signed-off-by: Jonathan Cameron commit 0ca1323c6aba8fd9309ca33a4bf57c1c9fc06171 Author: Andreas Kemnade Date: Wed May 1 22:47:58 2024 +0200 Input: edt-ft5x06 - add ft5426 As ft5426 seems to be compatible with this driver, add it. Debug output during identification: Model "generic ft5x06 (79)", Rev. " Signed-off-by: Andreas Kemnade Reviewed-by: Oliver Graute Link: https://lore.kernel.org/r/20240501204758.758537-3-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit 2e23b7f3b7dbb5bffd570867eea164e88be47faf Author: Andreas Kemnade Date: Wed May 1 22:47:57 2024 +0200 dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426 Add compatible for ft5426. Searches for documentation reveal neither edt nor evervision as some related company, only FocalTech. Signed-off-by: Andreas Kemnade Acked-by: Krzysztof Kozlowski Reviewed-by: Oliver Graute Link: https://lore.kernel.org/r/20240501204758.758537-2-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit f7b41baa102c5d0e22c80e685ac6af83f02bce78 Author: Andreas Kemnade Date: Sat Jun 22 00:40:22 2024 +0200 Input: ektf2127 - add ektf2232 support The chip is similar, but has status bits at different positions, so use the correct bits. Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20240621224022.1620897-4-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit e4066d17b92ea7930fbef990912c49b07430a6e0 Author: Jeff Johnson Date: Fri Jun 21 22:14:29 2024 -0700 video: agp: add remaining missing MODULE_DESCRIPTION() macros With ARCH=i386, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/ali-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/ati-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/amd-k7-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/efficeon-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/nvidia-agp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/sworks-agp.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes alpha-agp.c and parisc-agp.c which, although they did not produce a warning with the i386 allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit a65506057abf228ef566df4db61b3898c17d3cf5 Author: Andreas Kemnade Date: Sat Jun 22 00:40:21 2024 +0200 dt-bindings: touchscreen: elan,ektf2127: Add EKTF2232 Add a compatible for the EKTF2232, which is similar to other chips in this document. Signed-off-by: Andreas Kemnade Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240621224022.1620897-3-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit dfb60401314413a71e731984906c5688369e0496 Author: Andreas Kemnade Date: Sat Jun 22 00:40:20 2024 +0200 dt-bindings: touchscreen: convert elan,ektf2127 to json-schema Convert EKTF2127 infrared touchscreen controller binding to DT schema and add ektf2232 compatible. Signed-off-by: Andreas Kemnade Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240621224022.1620897-2-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit 3402302cb128ec5067d885343a54df97231ac06f Author: Jeff Johnson Date: Fri Jun 21 23:07:06 2024 -0700 video: console: add missing MODULE_DESCRIPTION() macros With ARCH=i386, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/console/mdacon.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes three other files which, although they did not produce a warning with the i386 allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit b6861f152b4bf6f194b5e5162ee238f2c97e5aec Author: Kamlesh Gurudasani Date: Wed Jun 19 15:27:25 2024 +0530 arm64: dts: ti: k3-am62*-main: Remove unwanted properties from crypto As there is no child node in crypto node, remove the properties that are not needed. Signed-off-by: Kamlesh Gurudasani Link: https://lore.kernel.org/r/20240618-remove-ranges-v1-1-35d68147e9bf@ti.com Signed-off-by: Vignesh Raghavendra commit 11926848eb550ea3018ad9e14761785a6f7f25df Author: Kamlesh Gurudasani Date: Tue Jun 18 18:11:13 2024 +0530 arm64: dts: ti: k3-am62a-main: Enable crypto accelerator Add the node for sa3ul crypto accelerator. Signed-off-by: Jayesh Choudhary Signed-off-by: Kamlesh Gurudasani Link: https://lore.kernel.org/r/20240617-crytpo-am62a-v2-1-dc7a14f2635b@ti.com Signed-off-by: Vignesh Raghavendra commit e9212f9dd1fb903c24c9258bcee5f0cd93de782c Merge: 3226607302ca5 cd5a46ce6fa62 Author: Jakub Kicinski Date: Fri Jun 21 18:06:40 2024 -0700 Merge tag 'linux-can-next-for-6.11-20240621' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2024-06-21 The first 2 patches are by Andy Shevchenko, one cleans up the includes in the mcp251x driver, the other one updates the sja100 plx_pci driver to make use of predefines PCI subvendor ID. Mans Rullgard's patch cleans up the Kconfig help text of for the slcan driver. Oliver Hartkopp provides a patch to update the documentation, which removes the ISO 15675-2 specification version where possible. The next 2 patches are by Harini T and update the documentation of the xilinx_can driver. Francesco Valla provides documentation for the ISO 15765-2 protocol. A patch by Dr. David Alan Gilbert removes an unused struct from the mscan driver. 12 patches are by Martin Jocic. The first three add support for 3 new devices to the kvaser_usb driver. The remaining 9 first clean up the kvaser_pciefd driver, and then add support for MSI. Krzysztof Kozlowski contributes 3 patches simplifies the CAN SPI drivers by making use of spi_get_device_match_data(). The last patch is by Martin Hundebøll, which reworks the m_can driver to not enable the CAN transceiver during probe. * tag 'linux-can-next-for-6.11-20240621' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (24 commits) can: m_can: don't enable transceiver when probing can: mcp251xfd: simplify with spi_get_device_match_data() can: mcp251x: simplify with spi_get_device_match_data() can: hi311x: simplify with spi_get_device_match_data() can: kvaser_pciefd: Add MSI interrupts can: kvaser_pciefd: Move reset of DMA RX buffers to the end of the ISR can: kvaser_pciefd: Change name of return code variable can: kvaser_pciefd: Rename board_irq to pci_irq can: kvaser_pciefd: Add unlikely can: kvaser_pciefd: Add inline can: kvaser_pciefd: Remove unnecessary comment can: kvaser_pciefd: Skip redundant NULL pointer check in ISR can: kvaser_pciefd: Group #defines together can: kvaser_usb: Add support for Kvaser Mini PCIe 1xCAN can: kvaser_usb: Add support for Kvaser USBcan Pro 5xCAN can: kvaser_usb: Add support for Vining 800 can: mscan: remove unused struct 'mscan_state' Documentation: networking: document ISO 15765-2 can: xilinx_can: Document driver description to list all supported IPs can: isotp: remove ISO 15675-2 specification version where possible ... ==================== Link: https://patch.msgid.link/20240621080201.305471-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 366e17409f1f17ad872259ce4a4f8a92beb4c4ee Author: Guilherme Amadio Date: Thu Jun 6 17:33:02 2024 +0200 perf build: Ensure libtraceevent and libtracefs versions have 3 components When either of these have a shorter version, like 1.8, the expression that computes the version has a syntax error that can be seen in the output of make: expr: syntax error: missing argument after + Link: https://bugs.gentoo.org/917559 Reported-by: Peter Volkov Signed-off-by: Guilherme Amadio Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240606153625.2255470-3-amadio@gentoo.org commit 0f0e1f44569061e3dc590cd0b8cb74d8fd53706b Author: Guilherme Amadio Date: Thu Jun 6 17:33:01 2024 +0200 perf build: Use pkg-config for feature check for libtrace{event,fs} Needed to add required include directories for the feature detection to succeed. The header tracefs.h is installed either into the include directory /usr/include/tracefs/tracefs.h when using the Makefile, or into /usr/include/libtracefs/tracefs.h when using meson to build libtracefs. The header tracefs.h uses #include from libtraceevent, so pkg-config needs to pick the correct include directory for libtracefs and add the one for libtraceevent to succeed. Note that in baa2ca59ec1e31ccbe3f24ff0368152b36f68720 the variable LIBTRACEEVENT_DIR was introduced, and now the method to compile against non-standard locations requires PKG_CONFIG_PATH to be set instead, which works for both libtraceevent and libtracefs. Signed-off-by: Guilherme Amadio Reviewed-by: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240606153625.2255470-2-amadio@gentoo.org commit 8cb1f4080dd91c6e6b01dbea013a3f42341cb6a1 Author: Jaegeuk Kim Date: Tue Jun 18 02:15:38 2024 +0000 f2fs: assign CURSEG_ALL_DATA_ATGC if blkaddr is valid mkdir /mnt/test/comp f2fs_io setflags compression /mnt/test/comp dd if=/dev/zero of=/mnt/test/comp/testfile bs=16k count=1 truncate --size 13 /mnt/test/comp/testfile In the above scenario, we can get a BUG_ON. kernel BUG at fs/f2fs/segment.c:3589! Call Trace: do_write_page+0x78/0x390 [f2fs] f2fs_outplace_write_data+0x62/0xb0 [f2fs] f2fs_do_write_data_page+0x275/0x740 [f2fs] f2fs_write_single_data_page+0x1dc/0x8f0 [f2fs] f2fs_write_multi_pages+0x1e5/0xae0 [f2fs] f2fs_write_cache_pages+0xab1/0xc60 [f2fs] f2fs_write_data_pages+0x2d8/0x330 [f2fs] do_writepages+0xcf/0x270 __writeback_single_inode+0x44/0x350 writeback_sb_inodes+0x242/0x530 __writeback_inodes_wb+0x54/0xf0 wb_writeback+0x192/0x310 wb_workfn+0x30d/0x400 The reason is we gave CURSEG_ALL_DATA_ATGC to COMPR_ADDR where the page was set the gcing flag by set_cluster_dirty(). Cc: stable@vger.kernel.org Fixes: 4961acdd65c9 ("f2fs: fix to tag gcing flag on page during block migration") Reviewed-by: Chao Yu Tested-by: Will McVicker Signed-off-by: Jaegeuk Kim commit 5518063fcb2e022411c1112b1b9b069e68380bbb Author: Ian Rogers Date: Thu Jun 6 23:53:43 2024 -0700 perf arm: Workaround ARM PMUs cpu maps having offline cpus When PMUs have a cpu map in the 'cpus' or 'cpumask' file, perf will try to open events on those CPUs. ARM doesn't remove offline CPUs meaning taking a CPU offline will cause perf commands to fail unless a CPU map is passed on the command line. More context in: https://lore.kernel.org/lkml/20240603092812.46616-1-yangyicong@huawei.com/ Reported-by: Yicong Yang Closes: https://lore.kernel.org/lkml/20240603092812.46616-2-yangyicong@huawei.com/ Signed-off-by: Ian Rogers Tested-by: Yicong Yang Tested-by: Leo Yan Cc: James Clark Cc: Suzuki K Poulose Cc: Will Deacon Cc: Mike Leach Cc: Leo Yan Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Cc: John Garry Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607065343.695369-1-irogers@google.com commit 5f55e098b8d032ef25b576d18fb91b16ef2d1c41 Author: Helge Deller Date: Fri Jun 21 00:11:58 2024 +0200 parisc: Add 64-bit gettimeofday() and clock_gettime() vDSO functions Add 64-bit vDSO implementations for gettimeofday() and clock_gettime(). Signed-off-by: Helge Deller commit e23d9c0b5266e083a654b62756ede0dd5bf1ac3d Author: Helge Deller Date: Wed Jun 19 01:42:28 2024 +0200 parisc: Add 32-bit gettimeofday() and clock_gettime() vDSO functions Add vDSO implementations for gettimeofday(), clock_gettime() and clock_gettime64() kernel syscalls. Currently those functions are implemented as pure syscall wrappers. Signed-off-by: Helge Deller commit af42d252ea7f48aa06f0f642314abc4427e2dfd3 Author: Helge Deller Date: Fri Jun 21 18:39:13 2024 +0200 parisc: Clean up unistd.h file Clean up the internal unistd.h file, so that syscallX() can be used internally to call syscalls from userspace. This is used later by the vDSO C-code. Signed-off-by: Helge Deller commit a071b043ab13ae1f5d12ba6f267936feb800dff8 Author: Lai Jiangshan Date: Fri Jun 21 15:32:25 2024 +0800 workqueue: Remove useless pool->dying_workers A dying worker is first moved from pool->workers to pool->dying_workers in set_worker_dying() and removed from pool->dying_workers in detach_dying_workers(). The whole procedure is in the some lock context of wq_pool_attach_mutex. So pool->dying_workers is useless, just remove it and keep the dying worker in pool->workers after set_worker_dying() and remove it in detach_dying_workers() with wq_pool_attach_mutex held. Cc: Valentin Schneider Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit f4b7b53c94afdec6dd0f1f834cfcc40595ddc916 Author: Lai Jiangshan Date: Fri Jun 21 15:32:24 2024 +0800 workqueue: Detach workers directly in idle_cull_fn() The code to kick off the destruction of workers is now in a process context (idle_cull_fn()), and the detaching of a worker is not required to be inside the worker thread now, so just do the detaching directly in idle_cull_fn(). wake_dying_workers() is renamed to detach_dying_workers() and the unneeded wakeup in wake_dying_workers() is also removed. Cc: Valentin Schneider Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit f45b1c3c33373c8c29a95a5188165d6eb634823a Author: Lai Jiangshan Date: Fri Jun 21 15:32:23 2024 +0800 workqueue: Don't bind the rescuer in the last working cpu So that when the rescuer is woken up next time, it will not interrupt the last working cpu which might be busy on other crucial works but have nothing to do with the rescuer's incoming works. Cc: Valentin Schneider Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 68f83057b913467a999e1bf9e0da6a119668f769 Author: Lai Jiangshan Date: Fri Jun 21 15:32:22 2024 +0800 workqueue: Reap workers via kthread_stop() and remove detach_completion The code to kick off the destruction of workers is now in a process context (idle_cull_fn()), so kthread_stop() can be used in the process context to replace the work of pool->detach_completion. The wakeup in wake_dying_workers() is unneeded after this change, but it is harmless, jut keep it here until next patch renames wake_dying_workers() rather than renaming it again and again. Cc: Valentin Schneider Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 8685f22b5bfdab0b335232eb70a0af3388d35299 Author: Linus Walleij Date: Fri Jun 21 13:35:52 2024 -0700 Input: ads7846 - handle HSYNC GPIO Add handling of HSYNC signal emitted by the TI ADS7846 if it is hooked up to a GPIO. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20240430-gpio-leds-miscarm-v1-3-9c94d7711f6c@linaro.org [dtor: dropped Spitz changes, kept platform data wait_for_sync option] Signed-off-by: Dmitry Torokhov commit e7202f646717e0be355f1acc5ed57370bc1e201c Author: Linus Walleij Date: Fri Jun 21 13:34:44 2024 -0700 dt-bindings: ads7846: Add hsync-gpios The TI ADS7846 emits a horizontal sync signal that is usually connected to a GPIO for polling. Add a binding for this. Signed-off-by: Linus Walleij Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240430-gpio-leds-miscarm-v1-2-9c94d7711f6c@linaro.org Signed-off-by: Dmitry Torokhov commit 93265a0b79e48fde8ee23fb6e1195d7d99717063 Merge: cd387ce54834b 47a8cf0c5b3f6 Author: Andrii Nakryiko Date: Fri Jun 21 14:45:08 2024 -0700 Merge branch 'bpf-resilient-split-btf-followups' Alan Maguire says: ==================== bpf: resilient split BTF followups Follow-up to resilient split BTF series [1], - cleaning up libbpf relocation code (patch 1); - adding 'struct module' support for base BTF data (patch 2); - splitting out field iteration code into separate file (patch 3); - sharing libbpf relocation code with the kernel (patch 4); - adding a kbuild --btf_features flag to generate distilled base BTF in the module-specific case where KBUILD_EXTMOD is true (patch 5); and - adding test coverage for module-based kfunc dtor (patch 6) Generation of distilled base BTF for modules requires the pahole patch at [2], but without it we just won't get distilled base BTF (and thus BTF relocation on module load) for bpf_testmod.ko. Changes since v1 [3]: - fixed line lengths and made comparison an explicit == 0 (Andrii, patch 1) - moved btf_iter.c changes to separate patch (Andrii, patch 3) - grouped common targets in kernel/bpf/Makefile (Andrii, patch 4) - updated bpf_testmod ctx alloc to use GFP_ATOMIC, and updated dtor selftest to use map-based dtor cleanup (Eduard, patch 6) [1] https://lore.kernel.org/bpf/20240613095014.357981-1-alan.maguire@oracle.com/ [2] https://lore.kernel.org/bpf/20240517102714.4072080-1-alan.maguire@oracle.com/ [3] https://lore.kernel.org/bpf/20240618162449.809994-1-alan.maguire@oracle.com/ ==================== Link: https://lore.kernel.org/r/20240620091733.1967885-1-alan.maguire@oracle.com Signed-off-by: Andrii Nakryiko commit 47a8cf0c5b3f6769b9d558301735c75119a0a165 Author: Alan Maguire Date: Thu Jun 20 10:17:33 2024 +0100 selftests/bpf: Add kfunc_call test for simple dtor in bpf_testmod add simple kfuncs to create/destroy a context type to bpf_testmod, register them and add a kfunc_call test to use them. This provides test coverage for registration of dtor kfuncs from modules. By transferring the context pointer to a map value as a __kptr we also trigger the map-based dtor cleanup logic, improving test coverage. Suggested-by: Eduard Zingerman Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240620091733.1967885-7-alan.maguire@oracle.com commit 46fb0b62ea29c0dbcb3e44f1d67aafe79bc6e045 Author: Alan Maguire Date: Thu Jun 20 10:17:32 2024 +0100 kbuild,bpf: Add module-specific pahole flags for distilled base BTF Support creation of module BTF along with distilled base BTF; the latter is stored in a .BTF.base ELF section and supplements split BTF references to base BTF with information about base types, allowing for later relocation of split BTF with a (possibly changed) base. resolve_btfids detects the presence of a .BTF.base section and will use it instead of the base BTF it is passed in BTF id resolution. Modules will be built with a distilled .BTF.base section for external module build, i.e. make -C. -M=path2/module ...while in-tree module build as part of a normal kernel build will not generate distilled base BTF; this is because in-tree modules change with the kernel and do not require BTF relocation for the running vmlinux. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Reviewed-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240620091733.1967885-6-alan.maguire@oracle.com commit 8646db238997df36c6ad71a9d7e0b52ceee221b2 Author: Alan Maguire Date: Thu Jun 20 10:17:31 2024 +0100 libbpf,bpf: Share BTF relocate-related code with kernel Share relocation implementation with the kernel. As part of this, we also need the type/string iteration functions so also share btf_iter.c file. Relocation code in kernel and userspace is identical save for the impementation of the reparenting of split BTF to the relocated base BTF and retrieval of the BTF header from "struct btf"; these small functions need separate user-space and kernel implementations for the separate "struct btf"s they operate upon. One other wrinkle on the kernel side is we have to map .BTF.ids in modules as they were generated with the type ids used at BTF encoding time. btf_relocate() optionally returns an array mapping from old BTF ids to relocated ids, so we use that to fix up these references where needed for kfuncs. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240620091733.1967885-5-alan.maguire@oracle.com commit e7ac331b30555cf1a0826784a346f36dbf800451 Author: Alan Maguire Date: Thu Jun 20 10:17:30 2024 +0100 libbpf: Split field iter code into its own file kernel This will allow it to be shared with the kernel. No functional change. Suggested-by: Andrii Nakryiko Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240620091733.1967885-4-alan.maguire@oracle.com commit d4e48e3dd45017abdd69a19285d197de897ef44f Author: Alan Maguire Date: Thu Jun 20 10:17:29 2024 +0100 module, bpf: Store BTF base pointer in struct module ...as this will allow split BTF modules with a base BTF representation (rather than the full vmlinux BTF at time of BTF encoding) to resolve their references to kernel types in a way that is more resilient to small changes in kernel types. This will allow modules that are not built every time the kernel is to provide more resilient BTF, rather than have it invalidated every time BTF ids for core kernel types change. Fields are ordered to avoid holes in struct module. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Reviewed-by: Luis Chamberlain Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240620091733.1967885-3-alan.maguire@oracle.com commit d1cf840854bb603c0718a011bc993f69f2df014e Author: Alan Maguire Date: Thu Jun 20 10:17:28 2024 +0100 libbpf: BTF relocation followup fixing naming, loop logic Use less verbose names in BTF relocation code and fix off-by-one error and typo in btf_relocate.c. Simplify loop over matching distilled types, moving from assigning a _next value in loop body to moving match check conditions into the guard. Suggested-by: Andrii Nakryiko Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240620091733.1967885-2-alan.maguire@oracle.com commit cd387ce54834bc7808082c471fd745ce85a0e21f Author: Mykyta Yatsenko Date: Fri Jun 21 19:03:24 2024 +0100 selftests/bpf: Test struct_ops bpf map auto-attach Adding selftest to verify that struct_ops maps are auto attached by bpf skeleton's `*__attach` function. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240621180324.238379-1-yatsenko@meta.com commit 2bb138cb20a6a347cfed84381430cd25e05f118e Author: Puranjay Mohan Date: Wed Jun 19 13:13:34 2024 +0000 bpf, arm64: Inline bpf_get_current_task/_btf() helpers On ARM64, the pointer to task_struct is always available in the sp_el0 register and therefore the calls to bpf_get_current_task() and bpf_get_current_task_btf() can be inlined into a single MRS instruction. Here is the difference before and after this change: Before: ; struct task_struct *task = bpf_get_current_task_btf(); 54: mov x10, #0xffffffffffff7978 // #-34440 58: movk x10, #0x802b, lsl #16 5c: movk x10, #0x8000, lsl #32 60: blr x10 --------------> 0xffff8000802b7978 <+0>: mrs x0, sp_el0 64: add x7, x0, #0x0 <-------------- 0xffff8000802b797c <+4>: ret After: ; struct task_struct *task = bpf_get_current_task_btf(); 54: mrs x7, sp_el0 This shows around 1% performance improvement in artificial microbenchmark. Signed-off-by: Puranjay Mohan Signed-off-by: Andrii Nakryiko Acked-by: Xu Kuohai Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240619131334.4297-1-puranjay@kernel.org commit 2807db78ab302eab2c86c5924e4079adb63fd7c8 Merge: cc5083d1f3881 3e23c99764d46 Author: Andrii Nakryiko Date: Fri Jun 21 13:49:38 2024 -0700 Merge branch 'regular-expression-support-for-test-output-matching' Cupertino Miranda says: ==================== Regular expression support for test output matching Hi everyone, This version removes regexp from inline assembly examples that did not require the regular expressions to match. Thanks, Cupertino ==================== Link: https://lore.kernel.org/r/20240617141458.471620-1-cupertino.miranda@oracle.com Signed-off-by: Andrii Nakryiko commit 3e23c99764d465ae411f0729fd6d2e0e3edd0ade Author: Cupertino Miranda Date: Mon Jun 17 15:14:58 2024 +0100 selftests/bpf: Match tests against regular expression This patch changes a few tests to make use of regular expressions. Fixed tests otherwise fail when compiled with GCC. Signed-off-by: Cupertino Miranda Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240617141458.471620-3-cupertino.miranda@oracle.com commit f06ae6194f278444201e0b041a00192d794f83b6 Author: Cupertino Miranda Date: Mon Jun 17 15:14:57 2024 +0100 selftests/bpf: Support checks against a regular expression Add support for __regex and __regex_unpriv macros to check the test execution output against a regular expression. This is similar to __msg and __msg_unpriv, however those expect do substring matching. Signed-off-by: Cupertino Miranda Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240617141458.471620-2-cupertino.miranda@oracle.com commit ecbf9b3a82ec44c3010ce45352e719a8e5dd965f Author: Connor Abbott Date: Tue Apr 30 11:43:20 2024 +0100 drm/msm/a7xx: Add missing register writes from downstream This isn't known to fix anything yet, but it's a good idea to add it. Signed-off-by: Connor Abbott Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/592043/ Signed-off-by: Rob Clark commit 41fd54ef74b02233a419b4929d26662e5f105f46 Author: Connor Abbott Date: Tue Apr 30 11:43:19 2024 +0100 drm/msm: Add MSM_PARAM_RAYTRACING uapi Expose the value of the software fuse to userspace. Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/592044/ Signed-off-by: Rob Clark commit 14b27d5df3ea22ebfbfa1d658a5f733219a642e8 Author: Connor Abbott Date: Tue Apr 30 11:43:18 2024 +0100 drm/msm/a7xx: Initialize a750 "software fuse" On all Qualcomm platforms with a7xx GPUs, qcom_scm provides a method to initialize cx_mem. Copy this from downstream (minus BCL which we currently don't support). On a750, this includes a new "fuse" register which can be used by qcom_scm to fuse off certain features like raytracing in software. The fuse is default off, and is initialized by calling the method. Afterwards we have to read it to find out which features were enabled. Reviewed-by: Dmitry Baryshkov Signed-off-by: Connor Abbott Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/592042/ Signed-off-by: Rob Clark commit 90c3e2bc9ecbf3210d661fadee4c947d34a88ceb Author: Connor Abbott Date: Tue Apr 30 11:43:16 2024 +0100 firmware: qcom_scm: Add gpu_init_regs call This will used by drm/msm to initialize GPU registers that Qualcomm's firmware doesn't make writeable to the kernel. Reviewed-by: Dmitry Baryshkov Signed-off-by: Connor Abbott Reviewed-by: Konrad Dybcio Acked-by: Bjorn Andersson Patchwork: https://patchwork.freedesktop.org/patch/592039/ Signed-off-by: Rob Clark commit d38660ebde6205ce73534a272daf2f2ef41fecef Author: Rob Clark Date: Fri May 17 12:50:19 2024 -0700 drm/msm/adreno: Check for zap node availability This should allow disabling the zap node via an overlay, for slbounce. Suggested-by: Nikita Travkin Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Patchwork: https://patchwork.freedesktop.org/patch/594572/ commit f2608b70f6c2e1454bcc185d9089a881b6ad974b Author: Rob Clark Date: Mon May 13 08:51:47 2024 -0700 drm/msm: Add obj flags to gpu devcoredump When debugging faults, it is useful to know how the BO is mapped (cached vs WC, gpu readonly, etc). Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen Acked-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/593854/ commit 204226de27c3a6328b155005f132afe12eca3a5e Author: Rob Clark Date: Fri Mar 1 10:53:45 2024 -0800 drm/msm: Add GPU memory traces Perfetto can use these traces to track global and per-process GPU memory usage. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/580854/ commit 2a97388a807b6ab5538aa8f8537b2463c6988bd2 Author: Alexey Dobriyan Date: Fri Jun 21 21:54:50 2024 +0300 ELF: fix kernel.randomize_va_space double read ELF loader uses "randomize_va_space" twice. It is sysctl and can change at any moment, so 2 loads could see 2 different values in theory with unpredictable consequences. Issue exactly one load for consistent value across one exec. Signed-off-by: Alexey Dobriyan Link: https://lore.kernel.org/r/3329905c-7eb8-400a-8f0a-d87cff979b5b@p183 Signed-off-by: Kees Cook commit 5f262f67cbc5f96c857602443f1fdf66900249f3 Author: Niklas Cassel Date: Fri Jun 7 13:14:25 2024 +0200 dt-bindings: PCI: rockchip-dw-pcie: Fix description of legacy IRQ The descriptions of the combined interrupt signals (level1) mention all the lower interrupt signals (level2) for each combined interrupt, regardless if the lower (level2) signal is RC or EP specific. E.g. the description of "Combined system interrupt" includes rbar_update, which is EP specific, and the description of "Combined message interrupt" includes obff_idle, obff_obff, obff_cpu_active, which are all EP specific. The only exception is the "Combined legacy interrupt", which for some reason does not provide an exhaustive list of the lower (level2) signals. Add the missing lower interrupt signals: tx_inta, tx_intb, tx_intc, and tx_intd for the "Combined legacy interrupt", as per the rk3568 and rk3588 Technical Reference Manuals, such that the descriptions of the combined interrupt signals are consistent. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-5-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) commit 9b0b9b588c00a801230727e5046a2323bf4e4d34 Author: Niklas Cassel Date: Fri Jun 7 13:14:24 2024 +0200 dt-bindings: PCI: rockchip-dw-pcie: Prepare for Endpoint mode support Refactor the rockchip-dw-pcie binding to move generic properties to a new rockchip-dw-pcie-common binding that can be shared by both RC and EP mode. No functional change intended. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-4-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) commit 6f308c017c2729a5e70cf6282a74ff0f43b8e90c Author: Niklas Cassel Date: Fri Jun 7 13:14:23 2024 +0200 dt-bindings: PCI: snps,dw-pcie-ep: Add tx_int{a,b,c,d} legacy IRQs The DWC core has four interrupt signals: tx_inta, tx_intb, tx_intc, tx_intd that are triggered when the PCIe controller (when running in Endpoint mode) has sent an Assert_INTA Message to the upstream device. Some DWC controllers have these interrupt in a combined interrupt signal. Add the description of these interrupts to the device tree binding. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-3-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) commit b96353773d24359c1830a90e79b8240a2720b605 Author: Niklas Cassel Date: Fri Jun 7 13:14:22 2024 +0200 dt-bindings: PCI: snps,dw-pcie-ep: Add vendor specific interrupt-names Considering that some drivers (e.g. pcie-dw-rockchip.c) already use the interrupt-names "sys", "pmc", "msg", "err" for the device tree binding in Root Complex mode (snps,dw-pcie.yaml), it doesn't make sense that those drivers should use different interrupt-names when running in Endpoint mode (snps,dw-pcie-ep.yaml). Therefore, since "sys", "pmc", "msg", "err" are already defined in snps,dw-pcie.yaml, add them also for snps,dw-pcie-ep.yaml. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-2-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) commit 3b287269ab602d794470b482960c27c873e5af47 Author: Niklas Cassel Date: Fri Jun 7 13:14:21 2024 +0200 dt-bindings: PCI: snps,dw-pcie-ep: Add vendor specific reg-name Considering that some drivers (e.g. pcie-dw-rockchip.c) already use the reg-name "apb" for the device tree binding in Root Complex mode (snps,dw-pcie.yaml), it doesn't make sense that those drivers should use a different reg-name when running in Endpoint mode (snps,dw-pcie-ep.yaml). Therefore, since "apb" is already defined in snps,dw-pcie.yaml, add it also for snps,dw-pcie-ep.yaml. Link: https://lore.kernel.org/linux-pci/20240607-rockchip-pcie-ep-v1-v5-1-0a042d6b0049@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring (Arm) commit abe8103da3c59415b790fa260a6676c7bf252a65 Author: Gerd Bayer Date: Wed Jun 19 13:58:47 2024 +0200 vfio/pci: Fix typo in macro to declare accessors Correct spelling of DECLA[RA]TION Suggested-by: Ramesh Thomas Signed-off-by: Gerd Bayer Link: https://lore.kernel.org/r/20240619115847.1344875-4-gbayer@linux.ibm.com Signed-off-by: Alex Williamson commit 4df13a6871d9e97aeeef72244e9a954c5cf11f54 Author: Ben Segal Date: Wed Jun 19 13:58:46 2024 +0200 vfio/pci: Support 8-byte PCI loads and stores Many PCI adapters can benefit or even require full 64bit read and write access to their registers. In order to enable work on user-space drivers for these devices add two new variations vfio_pci_core_io{read|write}64 of the existing access methods when the architecture supports 64-bit ioreads and iowrites. Signed-off-by: Ben Segal Co-developed-by: Gerd Bayer Signed-off-by: Gerd Bayer Link: https://lore.kernel.org/r/20240619115847.1344875-3-gbayer@linux.ibm.com Signed-off-by: Alex Williamson commit 186bfe44ea41fb38c7a69becd7078724d28cd03c Author: Gerd Bayer Date: Wed Jun 19 13:58:45 2024 +0200 vfio/pci: Extract duplicated code into macro vfio_pci_core_do_io_rw() repeats the same code for multiple access widths. Factor this out into a macro Suggested-by: Alex Williamson Signed-off-by: Gerd Bayer Link: https://lore.kernel.org/r/20240619115847.1344875-2-gbayer@linux.ibm.com Signed-off-by: Alex Williamson commit 722c9389c7fa91d1b6c665252f655b352b3a32b8 Author: Jisheng Zhang Date: Fri Jun 14 23:19:55 2024 +0800 irqchip/riscv-intc: Remove asmlinkage The two functions riscv_intc_aia_irq() and riscv_intc_irq() are only called by C functions. Signed-off-by: Jisheng Zhang Signed-off-by: Thomas Gleixner Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20240614151955.1949-1-jszhang@kernel.org commit 8324bb755a80d463ff53379e5d64991656512069 Author: John Garry Date: Fri Jun 21 18:30:16 2024 +0000 block: Fix blk_validate_atomic_write_limits() build for arm32 For arm32, we get the following build warning: In file included from /tmp/next/build/include/linux/printk.h:10, from /tmp/next/build/include/linux/kernel.h:31, from /tmp/next/build/block/blk-settings.c:5: /tmp/next/build/block/blk-settings.c: In function 'blk_validate_atomic_write_limits': /tmp/next/build/include/asm-generic/div64.h:222:35: warning: comparison of distinct pointer types lacks a cast 222 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ | ^~ The divident for do_div() should be 64b, which it is not. Since we want to check 2x unsigned ints, just use % operator. This allows us to drop the chunk_sectors variable. Fixes: 9da3d1e912f3 ("block: Add core atomic write support") Reported-by: Mark Brown Closes: https://lore.kernel.org/linux-next/b765d200-4e0f-48b1-a962-7dfa1c4aef9c@kernel.dk/T/#mbf067b1edd89c7f9d7dac6e258c516199953a108 Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240621183016.3092518-1-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit cc5083d1f3881624ad2de1f3cbb3a07e152cb254 Author: Donglin Peng Date: Wed Jun 19 05:23:55 2024 -0700 libbpf: Checking the btf_type kind when fixing variable offsets I encountered an issue when building the test_progs from the repository [1]: $ pwd /work/Qemu/x86_64/linux-6.10-rc2/tools/testing/selftests/bpf/ $ make test_progs V=1 [...] ./tools/sbin/bpftool gen object ./ip_check_defrag.bpf.linked2.o ./ip_check_defrag.bpf.linked1.o libbpf: failed to find symbol for variable 'bpf_dynptr_slice' in section '.ksyms' Error: failed to link './ip_check_defrag.bpf.linked1.o': No such file or directory (2) [...] Upon investigation, I discovered that the btf_types referenced in the '.ksyms' section had a kind of BTF_KIND_FUNC instead of BTF_KIND_VAR: $ bpftool btf dump file ./ip_check_defrag.bpf.linked1.o [...] [2] DATASEC '.ksyms' size=0 vlen=2 type_id=16 offset=0 size=0 (FUNC 'bpf_dynptr_from_skb') type_id=17 offset=0 size=0 (FUNC 'bpf_dynptr_slice') [...] [16] FUNC 'bpf_dynptr_from_skb' type_id=82 linkage=extern [17] FUNC 'bpf_dynptr_slice' type_id=85 linkage=extern [...] For a detailed analysis, please refer to [2]. We can add a kind checking to fix the issue. [1] https://github.com/eddyz87/bpf/tree/binsort-btf-dedup [2] https://lore.kernel.org/all/0c0ef20c-c05e-4db9-bad7-2cbc0d6dfae7@oracle.com/ Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support") Signed-off-by: Donglin Peng Signed-off-by: Daniel Borkmann Reviewed-by: Alan Maguire Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240619122355.426405-1-dolinux.peng@gmail.com commit 6ddf3a9abd9fdfdd63d8c906fc1393f7950c23f4 Author: Matt Bobrowski Date: Tue Jun 18 19:29:22 2024 +0000 bpf: Add security_file_post_open() LSM hook to sleepable_lsm_hooks The new generic LSM hook security_file_post_open() was recently added to the LSM framework in commit 8f46ff5767b0b ("security: Introduce file_post_open hook"). Let's proactively add this generic LSM hook to the sleepable_lsm_hooks BTF ID set, because I can't see there being any strong reasons not to, and it's only a matter of time before someone else comes around and asks for it to be there. security_file_post_open() is inherently sleepable as it's purposely situated in the kernel that allows LSMs to directly read out the contents of the backing file if need be. Additionally, it's called directly after security_file_open(), and that LSM hook in itself already exists in the sleepable_lsm_hooks BTF ID set. Signed-off-by: Matt Bobrowski Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240618192923.379852-1-mattbobrowski@google.com commit 651337c7ca82c259bf5c8fe9beda9673531a0031 Author: Andrii Nakryiko Date: Tue Jun 18 11:38:32 2024 -0700 bpftool: Allow compile-time checks of BPF map auto-attach support in skeleton New versions of bpftool now emit additional link placeholders for BPF maps (struct_ops maps are the only maps right now that support attachment), and set up BPF skeleton in such a way that libbpf will auto-attach BPF maps automatically, assumming libbpf is recent enough (v1.5+). Old libbpf will do nothing with those links and won't attempt to auto-attach maps. This allows user code to handle both pre-v1.5 and v1.5+ versions of libbpf at runtime, if necessary. But if users don't have (or don't want to) control bpftool version that generates skeleton, then they can't just assume that skeleton will have link placeholders. To make this detection possible and easy, let's add the following to generated skeleton header file: #define BPF_SKEL_SUPPORTS_MAP_AUTO_ATTACH 1 This can be used during compilation time to guard code that accesses skel->links. slots. Note, if auto-attachment is undesirable, libbpf allows to disable this through bpf_map__set_autoattach(map, false). This is necessary only on libbpf v1.5+, older libbpf doesn't support map auto-attach anyways. Libbpf version can be detected at compilation time using LIBBPF_MAJOR_VERSION and LIBBPF_MINOR_VERSION macros, or at runtime with libbpf_major_version() and libbpf_minor_version() APIs. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240618183832.2535876-1-andrii@kernel.org commit 717d6313bba1b3179f0bf1026aaec6b7e26f484e Author: Jiri Olsa Date: Wed Jun 19 10:16:24 2024 +0200 bpf: Change bpf_session_cookie return value to __u64 * This reverts [1] and changes return value for bpf_session_cookie in bpf selftests. Having long * might lead to problems on 32-bit architectures. Fixes: 2b8dd87332cd ("bpf: Make bpf_session_cookie() kfunc return long *") Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240619081624.1620152-1-jolsa@kernel.org commit 50717edb6dd74dbc0726fb2ba8723ba2a22a2011 Author: Dmitry Torokhov Date: Thu Jun 20 17:38:55 2024 -0700 Input: adc-joystick - move axes data into the main structure There is no need to allocate axes information separately from the main joystick structure so let's fold the allocation and also drop members (such as range, flat and fuzz) that are only used during initialization of the device. Acked-by: Artur Rojek Link: https://lore.kernel.org/r/ZmkrgTlxNwm_oHxv@google.com Signed-off-by: Dmitry Torokhov commit 3612ca8e2935c4c142d99e33b8effa7045ce32b5 Author: Kan Liang Date: Thu Jun 6 11:03:16 2024 -0700 perf stat: Fix the hard-coded metrics calculation on the hybrid The hard-coded metrics is wrongly calculated on the hybrid machine. $ perf stat -e cycles,instructions -a sleep 1 Performance counter stats for 'system wide': 18,205,487 cpu_atom/cycles/ 9,733,603 cpu_core/cycles/ 9,423,111 cpu_atom/instructions/ # 0.52 insn per cycle 4,268,965 cpu_core/instructions/ # 0.23 insn per cycle The insn per cycle for cpu_core should be 4,268,965 / 9,733,603 = 0.44. When finding the metric events, the find_stat() doesn't take the PMU type into account. The cpu_atom/cycles/ is wrongly used to calculate the IPC of the cpu_core. In the hard-coded metrics, the events from a different PMU are only SW_CPU_CLOCK and SW_TASK_CLOCK. They both have the stat type, STAT_NSECS. Except the SW CLOCK events, check the PMU type as well. Fixes: 0a57b910807a ("perf stat: Use counts rather than saved_value") Reported-by: Khalil, Amiri Reviewed-by: Ian Rogers Signed-off-by: Kan Liang Acked-by: Namhyung Kim Cc: stable@vger.kernel.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240606180316.4122904-1-kan.liang@linux.intel.com commit 9403408e122628a6dc7154a95716f00dae3747c7 Author: Christian Loehle Date: Mon Jun 17 17:16:15 2024 +0100 tick: Remove unnused tick_nohz_get_idle_calls() The function returns the idle calls counter for the current cpu and therefore usually isn't what the caller wants. It is unnused since commit 466a2b42d676 ("cpufreq: schedutil: Use idle_calls counter of the remote CPU") Signed-off-by: Christian Loehle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240617161615.49309-1-christian.loehle@arm.com commit fff5cca345a66a341870512e58ca469042249f25 Author: Michal Swiatkowski Date: Mon Jun 10 09:44:34 2024 +0200 ice: update representor when VSI is ready In case of reset of VF VSI can be reallocated. To handle this case it should be properly updated. Reload representor as vsi->vsi_num can be different than the one stored when representor was created. Instead of only changing antispoof do whole VSI configuration for eswitch. Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 4d364df2b5ed1718580f22df1458cfecf82787a2 Author: Michal Swiatkowski Date: Mon Jun 10 09:44:33 2024 +0200 ice: move VSI configuration outside repr setup It is needed because subfunction port representor shouldn't configure the source VSI during representor creation. Move the code to separate function and call it only in case the VF port representor is being created. Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit d35df77707bf5ae1221b5ba1c8a88cf4fcdd4901 Author: Michael Walle Date: Fri Jun 21 14:09:29 2024 +0200 mtd: spi-nor: winbond: fix w25q128 regression Commit 83e824a4a595 ("mtd: spi-nor: Correct flags for Winbond w25q128") removed the flags for non-SFDP devices. It was assumed that it wasn't in use anymore. This wasn't true. Add the no_sfdp_flags as well as the size again. We add the additional flags for dual and quad read because they have been reported to work properly by Hartmut using both older and newer versions of this flash, the similar flashes with 64Mbit and 256Mbit already have these flags and because it will (luckily) trigger our legacy SFDP parsing, so newer versions with SFDP support will still get the parameters from the SFDP tables. Reported-by: Hartmut Birr Closes: https://lore.kernel.org/r/CALxbwRo_-9CaJmt7r7ELgu+vOcgk=xZcGHobnKf=oT2=u4d4aA@mail.gmail.com/ Fixes: 83e824a4a595 ("mtd: spi-nor: Correct flags for Winbond w25q128") Reviewed-by: Linus Walleij Signed-off-by: Michael Walle Acked-by: Tudor Ambarus Reviewed-by: Esben Haabendal Reviewed-by: Pratyush Yadav Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20240621120929.2670185-1-mwalle@kernel.org commit cf63fe35f1efa71a4b09f07abbcdf28144b6c6b6 Author: Mike Rapoport (IBM) Date: Thu Jun 20 20:40:38 2024 +0300 arm64: Kconfig: fix typo in __builtin_return_adddress Comment about BUILTIN_RETURN_ADDRESS_STRIPS_PAC spells __builtin_return_adddress with a triple 'd', fix it. Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20240620174038.3721466-1-rppt@kernel.org Signed-off-by: Catalin Marinas commit fafc8cd097cdfa0884129f7d55cbbe14e4044dd5 Author: Marek Vasut Date: Fri May 31 22:30:18 2024 +0200 dt-bindings: display: bridge: tc358767: Keep enum sorted Keep the list sorted numerically. No functional change. Signed-off-by: Marek Vasut Acked-by: Rob Herring (Arm) Link: https://patchwork.freedesktop.org/patch/msgid/20240531203031.277334-1-marex@denx.de commit 52c1e818d66bfed276bd371f9e7947be4055af87 Author: Sean Anderson Date: Thu Jun 20 17:20:05 2024 -0400 hwmon: iio: Use iio_read_channel_processed_scale for IIO_POWER Instead of rescaling power channels after the fact, use the dedicated scaling API. This should reduce any inaccuracies resulting from the scaling. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240620212005.821805-1-sean.anderson@linux.dev Signed-off-by: Guenter Roeck commit 1915460c513bbd4bbe5dd630f11df0b2b11f21df Author: Alexandre Mergnat Date: Thu May 23 14:49:23 2024 +0200 dt-bindings: display: mediatek: rdma: add compatible for MT8365 SoC Document the display Data Path Read DMA on MT8365, which is compatible with that of the MT8183. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-10-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 8d31a0e099cf935f829e046e61e6574216dc97d0 Author: Alexandre Mergnat Date: Thu May 23 14:49:22 2024 +0200 dt-bindings: display: mediatek: ovl: add compatible for MT8365 SoC Document the display Overlay on MT8365, which is compatible with that of the MT8192. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-9-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 7ce438ae753d9600684e13e4a954016abb92f973 Author: Alexandre Mergnat Date: Thu May 23 14:49:21 2024 +0200 dt-bindings: display: mediatek: gamma: add compatible for MT8365 SoC Document the display Gamma on MT8365, which is compatible with that of the MT8183. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat Link: https://elixir.bootlin.com/linux/v6.10-rc4/source/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml Signed-off-by: Chun-Kuang Hu commit 169802d274601a6385d094c8d91abb3193c81952 Author: Alexandre Mergnat Date: Thu May 23 14:49:20 2024 +0200 dt-bindings: display: mediatek: dpi: add compatible for MT8365 Add dt-binding documentation of dpi for MediaTek MT8365 SoC. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-7-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 9bccbe7b20876a34c70b13430ea1b308fc8d5a7e Author: Zheng Zengkai Date: Thu Jun 20 22:21:32 2024 +0800 kdb: Get rid of redundant kdb_curr_task() Commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture") removed the only definition of macro _TIF_MCA_INIT, so kdb_curr_task() is actually the same as curr_task() now and becomes redundant. Let's remove the definition of kdb_curr_task() and replace remaining calls with curr_task(). Signed-off-by: Zheng Zengkai Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240620142132.157518-1-zhengzengkai@huawei.com Signed-off-by: Daniel Thompson commit c0a28b177b711f8f73fa47dec8e9c36cf2224bef Author: Alexandre Mergnat Date: Thu May 23 14:49:18 2024 +0200 dt-bindings: display: mediatek: dsi: add compatible for MT8365 SoC Document the Display Serial Interface on MT8365, which is compatible with that of the MT8183. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-5-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 8d2f518c0c9dc86be677c037a6e2f5e7da268866 Author: Michal Swiatkowski Date: Mon Jun 10 09:44:32 2024 +0200 ice: move devlink locking outside the port creation In case of subfunction lock will be taken for whole port creation and removing. Do the same in VF case. Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit e7b396b7c85cb002c29b01138d1b207051452f16 Author: Alexandre Mergnat Date: Thu May 23 14:49:17 2024 +0200 dt-bindings: display: mediatek: dither: add compatible for MT8365 SoC Document the display Dither on MT8365, which is compatible with that of the MT8183. Acked-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-4-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 639ac8ce8b65a44f176e3e831e39d5dde738ac71 Author: Michal Swiatkowski Date: Mon Jun 10 09:44:31 2024 +0200 ice: store representor ID in bridge port It is used to get representor structure during cleaning. Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 4b320c53cb795b1904ac813141f31889752128d2 Author: Alexandre Mergnat Date: Thu May 23 14:49:16 2024 +0200 dt-bindings: display: mediatek: color: add compatible for MT8365 SoC Document the display Color on MT8365, which is compatible with that of the MT8173. Acked-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-3-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit f4fbf2dc8851513f4c38ffe394f909902eece6c3 Author: Alexandre Mergnat Date: Thu May 23 14:49:15 2024 +0200 dt-bindings: display: mediatek: ccorr: add compatible for MT8365 SoC Document the display Color Correction on MT8365, which is compatible with that of the MT8183. Acked-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-2-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 759b11948bb9b05852087d562f4801e3924381e6 Author: Alexandre Mergnat Date: Thu May 23 14:49:14 2024 +0200 dt-bindings: display: mediatek: aal: add compatible for MT8365 SoC Document the display Adaptive Ambient Light on MT8365, which is compatible with that of the MT8183. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Signed-off-by: Alexandre Mergnat Reviewed-by: CK Hu Link: https://patchwork.kernel.org/project/dri-devel/patch/20231023-display-support-v4-1-ed82eb168fb1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit caaf7101c01a91a882d3da2f566579dda692367d Author: Damien Le Moal Date: Fri Jun 21 12:15:06 2024 +0900 block: Cleanup block device zone helpers There is no need to conditionally define on CONFIG_BLK_DEV_ZONED the inline helper functions bdev_nr_zones(), bdev_max_open_zones(), bdev_max_active_zones() and disk_zone_no() as these function will return the correct valu in all cases (zoned device or not, including when CONFIG_BLK_DEV_ZONED is not set). Furthermore, disk_nr_zones() definition can be simplified as disk->nr_zones is always 0 for regular block devices. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240621031506.759397-4-dlemoal@kernel.org Signed-off-by: Jens Axboe commit b6cfe2287df6e26d685af8a8a96ed1bf87bdde28 Author: Damien Le Moal Date: Fri Jun 21 12:15:05 2024 +0900 block: Define bdev_nr_zones() as an inline function There is no need for bdev_nr_zones() to be an exported function calculating the number of zones of a block device. Instead, given that all callers use this helper with a fully initialized block device that has a gendisk, we can redefine this function as an inline helper in blkdev.h. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240621031506.759397-3-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 4ac9056e4bd787f1ba2001167c5acc2b5a75ddf9 Author: Damien Le Moal Date: Fri Jun 21 12:15:04 2024 +0900 null_blk: Do not set disk->nr_zones In null_register_zoned_dev(), there is no need to set disk->nr_zones as the now uncoditional call to blk_revalidate_disk_zones() will do that. So remove the assignment using bdev_nr_zones(). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240621031506.759397-2-dlemoal@kernel.org Signed-off-by: Jens Axboe commit b081f13c11500bceb8ab504797a48cc7751de4b5 Author: Biju Das Date: Mon Jun 10 17:48:45 2024 +0100 reset: rzg2l-usbphy-ctrl: Move reset controller registration As soon as the reset controller is registered, it could be used by a reset consumer. That means hardware setup to be done first and then the registration of the reset controller. So move the registration of reset controller at the end of probe(). While at it, fix the issue that the reset is not re-asserted in case devm_reset_controller_register() fails and also use goto statements to simplify the error path in probe(). Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240610164845.89666-1-biju.das.jz@bp.renesas.com Signed-off-by: Philipp Zabel commit e2e821095949cde46256034975a90f88626a2a73 Author: Douglas Anderson Date: Tue May 28 07:11:48 2024 -0700 kdb: Use the passed prompt in kdb_position_cursor() The function kdb_position_cursor() takes in a "prompt" parameter but never uses it. This doesn't _really_ matter since all current callers of the function pass the same value and it's a global variable, but it's a bit ugly. Let's clean it up. Found by code inspection. This patch is expected to functionally be a no-op. Fixes: 09b35989421d ("kdb: Use format-strings rather than '\0' injection in kdb_read()") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240528071144.1.I0feb49839c6b6f4f2c4bf34764f5e95de3f55a66@changeid Signed-off-by: Daniel Thompson commit 70867efacf4370b6c7cdfc7a5b11300e9ef7de64 Author: Arnd Bergmann Date: Tue May 28 14:11:48 2024 +0200 kdb: address -Wformat-security warnings When -Wformat-security is not disabled, using a string pointer as a format causes a warning: kernel/debug/kdb/kdb_io.c: In function 'kdb_read': kernel/debug/kdb/kdb_io.c:365:36: error: format not a string literal and no format arguments [-Werror=format-security] 365 | kdb_printf(kdb_prompt_str); | ^~~~~~~~~~~~~~ kernel/debug/kdb/kdb_io.c: In function 'kdb_getstr': kernel/debug/kdb/kdb_io.c:456:20: error: format not a string literal and no format arguments [-Werror=format-security] 456 | kdb_printf(kdb_prompt_str); | ^~~~~~~~~~~~~~ Use an explcit "%s" format instead. Signed-off-by: Arnd Bergmann Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)") Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240528121154.3662553-1-arnd@kernel.org Signed-off-by: Daniel Thompson commit 5d0c35feea339e4a3a9c9e99731e4d49ad5ee329 Author: Uwe Kleine-König Date: Wed May 8 11:56:10 2024 +0200 spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices While in commit 2dd33f9cec90 ("spi: imx: support DMA for imx35") it was claimed that DMA works on i.MX25, i.MX31 and i.MX35 the respective device trees don't add DMA channels. The Reference manuals of i.MX31 and i.MX25 also don't mention the CSPI core being DMA capable. (I didn't check the others.) Since commit e267a5b3ec59 ("spi: spi-imx: Use dev_err_probe for failed DMA channel requests") this results in an error message spi_imx 43fa4000.spi: error -ENODEV: can't get the TX DMA channel! during boot. However that isn't fatal and the driver gets loaded just fine, just without using DMA. Signed-off-by: Uwe Kleine-König Link: https://patch.msgid.link/20240508095610.2146640-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3226607302ca5a74dee6f1c817580c713ef9d0dd Author: Taehee Yoo Date: Fri Jun 21 04:16:37 2024 +0000 selftests: net: change shebang to bash in amt.sh amt.sh is written in bash, not sh. So, shebang should be bash. Signed-off-by: Taehee Yoo Acked-by: Muhammad Usama Anjum Signed-off-by: David S. Miller commit 55397323f3eaba16b93182c35be85aa35cad1432 Author: Srinivas Pandruvada Date: Wed Jun 19 10:21:09 2024 -0700 thermal: intel: int340x: Enable WLT and power floor support for Lunar Lake Add feature flgas for WLT and power floor for Lunar Lake. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240619172109.497639-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 7a9a8c5faf418538b53cd63e8fcb1a34b1e3b680 Author: Srinivas Pandruvada Date: Wed Jun 19 10:21:08 2024 -0700 thermal: intel: int340x: Support MSI interrupt for Lunar Lake The legacy PCI interrupt is no longer supported for processor thermal device on Lunar Lake. The support is via MSI. Add feature PROC_THERMAL_FEATURE_MSI_SUPPORT to support MSI feature per generation. Define this feature for Lunar Lake processors. There are 4 MSI sources: 0 - Package thermal 1 - DDR Thermal 2 - Power floor interrupt 3 - Workload type hint On interrupt, check the source and call the corresponding handler. Here don't need to call proc_thermal_check_wt_intr() and proc_thermal_check_power_floor_intr() to check if the interrupt is for those sources as there is a dedicated MSI interrupt. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240619172109.497639-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit a264cee31f13ae3b8d32b3e53774759afa55361e Author: Srinivas Pandruvada Date: Wed Jun 19 10:21:07 2024 -0700 thermal: intel: int340x: Remove unnecessary calls to free irq Remove calls to devm_free_irq() and pci_free_irq_vectors(). They will be called on driver release anyway. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240619172109.497639-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 5ba206213a8a6e7f4389ba4f31600b4ee652f59e Author: Srinivas Pandruvada Date: Wed Jun 19 05:46:00 2024 -0700 thermal: intel: int340x: Add DLVR support for Lunar Lake Add support for DLVR (Digital Linear Voltage Regulator) for Lunar Lake. There are no new sysfs attributes or difference in operation compared to prior generations. MMIO offset and bit positions are changed compared to Meteor Lake processors. Also for two attributes dlvr_frequency_mhz and dlvr_frequency_select, the value presented or accepted by the firmware is not raw frequency value but an index. For example: RFI_FREQ_SELECT and RFI_FREQ : 0 DLVR freq point 2227.2 MHz : 1 DLVR freq point 2140 MHz Hence create a mapping table for Lunar Lake to map user space values to the firmware accepted values. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240619124600.491168-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 332ed4e5c4a347f79acc2a45575700cbf22ff9fe Author: Srinivas Pandruvada Date: Wed Jun 19 05:45:59 2024 -0700 thermal: intel: int340x: Capability to map user space to firmware values To ensure compatibility between user inputs and firmware requirements, a conversion mechanism is necessary for certain attributes. For instance, on some platforms, the DLVR frequency must be translated into a predefined index before being communicated to the firmware. On Lunar Lake platform: RFI_FREQ_SELECT and RFI_FREQ: Index 0 corresponds to a DLVR frequency of 2227.2 MHz Index 1 corresponds to a DLVR frequency of 2140 MHz Introduce a feature that enables the conversion of values between user space inputs and firmware-accepted formats. This feature would also facilitate the reverse process, converting firmware values back into user friendly display values. To support this functionality, a model-specific mapping table will be utilized. When available, this table will provide the necessary translations between user space values and firmware values, ensuring seamless communication and accurate settings. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240619124600.491168-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 822b2a7c958c7115feb94417d6b941bdc558d621 Author: Srinivas Pandruvada Date: Wed Jun 19 05:45:58 2024 -0700 thermal: intel: int340x: Cleanup of DLVR sysfs on driver remove When only DLVR enabled without DVFS, during driver remove, proc_thermal_rfim_remove() is not called. Hence the DLVR sysfs is not deleted. On Lunar Lake DLVR is enabled without DVFS, hence this issue can be reproduced. Check also PROC_THERMAL_FEATURE_DLVR to call proc_thermal_rfim_remove(). Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240619124600.491168-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit a92fbeac7e94a420b55570c10fe1b90e64da4025 Author: Leon Romanovsky Date: Tue May 28 15:52:51 2024 +0300 RDMA/cache: Release GID table even if leak is detected When the table is released, we nullify pointer to GID table, it means that in case GID entry leak is detected, we will leak table too. Delete code that prevents table destruction. Fixes: b150c3862d21 ("IB/core: Introduce GID entry reference counts") Link: https://lore.kernel.org/r/a62560af06ba82c88ef9194982bfa63d14768ff9.1716900410.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 63e6b02f574b7b1bf26a4db3a0a2881b9ebbb1f5 Author: Atul Kumar Pant Date: Sun Jun 16 18:10:25 2024 +0530 cpuidle: governors: teo: Fix a typo in a comment "terget" -> "target" Signed-off-by: Atul Kumar Pant Link: https://patch.msgid.link/20240616124025.16477-1-atulpant.linux@gmail.com Signed-off-by: Rafael J. Wysocki commit be6bfb29c55e48567983e24aba7b6bf9a66a45ab Author: Ricardo Neri Date: Fri Jun 14 14:16:06 2024 -0700 thermal: intel: intel_tcc_cooling: Use a model-specific bitmask for TCC offset The TCC offset field in the register MSR_TEMPERATURE_TARGET is not architectural. The TCC library provides a model-specific bitmask. Use it to determine the maximum TCC offset. Suggested-by: Zhang Rui Reviewed-by: Zhang Rui Signed-off-by: Ricardo Neri Link: https://patch.msgid.link/20240614211606.5896-3-ricardo.neri-calderon@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 6ae0092ca7adfce79336c6525cb0da561ecd4f04 Author: Ricardo Neri Date: Fri Jun 14 14:16:05 2024 -0700 thermal: intel: intel_tcc: Add model checks for temperature registers The register MSR_TEMPERATURE_TARGET is not architectural. Its fields may be defined differently for each processor model. TCC_OFFSET is an example of such case. Despite being specified as architectural, the registers IA32_[PACKAGE]_ THERM_STATUS have become model-specific: in recent processors, the digital temperature readout uses bits [23:16] whereas the Intel Software Developer's manual specifies bits [22:16]. Create an array of processor models and their bitmasks for TCC_OFFSET and the digital temperature readout fields. Do not include recent processors. Instead, use the bitmasks of these recent processors as default. Use these model-specific bitmasks when reading TCC_OFFSET or the temperature sensors. Initialize a model-specific data structure during subsys_initcall() to have it ready when thermal drivers are loaded. Expose the new interface intel_tcc_get_offset_mask(). The intel_tcc_cooling driver will use it. Reviewed-by: Zhang Rui Signed-off-by: Ricardo Neri Link: https://patch.msgid.link/20240614211606.5896-2-ricardo.neri-calderon@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 73abe7002eea73fa4c006249e1adb9dee3a8c79f Merge: 096597cfe4ea0 68de0ae4d6b5e Author: Rafael J. Wysocki Date: Fri Jun 21 14:47:17 2024 +0200 Merge back thermal control changes related to Intel platforms for v6.11 commit 6c3b5970b0c408e39d776113cf4624c1f551d68b Author: Jiapeng Chong Date: Wed Jun 19 10:40:17 2024 +0800 wifi: rtl8xxxu: use swap() in rtl8xxxu_switch_ports() Use existing swap() function rather than duplicating its implementation. ./drivers/net/wireless/realtek/rtl8xxxu/core.c:6749:30-31: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9358 Signed-off-by: Jiapeng Chong Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240619024017.53246-1-jiapeng.chong@linux.alibaba.com commit 3995904d54384093f79f4a5a12318261c55e2ec1 Merge: 096597cfe4ea0 b6846826982b9 Author: Rafael J. Wysocki Date: Fri Jun 21 14:42:30 2024 +0200 Merge back thermal control material for v6.11. commit d7dd13ea54af8496aca2762a758d817d6813e81c Author: Bitterblue Smith Date: Sun Jun 16 22:27:34 2024 +0300 wifi: rtw88: usb: Further limit the TX aggregation Currently the number of frames sent to the chip in a single USB Request Block is limited only by the size of the TX buffer, which is 20 KiB. Testing reveals that as many as 13 frames get aggregated. This is more than what any of the chips would like to receive. RTL8822CU, RTL8822BU, and RTL8821CU want at most 3 frames, and RTL8723DU wants only 1 frame per URB. RTL8723DU in particular reliably malfunctions during a speed test if it receives more than 1 frame per URB. All traffic seems to stop. Pinging the AP no longer works. Fix this problem by limiting the number of frames sent to the chip in a single URB according to what each chip likes. Also configure RTL8822CU, RTL8822BU, and RTL8821CU to expect 3 frames per URB. RTL8703B may or may not be found in USB devices. Declare that it wants only 1 frame per URB, just in case. Tested with RTL8723DU and RTL8811CU. Cc: stable@vger.kernel.org Signed-off-by: Bitterblue Smith Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/cb46ea35-7e59-4742-9c1f-01ceeaad36fb@gmail.com commit ff33c2e6af99afcac3024a5c3ec8730d1e6b8ac7 Author: Ard Biesheuvel Date: Mon Jun 10 17:26:39 2024 +0200 crypto: arm/crc32 - add kCFI annotations to asm routines The crc32/crc32c implementations using the scalar CRC32 instructions are accessed via indirect calls, and so they must be annotated with type ids in order to execute correctly when kCFI is enabled. Cc: Kees Cook Cc: Linus Walleij Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Reviewed-by: Linus Walleij Signed-off-by: Herbert Xu commit 3722873d49a1788d5420894d4f6f63e35f5c1f13 Author: Hao Ge Date: Mon Jun 17 10:09:54 2024 +0800 ASoc: PCM6240: Return directly after a failed devm_kzalloc() in pcmdevice_i2c_probe() The value “-ENOMEM” was assigned to the local variable “ret” in one if branch after a devm_kzalloc() call failed at the beginning. This error code will trigger then a pcmdevice_remove() call with a passed null pointer so that an undesirable dereference will be performed. Thus return the appropriate error code directly. Fixes: 1324eafd37aa ("ASoc: PCM6240: Create PCM6240 Family driver code") Signed-off-by: Hao Ge Link: https://patch.msgid.link/20240617020954.17252-1-hao.ge@linux.dev Signed-off-by: Mark Brown commit 8978e1f7bc26655e0373c4a6b31e17fcdd497329 Author: Vijendar Mukunda Date: Mon Jun 17 12:58:41 2024 +0530 ASoC: amd: acp: add pcm constraints for buffer size and period size ACP common dma driver has a buffer size and period size restriction which should be 64 byte aligned. Add pcm constraints for the same. Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240617072844.871468-8-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit d85695b01cbb2455a2f70528bb9e53f2463a39cf Author: Vijendar Mukunda Date: Mon Jun 17 12:58:40 2024 +0530 ASoC: amd: acp: move i2s clock generation sequence I2S clock generation registers should be programmed before starting the I2S dma when I2S controller is programmed as clock master. Move i2s clock generation register programming sequence prior to i2s dma start. Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240617072844.871468-7-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 5b162f60e7e051624e187e45b0fdc481c3573f17 Author: Vijendar Mukunda Date: Mon Jun 17 12:58:39 2024 +0530 ASoC: amd: acp: modify conditional check for programming i2s mclk ACP provides different IO configurations(ACP PDM, I2S and SoundWire). I2S mclk should be programmed only when I2S configuration is selected and I2S controller is programmed as clock master. Modify the conditional check for programming i2s mclk. Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240617072844.871468-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 50f1670145392398f4f2ffe9abe4599c86d11ec2 Author: Vijendar Mukunda Date: Mon Jun 17 12:58:38 2024 +0530 ASoC: amd: acp: remove unused variables from acp_resource structure Remove unused variables i2s_pin_cfg_offset and i2s_mode from acp_resource structure entries. Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240617072844.871468-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 75a08ec8c3a6aef914235c409a99046a3d29d1d4 Author: Vijendar Mukunda Date: Mon Jun 17 12:58:37 2024 +0530 ASoC: amd: acp: remove acp_i2s_probe function In acp_i2s_probe(), acp_base null check is verified. As already acp_base null check will be verified in acp platform driver probe sequence, additional NULL check in acp_i2s_probe() is not needed. Remove acp_i2s_probe() function. Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20240617072844.871468-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit de7a09dec4b90a7f92b1ebcdfeed69400b5079f4 Merge: ae8fc2948b48f 90f3feb241721 Author: Mark Brown Date: Fri Jun 21 13:17:21 2024 +0100 ASoC: Merge up fixes We need some of the AMD fixes as a base for new work. commit 3cbe18b0bc9f0653709adbdadad04491a190c71a Author: Jeff Johnson Date: Sat Jun 15 23:14:57 2024 -0700 crypto: lib - add missing MODULE_DESCRIPTION() macros With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/crypto/libsha256.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes sha1.c and utils.c which, although they did not produce a warning with the arm allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit 70d57ffbb11cfe1a686e6051f36413866502492d Author: Jeff Johnson Date: Sat Jun 15 22:32:37 2024 -0700 crypto: arm - add missing MODULE_DESCRIPTION() macros With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm/crypto/aes-arm-bs.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm/crypto/crc32-arm-ce.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes crct10dif-ce-glue.c and curve25519-glue.c which, although they did not produce a warning with the arm allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit b44327ebc1c926e4b55a7721e3d91313fcf188b1 Author: Jiapeng Chong Date: Fri Jun 14 11:09:12 2024 +0800 crypto: lib/mpi - Use swap() in mpi_powm() Use existing swap() function rather than duplicating its implementation. ./lib/crypto/mpi/mpi-pow.c:211:11-12: WARNING opportunity for swap(). ./lib/crypto/mpi/mpi-pow.c:239:12-13: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9327 Signed-off-by: Jiapeng Chong Signed-off-by: Herbert Xu commit f0da7a231c7d0bafb6bb56da597cb2bfaf2c7028 Author: Jiapeng Chong Date: Fri Jun 14 11:09:11 2024 +0800 crypto: lib/mpi - Use swap() in mpi_ec_mul_point() Use existing swap() function rather than duplicating its implementation. ./lib/crypto/mpi/ec.c:1291:20-21: WARNING opportunity for swap(). ./lib/crypto/mpi/ec.c:1292:20-21: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9328 Signed-off-by: Jiapeng Chong Signed-off-by: Herbert Xu commit 5ca95a907939f22467767829007b2707f50bba48 Author: Jeff Johnson Date: Thu Jun 13 17:57:05 2024 -0700 crypto: arm/poly1305 - add missing MODULE_DESCRIPTION() macro With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm/crypto/poly1305-arm.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit 691eaf1d66d806fcc2e22068775cf325a5b8c076 Author: Jeff Johnson Date: Thu Jun 13 13:47:49 2024 -0700 hwrng: drivers - add missing Arm & Cavium MODULE_DESCRIPTION() macros With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/hw_random/cavium-rng.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/hw_random/cavium-rng-vf.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/hw_random/arm_smccc_trng.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit b568826eff5d4ef859d2405b127bbee282b9dfe2 Author: Jeff Johnson Date: Wed Jun 12 13:11:57 2024 -0700 crypto: arm64 - add missing MODULE_DESCRIPTION() macros With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm64/crypto/crct10dif-ce.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm64/crypto/poly1305-neon.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm64/crypto/aes-neon-bs.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit a654b354b8cb3143b4e363ddc28704991cd762da Author: Greg Kroah-Hartman Date: Mon Jun 10 10:18:51 2024 +0200 crypto: qat - make adf_ctl_class constant Now that the driver core allows for struct class to be in read-only memory, we should make all 'class' structures declared at build time placing them into read-only memory, instead of having to be dynamically allocated at runtime. Cc: Giovanni Cabiddu Cc: Herbert Xu Cc: "David S. Miller" Cc: Adam Guerin Cc: Benjamin Tissoires Cc: Tom Zanussi Cc: Shashank Gupta Cc: qat-linux@intel.com Cc: linux-crypto@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b0d3969d2b4db82602492cad576b8de494a12ddf Author: Niklas Söderlund Date: Thu Jun 20 20:22:19 2024 +0200 net: ethernet: rtsn: Add support for Renesas Ethernet-TSN Add initial support for Renesas Ethernet-TSN End-station device of R-Car V4H. The Ethernet End-station can connect to an Ethernet network using a 10 Mbps, 100 Mbps, or 1 Gbps full-duplex link via MII/GMII/RMII/RGMII. Depending on the connected PHY. The driver supports Rx checksum and offload and hardware timestamps. While full power management and suspend/resume is not yet supported the driver enables runtime PM in order to enable the module clock. While explicit clock management using clk_enable() would suffice for the supported SoC, the module could be reused on SoCs where the module is part of a power domain. Signed-off-by: Niklas Söderlund Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d7527fe98d79c2dfa46bfea3463d0d595f803db4 Merge: 28ba5c1171913 422b64025ec10 Author: David S. Miller Date: Fri Jun 21 12:22:59 2024 +0100 Merge branch 'qca8k-cleanup-and-port-isolation' Matthias Schiffer says: ==================== net: dsa: qca8k: cleanup and port isolation A small cleanup patch, and basically the same changes that were just accepted for mt7530 to implement port isolation. ==================== Signed-off-by: David S. Miller commit 422b64025ec10981c48f9367311846bf4bd38042 Author: Matthias Schiffer Date: Thu Jun 20 19:25:50 2024 +0200 net: dsa: qca8k: add support for bridge port isolation Remove a pair of ports from the port matrix when both ports have the isolated flag set. Signed-off-by: Matthias Schiffer Reviewed-by: Wojciech Drewek Signed-off-by: David S. Miller commit 412e1775f413c944b8c51bdadb675be957d83dc8 Author: Matthias Schiffer Date: Thu Jun 20 19:25:49 2024 +0200 net: dsa: qca8k: factor out bridge join/leave logic Most of the logic in qca8k_port_bridge_join() and qca8k_port_bridge_leave() is the same. Refactor to reduce duplication and prepare for reusing the code for implementing bridge port isolation. dsa_port_offloads_bridge_dev() is used instead of dsa_port_offloads_bridge(), passing the bridge in as a struct netdevice *, as we won't have a struct dsa_bridge in qca8k_port_bridge_flags(). The error handling is changed slightly in the bridge leave case, returning early and emitting an error message when a regmap access fails. This shouldn't matter in practice, as there isn't much we can do if communication with the switch breaks down in the middle of reconfiguration. Signed-off-by: Matthias Schiffer Reviewed-by: Wojciech Drewek Signed-off-by: David S. Miller commit e85d3e6fea05c8ae21a40809a3c6b7adc97411c7 Author: Matthias Schiffer Date: Thu Jun 20 19:25:48 2024 +0200 net: dsa: qca8k: do not write port mask twice in bridge join/leave qca8k_port_bridge_join() set QCA8K_PORT_LOOKUP_CTRL() for i == port twice, once in the loop handling all other port's masks, and finally at the end with the accumulated port_mask. The first time it would incorrectly set the port's own bit in the mask, only to correct the mistake a moment later. qca8k_port_bridge_leave() had the same issue, but here the regmap_clear_bits() was a no-op rather than setting an unintended value. Remove the duplicate assignment by skipping the whole loop iteration for i == port. The unintended bit setting doesn't seem to have any negative effects (even when not reverted right away), so the change is submitted as a simple cleanup rather than a fix. Signed-off-by: Matthias Schiffer Reviewed-by: Wojciech Drewek Signed-off-by: David S. Miller commit 28ba5c11719134b39cc593e67b15fa666cd03bd8 Merge: 4fce809e4062b 9e6d33937b42c Author: David S. Miller Date: Fri Jun 21 12:12:43 2024 +0100 Merge branch 'net-mscc-miim-switch-reset' Herve Codina says: ==================== Handle switch reset in mscc-miim These two patches were previously sent as part of a bigger series: https://lore.kernel.org/lkml/20240527161450.326615-1-herve.codina@bootlin.com/ v1 and v2 iterations were handled during the v1 and v2 reviews of this bigger series. As theses two patches are now ready to be applied, they were extracted from the bigger series and sent alone in this current series. This current v3 series takes into account feedback received during the bigger series v2 review. Changes v2 -> v3 - patch 1 Drop one useless sentence. Add 'Reviewed-by: Andrew Lunn ' Add 'Acked-by: Krzysztof Kozlowski ' - patch 2 Add 'Reviewed-by: Andrew Lunn ' Changes v1 -> v2 (as part of the bigger series iterations) - Patch 1 Improve the reset property description - Patch 2 Fix a wrong reverse x-mass tree declaration ==================== Signed-off-by: David S. Miller commit 9e6d33937b42ca4867af3b341e5d09abca4a2746 Author: Herve Codina Date: Thu Jun 20 14:01:25 2024 +0200 net: mdio: mscc-miim: Handle the switch reset The mscc-miim device can be impacted by the switch reset, at least when this device is part of the LAN966x PCI device. Handle this newly added (optional) resets property. Signed-off-by: Herve Codina Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e5efa3ff412dd1d3ff266be1eea6ee47c9d951c4 Author: Herve Codina Date: Thu Jun 20 14:01:24 2024 +0200 dt-bindings: net: mscc-miim: Add resets property Add the (optional) resets property. The mscc-miim device is impacted by the switch reset especially when the mscc-miim device is used as part of the LAN966x PCI device. Signed-off-by: Herve Codina Reviewed-by: Andrew Lunn Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 6f963a20eed72b9abb54754cc935ce546b66b451 Author: Hans de Goede Date: Fri May 31 15:59:10 2024 +0200 leds: trigger: Add new LED Input events trigger Add a new trigger which turns LEDs on when there is input (/dev/input/event*) activity and turns them back off again after there has been no activity for 5 seconds. This is primarily intended to control LED devices which are a backlight for capacitive touch-buttons, such as e.g. the menu / home / back buttons found on the bottom bezel of many somewhat older smartphones and tablets. This can also be used to turn on the keyboard backlight LED on input events and turn the keyboard backlight off again when idle. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240531135910.168965-2-hdegoede@redhat.com Signed-off-by: Lee Jones commit ce068e83976140badb19c7f1307926b4b562fac4 Author: Ilpo Järvinen Date: Mon May 27 16:27:00 2024 +0300 leds: ss4200: Convert PCIBIOS_* return codes to errnos ich7_lpc_probe() uses pci_read_config_dword() that returns PCIBIOS_* codes. The error handling code assumes incorrectly it's a normal errno and checks for < 0. The return code is returned from the probe function as is but probe functions should return normal errnos. Remove < 0 from the check and convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning it. Fixes: a328e95b82c1 ("leds: LED driver for Intel NAS SS4200 series (v5)") Cc: Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240527132700.14260-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Lee Jones commit b888f5058613f88583630b71625a1d654cc0a5bf Author: Jeff Johnson Date: Fri May 17 12:30:11 2024 -0700 leds: bcm63138: Add MODULE_DESCRIPTION() Fix the 'make W=1" issue: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/blink/leds-bcm63138.o Signed-off-by: Jeff Johnson Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20240517-md-leds-bcm63138-v1-1-247b7302edb6@quicinc.com Signed-off-by: Lee Jones commit a45f572ab86de272f3fe9302d949c0d9d44f5805 Author: Jeff Johnson Date: Fri May 17 12:53:27 2024 -0700 leds: simatic-ipc-leds: Add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' issues: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/simple/simatic-ipc-leds-gpio-apollolake.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/simple/simatic-ipc-leds-gpio-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/simple/simatic-ipc-leds-gpio-elkhartlake.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/simple/simatic-ipc-leds-gpio-f7188x.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/simple/simatic-ipc-leds.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240517-md-simatic-ipc-v1-1-bbbd199262b8@quicinc.com Signed-off-by: Lee Jones commit 45b579c3c20978d861d0d72adb7833e92f6859ed Author: Jeff Johnson Date: Fri May 17 12:18:49 2024 -0700 leds: rt4505: Add MODULE_DESCRIPTION() Fix the 'make W=1" issue: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/flash/leds-rt4505.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240517-md-leds-rt4505-v1-1-2f388ff6b672@quicinc.com Signed-off-by: Lee Jones commit c0e3d2beeb031589be43055ece7cd33ea4800b98 Author: Uwe Kleine-König Date: Wed May 22 18:53:59 2024 +0200 leds: 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240522165358.62238-2-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit b1bbd20f35e19774ea01989320495e09ac44fba3 Author: Hans de Goede Date: Fri May 31 14:01:24 2024 +0200 leds: trigger: Call synchronize_rcu() before calling trig->activate() Some triggers call led_trigger_event() from their activate() callback to initialize the brightness of the LED for which the trigger is being activated. In order for the LED's initial state to be set correctly this requires that the led_trigger_event() call uses the new version of trigger->led_cdevs, which has the new LED. AFAICT led_trigger_event() will always use the new version when it is running on the same CPU as where the list_add_tail_rcu() call was made, which is why the missing synchronize_rcu() has not lead to bug reports. But if activate() is pre-empted, sleeps or uses a worker then the led_trigger_event() call may run on another CPU which may still use the old trigger->led_cdevs list. Add a synchronize_rcu() call to ensure that any led_trigger_event() calls done from activate() always use the new list. Triggers using led_trigger_event() from their activate() callback are: net/bluetooth/leds.c, net/rfkill/core.c and drivers/tty/vt/keyboard.c. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240531120124.75662-1-hdegoede@redhat.com Signed-off-by: Lee Jones commit dc6285088eda6ecd347f7d7fd7499008521a93a0 Author: Aryabhatta Dey Date: Wed May 8 01:37:11 2024 +0530 docs: leds: leds-blinkm.rst: Fix 'dasy-chain' typo Change 'dasy-chain' to 'daisy-chain'. Signed-off-by: Aryabhatta Dey Link: https://lore.kernel.org/r/qpnx2m6qo5abvbs65o452gicumxa7n5vnw42e3hxnnm7sou4xn@fvu52tilzujc Signed-off-by: Lee Jones commit c0dc9adf9474ecb7106e60e5472577375aedaed3 Author: Hans de Goede Date: Sat May 4 18:25:33 2024 +0200 leds: trigger: Unregister sysfs attributes before calling deactivate() Triggers which have trigger specific sysfs attributes typically store related data in trigger-data allocated by the activate() callback and freed by the deactivate() callback. Calling device_remove_groups() after calling deactivate() leaves a window where the sysfs attributes show/store functions could be called after deactivation and then operate on the just freed trigger-data. Move the device_remove_groups() call to before deactivate() to close this race window. This also makes the deactivation path properly do things in reverse order of the activation path which calls the activate() callback before calling device_add_groups(). Fixes: a7e7a3156300 ("leds: triggers: add device attribute support") Cc: Uwe Kleine-König Signed-off-by: Hans de Goede Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240504162533.76780-1-hdegoede@redhat.com Signed-off-by: Lee Jones commit 4a598907ef1f812ec3fecac5c181c0b7b2d21913 Author: Christophe JAILLET Date: Sun May 5 09:03:32 2024 +0200 leds: is31fl319x: Constify struct regmap_config 'is31fl3190_regmap_config' and 'is31fl3196_regmap_config' are not modified in this diver and are only used as a const struct regmap_config. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 13827 2002 32 15861 3df5 drivers/leds/leds-is31fl319x.o After: text data bss dec hex filename 14467 1370 32 15869 3dfd drivers/leds/leds-is31fl319x.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/82a5cb26ff8af1865a790286bdbc3c4a2bd149f1.1714892598.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit 59561ccd90b8fca31f15d7505c73cc22ffd04c06 Merge: b107093f433c3 9af12f57f1f97 970c3a6b7aa3c Author: Lee Jones Date: Fri Jun 21 11:54:35 2024 +0100 Merge branches 'ib-leds-mfd-6.11', 'ib-leds-platform-power-6.11' and 'ib-mfd-leds-platform-6.11' into ibs-for-leds-merged commit b107093f433c3afb83a46af43c830e578e2ba54d Author: Thomas Weißschuh Date: Thu Jun 13 16:48:40 2024 +0200 mfd: cros_ec: Register LED subdevice Add ChromeOS EC-based LED control as EC subdevice. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-5-500b50f41e0f@weissschuh.net Signed-off-by: Lee Jones commit 8d6ce6f3ec9d5f384e3eac92e43cfeac7a36e6b1 Author: Thomas Weißschuh Date: Thu Jun 13 16:48:39 2024 +0200 leds: Add ChromeOS EC driver The ChromeOS Embedded Controller exposes an LED control command. Expose its functionality through the leds subsystem. The LEDs are exposed as multicolor devices. A hardware trigger, which is active by default, is provided to let the EC itself take over control over the LED. The driver is designed to be probed via the cros_ec mfd device. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-4-500b50f41e0f@weissschuh.net Signed-off-by: Lee Jones commit 493179e692dbb70cac1e54828d0e04bda386f13d Author: Thomas Weißschuh Date: Thu Jun 13 16:48:38 2024 +0200 leds: core: Unexport led_colors[] array There are no external users left, make the array static. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-3-500b50f41e0f@weissschuh.net Signed-off-by: Lee Jones commit 9cb6de2d2c5ca1a7478ee584954bb997fd9f7834 Author: Thomas Weißschuh Date: Thu Jun 13 16:48:37 2024 +0200 leds: multicolor: Use led_get_color_name() function led_get_color_name() is a safer alternative to led_colors. led-class-multicolor.c is the only external user of led_colors and its removal allows unexporting the array. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-2-500b50f41e0f@weissschuh.net Signed-off-by: Lee Jones commit 5f2e950755c76c6fc20fc4ebd8355671fbbd7ac0 Author: Thomas Weißschuh Date: Thu Jun 13 16:48:36 2024 +0200 leds: core: Introduce led_get_color_name() function This is similar to the existing led_colors[] array but is safer to use and usable by everyone. Getting string representations of color ids is useful for drivers which are handling color IDs anyways, for example for the multicolor API. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-1-500b50f41e0f@weissschuh.net Signed-off-by: Lee Jones commit 4fce809e4062b7e73642dfb3f5abf86026ea14f0 Merge: 39c469188b6d2 d18d3f0a24fc4 Author: David S. Miller Date: Fri Jun 21 11:33:34 2024 +0100 Merge branch 'l2tp-sk_user_data' James Chapman says: ==================== l2tp: don't use the tunnel socket's sk_user_data in datapath This series refactors l2tp to not use the tunnel socket's sk_user_data in the datapath. The main reasons for doing this are * to allow for simplifying internal socket cleanup code (to be done in a later series) * to support multiple L2TPv3 UDP tunnels using the same 5-tuple address When handling received UDP frames, l2tp's current approach is to look up a session in a per-tunnel list. l2tp uses the tunnel socket's sk_user_data to derive the tunnel context from the receiving socket. But this results in the socket and tunnel lifetimes being very tightly coupled and the tunnel/socket cleanup paths being complicated. The latter has historically been a source of l2tp bugs and makes the code more difficult to maintain. Also, if sockets are aliased, we can't trust that the socket's sk_user_data references the right tunnel anyway. Hence the desire to not use sk_user_data in the datapath. The new approach is to lookup sessions in a per-net session list without first deriving the tunnel: * For L2TPv2, the l2tp header has separate tunnel ID and session ID fields which can be trivially combined to make a unique 32-bit key for per-net session lookup. * For L2TPv3, there is no tunnel ID in the packet header, only a session ID, which should be unique over all tunnels so can be used as a key for per-net session lookup. However, this only works when the L2TPv3 session ID really is unique over all tunnels. At least one L2TPv3 application is known to use the same session ID in different L2TPv3 UDP tunnels, relying on UDP address/ports to distinguish them. This worked previously because sessions in UDP tunnels were kept in a per-tunnel list. To retain support for this, L2TPv3 session ID collisions are managed using a separate per-net session hlist, keyed by ID and sk. When looking up a session by ID, if there's more than one match, sk is used to find the right one. L2TPv3 sessions in IP-encap tunnels are already looked up by session ID in a per-net list. This work has UDP sessions also use the per-net session list, while allowing for session ID collisions. The existing per-tunnel hlist becomes a plain list since it is used only in management and cleanup paths to walk a list of sessions in a given tunnel. For better performance, the per-net session lists use IDR. Separate IDRs are used for L2TPv2 and L2TPv3 sessions to avoid potential key collisions. These changes pass l2tp regression tests and improve data forwarding performance by about 10% in some of my test setups. ==================== Signed-off-by: David S. Miller commit d18d3f0a24fc4a3513495892ab1a3753628b341b Author: James Chapman Date: Thu Jun 20 12:22:44 2024 +0100 l2tp: replace hlist with simple list for per-tunnel session list The per-tunnel session list is no longer used by the datapath. However, we still need a list of sessions in the tunnel for l2tp_session_get_nth, which is used by management code. (An alternative might be to walk each session IDR list, matching only sessions of a given tunnel.) Replace the per-tunnel hlist with a per-tunnel list. In functions which walk a list of sessions of a tunnel, walk this list instead. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit 8c6245af4fc5b6d244fb0f953d493e848d1e1387 Author: James Chapman Date: Thu Jun 20 12:22:43 2024 +0100 l2tp: drop the now unused l2tp_tunnel_get_session All users of l2tp_tunnel_get_session are now gone so it can be removed. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit 5f77c18ea55601822f9c495135a5b5d4b499d647 Author: James Chapman Date: Thu Jun 20 12:22:42 2024 +0100 l2tp: use IDR for all session lookups Add generic session getter which uses IDR. Replace all users of l2tp_tunnel_get_session which uses the per-tunnel session list to use the generic getter. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit c37e0138ca5f3be6b69c3020470aecb94eb5d773 Author: James Chapman Date: Thu Jun 20 12:22:41 2024 +0100 l2tp: don't use sk_user_data in l2tp_udp_encap_err_recv If UDP sockets are aliased, sk might be the wrong socket. There's no benefit to using sk_user_data to do some checks on the associated tunnel context. Just report the error anyway, like udp core does. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit ff6a2ac23cb027ff9980d633412db17d5f7a1e7c Author: James Chapman Date: Thu Jun 20 12:22:40 2024 +0100 l2tp: refactor udp recv to lookup to not use sk_user_data Modify UDP decap to not use the tunnel pointer which comes from the sock's sk_user_data when parsing the L2TP header. By looking up the destination session using only the packet contents we avoid potential UDP 5-tuple aliasing issues which arise from depending on the socket that received the packet. Drop the useless error messages on short packet or on failing to find a session since the tunnel pointer might point to a different tunnel if multiple sockets use the same 5-tuple. Short packets (those not big enough to contain an L2TP header) are no longer counted in the tunnel's invalid counter because we can't derive the tunnel until we parse the l2tp header to lookup the session. l2tp_udp_encap_recv was a small wrapper around l2tp_udp_recv_core which used sk_user_data to derive a tunnel pointer in an RCU-safe way. But we no longer need the tunnel pointer, so remove that code and combine the two functions. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit 2a3339f6c9636aa39f2493865e4664df1ef2baed Author: James Chapman Date: Thu Jun 20 12:22:39 2024 +0100 l2tp: store l2tpv2 sessions in per-net IDR L2TPv2 sessions are currently kept in a per-tunnel hashlist, keyed by 16-bit session_id. When handling received L2TPv2 packets, we need to first derive the tunnel using the 16-bit tunnel_id or sock, then lookup the session in a per-tunnel hlist using the 16-bit session_id. We want to avoid using sk_user_data in the datapath and double lookups on every packet. So instead, use a per-net IDR to hold L2TPv2 sessions, keyed by a 32-bit value derived from the 16-bit tunnel_id and session_id. This will allow the L2TPv2 UDP receive datapath to lookup a session with a single lookup without deriving the tunnel first. L2TPv2 sessions are held in their own IDR to avoid potential key collisions with L2TPv3 sessions. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit aa5e17e1f5ecb68d3f67a069f7345dbf1a8f274f Author: James Chapman Date: Thu Jun 20 12:22:38 2024 +0100 l2tp: store l2tpv3 sessions in per-net IDR L2TPv3 sessions are currently held in one of two fixed-size hash lists: either a per-net hashlist (IP-encap), or a per-tunnel hashlist (UDP-encap), keyed by the L2TPv3 32-bit session_id. In order to lookup L2TPv3 sessions in UDP-encap tunnels efficiently without finding the tunnel first via sk_user_data, UDP sessions are now kept in a per-net session list, keyed by session ID. Convert the existing per-net hashlist to use an IDR for better performance when there are many sessions and have L2TPv3 UDP sessions use the same IDR. Although the L2TPv3 RFC states that the session ID alone identifies the session, our implementation has allowed the same session ID to be used in different L2TP UDP tunnels. To retain support for this, a new per-net session hashtable is used, keyed by the sock and session ID. If on creating a new session, a session already exists with that ID in the IDR, the colliding sessions are added to the new hashtable and the existing IDR entry is flagged. When looking up sessions, the approach is to first check the IDR and if no unflagged match is found, check the new hashtable. The sock is made available to session getters where session ID collisions are to be considered. In this way, the new hashtable is used only for session ID collisions so can be kept small. For managing session removal, we need a list of colliding sessions matching a given ID in order to update or remove the IDR entry of the ID. This is necessary to detect session ID collisions when future sessions are created. The list head is allocated on first collision of a given ID and refcounted. Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit a744e2d03a91507646ffff8a03a19a2f34a6798a Author: James Chapman Date: Thu Jun 20 12:22:37 2024 +0100 l2tp: remove unused list_head member in l2tp_tunnel Remove an unused variable in struct l2tp_tunnel which was left behind by commit c4d48a58f32c5 ("l2tp: convert l2tp_tunnel_list to idr"). Signed-off-by: James Chapman Reviewed-by: Tom Parkin Signed-off-by: David S. Miller commit 39c469188b6d20db107c454cac3ddea941718850 Author: Sai Krishna Date: Thu Jun 20 14:29:49 2024 +0530 octeontx2-pf: Add ucast filter count configurability via devlink. The existing method of reserving unicast filter count leads to wasted MCAM entries if the functionality is not used or fewer entries are used. Furthermore, the amount of MCAM entries differs amongst Octeon SoCs. We implemented a means to adjust the UC filter count via devlink, allowing for better use of MCAM entries across Netdev apps. commands: To get the current unicast filter count # devlink dev param show pci/0002:02:00.0 name unicast_filter_count To change/set the unicast filter count # devlink dev param set pci/0002:02:00.0 name unicast_filter_count value 5 cmode runtime Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 73115d8068b6ed59e9d728bb9067462084f02a25 Merge: f8f530ba429a3 380afccc2a55e Author: Vinod Koul Date: Fri Jun 21 15:40:55 2024 +0530 Merge tag 'dmaengine_topic_dma_vec' into next Dmaengine topic - New device_prep_peripheral_dma_vec, documentation and user commit 380afccc2a55e8015adae4266e8beff96ab620be Author: Paul Cercueil Date: Thu Jun 20 14:27:26 2024 +0200 Documentation: dmaengine: Document new dma_vec API Document the dmaengine_prep_peripheral_dma_vec() API function, the device_prep_peripheral_dma_vec() backend function, and the dma_vec struct. Signed-off-by: Paul Cercueil Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20240620122726.41232-8-paul@crapouillou.net Signed-off-by: Vinod Koul commit 74609e5686701ed8e8adc3082d15f009e327286d Author: Paul Cercueil Date: Thu Jun 20 14:27:21 2024 +0200 dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240620122726.41232-3-paul@crapouillou.net Signed-off-by: Vinod Koul commit 5878853fc9389e7d0988d4b465a415cf96fd14fa Author: Paul Cercueil Date: Thu Jun 20 14:27:20 2024 +0200 dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() This function can be used to initiate a scatter-gather DMA transfer, where the address and size of each segment is located in one entry of the dma_vec array. The major difference with dmaengine_prep_slave_sg() is that it supports specifying the lengths of each DMA transfer; as trying to override the length of the transfer with dmaengine_prep_slave_sg() is a very tedious process. The introduction of a new API function is also justified by the fact that scatterlists are on their way out. Note that dmaengine_prep_interleaved_dma() is not helpful either in that case, as it assumes that the address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240620122726.41232-2-paul@crapouillou.net Signed-off-by: Vinod Koul commit 5a4c1f0207d8925c45a516d8dc85f0dd70c020ef Author: Krzysztof Kozlowski Date: Thu Jun 20 11:10:46 2024 +0200 soundwire: bus: simplify by using local slave->prop The sdw_initialize_slave() function stores 'slave->prop' as local 'prop' variable, so use it in all applicable places to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20240620091046.12426-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 8e8c0dfc828c3f3ba5ebcee076b979d2134a6e27 Author: Bard Liao Date: Mon Jun 17 20:13:50 2024 +0800 soundwire: generic_bandwidth_allocation: change port_bo parameter to pointer Currently, we do port_bo += bps * ch in both inside and outside sdw_compute_master_ports(). We can pass port_bo as a pointer and only calculate port_bo in sdw_compute_master_ports(). Besides, different port could use different lanes and we can't just add port_bo based on total channels in a manager. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20240617121350.14074-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b96f16bdf58dae08d841536820269c6b0d9c976b Author: Pierre-Louis Bossart Date: Mon Jun 17 20:13:18 2024 +0800 soundwire: Intel: clarify Copyright information For some reason a number of files included the "All rights reserved" statement. Good old copy-paste made sure this mistake proliferated. Remove the "All rights reserved" in all Intel-copyright to align with internal guidance. Reviewed-by: Cezary Rojewski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20240617121318.14037-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit be4edd1642ee205ed7bbf66edc0453b1be1fb8d7 Author: Chao Yu Date: Fri Jun 7 22:23:04 2024 +0800 hfsplus: fix to avoid false alarm of circular locking Syzbot report potential ABBA deadlock as below: loop0: detected capacity change from 0 to 1024 ====================================================== WARNING: possible circular locking dependency detected 6.9.0-syzkaller-10323-g8f6a15f095a6 #0 Not tainted ------------------------------------------------------ syz-executor171/5344 is trying to acquire lock: ffff88807cb980b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x811/0xb50 fs/hfsplus/extents.c:595 but task is already holding lock: ffff88807a930108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb50 fs/hfsplus/extents.c:576 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 hfsplus_file_extend+0x21b/0x1b70 fs/hfsplus/extents.c:457 hfsplus_bmap_reserve+0x105/0x4e0 fs/hfsplus/btree.c:358 hfsplus_rename_cat+0x1d0/0x1050 fs/hfsplus/catalog.c:456 hfsplus_rename+0x12e/0x1c0 fs/hfsplus/dir.c:552 vfs_rename+0xbdb/0xf00 fs/namei.c:4887 do_renameat2+0xd94/0x13f0 fs/namei.c:5044 __do_sys_rename fs/namei.c:5091 [inline] __se_sys_rename fs/namei.c:5089 [inline] __x64_sys_rename+0x86/0xa0 fs/namei.c:5089 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&tree->tree_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 hfsplus_file_truncate+0x811/0xb50 fs/hfsplus/extents.c:595 hfsplus_setattr+0x1ce/0x280 fs/hfsplus/inode.c:265 notify_change+0xb9d/0xe70 fs/attr.c:497 do_truncate+0x220/0x310 fs/open.c:65 handle_truncate fs/namei.c:3308 [inline] do_open fs/namei.c:3654 [inline] path_openat+0x2a3d/0x3280 fs/namei.c:3807 do_filp_open+0x235/0x490 fs/namei.c:3834 do_sys_openat2+0x13e/0x1d0 fs/open.c:1406 do_sys_open fs/open.c:1421 [inline] __do_sys_creat fs/open.c:1497 [inline] __se_sys_creat fs/open.c:1491 [inline] __x64_sys_creat+0x123/0x170 fs/open.c:1491 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 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(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock); This is a false alarm as tree_lock mutex are different, one is from sbi->cat_tree, and another is from sbi->ext_tree: Thread A Thread B - hfsplus_rename - hfsplus_rename_cat - hfs_find_init - mutext_lock(cat_tree->tree_lock) - hfsplus_setattr - hfsplus_file_truncate - mutex_lock(hip->extents_lock) - hfs_find_init - mutext_lock(ext_tree->tree_lock) - hfs_bmap_reserve - hfsplus_file_extend - mutex_lock(hip->extents_lock) So, let's call mutex_lock_nested for tree_lock mutex lock, and pass correct lock class for it. Fixes: 31651c607151 ("hfsplus: avoid deadlock on file truncation") Reported-by: syzbot+6030b3b1b9bf70e538c4@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-fsdevel/000000000000e37a4005ef129563@google.com Cc: Ernesto A. Fernández Signed-off-by: Chao Yu Link: https://lore.kernel.org/r/20240607142304.455441-1-chao@kernel.org Signed-off-by: Christian Brauner commit deebbd505c7bf8913451095c3ac9dcec39c7a025 Author: Jemmy Date: Fri Jun 7 01:39:12 2024 +0800 Improve readability of copy_tree by employing `copy mount tree from src to dst` concept. This involves renaming the opaque variables (e.g., p, q, r, s) to be more descriptive, aiming to make the code easier to understand. Changes: mnt -> src_root (root of the tree to copy) r -> src_root_child (direct child of the root being cloning) p -> src_parent (parent of src_mnt) s -> src_mnt (current mount being copying) parent -> dst_parent (parent of dst_child) q -> dst_mnt (freshly cloned mount) Signed-off-by: Jemmy Link: https://lore.kernel.org/r/20240606173912.99442-1-jemmywong512@gmail.com Signed-off-by: Christian Brauner commit d4f50ea957cab6ea940cc072a142b1e964a10ee6 Author: Mateusz Guzik Date: Tue Jun 4 17:52:57 2024 +0200 vfs: shave a branch in getname_flags Check for an error while copying and no path in one branch. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240604155257.109500-4-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 4dcc0f95ca2a9738e5e4e3bd7571fd95a9cbf272 Author: Ricardo B. Marliere Date: Mon Feb 19 10:43:05 2024 -0300 coresight: 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 the coresight_dev_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 Signed-off-by: Ricardo B. Marliere Reviewed-by: Anshuman Khandual Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20240219-device_cleanup-coresight-v1-1-4a8a0b816183@marliere.net Signed-off-by: Suzuki K Poulose commit 4558645d139c01d5635cac7e3528a3d19bbb6526 Author: Jakub Kicinski Date: Wed Jun 19 17:27:41 2024 -0700 docs: net: document guidance of implementing the SR-IOV NDOs New drivers were prevented from adding ndo_set_vf_* callbacks over the last few years. This was expected to result in broader switchdev adoption, but seems to have had little effect. Based on recent netdev meeting there is broad support for allowing adding those ops. There is a problem with the current API supporting a limited number of VFs (100+, which is less than some modern HW supports). We can try to solve it by adding similar functionality on devlink ports, but that'd be another API variation to maintain. So a netlink attribute reshuffling is a more likely outcome. Document the guidance, make it clear that the API is frozen. Signed-off-by: Jakub Kicinski Reviewed-by: Randy Dunlap Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dcec8d291da8813b5e1c7c0967ae63463a8521f6 Author: Lukasz Majewski Date: Wed Jun 19 16:58:09 2024 +0200 net: dsa: ksz_common: Allow only up to two HSR HW offloaded ports for KSZ9477 The KSZ9477 allows HSR in-HW offloading for any of two selected ports. This patch adds check if one tries to use more than two ports with HSR offloading enabled. The problem is with RedBox configuration (HSR-SAN) - when configuring: ip link add name hsr0 type hsr slave1 lan1 slave2 lan2 interlink lan3 \ supervision 45 version 1 The lan1 (port0) and lan2 (port1) are correctly configured as ports, which can use HSR offloading on ksz9477. However, when we do already have two bits set in hsr_ports, we need to return (-ENOTSUPP), so the interlink port (lan3) would be used with SW based HSR RedBox support. Otherwise, I do see some strange network behavior, as some HSR frames are visible on non-HSR network and vice versa. This causes the switch connected to interlink port (lan3) to drop frames and no communication is possible. Moreover, conceptually - the interlink (i.e. HSR-SAN port - lan3/port2) shall be only supported in software as it is also possible to use ksz9477 with only SW based HSR (i.e. port0/1 -> hsr0 with offloading, port2 -> HSR-SAN/interlink, port4/5 -> hsr1 with SW based HSR). Fixes: 5055cccfc2d1 ("net: hsr: Provide RedBox support (HSR-SAN)") Signed-off-by: Lukasz Majewski Reviewed-by: Andrew Lunn Reviewed-by: Dan Carpenter Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c32fe1986f27cac329767d3497986e306cad1d5e Author: Csókás, Bence Date: Wed Jun 19 14:31:11 2024 +0200 net: fec: Fix FEC_ECR_EN1588 being cleared on link-down FEC_ECR_EN1588 bit gets cleared after MAC reset in `fec_stop()`, which makes all 1588 functionality shut down, and all the extended registers disappear, on link-down, making the adapter fall back to compatibility "dumb mode". However, some functionality needs to be retained (e.g. PPS) even without link. Fixes: 6605b730c061 ("FEC: Add time stamping code and a PTP hardware clock") Cc: Richard Cochran Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/netdev/5fa9fadc-a89d-467a-aae9-c65469ff5fe1@lunn.ch/ Signed-off-by: Csókás, Bence Reviewed-by: Wei Fang Signed-off-by: David S. Miller commit a0c6359df6c70f0754728e5353e828967910575b Merge: 9413b1be0be64 2d694c27d32ef Author: David S. Miller Date: Fri Jun 21 10:10:34 2024 +0100 Merge branch 'bnxt_en-netdev_queue_mgmt_ops' David Wei says: ==================== bnxt_en: implement netdev_queue_mgmt_ops Implement netdev_queue_mgmt_ops for bnxt added in [1]. This will be used in the io_uring ZC Rx patchset to configure queues with a custom page pool w/ a special memory provider for zero copy support. The first two patches prep the driver, while the final patch adds the implementation. Any arbitrary Rx queue can be reset without affecting other queues. V2 and prior of this patchset was thought to only support resetting queues not in the main RSS context. Upon further testing I realised moving queues out and calling bnxt_hwrm_vnic_update() wasn't necessary. I didn't include the netdev core API using this netdev_queue_mgmt_ops because Mina is adding it in his devmem TCP series [2]. But I'm happy to include it if folks want to include a user with this series. I tested this series on BCM957504-N1100FY4 with FW 229.1.123.0. I manually injected failures at all the places that can return an errno and confirmed that the device/queue is never left in a broken state. [1]: https://lore.kernel.org/netdev/20240501232549.1327174-2-shailend@google.com/ [2]: https://lore.kernel.org/netdev/20240607005127.3078656-2-almasrymina@google.com/ v3: - tested w/o bnxt_hwrm_vnic_update() and it works on any queue - removed unneeded code v2: - fix broken build - remove unused var in bnxt_init_one_rx_ring() ==================== Signed-off-by: David S. Miller commit 2d694c27d32efc9467a8a20e4ad641ab5adfd07d Author: David Wei Date: Tue Jun 18 23:29:31 2024 -0700 bnxt_en: implement netdev_queue_mgmt_ops Implement netdev_queue_mgmt_ops for bnxt added in [1]. Two bnxt_rx_ring_info structs are allocated to hold the new/old queue memory. Queue memory is copied from/to the main bp->rx_ring[idx] bnxt_rx_ring_info. Queue memory is pre-allocated in bnxt_queue_mem_alloc() into a clone, and then copied into bp->rx_ring[idx] in bnxt_queue_mem_start(). Similarly, when bp->rx_ring[idx] is stopped its queue memory is copied into a clone, and then freed later in bnxt_queue_mem_free(). I tested this patchset with netdev_rx_queue_restart(), including inducing errors in all places that returns an error code. In all cases, the queue is left in a good working state. Rx queues are created/destroyed using bnxt_hwrm_rx_ring_alloc() and bnxt_hwrm_rx_ring_free(), which issue HWRM_RING_ALLOC and HWRM_RING_FREE commands respectively to the firmware. By the time a HWRM_RING_FREE response is received, there won't be any more completions from that queue. Thanks to Somnath for helping me with this patch. With their permission I've added them as Acked-by. [1]: https://lore.kernel.org/netdev/20240501232549.1327174-2-shailend@google.com/ Acked-by: Somnath Kotur Signed-off-by: David Wei Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 88f56254a27522d3ecf95896ff2e7f57753fe0a5 Author: David Wei Date: Tue Jun 18 23:29:30 2024 -0700 bnxt_en: split rx ring helpers out from ring helpers To prepare for queue API implementation, split rx ring functions out from ring helpers. These new helpers will be called from queue API implementation. Signed-off-by: David Wei Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9413b1be0be644f29423efd6181c82c0802388e9 Merge: 86474deeb5c3e 8a3913c8e05be Author: David S. Miller Date: Fri Jun 21 10:07:18 2024 +0100 Merge branch 'net-cleanup-arc-emac' Johan Jonker says: ==================== cleanup arc emac The Rockchip emac binding for rk3036/rk3066/rk3188 has been converted to YAML with the ethernet-phy node in a mdio node. This requires some driver fixes by someone that can do hardware testing. In order to make a future fix easier make the driver 'Rockchip only' by removing the obsolete part of the arc emac driver. ==================== Signed-off-by: David S. Miller commit 8a3913c8e05beb376572b074ad3c86a955b7dbf4 Author: Johan Jonker Date: Tue Jun 18 18:14:32 2024 +0200 dt-bindings: net: remove arc_emac.txt The last real user nSIM_700 of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so remove arc_emac.txt Signed-off-by: Johan Jonker Acked-by: Conor Dooley Signed-off-by: David S. Miller commit a119aec5bf343be35adb5bee6c60c2d6bb5fdd26 Author: Johan Jonker Date: Tue Jun 18 18:14:14 2024 +0200 net: ethernet: arc: remove emac_arc driver The last real user nSIM_700 of the "snps,arc-emac" compatible string in a driver was removed in 2019. The use of this string in the combined DT of rk3066a/rk3188 as place holder has also been replaced, so remove emac_arc.c to clean up some code. Signed-off-by: Johan Jonker Reviewed-by: Simon Horman Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit a8bd4d7af70d3e042bcffbdc5aa785b30b1a393e Author: Johan Jonker Date: Tue Jun 18 18:13:56 2024 +0200 ARM: dts: rockchip: rk3xxx: fix emac node In the combined DT of rk3066a/rk3188 the emac node uses as place holder the compatible string "snps,arc-emac". The last real user nSIM_700 of the "snps,arc-emac" compatible string in a driver was removed in 2019. Rockchip emac nodes don't make use of this common fall back string. In order to removed unused driver code replace this string with "rockchip,rk3066-emac". As we are there remove the blank lines and sort. Signed-off-by: Johan Jonker Reviewed-by: Heiko Stuebner Signed-off-by: David S. Miller commit 28beb730ee167e505c86d1a8ae239e97d0136b13 Author: Daniel Wagner Date: Mon Jun 17 20:38:04 2024 +0200 tools: build: use correct lib name for libtracefs feature detection Use libtracefs as package name to lookup the CFLAGS for libtracefs. This makes it possible to use the distro specific path as include path for the header file. Link: https://lkml.kernel.org/r/20240617-rtla-build-v1-1-6882c34678e8@suse.de Cc: Daniel Bristot de Oliveira Signed-off-by: Daniel Wagner Signed-off-by: Daniel Bristot de Oliveira commit 77543269ff23c75bebfb8e6e9a1177b350908ea7 Author: Jiaxun Yang Date: Fri Jun 14 16:40:18 2024 +0100 MIPS: Loongson64: env: Hook up Loongsson-2K Somehow those enablement bits were left over when we were adding initial Loongson-2K support. Set up basic information and select proper builtin DTB for Loongson-2K. Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 335819fd5bac67d05ab2d8d7438ac5c475ac03c6 Author: Jiaxun Yang Date: Fri Jun 14 16:40:17 2024 +0100 MIPS: Loongson64: sleeper: Pass ra and sp as arguments Some firmware implementations require restoring ra and sp to be passed as arguments. Passing them as necessary. Fixes: 68557c59a550 ("MIPS: Loongson64: Implement PM suspend for LEFI firmware") Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 4e7ca0b57f3bc09ba3e4ab86bf6b7c35134bfd04 Author: Jiaxun Yang Date: Fri Jun 14 16:40:16 2024 +0100 MIPS: Loongson64: reset: Prioritise firmware service We should always use firmware's poweroff & reboot service if it's available as firmware may need to perform more task than platform's syscon etc. However _machine_restart & poweroff hooks are registered at low priority, which means platform reboot driver can override them. Register firmware based reboot/poweroff implementation with register_sys_off_handler with appropriate priority so that they will be prioritised. Remove _machine_halt hook as it's deemed to be unnecessary. Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit f4d430db17b4ef4e9c3c352a04b2fe3c93011978 Author: Jiaxun Yang Date: Fri Jun 14 16:40:15 2024 +0100 platform: mips: cpu_hwmon: Disable driver on unsupported hardware cpu_hwmon is unsupported on CPUs without loongson_chiptemp register and csr. Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit c04366b1207a036b7de02dfcc1ac7138d3343c9b Author: Jiaxun Yang Date: Fri Jun 14 16:40:14 2024 +0100 MIPS: Loongson64: Test register availability before use Some global register address variable may be missing on specific CPU type, test them before use them. Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit da3f62466e5afc752f8b72146bbc4700dbba5a9f Author: Jiaxun Yang Date: Fri Jun 14 16:40:13 2024 +0100 MIPS: dts: loongson: Add ISA node ISA node is required by Loongson64 platforms to initialize PIO support. Kernel will hang at boot without ISA node. Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 813c18d1ca1987afaf47e035152e1baa1375b1b2 Author: Jiaxun Yang Date: Fri Jun 14 16:40:12 2024 +0100 MIPS: dts: loongson: Fix GMAC phy node phy-mode should be rgmii-id to match hardware configuration. Also there should be a phy-handle to reference phy node. Fixes: f8a11425075f ("MIPS: Loongson64: Add GMAC support for Loongson-2K1000") Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit f70fd92df7529e7283e02a6c3a2510075f13ba30 Author: Jiaxun Yang Date: Fri Jun 14 16:40:11 2024 +0100 MIPS: dts: loongson: Fix ls2k1000-rtc interrupt The correct interrupt line for RTC is line 8 on liointc1. Fixes: e47084e116fc ("MIPS: Loongson64: DTS: Add RTC support to Loongson-2K1000") Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit dbb69b9d6234aad23b3ecd33e5bc8a8ae1485b7d Author: Jiaxun Yang Date: Fri Jun 14 16:40:10 2024 +0100 MIPS: dts: loongson: Fix liointc IRQ polarity All internal liointc interrupts are high level triggered. Fixes: b1a792601f26 ("MIPS: Loongson64: DeviceTree for Loongson-2K1000") Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit b81656c37acf1e682dde02f3e07987784b0f3634 Author: Jiaxun Yang Date: Fri Jun 14 16:40:09 2024 +0100 MIPS: Loongson64: Remove memory node for builtin-dtb Builtin DTBS should never contain memory node as memory is going to be managed by LEFI interface. Remove memory node to prevent confliction. Fixes: b1a792601f26 ("MIPS: Loongson64: DeviceTree for Loongson-2K1000") Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 587f05a88bd49c0c1f4c1b900787cedef461a902 Author: Luis Claudio R. Goncalves Date: Wed Jun 12 07:36:22 2024 -0300 rtla/osnoise: Better report when histogram is empty When osnoise hist does not observe any samples above the threshold, no entries are recorded and the final report shows empty entries for the usual statistics (count, min, max, avg): [~]# osnoise hist -d 5s -T 500 # RTLA osnoise histogram # Time unit is microseconds (us) # Duration: 0 00:00:05 Index over: count: min: avg: max: That could lead users to confusing interpretations of the results. A simple solution is to report 0 for count and the statistics, making it clear that no noise (above the defined threshold) was observed: [~]# osnoise hist -d 5s -T 500 # RTLA osnoise histogram # Time unit is microseconds (us) # Duration: 0 00:00:05 Index over: 0 count: 0 min: 0 avg: 0 max: 0 Link: https://lkml.kernel.org/r/Zml6JmH5cbS7-HfZ@uudg.org Cc: Daniel Bristot de Oliveira Cc: John Kacur Cc: Clark Williams Reviewed-by: John Kacur Signed-off-by: Luis Claudio R. Goncalves Signed-off-by: Daniel Bristot de Oliveira commit 59237b0c962e8a4e03a7666b8c1d047c262f236e Author: Luis Claudio R. Goncalves Date: Mon Jun 10 10:25:28 2024 -0300 rtla/osnoise: Use pretty formatting only on interactive tty osnoise top performs background/font color formatting that could make the text output confusing if not on a terminal. Use the changes from commit f5c0cdad6684a ("rtla/timerlat: Use pretty formatting only on interactive tty") as an inspiration to fix this problem. Apply the formatting only if running on a tty, and not in quiet mode. Link: https://lkml.kernel.org/r/Zmb-yP_3EDHliI8Z@uudg.org Suggested-by: Daniel Bristot de Oliveira Reviewed-by: John Kacur Reviewed-by: Clark Williams Signed-off-by: Luis Claudio R. Goncalves Signed-off-by: Daniel Bristot de Oliveira commit 6aa082910445aec6b1dc652a69c5178a555d8ca5 Author: Ivan Bornyakov Date: Mon Apr 15 13:07:23 2024 +0300 media: chips-media: wave5: support Wave515 decoder Add initial support for the Wave515 multi-decoder IP. For now it is only able to decode HEVC Main/Main10 profile videos into YUV420. This was tested on FPGA prototype, so wave5_dt_ids[] was not expanded. Users of the real hardware with Wave515 IP will have to * provide firmware specific to their SoC * add struct wave5_match_data like this: static const struct wave5_match_data platform_name_wave515_data = { .flags = WAVE5_IS_DEC, .fw_name = "cnm/wave515_platform_name_fw.bin", .sram_size = (71 * 1024), }; * add item to wave5_dt_ids[] like this: { .compatible = "vendor,soc-wave515", .data = &platform_name_wave515_data, }, * describe new compatible in Documentation/devicetree/bindings/media/cnm,wave521c.yaml Signed-off-by: Ivan Bornyakov Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit a83d4a689e3b8966cb1dff0a997946399e76e900 Author: Ivan Bornyakov Date: Mon Apr 15 13:07:22 2024 +0300 media: chips-media: wave5: drop "sram-size" DT property Move the excessive "sram-size" device-tree property to the device match data. Also change the SRAM memory allocation strategy, instead of allocating exactly sram_size bytes, allocate all available SRAM memory up to sram_size. Add the placeholders wave5_vpu_dec_validate_sec_axi() and wave5_vpu_enc_validate_sec_axi() to validate that the allocated SRAM memory is sufficient to decode/encode bitstream with a given resolution. Signed-off-by: Ivan Bornyakov Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 749476d44d2c903a62bcae4e26c4d54d609070f8 Author: Ivan Bornyakov Date: Mon Apr 15 13:07:21 2024 +0300 media: chips-media: wave5: separate irq setup routine Implement a separate setup routine for interrupts to reduce code duplication. Also enable interrupts based on vpu_attr->support_encoders and vpu_attr->support_decoders fields to facilitate support for other Wave5xx IPs, because not all of them are both encoders and decoders. Signed-off-by: Ivan Bornyakov Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 2b9188426b79a0039ff73763f71fce41fbdc1f83 Author: Ivan Bornyakov Date: Mon Apr 15 13:07:20 2024 +0300 media: chips-media: wave5: support reset lines Add initial support for optional reset lines. For now, simply deassert resets while probing the driver and assert them back when removing the driver. Signed-off-by: Ivan Bornyakov Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 143e7ab4d9a0dd84acbd8f666993d6ea921e076b Author: Ivan Bornyakov Date: Mon Apr 15 13:07:19 2024 +0300 media: chips-media: wave5: support decoding HEVC Main10 profile Add support for decoding HEVC Main10 profile by scaling the FBC buffer stride and size by a factor of (bitdepth / 8). Signed-off-by: Ivan Bornyakov Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit cd5a46ce6fa62abedd7740e4bd9f3d82041210ee Author: Martin Hundebøll Date: Fri Jun 7 12:52:08 2024 +0200 can: m_can: don't enable transceiver when probing The m_can driver sets and clears the CCCR.INIT bit during probe (both when testing the NON-ISO bit, and when configuring the chip). After clearing the CCCR.INIT bit, the transceiver enters normal mode, where it affects the CAN bus (i.e. it ACKs frames). This can cause troubles when the m_can node is only used for monitoring the bus, as one cannot setup listen-only mode before the device is probed. Rework the probe flow, so that the CCCR.INIT bit is only cleared when upping the device. First, the tcan4x5x driver is changed to stay in standby mode during/after probe. This in turn requires changes when setting bits in the CCCR register, as its CSR and CSA bits are always high in standby mode. Signed-off-by: Martin Hundebøll Reviewed-by: Markus Schneider-Pargmann Tested-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/all/20240607105210.155435-1-martin@geanix.com Signed-off-by: Marc Kleine-Budde commit 3da74c5145dc729e06e2fb950b4aa196f83bf65f Merge: 3ba5caf39d475 9cdae370c4ec4 Author: Marc Kleine-Budde Date: Fri Jun 21 09:47:18 2024 +0200 Merge patch series "can: hi311x: simplify with spi_get_device_match_data()" Simplify SPI driver by making use of spi_get_device_match_data(). Link: https://lore.kernel.org/all/20240606142424.129709-1-krzysztof.kozlowski@linaro.org [mkl: add intermediate cast to uintptr_t] Signed-off-by: Marc Kleine-Budde commit 9cdae370c4ec415c4057f76c612089068b1ff01a Author: Krzysztof Kozlowski Date: Thu Jun 6 16:24:24 2024 +0200 can: mcp251xfd: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/20240606142424.129709-3-krzysztof.kozlowski@linaro.org Signed-off-by: Marc Kleine-Budde commit d4383d67a25b1972d41423cbeec56f3eecfc45cb Author: Krzysztof Kozlowski Date: Thu Jun 6 16:24:23 2024 +0200 can: mcp251x: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/20240606142424.129709-2-krzysztof.kozlowski@linaro.org [mkl: add intermediate cast to uintptr_t] Signed-off-by: Marc Kleine-Budde commit 1562a49d000c37a3110593e072eb4faa2f83538a Author: Krzysztof Kozlowski Date: Thu Jun 6 16:24:22 2024 +0200 can: hi311x: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/20240606142424.129709-1-krzysztof.kozlowski@linaro.org [mkl: add intermediate cast to uintptr_t] Signed-off-by: Marc Kleine-Budde commit 3ba5caf39d475f5cdd49374628f0e2ad27205487 Merge: 024452fd824af dd1f05ba2a996 Author: Marc Kleine-Budde Date: Fri Jun 21 09:46:34 2024 +0200 Merge patch series "can: kvaser_pciefd: Support MSI interrupts" Martin Jocic says: This patch series adds support for MSI interrupts. It depends on the patch series can: kvaser_pciefd: Minor improvements and cleanups. Link: https://lore.kernel.org/all/20240620181320.235465-1-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit dd1f05ba2a996804567b33faa1110f7a839c71ee Author: Martin Jocic Date: Thu Jun 20 20:13:20 2024 +0200 can: kvaser_pciefd: Add MSI interrupts Use MSI interrupts with fallback to INTx interrupts. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240620181320.235465-3-martin.jocic@kvaser.com [mkl: kvaser_pciefd_probe(): call pci_free_irq_vectors() unconditionally] Signed-off-by: Marc Kleine-Budde commit 48f827d4f48f5243e37b9240029ce3f456d1f490 Author: Martin Jocic Date: Thu Jun 20 20:13:19 2024 +0200 can: kvaser_pciefd: Move reset of DMA RX buffers to the end of the ISR A new interrupt is triggered by resetting the DMA RX buffers. Since MSI interrupts are faster than legacy interrupts, the reset of the DMA buffers must be moved to the very end of the ISR, otherwise a new MSI interrupt will be masked by the current one. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240620181320.235465-2-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 024452fd824af718c4f8999d6aa0775eb8d08128 Merge: cea846cc8f82a 26a1b0fe3f62b Author: Marc Kleine-Budde Date: Fri Jun 21 09:45:30 2024 +0200 Merge patch series "can: kvaser_pciefd: Minor improvements and cleanups" Martin Jocic says: Minor improvements and cleanups for the kvaser_pciefd driver in preparation for an upcoming MSI interrupts patch series. Link: https://lore.kernel.org/all/20240614151524.2718287-1-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 26a1b0fe3f62ba4a853f9d8ba3aa91f27e13f0ff Author: Martin Jocic Date: Fri Jun 14 17:15:24 2024 +0200 can: kvaser_pciefd: Change name of return code variable Replace the variable name err used for return codes with the more generic name ret. An upcoming patch series for adding MSI interrupts will introduce code which also returns values other than return codes. Renaming the variable to ret enables using it for both purposes. This is applied to the whole file to make it consistent. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-8-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit cbf88a6ba7bb6ce0d3131b119298f73bd7b18459 Author: Martin Jocic Date: Fri Jun 14 17:15:23 2024 +0200 can: kvaser_pciefd: Rename board_irq to pci_irq Rename the variable name board_irq in the ISR to pci_irq to be more specific and to match the macro by which it is read. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-7-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit cebfebefaa012afbe49ad5e4d6bb97d573beb32d Author: Martin Jocic Date: Fri Jun 14 17:15:22 2024 +0200 can: kvaser_pciefd: Add unlikely Use unlikely for some unexpected errors. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-6-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 0132a05df1e0119286f51bf757759a7f8e6edaa5 Author: Martin Jocic Date: Fri Jun 14 17:15:21 2024 +0200 can: kvaser_pciefd: Add inline Make the short function kvaser_pciefd_set_tx_irq inline. This function is effectively three lines long and therefore inlining it should be OK according to rule #15 of the Linux kernel coding style. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-5-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 11d186697ceb10b68c6a1fd505635346b1ccd055 Author: Martin Jocic Date: Fri Jun 14 17:15:20 2024 +0200 can: kvaser_pciefd: Remove unnecessary comment The code speaks for itself. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-4-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit ac765219c2c4e44f29063724c8d36435a3e61985 Author: Martin Jocic Date: Fri Jun 14 17:15:19 2024 +0200 can: kvaser_pciefd: Skip redundant NULL pointer check in ISR This check is already done at the creation of the net devices in kvaser_pciefd_setup_can_ctrls called from kvaser_pciefd_probe. If it fails, the driver won't load, so there should be no need to repeat the check inside the ISR. The number of channels is read from the FPGA and should be trusted. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-3-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit cdbc9d055fc7540e6a88ec2bdd7fee46e026156c Author: Martin Jocic Date: Fri Jun 14 17:15:18 2024 +0200 can: kvaser_pciefd: Group #defines together Increases readability Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240614151524.2718287-2-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit cea846cc8f82a65aa46e94d43d532277c6ea93c9 Merge: f9f608e38b9cf 0135c4c6b84c5 Author: Marc Kleine-Budde Date: Fri Jun 21 09:44:55 2024 +0200 Merge patch series "can: kvaser_usb: Add support for three new devices" Martin Jocic says: This patch series adds support for the following devices: * Vining 800 * Kvaser USBcan Pro 5xCAN * Kvaser Mini PCIe 1xCAN Link: https://lore.kernel.org/all/20240612141946.3352364-1-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 0135c4c6b84c50bf7f13626c5367d24ce419e1ce Author: Martin Jocic Date: Wed Jun 12 16:19:46 2024 +0200 can: kvaser_usb: Add support for Kvaser Mini PCIe 1xCAN Add support for Kvaser Mini PCIe 1xCAN, based on the hydra platform. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240612141946.3352364-4-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 96a669a1958ff9d93fc52931e3571c21b13333f2 Author: Martin Jocic Date: Wed Jun 12 16:19:45 2024 +0200 can: kvaser_usb: Add support for Kvaser USBcan Pro 5xCAN Add support for Kvaser USBcan Pro 5xCAN, based on the hydra platform. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240612141946.3352364-3-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit 2851d357a485a358119bc7c1f4ad8f5780debeca Author: Martin Jocic Date: Wed Jun 12 16:19:44 2024 +0200 can: kvaser_usb: Add support for Vining 800 Add support for Vining 800, a branded device based on the hydra platform. Signed-off-by: Martin Jocic Link: https://lore.kernel.org/all/20240612141946.3352364-2-martin.jocic@kvaser.com Signed-off-by: Marc Kleine-Budde commit a8fb5fce7a441d37d106c82235e1f1b57f70f5b9 Author: Ming Qian Date: Thu Oct 19 16:36:36 2023 +0800 media: imx-jpeg: Drop initial source change event if capture has been setup In section 4.5.1.5. Initialization, the step 4 may be skipped and continue with the Capture Setup sequence, so if the capture has been setup, there is no need to trigger the initial source change event, just start decoding, and follow the dynamic resolution change flow if the configured values do not match those parsed by the decoder. And it won't fail the gstreamer pipeline. Fixes: b833b178498d ("media: imx-jpeg: notify source chagne event when the first picture parsed") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil commit f10edd839eb8cef29c1929a2e224b0a9d4132074 Author: Ming Qian Date: Thu Oct 19 16:37:35 2023 +0800 media: imx-jpeg: Remove some redundant error logs If the picture size parsed by decoder is different from those previously established, it's a normal flow of dynamic resolution change, not an error case, the log may mislead that some error occurs in decoding, so remove the error log in this case. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil commit 1021dd010d212ccd770b89c7aff2e2031dc97619 Author: Allen Pais Date: Tue Jun 18 15:52:27 2024 -0700 media: Convert from tasklet to BH workqueue The only generic interface to execute asynchronously in the BH context is tasklet; however, it's marked deprecated and has some design flaws. To replace tasklets, BH workqueue support was recently added. A BH workqueue behaves similarly to regular workqueues except that the queued work items are executed in the BH context. This patch converts drivers/media/* from tasklet to BH workqueue. Based on the work done by Tejun Heo Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil commit d2ae63c2f6a34e0104c046dcf5e03675867e0ad3 Author: Christophe JAILLET Date: Sun Jun 16 08:32:53 2024 +0200 media: cx231xx: Constify struct vb2_ops "struct vb2_ops" are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 36607 1156 0 37763 9383 drivers/media/usb/cx231xx/cx231xx-417.o After: ===== text data bss dec hex filename 36735 1016 0 37751 9377 drivers/media/usb/cx231xx/cx231xx-417.o Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil commit 68594cec291ff9523b9feb3f43fd853dcddd1f60 Author: Chi Zhiling Date: Fri Jun 14 08:22:25 2024 -0700 media: xc2028: avoid use-after-free in load_firmware_cb() syzkaller reported use-after-free in load_firmware_cb() [1]. The reason is because the module allocated a struct tuner in tuner_probe(), and then the module initialization failed, the struct tuner was released. A worker which created during module initialization accesses this struct tuner later, it caused use-after-free. The process is as follows: task-6504 worker_thread tuner_probe <= alloc dvb_frontend [2] ... request_firmware_nowait <= create a worker ... tuner_remove <= free dvb_frontend ... request_firmware_work_func <= the firmware is ready load_firmware_cb <= but now the dvb_frontend has been freed To fix the issue, check the dvd_frontend in load_firmware_cb(), if it is null, report a warning and just return. [1]: ================================================================== BUG: KASAN: use-after-free in load_firmware_cb+0x1310/0x17a0 Read of size 8 at addr ffff8000d7ca2308 by task kworker/2:3/6504 Call trace: load_firmware_cb+0x1310/0x17a0 request_firmware_work_func+0x128/0x220 process_one_work+0x770/0x1824 worker_thread+0x488/0xea0 kthread+0x300/0x430 ret_from_fork+0x10/0x20 Allocated by task 6504: kzalloc tuner_probe+0xb0/0x1430 i2c_device_probe+0x92c/0xaf0 really_probe+0x678/0xcd0 driver_probe_device+0x280/0x370 __device_attach_driver+0x220/0x330 bus_for_each_drv+0x134/0x1c0 __device_attach+0x1f4/0x410 device_initial_probe+0x20/0x30 bus_probe_device+0x184/0x200 device_add+0x924/0x12c0 device_register+0x24/0x30 i2c_new_device+0x4e0/0xc44 v4l2_i2c_new_subdev_board+0xbc/0x290 v4l2_i2c_new_subdev+0xc8/0x104 em28xx_v4l2_init+0x1dd0/0x3770 Freed by task 6504: kfree+0x238/0x4e4 tuner_remove+0x144/0x1c0 i2c_device_remove+0xc8/0x290 __device_release_driver+0x314/0x5fc device_release_driver+0x30/0x44 bus_remove_device+0x244/0x490 device_del+0x350/0x900 device_unregister+0x28/0xd0 i2c_unregister_device+0x174/0x1d0 v4l2_device_unregister+0x224/0x380 em28xx_v4l2_init+0x1d90/0x3770 The buggy address belongs to the object at ffff8000d7ca2000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 776 bytes inside of 2048-byte region [ffff8000d7ca2000, ffff8000d7ca2800) The buggy address belongs to the page: page:ffff7fe00035f280 count:1 mapcount:0 mapping:ffff8000c001f000 index:0x0 flags: 0x7ff800000000100(slab) raw: 07ff800000000100 ffff7fe00049d880 0000000300000003 ffff8000c001f000 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8000d7ca2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8000d7ca2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8000d7ca2300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8000d7ca2380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8000d7ca2400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== [2] Actually, it is allocated for struct tuner, and dvb_frontend is inside. Signed-off-by: Chi Zhiling Signed-off-by: Hans Verkuil commit b5477d5f5272a079e2ddeffd00490528884f5aa5 Author: Johan Hovold Date: Sat Jun 8 17:55:26 2024 +0200 arm64: dts: qcom: sc8280xp-x13s: enable pm8008 camera pmic Enable the PM8008 PMIC which is used to power the camera sensors. Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240608155526.12996-13-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit e7931a52c7b68fb5143e118778092a23cfc5b0fc Author: Tengfei Fan Date: Tue Jun 18 15:22:02 2024 +0800 arm64: dts: qcom: aim300: add AIM300 AIoT Add AIM300 AIoT Carrier board DTS support, including usb, UART, PCIe, I2C functions support. Here is a diagram of AIM300 AIoT Carrie Board and SoM +--------------------------------------------------+ | AIM300 AIOT Carrier Board | | | | +-----------------+ | |power----->| Fixed regulator |---------+ | | +-----------------+ | | | | | | v VPH_PWR | | +----------------------------------------------+ | | | AIM300 SOM | | | | | |VPH_PWR | | | | v | | | | +-------+ +--------+ +------+ | | | | | UFS | | QCS8550| |PMIC | | | | | +-------+ +--------+ +------+ | | | | | | | +----------------------------------------------+ | | | | +----+ +------+ | | |USB | | UART | | | +----+ +------+ | +--------------------------------------------------+ Co-developed-by: Qiang Yu Signed-off-by: Qiang Yu Co-developed-by: Ziyue Zhang Signed-off-by: Ziyue Zhang Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240618072202.2516025-5-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 0b12da4e28d8f6ecb492c98313e325eff11b5bb8 Author: Tengfei Fan Date: Tue Jun 18 15:22:01 2024 +0800 arm64: dts: qcom: add base AIM300 dtsi AIM300 Series is a highly optimized family of modules designed to support AIoT applications. It integrates QCS8550 SoC, UFS and PMIC chip etc. Here is a diagram of AIM300 SoM: +----------------------------------------+ |AIM300 SoM | | | | +-----+ | | |--->| UFS | | | | +-----+ | | | | | | | 3.7v | +-----------------+ | +---------+ | ---------->| PMIC |----->| QCS8550 | | | +-----------------+ +---------+ | | | | | | | | | +-----+ | | |--->| ... | | | +-----+ | | | +----------------------------------------+ Co-developed-by: Fenglin Wu Signed-off-by: Fenglin Wu Reviewed-by: Dmitry Baryshkov Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240618072202.2516025-4-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit bb8a2dc3bd89628a7f4aac577894d47dd0f4db3c Author: Tengfei Fan Date: Tue Jun 18 15:22:00 2024 +0800 arm64: dts: qcom: qcs8550: introduce qcs8550 dtsi QCS8550 is derived from SM8550. The difference between SM8550 and QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used in IoT products. QCS8550 firmware has different memory map compared to SM8550. The memory map will be runtime added through bootloader. There are 3 types of reserved memory regions here: 1. Firmware related regions which aren't shared with kernel. The device tree source in kernel doesn't need to have node to indicate the firmware related reserved information. Bootloader converys the information by updating devicetree at runtime. This will be described as: UEFI saves the physical address of the UEFI System Table to dts file's chosen node. Kernel read this table and add reserved memory regions to efi config table. Current reserved memory region may have reserved region which was not yet used, release note of the firmware have such kind of information. 2. Firmware related memory regions which are shared with Kernel The device tree source in the kernel needs to include nodes that indicate fimware-related shared information. A label name is suggested because this type of shared information needs to be referenced by specific drivers for handling purposes. Unlike previous platforms, QCS8550 boots using EFI and describes most reserved regions in the ESRT memory map. As a result, reserved memory regions which aren't relevant to the kernel(like the hypervisor region) don't need to be described in DT. 3. Remoteproc regions. Remoteproc regions will be reserved and then assigned to subsystem firmware later. Here is a reserved memory map for this platform: 0x80000000 +-------------------+ | | | Firmware Related | | | 0x8a800000 +-------------------+ | | | Remoteproc Region | | | 0xa7000000 +-------------------+ | | | Kernel Available | | | 0xd4d00000 +-------------------+ | | | Firmware Related | | | 0x100000000 +-------------------+ Reviewed-by: Dmitry Baryshkov Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240618072202.2516025-3-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 6d97b93acf9d0b29d3eddf38186d9556e5360368 Author: Tengfei Fan Date: Tue Jun 18 15:21:59 2024 +0800 dt-bindings: arm: qcom: Document QCS8550 SoC and the AIM300 AIoT board Document QCS8550 SoC and the AIM300 AIoT board bindings. QCS8550 is derived from SM8550. The difference between SM8550 and QCS8550 is QCS8550 doesn't have modem RF system. QCS8550 is mainly used in IoT scenarios. AIM300 Series is a highly optimized family of modules designed to support AIoT applications. It integrates QCS8550 SoC, UFS and PMIC chip etc. AIM stands for Artificial Intelligence Module. AIoT stands for AI IoT. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240618072202.2516025-2-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 38b55ddb4a9f364b68cb1db174cadfae7cf4696e Author: Komal Bajaj Date: Mon Jun 17 17:26:24 2024 +0530 arm64: dts: qcom: qdu1000: fix usb interrupts properties Update the usb interrupts properties to fix the following bindings check errors: usb@a6f8800: interrupt-names:0: 'pwr_event' was expected from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml# usb@a6f8800: interrupt-names:1: 'hs_phy_irq' was expected from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml# usb@a6f8800: interrupt-names: ['hs_phy_irq', 'ss_phy_irq', 'dm_hs_phy_irq', 'dp_hs_phy_irq'] is too short from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml# Fixes: dd1bd5bf7420 ("arm64: dts: qcom: qdu1000: Add USB3 and PHY support") Cc: Krishna Kurapati Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406171241.YKuCm3SC-lkp@intel.com/ Signed-off-by: Komal Bajaj Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240617115624.29875-1-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit b45120fbd39825ca0d32e39309c30a9e9d567cd8 Author: Luo Jie Date: Mon Jun 17 17:38:06 2024 +0800 clk: qcom: nsscc-qca8k: Fix the MDIO functions undefined issue The clock controller driver of QCA8K depends on MDIO_BUS because of mdio_module_driver used to register the driver. This patch fixes the following undefined symbols. ERROR: modpost: "mdio_driver_register" [drivers/clk/qcom/nsscc-qca8k.ko] undefined! ERROR: modpost: "mdio_driver_unregister" [drivers/clk/qcom/nsscc-qca8k.ko] undefined! ERROR: modpost: "__mdiobus_write" [drivers/clk/qcom/nsscc-qca8k.ko] undefined! ERROR: modpost: "__mdiobus_read" [drivers/clk/qcom/nsscc-qca8k.ko] undefined! Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406161634.B27sOs8B-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202406162047.QkUMa2fG-lkp@intel.com/ Signed-off-by: Luo Jie Link: https://lore.kernel.org/r/20240617093806.3461165-1-quic_luoj@quicinc.com Signed-off-by: Bjorn Andersson commit 24086640ab39396eb1a92d1cb1cd2f31b2677c52 Author: Sibi Sankar Date: Thu Jun 13 22:15:06 2024 +0530 soc: qcom: icc-bwmon: Fix refcount imbalance seen during bwmon_remove The following warning is seen during bwmon_remove due to refcount imbalance, fix this by releasing the OPPs after use. Logs: WARNING: at drivers/opp/core.c:1640 _opp_table_kref_release+0x150/0x158 Hardware name: Qualcomm Technologies, Inc. X1E80100 CRD (DT) ... Call trace: _opp_table_kref_release+0x150/0x158 dev_pm_opp_remove_table+0x100/0x1b4 devm_pm_opp_of_table_release+0x10/0x1c devm_action_release+0x14/0x20 devres_release_all+0xa4/0x104 device_unbind_cleanup+0x18/0x60 device_release_driver_internal+0x1ec/0x228 driver_detach+0x50/0x98 bus_remove_driver+0x6c/0xbc driver_unregister+0x30/0x60 platform_driver_unregister+0x14/0x20 bwmon_driver_exit+0x18/0x524 [icc_bwmon] __arm64_sys_delete_module+0x184/0x264 invoke_syscall+0x48/0x118 el0_svc_common.constprop.0+0xc8/0xe8 do_el0_svc+0x20/0x2c el0_svc+0x34/0xdc el0t_64_sync_handler+0x13c/0x158 el0t_64_sync+0x190/0x194 --[ end trace 0000000000000000 ]--- Fixes: 0276f69f13e2 ("soc: qcom: icc-bwmon: Set default thresholds dynamically") Fixes: b9c2ae6cac40 ("soc: qcom: icc-bwmon: Add bandwidth monitoring driver") Signed-off-by: Sibi Sankar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240613164506.982068-1-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit bd37ce2eeb84cd42ec8edebaa3cb8cffade2dc0c Author: Bartosz Golaszewski Date: Wed Jun 5 14:27:29 2024 +0200 arm64: dts: qcom: qrb5165-rb5: add the Wifi node Add a node for the PMU module of the QCA6391 present on the RB5 board. Assign its LDO power outputs to the existing Bluetooth module. Add a node for the PCIe port to sm8250.dtsi and define the WLAN node on it in the board's .dts and also make it consume the power outputs of the PMU. Tested-by: Caleb Connolly # OnePlus 8T Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240605122729.24283-5-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit 4d76a2314810b78b0469c96bcb265af1af7e13a5 Author: Neil Armstrong Date: Wed Jun 5 14:27:28 2024 +0200 arm64: dts: qcom: sm8650-hdk: add the Wifi node Describe the ath12k WLAN on-board the WCN7850 module present on the board. Signed-off-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8650-HDK Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240605122729.24283-4-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit a05737bf76316677ae1d7af93df6218dcf1ae494 Author: Bartosz Golaszewski Date: Wed Jun 5 14:27:27 2024 +0200 arm64: dts: qcom: sm8650-qrd: add the Wifi node Describe the ath12k WLAN on-board the WCN7850 module present on the board. [Neil: authored the initial version of the change] Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8650-QRD Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240605122729.24283-3-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit 4908128724491de1feadee87aba9955eccaf5269 Author: Bartosz Golaszewski Date: Wed Jun 5 14:27:26 2024 +0200 arm64: dts: qcom: sm8550-qrd: add the Wifi node Describe the ath12k WLAN on-board the WCN7850 module present on the board. [Neil: authored the initial version of the change] Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Bartosz Golaszewski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240605122729.24283-2-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit f8d1dca6c44dff362102b1f535b6dab552edb760 Author: Lukas Bulwahn Date: Thu Jun 20 22:14:31 2024 +0200 clk: qcom: select right config in CLK_QCM2290_GPUCC definition Commit 8cab033628b1 ("clk: qcom: Add QCM2290 GPU clock controller driver") adds the config CLK_QCM2290_GPUCC, which intends to select the support for the QCM2290 Global Clock Controller. It however selects the non-existing config CLK_QCM2290_GCC, whereas the config for the QCM2290 Global Clock Controller is named QCM_GCC_2290. Adjust the config to the intended one. Signed-off-by: Lukas Bulwahn Fixes: 8cab033628b1 ("clk: qcom: Add QCM2290 GPU clock controller driver") Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240620201431.93254-1-lukas.bulwahn@redhat.com Signed-off-by: Bjorn Andersson commit 847ee7c314b88cc77e13cd91f87f50e36d108fdc Author: Komal Bajaj Date: Thu Jun 20 16:57:16 2024 +0530 arm64: defconfig: Enable secure QFPROM driver Enable the secure QFPROM driver used by Qualcomm QDU1000 platform to read the secure qfprom region allowing LLCC driver to get the DDR channel configuration. Currently, LLCC is the only user of secure QFPROM, and hence setting CONFIG_NVMEM_QCOM_SEC_QFPROM as module to the convenience of LLCC module. Signed-off-by: Komal Bajaj Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240620112716.1339-1-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit e429be706f2a1bd0c9a780793fff6b3784fb4204 Author: Elliot Berman Date: Wed Jun 19 08:41:52 2024 -0700 clk: qcom: Remove QCOM_RPMCC symbol This symbol is selected by a couple drivers, but isn't used by anyone and hasn't been for years now. Drop it. No functional change intended. Signed-off-by: Elliot Berman Reviewed-by: Mike Tipton Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240619-drop-qcom-rpmcc-v1-1-b487c95162ef@quicinc.com Signed-off-by: Bjorn Andersson commit a39e850037fa520b3e089d4d11b3c3baef4de41e Author: Lin, Meng-Bo Date: Wed Jun 19 11:15:29 2024 +0000 arm64: dts: qcom: msm8916-gplus-fl8005a: Add sound and modem Enable sound and modem for the GPLUS FL8005A. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240619111523.54301-1-linmengbo06890@proton.me Signed-off-by: Bjorn Andersson commit e160c41b96b6d6f38b8646e3c914c630da21e105 Author: Luca Weiss Date: Tue Jun 18 15:30:55 2024 +0200 arm64: dts: qcom: qcm6490-shift-otter: Name the regulators Without explicitly specifying names for the regulators they are named based on the DeviceTree node name. This results in multiple regulators with the same name, making debug prints and regulator_summary impossible to reason about. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20240618-qcm6490-regulator-name-v1-2-69fa05e9f58e@fairphone.com Signed-off-by: Bjorn Andersson commit 4c3849513fa1b4d9f6fbe08ecd65e2d6ae19c1fb Author: Luca Weiss Date: Tue Jun 18 15:30:54 2024 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Name the regulators Without explicitly specifying names for the regulators they are named based on the DeviceTree node name. This results in multiple regulators with the same name, making debug prints and regulator_summary impossible to reason about. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240618-qcm6490-regulator-name-v1-1-69fa05e9f58e@fairphone.com Signed-off-by: Bjorn Andersson commit 367fb3f0aaa6eac9101dc683dd27c268b4cc702e Author: Komal Bajaj Date: Tue Jun 18 14:57:11 2024 +0530 arm64: dts: qcom: qdu1000: Add secure qfprom node Add secure qfprom node and also add properties for multi channel DDR. This is required for LLCC driver to pick the correct LLCC configuration. Fixes: 6209038f131f ("arm64: dts: qcom: qdu1000: Add LLCC/system-cache-controller") Signed-off-by: Komal Bajaj Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20240618092711.15037-1-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit 99e94768c890c7522af020ff0e5e5317b2d046d9 Author: Nícolas F. R. A. Prado Date: Fri Jun 14 16:59:36 2024 -0400 arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused Currently the keyboard backlight is described in the common sc7180-trogdor dtsi as an led node below a pwmleds node, and the led node is set to disabled. Only the boards that have a keyboard backlight enable it. However, since the parent pwmleds node is still enabled everywhere, even on boards that don't have keyboard backlight it is probed and fails, resulting in an error: leds_pwm pwmleds: probe with driver leds_pwm failed with error -22 as well as a failure in the DT kselftest: not ok 45 /pwmleds Fix this by controlling the status of the parent pwmleds node instead of the child led, based on the presence of keyboard backlight. This is what is done on sc7280 already. While at it add a missing blank line before the child node to follow the coding style. Fixes: 7ec3e67307f8 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Konrad Dybcio Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240614-sc7180-pwmleds-probe-v1-1-e2c3f1b42a43@collabora.com Signed-off-by: Bjorn Andersson commit dc323623c3b87c48c99fe8dbbd1962f0129d3da9 Author: Dmitry Baryshkov Date: Fri Jun 14 13:18:28 2024 +0300 arm64: dts: qcom: sm8650: drop second clock name from clock-output-names There is no need to specify exact name for the second (AUX) output clock. It has never been used for the lookups based on the system clock name. The driver generates it on its own, in order to remain compatible with the older DT. Drop the clock name. Fixes: d00b42f170df ("arm64: dts: qcom: sm8650: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk") Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240614-fix-pcie-phy-compat-v3-5-730d1811acf4@linaro.org Signed-off-by: Bjorn Andersson commit 84ea430eb0719ebe4c423bdc9c92e0f94a46a47e Author: Dmitry Baryshkov Date: Fri Jun 14 13:18:27 2024 +0300 arm64: dts: qcom: sm8550: drop second clock name from clock-output-names There is no need to specify exact name for the second (AUX) output clock. It has never been used for the lookups based on the system clock name. The driver generates it on its own, in order to remain compatible with the older DT. Drop the clock name. Fixes: 0cc97d9e3fdf ("arm64: dts: qcom: sm8550: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk") Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240614-fix-pcie-phy-compat-v3-4-730d1811acf4@linaro.org Signed-off-by: Bjorn Andersson commit 831f66d3423c22457ec1d686e565e152b10fbd91 Author: Dmitry Baryshkov Date: Fri Jun 14 13:18:26 2024 +0300 arm64: dts: qcom: sm8450: drop second clock name from clock-output-names There is no need to specify exact name for the second (AUX) output clock. It has never been used for the lookups based on the system clock name. The driver generates it on its own, in order to remain compatible with the older DT. Drop the clock name. Fixes: e76862840660 ("arm64: dts: qcom: sm8450: correct pcie1 phy clocks inputs to gcc") Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240614-fix-pcie-phy-compat-v3-3-730d1811acf4@linaro.org Signed-off-by: Bjorn Andersson commit 060a1ebd91c1f1bdce8433d559f214204b835add Author: Bjorn Andersson Date: Fri Jun 14 02:43:43 2024 +0300 arm64: dts: qcom: c630: Add Embedded Controller node The Embedded Controller in the Lenovo Yoga C630 is accessible on &i2c1 and provides battery and adapter status, as well as altmode notifications for the second USB Type-C port. Add a definition for the EC. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240614-yoga-ec-driver-v7-6-9f0b9b40ae76@linaro.org Signed-off-by: Bjorn Andersson commit 1ef3a30f4dc953a8da7aa68ee4658dc7c3710aac Author: Dmitry Baryshkov Date: Fri Jun 14 02:43:42 2024 +0300 arm64: dts: qcom: sdm845: describe connections of USB/DP port Describe links between the first USB3 host and the DisplayPort that is routed to the same pins. Reviewed-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240614-yoga-ec-driver-v7-5-9f0b9b40ae76@linaro.org Signed-off-by: Bjorn Andersson commit 04b1deb821ea7f313d24a9aaf4c592375d688d39 Merge: 75287992f58a7 81bbb2b891174 Author: Bjorn Andersson Date: Thu Jun 20 22:57:26 2024 -0500 Merge branch '20240430-a750-raytracing-v3-2-7f57c5ac082d@gmail.com' into drivers-for-6.11 Merge SMEM and SCM patches related to GPU features through a topic branch to make it possible to share these with the msm-next DRM tree. commit 81bbb2b891174da9301fc0d4fe9622bd4cb6a995 Author: Konrad Dybcio Date: Wed Jun 5 22:10:15 2024 +0200 soc: qcom: smem: Add a feature code getter Recent (SM8550+ ish) Qualcomm SoCs have a new mechanism for precisely identifying the specific SKU and the precise speed bin (in the general meaning of this word, anyway): a pair of values called Product Code and Feature Code. Based on this information, we can deduce the available frequencies for things such as Adreno. In the case of Adreno specifically, Pcode is useless for non-prototype SoCs. Introduce a getter for the feature code and export it. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605-topic-smem_speedbin-v2-2-8989d7e3d176@linaro.org Signed-off-by: Bjorn Andersson commit 9267997fa7aa0b597e8b32cb3fdfe91be1d35a83 Author: Konrad Dybcio Date: Wed Jun 5 22:10:14 2024 +0200 soc: qcom: Move some socinfo defines to the header In preparation for parsing the chip "feature code" (FC) and "product code" (PC) (essentially the parameters that let us conclusively characterize the sillicon we're running on, including various speed bins), move the socinfo version defines to the public header. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605-topic-smem_speedbin-v2-1-8989d7e3d176@linaro.org Signed-off-by: Bjorn Andersson commit 158ed777e330e9bf6bd592daaf1e860d965ec8b5 Author: Connor Abbott Date: Tue Apr 30 11:43:16 2024 +0100 firmware: qcom: scm: Add gpu_init_regs call This will used by drm/msm to initialize GPU registers that Qualcomm's firmware doesn't make writeable to the kernel. Reviewed-by: Dmitry Baryshkov Signed-off-by: Connor Abbott Reviewed-by: Konrad Dybcio Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240430-a750-raytracing-v3-2-7f57c5ac082d@gmail.com Signed-off-by: Bjorn Andersson commit 1ae7a19e37630d3235bc68cac9da4e032cad8136 Merge: bf977ee4a9e2a 8cab7cdcf5aeb Author: Alexei Starovoitov Date: Thu Jun 20 20:42:45 2024 -0700 Merge branch 'use-network-helpers-part-7' Geliang Tang says: ==================== use network helpers, part 7 From: Geliang Tang v6: - update ASSERT strings in patch 4 as Eduard suggested. (thanks) v5: - update patch 1, add getsockopt(SO_PROTOCOL) in connect_to_fd() to fix errors reported by CI. v4: - fix errors reported by CI. v3: - rename start_client to client_socket - Use connect_to_addr in connect_to_fd_opt v2: - update patch 2, extract a new helper start_client. - drop patch 3, keep must_fail in network_helper_opts. Drop type and noconnect from network_helper_opts. And use start_server_str in mptcp and test_tcp_check_syncookie_user. Patches 1-4 address Martin's comments in the previous series. ==================== Link: https://lore.kernel.org/r/cover.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit 8cab7cdcf5aebec354ede98bca28c08dd9df924c Author: Geliang Tang Date: Fri Jun 21 10:16:03 2024 +0800 selftests/bpf: Use start_server_str in test_tcp_check_syncookie_user Since start_server_str() is added now, it can be used in script test_tcp_check_syncookie_user.c instead of start_server_addr() to simplify the code. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/5d2f442261d37cff16c1f1b21a2b188508ab67fa.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit fb69f71cf585aabb2f59c6d7958bccfaebe64f5d Author: Geliang Tang Date: Fri Jun 21 10:16:02 2024 +0800 selftests/bpf: Use start_server_str in mptcp Since start_server_str() is added now, it can be used in mptcp.c in start_mptcp_server() instead of using helpers make_sockaddr() and start_server_addr() to simplify the code. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/16fb3e2cd60b64b5470b0e69f1aa233feaf2717c.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit 7f0d5140a6d69d3e63467a220a2a1e0c9ec1463a Author: Geliang Tang Date: Fri Jun 21 10:16:01 2024 +0800 selftests/bpf: Drop noconnect from network_helper_opts In test_bpf_ip_check_defrag_ok(), the new helper client_socket() can be used to replace connect_to_fd_opts() with "noconnect" opts, and the strcut member "noconnect" of network_helper_opts can be dropped now, always connect to server in connect_to_fd_opts(). Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/f45760becce51986e4e08283c7df0f933eb0da14.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit bbca57aa378b43d25af2ec360b3e8bc4185d65cf Author: Geliang Tang Date: Fri Jun 21 10:16:00 2024 +0800 selftests/bpf: Add client_socket helper This patch extracts a new helper client_socket() from connect_to_fd_opts() to create the client socket, but don't connect to the server. Then connect_to_fd_opts() can be implemented using client_socket() and connect_fd_to_addr(). This helper can be used in connect_to_addr() too, and make "noconnect" opts useless. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/4169c554e1cee79223feea49a1adc459d55e1ffe.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit 08a5206240d3763e0c6d91a9a4a9bfbb8fc9600c Author: Geliang Tang Date: Fri Jun 21 10:15:59 2024 +0800 selftests/bpf: Use connect_to_addr in connect_to_fd_opt This patch moves "post_socket_cb" and "noconnect" into connect_to_addr(), then connect_to_fd_opts() can be implemented by getsockname() and connect_to_addr(). This change makes connect_to_* interfaces more unified. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/4569c30533e14c22fae6c05070aad809720551c1.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit 34ad6ec972525b903d4680202d7b8360f71d0d89 Author: Geliang Tang Date: Fri Jun 21 10:15:58 2024 +0800 selftests/bpf: Drop type from network_helper_opts The opts.{type, noconnect} is at least a bit non intuitive or unnecessary. The only use case now is in test_bpf_ip_check_defrag_ok which ends up bypassing most (or at least some) of the connect_to_fd_opts() logic. It's much better that test should have its own connect_to_fd_opts() instead. This patch adds a new "type" parameter for connect_to_fd_opts(), then opts->type and getsockopt(SO_TYPE) can be replaced by "type" parameter in it. In connect_to_fd(), use getsockopt(SO_TYPE) to get "type" value and pass it to connect_to_fd_opts(). In bpf_tcp_ca.c and cgroup_v1v2.c, "SOCK_STREAM" types are passed to connect_to_fd_opts(), and in ip_check_defrag.c, different types "SOCK_RAW" and "SOCK_DGRAM" are passed to it. With these changes, the strcut member "type" of network_helper_opts can be dropped now. Acked-by: Eduard Zingerman Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/cfd20b5ad4085c1d1af5e79df3b09013a407199f.1718932493.git.tanggeliang@kylinos.cn Signed-off-by: Alexei Starovoitov commit 4552a6a42a3a87f3a9a6efcda02c6ee9a0b27537 Merge: ab3d8479626d2 d754ed2821fd9 Author: Dave Airlie Date: Fri Jun 21 13:11:23 2024 +1000 Merge tag 'drm-intel-next-2024-06-19' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next drm/i915 feature pull for v6.11: Features and functionality: - Battlemage (BMG) Xe2 HPD display enabling (Balasubramani, Clint, Gustavo, José, Matt, Anusha, Lucas, Ravi, Radhakrishna, Nirmoy, Ankit, Matthew) - Panel Replay enabling (Jouni, Animesh) - DP AUX-less ALPM (Advanced Link Power Management) and LOBF (Link off between frames) enabling (Animesh, Jouni) - Enable link training failure fallback for DP MST links (Imre) - CMRR (Content Match Refresh Rate) enabling (Mitul) - Allow the first async flip to change modifier (Ville) - Enable eDP AUX based HDR backlight (Suraj) - Increase ADL-S/ADL-P/DG2+ max TMDS bitrate to 6 Gbps (Ville) Refactoring and cleanups: - Stop using implicit dev_priv local variable in macros (Jani) - Expand and clean up VBT table definitions (Ville) - PSR/ALPM refactoring (Jouni, Animesh) - Plane fb refactoring (Ville) - Rawclk, FSB, and mem frequency refactoring (Jani) - GVT register macro usage cleanups (Jani, Ville) - Plane, cursor, wm and ddb register macro and usage cleanups (Ville) - Pipe CRC register macro cleanups (Ville) - PCI ID macro cleanups and refactoring to match xe style (Jani) - Move drm-intel repo to gitlab.freedesktop.org (Ryszard) - Identify all platforms/subplatforms in display probe (Jani) - Move Intel drm headers under include/drm/intel (Jani) - Drop local redundant W=1 warnings in favour of drm subsystem warnigs (Jani) - Include cleanups; include what you use (Jani) - Convert overlay and DMC error state printing to drm_printer (Jani) - Joiner renames (Stan) - DSB interface cleanups (Ville) - Improve workaround for disabling FBC when VT-d is active (Vinod) - State checker refactoring and cleanups for color, planes and cdclk (Ville) - Cleanups around scanline arithmetic (Ville) - Use drm_crtc_vblank_crtc() instead of open coding (Ville) - DSC cleanups (Ville) Fixes: - Improve VBT array bounds check (Luca) - LNL PSR fixes (Jouni) - Audio workaround, disable min hblank fix (Uma) - Stop selecting ACPI_BUTTON config (Jani) - Add MTL Cx0 PHY config compare (Mika) - Fix MTL C20 PHY port clock verification (Mika) - Fix static analyzer warning for uapi.event access (Luca) - HDCP fixes and workarounds (Suraj) - Fix DP MST DSC input BPP computation (Imre) - Fix assert on pending async-put power domain work (Imre) - Fix documentation build for DMC wakelocks (Luca) - Disable DSC on eDP when indicated by VBT (Ville) DRM Core changes: - Various DPCD register additions for panel replay and ALPM (Jouni) - Add target_rr_divider to adaptive sync SDP (Mitul) Xe driver changes: - Remove unused xe->enabled_irq_mask and xe->sb_lock members (Jani) - i915 display compat header cleanups (Jani) - Remove redundant copy of intel_fbdev_fb.h (Ville) - Add process name to devcoredump (José) - Add xe_gt_err_once() (Matthew) - Implement transient flush for BMG/Xe3 (Nirmoy) Merges: - Backmerges to sync with xe, drm-misc and upstream (Rodrigo, Jani) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87y170eu80.fsf@intel.com commit e8f555daacd3377bf691fdda2490c0b164e00085 Author: Meng Li Date: Tue Feb 27 15:11:33 2024 +0800 cpufreq/amd-pstate: fix setting policy current frequency value When scaling min/max freq values were being setted, the value of policy->cur need to update. Signed-off-by: Meng Li Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/20240227071133.3405003-1-li.meng@amd.com Signed-off-by: Mario Limonciello commit 4e4f600ee750facedf6a5dc97e8ae0b627ab4573 Author: Perry Yuan Date: Wed Jun 19 23:40:19 2024 +0800 cpufreq: amd-pstate: auto-load pstate driver by default If the `amd-pstate` driver is not loaded automatically by default, it is because the kernel command line parameter has not been added. To resolve this issue, it is necessary to call the `amd_pstate_set_driver()` function to enable the desired mode (passive/active/guided) before registering the driver instance. This ensures that the driver is loaded correctly without relying on the kernel command line parameter. When there is no parameter added to command line, Kernel config will provide the default mode to load. Meanwhile, user can add driver mode in command line which will override the kernel config default option. Reported-by: Andrei Amuraritei Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218705 Signed-off-by: Perry Yuan Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/83301c4cea4f92fb19e14b23f2bac7facfd8bdbb.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit 918263938c41dac46935609477672442e8fa5d9e Author: Perry Yuan Date: Wed Jun 19 23:40:18 2024 +0800 cpufreq: amd-pstate: enable shared memory type CPPC by default The amd-pstate-epp driver has been implemented and resolves the performance drop issue seen in passive mode for shared memory type CPPC systems. Users who enable the active mode driver will not experience a performance drop compared to the passive mode driver. Therefore, the EPP driver should be loaded by default for shared memory type CPPC system to get better performance. Signed-off-by: Perry Yuan Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/c705507cf3ee790e544251cfd897ed11e8e57712.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit c9fdaba8369ea6ca01728ed9c25c6ca1b90d3355 Author: Perry Yuan Date: Wed Jun 19 23:40:17 2024 +0800 cpufreq: amd-pstate: switch boot_cpu_has() to cpu_feature_enabled() replace the usage of the deprecated boot_cpu_has() function with the modern cpu_feature_enabled() function. The switch to cpu_feature_enabled() ensures compatibility with the latest CPU feature detection mechanisms and improves code maintainability. Acked-by: Mario Limonciello Suggested-by: Borislav Petkov (AMD) Signed-off-by: Perry Yuan Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/f1567593ac5e1d38343067e9c681a8c4b0707038.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit 1d53f30b3aa6120ca91789254cb2dfff9ff8c533 Author: Perry Yuan Date: Wed Jun 19 23:40:16 2024 +0800 Documentation: PM: amd-pstate: add guided mode to the Operation mode the guided mode is also supported, so the operation mode should include that mode as well. Reviewed-by: Mario Limonciello Signed-off-by: Perry Yuan Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/a61d825ef71f6aacc8f1624fe9fb982b8446b5a7.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit bff7d13c190ad98cf4f877189b022c75df4cb383 Author: Perry Yuan Date: Wed Jun 19 23:40:15 2024 +0800 cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS If CPPC feature is supported by the CPU however the CPUID flag bit is not set by SBIOS, the `amd_pstate` will be failed to load while system booting. So adding one more debug message to inform user to check the SBIOS setting, The change also can help maintainers to debug why amd_pstate driver failed to be loaded at system booting if the processor support CPPC. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218686 Signed-off-by: Perry Yuan Reviewed-by: Gautham R. Shenoy Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/42c953616ac121bd1e5c329e83d015a02e6b32c7.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit cb817ec6673b7c2faed2141e7f7ae5d7052b2442 Author: Perry Yuan Date: Wed Jun 19 23:40:14 2024 +0800 cpufreq: amd-pstate: show CPPC debug message if CPPC is not supported Add CPU ID checking in case the driver attempt to load on systems where CPPC functionality is unavailable. And the warning message will not be shown if CPPC is not supported. It will also print debug message if the CPU has no CPPC support that helps to debug the driver loading failure issue. Reported-by: Paul Menzel Closes: https://lore.kernel.org/linux-pm/CYYPR12MB8655D32EA18574C9497E888A9C122@CYYPR12MB8655.namprd12.prod.outlook.com/T/#t Signed-off-by: Perry Yuan Reviewed-by: Gautham R. Shenoy Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/437dbd581a4119465581330081d9b1e289482ba2.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit 7bf7f22906671995b798b39f8c3cb62405ea03b2 Author: Perry Yuan Date: Wed Jun 19 23:40:13 2024 +0800 cpufreq: amd-pstate: remove unused variable nominal_freq removed the unused variable `nominal_freq` for build warning. This variable was defined and assigned a value in the previous code, but it was not used in the subsequent code. Closes: https://lore.kernel.org/oe-kbuild-all/202405080431.BPU6Yg9s-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Perry Yuan Reviewed-by: Gautham R. Shenoy Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/b7ef41557f71d40d098393ddb27f0fe1f23648ae.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit 8f8b42c1fcc939a73b547b172a9ffcb65ef4bf47 Author: Perry Yuan Date: Wed Jun 19 23:40:12 2024 +0800 cpufreq: amd-pstate: optimize the initial frequency values verification To enhance the debugging capability of the driver loading failure for broken CPPC ACPI tables, it can optimize the expression by moving the verification of `min_freq`, `nominal_freq`, and other dependency values to the `amd_pstate_init_freq()` function where they are initialized. If any of these values are incorrect, the `amd-pstate` driver will not be registered. By ensuring that these values are correct before they are used, it will facilitate the debugging process when encountering driver loading failures due to faulty CPPC ACPI tables from BIOS Signed-off-by: Perry Yuan Acked-by: Gautham R. Shenoy Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/f9793f8451c1832e34cc9dc35f89c653b39cfe38.1718811234.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello commit fc6e0837264a8b2504b6160e63ec92eb012540f3 Author: Mario Limonciello Date: Wed Jun 12 09:20:49 2024 -0500 cpufreq: amd-pstate: Allow users to write 'default' EPP string The EPP string for 'default' represents what the firmware had configured as the default EPP value but once a user changes EPP to another string they can't reset it back to 'default'. Cache the firmware EPP value and allow the user to write 'default' using this value. Reported-by: Artem S. Tashkinov Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217931#c61 Reviewed-by: Perry Yuan Signed-off-by: Mario Limonciello commit bf977ee4a9e2ad8a41b3a2497aada5e7eb09eaea Merge: 3b06304370931 21ab4980e02d4 Author: Alexei Starovoitov Date: Thu Jun 20 19:50:27 2024 -0700 Merge branch 'fix-compiler-warnings-looking-for-suggestions' Rafael Passos says: ==================== Fix compiler warnings, looking for suggestions Hi, This patchset has a few fixes to compiler warnings. I am studying the BPF subsystem and wish to bring more tangible contributions. I would appreciate receiving suggestions on things to investigate. I also documented a bit in my blog. I could help with docs here, too. https://rcpassos.me/post/linux-ebpf-understanding-kernel-level-mechanics Thanks! Changelog V1 -> V2: - rebased all commits to updated for-next base - removes new cases of the extra parameter for bpf_jit_binary_pack_finalize - built and tested for ARM64 - sent the series for the test workflow: https://github.com/kernel-patches/bpf/pull/7198 ==================== Acked-by: Puranjay Mohan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20240615022641.210320-1-rafael@rcpassos.me Signed-off-by: Alexei Starovoitov commit 21ab4980e02d495174bc64c00ceb4d3cf87fadb1 Author: Rafael Passos Date: Fri Jun 14 23:24:10 2024 -0300 bpf: remove redeclaration of new_n in bpf_verifier_vlog This new_n is defined in the start of this function. Its value is overwritten by `new_n = min(n, log->len_total);` a couple lines before my change, rendering the shadow declaration unnecessary. Signed-off-by: Rafael Passos Link: https://lore.kernel.org/r/20240615022641.210320-4-rafael@rcpassos.me Signed-off-by: Alexei Starovoitov commit ab224b9ef7c4eaa752752455ea79bd7022209d5d Author: Rafael Passos Date: Fri Jun 14 23:24:09 2024 -0300 bpf: remove unused parameter in __bpf_free_used_btfs Fixes a compiler warning. The __bpf_free_used_btfs function was taking an extra unused struct bpf_prog_aux *aux param Signed-off-by: Rafael Passos Link: https://lore.kernel.org/r/20240615022641.210320-3-rafael@rcpassos.me Signed-off-by: Alexei Starovoitov commit 9919c5c98cb25dbf7e76aadb9beab55a2a25f830 Author: Rafael Passos Date: Fri Jun 14 23:24:08 2024 -0300 bpf: remove unused parameter in bpf_jit_binary_pack_finalize Fixes a compiler warning. the bpf_jit_binary_pack_finalize function was taking an extra bpf_prog parameter that went unused. This removves it and updates the callers accordingly. Signed-off-by: Rafael Passos Link: https://lore.kernel.org/r/20240615022641.210320-2-rafael@rcpassos.me Signed-off-by: Alexei Starovoitov commit 3b06304370931f90cd6f50ea9dd55603429b13dc Merge: f6afdaf72af75 f663a03c8e35c Author: Alexei Starovoitov Date: Thu Jun 20 19:48:29 2024 -0700 Merge branch 'bpf-verifier-correct-tail_call_reachable-for-bpf-prog' Leon Hwang says: ==================== bpf, verifier: Correct tail_call_reachable for bpf prog It's confusing to inspect 'prog->aux->tail_call_reachable' with drgn[0], when bpf prog has tail call but 'tail_call_reachable' is false. This patch corrects 'tail_call_reachable' when bpf prog has tail call. Therefore, it's unnecessary to detect tail call in x86 jit. Let's remove it. Changes: v1 -> v2: * Address comment from Yonghong: * Remove unnecessary tail call detection in x86 jit. Acked-by: Eduard Zingerman --- Links: [0] https://github.com/osandov/drgn ==================== Link: https://lore.kernel.org/r/20240610124224.34673-1-hffilwlqm@gmail.com Signed-off-by: Alexei Starovoitov commit f663a03c8e35c5156bad073a4a8f5e673d656e3f Author: Leon Hwang Date: Mon Jun 10 20:42:24 2024 +0800 bpf, x64: Remove tail call detection As 'prog->aux->tail_call_reachable' is correct for tail call present, it's unnecessary to detect tail call in x86 jit. Therefore, let's remove it. Signed-off-by: Leon Hwang Link: https://lore.kernel.org/r/20240610124224.34673-3-hffilwlqm@gmail.com Signed-off-by: Alexei Starovoitov commit 01793ed86b5d7df1e956520b5474940743eb7ed8 Author: Leon Hwang Date: Mon Jun 10 20:42:23 2024 +0800 bpf, verifier: Correct tail_call_reachable for bpf prog It's confusing to inspect 'prog->aux->tail_call_reachable' with drgn[0], when bpf prog has tail call but 'tail_call_reachable' is false. This patch corrects 'tail_call_reachable' when bpf prog has tail call. Signed-off-by: Leon Hwang Link: https://lore.kernel.org/r/20240610124224.34673-2-hffilwlqm@gmail.com Signed-off-by: Alexei Starovoitov commit 86474deeb5c3e57258839a4389ec75c7a871d4af Merge: 08f116c9ea6df 243996d172a68 Author: Jakub Kicinski Date: Thu Jun 20 19:32:24 2024 -0700 Merge branch 'dt-bindings-net-convert-fsl-fman-related-file-to-yaml-format' Frank Li says: ==================== dt-bindings: net: Convert fsl,fman related file to yaml format Passed dt_binding_check Run dt_binding_check: fsl,fman-mdio.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/net/fsl,fman-mdio.example.dts DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-mdio.example.dtb Run dt_binding_check: fsl,fman-muram.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/net/fsl,fman-muram.example.dts DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-muram.example.dtb Run dt_binding_check: fsl,fman-port.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/net/fsl,fman-port.example.dts DTC_CHK Documentation/devicetree/bindings/net/fsl,fman-port.example.dtb Run dt_binding_check: fsl,fman.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/net/fsl,fman.example.dts DTC_CHK Documentation/devicetree/bindings/net/fsl,fman.example.dtb Run dt_binding_check: ptp-qoriq.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.json CHKDT Documentation/devicetree/bindings LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/ptp/ptp-qoriq.example.dts DTC_CHK Documentation/devicetree/bindings/ptp/ptp-qoriq.example.dtb v1: https://lore.kernel.org/r/20240614-ls_fman-v1-0-cb33c96dc799@nxp.com ==================== Link: https://patch.msgid.link/20240618-ls_fman-v2-0-f00a82623d8e@nxp.com Signed-off-by: Jakub Kicinski commit 243996d172a68fba79765cfe20ab910c29ec5f50 Author: Frank Li Date: Tue Jun 18 17:53:46 2024 -0400 dt-bindings: net: Convert fsl-fman to yaml Convert fsl-fman from txt to yaml format and split it fsl,fman.yam, fsl,fman-port.yaml, fsl-muram.yaml, fsl-mdio.yaml. Addition changes: fsl,fman.yaml: - Fixed interrupts in example. - Fixed ethernet@e8000 miss } in example. - ptp-timer add label in example. - Ref to new fsl,fman*.yaml. - Reorder property in example. - Keep only one example. - Add const for #address-cells and #size-cells. - Use defined interrupt type. - ptp example use node name phc. fsl,fman-port: - Keep only one example. fsl,fman-mdio: - Add little-endian property. - Add ref to mdio.yaml. - Remove suppress-preamble. - Add #address-cells and #size-cells in example. - Remove clock-frequency, which already describe in mmio.yaml. fsl,muram.yaml: - Add reg property. - Remove range property. - Use reg instead of range in example. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240618-ls_fman-v2-2-f00a82623d8e@nxp.com Signed-off-by: Jakub Kicinski commit 01479f1b912aa499057fd29deddb1ffb9c72fa0a Author: Frank Li Date: Tue Jun 18 17:53:45 2024 -0400 dt-bindings: ptp: Convert ptp-qoirq to yaml format Convert ptp-qoirq from txt to yaml format. Additional change: - Fixed example interrupts proptery. Need only 1 irq by check MPC8313 spec. - Move Reference clock context under clk,sel. - Interrupts is not required property. - Use low case for hex value. - Check reference manual of MPC8313, p1010 and so on, which dts use more than 1 irqs. Only 1 irq for each ptp device. Check driver code (drivers/ptp/ptp_qoriq.c) and only 1 irq used. So original description is wrong. - Remove comments for compatible string. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240618-ls_fman-v2-1-f00a82623d8e@nxp.com Signed-off-by: Jakub Kicinski commit 08f116c9ea6dfddf2a9649a10032902a4d72f6da Author: Breno Leitao Date: Wed Jun 19 03:52:36 2024 -0700 wifi: mt76: un-embedd netdev from mt76_dev Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_devices from struct mt76_dev by converting them into pointers, and allocating them dynamically. Use the leverage alloc_netdev_dummy() to allocate the net_device object at mt76_dma_init(). The free of the device occurs at mt76_dma_cleanup(). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Reviewed-by: Simon Horman Signed-off-by: Breno Leitao Acked-by: Kalle Valo Link: https://patch.msgid.link/20240619105311.3144908-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit d21a103b612c4bb149faf2b5eb25f4667378824b Author: Bartosz Golaszewski Date: Wed Jun 19 16:01:19 2024 +0200 net: stmmac: unexport stmmac_pltfr_init/exit() These functions are only used within the compilation unit they're defined in so there's no reason to export them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240619140119.26777-1-brgl@bgdev.pl Signed-off-by: Jakub Kicinski commit 0d6b1eb660be4c7817fc4686a85caf430d6111d0 Author: Uwe Kleine-König Date: Wed Jun 19 21:56:31 2024 +0200 nfc: 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 Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20240619195631.2545407-2-u.kleine-koenig@baylibre.com Signed-off-by: Jakub Kicinski commit ab3d8479626d281f43db0d41b8e36f6a9bd9980a Merge: 91c93e475ca4b b9578c4945634 Author: Dave Airlie Date: Fri Jun 21 11:06:48 2024 +1000 Merge tag 'drm-misc-next-2024-06-20' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.11: UAPI Changes: - New monochrome TV mode variant Cross-subsystem Changes: - dma heaps: Change slightly the allocation hook prototype Core Changes: Driver Changes: - ivpu: various improvements over firmware handling, clocks, power management, scheduling and logging. - mgag200: Add BMC output, enable polling - panfrost: Enable MT8188 support - tidss: drm_panic support - zynqmp_dp: IRQ cleanups, debugfs DP compliance testing API - bridge: - sii902x: state validation improvements - panel: - edp: Drop legacy panel compatibles - simple-bridge: Switch to devm_drm_bridge_add Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240620-heretic-honored-macaque-b40f8a@houat commit 91c93e475ca4b4bd5f1e8d525c9a9810283db056 Merge: 6dac16124c07a a13aaf157467e Author: Dave Airlie Date: Fri Jun 21 10:49:58 2024 +1000 Merge tag 'drm-misc-next-2024-06-13' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.11: UAPI Changes: Cross-subsystem Changes: Core Changes: - Sprinkle MODULE_DESCRIPTIONS everywhere they are missing - bridge: Remove drm_bridge_chain_mode_fixup - ci: Require a more recent version of mesa, improve farm estup and test generation - mipi-dbi: Remove mipi_dbi_machine_little_endian, make SPI bits per word configurable, support RGB888, and allow pixel formats to be specified in the DT. - mm: Remove drm_mm_replace_node - panic: Allow to dump kmsg to the screen - print: Add a drm prefix to warn level messages too, remove ___drm_dbg, consolidate prefix handling Driver Changes: - sun4i: Rework the blender setup for DE2 - bridges: - bridge-connector: Plumb in the new HDMI helpers - samsung-dsim: Fix timings calculation - tc358767: Plenty of small fixes - panels: - More cleanup of prepare / enable state tracking in drivers - New panel: PrimeView PM070WL4, Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240613-cicada-of-infinite-unity-0955ca@houat commit 6dac16124c07a9a4313ccb5f10b1c3cc42ddfda7 Merge: f680df51ca5f4 310ec03841a36 Author: Dave Airlie Date: Fri Jun 21 10:31:14 2024 +1000 Merge tag 'drm-misc-next-2024-06-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.10: UAPI Changes: Cross-subsystem Changes: - dma-buf: Warn when reserving 0 fence slots, internal API enhancements for heaps Core Changes: Driver Changes: - atmel-hlcdc: Support XLCDC in sam9x7 - msm: Validate registers XML description against schema in CI - v3d: Fix build warning - bridges: - analogix_dp: Various improvements - panels: - New panel: WL-355608-A8 Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240606-vivid-amphibian-jackrabbit-40b1d1@houat commit f680df51ca5f4ab364c9bbfcdbd2737e32092454 Merge: 1ddaaa244021a 0c02cebc7fe94 Author: Dave Airlie Date: Fri Jun 14 17:18:29 2024 +1000 Merge tag 'drm-misc-next-2024-05-30' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for 6.11: UAPI Changes: - Deprecate DRM date and return a 0 date in DRM_IOCTL_VERSION Core Changes: - connector: Create a set of helpers to help with HDMI support - fbdev: Create memory manager optimized fbdev emulation - panic: Allow to select fonts, improve drm_fb_dma_get_scanout_buffer Driver Changes: - Remove driver owner assignments - Allow more drivers to compile with COMPILE_TEST - Conversions to drm_edid - ivpu: hardware scheduler support, profiling support, improvements to the platform support layer - mgag200: general reworks and improvements - nouveau: Add NVreg_RegistryDwords command line option - rockchip: Conversion to the hdmi helpers - sun4i: Conversion to the hdmi helpers - vc4: Conversion to the hdmi helpers - v3d: Perf counters improvements - zynqmp: IRQ and debugfs improvements - bridge: - Remove redundant checks on bridge->encoder - panels: - Switch panels from register table initialization to proper code - Now that the panel code tracks the panel state, remove every ad-hoc implementation in the panel drivers - New panels: Lincoln Tech Sol LCD185-101CT, Microtips Technology 13-101HIEBCAF0-C, Microtips Technology MF-103HIEB0GA0, BOE nv110wum-l60, IVO t109nw41 Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240530-hilarious-flat-magpie-5fa186@houat commit 788c5160526a6385fc70bc1ad32cf686e4ec3a61 Author: Ian Rogers Date: Thu Jun 20 11:17:51 2024 -0700 perf vendor events: Add westmereex counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-38-irogers@google.com commit dc5f18a1026f72bf41eb339a4069063c0b6f9cbf Author: Ian Rogers Date: Thu Jun 20 11:17:50 2024 -0700 perf vendor events: Add westmereep-sp counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-37-irogers@google.com commit 22123c26de13d0e239f36dbb2a8db7dbbc106349 Author: Ian Rogers Date: Thu Jun 20 11:17:49 2024 -0700 perf vendor events: Add westmereep-dp counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-36-irogers@google.com commit 321e0ffa1aa63dbe77754786e035329757e931e8 Author: Ian Rogers Date: Thu Jun 20 11:17:48 2024 -0700 perf vendor events: Add/update tigerlake events/metrics Update events from v1.15 to v1.16. Update TMA metrics from v4.7 to v4.8. Bring in the event updates v1.16: https://github.com/intel/perfmon/commit/43f3b8d6f82f3174bd3bffe8587e2179f086d2ce The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-35-irogers@google.com commit 7c79eb5cc226f29cbe6e419c85a9a7010504d0f6 Author: Ian Rogers Date: Thu Jun 20 11:17:47 2024 -0700 perf vendor events: Add snowridgex counter information Update/remove events as per v1.23: https://github.com/intel/perfmon/commit/9debd874e1b2b0cca42b9ba2342cacaaace2f0ce Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-34-irogers@google.com commit 4c10b96f490efc6926b915a9611c5e1b28ac99ea Author: Ian Rogers Date: Thu Jun 20 11:17:46 2024 -0700 perf vendor events: Add/update skylakex events/metrics Update events from v1.33 to v1.35. Update TMA metrics from v4.7 to v4.8. Bring in the event updates v1.35: https://github.com/intel/perfmon/commit/c99b60c147b96f40f96dd961abfae54909f47e5f The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ Adds the event SW_PREFETCH_ACCESS.ANY. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-33-irogers@google.com commit e2641db83f18782f57a0e107c50d2d1731960fb8 Author: Ian Rogers Date: Thu Jun 20 11:17:45 2024 -0700 perf vendor events: Add/update skylake events/metrics Update events from v58 to v59. Update TMA metrics from v4.7 to v4.8. Bring in the event updates v59: https://github.com/intel/perfmon/commit/5d36f1835b02f056031a06e777e4bf54a5964930 The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ Adds the event SW_PREFETCH_ACCESS.ANY. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-32-irogers@google.com commit caccae3ce7b988b620ea203fbc33807c6ecfea12 Author: Ian Rogers Date: Thu Jun 20 11:17:44 2024 -0700 perf vendor events: Add silvermont counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-31-irogers@google.com commit 951bf72acef84efc24a6c38e1303a5f4a57556ef Author: Ian Rogers Date: Thu Jun 20 11:17:43 2024 -0700 perf vendor events: Add/update sierraforest events/metrics Update events from v1.02 to v1.04. Add TMA metrics v4.8. Bring in the event updates v1.04: https://github.com/intel/perfmon/commit/0a9546cdf63c8b07f5c33ebf6fe49e6ebec89f86 v1.03: https://github.com/intel/perfmon/commit/c7dd26ce67ca4477d40fb4b55b6baa0584b3e5d6 The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ New events are: FP_INST_RETIRED.128B_DP, FP_INST_RETIRED.128B_SP, FP_INST_RETIRED.256B_DP, FP_INST_RETIRED.32B_SP, FP_INST_RETIRED.64B_DP, OCR.DEMAND_DATA_RD.L3_HIT.SNOOP_HITM, OCR.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD, OCR.DEMAND_RFO.L3_HIT.SNOOP_HITM, OCR.STREAMING_WR.ANY_RESPONSE, UNC_CHA_TOR_INSERTS.IO_ITOMCACHENEAR_LOCAL, UNC_CHA_TOR_INSERTS.IO_ITOMCACHENEAR_REMOTE, UNC_CHA_TOR_INSERTS.IO_ITOM_LOCAL, UNC_CHA_TOR_INSERTS.IO_ITOM_REMOTE, UNC_CHA_TOR_INSERTS.IO_MISS, UNC_CHA_TOR_INSERTS.IO_MISS_ITOM, UNC_CHA_TOR_INSERTS.IO_MISS_ITOMCACHENEAR, UNC_CHA_TOR_INSERTS.IO_PCIRDCUR_LOCAL, UNC_CHA_TOR_INSERTS.IO_PCIRDCUR_REMOTE, UNC_CXLCM_RxC_PACK_BUF_INSERTS.MEM_DATA, UNC_CXLDP_TxC_AGF_INSERTS.M2S_DATA. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-30-irogers@google.com commit 5ecf682e618fabe8469719f4f352e3a7ef20b93b Author: Ian Rogers Date: Thu Jun 20 11:17:42 2024 -0700 perf vendor events: Add/update sapphirerapids events/metrics Update events from v1.20 to v1.23. Update TMA metrics from v4.7 to v4.8. Bring in the event updates v1.23: https://github.com/intel/perfmon/commit/6ace93281c0f573b90d3f8f624486ad59dde1c93 v1.22: https://github.com/intel/perfmon/commit/356eba05c07c4d54ed5b92c1164ce00fab545636 The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ New events are: EXE_ACTIVITY.2_3_PORTS_UTIL, ICACHE_DATA.STALL_PERIODS, L2_TRANS.L2_WB, MEM_TRANS_RETIRED.LOAD_LATENCY_GT_1024, OFFCORE_REQUESTS.DEMAND_CODE_RD, OFFCORE_REQUESTS.DEMAND_RFO, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD, OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD, RS.EMPTY_RESOURCE, SW_PREFETCH_ACCESS.ANY, UOPS_ISSUED.CYCLES. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-29-irogers@google.com commit 01cb5e3d98209ff9b78f77b74e15ba6983ca37ff Author: Ian Rogers Date: Thu Jun 20 11:17:41 2024 -0700 perf vendor events: Update sandybridge metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-28-irogers@google.com commit bf0dd1f47f1c041e22ddce20ded7114b57eb716f Author: Ian Rogers Date: Thu Jun 20 11:17:40 2024 -0700 perf vendor events: Add/update rocketlake events/metrics Update events from v1.02 to v1.03. Update TMA metrics from v4.7 to v4.8. Bring in the event updates v1.03: https://github.com/intel/perfmon/commit/a7c75ffd56c7056494cd3acc2749336cd6363b90 The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ Adds the event SW_PREFETCH_ACCESS.ANY. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-27-irogers@google.com commit d69777225227a86097b9f7b2ba35a35c5033809a Author: Ian Rogers Date: Thu Jun 20 11:17:39 2024 -0700 perf vendor events: Add nehalemex counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-26-irogers@google.com commit af557589c4a3215bc59c40ccd5028ce846959bb9 Author: Ian Rogers Date: Thu Jun 20 11:17:38 2024 -0700 perf vendor events: Add nehalemep counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-25-irogers@google.com commit 3323532ae5e75ea8e1e8bebf6b90f751e0edc49e Author: Ian Rogers Date: Thu Jun 20 11:17:37 2024 -0700 perf vendor events: Update meteorlake events and add counter information Update events from v1.08 to v1.10. Bring in the event updates v1.10: https://github.com/intel/perfmon/commit/3bee3dc150164df0bec5980ca5586930730e5778 v1.09: https://github.com/intel/perfmon/commit/01c8c99f17a72460b2eaf7efe3495913f36c9d42 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ New events are: EXE_ACTIVITY.2_3_PORTS_UTIL, FP_INST_RETIRED.128B_DP, FP_INST_RETIRED.128B_SP, FP_INST_RETIRED.256B_DP, FP_INST_RETIRED.32B_SP, FP_INST_RETIRED.64B_DP, FP_VINT_UOPS_EXECUTED.STD, L2_LINES_OUT.USELESS_HWPF, L2_RQSTS.SWPF_HIT, L2_RQSTS.SWPF_MISS, LOAD_HIT_PREFETCH.SWPF, MACHINE_CLEARS.ANY, MACHINE_CLEARS.MRN_NUKE, MISC_RETIRED.LBR_INSERTS, SW_PREFETCH_ACCESS.ANY. The metrics aren't updated as they require retirement latency support that is added in this series: https://lore.kernel.org/lkml/20240613033631.199800-1-weilin.wang@intel.com/ Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-24-irogers@google.com commit 82eff6ee67739244813a3d274559cbb4dd16a765 Author: Ian Rogers Date: Thu Jun 20 11:17:36 2024 -0700 perf vendor events: Add lunarlake counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-23-irogers@google.com commit 025cce253b9fde9619c635832b1f86df559f8d5d Author: Ian Rogers Date: Thu Jun 20 11:17:35 2024 -0700 perf vendor events: Add knightslanding counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-22-irogers@google.com commit 8791622572df8f0077351b8b6e5b56f938126ed1 Author: Ian Rogers Date: Thu Jun 20 11:17:34 2024 -0700 perf vendor events: Update jaketown metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-21-irogers@google.com commit 3235704cbdff37916486e493c5ebaed964496ac7 Author: Ian Rogers Date: Thu Jun 20 11:17:33 2024 -0700 perf vendor events: Update ivytown metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-20-irogers@google.com commit 238a2117cc2934239ed8a00714973720987a7ab1 Author: Ian Rogers Date: Thu Jun 20 11:17:32 2024 -0700 perf vendor events: Update ivybridge metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-19-irogers@google.com commit fab88961e2defcdebf4b6c59cc85998c465d587d Author: Ian Rogers Date: Thu Jun 20 11:17:31 2024 -0700 perf vendor events: Add/update icelakex events/metrics Update events from v1.24 to v1.26. Add TMA metrics v4.8. Bring in the event updates v1.26: https://github.com/intel/perfmon/commit/c607c739e05f2569f95998cc98e1283f042b4fd1 v1.25: https://github.com/intel/perfmon/commit/42d996769069921ec06f6fbb600b0c663b9ec5a9 The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Adds the event SW_PREFETCH_ACCESS.ANY. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-18-irogers@google.com commit 91b59892124e42c1ea4ab4c04e0daa23149d1929 Author: Ian Rogers Date: Thu Jun 20 11:17:30 2024 -0700 perf vendor events: Add/update icelake events/metrics Update events from v1.21 to v1.22. Add TMA metrics v4.8. Bring in the event updates v1.22: https://github.com/intel/perfmon/commit/e5640646e96d59e3c1c1e0d0100a475220ff1dfe The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Adds the event SW_PREFETCH_ACCESS.ANY. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-17-irogers@google.com commit 11c2302c9ea717cb0f1512e6fd896c01860606ed Author: Ian Rogers Date: Thu Jun 20 11:17:29 2024 -0700 perf vendor events: Update haswellx metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-16-irogers@google.com commit b59307d0ed13cd9abc975bd3e6e583432ba5ecd6 Author: Ian Rogers Date: Thu Jun 20 11:17:28 2024 -0700 perf vendor events: Add haswell counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-15-irogers@google.com commit 917f63ad758076cb6261bda1d05e98a673947c95 Author: Ian Rogers Date: Thu Jun 20 11:17:27 2024 -0700 perf vendor events: Update graniterapids events and add counter information Update events from v1.01 to v1.02. Bring in the event updates v1.02: https://github.com/intel/perfmon/commit/0ff9f681bd07d0e84026c52f4941d21b1cd4c171 Add counter information. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ There are over 1000 new events. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-14-irogers@google.com commit 39c1471e3e53547b566221976bd9094830f76b0f Author: Ian Rogers Date: Thu Jun 20 11:17:26 2024 -0700 perf vendor events: Update/add grandridge events/metrics Update events from v1.02 to v1.03. Add TMA metrics v4.8. Bring in the event updates v1.03: https://github.com/intel/perfmon/commit/5ec7a252d0f6ec461f80cc397c9ac25abcd9184f The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 New events are: FP_INST_RETIRED.128B_DP, FP_INST_RETIRED.128B_SP, FP_INST_RETIRED.256B_DP, FP_INST_RETIRED.32B_SP, FP_INST_RETIRED.64B_DP, OCR.DEMAND_DATA_RD.L3_HIT.SNOOP_HITM, OCR.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD, OCR.DEMAND_RFO.L3_HIT.SNOOP_HITM, OCR.STREAMING_WR.ANY_RESPONSE. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-13-irogers@google.com commit 75e71be1289c2b7973e3ed5d02cc1c2c8ce4caa5 Author: Ian Rogers Date: Thu Jun 20 11:17:25 2024 -0700 perf vendor events: Add goldmontplus counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-12-irogers@google.com commit faa35916403097f68010a9db207024f0742f9288 Author: Ian Rogers Date: Thu Jun 20 11:17:24 2024 -0700 perf vendor events: Add goldmont counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-11-irogers@google.com commit 40ccd6aa3e2e05be93394e3cd560c718dedfcc77 Author: Ian Rogers Date: Thu Jun 20 11:17:23 2024 -0700 perf vendor events: Add/update emeraldrapids events/metrics Update events from v1.06 to v1.09. Add TMA metrics v4.8. Bring in the event updates v1.09: https://github.com/intel/perfmon/commit/3fd5892bb4aece9c1e5c17630570d0462838e85d v1.08: https://github.com/intel/perfmon/commit/54525c4508f4a1ce4a8b854aa808a4ee2fb5930b The TMA 4.8 information was added in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 New events are: EXE_ACTIVITY.2_3_PORTS_UTIL, ICACHE_DATA.STALL_PERIODS, L2_TRANS.L2_WB, MEM_TRANS_RETIRED.LOAD_LATENCY_GT_1024, OFFCORE_REQUESTS.DEMAND_CODE_RD, OFFCORE_REQUESTS.DEMAND_RFO, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD, OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD, RS.EMPTY_RESOURCE, SW_PREFETCH_ACCESS.ANY, UNC_IIO_BANDWIDTH_OUT.PART[0-7]_FREERUN, UOPS_ISSUED.CYCLES. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-10-irogers@google.com commit 1e56e9191f65039c625e7035975e744d178f3499 Author: Ian Rogers Date: Thu Jun 20 11:17:22 2024 -0700 perf vendor events: Update elkhartlake events Update events from v1.04 to v1.05. Bring in event updates from: https://github.com/intel/perfmon/commit/fb91e1851ca40a5b443e2c3cd79bc7fc34c8237e The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-9-irogers@google.com commit 4cc49942444e958bd87059401f652f823cb8c6dc Author: Ian Rogers Date: Thu Jun 20 11:17:21 2024 -0700 perf vendor events: Update cascadelakex events/metrics Update events from v1.21 to v1.22. Bring in the event updates v1.22 https://github.com/intel/perfmon/commit/013877729c4ed96427932ca48722bc3bfd2a0075 The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 New events are: SW_PREFETCH_ACCESS.ANY Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-8-irogers@google.com commit 87835d9f85d7dbe6f0f159160098e9f129473203 Author: Ian Rogers Date: Thu Jun 20 11:17:20 2024 -0700 perf vendor events: Update broadwellx metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-7-irogers@google.com commit 6a8ec0b65e4c2ade040397819d8723a42fc352f4 Author: Ian Rogers Date: Thu Jun 20 11:17:19 2024 -0700 perf vendor events: Update broadwellde metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-6-irogers@google.com commit 39b8bd1635a15896d8abea869e6a9d2c4f689fef Author: Ian Rogers Date: Thu Jun 20 11:17:18 2024 -0700 perf vendor events: Update broadwell metrics add event counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. The TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-5-irogers@google.com commit 19121e877c9c840862cda9f45e429bb9e597646f Author: Ian Rogers Date: Thu Jun 20 11:17:17 2024 -0700 perf vendor events: Add bonnell counter information Add counter information necessary for optimizing event grouping the perf tool. The most recent RFC patch set using this information: https://lore.kernel.org/lkml/20240412210756.309828-1-weilin.wang@intel.com/ The information was added in: https://github.com/intel/perfmon/commit/475892a9690cb048949e593fe39cee65cd4765e1 and later patches. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-4-irogers@google.com commit 72da747ddd89862ac3ac7dbb17993937a27f5272 Author: Ian Rogers Date: Thu Jun 20 11:17:16 2024 -0700 perf vendor events: Update alderlaken events/metrics Update events from v1.24 to v1.27. Update e-core TMA metrics to v3.6. Bring in the event updates v1.27: https://github.com/intel/perfmon/commit/ea4f309a04c50ca77a00da2db130fd7cf06db978 v1.26: https://github.com/intel/perfmon/commit/0052e68d24d9873d5ff22363677794fa3eb05313 The e-core TMA 3.6 information was updated in: https://github.com/intel/perfmon/commit/d9c2faa70bafe03129dc10f9fe414ef03a95acd9 New events are: MEM_UOPS_RETIRED.LOCK_LOADS, SERIALIZATION.C01_MS_SCB, UOPS_ISSUED.ANY. Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-3-irogers@google.com commit 17d4b1922cf914df77460102883a23b56dc88197 Author: Ian Rogers Date: Thu Jun 20 11:17:15 2024 -0700 perf vendor events: Update alderlake events/metrics Update events from v1.24 to v1.27. Update p-core TMA metrics from v4.7 to v4.8, and the e-core TMA metrics to v3.6. Bring in the event updates v1.27: https://github.com/intel/perfmon/commit/ea4f309a04c50ca77a00da2db130fd7cf06db978 v1.26: https://github.com/intel/perfmon/commit/0052e68d24d9873d5ff22363677794fa3eb05313 The p-core TMA 4.8 information was updated in: https://github.com/intel/perfmon/commit/59194d4d90ca50a3fcb2de0d82b9f6fc0c9a5736 And e-core in: https://github.com/intel/perfmon/commit/d9c2faa70bafe03129dc10f9fe414ef03a95acd9 New events are: EXE_ACTIVITY.2_3_PORTS_UTIL, ICACHE_DATA.STALL_PERIODS, L2_TRANS.L2_WB, MEM_TRANS_RETIRED.LOAD_LATENCY_GT_1024, MEM_UOPS_RETIRED.LOCK_LOADS, OFFCORE_REQUESTS.DEMAND_CODE_RD, OFFCORE_REQUESTS.DEMAND_RFO, OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD, OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD, RS.EMPTY_RESOURCE, SERIALIZATION.C01_MS_SCB, SW_PREFETCH_ACCESS.ANY, UOPS_ISSUED.ANY, UOPS_ISSUED.CYCLES Co-authored-by: Weilin Wang Co-authored-by: Caleb Biggers Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620181752.3945845-2-irogers@google.com commit b739759c4e96060b7882c22364a4e5d5b3fc7458 Author: Ravi Bangoria Date: Thu Jun 20 05:41:04 2024 +0000 perf doc: Add AMD IBS usage document Add a perf man page document that describes how to exploit AMD IBS with Linux perf. Brief intro about IBS and simple one-liner examples will help naive users to get started. This is not meant to be an exhaustive IBS guide. User should refer latest AMD64 Architecture Programmer's Manual for detailed description of IBS. Usage: $ man perf-amd-ibs Signed-off-by: Ravi Bangoria Reviewed-by: Arnaldo Carvalho de Melo Cc: ananth.narayan@amd.com Cc: sandipan.das@amd.com Cc: santosh.shukla@amd.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240620054104.815-1-ravi.bangoria@amd.com commit 68318904a7758e11f16fa9d202a6df60f896e71a Author: Jeff Johnson Date: Fri May 24 11:48:09 2024 -0700 unicode: add MODULE_DESCRIPTION() macros Currently 'make W=1' reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8-selftest.o Add a MODULE_DESCRIPTION() to utf8-selftest.c and utf8data.c_shipped, and update mkutf8data.c to add a MODULE_DESCRIPTION() to any future generated utf8data file. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240524-md-unicode-v1-1-e2727ce8574d@quicinc.com Signed-off-by: Gabriel Krisman Bertazi commit 7bd3d76a1f9fb38c8234cfadb7131e0b26deb919 Author: Ben Dooks Date: Fri Mar 8 18:32:15 2024 +0000 unicode: make utf8 test count static The variables failed_tests and total_tests are not used outside of the utf8-selftest.c file so make them static to avoid the following warnings: fs/unicode/utf8-selftest.c:17:14: warning: symbol 'failed_tests' was not declared. Should it be static? fs/unicode/utf8-selftest.c:18:14: warning: symbol 'total_tests' was not declared. Should it be static? Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20240308183215.1924331-1-ben.dooks@codethink.co.uk Signed-off-by: Gabriel Krisman Bertazi commit c2f38f75fc89ebd6c0be5856509329390102d8ba Author: Rick Edgecombe Date: Wed Jun 19 15:36:05 2024 -0700 KVM: x86/tdp_mmu: Take a GFN in kvm_tdp_mmu_fast_pf_get_last_sptep() Pass fault->gfn into kvm_tdp_mmu_fast_pf_get_last_sptep(), instead of passing fault->addr and then converting it to a GFN. Future changes will make fault->addr and fault->gfn differ when running TDX guests. The GFN will be conceptually the same as it is for normal VMs, but fault->addr may contain a TDX specific bit that differentiates between "shared" and "private" memory. This bit will be used to direct faults to be handled on different roots, either the normal "direct" root or a new type of root that handles private memory. The TDP iterators will process the traditional GFN concept and apply the required TDX specifics depending on the root type. For this reason, it needs to operate on regular GFN and not the addr, which may contain these special TDX specific bits. Today kvm_tdp_mmu_fast_pf_get_last_sptep() takes fault->addr and then immediately converts it to a GFN with a bit shift. However, this would unfortunately retain the TDX specific bits in what is supposed to be a traditional GFN. Excluding TDX's needs, it is also is unnecessary to pass fault->addr and convert it to a GFN when the GFN is already on hand. So instead just pass the GFN into kvm_tdp_mmu_fast_pf_get_last_sptep() and use it directly. Signed-off-by: Rick Edgecombe Message-ID: <20240619223614.290657-9-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini commit 964cea817196ef5e0dcb5c4888b3cef12de76f8f Author: Rick Edgecombe Date: Wed Jun 19 15:35:58 2024 -0700 KVM: x86/tdp_mmu: Rename REMOVED_SPTE to FROZEN_SPTE Rename REMOVED_SPTE to FROZEN_SPTE so that it can be used for other multi-part operations. REMOVED_SPTE is used as a non-present intermediate value for multi-part operations that can happen when a thread doesn't have an MMU write lock. Today these operations are when removing PTEs. However, future changes will want to use the same concept for setting a PTE. In that case the REMOVED_SPTE name does not quite fit. So rename it to FROZEN_SPTE so it can be used for both types of operations. Also rename the relevant helpers and comments that refer to "removed" within the context of the SPTE value. Take care to not update naming referring the "remove" operations, which are still distinct. Suggested-by: Paolo Bonzini Signed-off-by: Rick Edgecombe Message-ID: <20240619223614.290657-2-rick.p.edgecombe@intel.com> Signed-off-by: Paolo Bonzini commit 33991ae8f40a8245f68e8e442766bf9072eaaa2a Author: Matthew Brost Date: Mon Jun 17 17:38:59 2024 -0700 drm/xe: Simplify locking in new_vma Rather than acquiring and dropping the VM / BO dma-resv around xe_vma_create and do the same thing upon adding preempt fences or an error, hold these locks through the entire new_vma() function. v2: - Rebase (CI) Cc: Fei Yang Signed-off-by: Matthew Brost Reviewed-by: Jagmeet Randhawa Link: https://patchwork.freedesktop.org/patch/msgid/20240618003859.3239239-1-matthew.brost@intel.com commit 0d39640ace670bccb7f03b2a9e5463ec0885a9ca Author: Matthew Brost Date: Thu Jun 13 23:13:43 2024 -0700 drm/xe: Invert runnable_state / pending enable check and assert Rather than checking for pending enable and asserting runnable_state == 1 in sched done handler, invert these. This is more robust code taking action based on the G2H message and asserting KMD tracking state is correct. Suggested-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20240614061343.2931649-1-matthew.brost@intel.com commit 703f12672e1f7ca9d13bbfa56ecdd741b1e2c9d1 Author: Dmitry Torokhov Date: Sun Jun 9 21:18:11 2024 -0700 Input: ims-pcu - switch to using cleanup functions Start using __free() and guard() primitives to simplify the code and error handling. Link: https://lore.kernel.org/r/20240610041813.722445-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 204d18a7a0c67352857dee1bbac517ed63f01d8e Author: Dmitry Torokhov Date: Sun Jun 9 21:18:10 2024 -0700 Input: ims-pcu - use driver core to instantiate device attributes Instead of manually creating driver-specific device attributes set struct usb_driver->dev_groups pointer to have the driver core do it. Link: https://lore.kernel.org/r/20240610041813.722445-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 02b0d3b9d4dd1ef76b3e8c63175f1ae9ff392313 Merge: 8a4e2742a54ed 676f819c3e982 Author: Paolo Bonzini Date: Thu Jun 20 17:29:06 2024 -0400 Merge branch 'kvm-6.10-fixes' into HEAD commit 8a4e2742a54ed7e844f99fa56982da169accfb2b Author: Isaku Yamahata Date: Mon Jan 22 15:53:26 2024 -0800 KVM: x86/tdp_mmu: Sprinkle __must_check The TDP MMU function __tdp_mmu_set_spte_atomic uses a cmpxchg64 to replace the SPTE value and returns -EBUSY on failure. The caller must check the return value and retry. Add __must_check to it, as well as to two more functions that forward the return value of __tdp_mmu_set_spte_atomic to their caller. Signed-off-by: Isaku Yamahata Reviewed-by: Binbin Wu Message-Id: <8f7d5a1b241bf5351eaab828d1a1efe5c17699ca.1705965635.git.isaku.yamahata@intel.com> Acked-by: Kai Huang Signed-off-by: Paolo Bonzini commit d81473840ce12fe682c19af9b4b5b39a9fe5a4c9 Author: Paolo Bonzini Date: Fri Jun 7 18:10:29 2024 +0200 KVM: interrupt kvm_gmem_populate() on signals kvm_gmem_populate() is a potentially lengthy operation that can involve multiple calls to the firmware. Interrupt it if a signal arrives. Fixes: 1f6c06b177513 ("KVM: guest_memfd: Add interface for populating gmem pages with user data") Cc: Isaku Yamahata Cc: Michael Roth Signed-off-by: Paolo Bonzini commit 5f9bbea02f06110ec5cf95a3327019b3194b2d80 Author: Alan Adamson Date: Thu Jun 20 12:53:59 2024 +0000 nvme: Atomic write support Add support to set block layer request_queue atomic write limits. The limits will be derived from either the namespace or controller atomic parameters. NVMe atomic-related parameters are grouped into "normal" and "power-fail" (or PF) class of parameter. For atomic write support, only PF parameters are of interest. The "normal" parameters are concerned with racing reads and writes (which also applies to PF). See NVM Command Set Specification Revision 1.0d section 2.1.4 for reference. Whether to use per namespace or controller atomic parameters is decided by NSFEAT bit 1 - see Figure 97: Identify – Identify Namespace Data Structure, NVM Command Set. NVMe namespaces may define an atomic boundary, whereby no atomic guarantees are provided for a write which straddles this per-lba space boundary. The block layer merging policy is such that no merges may occur in which the resultant request would straddle such a boundary. Unlike SCSI, NVMe specifies no granularity or alignment rules, apart from atomic boundary rule. In addition, again unlike SCSI, there is no dedicated atomic write command - a write which adheres to the atomic size limit and boundary is implicitly atomic. If NSFEAT bit 1 is set, the following parameters are of interest: - NAWUPF (Namespace Atomic Write Unit Power Fail) - NABSPF (Namespace Atomic Boundary Size Power Fail) - NABO (Namespace Atomic Boundary Offset) and we set request_queue limits as follows: - atomic_write_unit_max = rounddown_pow_of_two(NAWUPF) - atomic_write_max_bytes = NAWUPF - atomic_write_boundary = NABSPF If in the unlikely scenario that NABO is non-zero, then atomic writes will not be supported at all as dealing with this adds extra complexity. This policy may change in future. In all cases, atomic_write_unit_min is set to the logical block size. If NSFEAT bit 1 is unset, the following parameter is of interest: - AWUPF (Atomic Write Unit Power Fail) and we set request_queue limits as follows: - atomic_write_unit_max = rounddown_pow_of_two(AWUPF) - atomic_write_max_bytes = AWUPF - atomic_write_boundary = 0 A new function, nvme_valid_atomic_write(), is also called from submission path to verify that a request has been submitted to the driver will actually be executed atomically. As mentioned, there is no dedicated NVMe atomic write command (which may error for a command which exceeds the controller atomic write limits). Note on NABSPF: There seems to be some vagueness in the spec as to whether NABSPF applies for NSFEAT bit 1 being unset. Figure 97 does not explicitly mention NABSPF and how it is affected by bit 1. However Figure 4 does tell to check Figure 97 for info about per-namespace parameters, which NABSPF is, so it is implied. However currently nvme_update_disk_info() does check namespace parameter NABO regardless of this bit. Signed-off-by: Alan Adamson Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen jpg: total rewrite Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240620125359.2684798-11-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 84f3a3c01d70efba736bc42155cf32722067b327 Author: John Garry Date: Thu Jun 20 12:53:58 2024 +0000 scsi: scsi_debug: Atomic write support Add initial support for atomic writes. As is standard method, feed device properties via modules param, those being: - atomic_max_size_blks - atomic_alignment_blks - atomic_granularity_blks - atomic_max_size_with_boundary_blks - atomic_max_boundary_blks These just match sbc4r22 section 6.6.4 - Block limits VPD page. We just support ATOMIC WRITE (16). The major change in the driver is how we lock the device for RW accesses. Currently the driver uses a per-device lock for accessing device metadata and "media" data (calls to do_device_access()) atomically for the duration of the whole read/write command. This should not suit verifying atomic writes. Reason being that currently all reads/writes are atomic, so using atomic writes does not prove anything. Change device access model to basis that regular writes only atomic on a per-sector basis, while reads and atomic writes are fully atomic. As mentioned, since accessing metadata and device media is atomic, continue to have regular writes involving metadata - like discard or PI - as atomic. We can improve this later. Currently we only support model where overlapping going reads or writes wait for current access to complete before commencing an atomic write. This is described in 4.29.3.2 section of the SBC. However, we simplify, things and wait for all accesses to complete (when issuing an atomic write). Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Acked-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20240620125359.2684798-10-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit bf4ae8f2e6407a779c0368eb0f3e047a8333be17 Author: John Garry Date: Thu Jun 20 12:53:57 2024 +0000 scsi: sd: Atomic write support Support is divided into two main areas: - reading VPD pages and setting sdev request_queue limits - support WRITE ATOMIC (16) command and tracing The relevant block limits VPD page need to be read to allow the block layer request_queue atomic write limits to be set. These VPD page limits are described in sbc4r22 section 6.6.4 - Block limits VPD page. There are five limits of interest: - MAXIMUM ATOMIC TRANSFER LENGTH - ATOMIC ALIGNMENT - ATOMIC TRANSFER LENGTH GRANULARITY - MAXIMUM ATOMIC TRANSFER LENGTH WITH BOUNDARY - MAXIMUM ATOMIC BOUNDARY SIZE MAXIMUM ATOMIC TRANSFER LENGTH is the maximum length for a WRITE ATOMIC (16) command. It will not be greater than the device MAXIMUM TRANSFER LENGTH. ATOMIC ALIGNMENT and ATOMIC TRANSFER LENGTH GRANULARITY are the minimum alignment and length values for an atomic write in terms of logical blocks. Unlike NVMe, SCSI does not specify an LBA space boundary, but does specify a per-IO boundary granularity. The maximum boundary size is specified in MAXIMUM ATOMIC BOUNDARY SIZE. When used, this boundary value is set in the WRITE ATOMIC (16) ATOMIC BOUNDARY field - layout for the WRITE_ATOMIC_16 command can be found in sbc4r22 section 5.48. This boundary value is the granularity size at which the device may atomically write the data. A value of zero in WRITE ATOMIC (16) ATOMIC BOUNDARY field means that all data must be atomically written together. MAXIMUM ATOMIC TRANSFER LENGTH WITH BOUNDARY is the maximum atomic write length if a non-zero boundary value is set. For atomic write support, the WRITE ATOMIC (16) boundary is not of much interest, as the block layer expects each request submitted to be executed atomically. However, the SCSI spec does leave itself open to a quirky scenario where MAXIMUM ATOMIC TRANSFER LENGTH is zero, yet MAXIMUM ATOMIC TRANSFER LENGTH WITH BOUNDARY and MAXIMUM ATOMIC BOUNDARY SIZE are both non-zero. This case will be supported. To set the block layer request_queue atomic write capabilities, sanitize the VPD page limits and set limits as follows: - atomic_write_unit_min is derived from granularity and alignment values. If no granularity value is not set, use physical block size - atomic_write_unit_max is derived from MAXIMUM ATOMIC TRANSFER LENGTH. In the scenario where MAXIMUM ATOMIC TRANSFER LENGTH is zero and boundary limits are non-zero, use MAXIMUM ATOMIC BOUNDARY SIZE for atomic_write_unit_max. New flag scsi_disk.use_atomic_write_boundary is set for this scenario. - atomic_write_boundary_bytes is set to zero always SCSI also supports a WRITE ATOMIC (32) command, which is for type 2 protection enabled. This is not going to be supported now, so check for T10_PI_TYPE2_PROTECTION when setting any request_queue limits. To handle an atomic write request, add support for WRITE ATOMIC (16) command in handler sd_setup_atomic_cmnd(). Flag use_atomic_write_boundary is checked here for encoding ATOMIC BOUNDARY field. Trace info is also added for WRITE_ATOMIC_16 command. Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Acked-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240620125359.2684798-9-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit caf336f81b3a3ca744e335972e86ec7244512d4a Author: John Garry Date: Thu Jun 20 12:53:56 2024 +0000 block: Add fops atomic write support Support atomic writes by submitting a single BIO with the REQ_ATOMIC set. It must be ensured that the atomic write adheres to its rules, like naturally aligned offset, so call blkdev_dio_invalid() -> blkdev_atomic_write_valid() [with renaming blkdev_dio_unaligned() to blkdev_dio_invalid()] for this purpose. The BIO submission path currently checks for atomic writes which are too large, so no need to check here. In blkdev_direct_IO(), if the nr_pages exceeds BIO_MAX_VECS, then we cannot produce a single BIO, so error in this case. Finally set FMODE_CAN_ATOMIC_WRITE when the bdev can support atomic writes and the associated file flag is for O_DIRECT. Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Reviewed-by: Keith Busch Acked-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240620125359.2684798-8-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 9abcfbd235f59fb5b6379e5bc0231dad831ebace Author: Prasad Singamsetty Date: Thu Jun 20 12:53:55 2024 +0000 block: Add atomic write support for statx Extend statx system call to return additional info for atomic write support support if the specified file is a block device. Reviewed-by: Martin K. Petersen Signed-off-by: Prasad Singamsetty Signed-off-by: John Garry Reviewed-by: Keith Busch Acked-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20240620125359.2684798-7-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 9da3d1e912f3953196e66991d75208cde3e845e1 Author: John Garry Date: Thu Jun 20 12:53:54 2024 +0000 block: Add core atomic write support Add atomic write support, as follows: - add helper functions to get request_queue atomic write limits - report request_queue atomic write support limits to sysfs and update Doc - support to safely merge atomic writes - deal with splitting atomic writes - misc helper functions - add a per-request atomic write flag New request_queue limits are added, as follows: - atomic_write_hw_max is set by the block driver and is the maximum length of an atomic write which the device may support. It is not necessarily a power-of-2. - atomic_write_max_sectors is derived from atomic_write_hw_max_sectors and max_hw_sectors. It is always a power-of-2. Atomic writes may be merged, and atomic_write_max_sectors would be the limit on a merged atomic write request size. This value is not capped at max_sectors, as the value in max_sectors can be controlled from userspace, and it would only cause trouble if userspace could limit atomic_write_unit_max_bytes and the other atomic write limits. - atomic_write_hw_unit_{min,max} are set by the block driver and are the min/max length of an atomic write unit which the device may support. They both must be a power-of-2. Typically atomic_write_hw_unit_max will hold the same value as atomic_write_hw_max. - atomic_write_unit_{min,max} are derived from atomic_write_hw_unit_{min,max}, max_hw_sectors, and block core limits. Both min and max values must be a power-of-2. - atomic_write_hw_boundary is set by the block driver. If non-zero, it indicates an LBA space boundary at which an atomic write straddles no longer is atomically executed by the disk. The value must be a power-of-2. Note that it would be acceptable to enforce a rule that atomic_write_hw_boundary_sectors is a multiple of atomic_write_hw_unit_max, but the resultant code would be more complicated. All atomic writes limits are by default set 0 to indicate no atomic write support. Even though it is assumed by Linux that a logical block can always be atomically written, we ignore this as it is not of particular interest. Stacked devices are just not supported either for now. An atomic write must always be submitted to the block driver as part of a single request. As such, only a single BIO must be submitted to the block layer for an atomic write. When a single atomic write BIO is submitted, it cannot be split. As such, atomic_write_unit_{max, min}_bytes are limited by the maximum guaranteed BIO size which will not be required to be split. This max size is calculated by request_queue max segments and the number of bvecs a BIO can fit, BIO_MAX_VECS. Currently we rely on userspace issuing a write with iovcnt=1 for pwritev2() - as such, we can rely on each segment containing PAGE_SIZE of data, apart from the first+last, which each can fit logical block size of data. The first+last will be LBS length/aligned as we rely on direct IO alignment rules also. New sysfs files are added to report the following atomic write limits: - atomic_write_unit_max_bytes - same as atomic_write_unit_max_sectors in bytes - atomic_write_unit_min_bytes - same as atomic_write_unit_min_sectors in bytes - atomic_write_boundary_bytes - same as atomic_write_hw_boundary_sectors in bytes - atomic_write_max_bytes - same as atomic_write_max_sectors in bytes Atomic writes may only be merged with other atomic writes and only under the following conditions: - total resultant request length <= atomic_write_max_bytes - the merged write does not straddle a boundary Helper function bdev_can_atomic_write() is added to indicate whether atomic writes may be issued to a bdev. If a bdev is a partition, the partition start must be aligned with both atomic_write_unit_min_sectors and atomic_write_hw_boundary_sectors. FSes will rely on the block layer to validate that an atomic write BIO submitted will be of valid size, so add blk_validate_atomic_write_op_size() for this purpose. Userspace expects an atomic write which is of invalid size to be rejected with -EINVAL, so add BLK_STS_INVAL for this. Also use BLK_STS_INVAL for when a BIO needs to be split, as this should mean an invalid size BIO. Flag REQ_ATOMIC is used for indicating an atomic write. Co-developed-by: Himanshu Madhani Signed-off-by: Himanshu Madhani Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20240620125359.2684798-6-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 0f9ca80fa4f9670ba09721e4e36b8baf086a500c Author: Prasad Singamsetty Date: Thu Jun 20 12:53:53 2024 +0000 fs: Add initial atomic write support info to statx Extend statx system call to return additional info for atomic write support support for a file. Helper function generic_fill_statx_atomic_writes() can be used by FSes to fill in the relevant statx fields. For now atomic_write_segments_max will always be 1, otherwise some rules would need to be imposed on iovec length and alignment, which we don't want now. Signed-off-by: Prasad Singamsetty jpg: relocate bdev support to another patch Reviewed-by: Darrick J. Wong Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Acked-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240620125359.2684798-5-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit c34fc6f26ab86d03a2d47446f42b6cd492dfdc56 Author: Prasad Singamsetty Date: Thu Jun 20 12:53:52 2024 +0000 fs: Initial atomic write support An atomic write is a write issued with torn-write protection, meaning that for a power failure or any other hardware failure, all or none of the data from the write will be stored, but never a mix of old and new data. Userspace may add flag RWF_ATOMIC to pwritev2() to indicate that the write is to be issued with torn-write prevention, according to special alignment and length rules. For any syscall interface utilizing struct iocb, add IOCB_ATOMIC for iocb->ki_flags field to indicate the same. A call to statx will give the relevant atomic write info for a file: - atomic_write_unit_min - atomic_write_unit_max - atomic_write_segments_max Both min and max values must be a power-of-2. Applications can avail of atomic write feature by ensuring that the total length of a write is a power-of-2 in size and also sized between atomic_write_unit_min and atomic_write_unit_max, inclusive. Applications must ensure that the write is at a naturally-aligned offset in the file wrt the total write length. The value in atomic_write_segments_max indicates the upper limit for IOV_ITER iovcnt. Add file mode flag FMODE_CAN_ATOMIC_WRITE, so files which do not have the flag set will have RWF_ATOMIC rejected and not just ignored. Add a type argument to kiocb_set_rw_flags() to allows reads which have RWF_ATOMIC set to be rejected. Helper function generic_atomic_write_valid() can be used by FSes to verify compliant writes. There we check for iov_iter type is for ubuf, which implies iovcnt==1 for pwritev2(), which is an initial restriction for atomic_write_segments_max. Initially the only user will be bdev file operations write handler. We will rely on the block BIO submission path to ensure write sizes are compliant for the bdev, so we don't need to check atomic writes sizes yet. Signed-off-by: Prasad Singamsetty jpg: merge into single patch and much rewrite Acked-by: Darrick J. Wong Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240620125359.2684798-4-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit f70167a7a6e7e8a6911f3a216dc044cbfe7c1983 Author: John Garry Date: Thu Jun 20 12:53:51 2024 +0000 block: Generalize chunk_sectors support as boundary support The purpose of the chunk_sectors limit is to ensure that a mergeble request fits within the boundary of the chunck_sector value. Such a feature will be useful for other request_queue boundary limits, so generalize the chunk_sectors merge code. This idea was proposed by Hannes Reinecke. Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Acked-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240620125359.2684798-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 8d1dfd51c84e202df05a999ce82cb27554f7d152 Author: John Garry Date: Thu Jun 20 12:53:50 2024 +0000 block: Pass blk_queue_get_max_sectors() a request pointer Currently blk_queue_get_max_sectors() is passed a enum req_op. In future the value returned from blk_queue_get_max_sectors() may depend on certain request flags, so pass a request pointer. Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Luis Chamberlain Reviewed-by: Martin K. Petersen Signed-off-by: John Garry Reviewed-by: Hannes Reinecke Acked-by: Darrick J. Wong Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240620125359.2684798-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 3374d842cd8129fa7989a228761f274e32784c7d Author: Marek Vasut Date: Wed May 22 02:09:31 2024 +0200 dt-bindings: display: synopsys, dw-hdmi: Mark ddc-i2c-bus as deprecated The ddc-i2c-bus property should be placed in connector node, mark the HDMI TX side property as deprecated. Acked-by: Rob Herring (Arm) Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20240522000949.49530-1-marex@denx.de commit 4c3f53ed2376d63478194f72a0222185b206653b Author: Marek Vasut Date: Wed May 15 08:27:44 2024 +0200 dt-bindings: display: synopsys, dw-hdmi: Document ddc-i2c-bus in core The DW HDMI driver core is responsible for parsing the 'ddc-i2c-bus' property, move the property description into the DW HDMI common DT schema too, so this property can be used on all devices integrating the DW HDMI core. Signed-off-by: Marek Vasut Reviewed-by: Laurent Pinchart Acked-by: Conor Dooley Link: https://patchwork.freedesktop.org/patch/msgid/20240515062753.111746-1-marex@denx.de commit a6ec08beec9ea93f342d6daeac922208709694dc Merge: a012f9a752a58 d5a7fc58da039 Author: Jakub Kicinski Date: Thu Jun 20 13:02:22 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/broadcom/bnxt/bnxt.c 1e7962114c10 ("bnxt_en: Restore PTP tx_avail count in case of skb_pad() error") 165f87691a89 ("bnxt_en: add timestamping statistics support") No adjacent changes. Signed-off-by: Jakub Kicinski commit 0ca645ab5b1528666f6662a0e620140355b5aea3 Author: Simon Trimmer Date: Wed Jun 19 13:17:03 2024 +0100 spi: cs42l43: Add speaker id support to the bridge configuration OEMs can connect a number of types of speakers to the sidecar cs35l56 amplifiers and a different speaker requires a different firmware configuration. When the cs42l43 ACPI includes a property indicating a particular type of speaker has been installed this should be passed to the cs35l56 driver instances as a device property. Signed-off-by: Simon Trimmer Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240619121703.3411989-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit cc169cf869fdac34531fd4d0e7317f0576883228 Author: Charles Keepax Date: Wed Jun 19 13:17:02 2024 +0100 spi: cs42l43: Refactor accessing the SDCA extension properties Refactor accessing the SDCA extension properties to make it easier to access multiple properties to assist with future features. Return the node itself and allow the caller to read the actual properties. Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20240619121703.3411989-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 741b31df024c397edbc499525fa2de1514b1a627 Merge: 78b05172b42d1 df75470b317b4 Author: Mark Brown Date: Thu Jun 20 21:09:48 2024 +0100 spi: Merge up fixes We need the fixes to apply new changes to the Cirrus drivers. commit f1ee914fb62683cd72ac49cc68a1d92f12ec65c6 Author: Oliver Upton Date: Thu Jun 20 16:46:52 2024 +0000 KVM: arm64: Allow the use of SVE+NV Allow SVE and NV to mix now that everything is in place to handle it correctly. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-16-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit cd931bd6093cb7da7b9787f04b21bca58c494537 Author: Marc Zyngier Date: Thu Jun 20 16:46:51 2024 +0000 KVM: arm64: nv: Add additional trap setup for CPTR_EL2 We need to teach KVM a couple of new tricks. CPTR_EL2 and its VHE accessor CPACR_EL1 need to be handled specially: - CPACR_EL1 is trapped on VHE so that we can track the TCPAC and TTA bits - CPTR_EL2.{TCPAC,E0POE} are propagated from L1 to L2 Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-15-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit e19d533126accf342d34019f4bc92b8796b125bc Author: Marc Zyngier Date: Thu Jun 20 16:46:50 2024 +0000 KVM: arm64: nv: Add trap description for CPTR_EL2 Add trap description for CPTR_EL2.{TCPAC,TAM,E0POE,TTA}. TTA is a bit annoying as it changes location depending on E2H. This forces us to add yet another "complex" trap condition. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-14-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 0edc60fd6e9ec1843d968370e0a3fa26cd73f3c3 Author: Marc Zyngier Date: Thu Jun 20 16:46:49 2024 +0000 KVM: arm64: nv: Add TCPAC/TTA to CPTR->CPACR conversion helper We are missing the propagation of CPTR_EL2.{TCPAC,TTA} into the CPACR format. Make sure we preserve these bits. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-13-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 5326303bb7d9da79d94d0e347a6e212eaae8801d Author: Oliver Upton Date: Thu Jun 20 16:46:48 2024 +0000 KVM: arm64: nv: Honor guest hypervisor's FP/SVE traps in CPTR_EL2 Start folding the guest hypervisor's FP/SVE traps into the value programmed in hardware. Note that as of writing this is dead code, since KVM does a full put() / load() for every nested exception boundary which saves + flushes the FP/SVE state. However, this will become useful when we can keep the guest's FP/SVE state alive across a nested exception boundary and the host no longer needs to conservatively program traps. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-12-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 0cfc85b8f5cf3b77463d61542191c75ba0cc3a5f Author: Oliver Upton Date: Thu Jun 20 16:46:47 2024 +0000 KVM: arm64: nv: Load guest FP state for ZCR_EL2 trap Round out the ZCR_EL2 gymnastics by loading SVE state in the fast path when the guest hypervisor tries to access SVE state. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-11-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 493da2b1c49ac86c0eb0dde9e42b79333272d1f9 Author: Marc Zyngier Date: Thu Jun 20 16:46:46 2024 +0000 KVM: arm64: nv: Handle CPACR_EL1 traps Handle CPACR_EL1 accesses when running a VHE guest. In order to limit the cost of the emulation, implement it ass a shallow exit. In the other cases: - this is a nVHE L1 which will write to memory, and we don't trap - this is a L2 guest: * the L1 has CPTR_EL2.TCPAC==0, and the L2 has direct register access * the L1 has CPTR_EL2.TCPAC==1, and the L2 will trap, but the handling is defered to the general handling for forwarding Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-10-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 78ce84b9e0a54a0c91a7449f321c1f852c0cd3fc Author: Borislav Petkov (AMD) Date: Thu Jun 20 20:47:46 2024 +0200 x86/cpufeatures: Flip the /proc/cpuinfo appearance logic I'm getting tired of telling people to put a magic "" in the #define X86_FEATURE /* "" ... */ comment to hide the new feature flag from the user-visible /proc/cpuinfo. Flip the logic to make it explicit: an explicit "" in the comment adds the flag to /proc/cpuinfo and otherwise not, by default. Add the "" of all the existing flags to keep backwards compatibility with userspace. There should be no functional changes resulting from this. Acked-by: Dave Hansen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240618113840.24163-1-bp@kernel.org commit 1785f020b1124c37f59f3d92b7d45ba1d707ee91 Author: Oliver Upton Date: Thu Jun 20 16:46:45 2024 +0000 KVM: arm64: Spin off helper for programming CPTR traps A subsequent change to KVM will add preliminary support for merging a guest hypervisor's CPTR traps with that of KVM. Prepare by spinning off a new helper for managing CPTR traps. Avoid reading CPACR_EL1 for the baseline trap config, and start off with the most restrictive set of traps that is subsequently relaxed. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-9-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 2e3cf82063a00ea0629e03e223c7c6ba58718f12 Author: Oliver Upton Date: Thu Jun 20 16:46:44 2024 +0000 KVM: arm64: nv: Ensure correct VL is loaded before saving SVE state It is possible that the guest hypervisor has selected a smaller VL than the maximum for its nested guest. As such, ZCR_EL2 may be configured for a different VL when exiting a nested guest. Set ZCR_EL2 (via the EL1 alias) to the maximum VL for the VM before saving SVE state as the SVE save area is dimensioned by the max VL. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-8-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 9092aca9fe9aa986b573355affdd190710a906c0 Author: Oliver Upton Date: Thu Jun 20 16:46:43 2024 +0000 KVM: arm64: nv: Use guest hypervisor's max VL when running nested guest The max VL for nested guests is additionally constrained by the max VL selected by the guest hypervisor. Use that instead of KVM's max VL when running a nested guest. Note that the guest hypervisor's ZCR_EL2 is sanitised against the VM's max VL at the time of access, so there's no additional handling required at the time of use. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-7-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit b7e5c9426429aa64cacc2d804417e0e5f79b8b60 Author: Oliver Upton Date: Thu Jun 20 16:46:42 2024 +0000 KVM: arm64: nv: Save guest's ZCR_EL2 when in hyp context When running a guest hypervisor, ZCR_EL2 is an alias for the counterpart EL1 state. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-6-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 069da3ffdadfe108729fc9aafa3930da77711812 Author: Oliver Upton Date: Thu Jun 20 16:46:41 2024 +0000 KVM: arm64: nv: Load guest hyp's ZCR into EL1 state Load the guest hypervisor's ZCR_EL2 into the corresponding EL1 register when restoring SVE state, as ZCR_EL2 affects the VL in the hypervisor context. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-5-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit b3d29a8230998b36afecf494b199211d26052785 Author: Oliver Upton Date: Thu Jun 20 16:46:40 2024 +0000 KVM: arm64: nv: Handle ZCR_EL2 traps Unlike other SVE-related registers, ZCR_EL2 takes a sysreg trap to EL2 when HCR_EL2.NV = 1. KVM still needs to honor the guest hypervisor's trap configuration, which expects an SVE trap (i.e. ESR_EL2.EC = 0x19) when CPTR traps are enabled for the vCPU's current context. Otherwise, if the guest hypervisor has traps disabled, emulate the access by mapping the requested VL into ZCR_EL1. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-4-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 399debfc97493130167663336a2c3d0d16c2da79 Author: Oliver Upton Date: Thu Jun 20 16:46:39 2024 +0000 KVM: arm64: nv: Forward SVE traps to guest hypervisor Similar to FPSIMD traps, don't load SVE state if the guest hypervisor has SVE traps enabled and forward the trap instead. Note that ZCR_EL2 will require some special handling, as it takes a sysreg trap to EL2 when HCR_EL2.NV = 1. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-3-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit d2b2ecba8ddb55dd7c8f9741b4863670850c49de Author: Jintack Lim Date: Thu Jun 20 16:46:38 2024 +0000 KVM: arm64: nv: Forward FP/ASIMD traps to guest hypervisor Give precedence to the guest hypervisor's trap configuration when routing an FP/ASIMD trap taken to EL2. Take advantage of the infrastructure for translating CPTR_EL2 into the VHE (i.e. EL1) format and base the trap decision solely on the VHE view of the register. The in-memory value of CPTR_EL2 will always be up to date for the guest hypervisor (more on that later), so just read it directly from memory. Bury all of this behind a macro keyed off of the CPTR bitfield in anticipation of supporting other traps (e.g. SVE). [maz: account for HCR_EL2.E2H when testing for TFP/FPEN, with all the hard work actually being done by Chase Conklin] [ oliver: translate nVHE->VHE format for testing traps; macro for reuse in other CPTR_EL2.xEN fields ] Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240620164653.1130714-2-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit ef40d28f17bd384d7e0b630c7d83f108a526351b Author: Kees Cook Date: Wed Jun 19 14:47:15 2024 -0700 randomize_kstack: Remove non-functional per-arch entropy filtering An unintended consequence of commit 9c573cd31343 ("randomize_kstack: Improve entropy diffusion") was that the per-architecture entropy size filtering reduced how many bits were being added to the mix, rather than how many bits were being used during the offsetting. All architectures fell back to the existing default of 0x3FF (10 bits), which will consume at most 1KiB of stack space. It seems that this is working just fine, so let's avoid the confusion and update everything to use the default. The prior intent of the per-architecture limits were: arm64: capped at 0x1FF (9 bits), 5 bits effective powerpc: uncapped (10 bits), 6 or 7 bits effective riscv: uncapped (10 bits), 6 bits effective x86: capped at 0xFF (8 bits), 5 (x86_64) or 6 (ia32) bits effective s390: capped at 0xFF (8 bits), undocumented effective entropy Current discussion has led to just dropping the original per-architecture filters. The additional entropy appears to be safe for arm64, x86, and s390. Quoting Arnd, "There is no point pretending that 15.75KB is somehow safe to use while 15.00KB is not." Co-developed-by: Yuntao Liu Signed-off-by: Yuntao Liu Fixes: 9c573cd31343 ("randomize_kstack: Improve entropy diffusion") Link: https://lore.kernel.org/r/20240617133721.377540-1-liuyuntao12@huawei.com Reviewed-by: Arnd Bergmann Acked-by: Mark Rutland Acked-by: Heiko Carstens # s390 Link: https://lore.kernel.org/r/20240619214711.work.953-kees@kernel.org Signed-off-by: Kees Cook commit 3991b04d4870fd334b77b859a8642ca7fb592603 Author: Uwe Kleine-König Date: Fri Mar 29 22:54:41 2024 +0100 virt: sev-guest: Mark driver struct with __refdata to prevent section mismatch As described in the added code comment, a reference to .exit.text is ok for drivers registered via module_platform_driver_probe(). Make this explicit to prevent the following section mismatch warning: WARNING: modpost: drivers/virt/coco/sev-guest/sev-guest: section mismatch in reference: \ sev_guest_driver+0x10 (section: .data) -> sev_guest_remove (section: .exit.text) that triggers on an allmodconfig W=1 build. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/4a81b0e87728a58904283e2d1f18f73abc69c2a1.1711748999.git.u.kleine-koenig@pengutronix.de commit 2b79878b0784ba7253ad9b8dee66495b288272c9 Author: Michal Wajdeczko Date: Wed Jun 19 23:45:57 2024 +0200 drm/xe/vf: Custom HuC initialization if VF The HuC firmware is loaded and initialized by the PF driver. Make sure VF driver performs only limited data structure initialization. Signed-off-by: Michal Wajdeczko Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-10-michal.wajdeczko@intel.com commit 7875fe7c2495884dd08d4a23fdc44147225542da Author: Michal Wajdeczko Date: Wed Jun 19 23:45:56 2024 +0200 drm/xe/vf: Skip engine ring enabling if VF All engines will be correctly initialized by the PF driver. Moreover, VF drivers can't access related engine registers. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-9-michal.wajdeczko@intel.com commit ef3fcfe0639824bc908c7bd18125a97f5f83357c Author: Michal Wajdeczko Date: Wed Jun 19 23:45:55 2024 +0200 drm/xe/vf: Don't use register based TLB invalidation if VF VF drivers can only use GuC-based TLB invalidation, as they don't have access to the related registers. However, VFs shouldn't need any explicit TLB invalidation before enabling CTB communication, as there will be an implicit GGTT TLB invalidation issued by the GuC itself as part of MMIO-based action handling. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-8-michal.wajdeczko@intel.com commit ecab82af27873336e2a1655dd09e2a3fc41d1c10 Author: Michal Wajdeczko Date: Wed Jun 19 23:45:54 2024 +0200 drm/xe/vf: Don't support gtidle if VF VF drivers can't access any of gtidle control registers as this functionality is owned by the PF driver. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-7-michal.wajdeczko@intel.com commit 5aa326f52872b25906d7dca8e0c4f7e6c597f40f Author: Michal Wajdeczko Date: Wed Jun 19 23:45:53 2024 +0200 drm/xe/vf: Don't initialize OA if VF We don't support Observation Architecture on the VF device. Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Ashutosh Dixit Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-6-michal.wajdeczko@intel.com commit f2800572cc0b01f329fac69646234c64b1ca9576 Author: Michal Wajdeczko Date: Wed Jun 19 23:45:52 2024 +0200 drm/xe/vf: Don't change hwe IRQ masks if using memory IRQs We currently do not support changing the engine interrupt enable mask on the per-engine basis when using memory based interrupts. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-5-michal.wajdeczko@intel.com commit f20535ce1dd96003e76c958ffaa9c345483d2dfd Author: Michal Wajdeczko Date: Wed Jun 19 23:45:51 2024 +0200 drm/xe/vf: Don't apply tile workarounds if VF The VF drivers can't apply any workarounds as they don't have access to related registers. Since xe_wa_apply_tile_workarounds() function is not using RTP yet, we have to add early return. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Piotr Piórkowski Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-4-michal.wajdeczko@intel.com commit 9632dfb0def48b0b6fa343fef166e0cf2ac10a95 Author: Michal Wajdeczko Date: Wed Jun 19 23:45:50 2024 +0200 drm/xe/vf: Don't run any save-restore RTP actions if VF There are no RTP save-restore actions applicable for VFs on current platforms. If any future platform will require some, we will need to update the RTP framework to support VF_READY or VF_ONLY actions. In the meantime, just skip all actions if we are running as VF driver. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Piotr Piórkowski Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240619214557.905-3-michal.wajdeczko@intel.com commit 65336c3fa2cf7f272067be9193303d1ab7c42190 Author: Michal Wajdeczko Date: Thu Jun 20 12:01:47 2024 +0200 drm/xe/vf: Disable features that do not apply to VFs We already maintain several flags that control the availability of features on a given device. Disable features, like PCODE or GuC PC or GSC, that do not apply to a VF device. Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240620100147.949-1-michal.wajdeczko@intel.com commit 469169803d52a5d8f0dc781090638e851a7d22b1 Author: Masahiro Yamada Date: Wed Jun 12 14:02:55 2024 +0900 x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS Some instructions are only available on the 64-bit architecture. Bi-arch compilers that default to -m32 need the explicit -m64 option to evaluate them properly. Fixes: 18e66b695e78 ("x86/shstk: Add Kconfig option for shadow stack") Closes: https://lore.kernel.org/all/20240612-as-instr-opt-wrussq-v2-1-bd950f7eead7@gmail.com/ Reported-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Masahiro Yamada Signed-off-by: Borislav Petkov (AMD) Tested-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://lore.kernel.org/r/20240612050257.3670768-1-masahiroy@kernel.org commit 5e62d53c763aa44be07a7b7ecb5a94a269bb0ed1 Author: Perry Yuan Date: Wed Jun 19 16:15:20 2024 +0800 cpufreq: update to sysfs_emit() for safer buffer handling Replace sprintf() and scnprintf() with sysfs_emit() and sysfs_emit_at() in the cpufreq core. This ensures safer buffer handling and consistency with sysfs interfaces. Update show_scaling_available_governors() and related functions for compliance with the new API. Signed-off-by: Perry Yuan Reviewed-by: Mario Limonciello Link: https://patch.msgid.link/20240619081520.259971-1-perry.yuan@amd.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit eca4ba5b6dff9b6ec03c9607ac297076f037fcfc Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:37 2024 +0100 KVM: arm64: nVHE: Support CONFIG_CFI_CLANG at EL2 The compiler implements kCFI by adding type information (u32) above every function that might be indirectly called and, whenever a function pointer is called, injects a read-and-compare of that u32 against the value corresponding to the expected type. In case of a mismatch, a BRK instruction gets executed. When the hypervisor triggers such an exception in nVHE, it panics and triggers and exception return to EL1. Therefore, teach nvhe_hyp_panic_handler() to detect kCFI errors from the ESR and report them. If necessary, remind the user that EL2 kCFI is not affected by CONFIG_CFI_PERMISSIVE. Pass $(CC_FLAGS_CFI) to the compiler when building the nVHE hyp code. Use SYM_TYPED_FUNC_START() for __pkvm_init_switch_pgd, as nVHE can't call it directly and must use a PA function pointer from C (because it is part of the idmap page), which would trigger a kCFI failure if the type ID wasn't present. Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-9-ptosi@google.com Signed-off-by: Oliver Upton commit 8f3873a39529101213fa1109d499239d57185551 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:36 2024 +0100 KVM: arm64: Introduce print_nvhe_hyp_panic helper Add a helper to display a panic banner soon to also be used for kCFI failures, to ensure that we remain consistent. Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-8-ptosi@google.com Signed-off-by: Oliver Upton commit 7a928b32f1de67760e39d22d00fef99dca69fbd9 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:35 2024 +0100 arm64: Introduce esr_brk_comment, esr_is_cfi_brk As it is already used in two places, move esr_comment() to a header for re-use, with a clearer name. Introduce esr_is_cfi_brk() to detect kCFI BRK syndromes, currently used by early_brk64() but soon to also be used by hypervisor code. Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-7-ptosi@google.com Signed-off-by: Oliver Upton commit 3c6eb64876937e38672fba63f11634b9ef3013e1 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:34 2024 +0100 KVM: arm64: VHE: Mark __hyp_call_panic __noreturn Given that the sole purpose of __hyp_call_panic() is to call panic(), a __noreturn function, give it the __noreturn attribute, removing the need for its caller to use unreachable(). Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-6-ptosi@google.com Signed-off-by: Oliver Upton commit 4ab3f9dd561b428460038a9bb041e92db6197f18 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:33 2024 +0100 KVM: arm64: nVHE: gen-hyprel: Skip R_AARCH64_ABS32 Ignore R_AARCH64_ABS32 relocations, instead of panicking, when emitting the relocation table of the hypervisor. The toolchain might produce them when generating function calls with kCFI to represent the 32-bit type ID which can then be resolved across compilation units at link time. These are NOT actual 32-bit addresses and are therefore not needed in the final (runtime) relocation table (which is unlikely to use 32-bit absolute addresses for arm64 anyway). Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-5-ptosi@google.com Signed-off-by: Oliver Upton commit 6e3b773ed6bc5e783fa314b75071f022324f94a8 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:32 2024 +0100 KVM: arm64: nVHE: Simplify invalid_host_el2_vect The invalid_host_el2_vect macro is used by EL2{t,h} handlers in nVHE *host* context, which should never run with a guest context loaded. Therefore, remove the superfluous vCPU context check and branch unconditionally to hyp_panic. Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-4-ptosi@google.com Signed-off-by: Oliver Upton commit ea9d7c83d14e332db9ae25eb2872b90a06ebc9e6 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:31 2024 +0100 KVM: arm64: Fix __pkvm_init_switch_pgd call ABI Fix the mismatch between the (incorrect) C signature, C call site, and asm implementation by aligning all three on an API passing the parameters (pgd and SP) separately, instead of as a bundled struct. Remove the now unnecessary memory accesses while the MMU is off from the asm, which simplifies the C caller (as it does not need to convert a VA struct pointer to PA) and makes the code slightly more robust by offsetting the struct fields from C and properly expressing the call to the C compiler (e.g. type checker and kCFI). Fixes: f320bc742bc2 ("KVM: arm64: Prepare the creation of s1 mappings at EL2") Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-3-ptosi@google.com Signed-off-by: Oliver Upton commit a8f0655887cc86db9d65fd5fbaf99d62424eb9b4 Author: Pierre-Clément Tosi Date: Mon Jun 10 07:32:30 2024 +0100 KVM: arm64: Fix clobbered ELR in sync abort/SError When the hypervisor receives a SError or synchronous exception (EL2h) while running with the __kvm_hyp_vector and if ELR_EL2 doesn't point to an extable entry, it panics indirectly by overwriting ELR with the address of a panic handler in order for the asm routine it returns to to ERET into the handler. However, this clobbers ELR_EL2 for the handler itself. As a result, hyp_panic(), when retrieving what it believes to be the PC where the exception happened, actually ends up reading the address of the panic handler that called it! This results in an erroneous and confusing panic message where the source of any synchronous exception (e.g. BUG() or kCFI) appears to be __guest_exit_panic, making it hard to locate the actual BRK instruction. Therefore, store the original ELR_EL2 in the per-CPU kvm_hyp_ctxt and point the sysreg to a routine that first restores it to its previous value before running __guest_exit_panic. Fixes: 7db21530479f ("KVM: arm64: Restore hyp when panicking in guest context") Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon Link: https://lore.kernel.org/r/20240610063244.2828978-2-ptosi@google.com Signed-off-by: Oliver Upton commit 819984a0dd3606b7c46fe156cd56a0dc0d604788 Author: Nícolas F. R. A. Prado Date: Thu Jun 13 11:14:52 2024 -0400 kselftest: devices: Add of-fullname-regex property Introduce a new 'of-fullname-regex' property that takes a regular expression and matches against the OF_FULLNAME property. It allows matching controllers that don't have a unique DT address across sibling controllers, and thus dt-mmio can't be used. One particular example of where this is needed is on MT8195 which has multiple USB controllers described by two level deep nodes and using the ranges property: ssusb2: usb@112a1000 { reg = <0 0x112a1000 0 0x2dff>, <0 0x112a3e00 0 0x0100>; ranges = <0 0 0 0x112a0000 0 0x3f00>; xhci2: usb@0 { Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20240613-kselftest-discoverable-probe-mt8195-kci-v1-2-7b396a9b032d@collabora.com Signed-off-by: Greg Kroah-Hartman commit f871f9bacde8cdeaa7a1f6200ff39c79114c4ef6 Author: Nícolas F. R. A. Prado Date: Thu Jun 13 11:14:51 2024 -0400 kselftest: devices: Allow specifying boards directory through parameter Add support for a --boards-dir parameter through which the directory in which the board files will be searched for can be specified. The 'boards' subdirectory is still used as default when the parameter is not specified. This allows more easily running the test with board files supplied by an external repository like https://github.com/kernelci/platform-test-parameters. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20240613-kselftest-discoverable-probe-mt8195-kci-v1-1-7b396a9b032d@collabora.com Signed-off-by: Greg Kroah-Hartman commit ccff36934137b426ca988429b5890f83d89f9ed9 Author: Anand Moon Date: Thu Jun 13 18:00:15 2024 +0530 arm64: dts: amlogic: Used onboard usb hub reset on odroid n2 On Odroid n2/n2+ previously use gpio-hog to reset the usb hub, switch to used on-board usb hub reset to enable the usb hub and enable power to hub. Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20240613123020.43500-2-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3d9894e26e556cd83f1c0ef9f757e375e2cf52c7 Author: Anand Moon Date: Thu Jun 13 18:00:14 2024 +0530 dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub. For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared. GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator. Update the peer-hub description. Reviewed-by: Conor Dooley Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20240613123020.43500-1-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit bfd3587760498227510acc1b18c4299c7922ffe3 Author: Uwe Kleine-König Date: Wed Jun 19 21:35:57 2024 +0200 backlight: 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240619193558.2543645-2-u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones commit 90c478ee37bebe1adaab920e3e06228fef3b9364 Author: Neil Armstrong Date: Thu Jun 6 15:11:16 2024 +0200 usb: typec-mux: nb7vpq904m: broadcast typec state to next mux In the Type-C graph, the nb7vpq904m retimer is in between the USB-C connector and the USB3/DP combo PHY, and this PHY also requires the USB-C mode events to properly set-up the SuperSpeed Lanes functions to setup USB3-only, USB3 + DP Altmode or DP Altmode only on the 4 lanes. Update the nb7vpq904m retimer to get an optional type-c mux on the next endpoint, and broadcast the received mode to it. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240606-topic-sm8x50-upstream-retimer-broadcast-mode-v2-4-c6f6eae479c3@linaro.org Signed-off-by: Greg Kroah-Hartman commit a96abf3bad810d4d281a3f47f1985a2470daa9ed Author: Neil Armstrong Date: Thu Jun 6 15:11:15 2024 +0200 usb: typec-mux: ptn36502: broadcast typec state to next mux In the Type-C graph, the ptn36502 retimer is in between the USB-C connector and the USB3/DP combo PHY, and this PHY also requires the USB-C mode events to properly set-up the SuperSpeed Lanes functions to setup USB3-only, USB3 + DP Altmode or DP Altmode only on the 4 lanes. Update the ptn36502 retimer to get an optional type-c mux on the next endpoint, and broadcast the received mode to it. Tested-by: Luca Weiss Signed-off-by: Neil Armstrong Reviewed-by: Heikki Krogerus Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240606-topic-sm8x50-upstream-retimer-broadcast-mode-v2-3-c6f6eae479c3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 74b64e760ee3433c0f8d95715038c869bcddacf7 Author: Neil Armstrong Date: Thu Jun 6 15:11:14 2024 +0200 usb: typec-mux: nb7vpq904m: unregister typec switch on probe error and remove Add the missing call to typec_switch_put() when probe fails and the nb7vpq904m_remove() call is called. Fixes: 348359e7c232 ("usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()") Signed-off-by: Neil Armstrong Fixes: 88d8f3ac9c67 ("usb: typec: add support for the nb7vpq904m Type-C Linear Redriver") Reviewed-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240606-topic-sm8x50-upstream-retimer-broadcast-mode-v2-2-c6f6eae479c3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2be53b0436fda455e1bf6968ebae53f5d4f3cb0b Author: Neil Armstrong Date: Thu Jun 6 15:11:13 2024 +0200 usb: typec-mux: ptn36502: unregister typec switch on probe error and remove Add the missing call to typec_switch_put() when probe fails and the ptn36502_remove() call is called. Fixes: 8e99dc783648 ("usb: typec: add support for PTN36502 redriver") Signed-off-by: Neil Armstrong Reviewed-by: Heikki Krogerus Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240606-topic-sm8x50-upstream-retimer-broadcast-mode-v2-1-c6f6eae479c3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2e031f50651df6d4d71704e89688694ea68313e5 Author: Heikki Krogerus Date: Wed Jun 19 17:08:06 2024 +0300 usb: typec: ucsi: psy: Add support for the charge type property Adding support for the charge type Linux power supply class property (POWER_SUPPLY_PROP_CHARGE_TYPE) to the UCSI driver. That will make the charge type visible in the charge_type power supply class sysfs attribute file. UCSI has the charge type specified in the Battery Charging Status field of the response to the GET_CONNECTOR_STATUS command. Reviewed-by: Sebastian Reichel Reviewed-by: Mario Limonciello Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240619140806.3502590-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3560b37525d3c9059c62da7f4d74daa2d5338626 Author: Heikki Krogerus Date: Tue Jun 18 15:00:24 2024 +0300 usb: typec: ucsi: Changing the driver data type to void Let's use the same data type as struct device. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240618120024.3384047-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 06f49cc255b3ba4fa605c64d893c7c120041f549 Author: Parth Pancholi Date: Thu Jun 13 12:29:13 2024 +0200 dt-bindings: usb: gpio-sbu-mux: Add an entry for TMUXHS4212 Add a compatible entry for the TI TMUXHS4212 GPIO-based bidirectional 2:1 mux/1:2 demux which can be used for switching orientation of the SBU lines in USB Type-C applications. TMUXHS4212 datasheet: https://www.ti.com/lit/ds/symlink/tmuxhs4212.pdf Signed-off-by: Parth Pancholi Acked-by: Krzysztof Kozlowski Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20240613102913.15714-1-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit 34aa3ca43902baf3440480bf95abf88b4e092588 Author: Bjorn Andersson Date: Mon Jun 10 19:46:27 2024 -0700 dt-bindings: usb: qcom,dwc3: Add SC8180X compatibles The SC8180X platform has two single port DWC3 instances and a two-port DWC3 instance. Add compatibles for these to the binding. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240610-sc8180x-dwc3-binding-compatible-v2-1-c7d5db9702a2@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 50a7230a02ec1218441ef21ba863596d282ff90b Author: Mark Pearson Date: Sun Jun 9 17:43:18 2024 -0400 usb: typec: ucsi: don't retrieve PDOs if not supported On systems where the UCSI PDOs are not supported, the UCSI driver is giving an error message. This can cause users to believe there is a HW issue with their system when in fact it is working as designed. Check if PDO_DETAILS are supported as a feature before attempting to access PDO. If not supported return that zero PDOs are available. Tested on Lenovo L14 G5 AMD and confirmed with Lenovo FW team that PDOs are not supported on this platform. Suggested-by: Diogo Ivo Suggested-by: Dmitry Baryshkov Signed-off-by: Mark Pearson Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240609214328.6580-1-mpearson-lenovo@squebb.ca Signed-off-by: Greg Kroah-Hartman commit a353686e7f5f3f3eef3ac4561ae7ade1f8e5dfdd Author: Daehwan Jung Date: Mon Jun 10 20:39:13 2024 +0900 usb: host: xhci-plat: Add support for XHCI_WRITE_64_HI_LO xHCI specification 5.1 "Register Conventions" states that 64 bit registers should be written in low-high order. All writing operations in xhci is done low-high order following the spec. Add a new quirk to support workaround for high-low order. Signed-off-by: Daehwan Jung Link: https://lore.kernel.org/r/1718019553-111939-4-git-send-email-dh10.jung@samsung.com Signed-off-by: Greg Kroah-Hartman commit bc162403e33e1d57e40994977acaf19f1434e460 Author: Daehwan Jung Date: Mon Jun 10 20:39:12 2024 +0900 xhci: Add a quirk for writing ERST in high-low order This quirk is for the controller that has a limitation in supporting separate ERSTBA_HI and ERSTBA_LO programming. It's supported when the ERSTBA is programmed ERSTBA_HI before ERSTBA_LO. That's because the internal initialization of event ring fetches the "Event Ring Segment Table Entry" based on the indication of ERSTBA_LO written. Signed-off-by: Daehwan Jung Link: https://lore.kernel.org/r/1718019553-111939-3-git-send-email-dh10.jung@samsung.com Signed-off-by: Greg Kroah-Hartman commit b7ec7fd63256ff39eb95e27546efbd16b3915bf4 Author: Daehwan Jung Date: Mon Jun 10 20:39:11 2024 +0900 usb: dwc3: Support quirk for writing high-low order There's the limitation of Synopsys dwc3 controller with ERST programming in supporting separate ERSTBA_HI and ERSTBA_LO programming. It's supported when the ERSTBA is programmed ERSTBA_HI before ERSTBA_LO. But, writing operations in xHCI is done low-high order following xHCI spec. xHCI specification 5.1 "Register Conventions" states that 64 bit registers should be written in low-high order. Synopsys dwc3 needs workaround for high-low order. That's why adding new quirk is needed to support this. Signed-off-by: Daehwan Jung Link: https://lore.kernel.org/r/1718019553-111939-2-git-send-email-dh10.jung@samsung.com Signed-off-by: Greg Kroah-Hartman commit 2bc0bea11c6112e61fbd663c993892ee56956577 Author: Javier Carrasco Date: Thu Jun 6 11:03:57 2024 +0200 usb: typec: tipd: use min() to set tps6598x firmware packet size Simplify the current firmware packet size check in the tps6598x implementation by means of a single call to min(), which is what the current code does in a more verbose, less elegant way. This patch fixes a cocci warning ("WARNING opportunity for min()"). Suggested-by: Julia Lawall Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240606-tps6598x_fw_update_log-v1-3-2b5b8369a0ba@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit 916b8e5fa73d399a61156da7d914abfae74b962b Author: Javier Carrasco Date: Thu Jun 6 11:03:56 2024 +0200 usb: typec: tipd: add error log to provide firmware name and size The current error logs do not show the firmware name and size for the tps6598x. On the other hand, this information is provided for the tps25750. Both implementations have access to that information, and the existing message for the tps25750 can be used for the tps6598x without extra modifications. Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240606-tps6598x_fw_update_log-v1-2-2b5b8369a0ba@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit 5315052d3c6fa7d2d6a8795276bf89c8c2a6f600 Author: Javier Carrasco Date: Thu Jun 6 11:03:55 2024 +0200 usb: typec: tipd: drop second firmware name read tps_request_firmware() reads the firmware name and there is no need to repeat the action in the device-specific implementations of the firmware update mechanism. Provide the firmware name as a parameter in tps_request_firmware() to avoid repetitive operations in the device-specific implementations. Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240606-tps6598x_fw_update_log-v1-1-2b5b8369a0ba@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit 38935f3366801355ac64731d8df1c6bb5d6609ee Author: Wolfram Sang Date: Tue Jun 4 23:27:31 2024 +0200 usb: typec: tcpm: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240604212730.4968-2-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 58be297b675d919e30a3804f9a08b546994e0d99 Author: Uwe Kleine-König Date: Wed Jun 19 21:44:13 2024 +0200 usb: misc: 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 Link: https://lore.kernel.org/r/20240619194413.2544537-2-u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 5e02deadb85bc58563ec70e47aac790c384664a4 Author: Jeff Johnson Date: Tue Jun 18 08:18:26 2024 -0700 usb: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/core/usbcore.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/mon/usbmon.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/class/usbtmc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/storage/uas.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/chipidea/ci_hdrc_msm.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240618-md-drivers-usb-v2-1-e9b20a5eb7f9@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 5a94c9a3129ced550f8d73feb06f3feeb4edf61d Author: Jeff Johnson Date: Tue Jun 11 18:54:11 2024 -0700 usb: common: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/common/usb-common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/common/usb-otg-fsm.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240611-md-drivers-usb-common-v1-1-f81555b0bd0d@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 546a765027d765907e8e379cef8e923a9c4a57ec Author: Jeff Johnson Date: Tue Jun 11 18:19:10 2024 -0700 usb: phy: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/phy/phy-am335x-control.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/phy/phy-am335x.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240611-md-drivers-usb-phy-v1-1-1cacb41280c3@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 9fdce69f674e49be669e97919d24b1ab5d2c9684 Author: Jeff Johnson Date: Tue Jun 11 17:53:37 2024 -0700 usb: host: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/host/ohci-exynos.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/host/xhci-pci-renesas.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240611-md-drivers-usb-host-v1-1-e2071a696ef8@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 6f77ab5f774c5c850bcf537768269fd6c960d75c Author: Jeff Johnson Date: Tue Jun 11 17:32:35 2024 -0700 usb: misc: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/misc/ezusb.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/misc/isight_firmware.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/misc/yurex.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240611-md-drivers-usb-misc-v1-1-98475a5aa8ef@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 1cb9ba5e61e8f8cab9009e8c1b5afd99db13f8a7 Author: Jeff Johnson Date: Wed Jun 5 20:57:08 2024 -0700 usb: gadget: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/libcomposite.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_acm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ss_lb.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/u_serial.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_serial.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_obex.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/u_ether.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ncm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ecm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_phonet.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_eem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ecm_subset.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_rndis.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_mass_storage.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_fs.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_uac1.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_uac1_legacy.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_uac2.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_uvc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_midi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_midi2.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_hid.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_printer.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_tcm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_zero.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_midi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_dbgp.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240605-md-drivers-usb-gadget-v1-1-29847a46aad3@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 1899e79cf1f6405bef358ce5c436679afe6c4034 Author: Frank Li Date: Fri Jun 7 11:41:19 2024 -0400 dt-bindings: usb: cdns,usb3: use common usb-drd yaml Use common usb-drd yaml for usb OTG related propteries to fix below DTB_CHECK warning. arch/arm64/boot/dts/freescale/imx8qxp-mek.dtb: usb@5b110000: usb@5b120000: 'port', 'usb-role-switch' do not match any of the regexes: 'pinctrl-[0-9]+' Add "port" proptery to use connect type C connector and fix below warning. arch/arm64/boot/dts/freescale/imx8qxp-mek.dtb: usb@5b110000: usb@5b120000: Unevaluated properties are not allowed ('port' was unexpected) Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240607154119.1543290-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 11a31be88fb6191f2584a0b6364b11e21d068685 Author: Sebastian Ott Date: Wed Jun 19 17:40:36 2024 +0000 KVM: selftests: arm64: Test writes to CTR_EL0 Test that CTR_EL0 is modifiable from userspace, that changes are visible to guests, and that they are preserved across a vCPU reset. Signed-off-by: Sebastian Ott Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20240619174036.483943-11-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 76d36012276a328ac0a1e9c7415cafd092447ce7 Author: Sebastian Ott Date: Wed Jun 19 17:40:35 2024 +0000 KVM: arm64: rename functions for invariant sys regs Invariant system id registers are populated with host values at initialization time using their .reset function cb. These are currently called get_* which is usually used by the functions implementing the .get_user callback. Change their function names to reset_* to reflect what they are used for. Signed-off-by: Sebastian Ott Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20240619174036.483943-10-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit bb4fa769dcdd0b6e47ecbf0363489be510498b1d Author: Sebastian Ott Date: Wed Jun 19 17:40:34 2024 +0000 KVM: arm64: show writable masks for feature registers Instead of using ~0UL provide the actual writable mask for non-id feature registers in the output of the KVM_ARM_GET_REG_WRITABLE_MASKS ioctl. This changes the mask for the CTR_EL0 and CLIDR_EL1 registers. Signed-off-by: Sebastian Ott Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20240619174036.483943-9-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 2843cae26644fbc922e93c7c4c279f70fb3275f1 Author: Sebastian Ott Date: Wed Jun 19 17:40:33 2024 +0000 KVM: arm64: Treat CTR_EL0 as a VM feature ID register CTR_EL0 is currently handled as an invariant register, thus guests will be presented with the host value of that register. Add emulation for CTR_EL0 based on a per VM value. Userspace can switch off DIC and IDC bits and reduce DminLine and IminLine sizes. Naturally, ensure CTR_EL0 is trapped (HCR_EL2.TID2=1) any time that a VM's CTR_EL0 differs from hardware. Signed-off-by: Sebastian Ott Reviewed-by: Shaoqin Huang Link: https://lore.kernel.org/r/20240619174036.483943-8-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit f1ff3fc5209a1d63a4018bdb4231fbb073063c9a Author: Sebastian Ott Date: Wed Jun 19 17:40:32 2024 +0000 KVM: arm64: unify code to prepare traps There are 2 functions to calculate traps via HCR_EL2: * kvm_init_sysreg() called via KVM_RUN (before the 1st run or when the pid changes) * vcpu_reset_hcr() called via KVM_ARM_VCPU_INIT To unify these 2 and to support traps that are dependent on the ID register configuration, move the code from vcpu_reset_hcr() to sys_regs.c and call it via kvm_init_sysreg(). We still have to keep the non-FWB handling stuff in vcpu_reset_hcr(). Also the initialization with HCR_GUEST_FLAGS is kept there but guarded by !vcpu_has_run_once() to ensure that previous calculated values don't get overwritten. While at it rename kvm_init_sysreg() to kvm_calculate_traps() to better reflect what it's doing. Signed-off-by: Sebastian Ott Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20240619174036.483943-7-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 44241f34fac96d23cb8eac944815a1fdbf4ce523 Author: Oliver Upton Date: Wed Jun 19 17:40:31 2024 +0000 KVM: arm64: nv: Use accessors for modifying ID registers In the interest of abstracting away the underlying storage of feature ID registers, rework the nested code to go through the accessors instead of directly iterating the id_regs array. This means we now lose the property that ID registers unknown to the nested code get zeroed, but we really ought to be handling those explicitly going forward. Link: https://lore.kernel.org/r/20240619174036.483943-6-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit d7508d27dd8878eb09e470855a546d96e0cfd4d3 Author: Oliver Upton Date: Wed Jun 19 17:40:30 2024 +0000 KVM: arm64: Add helper for writing ID regs Replace the remaining usage of IDREG() with a new helper for setting the value of a feature ID register, with the benefit of cramming in some extra sanity checks. Reviewed-by: Sebastian Ott Link: https://lore.kernel.org/r/20240619174036.483943-5-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 97ca3fcc15cc0b19ccacb56d25545f1df080fbc0 Author: Oliver Upton Date: Wed Jun 19 17:40:29 2024 +0000 KVM: arm64: Use read-only helper for reading VM ID registers IDREG() expands to the storage of a particular ID reg, which can be useful for handling both reads and writes. However, outside of a select few situations, the ID registers should be considered read only. Replace current readers with a new macro that expands to the value of the field rather than the field itself. Reviewed-by: Sebastian Ott Link: https://lore.kernel.org/r/20240619174036.483943-4-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 410db103f6ebc68a505ef541291ec327e385205a Author: Oliver Upton Date: Wed Jun 19 17:40:28 2024 +0000 KVM: arm64: Make idregs debugfs iterator search sysreg table directly CTR_EL0 complicates the existing scheme for iterating feature ID registers, as it is not in the contiguous range that we presently support. Just search the sysreg table for the Nth feature ID register in anticipation of this. Yes, the debugfs interface has quadratic time completixy now. Boo hoo. Reviewed-by: Sebastian Ott Link: https://lore.kernel.org/r/20240619174036.483943-3-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 4e8ff73eb7ae3f7a7ec1d59f4d54935ae28f4795 Author: Oliver Upton Date: Wed Jun 19 17:40:27 2024 +0000 KVM: arm64: Get sys_reg encoding from descriptor in idregs_debug_show() KVM is about to add support for more VM-scoped feature ID regs that live outside of the id_regs[] array, which means the index of the debugfs iterator may not actually be an index into the array. Prepare by getting the sys_reg encoding from the descriptor itself. Reviewed-by: Sebastian Ott Link: https://lore.kernel.org/r/20240619174036.483943-2-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 593f1dd4c81f6932042508a80186dbdea90312a5 Author: Konrad Dybcio Date: Thu Jun 6 13:10:49 2024 +0200 drm/msm/a6xx: Fix A702 UBWC mode UBWC_MODE is a one-bit-wide field, so a value of 2 is obviously bogus. Replace it with the correct value (0). Fixes: 18397519cb62 ("drm/msm/adreno: Add A702 support") Reported-by: Connor Abbott Closes: https://lore.kernel.org/linux-arm-msm/CACu1E7FTN=kwaDJMNiTmFspALzj2+Q-nvsN5ugi=vz4RdUGvGw@mail.gmail.com/ Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/597359/ Signed-off-by: Rob Clark commit 71d9b458b2bfe79197194d914aa9bada46fb9e14 Author: Abhinav Kumar Date: Wed Jun 5 11:34:15 2024 -0700 drm/msm/a6xx: use __unused__ to fix compiler warnings for gen7_* includes GCC diagnostic pragma method throws below warnings in some of the versions drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:16:9: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas] #pragma GCC diagnostic ignored "-Wunused-const-variable" ^ In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:18:0: drivers/gpu/drm/msm/adreno/adreno_gen7_0_0_snapshot.h:924:19: warning: 'gen7_0_0_external_core_regs' defined but not used [-Wunused-variable] static const u32 *gen7_0_0_external_core_regs[] = { ^ In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:19:0: drivers/gpu/drm/msm/adreno/adreno_gen7_2_0_snapshot.h:748:19: warning: 'gen7_2_0_external_core_regs' defined but not used [-Wunused-variable] static const u32 *gen7_2_0_external_core_regs[] = { ^ In file included from drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:20:0: drivers/gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h:1188:43: warning: 'gen7_9_0_sptp_clusters' defined but not used [-Wunused-variable] static struct gen7_sptp_cluster_registers gen7_9_0_sptp_clusters[] = { ^ drivers/gpu/drm/msm/adreno/adreno_gen7_9_0_snapshot.h:1438:19: warning: 'gen7_9_0_external_core_regs' defined but not used [-Wunused-variable] static const u32 *gen7_9_0_external_core_regs[] = { Remove GCC version dependency by using __unused__ for the unused gen7_* includes. Changes in v2: - Fix the warnings in the commit text - Use __attribute((__unused__)) instead of local assignment changes in v3: - drop the Link from the auto add changes in v4: - replace __attribute((__unused__)) with __always_unused Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx") Suggested-by: Rob Clark Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/597265/ [Add gen7_9_0_cx_debugbus_blocks as well] Signed-off-by: Rob Clark commit 90d32e92011eaae8e70a9169b4e7acf4ca8f9d3a Author: Athira Rajeev Date: Mon Jun 17 17:51:21 2024 +0530 tools/perf: Handle perftool-testsuite_probe testcases fail when kernel debuginfo is not present Running "perftool-testsuite_probe" fails as below: ./perf test -v "perftool-testsuite_probe" 83: perftool-testsuite_probe : FAILED There are three fails: 1. Regexp not found: "\s*probe:inode_permission(?:_\d+)?\s+\(on inode_permission(?:[:\+][0-9A-Fa-f]+)?@.+\)" -- [ FAIL ] -- perf_probe :: test_adding_kernel :: listing added probe :: perf probe -l (output regexp parsing) 2. Regexp not found: "probe:vfs_mknod" Regexp not found: "probe:vfs_create" Regexp not found: "probe:vfs_rmdir" Regexp not found: "probe:vfs_link" Regexp not found: "probe:vfs_write" -- [ FAIL ] -- perf_probe :: test_adding_kernel :: wildcard adding support (command exitcode + output regexp parsing) 3. Regexp not found: "Failed to find" Regexp not found: "somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64" Regexp not found: "in this function|at this address" Line did not match any pattern: "The /boot/vmlinux file has no debug information." Line did not match any pattern: "Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package." These three tests depends on kernel debug info. 1. Fail 1 expects file name along with probe which needs debuginfo 2. Fail 2 : perf probe -nf --max-probes=512 -a 'vfs_* $params' Debuginfo-analysis is not supported. Error: Failed to add events. 3. Fail 3 : perf probe 'vfs_read somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64' Debuginfo-analysis is not supported. Error: Failed to add events. There is already helper function skip_if_no_debuginfo in lib/probe_vfs_getname.sh which does perf probe and returns "2" if debug info is not present. Use the skip_if_no_debuginfo function and skip only the three tests which needs debuginfo based on the result. With the patch: 83: perftool-testsuite_probe: --- start --- test child forked, pid 3927 -- [ PASS ] -- perf_probe :: test_adding_kernel :: adding probe inode_permission :: -- [ PASS ] -- perf_probe :: test_adding_kernel :: adding probe inode_permission :: -a -- [ PASS ] -- perf_probe :: test_adding_kernel :: adding probe inode_permission :: --add -- [ PASS ] -- perf_probe :: test_adding_kernel :: listing added probe :: perf list Regexp not found: "\s*probe:inode_permission(?:_\d+)?\s+\(on inode_permission(?:[:\+][0-9A-Fa-f]+)?@.+\)" -- [ SKIP ] -- perf_probe :: test_adding_kernel :: 2 2 Skipped due to missing debuginfo :: testcase skipped -- [ PASS ] -- perf_probe :: test_adding_kernel :: using added probe -- [ PASS ] -- perf_probe :: test_adding_kernel :: deleting added probe -- [ PASS ] -- perf_probe :: test_adding_kernel :: listing removed probe (should NOT be listed) -- [ PASS ] -- perf_probe :: test_adding_kernel :: dry run :: adding probe -- [ PASS ] -- perf_probe :: test_adding_kernel :: force-adding probes :: first probe adding -- [ PASS ] -- perf_probe :: test_adding_kernel :: force-adding probes :: second probe adding (without force) -- [ PASS ] -- perf_probe :: test_adding_kernel :: force-adding probes :: second probe adding (with force) -- [ PASS ] -- perf_probe :: test_adding_kernel :: using doubled probe -- [ PASS ] -- perf_probe :: test_adding_kernel :: removing multiple probes Regexp not found: "probe:vfs_mknod" Regexp not found: "probe:vfs_create" Regexp not found: "probe:vfs_rmdir" Regexp not found: "probe:vfs_link" Regexp not found: "probe:vfs_write" -- [ SKIP ] -- perf_probe :: test_adding_kernel :: 2 2 Skipped due to missing debuginfo :: testcase skipped Regexp not found: "Failed to find" Regexp not found: "somenonexistingrandomstuffwhichisalsoprettylongorevenlongertoexceed64" Regexp not found: "in this function|at this address" Line did not match any pattern: "The /boot/vmlinux file has no debug information." Line did not match any pattern: "Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package." -- [ SKIP ] -- perf_probe :: test_adding_kernel :: 2 2 Skipped due to missing debuginfo :: testcase skipped -- [ PASS ] -- perf_probe :: test_adding_kernel :: function with retval :: add -- [ PASS ] -- perf_probe :: test_adding_kernel :: function with retval :: record -- [ PASS ] -- perf_probe :: test_adding_kernel :: function argument probing :: script ## [ PASS ] ## perf_probe :: test_adding_kernel SUMMARY ---- end(0) ---- 83: perftool-testsuite_probe : Ok Only the three specific tests are skipped and remaining ran successfully. Signed-off-by: Athira Rajeev Reviewed-by: James Clark Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240617122121.7484-1-atrajeev@linux.vnet.ibm.com commit b1d90a862c890152bbaf847b7a78fc59af54159b Author: Imre Deak Date: Tue Jun 18 15:52:55 2024 +0300 drm/xe: Use the encoder suspend helper also used by the i915 driver Use the suspend encoders helper which is also used by the i915 driver. This fixes an issue in the xe driver where the encoder suspend_complete() hook is not called and was an overlook when this hook was added in commit b61fad5f7e5d ("drm/i915/tc: Call TypeC port flush_work/cleanup without modeset locks held") for i915, but not added to the xe driver (which was still in a separate source tree at the above point). v2: Fix checkpatch warn in commit log. (Rodrigo) Reviewed-by: Rodrigo Vivi Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240618125255.4080303-3-imre.deak@intel.com commit b2c42f9d5ef0159635ba23f4dc2798c1fbcb7cb5 Author: Imre Deak Date: Tue Jun 18 15:52:54 2024 +0300 drm/i915: Pass intel_display to the encoder suspend/shutdown helpers Pass intel_display to the encoder suspend/shutdown helpers instead of drm_i915_private for better isolation. v2: Pass intel_display to HAS_DISPLAY() as well, update commit log accordingly. (Jani) Cc: Jani Nikula Reviewed-by: Rodrigo Vivi # v1 Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240618125255.4080303-2-imre.deak@intel.com commit cc2ee76a9003e1b5a7cd4f67ecf9b4b91d83299b Author: Imre Deak Date: Tue Jun 18 15:52:53 2024 +0300 drm/i915: Move encoder suspend/shutdown helpers to intel_encoder.c Move the encoder suspend/shutdown helpers to intel_encoder.c, this being the logical place for encoder functions. This also allows sharing the above helpers with the xe driver, done in a follow-up patch. While at it rename the functions using the usual intel_encoder prefix and in the functions rename the dev_priv parameter to i915. v2: Remove extra w/s in the include section. (Jani) Reviewed-by: Rodrigo Vivi # v1 Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240618125255.4080303-1-imre.deak@intel.com commit fccf9dd00893eff49d3a86b43280fd2ab8736298 Author: Rob Clark Date: Tue Jun 18 09:42:51 2024 -0700 drm/msm/adreno: Move CP_PROTECT settings to hw catalog Move the CP_PROTECT settings into the hw catalog. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/599731/ commit dff2f69f3e8a6ea67b3e566424043430b05c3186 Author: Rob Clark Date: Tue Jun 18 09:42:50 2024 -0700 drm/msm/adreno: Move hwcg table into a6xx specific info Introduce a6xx_info where we can stash gen specific stuff without polluting the toplevel adreno_info struct. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/599728/ commit 85e8cc06f282aff26da0553080fd11551d39e7f1 Author: Rob Clark Date: Tue Jun 18 09:42:49 2024 -0700 drm/msm/adreno: Move hwcg regs to a6xx hw catalog Move the hwcg tables into the hw catalog. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/599727/ commit 2e819c420e5b8278c589d9695ced0f11fedeed4b Author: Rob Clark Date: Tue Jun 18 09:42:48 2024 -0700 drm/msm/adreno: Split catalog into separate files Split each gen's gpu table into it's own file. Only code-motion, no functional change. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/599725/ commit 8ed322f632a99044065f5e16ebd04f7b024e0dae Author: Rob Clark Date: Tue Jun 18 09:42:47 2024 -0700 drm/msm/adreno: Split up giant device table Split into a separate table per generation, in preparation to move each gen's device table to it's own file. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/599723/ commit d35386b3a77bb26d771c7d7c59dab8a920ab62ee Author: Sai Teja Pottumuttu Date: Wed Jun 19 12:26:14 2024 +0530 drm/xe/xelpgp: Extend Wa_14019877138 to graphics 12.74 Wa_14019877138 is also needed for xe_lpgp graphics 12.74 Signed-off-by: Sai Teja Pottumuttu Reviewed-by: Shekhar Chauhan Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240619065614.131151-1-sai.teja.pottumuttu@intel.com commit d7d2818b93837def4a33f92da2e64c3a2752c47e Author: Lorenzo Bianconi Date: Sat Jun 15 23:15:42 2024 +0200 phy: airoha: Add PCIe PHY driver for EN7581 SoC. Introduce support for Airoha PCIe PHY controller available in EN7581 SoC. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Zhengping Zhang Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/20ac99aa8628d97778594f606681db7f868f24fe.1718485860.git.lorenzo@kernel.org Signed-off-by: Vinod Koul commit e2d0317e665884d78c56f99d2a0005213d8390b6 Author: Lorenzo Bianconi Date: Sat Jun 15 23:15:41 2024 +0200 dt-bindings: phy: airoha: Add PCIe PHY controller Introduce device-tree binding documentation for Airoha EN7581 PCIe PHY controller. Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/656133f865433c1d02f00a3abbb1aa9312d2a24e.1718485860.git.lorenzo@kernel.org Signed-off-by: Vinod Koul commit aefa036be8c216c8b344d34c9f35ff907b9c315a Author: Nathan Chancellor Date: Thu Jun 20 08:21:15 2024 -0700 phy: freescale: imx8qm-hsio: Include bitfield.h for FIELD_PREP In various configurations/architectures, bitfield.h may not be transitively included, which results in a compiler error because FIELD_PREP is an unexpanded macro: drivers/phy/freescale/phy-fsl-imx8qm-hsio.c:459:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 459 | val = FIELD_PREP(HSIO_MODE_MASK, val); | ^ 1 error generated. Include bitfield.h explicitly to fix the build. Fixes: 82c56b6dd24f ("phy: freescale: imx8qm-hsio: Add i.MX8QM HSIO PHY driver support") Signed-off-by: Nathan Chancellor Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406170340.7mk3WU3Q-lkp@intel.com/ Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20240620-phy-fsl-imx8qm-hsio-add-bitfield-include-v1-1-5c7c09ed87e6@kernel.org Signed-off-by: Vinod Koul commit ffe4b381e2ea97c7a5868dbe841c7522b1b0b408 Author: Chen-Yu Tsai Date: Thu Jun 20 17:47:36 2024 +0800 regulator: dt-bindings: mt6315: Document MT6319 PMIC The MT6319 is a pin-compatible drop-in replacement for MT6315 with slightly better electrical characteristics. It's unclear whether there are any differences, since the downstream implementation doesn't describe the MT6319 separately. Neither does the implementation check chip IDs, even though those are available. Add a new compatible for the MT6319 just in case differences are discovered later and fall back to the MT6315 compatible. Signed-off-by: Chen-Yu Tsai Reviewed-by: Conor Dooley Link: https://patch.msgid.link/20240620094746.2404753-2-wenst@chromium.org Signed-off-by: Mark Brown commit 93d2d3e4c5d075ed691bf940f7eaf938cf8c6632 Author: Ashutosh Dixit Date: Wed Jun 19 15:56:17 2024 -0700 drm/xe/oa: Remove WARN_ON's for unsupported configurations The OA ioctl's already have drm_dbg's which are sufficient to tell the user that OA is not supported on unsupported configurations (execlist mode and platform gen < 12). Having additional WARN_ON's for these during driver probe create unnecessary noise. Just remove these WARN_ON's. Suggested-by: Michal Wajdeczko Signed-off-by: Ashutosh Dixit Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240619225617.3465899-1-ashutosh.dixit@intel.com commit 3516b2913ead50c5649cafcd1fe97b9c9dc41e59 Author: José Roberto de Souza Date: Wed Jun 19 12:28:54 2024 -0700 drm/xe/oa: Call xe_oa_emit_oa_config() with new config when updating config When UMD ask config to be updated, xe_oa_config_locked() was calling xe_oa_emit_oa_config() that would use stream->oa_config but that is only changed to the next oa_config after xe_oa_emit_oa_config() finish. So it was setting the same config for all DRM_XE_PERF_IOCTL_CONFIG calls. Cc: Ashutosh Dixit Signed-off-by: José Roberto de Souza Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240619192854.199289-1-jose.souza@intel.com commit cb925d31f091467dee09dd49eab8bcd2c9b3e73e Author: Michal Wajdeczko Date: Wed Jun 19 19:54:27 2024 +0200 drm/xe/oa: Fix potential NPD when OA is not initialized If oa->xe can be NULL then we shall not use it as a valid pointer. Fixes: cdf02fe1a94a ("drm/xe/oa/uapi: Add/remove OA config perf ops") Fixes: b6fd51c62119 ("drm/xe/oa/uapi: Define and parse OA stream properties") Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Ashutosh Dixit Cc: Umesh Nerlige Ramappa Reviewed-by: Rodrigo Vivi Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240619175427.861-1-michal.wajdeczko@intel.com commit 3e1f12c26646eb0ad67d3eaefd32f765997da6a8 Author: Roman Storozhenko Date: Thu Jun 20 17:57:23 2024 +0200 cpupower: Change the var type of the 'monitor' subcommand display mode There is a type 'enum operation_mode_e' contains the display modes of the 'monitor' subcommand. This type isn't used though, instead the variable 'mode' is of a simple 'int' type. Change 'mode' variable type from 'int' to 'enum operation_mode_e' in order to improve compiler type checking. Built and tested this with different monitor cmdline params. Everything works as expected, that is nothing changed and no regressions encountered. Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit a286db937ebd90067dac44aa0e0924468e8f0a90 Author: Roman Storozhenko Date: Wed Jun 19 08:47:08 2024 +0200 cpupower: Remove absent 'v' parameter from monitor man page Remove not supported '-v' parameter from the cpupower's 'monitor' command description. There is a '-v' parameter described in cpupower's 'monitor' command man page. It isn't supported at the moment, and perhaps has never been supported. When I run the monitor with this parameter I get the following: $ sudo LD_LIBRARY_PATH=lib64/ bin/cpupower monitor -v monitor: invalid option -- 'v' invalid or unknown argument $ sudo LD_LIBRARY_PATH=lib64/ bin/cpupower monitor -V monitor: invalid option -- 'V' invalid or unknown argument Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit daa268ae2866ae5c80a0650c04a4989fb069b5d9 Author: Javier Carrasco Date: Wed Jun 19 23:13:22 2024 +0200 Input: ims-pcu - drop repeated "input" in error message This case of the common error message upon failure of input_allocate_device() repeats the word "input". Drop one "input" from the error message. Signed-off-by: Javier Carrasco Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-2-3ee0ead2e57d@gmail.com Signed-off-by: Dmitry Torokhov commit e8135f9dc774f956bca44a13cf056403140e2337 Author: Javier Carrasco Date: Wed Jun 19 23:13:21 2024 +0200 Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_by Use the __counted_by compiler attribute for the data[] flexible array member to improve the results of array bound sanitizers. Signed-off-by: Javier Carrasco Reviewed-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-1-3ee0ead2e57d@gmail.com Signed-off-by: Dmitry Torokhov commit c62b4fc4b9b86ab35e5c4236f2053ce21ee81ebc Author: Tejas Vipin Date: Wed Jun 12 22:09:42 2024 +0530 drm/panel: truly-nt35521: transition to mipi_dsi wrapped functions Use functions introduced in commit 966e397e4f60 ("drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()") and commit f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling") for the sony tulip truly nt35521 panel. Reviewed-by: Douglas Anderson Signed-off-by: Tejas Vipin Reviewed-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240612163946.488684-1-tejasvipin76@gmail.com commit 254274cde1f22b3035c72e3f9477e89229e17d53 Author: Adrian Hunter Date: Fri Jun 14 11:00:51 2024 +0300 mmc: sdhci: Eliminate SDHCI_QUIRK_UNSTABLE_RO_DETECT SDHCI_QUIRK_UNSTABLE_RO_DETECT is used by only one driver variant. It was added in 2011 by commit 82b0e23a295c ("mmc: sdhci: Fix read-only detection with JMicron 388 chip"). Simplify sdhci by moving the logic to the only place it is used. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20240614080051.4005-4-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 8d46e04cc78871de89b810ba1966fd824fec7842 Merge: 1f14028666386 ab069ce125965 Author: Ulf Hansson Date: Thu Jun 20 16:43:20 2024 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v6.10-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.11. Signed-off-by: Ulf Hansson commit 5a1906a476bc84145f20cd1941aa1250d38db4aa Author: Andreas Gruenbacher Date: Mon Jun 10 23:26:36 2024 +0200 gfs2: Revert "check for no eligible quota changes" Since the previous commit, function gfs2_quota_sync() will not cause the sync generation to creep forward by one every time the function is called; this helps keep things a but more tidy. We also don't care that this function allocates a page of memory every time it is called, so no good reason for keeping qd_changed() anymore, which just duplicates qd_grab_sync(). This reverts commit 06aa6fd31a5f402b055e12ea53bb7b086359d3c8. Signed-off-by: Andreas Gruenbacher commit d9a75a60699dedaac17d2b5170bb2e3cdc03481e Author: Andreas Gruenbacher Date: Fri Jun 7 15:54:21 2024 +0200 gfs2: Be more careful with the quota sync generation The quota sync generation is only ever updated under sd_quota_sync_mutex by gfs2_quota_sync(), but its current value is fetched ouside of that mutex, so use WRITE_ONCE() and READ_ONCE() when accessing it without holding that mutex. Pass the current sync generation to do_sync() from its callers to ensure that we're not recording the wrong generation when the syncing is done. Also, make sure that qd->qd_sync_gen only ever moves forward. In gfs2_quota_sync(), only write the new sync generation when we know that there are changes. This eliminates the need for function sd_changed(), which we will remove in the next commit. Signed-off-by: Andreas Gruenbacher commit 8d89e068deccb4f34d412df4042f37a75e126259 Author: Andreas Gruenbacher Date: Mon Jun 10 16:31:22 2024 +0200 gfs2: Get rid of some unnecessary quota locking With the locking the previous patch has introduced for each struct gfs2_quota_data object, sd_quota_mutex has become largely irrelevant. By waiting on the buffer head instead of waiting on the mutex in get_bh(), it becomes completely irrelevant and can be removed. Signed-off-by: Andreas Gruenbacher commit 6b521fc111a2ad5ead39776960d3d2d289ce0722 Author: Danilo Krummrich Date: Wed Jun 19 15:39:18 2024 +0200 MAINTAINERS: add Rust device abstractions to DRIVER CORE Add missing file path of the Rust abstractions to the maintainers entry, until we can move it to 'drivers/base/'. Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240619133949.64638-2-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit 4ead6c37b04aa35943ea270f09db18ebb38e63ff Author: Danilo Krummrich Date: Wed Jun 19 15:39:17 2024 +0200 device: rust: improve safety comments Improve the wording of safety comments to be more explicit about what exactly is guaranteed to be valid. Suggested-by: Benno Lossin Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240619133949.64638-1-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit 892fb846d6a04ad95c22ae8c758fd8998a0d237c Author: Danilo Krummrich Date: Wed Jun 19 15:20:14 2024 +0200 MAINTAINERS: add Danilo as FIRMWARE LOADER maintainer Add myself as firmware loader maintainer, as suggested by Luis in [1]. CC: Luis Chamberlain CC: Russ Weight CC: Greg Kroah-Hartman Link: https://lore.kernel.org/rust-for-linux/ZnHkQpyiX4UKdLEt@bombadil.infradead.org/ [1] Suggested-by: Luis Chamberlain Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240619132029.59296-3-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit 7bd08093999898c0c35c4e90102cb2daebfadd9a Author: Danilo Krummrich Date: Wed Jun 19 15:20:13 2024 +0200 MAINTAINERS: add Rust FW abstractions to FIRMWARE LOADER Add missing file path of the Rust abstractions to the maintainers entry, until we can move it to 'drivers/base/firmware_loader/'. CC: Luis Chamberlain CC: Russ Weight CC: Greg Kroah-Hartman Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240619132029.59296-2-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit bbe98f4fde5a52aa01a1e1d754e1398228815fb0 Author: Danilo Krummrich Date: Wed Jun 19 15:20:12 2024 +0200 firmware: rust: improve safety comments Improve the wording of safety comments to be more explicit about what exactly is guaranteed to be valid. Suggested-by: Benno Lossin Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240619132029.59296-1-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit 9b751e52fb6b049acec44a30f54b6746d57e5009 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:54 2024 +0800 drm/mediatek: Support DRM plane alpha in Mixer Set the plane alpha according to DRM plane property. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-14-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit bc46eb5d5d7780782c70c7915f59ed25a908d550 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:53 2024 +0800 drm/mediatek: Support DRM plane alpha in OVL Set the plane alpha according to DRM plane property. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-13-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 2606aac50dfb6aed48dca40560fe7e3ff349a1b5 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:52 2024 +0800 drm/mediatek: Support RGBA8888 and RGBX8888 in OVL on MT8195 Support RGBA8888 and RGBX8888 formats in OVL on MT8195. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-12-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 46ed6ff6f996f4805d39e13b1766bcb761aab5c8 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:51 2024 +0800 drm/mediatek: Support more 10bit formats in OVL Support more 10bit formats in OVL. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-11-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit a4c9410b31cac463599898edb5111ca9bc0810bd Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:50 2024 +0800 drm/mediatek: Set DRM mode configs accordingly Set DRM mode configs limitation according to the hardware capabilities and pass the IGT checks as below: - The test "graphics.IgtKms.kms_plane" requires a frame buffer with width of 4512 pixels (> 4096). - The test "graphics.IgtKms.kms_cursor_crc" checks if the cursor size is defined, and run the test with cursor size from 1x1 to 512x512. Please notice that the test conditions may change as IGT is updated. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-10-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 9f428b95ac89ca0b1e0f280f7d25a583ffbb98ae Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:49 2024 +0800 drm/mediatek: Add new color format MACROs in OVL Define new color formats to hide the bit operation in the MACROs to make the switch statement more concise. Change the MACROs to align the naming rule in DRM. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-9-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 74608d8feefd1675388f23362aac8df4ac3af931 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:48 2024 +0800 drm/mediatek: Add DRM_MODE_ROTATE_0 to rotation property Always add DRM_MODE_ROTATE_0 to rotation property to meet IGT's (Intel GPU Tools) requirement. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-8-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 6fb7a0985fd16868b5d72eb3e3de7524a6000e6e Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:47 2024 +0800 drm/mediatek: Add OVL compatible name for MT8195 Add OVL compatible name for MT8195. Without this commit, DRM won't work after modifying the device tree. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-7-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 6b9946f4550d8dad8bc1af2db97286ca449af786 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:46 2024 +0800 drm/mediatek: Turn off the layers with zero width or height We found that IGT (Intel GPU Tool) will try to commit layers with zero width or height and lead to undefined behaviors in hardware. Disable the layers in such a situation. Fixes: 453c3364632a ("drm/mediatek: Add ovl_adaptor support for MT8195") Fixes: d886c0009bd0 ("drm/mediatek: Add ETHDR support for MT8195") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-6-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 31c0fbf67c8c0bb38d7fb21d404ea3dbd619d99e Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:45 2024 +0800 drm/mediatek: Fix destination alpha error in OVL The formula of Coverage alpha blending is: dst.a = dst.a * (0xff - src.a * SCA / 0xff) / 0xff + src.a * SCA / 0xff dst.a: destination alpha src.a: pixel alpha SCA : plane alpha When SCA = 0xff, the formula becomes: dst.a = dst.a * (0xff - src.a) + src.a This patch is to set the destination alpha (background) to 0xff: - When dst.a = 0 (before), dst.a = src.a - When dst.a = 0xff (after) , dst.a = 0xff * (0xff - src.a) + src.a According to the fomula above: - When src.a = 0 , dst.a = 0 - When src.a = 0xff, dst.a = 0xff This two cases are just still correct. But when src.a is between 0 and 0xff, the difference starts to appear Fixes: 616443ca577e ("drm/mediatek: Move cmdq_reg info from struct mtk_ddp_comp to sub driver private data") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-5-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 8e418bee401b7cfd0bc40d187afea2c6b08b44ec Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:44 2024 +0800 drm/mediatek: Fix XRGB setting error in Mixer Although the alpha channel in XRGB formats can be ignored, ALPHA_CON must be configured accordingly when using XRGB formats or it will still affects CRC generation. Fixes: d886c0009bd0 ("drm/mediatek: Add ETHDR support for MT8195") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-4-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 765f284f1fe172573021056f7e337ee53f252969 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:43 2024 +0800 drm/mediatek: Fix XRGB setting error in OVL CONST_BLD must be enabled for XRGB formats although the alpha channel can be ignored, or OVL will still read the value from memory. This error only affects CRC generation. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-3-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 231c020141cb150a59f5b28379cad82ff7bad899 Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:42 2024 +0800 drm/mediatek: Use 8-bit alpha in ETHDR 9-bit alpha (max=0x100) is designed for special HDR related calculation, which should be disabled by default. Change the alpha value from 0x100 to 0xff in 8-bit form. Fixes: d886c0009bd0 ("drm/mediatek: Add ETHDR support for MT8195") Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-2-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 0ddd2ae586d28e521d37393364d989ce118802e0 Author: Zhu Lingshan Date: Tue Jun 4 16:49:34 2024 +0800 drm/ttm: increase ttm pre-fault value to PMD size ttm page fault handler ttm_bo_vm_fault_reserved() maps TTM_BO_VM_NUM_PREFAULT more pages beforehand due to the principle of locality. However, on some platform the page faults are more costly, this patch intends to increase the number of ttm pre-fault to relieve the number of page faults. When multiple levels of page table is supported, the new default value would be the PMD size, similar to huge page. Signed-off-by: Zhu Lingshan Reported-and-tested-by: Li Jingxiang Link: https://patchwork.freedesktop.org/patch/msgid/20240604084934.225738-1-lingshan.zhu@amd.com Reviewed-by: Christian König Signed-off-by: Christian König commit a012f9a752a5856b29610057c76079fbdbe02abf Author: Jackie Jone Date: Tue Jun 18 14:33:28 2024 -0700 igb: Add MII write support To facilitate running PHY parametric tests, add support for the SIOCSMIIREG ioctl. This allows a userspace application to write to the PHY registers to enable the test modes. Signed-off-by: Jackie Jone Acked-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20240618213330.982046-1-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni commit 86b89dc669c400576dc23aa923bcf302f99e8e3a Author: Hsiao Chien Sung Date: Thu Jun 20 00:38:41 2024 +0800 drm/mediatek: Add missing plane settings when async update Fix an issue that plane coordinate was not saved when calling async update. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-1-a9d62d2e2c7e@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 27ab33854873e6fb958cb074681a0107cc2ecc4c Author: Jan Kara Date: Mon Jun 17 17:41:51 2024 +0200 udf: Fix bogus checksum computation in udf_rename() Syzbot reports uninitialized memory access in udf_rename() when updating checksum of '..' directory entry of a moved directory. This is indeed true as we pass on-stack diriter.fi to the udf_update_tag() and because that has only struct fileIdentDesc included in it and not the impUse or name fields, the checksumming function is going to checksum random stack contents beyond the end of the structure. This is actually harmless because the following udf_fiiter_write_fi() will recompute the checksum from on-disk buffers where everything is properly included. So all that is needed is just removing the bogus calculation. Fixes: e9109a92d2a9 ("udf: Convert udf_rename() to new directory iteration code") Link: https://lore.kernel.org/all/000000000000cf405f060d8f75a9@google.com/T/ Link: https://patch.msgid.link/20240617154201.29512-1-jack@suse.cz Reported-by: syzbot+d31185aa54170f7fc1f5@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit e821bcecdf82c7293322df15d8172ff274f84ef4 Merge: 5ddb88f22eb97 7d4dec525f5fd Author: Jens Axboe Date: Thu Jun 20 06:54:53 2024 -0600 Merge branch 'for-6.11/block-limits' into for-6.11/block Merge in queue limits cleanups. * for-6.11/block-limits: block: move the raid_partial_stripes_expensive flag into the features field block: remove the discard_alignment flag block: move the misaligned flag into the features field block: renumber and rename the cache disabled flag block: fix spelling and grammar for in writeback_cache_control.rst block: remove the unused blk_bounce enum commit 5ddb88f22eb97218d9295e69c39e0ff7cc64e09c Author: Andreas Hindborg Date: Thu Jun 20 10:57:21 2024 +0200 rust: block: do not use removed queue flag API `blk_queue_flag_set` and `blk_queue_flag_clear` was removed in favor of a new API. This caused a build error for Rust block device abstractions. Thus, use the new feature passing API instead of the old removed API. Fixes: bd4a633b6f7c ("block: move the nonrot flag to queue_limits") Signed-off-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240620085721.1218296-1-nmi@metaspace.dk Signed-off-by: Jens Axboe commit 7d4dec525f5fd555037486af4d02dd3682655ba1 Author: Christoph Hellwig Date: Wed Jun 19 17:45:38 2024 +0200 block: move the raid_partial_stripes_expensive flag into the features field Move the raid_partial_stripes_expensive flags into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240619154623.450048-7-hch@lst.de Signed-off-by: Jens Axboe commit 4cac3d3a712b5c76d462b29b73b9e58c0b6d9946 Author: Christoph Hellwig Date: Wed Jun 19 17:45:37 2024 +0200 block: remove the discard_alignment flag queue_limits.discard_alignment is never read except in the places where it is stacked into another limit. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240619154623.450048-6-hch@lst.de Signed-off-by: Jens Axboe commit 5543217be468268dfedf504f4969771b9a377353 Author: Christoph Hellwig Date: Wed Jun 19 17:45:36 2024 +0200 block: move the misaligned flag into the features field Move the misaligned flags into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240619154623.450048-5-hch@lst.de Signed-off-by: Jens Axboe commit bae1c74316b86c67c95658c3a0cd312cec9aad77 Author: Christoph Hellwig Date: Wed Jun 19 17:45:35 2024 +0200 block: renumber and rename the cache disabled flag Start with the first bit, and drop the plural-S from the name. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240619154623.450048-4-hch@lst.de Signed-off-by: Jens Axboe commit 4e54ea72edd68d074be2403f3efc67ff0541e298 Author: Christoph Hellwig Date: Wed Jun 19 17:45:34 2024 +0200 block: fix spelling and grammar for in writeback_cache_control.rst Suggested-by: Damien Le Moal Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240619154623.450048-3-hch@lst.de Signed-off-by: Jens Axboe commit f6860b6069b92559f5cdb65f48e2d82051eaebca Author: Christoph Hellwig Date: Wed Jun 19 17:45:33 2024 +0200 block: remove the unused blk_bounce enum The enum has been replaced with the BLK_FEAT_BOUNCE_HIGH flag. Reported-by: Keith Busch Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20240619154623.450048-2-hch@lst.de Signed-off-by: Jens Axboe commit 1f14028666386d806d00dd6e95da95327b146ded Author: Frank Li Date: Thu Jun 13 10:32:06 2024 -0400 dt-bindings: mmc: Convert fsl-esdhc.txt to yaml Convert layerscape fsl-esdhc binding doc from txt to yaml format. Addtional change during convert: - Deprecate "sdhci,wp-inverted", "sdhci,1-bit-only". - Add "reg" and "interrupts" property. - Change example "sdhci@2e000" to "mmc@2e000". - Compatible string require fsl,-esdhc followed by fsl,esdhc to match most existed dts file. - Set clock-frequency to 100mhz in example. - clock-frequency is not required now. - Allow dma-coherence - Add clocks Reviewed-by: Krzysztof Kozlowski Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240613-ls_waring_esdhc-v5-2-36644e2fe21c@nxp.com Signed-off-by: Ulf Hansson commit ce4f2199a099c1394ad2343c0e3393690d0cd08f Author: Frank Li Date: Thu Jun 13 10:32:05 2024 -0400 dt-bindings: mmc: mmc-spi-slot: Change voltage-ranges to uint32-matrix According to common mmc core, voltages-ranges should be matrix. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240613-ls_waring_esdhc-v5-1-36644e2fe21c@nxp.com Signed-off-by: Ulf Hansson commit 67577e2eada5b6501e30d80adea9d045081ba7a1 Author: Ville Syrjälä Date: Tue Jun 11 16:33:43 2024 +0300 drm/i915/dsb: Document that the ATS fault bits are for mtl+ The ATS faults have something to do with some new iommu stuff on mtl+. Document that the relevant DSB interrupt bits aren't valid for earlier platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 5bdd780180e3f261ca576e9d25e8cc356e97f4f4 Author: Ville Syrjälä Date: Tue Jun 11 16:33:42 2024 +0300 drm/i915: Drop useless intel_dsb.h include intel_crtc.c doens't need intel_dsb.h so don't include it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8eb57fd069e7b12bd585d6c831beae8403a181ae Author: Jeff Johnson Date: Tue Jun 11 08:50:42 2024 -0700 mmc: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/host/of_mmc_spi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/host/tmio_mmc_core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/host/renesas_sdhi_core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/mmc_core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/pwrseq_simple.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/pwrseq_sd8787.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/pwrseq_emmc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mmc/core/sdio_uart.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Reviewed-by: Wolfram Sang # for TMIO and SDHI Signed-off-by: Jeff Johnson Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20240611-md-drivers-mmc-v2-1-2ef2cbcdc061@quicinc.com Signed-off-by: Ulf Hansson commit 7562c88be8acf3898cd5d35cb5e83611139636f1 Author: Ville Syrjälä Date: Tue Jun 11 16:33:41 2024 +0300 drm/i915/dsb: Add i915.enable_dsb module parameter As we extend the use of DSB for critical pipe/plane register programming, it'll be nice to have an escape valve at hand, in case things go very poorly. To that end, add a i915.enable_dsb modparam by which we can force the driver to take the pure mmio path instead. v2: Use 0400 permissions for the actual modparam (Jani) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4a74de91056d640aa6b4025fc01330313ce22fdc Author: Ville Syrjälä Date: Tue Jun 11 16:33:40 2024 +0300 drm/i915/dsb: Convert the DSB code to use intel_display rather than i915 The future direction will be to mainly use intel_display rather than i915 in the display code. Start on that path for the DSB code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a6c8dfbfcd0137b2676f0e3c48752c3d618d9805 Author: Ville Syrjälä Date: Tue Jun 11 16:33:39 2024 +0300 drm/i915/dsb: Plumb the whole atomic state into intel_dsb_prepare() The DSB code will need to examine both the old and new crtc states. Pass in the whole atomic state so we can dig up what we need. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 42c8065d83fa3e9267bf99d6de70512c5c071a3b Author: Ville Syrjälä Date: Tue Jun 11 16:33:38 2024 +0300 drm/i915: Pass the whole atomic state to intel_color_prepare_commit() We'll have need to examine both the old and new crtc states in intel_color_prepare_commit(), so let's just pass in the whole atomic state. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 294ffd2bfaa3bb0434d2b86321c5de54bd79732a Author: Ville Syrjälä Date: Tue Jun 11 16:33:37 2024 +0300 drm/i915: Introduce intel_mode_vdisplay() The DSB code will need to know the hardware's idea of vertical active, as that is also what defines the start of undelayed vblank. Introduce a helper that gives us that information, in line with the other intel_mode_v*() functions. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 367cf0d8a6760e244f30d36cd3b2120f890837a7 Author: Ville Syrjälä Date: Tue Jun 11 16:33:36 2024 +0300 drm/i915: Add flip done tracepoint Add a tracepoint to see exactly when async flips complete. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 91103ca3750c346fe3a4f7b42aab9299d31d0460 Author: Ville Syrjälä Date: Tue Jun 11 16:33:35 2024 +0300 drm/i915: Add async flip tracepoint Add a separate tracepoint for async flips vs. sync plane updates to make it a bit easier to figure out what is happening. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b493b26b069e22f67cf0ec40f1d00859ab168c96 Author: Ville Syrjälä Date: Tue Jun 11 16:33:34 2024 +0300 drm/i915: Extract intel_crtc_arm_vblank_event() We'll need to arm the vblank event also from the future DSB based codepath. Extract the function that does the whold dance for us. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240611133344.30673-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 534a0e5e737f8117344372d8658a4702ae816281 Author: Neil Armstrong Date: Thu Jun 20 11:39:58 2024 +0200 ASoC: dt-bindings: convert everest,es7134.txt to dt-schema Convert the text bindings of the Everest ES7134/7144/7154 2 channels I2S analog to digital converter to dt-schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20240620-topic-amlogic-upstream-bindings-convert-everest-v2-2-660985615522@linaro.org Signed-off-by: Mark Brown commit 78df231dae2e1a9bf22f76b5cf03c0bf98738fd7 Author: Neil Armstrong Date: Thu Jun 20 11:39:57 2024 +0200 ASoC: dt-bindings: convert everest,es7241.txt to dt-schema Convert the text biddings for the Everest ES7241 2 channels I2S analog to digital converter to dt-schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20240620-topic-amlogic-upstream-bindings-convert-everest-v2-1-660985615522@linaro.org Signed-off-by: Mark Brown commit e3511997d7dc981d1e11c60d6a57e95361669595 Merge: 7e8fcb815432e 34744a7749b3f Author: Paolo Abeni Date: Thu Jun 20 13:18:55 2024 +0200 Merge branch 'add-flow-director-for-txgbe' Jiawen Wu says: ==================== add flow director for txgbe Add flow director support for Wangxun 10Gb NICs. v2 -> v3: https://lore.kernel.org/all/20240605020852.24144-1-jiawenwu@trustnetic.com/ - Wrap the code at 80 chars where possible. (Jakub Kicinski) - Add function description address on kernel-doc. (Jakub Kicinski) - Correct return code. (Simon Horman) - Remove redundant size check. (Hariprasad Kelam) v1 -> v2: https://lore.kernel.org/all/20240529093821.27108-1-jiawenwu@trustnetic.com/ - Fix build warnings reported by kernel test robot. ==================== Link: https://lore.kernel.org/r/20240618101609.3580-1-jiawenwu@trustnetic.com Signed-off-by: Paolo Abeni commit 34744a7749b3f600dd54a2d39b8db99fecf54901 Author: Jiawen Wu Date: Tue Jun 18 18:16:09 2024 +0800 net: txgbe: add FDIR info to ethtool ops Add flow director filter match and miss statistics to ethtool -S. And change the number of queues when using flow director for ehtool -l. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 4bdb441105dcea40ac6e01756314c0fdf5173ce1 Author: Jiawen Wu Date: Tue Jun 18 18:16:08 2024 +0800 net: txgbe: support Flow Director perfect filters Support the addition and deletion of Flow Director filters. Supported fields: src-ip, dst-ip, src-port, dst-port Supported flow-types: tcp4, udp4, sctp4, ipv4 Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit b501d261a5b39fed653a90ab5db9f3c3d93c2486 Author: Jiawen Wu Date: Tue Jun 18 18:16:07 2024 +0800 net: txgbe: add FDIR ATR support Add flow director ATR filter. ATR mode is enabled by default to filter TCP packets. Signed-off-by: Jiawen Wu Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit ae8fc2948b48f001514d4b73167fcef3b398a5fb Author: Kuninori Morimoto Date: Thu Jun 20 00:32:39 2024 +0000 ASoC: dt-bindings: add missing vender prefix on filename Many Sound yaml files doesn't have vender prefix on filename. Add missing vender prefix for these files. Signed-off-by: Kuninori Morimoto Reviewed-by: Daniel Baluta Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/87wmmkpi6w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 269e974e664207cc45f83b579565ba73de1b75dc Author: Greg Kroah-Hartman Date: Fri Jun 14 11:41:02 2024 +0200 driver core: make [device_]driver_attach take a const * Change device_driver_attach() and driver_attach() to take a const * to struct device driver as neither of them modify the structure at all. Also, for some odd reason, drivers/dma/idxd/compat.c had a duplicate external reference to device_driver_attach(), so remove that to fix up the build, it should never have had that there in the first place. Cc: Rafael J. Wysocki Cc: Fenghua Yu Cc: Dave Jiang Cc: Vinod Koul Cc: Andy Shevchenko Cc: Petr Tesarik Cc: Alexander Lobakin Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/2024061401-rasping-manger-c385@gregkh Signed-off-by: Greg Kroah-Hartman commit 2f3cfd2f4b7cf3026fe6b9b2a5320cc18f4c184e Author: Uwe Kleine-König Date: Thu Jun 13 23:23:52 2024 +0200 driver core: Make dev_err_probe() silent for -ENOMEM For an out-of-memory error there should be no additional output. Adapt dev_err_probe() to not emit the error message when err is -ENOMEM. This simplifies handling errors that might among others be -ENOMEM. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3d1e308d45cddf67749522ca42d83f5b4f0b9634.1718311756.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman commit f9f608e38b9cff2dfa6fc80fe9792a0441379d60 Author: Dr. David Alan Gilbert Date: Sun May 26 00:25:09 2024 +0100 can: mscan: remove unused struct 'mscan_state' 'mscan_state' is unused since the original commit afa17a500a36 ("net/can: add driver for mscan family & mpc52xx_mscan"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/all/20240525232509.191735-1-linux@treblig.org Signed-off-by: Marc Kleine-Budde commit c80e390d7b47b6b3f4ca7e16c05ec073a406172e Merge: 20e69650d51f2 67711e04254c3 Author: Marc Kleine-Budde Date: Thu Jun 20 11:56:54 2024 +0200 Merge patch "Documentation: networking: document ISO 15765-2" Francesco Valla says: While the in-kernel ISO 15765-2 (ISO-TP) stack is fully functional and easy to use, no documentation exists for it. This patch adds such documentation, containing the very basics of the protocol, the APIs and a basic example. Link: https://lore.kernel.org/all/20240501092413.414700-1-valla.francesco@gmail.com Signed-off-by: Marc Kleine-Budde commit 67711e04254c388aa2f3125f23fbb897bbc07d56 Author: Francesco Valla Date: Wed May 1 11:24:13 2024 +0200 Documentation: networking: document ISO 15765-2 Document basic concepts, APIs and behaviour of the ISO 15675-2 (ISO-TP) CAN stack. Signed-off-by: Francesco Valla Reviewed-by: Bagas Sanjaya Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/20240501092413.414700-2-valla.francesco@gmail.com Signed-off-by: Marc Kleine-Budde commit 20e69650d51f20e430d5b46d53bb48248b4c66ca Merge: ba63a7e08523b e562bad35fe38 Author: Marc Kleine-Budde Date: Thu Jun 20 11:53:54 2024 +0200 Merge patch series "can: xilinx_can: Document driver description to list all supported IPs" Harini T says: Xilinx CAN driver supports AXI CAN, AXI CANFD, CANPS and CANFD PS IPs. 1. Modify the dt-bindings title to indicate that both controllers are supported. 2. Document all supported IPs in driver comment description. Link: https://lore.kernel.org/all/20240503060553.8520-1-harini.t@amd.com Signed-off-by: Marc Kleine-Budde commit e562bad35fe38af22437caea9bdf911ff59cf56b Author: Harini T Date: Fri May 3 11:35:53 2024 +0530 can: xilinx_can: Document driver description to list all supported IPs Xilinx CAN driver supports AXI CAN, AXI CANFD, CANPS and CANFD PS IPs. Document all supported IPs in comment description. Signed-off-by: Harini T Link: https://lore.kernel.org/all/20240503060553.8520-3-harini.t@amd.com Signed-off-by: Marc Kleine-Budde commit ba63a7e08523be3496cc1b7e5f77d306144a3a40 Author: Oliver Hartkopp Date: Sat Apr 20 21:47:46 2024 +0200 can: isotp: remove ISO 15675-2 specification version where possible With the new ISO 15765-2:2024 release the former documentation and comments have to be reworked. This patch removes the ISO specification version/date where possible. Signed-off-by: Oliver Hartkopp Acked-by: Vincent Mailhol Acked-by: Francesco Valla Link: https://lore.kernel.org/all/20240420194746.4885-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 8416ac9c87bd77ad6cb3ee0505d0ca765949e0c9 Author: Harini T Date: Fri May 3 11:35:52 2024 +0530 dt-bindings: can: xilinx_can: Modify the title to indicate CAN and CANFD controllers are supported Xilinx CAN binding documentation supports CAN and CANFD controllers. Modify the title to indicate that both controllers are supported. Signed-off-by: Harini T Link: https://lore.kernel.org/all/20240503060553.8520-2-harini.t@amd.com Signed-off-by: Marc Kleine-Budde commit 58b34cd646b4af9c3176808c4f8e8724402ab805 Author: Mans Rullgard Date: Sat Apr 27 16:26:48 2024 +0100 can: Kconfig: remove obsolete help text for slcan Commit cfcb4465e992 ("can: slcan: remove legacy infrastructure") removed the 10-device limit. Update the Kconfig help text accordingly. Signed-off-by: Mans Rullgard Acked-by: Vincent Mailhol Link: https://lore.kernel.org/all/20240427152648.25434-1-mans@mansr.com Signed-off-by: Marc Kleine-Budde commit 5ca3801388f8ae69b145812410927d5e8156b67a Author: Andy Shevchenko Date: Thu May 2 15:38:52 2024 +0300 can: sja1000: plx_pci: Reuse predefined CTI subvendor ID There is predefined PCI_SUBVENDOR_ID_CONNECT_TECH, use it in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20240502123852.2631577-1-andriy.shevchenko@linux.intel.com Signed-off-by: Marc Kleine-Budde commit b1dc3c68e977273397619d901b34f25634666c24 Author: Andy Shevchenko Date: Fri Apr 12 20:33:32 2024 +0300 can: mcp251x: Fix up includes This driver is including the legacy GPIO header but the only thing it is using from that header is the wrong define for GPIOF_DIR_OUT. Fix it up by using GPIO_LINE_DIRECTION_* macros respectively. Signed-off-by: Andy Shevchenko Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/20240412173332.186685-1-andriy.shevchenko@linux.intel.com Signed-off-by: Marc Kleine-Budde commit 7fc65b78b465b8511a503491e7c3116d46dc6c72 Author: AngeloGioacchino Del Regno Date: Fri Mar 22 10:28:45 2024 +0100 media: platform: mtk-mdp3: Add support for MT8188 MDP3 components MT8195 and MT8188 share a similar MDP3 macro-block, with minor differences - as in, the latter supports a subset of the number of components supported by the former, but are otherwise handled in the same way. Add driver data for MT8188, reusing the already present MT8195 data where possible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 8da17fe240f573101672cf3fe7c8b9fe0acda80a Author: AngeloGioacchino Del Regno Date: Fri Mar 22 10:28:44 2024 +0100 dt-bindings: media: mediatek: mdp3: Add support for MT8188 RDMA Add a compatible for MediaTek MT8188 RDMA, which supports only a subset of the MDP3 components of its similar MT8195 counterpart. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 7a893345a406b46b6a0f9575ce58e513cf79b997 Author: Michal Wajdeczko Date: Wed Jun 19 18:34:13 2024 +0200 drm/xe/guc: Move ARAT interrupts enabling to the upload step Even though ARAT interrupts are enabled by default, we still want to keep the code that enables them. But instead doing that in the CTB enabling step, move this code to the upload step, where we already setup few other registers related to GuC. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240619163413.817-1-michal.wajdeczko@intel.com commit 623c6d5ec554abc5880d57e6495b8e94498edc7a Merge: 99464ff96a2e1 84bb8d8bbd838 Author: Ulf Hansson Date: Thu Jun 20 10:59:39 2024 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v6.10-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.11. Signed-off-by: Ulf Hansson commit 99464ff96a2e14c8293c9a8ccb7d6d7ce6ecf167 Author: Neil Armstrong Date: Wed Jun 5 11:34:46 2024 +0200 dt-bindings: mmc: meson-gx: add optional power-domains On newer SoCs, the MMC controller can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240605-topic-amlogic-upstream-bindings-fixes-power-domains-mmc-v1-1-4acbb8cc2626@linaro.org Signed-off-by: Ulf Hansson commit e83c868521597b27c7c06b9c92fde0ae1869e2a2 Author: Naina Mehta Date: Thu May 23 17:33:35 2024 +0530 dt-bindings: mmc: sdhci-msm: Document the SDX75 compatible Document the compatible for SDHCI on SDX75 SoC. Signed-off-by: Naina Mehta Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240523120337.9530-2-quic_nainmeht@quicinc.com Signed-off-by: Ulf Hansson commit b81e4cc84bfcf9d06b90701cc3112b7ecbe2ae71 Author: Heiko Stuebner Date: Thu May 30 23:55:47 2024 +0200 mmc: sdhci-of-dwcmshc: set CQE irq-handler for rockchip variants The dwcmshc used on Rockchip rk3568 and rk3588 can use cqe, so set the needed irq handler. Tested on a rk3588-tiger SoM with dd, hdparm and fio. fio performance does increase slightly from Run status group 0 (all jobs): READ: bw=209MiB/s (219MB/s), 209MiB/s-209MiB/s (219MB/s-219MB/s), io=4096MiB (4295MB), run=19607-19607msec without CQE to Run status group 0 (all jobs): READ: bw=215MiB/s (225MB/s), 215MiB/s-215MiB/s (225MB/s-225MB/s), io=4096MiB (4295MB), run=19062-19062msec with CQE enabled. Signed-off-by: Heiko Stuebner Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240530215547.2192457-1-heiko@sntech.de Signed-off-by: Ulf Hansson commit 78d08697e3932052d8855821d5c0864666bfa832 Author: Andrea della Porta Date: Thu May 30 12:12:00 2024 +0200 mmc: sdhci-brcmstb: Add BCM2712 support Broadcom BCM2712 SoC has an SDHCI card controller using the SDIO CFG register block present on other STB chips. Add support for BCM2712 SD capabilities of this chipset. The silicon is SD Express capable but this driver port does not currently include that feature yet. Based on downstream driver by raspberry foundation maintained kernel. Signed-off-by: Andrea della Porta Reviewed-by: Stefan Wahren Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/ad2ec39c62c2783dd5de4bf2ec581866e822e2b1.1717061147.git.andrea.porta@suse.com Signed-off-by: Ulf Hansson commit ad177268cb15950f86e44717cf500bbfe2e8be43 Author: Andrea della Porta Date: Thu May 30 12:11:59 2024 +0200 dt-bindings: mmc: Add support for BCM2712 SD host controller The BCM2712 has an SDHCI capable host interface similar to the one found in other STB chipsets. Add the relevant compatible string. Signed-off-by: Andrea della Porta Reviewed-by: Stefan Wahren Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/f6e0d1fbc6c5e620897b5c65c95147ceaeed1485.1717061147.git.andrea.porta@suse.com Signed-off-by: Ulf Hansson commit 734401c84172520b54f3fe75839dc82b646c7d88 Author: Andrea della Porta Date: Thu May 30 12:11:58 2024 +0200 dt-bindings: arm: bcm: Add BCM2712 SoC support The BCM2712 SoC is found on Raspberry Pi 5. Add compatible string to acknowledge its new chipset. Signed-off-by: Andrea della Porta Reviewed-by: Stefan Wahren Acked-by: Conor Dooley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/cfc4db17981ef946a71d40d522118a560aa0f15b.1717061147.git.andrea.porta@suse.com Signed-off-by: Ulf Hansson commit 75895aa2bc1e0dbf062a33ec1f754ef6801d64dd Author: Robin Murphy Date: Wed Jun 19 16:31:37 2024 +0100 arm64: dts: juno: Enable GPU Both Mali-T620 and Juno's HDLCD are now supported by upstream Mesa in recent distros, so there's little reason not to enable the GPU by default. At the very least it should offer a little extra CI coverage for Panfrost probing and wiggling SCMI. Signed-off-by: Robin Murphy Acked-by: Liviu Dudau Link: https://lore.kernel.org/r/07e45a015ff8934c4571617c8e8e90205e430eb6.1718811097.git.robin.murphy@arm.com Signed-off-by: Sudeep Holla commit 850888d2d978d6af6f170d14a029a634c2d66336 Author: Krzysztof Kozlowski Date: Sat May 18 22:39:03 2024 +0200 arm64: dts: juno: add dedicated FPGA syscon compatible Each syscon node must come with a dedicated/specific compatible, which is also reported by dtbs_check: juno.dtb: apbregs@10000: compatible: ['syscon', 'simple-mfd'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240518203903.119608-2-krzysztof.kozlowski@linaro.org Signed-off-by: Sudeep Holla commit 8373767b94e16652a3453e3ba2ac9ebd32d1949e Author: Krzysztof Kozlowski Date: Sat May 18 22:39:02 2024 +0200 dt-bindings: arm: arm,juno-fpga-apb-regs: document FPGA syscon Add dedicated bindings for the FPGA syscon registers on ARM Juno board, to fully document the block and also fix dtbs_check warning: juno.dtb: apbregs@10000: compatible: ['syscon', 'simple-mfd'] is too short Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240518203903.119608-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sudeep Holla commit 69a6661b6f2f1a4d6dbbc58f7c9acfc84484145b Author: Jeff Johnson Date: Thu Jun 13 15:05:33 2024 -0700 bus: vexpress-config: Add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/bus/vexpress-config.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-bus-v1-1-e8162434e0ca@quicinc.com Signed-off-by: Sudeep Holla commit 954ee38d40c98001cfdc570c4d5e90bcbc456ce1 Merge: 9ccbcd5383353 8c40efeda9410 Author: Hans Verkuil Date: Thu Jun 20 10:40:32 2024 +0200 Merge tag 'tags/media-next-uvc-20240617-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git into media_stage uvcvideo fixes and improvements: - add/fix quirks - improve timestamp handling - improve Power Line Frequency handling Signed-off-by: Hans Verkuil commit c1391205754f0ddab5f990cd0642d0fa8fc4c6b7 Author: Jeff Johnson Date: Wed Jun 19 23:29:02 2024 -0700 drm/tests: add drm_hdmi_state_helper_test MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_hdmi_state_helper_test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Fixes: eb66d34d793e ("drm/tests: Add output bpc tests") Signed-off-by: Jeff Johnson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240619-md-drm-tests-drm_hdmi_state_helper_test-v1-1-41c5fe2fdb4a@quicinc.com commit fbe675b3696ef62a69e16d8fc85a6358eac63b3d Author: Dave Stevenson Date: Wed Jun 19 16:39:13 2024 +0100 drm/vc4: vec: Add the margin properties to the connector All the handling for the properties was present, but they were never attached to the connector to allow userspace to change them. Add them to the connector. Signed-off-by: Dave Stevenson Reviewed-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240619153913.2804051-4-dave.stevenson@raspberrypi.com commit 53c5da8573ba18c4d4109286e414df3ae79db4f3 Author: Dave Stevenson Date: Wed Jun 19 16:39:12 2024 +0100 drm/vc4: Add monochrome mode to the VEC. The VEC supports not producing colour bursts for monochrome output. It also has an option for disabling the chroma input to remove chroma from the signal. Now that there is a DRM_MODE_TV_MODE_MONOCHROME defined, plumb this in. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240619153913.2804051-3-dave.stevenson@raspberrypi.com commit f85376c890ef470b64a7fea22eea5af18822f05c Author: Sebastian Andrzej Siewior Date: Wed Jun 19 16:46:30 2024 +0200 drm/ttm/tests: Let ttm_bo_test consider different ww_mutex implementation. PREEMPT_RT has a different locking implementation for ww_mutex. The base mutex of struct ww_mutex is declared as struct WW_MUTEX_BASE. The latter is defined as `mutex' for non-PREEMPT_RT builds and `rt_mutex' for PREEMPT_RT builds. Using mutex_lock() directly on the base mutex in ttm_bo_reserve_deadlock() leads to compile error on PREEMPT_RT. The locking-selftest has its own defines to deal with this and it is probably best to defines the needed one within the test program since their usefulness is limited outside of well known selftests. Provide ww_mutex_base_lock() which points to the correct function for PREEMPT_RT and non-PREEMPT_RT builds. Fixes: 995279d280d1e ("drm/ttm/tests: Add tests for ttm_bo functions") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240619144630.4DliKOmr@linutronix.de commit 9ccbcd53833538aeb17db4506891e00020051150 Author: Jeff Johnson Date: Wed Jun 12 15:58:25 2024 -0700 media: rc: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/rc/rc-core.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 807221c54db6bc696b65106b4ee76286e435944d Author: Jeff Johnson Date: Wed Jun 19 07:38:14 2024 -0700 openpromfs: add missing MODULE_DESCRIPTION() macro With ARCH=sparc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/openpromfs/openpromfs.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240619-md-sparc-fs-openpromfs-v1-1-51c85ce90fa3@quicinc.com Signed-off-by: Christian Brauner commit c7d0b2db5bc5e8c0fdc67b3c8f463c3dfec92f77 Author: Manivannan Sadhasivam Date: Mon Jun 3 22:13:54 2024 +0530 bus: mhi: ep: Do not allocate memory for MHI objects from DMA zone MHI endpoint stack accidentally started allocating memory for objects from DMA zone since commit 62210a26cd4f ("bus: mhi: ep: Use slab allocator where applicable"). But there is no real need to allocate memory from this naturally limited DMA zone. This also causes the MHI endpoint stack to run out of memory while doing high bandwidth transfers. So let's switch over to normal memory. Cc: # 6.8 Fixes: 62210a26cd4f ("bus: mhi: ep: Use slab allocator where applicable") Reviewed-by: Mayank Rana Link: https://lore.kernel.org/r/20240603164354.79035-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 2510bca4810801c98260e0975c13cf2306d28e96 Author: André Draszik Date: Tue Jun 18 10:01:33 2024 +0100 arm64: dts: exynos: gs101-oriole: add placeholder regulators for USB phy The USB phy requires various power supplies to work. While we don't have a PMIC driver yet, the supplies should still be added to the DT. Add some placeholders, which will be replaced with the real ones once we implement PMIC. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20240618-gs101-usb-regulators-in-dt-v3-1-6a749207052e@linaro.org Signed-off-by: Krzysztof Kozlowski commit e22103b9b6026cc0a7846dc6369f0399b863039f Author: Andi Shyti Date: Mon Jun 17 20:42:43 2024 +0200 drm/i915/gem: Use the correct format specifier for resource_size_t Commit 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup warning") adds a debug message where the "lmem_size" and "dsm_base" variables are printed using the %lli identifier. However, these variables are defined as resource_size_t, which are unsigned long for 32-bit machines and unsigned long long for 64-bit machines. The documentation (core-api/printk-formats.rst) recommends using the %pa specifier for printing addresses and sizes of resources. Replace %lli with %pa. This patch also mutes the following sparse warning when compiling with: make W=1 ARCH=i386 drivers/gpu/drm/i915 >> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:941:5: error: format '%lli' expects argument of type 'long long int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Werror=format=] Signed-off-by: Andi Shyti Cc: Jonathan Cavitt Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240617184243.330231-3-andi.shyti@linux.intel.com commit 3bece98b9eb6941b4708237a4557a5082df25589 Author: Andi Shyti Date: Mon Jun 17 20:42:42 2024 +0200 drm/i915/gem: Return NULL instead of '0' Commit 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup warning") returns '0' from i915_gem_stolen_lmem_setup(), but it's supposed to return a pointer to the intel_memory_region structure. Sparse complains with the following message: >> drivers/gpu/drm/i915/gem/i915_gem_stolen.c:943:32: sparse: sparse: Using plain integer as NULL pointer Return NULL. Signed-off-by: Andi Shyti Cc: Jonathan Cavitt Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240617184243.330231-2-andi.shyti@linux.intel.com commit 7e8fcb815432e68897dbbc2c4213e546ac40f49c Merge: 6f80fcdfbc149 da0262c2c931e Author: Jakub Kicinski Date: Wed Jun 19 18:31:49 2024 -0700 Merge branch 'ionic-rework-fix-for-doorbell-miss' Shannon Nelson says: ==================== ionic: rework fix for doorbell miss A latency test in a scaled out setting (many VMs with many queues) has uncovered an issue with our missed doorbell fix from commit b69585bfcece ("ionic: missed doorbell workaround") As a refresher, the Elba ASIC has an issue where once in a blue moon it might miss/drop a queue doorbell notification from the driver. This can result in Tx timeouts and potential Rx buffer misses. The basic problem with the original solution is that we're delaying things with a timer for every single queue, periodically using mod_timer() to reset to reset the alarm, and mod_timer() becomes a more and more expensive thing as there are more and more VFs and queues each with their own timer. A ping-pong latency test tends to exacerbate the effect such that every napi is doing a mod_timer() in every cycle. An alternative has been worked out to replace this using periodic workqueue items outside the napi cycle to request a napi_schedule driven by a single delayed-workqueue per device rather than a timer for every queue. Also, now that newer firmware is actually reporting its ASIC type, we can restrict this to the appropriate chip. The testing scenario used 128 VFs in UP state, 16 queues per VF, and latency tests were done using TCP_RR with adaptive interrupt coalescing enabled, running on 1 VF. We would see 99th percentile latencies of up to 900us range, with some max fliers as much as 4ms. With these fixes the 99th percentile latencies are typically well under 50us with the occasional max under 500us. v1: https://lore.kernel.org/netdev/20240610230706.34883-1-shannon.nelson@amd.com/ ==================== Link: https://lore.kernel.org/r/20240619003257.6138-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit da0262c2c931eff97714ec1e89827796b783d234 Author: Brett Creeley Date: Tue Jun 18 17:32:57 2024 -0700 ionic: Only run the doorbell workaround for certain asic_type If the doorbell workaround isn't required for a certain asic_type then there is no need to run the associated code. Since newer FW versions are finally reporting their asic_type we can use a flag to determine whether or not to do the workaround. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-9-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit f703d56c03050b5d8f9bea6842569798b5407386 Author: Brett Creeley Date: Tue Jun 18 17:32:56 2024 -0700 ionic: Use an u16 for rx_copybreak We only support (u16)-1 size for rx_copybreak, so we can reduce the field size and move a couple other fields around to save a little space in the ionic_lif struct. Before: /* size: 17440, cachelines: 273, members: 56 */ /* sum members: 17403, holes: 9, sum holes: 37 */ /* last cacheline: 32 bytes */ After: /* size: 17424, cachelines: 273, members: 56 */ /* sum members: 17401, holes: 7, sum holes: 23 */ /* last cacheline: 16 bytes */ Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-8-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 55a3982ec721dabd5a4c2f16bfb03deb032e45c2 Author: Shannon Nelson Date: Tue Jun 18 17:32:55 2024 -0700 ionic: check for queue deadline in doorbell_napi_work Check the deadline against the last time run and only schedule a new napi if we haven't been run recently. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-7-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit d7f9bc68591803a9bca34847b76b2fc8f12e5dfd Author: Shannon Nelson Date: Tue Jun 18 17:32:54 2024 -0700 ionic: add per-queue napi_schedule for doorbell check Add a work item for each queue that will be run on the queue's preferred cpu and will schedule another napi. This napi is run in case the device missed a doorbell and didn't process a packet. This is a problem for the Elba asic that happens very rarely. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-6-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 4ded136c78f8ae17d140b8aae3cd4459a6827577 Author: Shannon Nelson Date: Tue Jun 18 17:32:53 2024 -0700 ionic: add work item for missed-doorbell check Add the first queued work for checking on the missed doorbell. This is a delayed work item that reschedules itself every cycle starting at probe. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-5-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 9e25450da7006cd6f425248a5b38dad4adb3c981 Author: Shannon Nelson Date: Tue Jun 18 17:32:52 2024 -0700 ionic: add private workqueue per-device Instead of using the system's default workqueue, add a private workqueue for the device to use for its little jobs. This is to better support the new work items we will be adding in the next patches for PF and VF specific jobs, without inundating the system workqueue in a couple of customer cases where our devices get scaled out to 100-200 VFs. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-4-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit d458d4b4fd4353e71a095f6c76e1271dc2fee33a Author: Brett Creeley Date: Tue Jun 18 17:32:51 2024 -0700 ionic: Keep interrupt affinity up to date Currently the driver either sets the initial interrupt affinity for its adminq and tx/rx queues on probe or resets it on various down/up/reconfigure flows. If any user and/or user process (i.e. irqbalance) changes IRQ affinity for any of the driver's interrupts that will be reset to driver defaults whenever any down/up/reconfigure operation happens. This is incorrect and is fixed by making 2 changes: 1. Allocate an array of cpumasks that's only allocated on probe and destroyed on remove. 2. Update the cpumask(s) for interrupts that are in use by registering for affinity notifiers. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-3-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 4aaa49a282ad581e313afde8a423301cf4fe2ecc Author: Shannon Nelson Date: Tue Jun 18 17:32:50 2024 -0700 ionic: remove missed doorbell per-queue timer Remove the timer-per-queue mechanics from the missed doorbell check in preparation for the new missed doorbell fix. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240619003257.6138-2-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 6f80fcdfbc14942c88eb99e1980f85ae2d996cca Merge: 89f5e607772b4 d94ae6415becd Author: Jakub Kicinski Date: Wed Jun 19 17:38:13 2024 -0700 Merge branch 'mlxsw-use-page-pool-for-rx-buffers-allocation' Petr Machata says: ==================== mlxsw: Use page pool for Rx buffers allocation Amit Cohen writes: After using NAPI to process events from hardware, the next step is to use page pool for Rx buffers allocation, which is also enhances performance. To simplify this change, first use page pool to allocate one continuous buffer for each packet, later memory consumption can be improved by using fragmented buffers. This set significantly enhances mlxsw driver performance, CPU can handle about 370% of the packets per second it previously handled. The next planned improvement is using XDP to optimize telemetry. Patch set overview: Patches #1-#2 are small preparations for page pool usage Patch #3 initializes page pool, but do not use it Patch #4 converts the driver to use page pool for buffers allocations Patch #5 is an optimization for buffer access Patch #6 cleans up an unused structure Patch #7 uses napi_consume_skb() as part of Tx completion ==================== Link: https://lore.kernel.org/r/cover.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit d94ae6415becdf437d58e60d1f153af39dddb247 Author: Amit Cohen Date: Tue Jun 18 13:34:46 2024 +0200 mlxsw: pci: Use napi_consume_skb() to free SKB as part of Tx completion Currently, as part of Tx completion, the driver calls dev_kfree_skb_any() to free the SKB. For this flow, the correct function is napi_consume_skb(). This function and dev_consume_skb_any() were added to be used for consumed SKBs, which were not dropped, so the skb:kfree_skb tracepoint is not triggered, and we can get better diagnostics about dropped packets. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/a9f9f3dc884c0d1be4bd4c9d72030c88c7ac004f.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit e8441b1f6b64e7157b9e7777a2f7b79c2215cba1 Author: Amit Cohen Date: Tue Jun 18 13:34:45 2024 +0200 mlxsw: pci: Do not store SKB for RDQ elements The previous patch used page pool to allocate buffers for RDQ. With this change, 'elem_info->u.rdq.skb' is not used anymore, as we do not allocate SKB before getting the packet, we hold page pointer and build the SKB around it once packet is received. Remove the union and store SKB pointer for SDQ only. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/23a531008936dc9a1a298643fb1e4f9a7b8e6eb3.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 0f3cd437a1d88b2a77dfb146c88a297bea974ceb Author: Amit Cohen Date: Tue Jun 18 13:34:44 2024 +0200 mlxsw: pci: Optimize data buffer access Before accessing data buffer, call net_prefetch() to load it into the cache. This change improves driver performance, CPU can handle about 7.1% more packets per second. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/1fa07c510890866a6f201163ab7e78890ba28b3b.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit b5b60bb491b26b0e5961e021b2988562eaa6a8c7 Author: Amit Cohen Date: Tue Jun 18 13:34:43 2024 +0200 mlxsw: pci: Use page pool for Rx buffers allocation As part of driver init, all Rx queues are filled with buffers for hardware usage. Later, when a packet is received, a new buffer should be allocated to be used by hardware instead of the received buffer. Packet's processing time includes allocation time, which can be improved using page pool. Using page pool, DMA mapping is done only for first allocation of buffers. As subsequent buffers allocation avoid DMA mapping, it results in performance improvement. The purpose of page pool is to allocate pages fast from cache without locking. This lockless guarantee naturally comes from running under a NAPI. Use page pool to allocate the data buffer only, so hardware will use it to fill the packet. At completion time, attach the data buffer (now filled with packet payload) to new SKB which is allocated around the received buffer. SKB building at completion time prevents cache miss for each packet, as now the SKB is allocated right before packets will be handled by networking stack. Page pool for each Rx queue enhances Rx side performance by reclaiming buffers back to each queue specific pool. This change significantly improves driver performance, CPU can handle about 345% of the packets per second it previously handled. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/1cf788a8f43c70aae6d526018ef77becb27ad6d3.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 5642c6a086939bd1c0bba692f3a4afe4df668a50 Author: Amit Cohen Date: Tue Jun 18 13:34:42 2024 +0200 mlxsw: pci: Initialize page pool per CQ Next patch will use page pool to allocate buffers for RDQ. Initialize page pool for each CQ, which is mapped 1:1 to RDQ. Page pool for each Rx queue enhances Rx side performance by reclaiming buffers back to each queue specific pool. When only one NAPI instance is the consumer of pages from page pool, it is recommended to pass it as part of 'page_pool_params', then page pool APIs will be done without special locks. mlxsw driver holds NAPI instance per CQ, so add page pool per CQ and use the existing NAPI instance. For now, pages are not allocated from the pool, next patch will use it. Some notes regarding 'page_pool_params': * Use PP_FLAG_DMA_MAP to allow page pool handles DMA mapping, for now do not use sync flag, as only the device writes to this memory and we read it only when it finishes writing there. This will probably be changed when we will support XDP. * Define 'order' according to maximum MTU and take into account software overhead. Some round up are done, which means that we allocate more pages than we really need. This can be improved later by using fragmented buffers. * Use pool_size = MLXSW_PCI_WQE_COUNT. This will be the size of 'ptr_ring', and should be the maximum amount of packets that page pool will allocate memory for. In our case, this is the queue size, defined as MLXSW_PCI_WQE_COUNT. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/02e5856ae7c572d4293ce6bb92c286ee6cfec800.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 7555b7f3385fb0cf5416cf38b4f7bd2bc1312f23 Author: Amit Cohen Date: Tue Jun 18 13:34:41 2024 +0200 mlxsw: pci: Store CQ pointer as part of RDQ structure Next patches will add support for page pool in mlxsw driver. Page pool will be used to allocate buffers for RDQ and will use NAPI instance of the appropriate CQ (RDQ is mapped 1:1 to CQ). To allow pool initialization as part of CQ init, when NAPI is initialized, page_pool structure will be as part of CQ structure. Later, the allocations for RDQ will be done from the pool in the appropriate CQ. To allow access to the appropriate pool, set CQ pointer as part of RDQ initialization. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/d60918ca1e142a554af1df9c1152cdac83854a3b.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 39fa294f580a3be47fc2b502c143dec76737c8e6 Author: Amit Cohen Date: Tue Jun 18 13:34:40 2024 +0200 mlxsw: pci: Split NAPI setup/teardown into two steps mlxsw_pci_cq_napi_setup() includes both NAPI initialization and enablement, similar to teardown function. Next patches will add support for page pool in mlxsw driver, then we use NAPI instance for page pool. Page pool initialization should be done before NAPI enablement, same for page pool destruction which should be done after NAPI disablement. As preparation, split NAPI setup/teardown into two steps, then page pool setup will be done between the phases. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/8dbf37e859f07247498fca17109b8858ff2b0498.1718709196.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 89f5e607772b4d6e467adf8bbe530a5036abb415 Author: Lukasz Majewski Date: Tue Jun 18 14:58:17 2024 +0200 net: hsr: cosmetic: Remove extra white space This change just removes extra (i.e. not needed) white space in prp_drop_frame() function. No functional changes. Signed-off-by: Lukasz Majewski Reviewed-by: Hangbin Liu Link: https://lore.kernel.org/r/20240618125817.1111070-1-lukma@denx.de Signed-off-by: Jakub Kicinski commit c8bd1f7f3e61fc6c562c806045f3ccd2cc819c01 Author: Jiri Pirko Date: Tue Jun 18 16:44:56 2024 +0200 virtio_net: add support for Byte Queue Limits Add support for Byte Queue Limits (BQL). Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is running in background. Netperf TCP_RR results: NOBQL FQC 1q: 159.56 159.33 158.50 154.31 agv: 157.925 NOBQL FQC 2q: 184.64 184.96 174.73 174.15 agv: 179.62 NOBQL FQC 4q: 994.46 441.96 416.50 499.56 agv: 588.12 NOBQL PFF 1q: 148.68 148.92 145.95 149.48 agv: 148.2575 NOBQL PFF 2q: 171.86 171.20 170.42 169.42 agv: 170.725 NOBQL PFF 4q: 1505.23 1137.23 2488.70 3507.99 agv: 2159.7875 BQL FQC 1q: 1332.80 1297.97 1351.41 1147.57 agv: 1282.4375 BQL FQC 2q: 768.30 817.72 864.43 974.40 agv: 856.2125 BQL FQC 4q: 945.66 942.68 878.51 822.82 agv: 897.4175 BQL PFF 1q: 149.69 151.49 149.40 147.47 agv: 149.5125 BQL PFF 2q: 2059.32 798.74 1844.12 381.80 agv: 1270.995 BQL PFF 4q: 1871.98 4420.02 4916.59 13268.16 agv: 6119.1875 Signed-off-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20240618144456.1688998-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 2b0cd6b7270e8fd8c50c3b0b2ebf1372c7b6d384 Author: Jeff Johnson Date: Tue Jun 18 10:56:28 2024 -0700 net: smc9194: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/smsc/smc9194.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240618-md-m68k-drivers-net-ethernet-smsc-v1-1-ad3d7200421e@quicinc.com Signed-off-by: Jakub Kicinski commit 5e736135ad00106bc4b7eff3827162bc1e08b2e3 Author: Jeff Johnson Date: Tue Jun 18 10:41:54 2024 -0700 net: ethernet: mac89x0: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/cirrus/mac89x0.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240618-md-m68k-drivers-net-ethernet-cirrus-v1-1-07f5bd0b64cb@quicinc.com Signed-off-by: Jakub Kicinski commit deb9d5766206988e788037c43a12df892c366ad7 Author: Jeff Johnson Date: Tue Jun 18 10:26:20 2024 -0700 net: amd: add missing MODULE_DESCRIPTION() macros With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/a2065.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/ariadne.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/atarilance.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/hplance.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/7990.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/mvme147.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/amd/sun3lance.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes drivers/net/ethernet/amd/lance.c which, although it did not produce a warning with the m68k allmodconfig configuration, may cause this warning with other configurations. Signed-off-by: Jeff Johnson Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240618-md-m68k-drivers-net-ethernet-amd-v1-1-50ee7a9ad50e@quicinc.com Signed-off-by: Jakub Kicinski commit e6fed01554fabbe5d3c0172559badcb897eb3254 Author: Jeff Johnson Date: Tue Jun 18 09:53:44 2024 -0700 net: arcnet: com20020-isa: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/com20020-isa.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240618-md-m68k-drivers-net-arcnet-v1-1-90e42bc58102@quicinc.com Signed-off-by: Jakub Kicinski commit 1b9fd2f0b5133974917efafd066f79e0e309e602 Author: Laurent Pinchart Date: Mon Nov 13 18:41:44 2023 +0200 media: renesas: vsp1: Initialize control handler after subdev Some VSP modules initialize their control handler after initializing the subdev, while some initialize it before. This makes the code inconsistent and more error prone. Standardize on control initialization after initializing the subdev. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 4be710a3f1b94930cdc4b569145d89a9783065db Author: Laurent Pinchart Date: Sun Nov 12 04:14:05 2023 +0200 media: renesas: vsp1: Pass subdev state to entity operations To prepare for the removal of the vsp1_entity.state field, pass the state to all entity operations that needs to access it, instead of accessing the state from the entity inside the operation handlers. This lowers the number of accesses to the field. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit a2bbb988704d7ffc6860eb3966ec40693b817547 Author: Laurent Pinchart Date: Tue Nov 14 00:53:07 2023 +0200 media: renesas: vsp1: Name parameters to entity operations checkpatch.pl complains when function arguments are not named: WARNING: function definition argument 'struct vsp1_entity *' should also have an identifier name + void (*configure_stream)(struct vsp1_entity *, In preparation for reworking some of the vsp1_entity_operations functions, fix the warnings for the existing ones. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 4467bd9e448905c10b00b42af29019a0a54b725f Author: Laurent Pinchart Date: Tue Nov 14 00:53:07 2023 +0200 media: renesas: vsp1: Get configuration from partition instead of state Entities access various piece of information from the subdev state when configuring a partition. The same data is available through the partition structure passed to the .configure_partition() operation. Use it to avoid accessing the state, which will simplify moving to the V4L2 subdev active state API. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 0656babf3c244b7760a6c005485d4b7b9be639e9 Author: Laurent Pinchart Date: Sun Nov 19 03:11:51 2023 +0200 media: renesas: vsp1: Compute partitions for DRM pipelines The DRM pipelines don't partition frames, as the hardware operates synchronously with the display. The entity operations access configuration data from the entity state in that case, instead of accessing the partition structure. This requires special cases in entity-specific code, increasing the driver complexity. To prepare for simplifying the code, initialize a single partition for the DRM pipelines, similarly to how video pipelines create one partition spanning the full image when partitioning isn't needed. The partition is allocated statically in the vsp1_drm_pipeline structure instead of dynamically as for video pipelines, as DRM pipelines are guaranteed to operate on a single partition. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 51648e9605016b2b9d284e890b36bc27a71678dd Author: Laurent Pinchart Date: Sun Nov 19 03:11:51 2023 +0200 media: renesas: vsp1: Keep the DRM pipeline entities sorted Some of the code that handles pipeline configuration assumes that entities in a pipeline's entities list are sorted from sink to source. To prepare for using that code with the DRM pipeline, insert the BRx just before the WPF, and the RPFs at the head of the list. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi commit 032000264cbec9b17af2f76dd2899a7cc20ef422 Author: Laurent Pinchart Date: Sun Nov 19 00:39:34 2023 +0200 media: renesas: vsp1: Add and use function to dump a pipeline to the log It is useful for debugging purpose to dump a vsp1_pipeline to the kernel log. Add a new function to do so, and use it when initializing the video and DRM pipelines. As __vsp1_pipeline_dump() needs to construct the log message iteratively, it uses pr_cont(...) (exact equivalent to the more verbose "printk(KERN_CONT ..."). The function thus can't use dev_dbg() to log the initial part of the message, for two reasons: - pr_cont() doesn't seem to work with dev_*(). Even if the format string passed to dev_*() doesn't end with a '\n', pr_cont() starts a new line in the log. This behaviour doesn't seem to be clearly documented, and may or may not be on purpose. - Messages printed by dev_dbg() may be omitted if dynamic debugging is enabled. In that case, the continuation messages will still be printed, leading to confusing log messages. To still benefit from the dynamic debug infrastructure, we declare a vsp1_pipeline_dump() macro that uses _dynamic_func_call() when dynamic debugging is enabled. The whole vsp1_pipeline_dump() call can be selected at runtime. The __vsp1_pipeline_dump() function then uses a plain "printk(KERN_DEBUG ...)" to print the message header using the debug log level, and pr_cont() to print the rest of the message on the same line. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 41be7fcc5d632402382a7c2a77ac84baf24d47cc Author: Laurent Pinchart Date: Tue Nov 14 00:53:07 2023 +0200 media: renesas: vsp1: Replace vsp1_partition_window with v4l2_rect The vsp1_partition_window structure is used to store the horizontal size of a partition window. This is all that is currently needed, as all partitions span the whole image vertically. The horizontal window size is retrieved in the .configure_partition() handler from the vsp1_partition_window structure, and the vertical window size from the subdev state. Accessing the subdev state in the .configure_partition() handler is problematic in the context of moving to the V4L2 subdev active state API, as .configure_partition() is called in non-interruptable context, and the state lock can't be taken. To avoid this, start by storing the vertical size in the window, replacing the custom vsp1_partition_window structure with a v4l2_rect. Retrieving the vertical size from the window in .configure_partition() will be done in a subsequent change. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 2d7e5d80f120b7b075c037df463cca6d6a20fe8a Author: Laurent Pinchart Date: Wed Nov 15 00:34:56 2023 +0200 media: renesas: vsp1: Pass partition pointer to .configure_partition() The entity .configure_partition() function operates on a partition, and has to retrieve that partition from the pipeline's current partition field. Pass the partition pointer to the function to make it clearer what partition it operates on, and remove the vsp1_pipeline.partition field. This change clearly shows that the DRM pipeline doesn't use partitions, which makes entity implementation more complex and error-prone. This will be addressed in a further cleanup. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit a213bc09b1025c771ee722ee341af1d84375db8a Author: Laurent Pinchart Date: Sun Nov 19 03:11:51 2023 +0200 media: renesas: vsp1: Store RPF partition configuration per RPF instance The vsp1_partition structure stores the RPF partition configuration in a single field for all RPF instances, while each RPF can have its own configuration. Fix it by storing the configuration separately for each RPF instance. Signed-off-by: Laurent Pinchart Fixes: ab45e8585182 ("media: v4l: vsp1: Allow entities to participate in the partition algorithm") Reviewed-by: Jacopo Mondi commit a143156c85b2118b972156386116e3bdc6564a19 Author: Laurent Pinchart Date: Thu Nov 16 03:00:41 2023 +0200 media: renesas: vsp1: Simplify partition calculation When calculation a partition in vsp1_pipeline_calculate_partition(), there is no need to handle the case where the whole image is covered by a single partition locally. In that case, the index and div_size parameters are 0 and format->width respectively, which makes the general code behave exactly as the special case. Drop the special case. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit e575095d28b331179c737cb08a95cde5ab647557 Author: Laurent Pinchart Date: Thu Nov 16 03:00:41 2023 +0200 media: renesas: vsp1: Move partition calculation to vsp1_pipe.c The partition calculation code, located in vsp1_video.c, is not specific to video pipelines. To prepare for its usage in DRM pipelines, move it to vsp1_pipe.c. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 177bfb680342637715a6a54ba6216e4d3f761d5a Author: Laurent Pinchart Date: Sun Nov 12 04:14:05 2023 +0200 media: renesas: vsp1: Drop custom .get_fmt() handler for histogram The histogram module is the only one that has a custom .get_fmt() handler, to handle the special case of the output format being fixed. This can equally well be handled in the .set_fmt() handler instead. Beside avoiding special cases and using the same .get_fmt() handler in all modules, it ensures that the correct format is stored in the active state for the source pad, including when .set_fmt() is called from vsp1_entity_init_state(). Both are needed to later switch to the V4L2 subdev active state API. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit bbd53f422d51399d838be90de81d1ea752f0b89a Author: Laurent Pinchart Date: Sun Nov 12 04:14:05 2023 +0200 media: renesas: vsp1: Drop brx_get_compose() wrapper The brx_get_compose() function is just a wrapper around v4l2_subdev_state_get_compose() without any added value. Drop it and call v4l2_subdev_state_get_compose() directly. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 70884bb3f7c20ecb6c9ee1c9c4cfcc26d1967d61 Author: Laurent Pinchart Date: Sun Nov 12 04:14:05 2023 +0200 media: renesas: vsp1: Drop vsp1_rwpf_get_crop() wrapper The vsp1_rwpf_get_crop() function is just a wrapper around v4l2_subdev_state_get_crop() without any added value. Drop it and call v4l2_subdev_state_get_crop() directly. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 769d5fe4eb8e8fc5aac421151c645329086df114 Author: Laurent Pinchart Date: Sun Nov 12 04:14:05 2023 +0200 media: renesas: vsp1: Drop vsp1_entity_get_pad_selection() wrapper The vsp1_entity_get_pad_selection() function is just a wrapper around v4l2_subdev_state_get_crop() or v4l2_subdev_state_get_compose() without any added value. Drop it and call the functions it wraps directly. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit 0aaf7db087267734da8b0353533ff67b1e4080df Author: Laurent Pinchart Date: Sun Nov 12 04:14:05 2023 +0200 media: renesas: vsp1: Drop vsp1_entity_get_pad_format() wrapper The vsp1_entity_get_pad_format() function is just a wrapper around v4l2_subdev_state_get_format() without any added value. Drop it and call v4l2_subdev_state_get_format() directly. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi commit dce863203d259d019693b5d082b0a4c4b5063cd1 Author: Laurent Pinchart Date: Tue Jun 18 21:46:44 2024 +0300 media: renesas: vsp1: Print debug message to diagnose validation failure When formats don't match between a subdev and a connected video device, starting streaming returns an error without giving the user any indication as to what went wrong. To help debugging pipeline misconfigurations, add a debug message that indicates the cause of the failure. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit 2003e483a81cc235e29f77da3f6b256cb4b348e7 Author: Kees Cook Date: Wed Jun 19 13:31:05 2024 -0700 fortify: Do not special-case 0-sized destinations All fake flexible arrays should have been removed now, so remove the special casing that was avoiding checking them. If a destination claims to be 0 sized, believe it. This is especially important for cases where __counted_by is in use and may have a 0 element count. Link: https://lore.kernel.org/r/20240619203105.work.747-kees@kernel.org Signed-off-by: Kees Cook commit 60371f43e56bfad1f438621fae286e1de5bb6877 Author: Kees Cook Date: Sun May 19 17:17:59 2024 -0700 exec: Add KUnit test for bprm_stack_limits() Since bprm_stack_limits() operates with very limited side-effects, add it as the first exec.c KUnit test. Add to Kconfig and adjust MAINTAINERS file to include it. Tested on 64-bit UML: $ tools/testing/kunit/kunit.py run exec Link: https://lore.kernel.org/lkml/20240520021615.741800-1-keescook@chromium.org/ Signed-off-by: Kees Cook commit 3545deff0ec7a37de7ed9632e262598582b140e9 Author: Kees Cook Date: Wed May 8 10:31:48 2024 -0700 binfmt_elf: Honor PT_LOAD alignment for static PIE The p_align values in PT_LOAD were ignored for static PIE executables (i.e. ET_DYN without PT_INTERP). This is because there is no way to request a non-fixed mmap region with a specific alignment. ET_DYN with PT_INTERP uses a separate base address (ELF_ET_DYN_BASE) and binfmt_elf performs the ASLR itself, which means it can also apply alignment. For the mmap region, the address selection happens deep within the vm_mmap() implementation (when the requested address is 0). The earlier attempt to implement this: commit 9630f0d60fec ("fs/binfmt_elf: use PT_LOAD p_align values for static PIE") commit 925346c129da ("fs/binfmt_elf: fix PT_LOAD p_align values for loaders") did not take into account the different base address origins, and were eventually reverted: aeb7923733d1 ("revert "fs/binfmt_elf: use PT_LOAD p_align values for static PIE"") In order to get the correct alignment from an mmap base, binfmt_elf must perform a 0-address load first, then tear down the mapping and perform alignment on the resulting address. Since this is slightly more overhead, only do this when it is needed (i.e. the alignment is not the default ELF alignment). This does, however, have the benefit of being able to use MAP_FIXED_NOREPLACE, to avoid potential collisions. With this fixed, enable the static PIE self tests again. Reported-by: H.J. Lu Closes: https://bugzilla.kernel.org/show_bug.cgi?id=215275 Link: https://lore.kernel.org/r/20240508173149.677910-3-keescook@chromium.org Signed-off-by: Kees Cook commit 2d4cf7b190bbfadd4986bf5c34da17c1a88adf8e Author: Kees Cook Date: Wed May 8 10:31:47 2024 -0700 binfmt_elf: Calculate total_size earlier In preparation to support PT_LOAD with large p_align values on non-PT_INTERP ET_DYN executables (i.e. "static pie"), we'll need to use the total_size details earlier. Move this separately now to make the next patch more readable. As total_size and load_bias are currently calculated separately, this has no behavioral impact. Link: https://lore.kernel.org/r/20240508173149.677910-2-keescook@chromium.org Signed-off-by: Kees Cook commit b57a2907c9d96c56494ef25f8ec821cd0b355dd6 Author: Kees Cook Date: Wed May 8 10:31:46 2024 -0700 selftests/exec: Build both static and non-static load_address tests After commit 4d1cd3b2c5c1 ("tools/testing/selftests/exec: fix link error"), the load address alignment tests tried to build statically. This was silently ignored in some cases. However, after attempting to further fix the build by switching to "-static-pie", the test started failing. This appears to be due to non-PT_INTERP ET_DYN execs ("static PIE") not doing alignment correctly, which remains unfixed[1]. See commit aeb7923733d1 ("revert "fs/binfmt_elf: use PT_LOAD p_align values for static PIE"") for more details. Provide rules to build both static and non-static PIE binaries, improve debug reporting, and perform several test steps instead of a single all-or-nothing test. However, do not actually enable static-pie tests; alignment specification is only supported for ET_DYN with PT_INTERP ("regular PIE"). Link: https://bugzilla.kernel.org/show_bug.cgi?id=215275 [1] Link: https://lore.kernel.org/r/20240508173149.677910-1-keescook@chromium.org Signed-off-by: Kees Cook commit d6f635bcaca8d38dfa47ee20658705f9eff156b5 Author: Kees Cook Date: Tue Apr 30 17:02:22 2024 -0700 x86/alternatives: Make FineIBT mode Kconfig selectable Since FineIBT performs checking at the destination, it is weaker against attacks that can construct arbitrary executable memory contents. As such, some system builders want to run with FineIBT disabled by default. Allow the "cfi=kcfi" boot param mode to be selectable through Kconfig via the newly introduced CONFIG_CFI_AUTO_DEFAULT. Reviewed-by: Sami Tolvanen Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/20240501000218.work.998-kees@kernel.org Signed-off-by: Kees Cook commit ba848a77c90800cb686a5c8cf725e9bdfdcccfc2 Author: Linus Torvalds Date: Sun Jun 16 13:06:56 2024 -0700 vfs: link_path_walk: do '.' and '..' detection while hashing Instead of loading the name again to detect '.' and '..', just use the fact that we already had the masked last word available when as we created the name hash. Which is exactly what we'd then test for. Dealing with big-endian word ordering needs a bit of care, particularly since we have the byte-at-a-time loop as a fallback that doesn't do BE word loads. But not a big deal. Signed-off-by: Linus Torvalds commit 631e1a710c0489e083d4f1276f6de787a5cf08fb Author: Linus Torvalds Date: Sun Jun 16 10:38:35 2024 -0700 vfs: link_path_walk: clarify and improve name hashing interface Now that we clearly only care about the length of the name we just parsed, we can simplify and clarify the interface to "name_hash()", and move the actual nd->last field setting in there. That makes everything simpler, and this way don't mix the hash and the length together only to then immediately unmix them again. We still eventually want the combined mixed "hashlen" for when we look things up in the dentry cache, but inside link_path_walk() it's simpler and clearer to just deal with the path component length. Signed-off-by: Linus Torvalds commit 7d286849a8de41c1aee2957e224c5802d3488c8d Author: Linus Torvalds Date: Sat Jun 15 17:55:00 2024 -0700 vfs: link_path_walk: simplify name hash flow This is one of those hot functions in path walking, and it's doing things in just the wrong order that causes slightly unnecessary extra work. Move the name pointer update and the setting of 'nd->last' up a bit, so that the (unlikely) filesystem-specific hashing can run on them in place, instead of having to set up a copy on the stack and copy things back and forth. Because even when the hashing is not run, it causes the stack frame of the function to be bigger to hold the unnecessary temporary copy. This also means that we never then reference the full "hashlen" field after calculating it, and can clarify the code with just using the length part. Signed-off-by: Linus Torvalds commit f915a3e5b0182dd7376f11337e231500a157e1f4 Author: Linus Torvalds Date: Tue Jun 18 18:14:48 2024 -0700 arm64: word-at-a-time: improve byte count calculations for LE Do the same optimization as x86-64: do __ffs() on the intermediate value that found whether there is a zero byte, before we've actually computed the final byte mask. The logic is: has_zero(): Check if the word has a zero byte in it, which indicates the end of the loop, and prepare a value to be used for the rest of the sequence. The standard LE implementation just creates a word that has the high bit set in each byte of the word that was zero. Example: 0xaa00bbccdd00eeff -> 0x0080000000800000 prep_zero_mask(): Possibly do more prep to then clean up the initial fast result from has_zero, so that it can be combined with another zero mask with a simple logical "or" to create a final mask. This is only used on big-endian machines that use a different algorithm, and is a no-op here. create_zero_mask(): This is "step 1" of creating the count and the mask, and is meant for any common operations between the two. In the old implementation, this actually created the zero mask, that was then used for masking and for counting the number of bits in the mask. In the new implementation, this is a no-op. count_zero(): This takes the mask bits, and counts the number of bytes before the first zero byte. In the old implementation, it counted the number of bits in the final byte mask (which was the same as the C standard "find last set bit" that uses the silly "starts at one" counting) and shifted the value down by three. In the new implementation, we know the intermediate mask isn't zero, and it just does "find first set" with the sane semantics without any off-by-one issues, and again shifts by three (which also masks off the bit offset in the zero byte itself). Example: 0x0080000000800000 -> 2 zero_bytemask(): This takes the mask bits, and turns it into an actual byte mask of the bytes preceding the first zero byte. In the old implementation, this was a no-op, because the work had already been done by create_zero_mask(). In the new implementation, this does what create_zero_mask() used to do. Example: 0x0080000000800000 -> 0x000000000000ffff The difference between the old and the new implementation is that "count_zero()" ends up scheduling better because it is being done on a value that is available earlier (before the final mask). But more importantly, it can be implemented without the insane semantics of the standard bit finding helpers that have the off-by-one issue and have to special-case the zero mask situation. On arm64, the new "count_zero()" ends up just "rbit + clz" plus the shift right that then ends up being subsumed by the "add to final length". Signed-off-by: Linus Torvalds commit 4b8fa1173cdc33a1cb53e4cac869b1b7aac917a9 Author: Linus Torvalds Date: Sat Jun 15 12:21:44 2024 -0700 x86-64: word-at-a-time: improve byte count calculations This switches x86-64 over to using 'tzcount' instead of the integer multiply trick to turn the bytemask information into actual byte counts. We even had a comment saying that a fast bit count instruction is better than a multiply, but x86 bit counting has traditionally been "questionably fast", and so avoiding it was the right thing back in the days. Now, on any half-way modern core, using bit counting is cheaper and smaller than the large constant multiply, so let's just switch over. Note that as part of switching over to counting bits, we also do it at a different point. We used to create the byte count from the final byte mask, but once you use the 'tzcount' instruction (aka 'bsf' on older CPU's), you can actually count the leading zeroes using a value we have available earlier. In fact, we can just use the very first mask of bits that tells us whether we have any zero bytes at all. The zero bytes in the word will have the high bit set, so just doing 'tzcount' on that value and dividing by 8 will give the number of bytes that precede the first NUL character, which is exactly what we want. Note also that the input value to the tzcount is by definition not zero, since that is the condition that we already used to check the whole "do we have any zero bytes at all". So we don't need to worry about the legacy instruction behavior of pre-lzcount days when 'bsf' didn't have a result for zero input. The 32-bit code continues to use the bimple bit op trick that is faster even on newer cores, but particularly on the older 32-bit-only ones. Signed-off-by: Linus Torvalds commit e3c92e81711d14b46c3121d36bc8e152cb843923 Author: Linus Torvalds Date: Mon Jun 10 12:32:14 2024 -0700 runtime constants: add x86 architecture support This implements the runtime constant infrastructure for x86, allowing the dcache d_hash() function to be generated using as a constant for hash table address followed by shift by a constant of the hash index. Signed-off-by: Linus Torvalds commit e78298556ee5d881f6679effb2a6743969ea6e2d Author: Linus Torvalds Date: Tue Jun 4 12:30:02 2024 -0700 runtime constants: add default dummy infrastructure This adds the initial dummy support for 'runtime constants' for when an architecture doesn't actually support an implementation of fixing up said runtime constants. This ends up being the fallback to just using the variables as regular __ro_after_init variables, and changes the dcache d_hash() function to use this model. Signed-off-by: Linus Torvalds commit e60cc61153e61e4e38bd983492df9959e82ae4dc Author: Linus Torvalds Date: Mon Jun 10 11:47:06 2024 -0700 vfs: dcache: move hashlen_hash() from callers into d_hash() Both __d_lookup_rcu() and __d_lookup_rcu_op_compare() have the full 'name_hash' value of the qstr that they want to look up, and mask it off to just the low 32-bit hash before calling down to d_hash(). Other callers just load the 32-bit hash and pass it as the argument. If we move the masking into d_hash() itself, it simplifies the two callers that currently do the masking, and is a no-op for the other cases. It doesn't actually change the generated code since the compiler will inline d_hash() and see that the end result is the same. [ Technically, since the parse tree changes, the code generation may not be 100% the same, and for me on x86-64, this does result in gcc switching the operands around for one 'cmpl' instruction. So not necessarily the exact same code generation, but equivalent ] However, this does encapsulate the 'd_hash()' operation more, and makes the shift operation in particular be a "shift 32 bits right, return full word". Which matches the instruction semantics on both x86-64 and arm64 better, since a 32-bit shift will clear the upper bits. That makes the next step of introducing a "shift by runtime constant" more obvious and generates the shift with no extraneous type masking. Signed-off-by: Linus Torvalds commit 7fd298d4b39d8d5fe99d56811a7ed78c7a5377d5 Author: Linus Torvalds Date: Sat Jun 1 15:04:53 2024 -0700 arm64: start using 'asm goto' for put_user() This generates noticeably better code since we don't need to test the error register etc, the exception just jumps to the error handling directly. Unlike get_user(), there's no need to worry about old compilers. All supported compilers support the regular non-output 'asm goto', as pointed out by Nathan Chancellor. Signed-off-by: Linus Torvalds commit 86a6a68febfcf57b5c2a7ba33e6d6f1f78ca5197 Author: Linus Torvalds Date: Sun Jun 9 10:11:04 2024 -0700 arm64: start using 'asm goto' for get_user() when available This generates noticeably better code with compilers that support it, since we don't need to test the error register etc, the exception just jumps to the error handling directly. Note that this also marks SW_TTBR0_PAN incompatible with KCSAN support, since KCSAN wants to save and restore the user access state. KCSAN and SW_TTBR0_PAN were probably always incompatible, but it became obvious only when implementing the unsafe user access functions. At that point the default empty user_access_save/restore() functions weren't provided by the default fallback functions. Signed-off-by: Linus Torvalds commit 9e4259716f60c96c069a38e826884ad783dc4eb4 Author: Jeff Johnson Date: Mon Jun 3 16:22:37 2024 -0700 hte: tegra-194: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hte/hte-tegra194-test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Dipen Patel Signed-off-by: Dipen Patel commit ede951c27dbd2d4c91b9d54f0b423508a6b5e191 Author: Srinivas Pandruvada Date: Mon Jun 17 22:52:21 2024 -0700 cpufreq: intel_pstate: Update Lunar Lake hybrid scaling factor Change hybrid scaling factor for Lunar Lake. Scaling factor is 1.15 for P-cores compared to E-cores. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240618055221.446108-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit 6c30b137c081d0b3e79365a63f44e59bd0aac0cf Author: Srinivas Pandruvada Date: Mon Jun 17 22:52:20 2024 -0700 cpufreq: intel_pstate: Update Arrow Lake hybrid scaling factor Arrow Lake uses the same scaling factor as Meteor Lake, so reuse the same scaling factor. Signed-off-by: Srinivas Pandruvada Link: https://patch.msgid.link/20240618055221.446108-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Rafael J. Wysocki commit a233df7f6c8abd532748312631b0a0530d3079a7 Author: Lucas Stach Date: Wed May 15 14:13:58 2024 +0200 drm/etnaviv: don't disable TS on MMUv2 core when moving the linear window On MMUv2 cores the linear window is only relevant when starting the FE, before the MMU has been activated. Once the MMU is active, all accesses are translated with no way to bypass the MMU via the linear window. Thus TS ignoring the linear window offset is not an issue on cores with MMUv2 present and there is no need to disable TS when we need to move the linear window. Signed-off-by: Lucas Stach Tested-by: Joao Paulo Goncalves commit 95e3ca33f59882f33bc73ba7748f664b042a85c1 Author: Derek Foreman Date: Fri May 3 14:11:58 2024 -0500 drm/etnaviv: Read some FE registers twice On some hardware (such at the GC7000 rev 6009), these registers need to be read twice to return the correct value. Hide that in gpu_read(). Signed-off-by: Derek Foreman Signed-off-by: Lucas Stach commit 8a2462df154799129d8259079ec1fecf78703189 Author: Linus Torvalds Date: Wed Jun 19 14:54:23 2024 +0200 x86/uaccess: Improve the 8-byte getuser() case Streamline the 8-byte case and drop the special handling. Use a macro which hides the exception handling. No functional changes. Signed-off-by: Linus Torvalds Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/CAHk-=whYb2L_atsRk9pBiFiVLGe5wNZLHhRinA69yu6FiKvDsw@mail.gmail.com commit b56c720718e97d2a1a0523e38fdc836adc188a2e Author: Lai Jiangshan Date: Wed Jun 19 18:39:34 2024 +0800 workqueue: Avoid nr_active manipulation in grabbing inactive items Current try_to_grab_pending() activates the inactive item and subsequently treats it as though it were a standard activated item. This approach prevents duplicating handling logic for both active and inactive items, yet the premature activation of an inactive item triggers trace_workqueue_activate_work(), yielding an unintended user space visible side effect. And the unnecessary increment of the nr_active, which is not a simple counter now, followed by a counteracted decrement, is inefficient and complicates the code. Just remove the nr_active manipulation code in grabbing inactive items. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 1c0be3f7b2f0dcca5dd237233f02a44e7af8c23a Author: Waiman Long Date: Mon Jun 17 10:39:45 2024 -0400 selftest/cgroup: Update test_cpuset_prs.sh to match changes Unlike the list of isolated CPUs, it is not easy to programamatically determine what sched domains are being created by the scheduler just by examinng the data in various kernfs filesystems. The easiest way to get this information is by enabling /sys/kernel/debug/sched/verbose file to make those information displayed in the console. This is also what the test_cpuset_prs.sh script is doing when the -v flag is given. It is rather hard to fetch the data from the console and compare it to the expected result. An easier way is to dump the expected sched-domain information out to the console so that they can be visually compared with the actual sched domain data. However, this have to be done manually by visual inspection and so will only be done once in a while. Moreover the preceding cpuset commits also change the cpuset behavior requiring corresponding chanages in some test cases as well as new test cases to test the newly added functionality. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 737bb142a00d53de3743ae389732721b3b9f0191 Author: Waiman Long Date: Mon Jun 17 10:39:44 2024 -0400 cgroup/cpuset: Make cpuset.cpus.exclusive independent of cpuset.cpus The "cpuset.cpus.exclusive.effective" value is currently limited to a subset of its "cpuset.cpus". This makes the exclusive CPUs distribution hierarchy subsumed within the larger "cpuset.cpus" hierarchy. We have to decide on what CPUs are used locally and what CPUs can be passed down as exclusive CPUs down the hierarchy and combine them into "cpuset.cpus". The advantage of the current scheme is to have only one hierarchy to worry about. However, it make it harder to use as all the "cpuset.cpus" values have to be properly set along the way down to the designated remote partition root. It also makes it more cumbersome to find out what CPUs can be used locally. Make creation of remote partition simpler by breaking the dependency of "cpuset.cpus.exclusive" on "cpuset.cpus" and make them independent entities. Now we have two separate hierarchies - one for setting "cpuset.cpus.effective" and the other one for setting "cpuset.cpus.exclusive.effective". We may not need to set "cpuset.cpus" when we activate a partition root anymore. Also update Documentation/admin-guide/cgroup-v2.rst and cpuset.c comment to document this change. Suggested-by: Petr Malat Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit fe8cd2736e75c8ca3aed1ef181a834e41dc5310f Author: Waiman Long Date: Mon Jun 17 10:39:43 2024 -0400 cgroup/cpuset: Delay setting of CS_CPU_EXCLUSIVE until valid partition The CS_CPU_EXCLUSIVE flag is currently set whenever cpuset.cpus.exclusive is set to make sure that the exclusivity test will be run to ensure its exclusiveness. At the same time, this flag can be changed whenever the partition root state is changed. For example, the CS_CPU_EXCLUSIVE flag will be reset whenever a partition root becomes invalid. This makes using CS_CPU_EXCLUSIVE to ensure exclusiveness a bit fragile. The current scheme also makes setting up a cpuset.cpus.exclusive hierarchy to enable remote partition harder as cpuset.cpus.exclusive cannot overlap with any cpuset.cpus of sibling cpusets if their cpuset.cpus.exclusive aren't set. Solve these issues by deferring the setting of CS_CPU_EXCLUSIVE flag until the cpuset become a valid partition root while adding new checks in validate_change() to ensure that cpuset.cpus.exclusive of sibling cpusets cannot overlap. An additional check is also added to validate_change() to make sure that cpuset.cpus of one cpuset cannot be a subset of cpuset.cpus.exclusive of a sibling cpuset to avoid the problem that none of those CPUs will be available when these exclusive CPUs are extracted out to a newly enabled partition root. The Documentation/admin-guide/cgroup-v2.rst file is updated to document the new constraints. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 43ee40145380ba8854c731180b125e24b34fc006 Author: Waiman Long Date: Mon Jun 17 10:39:42 2024 -0400 selftest/cgroup: Fix test_cpuset_prs.sh problems reported by test robot The test robot reported two different problems when running the test_cpuset_prs.sh test. # ./test_cpuset_prs.sh: line 106: echo: write error: Input/output error # : # Effective cpus changed to 0-1,4-7 after test 4! The write error is caused by writing to /dev/console. It looks like some systems may not have /dev/console configured or in a writeable state. Fix this by checking the existence of /dev/console before attempting to write it. After the completion of each test run, the script will check if the cpuset state is reset back to the original state. That usually takes a while to happen. The test script inserts some artificial delay to make sure that the reset has completed. The current setting is about 80ms. That may not be enough in some cases especially if the test system is slow. Double it to 160ms to minimize the chance of this type of failure. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202406141712.dbbaa8fd-oliver.sang@intel.com Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit ccac8e8de99cbcf5e7f53251ebce917bf7bcc29c Author: Waiman Long Date: Mon Jun 17 10:39:41 2024 -0400 cgroup/cpuset: Fix remote root partition creation problem Since commit 181c8e091aae ("cgroup/cpuset: Introduce remote partition"), a remote partition can be created underneath a non-partition root cpuset as long as its exclusive_cpus are set to distribute exclusive CPUs down to its children. The generate_sched_domains() function, however, doesn't take into account this new behavior and hence will fail to create the sched domain needed for a remote root (non-isolated) partition. There are two issues related to remote partition support. First of all, generate_sched_domains() has a fast path that is activated if root_load_balance is true and top_cpuset.nr_subparts is non-zero. The later condition isn't quite correct for remote partitions as nr_subparts just shows the number of local child partitions underneath it. There can be no local child partition under top_cpuset even if there are remote partitions further down the hierarchy. Fix that by checking for subpartitions_cpus which contains exclusive CPUs allocated to both local and remote partitions. Secondly, the valid partition check for subtree skipping in the csa[] generation loop isn't enough as remote partition does not need to have a partition root parent. Fix this problem by breaking csa[] array generation loop of generate_sched_domains() into v1 and v2 specific parts and checking a cpuset's exclusive_cpus before skipping its subtree in the v2 case. Also simplify generate_sched_domains() for cgroup v2 as only non-isolating partition roots should be included in building the cpuset array and none of the v1 scheduling attributes other than a different way to create an isolated partition are supported. Fixes: 181c8e091aae ("cgroup/cpuset: Introduce remote partition") Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 5fb89782a9e94936c14f2621637ef9df7c4ac0f0 Author: MD Danish Anwar Date: Fri Jun 14 15:38:29 2024 +0530 arm64: dts: ti: k3-am642-evm: Enable "SYNC_OUT0" output The IEP0 SYNC_OUT0 pins are used for PPS out on AM64 EVM. Configure its PINMUX here. Signed-off-by: MD Danish Anwar Link: https://lore.kernel.org/r/20240614100829.3919008-1-danishanwar@ti.com Signed-off-by: Vignesh Raghavendra commit 175133a32b48a092363828ce3041a0adaab01ffc Author: Devarsh Thakkar Date: Fri Jun 14 18:05:32 2024 +0530 arm64: dts: ti: k3-am62x-sk-common: Add bootph-all for I2C1 instance pinmux I2C1 controller controls io-expander which provides power to voltage regulator vdd_mmc1 for MMC SD using a gpio line. Add bootph-all to the pinmux node for this instance, as this is used during SPL stage too by the bootloader while using SD boot mode as without this the SD boot mode fails with below error when using this device-tree in u-boot: "Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured " Signed-off-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20240614123532.203983-1-devarsht@ti.com Signed-off-by: Vignesh Raghavendra commit 6fe960147e08e931dda1ef325dc69320e544aa73 Author: Oleg Nesterov Date: Mon Jun 17 16:31:52 2024 +0200 cgroup: avoid the unnecessary list_add(dying_tasks) in cgroup_exit() cgroup_exit() needs to do this only if the exiting task is a leader and it is not the last live thread. The patch doesn't use delay_group_leader(), atomic_read(signal->live) matches the code css_task_iter_advance() more. cgroup_release() can now check list_empty(task->cg_list) before it takes css_set_lock and calls ss_set_skip_task_iters(). Signed-off-by: Oleg Nesterov Signed-off-by: Tejun Heo commit ed07d82f9e3e8220d8e2f92afd323d718b860f21 Author: Siddharth Vadapalli Date: Sat Jun 15 13:46:00 2024 +0530 arm64: dts: ti: k3-am62p-j722s: Move SoC-specific node properties Certain device-tree node properties of shared device-tree nodes are different between the AM62P and J722S SoCs. To avoid overriding the properties and to avoid redefining the nodes in the k3-{soc}-main.dtsi having such SoC specific properties, move the properties to the SoC specific k3-{soc}-main.dtsi files. Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-9-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 485705df5d5fc0ad6bc5b3657fa63a96a421770d Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:59 2024 +0530 arm64: dts: ti: k3-j722s: Enable PCIe and USB support on J722S-EVM Enable PCIe0 instance of PCIe in Root Complex mode of operation with Lane 0 of the SERDES1 instance of SERDES. Also enable USB0 instance of USB to interface with the Type-C port via the USB hub, by configuring the pin P05 of the GPIO expander on the EVM. Enable USB1 instance of USB in SuperSpeed mode of operation with Lane 0 of the SERDES0 instance of SERDES. Co-developed-by: Ravi Gunasekaran Signed-off-by: Ravi Gunasekaran Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-8-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 628e0a0118e69bed9dad14e7dbd8a8802652f5f2 Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:58 2024 +0530 arm64: dts: ti: k3-j722s-main: Add SERDES and PCIe support J722S SoC has two instances of SERDES namely SERDES0 and SERDES1 and one instance of PCIe namely PCIe0. Both SERDES0 and SERDES1 are single lane SERDES. The PCIe0 instance of PCIe is a Gen3 single lane PCIe controller. Since SERDES and PCIe are not present on AM62P SoC, add the device-tree nodes corresponding to them in the J722S SoC specific "k3-j722s-main.dtsi" file. Co-developed-by: Ravi Gunasekaran Signed-off-by: Ravi Gunasekaran Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-7-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 6f9323f6ad818008fc58d2f804ee4140c1b8424d Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:57 2024 +0530 arm64: dts: ti: k3-serdes: Add SERDES0/SERDES1 lane-muxing macros for J722S The SERDES0 and SERDES1 instances of SERDES on J722S are single lane SERDES which are individually muxed across different peripherals. LANE0 of SERDES0 is muxed between USB and CPSW while LANE0 of SERDES1 is muxed between PCIe and CPSW. Define the lane-muxing macros to be used as the idle state values. Co-developed-by: Ravi Gunasekaran Signed-off-by: Ravi Gunasekaran Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-6-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 18fb2b7c8a09ca454709b806efc5c38b8a012ab4 Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:56 2024 +0530 arm64: dts: ti: k3-j722s: Switch to k3-am62p-j722s-common-{}.dtsi includes Update "k3-j722s.dtsi" to include "k3-am62p-j722s-common-{}".dtsi files in order to reuse the nodes shared with AM62P. Also include the J722S specific "k3-j722s-main.dtsi". Since the J7 family of SoCs has the k3-{soc}.dtsi file organized as: k3-{soc}.dtsi = CPU + Cache + CBASS-Ranges + "Peripheral-Includes" switch the "k3-j722s.dtsi" file to the same convention. Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-5-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 731626cc3180b263216805f82e006ca1f1df02c3 Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:55 2024 +0530 arm64: dts: ti: k3-j722s: Add main domain peripherals specific to J722S Introduce the "k3-j722s-main.dtsi" file to contain main domain peripherals that are specific to J722S SoC and are not shared with AM62P. The USB1 instance of the USB controller on J722S is different from that on AM62P. Thus, add the USB1 node in "k3-j722s-main.dtsi". Co-developed-by: Ravi Gunasekaran Signed-off-by: Ravi Gunasekaran Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-4-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 77044cfb9346d1601bfe8759b7d785c664a73f84 Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:54 2024 +0530 arm64: dts: ti: k3-am62p-j722s: Move AM62P specific USB1 to am62p-main.dtsi The USB1 instance of USB controller on AM62P is different from the USB1 instance of USB controller on J722S. Thus, move the USB1 instance from the shared "k3-am62p-j722s-common-main.dtsi" file to the AM62p specific "k3-am62p-main.dtsi" file. Include "k3-am62p-main.dtsi" in "k3-am62p.dtsi". Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-3-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 3ad6579f106db8f94fb8495063cb4b0f0eaaaa9a Author: Siddharth Vadapalli Date: Sat Jun 15 13:45:53 2024 +0530 arm64: dts: ti: am62p: Rename am62p-{}.dtsi to am62p-j722s-common-{}.dtsi The AM62P and J722S SoCs share most of the peripherals. With the aim of reusing the existing k3-am62p-{mcu,main,thermal,wakeup}.dtsi files for J722S SoC, rename them to indicate that they are shared with the J722S SoC. The peripherals that are not shared will be moved in the upcoming patches to the respective k3-{soc}-{mcu,main,wakeup}.dtsi files without "common" in the filename, emphasizing that they are not shared. Signed-off-by: Siddharth Vadapalli Acked-by: Andrew Davis Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20240615081600.3602462-2-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 117937ff2fbf1f67e6e7cbe1635bbe1cc72dbee2 Author: Roger Quadros Date: Fri Jun 14 18:06:42 2024 +0300 arm64: dts: ti: am642-evm: Add overlay for NAND expansion card The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it. We add the ranges property to the GPMC node instead of the NAND overlay file to prevent below warnings. /fragment@3/__overlay__: Relying on default #address-cells value /fragment@3/__overlay__: Relying on default #size-cells value As GPMC is dedicated for NAND use on this board, it should be OK. Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20240614-am642-evm-nand-v5-1-acf760896239@kernel.org Signed-off-by: Vignesh Raghavendra commit 9a32378884931d8f66d0d7122873156199fa422f Author: Nathan Morrisson Date: Thu Jun 13 16:07:59 2024 -0700 arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable spi nor Add an overlay to disable the spi nor for all am6xx-phycore-som boards. The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an ospi nor, but if no nor is populated, the EEPROM will indicate that change and we can use this overlay to cleanly disable the spi nor. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240613230759.1984966-5-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit a0b552605f8c588fdd9ea062886fb90d50534a8d Author: Nathan Morrisson Date: Thu Jun 13 16:07:58 2024 -0700 arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable rtc Add an overlay to disable the rtc for all am6xx-phycore-som boards. The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an rtc, but if no rtc is populated, the EEPROM will indicate that change and we can use this overlay to cleanly disable the rtc. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240613230759.1984966-4-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit 1322b1796d7143dfa75e10e036c6099927ef510d Author: Nathan Morrisson Date: Thu Jun 13 16:07:57 2024 -0700 arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable eth phy Add an overlay to disable the eth phy for all am6xx-phycore-som boards. The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an ethernet phy, but if no ethernet phy is populated, the EEPROM will indicate that change and we can use this overlay to cleanly disable the ethernet phy. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240613230759.1984966-3-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit 1fc3858a906bf3e8c48a14587106bb61c2f8d7c5 Author: Nathan Morrisson Date: Thu Jun 13 16:07:56 2024 -0700 arm64: dts: ti: k3-am64-phycore-som: Add serial_flash label Label the spi nor as serial_flash. This allows us to disable the flash with an overlay common to all am6xx-phycore-som boards. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240613230759.1984966-2-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit 9c0fa304fa561abfe83d328ffc4f638c0152bead Author: Tomi Valkeinen Date: Thu Jun 13 15:07:06 2024 +0530 arm64: dts: ti: k3-j721e: Add overlay for J721E Infotainment Expansion Board J721E common processor board can be interfaced with the infotainment expansion board[0] to enable the following audio/video interfaces in addition to the peripherals provided by the common processor board: - Two Audio codecs each with three Stereo Inputs and four Stereo Outputs - Audio input over FPD Link III - Digital Audio Interface TX/RX - HDMI/FPD LINK III Display out - LI/OV Camera input Add support for TFP410 HDMI bridge located on the Infotainment Expansion Board (connected to J46 & J51). Add a HDMI connector node and connect the endpoints as below: DSS => TFP410 bridge => HDMI connector Also add the pinmux data and board muxes for DPI. Rest of the peripherals are not added as of now. [0]: Signed-off-by: Tomi Valkeinen [j-choudhary@ti.com: minor cleanup] Signed-off-by: Jayesh Choudhary Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20240613093706.480700-1-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit e9bb631b3eb41309063fd8ad804a3935665009a4 Author: Nathan Morrisson Date: Thu Jun 13 12:50:12 2024 -0700 arm64: dts: ti: am642-phyboard-electra: Add overlay to enable PCIe Add an overlay to enable PCIe on the am642-phyboard-electra. The serdes is muxed from USB to PCIe, so we are restricted to USB2 while using this overlay. Signed-off-by: Nathan Morrisson Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20240613195012.1925920-3-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit 927718d246fcf14b2b642691936f2abe2e80917e Author: Nathan Morrisson Date: Thu Jun 13 12:50:11 2024 -0700 arm64: dts: ti: am642-phyboard-electra: Remove PCIe pinmuxing Remove pinmuxing for PCIe so that we can add it in an overlay. Signed-off-by: Nathan Morrisson Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20240613195012.1925920-2-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit f53f477bfcb8aa7490b3bd3030e3bef1b95dbdce Author: Dasnavis Sabiya Date: Mon Jun 3 16:59:38 2024 +0530 arm64: dts: ti: k3-j784s4-main: Add node for EHRPWMs Add dts nodes for 6 EHRPWM instances on SoC. Signed-off-by: Dasnavis Sabiya Signed-off-by: Udit Kumar Link: https://lore.kernel.org/r/20240603112938.2188510-1-u-kumar1@ti.com Signed-off-by: Vignesh Raghavendra commit 851de367dede776180e6c4c709089bc8becbb53a Author: Ville Syrjälä Date: Wed Jun 5 14:18:32 2024 +0300 drm/i915: Enable plane/pipeDMC ATS fault interrupts on mtl MTL has some new IOMMU thing that has a few new fault interrupts. Enable those so we can know if things are going poorly. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a669b81328cb09474bc7bee56ccca499457900ba Author: Ville Syrjälä Date: Wed Jun 5 14:18:31 2024 +0300 drm/i915: Enable pipeDMC fault interrupts on tgl+ PipeDMC has its own fault interrupt. Enable that so that we can know if things are failing. While at it, define the other pipeDMC interrupt as well, even though we're not currently using it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ba30cd246f10cdac784df096b95e00b33116d161 Author: Ville Syrjälä Date: Wed Jun 5 14:18:30 2024 +0300 drm/i915: Nuke the intermediate pipe fault bitmasks GEN8_DE_PIPE_IRQ_FAULT_ERRORS & co. don't really achieve anything. Get rid of them and just declare all the bits directly in gen8_de_pipe_fault_mask(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit fa63577ff38bf0d828d772b807ac082a55401495 Author: Ville Syrjälä Date: Wed Jun 5 14:18:29 2024 +0300 drm/i915: Extend GEN9_PIPE_PLANE_FLIP_DONE() to cover all universal planes GEN9_PIPE_PLANE_FLIP_DONE() only works for planes 1-4. Extend it handle planes 5-7 as well. Somewhat annoyingly the bits are spread around into two distinct clumps. Currently this doesn't achieve anything, but if we ever extend async flip support to more than just the first plane then we'll need this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ad738e488981603a74d35ef3106e38b891bdfb7e Author: Ville Syrjälä Date: Wed Jun 5 14:18:28 2024 +0300 drm/i915: Sort bdw+ pipe interrupt bits It's really hard to figure out which bdw+ pipe interrupt bits we've defined and which we have not. Sort the defines to make that a bit easier (still not super easy since the bits have been shuffled a bit over the years). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9994be5584292aa37aff667d9e6821691d9840ed Author: Ville Syrjälä Date: Wed Jun 5 14:18:27 2024 +0300 drm/i915: Document bdw+ pipe interrupt bits Sprinkle some notes indicating which platforms have which pipe interrupt bits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 6399c94f4b90890de9fcaf56bad113d21cba7e8d Author: Ville Syrjälä Date: Wed Jun 5 14:18:26 2024 +0300 drm/i915: Use REG_BIT() for bdw+ pipe interrupts Replace the hand rolled (1< Link: https://patchwork.freedesktop.org/patch/msgid/20240605111832.21373-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1ecef5589320fd56af599b624d59c355d162ac7b Author: Likun Gao Date: Wed Jun 12 14:30:40 2024 +0800 drm/amdgpu: init TA fw for psp v14 Add support to init TA firmware for psp v14. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 017d0b67bf7b9788784eef9336925c98effcbf0e Author: Yang Wang Date: Fri May 31 14:09:10 2024 +0800 drm/amdgpu: refine gfx6 firmware loading refine gfx6 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0ca9f757a0e27a076395ec1b2002661bcf5c25e8 Author: Mario Limonciello Date: Fri Jun 14 12:05:51 2024 -0500 drm/amd/pm: powerplay: Add `__counted_by` attribute for flexible arrays This attribute is used to hint the length of flexible arrays to compiler and sanitizers. Acked-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit a4fcb5f7337597c10cab7cefde41e379fcbc6919 Author: Yang Wang Date: Tue Jun 18 09:48:13 2024 +0800 Revert "drm/amdgpu: change aca bank error lock type to spinlock" This reverts commit f6bce954f432c556659a57be9e18fecdc575affb. Revert this patch to modify lock type back to 'mutex' to avoid kernel calltrace issue. [ 602.668806] Workqueue: amdgpu-reset-dev amdgpu_ras_do_recovery [amdgpu] [ 602.668939] Call Trace: [ 602.668940] [ 602.668941] dump_stack_lvl+0x4c/0x70 [ 602.668945] dump_stack+0x14/0x20 [ 602.668946] __schedule_bug+0x5a/0x70 [ 602.668950] __schedule+0x940/0xb30 [ 602.668952] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.668955] ? hrtimer_reprogram+0x77/0xb0 [ 602.668957] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.668959] ? hrtimer_start_range_ns+0x126/0x370 [ 602.668961] schedule+0x39/0xe0 [ 602.668962] schedule_hrtimeout_range_clock+0xb1/0x140 [ 602.668964] ? __pfx_hrtimer_wakeup+0x10/0x10 [ 602.668966] schedule_hrtimeout_range+0x17/0x20 [ 602.668967] usleep_range_state+0x69/0x90 [ 602.668970] psp_cmd_submit_buf+0x132/0x570 [amdgpu] [ 602.669066] psp_ras_invoke+0x75/0x1a0 [amdgpu] [ 602.669156] psp_ras_query_address+0x9c/0x120 [amdgpu] [ 602.669245] umc_v12_0_update_ecc_status+0x16d/0x520 [amdgpu] [ 602.669337] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669339] ? stack_depot_save+0x12/0x20 [ 602.669342] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669343] ? set_track_prepare+0x52/0x70 [ 602.669346] ? kmemleak_alloc+0x4f/0x90 [ 602.669348] ? __kmalloc_node+0x34b/0x450 [ 602.669352] amdgpu_umc_update_ecc_status+0x23/0x40 [amdgpu] [ 602.669438] mca_umc_mca_get_err_count+0x85/0xc0 [amdgpu] [ 602.669554] mca_smu_parse_mca_error_count+0x120/0x1d0 [amdgpu] [ 602.669655] amdgpu_mca_dispatch_mca_set.part.0+0x141/0x250 [amdgpu] [ 602.669743] ? kmemleak_free+0x36/0x60 [ 602.669745] ? kvfree+0x32/0x40 [ 602.669747] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669749] ? kfree+0x15d/0x2a0 [ 602.669752] amdgpu_mca_smu_log_ras_error+0x1f6/0x210 [amdgpu] [ 602.669839] amdgpu_ras_query_error_status_helper+0x2ad/0x390 [amdgpu] [ 602.669924] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669925] ? __call_rcu_common.constprop.0+0xa6/0x2b0 [ 602.669929] amdgpu_ras_query_error_status+0xf3/0x620 [amdgpu] [ 602.670014] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.670017] amdgpu_ras_log_on_err_counter+0xe1/0x170 [amdgpu] [ 602.670103] amdgpu_ras_do_recovery+0xd2/0x2c0 [amdgpu] [ 602.670187] ? srso_alias_return_thunk+0x5/0 Signed-off-by: Yang Wang Reviewed-by: YiPeng Chai Signed-off-by: Alex Deucher commit 8c9ee180196fb2a04e28891578ae608f772eab9c Author: Yang Wang Date: Tue Jun 18 09:47:36 2024 +0800 Revert "drm/amdgpu: change bank cache lock type to spinlock" This reverts commit 258ed689bc3163f86204f75df6c23f92b59b3fad revert this patch to modify lock type back to 'mutex' to avoid kernel calltrace issue. [ 602.668806] Workqueue: amdgpu-reset-dev amdgpu_ras_do_recovery [amdgpu] [ 602.668939] Call Trace: [ 602.668940] [ 602.668941] dump_stack_lvl+0x4c/0x70 [ 602.668945] dump_stack+0x14/0x20 [ 602.668946] __schedule_bug+0x5a/0x70 [ 602.668950] __schedule+0x940/0xb30 [ 602.668952] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.668955] ? hrtimer_reprogram+0x77/0xb0 [ 602.668957] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.668959] ? hrtimer_start_range_ns+0x126/0x370 [ 602.668961] schedule+0x39/0xe0 [ 602.668962] schedule_hrtimeout_range_clock+0xb1/0x140 [ 602.668964] ? __pfx_hrtimer_wakeup+0x10/0x10 [ 602.668966] schedule_hrtimeout_range+0x17/0x20 [ 602.668967] usleep_range_state+0x69/0x90 [ 602.668970] psp_cmd_submit_buf+0x132/0x570 [amdgpu] [ 602.669066] psp_ras_invoke+0x75/0x1a0 [amdgpu] [ 602.669156] psp_ras_query_address+0x9c/0x120 [amdgpu] [ 602.669245] umc_v12_0_update_ecc_status+0x16d/0x520 [amdgpu] [ 602.669337] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669339] ? stack_depot_save+0x12/0x20 [ 602.669342] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669343] ? set_track_prepare+0x52/0x70 [ 602.669346] ? kmemleak_alloc+0x4f/0x90 [ 602.669348] ? __kmalloc_node+0x34b/0x450 [ 602.669352] amdgpu_umc_update_ecc_status+0x23/0x40 [amdgpu] [ 602.669438] mca_umc_mca_get_err_count+0x85/0xc0 [amdgpu] [ 602.669554] mca_smu_parse_mca_error_count+0x120/0x1d0 [amdgpu] [ 602.669655] amdgpu_mca_dispatch_mca_set.part.0+0x141/0x250 [amdgpu] [ 602.669743] ? kmemleak_free+0x36/0x60 [ 602.669745] ? kvfree+0x32/0x40 [ 602.669747] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669749] ? kfree+0x15d/0x2a0 [ 602.669752] amdgpu_mca_smu_log_ras_error+0x1f6/0x210 [amdgpu] [ 602.669839] amdgpu_ras_query_error_status_helper+0x2ad/0x390 [amdgpu] [ 602.669924] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.669925] ? __call_rcu_common.constprop.0+0xa6/0x2b0 [ 602.669929] amdgpu_ras_query_error_status+0xf3/0x620 [amdgpu] [ 602.670014] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.670017] amdgpu_ras_log_on_err_counter+0xe1/0x170 [amdgpu] [ 602.670103] amdgpu_ras_do_recovery+0xd2/0x2c0 [amdgpu] [ 602.670187] ? srso_alias_return_thunk+0x5/0xfbef5 [ 602.670189] ? __schedule+0x37d/0xb30 [ 602.670191] process_one_work+0x176/0x350 [ 602.670194] worker_thread+0x2f7/0x420 [ 602.670197] ? Signed-off-by: Yang Wang Reviewed-by: YiPeng Chai Signed-off-by: Alex Deucher commit 19797687e64b961f7c5aac9cf60951561aec038e Author: Alex Deucher Date: Mon Jun 3 16:59:22 2024 -0400 drm/amdgpu: remove amdgpu_mes_fence_wait_polling() No longer used so remove it. Reviewed-by: Mukul Joshi Signed-off-by: Alex Deucher commit fffe347e14789c37d91aca47e9a25dca831b7e5a Author: Alex Deucher Date: Mon Jun 3 16:54:18 2024 -0400 drm/amdgpu: cleanup MES12 command submission The approach of having a separate WB slot for each submission doesn't really work well and for example breaks GPU reset. Use a status query packet for the fence update instead since those should always succeed we can use the fence of the original packet to signal the state of the operation. While at it cleanup the coding style. Fixes: ade887c63394 ("drm/amdgpu/mes12: Use a separate fence per transaction") Reviewed-by: Mukul Joshi Suggested-by: Christian König Signed-off-by: Alex Deucher commit 3af2c80ae2f5152ac7a3d27f7c35c038ace9e644 Author: Yang Wang Date: Fri May 31 14:01:09 2024 +0800 drm/amdgpu: refine gfx10 firmware loading refine gfx10 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 23fc94795b619bd55d7f6029b395ef951741433f Author: Yang Wang Date: Fri May 31 14:20:07 2024 +0800 drm/amdgpu: refine gfx9 firmware loading refine gfx9 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit de3246254156e7f32e5591ad0b3b740ffde8258e Author: Christian König Date: Fri May 31 10:56:00 2024 +0200 drm/amdgpu: cleanup MES11 command submission The approach of having a separate WB slot for each submission doesn't really work well and for example breaks GPU reset. Use a status query packet for the fence update instead since those should always succeed we can use the fence of the original packet to signal the state of the operation. While at it cleanup the coding style. Fixes: eef016ba8986 ("drm/amdgpu/mes11: Use a separate fence per transaction") Reviewed-by: Mukul Joshi Signed-off-by: Christian König Signed-off-by: Alex Deucher commit 6a6eda569b055b67a2c5a9dd26a9d867e3c223cc Author: Alex Deucher Date: Mon May 20 09:05:21 2024 -0400 drm/amdgpu: fix UBSAN warning in kv_dpm.c Adds bounds check for sumo_vid_mapping_entry. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3392 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 9717345d38700338203f157fb42f48ea83d7e7d3 Author: Alex Deucher Date: Mon May 20 09:11:45 2024 -0400 drm/radeon: fix UBSAN warning in kv_dpm.c Adds bounds check for sumo_vid_mapping_entry. Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit a6328c9c3df355daec1935f672e8ec9d9d391b43 Author: Christian König Date: Thu Jan 18 13:28:55 2024 +0100 drm/amdgpu: fix using the reserved VMID with gang submit We need to ensure that even when using a reserved VMID that the gang members can still run in parallel. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b32563859d6f61265222ec0f27d394964a8f7669 Author: Victor Lu Date: Fri May 31 14:59:22 2024 -0400 drm/amdgpu: Do not wait for MP0_C2PMSG_33 IFWI init in SRIOV SRIOV does not need to wait for IFWI init, and MP0_C2PMSG_33 is blocked for VF access. Signed-off-by: Victor Lu Reviewed-by: Vignesh Chander Signed-off-by: Alex Deucher commit 4b5b855c240a48c6b5a494d5ec62af9bc8f661fd Author: Li Ma Date: Thu Jun 6 20:25:34 2024 +0800 drm/amd/swsmu: add MALL init support workaround for smu_v14_0_1 [Why] SMU firmware has not supported MALL PG. [How] Disable MALL PG and make it always on until SMU firmware is ready. Signed-off-by: Li Ma Reviewed-by: Tim Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d14a7405424cfd0d0b72df30d0e4698805746de Author: Mukul Joshi Date: Fri Jun 14 17:07:58 2024 -0400 Revert "drm/amdgpu: Add missing locking for MES API calls" This reverts commit 3612702852acbded39233b1600c8d9f47e40139f. This is causing a BUG message during suspend. [ 61.603542] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 [ 61.603550] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2028, name: kworker/u64:14 [ 61.603553] preempt_count: 1, expected: 0 [ 61.603555] RCU nest depth: 0, expected: 0 [ 61.603557] Preemption disabled at: [ 61.603559] [] amdgpu_gfx_disable_kgq+0x61/0x160 [amdgpu] [ 61.603789] CPU: 9 PID: 2028 Comm: kworker/u64:14 Tainted: G W 6.8.0+ #7 [ 61.603795] Workqueue: events_unbound async_run_entry_fn [ 61.603801] Call Trace: [ 61.603803] [ 61.603806] dump_stack_lvl+0x37/0x50 [ 61.603811] ? amdgpu_gfx_disable_kgq+0x61/0x160 [amdgpu] [ 61.604007] dump_stack+0x10/0x20 [ 61.604010] __might_resched+0x16f/0x1d0 [ 61.604016] __might_sleep+0x43/0x70 [ 61.604020] mutex_lock+0x1f/0x60 [ 61.604024] amdgpu_mes_unmap_legacy_queue+0x6d/0x100 [amdgpu] [ 61.604226] gfx11_kiq_unmap_queues+0x3dc/0x430 [amdgpu] [ 61.604422] ? srso_alias_return_thunk+0x5/0xfbef5 [ 61.604429] amdgpu_gfx_disable_kgq+0x122/0x160 [amdgpu] [ 61.604621] gfx_v11_0_hw_fini+0xda/0x100 [amdgpu] [ 61.604814] gfx_v11_0_suspend+0xe/0x20 [amdgpu] [ 61.605008] amdgpu_device_ip_suspend_phase2+0x135/0x1d0 [amdgpu] [ 61.605175] amdgpu_device_suspend+0xec/0x180 [amdgpu] Signed-off-by: Mukul Joshi Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit dcf5e17c05edfa66ace6f6a521c2fcb303c82733 Author: Aric Cyr Date: Mon Jun 10 09:09:07 2024 -0400 drm/amd/display: 3.2.289 This version brings along the following: - DCN401 fixes - DPIA fixes - DML21 fixes - Misc Coverity fixes Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit 27dcb8fb92f59756ed93735baad1d3421efdb6c2 Author: Anthony Koo Date: Sat Jun 8 23:56:10 2024 -0400 drm/amd/display: [FW Promotion] Release 0.0.222.0 - Add new condition for PSR exit due to ESD recovery - Add new VB scaling feature for ABM by interpolating between existing VB parameters, allowing driver to have fine grain scaled VB levels between 0 - 250 Acked-by: Hamza Mahfooz Signed-off-by: Anthony Koo Signed-off-by: Alex Deucher commit db39d575eee8bfcfed59a370d936e1a1d6398423 Author: Alex Hung Date: Thu Jun 6 19:49:23 2024 -0600 drm/amd/display: Remove redundant null checks The null checks for aconnector and aconnector->dc_link and stream redundant as they were already dereferenced previously as reported by Coverity; therefore the null checks are removed. This fixes 4 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit a7b38c7852093385d0605aa3c8a2efd6edd1edfd Author: Alex Hung Date: Thu Jun 6 21:23:39 2024 -0600 drm/amd/display: Check UnboundedRequestEnabled's value CalculateSwathAndDETConfiguration_params_st's UnboundedRequestEnabled is a pointer (i.e. dml_bool_t *UnboundedRequestEnabled), and thus if (p->UnboundedRequestEnabled) checks its address, not bool value. This fixes 1 REVERSE_INULL issue reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 391c6fb490b069b4f7c4620675c98f2d6073e050 Author: Alex Hung Date: Fri Jun 7 10:46:35 2024 -0600 drm/amd/display: Remove redundant checks for context The null checks for context are redundant as it was already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 2 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 8a1708328c60ebc0f402edb69fb8a5509b3511b3 Author: Alex Hung Date: Fri Jun 7 10:59:55 2024 -0600 drm/amd/display: Remove redundant checks for opp The null checks for opp are redundant as they were already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 2 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 14f293e044b1ab392e6c9989bb1bc93ce1aa9ca7 Author: Alex Hung Date: Fri Jun 7 11:20:36 2024 -0600 drm/amd/display: Remove redundant null checks The null checks are redundant as they were already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 7 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 9e6da7b70be822570612da9a65cf5b23f71bcc06 Author: Ivan Lipski Date: Fri Jun 7 15:17:41 2024 -0400 drm/amd/display: Remove unused value set from 'min_hratio_fact' in dml These portions of code are flagged as 'UNUSED_VALUE' by the Coverity analysis since the assigned values of these vars are never used in the code. Reviewed-by: Alex Hung Reviewed-by: Aurabindo Pillai Acked-by: Hamza Mahfooz Signed-off-by: Ivan Lipski Signed-off-by: Alex Deucher commit f94a97117fc6e1a3a5c718ae41559cc65580df0a Author: Alex Hung Date: Thu Jun 6 14:29:55 2024 -0600 drm/amd/display: Remove redundant checks for ctx->dc_bios The null checks for ctx->dc_bios are redundant as it was already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 7 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 1a664dc0cfdf0942945aa902d0c38f37fcefbb8e Author: Alex Hung Date: Thu Jun 6 12:38:45 2024 -0600 drm/amd/display: Remove redundant checks for res_pool->dccg The null checks for res_pool->dccg are redundant as it was already dereferenced previously, as reported by Coverity; therefore the null checks are removed. This fixes 6 REVERSE_INULL issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 85fa2287458f17ee124e77f1ec49dcf769869a25 Author: Rodrigo Siqueira Date: Thu Jun 6 08:58:49 2024 -0600 drm/amd/display: Improve warning log for get OPP for OTG master If some part of the driver tries to call resource_get_opp_heads_for_otg_master in a non-OTG master context, DC will trigger a dmesg warning since this situation indicates that some configuration associated with ODM slices might be wrong. This commit adds an extra log to describe why the warning was triggered to make the debugging more straightforward. Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 26ec3cca7b1c498307d966c007bc85e0c6b8c6fa Author: Rodrigo Siqueira Date: Thu Jun 6 08:50:11 2024 -0600 drm/amd/display: Fix warning caused by an attempt to configure a non-otg master When booting the system with DCN401, the driver adds the following dmesg warning: WARNING: CPU: 8 PID: 175 at drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1923 resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu] Modules linked in: amdgpu(+) hid_generic amdxcp i2c_algo_bit drm_ttm_helper ttm drm_exec gpu_sched drm_suballoc_helper drm_buddy drm_display_helper drm_kms_helper usbhid hid drm i2c_piix4 ahci igc libahci video wmi CPU: 8 PID: 175 Comm: systemd-udevd Not tainted 6.8.0-EXTRA-PROMO-MAY-29+ #66 Hardware name: ASUS System Product Name/TUF GAMING X570-PRO (WI-FI), BIOS 4021 08/10/2021 RIP: 0010:resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu] Code: 8b 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 83 bf f8 07 00 00 00 48 89 e5 74 0c <0f> 0b 31 f6 89 f0 5d e9 0c 65 01 e5 48 83 bf e0 07 00 00 00 75 ea RSP: 0018:ffffa5f000816ed8 EFLAGS: 00010246 [...] PKRU: 55555554 Call Trace: ? show_regs+0x65/0x70 ? __warn+0x85/0x160 ? resource_get_opp_heads_for_otg_master+0x13/0x70 [amdgpu] ? report_bug+0x192/0x1c0 ? handle_bug+0x44/0x90 ? exc_invalid_op+0x18/0x70 [...] This warning is triggered by a check in the function resource_get_opp_heads_for_otg_master that validates if the request operation is in a master OTG pipe; if not, the warning above is displayed. In other words, another part of the code might be calling this function in a non-OTG master pipe context, resulting in the log message. The reason the ASSERT was triggered is that the current state wasn't updated after applying the context to the hardware. This means that the update_dsc_for_odm_change might be called from a non-OTG-MASTER. To prevent this, it's crucial to check if the current reference is pointing to an OTG master before operate in the old OTG master reference. If it's not, the function must set the old OTG reference to NULL and avoid calling resource_get_opp_heads_for_otg_master before the context is updated. Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Co-developed-by: Wenjing Liu Signed-off-by: Wenjing Liu Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b62ec97d55e34942936653dafa1542ae9cfe14e3 Author: Alex Hung Date: Wed Jun 5 10:51:37 2024 -0600 drm/amd/display: Covert integers to double before divisions Integer divisions result in loss of fractional and accuracy is lost when assigned or compared with double. It is necessary to perform double/integer instead or explicitly cast them to double. This fixes 54 UNINTENDED_INTEGER_DIVISION issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 7cf24de30e8ab875abc92a81ff227ab9e5f4282e Author: Alex Hung Date: Mon Jun 3 14:27:55 2024 -0600 drm/amd/display: Check pipe_ctx before it is used resource_get_odm_slice_count and resource_get_otg_master_for_stream can return null, and their returns must be checked before used. This fixes 4 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 470f3760cfe6dd2ce66cf9159e65876f7eb28792 Author: Alex Hung Date: Mon Jun 3 08:28:47 2024 -0600 drm/amd/display: Check dc_stream_state before it is used dc_state_get_stream_status dc_state_get_paired_subvp_stream and other functions can return null, and therefore null must be checked before status can be used. This fixes 21 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit c76f56f252455c8c7851a596a2f89be18efe43ed Author: Alvin Lee Date: Tue Jun 4 17:30:17 2024 -0400 drm/amd/display: Make sure to reprogram ODM when resync fifo Need to reconfigure ODM when resyncing FIFO because on OTG disable we clear all ODM programming Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 5af757124792817f8eb1bd0c80ad60fab519586b Author: Rodrigo Siqueira Date: Mon Jun 3 15:31:15 2024 -0600 drm/amd/display: Fix NULL pointer dereference for DTN log in DCN401 When users run the command: cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log The following NULL pointer dereference happens: [ +0.000003] BUG: kernel NULL pointer dereference, address: NULL [ +0.000005] #PF: supervisor instruction fetch in kernel mode [ +0.000002] #PF: error_code(0x0010) - not-present page [ +0.000002] PGD 0 P4D 0 [ +0.000004] Oops: 0010 [#1] PREEMPT SMP NOPTI [ +0.000003] RIP: 0010:0x0 [ +0.000008] Code: Unable to access opcode bytes at 0xffffffffffffffd6. [...] [ +0.000002] PKRU: 55555554 [ +0.000002] Call Trace: [ +0.000002] [ +0.000003] ? show_regs+0x65/0x70 [ +0.000006] ? __die+0x24/0x70 [ +0.000004] ? page_fault_oops+0x160/0x470 [ +0.000006] ? do_user_addr_fault+0x2b5/0x690 [ +0.000003] ? prb_read_valid+0x1c/0x30 [ +0.000005] ? exc_page_fault+0x8c/0x1a0 [ +0.000005] ? asm_exc_page_fault+0x27/0x30 [ +0.000012] dcn10_log_color_state+0xf9/0x510 [amdgpu] [ +0.000306] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000003] ? vsnprintf+0x2fb/0x600 [ +0.000009] dcn10_log_hw_state+0xfd0/0xfe0 [amdgpu] [ +0.000218] ? __mod_memcg_lruvec_state+0xe8/0x170 [ +0.000008] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000002] ? debug_smp_processor_id+0x17/0x20 [ +0.000003] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000002] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000002] ? set_ptes.isra.0+0x2b/0x90 [ +0.000004] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000002] ? _raw_spin_unlock+0x19/0x40 [ +0.000004] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000002] ? do_anonymous_page+0x337/0x700 [ +0.000004] dtn_log_read+0x82/0x120 [amdgpu] [ +0.000207] full_proxy_read+0x66/0x90 [ +0.000007] vfs_read+0xb0/0x340 [ +0.000005] ? __count_memcg_events+0x79/0xe0 [ +0.000002] ? srso_alias_return_thunk+0x5/0xfbef5 [ +0.000003] ? count_memcg_events.constprop.0+0x1e/0x40 [ +0.000003] ? handle_mm_fault+0xb2/0x370 [ +0.000003] ksys_read+0x6b/0xf0 [ +0.000004] __x64_sys_read+0x19/0x20 [ +0.000003] do_syscall_64+0x60/0x130 [ +0.000004] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ +0.000003] RIP: 0033:0x7fdf32f147e2 [...] This error happens when the color log tries to read the gamut remap information from DCN401 which is not initialized in the dcn401_dpp_funcs which leads to a null pointer dereference. This commit addresses this issue by adding a proper guard to access the gamut_remap callback in case the specific ASIC did not implement this function. Reviewed-by: Aurabindo Pillai Acked-by: Hamza Mahfooz Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 319d4615518c696bdc33c75f894744ce1be89dd5 Author: Sridevi Arvindekar Date: Wed Jun 5 14:44:24 2024 -0400 drm/amd/display: mirror case cleanup for cursors Mirror case unsupported for cursors. So, remove code for mirror case with cursors. Reviewed-by: Nevenko Stupar Acked-by: Hamza Mahfooz Signed-off-by: Sridevi Arvindekar Signed-off-by: Alex Deucher commit 0fd146067d1b1aa9e531c8e69357f1be46f1a17a Author: Alex Hung Date: Mon Jun 3 18:06:08 2024 -0600 drm/amd/display: Add null checker before access structs Checks null pointer before accessing various structs. This fixes 5 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 18a8f4c28884b7fb5fd3ba759c777cca693788ef Author: Laurent Pinchart Date: Mon Nov 13 11:35:23 2023 +0200 media: v4l2-subdev: Drop unreacheable warning The v4l2_subdev_link_validate_get_format() function warns if the pad given as argument belongs to a non-subdev entity. This can't happen, as the function is called from v4l2_subdev_link_validate() only (indirectly through v4l2_subdev_link_validate_locked()), and that function ensures that both ends of the link are subdevs. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit 3f98113e1d51ab410b49e2698ef31cc06abfedc5 Author: Laurent Pinchart Date: Sun May 5 20:19:45 2024 +0300 media: videobuf2: core: Drop unneeded forward declaration The static __enqueue_in_driver() function is forward-declared needlessly, as it isn't called before its definition. Drop the forward declaration. Signed-off-by: Laurent Pinchart Reviewed-by: Tomasz Figa commit 57edbbcf5258c378a9b9d0c80d33b03a010b22c8 Author: Laurent Pinchart Date: Sun May 5 20:22:27 2024 +0300 media: renesas: vsp1: Fix _irqsave and _irq mix The histogram support mixes _irqsave and _irq, causing the following smatch warning: drivers/media/platform/renesas/vsp1/vsp1_histo.c:153 histo_stop_streaming() warn: mixing irqsave and irq The histo_stop_streaming() calls spin_lock_irqsave() followed by wait_event_lock_irq(). The former hints that interrupts may be disabled by the caller, while the latter reenables interrupts unconditionally. This doesn't cause any real bug, as the function is always called with interrupts enabled, but the pattern is still incorrect. Fix the problem by using spin_lock_irq() instead of spin_lock_irqsave() in histo_stop_streaming(). While at it, switch to spin_lock_irq() and spin_lock() as appropriate elsewhere. Fixes: 99362e32332b ("[media] v4l: vsp1: Add histogram support") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-renesas-soc/164d74ff-312c-468f-be64-afa7182cd2f4@moroto.mountain/ Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit 65f3594366eb303680eae97b935fa0fc90cb7ccc Author: Jacopo Mondi Date: Mon Jun 17 18:11:34 2024 +0200 media: max9286: Use frame interval from subdev state Use the frame interval stored in the subdev state instead of storing a copy in the driver private structure. Initialize the frame interval to the special case 0/0 that in the max9286 driver represents automatic handling of frame sync. As the frame sync mode is set at s_stream() time, we can remove it from max9286_setup(). Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240617161135.130719-12-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit 33fb59ca95bedcacf8ec19b6a63102883bcc4ad5 Author: Jacopo Mondi Date: Mon Jun 17 18:11:33 2024 +0200 media: max9286: Use the subdev active state Use the subdev active state in the max9286 driver to store the image format. Replace the .open() function call with the .init_state() one and simplify the set/get_pad_fmt() operations. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240617161135.130719-11-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit b0023db63c467442bc7dec8e3a299eb10ae97dec Author: Jacopo Mondi Date: Mon Jun 17 18:11:32 2024 +0200 media: max9286: Fix enum_mbus_code The max9286 driver supports multiple output formats but only a single one is reported through the .enum_mbus_code operation. Fix that. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240617161135.130719-10-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit 3164347e24688062f68edd43c18e1f7b38cbd357 Author: Jacopo Mondi Date: Mon Jun 17 18:11:31 2024 +0200 media: adv748x-csi2: Use the subdev active state Initialize and use the subdev active state to store the subdevice format. This simplifies the implementation of the get_fmt and set_fmt pad operations. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-9-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit 61893eccf6f2f097ed66e162253a5038fd42e43f Author: Jacopo Mondi Date: Mon Jun 17 18:11:30 2024 +0200 media: adv748x-csi2: Validate the image format The adv748x-csi2 driver configures the CSI-2 transmitter to automatically infer the image stream format from the connected frontend (HDMI or AFE). Setting a new format on the subdevice hence does not actually control the CSI-2 output format, but it's only there for the purpose of pipeline validation. However, there is currently no validation that the supplied media bus code is valid and supported by the device. With the introduction of enum_mbus_codes a list of supported format is now available, use it to validate that the supplied format is correct and use the default UYVY8 one if that's not the case. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240617161135.130719-8-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit 990ef913e48f186a0b3c6bdf3dbcf779582ac7b5 Author: Jacopo Mondi Date: Mon Jun 17 18:11:29 2024 +0200 media: adv748x-afe: Use 1X16 media bus code Now that the adv748x CSI-2 transmitter driver validates the supported formats, it is required for subdevices along the pipeline to produce and consume the same media bus codes. The adv748x analog front end driver use the 2X8 variant of the UYVY8 media bus code, while the CSI-2 transmitter use the 1X16 variant, which is the correct one to use for the serial bus. Make the adv748x afe use the 1X16 format variant to maintain the pipeline validation correct. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-7-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit f6ef8e21f2688dfc5a31bb98a996271119d54e7f Author: Jacopo Mondi Date: Mon Jun 17 18:11:28 2024 +0200 media: adv748x-csi2: Implement enum_mbus_codes Define a list of supported mbus codes for the TXA and TXB CSI-2 transmitters and implement the enum_mbus_code operation. The TXB transmitter only support YUV422 while the TXA one supports multiple formats as reported by the chip's manual in section 9.7. but the HDMI and AFE subdevices only provide RGB888 and YUV422, so only list those ones here. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-6-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit a399b36ec83b2b1390f15d493fbd0db2ff467985 Author: Jacopo Mondi Date: Mon Jun 17 18:11:27 2024 +0200 media: rcar-csi2: Use the subdev active state Create the subdevice state with v4l2_subdev_init_finalize() and implement the init_state() operation to guarantee the state is initialized. Store the current image format in the subdev active state and remove it from the driver private structure. To guarantee the same image format is applied to all source pads, propagate the format from the sink pad to the sources, disallowing changing format on a source pad. To support both gen3 and gen4, which feature a different number of source pads, introduce an helper function to return the correct number of pads. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-5-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit f6d64d0d2897ed4e85ac00afe43e45c8b8fc0c44 Author: Jacopo Mondi Date: Mon Jun 17 18:11:26 2024 +0200 media: rcar-csi2: Cleanup subdevice in remove() Cleanup the V4L2 subdevice in the driver's remove function to ensure its async connection are freed, and guarantee in future that the subdev active state is cleaned up. Fixes: 769afd212b16 ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver") Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-4-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit e306183628f7c2e95f9bf853d8fcb86288f606de Author: Jacopo Mondi Date: Mon Jun 17 18:11:25 2024 +0200 media: rcar-csi2: Disable runtime_pm in probe error Disable pm_runtime in the probe() function error path. Fixes: 769afd212b16 ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver") Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-3-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit 9caf253e8ad6f4c66f5591bac900f9f68b6b6620 Author: Jacopo Mondi Date: Mon Jun 17 18:11:24 2024 +0200 media: rcar-vin: Fix YUYV8_1X16 handling for CSI-2 The YUYV8_1X16 and UYVY8_1X16 formats are treated as 'ITU-R BT.601/BT.1358 16-bit YCbCr-422 input' (YUV16 - 0x5) in the R-Car VIN driver and are thus disallowed when capturing frames from the R-Car CSI-2 interface according to the hardware manual. As the 1X16 format variants are meant to be used with serial busses they have to be treated as 'YCbCr-422 8-bit data input' (0x1) when capturing from CSI-2, which is a valid setting for CSI-2. Commit 78b3f9d75a62 ("media: rcar-vin: Add check that input interface and format are valid") disallowed capturing YUV16 when using the CSI-2 interface. Fix this by using YUV8_BT601 for YCbCr422 when CSI-2 is in use. Fixes: 78b3f9d75a62 ("media: rcar-vin: Add check that input interface and format are valid") Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240617161135.130719-2-jacopo.mondi@ideasonboard.com Signed-off-by: Laurent Pinchart commit e86cac0acdb1a74f608bacefe702f2034133a047 Author: Konstantin Andreev Date: Mon Jun 17 01:44:30 2024 +0300 smack: unix sockets: fix accept()ed socket label When a process accept()s connection from a unix socket (either stream or seqpacket) it gets the socket with the label of the connecting process. For example, if a connecting process has a label 'foo', the accept()ed socket will also have 'in' and 'out' labels 'foo', regardless of the label of the listener process. This is because kernel creates unix child sockets in the context of the connecting process. I do not see any obvious way for the listener to abuse alien labels coming with the new socket, but, to be on the safe side, it's better fix new socket labels. Signed-off-by: Konstantin Andreev Signed-off-by: Casey Schaufler commit 94ff46de4a738e7916b68ab5cc0b0380729f02af Author: James Gowans Date: Wed Jun 19 11:55:55 2024 +0200 memblock: Move late alloc warning down to phys alloc If a driver/subsystem tries to do an allocation after the memblock allocations have been freed and the memory handed to the buddy allocator, it will not actually be legal to use that allocation: the buddy allocator owns the memory. Currently this mis-use is handled by the memblock function which does allocations and returns virtual addresses by printing a warning and doing a kmalloc instead. However the physical allocation function does not to do this check - callers of the physical alloc function are unprotected against mis-use. Improve the error catching here by moving the check into the physical allocation function which is used by the virtual addr allocation function. Signed-off-by: James Gowans Cc: Mike Rapoport Cc: Andrew Morton Cc: Alex Graf Link: https://lore.kernel.org/r/20240619095555.85980-1-jgowans@amazon.com Signed-off-by: Mike Rapoport (IBM) commit d9d814eebb1ae9742e7fd7f39730653b16326bd4 Author: Steven Rostedt (Google) Date: Thu Jun 13 11:55:08 2024 -0400 pstore/ramoops: Add ramoops.mem_name= command line option Add a method to find a region specified by reserve_mem=nn:align:name for ramoops. Adding a kernel command line parameter: reserve_mem=12M:4096:oops ramoops.mem_name=oops Will use the size and location defined by the memmap parameter where it finds the memory and labels it "oops". The "oops" in the ramoops option is used to search for it. This allows for arbitrary RAM to be used for ramoops if it is known that the memory is not cleared on kernel crashes or soft reboots. Tested-by: Guilherme G. Piccoli Signed-off-by: Steven Rostedt (Google) Acked-by: Kees Cook Link: https://lore.kernel.org/r/20240613155527.591647061@goodmis.org Signed-off-by: Mike Rapoport (IBM) commit 6bc9199d0c84f5cd72922223231c7708698059a2 Author: Gabriel Krisman Bertazi Date: Tue Jun 18 22:06:19 2024 -0400 io_uring: Allocate only necessary memory in io_probe We write at most IORING_OP_LAST entries in the probe buffer, so we don't need to allocate temporary space for more than that. As a side effect, we no longer can overflow "size". Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20240619020620.5301-3-krisman@suse.de Signed-off-by: Jens Axboe commit 3e05b222382ec67dce7358d50b6006e91d028d8b Author: Gabriel Krisman Bertazi Date: Tue Jun 18 22:06:18 2024 -0400 io_uring: Fix probe of disabled operations io_probe checks io_issue_def->not_supported, but we never really set that field, as we mark non-supported functions through a specific ->prep handler. This means we end up returning IO_URING_OP_SUPPORTED, even for disabled operations. Fix it by just checking the prep handler itself. Fixes: 66f4af93da57 ("io_uring: add support for probing opcodes") Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20240619020620.5301-2-krisman@suse.de Signed-off-by: Jens Axboe commit c7cfe9bfceb7a959f04d75a0fa805314bf2a0c6f Author: Mario Limonciello Date: Tue Jun 18 16:42:25 2024 -0500 ACPI: processor: Downgrade Intel _OSC and _PDC messages to debug Commit 95272641338a ("ACPI: processor: Use _OSC to convey OSPM processor support information") introduced messages related to determining processor support from the firmware. The UUID 4077A616-290C-47BE-9EBD-D87058713953 and _PDC methods are only used on Intel platforms, but all X86 platforms emit the messages. Attempting to evaluate them and showing messages on which are used is unnecessary for most users. Downgrade the messages to debug instead. Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20240618214225.50953-1-mario.limonciello@amd.com Signed-off-by: Rafael J. Wysocki commit b9578c49456340ca4d3c7ddbaca054ffc2b51bc1 Author: Barry Song Date: Thu Jun 6 14:02:13 2024 +1200 dma-buf/heaps: Correct the types of fd_flags and heap_flags dma_heap_allocation_data defines the UAPI as follows: struct dma_heap_allocation_data { __u64 len; __u32 fd; __u32 fd_flags; __u64 heap_flags; }; But dma heaps are casting both fd_flags and heap_flags into unsigned long. This patch makes dma heaps - cma heap and system heap have consistent types with UAPI. Signed-off-by: Barry Song Acked-by: John Stultz Reviewed-by: Carlos Llamas Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20240606020213.49854-1-21cnbao@gmail.com commit 22c0a46a0d9731566ec05813f15dc22cf1096b3a Author: José Expósito Date: Fri Jun 14 18:16:06 2024 +0200 HID: uclogic: Add module description Not having it triggers a warning: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-uclogic.o Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit f4ceb2a044f653344ea52c79d775fb876dfb1d1c Author: José Expósito Date: Fri Jun 14 18:16:05 2024 +0200 HID: uclogic: Avoid linking common code into multiple modules The hid-uclogic-params.o and hid-uclogic-rdesc.o files are linked into both the driver module and the unit test, which triggers a W=1 warning: scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-rdesc.o is added to multiple modules: hid-uclogic hid-uclogic-test scripts/Makefile.build:236: drivers/hid/Makefile: hid-uclogic-params.o is added to multiple modules: hid-uclogic hid-uclogic-test Avoids this by moving these two files into a separate module that is used by the driver and the unit test. Reported-by: Arnd Bergmann Acked-by: Arnd Bergmann Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit 253ec89c9013b0e61f5c54344df7c065d54934d1 Author: Karthikeyan Periyasamy Date: Thu Jun 13 21:08:13 2024 +0530 wifi: ath12k: fix mbssid max interface advertisement The Current method for advertising the maximum MBSSID interface count assumes single radio per wiphy (multi wiphy model). However, this assumption is incorrect for multi radio per wiphy (single wiphy model). Therefore, populate the parameter for each radio present in the MAC abstraction layer (ah). This approach ensure scalability for both single wiphy and multi wiphy models. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: 519a545cfee7 ("wifi: ath12k: advertise driver capabilities for MBSSID and EMA") Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240613153813.3509837-1-quic_periyasa@quicinc.com commit db163a463bb93cd3e37e1e7b10b9726fb6f95857 Author: Ajith C Date: Thu Jun 13 11:05:28 2024 +0530 wifi: ath12k: fix firmware crash due to invalid peer nss Currently, if the access point receives an association request containing an Extended HE Capabilities Information Element with an invalid MCS-NSS, it triggers a firmware crash. This issue arises when EHT-PHY capabilities shows support for a bandwidth and MCS-NSS set for that particular bandwidth is filled by zeros and due to this, driver obtains peer_nss as 0 and sending this value to firmware causes crash. Address this issue by implementing a validation step for the peer_nss value before passing it to the firmware. If the value is greater than zero, proceed with forwarding it to the firmware. However, if the value is invalid, reject the association request to prevent potential firmware crashes. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ajith C Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240613053528.2541645-1-quic_ajithc@quicinc.com commit 69c34f07e45f2d52d9a41991867a1e5a85bbaaf3 Merge: 465478bb00168 339d3948c07b4 Author: Jens Axboe Date: Wed Jun 19 08:02:34 2024 -0600 Merge branch 'for-6.11/block-limits' into for-6.11/block Merge in last round of queue limits changes from Christoph. * for-6.11/block-limits: (26 commits) block: move the bounce flag into the features field block: move the skip_tagset_quiesce flag to queue_limits block: move the pci_p2pdma flag to queue_limits block: move the zone_resetall flag to queue_limits block: move the zoned flag into the features field block: move the poll flag to queue_limits block: move the dax flag to queue_limits block: move the nowait flag to queue_limits block: move the synchronous flag to queue_limits block: move the stable_writes flag to queue_limits block: move the io_stat flag setting to queue_limits block: move the add_random flag to queue_limits block: move the nonrot flag to queue_limits block: move cache control settings out of queue->flags block: remove blk_flush_policy block: freeze the queue in queue_attr_store nbd: move setting the cache control flags to __nbd_set_size virtio_blk: remove virtblk_update_cache_mode loop: fold loop_update_rotational into loop_reconfigure_limits loop: also use the default block size from an underlying block device ... Signed-off-by: Jens Axboe commit 3005c63a3673eaf3202b2e0c951e5092539bf758 Author: Pradeep Kumar Chitrapu Date: Wed Jun 12 15:53:36 2024 -0700 wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities Currently SMPS configuration failed when the Information Elements (IEs) did not contain HT or 6 GHz capabilities. This caused legacy peer association to fail as legacy peers do not have HT or 6 GHz capabilities. Fix this by not returning an error when SMPS configuration fails due to the absence of HT or 6 GHz capabilities. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration") Reported-by: Aditya Kumar Singh Reported-by: Zachary Smith Closes: https://lore.kernel.org/all/CAM=znoFPcXrn5GhDmDmo50Syic3-hXpWvD+vkv8KX5o_ZTo8kQ@mail.gmail.com/ Signed-off-by: Pradeep Kumar Chitrapu Reported-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240612225336.2303119-1-quic_pradeepc@quicinc.com commit 19b77e7c656a3e125319cc3ef347b397cf042bf6 Author: Aaradhana Sahu Date: Tue Jun 11 08:40:17 2024 +0530 wifi: ath12k: fix uninitialize symbol error on ath12k_peer_assoc_h_he() Smatch throws following errors drivers/net/wireless/ath/ath12k/mac.c:1922 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'. drivers/net/wireless/ath/ath12k/mac.c:1922 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_160'. drivers/net/wireless/ath/ath12k/mac.c:1924 ath12k_peer_assoc_h_he() error: uninitialized symbol 'rx_mcs_80'. In ath12k_peer_assoc_h_he() rx_mcs_80 and rx_mcs_160 variables remain uninitialized in the following conditions: 1. Whenever the value of mcs_80 become equal to IEEE80211_HE_MCS_NOT_SUPPORTED then rx_mcs_80 remains uninitialized. 2. Whenever phy capability is not supported 160 channel width and value of mcs_160 become equal to IEEE80211_HE_MCS_NOT_SUPPORTED then rx_mcs_160 remains uninitialized. Initialize these variables during declaration. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240611031017.297927-3-quic_aarasahu@quicinc.com commit 59ca26c9a6e844204d25299774caa5441c0e68eb Author: Aaradhana Sahu Date: Tue Jun 11 08:40:16 2024 +0530 wifi: ath12k: fix NULL pointer access in ath12k_mac_op_get_survey() Smatch throws below error drivers/net/wireless/ath/ath12k/mac.c:8318 ath12k_mac_op_get_survey() error: we previously assumed 'sband' could be null Currently, we access sband inside the null check of the sband in ath12k_mac_op_get_survey(). Fix this issue by removing the entire if block, because decrement idx is unnecessary since there are no more band to test. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: 70e3be54bbdd ("wifi: ath12k: fix survey dump collection in 6 GHz") Signed-off-by: Aaradhana Sahu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240611031017.297927-2-quic_aarasahu@quicinc.com commit aadeee47e9d7ae98f7116f63fa63fcceffffc65c Author: Lingbo Kong Date: Sat Mar 9 20:11:29 2024 +0800 wifi: ath11k: modify the calculation of the average signal strength in station mode Currently, the calculation of the average signal strength in station mode is incorrect. This is because before calculating the average signal strength, ath11k need to determine whether the hardware and firmware support db2dbm, if the hardware and firmware support db2dbm, do not need to add noise floor, otherwise, need to add noise floor. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Lingbo Kong Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240309121129.5379-1-quic_lingbok@quicinc.com commit 94f228ac4f5b8c22f83865e51d3346c2d44d370d Author: Lingbo Kong Date: Tue Jun 11 10:25:50 2024 +0800 wifi: ath11k: fix ack signal strength calculation Currently, the calculation of ack signal strength is incorrect. This is because before calculating the ack signal strength, ath11k need to determine whether the hardware and firmware support db2dbm. If the hardware and firmware support db2dbm, do not need to add noise floor, otherwise, need to add noise floor. Besides, the value of ack_rssi passed by firmware to ath11k should be a signed number, so change its type to s8. After that, "iw wlan0 station dump" show the correct ack signal strength. Such as: root@CDCCSTEX0799733-LIN:~# iw wlp88s0 station dump Station 00:03:7f:12:df:df (on wlp88s0) inactive time: 75 ms rx bytes: 11599 rx packets: 99 tx bytes: 9029 tx packets: 81 tx retries: 4 tx failed: 0 rx drop misc: 2 signal: -16 dBm signal avg: -24 dBm tx bitrate: 1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4 tx duration: 9230 us rx bitrate: 1560.0 MBit/s VHT-MCS 9 80MHz VHT-NSS 4 rx duration: 7201 us last ack signal:-23 dBm avg ack signal: -22 dBm Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Lingbo Kong Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240611022550.59078-1-quic_lingbok@quicinc.com commit 602f09f4029c7b5e1a2f44a7651ac8922a904a1b Author: Zhang Yi Date: Tue Jun 18 22:21:12 2024 +0800 iomap: don't increase i_size in iomap_write_end() This reverts commit '0841ea4a3b41 ("iomap: keep on increasing i_size in iomap_write_end()")'. After xfs could zero out the tail blocks aligned to the allocation unitsize and convert the tail blocks to unwritten for realtime inode on truncate down, it couldn't expose any stale data when unaligned truncate down realtime inodes, so we could keep on keeping i_size for IOMAP_UNSHARE and IOMAP_ZERO in iomap_write_end(). Signed-off-by: Zhang Yi Link: https://lore.kernel.org/r/20240618142112.1315279-3-yi.zhang@huaweicloud.com Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Christian Brauner commit 339d3948c07b4aa2940aeb874294a7d6782cec16 Author: Christoph Hellwig Date: Mon Jun 17 08:04:53 2024 +0200 block: move the bounce flag into the features field Move the bounce flag into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-27-hch@lst.de Signed-off-by: Jens Axboe commit d048945150b798147b324f05f7e8c857772b0d3f Author: Zhang Yi Date: Tue Jun 18 22:21:11 2024 +0800 xfs: reserve blocks for truncating large realtime inode When unaligned truncate down a big realtime file, xfs_truncate_page() only zeros out the tail EOF block, __xfs_bunmapi() should split the tail written extent and convert the later one that beyond EOF block to unwritten, but it couldn't work as expected now since the reserved block is zero in xfs_setattr_size(), this could expose stale data just after commit '943bc0882ceb ("iomap: don't increase i_size if it's not a write operation")'. If we truncate file that contains a large enough written extent: |< rxext >|< rtext >| ...WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW ^ (new EOF) ^ old EOF Since we only zeros out the tail of the EOF block, and xfs_itruncate_extents()->..->__xfs_bunmapi() unmap the whole ailgned extents, it becomes this state: |< rxext >| ...WWWzWWWWWWWWWWWWW ^ new EOF Then if we do an extending write like this, the blocks in the previous tail extent becomes stale: |< rxext >| ...WWWzSSSSSSSSSSSSS..........WWWWWWWWWWWWWWWWW ^ old EOF ^ append start ^ new EOF Fix this by reserving XFS_DIOSTRAT_SPACE_RES blocks for big realtime inode. Signed-off-by: Zhang Yi Link: https://lore.kernel.org/r/20240618142112.1315279-2-yi.zhang@huaweicloud.com Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Christian Brauner commit 8c8f5c85b20d0a7dc0ab9b2a17318130d69ceb5a Author: Christoph Hellwig Date: Mon Jun 17 08:04:52 2024 +0200 block: move the skip_tagset_quiesce flag to queue_limits Move the skip_tagset_quiesce flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-26-hch@lst.de Signed-off-by: Jens Axboe commit 9c1e42e3c876c66796eda23e79836a4d92613a61 Author: Christoph Hellwig Date: Mon Jun 17 08:04:51 2024 +0200 block: move the pci_p2pdma flag to queue_limits Move the pci_p2pdma flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-25-hch@lst.de Signed-off-by: Jens Axboe commit a52758a39768f441e468a41da6c15a59d6d6011a Author: Christoph Hellwig Date: Mon Jun 17 08:04:50 2024 +0200 block: move the zone_resetall flag to queue_limits Move the zone_resetall flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-24-hch@lst.de Signed-off-by: Jens Axboe commit b1fc937a55f5735b98d9dceae5bb6ba262501f56 Author: Christoph Hellwig Date: Mon Jun 17 08:04:49 2024 +0200 block: move the zoned flag into the features field Move the zoned flags into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-23-hch@lst.de Signed-off-by: Jens Axboe commit 8023e144f9d6e35f8786937e2f0c2fea0aba6dbc Author: Christoph Hellwig Date: Mon Jun 17 08:04:48 2024 +0200 block: move the poll flag to queue_limits Move the poll flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Stacking drivers are simplified in that they now can simply set the flag, and blk_stack_limits will clear it when the features is not supported by any of the underlying devices. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-22-hch@lst.de Signed-off-by: Jens Axboe commit f467fee48da4500786e145489787b37adae317c3 Author: Christoph Hellwig Date: Mon Jun 17 08:04:47 2024 +0200 block: move the dax flag to queue_limits Move the dax flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-21-hch@lst.de Signed-off-by: Jens Axboe commit f76af42f8bf13d2620084f305f01691de9238fc7 Author: Christoph Hellwig Date: Mon Jun 17 08:04:46 2024 +0200 block: move the nowait flag to queue_limits Move the nowait flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Stacking drivers are simplified in that they now can simply set the flag, and blk_stack_limits will clear it when the features is not supported by any of the underlying devices. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-20-hch@lst.de Signed-off-by: Jens Axboe commit aadd5c59c910427c0464c217d5ed588ff14e2502 Author: Christoph Hellwig Date: Mon Jun 17 08:04:45 2024 +0200 block: move the synchronous flag to queue_limits Move the synchronous flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-19-hch@lst.de Signed-off-by: Jens Axboe commit 1a02f3a73f8c670eddeb44bf52a75ae7f67cfc11 Author: Christoph Hellwig Date: Mon Jun 17 08:04:44 2024 +0200 block: move the stable_writes flag to queue_limits Move the stable_writes flag into the queue_limits feature field so that it can be set atomically with the queue frozen. The flag is now inherited by blk_stack_limits, which greatly simplifies the code in dm, and fixed md which previously did not pass on the flag set on lower devices. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-18-hch@lst.de Signed-off-by: Jens Axboe commit cdb2497918cc2929691408bac87b58433b45b6d3 Author: Christoph Hellwig Date: Mon Jun 17 08:04:43 2024 +0200 block: move the io_stat flag setting to queue_limits Move the io_stat flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Simplify md and dm to set the flag unconditionally instead of avoiding setting a simple flag for cases where it already is set by other means, which is a bit pointless. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-17-hch@lst.de Signed-off-by: Jens Axboe commit 39a9f1c334f9f27b3b3e6d0005c10ed667268346 Author: Christoph Hellwig Date: Mon Jun 17 08:04:42 2024 +0200 block: move the add_random flag to queue_limits Move the add_random flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Note that this also removes code from dm to clear the flag based on the underlying devices, which can't be reached as dm devices will always start out without the flag set. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-16-hch@lst.de Signed-off-by: Jens Axboe commit bd4a633b6f7c3c6b6ebc1a07317643270e751a94 Author: Christoph Hellwig Date: Mon Jun 17 08:04:41 2024 +0200 block: move the nonrot flag to queue_limits Move the nonrot flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Use the chance to switch to defaulting to non-rotational and require the driver to opt into rotational, which matches the polarity of the sysfs interface. For the z2ram, ps3vram, 2x memstick, ubiblock and dcssblk the new rotational flag is not set as they clearly are not rotational despite this being a behavior change. There are some other drivers that unconditionally set the rotational flag to keep the existing behavior as they arguably can be used on rotational devices even if that is probably not their main use today (e.g. virtio_blk and drbd). The flag is automatically inherited in blk_stack_limits matching the existing behavior in dm and md. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-15-hch@lst.de Signed-off-by: Jens Axboe commit 1122c0c1cc71f740fa4d5f14f239194e06a1d5e7 Author: Christoph Hellwig Date: Mon Jun 17 08:04:40 2024 +0200 block: move cache control settings out of queue->flags Move the cache control settings into the queue_limits so that the flags can be set atomically with the device queue frozen. Add new features and flags field for the driver set flags, and internal (usually sysfs-controlled) flags in the block layer. Note that we'll eventually remove enough field from queue_limits to bring it back to the previous size. The disable flag is inverted compared to the previous meaning, which means it now survives a rescan, similar to the max_sectors and max_discard_sectors user limits. The FLUSH and FUA flags are now inherited by blk_stack_limits, which simplified the code in dm a lot, but also causes a slight behavior change in that dm-switch and dm-unstripe now advertise a write cache despite setting num_flush_bios to 0. The I/O path will handle this gracefully, but as far as I can tell the lack of num_flush_bios and thus flush support is a pre-existing data integrity bug in those targets that really needs fixing, after which a non-zero num_flush_bios should be required in dm for targets that map to underlying devices. Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-14-hch@lst.de Signed-off-by: Jens Axboe commit 70905f8706b62113ae32c8df721384ff6ffb6c6a Author: Christoph Hellwig Date: Mon Jun 17 08:04:39 2024 +0200 block: remove blk_flush_policy Fold blk_flush_policy into the only caller to prepare for pending changes to it. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617060532.127975-13-hch@lst.de Signed-off-by: Jens Axboe commit af2814149883e2c1851866ea2afcd8eadc040f79 Author: Christoph Hellwig Date: Mon Jun 17 08:04:38 2024 +0200 block: freeze the queue in queue_attr_store queue_attr_store updates attributes used to control generating I/O, and can cause malformed bios if changed with I/O in flight. Freeze the queue in common code instead of adding it to almost every attribute. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617060532.127975-12-hch@lst.de Signed-off-by: Jens Axboe commit 6b377787a306253111404325aee98005b361e59a Author: Christoph Hellwig Date: Mon Jun 17 08:04:37 2024 +0200 nbd: move setting the cache control flags to __nbd_set_size Move setting the cache control flags in nbd in preparation for moving these flags into the queue_limits structure. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Josef Bacik Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-11-hch@lst.de Signed-off-by: Jens Axboe commit bbe5c84122b35c37f2706872fe34da66f0854b56 Author: Christoph Hellwig Date: Mon Jun 17 08:04:36 2024 +0200 virtio_blk: remove virtblk_update_cache_mode virtblk_update_cache_mode boils down to a single call to blk_queue_write_cache. Remove it in preparation for moving the cache control flags into the queue_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617060532.127975-10-hch@lst.de Signed-off-by: Jens Axboe commit 97dd4a43d69b74a114be466d6887e257971adfe9 Author: Christoph Hellwig Date: Mon Jun 17 08:04:35 2024 +0200 loop: fold loop_update_rotational into loop_reconfigure_limits This prepares for moving the rotational flag into the queue_limits and also fixes it for the case where the loop device is backed by a block device. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240617060532.127975-9-hch@lst.de Signed-off-by: Jens Axboe commit 4ce37fe0938b02b7b947029c40b72d76a22a3882 Author: Christoph Hellwig Date: Mon Jun 17 08:04:34 2024 +0200 loop: also use the default block size from an underlying block device Fix the code in loop_reconfigure_limits to pick a default block size for O_DIRECT file descriptors to also work when the loop device sits on top of a block device and not just on a regular file on a block device based file system. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240617060532.127975-8-hch@lst.de Signed-off-by: Jens Axboe commit a17ece76bcfe7b86327b19cae1652d7c62068a30 Author: Christoph Hellwig Date: Mon Jun 17 08:04:33 2024 +0200 loop: regularize upgrading the block size for direct I/O The LOOP_CONFIGURE path automatically upgrades the block size to that of the underlying file for O_DIRECT file descriptors, but the LOOP_SET_BLOCK_SIZE path does not. Fix this by lifting the code to pick the block size into common code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20240617060532.127975-7-hch@lst.de Signed-off-by: Jens Axboe commit ae0d40ff49642651f969883ef9fc79d69c1632d7 Author: Christoph Hellwig Date: Mon Jun 17 08:04:32 2024 +0200 loop: always update discard settings in loop_reconfigure_limits Simplify loop_reconfigure_limits by always updating the discard limits. This adds a little more work to loop_set_block_size, but doesn't change the outcome as the discard flag won't change. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240617060532.127975-6-hch@lst.de Signed-off-by: Jens Axboe commit c9055b44abe60da69aa4ee4fdcb78ee7fe733335 Author: Christoph Hellwig Date: Mon Jun 17 08:04:31 2024 +0200 loop: stop using loop_reconfigure_limits in __loop_clr_fd __loop_clr_fd wants to clear all settings on the device. Prepare for moving more settings into the block limits by open coding loop_reconfigure_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240617060532.127975-5-hch@lst.de Signed-off-by: Jens Axboe commit 308ad58af49d6c4c3b7a36b98972cc9db4d7b36a Author: Christoph Hellwig Date: Mon Jun 17 08:04:30 2024 +0200 sd: move zone limits setup out of sd_read_block_characteristics Move a bit of code that sets up the zone flag and the write granularity into sd_zbc_read_zones to be with the rest of the zoned limits. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-4-hch@lst.de Signed-off-by: Jens Axboe commit be60e7700e6df1e16a2f60f45bece08e6140a46d Author: Christoph Hellwig Date: Mon Jun 17 08:04:29 2024 +0200 sd: remove sd_is_zoned Since commit 7437bb73f087 ("block: remove support for the host aware zone model"), only ZBC devices expose a zoned access model. sd_is_zoned is used to check for that and thus return false for host aware devices. Replace the helper with the simple open coded TYPE_ZBC check to fix this. Fixes: 7437bb73f087 ("block: remove support for the host aware zone model") Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617060532.127975-3-hch@lst.de Signed-off-by: Jens Axboe commit dd9300e9eaeeb212f77ffeb72d1d8756107f1f1f Author: Christoph Hellwig Date: Mon Jun 17 08:04:28 2024 +0200 xen-blkfront: don't disable cache flushes when they fail blkfront always had a robust negotiation protocol for detecting a write cache. Stop simply disabling cache flushes in the block layer as the flags handling is moving to the atomic queue limits API that needs user context to freeze the queue for that. Instead handle the case of the feature flags cleared inside of blkfront. This removes old debug code to check for such a mismatch which was previously impossible to hit, including the check for passthrough requests that blkfront never used to start with. Signed-off-by: Christoph Hellwig Acked-by: Roger Pau Monné Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240617060532.127975-2-hch@lst.de Signed-off-by: Jens Axboe commit a7ca193bc9b6be34dd7c22106c01034f2e77e220 Author: Darrick J. Wong Date: Fri Jun 14 14:43:47 2024 -0700 Documentation: the design of iomap and how to port Capture the design of iomap and how to port filesystems to use it. Apologies for all the rst formatting, but it's necessary to distinguish code from regular text. A lot of this has been collected from various email conversations, code comments, commit messages, my own understanding of iomap, and Ritesh/Luis' previous efforts to create a document. Please note a large part of this has been taken from Dave's reply to last iomap doc patchset. Thanks to Ritesh, Luis, Dave, Darrick, Matthew, Christoph and other iomap developers who have taken time to explain the iomap design in various emails, commits, comments etc. Cc: Dave Chinner Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Christian Brauner Cc: Ojaswin Mujoo Cc: Jan Kara Cc: Luis Chamberlain Inspired-by: Ritesh Harjani (IBM) Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/20240614214347.GK6125@frogsfrogsfrogs Signed-off-by: Christian Brauner commit af4eb6f46f440a98f303cfc34bf5b1f2e108367e Author: Ritesh Harjani (IBM) Date: Tue May 7 14:25:43 2024 +0530 iomap: Optimize iomap_read_folio iomap_readpage_iter() handles "uptodate blocks" and "not uptodate blocks" within a folio separately. This makes iomap_read_folio() to call into ->iomap_begin() to request for extent mapping even though it might already have an extent which is not fully processed. This happens when we either have a large folio or with bs < ps. In these cases we can have sub blocks which can be uptodate (say for e.g. due to previous writes). With iomap_read_folio_iter(), this is handled more efficiently by not calling ->iomap_begin() call until all the sub blocks with the current folio are processed. iomap_read_folio_iter() handles multiple sub blocks within a given folio but it's implementation logic is similar to how iomap_readahead_iter() handles multiple folios within a single mapped extent. Both of them iterate over a given range of folio/mapped extent and call iomap_readpage_iter() for reading. Signed-off-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/92ae9f3333c9a7e66214568d08f45664261c899c.1715067055.git.ritesh.list@gmail.com Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara cc: Ojaswin Mujoo Signed-off-by: Christian Brauner commit ff140cc8628abfb1755691d16cfa8788d8820ef7 Author: Gabriel Krisman Bertazi Date: Fri Jun 14 12:30:47 2024 -0400 io_uring: Introduce IORING_OP_LISTEN IORING_OP_LISTEN provides the semantic of listen(2) via io_uring. While this is an essentially synchronous system call, the main point is to enable a network path to execute fully with io_uring registered and descriptorless files. Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20240614163047.31581-4-krisman@suse.de Signed-off-by: Jens Axboe commit 7481fd93fa0a851740e26026485f56a1305454ce Author: Gabriel Krisman Bertazi Date: Fri Jun 14 12:30:46 2024 -0400 io_uring: Introduce IORING_OP_BIND IORING_OP_BIND provides the semantic of bind(2) via io_uring. While this is an essentially synchronous system call, the main point is to enable a network path to execute fully with io_uring registered and descriptorless files. Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20240614163047.31581-3-krisman@suse.de Signed-off-by: Jens Axboe commit bb6aaf736680f0f3c2e6281735c47c64e2042819 Author: Gabriel Krisman Bertazi Date: Fri Jun 14 12:30:45 2024 -0400 net: Split a __sys_listen helper for io_uring io_uring holds a reference to the file and maintains a sockaddr_storage address. Similarly to what was done to __sys_connect_file, split an internal helper for __sys_listen in preparation to support an io_uring listen command. Reviewed-by: Jens Axboe Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Kuniyuki Iwashima Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240614163047.31581-2-krisman@suse.de Signed-off-by: Jens Axboe commit dc2e77979412d289df9049d8c693761db8602867 Author: Gabriel Krisman Bertazi Date: Fri Jun 14 12:30:44 2024 -0400 net: Split a __sys_bind helper for io_uring io_uring holds a reference to the file and maintains a sockaddr_storage address. Similarly to what was done to __sys_connect_file, split an internal helper for __sys_bind in preparation to supporting an io_uring bind command. Reviewed-by: Jens Axboe Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Kuniyuki Iwashima Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240614163047.31581-1-krisman@suse.de Signed-off-by: Jens Axboe commit 465478bb00168a7620788990b1679c5067d421f2 Author: Jeff Johnson Date: Mon Jun 17 18:13:34 2024 -0700 z2ram: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/z2ram.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617-md-m68k-drivers-block-v1-3-b200599a315e@quicinc.com Signed-off-by: Jens Axboe commit ba8df22e25e7e906254f4f490d7bcfbe637152aa Author: Jeff Johnson Date: Mon Jun 17 18:13:33 2024 -0700 ataflop: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/ataflop.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617-md-m68k-drivers-block-v1-2-b200599a315e@quicinc.com Signed-off-by: Jens Axboe commit 28d8c13830cc530996157e22ecf22def90cb7f35 Author: Jeff Johnson Date: Mon Jun 17 18:13:32 2024 -0700 amiflop: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/block/amiflop.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240617-md-m68k-drivers-block-v1-1-b200599a315e@quicinc.com Signed-off-by: Jens Axboe commit fe1ff61487ace69cd4e680e36169c90667eb9624 Author: Jack Yu Date: Wed Jun 19 05:53:42 2024 +0000 ASoC: rt1318: Add RT1318 audio amplifier driver This is the initial i2s-based amplifier driver for rt1318. Signed-off-by: Jack Yu Link: https://msgid.link/r/b3055442ce6d4994aa01aa1fad6ba1fe@realtek.com Signed-off-by: Mark Brown commit 78b05172b42d14a4c6fc6b75b31590b8977900dc Author: Amit Kumar Mahapatra Date: Mon Jun 17 21:08:37 2024 +0530 spi: spi-cadence: Enable spi refclk in slave mode When spi-cadence is configured as a slave, it requires the SPI refclk to detect the synchronization start condition while communicating with the master. However, the spi-cadence driver never enables the SPI refclk in slave mode, causing the refclk to remain disabled if the "clk_ignore_unused" kernel parameter is not passed through bootargs. As a result, the slave cannot detect data sent by the master, leading to communication failure. Update driver to enable the SPI refclk in both master and slave configurations. Fixes: b1b90514eaa3 ("spi: spi-cadence: Add support for Slave mode") Signed-off-by: Amit Kumar Mahapatra Link: https://msgid.link/r/20240617153837.29861-1-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit 6469267afed4ffb9d16ce8c44a2b518b9b31c215 Author: Kuninori Morimoto Date: Wed Jun 19 01:00:23 2024 +0000 ASoC: dt-bindings: ak4619: Add initial DT binding Add Asahi Kasei ak4619 audio codec bindings. Signed-off-by: Kuninori Morimoto Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/87h6dpwxug.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ca73d314363d6682b6c736ea45e3a4ca551923a6 Author: Khanh Le Date: Wed Jun 19 00:59:36 2024 +0000 ASoC: Add ak4619 codec support Add support for the Asahi Kasei AK4619 audio codec. [Kuninori cleanuped and adjusted to upstream code] Signed-off-by: Khanh Le Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87iky5wxvr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3d49ee2127c26fd2c77944fd2e3168c057f99439 Author: Matthias Schiffer Date: Tue Jun 18 09:17:13 2024 +0200 net: dsa: mt7530: add support for bridge port isolation Remove a pair of ports from the port matrix when both ports have the isolated flag set. Signed-off-by: Matthias Schiffer Reviewed-by: Wojciech Drewek Reviewed-by: Arınç ÜNAL Tested-by: Arınç ÜNAL Signed-off-by: David S. Miller commit c25c961fc7f36682f0a530150f1b7453ebc344cd Author: Matthias Schiffer Date: Tue Jun 18 09:17:12 2024 +0200 net: dsa: mt7530: factor out bridge join/leave logic As preparation for implementing bridge port isolation, move the logic to add and remove bits in the port matrix into a new helper mt7530_update_port_member(), which is called from mt7530_port_bridge_join() and mt7530_port_bridge_leave(). Another part of the preparation is using dsa_port_offloads_bridge_dev() instead of dsa_port_offloads_bridge() to check for bridge membership, as we don't have a struct dsa_bridge in mt7530_port_bridge_flags(). The port matrix setting is slightly streamlined, now always first setting the mt7530_port's pm field and then writing the port matrix from that field into the hardware register, instead of duplicating the bit manipulation for both the struct field and the register. mt7530_port_bridge_join() was previously using |= to update the port matrix with the port bitmap, which was unnecessary, as pm would only have the CPU port set before joining a bridge; a simple assignment can be used for both joining and leaving (and will also work when individual bits are added/removed in port_bitmap with regard to the previous port matrix, which is what happens with port isolation). No functional change intended. Signed-off-by: Matthias Schiffer Reviewed-by: Wojciech Drewek Reviewed-by: Arınç ÜNAL Tested-by: Arınç ÜNAL Signed-off-by: David S. Miller commit 8e7455dd0dedf88332f249f8b1e50bc554e4c1e3 Author: Michal Wajdeczko Date: Tue Jun 18 12:49:47 2024 +0200 drm/xe: Use ttm_uncached for BO with NEEDS_UC flag We should honor requested uncached mode also at the TTM layer. Otherwise, we risk losing updates to the memory based interrupts source or status vectors, as those require uncached memory. Signed-off-by: Michal Wajdeczko Cc: Thomas Hellström Cc: Matt Roper Acked-by: Thomas Hellström Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240618104947.729-1-michal.wajdeczko@intel.com commit 65e4efa049781519e376e6a9bd8517643fd1e858 Merge: 6f46fc9bc2bda e2e7d78d9a25c Author: David S. Miller Date: Wed Jun 19 12:44:23 2024 +0100 Merge branch 'net-drop-rx-socket-tracepoint' Yan Zhai says: ==================== net: pass receive socket to drop tracepoint We set up our production packet drop monitoring around the kfree_skb tracepoint. While this tracepoint is extremely valuable for diagnosing critical problems, it also has some limitation with drops on the local receive path: this tracepoint can only inspect the dropped skb itself, but such skb might not carry enough information to: 1. determine in which netns/container this skb gets dropped 2. determine by which socket/service this skb oughts to be received The 1st issue is because skb->dev is the only member field with valid netns reference. But skb->dev can get cleared or reused. For example, tcp_v4_rcv will clear skb->dev and in later processing it might be reused for OFO tree. The 2nd issue is because there is no reference on an skb that reliably points to a receiving socket. skb->sk usually points to the local sending socket, and it only points to a receive socket briefly after early demux stage, yet the socket can get stolen later. For certain drop reason like TCP OFO_MERGE, Zerowindow, UDP at PROTO_MEM error, etc, it is hard to infer which receiving socket is impacted. This cannot be overcome by simply looking at the packet header, because of complications like sk lookup programs. In the past, single purpose tracepoints like trace_udp_fail_queue_rcv_skb, trace_sock_rcvqueue_full, etc are added as needed to provide more visibility. This could be handled in a more generic way. In this change set we propose a new 'sk_skb_reason_drop' call as a drop-in replacement for kfree_skb_reason at various local input path. It accepts an extra receiving socket argument. Both issues above can be resolved via this new argument. V4->V5: rename rx_skaddr to rx_sk to be more clear visually, suggested by Jesper Dangaard Brouer. V3->V4: adjusted the TP_STRUCT field order to align better, suggested by Steven Rostedt. V2->V3: fixed drop_monitor function signatures; fixed a few uninitialized sks; Added a few missing report tags from test bots (also noticed by Dan Carpenter and Simon Horman). V1->V2: instead of using skb->cb, directly add the needed argument to trace_kfree_skb tracepoint. Also renamed functions as Eric Dumazet suggested. ==================== Signed-off-by: David S. Miller commit e2e7d78d9a25c78dc829da400bcec857b8c41b78 Author: Yan Zhai Date: Mon Jun 17 11:09:27 2024 -0700 af_packet: use sk_skb_reason_drop to free rx packets Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406011859.Aacus8GV-lkp@intel.com/ Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit fc0cc9248843b37243fa5fd3287a121ec41d291f Author: Yan Zhai Date: Mon Jun 17 11:09:24 2024 -0700 udp: use sk_skb_reason_drop to free rx packets Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406011751.NpVN0sSk-lkp@intel.com/ Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 46a02aa357529d7b038096955976b14f7c44aa23 Author: Yan Zhai Date: Mon Jun 17 11:09:20 2024 -0700 tcp: use sk_skb_reason_drop to free rx packets Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406011539.jhwBd7DX-lkp@intel.com/ Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit ce9a2424e9da2cd4e790f2498621bc2aa5e5d298 Author: Yan Zhai Date: Mon Jun 17 11:09:16 2024 -0700 net: raw: use sk_skb_reason_drop to free rx packets Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 7467de17635fb9d240987a0b9574fb2283a53b73 Author: Yan Zhai Date: Mon Jun 17 11:09:13 2024 -0700 ping: use sk_skb_reason_drop to free rx packets Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit ba8de796baf4bdc03530774fb284fe3c97875566 Author: Yan Zhai Date: Mon Jun 17 11:09:09 2024 -0700 net: introduce sk_skb_reason_drop function Long used destructors kfree_skb and kfree_skb_reason do not pass receiving socket to packet drop tracepoints trace_kfree_skb. This makes it hard to track packet drops of a certain netns (container) or a socket (user application). The naming of these destructors are also not consistent with most sk/skb operating functions, i.e. functions named "sk_xxx" or "skb_xxx". Introduce a new functions sk_skb_reason_drop as drop-in replacement for kfree_skb_reason on local receiving path. Callers can now pass receiving sockets to the tracepoints. kfree_skb and kfree_skb_reason are still usable but they are now just inline helpers that call sk_skb_reason_drop. Note it is not feasible to do the same to consume_skb. Packets not dropped can flow through multiple receive handlers, and have multiple receiving sockets. Leave it untouched for now. Suggested-by: Eric Dumazet Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit c53795d48ee8f385c6a9e394651e7ee914baaeba Author: Yan Zhai Date: Mon Jun 17 11:09:04 2024 -0700 net: add rx_sk to trace_kfree_skb skb does not include enough information to find out receiving sockets/services and netns/containers on packet drops. In theory skb->dev tells about netns, but it can get cleared/reused, e.g. by TCP stack for OOO packet lookup. Similarly, skb->sk often identifies a local sender, and tells nothing about a receiver. Allow passing an extra receiving socket to the tracepoint to improve the visibility on receiving drops. Signed-off-by: Yan Zhai Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 72533b678405e3fe083557e10ff4f9bb39b40863 Author: AngeloGioacchino Del Regno Date: Tue Jun 11 10:56:02 2024 +0200 drm/panfrost: Add support for Mali on the MT8188 SoC MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new compatible and platform data using the same supplies and the same power domain lists as MT8183 (one regulator, three power domains). Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20240611085602.491324-3-angelogioacchino.delregno@collabora.com commit b3abace4cb906fd50996da7dc88caa51b1be6049 Author: AngeloGioacchino Del Regno Date: Tue Jun 11 10:56:01 2024 +0200 dt-bindings: gpu: mali-bifrost: Add compatible for MT8188 SoC Add a compatible for the MediaTek MT8188 SoC, with an integrated ARM Mali G57 MC3 (Valhall-JM) GPU. Acked-by: Conor Dooley Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20240611085602.491324-2-angelogioacchino.delregno@collabora.com commit 3f41368fbfe1b3d5922d317fe1a0a0cab6846802 Author: Conor Dooley Date: Wed Mar 27 12:24:40 2024 +0000 riscv: dts: microchip: add an initial devicetree for the BeagleV Fire Add an initial devicetree for the BeagleV Fire. This devicetree differs from that in the BeagleBoard BSP as it has a different memory configuration, however it will boot on the same FPGA images. PCI is disabled for now, as the Linux PCI driver (and the binding) assume which root port instance is in use. This will need to be fixed before PCI can be enabled. Link: https://www.beagleboard.org/boards/beaglev-fire Co-developed-by: Jamie Gibbons Signed-off-by: Jamie Gibbons Signed-off-by: Conor Dooley commit 76ed031dc750eb0846818ada1856a8c56d527892 Author: Conor Dooley Date: Wed Mar 27 12:24:36 2024 +0000 dt-bindings: riscv: microchip: document beaglev-fire The BeagleV Fire is a BeagleBone Black form-factor board with a PolarFire SoC. Link: https://www.beagleboard.org/boards/beaglev-fire Acked-by: Rob Herring Signed-off-by: Conor Dooley commit f5e9d56199f715357a28f057312b116d97f32f90 Author: Jeff Johnson Date: Tue Jun 18 18:01:29 2024 -0700 crypto: mips/poly1305 - add missing MODULE_DESCRIPTION() macro With ARCH=mips, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/mips/crypto/poly1305-mips.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Thomas Bogendoerfer commit 8de4ed75bd14ed197119ac509c6902a8561e0c1c Author: Jiaxun Yang Date: Sun Jun 16 18:54:24 2024 +0100 MIPS: ip30: ip30-console: Add missing include Include linux/processor.h to fix build error: arch/mips/sgi-ip30/ip30-console.c: In function ‘prom_putchar’: arch/mips/sgi-ip30/ip30-console.c:21:17: error: implicit declaration of function ‘cpu_relax’ [-Werror=implicit-function-declaration] 21 | cpu_relax(); Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 3ec1428d7b7c519d757a013cef908d7e33dee882 Author: Simon Trimmer Date: Mon Jun 17 14:53:38 2024 +0100 ASoC: cs35l56: Accept values greater than 0 as IRQ numbers IRQ lookup functions such as those in ACPI can return error values when an IRQ is not defined. The i2c core driver converts the error codes to a value of 0 and the SPI bus driver passes them unaltered to client device drivers. The cs35l56 driver should only accept positive non-zero values as IRQ numbers. Signed-off-by: Simon Trimmer Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Link: https://msgid.link/r/20240617135338.82006-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 24bb052d3dd499c5956abad5f7d8e4fd07da7fb1 Author: Janusz Krzysztofik Date: Mon Jun 3 21:54:45 2024 +0200 drm/i915/gt: Fix potential UAF by revoke of fence registers CI has been sporadically reporting the following issue triggered by igt@i915_selftest@live@hangcheck on ADL-P and similar machines: <6> [414.049203] i915: Running intel_hangcheck_live_selftests/igt_reset_evict_fence ... <6> [414.068804] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled <6> [414.068812] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled <3> [414.070354] Unable to pin Y-tiled fence; err:-4 <3> [414.071282] i915_vma_revoke_fence:301 GEM_BUG_ON(!i915_active_is_idle(&fence->active)) ... <4>[ 609.603992] ------------[ cut here ]------------ <2>[ 609.603995] kernel BUG at drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c:301! <4>[ 609.604003] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI <4>[ 609.604006] CPU: 0 PID: 268 Comm: kworker/u64:3 Tainted: G U W 6.9.0-CI_DRM_14785-g1ba62f8cea9c+ #1 <4>[ 609.604008] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR4 RVP, BIOS RPLPFWI1.R00.4035.A00.2301200723 01/20/2023 <4>[ 609.604010] Workqueue: i915 __i915_gem_free_work [i915] <4>[ 609.604149] RIP: 0010:i915_vma_revoke_fence+0x187/0x1f0 [i915] ... <4>[ 609.604271] Call Trace: <4>[ 609.604273] ... <4>[ 609.604716] __i915_vma_evict+0x2e9/0x550 [i915] <4>[ 609.604852] __i915_vma_unbind+0x7c/0x160 [i915] <4>[ 609.604977] force_unbind+0x24/0xa0 [i915] <4>[ 609.605098] i915_vma_destroy+0x2f/0xa0 [i915] <4>[ 609.605210] __i915_gem_object_pages_fini+0x51/0x2f0 [i915] <4>[ 609.605330] __i915_gem_free_objects.isra.0+0x6a/0xc0 [i915] <4>[ 609.605440] process_scheduled_works+0x351/0x690 ... In the past, there were similar failures reported by CI from other IGT tests, observed on other platforms. Before commit 63baf4f3d587 ("drm/i915/gt: Only wait for GPU activity before unbinding a GGTT fence"), i915_vma_revoke_fence() was waiting for idleness of vma->active via fence_update(). That commit introduced vma->fence->active in order for the fence_update() to be able to wait selectively on that one instead of vma->active since only idleness of fence registers was needed. But then, another commit 0d86ee35097a ("drm/i915/gt: Make fence revocation unequivocal") replaced the call to fence_update() in i915_vma_revoke_fence() with only fence_write(), and also added that GEM_BUG_ON(!i915_active_is_idle(&fence->active)) in front. No justification was provided on why we might then expect idleness of vma->fence->active without first waiting on it. The issue can be potentially caused by a race among revocation of fence registers on one side and sequential execution of signal callbacks invoked on completion of a request that was using them on the other, still processed in parallel to revocation of those fence registers. Fix it by waiting for idleness of vma->fence->active in i915_vma_revoke_fence(). Fixes: 0d86ee35097a ("drm/i915/gt: Make fence revocation unequivocal") Closes: https://gitlab.freedesktop.org/drm/intel/issues/10021 Signed-off-by: Janusz Krzysztofik Cc: stable@vger.kernel.org # v5.8+ Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240603195446.297690-2-janusz.krzysztofik@linux.intel.com commit edbce932b16c8ae93eb916c31d762356679ad353 Author: Matthias Brugger Date: Mon Jun 3 17:07:55 2024 +0200 riscv: dts: starfive: Update flash partition layout Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps. Suggested-by: Heinrich Schuchardt Signed-off-by: Matthias Brugger Reviewed-by: Emil Renner Berthing Reviewed-by: Heinrich Schuchardt Signed-off-by: Conor Dooley commit c61fea676bcb5f14adcd882a7f7d9c5b082fe922 Author: Inochi Amaoto Date: Thu May 30 19:18:35 2024 +0800 riscv: dts: thead: th1520: Add PMU event node T-HEAD th1520 uses standard C910 chip and its pmu is already supported by OpenSBI. Add the pmu event description for T-HEAD th1520 SoC. Signed-off-by: Inochi Amaoto Link: https://www.xrvm.com/product/xuantie/4240217381324001280?spm=xrvm.27140568.0.0.7f979b29nzIa1m Reviewed-by: Guo Ren Signed-off-by: Conor Dooley commit 2606bf583b9623694b864c220fd6b3d2ed13ba13 Author: Henry Bell Date: Thu May 23 21:55:38 2024 +0000 riscv: dts: starfive: add Star64 board devicetree The Pine64 Star64 is a development board based on the Starfive JH7110 SoC. The board features: - JH7110 SoC - 4/8 GiB LPDDR4 DRAM - AXP15060 PMIC - 40 pin GPIO header - 1x USB 3.0 host port - 3x USB 2.0 host port - 1x eMMC slot - 1x MicroSD slot - 1x QSPI Flash - 2x 1Gbps Ethernet port - 1x HDMI port - 1x 4-lane DSI - 1x 2-lane CSI - 1x PCIe 2.0 x1 lane Signed-off-by: Henry Bell Signed-off-by: Conor Dooley commit c249e17c37d3a767cb9aa57fe1e429e155fd4171 Author: Henry Bell Date: Thu May 23 21:55:37 2024 +0000 dt-bindings: riscv: starfive: add Star64 board compatible Add pine64,star64 to JH7110 compatibility. The Pine64 Star64 is a development board based on the Starfive JH7110 SoC. The board features: - JH7110 SoC - 4/8 GiB LPDDR4 DRAM - AXP15060 PMIC - 40 pin GPIO header - 1x USB 3.0 host port - 3x USB 2.0 host port - 1x eMMC slot - 1x MicroSD slot - 1x QSPI Flash - 2x 1Gbps Ethernet port - 1x HDMI port - 1x 4-lane DSI - 1x 2-lane CSI - 1x PCIe 2.0 x1 lane Signed-off-by: Henry Bell Signed-off-by: Conor Dooley commit 6f46fc9bc2bda2254189f547110b9e87e5f100f2 Merge: 9f1f70dd85003 71be1189c92bc Author: David S. Miller Date: Wed Jun 19 10:56:10 2024 +0100 Merge branch 'am65x-ptp' Diogo Ivo says ==================== Enable PTP timestamping/PPS for AM65x SR1.0 devices This patch series enables support for PTP in AM65x SR1.0 devices. This feature relies heavily on the Industrial Ethernet Peripheral (IEP) hardware module, which implements a hardware counter through which time is kept. This hardware block is the basis for exposing a PTP hardware clock to userspace and for issuing timestamps for incoming/outgoing packets, allowing for time synchronization. The IEP also has compare registers that fire an interrupt when the counter reaches the value stored in a compare register. This feature allows us to support PPS events in the kernel. The changes are separated into five patches: - PATCH 01/05: Register SR1.0 devices with the IEP infrastructure to expose a PHC clock to userspace, allowing time to be adjusted using standard PTP tools. The code for issuing/ collecting packet timestamps is already present in the current state of the driver, so only this needs to be done. - PATCH 02/05: Remove unnecessary spinlock synchronization. - PATCH 03/05: Document IEP interrupt in DT binding. - PATCH 04/05: Add support for IEP compare event/interrupt handling to enable PPS events. - PATCH 05/05: Add the interrupts to the IOT2050 device tree. Currently every compare event generates two interrupts, the first corresponding to the actual event and the second being a spurious but otherwise harmless interrupt. The root cause of this has been identified and has been solved in the platform's SDK. A forward port of the SDK's patches also fixes the problem in upstream but is not included here since it's upstreaming is out of the scope of this series. If someone from TI would be willing to chime in and help get the interrupt changes upstream that would be great! Signed-off-by: Diogo Ivo --- Changes in v4: - Remove unused 'flags' variables in patch 02/05 - Add patch 03/05 describing IEP interrupt in DT binding - Link to v3: https://lore.kernel.org/r/20240607-iep-v3-0-4824224105bc@siemens.com Changes in v3: - Collect Reviewed-by tags - Add patch 02/04 removing spinlocks from IEP driver - Use mutex-based synchronization when accessing HW registers - Link to v2: https://lore.kernel.org/r/20240604-iep-v2-0-ea8e1c0a5686@siemens.com Changes in v2: - Collect Reviewed-by tags - PATCH 01/03: Limit line length to 80 characters - PATCH 02/03: Proceed with limited functionality if getting IRQ fails, limit line length to 80 characters - Link to v1: https://lore.kernel.org/r/20240529-iep-v1-0-7273c07592d3@siemens.com ==================== Signed-off-by: David S. Miller commit 71be1189c92bc1e92f99f8f675e03b24ed00c6ff Author: Diogo Ivo Date: Mon Jun 17 16:21:44 2024 +0100 arm64: dts: ti: iot2050: Add IEP interrupts for SR1.0 devices Add the interrupts needed for PTP Hardware Clock support via IEP in SR1.0 devices. Reviewed-by: Jacob Keller Signed-off-by: Diogo Ivo Signed-off-by: David S. Miller commit f18ad402cd8bdf8e4a85dd5f209ceefceceffd9c Author: Diogo Ivo Date: Mon Jun 17 16:21:43 2024 +0100 net: ti: icss-iep: Enable compare events The IEP module supports compare events, in which a value is written to a hardware register and when the IEP counter reaches the written value an interrupt is generated. Add handling for this interrupt in order to support PPS events. Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Diogo Ivo Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5056860cf8eab681a08913ec03432c57c83e71be Author: Diogo Ivo Date: Mon Jun 17 16:21:42 2024 +0100 dt-bindings: net: Add IEP interrupt The IEP interrupt is used in order to support both capture events, where an incoming external signal gets timestamped on arrival, and compare events, where an interrupt is generated internally when the IEP counter reaches a programmed value. Signed-off-by: Diogo Ivo Acked-by: Conor Dooley Signed-off-by: David S. Miller commit 5758e03cf604aa282b9afa61aec3188c4a9b3fe7 Author: Diogo Ivo Date: Mon Jun 17 16:21:41 2024 +0100 net: ti: icss-iep: Remove spinlock-based synchronization As all sources of concurrency in hardware register access occur in non-interrupt context eliminate spinlock-based synchronization and rely on the mutex-based synchronization that is already present. Signed-off-by: Diogo Ivo Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5e1e43893be21fb726b86e630e8e954289dcd8e4 Author: Diogo Ivo Date: Mon Jun 17 16:21:40 2024 +0100 net: ti: icssg-prueth: Enable PTP timestamping support for SR1.0 devices Enable PTP support for AM65x SR1.0 devices by registering with the IEP infrastructure in order to expose a PTP clock to userspace. Reviewed-by: Jacob Keller Reviewed-by: Wojciech Drewek Signed-off-by: Diogo Ivo Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9f1f70dd850038b37e8b103ef0cc6f5eaeb6a8fc Author: Hongfu Li Date: Mon Jun 17 15:54:35 2024 +0800 rds:Simplify the allocation of slab caches Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Hongfu Li Reviewed-by: Zhu Yanjun Reviewed-by: Allison Henderson Signed-off-by: David S. Miller commit fbda4b254042250d390dc74b058ad1a9a29dacbd Author: Marc Gonzalez Date: Tue Jun 18 18:19:59 2024 +0200 drm: bridge: simple-bridge: use devm_drm_bridge_add in probe simple_bridge_probe() calls drm_bridge_add() Thus, drm_bridge_remove() must be called in the remove() callback. If we call devm_drm_bridge_add() instead, then drm_bridge_remove() will be called automatically at device release, and the remove() callback is no longer required. Signed-off-by: Marc Gonzalez Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240618-devm-simple-bridge-v1-1-c7ed8a09fcc5@freebox.fr commit 3dc14eefa504d2fbe8e75113c7bb164a20bc39b0 Author: Oliver Upton Date: Mon Jun 17 18:10:18 2024 +0000 KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation Of course, userspace is in the driver's seat for struct kvm and associated allocations. Make sure the sysreg_masks allocation participates in kmem accounting. Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20240617181018.2054332-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit d754ed2821fd9675d203cb73c4afcd593e28b7d0 Merge: dcaacff03a9fa 1ddaaa244021a Author: Jani Nikula Date: Wed Jun 19 11:38:31 2024 +0300 Merge drm/drm-next into drm-intel-next Sync to v6.10-rc3. Signed-off-by: Jani Nikula commit 0feec7769a63ef15401a9820c2039e26f0391825 Author: Marc Zyngier Date: Fri Jun 14 15:45:52 2024 +0100 KVM: arm64: nv: Add handling of NXS-flavoured TLBI operations Latest kid on the block: NXS (Non-eXtra-Slow) TLBI operations. Let's add those in bulk (NSH, ISH, OSH, both normal and range) as they directly map to their XS (the standard ones) counterparts. Not a lot to say about them, they are basically useless. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-17-maz@kernel.org Signed-off-by: Oliver Upton commit 5d476ca57d7d1fb6a5a39e46747bb2034190ee4a Author: Marc Zyngier Date: Fri Jun 14 15:45:51 2024 +0100 KVM: arm64: nv: Add handling of range-based TLBI operations We already support some form of range operation by handling FEAT_TTL, but so far the "arbitrary" range operations are unsupported. Let's fix that. For EL2 S1, this is simple enough: we just map both NSH, ISH and OSH instructions onto the ISH version for EL1. For TLBI instructions affecting EL1 S1, we use the same model as their non-range counterpart to invalidate in the context of the correct VMID. For TLBI instructions affecting S2, we interpret the data passed by the guest to compute the range and use that to tear-down part of the shadow S2 range and invalidate the TLBs. Finally, we advertise FEAT_TLBIRANGE if the host supports it. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-16-maz@kernel.org Signed-off-by: Oliver Upton commit 0cb8aae2267687a13e22cf906d1ee1e9840bbe27 Author: Marc Zyngier Date: Fri Jun 14 15:45:50 2024 +0100 KVM: arm64: nv: Add handling of outer-shareable TLBI operations Our handling of outer-shareable TLBIs is pretty basic: we just map them to the existing inner-shareable ones, because we really don't have anything else. The only significant change is that we can now advertise FEAT_TLBIOS support if the host supports it. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-15-maz@kernel.org Signed-off-by: Oliver Upton commit 809b2e6013a51352e407c3071219f12ecceed47f Author: Marc Zyngier Date: Fri Jun 14 15:45:49 2024 +0100 KVM: arm64: nv: Invalidate TLBs based on shadow S2 TTL-like information In order to be able to make S2 TLB invalidations more performant on NV, let's use a scheme derived from the FEAT_TTL extension. If bits [56:55] in the leaf descriptor translating the address in the corresponding shadow S2 are non-zero, they indicate a level which can be used as an invalidation range. This allows further reduction of the systematic over-invalidation that takes place otherwise. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-14-maz@kernel.org Signed-off-by: Oliver Upton commit b1a3a94812b95fb8ae410d1ca04a4cc3d61a7503 Author: Marc Zyngier Date: Fri Jun 14 15:45:48 2024 +0100 KVM: arm64: nv: Tag shadow S2 entries with guest's leaf S2 level Populate bits [56:55] of the leaf entry with the level provided by the guest's S2 translation. This will allow us to better scope the invalidation by remembering the mapping size. Of course, this assume that the guest will issue an invalidation with an address that falls into the same leaf. If the guest doesn't, we'll over-invalidate. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-13-maz@kernel.org Signed-off-by: Oliver Upton commit d1de1576dc2178efcc5536edb0ea2b1cf022bd3e Author: Marc Zyngier Date: Fri Jun 14 15:45:47 2024 +0100 KVM: arm64: nv: Handle FEAT_TTL hinted TLB operations Support guest-provided information information to size the range of required invalidation. This helps with reducing over-invalidation, provided that the guest actually provides accurate information. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-12-maz@kernel.org Signed-off-by: Oliver Upton commit 70109bcd701e20d27a81bec6c19e03b8e0c06eba Author: Marc Zyngier Date: Fri Jun 14 15:45:46 2024 +0100 KVM: arm64: nv: Handle TLBI IPAS2E1{,IS} operations TLBI IPAS2E1* are the last class of TLBI instructions we need to handle. For each matching S2 MMU context, we invalidate a range corresponding to the largest possible mapping for that context. At this stage, we don't handle TTL, which means we are likely over-invalidating. Further patches will aim at making this a bit better. Co-developed-by: Jintack Lim Co-developed-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-11-maz@kernel.org Signed-off-by: Oliver Upton commit 5cfb6cec62f2036c7391192c3fa2a0a8a8200286 Author: Marc Zyngier Date: Fri Jun 14 15:45:45 2024 +0100 KVM: arm64: nv: Handle TLBI ALLE1{,IS} operations TLBI ALLE1* is a pretty big hammer that invalides all S1/S2 TLBs. This translates into the unmapping of all our shadow S2 PTs, itself resulting in the corresponding TLB invalidations. Co-developed-by: Jintack Lim Co-developed-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-10-maz@kernel.org Signed-off-by: Oliver Upton commit e6c9a3015ff21a76ef8ccab54568f5fe630e6e3a Author: Marc Zyngier Date: Fri Jun 14 15:45:44 2024 +0100 KVM: arm64: nv: Handle TLBI VMALLS12E1{,IS} operations Emulating TLBI VMALLS12E1* results in tearing down all the shadow S2 PTs that match the current VMID, since our shadow S2s are just some form of SW-managed TLBs. That teardown itself results in a full TLB invalidation for both S1 and S2. This can result in over-invalidation if two vcpus use the same VMID to tag private S2 PTs, but this is still correct from an architecture perspective. Co-developed-by: Jintack Lim Co-developed-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-9-maz@kernel.org Signed-off-by: Oliver Upton commit 8e236efa4cd2df8b270784a33d7e334933789f1a Author: Marc Zyngier Date: Fri Jun 14 15:45:43 2024 +0100 KVM: arm64: nv: Handle TLB invalidation targeting L2 stage-1 While dealing with TLB invalidation targeting the guest hypervisor's own stage-1 was easy, doing the same thing for its own guests is a bit more involved. Since such an invalidation is scoped by VMID, it needs to apply to all s2_mmu contexts that have been tagged by that VMID, irrespective of the value of VTTBR_EL2.BADDR. So for each s2_mmu context matching that VMID, we invalidate the corresponding TLBs, each context having its own "physical" VMID. Co-developed-by: Jintack Lim Co-developed-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-8-maz@kernel.org Signed-off-by: Oliver Upton commit 67fda56e76da4c4be9a8502d7211dbba024576d2 Author: Marc Zyngier Date: Fri Jun 14 15:45:42 2024 +0100 KVM: arm64: nv: Handle EL2 Stage-1 TLB invalidation Due to the way FEAT_NV2 suppresses traps when accessing EL2 system registers, we can't track when the guest changes its HCR_EL2.TGE setting. This means we always trap EL1 TLBIs, even if they don't affect any L2 guest. Given that invalidating the EL2 TLBs doesn't require any messing with the shadow stage-2 page-tables, we can simply emulate the instructions early and return directly to the guest. This is conditioned on the instruction being an EL1 one and the guest's HCR_EL2.{E2H,TGE} being {1,1} (indicating that the instruction targets the EL2 S1 TLBs), or the instruction being one of the EL2 ones (which are not ambiguous). EL1 TLBIs issued with HCR_EL2.{E2H,TGE}={1,0} are not handled here, and cause a full exit so that they can be handled in the context of a VMID. Co-developed-by: Jintack Lim Co-developed-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-7-maz@kernel.org Signed-off-by: Oliver Upton commit 82e86326ec58e074883bfe27ee098cabe3a9beb1 Author: Marc Zyngier Date: Fri Jun 14 15:45:41 2024 +0100 KVM: arm64: nv: Add Stage-1 EL2 invalidation primitives Provide the primitives required to handle TLB invalidation for Stage-1 EL2 TLBs, which by definition do not require messing with the Stage-2 page tables. Co-developed-by: Jintack Lim Co-developed-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-6-maz@kernel.org Signed-off-by: Oliver Upton commit ec14c272408af43d392f65f55e66f3b94fc61921 Author: Christoffer Dall Date: Fri Jun 14 15:45:40 2024 +0100 KVM: arm64: nv: Unmap/flush shadow stage 2 page tables Unmap/flush shadow stage 2 page tables for the nested VMs as well as the stage 2 page table for the guest hypervisor. Note: A bunch of the code in mmu.c relating to MMU notifiers is currently dealt with in an extremely abrupt way, for example by clearing out an entire shadow stage-2 table. This will be handled in a more efficient way using the reverse mapping feature in a later version of the patch series. Signed-off-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-5-maz@kernel.org Signed-off-by: Oliver Upton commit fd276e71d1e7b7f729050f2da235a1e6fe4f328a Author: Marc Zyngier Date: Fri Jun 14 15:45:39 2024 +0100 KVM: arm64: nv: Handle shadow stage 2 page faults If we are faulting on a shadow stage 2 translation, we first walk the guest hypervisor's stage 2 page table to see if it has a mapping. If not, we inject a stage 2 page fault to the virtual EL2. Otherwise, we create a mapping in the shadow stage 2 page table. Note that we have to deal with two IPAs when we got a shadow stage 2 page fault. One is the address we faulted on, and is in the L2 guest phys space. The other is from the guest stage-2 page table walk, and is in the L1 guest phys space. To differentiate them, we rename variables so that fault_ipa is used for the former and ipa is used for the latter. When mapping a page in a shadow stage-2, special care must be taken not to be more permissive than the guest is. Co-developed-by: Christoffer Dall Co-developed-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-4-maz@kernel.org Signed-off-by: Oliver Upton commit 61e30b9eef7ffc7f88ffd95e969cfb662e41bb05 Author: Christoffer Dall Date: Fri Jun 14 15:45:38 2024 +0100 KVM: arm64: nv: Implement nested Stage-2 page table walk logic Based on the pseudo-code in the ARM ARM, implement a stage 2 software page table walker. Co-developed-by: Jintack Lim Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-3-maz@kernel.org Signed-off-by: Oliver Upton commit 4f128f8e1aaac189f83d0f828bcdb2986d8d2e51 Author: Marc Zyngier Date: Fri Jun 14 15:45:37 2024 +0100 KVM: arm64: nv: Support multiple nested Stage-2 mmu structures Add Stage-2 mmu data structures for virtual EL2 and for nested guests. We don't yet populate shadow Stage-2 page tables, but we now have a framework for getting to a shadow Stage-2 pgd. We allocate twice the number of vcpus as Stage-2 mmu structures because that's sufficient for each vcpu running two translation regimes without having to flush the Stage-2 page tables. Co-developed-by: Christoffer Dall Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614144552.2773592-2-maz@kernel.org Signed-off-by: Oliver Upton commit 1e4c64b71c9bf230b25fde12cbcceacfdc8b3332 Author: Steven Rostedt (Google) Date: Thu Jun 13 11:55:07 2024 -0400 mm/memblock: Add "reserve_mem" to reserved named memory at boot up In order to allow for requesting a memory region that can be used for things like pstore on multiple machines where the memory layout is not the same, add a new option to the kernel command line called "reserve_mem". The format is: reserve_mem=nn:align:name Where it will find nn amount of memory at the given alignment of align. The name field is to allow another subsystem to retrieve where the memory was found. For example: reserve_mem=12M:4096:oops ramoops.mem_name=oops Where ramoops.mem_name will tell ramoops that memory was reserved for it via the reserve_mem option and it can find it by calling: if (reserve_mem_find_by_name("oops", &start, &size)) { // start holds the start address and size holds the size given This is typically used for systems that do not wipe the RAM, and this command line will try to reserve the same physical memory on soft reboots. Note, it is not guaranteed to be the same location. For example, if KASLR places the kernel at the location of where the RAM reservation was from a previous boot, the new reservation will be at a different location. Any subsystem using this feature must add a way to verify that the contents of the physical memory is from a previous boot, as there may be cases where the memory will not be located at the same location. Not all systems may work either. There could be bit flips if the reboot goes through the BIOS. Using kexec to reboot the machine is likely to have better results in such cases. Link: https://lore.kernel.org/all/ZjJVnZUX3NZiGW6q@kernel.org/ Suggested-by: Mike Rapoport Tested-by: Guilherme G. Piccoli Signed-off-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20240613155527.437020271@goodmis.org Signed-off-by: Mike Rapoport (IBM) commit dcaacff03a9fa2838f936e1009b4b7ad56807152 Author: Jouni Högander Date: Tue Jun 18 08:30:26 2024 +0300 intel_alpm: Fix wrong offset for PORT_ALPM_* registers PORT_ALPM_* registers are using MMIO_TRANS2 macro. This is not correct as they are port register. Use _PORT_MMIO instead. Fixes: 4ee30a448255 ("drm/i915/alpm: Add ALPM register definitions") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-10-jouni.hogander@intel.com commit dc9cfe9f1d22b359d6f316005c887c1a6e31701d Author: Jouni Högander Date: Tue Jun 18 08:30:25 2024 +0300 Revert "drm/i915/psr: Disable early transport by default" This reverts commit f3c2031db7dfdf470a2d9bf3bd1efa6edfa72d8d. We want to notice possible issues faced with PSR2 Region Early Transport as early as possible -> let's revert patch disabling Region Early Transport by default. Also eDP 1.5 Panel Replay requires Early Transport. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-9-jouni.hogander@intel.com commit c52a3187a1bf0a13c3a0119d057781166f12a8ee Author: Jouni Högander Date: Tue Jun 18 08:30:24 2024 +0300 drm/i915/psr: Add new debug bit to disable Panel Replay Add new debug bit to be used with i915_edp_psr_debug debugfs interface. This can be used to disable Panel Replay. v2: ensure that fastset is performed when the bit changes Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-8-jouni.hogander@intel.com commit 3ec391a007f405b4fe48ecf2bf55d3ff0fc7d1b2 Author: Jouni Högander Date: Tue Jun 18 08:30:23 2024 +0300 drm/i915/psr: Disable PSR/Panel Replay on sink side for PSR only Enabling/disabling Panel Replay on sink side has to be done before link training. We can't disable it in sink side on PSR disable. Fixes: 88ae6c65ecdb ("drm/i915/psr: Unify panel replay enable/disable sink") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-7-jouni.hogander@intel.com commit aeb7a0fe21dca9f8322906e6c5bd45c8b3d9b768 Author: Jouni Högander Date: Tue Jun 18 08:30:22 2024 +0300 drm/i915/psr: Disable PSR2 SU Region ET if enable_psr module parameter is set Currently PSR2 SU Region Early Transport is enabled by default on Lunarlake if panel supports it despite enable_psr module parameter value. This patch makes it possible for user to limit used PSR mode and prevent SU Region Early Transport by setting enable_psr as 2. With default (-1) PSR2 SU Region Early Transport is allowed. v2: fix/improve commit desciption Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-6-jouni.hogander@intel.com commit b445130c35e5bfe7917e44140e259b2babeec87f Author: Jouni Högander Date: Tue Jun 18 08:30:21 2024 +0300 drm/i915/psr: Disable Panel Replay if PSR mode is set via module parameter If user is specifically limiting PSR mode to PSR1 or PSR2: disable Panel Replay. With default value -1 all modes are allowed including Panel Replay. Disabling PSR using value 0 disables Panel Replay as well. Also own compute config helper is added for Panel Replay. This makes sense because number of Panel Replay specific checks are increasing. v2: Squash adding Panel Replay compute config helper Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-5-jouni.hogander@intel.com commit 22f3a60558da4509c0c3fa49b82a5d7e6f677cf5 Author: Jouni Högander Date: Tue Jun 18 08:30:20 2024 +0300 drm/i915/alpm: Fix port clock usage in AUX Less wake time calculation Port clock is link rate in 10 kbit/s units. Take this into account when calculating AUX Less wake time. Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-4-jouni.hogander@intel.com commit 1eb28818c2418e341af2e8b5385243e03e841ae8 Author: Jouni Högander Date: Tue Jun 18 08:30:19 2024 +0300 drm/i915/display: Wa 16021440873 is writing wrong register Wa 16021440873 is writing wrong register. Instead of PIPE_SRCSZ_ERLY_TPT write CURPOS_ERLY_TPT. v2: use right offset as well Fixes: 29cdef8539c3 ("drm/i915/display: Implement Wa_16021440873") Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-3-jouni.hogander@intel.com commit 97db7348640ececd60a0bfd85b6c0a3a0f81459a Author: Jouni Högander Date: Tue Jun 18 08:30:18 2024 +0300 drm/i915/psr: Set SU area width as pipe src width Currently SU area width is set as MAX_INT. This is causing problems. Instead set it as pipe src width. Fixes: 86b26b6aeac7 ("drm/i915/psr: Carry su area in crtc_state") Signed-off-by: Jouni Högander Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20240618053026.3268759-2-jouni.hogander@intel.com commit 49056c95df448c1fa870c8688f34e5d1abffb154 Author: Aapo Vienamo Date: Tue May 21 11:02:13 2024 +0300 thunderbolt: debugfs: Use FIELD_GET() Use the FIELD_GET() macro instead of open coding the masks and shifts. This makes the code more compact and improves readability as it avoids the need to wrap excessively long lines. Signed-off-by: Aapo Vienamo Reviewed-by: Andy Shevchenko Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit ce5b5bef86c3062a4ea01af4b774fd9f180fd4d3 Author: Ryan Walklin Date: Fri Jun 7 21:20:33 2024 +1200 cpufreq: sun50i: add Allwinner H700 speed bin Support for the Allwinner H618, H618 and H700 was added to the sun50i cpufreq-nvmem driver recently [1] however at the time some operating points supported by the H700 (1.008, 1.032 and 1.512 GHz) and in use by vendor BSPs were found to be unstable during testing, so the H700 speed bin and the 1.032 GHz OPP were not included in the mainline driver. Retesting with kernel 6.10rc2 (which carries additional fixes for the driver) now shows stable operation with these points. Add the H700 speed bin to the driver. Reviewed-by: Andre Przywara Signed-off-by: Ryan Walklin -- [1] https://lore.kernel.org/linux-sunxi/20240418154408.1740047-1-andre.przywara@arm.com Signed-off-by: Viresh Kumar commit 1226a1b2e5611d17aae55a01ad9d6883879feab4 Author: Guenter Roeck Date: Fri Jun 14 08:27:21 2024 -0700 hwmon: (spd5118) Add support for Renesas/ITD SPD5118 hub controllers The SPD5118 specification says, in its documentation of the page bits in the MR11 register: " This register only applies to non-volatile memory (1024) Bytes) access of SPD5 Hub device. For volatile memory access, this register must be programmed to '000'. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " Renesas/ITD SPD5118 hub controllers take this literally and disable access to volatile memory if the page selected in MR11 is != 0. Since the BIOS or ROMMON will access the non-volatile memory and likely select a page != 0, this means that the driver will not instantiate since it can not identify the chip. Even if the driver instantiates, access to volatile registers is blocked after a nvram read operation which selects a page other than 0. To solve the problem, add initialization code to select page 0 during probe. Before doing that, use basic validation to ensure that this is really a SPD5118 device and not some random EEPROM. Cc: Sasha Kozachuk Cc: John Hamrick Cc: Chris Sarra Tested-by: Armin Wolf Signed-off-by: Guenter Roeck commit 27972a41423291b0ca438fc3f0b104429bf270f2 Author: Guenter Roeck Date: Tue Jun 18 10:08:54 2024 -0700 hwmon: (spd5118) Use regmap to implement paging Using regmap for paging significantly improves caching since the regmap cache no longer needs to be cleared after changing the page, so let's use it. Suggested-by: Armin Wolf Tested-by: Armin Wolf Signed-off-by: Guenter Roeck commit 382d1741b5b2feffef7942dd074206372afe1a96 Author: Haiyang Zhang Date: Mon Jun 17 13:17:26 2024 -0700 net: mana: Add support for page sizes other than 4KB on ARM64 As defined by the MANA Hardware spec, the queue size for DMA is 4KB minimal, and power of 2. And, the HWC queue size has to be exactly 4KB. To support page sizes other than 4KB on ARM64, define the minimal queue size as a macro separately from the PAGE_SIZE, which we always assumed it to be 4KB before supporting ARM64. Also, add MANA specific macros and update code related to size alignment, DMA region calculations, etc. Signed-off-by: Haiyang Zhang Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1718655446-6576-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Jakub Kicinski commit 2c6a4b969c1fb8277421374caa5299a6620b5691 Merge: 8c379e3ce4043 6c7dd432dcbcc Author: Jakub Kicinski Date: Tue Jun 18 18:19:22 2024 -0700 Merge branch 'net-mlx4_en-use-ethtool_puts-sprintf' Kamal Heib says: ==================== net/mlx4_en: Use ethtool_puts/sprintf This patchset updates the mlx4_en driver to use the ethtool_puts and ethtool_sprintf helper functions. Signed-off-by: Kamal Heib ==================== Link: https://lore.kernel.org/r/20240617172329.239819-1-kheib@redhat.com Signed-off-by: Jakub Kicinski commit 6c7dd432dcbccdad9474aa9d45ec0d52c609d937 Author: Kamal Heib Date: Mon Jun 17 13:23:29 2024 -0400 net/mlx4_en: Use ethtool_puts/sprintf to fill stats strings Use the ethtool_puts/ethtool_sprintf helper to print the stats strings into the ethtool strings interface. Signed-off-by: Kamal Heib Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240617172329.239819-4-kheib@redhat.com Signed-off-by: Jakub Kicinski commit 4454929c345dbd657dd5a6ae816050d140d228c0 Author: Kamal Heib Date: Mon Jun 17 13:23:28 2024 -0400 net/mlx4_en: Use ethtool_puts to fill selftest strings Use the ethtool_puts helper to print the selftest strings into the ethtool strings interface. Signed-off-by: Kamal Heib Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240617172329.239819-3-kheib@redhat.com Signed-off-by: Jakub Kicinski commit e52e010395dc5232f7dd5c271367f4bdd18ab74c Author: Kamal Heib Date: Mon Jun 17 13:23:27 2024 -0400 net/mlx4_en: Use ethtool_puts to fill priv flags strings Use the ethtool_puts helper to print the priv flags strings into the ethtool strings interface. Signed-off-by: Kamal Heib Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240617172329.239819-2-kheib@redhat.com Signed-off-by: Jakub Kicinski commit 75c47c790f43c438761fc049fb9d438144a9db45 Author: Kai-Heng Feng Date: Tue Apr 16 12:32:25 2024 +0800 PCI/DPC: Disable DPC service on suspend If the link is powered off during suspend, electrical noise may cause errors that trigger DPC. If the DPC interrupt is enabled and shares an IRQ with PME, that causes a spurious wakeup during suspend. Disable DPC triggering and the DPC interrupt during suspend to prevent this. Clear DPC interrupt status before re-enabling DPC interrupts during resume so we don't get an interrupt for errors that occurred during the suspend/resume process. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209149 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216295 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218090 Link: https://lore.kernel.org/r/20240416043225.1462548-3-kai.heng.feng@canonical.com Signed-off-by: Kai-Heng Feng [bhelgaas: clear status on resume, add comments, commit log] Signed-off-by: Bjorn Helgaas commit 5afc2f763edc5daae4722ee46fea4e627d01fa90 Author: Kai-Heng Feng Date: Tue Apr 16 12:32:24 2024 +0800 PCI/AER: Disable AER service on suspend If the link is powered off during suspend, electrical noise may cause errors that are logged via AER. If the AER interrupt is enabled and shares an IRQ with PME, that causes a spurious wakeup during suspend. Disable the AER interrupt during suspend to prevent this. Clear error status before re-enabling IRQ interrupts during resume so we don't get an interrupt for errors that occurred during the suspend/resume process. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209149 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216295 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218090 Link: https://lore.kernel.org/r/20240416043225.1462548-2-kai.heng.feng@canonical.com Signed-off-by: Kai-Heng Feng [bhelgaas: drop pci_ancestor_pr3_present() etc, commit log] Signed-off-by: Bjorn Helgaas commit cffd77865f476994680892601e09bc2164179907 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:09 2024 -0700 drm/xe/oa: Enable Xe2+ overrun mode Enable Xe2+ overrun mode. For Xe2+, when overrun mode is enabled, there are no partial reports at the end of buffer, making the OA buffer effectively a non-power-of-2 size circular buffer whose size, circ_size, is a multiple of the report size. v2: Fix implementation of xe_oa_circ_diff/xe_oa_circ_incr (Umesh) Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-18-ashutosh.dixit@intel.com commit 3a1fc394ba85e851084d9fa1bdd4ecd625ef913b Author: Ashutosh Dixit Date: Mon Jun 17 18:46:08 2024 -0700 drm/xe/oa: Changes to OA_TAKEN Rename OA_TAKEN to xe_oa_circ_diff, since xe_oa_circ_diff better describes what the macro actually does. Also convert to function and add xe_oa_stream arg. These will be used in the following patch. Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-17-ashutosh.dixit@intel.com commit 70af432b9acfb382dcd4f5f936528db2de992a8e Author: Ashutosh Dixit Date: Mon Jun 17 18:46:07 2024 -0700 drm/xe/oa: Override GuC RC with OA on PVC On PVC, a w/a resets RCS/CCS before it goes into RC6. This breaks OA since OA does not expect engine resets during its use. Fix it by disabling RC6. v2: Convert to gt oriented error/warn messages (Michal) Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-16-ashutosh.dixit@intel.com commit 828a8eaf37c3fac6ba048995f55f1647a4ac542d Author: Ashutosh Dixit Date: Mon Jun 17 18:46:06 2024 -0700 drm/xe/oa: Add MMIO trigger support Add MMIO trigger support and allow-list required registers for MMIO trigger use case. Registers are whitelisted for the lifetime of the driver but MMIO trigger is enabled only for the duration of the stream. Bspec: 45925, 60340, 61228 Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-15-ashutosh.dixit@intel.com commit 392bf22238ff88506f410c464ba0c7a84e9de471 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:05 2024 -0700 drm/xe/oa/uapi: OA buffer mmap Allow the OA buffer to be mmap'd to userspace. This is needed for the MMIO trigger use case. Even otherwise, with whitelisted OA head/tail ptr registers, userspace can receive/interpret OA data from the mmap'd buffer without issuing read()'s on the OA stream fd. v2: Remove unmap_mapping_range from xe_oa_release (Thomas H) Use vm_flags_mod (Umesh) Acked-by: Rodrigo Vivi Suggested-by: Umesh Nerlige Ramappa Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-14-ashutosh.dixit@intel.com commit dd6b4718c3bab611588922ae8a7736c58eafcc93 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:04 2024 -0700 drm/xe/oa/uapi: Query OA unit properties Implement query for properties of OA units present on a device. v2: Clean up reserved/pad fields (Umesh) Follow the same scheme as other query structs v3: Skip reporting reserved engines attached to OA units v4: Expose oa_buf_size via DRM_XE_PERF_IOCTL_INFO (Umesh) v5: Don't expose capabilities as OR of properties (Umesh) v6: Add extensions to query output structs: drm_xe_oa_unit, drm_xe_query_oa_units and drm_xe_oa_stream_info v7: Change oa_units[] array to __u64 type Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-13-ashutosh.dixit@intel.com commit 14e077f8006df9d2d7adf380f0c80e16d6a0a548 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:03 2024 -0700 drm/xe/oa: Add OAC support Similar to OAR, allow userspace to execute MI_REPORT_PERF_COUNT on compute engines of a specified exec queue. Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-12-ashutosh.dixit@intel.com commit 2f4a730fcd2d6ae7378a67fe78797b0a3f7ca1b3 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:02 2024 -0700 drm/xe/oa: Add OAR support Add OAR support to allow userspace to execute MI_REPORT_PERF_COUNT on render engines. Configuration batches are used to program the OAR unit, as well as modifying the render engine context image of a specified exec queue (to have correct register values when that context switches in). v2: Rename/refactor xe_oa_modify_self (Umesh) v3: Move IS_MI_LRI_CMD() into xe_oa.c (Michal) Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-11-ashutosh.dixit@intel.com commit efb315d0a013cdc8b1e49f5c07b1a2972bc624d4 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:01 2024 -0700 drm/xe/oa/uapi: Read file_operation Implement the OA stream read file_operation. Both blocking and non-blocking reads are supported. As part of read system call, the read copies OA perf data from the OA buffer to the user buffer, after appending packet headers for status and data packets. v2: Drop OA report headers, implement DRM_XE_PERF_IOCTL_STATUS (Umesh) v3: Introduce 'struct drm_xe_oa_stream_status' v4: Define oa_status register bitfields (Umesh) v5: Add extensions to 'struct drm_xe_oa_stream_status' v6: Minor cleanup, eliminate report32 variable v7: Use -EIO to signal to userspace to read OASTATUS using DRM_XE_PERF_IOCTL_STATUS, change previous sites returning -EIO to return -EINVAL Make drm_xe_oa_stream_status bits contiguous (Jose, Umesh) rmw oa_status bits (Umesh) Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-10-ashutosh.dixit@intel.com commit e936f885f1e96f59d9d05fb6cb5a02b9b9b88a05 Author: Ashutosh Dixit Date: Mon Jun 17 18:46:00 2024 -0700 drm/xe/oa/uapi: Expose OA stream fd The OA stream open perf op returns an fd with its own file_operations for the newly initialized OA stream. These file_operations allow userspace to enable or disable the stream, as well as apply a different metric configuration for the OA stream. Userspace can also poll for data availability. OA stream initialization is completed in this commit by enabling the OA stream. When sampling is enabled this starts a hrtimer which periodically checks for data availablility. v2: Use stream properties for stream reconfiguration with DRM_XE_PERF_IOCTL_CONFIG v3: Hold runtime_pm reference across oa buffer alloc/free v4: Fix 32 bit build Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-9-ashutosh.dixit@intel.com commit 1db9a9dc90aece0803a26a711b52a9492faefab7 Author: Ashutosh Dixit Date: Mon Jun 17 18:45:59 2024 -0700 drm/xe/oa: OA stream initialization (OAG) Implement majority of OA stream initialization (as part of OA stream open) ioctl). OAG buffer is allocated for receiving perf counter samples from HW. OAG unit is initialized and the selected OA metric configuration is programmed into OAG unit HW using a command/batch buffer. Acked-by: Rodrigo Vivi Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-8-ashutosh.dixit@intel.com commit b6fd51c6211910b1db072a3fa2a17ba85cb3dd51 Author: Ashutosh Dixit Date: Mon Jun 17 18:45:58 2024 -0700 drm/xe/oa/uapi: Define and parse OA stream properties Properties for OA streams are specified by user space, when the stream is opened, as a chain of drm_xe_ext_set_property struct's. Parse and validate these stream properties. v2: Remove struct drm_xe_oa_open_param (Harish Chegondi) Drop DRM_XE_OA_PROPERTY_POLL_OA_PERIOD_US (Umesh) Eliminate comparison with xe_oa_max_sample_rate (Umesh) Drop 'struct drm_xe_oa_record_header' (Umesh) v3: s/DRM_XE_OA_PROPERTY_OA_EXPONENT/ \ DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT/ (Jose) v4: Fix 32 bit build v5: Add non-static function kernel doc (Michal) Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-7-ashutosh.dixit@intel.com commit cdf02fe1a94a768cbcd20f5c4e1a1d805f4a06c0 Author: Ashutosh Dixit Date: Mon Jun 17 18:45:57 2024 -0700 drm/xe/oa/uapi: Add/remove OA config perf ops Introduce add/remove config perf ops for OA. OA configurations consist of a set of event/counter select register address/value pairs. The add_config perf op validates and stores such configurations and also exposes them in the metrics sysfs. These configurations will be programmed to OA unit HW when an OA stream using a configuration is opened. The OA stream can also switch to other stored configurations. v2: Start config id's from 1 and other minor review comments (Umesh) v3: Add 32 bit build v4: Add kernel doc for non-static functions (Michal) Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-6-ashutosh.dixit@intel.com commit a9f905ae7b6f29a337dda2ad773c08b92dafe9a5 Author: Ashutosh Dixit Date: Mon Jun 17 18:45:56 2024 -0700 drm/xe/oa/uapi: Initialize OA units Initialize OA unit data struct's for each gt during device probe. Also assign OA units for hardware engines. v2: Remove XE_OA_UNIT_OAG/XE_OA_UNIT_OAM_SAMEDIA_0 enum (Umesh) Change mtl_oa_base to 0x13000 (Umesh) v3: Switch to drmm_ functions and other cleanups (Michal) Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-5-ashutosh.dixit@intel.com commit 67977882a2f1339f0a7d32576ad61967828b2ca5 Author: Ashutosh Dixit Date: Mon Jun 17 18:45:55 2024 -0700 drm/xe/oa/uapi: Add OA data formats Add and initialize supported OA data formats for various platforms (including Xe2). User can request OA data in any supported format. Bspec: 52198, 60942, 61101 v2: Start 'xe_oa_format_name' enum from 0 (Umesh) Fix error rewind with OA (Umesh) v3: Use graphics versions rather than absolute platform names v4: Add missing kernel doc for struct memebers and enum and other minor changes (Michal) Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-4-ashutosh.dixit@intel.com commit fe8929bdf83512ed7e413a28e543c725bf536354 Author: Ashutosh Dixit Date: Mon Jun 17 18:45:54 2024 -0700 drm/xe/perf/uapi: Add perf_stream_paranoid sysctl Normally only superuser/root can access perf counter data. However, superuser can set perf_stream_paranoid sysctl to 0 to allow non-privileged users to also access perf data. perf_stream_paranoid is introduced at the perf layer to allow different perf stream types to share this access mechanism. v2: Add kernel doc for non-static functions (Michal) Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-3-ashutosh.dixit@intel.com commit 52c2e956dcebecc8901911217a9647203ebcaf3c Author: Ashutosh Dixit Date: Mon Jun 17 18:45:53 2024 -0700 drm/xe/perf/uapi: "Perf" layer to support multiple perf counter stream types In Xe, the plan is to support multiple types of perf counter streams (OA is only one type of these streams). Rather than introduce NxM ioctls for these (N perf streams with M ioctl's per perf stream), we decide to multiplex these (N different stream types and the M ops for each of these stream types) through a single PERF ioctl. This multiplexing is the purpose of the PERF layer. In addition to PERF DRM ioctl's, another set of ioctl's on the PERF fd are defined. These are expected to be common to different PERF stream types and therefore defined at the PERF layer itself. v2: Add param_size to 'struct drm_xe_perf_param' (Umesh) v3: Rename 'enum drm_xe_perf_ops' to 'enum drm_xe_perf_ioctls' (Guy Zadicario) Add DRM_ prefix to ioctl names to indicate uapi names v4: Add 'enum drm_xe_perf_op' previously missed out (Guy Zadicario) v5: Squash the ops and PERF layer patches into a single patch (Umesh) Remove param_size from struct 'drm_xe_perf_param' (Umesh) v6: Add DRM_XE_PERF_IOCTL_STATUS v7: Add DRM_XE_PERF_IOCTL_INFO v8: Fix Copyright years, fix DRM_XE_PERF_TYPE_MAX, move '#include "xe_perf.h"' to xe_perf.c, add kernel doc (Michal) Acked-by: Rodrigo Vivi Acked-by: Guy Zadicario Acked-by: José Roberto de Souza Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-2-ashutosh.dixit@intel.com commit 62712be3a4e03c8375f490bcab131441ab3a7af0 Author: Lucas De Marchi Date: Mon Jun 17 22:00:44 2024 -0700 drm/xe/xe2: Add proper check for media in Wa_14020756599 A temporary fixup was made in commit 24d0d98af1c3 ("drm/xe/xe2lpm: Fixup Wa_14020756599") due to limitations in the RTP infra. Now that RTP has support for OR condition that change can be removed. RTP now also supports checking any GT, so use that instead of the more specific xe_rtp_match_when_media2000() used in that commit. Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-6-lucas.demarchi@intel.com commit c8c00286f5c4bb3cafa4a6562711dff26fca6c8e Author: Lucas De Marchi Date: Mon Jun 17 22:00:43 2024 -0700 drm/xe/rtp: Add match on any GT One surprising factor of GRAPHICS_VERSION()/MEDIA_VERSION() matching for people adding new WAs is that it implicitly checks that the graphics/media IP under check is of that specific type and not that the device contains a media/graphics IP of that version. Add a new *_ANY_GT() variant that can be used in that case. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-5-lucas.demarchi@intel.com commit dc72c52a42e0255441bed7444ab16f2b6c98b681 Author: Lucas De Marchi Date: Mon Jun 17 22:00:42 2024 -0700 drm/xe/rtp: Allow to OR rules Some workarounds started to depend on different set of conditions where the action should be applied if any of them match. See e.g. commit 24d0d98af1c3 ("drm/xe/xe2lpm: Fixup Wa_14020756599"). Add XE_RTP_MATCH_OR that allows to implement a logical OR for the rules. Normal precedence applies: r1, r2, OR, r3 means (r1 AND r2) OR r3 The check is shortcut as soon as a set of conditions match. v2: Do not match on empty number of rules-other-than-OR evaluated Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-4-lucas.demarchi@intel.com commit 512660cd1f1ab60d4ab8a0ae25b507d10be40fb3 Author: Lucas De Marchi Date: Mon Jun 17 22:00:41 2024 -0700 drm/xe/rtp: Expand max rules/actions per entry Having at most 4 rules per entry is already reaching the maximum. Expand it to 6 to allow for more room. With the addition of OR condition for rules, this will very soon not be sufficient. Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-3-lucas.demarchi@intel.com commit 6045473650c40848122f5042b112606ce5d14406 Author: Lucas De Marchi Date: Mon Jun 17 22:00:40 2024 -0700 drm/xe/rtp: Allow to match 0 sr entries If none of the rules match, there should be 0 entries in the sr xarray, so none of them should have a register matching. Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-2-lucas.demarchi@intel.com commit 3dbc921479ea718586c9aa75d5b9191beeac691c Author: Roman Storozhenko Date: Sat Jun 15 14:56:17 2024 +0200 cpupower: Improve cpupower build process description Enhance cpupower build process description with the information on building and installing the utility to the user defined directories as well as with the information on the way of running the utility from the custom defined installation directory. Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit 705c80dfefb5471b84395011f04e2d93008b6795 Author: Roman Storozhenko Date: Sat Jun 15 15:26:13 2024 +0200 cpupower: Add 'help' target to the main Makefile Make "cpupower" building process more user friendly by adding 'help' target to the main makefile. This target describes various build and cleaning options available to the user. Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit a8f8c43082fd5a8ac723126f4a38bca08d277897 Author: Roman Storozhenko Date: Mon Jun 17 20:05:57 2024 +0200 cpupower: Replace a dead reference link with working ones Replace a dead reference link to a turbo boost technology description with a reference to a root page of the technology on the Intel site, and add another one, describing power management technology, which includes short description of the turbo boost. Signed-off-by: Roman Storozhenko Signed-off-by: Shuah Khan commit e0eeb938adb0367de4b0946125a06142d8de7d37 Author: Dan Carpenter Date: Tue Jun 11 15:38:12 2024 +0300 bitops: Add a comment explaining the double underscore macros Linus Walleij pointed out that a new comer might be confused about the difference between set_bit() and __set_bit(). Add a comment explaining the difference. Link: https://lore.kernel.org/all/CACRpkdZFPG_YLici-BmYfk9HZ36f4WavCN3JNotkk8cPgCODCg@mail.gmail.com/ Signed-off-by: Dan Carpenter Reviewed-by: Linus Walleij Signed-off-by: Yury Norov commit e334771d83ec14f755a554394162198a955e3faa Author: Jeff Johnson Date: Fri May 31 09:03:11 2024 -0700 lib: bitmap: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/find_bit_benchmark.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/cpumask_kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bitmap.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Yury Norov commit 5c563ee90a22d3295bcd6217e3ecd7bf9f4d9d48 Author: Yury Norov Date: Fri May 24 11:58:28 2024 -0700 cpumask: introduce assign_cpu() macro Now that assign_bit() is a thin macro wrapper around set_bit() and clear_bit(), we can use it in cpumask API and drop duplicating implementations of set_cpu_xxx() helpers with no additional overhead. Bloat-o-meter reports almost 2k less of generated code for allyesconfig, mostly in kernel/cpu.c: add/remove: 2/4 grow/shrink: 3/4 up/down: 498/-2228 (-1730) Reviewed-by: Alexander Lobakin Signed-off-by: Yury Norov commit e206f33e2c0774276a0497fe538472e12016a362 Author: Paul E. McKenney Date: Fri Jun 14 13:26:44 2024 -0700 srcu: Fill out polled grace-period APIs This commit adds the get_completed_synchronize_srcu() and the same_state_synchronize_srcu() functions. The first returns a cookie that is always interpreted as corresponding to an expired grace period. The second does an equality comparison of a pair of cookies. Signed-off-by: Paul E. McKenney Cc: Kent Overstreet commit d7b0615cb8d24737df436c9c00788c0f35e02c7b Author: Paul E. McKenney Date: Tue Jun 11 08:14:08 2024 -0700 srcu: Update cleanup_srcu_struct() comment Now that we have polled SRCU grace periods, a grace period can be started by start_poll_synchronize_srcu() as well as call_srcu(), synchronize_srcu(), and synchronize_srcu_expedited(). This commit therefore calls out this new start_poll_synchronize_srcu() possibility in the comment on the WARN_ON(). Signed-off-by: Paul E. McKenney commit 395e73bd8d35fa9b8505e44f63a2a10abde09cce Author: Paul E. McKenney Date: Sun Jun 9 20:12:19 2024 -0700 srcu: Add NUM_ACTIVE_SRCU_POLL_OLDSTATE This commit adds NUM_ACTIVE_SRCU_POLL_OLDSTATE, which gives the maximum number of distinct return values from get_state_synchronize_rcu() that can, at a given point in time, correspond to not-completed SRCU grace periods. Reported-by: Kent Overstreet Closes: https://lore.kernel.org/all/irycqy4sinjdgm2hkyix2bffunpcmuwgeufsx6nlljvqme3wiu@ify3zdnrmzph/ Signed-off-by: Paul E. McKenney commit 4b56b0f5d50c01ffb1372183f5c55e09764ca90e Author: Paul E. McKenney Date: Wed May 8 16:47:16 2024 -0700 srcu: Disable interrupts directly in srcu_gp_end() Interrupts are enabled in srcu_gp_end(), so this commit switches from spin_lock_irqsave_rcu_node() and spin_unlock_irqrestore_rcu_node() to spin_lock_irq_rcu_node() and spin_unlock_irq_rcu_node(). Link: https://lore.kernel.org/all/febb13ab-a4bb-48b4-8e97-7e9f7749e6da@moroto.mountain/ Reported-by: Dan Carpenter Signed-off-by: Paul E. McKenney commit 51cace13729f8954e5414bea9dbfaf80ebd41a69 Author: Paul E. McKenney Date: Wed May 8 10:28:43 2024 -0700 rcu: Disable interrupts directly in rcu_gp_init() Interrupts are enabled in rcu_gp_init(), so this commit switches from local_irq_save() and local_irq_restore() to local_irq_disable() and local_irq_enable(). Link: https://lore.kernel.org/all/febb13ab-a4bb-48b4-8e97-7e9f7749e6da@moroto.mountain/ Reported-by: Dan Carpenter Signed-off-by: Paul E. McKenney commit 6f948568fdc66429c9f70e2cecde0664655cc870 Author: Joel Fernandes (Google) Date: Tue Mar 19 14:54:57 2024 -0400 rcu/tree: Reduce wake up for synchronize_rcu() common case In the synchronize_rcu() common case, we will have less than SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker is pointless just to free the last injected wait head since at that point, all the users have already been awakened. Introduce a new counter to track this and prevent the wakeup in the common case. [ paulmck: Remove atomic_dec_return_release in cannot-happen state. ] Signed-off-by: Joel Fernandes (Google) Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit de6582833db0e695ba0c548e3cc2ad7dbb6aa260 Author: Danilo Krummrich Date: Tue Jun 18 17:48:35 2024 +0200 rust: add firmware abstractions Add an abstraction around the kernels firmware API to request firmware images. The abstraction provides functions to access the firmware's size and backing buffer. The firmware is released once the abstraction instance is dropped. Signed-off-by: Danilo Krummrich Acked-by: Boqun Feng Link: https://lore.kernel.org/r/20240618154841.6716-3-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit a674fefd17324fc467f043568e738b80ca22f2b4 Author: Danilo Krummrich Date: Tue Jun 18 17:48:34 2024 +0200 rust: add abstraction for struct device Add an (always) reference-counted abstraction for a generic C `struct device`. This abstraction encapsulates existing `struct device` instances and manages its reference count. Subsystems may use this abstraction as a base to abstract subsystem specific device instances based on a generic `struct device`, such as `struct pci_dev`. Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Signed-off-by: Danilo Krummrich Link: https://lore.kernel.org/r/20240618154841.6716-2-dakr@redhat.com Signed-off-by: Greg Kroah-Hartman commit 1189645629696658c27d4c619c8857f3c588daa8 Author: David Matlack Date: Fri May 3 11:17:34 2024 -0700 KVM: Mark a vCPU as preempted/ready iff it's scheduled out while running Mark a vCPU as preempted/ready if-and-only-if it's scheduled out while running. i.e. Do not mark a vCPU preempted/ready if it's scheduled out during a non-KVM_RUN ioctl() or when userspace is doing KVM_RUN with immediate_exit. Commit 54aa83c90198 ("KVM: x86: do not set st->preempted when going back to user space") stopped marking a vCPU as preempted when returning to userspace, but if userspace then invokes a KVM vCPU ioctl() that gets preempted, the vCPU will be marked preempted/ready. This is arguably incorrect behavior since the vCPU was not actually preempted while the guest was running, it was preempted while doing something on behalf of userspace. Marking a vCPU preempted iff its running also avoids KVM dirtying guest memory after userspace has paused vCPUs, e.g. for live migration, which allows userspace to collect the final dirty bitmap before or in parallel with saving vCPU state, without having to worry about saving vCPU state triggering writes to guest memory. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240503181734.1467938-4-dmatlack@google.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 4b23e0c199b20fa6fe9655b3d0e12d6c6f18c27f Author: David Matlack Date: Fri May 3 11:17:33 2024 -0700 KVM: Ensure new code that references immediate_exit gets extra scrutiny Ensure that any new KVM code that references immediate_exit gets extra scrutiny by renaming it to immediate_exit__unsafe in kernel code. All fields in struct kvm_run are subject to TOCTOU races since they are mapped into userspace, which may be malicious or buggy. To protect KVM, introduces a new macro that appends __unsafe to select field names in struct kvm_run, hinting to developers and reviewers that accessing such fields must be done carefully. Apply the new macro to immediate_exit, since userspace can make immediate_exit inconsistent with vcpu->wants_to_run, i.e. accessing immediate_exit directly could lead to unexpected bugs in the future. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240503181734.1467938-3-dmatlack@google.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit a6816314af5749cd88944bfdceb270c627cdf348 Author: David Matlack Date: Fri May 3 11:17:32 2024 -0700 KVM: Introduce vcpu->wants_to_run Introduce vcpu->wants_to_run to indicate when a vCPU is in its core run loop, i.e. when the vCPU is running the KVM_RUN ioctl and immediate_exit was not set. Replace all references to vcpu->run->immediate_exit with !vcpu->wants_to_run to avoid TOCTOU races with userspace. For example, a malicious userspace could invoked KVM_RUN with immediate_exit=true and then after KVM reads it to set wants_to_run=false, flip it to false. This would result in the vCPU running in KVM_RUN with wants_to_run=false. This wouldn't cause any real bugs today but is a dangerous landmine. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240503181734.1467938-2-dmatlack@google.com Signed-off-by: Sean Christopherson commit 438a496b9041402736e164c8ebf1368599903958 Author: Mathias Krause Date: Fri Jun 14 22:28:59 2024 +0200 KVM: selftests: Test vCPU boot IDs above 2^32 and MAX_VCPU_ID The KVM_SET_BOOT_CPU_ID ioctl missed to reject invalid vCPU IDs. Verify this no longer works and gets rejected with an appropriate error code. Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240614202859.3597745-6-minipli@grsecurity.net [sean: add test for MAX_VCPU_ID+1, always do negative test] Signed-off-by: Sean Christopherson commit 6914ee9cd1b0c91bd2fb4dbe204947c3c31259e1 Author: Charles Keepax Date: Tue Jun 11 14:25:54 2024 +0100 spi: cs42l43: Refactor accessing the SDCA extension properties Refactor accessing the SDCA extension properties to make it easier to access multiple properties to assist with future features. Return the node itself and allow the caller to read the actual properties. Signed-off-by: Charles Keepax Link: https://msgid.link/r/20240611132556.1557075-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 4b451a57809cacec00978c36c97b1c9b53cde664 Author: Mathias Krause Date: Fri Jun 14 22:28:58 2024 +0200 KVM: selftests: Test max vCPU IDs corner cases The KVM_CREATE_VCPU ioctl ABI had an implicit integer truncation bug, allowing 2^32 aliases for a vCPU ID by setting the upper 32 bits of a 64 bit ioctl() argument. It also allowed excluding a once set boot CPU ID. Verify this no longer works and gets rejected with an error. Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240614202859.3597745-5-minipli@grsecurity.net [sean: tweak assert message+comment for 63:32!=0 testcase] Signed-off-by: Sean Christopherson commit d29bf2ca140410705447ac26100a149b51094c00 Author: Sean Christopherson Date: Fri Jun 14 22:28:57 2024 +0200 KVM: x86: Prevent excluding the BSP on setting max_vcpu_ids If the BSP vCPU ID was already set, ensure it doesn't get excluded when limiting vCPU IDs via KVM_CAP_MAX_VCPU_ID. [mks: provide commit message, code by Sean] Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240614202859.3597745-4-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit 7c305d5118e67d1773158304f1d5128949aea726 Author: Mathias Krause Date: Fri Jun 14 22:28:56 2024 +0200 KVM: x86: Limit check IDs for KVM_SET_BOOT_CPU_ID Do not accept IDs which are definitely invalid by limit checking the passed value against KVM_MAX_VCPU_IDS and 'max_vcpu_ids' if it was already set. This ensures invalid values, especially on 64-bit systems, don't go unnoticed and lead to a valid id by chance when truncated by the final assignment. Fixes: 73880c80aa9c ("KVM: Break dependency between vcpu index in vcpus array and vcpu_id.") Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240614202859.3597745-3-minipli@grsecurity.net Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 8b8e57e5096e47ca842c100c25667195017014ae Author: Mathias Krause Date: Fri Jun 14 22:28:55 2024 +0200 KVM: Reject overly excessive IDs in KVM_CREATE_VCPU If, on a 64 bit system, a vCPU ID is provided that has the upper 32 bits set to a non-zero value, it may get accepted if the truncated to 32 bits integer value is below KVM_MAX_VCPU_IDS and 'max_vcpus'. This feels very wrong and triggered the reporting logic of PaX's SIZE_OVERFLOW plugin. Instead of silently truncating and accepting such values, pass the full value to kvm_vm_ioctl_create_vcpu() and make the existing limit checks return an error. Even if this is a userland ABI breaking change, no sane userland could have ever relied on that behaviour. Reported-by: PaX's SIZE_OVERFLOW plugin running on grsecurity's syzkaller Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface") Cc: Emese Revfy Cc: PaX Team Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240614202859.3597745-2-minipli@grsecurity.net [sean: tweak comment about INT_MAX assertion] Signed-off-by: Sean Christopherson commit 34935cd4721f0492eafbc516dd1fc7f5f687fa76 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:36 2024 +0200 ASoC: codecs: wcd939x: Drop unused num_ports field The driver does not use few 'num_ports' in 'struct wcd939x_sdw_priv'. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-23-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 2642b6aa9d0f43c52c83461bc7ae4917336e7643 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:35 2024 +0200 ASoC: codecs: wcd939x: Drop unused RX/TX direction enum The enum with RX/TX soundwire direction is not used. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-22-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit f49100faccb5d2ffb4c9e5e4bba6173f5ac43d22 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:34 2024 +0200 ASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info Driver does not modify static wcd939x_sdw_ch_info array, so it can be made const for code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-21-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 8e5d5b2c96fadecdaebff5afcbb7f51580701122 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:33 2024 +0200 ASoC: codecs: wcd939x: Constify static data Driver does not modify few static data (MBHC reg fields, IRQ chip), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 3f1deca19e68e48bd89a72c4fe648275d9af574b Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:32 2024 +0200 ASoC: codecs: wcd938x: Drop unused num_ports field The driver does not use few 'num_ports' in 'struct wcd938x_sdw_priv'. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-19-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 43e7400f6bf51ecedf4ddad942cd812fe351ce74 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:31 2024 +0200 ASoC: codecs: wcd938x: Drop unused RX/TX direction enum The enum with RX/TX soundwire direction is not used. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-18-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit af57d5e3b58886ee5efc6ba9d0e25c8d1d3c3c37 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:30 2024 +0200 ASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info Driver does not modify static wcd938x_sdw_ch_info array, so it can be made const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-17-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 424e6bc4328b39a924cc2acb251868cfd23fe369 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:29 2024 +0200 ASoC: codecs: wcd938x: Constify static data Driver does not modify few static data (MBHC reg fields, IRQ chip), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-16-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 6dc7b8a10419a267cd5eb7ac2bb407f7fc7865e2 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:28 2024 +0200 ASoC: codecs: wcd937x: Drop unused chipid member The driver stores the read chipid in 'struct wcd937x_priv' but never needs it after. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-15-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit c2d9fd2e94588eb83f8855e942d77b5f539c5a5f Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:27 2024 +0200 ASoC: codecs: wcd937x: Drop unused state container fields The driver does not use few 'struct wcd937x_priv' and 'struct wcd937x_sdw_priv' members, so just drop them for smaller code. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-14-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit d8e746719d705427e69c7f0ac2ca20aaf560a03e Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:26 2024 +0200 ASoC: codecs: wcd937x: Drop unused enums, defines and types Few declarations (defines, struct codec_port_info, enums) are not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-13-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit c8ed66cbc3b7ccd9e5ae98b06023c1fe3e834ca8 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:25 2024 +0200 ASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info Driver does not modify static wcd937x_sdw_ch_info array, so it can be made const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-12-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 0ad42c04e9b223d913ad4b1463c0f1cdc00f3cc5 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:24 2024 +0200 ASoC: codecs: wcd937x: Constify static data Driver does not modify few static data (MBHC reg fields, IRQ chip), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-11-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 9ea22713227397b56a2b36a68c8bda13f0b43d70 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:23 2024 +0200 ASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe() wcd934x_codec_parse_data() function is called only from probe(), so printing errors on resource acquisition is discouraged, because it can pollute dmesg in case of probe deferral. The actual deferral is here unlikely, but still the code is a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-10-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit a252188244aeff72e4331abba2fee6b9093c847b Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:22 2024 +0200 ASoC: codecs: wcd934x: Drop unused mic bias voltage fields Driver stores the voltage of mic bias in fields in state container structure, but actually never reads them - except for the mic2 bias (micb2_mv field). Drop the fields from the structure so the code will be a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-9-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 5ad81bf49a18dc22bd7e1c56f67be9b5eb50267c Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:21 2024 +0200 ASoC: codecs: wcd934x: Constify static data Driver does not modify few static data (arrays with sample rates, MBHC reg fields, regmap config), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-8-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 1bce5c586ba56dfa6acf8d13f0f608f5f5d717bd Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:20 2024 +0200 ASoC: codecs: wcd934x: Drop unused interp path enum The enum with inter path is not used. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-7-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 1d1cda22da5db03a0c794d139e06519e3a94f815 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:19 2024 +0200 ASoC: codecs: wcd9335: Drop unused dmic rate handling Driver was prepared to adjust DMIC microphone parameters according to DMIC clock rate which is read from platform data or Devicetree. The latter part never happened, so the code is always called with dmic_clk_rate=0, prints error and uses default/fallback values. All this part can be simplified by dropping dead parts of code. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-6-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 3ed4beba49463997eb9a4afa0d46ece7dc5dbf19 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:18 2024 +0200 ASoC: codecs: wcd9335: Drop unneeded error message Error-level should not be used as debugging. The code (function wcd9335_get_dmic_clk_val()) will always be called with same parameters, so this is not really useful debug anyway, so drop it. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-5-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 4a03b5dbad466c902d522f3405daa4e5d80578c5 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:17 2024 +0200 ASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe() wcd9335_parse_dt() function is called only from probe(), so printing errors on resource acquisition is discouraged, because it can pollute dmesg. Use dev_err_probe() to fix this and also make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-4-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit b2ff7c88bf751fa502f5707f0b7b047afcba87dc Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:16 2024 +0200 ASoC: codecs: wcd9335: Constify static data Driver does not modify few static data (arrays with sample rates, interrupt description, regmap config), so make them const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-3-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 60ce48f5311103dd7a09e12d0b75d7ec44e291d9 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:15 2024 +0200 ASoC: codecs: wcd9335: Drop unused state container fields The driver does not use few 'struct wcd9335_codec' members, so just drop them for smaller code. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-2-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit e565ab184946650f19afb9fe74f8be84fcb6d210 Author: Krzysztof Kozlowski Date: Wed Jun 12 18:15:14 2024 +0200 ASoC: codecs: wcd-mbhc: Constify passed MBHC reg fields The wcd-mbhc-v2 helper code/module does not modify passed array of registry fields, thus it can be made const for code safety. It will also allow individual drivers to allocate the array in rodata. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-1-0d15885b2a06@linaro.org Signed-off-by: Mark Brown commit 9f774c757e3fb2ac32dc4377e8f21f3364a8df81 Author: Shenghao Ding Date: Fri Jun 14 21:36:45 2024 +0800 ASoc: tas2781: Enable RCA-based playback without DSP firmware download In only loading RCA (Reconfigurable Architecture) binary case, no DSP program will be working inside tas2563/tas2781, that is dsp-bypass mode, do not support speaker protection, or audio acoustic algorithms in this mode. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Shenghao Ding Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240614133646.910-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 7109f10ca4225c4a7e47dee5eab0d8d72edbf324 Author: Kuninori Morimoto Date: Tue Jun 18 00:10:15 2024 +0000 ASoC: dt-bindings: audio-graph-card2: add support for aux devices Add device tree property to define auxiliary devices to be added to Audio Graph Card which is already supported on Simle Card. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87jzin3yc8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 93f12a75682698ad4d2614b88cc68f52bb8fb917 Author: Andrejs Cainikovs Date: Thu Jun 13 10:46:52 2024 +0200 ASoC: nau8822: add MCLK support This change adds MCLK clock handling directly within driver. When used in combination with simple-audio-card, and mclk-fs is set, simple-audio-card will change MCLK frequency before configuring PLL. In some cases, however, MCLK reference clock should be static (see [1]), which means it needs to be moved away from simple-audio-card. [1]: https://lore.kernel.org/all/ZfBdxrzX3EnPuGOn@ediswmail9.ad.cirrus.com/ Signed-off-by: Andrejs Cainikovs Link: https://msgid.link/r/20240613084652.13113-4-andrejs.cainikovs@gmail.com Signed-off-by: Mark Brown commit 9c3b21cc8528d52321c66236c3b794300c78d9e6 Author: Andrejs Cainikovs Date: Thu Jun 13 10:46:51 2024 +0200 ASoC: nau8822: set NAU8822_REFIMP_80K only once Following bias state machine logic this bit is set twice before playback. This change makes sure this bit set is set only once. Signed-off-by: Andrejs Cainikovs Suggested-by: Emanuele Ghidoli Link: https://msgid.link/r/20240613084652.13113-3-andrejs.cainikovs@gmail.com Signed-off-by: Mark Brown commit 9292013bd3738bd00ee78bf1705620a9881031b5 Author: Andrejs Cainikovs Date: Thu Jun 13 10:46:50 2024 +0200 ASoC: nau8822: move nau8822_set_dai_sysclk() Next commit in series makes a change which calls nau8822_set_pll() from nau8822_set_dai_sysclk(). Moving latter after the former would avoid a forward declaration, and this is exactly what this change does. Signed-off-by: Andrejs Cainikovs Link: https://msgid.link/r/20240613084652.13113-2-andrejs.cainikovs@gmail.com Signed-off-by: Mark Brown commit 618b29a346979aedcb80f19a97a3f23fa757bc7e Author: Jeff Johnson Date: Wed Jun 12 22:45:23 2024 -0700 PCI: acpiphp: Add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/hotplug/acpiphp_ampere_altra.o Add the missing MODULE_DESCRIPTION(). Link: https://lore.kernel.org/r/20240612-md-drivers-pci-hotplug-v1-1-2b30d14d783d@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Bjorn Helgaas commit bb7e5a193d8becf3920e3848287f1b23c5fc9b24 Author: Yu Kuai Date: Tue Jun 18 11:27:53 2024 +0800 block, bfq: remove blkg_path() After commit 35fe6d763229 ("block: use standard blktrace API to output cgroup info for debug notes"), the field 'bfqg->blkg_path' is not used and hence can be removed, and therefor blkg_path() is not used anymore and can be removed. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240618032753.3502528-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 1ac6ac9ec069ed0cfdb1c207ae23f6c40ac57437 Author: Jocelyn Falempe Date: Thu Jun 13 17:40:16 2024 +0200 drm/panic: depends on !VT_CONSOLE The race condition between fbcon and drm_panic can only occurs if VT_CONSOLE is set. So update drm_panic dependency accordingly. This will make it easier for Linux distributions to enable drm_panic by disabling VT_CONSOLE, and keeping fbcon terminal. The only drawback is that fbcon won't display the boot kmsg, so it should rely on userspace to do that. At least plymouth already handle this case with https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/224 Suggested-by: Daniel Vetter Signed-off-by: Jocelyn Falempe Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240613154041.325964-1-jfalempe@redhat.com commit 699383466851e3fb8284e1eefeed78ec30989b3b Author: Stanislav Jakubek Date: Mon Jun 17 18:36:29 2024 +0200 dt-bindings: hwmon: ti,tmp108: document V+ supply, add short description TMP108 is powered by its V+ supply, document it. The property is called "vcc-supply" since the plus sign (+) is not an expected character. While at it, add a short description with a link to its datasheets. Signed-off-by: Stanislav Jakubek Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/ZnBmDXfnDQXNXz3k@standask-GA-A55M-S2HP Signed-off-by: Guenter Roeck commit 447360d75cf473d4b1048a7204443262f3f60758 Author: Alexander Gordeev Date: Mon Jun 10 17:10:48 2024 +0200 s390/sclp: Define commands for storage (un)assignment Replace immediate values with SCLP_CMDW_UN|ASSIGN_STORAGE defines. Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20240610151048.2548428-1-agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 39976f1278a97d79e758ceb59fe613764844c9c3 Author: Sven Schnelle Date: Mon Jun 10 13:45:33 2024 +0200 s390: Remove S390_lowcore With all users gone, remove S390_lowcore. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 81f907b246f35b4cc5cb38b86b633601b76d17e8 Author: Sven Schnelle Date: Mon Jun 10 13:45:32 2024 +0200 s390/mm: Remove duplicate get_lowcore() calls Assign the output from get_lowcore() to a local variable, so the code is easier to read. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 15428734e1da88c40924e6788403171c8dff7cf8 Author: Sven Schnelle Date: Mon Jun 10 13:45:31 2024 +0200 s390/idle: Remove duplicate get_lowcore() calls Assign the output from get_lowcore() to a local variable, so the code is easier to read. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 46c3031108e83a63007cf2f4c9a379875825e972 Author: Sven Schnelle Date: Mon Jun 10 13:45:30 2024 +0200 s390/vtime: Remove duplicate get_lowcore() calls Assign the output from get_lowcore() to a local variable, so the code is easier to read. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit eb28ec2b2e55c58148fa07eb994af11e6099e748 Author: Sven Schnelle Date: Mon Jun 10 13:45:29 2024 +0200 s390/smp: Remove duplicate get_lowcore() calls Assign the output from get_lowcore() to a local variable, so the code is easier to read. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit d7c3ebc49eb72e9c8142fed49e9c9ec21815810c Author: Sven Schnelle Date: Mon Jun 10 13:45:28 2024 +0200 s390/nmi: Remove duplicate get_lowcore() calls Assign the output from get_lowcore() to a local variable, so the code is easier to read. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit bbf786061dbe38135b76f2cde9e72aec624eb710 Author: Sven Schnelle Date: Mon Jun 10 13:45:27 2024 +0200 s390/boot: Replace S390_lowcore by get_lowcore() Replace all S390_lowcore usages in arch/s390/boot by get_lowcore(). Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit eafcd205b1a6f32879c347d717b1ce3bdfdcc7c6 Author: Sven Schnelle Date: Mon Jun 10 13:45:26 2024 +0200 s390/drivers: Replace S390_lowcore by get_lowcore() Replace all S390_lowcore usages in drivers/s390 by get_lowcore(). Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 208da1d5fc3c67d8ae5d34e844fd67cc47a136f0 Author: Sven Schnelle Date: Mon Jun 10 13:45:25 2024 +0200 s390: Replace S390_lowcore by get_lowcore() Replace all S390_lowcore usages in arch/s390/ by get_lowcore(). Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 7e8f89e5e05983089be1d431f1c82e5abc37574a Author: Sven Schnelle Date: Mon Jun 10 13:45:24 2024 +0200 s390: Add get_lowcore() function Add a get_lowcore() function which returns the address of lowcore (currently always NULL). This function will be used as a replacement of the S390_lowcore macro. Acked-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 634f3b4e7dde3827e3b81306416ec306b323e39b Author: Simon Trimmer Date: Tue Jun 18 14:00:11 2024 +0100 ALSA: hda: cs35l56: Perform firmware download in the background It is possible that during system boot when there multiple devices attempting simultaneous initialization on a slow control bus the download of firmware and tuning data may take a user perceivable amount of time (a slow I2C bus with 4 amps this work could take over 2 seconds). Adopt a pattern used in the ASoC driver and perform this activity in a background thread so that interactive performance is not impaired. The system_long_wq is a parallel workqueue and driver instances will perform their firmware downloads in parallel to make best use of available bus bandwidth. Signed-off-by: Simon Trimmer Link: https://lore.kernel.org/20240618130011.62860-1-simont@opensource.cirrus.com Signed-off-by: Takashi Iwai commit fca3eff7d36bcd1a51d2c256ccebbe3617d4fe3a Author: Ricardo B. Marliere Date: Sun Feb 4 17:25:51 2024 -0300 parport: make parport_bus_type const Now that the driver core can properly handle constant struct bus_type, move the parport_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240204-bus_cleanup-parport-v1-1-e6a0f756bbb8@marliere.net Signed-off-by: Greg Kroah-Hartman commit 8c379e3ce404347acf35fbb4cf8694dd8d35f2a0 Author: Christophe JAILLET Date: Sun Jun 16 09:57:56 2024 +0200 net: microchip: Constify struct vcap_operations "struct vcap_operations" are not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct vcap_control" also needs to be adjusted to this new const qualifier. As an example, on a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 15176 1094 16 16286 3f9e drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o After: ===== text data bss dec hex filename 15268 998 16 16282 3f9a drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o Signed-off-by: Christophe JAILLET Reviewed-by: Daniel Machon Link: https://lore.kernel.org/r/d8e76094d2e98ebb5bfc8205799b3a9db0b46220.1718524644.git.christophe.jaillet@wanadoo.fr Signed-off-by: Paolo Abeni commit 6c01001414ce477311d872c40e23dfec4866d608 Author: Ricard Wanderlof Date: Fri Jun 7 17:22:05 2024 +0200 ASoC: tlv320adc3xxx: Add support for using MICBIAS pins as GPO Add boolean ti,micbias1-gpo and ti,micbias2-gpo devicetree properties. When set, the respective MICBIAS pins can be used as general purpose outputs controlled via the GPIO framework, in addition to the two configurable GPIO pins. This is useful in applications where the MICBIAS functionality is not required, but it is useful to have a couple of extra GPIO pins. The voltage on the respective MICBIAS pin in the active state is governed by the ti,micbias1-vg and ti,micbias2-vg properties, respectively (same properties as when the pins are used as MICBIAS pins). Signed-off-by: Ricard Wanderlof Link: https://msgid.link/r/20240607-tlv320adc3xxx-micbias-gpo-v3-2-59dbec8b98f4@axis.com Signed-off-by: Mark Brown commit 4e617f0cb2dd9675a3b2707c10d89f0f5303ad1e Author: Ricard Wanderlof Date: Fri Jun 7 17:22:04 2024 +0200 ASoC: dt-bindings: tlv320adc3xxx: Add MICBIAS-as-GPO properties Add properties for configuring the MICBIAS pins as general purpose outputs, with some limitations: The voltage on the pin when activated may be set using another property to 2.0 V, 2.5 V or AVDD. When deactivated the pin will float. Signed-off-by: Ricard Wanderlof Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240607-tlv320adc3xxx-micbias-gpo-v3-1-59dbec8b98f4@axis.com Signed-off-by: Mark Brown commit 24790a3cd1bdc083f9989f2fdb223f6494ebc99c Author: Krzysztof Kozlowski Date: Thu Jun 6 11:49:22 2024 +0100 ASoC: qcom: x1e80100: Add USB DisplayPort plug support Add support for handling jack events of USB (DisplayPort). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # X13s Link: https://msgid.link/r/20240606104922.114229-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 7e815bb9abd16f99c987987242a9fe13dfa0f052 Author: Srinivas Kandagatla Date: Thu Jun 6 11:49:21 2024 +0100 ASoC: qcom: sc8280xp: add Display port Jack Add support for Display Port Jack events. Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # X13s Link: https://msgid.link/r/20240606104922.114229-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 735db4ea16caaebf8e4884ec0c2e419c96391ac8 Author: Srinivas Kandagatla Date: Thu Jun 6 11:49:20 2024 +0100 ASoC: qcom: common: add Display port Jack function Add a common function to add Display port jack. Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # X13s Link: https://msgid.link/r/20240606104922.114229-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 6d620e50bb055e072c8c50cf95cd397fc24378c2 Author: Srinivas Kandagatla Date: Thu Jun 6 11:49:19 2024 +0100 ASoC: qcom: q6dsp: parse Display port tokens Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # X13s Link: https://msgid.link/r/20240606104922.114229-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit de267e7a6ea8e6fa29af2287adfc9fc9d87e6dc9 Author: Krzysztof Kozlowski Date: Mon Jun 17 15:03:23 2024 +0200 ASoC: Constify return of snd_soc_dai_get_pcm_stream() Returned 'struct snd_soc_pcm_stream' by snd_soc_dai_get_pcm_stream() is not modified by the users, so it can be changed as pointer to const. This is a necessary step towards making the 'dai->driver' a pointer to const. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-5-8004f346ee38@linaro.org Signed-off-by: Mark Brown commit 785d64c4941221044940ab199e6625af17296470 Author: Krzysztof Kozlowski Date: Mon Jun 17 15:03:22 2024 +0200 ASoC: Constify DAI passed to get_channel_map get_channel_map() is supposed to obtain map of channels without modifying the state of the given DAI, so make the pointer to 'struct snd_soc_dai' as pointing to const. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-4-8004f346ee38@linaro.org Signed-off-by: Mark Brown commit f3ac3da7e4d0957b3402fb31a4ca480e739e086f Author: Krzysztof Kozlowski Date: Mon Jun 17 15:03:21 2024 +0200 ASoC: Constify passed data to core function Several ASoC functions receive pointers to data which is not modified, e.g. pointers to 'snd_soc_dai', 'snd_soc_pcm_runtime', 'snd_pcm_hw_params' and 'snd_soc_dai_link'. All these pointers can be made as a pointer to const. This makes code safer, serves as clear annotation of function's intentions (no ownership passed to the function, no modifications) and allows putting pointed structures in rodata (if ever applicable). Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-3-8004f346ee38@linaro.org Signed-off-by: Mark Brown commit 020b37d06f97de289940805bc821190d5858eda0 Author: Krzysztof Kozlowski Date: Mon Jun 17 15:03:20 2024 +0200 ASoC: Constify of_phandle_args in snd_soc_dai_link_component ASoC core code does not modify contents of 'of_phandle_args' in 'struct snd_soc_dai_link_component', so the pointer can be made as a pointer to const. This makes code safer, serves as clear annotation of core's intentions and allows putting pointed structures in rodata (if ever applicable). Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-2-8004f346ee38@linaro.org Signed-off-by: Mark Brown commit 2fbafecb0f05818e25f6c926c6f9ad9ef597429c Author: Krzysztof Kozlowski Date: Mon Jun 17 15:03:19 2024 +0200 ASoC: Constify of_phandle_args in snd_soc_dai_driver ASoC core code does not modify contents of 'of_phandle_args' in 'struct snd_soc_dai_driver', so the pointer can be made as a pointer to const. This makes code safer, serves as clear annotation of core's intentions and allows putting pointed structures in rodata (if ever applicable). Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-1-8004f346ee38@linaro.org Signed-off-by: Mark Brown commit 2d93937089be98713e27460e3d3a135668c8541b Author: Jeff Johnson Date: Mon Jun 17 20:14:03 2024 -0700 fbdev: amifb: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/amifb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit 24aa3eea5921330fcefa90b536b9db9f759d1faf Author: Jeff Johnson Date: Mon Jun 17 20:05:34 2024 -0700 fbdev: c2p_planar: add missing MODULE_DESCRIPTION() macro With ARCH=m68k, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/c2p_planar.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit c2bc958b2b03e361f14df99983bc64a39a7323a3 Author: Thomas Zimmermann Date: Mon Jun 17 13:06:27 2024 +0200 fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes Test the vesa_attributes field in struct screen_info for compatibility with VGA hardware. Vesafb currently tests bit 1 in screen_info's capabilities field which indicates a 64-bit lfb address and is unrelated to VGA compatibility. Section 4.4 of the Vesa VBE 2.0 specifications defines that bit 5 in the mode's attributes field signals VGA compatibility. The mode is compatible with VGA hardware if the bit is clear. In that case, the driver can access VGA state of the VBE's underlying hardware. The vesafb driver uses this feature to program the color LUT in palette modes. Without, colors might be incorrect. The problem got introduced in commit 89ec4c238e7a ("[PATCH] vesafb: Fix incorrect logo colors in x86_64"). It incorrectly stores the mode attributes in the screen_info's capabilities field and updates vesafb accordingly. Later, commit 5e8ddcbe8692 ("Video mode probing support for the new x86 setup code") fixed the screen_info, but did not update vesafb. Color output still tends to work, because bit 1 in capabilities is usually 0. Besides fixing the bug in vesafb, this commit introduces a helper that reads the correct bit from screen_info. Signed-off-by: Thomas Zimmermann Fixes: 5e8ddcbe8692 ("Video mode probing support for the new x86 setup code") Reviewed-by: Javier Martinez Canillas Cc: # v2.6.23+ Signed-off-by: Helge Deller commit b03c3519498ce1c96a4e2fe10f200cdeda3c3500 Author: Kuninori Morimoto Date: Mon Jun 17 00:59:39 2024 +0000 fbdev: omapfb: use of_graph_get_remote_port() We already have of_graph_get_remote_port(), Let's use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Signed-off-by: Helge Deller commit 175ee8f196d7b057520ed6893217a42e3d121234 Author: Kuninori Morimoto Date: Mon Jun 17 00:59:33 2024 +0000 fbdev: omapdss: use for_each_endpoint_of_node() We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Signed-off-by: Helge Deller commit 41f60a627e64b79e441687d77149cf6b0eda6bd0 Author: Linus Walleij Date: Tue Jun 18 13:26:07 2024 +0200 pinctrl: freescale: Select missing features Fix the compile problem for pinctrl-imx-scmi by selecting the right core features so the symbols resolve. Fixes: 1e37f761d016 ("pinctrl: imx: support SCMI pinctrl protocol for i.MX95") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406172317.Sds860AS-lkp@intel.com/ Link: https://lore.kernel.org/20240618-imx-scmi-generic-v1-1-67808a48beac@linaro.org Signed-off-by: Linus Walleij commit e845bb84fb6ec57f979cfba40e794c6e8b249585 Merge: 041cc86b3653c 5dfabcdd76b14 Author: Paolo Abeni Date: Tue Jun 18 13:28:29 2024 +0200 Merge branch 'introduce-phy-mode-10g-qxgmii' Luo Jie says: ==================== Introduce PHY mode 10G-QXGMII This patch series adds 10G-QXGMII mode for PHY driver. The patch series is split from the QCA8084 PHY driver patch series below. https://lore.kernel.org/all/20231215074005.26976-1-quic_luoj@quicinc.com/ Per Andrew Lunn’s advice, submitting this patch series for acceptance as they already include the necessary 'Reviewed-by:' tags. This way, they need not wait for QCA8084 series patches to conclude review. Changes in v2: * remove PHY_INTERFACE_MODE_10G_QXGMII from workaround of validation in the phylink_validate_phy. 10G_QXGMII will be set into phy->possible_interfaces in its .config_init method of PHY driver that supports it. ==================== Link: https://lore.kernel.org/r/20240615120028.2384732-1-quic_luoj@quicinc.com Signed-off-by: Paolo Abeni commit 5dfabcdd76b1455c5378abbcb2e68285cf7eb554 Author: Vladimir Oltean Date: Sat Jun 15 20:00:28 2024 +0800 dt-bindings: net: ethernet-controller: add 10g-qxgmii mode Add the new interface mode 10g-qxgmii, which is similar to usxgmii but extend to 4 channels to support maximum of 4 ports with the link speed 10M/100M/1G/2.5G. Signed-off-by: Vladimir Oltean Signed-off-by: Luo Jie Acked-by: Conor Dooley Reviewed-by: Andrew Lunn Signed-off-by: Paolo Abeni commit 777b8afb8179155353ec14b1d8153122410aba29 Author: Vladimir Oltean Date: Sat Jun 15 20:00:27 2024 +0800 net: phy: introduce core support for phy-mode = "10g-qxgmii" 10G-QXGMII is a MAC-to-PHY interface defined by the USXGMII multiport specification. It uses the same signaling as USXGMII, but it multiplexes 4 ports over the link, resulting in a maximum speed of 2.5G per port. Some in-tree SoCs like the NXP LS1028A use "usxgmii" when they mean either the single-port USXGMII or the quad-port 10G-QXGMII variant, and they could get away just fine with that thus far. But there is a need to distinguish between the 2 as far as SerDes drivers are concerned. Signed-off-by: Vladimir Oltean Signed-off-by: Luo Jie Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit 041cc86b3653cbcdf6ab96c2f2ae34f3d0a99b0a Author: Furong Xu <0x1207@gmail.com> Date: Sat Jun 15 17:56:11 2024 +0800 net: stmmac: Enable TSO on VLANs The TSO engine works well when the frames are not VLAN Tagged. But it will produce broken segments when frames are VLAN Tagged. The first segment is all good, while the second segment to the last segment are broken, they lack of required VLAN tag. An example here: ======== // 1st segment of a VLAN Tagged TSO frame, nothing wrong. MacSrc > MacDst, ethertype 802.1Q (0x8100), length 1518: vlan 100, p 1, ethertype IPv4 (0x0800), HostA:42643 > HostB:5201: Flags [.], seq 1:1449 // 2nd to last segments of a VLAN Tagged TSO frame, VLAN tag is missing. MacSrc > MacDst, ethertype IPv4 (0x0800), length 1514: HostA:42643 > HostB:5201: Flags [.], seq 1449:2897 MacSrc > MacDst, ethertype IPv4 (0x0800), length 1514: HostA:42643 > HostB:5201: Flags [.], seq 2897:4345 MacSrc > MacDst, ethertype IPv4 (0x0800), length 1514: HostA:42643 > HostB:5201: Flags [.], seq 4345:5793 MacSrc > MacDst, ethertype IPv4 (0x0800), length 1514: HostA:42643 > HostB:5201: Flags [P.], seq 5793:7241 // normal VLAN Tagged non-TSO frame, nothing wrong. MacSrc > MacDst, ethertype 802.1Q (0x8100), length 1022: vlan 100, p 1, ethertype IPv4 (0x0800), HostA:42643 > HostB:5201: Flags [P.], seq 7241:8193 MacSrc > MacDst, ethertype 802.1Q (0x8100), length 70: vlan 100, p 1, ethertype IPv4 (0x0800), HostA:42643 > HostB:5201: Flags [F.], seq 8193 ======== When transmitting VLAN Tagged TSO frames, never insert VLAN tag by HW, always insert VLAN tag to SKB payload, then TSO works well on VLANs for all MAC cores. Tested on DWMAC CORE 5.10a, DWMAC CORE 5.20a and DWXGMAC CORE 3.20a Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240615095611.517323-1-0x1207@gmail.com Signed-off-by: Paolo Abeni commit f900a055f8e279a0f572f54f57b967a99aa7a465 Author: Takashi Iwai Date: Mon Jun 17 12:05:27 2024 +0200 ALSA: spi: Drop NULL check for snd_ctl_remove() Since snd_ctl_remove() accepts the NULL kcontrol argument now, we can drop the check in the caller side. Link: https://lore.kernel.org/20240617100529.6667-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9d67a4006f7219577c5c4502d43892feb8773aa6 Author: Takashi Iwai Date: Mon Jun 17 12:05:26 2024 +0200 ALSA: hda: Drop NULL check for snd_ctl_remove() Since snd_ctl_remove() accepts the NULL kcontrol argument now, we can drop the check in the caller side. Link: https://lore.kernel.org/20240617100529.6667-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4d4500b4396a226d159b2633b091c0b65509b24a Author: Takashi Iwai Date: Mon Jun 17 12:05:24 2024 +0200 ALSA: sb: Drop NULL check for snd_ctl_remove() Since snd_ctl_remove() accepts the NULL kcontrol argument now, we can drop the check in the caller side. Link: https://lore.kernel.org/20240617100529.6667-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit e946455ce116fd822718d6acd874f3f4cf306520 Author: Takashi Iwai Date: Mon Jun 17 12:05:23 2024 +0200 ALSA: control: Allow NULL passed to snd_ctl_remove() There are lots of code checking NULL for kcontrol passed to snd_ctl_remove() in the caller side. Let's make snd_ctl_remove() accepting the NULL kcontrol instead a la free(), so that we can clean up the caller side. Link: https://lore.kernel.org/20240617100529.6667-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit f0ccd2d805e55e12b430d5d6b9acd9f891af455e Author: Michal Wajdeczko Date: Mon Jun 17 17:47:36 2024 +0200 drm/xe/vf: Don't touch GuC irq registers if using memory irqs On platforms where VFs are using memory based interrupts, we missed invalid access to no longer existing interrupt registers, as we keep them marked with XE_REG_OPTION_VF. To fix that just either setup memirq vectors in GuC or enable legacy interrupts. Fixes: aef4eb7c7dec ("drm/xe/vf: Setup memory based interrupts in GuC") Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240617154736.685-1-michal.wajdeczko@intel.com commit 5ad8897fd15a3716601509ed4a7bc47bf0cab661 Author: Alexis Lothoré Date: Thu Jun 13 16:06:45 2024 +0200 wifi: wilc1000: disable SDIO func IRQ before suspend Issuing a system suspend command raises the following warning: WARNING: CPU: 0 PID: 15 at drivers/mmc/core/sdio.c:1042 mmc_sdio_suspend+0xd4/0x19c CPU: 0 PID: 15 Comm: kworker/u2:1 Not tainted 6.7.0-rc1-wt+ #710 Hardware name: Atmel SAMA5 Workqueue: events_unbound async_run_entry_fn unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x34/0x48 dump_stack_lvl from __warn+0x98/0x160 __warn from warn_slowpath_fmt+0xcc/0x140 warn_slowpath_fmt from mmc_sdio_suspend+0xd4/0x19c mmc_sdio_suspend from mmc_bus_suspend+0x50/0x70 mmc_bus_suspend from dpm_run_callback+0xe4/0x248 dpm_run_callback from __device_suspend+0x234/0x91c __device_suspend from async_suspend+0x24/0x9c async_suspend from async_run_entry_fn+0x6c/0x210 async_run_entry_fn from process_one_work+0x3a0/0x870 [...] This warning is due to a check in SDIO core ensuring that interrupts do not remain enabled for cards being powered down during suspend. WILC driver currently does not set the MMC_PM_KEEP_POWER flag, so disable interrupt when entering resume. Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240613-wilc_suspend-v1-6-c2f766d0988c@bootlin.com commit 1e9e258d9fb5c46dbf78f1baf06ac3836a44f2fa Author: Alexis Lothoré Date: Thu Jun 13 16:06:44 2024 +0200 wifi: wilc1000: remove suspend/resume from cfg80211 part WILC1000 suspend/resume implementation is currently composed of two parts: suspend/resume ops implemented in cfg80211 ops, which merely sets a flag, and suspend/resume ops in sdio/spi driver which, based on this flag, execute or not the suspend/resume mechanism. This dual set of ops is not really needed , so keep only the sdio part to implement suspend/resume. While doing so, remove the now unused suspend_event flag. Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240613-wilc_suspend-v1-5-c2f766d0988c@bootlin.com commit a814112e9545b873bcd82b2aafb6e88a82e6949f Author: Alexis Lothoré Date: Thu Jun 13 16:06:43 2024 +0200 wifi: wilc1000: move sdio suspend method next to resume and pm ops definition Just move the suspend method next to the resume method in the sdio part Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240613-wilc_suspend-v1-4-c2f766d0988c@bootlin.com commit 25d086ba196418a16b6328440226065aeefc6076 Author: Alexis Lothoré Date: Thu Jun 13 16:06:42 2024 +0200 wifi: wilc1000: do not keep sdio bus claimed during suspend/resume There is no reason to keep the MMC host claimed during suspend. Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240613-wilc_suspend-v1-3-c2f766d0988c@bootlin.com commit 301e44e973ebb28d31a97441846dfa9fef6aa62b Author: Alexis Lothoré Date: Thu Jun 13 16:06:41 2024 +0200 wifi: wilc1000: let host->chip suspend/resume notifications manage chip wake/sleep host_wakeup_notify and host_sleep_notify are surrounded by chip_wakeup and chip_allow_sleep calls, which theorically need to be protected with the hif_cs lock. This lock protection is currently missing. Instead of adding the lock where those two functions are called, move those in host->chip suspend notifications to benefit from the lock already used there (in bus_acquire/bus_release) Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240613-wilc_suspend-v1-2-c2f766d0988c@bootlin.com commit 70ed0bdab1ca17aef6731e2c146b69050ff447f6 Author: Ajay Singh Date: Thu Jun 13 16:06:40 2024 +0200 wifi: wilc1000: disable power sequencer Driver systematically disables some power mechanism each time it starts the chip firmware (so mostly when interface is brought up). This has a negative impact on some specific scenarios when the chip is exposed as a hotpluggable SDIO card (eg: WILC1000 SD): - when executing suspend/resume sequence while interface has been brought up - rebooting the platform while module is plugged and interface has been brought up Those scenarios lead to mmc core trying to initialize again the chip which is now unresponsive (because of the power sequencer setting), so it fails in mmc_rescan->mmc_attach_sdio and enter a failure loop while trying to send CMD5: mmc0: error -110 whilst initialising SDIO card mmc0: error -110 whilst initialising SDIO card mmc0: error -110 whilst initialising SDIO card [...] Preventing the driver from disabling this "power sequencer" fixes those enumeration issues without affecting nominal operations. Signed-off-by: Ajay Singh Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240613-wilc_suspend-v1-1-c2f766d0988c@bootlin.com commit 8c58f972219e132d1277caf9a76119b444a50505 Author: Russell King (Oracle) Date: Tue May 28 10:18:17 2024 +0100 wifi: wl18xx: allow firmwares > 8.9.0.x.58 wlcore firmware versions are structured thusly: chip.if-type.major.sub-type.minor e.g. 8 9 0 0 58 With WL18xx ignoring the major firmware version, looking for a firmware version that conforms to: chip >= 8 if-type >= 9 major (don't care) sub-type (don't care) minor >= 58 Each test is satisfied if the value read from the firmware is greater than the minimum, but if it is equal (or we don't care about the field), then the next field is checked. Thus it doesn't recognise 8.9.1.x.0 as being newer than 8.9.0.x.58 since the major and sub-type numbers are "don't care" and the minor needs to be greater or equal to 58. We need to change the major version from "ignore" to "0" for this later firmware to be correctly detected, and allow the dual-firmware version support to work. Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsyH-00E8w6-Vu@rmk-PC.armlinux.org.uk commit 9685262b5e5db162622648b5c6cba53e9de3b75f Author: Russell King (Oracle) Date: Tue May 28 10:18:12 2024 +0100 wifi: wl18xx: add support for reading 8.9.1 fw status Add the necessary code to read the 8.9.1 firmware status into the driver private status structure, augmenting the 8.9.0 firmware status code. New structure layout taken from: https://git.ti.com/cgit/wilink8-wlan/build-utilites/tree/patches/kernel_patches/4.19.38/0023-wlcore-Fixing-PN-drift-on-encrypted-link-after-recov.patch?h=r8.9&id=a2ee50aa5190ed3b334373d6cd09b1bff56ffcf7 Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsyC-00E8w0-Rz@rmk-PC.armlinux.org.uk commit bb8edd900fd69e2d9865e29e4682e5289e8a2345 Author: Russell King (Oracle) Date: Tue May 28 10:18:07 2024 +0100 wifi: wlcore: add pn16 support TI Wl18xx firmware adds a "pn16" field for AES and TKIP keys as per their patch: https://git.ti.com/cgit/wilink8-wlan/build-utilites/tree/patches/kernel_patches/4.19.38/0023-wlcore-Fixing-PN-drift-on-encrypted-link-after-recov.patch?h=r8.9&id=a2ee50aa5190ed3b334373d6cd09b1bff56ffcf7 Add support for this, but rather than requiring the field to be present (which would break existing firmwares), make it optional. Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsy7-00E8vu-Nc@rmk-PC.armlinux.org.uk commit 81271c2bc59ef9fd2b90c7f3e61115309bb2a44c Author: Russell King (Oracle) Date: Tue May 28 10:18:02 2024 +0100 wifi: wlcore: store AP encryption key type Updates for WL18xx firmware 8.9.1.x.x need to know the AP encryption key type. Store this when a new key is set. Patch extracted from: https://git.ti.com/cgit/wilink8-wlan/build-utilites/tree/patches/kernel_patches/4.19.38/0023-wlcore-Fixing-PN-drift-on-encrypted-link-after-recov.patch?h=r8.9&id=a2ee50aa5190ed3b334373d6cd09b1bff56ffcf7 Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsy2-00E8vo-KK@rmk-PC.armlinux.org.uk commit dd265a7415f8b99fa9b4b055f1ad1015c1e6f250 Author: Russell King (Oracle) Date: Tue May 28 10:17:57 2024 +0100 wifi: wlcore: pass "status" to wlcore_hw_convert_fw_status() wlcore_fw_status() is passed a pointer to the struct wl_fw_status to decode the status into, which is always wl->fw_status. Rather than referencing wl->fw_status within wlcore_fw_status(), use the supplied argument so that we access this member in a consistent manner. Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsxx-00E8vi-Gf@rmk-PC.armlinux.org.uk commit 97715e29cebc898a214558475331ea6a10c0f8d1 Author: Russell King (Oracle) Date: Tue May 28 10:17:52 2024 +0100 wifi: wlcore: improve code in wlcore_fw_status() Referring to status->counters.tx_lnk_free_pkts[i] multiple times leads to less efficient code. Cache this value in a local variable. This also makes the code clearer. Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsxs-00E8vc-DD@rmk-PC.armlinux.org.uk commit b734d8830f70813e17f470daa60f535a6df4d570 Author: Russell King (Oracle) Date: Tue May 28 10:17:47 2024 +0100 wifi: wl18xx: make wl18xx_tx_immediate_complete() more efficient wl18xx_tx_immediate_complete() iterates through the completed transmit descriptors in a circular fashion, and in doing so uses a modulus operation that is not a power of two. This leads to inefficient code generation, which can be easily solved by providing a helper to increment to the next descriptor. Use this more efficient solution. Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsxn-00E8vW-9h@rmk-PC.armlinux.org.uk commit 64ff013ce0986952fad1678d7faf8998584fc500 Author: Russell King (Oracle) Date: Tue May 28 10:17:42 2024 +0100 wifi: wlcore: correctness fix fwlog reading Fix the calculation of clear_offset, which may overflow the end of the buffer. However, this is harmless if it does because in that case it will be recalculated when we copy the chunk of messages at the start of the buffer. Signed-off-by: Russell King (Oracle) Signed-off-by: Kalle Valo Link: https://msgid.link/E1sBsxi-00E8vQ-5r@rmk-PC.armlinux.org.uk commit 6278056e42d953e207e2afd416be39d09ed2d496 Author: Takashi Iwai Date: Sun Jun 16 09:34:47 2024 +0200 ALSA: hda: Add input value sanity checks to HDMI channel map controls Add a simple sanity check to HD-audio HDMI Channel Map controls. Although the value might not be accepted for the actual connection, we can filter out some bogus values beforehand, and that should be enough for making kselftest happier. Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240616073454.16512-7-tiwai@suse.de commit 210e6a844112bd7e28a04faedac677918e1f3040 Author: Takashi Iwai Date: Sun Jun 16 09:34:46 2024 +0200 ALSA: chmap: Mark Channel Map controls as volatile The values returned from Playback Channel Map and Capture Channel Map controls may vary dynamically depending on the corresponding PCM stream. Mark those as volatile to indicate the values are unstable and not suitable for testing. Note that we may change the driver to return -EINVAL, but this would bring other side effects, such as "alsactl restore" would start receiving unexpected errors. So we still keep returning 0 for those invalid inputs. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240616073454.16512-6-tiwai@suse.de commit 1b1285e4759e4d9df4f8e46d92802ff87ce8709b Author: Mark Brown Date: Sun Jun 16 09:34:45 2024 +0200 kselftest/alsa: Fix validation of writes to volatile controls When validating writes to controls we check that whatever value we wrote actually appears in the control. For volatile controls we cannot assume that this will be the case, the value may be changed at any time including between our write and read. Handle this by moving the check for volatile controls that we currently do for events to a separate block and just verifying that whatever value we read is valid for the control. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240614-alsa-selftest-volatile-v1-1-3874f02964b1@kernel.org Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240616073454.16512-5-tiwai@suse.de commit 50ed081284fe2bfd1f25e8b92f4f6a4990e73c0a Author: Takashi Iwai Date: Sun Jun 16 09:34:44 2024 +0200 ALSA: control: Apply sanity check of input values for user elements Although we have already a mechanism for sanity checks of input values for control writes, it's not applied unless the kconfig CONFIG_SND_CTL_INPUT_VALIDATION is set due to the performance reason. Nevertheless, it still makes sense to apply the same check for user elements despite of its cost, as that's the only way to filter out the invalid values; the user controls are handled solely in ALSA core code, and there is no corresponding driver, after all. This patch adds the same input value validation for user control elements at its put callback. The kselftest will be happier with this change, as the incorrect values will be bailed out now with errors. For other normal controls, the check is applied still only when CONFIG_SND_CTL_INPUT_VALIDATION is set. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de Reviewed-by: Jaroslav Kysela Reviewed-by: Mark Brown Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240616073454.16512-4-tiwai@suse.de commit 5bae83007bdd71919a38d5c6db020ef43e2299c6 Author: Takashi Iwai Date: Sun Jun 16 09:34:43 2024 +0200 ALSA: hda: Return -EINVAL for invalid volume/switch inputs So far the HD-audio driver has been tolerant about the input values and accepts any values by correcting the amp volume and switch values internally. But now our own selftest starts complaining about this behavior, so let's be picky and change the behavior to return -EINVAL for invalid input values instead. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240616073454.16512-3-tiwai@suse.de commit 10457f5042b4890a667e2f15a2e783490dda44d2 Author: Takashi Iwai Date: Sun Jun 16 09:34:42 2024 +0200 ALSA: vmaster: Return error for invalid input values So far the vmaster code has been tolerant about the input values and accepts any values by correcting internally. But now our own selftest starts complaining about this behavior, so let's be picky and change the behavior to return -EINVAL for invalid input values instead. Reported-by: Paul Menzel Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240616073454.16512-2-tiwai@suse.de commit eb882afcfa83991c0b72913e8a18f941a9986b8f Author: bo liu Date: Tue Jun 18 09:01:21 2024 +0800 ALSA: hda/senarytech: add senarytech codec support Add initial Senarytech codec support for SN6186. Note that this hda patch relies on the configuration default registers to be set correctly (normally by BIOS/firmware) in order for it to set up pin widgets properly. Signed-off-by: bo liu Link: https://lore.kernel.org/20240618010121.67335-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai commit 047b9cbbaa8ee3f1d71ff07d181ea6397be97ffe Author: Simon Trimmer Date: Mon Jun 17 16:41:05 2024 +0100 ALSA: hda: hda_component: Protect shared data with a mutex The hda_component contains information shared from the amp drivers to the codec that can be altered (for example as the driver unloads). Guard the update and use of these to prevent use of stale data. Signed-off-by: Simon Trimmer Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240617154105.108635-5-simont@opensource.cirrus.com commit 3b2a8582876d0b1ff1d8df9ff3cca03a70268fe2 Author: Simon Trimmer Date: Mon Jun 17 16:41:04 2024 +0100 ALSA: hda: hda_component: Move codec field into the parent There is one codec shared across all of the bound HDA components and a copy is usually stashed in the amp driver so it doesn't need to be in every hda_component. Signed-off-by: Simon Trimmer Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240617154105.108635-4-simont@opensource.cirrus.com commit 1adf91011f60e6d992cb1294e77a872845a390ed Author: Simon Trimmer Date: Mon Jun 17 16:41:03 2024 +0100 ALSA: hda: hda_component: Change codecs to use component parent structure Change the hda_component binding APIs to pass the hds_component_parent as the parameter so the array of components can be abstracted. Signed-off-by: Simon Trimmer Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240617154105.108635-3-simont@opensource.cirrus.com commit 960ccf6eafacaa4fc6b244fb91e736113c3fb715 Author: Simon Trimmer Date: Mon Jun 17 16:41:02 2024 +0100 ALSA: hda: hda_component: Introduce component parent structure In preparation for moving duplicated members from the hda_component structure introduce a parent structure that wraps the array of components. This also allows us to confine the knowledge of the maximum number of entries to the hda_component files and eliminate passing that redundant information around and making direct accesses to the array. Signed-off-by: Simon Trimmer Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/20240617154105.108635-2-simont@opensource.cirrus.com commit d85002b5d1f464157ff7d0099234d4626aa6cbc2 Merge: 19765dbef1cda 70794b9563fe0 Author: Takashi Iwai Date: Tue Jun 18 11:57:46 2024 +0200 Merge branch 'for-linus' into for-next Pull 6.10-rc devel branch for applying more Cirrus codec changes. Signed-off-by: Takashi Iwai commit 7b3ffe0d815d15310545f77d444ada92c5d26903 Author: Tero Kristo Date: Mon Jun 17 09:04:40 2024 +0300 platform/x86/intel-uncore-freq: Use generic helpers for current frequency Use the generic sysfs helpers for reading the current frequency also, and remove the custom ones. No functional change intended. Signed-off-by: Tero Kristo Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-8-tero.kristo@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b2cc9f908af19dd851dd4642325daf0e86614885 Author: Tero Kristo Date: Mon Jun 17 09:04:39 2024 +0300 platform/x86/intel-uncore-freq: Rename the sysfs helper macro names The macros to create sysfs entries are going to be used for other attributes in addition to current min/max frequencies only, so rename these to be more generic. No functional change intended. Signed-off-by: Tero Kristo Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-7-tero.kristo@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit d766abfbea9c8f2e7c87c59a572a1ae7f7ee5909 Author: Tero Kristo Date: Mon Jun 17 09:04:38 2024 +0300 platform/x86/intel-uncore-freq: Get rid of uncore_read_freq driver API Get rid of uncore_read_freq driver API. Instead, add a new entry to the enumerated read interface and use this. No functional change intended. Signed-off-by: Tero Kristo Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-6-tero.kristo@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 69207a0f17d4e5a9bdd9feeece26a84add305157 Author: Tero Kristo Date: Mon Jun 17 09:04:37 2024 +0300 platform/x86/intel-uncore-freq: Use uncore_index with read_control_freq Use the enumerated index for selecting the uncore driver parameter to read, instead of reading everything. This is done in preparation to expand the API to access more parameters later. No functional change intended. Signed-off-by: Tero Kristo Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-5-tero.kristo@linux.intel.com [ij: Removed underscores from variable names] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e159079a8be0222cf95909ed35eace0d6b2d12bf Author: Michael Walle Date: Mon Jun 3 15:40:55 2024 +0200 mtd: spi-nor: simplify spi_nor_get_flash_info() Rework spi_nor_get_flash_info() to make it look more straight forward and esp. don't return early. The latter is a preparation to check for deprecated flashes. Signed-off-by: Michael Walle Reviewed-by: Pratyush Yadav Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20240603134055.1859863-1-mwalle@kernel.org commit 90583374f1a0951d563de50aeac6357b724d08f6 Author: Tero Kristo Date: Mon Jun 17 09:04:36 2024 +0300 platform/x86/intel-uncore-freq: Get rid of magic min_max argument Get rid of the hardcoded / magic min_max argument from internal APIs. Instead, use an enumerated index value for it. No functional change intended. Signed-off-by: Tero Kristo Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-4-tero.kristo@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 4babdbdce6a05ae6f228c1ae1e61a4bc91a91d33 Author: Tero Kristo Date: Mon Jun 17 09:04:35 2024 +0300 platform/x86/intel-uncore-freq: Get rid of magic values Get rid of any magic bitmasks from the code. Define proper macros for these, and use the bitfield operations to access them. No functional change intended. Signed-off-by: Tero Kristo Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-3-tero.kristo@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 36f70045528f5639bb50b3b74c7925943cf6983a Author: Tero Kristo Date: Mon Jun 17 09:04:34 2024 +0300 platform/x86/intel-uncore-freq: Re-arrange bit masks Rename the various bitmasks from the 'UNCORE_GENMASK_*' to 'UNCORE_*_MASK', and re-order them based on the register they reside in. No functional change intended. Signed-off-by: Tero Kristo Reviewed-by: Ilpo Järvinen Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240617060708.892981-2-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit e58e12c5c34ce1f339e09825037a8c86956ff51c Author: Frank Li Date: Mon Jun 17 14:02:40 2024 -0400 dt-bindings: ata: ahci-fsl-qoriq: convert to yaml format Convert ahci-fsl-qoirq DT binding to yaml format. Additional changes: - Add reg-names list, ahci and sata-ecc - Add fsl,ls1028a-ahci and fsl,lx2060a-ahci Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: Niklas Cassel commit 41474d25bec56900e3a018907784b0abfe5a6a9e Author: Nick Hollinghurst Date: Fri Feb 16 18:48:55 2024 +0000 drm: Add DRM_MODE_TV_MODE_MONOCHROME Add this as a value for enum_drm_connector_tv_mode, represented by the string "Mono", to generate video with no colour encoding or bursts. Define it to have no pedestal (since only NTSC-M calls for a pedestal). Change default mode creation to acommodate the new tv_mode value which comprises both 525-line and 625-line formats. Acked-by: Daniel Vetter Signed-off-by: Nick Hollinghurst Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240216184857.245372-2-dave.stevenson@raspberrypi.com commit 39e6bf7394d852b17fb083a85fee5890b445908c Merge: 240a3a167468b 6ba59ff422792 Author: Greg Kroah-Hartman Date: Tue Jun 18 11:09:33 2024 +0200 Merge tag 'v6.10-rc4' into staging-next We need the staging fix in here as well. Signed-off-by: Greg Kroah-Hartman commit bf14c18a2cbf65687c59a11f5e4824c4a0c8182b Merge: ffd8e8bd26e94 6ba59ff422792 Author: Greg Kroah-Hartman Date: Tue Jun 18 11:08:01 2024 +0200 Merge tag 'v6.10-rc4' into tty-next We need the tty/serial fixes in here as well Signed-off-by: Greg Kroah-Hartman commit b0fc24f36191468bcabc72aaea67ab7a2bb2a13e Merge: 5821bf2dffbe1 6ba59ff422792 Author: Greg Kroah-Hartman Date: Tue Jun 18 11:06:17 2024 +0200 Merge tag 'v6.10-rc4' into usb-next We need the USB / Thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 0e6745de6dfc1395ce1bbde1e3f9b0a12fba5a1b Author: Michal Wajdeczko Date: Mon Jun 17 14:26:13 2024 +0200 drm/xe: Allow const pointer when checking SR-IOV mode It seems that more and more parts of the driver code rely on having only a const pointer to the xe_device. Allow to check SR-IOV mode in that code as well. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240617122613.553-1-michal.wajdeczko@intel.com commit 61894818e3049e8b3864fecf52164b125bd77aae Author: Marcos Paulo de Souza Date: Mon Jun 3 14:26:19 2024 -0300 selftests: livepatch: Test atomic replace against multiple modules Adapt the current test-livepatch.sh script to account the number of applied livepatches and ensure that an atomic replace livepatch disables all previously applied livepatches. Signed-off-by: Marcos Paulo de Souza Acked-by: Joe Lawrence Reviewed-by: Miroslav Benes Link: https://lore.kernel.org/r/20240603-lp-atomic-replace-v3-1-9f3b8ace5c9f@suse.com [mbenes@suse.cz: Fixed typo in a comment.] Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit fe899f891073dd002a13c1900d73985f8dfe9634 Merge: 490d573b5a857 5e5f2f92cccc2 Author: Ilpo Järvinen Date: Tue Jun 18 11:20:08 2024 +0300 Merge branch 'pdx86/platform-drivers-x86-lenovo-c630' into review-ilpo commit b2cb6011bcaf5bba08b55f20e3eea9cdd415ec9d Author: Javier Martinez Canillas Date: Sat Jun 15 10:53:18 2024 +0200 drm/tidss: Add drm_panic support Add support for the drm_panic infrastructure, which allows to display a user friendly message on the screen when a Linux kernel panic occurs. Signed-off-by: Javier Martinez Canillas Reviewed-by: Jocelyn Falempe Reviewed-by: Aradhya Bhatia Link: https://patchwork.freedesktop.org/patch/msgid/20240615085326.1726262-1-javierm@redhat.com commit 1efb7c8fd8bf6b9d6f10dd2a9e0fde9e7a650ab4 Author: Zhiguo Niu Date: Thu Jun 13 17:35:33 2024 +0800 f2fs: fix to use mnt_{want,drop}_write_file replace file_{start,end}_wrtie mnt_{want,drop}_write_file is more suitable than file_{start,end}_wrtie and also is consistent with other ioctl operations. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6aeb084fa0b1ada0290df08c5230e41881aef783 Author: Jaegeuk Kim Date: Wed Jun 12 18:21:56 2024 +0000 f2fs: clean up set REQ_RAHEAD given rac Let's set REQ_RAHEAD per rac by single source. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6efc3a05e6132812edf7eee0eb040eb88af34203 Author: Zhiguo Niu Date: Fri Jun 7 17:00:30 2024 +0800 f2fs: enable atgc dynamically if conditions are met Now atgc can only be enabled when umounted->mounted device even related conditions have reached. If the device has not be umounted->mounted for a long time, atgc can not work. So enable atgc dynamically when atgc_age_threshold is less than elapsed_time and ATGC mount option is on. Signed-off-by: Chao Yu Signed-off-by: Zhiguo Niu Signed-off-by: Jaegeuk Kim commit efb459303dd5dd6e198a0d58322dc04c3356dc23 Author: Kory Maincent Date: Wed Jun 12 17:04:02 2024 +0200 net: Move dev_set_hwtstamp_phylib to net/core/dev.h This declaration was added to the header to be called from ethtool. ethtool is separated from core for code organization but it is not really a separate entity, it controls very core things. As ethtool is an internal stuff it is not wise to have it in netdevice.h. Move the declaration to net/core/dev.h instead. Remove the EXPORT_SYMBOL_GPL call as ethtool can not be built as a module. Reviewed-by: Willem de Bruijn Signed-off-by: Kory Maincent Link: https://lore.kernel.org/r/20240612-feature_ptp_netnext-v15-2-b2a086257b63@bootlin.com Signed-off-by: Jakub Kicinski commit 0d9bb144276edfb53d61bd0b42788568b19bc718 Author: Jeff Johnson Date: Sun Jun 16 13:01:48 2024 -0700 net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning With ARCH=hexagon, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/synopsys/dwc-xlgmac.o With most other ARCH settings the MODULE_DESCRIPTION() is provided by the macro invocation in dwc-xlgmac-pci.c. However, for hexagon, the PCI bus is not enabled, and hence CONFIG_DWC_XLGMAC_PCI is not set. As a result, dwc-xlgmac-pci.c is not compiled, and hence is not linked into dwc-xlgmac.o. To avoid this issue, relocate the MODULE_DESCRIPTION() and other related macros from dwc-xlgmac-pci.c to dwc-xlgmac-common.c, since that file already has an existing MODULE_LICENSE() and it is unconditionally linked into dwc-xlgmac.o. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240616-md-hexagon-drivers-net-ethernet-synopsys-v1-1-55852b60aef8@quicinc.com Signed-off-by: Jakub Kicinski commit e275e19c918b502aa4534e56dc2e25b5095e9005 Author: Shradha Gupta Date: Fri Jun 14 00:19:08 2024 -0700 net: mana: Use mana_cleanup_port_context() for rxq cleanup To cleanup rxqs in port context structures, instead of duplicating the code, use existing function mana_cleanup_port_context() which does the exact cleanup that's needed. Signed-off-by: Shradha Gupta Reviewed-by: Simon Horman Reviewed-by: Wei Liu Reviewed-by: Heng Qi Link: https://lore.kernel.org/r/1718349548-28697-1-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Jakub Kicinski commit dd89a81d850fa9a65f67b4527c0e420d15bf836c Author: Willem de Bruijn Date: Fri Jun 14 08:25:18 2024 -0400 fou: remove warn in gue_gro_receive on unsupported protocol Drop the WARN_ON_ONCE inn gue_gro_receive if the encapsulated type is not known or does not have a GRO handler. Such a packet is easily constructed. Syzbot generates them and sets off this warning. Remove the warning as it is expected and not actionable. The warning was previously reduced from WARN_ON to WARN_ON_ONCE in commit 270136613bf7 ("fou: Do WARN_ON_ONCE in gue_gro_receive for bad proto callbacks"). Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240614122552.1649044-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit b0d478e34dbfccb7ce430e20cbe77d4d10593fa3 Author: Ira Weiny Date: Tue Jun 11 23:47:31 2024 -0500 testing: nvdimm: Add MODULE_DESCRIPTION() macros When building with W=1 the following errors are seen: WARNING: modpost: missing MODULE_DESCRIPTION() in tools/testing/nvdimm/test/nfit_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in tools/testing/nvdimm/test/ndtest.o Add the required MODULE_DESCRIPTION() to the test platform device drivers. Suggested-by: Jeff Johnson Reviewed-by: Jeff Johnson Link: https://patch.msgid.link/r/20240611-nvdimm-test-mod-warn-v1-1-4a583be68c17@intel.com Signed-off-by: Ira Weiny commit f48b344a527ad5c09c7d44819287ec51fe5914d3 Author: Jeff Johnson Date: Sun May 26 08:52:36 2024 -0700 testing: nvdimm: iomap: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.o Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/r/20240526-md-testing-nvdimm-v1-1-f8b617bb28e1@quicinc.com Signed-off-by: Ira Weiny commit 1d5198dd08ac04b13a8b7539131baf0980998032 Author: Jeff Johnson Date: Wed Jun 5 10:49:24 2024 -0700 dax: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dax/hmem/dax_hmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dax/device_dax.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dax/kmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dax/dax_pmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dax/dax_cxl.o Add all missing invocations of the MODULE_DESCRIPTION() macro. [iweiny: edit descriptions] Signed-off-by: Jeff Johnson Link: https://patch.msgid.link/r/20240605-md-drivers-dax-v1-1-3d448f3368b4@quicinc.com Signed-off-by: Ira Weiny commit 5b2480febf86ca292f5bef58d157c5e0657a114f Author: Jeff Johnson Date: Sun May 26 10:07:14 2024 -0700 nvdimm: add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/libnvdimm.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_pmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_btt.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_e820.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/of_pmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_virtio.o [iweiny: edit core module description] Signed-off-by: Jeff Johnson Reviewed-by: Dave Jiang Link: https://patch.msgid.link/r/20240526-md-drivers-nvdimm-v1-1-9e583677e80f@quicinc.com Signed-off-by: Ira Weiny commit 3101daba2b08662d1ff4f75ebc8921745bf1184f Author: Jeff Johnson Date: Mon Jun 3 06:30:20 2024 -0700 ACPI: NFIT: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/nfit/nfit.o Add the missing invocation of the MODULE_DESCRIPTION() macro. [iweiny: edit description] Signed-off-by: Jeff Johnson Reviewed-by: Dave Jiang Link: https://patch.msgid.link/r/20240603-md-drivers-acpi-nfit-v1-1-11a5614a8dbe@quicinc.com Signed-off-by: Ira Weiny commit 0858582e7e1df72eb44edf779008ba4dee7f0d75 Author: Erick Archer Date: Sun Jun 2 10:18:23 2024 +0200 nvdimm/btt: use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Reviewed-by: Dave Jiang Link: https://patch.msgid.link/r/AS8PR02MB72372490C53FB2E35DA1ADD08BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Ira Weiny commit 2fca11bb4692fe951d16b0d2049ba75bfcd53663 Author: Dongliang Mu Date: Fri Jun 14 22:03:20 2024 +0800 docs/zh_CN: add back the missing part in the English version The zh_CN kasan document misses the code change in commit eefe68280c94 ("kasan: Add documentation for CONFIG_KASAN_EXTRA_INFO"). Fix this by adding the translation of the missing part. Note that this missing commit is found by checktransupdate.py Signed-off-by: Dongliang Mu Reviewed-by: Alex Shi Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614140326.3028384-1-dzm91@hust.edu.cn commit 166d6019f9bfd779fe8c958c4b2feb1ccc91b361 Author: Thomas Huth Date: Mon Jun 17 09:33:22 2024 +0200 Documentation: Remove the unused "tp720" from kernel-parameters.txt The "tp720" switch once belonged to the ps2esdi driver, but this driver has been removed a long time ago in 2008 in the commit 2af3e6017e53 ("The ps2esdi driver was marked as BROKEN more than two years ago due to being no longer working for some time.") already, so let's remove it from the documentation now, too. Signed-off-by: Thomas Huth Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240617073322.40679-1-thuth@redhat.com commit 9b8b80b9f6ddf84c6639dcb3eda3e20add588524 Author: Thomas Huth Date: Mon Jun 17 08:08:48 2024 +0200 Documentation: Remove the unused "topology_updates" from kernel-parameters.txt The "topology_updates" switch has been removed four years ago in commit c30f931e891e ("powerpc/numa: remove ability to enable topology updates"), so let's remove this from the documentation, too. Signed-off-by: Thomas Huth Acked-by: Michael Ellerman Acked-by: Nathan Lynch Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240617060848.38937-1-thuth@redhat.com commit 4280517ebe15a52463966ae286e3219ffa32a2f8 Author: Dongliang Mu Date: Wed Jun 12 22:50:45 2024 +0800 docs/zh_CN: Update the translation of dev-tools/gdb-kernel-debugging Update to commit 6b219431037b ("docs/scripts/gdb: add necessary make scripts_gdb step") Signed-off-by: Dongliang Mu Reviewed-by: Alex Shi [jc: fixed whitespace error] Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240612145048.57829-1-dzm91@hust.edu.cn commit f77afc2796d56ece87beb13c093f3d7ee008c94e Author: Tony Luck Date: Tue Jun 11 13:48:14 2024 -0700 Documentation/x86: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model so "_FAM6" is no longer used in the #define names. Signed-off-by: Tony Luck Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240611204814.353821-1-tony.luck@intel.com commit 69bce7f3dc72c88961412ef476cfb90c4327affd Author: Thomas Huth Date: Fri Jun 14 21:08:04 2024 +0200 Documentation: Remove unused "nps_mtm_hs_ctr" from kernel-parameters.txt The "nps_mtm_hs_ctr" parameter has been removed in commit dd7c7ab01a04 ("ARC: [plat-eznps]: Drop support for EZChip NPS platform"). Remove it from the documentation now, too. Signed-off-by: Thomas Huth Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614190804.602970-1-thuth@redhat.com commit f73014416261c85db3b9426fa51e23838d810c10 Author: Thomas Huth Date: Fri Jun 14 20:40:41 2024 +0200 Documentation: Remove unused "spia_*" kernel parameters The kernel module parameters "spia_io_base", "spia_fio_base", "spia_pedr" and "spia_peddr" have been removed via commit e377ca1e32f6 ("ARM: clps711x: p720t: Special driver for handling NAND memory is removed"). Time to remove them from the documentation now, too. Signed-off-by: Thomas Huth Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614184041.601056-1-thuth@redhat.com commit f891e73f966950b31f721e05126831174ed0c609 Author: Thomas Huth Date: Fri Jun 14 20:25:08 2024 +0200 Documentation: Remove unused "mtdset=" from kernel-parameters.txt The kernel parameter "mtdset" has been removed two years ago in commit 61b7f8920b17 ("ARM: s3c: remove all s3c24xx support") and thus should be removed from the documentation now, too. Signed-off-by: Thomas Huth Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614182508.600113-1-thuth@redhat.com commit 35a9cbeefd978fda202621602777c7ac4f75e17a Author: Thomas Huth Date: Fri Jun 14 11:21:34 2024 +0200 Documentation: Remove the "rhash_entries=" from kernel-parameters.txt "rhash_entries" belonged to the routing cache that has been removed in commit 89aef8921bfb ("ipv4: Delete routing cache."). Signed-off-by: Thomas Huth Reviewed-by: Eric Dumazet Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614092134.563082-1-thuth@redhat.com commit 2626f066f83c70863087b5df22a19024e1b90cb6 Author: Thomas Huth Date: Fri Jun 14 10:46:33 2024 +0200 Documentation: Remove "ltpc=" from the kernel-parameters.txt The string "ltpc" cannot be found in the source code anymore. This kernel parameter likely belonged to the LocalTalk PC card module which has been removed in commit 03dcb90dbf62 ("net: appletalk: remove Apple/Farallon LocalTalk PC support"), so we should remove it from kernel-parameters.txt now, too. Signed-off-by: Thomas Huth Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614084633.560069-1-thuth@redhat.com commit 6bb955d4fb6e2757f803863bc99a8d38e3dea5db Author: Thomas Huth Date: Fri Jun 14 10:14:38 2024 +0200 Documentation: Add "S390" to the swiotlb kernel parameter The "swiotlb" kernel parameter is used on s390 for protected virt since commit 64e1f0c531d1 ("s390/mm: force swiotlb for protected virtualization") and thus should be marked in kernel-parameters.txt accordingly. Signed-off-by: Thomas Huth Acked-by: Christian Borntraeger Acked-by: Claudio Imbrenda Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240614081438.553160-1-thuth@redhat.com commit f6afdaf72af7583d251bd569ded8d7d1eeb849c2 Merge: dedf56d775c0b 6ba77385f3860 Author: Andrii Nakryiko Date: Mon Jun 17 14:38:32 2024 -0700 Merge branch 'bpf-support-resilient-split-btf' Alan Maguire says: ==================== bpf: support resilient split BTF Split BPF Type Format (BTF) provides huge advantages in that kernel modules only have to provide type information for types that they do not share with the core kernel; for core kernel types, split BTF refers to core kernel BTF type ids. So for a STRUCT sk_buff, a module that uses that structure (or a pointer to it) simply needs to refer to the core kernel type id, saving the need to define the structure and its many dependents. This cuts down on duplication and makes BTF as compact as possible. However, there is a downside. This scheme requires the references from split BTF to base BTF to be valid not just at encoding time, but at use time (when the module is loaded). Even a small change in kernel types can perturb the type ids in core kernel BTF, and - if the new reproducible BTF option is not used - pahole's parallel processing of compilation units can lead to different type ids for the same kernel if the BTF is regenerated. So we have a robustness problem for split BTF for cases where a module is not always compiled at the same time as the kernel. This problem is particularly acute for distros which generally want module builders to be able to compile a module for the lifetime of a Linux stable-based release, and have it continue to be valid over the lifetime of that release, even as changes in data structures (and hence BTF types) accrue. Today it's not possible to generate BTF for modules that works beyond the initial kernel it is compiled against - kernel bugfixes etc invalidate the split BTF references to vmlinux BTF, and BTF is no longer usable for the module. The goal of this series is to provide options to provide additional context for cases like this. That context comes in the form of distilled base BTF; it stands in for the base BTF, and contains information about the types referenced from split BTF, but not their full descriptions. The modified split BTF will refer to type ids in this .BTF.base section, and when the kernel loads such modules it will use that .BTF.base to map references from split BTF to the equivalent current vmlinux base BTF types. Once this relocation process has succeeded, the module BTF available in /sys/kernel/btf will look exactly as if it was built with the current vmlinux; references to base types will be fixed up etc. A module builder - using this series along with the pahole changes - can then build a module with distilled base BTF via an out-of-tree module build, i.e. make -C . M=path/2/module The module will have a .BTF section (the split BTF) and a .BTF.base section. The latter is small in size - distilled base BTF does not need full struct/union/enum information for named types for example. For 2667 modules built with distilled base BTF, the average size observed was 1556 bytes (stddev 1563). The overall size added to this 2667 modules was 5.3Mb. Note that for the in-tree modules, this approach is not needed as split and base BTF in the case of in-tree modules are always built and re-built together. The series first focuses on generating split BTF with distilled base BTF; then relocation support is added to allow split BTF with an associated distlled base to be relocated with a new base BTF. Next Eduard's patch allows BTF ELF parsing to work with both .BTF and .BTF.base sections; this ensures that bpftool will be able to dump BTF for a module with a .BTF.base section for example, or indeed dump relocated BTF where a module and a "-B vmlinux" is supplied. Then we add support to resolve_btfids to ignore base BTF - i.e. to avoid relocation - if a .BTF.base section is found. This ensures the .BTF.ids section is populated with ids relative to the distilled base (these will be relocated as part of module load). Finally the series supports storage of .BTF.base data/size in modules and supports sharing of relocation code with the kernel to allow relocation of module BTF. For the kernel, this relocation process happens at module load time, and we relocate split BTF references to point at types in the current vmlinux BTF. As part of this, .BTF.ids references need to be mapped also. So concretely, what happens is - we generate split BTF in the .BTF section of a module that refers to types in the .BTF.base section as base types; the latter are not full type descriptions but provide information about the base type. So a STRUCT sk_buff would be represented as a FWD struct sk_buff in distilled base BTF for example. - when the module is loaded, the split BTF is relocated with vmlinux BTF; in the case of the FWD struct sk_buff, we find the STRUCT sk_buff in vmlinux BTF and map all split BTF references to the distilled base FWD sk_buff, replacing them with references to the vmlinux BTF STRUCT sk_buff. A previous approach to this problem [1] utilized standalone BTF for such cases - where the BTF is not defined relative to base BTF so there is no relocation required. The problem with that approach is that from the verifier perspective, some types are special, and having a custom representation of a core kernel type that did not necessarily match the current representation is not tenable. So the approach taken here was to preserve the split BTF model while minimizing the representation of the context needed to relocate split and current vmlinux BTF. To generate distilled .BTF.base sections the associated dwarves patch (to be applied on the "next" branch there) is needed [3] Without it, things will still work but modules will not be built with a .BTF.base section. Changes since v5[4]: - Update search of distilled types to return the first occurrence of a string (or a string+size pair); this allows us to iterate over all matches in distilled base BTF (Andrii, patch 3) - Update to use BTF field iterators (Andrii, patches 1, 3 and 8) - Update tests to cover multiple match and associated error cases (Eduard, patch 4) - Rename elf_sections_info to btf_elf_secs, remove use of libbpf_get_error(), reset btf->owns_base when relocation succeeds (Andrii, patch 5) Changes since v4[5]: - Moved embeddedness, duplicate name checks to relocation time and record struct/union size for all distilled struct/unions instead of using forwards. This allows us to carry out type compatibility checks based on the base BTF we want to relocate with (Eduard, patches 1, 3) - Moved to using qsort() instead of qsort_r() as support for qsort_r() appears to be missing in Android libc (Andrii, patch 3) - Sorting/searching now incorporates size matching depending on BTF kind and embeddedness of struct/union (Eduard, Andrii, patch 3) - Improved naming of various types during relocation to avoid confusion (Andrii, patch 3) - Incorporated Eduard's patch (patch 5) which handles .BTF.base sections internally in btf_parse_elf(). This makes ELF parsing work with split BTF, split BTF with a distilled base, split BTF with a distilled base _and_ base BTF (by relocating) etc. Having this avoids the need for bpftool changes; it will work as-is with .BTF.base sections (Eduard, patch 4) - Updated resolve_btfids to _not_ relocate BTF for modules where a .BTF.base section is present; in that one case we do not want to relocate BTF as the .BTF.ids section should reflect ids in .BTF.base which will later be relocated on module load (Eduard, Andrii, patch 5) Changes since v3[6]: - distill now checks for duplicate-named struct/unions and records them as a sized struct/union to help identify which of the multiple base BTF structs/unions it refers to (Eduard, patch 1) - added test support for multiple name handling (Eduard, patch 2) - simplified the string mapping when updating split BTF to use base BTF instead of distilled base. Since the only string references split BTF can make to base BTF are the names of the base types, create a string map from distilled string offset -> base BTF string offset and update string offsets by visiting all strings in split BTF; this saves having to do costly searches of base BTF (Eduard, patch 7,10) - fixed bpftool manpage and indentation issues (Quentin, patch 11) Also explored Eduard's suggestion of doing an implicit fallback to checking for .BTF.base section in btf__parse() when it is called to get base BTF. However while it is doable, it turned out to be difficult operationally. Since fallback is implicit we do not know the source of the BTF - was it from .BTF or .BTF.base? In bpftool, we want to try first standalone BTF, then split, then split with distilled base. Having a way to explicitly request .BTF.base via btf__parse_opts() fits that model better. Changes since v2[7]: - submitted patch to use --btf_features in Makefile.btf for pahole v1.26 and later separately (Andrii). That has landed in bpf-next now. - distilled base now encodes ENUM64 as fwd ENUM (size 8), eliminating the need for support for ENUM64 in btf__add_fwd (patch 1, Andrii) - moved to distilling only named types, augmenting split BTF with associated reference types; this simplifies greatly the distilled base BTF and the mapping operation between distilled and base BTF when relocating (most of the series changes, Andrii) - relocation now iterates over base BTF, looking for matches based on name in distilled BTF. Distilled BTF is pre-sorted by name (Andrii, patch 8) - removed most redundant compabitiliby checks aside from struct size for base types/embedded structs and kind compatibility (since we only match on name) (Andrii, patch 8) - btf__parse_opts() now replaces btf_parse() internally in libbpf (Eduard, patch 3) Changes since RFC [8]: - updated terminology; we replace clunky "base reference" BTF with distilling base BTF into a .BTF.base section. Similarly BTF reconcilation becomes BTF relocation (Andrii, most patches) - add distilled base BTF by default for out-of-tree modules (Alexei, patch 8) - distill algorithm updated to record size of embedded struct/union by recording it as a 0-vlen STRUCT/UNION with size preserved (Andrii, patch 2) - verify size match on relocation for such STRUCT/UNIONs (Andrii, patch 9) - with embedded STRUCT/UNION recording size, we can have bpftool dump a header representation using .BTF.base + .BTF sections rather than special-casing and refusing to use "format c" for that case (patch 5) - match enum with enum64 and vice versa (Andrii, patch 9) - ensure that resolve_btfids works with BTF without .BTF.base section (patch 7) - update tests to cover embedded types, arrays and function prototypes (patches 3, 12) [1] https://lore.kernel.org/bpf/20231112124834.388735-14-alan.maguire@oracle.com/ [2] https://lore.kernel.org/bpf/20240501175035.2476830-1-alan.maguire@oracle.com/ [3] https://lore.kernel.org/bpf/20240517102714.4072080-1-alan.maguire@oracle.com/ [4] https://lore.kernel.org/bpf/20240528122408.3154936-1-alan.maguire@oracle.com/ [5] https://lore.kernel.org/bpf/20240517102246.4070184-1-alan.maguire@oracle.com/ [6] https://lore.kernel.org/bpf/20240510103052.850012-1-alan.maguire@oracle.com/ [7] https://lore.kernel.org/bpf/20240424154806.3417662-1-alan.maguire@oracle.com/ [8] https://lore.kernel.org/bpf/20240322102455.98558-1-alan.maguire@oracle.com/ ==================== Link: https://lore.kernel.org/r/20240613095014.357981-1-alan.maguire@oracle.com Signed-off-by: Andrii Nakryiko commit 6ba77385f386053cea2a1cad33717de74a26db4e Author: Alan Maguire Date: Thu Jun 13 10:50:11 2024 +0100 resolve_btfids: Handle presence of .BTF.base section Now that btf_parse_elf() handles .BTF.base section presence, we need to ensure that resolve_btfids uses .BTF.base when present rather than the vmlinux base BTF passed in via the -B option. Detect .BTF.base section presence and unset the base BTF path to ensure that BTF ELF parsing will do the right thing. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Reviewed-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613095014.357981-7-alan.maguire@oracle.com commit c86f180ffc993975fed5907a869fc9b1555d0cfb Author: Eduard Zingerman Date: Thu Jun 13 10:50:10 2024 +0100 libbpf: Make btf_parse_elf process .BTF.base transparently Update btf_parse_elf() to check if .BTF.base section is present. The logic is as follows: if .BTF.base section exists: distilled_base := btf_new(.BTF.base) if distilled_base: btf := btf_new(.BTF, .base_btf=distilled_base) if base_btf: btf_relocate(btf, base_btf) else: btf := btf_new(.BTF) return btf In other words: - if .BTF.base section exists, load BTF from it and use it as a base for .BTF load; - if base_btf is specified and .BTF.base section exist, relocate newly loaded .BTF against base_btf. Signed-off-by: Eduard Zingerman Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240613095014.357981-6-alan.maguire@oracle.com commit affdeb50616b190c3236cc2bf116e1b931a43be2 Author: Alan Maguire Date: Thu Jun 13 10:50:09 2024 +0100 selftests/bpf: Extend distilled BTF tests to cover BTF relocation Ensure relocated BTF looks as expected; in this case identical to original split BTF, with a few duplicate anonymous types added to split BTF by the relocation process. Also add relocation tests for edge cases like missing type in base BTF and multiple types of the same name. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613095014.357981-5-alan.maguire@oracle.com commit 19e00c897d5031bed969dd79af28e899e038009f Author: Alan Maguire Date: Thu Jun 13 10:50:08 2024 +0100 libbpf: Split BTF relocation Map distilled base BTF type ids referenced in split BTF and their references to the base BTF passed in, and if the mapping succeeds, reparent the split BTF to the base BTF. Relocation is done by first verifying that distilled base BTF only consists of named INT, FLOAT, ENUM, FWD, STRUCT and UNION kinds; then we sort these to speed lookups. Once sorted, the base BTF is iterated, and for each relevant kind we check for an equivalent in distilled base BTF. When found, the mapping from distilled -> base BTF id and string offset is recorded. In establishing mappings, we need to ensure we check STRUCT/UNION size when the STRUCT/UNION is embedded in a split BTF STRUCT/UNION, and when duplicate names exist for the same STRUCT/UNION. Otherwise size is ignored in matching STRUCT/UNIONs. Once all mappings are established, we can update type ids and string offsets in split BTF and reparent it to the new base. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613095014.357981-4-alan.maguire@oracle.com commit eb20e727c4343ad591cff2bef243590c77f62cf1 Author: Alan Maguire Date: Thu Jun 13 10:50:07 2024 +0100 selftests/bpf: Test distilled base, split BTF generation Test generation of split+distilled base BTF, ensuring that - named base BTF STRUCTs and UNIONs are represented as 0-vlen sized STRUCT/UNIONs - named ENUM[64]s are represented as 0-vlen named ENUM[64]s - anonymous struct/unions are represented in full in split BTF - anonymous enums are represented in full in split BTF - types unreferenced from split BTF are not present in distilled base BTF Also test that with vmlinux BTF and split BTF based upon it, we only represent needed base types referenced from split BTF in distilled base. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613095014.357981-3-alan.maguire@oracle.com commit 58e185a0dc359a6c1c9eff348d7badfc9f722159 Author: Alan Maguire Date: Thu Jun 13 10:50:06 2024 +0100 libbpf: Add btf__distill_base() creating split BTF with distilled base BTF To support more robust split BTF, adding supplemental context for the base BTF type ids that split BTF refers to is required. Without such references, a simple shuffling of base BTF type ids (without any other significant change) invalidates the split BTF. Here the attempt is made to store additional context to make split BTF more robust. This context comes in the form of distilled base BTF providing minimal information (name and - in some cases - size) for base INTs, FLOATs, STRUCTs, UNIONs, ENUMs and ENUM64s along with modified split BTF that points at that base and contains any additional types needed (such as TYPEDEF, PTR and anonymous STRUCT/UNION declarations). This information constitutes the minimal BTF representation needed to disambiguate or remove split BTF references to base BTF. The rules are as follows: - INT, FLOAT, FWD are recorded in full. - if a named base BTF STRUCT or UNION is referred to from split BTF, it will be encoded as a zero-member sized STRUCT/UNION (preserving size for later relocation checks). Only base BTF STRUCT/UNIONs that are either embedded in split BTF STRUCT/UNIONs or that have multiple STRUCT/UNION instances of the same name will _need_ size checks at relocation time, but as it is possible a different set of types will be duplicates in the later to-be-resolved base BTF, we preserve size information for all named STRUCT/UNIONs. - if an ENUM[64] is named, a ENUM forward representation (an ENUM with no values) of the same size is used. - in all other cases, the type is added to the new split BTF. Avoiding struct/union/enum/enum64 expansion is important to keep the distilled base BTF representation to a minimum size. When successful, new representations of the distilled base BTF and new split BTF that refers to it are returned. Both need to be freed by the caller. So to take a simple example, with split BTF with a type referring to "struct sk_buff", we will generate distilled base BTF with a 0-member STRUCT sk_buff of the appropriate size, and the split BTF will refer to it instead. Tools like pahole can utilize such split BTF to populate the .BTF section (split BTF) and an additional .BTF.base section. Then when the split BTF is loaded, the distilled base BTF can be used to relocate split BTF to reference the current (and possibly changed) base BTF. So for example if "struct sk_buff" was id 502 when the split BTF was originally generated, we can use the distilled base BTF to see that id 502 refers to a "struct sk_buff" and replace instances of id 502 with the current (relocated) base BTF sk_buff type id. Distilled base BTF is small; when building a kernel with all modules using distilled base BTF as a test, overall module size grew by only 5.3Mb total across ~2700 modules. Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613095014.357981-2-alan.maguire@oracle.com commit 731e46c032281601756f08cfa7d8505fe41166a9 Author: Francois Dugast Date: Thu Jun 13 19:03:48 2024 +0200 drm/xe/exec_queue: Rename xe_exec_queue::compute to xe_exec_queue::lr The properties of this struct are used in long running context so make that clear by renaming it to lr, in alignment with the rest of the code. Cc: Matthew Brost Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240613170348.723245-1-francois.dugast@intel.com Signed-off-by: Rodrigo Vivi commit 8c40efeda94108d65c52038ea82ee83b2fb933e2 Author: Ricardo Ribalda Date: Mon Jun 10 23:09:57 2024 +0000 media: uvcvideo: Remove mappings form uvc_device_info We do not have any quirk device making us of this. Remove from now. It can be easily reverted later if needed. Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda commit e5cbddd09d4a9d66ed93e7c80ebf66ecf50ec3f3 Author: Ricardo Ribalda Date: Mon Jun 10 23:09:56 2024 +0000 media: uvcvideo: Remove PLF device quirking We can use heuristics to figure out the proper range of the control instead of quirking every single device. Reviewed-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda commit 6c7f1f756e75b44e096898d9907dcd0c81000d0b Author: Ricardo Ribalda Date: Mon Jun 10 23:09:55 2024 +0000 media: uvcvideo: Cleanup version-specific mapping We do not have more version specific mappings. Let's remove this code for now. It can be easily reverted later if needed. Reviewed-by: Laurent Pinchart Reviewed-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda commit b2b5fcb1c5b645d5177ef3e3f41c7a706fc2688d Author: Ricardo Ribalda Date: Mon Jun 10 23:09:54 2024 +0000 media: uvcvideo: Probe the PLF characteristics The UVC 1.5 standard defines 4 values for the PLF control: Off, 50Hz, 60Hz and Auto. But it does not clearly define if all the values must be implemented or not. Instead of just using the UVC version to determine what the PLF control can do, probe it. Reviewed-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda commit a8505ad3be3e931c02d7dea505ab7783530fcdaa Author: Ricardo Ribalda Date: Mon Jun 10 23:09:53 2024 +0000 media: uvcvideo: Refactor Power Line Frequency limit selection Move the PLF mapping logic to its own mapping filter function. This commit does not introduce any new functionality to the logic, it is just a preparation patch. Reviewed-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda commit 8f4362a8d42b918e4832037ab3cc6f25de61a080 Author: Ricardo Ribalda Date: Mon Jun 10 23:09:52 2024 +0000 media: uvcvideo: Allow custom control mapping Some advanced controls might not be completely implemented by vendors. If the controls are a enumeration, UVC does not gives a way to probe what is implemented and what is not. Let's create a new callback function where heuristics can be implemented to detect what is implemented and what not and update the control mapping accordingly. Reviewed-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda commit 9e3d55fbd160b3ca376599a68b4cddfdc67d4153 Author: Michal Pecio Date: Sun Apr 14 19:00:40 2024 +0200 media: uvcvideo: Fix the bandwdith quirk on USB 3.x The bandwidth fixup quirk doesn't know that SuperSpeed exists and has the same 8 service intervals per millisecond as High Speed, hence its calculations are wrong. Assume that all speeds from HS up use 8 intervals per millisecond. No further changes are needed, updated code has been confirmed to work with all speeds from FS to SS. Signed-off-by: Michal Pecio Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240414190040.2255a0bc@foxbook Signed-off-by: Laurent Pinchart commit c397e8c45d911443b4ab60084fb723edf2a5b604 Author: Laurent Pinchart Date: Sun Jan 15 22:52:10 2023 +0200 media: uvcvideo: Force UVC version to 1.0a for 0408:4035 The Quanta ACER HD User Facing camera reports a UVC 1.50 version, but implements UVC 1.0a as shown by the UVC probe control being 26 bytes long. Force the UVC version for that device. Reported-by: Giuliano Lotta Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2000947 Link: https://lore.kernel.org/r/20230115205210.20077-1-laurent.pinchart@ideasonboard.com Tested-by: Giuliano Lotta Signed-off-by: Laurent Pinchart commit c4681b2b3862d2b5e8e3182a4205adf314e321aa Merge: 2046047295204 aba59ce109dec Author: Greg Kroah-Hartman Date: Mon Jun 17 21:38:47 2024 +0200 Merge tag 'peci-next-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/iwi/linux into char-misc-next Iwona writes: Update peci-next for v6.11-rc1 * peci, hwmon - Update peci subsystem to use new Intel CPU model defines. * aspeed - Clear clock_divider before setting it. * tag 'peci-next-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/iwi/linux: peci: aspeed: Clear clock_divider value before setting it peci, hwmon: Switch to new Intel CPU model defines commit e2dc7cb72b25f90759382a065787c8ed81beb21b Author: Mitul Golani Date: Fri Jun 14 10:12:13 2024 +0530 drm/i915/display: Update calculation to avoid overflow Update calculation to avoid overflow. -v2: Remove extra line between cc and signed-off. Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Jani Nikula Cc: Stephen Rothwell Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240614044213.377710-1-mitulkumar.ajitkumar.golani@intel.com Signed-off-by: Rodrigo Vivi commit 9b3c13c9ea4ecb2b95948f666560b8df8f358b40 Author: Jeff Johnson Date: Thu Jun 13 21:39:42 2024 -0700 pstore: platform: add missing MODULE_DESCRIPTION() macro With ARCH=csky, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/pstore/pstore.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-csky-fs-pstore-v1-1-c525f636b1cb@quicinc.com Signed-off-by: Kees Cook commit 8cb2dbf94e44bcde4cff0223f2f900f8fb9083a4 Author: Thomas Gleixner Date: Mon Jun 17 20:31:31 2024 +0200 irqdomain: Make build work for CONFIG_GENERIC_IRQ_CHIP=n ld: kernel/irq/irqdomain.o: in function `irq_domain_instantiate': kernel/irq/irqdomain.c:296:(.text+0x10dd): undefined reference to `irq_domain_alloc_generic_chips' ld: kernel/irq/irqdomain.c:313:(.text+0x1218): undefined reference to `irq_domain_remove_generic_chips' ld: kernel/irq/irqdomain.o: in function `irq_domain_remove': kernel/irq/irqdomain.c:349:(.text+0x1ddf): undefined reference to `irq_domain_remove_generic_chips' Provide the required stubs. Fixes: e6f67ce32e8e ("irqdomain: Add support for generic irq chips creation before publishing a domain") Reported-by: Borislav Betkov Signed-off-by: Thomas Gleixner commit 99ef9f59847cab1f9091cd4b9d7efbee0ae4fc86 Author: Tom Lendacky Date: Wed Jun 5 10:18:56 2024 -0500 x86/sev: Allow non-VMPL0 execution when an SVSM is present To allow execution at a level other than VMPL0, an SVSM must be present. Allow the SEV-SNP guest to continue booting if an SVSM is detected and the hypervisor supports the SVSM feature as indicated in the GHCB hypervisor features bitmap. [ bp: Massage a bit. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/2ce7cf281cce1d0cba88f3f576687ef75dc3c953.1717600736.git.thomas.lendacky@amd.com commit 627dc671518b7f004ce04c45e8711f8dca94a57c Author: Tom Lendacky Date: Wed Jun 5 10:18:55 2024 -0500 x86/sev: Extend the config-fs attestation support for an SVSM When an SVSM is present, the guest can also request attestation reports from it. These SVSM attestation reports can be used to attest the SVSM and any services running within the SVSM. Extend the config-fs attestation support to provide such. This involves creating four new config-fs attributes: - 'service-provider' (input) This attribute is used to determine whether the attestation request should be sent to the specified service provider or to the SEV firmware. The SVSM service provider is represented by the value 'svsm'. - 'service_guid' (input) Used for requesting the attestation of a single service within the service provider. A null GUID implies that the SVSM_ATTEST_SERVICES call should be used to request the attestation report. A non-null GUID implies that the SVSM_ATTEST_SINGLE_SERVICE call should be used. - 'service_manifest_version' (input) Used with the SVSM_ATTEST_SINGLE_SERVICE call, the service version represents a specific service manifest version be used for the attestation report. - 'manifestblob' (output) Used to return the service manifest associated with the attestation report. Only display these new attributes when running under an SVSM. [ bp: Massage. - s/svsm_attestation_call/svsm_attest_call/g ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/965015dce3c76bb8724839d50c5dea4e4b5d598f.1717600736.git.thomas.lendacky@amd.com commit 20dfee95936413708701eb151f419597fdd9d948 Author: Tom Lendacky Date: Wed Jun 5 10:18:54 2024 -0500 x86/sev: Take advantage of configfs visibility support in TSM The TSM attestation report support provides multiple configfs attribute types (both for standard and binary attributes) to allow for additional attributes to be displayed for SNP as compared to TDX. With the ability to hide attributes via configfs, consolidate the multiple attribute groups into a single standard attribute group and a single binary attribute group. Modify the TDX support to hide the attributes that were previously "hidden" as a result of registering the selective attribute groups. Co-developed-by: Dan Williams Signed-off-by: Dan Williams Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/8873c45d0c8abc35aaf01d7833a55788a6905727.1717600736.git.thomas.lendacky@amd.com commit 0e6a35b93745bb2d8b921fd0520ef730489d41a2 Author: Tom Lendacky Date: Wed Jun 5 10:18:53 2024 -0500 fs/configfs: Add a callback to determine attribute visibility In order to support dynamic decisions as to whether an attribute should be created, add a callback that returns a bool to indicate whether the attribute should be displayed. If no callback is registered, the attribute is displayed by default. Co-developed-by: Dan Williams Signed-off-by: Dan Williams Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/e555c8740a263fab9f83b2cbb44da1af49a2813c.1717600736.git.thomas.lendacky@amd.com commit 614dc0fb76327dbd81abd4612fbc2e4ba8f205e6 Author: Tom Lendacky Date: Wed Jun 5 10:18:52 2024 -0500 sev-guest: configfs-tsm: Allow the privlevel_floor attribute to be updated With the introduction of an SVSM, Linux will be running at a non-zero VMPL. Any request for an attestation report at a higher privilege VMPL than what Linux is currently running will result in an error. Allow for the privlevel_floor attribute to be updated dynamically. [ bp: Trim commit message. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/5a736be9384aebd98a0b7c929660f8a97cbdc366.1717600736.git.thomas.lendacky@amd.com commit eb65f96cb332d577b490ab9c9f5f8de8c0316076 Author: Tom Lendacky Date: Wed Jun 5 10:18:51 2024 -0500 virt: sev-guest: Choose the VMPCK key based on executing VMPL Currently, the sev-guest driver uses the vmpck-0 key by default. When an SVSM is present, the kernel is running at a VMPL other than 0 and the vmpck-0 key is no longer available. If a specific vmpck key has not be requested by the user via the vmpck_id module parameter, choose the vmpck key based on the active VMPL level. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/b88081c5d88263176849df8ea93e90a404619cab.1717600736.git.thomas.lendacky@amd.com commit 61564d346809aa84729e651b98032592a7d63d3e Author: Tom Lendacky Date: Wed Jun 5 10:18:50 2024 -0500 x86/sev: Provide guest VMPL level to userspace Requesting an attestation report from userspace involves providing the VMPL level for the report. Currently any value from 0-3 is valid because Linux enforces running at VMPL0. When an SVSM is present, though, Linux will not be running at VMPL0 and only VMPL values starting at the VMPL level Linux is running at to 3 are valid. In order to allow userspace to determine the minimum VMPL value that can be supplied to an attestation report, create a sysfs entry that can be used to retrieve the current VMPL level of the kernel. [ bp: Add CONFIG_SYSFS ifdeffery. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/fff846da0d8d561f9fdaf297dcf8cd907545a25b.1717600736.git.thomas.lendacky@amd.com commit 1beb348d5c7fdef502a581bd73f792a2cf1535d6 Author: Tom Lendacky Date: Wed Jun 5 10:18:49 2024 -0500 x86/sev: Provide SVSM discovery support The SVSM specification documents an alternative method of discovery for the SVSM using a reserved CPUID bit and a reserved MSR. This is intended for guest components that do not have access to the secrets page in order to be able to call the SVSM (e.g. UEFI runtime services). For the MSR support, a new reserved MSR 0xc001f000 has been defined. A #VC should be generated when accessing this MSR. The #VC handler is expected to ignore writes to this MSR and return the physical calling area address (CAA) on reads of this MSR. While the CPUID leaf is updated, allowing the creation of a CPU feature, the code will continue to use the VMPL level as an indication of the presence of an SVSM. This is because the SVSM can be called well before the CPU feature is in place and a non-zero VMPL requires that an SVSM be present. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/4f93f10a2ff3e9f368fd64a5920d51bf38d0c19e.1717600736.git.thomas.lendacky@amd.com commit d2b2931f19e48c9148909c2f45bccf21a8a83cfb Author: Tom Lendacky Date: Wed Jun 5 10:18:48 2024 -0500 x86/sev: Use the SVSM to create a vCPU when not in VMPL0 Using the RMPADJUST instruction, the VMSA attribute can only be changed at VMPL0. An SVSM will be present when running at VMPL1 or a lower privilege level. In that case, use the SVSM_CORE_CREATE_VCPU call or the SVSM_CORE_DESTROY_VCPU call to perform VMSA attribute changes. Use the VMPL level supplied by the SVSM for the VMSA when starting the AP. [ bp: Fix typo + touchups. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/bcdd95ecabe9723673b9693c7f1533a2b8f17781.1717600736.git.thomas.lendacky@amd.com commit fcd042e86422442f999feae96f34a408555be248 Author: Tom Lendacky Date: Wed Jun 5 10:18:47 2024 -0500 x86/sev: Perform PVALIDATE using the SVSM when not at VMPL0 The PVALIDATE instruction can only be performed at VMPL0. If an SVSM is present, it will be running at VMPL0 while the guest itself is then running at VMPL1 or a lower privilege level. In that case, use the SVSM_CORE_PVALIDATE call to perform memory validation instead of issuing the PVALIDATE instruction directly. The validation of a single 4K page is now explicitly identified as such in the function name, pvalidate_4k_page(). The pvalidate_pages() function is used for validating 1 or more pages at either 4K or 2M in size. Each function, however, determines whether it can issue the PVALIDATE directly or whether the SVSM needs to be invoked. [ bp: Touchups. ] [ Tom: fold in a fix for Coconut SVSM: https://lore.kernel.org/r/234bb23c-d295-76e5-a690-7ea68dc1118b@amd.com ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/4c4017d8b94512d565de9ccb555b1a9f8983c69c.1717600736.git.thomas.lendacky@amd.com commit 51005a59bcbe1add8802105437b3707ea257f2ea Author: Mark Rutland Date: Wed May 15 13:08:28 2024 +0100 lkdtm/bugs: add test for hung smp_call_function_single() The CONFIG_CSD_LOCK_WAIT_DEBUG option enables debugging of hung smp_call_function*() calls (e.g. when the target CPU gets stuck within the callback function). Testing this option requires triggering such hangs. This patch adds an lkdtm test with a hung smp_call_function_single() callback, which can be used to test CONFIG_CSD_LOCK_WAIT_DEBUG and NMI backtraces (as CONFIG_CSD_LOCK_WAIT_DEBUG will attempt an NMI backtrace of the hung target CPU). On arm64 using pseudo-NMI, this looks like: | # mount -t debugfs none /sys/kernel/debug/ | # echo SMP_CALL_LOCKUP > /sys/kernel/debug/provoke-crash/DIRECT | lkdtm: Performing direct entry SMP_CALL_LOCKUP | smp: csd: Detected non-responsive CSD lock (#1) on CPU#1, waiting 5000000176 ns for CPU#00 __lkdtm_SMP_CALL_LOCKUP+0x0/0x8(0x0). | smp: csd: CSD lock (#1) handling this request. | Sending NMI from CPU 1 to CPUs 0: | NMI backtrace for cpu 0 | CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.9.0-rc4-00001-gfdfd281212ec #1 | Hardware name: linux,dummy-virt (DT) | pstate: 60401005 (nZCv daif +PAN -UAO -TCO -DIT +SSBS BTYPE=--) | pc : __lkdtm_SMP_CALL_LOCKUP+0x0/0x8 | lr : __flush_smp_call_function_queue+0x1b0/0x290 | sp : ffff800080003f30 | pmr_save: 00000060 | x29: ffff800080003f30 x28: ffffa4ce961a4900 x27: 0000000000000000 | x26: fff000003fcfa0c0 x25: ffffa4ce961a4900 x24: ffffa4ce959aa140 | x23: ffffa4ce959aa140 x22: 0000000000000000 x21: ffff800080523c40 | x20: 0000000000000000 x19: 0000000000000000 x18: fff05b31aa323000 | x17: fff05b31aa323000 x16: ffff800080000000 x15: 0000330fc3fe6b2c | x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000279 | x11: 0000000000000040 x10: fff000000302d0a8 x9 : fff000000302d0a0 | x8 : fff0000003400270 x7 : 0000000000000000 x6 : ffffa4ce9451b810 | x5 : 0000000000000000 x4 : fff05b31aa323000 x3 : ffff800080003f30 | x2 : fff05b31aa323000 x1 : ffffa4ce959aa140 x0 : 0000000000000000 | Call trace: | __lkdtm_SMP_CALL_LOCKUP+0x0/0x8 | generic_smp_call_function_single_interrupt+0x14/0x20 | ipi_handler+0xb8/0x178 | handle_percpu_devid_irq+0x84/0x130 | generic_handle_domain_irq+0x2c/0x44 | gic_handle_irq+0x118/0x240 | call_on_irq_stack+0x24/0x4c | do_interrupt_handler+0x80/0x84 | el1_interrupt+0x44/0xc0 | el1h_64_irq_handler+0x18/0x24 | el1h_64_irq+0x78/0x7c | default_idle_call+0x40/0x60 | do_idle+0x23c/0x2d0 | cpu_startup_entry+0x38/0x3c | kernel_init+0x0/0x1d8 | start_kernel+0x51c/0x608 | __primary_switched+0x80/0x88 | CPU: 1 PID: 128 Comm: sh Not tainted 6.9.0-rc4-00001-gfdfd281212ec #1 | Hardware name: linux,dummy-virt (DT) | Call trace: | dump_backtrace+0x90/0xe8 | show_stack+0x18/0x24 | dump_stack_lvl+0xac/0xe8 | dump_stack+0x18/0x24 | csd_lock_wait_toolong+0x268/0x338 | smp_call_function_single+0x1dc/0x2f0 | lkdtm_SMP_CALL_LOCKUP+0xcc/0xfc | lkdtm_do_action+0x1c/0x38 | direct_entry+0xbc/0x14c | full_proxy_write+0x60/0xb4 | vfs_write+0xd0/0x35c | ksys_write+0x70/0x104 | __arm64_sys_write+0x1c/0x28 | invoke_syscall+0x48/0x114 | el0_svc_common.constprop.0+0x40/0xe0 | do_el0_svc+0x1c/0x28 | el0_svc+0x38/0x108 | el0t_64_sync_handler+0x120/0x12c | el0t_64_sync+0x1a4/0x1a8 | smp: csd: Continued non-responsive CSD lock (#1) on CPU#1, waiting 10000064272 ns for CPU#00 __lkdtm_SMP_CALL_LOCKUP+0x0/0x8(0x0). | smp: csd: CSD lock (#1) handling this request. | smp: csd: Continued non-responsive CSD lock (#1) on CPU#1, waiting 15000064384 ns for CPU#00 __lkdtm_SMP_CALL_LOCKUP+0x0/0x8(0x0). | smp: csd: CSD lock (#1) handling this request. Signed-off-by: Mark Rutland Acked-by: Paul E. McKenney Cc: Kees Cook Link: https://lore.kernel.org/r/20240515120828.375585-1-mark.rutland@arm.com Signed-off-by: Kees Cook commit 595265c92668cbdbd9f299c49907734d468c12e9 Author: Krzysztof Kozlowski Date: Mon Jun 17 14:57:35 2024 +0200 ASoC: Constify DAI ops auto_selectable_formats The static arrays passed as 'auto_selectable_formats' are not modified by the drivers nor by the core code, so make it const for code safety. Signed-off-by: Krzysztof Kozlowski Acked-by: Herve Codina Link: https://msgid.link/r/20240617125735.582963-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d4a7d067e061c95c6387cf537258082074a4d299 Author: Krzysztof Kozlowski Date: Mon Jun 17 14:57:34 2024 +0200 ASoC: soc-dai.h: Constify DAI ops auto_selectable_formats The core ASoC code does not modify contents of the 'auto_selectable_formats' array passed in 'struct snd_soc_dai_ops', so make it const for code safety. Reviewed-by: Herve Codina Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240617125735.582963-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit b83bd486b43d2b7f10595a9d7a52d41023eaa9c1 Author: Kanchan Joshi Date: Mon Jun 17 10:19:18 2024 +0530 block: cleanup flag_{show,store} Remove a superfluous argument that flag_show and flag_store currently take. Signed-off-by: Kanchan Joshi Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240617044918.374608-1-joshi.k@samsung.com Signed-off-by: Jens Axboe commit f8a86a9bb5f7e65d8c4405052de062639a8783bb Author: Kan Liang Date: Fri Jun 14 06:46:31 2024 -0700 perf/x86/intel/uncore: Support HBM and CXL PMON counters Unknown uncore PMON types can be found in both SPR and EMR with HBM or CXL. $ls /sys/devices/ | grep type uncore_type_12_16 uncore_type_12_18 uncore_type_12_2 uncore_type_12_4 uncore_type_12_6 uncore_type_12_8 uncore_type_13_17 uncore_type_13_19 uncore_type_13_3 uncore_type_13_5 uncore_type_13_7 uncore_type_13_9 The unknown PMON types are HBM and CXL PMON. Except for the name, the other information regarding the HBM and CXL PMON counters can be retrieved via the discovery table. Add them into the uncores tables for SPR and EMR. The event config registers for all CXL related units are 8-byte apart. Add SPR_UNCORE_MMIO_OFFS8_COMMON_FORMAT to specially handle it. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-9-kan.liang@linux.intel.com commit 15a4bd51853b9c67f49bb03c20b6b6cb60fd204f Author: Kan Liang Date: Fri Jun 14 06:46:30 2024 -0700 perf/x86/uncore: Cleanup unused unit structure The unit control and ID information are retrieved from the unit control RB tree. No one uses the old structure anymore. Remove them. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-8-kan.liang@linux.intel.com commit f76a8420444beb1c3968504c8176a67d2d5fe18f Author: Kan Liang Date: Fri Jun 14 06:46:29 2024 -0700 perf/x86/uncore: Apply the unit control RB tree to PCI uncore units The unit control RB tree has the unit control and unit ID information for all the PCI units. Use them to replace the box_ctls/pci_offsets to get an accurate unit control address for PCI uncore units. The UPI/M3UPI units in the discovery table are ignored. Please see the commit 65248a9a9ee1 ("perf/x86/uncore: Add a quirk for UPI on SPR"). Manually allocate a unit control RB tree for UPI/M3UPI. Add cleanup_extra_boxes to release such manual allocation. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-7-kan.liang@linux.intel.com commit b1d9ea2e1ca44987c8409cc628dfb0c84e93dce9 Author: Kan Liang Date: Fri Jun 14 06:46:28 2024 -0700 perf/x86/uncore: Apply the unit control RB tree to MSR uncore units The unit control RB tree has the unit control and unit ID information for all the MSR units. Use them to replace the box_ctl and uncore_msr_box_ctl() to get an accurate unit control address for MSR uncore units. Add intel_generic_uncore_assign_hw_event(), which utilizes the accurate unit control address from the unit control RB tree to calculate the config_base and event_base. The unit id related information should be retrieved from the unit control RB tree as well. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-6-kan.liang@linux.intel.com commit 80580dae65b941eb681bd79f31f64f91b58232b4 Author: Kan Liang Date: Fri Jun 14 06:46:27 2024 -0700 perf/x86/uncore: Apply the unit control RB tree to MMIO uncore units The unit control RB tree has the unit control and unit ID information for all the units. Use it to replace the box_ctls/mmio_offsets to get an accurate unit control address for MMIO uncore units. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-5-kan.liang@linux.intel.com commit 585463fee64270d4b4d80b1e433d2105ef555bec Author: Kan Liang Date: Fri Jun 14 06:46:26 2024 -0700 perf/x86/uncore: Retrieve the unit ID from the unit control RB tree The box_ids only save the unit ID for the first die. If a unit, e.g., a CXL unit, doesn't exist in the first die. The unit ID cannot be retrieved. The unit control RB tree also stores the unit ID information. Retrieve the unit ID from the unit control RB tree Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-4-kan.liang@linux.intel.com commit c74443d92f68f07c03ae242ced554b749e6c6736 Author: Kan Liang Date: Fri Jun 14 06:46:25 2024 -0700 perf/x86/uncore: Support per PMU cpumask The cpumask of some uncore units, e.g., CXL uncore units, may be wrong under some configurations. Perf may access an uncore counter of a non-existent uncore unit. The uncore driver assumes that all uncore units are symmetric among dies. A global cpumask is shared among all uncore PMUs. However, some CXL uncore units may only be available on some dies. A per PMU cpumask is introduced to track the CPU mask of this PMU. The driver searches the unit control RB tree to check whether the PMU is available on a given die, and updates the per PMU cpumask accordingly. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Yunying Sun Link: https://lore.kernel.org/r/20240614134631.1092359-3-kan.liang@linux.intel.com commit 0007f39325921351b7860a976a730acbb198b9ca Author: Kan Liang Date: Fri Jun 14 06:46:24 2024 -0700 perf/x86/uncore: Save the unit control address of all units The unit control address of some CXL units may be wrongly calculated under some configuration on a EMR machine. The current implementation only saves the unit control address of the units from the first die, and the first unit of the rest of dies. Perf assumed that the units from the other dies have the same offset as the first die. So the unit control address of the rest of the units can be calculated. However, the assumption is wrong, especially for the CXL units. Introduce an RB tree for each uncore type to save the unit control address and three kinds of ID information (unit ID, PMU ID, and die ID) for all units. The unit ID is a physical ID of a unit. The PMU ID is a logical ID assigned to a unit. The logical IDs start from 0 and must be contiguous. The physical ID and the logical ID are 1:1 mapping. The units with the same physical ID in different dies share the same PMU. The die ID indicates which die a unit belongs to. The RB tree can be searched by two different keys (unit ID or PMU ID + die ID). During the RB tree setup, the unit ID is used as a key to look up the RB tree. The perf can create/assign a proper PMU ID to the unit. Later, after the RB tree is setup, PMU ID + die ID is used as a key to look up the RB tree to fill the cpumask of a PMU. It's used more frequently, so PMU ID + die ID is compared in the unit_less(). The uncore_find_unit() has to be O(N). But the RB tree setup only occurs once during the driver load time. It should be acceptable. Compared with the current implementation, more space is required to save the information of all units. The extra size should be acceptable. For example, on EMR, there are 221 units at most. For a 2-socket machine, the extra space is ~6KB at most. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240614134631.1092359-2-kan.liang@linux.intel.com commit 16df35946120fca2346c415fae429c821391eef8 Author: Kirill A. Shutemov Date: Fri Jun 14 12:59:04 2024 +0300 ACPI: tables: Print MULTIPROC_WAKEUP when MADT is parsed When MADT is parsed, print MULTIPROC_WAKEUP information: ACPI: MP Wakeup (version[1], mailbox[0x7fffd000], reset[0x7fffe068]) This debug information will be very helpful during bringup. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Baoquan He Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Kai Huang Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-20-kirill.shutemov@linux.intel.com commit 1ceebe2e46720de02af4cf626dc847ecc4a263fd Author: Kirill A. Shutemov Date: Fri Jun 14 12:59:03 2024 +0300 x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method MADT Multiprocessor Wakeup structure version 1 brings support for CPU offlining: BIOS provides a reset vector where the CPU has to jump to for offlining itself. The new TEST mailbox command can be used to test whether the CPU offlined itself which means the BIOS has control over the CPU and can online it again via the ACPI MADT wakeup method. Add CPU offlining support for the ACPI MADT wakeup method by implementing custom cpu_die(), play_dead() and stop_this_cpu() SMP operations. CPU offlining makes it possible to hand over secondary CPUs over kexec, not limiting the second kernel to a single CPU. The change conforms to the approved ACPI spec change proposal. See the Link. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Thomas Gleixner Acked-by: Kai Huang Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/all/13356251.uLZWGnKmhe@kreacher Link: https://lore.kernel.org/r/20240614095904.1345461-19-kirill.shutemov@linux.intel.com commit d88e7b3e35cff2c318042990d70828f64c3ae296 Author: Kirill A. Shutemov Date: Fri Jun 14 12:59:02 2024 +0300 x86/mm: Introduce kernel_ident_mapping_free() The helper complements kernel_ident_mapping_init(): it frees the identity mapping that was previously allocated. It will be used in the error path to free a partially allocated mapping or if the mapping is no longer needed. The caller provides a struct x86_mapping_info with the free_pgd_page() callback hooked up and the pgd_t to free. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Acked-by: Kai Huang Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-18-kirill.shutemov@linux.intel.com commit 26ba7353caaa7140561d3f7693a77a3eb68c722c Author: Kirill A. Shutemov Date: Fri Jun 14 12:59:01 2024 +0300 x86/smp: Add smp_ops.stop_this_cpu() callback If the helper is defined, it is called instead of halt() to stop the CPU at the end of stop_this_cpu() and on crash CPU shutdown. ACPI MADT will use it to hand over the CPU to BIOS in order to be able to wake it up again after kexec. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Acked-by: Kai Huang Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-17-kirill.shutemov@linux.intel.com commit db0936830a2fcc35e2b283275acf61b6d3ae1e11 Author: Kirill A. Shutemov Date: Fri Jun 14 12:59:00 2024 +0300 x86/acpi: Do not attempt to bring up secondary CPUs in the kexec case ACPI MADT doesn't allow to offline a CPU after it was onlined. This limits kexec: the second kernel won't be able to use more than one CPU. To prevent a kexec kernel from onlining secondary CPUs, invalidate the mailbox address in the ACPI MADT wakeup structure which prevents a kexec kernel to use it. This is safe as the booting kernel has the mailbox address cached already and acpi_wakeup_cpu() uses the cached value to bring up the secondary CPUs. Note: This is a Linux specific convention and not covered by the ACPI specification. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kai Huang Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-16-kirill.shutemov@linux.intel.com commit 6630cbce7cd7785f76b1055f33a71199ef28510b Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:59 2024 +0300 x86/acpi: Rename fields in the acpi_madt_multiproc_wakeup structure In order to support MADT wakeup structure version 1, provide more appropriate names for the fields in the structure. Rename 'mailbox_version' to 'version'. This field signifies the version of the structure and the related protocols, rather than the version of the mailbox. This field has not been utilized in the code thus far. Rename 'base_address' to 'mailbox_address' to clarify the kind of address it represents. In version 1, the structure includes the reset vector address. Clear and distinct naming helps to prevent any confusion. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kai Huang Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-15-kirill.shutemov@linux.intel.com commit 5574b368873d4f24e2ae8fab3a1105ede252e542 Author: Ashish Kalra Date: Fri Jun 14 12:58:58 2024 +0300 x86/mm: Do not zap page table entries mapping unaccepted memory table during kdump During crashkernel boot only pre-allocated crash memory is presented as E820_TYPE_RAM. This can cause page table entries mapping unaccepted memory table to be zapped during phys_pte_init(), phys_pmd_init(), phys_pud_init() and phys_p4d_init() as SNP/TDX guest use E820_TYPE_ACPI to store the unaccepted memory table and pass it between the kernels on kexec/kdump. E820_TYPE_ACPI covers not only ACPI data, but also EFI tables and might be required by kernel to function properly. The problem was discovered during debugging kdump for SNP guest. The unaccepted memory table stored with E820_TYPE_ACPI and passed between the kernels on kdump was getting zapped as the PMD entry mapping this is above the E820_TYPE_RAM range for the reserved crashkernel memory. Signed-off-by: Ashish Kalra Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240614095904.1345461-14-kirill.shutemov@linux.intel.com commit 06fa48d85b09b3e67afeda220bc19f7102b53beb Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:57 2024 +0300 x86/mm: Make e820__end_ram_pfn() cover E820_TYPE_ACPI ranges e820__end_of_ram_pfn() is used to calculate max_pfn which, among other things, guides where direct mapping ends. Any memory above max_pfn is not going to be present in the direct mapping. e820__end_of_ram_pfn() finds the end of the RAM based on the highest E820_TYPE_RAM range. But it doesn't includes E820_TYPE_ACPI ranges into calculation. Despite the name, E820_TYPE_ACPI covers not only ACPI data, but also EFI tables and might be required by kernel to function properly. Usually the problem is hidden because there is some E820_TYPE_RAM memory above E820_TYPE_ACPI. But crashkernel only presents pre-allocated crash memory as E820_TYPE_RAM on boot. If the pre-allocated range is small, it can fit under the last E820_TYPE_ACPI range. Modify e820__end_of_ram_pfn() and e820__end_of_low_ram_pfn() to cover E820_TYPE_ACPI memory. The problem was discovered during debugging kexec for TDX guest. TDX guest uses E820_TYPE_ACPI to store the unaccepted memory bitmap and pass it between the kernels on kexec. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Dave Hansen Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-13-kirill.shutemov@linux.intel.com commit 859e63b789d6b17b3c64e51a0aabdc58752a0254 Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:56 2024 +0300 x86/tdx: Convert shared memory back to private on kexec TDX guests allocate shared buffers to perform I/O. It is done by allocating pages normally from the buddy allocator and converting them to shared with set_memory_decrypted(). The second, kexec-ed kernel has no idea what memory is converted this way. It only sees E820_TYPE_RAM. Accessing shared memory via private mapping is fatal. It leads to unrecoverable TD exit. On kexec, walk direct mapping and convert all shared memory back to private. It makes all RAM private again and second kernel may use it normally. The conversion occurs in two steps: stopping new conversions and unsharing all memory. In the case of normal kexec, the stopping of conversions takes place while scheduling is still functioning. This allows for waiting until any ongoing conversions are finished. The second step is carried out when all CPUs except one are inactive and interrupts are disabled. This prevents any conflicts with code that may access shared memory. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Rick Edgecombe Reviewed-by: Kai Huang Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-12-kirill.shutemov@linux.intel.com commit 22daa42294b419a0d8060a3870285e7a72aa63e4 Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:55 2024 +0300 x86/mm: Add callbacks to prepare encrypted memory for kexec AMD SEV and Intel TDX guests allocate shared buffers for performing I/O. This is done by allocating pages normally from the buddy allocator and then converting them to shared using set_memory_decrypted(). On kexec, the second kernel is unaware of which memory has been converted in this manner. It only sees E820_TYPE_RAM. Accessing shared memory as private is fatal. Therefore, the memory state must be reset to its original state before starting the new kernel with kexec. The process of converting shared memory back to private occurs in two steps: - enc_kexec_begin() stops new conversions. - enc_kexec_finish() unshares all existing shared memory, reverting it back to private. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Reviewed-by: Kai Huang Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-11-kirill.shutemov@linux.intel.com commit c3abbf1376874f0d6eb22859a8655831644efa42 Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:54 2024 +0300 x86/tdx: Account shared memory The kernel will convert all shared memory back to private during kexec. The direct mapping page tables will provide information on which memory is shared. It is extremely important to convert all shared memory. If a page is missed, it will cause the second kernel to crash when it accesses it. Keep track of the number of shared pages. This will allow for cross-checking against the shared information in the direct mapping and reporting if the shared bit is lost. Memory conversion is slow and does not happen often. Global atomic is not going to be a bottleneck. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kai Huang Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-10-kirill.shutemov@linux.intel.com commit 9d1dcdfa909178b6f465625bbfd8311e6107b48e Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:53 2024 +0300 x86/mm: Return correct level from lookup_address() if pte is none Currently, lookup_address() returns two things: 1. A "pte_t" (which might be a p[g4um]d_t) 2. The 'level' of the page tables where the "pte_t" was found (returned via a pointer) If no pte_t is found, 'level' is essentially garbage. Always fill out the level. For NULL "pte_t"s, fill in the level where the p*d_none() entry was found mirroring the "found" behavior. Always filling out the level allows using lookup_address() to precisely skip over holes when walking kernel page tables. Add one more entry into enum pg_level to indicate the size of the VA covered by one PGD entry in 5-level paging mode. Update comments for lookup_address() and lookup_address_in_pgd() to reflect changes in the interface. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Rick Edgecombe Reviewed-by: Baoquan He Reviewed-by: Dave Hansen Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-9-kirill.shutemov@linux.intel.com commit 99c5c4c60e0db1d2ff58b8a61c93b6851146469f Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:52 2024 +0300 x86/mm: Make x86_platform.guest.enc_status_change_*() return an error TDX is going to have more than one reason to fail enc_status_change_prepare(). Change the callback to return errno instead of assuming -EIO. Change enc_status_change_finish() too to keep the interface symmetric. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Dave Hansen Reviewed-by: Kai Huang Reviewed-by: Michael Kelley Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-8-kirill.shutemov@linux.intel.com commit de60613173dfd75a10f6aa8e001bbcafa242e623 Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:51 2024 +0300 x86/kexec: Keep CR4.MCE set during kexec for TDX guest TDX guests run with MCA enabled (CR4.MCE=1b) from the very start. If that bit is cleared during CR4 register reprogramming during boot or kexec flows, a #VE exception will be raised which the guest kernel cannot handle. Therefore, make sure the CR4.MCE setting is preserved over kexec too and avoid raising any #VEs. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240614095904.1345461-7-kirill.shutemov@linux.intel.com commit 7b46a8997db27ed70b01458fa4437ec2360feddd Author: Borislav Petkov Date: Fri Jun 14 12:58:50 2024 +0300 x86/relocate_kernel: Use named labels for less confusion That identity_mapped() function was loving that "1" label to the point of completely confusing its readers. Use named labels in each place for clarity. No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Kirill A. Shutemov Link: https://lore.kernel.org/r/20240614095904.1345461-6-kirill.shutemov@linux.intel.com commit 66e48e491d1e1a0f243ebfcb9639b23de1a5db5e Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:49 2024 +0300 cpu/hotplug, x86/acpi: Disable CPU offlining for ACPI MADT wakeup ACPI MADT doesn't allow to offline a CPU after it has been woken up. Currently, CPU hotplug is prevented based on the confidential computing attribute which is set for Intel TDX. But TDX is not the only possible user of the wake up method. Any platform that uses ACPI MADT wakeup method cannot offline CPU. Disable CPU offlining on ACPI MADT wakeup enumeration. This has no visible effects for users: currently, TDX guest is the only platform that uses the ACPI MADT wakeup method. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-5-kirill.shutemov@linux.intel.com commit 1037e4c53e851682ff8d1ab656567a4d5a333c93 Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:48 2024 +0300 cpu/hotplug: Add support for declaring CPU offlining not supported The ACPI MADT mailbox wakeup method doesn't allow to offline a CPU after it has been woken up. Currently, offlining is prevented based on the confidential computing attribute which is set for Intel TDX. But TDX is not the only possible user of the wake up method. The MADT wakeup can be implemented outside of a confidential computing environment. Offline support is a property of the wakeup method, not the CoCo implementation. Introduce cpu_hotplug_disable_offlining() that can be called to indicate that CPU offlining should be disabled. This function is going to replace CC_ATTR_HOTPLUG_DISABLED for ACPI MADT wakeup method. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-4-kirill.shutemov@linux.intel.com commit 24dd05da8c7995cb2016b8f4da631c557aa6b40d Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:47 2024 +0300 x86/apic: Mark acpi_mp_wake_* variables as __ro_after_init acpi_mp_wake_mailbox_paddr and acpi_mp_wake_mailbox are initialized once during ACPI MADT init and never changed. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Baoquan He Reviewed-by: Thomas Gleixner Acked-by: Kai Huang Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-3-kirill.shutemov@linux.intel.com commit 2b5e22afae07ca7d833e251f6d60da8455676ee9 Author: Kirill A. Shutemov Date: Fri Jun 14 12:58:46 2024 +0300 x86/acpi: Extract ACPI MADT wakeup code into a separate file In order to prepare for the expansion of support for the ACPI MADT wakeup method, move the relevant code into a separate file. Introduce a new configuration option to clearly indicate dependencies without the use of ifdefs. There have been no functional changes. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Baoquan He Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Thomas Gleixner Acked-by: Borislav Petkov (AMD) Acked-by: Kai Huang Acked-by: Rafael J. Wysocki Tested-by: Tao Liu Link: https://lore.kernel.org/r/20240614095904.1345461-2-kirill.shutemov@linux.intel.com commit 54183d103d38e5efefce8500ec41dfbfaba9c19d Author: Nikolay Borisov Date: Wed May 29 18:28:50 2024 +0300 x86/kexec: Remove spurious unconditional JMP from from identity_mapped() This seemingly straightforward JMP was introduced in the initial version of the the 64bit kexec code without any explanation. It turns out (check accompanying Link) it's likely a copy/paste artefact from 32-bit code, where such a JMP could be used as a serializing instruction for the 486's prefetch queue. On x86_64 that's not needed because there's already a preceding write to cr4 which itself is a serializing operation. [ bp: Typos. Let's try this and see what cries out. If it does, reverting it is trivial. ] Signed-off-by: Nikolay Borisov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/all/55bc0649-c017-49ab-905d-212f140a403f@citrix.com/ commit 118b4eed8bbfccd625786db940fb590caab395ff Author: Christophe JAILLET Date: Fri Jun 14 18:08:30 2024 +0200 drm/nouveau: Constify struct nouveau_job_ops "struct nouveau_job_ops" is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct nouveau_job" and "struct nouveau_job_args" also need to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 5570 152 0 5722 165a drivers/gpu/drm/nouveau/nouveau_exec.o After: ===== text data bss dec hex filename 5630 112 0 5742 166e drivers/gpu/drm/nouveau/nouveau_exec.o Signed-off-by: Christophe JAILLET Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/860e9753d7867aa46b003bb3d0497f1b04065b24.1718381285.git.christophe.jaillet@wanadoo.fr commit d45bb9c5f7a6f7b6e47939856b28cb1da0cdc119 Author: Dave Airlie Date: Wed Apr 17 15:40:32 2024 +1000 nouveau: rip out busy fence waits I'm pretty sure this optimisation is actually not a great idea, and is racy with other things waiting for fences. Just nuke it, there should be no need to do fence waits in a busy CPU loop. Signed-off-by: Dave Airlie Reviewed-by: Ben Skeggs Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240417054032.3145721-1-airlied@gmail.com commit 4f15b06e5782e9a44acc652034090b5fc40b49e5 Author: Harshitha Prem Date: Mon Jun 17 14:12:47 2024 +0300 wifi: ath12k: Remove unused ath12k_base from ath12k_hw Currently, device (ab) reference in hardware abstraction (ah) is not used anywhere. Also, with multiple device group abstraction, hardware abstraction would be coupled with device group abstraction rather than single device. Hence, remove the ab reference from hardware abstraction. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529060939.4156281-1-quic_hprem@quicinc.com commit 670d4949bc8e7178420761130664f563453085bd Author: Aaradhana Sahu Date: Mon Jun 17 14:12:47 2024 +0300 wifi: ath12k: Fix WARN_ON during firmware crash in split-phy Whenever firmware is crashed in split-phy below WARN_ON() triggered: WARNING: CPU: 3 PID: 82 at net/mac80211/driver-ops.c:41 drv_stop+0xac/0xbc Modules linked in: ath12k qmi_helpers CPU: 3 PID: 82 Comm: kworker/3:2 Tainted: G D W 6.9.0-next-20240520-00113-gd981a3784e15 #39 Hardware name: Qualcomm Technologies, Inc. IPQ9574/AP-AL02-C9 (DT) Workqueue: events_freezable ieee80211_restart_work pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : drv_stop+0xac/0xbc lr : ieee80211_stop_device+0x54/0x64 sp : ffff8000848dbb20 x29: ffff8000848dbb20 x28: 0000000000000790 x27: ffff000014d78900 x26: ffff000014d791f8 x25: ffff000007f0d9b0 x24: 0000000000000018 x23: 0000000000000001 x22: 0000000000000000 x21: ffff000014d78e10 x20: ffff800081dc0000 x19: ffff000014d78900 x18: ffffffffffffffff x17: ffff7fffbca84000 x16: ffff800083fe0000 x15: ffff800081dc0b48 x14: 0000000000000076 x13: 0000000000000076 x12: 0000000000000001 x11: 0000000000000000 x10: 0000000000000a60 x9 : ffff8000848db980 x8 : ffff000000dddfc0 x7 : 0000000000000400 x6 : ffff800083b012d8 x5 : ffff800083b012d8 x4 : 0000000000000000 x3 : ffff000014d78398 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000014d78900 Call trace: drv_stop+0xac/0xbc ieee80211_stop_device+0x54/0x64 ieee80211_do_stop+0x5a0/0x790 ieee80211_stop+0x4c/0x178 __dev_close_many+0xb0/0x150 dev_close_many+0x88/0x130 dev_close.part.171+0x44/0x74 dev_close+0x1c/0x28 cfg80211_shutdown_all_interfaces+0x44/0xfc ieee80211_restart_work+0xfc/0x14c process_scheduled_works+0x18c/0x2dc worker_thread+0x13c/0x314 kthread+0x118/0x124 ret_from_fork+0x10/0x20 ---[ end trace 0000000000000000 ]--- The warning in question is from drv_stop(): if (WARN_ON(!local->started)) return; The sequence of WARN_ON() is: Thread 1: -Firmware crash calls ath12k_core_reset(). -Call ieee80211_restart_hw() inside ath12k_core_post_reconfigure_recovery() which schedules worker for both hardware. -Wait for completion of ab->recovery_start. Thread 2 (worker thread): -One hardware acquires rtnl_lock() inside ieee80211_restart_hw() and calls ath12k_mac_wait_reconfigure() into ath12k_mac_op_start(). -Hardware is waiting for ab->reconfigure_complete but at this time recovery_start_count value is 1 because another worker thread (local->restart_work) is still waiting for rtnl_lock(). recovery_start_count is not equal to number of radios (2 in split-phy). So ab->recovery_start complete does not set due to this, thread 1 is still waiting and not able to perform hif power down up and firmware reload. -Wait timeout happens for ab->reconfigure_complete and comeback to caller (ath12k_mac_op_start()) and sends WMI command to crashed firmware and gets error. -This returns error to drv_start() and local->started is set to false. -Hardware calls cfg80211_shutdown_all_interfaces() after receiving error inside ieee80211_restart_work() and goes to drv_stop(), here we trigger WARN_ON as local->started is false. To fix this issue call ieee80211_restart_hw() after firmware has been reloaded. Now, each hardware can send WMI command to firmware successfully. With this fix we don't need to wait for ab->recovery_start completion so remove ath12k_mac_wait_reconfigure(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aaradhana Sahu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529034405.2863150-1-quic_aarasahu@quicinc.com commit 78aaf42921b759f39bedcf4e6aa56151fba64465 Author: Frank Li Date: Mon Jun 10 11:17:21 2024 -0400 dt-bindings: remoteproc: imx_rproc: Add minItems for power-domain "fsl,imx8qxp-cm4" and "fsl,imx8qm-cm4" need minimum 2 power domains. Other platform doesn't require 'power-domain'. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240610151721.274424-1-Frank.Li@nxp.com Reviewed-by: Rob Herring (Arm) Signed-off-by: Mathieu Poirier commit dce68a49be26abf52712e0ee452a45fa01ab4624 Author: Aleksandr Mishin Date: Wed Jun 12 16:17:14 2024 +0300 remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init In imx_rproc_addr_init() strcmp() is performed over the node after the of_node_put() is performed over it. Fix this error by moving of_node_put() calls. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5e4c1243071d ("remoteproc: imx_rproc: support remote cores booted before Linux Kernel") Cc: stable@vger.kernel.org Signed-off-by: Aleksandr Mishin Link: https://lore.kernel.org/r/20240612131714.12907-1-amishin@t-argos.ru Signed-off-by: Mathieu Poirier commit 92584deade41ac8dda3f9b79ab545f50ba0e95db Author: Herve Codina Date: Fri Jun 14 19:32:24 2024 +0200 MAINTAINERS: Add the Microchip LAN966x OIC driver entry After contributing the driver, add myself as the maintainer for the Microchip LAN966x OIC driver. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-24-herve.codina@bootlin.com commit 3e3a7b35332924c8ade696c4b24735561ee6aea3 Author: Herve Codina Date: Fri Jun 14 19:32:23 2024 +0200 irqchip: Add support for LAN966x OIC The Microchip LAN966x outband interrupt controller (OIC) maps the internal interrupt sources of the LAN966x device to an external interrupt. When the LAN966x device is used as a PCI device, the external interrupt is routed to the PCI interrupt. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-23-herve.codina@bootlin.com commit 17972a5f1ba85ad8c4f32dfd00ff620a85e98416 Author: Herve Codina Date: Fri Jun 14 19:32:22 2024 +0200 dt-bindings: interrupt-controller: Add support for Microchip LAN966x OIC The Microchip LAN966x outband interrupt controller (OIC) maps the internal interrupt sources of the LAN966x device to an external interrupt. When the LAN966x device is used as a PCI device, the external interrupt is routed to the PCI interrupt. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240614173232.1184015-22-herve.codina@bootlin.com commit 0b4b172b760efabf8a77ea17644d333fbb444d39 Author: Herve Codina Date: Fri Jun 14 19:32:21 2024 +0200 irqdomain: Remove __irq_domain_add() __irq_domain_add() has been replaced by irq_domain_instanciate() and so, it is no more used. Simply remove it. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-21-herve.codina@bootlin.com commit a701f8e93b8355a0817a3b60974e8211797e0733 Author: Herve Codina Date: Fri Jun 14 19:32:20 2024 +0200 _PATCH_19_23_um_virt_pci_Use_irq_domain_instantiate_ um_pci_init() uses __irq_domain_add(). With the introduction of irq_domain_instantiate(), __irq_domain_add() becomes obsolete. In order to fully remove __irq_domain_add(), use directly irq_domain_instantiate(). [ tglx: Fixup struct initializer ] Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-20-herve.codina@bootlin.com commit 2ada5ed6ecac06e32defe39b15b33e9a6b004413 Author: Herve Codina Date: Fri Jun 14 19:32:19 2024 +0200 irqdomain: Convert domain creation functions to irq_domain_instantiate() Domain creation functions use __irq_domain_add(). With the introduction of irq_domain_instantiate(), __irq_domain_add() becomes obsolete. In order to fully remove __irq_domain_add(), convert domain creation function to irq_domain_instantiate() Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-19-herve.codina@bootlin.com commit 7c53626cd11820a11f9cb2c54c02d47fc062a265 Author: Herve Codina Date: Fri Jun 14 19:32:18 2024 +0200 irqdomain: Convert __irq_domain_add() wrappers to irq_domain_instantiate() __irq_domain_add() wrappers use directly __irq_domain_add(). With the introduction of irq_domain_instantiate(), __irq_domain_add() becomes obsolete. In order to fully remove __irq_domain_add(), convert wrappers to irq_domain_instantiate() [ tglx: Fixup struct initializers ] Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-18-herve.codina@bootlin.com commit 0c5b29a6dc7b463b6072da8cef43800008728ff3 Author: Herve Codina Date: Fri Jun 14 19:32:17 2024 +0200 irqdomain: Add a resource managed version of irq_domain_instantiate() Add a devres version of irq_domain_instantiate(). Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-17-herve.codina@bootlin.com commit e6f67ce32e8e6dcbadf42dc435fbc9002cabf1f9 Author: Herve Codina Date: Fri Jun 14 19:32:16 2024 +0200 irqdomain: Add support for generic irq chips creation before publishing a domain The current API functions create an irq_domain and also publish this newly created to domain. Once an irq_domain is published, consumers can request IRQ in order to use them. Some interrupt controller drivers have to perform some more operations with the created irq_domain in order to have it ready to be used. For instance: - Allocate generic irq chips with irq_alloc_domain_generic_chips() - Retrieve the generic irq chips with irq_get_domain_generic_chip() - Initialize retrieved chips: set register base address and offsets, set several hooks such as irq_mask, irq_unmask, ... With the newly introduced irq_domain_alloc_generic_chips(), an interrupt controller driver can use the irq_domain_chip_generic_info structure and set the init() hook to perform its generic chips initialization. In order to avoid a window where the domain is published but not yet ready to be used, handle the generic chip creation (i.e the irq_domain_alloc_generic_chips() call) before the domain is published. Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-16-herve.codina@bootlin.com commit fea922ee9f8ffd3c2a8e8dfbc68de42905a3982a Author: Herve Codina Date: Fri Jun 14 19:32:15 2024 +0200 genirq/generic_chip: Introduce init() and exit() hooks Most of generic chip drivers need to perform some more additional initializations on the generic chips allocated before they can be fully ready. These additional initializations need to be performed before the IRQ domain is published to avoid a race condition between IRQ consumers and suppliers. Introduce the init() hook to perform these initializations at the right place just after the generic chip creation. Also introduce the exit() hook to allow reverting operations done by the init() hook just before the generic chip is destroyed. Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-15-herve.codina@bootlin.com commit e25f553a92973eaf59ff3a00fe7f61ab01b2877f Author: Herve Codina Date: Fri Jun 14 19:32:14 2024 +0200 genirq/generic_chip: Introduce irq_domain_{alloc,remove}_generic_chips() The existing __irq_alloc_domain_generic_chips() uses a bunch of parameters to describe the generic chips that need to be allocated. Adding more parameters and wrappers to hide new parameters in the existing code leads to more and more code without any relevant values and without any flexibility. Introduce irq_domain_alloc_generic_chips() where the generic chips description is done using the irq_domain_chip_generic_info structure instead of the bunch of parameters to allow flexibility and easy evolution. Also introduce irq_domain_remove_generic_chips() to revert the operations done by irq_domain_alloc_generic_chips(). Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-14-herve.codina@bootlin.com commit 44b68de9b8e3dfde12308e8567548799d7ded0de Author: Herve Codina Date: Fri Jun 14 19:32:13 2024 +0200 irqdomain: Introduce init() and exit() hooks The current API does not allow additional initialization before the domain is published. This can lead to a race condition between consumers and supplier as a domain can be available for consumers before being fully ready. Introduce the init() hook to allow additional initialization before plublishing the domain. Also introduce the exit() hook to revert operations done in init() on domain removal. Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-13-herve.codina@bootlin.com commit 0b21add71bd9cfa2bd6677a0300e15fd4c4b84ed Author: Herve Codina Date: Fri Jun 14 19:32:12 2024 +0200 irqdomain: Handle domain bus token in irq_domain_create() irq_domain_update_bus_token() is the only way to set the domain bus token. This is sub-optimal as irq_domain_update_bus_token() can be called only once the domain is created and needs to revert some operations, change the domain name and redo the operations. In order to avoid this revert/change/redo sequence, take the domain bus into account token during the domain creation. Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-12-herve.codina@bootlin.com commit 80f6abe0d39bc6ccf353290067ff589653ff922c Author: Herve Codina Date: Fri Jun 14 19:32:11 2024 +0200 irqdomain: Make __irq_domain_create() return an error code __irq_domain_create() can fail for several reasons. When it fails it returns a NULL pointer and so filters out the exact failure reason. The only user of __irq_domain_create() is irq_domain_instantiate() which can return a PTR_ERR value. On __irq_domain_create() failure, it uses an arbitrary error code. Rather than using this arbitrary error value, make __irq_domain_create() return is own error code and use that one. [ tglx: Remove the pointless ERR_CAST. domain is a valid return pointer ] Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-11-herve.codina@bootlin.com commit b986055dd04141efd6d5dcdacd48d6b38cf320c8 Author: Herve Codina Date: Fri Jun 14 19:32:10 2024 +0200 irqdomain: Use irq_domain_instantiate() for hierarchy domain creation irq_domain_instantiate() handles all needs to be used in irq_domain_create_hierarchy() Avoid code duplication and use directly irq_domain_instantiate() for hierarchy domain creation. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-10-herve.codina@bootlin.com commit 419e3778ff295c00aa158d9f2854a70b47ba1136 Author: Herve Codina Date: Fri Jun 14 19:32:09 2024 +0200 irqdomain: Handle domain hierarchy parent in irq_domain_instantiate() To use irq_domain_instantiate() from irq_domain_create_hierarchy(), irq_domain_instantiate() needs to handle the domain hierarchy parent. Add the required functionality. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-9-herve.codina@bootlin.com commit 757398541c30a5e898169763b43f08dab71ea3bd Author: Herve Codina Date: Fri Jun 14 19:32:08 2024 +0200 irqdomain: Handle additional domain flags in irq_domain_instantiate() In order to use irq_domain_instantiate() from several places such as irq_domain_create_hierarchy(), irq_domain_instantiate() needs to handle additional domain flags. Add the required infrastructure. Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-8-herve.codina@bootlin.com commit 24a4f4e48557dddf2bb722df7b01184efc92a6a7 Author: Herve Codina Date: Fri Jun 14 19:32:07 2024 +0200 irqdomain: Convert __irq_domain_create() to use struct irq_domain_info The existing __irq_domain_create() use a bunch of parameters to create an irq domain. With the introduction of irq_domain_info structure, these parameters are available in the information structure itself. Using directly this information structure allows future flexibility to add other parameters in a simple way without the need to change the __irq_domain_create() prototype. Convert __irq_domain_create() to use the information structure. [ tglx: Fixup struct initializer ] Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-7-herve.codina@bootlin.com commit dbd56abffc6a43eb361e8033dce7a7d176f8e867 Author: Herve Codina Date: Fri Jun 14 19:32:06 2024 +0200 irqdomain: Use a dedicated function to set the domain name The interrupt domain name computation and setting is directly done in __irq_domain_create(). This leads to a quite long __irq_domain_create() function. In order to simplify __irq_domain_create() and isolate the domain name computation and setting, move the related operations to a dedicated function. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-6-herve.codina@bootlin.com commit 922ac2cf9fe444c4aff165b9f7e158a9b651647d Author: Herve Codina Date: Fri Jun 14 19:32:05 2024 +0200 irqdomain: Constify parameter in is_fwnode_irqchip() The fwnode parameter has no reason to be a pointer to an un-const struct fwnode_handle. Indeed, struct fwnode_handle is not supposed to be modified by the function. Be consistent with other function performing the same kind of operation such as is_of_node(), is_acpi_device_node() or is_software_node(): constify the fwnode parameter. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-5-herve.codina@bootlin.com commit 299d623f5c9ab48e53255cf6b510627f1ef26dfe Author: Herve Codina Date: Fri Jun 14 19:32:03 2024 +0200 irqdomain: Introduce irq_domain_instantiate() The existing irq_domain_add_*() functions used to instantiate an IRQ domain are wrappers built on top of __irq_domain_add() and describe the domain properties using a bunch of parameters. Adding more parameters and wrappers to hide new parameters in the existing code lead to more and more code without any relevant value and without any flexibility. Introduce irq_domain_instantiate() where the interrupt domain properties are given using a irq_domain_info structure instead of the bunch of parameters to allow flexibility and easy evolution. irq_domain_instantiate() performs the same operation as the one done by __irq_domain_add(). For compatibility reason with existing code, keep __irq_domain_add() but convert it to irq_domain_instantiate(). [ tglx: Fixed up struct initializer coding style ] Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-3-herve.codina@bootlin.com commit 89b37541ca38954f8ac01c2ca25405b140cfc8eb Author: Herve Codina Date: Fri Jun 14 19:32:02 2024 +0200 irqdomain: Introduce irq_domain_free() In preparation of the introduction of the irq domain instantiation, introduce irq_domain_free() to avoid code duplication on later modifications. This new function is an extraction of the current operations performed to free the irq domain. No functional change intended. Suggested-by: Thomas Gleixner Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240614173232.1184015-2-herve.codina@bootlin.com commit 6ce3e98184b625d2870991880bf9586ded7ea7f9 Author: Herve Codina Date: Fri Jun 14 19:32:04 2024 +0200 irqdomain: Fixed unbalanced fwnode get and put fwnode_handle_get(fwnode) is called when a domain is created with fwnode passed as a function parameter. fwnode_handle_put(domain->fwnode) is called when the domain is destroyed but during the creation a path exists that does not set domain->fwnode. If this path is taken, the fwnode get will never be put. To avoid the unbalanced get and put, set domain->fwnode unconditionally. Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only") Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240614173232.1184015-4-herve.codina@bootlin.com commit aba59ce109deca2b9abeb9072ddca0ea8682bf5a Author: Iwona Winiarska Date: Wed Apr 17 15:48:49 2024 +0200 peci: aspeed: Clear clock_divider value before setting it PECI clock divider is programmed on 10:8 bits of PECI Control register. Before setting a new value, clear bits read from hardware. Reviewed-by: Billy Tsai Link: https://lore.kernel.org/r/20240417134849.5793-1-iwona.winiarska@intel.com Signed-off-by: Iwona Winiarska commit fde78e4673afcb0bad382af8b81543476dc77655 Author: Stanislav Spassov Date: Fri May 24 16:04:49 2024 +0000 cpu/hotplug: Reverse order of iteration in freeze_secondary_cpus() Whenever CPU hotplug state callbacks are registered, the startup callback is invoked on CPUs that have already reached the provided state in order of ascending CPU IDs. In freeze_secondary_cpus() the teardown of CPUs happens in the same are invoked in the same order. This is known to make a difference is the current implementation of these callbacks in arch/x86/events/intel/uncore.c: - uncore_event_cpu_online() designates the first CPU it is invoked for on each package as the uncore event collector for that package - uncore_event_cpu_offline() if the CPU being offlined is the event collector for its package, transfers that responsibility over to the next (by ascending CPU id) one in the same package With the current order of CPU teardowns in freeze_secondary_cpus(), the latter ends up doing the ownership transfer work on every single CPU. That work involves a synchronize_rcu() call, ultimately unnecessarily degrading the performance of CPU offlining. To address this make freeze_secondary_cpus() iterate through the CPUs in reverse order, so that the teardown happens in order of descending CPU IDs. [ tglx: Massage change log ] Signed-off-by: Stanislav Spassov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240524160449.48594-1-stanspas@amazon.de commit c4df15931cb72556fea93bd763ada88e56cbd8e5 Author: Thorsten Blum Date: Wed May 8 17:42:26 2024 +0200 smp: Use str_plural() to fix Coccinelle warnings Fixes the following two Coccinelle/coccicheck warnings reported by string_choices.cocci: opportunity for str_plural(num_cpus) opportunity for str_plural(num_nodes) Signed-off-by: Thorsten Blum Signed-off-by: Thomas Gleixner Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20240508154225.309703-2-thorsten.blum@toblux.com commit f45a6051d582f613f4abc383ae238661f7813302 Author: Costa Shulyupin Date: Mon Mar 25 18:38:10 2024 +0200 cpu/hotplug: Fix typo in comment Signed-off-by: Costa Shulyupin Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240325163810.669459-1-costa.shul@redhat.com commit a43b9ec091b1b1924ea18883a715e5aadba2543e Author: Tony Luck Date: Wed May 29 10:19:20 2024 -0700 peci, hwmon: Switch to new Intel CPU model defines Update peci subsystem to use the same vendor-family-model combined definition that core x86 code uses. Signed-off-by: Tony Luck Acked-by: Guenter Roeck Reviewed-by: Iwona Winiarska Link: https://lore.kernel.org/r/20240529171920.62571-1-tony.luck@intel.com Signed-off-by: Iwona Winiarska commit 932bed41217059638c78a75411b7893b121d2162 Author: Sourabh Jain Date: Fri May 10 15:52:35 2024 +0530 powerpc/kexec_file: fix cpus node update to FDT While updating the cpus node, commit 40c753993e3a ("powerpc/kexec_file: Use current CPU info while setting up FDT") first deletes all subnodes under the /cpus node. However, while adding sub-nodes back, it missed adding cpus subnodes whose device_type != "cpu", such as l2-cache*, l3-cache*, ibm,powerpc-cpu-features. Fix this by only deleting cpus sub-nodes of device_type == "cpus" and then adding all available nodes with device_type == "cpu". Fixes: 40c753993e3a ("powerpc/kexec_file: Use current CPU info while setting up FDT") Signed-off-by: Sourabh Jain Signed-off-by: Michael Ellerman Link: https://msgid.link/20240510102235.2269496-3-sourabhjain@linux.ibm.com commit 0d3ff067331ef84e7e7f49537d768881042ed5ba Author: Sourabh Jain Date: Fri May 10 15:52:34 2024 +0530 powerpc/kexec_file: fix extra size calculation for kexec FDT While setting up the FDT for kexec, CPU nodes that are added after the system boots and reserved memory ranges are incorporated into the initial_boot_params (base FDT). However, they are not taken into account when determining the additional size needed for the kexec FDT. As a result, kexec fails to load, generating the following error: [1116.774451] Error updating memory reserve map: FDT_ERR_NOSPACE kexec_file_load failed: No such process Therefore, consider the extra size for CPU nodes added post-system boot and reserved memory ranges while preparing the kexec FDT. While adding a new parameter to the setup_new_fdt_ppc64 function, it was noticed that there were a couple of unused parameters, so they were removed. Signed-off-by: Sourabh Jain Signed-off-by: Michael Ellerman Link: https://msgid.link/20240510102235.2269496-2-sourabhjain@linux.ibm.com commit 0300a92e96cb393a1891d3b4a0f00b28dde8643b Author: Anjali K Date: Tue May 28 09:33:56 2024 +0530 powerpc/perf: Set cpumode flags using sample address Currently in some cases, when the sampled instruction address register latches to a specific address during sampling, the privilege bits captured in the sampled event register are incorrect. For example, a snippet from the perf report on a power10 system is: Overhead Address Command Shared Object Symbol ........ .................. ............ ................. ....................... 2.41% 0x7fff9f94a02c null_syscall [unknown] [k] 0x00007fff9f94a02c 2.20% 0x7fff9f94a02c null_syscall libc.so.6 [.] syscall perf_get_misc_flags() function looks at the privilege bits to return the corresponding flags to be used for the address symbol and these privilege bit details are read from the sampled event register. In the above snippet, address "0x00007fff9f94a02c" is shown as "k" (kernel) due to the incorrect privilege bits captured in the sampled event register. To address this case check whether the sampled address is in the kernel area. Since this is specific to the latest platform, a new pmu flag is added called "PPMU_P10" and is used to contain the proposed fix. PPMU_P10_DD1 marked events are also included under PPMU_P10, hence remove the code specific to PPMU_P10_DD1 marked events. Signed-off-by: Anjali K Reviewed-by: Athira Rajeev > Signed-off-by: Michael Ellerman Link: https://msgid.link/20240528040356.2722275-1-anjalik@linux.ibm.com commit 4314175af49668ab20c0d60d7d7657986e1d0c7c Merge: f22b4b55edb50 d25a92ccae6be Author: David S. Miller Date: Mon Jun 17 13:14:09 2024 +0100 Merge branch 'net-smc-IPPROTO_SMC' D. Wythe says: ==================== Introduce IPPROTO_SMC This patch allows to create smc socket via AF_INET, similar to the following code, /* create v4 smc sock */ v4 = socket(AF_INET, SOCK_STREAM, IPPROTO_SMC); /* create v6 smc sock */ v6 = socket(AF_INET6, SOCK_STREAM, IPPROTO_SMC); There are several reasons why we believe it is appropriate here: 1. For smc sockets, it actually use IPv4 (AF-INET) or IPv6 (AF-INET6) address. There is no AF_SMC address at all. 2. Create smc socket in the AF_INET(6) path, which allows us to reuse the infrastructure of AF_INET(6) path, such as common ebpf hooks. Otherwise, smc have to implement it again in AF_SMC path. Such as: 1. Replace IPPROTO_TCP with IPPROTO_SMC in the socket() syscall initiated by the user, without the use of LD-PRELOAD. 2. Select whether immediate fallback is required based on peer's port/ip before connect(). A very significant result is that we can now use eBPF to implement smc_run instead of LD_PRELOAD, who is completely ineffective in scenarios of static linking. Another potential value is that we are attempting to optimize the performance of fallback socks, where merging socks is an important part, and it relies on the creation of SMC sockets under the AF_INET path. (More information : https://lore.kernel.org/netdev/1699442703-25015-1-git-send-email-alibuda@linux.alibaba.com/T/) v2 -> v1: - Code formatting, mainly including alignment and annotation repair. - move inet_smc proto ops to inet_smc.c, avoiding af_smc.c becoming too bulky. - Fix the issue where refactoring affects the initialization order. - Fix compile warning (unused out_inet_prot) while CONFIG_IPV6 was not set. v3 -> v2: - Add Alibaba's copyright information to the newfile v4 -> v3: - Fix some spelling errors - Align function naming style with smc_sock_init() to smc_sk_init() - Reversing the order of the conditional checks on clcsock to make the code more intuitive v5 -> v4: - Fix some spelling errors - Added comment, "/* CONFIG_IPV6 */", after the final #endif directive. - Rename smc_inet.h and smc_inet.c to smc_inet.h and smc_inet.c - Encapsulate the initialization and destruction of inet_smc in inet_smc.c, rather than implementing it directly in af_smc.c. - Remove useless header files in smc_inet.h - Make smc_inet_prot_xxx and smc_inet_sock_init() to be static, since it's only used in smc_inet.c v6 -> v5: - Wrapping lines to not exceed 80 characters - Combine initialization and error handling of smc_inet6 into the same #if macro block. v7 -> v6: - Modify the value of IPPROTO_SMC to 256 so that it does not affect IPPROTO-MAX v8 -> v7: - Remove useless declarations. ==================== Signed-off-by: David S. Miller commit d25a92ccae6bed02327b63d138e12e7806830f78 Author: D. Wythe Date: Fri Jun 14 02:00:30 2024 +0800 net/smc: Introduce IPPROTO_SMC This patch allows to create smc socket via AF_INET, similar to the following code, /* create v4 smc sock */ v4 = socket(AF_INET, SOCK_STREAM, IPPROTO_SMC); /* create v6 smc sock */ v6 = socket(AF_INET6, SOCK_STREAM, IPPROTO_SMC); There are several reasons why we believe it is appropriate here: 1. For smc sockets, it actually use IPv4 (AF-INET) or IPv6 (AF-INET6) address. There is no AF_SMC address at all. 2. Create smc socket in the AF_INET(6) path, which allows us to reuse the infrastructure of AF_INET(6) path, such as common ebpf hooks. Otherwise, smc have to implement it again in AF_SMC path. Signed-off-by: D. Wythe Reviewed-by: Wenjia Zhang Reviewed-by: Dust Li Tested-by: Niklas Schnelle Tested-by: Wenjia Zhang Signed-off-by: David S. Miller commit 13543d02c90d6195b31bef8fb51dfeff77c0b368 Author: D. Wythe Date: Fri Jun 14 02:00:29 2024 +0800 net/smc: expose smc proto operations Externalize smc proto operations (smc_xxx) to allow access from files other than af_smc.c This is in preparation for the subsequent implementation of the AF_INET version of SMC. Signed-off-by: D. Wythe Reviewed-by: Wenjia Zhang Reviewed-by: Dust Li Tested-by: Niklas Schnelle Tested-by: Wenjia Zhang Signed-off-by: David S. Miller commit d0e35656d83458d668593930f1568d464dde429c Author: D. Wythe Date: Fri Jun 14 02:00:28 2024 +0800 net/smc: refactoring initialization of smc sock This patch aims to isolate the shared components of SMC socket allocation by introducing smc_sk_init() for sock initialization and __smc_create_clcsk() for the initialization of clcsock. This is in preparation for the subsequent implementation of the AF_INET version of SMC. Signed-off-by: D. Wythe Reviewed-by: Tony Lu Reviewed-by: Wenjia Zhang Reviewed-by: Dust Li Tested-by: Niklas Schnelle Tested-by: Wenjia Zhang Signed-off-by: David S. Miller commit f22b4b55edb507a2b30981e133b66b642be4d13f Author: Jakub Kicinski Date: Thu Jun 13 14:33:16 2024 -0700 net: make for_each_netdev_dump() a little more bug-proof I find the behavior of xa_for_each_start() slightly counter-intuitive. It doesn't end the iteration by making the index point after the last element. IOW calling xa_for_each_start() again after it "finished" will run the body of the loop for the last valid element, instead of doing nothing. This works fine for netlink dumps if they terminate correctly (i.e. coalesce or carefully handle NLM_DONE), but as we keep getting reminded legacy dumps are unlikely to go away. Fixing this generically at the xa_for_each_start() level seems hard - there is no index reserved for "end of iteration". ifindexes are 31b wide, tho, and iterator is ulong so for for_each_netdev_dump() it's safe to go to the next element. Signed-off-by: Jakub Kicinski Reviewed-by: Przemek Kitszel Signed-off-by: David S. Miller commit 195815c2755d70df92f46e6d737cd677db7adeef Author: Kuninori Morimoto Date: Mon Jun 17 04:26:38 2024 +0000 ASoC: audio-graph-card2: add support for aux devices Add device tree property to define auxiliary devices to be added to Audio Graph Card which is already supported on Simle Card. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/878qz4ry81.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1c75adb22d49ca9389333ca5e6939052a7203111 Author: Christophe JAILLET Date: Thu Jun 13 22:59:09 2024 +0200 ASoC: SOF: mediatek: Constify struct mtk_adsp_ipc_ops 'struct mtk_adsp_ipc_ops' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. In order to do it, "struct mtk_adsp_ipc" also needs to be adjusted to this new const qualifier. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 15533 2383 0 17916 45fc sound/soc/sof/mediatek/mt8195/mt8195.o After: ===== text data bss dec hex filename 15557 2367 0 17924 4604 sound/soc/sof/mediatek/mt8195/mt8195.o Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/a45d6b2b5ec040ea0fc78fca662c2dca3f13a49f.1718312321.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 2618b2ec8d140951588e4b4c8dd745676427d2cb Author: Animesh Agarwal Date: Sun Jun 16 15:22:19 2024 +0530 ASoC: dt-bindings: realtek,rt5514: Convert to dtschema Convert the RT5514 audio CODEC bindings to DT Schema. Make bindings complete by adding 'spi-max-frequency', 'wakeup-source' properties. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240616095223.260786-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit 20346f5c7bc9f83c74b5efed163ae4e2ea7616a9 Author: Animesh Agarwal Date: Sun Jun 16 13:19:30 2024 +0530 ASoC: dt-bindings: realtek,rt5631: Convert to dtschema Convert the ALC5631/RT5631 audio CODEC bindings to DT Schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240616074936.151267-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit 39eab0148752055928c4c54db12d6cf89881e6cd Author: Jeff Johnson Date: Sun Jun 16 20:52:26 2024 -0700 ASoC: fsl: imx-pcm-fiq: add missing MODULE_DESCRIPTION() macro With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/fsl/imx-pcm-fiq.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://msgid.link/r/20240616-md-arm-sound-soc-fsl-v2-1-228772e81a54@quicinc.com Signed-off-by: Mark Brown commit 15f5fe9e84839dcc9eaa69b08ced9d24cb464369 Author: Antony Antony Date: Tue Jun 11 08:32:15 2024 +0200 xfrm: Log input direction mismatch error in one place Previously, the offload data path decrypted the packet before checking the direction, leading to error logging and packet dropping. However, dropped packets wouldn't be visible in tcpdump or audit log. With this fix, the offload path, upon noticing SA direction mismatch, will pass the packet to the stack without decrypting it. The L3 layer will then log the error, audit, and drop ESP without decrypting or decapsulating it. This also ensures that the slow path records the error and audit log, making dropped packets visible in tcpdump. Fixes: 304b44f0d5a4 ("xfrm: Add dir validation to "in" data path lookup") Signed-off-by: Antony Antony Reviewed-by: Simon Horman Signed-off-by: Steffen Klassert commit 54fcc6189dfb822eea984fa2b3e477a02447279d Author: Antony Antony Date: Tue Jun 11 08:31:29 2024 +0200 xfrm: Fix input error path memory access When there is a misconfiguration of input state slow path KASAN report error. Fix this error. west login: [ 52.987278] eth1: renamed from veth11 [ 53.078814] eth1: renamed from veth21 [ 53.181355] eth1: renamed from veth31 [ 54.921702] ================================================================== [ 54.922602] BUG: KASAN: wild-memory-access in xfrmi_rcv_cb+0x2d/0x295 [ 54.923393] Read of size 8 at addr 6b6b6b6b00000000 by task ping/512 [ 54.924169] [ 54.924386] CPU: 0 PID: 512 Comm: ping Not tainted 6.9.0-08574-gcd29a4313a1b #25 [ 54.925290] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 54.926401] Call Trace: [ 54.926731] [ 54.927009] dump_stack_lvl+0x2a/0x3b [ 54.927478] kasan_report+0x84/0xa6 [ 54.927930] ? xfrmi_rcv_cb+0x2d/0x295 [ 54.928410] xfrmi_rcv_cb+0x2d/0x295 [ 54.928872] ? xfrm4_rcv_cb+0x3d/0x5e [ 54.929354] xfrm4_rcv_cb+0x46/0x5e [ 54.929804] xfrm_rcv_cb+0x7e/0xa1 [ 54.930240] xfrm_input+0x1b3a/0x1b96 [ 54.930715] ? xfrm_offload+0x41/0x41 [ 54.931182] ? raw_rcv+0x292/0x292 [ 54.931617] ? nf_conntrack_confirm+0xa2/0xa2 [ 54.932158] ? skb_sec_path+0xd/0x3f [ 54.932610] ? xfrmi_input+0x90/0xce [ 54.933066] xfrm4_esp_rcv+0x33/0x54 [ 54.933521] ip_protocol_deliver_rcu+0xd7/0x1b2 [ 54.934089] ip_local_deliver_finish+0x110/0x120 [ 54.934659] ? ip_protocol_deliver_rcu+0x1b2/0x1b2 [ 54.935248] NF_HOOK.constprop.0+0xf8/0x138 [ 54.935767] ? ip_sublist_rcv_finish+0x68/0x68 [ 54.936317] ? secure_tcpv6_ts_off+0x23/0x168 [ 54.936859] ? ip_protocol_deliver_rcu+0x1b2/0x1b2 [ 54.937454] ? __xfrm_policy_check2.constprop.0+0x18d/0x18d [ 54.938135] NF_HOOK.constprop.0+0xf8/0x138 [ 54.938663] ? ip_sublist_rcv_finish+0x68/0x68 [ 54.939220] ? __xfrm_policy_check2.constprop.0+0x18d/0x18d [ 54.939904] ? ip_local_deliver_finish+0x120/0x120 [ 54.940497] __netif_receive_skb_one_core+0xc9/0x107 [ 54.941121] ? __netif_receive_skb_list_core+0x1c2/0x1c2 [ 54.941771] ? blk_mq_start_stopped_hw_queues+0xc7/0xf9 [ 54.942413] ? blk_mq_start_stopped_hw_queue+0x38/0x38 [ 54.943044] ? virtqueue_get_buf_ctx+0x295/0x46b [ 54.943618] process_backlog+0xb3/0x187 [ 54.944102] __napi_poll.constprop.0+0x57/0x1a7 [ 54.944669] net_rx_action+0x1cb/0x380 [ 54.945150] ? __napi_poll.constprop.0+0x1a7/0x1a7 [ 54.945744] ? vring_new_virtqueue+0x17a/0x17a [ 54.946300] ? note_interrupt+0x2cd/0x367 [ 54.946805] handle_softirqs+0x13c/0x2c9 [ 54.947300] do_softirq+0x5f/0x7d [ 54.947727] [ 54.948014] [ 54.948300] __local_bh_enable_ip+0x48/0x62 [ 54.948832] __neigh_event_send+0x3fd/0x4ca [ 54.949361] neigh_resolve_output+0x1e/0x210 [ 54.949896] ip_finish_output2+0x4bf/0x4f0 [ 54.950410] ? __ip_finish_output+0x171/0x1b8 [ 54.950956] ip_send_skb+0x25/0x57 [ 54.951390] raw_sendmsg+0xf95/0x10c0 [ 54.951850] ? check_new_pages+0x45/0x71 [ 54.952343] ? raw_hash_sk+0x21b/0x21b [ 54.952815] ? kernel_init_pages+0x42/0x51 [ 54.953337] ? prep_new_page+0x44/0x51 [ 54.953811] ? get_page_from_freelist+0x72b/0x915 [ 54.954390] ? signal_pending_state+0x77/0x77 [ 54.954936] ? preempt_count_sub+0x14/0xb3 [ 54.955450] ? __might_resched+0x8a/0x240 [ 54.955951] ? __might_sleep+0x25/0xa0 [ 54.956424] ? first_zones_zonelist+0x2c/0x43 [ 54.956977] ? __rcu_read_lock+0x2d/0x3a [ 54.957476] ? __pte_offset_map+0x32/0xa4 [ 54.957980] ? __might_resched+0x8a/0x240 [ 54.958483] ? __might_sleep+0x25/0xa0 [ 54.958963] ? inet_send_prepare+0x54/0x54 [ 54.959478] ? sock_sendmsg_nosec+0x42/0x6c [ 54.960000] sock_sendmsg_nosec+0x42/0x6c [ 54.960502] __sys_sendto+0x15d/0x1cc [ 54.960966] ? __x64_sys_getpeername+0x44/0x44 [ 54.961522] ? __handle_mm_fault+0x679/0xae4 [ 54.962068] ? find_vma+0x6b/0x8b [ 54.962497] ? find_vma_intersection+0x8a/0x8a [ 54.963052] ? handle_mm_fault+0x38/0x154 [ 54.963556] ? handle_mm_fault+0xeb/0x154 [ 54.964059] ? preempt_latency_start+0x29/0x34 [ 54.964613] ? preempt_count_sub+0x14/0xb3 [ 54.965141] ? up_read+0x4b/0x5c [ 54.965557] __x64_sys_sendto+0x76/0x82 [ 54.966041] do_syscall_64+0x69/0xd5 [ 54.966497] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 54.967119] RIP: 0033:0x7f2d2fec9a73 [ 54.967572] Code: 8b 15 a9 83 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 80 3d 71 0b 0d 00 00 41 89 ca 74 14 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 75 c3 0f 1f 40 00 55 48 83 ec 30 44 89 4c 24 [ 54.969747] RSP: 002b:00007ffe85756418 EFLAGS: 00000202 ORIG_RAX: 000000000000002c [ 54.970655] RAX: ffffffffffffffda RBX: 0000558bebad1340 RCX: 00007f2d2fec9a73 [ 54.971511] RDX: 0000000000000040 RSI: 0000558bebad73c0 RDI: 0000000000000003 [ 54.972366] RBP: 0000558bebad73c0 R08: 0000558bebad35c0 R09: 0000000000000010 [ 54.973234] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000040 [ 54.974091] R13: 00007ffe85757b00 R14: 0000001d00000001 R15: 0000558bebad4680 [ 54.974951] [ 54.975244] ================================================================== [ 54.976133] Disabling lock debugging due to kernel taint [ 54.976784] Oops: stack segment: 0000 [#1] PREEMPT DEBUG_PAGEALLOC KASAN [ 54.977603] CPU: 0 PID: 512 Comm: ping Tainted: G B 6.9.0-08574-gcd29a4313a1b #25 [ 54.978654] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 54.979750] RIP: 0010:xfrmi_rcv_cb+0x2d/0x295 [ 54.980293] Code: 00 00 41 57 41 56 41 89 f6 41 55 41 54 55 53 48 89 fb 51 85 f6 75 31 48 89 df e8 d7 e8 ff ff 48 89 c5 48 89 c7 e8 8b a4 4f ff <48> 8b 7d 00 48 89 ee e8 eb f3 ff ff 49 89 c5 b8 01 00 00 00 4d 85 [ 54.982462] RSP: 0018:ffffc90000007990 EFLAGS: 00010282 [ 54.983099] RAX: 0000000000000001 RBX: ffff8881126e9900 RCX: fffffbfff07b77cd [ 54.983948] RDX: fffffbfff07b77cd RSI: fffffbfff07b77cd RDI: ffffffff83dbbe60 [ 54.984794] RBP: 6b6b6b6b00000000 R08: 0000000000000008 R09: 0000000000000001 [ 54.985647] R10: ffffffff83dbbe67 R11: fffffbfff07b77cc R12: 00000000ffffffff [ 54.986512] R13: 00000000ffffffff R14: 00000000ffffffff R15: 0000000000000002 [ 54.987365] FS: 00007f2d2fc0dc40(0000) GS:ffffffff82eb2000(0000) knlGS:0000000000000000 [ 54.988329] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 54.989026] CR2: 00007ffe85755ff8 CR3: 0000000109941000 CR4: 0000000000350ef0 [ 54.989897] Call Trace: [ 54.990223] [ 54.990500] ? __die_body+0x1a/0x56 [ 54.990950] ? die+0x30/0x49 [ 54.991326] ? do_trap+0x9b/0x132 [ 54.991751] ? do_error_trap+0x7d/0xaf [ 54.992223] ? exc_stack_segment+0x35/0x45 [ 54.992734] ? asm_exc_stack_segment+0x22/0x30 [ 54.993294] ? xfrmi_rcv_cb+0x2d/0x295 [ 54.993764] ? xfrm4_rcv_cb+0x3d/0x5e [ 54.994228] xfrm4_rcv_cb+0x46/0x5e [ 54.994670] xfrm_rcv_cb+0x7e/0xa1 [ 54.995106] xfrm_input+0x1b3a/0x1b96 [ 54.995572] ? xfrm_offload+0x41/0x41 [ 54.996038] ? raw_rcv+0x292/0x292 [ 54.996472] ? nf_conntrack_confirm+0xa2/0xa2 [ 54.997011] ? skb_sec_path+0xd/0x3f [ 54.997466] ? xfrmi_input+0x90/0xce [ 54.997925] xfrm4_esp_rcv+0x33/0x54 [ 54.998378] ip_protocol_deliver_rcu+0xd7/0x1b2 [ 54.998944] ip_local_deliver_finish+0x110/0x120 [ 54.999520] ? ip_protocol_deliver_rcu+0x1b2/0x1b2 [ 55.000111] NF_HOOK.constprop.0+0xf8/0x138 [ 55.000630] ? ip_sublist_rcv_finish+0x68/0x68 [ 55.001195] ? secure_tcpv6_ts_off+0x23/0x168 [ 55.001743] ? ip_protocol_deliver_rcu+0x1b2/0x1b2 [ 55.002331] ? __xfrm_policy_check2.constprop.0+0x18d/0x18d [ 55.003008] NF_HOOK.constprop.0+0xf8/0x138 [ 55.003527] ? ip_sublist_rcv_finish+0x68/0x68 [ 55.004078] ? __xfrm_policy_check2.constprop.0+0x18d/0x18d [ 55.004755] ? ip_local_deliver_finish+0x120/0x120 [ 55.005351] __netif_receive_skb_one_core+0xc9/0x107 [ 55.005972] ? __netif_receive_skb_list_core+0x1c2/0x1c2 [ 55.006626] ? blk_mq_start_stopped_hw_queues+0xc7/0xf9 [ 55.007266] ? blk_mq_start_stopped_hw_queue+0x38/0x38 [ 55.007899] ? virtqueue_get_buf_ctx+0x295/0x46b [ 55.008476] process_backlog+0xb3/0x187 [ 55.008961] __napi_poll.constprop.0+0x57/0x1a7 [ 55.009540] net_rx_action+0x1cb/0x380 [ 55.010020] ? __napi_poll.constprop.0+0x1a7/0x1a7 [ 55.010610] ? vring_new_virtqueue+0x17a/0x17a [ 55.011173] ? note_interrupt+0x2cd/0x367 [ 55.011675] handle_softirqs+0x13c/0x2c9 [ 55.012169] do_softirq+0x5f/0x7d [ 55.012597] [ 55.012882] [ 55.013179] __local_bh_enable_ip+0x48/0x62 [ 55.013704] __neigh_event_send+0x3fd/0x4ca [ 55.014227] neigh_resolve_output+0x1e/0x210 [ 55.014761] ip_finish_output2+0x4bf/0x4f0 [ 55.015278] ? __ip_finish_output+0x171/0x1b8 [ 55.015823] ip_send_skb+0x25/0x57 [ 55.016261] raw_sendmsg+0xf95/0x10c0 [ 55.016729] ? check_new_pages+0x45/0x71 [ 55.017229] ? raw_hash_sk+0x21b/0x21b [ 55.017708] ? kernel_init_pages+0x42/0x51 [ 55.018225] ? prep_new_page+0x44/0x51 [ 55.018704] ? get_page_from_freelist+0x72b/0x915 [ 55.019292] ? signal_pending_state+0x77/0x77 [ 55.019840] ? preempt_count_sub+0x14/0xb3 [ 55.020357] ? __might_resched+0x8a/0x240 [ 55.020860] ? __might_sleep+0x25/0xa0 [ 55.021345] ? first_zones_zonelist+0x2c/0x43 [ 55.021896] ? __rcu_read_lock+0x2d/0x3a [ 55.022396] ? __pte_offset_map+0x32/0xa4 [ 55.022901] ? __might_resched+0x8a/0x240 [ 55.023404] ? __might_sleep+0x25/0xa0 [ 55.023879] ? inet_send_prepare+0x54/0x54 [ 55.024391] ? sock_sendmsg_nosec+0x42/0x6c [ 55.024918] sock_sendmsg_nosec+0x42/0x6c [ 55.025428] __sys_sendto+0x15d/0x1cc [ 55.025892] ? __x64_sys_getpeername+0x44/0x44 [ 55.026441] ? __handle_mm_fault+0x679/0xae4 [ 55.026988] ? find_vma+0x6b/0x8b [ 55.027414] ? find_vma_intersection+0x8a/0x8a [ 55.027966] ? handle_mm_fault+0x38/0x154 [ 55.028470] ? handle_mm_fault+0xeb/0x154 [ 55.028972] ? preempt_latency_start+0x29/0x34 [ 55.029532] ? preempt_count_sub+0x14/0xb3 [ 55.030047] ? up_read+0x4b/0x5c [ 55.030463] __x64_sys_sendto+0x76/0x82 [ 55.030949] do_syscall_64+0x69/0xd5 [ 55.031406] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 55.032028] RIP: 0033:0x7f2d2fec9a73 [ 55.032481] Code: 8b 15 a9 83 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 80 3d 71 0b 0d 00 00 41 89 ca 74 14 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 75 c3 0f 1f 40 00 55 48 83 ec 30 44 89 4c 24 [ 55.034660] RSP: 002b:00007ffe85756418 EFLAGS: 00000202 ORIG_RAX: 000000000000002c [ 55.035567] RAX: ffffffffffffffda RBX: 0000558bebad1340 RCX: 00007f2d2fec9a73 [ 55.036424] RDX: 0000000000000040 RSI: 0000558bebad73c0 RDI: 0000000000000003 [ 55.037293] RBP: 0000558bebad73c0 R08: 0000558bebad35c0 R09: 0000000000000010 [ 55.038153] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000040 [ 55.039012] R13: 00007ffe85757b00 R14: 0000001d00000001 R15: 0000558bebad4680 [ 55.039871] [ 55.040167] Modules linked in: [ 55.040585] ---[ end trace 0000000000000000 ]--- [ 55.041164] RIP: 0010:xfrmi_rcv_cb+0x2d/0x295 [ 55.041714] Code: 00 00 41 57 41 56 41 89 f6 41 55 41 54 55 53 48 89 fb 51 85 f6 75 31 48 89 df e8 d7 e8 ff ff 48 89 c5 48 89 c7 e8 8b a4 4f ff <48> 8b 7d 00 48 89 ee e8 eb f3 ff ff 49 89 c5 b8 01 00 00 00 4d 85 [ 55.043889] RSP: 0018:ffffc90000007990 EFLAGS: 00010282 [ 55.044528] RAX: 0000000000000001 RBX: ffff8881126e9900 RCX: fffffbfff07b77cd [ 55.045386] RDX: fffffbfff07b77cd RSI: fffffbfff07b77cd RDI: ffffffff83dbbe60 [ 55.046250] RBP: 6b6b6b6b00000000 R08: 0000000000000008 R09: 0000000000000001 [ 55.047104] R10: ffffffff83dbbe67 R11: fffffbfff07b77cc R12: 00000000ffffffff [ 55.047960] R13: 00000000ffffffff R14: 00000000ffffffff R15: 0000000000000002 [ 55.048820] FS: 00007f2d2fc0dc40(0000) GS:ffffffff82eb2000(0000) knlGS:0000000000000000 [ 55.049805] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 55.050507] CR2: 00007ffe85755ff8 CR3: 0000000109941000 CR4: 0000000000350ef0 [ 55.051366] Kernel panic - not syncing: Fatal exception in interrupt [ 55.052136] Kernel Offset: disabled [ 55.052577] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Fixes: 304b44f0d5a4 ("xfrm: Add dir validation to "in" data path lookup") Signed-off-by: Antony Antony Reviewed-by: Simon Horman Signed-off-by: Steffen Klassert commit aa17d384971b62a8a7dc901c96f615efc7328a62 Author: Bartosz Golaszewski Date: Wed Jun 5 14:21:05 2024 +0200 dt-bindings: net: wireless: describe the ath12k PCI module Add device-tree bindings for the ATH12K module found in the WCN7850 package. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Signed-off-by: Kalle Valo Link: https://msgid.link/20240605122106.23818-3-brgl@bgdev.pl commit 71839a929d9ee97daab319d370fc0f6720daef43 Author: Bartosz Golaszewski Date: Wed Jun 5 14:21:04 2024 +0200 dt-bindings: net: wireless: qcom,ath11k: describe the ath11k on QCA6390 Add a PCI compatible for the ATH11K module on QCA6390 and describe the power inputs from the PMU that it consumes. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Signed-off-by: Kalle Valo Link: https://msgid.link/20240605122106.23818-2-brgl@bgdev.pl commit d2e02153f565b1bd8a4ee3a8ae0039dc108f54af Author: Vignesh Raman Date: Fri Jun 14 21:48:35 2024 +0530 drm/ci: add tests on vkms Add job that runs igt on top of vkms. Acked-by: Maíra Canal Acked-by: Helen Koike Signed-off-by: Vignesh Raman Acked-by: Jessica Zhang Tested-by: Jessica Zhang Acked-by: Maxime Ripard Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240614161835.55553-1-vignesh.raman@collabora.com commit 69776921e82d48a165a37438f48c46edf0456275 Merge: 934c29999b57b 7b66ae536a782 Author: David S. Miller Date: Mon Jun 17 11:37:19 2024 +0100 Merge branch 'mlx5-genl-queue-stats' Joe Damato says: ==================== mlx5: Add netdev-genl queue stats Welcome to v5. Switched from RFC to just a v5, because I think this is pretty close. Minor changes from v4 summarized below in the changelog. Note that my NIC does not seem to support PTP and I couldn't get the mlnx-tools mlnx_qos script to work, so I was only able to test the following cases: - device up at boot - adjusting queue counts - device down (e.g. ip link set dev eth4 down) Please see the commit message of patch 2/2 for more details on output and test cases. rfcv4 thread: https://lore.kernel.org/linux-kernel/20240604004629.299699-1-jdamato@fastly.com/T/ rfcv4 -> v5: - Patch 1/2: change variable name 'mlx5e_qid' to 'txq_ix'. - Patch 2/2: - remove logic in mlx5e_get_queue_stats_rx for PTP. PTP RX are always reported in base. - report PTP TX in mlx5e_get_base_stats only if: - PTP has ever been opened, and - either PTP is NULL (closed) or the MLX5E_PTP_STATE_TX bit in its state is not set Otherwise, PTP TX will be reported when the txq_ix is passed into mlx5e_get_queue_stats_tx rfcv3 -> rfcv4: - Patch 1/2 now creates a mapping (priv->txq2sq_stats) which maps txq indices to sq_stats structures so stats can be accessed directly. This mapping is kept up to date along side txq2sq. - Patch 2/2: - All mutex_lock/unlock on state_lock has been dropped. - mlx5e_get_queue_stats_rx now uses ASSERT_RTNL() and has a special case for PTP. If PTP was ever opened, is currently opened, and the channel index matches, stats for PTP RX are output. - mlx5e_get_queue_stats_tx rewritten to use priv->txq2sq_stats. No corner cases are needed here because any txq idx (passed in as i) will have an up to date mapping in priv->txq2sq_stats. - mlx5e_get_base_stats: - in the RX case: - iterates from [params.num_channels, stats_nch) collecting stats. - if ptp was ever opened but is currently closed, add the PTP stats. - in the TX case: - handle 2 cases: - the channel is available, so sum only the unavailable TCs [mlx5e_get_dcb_num_tc, max_opened_tc). - the channel is unavailable, so sum all TCs [0, max_opened_tc). - if ptp was ever opened but is currently closed, add the PTP sq stats. v2 -> rfcv3: - Added patch 1/2 which creates some helpers for computing the txq_ix and ch_ix/tc_ix. - Patch 2/2 modified in several ways: - Fixed variable declarations in mlx5e_get_queue_stats_rx to be at the start of the function. - mlx5e_get_queue_stats_tx rewritten to access sq stats directly by using the helpers added in the previous patch. - mlx5e_get_base_stats modified in several ways: - Took the state_lock when accessing priv->channels. - For the base RX stats, code was simplified to call mlx5e_get_queue_stats_rx instead of repeating the same code. - For the base TX stats, I attempted to implement what I think Tariq suggested in the previous thread: - for available channels, only unavailable TC stats are summed - for unavailable channels, all stats for TCs up to max_opened_tc are summed. v1 - > v2: - Essentially a full rewrite after comments from Jakub, Tariq, and Zhu. ==================== Signed-off-by: David S. Miller commit 7b66ae536a78216f9c4892533db2d76a8b60a81d Author: Joe Damato Date: Wed Jun 12 20:08:57 2024 +0000 net/mlx5e: Add per queue netdev-genl stats ./cli.py --spec netlink/specs/netdev.yaml \ --dump qstats-get --json '{"scope": "queue"}' ...snip {'ifindex': 7, 'queue-id': 62, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 105965251, 'rx-packets': 179790}, {'ifindex': 7, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 9402665, 'tx-packets': 17551}, ...snip Also tested with the script tools/testing/selftests/drivers/net/stats.py in several scenarios to ensure stats tallying was correct: - on boot (default queue counts) - adjusting queue count up or down (ethtool -L eth0 combined ...) The tools/testing/selftests/drivers/net/stats.py brings the device up, so to test with the device down, I did the following: $ ip link show eth4 7: eth4: mtu 9000 qdisc mq state DOWN [..snip..] [..snip..] $ cat /proc/net/dev | grep eth4 eth4: 235710489 434811 [..snip rx..] 2878744 21227 [..snip tx..] $ ./cli.py --spec ../../../Documentation/netlink/specs/netdev.yaml \ --dump qstats-get --json '{"ifindex": 7}' [{'ifindex': 7, 'rx-alloc-fail': 0, 'rx-bytes': 235710489, 'rx-packets': 434811, 'tx-bytes': 2878744, 'tx-packets': 21227}] Compare the values in /proc/net/dev match the output of cli for the same device, even while the device is down. Note that while the device is down, per queue stats output nothing (because the device is down there are no queues): $ ./cli.py --spec ../../../Documentation/netlink/specs/netdev.yaml \ --dump qstats-get --json '{"scope": "queue", "ifindex": 7}' [] Signed-off-by: Joe Damato Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 0a3e5c1b670f8c386bbd232ac30d74da3653a70a Author: Joe Damato Date: Wed Jun 12 20:08:56 2024 +0000 net/mlx5e: Add txq to sq stats mapping mlx5 currently maps txqs to an sq via priv->txq2sq. It is useful to map txqs to sq_stats, as well, for direct access to stats. Add priv->txq2sq_stats and insert mappings. The mappings will be used next to tabulate stats information. Signed-off-by: Joe Damato Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 355d210aad943ed12e70c79576406c0c303af815 Author: Vinod Govindapillai Date: Tue May 28 14:48:26 2024 +0300 drm/i915/display: update handling of FBC when VT-d active workaround Move the handling of the disabling FBC when VT-d is active wa as part of the intel_fbc_check_plane(). As the hw is still there, intel_fbc_sanitize should be able to handle the state properly. v2: update the patch description (Jani Nikula) v3: fix the return value in wa handling (Jani Nikula) Bspec: 21664 Suggested-by: Ville Syrjälä Signed-off-by: Vinod Govindapillai Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240528114826.134958-1-vinod.govindapillai@intel.com commit ff6ab055e070d819f51196622e08f8941b6d2a4b Author: Mika Westerberg Date: Tue Mar 21 11:40:49 2023 +0200 thunderbolt: Add receiver lane margining support for retimers Retimers support lane margining as well so make this available through debugfs in the same way as we do for the USB4 ports. When this is enabled we also expose retimers on the other side of the cable because typically margining is implemented only on direction towards the cable. However, for the retimers on the other side of the cable we do not allow NVM upgrade to avoid confusing the existing userspace (the same retimer may now appear twice with different name) and is probably not a good idea anyway. Signed-off-by: Mika Westerberg commit 0890fc36c70c8d5e80dc128c3a9d7a9122646869 Author: Mika Westerberg Date: Tue Mar 21 10:02:55 2023 +0200 thunderbolt: Make margining functions accept target and retimer index In order to add lane margining support for retimers make the margining functions take sideband target and retimer index as parameters. This makes it possible to access both router and retimer sideband using the same functions. Signed-off-by: Mika Westerberg commit ec6f888ed08aeceaebfdd7d344ae0cd91a1b9a1b Author: Mika Westerberg Date: Tue Mar 14 18:35:12 2023 +0200 thunderbolt: Split out margining from USB4 port We are going to expand lane margining support for retimers too so split out the generic margining functionality out of being specific to USB4 ports. Signed-off-by: Mika Westerberg commit 6d241fa0015969a8c8a185e9245b53e9fb681285 Author: Mika Westerberg Date: Mon Mar 20 13:50:44 2023 +0200 thunderbolt: Add sideband register access to debugfs This makes it possible to read and write USB4 port and retimer sideband registers through debugfs which is useful for debugging and manufacturing purposes. We add "sb_regs" debugfs attribute under each USB4 port and retimer that is used to access the sideband. Signed-off-by: Mika Westerberg commit e8241f66a812847853aa8c8a97b3492d152c6f23 Author: Mika Westerberg Date: Tue Apr 16 09:41:14 2024 +0300 thunderbolt: Make usb4_port_sb_read/write() available outside of usb4.c We need to call these from other files too so make them available outside of usb4.c. Signed-off-by: Mika Westerberg commit f1c42720c40119a620a32583098be21d3720e4b7 Author: Mika Westerberg Date: Tue Apr 16 09:51:47 2024 +0300 thunderbolt: Move usb4_port_margining_caps() declaration into correct place It is supposed to be close with the other lane margining functions so move it there. No functional changes. Signed-off-by: Mika Westerberg commit 2b43506774186be99e1003cac14f3c8ab7067935 Author: Mika Westerberg Date: Tue Apr 23 14:23:23 2024 +0300 thunderbolt: Mention Thunderbolt/USB4 debugging tools in Kconfig This allows the interested parties to find the Thunderbolt/USB4 debugging tools (aka tbtools) easier in case they need to look at the information under debugfs entries. Signed-off-by: Mika Westerberg Suggested-by: Mario Limonciello Reviewed-by: Mario Limonciello commit d81889c15871f350b213566a43f09943f93fb706 Author: Dan Carpenter Date: Wed Jun 12 13:43:33 2024 +0300 pinctrl: nuvoton: ma35d1: Fix an IS_ERR() vs NULL check The fwnode_iomap() function doesn't return error pointers, it returns NULL. It's the same as of_iomap() in that way. Update the check accordingly. Fixes: ecc5bf868673 ("pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/840152f9-d3bb-410e-8164-4c5043e1983e@moroto.mountain Signed-off-by: Linus Walleij commit 5224b7a936a61ab1bff2e9d16d3c5b7b48911eb7 Author: Jeff Johnson Date: Mon Jun 10 21:21:05 2024 -0700 pinctrl: add missing MODULE_DESCRIPTION() macros When ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pinctrl/bcm/pinctrl-bcm4908.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pinctrl/pinctrl-mcp23s08_i2c.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pinctrl/pinctrl-mcp23s08_spi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pinctrl/pinctrl-mcp23s08.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pinctrl/meson/pinctrl-meson.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes many meson drivers which, although they did not produce a warning with the x86 allmodconfig configuration, may cause this warning with ARM or ARM64 configurations. Signed-off-by: Jeff Johnson Reviewed-by: Neil Armstrong # for Amlogic Pinctrl drivers Link: https://lore.kernel.org/r/20240610-md-drivers-pinctrl-v1-1-68462e3d960c@quicinc.com Signed-off-by: Linus Walleij commit b2956099379edd869e9efa31876aeb65996c62d6 Author: Jani Nikula Date: Fri Jun 14 12:22:39 2024 +0300 drm/i915: move comments about FSB straps to proper place Move the comment about FSB straps to where the relevant register is read. Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8a5b6cd3db80259c30263861f1a9ff04fea2e7f0.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1cd377f33d4c042786f2d170a7097021787816f1 Author: Jani Nikula Date: Fri Jun 14 12:22:38 2024 +0300 drm/i915/cdclk: use i9xx_fsb_freq() for rawclk_freq initialization Instead of duplicating the CLKCFG parsing, reuse i9xx_fsb_freq() to figure out rawclk_freq where applicable. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/21511f155f1f446e066117bc6ed3165618d7afd6.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d0a6e5015f0e1c8c40adee1119213f7d72bdb65d Author: Jani Nikula Date: Fri Jun 14 12:22:37 2024 +0300 drm/i915: use i9xx_fsb_freq() for GT clock frequency Reuse i9xx_fsb_freq() for GT clock frequency initialization instead of depending on rawclk_freq. Note: If the init order was changed, we could use i915->fsb_freq directly. However, GT clock initialization is done in i915_driver_mmio_probe(), but intel_dram_detect() later in i915_driver_hw_probe(), with a dependency on intel_pcode_init(). Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/0678d8ec9772725b47d4fa5b14e3b3a34256d5cf.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit fc8bf961059c3795bf8f4bdb5948bff8417df1f6 Author: Jani Nikula Date: Fri Jun 14 12:22:36 2024 +0300 drm/i915: extend the fsb_freq initialization to more platforms Initialize fsb frequency for more platforms to be able to use it for GT clock and rawclk frequency initialization. Note: There's a discrepancy between existing pnv_fsb_freq() and i9xx_hrawclk() regarding CLKCFG interpretation. Presume all PNV is mobile. Default to 1333 MHz for unknown values, similar to i9xx_hrawclk(). v2: - Add MISSING_CASE() (Ville) - Default to the same frequency for both branches (Ville) Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7cd6dbd4dafb900ac1dd12be0ec096ff1d5fc6cf.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a4ad402078ad18ae6a7cc9be91b3492832a481a1 Author: Jani Nikula Date: Fri Jun 14 12:22:35 2024 +0300 drm/i915: convert fsb_freq and mem_freq to kHz We'll want to use fsb frequency for deriving GT clock and rawclk frequencies in the future. Increase the accuracy by converting to kHz. Do the same for mem freq to be aligned. Round the frequencies ending in 666 to 667. v2: Also handle mem_freq in gen5_rps_init() (Ville) Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/17fe2544b876549f63fac0f956273f5f282081b3.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 024a05a47e4475dbcab489777861e2161e1b28c8 Author: Jani Nikula Date: Fri Jun 14 12:22:34 2024 +0300 drm/i915/gt: remove mem freq from gt debugfs It's a bit out of place, and only printed for VLV/CHV. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/bbfec4c67a81d1d3de1f40484a80b7164e69df21.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 846bd6086d3536d2f9b5a4b289a75d7e7c7753dd Author: Jani Nikula Date: Fri Jun 14 12:22:33 2024 +0300 drm/i915/dram: rearrange mem freq init Follow the same style in mem freq init as in fsb freq init, returning the value instead of assigning in multiple places. Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f098ccdbb0c42016d5dad81e0b089bb4babe29f0.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e6534546a4b98542ec26375548dbca87f2e1e312 Author: Jani Nikula Date: Fri Jun 14 12:22:32 2024 +0300 drm/i915/dram: split out pnv DDR3 detection Split out the PNV DDR3 detection to a distinct step instead of conflating it with mem freq detection. Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c4bf9d32479ab5024e9daa37a996508f543f05e9.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9d4f1aeb25be7f92825f614b57fa91518c47d39f Author: Jani Nikula Date: Fri Jun 14 12:22:31 2024 +0300 drm/i915/dram: separate fsb freq detection from mem freq To simplify further changes, add separate functions for reading the fsb frequency. This ends up reading CLKCFG register twice, but it's not a big deal. Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7582651aa21ac2c1472111c4e81ba8fee182f80e.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 322dc10b2af8b066cfd4b6ea53f5522028eb6b30 Author: Jani Nikula Date: Fri Jun 14 12:22:30 2024 +0300 drm/i915/wm: clarify logging on not finding CxSR latency config Clarify and unify the logging on not finding PNV CxSR latency config. Just let the i915->fsb_freq == 0 || i915->mem_freq == 0 case go through the table instead of checking for it separately. v2: Do not check for fsb == 0 || mem == 0 separately (Matt) Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/6333cb0675c531e971e829105f1ecfc4d71bdc6b.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 105dadedc4ef42bbcf6b819d962908e482b7d5bb Author: Jani Nikula Date: Fri Jun 14 12:22:29 2024 +0300 drm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency Clarify that the function is specific to PNV, making subsequent changes slightly easier to grasp. Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7d4e3c9a4220ff84af2741e5cd7bb62d1b4f2a44.1718356614.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit f28cbab9bbd57abc3661ff84b7df60e28ded20b7 Author: Sean Anderson Date: Mon Jun 10 18:35:50 2024 -0400 pinctrl: zynqmp: Support muxing individual pins While muxing groups of pins at once can be convenient for large interfaces, it can also be rigid. This is because the group is set to all pins which support a particular function, even though not all pins may be used. For example, the sdhci0 function may be used with a 8-bit eMMC, 4-bit SD card, or even a 1-bit SD card. In these cases, the extra pins may be repurposed for other uses, but this is not currently allowed. There is not too much point in pin "groups" when there are not actual pin groups at the hardware level. The pins can all be muxed individually, so there's no point in adding artificial groups on top. Just mux the pins like the hardware allows. To this effect, add a new group for each pin which can be muxed. These groups are part of each function the pin can be muxed to. We treat group selectors beyond the number of groups as "pin" groups. To set this up, we initialize groups before functions, and then create a bitmap of used pins for each function. These used pins are appended to the function's list of groups. Signed-off-by: Sean Anderson Reviewed-by: Sai Krishna Potthuri Acked-by: Michal Simek Link: https://lore.kernel.org/r/20240610223550.2449230-3-sean.anderson@linux.dev Signed-off-by: Linus Walleij commit 58ba921150e96c5be718b92fd76e71ad82503c93 Author: Sean Anderson Date: Mon Jun 10 18:35:49 2024 -0400 dt-bindings: pinctrl: xilinx: Add support for function with pins Support specifying the function per-pin. The driver doesn't care whether you use pins or groups for this purpose. Signed-off-by: Sean Anderson Reviewed-by: Rob Herring (Arm) Acked-by: Michal Simek Link: https://lore.kernel.org/r/20240610223550.2449230-2-sean.anderson@linux.dev Signed-off-by: Linus Walleij commit 8b5a92ca24eb96bb71e2a55e352687487d87687f Author: Jani Nikula Date: Fri Jun 14 17:23:11 2024 +0300 drm/i915/mso: using joiner is not possible with eDP MSO It's not possible to use the joiner at the same time with eDP MSO. When a panel needs MSO, it's not optional, so MSO trumps joiner. v3: Only change intel_dp_has_joiner(), leave debugfs alone (Ville) Fixes: bc71194e8897 ("drm/i915/edp: enable eDP MSO during link training") Cc: # v5.13+ Cc: Ville Syrjala Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1668 Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240614142311.589089-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9b401f4a7170125365160c9af267a41ff6b39001 Author: Yang Yingliang Date: Thu Jun 6 10:37:04 2024 +0800 pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails This driver calls pinctrl_register_and_init() which is not devm_ managed, it will leads memory leak if pinctrl_enable() fails. Replace it with devm_pinctrl_register_and_init(). And add missing of_node_put() in the error path. Fixes: 5038a66dad01 ("pinctrl: core: delete incorrect free in pinctrl_enable()") Signed-off-by: Yang Yingliang Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240606023704.3931561-4-yangyingliang@huawei.com Signed-off-by: Linus Walleij commit 8f773bfbdd428819328a2d185976cfc6ae811cd3 Author: Yang Yingliang Date: Thu Jun 6 10:37:03 2024 +0800 pinctrl: single: fix possible memory leak when pinctrl_enable() fails This driver calls pinctrl_register_and_init() which is not devm_ managed, it will leads memory leak if pinctrl_enable() fails. Replace it with devm_pinctrl_register_and_init(). And call pcs_free_resources() if pinctrl_enable() fails. Fixes: 5038a66dad01 ("pinctrl: core: delete incorrect free in pinctrl_enable()") Signed-off-by: Yang Yingliang Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240606023704.3931561-3-yangyingliang@huawei.com Signed-off-by: Linus Walleij commit ae1cf4759972c5fe665ee4c5e0c29de66fe3cf4a Author: Yang Yingliang Date: Thu Jun 6 10:37:02 2024 +0800 pinctrl: core: fix possible memory leak when pinctrl_enable() fails In devm_pinctrl_register(), if pinctrl_enable() fails in pinctrl_register(), the "pctldev" has not been added to dev resources, so devm_pinctrl_dev_release() can not be called, it leads memory leak. Introduce pinctrl_uninit_controller(), call it in the error path to free memory. Fixes: 5038a66dad01 ("pinctrl: core: delete incorrect free in pinctrl_enable()") Signed-off-by: Yang Yingliang Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240606023704.3931561-2-yangyingliang@huawei.com Signed-off-by: Linus Walleij commit 1583dc1627f6f9a24f570eec53fa20f1b4a5758f Author: Stefan Wahren Date: Mon Jun 3 20:19:38 2024 +0200 pinctrl: bcm2835: Use string_choices API instead of ternary operator Use modern string_choices API instead of manually determining the output using ternary operator. Suggested-by: Andy Shevchenko Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20240603181938.76047-3-wahrenst@gmx.net Signed-off-by: Linus Walleij commit af197bef93bdf25c60cd0aebe7f7709dfc4c1d82 Author: Sean Anderson Date: Fri May 3 15:29:15 2024 -0400 drm: zynqmp_dp: Don't delay work We always call scheduled_delayed_work with no delay, so just use a non-delayed work_struct instead. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-4-sean.anderson@linux.dev commit c194dd025ae9e5b2c99056200f1e39494919a6cb Author: Sean Anderson Date: Fri May 3 15:29:14 2024 -0400 drm: zynqmp_dp: Rearrange zynqmp_dp for better padding Sort the members of struct zynqmp_dp to reduce padding necessary for alignment. Signed-off-by: Sean Anderson Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-3-sean.anderson@linux.dev commit 0743dafefd3f2b92116213f2225ea355001b7948 Author: Sean Anderson Date: Fri May 3 15:29:13 2024 -0400 drm: zynqmp_kms: Fix AUX bus not getting unregistered drm_encoder_cleanup is responsible for calling drm_bridge_detach for each bridge attached to the encoder. zynqmp_dp_bridge_detach is in turn responsible for unregistering the AUX bus. However, we never ended up calling drm_encoder_cleanup in the remove or error paths, so the AUX bus would stick around after the rest of the driver had been removed. I don't really understand why drm_mode_config_cleanup doesn't call drm_encoder_cleanup for us. It will call destroy (which for simple_encoder is drm_encoder_cleanup) on encoders in the mode_config's encoder_list. Should drm_encoder_cleanup get called before or after drm_atomic_helper_shutdown? Fixes: 2dfd045c8435 ("drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time") Signed-off-by: Sean Anderson Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-2-sean.anderson@linux.dev commit fea7fad8512f4fbe0e47d9bcc84034a4c1d2f223 Author: Anatoliy Klymenko Date: Thu May 23 16:49:28 2024 -0700 drm: xlnx: zynqmp_dpsub: Enable plane in atomic update Unconditionally enable the DPSUB layer in the corresponding atomic plane update callback. Setting the new display mode may require disabling and re-enabling the CRTC. This effectively resets DPSUB to the default state with all layers disabled. The original implementation of the plane atomic update enables the corresponding DPSUB layer only if the framebuffer format has changed. This would leave the layer disabled after switching to a different display mode with the same framebuffer format. Signed-off-by: Anatoliy Klymenko Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240523-dp-layer-enable-v2-1-d799020098fc@amd.com commit 4ea3deda1341fef7b923ad9cfe5dd46b1b51bfa8 Author: Christophe JAILLET Date: Mon May 20 11:40:37 2024 +0200 drm: zynqmp_dpsub: Fix an error handling path in zynqmp_dpsub_probe() If zynqmp_dpsub_drm_init() fails, we must undo the previous drm_bridge_add() call. Fixes: be3f3042391d ("drm: zynqmp_dpsub: Always register bridge") Signed-off-by: Christophe JAILLET Reviewed-by: Sean Anderson Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/974d1b062d7c61ee6db00d16fa7c69aa1218ee02.1716198025.git.christophe.jaillet@wanadoo.fr commit 1d1f3b8490b57c388a65f6c81fd867b1ec7e836b Author: Andrew Jeffery Date: Fri May 31 12:32:49 2024 +0930 dt-bindings: pinctrl: aspeed,ast2600-pinctrl: Describe I3C, USB I3C1 and I3C2 become muxed functions in the mass production release of the AST2600. Also document the USB2A device and USB2B HID mux options. Squash warnings such as: arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-elbert.dtb: pinctrl: usb2ad_default:function:0: 'USB2AD' is not one of ['ADC0', 'ADC1', 'ADC10', 'ADC11', 'ADC12', 'ADC13', 'ADC14', 'ADC15', 'ADC2', 'ADC3', 'ADC4', 'ADC5', 'ADC6', 'ADC7', 'ADC8', 'ADC9', 'BMCINT', 'EMMC', 'ESPI', 'ESPIALT', 'FSI1', 'FSI2', 'FWQSPI', 'FWSPIABR', 'FWSPID', 'FWSPIWP', 'GPIT0', 'GPIT1', 'GPIT2', 'GPIT3', 'GPIT4', 'GPIT5', 'GPIT6', 'GPIT7', 'GPIU0', 'GPIU1', 'GPIU2', 'GPIU3', 'GPIU4', 'GPIU5', 'GPIU6', 'GPIU7', 'I2C1', 'I2C10', 'I2C11', 'I2C12', 'I2C13', 'I2C14', 'I2C15', 'I2C16', 'I2C2', 'I2C3', 'I2C4', 'I2C5', 'I2C6', 'I2C7', 'I2C8', 'I2C9', 'I3C3', 'I3C4', 'I3C5', 'I3C6', 'JTAGM', 'LHPD', 'LHSIRQ', 'LPC', 'LPCHC', 'LPCPD', 'LPCPME', 'LPCSMI', 'LSIRQ', 'MACLINK1', 'MACLINK2', 'MACLINK3', 'MACLINK4', 'MDIO1', 'MDIO2', 'MDIO3', 'MDIO4', 'NCTS1', 'NCTS2', 'NCTS3', 'NCTS4', 'NDCD1', 'NDCD2', 'NDCD3', 'NDCD4', 'NDSR1', 'NDSR2', 'NDSR3', 'NDSR4', 'NDTR1', 'NDTR2', 'NDTR3', 'NDTR4', 'NRI1', 'NRI2', 'NRI3', 'NR I4', 'NRTS1', 'NRTS2', 'NRTS3', 'NRTS4', 'OSCCLK', 'PEWAKE', 'PWM0', 'PWM1', 'PWM10', 'PWM11', 'PWM12', 'PWM13', 'PWM14', 'PWM15', 'PWM2', 'PWM3', 'PWM4', 'PWM5', 'PWM6', 'PWM7', 'PWM8', 'PWM9', 'RGMII1', 'RGMII2', 'RGMII3', 'RGMII4', 'RMII1', 'RMII2', 'RMII3', 'RMII4', 'RXD1', 'RXD2', 'RXD3', 'RXD4', 'SALT1', 'SALT10', 'SALT11', 'SALT12', 'SALT13', 'SALT14', 'SALT15', 'SALT16', 'SALT2', 'SALT3', 'SALT4', 'SALT5', 'SALT6', 'SALT7', 'SALT8', 'SALT9', 'SD1', 'SD2', 'SGPM1', 'SGPM2', 'SGPS1', 'SGPS2', 'SIOONCTRL', 'SIOPBI', 'SIOPBO', 'SIOPWREQ', 'SIOPWRGD', 'SIOS3', 'SIOS5', 'SIOSCI', 'SPI1', 'SPI1ABR', 'SPI1CS1', 'SPI1WP', 'SPI2', 'SPI2CS1', 'SPI2CS2', 'TACH0', 'TACH1', 'TACH10', 'TACH11', 'TACH12', 'TACH13', 'TACH14', 'TACH15', 'TACH2', 'TACH3', 'TACH4', 'TACH5', 'TACH6', 'TACH7', 'TACH8', 'TACH9', 'THRU0', 'THRU1', 'THRU2', 'THRU3', 'TXD1', 'TXD2', 'TXD3', 'TXD4', 'UART10', 'UART11', 'UART12', 'UART13', 'UART6', 'UART7', 'UART8', 'UART9', 'USBAD', 'USBADP', 'USB2AH', 'USB2AHP', 'USB 2BD', 'USB2BH', 'VB', 'VGAHS', 'VGAVS', 'WDTRST1', 'WDTRST2', 'WDTRST3', 'WDTRST4'] Signed-off-by: Andrew Jeffery Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240531-dt-warnings-gpio-ast2600-pinctrl-funcs-groups-v1-3-a6fe2281a1b8@codeconstruct.com.au Signed-off-by: Linus Walleij commit 757d04a4730004eec3b3d6346372ececd67f9b6b Author: Andrew Jeffery Date: Fri May 31 12:32:48 2024 +0930 dt-bindings: pinctrl: aspeed,ast2500-pinctrl: Describe SGPM Squash warnings such as: arch/arm/boot/dts/aspeed/aspeed-ast2500-evb.dtb: pinctrl@80: sgpm_default:groups:0: 'SGPM' is not one of ['ACPI', 'ADC0', 'ADC1', 'ADC10', 'ADC11', 'ADC12', 'ADC13', 'ADC14', 'ADC15', 'ADC2', 'ADC3', 'ADC4', 'ADC5', 'ADC6', 'ADC7', 'ADC8', 'ADC9', 'BMCINT', 'DDCCLK', 'DDCDAT', 'ESPI', 'FWSPICS1', 'FWSPICS2', 'GPID0', 'GPID2', 'GPID4', 'GPID6', 'GPIE0', 'GPIE2', 'GPIE4', 'GPIE6', 'I2C10', 'I2C11', 'I2C12', 'I2C13', 'I2C14', 'I2C3', 'I2C4', 'I2C5', 'I2C6', 'I2C7', 'I2C8', 'I2C9', 'LAD0', 'LAD1', 'LAD2', 'LAD3', 'LCLK', 'LFRAME', 'LPCHC', 'LPCPD', 'LPCPLUS', 'LPCPME', 'LPCRST', 'LPCSMI', 'LSIRQ', 'MAC1LINK', 'MAC2LINK', 'MDIO1', 'MDIO2', 'NCTS1', 'NCTS2', 'NCTS3', 'NCTS4', 'NDCD1', 'NDCD2', 'NDCD3', 'NDCD4', 'NDSR1', 'NDSR2', 'NDSR3', 'NDSR4', 'NDTR1', 'NDTR2', 'NDTR3', 'NDTR4', 'NRI1', 'NRI2', 'NRI3', 'NRI4', 'NRTS1', 'NRTS2', 'NRTS3', 'NRTS4', 'OSCCLK', 'PEWAKE', 'PNOR', 'PWM0', 'PWM1', 'PWM2', 'PWM3', 'PWM4', 'PWM5', 'PWM6', 'PWM7', 'RGMII1', 'RGMII2', 'RMII1', 'RMII2', 'RXD1', ' RXD2', 'RXD3', 'RXD4', 'SALT1', 'SALT10', 'SALT11', 'SALT12', 'SALT13', 'SALT14', 'SALT2', 'SALT3', 'SALT4', 'SALT5', 'SALT6', 'SALT7', 'SALT8', 'SALT9', 'SCL1', 'SCL2', 'SD1', 'SD2', 'SDA1', 'SDA2', 'SGPS1', 'SGPS2', 'SIOONCTRL', 'SIOPBI', 'SIOPBO', 'SIOPWREQ', 'SIOPWRGD', 'SIOS3', 'SIOS5', 'SIOSCI', 'SPI1', 'SPI1CS1', 'SPI1DEBUG', 'SPI1PASSTHRU', 'SPI2CK', 'SPI2CS0', 'SPI2CS1', 'SPI2MISO', 'SPI2MOSI', 'TIMER3', 'TIMER4', 'TIMER5', 'TIMER6', 'TIMER7', 'TIMER8', 'TXD1', 'TXD2', 'TXD3', 'TXD4', 'UART6', 'USB11BHID', 'USB2AD', 'USB2AH', 'USB2BD', 'USB2BH', 'USBCKI', 'VGABIOSROM', 'VGAHS', 'VGAVS', 'VPI24', 'VPO', 'WDTRST1', 'WDTRST2'] Signed-off-by: Andrew Jeffery Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240531-dt-warnings-gpio-ast2600-pinctrl-funcs-groups-v1-2-a6fe2281a1b8@codeconstruct.com.au Signed-off-by: Linus Walleij commit ed4db42976f450fa6c0fa4497cd30d490e5f4acc Author: Andrew Jeffery Date: Fri May 31 12:32:47 2024 +0930 dt-bindings: pinctrl: aspeed: Use block syntax for function and groups The expansion makes the documents a lot longer, but it's easier to review changes to functions and groups when we're not having to deal with line wrapping. Signed-off-by: Andrew Jeffery Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240531-dt-warnings-gpio-ast2600-pinctrl-funcs-groups-v1-1-a6fe2281a1b8@codeconstruct.com.au Signed-off-by: Linus Walleij commit 2659f36a56ae7dc481968ac14f717c2172535893 Merge: c47d25411709d 9bd95ac86e700 Author: Linus Walleij Date: Mon Jun 17 09:27:36 2024 +0200 Merge tag 'renesas-pinctrl-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.11 - Add support for the new RZ/V2H(P) (R9A09G057) Soc, - Miscellaneous fixes and improvements. Signed-off-by: Linus Walleij commit c47d25411709dbfcd4e72e1f7411a0116220af2e Author: Nathan Chancellor Date: Tue Jun 11 11:13:32 2024 -0700 pinctrl: keembay: Fix func conversion in keembay_build_functions() A recent refactoring to use the func member in struct function_desc missed converting one uses of name in keembay_build_functions(), resulting in a build failure: drivers/pinctrl/pinctrl-keembay.c: In function 'keembay_build_functions': drivers/pinctrl/pinctrl-keembay.c:1630:35: error: 'struct function_desc' has no member named 'name' 1630 | if (!fdesc->name) { | ^~ Perform the same conversion to resolve the build error. Fixes: 73ee52205e5a ("pinctrl: keembay: Convert to use func member") Signed-off-by: Nathan Chancellor Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240611-pinctrl-keembay-fix-func-conversion-v1-1-3197f2ded3f7@kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406131133.WwdetfBL-lkp@intel.com/ Signed-off-by: Linus Walleij commit b755521fd6eb22aca5ad1d2f037aacd90f429c1c Author: Peng Fan Date: Tue May 21 14:25:59 2024 +0800 pinctrl: imx: support SCMI pinctrl protocol for i.MX95 The generic pinctrl-scmi.c driver could not be used for i.MX95 because i.MX95 SCMI firmware not supports functions, groups or generic 'Pin Configuration Type and Enumerations' listed in SCMI Specification. i.MX95 System Control Management Interface(SCMI) firmware only supports below pin configuration types which are OEM specific types: 192: PIN MUX 193: PIN CONF 194: DAISY ID 195: DAISY VAL To Support fsl,pins property together with SCMI OEM protocol, add this driver. Signed-off-by: Peng Fan Reviewed-by: Cristian Marussi Acked-by: Sudeep Holla Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20240521-pinctrl-scmi-imx95-v1-3-9a1175d735fd@nxp.com Signed-off-by: Linus Walleij commit dbd47012a45f688010181c19d5c085195470bbb8 Author: Peng Fan Date: Tue May 21 14:25:58 2024 +0800 pinctrl: scmi: add blocklist i.MX95 will have its own pinctrl scmi driver, so need block pinctrl-scmi driver for i.MX95, otherwise there will be two pinctrl devices for a single scmi protocol@19. Signed-off-by: Peng Fan Acked-by: Sudeep Holla Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20240521-pinctrl-scmi-imx95-v1-2-9a1175d735fd@nxp.com Signed-off-by: Linus Walleij commit 997f2cdea334fc78231a40fe36632cddb92d48e7 Author: Peng Fan Date: Tue May 21 14:25:57 2024 +0800 dt-bindings: firmware: arm,scmi: Add properties for i.MX95 Pinctrl OEM extensions i.MX95 Pinctrl is managed by System Control Management Interface(SCMI) firmware using OEM extensions. No functions, no groups are provided by the firmware. So add i.MX95 specific properties. To keep aligned with current i.MX pinctrl bindings, still use "fsl,pins" for i.MX95. Signed-off-by: Peng Fan Reviewed-by: Rob Herring (Arm) Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20240521-pinctrl-scmi-imx95-v1-1-9a1175d735fd@nxp.com Signed-off-by: Linus Walleij commit d85e2ccdf1b3c0bcaf93f7195ed2adc9a83d94a5 Author: Richard Acayan Date: Thu May 23 19:06:20 2024 -0400 pinctrl: qcom: sdm670: add pdc wakeirq map The PDC was hooked up as a wakeup parent in the DTS in commit 71f080633d1e ("arm64: dts: qcom: sdm670: Hook up PDC as wakeup-parent of TLMM"), but the wakeirq mapping was not defined so it had no effect. Add the mapping for wakeup interrupts on the PDC to their corresponding pins. Configuring a pin IRQ as dual-edge would break it unless the wakeirq_dual_edge_errata flag is set. Signed-off-by: Richard Acayan Link: https://lore.kernel.org/r/20240523230619.256882-2-mailingradian@gmail.com Signed-off-by: Linus Walleij commit 7f53a8eeb54853651e1aaf252f018b2bd1f2c196 Author: Patrick Rudolph Date: Tue May 21 17:25:59 2024 +0200 pinctrl: cy8c95x0: Use REGCACHE_MAPLE Use REGCACHE_MAPLE instead of REGCACHE_FLAT. Signed-off-by: Patrick Rudolph Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240521152602.1097764-3-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit 8670de9fae49a61f44dbddc4606b905264257a62 Author: Patrick Rudolph Date: Tue May 21 17:25:58 2024 +0200 pinctrl: cy8c95x0: Use regmap ranges Instead of implementing a custom register paging mechanism in the driver use the existing regmap ranges feature. Signed-off-by: Patrick Rudolph Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240521152602.1097764-2-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit f71aba339a66be54253006935648f56c7cbc1ed9 Author: Patrick Rudolph Date: Tue May 21 17:25:57 2024 +0200 pinctrl: cy8c95x0: Use single I2C lock Currently there are 3 locks being used when accessing the chip, one in the driver and one in each regmap. Reduce that to one driver only lock that protects all regmap and regcache accesses. Signed-off-by: Patrick Rudolph Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240521152602.1097764-1-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit c501b780c17fd10b172ba61fdebc20ddb8f27149 Author: Andy Shevchenko Date: Thu May 30 11:55:20 2024 +0300 pinctrl: pinmux: Remove unused members from struct function_desc All drivers are converted to use embedded struct pinfunction. Remove unused members from struct function_desc. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-12-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit 6273a1b1cee1c62440c2193b1a0737c15a977726 Author: Andy Shevchenko Date: Thu May 30 11:55:19 2024 +0300 pinctrl: mediatek: moore: Convert to use func member Convert drivers to use func member embedded in struct function_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin function description. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-11-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit ab8866c5d3ddf2013a6841910e0368ec840cc155 Author: Andy Shevchenko Date: Thu May 30 11:55:18 2024 +0300 pinctrl: keembay: Convert to use func member Convert drivers to use func member embedded in struct function_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin function description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-10-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit be9e92afd3994dc2c820f3c93144822f7aa81ec1 Author: Andy Shevchenko Date: Thu May 30 11:55:17 2024 +0300 pinctrl: ingenic: Convert to use func member Convert drivers to use func member embedded in struct function_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin function description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-9-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit f3e0473aa834f0bc6e3dea384e3d284aec40df6e Author: Andy Shevchenko Date: Thu May 30 11:55:16 2024 +0300 pinctrl: imx: Convert to use func member Convert drivers to use func member embedded in struct function_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin function description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-8-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit 37997d7b55aa7a534e4fffdbe9a0388de4857b7e Author: Andy Shevchenko Date: Thu May 30 11:55:15 2024 +0300 pinctrl: pinmux: Embed struct pinfunction into struct function_desc struct function_desc is a particular version of the struct pinfunction with associated opaque data. Start switching pin control core and drivers to use it explicitly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-7-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit f26945d76a90f93a40e27238210bf0580cf8476f Author: Andy Shevchenko Date: Thu May 30 11:55:14 2024 +0300 pinctrl: pinmux: Add a convenient define PINCTRL_FUNCTION_DESC() Add PINCTRL_FUNCTION_DESC() macro for inline use. While at it, fix adjective form in the comment of PINCTRL_GROUP_DESC(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-6-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit dc02d925dc1638ba6c3b8082858cb20970fa674f Author: Andy Shevchenko Date: Thu May 30 11:55:13 2024 +0300 pinctrl: mediatek: moore: Provide a helper macro PINCTRL_PIN_FUNCTION() Provide a helper macro to assign the struct function_desc entries. This helps further refactoring. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-5-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit 7f2a2af08808783d0a6ca8993af795c435a62e05 Author: Andy Shevchenko Date: Thu May 30 11:55:12 2024 +0300 pinctrl: ingenic: Provide a helper macro INGENIC_PIN_FUNCTION() Provide a helper macro to assign the struct function_desc entries. This helps further refactoring. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-4-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit 18f5c202de46c754a9f65b566de3a2053ebf1fec Author: Andy Shevchenko Date: Thu May 30 11:55:11 2024 +0300 pinctrl: equilibrium: Make use of struct pinfunction Since pin control provides a generic data type for the pin function, use it in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-3-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit 5d421ff557fae63fe2add87ab67b3d7b0ef6559a Author: Andy Shevchenko Date: Thu May 30 11:55:10 2024 +0300 pinctrl: berlin: Make use of struct pinfunction Since pin control provides a generic data type for the pin function, use it in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530085745.1539925-2-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit a8f2548548584549ea29d43431781d67c4afa42b Author: Dmitry Yashin Date: Wed May 15 17:16:32 2024 +0500 pinctrl: rockchip: update rk3308 iomux routes Some of the rk3308 iomux routes in rk3308_mux_route_data belong to the rk3308b SoC. Remove them and correct i2c3 routes. Fixes: 7825aeb7b208 ("pinctrl: rockchip: add rk3308 SoC support") Signed-off-by: Dmitry Yashin Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240515121634.23945-2-dmt.yashin@gmail.com Signed-off-by: Linus Walleij commit 50287367812602598a39f93620ec7cf009443258 Author: Swati Agarwal Date: Mon May 27 12:57:15 2024 +0200 pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor Use pin numbers stored in the pin descriptors instead of index value while creating the pin groups. Pin Id's are not same as Index values for Xilinx Versal platform, so use the pin values from descriptor which works for both ZynqMP and Versal platforms. Signed-off-by: Swati Agarwal Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/2413a1f99278d70313960f13daecda9ef54172d8.1716807432.git.michal.simek@amd.com Signed-off-by: Linus Walleij commit 0a2bcac1a22d9b78852a6039775455a798a095a0 Author: Weihao Li Date: Mon May 27 10:20:36 2024 +0800 pinctrl: ralink: mt76x8: fix pinmux function The current version of the pinctrl driver has some issues: 1. Duplicated "gpio" pmx function The common code will add a "gpio" pmx functon to every pin group, so it's not necessary to define a separate "gpio" pmx function in pin groups. 2. Duplicated pmx function name There are some same function name in different pin groups, which will cause some problems. For example, when we want to use PAD_GPIO0 as refclk output function, the common clk framework code will search the entire pin function lists, then return the first one matched, in this case the matched function list only include the PAD_CO_CLKO pin group because there are three "refclk" pin function, which is added by refclk_grp, spi_cs1_grp and gpio_grp. To solve this problem, a simple way is just add a pingrp refix to function name like mt7620 pinctrl driver does. 3. Useless "-" or "rsvd" functon It's really unnecessary to add a reserved pin mux function to the function lists, because we never use it. Signed-off-by: Weihao Li Link: https://lore.kernel.org/r/20240527022036.31985-1-user@blabla Signed-off-by: Linus Walleij commit 72636eb9c1ea97d86b35abc79d9ffc58286d7db7 Author: Nirmala Devi Mal Nadar Date: Fri May 17 05:22:11 2024 +0000 pinctrl: pinctrl-tps6594: make tps65224_muxval_remap and tps6594_muxval_remap as static to fix sparse warning pinctrl: tps6594: Fix sparse warning. warning: symbol 'tps65224_muxval_remap' was not declared. Should it be static? warning: symbol 'tps6594_muxval_remap' was not declared. Should it be static? Signed-off-by: Nirmala Devi Mal Nadar Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405111523.9yt759uX-lkp@intel.com/ Link: https://lore.kernel.org/r/0109018f85002ae1-6fb831b2-74c2-4559-98f1-a3ef25e72558-000000@ap-south-1.amazonses.com Signed-off-by: Linus Walleij commit db43edf669eafcf5663b3dccea8bd3832abaa1dd Author: Konrad Dybcio Date: Sat May 25 01:37:29 2024 +0200 pinctrl: qcom: spmi: Add PMC8380 PMC8380 is a new chip, featuring 10 GPIOs. Describe it. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240525-topic-pmc8380_gpio-v2-2-2de50cb28ac1@linaro.org Signed-off-by: Linus Walleij commit 55f5d36e849c75495b773e7e377fa02f70d0e524 Author: Konrad Dybcio Date: Sat May 25 01:37:28 2024 +0200 dt-bindings: pinctrl: qcom,pmic-gpio: Document PMC8380 PMC8380 is a new PMIC used with X1 SoCs. Document it Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240525-topic-pmc8380_gpio-v2-1-2de50cb28ac1@linaro.org Signed-off-by: Linus Walleij commit 9dfbcf2fc566c0be2de1c7685f29effd25696b75 Author: Léo DUBOIN Date: Thu Apr 25 15:58:02 2024 +0200 pinctrl: core: reset gpio_device in loop in pinctrl_pins_show() We were not resetting the pointer to the associated gpio_device once we are done displaying a pin's information. This meant that once we reached the end of a gpio-range, if there were pins right after it that did not belong to any known range, they would be associated with the previous range's gpio device. This resulted in those pins appearing as <4294966783:old_gdev> instead of the expected <0:?> (due to gpio_num being -1). Signed-off-by: Léo DUBOIN Link: https://lore.kernel.org/r/c40d0634abefa19e689ffd450e0f48a8d63c4fc4.1714049455.git.lduboin@freebox.fr Signed-off-by: Linus Walleij commit db5032981ab37eb181810eea6037008c42d21ab3 Author: Léo DUBOIN Date: Thu Apr 25 15:58:01 2024 +0200 pinctrl: core: take into account the pins array in pinctrl_pins_show() We previously only looked at the 'pin_base' of the pinctrl_gpio_ranges struct for determining if a pin matched a GPIO number. This value is present only if the 'pins' array is not NULL, and is 0 otherwise. This means that GPIO ranges declared using gpiochip_add_pingroup_range(), thus making use of pins, were always matched by the pins in the range [0-npins] even if they contained pins in a completely separate range. Signed-off-by: Léo DUBOIN Link: https://lore.kernel.org/r/6df39bd47942156be5713f8f4e317d2ad3e0ddeb.1714049455.git.lduboin@freebox.fr Signed-off-by: Linus Walleij commit f805e356313bbcafef48808c14eb9ce7f4ff2560 Author: Jacky Huang Date: Tue May 21 01:24:47 2024 +0000 pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver Add common pinctrl and GPIO driver for Nuvoton MA35 series SoC, and add support for ma35d1 pinctrl. Signed-off-by: Jacky Huang Link: https://lore.kernel.org/r/20240521012447.42211-4-ychuang570808@gmail.com Signed-off-by: Linus Walleij commit 63f1f9da457aefb0e4dce93fd27a404990734054 Author: Jacky Huang Date: Tue May 21 01:24:46 2024 +0000 dt-bindings: pinctrl: Document nuvoton ma35d1 pin control Add documentation to describe nuvoton ma35d1 pin control and GPIO. Signed-off-by: Jacky Huang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240521012447.42211-3-ychuang570808@gmail.com Signed-off-by: Linus Walleij commit c64c4b6882627f3bc212cd104337f06424dc5350 Author: Jacky Huang Date: Tue May 21 01:24:45 2024 +0000 dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node Add a compatible 'syscon' to the system management node since the system control registers are mapped by this driver. The other driver must access the system control registers through 'regmap' using a phandle that references this node. Signed-off-by: Jacky Huang Acked-by: Krzysztof Kozlowski Acked-by: Philipp Zabel Link: https://lore.kernel.org/r/20240521012447.42211-2-ychuang570808@gmail.com Signed-off-by: Linus Walleij commit b7141b18bfea53e95d6ef257db18f6871e949d99 Author: Peng Fan Date: Sat May 4 21:20:06 2024 +0800 pinctrl: st: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20240504-pinctrl-cleanup-v2-8-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 2dbcd12d9efb9b34b00160277b8383c99f77f4fd Author: Peng Fan Date: Sat May 4 21:20:01 2024 +0800 pinctrl: stm32: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20240504-pinctrl-cleanup-v2-3-26c5f2dc1181@nxp.com Signed-off-by: Linus Walleij commit 993e2fc48fa54a4ef0fefc888d13652797646074 Author: Peng Fan Date: Mon May 13 17:20:47 2024 +0800 pinctrl: imx: Add pinctrl driver support for i.MX91 Add NXP i.MX91 pinctrl driver Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20240513-imx91-pinctrl-v1-2-c99a23c6843a@nxp.com Signed-off-by: Linus Walleij commit 1435dc1f39aa8fe0a1f2091bbb95d6c247bd1e72 Author: Peng Fan Date: Mon May 13 17:20:46 2024 +0800 dt-bindings: pinctrl: imx: Support i.MX91 IOMUXC i.MX91 and i.MX93 share similar design. They could share same dt-binding doc, so rename fsl,imx93-pinctrl.yaml to fsl,imx9-pinctrl.yaml and add i.MX91 compatible string Signed-off-by: Peng Fan Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240513-imx91-pinctrl-v1-1-c99a23c6843a@nxp.com Signed-off-by: Linus Walleij commit f9508ef9976e8596f8a1139430ec439691f3337f Author: Vishal Patel Date: Mon May 27 11:34:18 2024 +0200 arm64: zynqmp: Add pwm-fan node and fix ttc0 pwm-cells property Add pwm-fan node to control fan through hwmon and change pwm-cells property to 3 to allow fancontrol utility to function correctly. Signed-off-by: Vishal Patel Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/ff6b4dbfc9bb1b53769ffbf7d0e932c7a8be7c08.1716802450.git.michal.simek@amd.com commit 89562ff4f0b8eac2915e8388ebdd76a4c2006eb8 Author: Michal Simek Date: Mon May 27 11:34:17 2024 +0200 arm64: zynqmp: Add support for K26 rev2 boards Revision 2 is SW compatible with revision 1 but it is necessary to reflect it in model and compatible properties which are parsed by user space. Rev 2 has improved a power on boot reset and MIO34 shutdown glich improvement done via an additional filter in the GreenPak chip. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/458698666fdfcaaac70967d9f755422a480bed99.1716802450.git.michal.simek@amd.com commit 0d7835cf2d1ffceaa969e2106aa8d6a00ca343c0 Author: Vishal Sagar Date: Mon May 27 11:34:16 2024 +0200 arm64: zynqmp: Describe DisplayPort connector for Kria Add a device tree node to describe the DisplayPort connector, and connect it to the DPSUB output. The patch was tested on kv260-revB/rev2. Signed-off-by: Vishal Sagar Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/4f69489c005719d280b8df97f3e82a5ce0cd9660.1716802450.git.michal.simek@amd.com commit 385cc4f769b44ab8ecf8502429d8f710e0f234c9 Author: Michal Simek Date: Mon May 27 11:34:15 2024 +0200 arm64: zynqmp: Add description for ina260 on kv260 The commit f7ab2d180e6a ("dt-bindings: hwmon: ina2xx: Describe ina260 chip"), commit f29996d0295e ("dt-bindings: hwmon: ina2xx: Describe #io-channel-cells property") and commit eea32fafadd3 ("dt-bindings: hwmon: ina2xx: Add label property") added description for ina260 that's why describe them on kv260 Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/944cba76ef5df932f1bebde6c5e64ec9d201356d.1716802450.git.michal.simek@amd.com commit 894221b5a52a046f1d9469ec7145e5fc46fb0e63 Author: Michal Simek Date: Mon May 27 11:34:14 2024 +0200 arm64: zynqmp: Add compatible string for kv260 The commit dbcd27526e6a ("dt-bindings: soc: xilinx: Add support for KV260 CC") added description for kv260 kit and it should be also reflected in DTs. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/1e436f82182a92187f3892401664db2507482870.1716802450.git.michal.simek@amd.com commit a082e297fa18d96a41ccc308eb31675ffd3a47f8 Author: Tejas Bhumkar Date: Mon May 27 11:34:13 2024 +0200 arm64: zynqmp: Disable Tri-state for SDIO Since the zynqmp pinctrl driver now includes support for the tri-state registers, ensure that the pins needing output-enable are correctly configured for SOMs. Currently, there is an issue with the detection of the MMC for the SOM kv260, resulting in the following error: ZynqMP> mmc dev 1 Card did not respond to voltage select! : -110 To address this problem, configure the SDIO pins for output-enable to enable MMC detection. Signed-off-by: Tejas Bhumkar Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/540f83f7d88b80441c9fa3d771dd7b000b0710a4.1716802450.git.michal.simek@amd.com commit a520fcceb9609823bf50818fd838cf22ee97341c Author: Michal Simek Date: Mon May 27 11:34:12 2024 +0200 arm64: zynqmp: Remove address/size-cells from ams node Remove unused address/size-cells properties without defining child. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/39f73999bbec0233264ce40f05c0885c46e423be.1716802450.git.michal.simek@amd.com commit 7ab06833e0787905a239e311cd27f92c40902636 Author: Michal Simek Date: Mon May 27 11:34:11 2024 +0200 arm64: zynqmp: Describe OCM controller Describe OCM controller which brings EDAC functionality. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/679736679fdf7897d68684295f6ed8256fb5f18e.1716802450.git.michal.simek@amd.com commit f88eac0b68310f82c8d7dc6ab3903887fe9d3c28 Author: Michal Simek Date: Mon May 27 11:34:10 2024 +0200 arm64: zynqmp: Describe USB wakeup interrupt Describe usb wakeup interrupt. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/8c11ac7d73c822ee207cecd1445205f19fcaf004.1716802450.git.michal.simek@amd.com commit 0596963139717297fd2ae126d9727bd56cc51f15 Author: Michal Simek Date: Mon May 27 11:34:09 2024 +0200 arm64: zynqmp: Add missing description for efuses The commit 737c0c8d07b5 ("nvmem: zynqmp_nvmem: Add support to access efuse") added support for efuses that's why also describe them in DT. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/beb8002f8dae47ce6f38f7f961d024e65372b654.1716802450.git.michal.simek@amd.com commit 4e07d2281e2e847a36fa1c44b12681ae7bddf4e4 Author: Michal Simek Date: Mon May 27 11:34:08 2024 +0200 arm64: zynqmp: Use fpga-region as node name Based on commit 85f838adad54 ("dt-bindings: fpga: Convert fpga-region binding to yaml") fpga/programmable logic should use fpga-region as node name that's why move to it. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/9133aed74a24ad5cd9af5a6d5aa7ee9a160f94ee.1716802450.git.michal.simek@amd.com commit b2774d0292e875861c70ea75dc3baf88d4cec1ad Author: Michal Simek Date: Mon May 27 11:34:07 2024 +0200 arm64: zynqmp: Align nvmem node with dt schema Use new soc-nvmem node name and swich to nvmem fixed layout. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/7796804c7c7dd8bb2c93bdfe028c22746a24fe54.1716802450.git.michal.simek@amd.com commit b5dd424181f33c2978562c64b286fc22cf5ef4bf Merge: c6c631d2b72b9 6ba59ff422792 Author: Greg Kroah-Hartman Date: Mon Jun 17 08:33:41 2024 +0200 Merge tag 'v6.10-rc4' into driver-core-next We need the driver core and sysfs fixes in here to build on top of. Signed-off-by: Greg Kroah-Hartman commit 20460472952043a4735e9abc1fd9de8e024d1c9e Merge: 2db573c5dc1f8 6ba59ff422792 Author: Greg Kroah-Hartman Date: Mon Jun 17 08:31:12 2024 +0200 Merge tag 'v6.10-rc4' into char-misc-next We need the char-misc and iio fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman commit 815cc7715ab183701de42b570a28b4e3d877ef6c Author: Michael Walle Date: Tue Jun 4 16:22:49 2024 +0200 dt-bindings: memory: fsl: replace maintainer Li Yang's mail address is bouncing, replace it with Shawn Guo's one. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20240604142249.1957762-2-mwalle@kernel.org Signed-off-by: Krzysztof Kozlowski commit 9270c5f84bf250c874654763030b1699d6b8ad28 Author: Peng Fan Date: Mon Jun 17 11:11:44 2024 +0800 dt-bindings: arm: fsl: add i.MX93 9x9 QSB board Add compatible string for i.MX93 9x9 Quick Start Board. Acked-by: Conor Dooley Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit ba4478013c19b8a894f83c1e73194b47c76eb56c Author: Peng Fan Date: Mon Jun 17 10:56:35 2024 +0800 dt-bindings: arm: fsl: add i.MX95 19x19 EVK board Add DT compatible string for NXP i.MX95 19x19 EVK board. Acked-by: Conor Dooley Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 67b82a35425388f1a5785eb13f9645894f64a43c Author: Fabio Estevam Date: Sun Jun 16 14:21:48 2024 -0300 dt-bindings: arm: fsl: Document Compulab IOT-GATE-iMX8 Document Compulab's IOT-GATE-iMX8 board, which is based on Compulab's UCM-iMX8M-Mini SoM. Board URL: https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/ SoM URL: https://www.compulab.com/products/computer-on-modules/ucm-imx8m-mini-nxp-i-mx-8m-mini-som-system-on-module-computer/ Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0565d20cd8c22e44ca42937be08bfc0349e31521 Author: Peng Fan Date: Mon Jun 17 11:11:45 2024 +0800 arm64: dts: freescale: Support i.MX93 9x9 Quick Start Board Add the board device tree with sdhc1/2, cm33, mu, lpuart1, lpi2c1/2, usb enabled and etc, which to support the i.MX 93 quick start evaluation kit that provides a low-cost platform to evaluate the i.MX 93 applications processors in a 9x9mm package. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit b8f771037e9e34f46bd6ef6a0ae568d2a782e6e1 Author: Peng Fan Date: Mon Jun 17 10:56:37 2024 +0800 arm64: dts: freescale: add i.MX95 19x19 EVK minimal board dts Add a minimal dts for i.MX95 19x19 EVK board: - lpuart1 as console - sdhc1/2 as storage Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 5e3cbb8e4256e3923abc8eb65205ff5dde0ac0d7 Author: Peng Fan Date: Mon Jun 17 10:56:36 2024 +0800 arm64: dts: freescale: add i.MX95 basic dtsi i.MX95 features 6 A55 Cores, ARM Mali GPU, ISP, ML acceleration NPU, and Edgelock secure enclave security. This patch is to add a minimal dtsi, with cpu cores, scmi, gic, uart, mu, sdhc, lpi2c added. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 469349d4c07fe7ca767fd9c09fec9d4dc999119f Author: Fabio Estevam Date: Sun Jun 16 14:21:49 2024 -0300 arm64: dts: imx8mm-iot-gateway: Add initial support Add the initial support for the CompuLab i.MX8MM IoT Gateway board, which is based on the Compulab's UCM-iMX8M-Mini SoM. Board URL: https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/ SoM URL: https://www.compulab.com/products/computer-on-modules/ucm-imx8m-mini-nxp-i-mx-8m-mini-som-system-on-module-computer/ Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 94298477f81a1701fc4e1b5a0ce9672acab5dcb2 Author: Ping-Ke Shih Date: Tue Jun 11 10:19:01 2024 +0800 wifi: rtw89: pci: fix RX tag race condition resulting in wrong RX length Read 32 bits RX info to a local variable to fix race condition between reading RX length and RX tag. Another solution is to get RX tag at first statement, but adopted solution can save some memory read, and also save 15 bytes binary code. RX tag, a sequence number, is used to ensure that RX data has been DMA to memory completely, so driver must check sequence number is expected before reading other data. This potential problem happens only after enabling 36-bit DMA. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240611021901.26394-2-pkshih@realtek.com commit 5bf0e05cd1d717a3dd8395b0cc80f11cd9f483d0 Author: Frank Li Date: Thu Jun 13 18:24:12 2024 -0400 arm64: dts: layerscape: change thermal node name Add thermal subfix for thermal node name to fix DTB_CHECK warning: thermal-zones: '...' do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$' Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 1fd4b3fe52efd5ad1647966f619c10988e7a4457 Author: Ping-Ke Shih Date: Tue Jun 11 10:19:00 2024 +0800 wifi: rtw89: pci: support 36-bit PCI DMA address Modern platforms can install more than 4GB memory, so DMA address can larger than 32 bits. If a platform doesn't enable IOMMU, kernel needs extra works of swiotlb to help DMA that packets reside on memory over 4GB. The DMA addressing capability of Realtek WiFi chips is 36 bits, so set LSB 4 bits of high 32-bit address to register and TX/RX descriptor, which below figure shows 3-level pointers in TX direction, and RX direction is similar but 2-level pointers only. +--------+ | | register to head of TX BD +---|----+ | +---------+ +-----> | TX BD | (in memory) +----|----+ | +---------+ +------> | TX WD | (in memory) +----|----+ | +--------+ +------> | skb | +--------+ Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240611021901.26394-1-pkshih@realtek.com commit caed3b59419989b624566cdfcc2049bb1d435b70 Author: Frank Li Date: Thu Jun 13 10:32:07 2024 -0400 arm64: dts: layerscape: Change node name from 'esdhc' to 'mmc' Use common node name 'mmc' to fix DTB_CHECK warning. Add compatible string 'fsl,ls2080a-esdhc' for fsl-lx2160a. arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$' arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$' arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dtb: esdhc@1560000: $nodename:0: 'esdhc@1560000' does not match '^mmc(@.*)?$' arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$' arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$' arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: esdhc@2140000: compatible:0: 'fsl,esdhc' is not one of ['fsl,mpc8536-esdhc', 'fsl,mpc8378-esdhc', 'fsl,p2020-esdhc', 'fsl,p4080-esdhc', 'fsl,t1040-esdhc', 'fsl,t4240-esdhc', 'fsl,ls1012a-esdhc', 'fsl,ls1028a-esdhc', 'fsl,ls1088a-esdhc', 'fsl,ls1043a-esdhc', 'fsl,ls1046a-esdhc', 'fsl,ls2080a-esdhc'] from schema $id: http://devicetree.org/schemas/mmc/fsl,esdhc.yaml# arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dtb: esdhc@2140000: $nodename:0: 'esdhc@2140000' does not match '^mmc(@.*)?$' Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 8a00f7dfed62f1f74388bbd659e8d69d66886786 Author: Ping-Ke Shih Date: Fri Jun 7 22:02:51 2024 +0800 wifi: rtw89: adopt firmware whose version is equal or less but closest Version C of 8922AE hardware will use the same firmware of version B, so extend rule of firmware recognition to allow less but closest firmware version. Originally only accept firmware with matched version. Tested on version A/B/C of 8922AE. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240607140251.8295-1-pkshih@realtek.com commit be3216d626774412d15fed1ab0d3ef916c0e5acb Author: Luca Ceresoli Date: Wed Jun 12 12:17:27 2024 +0200 arm64: dts: imx8mp-msc-sm2s: Add HDMI output Enable the HDMI output of the MSC SM2-MB-EP1 carrier board based the SM2S-IMX8PLUS SMARC module. Signed-off-by: Luca Ceresoli Signed-off-by: Shawn Guo commit 190dc12d0649b7d8709c98c10926ea0c001f955b Author: Ping-Ke Shih Date: Fri Jun 7 15:06:59 2024 +0800 wifi: rtw89: 885xbx: apply common settings to 8851B, 8852B and 8852BT Many common settings can share to 8851B, 8852B and 8852BT, so add an inline function rtw89_is_rtl885xb() to be concise. Meanwhile review and align settings for existing chips. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240607070659.80263-4-pkshih@realtek.com commit 2ab298cf638c105e248156d7a7b2301f071f6543 Author: Ping-Ke Shih Date: Fri Jun 7 15:06:58 2024 +0800 wifi: rtw89: 8852bx: add extra handles for 8852BT in 8852b_common The channel configuration of 8852BT is very similar but a little different to 8852B, so use chip ID as condition to add extra handles including external loss compensation, ADC configurations, spur settings and so on. Don't affect existing 8852BE. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240607070659.80263-3-pkshih@realtek.com commit 62814204c6aebe0b5a71f3ee7360e08a8b60e275 Author: Francesco Dolcini Date: Mon Jun 10 16:10:01 2024 +0200 arm64: dts: freescale: imx8mp-verdin: add HDMI support Enable HDMI output on Verdin iMX8MP on all the supported carrier boards (dev, dahlia, mallow and yavia). HDMI DDC I2C is used in regular I2C mode, see link on the related dt-bindings patch. Fix CEC and HPD pinctrl, having a pull-down on HPD and a pull-up on CEC. Link: https://lore.kernel.org/all/20240515062753.111746-1-marex@denx.de/ Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 5a72e198a6e965eb5c658e63711c889430075839 Author: Ping-Ke Shih Date: Fri Jun 7 15:06:57 2024 +0800 wifi: rtw89: 8852bx: move common code from 8852b to 8852b_common New upcoming chip is RTL8852BE-VT (or RTL8852BTE; 8852BT PCIE interface), which is a variant of 8852B, and many codes excepting to RF calibration can be shared, so move common code to an new kernel module named rtw89_8852b_common.ko. No logic change. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240607070659.80263-2-pkshih@realtek.com commit 4880ee1c9046c88c7cadea5d8bc20bc51d79662b Author: Christopher Obbard Date: Tue Jun 11 00:42:38 2024 +0100 arm64: dts: imx8mp-debix-model-a: Enable HDMI output Enable the HDMI output on the Debix Model A SBC, using the HDMI encoder present in the i.MX8MP SoC. This has been tested with a generic 1080p HDMI display, along with a smaller 1280x800 HDMI display. Signed-off-by: Christopher Obbard Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Shawn Guo commit 3d530eeaf8e79770048e35b1b93f8ffb36a8a133 Author: Wolfram Sang Date: Mon Jun 3 11:15:38 2024 +0200 wifi: rtw89: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240603091541.8367-6-wsa+renesas@sang-engineering.com commit 1d8a9f043a770d0b278581ae87fb7c98471f4996 Author: Krzysztof Kozlowski Date: Wed Jun 5 17:30:20 2024 +0200 arm64: dts: imx8: use defines for interrupts Replace hard-coded interrupt flags with standard defines for readability. No changes in resulting DTBs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 645e59e613974eb2b415b92c172ab2b8f6c3d5bf Author: Krzysztof Kozlowski Date: Wed Jun 5 17:30:19 2024 +0200 arm64: dts: ls208xa: use defines for timer interrupts Replace hard-coded interrupt parts (GIC, flags) with standard defines for readability. No changes in resulting DTBs. The comment was saying interrupt was active low, but the actual used value was active high, so assume that the code, not the comment, is correct. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 0943d92ca4a376bdd42cbf883c47a1405010d777 Author: Krzysztof Kozlowski Date: Wed Jun 5 17:30:18 2024 +0200 arm64: dts: freescale: use defines for interrupts Replace hard-coded interrupt parts (GIC, flags) with standard defines for readability. No changes in resulting DTBs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 3a5297c5071055c31f268c123289488a6ec47a3e Author: Andreas Kemnade Date: Wed Jun 5 10:39:50 2024 +0200 ARM: dts: e60k02: fix aliases for mmc Since commit fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") mmc numbering are changed, confusing boot scripts. Fix that by adding proper aliases Signed-off-by: Andreas Kemnade Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 86419686e66da5b90a07fb8a40ab138fe97189b5 Author: Daniel Schaefer Date: Sun Jun 2 14:50:53 2024 +0800 media: uvcvideo: Override default flags When the UVC device has a control that is readonly it doesn't set the SET_CUR flag. For example the privacy control has SET_CUR flag set in the defaults in the `uvc_ctrls` variable. Even if the device does not have it set, it's not cleared by uvc_ctrl_get_flags(). Originally written with assignment in commit 859086ae3636 ("media: uvcvideo: Apply flags from device to actual properties"). But changed to |= in commit 0dc68cabdb62 ("media: uvcvideo: Prevent setting unavailable flags"). It would not clear the default flags. With this patch applied the correct flags are reported to user space. Tested with: ``` > v4l2-ctl --list-ctrls | grep privacy privacy 0x009a0910 (bool) : default=0 value=0 flags=read-only ``` Signed-off-by: Daniel Schaefer Fixes: 0dc68cabdb62 ("media: uvcvideo: Prevent setting unavailable flags") Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240602065053.36850-1-dhs@frame.work Signed-off-by: Laurent Pinchart commit c8931ef55bd325052ec496f242aea7f6de47dc9c Author: Ricardo Ribalda Date: Thu Apr 4 17:56:18 2024 +0000 media: uvcvideo: Enforce alignment of frame and interval Struct uvc_frame and interval (u32*) are packaged together on streaming->formats on a single contiguous allocation. Right now they are allocated right after uvc_format, without taking into consideration their required alignment. This is working fine because both structures have a field with a pointer, but it will stop working when the sizeof() of any of those structs is not a multiple of the sizeof(void*). Enforce that alignment during the allocation. Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240404-uvc-align-v2-1-9e104b0ecfbd@chromium.org Signed-off-by: Laurent Pinchart commit 85fbe91a7c9210bb30638846b551fa5d3cb7bc4c Author: Oleksandr Natalenko Date: Mon Mar 25 15:26:11 2024 +0100 media: uvcvideo: Add quirk for invalid dev_sof in Logitech C920 Similarly to Logitech C922, C920 seems to also suffer from a firmware bug that breaks hardware timestamping. Add a quirk for this camera model too. Before applying the quirk: ``` 100 (4) [-] none 100 200717 B 212.919114 213.079004 33.727 fps ts mono/SoE 101 (5) [-] none 101 200889 B 213.003703 213.114996 11.822 fps ts mono/SoE 102 (6) [-] none 102 200926 B 213.035571 213.146999 31.379 fps ts mono/SoE 103 (7) [-] none 103 200839 B 213.067424 213.179003 31.394 fps ts mono/SoE 104 (0) [-] none 104 200692 B 213.293180 213.214991 4.430 fps ts mono/SoE 105 (1) [-] none 105 200937 B 213.322374 213.247001 34.254 fps ts mono/SoE 106 (2) [-] none 106 201013 B 213.352228 213.279005 33.496 fps ts mono/SoE … ``` After applying the quirk: ``` 154 (2) [-] none 154 192417 B 42.199823 42.207788 27.779 fps ts mono/SoE 155 (3) [-] none 155 192040 B 42.231834 42.239791 31.239 fps ts mono/SoE 156 (4) [-] none 156 192213 B 42.263823 42.271822 31.261 fps ts mono/SoE 157 (5) [-] none 157 191981 B 42.299824 42.303827 27.777 fps ts mono/SoE 158 (6) [-] none 158 191953 B 42.331835 42.339811 31.239 fps ts mono/SoE 159 (7) [-] none 159 191904 B 42.363824 42.371813 31.261 fps ts mono/SoE 160 (0) [-] none 160 192210 B 42.399834 42.407801 27.770 fps ts mono/SoE ``` Fixes: 5d0fd3c806b9 ("[media] uvcvideo: Disable hardware timestamps by default") Signed-off-by: Oleksandr Natalenko Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240325142611.15550-1-oleksandr@natalenko.name Signed-off-by: Laurent Pinchart commit 8676a5e796fa18f55897ca36a94b2adf7f73ebd1 Author: Ricardo Ribalda Date: Mon Jun 10 19:17:49 2024 +0000 media: uvcvideo: Fix integer overflow calculating timestamp The function uvc_video_clock_update() supports a single SOF overflow. Or in other words, the maximum difference between the first ant the last timestamp can be 4096 ticks or 4.096 seconds. This results in a maximum value for y2 of: 0x12FBECA00, that overflows 32bits. y2 = (u32)ktime_to_ns(ktime_sub(last->host_time, first->host_time)) + y1; Extend the size of y2 to u64 to support all its values. Without this patch: # yavta -s 1920x1080 -f YUYV -t 1/5 -c /dev/video0 Device /dev/v4l/by-id/usb-Shine-Optics_Integrated_Camera_0001-video-index0 opened. Device `Integrated Camera: Integrated C' on `usb-0000:00:14.0-6' (driver 'uvcvideo') supports video, capture, without mplanes. Video format set: YUYV (56595559) 1920x1080 (stride 3840) field none buffer size 4147200 Video format: YUYV (56595559) 1920x1080 (stride 3840) field none buffer size 4147200 Current frame rate: 1/5 Setting frame rate to: 1/5 Frame rate set: 1/5 8 buffers requested. length: 4147200 offset: 0 timestamp type/source: mono/SoE Buffer 0/0 mapped at address 0x7947ea94c000. length: 4147200 offset: 4149248 timestamp type/source: mono/SoE Buffer 1/0 mapped at address 0x7947ea557000. length: 4147200 offset: 8298496 timestamp type/source: mono/SoE Buffer 2/0 mapped at address 0x7947ea162000. length: 4147200 offset: 12447744 timestamp type/source: mono/SoE Buffer 3/0 mapped at address 0x7947e9d6d000. length: 4147200 offset: 16596992 timestamp type/source: mono/SoE Buffer 4/0 mapped at address 0x7947e9978000. length: 4147200 offset: 20746240 timestamp type/source: mono/SoE Buffer 5/0 mapped at address 0x7947e9583000. length: 4147200 offset: 24895488 timestamp type/source: mono/SoE Buffer 6/0 mapped at address 0x7947e918e000. length: 4147200 offset: 29044736 timestamp type/source: mono/SoE Buffer 7/0 mapped at address 0x7947e8d99000. 0 (0) [-] none 0 4147200 B 507.554210 508.874282 242.836 fps ts mono/SoE 1 (1) [-] none 2 4147200 B 508.886298 509.074289 0.751 fps ts mono/SoE 2 (2) [-] none 3 4147200 B 509.076362 509.274307 5.261 fps ts mono/SoE 3 (3) [-] none 4 4147200 B 509.276371 509.474336 5.000 fps ts mono/SoE 4 (4) [-] none 5 4147200 B 509.476394 509.674394 4.999 fps ts mono/SoE 5 (5) [-] none 6 4147200 B 509.676506 509.874345 4.997 fps ts mono/SoE 6 (6) [-] none 7 4147200 B 509.876430 510.074370 5.002 fps ts mono/SoE 7 (7) [-] none 8 4147200 B 510.076434 510.274365 5.000 fps ts mono/SoE 8 (0) [-] none 9 4147200 B 510.276421 510.474333 5.000 fps ts mono/SoE 9 (1) [-] none 10 4147200 B 510.476391 510.674429 5.001 fps ts mono/SoE 10 (2) [-] none 11 4147200 B 510.676434 510.874283 4.999 fps ts mono/SoE 11 (3) [-] none 12 4147200 B 510.886264 511.074349 4.766 fps ts mono/SoE 12 (4) [-] none 13 4147200 B 511.070577 511.274304 5.426 fps ts mono/SoE 13 (5) [-] none 14 4147200 B 511.286249 511.474301 4.637 fps ts mono/SoE 14 (6) [-] none 15 4147200 B 511.470542 511.674251 5.426 fps ts mono/SoE 15 (7) [-] none 16 4147200 B 511.672651 511.874337 4.948 fps ts mono/SoE 16 (0) [-] none 17 4147200 B 511.873988 512.074462 4.967 fps ts mono/SoE 17 (1) [-] none 18 4147200 B 512.075982 512.278296 4.951 fps ts mono/SoE 18 (2) [-] none 19 4147200 B 512.282631 512.482423 4.839 fps ts mono/SoE 19 (3) [-] none 20 4147200 B 518.986637 512.686333 0.149 fps ts mono/SoE 20 (4) [-] none 21 4147200 B 518.342709 512.886386 -1.553 fps ts mono/SoE 21 (5) [-] none 22 4147200 B 517.909812 513.090360 -2.310 fps ts mono/SoE 22 (6) [-] none 23 4147200 B 517.590775 513.294454 -3.134 fps ts mono/SoE 23 (7) [-] none 24 4147200 B 513.298465 513.494335 -0.233 fps ts mono/SoE 24 (0) [-] none 25 4147200 B 513.510273 513.698375 4.721 fps ts mono/SoE 25 (1) [-] none 26 4147200 B 513.698904 513.902327 5.301 fps ts mono/SoE 26 (2) [-] none 27 4147200 B 513.895971 514.102348 5.074 fps ts mono/SoE 27 (3) [-] none 28 4147200 B 514.099091 514.306337 4.923 fps ts mono/SoE 28 (4) [-] none 29 4147200 B 514.310348 514.510567 4.734 fps ts mono/SoE 29 (5) [-] none 30 4147200 B 514.509295 514.710367 5.026 fps ts mono/SoE 30 (6) [-] none 31 4147200 B 521.532513 514.914398 0.142 fps ts mono/SoE 31 (7) [-] none 32 4147200 B 520.885277 515.118385 -1.545 fps ts mono/SoE 32 (0) [-] none 33 4147200 B 520.411140 515.318336 -2.109 fps ts mono/SoE 33 (1) [-] none 34 4147200 B 515.325425 515.522278 -0.197 fps ts mono/SoE 34 (2) [-] none 35 4147200 B 515.538276 515.726423 4.698 fps ts mono/SoE 35 (3) [-] none 36 4147200 B 515.720767 515.930373 5.480 fps ts mono/SoE Cc: stable@vger.kernel.org Fixes: 66847ef013cc ("[media] uvcvideo: Add UVC timestamps support") Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240610-hwtimestamp-followup-v1-2-f9eaed7be7f0@chromium.org Signed-off-by: Laurent Pinchart commit 53d7995383fae089319e24636250f248b0fdb0ce Author: Ricardo Ribalda Date: Mon Jun 10 19:17:48 2024 +0000 media: uvcvideo: Fix hw timestamp handling for slow FPS In UVC 1.5 we get a single clock value per frame. With the current buffer size of 32, FPS slowers than 32 might roll-over twice. The current code cannot handle two roll-over and provide invalid timestamps. Revome all the samples from the circular buffer that are more than two rollovers old, so the algorithm always provides good timestamps. Note that we are removing values that are more than one second old, which means that there is enough distance between the two points that we use for the interpolation to provide good values. Tested-by: HungNien Chen Reviewed-by: Sergey Senozhatsky Reviewed-by: Tomasz Figa Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240610-hwtimestamp-followup-v1-1-f9eaed7be7f0@chromium.org Signed-off-by: Laurent Pinchart commit 2fd22faf0e9f120c39e6f47e5622b0039bb10817 Author: Takashi Sakamoto Date: Fri Jun 14 09:42:51 2024 +0900 firewire: core: record card index in tracepoints event for self ID sequence This patch is for for-next branch. The selfIDComplete event occurs in the bus managed by one of 1394 OHCI controller in Linux system, while the existing tracepoints events has the lack of data about it to distinguish the issued hardware from the others. This commit adds card_index member into event structure to store the index of host controller in use, and prints it. Link: https://lore.kernel.org/r/20240614004251.460649-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 67e51784c1974e0db8457ef5bcc179b9511bce22 Author: Takashi Sakamoto Date: Fri Jun 7 08:51:33 2024 +0900 firewire: core: use inline helper functions to serialize phy config packet This commit uses the added helper functions to obsolete the existing implementation for phy configuration packet. Link: https://lore.kernel.org/r/20240606235133.231543-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 75d47101fa37e60570bd97debd18e5519272d233 Author: Takashi Sakamoto Date: Fri Jun 7 08:51:32 2024 +0900 firewire: core: add tests for serialization/deserialization of phy config packet In the protocol of IEEE 1394, phy configuration packet is broadcasted to the bus to configure all PHYs residing on the bus. It includes two purposes; selecting root node and optimizing gap count. This commit adds some helper function to serialize/deserialize the content of phy configuration packet, as well as some KUnit tests for it. Link: https://lore.kernel.org/r/20240606235133.231543-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 677ceae190732ee844f940d1e4860af4022d2be3 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:55 2024 +0900 firewire: core: add tracepoints event for self_id_sequence It is helpful to trace the content of self ID sequence when the core function building bus topology. This commit adds a tracepoints event fot the purpose. It seems not to achieve printing variable length of array in print time without any storage, thus the structure of event includes a superfluous array to store the state of port. Additionally, there is no helper function to print symbol array, thus the state of port is printed as raw value. Link: https://lore.kernel.org/r/20240605235155.116468-12-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 1ccfd1a4c809d99891142c1bb9851daa42e40f0d Author: Takashi Sakamoto Date: Thu Jun 6 08:51:54 2024 +0900 firewire: core: arrangement header inclusion for tracepoints events It is a bit inconvenient to put the relative path to local header from tree-wide header. This commit delegates the selection to include headers into users. Link: https://lore.kernel.org/r/20240605235155.116468-11-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit f9a228364e5e2e80ea964214806d7b65b8ec93fb Author: Takashi Sakamoto Date: Thu Jun 6 08:51:53 2024 +0900 firewire: ohci: use helper inline functions to serialize/deserialize self ID packet This commit replaces the existing implementation with the helper functions for self ID packet. Link: https://lore.kernel.org/r/20240605235155.116468-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 8f035147f095cc4b8e79dc4b83cf564ea1a61de1 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:52 2024 +0900 firewire: core: use helper inline functions to deserialize self ID packet This commit replaces the existing implementation with the helper functions for self ID packet. Link: https://lore.kernel.org/r/20240605235155.116468-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit baf9d20b99ab2f79a501d8d1838cc5cf1ae731c3 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:51 2024 +0900 firewire: core: add common inline functions to serialize/deserialize self ID packet Within FireWire subsystem, the serializations and deserializations of phy packet are implemented in several parts. They includes some redundancies. This commit adds a series of helper functions for the serializations and deserializations of self ID packet with a Kunit test suite. Link: https://lore.kernel.org/r/20240605235155.116468-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit a16931ac6d8e0eb3152f361fb1e24f3fb15e0cf0 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:50 2024 +0900 firewire: ohci: use helper functions for self ID sequence This commit replaces the existing implementation with the helper functions for self ID sequence. Link: https://lore.kernel.org/r/20240605235155.116468-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 24b7f8e5cd656196a13077e160aec45ad89b58d9 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:49 2024 +0900 firewire: core: use helper functions for self ID sequence This commit replaces the existing implementation with the helper functions for self ID sequence. Link: https://lore.kernel.org/r/20240605235155.116468-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit e404cacfc5ed7273d4d2f7b4d2a70c3debc07adf Author: Takashi Sakamoto Date: Thu Jun 6 08:51:48 2024 +0900 firewire: ohci: minor code refactoring for self ID logging Current implementation to log self ID sequence has the rest to be refactored; e.g. moving translation-unit level variables to the dependent block. This commit is for the purpose. Link: https://lore.kernel.org/r/20240605235155.116468-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 10f5aee03787571057895762679c0bc3e1574692 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:47 2024 +0900 firewire: core: minor code refactoring for topology builder Current implementation to build tree according to self ID sequences has the rest to be refactored; e.g. putting local variables into block. This commit is for the purpose. Link: https://lore.kernel.org/r/20240605235155.116468-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 93389767da62142f4fa16733ddbc258d315180e0 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:46 2024 +0900 firewire: core: add helper function to handle port status from self ID sequence and its KUnit test The self ID sequence delivers the information about the state of port. This commit adds some enumerations to express the state of port, and some helper functions to handle the state. It adds a KUnit test for them, too. Link: https://lore.kernel.org/r/20240605235155.116468-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 7bd10e0e3a74f84eba4122bfc63a5896268752b8 Author: Takashi Sakamoto Date: Thu Jun 6 08:51:45 2024 +0900 firewire: core: add enumerator of self ID sequences and its KUnit test When the state of bus reset finishes, 1394 OHCI driver constructs self ID sequences, then it calls fw_core_handle_bus_reset() in core function. The core function enumerates the self ID sequences to build bus topology. This commit adds a structure and some helper functions for the enumeration, and adds a KUnit test suite to ensure its expected behaviour. Link: https://lore.kernel.org/r/20240605235155.116468-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 141270bd95d48ea77adf2ea851e0621dc6725782 Author: Ricardo Ribalda Date: Sat Mar 23 10:48:06 2024 +0000 media: uvcvideo: Refactor clock circular buffer Isolate all the changes related to the clock circular buffer to its own function, that way we can make changes easier to the buffer logic. Also simplify the lock, by removing the circular buffer clock handling from uvc_video_clock_decode(). And now that we are at it, unify the API of the clock functions. Tested-by: HungNien Chen Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Tomasz Figa Link: https://lore.kernel.org/r/20240323-resend-hwtimestamp-v10-5-b08e590d97c7@chromium.org Signed-off-by: Laurent Pinchart commit 6243c83be6ee8d95cf5661b5a123621106491974 Author: Ricardo Ribalda Date: Sat Mar 23 10:48:05 2024 +0000 media: uvcvideo: Allow hw clock updates with buffers not full With UVC 1.5 we get as little as one clock sample per frame. Which means that it takes 32 frames to move from the software timestamp to the hardware timestamp method. This results in abrupt changes in the timestamping after 32 frames (~1 second), resulting in noticeable artifacts when used for encoding. With this patch we modify the update algorithm to work with whatever amount of values are available. Tested-by: HungNien Chen Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Tomasz Figa Link: https://lore.kernel.org/r/20240323-resend-hwtimestamp-v10-4-b08e590d97c7@chromium.org Signed-off-by: Laurent Pinchart commit 9183c6f1a21e0da4415762c504e2d7f784304d12 Author: Ricardo Ribalda Date: Sat Mar 23 10:48:04 2024 +0000 media: uvcvideo: Quirk for invalid dev_sof in Logitech C922 Logitech C922 internal SOF does not increases at a stable rate of 1kHz. This causes that the device_sof and the host_sof run at different rates, breaking the clock domain conversion algorithm. Eg: 30 (6) [-] none 30 614400 B 21.245557 21.395214 34.133 fps ts mono/SoE 31 (7) [-] none 31 614400 B 21.275327 21.427246 33.591 fps ts mono/SoE 32 (0) [-] none 32 614400 B 21.304739 21.459256 34.000 fps ts mono/SoE 33 (1) [-] none 33 614400 B 21.334324 21.495274 33.801 fps ts mono/SoE * 34 (2) [-] none 34 614400 B 21.529237 21.527297 5.130 fps ts mono/SoE * 35 (3) [-] none 35 614400 B 21.649416 21.559306 8.321 fps ts mono/SoE 36 (4) [-] none 36 614400 B 21.678789 21.595320 34.045 fps ts mono/SoE ... 99 (3) [-] none 99 614400 B 23.542226 23.696352 33.541 fps ts mono/SoE 100 (4) [-] none 100 614400 B 23.571578 23.728404 34.069 fps ts mono/SoE 101 (5) [-] none 101 614400 B 23.601425 23.760420 33.504 fps ts mono/SoE * 102 (6) [-] none 102 614400 B 23.798324 23.796428 5.079 fps ts mono/SoE * 103 (7) [-] none 103 614400 B 23.916271 23.828450 8.478 fps ts mono/SoE 104 (0) [-] none 104 614400 B 23.945720 23.860479 33.957 fps ts mono/SoE Instead of disabling completely the hardware timestamping for such hardware we take the assumption that the packet handling jitter is under 2ms and use the host_sof as dev_sof. We can think of the UVC hardware clock as a system with a coarse clock (the SOF) and a fine clock (the PTS). The coarse clock can be replaced with a clock on the same frequency, if the jitter of such clock is smaller than its sampling rate. That way we can save some of the precision of the fine clock. To probe this point we have run three experiments on the Logitech C922. On that experiment we run the camera at 33fps and we analyse the difference in msec between a frame and its predecessor. If we display the histogram of that value, a thinner histogram will mean a better meassurement. The results for: - original hw timestamp: https://ibb.co/D1HJJ4x - pure software timestamp: https://ibb.co/QC9MgVK - modified hw timestamp: https://ibb.co/8s9dBdk This bug in the camera firmware has been confirmed by the vendor. lsusb -v Bus 001 Device 044: ID 046d:085c Logitech, Inc. C922 Pro Stream Webcam Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x046d Logitech, Inc. idProduct 0x085c C922 Pro Stream Webcam bcdDevice 0.16 iManufacturer 0 iProduct 2 C922 Pro Stream Webcam iSerial 1 80B912DF bNumConfigurations 1 Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Ricardo Ribalda Signed-off-by: Oleksandr Natalenko Reviewed-by: Tomasz Figa Link: https://lore.kernel.org/r/20240323-resend-hwtimestamp-v10-3-b08e590d97c7@chromium.org Signed-off-by: Laurent Pinchart commit 5cd7c25f6f0576073b3d03bc4cfb1e8ca63a1195 Author: Ricardo Ribalda Date: Sat Mar 23 10:48:03 2024 +0000 media: uvcvideo: Ignore empty TS packets Some SunplusIT cameras took a borderline interpretation of the UVC 1.5 standard, and fill the PTS and SCR fields with invalid data if the package does not contain data. "STC must be captured when the first video data of a video frame is put on the USB bus." Some SunplusIT devices send, e.g., buffer: 0xa7755c00 len 000012 header:0x8c stc 00000000 sof 0000 pts 00000000 buffer: 0xa7755c00 len 000012 header:0x8c stc 00000000 sof 0000 pts 00000000 buffer: 0xa7755c00 len 000668 header:0x8c stc 73779dba sof 070c pts 7376d37a While the UVC specification meant that the first two packets shouldn't have had the SCR bit set in the header. This borderline/buggy interpretation has been implemented in a variety of devices, from directly SunplusIT and from other OEMs that rebrand SunplusIT products. So quirking based on VID:PID will be problematic. All the affected modules have the following extension unit: VideoControl Interface Descriptor: guidExtensionCode {82066163-7050-ab49-b8cc-b3855e8d221d} But the vendor plans to use that GUID in the future and fix the bug, this means that we should use heuristic to figure out the broken packets. This patch takes care of this. lsusb of one of the affected cameras: Bus 001 Device 003: ID 1bcf:2a01 Sunplus Innovation Technology Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1bcf Sunplus Innovation Technology Inc. idProduct 0x2a01 bcdDevice 0.02 iManufacturer 1 SunplusIT Inc iProduct 2 HanChen Wise Camera iSerial 3 01.00.00 bNumConfigurations 1 Tested-by: HungNien Chen Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Tomasz Figa Link: https://lore.kernel.org/r/20240323-resend-hwtimestamp-v10-2-b08e590d97c7@chromium.org Signed-off-by: Laurent Pinchart commit a0df8d9450dff25652b628a07f9240ea66228eba Author: Ricardo Ribalda Date: Sat Mar 23 10:48:02 2024 +0000 media: uvcvideo: Support timestamp lists of any size The tail of the list lives at the position before the head. This is mathematically noted as: ``` (head-1) mod size. ``` Unfortunately C, does not have a modulus operator, but a remainder operator (%). The reminder operation has a different result than the modulus if (head -1) is a negative number and size is not a power of two. Adding size to (head-1) allows the code to run with any value of size. This does not change the current behaviour of the driver, as the size is always a power of two, but avoid tedious debugging if we ever change its size. Reviewed-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Reviewed-by: Tomasz Figa Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240323-resend-hwtimestamp-v10-1-b08e590d97c7@chromium.org Signed-off-by: Laurent Pinchart commit 66088084fdabb6e5075cd19e8ffe15b8bc7e3708 Author: John Garry Date: Fri Jun 14 09:03:45 2024 +0000 block: BFQ: Refactor bfq_exit_icq() to silence sparse warning Currently building for C=1 generates the following warning: block/bfq-iosched.c:5498:9: warning: context imbalance in 'bfq_exit_icq' - different lock contexts for basic block Refactor bfq_exit_icq() into a core part which loops for the actuators, and only lock calling this routine when necessary. Signed-off-by: John Garry Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20240614090345.655716-4-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit c3042a5403ef2be622023fcc3b11fc1aa08ba7fa Author: John Garry Date: Fri Jun 14 09:03:44 2024 +0000 block: Drop locking annotation for limits_lock Currently compiling block/blk-settings.c with C=1 gives the following warning: block/blk-settings.c:262:9: warning: context imbalance in 'queue_limits_commit_update' - wrong count at exit request_queue.limits_lock is a mutex. Sparse locking annotation for mutexes are currently not supported - see [0] - so drop that locking annotation. [0] https://lore.kernel.org/lkml/cover.1579893447.git.jbi.octave@gmail.com/T/#mbb8bda6c0a7ca7ce19f46df976a8e3b489745488 Fixes: d690cb8ae14bd ("block: add an API to atomically update queue limits") Signed-off-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240614090345.655716-3-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit d9c2332199d073c5edd7163d64fbdee6224d8c08 Author: Jiapeng Chong Date: Fri Jun 14 09:03:43 2024 +0000 bdev: make blockdev_mnt static The blockdev_mnt are not used outside the file bdev.c, so the modification is defined as static. block/bdev.c:377:17: warning: symbol 'blockdev_mnt' was not declared. Should it be static? Reported-by: Abaci Robot jpg: Remove closes bugzilla link Reviewed-by: Christoph Hellwig Signed-off-by: Jiapeng Chong Signed-off-by: John Garry Reviewed-by: Bart Van Assche Fixes: 8f3a608827d1 ("bdev: open block device as files") Tested-by: John Garry Link: https://lore.kernel.org/r/20240614090345.655716-2-john.g.garry@oracle.com Signed-off-by: Jens Axboe commit 3b87184f7eff27fef7d7ee18b65f173152e1bb81 Author: Jens Axboe Date: Sat Jun 15 20:47:14 2024 -0600 io_uring/advise: support 64-bit lengths The existing fadvise/madvise support only supports 32-bit lengths. Add support for 64-bit lengths, enabled by the application setting sqe->off rather than sqe->len for the length. If sqe->len is set, then that is used as the 32-bit length. If sqe->len is zero, then sqe->off is read for full 64-bit support. Older kernels will return -EINVAL if 64-bit support isn't available. Fixes: 4840e418c2fc ("io_uring: add IORING_OP_FADVISE") Fixes: c1ca757bd6f4 ("io_uring: add IORING_OP_MADVISE") Reported-by: Stefan Signed-off-by: Jens Axboe commit 11d194669271642a5d1bfff6c8011478309e7849 Author: Jens Axboe Date: Fri Jun 14 18:34:50 2024 -0600 io_uring/rsrc: remove redundant __set_current_state() post schedule() We're guaranteed to be in a TASK_RUNNING state post schedule, so we never need to set the state after that. While in there, remove the other __set_current_state() as well, and just call finish_wait() when we now we're going to break anyway. This is easier to grok than manual __set_current_state() calls. Reported-by: Linus Torvalds Signed-off-by: Jens Axboe commit 3474d1b93f897ab33ce160e759afd47d5f412de4 Author: Jens Axboe Date: Thu Jun 13 19:28:27 2024 +0000 io_uring/io-wq: make io_wq_work flags atomic The work flags can be set/accessed from different tasks, both the originator of the request, and the io-wq workers. While modifications aren't concurrent, it still makes KMSAN unhappy. There's no real downside to just making the flag reading/manipulation use proper atomics here. Signed-off-by: Jens Axboe commit f2a93294edce87c909d61e18b506404127394891 Author: Jens Axboe Date: Fri Jun 14 10:57:03 2024 -0600 io_uring: use 'state' consistently __io_submit_flush_completions() assigns ctx->submit_state to a local variable and uses it in all but one spot, switch that forgotten statement to using 'state' as well. Signed-off-by: Jens Axboe commit 200f3abd14db55f9aadcb74f4e7a678f1c469ba1 Author: Jens Axboe Date: Mon Jun 3 11:51:19 2024 -0600 io_uring/eventfd: move eventfd handling to separate file This is pretty nicely abstracted already, but let's move it to a separate file rather than have it in the main io_uring file. With that, we can also move the io_ev_fd struct and enum out of global scope. Signed-off-by: Jens Axboe commit 60b6c075e8eb8bd23c106e2ab13370a146a94a5b Author: Jens Axboe Date: Mon Jun 3 11:19:10 2024 -0600 io_uring/eventfd: move to more idiomatic RCU free usage In some ways, it just "happens to work" currently with using the ops field for both the free and signaling bit. But it depends on ordering of operations in terms of freeing and signaling. Clean it up and use the usual refs == 0 under RCU read side lock to determine if the ev_fd is still valid, and use the reference to gate the freeing as well. Fixes: 21a091b970cd ("io_uring: signal registered eventfd to process deferred task work") Signed-off-by: Jens Axboe commit f4eaf8eda89e1ae5d8274297094687245293deff Author: Gabriel Krisman Bertazi Date: Thu May 23 17:45:35 2024 -0400 io_uring/rsrc: Drop io_copy_iov in favor of iovec API Instead of open coding an io_uring function to copy iovs from userspace, rely on the existing iovec_from_user function. While there, avoid repeatedly zeroing the iov in the !arg case for io_sqe_buffer_register. tested with liburing testsuite. Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20240523214535.31890-1-krisman@suse.de Signed-off-by: Jens Axboe commit 81cc927d9c5eefd4a1b08e16b0ab2263f36d03f7 Author: Gabriel Krisman Bertazi Date: Thu May 23 17:45:17 2024 -0400 io_uring: Drop per-ctx dummy_ubuf Commit 19a63c402170 ("io_uring/rsrc: keep one global dummy_ubuf") replaced it with a global static object but this stayed behind. Fixes: 19a63c402170 ("io_uring/rsrc: keep one global dummy_ubuf") Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20240523214517.31803-1-krisman@suse.de Signed-off-by: Jens Axboe commit b7161db2d96fb23baffb1b3552a1f468fff74e69 Merge: a4e540119be56 b339e0a39dc37 Author: Leon Romanovsky Date: Sun Jun 16 18:54:04 2024 +0300 Merge branch 'mlx5-next' into wip/leon-for-next The req_transport_retries_exceeded counter shows the number of times requester detected transport retries exceed error. The req_rnr_retries_exceeded counter show the number of times the requester detected RNR NAKs retries exceed error. Signed-off-by: Leon Romanovsky commit b339e0a39dc37726712b9f0485d78fe4306d1667 Author: Patrisious Haddad Date: Thu Jun 13 21:00:04 2024 +0300 RDMA/mlx5: Add Qcounters req_transport_retries_exceeded/req_rnr_retries_exceeded The req_transport_retries_exceeded counter shows the number of times requester detected transport retries exceed error. The req_rnr_retries_exceeded counter show the number of times the requester detected RNR NAKs retries exceed error. Signed-off-by: Patrisious Haddad Link: https://lore.kernel.org/r/250466af94f4989d638fab168e246035530e912f.1718301543.git.leon@kernel.org Reviewed-by: Simon Horman Signed-off-by: Leon Romanovsky commit a4e540119be565f47c305f295ed43f8e0bc3f5c3 Author: Chiara Meiohas Date: Thu Jun 13 21:01:42 2024 +0300 RDMA/mlx5: Set mkeys for dmabuf at PAGE_SIZE Set the mkey for dmabuf at PAGE_SIZE to support any SGL after a move operation. ib_umem_find_best_pgsz returns 0 on error, so it is incorrect to check the returned page_size against PAGE_SIZE Fixes: 90da7dc8206a ("RDMA/mlx5: Support dma-buf based userspace memory region") Signed-off-by: Chiara Meiohas Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/1e2289b9133e89f273a4e68d459057d032cbc2ce.1718301631.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 5895e70f2e6e8dc67b551ca554d6fcde0a7f0467 Author: Jianbo Liu Date: Mon Jun 3 13:26:39 2024 +0300 IB/mlx5: Allocate resources just before first QP/SRQ is created Previously, all IB dev resources are initialized on driver load. As they are not always used, move the initialization to the time when they are needed. To be more specific, move PD (p0) and CQ (c0) initialization to the time when the first SRQ is created. and move SRQs(s0 and s1) initialization to the time first QP is created. To avoid concurrent creations, two new mutexes are also added. Signed-off-by: Jianbo Liu Link: https://lore.kernel.org/r/98c3e53a8cc0bdfeb6dec6e5bb8b037d78ab00d8.1717409369.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 638420115cc4ad6c3a2683bf46a052b505abb202 Author: Jianbo Liu Date: Mon Jun 3 13:26:38 2024 +0300 IB/mlx5: Create UMR QP just before first reg_mr occurs UMR QP is not used in some cases, so move QP and its CQ creations from driver load flow to the time first reg_mr occurs, that is when MR interfaces are first called. The initialization of dev->umrc.pd and dev->umrc.lock is still done in driver load because pd is needed for mlx5_mkey_cache_init and the lock is reused to protect against the concurrent creation. When testing 4G bytes memory registration latency with rtool [1] and 8 threads in parallel, there is minor performance degradation (<5% for the max latency) is seen for the first reg_mr with this change. Link: https://github.com/paravmellanox/rtool [1] Signed-off-by: Jianbo Liu Link: https://lore.kernel.org/r/55d3c4f8a542fd974d8a4c5816eccfb318a59b38.1717409369.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit ae6f6dd5fd0f77368ba5888c2c57bd23abfe4f35 Merge: ef5513526bb6a d98995b4bf981 Author: Leon Romanovsky Date: Sun Jun 16 18:35:47 2024 +0300 Delay mlx5_ib internal resources allocations From: Leon Romanovsky Internal mlx5_ib resources are created during mlx5_ib module load. This behavior is not optimal because it consumes resources that are not needed when SFs are created. This patch series delays the creation of mlx5_ib internal resources to the stage when they actually used. Signed-off-by: Leon Romanovsky commit d98995b4bf981519dde4af0a081c393d62474039 Author: Jianbo Liu Date: Mon Jun 3 13:26:37 2024 +0300 net/mlx5: Reimplement write combining test The test of write combining was added before in mlx5_ib driver. It opens UD QP and posts NOP WQEs, and uses BlueFlame doorbell. When BlueFlame is used, WQEs get written directly to a PCI BAR of the device (in addition to memory) so that the device handles them without having to access memory. In this test, the WQEs written in memory are different from the ones written to the BlueFlame which request CQE update. By checking the completion reports posted on CQ, we can know if BlueFlame succeeds or not. The write combining must be supported if BlueFlame succeeds as its register is written using write combining. This patch reimplements the test in the same way, but using a pair of SQ and CQ only. It is moved to mlx5_core as a general feature used by both mlx5_core and mlx5_ib. Besides, save write combine test result of the PCI function, so that its thousands of child functions such as SF can query without paying the time and resource penalty by itself. The test function is called only after failing to get the cached result. With this enhancement, all thousands of SFs of the PF attached to same driver no longer need to perform WC check explicitly, which is already done in the system. This saves several commands per SF, thereby speeds up SF creation and also saves completion EQ creation. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/4ff5a8cc4c5b5b0d98397baa45a5019bcdbf096e.1717409369.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 7cedaa390bfb9b8b92a2a65f1eef6e312168e4eb Author: Michael Walle Date: Tue Jun 4 16:22:48 2024 +0200 dt-bindings: Drop Li Yang as maintainer for all bindings Remove Li Yang from all device tree bindings because mails to this address are bouncing. Commit fbdd90334a62 ("MAINTAINERS: Drop Li Yang as their email address stopped working") already removed the entry from the MAINTAINERS but didn't address all the in-file entries of the device tree bindings. Signed-off-by: Michael Walle Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 152f7a9908b11ff55f3feb357a5f6ff84f90e69b Author: Mike Looijmans Date: Tue Jun 4 08:27:22 2024 +0200 arm64: dts: ls1028a-rdb: Add EEPROM nodes to I2C bus The LS1028ARDB board contains three EEPROM devices, for storing boot code, DDR SPD and board information. Add the missing entries to the devicetree. Signed-off-by: Mike Looijmans Signed-off-by: Shawn Guo commit 2db573c5dc1f896d8c6c73d4bdb6429f8b1dcf34 Merge: a774c5d1f9c4a 07d4d0bb4a8dd Author: Greg Kroah-Hartman Date: Sun Jun 16 12:03:31 2024 +0200 Merge tag 'iio-for-6.11a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-testing Jonathan writes: IIO: 1st set of new device support, cleanups etc for 6.11 Lots of new device support and 3 entirely new drivers. Early pull request this cycle to allow for clean picking up of fixes that are dependencies for some queued patch sets. Device support ============== adi,ad3552r - Add AD3541R and AD3551R - single output variants of already supported DACs. adi,ad7192 - Add support for ad7194 24-bit ADC with integrated PGA. adi,ad7380 - New ADC driver built up in a number of steps. Supports - 2 channel differential ADCs: AD7380, AD7381 - 4 channel differential ADCs: AD7380-4, AD7381-4 - 2 channel pseudo-differential ADCs: AD7383, AD7384 - 4 channel pseudo-differential ADCs: AD7383-4, AD7384-4 adi,adis16475 - Support ADS16501 variant - ID and some different scale factors from parts already supported. - Driver refactoring then enables support for 6 more IMUs: - ADIS16575-[2,3] - ADIS16576-[2,3] - ADIS16577-[2,3] adi,adsi16480 - Driver refactoring and feature additions leading to support for 6 more IMUs - with new delta angle and delta velocity feature: - ADIS16545-[1,2,3] - ADIS16547-[1,2,3] bosch,bmi160 - Support for the bmi120 IMU: ID only. Also relax ID checking to warn only on mismatch allowing use of fallback compatibles for new devices. sciosense,ens160 - New driver for this metal oxide multi-gas sensor for indoor air quality monitoring. sensortek,stk3110 - Support for stk3311a and stk3311s34 light sensor variants. Relax ID checking to warn only on a mismatch allowing use of fallback compatibles for new devices. vishay,veml6040 - New driver for this RGBW light sensor. Note that whilst the register interface is very different, the dt-binding similar enough that it is shared with the existing vishay,veml6075 binding x-powers,axp20x - Add support for axp192, very similar to another supported PMIC ADC variant but with a few more GPIO channels. Dt-binding only =============== ti,ads1015 - Add binding (no driver support yet) for ti,tla2021 New features ============ core - Variable scan type support. We have papered over this for a long time so good to finally resolve it. Some devices will change their data output format (typically resolution) dependent on settings such as oversampling. A new callback is added to enable this. First used in the ad7380 driver. - Harden the core against missing callback functions. dt-binding: - Add a single-channel property that can be used in per channel nodes instead of reg to indicate which device channel. This is important in devices with a mixture of differential and single ended channels as reg already just acted as an index for the differential channels making things inconsistent if it had more meaning for single ended channels. adi,ad7380 - Use spi_optimize_message() to reduce reading message setup overhead. - Add oversampling support using the new core functionality to allow a device support multiple scan types. invense,icm42600 - Support for low-power accelerometer modes. When a given sampling frequency is only supported at one power mode, use that. Otherwise default to low power at the cost of some noise unless overridden via a new sysfs attribute. silicon-labs,si70720 - Add control of the heater. Cleanups and minor fixes ======================== core - Cleanup use of sizeof(struct xxxx) in favor of sizeof(*variable) Makefile - Resort the iio/adc/Makefile which has drifted away from alphabetical order. gts library - Fix sorting of lists with a zero in the middle. Doesn't happen with upstream drivers, but good to harden this code. Add a related unit test. multiple drivers - Add missing MODULE_DESCRIPTION() - Drop some unused structure fields. - Drop some entirely unused structure definitions. - Stop pointless initialization of i2c_device_id::driver_data to 0 in drivers where it isn't used. - Use spi_get_device_match_data() to replace open-coded equivalent. adi,ad3552r - Fix dt gain parameter names to reflect what the driver does. Note discussion in patch to justify fixing it in the binding not the driver. - Tidy up some naming. adi,ad7192 - Use read_avail() callback to handle the low pass filter. - Add an aincom supply for pseudo differential operation. adi,ad7606 - Use iio_device_claim_direct_scoped() to simplify error paths. adi,ad7944 - Drop an unused function parameter. adi,adrf6780 - Drop unused header. adi,ad9467 - Use a DMA safe buffer for SPI transfers. - Stop using tabs to pad structure field names. It was creating a lot of noise. adi,axi-adc - Prevent races between enable and disable calls. - Ensure the DRP (dynamic reconfiguration port) is locked. Not used in most real designs, but better safe than sorry. - Limit build to COMPILE_TEST or platforms for which the IP exists. adi,axi-dac - Limit build to COMPILE_TEST or platforms for which the IP exists. ams,iaq - Use __packed instead of ___attribute__((__packed__)) bosch,bmp280 - White space cleanup. - Use BME280 prefix for registers that do not exist on the BMP280. - Add parameter names to callback function definitions. - Rename measure function to better reflect what it does which is wait for a measurement to happen. - Drop a redundant error check. - Improve error messages - Make error checks consistent as if (ret) - Use unsigned types for inherently unsigned data. - Refactor reading functions to not rely on a hidden t_fine variable. - Make use of cleanup.h freescale,mma7660 - Add mount matrix support. invense,icm42600 - Enable the regmap cache to reduce bus accesses. amlogic,meson-saradc - Add dt-binding support for power-domains. ti,adc161s626 - Use iio_device_claim_direct_scoped() to simplify error handling. * tag 'iio-for-6.11a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (107 commits) iio: imu: inv_icm42600: add support of accel low-power mode iio: document inv_icm42600 driver private sysfs attributes MAINTAINERS: Add ScioSense ENS160 iio: chemical: ens160: add power management support iio: chemical: ens160: add triggered buffer support iio: chemical: add driver for ENS160 sensor dt-bindings: iio: chemical: add ENS160 sensor dt-bindings: vendor-prefixes: add ScioSense iio: temperature: mcp9600: add threshold events support dt-bindings: iio: light: add VEML6040 RGBW-LS iio: light: driver for Vishay VEML6040 dt-bindings: iio: adc: amlogic,meson-saradc: add optional power-domains iio: dac: adi-axi-dac: add platform dependencies iio: adc: adi-axi-adc: add platform dependencies iio: imu: inv_icm42600: add register caching in the regmap iio: adc: mcp3564: drop redundant open-coded spi_get_device_match_data() iio: dac: max5522: simplify with spi_get_device_match_data() iio: addac: ad74413r: simplify with spi_get_device_match_data() iio: adc: ti-tsc2046: simplify with spi_get_device_match_data() iio: adc: ti-ads131e08: simplify with spi_get_device_match_data() ... commit ef5513526bb6a83d7777acf5b79f71d19865563c Merge: 2a1251e3dbb29 7fc45cb68696c Author: Leon Romanovsky Date: Sun Jun 16 10:51:25 2024 +0300 Merge branch 'mana-shared' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Leon Romanovsky says: ==================== net: mana: Allow variable size indirection table Like we talked, I created new shared branch for this patch: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=mana-shared * 'mana-shared' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: net: mana: Allow variable size indirection table ==================== Link: https://lore.kernel.org/all/20240612183051.GE4966@unreal Signed-off-by: Leon Romanovsky commit 7666718892f2a8582127f584fdbf5dada59af2d8 Author: Andy Shevchenko Date: Thu Jun 6 19:09:33 2024 +0300 clk: samsung: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606161028.2986587-4-andriy.shevchenko@linux.intel.com Signed-off-by: Krzysztof Kozlowski commit 51e860cdd34b8f9452d032514aacdfb232f9cd9f Author: Dmitry Baryshkov Date: Mon Jun 3 00:09:39 2024 +0300 ARM: imx_v6_v7_defconfig: enable DRM_SII902X and DRM_DISPLAY_CONNECTOR Enable the LVDS-to-HDMI bridge and the HDMI display connector drivers used on the iMX53 QSB and QSRB boards with the HDMI mezzanine. Cc: Chris Healy Signed-off-by: Dmitry Baryshkov Tested-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 23ea56ef2288d27a1673e62c7c513d9265f97e90 Author: Adam Ford Date: Sat Jun 1 08:52:29 2024 -0500 arm64: dts: imx8mp-beacon-kit: Fix errors found from CHECK_DTBS The adv7535 has some unnecessary entries which can be removed since they were not setup properly anyway and the defaults work just fine. Removing them and adding some required regulators make the errors detected from CHECK_DTBS go away: reg-names:1: 'edid' was expected reg-names:2: 'cec' was expected 'avdd-supply' is a required property 'dvdd-supply' is a required property 'pvdd-supply' is a required property 'a2vdd-supply' is a required property 'v3p3-supply' is a required property Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 81ad3889ba237bfd0adbd0fc61d9c2dfd2ffa956 Author: Frank Li Date: Fri May 31 17:50:17 2024 -0400 arm64: dts: ls2160a: Change I2C clock name to ipg to fix DTB_CHECK warning dt_binding require I2C's clock name is "ipg". Change it to "ipg" from "i2c" to fix below DTB_CHECK warning. arch/arm64/boot/dts/freescale/fsl-lx2162a-qds.dtb: i2c@2010000: clock-names:0: 'ipg' was expected Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 2c4c29b66908165a4772bcfe99d8250c2c8b26ed Author: Frank Li Date: Fri May 31 17:50:16 2024 -0400 arm64: dts: ls208xa: Change I2C clock name to ipg to fix DTB_CHECK warning dt_binding require I2C's clock name is "ipg". Change it to "ipg" from "i2c" to fix below DTB_CHECK warning. arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dtb: i2c@2000000: clock-names:0: 'ipg' was expected Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 67edf1eb1c4b6ad496f2714cb43140c19d241f9c Author: Frank Li Date: Fri May 31 17:50:15 2024 -0400 arm64: dts: ls1043a: Change I2C clock name to ipg to fix DTB_CHECK warning dt_binding require I2C's clock name is "ipg". Change it to "ipg" from "i2c" to fix below DTB_CHECK warning. arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dtb: i2c@2190000: clock-names:0: 'ipg' was expecte Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 9ebd81f0c73b40568749cc3ae52e3c644a3e10e4 Author: Frank Li Date: Fri May 31 17:50:14 2024 -0400 arm64: dts: ls1012a: Reorder sai dma-names to clean up DTB_CHECK warning Change order of sai's dma-names to clearn up below DTB_CHECK warning. arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: sai@2b50000: dma-names:1: 'tx' was expected arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dtb: sai@2b60000: dma-names:1: 'tx' was expected Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 02c4a2a1e1896c5d559f597e3812e3f9a7f0c741 Author: Alexander Stein Date: Thu May 30 16:37:22 2024 +0200 ARM: imx_v6_v7_defconfig: Enable drivers for TQMa7x/MBa7x Enable drivers for devices/features used on MBa7x. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 1dcf865d3bf5bff45e93cb2410911b3428dacb78 Author: Stefan Berger Date: Thu Jun 13 17:38:20 2024 -0400 crypto: ecc - Fix off-by-one missing to clear most significant digit Fix an off-by-one error where the most significant digit was not initialized leading to signature verification failures by the testmgr. Example: If a curve requires ndigits (=9) and diff (=2) indicates that 2 digits need to be set to zero then start with digit 'ndigits - diff' (=7) and clear 'diff' digits starting from there, so 7 and 8. Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/linux-crypto/619bc2de-b18a-4939-a652-9ca886bf6349@linux.ibm.com/T/#m045d8812409ce233c17fcdb8b88b6629c671f9f4 Fixes: 2fd2a82ccbfc ("crypto: ecdsa - Use ecc_digits_from_bytes to create hash digits array") Signed-off-by: Stefan Berger Tested-by: Venkat Rao Bagalkote Signed-off-by: Herbert Xu commit 0eb3bed57a06a20c612012127f4405d48fa4a50f Author: Stefan Berger Date: Fri Jun 7 18:34:17 2024 -0400 crypto: ecc - Add comment to ecc_digits_from_bytes about input byte array Add comment to ecc_digits_from_bytes kdoc that the first byte is expected to hold the most significant bits of the large integer that is converted into an array of digits. Signed-off-by: Stefan Berger Signed-off-by: Herbert Xu commit 4604b3888f614a353c7afa17bdc8e7393bb1f9a1 Author: Andy Shevchenko Date: Wed Jun 5 21:51:33 2024 +0300 hwrng: core - Remove list.h from the hw_random.h The 'struct list' type is defined in types.h, no need to include list.h for that. Signed-off-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 293695f17ee4a8585f1d5a4e90a2c2c92995225a Author: Neil Armstrong Date: Wed Jun 5 11:36:33 2024 +0200 dt-bindings: rng: meson: add optional power-domains On newer SoCs, the random number generator can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong Acked-by: Rob Herring (Arm) Signed-off-by: Herbert Xu commit 468e3295774d0edce15f4ae475913b5076dd4f40 Author: Kim Phillips Date: Tue Jun 4 12:47:39 2024 -0500 crypto: ccp - Fix null pointer dereference in __sev_snp_shutdown_locked Fix a null pointer dereference induced by DEBUG_TEST_DRIVER_REMOVE. Return from __sev_snp_shutdown_locked() if the psp_device or the sev_device structs are not initialized. Without the fix, the driver will produce the following splat: ccp 0000:55:00.5: enabling device (0000 -> 0002) ccp 0000:55:00.5: sev enabled ccp 0000:55:00.5: psp enabled BUG: kernel NULL pointer dereference, address: 00000000000000f0 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC NOPTI CPU: 262 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc1+ #29 RIP: 0010:__sev_snp_shutdown_locked+0x2e/0x150 Code: 00 55 48 89 e5 41 57 41 56 41 54 53 48 83 ec 10 41 89 f7 49 89 fe 65 48 8b 04 25 28 00 00 00 48 89 45 d8 48 8b 05 6a 5a 7f 06 <4c> 8b a0 f0 00 00 00 41 0f b6 9c 24 a2 00 00 00 48 83 fb 02 0f 83 RSP: 0018:ffffb2ea4014b7b8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff9e4acd2e0a28 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb2ea4014b808 RBP: ffffb2ea4014b7e8 R08: 0000000000000106 R09: 000000000003d9c0 R10: 0000000000000001 R11: ffffffffa39ff070 R12: ffff9e49d40590c8 R13: 0000000000000000 R14: ffffb2ea4014b808 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9e58b1e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000f0 CR3: 0000000418a3e001 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: ? __die_body+0x6f/0xb0 ? __die+0xcc/0xf0 ? page_fault_oops+0x330/0x3a0 ? save_trace+0x2a5/0x360 ? do_user_addr_fault+0x583/0x630 ? exc_page_fault+0x81/0x120 ? asm_exc_page_fault+0x2b/0x30 ? __sev_snp_shutdown_locked+0x2e/0x150 __sev_firmware_shutdown+0x349/0x5b0 ? pm_runtime_barrier+0x66/0xe0 sev_dev_destroy+0x34/0xb0 psp_dev_destroy+0x27/0x60 sp_destroy+0x39/0x90 sp_pci_remove+0x22/0x60 pci_device_remove+0x4e/0x110 really_probe+0x271/0x4e0 __driver_probe_device+0x8f/0x160 driver_probe_device+0x24/0x120 __driver_attach+0xc7/0x280 ? driver_attach+0x30/0x30 bus_for_each_dev+0x10d/0x130 driver_attach+0x22/0x30 bus_add_driver+0x171/0x2b0 ? unaccepted_memory_init_kdump+0x20/0x20 driver_register+0x67/0x100 __pci_register_driver+0x83/0x90 sp_pci_init+0x22/0x30 sp_mod_init+0x13/0x30 do_one_initcall+0xb8/0x290 ? sched_clock_noinstr+0xd/0x10 ? local_clock_noinstr+0x3e/0x100 ? stack_depot_save_flags+0x21e/0x6a0 ? local_clock+0x1c/0x60 ? stack_depot_save_flags+0x21e/0x6a0 ? sched_clock_noinstr+0xd/0x10 ? local_clock_noinstr+0x3e/0x100 ? __lock_acquire+0xd90/0xe30 ? sched_clock_noinstr+0xd/0x10 ? local_clock_noinstr+0x3e/0x100 ? __create_object+0x66/0x100 ? local_clock+0x1c/0x60 ? __create_object+0x66/0x100 ? parameq+0x1b/0x90 ? parse_one+0x6d/0x1d0 ? parse_args+0xd7/0x1f0 ? do_initcall_level+0x180/0x180 do_initcall_level+0xb0/0x180 do_initcalls+0x60/0xa0 ? kernel_init+0x1f/0x1d0 do_basic_setup+0x41/0x50 kernel_init_freeable+0x1ac/0x230 ? rest_init+0x1f0/0x1f0 kernel_init+0x1f/0x1d0 ? rest_init+0x1f0/0x1f0 ret_from_fork+0x3d/0x50 ? rest_init+0x1f0/0x1f0 ret_from_fork_asm+0x11/0x20 Modules linked in: CR2: 00000000000000f0 ---[ end trace 0000000000000000 ]--- RIP: 0010:__sev_snp_shutdown_locked+0x2e/0x150 Code: 00 55 48 89 e5 41 57 41 56 41 54 53 48 83 ec 10 41 89 f7 49 89 fe 65 48 8b 04 25 28 00 00 00 48 89 45 d8 48 8b 05 6a 5a 7f 06 <4c> 8b a0 f0 00 00 00 41 0f b6 9c 24 a2 00 00 00 48 83 fb 02 0f 83 RSP: 0018:ffffb2ea4014b7b8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff9e4acd2e0a28 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb2ea4014b808 RBP: ffffb2ea4014b7e8 R08: 0000000000000106 R09: 000000000003d9c0 R10: 0000000000000001 R11: ffffffffa39ff070 R12: ffff9e49d40590c8 R13: 0000000000000000 R14: ffffb2ea4014b808 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9e58b1e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000f0 CR3: 0000000418a3e001 CR4: 0000000000770ef0 PKRU: 55555554 Kernel panic - not syncing: Fatal exception Kernel Offset: 0x1fc00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) Fixes: 1ca5614b84ee ("crypto: ccp: Add support to initialize the AMD-SP for SEV-SNP") Cc: stable@vger.kernel.org Signed-off-by: Kim Phillips Reviewed-by: Liam Merwick Reviewed-by: Mario Limonciello Reviewed-by: John Allen Reviewed-by: Tom Lendacky Signed-off-by: Herbert Xu commit 5d7612ae201ec199b46bbf81a36cb4667e29d973 Author: Akshata Jahagirdar Date: Fri Jun 14 11:24:56 2024 -0700 drm/xe/xe2lpg: Add Wa_14021490052 Add Wa_14021490052 for Xe2LPG 20.04. Signed-off-by: Akshata Jahagirdar Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240614182455.2370059-2-matthew.d.roper@intel.com commit eae7044b67a606f10d245ff2866ee04f235e1722 Author: Namhyung Kim Date: Fri Jun 7 13:29:18 2024 -0700 perf hist: Honor symbol_conf.skip_empty So that it can skip events with no sample according to the config value. This can omit the dummy event in the output of perf report --group. An example output: $ sudo perf mem record -a sleep 1 $ sudo perf report --group Before) # # Samples: 232 of events 'cpu/mem-loads,ldlat=30/P, cpu/mem-stores/P, dummy:u' # Event count (approx.): 3089861 # # Overhead Command Shared Object Symbol # ........................ ........... ................. ..................................... # 9.29% 0.00% 0.00% swapper [kernel.kallsyms] [k] update_blocked_averages 5.26% 0.15% 0.00% swapper [kernel.kallsyms] [k] __update_load_avg_se 4.15% 0.00% 0.00% perf-exec [kernel.kallsyms] [k] slab_update_freelist.isra.0 3.87% 0.00% 0.00% perf-exec [kernel.kallsyms] [k] memcg_slab_post_alloc_hook 3.79% 0.17% 0.00% swapper [kernel.kallsyms] [k] enqueue_task_fair 3.63% 0.00% 0.00% sleep [kernel.kallsyms] [k] next_uptodate_page 2.86% 0.00% 0.00% swapper [kernel.kallsyms] [k] __update_load_avg_cfs_rq 2.78% 0.00% 0.00% swapper [kernel.kallsyms] [k] __schedule 2.34% 0.00% 0.00% swapper [kernel.kallsyms] [k] intel_idle 2.32% 0.97% 0.00% swapper [kernel.kallsyms] [k] psi_group_change After) # # Samples: 232 of events 'cpu/mem-loads,ldlat=30/P, cpu/mem-stores/P' # Event count (approx.): 3089861 # # Overhead Command Shared Object Symbol # ................ ........... ................. ..................................... # 9.29% 0.00% swapper [kernel.kallsyms] [k] update_blocked_averages 5.26% 0.15% swapper [kernel.kallsyms] [k] __update_load_avg_se 4.15% 0.00% perf-exec [kernel.kallsyms] [k] slab_update_freelist.isra.0 3.87% 0.00% perf-exec [kernel.kallsyms] [k] memcg_slab_post_alloc_hook 3.79% 0.17% swapper [kernel.kallsyms] [k] enqueue_task_fair 3.63% 0.00% sleep [kernel.kallsyms] [k] next_uptodate_page 2.86% 0.00% swapper [kernel.kallsyms] [k] __update_load_avg_cfs_rq 2.78% 0.00% swapper [kernel.kallsyms] [k] __schedule 2.34% 0.00% swapper [kernel.kallsyms] [k] intel_idle 2.32% 0.97% swapper [kernel.kallsyms] [k] psi_group_change Now it doesn't have a column for the dummy event. Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607202918.2357459-5-namhyung@kernel.org commit 411ee13598ef322c1a7f4a4022a84d995873f235 Author: Namhyung Kim Date: Fri Jun 7 13:29:17 2024 -0700 perf hist: Add symbol_conf.skip_empty Add the skip_empty flag to symbol_conf and set the value from the report command to preserve the existing behavior. This makes the code simpler and will be needed other code which is hard to add a new argument. Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607202918.2357459-4-namhyung@kernel.org commit 8f6071a3dce40e6991877873699b84c4fb570ab3 Author: Namhyung Kim Date: Fri Jun 7 13:29:16 2024 -0700 perf hist: Simplify __hpp_fmt() using hpp_fmt_data The struct hpp_fmt_data is to keep the values for each group members so it doesn't need to check the event index in the group. Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607202918.2357459-3-namhyung@kernel.org commit cc2621cecd0f9e248eb12e2b512804e1a1d38cbf Author: Namhyung Kim Date: Fri Jun 7 13:29:15 2024 -0700 perf hist: Factor out __hpp__fmt_print() Split the logic to print the histogram values according to the format string. This was used in 3 different places so it's better to move out the logic into a function. Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607202918.2357459-2-namhyung@kernel.org commit 231295a186b60e779152ee88a2647a392307431a Author: Fernand Sieber Date: Fri Jun 14 09:35:17 2024 +0200 perf: sched map skips redundant lines with cpu filters perf sched map supports cpu filter. However, even with cpu filters active, any context switch currently corresponds to a separate line. As result, context switches on irrelevant cpus result to redundant lines, which makes the output particlularly difficult to read on wide architectures. Fix it by skipping printing for irrelevant CPUs. Example snippet of output before fix: *B0 1.461147 secs B0 B0 B0 *G0 1.517139 secs After fix: *B0 1.461147 secs *G0 1.517139 secs Signed-off-by: Fernand Sieber Acked-by: Namhyung Kim Reviewed-and-tested-by: Madadi Vineeth Reddy Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240614073517.94974-1-sieberf@amazon.com commit eaa3706fedc6a4142c251b2d4005d850caeabe50 Author: Damien Le Moal Date: Tue Jun 11 11:36:39 2024 +0900 dm: Remove unused macro DM_ZONE_INVALID_WP_OFST With the switch to using the zone append emulation of the block layer zone write plugging, the macro DM_ZONE_INVALID_WP_OFST is no longer used in dm-zone.c. Remove its definition. Fixes: f211268ed1f9 ("dm: Use the block layer zone append emulation") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Benjamin Marzinski Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20240611023639.89277-5-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 73a74af0c72b7cfd843cbd93e088fc5c51471a84 Author: Damien Le Moal Date: Tue Jun 11 11:36:38 2024 +0900 dm: Improve zone resource limits handling The generic stacking of limits implemented in the block layer cannot correctly handle stacking of zone resource limits (max open zones and max active zones) because these limits are for an entire device but the stacking may be for a portion of that device (e.g. a dm-linear target that does not cover an entire block device). As a result, when DM devices are created on top of zoned block devices, the DM device never has any zone resource limits advertized, which is only correct if all underlying target devices also have no zone resource limits. If at least one target device has resource limits, the user may see either performance issues (if the max open zone limit of the device is exceeded) or write I/O errors if the max active zone limit of one of the underlying target devices is exceeded. While it is very difficult to correctly and reliably stack zone resource limits in general, cases where targets are not sharing zone resources of the same device can be dealt with relatively easily. Such situation happens when a target maps all sequential zones of a zoned block device: for such mapping, other targets mapping other parts of the same zoned block device can only contain conventional zones and thus will not require any zone resource to correctly handle write operations. For a mapped device constructed with such targets, which includes mapped devices constructed with targets mapping entire zoned block devices, the zone resource limits can be reliably determined using the non-zero minimum of the zone resource limits of all targets. For mapped devices that include targets partially mapping the set of sequential write required zones of zoned block devices, instead of advertizing no zone resource limits, it is also better to set the mapped device limits to the non-zero minimum of the limits of all targets. In this case the limits for a target depend on the number of sequential zones being mapped: if this number of zone is larger than the limits, then the limits of the device apply and can be used. If on the other hand the target maps a number of zones smaller than the limits, then no limits is needed and we can assume that the target has no limits (limits set to 0). This commit improves zone resource limits handling as described above by modifying dm_set_zones_restrictions() to iterate the targets of a mapped device to evaluate the max open and max active zone limits. This relies on an internal "stacking" of the limits of the target devices combined with a direct counting of the number of sequential zones mapped by the targets. 1) For a target mapping an entire zoned block device, the limits for the target are set to the limits of the device. 2) For a target partially mapping a zoned block device, the number of mapped sequential zones is used to determine the limits: if the target maps more sequential write required zones than the device limits, then the limits of the device are used as-is. If the number of mapped sequential zones is lower than the limits, then we assume that the target has no limits (limits set to 0). As this evaluation is done for each target, the zone resource limits for the mapped device are evaluated as the non-zero minimum of the limits of all the targets. For configurations resulting in unreliable limits, i.e. a table containing a target partially mapping a zoned device, a warning message is issued. The counting of mapped sequential zones for the target is done using the new function dm_device_count_zones() which performs a report zones on the entire block device with the callback dm_device_count_zones_cb(). This count of mapped sequential zones is also used to determine if the mapped device contains only conventional zones. This allows simplifying dm_set_zones_restrictions() to not do a report zones just for this. For mapped devices mapping only conventional zones, as before, the mapped device is changed to a regular device by setting its zoned limit to false and clearing all its zone related limits. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Benjamin Marzinski Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20240611023639.89277-4-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 7f91ccd8a608dbe39b97a6e43d635378d493f77e Author: Damien Le Moal Date: Tue Jun 11 11:36:37 2024 +0900 dm: Call dm_revalidate_zones() after setting the queue limits dm_revalidate_zones() is called from dm_set_zone_restrictions() when the mapped device queue limits are not yet set. However, dm_revalidate_zones() calls blk_revalidate_disk_zones() and this function consults and modifies the mapped device queue limits. Thus, currently, blk_revalidate_disk_zones() operates on limits that are not yet initialized. Fix this by moving the call to dm_revalidate_zones() out of dm_set_zone_restrictions() and into dm_table_set_restrictions() after executing queue_limits_set(). To further cleanup dm_set_zones_restrictions(), the message about the type of zone append (native or emulated) is also moved inside dm_revalidate_zones(). Fixes: 1c0e720228ad ("dm: use queue_limits_set") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Benjamin Marzinski Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20240611023639.89277-3-dlemoal@kernel.org Signed-off-by: Jens Axboe commit e21d12c7cd5cef8a6c5367f96aaab01249216ded Author: Damien Le Moal Date: Tue Jun 11 11:36:36 2024 +0900 block: Improve checks on zone resource limits Make sure that the zone resource limits of a zoned block device are correct by checking that: (a) If the device has a max active zones limit, make sure that the max open zones limit is lower than the max active zones limit. (b) If the device has zone resource limits, check that the limits values are lower than the number of sequential zones of the device. If it is not, assume that the zoned device has no limits by setting the limits to 0. For (a), a check is added to blk_validate_zoned_limits() and an error returned if the max open zones limit exceeds the value of the max active zone limit (if there is one). For (b), given that we need the number of sequential zones of the zoned device, this check is added to disk_update_zone_resources(). This is safe to do as that function is executed with the disk queue frozen and the check executed after queue_limits_start_update() which takes the queue limits lock. Of note is that the early return in this function for zoned devices that do not use zone write plugging (e.g. DM devices using native zone append) is moved to after the new check and adjustment of the zone resource limits so that the check applies to any zoned device. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Niklas Cassel Reviewed-by: Benjamin Marzinski Link: https://lore.kernel.org/r/20240611023639.89277-2-dlemoal@kernel.org Signed-off-by: Jens Axboe commit a27f49644fb4dfd010f7c8707fa58172803684cb Author: Alexander Stein Date: Tue May 28 09:11:41 2024 +0200 arm64: dts: imx8mp: Add imx8mp-specific irqsteer compatible i.MX8MP irqsteer has power-domain support, so use a dedicated compatible. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 1232f98d27e25bb4b937de8b2605a155d26299b2 Author: Max Krummenacher Date: Mon May 27 18:03:46 2024 +0200 arm64: dts: freescale: imx8mp-verdin: don't limit i2c2 max. clock Verdin I2C2 may be used to access other I2C devices apart from serving as an HDMI DDC channel. Thus do not limit the used I2C clock frequency to 10kHz in the module specific device tree part. If an overlay configures i2c2 as DDC the overlay is also responsible to cope with an appropriate I2C clock. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo commit 85f2d113103660c2635e4b7ffb11fef15af433f1 Author: Max Krummenacher Date: Mon May 27 18:03:45 2024 +0200 arm64: dts: freescale: imx8mm-verdin: don't limit i2c2 max. clock Verdin I2C2 may be used to access other I2C devices apart from serving as an HDMI DDC channel. Thus do not limit the used I2C clock frequency to 10kHz in the module specific device tree part. If an overlay configures i2c2 as DDC the overlay is also responsible to cope with an appropriate I2C clock. Signed-off-by: Max Krummenacher Signed-off-by: Shawn Guo commit 8d97083c0b5dda658621b769add0a5392fb88dcd Author: Parthiban Nallathambi Date: Sat May 25 22:48:54 2024 +0530 arm64: dts: phygate-tauri-l: add overlays for RS232 and RS485 UART2 and UART4 can used in following combination, 2 x RS232: - UART2 and UART4 without flow control - MUX selection GPIO3_20 must be held low 1 x RS232 + 1 x RS485: - UART2 - RS232 - UART4 - RS485 - MUX selection GPIO3_20 must be held high - RE/DE for RS485 controlled with GPIO3_25 1 x RS232 with flow control: - UART2 - RS232 - MUX selection GPIO3_20 must be held low Signed-off-by: Parthiban Nallathambi Signed-off-by: Shawn Guo commit 0ce551af516a8d7361b7254ce5c742380f68284c Author: Parthiban Nallathambi Date: Sat May 25 22:48:53 2024 +0530 arm64: dts: phygate-tauri-l: enable pcie phy I210 intel ethernet controller is connected to PCIe. Enable the PHY to use the ethernet controller. Signed-off-by: Parthiban Nallathambi Signed-off-by: Shawn Guo commit c8d0930a047849cc816475b58656201e5a531adc Merge: 7fbc4f5e633cb 432e5074f805d Author: Mark Brown Date: Sat Jun 15 16:24:35 2024 +0100 ASoC: codecs: lpass: add support for v2.5 rx macro Merge series from Srinivas Kandagatla : This patchset adds support to reading codec version and also adds support for v2.5 codec version in rx macro. LPASS 2.5 and up versions have changes in some of the rx blocks which are required to get headset functional correctly. Tested this on SM8450, X13s and x1e80100 crd. This changes also fixes issue with sm8450, sm8550, sm8660 and x1e80100. commit 82c56b6dd24fcdf811f2b47b72e5585c8a79b685 Author: Richard Zhu Date: Wed May 29 14:02:45 2024 +0800 phy: freescale: imx8qm-hsio: Add i.MX8QM HSIO PHY driver support Add i.MX8QM HSIO PHY driver support. i.MX8QM HSIO has three lane PHY instances, and can be bound to the following controllers in the different use cases listed in below table. - two lanes capable PCIEA controller. - one lane PCIEB controller. - AHCI SATA controller. i.MX8QM HSIO PHYs support the following use cases. +----------------------------------------------------+ | | Lane0| Lane1| Lane2| |-------------------------------|------|------|------| | use case 1: PCIEAX2SATA | PCIEA| PCIEA| SATA | |-------------------------------|------|------|------| | use case 2: PCIEAX2PCIEB | PCIEA| PCIEA| PCIEB| |-------------------------------|------|------|------| | use case 3: PCIEAPCIEBSATA | PCIEA| PCIEB| SATA | +----------------------------------------------------+ Signed-off-by: Richard Zhu Reviewed-by: Frank Li Link: https://lore.kernel.org/r/1716962565-2084-3-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul commit 7c46101aa631843ded626b823b5a412d57371812 Author: Richard Zhu Date: Wed May 29 14:02:44 2024 +0800 dt-bindings: phy: Add i.MX8Q HSIO SerDes PHY binding Add i.MX8QM and i.MX8QXP HSIO SerDes PHY binding. Introduce one HSIO configuration 'fsl,hsio-cfg', which need be set at initialization according to board design. Signed-off-by: Richard Zhu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/1716962565-2084-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Vinod Koul commit d3ab7955330843699cdcc413edd7993923e6c016 Author: Shengyang Chen Date: Thu Apr 18 11:50:20 2024 +0800 phy: starfive: Add mipi dphy tx support Add mipi dphy tx support for the StarFive JH7110 SoC. It is a module which is used to receive data from DSI driver and transfer data to DSI interface like mipi screen. Signed-off-by: Shengyang Chen Reviewed-by: Changhuang Liang Link: https://lore.kernel.org/r/20240418035020.47876-3-shengyang.chen@starfivetech.com Signed-off-by: Vinod Koul commit e4a8e87250fc2c1ed2aec5d1e8521dc7d799ea77 Author: Shengyang Chen Date: Thu Apr 18 11:50:19 2024 +0800 dt-bindings: phy: Add starfive,jh7110-dphy-tx StarFive SoCs like the jh7110 use a MIPI D-PHY TX controller based on a M31 IP. Add a binding for it. Signed-off-by: Shengyang Chen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240418035020.47876-2-shengyang.chen@starfivetech.com Signed-off-by: Vinod Koul commit ae45f07cade1a5853ff6fd745bbd86a64cc82643 Author: Andi Shyti Date: Fri Jun 14 00:24:02 2024 +0200 drm/i915/gt/uc: Evaluate GuC priority within locks The ce->guc_state.lock was made to protect guc_prio, which indicates the GuC priority level. But at the begnning of the function we perform some sanity check of guc_prio outside its protected section. Move them within the locked region. Use this occasion to expand the if statement to make it clearer. Signed-off-by: Andi Shyti Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240613222402.551625-2-andi.shyti@linux.intel.com commit cd13368db059de22d27e86665a378aa2a388db85 Author: Herman van Hazendonk Date: Wed Apr 17 08:54:54 2024 +0200 dt-bindings: phy: qcom,usb-hs-phy: Add compatible Adds qcom,usb-hs-phy-msm8660 compatible Used by HP Touchpad (tenderloin) for example. Signed-off-by: Herman van Hazendonk Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240417065454.3599824-1-github.com@herrie.org Signed-off-by: Vinod Koul commit 7cd3e586068aca123ff244fc259ba62ba96b6d31 Author: Dmitry Baryshkov Date: Fri Jun 14 13:18:25 2024 +0300 dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: drop second output clock name There is no need to specify exact name for the second (AUX) output clock. It has never been used for the lookups based on the system clock name. Partially revert commit 72bea132f368 ("dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: document PHY AUX clock on SM8[456]50 SoCs"), returning compatibility with the existing device tree: reduce clock-output-names to always contain a single entry. Fixes: 72bea132f368 ("dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: document PHY AUX clock on SM8[456]50 SoCs") Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240614-fix-pcie-phy-compat-v3-2-730d1811acf4@linaro.org Signed-off-by: Vinod Koul commit 912cee11c14376a6f707d72fcaf343a40bff48e8 Author: Dmitry Baryshkov Date: Fri Jun 14 13:18:24 2024 +0300 phy: qcom: qmp-pcie: restore compatibility with existing DTs Existing device trees specify only a single clock-output-name for the PCIe PHYs. The function phy_aux_clk_register() expects a second entry in that property. When it doesn't find it, it returns an error, thus failing the probe of the PHY and thus breaking support for the corresponding PCIe host. Follow the approach of the combo USB+DT PHY and generate the name for the AUX clocks instead of requiring it in DT. Fixes: 583ca9ccfa80 ("phy: qcom: qmp-pcie: register second optional PHY AUX clock") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240614-fix-pcie-phy-compat-v3-1-730d1811acf4@linaro.org Signed-off-by: Vinod Koul commit 45ebbbbeaa33da4a6dbc532ebc57d20de4b60a82 Author: Andi Shyti Date: Fri Jun 14 00:28:37 2024 +0200 drm/i915/gt/uc: Fix typo in comment Replace "dynmically" with "dynamically". Signed-off-by: Andi Shyti Cc: John Harrison Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240613222837.552277-1-andi.shyti@linux.intel.com commit 15be78e0c3d5faffd69e9dfe55f20d5125b8f6ee Author: Jeff Johnson Date: Fri Jun 14 23:25:00 2024 -0700 fbdev: offb: add missing MODULE_DESCRIPTION() macro With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/offb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit 7872f905b246982296d7833fe820f4ba5862cefb Author: André Draszik Date: Tue Jun 11 17:07:59 2024 +0100 arm64: dts: exynos: gs101: reorder properties as per guidelines * 'interrupts' & 'cpus' & 'clocks' are standard/common properties as per the Devicetree Sources (DTS) Coding Style and therefore should be sorted alphabetically within the standard/common section * vendor properties should be last * reg / ranges should be 2nd/3rd (after compatible) * status should be last Do so. Note: I've left the cpus{} node untouched to keep the grouping of relatedd properties. Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20240611-gs101-dts-cleanup-v1-1-877358cd6536@linaro.org Signed-off-by: Krzysztof Kozlowski commit 91798162245991e26949ef62851719bb2177a9c2 Author: Jeff Johnson Date: Mon Jun 10 11:33:38 2024 -0700 media: v4l: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/v4l2-core/v4l2-async.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/v4l2-core/v4l2-fwnode.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 971b4eef86ccb8b107ad2875993e510eec4fdeae Author: Abdulrasaq Lawani Date: Wed Jun 12 06:51:58 2024 -0400 media: i2c: ov5647: replacing of_node_put with __free(device_node) Replace instance of of_node_put with __free(device_node) to protect against any memory leaks due to future changes in control flow. Signed-off-by: Abdulrasaq Lawani Acked-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 15765ff7147e9ca45079c1a5e37c35052d57381a Author: Benjamin Mugnier Date: Wed Jun 12 10:21:14 2024 +0200 media: i2c: vgxy61: Fix device name Rename 'st-vgxy61' to 'vgxy61', dropping the vendor prefix to follow the same naming scheme as the vast majority of device drivers. The device tree binding does not fall into binding rename exceptions and therefore must not be changed. Keep its legacy name. Signed-off-by: Benjamin Mugnier Acked-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3cdc776e0a5f1784c3ae5d3371b64215c228bf1f Author: Conor Dooley Date: Fri Jun 7 16:50:23 2024 +0100 media: i2c: imx219: fix msr access command sequence It was reported to me that the imx219 didn't work on one of our development kits partly because the access sequence is incorrect. The datasheet I could find [1] for this camera has the access sequence: Seq. No. Address (Hex) data 1 30EB 05 2 30EB 0C 3 300A FF 4 300B FF 5 30EB 05 6 30EB 09 but the driver swaps the first two elements. Laurent pointed out on IRC that the original code used the correct sequence for 1920x1080 but the current sequence for 3280x2464 and 1640x1232. During refactoring of the init sequence the current order was used for all formats. Switch to using the documented sequence. Link: https://www.opensourceinstruments.com/Electronics/Data/IMX219PQ.pdf [1] Fixes: 8508455961d5 ("media: i2c: imx219: Split common registers from mode tables") Fixes: 1283b3b8f82b ("media: i2c: Add driver for Sony IMX219 sensor") Signed-off-by: Conor Dooley Reviewed-by: Dave Stevenson Tested-by: Dave Stevenson Reviewed-by: Laurent Pinchart Tested-by: Adam Ford #imx8mp-beacon-kit Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e0b66a6e471f628d4029e317a4a5701960b83dcd Author: Hans de Goede Date: Sat Jun 8 16:38:15 2024 +0200 media: ov2680: Pass correct number of controls to v4l2_ctrl_handler_init() The ov2680 driver has 9 controls now and the call to v4l2_ctrl_new_fwnode_properties() adds 2 more. Tell v4l2_ctrl_handler_init() to pre-allocate space for 11 controls to match this. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 440de616e76e225feb1182e2ca34cc0d6f00555c Author: Hans de Goede Date: Mon Jun 10 19:34:18 2024 +0200 media: ipu-bridge: Add HIDs from out of tree IPU6 driver ipu-bridge copy The out of tree IPU6 driver comes with its own copy of the ipu-bridge code. It also comes bundled with standard v4l2 sensor drivers. Many of these have been mainlined and the rest is being mainlined but not all are upstream yet. The latest version of the out of tree code now will use the mainline kernel ipu-bridge version when build against new enough kernels. This however breaks support for (bundled) sensor drivers which do not (yet) have an entry in the mainline ipu-bridge code. Add the missing entries to the mainline ipu-bridge code to make the transition to having everything in mainline easier. The alternative HID for the OV13B10 and the OV08x40 entries both are for sensors already supported in mainline which were missing. The downside of adding these HIDs is that this will cause the IPU3 / IPU6 drivers to delay registering there /dev/video# nodes until a sensor driver has bound, which for the non mainline drivers may never happen. This is not really an issue because almost all IPU designs only have front (user) facing sensors and all the added HIDs are for the main RGB (not IR) sensor. So if the sensor driver is missing then the user can already not use the camera and adding these HIDs does not really change that. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6fca71fac4c8be8793ccbd854ea786c22f690aa2 Author: Hans de Goede Date: Mon Jun 10 19:34:17 2024 +0200 media: ipu-bridge: Sort ipu_supported_sensors[] array by ACPI HID Sort the sensors in ipu_supported_sensors[] by ACPI HID rather then having them in some random order. While at it also use the correct (same as datasheet) capitalization for the sensor names in the comments. Instead of sometimes writing OV#### and sometimes ov####. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a50a2a3242f35dd551d89a6bad17255a410ba955 Author: Tommaso Merciai Date: Mon Jun 10 10:10:34 2024 +0200 media: i2c: alvium: Move V4L2_CID_GAIN to V4L2_CID_ANALOG_GAIN Into alvium cameras REG_BCRM_GAIN_RW control the analog gain. Let's use the right V4L2_CID_ANALOGUE_GAIN ctrl. Fixes: 0a7af872915e ("media: i2c: Add support for alvium camera") Cc: stable@vger.kernel.org Signed-off-by: Tommaso Merciai Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b6167cce2b1c3bc5eae967977964dfdaef971398 Author: Tommaso Merciai Date: Mon Jun 10 10:10:33 2024 +0200 media: i2c: alvium: implement enum_frame_size Implement the enum_frame_size pad operation. The sensor supports a continuous size range of resolutions. Signed-off-by: Tommaso Merciai Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 50b631c6ecb33d45fe6919645bf19fdd3ab82f26 Author: Tommaso Merciai Date: Mon Jun 10 10:10:32 2024 +0200 media: i2c: alvium: enable acquisition frame rate Alvium camera by default is in free running mode. Datasheet say that acquisition frame rate reg can only be used if frame start trigger mode is set to off. Enable r/w acquisition frame rate and turn off trigger mode. Signed-off-by: Tommaso Merciai [Sakari Ailus: Fix spelling of "acquisition".] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6be70e7981a00412b3fa99ab3b3f13ce908c0718 Author: Tommaso Merciai Date: Mon Jun 10 10:10:31 2024 +0200 media: i2c: alvium: rename acquisition frame rate enable reg Acquisition frame rate enable reg have a very long name let's reduce this with an abbreviation. Signed-off-by: Tommaso Merciai [Sakari Ailus: Fix spelling of "acquisition".] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 44d0ed23e5028f5a46c94df5f7c1cb5f9f7afb33 Author: Tommaso Merciai Date: Mon Jun 10 10:10:30 2024 +0200 media: i2c: alvium: fix alvium_get_fw_version() Instead of reading device_fw reg as multiple regs let's read the entire 64bit reg using one i2c read and use bit masks and bit shifts to get fw info. Signed-off-by: Tommaso Merciai Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 87990652e0b94255229bf34b38158af825843859 Author: Wentong Wu Date: Fri Jun 7 21:25:47 2024 +0800 media: ivsc: csi: remove privacy status in struct mei_csi The privacy status is maintained by privacy_ctrl, on which all of the privacy status changes will go through, so there is no point in maintaining one more element any more. Reported-by: Hao Yao Signed-off-by: Wentong Wu Tested-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a813f168336ec4ef725b836e598cd9dc14f76dd7 Author: Wentong Wu Date: Fri Jun 7 21:25:45 2024 +0800 media: ivsc: csi: don't count privacy on as error Prior to the ongoing command privacy is on, it would return -1 to indicate the current privacy status, and the ongoing command would be well executed by firmware as well, so this is not error. This patch changes its behavior to notify privacy on directly by V4L2 privacy control instead of reporting error. Fixes: 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule") Cc: stable@vger.kernel.org # for 6.6 and later Reported-by: Hao Yao Signed-off-by: Wentong Wu Tested-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c6be6471004e0e4d10d0514146d8c41550823d63 Author: Wentong Wu Date: Fri Jun 7 21:25:46 2024 +0800 media: ivsc: csi: add separate lock for v4l2 control handler There're possibilities that privacy status change notification happens in the middle of the ongoing mei command which already takes the command lock, but v4l2_ctrl_s_ctrl() would also need the same lock prior to this patch, so this may results in circular locking problem. This patch adds one dedicated lock for v4l2 control handler to avoid described issue. Fixes: 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule") Cc: stable@vger.kernel.org # for 6.6 and later Reported-by: Hao Yao Signed-off-by: Wentong Wu Tested-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 461d6ee65d7cfbbf7ce1b9fdaaae041a5135f1cc Author: Ricardo Ribalda Date: Thu Jun 6 13:16:35 2024 +0000 media: dvb-frontend/mxl5xx: Refactor struct MBIN_FILE_T and MBIN_SEGMENT_T Replace the older style one-element array with a flexible array member. There does not seem to be any allocation for these structs in the code, so no more code changes are required. The following cocci warnings are fixed: drivers/media/dvb-frontends/mxl5xx_defs.h:182:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/dvb-frontends/mxl5xx_defs.h:171:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit abb7a73b687dc82202f0203a112ef435fb598aa6 Author: Ricardo Ribalda Date: Thu Jun 6 13:01:07 2024 +0000 media: c8sectpfe: Add missing parameter names clang 19 complains about the missing parameter name. Let's add it. drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-debugfs.h:19:62: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions] Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406050908.1kL1C69p-lkp@intel.com/ Fixes: e22b4973ee20 ("media: c8sectpfe: Do not depend on DEBUG_FS") Signed-off-by: Ricardo Ribalda Reviewed-by: Nathan Chancellor Signed-off-by: Hans Verkuil commit d41b69a00c1b52dcab479e5acce84443758fcca6 Author: Jeff Johnson Date: Wed Jun 12 12:47:29 2024 -0700 media: tda9887: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/tuners/tda9887.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 92b8d9bfc338150f3061cd6fca92716d3817e9a8 Author: Jeff Johnson Date: Wed Jun 12 10:32:07 2024 -0700 media: si470x: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/radio/si470x/radio-si470x-common.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 29abda17fc86bad96163f1f5d26cae42831ecf03 Author: Jeff Johnson Date: Tue Jun 11 17:14:30 2024 -0700 media: pci: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/ttpci/budget-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/bt8xx/bt878.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/ivtv/ivtvfb.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 3544c75d930a0c13bbb1721307564325327a2421 Author: Jeff Johnson Date: Mon Jun 10 13:08:36 2024 -0700 media: go7007: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/usb/go7007/go7007.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/usb/go7007/go7007-usb.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit c22010cee935a433359a9671f402792528ba21c8 Author: Jeff Johnson Date: Sun Jun 9 14:58:06 2024 -0700 media: saa7134: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/saa7134/saa7134-empress.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/saa7134/saa7134-go7007.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/saa7134/saa7134-alsa.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/pci/saa7134/saa7134-dvb.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit f2ac2f36c938fd64c6e9a269508045f798923f8f Author: Jeff Johnson Date: Sun Jun 9 14:18:55 2024 -0700 media: marvell: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/marvell/mcam-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/platform/marvell/mmp_camera.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Hans Verkuil commit 9d8683b3fd93f0e378f24dc3d9604e5d7d3e0a17 Author: Aleksandr Burakov Date: Fri Feb 16 15:40:06 2024 +0300 saa7134: Unchecked i2c_transfer function result fixed Return value of function 'i2c_transfer' is not checked that may cause undefined behaviour. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 2cf36ac44730 ("[PATCH] v4l: 656: added support for the following cards") Signed-off-by: Aleksandr Burakov Signed-off-by: Hans Verkuil commit bd036febd03cb40b56911f057e3dacabd1521014 Author: Marek Vasut Date: Thu May 23 00:22:02 2024 +0200 ARM: dts: imx: Add LVDS port data mapping on M53 Menlo Describe LVDS data mapping of the LVDS-to-DPI decoder input port. This fixes a warning reported by lvds-codec driver: " lvds-codec lvds-decoder: missing 'data-mapping' DT property " Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 044786935ec5f051c4bd1baef7831dd4bfb5ad52 Author: Frank Li Date: Mon May 20 16:41:32 2024 -0400 arm64: dts: freescale: ls1028a: Reorder sai dma-names to fix warning Reorder the SAI dma-names to ensure "rx" precedes "tx" as required to fixes the DTB_CHECK warning. arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dtb: audio-controller@f100000: dma-names:1: 'tx' was expected from schema $id: http://devicetree.org/schemas/sound/fsl,sai.yaml# arm64/boot/dts/freescale/fsl-ls1028a-rdb.dtb: audio-controller@f110000: dma-names:1: 'tx' was expected Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 2cd7b542c84e19e92f0283809e7e8617481e8c32 Author: Frank Li Date: Mon May 20 16:41:31 2024 -0400 arm64: dts: freescale: ls1028a: Remove undocumented 'fsl,ls-pcie-ep' Remove the undocumented compatible string 'fsl,ls-pcie-ep' property from the ls1028a device tree source to fix DTB_CHECK warnings. arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dtb: pcie-ep@3400000: compatible: ['fsl,ls1028a-pcie-ep', 'fsl,ls-pcie-ep'] is too long from schema $id: http://devicetree.org/schemas/pci/fsl,layerscape-pcie-ep.yaml# Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit f0504cca44f0bcc6c0699a247c38bdb9d5437542 Author: Guido Günther Date: Mon May 20 12:57:05 2024 +0200 arm64: dts: imx8mq-librem5: Don't wake up on volume key press The only key that should wake up the phone is power button press. This prevents accidental wakeup due to e.g. pressing the buttons in the pocket or backpack and is in line what userspace uses to unblank the device. Signed-off-by: Guido Günther Reviewed-by: Martin Kepplinger Signed-off-by: Shawn Guo commit c5234fcd508ac90719c69b759102ee220bb68f6e Author: Alexander Stein Date: Thu May 16 13:23:43 2024 +0200 arm64: dts: imx8mp-tqma8mpql-mba8mpxl: Remove unused ocram node This node is unused and origins from downstream kernel where it is used for the DSP. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 11af40dc13f328c76648e16b8c8a6902b35bbd8c Author: Marek Vasut Date: Tue May 14 03:06:42 2024 +0200 arm64: dts: imx8mp: Enable HDMI on i.MX8MP DHCOM PDK2 and PDK3 Enable HDMI output on i.MX8MP DHCOM PDK2 and PDK3. The I2C5 on PDK2 and I2C mux port 1 on PDK3 respectively are used in regular I2C mode instead of HDMI DDC mode to permit connection of other I2C devices on those buses. The pinctrl_hdmi node is part of the SoM DTSI already. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 331929bd9edbf2217563e441be7e5748834b62ba Author: Krzysztof Kozlowski Date: Thu May 9 12:48:38 2024 +0200 ARM: dts: imx28-tx28: drop redundant 'panel-name' property Panel timing bindings do not allow 'panel-name' and there seems to be no users of it: neither Linux kernel drivers, nor U-boot as of v2024.07-rc2. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 63da595d80499728b33eda30110cee6ab431451e Author: Krzysztof Kozlowski Date: Thu May 9 12:48:37 2024 +0200 ARM: dts: imx: drop redundant 'u-boot,panel-name' property Panel timing bindings do not allow 'u-boot,panel-name' and there seems to be no users of it: neither Linux kernel drivers, nor U-boot as of v2024.07-rc2. Reported by dtbs_check: imx6qp-tx6qp-8037.dtb: display-timings: timing-et0700: 'u-boot,panel-name' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 04ee7d2d72c399d084ca9326f4808f952d1630b7 Author: Krzysztof Kozlowski Date: Thu May 9 12:48:36 2024 +0200 ARM: dts: imx6dl-aristainetos2_4: drop redundant 'power-on-delay' property LG4573 panel bindings do not allow 'power-on-delay' property. Linux driver does not use it, either. Reported by dtbs_check: imx6dl-aristainetos2_4.dtb: display@0: Unevaluated properties are not allowed ('power-on-delay' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 069e81ea96bdff4e771df4a644fbcf4913261e9b Author: Krzysztof Kozlowski Date: Thu May 9 12:48:35 2024 +0200 ARM: dts: imx: correct choice of panel native mode Bindings and Linux driver expect native-mode to be a phandle to one of the timings node, not a boolean property. Correct the DTS to fix dtbs_check warnings like: imx53-m53evk.dtb: display-timings: timing-800x480p60: 'native-mode' does not match any of the regexes: 'pinctrl-[0-9]+' This should not have actual effect for Linux kernel (no real bug affecting choice of native-mode), because the first timing node is chosen in absence of proper native-mode property. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 245838888dbf3ebaff762e3424a18e35b681afc2 Author: Krzysztof Kozlowski Date: Thu May 9 12:48:34 2024 +0200 ARM: dts: imx: align panel timings node name with dtschema DT schema expects panel timings node to follow certain pattern, dtbs_check warnings: imx6dl-gw54xx.dtb: display-timings: 'hsd100pxn1' does not match any of the regexes: '^timing', 'pinctrl-[0-9]+' Linux drivers do not care about node name, so this should not have effect on Linux. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 521568faa8a252c12341f13b2fd6cc95e48c0503 Author: Shengjiu Wang Date: Thu May 9 13:14:58 2024 +0800 arm64: dts: imx8mp-evk: add bt-sco sound card support Add bt-sco sound card, which is used by BT HFP case. It supports wb profile as default Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit f560da940e3271166a19c17bfe8bcb45490d7767 Author: Shengjiu Wang Date: Thu May 9 13:14:57 2024 +0800 arm64: dts: imx8mp: Initialize audio PLLs from audiomix subsystem Initialize audio PLL1 as the parent clock for 8kHz series rates, audio PLL2 as the parent clock for 11kHz series rates. that PLL1 and PLL2 can together support full range of audio sample rates. Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 934c29999b57b835d65442da6f741d5e27f3b584 Author: Sagi Grimberg Date: Thu Jun 13 14:35:04 2024 +0300 net: micro-optimize skb_datagram_iter We only use the mapping in a single context in a short and contained scope, so kmap_local_page is sufficient and cheaper. This will also allow skb_datagram_iter to be called from softirq context. Signed-off-by: Sagi Grimberg Link: https://lore.kernel.org/r/20240613113504.1079860-1-sagi@grimberg.me Signed-off-by: Jakub Kicinski commit abef84957b68994abfa4e0631b483f1bae732cbd Merge: afc5625e20971 4be3dcc9bf04d Author: Jakub Kicinski Date: Fri Jun 14 19:30:41 2024 -0700 Merge branch 'mlxsw-handle-mtu-values' Petr Machata says: ==================== mlxsw: Handle MTU values Amit Cohen writes: The driver uses two values for maximum MTU, but neither is accurate. In addition, the value which is configured to hardware is not calculated correctly. Handle these issues and expose accurate values for minimum and maximum MTU per netdevice. Add test cases to check that the exposed values are really supported. Patch set overview: Patches #1-#3 set the driver to use accurate values for MTU Patch #4 aligns the driver to always use the same value for maximum MTU Patch #5 adds a test ==================== Link: https://lore.kernel.org/r/cover.1718275854.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 4be3dcc9bf04d0957235b45ba18983f1f751a3a1 Author: Amit Cohen Date: Thu Jun 13 16:07:58 2024 +0200 selftests: forwarding: Add test for minimum and maximum MTU Add cases to check minimum and maximum MTU which are exposed via "ip -d link show". Test configuration and traffic. Use VLAN devices as usually VLAN header (4 bytes) is not included in the MTU, and drivers should configure hardware correctly to send maximum MTU payload size in VLAN tagged packets. $ ./min_max_mtu.sh TEST: ping [ OK ] TEST: ping6 [ OK ] TEST: Test maximum MTU configuration [ OK ] TEST: Test traffic, packet size is maximum MTU [ OK ] TEST: Test minimum MTU configuration [ OK ] TEST: Test traffic, packet size is minimum MTU [ OK ] Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/89de8be8989db7a97f3b39e3c9da695673e78d2e.1718275854.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 3e7856545d369a6dcb3f93b21a9672b69f918650 Author: Amit Cohen Date: Thu Jun 13 16:07:57 2024 +0200 mlxsw: Use the same maximum MTU value throughout the driver Currently, the driver uses two different values for maximum MTU, one is stored in mlxsw_port->dev->max_mtu and the second is stored in mlxsw_port->max_mtu. The second one is set to value which is queried from firmware. This value was never tested, and unfortunately is not really supported. That means that with the existing code, user can set MTU to X, which is not really supported by firmware and which is bigger than buffer size which is allocated in pci. To make the driver consistent, use only mlxsw_port->dev->max_mtu for maximum MTU value, for buffers headroom add Ethernet frame headers, which are not included in mlxsw_port->dev->max_mtu. Remove mlxsw_port->max_mtu. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/89fa6f804386b918d337e736e14ac291bb947483.1718275854.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 753aacfc032d3c20083cf7944d393aca08606feb Author: Amit Cohen Date: Thu Jun 13 16:07:56 2024 +0200 mlxsw: spectrum: Set more accurate values for netdevice min/max MTU Currently, the driver uses ETH_MAX_MTU as maximum MTU of netdevices, instead, use the accurate value which is supported by the driver. Subtract Ethernet headers which are taken into account by hardware for MTU checking, as described in the previous patch. Set minimum MTU to ETH_MIN_MTU, as zero MTU is not really supported. With this change: a. The stack will do the MTU checking, so we can remove it from the driver. b. User space will be able to query the actual MTU limits. Before this patch: $ ip -j -d link show dev swp1 | jq | grep mtu "mtu": 1500, "min_mtu": 0, "max_mtu": 65535, With this patch: $ ip -j -d link show dev swp1 | jq | grep mtu "mtu": 1500, "min_mtu": 68, "max_mtu": 10218, Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/be8232e38c196ecb607f82c5e000ea427ce22abb.1718275854.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit d361536fc2dfd22e65a84f4f2a13b2b8f4f0739b Author: Amit Cohen Date: Thu Jun 13 16:07:55 2024 +0200 mlxsw: Adjust MTU value to hardware check Ethernet frame consists of - Ethernet header, payload, FCS. The MTU value which is used by user is the size of the payload, which means that when user sets MTU to X, the total frame size will be larger due to the addition of the Ethernet header and FCS. Spectrum ASICs take into account Ethernet header and FCS as part of packet size for MTU check. Adjust MTU value when user sets MTU, to configure the MTU size which is required by hardware. The Tx header length which was used by the driver is not relevant for such calculation, take into account Ethernet header (with VLAN extension) and FCS. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/f3203c2477bb8ed18b1e79642fa3e3713e1e55bb.1718275854.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit cae7fd47dfe15e54710e3e550340876382a6db19 Author: Amit Cohen Date: Thu Jun 13 16:07:54 2024 +0200 mlxsw: port: Edit maximum MTU value Currently mlxsw driver supports up to 10000 bytes for maximum MTU, this value is not accurate, we can support up to 10K bytes. Change the value to the maximum supported MTU by firmware. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/666f51681234aeef09d771833ccb6e94bd323c88.1718275854.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit afc5625e20971e8294a35b2f284a91b0601f9fce Author: Dan Carpenter Date: Thu Jun 13 21:21:42 2024 +0300 atm: clean up a put_user() calls Unlike copy_from_user(), put_user() and get_user() return -EFAULT on error. Use the error code directly instead of setting it. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/04a018e8-7433-4f67-8ddd-9357a0114f87@moroto.mountain Signed-off-by: Jakub Kicinski commit 6a21fb7a9e7af49e4c2fbea71fcadf600798c9f0 Merge: ad46951bfb798 93f84152e4aed Author: Jakub Kicinski Date: Fri Jun 14 19:06:42 2024 -0700 Merge branch 'net-stmmac-provide-platform-select_pcs-method' Russell King says: ==================== net: stmmac: provide platform select_pcs method This series adds a select_pcs() method to the stmmac platform data to allow platforms that need to provide their own PCSes to do so, moving the decision making into platform code. This avoids questions such as "what should the priority of XPCS vs some other platform PCS be?" and when we provide a PCS for the internal PCS, how that interacts with both the XPCS and platform provided PCS. Note that if a platform implements the select_pcs() method, then the return values are: - a phylink_pcs pointer - the PCS to be used. - NULL - no phylink_pcs to be used. Otherwise (if not implemented or returns an error-pointer), then allow the the stmmac internal PCS to be used if appropriate (once that patch set is merged.) Patch 1 introduces the new method. Patch 2 converts Intel mGBE to use this to provide the XPCS and removes the XPCS decision making from core code. Patch 3 provides an implementation for rzn1 to return its PCS. Patch 4 does the same for socfpga. Patch 5 removes the core code returning priv->hw->phylink_pcs. No functional change is anticipated. Once this has been merged, it will be expected that platforms should populate all three PCS methods or none of the PCS methods. ==================== Link: https://lore.kernel.org/r/ZmrLbdwv6ALoy+gs@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 93f84152e4aed84a246767f13da06f4a907328ef Author: Russell King (Oracle) Date: Thu Jun 13 11:36:27 2024 +0100 net: stmmac: clean up stmmac_mac_select_pcs() Since all platform providers of PCS now populate the select_pcs() method, there is no need for the common code to look at priv->hw->phylink_pcs, so remove it. Reviewed-by: Romain Gantois Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1sHhoh-00FetT-3S@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 98a6d9f192d32148a8b3ae4c8734fffb10bf0fb0 Author: Russell King (Oracle) Date: Thu Jun 13 11:36:21 2024 +0100 net: stmmac: dwmac-socfpga: provide select_pcs() implementation Provide a .select_pcs() implementation which returns the phylink PCS that was created in the .pcs_init() method. Reviewed-by: Romain Gantois Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1sHhob-00FetN-Vp@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 804c9866e0783bbdd43f35e3bda03eea212a7321 Author: Russell King (Oracle) Date: Thu Jun 13 11:36:16 2024 +0100 net: stmmac: dwmac-rzn1: provide select_pcs() implementation Provide a .select_pcs() implementation which returns the phylink PCS that was created in the .pcs_init() method. Tested-by: Romain Gantois Reviewed-by: Romain Gantois Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1sHhoW-00FetH-GD@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 135553da844c427639785af605517375c7bbc0c4 Author: Russell King (Oracle) Date: Thu Jun 13 11:36:11 2024 +0100 net: stmmac: dwmac-intel: provide a select_pcs() implementation Move the code returning the XPCS into dwmac-intel, which is the only user of XPCS. Fill in the select_pcs() implementation only when we are going to setup the XPCS, thus when it should be present. Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1sHhoR-00FetB-CP@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 6c3282a6b296385bee2c383442c39f507b0d51dd Author: Russell King (Oracle) Date: Thu Jun 13 11:36:06 2024 +0100 net: stmmac: add select_pcs() platform method Allow platform drivers to provide their logic to select an appropriate PCS. Tested-by: Romain Gantois Reviewed-by: Romain Gantois Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1sHhoM-00Fesu-8E@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit ad46951bfb798093842fdcaff37892429da03c8b Merge: 9e42a2ea7f670 296eaab825060 Author: Jakub Kicinski Date: Fri Jun 14 18:53:26 2024 -0700 Merge branch 'mlx5-misc-patches-2023-06-13' Tariq Toukan says: ==================== mlx5 misc patches 2023-06-13 This patchset contains small code cleanups and enhancements from the team to the mlx5 core and Eth drivers. Series generated against: commit 3ec8d7572a69 ("CDC-NCM: add support for Apple's private interface") ==================== Link: https://lore.kernel.org/r/20240613210036.1125203-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 296eaab825060d0f25e89b2f85ab9fc26128cea8 Author: Rahul Rameshbabu Date: Fri Jun 14 00:00:36 2024 +0300 net/mlx5e: Support SWP-mode offload L4 csum calculation Calculate the pseudo-header checksum for both IPSec transport mode and IPSec tunnel mode for mlx5 devices that do not implement a pure hardware checksum offload for L4 checksum calculation. Introduce a capability bit that identifies such mlx5 devices. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240613210036.1125203-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit fac15a72b8e5c2baea5346fe56403f3dcf12755e Author: Gal Pressman Date: Fri Jun 14 00:00:35 2024 +0300 net/mlx5e: Use tcp_v[46]_check checksum helpers Use the tcp specific helpers to calculate the tcp pseudo header checksum instead of the csum_*_magic ones. Signed-off-by: Gal Pressman Reviewed-by: Rahul Rameshbabu Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240613210036.1125203-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit a9dbb4ac58c02cdc2e2c7aa505699721fc426947 Author: Gal Pressman Date: Fri Jun 14 00:00:34 2024 +0300 net/mlx5e: Fix outdated comment in features check The code no longer treats only UDP tunnels, adjust the outdated comment. Signed-off-by: Gal Pressman Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240613210036.1125203-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit f070d422bab90b4554992e9d935764ce165dc101 Author: Moshe Shemesh Date: Fri Jun 14 00:00:33 2024 +0300 net/mlx5: Replace strcpy with strscpy Replace deprecated strcpy with strscpy. Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240613210036.1125203-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 49d37d05f216ce026ebd297b76a2db5bff7a4b4d Author: Chris Mi Date: Fri Jun 14 00:00:32 2024 +0300 net/mlx5: CT: Separate CT and CT-NAT tuple entries Currently a ct entry is stored in both ct and ct-nat tables. ct action is directed to the ct table, while ct nat action is directed to the nat table. ct-nat entries perform the nat header rewrites, if required. The current design assures that a ct action will match in hardware even if the tuple has nat configured, it will just not execute it. However, storing each connection in two tables increases the system's memory consumption while reducing its insertion rate. Offload a connection to either ct or the ct-nat table. Add a miss fall-through rule from ct-nat table to the ct table allowing ct(nat) action on non-natted connections. ct action on natted connections, by default, will be handled by the software miss path. Signed-off-by: Paul Blakey Signed-off-by: Chris Mi Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240613210036.1125203-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit e575d3a6dd22123888defb622b1742aa2d45b942 Author: Cosmin Ratiu Date: Fri Jun 14 00:00:31 2024 +0300 net/mlx5: Correct TASR typo into TSAR TSAR is the correct spelling (Transmit Scheduling ARbiter). Signed-off-by: Cosmin Ratiu Reviewed-by: Gal Pressman Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240613210036.1125203-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 9e42a2ea7f6703e2092c39171c2bf1fd7eec0bd3 Author: Chris Packham Date: Tue Jun 11 17:34:14 2024 +1200 net: phy: realtek: add support for rtl8224 2.5Gbps PHY The Realtek RTL8224 PHY is a 2.5Gbps capable PHY. It only uses the clause 45 MDIO interface and can leverage the support that has already been added for the other 822x PHYs. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20240611053415.2111723-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit cf6219ee889fb304cf8192c707ad280d93baafc7 Author: Kees Cook Date: Wed Jun 12 12:59:19 2024 -0700 usercopy: Convert test_user_copy to KUnit test Convert the runtime tests of hardened usercopy to standard KUnit tests. Additionally disable usercopy_test_invalid() for systems with separate address spaces (or no MMU) since it's not sensible to test for address confusion there (e.g. m68k). Co-developed-by: Vitor Massaru Iha Signed-off-by: Vitor Massaru Iha Link: https://lore.kernel.org/r/20200721174654.72132-1-vitor@massaru.org Tested-by: Ivan Orlov Reviewed-by: David Gow Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 51104c19d8570eb23208e08eac0e9ae09ced1c15 Author: Kees Cook Date: Wed Jun 12 12:59:18 2024 -0700 kunit: test: Add vm_mmap() allocation resource manager For tests that need to allocate using vm_mmap() (e.g. usercopy and execve), provide the interface to have the allocation tracked by KUnit itself. This requires bringing up a placeholder userspace mm. This combines my earlier attempt at this with Mark Rutland's version[1]. Normally alloc_mm() and arch_pick_mmap_layout() aren't exported for modules, so export these only for KUnit testing. Link: https://lore.kernel.org/lkml/20230321122514.1743889-2-mark.rutland@arm.com/ [1] Co-developed-by: Mark Rutland Signed-off-by: Mark Rutland Reviewed-by: David Gow Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 72421f35540c3e8830be8897ef1b99d2b7aa0981 Author: Jakub Kicinski Date: Wed Jun 12 17:32:22 2024 -0700 eth: lan966x: don't clear unsupported stats Commit 12c2d0a5b8e2 ("net: lan966x: add ethtool configuration and statistics") added support for various standard stats. We should not clear the stats which are not collected by the device. Core code uses a special initializer to detect when device does not report given stat. Acked-by: Horatiu Vultur Link: https://lore.kernel.org/r/20240613003222.3327368-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5e3b7009f116f684ac6b93d8924506154f3b1f6d Author: Andreas Hindborg Date: Sat Jun 15 01:53:50 2024 +0200 rust: block: do not use removed queue limit API The Rust block layer API was using the old queue limit API, which was just removed. Use the new API instead. Reported-by: Boqun Feng Fixes: 3253aba3408a ("rust: block: introduce `kernel::block::mq` module") Signed-off-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240614235350.621121-1-nmi@metaspace.dk Signed-off-by: Jens Axboe commit 0d2ca8fd2878582e01e933c8d6110860b921c1e6 Author: Michal Wajdeczko Date: Thu Jun 13 17:34:24 2024 +0200 drm/xe/uc: Fix and start using xe_uc_fw_sanitize() Helper xe_uc_fw_sanitize() was defined but never used. First fix it by properly exiting also from the LOAD_FAIL state, then use it in GuC and HuC sanitize code. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240613153424.2120-1-michal.wajdeczko@intel.com commit 97fedf015cd908bf4d200b7e510bb6dd93150206 Author: Michal Wajdeczko Date: Fri Jun 14 12:14:15 2024 +0200 drm/xe: Use fixed CCS mode when running in SR-IOV mode We don't support changing CCS mode when running in SR-IOV mode yet. When running as a PF driver just apply default ccs_mode=1 that VF drivers will assume as already applied and fixed. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240614101415.2208-1-michal.wajdeczko@intel.com commit de8390b101b2b37cdbab5bc91a47f69c2b1df6b0 Author: Francois Dugast Date: Fri Jun 14 11:44:33 2024 +0200 drm/xe/sched_job: Promote xe_sched_job_add_deps() Move it out of the xe_migrate compilation unit so it can be re-used in other places. Cc: Matthew Brost Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240614094433.775866-1-francois.dugast@intel.com Signed-off-by: Rodrigo Vivi commit 42fb33dde42b826d5505ec8d391ec473932d1694 Author: Sebastian Ene Date: Thu Jun 13 13:20:35 2024 +0000 KVM: arm64: Use FF-A 1.1 with pKVM Now that the layout of the structures is compatible with 1.1 it is time to probe the 1.1 version of the FF-A protocol inside the hypervisor. If the TEE doesn't support it, it should return the minimum supported version. Signed-off-by: Sebastian Ene Reviewed-by: Sudeep Holla Tested-by: Sudeep Holla Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20240613132035.1070360-5-sebastianene@google.com Signed-off-by: Oliver Upton commit 0dd60c4632a1f517e384c318c7b33f4b3915c0a7 Author: Sebastian Ene Date: Thu Jun 13 13:20:34 2024 +0000 KVM: arm64: Update the identification range for the FF-A smcs The FF-A spec 1.2 reserves the following ranges for identifying FF-A calls: 0x84000060-0x840000FF: FF-A 32-bit calls 0xC4000060-0xC40000FF: FF-A 64-bit calls. Use the range identification according to the spec and allow calls that are currently out of the range(eg. FFA_MSG_SEND_DIRECT_REQ2) to be identified correctly. Acked-by: Will Deacon Signed-off-by: Sebastian Ene Reviewed-by: Sudeep Holla Tested-by: Sudeep Holla Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20240613132035.1070360-4-sebastianene@google.com Signed-off-by: Oliver Upton commit 894376385a2d80a96816449e4991587a9a5ef0dd Author: Sebastian Ene Date: Thu Jun 13 13:20:33 2024 +0000 KVM: arm64: Add support for FFA_PARTITION_INFO_GET Handle the FFA_PARTITION_INFO_GET host call inside the pKVM hypervisor and copy the response message back to the host buffers. Signed-off-by: Sebastian Ene Reviewed-by: Sudeep Holla Tested-by: Sudeep Holla Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20240613132035.1070360-3-sebastianene@google.com Signed-off-by: Oliver Upton commit c9c012625e12699a4c6c4d4cdd17cbe600e01cd2 Author: Sebastian Ene Date: Thu Jun 13 13:20:32 2024 +0000 KVM: arm64: Trap FFA_VERSION host call in pKVM The pKVM hypervisor initializes with FF-A version 1.0. The spec requires that no other FF-A calls to be issued before the version negotiation phase is complete. Split the hypervisor proxy initialization code in two parts so that we can move the later one after the host negotiates its version. Without trapping the call, the host drivers can negotiate a higher version number with TEE which can result in a different memory layout described during the memory sharing calls. Signed-off-by: Sebastian Ene Reviewed-by: Sudeep Holla Tested-by: Sudeep Holla Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20240613132035.1070360-2-sebastianene@google.com Signed-off-by: Oliver Upton commit eb9d53d4a949c6d6d7c9f130e537f6b5687fedf9 Author: Marc Zyngier Date: Fri Jun 14 13:58:58 2024 +0100 KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity The Fine Grained Trap extension is pretty messy as it doesn't consistently use the same polarity for all trap bits. A bunch of them, added later in the life of the architecture, have a *negative* priority. So if these bits are disabled, they must be RES1 and not RES0. But that's not what the code implements, making the traps for these negative trap bits being always on instead of disabled. Fix the relevant bits, and stick a brown paper bag on my head for the rest of the day... Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240614125858.78361-1-maz@kernel.org Signed-off-by: Oliver Upton commit c4d31653c03b90e51515b1380115d1aedad925dd Author: Alex Hung Date: Mon Jun 3 10:47:37 2024 -0600 drm/amd/display: Skip wbscl_set_scaler_filter if filter is null Callers can pass null in filter (i.e. from returned from the function wbscl_get_filter_coeffs_16p) and a null check is added to ensure that is not the case. This fixes 4 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 8b0ddf19cca2a352b2a7e01d99d3ba949a99c84c Author: Alex Hung Date: Mon Jun 3 08:24:13 2024 -0600 drm/amd/display: Check BIOS images before it is used BIOS images may fail to load and null checks are added before they are used. This fixes 6 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 8092aa3ab8f7b737a34b71f91492c676a843043a Author: Alex Hung Date: Tue Jun 4 16:33:18 2024 -0600 drm/amd/display: Add null checker before passing variables Checks null pointer before passing variables to functions. This fixes 3 NULL_RETURNS issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 143818fae047fdda55d06651e4d7ab9dc7afe669 Author: Alex Hung Date: Wed Jun 5 12:37:18 2024 -0600 drm/amd/display: Explicitly extend unsigned 16 bit to 64 bit Coverity reports sign extention defects as below: Suspicious implicit sign extension: mode->htotal with type u16 ... to int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If mode->htotal * mode->vtotal is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. Cast it to unsigned long to avoid possible overflow. This fixes 4 SIGN_EXTENSION issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Hamza Mahfooz Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 0057b36ac2be0f573048acda52e641e0502a9ff3 Author: Sung Joon Kim Date: Mon Jun 3 10:57:24 2024 -0400 drm/amd/display: Send message to notify the DPIA host router bandwidth [why] Tell the system about the current host router bandwidth to be used to measure and calculate the right voltage to be used. [how] Send SMU message of each DPIA host router bandwidth. Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Sung Joon Kim Signed-off-by: Alex Deucher commit a157dcc521dcb8eb0acb50d66d1b0fc5efcea789 Author: Dillon Varone Date: Tue Jun 4 15:34:36 2024 -0400 drm/amd/display: Add null check to dml21_find_dc_pipes_for_plane When a phantom stream is in the process of being deconstructed, there could be pipes with no associated planes. In that case, ignore the phantom stream entirely when searching for associated pipes. Cc: stable@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 37256027b45fe48d1cd23954db90d1c53401e29a Author: Michael Strauss Date: Tue May 7 12:03:15 2024 -0400 drm/amd/display: Attempt to avoid empty TUs when endpoint is DPIA [WHY] Empty SST TUs are illegal to transmit over a USB4 DP tunnel. Current policy is to configure stream encoder to pack 2 pixels per pclk even when ODM combine is not in use, allowing seamless dynamic ODM reconfiguration. However, in extreme edge cases where average pixel count per TU is less than 2, this can lead to unexpected empty TU generation during compliance testing. For example, VIC 1 with a 1xHBR3 link configuration will average 1.98 pix/TU. [HOW] Calculate average pixel count per TU, and block 2 pixels per clock if endpoint is a DPIA tunnel and pixel clock is low enough that we will never require 2:1 ODM combine. Cc: stable@vger.kernel.org # 6.6+ Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Michael Strauss Signed-off-by: Alex Deucher commit 2d62bb450ed1846ffdaff7072347e40fb4908cb2 Author: Mounika Adhuri Date: Wed Jun 5 16:08:24 2024 +0530 drm/amd/display: Refactor DCN3X into component folder [why] Move DCN3X files to unique component folder. [how] Create respective component folder in dc, move the DCN3X files into corresponding new folders and made appropriate changes for compilation in Makefiles. Reviewed-by: Martin Leung Acked-by: Hamza Mahfooz Signed-off-by: Mounika Adhuri Signed-off-by: Alex Deucher commit 3838c6736524c903a95cd1d46fcbbcb6cae8e42f Author: Chris Park Date: Tue Jun 4 14:25:14 2024 -0400 drm/amd/display: On clock init, maintain DISPCLK freq [Why] On init if a display is connected, we need to maintain the DISPCLK frequency Even though DPG_EN=1, the display still requires the correct timing or it could cause audio corruption (if DISPCLK freq is reduced). [How] Read the current DISPCLK freq and request the same value to ensure the timing is valid and unchanged. Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Chris Park Signed-off-by: Alex Deucher commit 3a69c1702fdff79f631525ac6dc4487de050865a Author: Wenjing Liu Date: Mon May 27 10:30:45 2024 -0400 drm/amd/display: fix minor coding errors where dml21 phase 5 uses wrong variables There is a coding error which causes incorrect variables to be assigned in DML21 phase 5. Reviewed-by: Dillon Varone Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 2094401053dfbf7e8f74430c6c6ce666bce1d805 Author: Ivan Lipski Date: Tue Jun 4 10:28:05 2024 -0400 drm/amd/display: Remove redundant condition in VBA 314 func [WHY] Coverity analysis this conditional code as DEADCODE. The conditional statement is never true since 'MacroTileSizeBytes' is either 256 or 65536. Thus, the code inside is the conditional statement is never reached. [HOW] Removed the conditional statement. Reviewed-by: Aurabindo Pillai Reviewed-by: Alex Hung Acked-by: Hamza Mahfooz Signed-off-by: Ivan Lipski Signed-off-by: Alex Deucher commit 9061707976c68899cf2f3b9117c5bbcee8e6872c Author: Ivan Lipski Date: Tue Jun 4 10:22:31 2024 -0400 drm/amd/display: Remove redundant condition with DEADCODE [WHY] Coverity analysis flagged this condition as DEADCODE since the variable 'req128_c' is always false, thus the condition is never true. [HOW] Remove the condition. Reviewed-by: Aurabindo Pillai Acked-by: Hamza Mahfooz Signed-off-by: Ivan Lipski Signed-off-by: Alex Deucher commit 6b6d38c5086f9c401f4444485a72a931356314e5 Author: Joshua Aberback Date: Tue Jun 4 11:19:09 2024 -0400 Revert "drm/amd/display: workaround for oled eDP not lighting up on DCN401" This reverts commit e902dd7f3e3b93a401e1d3c0322cce933e75e809. A proper fix for this issue has been implemented in DMUB FW. So, no need to keep the workaround. Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Joshua Aberback Signed-off-by: Alex Deucher commit 8867ae8cfab44189bbbbbaaff0465ec6e0f616aa Author: Relja Vojvodic Date: Tue Jun 4 09:23:15 2024 -0400 drm/amd/display: Add dcn401 DIG fifo enable/disable [Why] Found while hotplugging MST daisy chain displays. Changing dispclk during this sequence caused SMU hang due to DIG fifo not being disabled correctly (caused by missing functions). [How] Adding disable/enable DIG fifo functions for dcn401 Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Relja Vojvodic Signed-off-by: Alex Deucher commit 6184bd5750a80d3d8f2ce2227465d889d9c0708b Author: Dillon Varone Date: Mon Jun 3 17:39:52 2024 -0400 drm/amd/display: Enable DCN401 idle optimizations by default [WHY&HOW] Re-enable idle optimizations by default. Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 52971387a05aa012eb73db78f39ae6c6dd47e080 Author: Joshua Aberback Date: Thu May 30 16:38:18 2024 -0400 drm/amd/display: DCN401 full power down in HW init if any link enabled [Why] During HW init, certain operations the driver performs are invalid on enabled hardware in an unknown state (for example, setting all clock values to minimum when the GPU is actively driving a display). There is already code present to call HWSS->power_down during init when any link is enabled in HW, but that function pointer is unpopulated for most asics. We want to enable this codepath for DCN401, as it resolves the issue with being unable to drive certain display configs on adapter re-enable, and we can restore boot optimizations. [How] - add power_down HWSS function for DCN401 - remove debug bit to disable boot optimizations for DCN401 Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Joshua Aberback Signed-off-by: Alex Deucher commit 3a3be8bb97e14339af7a11b3ee822e268960ead6 Author: Yang Wang Date: Fri May 31 14:15:03 2024 +0800 drm/amdgpu: refine gfx8 firmware loading refine gfx8 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9d308e32a98f79a3d914d2baa6de628640600781 Author: Tao Zhou Date: Thu Jun 13 17:15:17 2024 +0800 drm/amdkfd: add ASIC version check for the reset selection of RAS poison GFX v9.4.3 uses mode1 reset, other ASICs choose mode2. Signed-off-by: Tao Zhou Acked-by: Lijo Lazar Signed-off-by: Alex Deucher commit 4280f60e8e7caa5160135223e486545893bc9013 Author: Tao Zhou Date: Thu Jun 13 14:54:11 2024 +0800 drm/amdkfd: use mode1 reset for RAS poison consumption Per firmware's requirement, replace mode2 with mode1. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b8a01690438c949855fe0277f39794bba187b186 Author: Tao Zhou Date: Thu Jun 6 11:30:16 2024 +0800 drm/amd/pm: update check condition for SMU mode1 reset The fed status does indicate RAS fatal error. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 09a3d8202df1e9fa1eb5f5f63524c8948275ff4c Author: Tao Zhou Date: Thu Jun 6 11:20:57 2024 +0800 drm/amdgpu: set RAS fed status for more cases Indicate fatal error for each RAS block and NBIO. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7e4371676e5e58739ffc884b1b5d6bbf1cce3d17 Author: Tao Zhou Date: Wed May 29 15:39:41 2024 +0800 drm/amdgpu: create amdgpu_ras_in_recovery to simplify code Reduce redundant code and user doesn't need to pay attention to RAS details. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5f7697bbc1a41d4799797204137be85121063f65 Author: Tao Zhou Date: Thu May 23 17:58:47 2024 +0800 drm/amdgpu: trigger mode1 reset for RAS RMA status Check RMA status in bad page retirement flow. v2: fix coding bugs in v1. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5afbbcfe3b6cd00fa52e0375e1e276748929bc50 Author: Daniel Miess Date: Mon Jun 3 09:55:03 2024 -0400 drm/amd/display: Disable PHYSYMCLK RCO [Why] PHYSYMCLK RCO has been found to lead to crashes in some corner cases [How] Disable PHYSYMCLK RCO debug bit Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit be5de1c4ee9ac0dbe3e096e86502521874b40932 Author: Anthony Koo Date: Sat Jun 1 14:57:39 2024 -0400 drm/amd/display: [FW Promotion] Release 0.0.221.0 - Create a general command and fix Replay desync error with general cmd Acked-by: Zaeem Mohamed Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 02c316e696104c50534b8844a1dd9eb281f307bf Author: Aric Cyr Date: Sun Jun 2 21:53:29 2024 -0400 drm/amd/display: 3.2.288 * FW Release 0.0.221.0 * Fixed missing targets in FAMS2 * Populate hardware_release hook for dcn401 * Disable DMCUB timeout for DCN35 * Move PRIMARY plane zpos higher * Introduce overlay cursor mode * Change dram_clock_latency for dcn35 and dcn351 * DCN401 cursor code update Acked-by: Zaeem Mohamed Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ea9b3dbc71d91e135181274487d6fcba1ba4d9e7 Author: Dillon Varone Date: Fri May 31 18:09:48 2024 -0400 drm/amd/display: Update idle hardmins if uclk or fclk requirement changed [WHY&HOW] Update the idle hardmin with SMU if either clock changed. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d6b54900c564e35989cf6813e4071504fa0a90e0 Author: Alex Hung Date: Fri May 31 11:51:26 2024 -0600 drm/amd/display: Avoid overflow from uint32_t to uint8_t [WHAT & HOW] dmub_rb_cmd's ramping_boundary has size of uint8_t and it is assigned 0xFFFF. Fix it by changing it to uint8_t with value of 0xFF. This fixes 2 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cc2b7387c132ebd51c7c5252cfcb494ac75ebf18 Author: Dillon Varone Date: Thu May 30 22:10:25 2024 -0400 drm/amd/display: Do not override dml2.1 reinit [WHY&HOW] Reinit should return after completing version 2.1 reinit instead of calling version 2 reinit after. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ee4deffda66a0f62791c5456d83a95855b2b140e Author: Dillon Varone Date: Mon May 27 09:18:58 2024 -0400 drm/amd/display: Fix missed targets in FAMS2+HWFQ [WHY&HOW] Add additional delay factor when considering a safe time to flip for HWFQ to be passed in by the driver. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a144eb40ef88ff05a3e718887112955ac4889b61 Author: Dillon Varone Date: Mon May 27 09:17:04 2024 -0400 drm/amd/display: Add null check for phantom pipes in prepare mcache [WHY&HOW] Sometimes this function is called with a partially deconstructed phantom stream toplolgy, and should ignore phantoms with no plane state. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7e8af88cbd169e18edbdcfbf07ba62ea607664a5 Author: Dillon Varone Date: Fri May 31 14:09:45 2024 -0400 drm/amd/display: Block SubVP if hardware rotation is used in DML2.1 [WHY&HOW] SubVP is not supported when hardware rotation is in use. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1608e201df49127376d9fff1284b8b3c5e018440 Author: Alex Hung Date: Wed May 29 18:05:20 2024 -0600 drm/amd/display: Explicitly cast v_total to signed in a subtraction [WHY & HOW] v_total is an uint32_t and subtracting an unsigned to a signed will result in an unsigned which is always >= 0. As a result, the ternary conditions are always true and thus has no effect. This is fixed by casting v_total to signed explicitly. This also avoids v_total subtraction to overflow. This fixes 1 NO_EFFECT, 2 DEADCODE and 2 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2037646406ad0be7a89687a0333b7b40f50f9b33 Author: Alex Hung Date: Thu May 30 12:05:48 2024 -0600 drm/amd/display: Remove NO_EFFECT self-assignment [WHAT & HOW] The self-assignments have no effects and thus are removed. Reviewed-by: Rodrigo Siqueira Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fe6f61d4729780269b2a454fdd5b5e038f0db0e4 Author: Ivan Lipski Date: Wed May 29 13:47:53 2024 -0400 drm/amd/display: Remove reduntant comparisons by Coverity [WHY] Coverity analysis of the Upstream display driver code (amd-staging-drm-next) flagged these three functions as containing 'CONSTANT_EXPRESSION_RESULT' errors, i. e. the conditionals are reduntant since their result is predetermined. fixpt31_32.c: The two flagged 'ASSERT' lines redundant since they are always true: - LONG_MAX equals to the largest 'signed long long' number - res.value is type 'signed long long', So, the condition inside the 'ASSERTS's is always link_dp_training.c: The flagged conditional statement is always false: - 'max_requested.FFE_PRESET.settings.level' is 4 bits, so its max possible value is 15 - 'DP_FFE_PRESET_MAX_LEVEL' equals to 15. So, the conditional statement is always false and the wrapped code never executes. [HOW] Removed lines flagged by Coverity analysis. Reviewed-by: Sun peng Li Acked-by: Zaeem Mohamed Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 989947e90563eee58f37fbbad8a5bb94a3d8af8c Author: Alvin Lee Date: Fri May 31 10:36:11 2024 -0400 drm/amd/display: populate hardware_release hook for dcn401 [Description] hardare_release() is called when driver is removed. Add the missing hook for DCN401 Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e27ffc2fe8f41ef37c256a145292bc52ed304d9d Author: Wenjing Liu Date: Thu May 30 17:13:02 2024 -0400 drm/amd/display: make ODM segment width of YCbCr422 two pixel aligned [why] In YCbCr422 format hardware shares 1 set of chromas CbCr with 2 sets of lumas Y. Therefore each ODM segment needs to be two pixel aligned. The commit adds this missing hardwware requirement into ODM segment width decision logic. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4316107bd083feeaa3b7af71d32be9dc4b2e0fc9 Author: JinZe.Xu Date: Thu May 30 18:32:33 2024 +0800 drm/amd/display: Disable IPS when it is not allowed. [Why&How] Add flag to disable IPS when it is not allowed. Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: JinZe.Xu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a2919b25778b7479e477cf49af8c680017eafc24 Author: Sung-huai Wang Date: Fri May 31 15:43:44 2024 +0800 Revert "drm/amd/display: Handle HPD_IRQ for internal link" [How&Why] This reverts commit 239b31bd5c3fef3698440bf6436b2068c6bb08a3. Due to the it effects Replay resync. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Sung-huai Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 82c94233e5c8f7609e244267797e1e2183c2c4c0 Author: Alex Hung Date: Wed May 29 17:50:44 2024 -0600 drm/amd/display: Remove useless comparison of unsigned int vs. 0 [WHY & HOW] The comparisons of unsigned int with 0 can have no meanings, i.e. unsigned int >= 0 (always true) or unsigned int < 0 (always false), and therefore they are removed. This fixes 12 NO_EFFECT issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 97dc6a480c8189d1f130fcd026391cef5f7d8b34 Author: Alex Hung Date: Wed May 29 13:55:59 2024 -0600 drm/amd/display: Fix uninitialized variables in dcn401 This fixes an UNINIT issue reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d281b7742662e199fbba57fbd86c6c2bdd73104a Author: Alex Hung Date: Wed May 29 14:08:44 2024 -0600 drm/amd/display: Fix incorrect size calculation for loop in dcn401 [WHY] fe_clk_en and be_clk_sel have size of 4 but sizeof(fe_clk_en) has byte size 16 which is lager than the array size. [HOW] Use ARRAY_SIZE for calculating size. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dd9d8c61ccff0e3409b0bff702444f3d31684e9e Author: Sridevi Arvindekar Date: Thu May 30 15:23:15 2024 -0400 drm/amd/display: Minor cleanup for DCN401 cursor related code Move pipe_ctx variables to start of the function and add a helpful comment Co-authored-by: Sridevi Arvindekar Reviewed-by: Ilya Bakoulin Acked-by: Zaeem Mohamed Signed-off-by: Sridevi Arvindekar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9d8152cd1be1c1049dc7d70e2f0a01989d1d9a17 Author: Rodrigo Siqueira Date: Wed May 29 08:57:02 2024 -0600 drm/amd/display: Check otg_master pointer before use it Coverity highlighted that the parameter otg_master is referenced before the if condition that validates it, which means that the code might have some attempt to access a null pointer. This commit addresses this issue by moving the pointer verification to the beginning of the function and initializing all the values right after it. Acked-by: Zaeem Mohamed Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7c70e60fbf4bff1123f0e8d5cb1ae71df6164d7f Author: Nicholas Kazlauskas Date: Wed May 29 12:12:09 2024 -0400 drm/amd/display: Disable DMCUB timeout for DCN35 [Why] DMCUB can intermittently take longer than expected to process commands. Old ASIC policy was to continue while logging a diagnostic error - which works fine for ASIC without IPS, but with IPS this could lead to a race condition where we attempt to access DCN state while it's inaccessible, leading to a system hang when the NIU port is not disabled or register accesses that timeout and the display configuration in an undefined state. [How] We need to investigate why these accesses take longer than expected, but for now we should disable the timeout on DCN35 to avoid this race condition. Since the waits happen only at lower interrupt levels the risk of taking too long at higher IRQ and causing a system watchdog timeout are minimal. Reviewed-by: Ovidiu Bunea Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit abf34ca465f5cd182b07701d3f3d369c0fc04723 Author: Wenjing Liu Date: Wed May 29 12:20:41 2024 -0400 drm/amd/display: use preferred link settings for dp signal only [why] We set preferred link settings for virtual signal. However we don't support virtual signal for UHBR link rate. If preferred is set to UHBR link rate, we will allow virtual signal with UHBR link rate which causes system crashes. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c006d1a15a9cf9df6a68a2f6b870fc55eacd9054 Author: Wenjing Liu Date: Tue May 28 16:52:15 2024 -0400 drm/amd/display: remove ODM combine before bandwidth validation [why] DML1 validation code doesn't have the ability to remove ODM combine. It will directly translate currently used ODM combine config into ODM override. If ODM combine is used in the initial state it will only validate the timing if ODM is used. This is not correct for dynamic ODM u se case, as ODM is used as an optimization not a hard requirement. [how] Remove ODM combine in the initial state before bandwidth validation so DML will not translate it into ODM override in the initial bandwidth validation. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3ddd9c83ff7ac0ead38188425b14d03dc2f2c133 Author: Wenjing Liu Date: Wed May 29 14:17:34 2024 -0400 drm/amd/display: remove dpp pipes on failure to update pipe params [why] There are cases where update pipe params could fail but dpp pipes are already added to the state. In this case, we should remove dpp pipes so dc state is restored back. If it is not restored, dc state is corrupted after calling this function, so if we call the same interface with the corrupted state again, we may end up programming pipe topology based on a corrupted dc state. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 466423c6dd8af23ebb3a69d43434d01aed0db356 Author: Nicholas Kazlauskas Date: Tue May 28 15:25:30 2024 -0400 drm/amd/display: Remove register from DCN35 DMCUB diagnostic collection [Why] These registers should not be read from driver and triggering the security violation when DMCUB work times out and diagnostics are collected blocks Z8 entry. [How] Remove the register read from DCN35. Reviewed-by: Duncan Ma Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 38e0c3df6dbd36e69d38f67853cdd1bb6110d05f Author: Leo Li Date: Mon Feb 26 16:56:49 2024 -0500 drm/amd/display: Move PRIMARY plane zpos higher [Why] Compositors have different ways of assigning surfaces to DRM planes for render offloading. It may decide between various strategies: overlay, underlay, or a mix of both (see here for more info: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/76) One way for compositors to implement the underlay strategy is to assign a higher zpos to the DRM_PRIMARY plane than the DRM_OVERLAY planes, effectively turning the DRM_OVERLAY plane into an underlay plane. Today, amdgpu attaches an immutable zpos of 0 to the DRM_PRIMARY plane. This however, is an arbitrary restriction. DCN pipes are general purpose, and can be arranged in any z-order. To support compositors using this allocation scheme, we can set a non-zero immutable zpos for the PRIMARY, allowing the placement of OVERLAYS (mutable zpos range 0-254) beneath the PRIMARY. [How] Assign a zpos = #no of OVERLAY planes to the PRIMARY plane. Then, clean up any assumptions in the driver of PRIMARY plane having the lowest zpos. v2: Fix typo s/decending/descending/ Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Leo Li Acked-by: Pekka Paalanen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1b04dcca4fb10dd3834893a60de74edd99f2bfaf Author: Leo Li Date: Thu Jan 18 16:29:49 2024 -0500 drm/amd/display: Introduce overlay cursor mode [Why] DCN is the display hardware for amdgpu. DRM planes are backed by DCN hardware pipes, which carry pixel data from one end (memory), to the other (output encoder). Each DCN pipe has the ability to blend in a cursor early on in the pipeline. In other words, there are no dedicated cursor planes in DCN, which makes cursor behavior somewhat unintuitive for compositors. For example, if the cursor is in RGB format, but the top-most DRM plane is in YUV format, DCN will not be able to blend them. Because of this, amdgpu_dm rejects all configurations where a cursor needs to be enabled on top of a YUV formatted plane. From a compositor's perspective, when computing an allocation for hardware plane offloading, this cursor-on-yuv configuration result in an atomic test failure. Since the failure reason is not obvious at all, compositors will likely fall back to full rendering, which is not ideal. Instead, amdgpu_dm can try to accommodate the cursor-on-yuv configuration by opportunistically reserving a separate DCN pipe just for the cursor. We can refer to this as "overlay cursor mode". It is contrasted with "native cursor mode", where the native DCN per-pipe cursor is used. [How] On each crtc, compute whether the cursor plane should be enabled in overlay mode. If it is, mark the CRTC as requesting overlay cursor mode. Overlay cursor should be enabled whenever there exists a underlying plane that has YUV format, or is scaled differently than the cursor. It should also be enabled if there is no underlying plane, or if underlying planes do not cover the entire CRTC. During DC validation, attempt to enable a separate DCN pipe for the cursor if it's in overlay mode. If that fails, or if no overlay mode is requested, then fallback to native mode. v2: * Update commit message for when overlay cursor should be enabled * Also consider scale and no-underlying-plane case (cursor on crtc bg) * Consider all underlying planes when determinig overlay/native, not just the plane immediately beneath the cursor, as it may not cover the entire CRTC. * Fix typo s/decending/descending/ * Force native cursor on pre-DCN hardware Reviewed-by: Harry Wentland Acked-by: Zaeem Mohamed Signed-off-by: Leo Li Acked-by: Harry Wentland Acked-by: Pekka Paalanen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fd279d8f45c96886786d7fb5452489efad97093b Author: Josip Pavic Date: Fri May 10 10:57:48 2024 -0400 drm/amd/display: define abm debug interface [Why & How] Define debug interface to dmub for reading back abm data. Reviewed-by: Anthony Koo Acked-by: Zaeem Mohamed Signed-off-by: Josip Pavic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fa57924c76d995e87ca3533ec60d1d5e55769a27 Author: Wayne Lin Date: Mon May 20 16:37:01 2024 +0800 drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode() [Why] dm_dp_mst_is_port_support_mode() is a bit not following the original design rule and cause light up issue with multiple 4k monitors after mst dsc hub. [How] Refactor function dm_dp_mst_is_port_support_mode() a bit to solve the light up issue. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fcf6a49d79923a234844b8efe830a61f3f0584e4 Author: Wayne Lin Date: Tue May 21 11:54:26 2024 +0800 drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute [Why] When unplug one of monitors connected after mst hub, encounter null pointer dereference. It's due to dc_sink get released immediately in early_unregister() or detect_ctx(). When commit new state which directly referring to info stored in dc_sink will cause null pointer dereference. [how] Remove redundant checking condition. Relevant condition should already be covered by checking if dsc_aux is null or not. Also reset dsc_aux to NULL when the connector is disconnected. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fc6d61ad1dc7dda7b32f1d1c08d0e6e372cda628 Author: Paul Hsieh Date: Tue May 28 14:36:00 2024 +0800 drm/amd/display: change dram_clock_latency to 34us for dcn35 [Why & How] Current DRAM setting would cause underflow on customer platform. Modify dram_clock_change_latency_us from 11.72 to 34.0 us as per recommendation from HW team Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: Paul Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6b3cc7a357db3b6c2a0166c8c81c0a5e723743ae Author: Daniel Miess Date: Tue May 28 16:17:17 2024 -0400 drm/amd/display: Change dram_clock_latency to 34us for dcn351 [Why] Intermittent underflow observed when using 4k144 display on dcn351 [How] Update dram_clock_change_latency_us from 11.72us to 34us Reviewed-by: Nicholas Kazlauskas Acked-by: Zaeem Mohamed Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ad28d7c3d989fc5689581664653879d664da76f0 Author: Wayne Lin Date: Mon May 27 15:33:48 2024 +0800 drm/amd/display: Correct the defined value for AMDGPU_DMUB_NOTIFICATION_MAX [Why & How] It actually exposes '6' types in enum dmub_notification_type. Not 5. Using smaller number to create array dmub_callback & dmub_thread_offload has potential to access item out of array bound. Fix it. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9a573481887e330b808e88005ffa142092c9fdbb Author: Wayne Lin Date: Mon May 27 15:17:26 2024 +0800 drm/amd/display: Defer the setting of link hpd status for usb4/tbt [Why & How] Link hpd status is set during link detection process via dpia_query_hpd_status(), doesn't need to explicitly set it during outbox irq. Remove it. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e32e15dbf06d65d70c763a44cc8e32ab409b1d5f Author: Wayne Lin Date: Mon May 27 15:04:31 2024 +0800 drm/amd/display: Adjust debug msg for usb4/tbt [Why & How] Debug msg for usb4/tbt now is a bit confusing. Adjust it for better reading. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d3d996ec8905a0098f160d7a4dcca2b54d48d697 Author: Chris Park Date: Tue May 28 15:56:22 2024 -0400 drm/amd/display: Avoid programming DTO if Refclk is 0 [Why] Reference clock, either DPREFCLK or DTBCLK can be a value of 0 which then will encounter division by 0. [How] Avoid further calculation and programming if refclk is not populated. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f2034ebb27c5222511b2225b10348ccf6f541a7f Author: Joshua Aberback Date: Mon May 27 18:24:00 2024 -0400 drm/amd/display: Disable boot optimization for DCN401 [Why] DCN401 currently has an issue re-enabling when pipe splitting is enabled, while the root cause is being investigated we can make sure everything is being reset as a workaround, by disabling boot optimization. [How] - use enable_accelerated_mode instead of init_pipes to fully reset asic Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8362061eed6761a36866876ba2dd00ec638a13b4 Author: Chris Park Date: Mon May 27 21:21:30 2024 -0400 drm/amd/display: Prevent overflow on DTO calculation [Why] uint32_t is implicitly converted to uint64_t while multiplication still happens on uint32_t side. This creates digit overflow for large pixel clock which is meant to be retained in uint64_t. [How] Calculate multiplication of units in uint64_t domain instead of uint32_t in DTO parameter clock caculation. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ed79ab5a07c1cb4bb05422ac6e794e40c4c1484c Author: Sridevi Arvindekar Date: Mon May 27 11:26:58 2024 -0400 drm/amd/display: DCN401 cusor code update Scaling and rotation changes for cursor. Reviewed-by: Ariel Bernstein Reviewed-by: Nevenko Stupar Acked-by: Zaeem Mohamed Signed-off-by: Sridevi Arvindekar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3df528be2af34946b1ccce84c1fd38a5c7e42e61 Author: Rodrigo Siqueira Date: Mon May 27 13:57:52 2024 -0600 drm/amd/display: Use the SPDX license identifier for dmub_replay files Use the SPDX format for dmub_replay.c|.h files. Reviewed-by: Aurabindo Pillai Acked-by: Zaeem Mohamed Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0eea12b9bdd5f917c3fb00c5ef710398f7c7bfac Author: Ivan Lipski Date: Mon May 27 13:28:44 2024 -0400 drm/amd/display: Remove duplicate 'update_idle_uclk' in dcn401 clk_mgr code [WHY] The coverity analysis flagged this if expression as it contains a 'CONSTANT_EXPRESSION_RESULT': 'update_idle_uclk' is 'ORd' with itself. [HOW] Removed the duplicate 'update_idle_uclk'. Reviewed-by: Alex Hung Acked-by: Zaeem Mohamed Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1b51220dc28cd34f80467acaff60294348cf6675 Author: George Shen Date: Thu May 23 16:01:21 2024 -0400 drm/amd/display: Ignore UHBR13.5 cable ID cap for passive cable max link rate [Why] Passive DP40 cables were updated in the latest DP spec to support UHBR13.5 link rate. Current max link rate logic checks against the cable ID DPCD even for passive cables. [How] Ignore UHBR13.5 cable ID DPCD cap in get_max_link_rate logic. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e8eff33f287274e731c5a655d8b111006aed3e98 Author: Roman Li Date: Thu May 23 17:48:27 2024 -0400 drm/amd/display: Add config support entry to replay caps debugfs [Why] replay_capability debugfs tells whether sink and driver support replay feature. However replay enablement also depends on whether it is enabled/disabled via amdgpu module params. [How] Add 'Config support' entry to output current replay config. Reviewed-by: ChiaHsuan Chung Acked-by: Zaeem Mohamed Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9d26e0cfc218c8c3942feaa42d04d15ee20bf83e Author: Yang Wang Date: Fri May 31 14:10:58 2024 +0800 drm/amdgpu: refine gfx7 firmware loading refine gfx7 firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 26c56049cc4f1705b498df013949427692a4b0d5 Author: winstang Date: Mon May 27 08:51:19 2024 -0400 drm/amd/display: added NULL check at start of dc_validate_stream [Why] prevent invalid memory access [How] check if dc and stream are NULL Co-authored-by: winstang Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: winstang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ec14eab37dbb07b92e2079c9b7ef4730d9418f89 Author: Jay Cornwall Date: Wed Jun 5 14:27:49 2024 -0500 drm/amdkfd: Extend gfx12 trap handler fix to gfx10/11 In commit fda812ebe3d9 ("drm/amdkfd: gfx12 context save/restore trap handler fixes") the following fix was introduced but incorrectly restricted to gfx12. The same issue and a corresponding fix apply to gfx10 and gfx11. Do not overwrite TRAPSTS.{SAVECTX,HOST_TRAP} when restoring this register. Both of these fields can assert while the wavefront is running the trap handler. Signed-off-by: Jay Cornwall Reviewed-by: Lancelot Six Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 020ceface29f7280dcccc866b106ba4e9ecd6c8c Author: Anthony Koo Date: Sat May 25 15:24:59 2024 -0400 drm/amd/display: [FW Promotion] Release 0.0.220.0 - Change ordering of structs to put enums together - Add new define DMUB_TRACE_ENTRY_DEFINED to guard the trace code enum Acked-by: Zaeem Mohamed Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1a90ec2e2663f0ee2e8ed895f0445e2a031fdc82 Author: Nicholas Kazlauskas Date: Thu May 23 11:53:27 2024 -0400 drm/amd/display: Add sequential ONO sequencing for DCN35 [Why] Adds support for performing the sequential ONO changes from DCN351 into DCN35 ASIC based on revision. [How] Check the revision and run the DCN351 sequences on applicable revisions. Reviewed-by: Sung joon Kim Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6210e866eb1be94b8b2e94e3d07e2ed5da43ae86 Author: Alvin Lee Date: Wed May 22 11:10:58 2024 -0400 drm/amd/display: Ignore phantom DTBCLK requirement [Description] Phantom DTBCLK can be calculated different from main because phantom has no DSC and thus will have a different output BPP. Ignore phantom DTBCLK requirement and only consider non-phantom DTBCLK requirements. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 82c421ba46ecd11b67e15a86ad382ab8a6ed1d5d Author: Michael Strauss Date: Tue May 21 14:52:37 2024 -0400 drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps [WHY] Some sinks are observed to return invalid LTTPR revision and/or invalid LTTPR link rate capabilities. [HOW] Assume any LTTPR which reports invalid max link rate supports HBR3. Don't validate LTTPR DPCD revision in dp_is_lttpr_present check. Reviewed-by: George Shen Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 396477d9508e3c3cb95c9b6eb76346769efd961a Author: Michael Strauss Date: Thu May 9 15:38:05 2024 -0400 drm/amd/display: Update FIXED_VS retimer training pattern delay [WHY] Needed for PHY patterns as well to perform electrical compliance. Also need to increase wait time from 30ms to 50ms to resolve very intermittent UHBR20 link training failures. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9a29c4adb0997be6ba3dd92dfba14ea75a8c6ce4 Author: Wenjing Liu Date: Tue May 21 17:05:41 2024 -0400 drm/amd/display: reduce ODM slice count to initial new dc state only when needed [why] We need to decrease ODM slice when adding or removing planes because MPO support takes precedence over dynamic ODM combine. However there is a case where we remove ODM combine even for ODM combine required timing in the initial new dc state. This is normally okay because ODM will be added back after we pass DML bandwidth validation. However since we remove ODM combine in the initial new state, the previous ODM pipe allocation is lost. This may cause the new plane to take away the original secondary OPP head pipe that is still required in the new state. For a timing that requires ODM 2:1 but optimized with ODM 4:1, if we add an MPO plane, we will not have enough pipe to preserve ODM 4:1. In this case we should reduce ODM slice count then try to add the MPO plane again. By reducing, we are gradually remove 1 ODM slice from right most side one at a time until we have enough free pipes for the new plane. If we remove ODM combine entirely, we could use the pipe at ODM slice index 1 as a DPP pipe for the new plane. But ODM slice 1 is still needed as the timing requires ODM 2:1. This transition is not seamless and user will see corruption on the screen. [how] Remove single ODM slice one at time until we have enough pipes for a new plane. Remove previous logic to always remove ODM combine entirely. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 827416d45476fe5957c714409452d20dd80f282d Author: Nevenko Stupar Date: Wed May 22 18:13:51 2024 -0400 drm/amd/display: Fix multiple cursors when using 4 displays on a contiguous large surface [Why & How] Remove some cursor offset calculations for rotated cursor for fixing a bug where multiple cursors are seen. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d9d42ebd186a3e1468ac99b327ff236acf7ba3c4 Author: Daniel Sa Date: Thu May 23 08:58:31 2024 -0400 drm/amd/display: Return after Init why: DML21 being overwritten after init. how: After initializing, early return. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Daniel Sa Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 42697ae79e5547cf02c3861504dc51608385abac Author: Chris Park Date: Wed May 22 12:20:29 2024 -0400 drm/amd/display: Change AVI Info Frame version to 4 for OVT [Why] Official Release CTA specification reverted the change and no longer uses version 5 to indicate OVT timing. [How] Change the version used for AVI info Frame for OVT to 4. Reviewed-by: Leo Ma Acked-by: Zaeem Mohamed Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e15fc7001425599bab6c802650208a15c72fbc34 Author: Alvin Lee Date: Wed May 22 15:59:45 2024 -0400 drm/amd/display: Remove NULL assignment for stream_status [Description] No need to assign stream_status NULL because it is always re-assigned before usage. This change is to fix coverity errors. Reviewed-by: Nicholas Choi Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f7e56091a46e794e0509a8de369117da1fd66e74 Author: Zaeem Mohamed Date: Tue May 28 19:09:01 2024 -0400 drm/amd/display: Remove dcn32_smu13 duplicate header [WHY] Duplicate headers requiring unecessary maintenance of both headers [HOW] Removal of smu13_driver_if header and all referneces to it changed to dcn32_smu13_driver Signed-off-by: Zaeem Mohamed Acked-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5d1608a81e01740e8b51ceb5079a5fb3ffbffe3a Author: Ivan Lipski Date: Fri May 31 16:05:27 2024 -0400 drm/amd/display: Remove redundant ternary operation [WHY] Coverity analysis flagged this ternary operation as DEADCODE. Since 'total_y_free_entry' is initialized as 0x200 and 'total_c_free_entry' is initialized as 0x140, and they never change values before the ternary operator, so 'total_y_free_entry' is always greater 'total_c_free_entry', 'so small_free_entry' is always set to 'total_c_free_entry'. [HOW] Replace the ternary operator with the variable declaration. Signed-off-by: Ivan Lipski Acked-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3c6ad7320b32fc5de1cd9a5b092dc1d5a3cd0348 Author: Ivan Lipski Date: Fri May 31 16:31:02 2024 -0400 drm/amd/display: Remove unreachable check [WHY] Coverity analysis flagged this code as DEADCODE since the condition and return in the outer loop are never reached. All operations with the 'dwb_pipe' variable happen in the inner loop, that already contains the same check with the 'MAX_DWB_PIPES'. The later check condition cannot occur before the check condition in the inner loop, thus the later condition is unreacable. [HOW] Remove the unreachable condition. Acked-by: Zaeem Mohamed Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 223ac8b6f57a60f3262453a4bd3d3366842ced0f Author: Ivan Lipski Date: Fri May 31 14:48:41 2024 -0400 drm/amd/display: Remove redundant if conditions [WHY] Coverity analysis flagged the two if conditions in dcn30_dpp.c and dcn401_dpp.c as DEADCODE since they are never true, since the variable 'program_prealpha_dealpha' is initialized at 0 and never chagnes. [HOW] Removed the variable 'program_prealpha_dealpha' and the if conditions. Acked-by: Zaeem Mohamed Signed-off-by: Ivan Lipski Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dea54d186caf004da44c9b61d6ad0cb51c818cfa Author: Wenjing Liu Date: Thu Apr 25 12:01:34 2024 -0400 drm/amd/display: add odm_slice_rect parameter in spl_in [why] OPP input rect aka odm slice rect is a hardware dependent parameter that can't be determined by SPL software logic. Therefore we need to explicitly pass odm slice rect in. So ODM slice rect calculation is moved out of SPL. [how] add odm_slice_rect parameter in spl_in Reviewed-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0caba87a406e47d1b2d642587fa75981687cd29e Author: Wenjing Liu Date: Wed Apr 17 15:23:08 2024 -0400 drm/amd/display: use even ODM slice width for two pixels per container [why] When optc uses two pixel per container, each ODM slice width must be an even number. [how] If ODM slice width is odd number increase it by 1. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b59cb5a67198c20e203f33ae8ca5e35de89e6ccd Author: Dennis Chan Date: Tue Apr 2 10:58:01 2024 +0800 drm/amd/display: Fix Replay Desync Error Test When PHY power off, the DP_SEC_CNTL cannot be configured and cause disable Adaptive sync SDP failed. Regarding the issue, the driver will disabled AS-SDP in replay state machine. Reviewed-by: Rodrigo Siqueira Signed-off-by: Dennis Chan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0a4b06074cc4d61b624225bcee8b487743751d23 Author: ChunTao Tso Date: Mon Jan 8 13:46:59 2024 +0800 drm/amd/display: Replay + IPS + ABM in Full Screen VPB [Why] Because ABM will wait VStart to start getting histogram data, it will cause we can't enter IPS while full screnn video playing. [How] Modify the panel refresh rate to the maximun multiple of current refresh rate Reviewed-by: Rodrigo Siqueira Signed-off-by: ChunTao Tso Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a63e1c0459b4034a6be23ba4a795bc9b725c1a71 Author: Leon Huang Date: Mon Mar 4 16:52:25 2024 +0800 drm/amd/display: Expand supported Replay residency mode [Why] Dmub provides several Replay residency calculation methods, but current interface only supports either ALPM or PHY mode [How] Modify the interface for supporting different types of Replay residency calculation. Reviewed-by: Rodrigo Siqueira Signed-off-by: Leon Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a3324a672b9fd41f29f27082f5ce3dcdc198d3b7 Author: ChunTao Tso Date: Tue Feb 20 17:08:39 2024 +0800 drm/amd/display: Replay low hz [Why] The original coasting vtotal is 2 bytes, and it need to be amended to 4 bytes because low hz case. [How] Amend coasting vtotal from 2 bytes to 4 bytes. Reviewed-by: Rodrigo Siqueira Signed-off-by: ChunTao Tso Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 68b02a58f698fb20a8b6a6f3970851fb4bb76392 Author: pochchan Date: Thu Dec 1 13:27:49 2022 +0800 drm/amd/display: Use TPS3 for ALPM on Specific Panel For some specific panel, it need to use TPS3 rather than use TP2 in ALPM when DSC is enabled. Reviewed-by: Rodrigo Siqueira Signed-off-by: pochchan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3601a35a2e9d640233f4bc3496f7603b93f9c143 Author: Nicholas Kazlauskas Date: Mon Dec 4 16:35:04 2023 -0500 drm/amd/display: Wake DMCUB before sending a command for replay feature [Why] We can hang in place trying to send commands when the DMCUB isn't powered on. [How] For functions that execute within a DC context or DC lock we can wrap the direct calls to dm_execute_dmub_cmd/list with code that exits idle power optimizations and reallows once we're done with the command submission on success. For DM direct submissions the DM will need to manage the enter/exit sequencing manually. We cannot invoke a DMCUB command directly within the DM execution helper or we can deadlock. Reviewed-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b5236da757adc75d7e52c69bdc233d29249a0d0c Author: Nicholas Kazlauskas Date: Wed Sep 27 15:06:41 2023 -0400 drm/amd/display: Don't use fsleep for PSR exit waits on dmub replay [Why] These functions can be called from high IRQ levels and the OS will hang if it tries to use a usleep_highres or a msleep. [How] Replace the flseep with a udelay for dmub_replay_enable. Reviewed-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 030631e97b209481edbac38000d2a60fd340f6b1 Author: Christian König Date: Wed Jun 5 13:27:20 2024 +0200 drm/amdgpu: revert "take runtime pm reference when we attach a buffer" v2 This reverts commit b8c415e3bf98 ("drm/amdgpu: take runtime pm reference when we attach a buffer") and commit 425285d39afd ("drm/amdgpu: add amdgpu runpm usage trace for separate funcs"). Taking a runtime pm reference for DMA-buf is actually completely unnecessary and even dangerous. The problem is that calling pm_runtime_get_sync() from the DMA-buf callbacks is illegal because we have the reservation locked here which is also taken during resume. So this would deadlock. When the buffer is in GTT it is still accessible even when the GPU is powered down and when it is in VRAM the buffer gets migrated to GTT before powering down. The only use case which would make it mandatory to keep the runtime pm reference would be if we pin the buffer into VRAM, and that's not something we currently do. v2: improve the commit message Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher CC: stable@vger.kernel.org commit 59257fd1e08eea6a539ab3799b413eb8066feb25 Author: Rodrigo Siqueira Date: Tue May 28 11:10:55 2024 -0600 drm/amd/display: Use dc wake for get the replay state Use dc_wake_and_execute_gpint with DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY to get the replay state. Signed-off-by: Rodrigo Siqueira Acked-by: Zaeem Mohamed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c37b8f7868a9f435c62907c37463867066edca11 Author: Yang Wang Date: Thu May 30 23:15:01 2024 +0800 drm/amdgpu: refine imu firmware loading refine imu firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3e92af6bf5f3a821608ae698a606b63d214bc6a6 Author: Yang Wang Date: Thu May 30 23:21:51 2024 +0800 drm/amdgpu: refine pmfw/smu firmware loading refine pmfw/smu firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cd093c24ee433161eaa00bdc64907393536038a4 Author: Yang Wang Date: Thu May 30 23:28:35 2024 +0800 drm/amdgpu: refine gmc firmware loading refine gmc firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8d7ff60f36b0a9c1767141f0315d6df190a8312f Author: Yang Wang Date: Thu May 30 23:34:26 2024 +0800 drm/amdgpu: refine vpe firmware loading refine vpe firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit b441e9ac9df4a1569c48548729a13c2e17b1154b Author: Yang Wang Date: Thu May 30 23:33:27 2024 +0800 drm/amdgpu: refine vcn firmware loading refine vcn firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9817f06173cfa74b78e9e701a064864d62e88cd2 Author: Yang Wang Date: Tue Jun 4 16:30:41 2024 +0800 drm/amdgpu: move aca/mca init functions into ras_init() stage adjust the function position to better match aca/mca fini code in ras_fini(). Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit be6a69b21a3517122ba6cf7ab8f62f4803637dbe Author: Bob Zhou Date: Fri Jun 7 16:33:35 2024 +0800 drm/amdgpu: fix overflowed constant warning in mmhub_set_clockgating() To fix potential overflowed constant warning, modify the variables to u32 for getting the return value of RREG32_SOC15(). Signed-off-by: Bob Zhou Acked-by: Christian König Signed-off-by: Alex Deucher commit 199d69d5f9fbfbeafbf231fd9f49d00b8e7be2c0 Author: Harish Kasiviswanathan Date: Wed Jun 5 09:30:50 2024 -0400 drm/amdgpu: Indicate CU havest info to CP To achieve full occupancy CP hardware needs to know if CUs in SE are symmetrically or asymmetrically harvested v2: Reset is_symmetric_cus for each loop Signed-off-by: Harish Kasiviswanathan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3a86fdc422c926eab7d42a8194eaacf05e1d699e Author: Lijo Lazar Date: Fri May 31 17:58:54 2024 +0530 drm/amdgpu: Skip coredump during resets for debug Skip scheduling coredump when gpu reset is intentionally triggered through debugfs. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3618fa26c81156a87fdcb6d1c88988a1f12bedc3 Author: Yang Wang Date: Thu May 30 23:09:42 2024 +0800 drm/amdgpu: refine sdma firmware loading refine sdma firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8cae4b578ea0c21c2dcba988a0fdd751955e4836 Author: Yang Wang Date: Thu May 30 22:56:16 2024 +0800 drm/amdgpu: refine psp firmware loading refine psp firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d225960c2330e102370815367b877baaf8bb8b5d Author: Yunxiang Li Date: Mon Jun 3 12:29:30 2024 -0400 drm/amdgpu: add lock in kfd_process_dequeue_from_device We need to take the reset domain lock before talking to MES. While in this case we can take the lock inside the mes helper. We can't do so for most other mes helpers since they are used during reset. So for consistency sake we add the lock here. Signed-off-by: Yunxiang Li Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit bf349b036d57950e9822b1d11ba12b8e28fa42d1 Author: Yang Wang Date: Thu May 30 22:51:03 2024 +0800 drm/amdgpu: refine mes firmware loading v1: refine mes firmware loading v2: use dev_info instead of DRM_INFO Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3612702852acbded39233b1600c8d9f47e40139f Author: Mukul Joshi Date: Wed Jun 5 18:48:55 2024 -0400 drm/amdgpu: Add missing locking for MES API calls Add missing locking at a few places when calling MES APIs to ensure exclusive access to MES queue. Signed-off-by: Mukul Joshi Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 2fe87f54abdc5c29bd2ebc301964926ea27b3d89 Author: Mario Limonciello Date: Fri Jun 7 01:02:28 2024 -0500 drm/amd/display: Set default brightness according to ACPI Currently, amdgpu will always set up the brightness at 100% when it loads. However this is jarring when the BIOS has it previously programmed to a much lower value. The ACPI ATIF method includes two members for "ac_level" and "dc_level". These represent the default values that should be used if the system is brought up in AC and DC respectively. Use these values to set up the default brightness when the backlight device is registered. v2: squash in ACPI fix Reviewed-by: Leo Li Acked-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit ee3942d9ab1f79637b260cefafe6a1ddfdd6ed00 Author: David (Ming Qiang) Wu Date: Thu May 30 10:50:59 2024 -0400 drm/amdgpu: drop some kernel messages in VCN code Similar to commit 813e7d4cd05e where some kernel log messages are dropped. With this commit, more log messages in older version of VCN/JPEG code are dropped. Acked-by: Leo Liu Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit 778e3979c5dc9cbdb5d1b92afed427de6bc483b4 Author: Ivan Lipski Date: Fri Jun 7 12:33:59 2024 -0400 Revert "drm/amd/display: Add NULL check for 'afb' before dereferencing in amdgpu_dm_plane_handle_cursor_update" [WHY] This patch is a dupplicate implementation of 14bcf29b, which we are reverting due to a regression with kms_plane_cursor IGT tests. This reverts commit 38e6f715b02b572f74677eb2f29d3b4bc6f1ddff. Reviewed-by: Srinivasan Shanmugam Tested-by: George Zhang Signed-off-by: Ivan Lipski Signed-off-by: Alex Deucher commit 1e006baf5b9b96635aeb1842ce95871b06c3d457 Author: Ivan Lipski Date: Fri Jun 7 12:33:58 2024 -0400 Revert "drm/amd/display: Add null check for 'afb' in amdgpu_dm_update_cursor" [WHY] This commit introduced a regression with kms_plane_cursor IGT tests, causing AMD Asics to fail these tests. This reverts commit ce66ffd9813c8bd73e21b96d6476e5fb32b727c7. Reviewed-by: Srinivasan Shanmugam Tested-by: George Zhang Signed-off-by: Ivan Lipski Signed-off-by: Alex Deucher commit a777c9d70adce61b662f3b4649fda2476a61a261 Author: Yang Wang Date: Thu May 30 22:47:19 2024 +0800 drm/amdgpu: refine gpu_info firmware loading refine gpu_info firmware loading Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 02593249fa11ef8d2ca780ef91962f81b04eeea0 Author: Hamza Mahfooz Date: Mon Jun 3 10:16:45 2024 -0400 drm/amd/display: prevent register access while in IPS We can't read/write to DCN registers while in IPS. Since, that can cause the system to hang. So, before proceeding with the access in that scenario, force the system out of IPS. Cc: stable@vger.kernel.org # 6.6+ Reviewed-by: Roman Li Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 1bfe5e77468d2a73de7411024912ee2a422c6d4c Author: Yang Wang Date: Thu May 30 22:11:01 2024 +0800 drm/amdgpu: enhance amdgpu_ucode_request() function flexibility v1: Adding formatting string feature to improve function flexibility. v2: modify macro name to ADMGPU_UCODE_MAX_NAME. Signed-off-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 37f432481d6ba2077eff1b988b58a18fa87831b7 Author: Bob Zhou Date: Tue Jun 4 15:08:29 2024 +0800 drm/amdgpu: fix the overflowed constant warning for RREG32_SOC15() To fix potential overflowed constant warning reported by Coverity, modify the variables to uint32_t. Signed-off-by: Bob Zhou Acked-by: Christian König Signed-off-by: Alex Deucher commit 18f2525d31401e5142db95ff3a6ec0f4147be818 Author: Yunxiang Li Date: Fri May 24 17:11:30 2024 -0400 drm/amdgpu: add lock in amdgpu_gart_invalidate_tlb We need to take the reset domain lock before flush hdp. We can't put the lock inside amdgpu_device_flush_hdp itself because it is used during reset where we already take the write side lock. Signed-off-by: Yunxiang Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9c33e5fd4fb63b793d9a92bf35d190630d9bada4 Author: Yunxiang Li Date: Thu May 23 07:48:19 2024 -0400 drm/amdgpu: fix locking scope when flushing tlb Which method is used to flush tlb does not depend on whether a reset is in progress or not. We should skip flush altogether if the GPU will get reset. So put both path under reset_domain read lock. Signed-off-by: Yunxiang Li Reviewed-by: Christian König Signed-off-by: Alex Deucher CC: stable@vger.kernel.org commit ba531117a87d55f607f865b89eb83665e8e99b83 Author: Yunxiang Li Date: Tue Jun 4 12:56:56 2024 -0400 drm/amdgpu: call flush_gpu_tlb directly in gfxhub enable Here since we are in reset and takes the reset_domain write side lock already. We can't use the flush tlb helper which tries to take the read side. Signed-off-by: Yunxiang Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c1f9d82b92917a298dcc9196c4b05e1fdb20c0d8 Author: Yunxiang Li Date: Fri May 17 12:53:30 2024 -0400 drm/amdgpu: use helper in amdgpu_gart_unbind When amdgpu_gart_invalidate_tlb helper is introduced this part was left out of the conversion. Avoid the code duplication here. Signed-off-by: Yunxiang Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4b0e76e4c181a722d5a01eba56d5150db7cc9cd8 Author: Yunxiang Li Date: Wed May 22 11:00:08 2024 -0400 drm/amdgpu: remove tlb flush in amdgpu_gtt_mgr_recover At this point the gart is not set up, there's no point to invalidate tlb here and it could even be harmful. Signed-off-by: Yunxiang Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1802b042a343c1705e5ef45b93d1fd088344d3c2 Author: Yunxiang Li Date: Fri May 24 13:46:50 2024 -0400 drm/amdgpu/kfd: remove is_hws_hang and is_resetting is_hws_hang and is_resetting serves pretty much the same purpose and they all duplicates the work of the reset_domain lock, just check that directly instead. This also eliminate a few bugs listed below and get rid of dqm->ops.pre_reset. kfd_hws_hang did not need to avoid scheduling another reset. If the on-going reset decided to skip GPU reset we have a bad time, otherwise the extra reset will get cancelled anyway. remove_queue_mes forgot to check is_resetting flag compared to the pre-MES path unmap_queue_cpsch, so it did not block hw access during reset correctly. Signed-off-by: Yunxiang Li Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5c0a1cdd17ce9eb315102c65084af899622ed268 Author: Yunxiang Li Date: Fri May 24 16:22:28 2024 -0400 drm/amdgpu: fix sriov host flr handler We send back the ready to reset message before we stop anything. This is wrong. Move it to when we are actually ready for the FLR to happen. In the current state since we take tens of seconds to stop everything, it is very likely that host would give up waiting and reset the GPU before we send ready, so it would be the same as before. But this gets rid of the hack with reset_domain locking and also let us tell how slow ready to reset actually is from the host. The ready to reset speed can be improved later. Signed-off-by: Yunxiang Li Acked-by: Christian König Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit b3948ad1ac582f560e1f3aeaecf384619921c48d Author: Yunxiang Li Date: Fri May 24 16:14:55 2024 -0400 drm/amdgpu: add skip_hw_access checks for sriov Accessing registers via host is missing the check for skip_hw_access and the lockdep check that comes with it. Signed-off-by: Yunxiang Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit bac640ddb51e8066d1f35ed810e7a4c6dd341d39 Author: Eric Huang Date: Tue Jun 4 11:46:56 2024 -0400 drm/amdgpu: add reset source in various cases To fullfill the reset event description. Suggested-by: Lijo Lazar Signed-off-by: Eric Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7bed1df814cd61029f56eecd322e23190d50d93b Author: Eric Huang Date: Thu Jun 6 11:37:20 2024 -0400 drm/amdgpu: fix NULL pointer in amdgpu_reset_get_desc amdgpu_job_ring may return NULL, which causes kernel NULL pointer error, using another way to print ring name instead of ring->name. Suggested-by: Lijo Lazar Signed-off-by: Eric Huang Acked-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 6218bd6b22d777ba02cde098f2f2f61a23262d96 Author: Aric Cyr Date: Sun May 26 18:59:15 2024 -0400 drm/amd/display: dc 3.2.287 This version brings the following changes: - Add sequential ONO sequencing for DCN35 - Add new GPINT command definitions - reduce ODM slice count to initial new dc state only when needed - Enable copying of bounding box data from VBIOS DMUB - Guard reading 3DLUT registers for dcn32/dcn35 Reviewed-by: Zaeem Mohamed Acked-by: Zaeem Mohamed Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0b5afe05377d7993f19292bf49dd13e959000790 Author: Colton Lewis Date: Thu May 23 17:40:55 2024 +0000 KVM: arm64: Add early_param to control WFx trapping Add an early_params to control WFI and WFE trapping. This is to control the degree guests can wait for interrupts on their own without being trapped by KVM. Options for each param are trap and notrap. trap enables the trap. notrap disables the trap. Note that when enabled, traps are allowed but not guaranteed by the CPU architecture. Absent an explicitly set policy, default to current behavior: disabling the trap if only a single task is running and enabling otherwise. Signed-off-by: Colton Lewis Reviewed-by: Jing Zhang Link: https://lore.kernel.org/r/20240523174056.1565133-1-coltonlewis@google.com [ oliver: rework kvm_vcpu_should_clear_tw*() for readability ] Signed-off-by: Oliver Upton commit dedf56d775c0bebbc3003bfb988dddaf0a583c28 Author: Alexei Starovoitov Date: Wed Jun 12 18:38:15 2024 -0700 selftests/bpf: Add tests for add_const Improve arena based tests and add several C and asm tests with specific pattern. These tests would have failed without add_const verifier support. Also add several loop_inside_iter*() tests that are not related to add_const, but nice to have. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240613013815.953-5-alexei.starovoitov@gmail.com commit 6870bdb3f4f2991193449f9de57109b3e263f55c Author: Alexei Starovoitov Date: Wed Jun 12 18:38:14 2024 -0700 bpf: Support can_loop/cond_break on big endian Add big endian support for can_loop/cond_break macros. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20240613013815.953-4-alexei.starovoitov@gmail.com commit 98d7ca374ba4b39e7535613d40e159f09ca14da2 Author: Alexei Starovoitov Date: Wed Jun 12 18:38:13 2024 -0700 bpf: Track delta between "linked" registers. Compilers can generate the code r1 = r2 r1 += 0x1 if r2 < 1000 goto ... use knowledge of r2 range in subsequent r1 operations So remember constant delta between r2 and r1 and update r1 after 'if' condition. Unfortunately LLVM still uses this pattern for loops with 'can_loop' construct: for (i = 0; i < 1000 && can_loop; i++) The "undo" pass was introduced in LLVM https://reviews.llvm.org/D121937 to prevent this optimization, but it cannot cover all cases. Instead of fighting middle end optimizer in BPF backend teach the verifier about this pattern. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613013815.953-3-alexei.starovoitov@gmail.com commit 124e8c2b1b5d08a10d3a44ed082eaaf98a78c91f Author: Alexei Starovoitov Date: Wed Jun 12 18:38:12 2024 -0700 bpf: Relax tuple len requirement for sk helpers. __bpf_skc_lookup() safely handles incorrect values of tuple len, hence we can allow zero to be passed as tuple len. This patch alone doesn't make an observable verifier difference. It's a trivial improvement that might simplify bpf programs. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20240613013815.953-2-alexei.starovoitov@gmail.com commit df86486d905107e079afd82b45f8cd955d1c7d7b Author: Sung Joon Kim Date: Fri May 10 12:18:31 2024 -0400 drm/amd/display: Fix DSC slice and delay calculations [why] There are other factors that determine the number of DSC slices. The slices should not be determined in DML but retrieve the value calculated from driver. [how] Update the logic to determine DSC slice. Make DSCDelay per display pipe. Reviewed-by: Jun Lei Acked-by: Zaeem Mohamed Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 82b7cde3f2658c0e6b3a46be594a76c3b2c9d89b Author: Alex Hung Date: Wed May 15 10:04:24 2024 -0600 drm/amd/display: Increase MAX_LINKS by 2 Two additional virtual links are created and thus increasing size for dc->links by two. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 470679ef332e7ebceb05d11e602d101a627e5200 Author: Nicholas Kazlauskas Date: Tue May 21 10:41:52 2024 -0400 drm/amd/display: Guard reading 3DLUT registers for dcn32/dcn35 [Why] 3DLUT is not part of the DPP on DCN32/DCN35 ASIC and these registers now exist in MCM state. [How] Add guards when reading DPP state based on whether the register has a valid offset. Reviewed-by: Sung joon Kim Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 06cd6d8f808164513e453af842720fe258abbbf0 Author: Dillon Varone Date: Mon May 20 11:12:07 2024 -0400 drm/amd/display: Various DML2 fixes for FAMS2 - Ensure SubVP stream settings match ODM policy - Fix MALL size calculations when DCC is enabled - Fail if any stream fails DRR policy check Reviewed-by: Chaitanya Dhere Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cf58fdca000f6c95b881290405f0beb711d5d921 Author: Alvin Lee Date: Mon May 20 12:52:31 2024 -0400 drm/amd/display: Program DIG FE source select for DVI before PHY en [Description] In newer DCN's the programming of SYMCLK_FE_SRC_SEL depends on the value of DIG_FE_SOURCE_SELECT. If DIG_FE_SOURCE_SELECT is not already programmed at the time of PHY / DIG enable then the FW sequence will program an incorrect SYMCLK source. Ensure that we program DIG_FE_SOURCE_SELECT for all DIO scenarios (DVI in this particular case) before going through the PHY / DIG enable sequence. Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 839eb4bbbd9617e60ef2091cb7bad2bae7c519d5 Author: Jesse Zhang Date: Mon Jun 3 13:16:36 2024 +0800 drm/amd/pm: remove dead code in navi10_emit_clk_levels and navi10_print_clk_levels Since the range of the varibable i is 0 - 3. So execution cannot reach this statement: default. Signed-off-by: Jesse Zhang Reviewed-by: Yang Wang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 27b500b77b82bd18c9357111fb639dcbdda31c26 Author: Jesse Zhang Date: Wed Jun 5 15:44:38 2024 +0800 drm/amdgpu: remove dead code in atom_get_src_int Since the range of align is 0~7, the expression is: align = (attr >> 3) & 7. In the case of ATOM_ARG_IMM, the code cannot reach the default case. So there is no need for "break". Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 57a0d65bd1d0bb22c9a73ddf61e91b3478706522 Author: ChunTao Tso Date: Mon May 13 13:48:19 2024 +0800 drm/amd/display: Introduce deferred Replay coasting vtotal update Add functions to defer updating of coasting vtotal after source refresh rate update. Reviewed-by: Robin Chen Acked-by: Zaeem Mohamed Signed-off-by: ChunTao Tso Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 38e6f715b02b572f74677eb2f29d3b4bc6f1ddff Author: Srinivasan Shanmugam Date: Wed Jun 5 21:13:40 2024 +0530 drm/amd/display: Add NULL check for 'afb' before dereferencing in amdgpu_dm_plane_handle_cursor_update This commit adds a null check for the 'afb' variable in the amdgpu_dm_plane_handle_cursor_update function. Previously, 'afb' was assumed to be null, but was used later in the code without a null check. This could potentially lead to a null pointer dereference. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1298 amdgpu_dm_plane_handle_cursor_update() error: we previously assumed 'afb' could be null (see line 1252) Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Hersen Wu Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Signed-off-by: Srinivasan Shanmugam Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit ce66ffd9813c8bd73e21b96d6476e5fb32b727c7 Author: Srinivasan Shanmugam Date: Wed Jun 5 16:42:48 2024 +0530 drm/amd/display: Add null check for 'afb' in amdgpu_dm_update_cursor This commit adds a null check for the 'afb' variable in the amdgpu_dm_update_cursor function. Previously, 'afb' was assumed to be null at line 8388, but was used later in the code without a null check. This could potentially lead to a null pointer dereference. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8433 amdgpu_dm_update_cursor() error: we previously assumed 'afb' could be null (see line 8388) drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c 8379 static void amdgpu_dm_update_cursor(struct drm_plane *plane, 8380 struct drm_plane_state *old_plane_state, 8381 struct dc_stream_update *update) 8382 { 8383 struct amdgpu_device *adev = drm_to_adev(plane->dev); 8384 struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb); 8385 struct drm_crtc *crtc = afb ? plane->state->crtc : old_plane_state->crtc; ^^^^^ 8386 struct dm_crtc_state *crtc_state = crtc ? to_dm_crtc_state(crtc->state) : NULL; 8387 struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); 8388 uint64_t address = afb ? afb->address : 0; ^^^^^ Checks for NULL 8389 struct dc_cursor_position position = {0}; 8390 struct dc_cursor_attributes attributes; 8391 int ret; 8392 8393 if (!plane->state->fb && !old_plane_state->fb) 8394 return; 8395 8396 drm_dbg_atomic(plane->dev, "crtc_id=%d with size %d to %d\n", 8397 amdgpu_crtc->crtc_id, plane->state->crtc_w, 8398 plane->state->crtc_h); 8399 8400 ret = amdgpu_dm_plane_get_cursor_position(plane, crtc, &position); 8401 if (ret) 8402 return; 8403 8404 if (!position.enable) { 8405 /* turn off cursor */ 8406 if (crtc_state && crtc_state->stream) { 8407 dc_stream_set_cursor_position(crtc_state->stream, 8408 &position); 8409 update->cursor_position = &crtc_state->stream->cursor_position; 8410 } 8411 return; 8412 } 8413 8414 amdgpu_crtc->cursor_width = plane->state->crtc_w; 8415 amdgpu_crtc->cursor_height = plane->state->crtc_h; 8416 8417 memset(&attributes, 0, sizeof(attributes)); 8418 attributes.address.high_part = upper_32_bits(address); 8419 attributes.address.low_part = lower_32_bits(address); 8420 attributes.width = plane->state->crtc_w; 8421 attributes.height = plane->state->crtc_h; 8422 attributes.color_format = CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA; 8423 attributes.rotation_angle = 0; 8424 attributes.attribute_flags.value = 0; 8425 8426 /* Enable cursor degamma ROM on DCN3+ for implicit sRGB degamma in DRM 8427 * legacy gamma setup. 8428 */ 8429 if (crtc_state->cm_is_degamma_srgb && 8430 adev->dm.dc->caps.color.dpp.gamma_corr) 8431 attributes.attribute_flags.bits.ENABLE_CURSOR_DEGAMMA = 1; 8432 --> 8433 attributes.pitch = afb->base.pitches[0] / afb->base.format->cpp[0]; ^^^^^ ^^^^^ Unchecked dereferences 8434 8435 if (crtc_state->stream) { 8436 if (!dc_stream_set_cursor_attributes(crtc_state->stream, 8437 &attributes)) 8438 DRM_ERROR("DC failed to set cursor attributes\n"); 8439 8440 update->cursor_attributes = &crtc_state->stream->cursor_attributes; 8441 8442 if (!dc_stream_set_cursor_position(crtc_state->stream, 8443 &position)) 8444 DRM_ERROR("DC failed to set cursor position\n"); 8445 8446 update->cursor_position = &crtc_state->stream->cursor_position; 8447 } 8448 } Fixes: 66eba12a5482 ("drm/amd/display: Do cursor programming with rest of pipe") Reported-by: Dan Carpenter Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Hersen Wu Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Signed-off-by: Srinivasan Shanmugam Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 06a498d9f589be0fadb95274a53308dcf0cf6d89 Author: Lewis Huang Date: Fri May 17 17:30:42 2024 +0800 drm/amd/display: Add monitor patch skip disable crtc during psr and ips1 [Why] For some panel, it cannot handle pseudo vblank set by otg resync when leave psr [How] The monitor patch will keep otg_on during enter IPS1. And then we don't need to do otg resync when wake up. Reviewed-by: Duncan Ma Acked-by: Zaeem Mohamed Signed-off-by: Lewis Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit abb3f19cad93a8f85dc1d595be456396843ef73e Author: Chiawen Huang Date: Mon May 20 11:17:42 2024 +0800 drm/amd/display: add set ips disable [How&Why] Once IPS active, all the DCN resources are not be allowed to access. It needs to a function for 3rd party to on/off IPS. Reviewed-by: Duncan Ma Acked-by: Zaeem Mohamed Signed-off-by: Chiawen Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6172d39be2545ef3d71c4007065832a5219d2885 Author: Dillon Varone Date: Fri May 17 17:45:14 2024 -0400 drm/amd/display: Add recovery timeout to FAMS2 [WHY&HOW] Add 5ms timeout to trigger recovery and force allow P-State in DMUB. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ba73d69a2c03d4cc10b09b2d5579f997eb26f61d Author: Dillon Varone Date: Wed May 15 22:48:10 2024 -0400 drm/amd/display: Force max clocks unconditionally when p-state is unsupported [WHY&HOW] UCLK and FCLK are updated together, so an FCLK update can also cause UCLK update to SMU. When this happens, the UCLK provided should be max if switching is unsupported. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 028383b64da2c8c59d0f049c68c816b634d98641 Author: Wayne Lin Date: Tue May 14 18:10:16 2024 +0800 drm/amd/display: Change the order of setting DP_IS_USB_C flag [Why] enc10->base.features.flags.bits.DP_IS_USB_C will be overwritten if we set it before initializing enc10->base.features [How] Determine DP_IS_USB_C after enc10->base.features is initialized. Besides, bp_cap_info.DP_IS_USB_C will never be set in get_connector_speed_cap_info(). Remove the redudant code. Reviewed-by: Roman Li Acked-by: Zaeem Mohamed Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a878304276b8326442bdd1a192e33c1b8bc99778 Author: Yihan Zhu Date: Fri May 17 08:55:44 2024 -0400 drm/amd/display: bypass ODM before CRTC off [WHY] OPPs couldn't disconnect from the ODM that cause the double buffer pending not being latched due to missing VUPDATE. [HOW] Moving memory blanking before OTG turn off to make sure double buffer latched correctly. Reviewed-by: Dmytro Laktyushkin Acked-by: Zaeem Mohamed Signed-off-by: Yihan Zhu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 91efe6de7029b206e29bb97143f9156e88f54027 Author: Alex Deucher Date: Tue Jun 4 14:01:58 2024 -0400 drm/amd/display/dcn401: use pre-allocated temp structure for bounding box This mirrors what the driver does for older DCN generations. Should fix: [ 26.924055] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306 [ 26.924060] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1022, name: modprobe [ 26.924063] preempt_count: 2, expected: 0 [ 26.924064] RCU nest depth: 0, expected: 0 [ 26.924066] Preemption disabled at: [ 26.924067] [] dc_fpu_begin+0x30/0xd0 [amdgpu] [ 26.924322] CPU: 9 PID: 1022 Comm: modprobe Not tainted 6.8.0+ #20 [ 26.924325] Hardware name: System manufacturer System Product Name/CROSSHAIR VI HERO, BIOS 6302 10/23/2018 [ 26.924326] Call Trace: [ 26.924327] [ 26.924329] dump_stack_lvl+0x37/0x50 [ 26.924333] ? dc_fpu_begin+0x30/0xd0 [amdgpu] [ 26.924589] dump_stack+0x10/0x20 [ 26.924592] __might_resched+0x16a/0x1c0 [ 26.924596] __might_sleep+0x42/0x70 [ 26.924598] __kmalloc_node_track_caller+0x2ad/0x4b0 [ 26.924601] ? dm_helpers_allocate_gpu_mem+0x12/0x20 [amdgpu] [ 26.924855] ? dcn401_update_bw_bounding_box+0x2a/0xf0 [amdgpu] [ 26.925122] kmemdup+0x20/0x50 [ 26.925124] ? kernel_fpu_begin_mask+0x6b/0xe0 [ 26.925127] ? kmemdup+0x20/0x50 [ 26.925129] dcn401_update_bw_bounding_box+0x2a/0xf0 [amdgpu] [ 26.925393] dc_create+0x311/0x670 [amdgpu] [ 26.925649] amdgpu_dm_init+0x2aa/0x1fa0 [amdgpu] [ 26.925903] ? irq_work_queue+0x38/0x50 [ 26.925907] ? vprintk_emit+0x1e7/0x270 [ 26.925910] ? dev_printk_emit+0x83/0xb0 [ 26.925914] ? amdgpu_device_rreg+0x17/0x20 [amdgpu] [ 26.926133] dm_hw_init+0x14/0x30 [amdgpu] v2: drop extra memcpy Fixes: 669d6b078ed8 ("drm/amd/display: avoid large on-stack structures") Reviewed-by: Harry Wentland Acked-by: Arnd Bergmann Suggested-by: Hamza Mahfooz Signed-off-by: Alex Deucher Cc: George Zhang Cc: Arnd Bergmann Cc: harry.wentland@amd.com Cc: sunpeng.li@amd.com Cc: Rodrigo.Siqueira@amd.com commit afe9555e79fcd0d758e3796ad00fd6292d99361b Author: Alex Deucher Date: Tue Jun 4 11:46:04 2024 -0400 drm/amd/display: use pre-allocated temp structure for bounding box This mirrors what the driver does for older DCN generations. Should fix: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 449, name: kworker/u64:8 preempt_count: 2, expected: 0 RCU nest depth: 0, expected: 0 Preemption disabled at: ffffffffc0ce1580>] dc_fpu_begin+0x30/0xd0 [amdgpu] CPU: 5 PID: 449 Comm: kworker/u64:8 Tainted: G W 6.8.0+ #35 Hardware name: System manufacturer System Product Name/ROG STRIX X570-E GAMING WIFI II, BIOS 4204 02/24/2022 Workqueue: events_unbound async_run_entry_fn v2: drop extra memcpy Fixes: 88c61827cedc ("drm/amd/display: dynamically allocate dml2_configuration_options structures") Reviewed-by: Harry Wentland Tested-by: George Zhang (v1) Suggested-by: Hamza Mahfooz Signed-off-by: Alex Deucher Cc: George Zhang Cc: Arnd Bergmann Cc: harry.wentland@amd.com Cc: sunpeng.li@amd.com Cc: Rodrigo.Siqueira@amd.com commit faa64f633c3762cedd4c539ccb210dc9cc3f8849 Author: Frank Min Date: Wed Apr 10 21:40:16 2024 +0800 drm/amdgpu: add sdma 7.0 support for copy dcc buffer 1. Add dcc buffer flag for copy buffer 2. Add sdma 7.0 support copy dcc buffer Signed-off-by: Likun Gao Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7c85e970839ec57107a621f457e9e4f9220ffeb7 Author: Likun Gao Date: Thu Jan 11 16:44:55 2024 +0800 drm/amdgpu: support for DCC feature Deal with AMDGPU_GEM_CREATE_GFX12_DCC to set DCC bit when needed. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6b83b94a949f61f07e16485466f67e8f904d9f98 Author: Alex Deucher Date: Tue Feb 6 16:03:17 2024 -0500 drm/amdgpu: add additional VM bits Add additional VM PTE bits. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4aa1f202519f6a837376efc87fae4a0ecc97f40b Author: Thorsten Blum Date: Tue Jun 4 12:37:37 2024 +0200 drm/amd/display: Simplify if conditions The if conditions !A || A && B can be simplified to !A || B. Fixes the following Coccinelle/coccicheck warnings reported by excluded_middle.cocci: WARNING !A || A && B is equivalent to !A || B WARNING !A || A && B is equivalent to !A || B WARNING !A || A && B is equivalent to !A || B Compile-tested only. Signed-off-by: Thorsten Blum Signed-off-by: Alex Deucher commit f1934de46f2b259a87565407a5f2163d66e41092 Author: Jack Chang Date: Fri May 10 10:38:19 2024 +0800 drm/amd/display: Extend PSRSU residency mode 1. To support multiple PSRSU residency measurement mode Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Jack Chang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0db66572747a789922e8137904e8b4c39d9b94f6 Author: Nicholas Kazlauskas Date: Wed May 15 14:53:56 2024 -0400 drm/amd/display: Add outbox notification support for HPD redetect [Why] HPD sense changes can occur during low power states and need to be notified from firmware to driver. Upon notification the hotplug redetection routines should execute. [How] Add Support in DMUB srv and DMUB srv stat for receiving these notifications. DM can hook them up and process the HPD redetection once received. Reviewed-by: Duncan Ma Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0627cef36145c9ff9845bdfd7ddf485bbac1f981 Author: Dan Carpenter Date: Fri Jun 14 20:30:44 2024 +0300 ipmi: ssif_bmc: prevent integer overflow on 32bit systems There are actually two bugs here. First, we need to ensure that count is at least sizeof(u32) or msg.len will be uninitialized data. The "msg.len" variable is a u32 that comes from the user. On 32bit systems the "sizeof_field(struct ipmi_ssif_msg, len) + msg.len" addition can overflow if "msg.len" is greater than U32_MAX - 4. Valid lengths for "msg.len" are 1-254. Add a check for that to prevent the integer overflow. Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver") Signed-off-by: Dan Carpenter Message-Id: <1431ca2e-4e9c-4520-bfc0-6879313c30e9@moroto.mountain> Signed-off-by: Corey Minyard commit d999aa2785daf830b908e43087d6ede648d69d74 Author: Dmitry Baryshkov Date: Thu Jun 13 19:33:57 2024 +0300 drm/ci: mark kms_addfb_basic@addfb25-bad-modifier as passing on msm The commit b228501ff183 ("drm/msm: merge dpu format database to MDP formats") made get_format take modifiers into account. This makes kms_addfb_basic@addfb25-bad-modifier pass on MDP4 and MDP5 platforms. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240613-msm-pass-addfb25-bad-modifier-v1-1-23c556e96c8a@linaro.org commit 574884438c3827a842926bbff4a0a2d96597a388 Author: Ville Syrjälä Date: Fri May 17 17:53:56 2024 +0300 drm/i915: Remove bogus MST check in intel_dp_has_audio() No idea what this MST checks is doing in intel_dp_has_audio(). Looks completely pointless, so get rid of it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b47e62b1ed1306a5fd7ad5d2419ef865fd322851 Author: Ville Syrjälä Date: Fri May 17 17:53:55 2024 +0300 drm/i915: Utilize edp_disable_dsc from VBT Disable eDP DSC usage when instructed to do so by the VBT. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit cf235914f0e75eaa791ecfede2010fb701184bba Author: Ville Syrjälä Date: Fri May 17 17:53:54 2024 +0300 drm/i915: Reuse intel_dp_supports_dsc() for MST intel_dp_supports_dsc() now works for MST as well, reuse it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8de66736bcd87b89fff489a6fa2ad2312fc0de0d Author: Ville Syrjälä Date: Fri May 17 17:53:53 2024 +0300 drm/i915: Use intel_dp_has_dsc() during .compute_config() Reuse intel_dp_has_dsc() during .compute_config() instead of repeating some of the checks again by hand. We'll be adding more checks to intel_dp_has_dsc() and this will make sure we cover both .mode_valid() and .compute_config() with them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 0c0543ff0a8d8f5312d66d2b863032acdf6d77d0 Author: Ville Syrjälä Date: Fri May 17 17:53:52 2024 +0300 drm/i915: Handle MST in intel_dp_has_dsc() Utilize intel_dp_has_dsc() for MST as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 35859d448a2097d9197aecc61b55f158cba0a17d Author: Ville Syrjälä Date: Fri May 17 17:53:51 2024 +0300 drm/i915: Extract intel_dp_has_dsc() Extract a helper to check whether the source+sink combo supports DSC. That basic check is needed both during mode validation and compute config. We'll also need to add extra checks to both places, so having a single place for it is nicer. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7997a9e4f89f124c700986baf220b5421fe1158b Author: Ville Syrjälä Date: Fri May 17 17:53:50 2024 +0300 drm/i915: Drop redundant dsc_decompression_aux check If we have no dsc_decompression_aux (only possible on MST) then we won't have the dsc_dpcd caps either. So checking both is not needed. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 63a8dfb889112ab4a065aa60a9a1b590b410d055 Author: Steven Rostedt (Google) Date: Thu Jun 13 09:52:23 2024 -0400 function_graph: Add READ_ONCE() when accessing fgraph_array[] In function_graph_enter() there's a loop that looks at fgraph_array[] elements which are fgraph_ops. It first tests if it is a fgraph_stub op, and if so skips it, as that's just there as a place holder. Then it checks the fgraph_ops filters to see if the ops wants to trace the current function. But if the compiler reloads the fgraph_array[] after the check against fgraph_stub, it could race with the fgraph_array[] being updated with the fgraph_stub. That would cause the stub to be processed. But the stub has a null "func_hash" field which will cause a NULL pointer dereference. Add a READ_ONCE() so that the gops that is compared against the fgraph_stub is also the gops that is processed later. Link: https://lore.kernel.org/all/CA+G9fYsSVJQZH=nM=1cjTc94PgSnMF9y65BnOv6XSoCG_b6wmw@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240613095223.1f07e3a4@rorschach.local.home Cc: Mark Rutland Cc: Mathieu Desnoyers Fixes: cc60ee813b503 ("function_graph: Use static_call and branch to optimize entry function") Reported-by: Naresh Kamboju Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) commit 0089c055b56024edf90e85dc852440b713ce8cb5 Author: David Matlack Date: Tue Jun 11 15:05:12 2024 -0700 KVM: x86/mmu: Avoid reacquiring RCU if TDP MMU fails to allocate an SP Avoid needlessly reacquiring the RCU read lock if the TDP MMU fails to allocate a shadow page during eager page splitting. Opportunistically drop the local variable ret as well now that it's no longer necessary. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240611220512.2426439-5-dmatlack@google.com Signed-off-by: Sean Christopherson commit 3d4a5a45ca26f8de9e0a4f384a2fb0967b8566b5 Author: David Matlack Date: Tue Jun 11 15:05:11 2024 -0700 KVM: x86/mmu: Unnest TDP MMU helpers that allocate SPs for eager splitting Move the implementation of tdp_mmu_alloc_sp_for_split() to its one and only caller to reduce unnecessary nesting and make it more clear why the eager split loop continues after allocating a new SP. Opportunistically drop the double-underscores from __tdp_mmu_alloc_sp_for_split() now that its parent is gone. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240611220512.2426439-4-dmatlack@google.com Signed-off-by: Sean Christopherson commit e1c04f7a9f4213c56af5021b40bc00f527bffbae Author: David Matlack Date: Tue Jun 11 15:05:10 2024 -0700 KVM: x86/mmu: Hard code GFP flags for TDP MMU eager split allocations Now that the GFP_NOWAIT case is gone, hard code GFP_KERNEL_ACCOUNT when allocating shadow pages during eager page splitting in the TDP MMU. Opportunistically replace use of __GFP_ZERO with allocations that zero to improve readability. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240611220512.2426439-3-dmatlack@google.com Signed-off-by: Sean Christopherson commit cf3ff0ee24d6808d19dec6c9dedb5c7555bd8c55 Author: David Matlack Date: Tue Jun 11 15:05:09 2024 -0700 KVM: x86/mmu: Always drop mmu_lock to allocate TDP MMU SPs for eager splitting Always drop mmu_lock to allocate shadow pages in the TDP MMU when doing eager page splitting. Dropping mmu_lock during eager page splitting is cheap since KVM does not have to flush remote TLBs, and avoids stalling vCPU threads that are taking page faults while KVM is eager splitting under mmu_lock held for write. This change reduces 20%+ dips in MySQL throughput during live migration in a 160 vCPU VM while userspace is issuing CLEAR_DIRTY_LOG ioctls (tested with 1GiB and 8GiB CLEARs). Userspace could issue finer-grained CLEARs, which would also reduce contention on mmu_lock, but doing so will increase the rate of remote TLB flushing, since KVM must flush TLBs before returning from CLEAR_DITY_LOG. When there isn't contention on mmu_lock[1], this change does not regress the time it takes to perform eager page splitting (the cost of releasing and re-acquiring an uncontended lock is minimal on x86). [1] Tested with dirty_log_perf_test, which does not run vCPUs during eager page splitting, and with a 16 vCPU VM Live Migration with manual-protect disabled (where mmu_lock is held for read). Cc: Bibo Mao Cc: Sean Christopherson Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20240611220512.2426439-2-dmatlack@google.com Signed-off-by: Sean Christopherson commit e3e72fe4cb1d1b7399fab0e98166b8bfcddb9ec7 Merge: d37a9ab8331cf c6e56cf6b2e79 Author: Jens Axboe Date: Fri Jun 14 10:22:08 2024 -0600 Merge branch 'for-6.11/block-limits' into for-6.11/block Pull in block limits branch, which exists as a shared branch for both the block and SCSI tree. * for-6.11/block-limits: (26 commits) block: move integrity information into queue_limits block: invert the BLK_INTEGRITY_{GENERATE,VERIFY} flags block: bypass the STABLE_WRITES flag for protection information block: don't require stable pages for non-PI metadata block: use kstrtoul in flag_store block: factor out flag_{store,show} helper for integrity block: remove the blk_flush_integrity call in blk_integrity_unregister block: remove the blk_integrity_profile structure dm-integrity: use the nop integrity profile md/raid1: don't free conf on raid0_run failure md/raid0: don't free conf on raid0_run failure block: initialize integrity buffer to zero before writing it to media block: add special APIs for run-time disabling of discard and friends block: remove unused queue limits API sr: convert to the atomic queue limits API sd: convert to the atomic queue limits API sd: cleanup zoned queue limits initialization sd: factor out a sd_discard_mode helper sd: simplify the disable case in sd_config_discard sd: add a sd_disable_write_same helper ... commit caa727882937f0d5260a2a026eb7c27d77404066 Author: Sean Christopherson Date: Fri Jun 7 17:11:08 2024 -0700 KVM: x86/mmu: Rephrase comment about synthetic PFERR flags in #PF handler Reword the BUILD_BUG_ON() comment in the legacy #PF handler to explicitly describe how asserting that synthetic PFERR flags are limited to bits 31:0 protects KVM against inadvertently passing a synthetic flag to the common page fault handler. No functional change intended. Suggested-by: Xiaoyao Li Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20240608001108.3296879-1-seanjc@google.com Signed-off-by: Sean Christopherson commit c6e56cf6b2e79a463af21286ba951714ed20828c Author: Christoph Hellwig Date: Thu Jun 13 10:48:22 2024 +0200 block: move integrity information into queue_limits Move the integrity information into the queue limits so that it can be set atomically with other queue limits, and that the sysfs changes to the read_verify and write_generate flags are properly synchronized. This also allows to provide a more useful helper to stack the integrity fields, although it still is separate from the main stacking function as not all stackable devices want to inherit the integrity settings. Even with that it greatly simplifies the code in md and dm. Note that the integrity field is moved as-is into the queue limits. While there are good arguments for removing the separate blk_integrity structure, this would cause a lot of churn and might better be done at a later time if desired. However the integrity field in the queue_limits structure is now unconditional so that various ifdefs can be avoided or replaced with IS_ENABLED(). Given that tiny size of it that seems like a worthwhile trade off. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240613084839.1044015-13-hch@lst.de Signed-off-by: Jens Axboe commit 9f4aa46f2a7401025d8561495cf8740f773310fc Author: Christoph Hellwig Date: Thu Jun 13 10:48:21 2024 +0200 block: invert the BLK_INTEGRITY_{GENERATE,VERIFY} flags Invert the flags so that user set values will be able to persist revalidating the integrity information once we switch the integrity information to queue_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240613084839.1044015-12-hch@lst.de Signed-off-by: Jens Axboe commit 3c3e85ddffae93eba1a257eb6939bf5dc1e93b9e Author: Christoph Hellwig Date: Thu Jun 13 10:48:20 2024 +0200 block: bypass the STABLE_WRITES flag for protection information Currently registering a checksum-enabled (aka PI) integrity profile sets the QUEUE_FLAG_STABLE_WRITE flag, and unregistering it clears the flag. This can incorrectly clear the flag when the driver requires stable writes even without PI, e.g. in case of iSCSI or NVMe/TCP with data digest enabled. Fix this by looking at the csum_type directly in bdev_stable_writes and not setting the queue flag. Also remove the blk_queue_stable_writes helper as the only user in nvme wants to only look at the actual QUEUE_FLAG_STABLE_WRITE flag as it inherits the integrity configuration by other means. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240613084839.1044015-11-hch@lst.de Signed-off-by: Jens Axboe commit 43c5dbe98a3953e07f4fbf89aa137b9207d52378 Author: Christoph Hellwig Date: Thu Jun 13 10:48:19 2024 +0200 block: don't require stable pages for non-PI metadata Non-PI metadata doesn't contain checksums and thus doesn't require stable pages. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240613084839.1044015-10-hch@lst.de Signed-off-by: Jens Axboe commit 1d59857ed2ec4d506e346859713c4325b5053da3 Author: Christoph Hellwig Date: Thu Jun 13 10:48:18 2024 +0200 block: use kstrtoul in flag_store Use the text to integer helper that has error handling and doesn't modify the input pointer. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Kanchan Joshi Link: https://lore.kernel.org/r/20240613084839.1044015-9-hch@lst.de Signed-off-by: Jens Axboe commit 1366251a794b149a132ef8423c8946b6e565a923 Author: Christoph Hellwig Date: Thu Jun 13 10:48:17 2024 +0200 block: factor out flag_{store,show} helper for integrity Factor the duplicate code for the generate and verify attributes into common helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240613084839.1044015-8-hch@lst.de Signed-off-by: Jens Axboe commit e8bc14d116aeac8f0f133ec8d249acf4e0658da7 Author: Christoph Hellwig Date: Thu Jun 13 10:48:16 2024 +0200 block: remove the blk_flush_integrity call in blk_integrity_unregister Now that there are no indirect calls for PI processing there is no way to dereference a NULL pointer here. Additionally drivers now always freeze the queue (or in case of stacking drivers use their internal equivalent) around changing the integrity profile. This is effectively a revert of commit 3df49967f6f1 ("block: flush the integrity workqueue in blk_integrity_unregister"). Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240613084839.1044015-7-hch@lst.de Signed-off-by: Jens Axboe commit e9f5f44ad3725335d9c559c3c22cd3726152a7b1 Author: Christoph Hellwig Date: Thu Jun 13 10:48:15 2024 +0200 block: remove the blk_integrity_profile structure Block layer integrity configuration is a bit complex right now, as it indirects through operation vectors for a simple two-dimensional configuration: a) the checksum type of none, ip checksum, crc, crc64 b) the presence or absence of a reference tag Remove the integrity profile, and instead add a separate csum_type flag which replaces the existing ip-checksum field and a new flag that indicates the presence of the reference tag. This removes up to two layers of indirect calls, remove the need to offload the no-op verification of non-PI metadata to a workqueue and generally simplifies the code. The downside is that block/t10-pi.c now has to be built into the kernel when CONFIG_BLK_DEV_INTEGRITY is supported. Given that both nvme and SCSI require t10-pi.ko, it is loaded for all usual configurations that enabled CONFIG_BLK_DEV_INTEGRITY already, though. Signed-off-by: Christoph Hellwig Reviewed-by: Kanchan Joshi Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240613084839.1044015-6-hch@lst.de Signed-off-by: Jens Axboe commit 63e649594ab19cc3122a2d0fc2c94b19932f0b19 Author: Christoph Hellwig Date: Thu Jun 13 10:48:14 2024 +0200 dm-integrity: use the nop integrity profile Use the block layer built-in nop profile instead of duplicating it. Tested by: $ dd if=/dev/urandom of=key.bin bs=512 count=1 $ cryptsetup luksFormat -q --type luks2 --integrity hmac-sha256 \ --integrity-no-wipe /dev/nvme0n1 key.bin $ cryptsetup luksOpen /dev/nvme0n1 luks-integrity --key-file key.bin and then doing mkfs.xfs and simple I/O on the mount file system. Signed-off-by: Christoph Hellwig Reviewed-by: Milan Broz Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240613084839.1044015-5-hch@lst.de Signed-off-by: Jens Axboe commit 799af947ed132956d6de6d77a5bc053817ccb06b Author: Christoph Hellwig Date: Thu Jun 13 10:48:13 2024 +0200 md/raid1: don't free conf on raid0_run failure The core md code calls the ->free method which already frees conf. Fixes: 07f1a6850c5d ("md/raid1: fail run raid1 array when active disk less than one") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240613084839.1044015-4-hch@lst.de Signed-off-by: Jens Axboe commit d11854ed05635e4a73fa61a988ffdd0978c9e202 Author: Christoph Hellwig Date: Thu Jun 13 10:48:12 2024 +0200 md/raid0: don't free conf on raid0_run failure The core md code calls the ->free method which already frees conf. Fixes: 0c031fd37f69 ("md: Move alloc/free acct bioset in to personality") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20240613084839.1044015-3-hch@lst.de Signed-off-by: Jens Axboe commit 899ee2c3829c5ac14bfc7d3c4a5846c0b709b78f Author: Christoph Hellwig Date: Thu Jun 13 10:48:11 2024 +0200 block: initialize integrity buffer to zero before writing it to media Metadata added by bio_integrity_prep is using plain kmalloc, which leads to random kernel memory being written media. For PI metadata this is limited to the app tag that isn't used by kernel generated metadata, but for non-PI metadata the entire buffer leaks kernel memory. Fix this by adding the __GFP_ZERO flag to allocations for writes. Fixes: 7ba1ba12eeef ("block: Block layer data integrity support") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240613084839.1044015-2-hch@lst.de Signed-off-by: Jens Axboe commit 73e3715ed14844067c5c598e72777641004a7f60 Author: Christoph Hellwig Date: Fri May 31 09:48:09 2024 +0200 block: add special APIs for run-time disabling of discard and friends A few drivers optimistically try to support discard, write zeroes and secure erase and disable the features from the I/O completion handler if the hardware can't support them. This disable can't be done using the atomic queue limits API because the I/O completion handlers can't take sleeping locks or freeze the queue. Keep the existing clearing of the relevant field to zero, but replace the old blk_queue_max_* APIs with new disable APIs that force the value to 0. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: John Garry Reviewed-by: Nitesh Shetty Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-15-hch@lst.de Signed-off-by: Jens Axboe commit 1652b0bafeaa8281ca9a805d81e13d7647bd2f44 Author: Christoph Hellwig Date: Fri May 31 09:48:08 2024 +0200 block: remove unused queue limits API Remove all APIs that are unused now that sd and sr have been converted to the atomic queue limits API. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: John Garry Reviewed-by: Nitesh Shetty Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-14-hch@lst.de Signed-off-by: Jens Axboe commit 969f17e10f5b732c05186ee0126c8a08166d0cda Author: Christoph Hellwig Date: Fri May 31 09:48:07 2024 +0200 sr: convert to the atomic queue limits API Assign all queue limits through a local queue_limits variable and queue_limits_commit_update so that we can't race updating them from multiple places, and free the queue when updating them so that in-progress I/O submissions don't see half-updated limits. Also use the chance to clean up variable names to standard ones. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-13-hch@lst.de Signed-off-by: Jens Axboe commit 804e498e0496d889090f32f812b5ce1a4f2aa63e Author: Christoph Hellwig Date: Fri May 31 09:48:06 2024 +0200 sd: convert to the atomic queue limits API Assign all queue limits through a local queue_limits variable and queue_limits_commit_update so that we can't race updating them from multiple places, and freeze the queue when updating them so that in-progress I/O submissions don't see half-updated limits. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: John Garry Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-12-hch@lst.de Signed-off-by: Jens Axboe commit 9c1d339a1bf45f4d3a2e77bbf24b0ec51f02551c Author: Christoph Hellwig Date: Fri May 31 09:48:05 2024 +0200 sd: cleanup zoned queue limits initialization Consolidate setting zone-related queue limits in sd_zbc_read_zones instead of splitting them between sd_zbc_revalidate_zones and sd_zbc_read_zones, and move the early_zone_information initialization in sd_zbc_read_zones above setting up the queue limits. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-11-hch@lst.de Signed-off-by: Jens Axboe commit f1e8185fc12c699c3abf4f39b1ff5d7793da3a95 Author: Christoph Hellwig Date: Fri May 31 09:48:04 2024 +0200 sd: factor out a sd_discard_mode helper Split the logic to pick the right discard mode into a little helper to prepare for further changes. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-10-hch@lst.de Signed-off-by: Jens Axboe commit d15b9bd42cd3b2077812d4bf32f532a9bd5c4914 Author: Christoph Hellwig Date: Fri May 31 09:48:03 2024 +0200 sd: simplify the disable case in sd_config_discard Fall through to the main call to blk_queue_max_discard_sectors given that max_blocks has been initialized to zero above instead of duplicating the call. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-9-hch@lst.de Signed-off-by: Jens Axboe commit 9972b8ce0d4ba373901bdd1e15e4de58fcd7f662 Author: Christoph Hellwig Date: Fri May 31 09:48:02 2024 +0200 sd: add a sd_disable_write_same helper Add helper to disable WRITE SAME when it is not supported and use it instead of sd_config_write_same in the I/O completion handler. This avoids touching more fields than required in the I/O completion handler and prepares for converting sd to use the atomic queue limits API. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-8-hch@lst.de Signed-off-by: Jens Axboe commit b0dadb86a90bd5a7b723f9d3a6cf69da9b596496 Author: Christoph Hellwig Date: Fri May 31 09:48:01 2024 +0200 sd: add a sd_disable_discard helper Add helper to disable discard when it is not supported and use it instead of sd_config_discard in the I/O completion handler. This avoids touching more fields than required in the I/O completion handler and prepares for converting sd to use the atomic queue limits API. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-7-hch@lst.de Signed-off-by: Jens Axboe commit b3491b0db165c0cbe25874da66d97652c03db654 Author: Christoph Hellwig Date: Fri May 31 09:48:00 2024 +0200 sd: simplify the ZBC case in provisioning_mode_store Don't reset the discard settings to no-op over and over when a user writes to the provisioning attribute as that is already the default mode for ZBC devices. In hindsight we should have made writing to the attribute fail for ZBC devices, but the code has probably been around for far too long to change this now. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-6-hch@lst.de Signed-off-by: Jens Axboe commit a23634644afc2f7c1bac98776440a1f3b161819e Author: Christoph Hellwig Date: Fri May 31 09:47:59 2024 +0200 block: take io_opt and io_min into account for max_sectors The soft max_sectors limit is normally capped by the hardware limits and an arbitrary upper limit enforced by the kernel, but can be modified by the user. A few drivers want to increase this limit (nbd, rbd) or adjust it up or down based on hardware capabilities (sd). Change blk_validate_limits to default max_sectors to the optimal I/O size, or upgrade it to the preferred minimal I/O size if that is larger than the kernel default if no optimal I/O size is provided based on the logic in the SD driver. This keeps the existing kernel default for drivers that do not provide an io_opt or very big io_min value, but picks a much more useful default for those who provide these hints, and allows to remove the hacks to set the user max_sectors limit in nbd, rbd and sd. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Acked-by: Ilya Dryomov Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-5-hch@lst.de Signed-off-by: Jens Axboe commit a00d4bfce7c6d7fa4712b8133ec195c9bd142ae6 Author: Christoph Hellwig Date: Fri May 31 09:47:58 2024 +0200 rbd: increase io_opt again Commit 16d80c54ad42 ("rbd: set io_min, io_opt and discard_granularity to alloc_size") lowered the io_opt size for rbd from objset_bytes which is 4MB for typical setup to alloc_size which is typically 64KB. The commit mostly talks about discard behavior and does mention io_min in passing. Reducing io_opt means reducing the readahead size, which seems counter-intuitive given that rbd currently abuses the user max_sectors setting to actually increase the I/O size. Switch back to the old setting to allow larger reads (the readahead size despite it's name actually limits the size of any buffered read) and to prepare for using io_opt in the max_sectors calculation and getting drivers out of the business of overriding the max_user_sectors value. Signed-off-by: Christoph Hellwig Acked-by: Ilya Dryomov Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20240531074837.1648501-4-hch@lst.de Signed-off-by: Jens Axboe commit 31ade7d4fdcf382beb8cb229a1f5d77e0f239672 Author: Christoph Hellwig Date: Fri May 31 09:47:57 2024 +0200 ubd: untagle discard vs write zeroes not support handling Discard and Write Zeroes are different operation and implemented by different fallocate opcodes for ubd. If one fails the other one can work and vice versa. Split the code to disable the operations in ubd_handler to only disable the operation that actually failed. Fixes: 50109b5a03b4 ("um: Add support for DISCARD in the UBD Driver") Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Acked-By: Anton Ivanov Link: https://lore.kernel.org/r/20240531074837.1648501-3-hch@lst.de Signed-off-by: Jens Axboe commit 5db755fbb1a0de4a4cfd5d5edfaa19853b9c56e6 Author: Christoph Hellwig Date: Fri May 31 09:47:56 2024 +0200 ubd: refactor the interrupt handler Instead of a separate handler function that leaves no work in the interrupt hanler itself, split out a per-request end I/O helper and clean up the coding style and variable naming while we're at it. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Acked-By: Anton Ivanov Link: https://lore.kernel.org/r/20240531074837.1648501-2-hch@lst.de Signed-off-by: Jens Axboe commit 5c1f50ab7fcb4e77a0b4ce102cfb890eef1ed8f1 Author: Dan Carpenter Date: Thu Jun 13 17:33:16 2024 +0300 KVM: Fix a goof where kvm_create_vm() returns 0 instead of -ENOMEM The error path for OOM when allocating buses used to return -ENOMEM using the local variable 'r', where 'r' was initialized at the top of the function. But a new "r = kvm_init_irq_routing(kvm);" was introduced in the middle of the function, so now the error code is not set and it eventually leads to a NULL dereference due to kvm_dev_ioctl_create_vm() thinking kvm_create_vm() succeeded. Set the error code back to -ENOMEM. Opportunistically tweak the logic to pre-set "r = -ENOMEM" immediately before the flows that can fail due to memory allocation failure to make it less likely that the bug recurs in the future. Fixes: fbe4a7e881d4 ("KVM: Setup empty IRQ routing when creating a VM") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/02051e0a-09d8-49a2-917f-7c2f278a1ba1@moroto.mountain [sean: tweak all of the "r = -ENOMEM" sites, massage changelog] Signed-off-by: Sean Christopherson commit 085aa9f58cf663926e6fc0136d3c6167bd58fee3 Author: Jeff Johnson Date: Sun Jun 2 15:24:38 2024 -0700 cpuidle: haltpoll: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpuidle/cpuidle-haltpoll.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Rafael J. Wysocki commit 71315037cb7d40cdb2f4fbefad31927f6e6caba5 Author: Nikolay Borisov Date: Thu Jun 13 14:08:37 2024 +0300 x86/boot: Remove unused function __fortify_panic() That function is only used when the kernel is compiled with FORTIFY_SOURCE and when the kernel proper string.h header is used. The decompressor code doesn't use the kernel proper header but has local copy which doesn't contain any fortified implementations of the various string functions. As such __fortify_panic() can never be called from the decompressor so remove it. Signed-off-by: Nikolay Borisov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613110837.300273-1-nik.borisov@suse.com commit 9b9eec8dc284f33f505cec48d88b42ebad4da9cc Author: Thomas Huth Date: Fri Jun 14 11:03:06 2024 +0200 Documentation: Remove "mfgpt_irq=" from the kernel-parameters.txt file The kernel parameter mfgpt_irq has been removed in 2009 already by c95d1e53ed89 ("cs5535: drop the Geode-specific MFGPT/GPIO code") Time to remove it from the documentation now, too. Signed-off-by: Thomas Huth Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20240614090306.561464-1-thuth@redhat.com commit 73458101e5681a7d766184cb4e16cb7b87571359 Author: Dmitry Baryshkov Date: Fri Jun 14 03:02:21 2024 +0300 dt-bindings: display: panel-edp-legacy: drop several eDP panels The panel-edp-legacy.yaml includes legacy bindings for several eDP panels which were never used in DT files present in Linux tree and most likely have never been used with the upstream kernel. Drop compatibles for these panels in favour of using a generic "edp-panel" device on the AUX bus. Reviewed-by: Douglas Anderson Acked-by: Krzysztof Kozlowski Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240614-edp-panel-drop-v4-2-4e0a112eec46@linaro.org Signed-off-by: Dmitry Baryshkov commit 51e1fb144f17c277309ed5a1c6f0d921df0064d7 Author: Dmitry Baryshkov Date: Fri Jun 14 03:02:22 2024 +0300 drm/panel-edp: drop several legacy panels The panel-edp driver supports legacy compatible strings for several eDP panels which were never used in DT files present in Linux tree and most likely have never been used with the upstream kernel. Drop compatibles for these panels in favour of using a generic "edp-panel" device on the AUX bus. Reviewed-by: Douglas Anderson Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240614-edp-panel-drop-v4-3-4e0a112eec46@linaro.org Signed-off-by: Dmitry Baryshkov commit faeebafe1d273ed6271dfb6555cd90ee730343c1 Author: Dmitry Baryshkov Date: Fri Jun 14 03:02:20 2024 +0300 drm/panel-edp: add fat warning against adding new panel compatibles Add a fat warning against adding new panel compatibles to the panel-edp driver. All new users of the eDP panels are supposed to use the generic "edp-panel" compatible device on the AUX bus. The remaining compatibles are either used by the existing DT or were used previously and are retained for backwards compatibility. Suggested-by: Doug Anderson Reviewed-by: Neil Armstrong Reviewed-by: Douglas Anderson Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240614-edp-panel-drop-v4-1-4e0a112eec46@linaro.org Signed-off-by: Dmitry Baryshkov commit 88150cd9501b9498e377cc4440325267c6921f90 Author: Qiuxu Zhuo Date: Fri Jun 14 11:03:54 2024 +0800 EDAC/igen6: Add Intel Arrow Lake-U/H SoCs support Arrow Lake-U/H SoCs share same IBECC registers with Meteor Lake-P SoCs. Add Arrow Lake-U/H SoC compute die IDs for EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240614030354.69180-1-qiuxu.zhuo@intel.com commit c94ad1d5e3885bd4fa6abb695baf5a8f5c3c309c Author: Jeff Johnson Date: Thu Jun 13 18:14:36 2024 -0700 iommu/iova: Add missing MODULE_DESCRIPTION() macro With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iommu/iova.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20240613-md-arm-drivers-iommu-v1-1-1fe0bd953119@quicinc.com Signed-off-by: Joerg Roedel commit 432e5074f805d0f976c7430af376a0dd07f1c6d7 Author: Srinivas Kandagatla Date: Thu Jun 13 11:49:33 2024 +0100 ASoC: codec: lpass-rx-macro: add support for 2.5 codec version LPASS Codec v2.5 has significant changes in the rx register strides. Due to this headset playback on SM8550, SM8650, x1e80100 and all SoCs after SM8450 have only Left working. This patch adjusts the registers to accomdate 2.5 changes. With this fixed now L and R are functional on Headset playback. Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Tested-by: Neil Armstrong # on SM8650-HDK Link: https://lore.kernel.org/r/20240612-lpass-codec-v25-v4-3-f63d3676dbc4@linaro.org Signed-off-by: Mark Brown commit dbacef05898d65f586fb9b90ba367e6bf898d68d Author: Srinivas Kandagatla Date: Thu Jun 13 11:49:32 2024 +0100 ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions LPASS Codec v2.5 has significant changes in the rx block register strides. This is a preparatory patch to do the required changes in the existing driver to be able to accomdate these changes. Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Tested-by: Neil Armstrong # on SM8650-HDK Link: https://lore.kernel.org/r/20240612-lpass-codec-v25-v4-2-f63d3676dbc4@linaro.org Signed-off-by: Mark Brown commit 378918d5918116b95300dd7f03913a1d0841f223 Author: Srinivas Kandagatla Date: Thu Jun 13 11:49:31 2024 +0100 ASoC: codecs: lpass-macro: add helpers to get codec version LPASS Digital codec have changes in register layout across multiple versions. Add a proper way read the codec version allowint all the lpass macro drivers (tx, rx, wsa, va) to configure the registers correctly. LPASS VA macro has the required registers to read the codec version. Read the the version and make it available to other lpass codec macros using the common helper functions. Existing method of using LPASS IP version is not accurate as the same the codec versioning is totally independent of LPASS IP block versions. These helper functions should be able to provide a convient way to get the codec version, and will help scale the drivers in right direction. Signed-off-by: Srinivas Kandagatla Tested-by: Krzysztof Kozlowski Tested-by: Neil Armstrong # on SM8650-HDK Link: https://lore.kernel.org/r/20240612-lpass-codec-v25-v4-1-f63d3676dbc4@linaro.org Signed-off-by: Mark Brown commit 48c1a30bf160117080b48589641f91eae9492207 Author: Jeff Johnson Date: Thu Jun 13 12:59:59 2024 -0700 regmap-i2c: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-i2c.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-base-regmap-v1-1-222be554d520@quicinc.com Signed-off-by: Mark Brown commit 7fbc4f5e633cbc23576c32ff9773faa1788afc2d Author: Abdulrasaq Lawani Date: Wed Jun 12 12:36:50 2024 -0400 dt-bindings: sound: Convert max98088 to dtschema Convert the max98088 audio codec txt bindings to DT schema. Signed-off-by: Abdulrasaq Lawani Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240612163730.515819-1-abdulrasaqolawani@gmail.com Signed-off-by: Mark Brown commit a9c8ca5d5d8452ca38300c7fb74bf8735d08f43b Author: Neil Armstrong Date: Tue Jun 11 09:30:04 2024 +0200 ASoC: dt-bindings: convert tas571x.txt to dt-schema Convert the text bindings for the Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers to dt-schema. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240611-topic-amlogic-upstream-bindings-convert-tas57xx-v2-1-38269edc1d95@linaro.org Signed-off-by: Mark Brown commit d37a9ab8331cfc0fc2eac0480f0af624c0144a92 Author: Andreas Hindborg Date: Tue Jun 11 13:45:51 2024 +0200 MAINTAINERS: add entry for Rust block device driver API Add an entry for the Rust block device driver abstractions. Signed-off-by: Andreas Hindborg Link: https://lore.kernel.org/r/20240611114551.228679-4-nmi@metaspace.dk Signed-off-by: Jens Axboe commit bc5b533b91ef0b8a09fe507e23d1c6c43c1fb0f5 Author: Andreas Hindborg Date: Tue Jun 11 13:45:50 2024 +0200 rust: block: add rnull, Rust null_blk implementation This patch adds an initial version of the Rust null block driver. Signed-off-by: Andreas Hindborg Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20240611114551.228679-3-nmi@metaspace.dk Signed-off-by: Jens Axboe commit 3253aba3408aa4eb2e4e09365eede3e63ef7536b Author: Andreas Hindborg Date: Tue Jun 11 13:45:49 2024 +0200 rust: block: introduce `kernel::block::mq` module Add initial abstractions for working with blk-mq. This patch is a maintained, refactored subset of code originally published by Wedson Almeida Filho [1]. [1] https://github.com/wedsonaf/linux/tree/f2cfd2fe0e2ca4e90994f96afe268bbd4382a891/rust/kernel/blk/mq.rs Cc: Wedson Almeida Filho Signed-off-by: Andreas Hindborg Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20240611114551.228679-2-nmi@metaspace.dk Signed-off-by: Jens Axboe commit 842b4d98ae338522babab38347297f0932fa7afd Author: Naresh Solanki Date: Fri Jun 14 11:25:31 2024 +0530 hwmon: (max6639) : Add additional hwmon attributes for fan and pwm Add additional attributes for fan & pwm i.e., fanY_pulses pwmY_freq Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20240614055533.2735210-2-naresh.solanki@9elements.com [groeck: Fix value range for fanX_pulses] Signed-off-by: Guenter Roeck commit 0f33272b60ed87a2609542a6851361f35b83c6ba Author: Naresh Solanki Date: Fri Jun 14 11:25:30 2024 +0530 hwmon: (max6639) : Update hwmon init using info structure Update hwmon init with info instead of group. The hwmon info structure in more flexible to describe sensor attribute & easy to maintian. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20240614055533.2735210-1-naresh.solanki@9elements.com [groeck: Replace clamp_val() with range check when writing pwmX_input] Signed-off-by: Guenter Roeck commit 8e184ac079db76203c8e92dd87f2dd0958710afb Merge: db404525c194d c00d476cbcef4 Author: Rafael J. Wysocki Date: Fri Jun 14 15:33:41 2024 +0200 Merge tag 'amd-pstate-v6.11-2024-06-11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux Merge amd-pstate driver updates for v6.11 from Mario Mario Limonciello: "Add support for "Fast CPPC" which allows some CPUs to operate a tighter loop for passive mode." * tag 'amd-pstate-v6.11-2024-06-11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq: amd-pstate: change cpu freq transition delay for some models x86/cpufeatures: Add AMD FAST CPPC feature flag commit db404525c194da0177c1fe9a400b571e90d72fde Merge: 350cbb5d2f676 7e1c3f584ee78 Author: Rafael J. Wysocki Date: Fri Jun 14 15:32:31 2024 +0200 Merge back new cpufreq material for v6.11. commit 404dbd26322f50c8123bf5bff9a409356889035f Author: Chris Lew Date: Wed Jun 12 12:01:56 2024 +0530 net: qrtr: ns: Ignore ENODEV failures in ns Ignore the ENODEV failures returned by kernel_sendmsg(). These errors indicate that either the local port has been closed or the remote has gone down. Neither of these scenarios are fatal and will eventually be handled through packets that are later queued on the control port. Signed-off-by: Chris Lew Signed-off-by: Sarannya Sasikumar Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240612063156.1377210-1-quic_sarannya@quicinc.com Signed-off-by: Paolo Abeni commit fa8b28ba22d95be4d2dd3c37fbdbdc066af82941 Author: Peng Fan Date: Fri May 10 11:19:48 2024 +0800 firmware: arm_scmi: Add support for platform to agent channel completion On some systems the SCMI platform to agent(p2a) communication can be fully interrupt driven. The notification(p2a) channel needs completion interrupt to drive its notification queue at the platform. Without it, the platform notification will not work as the platform will wait for agent indication of clearing the channel via interrupt unlike few platforms which can poll instead. To support such systems, an optional unidirectional mailbox channel for p2a reply communication. If the platform sets channel INTR flag set indicating that it expects the agent to trigger the interrupt to acknowledge the reciept of the notification or any p2a message, and the completion interrupt channel is provided, send a mailbox message to the platform after the p2a message is read and channel is freed to accept new notifications or p2a messages. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20240510-scmi-notify-v2-2-e994cf14ef86@nxp.com Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 8c57c4dc2a9172e543025673c0c6c98953af2b13 Author: Michal Wajdeczko Date: Thu Jun 13 21:57:02 2024 +0200 drm/xe: Drop duplicated declaration The declaration of xe_reg_whitelist_process_engine() function does not fit into "xe_wa.h" and is already a duplicate. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240613195702.2164-1-michal.wajdeczko@intel.com commit 5e5f2f92cccc29f356422d3cbc104f7f42430f22 Author: Dmitry Baryshkov Date: Fri Jun 14 02:43:39 2024 +0300 platform: arm64: add Lenovo Yoga C630 WOS EC driver Lenovo Yoga C630 WOS is a laptop using Snapdragon 850 SoC. Like many laptops it uses an embedded controller (EC) to perform various platform operations, including, but not limited, to Type-C port control or power supply handlng. Add the driver for the EC, that creates devices for UCSI and power supply devices. Reviewed-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240614-yoga-ec-driver-v7-2-9f0b9b40ae76@linaro.org [ij: added #include ] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 5958448d8edf6294d4a342b66bb57471a75c037d Author: Bjorn Andersson Date: Fri Jun 14 02:43:38 2024 +0300 dt-bindings: platform: Add Lenovo Yoga C630 EC Add binding for the Embedded Controller found in the Qualcomm Snapdragon-based Lenovo Yoga C630. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240614-yoga-ec-driver-v7-1-9f0b9b40ae76@linaro.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 33c0fb85b571b0f1bbdbf466e770eebeb29e6f41 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:28 2024 +0200 HID: bpf: make part of struct hid_device writable It is useful to change the name, the phys and/or the uniq of a struct hid_device during .rdesc_fixup(). For example, hid-uclogic.ko changes the uniq to store the firmware version to differentiate between 2 devices sharing the same PID. In the same way, changing the device name is useful when the device export 3 nodes, all with the same name. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-16-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit f1a5fb6c7cf637e991cedc799e1470e01e148669 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:27 2024 +0200 HID: bpf: rework hid_bpf_ops_btf_struct_access The idea is to provide a list of stucts and their editable fields. Currently no functional changes are introduced here, we will add some more writeable fields in the next patch. Acked-by: Alexei Starovoitov Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-15-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit bd0747543b3d973df6af0f43965f58965375d524 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:26 2024 +0200 bpf: allow bpf helpers to be used into HID-BPF struct_ops Without this helpers like bpf_printk() or bpf_map_update() are not available, making anything but change of bytes impossible to do. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-14-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit c94ae2189acac38b01be60e3b878605fb328782c Author: Benjamin Tissoires Date: Sat Jun 8 11:01:25 2024 +0200 HID: bpf: error on warnings when compiling bpf objects There is no real reasons to paper over warnings for such small programs. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-13-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 26ba1e0a982b9efe8b121d7e41dae4fdf118b048 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:24 2024 +0200 HID: bpf: Artist24: remove unused variable warning: unused variable ‘tilt’ [-Wunused-variable] Signed-off-by: Peter Hutterer Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-12-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 5f42e19de53faf9e6d4455638f75b7c3a3f8d58f Author: Benjamin Tissoires Date: Sat Jun 8 11:01:23 2024 +0200 Documentation: HID: add a small blurb on udev-hid-bpf This is the current decision we took: we don't provide automatic loading of HID-BPF by the kernel directly, but rely on an external tool for it. This tool is currently udev-hid-bpf, so let's make people aware of it. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-11-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit c5958697a5fa29d3ba9332205a88725afe9ed912 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:22 2024 +0200 Documentation: HID: amend HID-BPF for struct_ops Now that we are using struct_ops, the docs need to be changed. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-10-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 05b3b8f19441b6bf039cec1990de3c75bb9dbbd9 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:21 2024 +0200 selftests/hid: add subprog call test I got a weird verifier error with a subprog once, so let's have a test for it. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-9-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 4a86220e046da009bef0948e9f51d1d26d68f93c Author: Benjamin Tissoires Date: Sat Jun 8 11:01:20 2024 +0200 HID: bpf: remove tracing HID-BPF capability We can now rely on struct_ops as we cleared the users in-tree. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-8-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 50fe0fc6e206c9b85a0a6cc183ee5513d70179d1 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:19 2024 +0200 HID: bpf: convert in-tree fixes into struct_ops Very mechanical: - Change HID_BPF_DEVICE_EVENT and HID_BPF_RDESC_FIXUP #defines - add a matching SEC(".struct_ops.link") - in ArtistPro16Gen2 make the 2 functions static and have a new one calling them Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-7-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit df67602fb8d5a02e40f37efcf4b5cb958c8ca880 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:18 2024 +0200 HID: bpf: add defines for HID-BPF SEC in in-tree bpf fixes We are going to switch over struct_ops, so instead of having to manually replace all fields one by one, let's have a common place to change it. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-6-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit e342d6f6f7d82b48c4540b947d8032a3b7b3e6f8 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:17 2024 +0200 HID: samples: convert the 2 HID-BPF samples into struct_ops This is mostly mechanical: attach_prog is dropped, and the SEC are converted into struct_ops. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-5-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit d7696738d66b4f1379fe77eef61cd1047d7f0773 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:16 2024 +0200 selftests/hid: convert the hid_bpf selftests with struct_ops We drop the need for the attach() bpf syscall, but we need to set up the hid_id field before calling __load(). The .bpf.c part is mechanical: we create one struct_ops per HID-BPF program, as all the tests are for one program at a time. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-4-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit ebc0d8093e8c97de459615438edefad1a4ac352c Author: Benjamin Tissoires Date: Sat Jun 8 11:01:15 2024 +0200 HID: bpf: implement HID-BPF through bpf_struct_ops We do this implementation in several steps to not have the CI failing: - first (this patch), we add struct_ops while keeping the existing infra available - then we change the selftests, the examples and the existing in-tree HID-BPF programs - then we remove the existing trace points making old HID-BPF obsolete There are a few advantages of struct_ops over tracing: - compatibility with sleepable programs (for hid_hw_raw_request() in a later patch) - a lot simpler in the kernel: it's a simple rcu protected list - we can add more parameters to the function called without much trouble - the "attach" is now generic through BPF-core: the caller just needs to set hid_id and flags before calling __load(). - all the BPF tough part is not handled in BPF-core through generic processing - hid_bpf_ctx is now only writable where it needs be Acked-by: Alexei Starovoitov Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-3-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 99b40bf8053fa261d368ef78848961c04aa93c74 Author: Benjamin Tissoires Date: Sat Jun 8 11:01:14 2024 +0200 HID: bpf: add hid_get/put_device() helpers no code change, but this way we reduce code duplication and we can export it later. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-2-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 146a06a0d225cae240065233fd168fb0b95a10ff Author: Benjamin Tissoires Date: Sat Jun 8 11:01:13 2024 +0200 HID: rename struct hid_bpf_ops into hid_ops Those operations are the ones from HID, not HID-BPF, and I'd like to reuse hid_bpf_ops as the user facing struct_ops API. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-1-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires commit 970c3a6b7aa3c68ccdf5af2562c3d39533dd62a9 Author: Thomas Weißschuh Date: Sun May 26 20:17:18 2024 +0200 mfd: cros_ec: Register keyboard backlight subdevice Load cros_kbd_led_backlight when the EC reports EC_FEATURE_PWM_KEYB. This makes cros_kbd_led_backlight work on machines without specific ACPI or OF support for the keyboard backlight. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-4-ee577415a521@weissschuh.net Signed-off-by: Lee Jones commit baa19b650794d58d01ec3ea03c63eb4ae0fa9d84 Author: Thomas Weißschuh Date: Sun May 26 20:17:17 2024 +0200 platform/chrome: cros_kbd_led_backlight: allow binding through MFD The ChromeOS EC used in Framework laptops supports the standard CrOS EC keyboard backlight protocol. However the firmware on these laptops doesn't implement the ACPI ID GOOG0002 that is recognized by cros_kbd_led_backlight and they also don't use device tree. Prepare the existing cros_kbd_led_backlight driver to be probed through the CrOS EC MFD device which works without ACPI or OF support. Signed-off-by: Thomas Weißschuh Acked-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-3-ee577415a521@weissschuh.net Signed-off-by: Lee Jones commit 6b0d3355e5a58fd73529fa6f930a877caca3f75d Author: Thomas Weißschuh Date: Sun May 26 20:17:16 2024 +0200 leds: class: Add flag to avoid automatic renaming of LED devices Add a mechanism for drivers to opt-out of the automatic device renaming on conflicts. Those drivers will provide their own conflict resolution. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-2-ee577415a521@weissschuh.net Signed-off-by: Lee Jones commit bfefbecdeadc608c625e85259ad0a89d34728d61 Author: Thomas Weißschuh Date: Sun May 26 20:17:15 2024 +0200 leds: class: Warn about name collisions earlier Other warnings refer to the name after renaming, which is clearer when that name is mentioned first. It is also clearer where "ret" comes from. While at it, also add the necessary newline to the message and fix the parameter alignment. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-1-ee577415a521@weissschuh.net Signed-off-by: Lee Jones commit 3873d0d107c18a01112c25aa2b3cc3c42714385f Merge: 5f703ce5c981e 50bbc03931146 Author: Paolo Abeni Date: Fri Jun 14 10:50:58 2024 +0200 Merge branch 'series-to-deliver-ethernet-for-stm32mp13' Christophe Roullier says: ==================== Series to deliver Ethernet for STM32MP13 STM32MP13 is STM32 SOC with 2 GMACs instances GMAC IP version is SNPS 4.20. GMAC IP configure with 1 RX and 1 TX queue. DMA HW capability register supported RX Checksum Offload Engine supported TX Checksum insertion supported Wake-Up On Lan supported TSO supported Rework dwmac glue to simplify management for next stm32 (integrate RFC from Marek) V2: - Remark from Rob Herring (add Krzysztof's ack in patch 02/11, update in yaml) Remark from Serge Semin (upate commits msg) V3: - Remove PHY regulator patch and Ethernet2 DT because need to clarify how to manage PHY regulator (in glue or PHY side) - Integrate RFC from Marek - Remark from Rob Herring in YAML documentation V4: - Remark from Marek (remove max-speed, extra space in DT, update commit msg) - Remark from Rasmus (add sign-off, add base-commit) - Remark from Sai Krishna Gajula V5: - Fix warning during build CHECK_DTBS - Remark from Marek (glue + DT update) - Remark from Krzysztof about YAML (Make it symmetric) V6: - Replace pr_debug by dev_dbg - Split serie driver/DTs separately V7: - Remark from Marek (update sysconfig register mask) ==================== Link: https://lore.kernel.org/r/20240611083606.733453-1-christophe.roullier@foss.st.com Signed-off-by: Paolo Abeni commit 50bbc039311464af9a4c90be828750450e8cbed3 Author: Christophe Roullier Date: Tue Jun 11 10:36:06 2024 +0200 net: stmmac: dwmac-stm32: add management of stm32mp13 for stm32 Add Ethernet support for STM32MP13. STM32MP13 is STM32 SOC with 2 GMACs instances. GMAC IP version is SNPS 4.20. GMAC IP configure with 1 RX and 1 TX queue. DMA HW capability register supported RX Checksum Offload Engine supported TX Checksum insertion supported Wake-Up On Lan supported TSO supported Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Paolo Abeni commit 4f37dc467ffe5b56ab6b27cca207246172c0d861 Author: Christophe Roullier Date: Tue Jun 11 10:36:05 2024 +0200 net: stmmac: dwmac-stm32: Mask support for PMCR configuration Add possibility to have second argument in syscon property to manage mask. This mask will be used to address right BITFIELDS of PMCR register. Signed-off-by: Christophe Roullier Reviewed-by: Marek Vasut Signed-off-by: Paolo Abeni commit cbfad55322ceee283ff1dd053725b93c86018b88 Author: Marek Vasut Date: Tue Jun 11 10:36:04 2024 +0200 net: stmmac: dwmac-stm32: Fix Mhz to MHz Trivial, fix up the comments using 'Mhz' to 'MHz'. No functional change. Signed-off-by: Marek Vasut Signed-off-by: Christophe Roullier Signed-off-by: Paolo Abeni commit c60a54b52026bd2c9a88ae00f2aac7a67fed8e38 Author: Marek Vasut Date: Tue Jun 11 10:36:03 2024 +0200 net: stmmac: dwmac-stm32: Clean up the debug prints Use dev_err()/dev_dbg() and phy_modes() to print PHY mode instead of pr_debug() and hand-written PHY mode decoding. This way, each debug print has associated device with it and duplicated mode decoding is removed. Signed-off-by: Marek Vasut Signed-off-by: Christophe Roullier Signed-off-by: Paolo Abeni commit 92704f8c0e7a3868bf22a7d36ae205b880195e66 Author: Marek Vasut Date: Tue Jun 11 10:36:02 2024 +0200 net: stmmac: dwmac-stm32: Extract PMCR configuration Pull the PMCR clock mux configuration into a separate function. This is the final change of three, which moves external clock rate validation, external clock selector decoding, and clock mux configuration into separate functions. This should make the code easier to understand. No functional change intended. Signed-off-by: Marek Vasut Signed-off-by: Christophe Roullier Signed-off-by: Paolo Abeni commit 63b0aa8ea73f7a15912d5e6e44714f98bda8a03c Author: Marek Vasut Date: Tue Jun 11 10:36:01 2024 +0200 net: stmmac: dwmac-stm32: Separate out external clock selector Pull the external clock selector into a separate function, to avoid conflating it with external clock rate validation and clock mux register configuration. This should make the code easier to read and understand. The dwmac->enable_eth_ck variable in the end indicates whether the MAC clock are supplied by external oscillator (true) or internal RCC clock IP (false). The dwmac->enable_eth_ck value is set based on multiple DT properties, some of them deprecated, some of them specific to bus mode. The following DT properties and variables are taken into account. In each case, if the property is present or true, MAC clock is supplied by external oscillator. - "st,ext-phyclk", assigned to variable dwmac->ext_phyclk - Used in any mode (MII/RMII/GMII/RGMII) - The only non-deprecated DT property of the three - "st,eth-clk-sel", assigned to variable dwmac->eth_clk_sel_reg - Valid only in GMII/RGMII mode - Deprecated property, backward compatibility only - "st,eth-ref-clk-sel", assigned to variable dwmac->eth_ref_clk_sel_reg - Valid only in RMII mode - Deprecated property, backward compatibility only The stm32mp1_select_ethck_external() function handles the aforementioned DT properties and sets dwmac->enable_eth_ck accordingly. The stm32mp1_set_mode() is adjusted to call stm32mp1_select_ethck_external() first and then only use dwmac->enable_eth_ck to determine hardware clock mux settings. No functional change intended. Signed-off-by: Marek Vasut Signed-off-by: Christophe Roullier Signed-off-by: Paolo Abeni commit 582ac134963e2d5cf6c45db027e156fcfb7f7678 Author: Marek Vasut Date: Tue Jun 11 10:36:00 2024 +0200 net: stmmac: dwmac-stm32: Separate out external clock rate validation Pull the external clock frequency validation into a separate function, to avoid conflating it with external clock DT property decoding and clock mux register configuration. This should make the code easier to read and understand. This does change the code behavior slightly. The clock mux PMCR register setting now depends solely on the DT properties which configure the clock mux between external clock and internal RCC generated clock. The mux PMCR register settings no longer depend on the supplied clock frequency, that supplied clock frequency is now only validated, and if the clock frequency is invalid for a mode, it is rejected. Previously, the code would switch the PMCR register clock mux to internal RCC generated clock if external clock couldn't provide suitable frequency, without checking whether the RCC generated clock frequency is correct. Such behavior is risky at best, user should have configured their clock correctly in the first place, so this behavior is removed here. Signed-off-by: Marek Vasut Signed-off-by: Christophe Roullier Signed-off-by: Paolo Abeni commit 8a9044e5169bab7a8edadb4ceb748391657f0d7f Author: Christophe Roullier Date: Tue Jun 11 10:35:59 2024 +0200 dt-bindings: net: add STM32MP13 compatible in documentation for stm32 New STM32 SOC have 2 GMACs instances. GMAC IP version is SNPS 4.20. Signed-off-by: Christophe Roullier Reviewed-by: Conor Dooley Signed-off-by: Paolo Abeni commit d0398f51ffb3f706f38b235c7bb17da8658e3392 Author: Peng Fan Date: Fri May 10 11:19:47 2024 +0800 dt-bindings: firmware: arm,scmi: Add support for notification completion channel Per System Control Management Interface specification: "Completion interrupts: This transport supports polling or interrupt driven modes of communication. In interrupt mode, when the callee completes processing a message, it raises an interrupt to the caller. Hardware support for completion interrupts is optional." So, add an optional mailbox channel for notification completion interrupts. Signed-off-by: Peng Fan Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240510-scmi-notify-v2-1-e994cf14ef86@nxp.com Signed-off-by: Sudeep Holla commit dd22cc907a749ff34526e5b22a664d674f71c3de Author: Peng Fan Date: Sun Apr 28 15:51:05 2024 +0800 firmware: arm_scmi: Add support for system suspend in power control driver SCMI supports system suspend notification from the platform. The suuport for the same can be added in SCMI power control driver. However, currently there is no way to pass suspend level to pm_suspend() call from this driver, so use suspend-to-ram(S2R) will be used. Couple of things to note: 1) The userspace can still configure whatever default behaviour expected for S2R. 2) The userspace needs to keep the wakeup source enabled, otherwise the system may never resume back. Signed-off-by: Peng Fan Reviewed-by: Cristian Marussi Link: https://lore.kernel.org/r/20240428075105.2187837-1-peng.fan@oss.nxp.com Signed-off-by: Sudeep Holla commit 08070351c87879e5ca0b7b9bd6c2aa5bb2a4f11e Author: Dan Carpenter Date: Thu Jun 13 17:57:18 2024 +0300 MAINTAINERS: Add mailing list for SCMI drivers We have created a new mailing list specific to SCMI. Add it to the MAINTAINERS file. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/a9706e17-09ad-4304-828d-c0987befc8f7@moroto.mountain Signed-off-by: Sudeep Holla commit f8324128fdf8aeb174b4bda689121a3d6c48c860 Author: Jani Nikula Date: Fri Jun 7 18:25:40 2024 +0300 drm/i915: remove unused pipe/plane B register macros None of these are used. The parametrized register macros all depend on the pipe/plane A offset macros alone. Remove the unused ones. v2: Rebase Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/16d278bea466a69cdce94fd83d98dd15ce1a8c89.1717773890.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d6bbc4da2149f9dbf78c9f0fb742dea67cfa8057 Author: Jani Nikula Date: Fri Jun 7 18:25:39 2024 +0300 drm/i915: relocate some DSPCNTR reg bit definitions Some plane B/C specific bits were left next to the unused _DSPBCNTR macro. Move them next to the DSPCNTR() macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/85409fbe5073797c0dc17df43eeb25abe9ff889f.1717773890.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b1e6ae07c72ed93f1017e1821155212f33f465fe Author: Jani Nikula Date: Fri Jun 7 18:25:38 2024 +0300 drm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE() Do not rely on having dev_priv local variable, pass it to the macro. Cc: Zhenyu Wang Cc: Zhi Wang Cc: intel-gvt-dev@lists.freedesktop.org Reviewed-by: Zhi Wang Link: https://patchwork.freedesktop.org/patch/msgid/2ff78ebd0dc84178f5feacee7ef2a6cb4132b9ae.1717773890.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 200f178d7ca0b5dac1080a0e9e9bc02a8b65d17d Author: Jani Nikula Date: Fri Jun 7 18:25:37 2024 +0300 drm/i915/gvt: rename range variable to stride Range is a bit odd name for what really is stride. Rename. Switch to u32 while at it. Cc: Zhenyu Wang Cc: Zhi Wang Cc: intel-gvt-dev@lists.freedesktop.org Reviewed-by: Zhi Wang Link: https://patchwork.freedesktop.org/patch/msgid/8b8d4acee15da07845ed1779d6856d5c3f50a132.1717773890.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 51715cdc98596d92f4c6cde89946991ef0e5021e Author: Jani Nikula Date: Fri Jun 7 18:25:36 2024 +0300 drm/i915/gvt: use proper i915_reg_t for calc_index() parameters In order to be able to use the proper register macros instead of the underscore prefixed ones, pass i915_reg_t for the calc_index() parameters. Side note: DSPSURF is really about planes, not pipes. Fixed stride doesn't work for plane C for CHV (but that's okay for gvt). This doesn't support planes beyond C either. But all that is unrelated to the change at hand. Cc: Zhenyu Wang Cc: Zhi Wang Cc: intel-gvt-dev@lists.freedesktop.org Reviewed-by: Zhi Wang Link: https://patchwork.freedesktop.org/patch/msgid/282b19c44d83c96b52c261cfc7218e7e54076cba.1717773890.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 084a55b264a4918227d4eb52c792350791f2d26c Author: Jani Nikula Date: Fri Jun 7 18:25:35 2024 +0300 drm/i915/gvt: remove the unused end parameter from calc_index() All callers of calc_index() pass 0 for the end parameter. Remove it. Cc: Zhenyu Wang Cc: Zhi Wang Cc: intel-gvt-dev@lists.freedesktop.org Reviewed-by: Zhi Wang Link: https://patchwork.freedesktop.org/patch/msgid/aaa24a5cbcf876d3b95e0f5f6594f972a860b6bc.1717773890.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit befe87380e21f0d37633273e1068c9318f8135ff Author: Jerome Brunet Date: Tue Jun 11 15:35:08 2024 +0200 clk: meson: add missing MODULE_DESCRIPTION() macros Add the missing MODULE_DESCRIPTION() in the Amlogic clock modules missing it. Reported-by: Jeff Johnson Closes: https://lore.kernel.org/linux-clk/964210f1-671f-4ecc-bdb7-3cf53089c327@quicinc.com Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240611133512.341817-1-jbrunet@baylibre.com Signed-off-by: Jerome Brunet commit 5f703ce5c981ee02c00e210d5b155bbbfbf11263 Author: Lukasz Majewski Date: Mon Jun 10 15:39:14 2024 +0200 net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data This patch provides support for sending supervision HSR frames with MAC addresses stored in ProxyNodeTable when RedBox (i.e. HSR-SAN) is enabled. Supervision frames with RedBox MAC address (appended as second TLV) are only send for ProxyNodeTable nodes. This patch series shall be tested with hsr_redbox.sh script. Signed-off-by: Lukasz Majewski Reviewed-by: Wojciech Drewek Signed-off-by: David S. Miller commit 7758685b3976a1de9d70fa6f80d98d308782b3fb Author: Jacek Lawrynowicz Date: Tue Jun 11 14:04:32 2024 +0200 accel/ivpu: Remove unused ivpu_rpm_get_if_active() This is now dead code and has to be removed. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-16-jacek.lawrynowicz@linux.intel.com commit a0a306f9f618bf2409eda25f1449143a09b6584a Author: Jacek Lawrynowicz Date: Tue Jun 11 14:04:31 2024 +0200 accel/ivpu: Remove duplicated debug messages Remove duplicated debug messages from ivpu_jsm_(un)register_db(). Debug messages are already printed one level higher. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-15-jacek.lawrynowicz@linux.intel.com commit cf1d06ac53a15b83c0a63225606cfe175e33a8a0 Author: Andrzej Kacprowski Date: Tue Jun 11 14:04:30 2024 +0200 accel/ivpu: Increase autosuspend delay to 100ms on 40xx The new HW is more power efficient and there is no need to enter the D0i3/D3 so quickly. Increasing autosuspend delay reduces latency in certain usage scenarios. Signed-off-by: Andrzej Kacprowski Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-14-jacek.lawrynowicz@linux.intel.com commit 7e92061f1e9d1f6d3bfa6113719534f2c773b041 Author: Bartosz Golaszewski Date: Wed Jun 12 20:48:21 2024 +0200 gpiolib: put gpio_suffixes in a single compilation unit The gpio_suffixes array is defined in the gpiolib.h header. This means the array is stored in .rodata of every compilation unit that includes it. Put the definition for the array in gpiolib.c and export just the symbol in the header. We need the size of the array so expose it too. Reviewed-by: Mika Westerberg Link: https://lore.kernel.org/r/20240612184821.58053-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit a4d46253fa056d56b1c48dd5dfe3635817296bdb Author: Wachowski, Karol Date: Tue Jun 11 14:04:29 2024 +0200 accel/ivpu: Synchronize device unbind with recovery work Do not allow unbinding device in the middle of recovery flow. Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-13-jacek.lawrynowicz@linux.intel.com commit 86c1d13b8fb6cc63def27abd90a22fb1683eb67d Author: Jacek Lawrynowicz Date: Tue Jun 11 14:04:28 2024 +0200 accel/ivpu: Disable MMU before checking for idle Disable MMU communication before checking if NPU is idle. NPU may otherwise be woken up when adding/removing contexts. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-12-jacek.lawrynowicz@linux.intel.com commit 3f440e0b4852288268df4f0757c53ad3031df80c Author: Maciej Falkowski Date: Tue Jun 11 14:04:27 2024 +0200 accel/ivpu: Add test mode flag for disabling timeouts Add new test mode flag that will disable all timeouts defined in timeout fields of struct ivpu_device. Remove also reschedule_suspend field as it is unused. Signed-off-by: Maciej Falkowski Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-11-jacek.lawrynowicz@linux.intel.com commit 72b96ec655a59aa74d99b15527f7676e8926774f Author: Wachowski, Karol Date: Tue Jun 11 14:04:26 2024 +0200 accel/ivpu: Make parts of FW image read-only Implement setting specified buffer ranges as read-only. In case if specified range is not 64K aligned and 64K contiguous MMU600 pages are turned on, split 64K mapping to allow 4K granularity for read-only configuration. Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-10-jacek.lawrynowicz@linux.intel.com commit f1432983d51b101c87dc86f9b5dbf64adfd0291d Author: Wachowski, Karol Date: Tue Jun 11 14:04:25 2024 +0200 accel/ivpu: Update FW BOOT API headers This commit bumps BOOT API version to 3.24 Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-9-jacek.lawrynowicz@linux.intel.com commit d55923bf471ae20874afdcb7ae90ddcb8a923abb Author: Jacek Lawrynowicz Date: Tue Jun 11 14:04:24 2024 +0200 accel/ivpu: Make selected params read-only Make disable_mmu_cont_pages and force_snoop params read-only. It is unsafe to change these params after driver is loaded. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-8-jacek.lawrynowicz@linux.intel.com commit a19bffb10c46744760e3c91cf6b5b58a998a4ba9 Author: Jacek Lawrynowicz Date: Tue Jun 11 14:04:23 2024 +0200 accel/ivpu: Implement DCT handling When host system is under heavy load and the NPU is already running on the lowest frequency, PUNIT may request Duty Cycle Throttling (DCT). This will further reduce NPU power usage. PUNIT requests DCT mode using Survabilty IRQ and mailbox register. The driver then issues a JSM message to the FW that enables the DCT mode. If the NPU resets while in DCT mode, the driver request DCT mode during FW boot. Also add debugfs "dct" file that allows to set arbitrary DCT percentage, which is used by driver tests. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-7-jacek.lawrynowicz@linux.intel.com commit ab4484cd863b3637ec8e03318532785476d12dfc Author: Wachowski, Karol Date: Tue Jun 11 14:04:22 2024 +0200 accel/ivpu: Disable clock relinquish for MMIO reset It is required to disable NPU clock relinquish for the time of MMIO reset. Clock relinquish gets into default (enabled) state after MMIO reset is performed. Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-6-jacek.lawrynowicz@linux.intel.com commit 52ab5be191c42fe1bffac97ee248a237b9712889 Author: Wachowski, Karol Date: Tue Jun 11 14:04:21 2024 +0200 accel/ivpu: Disable disable_clock_relinquish WA for LNL B0+ This WA is only needed for LNL revision A. Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-5-jacek.lawrynowicz@linux.intel.com commit 7d4b4c74432d536a4d8139e0504cf41993d5ee6e Author: Jacek Lawrynowicz Date: Tue Jun 11 14:04:20 2024 +0200 accel/ivpu: Remove suspend_reschedule_counter Don't retry runtime suspend. It is now expected to succeed on the first try. After autosuspend_delay passed, FW should already be idle and ready for warm suspend. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-4-jacek.lawrynowicz@linux.intel.com commit b7ed87ffc7341d108bc0ce14b15f8546eca4aa50 Author: Maciej Falkowski Date: Tue Jun 11 14:04:19 2024 +0200 accel/ivpu: Abort jobs of faulty context Abort all jobs that belong to contexts generating MMU faults in order to avoid flooding host with MMU IRQs. Jobs are cancelled with: - SSID_RELEASE command when OS scheduling is enabled - DESTROY_CMDQ command when HW scheduling is enabled Signed-off-by: Maciej Falkowski Co-developed-by: Wachowski, Karol Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-3-jacek.lawrynowicz@linux.intel.com commit d9dfc4eaa3c6bfbd072980a265edbaffbea4db4a Author: Wachowski, Karol Date: Tue Jun 11 14:04:18 2024 +0200 accel/ivpu: Add wp0_during_power_up WA Send workpoint 0 request during power up on 37xx. This is needed in rare case where WP0 was not sent during power down due to device hang. Signed-off-by: Wachowski, Karol Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-2-jacek.lawrynowicz@linux.intel.com commit 48cf7e01386e7e35ea12255bc401bdd484c34e7d Author: Chen Wang Date: Fri Nov 24 14:15:16 2023 +0800 clk: sophgo: Add SG2042 clock driver Add a driver for the SOPHGO SG2042 clocks. Signed-off-by: Chen Wang commit 5911423798b2eba65d6ea0aff6505280b3eb55e6 Author: Chen Wang Date: Fri Nov 24 14:02:43 2023 +0800 dt-bindings: clock: sophgo: add clkgen for SG2042 Add bindings for the clock generator of divider/mux and gates working for other subsystem than RP subsystem for Sophgo SG2042. Signed-off-by: Chen Wang Reviewed-by: Rob Herring commit 5a7144d61d73d801540f8846d8e1b9fa52a5559c Author: Chen Wang Date: Wed Jan 31 09:57:01 2024 +0800 dt-bindings: clock: sophgo: add RP gate clocks for SG2042 Add bindings for the gate clocks of RP subsystem for Sophgo SG2042. Signed-off-by: Chen Wang Reviewed-by: Rob Herring commit 88a26c3c2405626e0083a49609c5e8cd6c453d87 Author: Chen Wang Date: Mon Jan 15 17:58:46 2024 +0800 dt-bindings: clock: sophgo: add pll clocks for SG2042 Add bindings for the pll clocks for Sophgo SG2042. Signed-off-by: Chen Wang Reviewed-by: Rob Herring Reviewed-by: Guo Ren commit 5bc4a0132d7acf0cad739342584a249f748a6c61 Author: Hans Verkuil Date: Thu Jun 13 17:19:08 2024 +0200 media: imx283: drop CENTERED_RECTANGLE due to clang failure The CENTERED_RECTANGLE define fails to compile on clang and old gcc versions. Just drop it and fill in the crop rectangles explicitly. Signed-off-by: Hans Verkuil Reviewed-by: Kieran Bingham Acked-by: Sakari Ailus commit 65b37df8c61ceea863ac0ac188fe3464c2ee3ac0 Author: Ian Rogers Date: Wed Jun 12 05:40:27 2024 -0700 perf test pmu: Warn don't fail for legacy mixed case event names PowerPC has mixed case events matching legacy hardware cache events. Warn but don't fail in this case. Event parsing will still work in this case by matching the legacy case. Signed-off-by: Ian Rogers Tested-by: Kajol Jain Cc: James Clark Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240612124027.2712643-1-irogers@google.com commit 245b0edf4838874801cd35b0507ed9ec38742e8e Author: Athira Rajeev Date: Fri Jun 7 10:13:54 2024 +0530 tools/perf: Fix timing issue with parallel threads in perf bench wake-up-parallel perf bench futex fails as below and hangs intermittently when attempted to run on on a powerpc system: ./perf bench futex wake-parallel Running 'futex/wake-parallel' benchmark: Run summary [PID 88588]: blocking on 640 threads (at [private] futex 0x10464b8c), 640 threads waking up 1 at a time. [Run 1]: Avg per-thread latency (waking 1/640 threads) in 0.1309 ms (+-53.27%) [Run 2]: Avg per-thread latency (waking 1/640 threads) in 0.0120 ms (+-31.16%) [Run 3]: Avg per-thread latency (waking 1/640 threads) in 0.1474 ms (+-92.47%) [Run 4]: Avg per-thread latency (waking 1/640 threads) in 0.2883 ms (+-67.75%) [Run 5]: Avg per-thread latency (waking 1/640 threads) in 0.4108 ms (+-39.60%) [Run 6]: Avg per-thread latency (waking 1/640 threads) in 0.7843 ms (+-78.98%) perf: couldn't wakeup all tasks (0/1) perf: couldn't wakeup all tasks (0/1) perf: couldn't wakeup all tasks (0/1) perf: couldn't wakeup all tasks (0/1) perf: couldn't wakeup all tasks (0/1) perf: couldn't wakeup all tasks (0/1) In the system, where perf bench wake-up-parallel is has system configuration of 640 cpus. After debugging, this turned out to be a timing issue. The benchmark creates threads equal to number of cpus and issues a futex_wait. Then it does a usleep for .1 second before initiating futex_wake. In system configuration with more threads, the usleep time is not enough. Patch changes the usleep from 100000 to 200000 With the patch, ran multiple iterations and there were no issues further seen Reported-by: Disha Goel Signed-off-by: Athira Rajeev Reviewed-by: Ian Rogers Tested-by: Disha Goel Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607044354.82225-3-atrajeev@linux.vnet.ibm.com commit 3638e44542a56e8adc2018df4894eaf31d387c54 Author: Athira Rajeev Date: Fri Jun 7 10:13:53 2024 +0530 tools/perf: Fix perf bench epoll to enable the run when some CPU's are offline Perf bench epoll fails as below when attempted to run on on a powerpc system: ./perf bench epoll wait Running 'epoll/wait' benchmark: Run summary [PID 627653]: 79 threads monitoring on 64 file-descriptors for 8 secs. perf: pthread_create: No such file or directory In the setup where this perf bench was ran, difference was that partition had 640 CPU's, but not all CPUs were online. 80 CPUs were online. While creating threads and using epoll_wait , code sets the affinity using cpumask. The cpumask size used is 80 which is picked from "nrcpus = perf_cpu_map__nr(cpu)". Here the benchmark reports fail while setting affinity for cpu number which is greater than 80 or higher, because it attempts to set a bit position which is not allocated on the cpumask. Fix this by changing the size of cpumask to number of possible cpus and not the number of online cpus. Signed-off-by: Athira Rajeev Reviewed-by: Ian Rogers Tested-by: Disha Goel Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607044354.82225-2-atrajeev@linux.vnet.ibm.com commit 183373586743a73da51b505ae3f4e5eb6300f208 Author: Athira Rajeev Date: Fri Jun 7 10:13:52 2024 +0530 tools/perf: Fix perf bench futex to enable the run when some CPU's are offline Perf bench futex fails as below when attempted to run on on a powerpc system: ./perf bench futex all Running futex/hash benchmark... Run summary [PID 626307]: 80 threads, each operating on 1024 [private] futexes for 10 secs. perf: pthread_create: No such file or directory In the setup where this perf bench was ran, difference was that partition had 640 CPU's, but not all CPUs were online. 80 CPUs were online. While blocking the threads with futex_wait, code sets the affinity using cpumask. The cpumask size used is 80 which is picked from "nrcpus = perf_cpu_map__nr(cpu)". Here the benchmark reports fail while setting affinity for cpu number which is greater than 80 or higher, because it attempts to set a bit position which is not allocated on the cpumask. Fix this by changing the size of cpumask to number of possible cpus and not the number of online cpus. Signed-off-by: Athira Rajeev Reviewed-by: Ian Rogers Tested-by: Disha Goel Cc: akanksha@linux.ibm.com Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607044354.82225-1-atrajeev@linux.vnet.ibm.com commit 6c1785cd75ef55a308701813330a162002ffe192 Author: Ian Rogers Date: Mon Jun 10 22:06:26 2024 -0700 perf record: Ensure space for lost samples Previous allocation didn't account for sample ID written after the lost samples event. Switch from malloc/free to a stack allocation. Reported-by: Milian Wolff Closes: https://lore.kernel.org/linux-perf-users/23879991.0LEYPuXRzz@milian-workstation/ Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240611050626.1223155-1-irogers@google.com commit b57cd5703a1618e87772094ac12c5ee7d6c35e2f Author: Ben Walsh Date: Thu Jun 13 22:25:42 2024 +0100 platform/chrome: cros_ec_lpc: Handle zero length read/write cros_ec_lpc_mec_read_bytes and cros_ec_lpc_mec_write_bytes call cros_ec_lpc_mec_in_range, which checks if addresses are in the MEC address range, and returns -EINVAL if the range given is not sensible. However cros_ec_lpc_mec_in_range was also returning -EINVAL for a zero length range. A zero length range should not be an error condition. cros_ec_lpc_mec_in_range now returns 1 in this case. cros_ec_lpc_io_bytes_mec checks for zero length, and returns immediately without beginning a transfer. Fixes: 68dbac0a58ef ("platform/chrome: cros_ec_lpc: MEC access can return error code") Fixes: 77a714325d09 ("platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes()") Signed-off-by: Ben Walsh Link: https://lore.kernel.org/r/20240613212542.403-1-ben@jubnut.com Signed-off-by: Tzung-Bi Shih commit 3a0fa8e97d3024de199634667900b6a90bbe43d0 Author: Dr. David Alan Gilbert Date: Thu May 30 21:52:45 2024 +0100 fpga: altera-fpga2sdram: remove unused struct 'prop_map' 'prop_map' has been unused since the original commit e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Russ Weight Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20240530205245.125513-1-linux@treblig.org Signed-off-by: Xu Yilun commit 6e7e2e7e6327c1907ebd0b0ed60563f51edc4d92 Merge: cf157f33f44d8 3b0a95ed7782d Author: Jakub Kicinski Date: Thu Jun 13 17:07:13 2024 -0700 Merge branch 'net-dsa-lantiq_gswip-code-improvements' Martin Schiller says: ==================== net: dsa: lantiq_gswip: code improvements This patchset for the lantiq_gswip driver is a collection of minor fixes and coding improvements by Martin Blumenstingl without any real changes in the actual functionality. ==================== Link: https://lore.kernel.org/r/20240611135434.3180973-1-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit 3b0a95ed7782dce88a5ef4860dcaab962cec9527 Author: Martin Blumenstingl Date: Tue Jun 11 15:54:34 2024 +0200 net: dsa: lantiq_gswip: Improve error message in gswip_port_fdb() Print that no FID is found for bridge %s instead of the incorrect message that the port is not part of a bridge. Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Vladimir Oltean Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-13-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit e19fbe3996aae35a467ebad35ff2b8d84975a65c Author: Martin Blumenstingl Date: Tue Jun 11 15:54:33 2024 +0200 net: dsa: lantiq_gswip: Update comments in gswip_port_vlan_filtering() Update the comments in gswip_port_vlan_filtering() so it's clear that there are two separate cases, one for "tag based VLAN" and another one for "port based VLAN". Suggested-by: Martin Schiller Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Vladimir Oltean Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-12-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit b068706b7831ccf7c7f1a56a65862fbcc28d061f Author: Martin Schiller Date: Tue Jun 11 15:54:32 2024 +0200 net: dsa: lantiq_gswip: Remove dead code from gswip_add_single_port_br() The port validation in gswip_add_single_port_br() is superfluous and can be omitted. Suggested-by: Vladimir Oltean Signed-off-by: Martin Schiller Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20240611135434.3180973-11-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit e6c34597f89ac98c06176eed57f125252015a330 Author: Martin Blumenstingl Date: Tue Jun 11 15:54:31 2024 +0200 net: dsa: lantiq_gswip: Consistently use macros for the mac bridge table Only bits [5:0] in mac_bridge.key[3] are reserved for the FID. Also, for dynamic (learned) entries, bits [7:4] in mac_bridge.val[0] represents the port. Introduce new macros GSWIP_TABLE_MAC_BRIDGE_KEY3_FID and GSWIP_TABLE_MAC_BRIDGE_VAL0_PORT macro and use it throughout the driver. Also rename and update GSWIP_TABLE_MAC_BRIDGE_VAL1_STATIC to use the BIT() macro. This makes the driver code easier to understand. Signed-off-by: Martin Blumenstingl Signed-off-by: Martin Schiller Acked-by: Hauke Mehrtens Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20240611135434.3180973-10-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit c927b6e47b5cc7324217bf5fe7e6ccd0633971a0 Author: Martin Blumenstingl Date: Tue Jun 11 15:54:30 2024 +0200 net: dsa: lantiq_gswip: Change literal 6 to ETH_ALEN The addr variable in gswip_port_fdb_dump() stores a mac address. Use ETH_ALEN to make this consistent across other drivers. Signed-off-by: Martin Blumenstingl Reviewed-by: Vladimir Oltean Acked-by: Hauke Mehrtens Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-9-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit 7168ec1b06691295db6b335e5f5f6c86c7061213 Author: Martin Blumenstingl Date: Tue Jun 11 15:54:29 2024 +0200 net: dsa: lantiq_gswip: Use dsa_is_cpu_port() in gswip_port_change_mtu() Make the check for the CPU port in gswip_port_change_mtu() consistent with other areas of the driver by using dsa_is_cpu_port(). Signed-off-by: Martin Blumenstingl Reviewed-by: Vladimir Oltean Acked-by: Hauke Mehrtens Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-8-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit 86b9ea6412af41914ef6549f85a849c3b987f4f3 Author: Martin Schiller Date: Tue Jun 11 15:54:28 2024 +0200 net: dsa: lantiq_gswip: do also enable or disable cpu port Before commit 74be4babe72f ("net: dsa: do not enable or disable non user ports"), gswip_port_enable/disable() were also executed for the cpu port in gswip_setup() which disabled the cpu port during initialization. Let's restore this by removing the dsa_is_user_port checks. Also, let's clean up the gswip_port_enable() function so that we only have to check for the cpu port once. The operation reordering done here is safe. Signed-off-by: Martin Schiller Acked-by: Hauke Mehrtens Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20240611135434.3180973-7-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit f5ebf9ab60940b00c36dfe64add41c80f3daff6a Author: Martin Blumenstingl Date: Tue Jun 11 15:54:27 2024 +0200 net: dsa: lantiq_gswip: Don't manually call gswip_port_enable() We don't need to manually call gswip_port_enable() from within gswip_setup() for the CPU port. DSA does this automatically for us. Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Vladimir Oltean Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-6-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit 1763b155da022ac0f984463e68cb0cda8ffc1fe8 Author: Martin Blumenstingl Date: Tue Jun 11 15:54:26 2024 +0200 net: dsa: lantiq_gswip: Use dev_err_probe where appropriate dev_err_probe() can be used to simplify the existing code. Also it means we get rid of the following warning which is seen whenever the PMAC (Ethernet controller which connects to GSWIP's CPU port) has not been probed yet: gswip 1e108000.switch: dsa switch register failed: -517 Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Vladimir Oltean Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-5-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit dd6d364e1895211df8a8fe02c2a5a0b2a7049957 Author: Martin Schiller Date: Tue Jun 11 15:54:25 2024 +0200 net: dsa: lantiq_gswip: add terminating \n where missing Some dev_err are missing the terminating \n. Let's add that. Suggested-by: Vladimir Oltean Signed-off-by: Martin Schiller Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20240611135434.3180973-4-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit b98f122ebdac28b0c932f3f4474eb0927c39297b Author: Martin Blumenstingl Date: Tue Jun 11 15:54:24 2024 +0200 net: dsa: lantiq_gswip: Only allow phy-mode = "internal" on the CPU port Add the CPU port to gswip_xrx200_phylink_get_caps() and gswip_xrx300_phylink_get_caps(). It connects through a SoC-internal bus, so the only allowed phy-mode is PHY_INTERFACE_MODE_INTERNAL. Signed-off-by: Martin Blumenstingl Reviewed-by: Vladimir Oltean Acked-by: Hauke Mehrtens Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20240611135434.3180973-3-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit c7f75954212b5e64f6b1f2375215b02fd79758ce Author: Martin Schiller Date: Tue Jun 11 15:54:23 2024 +0200 dt-bindings: net: dsa: lantiq,gswip: convert to YAML schema Convert the lantiq,gswip bindings to YAML format. Also add this new file to the MAINTAINERS file. Furthermore, the CPU port has to specify a phy-mode and either a phy or a fixed-link. Since GSWIP is connected using a SoC internal protocol there's no PHY involved. Add phy-mode = "internal" and a fixed-link to the example code to describe the communication between the PMAC (Ethernet controller) and GSWIP switch. Signed-off-by: Martin Schiller Reviewed-by: Rob Herring (Arm) Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20240611135434.3180973-2-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit cf157f33f44d8a6dce803f967d8aac3032e03a43 Merge: 4c7d3d79c7361 7fc45cb68696c Author: Jakub Kicinski Date: Thu Jun 13 16:45:09 2024 -0700 Merge branch 'mana-shared' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Leon Romanovsky says: ==================== net: mana: Allow variable size indirection table Like we talked, I created new shared branch for this patch: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=mana-shared * 'mana-shared' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: net: mana: Allow variable size indirection table ==================== Link: https://lore.kernel.org/all/20240612183051.GE4966@unreal Signed-off-by: Jakub Kicinski commit 52115fc32905c0bacc244f1dace9a138518df0de Author: Thomas Weißschuh Date: Fri Jun 14 01:01:42 2024 +0200 hwmon: (core) Make hwmon_class const Now that the driver core allows for struct class to be in read-only memory, mark hwmon_class as const. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240614-class-const-hwmon-v1-1-27b910d06a90@weissschuh.net Signed-off-by: Guenter Roeck commit cdbde084d163835ef41cabb59be2292bb0421c51 Merge: 373a4e13ab4bc 2d45ab1eda469 Author: Alexei Starovoitov Date: Thu Jun 13 16:33:04 2024 -0700 Merge branch 'bpf-make-trusted-args-nullable' Vadim Fedorenko says: ==================== bpf: make trusted args nullable Current verifier checks for the arg to be nullable after checking for certain pointer types. It prevents programs to pass NULL to kfunc args even if they are marked as nullable. This patchset adjusts verifier and changes bpf crypto kfuncs to allow null for IV parameter which is optional for some ciphers. Benchmark shows ~4% improvements when there is no need to initialise 0-sized dynptr. v3: - add special selftest for nullable parameters v2: - adjust kdoc accordingly ==================== Link: https://lore.kernel.org/r/20240613211817.1551967-1-vadfed@meta.com Signed-off-by: Alexei Starovoitov commit 2d45ab1eda469c802728d0a74e1601de5e71c098 Author: Vadim Fedorenko Date: Thu Jun 13 14:18:17 2024 -0700 selftests: bpf: add testmod kfunc for nullable params Add special test to be sure that only __nullable BTF params can be replaced by NULL. This patch adds fake kfuncs in bpf_testmod to properly test different params. Acked-by: Eduard Zingerman Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20240613211817.1551967-6-vadfed@meta.com Signed-off-by: Alexei Starovoitov commit 9b560751f75f7b2484fa22c781be68f4f9fec2b0 Author: Vadim Fedorenko Date: Thu Jun 13 14:18:16 2024 -0700 selftests: bpf: crypto: adjust bench to use nullable IV The bench shows some improvements, around 4% faster on decrypt. Before: Benchmark 'crypto-decrypt' started. Iter 0 (325.719us): hits 5.105M/s ( 5.105M/prod), drops 0.000M/s, total operations 5.105M/s Iter 1 (-17.295us): hits 5.224M/s ( 5.224M/prod), drops 0.000M/s, total operations 5.224M/s Iter 2 ( 5.504us): hits 4.630M/s ( 4.630M/prod), drops 0.000M/s, total operations 4.630M/s Iter 3 ( 9.239us): hits 5.148M/s ( 5.148M/prod), drops 0.000M/s, total operations 5.148M/s Iter 4 ( 37.885us): hits 5.198M/s ( 5.198M/prod), drops 0.000M/s, total operations 5.198M/s Iter 5 (-53.282us): hits 5.167M/s ( 5.167M/prod), drops 0.000M/s, total operations 5.167M/s Iter 6 (-17.809us): hits 5.186M/s ( 5.186M/prod), drops 0.000M/s, total operations 5.186M/s Summary: hits 5.092 ± 0.228M/s ( 5.092M/prod), drops 0.000 ±0.000M/s, total operations 5.092 ± 0.228M/s After: Benchmark 'crypto-decrypt' started. Iter 0 (268.912us): hits 5.312M/s ( 5.312M/prod), drops 0.000M/s, total operations 5.312M/s Iter 1 (124.869us): hits 5.354M/s ( 5.354M/prod), drops 0.000M/s, total operations 5.354M/s Iter 2 (-36.801us): hits 5.334M/s ( 5.334M/prod), drops 0.000M/s, total operations 5.334M/s Iter 3 (254.628us): hits 5.334M/s ( 5.334M/prod), drops 0.000M/s, total operations 5.334M/s Iter 4 (-77.691us): hits 5.275M/s ( 5.275M/prod), drops 0.000M/s, total operations 5.275M/s Iter 5 (-164.510us): hits 5.313M/s ( 5.313M/prod), drops 0.000M/s, total operations 5.313M/s Iter 6 (-81.376us): hits 5.346M/s ( 5.346M/prod), drops 0.000M/s, total operations 5.346M/s Summary: hits 5.326 ± 0.029M/s ( 5.326M/prod), drops 0.000 ±0.000M/s, total operations 5.326 ± 0.029M/s Reviewed-by: Eduard Zingerman Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20240613211817.1551967-5-vadfed@meta.com Signed-off-by: Alexei Starovoitov commit 9363dc8ddc4e222c4259013ae5428070712910b9 Author: Vadim Fedorenko Date: Thu Jun 13 14:18:15 2024 -0700 selftests: bpf: crypto: use NULL instead of 0-sized dynptr Adjust selftests to use nullable option for state and IV arg. Reviewed-by: Eduard Zingerman Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20240613211817.1551967-4-vadfed@meta.com Signed-off-by: Alexei Starovoitov commit 65d6d61d25968d1f13a478a6f303ed8d6b978a77 Author: Vadim Fedorenko Date: Thu Jun 13 14:18:14 2024 -0700 bpf: crypto: make state and IV dynptr nullable Some ciphers do not require state and IV buffer, but with current implementation 0-sized dynptr is always needed. With adjustment to verifier we can provide NULL instead of 0-sized dynptr. Make crypto kfuncs ready for this. Reviewed-by: Eduard Zingerman Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20240613211817.1551967-3-vadfed@meta.com Signed-off-by: Alexei Starovoitov commit a90797993afcb0eaf6bf47a062ff47eb3810a6d5 Author: Vadim Fedorenko Date: Thu Jun 13 14:18:13 2024 -0700 bpf: verifier: make kfuncs args nullalble Some arguments to kfuncs might be NULL in some cases. But currently it's not possible to pass NULL to any BTF structures because the check for the suffix is located after all type checks. Move it to earlier place to allow nullable args. Acked-by: Eduard Zingerman Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20240613211817.1551967-2-vadfed@meta.com Signed-off-by: Alexei Starovoitov commit 8cab033628b12c6f55aea4170dfe565761336a95 Author: Konrad Dybcio Date: Thu Jun 6 13:36:02 2024 +0200 clk: qcom: Add QCM2290 GPU clock controller driver Add a driver for the GPU clock controller block found on the QCM2290 SoC. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240606-topic-rb1_gpu-v4-3-4bc0c19da4af@linaro.org Signed-off-by: Bjorn Andersson commit 7606e60522a63a9e78bc779bbd4c7e1c7f1e984b Author: Jeff Johnson Date: Wed Jun 12 19:44:37 2024 -0700 fbdev: vfb: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/vfb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit 47856a63fd6a56099abba53655a73880d9fbdf7a Author: Jeff Johnson Date: Wed Jun 12 18:59:53 2024 -0700 fbdev: macmodes: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/macmodes.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit e4d52c0ea3ded15ee0634f6679629a620ebf35d2 Author: Jeff Johnson Date: Wed Jun 12 15:01:11 2024 -0700 fbdev: goldfishfb: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/goldfishfb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit b4bc18a0a6ba7a3ee83277c5b0705cb87ba10b52 Author: Jeff Johnson Date: Wed Jun 12 10:10:40 2024 -0700 fbdev: kyro: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/kyro/kyrofb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit 7cf51220bc6a163a41e43b7bfff35e081765ce47 Author: Jeff Johnson Date: Wed Jun 12 08:50:53 2024 -0700 fbdev: viafb: add missing MODULE_DESCRIPTION() macro With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/via/viafb.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit f709f1cf65aca8e5379ca23b0faa52be6839fa75 Author: Jeff Johnson Date: Wed Jun 12 08:32:22 2024 -0700 fbdev: matroxfb: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_accel.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_DAC1064.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/fbdev/matrox/matroxfb_Ti3026.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Helge Deller commit d6161b7d8b33aa8756ab2f7eed8cb371c2e7e8ed Author: Geert Uytterhoeven Date: Wed Jun 12 15:42:29 2024 +0200 video/logo: Remove linux_serial_image comments The last user of the serial_console ASCII image was removed in v2.1.115. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit 3dc59489fda386bd3fedbb1787ee08619afd5aee Author: Geert Uytterhoeven Date: Wed Jun 12 15:41:17 2024 +0200 video/logo: Make logo data const again As gcc-4.1 is no longer supported, the logo data can be made const again. Hence revert commit 15e3252464432a29 ("fbdev: work around old compiler bug"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit 4c7d3d79c736186bb2585f2d0a8231e1fac839da Merge: 3ec8d7572a69d d20f6b3d747c3 Author: Jakub Kicinski Date: Thu Jun 13 13:13:38 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. No conflicts, no adjacent changes. Signed-off-by: Jakub Kicinski commit 156922faabcef2979cb2ddc2fbaa659b5ea37f54 Author: Tony Luck Date: Tue Jun 11 10:34:06 2024 -0700 media: atomisp: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Reviewed-by: Andy Shevchenko Acked-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 6bad28cfc30988a845fb3f59a99f4b8a4ce8fe95 Author: Thomas Weißschuh Date: Sun Jun 9 13:13:28 2024 +0200 ACPI: SBS: manage alarm sysfs attribute through psy core Let the power supply core register the attribute. This ensures that the attribute is created before the device is announced to userspace, avoiding a race condition. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki commit a231eed10ed5a290129fda36ad7bcc263c53ff7d Author: Thomas Weißschuh Date: Sun Jun 9 09:27:16 2024 +0200 ACPI: battery: create alarm sysfs attribute atomically Let the power supply core register the attribute. This ensures that the attribute is created before the device is announced to userspace, avoid a race condition. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki commit aa532663072c445ba92cb9438ed80533c29bbacb Author: Thomas Weißschuh Date: Sun Jun 9 09:27:15 2024 +0200 ACPI: battery: use sysfs_emit over sprintf sysfs_emit validates assumptions made by sysfs and is the correct mechanism to format data for sysfs. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki commit 3483053d2c1286658a7ce7d7311244882770c99a Author: Thomas Weißschuh Date: Sun Jun 9 09:27:14 2024 +0200 ACPI: battery: constify powersupply properties The arrays are never modified, make them const. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki commit 41653463e1eadd4386acaa2ec55202536d20a60f Author: Thomas Weißschuh Date: Sun Jun 9 09:27:13 2024 +0200 ACPI: SBS: constify powersupply properties The arrays are never modified, make them const. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki commit 158ee9f1384a66fdcd28cf84a578fab9f431c45e Author: Thomas Weißschuh Date: Sun Jun 9 09:27:12 2024 +0200 ACPI: AC: constify powersupply properties The array is never modified, make it const. Signed-off-by: Thomas Weißschuh Signed-off-by: Rafael J. Wysocki commit f42cfd5ceced62799a7dd82899b03d7b9575fc22 Author: Andy Shevchenko Date: Thu Jun 6 23:54:16 2024 +0300 ACPI: PMIC: Replace open coded be16_to_cpu() It's easier to understand the nature of a data type when it's written explicitly. With that, replace open coded endianess conversion. As a side effect it fixes the returned value of intel_crc_pmic_update_aux() since ACPI PMIC core code expects negative or zero and never uses positive one. While at it, use macros from bits.h to reduce a room for mistake. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 1dd804af345a126594a8b8e80510590b5775073b Author: Andy Shevchenko Date: Thu Jun 6 23:54:15 2024 +0300 ACPI: PMIC: Convert pr_*() to dev_*() printing macros Since we have a device pointer in the regmap, use it for error messages. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 58e04f315295ea3637a119686bb2e3ee6cef1f04 Author: Andy Shevchenko Date: Thu Jun 6 23:54:14 2024 +0300 ACPI: PMIC: Use sizeof() instead of hard coded value It's better to use sizeof() of a given buffer than spreading a hard coded value. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 14d38356ec335b97a04c00719d7b6e73b136d291 Author: Bart Van Assche Date: Wed Jun 12 10:15:21 2024 -0700 scsi: core: Fix an incorrect comment The comment that scsi_static_device_list would go away was added more than 18 years ago. Today, that list is still there and a large number of additional entries have been added. This shows that this comment is incorrect. Hence fix that comment. Cc: Christoph Hellwig Cc: Avri Altman Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240612171522.2677600-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 79a947bd54348d4f63120aacc30505b3ad81fa59 Author: Thorsten Blum Date: Thu Jun 6 20:52:02 2024 +0200 ACPI: NUMA: Consolidate header includes The header file acpi/acpi_numa.h is included whether CONFIG_ACPI is defined or not. Include it only once before the #ifdef/#else/#endif preprocessor directives and fix the following make includecheck warning: acpi/acpi_numa.h is included more than once Signed-off-by: Thorsten Blum Signed-off-by: Rafael J. Wysocki commit 8c6294ccb56830fcd573461ddd27a1f32198216a Author: Petr Tesařík Date: Thu Jun 6 13:55:41 2024 +0200 ACPI: CPPC: add sysfs entry for guaranteed performance Expose the CPPC guaranteed performance as reported by the platform through GuaranteedPerformanceRegister. The current value is already read in cppc_get_perf_caps() and stored in struct cppc_perf_caps (to be used by the intel_pstate driver), so only the attribute itself needs to be defined. Signed-off-by: Petr Tesařík Signed-off-by: Rafael J. Wysocki commit 74c2a2ae6a14b2dccf0cb1b404dc6d243cabe78e Author: Huang Ying Date: Thu Jun 6 10:28:45 2024 +0800 ACPI: HMAT: Use ACCESS_COORDINATE_CPU when appropriate To improve the readability of the code via replacing the magic number "1" with ACCESS_COORDINATE_CPU when appropriate. No functionality change. Signed-off-by: "Huang, Ying" Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Signed-off-by: Rafael J. Wysocki commit abba7f922d8b7d39d5dd6c1ee3e79fcd9f56aa6e Author: Jeff Johnson Date: Mon Jun 3 07:29:02 2024 -0700 ACPI: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/acpi_tad.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/platform_profile.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Rafael J. Wysocki commit 117478c9d710dc616b4446d12eddca3c1997266b Author: Armin Wolf Date: Sun Jun 9 23:09:08 2024 +0200 ACPI: acpi_pad: Still evaluate _OST when _PUR evaluation fails The ACPI specification says that if no action was performed when processing the _PUR object, _OST should still be evaluated, albeit with a different status code. Evaluate _OST even when evaluating _PUR fails, to signal the firmware that no action was performed. Compile-tested only. Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit 35ba8ec0fbd0a127df1049fc4d6c0a26a05f3bd7 Author: Tony Luck Date: Tue Jun 11 10:25:28 2024 -0700 ACPI: x86: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit 6aaf3fd08d08e1bb9dc72bc2bd189464972d27c4 Author: Michal Wajdeczko Date: Thu Jun 13 14:07:49 2024 +0200 drm/xe/vf: Use correct check for being a VF driver The IS_SRIOV macro returns true also when we are running as a PF driver. Use correct IS_SRIOV_VF macro to skip force-wake management. Fixes: 513ea833c201 ("drm/xe/vf: Ignore force-wake requests if VF") Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Cc: Rodrigo Vivi Cc: Nirmoy Das Reviewed-by: Piotr Piórkowski Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240613120749.2032-1-michal.wajdeczko@intel.com commit d6bbb6e581743fa9f6a31346b3a6d147e8cd2560 Author: Imre Deak Date: Mon Jun 10 19:49:33 2024 +0300 drm/i915/dp: Add debugfs entry to get the link retrain disabled state Add a connector debugfs entry showing if link retraining is disabled. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-22-imre.deak@intel.com commit 09f08c6ccc04ff7530e0c4166c3ec4bf3565bcee Author: Imre Deak Date: Mon Jun 10 19:49:32 2024 +0300 drm/i915/dp: Add debugfs entry to force link retrain Add a connector debugfs entry to force retrain an active link. This can be used to test both custom link parameters (previously forced via the force_link_rate/lane_count entries) or link train failure scenarios (previously forced via the force_link_training_failure entry). The entry will autoreset after the link-retrain is complete. v2: Add the entry from intel_dp_link_training.c (Jani) v3: Lock connection_mutex only for the required intel_dp state. (Ville) Cc: Jani Nikula Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-21-imre.deak@intel.com commit 0e0af7e052ddd3e5a237977d681ab244459fa828 Author: Imre Deak Date: Mon Jun 10 19:49:31 2024 +0300 drm/i915/dp: Add debugfs entry to force link training failure Add a connector debugfs entry to force a failure during the following 1-2 link training. The entry will auto-reset after the specified link training events are complete. v2: Add the entry from intel_dp_link_training.c (Jani) v3: Lock connection_mutex only for the required intel_dp state. (Ville) Cc: Jani Nikula Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-20-imre.deak@intel.com commit fe089d5b9ace6f31e27c1bfa1245d592443aefb7 Author: Imre Deak Date: Mon Jun 10 19:49:30 2024 +0300 drm/i915/dp: Add debugfs entries to get the max link rate/lane count Add connector debugfs entries to get the maximum link rate and lane count. v2: Lock connection_mutex only for the required intel_dp state. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-19-imre.deak@intel.com commit c3c90de3a7dec171c671ffcc99eb5cdfe5e88c23 Author: Imre Deak Date: Mon Jun 10 19:49:29 2024 +0300 drm/i915/dp: Add debugfs entries to force the link rate/lane count Add connector debugfs entries to force the link rate/lane count to be used by a link training afterwards. These settings will be clamped to the supported, i.e. the source's and sink's common rate/lane count. After forcing the link rate/lane count reset the link training parameters and for a non-auto setting disable reducing the link parameters via the fallback logic. The former one can be used after testing link training failure scenarios - via debugfs entries added later - to reset the reduced link parameters after the test. v2: - Add the entries from intel_dp_link_training.c (Jani) - Rename the entries to i915_dp_set_link_rate/lane_count. v3: (Ville) - Rename the entries/struct fields to force_link_rate/lane_count. - Lock connection_mutex only for the required intel_dp state. Cc: Jani Nikula Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-18-imre.deak@intel.com commit 73afc1e2fd1d3b3f086a4ba1714c8d1ecc40d4f9 Author: Imre Deak Date: Mon Jun 10 19:49:28 2024 +0300 drm/i915/dp_mst: Enable link training fallback for MST Reduce the link parameters after a link training failure for MST outputs, similarly to how this is done for SST. For now allow the reduction only by staying in the 8b/10b vs. 128b/132b mode. Enabling the mode switch is left for a follow-up patchset, after taking measures ensuring that the mode switch happens properly. In particular a rediscovery of the whole MST topology may be required for such a switch, see the References below. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10970 Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-17-imre.deak@intel.com commit e3e70d08409086ada2c864373d9d8b8ef9a55936 Author: Imre Deak Date: Mon Jun 10 19:49:27 2024 +0300 drm/i915/dp_mst: Reset intel_dp->link_trained during disabling Reset the flag indicating an active link after disabling an MST link, similarly to how this is done for SST outputs. This avoids trying to retrain an MST link while its disabled. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-16-imre.deak@intel.com commit 81c9642b2a03c375e46442147234016578f12181 Author: Imre Deak Date: Mon Jun 10 19:49:26 2024 +0300 drm/i915/dp: Disable link retraining after the last fallback step After a link training failure if the link parameters can't be further reduced, there is no point in trying to retrain the link in the driver. This avoids excessive retrain attempts after detecting a bad link, for instance while handling MST HPD IRQs, which is likely redundant as the link training failed already twice with the same minimum link parameters. Userspace can still try to retrain the link with these parameters via a modeset. While at it make the error message more accurate. v2: Move converting the error to a debug message to the relevant follow-up patch. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-15-imre.deak@intel.com commit 34aca703d4fdb1ec289a514d0eed1a53d46f5ffd Author: Imre Deak Date: Mon Jun 10 19:49:25 2024 +0300 drm/i915/dp: Use check link state work in the HPD IRQ handler Simplify things by retraining a DP link if a bad link is detected in the HPD IRQ handler from the encoder's check link state work, similarly to how this is done after a modeset link training failure. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-14-imre.deak@intel.com commit ff68f68c0ec5e4ad6ee3216ee53d12dd48d06b93 Author: Imre Deak Date: Mon Jun 10 19:49:24 2024 +0300 drm/i915/dp: Use check link state work in the detect handler Simplify things by retraining a DP link if a bad link is detected in the connector detect handler from the encoder's check link state work, similarly to how this is done after a modeset link training failure. v2: Add TODO: comment to remove the detect-time link state check. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-13-imre.deak@intel.com commit b22b4dd96e5250c84d58de94513b4c6cd0825ce7 Author: Imre Deak Date: Mon Jun 10 19:49:23 2024 +0300 drm/i915/dp: Use check link state work in the hotplug handler Simplify things by retraining a DP link if a bad link is detected in the hotplug handler from the encoder's check link state work, similarly to how this is done after a modeset link training failure. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-12-imre.deak@intel.com commit c9a5f6019c6ce9245b8fd11a66d405f26e6cfa34 Author: Imre Deak Date: Mon Jun 10 19:49:22 2024 +0300 drm/i915/dp: Send a link training modeset-retry uevent to all MST connectors Send a modeset-retry uevent to all connectors in the same MST topology after a link training failure and reduction of the link parameters. This matches the way the same uevent is sent after a DP tunnel BW allocation failure. v2: Add NOTE that the atomic state may not be valid for SST links and assert that it's valid for MST links. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-11-imre.deak@intel.com commit 182c6be08b81b367b98634c40870fc06cd4eca42 Author: Imre Deak Date: Mon Jun 10 19:49:21 2024 +0300 drm/i915/dp: Pass atomic state to link training function The next patch adds sending a modeset-retry uevent after a link training failure to all MST connectors on link. This requires the atomic state, so pass it to intel_dp_start_link_train(). In case of SST where retraining still happens by calling this function directly instead of a modeset commit the atomic state is not available and NULL is passed instead. This is ok, since in this case the encoder's only DP connector is available from intel_dp->attached_connector not requiring the atomic state. v2: Add NOTE that the atomic state may not be valid for SST links and assert that it's valid for MST links. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-10-imre.deak@intel.com commit 5bd3e7ea8854601866bac507b3cdda5fd3a29c15 Author: Imre Deak Date: Mon Jun 10 19:49:20 2024 +0300 drm/i915/dp: Reduce link params only after retrying with unchanged params Try to maintain the current link parameters by retrying the link training with unchanged link parameters before reducing these parameters (sending an uevent to userspace to retrain the link instead). Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-9-imre.deak@intel.com commit 3b3be899fc81d5957c5dba8907263b52d92993ed Author: Imre Deak Date: Mon Jun 10 21:14:28 2024 +0300 drm/i915/dp: Recheck link state after modeset Recheck the link state after a passing link training, with a 2 sec delay to account for cases where the link goes bad following the link training and the sink doesn't report this via an HPD IRQ. The delayed work added here will be also used by a later patch after a failed link training to try to retrain the link with unchanged link params before reducing the link params. v2: Don't flush an uninitialized delayed work (on HDMI-only DDI ports). v3: - Move the helpers to a new intel_encoder.c file, rename them accordingly. (Ville) - Add the work to intel_encoder instead of intel_digital_port. - Call the encoder specific link check function via an encoder hook. - Flush the link check work during encoder destroy from intel_dp_encoder_flush_work(). - Flush the link check work during encoder suspend as well. v4: Call intel_encoder_link_check_init() with a valid encoder pointer. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610181428.2955658-1-imre.deak@intel.com commit 4ce7cff538cda112891d9baab703529bfed15d7d Author: Imre Deak Date: Mon Jun 10 19:49:18 2024 +0300 drm/i915/dp: Use a commit modeset for link retraining MST links Instead of direct calls to the link train functions, retrain the link via a commit modeset. The direct call means that the output port will be disabled/re-enabled while the rest of the pipeline (transcoder) is active, which doesn't seem to work on MST at least. It leads to underruns and black screen, presumedly because the transcoder is not disabled/re-enabled along the port. Leave switching to a commit modeset on SST for a later patchset, as that seems to work ok currently (though better to using a commit there too, due to the suppressed underruns). v2: Keep reverse line length order for local variables. (Ville) Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-7-imre.deak@intel.com commit e5bf189a0f2508ec6e72926728aec35f806dca76 Author: Imre Deak Date: Mon Jun 10 19:49:17 2024 +0300 drm/i915: Factor out function to modeset commit a set of pipes Factor out a function to modeset commit a set of pipes, which a later patch will reuse for DP link retraining. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-6-imre.deak@intel.com commit 9eb4aab86a87e4bd65530dd90a97f45ba13a368a Author: Imre Deak Date: Mon Jun 10 19:49:16 2024 +0300 drm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values() Reduce the indentation in intel_dp_get_link_train_fallback_values() by adding separate helpers to reduce the link rate and lane count. Also simplify things by passing crtc_state to the function. This also prepares for later patches in the patchset adding a limitation on how the link params are reduced. While at it use lt_dbg()/lt_err() for debug/error prints in the function which will also print the connector/encoder prefix and add a debug print about reducing the link parameters. v2: - Align reduce_lane_count()'s error handling flow with reduce_link_rate(). (Ville, Jani) - Use lt_dbg()/lt_err() in the function. Cc: Jani Nikula Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-5-imre.deak@intel.com commit dd1eae474e4e93c4076997a749d744fa01396a01 Author: Imre Deak Date: Mon Jun 10 19:49:15 2024 +0300 drm/i915/dp: Move link train fallback to intel_dp_link_training.c Move the functions used to reduce the link parameters during link training to intel_dp_link_training.c . Reviewed-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-4-imre.deak@intel.com commit 07d4d0bb4a8ddcc463ed599b22f510d5926c2495 Author: Jean-Baptiste Maneyrol Date: Wed Jun 5 19:59:49 2024 +0000 iio: imu: inv_icm42600: add support of accel low-power mode Add ODRs accessible only in low-power mode. Switch automatically to low-power or low-noise depending on the ODR set. Add channel attributes "power_mode" and "power_mode_available" for setting the power mode to use (low-noise or low-power) for ODRs supporting both mode. Reading "power_mode" when the sensor is on will return the actual mode and not the requested one. It will be different when using ODRs not supported by the requested mode. Use low-power mode by default. Signed-off-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20240605195949.766677-3-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit 3d4d033a8d554e533d87ddf315b1e0d137e6ade8 Author: Jean-Baptiste Maneyrol Date: Wed Jun 5 19:59:48 2024 +0000 iio: document inv_icm42600 driver private sysfs attributes Add ABI documentation for inv_icm42600 private sysfs attributes. Signed-off-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20240605195949.766677-2-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit 4c4daafc996a858c9227e9f47f6133b69d4be893 Author: Gustavo Silva Date: Tue Jun 4 19:57:30 2024 -0300 MAINTAINERS: Add ScioSense ENS160 Add myself as maintainer for ScioSense ENS160 multi-gas sensor driver. Signed-off-by: Gustavo Silva Link: https://lore.kernel.org/r/20240604225747.7212-7-gustavograzs@gmail.com Signed-off-by: Jonathan Cameron commit d12b7d6ede9be336fb7a308c2ad9f4e1d8d817ad Author: Gustavo Silva Date: Tue Jun 4 19:57:29 2024 -0300 iio: chemical: ens160: add power management support ENS160 supports a deep sleep mode for minimal power consumption. Use it to add PM sleep capability to the driver. Signed-off-by: Gustavo Silva Link: https://lore.kernel.org/r/20240604225747.7212-6-gustavograzs@gmail.com Signed-off-by: Jonathan Cameron commit 0fc26596b4b3619a47ae05e3ed89e017fa9149b4 Author: Gustavo Silva Date: Tue Jun 4 19:57:28 2024 -0300 iio: chemical: ens160: add triggered buffer support ENS160 supports a data ready interrupt. Use it in combination with triggered buffer for continuous data readings. Signed-off-by: Gustavo Silva Link: https://lore.kernel.org/r/20240604225747.7212-5-gustavograzs@gmail.com Signed-off-by: Jonathan Cameron commit e3166508a12e2ff7bfa711f895177dab971fd716 Author: Gustavo Silva Date: Tue Jun 4 19:57:27 2024 -0300 iio: chemical: add driver for ENS160 sensor ScioSense ENS160 is a digital metal oxide multi-gas sensor, designed for indoor air quality monitoring. The driver supports readings of CO2 and VOC, and can be accessed via both SPI and I2C. Datasheet: https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf Signed-off-by: Gustavo Silva Link: https://lore.kernel.org/r/20240604225747.7212-4-gustavograzs@gmail.com Signed-off-by: Jonathan Cameron commit ec6c56577b3908744e35a709ffd58e6cf4f8dd6b Author: Gustavo Silva Date: Tue Jun 4 19:57:26 2024 -0300 dt-bindings: iio: chemical: add ENS160 sensor Add bindings for ScioSense ENS160 multi-gas sensor. Datasheet: https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf Reviewed-by: Conor Dooley Signed-off-by: Gustavo Silva Link: https://lore.kernel.org/r/20240604225747.7212-3-gustavograzs@gmail.com Signed-off-by: Jonathan Cameron commit 202ce3eaa691225f11dab93a76e7afab67edc4ec Author: Gustavo Silva Date: Tue Jun 4 19:57:25 2024 -0300 dt-bindings: vendor-prefixes: add ScioSense Add vendor prefix for ScioSense B.V. https://www.sciosense.com/ Acked-by: Conor Dooley Signed-off-by: Gustavo Silva Link: https://lore.kernel.org/r/20240604225747.7212-2-gustavograzs@gmail.com Signed-off-by: Jonathan Cameron commit dea750f8015b514923e57c0a992e8d5db41efbb4 Author: Dimitri Fedrau Date: Tue Jun 4 15:36:39 2024 +0200 iio: temperature: mcp9600: add threshold events support The device has four programmable temperature alert outputs which can be used to monitor hot or cold-junction temperatures and detect falling and rising temperatures. It supports up to 255 degree celsius programmable hysteresis. Each alert can be individually configured by setting following options in the associated alert configuration register: - monitor hot or cold junction temperature - monitor rising or falling temperature - set comparator or interrupt mode - set output polarity - enable alert This patch binds alert outputs to iio events: - alert1: hot junction, rising temperature - alert2: hot junction, falling temperature - alert3: cold junction, rising temperature - alert4: cold junction, falling temperature All outputs are set in comparator mode and polarity depends on interrupt configuration. Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20240604133639.959682-1-dima.fedrau@gmail.com Signed-off-by: Jonathan Cameron commit 8af8d75e9f829fdd247c15145966e0a5c64668b6 Author: Arthur Becker Date: Tue Jun 4 10:01:49 2024 +0200 dt-bindings: iio: light: add VEML6040 RGBW-LS Device tree bindings for the vishay VEML6040 RGBW light sensor iio driver Signed-off-by: Arthur Becker Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604-veml6040-v4-2-5a4d59597874@sentec.com Signed-off-by: Jonathan Cameron commit 3c34171c1b12c100a42c0a8ed88355a13fcb5be8 Author: Arthur Becker Date: Tue Jun 4 10:01:48 2024 +0200 iio: light: driver for Vishay VEML6040 Implements driver for the Vishay VEML6040 rgbw light sensor. Included functionality: setting the integration time and reading the raw values for the four channels Not yet implemented: setting the measurements to 'Manual Force Mode' (Auto measurements off, and adding a measurement trigger) Datasheet: https://www.vishay.com/docs/84276/veml6040.pdf Signed-off-by: Arthur Becker Link: https://lore.kernel.org/r/20240604-veml6040-v4-1-5a4d59597874@sentec.com Signed-off-by: Jonathan Cameron commit 5cf99438d5d8db6007762eb6734125f58bcae48b Author: Neil Armstrong Date: Wed Jun 5 11:37:08 2024 +0200 dt-bindings: iio: adc: amlogic,meson-saradc: add optional power-domains On newer SoCs, the SAR ADC hardware can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240605-topic-amlogic-upstream-bindings-fixes-power-domains-sardac-v1-1-40a8de6baa59@linaro.org Signed-off-by: Jonathan Cameron commit d157d0ba0213768119bacd819ec09a8a484dbc4f Author: Nuno Sa Date: Tue Jun 4 11:19:56 2024 +0200 iio: dac: adi-axi-dac: add platform dependencies Being this device a soft core, it's only supported on some/specific platforms. Hence add proper dependencies for the supported platforms. Also add COMPILE_TEST to increase the build coverage. Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240604-dev-axi-dac-kconfig-v1-1-99ccd03938d1@analog.com Signed-off-by: Jonathan Cameron commit 9fae1f2aa41963faae96e03175c7684522246ab5 Author: Nuno Sa Date: Tue Jun 4 11:16:58 2024 +0200 iio: adc: adi-axi-adc: add platform dependencies Being this device a soft core, it's only supported on some/specific platforms. Hence add proper dependencies for the supported platforms. Also add COMPILE_TEST to increase the build coverage. Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240604-dev-axi-adc-kconfig-v1-1-cfb725606b8e@analog.com Signed-off-by: Jonathan Cameron commit 50cfe81b71e50d7a7f6afb84d5dbe084ed4ea174 Author: Jean-Baptiste Maneyrol Date: Fri Jun 7 08:10:39 2024 +0000 iio: imu: inv_icm42600: add register caching in the regmap Register caching is improving bus access a lot because of the register window bank setting. Previously, bank register was set for every register access. Now with caching, it happens only when changing bank which is very infrequent. Signed-off-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20240607081039.789079-1-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit bf977499c10667deb38f85dd4d0f287b0133ab54 Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:50 2024 +0200 iio: adc: mcp3564: drop redundant open-coded spi_get_device_match_data() The driver calls spi_get_device_match_data() and on its failure calls again parts of it: spi_get_device_id() and getting driver data. This is entirely redundant, because it is part of spi_get_device_match_data(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-8-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit 2ac3ce8afd5f2d3bc0271e76e4d005d62594090e Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:49 2024 +0200 iio: dac: max5522: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-7-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit ce17861c8635b4bac5137c2faec3c3a59990f0b1 Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:48 2024 +0200 iio: addac: ad74413r: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-6-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit d8f2d8ae94d1ad6c7c0f2db6e86a37a2e54bd23e Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:47 2024 +0200 iio: adc: ti-tsc2046: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-5-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit d7bffff19b6d5864b6322ab191ca3dfe6180673e Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:46 2024 +0200 iio: adc: ti-ads131e08: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-4-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit bf3c855be8017fb339755fcb2fee80dac4071f41 Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:45 2024 +0200 iio: adc: max11205: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-3-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit eafc2664be3adecf6a1902e4a58ac0719b62341c Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:44 2024 +0200 iio: accel: adxl355: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-2-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit d6e3ee74d16f2faef0cbe0251071076e0654e68a Author: Krzysztof Kozlowski Date: Thu Jun 6 16:26:43 2024 +0200 iio: accel: adxl313: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606-spi-match-data-v1-1-320b291ee1fe@linaro.org Signed-off-by: Jonathan Cameron commit 4f9b4594bb09734b53212d23f8a4b78b7a3bdc2d Author: Uwe Kleine-König Date: Thu Jun 6 17:54:04 2024 +0200 staging: iio: 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 Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240606155407.499344-1-u.kleine-koenig@baylibre.com Signed-off-by: Jonathan Cameron commit 2aac3f9aec74b28ea73ad96efbcc0c56e5ff814f Author: Antoni Pokusinski Date: Fri Jun 7 16:10:30 2024 +0200 iio: humidity: si7020: add heater support This patch adds support for the integrated on-chip heater that is present on all the devices supported by this driver (si7020, si7021, si7013, th6). In order to configure the heater, the driver interacts with the following device registers: * User Register - the 2nd bit of this register is a "Heater Enable bit" (0 means that the heater is off, 1 means that it's on). * Heater Register - this register is present only on the si70xx devices and controls the current flowing through the heater. The 4 lower bits of this register can be assigned values from 0x0 to 0xF. Signed-off-by: Antoni Pokusinski Link: https://lore.kernel.org/r/20240607141029.51744-1-apokusinski@o2.pl Signed-off-by: Jonathan Cameron commit b2fb2d03e2dc3963bcf41f1d0cbd467ad9e6e89b Author: Jeff Johnson Date: Fri Jun 7 09:17:52 2024 -0700 iio: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/adc/ingenic-adc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/adc/xilinx-ams.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/buffer/kfifo_buf.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240607-md-drivers-iic-v1-1-9f9db6246083@quicinc.com Signed-off-by: Jonathan Cameron commit f91f9ece67972885fd41d06dfd034dcce057ef20 Author: Erick Archer Date: Sun Jun 2 19:23:54 2024 +0200 iio: event: use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). At the same time refactor the NULL comparison. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237D024459C314CECE72EAF8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Jonathan Cameron commit f451fbd73b0d54ef53bc2c80e4d969df1c7c7d96 Author: Aidan MacDonald Date: Mon Oct 17 00:43:31 2022 +0100 iio: adc: axp20x_adc: Add support for AXP192 The AXP192 is identical to the AXP20x, except for the addition of two more GPIO ADC channels. Reviewed-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Signed-off-by: Aidan MacDonald Signed-off-by: Jonathan Cameron commit 038c57c179eadd1ae6dff3a1c70d76dafa24d854 Author: Josua Mayer Date: Sun Jun 2 17:49:38 2024 +0200 dt-bindings: iio: adc: ti,ads1015: add compatible for tla2021 TI tla2021 is a limited single-channel variant of tla2024 which is similar enough to be easily supportable through the same driver. Add compatible string for tla2021 so boards may describe it in device-tree. Signed-off-by: Josua Mayer Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240602-cn9130-som-v6-3-89393e86d4c7@solid-run.com Signed-off-by: Jonathan Cameron commit 1b88a895b931eaa64b500598abc8fac464aa0b5b Author: Gustavo Ueti Fukunaga Date: Mon May 27 06:19:40 2024 -0300 iio: adc: ti-adc161s626: make use of iio_device_claim_direct_scoped() Make use of iio_device_claim_direct_scoped() to make error handling more natural and simplify code. Co-developed-by: Caio Dantas Simão Ugêda Signed-off-by: Caio Dantas Simão Ugêda Signed-off-by: Gustavo Ueti Fukunaga Link: https://lore.kernel.org/r/20240527091942.53616-1-gustavofukunaga@usp.br Signed-off-by: Jonathan Cameron commit f4bed1ceb82e465d85d2f73c26b4652b81adb257 Author: Val Packett Date: Mon May 27 05:00:18 2024 -0300 iio: accel: mma7660: add mount-matrix support Allow using the mount-matrix device tree property to align the accelerometer relative to the whole device. Signed-off-by: Val Packett Link: https://lore.kernel.org/r/20240527080043.2709-1-val@packett.cool Signed-off-by: Jonathan Cameron commit c4ec8dedca961db056ec85cb7ca8c9f7e2e92252 Author: Julien Stephan Date: Thu May 30 11:22:46 2024 +0200 driver: iio: add missing checks on iio_info's callback access Some callbacks from iio_info structure are accessed without any check, so if a driver doesn't implement them trying to access the corresponding sysfs entries produce a kernel oops such as: [ 2203.527791] Unable to handle kernel NULL pointer dereference at virtual address 00000000 when execute [...] [ 2203.783416] Call trace: [ 2203.783429] iio_read_channel_info_avail from dev_attr_show+0x18/0x48 [ 2203.789807] dev_attr_show from sysfs_kf_seq_show+0x90/0x120 [ 2203.794181] sysfs_kf_seq_show from seq_read_iter+0xd0/0x4e4 [ 2203.798555] seq_read_iter from vfs_read+0x238/0x2a0 [ 2203.802236] vfs_read from ksys_read+0xa4/0xd4 [ 2203.805385] ksys_read from ret_fast_syscall+0x0/0x54 [ 2203.809135] Exception stack(0xe0badfa8 to 0xe0badff0) [ 2203.812880] dfa0: 00000003 b6f10f80 00000003 b6eab000 00020000 00000000 [ 2203.819746] dfc0: 00000003 b6f10f80 7ff00000 00000003 00000003 00000000 00020000 00000000 [ 2203.826619] dfe0: b6e1bc88 bed80958 b6e1bc94 b6e1bcb0 [ 2203.830363] Code: bad PC value [ 2203.832695] ---[ end trace 0000000000000000 ]--- Reviewed-by: Nuno Sa Signed-off-by: Julien Stephan Link: https://lore.kernel.org/r/20240530-iio-core-fix-segfault-v3-1-8b7cd2a03773@baylibre.com Signed-off-by: Jonathan Cameron commit 373a4e13ab4bc947f429fd92409d686fbec57132 Merge: 041c1dc988fdf 6a8260147745f Author: Alexei Starovoitov Date: Thu Jun 13 11:18:43 2024 -0700 Merge branch 'fixes-for-kfunc-prototype-generation' Daniel Xu says: ==================== Fixes for kfunc prototype generation This patchset fixes new warnings and errors that kfunc prototype generation caused. ==================== Link: https://lore.kernel.org/r/cover.1718295425.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 6a8260147745fe493d733d4e5f9b327da3720905 Author: Daniel Xu Date: Thu Jun 13 10:19:26 2024 -0600 bpf: selftests: Do not use generated kfunc prototypes for arena progs When selftests are built with a new enough clang, the arena selftests opt-in to use LLVM address_space attribute annotations for arena pointers. These annotations are not emitted by kfunc prototype generation. This causes compilation errors when clang sees conflicting prototypes. Fix by opting arena selftests out of using generated kfunc prototypes. Fixes: 770abbb5a25a ("bpftool: Support dumping kfunc prototypes from BTF") Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406131810.c1B8hTm8-lkp@intel.com/ Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/fc59a617439ceea9ad8dfbb4786843c2169496ae.1718295425.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 78746f93e903d022c692b9bb3a3e2570167b2dc2 Author: Daniel Xu Date: Thu Jun 13 10:19:25 2024 -0600 bpf: Fix bpf_dynptr documentation comments The function argument names were changed but the doc comment was not. Fix htmldocs build warning by updating doc comments. Fixes: cce4c40b9606 ("bpf: treewide: Align kfunc signatures to prog point-of-view") Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/d0b0eb05f91e12e5795966153b11998d3fc1d433.1718295425.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 6a03100200ddaf38ca6719c80c0ce454e990e1a0 Author: Imre Deak Date: Mon Jun 10 19:49:14 2024 +0300 drm/i915/dp: Move link train params to a substruct in intel_dp For clarity move the link training parameters updated during link training based on the pass/fail LT result under a substruct in intel_dp. This prepares for later patches in this patchset adding similar params here. Rename intel_dp_reset_max_link_params() to intel_dp_reset_link_params() to better reflect what state gets reset. v2: Add the parameters to a more generic link substruct. (Jani) Cc: Jani Nikula Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-3-imre.deak@intel.com commit 1bcbe192e0dc758873003a0059bce9cc27d4bad1 Author: Imre Deak Date: Mon Jun 10 19:49:13 2024 +0300 drm/i915/dp_mst: Align TUs to avoid splitting symbols across MTPs Symbols consisting of multiple (4) TU timeslots may get split across MTPs when using 2 or 1 link lanes. Avoid this, as required by Bspec by aligning the allocated TUs to 2 when using 2 lanes and 4 when using 1 lane. Atm, we also have to align the PBNs used to allocate BW along the MST path, since DRM core keeps track of its own TU value, derived from the PBN and that TU value must match what the driver calculates. On some platforms the alignment is only required on 8b/10b links, a follow-up patch will remove the limitation for those. Bspec: 49266, 68922 Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-2-imre.deak@intel.com commit 89b01913dc73d7c4b8440b1396909ccb7ec8c4b4 Author: Alexander Aring Date: Thu Jun 13 13:06:40 2024 -0400 dlm: add rcu_barrier before destroy kmem cache In the case we trigger dlm_free_rsb() that does a call_rcu() and the responding kfree() of res_lvbptr and a kmem_cache_free() of the rsb pointer we need to wait until this pending operation is done before calling kmem_cache_destroy(). We doing that by using rcu_barrier() that waits until all pending call_rcu() are done. This avoids that kmem_cache_destroy() complains about active objects around that are not being freed yet by call_rcu(). There is currently more discussions about to make this behaviour better, see: https://lore.kernel.org/netdev/20240609082726.32742-1-Julia.Lawall@inria.fr/ However this is only for call_rcu() if the callback calls kmem_cache_destroy() only to replace it by kfree_rcu() call which has currently some issue. This isn't our case because we also free the res_lvbptr if being set. For our case, to avoid the above race rcu_barrier() should be used before calling kmem_cache_destroy() to be sure that there are no active objects around. This is exactly what net/batman-adv is also doing before calling their kmem_cache_destroy() in module unloading. Fixes: 01fdeca1cc2d ("dlm: use rcu to avoid an extra rsb struct lookup") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 11d861d227ed1c4068597289267247aac5ac50fa Author: Johan Hovold Date: Sat Jun 8 17:55:25 2024 +0200 regulator: add pm8008 pmic regulator driver The Qualcomm PM8008 is an I2C-controlled PMIC containing seven LDO regulators. The driver is based on a driver submitted by Satya Priya, but it has been cleaned up and reworked to match the new devicetree binding which no longer describes each regulator as a separate device. This avoids describing internal details like register offsets in the devicetree and allows for extending the implementation with features like over-current protection without having to update the binding. Specifically note that the regulator interrupts are shared between all regulators. Note that the secondary regmap is looked up by name and that if the driver ever needs to be generalised to support regulators provided by the primary regmap (I2C address) such information could be added to the device-id table. This also fixes the original implementation, which looked up regulators by 'regulator-name' property rather than devicetree node name and which prevented the regulators from being named to match board schematics. Link: https://lore.kernel.org/r/1655200111-18357-8-git-send-email-quic_c_skakit@quicinc.com Cc: Satya Priya Kakitapalli Cc: Stephen Boyd Reviewed-by: Mark Brown Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-12-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 288b550463cf5dd21ad34f736b8c5ccb7ff69ceb Author: Johan Hovold Date: Sat Jun 8 17:55:24 2024 +0200 mfd: pm8008: Rework to match new DT binding Rework the pm8008 driver to match the new devicetree binding which no longer describes internal details like interrupts and register offsets (including which of the two consecutive I2C addresses the registers belong to). Instead make the interrupt controller implementation internal and pass interrupts to the subdrivers using MFD cell resources. Note that subdrivers may either get their resources, like register block offsets, from the parent MFD or this can be included in the subdrivers directly. In the current implementation, the temperature alarm driver is generic enough to just get its base address and alarm interrupt from the parent driver, which already uses this information to implement the interrupt controller. The regulator driver, however, needs additional information like parent supplies and regulator characteristics so in that case it is easier to just augment its table with the regulator register base addresses. Similarly, the current GPIO driver already holds the number of pins and that lookup table can therefore also be extended with register offsets. Note that subdrivers can now access the two regmaps by name, even if the primary regmap is registered last so that it is returned by default when no name is provided in lookups. Finally, note that the temperature alarm and GPIO subdrivers need some minor rework before they can be used with non-SPMI devices like the PM8008. The temperature alarm MFD cell name specifically uses a "qpnp" rather than "spmi" prefix to prevent binding until the driver has been updated. Tested-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-11-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 8c72db5884a3c821de6ba9c387c8fe52e13e5a34 Author: Johan Hovold Date: Sat Jun 8 17:55:23 2024 +0200 dt-bindings: mfd: pm8008: Rework binding Rework the pm8008 binding, which is currently unused, by dropping internal details like register offsets and interrupts and by adding the missing regulator and temperature alarm properties. Note that child nodes are still used for pinctrl and regulator configuration. Also note that the pinctrl state definition will be extended later and could eventually also be shared with other PMICs (e.g. by breaking out bits of qcom,pmic-gpio.yaml). Signed-off-by: Johan Hovold Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240608155526.12996-10-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 8643ef1213eeaf99ee529f35a6c2976ea1e316bc Author: Johan Hovold Date: Sat Jun 8 17:55:22 2024 +0200 dt-bindings: mfd: pm8008: Drop redundant descriptions In preparation for reworking the binding, drop the redundant descriptions of the standard 'reg' and 'interrupts' properties. Reviewed-by: Rob Herring (Arm) Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-9-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 40ac32d19985836348313b7087c8f37232084c54 Author: Johan Hovold Date: Sat Jun 8 17:55:21 2024 +0200 mfd: pm8008: Drop unused driver data The i2c client driver data pointer has never been used so drop the unnecessary assignment. Reviewed-by: Bryan O'Donoghue Reviewed-by: Stephen Boyd Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-8-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 3162cd961eba14fbb377d4f13c853c586cd5d063 Author: Johan Hovold Date: Sat Jun 8 17:55:20 2024 +0200 mfd: pm8008: Rename irq chip Drop the redundant "irq" suffix from the irq chip name. Reviewed-by: Bryan O'Donoghue Reviewed-by: Stephen Boyd Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-7-johan+linaro@kernel.org Signed-off-by: Lee Jones commit a4b3225f06e4f8fa7266236407ab7de34b66f044 Author: Johan Hovold Date: Sat Jun 8 17:55:19 2024 +0200 mfd: pm8008: Use lower case hex notation Use lower case hex notation for consistency. Reviewed-by: Bryan O'Donoghue Reviewed-by: Stephen Boyd Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-6-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 742bdd99aa9acace13385b66c6f3946f26b109fe Author: Johan Hovold Date: Sat Jun 8 17:55:18 2024 +0200 mfd: pm8008: Mark regmap structures as const The regmap irq chip structures can be const so mark them as such. Reviewed-by: Bryan O'Donoghue Reviewed-by: Stephen Boyd Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-5-johan+linaro@kernel.org Signed-off-by: Lee Jones commit c251befb097ef1ebb509d48bb3e1181b94fd4d2a Author: Johan Hovold Date: Sat Jun 8 17:55:17 2024 +0200 mfd: pm8008: Deassert reset on probe Request and deassert any (optional) reset gpio during probe in case it has been left asserted by the boot firmware. Note the reset line is not asserted to avoid reverting to the default I2C address in case the firmware has configured an alternate address. Tested-by: Bryan O'Donoghue Reviewed-by: Linus Walleij Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-4-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 6ad7f80b53251dbbca81e18a17cf6f8bcd34cb20 Author: Johan Hovold Date: Sat Jun 8 17:55:16 2024 +0200 mfd: pm8008: Fix regmap irq chip initialisation The regmap irq array is potentially shared between multiple PMICs and should only contain static data. Use a custom macro to initialise also the type fields and drop the unnecessary updates on each probe. Fixes: 6b149f3310a4 ("mfd: pm8008: Add driver for QCOM PM8008 PMIC") Reviewed-by: Bryan O'Donoghue Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-3-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 0682cfa3325fefe8a3cb1c02854135ee73b8ae16 Author: Johan Hovold Date: Sat Jun 8 17:55:15 2024 +0200 dt-bindings: mfd: pm8008: Add reset gpio Describe the optional reset gpio (which may not be wired up). Reviewed-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20240608155526.12996-2-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 7857f5c38d04a38e7a20060a6d370caf0424aa4e Author: Jeff Johnson Date: Wed Jun 12 07:12:31 2024 -0700 backlight: Add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/backlight/platform_lcd.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/backlight/rt4831-backlight.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240612-md-drivers-video-backlight-v1-1-f4ca1beb36cc@quicinc.com Signed-off-by: Lee Jones commit 90b7f2ead953aab5677ae8235d78841cee8fd13e Author: Dan Carpenter Date: Thu Jun 6 16:10:23 2024 +0300 backlight: lm3509_bl: Fix NULL vs IS_ERR() check in register() function The devm_backlight_device_register() doesn't return NULL, it returns error pointers. Update the error checking to match. Fixes: b72755f5b577 ("backlight: Add new lm3509 backlight driver") Signed-off-by: Dan Carpenter Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/187b5bc5-a010-46c2-8ead-980df9efae79@moroto.mountain Signed-off-by: Lee Jones commit 8d3739dbba3ba35c43984d762e7cdcca031a8fcf Author: Andrew Davis Date: Mon Jun 10 10:17:18 2024 -0500 remoteproc: omap: Use devm_rproc_add() helper Use the device lifecycle managed add function. This helps prevent mistakes like deleting out of order in cleanup functions and forgetting to delete on error paths. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240610151721.189472-3-afd@ti.com Signed-off-by: Mathieu Poirier commit 5efcc364fc63750fee93e5791130a1658b5061e8 Author: Andrew Davis Date: Mon Jun 10 10:17:17 2024 -0500 remoteproc: omap: Use devm action to release reserved memory This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240610151721.189472-2-afd@ti.com Signed-off-by: Mathieu Poirier commit 6159855954ba16a8b3f6a01c305f938ea7e88f11 Author: Andrew Davis Date: Mon Jun 10 10:17:16 2024 -0500 remoteproc: omap: Use devm_rproc_alloc() helper Use the device lifecycle managed allocation function. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240610151721.189472-1-afd@ti.com Signed-off-by: Mathieu Poirier commit 9324410846e13595d453b7f34508b1f6b15fb1a7 Author: Jayesh Choudhary Date: Thu Jun 13 14:08:05 2024 +0530 drm/bridge: sii902x: Add pixel clock check in atomic_check Check the pixel clock for the mode in atomic_check and ensure that it is within the range supported by the bridge. Signed-off-by: Jayesh Choudhary Reviewed-by: Aradhya Bhatia Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240613083805.439337-4-j-choudhary@ti.com Signed-off-by: Maxime Ripard commit 96fddae126327a87bf67edfa8a1c94ce21c18dfe Author: Jayesh Choudhary Date: Thu Jun 13 14:08:04 2024 +0530 drm/bridge: sii902x: Support atomic bridge APIs Change exisitig enable() and disable() bridge hooks to their atomic counterparts as the former hooks are deprecated. Signed-off-by: Jayesh Choudhary Reviewed-by: Aradhya Bhatia Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240613083805.439337-3-j-choudhary@ti.com Signed-off-by: Maxime Ripard commit 520dbf5423e112da1c62748cb4349a4f25c63cc4 Author: Jayesh Choudhary Date: Thu Jun 13 14:08:03 2024 +0530 drm/bridge: sii902x: Fix mode_valid hook Currently, mode_valid is defined only in drm_connector_helper_funcs. When the bridge is attached with the 'DRM_BRIDGE_ATTACH_NO_CONNECTOR' flag, the connector is not initialized, and so is the mode_valid hook under connector helper funcs. It also returns MODE_OK for all modes without actually checking the modes. So move the mode_valid hook to drm_bridge_funcs with proper clock checks for maximum and minimum pixel clock supported by the bridge. Signed-off-by: Jayesh Choudhary Reviewed-by: Dmitry Baryshkov Acked-by: Sui Jingfeng Reviewed-by: Aradhya Bhatia Link: https://patchwork.freedesktop.org/patch/msgid/20240613083805.439337-2-j-choudhary@ti.com Signed-off-by: Maxime Ripard commit 77a714325d09e1527d865dc011ef91c4972ffedd Author: Dan Carpenter Date: Thu Jun 13 16:55:14 2024 +0300 platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes() We changed these functions to returning negative error codes, but this first error path was accidentally overlooked. It leads to a Smatch warning: drivers/platform/chrome/cros_ec_lpc.c:181 ec_response_timed_out() error: uninitialized symbol 'data'. Fix this by returning the error code instead of success. Fixes: 68dbac0a58ef ("platform/chrome: cros_ec_lpc: MEC access can return error code") Signed-off-by: Dan Carpenter Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/e0b43fb5-ecc8-4fb4-9b76-c06dea8cc4c4@moroto.mountain Signed-off-by: Tzung-Bi Shih commit c6c631d2b72b9390587cd1ee5b7905f8ea5bb1ea Author: Greg Kroah-Hartman Date: Tue Jun 11 15:01:09 2024 +0200 driver core: mark async_driver as a const * Within struct device_private, mark the async_driver * as const as it is never modified. This requires some internal-to-the-driver-core functions to also have their parameters marked as constant, and there is one place where we cast _back_ from the const pointer to a real one, as the driver core still wants to modify the structure in a number of remaining places. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20240611130103.3262749-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f6e98ef5f78a106821d451f9783dd96ba8551cb3 Author: Greg Kroah-Hartman Date: Tue Jun 11 15:01:08 2024 +0200 driver core: make driver_detach() take a const * driver_detach() does not modify the driver itself, so make the pointer constant. In doing so, the function driver_allows_async_probing() also needs to be changed so that the pointer type passes through to that function properly. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20240611130103.3262749-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 33ebea9bc0a36f62590d37d0a3c859759181573e Author: Greg Kroah-Hartman Date: Tue Jun 11 15:01:07 2024 +0200 driver core: make device_release_driver_internal() take a const * Change device_release_driver_internal() to take a const struct device_driver * as it is not modifying it at all. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20240611130103.3262749-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0725e8f9c442650924271a35017e6cce4315f3f1 Author: Greg Kroah-Hartman Date: Tue Jun 11 15:01:06 2024 +0200 driver core: driver: mark driver_add/remove_groups constant driver_add_groups() and driver_remove_groups should take a constant pointer as the structure is not modified, so make the change. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20240611130103.3262749-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 841b7ebf819491b4a7e701ee4d42a55810606c96 Author: Greg Kroah-Hartman Date: Tue Jun 11 15:01:05 2024 +0200 driver core: platform: fix ups for constant struct device_driver Fix up a few places in the platform core code that can easily handle struct device_driver being constant. This is part of the work to make all struct device_driver pointers be constant. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/20240611130103.3262749-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ff985c759778986f55cbc557055fbeb84ee833eb Author: Greg Kroah-Hartman Date: Tue Jun 11 15:01:04 2024 +0200 auxbus: make to_auxiliary_drv accept and return a constant pointer In the quest to make struct device constant, start by making to_auxiliary_drv() return a constant pointer so that drivers that call this can be fixed up before the driver core changes. As the return type previously was not constant, also fix up all callers that were assuming that the pointer was not going to be a constant one in order to not break the build. Cc: Dave Ertman Cc: Ira Weiny Cc: Rafael J. Wysocki Cc: Bingbu Cao Cc: Tianshu Qiu Cc: Mauro Carvalho Chehab Cc: Michael Chan Cc: David S. Miller Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Tariq Toukan Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Peter Ujfalusi Cc: Bard Liao Cc: Ranjani Sridharan Cc: Daniel Baluta Cc: Kai Vehmanen Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Richard Cochran Cc: linux-media@vger.kernel.org Cc: netdev@vger.kernel.org Cc: intel-wired-lan@lists.osuosl.org Cc: linux-rdma@vger.kernel.org Cc: sound-open-firmware@alsa-project.org Cc: linux-sound@vger.kernel.org Acked-by: Sakari Ailus # drivers/media/pci/intel/ipu6 Acked-by: Mark Brown Reviewed-by: Martin Habets Link: https://lore.kernel.org/r/20240611130103.3262749-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 477e36546e6fa79282427d5b82a9a9a67504de1a Author: Greg Kroah-Hartman Date: Mon Jun 10 10:19:42 2024 +0200 nvdimm: make nd_class constant Now that the driver core allows for struct class to be in read-only memory, it is possible to make all 'class' structures be declared at build time. Move the class to a 'static const' declaration and register it rather than dynamically create it." Cc: Vishal Verma Cc: Dave Jiang Cc: nvdimm@lists.linux.dev Reviewed-by: Dan Williams Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/2024061041-grandkid-coherence-19b0@gregkh Signed-off-by: Greg Kroah-Hartman commit efde66b9654830170f46667a8f0ddf16fae6dbef Author: Imre Deak Date: Tue Jun 11 18:33:51 2024 +0300 drm/i915/dp_mst: Fix DSC input BPP computation The branch or sink device decompressing a stream may have a limitation on the input/uncompressed BPP, which is lower than the base line BPP (determined by the sink's EDID). In some cases a stream with an input BPP higher than this limit will be converted automatically by the device decompressing the stream, by truncating the BPP, however in some cases - seen at least in Dell dock's DP->HDMI converters - the decompression will fail. Fix the above by limiting the input BPP correctly. This is done already correctly for SST outputs. Reviewed-by: Luca Coelho Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240611153351.3013235-1-imre.deak@intel.com commit dce30a66120fa092d28e2741f0890a5738b32fda Author: Rafał Miłecki Date: Fri Feb 9 09:56:16 2024 +0100 dt-bindings: media: convert Mediatek consumer IR to the json-schema This helps validating DTS files. Introduced changes: 1. Reworded title 2. Made "bus" clock required on MT7623 as well 3. Added required #include-s and adjusted "reg" & clocks in example Signed-off-by: Rafał Miłecki Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Conor Dooley Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 2755d1f46aa25f65179964bf315d8a16b3540eab Author: Maxime Ripard Date: Mon Jun 10 13:12:00 2024 +0200 drm/connector: hdmi: Fix kerneldoc warnings It looks like the documentation for the HDMI-related fields recently added to both the drm_connector and drm_connector_state structures trigger some warnings because of their use of anonymous structures: $ scripts/kernel-doc -none include/drm/drm_connector.h include/drm/drm_connector.h:1138: warning: Excess struct member 'broadcast_rgb' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'infoframes' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'avi' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'hdr_drm' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'spd' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'vendor' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'is_limited_range' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'output_bpc' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'output_format' description in 'drm_connector_state' include/drm/drm_connector.h:1138: warning: Excess struct member 'tmds_char_rate' description in 'drm_connector_state' include/drm/drm_connector.h:2112: warning: Excess struct member 'vendor' description in 'drm_connector' include/drm/drm_connector.h:2112: warning: Excess struct member 'product' description in 'drm_connector' include/drm/drm_connector.h:2112: warning: Excess struct member 'supported_formats' description in 'drm_connector' include/drm/drm_connector.h:2112: warning: Excess struct member 'infoframes' description in 'drm_connector' include/drm/drm_connector.h:2112: warning: Excess struct member 'lock' description in 'drm_connector' include/drm/drm_connector.h:2112: warning: Excess struct member 'audio' description in 'drm_connector' Create some intermediate structures instead of anonymous ones to silence the warnings. Reported-by: Jani Nikula Suggested-by: Jani Nikula Fixes: 54cb39e2293b ("drm/connector: hdmi: Create an HDMI sub-state") Fixes: 948f01d5e559 ("drm/connector: hdmi: Add support for output format") Reviewed-by: Dmitry Baryshkov Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240610111200.428224-1-mripard@kernel.org commit b14aa62c83ce6f65b2661c3138c586c93f1c9a77 Author: Jeff Johnson Date: Wed Jun 12 14:30:13 2024 -0700 interconnect: qcom: add missing MODULE_DESCRIPTION() macros With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/interconnect_qcom.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/icc-rpmh.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240612-md-drivers-interconnect-qcom-v1-1-da0462d6301b@quicinc.com Signed-off-by: Georgi Djakov commit c136ef2315bfa3c43e6241b2d0ca04094e1612ad Author: Jeff Johnson Date: Mon Jun 3 16:42:48 2024 -0700 interconnect: imx: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mm-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mq-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mn-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mp-interconnect.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Peng Fan Link: https://lore.kernel.org/r/20240603-md-interconnect-imx-v1-1-348a9205506c@quicinc.com Signed-off-by: Georgi Djakov commit 501bd734f933f4eb5c080b87936e9d43f471d723 Author: Mateusz Guzik Date: Thu Jun 13 10:26:37 2024 +0200 x86/CPU/AMD: Always inline amd_clear_divider() The routine is used on syscall exit and on non-AMD CPUs is guaranteed to be empty. It probably does not need to be a function call even on CPUs which do need the mitigation. [ bp: Make sure it is always inlined so that noinstr marking works. ] Signed-off-by: Mateusz Guzik Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240613082637.659133-1-mjguzik@gmail.com commit 041c1dc988fdffd5eb0c13f1ce5d1b3b0125f208 Author: Vadim Fedorenko Date: Thu Jun 6 07:58:51 2024 -0700 selftests/bpf: Validate CHECKSUM_COMPLETE option Adjust skb program test to run with checksum validation. Signed-off-by: Vadim Fedorenko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240606145851.229116-2-vadfed@meta.com commit a3cfe84cca28f205761a0450016593b0d728165e Author: Vadim Fedorenko Date: Thu Jun 6 07:58:50 2024 -0700 bpf: Add CHECKSUM_COMPLETE to bpf test progs Add special flag to validate that TC BPF program properly updates checksum information in skb. Signed-off-by: Vadim Fedorenko Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Kicinski Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240606145851.229116-1-vadfed@meta.com commit 19765dbef1cda16027559bff2dd1370da87a2eb7 Author: Pierre-Louis Bossart Date: Wed Jun 12 08:47:09 2024 +0200 ALSA: hda: intel-dsp-config: Add PTL support Same recipes as LNL Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20240612064709.51141-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 9c7fb8e832b741f6f0c9fd4bb2cce05e38d48335 Author: Pierre-Louis Bossart Date: Wed Jun 12 08:47:08 2024 +0200 ALSA: hda: hda-intel: add PantherLake support One more PCI ID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20240612064709.51141-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 163f10b2935362f0e8ef8d7fadd0b5aa33e9130f Author: Pierre-Louis Bossart Date: Wed Jun 12 08:47:07 2024 +0200 PCI: Add INTEL_HDA_PTL to pci_ids.h More PCI ids for Intel audio. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240612064709.51141-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit cc3c2376412098ca5f8c1a50e61e69620e9f09d1 Author: Dr. David Alan Gilbert Date: Sun Jun 2 00:26:04 2024 +0100 ALSA: xen-front: remove unused struct 'alsa_sndif_hw_param' 'alsa_sndif_hw_param' has been unused since the original commit 1cee559351a7 ("ALSA: xen-front: Implement ALSA virtual sound driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240601232604.198662-1-linux@treblig.org Signed-off-by: Takashi Iwai commit 104eef133fd9c17e4dc28bf43f592a86f26d8a59 Author: Nathan Chancellor Date: Tue Jun 11 12:58:41 2024 -0700 hostfs: Add const qualifier to host_root in hostfs_fill_super() After the recent conversion to the new mount API, there is a warning when building hostfs (which may be upgraded to an error via CONFIG_WERROR=y): fs/hostfs/hostfs_kern.c: In function 'hostfs_fill_super': fs/hostfs/hostfs_kern.c:942:27: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 942 | char *host_root = fc->source; | ^~ Add the 'const' qualifier, as host_root will not be modified after its assignment. Move the assignment to keep the existing reverse Christmas tree order intact. Fixes: cd140ce9f611 ("hostfs: convert hostfs to use the new mount API") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20240611-hostfs-fix-mount-api-conversion-v1-1-ef75bbc77f44@kernel.org Acked-by: Richard Weinberger Signed-off-by: Christian Brauner commit 267574dee6ae0da68f5b454a30ff276d45976cf8 Author: Mateusz Guzik Date: Tue Jun 11 14:06:26 2024 +0200 bcachefs: remove now spurious i_state initialization inode_init_always started setting the field to 0. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240611120626.513952-5-mjguzik@gmail.com Acked-by: Kent Overstreet Signed-off-by: Christian Brauner commit e9dae2fb991b3211108187f90551d62968ef06a1 Author: Mateusz Guzik Date: Tue Jun 11 14:06:25 2024 +0200 xfs: remove now spurious i_state initialization in xfs_inode_alloc inode_init_always started setting the field to 0. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240611120626.513952-4-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 5a9b911b8a24eda19eb0a5ab3b06688299a20711 Author: Mateusz Guzik Date: Tue Jun 11 14:06:24 2024 +0200 vfs: partially sanitize i_state zeroing on inode creation new_inode used to have the following: spin_lock(&inode_lock); inodes_stat.nr_inodes++; list_add(&inode->i_list, &inode_in_use); list_add(&inode->i_sb_list, &sb->s_inodes); inode->i_ino = ++last_ino; inode->i_state = 0; spin_unlock(&inode_lock); over time things disappeared, got moved around or got replaced (global inode lock with a per-inode lock), eventually this got reduced to: spin_lock(&inode->i_lock); inode->i_state = 0; spin_unlock(&inode->i_lock); But the lock acquire here does not synchronize against anyone. Additionally iget5_locked performs i_state = 0 assignment without any locks to begin with, the two combined look confusing at best. It looks like the current state is a leftover which was not cleaned up. Ideally it would be an invariant that i_state == 0 to begin with, but achieving that would require dealing with all filesystem alloc handlers one by one. In the meantime drop the misleading locking and move i_state zeroing to inode_init_always so that others don't need to deal with it by hand. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240611120626.513952-3-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit b45293799f75e002d5da9d9e3d2a5c418f492fd0 Author: AngeloGioacchino Del Regno Date: Mon Jun 10 10:57:35 2024 +0200 interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver Add an interconnect driver for the External Memory Interface (EMI), voting for bus bandwidth over the Dynamic Voltage and Frequency Scaling Resource Collector (DVFSRC). ICC provider ICC Nodes ---- ---- --------- |CPU | |--- |VPU | ----- | |----- ---- | ---- |DRAM |--|DRAM | ---- | ---- | |--|scheduler|----- |GPU | |--- |DISP| | |--|(EMI) | ---- | ---- | |--| | ----- | ---- ----- | |----- |MMSYS|--|--- |VDEC| --------- ----- | ---- /|\ | ---- |change DRAM freq |--- |VENC| ---------- | ---- | DVFSR | | | | | ---- ---------- |--- |IMG | | ---- | ---- |--- |CAM | ---- Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240610085735.147134-8-angelogioacchino.delregno@collabora.com Signed-off-by: Georgi Djakov commit 1a8009e108382848d149a24dd3fc67607d054a05 Author: AngeloGioacchino Del Regno Date: Mon Jun 10 10:57:30 2024 +0200 dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings Add bindings for the MediaTek External Memory Interface Interconnect, which providers support system bandwidth requirements through Dynamic Voltage Frequency Scaling Resource Collector (DVFSRC) hardware. This adds bindings for MediaTek MT8183 and MT8195 SoCs. Note that this is modeled as a subnode of DVFSRC for multiple reasons: - Some SoCs have more than one interconnect on the DVFSRC (and two different kinds of EMI interconnect, and also a SMI interconnect); - Some boards will want to not enable the interconnect driver because some of those are not battery powered (so they just keep the knobs at full thrust from the bootloader and never care scaling busses); - Some DVFSRC interconnect features may depend on firmware. Reviewed-by: Rob Herring Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240610085735.147134-3-angelogioacchino.delregno@collabora.com Signed-off-by: Georgi Djakov commit 90e4ed6bb02ad93663f17411d17e8e714a765a6b Author: Riwen Lu Date: Wed Jun 12 19:46:31 2024 +0800 cpufreq/cppc: Don't compare desired_perf in target() There is a corner case where the desired_perf is exactly same as the old perf, but the actual current freq is not. This happens during S3 while the cpufreq governor is set to powersave. During cpufreq resume process, the booting CPU's new_freq obtained via .get() is the highest frequency, while the policy->cur and cpu->perf_ctrls.desired_perf are set to the lowest level (powersave governor). This causes the warning: "CPU frequency out of sync:", and the cpufreq core sets policy->cur to new_freq. Then the governor->limits() calls cppc_cpufreq_set_target() to configures the CPU frequency and returns directly because the desired_perf converted from target_freq is same as the cpu->perf_ctrls.desired_perf and both are the lowest_perf. Since target_freq and policy->cur have been already compared in __cpufreq_driver_target(), there's no need to compare them again here. Drop the comparison. Signed-off-by: Riwen Lu [ Viresh: Updated commit message / subject ] Signed-off-by: Viresh Kumar commit 2a805201f9bdfcc172ac54f7e21843e186389506 Author: Jeff Johnson Date: Wed Jun 12 13:34:56 2024 -0700 ARM64: reloc_test: add missing MODULE_DESCRIPTION() macro With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/arm64/kernel/arm64-reloc-test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240612-md-arch-arm64-kernel-v1-1-1fafe8d11df3@quicinc.com Signed-off-by: Catalin Marinas commit 963c5d4968220548d013e42e0892b75ca7e790ae Author: Colin Ian King Date: Thu Jun 13 08:34:29 2024 +0100 kselftest/arm64: Fix a couple of spelling mistakes There are two spelling mistakes in some error messages. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20240613073429.1797451-1-colin.i.king@gmail.com Signed-off-by: Catalin Marinas commit fe833e4397fbdc3ae13a60202dfc7c335b032499 Author: Jeff Johnson Date: Wed Jun 12 20:26:26 2024 -0700 ASoC: amd: add missing MODULE_DESCRIPTION() macros With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/renoir/snd-acp3x-rn.o WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/yc/snd-soc-acp6x-mach.o WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-i2s.o WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pdm.o WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-legacy-common.o WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pci.o WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/ps/snd-soc-ps-mach.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240612-md-sound-soc-amd-v1-1-ad1de0409c11@quicinc.com Signed-off-by: Mark Brown commit 7a7a1cac3c2f5e3c859efb295bad3469e09e6f8f Author: Sudeep Holla Date: Wed Jun 5 14:14:58 2024 +0100 arm64: FFH: Move ACPI specific code into drivers/acpi/arm64/ The ACPI FFH Opregion code can be moved out of arm64 arch code as it just uses SMCCC. Move all the ACPI FFH Opregion code into drivers/acpi/arm64/ffh.c Signed-off-by: Sudeep Holla Acked-by: Catalin Marinas Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20240605131458.3341095-4-sudeep.holla@arm.com Signed-off-by: Catalin Marinas commit 99e7a8adc0ca906151f5d70ff68b8a81f53fd106 Author: Sudeep Holla Date: Wed Jun 5 14:14:57 2024 +0100 arm64: cpuidle: Move ACPI specific code into drivers/acpi/arm64/ The ACPI cpuidle LPI FFH code can be moved out of arm64 arch code as it just uses SMCCC. Move all the ACPI cpuidle LPI FFH code into drivers/acpi/arm64/cpuidle.c Signed-off-by: Sudeep Holla Acked-by: Catalin Marinas Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20240605131458.3341095-3-sudeep.holla@arm.com Signed-off-by: Catalin Marinas commit f8c6c92790dd305f4609c6d813c95ef125593774 Author: Sudeep Holla Date: Wed Jun 5 14:14:56 2024 +0100 ACPI: arm64: Sort entries alphabetically Sort the entries in the Makefile alphabetically. Signed-off-by: Sudeep Holla Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20240605131458.3341095-2-sudeep.holla@arm.com Signed-off-by: Catalin Marinas commit b82feb3a56e25919d6729b98c8152d950045fc5b Author: Andrew Davis Date: Wed Jun 12 13:38:26 2024 -0500 arm64: dts: ti: k3-am642-sk: Add power supply temperature sensors The SK-AM64 board has two TMP100 temperature sensors, add these here. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20240612183826.121856-1-afd@ti.com Signed-off-by: Vignesh Raghavendra commit 8d485a69603f667032d61daf4f1cb9464f315e1c Author: Robin Murphy Date: Tue Jun 4 13:39:09 2024 +0100 iommu/dma: Prune redundant pgprot arguments Somewhere amongst previous refactorings, the pgprot value in __iommu_dma_alloc_noncontiguous() became entirely unused, and the one used in iommu_dma_alloc_remap() can be computed locally rather than by its one remaining caller. Clean 'em up. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/c2a81b72df59a71a13f8bad94f834e627c4c93dd.1717504749.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit b5c29fba72a6c950655d1cb0f6aa16b60dc83be7 Author: Lu Baolu Date: Tue May 28 12:54:58 2024 +0800 iommu: Make iommu_sva_domain_alloc() static iommu_sva_domain_alloc() is only called in iommu-sva.c, hence make it static. On the other hand, iommu_sva_domain_alloc() should not return NULL anymore after commit <80af5a452024> ("iommu: Add ops->domain_alloc_sva()"), the removal of inline code avoids potential confusion. Fixes: 80af5a452024 ("iommu: Add ops->domain_alloc_sva()") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240528045458.81458-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit acc154691fc75e1a178fc36624bdeee1420585a4 Author: Joel Granados Date: Tue Jun 4 08:29:26 2024 +0200 sysctl: Warn on an empty procname element Add a pr_err warning in case a ctl_table is registered with a sentinel element containing a NULL procname. Signed-off-by: Joel Granados commit 3717540377c500e28f4304b17a46dd5b025a61ac Author: Joel Granados Date: Tue Jun 4 08:29:25 2024 +0200 sysctl: Remove ctl_table sentinel code comments Remove the mention of a "zero terminated entry" from the __register_sysctl_table function doc. Signed-off-by: Joel Granados commit a02fe70de4c2a7fbd971b49c5fa69f867fac16ff Author: Joel Granados Date: Tue Jun 4 08:29:24 2024 +0200 sysctl: Remove "child" sysctl code comments Erase the code comments mentioning "child" that were forgotten when the child element was removed in commit 2f2665c13af48 ("sysctl: replace child with an enumeration"). Signed-off-by: Joel Granados commit aef9d25e7f5631543a0276d0532151f2c61174d6 Author: Joel Granados Date: Tue Jun 4 08:29:23 2024 +0200 sysctl: Remove superfluous empty allocations from sysctl internals Now that the sentinels have been removed from ctl_table arrays, there is no need to artificially append empty ctl_table elements at ctl_table registration. Remove superfluous empty allocation from new_dir and new_links. Signed-off-by: Joel Granados commit 55bb7eb62db4995cec7e309c2b9a1070cfd60eb6 Author: Joel Granados Date: Tue Jun 4 08:29:22 2024 +0200 sysctl: Replace nr_entries with ctl_table_size in new_links The number of ctl_table entries (nr_entries) calculation was previously based on the ctl_table_size and the sentinel element. Since the sentinels have been removed, we remove the calculation and just use the ctl_table_size from the ctl_table_header. Signed-off-by: Joel Granados commit d7a76ec87195ced6910b0ca10ca133bb316c90f5 Author: Joel Granados Date: Tue Jun 4 08:29:21 2024 +0200 sysctl: Remove check for sentinel element in ctl_table arrays Use ARRAY_SIZE exclusively by removing the check to ->procname in the stopping criteria of the loops traversing ctl_table arrays. This commit finalizes the removal of the sentinel elements at the end of ctl_table arrays which reduces the build time size and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove the entry->procname evaluation from the for loop stopping criteria in sysctl and sysctl_net. Signed-off-by: Joel Granados commit e2a6c472de7a5e5a1455a9fff1cfc55a1dd888af Author: Joel Granados Date: Tue Jun 4 08:29:20 2024 +0200 mm profiling: Remove superfluous sentinel element from ctl_table This commit is part of a greater effort to remove all empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Removed sentinel from memory_allocation_profiling_sysctls Signed-off-by: Joel Granados commit 2f7c6248920523ca7468711891aa13f80ede8da4 Author: Joel Granados Date: Tue Jun 4 08:29:19 2024 +0200 locking: Remove superfluous sentinel element from kern_lockdep_table This commit is part of a greater effort to remove all empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Signed-off-by: Joel Granados commit 2bae076f3e35234e42bd7c90acd8caae8368ba90 Author: Thomas Zimmermann Date: Mon Jun 10 16:06:06 2024 +0200 drm/mgag200: Set .detect_ctx() and enable connector polling Set .detect_ctx() in struct drm_connector_helper_funcs to the common helper drm_connector_helper_detect_from_ddc() and enable polling for the connector. Mgag200 will now test for the monitor's presence by probing the DDC in regular intervals. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240610141141.29527-4-tzimmermann@suse.de commit 202fe72cce421fa5d5afb30b57d7246d906b7c15 Author: Thomas Zimmermann Date: Mon Jun 10 16:06:05 2024 +0200 drm/mgag200: Add BMC output The BMC output can be viewed via the BMC's web interface or a similar client. Represent it as virtual encoder and connector. It's attached to the same CRTC as the VGA connector. The connector's status depends on the physical connector's status. The BMC is only connected if the physical connector is not. This is necessary to support userspace clients that can only handle a single output per CRTC. The BMC is a server feature. Add a BMC output for all server chips, but not the desktop models. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240610141141.29527-3-tzimmermann@suse.de commit 579d47838b56de97899bd0d5affdc14899b98a0f Author: Thomas Zimmermann Date: Mon Jun 10 16:06:04 2024 +0200 drm/mgag200: Consolidate VGA output The various models have common code for the VGA output's encoder and connector. Move everything into a single shared source file. Remove some obsolete initializer macros. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240610141141.29527-2-tzimmermann@suse.de commit dc5abc2ff0ee4279a6c0351674cd24745216c4db Author: Noah Wang Date: Tue Jun 11 18:14:17 2024 +0800 hwmon: add MP9941 driver Add support for MPS step-down converter mp9941. This driver exposes telemetry and limit value readings and writtings. Signed-off-by: Noah Wang Link: https://lore.kernel.org/r/SEYPR04MB648294005D55F70736B519F6FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com [groeck: Include bitfield.h (for FIELD_PREP) and bits.h (for GENMASK)] Signed-off-by: Guenter Roeck commit 5a5bdc17a2fc8dabfcf630bed84d4fbca0985c3a Author: Mitul Golani Date: Tue Jun 11 17:35:24 2024 +0530 drm/i915/display: Send vrr vsync params whne vrr is enabled Compute trans vrr vsync params only when either VRR or CMRR is enabled. Fixes: 5922f45329cd ("drm/i915/display: Compute vrr vsync params") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Jani Nikula Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240611120525.148042-1-mitulkumar.ajitkumar.golani@intel.com commit 5756101babc5334a9bc99601d1cc0d6776fa9ada Author: Stanislav Jakubek Date: Sun Jun 9 13:05:43 2024 +0200 ARM: dts: qcom: motorola-falcon: add accelerometer, magnetometer Add the accelerometer and magnetometer that are present on the Motorola Moto G (2013) device. Signed-off-by: Stanislav Jakubek Link: https://lore.kernel.org/r/ZmWMh6fuLasvGkR/@standask-GA-A55M-S2HP Signed-off-by: Bjorn Andersson commit f55a758fd355c1b5ed7c73434a99ae07d5741226 Author: Raymond Hackley Date: Sun Jun 9 10:02:45 2024 +0000 arm64: dts: qcom: msm8916-acer-a1-724: Add sound and modem Enable sound and modem for Acer Iconia Talk S A1-724. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240609100243.834169-1-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 75287992f58a74271a083fef0356bc81d629f671 Author: Luca Weiss Date: Thu Jun 6 21:18:33 2024 +0200 soc: qcom: smsm: Support using mailbox interface Add support for using the mbox interface instead of manually writing to the syscon. With this change the driver will attempt to get the mailbox first, and if that fails it will fall back to the existing way of using qcom,ipc-* properties and converting to syscon. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240606-smsm-mbox-v2-2-8abe6b5f01da@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 5e66abcf1e250f032ecb18a7ecfac5287298ed8e Author: Luca Weiss Date: Thu Jun 6 21:18:32 2024 +0200 dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc The qcom,ipc-N properties are essentially providing a reference to a mailbox, so allow using the mboxes property to do the same in a more structured way. Since multiple SMSM hosts are supported, we need to be able to provide the correct mailbox for each host. The old qcom,ipc-N properties map to the mboxes property by index, starting at 0 since that's a valid SMSM host also. Mark the older qcom,ipc-N as deprecated and update the example with mboxes. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240606-smsm-mbox-v2-1-8abe6b5f01da@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 1ae60a51d175f5d43e2020a1c3f11346796ae6de Author: Konrad Dybcio Date: Thu Jun 6 13:36:04 2024 +0200 arm64: dts: qcom: qrb2210-rb1: Enable the GPU Enable the A702 GPU (also marketed as "3D accelerator by qcom [1], lol). [1] https://docs.qualcomm.com/bundle/publicresource/87-61720-1_REV_A_QUALCOMM_ROBOTICS_RB1_PLATFORM__QUALCOMM_QRB2210__PRODUCT_BRIEF.pdf Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240606-topic-rb1_gpu-v4-5-4bc0c19da4af@linaro.org Signed-off-by: Bjorn Andersson commit 4faeef52c8e69f4fa43bd572049b502175fc55c3 Author: Konrad Dybcio Date: Thu Jun 6 13:36:03 2024 +0200 arm64: dts: qcom: qcm2290: Add GPU nodes Describe the GPU hardware on the QCM2290. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240606-topic-rb1_gpu-v4-4-4bc0c19da4af@linaro.org Signed-off-by: Bjorn Andersson commit fcc6ed4f62a350c4ead833775f9d8b0cc55ac958 Merge: ee5dcd7393af9 525b42832bd33 Author: Bjorn Andersson Date: Wed Jun 12 23:07:00 2024 -0500 Merge branch '20240606-topic-rb1_gpu-v4-1-4bc0c19da4af@linaro.org' into arm64-for-6.11 Merge the QCM2290 GPUCC DeviceTree binding from the topic branch, to make available the clock constants that subsequent commits depend on. commit d4d74e4b305bf69ad82b8253ae38fdf54214c5ee Author: Konrad Dybcio Date: Thu Jun 6 13:36:01 2024 +0200 clk: qcom: clk-alpha-pll: Add HUAYRA_2290 support Commit 134b55b7e19f ("clk: qcom: support Huayra type Alpha PLL") introduced an entry to the alpha offsets array, but diving into QCM2290 downstream and some documentation, it turned out that the name Huayra apparently has been used quite liberally across many chips, even with noticeably different hardware. Introduce another set of offsets and a new configure function for the Huayra PLL found on QCM2290. This is required e.g. for the consumers of GPUCC_PLL0 to properly start. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240606-topic-rb1_gpu-v4-2-4bc0c19da4af@linaro.org Signed-off-by: Bjorn Andersson commit ea5594aa3eb800f67e4d22ce375f4d74b6c48599 Merge: 2441b965c4c7a 525b42832bd33 Author: Bjorn Andersson Date: Wed Jun 12 23:06:18 2024 -0500 Merge branch '20240606-topic-rb1_gpu-v4-1-4bc0c19da4af@linaro.org' into clk-for-6.11 Merge the QCM2290 GPUCC binding through a topic branch to allow for it to also be merged into the DeviceTree branch. commit 525b42832bd333e3e7ccb0efceb41b47347beab5 Author: Konrad Dybcio Date: Thu Jun 6 13:36:00 2024 +0200 dt-bindings: clock: Add Qcom QCM2290 GPUCC Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's QCM2290 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240606-topic-rb1_gpu-v4-1-4bc0c19da4af@linaro.org Signed-off-by: Bjorn Andersson commit ee5dcd7393af9af3494f533a6308faa539bd6718 Author: Luca Weiss Date: Thu Jun 6 11:09:06 2024 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Use .mbn firmware for IPA Specify the file name for the squashed/non-split firmware with the .mbn extension instead of the split .mdt. The kernel can load both but the squashed version is preferred in dts nowadays. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240606-fp5-ipa-mbn-v1-1-183668affe58@fairphone.com Signed-off-by: Bjorn Andersson commit 2441b965c4c7adae0b4a7825f7acb67d44c3cd38 Author: Luo Jie Date: Wed Jun 5 20:45:41 2024 +0800 clk: qcom: add clock controller driver for qca8386/qca8084 The clock controller driver of qca8386/qca8084 is registered as the MDIO device, the hardware register is accessed by MDIO bus that is normally used to access general PHY device, which is different from the current existed qcom clock controller drivers using ioremap to access hardware clock registers, nsscc-qca8k is accessed via an MDIO bus. MDIO bus is commonly utilized by both qca8386/qca8084 and other PHY devices, so the mutex lock mdio_bus->mdio_lock should be used instead of using the mutex lock of remap. To access the hardware clock registers of qca8386/qca8084, there is a special MDIO frame sequence, which needs to be sent to the device. Enable the reference clock before resetting the clock controller, the reference clock rate is fixed to 50MHZ. Reviewed-by: Bryan O'Donoghue Signed-off-by: Luo Jie Link: https://lore.kernel.org/r/20240605124541.2711467-5-quic_luoj@quicinc.com Signed-off-by: Bjorn Andersson commit 9f93a0a428606341da25bf2a00244701b58e08b9 Author: Luo Jie Date: Wed Jun 5 20:45:40 2024 +0800 clk: qcom: common: commonize qcom_cc_really_probe The previous wrapper qcom_cc_really_probe takes the platform device as parameter, which is limited to platform driver. As for qca8k clock controller driver, which is registered as the MDIO device, which also follows the qcom clock framework. To commonize qcom_cc_really_probe, updating it to take the struct device as parameter, so that the qcom_cc_really_probe can be utilized by the previous platform device and the new added MDIO device. Also update the current clock controller drivers to take &pdev->dev as parameter when calling qcom_cc_really_probe. Reviewed-by: Stephen Boyd Tested-by: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue Signed-off-by: Luo Jie Link: https://lore.kernel.org/r/20240605124541.2711467-4-quic_luoj@quicinc.com Signed-off-by: Bjorn Andersson commit 80bbd1c355d661678d2a25bd36e739b6925e7a4e Author: Luo Jie Date: Wed Jun 5 20:45:39 2024 +0800 dt-bindings: clock: add qca8386/qca8084 clock and reset definitions QCA8386/QCA8084 includes the clock & reset controller that is accessed by MDIO bus. Two work modes are supported, qca8386 works as switch mode, qca8084 works as PHY mode. Reviewed-by: Rob Herring Signed-off-by: Luo Jie Link: https://lore.kernel.org/r/20240605124541.2711467-3-quic_luoj@quicinc.com Signed-off-by: Bjorn Andersson commit 7311bbfff31c4961c57d94c165fa843f155f8236 Author: Luo Jie Date: Wed Jun 5 20:45:38 2024 +0800 clk: qcom: branch: Add clk_branch2_prepare_ops Add the clk_branch2_prepare_ops for supporting clock controller where the hardware register is accessed by MDIO bus, and the spin lock can't be used because of sleep during the MDIO operation. The clock is enabled by the .prepare instead of .enable when the clk_branch2_prepare_ops is used. Acked-by: Stephen Boyd Signed-off-by: Luo Jie Link: https://lore.kernel.org/r/20240605124541.2711467-2-quic_luoj@quicinc.com Signed-off-by: Bjorn Andersson commit 7e828d77d202f59d4f9b59c1930b82433cce1356 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:43 2024 +0200 dt-bindings: clock: qcom,sm8450-gpucc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-16-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 4da364c759dc66a23a4ea69cb85e038c847b9f0e Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:42 2024 +0200 dt-bindings: clock: qcom,sm8550-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-15-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 8acff345c3e6b0c258177ba1db18d07ebd83183c Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:41 2024 +0200 dt-bindings: clock: qcom,sm8450-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-14-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 7b69a903fc73188c50577565093a5b3680448c57 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:40 2024 +0200 dt-bindings: clock: qcom,sm6115-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-13-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 4ef61bcf1aa9cdb3d4bb588ed591bbd4e96c3eaf Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:39 2024 +0200 dt-bindings: clock: qcom,sdm845-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-12-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit c9ae35ace8c420ebcc7bf868a4f0feca142cb5cb Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:38 2024 +0200 dt-bindings: clock: qcom,sc7280-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-11-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit e68a21bd186b2f15bb1106b6fd9ad697b3307ca9 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:37 2024 +0200 dt-bindings: clock: qcom,sc7180-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-10-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit a8197afc44a6542631ec999f4b332643c91c79b3 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:36 2024 +0200 dt-bindings: clock: qcom,qcm2290-dispcc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-9-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit fa02399d69377a38ce49b7e77ece720c114265bf Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:35 2024 +0200 dt-bindings: clock: qcom,msm8998-gpucc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-8-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit f68872fe10193bb1b033aec0edaadcaab9de2935 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:34 2024 +0200 dt-bindings: clock: qcom,gpucc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-7-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit b20b9a762695835016c2ccc26cf1447dca354c10 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:33 2024 +0200 dt-bindings: clock: qcom,gpucc-sdm660: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-6-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 5576b6f8e91fa4b2ff6c48b2810cb8fbe9242142 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:32 2024 +0200 dt-bindings: clock: qcom,dispcc-sm8x50: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-5-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit f168430195ff37d1b075d70db95c9bf430ab208b Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:31 2024 +0200 dt-bindings: clock: qcom,dispcc-sm6350: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-4-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit cc9d138fffbaebe7c3f37f9e03b2d1840efa2af6 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:30 2024 +0200 dt-bindings: clock: qcom,dispcc-sc8280xp: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-3-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 3b39fb00be1c5bd0c0c8855444a3b17d04bed667 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:29 2024 +0200 dt-bindings: clock: qcom,videocc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-2-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit acc41014661cf424c262e8d532e461376bacbd90 Author: Krzysztof Kozlowski Date: Wed Jun 5 10:09:28 2024 +0200 dt-bindings: clock: qcom,sm8450-videocc: reference qcom,gcc.yaml Just like most of Qualcomm clock controllers, we can reference common qcom,gcc.yaml schema to unify the common parts of the binding. Reviewed-by: Dmitry Baryshkov Reviewed-by: Rob Herring (Arm) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605-dt-bindings-qcom-gcc-v2-1-f947b24f1283@linaro.org Signed-off-by: Bjorn Andersson commit 7ddb9403dd7497f7cd922243ee4b3c9cee4a30a4 Author: Matthew Brost Date: Tue Jun 11 07:40:53 2024 -0700 drm/xe: Sample ctx timestamp to determine if jobs have timed out In GuC TDR sample ctx timestamp to determine if jobs have timed out. The scheduling enable needs to be toggled to properly sample the timestamp. If a job has not been running for longer than the timeout period, re-enable scheduling and restart the TDR. v2: - Use GT clock to msec helper (Umesh, off list) - s/ctx_timestamp_job/ctx_job_timestamp v3: - Fix state machine for TDR, mainly decouple sched disable and deregister (testing) - Rebase (CI) v4: - Fix checkpatch && newline issue (CI) - Do not deregister on wedged or unregistered (CI) - Fix refcounting bugs (CI) - Move devcoredump above VM / kernel job check (John H) - Add comment for check_timeout state usage (John H) - Assert pending disable not inflight when enabling scheduling (John H) - Use enable_scheduling in other scheduling enable code (John H) - Add comments on a few steps in TDR (John H) - Add assert for timestamp overflow protection (John H) v6: - Use mul_u64_u32_div (CI, checkpath) - Change check time to dbg level (Paulo) - Add immediate mode to sched disable (inspection) - Use xe_gt_* messages (John H) - Fix typo in comment (John H) - Check timeout before clearing pending disable (Paulo) v7: - Fix ADJUST_FIVE_PERCENT macro (checkpatch) - Don't print sched disable failure message on GT reset (John H) - Move kernel / VM jobs WARNs near comment (John H) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-12-matthew.brost@intel.com commit b47b83ef1657f8030d8e4485b5948a190c554cc5 Author: Matthew Brost Date: Tue Jun 11 07:40:52 2024 -0700 drm/xe: Add killed, banned, or wedged as stick bit during GuC reset These bits should be persistent across reset, treat them as such. Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-11-matthew.brost@intel.com commit fc592a81ff9f0e5a46d7fb652a74db97fed5ef1b Author: Matthew Brost Date: Tue Jun 11 07:40:51 2024 -0700 drm/xe: Add pending disable assert to handle_sched_done Will help catch bugs in GuC state machine. Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-10-matthew.brost@intel.com commit 716ce587a81e6165a4133ea32f63f3d69f80e1e7 Author: Matthew Brost Date: Tue Jun 11 07:40:50 2024 -0700 drm/xe: Add GuC state asserts to deregister_exec_queue Will help catch bugs in GuC state machine. Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-9-matthew.brost@intel.com commit 7f4f492c7058fb82d2892078b556bde8a41d0b60 Author: Matthew Brost Date: Tue Jun 11 07:40:49 2024 -0700 drm/xe: Assert runnable state in handle_sched_done Ensure G2H and KMD GuC machine match. Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-8-matthew.brost@intel.com commit 41e1fa93a2fb3cf5a50e556cff7bb51231781806 Author: Matthew Brost Date: Tue Jun 11 07:40:48 2024 -0700 drm/xe: Improve unexpected state error messages Include G2H handler name when an unexpected error state messages. v6: - Use xe_gt_err (Michal) - Print runnable state (John H) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-7-matthew.brost@intel.com commit 49cc215aad7f5b953d4fc85c75b044f0abdc10cd Author: Matthew Brost Date: Tue Jun 11 07:40:47 2024 -0700 drm/xe: Add xe_gt_clock_interval_to_ms helper Add helper to convert GT clock ticks to msec. Useful for determining if timeouts occur by examing GT clock ticks. v6: - s/nom/n , s/dom/d (Jonathan) - include math64 (CI) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-6-matthew.brost@intel.com commit 1bf1ca4e326c7d0bdf4aa1946d4ba0ccdae8d09e Author: Matthew Brost Date: Tue Jun 11 07:40:46 2024 -0700 drm/xe: Add ctx timestamp to LRC snapshot The ctx timestamp is useful information, add to LRC snapshot. v2: - s/ctx_timestamp_job/ctx_job_timestamp Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-5-matthew.brost@intel.com commit 65921374c48f7fd8305d3b3b500857967a563c4f Author: Matthew Brost Date: Tue Jun 11 07:40:45 2024 -0700 drm/xe: Emit ctx timestamp copy in ring ops Copy ctx timestamp at beginning of every GPU job to a saved location. Used to determine how long a job has been running on the hardware. v2: - - s/ctx_timestamp_job/ctx_job_timestamp Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-4-matthew.brost@intel.com commit 9f46ecbb3f1d5111c28e8205ad1526663c28aa9d Author: Matthew Brost Date: Tue Jun 11 07:40:44 2024 -0700 drm/xe: Add MI_COPY_MEM_MEM GPU instruction definitions MI_COPY_MEM_MEM GPU instructions are used to copy ctx timestamp from a LRC registers to another location at the beginning of every jobs execution. Add MI_COPY_MEM_MEM GPU instruction definitions. v2: - Include MI_COPY_MEM_MEM based on instruction order (Michal) - Fix tabs/spaces issue (Michal) - Use macro for DW definition (Michal) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-3-matthew.brost@intel.com commit 8b9544e07d802bf5376921500c4d19c3405d3ad6 Author: Matthew Brost Date: Tue Jun 11 07:40:43 2024 -0700 drm/xe: Add LRC ctx timestamp support functions LRC ctx timestamp support functions are used to determine how long a job has run on the hardware. v2: - Don't use static inlines (Jani) - Kernel doc - s/ctx_timestamp_job/ctx_job_timestamp v6: - Add kernel doc for xe_lrc_update_timestamp (Lucas) - Call xe_lrc_ctx_timestamp() in xe_lrc_update_timestamp (Lucas) Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240611144053.2805091-2-matthew.brost@intel.com commit 3ec8d7572a69d142d49f52b28ce8d84e5fef9131 Author: Ole André Vadla Ravnås Date: Fri Jun 7 09:40:17 2024 +0200 CDC-NCM: add support for Apple's private interface Available on iOS/iPadOS >= 17, where this new interface is used by developer tools using the new RemoteXPC protocol. This private interface lacks a status endpoint, presumably because there isn't a physical cable that can be unplugged, nor any speed changes to be notified about. Note that NCM interfaces are not exposed until a mode switch is requested, which macOS does automatically. The mode switch can be performed like this: uint8_t status; libusb_control_transfer(device_handle, LIBUSB_RECIPIENT_DEVICE | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN, 82, /* bRequest */ 0, /* wValue */ 3, /* wIndex */ &status, sizeof(status), 0); Newer versions of usbmuxd do this automatically. Co-developed-by: Håvard Sørbø Signed-off-by: Håvard Sørbø Signed-off-by: Ole André Vadla Ravnås Link: https://lore.kernel.org/r/20240607074117.31322-1-oleavr@frida.re Signed-off-by: Jakub Kicinski commit 6fc1b32291a05a869326917ecf9be526f0dcdf9a Merge: dee4dd10c79aa 5a1b015d521d7 Author: Jakub Kicinski Date: Wed Jun 12 17:56:54 2024 -0700 Merge branch 'net-flower-validate-encapsulation-control-flags' Asbjørn Sloth Tønnesen says: ==================== net: flower: validate encapsulation control flags Now that all drivers properly rejects unsupported flower control flags used with FLOW_DISSECTOR_KEY_CONTROL, then time has come to add similar checks to the drivers supporting FLOW_DISSECTOR_KEY_ENC_CONTROL. There are currently just 4 drivers supporting this key, and 3 of those currently doesn't validate encapsulated control flags. Encapsulation control flags may currently be unused, but they should still be validated by the drivers, so that drivers will properly reject any new flags when they are introduced. This series adds some helper functions, and implements them in all 4 drivers. NB: It is currently discussed[1] to use encapsulation control flags for tunnel flags instead of the new FLOW_DISSECTOR_KEY_ENC_FLAGS. [1] https://lore.kernel.org/netdev/ZmFuxElwZiYJzBkh@dcaratti.users.ipa.redhat.com/ ==================== Link: https://lore.kernel.org/r/20240609173358.193178-1-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 5a1b015d521d7e8d7e343c04a292151ad5de3611 Author: Asbjørn Sloth Tønnesen Date: Sun Jun 9 17:33:55 2024 +0000 ice: flower: validate encapsulation control flags Encapsulation control flags are currently not used anywhere, so all flags are currently unsupported by all drivers. This patch adds validation of this assumption, so that encapsulation flags may be used in the future. In case any encapsulation control flags are masked, flow_rule_match_has_enc_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Marcin Szycik Reviewed-by: Davide Caratti Link: https://lore.kernel.org/r/20240609173358.193178-6-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 34cdd984782039c924b0476893202b37f6e74742 Author: Asbjørn Sloth Tønnesen Date: Sun Jun 9 17:33:54 2024 +0000 nfp: flower: validate encapsulation control flags Encapsulation control flags are currently not used anywhere, so all flags are currently unsupported by all drivers. This patch adds validation of this assumption, so that encapsulation flags may be used in the future. In case any encapsulation control flags are masked, flow_rule_match_has_enc_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen Signed-off-by: Louis Peens Reviewed-by: Davide Caratti Link: https://lore.kernel.org/r/20240609173358.193178-5-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 28d19ec9175534a6f4b38a042c3b83baf8563a8c Author: Asbjørn Sloth Tønnesen Date: Sun Jun 9 17:33:53 2024 +0000 net/mlx5e: flower: validate encapsulation control flags Encapsulation control flags are currently not used anywhere, so all flags are currently unsupported by all drivers. This patch adds validation of this assumption, so that encapsulation flags may be used in the future. In case any encapsulation control flags are masked, flow_rule_match_has_enc_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Davide Caratti Link: https://lore.kernel.org/r/20240609173358.193178-4-ast@fiberby.net Signed-off-by: Jakub Kicinski commit 2ede54f8786f6abae25eec41dd821259484be586 Author: Asbjørn Sloth Tønnesen Date: Sun Jun 9 17:33:52 2024 +0000 sfc: use flow_rule_is_supp_enc_control_flags() Change the existing check for unsupported encapsulation control flags, to use the new helper flow_rule_is_supp_enc_control_flags(). No functional change, only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen Acked-by: Edward Cree Reviewed-by: Davide Caratti Link: https://lore.kernel.org/r/20240609173358.193178-3-ast@fiberby.net Signed-off-by: Jakub Kicinski commit b48a1540b73a3c3a9ef59ce34176cc8180c6ce57 Author: Asbjørn Sloth Tønnesen Date: Sun Jun 9 17:33:51 2024 +0000 flow_offload: add encapsulation control flag helpers This patch adds two new helper functions: flow_rule_is_supp_enc_control_flags() flow_rule_has_enc_control_flags() They are intended to be used for validating encapsulation control flags, and compliment the similar helpers without "enc_" in the name. The only difference is that they have their own error message, to make it obvious if an unsupported flag error is related to FLOW_DISSECTOR_KEY_CONTROL or FLOW_DISSECTOR_KEY_ENC_CONTROL. flow_rule_has_enc_control_flags() is for drivers supporting FLOW_DISSECTOR_KEY_ENC_CONTROL, but not supporting any encapsulation control flags. (Currently all 4 drivers fits this category) flow_rule_is_supp_enc_control_flags() is currently only used for the above helper, but should also be used by drivers once they implement at least one encapsulation control flag. There is AFAICT currently no need for an "enc_" variant of flow_rule_match_has_control_flags(), as all drivers currently supporting FLOW_DISSECTOR_KEY_ENC_CONTROL, are already calling flow_rule_match_enc_control() directly. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Davide Caratti Link: https://lore.kernel.org/r/20240609173358.193178-2-ast@fiberby.net Signed-off-by: Jakub Kicinski commit dee4dd10c79aaca192b73520d8fb64628468ae0f Author: Elad Yifee Date: Fri Jun 7 11:21:50 2024 +0300 net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs Add the missing pieces to allow multiple PPEs units, one for each GMAC. mtk_gdm_config has been modified to work on targted mac ID, the inner loop moved outside of the function to allow unrelated operations like setting the MAC's PPE index. Introduce a sanity check in flow_offload_replace to account for non-MTK ingress devices. Additional field 'ppe_idx' was added to struct mtk_mac in order to keep track on the assigned PPE unit. Signed-off-by: Elad Yifee Link: https://lore.kernel.org/r/20240607082155.20021-1-eladwf@gmail.com Signed-off-by: Jakub Kicinski commit 05f43db7f011d0ebf95bd28562d7f23e30d7e107 Merge: 32b06603f8790 5f90d93b61080 Author: Jakub Kicinski Date: Wed Jun 12 16:42:18 2024 -0700 Merge branch 'allow-configuration-of-multipath-hash-seed' Petr Machata says: ==================== Allow configuration of multipath hash seed Let me just quote the commit message of patch #2 here to inform the motivation and some of the implementation: When calculating hashes for the purpose of multipath forwarding, both IPv4 and IPv6 code currently fall back on flow_hash_from_keys(). That uses a randomly-generated seed. That's a fine choice by default, but unfortunately some deployments may need a tighter control over the seed used. In this patchset, make the seed configurable by adding a new sysctl key, net.ipv4.fib_multipath_hash_seed to control the seed. This seed is used specifically for multipath forwarding and not for the other concerns that flow_hash_from_keys() is used for, such as queue selection. Expose the knob as sysctl because other such settings, such as headers to hash, are also handled that way. Despite being placed in the net.ipv4 namespace, the multipath seed sysctl is used for both IPv4 and IPv6, similarly to e.g. a number of TCP variables. Like those, the multipath hash seed is a per-netns variable. The seed used by flow_hash_from_keys() is a 128-bit quantity. However it seems that usually the seed is a much more modest value. 32 bits seem typical (Cisco, Cumulus), some systems go even lower. For that reason, and to decouple the user interface from implementation details, go with a 32-bit quantity, which is then quadruplicated to form the siphash key. One example of use of this interface is avoiding hash polarization, where two ECMP routers, one behind the other, happen to make consistent hashing decisions, and as a result, part of the ECMP space of the latter router is never used. Another is a load balancer where several machines forward traffic to one of a number of leaves, and the forwarding decisions need to be made consistently. (This is a case of a desired hash polarization, mentioned e.g. in chapter 6.3 of [0].) There has already been a proposal to include a hash seed control interface in the past[1]. - Patches #1-#2 contain the substance of the work - Patch #3 is an mlxsw offload - Patches #4 and #5 are a selftest [0] https://www.usenix.org/system/files/conference/nsdi18/nsdi18-araujo.pdf [1] https://lore.kernel.org/netdev/YIlVpYMCn%2F8WfE1P@rnd/ ==================== Link: https://lore.kernel.org/r/20240607151357.421181-1-petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 5f90d93b6108098f389f992e267588924e446049 Author: Petr Machata Date: Fri Jun 7 17:13:57 2024 +0200 selftests: forwarding: router_mpath_hash: Add a new selftest Add a selftest that exercises the sysctl added in the previous patches. Test that set/get works as expected; that across seeds we eventually hit all NHs (test_mpath_seed_*); and that a given seed keeps hitting the same NHs even across seed changes (test_mpath_seed_stability_*). Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607151357.421181-6-petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 6f51aed38a4f4923a699d741553c612dec85fd14 Author: Petr Machata Date: Fri Jun 7 17:13:56 2024 +0200 selftests: forwarding: lib: Split sysctl_save() out of sysctl_set() In order to be able to save the current value of a sysctl without changing it, split the relevant bit out of sysctl_set() into a new helper. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607151357.421181-5-petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 60bcfede3f9f54d4f1614906dd73e6acc23e9518 Author: Petr Machata Date: Fri Jun 7 17:13:55 2024 +0200 mlxsw: spectrum_router: Apply user-defined multipath hash seed When Spectrum machines compute hash for the purposes of ECMP routing, they use a seed specified through RECR_v2 (Router ECMP Configuration Register). Up until now mlxsw computed the seed by hashing the machine's base MAC. Now that we can optionally have a user-provided seed, use that if possible. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607151357.421181-4-petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 4ee2a8cace3fb9a34aea6a56426f89d26dd514f3 Author: Petr Machata Date: Fri Jun 7 17:13:54 2024 +0200 net: ipv4: Add a sysctl to set multipath hash seed When calculating hashes for the purpose of multipath forwarding, both IPv4 and IPv6 code currently fall back on flow_hash_from_keys(). That uses a randomly-generated seed. That's a fine choice by default, but unfortunately some deployments may need a tighter control over the seed used. In this patch, make the seed configurable by adding a new sysctl key, net.ipv4.fib_multipath_hash_seed to control the seed. This seed is used specifically for multipath forwarding and not for the other concerns that flow_hash_from_keys() is used for, such as queue selection. Expose the knob as sysctl because other such settings, such as headers to hash, are also handled that way. Like those, the multipath hash seed is a per-netns variable. Despite being placed in the net.ipv4 namespace, the multipath seed sysctl is used for both IPv4 and IPv6, similarly to e.g. a number of TCP variables. The seed used by flow_hash_from_keys() is a 128-bit quantity. However it seems that usually the seed is a much more modest value. 32 bits seem typical (Cisco, Cumulus), some systems go even lower. For that reason, and to decouple the user interface from implementation details, go with a 32-bit quantity, which is then quadruplicated to form the siphash key. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607151357.421181-3-petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 3e453ca122d483eb519f934b6624215f0536301c Author: Petr Machata Date: Fri Jun 7 17:13:53 2024 +0200 net: ipv4,ipv6: Pass multipath hash computation through a helper The following patches will add a sysctl to control multipath hash seed. In order to centralize the hash computation, add a helper, fib_multipath_hash_from_keys(), and have all IPv4 and IPv6 route.c invocations of flow_hash_from_keys() go through this helper instead. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607151357.421181-2-petrm@nvidia.com Signed-off-by: Jakub Kicinski commit d8a7d89abb091fe4c1744241c7a40dbad570fd9e Author: Hal Feng Date: Wed Jun 5 15:17:01 2024 +0800 riscv: defconfig: Enable StarFive JH7110 drivers Add support for StarFive JH7110 SoC and VisionFive 2 board. - Cache - Temperature sensor - PMIC (AXP15060) - Ethernet PHY (YT8531) - Restart GPIO - RNG - I2C - SPI - Quad SPI - PCIe - USB & USB 2.0 PHY & PCIe 2.0/USB 3.0 PHY - Audio (I2S / TDM / PWM-DAC) - MIPI-CSI2 RX & D-PHY RX Signed-off-by: Hal Feng Acked-by: Palmer Dabbelt Signed-off-by: Conor Dooley commit c2670cf789500304097cd115483cc70e1feb9472 Merge: 83a7eefedc9b5 305a5170dc5cf Author: Jens Axboe Date: Wed Jun 12 16:00:39 2024 -0600 Merge tag 'md-6.11-20240612' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.11/block Pull MD updates from Song: "The major changes in this PR are: - sync_action fix and refactoring, by Yu Kuai; - Various small fixes by Christoph Hellwig, Li Nan, and Ofir Gal." * tag 'md-6.11-20240612' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: avoid BUG_ON() while continue reshape after reassembling md: pass in max_sectors for pers->sync_request() md: factor out helpers for different sync_action in md_do_sync() md: replace last_sync_action with new enum type md: use new helpers in md_do_sync() md: don't fail action_store() if sync_thread is not registered md: remove parameter check_seq for stop_sync_thread() md: replace sysfs api sync_action with new helpers md: factor out helper to start reshape from action_store() md: add new helpers for sync_action md: add a new enum type sync_action md: rearrange recovery_flags md/md-bitmap: fix writing non bitmap pages md/raid1: don't free conf on raid0_run failure md/raid0: don't free conf on raid0_run failure md: make md_flush_request() more readable md: fix deadlock between mddev_suspend and flush bio md: change the return value type of md_write_start to void md: do not delete safemode_timer in mddev_suspend commit 32b06603f8790b34835af43d259152eb57827413 Author: Sean Anderson Date: Tue Jun 11 11:41:16 2024 -0400 net: xilinx: axienet: Use NL_SET_ERR_MSG instead of netdev_err This error message can be triggered by userspace. Use NL_SET_ERR_MSG so the message is returned to the user and to avoid polluting the kernel logs. Additionally, change the return value from EFAULT to EBUSY to better reflect the error (which has nothing to do with addressing). Signed-off-by: Sean Anderson Reviewed-by: Andrew Lunn Reviewed-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/20240611154116.2643662-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski commit 721478fe6a5cd243e289105e3fdd0ecdd9d39ac3 Author: Geert Uytterhoeven Date: Tue Jun 11 15:48:48 2024 +0200 ravb: RAVB should select PAGE_POOL If CONFIG_PAGE_POOL is not enabled: aarch64-linux-gnu-ld: Unexpected GOT/PLT entries detected! aarch64-linux-gnu-ld: Unexpected run-time procedure linkages detected! aarch64-linux-gnu-ld: drivers/net/ethernet/renesas/ravb_main.o: in function `ravb_rx_ring_refill': ravb_main.c:(.text+0x8d8): undefined reference to `page_pool_alloc_pages' aarch64-linux-gnu-ld: ravb_main.c:(.text+0x944): undefined reference to `page_pool_alloc_frag' aarch64-linux-gnu-ld: drivers/net/ethernet/renesas/ravb_main.o: in function `ravb_ring_init': ravb_main.c:(.text+0x1d4c): undefined reference to `page_pool_create' Fixes: 966726324b7b1400 ("net: ravb: Allocate RX buffers via page pool") Signed-off-by: Geert Uytterhoeven Reviewed-by: Paul Barker Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/fa61b464ae1aa7630e9024f091991937941d49f1.1718113630.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit e8496ad6d804234933791daf3198c3a7fee522aa Author: Ahmad Fatoum Date: Wed May 29 10:08:29 2024 +0200 docs: crypto: async-tx-api: fix broken code example The code example fails to compile: 1) addr_conv is defined twice, once as a VLA, which have been phased out 2) submit is not a pointer, but is still dereferenced with -> 3) The first call to async_xor() lacked the trailing semicolon Fix these issues and while at it, fix some code style nitpicks as well: 1) make the functions static as users are unlikely to export them 2) include the relevant header 3) Shorten the example a bit by removing a redundant variable definition Fixes: 04ce9ab385dc ("async_xor: permit callers to pass in a 'dma/page scribble' region") Signed-off-by: Ahmad Fatoum Reviewed-by: Andre Noll Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240529-async-dma-docs-v2-1-8faf87e72e6d@pengutronix.de commit d2675fe95fc7e880aecad2d08626131527e084a6 Merge: 91579c93a9b20 d1dab4f71d372 Author: Jakub Kicinski Date: Wed Jun 12 14:34:02 2024 -0700 Merge branch 'net-flow-dissector-allow-explicit-passing-of-netns' Florian Westphal says: ==================== net: flow dissector: allow explicit passing of netns Change since last version: fix kdoc comment warning reported by kbuild robot, no other changes, thus retaining RvB tags from Eric and Willem. v1: https://lore.kernel.org/netdev/20240607083205.3000-1-fw@strlen.de/ Years ago flow dissector gained ability to delegate flow dissection to a bpf program, scoped per netns. The netns is derived from skb->dev, and if that is not available, from skb->sk. If neither is set, we hit a (benign) WARN_ON_ONCE(). This WARN_ON_ONCE can be triggered from netfilter. Known skb origins are nf_send_reset and ipv4 stack generated IGMP messages. Lets allow callers to pass the current netns explicitly and make nf_tables use those instead. This targets net-next instead of net because the WARN is benign and this is not a regression. ==================== Link: https://lore.kernel.org/r/20240608221057.16070-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit d1dab4f71d372e00e2d34a9c32bf261623e3a95c Author: Florian Westphal Date: Sun Jun 9 00:10:40 2024 +0200 net: add and use __skb_get_hash_symmetric_net Similar to previous patch: apply same logic for __skb_get_hash_symmetric and let callers pass the netns to the dissector core. Existing function is turned into a wrapper to avoid adjusting all callers, nft_hash.c uses new function. Reviewed-by: Willem de Bruijn Signed-off-by: Florian Westphal Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240608221057.16070-3-fw@strlen.de Signed-off-by: Jakub Kicinski commit b975d3ee5962237c1e2f5d5aeeaaf0dc2173486c Author: Florian Westphal Date: Sun Jun 9 00:10:39 2024 +0200 net: add and use skb_get_hash_net Years ago flow dissector gained ability to delegate flow dissection to a bpf program, scoped per netns. Unfortunately, skb_get_hash() only gets an sk_buff argument instead of both net+skb. This means the flow dissector needs to obtain the netns pointer from somewhere else. The netns is derived from skb->dev, and if that is not available, from skb->sk. If neither is set, we hit a (benign) WARN_ON_ONCE(). Trying both dev and sk covers most cases, but not all, as recently reported by Christoph Paasch. In case of nf-generated tcp reset, both sk and dev are NULL: WARNING: .. net/core/flow_dissector.c:1104 skb_flow_dissect_flow_keys include/linux/skbuff.h:1536 [inline] skb_get_hash include/linux/skbuff.h:1578 [inline] nft_trace_init+0x7d/0x120 net/netfilter/nf_tables_trace.c:320 nft_do_chain+0xb26/0xb90 net/netfilter/nf_tables_core.c:268 nft_do_chain_ipv4+0x7a/0xa0 net/netfilter/nft_chain_filter.c:23 nf_hook_slow+0x57/0x160 net/netfilter/core.c:626 __ip_local_out+0x21d/0x260 net/ipv4/ip_output.c:118 ip_local_out+0x26/0x1e0 net/ipv4/ip_output.c:127 nf_send_reset+0x58c/0x700 net/ipv4/netfilter/nf_reject_ipv4.c:308 nft_reject_ipv4_eval+0x53/0x90 net/ipv4/netfilter/nft_reject_ipv4.c:30 [..] syzkaller did something like this: table inet filter { chain input { type filter hook input priority filter; policy accept; meta nftrace set 1 tcp dport 42 reject with tcp reset } chain output { type filter hook output priority filter; policy accept; # empty chain is enough } } ... then sends a tcp packet to port 42. Initial attempt to simply set skb->dev from nf_reject_ipv4 doesn't cover all cases: skbs generated via ipv4 igmp_send_report trigger similar splat. Moreover, Pablo Neira found that nft_hash.c uses __skb_get_hash_symmetric() which would trigger same warn splat for such skbs. Lets allow callers to pass the current netns explicitly. The nf_trace infrastructure is adjusted to use the new helper. __skb_get_hash_symmetric is handled in the next patch. Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/494 Reviewed-by: Willem de Bruijn Signed-off-by: Florian Westphal Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240608221057.16070-2-fw@strlen.de Signed-off-by: Jakub Kicinski commit 99a021edde0287d04afc0de6a72d7f8fbfcecdd0 Author: Jinjie Ruan Date: Tue Jun 4 19:40:05 2024 +0800 Documentation: kernel-parameters: Add RISCV for nohlt Since commit bcf11b5e99b2 ("riscv: Enable idle generic idle loop") enable idle generic idle loop for RISCV, but the document is not updated synchronously, so update RISCV support for nohlt. Signed-off-by: Jinjie Ruan Fixes: bcf11b5e99b2 ("riscv: Enable idle generic idle loop") Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240604114005.875609-1-ruanjinjie@huawei.com commit 50c0fa7f98c61bd270d6beec637b567ad3096622 Author: Dongliang Mu Date: Tue Jun 11 21:17:16 2024 +0800 scripts: add scripts/checktransupdate.py The checktransupdate.py script helps track the translation status of the documentation in different locales, e.g., zh_CN and verify if these documenation is up-to-date. More specially, it uses `git log` commit to find the latest english commit from the translation commit (order by author date) and the latest english commits from HEAD. If differences occur, report the file and commits that need to be updated. Signed-off-by: Dongliang Mu Signed-off-by: Cheng Ziqiu Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240611131723.53515-1-dzm91@hust.edu.cn commit 79ced51e2e5670da67339d5e21818cbc7ce60646 Author: Alexander Aring Date: Wed Jun 12 17:15:56 2024 -0400 dlm: remove DLM_LSFL_SOFTIRQ from exflags The DLM rcom handling has a check that all exflags are the same for the whole lockspace membership nodes. There are some flags that requires such handling, however DLM_LSFL_SOFTIRQ does not require this handling and it should be backwards compatibility with other lockspaces that does not set this flag. Fixes: f328a26eeb53 ("dlm: introduce DLM_LSFL_SOFTIRQ_SAFE") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 74de938eb502adab1a6cd7ad869b7b64a7ee1828 Author: Dongliang Mu Date: Wed Jun 12 17:11:52 2024 +0800 docs/zh_CN: Update the translation of dev-tools/testing-overview Update to commit 42fb9cfd5b18 ("Documentation: dev-tools: Add link to RV docs") Reviewed-by: Alex Shi Signed-off-by: Dongliang Mu Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240612091155.38866-1-dzm91@hust.edu.cn commit b3d6c48029116971a998c20ea87f51402a2a40f2 Author: Dongliang Mu Date: Thu Jun 13 00:18:32 2024 +0800 docs/zh_CN: Update dev-tools/index.rst Add several newish dev-tools documents to the todo list. Signed-off-by: Dongliang Mu Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240612161835.18931-1-dzm91@hust.edu.cn commit ec5530d6932ec35e92d3ef60d51b0dbc216c8049 Author: Dr. David Alan Gilbert Date: Fri May 31 00:49:18 2024 +0100 fs: dlm: remove unused struct 'dlm_processed_nodes' The last use of 'dlm_processed_nodes' was removed in commit 1696c75f1864 ("fs: dlm: add send ack threshold and append acks to msgs"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: David Teigland commit 566f1dd5281679584a2a1d53a6be5daad7fbb60e Author: Ilpo Järvinen Date: Tue May 7 13:25:23 2024 +0300 PCI: Relax bridge window tail sizing rules During remove & rescan cycle, PCI subsystem will recalculate and adjust the bridge window sizing that was initially done by "BIOS". The size calculation is based on the required alignment of the largest resource among the downstream resources as per pbus_size_mem() (unimportant or zero parameters marked with "..."): min_align = calculate_mem_align(aligns, max_order); size0 = calculate_memsize(size, ..., min_align); inside calculate_memsize(), for the largest alignment: min_align = align1 >> 1; ... return min_align; and then in calculate_memsize(): return ALIGN(max(size, ...), align); If the original bridge window sizing tried to conserve space, this will lead to massive increase of the required bridge window size when the downstream has a large disparity in BAR sizes. E.g., with 16MiB and 16GiB BARs this results in 24GiB bridge window size even if 16MiB BAR does not require gigabytes of space to fit. When doing remove & rescan for a bus that contains such a PCI device, a larger bridge window is suddenly required on rescan but when there is a bridge window upstream that is already assigned based on the original size, it cannot be enlarged to the new requirement. This causes the allocation of the bridge window to fail (0x600000000 > 0x400ffffff): pci 0000:02:01.0: PCI bridge to [bus 03] pci 0000:02:01.0: bridge window [mem 0x40400000-0x405fffff] pci 0000:02:01.0: bridge window [mem 0x6000000000-0x6400ffffff 64bit pref] pci 0000:01:00.0: PCI bridge to [bus 02-04] pci 0000:01:00.0: bridge window [mem 0x40400000-0x406fffff] pci 0000:01:00.0: bridge window [mem 0x6000000000-0x6400ffffff 64bit pref] pci 0000:03:00.0: device released pci 0000:02:01.0: device released pcieport 0000:01:00.0: scanning [bus 02-04] behind bridge, pass 0 pci 0000:02:01.0: PCI bridge to [bus 03] pci 0000:02:01.0: bridge window [mem 0x40400000-0x405fffff] pci 0000:02:01.0: bridge window [mem 0x6000000000-0x6400ffffff 64bit pref] pci 0000:02:01.0: scanning [bus 03-03] behind bridge, pass 0 pci 0000:03:00.0: BAR 0 [mem 0x6400000000-0x6400ffffff 64bit pref] pci 0000:03:00.0: BAR 2 [mem 0x6000000000-0x63ffffffff 64bit pref] pci 0000:03:00.0: ROM [mem 0x40400000-0x405fffff pref] pci 0000:02:01.0: PCI bridge to [bus 03] pci 0000:02:01.0: scanning [bus 03-03] behind bridge, pass 1 pcieport 0000:01:00.0: scanning [bus 02-04] behind bridge, pass 1 pci 0000:02:01.0: bridge window [mem size 0x600000000 64bit pref]: can't assign; no space pci 0000:02:01.0: bridge window [mem size 0x600000000 64bit pref]: failed to assign pci 0000:02:01.0: bridge window [mem 0x40400000-0x405fffff]: assigned pci 0000:03:00.0: BAR 2 [mem size 0x400000000 64bit pref]: can't assign; no space pci 0000:03:00.0: BAR 2 [mem size 0x400000000 64bit pref]: failed to assign pci 0000:03:00.0: BAR 0 [mem size 0x01000000 64bit pref]: can't assign; no space pci 0000:03:00.0: BAR 0 [mem size 0x01000000 64bit pref]: failed to assign pci 0000:03:00.0: ROM [mem 0x40400000-0x405fffff pref]: assigned pci 0000:02:01.0: PCI bridge to [bus 03] pci 0000:02:01.0: bridge window [mem 0x40400000-0x405fffff] This is a major surprise for users who are suddenly left with a device that was working fine with the original bridge window sizing. Even if the already assigned bridge window could be enlarged by reallocation in some cases (something the current code does not attempt to do), it is not possible in general case and the large amount of wasted space at the tail of the bridge window may lead to other resource exhaustion problems on Root Complex level (think of multiple PCIe cards with VFs and BAR size disparity in a single system). PCI BARs only need natural alignment (PCIe r6.1, sec 7.5.1.2.1) and bridge memory windows need 1MiB (sec 7.5.1.3). The current bridge window tail alignment rule was introduced in the commit 5d0a8965aea9 ("[PATCH] 2.5.14: New PCI allocation code (alpha, arm, parisc) [2/2]") that only states: "pbus_size_mem: core stuff; tested with randomly generated sets of resources". It does not explain the motivation for the extra tail space allocated that is not truly needed by the downstream resources. As such, it is far from clear if it ever has been required by any HW. To prevent devices with BAR size disparity from becoming unusable after remove & rescan cycle, attempt to do a truly minimal allocation for memory resources if needed. First check if the normally calculated bridge window will not fit into an already assigned upstream resource. In such case, try with relaxed bridge window tail sizing rules instead where no extra tail space is requested beyond what the downstream resources require. Only enforce the alignment requirement of the bridge window itself (normally 1MiB). With this patch, the resources are successfully allocated: pci 0000:02:01.0: PCI bridge to [bus 03] pci 0000:02:01.0: scanning [bus 03-03] behind bridge, pass 1 pcieport 0000:01:00.0: scanning [bus 02-04] behind bridge, pass 1 pcieport 0000:01:00.0: Assigned bridge window [mem 0x6000000000-0x6400ffffff 64bit pref] to [bus 02-04] cannot fit 0x600000000 required for 0000:02:01.0 bridging to [bus 03] pci 0000:02:01.0: bridge window [mem 0x6000000000-0x6400ffffff 64bit pref] to [bus 03] requires relaxed alignment rules pcieport 0000:01:00.0: Assigned bridge window [mem 0x40400000-0x406fffff] to [bus 02-04] free space at [mem 0x40400000-0x405fffff] pci 0000:02:01.0: bridge window [mem 0x6000000000-0x6400ffffff 64bit pref]: assigned pci 0000:02:01.0: bridge window [mem 0x40400000-0x405fffff]: assigned pci 0000:03:00.0: BAR 2 [mem 0x6000000000-0x63ffffffff 64bit pref]: assigned pci 0000:03:00.0: BAR 0 [mem 0x6400000000-0x6400ffffff 64bit pref]: assigned pci 0000:03:00.0: ROM [mem 0x40400000-0x405fffff pref]: assigned pci 0000:02:01.0: PCI bridge to [bus 03] pci 0000:02:01.0: bridge window [mem 0x40400000-0x405fffff] pci 0000:02:01.0: bridge window [mem 0x6000000000-0x6400ffffff 64bit pref] This patch draws inspiration from the initial investigations and work by Mika Westerberg. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216795 Link: https://lore.kernel.org/linux-pci/20190812144144.2646-1-mika.westerberg@linux.intel.com/ Fixes: 5d0a8965aea9 ("[PATCH] 2.5.14: New PCI allocation code (alpha, arm, parisc) [2/2]") Link: https://lore.kernel.org/r/20240507102523.57320-9-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 8fa0a44eb0adfa94d099e0beba641e8306a178db Author: Ilpo Järvinen Date: Tue May 7 13:25:22 2024 +0300 PCI: Make minimum bridge window alignment reference more obvious Calculations related to bridge window size contain literal 20 that is the minimum alignment for a bridge window. Make the code more obvious by converting the literal 20 to __ffs(SZ_1M). Link: https://lore.kernel.org/r/20240507102523.57320-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen [bhelgaas: squash https://lore.kernel.org/r/20240612093250.17544-1-ilpo.jarvinen@linux.intel.com] Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit da8c3cdb016cca4e2c72c12bff4d6eeb0237e686 Author: Stanislav Lisovskiy Date: Mon Jun 3 14:25:50 2024 +0300 drm/i915: Rename bigjoiner master/slave to bigjoiner primary/secondary According to BSpec we now should call "master" pipes, "primary" pipes and "slave" pipes, should be "secondary" pipes. Signed-off-by: Stanislav Lisovskiy [vsyrjala: Don't rename port sync stuff, catch a few more things] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240603112551.6481-3-stanislav.lisovskiy@intel.com commit fb4943574f927b3140d9ce5aaabfb8730639096f Author: Stanislav Lisovskiy Date: Fri Jun 7 10:54:57 2024 +0300 drm/i915: Rename all bigjoiner to joiner Lets unify both bigjoiner and ultrajoiner under simple "joiner" name, because in future we might have multiple configurations, involving multiple bigjoiners, ultrajoiner, however it is possible to use same api for handling both. v2: - Renamed back some bigjoiner specific parts for now(Ville) Signed-off-by: Stanislav Lisovskiy [vsyrjala: Catch a few more cases] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240607075457.15700-1-stanislav.lisovskiy@intel.com commit d5563f42f59ed2cddf1021a34c9cdd8f4a89021c Author: Andreas Gruenbacher Date: Thu Jun 6 01:15:36 2024 +0200 gfs2: Add some missing quota locking The quota code is missing some locking between local quota changes and syncing those quota changes to the global quota file (gfs2_quota_sync); in particular, qd->qd_change needs to be kept in sync with the QDF_CHANGE change flag and the number of references held. Use the qd->qd_lockref.lock spinlock for that. With the qd->qd_lockref.lock spinlock held, we can no longer call lockref_get(), so turn qd_hold() into a variant that assumes that the lock is held. This function is really supposed to take an additional reference when one or more references are already held, so check for that instead of checking if the lockref is dead. Signed-off-by: Andreas Gruenbacher commit 7fc45cb68696c7213c484ec81892bc8a986fde52 Author: Shradha Gupta Date: Mon Jun 10 03:28:39 2024 -0700 net: mana: Allow variable size indirection table Allow variable size indirection table allocation in MANA instead of using a constant value MANA_INDIRECT_TABLE_SIZE. The size is now derived from the MANA_QUERY_VPORT_CONFIG and the indirection table is allocated dynamically. Signed-off-by: Shradha Gupta Link: https://lore.kernel.org/r/1718015319-9609-1-git-send-email-shradhagupta@linux.microsoft.com Reviewed-by: Dexuan Cui Reviewed-by: Haiyang Zhang Signed-off-by: Leon Romanovsky commit 4ff5747158f323939e2ce8881ca61f3c646948c4 Merge: 98b303c9bf05d 770abbb5a25a5 Author: Alexei Starovoitov Date: Wed Jun 12 11:01:32 2024 -0700 Merge branch 'bpf-support-dumping-kfunc-prototypes-from-btf' Daniel Xu says: ==================== bpf: Support dumping kfunc prototypes from BTF This patchset enables both detecting as well as dumping compilable prototypes for kfuncs. The first commit instructs pahole to DECL_TAG kfuncs when available. This requires v1.27 which was released on 6/11/24. With it, users will be able to look at BTF inside vmlinux (or modules) and check if the kfunc they want is available. The final commit teaches bpftool how to dump kfunc prototypes. This is done for developer convenience. The rest of the commits are fixups to enable selftests to use the newly dumped kfunc prototypes. With these, selftests will regularly exercise the newly added codepaths. Tested with and without the required pahole changes: * https://github.com/kernel-patches/bpf/pull/7186 * https://github.com/kernel-patches/bpf/pull/7187 === Changelog === From v4: * Change bpf_session_cookie() return type * Only fixup used fentry test kfunc prototypes * Extract out projection detection into shared btf_is_projection_of() * Fix kernel test robot build warnings about doc comments From v3: * Teach selftests to use dumped prototypes From v2: * Update Makefile.btf with pahole flag * More error checking * Output formatting changes * Drop already-merged commit From v1: * Add __weak annotation * Use btf_dump for kfunc prototypes * Update kernel bpf_rdonly_cast() signature ==================== Link: https://lore.kernel.org/r/cover.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 770abbb5a25a5b767f1c60ba366aea503728e957 Author: Daniel Xu Date: Wed Jun 12 09:58:36 2024 -0600 bpftool: Support dumping kfunc prototypes from BTF This patch enables dumping kfunc prototypes from bpftool. This is useful b/c with this patch, end users will no longer have to manually define kfunc prototypes. For the kernel tree, this also means we can optionally drop kfunc prototypes from: tools/testing/selftests/bpf/bpf_kfuncs.h tools/testing/selftests/bpf/bpf_experimental.h Example usage: $ make PAHOLE=/home/dxu/dev/pahole/build/pahole -j30 vmlinux $ ./tools/bpf/bpftool/bpftool btf dump file ./vmlinux format c | rg "__ksym;" | head -3 extern void cgroup_rstat_updated(struct cgroup *cgrp, int cpu) __weak __ksym; extern void cgroup_rstat_flush(struct cgroup *cgrp) __weak __ksym; extern struct bpf_key *bpf_lookup_user_key(u32 serial, u64 flags) __weak __ksym; Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/bf6c08f9263c4bd9d10a717de95199d766a13f61.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit c567cba34585514f82600a10587c8813c50e3a7c Author: Daniel Xu Date: Wed Jun 12 09:58:35 2024 -0600 bpf: selftests: xfrm: Opt out of using generated kfunc prototypes The xfrm_info selftest locally defines an aliased type such that folks with CONFIG_XFRM_INTERFACE=m/n configs can still build the selftests. See commit aa67961f3243 ("selftests/bpf: Allow building bpf tests with CONFIG_XFRM_INTERFACE=[m|n]"). Thus, it is simpler if this selftest opts out of using enerated kfunc prototypes. The preprocessor macro this commit uses will be introduced in the final commit. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/afe0bb1c50487f52542cdd5230c4aef9e36ce250.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit f709124dd72fe7a3f6ba7764b2ed145c55c33e47 Author: Daniel Xu Date: Wed Jun 12 09:58:34 2024 -0600 bpf: selftests: nf: Opt out of using generated kfunc prototypes The bpf-nf selftests play various games with aliased types such that folks with CONFIG_NF_CONNTRACK=m/n configs can still build the selftests. See commits: 1058b6a78db2 ("selftests/bpf: Do not fail build if CONFIG_NF_CONNTRACK=m/n") 92afc5329a5b ("selftests/bpf: Fix build errors if CONFIG_NF_CONNTRACK=m") Thus, it is simpler if these selftests opt out of using generated kfunc prototypes. The preprocessor macro this commit uses will be introduced in the final commit. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/044a5b10cb3abd0d71cb1c818ee0bfc4a2239332.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit cce4c40b960673f9e020835def310f1e89d3a940 Author: Daniel Xu Date: Wed Jun 12 09:58:33 2024 -0600 bpf: treewide: Align kfunc signatures to prog point-of-view Previously, kfunc declarations in bpf_kfuncs.h (and others) used "user facing" types for kfuncs prototypes while the actual kfunc definitions used "kernel facing" types. More specifically: bpf_dynptr vs bpf_dynptr_kern, __sk_buff vs sk_buff, and xdp_md vs xdp_buff. It wasn't an issue before, as the verifier allows aliased types. However, since we are now generating kfunc prototypes in vmlinux.h (in addition to keeping bpf_kfuncs.h around), this conflict creates compilation errors. Fix this conflict by using "user facing" types in kfunc definitions. This results in more casts, but otherwise has no additional runtime cost. Note, similar to 5b268d1ebcdc ("bpf: Have bpf_rdonly_cast() take a const pointer"), we also make kfuncs take const arguments where appropriate in order to make the kfunc more permissive. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/b58346a63a0e66bc9b7504da751b526b0b189a67.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit ec209ad86324de84ef66990f0e9df0851e45e054 Author: Daniel Xu Date: Wed Jun 12 09:58:32 2024 -0600 bpf: verifier: Relax caller requirements for kfunc projection type args Currently, if a kfunc accepts a projection type as an argument (eg struct __sk_buff *), the caller must exactly provide exactly the same type with provable provenance. However in practice, kfuncs that accept projection types _must_ cast to the underlying type before use b/c projection type layouts are completely made up. Thus, it is ok to relax the verifier rules around implicit conversions. We will use this functionality in the next commit when we align kfuncs to user-facing types. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/e2c025cb09ccfd4af1ec9e18284dc3cecff7514d.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 0ce089cbdc6a393bf9ad04964427852800503a58 Author: Daniel Xu Date: Wed Jun 12 09:58:31 2024 -0600 bpf: selftests: Namespace struct_opt callbacks in bpf_dctcp With generated kfunc prototypes, the existing callback names will conflict. Fix by namespacing with a bpf_ prefix. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/efe7aadad8a054e5aeeba94b1d2e4502eee09d7a.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 2b8dd87332cd2782b5b3f0c423bd6693e487ed30 Author: Daniel Xu Date: Wed Jun 12 09:58:30 2024 -0600 bpf: Make bpf_session_cookie() kfunc return long * We will soon be generating kfunc prototypes from BTF. As part of that, we need to align the manual signatures in bpf_kfuncs.h with the actual kfunc definitions. There is currently a conflicting signature for bpf_session_cookie() w.r.t. return type. The original intent was to return long * and not __u64 *. You can see evidence of that intent in a3a5113393cc ("selftests/bpf: Add kprobe session cookie test"). Fix conflict by changing kfunc definition. Fixes: 5c919acef851 ("bpf: Add support for kprobe session cookie") Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/7043e1c251ab33151d6e3830f8ea1902ed2604ac.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit ac42f636dc11b2e8d6dea9dd5bb10a39c7bec342 Author: Daniel Xu Date: Wed Jun 12 09:58:29 2024 -0600 bpf: selftests: Fix bpf_map_sum_elem_count() kfunc prototype The prototype in progs/map_percpu_stats.c is not in line with how the actual kfuncs are defined in kernel/bpf/map_iter.c. This causes compilation errors when kfunc prototypes are generated from BTF. Fix by aligning with actual kfunc definitions. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/0497e11a71472dcb71ada7c90ad691523ae87c3b.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 89f0b1abac497c47d0851b780abecc756c1e8734 Author: Daniel Xu Date: Wed Jun 12 09:58:28 2024 -0600 bpf: selftests: Fix bpf_cpumask_first_zero() kfunc prototype The prototype in progs/nested_trust_common.h is not in line with how the actual kfuncs are defined in kernel/bpf/cpumask.c. This causes compilation errors when kfunc prototypes are generated from BTF. Fix by aligning with actual kfunc definitions. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/437936a4e554b02e04566dd6e3f0a5d08370cc8c.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit dff96e4f5078c6c61fc6c36dddf27b124c4318fc Author: Daniel Xu Date: Wed Jun 12 09:58:27 2024 -0600 bpf: selftests: Fix fentry test kfunc prototypes Some prototypes in progs/get_func_ip_test.c were not in line with how the actual kfuncs are defined in net/bpf/test_run.c. This causes compilation errors when kfunc prototypes are generated from BTF. Fix by aligning with actual kfunc definitions. Also remove two unused prototypes. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/1e68870e7626b7b9c6420e65076b307fc404a2f0.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 718135f5bd24ec10ff38aa0294a7da0a7b99fa89 Author: Daniel Xu Date: Wed Jun 12 09:58:26 2024 -0600 bpf: selftests: Fix bpf_iter_task_vma_new() prototype bpf_iter_task_vma_new() is defined as taking a u64 as its 3rd argument. u64 is a unsigned long long. bpf_experimental.h was defining the prototype as unsigned long. Fix by using __u64. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/fab4509bfee914f539166a91c3ff41e949f3df30.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit ebb79e96f1ea454fbcc8fe27dfe44e751bd74b4b Author: Daniel Xu Date: Wed Jun 12 09:58:25 2024 -0600 kbuild: bpf: Tell pahole to DECL_TAG kfuncs With [0], pahole can now discover kfuncs and inject DECL_TAG into BTF. With this commit, we will start shipping said DECL_TAGs to downstream consumers if pahole supports it. This is useful for feature probing kfuncs as well as generating compilable prototypes. This is particularly important as kfuncs do not have stable ABI. [0]: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=72e88f29c6f7e14201756e65bd66157427a61aaf Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/324aac5c627bddb80d9968c30df6382846994cc8.1718207789.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 8e97ddd586148fe8852c388eb7c9bba70223da5f Author: Neil Armstrong Date: Wed Jun 5 11:36:00 2024 +0200 dt-bindings: phy: g12a-usb2-phy: add optional power-domains On newer SoCs, the USB2 PHY can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240605-topic-amlogic-upstream-bindings-fixes-power-domains-phy-v1-1-c819b0ecd8c8@linaro.org Signed-off-by: Vinod Koul commit e8ffc08366f9787a69ac4b4fb3bfa0f837cd846a Author: Animesh Agarwal Date: Tue Jun 11 17:52:51 2024 +0530 ASoC: dt-bindings: wlf,wm8804: Convert to dtschema Convert the WM8804 audio codec bindings to DT schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Rob Herring (Arm) Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240611122258.47406-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit 01e29260c645bb844fb73ad40a022d6647fb52a0 Author: Animesh Agarwal Date: Tue Jun 11 18:14:00 2024 +0530 ASoC: dt-bindings: wlf,wm8782: Convert to dtschema Convert the WM8782 audio codec bindings to DT schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Rob Herring (Arm) Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20240611124405.63427-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit e54700f7d6aa2ae0d0a0aeeebedcecd7ce1123fe Author: Matt Roper Date: Mon Jun 3 20:24:30 2024 +0530 drm/xe/bmg: Add PCI IDs Add the initial set of device IDs for Battlemage. Signed-off-by: Matt Roper Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20240603145430.1260817-1-balasubramani.vivekanandan@intel.com commit 305a5170dc5cf3d395bb4c4e9239bca6d0b54b49 Author: Yu Kuai Date: Tue Jun 11 21:22:51 2024 +0800 md/raid5: avoid BUG_ON() while continue reshape after reassembling Currently, mdadm support --revert-reshape to abort the reshape while reassembling, as the test 07revert-grow. However, following BUG_ON() can be triggerred by the test: kernel BUG at drivers/md/raid5.c:6278! invalid opcode: 0000 [#1] PREEMPT SMP PTI irq event stamp: 158985 CPU: 6 PID: 891 Comm: md0_reshape Not tainted 6.9.0-03335-g7592a0b0049a #94 RIP: 0010:reshape_request+0x3f1/0xe60 Call Trace: raid5_sync_request+0x43d/0x550 md_do_sync+0xb7a/0x2110 md_thread+0x294/0x2b0 kthread+0x147/0x1c0 ret_from_fork+0x59/0x70 ret_from_fork_asm+0x1a/0x30 Root cause is that --revert-reshape update the raid_disks from 5 to 4, while reshape position is still set, and after reassembling the array, reshape position will be read from super block, then during reshape the checking of 'writepos' that is caculated by old reshape position will fail. Fix this panic the easy way first, by converting the BUG_ON() to WARN_ON(), and stop the reshape if checkings fail. Noted that mdadm must fix --revert-shape as well, and probably md/raid should enhance metadata validation as well, however this means reassemble will fail and there must be user tools to fix the wrong metadata. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-13-yukuai1@huaweicloud.com commit bc49694a9e8fd1b36bca47d9a54ec8da8e39012f Author: Yu Kuai Date: Tue Jun 11 21:22:50 2024 +0800 md: pass in max_sectors for pers->sync_request() For different sync_action, sync_thread will use different max_sectors, see details in md_sync_max_sectors(), currently both md_do_sync() and pers->sync_request() in eatch iteration have to get the same max_sectors. Hence pass in max_sectors for pers->sync_request() to prevent redundant code. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-12-yukuai1@huaweicloud.com commit bbf2076277b137f03624259da0a0369af88f3a68 Author: Yu Kuai Date: Tue Jun 11 21:22:49 2024 +0800 md: factor out helpers for different sync_action in md_do_sync() Make code cleaner by replacing if else if with switch, and it's more obvious now what is doing for each sync_action. There are no functional changes. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-11-yukuai1@huaweicloud.com commit d249e541887a966df37544f7c4d301cdee0f0e27 Author: Yu Kuai Date: Tue Jun 11 21:22:48 2024 +0800 md: replace last_sync_action with new enum type The only difference is that "none" is removed and initial last_sync_action will be idle. On the one hand, this value is introduced by commit c4a395514516 ("MD: Remember the last sync operation that was performed"), and the usage described in commit message is not affected. On the other hand, last_sync_action is not used in mdadm or mdmon, and none of the tests that I can find. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-10-yukuai1@huaweicloud.com commit 7d9f107a4e946bb52b7502eed9ed8f316700397e Author: Yu Kuai Date: Tue Jun 11 21:22:47 2024 +0800 md: use new helpers in md_do_sync() Make code cleaner. and also use the action_name directly in kernel log: - "check" instead of "data-check" - "repair" instead of "requested-resync" Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-9-yukuai1@huaweicloud.com commit 5ce10a38590c77f20d0dc706944f79e7d56a7400 Author: Yu Kuai Date: Tue Jun 11 21:22:46 2024 +0800 md: don't fail action_store() if sync_thread is not registered MD_RECOVERY_RUNNING will always be set when trying to register a new sync_thread, however, if md_start_sync() turns out to do nothing, MD_RECOVERY_RUNNING will be cleared in this case. And during the race window, action_store() will return -EBUSY, which will cause some mdadm tests to fail. For example: The test 07reshape5intr will add a new disk to array, then start reshape: mdadm /dev/md0 --add /dev/xxx mdadm --grow /dev/md0 -n 3 And add_bound_rdev() from mdadm --add will set MD_RECOVERY_NEEDED, then during the race windown, mdadm --grow will fail. Fix the problem by waiting in action_store() during the race window, fail only if sync_thread is registered. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-8-yukuai1@huaweicloud.com commit df79234bdc3f441bec99dfc8199b6f2c673203ed Author: Yu Kuai Date: Tue Jun 11 21:22:45 2024 +0800 md: remove parameter check_seq for stop_sync_thread() Caller will always set MD_RECOVERY_FROZEN if check_seq is true, and always clear MD_RECOVERY_FROZEN if check_seq is false, hence replace the parameter with test_bit() to make code cleaner. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-7-yukuai1@huaweicloud.com commit c8ecfe680c371db2a6d125de5d6bc2398950e9cf Author: Yu Kuai Date: Tue Jun 11 21:22:44 2024 +0800 md: replace sysfs api sync_action with new helpers To get rid of extrem long if else if usage, and make code cleaner. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-6-yukuai1@huaweicloud.com commit 207c5656c33d56b3759d0876b68fa56cb56e5c51 Author: Yu Kuai Date: Tue Jun 11 21:22:43 2024 +0800 md: factor out helper to start reshape from action_store() There are no functional changes, just to make code cleaner and prepare for following refactor. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-5-yukuai1@huaweicloud.com commit e792a4c2156a392d8126bf0496f74407a21a8824 Author: Yu Kuai Date: Tue Jun 11 21:22:42 2024 +0800 md: add new helpers for sync_action The new helpers will get current sync_action of the array, will be used in later patches to make code cleaner. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-4-yukuai1@huaweicloud.com commit a85aa09da2f2773c685310666ef09f935ff68a45 Author: Yu Kuai Date: Tue Jun 11 21:22:41 2024 +0800 md: add a new enum type sync_action In order to make code related to sync_thread cleaner in following patches, also add detail comment about each sync action. And also prepare to remove the related recovery_flags in the fulture. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-3-yukuai1@huaweicloud.com commit 0476d09c36a845757dd9fd1c80fbbf45b0faeb3c Author: Yu Kuai Date: Tue Jun 11 21:22:40 2024 +0800 md: rearrange recovery_flags Currently there are lots of flags with the same confusing prefix "MD_REOCVERY_", and there are two main types of flags, sync thread runnng status, I prefer prefix "SYNC_THREAD_", and sync thread action, I perfer prefix "SYNC_ACTION_". For now, rearrange and update comment to improve code readability, there are no functional changes. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240611132251.1967786-2-yukuai1@huaweicloud.com commit e81568a0cbb288770f8d2e4b7d41752a9f367bd1 Author: Radhakrishna Sripada Date: Fri Jun 7 11:29:43 2024 -0700 drm/xe: Add reg read/write trace This will help debug register read/writes and provides a way to trace all the mmio transactions. v2: Fix kunit error v3: Print devid to help in multi-gpu setup v3: rebase and use variable sized variant to display dev name(Gustavo) v4: Pass single argument to __asign_str to fix kunit error v5: Remove unrelated include xe_tile.h and remove cast in trace Reviewed-by: Gustavo Sousa Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240607182943.3572524-7-radhakrishna.sripada@intel.com commit 501c4255c40935280a10844cf7550bf1e4f8939b Author: Radhakrishna Sripada Date: Fri Jun 7 11:29:42 2024 -0700 drm/xe/trace: Print device_id in xe_trace events In multi-gpu environments it is important to know the device gt events belongs to. The tracing information includes the device_id to indicate the device the event is associated with. v2: Use variable sized variant to display dev name(Gustavo) v3: Pass single argument to __assign_str to fix kunit error v4: Remove unused sting_helper library include Suggested-by: Ville Syrjälä Cc: Lucas De Marchi Reviewed-by: Gustavo Sousa Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240607182943.3572524-6-radhakrishna.sripada@intel.com commit 3cba2f1d3f18939362e082ea8b9bd8abfa735b84 Author: Radhakrishna Sripada Date: Fri Jun 7 11:29:41 2024 -0700 drm/xe/trace: Print device_id in xe_trace_guc events In multi-gpu environments it is important to know the device guc txn belongs to. The tracing information includes the device_id to indicate the device the event is associated with. v2: Use variable sized variant to display dev name(Gustavo) v3: Pass single argument to __assign_str to fix kunit error v4: Minor formatting tweaks Suggested-by: Ville Syrjälä Cc: Lucas De Marchi Reviewed-by: Gustavo Sousa Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240607182943.3572524-5-radhakrishna.sripada@intel.com commit 3432f26efa45bed7bc61f534ca9d2c0afdaf5632 Author: Radhakrishna Sripada Date: Fri Jun 7 11:29:40 2024 -0700 drm/xe/trace: Print device_id in xe_trace_bo events In multi-gpu environments it is important to know the device bo/vm belongs to. The tracing information includes the device_id to indicate the device the event is associated with. v2: Use variable sized variant to display dev name(Gustavo) v3: Pass single argument to __assign_str to fix kunit error v4: Minor cleanups(Gustavo) Suggested-by: Ville Syrjälä Cc: Lucas De Marchi Reviewed-by: Gustavo Sousa Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240607182943.3572524-4-radhakrishna.sripada@intel.com commit 6a04e1fc36ff762312088c2ca819ada3b9f7ab33 Author: Radhakrishna Sripada Date: Fri Jun 7 11:29:39 2024 -0700 drm/xe/trace: Extract guc related traces xe_trace.h is starting to get over crowded. Move the traces related to guc to its own file. v2: Update year in License(Gustavo) Reviewed-by: Gustavo Sousa Suggested-by: Jani Nikula Cc: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240607182943.3572524-3-radhakrishna.sripada@intel.com commit e46d3f813abd2383881c66d21ba04cee9fbdf3a9 Author: Radhakrishna Sripada Date: Fri Jun 7 11:29:38 2024 -0700 drm/xe/trace: Extract bo, vm, vma traces xe_trace.h is starting to get over crowded. Move the traces related to bo, vm, vma's to its own file. v2: Update year in License(Gustavo) Reviewed-by: Gustavo Sousa Suggested-by: Jani Nikula Cc: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240607182943.3572524-2-radhakrishna.sripada@intel.com commit e05bc474310336e1ab03ed79112909dd0f74d039 Author: Nathan Morrisson Date: Thu Jun 6 16:41:45 2024 -0700 arm64: defconfig: Enable TI LP873X PMIC Enable the TI LP873X PMIC configs for the PHYTEC am642-phyboard-electra board. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240606234145.3311068-1-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit 8a703a728a745a229cfd2b6ccb2ec68a83bd5d0b Author: Ravi Gunasekaran Date: Fri Jun 7 11:40:56 2024 +0530 arm64: defconfig: Enable USB2 PHY Driver The USB controller on TI SoCs such as AM65x needs the USB2 PHY driver to communicate with VBUS/ID comparator. So enable the OMAP USB2 PHY driver. Signed-off-by: Ravi Gunasekaran Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240607061056.708946-1-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 74aa5704cf194441001f16dfd4d5d90f4d3bf413 Author: Vaishnav Achath Date: Tue Jun 11 17:28:20 2024 +0530 arm64: defconfig: Enable MTD support for Hyperbus TI Jacinto 7 SoCs (J721E, J7200) have Hyperbus controllers present which can be used to interface with Hyperflash and HyperRAM storage devices. Enable the necessary configs for Hyperbus support within the MTD subsystem and the specific Hyperbus controller as module. Signed-off-by: Vaishnav Achath Link: https://lore.kernel.org/r/20240611115820.1269805-1-vaishnav.a@ti.com Signed-off-by: Vignesh Raghavendra commit 2f79e7408ac1b22ce8abc4a22b92793a57a3077d Author: Dasnavis Sabiya Date: Wed May 29 13:52:59 2024 +0530 arm64: dts: ti: k3-am69-sk: Add PCIe support The AM69-SK board has 3 instances of PCIe namely PCIe0, PCIe1 and PCIe3. The x4 PCIe0 instance is connected to a Card Edge connector via SERDES1. The x2 PCIe1 instance is connected to an M.2 M Key connector via SERDES0. The x1 PCIe3 instance is connected to an M.2 E Key connector via SERDES0. Add device-tree support for enabling all 3 PCIe instances in Root-Complex mode of operation. Signed-off-by: Dasnavis Sabiya Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240529082259.1619695-5-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 7c4270de2806f80c06dc80c2cf2c8d6eb7c44c59 Author: Siddharth Vadapalli Date: Wed May 29 13:52:58 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Add overlay for PCIe0 and PCIe1 EP Mode Add overlay to enable the PCIe0 and PCIe1 instances of PCIe on J784S4-EVM in Endpoint mode of operation. Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240529082259.1619695-4-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 27ce26fe52d4dcb5bf58cdf5527e2f3a498c1fdf Author: Siddharth Vadapalli Date: Wed May 29 13:52:57 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Enable PCIe0 and PCIe1 in RC Mode Enable PCIe0 and PCIe1 instances of PCIe in Root Complex mode of operation on J784S4 EVM. The lanes of PCIe0 are connected to Serdes1 instance of Serdes while the lanes of PCIe1 are connected to Serdes0 instance of Serdes in J784S4 SoC. Despite both PCIe instances supporting up to 4 Lanes, since the physical connections to the PCIe connector corresponding to the PCIe1 instance of PCIe are limited to 2 Lanes on the J784S4 EVM, update the "num-lanes" property of PCIe1 accordingly. Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240529082259.1619695-3-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 8e05ce691af29db0c7f0d468c8d7c6e13273a9e6 Author: Siddharth Vadapalli Date: Wed May 29 13:52:56 2024 +0530 arm64: dts: ti: k3-j784s4-main: Add PCIe nodes TI's J784S4 SoC has four instances of Gen3 PCIe Controllers namely PCIe0, PCIe1, PCIe2 and PCIe3. PCIe0 and PCIe1 are 4-Lane controllers while PCIe2 and PCIe3 are 2-Lane controllers. Add support for the Root Complex Mode of operation of these PCIe instances. Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240529082259.1619695-2-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 2116f8b73f69a02e42daa89ca3561f367a390e30 Author: Siddharth Vadapalli Date: Tue Jun 4 16:14:25 2024 +0530 arm64: dts: ti: k3-am62p: use eFuse MAC Address for CPSW3G Port 1 Add the "ethernet-mac-syscon" node within "wkup_conf" node corresponding to the CTRLMMR_MAC_IDx registers within the CTRL_MMR space. Assign the compatible "ti,am62p-cpsw-mac-efuse" to enable "syscon_regmap" operations on these registers. The MAC Address programmed in the eFuse is accessible through the CTRLMMR_MAC_IDx registers. The "ti,syscon-efuse" device-tree property points to the CTRLMMR_MAC_IDx registers, allowing the CPSW driver to fetch the MAC Address and assign it to the network interface associated with CPSW3G MAC Port 1. Signed-off-by: Siddharth Vadapalli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604104425.3770037-1-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra commit 7a5775a3da906dab059b8de60a2b88f6016cb4b8 Author: Nathan Morrisson Date: Thu Apr 25 15:19:25 2024 -0700 arm64: dts: ti: am62-phyboard-lyra: Add overlay to increase cpu frequency to 1.4 GHz The am625 is capable of running at 1.4 GHz when VDD_CORE is increased from 0.75V to 0.85V. Increasing the voltage while the AM625 is running has not been validated by TI, so we provide an overlay so that people may choose to run at 1.4 GHz if they need the additional performance. Signed-off-by: Nathan Morrisson Link: https://lore.kernel.org/r/20240425221925.1781226-1-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit e96e36ce1fdcf08a70e3f09cbe2da02b073c58ac Author: Jai Luthra Date: Thu Jun 6 13:37:46 2024 +0530 arm64: dts: ti: k3-am62p5-sk: Fix pinmux for McASP1 TX On SK-AM62P, McASP1 uses two pins for communicating with the codec over I2S protocol. One of these pins (AXR0) is used for audio playback (TX) so the direction of the pin should be OUTPUT. Fixes: c00504ea42c0 ("arm64: dts: ti: k3-am62p5-sk: Updates for SK EVM") Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-7-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit 554dd562a5f2f5d7e838f7b229a1c612275678db Author: Jai Luthra Date: Thu Jun 6 13:37:45 2024 +0530 arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Drop McASP AFIFOs McASP AFIFOs are not necessary with UDMA-P/BCDMA as there is buffering on the DMA IP. Drop these for better audio latency. Fixes: 28c0cf16b308 ("arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Add Audio Codec") Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-6-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit fb01352801f08740e9f37cbd71f73866c7044927 Author: Jai Luthra Date: Thu Jun 6 13:37:44 2024 +0530 arm64: dts: ti: k3-am62-verdin: Drop McASP AFIFOs McASP AFIFOs are not necessary with UDMA-P/BCDMA as there is buffering on the DMA IP. Drop these for better audio latency. Fixes: 316b80246b16 ("arm64: dts: ti: add verdin am62") Acked-by: Francesco Dolcini Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-5-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit 3b4a03357aee07a32a44a49bb6a71f5e82b1ecc1 Author: Jai Luthra Date: Thu Jun 6 13:37:43 2024 +0530 arm64: dts: ti: k3-am625-beagleplay: Drop McASP AFIFOs McASP AFIFOs are not necessary with UDMA-P/BCDMA as there is buffering on the DMA IP. Drop these for better audio latency. Fixes: 1f7226a5e52c ("arm64: dts: ti: k3-am625-beagleplay: Add HDMI support") Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-4-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit d3fe4b4e2e44de64ed1f1585151bf4a3627adbaf Author: Jai Luthra Date: Thu Jun 6 13:37:42 2024 +0530 arm64: dts: ti: k3-am62p5: Drop McASP AFIFOs McASP AFIFOs are not necessary with UDMA-P/BCDMA as there is buffering on the DMA IP. Drop these for better audio latency. Fixes: c00504ea42c0 ("arm64: dts: ti: k3-am62p5-sk: Updates for SK EVM") Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-3-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit a931b81072921a11d5bb8e8201b6228b791d40a9 Author: Jai Luthra Date: Thu Jun 6 13:37:41 2024 +0530 arm64: dts: ti: k3-am62a7: Drop McASP AFIFOs McASP AFIFOs are not necessary with UDMA-P/BCDMA as there is buffering on the DMA IP. Drop these for better audio latency. Fixes: 4a2c5dddf9e9 ("arm64: dts: ti: k3-am62a7-sk: Enable audio on AM62A") Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-2-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit 6ee3ca0ec7fabc63603afdb3485da04164dc8747 Author: Jai Luthra Date: Thu Jun 6 13:37:40 2024 +0530 arm64: dts: ti: k3-am62x: Drop McASP AFIFOs McASP AFIFOs are not necessary with UDMA-P/BCDMA as there is buffering on the DMA IP. Drop these for better audio latency. Fixes: b94b43715e91 ("arm64: dts: ti: Enable audio on SK-AM62(-LP)") Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20240606-mcasp_fifo_drop-v2-1-8c317dabdd0a@ti.com Signed-off-by: Vignesh Raghavendra commit 4d0101e8c69b3324f30bb596d56b5242ffbc6972 Author: MD Danish Anwar Date: Mon Apr 29 14:59:19 2024 +0530 arm64: dts: ti: k3-am642-evm-icssg1-dualemac: add overlay for mii mode Add device tree overlay to enable both ICSSG1 ports available on AM64x-EVM in MII mode. Signed-off-by: MD Danish Anwar Reviewed-by: Ravi Gunasekaran Link: https://lore.kernel.org/r/20240429092919.657629-1-danishanwar@ti.com Signed-off-by: Vignesh Raghavendra commit 8ec9ce361d55d995c4619346e0b9c56b9ba6e5d2 Author: Suman Anna Date: Wed May 29 12:14:19 2024 +0530 arm64: dts: ti: k3-am65-main: Add PRU system events for virtio A PRU system event "vring" has been added to each PRU and RTU node in each of the ICSSG0, ICSSG1 and ICSSG2 remote processor subsystems to enable the virtio/rpmsg communication between MPU and that PRU/RTU core. The additions are done in the base k3-am65-main.dtsi, and so are inherited by all the K3 AM65x boards. The PRU system events is the preferred approach over using TI mailboxes, as it eliminates an external peripheral access from the PRU/RTU-side, and keeps the interrupt generation internal to the ICSSG. The difference from MPU would be minimal in using one versus the other. Mailboxes can still be used if desired, but currently there is no support on firmware-side for K3 SoCs to use mailboxes. Either approach would require that an appropriate firmware image is loaded/booted on the PRU. Signed-off-by: Suman Anna Signed-off-by: Kishon Vijay Abraham I Acked-by: Ravi Gunasekaran Signed-off-by: MD Danish Anwar Link: https://lore.kernel.org/r/20240529064420.571615-3-danishanwar@ti.com Signed-off-by: Vignesh Raghavendra commit 53a3960410c2e703fda2f98706668570eff5ecd4 Author: Suman Anna Date: Wed May 29 12:14:18 2024 +0530 arm64: dts: ti: k3-am64-main: Add PRU system events for virtio PRU system events "vring" have been added to each PRU and RTU node in each of the ICSSG0 and ICSSG1 remote processor subsystems to enable the virtio/rpmsg communication between MPU and that PRU/RTU core. No events have been added to the Tx_PRU cores at present. The additions are done in the base k3-am64main.dtsi, and so are inherited by all the K3 AM64x boards. The PRU system events is the preferred approach over using TI mailboxes, as it eliminates an external peripheral access from the PRU/RTU-side, and keeps the interrupt generation internal to the ICSSG. The difference from MPU would be minimal in using one versus the other. Mailboxes can still be used if desired, but currently there is no support on firmware-side for K3 SoCs to use mailboxes. Either approach would require that an appropriate firmware image is loaded/booted on the PRU. Signed-off-by: Suman Anna Signed-off-by: Kishon Vijay Abraham I Acked-by: Ravi Gunasekaran Signed-off-by: MD Danish Anwar Link: https://lore.kernel.org/r/20240529064420.571615-2-danishanwar@ti.com Signed-off-by: Vignesh Raghavendra commit 79160cabf3136992be4276c22858688e9e1925f2 Author: Neha Malcom Francis Date: Tue May 28 09:31:59 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Add TPS62873 node Add Tulip TPS62873 nodes for J784S4 EVM. These are step-down regulators that supply VDD_CPU_AVS and VDD_CORE_0V8 to the SoC. Signed-off-by: Neha Malcom Francis Link: https://lore.kernel.org/r/20240528040159.3919652-4-n-francis@ti.com Signed-off-by: Vignesh Raghavendra commit 80ad4406922cdeab683c6db22e0a97e54570cc07 Author: Neha Malcom Francis Date: Tue May 28 09:31:58 2024 +0530 arm64: dts: ti: k3-am69-sk: Add TPS62873 node Add DTS node for two TPS6287x high current buck convertors. The two TPS6287x supply power to the MAIN domain for AVS and other core supplies. Signed-off-by: Neha Malcom Francis Link: https://lore.kernel.org/r/20240528040159.3919652-3-n-francis@ti.com Signed-off-by: Vignesh Raghavendra commit 1149215a442b47d54a154c378e6c6080339b3712 Author: Neha Malcom Francis Date: Tue May 28 09:31:57 2024 +0530 arm64: dts: ti: k3-am68-sk-base-board: Add LP8733 and TPS6287 nodes Add DTS node for LP87334E PMIC and two TPS6287x high current buck converters. LP87334E is responsible for supplying power to the MCU and MAIN domains as well as to LPDDR4. The two TPS6287x supply power to the MAIN domain for AVS and other core supplies. Signed-off-by: Neha Malcom Francis Link: https://www.ti.com/lit/pdf/slda060 Link: https://lore.kernel.org/r/20240528040159.3919652-2-n-francis@ti.com Signed-off-by: Vignesh Raghavendra commit bed97e94ee2d422f54334bd509b50ae2a3577f67 Author: Matt Ranostay Date: Tue May 7 15:25:45 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Enable USB3 support The board uses SERDES0 Lane 3 for USB3 IP. So update the SerDes lane info for USB. Add the pin mux data and enable USB3 support. Signed-off-by: Matt Ranostay Signed-off-by: Ravi Gunasekaran Tested-by: Andrew Halaney # k3-j784s4-evm Link: https://lore.kernel.org/r/20240507095545.8210-3-r-gunasekaran@ti.com Signed-off-by: Vignesh Raghavendra commit 75843b63741b122711d07b8fd672485e69223419 Author: Matt Ranostay Date: Tue May 7 15:25:44 2024 +0530 arm64: dts: ti: k3-j784s4-main: Add support for USB Add support for the USB 3.0 controller Signed-off-by: Matt Ranostay Signed-off-by: Ravi Gunasekaran Tested-by: Andrew Halaney # k3-j784s4-evm Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20240507095545.8210-2-r-gunasekaran@ti.com Signed-off-by: Vignesh Raghavendra commit 4b5156e1a413eaa2094b3281d6ea4e6b31cea01b Author: Bhavya Kapoor Date: Fri Apr 12 01:47:47 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Add support for multiple CAN instances CAN instances 0 and 1 in the mcu domain and 16 in the main domain are brought on the evm through headers J42, J43 and J46 respectively. Thus, add their respective transceiver's 0, 1 and 2 dt nodes to add support for these CAN instances. CAN instance 4 in the main domain is brought on the evm through header J45. The CAN High and Low lines from the SoC are routed through a mux on the evm. The select lines need to be set for the CAN signals to reach to its transceiver on the evm. Therefore, add transceiver 3 dt node to add support for this CAN instance. Signed-off-by: Bhavya Kapoor Link: https://lore.kernel.org/r/20240411201747.18697-1-b-kapoor@ti.com Signed-off-by: Vignesh Raghavendra commit fadfb0e0cc3ee0251a1dba10f4603798b46bed8f Author: Vibhore Vardhan Date: Mon Apr 29 13:44:45 2024 -0500 arm64: dts: ti: k3-am62a-wakeup: Enable RTC node On-chip RTC is used as a wakeup source on am62a board designs. This patch removes the disabled status property to enable the RTC node. Signed-off-by: Vibhore Vardhan Tested-by: Kevin Hilman Link: https://lore.kernel.org/r/20240429184445.14876-1-vibhore@ti.com Signed-off-by: Vignesh Raghavendra commit 021d3d5f0741e5393a7a110ac909fc746b1e0a4d Author: Beleswar Padhi Date: Tue Apr 30 18:45:12 2024 +0530 arm64: dts: ti: k3-j721e-sk: Add support for multiple CAN instances CAN instance 0 in the mcu domain is brought on the J721E-SK board through header J1. Thus, add its respective transceiver 1 dt node to add support for this CAN instance. CAN instances 0, 5 and 9 in the main domain are brought on the J721E-SK board through headers J5, J6 and J2 respectively. Thus, add their respective transceivers 2, 3 and 4 dt nodes to add support for these CAN instances. Signed-off-by: Beleswar Padhi Reviewed-by: Bhavya Kapoor Link: https://lore.kernel.org/r/20240430131512.1327283-1-b-padhi@ti.com Signed-off-by: Vignesh Raghavendra commit 2cdf63e73415ce6c8f6b3397cdc91d5f928855f9 Author: Vaishnav Achath Date: Tue May 7 16:03:32 2024 +0530 arm64: dts: ti: k3-j722s: Fix main domain GPIO count J722S does not pin out all of the GPIO same as AM62P and have more number of GPIO on the main_gpio1 instance. Fix the GPIO count on both instances by overriding the ti,ngpio property. Fixes: ea55b9335ad8 ("arm64: dts: ti: Introduce J722S family of SoCs") More details at J722S/AM67 Datasheet (Section 5.3.11, GPIO): https://www.ti.com/lit/ds/symlink/am67.pdf Signed-off-by: Vaishnav Achath Link: https://lore.kernel.org/r/20240507103332.167928-1-vaishnav.a@ti.com Signed-off-by: Vignesh Raghavendra commit 12a29fb4f9a0597ad598f2c986c8e2509a62b6ff Author: Neha Malcom Francis Date: Mon May 6 16:32:03 2024 +0530 arm64: boot: dts: ti: k3-*: Add memory node to bootloader stage Add the bootph-all property to the memory node so that it can be accessed by FDT functions at bootloader stage. The bootloader requires the memory node to be able to initialize and set the size of the DRAM banks. For this purpose, make sure all memory nodes are present and standardized, and modify them if not. Signed-off-by: Neha Malcom Francis Link: https://lore.kernel.org/r/20240506110203.3230255-1-n-francis@ti.com Signed-off-by: Vignesh Raghavendra commit 9dcc0e1065f3c40d0b2ad79a858bb4ebaba33167 Author: Josua Mayer Date: Sat May 4 13:35:54 2024 +0200 arm64: dts: ti: k3-am642-hummingboard-t: correct rs485 rts polarity The RS485 transceiver RE (Receiver enable) and DE (Driver enable) are shorted and connected to both RTS/CTS of the SoC UART. RE is active-low, DE is active-high. Remove the "rs485-rts-active-low" flag to match RTS polarity with DE, and fix communication in both transmit and receive directions. Fixes: d60483faf914 ("arm64: dts: add description for solidrun am642 som and evaluation board") Signed-off-by: Josua Mayer Link: https://lore.kernel.org/r/20240504-ti-rs485-rts-v1-1-e88ef1c96f34@solid-run.com Signed-off-by: Vignesh Raghavendra commit f3841b6a22f1a7635dc73b94b98596b94d153ed1 Author: Nathan Morrisson Date: Mon Apr 29 12:58:30 2024 -0700 arm64: dts: ti: phycore-am64: Add PMIC Add a PMIC node to the phycore-am64 device tree. Signed-off-by: Nathan Morrisson Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20240429195830.4027250-2-nmorrisson@phytec.com Signed-off-by: Vignesh Raghavendra commit a6e6604c600aeedf9700de4a55255850391bc3fc Author: Jayesh Choudhary Date: Tue Apr 30 16:22:53 2024 +0530 arm64: dts: ti: k3-am62p-main: Fix the reg-range for main_pktdma For main_pktdma node, the TX Channel Realtime Register region 'tchanrt' is 128KB and Ring Realtime Register region 'ringrt' is 2MB as shown in memory map in the TRM[0] (Table 2-1). So fix ranges for those register regions. [0]: Fixes: b5080c7c1f7e ("arm64: dts: ti: k3-am62p: Add nodes for more IPs") Signed-off-by: Jayesh Choudhary Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20240430105253.203750-4-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit d007a883a61f55b9b195c4c18bbe29de5b802822 Author: Jayesh Choudhary Date: Tue Apr 30 16:22:52 2024 +0530 arm64: dts: ti: k3-am62a-main: Fix the reg-range for main_pktdma For main_pktdma node, the TX Channel Realtime Register region 'tchanrt' is 128KB and Ring Realtime Register region 'ringrt' is 2MB as shown in memory map in the TRM[0] (Table 2-1). So fix ranges for those register regions. [0]: Fixes: 3dad70def7ff ("arm64: dts: ti: k3-am62a-main: Add more peripheral nodes") Signed-off-by: Jayesh Choudhary Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20240430105253.203750-3-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit 6edad223553c7f1680fcaca25ded59eba7c6d82d Author: Jayesh Choudhary Date: Tue Apr 30 16:22:51 2024 +0530 arm64: dts: ti: k3-am62-main: Fix the reg-range for main_pktdma For main_pktdma node, the TX Channel Realtime Register region 'tchanrt' is 128KB and Ring Realtime Register region 'ringrt' is 2MB as shown in memory map in the TRM[0] (Table 2-1). So fix ranges for those register regions. [0]: Fixes: c37c58fdeb8a ("arm64: dts: ti: k3-am62: Add more peripheral nodes") Signed-off-by: Jayesh Choudhary Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20240430105253.203750-2-j-choudhary@ti.com Signed-off-by: Vignesh Raghavendra commit 838ceca36b2188899a0100461799f179c53de550 Author: Siddharth Vadapalli Date: Thu May 2 14:40:02 2024 +0530 arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII mode The CPSW9G instance of the CPSW Ethernet Switch supports USXGMII mode with MAC Ports 1 and 2 of the instance, which are connected to ENET Expansion 1 and ENET Expansion 2 slots on the EVM respectively, through the Serdes2 instance of the SERDES. Enable CPSW9G MAC Ports 1 and 2 in fixed-link configuration USXGMII mode at 5 Gbps each. Signed-off-by: Siddharth Vadapalli Signed-off-by: Chintan Vankar Link: https://lore.kernel.org/r/20240502091002.3659435-6-c-vankar@ti.com Signed-off-by: Vignesh Raghavendra commit 4ad0beeb7ae69ae11ec53c897d0b1af1df60454c Author: Siddharth Vadapalli Date: Thu May 2 14:40:01 2024 +0530 arm64: dts: ti: k3-j784s4: Add overlay to enable QSGMII mode with CPSW9G The J7 Quad Port Add-On Ethernet Card for J784S4 EVM supports QSGMII mode. Use the overlay to configure CPSW9G ports in QSGMII mode with the Add-On Ethernet Card connected to the ENET Expansion 1 slot on the EVM. Add support to reset the PHY from kernel by using gpio-hog and gpio-reset. Add aliases for CPSW9G ports to enable kernel to fetch MAC Addresses directly from U-Boot. Signed-off-by: Siddharth Vadapalli Signed-off-by: Chintan Vankar Link: https://lore.kernel.org/r/20240502091002.3659435-5-c-vankar@ti.com Signed-off-by: Vignesh Raghavendra commit c2834656bb6d434bf0df0de7710210fbfe7ff927 Author: Siddharth Vadapalli Date: Thu May 2 14:40:00 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Enable Main CPSW2G node and add aliases for it Enable MAIN CPSW2G and add alias for it to enable Linux to fetch MAC Address for the port directly from U-Boot. Signed-off-by: Siddharth Vadapalli Signed-off-by: Jayesh Choudhary Signed-off-by: Chintan Vankar Link: https://lore.kernel.org/r/20240502091002.3659435-4-c-vankar@ti.com Signed-off-by: Vignesh Raghavendra commit 01bd39357b70ed41fb52b26c7e5b42de328fcdd4 Author: Siddharth Vadapalli Date: Thu May 2 14:39:59 2024 +0530 arm64: dts: ti: k3-j784s4-main: Add CPSW2G and CPSW9G nodes J784S4 SoC has MAIN CPSW2G and CPSW9G instances of the CPSW Ethernet Switch. CPSW2G has 1 external port and 1 host port while CPSW9G has 8 external ports and 1 host port. Add device-tree nodes for MAIN CPSW2G and CPSW9G and disable them by default. MAIN CPSW2G will be enabled in the board file while device-tree overlays will be used to enable CPSW9G. Signed-off-by: Siddharth Vadapalli Signed-off-by: Chintan Vankar Link: https://lore.kernel.org/r/20240502091002.3659435-3-c-vankar@ti.com Signed-off-by: Vignesh Raghavendra commit 674a20618b0de1afb62622b5051a5371117a1bfd Author: Chintan Vankar Date: Thu May 2 14:39:58 2024 +0530 arm64: dts: ti: k3-j784s4-evm: Add alias for MCU CPSW2G Add alias for the MCU CPSW2G port to enable Linux to fetch MAC Address for the port directly from U-Boot. Signed-off-by: Chintan Vankar Link: https://lore.kernel.org/r/20240502091002.3659435-2-c-vankar@ti.com Signed-off-by: Vignesh Raghavendra commit ba50141137fae205a731005e70687f4a52289050 Author: Chintan Vankar Date: Tue Apr 30 14:20:48 2024 +0530 arm64: dts: ti: k3-am62x-sk-common: Add bootph-all property in phy_gmii_sel node Add missing bootph-all property for CPSW MAC's PHY node phy_gmii_sel. Signed-off-by: Chintan Vankar Link: https://lore.kernel.org/r/20240430085048.3143665-1-c-vankar@ti.com Signed-off-by: Vignesh Raghavendra commit 512554f612044f164e4c4e524d95cde9ffa39c4f Author: Noah Wang Date: Tue Jun 11 18:14:16 2024 +0800 dt-bindings: hwmon: Add MPS mp9941 Add support for MPS mp9941 controller Acked-by: Krzysztof Kozlowski Signed-off-by: Noah Wang Link: https://lore.kernel.org/r/SEYPR04MB6482612BBD0421F5428092AEFAC72@SEYPR04MB6482.apcprd04.prod.outlook.com Signed-off-by: Guenter Roeck commit fc37348c907ba220b898ad383c0d5134a9a545c1 Author: Noah Wang Date: Tue Jun 11 18:14:15 2024 +0800 hwmon: add MP2993 driver Add support for MPS VR controller mp2993. This driver exposes telemetry and limits value readings and writtings. Signed-off-by: Noah Wang Link: https://lore.kernel.org/r/SEYPR04MB648203DC017A514837DB1204FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com Signed-off-by: Guenter Roeck commit 22ac3d2f68fc60da641e7be7bcedb7733afd26a7 Author: Noah Wang Date: Tue Jun 11 18:14:14 2024 +0800 dt-bindings: hwmon: Add MPS mp2993 Add support for MPS mp2993 controller Acked-by: Krzysztof Kozlowski Signed-off-by: Noah Wang Link: https://lore.kernel.org/r/SEYPR04MB6482EE5CA0C9A3F14863B999FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com Signed-off-by: Guenter Roeck commit 298b1e4182d657c3e388adcc29477904e9600ed5 Author: Chao Yu Date: Wed May 29 18:01:03 2024 +0800 f2fs: fix to truncate preallocated blocks in f2fs_file_open() chenyuwen reports a f2fs bug as below: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000011 fscrypt_set_bio_crypt_ctx+0x78/0x1e8 f2fs_grab_read_bio+0x78/0x208 f2fs_submit_page_read+0x44/0x154 f2fs_get_read_data_page+0x288/0x5f4 f2fs_get_lock_data_page+0x60/0x190 truncate_partial_data_page+0x108/0x4fc f2fs_do_truncate_blocks+0x344/0x5f0 f2fs_truncate_blocks+0x6c/0x134 f2fs_truncate+0xd8/0x200 f2fs_iget+0x20c/0x5ac do_garbage_collect+0x5d0/0xf6c f2fs_gc+0x22c/0x6a4 f2fs_disable_checkpoint+0xc8/0x310 f2fs_fill_super+0x14bc/0x1764 mount_bdev+0x1b4/0x21c f2fs_mount+0x20/0x30 legacy_get_tree+0x50/0xbc vfs_get_tree+0x5c/0x1b0 do_new_mount+0x298/0x4cc path_mount+0x33c/0x5fc __arm64_sys_mount+0xcc/0x15c invoke_syscall+0x60/0x150 el0_svc_common+0xb8/0xf8 do_el0_svc+0x28/0xa0 el0_svc+0x24/0x84 el0t_64_sync_handler+0x88/0xec It is because inode.i_crypt_info is not initialized during below path: - mount - f2fs_fill_super - f2fs_disable_checkpoint - f2fs_gc - f2fs_iget - f2fs_truncate So, let's relocate truncation of preallocated blocks to f2fs_file_open(), after fscrypt_file_open(). Fixes: d4dd19ec1ea0 ("f2fs: do not expose unwritten blocks to user by DIO") Reported-by: chenyuwen Closes: https://lore.kernel.org/linux-kernel/20240517085327.1188515-1-yuwen.chen@xjmz.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d7409b05a64f212735f0d33f5f1602051a886eab Author: Chao Yu Date: Fri May 31 10:00:32 2024 +0800 f2fs: fix to cover read extent cache access with lock syzbot reports a f2fs bug as below: BUG: KASAN: slab-use-after-free in sanity_check_extent_cache+0x370/0x410 fs/f2fs/extent_cache.c:46 Read of size 4 at addr ffff8880739ab220 by task syz-executor200/5097 CPU: 0 PID: 5097 Comm: syz-executor200 Not tainted 6.9.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 sanity_check_extent_cache+0x370/0x410 fs/f2fs/extent_cache.c:46 do_read_inode fs/f2fs/inode.c:509 [inline] f2fs_iget+0x33e1/0x46e0 fs/f2fs/inode.c:560 f2fs_nfs_get_inode+0x74/0x100 fs/f2fs/super.c:3237 generic_fh_to_dentry+0x9f/0xf0 fs/libfs.c:1413 exportfs_decode_fh_raw+0x152/0x5f0 fs/exportfs/expfs.c:444 exportfs_decode_fh+0x3c/0x80 fs/exportfs/expfs.c:584 do_handle_to_path fs/fhandle.c:155 [inline] handle_to_path fs/fhandle.c:210 [inline] do_handle_open+0x495/0x650 fs/fhandle.c:226 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f We missed to cover sanity_check_extent_cache() w/ extent cache lock, so, below race case may happen, result in use after free issue. - f2fs_iget - do_read_inode - f2fs_init_read_extent_tree : add largest extent entry in to cache - shrink - f2fs_shrink_read_extent_tree - __shrink_extent_tree - __detach_extent_node : drop largest extent entry - sanity_check_extent_cache : access et->largest w/o lock let's refactor sanity_check_extent_cache() to avoid extent cache access and call it before f2fs_init_read_extent_tree() to fix this issue. Reported-by: syzbot+74ebe2104433e9dc610d@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/00000000000009beea061740a531@google.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a8eb3de28e7a365690c61161e7a07a4fc7c60bbf Author: Chao Yu Date: Mon Jun 3 09:07:45 2024 +0800 f2fs: fix return value of f2fs_convert_inline_inode() If device is readonly, make f2fs_convert_inline_inode() return EROFS instead of zero, otherwise it may trigger panic during writeback of inline inode's dirty page as below: f2fs_write_single_data_page+0xbb6/0x1e90 fs/f2fs/data.c:2888 f2fs_write_cache_pages fs/f2fs/data.c:3187 [inline] __f2fs_write_data_pages fs/f2fs/data.c:3342 [inline] f2fs_write_data_pages+0x1efe/0x3a90 fs/f2fs/data.c:3369 do_writepages+0x359/0x870 mm/page-writeback.c:2634 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397 __filemap_fdatawrite_range mm/filemap.c:430 [inline] file_write_and_wait_range+0x1aa/0x290 mm/filemap.c:788 f2fs_do_sync_file+0x68a/0x1ae0 fs/f2fs/file.c:276 generic_write_sync include/linux/fs.h:2806 [inline] f2fs_file_write_iter+0x7bd/0x24e0 fs/f2fs/file.c:4977 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa72/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Cc: stable@vger.kernel.org Reported-by: syzbot+848062ba19c8782ca5c8@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/000000000000d103ce06174d7ec3@google.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 270b09313b4e16cdfd01d8371023a1661dd1112e Author: Zhiguo Niu Date: Mon Jun 3 19:35:26 2024 +0800 f2fs: use new ioprio Macro to get ckpt thread ioprio level IOPRIO_PRIO_DATA in the new kernel version includes level and hint, So Macro IOPRIO_PRIO_LEVEL is more accurate to get ckpt thread ioprio data/level, and it is also consisten with the way setting ckpt thread ioprio by IOPRIO_PRIO_VALUE(class, data/level). Besides, change variable name from "data" to "level" for more readable. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 192b8fb8d1c8ca3c87366ebbef599fa80bb626b8 Author: Chao Yu Date: Tue Jun 4 15:56:36 2024 +0800 f2fs: fix to don't dirty inode for readonly filesystem syzbot reports f2fs bug as below: kernel BUG at fs/f2fs/inode.c:933! RIP: 0010:f2fs_evict_inode+0x1576/0x1590 fs/f2fs/inode.c:933 Call Trace: evict+0x2a4/0x620 fs/inode.c:664 dispose_list fs/inode.c:697 [inline] evict_inodes+0x5f8/0x690 fs/inode.c:747 generic_shutdown_super+0x9d/0x2c0 fs/super.c:675 kill_block_super+0x44/0x90 fs/super.c:1667 kill_f2fs_super+0x303/0x3b0 fs/f2fs/super.c:4894 deactivate_locked_super+0xc1/0x130 fs/super.c:484 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1256 task_work_run+0x24a/0x300 kernel/task_work.c:180 ptrace_notify+0x2cd/0x380 kernel/signal.c:2399 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:251 [inline] syscall_exit_to_user_mode_prepare kernel/entry/common.c:278 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x15c/0x280 kernel/entry/common.c:296 do_syscall_64+0x50/0x110 arch/x86/entry/common.c:88 entry_SYSCALL_64_after_hwframe+0x63/0x6b The root cause is: - do_sys_open - f2fs_lookup - __f2fs_find_entry - f2fs_i_depth_write - f2fs_mark_inode_dirty_sync - f2fs_dirty_inode - set_inode_flag(inode, FI_DIRTY_INODE) - umount - kill_f2fs_super - kill_block_super - generic_shutdown_super - sync_filesystem : sb is readonly, skip sync_filesystem() - evict_inodes - iput - f2fs_evict_inode - f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE)) : trigger kernel panic When we try to repair i_current_depth in readonly filesystem, let's skip dirty inode to avoid panic in later f2fs_evict_inode(). Cc: stable@vger.kernel.org Reported-by: syzbot+31e4659a3fe953aec2f4@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/000000000000e890bc0609a55cff@google.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 21327a042dd94bc73181d7300e688699cb1f467e Author: Zhiguo Niu Date: Wed May 29 17:47:00 2024 +0800 f2fs: fix to avoid use SSR allocate when do defragment SSR allocate mode will be used when doing file defragment if ATGC is working at the same time, that is because set_page_private_gcing may make CURSEG_ALL_DATA_ATGC segment type got in f2fs_allocate_data_block when defragment page is writeback, which may cause file fragmentation is worse. A file with 2 fragmentations is changed as following after defragment: ----------------file info------------------- sensorsdata : -------------------------------------------- dev [254:48] ino [0x 3029 : 12329] mode [0x 81b0 : 33200] nlink [0x 1 : 1] uid [0x 27e6 : 10214] gid [0x 27e6 : 10214] size [0x 242000 : 2367488] blksize [0x 1000 : 4096] blocks [0x 1210 : 4624] -------------------------------------------- file_pos start_blk end_blk blks 0 11361121 11361207 87 356352 11361215 11361216 2 364544 11361218 11361218 1 368640 11361220 11361221 2 376832 11361224 11361225 2 385024 11361227 11361238 12 434176 11361240 11361252 13 487424 11361254 11361254 1 491520 11361271 11361279 9 528384 3681794 3681795 2 536576 3681797 3681797 1 540672 3681799 3681799 1 544768 3681803 3681803 1 548864 3681805 3681805 1 552960 3681807 3681807 1 557056 3681809 3681809 1 Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5c8764f8679e659c5cb295af7d32279002d13735 Author: Chao Yu Date: Thu May 23 21:29:48 2024 +0800 f2fs: fix to force buffered IO on inline_data inode It will return all zero data when DIO reading from inline_data inode, it is because f2fs_iomap_begin() assign iomap->type w/ IOMAP_HOLE incorrectly for this case. We can let iomap framework handle inline data via assigning iomap->type and iomap->inline_data correctly, however, it will be a little bit complicated when handling race case in between direct IO and buffered IO. So, let's force to use buffered IO to fix this issue. Cc: stable@vger.kernel.org Reported-by: Barry Song Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6924c8b6fdf96db24edf8392c2dd00f79eeb8e4b Author: Zhiguo Niu Date: Mon May 27 19:12:37 2024 +0800 f2fs: fix to remove redundant SBI_NEED_FSCK flag set Subsequent f2fs_stop_checkpoint will set cp_err, so this SBI_NEED_FSCK flag set action is invalid. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 76da333f4b935af65c9465277032a1e24405375c Author: Sheng Yong Date: Thu May 30 18:01:58 2024 +0800 f2fs: alloc new section if curseg is not the first seg in its zone If curseg is not the first segment in its zone, the zone is not empty. A new section should be allocated and avoid resetting the old zone. Reviewed-by: Chao Yu Signed-off-by: Sheng Yong Signed-off-by: Jaegeuk Kim commit cc260b66c4cd21a370b39f73c9034a420baf8f79 Author: Chao Yu Date: Wed May 15 16:12:33 2024 +0800 f2fs: add support for FS_IOC_GETFSSYSFSPATH FS_IOC_GETFSSYSFSPATH ioctl expects sysfs sub-path of a filesystem, the format can be "$FSTYP/$SYSFS_IDENTIFIER" under /sys/fs, it can helps to standardizes exporting sysfs datas across filesystems. This patch wires up FS_IOC_GETFSSYSFSPATH for f2fs, it will output "f2fs/". Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c240c87bcd44a1a2375fc8ef8c645d1f1fe76466 Author: Chao Yu Date: Tue May 21 14:23:18 2024 +0800 f2fs: fix to do sanity check on blocks for inline_data inode inode can be fuzzed, so it can has F2FS_INLINE_DATA flag and valid i_blocks/i_nid value, this patch supports to do extra sanity check to detect such corrupted state. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fc01008c92f40015aeeced94750855a7111b6929 Author: Chao Yu Date: Tue May 21 14:23:17 2024 +0800 f2fs: fix to do sanity check on F2FS_INLINE_DATA flag in inode during GC syzbot reports a f2fs bug as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/inline.c:258! CPU: 1 PID: 34 Comm: kworker/u8:2 Not tainted 6.9.0-rc6-syzkaller-00012-g9e4bc4bcae01 #0 RIP: 0010:f2fs_write_inline_data+0x781/0x790 fs/f2fs/inline.c:258 Call Trace: f2fs_write_single_data_page+0xb65/0x1d60 fs/f2fs/data.c:2834 f2fs_write_cache_pages fs/f2fs/data.c:3133 [inline] __f2fs_write_data_pages fs/f2fs/data.c:3288 [inline] f2fs_write_data_pages+0x1efe/0x3a90 fs/f2fs/data.c:3315 do_writepages+0x35b/0x870 mm/page-writeback.c:2612 __writeback_single_inode+0x165/0x10b0 fs/fs-writeback.c:1650 writeback_sb_inodes+0x905/0x1260 fs/fs-writeback.c:1941 wb_writeback+0x457/0xce0 fs/fs-writeback.c:2117 wb_do_writeback fs/fs-writeback.c:2264 [inline] wb_workfn+0x410/0x1090 fs/fs-writeback.c:2304 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f2/0x390 kernel/kthread.c:388 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The root cause is: inline_data inode can be fuzzed, so that there may be valid blkaddr in its direct node, once f2fs triggers background GC to migrate the block, it will hit f2fs_bug_on() during dirty page writeback. Let's add sanity check on F2FS_INLINE_DATA flag in inode during GC, so that, it can forbid migrating inline_data inode's data block for fixing. Reported-by: syzbot+848062ba19c8782ca5c8@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-f2fs-devel/000000000000d103ce06174d7ec3@google.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 89aa02edaa30e4327ebc8fca9b80795bbfd4ce9b Merge: ec3ac2c8d941d 1ddaaa244021a Author: Rodrigo Vivi Date: Wed Jun 12 11:31:42 2024 -0400 Merge drm/drm-next into drm-xe-next Needed to get tracing cleanup and add mmio tracing series. Signed-off-by: Rodrigo Vivi commit ec3ac2c8d941dad959dcdc760aa43bc45785d346 Author: José Roberto de Souza Date: Tue Jun 11 10:47:16 2024 -0700 drm/xe: Increase devcoredump timeout 5 minutes is too short for a regular user to search and understand what he needs to do to report capture devcoredump and report a bug to us, so here increasing this timeout to 1 hour. Cc: Rodrigo Vivi Cc: Jonathan Cavitt Reviewed-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240611174716.72660-2-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 3b9c181bcde8555ca81b2394c2dc2201cefc2dd4 Author: José Roberto de Souza Date: Tue Jun 11 10:47:15 2024 -0700 devcoredump: Add dev_coredumpm_timeout() Add function to set a custom coredump timeout. For Xe driver usage, current 5 minutes timeout may be too short for users to search and understand what needs to be done to capture coredump to report bugs. We have plans to automate(distribute a udev script) it but at the end will be up to distros and users to pack it so having a option to increase the timeout is a safer option. v2: - replace dev_coredump_timeout_set() by dev_coredumpm_timeout() (Mukesh) v3: - make dev_coredumpm() static inline (Johannes) v5: - rename DEVCOREDUMP_TIMEOUT -> DEVCD_TIMEOUT to avoid redefinition in include/net/bluetooth/coredump.h v6: - fix definition of dev_coredumpm_timeout() when CONFIG_DEV_COREDUMP is disabled Cc: Rodrigo Vivi Cc: Mukesh Ojha Cc: Johannes Berg Cc: Jonathan Cavitt Reviewed-by: Rodrigo Vivi Reviewed-by: Jonathan Cavitt Signed-off-by: José Roberto de Souza Acked-by: Greg Kroah-Hartman Acked-by: Johannes Berg Link: https://patchwork.freedesktop.org/patch/msgid/20240611174716.72660-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 313d2c9d1252185721cad4f8c57099840d6c9958 Author: Xianwei Zhao Date: Wed Jun 12 17:44:50 2024 +0800 spi: meson-spicc: add spicc loopback mode Add spicc loopback mode for debugging convenience. Signed-off-by: Sunny Luo Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240612-spi_lbc-v1-1-d52e8c8011bd@amlogic.com Signed-off-by: Mark Brown commit cc647e931a249605e06d3eb3ec89a7e320fc28cc Author: Jeff Johnson Date: Mon Jun 10 16:13:55 2024 -0700 pmdomain: amlogic: add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pmdomain/amlogic/meson-gx-pwrc-vpu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pmdomain/amlogic/meson-ee-pwrc.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes meson-secure-pwrc.c which, although it did not produce a warning with the x86 allmodconfig configuration, may cause this warning with other configurations where CONFIG_MESON_SM is enabled. Signed-off-by: Jeff Johnson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240610-md-drivers-pmdomain-amlogic-v1-1-b49ddb1a8bdf@quicinc.com Signed-off-by: Ulf Hansson commit 75b3c43eab594bfbd8184ec8ee1a6b820950819a Author: Mark Rutland Date: Mon Jun 3 12:18:12 2024 +0100 arm64: errata: Expand speculative SSBS workaround A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. We worked around this for Cortex-X4 and Neoverse-V3, in commit: 7187bb7d0b5c7dfa ("arm64: errata: Add workaround for Arm errata 3194386 and 3312417") ... as per their Software Developer Errata Notice (SDEN) documents: * Cortex-X4 SDEN v8.0, erratum 3194386: https://developer.arm.com/documentation/SDEN-2432808/0800/ * Neoverse-V3 SDEN v6.0, erratum 3312417: https://developer.arm.com/documentation/SDEN-2891958/0600/ Since then, similar errata have been published for a number of other Arm Ltd CPUs, for which the mitigation is the same. This is described in their respective SDEN documents: * Cortex-A710 SDEN v19.0, errataum 3324338 https://developer.arm.com/documentation/SDEN-1775101/1900/?lang=en * Cortex-A720 SDEN v11.0, erratum 3456091 https://developer.arm.com/documentation/SDEN-2439421/1100/?lang=en * Cortex-X2 SDEN v19.0, erratum 3324338 https://developer.arm.com/documentation/SDEN-1775100/1900/?lang=en * Cortex-X3 SDEN v14.0, erratum 3324335 https://developer.arm.com/documentation/SDEN-2055130/1400/?lang=en * Cortex-X925 SDEN v8.0, erratum 3324334 https://developer.arm.com/documentation/109108/800/?lang=en * Neoverse-N2 SDEN v17.0, erratum 3324339 https://developer.arm.com/documentation/SDEN-1982442/1700/?lang=en * Neoverse-V2 SDEN v9.0, erratum 3324336 https://developer.arm.com/documentation/SDEN-2332927/900/?lang=en Note that due to shared design lineage, some CPUs share the same erratum number. Add these to the existing mitigation under CONFIG_ARM64_ERRATUM_3194386. As listing all of the erratum IDs in the runtime description would be unwieldy, this is reduced to: "SSBS not fully self-synchronizing" ... matching the description of the errata in all of the SDENs. Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20240603111812.1514101-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit ec768766608092087dfb5c1fc45a16a6f524dee2 Author: Mark Rutland Date: Mon Jun 3 12:18:11 2024 +0100 arm64: errata: Unify speculative SSBS errata logic Cortex-X4 erratum 3194386 and Neoverse-V3 erratum 3312417 are identical, with duplicate Kconfig text and some unsightly ifdeffery. While we try to share code behind CONFIG_ARM64_WORKAROUND_SPECULATIVE_SSBS, having separate options results in a fair amount of boilerplate code, and this will only get worse as we expand the set of affected CPUs. To reduce this boilerplate, unify the two behind a common Kconfig option. This removes the duplicate text and Kconfig logic, and removes the need for the intermediate ARM64_WORKAROUND_SPECULATIVE_SSBS option. The set of affected CPUs is described as a list so that this can easily be extended. I've used ARM64_ERRATUM_3194386 (matching the Neoverse-V3 erratum ID) as the common option, matching the way we use ARM64_ERRATUM_1319367 to cover Cortex-A57 erratum 1319537 and Cortex-A72 erratum 1319367. Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20240603111812.1514101-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit fd2ff5f0b320f418288e7a1f919f648fbc8a0dfc Author: Mark Rutland Date: Mon Jun 3 12:18:10 2024 +0100 arm64: cputype: Add Cortex-X925 definitions Add cputype definitions for Cortex-X925. These will be used for errata detection in subsequent patches. These values can be found in Table A-285 ("MIDR_EL1 bit descriptions") in issue 0001-05 of the Cortex-X925 TRM, which can be found at: https://developer.arm.com/documentation/102807/0001/?lang=en Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20240603111812.1514101-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit add332c40328cf06fe35e4b3cde8ec315c4629e5 Author: Mark Rutland Date: Mon Jun 3 12:18:09 2024 +0100 arm64: cputype: Add Cortex-A720 definitions Add cputype definitions for Cortex-A720. These will be used for errata detection in subsequent patches. These values can be found in Table A-186 ("MIDR_EL1 bit descriptions") in issue 0002-05 of the Cortex-A720 TRM, which can be found at: https://developer.arm.com/documentation/102530/0002/?lang=en Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20240603111812.1514101-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit be5a6f238700f38b534456608588723fba96c5ab Author: Mark Rutland Date: Mon Jun 3 12:18:08 2024 +0100 arm64: cputype: Add Cortex-X3 definitions Add cputype definitions for Cortex-X3. These will be used for errata detection in subsequent patches. These values can be found in Table A-263 ("MIDR_EL1 bit descriptions") in issue 07 of the Cortex-X3 TRM, which can be found at: https://developer.arm.com/documentation/101593/0102/?lang=en Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20240603111812.1514101-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 26ca4423604f15930d96088dc5238f29dc11d5bc Author: Peter Collingbourne Date: Tue May 28 15:51:30 2024 -0700 arm64: mte: Make mte_check_tfsr_*() conditional on KASAN instead of MTE The check in mte_check_tfsr_el1() is only necessary if HW tag based KASAN is enabled. However, we were also executing the check if MTE is enabled and KASAN is enabled at build time but disabled at runtime. This turned out to cause a measurable increase in power consumption on a specific microarchitecture after enabling MTE. Moreover, on the same system, an increase in invalid syscall latency (as measured by [1]) of around 20-30% (depending on the cluster) was observed after enabling MTE; this almost entirely goes away after removing this check. Therefore, make the check conditional on whether KASAN is enabled rather than on whether MTE is enabled. [1] https://lore.kernel.org/all/CAMn1gO4MwRV8bmFJ_SeY5tsYNPn2ZP56LjAhafygjFaKuu5ouw@mail.gmail.com/ Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I22d98d1483dd400a95595946552b769a5a1ad7bd Reviewed-by: Alexandru Elisei Link: https://lore.kernel.org/r/20240528225131.3577704-1-pcc@google.com Signed-off-by: Catalin Marinas commit 031d1f20d5db496a4fc980a59a7c6de83b8a5a76 Author: Dev Jain Date: Wed Jun 5 17:24:48 2024 +0530 kselftest/arm64: Fix redundancy of a testcase Currently, we are writing the same value as we read into the TLS register, hence we cannot confirm update of the register, making the testcase "verify_tpidr_one" redundant. Fix this. Signed-off-by: Dev Jain Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20240605115448.640717-1-dev.jain@arm.com [catalin.marinas@arm.com: remove the increment style change] Signed-off-by: Catalin Marinas commit 46edf5d7aed5438078a8b4b1ab4230a41a032dd0 Author: Ryan Sullivan Date: Thu Jun 6 09:53:48 2024 -0400 selftests/livepatch: define max test-syscall processes Define a maximum allowable number of pids that can be livepatched in test-syscall.sh as with extremely large machines the output from a large number of processes overflows the dev/kmsg "expect" buffer in the "check_result" function and causes a false error. Reported-by: CKI Project Signed-off-by: Ryan Sullivan Acked-by: Miroslav Benes Tested-by: Marcos Paulo de Souza Reviewed-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek Acked-by: Joel Savitz Link: https://lore.kernel.org/r/20240606135348.4708-1-rysulliv@redhat.com Signed-off-by: Petr Mladek commit d5859510d35d8e7d63fed5169f1775317f40fb03 Author: Mark Brown Date: Tue May 21 19:18:26 2024 +0100 kselftest/arm64: Include kernel mode NEON in fp-stress Currently fp-stress only covers userspace use of floating point, it does not cover any kernel mode uses. Since currently kernel mode floating point usage can't be preempted and there are explicit preemption points in the existing implementations this isn't so important for fp-stress but when we readd preemption it will be good to try to exercise it. When the arm64 accelerated crypto operations are implemented we can relatively straightforwardly trigger kernel mode floating point usage by using the crypto userspace API to hash data, using the splice() support in an effort to minimise copying. We use /proc/crypto to check which accelerated implementations are available, picking the first symmetric hash we find. We run the kernel mode test unconditionally, replacing the second copy of the FPSIMD testcase for systems with FPSIMD only. If we don't think there are any suitable kernel mode implementations we fall back to running another copy of fpsimd-stress. There are a number issues with this approach, we don't actually verify that we are using an accelerated (or even CPU) implementation of the algorithm being tested and even with attempting to use splice() to minimise copying there are sizing limits on how much data gets spliced at once. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240521-arm64-fp-stress-kernel-v1-1-e38f107baad4@kernel.org Signed-off-by: Catalin Marinas commit bf0baa5bbdc9b99ea081d360f245e5f96e835612 Author: Puranjay Mohan Date: Fri May 3 17:18:47 2024 +0000 arm64: implement raw_smp_processor_id() using thread_info Historically, arm64 implemented raw_smp_processor_id() as a read of current_thread_info()->cpu. This changed when arm64 moved thread_info into task struct, as at the time CONFIG_THREAD_INFO_IN_TASK made core code use thread_struct::cpu for the cpu number, and due to header dependencies prevented using this in raw_smp_processor_id(). As a workaround, we moved to using a percpu variable in commit: 57c82954e77fa12c ("arm64: make cpu number a percpu variable") Since then, thread_info::cpu was reintroduced, and core code was made to use this in commits: 001430c1910df65a ("arm64: add CPU field to struct thread_info") bcf9033e5449bdca ("sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y") Consequently it is possible to use current_thread_info()->cpu again. This decreases the number of emitted instructions like in the following example: Dump of assembler code for function bpf_get_smp_processor_id: 0xffff8000802cd608 <+0>: nop 0xffff8000802cd60c <+4>: nop 0xffff8000802cd610 <+8>: adrp x0, 0xffff800082138000 0xffff8000802cd614 <+12>: mrs x1, tpidr_el1 0xffff8000802cd618 <+16>: add x0, x0, #0x8 0xffff8000802cd61c <+20>: ldrsw x0, [x0, x1] 0xffff8000802cd620 <+24>: ret After this patch: Dump of assembler code for function bpf_get_smp_processor_id: 0xffff8000802c9130 <+0>: nop 0xffff8000802c9134 <+4>: nop 0xffff8000802c9138 <+8>: mrs x0, sp_el0 0xffff8000802c913c <+12>: ldr w0, [x0, #24] 0xffff8000802c9140 <+16>: ret A microbenchmark[1] was built to measure the performance improvement provided by this change. It calls the following function given number of times and finds the runtime overhead: static noinline int get_cpu_id(void) { return smp_processor_id(); } Run the benchmark like: modprobe smp_processor_id nr_function_calls=1000000000 +--------------------------+------------------------+ | | Number of Calls | Time taken | +--------+-----------------+------------------------+ | Before | 1000000000 | 1602888401ns | +--------+-----------------+------------------------+ | After | 1000000000 | 1206212658ns | +--------+-----------------+------------------------+ | Difference (decrease) | 396675743ns (24.74%) | +---------------------------------------------------+ Remove the percpu variable cpu_number as it is used only in set_smp_ipi_range() as a dummy variable to be passed to ipi_handler(). Use irq_stat in place of cpu_number here like arm32. [1] https://github.com/puranjaymohan/linux/commit/77d3fdd Signed-off-by: Puranjay Mohan Acked-by: Mark Rutland Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20240503171847.68267-2-puranjay@kernel.org Signed-off-by: Catalin Marinas commit 7647e2b109f4d508fcb35bb8089a27c4fdd81f61 Author: Puranjay Mohan Date: Fri May 3 17:18:46 2024 +0000 arm64/arch_timer: include arch_timer.h includes linux/smp.h since the commit: 6acc71ccac7187fc ("arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs") It was included to use DEFINE_PER_CPU(), etc. But It should have included rather than . It worked because smp.h includes percpu.h. The next commit will remove percpu.h from smp.h and it will break this usage. Explicitly include percpu.h and remove smp.h Signed-off-by: Puranjay Mohan Acked-by: Mark Rutland Reviewed-by: Stephen Boyd Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20240503171847.68267-1-puranjay@kernel.org Signed-off-by: Catalin Marinas commit a13aaf157467e694a3824d81304106b58d4c20d6 Author: Tejas Vipin Date: Wed Jun 12 19:05:42 2024 +0530 drm/panel: himax-hx83102: fix incorrect argument to mipi_dsi_msleep mipi_dsi_msleep should be modified to accept ctx as a pointer and the function call should be adjusted accordingly. Fixes: a2ab7cb169da ("drm/panel: himax-hx83102: use wrapped MIPI DCS functions") Signed-off-by: Tejas Vipin Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240612133550.473279-2-tejasvipin76@gmail.com [narmstrong: fixed subject and fixes tag] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240612133550.473279-2-tejasvipin76@gmail.com commit 66055636a146c435cd226fb5a334176304652f3c Author: Tejas Vipin Date: Wed Jun 12 19:05:43 2024 +0530 drm/mipi-dsi: fix handling of ctx in mipi_dsi_msleep ctx would be better off treated as a pointer to account for most of its usage so far, and brackets should be added to account for operator precedence for correct evaluation. Fixes: f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling") Signed-off-by: Tejas Vipin Suggested-by: Douglas Anderson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240612133550.473279-3-tejasvipin76@gmail.com [narmstrong: fixed fixes tag] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240612133550.473279-3-tejasvipin76@gmail.com commit ec5d234f191a3884e974fcb77694e83e984ffc68 Author: Amna Waseem Date: Tue Jun 11 11:36:26 2024 +0200 hwmon: (ina2xx) Add device tree support to pass alert polarity The INA230 has an Alert pin which is asserted when the alert function selected in the Mask/Enable register exceeds the value programmed into the Alert Limit register. Assertion is based on the Alert Polarity Bit (APOL, bit 1 of the Mask/Enable register). It is default set to value 0 i.e Normal (active-low open collector). However, hardware can be designed in such a way that expects Alert pin to become active high if a user-defined threshold in Alert limit register has been exceeded. This patch adds a way to pass alert polarity value to the driver via device tree. Signed-off-by: Amna Waseem Link: https://lore.kernel.org/r/20240611-apol-ina2xx-fix-v4-2-8df1d2282fc5@axis.com Signed-off-by: Guenter Roeck commit 94e33109f9a798fb2fc76525b59317912bf02c29 Author: Amna Waseem Date: Mon Jun 3 12:08:34 2024 +0200 dt-bindings: hwmon: ti,ina2xx: Add ti,alert-polarity-active-high property Add a property to the binding to configure the Alert Polarity. Alert pin is asserted based on the value of Alert Polarity bit of Mask/Enable register. It is by default 0 which means Alert pin is configured to be active low open collector. Value of 1 maps to Inverted (active high open collector). Signed-off-by: Amna Waseem Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240603-apol-ina2xx-fix-v3-1-b9eff3158e4e@axis.com Signed-off-by: Guenter Roeck commit e8cde32f111f7f5681a7bad3ec747e9e697569a9 Author: Nianyao Tang Date: Tue Jun 11 12:20:49 2024 +0000 arm64/cpufeatures/kvm: Add ARMv8.9 FEAT_ECBHB bits in ID_AA64MMFR1 register Enable ECBHB bits in ID_AA64MMFR1 register as per ARM DDI 0487K.a specification. When guest OS read ID_AA64MMFR1_EL1, kvm emulate this reg using ftr_id_aa64mmfr1 and always return ID_AA64MMFR1_EL1.ECBHB=0 to guest. It results in guest syscall jump to tramp ventry, which is not needed in implementation with ID_AA64MMFR1_EL1.ECBHB=1. Let's make the guest syscall process the same as the host. Signed-off-by: Nianyao Tang Link: https://lore.kernel.org/r/20240611122049.2758600-1-tangnianyao@huawei.com Signed-off-by: Catalin Marinas commit 92815da4576a495cb6362cdfb132152fccc2222d Merge: aeacc39e2088a 6b4468b0c6ba3 Author: Dmitry Baryshkov Date: Wed Jun 12 16:51:59 2024 +0300 Merge remote-tracking branch 'drm-misc/drm-misc-next' into HEAD Merge drm-misc-next tree into the msm-next tree in order to be able to use HDMI connector framework for the MSM HDMI driver. commit 05da7d9f717bcb03c457379fa8a61c1689dab86c Author: Jonathan Cavitt Date: Mon Apr 22 06:59:59 2024 -0700 drm/i915/gem: Downgrade stolen lmem setup warning In the case where lmem_size < dsm_base, hardware is reporting that stolen lmem is unusable. In this case, instead of throwing a warning, we can continue execution as normal by disabling stolen LMEM support. For example, this change will allow the following error report from ATS-M to no longer apply: <6> [144.859887] pcieport 0000:4b:00.0: bridge window [mem 0xb1000000-0xb11fffff] <6> [144.859900] pcieport 0000:4b:00.0: bridge window [mem 0x3bbc00000000-0x3bbc17ffffff 64bit pref] <6> [144.859917] pcieport 0000:4c:01.0: PCI bridge to [bus 4d-4e] <6> [144.859932] pcieport 0000:4c:01.0: bridge window [mem 0xb1000000-0xb11fffff] <6> [144.859945] pcieport 0000:4c:01.0: bridge window [mem 0x3bbc00000000-0x3bbc17ffffff 64bit pref] <6> [144.859984] i915 0000:4d:00.0: [drm] BAR2 resized to 256M <6> [144.860640] i915 0000:4d:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS. <4> [144.860719] -----------[ cut here ]----------- <4> [144.860727] WARNING: CPU: 17 PID: 1815 at drivers/gpu/drm/i915/gem/i915_gem_stolen.c:939 i915_gem_stolen_lmem_setup+0x38c/0x430 [i915] <4> [144.861430] Modules linked in: i915 snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem drm_shmem_helper prime_numbers i2c_algo_bit ttm video drm_display_helper drm_buddy fuse x86_pkg_temp_thermal coretemp kvm_intel kvm ixgbe mdio irqbypass ptp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pps_core i2c_i801 mei_me i2c_smbus mei wmi acpi_power_meter [last unloaded: i915] <4> [144.861611] CPU: 17 PID: 1815 Comm: i915_module_loa Tainted: G U 6.8.0-rc5-drmtip_1515-g78f49af27723+ #1 <4> [144.861624] Hardware name: Intel Corporation WHITLEY/WHITLEY, BIOS SE5C6200.86B.0020.P41.2109300305 09/30/2021 <4> [144.861632] RIP: 0010:i915_gem_stolen_lmem_setup+0x38c/0x430 [i915] <4> [144.862287] Code: ff 41 c1 e4 05 e9 ac fe ff ff 4d 63 e4 48 89 ef 48 85 ed 74 04 48 8b 7d 08 48 c7 c6 10 a3 7b a0 e8 e9 90 43 e1 e9 ee fd ff ff <0f> 0b 49 c7 c4 ed ff ff ff e9 e0 fd ff ff 0f b7 d2 48 c7 c6 00 d9 <4> [144.862299] RSP: 0018:ffffc90005607980 EFLAGS: 00010207 <4> [144.862315] RAX: fffffffffff00000 RBX: 0000000000000003 RCX: 0000000000000000 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10833 Suggested-by: Chris Wilson Signed-off-by: Jonathan Cavitt Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240422135959.4127003-1-jonathan.cavitt@intel.com commit ddd4cd4824fa315c799174f2f655a474bf221a6c Author: Mateusz Guzik Date: Tue Jun 11 14:06:23 2024 +0200 xfs: preserve i_state around inode_init_always in xfs_reinit_inode This is in preparation for the routine starting to zero the field. De facto coded by Dave Chinner, see: https://lore.kernel.org/linux-fsdevel/ZmgtaGglOL33Wkzr@dread.disaster.area/ Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240611120626.513952-2-mjguzik@gmail.com Signed-off-by: Christian Brauner commit 3a8e2f99f18d69389366e16375e9a0e41ed43779 Author: Mateusz Guzik Date: Tue Jun 11 19:38:23 2024 +0200 btrfs: use iget5_locked_rcu With 20 threads each walking a dedicated 1000 dirs * 1000 files directory tree to stat(2) on a 32 core + 24GB ram vm: before: 3.54s user 892.30s system 1966% cpu 45.549 total after: 3.28s user 738.66s system 1955% cpu 37.932 total (-16.7%) Benchmark can be found here: https://people.freebsd.org/~mjg/fstree.tgz Reviewed-by: Josef Bacik Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240611173824.535995-3-mjguzik@gmail.com Acked-by: David Sterba Signed-off-by: Christian Brauner commit 7180f8d91fcbf252de572d9ffacc945effed0060 Author: Mateusz Guzik Date: Tue Jun 11 19:38:22 2024 +0200 vfs: add rcu-based find_inode variants for iget ops This avoids one inode hash lock acquire in the common case on inode creation, in effect significantly reducing contention. On the stock kernel said lock is typically taken twice: 1. once to check if the inode happens to already be present 2. once to add it to the hash The back-to-back lock/unlock pattern is known to degrade performance significantly, which is further exacerbated if the hash is heavily populated (long chains to walk, extending hold time). Arguably hash sizing and hashing algo need to be revisited, but that's beyond the scope of this patch. With the acquire from step 1 eliminated with RCU lookup throughput increases significantly at the scale of 20 cores (benchmark results at the bottom). So happens the hash already supports RCU-based operation, but lookups on inode insertions didn't take advantage of it. This of course has its limits as the global lock is still a bottleneck. There was a patchset posted which introduced fine-grained locking[1] but it appears staled. Apart from that doubt was expressed whether a handrolled hash implementation is appropriate to begin with, suggesting replacement with rhashtables. Nobody committed to carrying [1] across the finish line or implementing anything better, thus the bandaid below. iget_locked consumers (notably ext4) get away without any changes because inode comparison method is built-in. iget5_locked consumers pass a custom callback. Since removal of locking adds more problems (inode can be changing) it's not safe to assume all filesystems happen to cope. Thus iget5_locked_rcu gets added, requiring manual conversion of interested filesystems. In order to reduce code duplication find_inode and find_inode_fast grow an argument indicating whether inode hash lock is held, which is passed down in case sleeping is necessary. They always rcu_read_lock, which is redundant but harmless. Doing it conditionally reduces readability for no real gain that I can see. RCU-alike restrictions were already put on callbacks due to the hash spinlock being held. Benchmarking: There is a real cache-busting workload scanning millions of files in parallel (it's a backup appliance), where the initial lookup is guaranteed to fail resulting in the two lock acquires on stock kernel (and one with the patch at hand). Implemented below is a synthetic benchmark providing the same behavior. [I shall note the workload is not running on Linux, instead it was causing trouble elsewhere. Benchmark below was used while addressing said problems and was found to adequately represent the real workload.] Total real time fluctuates by 1-2s. With 20 threads each walking a dedicated 1000 dirs * 1000 files directory tree to stat(2) on a 32 core + 24GB RAM vm: ext4 (needed mkfs.ext4 -N 24000000): before: 3.77s user 890.90s system 1939% cpu 46.118 total after: 3.24s user 397.73s system 1858% cpu 21.581 total (-53%) That's 20 million files to visit, while the machine can only cache about 15 million at a time (obtained from ext4_inode_cache object count in /proc/slabinfo). Since each terminal inode is only visited once per run this amounts to 0% hit ratio for the dentry cache and the hash table (there are however hits for the intermediate directories). On repeated runs the kernel caches the last ~15 mln, meaning there is ~5 mln of uncached inodes which are going to be visited first, evicting the previously cached state as it happens. Lack of hits can be trivially verified with bpftrace, like so: bpftrace -e 'kretprobe:find_inode_fast { @[kstack(), retval != 0] = count(); }'\ -c "/bin/sh walktrees /testfs 20" Best ran more than once. Expected results after "warmup": [snip] @[ __ext4_iget+275 ext4_lookup+224 __lookup_slow+130 walk_component+219 link_path_walk.part.0.constprop.0+614 path_lookupat+62 filename_lookup+204 vfs_statx+128 vfs_fstatat+131 __do_sys_newfstatat+38 do_syscall_64+87 entry_SYSCALL_64_after_hwframe+118 , 1]: 20000 @[ __ext4_iget+275 ext4_lookup+224 __lookup_slow+130 walk_component+219 path_lookupat+106 filename_lookup+204 vfs_statx+128 vfs_fstatat+131 __do_sys_newfstatat+38 do_syscall_64+87 entry_SYSCALL_64_after_hwframe+118 , 1]: 20000000 That is 20 million calls for the initial lookup and 20 million after allocating a new inode, all of them failing to return a value != 0 (i.e., they are returning NULL -- no match found). Of course aborting the benchmark in the middle and starting it again (or messing with the state in other ways) is going to alter these results. Benchmark can be found here: https://people.freebsd.org/~mjg/fstree.tgz [1] https://lore.kernel.org/all/20231206060629.2827226-1-david@fromorbit.com/ Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240611173824.535995-2-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 08d94c7428680715527757585a6c4575fcf571b9 Author: Kent Gibson Date: Mon Jun 10 17:21:57 2024 +0800 Documentation: gpio: Clarify effect of active low flag on line edges The documentation does not make sufficiently clear that edge polarity is based on changes to the logical line values, and that the physical polarity of edges is dependent on the active low flag. Clarify the relationship between the active low flag and edge polarity for the functions that read edge events. Suggested-by: David C. Rankin Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240610092157.9147-3-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit 5ca84d416e1ca82ca068906fc1386f61a57b17f2 Author: Kent Gibson Date: Mon Jun 10 17:21:56 2024 +0800 Documentation: gpio: Clarify effect of active low flag on line values The documentation does not make sufficiently clear that the uAPI deals with logical line values, nor does it describe the influence of the active low flag on the mapping between physical and logical line values. Clarify the relationship between physical and logical line values and the effect of the active low flag for ioctls passing line values. Suggested-by: David C. Rankin Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240610092157.9147-2-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit a2ead3445a6317c5d2b53711cf9a98e54c395223 Author: Wolfram Sang Date: Mon Jun 3 11:15:39 2024 +0200 wifi: zd1211rw: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Signed-off-by: Kalle Valo Link: https://msgid.link/20240603091541.8367-7-wsa+renesas@sang-engineering.com commit a37f6947ff07896d5132d6fbfec538de01c74287 Author: Wolfram Sang Date: Mon Jun 3 11:15:37 2024 +0200 wifi: p54: use 'time_left' variable with wait_for_completion_interruptible_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_interruptible_timeout() causing patterns like: timeout = wait_for_completion_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Fix to the proper variable type 'long' while here. Signed-off-by: Wolfram Sang Signed-off-by: Kalle Valo Link: https://msgid.link/20240603091541.8367-5-wsa+renesas@sang-engineering.com commit 0c0668813cc0bb919b2b693c411e1d7d0dfdf39b Author: Wolfram Sang Date: Mon Jun 3 11:15:36 2024 +0200 wifi: mwl8k: use 'time_left' variable with wait_for_completion_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Signed-off-by: Wolfram Sang Signed-off-by: Kalle Valo Link: https://msgid.link/20240603091541.8367-4-wsa+renesas@sang-engineering.com commit 158d5a1b3caaaeafc838a28a78dc17ceba468fb6 Author: Wolfram Sang Date: Mon Jun 3 11:15:35 2024 +0200 wifi: brcmfmac: use 'time_left' variable with wait_event_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_timeout() causing patterns like: timeout = wait_event_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Fix to the proper variable type 'long' while here. Signed-off-by: Wolfram Sang Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://msgid.link/20240603091541.8367-3-wsa+renesas@sang-engineering.com commit bbef1d006cb1c2774c4b44eb70441d784d3aef44 Author: Erick Archer Date: Sun Jun 2 18:13:10 2024 +0200 wifi: at76c50x: prefer struct_size over open coded arithmetic This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1][2]. As the "cmd_buf" variable is a pointer to "struct at76_command" and this structure ends in a flexible array: struct at76_command { [...] u8 data[]; } __packed; the preferred way in the kernel is to use the struct_size() helper to do the arithmetic instead of the calculation "size + count" in the kmalloc() function. Also, declare a new variable (total_size) since the return value of the struct_size() helper is used several times. At the same time, prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). In this case, it is important to note that the attribute used is "__counted_by_le" since the counter type is "__le16". This way, the code is more readable and safer. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/160 [2] Signed-off-by: Erick Archer Signed-off-by: Kalle Valo Link: https://msgid.link/AS8PR02MB7237578654CEDDFE5F8C17BA8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com commit aea9165ccfd1577be801fd75515fc9d4a9595b90 Author: Erick Archer Date: Sun Jun 2 18:13:09 2024 +0200 wifi: at76c50x: use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. At the same time remove some redundant NULL initializations. Signed-off-by: Erick Archer Signed-off-by: Kalle Valo Link: https://msgid.link/AS8PR02MB7237C784C14DBC943CB719F88BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com commit f3ed3b126a3653c7dc21bcf9a22ed2d7a62f83a2 Author: Krzysztof Kozlowski Date: Thu May 9 12:48:25 2024 +0200 ARM: dts: cirrus: align panel timings node name with dtschema DT schema expects panel timings node to follow certain pattern. Linux drivers do not care about node name, so this should not have effect on Linux. Link: https://lore.kernel.org/r/20240509104825.216696-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit a930fde94ae5fbcb178c1330268f15f2c893c507 Author: Jeff Johnson Date: Fri May 31 19:42:25 2024 -0700 vsprintf: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_printf.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_scanf.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240531-md-vsprintf-v1-1-d8bc7e21539a@quicinc.com Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit dd6e9894b451e7c85cceb8e9dc5432679a70e7dc Author: Zijun Hu Date: Thu May 30 21:14:37 2024 +0800 kobject_uevent: Fix OOB access within zap_modalias_env() zap_modalias_env() wrongly calculates size of memory block to move, so will cause OOB memory access issue if variable MODALIAS is not the last one within its @env parameter, fixed by correcting size to memmove. Fixes: 9b3fa47d4a76 ("kobject: fix suppressing modalias in uevents delivered over netlink") Cc: stable@vger.kernel.org Signed-off-by: Zijun Hu Reviewed-by: Lk Sii Link: https://lore.kernel.org/r/1717074877-11352-1-git-send-email-quic_zijuhu@quicinc.com Signed-off-by: Greg Kroah-Hartman commit ea09ba7653bb53252ed96ec524991c55a38bcd0f Author: Jeff Johnson Date: Sat Jun 8 23:17:05 2024 -0700 phy: broadcom: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/phy/broadcom/phy-bcm-ns-usb2.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/phy/broadcom/phy-bcm-ns-usb3.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240608-md-drivers-phy-broadcom-v1-1-f070f84cc3f0@quicinc.com Signed-off-by: Vinod Koul commit bbc63e701c73bfab9f437f9661f0cbc3860097d5 Author: Jan Kiszka Date: Fri Jun 7 21:33:00 2024 +0200 phy: ti: am654-serdes: Remove duplicate define Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/60089a71-dad2-4a87-a304-a738e3334d4a@siemens.com Signed-off-by: Vinod Koul commit 4de480264948cbf2b08a72c39ee122a9f9761e03 Author: Josua Mayer Date: Sun Jun 2 17:49:39 2024 +0200 dt-bindings: phy: armada-cp110-utmi: add optional swap-dx-lanes property Armada CP110 UTMI supports swapping D+ and D- signals. usb251xb.yaml already describes a suitable device-tree property for the same purpose but as child usb controller node. Add optional swap-dx-lanes device-tree property to armada cp110 utmi phy with same semantics as usb251xb: The property lists all ports that swap D+ and D-, unlisted ports are considered correct. Signed-off-by: Josua Mayer Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240602-cn9130-som-v6-4-89393e86d4c7@solid-run.com Signed-off-by: Vinod Koul commit 6140d185a43daa298d43453929560388d6d49b6e Author: Bartosz Golaszewski Date: Wed Jun 12 10:20:18 2024 +0200 PCI/pwrctl: Add a PCI power control driver for power sequenced devices Add a PCI power control driver that's capable of correctly powering up devices using the power sequencing subsystem. The first users of this driver are the ath11k module on QCA6390 and ath12k on WCN7850. These packages require a certain delay between enabling the Bluetooth and WLAN modules and the power sequencing subsystem takes care of it behind the scenes. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240612082019.19161-6-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 4565d2652a37e438e4cd729e2a8dfeffe34c958c Author: Bartosz Golaszewski Date: Wed Jun 12 10:20:17 2024 +0200 PCI/pwrctl: Add PCI power control core code Some PCI devices must be powered-on before they can be detected on the bus. Introduce a simple framework reusing the existing PCI OF infrastructure. The way this works is: a DT node representing a PCI device connected to the port can be matched against its power control platform driver. If the match succeeds, the driver is responsible for powering-up the device and calling pci_pwrctl_device_set_ready() which will trigger a PCI bus rescan as well as subscribe to PCI bus notifications. When the device is detected and created, we'll make it consume the same DT node that the platform device did. When the device is bound, we'll create a device link between it and the parent power control device. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240612082019.19161-5-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 8fb18619d9102e8f4f6184cdac482422d9293b48 Author: Bartosz Golaszewski Date: Wed Jun 12 10:20:16 2024 +0200 PCI/pwrctl: Create platform devices for child OF nodes of the port node In preparation for introducing PCI device power control - a set of library functions that will allow powering-up of PCI devices before they're detected on the PCI bus - we need to populate the devices defined on the device-tree. We are reusing the platform bus as it provides us with all the infrastructure we need to match the pwrctl drivers against the compatibles from OF nodes. These platform devices will be probed by the driver core and bound to the PCI pwrctl drivers we'll introduce later. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240612082019.19161-4-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 62c953f0f4fb0b5f67b0ad3096ab38f5c5712d75 Author: Bartosz Golaszewski Date: Wed Jun 12 10:20:15 2024 +0200 PCI/pwrctl: Reuse the OF node for power controlled devices With PCI power control we deal with two struct device objects bound to two different drivers but consuming the same OF node. We must not bind the pinctrl twice. To that end: before setting the OF node of the newly instantiated PCI device, check if a platform device consuming the same OF node doesn't already exist on the platform bus and - if so - mark the PCI device as reusing the OF node. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240612082019.19161-3-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 5799eba8eeabe79a476016f22a7aea57467b7638 Author: Bartosz Golaszewski Date: Wed Jun 12 10:20:14 2024 +0200 PCI: Hold the rescan mutex when scanning for the first time With the introduction of PCI device power control drivers that will be able to trigger the port rescan when probing, we need to hold the rescan mutex during the initial pci_host_probe() too or the two could get in each other's way. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20240612082019.19161-2-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 9edd534fc6553d83ac9f208a64d581f5d20214d7 Author: Krzysztof Kozlowski Date: Thu May 9 12:47:49 2024 +0200 ARM: dts: vt8500: align panel timings node name with dtschema DT schema expects panel timings node to follow certain pattern, dtbs_check warnings: vt8500-bv07.dtb: display-timings: '800x480' does not match any of the regexes: '^timing', 'pinctrl-[0-9]+' Linux drivers do not care about node name, so this should not have effect on Linux. Link: https://lore.kernel.org/r/20240509104749.216605-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit d14c14618e851eb25d55807810c2c1791a637712 Author: André Draszik Date: Tue May 7 15:14:48 2024 +0100 phy: exynos5-usbdrd: set ref clk freq in exynos850_usbdrd_utmi_init() While commit 255ec3879dd4 ("phy: exynos5-usbdrd: Add 26MHz ref clk support") correctly states that CLKRSTCTRL[7:5] doesn't need to be set on modern Exynos platforms, SSPPLLCTL[2:0] should be programmed with the frequency of the reference clock for the USB2.0 phy instead. I stumbled across this while adding support for the Google Tensor gs101, but this should apply to E850 just the same. Do so. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20240507-samsung-usb-phy-fixes-v1-5-4ccba5afa7cc@linaro.org Signed-off-by: Vinod Koul commit 32b2495e731f2a56118034e9c665e6fe56bbfe3a Author: André Draszik Date: Tue May 7 15:14:47 2024 +0100 phy: exynos5-usbdrd: fix definition of EXYNOS5_FSEL_26MHZ Using 0x82 seems odd, where everything else is just a sequence. On E850, this macro isn't used (as a register value), only to assign its value to the 'extrefclk' variable, which is otherwise unused on that platform. Older platforms don't appear to support 26MHz in the first place (since this macro was added for E850). Furthermore, the downstream driver uses 0x82 to denote USBPHY_REFCLK_DIFF_26MHZ (whatever that means exactly), but for all the other values we match downstream's non-DIFF macros. Update to avoid confusion. No functional change intended. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20240507-samsung-usb-phy-fixes-v1-4-4ccba5afa7cc@linaro.org Signed-off-by: Vinod Koul commit f2b6fc4d5c9793c556412e9a8ac122670a0d8dcb Author: André Draszik Date: Tue May 7 15:14:46 2024 +0100 phy: exynos5-usbdrd: make phy_isol() take a bool for clarity on / not on is just a boolean flag and is a bit misleading as currently on==1 means to turn off the power, and on==0 to turn power on. Rename the flag and make it a bool to avoid confusion of future readers of this code. No functional change. While at it, fix a whitespace issue in nearby comment. No functional change. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20240507-samsung-usb-phy-fixes-v1-3-4ccba5afa7cc@linaro.org Signed-off-by: Vinod Koul commit 27f3d3f6d87f650cc6b3ea08335dea749f1b04aa Author: André Draszik Date: Tue May 7 15:14:45 2024 +0100 phy: exynos5-usbdrd: convert udelay() to fsleep() The timers-howto recommends using usleep_range() and friends anytime waiting for >= ~10us is required. Doing so can help the timer subsystem a lot to coalesce wakeups. Additionally, fsleep() exists as a convenient wrapper so we do not have to think about which exact sleeping function is required in which case. Convert all udelay() calls in this driver to use fsleep() to follow the recommendataion. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20240507-samsung-usb-phy-fixes-v1-2-4ccba5afa7cc@linaro.org Signed-off-by: Vinod Koul commit 2a0dc34bab8ede5fa50378ef206f580303eed8de Author: André Draszik Date: Tue May 7 15:14:44 2024 +0100 phy: exynos5-usbdrd: uniform order of register bit macros Most of the macros are ordered high -> low, but there are some outliers. Order them all uniformly from high to low. This will allow adding additional register (field) definitions in a consistent way. While at it, also remove some extra empty lines to group register bit field definitions together with the relevant register. This makes the registers easier to distinguish visually. No functional change. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20240507-samsung-usb-phy-fixes-v1-1-4ccba5afa7cc@linaro.org Signed-off-by: Vinod Koul commit dd2118bd10c1e74b8f0082750bd39c4bcb5fe5f7 Author: Mohammad Shehar Yaar Tausif Date: Tue Apr 23 20:37:25 2024 +0530 ARM: dts: vt8500: replace "uhci" nodename with generic name "usb" Replace "uhci" nodenames with "usb" as it's generic and aligns with the schema binding. Signed-off-by: Mohammad Shehar Yaar Tausif Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240423150728.91527-1-sheharyaar48@gmail.com Signed-off-by: Krzysztof Kozlowski commit 54d96912caf6bb1e6682cfdb225a67cb80545557 Author: Shaul Triebitz Date: Wed Jun 5 14:07:39 2024 +0300 wifi: iwlwifi: mvm: use ROC for P2P device activities This is the first step towards removing the P2P Device MAC. Use ROC (which uses the AUX MAC) for P2P Device discoveribility and action frames. Signed-off-by: Shaul Triebitz Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140556.8c90e457abbd.I8e340759ecb299e05b1809f3d8060429c6cbbd01@changeid Signed-off-by: Johannes Berg commit 5f1fee9644759d07f3d3a468389c7c18027083d7 Author: Johannes Berg Date: Wed Jun 5 14:07:36 2024 +0300 wifi: iwlwifi: mvm: separate non-BSS/ROC EMLSR blocking If non-BSS and remain-on-channel (ROC) blocking were to occur simultaneously, they'd step on each other's toes, unblocking when not yet supported. Disentangle these bits, and ROC doesn't need to use the non_bss_link() function then. Fixes: a1efeb823084 ("wifi: iwlwifi: mvm: Block EMLSR when a p2p/softAP vif is active") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140556.461fcf7b95bb.Id0d21dcb739d426ff15ec068b5df8abaab58884d@changeid Signed-off-by: Johannes Berg commit bec2cdf548f92641f68677fcc43dc19aa4d0eceb Author: Miri Korenblit Date: Wed Jun 5 14:05:07 2024 +0300 wifi: iwlwifi: bump min API version for Qu/So devices Stop supporting all FWs older than the max API version. These FW versions were supported since v6.5. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240605140327.ad6d43fe9893.I96f769e7d5be3e6499d260451df781bd694a5142@changeid Signed-off-by: Johannes Berg commit bd40215b19d255b433a91a8bb8088937e5db4284 Author: Miri Korenblit Date: Wed Jun 5 14:05:06 2024 +0300 wifi: iwlwifi: mvm: fix re-enabling EMLSR When EMLSR gets unblocked, the current code checks if the last exit was due to an EXIT reason (as opposed to a BLOCKING one), and if so, it does nothing, as in this case a MLO scan was scheduled to run in 30 seconds. But the code doesn't consider the time that passed from the last exit, so if immediately after the exit a blocker occurred (e.g. non-BSS interface), and lasts for more than 30 seconds, then the MLO scan and the following link selection will decide not to enter EMLSR, and when the unblocking event finally happens, the reason is still set to the EXIT one, so it will do nothing, and we will not have the chance to re-enable EMLSR. Fix this by checking also the time that has passed since the last exit, only if it is less than 30 seconds, we can count on the scheduled MLO scan. Note that clearing the reason itself can't be done since it is needed for the EMLSR prevention mechanism. Fixes: 2f33561ea8f9 ("wifi: iwlwifi: mvm: trigger link selection after exiting EMLSR") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240605140327.58556fc4cfa9.I4c55b3cd9f20b21b37f28258d0fb6842ba413966@changeid Signed-off-by: Johannes Berg commit 0d91a2bfc3dcae0a586e67c904abef002c848e6c Author: Yedidya Benshimol Date: Wed Jun 5 14:05:03 2024 +0300 wifi: iwlwifi: remove struct iwl_trans_ops This was needed when we had multiple types of transports. Now we only have pcie, so there is no need for this ops. Cleanup the code such as the different trans APIs will call the pcie function directly, instead of calling the callback, and remove struct iwl_trans_ops. Signed-off-by: Yedidya Benshimol Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140327.8315ff64f9f3.Ifdbc1f26d49766f7de553dcb5f613885f4ee65cc@changeid Signed-off-by: Johannes Berg commit 49101078be769e9c50a8bfbc8caaab56db9d12d9 Author: Johannes Berg Date: Wed Jun 5 14:05:02 2024 +0300 wifi: iwlwifi: pcie: integrate TX queue code The TX queue code was mostly moved out to support an internal transport that we were never going to publish, but we're no longer using that. Since we're also going to be dissolving the virtual transport layer entirely, integrate the TX queue code into the PCIe layer. This also has a small kernel of already removing the virtual transport function layer, since iwl_trans_send_cmd() calls iwl_trans_pcie_send_hcmd() directly now, even if that still calls the transport send_cmd method for now, we'll clean it up later. Also, not everything is renamed yet. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140327.936b13f45071.Ib219ce01a1e67bcad79d5131626db950252aaa46@changeid Signed-off-by: Johannes Berg commit dc8f854fec78c35316e9616c993a7b3586cc30ed Author: Johannes Berg Date: Wed Jun 5 14:05:01 2024 +0300 wifi: iwlwifi: api: fix includes in debug.h This needs to include dbg-tlv.h since it uses the value of IWL_FW_INI_ALLOCATION_NUM from that file. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140327.2d25691283eb.I0909621a0e293a8a21d4f1de6e5fd59c22e4b212@changeid Signed-off-by: Johannes Berg commit 57bb72fad7bcb9ed0b2d7ec1b73a116ac3c6a2ba Author: Johannes Berg Date: Wed Jun 5 14:05:00 2024 +0300 wifi: iwlwifi: move TXQ bytecount limit to queue code This really isn't correct to be in the opmode, do the clamping (and power-of-2 fixup that may be necessary due to this, or even otherwise) in the queue code. Also move down the retrying of the allocation, it should be after all the size fixups, but also it just makes sense, and avoids retrying same-size allocations in the case of the BZ-family A-step workaround. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140327.000a0a1e807d.Ib822590d5aca76ff3168418ae2c139b3d43d81ed@changeid Signed-off-by: Johannes Berg commit 62a5c4029552a5645d0600fcb311a14131ccced1 Author: Johannes Berg Date: Wed Jun 5 14:04:59 2024 +0300 wifi: iwlwifi: mvm: fix DTIM skip powersave config When entering D3 we want to configure skip over DTIM, but it can't use the deflink configuration, that will not even exist. Adjust the code to handle multiple links by taking the min skip, even if we should only have a single active link at this point. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605140327.bccf980fadb4.Idc98b9f3634f39d2fae9bd9916f5d050ccd48f95@changeid Signed-off-by: Johannes Berg commit 2cbeb1a38758bfd165a7f284933e24b4552da65d Author: Miri Korenblit Date: Wed Jun 5 14:04:58 2024 +0300 wifi: iwlwifi: bump minimum API version in BZ/SC to 90 Stop supporting older FWs. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240605140327.ff8477233010.Ic8c73bd6749cc5f8ab5297807bb0be9bd96a59fa@changeid Signed-off-by: Johannes Berg commit 10776262264042199bc3137f277ec2564f37907b Author: Miri Korenblit Date: Wed Jun 5 14:04:57 2024 +0300 wifi: iwlwifi: mvm: remove unneeded debugfs entries These entries are not used, remove them. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240605140327.0c7c520814d5.I19cefb3d81b03a5be94c029cfffd1c8b8c437182@changeid Signed-off-by: Johannes Berg commit 671b6b1b1ea5c260549c8f7401828147c40fa9cf Author: Emmanuel Grumbach Date: Wed Jun 5 13:57:20 2024 +0300 wifi: cfg80211: honor WIPHY_FLAG_SPLIT_SCAN_6GHZ in cfg80211_conn_scan If a user uses iw to connect to a network and we don't have any information about the existing networks, cfg80211 will trigger a scan internally even if the user didn't ask for a scan. This scan is implemented by cfg80211_conn_scan(). This function called rdev_scan() directly without honoring the WIPHY_FLAG_SPLIT_SCAN_6GHZ flag. Use cfg80211_scan instead, this will split the scan if the low level driver asked to. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605135233.33f03661476a.I7b5be20a55aafe012cd9ddb3b4ba2d46b256ace4@changeid Signed-off-by: Johannes Berg commit 642508a42f74d7467aae7c56dff3016db64a25bd Author: Johannes Berg Date: Wed Jun 5 13:57:19 2024 +0300 wifi: mac80211: clean up 'ret' in sta_link_apply_parameters() There's no need to have the always-zero ret variable in the function scope, move it into the inner scope only. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605135233.eb7a24632d98.I72d7fe1da89d4b89bcfd0f5fb9057e3e69355cfe@changeid Signed-off-by: Johannes Berg commit 03ecd745dde181f537bf84374caafb121463136b Author: Johannes Berg Date: Wed Jun 5 13:57:18 2024 +0300 wifi: mac80211: fix erroneous errors for STA changes When e.g. wpa_supplicant sets only the MLD "sta" authorized state, the code actually applies that change, but then returns an error to userspace anyway because there were no changes to the link station, and no link ID was given. However, it's not incorrect to not have a link ID when wanting to change only the MLD peer ("sta") state, so the code shouldn't require it. To fix this, separate the "new_link" argument out into a new three-state enum, because if modify is called on a link STA only, it should return an error if no link is given or if it doesn't exist. For modify on the MLD "sta", not having a link ID is OK, but if there is one it should be validated. This seems to not have mattered much as wpa_supplicant just prints a message and continues, and the authorized state was already set before this error return. However, in the later code powersave recalculation etc. will be skipped, so that it may result in never allowing powersave on MLO connections. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605135233.48e2b8af07e3.Ib9793c383fcba118c05100e024f4a11a1c3d0e85@changeid Signed-off-by: Johannes Berg commit a7bb6b5d36766e749d5d4cf5391f2ebce608968a Author: Avraham Stern Date: Wed Jun 5 13:57:17 2024 +0300 wifi: mac80211_hwsim: add 320 MHz to hwsim channel widths Setting a channel with 320 MHz channel width over hwsim results in an array-index-out-of-bounds error. Fix it by adding 320 MHz to hwsim supported channel widths. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605135233.a766c1465566.Ib859c7233511b61b8a34022cfceeb4971c739d80@changeid Signed-off-by: Johannes Berg commit f737b70434f332042fcbe37f85ee3ee424959403 Author: Avraham Stern Date: Wed Jun 5 13:57:16 2024 +0300 wifi: nl80211: remove the FTMs per burst limit for NDP ranging In NDP ranging, the number of NDP exchanges is not negotiated and thus is not limited by the protocol. Remove the limit on FTMs per burst for trigger based and non trigger based ranging. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240605135233.916e228537d9.I5fe4c1cefa1c1328726e7615dd5a0d861c694381@changeid Signed-off-by: Johannes Berg commit 91b193d546683558a8799ffb2e2f935d3800633e Author: Benjamin Berg Date: Sun Jun 2 10:22:00 2024 +0300 wifi: cfg80211: reject non-conformant 6 GHz center frequencies On 6 GHz (and also 5 GHz to some degree), only a specific set of center frequencies should be used depending on the channel bandwidth. Verify this is the case on 6 GHz. For 5 GHz, we are more accepting as there are APs that got it wrong historically. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240602102200.876b10a2beda.I0d3d0daea4014e99654437ff6691378dbe452652@changeid Signed-off-by: Johannes Berg commit c1d8bd8d777d55f6708ca6e47c54dbe9f66f9bbb Author: Johannes Berg Date: Thu May 23 12:09:49 2024 +0200 wifi: cfg80211: add regulatory flag to allow VLP AP operation Add a regulatory flag to allow VLP AP operation even on channels otherwise marked NO_IR, which may be possible in some regulatory domains/countries. Note that this requires checking also when the beacon is changed, since that may change the regulatory power type. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.63792ce19790.Ie2a02750d283b78fbf3c686b10565fb0388889e2@changeid Signed-off-by: Johannes Berg commit 9fd171a71b9d4cd8855891c0ba7e2a152139b41a Author: Johannes Berg Date: Thu May 23 12:09:48 2024 +0200 wifi: cfg80211: refactor regulatory beaconing checking There are two functions exported now, with different settings, refactor to just export a single function that take a struct with different settings. This will make it easier to add more parameters. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.d44c34dadfc2.I59b4403108e0dbf7fc6ae8f7522e1af520cffb1c@changeid Signed-off-by: Johannes Berg commit 459662e83db6eb33f648213bba2c509f4d6dead9 Author: Johannes Berg Date: Thu May 23 12:09:47 2024 +0200 wifi: cfg80211: refactor 6 GHz AP power type parsing Add cfg80211_get_6ghz_power_type() to parse the 6 GHz power type from a given set of elements, which is now only inside cfg80211_6ghz_power_type_valid(). Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.84cdffd94085.I76f434ee12552e8be91273f3b2d776179eaa62f1@changeid Signed-off-by: Johannes Berg commit ca41bfe367d54a7fa966c11852d50d4191187725 Author: Johannes Berg Date: Thu May 23 12:09:46 2024 +0200 wifi: mac80211: refactor channel checks To later introduce an override for VLP APs being allowed despite NO-IR flags, which is somewhat similar in construction to being allowed to monitor on disabled channels, refactor the code that checks channel flags to have not a 'monitor' argument but a set of 'permitting' flags that permit the operation without checking for 'prohibited' flags. Reviewed-by: Miriam Rachel Korenblit Reviewed-by: Ilan Peer Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.3da28ded4a50.I90cffc633d0510293d511f60097dc75e719b55f0@changeid Signed-off-by: Johannes Berg commit 0a9314ad5f45aeb10326dce33c5d70b85f74ef2d Author: Johannes Berg Date: Thu May 23 12:09:45 2024 +0200 wifi: cfg80211: move enum ieee80211_ap_reg_power to cfg80211 This really shouldn't have been in ieee80211.h, since it doesn't directly represent the spec. Move it to cfg80211 rather than mac80211 since upcoming changes will use it there. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.962b16c831cd.I5745962525b1b176c5b90d37b3720fc100eee406@changeid Signed-off-by: Johannes Berg commit 92a5df6687da755edd4bfe1acb714f00f56d2e06 Author: Johannes Berg Date: Thu May 23 12:09:44 2024 +0200 wifi: ieee80211: remove unused enum ieee80211_client_reg_power This has never been used, and it's really not directly representing the spec, so shouldn't have been here in the first place. Remove it. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.32ed8fc1522d.Id4480d162e1921478e33d145890dc16c263b57bf@changeid Signed-off-by: Johannes Berg commit 8682ad36870790ad6a9a03ac237c8d87d34b26d5 Author: Johannes Berg Date: Thu May 23 12:09:43 2024 +0200 wifi: cfg80211: use BIT() for flag enums Use BIT(x) instead of 1< Reviewed-by: Ilan Peer Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.c21598fbf49c.Ib8f26c5e9f508aee19fdfa1fd4b5995f084c46d4@changeid Signed-off-by: Johannes Berg commit f3269b7912f75b6e34926334377ede45656a8950 Author: Johannes Berg Date: Thu May 23 12:09:42 2024 +0200 wifi: nl80211: expose can-monitor channel property It may be possible to monitor on disabled channels per the can-monitor flag, but evidently I forgot to expose that out to userspace. Fix that. Fixes: a110a3b79177 ("wifi: cfg80211: optionally support monitor on disabled channels") Reviewed-by: Miriam Rachel Korenblit Reviewed-by: Ilan Peer Signed-off-by: Johannes Berg Link: https://msgid.link/20240523120945.9a2c19a51e53.I50fa1b1a18b70f63a5095131ac23dc2e71f3d426@changeid Signed-off-by: Johannes Berg commit bcbd771cd5d68c0c52567556097d75f9fc4e7cd6 Author: Baochen Qiang Date: Thu Jun 6 10:06:53 2024 +0800 wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he() Currently NL80211_RATE_INFO_HE_RU_ALLOC_2x996 is not handled in cfg80211_calculate_bitrate_he(), leading to below warning: kernel: invalid HE MCS: bw:6, ru:6 kernel: WARNING: CPU: 0 PID: 2312 at net/wireless/util.c:1501 cfg80211_calculate_bitrate_he+0x22b/0x270 [cfg80211] Fix it by handling 2x996 RU allocation in the same way as 160 MHz bandwidth. Fixes: c4cbaf7973a7 ("cfg80211: Add support for HE") Signed-off-by: Baochen Qiang Link: https://msgid.link/20240606020653.33205-3-quic_bqiang@quicinc.com Signed-off-by: Johannes Berg commit 9ee0d44f055276fe2802b2f65058e920853f4f99 Author: Baochen Qiang Date: Thu Jun 6 10:06:52 2024 +0800 wifi: cfg80211: fix typo in cfg80211_calculate_bitrate_he() rates_996 is mistakenly written as rates_969, fix it. Fixes: c4cbaf7973a7 ("cfg80211: Add support for HE") Signed-off-by: Baochen Qiang Link: https://msgid.link/20240606020653.33205-2-quic_bqiang@quicinc.com Signed-off-by: Johannes Berg commit c018411d355518a0b2a304d7543564cdd1b808b6 Author: Breno Leitao Date: Fri Jun 7 03:20:44 2024 -0700 wifi: mac80211: Remove generic .ndo_get_stats64 Commit 3e2f544dd8a33 ("net: get stats64 if device if driver is configured") moved the callback to dev_get_tstats64() to net core, so, unless the driver is doing some custom stats collection, it does not need to set .ndo_get_stats64. Since this driver is now relying in NETDEV_PCPU_STAT_TSTATS, then, it doesn't need to set the dev_get_tstats64() generic .ndo_get_stats64 function pointer. In this driver specifically, .ndo_get_stats64 basically points to dev_fetch_sw_netstats(). Now it will point to dev_get_tstats64(), which calls netdev_stats_to_stats64() and dev_fetch_sw_netstats(). netdev_stats_to_stats64() seems irrelevant for this driver. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://msgid.link/20240607102045.235071-2-leitao@debian.org Signed-off-by: Johannes Berg commit 7b7890f3861634d1ec762a2697072dff42f65319 Author: Breno Leitao Date: Fri Jun 7 03:20:43 2024 -0700 wifi: mac80211: Move stats allocation to core With commit 34d21de99cea9 ("net: Move {l,t,d}stats allocation to core and convert veth & vrf"), stats allocation could be done on net core instead of this driver. With this new approach, the driver doesn't have to bother with error handling (allocation failure checking, making sure free happens in the right spot, etc). This is core responsibility now. Move mac80211 driver to leverage the core allocation. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://msgid.link/20240607102045.235071-1-leitao@debian.org Signed-off-by: Johannes Berg commit 7f12e26a194d0043441f870708093d9c2c3bad7d Author: Johannes Berg Date: Fri Jun 7 20:17:17 2024 +0200 wifi: cfg80211: make hash table duplicates more survivable Jiazi Li reported that they occasionally see hash table duplicates as evidenced by the WARN_ON() in rb_insert_bss() in this code. It isn't clear how that happens, nor have I been able to reproduce it, but if it does happen, the kernel crashes later, when it tries to unhash the entry that's now not hashed. Try to make this situation more survivable by removing the BSS from the list(s) as well, that way it's fully leaked here (as had been the intent in the hash insert error path), and no longer reachable through the list(s) so it shouldn't be unhashed again later. Link: https://lore.kernel.org/r/20231026013528.GA24122@Jiazi.Li Signed-off-by: Johannes Berg Link: https://msgid.link/20240607181726.36835-2-johannes@sipsolutions.net Signed-off-by: Johannes Berg commit 5f12dd57a071daf896c00cb4572f2baebbddbb46 Author: Johannes Berg Date: Wed Jun 12 10:05:33 2024 +0200 wifi: mac80211: correct EHT EIRP TPE parsing For the EHT EIRP transmit power envelope, the 320 MHz is in the last octet, but if we've copied 4 octets (count == 3), the next one is at index 4 not 5 (count + 2). Fix this, and just hardcode the offset since count is always 3 here. Fixes: 39dc8b8ea387 ("wifi: mac80211: pass parsed TPE data to drivers") Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240612100533.f96c1e0fb758.I2f301c4341abb44dafd29128e7e32c66dc0e296d@changeid Signed-off-by: Johannes Berg commit 513ea833c20109d475b4ace9e6a18f6c0c25de4c Author: Michal Wajdeczko Date: Tue Jun 11 18:35:37 2024 +0200 drm/xe/vf: Ignore force-wake requests if VF The control and ack force-wake registers are not accessible for the VF drivers. To avoid changing existing code logic that tracks woken domains, simply ignore all attempts to access control or ack registers if we are running as a VF driver. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240611163537.1944-6-michal.wajdeczko@intel.com commit ec8727568299255798da50ffa97c9b479da56543 Author: Michal Wajdeczko Date: Tue Jun 11 18:35:36 2024 +0200 drm/xe: Combine common force-wake code into helpers The code of 'control' and 'wait' force-wake operations are very similar for both 'wake' and 'sleep' cases. Add helpers to maximize code reuse. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240611163537.1944-5-michal.wajdeczko@intel.com commit f80437eb25f711a71f3143d3f0ebc597431aebc8 Author: Michal Wajdeczko Date: Tue Jun 11 18:35:35 2024 +0200 drm/xe: Include additional info on failed force-wake operation For debug purposes it might be useful to look at the values of the force-wake ack registers in case wake/sleep operations failures. Move xe_gt_notice() from the caller to the helper function, where we have the latest value of force-wake ack register available. Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240611163537.1944-4-michal.wajdeczko@intel.com commit d960c58010293cc9bddd81a6a2effde02d6a8fa7 Author: Michal Wajdeczko Date: Tue Jun 11 18:35:34 2024 +0200 drm/xe: Kill fw_to_gt() helper It's too simple to deserve separate helper. Suggested-by: Lucas De Marchi Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240611163537.1944-3-michal.wajdeczko@intel.com commit afe12a055d2de6b8c5ef1d4d8d5ca81220f3c31d Author: Michal Wajdeczko Date: Tue Jun 11 18:35:33 2024 +0200 drm/xe: Prefer GT oriented messages in xe_force_wake.c If possible, we should prefer xe_gt_notice() over drm_notice(). Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Cc: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240611163537.1944-2-michal.wajdeczko@intel.com commit efdf761a83cd390523223f58793755f5d60a4489 Author: Yazen Ghannam Date: Thu Jun 6 11:13:01 2024 -0500 hwmon: (k10temp) Rename _data variable ...to address the following warning: drivers/hwmon/k10temp.c:273:47: warning: declaration shadows a variable in the global scope [-Wshadow] static umode_t k10temp_is_visible(const void *_data, ^ No functional change is intended. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-8-ffde21931c3f@amd.com commit 0e097f2b5928651de3b4f0100401c9e71fa73dba Author: Yazen Ghannam Date: Thu Jun 6 11:13:00 2024 -0500 hwmon: (k10temp) Remove unused HAVE_TDIE() macro ...to address the following warning: drivers/hwmon/k10temp.c:104:9: warning: macro is not used [-Wunused-macros] No functional change is intended. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-7-ffde21931c3f@amd.com commit a8bc4165d237f4a6bddbab55d2b6592b87341f0a Author: Yazen Ghannam Date: Thu Jun 6 11:12:59 2024 -0500 hwmon: (k10temp) Reduce k10temp_get_ccd_support() parameters Currently, k10temp_get_ccd_support() takes as input "pdev" and "data". However, "pdev" is already included in "data". Furthermore, the "pdev" parameter is no longer used in k10temp_get_ccd_support(), since its use was moved into read_ccd_temp_reg(). Drop the "pdev" input parameter as it is no longer needed. No functional change is intended. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-6-ffde21931c3f@amd.com commit cc66126fd317a70d8612a8356ad512a1539abd75 Author: Yazen Ghannam Date: Thu Jun 6 11:12:58 2024 -0500 hwmon: (k10temp) Define a helper function to read CCD temperature The CCD temperature register is read in two places. These reads are done using an AMD SMN access, and a number of parameters are needed for the operation. Move the SMN access and parameter gathering into a helper function in order to simplify the code flow. This also has a benefit of centralizing the hardware register access in a single place in case fixes or special decoding is required. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-5-ffde21931c3f@amd.com commit dc5243921be1b6a0b4259dbcec3dc95016ad8427 Author: Yazen Ghannam Date: Thu Jun 6 11:12:57 2024 -0500 x86/amd_nb: Enhance SMN access error checking AMD Zen-based systems use a System Management Network (SMN) that provides access to implementation-specific registers. SMN accesses are done indirectly through an index/data pair in PCI config space. The accesses can fail for a variety of reasons. Include code comments to describe some possible scenarios. Require error checking for callers of amd_smn_read() and amd_smn_write(). This is needed because many error conditions cannot be checked by these functions. [ bp: Touchup comment. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-4-ffde21931c3f@amd.com commit c2d79cc5455c891de6c93e1e0c73d806e299c54f Author: Yazen Ghannam Date: Thu Jun 6 11:12:56 2024 -0500 hwmon: (k10temp) Check return value of amd_smn_read() Check the return value of amd_smn_read() before saving a value. This ensures invalid values aren't saved or used. There are three cases here with slightly different behavior: 1) read_tempreg_nb_zen(): This is a function pointer which does not include a return code. In this case, set the register value to 0 on failure. This enforces Read-as-Zero behavior. 2) k10temp_read_temp(): This function does have return codes, so return the error code from the failed register read. Continued operation is not necessary, since there is no valid data from the register. Furthermore, if the register value was set to 0, then the following operation would underflow. 3) k10temp_get_ccd_support(): This function reads the same register from multiple CCD instances in a loop. And a bitmask is formed if a specific bit is set in each register instance. The loop should continue on a failed register read, skipping the bit check. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-3-ffde21931c3f@amd.com commit 5ac6293047cf5de6daca662347c19347e856c2a5 Author: Yazen Ghannam Date: Thu Jun 6 11:12:55 2024 -0500 EDAC/amd64: Check return value of amd_smn_read() Check the return value of amd_smn_read() before saving a value. This ensures invalid values aren't saved. The struct umc instance is initialized to 0 during memory allocation. Therefore, a bad read will keep the value as 0 providing the expected Read-as-Zero behavior. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-2-ffde21931c3f@amd.com commit f97a8b9170a0524c5432791cd5852bf797934af4 Author: Yazen Ghannam Date: Thu Jun 6 11:12:54 2024 -0500 EDAC/amd64: Remove unused register accesses A number of UMC registers are read only for the purpose of debug printing. They are not used in any calculations. Nor do they have any specific debug value. Remove them. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240606-fix-smn-bad-read-v4-1-ffde21931c3f@amd.com commit 1d2a03d26a69e4e781077f5fbb5466143928c737 Author: Christian Heusel Date: Fri May 31 13:17:58 2024 +0200 tools/x86/kcpuid: Add missing dir via Makefile So far the Makefile just installed the csv into $(HWDATADIR)/cpuid.csv, which made it unaware about $DESTDIR. Add $DESTDIR to the install command and while at it also create the directory, should it not exist already. This eases the packaging of kcpuid and allows i.e. for the install on Arch to look like this: $ make BINDIR=/usr/bin DESTDIR="$pkgdir" -C tools/arch/x86/kcpuid install Some background on DESTDIR: DESTDIR is commonly used in packaging for staged installs (regardless of the used package manager): https://www.gnu.org/prep/standards/html_node/DESTDIR.html So the package is built and installed into a directory which the package manager later picks up and creates some archive from it. What is specific to Arch Linux here is only the usage of $pkgdir in the example, DESTDIR itself is widely used. [ bp: Extend the commit message with Christian's info on DESTDIR as a GNU coding standards thing. ] Signed-off-by: Christian Heusel Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240531111757.719528-2-christian@heusel.eu commit 9aae1baa1c5d8b7229b6de38dc9dc17efcb8c55d Author: Marcin Juszkiewicz Date: Thu Feb 29 15:51:00 2024 +0100 x86, arm: Add missing license tag to syscall tables files syscall*.tbl files were added to make it easier to check which system calls are supported on each architecture and to check for their numbers. Arm and x86 files lack Linux-syscall-note license exception present in files for all other architectures. Signed-off-by: Marcin Juszkiewicz Signed-off-by: Borislav Petkov (AMD) Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20240229145101.553998-1-marcin@juszkiewicz.com.pl commit 9ba0cae3cac07c21c583f9ff194f74043f90d29c Author: Esben Haabendal Date: Thu May 30 16:46:36 2024 +0200 memory: fsl_ifc: Make FSL_IFC config visible and selectable While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to be selectable for platforms using fsl_ifc with NOR flash. Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Reviewed-by: Miquel Raynal Signed-off-by: Esben Haabendal Link: https://lore.kernel.org/r/20240530-fsl-ifc-config-v3-1-1fd2c3d233dd@geanix.com Signed-off-by: Krzysztof Kozlowski commit 490d573b5a8579178beb648a69a2cbab91495a7b Author: Tony Luck Date: Tue Jun 11 10:14:55 2024 -0700 platform/x86/intel/ifs: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Reviewed-by: Jithu Joseph Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240611171455.352536-1-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit b32e036a7403289b2a10a438bb852da7ca651c86 Author: Rob Herring Date: Fri Apr 12 17:29:22 2024 -0500 arm64: dts: sprd: Split PMU nodes for heterogeneous CPUs Arm heterogeneous configurations should have separate PMU nodes for each CPU uarch as the uarch specific events can be different. The "arm,armv8-pmuv3" compatible is also intended for s/w models rather than specific uarch implementations. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20240412222923.3873814-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 6b4468b0c6ba37a16795da567b58dc80bc7fb439 Author: Dmitry Baryshkov Date: Fri Jun 7 16:23:00 2024 +0300 drm/bridge-connector: implement glue code for HDMI connector In order to let bridge chains implement HDMI connector infrastructure, add necessary glue code to the drm_bridge_connector. In case there is a bridge that sets DRM_BRIDGE_OP_HDMI, drm_bridge_connector will register itself as a HDMI connector and provide proxy drm_connector_hdmi_funcs implementation. Note, to simplify implementation, there can be only one bridge in a chain that sets DRM_BRIDGE_OP_HDMI. Setting more than one is considered an error. This limitation can be lifted later, if the need arises. Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-3-ab384e6021af@linaro.org Signed-off-by: Dmitry Baryshkov commit c12907be57b16eed5a73f75a44ebea8f30629c85 Author: Dmitry Baryshkov Date: Fri Jun 7 16:22:59 2024 +0300 drm/bridge-connector: switch to using drmm allocations Turn drm_bridge_connector to using drmm_kzalloc() and drmm_connector_init() and drop the custom destroy function. The drm_connector_unregister() and fwnode_handle_put() are already handled by the drm_connector_cleanup() and so are safe to be dropped. Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-2-ab384e6021af@linaro.org Signed-off-by: Dmitry Baryshkov commit 000d1940c90984a9a2af9c02bc17e3ca0d87f71d Author: Dmitry Baryshkov Date: Fri Jun 7 16:22:58 2024 +0300 drm/connector: hdmi: allow disabling Audio Infoframe Add drm_atomic_helper_connector_hdmi_disable_audio_infoframe(), an API to allow the driver disable sending the Audio Infoframe. This is to be used by the drivers if setup of the infoframes is not tightly coupled with the audio functionality and just disabling the audio playback doesn't stop the HDMI hardware from sending the Infoframe. Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240607-bridge-hdmi-connector-v5-1-ab384e6021af@linaro.org Signed-off-by: Dmitry Baryshkov commit 2f1630f437dff20d02e4b3f07e836f42869128dd Author: Bartosz Golaszewski Date: Wed Jun 5 14:38:50 2024 +0200 power: pwrseq: add a driver for the PMU module on the QCom WCN chipsets This adds the power sequencing driver for the PMU modules present on the Qualcomm WCN Bluetooth and Wifi chipsets. It uses the pwrseq subsystem and knows how to match the sequencer to the consumer device by verifying the relevant properties and DT layout. Using this driver will allow the BT and WLAN drivers to respect the required delays between enabling the two modules. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605123850.24857-3-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 249ebf3f65f8530beb2cbfb91bff1d83ba88d23c Author: Bartosz Golaszewski Date: Wed Jun 5 14:38:49 2024 +0200 power: sequencing: implement the pwrseq core Implement the power sequencing subsystem allowing devices to share complex powering-up and down procedures. It's split into the consumer and provider parts but does not implement any new DT bindings so that the actual power sequencing is never revealed in the DT representation. Tested-by: Amit Pundir Tested-by: Neil Armstrong # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly # OnePlus 8T Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605123850.24857-2-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 91579c93a9b207725559e3199870419afd50220f Merge: d4cea2caee9e1 efe46fb18e789 Author: David S. Miller Date: Wed Jun 12 06:39:04 2024 +0100 Merge branch 'tcp-ao-md5-racepoits' Dmitry Safonov says: ==================== net/tcp: TCP-AO and TCP-MD5 tracepoints Changes in v2: - Fix the build with CONFIG_IPV6=m (Eric Dumazet) - Move unused keyid/rnext/maclen later in the series to the patch that uses them (Simon Horman) - Reworked tcp_ao selftest lib to allow async tracing non-tcp events (was working on a stress-test that needs trace_kfree_skb() event, not in this series). - Separated selftest changes from kernel, as they now have a couple of unrelated to tracepoints changes - Wrote a few lines of Documentation/ - Link to v1: https://lore.kernel.org/r/20240224-tcp-ao-tracepoints-v1-0-15f31b7f30a7@arista.com ==================== Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit efe46fb18e7891a44b05ce62f68eea3d87b9342c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Jun 7 00:26:00 2024 +0100 Documentation/tcp-ao: Add a few lines on tracepoints Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit 78b1b27db91c7a94297a8b6a665fe7e86dfc5750 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Jun 7 00:25:59 2024 +0100 net/tcp: Remove tcp_hash_fail() Now there are tracepoints, that cover all functionality of tcp_hash_fail(), but also wire up missing places They are also faster, can be disabled and provide filtering. This potentially may create a regression if a userspace depends on dmesg logs. Fingers crossed, let's see if anyone complains in reality. Reviewed-by: Eric Dumazet Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit 96be3dcd013df6aa79acf32e739c0a35b89a4f50 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Jun 7 00:25:58 2024 +0100 net/tcp: Add tcp-md5 and tcp-ao tracepoints Instead of forcing userspace to parse dmesg (that's what currently is happening, at least in codebase of my current company), provide a better way, that can be enabled/disabled in runtime. Currently, there are already tcp events, add hashing related ones there, too. Rasdaemon currently exercises net_dev_xmit_timeout, devlink_health_report, but it'll be trivial to teach it to deal with failed hashes. Otherwise, BGP may trace/log them itself. Especially exciting for possible investigations is key rotation (RNext_key requests). Suggested-by: Jakub Kicinski Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit 811efc06e5f30a57030451b2d1998aa81273baf8 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Jun 7 00:25:57 2024 +0100 net/tcp: Move tcp_inbound_hash() from headers Two reasons: 1. It's grown up enough 2. In order to not do header spaghetti by including , which is necessary for TCP tracepoints. While at it, unexport and make static tcp_inbound_ao_hash(). Reviewed-by: Eric Dumazet Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit 72863087f635367323693b9ab83c3107e0353c5f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Jun 7 00:25:56 2024 +0100 net/tcp: Add a helper tcp_ao_hdr_maclen() It's going to be used more in TCP-AO tracepoints. Reviewed-by: Eric Dumazet Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit 3966a668bfeef49e265e4975a2cdc55fb931036d Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Jun 7 00:25:55 2024 +0100 net/tcp: Use static_branch_tcp_{md5,ao} to drop ifdefs It's possible to clean-up some ifdefs by hiding that tcp_{md5,ao}_needed static branch is defined and compiled only under related configs, since commit 4c8530dc7d7d ("net/tcp: Only produce AO/MD5 logs if there are any keys"). Reviewed-by: Eric Dumazet Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: David S. Miller commit d4cea2caee9e16d7eb3d9cfc88ea31f1018e8069 Merge: bfc65070a3767 1af3bc912eac9 Author: Jakub Kicinski Date: Tue Jun 11 19:30:27 2024 -0700 Merge branch 'selftests-mptcp-use-net-lib-sh-to-manage-netns' Matthieu Baerts says: ==================== selftests: mptcp: use net/lib.sh to manage netns The goal of this series is to use helpers from net/lib.sh with MPTCP selftests. - Patches 1 to 4 are some clean-ups and preparation in net/lib.sh: - Patch 1 simplifies the code handling errexit by ignoring possible errors instead of disabling errexit temporary. - Patch 2 removes the netns from the list after having cleaned it, not to try to clean it twice. - Patch 3 removes the 'readonly' attribute for the netns variable, to allow using the same name in local variables. - Patch 4 removes the local 'ns' var, not to conflict with the global one it needs to setup. - Patch 5 uses helpers from net/lib.sh to create and delete netns in MPTCP selftests. - Patch 6 uses wait_local_port_listen helper from net/net_helper.sh. ==================== Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-0-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit 1af3bc912eac91de6eb2a67a0cc7cfd5e1f11f2c Author: Geliang Tang Date: Fri Jun 7 18:31:07 2024 +0200 selftests: mptcp: lib: use wait_local_port_listen helper This patch includes net_helper.sh into mptcp_lib.sh, uses the helper wait_local_port_listen() defined in it to implement the similar mptcp helper. This can drop some duplicate code. It looks like this helper from net_helper.sh was originally coming from MPTCP, but MPTCP selftests have not been updated to use it from this shared place. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-6-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit f265d3119a29f1882cab156cb371a77865e17a13 Author: Geliang Tang Date: Fri Jun 7 18:31:06 2024 +0200 selftests: mptcp: lib: use setup/cleanup_ns helpers This patch includes lib.sh into mptcp_lib.sh, uses setup_ns helper defined in lib.sh to set up namespaces in mptcp_lib_ns_init(), and uses cleanup_ns to delete namespaces in mptcp_lib_ns_exit(). Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-5-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit f8a2d2f874b710b31dcc482af7a59acedb2640ff Author: Geliang Tang Date: Fri Jun 7 18:31:05 2024 +0200 selftests: net: lib: remove 'ns' var in setup_ns The helper setup_ns() doesn't work when a net namespace named "ns" is passed to it. For example, in net/mptcp/diag.sh, the name of the namespace is "ns". If "setup_ns ns" is used in it, diag.sh fails with errors: Invalid netns name "./mptcp_connect" Cannot open network namespace "10000": No such file or directory Cannot open network namespace "10000": No such file or directory That is because "ns" is also a local variable in setup_ns, and it will not set the value for the global variable that has been giving in argument. To solve this, we could rename the variable, but it sounds better to drop it, as we can resolve the name using the variable passed in argument instead. The other local variables -- "ns_list" and "ns_name" -- are more unlikely to conflict with existing global variables. They don't seem to be currently used in any other net selftests. Co-developed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-4-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit 577db6bd5750b6de70f7017dfa2ad98d8934993b Author: Matthieu Baerts (NGI0) Date: Fri Jun 7 18:31:04 2024 +0200 selftests: net: lib: do not set ns var as readonly It sounds good to mark the global netns variable as 'readonly', but Bash doesn't allow the creation of local variables with the same name. Because it looks like 'readonly' is mainly used here to check if a netns with that name has already been set, it sounds fine to check if a variable with this name has already been set instead. By doing that, we avoid having to modify helpers from MPTCP selftests using the same variable name as the one used to store the created netns name. While at it, also avoid an unnecessary call to 'eval' to set a local variable. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-3-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit 92fe5670271a58bb951646225ea367bb86f7feb3 Author: Matthieu Baerts (NGI0) Date: Fri Jun 7 18:31:03 2024 +0200 selftests: net: lib: remove ns from list after clean-up Instead of only appending items to the list, removing them when the netns has been deleted. By doing that, we can make sure 'cleanup_all_ns()' is not trying to remove already deleted netns. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-2-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit 7e0620bc6a5ec6b340a0be40054f294ca26c010f Author: Matthieu Baerts (NGI0) Date: Fri Jun 7 18:31:02 2024 +0200 selftests: net: lib: ignore possible errors No need to disable errexit temporary, simply ignore the only possible and not handled error. Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-next-20240607-selftests-mptcp-net-lib-v1-1-e36986faac94@kernel.org Signed-off-by: Jakub Kicinski commit c2a28647bbb4e0894e8824362410f72b06ac57a4 Author: Tzung-Bi Shih Date: Tue Jun 11 11:31:10 2024 +0000 platform/chrome: cros_ec_debugfs: fix wrong EC message version ec_read_version_supported() uses ec_params_get_cmd_versions_v1 but it wrongly uses message version 0. Fix it. Fixes: e86264595225 ("mfd: cros_ec: add debugfs, console log file") Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240611113110.16955-1-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih commit 41f1242f62490bc48520bf5d800d2c2c4e2258ec Author: Tzung-Bi Shih Date: Tue Jun 11 03:31:13 2024 +0000 platform/chrome: cros_ec_proto: update Kunit test for get_next_data_v3 Since commit 106d67398233 ("platform/chrome: cros_ec_proto: Upgrade get_next_event to v3"), (struct cros_ec_device *)->event_data becomes struct ec_response_get_next_event_v3. Update the Kunit test for fixing the following error: > Expected mock->msg.insize == sizeof(union ec_response_get_next_data_v1), but > mock->msg.insize == 18 (0x12) > sizeof(union ec_response_get_next_data_v1) == 16 (0x10) Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240611033113.4154548-1-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih commit bfc65070a3767dd04bff32ef896394ba63cef085 Merge: 45403b12c29c5 2202576d4631b Author: Jakub Kicinski Date: Tue Jun 11 19:24:58 2024 -0700 Merge branch 'net-core-unify-dstats-with-tstats-and-lstats-implement-generic-dstats-collection' Jeremy Kerr says: ==================== net: core: Unify dstats with tstats and lstats, implement generic dstats collection The struct pcpu_dstats ("dstats") has a few variations from the other two stats types (struct pcpu_sw_netstats and struct pcpu_lstats), and doesn't have generic helpers for collecting the per-cpu stats into a struct rtnl_link_stats64. This change unifies dstats with the other types, adds a collection implementation to the core, and updates the single driver (vrf) to use this generic implementation. Of course, questions/comments/etc are most welcome! v3: https://lore.kernel.org/r/20240605-dstats-v2-0-7fae03f813f3@codeconstruct.com.au v2: v1: https://lore.kernel.org/r/20240605-dstats-v1-0-1024396e1670@codeconstruct.com.au ==================== Link: https://lore.kernel.org/r/20240607-dstats-v3-0-cc781fe116f7@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit 2202576d4631b977a95162a387c0c9fb4ca6819c Author: Jeremy Kerr Date: Fri Jun 7 18:25:26 2024 +0800 net: vrf: move to generic dstat helpers The vrf driver has its own dstats-to-rtnl_link_stats64 collection, but we now have a generic implementation for dstats collection, so switch to this. In doing so, we fix a minor issue where the (non-percpu) dev->stats->tx_errors value was never collected into rtnl_link_stats64, as the generic dev_get_dstats64() consumes the starting values from dev->stats. Signed-off-by: Jeremy Kerr Reviewed-by: Simon Horman Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607-dstats-v3-3-cc781fe116f7@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit 94b601bc4f8528262b2b83194b7fd3fc2a6da75a Author: Jeremy Kerr Date: Fri Jun 7 18:25:25 2024 +0800 net: core: Implement dstats-type stats collections We currently have dev_get_tstats64() for collecting per-cpu stats of type pcpu_sw_netstats ("tstats"). However, tstats doesn't allow for accounting tx/rx drops. We do have a stats variant that does have stats for dropped packets: struct pcpu_dstats, but there are no core helpers for using those stats. The VRF driver uses dstats, by providing its own collation/fetch functions to do so. This change adds a common implementation for dstats-type collection, used when pcpu_stat_type == NETDEV_PCPU_STAT_DSTAT. This is based on the VRF driver's existing stats collator (plus the unused tx_drops stat from there). We will switch the VRF driver to use this in the next change. Signed-off-by: Jeremy Kerr Reviewed-by: Simon Horman Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607-dstats-v3-2-cc781fe116f7@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit fa59dc2f6fc616fde3941f62ccd4adcaa21ccd47 Author: Jeremy Kerr Date: Fri Jun 7 18:25:24 2024 +0800 net: core,vrf: Change pcpu_dstat fields to u64_stats_t The pcpu_sw_netstats and pcpu_lstats structs both contain a set of u64_stats_t fields for individual stats, but pcpu_dstats uses u64s instead. Make this consistent by using u64_stats_t across all stats types. The per-cpu dstats are only used by the vrf driver at present, so update that driver as part of this change. Signed-off-by: Jeremy Kerr Reviewed-by: Simon Horman Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240607-dstats-v3-1-cc781fe116f7@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit 45403b12c29c5d9510ace1ad767ea4b13a4caf38 Author: Breno Leitao Date: Fri Jun 7 01:44:19 2024 -0700 ip_tunnel: Move stats allocation to core With commit 34d21de99cea9 ("net: Move {l,t,d}stats allocation to core and convert veth & vrf"), stats allocation could be done on net core instead of this driver. With this new approach, the driver doesn't have to bother with error handling (allocation failure checking, making sure free happens in the right spot, etc). This is core responsibility now. Move ip_tunnel driver to leverage the core allocation. All the ip_tunnel_init() users call ip_tunnel_init() as part of their .ndo_init callback. The .ndo_init callback is called before the stats allocation in netdev_register(), thus, the allocation will happen before the netdev is visible. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240607084420.3932875-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 983e44f0ee003bf6ca28519fbcabaa7adb77827b Author: Chris Packham Date: Fri Jun 7 14:08:43 2024 +1200 net: dsa: Fix typo in NET_DSA_TAG_RTL4_A Kconfig Fix a minor typo in the help text for the NET_DSA_TAG_RTL4_A config option. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Reviewed-by: Luiz Angelo Daros de Luca Link: https://lore.kernel.org/r/20240607020843.1380735-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit 95f8bf932b46cd5c17c681d67be9234551234eac Author: Jeff Johnson Date: Mon Jun 10 09:16:15 2024 -0700 scsi: Add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/scsi_common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/advansys.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/BusLogic.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/aha1740.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/isci/isci.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/elx/efct.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/atp870u.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/ppa.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/scsi/imm.o Add all missing invocations of the MODULE_DESCRIPTION() macro. This updates all files which have a MODULE_LICENSE() but which do not have a MODULE_DESCRIPTION(), even ones which did not produce the x86 allmodconfig warnings. Acked-by: Finn Thain Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240610-md-drivers-scsi-v3-1-055da78d66b2@quicinc.com Signed-off-by: Martin K. Petersen commit 3eddb031965ae9a95ba098ae6eb81b082e024c65 Author: Masami Hiramatsu (Google) Date: Tue Jun 11 22:30:56 2024 +0900 tracing/kprobe: Remove cleanup code unrelated to selftest This cleanup all kprobe events code is not related to the selftest itself, and it can fail by the reason unrelated to this test. If the test is successful, the generated events are cleaned up. And if not, we cannot guarantee that the kprobe events will work correctly. So, anyway, there is no need to clean it up. Link: https://lore.kernel.org/all/171811265627.85078.16897867213512435822.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) commit 41051daa38a778dd6da49f854442260ebc029894 Author: Masami Hiramatsu (Google) Date: Tue Jun 11 22:30:46 2024 +0900 tracing/kprobe: Integrate test warnings into WARN_ONCE Cleanup the redundant WARN_ON_ONCE(cond) + pr_warn(msg) into WARN_ONCE(cond, msg). Also add some WARN_ONCE() for hitcount check. These WARN_ONCE() errors makes it easy to handle errors from ktest. Link: https://lore.kernel.org/all/171811264685.85078.8068819097047430463.stgit@devnote2/ Suggested-by: Steven Rostedt Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) commit 30addd1dc6cc4558ec7024448f04bc77d508fe7d Author: Jiri Olsa Date: Wed Jun 12 08:44:29 2024 +0900 selftests/bpf: Add uretprobe shadow stack test Adding uretprobe shadow stack test that runs all existing uretprobe tests with shadow stack enabled if it's available. Link: https://lore.kernel.org/all/20240611112158.40795-9-jolsa@kernel.org/ Acked-by: Andrii Nakryiko Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 9e7f74e64ae58688a33a6445e4f9a4e291d0824f Author: Jiri Olsa Date: Wed Jun 12 08:44:28 2024 +0900 selftests/bpf: Add uretprobe syscall call from user space test Adding test to verify that when called from outside of the trampoline provided by kernel, the uretprobe syscall will cause calling process to receive SIGILL signal and the attached bpf program is not executed. Link: https://lore.kernel.org/all/20240611112158.40795-8-jolsa@kernel.org/ Acked-by: Andrii Nakryiko Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit f42a58ffb8bb54e66bf9668a6be91477828c0c1b Author: Jiri Olsa Date: Wed Jun 12 08:44:28 2024 +0900 selftests/bpf: Add uretprobe syscall test for regs changes Adding test that creates uprobe consumer on uretprobe which changes some of the registers. Making sure the changed registers are propagated to the user space when the ureptobe syscall trampoline is used on x86_64. To be able to do this, adding support to bpf_testmod to create uprobe via new attribute file: /sys/kernel/bpf_testmod_uprobe This file is expecting file offset and creates related uprobe on current process exe file and removes existing uprobe if offset is 0. The can be only single uprobe at any time. The uprobe has specific consumer that changes registers used in ureprobe syscall trampoline and which are later checked in the test. Link: https://lore.kernel.org/all/20240611112158.40795-7-jolsa@kernel.org/ Acked-by: Andrii Nakryiko Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 3e8e25761a40194887336650673587191564e12c Author: Jiri Olsa Date: Wed Jun 12 08:44:28 2024 +0900 selftests/bpf: Add uretprobe syscall test for regs integrity Add uretprobe syscall test that compares register values before and after the uretprobe is hit. It also compares the register values seen from attached bpf program. Link: https://lore.kernel.org/all/20240611112158.40795-6-jolsa@kernel.org/ Acked-by: Andrii Nakryiko Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 29edd8b003db897d81d82d950785327f164650d3 Author: Jiri Olsa Date: Wed Jun 12 08:44:28 2024 +0900 selftests/x86: Add return uprobe shadow stack test Adding return uprobe test for shadow stack and making sure it's working properly. Borrowed some of the code from bpf selftests. Link: https://lore.kernel.org/all/20240611112158.40795-5-jolsa@kernel.org/ Acked-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit ff474a78cef5cb5f32be52fe25b78441327a2e7c Author: Jiri Olsa Date: Wed Jun 12 08:44:28 2024 +0900 uprobe: Add uretprobe syscall to speed up return probe Adding uretprobe syscall instead of trap to speed up return probe. At the moment the uretprobe setup/path is: - install entry uprobe - when the uprobe is hit, it overwrites probed function's return address on stack with address of the trampoline that contains breakpoint instruction - the breakpoint trap code handles the uretprobe consumers execution and jumps back to original return address This patch replaces the above trampoline's breakpoint instruction with new ureprobe syscall call. This syscall does exactly the same job as the trap with some more extra work: - syscall trampoline must save original value for rax/r11/rcx registers on stack - rax is set to syscall number and r11/rcx are changed and used by syscall instruction - the syscall code reads the original values of those registers and restore those values in task's pt_regs area - only caller from trampoline exposed in '[uprobes]' is allowed, the process will receive SIGILL signal otherwise Even with some extra work, using the uretprobes syscall shows speed improvement (compared to using standard breakpoint): On Intel (11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz) current: uretprobe-nop : 1.498 ± 0.000M/s uretprobe-push : 1.448 ± 0.001M/s uretprobe-ret : 0.816 ± 0.001M/s with the fix: uretprobe-nop : 1.969 ± 0.002M/s < 31% speed up uretprobe-push : 1.910 ± 0.000M/s < 31% speed up uretprobe-ret : 0.934 ± 0.000M/s < 14% speed up On Amd (AMD Ryzen 7 5700U) current: uretprobe-nop : 0.778 ± 0.001M/s uretprobe-push : 0.744 ± 0.001M/s uretprobe-ret : 0.540 ± 0.001M/s with the fix: uretprobe-nop : 0.860 ± 0.001M/s < 10% speed up uretprobe-push : 0.818 ± 0.001M/s < 10% speed up uretprobe-ret : 0.578 ± 0.000M/s < 7% speed up The performance test spawns a thread that runs loop which triggers uprobe with attached bpf program that increments the counter that gets printed in results above. The uprobe (and uretprobe) kind is determined by which instruction is being patched with breakpoint instruction. That's also important for uretprobes, because uprobe is installed for each uretprobe. The performance test is part of bpf selftests: tools/testing/selftests/bpf/run_bench_uprobes.sh Note at the moment uretprobe syscall is supported only for native 64-bit process, compat process still uses standard breakpoint. Note that when shadow stack is enabled the uretprobe syscall returns via iret, which is slower than return via sysret, but won't cause the shadow stack violation. Link: https://lore.kernel.org/all/20240611112158.40795-4-jolsa@kernel.org/ Suggested-by: Andrii Nakryiko Reviewed-by: Oleg Nesterov Reviewed-by: Masami Hiramatsu (Google) Acked-by: Andrii Nakryiko Signed-off-by: Oleg Nesterov Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 190fec72df4a5d4d98b1e783c333f471e5e5f344 Author: Jiri Olsa Date: Wed Jun 12 08:44:27 2024 +0900 uprobe: Wire up uretprobe system call Wiring up uretprobe system call, which comes in following changes. We need to do the wiring before, because the uretprobe implementation needs the syscall number. Note at the moment uretprobe syscall is supported only for native 64-bit process. Link: https://lore.kernel.org/all/20240611112158.40795-3-jolsa@kernel.org/ Reviewed-by: Oleg Nesterov Reviewed-by: Masami Hiramatsu (Google) Acked-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 1713b63a07a28a475de94664f783b4cfd2e4fa90 Author: Jiri Olsa Date: Wed Jun 12 08:44:27 2024 +0900 x86/shstk: Make return uprobe work with shadow stack Currently the application with enabled shadow stack will crash if it sets up return uprobe. The reason is the uretprobe kernel code changes the user space task's stack, but does not update shadow stack accordingly. Adding new functions to update values on shadow stack and using them in uprobe code to keep shadow stack in sync with uretprobe changes to user stack. Link: https://lore.kernel.org/all/20240611112158.40795-2-jolsa@kernel.org/ Acked-by: Andrii Nakryiko Acked-by: Rick Edgecombe Reviewed-by: Oleg Nesterov Fixes: 488af8ea7131 ("x86/shstk: Wire in shadow stack interface") Signed-off-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit 1b3c86eeea7594eeeb49b8d1c1db0a40f0ce7920 Author: Jeff Johnson Date: Wed Jun 12 08:44:27 2024 +0900 samples: kprobes: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kprobes/kprobe_example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kprobes/kretprobe_example.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lore.kernel.org/all/20240601-md-samples-kprobes-v1-1-b6a772353893@quicinc.com/ Signed-off-by: Jeff Johnson Signed-off-by: Masami Hiramatsu (Google) commit df216f57522c2ebe6e301f873195420de7992aa8 Author: Jeff Johnson Date: Wed Jun 12 08:44:27 2024 +0900 fprobe: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/fprobe/fprobe_example.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Link: https://lore.kernel.org/all/20240601-md-samples-fprobe-v1-1-5d256a956612@quicinc.com/ Signed-off-by: Jeff Johnson Signed-off-by: Masami Hiramatsu (Google) commit 2bac6caee94e25f59ee47e2d365d7e07465089ba Author: Celeste Liu Date: Thu May 30 19:19:52 2024 +0800 powerpc/configs: drop RT_GROUP_SCHED=y from ppc6xx_defconfig Commit 6e5f1537833a ("powerpc: Add a 6xx defconfig") said it was copied from fedore's ppc32 defconfig, but at least since 2015-06-10, Fedora has dropped this option.[1] 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.[1] 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. systemd also doesn't support it.[2] [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1229700 [2]: https://github.com/systemd/systemd/issues/13781#issuecomment-549164383 Signed-off-by: Celeste Liu Signed-off-by: Michael Ellerman Link: https://msgid.link/20240530111947.549474-12-CoelacanthusHex@gmail.com commit d5debddce5b637820825b82d2a5b9ed83e1a1e98 Author: Tony Luck Date: Tue Jun 11 10:28:16 2024 -0700 PCI/PM: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Link: https://lore.kernel.org/r/20240611172816.352828-1-tony.luck@intel.com Signed-off-by: Tony Luck Signed-off-by: Bjorn Helgaas commit ab99a87542f194f28e2364a42afbf9fb48b1c724 Author: Ofir Gal Date: Fri Jun 7 10:27:44 2024 +0300 md/md-bitmap: fix writing non bitmap pages __write_sb_page() rounds up the io size to the optimal io size if it doesn't exceed the data offset, but it doesn't check the final size exceeds the bitmap length. For example: page count - 1 page size - 4K data offset - 1M optimal io size - 256K The final io size would be 256K (64 pages) but md_bitmap_storage_alloc() allocated 1 page, the IO would write 1 valid page and 63 pages that happens to be allocated afterwards. This leaks memory to the raid device superblock. This issue caused a data transfer failure in nvme-tcp. The network drivers checks the first page of an IO with sendpage_ok(), it returns true if the page isn't a slabpage and refcount >= 1. If the page !sendpage_ok() the network driver disables MSG_SPLICE_PAGES. As of now the network layer assumes all the pages of the IO are sendpage_ok() when MSG_SPLICE_PAGES is on. The bitmap pages aren't slab pages, the first page of the IO is sendpage_ok(), but the additional pages that happens to be allocated after the bitmap pages might be !sendpage_ok(). That cause skb_splice_from_iter() to stop the data transfer, in the case below it hangs 'mdadm --create'. The bug is reproducible, in order to reproduce we need nvme-over-tcp controllers with optimal IO size bigger than PAGE_SIZE. Creating a raid with bitmap over those devices reproduces the bug. In order to simulate large optimal IO size you can use dm-stripe with a single device. Script to reproduce the issue on top of brd devices using dm-stripe is attached below (will be added to blktest). I have added some logs to test the theory: ... md: created bitmap (1 pages) for device md127 __write_sb_page before md_super_write offset: 16, size: 262144. pfn: 0x53ee === __write_sb_page before md_super_write. logging pages === pfn: 0x53ee, slab: 0 <-- the only page that allocated for the bitmap pfn: 0x53ef, slab: 1 pfn: 0x53f0, slab: 0 pfn: 0x53f1, slab: 0 pfn: 0x53f2, slab: 0 pfn: 0x53f3, slab: 1 ... nvme_tcp: sendpage_ok - pfn: 0x53ee, len: 262144, offset: 0 skbuff: before sendpage_ok() - pfn: 0x53ee skbuff: before sendpage_ok() - pfn: 0x53ef WARNING at net/core/skbuff.c:6848 skb_splice_from_iter+0x142/0x450 skbuff: !sendpage_ok - pfn: 0x53ef. is_slab: 1, page_count: 1 ... Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Ofir Gal Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240607072748.3182199-1-ofir.gal@volumez.com commit 3dee3b187499b317a6587e2b8e9bf3d5050e5288 Author: Sean Christopherson Date: Tue May 21 18:40:13 2024 -0700 KVM: x86: Drop now-superflous setting of l1tf_flush_l1d in vcpu_run() Now that KVM unconditionally sets l1tf_flush_l1d in kvm_arch_vcpu_load(), drop the redundant store from vcpu_run(). The flag is cleared only when VM-Enter is imminent, deep below vcpu_run(), i.e. barring a KVM bug, it's impossible for l1tf_flush_l1d to be cleared between loading the vCPU and calling vcpu_run(). Acked-by: Kai Huang Link: https://lore.kernel.org/r/20240522014013.1672962-7-seanjc@google.com Signed-off-by: Sean Christopherson commit ef2e18ef37501888161b791e134c4572b28dbd70 Author: Sean Christopherson Date: Tue May 21 18:40:12 2024 -0700 KVM: x86: Unconditionally set l1tf_flush_l1d during vCPU load Always set l1tf_flush_l1d during kvm_arch_vcpu_load() instead of setting it only when the vCPU is being scheduled back in. The flag is processed only when VM-Enter is imminent, and KVM obviously needs to load the vCPU before VM-Enter, so attempting to precisely set l1tf_flush_l1d provides no meaningful value. I.e. the flag _will_ be set either way, it's simply a matter of when. Acked-by: Kai Huang Link: https://lore.kernel.org/r/20240522014013.1672962-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 2a27c431400797e0044872283d1971aa372fcd3a Author: Sean Christopherson Date: Tue May 21 18:40:11 2024 -0700 KVM: Delete the now unused kvm_arch_sched_in() Delete kvm_arch_sched_in() now that all implementations are nops. Reviewed-by: Bibo Mao Acked-by: Kai Huang Link: https://lore.kernel.org/r/20240522014013.1672962-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 8fbb696a8f5372dbf32045c6a03675ee378d6476 Author: Sean Christopherson Date: Tue May 21 18:40:10 2024 -0700 KVM: x86: Fold kvm_arch_sched_in() into kvm_arch_vcpu_load() Fold the guts of kvm_arch_sched_in() into kvm_arch_vcpu_load(), keying off the recently added kvm_vcpu.scheduled_out as appropriate. Note, there is a very slight functional change, as PLE shrink updates will now happen after blasting WBINVD, but that is quite uninteresting as the two operations do not interact in any way. Acked-by: Kai Huang Link: https://lore.kernel.org/r/20240522014013.1672962-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 5d9c07febb8660fbcd6afc6d199e978eafc793ae Author: Sean Christopherson Date: Tue May 21 18:40:09 2024 -0700 KVM: VMX: Move PLE grow/shrink helpers above vmx_vcpu_load() Move VMX's {grow,shrink}_ple_window() above vmx_vcpu_load() in preparation of moving the sched_in logic, which handles shrinking the PLE window, into vmx_vcpu_load(). No functional change intended. Acked-by: Kai Huang Link: https://lore.kernel.org/r/20240522014013.1672962-3-seanjc@google.com Signed-off-by: Sean Christopherson commit d1ae567fb8b559401a9f65290bbb0cef5e987bfe Author: Sean Christopherson Date: Tue May 21 18:40:08 2024 -0700 KVM: Add a flag to track if a loaded vCPU is scheduled out Add a kvm_vcpu.scheduled_out flag to track if a vCPU is in the process of being scheduled out (vCPU put path), or if the vCPU is being reloaded after being scheduled out (vCPU load path). In the short term, this will allow dropping kvm_arch_sched_in(), as arch code can query scheduled_out during kvm_arch_vcpu_load(). Longer term, scheduled_out opens up other potential optimizations, without creating subtle/brittle dependencies. E.g. it allows KVM to keep guest state (that is managed via kvm_arch_vcpu_{load,put}()) loaded across kvm_sched_{out,in}(), if KVM knows the state isn't accessed by the host kernel. Forcing arch code to coordinate between kvm_arch_sched_{in,out}() and kvm_arch_vcpu_{load,put}() is awkward, not reusable, and relies on the exact ordering of calls into arch code. Adding scheduled_out also obviates the need for a kvm_arch_sched_out() hook, e.g. if arch code needs to do something novel when putting vCPU state. And even if KVM never uses scheduled_out for anything beyond dropping kvm_arch_sched_in(), just being able to remove all of the arch stubs makes it worth adding the flag. Link: https://lore.kernel.org/all/20240430224431.490139-1-seanjc@google.com Cc: Oliver Upton Reviewed-by: Oliver Upton Acked-by: Kai Huang Link: https://lore.kernel.org/r/20240522014013.1672962-2-seanjc@google.com Signed-off-by: Sean Christopherson commit c4201bd24f4ae80760ecdcf6c0d261ca867ba4ca Author: Yi Wang Date: Mon May 6 18:17:51 2024 +0800 KVM: s390: Don't re-setup dummy routing when KVM_CREATE_IRQCHIP Now that KVM sets up empty irq routing in kvm_create_vm(), there's no need to setup dummy routing when KVM_CREATE_IRQCHIP. Note, userspace could very theoretically use KVM_CREATE_IRQCHIP after KVM_SET_GSI_ROUTING to reset to empty IRQ routing, but it's extremely unlikely any VMM does that, e.g. the main reason s390 does anything for KVM_CREATE_IRQCHIP is to that s390 doesn't need to be special cased by the VMM. Signed-off-by: Yi Wang Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20240506101751.3145407-4-foxywang@tencent.com [sean: keep use_irqchip check, call out KVM_SET_GSI_ROUTING impact] Signed-off-by: Sean Christopherson commit e3c89f5dd11df791b55b320c3869a97414ef5d06 Author: Yi Wang Date: Mon May 6 18:17:50 2024 +0800 KVM: x86: Don't re-setup empty IRQ routing when KVM_CAP_SPLIT_IRQCHIP Now that KVM sets up empty IRQ routing during VM creation, don't recreate empty routing during KVM_CAP_SPLIT_IRQCHIP. Setting IRQ routes during KVM_CAP_SPLIT_IRQCHIP can result in 20+ milliseconds of delay due to the synchronize_srcu_expedited() call in kvm_set_irq_routing(). Note, the empty routing is guaranteed to be intact as KVM x86 only allows changing the IRQ routing after an in-kernel IRQCHIP has been created, and KVM_CAP_SPLIT_IRQCHIP is disallowed after creating an IRQCHIP. Signed-off-by: Yi Wang Link: https://lore.kernel.org/r/20240506101751.3145407-3-foxywang@tencent.com [sean: massage changelog, remove unused empty_routing array] Signed-off-by: Sean Christopherson commit fbe4a7e881d4408bfabbb4fd538f10fd686cd8ab Author: Yi Wang Date: Mon May 6 18:17:49 2024 +0800 KVM: Setup empty IRQ routing when creating a VM Setup empty IRQ routing during VM creation so that x86 and s390 don't need to set empty/dummy IRQ routing during KVM_CREATE_IRQCHIP (in future patches). Initializing IRQ routing before there are any potential readers allows KVM to avoid the synchronize_srcu() in kvm_set_irq_routing(), which can introduces 20+ milliseconds of latency in the VM creation path. Ensuring that all VMs have non-NULL IRQ routing also hardens KVM against misbehaving userspace VMMs, e.g. RISC-V dynamically instantiates its interrupt controller, but doesn't override kvm_arch_intc_initialized() or kvm_arch_irqfd_allowed(), and so can likely reach kvm_irq_map_gsi() without fully initialized IRQ routing. Signed-off-by: Yi Wang Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20240506101751.3145407-2-foxywang@tencent.com [sean: init refcount after IRQ routing, fix stub, massage changelog] Signed-off-by: Sean Christopherson commit c00d476cbcef4cbcf0c7db8944df7e98a36bdbfa Author: Xiaojian Du Date: Sat May 25 23:08:44 2024 +0800 cpufreq: amd-pstate: change cpu freq transition delay for some models Some of AMD ZEN4 APU/CPU have support for adjusting the CPU core clock more quickly and presicely according to CPU work loading. This is advertised by the Fast CPPC x86 feature. This change will only be effective in the *passive mode* of AMD pstate driver. From the test results of different transition delay values, 600us is chosen to make a balance between performance and power consumption. Some test results on AMD Ryzen 7840HS(Phoenix) APU: 1. Tbench (Energy less is better, Throughput more is better, PPW--Performance per Watt more is better) ============= =================== ============== =============== ============== =============== ============== =============== =============== Trans Delay Tbench governor:schedutil, 3-iterations average ============= =================== ============== =============== ============== =============== ============== =============== =============== 1000us Clients 1 2 4 8 12 16 32 Energy/Joules 2010 2804 8768 17171 16170 15132 15027 Throughput/(MB/s) 114 259 1041 3010 3135 4851 4605 PPW 0.0567 0.0923 0.1187 0.1752 0.1938 0.3205 0.3064 600us Clients 1 2 4 8 12 16 32 Energy/Joules 2115 (5.22%) 2388 (-14.84%) 10700(22.03%) 16716 (-2.65%) 15939 (-1.43%) 15053 (-0.52%) 15083 (0.37% ) Throughput/(MB/s) 122 (7.02%) 234 (-9.65% ) 1188 (14.12%) 3003 (-0.23%) 3143 (0.26% ) 4842 (-0.19%) 4603 (-0.04%) PPW 0.0576(1.59%) 0.0979(6.07% ) 0.111(-6.49%) 0.1796(2.51% ) 0.1971(1.70% ) 0.3216(0.34% ) 0.3051(-0.42%) ============= =================== ============== ================ ============= =============== ============== =============== =============== 2.Dbench (Energy less is better, Throughput more is better, PPW--Performance per Watt more is better) ============= =================== ============== =============== ============== =============== ============== =============== =============== Trans Delay Dbench governor:schedutil, 3-iterations average ============= =================== ============== =============== ============== =============== ============== =============== =============== 1000us Clients 1 2 4 8 12 16 32 Energy/Joules 4890 3779 3567 5157 5611 6500 8163 Throughput/(MB/s) 327 167 220 577 775 938 1397 PPW 0.0668 0.0441 0.0616 0.1118 0.1381 0.1443 0.1711 600us Clients 1 2 4 8 12 16 32 Energy/Joules 4915 (0.51%) 4912 (29.98%) 3506 (-1.71%) 4907 (-4.85% ) 5011 (-10.69%) 5672 (-12.74%) 8141 (-0.27%) Throughput/(MB/s) 348 (6.42%) 284 (70.06%) 220 (0.00% ) 518 (-10.23%) 712 (-8.13% ) 854 (-8.96% ) 1475 (5.58% ) PPW 0.0708(5.99%) 0.0578(31.07%) 0.0627(1.79% ) 0.1055(-5.64% ) 0.142(2.82% ) 0.1505(4.30% ) 0.1811(5.84% ) ============= =================== ============== =============== ============== =============== ============== =============== =============== 3.Hackbench(less time is better) ============= =========================== ========================== hackbench governor:schedutil ============= =========================== ========================== Trans Delay Process Mode Ave time(s) Thread Mode Ave time(s) 1000us 14.484 14.484 600us 14.418(-0.46%) 15.41(+6.39%) ============= =========================== ========================== 4.Perf_sched_bench(less time is better) ============= =================== ============== ============== ============== =============== =============== ============= Trans Delay perf_sched_bench governor:schedutil ============= =================== ============== ============== ============== =============== =============== ============= 1000us Groups 1 2 4 8 12 24 AveTime(s) 1.64 2.851 5.878 11.636 16.093 26.395 600us Groups 1 2 4 8 12 24 AveTime(s) 1.69(3.05%) 2.845(-0.21%) 5.843(-0.60%) 11.576(-0.52%) 16.092(-0.01%) 26.32(-0.28%) ============= ================== ============== ============== ============== =============== =============== ============== 5.Sysbench(higher is better) ============= ================== ============== ================= ============== ================ =============== ================= Sysbench governor:schedutil ============= ================== ============== ================= ============== ================ =============== ================= 1000us Thread 1 2 4 8 12 24 Ave events 6020.98 12273.39 24119.82 46171.57 47074.37 47831.72 600us Thread 1 2 4 8 12 24 Ave events 6154.82(2.22%) 12271.63(-0.01%) 24392.5(1.13%) 46117.64(-0.12%) 46852.19(-0.47%) 47678.92(-0.32%) ============= ================== ============== ================= ============== ================ =============== ================= In conclusion, a shorter transition delay of cpu clock will make a quite positive effect to improve PPW on Dbench test, in the meanwhile, keep stable performance on Tbench, Hackbench, Perf_sched_bench and Sysbench. Signed-off-by: Xiaojian Du Reviewed-by: Perry Yuan Acked-by: Mario Limonciello commit c7107750b2ffaa4950faa53f84f9c9aa2caac89a Author: Perry Yuan Date: Sat May 25 23:08:43 2024 +0800 x86/cpufeatures: Add AMD FAST CPPC feature flag Some AMD Zen 4 processors support a new feature FAST CPPC which allows for a faster CPPC loop due to internal architectural enhancements. The goal of this faster loop is higher performance at the same power consumption. Reference: See the page 99 of PPR for AMD Family 19h Model 61h rev.B1, docID 56713 Signed-off-by: Perry Yuan Signed-off-by: Xiaojian Du Reviewed-by: Borislav Petkov (AMD) commit 3ff1180a39fbc43ae69d4238e6922c57e3278910 Author: Andrew Davis Date: Mon Jun 10 08:53:13 2024 -0500 gpiolib: Remove data-less gpiochip_add() function GPIO chips should be added with driver-private data associated with the chip. If none is needed, NULL can be used. All users already do this except one, fix that here. With no more users of the base gpiochip_add() we can drop this function so no more users show up later. Signed-off-by: Andrew Davis Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240610135313.142571-1-afd@ti.com Signed-off-by: Bartosz Golaszewski commit 413427153921ac8263d3a516bfbdaa42fa058085 Author: Bartosz Golaszewski Date: Mon Jun 10 16:05:48 2024 +0200 gpio: sim: use devm_mutex_init() Drop the hand-coded devres action callback for destroying the mutex in favor of devm_mutex_init(). Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240610140548.35358-4-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit b5f5cbee764e2faffe5241445830a5e43084f3a0 Author: Bartosz Golaszewski Date: Mon Jun 10 16:05:47 2024 +0200 gpio: sim: drop kernel.h include We included kernel.h for ARRAY_SIZE() which has since been moved into its own header. Use it instead. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240610140548.35358-3-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 8a05de23adabc4d982dfdeabc184a267f7a50491 Author: Bartosz Golaszewski Date: Mon Jun 10 16:05:46 2024 +0200 gpio: sim: use device_match_name() instead of strcmp(dev_name(... Use the dedicated helper for comparing device names against strings. While at it: reshuffle the code a bit for less indentation. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240610140548.35358-2-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 72196c20c38b50c4293696377145e6c4ad9a7c67 Author: Rafael J. Wysocki Date: Tue May 28 18:54:11 2024 +0200 thermal: core: Avoid calling .trip_crossed() for critical and hot trips Invoking the governor .trip_crossed() callback for critical and hot trips is pointless because they are handled directly by the core, so make thermal_governor_trip_crossed() avoid doing that. Signed-off-by: Rafael J. Wysocki commit 2c637af8a74d9a2a52ee5456a75dd29c8cb52da5 Author: Rafael J. Wysocki Date: Tue May 28 18:54:01 2024 +0200 thermal: gov_bang_bang: Drop unnecessary cooling device target state checks Some cooling device target state checks in bang_bang_control() done before setting the new target state are not necessary after recent changes, so drop them. Also avoid updating the target state before checking it for unexpected values. Signed-off-by: Rafael J. Wysocki commit a52641bc6293a24f25956a597e7f32148b0e2bb8 Author: Rafael J. Wysocki Date: Tue May 28 18:52:13 2024 +0200 thermal: trip: Use READ_ONCE() for lockless access to trip properties When accessing trip temperature and hysteresis without locking, it is better to use READ_ONCE() to prevent compiler optimizations possibly affecting the read from being applied. Of course, for the READ_ONCE() to be effective, WRITE_ONCE() needs to be used when updating their values. Signed-off-by: Rafael J. Wysocki commit 893bae92237d824334d68d6b67222aaf32e41458 Author: Rafael J. Wysocki Date: Tue May 28 18:51:11 2024 +0200 thermal: trip: Make thermal_zone_set_trips() use trip thresholds Modify thermal_zone_set_trips() to use trip thresholds instead of computing the low temperature for each trip to avoid deriving both the high and low temperature levels from the same trip (which may happen if the zone temperature falls into the hysteresis range of one trip). Accordingly, make __thermal_zone_device_update() call thermal_zone_set_trips() later, when threshold values have been updated for all trips. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 28d5cc12671c8b23d928128d8d4ced586b873e5f Author: Rafael J. Wysocki Date: Fri Jun 7 09:33:53 2024 +0200 thermal: trip: Rename __thermal_zone_set_trips() to thermal_zone_set_trips() Drop the pointless double underline prefix from the function name as per the subject. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit f41f23b0cae1d069c680dd9e5e2cd42db8ff6dfc Author: Rafael J. Wysocki Date: Tue May 28 17:00:51 2024 +0200 thermal: trip: Use common set of trip type names Use the same set of trip type names in sysfs and in the thermal debug code output. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 8f9025baf66ff4781ae3d40f9bc457b0a022b1a3 Author: Rafael J. Wysocki Date: Tue May 28 16:59:55 2024 +0200 thermal/debugfs: Move some statements from under thermal_dbg->lock The tz_dbg local variable assignments in thermal_debug_tz_trip_up(), thermal_debug_tz_trip_down(), and thermal_debug_update_trip_stats() need not be carried out under thermal_dbg->lock, so move them from under that lock (to avoid possible future confusion). While at it, reorder local variable definitions in thermal_debug_tz_trip_up() for more clarity. No functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 881c084fc980d05d05dceac4d789a473b42e177d Author: Rafael J. Wysocki Date: Tue May 28 16:58:56 2024 +0200 thermal/debugfs: Compute maximum temperature for mitigation episode as a whole Notice that the maximum temperature above the trip point must be the same for all of the trip points involved in a given mitigation episode, so it need not be computerd for each of them separately. It is sufficient to compute the maximum temperature for the mitigation episode as a whole and print it accordingly, so do that. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 993c87047ddebb9cf922c489199d3a402a440979 Author: Rafael J. Wysocki Date: Tue May 28 16:57:13 2024 +0200 thermal/debugfs: Adjust check for trips without statistics in tze_seq_show() Initialize the trip_temp field in struct trip_stats to THERMAL_TEMP_INVALID and adjust the check for trips without statistics in tze_seq_show() to look at that field instead of comparing min and max. This will mostly be useful to simplify subsequent changes. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit ea6a3c52021e552d904d0b1b67ef695bc5c3a54a Author: Rafael J. Wysocki Date: Tue May 28 16:55:53 2024 +0200 thermal/debugfs: Fix up units in "mitigations" files Print temperature units as m°C rather than °mC (the meaning of which is unclear) and add time unit to the duration column. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit cc86c139ae41a6107955db0b4c79d549cbccb4a6 Author: Rafael J. Wysocki Date: Tue May 28 16:55:00 2024 +0200 thermal/debugfs: Print mitigation timestamp value in milliseconds Because mitigation episode duration is printed in milliseconds, there is no reason to print timestamp information for mitigation episodes in smaller units which also makes it somewhat harder to interpret the numbers. Print it in milliseconds for consistency. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 9b73b5052ae841037682da93a17f80f8ed57788d Author: Rafael J. Wysocki Date: Tue May 28 16:53:47 2024 +0200 thermal/debugfs: Do not extend mitigation episodes beyond system resume Because thermal zone handling by the thermal core is started from scratch during resume from system-wide suspend, prevent the debug code from extending mitigation episodes beyond that point by ending the mitigation episode currently in progress, if any, for each thermal zone. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 8b95bed0cec98c9ff7a72acd6227c427a2b4f0a9 Author: Rafael J. Wysocki Date: Tue May 28 16:52:50 2024 +0200 thermal/debugfs: Use helper to update trip point overstepping duration Add a helper for updating trip point overstepping duration to be called from thermal_debug_tz_trip_down(). Subsequently, it will also be used during resume from system-wide suspend. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 5a16da9cfb40d45e797df3ae1523ac64fe0b98ae Author: Aditya Kumar Singh Date: Tue Jun 11 09:42:33 2024 +0300 wifi: ath12k: handle symlink cleanup for per pdev debugfs dentry Whenever per pdev debugfs directory is created, a symlink to it is also placed in ieee80211/phy* directory. During clean up of per pdev debugfs, this symlink also needs to be cleaned up. Add changes to clean up the symlink whenever the per pdev debugfs is removed. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529043043.2488031-4-quic_adisi@quicinc.com commit 4e1eff38d37a27328251ea47602703b811a028e1 Author: Aditya Kumar Singh Date: Tue Jun 11 09:42:32 2024 +0300 wifi: ath12k: unregister per pdev debugfs During normal de-initialization path or if any error happens while registering the hardware, there is no support to unregister the per pdev debugfs. Add support for the same. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529043043.2488031-3-quic_adisi@quicinc.com commit 8dd65ccbdf91e2fe3ab6e4da158b38f81746c3b4 Author: Aditya Kumar Singh Date: Tue Jun 11 09:42:32 2024 +0300 wifi: ath12k: fix per pdev debugfs registration Function ath12k_debugfs_register() is called once inside the function ath12k_mac_hw_register(). However, with single wiphy model, there could be multiple pdevs registered under single hardware. Hence, need to register debugfs for each one of them. Move the caller inside the loop which iterates over all underlying pdevs. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: f8bde02a26b9 ("wifi: ath12k: initial debugfs support") Signed-off-by: Aditya Kumar Singh Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529043043.2488031-2-quic_adisi@quicinc.com commit d2b0ca38d362ebf16ca79cd7f309d5bb8b581deb Author: Baochen Qiang Date: Tue Jun 11 09:42:34 2024 +0300 wifi: ath11k: fix wrong handling of CCMP256 and GCMP ciphers Currently for CCMP256, GCMP128 and GCMP256 ciphers, in ath11k_install_key() IEEE80211_KEY_FLAG_GENERATE_IV_MGMT is not set. And in ath11k_mac_mgmt_tx_wmi() a length of IEEE80211_CCMP_MIC_LEN is reserved for all ciphers. This results in unexpected management frame drop in case either of above 3 ciphers is used. The reason is, without IEEE80211_KEY_FLAG_GENERATE_IV_MGMT set, mac80211 will not generate CCMP/GCMP headers in frame for ath11k. Also MIC length reserved is wrong. Such frame is dropped later by hardware: ath11k_pci 0000:5a:00.0: mac tx mgmt frame, buf id 0 ath11k_pci 0000:5a:00.0: mgmt tx compl ev pdev_id 1, desc_id 0, status 1 From user point of view, we have observed very low throughput due to this issue: action frames are all dropped so ADDBA response from DUT never reaches AP. AP can not use aggregation thus throughput is low. Fix this by setting IEEE80211_KEY_FLAG_GENERATE_IV_MGMT flag and by reserving proper MIC length for those ciphers. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Reported-by: Yaroslav Isakov Tested-by: Yaroslav Isakov Closes: https://lore.kernel.org/all/CADS+iDX5=JtJr0apAtAQ02WWBxgOFEv8G063vuGYwDTC8AVZaw@mail.gmail.com Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240605014826.22498-1-quic_bqiang@quicinc.com commit 9e32058ae62f1d8fdf1ee7b177a1307f90335fbd Author: Karthikeyan Periyasamy Date: Tue Jun 11 09:42:33 2024 +0300 wifi: ath12k: avoid unnecessary MSDU drop in the Rx error process Currently, in the Rx error processing handler, once an MSDU drop is detected, the subsequent MSDUs get unintentionally dropped due to the previous drop flag being retained across all MSDU processing, leading to the discarding of valid MSDUs. To resolve this issue, the drop flag should be reset to false before processing each descriptor. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240604062641.2956288-1-quic_periyasa@quicinc.com commit 65a8368bf34e51b4499205658d7015d40e5a3f80 Author: Wolfram Sang Date: Tue Jun 11 09:42:33 2024 +0300 wifi: ath11k: use 'time_left' variable with wait_event_timeout() There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_event_timeout() causing patterns like: timeout = wait_event_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the code self explaining. Fix to the proper variable type 'long' while here. Signed-off-by: Wolfram Sang Signed-off-by: Kalle Valo Link: https://msgid.link/20240603091541.8367-2-wsa+renesas@sang-engineering.com commit 98b303c9bf05dae932efbd71e18d81f6c64f20d8 Author: Kenta Tada Date: Fri Jun 7 20:17:04 2024 +0900 bpftool: Query only cgroup-related attach types When CONFIG_NETKIT=y, bpftool-cgroup shows error even if the cgroup's path is correct: $ bpftool cgroup tree /sys/fs/cgroup CgroupPath ID AttachType AttachFlags Name Error: can't query bpf programs attached to /sys/fs/cgroup: No such device or address >From strace and kernel tracing, I found netkit returned ENXIO and this command failed. I think this AttachType(BPF_NETKIT_PRIMARY) is not relevant to cgroup. bpftool-cgroup should query just only cgroup-related attach types. v2->v3: - removed an unnecessary check v1->v2: - used an array of cgroup attach types Signed-off-by: Kenta Tada Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20240607111704.6716-1-tadakentaso@gmail.com Signed-off-by: Alexei Starovoitov commit 53d7c99719e29819eaeb9f373d262a6b56ea7cce Author: Baochen Qiang Date: Tue Jun 11 09:42:33 2024 +0300 wifi: ath11k: fix RCU documentation in ath11k_mac_op_ipv6_changed() Current documentation on RCU in ath11k_mac_op_ipv6_changed() says: /* Note: read_lock_bh() calls rcu_read_lock() */ read_lock_bh(&idev->lock); This is wrong because without enabling CONFIG_PREEMPT_RT rcu_read_lock() is not called by read_lock_bh(). The reason why current code works even in a CONFIG_PREEMPT_RT=n kernel is because atomic_notifier_call_chain() already does that for us, see: int atomic_notifier_call_chain() { ... rcu_read_lock(); ret = notifier_call_chain(&nh->head, val, v, -1, NULL); rcu_read_unlock(); ... } and backtrace: ath11k_mac_op_ipv6_changed ieee80211_ifa6_changed notifier_call_chain atomic_notifier_call_chain So update the comment to make it correct. This is found during code review, compile tested only. Fixes: feafe59c8975 ("wifi: ath11k: use RCU when accessing struct inet6_dev::ac_list") Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240531022411.6543-1-quic_bqiang@quicinc.com commit 8b2a12749b08726f006303814ecc1c37024d3617 Author: Baochen Qiang Date: Tue Jun 11 09:42:33 2024 +0300 wifi: ath12k: fix ACPI warning when resume Currently ACPI notification handler is installed when driver loads and only gets removed when driver unloads. During resume after firmware is reloaded, ath12k tries to install it by default. Since it is installed already, ACPI subsystem rejects it and returns an error: [ 83.094206] ath12k_pci 0000:03:00.0: failed to install DSM notify callback: 7 Fix it by removing that handler when going to suspend. This also avoid any possible ACPI call to firmware before firmware is reloaded/reinitialized. Note ab->acpi also needs to be cleared in ath12k_acpi_stop() such that we are in a clean state when ACPI structures are reinitialized in ath12k_acpi_start(). Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 576771c9fa21 ("wifi: ath12k: ACPI TAS support") Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240531024000.9291-1-quic_bqiang@quicinc.com commit 4938ba733ee2147724c4b10025fe0d349d3b605f Author: Rameshkumar Sundaram Date: Tue Jun 11 09:42:31 2024 +0300 wifi: ath12k: modify remain on channel for single wiphy When multiple radios are advertised as a single wiphy which supports various bands, vdev creation for the vif is deferred until channel is assigned to it. If a remain on channel (RoC) request is received from mac80211, select the corresponding radio (ar) based on channel and create a vdev on that radio to initiate an RoC scan. Note that on RoC completion this vdev is not deleted. If a new RoC/hw scan request is seen on that same vif for a different band the vdev will be deleted and created on the new radio supporting the request. Also if the RoC scan is requested when the vdev is in started state, no switching to new radio is allowed and RoC request can be accepted only on channels within same radio. 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: Rameshkumar Sundaram Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240528082739.1226758-1-quic_ramess@quicinc.com commit 5ce02000eb29db98dc2909b1a346f68acdd9db80 Author: Alexander Aring Date: Mon Jun 3 17:55:58 2024 -0400 md-cluster: use DLM_LSFL_SOFTIRQ for dlm_new_lockspace() Use the recently added DLM_LSFL_SOFTIRQ flag in dlm_new_lockspace(), signalling the ability to handle callbacks being run from softirq context. The md-cluster callback functions only call complete(), which is suitable for softirq. This should make dlm lock request completions more efficient by avoiding the workqueue context switch. Acked-by: Heming Zhao Acked-by: Song Liu Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f8f530ba429a334fe1a28714787f8a98e90777ec Author: Dan Carpenter Date: Thu May 9 14:02:11 2024 +0300 dmaengine: qcom: gpi: clean up the IRQ disable/enable in gpi_reset_chan() The calls write_lock/unlock_irq() disables and re-enables the IRQs. Calling spin_lock_irqsave() and spin_lock_restore() when the IRQs are already disabled doesn't do anything and just makes the code confusing. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/8be473eb-65e0-42b4-b574-e61c3a7f62d8@moroto.mountain Signed-off-by: Vinod Koul commit 8ddad558997002ce67980e30c9e8dfaa696e163b Author: Joy Zou Date: Fri May 10 11:09:34 2024 +0800 dmaengine: fsl-edma: change the memory access from local into remote mode in i.MX 8QM Fix the issue where MEM_TO_MEM fail on i.MX8QM due to the requirement that both source and destination addresses need pass through the IOMMU. Typically, peripheral FIFO addresses bypass the IOMMU, necessitating only one of the source or destination to go through it. Set "is_remote" to true to ensure both source and destination addresses pass through the IOMMU. iMX8 Spec define "Local" and "Remote" bus as below. Local bus: bypass IOMMU to directly access other peripheral register, such as FIFO. Remote bus: go through IOMMU to access system memory. The test fail log as follow: [ 66.268506] dmatest: dma0chan0-copy0: result #1: 'test timed out' with src_off=0x100 dst_off=0x80 len=0x3ec0 (0) [ 66.278785] dmatest: dma0chan0-copy0: summary 1 tests, 1 failures 0.32 iops 4 KB/s (0) Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support") Signed-off-by: Joy Zou Cc: stable@vger.kernel.org Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20240510030959.703663-1-joy.zou@nxp.com Signed-off-by: Vinod Koul commit 7dcf9e82e0a05cf7b7abccd0ce1b4ca598d70f08 Author: Dr. David Alan Gilbert Date: Sat May 18 00:40:24 2024 +0100 dmaengine: qcom: gpi: remove unused struct 'reg_info' 'reg_info' was never used since it's initial commit 5d0c3533a19f ("dmaengine: qcom: Add GPI dma driver") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Bryan O'Donoghue Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20240517234024.231477-1-linux@treblig.org Signed-off-by: Vinod Koul commit d1c6524e3ebe6bc1d0110e9dd85c84006f2c3289 Author: Dr. David Alan Gilbert Date: Thu May 16 16:28:25 2024 +0100 dmaengine: moxart-dma: remove unused struct 'moxart_filter_data' Remove unused struct 'moxart_filter_data' Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20240516152825.262578-1-linux@treblig.org Signed-off-by: Vinod Koul commit 671bc17fc4d14fed69ee86e1f7c2c972010c49ac Author: Frank Li Date: Tue May 28 12:37:34 2024 -0400 dt-bindings: fsl-qdma: Convert to yaml format Convert binding doc from txt to yaml. Re-order interrupt-names to align example. Add #dma-cell in example. Change 'reg' in example to 32bit address. Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240528163734.2471268-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit bb160502a45440d2b52c189d5a81365c01b8d494 Author: Frank Li Date: Mon Jun 3 11:23:16 2024 -0400 dmaengine: fsl-edma: remove redundant "idle" field from fsl_chan The 'idle' in fsl_chan is redundant as it's equivalent to 'status != DMA_IN_PROGRESS'. So remote it to simple code logic. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240603152317.69917-2-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 44eb827264de4f14d8317692441e13f5e2aadbf2 Author: Frank Li Date: Mon Jun 3 11:23:15 2024 -0400 dmaengine: fsl-edma: request per-channel IRQ only when channel is allocated The edma feature individual IRQs for each DMA channel at some devices. Given the presence of numerous eDMA instances, each with multiple channels, IRQ request during probe results in an extensive list at /proc/interrupts. However, a significant portion of these channels remains unused by the system. Request irq only when a DMA client driver requests a DMA channel. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240603152317.69917-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 49b1c21ff815168eca44e81ab0612b1f00759efb Author: Amelie Delaunay Date: Fri May 31 17:07:11 2024 +0200 dmaengine: stm32-dma3: defer channel registration to specify channel name On STM32 DMA3, channels can be reserved, so they are non available for Linux. This non-availability creates a mismatch between dma_chan id and DMA3 channel id. Use dma_async_device_channel_register() to register the channels after controller registration and change the default channel name, so that it can match the name in the Reference Manual and ease requesting a channel thanks to its name. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-12-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 10b8e0fd3f7234a38db2c8d2c8dec0bd6eeede44 Author: Amelie Delaunay Date: Fri May 31 17:07:10 2024 +0200 dmaengine: add channel device name to channel registration Channel device name is used for sysfs, but also by dmatest filter function. With dynamic channel registration, channels can be registered after dma controller registration. Users may want to have specific channel names. If name is NULL, the channel name relies on previous implementation, dmachan. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-11-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 2088473802ab9641114681bee92ba902bccdc19b Author: Amelie Delaunay Date: Fri May 31 17:07:09 2024 +0200 dmaengine: stm32-dma3: improve residue granularity Implement own device_tx_status ops to compute the residue with a finer granularity, up to bytes. STM32 DMA3 has a bitfield, BNDT, in CxTR1 register which reflects the number of bytes read from the source. It also has a bitfield, FIFOL, in CxSR register which reflects the FIFO level in units of programmed destination data width. The channel is briefly suspended to get a coherent snapshot of registers. It is possible to correct the fifo level when packing/unpacking is enabled with destination increment. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-10-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit b62a13071cffad03690ee19656248077cb388a14 Author: Amelie Delaunay Date: Fri May 31 17:07:08 2024 +0200 dmaengine: stm32-dma3: add device_pause and device_resume ops STM32 DMA3 controller is able to suspend an ongoing transfer (the transfer is suspended after the ongoing burst is flushed to the destination) and resume it from the point it was suspended. No need to reconfigure any register. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-9-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit b3b893a937764731c41423aab4cc0c1a6821e31e Author: Amelie Delaunay Date: Fri May 31 17:07:07 2024 +0200 dmaengine: stm32-dma3: add DMA_MEMCPY capability Add DMA_MEMCPY capability and relative device_prep_dma_memcpy ops with stm32_dma3_prep_dma_memcpy(). It reuses stm32_dma3_chan_prep_hw() and stm32_dma3_prep_hwdesc() helpers. As this driver relies on both device_config and of_xlate ops to pre-configure the channel for transfer, add a new helper (stm32_dma3_init_chan_config_for_memcpy) in case the channel is used without being pre-configured (with DT and/or dmaengine_slave_config()). Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-8-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 08ea31024ab9cd512c4a897bd1afd2a5820c53e6 Author: Amelie Delaunay Date: Fri May 31 17:07:06 2024 +0200 dmaengine: stm32-dma3: add DMA_CYCLIC capability Add DMA_CYCLIC capability and relative device_prep_dma_cyclic ops with stm32_dma3_prep_dma_cyclic(). It reuses stm32_dma3_chan_prep_hw() and stm32_dma3_chan_prep_hwdesc() helpers. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-7-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit f561ec8b2b33da6a07cf211e43c8eb35b2dd97a2 Author: Amelie Delaunay Date: Fri May 31 17:07:05 2024 +0200 dmaengine: Add STM32 DMA3 support STM32 DMA3 driver supports the 3 hardware configurations of the STM32 DMA3 controller: - LPDMA (Low Power): 4 channels, no FIFO - GPDMA (General Purpose): 16 channels, FIFO from 8 to 32 bytes - HPDMA (High Performance): 16 channels, FIFO from 8 to 256 bytes Hardware configuration of the channels is retrieved from the hardware configuration registers. The client can specify its channel requirements through device tree. STM32 DMA3 channels can be individually reserved either because they are secure, or dedicated to another CPU. Indeed, channels availability depends on Resource Isolation Framework (RIF) configuration. RIF grants access to buses with Compartment ID (CID) filtering, secure and privilege level. It also assigns DMA channels to one or several processors. DMA channels used by Linux should be CID-filtered and statically assigned to CID1 or shared with other CPUs but using semaphore. In case CID filtering is not configured, dma-channel-mask property can be used to specify available DMA channels to the kernel, otherwise such channels will be marked as reserved and can't be used by Linux. STM32 DMA3 is a new STM32 DMA controller, not a new version of an existing one. stm32-dma is not considered for reuse because register layout is completely different and doesn't rely on descriptors mechanism. stm32-mdma is based on descriptors mechanism but there are significant differences in register layout and descriptors structure. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-6-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit a204f64d9f834bdf7085c617aed229eb7500e331 Author: Amelie Delaunay Date: Fri May 31 17:07:04 2024 +0200 dt-bindings: dma: Document STM32 DMA3 controller bindings The STM32 DMA3 is a Direct Memory Access controller with different features depending on its hardware configuration. The channels have not the same capabilities, some have a larger FIFO, so their performance is higher. This patch describes STM32 DMA3 bindings, used to select a channel that fits client requirements, and to pre-configure the channel depending on the client needs. Reviewed-by: Rob Herring (Arm) Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-5-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 81d09bb5249e5f844ee342cc1419e97fc9108cda Author: Amelie Delaunay Date: Fri May 31 17:07:03 2024 +0200 MAINTAINERS: Add entry for STM32 DMA controllers drivers and documentation Add an entry to make myself a maintainer of STM32 DMA controllers drivers and documentation. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-4-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 76178a2c49a7c01ef684b0d689f3da4fd12e0154 Author: Amelie Delaunay Date: Fri May 31 17:07:02 2024 +0200 dmaengine: stm32: New directory for STM32 DMA controllers drivers Gather the STM32 DMA controllers under drivers/dma/stm32/ Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-3-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 8494ae75dde4495c73b7425543138d088133f75f Author: Amelie Delaunay Date: Fri May 31 17:07:01 2024 +0200 dt-bindings: dma: New directory for STM32 DMA controllers bindings Gather the STM32 DMA controllers bindings under ./dma/stm32/. Then fix reference to old path in spi/st,stm32-spi.yaml: update the dmas property description by referring to all STM32 DMA controllers bindings. Acked-by: Rob Herring (Arm) Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20240531150712.2503554-2-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 9b9247397e2e20016031e59f76dae563b79b6ee2 Author: Dmitry Torokhov Date: Mon Jun 10 09:43:00 2024 -0700 Input: adxl34x - switch to using "guard" notation Switch to using guard(mutex)() notation to acquire and automatically release mutexes. Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240610164301.1048482-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 985addc13304639876c2ddbcc1c149007c5d67ff Author: Dmitry Torokhov Date: Mon Jun 10 09:42:59 2024 -0700 Input: adxl34x - switch to using managed resources Switch the driver to use managed resources to simplify error handling. Link: https://lore.kernel.org/r/20240610164301.1048482-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 8f275fc73dd6ff78c6041aa4c138410bf2c95ce6 Author: Dmitry Torokhov Date: Mon Jun 10 09:42:58 2024 -0700 Input: adxl34x - use input_set_capability() Switch to using input_set_capability() instead of using __set_bit() to make clear what exactly kinds of events (EV_KEY, EV_REL) are being declared. Also drop redundant calls setting EV_ABS and ABS_X|Y|Z bits as that is taken care by input_set_abs_params(). Link: https://lore.kernel.org/r/20240610164301.1048482-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 6f7e4f81f738ac765318c54097a6235203073049 Author: Dmitry Torokhov Date: Mon Jun 10 09:42:57 2024 -0700 Input: adxl34x - use device core to create driver-specific device attributes Instead of creating driver-specific device attributes with sysfs_create_group() have device core do this by setting up dev_groups pointer in the driver structure. Reviewed-by: Nuno Sa Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20240610164301.1048482-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 68bde2a67a6d6e5a2b8e1a64bad51dd8c3975256 Author: Alexander Aring Date: Mon Jun 3 17:55:56 2024 -0400 dlm: implement LSFL_SOFTIRQ_SAFE When a lockspace user allows it, run callback functions directly from softirq context, instead of queueing callbacks to be run from the dlm_callback workqueue context. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f328a26eeb5380bc74e58cb9c3280a4908452df7 Author: Alexander Aring Date: Mon Jun 3 17:55:55 2024 -0400 dlm: introduce DLM_LSFL_SOFTIRQ_SAFE Introduce a new external lockspace flag DLM_LSFL_SOFTIRQ_SAFE. A lockspace user will set this flag if it can handle dlm running the callback functions from softirq context. When not set, dlm will continue to run callback functions from the dlm_callback workqueue. The new lockspace flag cannot be used for user space lockspaces, so a uapi placeholder definition is used for the new flag value. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit d3d85e9ad55b973eff3641dd3a61990a2c810785 Author: Alexander Aring Date: Mon Jun 3 17:55:54 2024 -0400 dlm: use LSFL_FS to check for kernel lockspace The existing external lockspace flag DLM_LSFL_FS is now also saved as an internal flag LSFL_FS, so it can be checked from other code locations which want to know if a lockspace is used from the kernel or user space. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 2fa26ca8b786888673689ccc9da6094150939982 Author: Aleksandr Mishin Date: Thu Jun 6 10:52:04 2024 +0300 remoteproc: imx_rproc: Skip over memory region when node value is NULL In imx_rproc_addr_init() "nph = of_count_phandle_with_args()" just counts number of phandles. But phandles may be empty. So of_parse_phandle() in the parsing loop (0 < a < nph) may return NULL which is later dereferenced. Adjust this issue by adding NULL-return check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Aleksandr Mishin Reviewed-by: Peng Fan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240606075204.12354-1-amishin@t-argos.ru [Fixed title to fit within the prescribed 70-75 charcters] Signed-off-by: Mathieu Poirier commit 3b65a692a5c78d597d23a2838e91d7bf8ef49291 Author: Sean Christopherson Date: Fri Jun 7 17:08:19 2024 -0700 KVM: x86/pmu: Add a helper to enable bits in FIXED_CTR_CTRL Add a helper, intel_pmu_enable_fixed_counter_bits(), to dedup code that enables fixed counter bits, i.e. when KVM clears bits in the reserved mask used to detect invalid MSR_CORE_PERF_FIXED_CTR_CTRL values. No functional change intended. Cc: Dapeng Mi Reviewed-by: Dapeng Mi Link: https://lore.kernel.org/r/20240608000819.3296176-1-seanjc@google.com Signed-off-by: Sean Christopherson commit f776e41fdcc4141876ef6f297318ab04c2382eb7 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:17:01 2024 +0200 x86/alternative: Replace the old macros Now that the new macros have been gradually put in place, replace the old ones. Leave the new label numbers starting at 7xx as a hint that the new nested alternatives are being used now. Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-15-bp@kernel.org commit 1a6ade825079243f08846870561aca0e1fdfb803 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:17:00 2024 +0200 x86/alternative: Convert the asm ALTERNATIVE_3() macro Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-14-bp@kernel.org commit 08a621fcf4a4a4d765315ffe6a28f5d31e8237b2 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:59 2024 +0200 x86/alternative: Convert the asm ALTERNATIVE_2() macro Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-13-bp@kernel.org commit a6c7a6a18b10a4ac0913e7abdbdce928a2601bdb Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:58 2024 +0200 x86/alternative: Convert the asm ALTERNATIVE() macro Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-12-bp@kernel.org commit 85542adb65ecd7cc0e442e8befef74f2ed07f5f6 Author: Thomas Prescher Date: Wed May 8 15:25:01 2024 +0200 KVM: x86: Add KVM_RUN_X86_GUEST_MODE kvm_run flag When a vCPU is interrupted by a signal while running a nested guest, KVM will exit to userspace with L2 state. However, userspace has no way to know whether it sees L1 or L2 state (besides calling KVM_GET_STATS_FD, which does not have a stable ABI). This causes multiple problems: The simplest one is L2 state corruption when userspace marks the sregs as dirty. See this mailing list thread [1] for a complete discussion. Another problem is that if userspace decides to continue by emulating instructions, it will unknowingly emulate with L2 state as if L1 doesn't exist, which can be considered a weird guest escape. Introduce a new flag, KVM_RUN_X86_GUEST_MODE, in the kvm_run data structure, which is set when the vCPU exited while running a nested guest. Also introduce a new capability, KVM_CAP_X86_GUEST_MODE, to advertise the functionality to userspace. [1] https://lore.kernel.org/kvm/20240416123558.212040-1-julian.stecklina@cyberus-technology.de/T/#m280aadcb2e10ae02c191a7dc4ed4b711a74b1f55 Signed-off-by: Thomas Prescher Signed-off-by: Julian Stecklina Link: https://lore.kernel.org/r/20240508132502.184428-1-julian.stecklina@cyberus-technology.de Signed-off-by: Sean Christopherson commit 508f0c7bf6d55ebf988f8e59a998f6eeb2c0272b Author: Carlos López Date: Wed Apr 24 12:56:18 2024 +0200 KVM: x86: Improve documentation for KVM_CAP_X86_BUS_LOCK_EXIT Improve the description for the KVM_CAP_X86_BUS_LOCK_EXIT capability to fix a few typos and grammar issues, and to clarify the purpose of the capability. Signed-off-by: Carlos López Link: https://lore.kernel.org/r/20240424105616.29596-1-clopez@suse.de [sean: massage changelog] Signed-off-by: Sean Christopherson commit 93694129c6e84d3013f5b2787e2ff88dd706c4f0 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:57 2024 +0200 x86/alternative: Convert ALTERNATIVE_3() Zap the hack of using an ALTERNATIVE_3() internal label, as suggested by bgerst: https://lore.kernel.org/r/CAMzpN2i4oJ-Dv0qO46Fd-DxNv5z9=x%2BvO%2B8g=47NiiAf8QEJYA@mail.gmail.com in favor of a label local to this macro only, as it should be done. Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-11-bp@kernel.org commit 54e4ada1a4206f878e345ae01cf37347d803d1b1 Author: Olivier Dautricourt Date: Sat Jun 8 23:31:48 2024 +0200 dmaengine: altera-msgdma: properly free descriptor in msgdma_free_descriptor Remove list_del call in msgdma_chan_desc_cleanup, this should be the role of msgdma_free_descriptor. In consequence replace list_add_tail with list_move_tail in msgdma_free_descriptor. This fixes the path: msgdma_free_chan_resources -> msgdma_free_descriptors -> msgdma_free_desc_list -> msgdma_free_descriptor which does not correctly free the descriptors as first nodes were not removed from the list. Signed-off-by: Olivier Dautricourt Tested-by: Olivier Dautricourt Link: https://lore.kernel.org/r/20240608213216.25087-3-olivierdautricourt@gmail.com Signed-off-by: Vinod Koul commit d3ddfab0969b19a7dee3753010bb3ea94a0cccd1 Author: Olivier Dautricourt Date: Sat Jun 8 23:31:47 2024 +0200 dmaengine: altera-msgdma: cleanup after completing all descriptors msgdma_chan_desc_cleanup iterates the done list for each completed descriptor while we need to do it once after all descriptors are completed. This fixes a Sparse warning because we first take the lock in msgdma_tasklet. - Move locking to msgdma_chan_desc_cleanup. - Move call to msgdma_chan_desc_cleanup outside of the critical section of msgdma_tasklet. Inspired by: commit 16ed0ef3e931 ("dmaengine: zynqmp_dma: cleanup after completing all descriptors") Signed-off-by: Olivier Dautricourt Tested-by: Olivier Dautricourt Suggested-by: Eric Schwarz Link: https://lore.kernel.org/r/20240608213216.25087-2-olivierdautricourt@gmail.com Signed-off-by: Vinod Koul commit 261d3a85d959841821ca0d69f9d7b0d4087661c4 Author: Olivier Dautricourt Date: Sat Jun 8 23:31:46 2024 +0200 dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks As we first take the lock with spin_lock_irqsave in msgdma_tasklet, Lockdep might complain about this. Inspired by commit 9558cf4ad07e ("dmaengine: zynqmp_dma: fix lockdep warning in tasklet") Signed-off-by: Olivier Dautricourt Tested-by: Olivier Dautricourt Suggested-by: Eric Schwarz Link: https://lore.kernel.org/r/20240608213216.25087-1-olivierdautricourt@gmail.com Signed-off-by: Vinod Koul commit d2d302b1bbe28dba3bd8da855ac9c16aa5dbd00e Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:56 2024 +0200 x86/alternative: Convert ALTERNATIVE_TERNARY() The C macro. Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-10-bp@kernel.org commit 719ac02347ee5f94a9f3d5c2fe84640f855432a9 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:55 2024 +0200 x86/alternative: Convert alternative_call_2() Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-9-bp@kernel.org commit a880f9ef6bf7edc36753a9e40388d42ae8d7e099 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:54 2024 +0200 x86/alternative: Convert alternative_call() Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-8-bp@kernel.org commit a694956df4ca75d74bcd422908ddcd8e2ea3042e Author: Animesh Agarwal Date: Thu Jun 6 09:42:00 2024 +0530 ASoC: dt-bindings: linux,spdif: Convert spdif-reciever.txt to dtschema Convert the dummy SPDIF receiver bindings to DT schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Rob Herring (Arm) Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240606041212.78428-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit 5c33876a20e1f42471c2b6fd1804428311d35f1f Author: Dan Carpenter Date: Sat Jun 8 17:24:31 2024 +0300 ASoC: samsung: midas_wm1811: Fix error code in probe() This accidentally returns success instead of -EINVAL. Fixes: c91d0c2e198d ("ASoC: samsung: midas_wm1811: Add GPIO-based headset jack detection") Signed-off-by: Dan Carpenter Acked-by: Artur Weber Link: https://lore.kernel.org/r/01590109-cf27-404b-88ff-b42bb73ca1c6@moroto.mountain Signed-off-by: Mark Brown commit c38082bf223fb4a3f2bdf1f79650af53d3499dea Author: Simon Trimmer Date: Tue Jun 11 14:25:56 2024 +0100 ASoC: cs35l56: Attempt to read from cirrus,speaker-id device property first When cs35l56 is connected via cs42l43 there isn't an ACPI node for the cs35l56 so all properties are under the cs42l43 ACPI node. We're adding a property as a way for the cs42l43 driver to pass this info in via a software node. Signed-off-by: Simon Trimmer Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20240611132556.1557075-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit ad36085ee3563001cf1720eeb93c2e85715eb5cd Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:53 2024 +0200 x86/alternative: Convert alternative_io() Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-7-bp@kernel.org commit bb91576965e79d17e8e23fccdef91c4bf09d1a74 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:52 2024 +0200 x86/alternative: Convert alternative_input() Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-6-bp@kernel.org commit 8cb1f14b707d3d9b7d2b330c0acd62537576c6a7 Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:51 2024 +0200 x86/alternative: Convert alternative_2() Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-5-bp@kernel.org commit 24d0d98af1c32ac6452fe04e0b5464a59303b5c9 Author: Tejas Upadhyay Date: Fri Jun 7 17:55:28 2024 +0530 drm/xe/xe2lpm: Fixup Wa_14020756599 This WA needs to be applied to graphics GT when the media version is 2000. Currently, media version 2000 is always paired with graphics version 2004 which will result in writing same register with same bits twice. We can't add optional rule in rtp framework and also writing same register with same bits gives warning. Currently, media version 2000 is always paired with graphics version 2004, so just checking the latter is sufficient. V2(Lucas): - Add more detail in commit message - Improve code comment to follow guideline Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2016 Fixes: 131328aa5699 ("drm/xe/xe2lpm: Add permanent Wa_14020756599") Signed-off-by: Tejas Upadhyay Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240607122528.1048610-1-tejas.upadhyay@intel.com Signed-off-by: Lucas De Marchi commit 9b5a45eb639c46c0374b5e040e6e6db386909676 Author: Marilene A Garcia Date: Thu Jun 6 10:25:20 2024 -0300 ftrace: Add missing kerneldoc parameters to unregister_ftrace_direct() Add the description to the parameters addr and free_filters of the function unregister_ftrace_direct(). Link: https://lore.kernel.org/linux-trace-kernel/20240606132520.1397567-1-marilene.agarcia@gmail.com Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Shuah Khan Cc: Javier Carrasco Signed-off-by: Marilene A Garcia Signed-off-by: Steven Rostedt (Google) commit 5f7fb89a115d53b4a10bf7ba2733e78df281e98d Author: Steven Rostedt (Google) Date: Mon Jun 10 23:09:36 2024 -0400 function_graph: Everyone uses HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, remove it All architectures that implement function graph also implements HAVE_FUNCTION_GRAPH_RET_ADDR_PTR. Remove it, as it is no longer a differentiator. Link: https://lore.kernel.org/linux-trace-kernel/20240611031737.982047614@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Jonathan Corbet Cc: Catalin Marinas Cc: Will Deacon Cc: Guo Ren Cc: Huacai Chen Cc: WANG Xuerui Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Naveen N. Rao" Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Signed-off-by: Steven Rostedt (Google) commit 29c1c24a2707a579bba078d8b73b70fef4451b34 Author: Steven Rostedt (Google) Date: Mon Jun 10 23:09:35 2024 -0400 function_graph: Fix up ftrace_graph_ret_addr() Yang Li sent a patch to fix the kerneldoc of ftrace_graph_ret_addr(). While reviewing it, I realized that the comments in the entire function header needed a rewrite. When doing that, I realized that @idx parameter was being ignored. Every time this was called by the unwinder, it would start the loop at the top of the shadow stack and look for the matching stack pointer. When it found it, it would return it. When the unwinder asked for the next function, it would search from the beginning again. In reality, it should start from where it left off. That was the reason for the @idx parameter in the first place. The first time the unwinder calls this function, the @idx pointer would contain zero. That would mean to start from the top of the stack. The function was supposed to update the @idx with the index where it found the return address, so that the next time the unwinder calls this function it doesn't have to search through the previous addresses it found (making it O(n^2)!). This speeds up the unwinder's use of ftrace_graph_ret_addr() by an order of magnitude. Link: https://lore.kernel.org/linux-trace-kernel/20240610181746.656e3759@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240611031737.821995106@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Jonathan Corbet Cc: Catalin Marinas Cc: Will Deacon Cc: Guo Ren Cc: Huacai Chen Cc: WANG Xuerui Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Naveen N. Rao" Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Reported-by: Yang Li Fixes: 7aa1eaef9f428 ("function_graph: Allow multiple users to attach to function graph") Signed-off-by: Steven Rostedt (Google) commit b94c1fe10be544070f53e4a1e5164087e446945c Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:50 2024 +0200 x86/alternative: Convert alternative() Split conversion deliberately into minimal pieces to ease bisection because debugging alternatives is a nightmare. Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-4-bp@kernel.org commit d2a793dae219b7cd61a3d63c0a6ea76153f0629f Author: Peter Zijlstra Date: Fri Jun 7 13:16:49 2024 +0200 x86/alternatives: Add nested alternatives macros Instead of making increasingly complicated ALTERNATIVE_n() implementations, use a nested alternative expression. The only difference between: ALTERNATIVE_2(oldinst, newinst1, flag1, newinst2, flag2) and ALTERNATIVE(ALTERNATIVE(oldinst, newinst1, flag1), newinst2, flag2) is that the outer alternative can add additional padding when the inner alternative is the shorter one, which then results in alt_instr::instrlen being inconsistent. However, this is easily remedied since the alt_instr entries will be consecutive and it is trivial to compute the max(alt_instr::instrlen) at runtime while patching. Specifically, after this the ALTERNATIVE_2 macro, after CPP expansion (and manual layout), looks like this: .macro ALTERNATIVE_2 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2 740: 740: \oldinstr ; 741: .skip -(((744f-743f)-(741b-740b)) > 0) * ((744f-743f)-(741b-740b)),0x90 ; 742: .pushsection .altinstructions,"a" ; altinstr_entry 740b,743f,\ft_flags1,742b-740b,744f-743f ; .popsection ; .pushsection .altinstr_replacement,"ax" ; 743: \newinstr1 ; 744: .popsection ; ; 741: .skip -(((744f-743f)-(741b-740b)) > 0) * ((744f-743f)-(741b-740b)),0x90 ; 742: .pushsection .altinstructions,"a" ; altinstr_entry 740b,743f,\ft_flags2,742b-740b,744f-743f ; .popsection ; .pushsection .altinstr_replacement,"ax" ; 743: \newinstr2 ; 744: .popsection ; .endm The only label that is ambiguous is 740, however they all reference the same spot, so that doesn't matter. NOTE: obviously only @oldinstr may be an alternative; making @newinstr an alternative would mean patching .altinstr_replacement which very likely isn't what is intended, also the labels will be confused in that case. [ bp: Debug an issue where it would match the wrong two insns and and consider them nested due to the same signed offsets in the .alternative section and use instr_va() to compare the full virtual addresses instead. - Use new labels to denote that the new, nested alternatives are being used when staring at preprocessed output. - Use the %c constraint everywhere instead of %P and document the difference for future reference. ] Signed-off-by: Peter Zijlstra Co-developed-by: Borislav Petkov (AMD) Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230628104952.GA2439977@hirez.programming.kicks-ass.net commit c677f31c857632ca678a4a145b74855bacb72d17 Author: Andi Shyti Date: Fri Jun 7 16:51:31 2024 +0200 drm/i915/gt: debugfs: Evaluate forcewake usage within locks The forcewake count and domains listing is multi process critical and the uncore provides a spinlock for such cases. Lock the forcewake evaluation section in the fw_domains_show() debugfs interface. Signed-off-by: Andi Shyti Reviewed-by: Rodrigo Vivi Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240607145131.217251-1-andi.shyti@linux.intel.com commit 9cbf2643b3ec7866e688df35d5b28c8b07ecbe6c Author: Borislav Petkov (AMD) Date: Fri Jun 7 13:16:48 2024 +0200 x86/alternative: Zap alternative_ternary() Unused. Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20240607111701.8366-2-bp@kernel.org commit b745dcf727f959c5fb08fa3ee08dc48c952b8553 Merge: 0ac3f1a4c2a34 7f4c7e43453fe Author: Mark Brown Date: Tue Jun 11 15:53:27 2024 +0100 ASoC: Drop or replace of_gpio.h Merge series from Andy Shevchenko : Replace or drop the legacy header that is subject to remove. Not all of them were compile-tested, the series might have hidden compilation errors. commit cbbb76e4b8bf2c938f75baf11272ca3536be9366 Author: Guenter Roeck Date: Thu Jun 6 09:16:40 2024 -0700 hwmon: (pmbus/lm25066) Let enum chips start with index 0 Commit ac0c26bae662 ("hwmon: (lm25066) Use i2c_get_match_data()") changed enum chips to start with 1 instead of 0, under the assumption that the data pointer in of_device_id must not start with 0 (NULL) if i2c_get_match_data() is used. However, that is perfectly fine as long as there is also an i2c_device_id array with the same data which is used as fallback in that case. Let enum chips start with 0 to avoid confusion against other drivers where the enum starts with 0 and i2c_get_match_data() is used as well. Cc: Rob Herring Signed-off-by: Guenter Roeck commit 22558934447999f38bb521a57279aa7ecf3f2d74 Author: Guenter Roeck Date: Thu Jun 6 09:23:44 2024 -0700 hwmon: (nct6775) Let enum kinds start with index 0 Commit 10a0575ea09d ("hwmon: (nct6775-i2c) Use i2c_get_match_data()") introduced calling i2c_get_match_data() to the nct6775 driver. As part of that commit, enum kinds was changed to start with 1, based on Adjust the 'kinds' enum to not use 0, so that no match data can be distinguished from a valid enum value. The patch had to be fixed later with commit 2792fc8f8c83 ("hwmon: (nct6775-core) Explicitly initialize nct6775_device_names indexes") and commit efe86092ab31 ("hwmon: (nct6775-platform) Explicitly initialize nct6775_sio_names indexes"). Various patches submitted later show that the change from 0 to 1 is not really necessary. As it turns out, it is perfectly fine as long as there is an i2c_device_id array with the same data as in the of_device_id array. This data is used as fallback if the data pointer in struct of_device_id is NULL (0). Let enum chips start with 0 to avoid confusion against other drivers where the enum starts with 0 and i2c_get_match_data() is used as well. Signed-off-by: Guenter Roeck commit e229c6e80f9d3e92880de66962f7448d7d00e7df Author: Guenter Roeck Date: Thu Jun 6 09:36:38 2024 -0700 hwmon: (pmbus/mp2856) Let enum chips start with index 0 Earlier it was assumed that the data pointer in of_device_id must not start with 0 (NULL) if i2c_get_match_data() is used. However, it turns out that this is perfectly fine as long as there is also an i2c_device_id array with the same data, which is used as fallback in that case. Let enum chips start with 0 to avoid confusion against other drivers where the enum starts with 0 and i2c_get_match_data() is used as well. While doing that, remove chip_id from struct mp2856_data since it is only used in the probe function, and typecast the result of i2c_get_match_data() to kernel_ulong_t to avoid the double typecast. Cc: Peter Yin Cc: Potin Lai Signed-off-by: Guenter Roeck commit 138d45d96758db803b50761297f3331c9170bc87 Author: Guenter Roeck Date: Fri Jun 7 06:32:04 2024 -0700 hwmon: (pmbus/max31827) Explain why enum chips must not start with 0 If a driver calls device_get_match_data(), the .data pointer in its id data structures must not be NULL/0 because device_get_match_data() returns NULL if an entry is not found. Explain that in a comment to avoid confusion why this is required in this driver but not in other drivers. Cc: Daniel Matyas Acked-by: Nuno Sa Signed-off-by: Guenter Roeck commit 79655e867ad6dfde2734c67c7704c0dd5bf1e777 Author: Angus Chen Date: Fri May 24 17:33:49 2024 +0000 drm/i915/mtl: Update workaround 14018575942 The WA should be extended to cover VDBOX engine. We found that 28-channels 1080p VP9 encoding may hit this issue. v3: update the WA number and explain the reason why this workaround is needed v2: add WA number v1: initial version Signed-off-by: Angus Chen Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240426073638.45775-1-angus.chen@intel.com commit 2ccfe94bc3ac980d2d1df9f7a0b2c6d2137abe55 Author: Markus Elfring Date: Tue Jun 4 17:02:15 2024 +0200 auxdisplay: ht16k33: Drop reference after LED registration The reference count is bumped by device_get_named_child_node() and never dropped. Since LED APIs do not require it to be bumped by the user, drop the reference after LED registration. [andy: rewritten the commit message and amended the change] Fixes: c223d9c636ed ("auxdisplay: ht16k33: Add LED support") Signed-off-by: Markus Elfring Signed-off-by: Andy Shevchenko commit 3ee1167a16dfae1f656d52133a72be992cb85047 Author: Genjian Zhang Date: Thu May 16 19:59:06 2024 +0800 MIPS: ip22-gio: Make ip22_gio_set_64bit() and ip22_gio_init() static These functions are used in only one file. Made them static to fix the following build error: arch/mips/sgi-ip22/ip22-gio.c:249:6: error: no previous prototype for ‘ip22_gio_set_64bit’ [-Werror=missing-prototypes] arch/mips/sgi-ip22/ip22-gio.c:398:12: error: no previous prototype for ‘ip22_gio_init’ [-Werror=missing-prototypes] Reported-by: k2ci Signed-off-by: Genjian Zhang Signed-off-by: Thomas Bogendoerfer commit 0db3bc9ce03ef3dfa8af58e258737ceab217eae6 Author: Genjian Zhang Date: Thu May 16 19:59:05 2024 +0800 MIPS: sgi-ip22: Add prototypes for several functions to header This fixes the following build warning: arch/mips/sgi-ip22/ip22-time.c:119:18: error: no previous prototype for ‘indy_8254timer_irq’ [-Werror=missing-prototypes] arch/mips/sgi-ip22/ip22-berr.c:89:6: error: no previous prototype for ‘ip22_be_interrupt’ [-Werror=missing-prototypes] arch/mips/sgi-ip22/ip22-berr.c:113:13: error: no previous prototype for ‘ip22_be_init’ [-Werror=missing-prototypes] Reported-by: k2ci Signed-off-by: Genjian Zhang Signed-off-by: Thomas Bogendoerfer commit d89a415ff8d5e0aad4963f2d8ebb0f9e8110b7fa Author: Jiaxun Yang Date: Tue May 7 19:51:22 2024 +0100 MIPS: Loongson64: DTS: Fix PCIe port nodes for ls7a Add various required properties to silent warnings: arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi:116.16-297.5: Warning (interrupt_provider): /bus@10000000/pci@1a000000: '#interrupt-cells' found, but node is not an interrupt provider arch/mips/boot/dts/loongson/loongson64_2core_2k1000.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider' Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 98a9e2ac3755a353eefea8c52e23d5b0c50f3899 Author: Jiaxun Yang Date: Tue May 7 19:51:21 2024 +0100 MIPS: Loongson64: DTS: Fix msi node for ls7a Add it to silent warning: arch/mips/boot/dts/loongson/ls7a-pch.dtsi:68.16-416.5: Warning (interrupt_provider): /bus@10000000/pci@1a000000: '#interrupt-cells' found, but node is not an interrupt provider arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts:32.31-40.4: Warning (interrupt_provider): /bus@10000000/msi-controller@2ff00000: Missing '#interrupt-cells' in interrupt provider arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider' Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 40a48dd3bb85bcd795d37ef8129af7eca978d669 Author: Jiaxun Yang Date: Tue May 7 19:51:20 2024 +0100 MIPS: Loongson64: Include bootinfo.h in dma.c dma.c defined function plat_swiotlb_setup, which is declared in bootinfo.h. Fixes warning: arch/mips/loongson64/dma.c:25:13: warning: no previous prototype for ‘plat_swiotlb_setup’ [-Wmissing-prototypes] 25 | void __init plat_swiotlb_setup(void) | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 4ba491dd3b0e8ac6e6f46b9a91f490b6dad21aa0 Author: Jiaxun Yang Date: Tue May 7 19:51:19 2024 +0100 MIPS: kvm: Declare prototype for kvm_init_loongson_ipi Declear prototype for kvm_init_loongson_ipi in interrupt.h. Fix warning: arch/mips/kvm/loongson_ipi.c:190:6: warning: no previous prototype for ‘kvm_init_loongson_ipi’ [-Wmissing-prototypes] 190 | void kvm_init_loongson_ipi(struct kvm *kvm) | ^~~~~~~~~~~~~~~~~~~~~ Fixes: f21db3090de2 ("KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 68557c59a550c6afff714e54709e9c5511f39135 Author: Jiaxun Yang Date: Tue May 7 16:22:01 2024 +0100 MIPS: Loongson64: Implement PM suspend for LEFI firmware Implement PM suspend for LEFI firmware. Entering STR (Suspend to RAM) is as simple as save our context then go to a firmware vector. Wake is a little bit treaky as we need to setup some CP0 status first, which can be done with smp_slave_setup. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 2226d454db931455018521db13ab763d276952a7 Author: Jiaxun Yang Date: Tue May 7 16:22:00 2024 +0100 MIPS: select CPU_PM with SUSPEND Functionalities provided by CPU_PM are essential for suspend to work on all platforms. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 16c6d88f14a8ddaec9f093e7eb94f57c45826a82 Author: Jiaxun Yang Date: Tue May 7 16:21:59 2024 +0100 MIPS: asm/pm.h: Use platform agnostic macros Use platform agnostic macros so it can be compiled on all MIPS platforms. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit e6dc7bc55a83c39bc81a1f6faff8631e05f7ff75 Author: Maxime Ripard Date: Wed Apr 3 12:56:25 2024 +0200 mips: configs: ci20: Enable DRM_DW_HDMI Commit 4fc8cb47fcfd ("drm/display: Move HDMI helpers into display-helper module") turned the DRM_DW_HDMI dependency of DRM_INGENIC_DW_HDMI into a depends on which ended up disabling the drivers in the defconfig. Make sure it's still enabled. Fixes: 4fc8cb47fcfd ("drm/display: Move HDMI helpers into display-helper module") Reported-by: Mark Brown Reported-by: Alexander Stein Signed-off-by: Maxime Ripard Signed-off-by: Thomas Bogendoerfer commit 412a05d6a91c6e3bb69741ddbde01c16c3ff94c5 Merge: 8a71710bb4797 e289df82344fe Author: Mark Brown Date: Tue Jun 11 11:38:25 2024 +0100 spi: Rework DMA mapped flag Merge series from Andy Shevchenko : The first part of the series (patches 1 to 7) is an introduction of a new helper followed by the user conversion. This consolidates the same code and also makes patch 8 (last one) be localised to the SPI core part. The last patch is the main rework to get rid of a recently introduced hack with a dummy SG list and move to the transfer-based DMA mapped flag. That said, the patches 1 to 7 may be applied right away since they have no functional change intended, while the last one needs more testing and reviewing. commit 4ca1a12a1b3520681cc274a38333d4294ac8050f Author: Michal Wajdeczko Date: Mon Jun 10 14:04:11 2024 +0200 drm/xe/guc: Add kernel-doc for HXG Fast Request We have kernel-doc for all HXG message types but Fast Request. Signed-off-by: Michal Wajdeczko Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240610120411.1768-3-michal.wajdeczko@intel.com commit 91524b3a09b4eaa87bd9e073c289d502d6a7c8d0 Author: Michal Wajdeczko Date: Mon Jun 10 14:04:10 2024 +0200 drm/xe/guc: Drop unused legacy GuC message ABI definitions Those were copy-pasted from i915 code and never used in Xe driver. Signed-off-by: Michal Wajdeczko Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240610120411.1768-2-michal.wajdeczko@intel.com commit ca8a170f73d93cca2be791162fcbf12941c47558 Author: Jouni Högander Date: Fri Jun 7 16:49:17 2024 +0300 drm/i915/psr: Wake time is aux less wake time for Panel Replay When checking vblank length used wake time is aux less wake time for eDP Panel Replay (vblank length is not checked for DP2.0 Panel Replay). Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-14-jouni.hogander@intel.com commit 99fcf463903d5236e6e693230c142284a1e19164 Author: Jouni Högander Date: Fri Jun 7 16:49:16 2024 +0300 drm/i915/psr: Check vblank against IO buffer wake time on Lunarlake As Lunarlake doesn't have block count configuration vblank should be checked against IO buffer wake time. Bspec: 68920 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-13-jouni.hogander@intel.com commit aeafa46ee30c95dbad77db19b1400fb6fd78245f Author: Jouni Högander Date: Fri Jun 7 16:49:15 2024 +0300 drm/i915/psr: Take into account SU SDP scanline indication in vblank check SU SDP scanline indication should be taken into account when checking vblank length. In Bspec we have: PSR2_CTL[ SU SDP scanline indication ] = 0: (TRANS_VBLANK Vertical Blank End- TRANS_VBLANK Vertical Blank Start) > PSR2_CTL Block Count Number value in lines PSR2_CTL[ SU SDP scanline indication ] = 1: (TRANS_VBLANK Vertical Blank End- TRANS_VBLANK Vertical Blank Start- 1) > PSR2_CTL Block Count Number value in lines Bspec: 49274 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-12-jouni.hogander@intel.com commit 2e8938a1c56e60fcd6e52de254808615d0eccea4 Author: Jouni Högander Date: Fri Jun 7 16:49:14 2024 +0300 drm/i915/psr: Move vblank length check to separate function We are about to add more complexity to vblank length check. It makes sense to move it to separate function for sake of clarity. v2: change name to wake_lines_fit_into_vblank Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-11-jouni.hogander@intel.com commit 51ee1f29a9aceb8a52037ba4759d44c70e966fe5 Author: Jouni Högander Date: Fri Jun 7 16:49:13 2024 +0300 drm/i915/psr: Print Panel Replay status instead of frame lock status Currently Panel Replay status printout is printing frame lock status. It should print Panel Replay status instead. Panel Replay status register field follows PSR status register field. Use existing PSR code for that. Fixes: ef75c25e8fed ("drm/i915/panelreplay: Debugfs support for panel replay") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-10-jouni.hogander@intel.com commit 672670b5dc6143601ca9cb457d82c8c98322d0f4 Author: Jouni Högander Date: Fri Jun 7 16:49:12 2024 +0300 drm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid Early Transport is possible and in our HW mandatory on eDP Panel Replay. Add parameter to intel_psr2_config_et_valid to differentiate validity check for Panel Replay. v2: fix intel_dp->psr_dpcd[0] check Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-9-jouni.hogander@intel.com commit 92d03bdee41adaf5221b201fc7e67e8761888a71 Author: Jouni Högander Date: Fri Jun 7 16:49:11 2024 +0300 drm/i915/alpm: Share alpm support checks with PSR code Convert intel_alpm_aux_wake_supported and intel_alpm_aux_less_wake_supported as non-static. Use them in intel_psr.c instead of local variables. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-8-jouni.hogander@intel.com commit 32f0045f905c3cc17e8c6ae81959b3db95bb0091 Author: Jouni Högander Date: Fri Jun 7 16:49:10 2024 +0300 drm/i915/psr: Split enabling sink for PSR and Panel Replay Current intel_psr_enable_sink is a mess due to partly reusing PSR bit definitions for Panel Replay. Even thought PSR and Panel Replay enable registers do have common bits they still have also different bits and same bits with different meaning. For sake of clarity split enabling sink to PSR and Panel Replay specific parts. Also fix issue caused by using psr->panel_replay_enabled to early. Fixes: 88ae6c65ecdb ("drm/i915/psr: Unify panel replay enable/disable sink") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-7-jouni.hogander@intel.com commit 91930fc0394b3b54c6a8a3333b2b52c923cf6c52 Author: Jouni Högander Date: Fri Jun 7 16:49:09 2024 +0300 drm/display: Add missing Panel Replay Enable SU Region ET bit Add missing Panel Replay Enable SU Region ET bit defined in DP2.1 specification. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Acked-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-6-jouni.hogander@intel.com commit 955446ed6e822b86751993bd69022d347b43a99e Author: Jouni Högander Date: Fri Jun 7 16:49:08 2024 +0300 drm/i915/display: Skip Panel Replay on pipe comparison if no active planes Panel Replay is not enabled if there are no active planes. Do not compare it on pipe comparison. Otherwise we get pipe mismatch. Fixes: ac9ef327327b ("drm/i915/psr: Panel replay has to be enabled before link training") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-5-jouni.hogander@intel.com commit f36b4810f082d1d8c11362cde82b86390616a179 Author: Jouni Högander Date: Fri Jun 7 16:49:07 2024 +0300 drm/i915/display: Take panel replay into account in vsc sdp unpacking Currently intel_dp_vsc_sdp_unpack is not taking into account Panel Replay vsc sdp. Fix this by adding vsc sdp revision 0x6 and length 0x10 into intel_dp_vsc_sdp_unpack Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-4-jouni.hogander@intel.com commit 1fceeb85de3b76cfafa3c3649b56c864f04f49cd Author: Jouni Högander Date: Fri Jun 7 16:49:06 2024 +0300 drm/i915/alpm: Write also AUX Less Wake lines into ALPM_CTL Currently AUX Less Wake lines are not written into ALPM_CTL. Fix this. Fixes: 1ccbf135862b ("drm/i915/psr: Enable ALPM on source side for eDP Panel replay") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-3-jouni.hogander@intel.com commit 21925ee8e68fdb9e7b7d1898f34b5ad0b7c3f5c9 Author: Jouni Högander Date: Fri Jun 7 16:49:05 2024 +0300 drm/i915/alpm: Do not use fast_wake_lines for aux less wake time We want to have own variables for fast wake lines and aux less wake time. It might be needed to choose if we can enable Panel Replay Selective Update or PSR2. Also currently aux less wake time is overwritten by calculated fast wake time. v2:use aux less wake time in intel_alpm_lobf_compute_config Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-2-jouni.hogander@intel.com commit c107697c82af8b9a0f1f914fa961cdb87a1a825f Author: Marco Pagani Date: Tue Jun 4 12:25:35 2024 +0200 Revert "fpga: disable KUnit test suites when module support is enabled" This reverts commit a3fad2e92c76587fe262a1a4a122045b29885354. The core components of the subsystem no longer assume that low-level modules register a driver for the parent device and rely on its owner pointer to take the module's refcount. KUnit test suites can now be safely re-enabled with loadable module support. Signed-off-by: Marco Pagani Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20240604102536.59010-1-marpagan@redhat.com Signed-off-by: Xu Yilun commit 9bc2ff871f00437ad2f10c1eceff51aaa72b478f Author: Thomas Gleixner Date: Mon Jun 10 14:46:39 2024 +0200 jump_label: Simplify and clarify static_key_fast_inc_cpus_locked() Make the code more obvious and add proper comments to avoid future head scratching. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240610124406.548322963@linutronix.de commit 695ef796467ed228b60f1915995e390aea3d85c6 Author: Thomas Gleixner Date: Mon Jun 10 14:46:37 2024 +0200 jump_label: Clarify condition in static_key_fast_inc_not_disabled() The second part of if (v <= 0 || (v + 1) < 0) is not immediately obvious that it acts as overflow protection. Check explicitely for v == INT_MAX instead and add a proper comment how this is used at the call sites. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240610124406.484973160@linutronix.de commit 83ab38ef0a0b2407d43af9575bb32333fdd74fb2 Author: Thomas Gleixner Date: Mon Jun 10 14:46:36 2024 +0200 jump_label: Fix concurrency issues in static_key_slow_dec() The commit which tried to fix the concurrency issues of concurrent static_key_slow_inc() failed to fix the equivalent issues vs. static_key_slow_dec(): CPU0 CPU1 static_key_slow_dec() static_key_slow_try_dec() key->enabled == 1 val = atomic_fetch_add_unless(&key->enabled, -1, 1); if (val == 1) return false; jump_label_lock(); if (atomic_dec_and_test(&key->enabled)) { --> key->enabled == 0 __jump_label_update() static_key_slow_dec() static_key_slow_try_dec() key->enabled == 0 val = atomic_fetch_add_unless(&key->enabled, -1, 1); --> key->enabled == -1 <- FAIL There is another bug in that code, when there is a concurrent static_key_slow_inc() which enables the key as that sets key->enabled to -1 so on the other CPU val = atomic_fetch_add_unless(&key->enabled, -1, 1); will succeed and decrement to -2, which is invalid. Cure all of this by replacing the atomic_fetch_add_unless() with a atomic_try_cmpxchg() loop similar to static_key_fast_inc_not_disabled(). [peterz: add WARN_ON_ONCE for the -1 race] Fixes: 4c5ea0a9cd02 ("locking/static_key: Fix concurrent static_key_slow_inc()") Reported-by: Yue Sun Reported-by: Xingwei Lee Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240610124406.422897838@linutronix.de commit bb9bb45f746b0f9457de9c3fc4da143a6351bdc9 Author: Thomas Gleixner Date: Mon Jun 10 14:46:35 2024 +0200 perf/x86: Serialize set_attr_rdpmc() Yue and Xingwei reported a jump label failure. It's caused by the lack of serialization in set_attr_rdpmc(): CPU0 CPU1 Assume: x86_pmu.attr_rdpmc == 0 if (val != x86_pmu.attr_rdpmc) { if (val == 0) ... else if (x86_pmu.attr_rdpmc == 0) static_branch_dec(&rdpmc_never_available_key); if (val != x86_pmu.attr_rdpmc) { if (val == 0) ... else if (x86_pmu.attr_rdpmc == 0) FAIL, due to imbalance ---> static_branch_dec(&rdpmc_never_available_key); The reported BUG() is a consequence of the above and of another bug in the jump label core code. The core code needs a separate fix, but that cannot prevent the imbalance problem caused by set_attr_rdpmc(). Prevent this by serializing set_attr_rdpmc() locally. Fixes: a66734297f78 ("perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks") Closes: https://lore.kernel.org/r/CAEkJfYNzfW1vG=ZTMdz_Weoo=RXY1NDunbxnDaLyj8R4kEoE_w@mail.gmail.com Reported-by: Yue Sun Reported-by: Xingwei Lee Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20240610124406.359476013@linutronix.de commit fbe0fae601b780622fcb7034a479fa161645b9f4 Author: Gregory CLEMENT Date: Mon May 13 20:34:17 2024 +0200 MIPS: mobileye: Add EyeQ6H support EyeQ6H (or “High”) is an other SoC from Mobileye still based on the MIPS I6500 architecture as the EyeQ5. The 2 clusters of this SoC contains 4 cores which are capable of running 4 threads. Besides this, it features multiple controllers such as the classic UART, high speed I2C, SPI, as well as CAN-FD, PCIe Gen4, Octal/Quad SPI Flash interface, Gigabit Ethernet, MIPI CSI-2, MIPI DSI, and eMMC 5.1. It also includes a Hardware Security Module, Functional Safety Hardware, and video encoders and more. This commit provides the infrastructure to build a kernel running on EyeQ6H SoC. For now the support is limited and only one CPU core is running. Reviewed-by: Jiaxun Yang Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit 12c03bd444c26786995db694b39c55c09a39ae6f Author: Gregory CLEMENT Date: Mon May 13 20:34:16 2024 +0200 MIPS: mobileye: Add EyeQ6H device tree EyeQ6H (or “High”) is an other SoC from Mobileye still based on the MIPS I6500 architecture as the EyeQ5. The 2 clusters of this SoC contains 4 cores which are capable of running 4 threads. Besides this, it features multiple controllers such as the classic UART, high speed I2C, SPI, as well as CAN-FD, PCIe Gen4, Octal/Quad SPI Flash interface, Gigabit Ethernet, MIPI CSI-2, MIPI DSI, and eMMC 5.1. It also includes a Hardware Security Module, Functional Safety Hardware, and video encoders and more. This commit provides the initial device tree files with support for UART, GPIO and pinctrl, as well as fixed clocked. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit db1848a97d5c70ed39481e62c5657ed113cb6bf7 Author: Gregory CLEMENT Date: Mon May 13 20:34:15 2024 +0200 dt-bindings: mips: Add bindings for a new Mobileye SoC EyeQ6H Add the yaml bindings for a new Mobileye SoC: EyeQ6H. Acked-by: Conor Dooley Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit 73d4bb58a3f6671255c9cb3960f2202da38bbc14 Author: Celeste Liu Date: Thu May 30 19:19:51 2024 +0800 mips: defconfig: drop RT_GROUP_SCHED=y from generic/db1xxx/eyeq5 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.[1] 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.[2] [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1229700 [2]: https://github.com/systemd/systemd/issues/13781#issuecomment-549164383 Signed-off-by: Celeste Liu Signed-off-by: Thomas Bogendoerfer commit bc2e65bfc5af404d44442fca6d8ae69657df1e11 Author: Andy Shevchenko Date: Thu Jun 6 19:51:45 2024 +0300 MIPS: Alchemy: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Bogendoerfer commit 8e11b23c96c694d4cb0fb6595b38d77ee5edb296 Author: Douglas Anderson Date: Tue Jun 4 17:23:09 2024 -0700 drm/panel: Update TODO list item for cleaning up prepared/enabled tracking Now that most panels have been updated not to track/double-check their prepared/enabled state update the TODO with next steps. Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.23.I104cdece7324b0c365e552a17f9883414ffaea01@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.23.I104cdece7324b0c365e552a17f9883414ffaea01@changeid commit 78f15847bdb8fe04b1753b1fed4984c183661ef5 Author: Douglas Anderson Date: Tue Jun 4 17:23:08 2024 -0700 drm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by IMX boards. The IMX driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Robert Chiras Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.22.Id14188f1a8af7d524751c27c343a5b583ff5361f@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.22.Id14188f1a8af7d524751c27c343a5b583ff5361f@changeid commit b7c906d68078f235c1d017a5a820fbeac5a53904 Author: Douglas Anderson Date: Tue Jun 4 17:23:07 2024 -0700 drm/panel: raydium-rm67191: Stop tracking enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. The conversion of the rm67191 panel driver follows many of the other panel drivers but has a few differences that need to be called out. Like in commit 1e0465eb16a4 ("drm/panel: otm8009a: Don't double check prepared/enabled"), this panel also uses the "prepared" flag to prevent the backlight functions from running when the panel is powered off. This is probably not the safest thing to do but the old behavior was preserved. See the discussion in the otm8009a patch. Because of this, I've left the driver tracking "prepared" but removed its tracking of "enabled". NOTE: as part of this, transition the panel's direct calls to its disable/unprepare functions in shutdown to call through DRM panel. Cc: Robert Chiras Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.21.I20f82e9dd1597a14ae37a64c6b8275add60fbdb1@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.21.I20f82e9dd1597a14ae37a64c6b8275add60fbdb1@changeid commit b3494ccb04124ab3ae08fcd01f9571d209ce97f2 Author: Douglas Anderson Date: Tue Jun 4 17:23:06 2024 -0700 drm/panel: sharp-ls043t1le01: Don't call disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Qualcomm boards. The Qualcomm driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Werner Johansson Cc: Dmitry Baryshkov Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.20.I89ee53f7fc2f0806cab318128e5fa927990d830f@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.20.I89ee53f7fc2f0806cab318128e5fa927990d830f@changeid commit 804c4d0a20437bca3f017aaf96416f3cec7951c9 Author: Douglas Anderson Date: Tue Jun 4 17:23:05 2024 -0700 drm/panel: sharp-ls043t1le01: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Werner Johansson Cc: Dmitry Baryshkov Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.19.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.19.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@changeid commit d7d473d8464e7b9931c0b19f68ea0df807e01b4c Author: Douglas Anderson Date: Tue Jun 4 17:23:04 2024 -0700 drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Tegra boards. The Tegra driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Thierry Reding Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.18.I6a87fce1ee027c96f71c7adf74248b865f50b336@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.18.I6a87fce1ee027c96f71c7adf74248b865f50b336@changeid commit 316bb1473c78f415a99a10d3c903ed70e0014ae3 Author: Douglas Anderson Date: Tue Jun 4 17:23:03 2024 -0700 drm/panel: sharp-lq101r1sx01: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Thierry Reding Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.17.Ifd6b12b8a4bca7d492e892ea7455e83f5c0ab5a8@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.17.Ifd6b12b8a4bca7d492e892ea7455e83f5c0ab5a8@changeid commit 728290006afba80108b3ce9dd33018f05e454cf0 Author: Douglas Anderson Date: Tue Jun 4 17:23:02 2024 -0700 drm/panel: seiko-43wvf1g: Don't call disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by IMX boards. As far as I can tell, all IMX boards are now correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Marco Franchi Cc: Fabio Estevam Cc: Laurentiu Palcu Cc: Pengutronix Kernel Team Cc: imx@lists.linux.dev Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.16.Ief712fb6720cb98bdf9ec8644362d028b6554f9b@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.16.Ief712fb6720cb98bdf9ec8644362d028b6554f9b@changeid commit 155739579969d9653f9c2e69141129a824cbd6b8 Author: Douglas Anderson Date: Tue Jun 4 17:23:01 2024 -0700 drm/panel: seiko-43wvf1g: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Marco Franchi Cc: Fabio Estevam Cc: Laurentiu Palcu Cc: Pengutronix Kernel Team Cc: imx@lists.linux.dev Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.15.Idda91d310ca2e4f5a4ab4ca6eaf1afdaf14eeb51@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.15.Idda91d310ca2e4f5a4ab4ca6eaf1afdaf14eeb51@changeid commit f10b4577da3e8c8e457016c77ce2c2fb8d2d5023 Author: Douglas Anderson Date: Tue Jun 4 17:23:00 2024 -0700 drm/panel: panasonic-vvx10f034n00: Don't call disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Werner Johansson Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.14.I1562c864ee35a9c166765488c95104b7e4e562da@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.14.I1562c864ee35a9c166765488c95104b7e4e562da@changeid commit e9864996b44e8add09fd612cb7d00d9b54cd9ef1 Author: Douglas Anderson Date: Tue Jun 4 17:22:59 2024 -0700 drm/panel: panasonic-vvx10f034n00: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Werner Johansson Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.13.I7278e956ffd1cf686e737834578d4bb3ea527c7f@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.13.I7278e956ffd1cf686e737834578d4bb3ea527c7f@changeid commit c8f67cd1d931f2e61a3456d0122ffdeb90b699f7 Author: Douglas Anderson Date: Tue Jun 4 17:22:58 2024 -0700 drm/panel: jdi-lt070me05000: Don't call disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Qualcomm boards. The Qualcomm driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Vinay Simha BN Cc: Sumit Semwal Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.12.I5f3426e511e77b93c247e0aac114bd12b2b2a933@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.12.I5f3426e511e77b93c247e0aac114bd12b2b2a933@changeid commit 698acd40aee3ab2dfff4472ec3c16ce42e70e4f3 Author: Douglas Anderson Date: Tue Jun 4 17:22:57 2024 -0700 drm/panel: jdi-lt070me05000: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. NOTE: as part of this, transition the panel's direct calls to its disable function in shutdown/remove to call through DRM panel. Cc: Vinay Simha BN Cc: Sumit Semwal Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.11.I2e991044def6644c18ad8d7d686f4f3006f278de@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.11.I2e991044def6644c18ad8d7d686f4f3006f278de@changeid commit 2098604605adf35c9a0936355252d676f4cbc38b Author: Douglas Anderson Date: Tue Jun 4 17:22:56 2024 -0700 drm/panel: tdo-tl070wsh30: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Neil Armstrong Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.10.I46ff4e28c260bcd8e81205debd0994e76fd8aeac@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.10.I46ff4e28c260bcd8e81205debd0994e76fd8aeac@changeid commit 7c9526e58f74e9d725a9607b1ec24ba675f5b00b Author: Douglas Anderson Date: Tue Jun 4 17:22:55 2024 -0700 drm/panel: tdo-tl070wsh30: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Neil Armstrong Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.9.I5025ab14adc2efeef1be1843648547fb725106be@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.9.I5025ab14adc2efeef1be1843648547fb725106be@changeid commit c99e387afed197c3f22d73d8649c54f7c8da30ec Author: Douglas Anderson Date: Tue Jun 4 17:22:54 2024 -0700 drm/panel: osd-osd101t2587-53ts: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by TI OMAP boards. The OMAP driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Peter Ujfalusi Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.8.Ic533ce1323b94230d4155f9364c2b7c1bc47e798@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.8.Ic533ce1323b94230d4155f9364c2b7c1bc47e798@changeid commit 9a3f7eb7811a4c5f36eee93b83bbd72bf6adeac8 Author: Douglas Anderson Date: Tue Jun 4 17:22:53 2024 -0700 drm/panel: osd-osd101t2587-53ts: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Peter Ujfalusi Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.7.Ic7f6b4ae48027668940a756090cfc454645d3da4@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.7.Ic7f6b4ae48027668940a756090cfc454645d3da4@changeid commit 16661a0dd54168826edb2fe5a7b9a183cff0c69b Author: Douglas Anderson Date: Tue Jun 4 17:22:52 2024 -0700 drm/panel: olimex-lcd-olinuxino: Don't call unprepare+disable at remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.6.I4c79deffb7551ecfb0378302f8dee1275fd1c060@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.6.I4c79deffb7551ecfb0378302f8dee1275fd1c060@changeid commit db45a6991d9e33e852419f8bb0bb8d70b8d633ac Author: Douglas Anderson Date: Tue Jun 4 17:22:51 2024 -0700 drm/panel: olimex-lcd-olinuxino: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.5.I6a96d762be98321e02f56b5864359258d65d9da8@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.5.I6a96d762be98321e02f56b5864359258d65d9da8@changeid commit 6ac427c0cd21c7260d6b5133a70084aa35267a72 Author: Douglas Anderson Date: Tue Jun 4 17:22:50 2024 -0700 drm/panel: khadas-ts050: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Jacobe Zang Cc: Nicolas Belin Cc: Neil Armstrong Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.4.I1ee65e7905bf5bf46a0e6c5126ac3c7aa25cb80b@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.4.I1ee65e7905bf5bf46a0e6c5126ac3c7aa25cb80b@changeid commit 2469cb5c41b4774a6fb5ed799ae53ad16b407a9a Author: Douglas Anderson Date: Tue Jun 4 17:22:49 2024 -0700 drm/panel: khadas-ts050: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Jacobe Zang Cc: Nicolas Belin Cc: Neil Armstrong Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.3.Ibed1026f20cab08c90fa376e68c2f23a343e826b@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.3.Ibed1026f20cab08c90fa376e68c2f23a343e826b@changeid commit 2ccc698c68333256621abc1146de0d3fb0cc6ebd Author: Douglas Anderson Date: Tue Jun 4 17:22:48 2024 -0700 drm/panel: boe-himax8279d: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Jerry Han Cc: Jitao Shi Cc: Rock Wang Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.2.I19086c524d38f28f746befe85cb39ffda9d2f666@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.2.I19086c524d38f28f746befe85cb39ffda9d2f666@changeid commit 12866fdcfb9ebbe1b175804390195b99a234d5e7 Author: Douglas Anderson Date: Tue Jun 4 17:22:47 2024 -0700 drm/panel: boe-himax8279d: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. NOTE: as part of this, transition the panel's direct calls to its disable/unprepare functions in shutdown/remove to call through DRM panel. Cc: Jerry Han Cc: Jitao Shi Cc: Rock Wang Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604172305.v3.1.Ia3f254ab6e04e4f7afba6c066454498c8fb01324@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.1.Ia3f254ab6e04e4f7afba6c066454498c8fb01324@changeid commit 9bd95ac86e700ab8b1a6c225685e0e5afe426b4e Author: Lad Prabhakar Date: Thu May 30 18:38:57 2024 +0100 pinctrl: renesas: rzg2l: Add support for RZ/V2H SoC Add pinctrl driver support for RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-16-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fb73d663b31398aea8528fb231e660c4958b29ff Author: Lad Prabhakar Date: Thu Jun 6 09:51:33 2024 +0100 dt-bindings: pinctrl: renesas: Document RZ/V2H(P) SoC Add documentation for the pin controller found on the Renesas RZ/V2H(P) (R9A09G057) SoC. The RZ/V2H PFC varies slightly compared to the RZ/G2L family: - Additional bits need to be set during pinmuxing, - The GPIO pin count is different. Hence, a SoC-specific compatible string, 'renesas,r9a09g057-pinctrl', is added for the RZ/V2H(P) SoC. Also, add the 'renesas,output-impedance' property. The drive strength settings on RZ/V2H(P) depend on the different power rails coming out from the PMIC (connected via I2C). These power rails (required for drive strength) can be 1.2V, 1.8V, or 3.3V. Pins are grouped into 4 groups: Group 1: Impedance - 150/75/38/25 ohms (at 3.3V) - 130/65/33/22 ohms (at 1.8V) Group 2: Impedance - 50/40/33/25 ohms (at 1.8V) Group 3: Impedance - 150/75/37.5/25 ohms (at 3.3V) - 130/65/33/22 ohms (at 1.8V) Group 4: Impedance - 110/55/30/20 ohms (at 1.8V) - 150/75/38/25 ohms (at 1.2V) The 'renesas,output-impedance' property, as documented, can be [0, 1, 2, 3], these correspond to register bit values that can be set in the PFC_IOLH_mn register, which adjusts the drive strength value and is pin-dependent. As power rail information may not be available very early in the boot process, the 'renesas,output-impedance' property is added instead of reusing the 'output-impedance-ohms' property. Also, allow bias-disable, bias-pull-down and bias-pull-up properties as these can be used to configure the pins. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240606085133.632307-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 951eaac107631b26649b00cf5f5d9d7d83d8bca4 Author: Lad Prabhakar Date: Thu May 30 18:38:56 2024 +0100 pinctrl: renesas: rzg2l: Acquire lock in rzg2l_pinctrl_pm_setup_pfc() To keep consistency with rzg2l_pinctrl_set_pfc_mode(), acquire the lock in rzg2l_pinctrl_pm_setup_pfc() during PFC setup. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-15-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d930e8f783daef890980c0ca209a0f4f9ae73160 Author: Lad Prabhakar Date: Thu May 30 18:38:55 2024 +0100 pinctrl: renesas: rzg2l: Add support for custom parameters In preparation for passing custom params for RZ/V2H(P) SoC assign the custom params that are being passed via struct rzg2l_pinctrl_data. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-14-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6f38a02ad8e0335dd4dda2c42dd599e254cdd91a Author: Lad Prabhakar Date: Thu May 30 18:38:54 2024 +0100 pinctrl: renesas: rzg2l: Pass pincontrol device to pinconf_generic_parse_dt_config() Pass the pincontrol device pointer to pinconf_generic_parse_dt_config() in preparation for passing custom params. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-13-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 19d4bce9ce876ad0ee4240ebd849b730b3dc3763 Author: Lad Prabhakar Date: Thu May 30 18:38:53 2024 +0100 pinctrl: renesas: rzg2l: Add support for pull-up/down Add support to configure bias-disable, bias-pull-up, and bias-pull-down properties of the pin. Two new function pointers, hw_to_bias_param() and bias_param_to_hw(), are introduced in the struct rzg2l_pinctrl_data to configure bias settings, as the values in the PUPD register differ when compared to the RZ/G2L family and the RZ/V2H(P) SoC. Value | RZ/G2L | RZ/V2H --------------------------------- 00b: | Bias Disabled | Pull up/down disabled 01b: | Pull-up | Pull up/down disabled 10b: | Pull-down | Pull-down 11b: | Prohibited | Pull-up Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-12-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b588b53b2c474bdebbac0a663e0a6a0390db2fdf Author: Lad Prabhakar Date: Thu May 30 18:38:52 2024 +0100 pinctrl: renesas: rzg2l: Add support to configure slew-rate Add support to configure slew-rate property of the pin. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240530173857.164073-11-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7d566a4d270c52ffffd04b78b753bb3ce8cbb867 Author: Lad Prabhakar Date: Thu May 30 18:38:51 2024 +0100 pinctrl: renesas: rzg2l: Add function pointers for OEN register access Introduce function pointers oen_read() and oen_write(), in the struct rzg2l_pinctrl_data to facilitate reading and writing to the PFC_OEN register. On the RZ/V2H(P) SoC, unlocking the PWPR.REGWE_B bit before writing to the PFC_OEN register is necessary, and the PFC_OEN register has more bits compared to the RZ/G2L family. To handle these differences between RZ/G2L and RZ/V2H(P) and to reuse the existing code for RZ/V2H(P), these function pointers are introduced. Additionally, populate these function pointers with appropriate data for existing SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-10-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ede014cd1ea6422d7436bd0a1771fe0d7b0fe12a Author: Lad Prabhakar Date: Thu May 30 18:38:50 2024 +0100 pinctrl: renesas: rzg2l: Add function pointer for PMC register write Introduces pmc_writeb() function pointer, in the struct rzg2l_pinctrl_data to facilitate writing to the PMC register. On the RZ/V2H(P) SoC, unlocking the PWPR.REGWE_A bit before writing to PMC registers is required, whereas this is not the case for the existing RZ/G2L family. This addition enables the reuse of existing code for RZ/V2H(P). Additionally, populate this function pointer with appropriate data for existing SoCs. Note that this functionality is only handled in rzg2l_gpio_request(), as PMC unlock/lock during PFC setup will be taken care of in the pwpr_pfc_lock_unlock() function pointer. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 14c32dc1f63d0de865e67c04c919ae036de20f87 Author: Lad Prabhakar Date: Thu May 30 18:38:49 2024 +0100 pinctrl: renesas: rzg2l: Add function pointer for PFC register locking On the RZ/G2L SoC, the PFCWE bit controls writing to PFC registers. However, on the RZ/V2H(P) SoC, the PFCWE (REGWE_A on RZ/V2H) bit controls writing to both PFC and PMC registers. Additionally, BIT(7) B0WI is undocumented for the PWPR register on RZ/V2H(P) SoC. To accommodate these differences across SoC variants, introduce the pwpr_pfc_lock_unlock() function pointer. Note, in rzg2l_pinctrl_set_pfc_mode() the pwpr_pfc_lock_unlock(.., false) is now called before PMC read/write and pwpr_pfc_lock_unlock(.., true) is now called after PMC read/write this is to keep changes minimal for RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a3a632ed87f0913779092c30bd0ea7dfd81601f3 Author: Lad Prabhakar Date: Thu May 30 18:38:48 2024 +0100 pinctrl: renesas: rzg2l: Validate power registers for SD and ETH On RZ/V2H(P) SoC, the power registers for SD and ETH do not exist, resulting in invalid register offsets. Ensure that the register offsets are valid before any read/write operations are performed. If the power registers are not available, both SD and ETH will be set to '0'. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 08b68ae5a0276f293c8da602f963f6de68b3599b Author: Lad Prabhakar Date: Thu May 30 18:38:47 2024 +0100 pinctrl: renesas: rzg2l: Enable variable configuration for all Enable parsing of variable configuration for all architectures. This prepares for adding support for the RZ/V2H SoC, which utilizes the ARM64 architecture and features port pins with variable configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 13a8cae6e561d607474f905028781a5aee7205cb Author: Lad Prabhakar Date: Thu May 30 18:38:46 2024 +0100 pinctrl: renesas: rzg2l: Drop struct rzg2l_variable_pin_cfg Drop the rzg2l_variable_pin_cfg struct and instead use the RZG2L_VARIABLE_PIN_CFG_PACK() macro for the variable pin configuration. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8081a03793d3276c50d55a6f561872168eccf944 Author: Lad Prabhakar Date: Thu May 30 18:38:45 2024 +0100 pinctrl: renesas: rzg2l: Allow more bits for pin configuration The pin configuration bits have been growing for every new SoCs being added for the pinctrl-rzg2l driver which would mean updating the macros every time for each new configuration. To avoid this allocate additional bits for pin configuration by relocating the known fixed bits to the very end of the configuration. Also update the size of 'cfg' to 'u64' to allow more configuration bits in the 'struct rzg2l_variable_pin_cfg'. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Tested-by: Claudiu Beznea # on RZ/G3S Link: https://lore.kernel.org/r/20240530173857.164073-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f92d44a00bd559f411b2c70b677afbc7c4723019 Author: Niklas Söderlund Date: Thu Jun 6 19:08:58 2024 +0200 clk: renesas: r8a779h0: Add VIN clocks Add the VIN module clocks, which are used by the VIN modules on the Renesas R-Car V4M (R8A779H0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240606170858.1694652-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit d8abcb7377ab10a923512792aed4d6d0ebd5f362 Author: Lad Prabhakar Date: Thu Jun 6 17:10:47 2024 +0100 dt-bindings: clock: renesas,rzg2l-cpg: Update description for #reset-cells For the RZ/G2L and similar SoCs, the reset specifier is the reset number and not the module number. Reflect this in the description for the '#reset-cells' property. Reported-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240606161047.663833-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 880f5f58fd1aa22540d7e24693f411f6416b86d3 Author: Vincenzo Mezzela Date: Fri Jun 7 18:33:50 2024 +0200 drivers: arch_topology: use __free attribute instead of of_node_put() Introduce the __free attribute for scope-based resource management. Resources allocated with __free are automatically released at the end of the scope. This enhancement aims to mitigate memory management issues associated with forgetting to release resources by utilizing __free instead of of_node_put(). The declaration of the device_node used within the do-while loops is moved directly within the loop so that the resource is automatically freed at the end of each iteration. Acked-by: Sudeep Holla Suggested-by: Julia Lawall Signed-off-by: Vincenzo Mezzela Link: https://lore.kernel.org/r/20240607163350.392971-3-vincenzo.mezzela@gmail.com Signed-off-by: Greg Kroah-Hartman commit 97b1974547c517d8b5cba1fa0cc7213399ff0d2c Author: Vincenzo Mezzela Date: Fri Jun 7 18:33:49 2024 +0200 drivers: arch_topology: Refactor do-while loops Refactor do-while loops to move break condition within the loop's scope. This modification is in preparation to move the declaration of the device_node directly within the loop and take advantage of the automatic cleanup feature provided by the __free(device_node) attribute. Acked-by: Sudeep Holla Signed-off-by: Vincenzo Mezzela Link: https://lore.kernel.org/r/20240607163350.392971-2-vincenzo.mezzela@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3a1ac6b8f603a9310274990a0ad563a5fb709f59 Author: Primoz Fiser Date: Thu Jun 6 09:01:27 2024 +0200 OPP: ti: Fix ti_opp_supply_probe wrong return values Function ti_opp_supply_probe() since commit 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") returns wrong values when all goes well and hence driver probing eventually fails. Fixes: 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") Signed-off-by: Primoz Fiser Signed-off-by: Viresh Kumar commit 34ff659017359116dd58b1e008d99d21b96b3569 Author: Tom Lendacky Date: Wed Jun 5 10:18:46 2024 -0500 x86/sev: Use kernel provided SVSM Calling Areas The SVSM Calling Area (CA) is used to communicate between Linux and the SVSM. Since the firmware supplied CA for the BSP is likely to be in reserved memory, switch off that CA to a kernel provided CA so that access and use of the CA is available during boot. The CA switch is done using the SVSM core protocol SVSM_CORE_REMAP_CA call. An SVSM call is executed by filling out the SVSM CA and setting the proper register state as documented by the SVSM protocol. The SVSM is invoked by by requesting the hypervisor to run VMPL0. Once it is safe to allocate/reserve memory, allocate a CA for each CPU. After allocating the new CAs, the BSP will switch from the boot CA to the per-CPU CA. The CA for an AP is identified to the SVSM when creating the VMSA in preparation for booting the AP. [ bp: Heavily simplify svsm_issue_call() asm, other touchups. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/fa8021130bcc3bcf14d722a25548cb0cdf325456.1717600736.git.thomas.lendacky@amd.com commit 878e70dbd26e234e6e6941dac3a233af6f632184 Author: Tom Lendacky Date: Wed Jun 5 10:18:45 2024 -0500 x86/sev: Check for the presence of an SVSM in the SNP secrets page During early boot phases, check for the presence of an SVSM when running as an SEV-SNP guest. An SVSM is present if not running at VMPL0 and the 64-bit value at offset 0x148 into the secrets page is non-zero. If an SVSM is present, save the SVSM Calling Area address (CAA), located at offset 0x150 into the secrets page, and set the VMPL level of the guest, which should be non-zero, to indicate the presence of an SVSM. [ bp: Touchups. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/9d3fe161be93d4ea60f43c2a3f2c311fe708b63b.1717600736.git.thomas.lendacky@amd.com commit b547fc2c9927a95808ef93d7fbd5dd70679fb501 Author: Tom Lendacky Date: Wed Jun 5 10:18:44 2024 -0500 x86/irqflags: Provide native versions of the local_irq_save()/restore() Functions that need to disable IRQs, but are common to both early boot and post-boot execution, are unable to deal with paravirt support associated with local_irq_save() and local_irq_restore(). Create native versions of these for use in these situations. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/c4c33c0d07200164a3dd8cfd6da0344f57732648.1717600736.git.thomas.lendacky@amd.com commit 1676ecd303acca213852156fed0873c265d88512 Author: Mitul Golani Date: Mon Jun 10 12:52:02 2024 +0530 drm/i915: Compute CMRR and calculate vtotal Compute Fixed Average Vtotal/CMRR with resepect to userspace VRR enablement. Also calculate required parameters in case of CMRR is enabled. During intel_vrr_compute_config, CMRR is getting enabled based on userspace has enabled Variable refresh mode with VRR timing generator or not. Make CMRR as small subset of FAVT mode, when Panel is running on Fixed refresh rate and on VRR framework then only enable CMRR to match with actual refresh rate. --v2: - Update is_cmrr_frac_required function return as bool, not int. [Jani] - Use signed int math instead of unsigned in cmrr_get_vtotal2. [Jani] - Fix typo and usage of camel case in cmrr_get_vtotal. [Jani] - Use do_div in cmrr_get_vtotalwhile calculating cmrr_m. [ Jani] - Simplify cmrr and vrr compute config in intel_vrr_compute_config. [Jani] - Correct valiable name usage in is_cmrr_frac_required. [Ville] --v3: - Removing RFC tag. --v4: - Added edp check to address edp usecase for now. (ville) - Updated is_cmrr_fraction_required to more simplified calculation. - on longterm goal to be worked upon uapi as suggestion from ville. --v5: - Correct vtotal paramas accuracy and add 2 digit precision. - Avoid using DIV_ROUND_UP and improve scanline precision. --v6: - Make CMRR a small subset of FAVT mode. --v7: - Update commit message to avoid confusion with Legacy VRR (Ankit). - Add cmrr.enable in last, so remove from this patch. --v8: - Set cmrr.enable in current patch instead of separate patch (Ankit). - Since vrr.enable and cmrr.enable are not mutually exclusive, handle accordingly (Ankit). - is_edp is not required inside is_cmrr_frac_required function (Ankit). - Add video_mode_required flag for future enhancement. - Correct cmrr_m/cmrr_n calculation. --v9: - Move patch to last and set other bits before computing cmrr.enable.(Ankit) - Add TODO: for to address target refresh rate precision as future enhancement. Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-10-mitulkumar.ajitkumar.golani@intel.com commit 5922f45329cd67e1c37c2c01513a59da82a65b96 Author: Mitul Golani Date: Mon Jun 10 12:52:01 2024 +0530 drm/i915/display: Compute vrr vsync params Compute vrr vsync params in case of FAVT as well instead of only to AVT mode of operation. --v2: - Remove redundant computation for vrr_vsync_start and vrr_vsync_end(Ankit). --v3: - vrr.enable and cmrr.enable check together is not required as both will be true at the same point in time. (Ankit) - Replace vrr.enable flag to cmrr.enable, mistakenly added. (Ankit) Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-9-mitulkumar.ajitkumar.golani@intel.com commit 0612514db728a28982759e62da3c76444ae15281 Author: Mitul Golani Date: Mon Jun 10 12:52:00 2024 +0530 drm/i915/display: Compute Adaptive sync SDP params Compute params for Adaptive Sync SDP when Fixed Average Vtotal mode is enabled. --v2: Since vrr.enable is set in case of cmrr also, handle accordingly(Ankit). --v3: - Since vrr.enable is set in case of cmrr also, handle accordingly(Ankit). - check cmrr.enable when CMRR flags are set during intel_dp_compute_as_sdp. --v4: - Use drm_mode_vrefresh instead of manual calculation (Ankit). Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-8-mitulkumar.ajitkumar.golani@intel.com commit eba88f28121507b14b328c6e61818c794f313b17 Author: Mitul Golani Date: Mon Jun 10 12:51:59 2024 +0530 drm/i915/display: Add support for pack and unpack Add support of pack and unpack for target_rr_divider. --v2: - Set Target Refresh Rate Divider bit when related AS SDP bit is set (Ankit). --v3: - target_rr_divider is bools so set accordingly (Ankit). Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-7-mitulkumar.ajitkumar.golani@intel.com commit a20c6d954d75b2e188618e36de43d13d413d4e06 Author: Mitul Golani Date: Mon Jun 10 12:51:58 2024 +0530 drm/dp: Add refresh rate divider to struct representing AS SDP Add target_rr_divider to structure representing AS SDP. It is valid only in FAVT mode, sink device ignores the bit in AVT mode. --v2: - Update commit header and send patch to dri-devel. Signed-off-by: Mitul Golani Reviewed-by: Arun R Murthy Acked-by: Maxime Ripard Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-6-mitulkumar.ajitkumar.golani@intel.com commit de065ceeaa2f78c770d5dc586fbd4fa4f915c606 Author: Mitul Golani Date: Mon Jun 10 12:51:57 2024 +0530 drm/i915: Update trans_vrr_ctl flag when cmrr is computed Add/update trans_vrr_ctl flag when crtc_state->cmrr.enable is set, With this commit setting the stage for subsequent CMRR enablement. --v2: - Check pipe active state in cmrr enabling. [Jani] - Remove usage of bitwise OR on booleans. [Jani] - Revert unrelated changes. [Jani] - Update intel_vrr_enable, vrr and cmrr enable conditions. [Jani] - Simplify whole if-ladder in intel_vrr_enable. [Jani] - Revert patch restructuring mistakes in intel_vrr_get_config. [Jani] --v3: - Check pipe active state in cmrr disabling.[Jani] - Correct messed up condition in intel_vrr_enable. [Jani] --v4: - Removing RFC tag. --v5: - CMRR handling in co-existatnce of LRR and DRRS. --v7: - Rebase on top of AS SDP merge. --v8: - Remove cmrr_enabling/disabling and update commit message. (Ankit) --v9: - Revert removed line(Ankit). Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-5-mitulkumar.ajitkumar.golani@intel.com commit 06173340336c8f21ed5151a93a5398a8725c4704 Author: Mitul Golani Date: Mon Jun 10 12:51:56 2024 +0530 drm/i915: Define and compute Transcoder CMRR registers Add register definitions for Transcoder Fixed Average Vtotal mode/CMRR function, with the necessary bitfields. Compute these registers when CMRR is enabled, extending Adaptive refresh rate capabilities. --v2: - Use intel_de_read64_2x32 in intel_vrr_get_config. [Jani] - Fix indent and order based on register offset. [Jani] --v3: - Removing RFC tag. --v4: - Update place holder for CMRR register definition. (Jani) --v5: - Add CMRR register definitions to a separate file intel_vrr_reg.h. --v6: - Fixed indentation. (Jani) - Add dependency header intel_display_reg_defs.h. (Jani) - Rename file name to intel_vrr_regs.h instead of reg.h (Jani) --v7: - Remove adding CMRR flag to vrr_ctl register during set_transcoder_timing, as it is already being done during intel_vrr_enable. (Ankit) Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-4-mitulkumar.ajitkumar.golani@intel.com commit 6eb82761887a6e031b6cb85d4491f434b9c7e73c Author: Mitul Golani Date: Mon Jun 10 12:51:55 2024 +0530 drm/i915: Separate VRR related register definitions Move VRR related register definitions to a separate file called intel_vrr_regs.h. Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-3-mitulkumar.ajitkumar.golani@intel.com commit fc8fc81cb8302831146f806f96a50d6debf5aaf3 Author: Mitul Golani Date: Mon Jun 10 12:51:54 2024 +0530 drm/i915: Update indentation for VRR registers and bits Update the indentation for the VRR register definition and its bits, and fix checkpatch issues to ensure smooth movement of registers and bits. --v2: - Keep XELPD_VRR_CTL_VRR_GUARDBAND(x) to avoid readability (Ankit). - Fix all indentation related VRR registers and bits instead of checkpatch one. Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-2-mitulkumar.ajitkumar.golani@intel.com commit 1ddaaa244021aba8496536a6627b4ad2bc0f936a Merge: 7957066ca614b b95fa494d6b74 Author: Dave Airlie Date: Tue Jun 11 14:01:55 2024 +1000 Merge tag 'amd-drm-next-6.11-2024-06-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.11-2024-06-07: amdgpu: - DCN 4.0.x support - DCN 3.5 updates - GC 12.0 support - DP MST fixes - Cursor fixes - MES11 updates - MMHUB 4.1 support - DML2 Updates - DCN 3.1.5 fixes - IPS fixes - Various code cleanups - GMC 12.0 support - SDMA 7.0 support - SMU 13 updates - SR-IOV fixes - VCN 5.x fixes - MES12 support - SMU 14.x updates - Devcoredump improvements - Fixes for HDP flush on platforms with >4k pages - GC 9.4.3 fixes - RAS ACA updates - Silence UBSAN flex array warnings - MMHUB 3.3 updates amdkfd: - Contiguous VRAM allocations - GC 12.0 support - SDMA 7.0 support - SR-IOV fixes radeon: - Backlight workaround for iMac - Silence UBSAN flex array warnings UAPI: - GFX12 modifier and DCC support Proposed Mesa changes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29510 - KFD GFX ALU exceptions Proposed ROCdebugger changes: https://github.com/ROCm/ROCdbgapi/commit/08c760622b6601abf906f75abbc5e21d9fd425df https://github.com/ROCm/ROCgdb/commit/944fe1c1414a68700414e86e32273b6bfa62ba6f - KFD Contiguous VRAM allocation flag Proposed ROCr/HIP changes: https://github.com/ROCm/ROCT-Thunk-Interface/commit/f7b4a269914a3ab4f1e2453c2879adb97b5cc9e5 https://github.com/ROCm/ROCR-Runtime/pull/214/commits/26e8530d05a775872cb06dde6693db72be0c454a https://github.com/ROCm/clr/commit/1d48f2a1ab38b632919c4b7274899b3faf4279ff Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240607195900.902537-1-alexander.deucher@amd.com commit fc2c1d716d4a879dd52c612ea19a7f994f08748d Author: Jeff Johnson Date: Wed Jun 5 15:07:21 2024 -0700 firmware: google: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/gsmi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/coreboot_table.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/framebuffer-coreboot.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/memconsole.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/memconsole-coreboot.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/memconsole-x86-legacy.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/cbmem.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/google/vpd-sysfs.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240605-md-drivers-firmware-google-v1-1-18878de97fa5@quicinc.com Signed-off-by: Tzung-Bi Shih commit bb678f01804ccaa861b012b2b9426d69673d8a84 Merge: 2ebb87f45b3c6 dee55767dc8ca Author: Jakub Kicinski Date: Mon Jun 10 19:52:50 2024 -0700 Merge branch 'intel-wired-lan-driver-updates-2024-06-03' Jacob Keller says: ==================== Intel Wired LAN Driver Updates 2024-06-03 This series includes miscellaneous improvements for the ice as well as a cleanup to the Makefiles for all Intel net drivers. Andy fixes all of the Intel net driver Makefiles to use the documented '*-y' syntax for specifying object files to link into kernel driver modules, rather than the '*-objs' syntax which works but is documented as reserved for user-space host programs. Jacob has a cleanup to refactor rounding logic in the ice driver into a common roundup_u64 helper function. Michal Schmidt replaces irq_set_affinity_hint() to use irq_update_affinity_hint() which behaves better with user-applied affinity settings. v2: https://lore.kernel.org/r/20240605-next-2024-06-03-intel-next-batch-v2-0-39c23963fa78@intel.com v1: https://lore.kernel.org/r/20240603-next-2024-06-03-intel-next-batch-v1-0-e0523b28f325@intel.com ==================== Link: https://lore.kernel.org/r/20240607-next-2024-06-03-intel-next-batch-v3-0-d1470cee3347@intel.com Signed-off-by: Jakub Kicinski commit dee55767dc8ca3fc6127a792e2a8b69c5e03fdd2 Author: Michal Schmidt Date: Fri Jun 7 14:22:34 2024 -0700 ice: use irq_update_affinity_hint() irq_set_affinity_hint() is deprecated. Use irq_update_affinity_hint() instead. This removes the side-effect of actually applying the affinity. The driver does not really need to worry about spreading its IRQs across CPUs. The core code already takes care of that. On the contrary, when the driver applies affinities by itself, it breaks the users' expectations: 1. The user configures irqbalance with IRQBALANCE_BANNED_CPULIST in order to prevent IRQs from being moved to certain CPUs that run a real-time workload. 2. ice reconfigures VSIs at runtime due to a MIB change (ice_dcb_process_lldp_set_mib_change). Reopening a VSI resets the affinity in ice_vsi_req_irq_msix(). 3. ice has no idea about irqbalance's config, so it may move an IRQ to a banned CPU. The real-time workload suffers unacceptable latency. I am not sure if updating the affinity hints is at all useful, because irqbalance ignores them since 2016 ([1]), but at least it's harmless. This ice change is similar to i40e commit d34c54d1739c ("i40e: Use irq_update_affinity_hint()"). [1] https://github.com/Irqbalance/irqbalance/commit/dcc411e7bfdd Signed-off-by: Michal Schmidt Reviewed-by: Sunil Goutham Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240607-next-2024-06-03-intel-next-batch-v3-3-d1470cee3347@intel.com Signed-off-by: Jakub Kicinski commit 1d4ce389da2b84e0e24aad5e83fe9c742adc3f99 Author: Jacob Keller Date: Fri Jun 7 14:22:33 2024 -0700 ice: add and use roundup_u64 instead of open coding equivalent In ice_ptp_cfg_clkout(), the ice driver needs to calculate the nearest next second of a current time value specified in nanoseconds. It implements this using div64_u64, because the time value is a u64. It could use div_u64 since NSEC_PER_SEC is smaller than 32-bits. Ideally this would be implemented directly with roundup(), but that can't work on all platforms due to a division which requires using the specific macros and functions due to platform restrictions, and to ensure that the most appropriate and fast instructions are used. The kernel doesn't currently provide any 64-bit equivalents for doing roundup. Attempting to use roundup() on a 32-bit platform will result in a link failure due to not having a direct 64-bit division. The closest equivalent for this is DIV64_U64_ROUND_UP, which does a division always rounding up. However, this only computes the division, and forces use of the div64_u64 in cases where the divisor is a 32bit value and could make use of div_u64. Introduce DIV_U64_ROUND_UP based on div_u64, and then use it to implement roundup_u64 which takes a u64 input value and a u32 rounding value. The name roundup_u64 matches the naming scheme of div_u64, and future patches could implement roundup64_u64 if they need to round by a multiple that is greater than 32-bits. Replace the logic in ice_ptp.c which does this equivalent with the newly added roundup_u64. Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240607-next-2024-06-03-intel-next-batch-v3-2-d1470cee3347@intel.com Signed-off-by: Jakub Kicinski commit a2fe35df41c4cfce44f9f87d417cbd44a27b7362 Author: Andy Shevchenko Date: Fri Jun 7 14:22:32 2024 -0700 net: intel: Use *-y instead of *-objs in Makefile *-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Reviewed-by: Aleksandr Loktionov Reviewed-by: Alexander Lobakin Signed-off-by: Andy Shevchenko Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240607-next-2024-06-03-intel-next-batch-v3-1-d1470cee3347@intel.com Signed-off-by: Jakub Kicinski commit d11c00292a31537ae1e46ddea8f101f8822ede34 Author: Jeff Johnson Date: Mon Jun 10 14:50:37 2024 -0700 platform/chrome: cros_ec_proto: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/chrome/cros_kunit_proto_test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240610-md-drivers-platform-chrome-v1-1-f9c75adcc1ca@quicinc.com Signed-off-by: Tzung-Bi Shih commit df2f9708ff1f23afdf6804bb16199e1903550582 Author: Johannes Thumshirn Date: Tue May 14 00:37:18 2024 +0200 zonefs: enable support for large folios Enable large folio support on zonefs. Cc: Matthew Wilcox Cc: Damien Le Moal Signed-off-by: Johannes Thumshirn Reviewed-by: Bill O'Donnell Signed-off-by: Damien Le Moal commit 2ebb87f45b3c6adc97b29291102ecb97274f913f Author: Jeff Johnson Date: Fri Jun 7 11:56:56 2024 -0700 isdn: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/hfcpci.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/hfcmulti.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/hfcsusb.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/avmfritz.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/speedfax.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/mISDNinfineon.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/w6692.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/netjet.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/mISDNipac.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/hardware/mISDN/mISDNisar.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/mISDN/mISDN_core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/mISDN/mISDN_dsp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/isdn/mISDN/l1oip.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240607-md-drivers-isdn-v1-1-81fb7001bc3a@quicinc.com Signed-off-by: Jakub Kicinski commit b1156532bc29ac9a8d1cf71510cabc8f68181540 Merge: 93d4e8bb3f137 f85af9d955ac9 Author: Jakub Kicinski Date: Mon Jun 10 18:02:14 2024 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2024-06-06 We've added 54 non-merge commits during the last 10 day(s) which contain a total of 50 files changed, 1887 insertions(+), 527 deletions(-). The main changes are: 1) Add a user space notification mechanism via epoll when a struct_ops object is getting detached/unregistered, from Kui-Feng Lee. 2) Big batch of BPF selftest refactoring for sockmap and BPF congctl tests, from Geliang Tang. 3) Add BTF field (type and string fields, right now) iterator support to libbpf instead of using existing callback-based approaches, from Andrii Nakryiko. 4) Extend BPF selftests for the latter with a new btf_field_iter selftest, from Alan Maguire. 5) Add new kfuncs for a generic, open-coded bits iterator, from Yafang Shao. 6) Fix BPF selftests' kallsyms_find() helper under kernels configured with CONFIG_LTO_CLANG_THIN, from Yonghong Song. 7) Remove a bunch of unused structs in BPF selftests, from David Alan Gilbert. 8) Convert test_sockmap section names into names understood by libbpf so it can deduce program type and attach type, from Jakub Sitnicki. 9) Extend libbpf with the ability to configure log verbosity via LIBBPF_LOG_LEVEL environment variable, from Mykyta Yatsenko. 10) Fix BPF selftests with regards to bpf_cookie and find_vma flakiness in nested VMs, from Song Liu. 11) Extend riscv32/64 JITs to introduce shift/add helpers to generate Zba optimization, from Xiao Wang. 12) Enable BPF programs to declare arrays and struct fields with kptr, bpf_rb_root, and bpf_list_head, from Kui-Feng Lee. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (54 commits) selftests/bpf: Drop useless arguments of do_test in bpf_tcp_ca selftests/bpf: Use start_test in test_dctcp in bpf_tcp_ca selftests/bpf: Use start_test in test_dctcp_fallback in bpf_tcp_ca selftests/bpf: Add start_test helper in bpf_tcp_ca selftests/bpf: Use connect_to_fd_opts in do_test in bpf_tcp_ca libbpf: Auto-attach struct_ops BPF maps in BPF skeleton selftests/bpf: Add btf_field_iter selftests selftests/bpf: Fix send_signal test with nested CONFIG_PARAVIRT libbpf: Remove callback-based type/string BTF field visitor helpers bpftool: Use BTF field iterator in btfgen libbpf: Make use of BTF field iterator in BTF handling code libbpf: Make use of BTF field iterator in BPF linker code libbpf: Add BTF field iterator selftests/bpf: Ignore .llvm. suffix in kallsyms_find() selftests/bpf: Fix bpf_cookie and find_vma in nested VM selftests/bpf: Test global bpf_list_head arrays. selftests/bpf: Test global bpf_rb_root arrays and fields in nested struct types. selftests/bpf: Test kptr arrays and kptrs in nested struct fields. bpf: limit the number of levels of a nested struct type. bpf: look into the types of the fields of a struct type recursively. ... ==================== Link: https://lore.kernel.org/r/20240606223146.23020-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 93d4e8bb3f137e8037a65ea96f175f81c25c50e5 Merge: 2ba6d15786f6c a46300b1b09ba Author: Jakub Kicinski Date: Mon Jun 10 17:40:25 2024 -0700 Merge tag 'wireless-next-2024-06-07' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.11 The first "new features" pull request for v6.11 with changes both in stack and in drivers. Nothing out of ordinary, except that we have two conflicts this time: net/mac80211/cfg.c https://lore.kernel.org/all/20240531124415.05b25e7a@canb.auug.org.au drivers/net/wireless/microchip/wilc1000/netdev.c https://lore.kernel.org/all/20240603110023.23572803@canb.auug.org.au Major changes: cfg80211/mac80211 * parse Transmit Power Envelope (TPE) data in mac80211 instead of in drivers wilc1000 * read MAC address during probe to make it visible to user space iwlwifi * bump FW API to 91 for BZ/SC devices * report 64-bit radiotap timestamp * enable P2P low latency by default * handle Transmit Power Envelope (TPE) advertised by AP * start using guard() rtlwifi * RTL8192DU support ath12k * remove unsupported tx monitor handling * channel 2 in 6 GHz band support * Spatial Multiplexing Power Save (SMPS) in 6 GHz band support * multiple BSSID (MBSSID) and Enhanced Multi-BSSID Advertisements (EMA) support * dynamic VLAN support * add panic handler for resetting the firmware state ath10k * add qcom,no-msa-ready-indicator Device Tree property * LED support for various chipsets * tag 'wireless-next-2024-06-07' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (194 commits) wifi: ath12k: add hw_link_id in ath12k_pdev wifi: ath12k: add panic handler wifi: rtw89: chan: Use swap() in rtw89_swap_sub_entity() wifi: brcm80211: remove unused structs wifi: brcm80211: use sizeof(*pointer) instead of sizeof(type) wifi: ath12k: do not process consecutive RDDM event dt-bindings: net: wireless: ath11k: Drop "qcom,ipq8074-wcss-pil" from example wifi: ath12k: fix memory leak in ath12k_dp_rx_peer_frag_setup() wifi: rtlwifi: handle return value of usb init TX/RX wifi: rtlwifi: Enable the new rtl8192du driver wifi: rtlwifi: Add rtl8192du/sw.c wifi: rtlwifi: Constify rtl_hal_cfg.{ops,usb_interface_cfg} and rtl_priv.cfg wifi: rtlwifi: Add rtl8192du/dm.{c,h} wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h} wifi: rtlwifi: Add rtl8192du/rf.{c,h} wifi: rtlwifi: Add rtl8192du/trx.{c,h} wifi: rtlwifi: Add rtl8192du/phy.{c,h} wifi: rtlwifi: Add rtl8192du/hw.{c,h} wifi: rtlwifi: Add new members to struct rtl_priv for RTL8192DU wifi: rtlwifi: Add rtl8192du/table.{c,h} ... Signed-off-by: Jakub Kicinski ==================== Link: https://lore.kernel.org/r/20240607093517.41394C2BBFC@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 6828d6929b763499b7a8768c623891f5d4fca258 Author: Ian Rogers Date: Fri May 3 16:28:49 2024 -0700 perf evsel: Refactor tool events Tool events unnecessarily open a dummy perf event which is useless even with `perf record` which will still open a dummy event. Change the behavior of tool events so: - duration_time - call `rdclock` on open and then report the count as a delta since the start in evsel__read_counter. This moves code out of builtin-stat making it more general purpose. - user_time/system_time - open the fd as either `/proc/pid/stat` or `/proc/stat` for cases like system wide. evsel__read_counter will read the appropriate field out of the procfs file. These values were previously supplied by wait4, if the procfs read fails then the wait4 values are used, assuming the process/thread terminated. By reading user_time and system_time this way, interval mode, per PID and per CPU can be supported although there are restrictions given what the files provide (e.g. per PID can't be combined with per CPU). Opening any of the tool events for `perf record` is changed to return invalid. Signed-off-by: Ian Rogers Tested-by: Weilin Wang Cc: Ravi Bangoria Cc: James Clark Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: Ze Gao Cc: Song Liu Cc: Leo Yan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240503232849.17752-1-irogers@google.com commit 7957066ca614b63aa6687e825ccbc215fa4584ea Merge: 83a7eefedc9b5 6800e63cf97ba Author: Dave Airlie Date: Tue Jun 11 09:08:54 2024 +1000 Merge tag 'drm-xe-next-2024-06-06' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next UAPI Changes: - Expose the L3 bank mask (Francois) Cross-subsystem Changes: - Update Xe driver maintainers (Oded) Display (i915): - Add missing include to intel_vga.c (Michal Wajdeczko) Driver Changes: - Fix Display (xe-only) detection for ADL-N (Lucas) - Runtime PM fixes that enabled PC-10 and D3Cold (Francois, Rodrigo) - Fix unexpected silent drm backmerge issues (Thomas) - More (a lot more) preparation for SR-IOV support (Michal Wajdeczko) - Devcoredump fixes and improvements (Jose, Tejas, Matt Brost) - Introduce device 'wedged' state (Rodrigo) - Improve debug and info messages (Michal Wajdeczko, Rodrigo, Nirmoy) - Adding or fixing workarounds (Tejas, Shekhar, Lucas, Bommu) - Check result of drmm_mutex_init (Michal Wajdeczko) - Enlarge the critical dma fence area for preempt fences (Matt Auld) - Prevent UAF in VM's rebind work (Matt Auld) - GuC submit related clean-ups and fixes (Matt Brost, Himal, Jonathan, Niranjana) - Prefer local helpers to perform dma reservation locking (Himal) - Spelling and typo fixes (Colin, Francois) - Prep patches for 1 job per VM bind IOCTL (no uapi change yet) (Matt Brost) - Remove uninitialized end var from xe_gt_tlb_invalidation_range (Nirmoy) - GSC related changes targeting LNL support (Daniele) - Fix assert in L3 bank mask generation (Francois) - Perform dma_map when moving system buffer objects to TT (Thomas) - Add helpers for manipulating macro arguments (Michal Wajdeczko) - Refactor default device atomic settings (Nirmoy) - Add debugfs node to dump mocs (Janga) - Use ordered WQ for G2H handler (Matt Brost) - Clean up and fixes in header includes (Michal Wajdeczko) - Prefer flexible-array over deprecated zero-lenght ones (Lucas) - Add Indirect Ring State support (Niranjana) - Fix UBSAN shift-out-of-bounds failure (Shuicheng) - HWMon fixes and additions (Karthik) - Clean-up refactor around probe init functions (Lucas, Michal Wajdeczko) - Fix PCODE init function (Himal) - Only use reserved BCS instances for usm migrate exec queue (Matt Brost) - Only zap PTEs as needed (Matt Brost) - Per client usage info (Lucas) - Core hotunplug improvements converting stuff towards devm (Matt Auld) - Don't emit false error if running in execlist mode (Michal Wajdeczko) - Remove unused struct (Dr. David) - Support/debug for slow GuC loads (John Harrison) - Decouple job seqno and lrc seqno (Matt Brost) - Allow migrate vm gpu submissions from reclaim context (Thomas) - Rename drm-client running time to run_ticks and fix a UAF (Umesh) - Check empty pinned BO list with lock held (Nirmoy) - Drop undesired prefix from the platform name (Michal Wajdeczko) - Remove unwanted mutex locking on xe file close (Niranjana) - Replace format-less snprintf() with strscpy() (Arnd) - Other general clean-ups on registers definitions and function names (Michal Wajdeczko) - Add kernel-doc to some xe_lrc interfaces (Niranajana) - Use missing lock in relay_needs_worker (Nirmoy) - Drop redundant W=1 warnings from Makefile (Jani) - Simplify if condition in preempt fences code (Thorsten) - Flush engine buffers before signalling user fence on all engines (Andrzej) - Don't overmap identity VRAM mapping (Matt Brost) - Do not dereference NULL job->fence in trace points (Matt Brost) - Add synchronous gt reset debugfs (Jonathan) - Xe gt_idle fixes (Riana) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZmItmuf7vq_xvRjJ@intel.com commit 0ac3f1a4c2a345c48d22e8eb5b5aeb9304cb11db Author: Animesh Agarwal Date: Fri Jun 7 11:27:20 2024 +0530 ASoC: dt-bindings: ak4554: Convert to dtschema Convert the AK4554 sound codec bindings to DT schema. Signed-off-by: Animesh Agarwal Cc: Daniel Baluta Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240607055725.38057-1-animeshagarwal28@gmail.com Signed-off-by: Mark Brown commit 4267fda4afd9fcf1f92b6bfa0259295f140c8ecd Author: Steven Rostedt (Google) Date: Fri Jun 7 09:48:33 2024 -0400 function_graph: Make fgraph_update_pid_func() a stub for !DYNAMIC_FTRACE When CONFIG_DYNAMIC_FTRACE is not set, the function fgraph_update_pid_func() doesn't do anything. Currently, most of its logic is within a "#ifdef CONFIG_DYNAMIC_FTRACE" block, but its variables were declared outside that, and when DYNAMIC_FTRACE is not set, it produces unused variable warnings. Instead, just place it (and the helper function fgraph_pid_func()) within the #ifdef block and have the header file use a empty stub function for when DYNAMIC_FTRACE is not defined. Link: https://lore.kernel.org/linux-trace-kernel/20240607094833.6a787d73@rorschach.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406071806.BRjaC5FF-lkp@intel.com/ Signed-off-by: Steven Rostedt (Google) commit 40751808803b78f6dda7f39e6717eb9dc8c5c309 Merge: cb0ab6400987d 9b7dc68eeba04 Author: Mark Brown Date: Mon Jun 10 22:49:29 2024 +0100 ACPI/ALSA/soundwire: add acpi_get_local_u64_address() Merge series from Pierre-Louis Bossart : The acpi_get_local_address() helper assumes a 32-bit ADR is used. If we want to use this helper for SoundWire/SDCA ASoC codecs, we need an extension where the native 64-bits are used. This patchset suggests a new helper, acpi_get_local_address() may be renamed if desired in a folow-up patch. The path of least resistance would be to merge this patchset in the ASoC tree, since I have additional changes for ASoC/SDCA (SoundWire Device Class) that depend on the new helper. Pierre-Louis Bossart (3): ACPI: utils: introduce acpi_get_local_u64_address() soundwire: slave: simplify code with acpi_get_local_u64_address() ALSA: hda: intel-sdw-acpi: use acpi_get_local_u64_address() drivers/acpi/utils.c | 22 ++++++++++++++++------ drivers/soundwire/slave.c | 13 ++++--------- include/linux/acpi.h | 1 + sound/hda/intel-sdw-acpi.c | 6 +++--- 4 files changed, 24 insertions(+), 18 deletions(-) -- 2.43.0 commit cb0ab6400987decc3f205606c2e96198eef6bc67 Merge: b97e40905580c 313e978df7fc3 Author: Mark Brown Date: Mon Jun 10 22:48:53 2024 +0100 ASoC: codecs: wcd937x: add wcd937x audio codec Merge series from Mohammad Rafi Shaik : This patchset adds support for Qualcomm WCD9370/WCD9375 codec. Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 3 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 6 DMICs and MBHC. For codec driver to be functional it would need both tx and rx Soundwire devices to be up and this is taken care by using device component framework and device-links are used to ensure proper pm dependencies. Ex tx does not enter suspend before rx or codec is suspended. This patchset along with other SoundWire patches on the list have been tested on QCM6490 IDP device. commit 1028893a73fe20b2d1b90b4a6005b288286b9309 Author: Sean Christopherson Date: Fri Apr 5 16:56:03 2024 -0700 KVM: x86: Bury guest_cpuid_is_amd_or_hygon() in cpuid.c Move guest_cpuid_is_amd_or_hygon() into cpuid.c now that, except for one Intel quirk in the emulator, KVM checks for AMD vs. Intel *compatible* vCPUs, not exact vendors, i.e. now that there should not be any reason for KVM at-large to care about the exact vendor. Opportunistically refactor the guts of the helper to use "entry" instead of "best", and short circuit the !entry path to make the common case more readable. Link: https://lore.kernel.org/r/20240405235603.1173076-11-seanjc@google.com Signed-off-by: Sean Christopherson commit bdaff4f92bcee7a6205f3544bb94e2d16ad98f6b Author: Sean Christopherson Date: Fri Apr 5 16:56:02 2024 -0700 KVM: x86: Open code vendor_intel() in string_registers_quirk() Open code the is_guest_vendor_intel() check in string_registers_quirk() to discourage makiking exact vendor==Intel checks in the emulator, and to remove the rather awful #ifdeffery. The string quirk is literally the only Intel specific, *non-architectural* behavior that KVM emulates. All Intel specific behavior that is architecturally defined applies to all vendors that are compatible with Intel's architecture, i.e. should use guest_cpuid_is_intel_compatible(). Link: https://lore.kernel.org/r/20240405235603.1173076-10-seanjc@google.com Signed-off-by: Sean Christopherson commit 4067c2395e80e5109b485f1928a797be17d758ae Author: Sean Christopherson Date: Fri Apr 5 16:56:01 2024 -0700 KVM: x86: Allow SYSENTER in Compatibility Mode for all Intel compat vCPUs Emulate SYSENTER in Compatibility Mode for all vCPUs models that are compatible with Intel's architecture, as the behavior if SYSENTER is architecturally defined in Intel's SDM, i.e. should be followed by any CPU that implements Intel's architecture. Link: https://lore.kernel.org/r/20240405235603.1173076-9-seanjc@google.com Signed-off-by: Sean Christopherson commit dc2b8b2b524a46b24cc22f83cd3cb68535cfe367 Author: Sean Christopherson Date: Fri Apr 5 16:56:00 2024 -0700 KVM: SVM: Emulate SYSENTER RIP/RSP behavior for all Intel compat vCPUs Emulate bits 63:32 of the SYSENTER_R{I,S}P MSRs for all vCPUs that are compatible with Intel's architecture, not just strictly vCPUs that have vendor==Intel. The behavior of bits 63:32 is architecturally defined in the SDM, i.e. not some uarch specific quirk of Intel CPUs. Link: https://lore.kernel.org/r/20240405235603.1173076-8-seanjc@google.com Signed-off-by: Sean Christopherson commit d99e4cb2ae2e02a632d3587d710eecf5a02c20e7 Author: Sean Christopherson Date: Fri Apr 5 16:55:59 2024 -0700 KVM: x86: Use "is Intel compatible" helper to emulate SYSCALL in !64-bit Use guest_cpuid_is_intel_compatible() to determine whether SYSCALL in 32-bit Protected Mode (including Compatibility Mode) should #UD or succeed. The existing code already does the exact equivalent of guest_cpuid_is_intel_compatible(), just in a rather roundabout way. No functional change intended. Link: https://lore.kernel.org/r/20240405235603.1173076-7-seanjc@google.com Signed-off-by: Sean Christopherson commit c092fc879f99cf536881892e2dbe2a70074e9915 Author: Sean Christopherson Date: Fri Apr 5 16:55:58 2024 -0700 KVM: x86: Inhibit code #DBs in MOV-SS shadow for all Intel compat vCPUs Treat code #DBs as inhibited in MOV/POP-SS shadows for vCPU models that are Intel compatible, not just strictly vCPUs with vendor==Intel. The behavior is explicitly called out in the SDM, and thus architectural, i.e. applies to all CPUs that implement Intel's architecture, and isn't a quirk that is unique to CPUs manufactured by Intel: However, if an instruction breakpoint is placed on an instruction located immediately after a POP SS/MOV SS instruction, the breakpoint will be suppressed as if EFLAGS.RF were 1. Applying the behavior strictly to Intel wasn't intentional, KVM simply didn't have a concept of "Intel compatible" as of commit baf67ca8e545 ("KVM: x86: Suppress code #DBs on Intel if MOV/POP SS blocking is active"). Link: https://lore.kernel.org/r/20240405235603.1173076-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 6463e5e41842c58da06ce4a0ff1b5bb923f5f033 Author: Sean Christopherson Date: Fri Apr 5 16:55:57 2024 -0700 KVM: x86: Apply Intel's TSC_AUX reserved-bit behavior to Intel compat vCPUs Extend Intel's check on MSR_TSC_AUX[63:32] to all vCPU models that are Intel compatible, i.e. aren't AMD or Hygon in KVM's world, as the behavior is architectural, i.e. applies to any CPU that is compatible with Intel's architecture. Applying the behavior strictly to Intel wasn't intentional, KVM simply didn't have a concept of "Intel compatible" as of commit 61a05d444d2c ("KVM: x86: Tie Intel and AMD behavior for MSR_TSC_AUX to guest CPU model"). Link: https://lore.kernel.org/r/20240405235603.1173076-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 5a4f8b3026fc6b9337d7072c94c27b4874d9ed10 Author: Sean Christopherson Date: Fri Apr 5 16:55:56 2024 -0700 KVM: x86/pmu: Squash period for checkpointed events based on host HLE/RTM Zero out the sampling period for checkpointed events if the host supports HLE or RTM, i.e. supports transactions and thus checkpointed events, not based on whether the vCPU vendor model is Intel. Perf's refusal to allow a sample period for checkpointed events is based purely on whether or not the CPU supports HLE/RTM transactions, i.e. perf has no knowledge of the vCPU vendor model. Note, it is _extremely_ unlikely that the existing code is a problem in real world usage, as there are far, far bigger hurdles that would need to be cleared to support cross-vendor vPMUs. The motivation is mainly to eliminate the use of guest_cpuid_is_intel(), in order to get to a state where KVM pivots on AMD vs. Intel compatibility, i.e. doesn't check for exactly vendor==Intel except in rare circumstances (i.e. for CPU quirks). Cc: Like Xu Link: https://lore.kernel.org/r/20240405235603.1173076-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 37c2277fad7e90e2ca1202c9cdd13329ac91ecff Author: Julia Lawall Date: Sun Jun 9 10:27:24 2024 +0200 workqueue: replace call_rcu by kfree_rcu for simple kmem_cache_free callback Since SLOB was removed, it is not necessary to use call_rcu when the callback only performs kmem_cache_free. Use kfree_rcu() directly. The changes were done using the following Coccinelle semantic patch. This semantic patch is designed to ignore cases where the callback function is used in another way. // @r@ expression e; local idexpression e2; identifier cb,f; position p; @@ ( call_rcu(...,e2) | call_rcu(&e->f,cb@p) ) @r1@ type T; identifier x,r.cb; @@ cb(...) { ( kmem_cache_free(...); | T x = ...; kmem_cache_free(...,x); | T x; x = ...; kmem_cache_free(...,x); ) } @s depends on r1@ position p != r.p; identifier r.cb; @@ cb@p @script:ocaml@ cb << r.cb; p << s.p; @@ Printf.eprintf "Other use of %s at %s:%d\n" cb (List.hd p).file (List.hd p).line @depends on r1 && !s@ expression e; identifier r.cb,f; position r.p; @@ - call_rcu(&e->f,cb@p) + kfree_rcu(e,f) @r1a depends on !s@ type T; identifier x,r.cb; @@ - cb(...) { ( - kmem_cache_free(...); | - T x = ...; - kmem_cache_free(...,x); | - T x; - x = ...; - kmem_cache_free(...,x); ) - } // Signed-off-by: Julia Lawall Reviewed-by: Paul E. McKenney Reviewed-by: Vlastimil Babka Signed-off-by: Tejun Heo commit 01fdeca1cc2dd705b1391f31a2594214c8bd7886 Author: Alexander Aring Date: Mon Jun 10 15:26:03 2024 -0500 dlm: use rcu to avoid an extra rsb struct lookup Use rcu to free rsb structs, and hold the rcu read lock while looking up rsb structs. This allows us to avoid an extra hash table lookup for an rsb. A new rsb flag HASHED is added which is set while the rsb is in the hash table. This flag is checked in place of repeating the hash table lookup. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit c217adfc8caad240ec7bed446a6a1a801d5acc6d Author: David Teigland Date: Mon Jun 10 15:18:09 2024 -0500 dlm: fix add_scan and del_scan usage Remove a few calls to add_scan() and del_scan() in cases where the rsb is a dir record, so the rsb should never be placed on the scan list at all. Add WARN_ON to catch cases where this is done. Signed-off-by: David Teigland commit 4f5957a980d023405eb45bd31258fc8488a3acb1 Author: David Teigland Date: Mon Jun 10 15:02:31 2024 -0500 dlm: change list and timer names The old terminology of "toss" and "keep" is no longer an accurate description of the rsb states and lists, so change the names to "inactive" and "active". The old names had also been copied into the scanning code, which is changed back to use the "scan" name. - "active" rsb structs have lkb's attached, and are ref counted. - "inactive" rsb structs have no lkb's attached, are not ref counted. - "scan" list is for rsb's that can be freed after a timeout period. - "slow" lists are for infrequent iterations through active or inactive rsb structs. - inactive rsb structs that are directory records will not be put on the scan list, since they are not freed based on timeouts. - inactive rsb structs that are not directory records will be put on the scan list to be freed, since they are not longer needed. Signed-off-by: David Teigland commit 8a74e4eaa72c14f997df6d820effb6aac400d470 Author: Greg Kroah-Hartman Date: Mon Jun 10 10:20:53 2024 +0200 PCI: switchtec: Make switchtec_class constant Now that the driver core allows for struct class to be in read-only memory, we should make all 'class' structures declared at build time placing them into read-only memory, instead of having to be dynamically allocated at runtime. Link: https://lore.kernel.org/r/2024061053-online-unwound-b173@gregkh Signed-off-by: Greg Kroah-Hartman Signed-off-by: Bjorn Helgaas Reviewed-by: Dave Jiang Reviewed-By: Logan Gunthorpe Cc: Kurt Schwemmer Cc: Jon Mason Cc: Allen Hubbe commit 17f91ac0843b50462a9c9c8f18df962338bd3db2 Author: Christoph Hellwig Date: Tue Jun 4 19:25:29 2024 +0200 md/raid1: don't free conf on raid0_run failure The core md code calls the ->free method which already frees conf. Fixes: 07f1a6850c5d ("md/raid1: fail run raid1 array when active disk less than one") Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240604172607.3185916-3-hch@lst.de commit 35f20acaa3585f25f8356da0ee6bc143e0256522 Author: Christoph Hellwig Date: Tue Jun 4 19:25:28 2024 +0200 md/raid0: don't free conf on raid0_run failure The core md code calls the ->free method which already frees conf. Fixes: 0c031fd37f69 ("md: Move alloc/free acct bioset in to personality") Signed-off-by: Christoph Hellwig Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240604172607.3185916-2-hch@lst.de commit acc6680af28696a037ede62867e731841d4454c2 Author: Li Nan Date: Wed May 29 04:31:49 2024 +0800 md: make md_flush_request() more readable Setting bio to NULL and checking 'if(!bio)' is redundant and looks strange, just consolidate them into one condition. There are no functional changes. Suggested-by: Christoph Hellwig Signed-off-by: Li Nan Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240528203149.2383260-1-linan666@huaweicloud.com commit 611d5cbc0b35a752e657a83eebadf40d814d006b Author: Li Nan Date: Sun May 26 02:52:57 2024 +0800 md: fix deadlock between mddev_suspend and flush bio Deadlock occurs when mddev is being suspended while some flush bio is in progress. It is a complex issue. T1. the first flush is at the ending stage, it clears 'mddev->flush_bio' and tries to submit data, but is blocked because mddev is suspended by T4. T2. the second flush sets 'mddev->flush_bio', and attempts to queue md_submit_flush_data(), which is already running (T1) and won't execute again if on the same CPU as T1. T3. the third flush inc active_io and tries to flush, but is blocked because 'mddev->flush_bio' is not NULL (set by T2). T4. mddev_suspend() is called and waits for active_io dec to 0 which is inc by T3. T1 T2 T3 T4 (flush 1) (flush 2) (third 3) (suspend) md_submit_flush_data mddev->flush_bio = NULL; . . md_flush_request . mddev->flush_bio = bio . queue submit_flushes . . . . md_handle_request . . active_io + 1 . . md_flush_request . . wait !mddev->flush_bio . . . . mddev_suspend . . wait !active_io . . . submit_flushes . queue_work md_submit_flush_data . //md_submit_flush_data is already running (T1) . md_handle_request wait resume The root issue is non-atomic inc/dec of active_io during flush process. active_io is dec before md_submit_flush_data is queued, and inc soon after md_submit_flush_data() run. md_flush_request active_io + 1 submit_flushes active_io - 1 md_submit_flush_data md_handle_request active_io + 1 make_request active_io - 1 If active_io is dec after md_handle_request() instead of within submit_flushes(), make_request() can be called directly intead of md_handle_request() in md_submit_flush_data(), and active_io will only inc and dec once in the whole flush process. Deadlock will be fixed. Additionally, the only difference between fixing the issue and before is that there is no return error handling of make_request(). But after previous patch cleaned md_write_start(), make_requst() only return error in raid5_make_request() by dm-raid, see commit 41425f96d7aa ("dm-raid456, md/raid456: fix a deadlock for dm-raid456 while io concurrent with reshape)". Since dm always splits data and flush operation into two separate io, io size of flush submitted by dm always is 0, make_request() will not be called in md_submit_flush_data(). To prevent future modifications from introducing issues, add WARN_ON to ensure make_request() no error is returned in this context. Fixes: fa2bbff7b0b4 ("md: synchronize flush io with array reconfiguration") Signed-off-by: Li Nan Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240525185257.3896201-3-linan666@huaweicloud.com commit 03e792eaf18ec2e93e2c623f9f1a4bdb97fe4126 Author: Li Nan Date: Sun May 26 02:52:56 2024 +0800 md: change the return value type of md_write_start to void Commit cc27b0c78c79 ("md: fix deadlock between mddev_suspend() and md_write_start()") aborted md_write_start() with false when mddev is suspended, which fixed a deadlock if calling mddev_suspend() with holding reconfig_mutex(). Since mddev_suspend() now includes lockdep_assert_not_held(), it no longer holds the reconfig_mutex. This makes previous abort unnecessary. Now, remove unnecessary abort and change function return value to void. Signed-off-by: Li Nan Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240525185257.3896201-2-linan666@huaweicloud.com commit 35feb8dbbca627d118ccc1f2111841788c142703 Author: Himal Prasad Ghimiray Date: Fri Jun 7 18:27:41 2024 +0530 drm/xe: Check valid domain is passed in xe_force_wake_ref Assert domain is not XE_FORCEWAKE_ALL. v2 - use domain != XE_FORCEWAKE_ALL (Michal) v3 - Fix commit description. Cc: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Lucas De Marchi Cc: Badal Nilawar Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240607125741.1407331-2-himal.prasad.ghimiray@intel.com Signed-off-by: Rodrigo Vivi commit 3541e19d0d3b30ad099c0c26ba87561aedfbd652 Author: Himal Prasad Ghimiray Date: Fri Jun 7 18:27:40 2024 +0530 drm/xe: Ensure caller uses sole domain for xe_force_wake_assert_held xe_force_wake_assert_held() is designed to confirm a particular forcewake domain's wakefulness; it doesn't verify the wakefulness of multiple domains. Make sure the caller doesn't input multiple domains(XE_FORCEWAKE_ALL) as a parameter. v2 - use domain != XE_FORCEWAKE_ALL (Michal) v3 - Add kernel-doc Cc: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Lucas De Marchi Cc: Badal Nilawar Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240607125741.1407331-1-himal.prasad.ghimiray@intel.com Signed-off-by: Rodrigo Vivi commit 36862eab884d997e182aad9163cc6ca953614a68 Author: Jeff Johnson Date: Tue Jun 4 18:53:44 2024 -0700 rpmsg: char: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rpmsg/rpmsg_char.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240604-md-drivers-rpmsg_char-v1-1-675453267fc6@quicinc.com Signed-off-by: Mathieu Poirier commit 17019d5195c467938b0289a2175e17eac4cc1cdf Author: Manali Shukla Date: Wed Jun 5 05:08:35 2024 +0000 KVM: selftests: Treat AMD Family 17h+ as supporting branch insns retired When detecting AMD PMU support for encoding "branch instructions retired" as event 0xc2,0, simply check for Family 17h+ as all Zen CPUs support said encoding, and AMD will maintain the encoding for backwards compatibility on future CPUs. Note, the kernel proper also interprets Family 17h+ as Zen (see the sole caller of init_amd_zen_common()). Suggested-by: Sandipan Das Signed-off-by: Manali Shukla Link: https://lore.kernel.org/r/20240605050835.30491-1-manali.shukla@amd.com Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 430e29787fd013500c5907cdf3f7371cc97079ed Author: Hari Nagalla Date: Tue Jun 4 12:14:50 2024 -0500 dt-bindings: remoteproc: k3-dsp: Correct optional sram properties for AM62A SoCs The C7xv-dsp on AM62A have 32KB L1 I-cache and a 64KB L1 D-cache. It does not have an addressable l1dram . So, remove this optional sram property from the bindings to fix device tree build warnings. Signed-off-by: Hari Nagalla Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604171450.2455-1-hnagalla@ti.com Signed-off-by: Mathieu Poirier commit d5989a3533fcc55ae633c7fc212947c4229ed9d8 Author: Binbin Wu Date: Mon May 6 15:50:25 2024 +0800 KVM: VMX: Remove unused declaration of vmx_request_immediate_exit() After commit 0ec3d6d1f169 "KVM: x86: Fully defer to vendor code to decide how to force immediate exit", vmx_request_immediate_exit() was removed. Commit 5f18c642ff7e "KVM: VMX: Move out vmx_x86_ops to 'main.c' to dispatch VMX and TDX" added its declaration by accident. Remove it. Signed-off-by: Binbin Wu Link: https://lore.kernel.org/r/20240506075025.2251131-1-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit a8768a134518e406d41799a3594aeb74e0889cf7 Author: Li Nan Date: Wed May 8 17:20:53 2024 +0800 md: do not delete safemode_timer in mddev_suspend The deletion of safemode_timer in mddev_suspend() is redundant and potentially harmful now. If timer is about to be woken up but gets deleted, 'in_sync' will remain 0 until the next write, causing array to stay in the 'active' state instead of transitioning to 'clean'. Commit 0d9f4f135eb6 ("MD: Add del_timer_sync to mddev_suspend (fix nasty panic))" introduced this deletion for dm, because if timer fired after dm is destroyed, the resource which the timer depends on might have been freed. However, commit 0dd84b319352 ("md: call __md_stop_writes in md_stop") added __md_stop_writes() to md_stop(), which is called before freeing resource. Timer is deleted in __md_stop_writes(), and the origin issue is resolved. Therefore, delete safemode_timer can be removed safely now. Signed-off-by: Li Nan Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240508092053.1447930-1-linan666@huaweicloud.com commit c7d4c5f01961cdc4f1d29525e2b0d71f62c5bc33 Author: Hou Wenlong Date: Mon May 6 14:35:02 2024 +0800 KVM: x86: Drop unused check_apicv_inhibit_reasons() callback definition The check_apicv_inhibit_reasons() callback implementation was dropped in the commit b3f257a84696 ("KVM: x86: Track required APICv inhibits with variable, not callback"), but the definition removal was missed in the final version patch (it was removed in the v4). Therefore, it should be dropped, and the vmx_check_apicv_inhibit_reasons() function declaration should also be removed. Signed-off-by: Hou Wenlong Reviewed-by: Alejandro Jimenez Link: https://lore.kernel.org/r/54abd1d0ccaba4d532f81df61259b9c0e021fbde.1714977229.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit 71ac69e08947a03925cbd5f7517cba358cda1eb3 Author: Eugene Shalygin Date: Sat Jun 8 10:50:05 2024 +0200 hwmon: (asus-ec-sensors) add ProArt X670E-CREATOR WIFI Provided and tested by a user in a GitHub PR [1]. [1] https://github.com/zeule/asus-ec-sensors/pull/56 Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20240608085146.572777-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit 9ecc129470bcd3505c972b91dc402b8538e9cd9c Author: Guenter Roeck Date: Sun Jun 2 22:31:52 2024 -0700 hwmon: (spd5118) Add configuration option for auto-detection With SPD5118 chip detection for the most part handled by the i2c-smbus core using DMI information, the spd5118 driver no longer needs to auto-detect spd5118 compliant chips. Auto-detection by the driver is still needed on systems with no DMI support or on systems with more than eight DIMMs and can not be removed entirely. However, it affects boot time and introduces the risk of mis-identifying chips. Add configuration option to be able to disable it on systems where chip detection is handled outside the driver. Cc: Wolfram Sang Reviewed-by: Thomas Weißschuh Tested-by: Armin Wolf Signed-off-by: Guenter Roeck commit 84d477354b0a3c3a2cd154cd2cd4d7fd6188f9f2 Author: Guenter Roeck Date: Sat Jun 1 06:44:47 2024 -0700 i2c: smbus: Support DDR5 and LPDDR5 SPD EEPROMs Detect (LP)DDR5 memory and instantiate the SPD5118 driver automatically. Suggested-by: Thomas Weißschuh Cc: Wolfram Sang Acked-by: Wolfram Sang Reviewed-by: Armin Wolf Reviewed-by: Thomas Weißschuh Signed-off-by: Guenter Roeck commit 25dff444c6cb122eed08e328ddc9698f3b3d2ca9 Author: Guenter Roeck Date: Fri May 31 09:55:37 2024 -0700 hwmon: (spd5118) Add support for reading SPD data Add support for reading SPD NVMEM data from SPD5118 (Jedec JESD300) compliant memory modules. NVMEM write operation is not supported. NVMEM support is optional. If CONFIG_NVMEM is disabled, the driver will still instantiate but not provide NVMEM attribute files. Reviewed-by: Thomas Weißschuh Tested-by: Armin Wolf Signed-off-by: Guenter Roeck commit d1b4c755081a50b4ce21cd03c38f9176aa41f21e Author: Guenter Roeck Date: Thu May 30 11:44:11 2024 -0700 hwmon: (spd5118) Add suspend/resume support Add suspend/resume support to ensure that limit and configuration registers are updated and synchronized after a suspend/resume cycle. Cc: Armin Wolf Cc: Stephen Horvath Reviewed-by: Thomas Weißschuh Tested-by: Stephen Horvath Tested-by: Armin Wolf Signed-off-by: Guenter Roeck commit 09262e9814ca0851c937cab1f26df4ab207885a1 Author: Guenter Roeck Date: Mon May 27 10:49:10 2024 -0700 hwmon: Add support for SPD5118 compliant temperature sensors Add support for SPD5118 (Jedec JESD300) compliant temperature sensors. Such sensors are typically found on DDR5 memory modules. Cc: René Rebe Cc: Thomas Weißschuh Reviewed-by: Thomas Weißschuh Tested-by: Thomas Weißschuh Tested-by: Stephen Horvath Tested-by: Armin Wolf Signed-off-by: Guenter Roeck commit f3edbbd70bb7df08006c497a23b426cd70b229b3 Author: Guenter Roeck Date: Mon May 8 20:35:31 2023 +0300 dt-bindings: trivial-devices: Add jedec,spd5118 Add bindings for the SPD hub present in DDR5 modules. (https://www.jedec.org/standards-documents/docs/jesd300-5b01). Acked-by: Krzysztof Kozlowski Reviewed-by: Thomas Weißschuh Signed-off-by: Guenter Roeck commit 0e9899feed9cbb7d33c01ad849dc307b1560b0ab Author: Wei Yang Date: Mon Jun 10 14:37:42 2024 +0000 mm/mm_init.c: don't initialize page->lru again Current page initialization call flow looks like this with some simplification: setup_arch() paging_init() free_area_init() memmap_init() memmap_init_zone_range() memmap_init_range() defer_init() __init_single_page() mm_core_init() mem_init() memblock_free_all() free_low_memory_core_early() memmap_init_reserved_pages() reserve_bootmem_region() init_reserved_page() __init_single_page() There two cases depends on CONFIG_DEFERRED_STRUCT_PAGE_INIT. * If CONFIG_DEFERRED_STRUCT_PAGE_INIT, pages after first_init_pfn is skipped at defer_init(). Then init_reserved_page() is defined to call __init_single_page() for them. * If !CONFIG_DEFERRED_STRUCT_PAGE_INIT, pages are all initialized by memmap_init_range(). In both cases, after init_reserved_page(), we expect __init_single_page() has done its work to the page, which already initialize page->lru properly. We don't need to do it again. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240610143742.26401-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 8a2744f2955a584188a82d631937aa365d4ea966 Author: Jeff Johnson Date: Mon Jun 10 07:30:51 2024 -0700 regulator: add missing MODULE_DESCRIPTION() macro On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/da9121-regulator.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/max20411-regulator.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/rt4831-regulator.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/regulator/tps6286x-regulator.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240610-md-drivers-regulator-v2-1-cf39106d7e54@quicinc.com Signed-off-by: Mark Brown commit 8814444e62b8a8b573fba2cbbb327d5817b74eb0 Author: Kuro Chung Date: Tue Jun 4 10:44:05 2024 +0800 drm/bridge: it6505: update usleep_range for RC circuit charge time The spec of timing between IVDD/OVDD and SYSRTEN is 10ms, but SYSRSTN RC circuit need at least 25ms for rising time, update for match spec Signed-off-by: Kuro Chung Signed-off-by: Hermes Wu Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240604024405.1122488-1-kuro.chung@ite.com.tw commit 9a8ac1ec9efddce525c94822028fb6140c523be0 Author: Adam Ford Date: Sat Jun 1 09:41:02 2024 -0500 drm/bridge: samsung-dsim: Fix porch calcalcuation rounding The VFP, HBP, and HSA are divided between the available lanes if there is more than one lane. For certain timings and lane configurations, the HFP may not be evenly divisible. If the HFP is rounded down, it ends up being too small which can cause some monitors to not sync properly. In these instances, adjust htotal and hsync to round the HFP up, and recalculate the htotal. This allows 720P-60 to operation on an i.MX8MP with a four-lane configuration. Tested-by: Frieder Schrempf # Kontron BL i.MX8MM with HDMI monitor Signed-off-by: Adam Ford Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240601144103.198299-2-aford173@gmail.com commit 78c4c0011bb577a29906d8ca135795af2293c49e Author: Adam Ford Date: Sat Jun 1 09:41:01 2024 -0500 drm/bridge: samsung-dsim: Set P divider based on min/max of fin pll The P divider should be set based on the min and max values of the fin pll which may vary between different platforms. These ranges are defined per platform, but hard-coded values were used instead which resulted in a smaller range available on the i.MX8M[MNP] than what was possible. As noted by Frieder, there are descripencies between the reference manuals of the Mini, Nano and Plus, so I reached out to my NXP rep and got the following response regarding the varing notes in the documentation. "Yes it is definitely wrong, the one that is part of the NOTE in MIPI_DPHY_M_PLLPMS register table against PMS_P, PMS_M and PMS_S is not correct. I will report this to Doc team, the one customer should be take into account is the Table 13-40 DPHY PLL Parameters and the Note above." With this patch, the clock rates now match the values used in NXP's downstream kernel. Fixes: 846307185f0f ("drm/bridge: samsung-dsim: update PLL reference clock") Signed-off-by: Adam Ford Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Reviewed-by: Marek Vasut Tested-by: Marek Szyprowski Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240601144103.198299-1-aford173@gmail.com commit 162e48cb1d84c2c966b649b8ac5c9d4f75f6d44f Author: Marek Vasut Date: Fri May 31 22:33:12 2024 +0200 drm/bridge: tc358767: Check if fully initialized before signalling HPD event via IRQ Make sure the connector is fully initialized before signalling any HPD events via drm_kms_helper_hotplug_event(), otherwise this may lead to NULL pointer dereference. Signed-off-by: Marek Vasut Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240531203333.277476-1-marex@denx.de commit 004370a82ae1f5a0fd5abc1077733f9b1a42e7c0 Author: Marek Vasut Date: Fri May 31 22:32:01 2024 +0200 drm/bridge: tc358767: Fix comment in tc_edp_mode_valid Fix comment copy-paste error in tc_edp_mode_valid(), this function is validating DP/eDP clock, not DPI clock frequency. Update the comment to match. No functional change. Signed-off-by: Marek Vasut Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240531203213.277421-1-marex@denx.de commit 2ba6d15786f6c11b6e497eebe68b8baec52f7984 Merge: 395059c52e010 eef8e906aea27 Author: David S. Miller Date: Mon Jun 10 13:48:06 2024 +0100 Merge branch 'fix-changing-dsa-conduit' Marek Behún says: ==================== Fix changing DSA conduit This series fixes an issue in the DSA code related to host interface UC address installed into port FDB and port conduit address database when live-changing port conduit. The first patch refactores/deduplicates the installation/uninstallation of the interface's MAC address and the second patch fixes the issue. Cover letter for v1 and v2: https://patchwork.kernel.org/project/netdevbpf/cover/20240429163627.16031-1-kabel@kernel.org/ https://patchwork.kernel.org/project/netdevbpf/cover/20240502122922.28139-1-kabel@kernel.org/ ==================== Signed-off-by: David S. Miller commit eef8e906aea270f4b8912a0b51403b80aec54d30 Author: Marek Behún Date: Wed Jun 5 15:33:29 2024 +0200 net: dsa: update the unicast MAC address when changing conduit When changing DSA user interface conduit while the user interface is up, DSA exhibits different behavior in comparison to when the interface is down. This different behavior concerns the primary unicast MAC address stored in the port standalone FDB and in the conduit device UC database. If we put a switch port down while changing the conduit with ip link set sw0p0 down ip link set sw0p0 type dsa conduit conduit1 ip link set sw0p0 up we delete the address in dsa_user_close() and install the (possibly different) address in dsa_user_open(). But when changing the conduit on the fly, the old address is not deleted and the new one is not installed. Since we explicitly want to support live-changing the conduit, uninstall the old address before calling dsa_port_assign_conduit() and install the (possibly different) new address after the call. Because conduit change might also trigger address change (the user interface is supposed to inherit the conduit interface MAC address if no address is defined in hardware (dp->mac is a zero address)), move the eth_hw_addr_inherit() call from dsa_user_change_conduit() to dsa_port_change_conduit(), just before installing the new address. Although this is in theory a flaw in DSA core, it needs not be backported, since there is currently no DSA driver that can be affected by this. The only DSA driver that supports changing conduit is felix, and, as explained by Vladimir Oltean [1]: There are 2 reasons why with felix the bug does not manifest itself. First is because both the 'ocelot' and the alternate 'ocelot-8021q' tagging protocols have the 'promisc_on_conduit = true' flag. So the unicast address doesn't have to be in the conduit's RX filter - neither the old or the new conduit. Second, dsa_user_host_uc_install() theoretically leaves behind host FDB entries installed towards the wrong (old) CPU port. But in felix_fdb_add(), we treat any FDB entry requested towards any CPU port as if it was a multicast FDB entry programmed towards _all_ CPU ports. For that reason, it is installed towards the port mask of the PGID_CPU port group ID: if (dsa_port_is_cpu(dp)) port = PGID_CPU; Therefore no Fixes tag for this change. [1] https://lore.kernel.org/netdev/20240507201827.47suw4fwcjrbungy@skbuf/ Signed-off-by: Marek Behún Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit 77f7541248fcfcc79afff68ff9acf1f09ab8e1e4 Author: Marek Behún Date: Wed Jun 5 15:33:28 2024 +0200 net: dsa: deduplicate code adding / deleting the port address to fdb The sequence if (dsa_switch_supports_uc_filtering(ds)) dsa_port_standalone_host_fdb_add(dp, addr, 0); if (!ether_addr_equal(addr, conduit->dev_addr)) dev_uc_add(conduit, addr); is executed both in dsa_user_open() and dsa_user_set_mac_addr(). Its reverse is executed both in dsa_user_close() and dsa_user_set_mac_addr(). Refactor these sequences into new functions dsa_user_host_uc_install() and dsa_user_host_uc_uninstall(). Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit 395059c52e0104a5e01832f866caa8b15284dd9a Merge: c917b26e1686b 5fbf57a937f41 Author: David S. Miller Date: Mon Jun 10 13:15:40 2024 +0100 Merge branch 'rtnetlink-rtnl_lock' Jakub Kicinski says: ==================== rtnetlink: move rtnl_lock handling out of af_netlink With the changes done in commit 5b4b62a169e1 ("rtnetlink: make the "split" NLM_DONE handling generic") we can also move the rtnl locking out of af_netlink. ==================== Signed-off-by: David S. Miller commit 5fbf57a937f418fe204f9dbb7735e91984f4ee6a Author: Jakub Kicinski Date: Thu Jun 6 12:29:06 2024 -0700 net: netlink: remove the cb_mutex "injection" from netlink core Back in 2007, in commit af65bdfce98d ("[NETLINK]: Switch cb_lock spinlock to mutex and allow to override it") netlink core was extended to allow subsystems to replace the dump mutex lock with its own lock. The mechanism was used by rtnetlink to take rtnl_lock but it isn't sufficiently flexible for other users. Over the 17 years since it was added no other user appeared. Since rtnetlink needs conditional locking now, and doesn't use it either, axe this feature complete. Signed-off-by: Jakub Kicinski Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 5380d64f8d766576ac5c0f627418b2d0e1d2641f Author: Jakub Kicinski Date: Thu Jun 6 12:29:05 2024 -0700 rtnetlink: move rtnl_lock handling out of af_netlink Now that we have an intermediate layer of code for handling rtnl-level netlink dump quirks, we can move the rtnl_lock taking there. For dump handlers with RTNL_FLAG_DUMP_SPLIT_NLM_DONE we can avoid taking rtnl_lock just to generate NLM_DONE, once again. Signed-off-by: Jakub Kicinski Reviewed-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit c917b26e1686b99f18a3c9fbce508a7c264c6706 Author: Andy Shevchenko Date: Thu Jun 6 19:15:49 2024 +0300 net: dsa: hellcreek: Replace kernel.h with what is used kernel.h is included solely for some other existing headers. Include them directly and get rid of kernel.h. While at it, sort headers alphabetically for easier maintenance. Signed-off-by: Andy Shevchenko Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 1f020495458396766496ee067130f507a4d718e4 Author: Sam Ravnborg Date: Fri May 31 22:37:46 2024 +0200 drm/bridge: Drop drm_bridge_chain_mode_fixup There are no users left of drm_bridge_chain_mode_fixup() and we do not want to have this function available, so drop it. Signed-off-by: Sam Ravnborg Reviewed-by: Maxime Ripard Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240531-bridge_chain_mode-v1-2-8b49e36c5dd3@ravnborg.org commit ac4be1e5016551e24887385a09eca4f340deb1a5 Author: Sam Ravnborg Date: Fri May 31 22:37:45 2024 +0200 drm/mediatek: Drop chain_mode_fixup call in mode_valid() The mode_valid implementation had a call to drm_bridge_chain_mode_fixup() which would be wrong as the mode_valid is not allowed to change anything - only to validate the mode. As the next bridge is often/always a connector the call had no effect anyway. So drop it. From the git history I could see this call was included in the original version of the driver so there was no help there to find out why it was added in the first place. But a lot has changed since the initial driver were added and is seems safe to remove the call now. v4: - Link to v3: https://lore.kernel.org/dri-devel/20220717174454.46616-4-sam@ravnborg.org/ - Rebase, and added acks/rb v3: - Link to v2: https://lore.kernel.org/dri-devel/20211020181901.2114645-6-sam@ravnborg.org/ v2: - Link to v1: https://lore.kernel.org/dri-devel/20210722062246.2512666-6-sam@ravnborg.org/ Signed-off-by: Sam Ravnborg Reviewed-by: Maxime Ripard Reviewed-by: Laurent Pinchart Acked-by: Chun-Kuang Hu Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: Dafna Hirschfeld Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240531-bridge_chain_mode-v1-1-8b49e36c5dd3@ravnborg.org commit 54034bebb22fd4bef45a0404ed5f2d0c7d7ac126 Author: Jocelyn Falempe Date: Mon Jun 3 11:47:27 2024 +0200 drm/panic: Add a kmsg panic screen Add a kmsg option, which will display the last lines of kmsg, and should be similar to fbcon. Add a drm.panic_screen module parameter, so you can choose between the different panic screens available. two options currently, but more will be added later: * "user": a short message telling the user to reboot the machine. * "kmsg": fill the screen with the last lines of kmsg. You can even change it at runtime by writing to /sys/module/drm/parameters/panic_screen v2: * Use module parameter instead of Kconfig choice (Javier Martinez Canillas) v3: * Add help for module parameter usage in Kconfig (Javier Martivez Canillas) * Fix use of font->height before checking it isn't null. (kernel test robot, Dan Carpenter) Signed-off-by: Jocelyn Falempe Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240603095343.39588-4-jfalempe@redhat.com commit 24d07f114e4ec7608659a4ef18307f76739c72a8 Author: Jocelyn Falempe Date: Mon Jun 3 11:47:26 2024 +0200 drm/panic: Add a set_pixel() callback to drm_scanout_buffer This allows drivers to draw the pixel, and handle tiling, or specific color formats. v2: * Use fg_color for blit() functions (Javier Martinez Canillas) Signed-off-by: Jocelyn Falempe Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240603095343.39588-3-jfalempe@redhat.com commit eef5a55af31792fc7a2082dbebac68a7df4d7643 Author: Jocelyn Falempe Date: Mon Jun 3 11:47:25 2024 +0200 drm/panic: only draw the foreground color in drm_panic_blit() The whole framebuffer is cleared, so it's useless to rewrite the background colored pixels. It allows to simplify the drawing functions, and prepare the work for the set_pixel() callback. v2: * keep fg16/fg24/fg32 as variable name for the blit function. * add drm_panic_is_pixel_fg() to avoid code duplication. both suggested by Javier Martinez Canillas Signed-off-by: Jocelyn Falempe Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240603095343.39588-2-jfalempe@redhat.com commit 8a71710bb4797174733a16df2bcb8683fbe7caea Author: Jeff Johnson Date: Sun Jun 9 15:18:58 2024 -0700 spi: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spi/spi-altera-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spi/spi-fsl-lib.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spi/spi-omap2-mcspi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spi/spi-qup.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240609-md-drivers-spi-v1-1-1c7444f53cde@quicinc.com Signed-off-by: Mark Brown commit 022bd9c520d8f9dd51f29326eb369b8ec958f687 Author: Xianwei Zhao Date: Fri May 24 14:35:09 2024 +0800 spi: meson-spicc: set SPI clock flag CLK_SET_RATE_PARENT Add SPI clock flag CLK_SET_RATE_PARENT for using pclk as parent clock. This gives SPI more flexibility in frequency selection. Signed-off-by: Xianwei Zhao Signed-off-by: Sunny Luo Link: https://lore.kernel.org/r/20240524-spi_pclk_setparent-v1-1-99e0ce70b66f@amlogic.com Signed-off-by: Mark Brown commit e289df82344fecc104ad8326b9ab6da612b9c899 Author: Andy Shevchenko Date: Fri May 31 22:42:40 2024 +0300 spi: Rework per message DMA mapped flag to be per transfer The granularity of DMA mappings is transfer and moreover, the direction is also important as it can be unidirect. The current cur_msg_mapped flag doesn't fit well the DMA mapping and syncing calls and we have tons of checks around on top of it. So, instead of doing that rework the code to use per transfer per direction flag to show if it's DMA mapped or not. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-9-andriy.shevchenko@linux.intel.com Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit bd1886661b14345ed3c7b261550bcca6cd76840a Author: Andy Shevchenko Date: Fri May 31 22:42:39 2024 +0300 spi: qup: Use new spi_xfer_is_dma_mapped() helper Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-8-andriy.shevchenko@linux.intel.com Reviewed-by: Bryan O'Donoghue Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit 2f9485adfbd8af088684f43c6391fa02e334d349 Author: Andy Shevchenko Date: Fri May 31 22:42:38 2024 +0300 spi: pci1xxxx: Use new spi_xfer_is_dma_mapped() helper Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-7-andriy.shevchenko@linux.intel.com Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit e47f92308031ebc29327494b1ab70d18bfa96a5d Author: Andy Shevchenko Date: Fri May 31 22:42:37 2024 +0300 spi: pxa2xx: Use new spi_xfer_is_dma_mapped() helper Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-6-andriy.shevchenko@linux.intel.com Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit 6361b4e4f7a43dd5d8e3f2d2ece8148f30b55cb3 Author: Andy Shevchenko Date: Fri May 31 22:42:36 2024 +0300 spi: omap2-mcspi: Use new spi_xfer_is_dma_mapped() helper Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-5-andriy.shevchenko@linux.intel.com Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit 54c5a9db2899c1dd5059584c6817c50810186325 Author: Andy Shevchenko Date: Fri May 31 22:42:35 2024 +0300 spi: ingenic: Use new spi_xfer_is_dma_mapped() helper Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-4-andriy.shevchenko@linux.intel.com Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit 0fb66b81dbf91a60fa4acbf7de26a1958410ef0a Author: Andy Shevchenko Date: Fri May 31 22:42:34 2024 +0300 spi: dw: Use new spi_xfer_is_dma_mapped() helper Replace a few lines of code by calling a spi_xfer_is_dma_mapped() helper. Signed-off-by: Andy Shevchenko Reviewed-by: Serge Semin Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-3-andriy.shevchenko@linux.intel.com Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit 0535cf64e4b1ead224fbbe1c25c81221a298c5e4 Author: Andy Shevchenko Date: Fri May 31 22:42:33 2024 +0300 spi: Introduce internal spi_xfer_is_dma_mapped() helper There are few drivers that use the same pattern to check if the transfer is DMA mapped or not. Provide a helper. Signed-off-by: Andy Shevchenko Tested-by: Neil Armstrong # on SM8650-QRD Link: https://lore.kernel.org/r/20240531194723.1761567-2-andriy.shevchenko@linux.intel.com Reviewed-by: Bryan O'Donoghue Reviewed-by: Serge Semin Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown commit b97e40905580c4585faa491189214e74101ca2ad Author: Mithil Bavishi Date: Sat Jun 8 15:23:02 2024 +0530 ASoC: dt-bindings: omap-mcpdm: Convert to DT schema Convert the OMAP4+ McPDM bindings from txt to yaml (dtschema). Drop ti,hwmods property as it is not needed since the sysc conversion. Add dma, dma-names, reg-names properties to match the DTS so as to not break the already existing ABI. Also update example node to match the existing node in the DTS. Signed-off-by: Mithil Bavishi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240608095305.2887-1-bavishimithil@gmail.com Signed-off-by: Mark Brown commit 7f4c7e43453fe0bcd0d40bcab8567e0dac5f50b8 Author: Andy Shevchenko Date: Thu Jun 6 00:27:29 2024 +0300 ASoC: samsung: Replace of_gpio.h by proper one of_gpio.h is deprecated and subject to remove. The driver doesn't use it directly, replace it with what is really being used. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240605221446.2624964-7-andriy.shevchenko@linux.intel.com Reviewed-by: Kuninori Morimoto Reviewed-by: Charles Keepax Acked-by: Heiko Stuebner Signed-off-by: Mark Brown commit 7a31da79c13ef6449c84f6007d81d1c082dd3aaf Author: Andy Shevchenko Date: Thu Jun 6 00:27:28 2024 +0300 ASoC: generic: Replace of_gpio.h by proper one of_gpio.h is deprecated and subject to remove. The driver doesn't use it directly, replace it with what is really being used. Acked-by: Kuninori Morimoto Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240605221446.2624964-6-andriy.shevchenko@linux.intel.com Reviewed-by: Kuninori Morimoto Reviewed-by: Charles Keepax Acked-by: Heiko Stuebner Signed-off-by: Mark Brown commit e9bf7ed59d2e4a1d071f11ff8d04895377970e42 Author: Andy Shevchenko Date: Thu Jun 6 00:27:27 2024 +0300 ASoC: codecs: Replace of_gpio.h by proper one of_gpio.h is deprecated and subject to remove. The driver doesn't use it directly, replace it with what is really being used. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240605221446.2624964-5-andriy.shevchenko@linux.intel.com Acked-by: Heiko Stuebner Signed-off-by: Mark Brown commit 640557f3de900974d35a46f5a7b0f2161fe2ba35 Author: Andy Shevchenko Date: Thu Jun 6 00:27:26 2024 +0300 ASoC: rockchip: 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 Link: https://lore.kernel.org/r/20240605221446.2624964-4-andriy.shevchenko@linux.intel.com Reviewed-by: Kuninori Morimoto Reviewed-by: Charles Keepax Acked-by: Heiko Stuebner Signed-off-by: Mark Brown commit f10d0956bc0460744fa4c085cff41ce862619a2c Author: Andy Shevchenko Date: Thu Jun 6 00:27:25 2024 +0300 ASoC: fsl: 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 Link: https://lore.kernel.org/r/20240605221446.2624964-3-andriy.shevchenko@linux.intel.com Reviewed-by: Kuninori Morimoto Reviewed-by: Charles Keepax Acked-by: Heiko Stuebner Signed-off-by: Mark Brown commit d52378dda71cd9a0a25f863ffb9ccc4280133a4f Author: Andy Shevchenko Date: Thu Jun 6 00:27:24 2024 +0300 ASoC: codecs: 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: Kuninori Morimoto Reviewed-by: Charles Keepax Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240605221446.2624964-2-andriy.shevchenko@linux.intel.com Acked-by: Heiko Stuebner Signed-off-by: Mark Brown commit 9b7dc68eeba04d20f4a1733e791bc71355423612 Author: Pierre-Louis Bossart Date: Tue May 28 14:29:35 2024 -0500 ALSA: hda: intel-sdw-acpi: use acpi_get_local_u64_address() Now we have a helper so there's no need to open-code. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Takashi Iwai Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240528192936.16180-4-pierre-louis.bossart@linux.intel.com Acked-by: Vinod Koul Signed-off-by: Mark Brown commit b6212f9bf489daf9716aed0e8c4dc6a807ce839f Author: Pierre-Louis Bossart Date: Tue May 28 14:29:34 2024 -0500 soundwire: slave: simplify code with acpi_get_local_u64_address() Now we have a helper so there's no need to open-code. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Acked-by: Vinod Koul Reviewed-by: Takashi Iwai Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240528192936.16180-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0b7e448119428e1dcb854abb5855f66966fb82dc Author: Pierre-Louis Bossart Date: Tue May 28 14:29:33 2024 -0500 ACPI: utils: introduce acpi_get_local_u64_address() The ACPI _ADR is a 64-bit value. We changed the definitions in commit ca6f998cf9a2 ("ACPI: bus: change _ADR representation to 64 bits") but some helpers still assume the value is a 32-bit value. This patch adds a new helper to extract the full 64-bits. The existing 32-bit helper is kept for backwards-compatibility and cases where the _ADR is known to fit in a 32-bit value. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Acked-by: Rafael J. Wysocki Reviewed-by: Takashi Iwai Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240528192936.16180-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 313e978df7fc38b9e949ac5933d0d9d56d5e8a9c Author: Prasad Kumpatla Date: Fri May 24 09:25:35 2024 +0530 ASoC: codecs: wcd937x: add audio routing and Kconfig This patch adds audio routing for both playback and capture and Makefile and Kconfigs changes for wcd937x. Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Link: https://lore.kernel.org/r/20240524035535.3119208-8-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 8ee78493be89c42d016f941a9b00c203ec08daab Author: Prasad Kumpatla Date: Fri May 24 09:25:34 2024 +0530 ASoC: codecs: wcd937x: add capture dapm widgets This patch adds required dapm widgets for capture path. Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Link: https://lore.kernel.org/r/20240524035535.3119208-7-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 57fe69db7a015e828ec69d819707c5b8eac6d052 Author: Prasad Kumpatla Date: Fri May 24 09:25:33 2024 +0530 ASoC: codecs: wcd937x: add playback dapm widgets This patch adds required dapm widgets for playback. Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Link: https://lore.kernel.org/r/20240524035535.3119208-6-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 82be8c62a38c6a44e64ecb29d7a9b5cb35c6cad4 Author: Prasad Kumpatla Date: Fri May 24 09:25:32 2024 +0530 ASoC: codecs: wcd937x: add basic controls This patch adds basic controls found in WCD9370/WCD9375 codec. Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Link: https://lore.kernel.org/r/20240524035535.3119208-5-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 9be3ec196da41b20b624ae4ed0303df58548644e Author: Prasad Kumpatla Date: Fri May 24 09:25:31 2024 +0530 ASoC: codecs: wcd937x: add wcd937x codec driver This patch adds basic SoundWire codec driver to support for WCD9370/WCD9375 TX and RX devices. The WCD9370/WCD9375 has Multi Button Headset Control hardware to support Headset insertion, type detection, 8 headset buttons detection, Over Current detection and Impedence measurements. This patch adds support for this using wcd-mbhc apis. Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Link: https://lore.kernel.org/r/20240524035535.3119208-4-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit c99a515ff15380ec5f8827049914145ba908e8da Author: Prasad Kumpatla Date: Fri May 24 09:25:30 2024 +0530 ASoC: codecs: wcd937x-sdw: add SoundWire driver This patch adds support to SoundWire devices on WCD9370/WCD9375 Codec. The WCD9370/WCD9375 Soundwire devices will be used by the main WCD9370/WCD9375 Audio Codec driver to access registers and configure Soundwire RX and TX ports. Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Link: https://lore.kernel.org/r/20240524035535.3119208-3-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit 27173bb0b64461acf4e00f1bae3b15d8d2348c14 Author: Prasad Kumpatla Date: Fri May 24 09:25:29 2024 +0530 ASoC: dt-bindings: document wcd937x Audio Codec Document the Qualcomm WCD9370/WCD9375 Audio Codec and the Soundwire devices than can be found on Qualcomm QCM6490 based platforms. The Qualcomm WCD9370/WCD9375 Audio Codec communicates with the host SoC over 2 Soundwire links to provide: - 3 TX ADC paths with 4 differential AMIC inputs - 6 DMIC inputs that are shared with AMIC input - 4 Microphone BIAS - RX paths with 4 PAs – HPHL/R, EAR and AUX - Stereo Headphone output - MBHC engine for Headset Detection Signed-off-by: Prasad Kumpatla Co-developed-by: Mohammad Rafi Shaik Signed-off-by: Mohammad Rafi Shaik Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240524035535.3119208-2-quic_mohs@quicinc.com Signed-off-by: Mark Brown commit ed0f941022515ff40473ea5335769a5dc2524a3f Author: Yuntao Liu Date: Mon Jun 3 16:37:50 2024 +0100 ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION The current arm32 architecture does not yet support the HAVE_LD_DEAD_CODE_DATA_ELIMINATION feature. arm32 is widely used in embedded scenarios, and enabling this feature would be beneficial for reducing the size of the kernel image. In order to make this work, we keep the necessary tables by annotating them with KEEP, also it requires further changes to linker script to KEEP some tables and wildcard compiler generated sections into the right place. When using ld.lld for linking, KEEP is not recognized within the OVERLAY command, and Ard proposed a concise method to solve this problem. It boots normally with defconfig, vexpress_defconfig and tinyconfig. The size comparison of zImage is as follows: defconfig vexpress_defconfig tinyconfig 5137712 5138024 424192 no dce 5032560 4997824 298384 dce 2.0% 2.7% 29.7% shrink When using smaller config file, there is a significant reduction in the size of the zImage. We also tested this patch on a commercially available single-board computer, and the comparison is as follows: a15eb_config 2161384 no dce 2092240 dce 3.2% shrink The zImage size has been reduced by approximately 3.2%, which is 70KB on 2.1M. Signed-off-by: Yuntao Liu Tested-by: Arnd Bergmann Reviewed-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Russell King (Oracle) commit 9ac7ba12d37b4c24f6db675ff7edb7e54f597a59 Author: Geert Uytterhoeven Date: Wed May 29 13:09:24 2024 +0100 ARM: 9403/1: Alpine: Spelling s/initialiing/initializing/ Fix a misspelling of "initializing". Signed-off-by: Geert Uytterhoeven Signed-off-by: Russell King (Oracle) commit 8ede71e1202011d8bfceeab4737e6d52d88688ab Author: Geert Uytterhoeven Date: Wed May 29 13:07:42 2024 +0100 ARM: 9402/1: Kconfig: Spelling s/Cortex A-/Cortex-A/ Fix a misspelling of "Cortex-A9", to make it easier to find which errata are applicable to Cortex-A9 CPU cores. Signed-off-by: Geert Uytterhoeven Signed-off-by: Russell King (Oracle) commit 9b69b52cdde74a38c5ab4d89405b2bd384ec0155 Author: Dr. David Alan Gilbert Date: Mon May 20 23:30:05 2024 +0100 ARM: 9400/1: Remove unused struct 'mod_unwind_map' I think this has been unused since Commit b6f21d14f1ac ("ARM: 9204/2: module: Add all unwind tables when load module") Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Russell King (Oracle) commit a9522664c6175c6473b0a42c0aa7c26d6d31d5f3 Merge: 8d466c8f4585a f81d0dd2fde35 Author: David S. Miller Date: Mon Jun 10 11:54:19 2024 +0100 Merge branch 'tcp-up-pin-tw-timer' Florian Westphal says: ==================== net: tcp: un-pin tw timer Changes since previous iteration: - Patch 1: update a comment, I copied Erics v7 RvB tag. - Patch 2: move bh off/on into hashdance_schedule and get rid of comment mentioning pinned tw timer. I did not copy Erics RvB tag over from v7 because of the change. - Patch 3 is unchanged, so I kept Erics RvB tag. This is v8 of the series where the tw_timer is un-pinned to get rid of interferences in isolated CPUs setups. First patch makes necessary preparations, existing code relies on TIMER_PINNED to avoid races. Second patch un-pins the TW timer. Could be folded into the first one, but it might help wrt. bisection. Third patch is a minor cleanup to move a helper from .h to the only remaining compilation unit. Tested with iperf3 and stress-ng socket mode. ==================== Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller commit f81d0dd2fde35fd1acc30b3f4de6aaf57d514551 Author: Florian Westphal Date: Thu Jun 6 17:11:39 2024 +0200 tcp: move inet_twsk_schedule helper out of header Its no longer used outside inet_timewait_sock.c, so move it there. Reviewed-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit c75ad7c759ccead1be462d4cec42bd4ad3578989 Author: Florian Westphal Date: Thu Jun 6 17:11:38 2024 +0200 net: tcp: un-pin the tw_timer After previous patch, even if timer fires immediately on another CPU, context that schedules the timer now holds the ehash spinlock, so timer cannot reap tw socket until ehash lock is released. BH disable is moved into hashdance_schedule. Signed-off-by: Florian Westphal Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit b334b924c9b709bc969644fb5c406f5c9d01dceb Author: Valentin Schneider Date: Thu Jun 6 17:11:37 2024 +0200 net: tcp/dccp: prepare for tw_timer un-pinning The TCP timewait timer is proving to be problematic for setups where scheduler CPU isolation is achieved at runtime via cpusets (as opposed to statically via isolcpus=domains). What happens there is a CPU goes through tcp_time_wait(), arming the time_wait timer, then gets isolated. TCP_TIMEWAIT_LEN later, the timer fires, causing interference for the now-isolated CPU. This is conceptually similar to the issue described in commit e02b93124855 ("workqueue: Unbind kworkers before sending them to exit()") Move inet_twsk_schedule() to within inet_twsk_hashdance(), with the ehash lock held. Expand the lock's critical section from inet_twsk_kill() to inet_twsk_deschedule_put(), serializing the scheduling vs descheduling of the timer. IOW, this prevents the following race: tcp_time_wait() inet_twsk_hashdance() inet_twsk_deschedule_put() del_timer_sync() inet_twsk_schedule() Thanks to Paolo Abeni for suggesting to leverage the ehash lock. This also restores a comment from commit ec94c2696f0b ("tcp/dccp: avoid one atomic operation for timewait hashdance") as inet_twsk_hashdance() had a "Step 1" and "Step 3" comment, but the "Step 2" had gone missing. inet_twsk_deschedule_put() now acquires the ehash spinlock to synchronize with inet_twsk_hashdance_schedule(). To ease possible regression search, actual un-pin is done in next patch. Link: https://lore.kernel.org/all/ZPhpfMjSiHVjQkTk@localhost.localdomain/ Reviewed-by: Eric Dumazet Signed-off-by: Valentin Schneider Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit f8d59fac575a624d1d4bd24424b3ec2bf5c4202a Author: Ondrej Jirman Date: Sat Feb 24 16:06:00 2024 +0100 drm/sun4i: Fix layer zpos change/atomic modesetting Identical configurations of planes can lead to different (and wrong) layer -> pipe routing at HW level, depending on the order of atomic plane changes. For example: - Layer 1 is configured to zpos 0 and thus uses pipe 0. No other layer is enabled. This is a typical situation at boot. - When a compositor takes over and layer 3 is enabled, sun8i_ui_layer_enable() will get called with old_zpos=0 zpos=1, which will lead to incorrect disabling of pipe 0 and enabling of pipe 1. What happens is that sun8i_ui_layer_enable() function may disable blender pipes even if it is no longer assigned to its layer. To correct this, move the routing setup out of individual plane's atomic_update into crtc's atomic_update, where it can be calculated and updated all at once. Remove the atomic_disable callback because it is no longer needed. Signed-off-by: Ondrej Jirman Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20240224150604.3855534-4-megi@xff.cz Signed-off-by: Maxime Ripard commit aa0b4a69b6da861d1cb645a1a5df4a3fa8b9c86d Author: Ondrej Jirman Date: Sat Feb 24 16:05:59 2024 +0100 drm/sun4i: Add more parameters to sunxi_engine commit callback These will be needed later on when we move layer configuration to crtc update. Signed-off-by: Ondrej Jirman Reviewed-by: Maxime Ripard Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20240224150604.3855534-3-megi@xff.cz Signed-off-by: Maxime Ripard commit 134155a50c628812751c2f6dfb600d571dd855dd Author: Ondrej Jirman Date: Sat Feb 24 16:05:58 2024 +0100 drm/sun4i: Unify sun8i_*_layer structs These structs are identical, use a single struct to represent private data for the DRM plane. This is a preparation for configuring layer routing from the CRTC (mixer) instead of current approach of setting up routing from individual layer's atomic_update callback. Signed-off-by: Ondrej Jirman Reviewed-by: Maxime Ripard Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20240224150604.3855534-2-megi@xff.cz Signed-off-by: Maxime Ripard commit 665415092ecabf24eae5dfedeadd49f4c742d5b3 Author: Jeff Johnson Date: Sun Jun 9 11:42:53 2024 -0700 drm: add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/gud/gud.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/drm_panel_orientation_quirks.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/drm_mipi_dbi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/i915/kvmgt.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/udl/udl.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). For consistency this includes drivers/gpu/drm/drm_simple_kms_helper.c since it contains a MODULE_LICENSE() even though it isn't built as a separate module -- it is always built as part of drm_kms_helper and drm_kms_helper_common.c already provides a MODULE_DESCRIPTION for that module. Signed-off-by: Jeff Johnson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240609-md-drivers-gpu-drm-v1-1-89e9a316d513@quicinc.com commit 27039de42b575a92df5464d45ae35bbf3fc93a1b Author: Jeff Johnson Date: Sun Jun 9 10:06:17 2024 -0700 drm/bridge: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/bridge/lontium-lt9611.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/bridge/lontium-lt9611uxc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/bridge/sil-sii8620.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/bridge/sii9234.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240609-md-drivers-gpu-drm-bridge-v1-1-b582c5c815d7@quicinc.com commit 2c232f9b3875c1471c7b478d87da3daad5b13a3b Author: Jeff Johnson Date: Sun Jun 9 10:20:27 2024 -0700 drm/tiny: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tiny/bochs.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tiny/cirrus.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tiny/gm12u320.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Hans de Goede Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240609-md-drivers-gpu-drm-tiny-v1-1-6905fe4ada50@quicinc.com commit 3438558284c8a219c1a72c2094a05bc12e9fcb8f Author: Michal Wajdeczko Date: Sun Jun 9 20:19:31 2024 +0200 drm/xe/guc: Prefer GT oriented messages in xe_guc_pc If possible, we should prefer xe_gt_err() over drm_err(). While at it, improve and fix some of the error messages. Also drop unnecessary "xe_gt_sysfs.h" include. Signed-off-by: Michal Wajdeczko Cc: Vinay Belgaumkar Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240609181931.1724-4-michal.wajdeczko@intel.com commit 7eea2580994b4eb266fd9aa60b1c913be4151925 Author: Michal Wajdeczko Date: Sun Jun 9 20:19:30 2024 +0200 drm/xe/guc: Add pc_to_ct() helper We are converting xe_guc_pc to xe_guc_ct few times already. Add simple helper function to avoid code duplication. While at it, simplify other helper functions and fix order of local variables to match the guideline. Signed-off-by: Michal Wajdeczko Cc: Vinay Belgaumkar Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240609181931.1724-3-michal.wajdeczko@intel.com commit 3a3fc10cce3b6cc6ac252f3b6f5d750f0b1d735e Author: Michal Wajdeczko Date: Sun Jun 9 20:19:29 2024 +0200 drm/xe/guc: Move H2G SETUP_PC_GUCRC definition to SLPC ABI We already have a dedicated file for GuC SLPC ABI definitions. Move definition of the SETUP_PC_GUCRC action and related enum to that file, rename them to match format of other new ABI definitions and add simple kernel-doc. Signed-off-by: Michal Wajdeczko Cc: Vinay Belgaumkar Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240609181931.1724-2-michal.wajdeczko@intel.com commit f34da56094273fb31c98e7ed89a64e3b8036962d Merge: d4c83ac16c653 41056416ed538 Author: Jerome Brunet Date: Mon Jun 10 12:18:15 2024 +0200 Merge branch 'v6.11/bindings' into v6.11/drivers * v6.11/bindings: dt-bindings: clock: meson: a1: peripherals: support sys_pll input dt-bindings: clock: meson: a1: pll: introduce new syspll bindings commit 41056416ed538d1a05dbba57060c02acdc5154e7 Author: Dmitry Rokosov Date: Wed May 15 21:47:27 2024 +0300 dt-bindings: clock: meson: a1: peripherals: support sys_pll input The 'sys_pll' input is an optional clock that can be used to generate 'sys_pll_div16', which serves as one of the sources for the GEN clock. Signed-off-by: Dmitry Rokosov Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240515185103.20256-5-ddrokosov@salutedevices.com Signed-off-by: Jerome Brunet commit 96f3b978736356ba0e5a7d923681765c7ea9b12b Author: Dmitry Rokosov Date: Wed May 15 21:47:25 2024 +0300 dt-bindings: clock: meson: a1: pll: introduce new syspll bindings The 'syspll' PLL is a general-purpose PLL designed specifically for the CPU clock. It is capable of producing output frequencies within the range of 768MHz to 1536MHz. The 'syspll_in' source clock is an optional parent connection from the peripherals clock controller. Signed-off-by: Dmitry Rokosov Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240515185103.20256-3-ddrokosov@salutedevices.com Signed-off-by: Jerome Brunet commit d4c83ac16c6532bda5d9a9d95a30b7dfff494b43 Author: Dmitry Rokosov Date: Wed May 15 21:47:24 2024 +0300 clk: meson: add 'NOINIT_ENABLED' flag to eliminate init for enabled PLL When dealing with certain PLLs, it is necessary to avoid modifying them if they have already been initialized by lower levels. For instance, in the A1 SoC Family, the sys_pll is enabled as the parent for the cpuclk, and it cannot be disabled during the initialization sequence. Therefore, initialization phase must be skipped. Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20240515185103.20256-2-ddrokosov@salutedevices.com Signed-off-by: Jerome Brunet commit 8d466c8f4585afe738a975e493a1b8350e95f168 Merge: 28f961f9d5b7c 75d8d7a63065b Author: David S. Miller Date: Mon Jun 10 11:14:53 2024 +0100 Merge branch 'mlxsw-acl-fixes' Petr Machata says: ==================== mlxsw: ACL fixes Ido Schimmel writes: Patches #1-#3 fix various spelling mistakes I noticed while working on the code base. Patch #4 fixes a general protection fault by bailing out when the error occurs and warning. Patch #5 fixes the warning. Patch #6 fixes ACL scale regression and firmware errors. See the commit messages for more info. ==================== Signed-off-by: David S. Miller commit 75d8d7a63065b18df9555dbaab0b42d4c6f20943 Author: Ido Schimmel Date: Thu Jun 6 16:49:43 2024 +0200 mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors ACLs that reside in the algorithmic TCAM (A-TCAM) in Spectrum-2 and newer ASICs can share the same mask if their masks only differ in up to 8 consecutive bits. For example, consider the following filters: # tc filter add dev swp1 ingress pref 1 proto ip flower dst_ip 192.0.2.0/24 action drop # tc filter add dev swp1 ingress pref 1 proto ip flower dst_ip 198.51.100.128/25 action drop The second filter can use the same mask as the first (dst_ip/24) with a delta of 1 bit. However, the above only works because the two filters have different values in the common unmasked part (dst_ip/24). When entries have the same value in the common unmasked part they create undesired collisions in the device since many entries now have the same key. This leads to firmware errors such as [1] and to a reduced scale. Fix by adjusting the hash table key to only include the value in the common unmasked part. That is, without including the delta bits. That way the driver will detect the collision during filter insertion and spill the filter into the circuit TCAM (C-TCAM). Add a test case that fails without the fix and adjust existing cases that check C-TCAM spillage according to the above limitation. [1] mlxsw_spectrum2 0000:06:00.0: EMAD reg access failed (tid=3379b18a00003394,reg_id=3027(ptce3),type=write,status=8(resource not available)) Fixes: c22291f7cf45 ("mlxsw: spectrum: acl: Implement delta for ERP") Reported-by: Alexander Zubkov Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 97d833ceb27dc19f8777d63f90be4a27b5daeedf Author: Ido Schimmel Date: Thu Jun 6 16:49:42 2024 +0200 mlxsw: spectrum_acl_erp: Fix object nesting warning ACLs in Spectrum-2 and newer ASICs can reside in the algorithmic TCAM (A-TCAM) or in the ordinary circuit TCAM (C-TCAM). The former can contain more ACLs (i.e., tc filters), but the number of masks in each region (i.e., tc chain) is limited. In order to mitigate the effects of the above limitation, the device allows filters to share a single mask if their masks only differ in up to 8 consecutive bits. For example, dst_ip/25 can be represented using dst_ip/24 with a delta of 1 bit. The C-TCAM does not have a limit on the number of masks being used (and therefore does not support mask aggregation), but can contain a limited number of filters. The driver uses the "objagg" library to perform the mask aggregation by passing it objects that consist of the filter's mask and whether the filter is to be inserted into the A-TCAM or the C-TCAM since filters in different TCAMs cannot share a mask. The set of created objects is dependent on the insertion order of the filters and is not necessarily optimal. Therefore, the driver will periodically ask the library to compute a more optimal set ("hints") by looking at all the existing objects. When the library asks the driver whether two objects can be aggregated the driver only compares the provided masks and ignores the A-TCAM / C-TCAM indication. This is the right thing to do since the goal is to move as many filters as possible to the A-TCAM. The driver also forbids two identical masks from being aggregated since this can only happen if one was intentionally put in the C-TCAM to avoid a conflict in the A-TCAM. The above can result in the following set of hints: H1: {mask X, A-TCAM} -> H2: {mask Y, A-TCAM} // X is Y + delta H3: {mask Y, C-TCAM} -> H4: {mask Z, A-TCAM} // Y is Z + delta After getting the hints from the library the driver will start migrating filters from one region to another while consulting the computed hints and instructing the device to perform a lookup in both regions during the transition. Assuming a filter with mask X is being migrated into the A-TCAM in the new region, the hints lookup will return H1. Since H2 is the parent of H1, the library will try to find the object associated with it and create it if necessary in which case another hints lookup (recursive) will be performed. This hints lookup for {mask Y, A-TCAM} will either return H2 or H3 since the driver passes the library an object comparison function that ignores the A-TCAM / C-TCAM indication. This can eventually lead to nested objects which are not supported by the library [1]. Fix by removing the object comparison function from both the driver and the library as the driver was the only user. That way the lookup will only return exact matches. I do not have a reliable reproducer that can reproduce the issue in a timely manner, but before the fix the issue would reproduce in several minutes and with the fix it does not reproduce in over an hour. Note that the current usefulness of the hints is limited because they include the C-TCAM indication and represent aggregation that cannot actually happen. This will be addressed in net-next. [1] WARNING: CPU: 0 PID: 153 at lib/objagg.c:170 objagg_obj_parent_assign+0xb5/0xd0 Modules linked in: CPU: 0 PID: 153 Comm: kworker/0:18 Not tainted 6.9.0-rc6-custom-g70fbc2c1c38b #42 Hardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018 Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:objagg_obj_parent_assign+0xb5/0xd0 [...] Call Trace: __objagg_obj_get+0x2bb/0x580 objagg_obj_get+0xe/0x80 mlxsw_sp_acl_erp_mask_get+0xb5/0xf0 mlxsw_sp_acl_atcam_entry_add+0xe8/0x3c0 mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0 mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270 mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510 process_one_work+0x151/0x370 Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b4a3a89fffcdf09702b1f161b914e52abca1894d Author: Ido Schimmel Date: Thu Jun 6 16:49:41 2024 +0200 lib: objagg: Fix general protection fault The library supports aggregation of objects into other objects only if the parent object does not have a parent itself. That is, nesting is not supported. Aggregation happens in two cases: Without and with hints, where hints are a pre-computed recommendation on how to aggregate the provided objects. Nesting is not possible in the first case due to a check that prevents it, but in the second case there is no check because the assumption is that nesting cannot happen when creating objects based on hints. The violation of this assumption leads to various warnings and eventually to a general protection fault [1]. Before fixing the root cause, error out when nesting happens and warn. [1] general protection fault, probably for non-canonical address 0xdead000000000d90: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 1083 Comm: kworker/1:9 Tainted: G W 6.9.0-rc6-custom-gd9b4f1cca7fb #7 Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019 Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:mlxsw_sp_acl_erp_bf_insert+0x25/0x80 [...] Call Trace: mlxsw_sp_acl_atcam_entry_add+0x256/0x3c0 mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0 mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270 mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510 process_one_work+0x151/0x370 worker_thread+0x2cb/0x3e0 kthread+0xd0/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation") Reported-by: Alexander Zubkov Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 06fcdf2494068ceb29686657f8e5d15084e6e0c3 Author: Ido Schimmel Date: Thu Jun 6 16:49:40 2024 +0200 mlxsw: spectrum_acl_atcam: Fix wrong comment The key is encoded, not encrypted. Fixes: c22291f7cf45 ("mlxsw: spectrum: acl: Implement delta for ERP") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2aad28ec4543f4c3154f904bcd817e649ffb0ba6 Author: Ido Schimmel Date: Thu Jun 6 16:49:39 2024 +0200 lib: test_objagg: Fix spelling Fixes: 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c1e156ae50ee520baf4e560b1284677ddfcea974 Author: Ido Schimmel Date: Thu Jun 6 16:49:38 2024 +0200 lib: objagg: Fix spelling Fixes: 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Tested-by: Alexander Zubkov Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b321cb83a375bcc18cd0a4b62bdeaf6905cca769 Author: Michal Wajdeczko Date: Fri Jun 7 17:31:55 2024 +0200 drm/xe/pf: Assert LMEM provisioning is done only on DGFX The Local Memory (aka VRAM) is only available on DGFX platforms. We shouldn't attempt to provision VFs with LMEM or attempt to update the LMTT on non-DGFX platforms. Add missing asserts that would enforce that and fix release code that could crash on iGFX due to uninitialized LMTT. Fixes: c063cce7df3a ("drm/xe/pf: Update the LMTT when freeing VF GT config") Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240607153155.1592-1-michal.wajdeczko@intel.com commit b9b25c8496019402ecd64ddc5ae56f9bd97b12b2 Author: Yang Li Date: Mon May 6 09:11:21 2024 +0800 coresight: tmc: Remove duplicated include in coresight-tmc-core.c The header files linux/acpi.h is included twice in coresight-tmc-core.c, so one inclusion of each can be removed. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8937 Signed-off-by: Yang Li Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20240506011121.39179-1-yang.lee@linux.alibaba.com commit 22cb31088eff3170cd36847c44e7055db3575b22 Author: Jeff Johnson Date: Sun Jun 9 09:53:21 2024 -0700 drm/panel: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/panel/panel-abt-y030xx067a.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/panel/panel-auo-a030jtn01.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/panel/panel-innolux-ej030na.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/panel/panel-newvision-nv3052c.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/panel/panel-novatek-nt39016.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/panel/panel-orisetech-ota5601a.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240609-md-drivers-gpu-drm-panel-v1-1-04b2a1ae7412@quicinc.com commit ecc24fc3718c573c105766f2589228500a8ae04a Author: Jeff Johnson Date: Thu Jun 6 21:42:46 2024 -0700 drm/tests: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_kunit_helpers.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_buddy_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_cmdline_parser_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_connector_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_damage_helper_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_dp_mst_helper_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_exec_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_format_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_framebuffer_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_gem_shmem_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_managed_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_mm_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_modes_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_plane_helper_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_probe_helper_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/tests/drm_rect_test.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240606-md-drivers-gpu-drm-tests-v1-1-228ca6213969@quicinc.com commit 1034ead1a7333e65e516c583f757717f461eba43 Author: Ming Qian Date: Mon May 6 17:49:18 2024 +0900 media: amphion: Report the average QP of current encoded frame Report the average QP value of the current encoded frame via the V4L2_CID_MPEG_VIDEO_AVERAGE_QP control, the value applies to the last dequeued capture buffer. Signed-off-by: Ming Qian Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 065927b51eb1f042c3e026cebfd55e72ccc26093 Author: Ming Qian Date: Mon May 6 17:49:17 2024 +0900 media: amphion: Remove lock in s_ctrl callback There is no need to add a lock in s_ctrl callback, it has been synchronized by the ctrl_handler's lock, otherwise it may led to a deadlock if the driver calls v4l2_ctrl_s_ctrl(). Signed-off-by: Ming Qian Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 62096c48394b49e326056a62780fb67b60edde91 Author: Ming Qian Date: Mon May 6 17:49:16 2024 +0900 media: v4l2-ctrls: Add average QP control Add a control V4L2_CID_MPEG_VIDEO_AVERAGE_QP to report the average QP value of the current encoded frame. The value applies to the last dequeued capture buffer. Signed-off-by: Ming Qian Reviewed-by: Hans Verkuil Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b785ea5b16c8b33bad45fdb5ce469d9236401dc8 Author: Douglas Anderson Date: Mon Apr 22 10:03:59 2024 -0700 media: mediatek: vcodec: Alloc DMA memory with DMA_ATTR_ALLOC_SINGLE_PAGES As talked about in commit 14d3ae2efeed ("ARM: 8507/1: dma-mapping: Use DMA_ATTR_ALLOC_SINGLE_PAGES hint to optimize alloc"), it doesn't really make sense to try to allocate contiguous chunks of memory for video encoding/decoding. Let's switch the Mediatek vcodec driver to pass DMA_ATTR_ALLOC_SINGLE_PAGES and take some of the stress off the memory subsystem. Signed-off-by: Douglas Anderson Tested-by: Fei Shao Reviewed-by: Fei Shao Reviewed-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 48d85de244047eabe07c5040af12dfa736d61d6c Author: Yunfei Dong Date: Fri Apr 12 11:57:31 2024 +0800 media: mediatek: vcodec: Fix unreasonable data conversion Both 'bs_dma' and 'dma_addr' are integers. No need to convert the type from dma_addr_t to uint64_t again. Fixes: d353c3c34af0 ("media: mediatek: vcodec: support 36 bits physical address") Signed-off-by: Yunfei Dong Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 59d438f8e02ca641c58d77e1feffa000ff809e9f Author: Irui Wang Date: Thu Mar 21 09:47:54 2024 +0800 media: mediatek: vcodec: Handle invalid decoder vsi Handle an invalid decoder vsi in vpu_dec_init to ensure the decoder vsi is valid for future use. Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Irui Wang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 792196fd34b1811d1491000c76e73805f5f827ef Author: Yunfei Dong Date: Sat Mar 16 16:13:44 2024 +0800 media: mediatek: vcodec: add decoder command to support stateless decoder The supported decoder commands are different for stateless and stateful architectures. Add stateless decoder commands to fix the v4l2-compliance test error below. Codec ioctls: VIDIOC_ENCODER_CMD returned -1 (Inappropriate ioctl for device) VIDIOC_TRY_ENCODER_CMD returned -1 (Inappropriate ioctl for device) test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) VIDIOC_G_ENC_INDEX returned -1 (Inappropriate ioctl for device) test VIDIOC_G_ENC_INDEX: OK (Not Supported) VIDIOC_DECODER_CMD returned -1 (Invalid argument) VIDIOC_TRY_DECODER_CMD returned -1 (Invalid argument) VIDIOC_TRY_DECODER_CMD returned -1 (Invalid argument) fail: v4l2-test-codecs.cpp(126): ret test VIDIOC_(TRY_)DECODER_CMD: FAIL Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit d7d3ae441e29f0ca56c69cdd3a47769227b7be3d Author: Ivan Orlov Date: Fri Apr 12 16:17:26 2024 +0100 dca: make dca_class a static const structure The driver core allows for struct class to be in read-only memory. Move the dca_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Suggested-by: Greg Kroah-Hartman Signed-off-by: Ivan Orlov Link: https://lore.kernel.org/r/20240412151726.189030-1-ivan.orlov0322@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f79b09bbe69fc5cd25652e8afcc77e2f2984aab Merge: 1aea3d1d4a21e 83a7eefedc9b5 Author: Hans Verkuil Date: Mon Jun 10 10:20:16 2024 +0200 Merge tag 'v6.10-rc3' Linux 6.10-rc3 This is needed for the ipu6 and mei fixes. Signed-off-by: Hans Verkuil commit 7f1e45f4ae7671550e15354ef87194bccd99ecec Author: Huichun Feng Date: Mon Jun 10 01:37:28 2024 +0800 docs: gpio: prefer pread(2) for interrupt reading In legacy sysfs GPIO, when using poll(2) on the sysfs GPIO value for state change awaiting, a subsequent read(2) is required for consuming the event, which the doc recommends the use of lseek(2) or close-and-reopen to reset the file offset afterwards. The recommendations however, require at least 2 syscalls to consume the event. Gladly, use of pread(2) require only 1 syscall for the consumption. Let's advertise this usage by prioritizing its placement. Signed-off-by: Huichun Feng Link: https://lore.kernel.org/r/20240609173728.2950808-1-foxhoundsk.tw@gmail.com Signed-off-by: Bartosz Golaszewski commit f385f024639431bec3e70c33cdbc9563894b3ee5 Author: Tony Luck Date: Sun Jun 9 17:39:27 2024 -0700 x86/resctrl: Replace open coded cacheinfo searches pseudo_lock_region_init() and rdtgroup_cbm_to_size() open code a search for details of a particular cache level. Replace with get_cpu_cacheinfo_level(). Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20240610003927.341707-5-tony.luck@intel.com commit 685cb1674060c2cb1b9da051a12933c082b8e874 Author: Tony Luck Date: Sun Jun 9 17:39:26 2024 -0700 cacheinfo: Add function to get cacheinfo for a given CPU and cache level Resctrl open codes a search for information about a given cache level in a couple of places (and more are on the way). Provide a new inline function get_cpu_cacheinfo_level() in to do the search and return a pointer to the cacheinfo structure. Add lockdep_assert_cpus_held() to enforce the comment that cpuhp lock must be held. Simplify the existing get_cpu_cacheinfo_id() by using this new function to do the search. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20240610003927.341707-4-tony.luck@intel.com commit ddefcfdeb5a2238cbcb07b80dda9ac3136735b1e Author: Tony Luck Date: Sun Jun 9 17:39:25 2024 -0700 cpu: Drop "extern" from function declarations in cpuhplock.h This file was created with a direct cut and paste from cpu.h so kept the legacy declaration style. But the Linux coding standard for function declarations in header files is to avoid use of "extern". Drop "extern" from all function declarations. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240610003927.341707-3-tony.luck@intel.com commit 195fb517ee25bfefde9c74ecd86348eccbd6d2e4 Author: Tony Luck Date: Sun Jun 9 17:39:24 2024 -0700 cpu: Move CPU hotplug function declarations into their own header Avoid upcoming #include hell when wants to use lockdep_assert_cpus_held() and creates a #include loop that would break the build for arch/riscv. [ bp: s/cpu/CPU/g ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240610003927.341707-2-tony.luck@intel.com commit f4c0cd1870afd57181e8087c6cf8da3d7fa2cebe Author: John Allen Date: Thu Jun 6 20:33:13 2024 +0000 RAS/AMD/FMPM: Use atl internal.h for INVALID_SPA Both the AMD ATL and the FMPM driver define INVALID_SPA. Include the definition from the ATL internal.h header in the FMPM driver. Signed-off-by: John Allen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240606203313.51197-7-john.allen@amd.com commit e0372d6969bca2bc57e1a24129473694ff65641c Author: John Allen Date: Thu Jun 6 20:33:12 2024 +0000 RAS/AMD/ATL: Implement DF 4.5 NP2 denormalization Unlike with previous Data Fabric versions, with Data Fabric 4.5 non-power-of-2 denormalization, there are bits of the system physical address that can't be fully reconstructed from the normalized address. To determine the proper combination of missing system physical address bits, iterate through each possible combination of these bits, normalize the resulting system physical address, and compare to the original address that is being translated. If the addresses match, then the correct permutation of bits has been found. Signed-off-by: John Allen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/r/20240606203313.51197-6-john.allen@amd.com commit d5811a165caf63a69cd8ae11156b8587cc57d1d1 Author: John Allen Date: Thu Jun 6 20:33:11 2024 +0000 RAS/AMD/ATL: Validate address map when information is gathered Validate address maps at the time the information is gathered as the address map will not change during translation. Signed-off-by: John Allen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/r/20240606203313.51197-5-john.allen@amd.com commit 6cce048cb31f272ca2c9b772cf541715b9ff6ca1 Author: John Allen Date: Thu Jun 6 20:33:10 2024 +0000 RAS/AMD/ATL: Expand helpers for adding and removing base and hole The ret_addr field in struct addr_ctx contains the intermediate value of the returned address as it passes through multiple steps in the translation process. Currently, adding the DRAM base and legacy hole is only done once, so it operates directly on the intermediate value. However, for DF 4.5 non-power-of-2 denormalization, adding and removing the DRAM base and legacy hole needs to be done for multiple temporary address values. During this process, the intermediate value should not be lost so the ret_addr value can't be reused. Update the existing 'add' helper to operate on an arbitrary address and introduce a new 'remove' helper to do the inverse operations. Signed-off-by: John Allen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/r/20240606203313.51197-4-john.allen@amd.com commit 1233aa3fb342ca4e63d398c6a3de8ed32ce796ea Author: John Allen Date: Thu Jun 6 20:33:09 2024 +0000 RAS/AMD/ATL: Read DRAM hole base early Read DRAM hole base when constructing the address map as the value will not change during run time. Signed-off-by: John Allen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/r/20240606203313.51197-3-john.allen@amd.com commit efdbe82a216191d77c8edd5e4dabc7cff7d790d9 Author: John Allen Date: Thu Jun 6 20:33:08 2024 +0000 RAS/AMD/ATL: Add amd_atl pr_fmt() prefix Prefix all AMD ATL pr_* statements with "amd_atl:". Signed-off-by: John Allen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240606203313.51197-2-john.allen@amd.com commit e17fb91cd4cde13001dc75ad99a378ab28dd44df Author: Jeff Johnson Date: Sun Jun 9 13:03:30 2024 -0700 Input: add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/touchscreen/cyttsp_i2c_common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/misc/soc_button_array.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/matrix-keymap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/vivaldi-fmap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/tests/input_test.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes drivers/input/misc/sgi_btns.c which, although it did not produce a warning with the x86 allmodconfig configuration, may cause this warning with other configurations when either CONFIG_SGI_IP22 or CONFIG_SGI_IP32 is enabled. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240609-md-drivers-input-v1-1-a2f394e0f9d8@quicinc.com Signed-off-by: Dmitry Torokhov commit 4654c4cc7950440571d142e56db60106d84429d8 Author: Erick Archer Date: Sat Jun 8 17:13:57 2024 +0200 Input: joystick - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). At the same time refactor the code to not use assignment in "if" conditions. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237FEA55FAC8A9453F2DA6F8BC42@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit f81d03d43965261056d963572d0335645008a8e8 Author: Erick Archer Date: Sat Jun 8 16:34:49 2024 +0200 Input: touchscreen - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). The refactoring is mostly trivial except for "usbtouchscreen.c" file. Here, in the "mtouch_alloc" and "nexio_alloc" functions, it is necessary to use a variable with a predefined type instead of the "usbtouch->priv" variable (void * type). This way, the "sizeof" operator can now know the correct size. Moreover, we need to set the "usbtouch->priv" pointer after the memory allocation since now the "kmalloc" return value is not assigned directly. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB723708364CC0DF2EAAFEE5968BC42@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit 28f961f9d5b7c3d9b9f93cc59e54477ba1278cf9 Author: Dan Carpenter Date: Thu Jun 6 17:23:44 2024 +0300 dmaengine: ti: k3-udma-glue: clean up return in k3_udma_glue_rx_get_irq() Currently the k3_udma_glue_rx_get_irq() function returns either negative error codes or zero on error. Generally, in the kernel, zero means success so this be confusing and has caused bugs in the past. Also the "tx" version of this function only returns negative error codes. Let's clean this "rx" function so both functions match. This patch has no effect on runtime. Signed-off-by: Dan Carpenter Acked-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: David S. Miller commit 924ee531754827bf23eacf35e6408a7f44fb9021 Author: Jakub Kicinski Date: Wed Jun 5 10:16:44 2024 -0700 tools: ynl: make user space policies const Dan, who's working on C++ YNL, pointed out that the C code does not make policies const. Sprinkle some 'const's around. Reported-by: Dan Melnic Signed-off-by: Jakub Kicinski Reviewed-by: Donald Hunter Reviewed-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 3e61103b2f7887af0be402a79b9c70425ceba3e3 Author: David Wei Date: Wed Jun 5 09:19:24 2024 -0700 page_pool: remove WARN_ON() with OR Having an OR in WARN_ON() makes me sad because it's impossible to tell which condition is true when triggered. Split a WARN_ON() with an OR in page_pool_disable_direct_recycling(). Signed-off-by: David Wei Reviewed-by: Mina Almasry Reviewed-by: Somnath Kotur Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit f919a823b15303f167655eb69ad7b58fb4d0b92a Author: Dharma Balasubiramani Date: Sun Apr 21 06:40:50 2024 +0530 ARM: configs: at91: Enable LVDS serializer support Enable LVDS serializer support for display pipeline. Signed-off-by: Dharma Balasubiramani Acked-by: Hari Prasath Gujulan Elango Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20240421011050.43265-5-dharma.b@microchip.com Signed-off-by: Claudiu Beznea commit 2a1251e3dbb2995100b6f351c2452228895386a5 Author: Konstantin Taranov Date: Fri Jun 7 03:08:17 2024 -0700 RDMA/mana_ib: Process QP error events in mana_ib Process QP fatal events from the error event queue. For that, find the QP, using QPN from the event, and then call its event_handler. To find the QPs, store created RC QPs in an xarray. Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1717754897-19858-1-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Wei Hu Signed-off-by: Leon Romanovsky commit aee2424246f9f1dadc33faa78990c1e2eb7826e4 Author: Bart Van Assche Date: Wed Jun 5 08:51:01 2024 -0600 RDMA/iwcm: Fix a use-after-free related to destroying CM IDs iw_conn_req_handler() associates a new struct rdma_id_private (conn_id) with an existing struct iw_cm_id (cm_id) as follows: conn_id->cm_id.iw = cm_id; cm_id->context = conn_id; cm_id->cm_handler = cma_iw_handler; rdma_destroy_id() frees both the cm_id and the struct rdma_id_private. Make sure that cm_work_handler() does not trigger a use-after-free by only freeing of the struct rdma_id_private after all pending work has finished. Cc: stable@vger.kernel.org Fixes: 59c68ac31e15 ("iw_cm: free cm_id resources on the last deref") Reviewed-by: Zhu Yanjun Tested-by: Shin'ichiro Kawasaki Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240605145117.397751-6-bvanassche@acm.org Signed-off-by: Leon Romanovsky commit a1babdb5b615751ef5ace97a37f35d0ae40fbf13 Author: Bart Van Assche Date: Wed Jun 5 08:51:00 2024 -0600 RDMA/iwcm: Simplify cm_work_handler() Instead of complicating the code to avoid a spin_lock_irqsave() / spin_lock_irqrestore() pair before returning, simplify the code by removing the local variable 'empty'. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240605145117.397751-5-bvanassche@acm.org Signed-off-by: Leon Romanovsky commit e1168f09b3314992f1c5251f3793102035da7237 Author: Bart Van Assche Date: Wed Jun 5 08:50:59 2024 -0600 RDMA/iwcm: Simplify cm_event_handler() queue_work() can test efficiently whether or not work is pending. Hence, simplify cm_event_handler() by always calling queue_work() instead of only if the list with pending work is empty. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240605145117.397751-4-bvanassche@acm.org Signed-off-by: Leon Romanovsky commit fc772e38bce5635bc1d7efae7198a305504ad112 Author: Bart Van Assche Date: Wed Jun 5 08:50:58 2024 -0600 RDMA/iwcm: Change the return type of iwcm_deref_id() Since iwcm_deref_id() returns either 0 or 1, change its return type from 'int' into 'bool'. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240605145117.397751-3-bvanassche@acm.org Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit b1bc15f8fb5f20b4199fbf10868bd416d9a6a692 Author: Bart Van Assche Date: Wed Jun 5 08:50:57 2024 -0600 RDMA/iwcm: Use list_first_entry() where appropriate Improve source code readability by using list_first_entry() where appropriate. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240605145117.397751-2-bvanassche@acm.org Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit fb7a4931ef141054970ed065151a879764553206 Author: Jeff Johnson Date: Fri Jun 7 15:27:59 2024 -0700 hwmon: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/asus_atk0110.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/corsair-cpro.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/mr75203.o Add all missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240607-md-drivers-hwmon-v1-1-1ea6d6fe61e3@quicinc.com Signed-off-by: Guenter Roeck commit 1ee123794106db34e0248890a8e3388db404108b Author: Javier Carrasco Date: Thu Apr 4 13:13:28 2024 +0200 hwmon: (gsc-hwmon) use device_for_each_child_node_scoped() Switch to the _scoped() version introduced in commit 365130fd47af ("device property: Introduce device_for_each_child_node_scoped()") to remove the need for manual calling of fwnode_handle_put() in the paths where the code exits the loop early. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240404-hwmon_device_for_each_child_node_scoped-v1-2-53997abde43c@gmail.com Signed-off-by: Guenter Roeck commit 234c07400eb4f5d475e4055b11b5ed69f91d3732 Author: Javier Carrasco Date: Thu Apr 4 13:13:27 2024 +0200 hwmon: (ltc2991) use device_for_each_child_node_scoped() Switch to the _scoped() version introduced in commit 365130fd47af ("device property: Introduce device_for_each_child_node_scoped()") to remove the need for manual calling of fwnode_handle_put() in the paths where the code exits the loop early. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240404-hwmon_device_for_each_child_node_scoped-v1-1-53997abde43c@gmail.com Signed-off-by: Guenter Roeck commit 55076454de05b2f5ce8f5ef459685e707a03703f Author: Andrew Davis Date: Wed Apr 3 15:36:33 2024 -0500 hwmon: (w83795): 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 Link: https://lore.kernel.org/r/20240403203633.914389-32-afd@ti.com Signed-off-by: Guenter Roeck commit 00dcf379ffeb333510a532bbe7157df0162600bc Author: Andrew Davis Date: Wed Apr 3 15:36:32 2024 -0500 hwmon: (w83781d) 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 Link: https://lore.kernel.org/r/20240403203633.914389-31-afd@ti.com Signed-off-by: Guenter Roeck commit 38a085f9f4ab2dd6ddd680fb8ff649711faf871e Author: Andrew Davis Date: Wed Apr 3 15:36:31 2024 -0500 hwmon: (tmp464) 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 Link: https://lore.kernel.org/r/20240403203633.914389-30-afd@ti.com Signed-off-by: Guenter Roeck commit 8b6e514c59b063b93645424d902263ea936a8a40 Author: Andrew Davis Date: Wed Apr 3 15:36:30 2024 -0500 hwmon: (tmp421) 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 Link: https://lore.kernel.org/r/20240403203633.914389-29-afd@ti.com Signed-off-by: Guenter Roeck commit 516d5765a359987949679a1a6b5e4a8620a1bfef Author: Andrew Davis Date: Wed Apr 3 15:36:29 2024 -0500 hwmon: (tmp401) 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 Link: https://lore.kernel.org/r/20240403203633.914389-28-afd@ti.com Signed-off-by: Guenter Roeck commit 50ba2d3d48900f30c090467fc11a99a40dbbad11 Author: Andrew Davis Date: Wed Apr 3 15:36:28 2024 -0500 hwmon: (thmc50) 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 Link: https://lore.kernel.org/r/20240403203633.914389-27-afd@ti.com Signed-off-by: Guenter Roeck commit 64306a47193f1d7956f03a4f2cd068fed9703475 Author: Andrew Davis Date: Wed Apr 3 15:36:27 2024 -0500 hwmon: (shtc1) 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 Link: https://lore.kernel.org/r/20240403203633.914389-26-afd@ti.com Signed-off-by: Guenter Roeck commit f147dbd7ea582a32966e5b5ddf2127172ff146d7 Author: Andrew Davis Date: Wed Apr 3 15:36:26 2024 -0500 hwmon: (sht3x) 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 Link: https://lore.kernel.org/r/20240403203633.914389-25-afd@ti.com Signed-off-by: Guenter Roeck commit 77944b479dd5421e4afd73cee4d7567f48f44b04 Author: Andrew Davis Date: Wed Apr 3 15:36:25 2024 -0500 hwmon: (powr1220) 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 Link: https://lore.kernel.org/r/20240403203633.914389-24-afd@ti.com Signed-off-by: Guenter Roeck commit f1230f756a71c4bf4debf2972bc53922aad2784f Author: Andrew Davis Date: Wed Apr 3 15:36:24 2024 -0500 hwmon: (mcp3021) 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 Link: https://lore.kernel.org/r/20240403203633.914389-23-afd@ti.com Signed-off-by: Guenter Roeck commit de5fb06ca77f0e4347f21d4e6dd583f00824619c Author: Andrew Davis Date: Wed Apr 3 15:36:23 2024 -0500 hwmon: (max6697) 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 Link: https://lore.kernel.org/r/20240403203633.914389-22-afd@ti.com Signed-off-by: Guenter Roeck commit 495e6a9cf5509ff6c9e42de9eaf78e35c766aed6 Author: Andrew Davis Date: Wed Apr 3 15:36:22 2024 -0500 hwmon: (max1668) 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 Link: https://lore.kernel.org/r/20240403203633.914389-21-afd@ti.com Signed-off-by: Guenter Roeck commit 5a71654b398e3471f0169c266a3587cf09e1200c Author: Andrew Davis Date: Wed Apr 3 15:36:21 2024 -0500 hwmon: (max16065) 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 Link: https://lore.kernel.org/r/20240403203633.914389-20-afd@ti.com Signed-off-by: Guenter Roeck commit e2791bdfa67c2edf380905faffab71ac91ac6ca2 Author: Andrew Davis Date: Wed Apr 3 15:36:20 2024 -0500 hwmon: (lm95234) 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 Link: https://lore.kernel.org/r/20240403203633.914389-19-afd@ti.com Signed-off-by: Guenter Roeck commit 711e2e4f690dbd46d8cdc6be3b1491e95dfc4426 Author: Andrew Davis Date: Wed Apr 3 15:36:19 2024 -0500 hwmon: (lm90) 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 Link: https://lore.kernel.org/r/20240403203633.914389-18-afd@ti.com Signed-off-by: Guenter Roeck commit 4cfd3ceeaaf506d367ffe2c80c2ffc39c4f0a4f9 Author: Andrew Davis Date: Wed Apr 3 15:36:18 2024 -0500 hwmon: (lm85) 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 Link: https://lore.kernel.org/r/20240403203633.914389-17-afd@ti.com Signed-off-by: Guenter Roeck commit 9339bed921d001d954f08bbe29be63d29653de69 Author: Andrew Davis Date: Wed Apr 3 15:36:17 2024 -0500 hwmon: (lm83) 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 Link: https://lore.kernel.org/r/20240403203633.914389-16-afd@ti.com Signed-off-by: Guenter Roeck commit e49d1a1d330f341e045250dececbe7745638ca19 Author: Andrew Davis Date: Wed Apr 3 15:36:16 2024 -0500 hwmon: (lm78) 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 Link: https://lore.kernel.org/r/20240403203633.914389-15-afd@ti.com Signed-off-by: Guenter Roeck commit 5178911d5c13308a0c2e80e0055c04f36a515bbf Author: Andrew Davis Date: Wed Apr 3 15:36:15 2024 -0500 hwmon: (lm75) 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 Link: https://lore.kernel.org/r/20240403203633.914389-14-afd@ti.com Signed-off-by: Guenter Roeck commit cbc9b40818a20f513e7d3783c38721dd69b793e5 Author: Andrew Davis Date: Wed Apr 3 15:36:14 2024 -0500 hwmon: (lm63) 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 Link: https://lore.kernel.org/r/20240403203633.914389-13-afd@ti.com Signed-off-by: Guenter Roeck commit 8b8396990303b2e723f06dff8d4cfc9d3d9ba865 Author: Andrew Davis Date: Wed Apr 3 15:36:13 2024 -0500 hwmon: (ina2xx) 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 Link: https://lore.kernel.org/r/20240403203633.914389-12-afd@ti.com Signed-off-by: Guenter Roeck commit 945e71d5aa32a3568c7f0d407197e26b2fc3df52 Author: Andrew Davis Date: Wed Apr 3 15:36:12 2024 -0500 hwmon: (fschmd) 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 Link: https://lore.kernel.org/r/20240403203633.914389-11-afd@ti.com Signed-off-by: Guenter Roeck commit 72fdab6b402b47e5c6daf882283789be1380ef00 Author: Andrew Davis Date: Wed Apr 3 15:36:11 2024 -0500 hwmon: (f75375s) 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 Link: https://lore.kernel.org/r/20240403203633.914389-10-afd@ti.com Signed-off-by: Guenter Roeck commit 698d692cd8854ccb6509633f0bdbea2a83c491b3 Author: Andrew Davis Date: Wed Apr 3 15:36:10 2024 -0500 hwmon: (ds1621) 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 Link: https://lore.kernel.org/r/20240403203633.914389-9-afd@ti.com Signed-off-by: Guenter Roeck commit 9072777d9388979d769afa6089926789746e83a8 Author: Andrew Davis Date: Wed Apr 3 15:36:09 2024 -0500 hwmon: (dme1737) 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 Link: https://lore.kernel.org/r/20240403203633.914389-8-afd@ti.com Signed-off-by: Guenter Roeck commit 941421c9eae2ead12583ec2a6af119e268746757 Author: Andrew Davis Date: Wed Apr 3 15:36:08 2024 -0500 hwmon: (aht10) 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 Link: https://lore.kernel.org/r/20240403203633.914389-7-afd@ti.com Signed-off-by: Guenter Roeck commit 732d2624cf9015988c152cb2758ec807907e7d1a Author: Andrew Davis Date: Wed Apr 3 15:36:07 2024 -0500 hwmon: (adt7475) 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 Link: https://lore.kernel.org/r/20240403203633.914389-6-afd@ti.com Signed-off-by: Guenter Roeck commit ec6755630773bbfdbf07abbab35ba78a581badfe Author: Andrew Davis Date: Wed Apr 3 15:36:06 2024 -0500 hwmon: (ads7828) 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 Link: https://lore.kernel.org/r/20240403203633.914389-5-afd@ti.com Signed-off-by: Guenter Roeck commit 0f1874f8474776e3af7ab4b2085bd9a1b8383783 Author: Andrew Davis Date: Wed Apr 3 15:36:05 2024 -0500 hwmon: (adm1031) 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 Link: https://lore.kernel.org/r/20240403203633.914389-4-afd@ti.com Signed-off-by: Guenter Roeck commit 884369b2c9f4897a09b97792f7b67d3ff9e11676 Author: Andrew Davis Date: Wed Apr 3 15:36:04 2024 -0500 hwmon: (adm1021) 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 Link: https://lore.kernel.org/r/20240403203633.914389-3-afd@ti.com Signed-off-by: Guenter Roeck commit 244f1664fe36471573ecb7eb1fb722f4d17e54bb Author: Andrew Davis Date: Wed Apr 3 15:36:03 2024 -0500 hwmon: (ad7418) 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 Link: https://lore.kernel.org/r/20240403203633.914389-2-afd@ti.com Signed-off-by: Guenter Roeck commit b1ea8f7a30a01d3e314cd889ac6bd9f41675d23f Author: Krzysztof Kozlowski Date: Thu Jun 6 16:25:15 2024 +0200 hwmon: lm70: simplify with spi_get_device_match_data() Use spi_get_device_match_data() helper to simplify a bit the driver. Also kernel_ulong_t type is preferred for kernel code over uintptr_t (needed for the cast). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240606142515.132504-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck commit 3d0316c949e26392a5098e23c139c932991e50ce Author: Alex Bee Date: Thu Jun 6 16:33:58 2024 +0200 clk: rockchip: rk3128: Drop CLK_NR_CLKS usage In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240606143401.32454-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 9f53b59f4843e7020f1cb0baecd2873f78136d76 Author: Bruna Bispo Date: Tue May 28 11:38:16 2024 -0300 iio: chemical: ams-iaq-core: clean up codestyle warning This fixes a checkpatch warning by changing the struct attribute from __attribute__((__packed__)) to __packed. Signed-off-by: Bruna Bispo Link: https://lore.kernel.org/r/20240528143816.13409-1-blbispo1@gmail.com Signed-off-by: Jonathan Cameron commit ef60f9ca26d33d0f8e1a709771c61d3e96f64559 Author: Ramona Gradinariu Date: Tue May 28 17:24:09 2024 +0300 docs: iio: add documentation for adis16480 driver Add documentation for adis16480 driver which describes the driver device files and shows how the user may use the ABI for various scenarios (configuration, measurement, etc.). Signed-off-by: Ramona Gradinariu Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240528142409.239187-7-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 62fe4b067581d480e863191305f108bebffbc0e9 Author: Sam Ravnborg Date: Fri May 31 22:37:45 2024 +0200 drm/mediatek: Drop chain_mode_fixup call in mode_valid() The mode_valid implementation had a call to drm_bridge_chain_mode_fixup() which would be wrong as the mode_valid is not allowed to change anything - only to validate the mode. As the next bridge is often/always a connector the call had no effect anyway. So drop it. From the git history I could see this call was included in the original version of the driver so there was no help there to find out why it was added in the first place. But a lot has changed since the initial driver were added and is seems safe to remove the call now. Signed-off-by: Sam Ravnborg Reviewed-by: Maxime Ripard Reviewed-by: Laurent Pinchart Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: Dafna Hirschfeld Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.kernel.org/project/dri-devel/patch/20240531-bridge_chain_mode-v1-1-8b49e36c5dd3@ravnborg.org/ Signed-off-by: Chun-Kuang Hu commit f5d5759d29e93fa76466204ad34169b3900a36c6 Author: Uwe Kleine-König Date: Tue Apr 9 19:02:49 2024 +0200 drm/mediatek: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/4a64dfbfbcfdf9b7cd46bc8026223e69a4b453b4.1712681770.git.u.kleine-koenig@pengutronix.de/ Signed-off-by: Chun-Kuang Hu commit 614abc11870ee7ec5a32c81b7ecf4232ede48ecb Author: Andreas Gruenbacher Date: Fri Jun 7 11:47:47 2024 +0200 gfs2: Fold qd_fish into gfs2_quota_sync The split between qd_fish() and gfs2_quota_sync() is rather unfortunate as qd_fish() is repeatedly called to scan sdp->sd_quota_list only to find the next object to that needs syncing; if there are multiple objects on the list that need syncing, it makes more sense to grab them all in one go. This is relatively easy to do when qd_fish() is folded into gfs2_quota_sync(). Signed-off-by: Andreas Gruenbacher commit b510af07aaa4d8a7095bc0368020d8bdba5af942 Author: Andreas Gruenbacher Date: Thu Jun 6 05:37:02 2024 +0200 gfs2: quota need_sync cleanup Rename variable 'value' to 'change' as it stores a change in value. Add new 'value' and 'limit' variables for the current value and limit. Only fetch the tuning parameters when we need them. Get rid of unnecessary nesting. No change in functionality. Signed-off-by: Andreas Gruenbacher commit 7da4d6e178f405d7abdfc42ea7ac0074e9a6aa45 Author: Andreas Gruenbacher Date: Thu Jun 6 00:24:40 2024 +0200 gfs2: Fix and clean up function do_qc Function do_qc() is supposed to be conceptually simple: it alters the current in-memory and on-disk quota change values for a given uid/gid by a given delta. If the on-disk record isn't defined yet, a new record is created. If the on-disk record exists and the resulting change value is zero, there no longer is a need for that record and so the record is deleted. On top of that, some reference counting is involved when creating and deleting records. Currently, instead of doing the above, do_qc() alters the on-disk value and then it sets the in-memory value to the on-disk value. This is incorrect when the on-disk value differs from the in-memory value. The two values are allowed to differ when quota changes are synced to the global quota file. Fix by changing both values by the same amount. In addition, do_qc() currently gets confused when the delta value is 0. It isn't supposed to be called that way, but that assumption isn't mentioned and it makes the code harder to read. Make the code more explicit. Signed-off-by: Andreas Gruenbacher commit ec4b5200c8af9ce021399d3192b3379c089396c3 Author: Andreas Gruenbacher Date: Wed Jun 5 22:13:15 2024 +0200 gfs2: Revert "Add quota_change type" Commit 432928c93779 ("gfs2: Add quota_change type") makes the incorrect assertion that function do_qc() should behave differently in the two contexts it is used in, but that isn't actually true. In all cases, do_qc() grabs a "reference" when it starts using a slot in the per-node quota changes file, and it releases that "reference" when no more residual changes remain. Revert that broken commit. There are some remaining issues with function do_qc() which are addressed in the next commit. This reverts commit 432928c9377959684c748a9bc6553ed2d3c2ea4f. Signed-off-by: Andreas Gruenbacher commit 4b4b6374dc6134849f2bdca81fa2945b6ed6d9fc Author: Andreas Gruenbacher Date: Mon Jun 3 19:04:09 2024 +0200 gfs2: Revert "ignore negated quota changes" Commit 4c6a08125f22 ("gfs2: ignore negated quota changes") skips quota changes with qd_change == 0 instead of writing them back, which leaves behind non-zero qd_change values in the affected slots. The kernel then assumes that those slots are unused, while the qd_change values on disk indicate that they are indeed still in use. The next time the filesystem is mounted, those invalid slots are read in from disk, which will cause inconsistencies. Revert that commit to avoid filesystem corruption. This reverts commit 4c6a08125f2249531ec01783a5f4317d7342add5. Signed-off-by: Andreas Gruenbacher commit 59ebc33201237bf38e5adca3794716100660c5b4 Author: Andreas Gruenbacher Date: Fri Jun 7 02:23:54 2024 +0200 gfs2: qd_check_sync cleanups Rename qd_check_sync() to qd_grab_sync() and make it return a bool. Turn the sync_gen pointer into a regular u64 and pass in U64_MAX instead of a NULL pointer when sync generation checking isn't needed. Introduce a new qd_ungrab_sync() helper for undoing the effects of qd_grab_sync() if the subsequent bh_get() on the qd object fails. Signed-off-by: Andreas Gruenbacher commit 2aedfe847b4d91eabee11a44c27244055cef4eb3 Author: Andreas Gruenbacher Date: Fri Jun 7 02:11:12 2024 +0200 gfs2: Revert "introduce qd_bh_get_or_undo" The qd_bh_get_or_undo() helper introduced by that commit doesn't improve the code much, so revert it and clean things up in a more useful way in the next commit. This reverts commit 7dbc6ae60dd7089d8ed42892b6a66c138f0aa7a0. Signed-off-by: Andreas Gruenbacher commit 497624ed550604b3f713f53bc506e49ce5046e5f Author: Konrad Dybcio Date: Fri May 10 14:58:41 2024 +0200 arm64: dts: qcom: sm8650: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Also, register the GPU as a cooling device and hook it up to the right thermal zones. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-12-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit ed979c039ad1c9b02dd7e9fa6a0dd69209bac6ed Author: Konrad Dybcio Date: Fri May 10 14:58:40 2024 +0200 arm64: dts: qcom: sm8550: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Remove the copypasta-from-downstream userspace governor entries while at it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-11-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit 4be0dd44c39b083148ae9d4c4a7ef6d64e6c0062 Author: Konrad Dybcio Date: Fri May 10 14:58:39 2024 +0200 arm64: dts: qcom: sm8450: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Remove the copypasta-from-downstream userspace governor entries while at it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-10-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit 10a5555220ad20b2f8043060d76b0e7f83ae91fa Author: Konrad Dybcio Date: Fri May 10 14:58:38 2024 +0200 arm64: dts: qcom: sm8350: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-9-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit c862b78b7203b72dd6806a77c0feff60fe96dee5 Author: Konrad Dybcio Date: Fri May 10 14:58:37 2024 +0200 arm64: dts: qcom: sm8250: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-8-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit c61300433b7b89d5782fddf95bd96a6e819c0377 Author: Konrad Dybcio Date: Fri May 10 14:58:36 2024 +0200 arm64: dts: qcom: sm8150: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-7-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit 1a558bbffc2ee9b99226b146fd7928e41db79d41 Author: Konrad Dybcio Date: Fri May 10 14:58:35 2024 +0200 arm64: dts: qcom: sm6350: Update GPU thermal zone settings Lower the thresholds to something more reasonable and introduce a passive polling delay to make sure more than one "passive" thermal point is taken into account when throttling. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-6-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit c518b5f6def159222d73f3241fb1802bc846a477 Author: Konrad Dybcio Date: Fri May 10 14:58:34 2024 +0200 arm64: dts: qcom: sm6115: Update GPU thermal zone settings Lower the thresholds to something more reasonable and introduce a passive polling delay to make sure more than one "passive" thermal point is taken into account when throttling. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-5-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit b79dd56ed5fcc863f167eb53771b09e8b3d8e317 Author: Konrad Dybcio Date: Fri May 10 14:58:33 2024 +0200 arm64: dts: qcom: sdm845: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-4-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit 545fef1e5e43fb73083d16507a13820179726ebe Author: Konrad Dybcio Date: Fri May 10 14:58:32 2024 +0200 arm64: dts: qcom: sdm630: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-3-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit f7fd6d04c1046107a87a0fc883ed044cf8b877a1 Author: Konrad Dybcio Date: Fri May 10 14:58:31 2024 +0200 arm64: dts: qcom: sc8280xp: Throttle the GPU when overheating Add an 85C passive trip point with 1C of hysteresis to ensure the thermal framework takes sufficient action to prevent reaching junction temperature. Also, add passive polling to ensure more than one temperature change event is recorded. Fixes: 014bbc990e27 ("arm64: dts: qcom: sc8280xp: Introduce additional tsens instances") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-2-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit 7c05517e5e68205c9d5085c029df2ca4e6ad9237 Author: Konrad Dybcio Date: Fri May 10 14:58:30 2024 +0200 arm64: dts: qcom: sc8180x: Throttle the GPU when overheating Add an 85C passive trip point to ensure the thermal framework takes sufficient action to prevent reaching junction temperature and a 110C critical point to help avoid hw damage. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-gpus_are_cool_now-v1-1-ababc269a438@linaro.org Signed-off-by: Bjorn Andersson commit 92332cca0551b7c5c44f4236b8d1ce2828888e92 Author: Konrad Dybcio Date: Fri May 10 13:59:54 2024 +0200 arm64: dts: qcom: sm8650-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-31-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit fe5cb7d30795d81ed55888bcfb896086af3adc01 Author: Konrad Dybcio Date: Fri May 10 13:59:53 2024 +0200 arm64: dts: qcom: sm8550-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-30-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit d0730a729f1a723f06e7b9db7f1a540cf72de871 Author: Konrad Dybcio Date: Fri May 10 13:59:52 2024 +0200 arm64: dts: qcom: sm8450-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-29-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 07fab48327ad0d85c2b2763d26ce56c84043515a Author: Konrad Dybcio Date: Fri May 10 13:59:51 2024 +0200 arm64: dts: qcom: sm8350-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-28-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 2d10e2e28df7a690d670b3452d4891b50011dc42 Author: Konrad Dybcio Date: Fri May 10 13:59:50 2024 +0200 arm64: dts: qcom: sm8250-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-27-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit fc2f92b522019a5bfd464c946b15d180c31b092b Author: Konrad Dybcio Date: Fri May 10 13:59:49 2024 +0200 arm64: dts: qcom: sm8150-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-26-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 088d826d5af3cda20deb04dce406c95ef1ed8563 Author: Konrad Dybcio Date: Fri May 10 13:59:48 2024 +0200 arm64: dts: qcom: sm6375-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-25-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 2aad3fd3820d047fa70b62906565c185d830465c Author: Konrad Dybcio Date: Fri May 10 13:59:47 2024 +0200 arm64: dts: qcom: sm6350-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-24-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit d1a12560ef38021ce42ac31408fc53d2b8e08cc8 Author: Konrad Dybcio Date: Fri May 10 13:59:46 2024 +0200 arm64: dts: qcom: sm6125-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-23-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 190f743561a44cf0176707b6e2f37b1a1b7ff367 Author: Konrad Dybcio Date: Fri May 10 13:59:45 2024 +0200 arm64: dts: qcom: sm6115-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-22-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 2e58dbeae40e5fc7b2742bed05957cae32031387 Author: Konrad Dybcio Date: Fri May 10 13:59:44 2024 +0200 arm64: dts: qcom: sdm845-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-21-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 82162bf535a76f87e20a6eece83375d2dd791655 Author: Konrad Dybcio Date: Fri May 10 13:59:43 2024 +0200 arm64: dts: qcom: sdm660-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-20-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit e388421387e8b1b51c507883aaf13f40277fe137 Author: Konrad Dybcio Date: Fri May 10 13:59:42 2024 +0200 arm64: dts: qcom: sc8280xp-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-19-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 1f57b1cff485c02678ea2dfe0ff7efa3b9f51e9d Author: Konrad Dybcio Date: Fri May 10 13:59:41 2024 +0200 arm64: dts: qcom: sc8180x-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-18-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 7747a49db7e54978151d74b22907a373c9b4de1b Author: Konrad Dybcio Date: Fri May 10 13:59:40 2024 +0200 arm64: dts: qcom: sc7280-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-17-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 7cd2d9080a6eb281701f7303b1699719640380d0 Author: Konrad Dybcio Date: Fri May 10 13:59:39 2024 +0200 arm64: dts: qcom: sc7180-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-16-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit a759962163af22b7f50c8f43ed8b3fc5e09bec19 Author: Konrad Dybcio Date: Fri May 10 13:59:38 2024 +0200 arm64: dts: qcom: sa8775p-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-15-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 8d7807d24746af11ba966bce854ef3cd8df5267e Author: Konrad Dybcio Date: Fri May 10 13:59:37 2024 +0200 arm64: dts: qcom: qcs404-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-14-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit d3eb8179f21f86439053745bb1504791236d38bf Author: Konrad Dybcio Date: Fri May 10 13:59:36 2024 +0200 arm64: dts: qcom: qcm2290-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-13-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 8e49df9200591c469dfbdd29c93ee6cbe970aa2a Author: Konrad Dybcio Date: Fri May 10 13:59:35 2024 +0200 arm64: dts: qcom: pmx75: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-12-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 1a78b5da8164afc1d60bec7c02b8fd8e6451f0f3 Author: Konrad Dybcio Date: Fri May 10 13:59:34 2024 +0200 arm64: dts: qcom: pms405: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-11-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit d96854de5d69a08a893d4a137d69c65f2feb40d5 Author: Konrad Dybcio Date: Fri May 10 13:59:33 2024 +0200 arm64: dts: qcom: pm7550ba: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-10-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 47d92455f59f7e8414ebc962f60bd7a990563a7c Author: Konrad Dybcio Date: Fri May 10 13:59:32 2024 +0200 arm64: dts: qcom: msm8998-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-9-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 612f017315fb466bc9348fb9a5f1d9506f4b5260 Author: Konrad Dybcio Date: Fri May 10 13:59:31 2024 +0200 arm64: dts: qcom: msm8996-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-8-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit adfb64b78f2f0e894c2520b8e2ff8bd5f2d49825 Author: Konrad Dybcio Date: Fri May 10 13:59:30 2024 +0200 arm64: dts: qcom: msm8976-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-7-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 1a43ff5b5f5a51c2dd0859bc46020e7f1c282414 Author: Konrad Dybcio Date: Fri May 10 13:59:29 2024 +0200 arm64: dts: qcom: msm8953-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-6-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 19c658e5bfe71b01ae41e85dab076da051814857 Author: Konrad Dybcio Date: Fri May 10 13:59:28 2024 +0200 arm64: dts: qcom: msm8939-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-5-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit b3f0d522b548e969b138c48c0fd4098703363c53 Author: Konrad Dybcio Date: Fri May 10 13:59:27 2024 +0200 arm64: dts: qcom: msm8916-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-4-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 88dd10e237ee1cfc70595c0feb37c8a71e521bfc Author: Konrad Dybcio Date: Fri May 10 13:59:26 2024 +0200 arm64: dts: qcom: ipq9574-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Reviewed-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-3-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit bebd3c6476c97d0aee8985eb9544dfd82f6e8e36 Author: Konrad Dybcio Date: Fri May 10 13:59:25 2024 +0200 arm64: dts: qcom: ipq8074-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-2-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 28930820bf8928c8247d6b001e042ce7e0037350 Author: Konrad Dybcio Date: Fri May 10 13:59:24 2024 +0200 arm64: dts: qcom: ipq6018-*: Remove thermal zone polling delays All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240510-topic-msm-polling-cleanup-v2-1-436ca4218da2@linaro.org Signed-off-by: Bjorn Andersson commit 425ae3ab5a1fa744a00680f059cf1accaaaecb28 Author: Jeff Johnson Date: Fri May 31 16:58:42 2024 -0700 list: test: add the missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/list-test.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: David Gow Signed-off-by: Shuah Khan commit a5217468214c228b89da37291de604cd756914ab Author: Jeff Johnson Date: Sat Jun 1 10:19:11 2024 -0700 kunit: add missing MODULE_DESCRIPTION() macros to core modules make allmodconfig && make W=1 C=1 reports in lib/kunit: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit-test.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/kunit/kunit-example-test.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit de0d95c26c41c1776e4d23b1a8b3f2bcfd1dae5f Author: Andreas Gruenbacher Date: Mon Jun 3 18:45:00 2024 +0200 gfs2: Check quota consistency on mount In gfs2_quota_init(), make sure that the per-node "quota_change%u" file doesn't contain duplicate uids/gids. Those duplicates would cause us to acquire the glock corresponding to those ids repeatedly, which the glock code doesn't allow. When finding inconsistencies, we wipe them out and ignore them. The resulting quotas will likely be inconsistent, and running quotacheck(1) is advised. Signed-off-by: Andreas Gruenbacher commit 658a8805cb604260ae9f35ae5e50012e3d1ed5e3 Author: Thomas Richter Date: Fri Jun 7 07:43:52 2024 +0200 perf test: Speed up test case 70 annotate basic tests On some s390 linux machine (mostly older models) and with debug packages installed, the test case 'perf annotate basic tests' runs for some longer time. Speed up the test and save the output of command perf annotate in a temporary file. This is used to perform pattern matching via grep command. This saves on invocation of perf annotate which runs for some time. Output before: # time bash -x tests/shell/annotate.sh >/dev/null 2>&1; echo EXIT CODE $? real 4m35.543s user 3m19.442s sys 1m14.322s EXIT CODE 0 # Output after: # time bash -x tests/shell/annotate.sh >/dev/null 2>&1; echo EXIT CODE $? real 2m2.881s user 1m30.980s sys 0m30.684s EXIT CODE 0 # Signed-off-by: Thomas Richter Acked-by: Namhyung Kim Cc: gor@linux.ibm.com Cc: hca@linux.ibm.com Cc: sumanthk@linux.ibm.com Cc: svens@linux.ibm.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240607054352.2774936-1-tmricht@linux.ibm.com commit f5803651b4a4b67d9521994d501619a0d8ff3b11 Author: Ian Rogers Date: Tue Jun 4 23:38:28 2024 -0700 perf stat: Choose the most disaggregate command line option When multiple aggregation options are passed to perf stat the behavior isn't clear. Consider "perf stat -A --per-socket .." and "perf stat --per-socket -A ..", the first won't aggregate at all while the second will do per-socket aggregation, even though the same options were passed. Rather than set an enum value, gather the options in a struct and process them from most to least aggregate. This ensures the least aggregate option always applies, so no aggregation if "-A" is passed. Signed-off-by: Ian Rogers Cc: Stephane Eranian Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240605063828.195700-2-irogers@google.com commit 0dddd91ab68fed4fe12b69fe225cb00a4ea16126 Author: Ian Rogers Date: Tue Jun 4 23:38:27 2024 -0700 perf stat: Make options local Reduce the scope of stat_options to cmd_stat, and pass as an argument to __cmd_record. This is done to make more localized changes to the options in later patches. A side-effect of the change is to reduce the size of a stripped PIE perf binary by 5952 bytes. The savings come mainly in the dynamic relocation section. Signed-off-by: Ian Rogers Cc: Stephane Eranian Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240605063828.195700-1-irogers@google.com commit 540c53d158d947db1249614d47437c660ba0b959 Merge: f82ecf76cdd47 bce843065804f Author: Mark Brown Date: Fri Jun 7 20:57:22 2024 +0100 regmap: Switch to use kmemdup_array() Merge series from Andy Shevchenko : Replace open coded kmemdup_array(), which does an additional overflow check. While at it, fix one minor issue in regcache.c. commit 7d2ebbc33d9f65a492d8a41fd33036e411366341 Author: Masahiro Yamada Date: Fri May 17 21:04:58 2024 +0900 PCI: Use array for .id_table consistently While 'x' and '&x[0]' are equivalent, most of the PCI drivers use the former form for the .id_table. Update some drivers and documentation for consistency. Link: https://lore.kernel.org/r/20240517120458.1260489-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Signed-off-by: Bjorn Helgaas commit f4c7fa7c058b9893b7a949cdb2f2aa504903f497 Author: Dmitry Torokhov Date: Tue Dec 12 21:33:58 2023 -0800 Input: cap11xx - stop using chip ID when configuring it struct cap11xx_hw_model is supposed to describe the chip capabilities, however later code changes introduced checks against chip ID. Introduce new capabilities in cap11xx_hw_model and use them when applying chip configuration, and remove the enum for chip ID. While at it, rename no_gain to has_gain to match the rest of the new capabilities. Reviewed-by: Jiri Valek - 2N Link: https://lore.kernel.org/r/ZXlCRsnOu_L8xeTC@google.com Signed-off-by: Dmitry Torokhov commit 6560cfcfb46511d47893d6e3994ce1d3c58ddf7f Author: Chris Morgan Date: Fri Jan 19 00:19:08 2024 -0800 Input: adc-joystick - handle inverted axes When one or more axes are inverted, (where min > max), normalize the data so that min < max and invert the values reported to the input stack. This ensures we can continue defining the device correctly in the device tree while not breaking downstream assumptions that min is always less than max. Signed-off-by: Chris Morgan Acked-by: Artur Rojek Link: https://lore.kernel.org/r/20240115192752.266367-1-macroalpha82@gmail.com Signed-off-by: Dmitry Torokhov commit 8b2f0cb63e6f5370b2c100f5e0f0288339344827 Author: Todd Brandt Date: Fri May 31 02:13:10 2024 -0700 pm-graph: v5.12, code revamp for python3.12 sleepgraph/bootgraph function correctly in python3.12 but include a slew of deprecation warnings for unsupported regexes. This patch fixes up all the strings in the code so that it comforms with python3.12 standards. Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit c9d197ec16013cb2a3d4efa9b459dcc1be795551 Author: Todd Brandt Date: Fri May 31 02:13:09 2024 -0700 pm-graph: v5.12, fixes - fix S3 suspend fail double run by using fp.flush to /sys/power/state - when running turbostat print the return value - handle case where html files have binary data - max issues in summary-issues is now 100 (in case there are thousands) - add backup to dmidecode, use /sys/class/dmi/id/ in case /dev/mem fails - update summary page to use full mode (disk-platform instead of disk) Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit 68de0ae4d6b5ea675b835e4a6b00f52a26cd7f0c Author: Zhang Rui Date: Thu May 30 23:17:04 2024 +0800 thermal: intel: intel_pch: Improve cooling log The intel_pch_thermal cooling mechanism currently only provides one of the following final conclusions: 1. intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [48C] 2. intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [49C] after 30700 ms delay 3. intel_pch_thermal 0000:00:12.0: CPU-PCH is hot [60C] after 60000 ms delay. S0ix might fail 4. intel_pch_thermal 0000:00:12.0: Wakeup event detected, abort cooling This does not provide sufficient context about what is happening, especially for case 4. Add one line log to indicate when PCH overheats and the cooling delay has started. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 68f2d1dc4826e7bafbfbf7acc745913623a48955 Author: Dr. David Alan Gilbert Date: Wed May 29 18:53:09 2024 +0100 thermal: int3403: remove unused struct 'int3403_performance_state' 'int3403_performance_state' has never been used since the original commit 4384b8fe162d ("Thermal: introduce int3403 thermal driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 7e1c3f584ee78b0d0210fc424420d9529f3ca952 Author: Srinivas Pandruvada Date: Wed May 29 22:53:30 2024 -0700 cpufreq: intel_pstate: Support Emerald Rapids OOB mode Prevent intel_pstate from loading when OOB (Out Of Band) P-states mode is enabled in Emerald Rapids. The OOB identifying bits are same as for the prior generation CPUs like Sapphire Rapids servers, so also add Emerald Rapids to the intel_pstate_cpu_oob_ids[] list. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit e2ae7893b716b598b07169762f619a7e6c1d4fa9 Author: Srinivas Pandruvada Date: Thu Jun 6 11:27:48 2024 -0700 cpufreq: intel_pstate: Use Meteor Lake EPPs for Arrow Lake Use the same default EPPs as Meteor Lake generation. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit bd7246a19ed85451befc3c8fc6038a7d955e7d5f Merge: 1968845d358e1 0edb555a65d1e Author: Greg Kroah-Hartman Date: Fri Jun 7 21:07:09 2024 +0200 Merge tag 'platform-remove-void-step-b' of https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux into driver-core-next Uwe writes: Change struct platform_driver::remove() to return void This is step b) of the plan outlined in commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value"), which completes the first major step of making the remove callback return no value. Up to now it returned an int which however was mostly ignored by the driver core and lured driver authors to believe there is some error handling. Note that the Linux driver model assumes that removing a device cannot fail, so this isn't about being lazy and not implementing error handling in the core and so making .remove return void is the right thing to do. * tag 'platform-remove-void-step-b' of https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: platform: Make platform_driver::remove() return void samples: qmi: Convert to platform remove callback returning void nvdimm/of_pmem: Convert to platform remove callback returning void nvdimm/e820: Convert to platform remove callback returning void gpu: ipu-v3: Convert to platform remove callback returning void gpu: host1x: Convert to platform remove callback returning void drm/mediatek: Convert to platform remove callback returning void drm/imagination: Convert to platform remove callback returning void gpu: host1x: mipi: Benefit from devm_clk_get_prepared() pps: clients: gpio: Convert to platform remove callback returning void fsi: occ: Convert to platform remove callback returning void fsi: master-gpio: Convert to platform remove callback returning void fsi: master-ast-cf: Convert to platform remove callback returning void fsi: master-aspeed: Convert to platform remove callback returning void reset: ti-sci: Convert to platform remove callback returning void reset: rzg2l-usbphy-ctrl: Convert to platform remove callback returning void reset: meson-audio-arb: Convert to platform remove callback returning void commit 8bdab3c8f2e696fcb3bf65832376ac91ef6da271 Author: Srinivas Pandruvada Date: Thu Jun 6 11:12:14 2024 -0700 cpufreq: intel_pstate: Update Meteor Lake EPPs Update the default balance_performance EPP to 64. This gives better performance and also perf/watt compared to current value of 115. For example: Speedometer 2.1 score: +19% Perf/watt: +5.25% Webxprt 4 score score: +12% Perf/watt: +6.12% 3DMark Wildlife extreme unlimited score score: +3.2% Perf/watt: +11.5% Geekbench6 MT score: +2.14% Perf/watt: +0.32% Also update balance_power EPP default to 179. With this change: Video Playback power is reduced by 52% Team video conference power is reduced by 35% With Power profile daemon now sets balance_power EPP on DC instead of balance_performance, updating balance_power EPP will help to extend battery life. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 5bbcece640ef7570ca090a5b35af035fe4ecc7b1 Author: Erick Archer Date: Fri Jun 7 19:17:55 2024 +0200 Input: gameport - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/PAXPR02MB72483F512F863C74A4AECA2B8BFB2@PAXPR02MB7248.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit 1007d2c5d77d2eab9dc2ba47f7de00a53d0bab73 Author: Erick Archer Date: Thu Jun 6 19:21:06 2024 +0200 thermal: int3400: Use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Signed-off-by: Rafael J. Wysocki commit 06b449d7f7c361dc15ea040966a46ed2c6508f3b Author: Erick Archer Date: Fri Jun 7 19:04:23 2024 +0200 Input: serio - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit e5753da31c61a049113be99d27e9f46755484577 Author: Thorsten Blum Date: Wed Jun 5 15:58:42 2024 +0200 powercap: idle_inject: Simplify if condition The if condition !A || A && B can be simplified to !A || B. Fixes the following Coccinelle/coccicheck warning reported by excluded_middle.cocci: WARNING !A || A && B is equivalent to !A || B Compile-tested only. Signed-off-by: Thorsten Blum Signed-off-by: Rafael J. Wysocki commit bf183113842b0fcf4b6f977a97fa9cf8e2b21625 Author: Christian Loehle Date: Tue Jun 4 11:55:29 2024 +0100 cpuidle: menu: Cleanup after loadavg removal The performance impact of loadavg was removed with commit a7fe5190c03f ("cpuidle: menu: Remove get_loadavg() from the performance multiplier") With only iowait remaining the description can be simplified, remove also the no longer needed includes. Signed-off-by: Christian Loehle Signed-off-by: Rafael J. Wysocki commit a31a0a3e90b442c1a414be24b062e27624a40a8e Author: Tony Luck Date: Tue May 28 11:47:16 2024 -0700 thermal: intel: intel_soc_dts_thermal: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit b9064fb834bf50789819cfcc1449b3197ae43b68 Author: Tony Luck Date: Tue May 28 11:47:20 2024 -0700 powercap: intel_rapl: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 4b32e5e873f7c8d4facc727a62670d70e1ea9570 Author: Tony Luck Date: Tue May 28 11:47:15 2024 -0700 powercap: intel_rapl_msr: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 76dbc41608167d531f9c45d60054fd1f76498785 Author: Balasubramani Vivekanandan Date: Tue Jun 4 19:30:21 2024 +0530 drm/i915/display/bmg: Add platform descriptor Platform descriptor defined and PCI IDs added for Battlemage. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Radhakrishna Sripada Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240604140021.1357502-1-balasubramani.vivekanandan@intel.com commit 0f46ecc4242a49eb4630d0ac32afbb235f1239fa Author: Tony Luck Date: Tue May 28 11:47:17 2024 -0700 thermal: intel: intel_tcc_cooling: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 17c4fc386b0c936d60e975d584bba4769d1471f5 Author: Tony Luck Date: Tue May 28 11:47:14 2024 -0700 intel_idle: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit ca8752384c6f75a38aef40f0cbcb810af172feec Author: Tony Luck Date: Tue May 28 11:47:19 2024 -0700 cpufreq: intel_pstate: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 691fef8ccbb70dc5cd242b2bd14a0e95b7d1cc17 Author: Tony Luck Date: Tue May 28 11:47:13 2024 -0700 cpufreq: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit dde8ec86c3fdb2666f55a6c33df097cf5384b057 Author: Tony Luck Date: Tue May 28 11:47:18 2024 -0700 ACPI: LPSS: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 8e9d83d7228f663ef340ebb339eaffc677277bd4 Author: Jeff Johnson Date: Mon Jun 3 10:06:42 2024 -0700 dmaengine: qcom: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/qcom/hdma_mgmt.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/qcom/hdma.o Add the missing invocations of the MODULE_DESCRIPTION() macro, using the descriptions from the associated Kconfig items. Signed-off-by: Jeff Johnson Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20240603-md-drivers-dma-qcom-v1-1-d1bd919352bf@quicinc.com Signed-off-by: Vinod Koul commit ea00def538eceda618b940fef757f55c1190e327 Author: Lucas Stach Date: Thu May 16 12:25:32 2024 +0200 dmaengine: imx-sdma: don't print warning when firmware is absent The SDMA firmware is optional and a usable fallback to the internal ROM firmware is present in the driver. There is already a message printed informing the user that the internal firmware is used, so there is no need to print a scary warning for what is normal operation on most systems. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20240516102532.213874-2-l.stach@pengutronix.de Signed-off-by: Vinod Koul commit 11c63e57404e538c5df91f732e5d505860edb660 Author: Lucas Stach Date: Thu May 16 12:25:31 2024 +0200 firmware: add nowarn variant of request_firmware_nowait() Device drivers with optional firmware may still want to use the asynchronous firmware loading interface. To avoid printing a warning into the kernel log when the optional firmware is absent, add a nowarn variant of this interface. Signed-off-by: Lucas Stach Reviewed-by: Greg Kroah-Hartman Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20240516102532.213874-1-l.stach@pengutronix.de Signed-off-by: Vinod Koul commit 45a24e40581db95f9c7ee08e0f27874daf7d3e7b Author: Animesh Agarwal Date: Wed Jun 5 06:03:49 2024 +0530 dt-bindings: dma: fsl,imx-dma: Convert to dtschema Convert the fsl i.MX DMA controller bindings to DT schema. Remove old and deprecated properties #dma-channels and #dma-requests. Signed-off-by: Animesh Agarwal Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240605003356.46458-1-animeshagarwal28@gmail.com Signed-off-by: Vinod Koul commit a5dc404213192229aeac362bdca0b5fa95a42c2d Author: Krzysztof Kozlowski Date: Tue Jun 4 15:07:14 2024 +0200 dmaengine: ti: k3-udma: fix module autoloading Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604130714.185681-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 6e2fb806e08d46cbeb96c1000ef531a92d3b2e9a Author: Jeff Johnson Date: Thu Jun 6 13:00:01 2024 -0700 dmaengine: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/idxd/idxd.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/omap-dma.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/dmatest.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ioat/ioatdma.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Acked-by: Dave Jiang Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240606-md-drivers-dma-v2-1-0770dfdf74dd@quicinc.com Signed-off-by: Vinod Koul commit 7ccc215187a78f2e5260b9ca82505219bcbec899 Author: Wenchao Hao Date: Thu Jun 6 16:52:16 2024 +0800 workqueue: Clean code in alloc_and_link_pwqs() wq->flags would not change, so it's not necessary to check if WQ_BH is set in loop for_each_possible_cpu(), move define and set of pools out of loop to simpliy the code. Signed-off-by: Wenchao Hao Signed-off-by: Tejun Heo commit 4468d0488ecb91639f12659f8a025139120a431b Author: Matthew Brost Date: Tue Jun 4 11:47:00 2024 -0700 drm/xe: Drop EXEC_QUEUE_FLAG_BANNED Clean up laying violation of setting q->flags EXEC_QUEUE_FLAG_BANNED bit in GuC backend. Move banned to GuC owned bit and report banned status to upper layers via reset_status vfunc. This is a slight change in behavior as reset_status returns true if wedged or killed bits set too, but in all of these cases submission to queue is no longer allowed. Signed-off-by: Matthew Brost Reviewed-by: Jonathan Cavitt Link: https://patchwork.freedesktop.org/patch/msgid/20240604184700.1946918-1-matthew.brost@intel.com Signed-off-by: Rodrigo Vivi commit 7ecea18e8cdf9efbe2a1f96573a185b83a5d9e85 Author: Himal Prasad Ghimiray Date: Thu Jun 6 14:27:20 2024 +0530 drm/xe: Cleanup force wake registers bit definitions - Remove unused bit definitions. - Driver uses BIT(0) for waking/sleeping the domain and since the registers are masked respective mask bit BIT(16) needs to be set. Use defines for these bits and use them in domain initialization. v3 - Use defines within domain_init Cc: Rodrigo Vivi Cc: Badal Nilawar Suggested-by: Rodrigo Vivi Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Badal Nilawar Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240606085720.1327152-1-himal.prasad.ghimiray@intel.com Signed-off-by: Rodrigo Vivi commit 3d420e9fa84866cb3b98b6baa05d682850ef2952 Author: Matthew Brost Date: Thu Jun 6 18:52:12 2024 -0700 drm/xe: Rework GPU page fault handling Add helper function to implement VMA (user binding) page faults, remove unnecessary userptr.invalidate_link list del operation, retry on memory pressure, remove unnecessary xe_vma_userptr_check_repin after rebinding, remove unnecessary TLB invalidation, and always use vm->lock in write mode. Changes help facilitate SVM page faults. Signed-off-by: Matthew Brost Reviewed-by: Nirmoy Das Reviewed-by: Jagmeet Randhawa Link: https://patchwork.freedesktop.org/patch/msgid/20240607015212.2190106-1-matthew.brost@intel.com commit 28add38d545f445f01eec844b85eed4593c31733 Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:53 2024 +0300 f2fs: Move CONFIG_UNICODE defguards into the code flow Instead of a bunch of ifdefs, make the unicode built checks part of the code flow where possible, as requested by Torvalds. Signed-off-by: Gabriel Krisman Bertazi [eugen.hristev@collabora.com: port to 6.10-rc1] Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-8-eugen.hristev@collabora.com Reviewed-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit d98c822232f8642960a69caedeb7909471127939 Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:52 2024 +0300 ext4: Move CONFIG_UNICODE defguards into the code flow Instead of a bunch of ifdefs, make the unicode built checks part of the code flow where possible, as requested by Torvalds. Signed-off-by: Gabriel Krisman Bertazi [eugen.hristev@collabora.com: port to 6.10-rc1] Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-7-eugen.hristev@collabora.com Reviewed-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit d66858eb0c72247e39bc6e33037ee78fcf30d896 Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:51 2024 +0300 f2fs: Reuse generic_ci_match for ci comparisons Now that ci_match is part of libfs, make f2fs reuse it instead of having a different implementation. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-6-eugen.hristev@collabora.com Reviewed-by: Eric Biggers Reviewed-by: Chao Yu Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit d76b92f61f3ba077d3d12add26400f34aa521387 Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:50 2024 +0300 ext4: Reuse generic_ci_match for ci comparisons Instead of reimplementing ext4_match_ci, use the new libfs helper. It also adds a comment explaining why fname->cf_name.name must be checked prior to the encryption hash optimization, because that tripped me before. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-5-eugen.hristev@collabora.com Reviewed-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit 6a79a4e187bdd17959ff3e811d5de65c066f89e6 Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:49 2024 +0300 libfs: Introduce case-insensitive string comparison helper generic_ci_match can be used by case-insensitive filesystems to compare strings under lookup with dirents in a case-insensitive way. This function is currently reimplemented by each filesystem supporting casefolding, so this reduces code duplication in filesystem-specific code. [eugen.hristev@collabora.com: rework to first test the exact match, cleanup and add error message] Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-4-eugen.hristev@collabora.com Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit 632f4054b229513cdbd1e29a54ddd96fe67d00df Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:48 2024 +0300 f2fs: Simplify the handling of cached casefolded names Keeping it as qstr avoids the unnecessary conversion in f2fs_match Signed-off-by: Gabriel Krisman Bertazi [eugen.hristev@collabora.com: port to 6.10-rc1 and minor changes] Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-3-eugen.hristev@collabora.com Reviewed-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit f776f02a2c96b56ba8454f761487fe93331d46d6 Author: Gabriel Krisman Bertazi Date: Thu Jun 6 10:33:47 2024 +0300 ext4: Simplify the handling of cached casefolded names Keeping it as qstr avoids the unnecessary conversion in ext4_match Signed-off-by: Gabriel Krisman Bertazi [eugen.hristev@collabora.com: port to 6.10-rc1] Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20240606073353.47130-2-eugen.hristev@collabora.com Reviewed-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Christian Brauner commit 582cc1b28e8c8cb25f9a5f2595ca4b6d90737d03 Author: Thomas Richter Date: Mon Apr 15 16:41:23 2024 +0200 s390/pai_ext: Enable per-task and system-wide sampling event The PMU for PAI NNPA counters enforces the following restriction: - No per-task context for PAI sampling event NNPA_ALL - No multiple system-wide PAI sampling event NNPA_ALL Both restrictions are removed. One or more per-task sampling events are supported. Also one or more system-wide sampling events are supported. Acked-by: Sumanth Korikkar Signed-off-by: Thomas Richter Signed-off-by: Alexander Gordeev commit 3f9ff4c5a073294131818a26d1ac2b77b7104695 Author: Thomas Richter Date: Mon Apr 15 14:50:52 2024 +0200 s390/pai_ext: Enable per-task counting event The PMU for PAI NNPA counters enforces the following restriction: - No per-task context for PAI NNPA counters. This restriction is removed. One or more per-task/system-wide counting events can now be active at the same time while one system wide sampling event is active. Acked-by: Sumanth Korikkar Signed-off-by: Thomas Richter Signed-off-by: Alexander Gordeev commit 14e3768435da557079216f51d774165c70aad9b1 Author: Thomas Richter Date: Mon Apr 15 14:40:03 2024 +0200 s390/pai_ext: Enable concurrent system-wide counting/sampling The PMU for PAI NNPA counters enforces the following restriction: - No system wide counting while system wide sampling is active. This restriction is removed. One or more system wide counting events can now be active at the same time while at most one system wide sampling event is active. Acked-by: Sumanth Korikkar Signed-off-by: Thomas Richter Signed-off-by: Alexander Gordeev commit 9f66572f2889a5e72a9d7e17787e52f03b1f7bd8 Author: Thomas Richter Date: Thu Apr 11 13:15:47 2024 +0200 s390/pai_crypto: Enable per-task and system-wide sampling event The PMU for PAI crypto counters enforces the following restrictions: - No per-task context for PAI crypto sampling event CRYPTO_ALL - No multiple system-wide PAI crypto sampling event CRYPTO_ALL Both restrictions are removed. One or more per-task sampling events are supported. Also one or more system-wide sampling events are supported. Example for per-task context of sampling event CRYPTO_ALL: # perf record -e pai_crypto/CRYPTO_ALL/ -- true Example for system-wide context of sampling event CRYPTO_ALL: # perf record -e pai_crypto/CRYPTO_ALL/ -a -- sleep 4 Acked-by: Sumanth Korikkar Signed-off-by: Thomas Richter Signed-off-by: Alexander Gordeev commit 92ea686840ac5e2e74ad5b1a569b07123d753e5e Author: Thomas Richter Date: Thu Feb 29 15:45:04 2024 +0100 s390/pai_crypto: Enable per-task counting event The PMU for PAI crypto counters enforces the following restriction: - No per-task context for PAI crypto counters events. This restriction is removed. One or more per-task/system-wide counting events can now be active at the same time while at most one system wide sampling event is active. Example for per-task context of a PAI crypto counter event: # perf stat -e pai_crypto/KM_AES_128/ -- true Acked-by: Sumanth Korikkar Signed-off-by: Thomas Richter Signed-off-by: Alexander Gordeev commit fb412c6241dccc530416917efe8e9fea5fa1fda2 Author: Thomas Richter Date: Thu Feb 29 15:13:48 2024 +0100 s390/pai_crypto: Enable concurrent system-wide counting/sampling event The PMU for PAI crypto counters enforces the following restriction: - No system wide counting while system wide sampling is active. This restriction is removed. One or more system wide counting events can now be active at the same time while at most one system wide sampling event is active. Acked-by: Sumanth Korikkar Signed-off-by: Thomas Richter Signed-off-by: Alexander Gordeev commit ba9bbbe1499a8f14858e89cd4a21bf2990cfb0de Author: Jani Nikula Date: Tue Jun 4 18:26:16 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_STEREO_3D_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_STEREO_3D_CTL register macro. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/76f980f5ed3638746c6b58dec7d0bd8c43a37987.1717514638.git.jani.nikula@intel.com commit 377b2f359d1f71c75f8cc352b5c81f2210312d83 Author: Sean Christopherson Date: Fri Mar 8 17:09:29 2024 -0800 KVM: VMX: Always honor guest PAT on CPUs that support self-snoop Unconditionally honor guest PAT on CPUs that support self-snoop, as Intel has confirmed that CPUs that support self-snoop always snoop caches and store buffers. I.e. CPUs with self-snoop maintain cache coherency even in the presence of aliased memtypes, thus there is no need to trust the guest behaves and only honor PAT as a last resort, as KVM does today. Honoring guest PAT is desirable for use cases where the guest has access to non-coherent DMA _without_ bouncing through VFIO, e.g. when a virtual (mediated, for all intents and purposes) GPU is exposed to the guest, along with buffers that are consumed directly by the physical GPU, i.e. which can't be proxied by the host to ensure writes from the guest are performed with the correct memory type for the GPU. Cc: Yiwei Zhang Suggested-by: Yan Zhao Suggested-by: Kevin Tian Tested-by: Xiangfei Ma Tested-by: Yongwei Ma Link: https://lore.kernel.org/r/20240309010929.1403984-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 65a4de0ffd975af7e2ffc9acb875b6a8ae7ee1aa Author: Yan Zhao Date: Fri Mar 8 17:09:28 2024 -0800 KVM: x86: Ensure a full memory barrier is emitted in the VM-Exit path Ensure a full memory barrier is emitted in the VM-Exit path, as a full barrier is required on Intel CPUs to evict WC buffers. This will allow unconditionally honoring guest PAT on Intel CPUs that support self-snoop. As srcu_read_lock() is always called in the VM-Exit path and it internally has a smp_mb(), call smp_mb__after_srcu_read_lock() to avoid adding a second fence and make sure smp_mb() is called without dependency on implementation details of srcu_read_lock(). Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Kevin Tian Signed-off-by: Yan Zhao [sean: massage changelog] Tested-by: Xiangfei Ma Tested-by: Yongwei Ma Link: https://lore.kernel.org/r/20240309010929.1403984-5-seanjc@google.com Signed-off-by: Sean Christopherson commit f05eda16037f9363297561bd28f318a6d7833d35 Author: Yan Zhao Date: Fri Mar 8 17:09:27 2024 -0800 srcu: Add an API for a memory barrier after SRCU read lock To avoid redundant memory barriers, add smp_mb__after_srcu_read_lock() to pair with smp_mb__after_srcu_read_unlock() for use in paths that need to emit a memory barrier, but already do srcu_read_lock(), which includes a full memory barrier. Provide an API, e.g. as opposed to having callers document the behavior via a comment, as the full memory barrier provided by srcu_read_lock() is an implementation detail that shouldn't bleed into random subsystems. KVM will use smp_mb__after_srcu_read_lock() in it's VM-Exit path to ensure a memory barrier is emitted, which is necessary to ensure correctness of mixed memory types on CPUs that support self-snoop. Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Kevin Tian Signed-off-by: Yan Zhao [sean: massage changelog] Tested-by: Xiangfei Ma Tested-by: Yongwei Ma Reviewed-by: Paul E. McKenney commit aa61186951cc1fd302e7d2d180061a8d568dff90 Author: Noralf Trønnes Date: Tue Jun 4 15:20:32 2024 +0200 drm/tiny: panel-mipi-dbi: Support the pixel format property Add support for these pixel format property values: - r5g6b5, RGB565 - b6x2g6x2r6x2, BGR666 BGR666 is presented to userspace as RGB888. The 2 LSB in each color are discarded by the controller. The pixel is sent on the wire using 8 bits per word (little endian) so the controller sees it as BGR. RGB565 is the default if the property is not present. Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-5-d7c2bcb9b78d@tronnes.org Signed-off-by: Noralf Trønnes commit 4aebb79021f3e6c2b6fbb92a7d9c5d1e6ad0324a Author: Noralf Trønnes Date: Tue Jun 4 15:20:31 2024 +0200 drm/mipi-dbi: Add support for DRM_FORMAT_RGB888 DRM_FORMAT_RGB888 is 24 bits per pixel and it would be natural to send it on the SPI bus using a 24 bits per word transfer. The problem with this is that not all SPI controllers support 24 bpw. Since DRM_FORMAT_RGB888 is stored in memory as little endian and the SPI bus is big endian we use 8 bpw to always get the same pixel format on the bus: b8g8r8. The MIPI DCS specification lists the standard commands that can be sent over the MIPI DBI interface. The set_address_mode (36h) command has one bit in the parameter that controls RGB/BGR order. This means that the controller can be configured to receive the pixel as BGR. RGB888 is rarely supported on these controllers but RGB666 is very common. All datasheets I have seen do at least support the pixel format option where each color is sent as one byte and the 6 MSB's are used. All this put together means that we can send each pixel as b8g8r8 and an RGB666 capable controller sees this as b6x2g6x2r6x2. v4: - s/emulation_format/pixel_format/ (Dmitry) Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-4-d7c2bcb9b78d@tronnes.org Signed-off-by: Noralf Trønnes commit df3fb27a74a4eeb1436129024a7e957c2e83a95e Author: Noralf Trønnes Date: Tue Jun 4 15:20:30 2024 +0200 drm/mipi-dbi: Make bits per word configurable for pixel transfers MIPI DCS write/set commands have 8 bit parameters except for the write_memory commands where it depends on the pixel format. drm_mipi_dbi does currently only support RGB565 which is 16-bit and it has to make sure that the pixels enters the SPI bus in big endian format since the MIPI DBI spec doesn't have support for little endian. drm_mipi_dbi is optimized for DBI interface option 3 which means that the 16-bit bytes are swapped by the upper layer if the SPI bus does not support 16 bits per word, signified by the swap_bytes member. In order to support both 16-bit and 24-bit pixel transfers we need a way to tell the DBI command layer the format of the buffer. Add a write_memory_bpw member that the upper layer can use to tell how many bits per word to use for the SPI transfer. v4: - Expand the commit message (Dmitry) Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-3-d7c2bcb9b78d@tronnes.org Signed-off-by: Noralf Trønnes commit f34f014c84122d38c70455911e7343016fc8eb14 Author: Noralf Trønnes Date: Tue Jun 4 15:20:29 2024 +0200 drm/mipi-dbi: Remove mipi_dbi_machine_little_endian() mipi_dbi_machine_little_endian() should really have been called mipi_dbi_framebuffer_little_endian() because that's the function it performs. When I added support for these SPI displays I thought that the framebuffers on big endian machines were also big endian, but I have later learned that this is not the case. There's a bit in the fourcc code that controls this: DRM_FORMAT_BIG_ENDIAN. Just remove the function to avoid confusion. We can add big endian support later should the need arise and we have hardware to test on. Instead of just amending the docs, expand it to explain the endianness handling. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-2-d7c2bcb9b78d@tronnes.org Signed-off-by: Noralf Trønnes commit fdb164667bb1b6025f65b14ec7fd4a48f2d4be00 Author: Noralf Trønnes Date: Tue Jun 4 15:20:28 2024 +0200 dt-bindings: display: panel: mipi-dbi-spi: Add a pixel format property The MIPI DBI 2.0 specification (2005) lists only two pixel formats for the Type C Interface (SPI) and that is 3-bits/pixel RGB111 with 2 options for bit layout. For Type A and B (parallel) the following formats are listed: RGB332, RGB444, RGB565, RGB666 and RGB888 (some have 2 options for the bit layout). Many MIPI DBI compatible controllers support all interface types on the same chip and often the manufacturers have chosen to provide support for the Type A/B interface pixel formats also on the Type C interface. Some chips provide many pixel formats with optional bit layouts over SPI, but the most common by far are RGB565 and RGB666. So even if the specification doesn't list these formats for the Type C interface, the industry has chosen to include them. The MIPI DCS specification lists the standard commands that can be sent over the MIPI DBI interface. The set_address_mode (36h) command has one bit in the parameter that controls RGB/BGR order: This bit controls the RGB data latching order transferred from the peripheral’s frame memory to the display device. This means that each supported RGB format also has a BGR variant. Based on this rationale document the following pixel formats describing the bit layout going over the wire: - RGB111 (option 1): x2r1g1b1r1g1b1 (2 pixels per byte) - BGR111 (option 1): x2b1g1r1b1g1r1 (2 pixels per byte) - RGB111 (option 2): x1r1g1b1x1r1g1b1 (2 pixels per byte) - BGR111 (option 2): x1b1g1r1x1b1g1r1 (2 pixels per byte) - RGB565: r5g6b5 (2 bytes) - BGR565: b5g6r5 (2 bytes) - RGB666: r6x2g6x2b6x2 (3 bytes) - BGR666: b6x2g6x2r6x2 (3 bytes) (x: don't care) v2: - Use 'default: r5g6b5' (Rob) Reviewed-by: Rob Herring (Arm) Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-1-d7c2bcb9b78d@tronnes.org Signed-off-by: Noralf Trønnes commit f82ecf76cdd477c64b09f328aaa182c1dc64dd8b Author: Andy Shevchenko Date: Thu Jun 6 23:21:02 2024 +0300 regmap: kunit: Use array_size() and sizeof(*ptr) consistently Some of the allocations use explit sizeof(type) instead of sizeof(*ptr), which is fragile. In particular, stress_insert() allocates double of memory without obvious need for a test. Convert all allocations to use array_size() and sizeof(*ptr) to eliminate similar mistakes or wrong memory sizes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606202102.3108729-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit bce843065804f770ac469d32a3d455b9a997b55f Author: Andy Shevchenko Date: Thu Jun 6 19:46:25 2024 +0300 regmap: maple: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606164717.3031107-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f755d6955338bc704168629f70b380658a4918df Author: Andy Shevchenko Date: Thu Jun 6 19:46:24 2024 +0300 regmap: cache: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606164717.3031107-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 354662dc66f264b26c3e094162e0fad8715d009f Author: Andy Shevchenko Date: Thu Jun 6 19:46:23 2024 +0300 regmap: cache: Use correct type of the rb_for_each() parameter Compiler is not happy: regcache.c:410:9: warning: Using plain integer as NULL pointer Replace integer 0 by NULL. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606164717.3031107-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f6841d41a8a36a4c5cbfee39280845f83fed6a87 Author: Andy Shevchenko Date: Thu Jun 6 19:46:22 2024 +0300 regmap: Switch to use kmemdup_array() Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240606164717.3031107-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit a999973236543f0b8f6daeaa7ecba7488c3a593b Author: MD Danish Anwar Date: Wed Jun 5 15:22:23 2024 +0530 net: ti: icssg-prueth: Add multicast filtering support Add multicast filtering support for ICSSG Driver. Multicast addresses will be updated by __dev_mc_sync() API. icssg_prueth_add_macst () and icssg_prueth_del_mcast() will be sync and unsync APIs for the driver respectively. To add a mac_address for a port, driver needs to call icssg_fdb_add_del() and pass the mac_address and BIT(port_id) to the API. The ICSSG firmware will then configure the rules and allow filtering. If a mac_address is added to port0 and the same mac_address needs to be added for port1, driver needs to pass BIT(port0) | BIT(port1) to the icssg_fdb_add_del() API. If driver just pass BIT(port1) then the entry for port0 will be overwritten / lost. This is a design constraint on the firmware side. To overcome this in the driver, to add any mac_address for let's say portX driver first checks if the same mac_address is already added for any other port. If yes driver calls icssg_fdb_add_del() with BIT(portX) | BIT(other_existing_port). If not, driver calls icssg_fdb_add_del() with BIT(portX). The same thing is applicable for deleting mac_addresses as well. This logic is in icssg_prueth_add_mcast / icssg_prueth_del_mcast APIs. Signed-off-by: MD Danish Anwar Reviewed-by: Wojciech Drewek Signed-off-by: David S. Miller commit dd637f5cd5f334d2d014872544470031415cec3b Author: Thomas Weißschuh Date: Tue Jun 4 23:41:24 2024 +0200 platform/x86: dell-pc: avoid double free and invalid unregistration If platform_profile_register() fails it does kfree(thermal_handler) and leaves the pointer value around. Any call to thermal_cleanup() will try to kfree(thermal_handler) again. This will happen right away in dell_init(). In addition, platform_profile_remove() will be called although no profile is registered. NULL out the thermal_handler, so thermal_cleanup() avoids the double free. Fixes: 996ad4129810 ("platform/x86: dell-pc: Implement platform_profile") Signed-off-by: Thomas Weißschuh Reviewed-by: Lyndon Sanche Link: https://lore.kernel.org/r/20240604-dell-pc-double-free-v1-1-6d81255b2a44@weissschuh.net Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 2bb78d9fb7c997f13309838600eead88cc99e96b Author: Niklas Söderlund Date: Mon May 27 15:41:27 2024 +0200 arm64: dts: renesas: r8a779h0: Add video capture nodes Add the VIN, CSI-2 and CSISP related nodes found on R-Car V4M. One thing to note is that both CSISP0 and CSISP1 are in the same power domain, this is different from other Gen4 SoCs (R-Car V4H). The reason for this is that R-Car V4M only has one ISP core which is connected to CSISP0 while R-Car V4H has two ISP cores, one connected to each CSISP. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20240527134129.1695450-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit f07a320691348b75436be7b958884da7095b1386 Author: Geert Uytterhoeven Date: Thu May 30 11:19:29 2024 +0200 pinctrl: renesas: rzn1: Use for_each_child_of_node_scoped() Use the scoped variant of for_each_child_of_node() to simplify the code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c0a28f466c42d5d59c7fadfa1fd05fd512d43b6f.1717060708.git.geert+renesas@glider.be commit 2092760681b53cd0c1214444ac35737ff8a65024 Author: Geert Uytterhoeven Date: Wed May 29 11:35:10 2024 +0200 clk: renesas: rcar-gen2: Use DEFINE_SPINLOCK() for static spinlock A static spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Suggested-by: Ye Bin Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/8da2c908f00043f05f7e26e3c26400aea0cfe8bc.1716975021.git.geert+renesas@glider.be commit 3b2f834dd3f952a0c69c0dacef68172742acacbc Author: Geert Uytterhoeven Date: Wed May 29 11:35:09 2024 +0200 clk: renesas: cpg-lib: Use DEFINE_SPINLOCK() for global spinlock A global spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Suggested-by: Ye Bin Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/9073a6bfb7791e492156331fa8a0ea87a7c7cef6.1716975021.git.geert+renesas@glider.be commit c001f9c9bc90bde56057ba28d850a2c13b396702 Author: Geert Uytterhoeven Date: Wed May 29 11:35:08 2024 +0200 clk: renesas: r8a77970: Use common cpg_lock R-Car Gen3 Socs use the common CPG/MSSR library functions in rcar-cpg-lib.c, so the R-Car V3M sub-driver can use the common cpg_lock instead of a driver-private lock. Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/0cd9b5ffbe986bd7dc4ffb3f13492123432ee2e1.1716975021.git.geert+renesas@glider.be commit 6d4e1993a30539f556da2ebd36f1936c583eb812 Author: Jeff Johnson Date: Mon Jun 3 07:55:39 2024 -0700 hwrng: omap - add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/hw_random/omap-rng.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/hw_random/omap3-rom-rng.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit ed6261d553f505e6b0ce8593bf3f3792928b0ab8 Author: Jeff Johnson Date: Sun Jun 2 16:17:08 2024 -0700 crypto: xilinx - add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/crypto/xilinx/zynqmp-aes-gcm.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Michal Simek Signed-off-by: Herbert Xu commit c8edb3ccfd3951a84a8bf6638b7befcfa775fd06 Author: Jeff Johnson Date: Sun Jun 2 16:11:17 2024 -0700 crypto: sa2ul - add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/crypto/sa2ul.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit f2cbb74633ab9b07ab2df7252d23971115a88be8 Author: Jeff Johnson Date: Sun Jun 2 16:03:54 2024 -0700 crypto: keembay - add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/crypto/intel/keembay/keembay-ocs-hcu.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit 3aa461e37c0ee309b6dc6887bba5f7184f3a6740 Author: Jeff Johnson Date: Sun Jun 2 15:33:39 2024 -0700 crypto: atmel-sha204a - add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/crypto/atmel-sha204a.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit e6e758fa64438082e48272db19ad74ed4fb98938 Author: Eric Biggers Date: Sun Jun 2 15:22:20 2024 -0700 crypto: x86/aes-gcm - rewrite the AES-NI optimized AES-GCM Rewrite the AES-NI implementations of AES-GCM, taking advantage of things I learned while writing the VAES-AVX10 implementations. This is a complete rewrite that reduces the AES-NI GCM source code size by about 70% and the binary code size by about 95%, while not regressing performance and in fact improving it significantly in many cases. The following summarizes the state before this patch: - The aesni-intel module registered algorithms "generic-gcm-aesni" and "rfc4106-gcm-aesni" with the crypto API that actually delegated to one of three underlying implementations according to the CPU capabilities detected at runtime: AES-NI, AES-NI + AVX, or AES-NI + AVX2. - The AES-NI + AVX and AES-NI + AVX2 assembly code was in aesni-intel_avx-x86_64.S and consisted of 2804 lines of source and 257 KB of binary. This massive binary size was not really appropriate, and depending on the kconfig it could take up over 1% the size of the entire vmlinux. The main loops did 8 blocks per iteration. The AVX code minimized the use of carryless multiplication whereas the AVX2 code did not. The "AVX2" code did not actually use AVX2; the check for AVX2 was really a check for Intel Haswell or later to detect support for fast carryless multiplication. The long source length was caused by factors such as significant code duplication. - The AES-NI only assembly code was in aesni-intel_asm.S and consisted of 1501 lines of source and 15 KB of binary. The main loops did 4 blocks per iteration and minimized the use of carryless multiplication by using Karatsuba multiplication and a multiplication-less reduction. - The assembly code was contributed in 2010-2013. Maintenance has been sporadic and most design choices haven't been revisited. - The assembly function prototypes and the corresponding glue code were separate from and were not consistent with the new VAES-AVX10 code I recently added. The older code had several issues such as not precomputing the GHASH key powers, which hurt performance. This rewrite achieves the following goals: - Much shorter source and binary sizes. The assembly source shrinks from 4300 lines to 1130 lines, and it produces about 9 KB of binary instead of 272 KB. This is achieved via a better designed AES-GCM implementation that doesn't excessively unroll the code and instead prioritizes the parts that really matter. Sharing the C glue code with the VAES-AVX10 implementations also saves 250 lines of C source. - Improve performance on most (possibly all) CPUs on which this code runs, for most (possibly all) message lengths. Benchmark results are given in Tables 1 and 2 below. - Use the same function prototypes and glue code as the new VAES-AVX10 algorithms. This fixes some issues with the integration of the assembly and results in some significant performance improvements, primarily on short messages. Also, the AVX and non-AVX implementations are now registered as separate algorithms with the crypto API, which makes them both testable by the self-tests. - Keep support for AES-NI without AVX (for Westmere, Silvermont, Goldmont, and Tremont), but unify the source code with AES-NI + AVX. Since 256-bit vectors cannot be used without VAES anyway, this is made feasible by just using the non-VEX coded form of most instructions. - Use a unified approach where the main loop does 8 blocks per iteration and uses Karatsuba multiplication to save one pclmulqdq per block but does not use the multiplication-less reduction. This strikes a good balance across the range of CPUs on which this code runs. - Don't spam the kernel log with an informational message on every boot. The following tables summarize the improvement in AES-GCM throughput on various CPU microarchitectures as a result of this patch: Table 1: AES-256-GCM encryption throughput improvement, CPU microarchitecture vs. message length in bytes: | 16384 | 4096 | 4095 | 1420 | 512 | 500 | -------------------+-------+-------+-------+-------+-------+-------+ Intel Broadwell | 2% | 8% | 11% | 18% | 31% | 26% | Intel Skylake | 1% | 4% | 7% | 12% | 26% | 19% | Intel Cascade Lake | 3% | 8% | 10% | 18% | 33% | 24% | AMD Zen 1 | 6% | 12% | 6% | 15% | 27% | 24% | AMD Zen 2 | 8% | 13% | 13% | 19% | 26% | 28% | AMD Zen 3 | 8% | 14% | 13% | 19% | 26% | 25% | | 300 | 200 | 64 | 63 | 16 | -------------------+-------+-------+-------+-------+-------+ Intel Broadwell | 35% | 29% | 45% | 55% | 54% | Intel Skylake | 25% | 19% | 28% | 33% | 27% | Intel Cascade Lake | 36% | 28% | 39% | 49% | 54% | AMD Zen 1 | 27% | 22% | 23% | 29% | 26% | AMD Zen 2 | 32% | 24% | 22% | 25% | 31% | AMD Zen 3 | 30% | 24% | 22% | 23% | 26% | Table 2: AES-256-GCM decryption throughput improvement, CPU microarchitecture vs. message length in bytes: | 16384 | 4096 | 4095 | 1420 | 512 | 500 | -------------------+-------+-------+-------+-------+-------+-------+ Intel Broadwell | 3% | 8% | 11% | 19% | 32% | 28% | Intel Skylake | 3% | 4% | 7% | 13% | 28% | 27% | Intel Cascade Lake | 3% | 9% | 11% | 19% | 33% | 28% | AMD Zen 1 | 15% | 18% | 14% | 20% | 36% | 33% | AMD Zen 2 | 9% | 16% | 13% | 21% | 26% | 27% | AMD Zen 3 | 8% | 15% | 12% | 18% | 23% | 23% | | 300 | 200 | 64 | 63 | 16 | -------------------+-------+-------+-------+-------+-------+ Intel Broadwell | 36% | 31% | 40% | 51% | 53% | Intel Skylake | 28% | 21% | 23% | 30% | 30% | Intel Cascade Lake | 36% | 29% | 36% | 47% | 53% | AMD Zen 1 | 35% | 31% | 32% | 35% | 36% | AMD Zen 2 | 31% | 30% | 27% | 38% | 30% | AMD Zen 3 | 27% | 23% | 24% | 32% | 26% | The above numbers are percentage improvements in single-thread throughput, so e.g. an increase from 3000 MB/s to 3300 MB/s would be listed as 10%. They were collected by directly measuring the Linux crypto API performance using a custom kernel module. Note that indirect benchmarks (e.g. 'cryptsetup benchmark' or benchmarking dm-crypt I/O) include more overhead and won't see quite as much of a difference. All these benchmarks used an associated data length of 16 bytes. Note that AES-GCM is almost always used with short associated data lengths. I didn't test Intel CPUs before Broadwell, AMD CPUs before Zen 1, or Intel low-power CPUs, as these weren't readily available to me. However, based on the design of the new code and the available information about these other CPU microarchitectures, I wouldn't expect any significant regressions, and there's a good chance performance is improved just as it is above. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b06affb1cb580e135d1b454d5318fdbe6e24828a Author: Eric Biggers Date: Sun Jun 2 15:22:19 2024 -0700 crypto: x86/aes-gcm - add VAES and AVX512 / AVX10 optimized AES-GCM Add implementations of AES-GCM for x86_64 CPUs that support VAES (vector AES), VPCLMULQDQ (vector carryless multiplication), and either AVX512 or AVX10. There are two implementations, sharing most source code: one using 256-bit vectors and one using 512-bit vectors. This patch improves AES-GCM performance by up to 162%; see Tables 1 and 2 below. I wrote the new AES-GCM assembly code from scratch, focusing on correctness, performance, code size (both source and binary), and documenting the source. The new assembly file aes-gcm-avx10-x86_64.S is about 1200 lines including extensive comments, and it generates less than 8 KB of binary code. The main loop does 4 vectors at a time, with the AES and GHASH instructions interleaved. Any remainder is handled using a simple 1 vector at a time loop, with masking. Several VAES + AVX512 implementations of AES-GCM exist from Intel, including one in OpenSSL and one proposed for inclusion in Linux in 2021 (https://lore.kernel.org/linux-crypto/1611386920-28579-6-git-send-email-megha.dey@intel.com/). These aren't really suitable to be used, though, due to the massive amount of binary code generated (696 KB for OpenSSL, 200 KB for Linux) and well as the significantly larger amount of assembly source (4978 lines for OpenSSL, 1788 lines for Linux). Also, Intel's code does not support 256-bit vectors, which makes it not usable on future AVX10/256-only CPUs, and also not ideal for certain Intel CPUs that have downclocking issues. So I ended up starting from scratch. Usually my much shorter code is actually slightly faster than Intel's AVX512 code, though it depends on message length and on which of Intel's implementations is used; for details, see Tables 3 and 4 below. To facilitate potential integration into other projects, I've dual-licensed aes-gcm-avx10-x86_64.S under Apache-2.0 OR BSD-2-Clause, the same as the recently added RISC-V crypto code. The following two tables summarize the performance improvement over the existing AES-GCM code in Linux that uses AES-NI and AVX2: Table 1: AES-256-GCM encryption throughput improvement, CPU microarchitecture vs. message length in bytes: | 16384 | 4096 | 4095 | 1420 | 512 | 500 | ----------------------+-------+-------+-------+-------+-------+-------+ Intel Ice Lake | 42% | 48% | 60% | 62% | 70% | 69% | Intel Sapphire Rapids | 157% | 145% | 162% | 119% | 96% | 96% | Intel Emerald Rapids | 156% | 144% | 161% | 115% | 95% | 100% | AMD Zen 4 | 103% | 89% | 78% | 56% | 54% | 54% | | 300 | 200 | 64 | 63 | 16 | ----------------------+-------+-------+-------+-------+-------+ Intel Ice Lake | 66% | 48% | 49% | 70% | 53% | Intel Sapphire Rapids | 80% | 60% | 41% | 62% | 38% | Intel Emerald Rapids | 79% | 60% | 41% | 62% | 38% | AMD Zen 4 | 51% | 35% | 27% | 32% | 25% | Table 2: AES-256-GCM decryption throughput improvement, CPU microarchitecture vs. message length in bytes: | 16384 | 4096 | 4095 | 1420 | 512 | 500 | ----------------------+-------+-------+-------+-------+-------+-------+ Intel Ice Lake | 42% | 48% | 59% | 63% | 67% | 71% | Intel Sapphire Rapids | 159% | 145% | 161% | 125% | 102% | 100% | Intel Emerald Rapids | 158% | 144% | 161% | 124% | 100% | 103% | AMD Zen 4 | 110% | 95% | 80% | 59% | 56% | 54% | | 300 | 200 | 64 | 63 | 16 | ----------------------+-------+-------+-------+-------+-------+ Intel Ice Lake | 67% | 56% | 46% | 70% | 56% | Intel Sapphire Rapids | 79% | 62% | 39% | 61% | 39% | Intel Emerald Rapids | 80% | 62% | 40% | 58% | 40% | AMD Zen 4 | 49% | 36% | 30% | 35% | 28% | The above numbers are percentage improvements in single-thread throughput, so e.g. an increase from 4000 MB/s to 6000 MB/s would be listed as 50%. They were collected by directly measuring the Linux crypto API performance using a custom kernel module. Note that indirect benchmarks (e.g. 'cryptsetup benchmark' or benchmarking dm-crypt I/O) include more overhead and won't see quite as much of a difference. All these benchmarks used an associated data length of 16 bytes. Note that AES-GCM is almost always used with short associated data lengths. The following two tables summarize how the performance of my code compares with Intel's AVX512 AES-GCM code, both the version that is in OpenSSL and the version that was proposed for inclusion in Linux. Neither version exists in Linux currently, but these are alternative AES-GCM implementations that could be chosen instead of mine. I collected the following numbers on Emerald Rapids using a userspace benchmark program that calls the assembly functions directly. I've also included a comparison with Cloudflare's AES-GCM implementation from https://boringssl-review.googlesource.com/c/boringssl/+/65987/3. Table 3: VAES-based AES-256-GCM encryption throughput in MB/s, implementation name vs. message length in bytes: | 16384 | 4096 | 4095 | 1420 | 512 | 500 | ---------------------+-------+-------+-------+-------+-------+-------+ This implementation | 14171 | 12956 | 12318 | 9588 | 7293 | 6449 | AVX512_Intel_OpenSSL | 14022 | 12467 | 11863 | 9107 | 5891 | 6472 | AVX512_Intel_Linux | 13954 | 12277 | 11530 | 8712 | 6627 | 5898 | AVX512_Cloudflare | 12564 | 11050 | 10905 | 8152 | 5345 | 5202 | | 300 | 200 | 64 | 63 | 16 | ---------------------+-------+-------+-------+-------+-------+ This implementation | 4939 | 3688 | 1846 | 1821 | 738 | AVX512_Intel_OpenSSL | 4629 | 4532 | 2734 | 2332 | 1131 | AVX512_Intel_Linux | 4035 | 2966 | 1567 | 1330 | 639 | AVX512_Cloudflare | 3344 | 2485 | 1141 | 1127 | 456 | Table 4: VAES-based AES-256-GCM decryption throughput in MB/s, implementation name vs. message length in bytes: | 16384 | 4096 | 4095 | 1420 | 512 | 500 | ---------------------+-------+-------+-------+-------+-------+-------+ This implementation | 14276 | 13311 | 13007 | 11086 | 8268 | 8086 | AVX512_Intel_OpenSSL | 14067 | 12620 | 12421 | 9587 | 5954 | 7060 | AVX512_Intel_Linux | 14116 | 12795 | 11778 | 9269 | 7735 | 6455 | AVX512_Cloudflare | 13301 | 12018 | 11919 | 9182 | 7189 | 6726 | | 300 | 200 | 64 | 63 | 16 | ---------------------+-------+-------+-------+-------+-------+ This implementation | 6454 | 5020 | 2635 | 2602 | 1079 | AVX512_Intel_OpenSSL | 5184 | 5799 | 2957 | 2545 | 1228 | AVX512_Intel_Linux | 4394 | 4247 | 2235 | 1635 | 922 | AVX512_Cloudflare | 4289 | 3851 | 1435 | 1417 | 574 | So, usually my code is actually slightly faster than Intel's code, though the OpenSSL implementation has a slight edge on messages shorter than 256 bytes in this microbenchmark. (This also holds true when doing the same tests on AMD Zen 4.) It can be seen that the large code size (up to 94x larger!) of the Intel implementations doesn't seem to bring much benefit, so starting from scratch with much smaller code, as I've done, seems appropriate. The performance of my code on messages shorter than 256 bytes could be improved through a limited amount of unrolling, but it's unclear it would be worth it, given code size considerations (e.g. caches) that don't get measured in microbenchmarks. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c17b56d96ce614cde4aa61e8fc800f04182eec25 Author: Chenghai Huang Date: Sat Jun 1 10:51:50 2024 +0800 crypto: hisilicon/zip - optimize the address offset of the reg query function Currently, the reg is queried based on the fixed address offset array. When the number of accelerator cores changes, the system can not flexibly respond to the change. Therefore, the reg to be queried is calculated based on the comp or decomp core base address. Signed-off-by: Chenghai Huang Signed-off-by: Herbert Xu commit 13e21e0ba44f5fad02a3b7b34987ff3845718198 Author: Chenghai Huang Date: Sat Jun 1 10:51:49 2024 +0800 crypto: hisilicon/qm - adjust the internal processing sequence of the vf enable and disable When the vf is enabled, the value of vfs_num must be assigned after the VF configuration is complete. Otherwise, the device may be accessed before the virtual configuration is complete, causing an error. When the vf is disabled, clear vfs_num and execute qm_pm_put_sync before hisi_qm_sriov_disable is return. Otherwise, if qm_clear_vft_config fails, users may access the device when the PCI virtualization is disabled, resulting in an error. Signed-off-by: Chenghai Huang Signed-off-by: Herbert Xu commit 46b3ff73afc815f1feb844e6b57e43cc13051544 Author: Herbert Xu Date: Fri May 31 18:20:03 2024 +0800 crypto: sm2 - Remove sm2 algorithm The SM2 algorithm has a single user in the kernel. However, it's never been integrated properly with that user: asymmetric_keys. The crux of the issue is that the way it computes its digest with sm3 does not fit into the architecture of asymmetric_keys. As no solution has been proposed, remove this algorithm. It can be resubmitted when it is integrated properly into the asymmetric_keys subsystem. Signed-off-by: Herbert Xu commit 4c6338f8664b5f32d6ef0756a5afef64e50608dc Author: Marek Vasut Date: Fri May 31 10:57:34 2024 +0200 hwrng: stm32 - use sizeof(*priv) instead of sizeof(struct stm32_rng_private) Use sizeof(*priv) instead of sizeof(struct stm32_rng_private), the former makes renaming of struct stm32_rng_private easier if necessary, as it removes one site where such rename has to happen. No functional change. Signed-off-by: Marek Vasut Acked-by: Uwe Kleine-König Acked-by: Gatien Chevallier Signed-off-by: Herbert Xu commit 771c7faa65fb72c1d8d0ffd2b504058b7d02d51f Author: Marek Vasut Date: Fri May 31 10:53:23 2024 +0200 hwrng: stm32 - cache device pointer in struct stm32_rng_private Place device pointer in struct stm32_rng_private and use it all over the place to get rid of the horrible type casts throughout the driver. No functional change. Acked-by: Gatien Chevallier Signed-off-by: Marek Vasut Signed-off-by: Herbert Xu commit f134d5dce9c1f70fb522712b306644deb1e6eccd Author: Marek Vasut Date: Fri May 31 10:53:22 2024 +0200 hwrng: stm32 - use pm_runtime_resume_and_get() include/linux/pm_runtime.h pm_runtime_get_sync() description suggests to ... consider using pm_runtime_resume_and_get() instead of it, especially if its return value is checked by the caller, as this is likely to result in cleaner code. This is indeed better, switch to pm_runtime_resume_and_get() which correctly suspends the device again in case of failure. Also add error checking into the RNG driver in case pm_runtime_resume_and_get() does fail, which is currently not done, and it does detect sporadic -EACCES error return after resume, which would otherwise lead to a hang due to register access on un-resumed hardware. Now the read simply errors out and the system does not hang. Acked-by: Gatien Chevallier Signed-off-by: Marek Vasut Signed-off-by: Herbert Xu commit 3aeb1da092e875255c24c6a26be097448d70a756 Author: Jeff Johnson Date: Thu May 30 17:53:17 2024 -0700 crypto: x86 - add missing MODULE_DESCRIPTION() macros On x86, make allmodconfig && make W=1 C=1 warns: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/crypto/crc32-pclmul.o WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/crypto/curve25519-x86_64.o Add the missing MODULE_DESCRIPTION() macro invocations. Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit 546ce0bdc91afd9f5c4c67d9fc4733e0fc7086d1 Author: Stefan Berger Date: Wed May 29 19:08:27 2024 -0400 crypto: ecdsa - Use ecc_digits_from_bytes to convert signature Since ecc_digits_from_bytes will provide zeros when an insufficient number of bytes are passed in the input byte array, use it to convert the r and s components of the signature to digits directly from the input byte array. This avoids going through an intermediate byte array that has the first few bytes filled with zeros. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 2fd2a82ccbfc106aec314db6c4bda5e24fd32a22 Author: Stefan Berger Date: Wed May 29 19:08:26 2024 -0400 crypto: ecdsa - Use ecc_digits_from_bytes to create hash digits array Since ecc_digits_from_bytes will provide zeros when an insufficient number of bytes are passed in the input byte array, use it to create the hash digits directly from the input byte array. This avoids going through an intermediate byte array (rawhash) that has the first few bytes filled with zeros. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 645211db1394f0607935dd43d907af7a12631907 Author: Jeff Johnson Date: Tue May 28 16:49:23 2024 -0700 crypto: lib - add missing MODULE_DESCRIPTION() macros Fix the allmodconfig 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/crypto/libchacha.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/crypto/libarc4.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/crypto/libdes.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/crypto/libpoly1305.o Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit 059b1352519d1f2f856d80ae6fe11e11891869d2 Author: Mario Limonciello Date: Tue May 28 16:07:12 2024 -0500 crypto: ccp - Move message about TSME being enabled later in init Some of the security attributes data is now populated from an HSTI command on some processors, so show the message after it has been populated. Signed-off-by: Mario Limonciello Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 82f9327f774c6e040ba63a887a85fa2e290a233a Author: Mario Limonciello Date: Tue May 28 16:07:11 2024 -0500 crypto: ccp - Add support for getting security attributes on some older systems Older systems will not populate the security attributes in the capabilities register. The PSP on these systems, however, does have a command to get the security attributes. Use this command during ccp startup to populate the attributes if they're missing. Closes: https://github.com/fwupd/fwupd/issues/5284 Closes: https://github.com/fwupd/fwupd/issues/5675 Closes: https://github.com/fwupd/fwupd/issues/6253 Closes: https://github.com/fwupd/fwupd/issues/7280 Closes: https://github.com/fwupd/fwupd/issues/6323 Closes: https://github.com/fwupd/fwupd/discussions/5433 Signed-off-by: Mario Limonciello Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit b4100947a8014e1876872546398275968f77e1ad Author: Mario Limonciello Date: Tue May 28 16:07:10 2024 -0500 crypto: ccp - align psp_platform_access_msg Align the whitespace so that future messages will also be better aligned. Acked-by: Tom Lendacky Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit 56e0d883735002c506e73fa1f1197f3959fc7f0c Author: Mario Limonciello Date: Tue May 28 16:07:09 2024 -0500 crypto: ccp - Move security attributes to their own file To prepare for other code that will manipulate security attributes move the handling code out of sp-pci.c. No intended functional changes. Signed-off-by: Mario Limonciello Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 8609dd25f9b271b3338e38b018fd39e49de1e6ca Author: Mario Limonciello Date: Tue May 28 16:07:08 2024 -0500 crypto: ccp - Represent capabilities register as a union Making the capabilities register a union makes it easier to refer to the members instead of always doing bit shifts. No intended functional changes. Acked-by: Tom Lendacky Suggested-by: Yazen Ghannam Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit 56ddb9aa3b324c2d9645b5a7343e46010cf3f6ce Author: Maxime Méré Date: Tue May 28 16:05:48 2024 +0200 crypto: stm32/cryp - call finalize with bh disabled The finalize operation in interrupt mode produce a produces a spinlock recursion warning. The reason is the fact that BH must be disabled during this process. Signed-off-by: Maxime Méré Signed-off-by: Herbert Xu commit 4027725259cc55138672f21373ac04f14aab2836 Author: Maxime Méré Date: Tue May 28 16:05:47 2024 +0200 crypto: stm32/cryp - add CRYPTO_ALG_KERN_DRIVER_ONLY flag This flag is needed to make the driver visible from openssl and cryptodev. Signed-off-by: Maxime Méré Signed-off-by: Herbert Xu commit 6364352ec9907a5232225a9d677109827ffc0875 Author: Maxime Méré Date: Tue May 28 16:05:46 2024 +0200 crypto: stm32/cryp - increase priority Increase STM32 CRYP priority, to be greater than the ARM-NEON accelerated version. Signed-of-by: Maxime Méré Signed-off-by: Nicolas Toromanoff Signed-off-by: Herbert Xu commit fb11a4f6affd61bbee120ca90ea20e4435dc2bde Author: Maxime Méré Date: Tue May 28 16:05:45 2024 +0200 crypto: stm32/cryp - use dma when possible Use DMA when buffer are aligned and with expected size. If buffer are correctly aligned and bigger than 1KB we have some performance gain: With DMA enable: $ openssl speed -evp aes-256-cbc -engine afalg -elapsed The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-256-cbc 120.02k 406.78k 1588.82k 5873.32k 26020.52k 34258.94k Without DMA: $ openssl speed -evp aes-256-cbc -engine afalg -elapsed The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes aes-256-cbc 121.06k 419.95k 1112.23k 1897.47k 2362.03k 2386.60k With DMA: extract of $ modprobe tcrypt mode=500 testing speed of async cbc(aes) (stm32-cbc-aes) encryption tcrypt: test 14 (256 bit key, 16 byte blocks): 1 operation in 1679 cycles (16 bytes) tcrypt: test 15 (256 bit key, 64 byte blocks): 1 operation in 1893 cycles (64 bytes) tcrypt: test 16 (256 bit key, 128 byte blocks): 1 operation in 1760 cycles (128 bytes) tcrypt: test 17 (256 bit key, 256 byte blocks): 1 operation in 2154 cycles (256 bytes) tcrypt: test 18 (256 bit key, 1024 byte blocks): 1 operation in 2132 cycles (1024 bytes) tcrypt: test 19 (256 bit key, 1424 byte blocks): 1 operation in 2466 cycles (1424 bytes) tcrypt: test 20 (256 bit key, 4096 byte blocks): 1 operation in 4040 cycles (4096 bytes) Without DMA: $ modprobe tcrypt mode=500 tcrypt: test 14 (256 bit key, 16 byte blocks): 1 operation in 1671 cycles (16 bytes) tcrypt: test 15 (256 bit key, 64 byte blocks): 1 operation in 2263 cycles (64 bytes) tcrypt: test 16 (256 bit key, 128 byte blocks): 1 operation in 2881 cycles (128 bytes) tcrypt: test 17 (256 bit key, 256 byte blocks): 1 operation in 4270 cycles (256 bytes) tcrypt: test 18 (256 bit key, 1024 byte blocks): 1 operation in 11537 cycles (1024 bytes) tcrypt: test 19 (256 bit key, 1424 byte blocks): 1 operation in 15025 cycles (1424 bytes) tcrypt: test 20 (256 bit key, 4096 byte blocks): 1 operation in 40747 cycles (4096 bytes) Signed-off-by: Alexandre Torgue Signed-off-by: Maxime Méré Signed-off-by: Nicolas Toromanoff Signed-off-by: Herbert Xu commit d7c897a9d8c35d6788b6d92072f5c93be89d4451 Author: Jarkko Sakkinen Date: Mon May 27 23:28:39 2024 +0300 crypto: ecdsa - Fix the public key format description Public key blob is not just x and y concatenated. It follows RFC5480 section 2.2. Address this by re-documenting the function with the correct description of the format. Link: https://datatracker.ietf.org/doc/html/rfc5480 Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification") Signed-off-by: Jarkko Sakkinen Reviewed-by: Stefan Berger Signed-off-by: Herbert Xu commit 14cba6ace79627a57fb9058582b03f0ed3832390 Author: Ilpo Järvinen Date: Mon May 27 16:26:15 2024 +0300 hwrng: amd - Convert PCIBIOS_* return codes to errnos amd_rng_mod_init() uses pci_read_config_dword() that returns PCIBIOS_* codes. The return code is then returned as is but amd_rng_mod_init() is a module_init() function that should return normal errnos. Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning it. Fixes: 96d63c0297cc ("[PATCH] Add AMD HW RNG driver") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Signed-off-by: Herbert Xu commit fa501bf25eb353422a0c966ed91662051edac839 Author: Eric Biggers Date: Mon May 27 01:05:39 2024 -0700 crypto: testmgr - test setkey in no-SIMD context Since crypto_shash_setkey(), crypto_ahash_setkey(), crypto_skcipher_setkey(), and crypto_aead_setkey() apparently need to work in no-SIMD context on some architectures, make the self-tests cover this scenario. Specifically, sometimes do the setkey while under crypto_disable_simd_for_test(), and do this independently from disabling SIMD for the other parts of the crypto operation since there is no guarantee that all parts happen in the same context. (I.e., drivers mustn't store the key in different formats for SIMD vs. no-SIMD.) Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3e8daf14c47d79a35a4ad69d12f5a9b6450e9ecd Author: Ville Syrjälä Date: Wed Jun 5 16:47:56 2024 +0300 drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Since BDB version 211 block 46 has included more luminance and gamma related information. Define it fully. The data is semi-based on DisplayID v2.0 apparently. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605134756.17099-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 80c414772d93f2f21af2483497f424c6cc7b1132 Author: Ville Syrjälä Date: Wed Jun 5 16:47:55 2024 +0300 drm/i915/bios: Define block 46 chromaticity coordinates properly The VBT spec does a very poor job of defining how the chromaticity coordinates in block 46 are laid out. After double checking the Windows implementation it turns out these more or less match the EDID definition, where the 10bit values are split into 2bit + 8bit chunks. Adjust our struct definition to reflect that. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605134756.17099-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 78247e48a118948cbb7126fa3ebe0e2cb4215bfd Author: Jani Nikula Date: Fri Jun 7 11:07:07 2024 +0300 drm/xe: do not select ACPI_BUTTON The xe driver has never needed ACPI button. Selecting the kconfig is just copy-paste from i915, which no longer needs it either. Stop selecting ACPI_BUTTON. Cc: Ville Syrjälä Closes: https://lore.kernel.org/r/ZmGsJsXhHcPV48XJ@intel.com Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1872adc6b20ce4c5ef55ba60a7233b31ace776fb.1717747542.git.jani.nikula@intel.com commit 0f9579d9e0331b6255132ac06bdf2c0a01cceb90 Author: Konstantin Komarov Date: Mon Jun 3 09:58:13 2024 +0300 fs/ntfs3: Add missing .dirty_folio in address_space_operations After switching from pages to folio [1], it became evident that the initialization of .dirty_folio for page cache operations was missed for compressed files. [1] https://lore.kernel.org/ntfs3/20240422193203.3534108-1-willy@infradead.org Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Konstantin Komarov commit bc81e773fec1bf83852b3bc6f6ad25125bf26416 Author: Konstantin Komarov Date: Mon Jun 3 09:57:12 2024 +0300 fs/ntfs3: Remove sync_blockdev_nowait() Flush the file mapping directly. Signed-off-by: Konstantin Komarov commit 24c5100aceedcd47af89aaa404d4c96cd2837523 Author: Konstantin Komarov Date: Tue Jun 4 10:41:39 2024 +0300 fs/ntfs3: Fix getting file type An additional condition causes the mft record to be read from disk and get the file type dt_type. Fixes: 22457c047ed97 ("fs/ntfs3: Modified fix directory element type detection") Signed-off-by: Konstantin Komarov commit 1c308ace1fd6de93bd0b7e1a5e8963ab27e2c016 Author: Konstantin Komarov Date: Mon Jun 3 20:36:03 2024 +0300 fs/ntfs3: Missed NI_FLAG_UPDATE_PARENT setting Fixes: be71b5cba2e64 ("fs/ntfs3: Add attrib operations") Signed-off-by: Konstantin Komarov commit 69943484b95267c94331cba41e9e64ba7b24f136 Author: Konstantin Komarov Date: Mon Jun 3 20:07:44 2024 +0300 fs/ntfs3: Deny getting attr data block in compressed frame Attempting to retrieve an attribute data block in a compressed frame is ignored. Fixes: be71b5cba2e64 ("fs/ntfs3: Add attrib operations") Signed-off-by: Konstantin Komarov commit 25610ff98d4a34e6a85cbe4fd8671be6b0829f8f Author: Konstantin Komarov Date: Thu May 16 01:10:01 2024 +0300 fs/ntfs3: Fix transform resident to nonresident for compressed files Сorrected calculation of required space len (in clusters) for attribute data storage in case of compression. Fixes: be71b5cba2e64 ("fs/ntfs3: Add attrib operations") Signed-off-by: Konstantin Komarov commit 3cdad499ac10556fc368a909d35ec821c52ea00e Author: Konstantin Komarov Date: Thu May 16 00:56:47 2024 +0300 fs/ntfs3: Remove unused macros MAXIMUM_REPARSE_DATA_BUFFER_SIZE MAXIMUM_REPARSE_DATA_BUFFER_SIZE is not used in the code. Signed-off-by: Konstantin Komarov commit 2c2814d0dafc13153c880278e3a3ca4c891c1d51 Author: Konstantin Komarov Date: Thu May 16 20:55:12 2024 +0300 fs/ntfs3: Use macros NTFS_LABEL_MAX_LENGTH instead of hardcoded value To check the length of the volume label, the existing constant NTFS_LABEL_MAX_LENGTH could be used. Signed-off-by: Konstantin Komarov commit 220cf0498bbf401e6cedc275676371f808f9bf10 Author: Konstantin Komarov Date: Thu May 30 11:23:51 2024 +0300 fs/ntfs3: Simplify initialization of $AttrDef and $UpCase Replaced the two loops reading $AttrDef and $UpCase with the inode_read_data() function. Signed-off-by: Konstantin Komarov commit 487f8d482a7e51a640b8f955a398f906a4f83951 Author: Konstantin Komarov Date: Thu May 16 00:41:02 2024 +0300 fs/ntfs3: Merge synonym COMPRESSION_UNIT and NTFS_LZNT_CUNIT COMPRESSION_UNIT and NTFS_LZNT_CUNIT mean the same thing (1u< commit 34abb4f6fd29ec70b8c7ff33c0721cd3eb1c7a20 Author: Konstantin Komarov Date: Thu May 16 20:37:53 2024 +0300 fs/ntfs3: Remove unused function At the moment, the function turned out to be unused, so I removed it. Signed-off-by: Konstantin Komarov commit 106fb076aa5ce24bfac3037aa655dbeb26cc8ff8 Author: Jani Nikula Date: Fri Jun 7 11:07:06 2024 +0300 drm/i915: do not select ACPI_BUTTON We stopped using ACPI button in commit 05c72e77ccda ("drm/i915: Nuke the LVDS lid notifier"). Also stop force enabling the ACPI_BUTTON config. Cc: Ville Syrjälä Closes: https://lore.kernel.org/r/ZmGsJsXhHcPV48XJ@intel.com Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/060d687c3a80cd94f065e637200dd10fea7b979f.1717747542.git.jani.nikula@intel.com commit 7fcb9cb2fe47294e16067c3cfd25332c8662a115 Author: James Clark Date: Wed May 29 14:36:26 2024 +0100 coresight: Fix ref leak when of_coresight_parse_endpoint() fails of_graph_get_next_endpoint() releases the reference to the previous endpoint on each iteration, but when parsing fails the loop exits early meaning the last reference is never dropped. Fix it by dropping the refcount in the exit condition. Fixes: d375b356e687 ("coresight: Fix support for sparsely populated ports") Signed-off-by: James Clark Reported-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20240529133626.90080-1-james.clark@arm.com commit 09b286950f2911615694f4a1ff491efe9ed5eeba Author: Michal Wajdeczko Date: Thu Jun 6 15:06:39 2024 +0200 drm/xe/guc: Allow CTB G2H processing without G2H IRQ During early initialization, in the xe_guc_min_load_for_hwconfig() function, we are successfully enabling CTB communication, but it will only allow us to send non-blocking H2G messages, as due to not yet enabled IRQs, including G2H IRQs, we will not notice any new G2H message sent by the GuC, including replies to our blocking H2G request messages. And those successful replies are mandatory for the VF drivers to continue normal operations. As attempt to workaround this driver initialization ordering issue, introduce special safe-mode CTB worker, that will periodically trigger G2H processing, like original IRQ handler, in case no MSI/MSIX IRQs were enabled on the driver yet. Once we detect that IRQ were enabled, we will stop this worker. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240606130639.1504-3-michal.wajdeczko@intel.com commit 37e017311c650ba0502aec6ec531ed9bc84d70da Author: Michal Wajdeczko Date: Thu Jun 6 15:06:38 2024 +0200 drm/xe/guc: Split g2h worker function In the next patch we will want to perform the same steps that g2h worker function is doing but from the different worker. Suggested-by: Matthew Brost Signed-off-by: Michal Wajdeczko Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240606130639.1504-2-michal.wajdeczko@intel.com commit c8a4bdca928debacf49524d1b09dbf27e88e1f18 Author: Guenter Roeck Date: Thu Jun 6 11:05:07 2024 -0700 hwmon: (cros_ec) Fix access to restricted __le16 0-day complains: drivers-hwmon-cros_ec_hwmon.c:sparse:sparse:cast-to-restricted-__le16 Fix by using a __le16 typed variable as parameter to le16_to_cpu(). Fixes: bc3e45258096 ("hwmon: add ChromeOS EC driver") Cc: Thomas Weißschuh Cc: Tzung-Bi Shih Signed-off-by: Guenter Roeck Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240606180507.3332237-1-linux@roeck-us.net Signed-off-by: Tzung-Bi Shih commit 1f72dd046270ff44e5fd43045c4d0bb025f88607 Author: Dan Carpenter Date: Thu Jun 6 16:12:11 2024 +0300 hwmon: (cros_ec) Prevent read overflow in probe() The "resp.sensor_name" comes from cros_ec_cmd() and it hasn't necessarily been NUL terminated. We had not intended to read past "sensor_name_size" bytes, however, there is a width vs precision bug in the format string. The format needs to be precision '%.*s' instead of width '%*s'. Precision prevents an out of bounds read, but width is a no-op. Fixes: bc3e45258096 ("hwmon: add ChromeOS EC driver") Signed-off-by: Dan Carpenter Reviewed-by: Guenter Roeck Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/42331b70-bd3c-496c-8c79-3ec4faad40b8@moroto.mountain Signed-off-by: Tzung-Bi Shih commit e822ce43968daf9da4368617d2c948c22ccf93f9 Author: Neil Armstrong Date: Thu Jun 6 10:48:19 2024 +0200 arm64: dts: amlogic: gxbb-odroidc2: fix invalid reset-gpio property This fixes the following: hub@1: 'reset-gpio' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml# Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-12-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit edc15ee0e43948568fa5380c9147feb9a767ae67 Author: Neil Armstrong Date: Thu Jun 6 10:48:18 2024 +0200 arm64: dts: amlogic: a1: drop the invalid reset-name for usb@fe004400 This fixes the following: usb@fe004400: 'reset-name' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+' Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-11-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit ea99706a438f19cf352242ffabab46bbc76a03d3 Author: Neil Armstrong Date: Thu Jun 6 10:48:17 2024 +0200 arm64: dts: amlogic: a1: use correct node name for mmc controller This fixes the following: sd@10000: $nodename:0: 'sd@10000' does not match '^mmc(@.*)?$' Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-10-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit e5d4d006a8c5504dfebce7f090ddfb75444491ba Author: Neil Armstrong Date: Thu Jun 6 10:48:16 2024 +0200 arm64: dts: amlogic: c3: use correct compatible for gpio_intc node This fixes the following: interrupt-controller@4080: compatible: 'oneOf' conditional failed, one must be fixed: ['amlogic,meson-gpio-intc', 'amlogic,c3-gpio-intc'] is too long 'amlogic,meson-gpio-intc' is not one of ['amlogic,meson8-gpio-intc', 'amlogic,meson8b-gpio-intc', 'amlogic,meson-gxbb-gpio-intc', 'amlogic,meson-gxl-gpio-intc', 'amlogic,meson-axg-gpio-intc', 'amlogic,meson-g12a-gpio-intc', 'amlogic,meson-sm1-gpio-intc', 'amlogic,meson-a1-gpio-intc', 'amlogic,meson-s4-gpio-intc', 'amlogic,c3-gpio-intc', 'amlogic,t7-gpio-intc'] 'amlogic,meson-gpio-intc' was expected Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-9-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit 0cb2a3b0d10a3938df546913d738bca121667455 Author: Neil Armstrong Date: Thu Jun 6 10:48:15 2024 +0200 arm64: dts: amlogic: axg: fix tdm audio-controller clock order This fixes the following: audio-controller-0: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-0: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-0: clock-names:2: 'mclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-1: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-1: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-1: clock-names:2: 'mclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-2: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-2: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-2: clock-names:2: 'mclk' was expected Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-8-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit 5dab35f183b30c40fb7fb99015811edde96f90d6 Author: Neil Armstrong Date: Thu Jun 6 10:48:14 2024 +0200 arm64: dts: amlogic: g12a-u200: add missing AVDD-supply to acodec This fixes the following: audio-controller@32000: 'AVDD-supply' is a required property Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-7-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit 4b7df533684032233f65ea1157ec94215ab3f3da Author: Neil Armstrong Date: Thu Jun 6 10:48:13 2024 +0200 arm64: dts: amlogic: g12a-u200: drop invalid sound-dai-cells This fixes the following: audio-amplifier-0: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-6-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit 94befcb819d47b155554997ccfac52354d1b4380 Author: Neil Armstrong Date: Thu Jun 6 10:48:12 2024 +0200 arm64: dts: amlogic: sm1: fix tdm controllers compatible Fixes the following: audio-controller@300: compatible: ['amlogic,sm1-tdmin', 'amlogic,axg-tdmin'] is too long from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# audio-controller@340: compatible: ['amlogic,sm1-tdmin', 'amlogic,axg-tdmin'] is too long from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# audio-controller@380: compatible: ['amlogic,sm1-tdmin', 'amlogic,axg-tdmin'] is too long from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# audio-controller@3c0: compatible: ['amlogic,sm1-tdmin', 'amlogic,axg-tdmin'] is too long from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-5-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit 2478d7bee215cdf6a3a581239d12a17407e30771 Author: Neil Armstrong Date: Thu Jun 6 10:48:11 2024 +0200 arm64: dts: amlogic: sm1: fix tdm audio-controller clock order Fix the clock order in the tdm audio-controller nodes, this fixes the following errors: audio-controller-0: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-0: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-0: clock-names:2: 'mclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-1: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-1: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-1: clock-names:2: 'mclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-2: clock-names:0: 'sclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-2: clock-names:1: 'lrclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# audio-controller-2: clock-names:2: 'mclk' was expected from schema $id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-4-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit cf42ea27fd7f087b43da27b709267211e7e0e8c4 Author: Neil Armstrong Date: Thu Jun 6 10:48:09 2024 +0200 arm64: dts: amlogic: move ao_pinctrl into aobus The AO pinctrl was mis-described as beeing part of AO rti sysctrl, move it it into aobus like it's also done in GX SoCs, and remove the now invalid '#address-cells', '#size-cells' & 'ranges from the sys-ctrl@0 node. This fixes: sys-ctrl@0: '#address-cells', '#size-cells', 'ranges' do not match any of the regexes: 'pinctrl-[0-9]+' Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-2-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit 1095ad0e92175d19cb7f0b5256af300c921a2d63 Author: Neil Armstrong Date: Thu Jun 6 10:48:08 2024 +0200 arm64: dts: amlogic: meson-g12b-bananapi: remove invalid fan on wrong pwm_cd controller The fan is connected to the GPIOAO_10 pin, which can be connected to the pwm_AO_cd controller, but this one is already used for the vddcpu_b regulator. The fan was wrongly described as using the pwm_cd with the invalid "pwm-gpios" property, both are wrong so remove the fan until we find an acceptable solution. This fixes the following error: pwm@1a000: 'pwm-gpios' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/pwm/pwm-amlogic.yaml# Tested-by: Christian Hewitt Link: https://lore.kernel.org/r/20240606-topic-amlogic-upstream-bindings-fixes-dts-v1-1-62e812729541@linaro.org Signed-off-by: Neil Armstrong commit adef2aeaa2b936c97865d56c59be2cb7266acbb7 Author: Chengming Zhou Date: Fri Jun 7 16:40:13 2024 +0800 slab: don't put freepointer outside of object if only orig_size The commit 946fa0dbf2d8 ("mm/slub: extend redzone check to extra allocated kmalloc space than requested") will extend right redzone when allocating for orig_size < object_size. So we can't overlay the freepointer in the object space in this case. But the code looks like it forgot to check SLAB_RED_ZONE, since there won't be extended right redzone if only orig_size enabled. As we are here, make this complex conditional expressions a little prettier and add some comments about extending right redzone when slub_debug_orig_size() enabled. Reviewed-by: Feng Tang Reviewed-by: Vlastimil Babka Signed-off-by: Chengming Zhou Signed-off-by: Vlastimil Babka commit 47d911b02cbe61494bb066ad84cc66d25091d506 Author: Chengming Zhou Date: Fri Jun 7 16:40:12 2024 +0800 slab: make check_object() more consistent Now check_object() calls check_bytes_and_report() multiple times to check every section of the object it cares about, like left and right redzones, object poison, paddings poison and freepointer. It will abort the checking process and return 0 once it finds an error. There are two inconsistencies in check_object(), which are alignment padding checking and object padding checking. We only print the error messages but don't return 0 to tell callers that something is wrong and needs to be handled. Please see alloc_debug_processing() and free_debug_processing() for details. We want to do all checks without skipping, so use a local variable "ret" to save each check result and change check_bytes_and_report() to only report specific error findings. Then at end of check_object(), print the trailer once if any found an error. Suggested-by: Vlastimil Babka Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Signed-off-by: Vlastimil Babka commit d9abe5f9e575e7df0e245694c13a0aa4e787f009 Author: Jani Nikula Date: Tue Jun 4 18:26:23 2024 +0300 drm/i915: pass dev_priv explicitly to MTL_CLKGATE_DIS_TRANS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the MTL_CLKGATE_DIS_TRANS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/b330d86c5e3012513daa36dceffd2db45f0d7850.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e4a4142bf31673faf153f39c666a01da6f0c42df Author: Jani Nikula Date: Tue Jun 4 18:26:22 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_SET_CONTEXT_LATENCY Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_SET_CONTEXT_LATENCY register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/989f89994edae0829e3b6d5d6e3d8a521f0eda00.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0623993cad61186856a83ef25312708c5079098e Author: Jani Nikula Date: Tue Jun 4 18:26:21 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_MSA_MISC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_MSA_MISC register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1a9c0a0f8c5bba31138f0c7aebdf839b9b30298c.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b11bf614f9ce4540593c4cf287a50ee2918c3163 Author: Jani Nikula Date: Tue Jun 4 18:26:20 2024 +0300 drm/i915: pass dev_priv explicitly to TGL_DP_TP_STATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TGL_DP_TP_STATUS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/c7aaf0e981324bfc5b3aec31f30a7b1a158ba568.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3cd5a36df1a9dd8c92fb5b15e2c2ec99e1031120 Author: Jani Nikula Date: Tue Jun 4 18:26:19 2024 +0300 drm/i915: pass dev_priv explicitly to TGL_DP_TP_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TGL_DP_TP_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/3d3e2b732ec9372cf6b1ae44b25342179b028b1a.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 76f1b2b1a4481e31a6c9d10a933ebac5073e1e19 Author: Jani Nikula Date: Tue Jun 4 18:26:18 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_DDI_FUNC_CTL2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_DDI_FUNC_CTL2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/2b61bf9c1f74ae633c99aa34fbf1aa85735cc5b6.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b092d6ad277363eb5e8fe89b0b34070f3dc8f66b Author: Jani Nikula Date: Tue Jun 4 18:26:17 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_DDI_FUNC_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_DDI_FUNC_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/4ccf75561aa0fb209fd71c85e9089b0350570fd6.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2d557d3abafb92b813f8dff613c9fd54161cbbc8 Author: Jani Nikula Date: Tue Jun 4 18:26:15 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_LINK_N2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_LINK_N2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/5267c167414fb46a25277c1c9a802f6ccf8de3c9.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 04f657cf6677d7606c2ebcb6d8643cec0ec683c7 Author: Jani Nikula Date: Tue Jun 4 18:26:14 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_LINK_M2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_LINK_M2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/31337adcaca1333724600b0afe6e3880f0948d5e.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0b406cc993297a0cd718e041a8456ffb7ee5445b Author: Jani Nikula Date: Tue Jun 4 18:26:13 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_LINK_N1 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_LINK_N1 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/0960c3726a36999b38084dce6c3824882921c475.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3c461986e8ab2bc126a2bb7868b4f9f3b125e965 Author: Jani Nikula Date: Tue Jun 4 18:26:12 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_LINK_M1 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_LINK_M1 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/bf25d447d98009f56f2c5b2205719ab2d9a70c93.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9ffd21103d064c382110bd0c4bdec0c2a4db9960 Author: Jani Nikula Date: Tue Jun 4 18:26:11 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_DATA_N2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_DATA_N2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/6eeb0c74d6e566f04a193b2a3f1272e58df66f20.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ddbdeb6c591ed52f104d1cfd862bae6e581df004 Author: Jani Nikula Date: Tue Jun 4 18:26:10 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_DATA_M2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_DATA_M2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1fda9b8cd446727845089844a1c8eeb5c8ae7b5a.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 12967c4f21707269de2bd9cd525acf32d3e0a8ee Author: Jani Nikula Date: Tue Jun 4 18:26:09 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_DATA_N1 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_DATA_N1 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/80759c6efdfdb59c4bd624af85b9db38ebe06f65.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5702d5d4125a03afcb1cf3c5746eb7704fe815ed Author: Jani Nikula Date: Tue Jun 4 18:26:08 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_DATA_M1 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_DATA_M1 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/aa87444d7b2c0c695729c15730bb11aa922b7561.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b9089184ba9f26dce6482d6afa200500b8c6bbb6 Author: Jani Nikula Date: Tue Jun 4 18:25:53 2024 +0300 drm/i915: pass dev_priv explicitly to SWF3 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the SWF3 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/5ab27d6a4366617ba273e526a46a505c3d3c3295.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit eefd93d8f632acb376eb06af67dddd515e6eb63a Author: Jani Nikula Date: Tue Jun 4 18:25:52 2024 +0300 drm/i915: pass dev_priv explicitly to SWF1 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the SWF1 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/cd31efc114325e61e357b0f8a1106f2eb7819fff.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3b24925e54daf6e2afbbdc7ec9c301da47f0504e Author: Jani Nikula Date: Tue Jun 4 18:25:51 2024 +0300 drm/i915: pass dev_priv explicitly to SWF0 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the SWF0 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/df957a1dfeddc14e4b62d6e2a1bf8104d506be87.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c8f1392f4849b4e92ea344da29c86834fd54b2cf Author: Jani Nikula Date: Tue Jun 4 18:25:50 2024 +0300 drm/i915: pass dev_priv explicitly to CHV_CANVAS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CHV_CANVAS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/a48c7984a14412ef74af250d5bc2ea9097aa2222.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 65313768a4e2da9e0abc104afa6d82ee193b01ed Author: Jani Nikula Date: Tue Jun 4 18:25:49 2024 +0300 drm/i915: pass dev_priv explicitly to CHV_BLEND Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CHV_BLEND register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/a2c5064ee3a985f7b7b5c7e672737df447d3af29.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2501a0b68e8e5989eb782c8ac42eb4bd26713b10 Author: Jani Nikula Date: Tue Jun 4 18:25:48 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_FLIPCOUNT_G4X Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_FLIPCOUNT_G4X register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/c53a6f5cd97976f43fbae442034074d2ea9aac42.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8edbb0ee171796cc96bb65fd85a8bc8e6d6ca2a3 Author: Jani Nikula Date: Tue Jun 4 18:25:47 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_FRMCOUNT_G4X Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_FRMCOUNT_G4X register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/747124e5eebdb58b06d70a0aae0af4dd7e6b7d86.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 446db74bd372bc0baaace57c01897d9ad71c8abc Author: Jani Nikula Date: Tue Jun 4 18:25:46 2024 +0300 drm/i915: pass dev_priv explicitly to DSPFW3 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPFW3 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/856978ed413e537b7d46eed5e8d93bdfd7c80fc6.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 51946d0c75fd4c047694d8e06b5d5b13f0d3c12b Author: Jani Nikula Date: Fri Jun 7 11:26:36 2024 +0300 drm/i915: pass dev_priv explicitly to DSPFW2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPFW2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ba349f90b6614605c52f58ae048961c7b4da4495.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 42879a65203f9a563c82114b916bb7e9a1f79dc2 Author: Jani Nikula Date: Tue Jun 4 18:25:44 2024 +0300 drm/i915: pass dev_priv explicitly to DSPFW1 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPFW1 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/4843726dff7d95e4127fb948073c9e4addc1e683.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit f0fea981483220a9152e69bd0adfda8b1b2db907 Author: Jani Nikula Date: Tue Jun 4 18:25:43 2024 +0300 drm/i915: pass dev_priv explicitly to DSPARB Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPARB register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/9e8dc8978ce3122a0e9c53778be547875a9ae6d8.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 58d18ae5655f7c2d122ccb23f35de83872fbb48b Author: Jani Nikula Date: Tue Jun 4 18:25:42 2024 +0300 drm/i915: pass dev_priv explicitly to ICL_PIPESTATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the ICL_PIPESTATUS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/d9a7ef1ff8e848cd10729f4ee033d1ef55ee78cc.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 03de2e10cf948101eee7e9cb73d911341c7d3dee Author: Jani Nikula Date: Tue Jun 4 18:25:41 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_ARB_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_ARB_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/e75e80bd96e05ece6b82c0bdb509527ab2dd0e6d.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 30d41e3fe153160714b01065320fde64639c3fd0 Author: Jani Nikula Date: Tue Jun 4 18:25:40 2024 +0300 drm/i915: pass dev_priv explicitly to PIPESTAT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPESTAT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/8b18a1e77ccfd451bbaee80b6ddb23bdbc479336.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit eb3750ea338471b6e59b515d498fe2e3a5fbfd51 Author: Jani Nikula Date: Tue Jun 4 18:25:39 2024 +0300 drm/i915: pass dev_priv explicitly to PIPEFRAMEPIXEL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPEFRAMEPIXEL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/464d4536f90e9d463458cdd315b3ba650e12ada5.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 849a7f0ea571c5b9e0c9a30832a6247262fa09ac Author: Jani Nikula Date: Tue Jun 4 18:25:38 2024 +0300 drm/i915: pass dev_priv explicitly to PIPEFRAME Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPEFRAME register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/7e6d1a8d3ae2a42efa3a48884e0e37357e0108c1.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 840e748285cbd5cdde32f9a4d1a075cdcafdc6a3 Author: Jani Nikula Date: Tue Jun 4 18:25:37 2024 +0300 drm/i915: pass dev_priv explicitly to PIPEDSL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPEDSL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/53b751f5a883318d44b690284d2e9d5a43fba860.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 984b61c35866fc0729801b74c3ce03812a121368 Author: Jani Nikula Date: Tue Jun 4 18:25:36 2024 +0300 drm/i915: pass dev_priv explicitly to TRANSCONF Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANSCONF register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/9afc96be1cbe4514cdca701ab434b4c7aa3a55ba.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6d3a843b0efb4ddfc71b4c67053714e37b98b337 Author: Jani Nikula Date: Tue Jun 4 18:25:35 2024 +0300 drm/i915: pass dev_priv explicitly to PFIT_AUTO_RATIOS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PFIT_AUTO_RATIOS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/148e8c66d37b5eb3077eef44018591d8b6a57937.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 23501e567a71cd8fa2eba4ef0572c2e938abeb01 Author: Jani Nikula Date: Tue Jun 4 18:25:34 2024 +0300 drm/i915: pass dev_priv explicitly to PFIT_PGM_RATIOS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PFIT_PGM_RATIOS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/8453205c9619bb8453bf4904d0c5bb868f614fc4.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 62148804b6e2ff49d19f58b34f247d2974061dc8 Author: Jani Nikula Date: Tue Jun 4 18:25:33 2024 +0300 drm/i915: pass dev_priv explicitly to PFIT_CONTROL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PFIT_CONTROL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/fad44d3d987d914c83844cdf172adaa19772e035.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 201008c44fd745e44f1fc6d7bbc235012a8995af Author: Jani Nikula Date: Tue Jun 4 18:25:32 2024 +0300 drm/i915: pass dev_priv explicitly to PORT_HOTPLUG_STAT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PORT_HOTPLUG_STAT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/9a47bba4ab8fa4b1a8e8ceea2ba5301bed54805d.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8232a3bfba3ea3ee41d49ee0353ae7db30ee798c Author: Jani Nikula Date: Tue Jun 4 18:25:31 2024 +0300 drm/i915: pass dev_priv explicitly to PORT_HOTPLUG_EN Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PORT_HOTPLUG_EN register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/3f4c3fb108f62db5d9b6bdabd0fbeb6650e14e82.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5734c976717d4d7027c387d167c19ba52d3498ed Author: Jani Nikula Date: Tue Jun 4 18:25:30 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_MULT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_MULT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/7ea79208a81fd5c3b021bcd8e1f9f90607716d82.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 454a498978b113af11585a843b2f7920ac8e4449 Author: Jani Nikula Date: Tue Jun 4 18:25:29 2024 +0300 drm/i915: pass dev_priv explicitly to PIPESRC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPESRC register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ac1959b7038d6fedb4777dcf2b961de901fb8880.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8925350cd3514fdad88de6d94c79f4aa6b713564 Author: Jani Nikula Date: Tue Jun 4 18:25:28 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VSYNCSHIFT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VSYNCSHIFT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/8103a31fbf6da725e6aed3bb86c15bbd581164fb.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d96fdbf04cece60b8c88d94b08095acafb0a2b27 Author: Jani Nikula Date: Tue Jun 4 18:25:27 2024 +0300 drm/i915: pass dev_priv explicitly to BCLRPAT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the BCLRPAT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/f04d0313032d5820a14cc504af390b4b1006fae6.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9cacbd237f51a9646da04c0cba08d542069b73b0 Author: Jani Nikula Date: Tue Jun 4 18:25:26 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VSYNC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VSYNC register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/eed30cb59cc45955a88cdf951023b0e695095760.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 45f1039335861705bdbf71aff4d890a692662980 Author: Jani Nikula Date: Tue Jun 4 18:25:25 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VBLANK Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VBLANK register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/c33739ac6f26105fd1ad79b0027b6626e241c7bc.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b3e773f6d5b131ca5a3a0ead2ec2a80fa9d4e05b Author: Jani Nikula Date: Tue Jun 4 18:25:24 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VTOTAL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VTOTAL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/751bc7046f5e2c5fc6a4fe5ade2e836c641abdb7.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9b2db3bbc7b5d1033f5e4d108fa87814c1f633e0 Author: Jani Nikula Date: Tue Jun 4 18:25:23 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_HSYNC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_HSYNC register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/d387281470c9b677adb659b80fa3385df2faca99.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7d8ee788659968790786f69baeff3edce27bbfe7 Author: Jani Nikula Date: Tue Jun 4 18:25:22 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_HBLANK Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_HBLANK register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/19d3d11d522be1787db89bdc254ae826ca4fb50a.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e5799743ee06f1733420ff87f96e800e6acf4f39 Author: Jani Nikula Date: Tue Jun 4 18:25:21 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_HTOTAL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_HTOTAL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/4bdba7417341782b74b89753b7db7fdc3edf932c.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6ba1e81433e1a5b63394bfa38af9b5ede6aaae13 Author: Jani Nikula Date: Tue Jun 4 18:25:20 2024 +0300 drm/i915: pass dev_priv explicitly to DPLL_MD Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DPLL_MD register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/98d24284d4ec435c3acae6445943204dfa96617d.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9a875f958062950d5b7a862c9403a99adc1ff41b Author: Jani Nikula Date: Tue Jun 4 18:25:19 2024 +0300 drm/i915: pass dev_priv explicitly to DPLL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DPLL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/7deea1d86c2706994450ec938f8f174a2ac54d27.1717514638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 349f4f1e6aaa313ee9e334b61bbeec83b847125c Author: Jani Nikula Date: Thu Jun 6 17:07:05 2024 +0300 drm/i915/overlay: convert intel_overlay_print_error_state() to drm_printer Use the regular drm printer, so we can drop the i915_error_printf() usage. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240606140705.3072987-2-jani.nikula@intel.com Signed-off-by: Jani Nikula commit d6b933912df0daf23d88daa7f96f6a3a65a67894 Author: Jani Nikula Date: Thu Jun 6 17:07:04 2024 +0300 drm/i915/dmc: convert intel_dmc_print_error_state() to drm_printer Use the regular drm printer, so we can drop the i915_error_printf() usage. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240606140705.3072987-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit d2307fd4f9895b44361d491f8bf474866b8351a2 Author: Ian Rogers Date: Tue May 21 09:51:09 2024 -0700 perf maps: Add/use a sorted insert for fixup overlap and insert Data may have lots of overlapping mmaps. The regular insert adds at the end and relies on a later sort. For data with overlapping mappings the sort will happen during a subsequent maps__find or __maps__fixup_overlap_and_insert, there's never a period where the inserted maps buffer up and a single sort happens. To avoid back to back sorts, maintain the sort order when fixing up and inserting. Previously the first_ending_after search was O(log n) where n is the size of maps, and the insert was O(1) but because of the continuous sorting was becoming O(n*log(n)). With maintaining sort order, the insert now becomes O(n) for a memmove. For a perf report on a perf.data file containing overlapping mappings the time numbers are: Before: real 0m5.894s user 0m5.650s sys 0m0.231s After: real 0m0.675s user 0m0.454s sys 0m0.196s Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Steinar H . Gunderson Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240521165109.708593-4-irogers@google.com commit aeefb04393f7525c0d5163f966f60d070b03ab99 Author: Ian Rogers Date: Tue May 21 09:51:08 2024 -0700 perf maps: Reduce sorting for overlapping mappings When an 'after' map is generated the 'new' map must be before it so terminate iterating and don't resort. If the entry 'pos' is entirely overlapped by the 'new' mapping then don't remove and insert the mapping, just replace - again to remove sorting. For a perf report on a perf.data file containing overlapping mappings the time numbers are: Before: real 0m9.856s user 0m9.637s sys 0m0.204s After: real 0m5.894s user 0m5.650s sys 0m0.231s Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Steinar H . Gunderson Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240521165109.708593-3-irogers@google.com commit 0b90dfda222e38b7ca8dad6e098e36f5186f0b94 Author: Ian Rogers Date: Tue May 21 09:51:07 2024 -0700 perf maps: Fix use after free in __maps__fixup_overlap_and_insert In the case 'before' and 'after' are broken out from pos, maps_by_address may be changed by __maps__insert, as such it needs re-reading. Don't ignore the return value from __maps_insert. Fixes: 659ad3492b91 ("perf maps: Switch from rbtree to lazily sorted array for addresses") Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Steinar H . Gunderson Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240521165109.708593-2-irogers@google.com commit a9700511fd50b9203a9a9d61b4874eb28571d5da Author: Lucas Stach Date: Wed Jun 5 16:44:42 2024 +0200 perf script: netdev-times: add location parameter to consume_skb dd1b527831a3 ("net: add location to trace_consume_skb()") added a new parameter to the consume_skb tracepoint. Adapt the script to match. Signed-off-by: Lucas Stach Acked-by: Arnaldo Carvalho de Melo Cc: kernel@pengutronix.de Cc: patchwork-lst@pengutronix.de Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240605144442.1985270-1-l.stach@pengutronix.de commit cb6cf0820f22ca36dc8f95cf1bd196e5ec24e69d Author: Milan Broz Date: Wed Jun 5 17:33:40 2024 +0200 r8152: Set NET_ADDR_STOLEN if using passthru MAC Some docks support MAC pass-through - MAC address is taken from another device. Driver should indicate that with NET_ADDR_STOLEN flag. This should help to avoid collisions if network interface names are generated with MAC policy. Reported and discussed here https://github.com/systemd/systemd/issues/33104 Signed-off-by: Milan Broz Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240605153340.25694-1-gmazyland@gmail.com Signed-off-by: Jakub Kicinski commit 6ef078383a50dded4bb9e71250ea6f7b533a6109 Author: John Harrison Date: Tue May 28 16:05:15 2024 -0700 drm/i915/guc: Enable w/a 16021333562 for DG2, MTL and ARL Enable another workaround that is implemented inside the GuC. v2: Use the correct Gen12 w/a id rather than the Xe version (review feedback from Matthew R) also extend to include ARL. Signed-off-by: John Harrison Reviewed-by: Julia Filipchuk Link: https://patchwork.freedesktop.org/patch/msgid/20240528230515.479395-1-John.C.Harrison@Intel.com commit 38b68e62c0d662d8a23aa47799b4ac83c54a8de8 Author: Stephen Boyd Date: Tue Jun 4 14:42:32 2024 -0700 arm64: dts: qcom: sc7180-trogdor: Make clamshell/detachable fragments At a high-level, detachable Trogdors (sometimes known as Strongbads) don't have a cros_ec keyboard, while all clamshell Trogdors (only known as Trogdors) always have a cros_ec keyboard. Looking closer though, all clamshells have a USB type-A connector and a hardwired USB camera. And all detachables replace the USB camera with a MIPI based one and swap the USB type-a connector for the detachable keyboard pogo pins. Split the detachable and clamshell bits into different files so we can describe these differences in one place instead of in each board that includes sc7180-trogdor.dtsi. For now this is just the keyboard part, but eventually this will include the type-a port and the pogo pins. Cc: cros-qcom-dts-watchers@chromium.org Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Pin-yen Lin Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240604214233.3551692-4-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 5abfd513988248b5d27f3a72d71a33129dfb1054 Author: Stephen Boyd Date: Tue Jun 4 14:42:31 2024 -0700 arm64: dts: qcom: sc7180: pazquel: Add missing comment header We put a header before modifying pinctrl nodes defined in sc7180-trogdor.dtsi in every other file. Add one here so we know that this section is for pinctrl modifications. Cc: cros-qcom-dts-watchers@chromium.org Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Pin-yen Lin Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20240604214233.3551692-3-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 13f1e1245bb51633d6d1a398fedab7c281beafc3 Author: Stephen Boyd Date: Tue Jun 4 14:42:30 2024 -0700 arm64: dts: qcom: sc7180: quackingstick: Disable instead of delete usb_c1 It's simpler to reason about things if we disable nodes instead of deleting them. Disable the second usb type-c connector node on quackingstick instead of deleting it so that we can reason about ports more easily. Cc: cros-qcom-dts-watchers@chromium.org Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Pin-yen Lin Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20240604214233.3551692-2-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 05d84f973d84d23e0a249ae5b3f6d7572fdc5e1e Author: Krzysztof Kozlowski Date: Wed Jun 5 18:00:32 2024 +0200 arm64: dts: qcom: sm8450-sony-xperia: correct touchscreen interrupt flags Interrupt flags 0x2008 looks like some downstream copy-paste, because generic GPIOLIB code, used by Qualcomm pin controller drivers, ignores flags outside of IRQ_TYPE_SENSE_MASK. Probably the intention was to pass just 0x8, so IRQ_TYPE_LEVEL_LOW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio # SM8450 PDX223 Link: https://lore.kernel.org/r/20240605160032.150587-4-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 46822d2750822dbe58bcd999cbedf24147cb5fc3 Author: Krzysztof Kozlowski Date: Wed Jun 5 18:00:31 2024 +0200 arm64: dts: qcom: sm8250-sony-xperia: correct touchscreen interrupt flags Interrupt flags 0x2008 looks like some downstream copy-paste, because generic GPIOLIB code, used by Qualcomm pin controller drivers, ignores flags outside of IRQ_TYPE_SENSE_MASK. Probably the intention was to pass just 0x8, so IRQ_TYPE_LEVEL_LOW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605160032.150587-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit fa2c8cad202195bfa87b18dc44ff4981d45085b4 Author: Krzysztof Kozlowski Date: Wed Jun 5 18:00:30 2024 +0200 arm64: dts: qcom: sm6375-pdx225: correct touchscreen interrupt flags Interrupt flags 0x2008 looks like some downstream copy-paste, because generic GPIOLIB code, used by Qualcomm pin controller drivers, ignores flags outside of IRQ_TYPE_SENSE_MASK. Probably the intention was to pass just 0x8, so IRQ_TYPE_LEVEL_LOW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605160032.150587-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit d044c0e36d095996f7b29a928e06c9475c4075e6 Author: Krzysztof Kozlowski Date: Wed Jun 5 18:00:29 2024 +0200 arm64: dts: qcom: sm6350-pdx213: correct touchscreen interrupt flags Interrupt flags 0x2008 looks like some downstream copy-paste, because generic GPIOLIB code, used by Qualcomm pin controller drivers, ignores flags outside of IRQ_TYPE_SENSE_MASK. Probably the intention was to pass just 0x8, so IRQ_TYPE_LEVEL_LOW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605160032.150587-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 830a24be7dc1711c4e5be82cb319b575af7760f8 Author: Abel Vesa Date: Thu Jun 6 13:41:54 2024 +0300 arm64: dts: qcom: x1e80100-qcp: Add pmic-glink node with all 3 connectors Add the pmic-glink node and describe all 3 USB Type-C connectors. Do this for USB only, for now. The DP ports will come at a later stage since they use muxes. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240606-x1e80100-dts-pmic-glink-v2-3-972c902e3e6b@linaro.org Signed-off-by: Bjorn Andersson commit 24b7616a1cd3eeefa91417afc1467981c4cbaf61 Author: Abel Vesa Date: Thu Jun 6 13:41:53 2024 +0300 arm64: dts: qcom: x1e80100-crd: Add pmic-glink node with all 3 connectors Add the pmic-glink node and describe all 3 USB Type-C connectors. Do this for USB only, for now. The DP ports will come at a later stage since they use retimers. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240606-x1e80100-dts-pmic-glink-v2-2-972c902e3e6b@linaro.org Signed-off-by: Bjorn Andersson commit aa48a8a5d642b5806a7bdae52457c87fee3118f8 Author: Abel Vesa Date: Thu Jun 6 13:41:52 2024 +0300 arm64: dts: qcom: x1e80100: Add remote endpoints between PHYs and DPs Describe the port/endpoints graph between the USB/DP combo PHYs and their corresponding DP controllers. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240606-x1e80100-dts-pmic-glink-v2-1-972c902e3e6b@linaro.org Signed-off-by: Bjorn Andersson commit 80edfc18de69508e37b6668d668194a3e9556f5e Merge: bc90f56a16998 8e99e770f7eab Author: Bjorn Andersson Date: Thu Jun 6 17:38:08 2024 -0500 Merge branch 'arm64-fixes-for-6.10' into arm64-for-6.11 Merge the arm64-fixes-for-6.10 branch into arm64-for-6.11 to resolve the merge conflict caused by pmic-glink and reserved-memory introduction at the same place in the x1e80100 crd and qcp dts files. commit 18547925519acaa57c1877871c144e2646249d59 Merge: 7ba38c2a9e1a8 c76494768761a Author: Dmitry Torokhov Date: Thu Jun 6 14:39:44 2024 -0700 Merge branch 'ib/6.9-disable-irq-guard' into next This brings in support for guard(disable_irq)(...); commit c76494768761aef7630e7e0db820ba7b375964da Author: Dmitry Torokhov Date: Thu May 30 11:07:19 2024 -0700 linux/interrupt.h: allow "guard" notation to disable and reenable IRQ Drivers often need to first disable an interrupt, carry out some action, and then reenable the interrupt. Introduce support for the "guard" notation for this so that the following is possible: ... scoped_cond_guard(mutex_intr, return -EINTR, &data->sysfs_mutex) { guard(disable_irq)(&client->irq); error = elan_acquire_baseline(data); if (error) return error; } ... Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/ZljAV6HjkPSEhWSw@google.com Signed-off-by: Dmitry Torokhov commit f85af9d955ac9601174e1c64f4b3308c1cae4a7e Author: Geliang Tang Date: Thu May 30 15:41:12 2024 +0800 selftests/bpf: Drop useless arguments of do_test in bpf_tcp_ca bpf_map_lookup_elem() has been removed from do_test(), it makes the sk_stg_map argument of do_test() useless. In addition, two exactly the same opts are passed in all the places where do_test() is invoked, so cli_opts argument can be dropped too. This patch drops these two useless arguments of do_test() in bpf_tcp_ca.c. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/7056eab111d78a05bce29d2821228dc93f240de4.1717054461.git.tanggeliang@kylinos.cn commit cd984b2ed62423eb3daceacb21d651115a612af6 Author: Geliang Tang Date: Thu May 30 15:41:11 2024 +0800 selftests/bpf: Use start_test in test_dctcp in bpf_tcp_ca The "if (sk_stg_map)" block in do_test() is only used by test_dctcp(), it makes sense to move it from do_test() into test_dctcp(). Then do_test() can be used by other tests except test_dctcp(). Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/9938916627b9810c877e5c03a621bc0ba5acf5c5.1717054461.git.tanggeliang@kylinos.cn commit 224eeb5598c30ee835dc9fea4c7ad85a8fb7eda4 Author: Geliang Tang Date: Thu May 30 15:41:10 2024 +0800 selftests/bpf: Use start_test in test_dctcp_fallback in bpf_tcp_ca The newly added helper start_test() can be used in test_dctcp_fallback() too, to replace start_server_str() and connect_to_fd_opts(). In that way, two network_helper_opts srv_opts and cli_opts are used instead of the previously shared opts. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/792ca3bb013fa06e618176da02d75e4f79a76733.1717054461.git.tanggeliang@kylinos.cn commit fee97d0c9a14b5dd5cce0ec1df3a54a6b963f40c Author: Geliang Tang Date: Thu May 30 15:41:09 2024 +0800 selftests/bpf: Add start_test helper in bpf_tcp_ca For moving the "if (sk_stg_map)" block out of do_test(), extract the code before this block as a new function start_test(). It creates server-side and client-side sockets and returns them to the caller. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/48f2921ff9be958f5d3d28fe6bb7269a61cafa9f.1717054461.git.tanggeliang@kylinos.cn commit 9abdfd8a212332c64f6d0a27fc2ad69e9e0335d1 Author: Geliang Tang Date: Thu May 30 15:41:08 2024 +0800 selftests/bpf: Use connect_to_fd_opts in do_test in bpf_tcp_ca This patch uses connect_to_fd_opts() instead of using connect_fd_to_fd() and settcpca() in do_test() in prog_tests/bpf_tcp_ca.c to accept a struct network_helper_opts argument. Then define a dctcp dedicated post_socket_cb callback stg_post_socket_cb(), invoking both settcpca() and bpf_map_update_elem() in it, and set it in test_dctcp(). For passing map_fd into stg_post_socket_cb() callback, a new member map_fd is added in struct cb_opts. Add another "const struct network_helper_opts *cli_opts" to do_test() to separate it from the server "opts". Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/876ec90430865bc468e3b7f6fb2648420b075548.1717054461.git.tanggeliang@kylinos.cn commit 83138f8fb798627531be3b5627af4a6008a7bbd6 Author: Biju Das Date: Wed Jun 5 16:41:15 2024 +0100 media: dt-bindings: renesas,rzg2l-cru: Document Renesas RZ/G2UL CRU block Document the CRU IP found in Renesas RZ/G2UL SoC. The CRU block on the RZ/G2UL SoC is identical to one found on the RZ/G2L SoC, but it does not support parallel input. Signed-off-by: Biju Das Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240605154115.263447-3-biju.das.jz@bp.renesas.com Signed-off-by: Rob Herring (Arm) commit 77b023ba4f45ce2bf26edb095b4a81829c9e621b Author: Biju Das Date: Wed Jun 5 16:41:14 2024 +0100 media: dt-bindings: renesas,rzg2l-csi2: Document Renesas RZ/G2UL CSI-2 block Document the CSI-2 block which is part of CRU found in Renesas RZ/G2UL SoC. The CSI-2 block on the RZ/G2UL SoC is identical to one found on the RZ/G2L SoC. Signed-off-by: Biju Das Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240605154115.263447-2-biju.das.jz@bp.renesas.com Signed-off-by: Rob Herring (Arm) commit a749d14e4e9c4257a376ef6629add19961bd0927 Author: Krzysztof Kozlowski Date: Wed Jun 5 12:56:59 2024 +0200 dt-bindings: display: panel: constrain 'reg' in DSI panels (part two) DSI-attached devices could respond to more than one virtual channel number, thus their bindings are supposed to constrain the 'reg' property to match hardware. Add missing 'reg' constrain for DSI-attached display panels, based on DTS sources in Linux kernel (assume all devices take only one channel number). Few bindings missed previous fixup: LG SW43408 and Raydium RM69380. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240605105659.27433-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring (Arm) commit a9a34fc737aea5d5d7a47c885f5ed45dfb1df07f Author: Dmitry Baryshkov Date: Tue May 28 16:36:48 2024 +0300 dt-bindings: ufs: qcom,ufs: drop source clock entries There is no need to mention and/or to touch in any way the intermediate (source) clocks. Drop them from MSM8996 UFSHCD schema, making it follow the example lead by all other platforms. Reviewed-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240528-msm8996-fix-ufs-v5-1-b475c341126e@linaro.org Signed-off-by: Rob Herring (Arm) commit 7ba38c2a9e1a8d11d5286ef8e14f86247d5443ff Author: Jason Gerecke Date: Thu Jun 6 13:41:01 2024 -0700 Input: wacom_w8001 - correct device name generation Fixes: 6c7cc1a29d1e ("Input: wacom_w8001 - simplify device name generation") Signed-off-by: Jason Gerecke Link: https://lore.kernel.org/r/20240605164656.61623-1-jason.gerecke@wacom.com Signed-off-by: Dmitry Torokhov commit 6a6118336270f67174fb8c799c8262bfa88e97e0 Author: Dr. David Alan Gilbert Date: Mon May 27 17:01:18 2024 +0100 PCI: tegra: Remove unused struct 'tegra_pcie_soc' 'tegra_pcie_soc' has been unused since 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support"). Remove it. Link: https://lore.kernel.org/r/20240527160118.37069-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 88f2ab39990a3ab8b13c3cb6e276459a1a6c370b Author: Dr. David Alan Gilbert Date: Thu May 9 01:08:58 2024 +0100 ACPI: PCI: Remove unused struct 'acpi_handle_node' 'acpi_handle_node' is unused since 63f534b8bad9 ("ACPI: PCI: Rework acpi_get_pci_dev()"). Remove it. Link: https://lore.kernel.org/r/20240509000858.204114-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron commit 2f6b884dfcc55065b76d2bf1e2424b93991ae92d Author: Steven Rostedt (Google) Date: Thu Jun 6 08:18:46 2024 -0400 function_graph: Rename BYTE_NUMBER to CHAR_NUMBER in selftests The function_graph selftests checks various size variables to pass from the entry of the function to the exit. It tests 1, 2, 4 and 8 byte words. The 1 byte macro was called BYTE_NUMBER but that is used in the sh architecture: arch/sh/include/asm/bitops-op32.h Just rename the macro to CHAR_NUMBER. Link: https://lore.kernel.org/linux-trace-kernel/20240606081846.4cb82dc4@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Fixes: 47c3c70aa3697 ("function_graph: Add selftest for passing local variables") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406061744.rZDXfRrG-lkp@intel.com/ Signed-off-by: Steven Rostedt (Google) commit 9a2a3aab7329f1e62982531559866b90d5a5208b Author: Jiapeng Chong Date: Thu Jun 6 10:10:53 2024 +0800 fgraph: Remove some unused functions These functions are defined in the fgraph.c file, but not called elsewhere, so delete these unused functions. kernel/trace/fgraph.c:273:1: warning: unused function 'set_bitmap_bits'. kernel/trace/fgraph.c:259:19: warning: unused function 'get_fgraph_type'. Link: https://lore.kernel.org/linux-trace-kernel/20240606021053.27783-1-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9289 Signed-off-by: Jiapeng Chong Signed-off-by: Steven Rostedt (Google) commit 6c1f7f0acabd35ad73525bd2766da4669c18a9e6 Author: Tatsuya S Date: Tue May 28 12:24:14 2024 +0900 ftrace: Hide one more entry in stack trace when ftrace_pid is enabled On setting set_ftrace_pid, a extra entry generated by ftrace_pid_func() is shown on stack trace(CONFIG_UNWINDER_FRAME_POINTER=y). [004] ..... 68.459382: => 0xffffffffa00090af => ksys_read => __x64_sys_read => x64_sys_call => do_syscall_64 => entry_SYSCALL_64_after_hwframe To resolve this issue, increment skip count in function_stack_trace_call() if pids are set. Link: https://lore.kernel.org/linux-trace-kernel/20240528032604.6813-3-tatsuya.s2862@gmail.com Signed-off-by: Tatsuya S [ Rebased to current tree ] Signed-off-by: Steven Rostedt (Google) commit 4057fd2cddaea0d6f6c5f8af4a455741f5632259 Author: Steven Rostedt (Google) Date: Wed Jun 5 16:26:50 2024 -0400 function_graph: Do not update pid func if CONFIG_DYNAMIC_FTRACE not enabled The ftrace subops is only defined if CONFIG_DYNAMIC_FTRACE is enabled. If it is not, function tracing is extremely limited, and the subops in the ftrace_ops structure is not defined (and will fail to compile). If DYNAMIC_FTRACE is not enabled, then function graph filtering will not work (as it shouldn't). Link: https://lore.kernel.org/linux-trace-kernel/20240605202709.096020676@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Fixes: df3ec5da6a1e7 ("function_graph: Add pid tracing back to function graph tracer") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406051855.9VIYXbTB-lkp@intel.com/ Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 0c4d8cbb2ce20df3a72b5b3189d93b5c0cc3e968 Author: Steven Rostedt (Google) Date: Wed Jun 5 16:26:49 2024 -0400 function_graph: Make fgraph_do_direct static key static The static branch key "fgraph_do_direct" was not declared static but is only used in one file. Change it to a static variable. Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.936515302@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Fixes: cc60ee813b503 ("function_graph: Use static_call and branch to optimize entry function") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406051711.dS1sQZ9n-lkp@intel.com/ Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 86b49970e071921490ebab3d982d93dd616cd967 Author: Steven Rostedt (Google) Date: Wed Jun 5 16:26:48 2024 -0400 ftrace: Fix prototypes for ftrace_startup/shutdown_subops() The ftrace_startup_subops() was in the wrong header, and both functions were not defined on !CONFIG_DYNAMIC_FTRACE. Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.773583114@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Fixes: 5fccc7552ccbc ("ftrace: Add subops logic to allow one ops to manage many") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406051524.a12JqLqx-lkp@intel.com/ Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 0ddef5d601ff992430b7874074c3549aa66f2c85 Author: Steven Rostedt (Google) Date: Wed Jun 5 16:26:47 2024 -0400 ftrace: Assign RCU list variable with rcu_assign_ptr() Use rcu_assign_ptr() to assign the list pointer as it is marked as RCU, and this quiets the sparse warning: kernel/trace/ftrace.c:313:23: warning: incorrect type in assignment (different address spaces) kernel/trace/ftrace.c:313:23: expected struct ftrace_ops [noderef] __rcu * kernel/trace/ftrace.c:313:23: got struct ftrace_ops * Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.613471310@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 1f51ba905e792a4f6d7b313756a4f99386990ddf Author: Steven Rostedt (Google) Date: Wed Jun 5 16:26:46 2024 -0400 ftrace: Assign ftrace_list_end to ftrace_ops_list type cast to RCU Use a type cast to convert ftrace_list_end to RCU when assigning ftrace_ops_list. This will quiet the sparse warning: kernel/trace/ftrace.c:125:59: warning: incorrect type in initializer (different address spaces) kernel/trace/ftrace.c:125:59: expected struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list kernel/trace/ftrace.c:125:59: got struct ftrace_ops * Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.450784356@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 1d5f0222944fe723b9bfaaeb27e368363644ccab Author: Steven Rostedt (Google) Date: Wed Jun 5 16:26:45 2024 -0400 ftrace: Declare function_trace_op in header to quiet sparse warning Sparse complains that function_trace_op is not static but is not declared in a header file. It is used only in assembly code. But add it to a header so that sparse no longer complains: kernel/trace/ftrace.c:99:19: warning: symbol 'function_trace_op' was not declared. Should it be static? Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.289105647@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit d66bb33479e594ba7cf72fa2c0f848e3d0bc9eb1 Author: Steven Rostedt (Google) Date: Wed Jun 5 14:03:39 2024 -0400 ftrace: Add comments to ftrace_hash_move() and friends Describe what ftrace_hash_move() does and add some more comments to some other functions to make it easier to understand. Link: https://lore.kernel.org/linux-trace-kernel/20240605180409.179520305@goodmis.org Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Mark Rutland Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 1a88c071679496907ba3e62ec1190d198c20ace8 Author: Steven Rostedt (Google) Date: Wed Jun 5 14:03:38 2024 -0400 ftrace: Convert "inc" parameter to bool in ftrace_hash_rec_update_modify() The parameter "inc" in the function ftrace_hash_rec_update_modify() is boolean. Change it to be such. Also add documentation to what the function does. Link: https://lore.kernel.org/linux-trace-kernel/20240605180409.021080462@goodmis.org Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit da73f6d49007d1b6889d5cb3320dc9f90cf3ccbe Author: Steven Rostedt (Google) Date: Wed Jun 5 14:03:37 2024 -0400 ftrace: Add comments to ftrace_hash_rec_disable/enable() Add comments to describe what the functions ftrace_hash_rec_disable() and ftrace_hash_rec_enable() do. Also change the passing of the "inc" variable to __ftrace_hash_rec_update() to a boolean value as that is what it is supposed to take. Link: https://lore.kernel.org/linux-trace-kernel/20240605180408.857333430@goodmis.org Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Mark Rutland Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 07bbe0833ed62f48785dffa8e429f35c1d906415 Author: Steven Rostedt (Google) Date: Wed Jun 5 14:03:36 2024 -0400 ftrace: Remove "filter_hash" parameter from __ftrace_hash_rec_update() While adding comments to the function __ftrace_hash_rec_update() and trying to describe in detail what the parameter for "filter_hash" does, I realized that it basically does exactly the same thing (but differently) if it is set or not! If it is set, the idea was the ops->filter_hash was being updated, and the code should focus on the functions that are in the ops->filter_hash and add them. But it still had to pay attention to the functions in the ops->notrace_hash, to ignore them. If it was cleared, it focused on the ops->notrace_hash, and would add functions that were not in the ops->notrace_hash but would still keep functions in the "ops->filter_hash". Basically doing the same thing. In reality, the __ftrace_hash_rec_update() only needs to either remove the functions associated to the give ops (if "inc" is set) or remove them (if "inc" is cleared). It has to pay attention to both the filter_hash and notrace_hash regardless. Remove the "filter_hash" parameter from __filter_hash_rec_update() and comment the function for what it really is doing. Link: https://lore.kernel.org/linux-trace-kernel/20240605180408.691995506@goodmis.org Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Reviewed-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit 6800e63cf97bae62bca56d8e691544540d945f53 Author: Riana Tauro Date: Thu Jun 6 15:38:42 2024 +0530 drm/xe: move disable_c6 call disable c6 called in guc_pc_fini_hw is unreachable. GuC PC init returns earlier if skip_guc_pc is true and never registers the finish call thus making disable_c6 unreachable. move this call to gt idle. v2: rebase v3: add fixes tag (Himal) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240606100842.956072-3-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi commit 21b708554648177a0078962c31629bce31ef5d83 Author: Riana Tauro Date: Thu Jun 6 15:38:41 2024 +0530 drm/xe/xe_gt_idle: use GT forcewake domain assertion The rc6 registers used in disable_c6 function belong to the GT forcewake domain. Hence change the forcewake assertion to check GT forcewake domain. v2: add fixes tag (Himal) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240606100842.956072-2-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi commit 62b5bf58b928f0f4fcc8bb633b63795517825d31 Merge: 749332814479a d30d0e49da71d Author: Jakub Kicinski Date: Thu Jun 6 11:33:09 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. No conflicts. Adjacent changes: drivers/net/ethernet/pensando/ionic/ionic_txrx.c d9c04209990b ("ionic: Mark error paths in the data path as unlikely") 491aee894a08 ("ionic: fix kernel panic in XDP_TX action") net/ipv6/ip6_fib.c b4cb4a1391dc ("net: use unrcu_pointer() helper") b01e1c030770 ("ipv6: fix possible race in __fib6_drop_pcpu_from()") Signed-off-by: Jakub Kicinski commit 399ced9594dfab51b782798efe60a2376cd5b724 Author: Frederic Weisbecker Date: Fri May 17 17:23:02 2024 +0200 rcu/tasks: Fix stale task snaphot for Tasks Trace When RCU-TASKS-TRACE pre-gp takes a snapshot of the current task running on all online CPUs, no explicit ordering synchronizes properly with a context switch. This lack of ordering can permit the new task to miss pre-grace-period update-side accesses. The following diagram, courtesy of Paul, shows the possible bad scenario: CPU 0 CPU 1 ----- ----- // Pre-GP update side access WRITE_ONCE(*X, 1); smp_mb(); r0 = rq->curr; RCU_INIT_POINTER(rq->curr, TASK_B) spin_unlock(rq) rcu_read_lock_trace() r1 = X; /* ignore TASK_B */ Either r0==TASK_B or r1==1 is needed but neither is guaranteed. One possible solution to solve this is to wait for an RCU grace period at the beginning of the RCU-tasks-trace grace period before taking the current tasks snaphot. However this would introduce large additional latencies to RCU-tasks-trace grace periods. Another solution is to lock the target runqueue while taking the current task snapshot. This ensures that the update side sees the latest context switch and subsequent context switches will see the pre-grace-period update side accesses. This commit therefore adds runqueue locking to cpu_curr_snapshot(). Fixes: e386b6725798 ("rcu-tasks: Eliminate RCU Tasks Trace IPIs to online CPUs") Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit ce79b73336d51288129f510569f389b93affe56c Author: Michal Wajdeczko Date: Fri May 17 18:34:06 2024 +0200 drm/i915: Don't use __func__ as prefix for drm_dbg_printer Updated code of drm_dbg_printer() is already printing symbolic name of the caller like drm_dbg() does. Reviewed-by: Jani Nikula Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240517163406.2348-4-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit c2ef66e9ad882ab4b055a86657c20c61d203f003 Author: Michal Wajdeczko Date: Fri May 17 18:34:05 2024 +0200 drm/print: Improve drm_dbg_printer With recent introduction of a generic drm dev printk function, we can now store and use location where drm_dbg_printer was invoked and output it's symbolic name like we do for all drm debug prints. Cc: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240517163406.2348-3-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 178c0a33c421d9716e734645a5d0da271bf4695f Author: Michal Wajdeczko Date: Fri May 17 18:34:04 2024 +0200 drm/print: Add generic drm dev printk function We already have some drm printk functions that need to duplicate a code to get a similar format of the final result, for example: [ ] 0000:00:00.0: [drm:foo] bar [ ] 0000:00:00.0: [drm] foo bar [ ] 0000:00:00.0: [drm] *ERROR* foo Add a generic __drm_dev_vprintk() function that can format the final message like all other existing function do and allows us to keep the formatting code in one place. Cc: Jani Nikula Signed-off-by: Michal Wajdeczko Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240517163406.2348-2-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 0d5edcc60abe9a02501f01e032bfa2432c1364de Author: Michal Wajdeczko Date: Thu May 16 18:00:15 2024 +0200 drm/print: Kill ___drm_dbg() There is no point in maintaining a separate print function, while there is __drm_dev_dbg() function that can work with a NULL device. Signed-off-by: Michal Wajdeczko Cc: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240516160015.2260-1-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 0d11307022978f1f395da587285c06c9cea47288 Author: Michal Wajdeczko Date: Thu May 23 19:44:29 2024 +0200 drm/print: Add missing [drm] prefix to drm based WARN All drm_device based logging macros, except those related to WARN, include the [drm] prefix. Fix that. [ ] 0000:00:00.0: this is a warning [ ] 0000:00:00.0: drm_WARN_ON(true) vs [ ] 0000:00:00.0: [drm] this is a warning [ ] 0000:00:00.0: [drm] drm_WARN_ON(true) Signed-off-by: Michal Wajdeczko Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240523174429.800-1-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi commit 0ac55d095d375e84fcdac5e51011613734e57854 Author: Paul E. McKenney Date: Wed May 8 21:43:56 2024 -0700 tools/rcu: Add rcu-updaters.sh script This commit adds a tools/rcu/rcu-updaters.sh script that uses bpftrace to print a histogram of the RCU update-side primitives invoked during the specified time interval, or until manually terminated if no interval is specified. Sample output on an idle laptop: @counts[poll_state_synchronize_rcu]: 6 @counts[synchronize_srcu]: 13 @counts[call_rcu_tasks_trace]: 25 @counts[synchronize_rcu]: 54 @counts[kvfree_call_rcu]: 428 @counts[call_rcu]: 2134 Note that when run on a kernel missing one or more of the symbols, this script will issue a diagnostic for each that is not found, but continue normally for the rest of the functions. Signed-off-by: Paul E. McKenney commit b9f147cdc2c0bf54ca2c25ed185806f1fc6da65f Author: Jeff Johnson Date: Sat May 18 16:28:08 2024 -0700 rcutorture: Add missing MODULE_DESCRIPTION() macros Fix the following 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/rcu/rcutorture.o WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/rcu/rcuscale.o WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/rcu/refscale.o Signed-off-by: Jeff Johnson Signed-off-by: Paul E. McKenney commit 6040072f4774a575fa67b912efe7722874be337b Author: Paul E. McKenney Date: Fri Apr 5 12:02:11 2024 -0700 rcutorture: Fix rcu_torture_fwd_cb_cr() data race On powerpc systems, spinlock acquisition does not order prior stores against later loads. This means that this statement: rfcp->rfc_next = NULL; Can be reordered to follow this statement: WRITE_ONCE(*rfcpp, rfcp); Which is then a data race with rcu_torture_fwd_prog_cr(), specifically, this statement: rfcpn = READ_ONCE(rfcp->rfc_next) KCSAN located this data race, which represents a real failure on powerpc. Signed-off-by: Paul E. McKenney Acked-by: Marco Elver Cc: Andrey Konovalov Cc: commit a3fbf8606351e7c884a4722dfab2e23e49c1cf70 Author: Paul E. McKenney Date: Wed May 22 12:04:13 2024 -0700 doc: Clarify rcu_assign_pointer() and rcu_dereference() ordering This commit expands on the ordering properties of rcu_assign_pointer() and rcu_dereference(), outlining their constraints on CPUs and compilers. Reported-by: Rao Shoaib Signed-off-by: Paul E. McKenney commit 293d901348489f507f644a5b72e864b82d8bc288 Author: Paul E. McKenney Date: Fri Apr 5 11:00:45 2024 -0700 doc: Update Tasks RCU and Tasks Rude RCU description in Requirements.rst This commit adds more detail to the Tasks RCU and Tasks Rude RCU descriptions in Requirements.rst. While in the area, add Tasks Trace RCU to the Tasks-RCU table of contents. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker commit ea6ee1bac6034cb4e91bcc229ed1354ca1a024d5 Author: Alan Stern Date: Thu Jun 6 09:59:01 2024 -0400 tools/memory-model: Code reorganization in lock.cat Code reorganization for the lock.cat file in tools/memory-model: Improve the efficiency by ruling out right at the start RU events (spin_is_locked() calls that return False) inside a critical section for the same lock. Improve the organization of the code for handling LF and RU events by pulling the definitions of the pair-to-relation macro out from two different complicated compound expressions, using a single standalone definition instead. Rewrite the calculations of the rf relation for LF and RU events, for greater clarity. Signed-off-by: Alan Stern Tested-by: Andrea Parri Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 4c830eef806679dc243e191f962c488dd9d00708 Author: Alan Stern Date: Thu Jun 6 09:57:55 2024 -0400 tools/memory-model: Fix bug in lock.cat Andrea reported that the following innocuous litmus test: C T {} P0(spinlock_t *x) { int r0; spin_lock(x); spin_unlock(x); r0 = spin_is_locked(x); } gives rise to a nonsensical empty result with no executions: $ herd7 -conf linux-kernel.cfg T.litmus Test T Required States 0 Ok Witnesses Positive: 0 Negative: 0 Condition forall (true) Observation T Never 0 0 Time T 0.00 Hash=6fa204e139ddddf2cb6fa963bad117c0 The problem is caused by a bug in the lock.cat part of the LKMM. Its computation of the rf relation for RU (read-unlocked) events is faulty; it implicitly assumes that every RU event must read from either a UL (unlock) event in another thread or from the lock's initial state. Neither is true in the litmus test above, so the computation yields no possible executions. The lock.cat code tries to make up for this deficiency by allowing RU events outside of critical sections to read from the last po-previous UL event. But it does this incorrectly, trying to keep these rfi links separate from the rfe links that might also be needed, and passing only the latter to herd7's cross() macro. The problem is fixed by merging the two sets of possible rf links for RU events and using them all in the call to cross(). Signed-off-by: Alan Stern Reported-by: Andrea Parri Closes: https://lore.kernel.org/linux-arch/ZlC0IkzpQdeGj+a3@andrea/ Tested-by: Andrea Parri Acked-by: Andrea Parri Fixes: 15553dcbca06 ("tools/memory-model: Add model support for spin_is_locked()") CC: Signed-off-by: Paul E. McKenney commit 520c637bf0aa629ebbdbaf3236b50ad2684fc3f3 Author: Paul E. McKenney Date: Tue Jun 4 20:59:35 2024 -0700 tools/memory-model: Add access-marking.txt to README Given that access-marking.txt exists, this commit makes it easier to find. Reported-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit bc90f56a169987975072efa56c3b595eda19668a Author: Neil Armstrong Date: Thu Jun 6 14:50:22 2024 +0200 arm64: dts: sm8650-hdk: add support for the Display Card overlay With the SM8650-HDK, a Display Card kit can be connected to provide a VTDR6130 display with Goodix Berlin Touch controller. In order to route the DSI lanes to the connector for the Display Card kit, a switch must be changed on the board. The HDMI nodes are disabled since the DSI lanes are shared with the DSI to HDMI transceiver. Add support for this card as an overlay and apply it it at build-time to the sm8650-hdk dtb. Reviewed-by: Vladimir Zapolskiy Tested-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240606-topic-sm8650-upstream-hdk-v6-1-fb034fe864cc@linaro.org Signed-off-by: Bjorn Andersson commit 1e029b73b7d1d8684e52961a7ecf74770d16651b Author: Paul E. McKenney Date: Wed May 29 10:53:59 2024 -0700 tools/memory-model: Add KCSAN LF mentorship session citation Add a citation to Marco's LF mentorship session presentation entitled "The Kernel Concurrency Sanitizer" [ paulmck: Apply Marco Elver feedback. ] Reported-by: Marco Elver Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri Reviewed-by: Akira Yokosawa Acked-by: Marco Elver Cc: Alan Stern Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: Daniel Lustig Cc: Joel Fernandes Cc: commit 0354ab18ef5ef11f3139c7252f573c5d4af87c60 Author: Aboothahir U Date: Thu Jun 6 16:47:28 2024 +0200 arm64: dts: qcom: pm660: Add rradc, charger Add charger to PM660 PMIC. Readings from round-robin ADC are needed for charger to function, so add it as well. Signed-off-by: Aboothahir U Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240606-pm660-charger-rrdac-v1-1-a95d4da24f3b@gmail.com Signed-off-by: Bjorn Andersson commit ddd7432d621daf93baf36e353ab7472d69dd692f Author: Jeff Johnson Date: Thu May 30 12:39:26 2024 -0700 kcsan: Add missing MODULE_DESCRIPTION() macro Fix the warning reported by 'make C=1 W=1': WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/kcsan/kcsan_test.o Signed-off-by: Jeff Johnson Reviewed-by: Marco Elver Signed-off-by: Paul E. McKenney commit 9ab4a7e181823793cdd8ba7c7aceebaf52e3824e Author: Jonathan Cavitt Date: Wed Jun 5 08:08:28 2024 -0700 drm/xe/xe_gt_debugfs: Add synchronous gt reset debugfs We currently have debugfs support that allows the userspace to initiate an asynchronous gt reset on command. However, userspace may also wish to wait for the completion of the gt reset before performing any additional work. To that end, add a version of the force_reset gt debugfs function that operates synchronously. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1068 Suggested-by: Matthew Brost Signed-off-by: Jonathan Cavitt CC: John Harrison CC: Stuart Summers Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240605150828.2736396-1-jonathan.cavitt@intel.com Signed-off-by: Rodrigo Vivi commit 08ac454e258e38813afb906650f19acce3afd982 Author: Mykyta Yatsenko Date: Wed Jun 5 18:51:35 2024 +0100 libbpf: Auto-attach struct_ops BPF maps in BPF skeleton Similarly to `bpf_program`, support `bpf_map` automatic attachment in `bpf_object__attach_skeleton`. Currently only struct_ops maps could be attached. On bpftool side, code-generate links in skeleton struct for struct_ops maps. Similarly to `bpf_program_skeleton`, set links in `bpf_map_skeleton`. On libbpf side, extend `bpf_map` with new `autoattach` field to support enabling or disabling autoattach functionality, introducing getter/setter for this field. `bpf_object__(attach|detach)_skeleton` is extended with attaching/detaching struct_ops maps logic. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240605175135.117127-1-yatsenko@meta.com commit 3afd801f4264c7a6c84957cd3ab653cfd8f61d3e Author: Steven Rostedt (Google) Date: Wed Jun 5 14:03:35 2024 -0400 ftrace: Rename dup_hash() and comment it The name "dup_hash()" is a misnomer as it does not duplicate the hash that is passed in, but instead moves its entities from that hash to a newly allocated one. Rename it to "__move_hash()" (using starting underscores as it is an internal function), and add some comments about what it does. Link: https://lore.kernel.org/linux-trace-kernel/20240605180408.537723591@goodmis.org Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit 8d1330d24788e1e28f6939779391ce835f19fbd2 Author: Primoz Fiser Date: Thu Jun 6 10:01:04 2024 +0200 drm/panel: simple: Add PrimeView PM070WL4 support Add support for PrimeView PM070WL4 7.0" (800x480) TFT-LCD panel. Datasheet can be found at [1]. [1] https://www.beyondinfinite.com/lcd/Library/Pvi/PM070WL4-V1.0.pdf Signed-off-by: Primoz Fiser Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240606080104.3663355-3-primoz.fiser@norik.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240606080104.3663355-3-primoz.fiser@norik.com commit d046611a6187379c19c58d928f342c6884fcbbe7 Author: Primoz Fiser Date: Thu Jun 6 10:01:03 2024 +0200 dt-bindings: display: simple: Add PrimeView PM070WL4 panel Add PrimeView PM070WL4 7.0" 800x480 TFT LCD panel compatible string. Signed-off-by: Primoz Fiser Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240606080104.3663355-2-primoz.fiser@norik.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240606080104.3663355-2-primoz.fiser@norik.com commit 3b37a419b710797138c31c0f41c2a7d8aa9f62cd Author: Primoz Fiser Date: Thu Jun 6 10:01:02 2024 +0200 dt-bindings: vendor-prefixes: Add PrimeView The Prime View International (PVI) is a LCD panel manufacturer. Signed-off-by: Primoz Fiser Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240606080104.3663355-1-primoz.fiser@norik.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240606080104.3663355-1-primoz.fiser@norik.com commit 5d30de4311d2d4165e78dc021c5cacb7496b3491 Author: Matthew Brost Date: Tue Jun 4 22:50:41 2024 -0700 drm/xe: Do not dereference NULL job->fence in trace points job->fence is not assigned until xe_sched_job_arm(), check for job->fence in xe_sched_job_seqno() so any usage of this function (trace points) do not result in NULL ptr dereference. Also check job->fence before assigning error in job trace points. Fixes: 0ac7a2c745e8 ("drm/xe: Don't initialize fences at xe_sched_job_create()") Cc: Thomas Hellström Signed-off-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240605055041.2082074-1-matthew.brost@intel.com commit e2ef28ea15b461a394377c41b20f50ca59f98059 Author: Vignesh Raman Date: Wed May 29 08:10:49 2024 +0530 drm/ci: update xfails for the new testlist Now the testlist is used from IGT build, so update xfails with the new testlist. Set the timeout of all i915 jobs to 1h30m since some jobs takes more than 1 hour to complete. Reviewed-by: Dmitry Baryshkov # msm testlists Signed-off-by: Vignesh Raman Reviewed-by: Jessica Zhang # msm test list Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-7-vignesh.raman@collabora.com Signed-off-by: Helen Koike commit 460a336398e084ae061a661338123863239eb45c Author: Vignesh Raman Date: Wed May 29 08:10:48 2024 +0530 drm/ci: skip driver specific tests Skip driver specific tests and skip kms tests for panfrost driver since it is not a kms driver. Reviewed-by: Dmitry Baryshkov Signed-off-by: Vignesh Raman Reviewed-by: Jessica Zhang Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-6-vignesh.raman@collabora.com commit 225d3de749d0c76564a59aaa3e5b772fce6f0cf7 Author: Vignesh Raman Date: Wed May 29 08:10:47 2024 +0530 drm/ci: uprev IGT test-list.txt and test-list-full.txt are not generated for cross-builds and they are required by drm-ci for testing arm32 targets. This is fixed in igt-gpu-tools. So uprev IGT to include the commit which fixes this issue. Also disable building xe driver tests for non-intel platforms. Reviewed-by: Dmitry Baryshkov Signed-off-by: Vignesh Raman Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-5-vignesh.raman@collabora.com commit 0493be3ba118ecb928afd9fe807ef77aa42755ae Author: Vignesh Raman Date: Wed May 29 08:10:46 2024 +0530 drm/ci: generate testlist from build Stop vendoring the testlist into the kernel. Instead, use the testlist from the IGT build to ensure we do not miss renamed or newly added tests. Signed-off-by: Vignesh Raman Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-4-vignesh.raman@collabora.com commit 9c5219349b5bc588071529985eacd779a0dacfb7 Author: Vignesh Raman Date: Wed May 29 08:10:45 2024 +0530 drm/ci: add farm variable Mesa uses structured logs for logging and debug purpose, https://mesa.pages.freedesktop.org/-/mesa/-/jobs/59165650/artifacts/results/job_detail.json Since drm-ci uses the mesa scripts, add the farm variable and update the device type for missing jobs. Signed-off-by: Vignesh Raman Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-3-vignesh.raman@collabora.com commit cc806b74466672a9bbd4e9a04265d44eb506b686 Author: Vignesh Raman Date: Wed May 29 08:10:44 2024 +0530 drm/ci: uprev mesa version zlib.net is not allowing tarball download anymore and results in below error in kernel+rootfs_arm32 container build, urllib.error.HTTPError: HTTP Error 403: Forbidden urllib.error.HTTPError: HTTP Error 415: Unsupported Media Type Uprev mesa to latest version which includes a fix for this issue. https://gitlab.freedesktop.org/mesa/mesa/-/commit/908f444e Use id_tokens for JWT authentication. Since s3 bucket is migrated to mesa-rootfs, update the variables accordingly. Also copy helper scripts to install, so that the ci jobs can use these scripts for logging. Signed-off-by: Vignesh Raman Reviewed-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-2-vignesh.raman@collabora.com commit ababa16fd9bd0e2727a1c31c4fb68d6be053bddc Author: Lorenzo Pieralisi Date: Thu Jun 6 11:42:38 2024 +0200 irqchip/gic-v3: Enable non-coherent redistributors/ITSes ACPI probing The GIC architecture specification defines a set of registers for redistributors and ITSes that control the sharebility and cacheability attributes of redistributors/ITSes initiator ports on the interconnect (GICR_[V]PROPBASER, GICR_[V]PENDBASER, GITS_BASER). Architecturally the GIC provides a means to drive shareability and cacheability attributes signals but it is not mandatory for designs to wire up the corresponding interconnect signals that control the cacheability/shareability of transactions. Redistributors and ITSes interconnect ports can be connected to non-coherent interconnects that are not able to manage the shareability/cacheability attributes; this implicitly makes the redistributors and ITSes non-coherent observers. To enable non-coherent GIC designs on ACPI based systems, parse the MADT GICC/GICR/ITS subtables non-coherent flags to determine whether the respective components are non-coherent observers and force the shareability attributes to be programmed into the redistributors and ITSes registers. An ACPI global function (acpi_get_madt_revision()) is added to retrieve the MADT revision, in that it is essential to check the MADT revision before checking for flags that were added with MADT revision 7 so that if the kernel is booted with an ACPI MADT table with revision < 7 it skips parsing the newly added flags (that should be zeroed reserved values for MADT versions < 7 but they could turn out to be buggy and should be ignored). Signed-off-by: Lorenzo Pieralisi Signed-off-by: Thomas Gleixner Reviewed-by: Robin Murphy Acked-by: Marc Zyngier Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20240606094238.757649-2-lpieralisi@kernel.org commit 3ed96977a3c5b0a9b017d626600402be3089d4fc Author: Rodrigo Vivi Date: Tue Jun 4 13:54:38 2024 -0400 drm/mm: Remove unused drm_mm_replace_node Last caller was removed with commit 078a5b498d6a ("drm/tests: Remove slow tests"). Cc: Maxime Ripard Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240604175438.48125-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit df433a3fac078c79dc4efab81015dec012322668 Author: Michal Wajdeczko Date: Tue Jun 4 23:22:31 2024 +0200 drm/xe/vf: Custom GT restart Only few steps from the GT restart phase are applicable for the VF drivers, as initialization of PAT, WOPCM, MOCS or CCS mode can be done only by the native or PF drivers. Use custom GT restart function if running in VF mode. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240604212231.1416-5-michal.wajdeczko@intel.com commit 5bfae679d39966fb12c8e390a80e7ecf05693dfe Author: Michal Wajdeczko Date: Tue Jun 4 23:22:30 2024 +0200 drm/xe/vf: Custom GuC reset The VF drivers can't trigger real GuC firmware reset using GDRST register, but for the VF drivers it is sufficient to send VF_RESET message to reset any VF specific state maintained by the GuC. Use our existing VF bootstrap function as VF_RESET is part of it. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240604212231.1416-4-michal.wajdeczko@intel.com commit d9cf98e79ebfdeea8844c282b627d07c3512650c Author: Michal Wajdeczko Date: Tue Jun 4 23:22:29 2024 +0200 drm/xe/vf: Custom uC initialization VF drivers can't modify WOPCM registers nor upload firmwares to GuC, HuC or GSC. Modify xe_uc initialization functions to skip those steps if running in the VF mode, or defer to a new custom helper function that would not include those steps. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240604212231.1416-3-michal.wajdeczko@intel.com commit 05e49e0c7cb839a7c4d1ae82ceb1fd940c561370 Author: Michal Wajdeczko Date: Tue Jun 4 23:22:28 2024 +0200 drm/xe/vf: Support only GuC/HuC firmwares Only GuC/HuC firmwares can be used by the VFs, don't claim support for any other firmware (like GSC) even if the driver can support it. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240604212231.1416-2-michal.wajdeczko@intel.com commit b24862bac7b5db326716ad07bbff7b6ee3b09a59 Author: Alan Maguire Date: Wed Jun 5 16:33:14 2024 +0100 selftests/bpf: Add btf_field_iter selftests The added selftests verify that for every BTF kind we iterate correctly over consituent strings and ids. Signed-off-by: Alan Maguire Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240605153314.3727466-1-alan.maguire@oracle.com commit 7015843afcaf68c132784c89528dfddc0005e483 Author: Yonghong Song Date: Wed Jun 5 13:12:03 2024 -0700 selftests/bpf: Fix send_signal test with nested CONFIG_PARAVIRT Alexei reported that send_signal test may fail with nested CONFIG_PARAVIRT configs. In this particular case, the base VM is AMD with 166 cpus, and I run selftests with regular qemu on top of that and indeed send_signal test failed. I also tried with an Intel box with 80 cpus and there is no issue. The main qemu command line includes: -enable-kvm -smp 16 -cpu host The failure log looks like: $ ./test_progs -t send_signal [ 48.501588] watchdog: BUG: soft lockup - CPU#9 stuck for 26s! [test_progs:2225] [ 48.503622] Modules linked in: bpf_testmod(O) [ 48.503622] CPU: 9 PID: 2225 Comm: test_progs Tainted: G O 6.9.0-08561-g2c1713a8f1c9-dirty #69 [ 48.507629] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 [ 48.511635] RIP: 0010:handle_softirqs+0x71/0x290 [ 48.511635] Code: [...] 10 0a 00 00 00 31 c0 65 66 89 05 d5 f4 fa 7e fb bb ff ff ff ff <49> c7 c2 cb [ 48.518527] RSP: 0018:ffffc90000310fa0 EFLAGS: 00000246 [ 48.519579] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 00000000000006e0 [ 48.522526] RDX: 0000000000000006 RSI: ffff88810791ae80 RDI: 0000000000000000 [ 48.523587] RBP: ffffc90000fabc88 R08: 00000005a0af4f7f R09: 0000000000000000 [ 48.525525] R10: 0000000561d2f29c R11: 0000000000006534 R12: 0000000000000280 [ 48.528525] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 48.528525] FS: 00007f2f2885cd00(0000) GS:ffff888237c40000(0000) knlGS:0000000000000000 [ 48.531600] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 48.535520] CR2: 00007f2f287059f0 CR3: 0000000106a28002 CR4: 00000000003706f0 [ 48.537538] Call Trace: [ 48.537538] [ 48.537538] ? watchdog_timer_fn+0x1cd/0x250 [ 48.539590] ? lockup_detector_update_enable+0x50/0x50 [ 48.539590] ? __hrtimer_run_queues+0xff/0x280 [ 48.542520] ? hrtimer_interrupt+0x103/0x230 [ 48.544524] ? __sysvec_apic_timer_interrupt+0x4f/0x140 [ 48.545522] ? sysvec_apic_timer_interrupt+0x3a/0x90 [ 48.547612] ? asm_sysvec_apic_timer_interrupt+0x1a/0x20 [ 48.547612] ? handle_softirqs+0x71/0x290 [ 48.547612] irq_exit_rcu+0x63/0x80 [ 48.551585] sysvec_apic_timer_interrupt+0x75/0x90 [ 48.552521] [ 48.553529] [ 48.553529] asm_sysvec_apic_timer_interrupt+0x1a/0x20 [ 48.555609] RIP: 0010:finish_task_switch.isra.0+0x90/0x260 [ 48.556526] Code: [...] 9f 58 0a 00 00 48 85 db 0f 85 89 01 00 00 4c 89 ff e8 53 d9 bd 00 fb 66 90 <4d> 85 ed 74 [ 48.562524] RSP: 0018:ffffc90000fabd38 EFLAGS: 00000282 [ 48.563589] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff83385620 [ 48.563589] RDX: ffff888237c73ae4 RSI: 0000000000000000 RDI: ffff888237c6fd00 [ 48.568521] RBP: ffffc90000fabd68 R08: 0000000000000000 R09: 0000000000000000 [ 48.569528] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8881009d0000 [ 48.573525] R13: ffff8881024e5400 R14: ffff88810791ae80 R15: ffff888237c6fd00 [ 48.575614] ? finish_task_switch.isra.0+0x8d/0x260 [ 48.576523] __schedule+0x364/0xac0 [ 48.577535] schedule+0x2e/0x110 [ 48.578555] pipe_read+0x301/0x400 [ 48.579589] ? destroy_sched_domains_rcu+0x30/0x30 [ 48.579589] vfs_read+0x2b3/0x2f0 [ 48.579589] ksys_read+0x8b/0xc0 [ 48.583590] do_syscall_64+0x3d/0xc0 [ 48.583590] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 48.586525] RIP: 0033:0x7f2f28703fa1 [ 48.587592] Code: [...] 00 00 00 0f 1f 44 00 00 f3 0f 1e fa 80 3d c5 23 14 00 00 74 13 31 c0 0f 05 <48> 3d 00 f0 [ 48.593534] RSP: 002b:00007ffd90f8cf88 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 48.595589] RAX: ffffffffffffffda RBX: 00007ffd90f8d5e8 RCX: 00007f2f28703fa1 [ 48.595589] RDX: 0000000000000001 RSI: 00007ffd90f8cfb0 RDI: 0000000000000006 [ 48.599592] RBP: 00007ffd90f8d2f0 R08: 0000000000000064 R09: 0000000000000000 [ 48.602527] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 48.603589] R13: 00007ffd90f8d608 R14: 00007f2f288d8000 R15: 0000000000f6bdb0 [ 48.605527] In the test, two processes are communicating through pipe. Further debugging with strace found that the above splat is triggered as read() syscall could not receive the data even if the corresponding write() syscall in another process successfully wrote data into the pipe. The failed subtest is "send_signal_perf". The corresponding perf event has sample_period 1 and config PERF_COUNT_SW_CPU_CLOCK. sample_period 1 means every overflow event will trigger a call to the BPF program. So I suspect this may overwhelm the system. So I increased the sample_period to 100,000 and the test passed. The sample_period 10,000 still has the test failed. In other parts of selftest, e.g., [1], sample_freq is used instead. So I decided to use sample_freq = 1,000 since the test can pass as well. [1] https://lore.kernel.org/bpf/20240604070700.3032142-1-song@kernel.org/ Reported-by: Alexei Starovoitov Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240605201203.2603846-1-yonghong.song@linux.dev commit 92959898fdd6f398a799faf0bdcb1f7afc35d055 Author: Ville Syrjälä Date: Wed Jun 5 14:33:36 2024 +0300 drm/i915: Reduce DDI clock gating printk level from NOTICE to DEBUG No idea why the DDI clock gating print is done with drm_notice(). Just use drm_dbg_kms() since no one is going to be interested in this under normal circumstances. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240605113336.11194-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 749332814479ad2e06d892109227d3d93032f65b Merge: fe300258a501d 6971d21672827 Author: Paolo Abeni Date: Thu Jun 6 15:18:06 2024 +0200 Merge branch 'tcp-small-code-reorg' Eric Dumazet says: ==================== tcp: small code reorg Replace a WARN_ON_ONCE() that never triggered to DEBUG_NET_WARN_ON_ONCE() in reqsk_free(). Move inet_reqsk_alloc() and reqsk_alloc() to inet_connection_sock.c, to unclutter net/ipv4/tcp_input.c and include/net/request_sock.h ==================== Link: https://lore.kernel.org/r/20240605071553.1365557-1-edumazet@google.com Signed-off-by: Paolo Abeni commit 6971d21672827a701c5ea180891b7ea6cf06f6a7 Author: Eric Dumazet Date: Wed Jun 5 07:15:53 2024 +0000 tcp: move reqsk_alloc() to inet_connection_sock.c reqsk_alloc() has a single caller, no need to expose it in include/net/request_sock.h. Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit adbe695a9765fb704d2ac0d3e284f28bcc8b5bf3 Author: Eric Dumazet Date: Wed Jun 5 07:15:52 2024 +0000 tcp: move inet_reqsk_alloc() close to inet_reqsk_clone() inet_reqsk_alloc() does not belong to tcp_input.c, move it to inet_connection_sock.c instead. Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit c34506406dd5cfb352f8c53bb6a1b9535c0905dd Author: Eric Dumazet Date: Wed Jun 5 07:15:51 2024 +0000 tcp: small changes in reqsk_put() and reqsk_free() In reqsk_free(), use DEBUG_NET_WARN_ON_ONCE() instead of WARN_ON_ONCE() for a condition which never fired. In reqsk_put() directly call __reqsk_free(), there is no point checking rsk_refcnt again right after a transition to zero. Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Signed-off-by: Paolo Abeni commit fe300258a501d647dca6f7104f4dfea2ec33c581 Merge: 9b6a30febddf4 92f74c1e05b04 Author: Paolo Abeni Date: Thu Jun 6 15:13:48 2024 +0200 Merge branch 'mptcp-misc-cleanups' Matthieu Baerts says: ==================== mptcp: misc. cleanups Here is a small collection of miscellaneous cleanups: - Patch 1 uses an MPTCP helper, instead of a TCP one, to do the same thing. - Patch 2 adds a similar MPTCP helper, instead of using a TCP one directly. - Patch 3 uses more appropriated terms in comments. Signed-off-by: Matthieu Baerts (NGI0) ==================== Link: https://lore.kernel.org/r/20240605-upstream-net-next-20240604-misc-cleanup-v1-0-ae2e35c3ecc5@kernel.org Signed-off-by: Paolo Abeni commit 92f74c1e05b044b51398d6d4a85e659e4384f2cb Author: Davide Caratti Date: Wed Jun 5 09:15:42 2024 +0200 mptcp: refer to 'MPTCP' socket in comments We used to call it 'master' socket at the early stages of MPTCP development, but the correct wording is 'MPTCP' socket opposed to 'TCP subflows': convert the last 3 comments to use a more appropriate term. Signed-off-by: Davide Caratti Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 5cdedad62eaba22c45b9c45c8199bacd461afd87 Author: Geliang Tang Date: Wed Jun 5 09:15:41 2024 +0200 mptcp: add mptcp_space_from_win helper As a wrapper of __tcp_space_from_win(), this patch adds a MPTCP dedicated space_from_win helper mptcp_space_from_win() in protocol.h to paired with mptcp_win_from_space(). Use it instead of __tcp_space_from_win() in both mptcp_rcv_space_adjust() and mptcp_set_rcvlowat(). Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 5f0d0649c83f72399c19b18591ea1413ca94c015 Author: Geliang Tang Date: Wed Jun 5 09:15:40 2024 +0200 mptcp: use mptcp_win_from_space helper The MPTCP dedicated win_from_space helper mptcp_win_from_space() is defined in protocol.h, use it in mptcp_rcv_space_adjust() instead of using the TCP one. Here scaling_ratio is the same as msk->scaling_ratio. Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni commit 62e4f339619701c4e16b47438ae7529532c28e23 Author: Andreas Kemnade Date: Thu Jun 6 13:16:11 2024 +0200 dt-bindings: regulator: twl-regulator: convert to yaml Convert the regulator bindings to yaml. Drop one twl5030 compatible due to no documentation on mfd side and no users of the twl5030. Signed-off-by: Andreas Kemnade Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240606111611.371463-1-andreas@kemnade.info Signed-off-by: Mark Brown commit 8e712bd7966c0f9024b1b30ac4bd6b8988a592dc Author: Jani Nikula Date: Wed May 29 20:48:14 2024 +0300 drm/xe/display: drop i915_drv.h include from xe code Drop i915_drv.h include from xe display code as much as possible, and switch to xe types where necessary. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bb490f3e928fd8178277fde2435de80638fc5715.1717004739.git.jani.nikula@intel.com commit 3ddb4f80990407c3262bde7867d288967b8da6b8 Author: Jani Nikula Date: Wed May 29 20:48:13 2024 +0300 drm/xe/display: reduce includes in compat i915_drv.h Remove some unnecessary includes, and replace xe_device.h with the sufficient xe_device_types.h. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ada73d5e3565b1cc284405386a16cc74d79bbb05.1717004739.git.jani.nikula@intel.com commit d242f39dd10164d3d82e1922277c16c1f3704687 Author: Jani Nikula Date: Wed May 29 20:48:12 2024 +0300 drm/xe/display: move compat runtime pm stubs to the correct file Move things that belong to intel_runtime_pm.h to the correct place. Add missing header guards while at it. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/edefb6ef02920528eacdf01b828cfc45ce55e061.1717004739.git.jani.nikula@intel.com commit b67be58fafb21b6b75f792674ce8f9f5635694d1 Author: Jani Nikula Date: Wed May 29 20:48:11 2024 +0300 drm/xe/display: move compat uncore stubs to the correct file Move things that belong to intel_uncore.h to the correct place. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3f3903c7c5e34aefac0f6d06e433710bc782c97e.1717004739.git.jani.nikula@intel.com commit 208f53102a0b66d5735868c717de32ef49a20050 Author: Jani Nikula Date: Wed May 29 20:48:10 2024 +0300 drm/i915/display: include xe_bo.h, gem_object_types etc. where needed Include what you use. The dependencies on the headers, and what they include, is a bit convoluted. Add xe compat gem/gem_object_types.h. Fix all the places needed. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e9ca3d6127ea22f252d9dbf30cfde99e37538c99.1717004739.git.jani.nikula@intel.com commit 61e22c77ded6dec109d1bfadaf0c4afd27095970 Author: Jani Nikula Date: Wed May 29 20:48:09 2024 +0300 drm/i915/display: include intel_step.h where needed Include what you use. With this, we can drop the include along with xe_step.h from xe compat i915_drv.h. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/abee71a6c6edbd1a3ddf0f97838977e53feaa5ff.1717004739.git.jani.nikula@intel.com commit 37310936c36bd3e4d2a6415f3ca0dc5e1eae899a Author: Jani Nikula Date: Wed May 29 20:48:08 2024 +0300 drm/i915/display: include intel_uncore.h where needed Include what you use. With this, we can drop the include from xe compat i915_drv.h. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bc3a722413e20db905671e58627ba6d757f41c63.1717004739.git.jani.nikula@intel.com commit 8411aa0c5541a1f2f03938c83445e2a1e7ce84a5 Author: Jani Nikula Date: Wed May 29 20:48:07 2024 +0300 drm/i915/display: include i915_gpu_error.h where needed Include what you use. With this, we can drop the include from xe compat i915_drv.h. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a5dbb8d46403761bd8518db45fa71dc55930d3cf.1717004739.git.jani.nikula@intel.com commit 03f8db65ad8616ed8be67efc4379fdd60903235b Author: Jani Nikula Date: Wed May 29 20:48:06 2024 +0300 drm/i915/display: include gt/intel_gt_types.h where needed Include what you use. We need to move the compat intel_gt_types.h under gt subdir. With this, we can drop the include from xe compat i915_drv.h. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/df73c0934ad21f157714a41b33b81cebd2a523a6.1717004739.git.jani.nikula@intel.com commit 27e3b4ee6320b466dec3f6f342ca4b372893b36b Author: Jani Nikula Date: Wed May 29 20:48:05 2024 +0300 drm/i915/display: include gem/i915_gem_stolen.h where needed Include what you use. We need to move the compat i915_gem_stolen.h under gem subdir. With this, we can drop the include from xe compat i915_drv.h. Reviewed-by: Rodrigo Vivi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6ac3480a8689fda5aaf4007cb604e06e939a03f7.1717004739.git.jani.nikula@intel.com commit 0b65365f3fa95c2c5e2094739151a05cabb3c48a Author: Shivaprasad G Bhat Date: Wed Jun 5 13:07:49 2024 +0000 KVM: PPC: Book3S HV nestedv2: Keep nested guest HASHPKEYR in sync The nestedv2 APIs has the guest state element defined for HASHPKEYR for the save-restore with L0. However, its ignored in the code. The patch takes care of this for the HASHPKEYR GSID. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171759286679.1480.17383725118762651985.stgit@linux.ibm.com commit 9a0d2f4995ddde3022c54e43f9ece4f71f76f6e8 Author: Shivaprasad G Bhat Date: Wed Jun 5 13:07:39 2024 +0000 KVM: PPC: Book3S HV: Add one-reg interface for HASHPKEYR register The patch adds a one-reg register identifier which can be used to read and set the virtual HASHPKEYR for the guest during enter/exit with KVM_REG_PPC_HASHPKEYR. The specific SPR KVM API documentation too updated. Signed-off-by: Shivaprasad G Bhat Signed-off-by: Michael Ellerman Link: https://msgid.link/171759285547.1480.12374595786792346073.stgit@linux.ibm.com commit 1e97c1eb785fe2dc863c2bd570030d6fcf4b5e5b Author: Shivaprasad G Bhat Date: Wed Jun 5 13:07:27 2024 +0000 KVM: PPC: Book3S HV nestedv2: Keep nested guest HASHKEYR in sync The nestedv2 APIs has the guest state element defined for HASHKEYR for the save-restore with L0. However, its ignored in the code. The patch takes care of this for the HASHKEYR GSID. Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/171759284380.1480.15665015792935543933.stgit@linux.ibm.com commit e9eb790b25577a15d3f450ed585c59048e4e6c44 Author: Shivaprasad G Bhat Date: Wed Jun 5 13:07:15 2024 +0000 KVM: PPC: Book3S HV: Add one-reg interface for HASHKEYR register The patch adds a one-reg register identifier which can be used to read and set the virtual HASHKEYR for the guest during enter/exit with KVM_REG_PPC_HASHKEYR. The specific SPR KVM API documentation too updated. Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/171759283170.1480.12904332463112769129.stgit@linux.ibm.com commit 2d6be3ca3276ab30fb14f285d400461a718d45e7 Author: Shivaprasad G Bhat Date: Wed Jun 5 13:07:04 2024 +0000 KVM: PPC: Book3S HV nestedv2: Keep nested guest DEXCR in sync The nestedv2 APIs has the guest state element defined for DEXCR for the save-restore with L0. However, its ignored in the code. The patch takes care of this for the DEXCR GSID. Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/171759281060.1480.654592298305141881.stgit@linux.ibm.com commit 1a1e6865f516696adcf6e94f286c7a0f84d78df3 Author: Shivaprasad G Bhat Date: Wed Jun 5 13:06:42 2024 +0000 KVM: PPC: Book3S HV: Add one-reg interface for DEXCR register The patch adds a one-reg register identifier which can be used to read and set the DEXCR for the guest during enter/exit with KVM_REG_PPC_DEXCR. The specific SPR KVM API documentation too updated. Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/171759279613.1480.12873911783530175699.stgit@linux.ibm.com commit 009f6f42c67e9de737d6d3d199f92b21a8cb9622 Author: Shivaprasad G Bhat Date: Wed Jun 5 13:06:28 2024 +0000 KVM: PPC: Book3S HV: Fix the get_one_reg of SDAR The kvmppc_get_one_reg_hv() for SDAR is wrongly getting the SIAR instead of SDAR, possibly a paste error emanating from the previous refactoring. Patch fixes the wrong get_one_reg() for the same. Fixes: ebc88ea7a6ad ("KVM: PPC: Book3S HV: Use accessors for VCPU registers") Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/171759278410.1480.16404209606556979576.stgit@linux.ibm.com commit f9ca6a10be20479d526f27316cc32cfd1785ed39 Author: Shivaprasad G Bhat Date: Wed Jun 5 13:06:16 2024 +0000 KVM: PPC: Book3S HV: Fix the set_one_reg for MMCR3 The kvmppc_set_one_reg_hv() wrongly get() the value instead of set() for MMCR3. Fix the same. Fixes: 5752fe0b811b ("KVM: PPC: Book3S HV: Save/restore new PMU registers") Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/171759276847.1480.16387950124201117847.stgit@linux.ibm.com commit 54ec2bd9e0173b75daf84675d07c56584f96564b Author: Gautam Menghani Date: Wed Jun 5 17:09:10 2024 +0530 KVM: PPC: Book3S HV nestedv2: Fix doorbell emulation Doorbell emulation is broken for KVM on PAPR guests as support for DPDES was not added in the initial patch series. Due to this, a KVM on PAPR guest with SMT > 1 cannot be booted with the XICS interrupt controller as doorbells are setup in the initial probe path when using XICS (pSeries_smp_probe()). Command to replicate the above bug: qemu-system-ppc64 \ -drive file=rhel.qcow2,format=qcow2 \ -m 20G \ -smp 8,cores=1,threads=8 \ -cpu host \ -nographic \ -machine pseries,ic-mode=xics -accel kvm Add doorbell state handling support in the host KVM code to fix doorbell emulation. Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Gautam Menghani Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20240605113913.83715-3-gautam@linux.ibm.com commit 55dfb8bed6fe8bda390cc71cca878d11a9407099 Author: Gautam Menghani Date: Wed Jun 5 17:09:09 2024 +0530 KVM: PPC: Book3S HV nestedv2: Add DPDES support in helper library for Guest state buffer Add support for using DPDES in the library for using guest state buffers. DPDES support is needed for enabling usage of doorbells in a L2 KVM on PAPR guest. Fixes: 6ccbbc33f06a ("KVM: PPC: Add helper library for Guest State Buffers") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Gautam Menghani Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20240605113913.83715-2-gautam@linux.ibm.com commit 22b639253ec046d66c69c54b9d28bb1bd30f3a7a Author: Jeff Johnson Date: Mon May 6 07:22:33 2024 -0700 tracing: Fix trace_pid_list_free() kernel-doc make C=1 reports: kernel/trace/pid_list.c:458: warning: Function parameter or struct member 'pid_list' not described in 'trace_pid_list_free' Add the missing parameter to the trace_pid_list_free() kernel-doc. Link: https://lore.kernel.org/linux-trace-kernel/20240506-trace_pid_list_free-kdoc-v1-1-c70f0ae29144@quicinc.com Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Signed-off-by: Jeff Johnson Signed-off-by: Steven Rostedt (Google) commit 9b6a30febddf4857cb4c367f5294bb6118340e30 Author: Jason Xing Date: Wed Jun 5 10:29:32 2024 +0800 net: allow rps/rfs related configs to be switched After John Sperbeck reported a compile error if the CONFIG_RFS_ACCEL is off, I found that I cannot easily enable/disable the config because of lack of the prompt when using 'make menuconfig'. Therefore, I decided to change rps/rfc related configs altogether. Signed-off-by: Jason Xing Link: https://lore.kernel.org/r/20240605022932.33703-1-kerneljasonxing@gmail.com Signed-off-by: Paolo Abeni commit a1708fda9388c83215f0be82ad47df10be6e1975 Author: Neil Armstrong Date: Thu Jun 6 10:06:58 2024 +0200 ASoC: dt-bindings: convert amlogic,g12a-tohdmitx to dt-schema Convert text bindings to dt-schema format for the Amlogic TX HDMI control glue. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://msgid.link/r/20240606-topic-amlogic-upstream-bindings-convert-g12a-tohdmitx-v2-1-70d44fa30790@linaro.org Signed-off-by: Mark Brown commit 98aa546af5e4f180439c82da403cc77926d3953b Author: Eric Dumazet Date: Tue Jun 4 16:51:50 2024 +0000 inet: remove (struct uncached_list)->quarantine This list is used to tranfert dst that are handled by rt_flush_dev() and rt6_uncached_list_flush_dev() out of the per-cpu lists. But quarantine list is not used later. If we simply use list_del_init(&rt->dst.rt_uncached), this also removes the dst from per-cpu list. This patch also makes the future calls to rt_del_uncached_list() and rt6_uncached_list_del() faster, because no spinlock acquisition is needed anymore. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240604165150.726382-1-edumazet@google.com Signed-off-by: Paolo Abeni commit b4cb4a1391dcdc640c4ade003aaf0ee19cc8d509 Author: Eric Dumazet Date: Tue Jun 4 11:16:03 2024 +0000 net: use unrcu_pointer() helper Toke mentioned unrcu_pointer() existence, allowing to remove some of the ugly casts we have when using xchg() for rcu protected pointers. Also make inet_rcv_compat const. Signed-off-by: Eric Dumazet Cc: Toke Høiland-Jørgensen Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20240604111603.45871-1-edumazet@google.com Signed-off-by: Paolo Abeni commit c830ead0d16131de93d2020369ede4d670a4123b Author: Xianwei Zhao Date: Wed May 29 11:10:35 2024 +0800 arm64: dts: amlogic: a4: add power domain controller node Add power domain controller node for Amlogic A4 SoC Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240529-a4_secpowerdomain-v2-3-47502fc0eaf3@amlogic.com Signed-off-by: Neil Armstrong commit 4c607a73300b756ad1c8001abcfe37bf53b5a5f1 Merge: 1d1239a1b0e50 5bbe5872fed44 Author: Neil Armstrong Date: Thu Jun 6 11:19:47 2024 +0200 Merge branch 'dt' of https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm into v6.11/arm64-dt Signed-off-by: Neil Armstrong commit 1d1239a1b0e502faffe43b97d530232285b9f061 Author: Christian Hewitt Date: Thu Jun 6 09:06:15 2024 +0000 arm64: dts: meson: radxa-zero2: add pwm-fan support The A311D on Zero2 needs active cooling and the board includes a header to connect a simple fan. Add pwm-fan support with basic thermal properties so the fan runs when connected. Suggested-by: Yuntian Zhang Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240606090615.3946433-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit f6386b5afa81724164263c30c48de733e0aab74c Author: Christian Hewitt Date: Tue Jun 4 08:41:34 2024 +0000 arm64: dts: meson: add GXLX/S905L/p271 support Add a device-tree for the GXLX Amlogic P271 (S905L) reference design board. This is a low-cost design similar to P281 (S905W) but with silicon differences to omit VP9 and use Mali 450-MP2 (not MP3). The SoC is marked with S905L and "2" (believed to denote MP2) resulting in chip distributor stock lists and Android STB marketing sometimes describing it as an S905L2 chip. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604084134.3315841-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit f36596adb56f0381c0c46c5fab23ffd201f7e646 Author: Christian Hewitt Date: Tue Jun 4 08:41:33 2024 +0000 dt-bindings: arm: amlogic: add GXLX/S905L/p271 reference board Add support for an Amlogic GXLX based S905L SoC and P271 reference design board. The S905L is a low-cost design similar to the P281 (S905W) and is similarly derived from P212 (S905X). However S905L omits support for the VP9 codec and uses Mali 450-MP2 (not MP3). Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604084134.3315841-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 6c9b5ba73ca77ef3863cda6560856fdfe7dc237a Author: Arnd Bergmann Date: Tue May 28 15:31:59 2024 +0200 arm64: dts: amlogic: ad402: move thermal-zones to top node It appears that this accidentally got added into the spi node, causing a warning. arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts:119.16-161.4: Warning (spi_bus_reg): /soc/spi@fd000400/thermal-zones: missing or empty reg property Fixes: 593ab951232b ("arm64: dts: amlogic: ad402: setup thermal-zones") Signed-off-by: Arnd Bergmann Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240528133215.2266419-1-arnd@kernel.org Signed-off-by: Neil Armstrong commit 2faaab64de0e89697e01f1a0c5d401ea74d52447 Author: Viacheslav Bocharov Date: Tue Jun 4 17:04:51 2024 +0300 soc: amlogic: meson-gx-socinfo: add new A113X SoC id Add new definition for Amlogix A113X SoC found in JetHub D1/D1+ devices: soc soc0: Amlogic Meson AXG (A113X) Revision 25:b (43:2) Detected Signed-off-by: Viacheslav Bocharov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604140612.1179323-1-adeep@lexina.in Signed-off-by: Neil Armstrong commit d1d0f1f6ff6013211e3ee00237e4cc25ad0cd64b Author: Christian Hewitt Date: Tue Jun 4 05:07:52 2024 +0000 soc: amlogic: meson-gx-socinfo: Add S905L ID Add the S905L SoC ID observed in several P271 boards: kernel: soc soc0: Amlogic Meson GXLX (S905L) Revision 26:a (c1:2) Detected Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240604050752.3312468-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 101388b8ef1027be72e399beeb97293cce67bb24 Author: Primoz Fiser Date: Thu Jun 6 08:58:47 2024 +0200 cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe() Handle deferred probing gracefully by using dev_err_probe() to not spam console with unnecessary error messages. Fixes: f88d152dc739 ("cpufreq: ti: Migrate to dev_pm_opp_set_config()") Signed-off-by: Primoz Fiser Signed-off-by: Viresh Kumar commit 9d262f35b1155d6f56b6fd1dc054ec218e42696b Author: Jeff Johnson Date: Tue Jun 4 15:10:23 2024 -0700 HID: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-a4tech.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-apple.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-aureal.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-belkin.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-betopff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-bigbenff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-cherry.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-chicony.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-cypress.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-dr.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-emsff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-elecom.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-elo.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-evision.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-ezkey.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-vivaldi-common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-google-hammer.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-google-stadiaff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-gyration.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-holtek-kbd.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-holtek-mouse.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-ite.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-kensington.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-keytouch.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-kye.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lcpower.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lenovo.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-logitech.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-magicmouse.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-maltron.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-mf.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-megaworld.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-microsoft.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-monterey.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-ntrig.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-ortek.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-prodikeys.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-pl.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-petalynx.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-primax.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-razer.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-redragon.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-retrode.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-saitek.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-samsung.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-semitek.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-sjoy.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-sony.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-speedlink.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-steam.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-steelseries.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-sunplus.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-gaff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-tmff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-tivo.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-topseed.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-twinhan.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-uclogic.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-xinmo.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-zpff.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-zydacron.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-viewsonic.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-waltop.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-winwing.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Note: All HID drivers that had explicit entries in the MAINTAINERS file were fixed individually. This patch fixes all remaining HID drivers that fall under the generic "HID CORE LAYER" entry in the MAINTAINERS file. Almost all descriptions were taken from the header comment in each file. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240604-md-hid-misc-v1-1-4f9560796f3c@quicinc.com Signed-off-by: Benjamin Tissoires commit ece3941821cf599af6454d8111b0169a29f08c4d Author: Jeff Johnson Date: Tue Jun 4 08:34:01 2024 -0700 HID: logitech-dj: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-logitech-dj.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240604-md-hid-logitech-dj-v1-1-560f6b3cb54b@quicinc.com Signed-off-by: Benjamin Tissoires commit e52a7d0562d89459c12fe17ed78cd2f40c854e10 Author: Jeff Johnson Date: Tue Jun 4 07:33:01 2024 -0700 HID: lg-g15: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-lg-g15.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240604-md-hid-lg-g15-v1-1-265b094db089@quicinc.com Signed-off-by: Benjamin Tissoires commit fae5d8433db235801c3915be63a0325d444d0593 Author: Jeff Johnson Date: Tue Jun 4 07:20:47 2024 -0700 HID: letsketch: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-letsketch.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240604-md-hid-letsketch-v1-1-ff38ae7b4cb0@quicinc.com Signed-off-by: Benjamin Tissoires commit 3c28b239620e249b68beeca17f429e317fa6b8d4 Author: Haoran Liu Date: Wed Nov 29 03:34:05 2023 -0800 drm/meson: plane: Add error handling This patch adds robust error handling to the meson_plane_create function in drivers/gpu/drm/meson/meson_plane.c. The function previously lacked proper handling for potential failure scenarios of the drm_universal_plane_init call. Signed-off-by: Haoran Liu Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231129113405.33057-1-liuhaoran14@163.com [narmstrong: fixe the commit subject] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231129113405.33057-1-liuhaoran14@163.com commit 59d0f48160f54c5d0d7f0aba110be2e0f2569296 Merge: 7da375e2c7e02 966726324b7b1 Author: Paolo Abeni Date: Thu Jun 6 10:00:01 2024 +0200 Merge branch 'improve-gbeth-performance-on-renesas-rz-g2l-and-related-socs' Paul Barker says: ==================== Improve GbEth performance on Renesas RZ/G2L and related SoCs This series aims to improve performance of the GbEth IP in the Renesas RZ/G2L SoC family and the RZ/G3S SoC, which use the ravb driver. Along the way, we do some refactoring and ensure that napi_complete_done() is used in accordance with the NAPI documentation for both GbEth and R-Car code paths. Much of the performance improvement comes from enabling SW IRQ Coalescing for all SoCs using the GbEth IP, and NAPI Threaded mode for single core SoCs using the GbEth IP. These can be enabled/disabled at runtime via sysfs, but our goal is to set sensible defaults which get good performance on the affected SoCs. The rest of the performance improvement comes from using a page pool to allocate RX buffers, and reducing the allocation size from >8kB to 2kB. The overall performance impact of this patch series seen in testing with iperf3 is as follows (see patches 5-7 for more detailed results): * RZ/G2L: * TCP TX: +1.8% bandwidth * TCP RX: +1% bandwidth at 47% less CPU load * UDP RX: +1% bandwidth at 26% less CPU load * RZ/G2UL: * TCP TX: +37% bandwidth * TCP RX: +43% bandwidth * UDP TX: -8% bandwidth * UDP RX: +32500% bandwidth (!) * RZ/G3S: * TCP TX: +25% bandwidth * TCP RX: +76% bandwidth * UDP TX: -9% bandwidth * UDP RX: +37900% bandwidth (!) * RZ/Five: * TCP TX: +18% bandwidth * TCP RX: +212% bandwidth * UDP TX: +2% bandwidth * UDP RX: +inf bandwidth (test no longer crashes) There is no significant impact on bandwidth or CPU load in testing on RZ/G2H or R-Car M3N. Fixing the crash in UDP RX testing for RZ/Five is a cumulative effect of patches 1, 2, 5 & 6 so this is very difficult to break out as a bugfix for backporting. Changes v4->v5: * Added Sergey's Reviewed-by tags. * Improved the commit message for patch 2/7. * Re-wrapped to 80 cols, except where this would significantly impact readability. * Use lower case `skb` consistently in comments. * Included in ravb.h. * Moved rx_buffer_size so it is in the same place in ravb_hw_info as rx_max_desc_use was previously. * Used reverse xmas tree ordering in variable declarations. * Split lines after binary operators, instead of before. * Factor subtraction of sizeof(__sum16) out of the if condition in ravb_rx_csum_gbeth(). * Add blank lines after variable declarations where needed. * Used goto instead of break to handle napi_build_skb() failure in ravb_rx_gbeth(). Break was incorrectly scoped to the surrounding switch statement, when it's the outer loop we really want to break out of. * Used continue instead of break to handle NULL priv->rx_1st_skb in ravb_rx_gbeth() as we may still be able to process further descriptors. * Unconditionally set priv->rx_1st_skb = NULL after processing a packet in ravb_rx_gbeth(). We don't need to check die_dt as this will be a no-op for single descriptor packets. * Moved napi_build_skb() call after dma_sync_single_for_cpu() in ravb_rx_rcar() to align the order of operations with ravb_rx_gbeth() and ensure the data is sync'd before it is accessed. * Moved zeroing of rx_buff->page to the end of packet processing in ravb_rx_rcar() to align the order of operations with ravb_rx_gbeth(). Changes v3->v4: * Dependency patches have merged so this is no longer an RFC. * Fixed update of stats->rx_packets. * Simplified refactoring following feedback from Niklas and Sergey. * Renamed needs_irq_coalesce -> coalesce_irqs. * Used a separate page pool for each RX queue. * Passed struct ravb_rx_desc to ravb_alloc_rx_buffer() so that we can simplify the calling function. * Explained the calculation of rx_desc->ds_cc. * Added handling of nonlinear SKBs in ravb_rx_csum_gbeth(). * Used Niklas' suggested commit message for patch 2/7. * Added Sergey's Reviewed-by tags to patches 5/7 and 6/7. Changes v2->v3: * Incorporated feedback on RFC v2 from Sergey. * Split out bugfixes and rebased. This changed the order of what was the first 5 patches of v2 and things look a little different so I've not picked up Reviewed-by tags from v2. * Further refactoring and tidy up of RX ring refill and ravb_rx_gbeth(). * Switched to using a page pool to allocate RX buffers. * Re-tested and provided updated performance figures. Changes v1->v2: * Marked as RFC as the series depends on unmerged patches. * Refactored R-Car code paths as well as GbEth code paths. * Updated references to the patches this series depends on. ==================== Link: https://lore.kernel.org/r/20240604072825.7490-1-paul.barker.ct@bp.renesas.com Signed-off-by: Paolo Abeni commit 966726324b7b14009216fda33b47e0bc003944c6 Author: Paul Barker Date: Tue Jun 4 08:28:25 2024 +0100 net: ravb: Allocate RX buffers via page pool This patch makes multiple changes that can't be separated: 1) Allocate plain RX buffers via a page pool instead of allocating SKBs, then use build_skb() when a packet is received. 2) For GbEth IP, reduce the RX buffer size to 2kB. 3) For GbEth IP, merge packets which span more than one RX descriptor as SKB fragments instead of copying data. Implementing (1) without (2) would require the use of an order-1 page pool (instead of an order-0 page pool split into page fragments) for GbEth. Implementing (2) without (3) would leave us no space to re-assemble packets which span more than one RX descriptor. Implementing (3) without (1) would not be possible as the network stack expects to use put_page() or page_pool_put_page() to free SKB fragments after an SKB is consumed. RX checksum offload support is adjusted to handle both linear and nonlinear (fragmented) packets. This patch gives the following improvements during testing with iperf3. * RZ/G2L: * TCP RX: same bandwidth at -43% CPU load (70% -> 40%) * UDP RX: same bandwidth at -17% CPU load (88% -> 74%) * RZ/G2UL: * TCP RX: +30% bandwidth (726Mbps -> 941Mbps) * UDP RX: +417% bandwidth (108Mbps -> 558Mbps) * RZ/G3S: * TCP RX: +64% bandwidth (562Mbps -> 920Mbps) * UDP RX: +420% bandwidth (90Mbps -> 468Mbps) * RZ/Five: * TCP RX: +217% bandwidth (145Mbps -> 459Mbps) * UDP RX: +470% bandwidth (20Mbps -> 114Mbps) There is no significant impact on bandwidth or CPU load in testing on RZ/G2H or R-Car M3N. Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit 65c482bc226ab25a7884ee6fd1cc09bb08cbd1be Author: Paul Barker Date: Tue Jun 4 08:28:24 2024 +0100 net: ravb: Use NAPI threaded mode on 1-core CPUs with GbEth IP NAPI Threaded mode (along with the previously enabled SW IRQ Coalescing) is required to improve network stack performance for single core SoCs using the GbEth IP (currently the RZ/G2L SoC family and the RZ/G3S SoC). This patch gives the following improvements during testing with iperf3. * RZ/G2UL: * TCP TX: +32% bandwidth (638Mbps -> 841Mbps) * TXP RX: +8.8% bandwidth (667Mbps -> 726Mbps) * UDP RX: +104% bandwidth (53Mbps -> 108Mbps) * RZ/G3S: * TCP TX: 29% bandwidth (529Mbps -> 681Mbps) * UDP RX: +1290% bandwidth (6.46Mbps -> 90Mbps) * RZ/Five: * UDP RX: Test no longer crashes (0 -> 20 Mbps) This patch gives the following reductions in performance in the same testing: * RZ/G2UL: * UDP TX: -7.5% bandwidth (594Mbps -> 549Mbps) * RZ/G3S: * UDP TX: -5% bandwidth (625Mbps -> 594Mbps) These losses are considered acceptable given the benefits shown above. If UDP TX bandwidth must be maximised for a particular use case, NAPI threaded mode can be disabled at runtime via sysfs writes. The improvement of UDP RX bandwidth for the single core SoCs (RZ/G2UL & RZ/G3S) is particularly critical. Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit 7b39c1814ce3bcdf95d026bbb27322218840a27d Author: Paul Barker Date: Tue Jun 4 08:28:23 2024 +0100 net: ravb: Enable SW IRQ Coalescing for GbEth Software IRQ Coalescing is required to improve network stack performance in the RZ/G2L SoC family and the RZ/G3S SoC, i.e. the SoCs which use the GbEth IP. This patch gives the following improvements during testing with iperf3: * RZ/G2L: * TCP RX: same bandwidth with -6% CPU load (76% -> 71%) * UDP RX: same bandwidth with -10% CPU load (99% -> 89%) * RZ/G2UL: * UDP RX: +4200% bandwidth (1.23Mbps -> 53Mbps) * RZ/G3S: * UDP RX: +425% bandwidth (1.23Mbps -> 6.46Mbps) The improvement of UDP RX bandwidth for the single core SoCs (RZ/G2UL & RZ/G3S) is particularly critical. Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit 3ee43f09cb2cd7643d5a4bfbc78a9f75f6a563af Author: Paul Barker Date: Tue Jun 4 08:28:22 2024 +0100 net: ravb: Refactor GbEth RX code path We can reduce code duplication in ravb_rx_gbeth(). Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit 37a01c12e9e89fe2545657d7b42ca2de9c780c45 Author: Paul Barker Date: Tue Jun 4 08:28:21 2024 +0100 net: ravb: Refactor RX ring refill To reduce code duplication, we add a new RX ring refill function which can handle both the initial RX ring population (which was split between ravb_ring_init() and ravb_ring_format()) and the RX ring refill after polling (in ravb_rx()). Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit b0e0e20dc60e9e37b7e5bc71f0c912f66ad75529 Author: Paul Barker Date: Tue Jun 4 08:28:20 2024 +0100 net: ravb: Align poll function with NAPI docs Align ravb_poll() with the documentation in `Documentation/networking/kapi.rst` and `Documentation/networking/napi.rst`. The documentation says that we should prefer napi_complete_done() over napi_complete(), and using the former allows us to properly support busy polling. We should ensure that napi_complete_done() is only called if the work budget has not been exhausted, and we should only re-arm interrupts if it returns true. Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit 118e640af30c1355cfea1eeaa2960dc9331ee3db Author: Paul Barker Date: Tue Jun 4 08:28:19 2024 +0100 net: ravb: Simplify poll & receive functions We don't need to pass the work budget to ravb_rx() by reference, it's cleaner to pass this by value and return the amount of work done. This allows us to simplify the ravb_poll() function and use the common `work_done` variable name seen in other network drivers for consistency and ease of understanding. This is a pure refactor and should not affect behaviour. Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni commit b81881b9c10e1f5eafc02df026663b824610d537 Author: Danny Kaehn Date: Wed Jun 5 18:12:45 2024 -0500 HID: usbhid: Share USB device firmware node with child HID device USB HID core now shares its fwnode with its child HID device. Since there can only be one HID device on a USB interface, it is redundant to specify a hid node under the USB device. This allows usb HID device drivers to be described in firmware and make use of device properties. Signed-off-by: Danny Kaehn Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240605-cp2112-dt-v11-2-d55f0f945a62@plexus.com Signed-off-by: Benjamin Tissoires commit 9aa61d8ecb7f6f176ff8247a41a4f6eea8376112 Author: Clément Le Goffic Date: Wed Jun 5 16:04:53 2024 +0200 perf: parse-events: Fix compilation error while defining DEBUG_PARSER Compiling perf tool with 'DEBUG_PARSER=1' leads to errors: $> make -C tools/perf PARSER_DEBUG=1 NO_LIBTRACEEVENT=1 ... CC util/expr-flex.o CC util/expr.o util/parse-events.c:33:12: error: redundant redeclaration of ‘parse_events_debug’ [-Werror=redundant-decls] 33 | extern int parse_events_debug; | ^~~~~~~~~~~~~~~~~~ In file included from util/parse-events.c:18: util/parse-events-bison.h:43:12: note: previous declaration of ‘parse_events_debug’ with type ‘int’ 43 | extern int parse_events_debug; | ^~~~~~~~~~~~~~~~~~ util/expr.c:27:12: error: redundant redeclaration of ‘expr_debug’ [-Werror=redundant-decls] 27 | extern int expr_debug; | ^~~~~~~~~~ In file included from util/expr.c:11: util/expr-bison.h:43:12: note: previous declaration of ‘expr_debug’ with type ‘int’ 43 | extern int expr_debug; | ^~~~~~~~~~ cc-1: all warnings being treated as errors Remove extern declaration from the parse-envents.c file as there is a conflict with the ones generated using bison and yacc tools from the file parse-events.[ly]. Signed-off-by: Clément Le Goffic Reviewed-by: Ian Rogers Cc: James Clark Cc: John Garry Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240605140453.614862-1-clement.legoffic@foss.st.com commit f1180fd2a7c039691b64ebf404c746a74e40b7b0 Author: Wei Yang Date: Wed Jun 5 07:13:39 2024 +0000 mm/mm_init.c: not always search next deferred_init_pfn from very beginning In function deferred_init_memmap(), we call deferred_init_mem_pfn_range_in_zone() to get the next deferred_init_pfn. But we always search it from the very beginning. Since we save the index in i, we can leverage this to search from i next time. [rppt refine the comment] Signed-off-by: Wei Yang Link: https://lore.kernel.org/all/20240605071339.15330-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 544b8e14c24b1f1927659e546d008d678e77e19c Author: Wei Yang Date: Wed Jun 5 07:13:38 2024 +0000 mm/mm_init.c: use deferred_init_mem_pfn_range_in_zone() to decide loop condition If deferred_init_mem_pfn_range_in_zone() return true, we know it finds some range in (spfn, epfn). Then we can use it directly for the loop condition. Signed-off-by: Wei Yang Reviewed-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/all/20240605071339.15330-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit ce8ebb95439459f7e24b02c6943e278f46d2d328 Author: Wei Yang Date: Wed Jun 5 07:13:37 2024 +0000 mm/mm_init.c: get the highest zone directly We have recorded nr_zones in pgdat, just get it directly. Signed-off-by: Wei Yang Reviewed-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/all/20240605071339.15330-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 7da375e2c7e023957b71fce44a72107559cfa6d0 Merge: ed20142ed68c2 14ae2fd12be8c Author: Jakub Kicinski Date: Wed Jun 5 20:13:10 2024 -0700 Merge branch 'net-mlx5e-shampo-enable-hw-gro-once-more' Tariq Toukan says: ==================== net/mlx5e: SHAMPO, Enable HW GRO once more This series enables hardware GRO for ConnectX-7 and newer NICs. SHAMPO stands for Split Header And Merge Payload Offload. The first part of the series contains important fixes and improvements. The second part reworks the HW GRO counters. Lastly, HW GRO is perf optimized and enabled. Here are the bandwidth numbers for a simple iperf3 test over a single rq where the application and irq are pinned to the same CPU: +---------+--------+--------+-----------+-------------+ | streams | SW GRO | HW GRO | Unit | Improvement | +---------+--------+--------+-----------+-------------+ | 1 | 36 | 57 | Gbits/sec | 1.6 x | | 4 | 34 | 50 | Gbits/sec | 1.5 x | | 8 | 31 | 43 | Gbits/sec | 1.4 x | +---------+--------+--------+-----------+-------------+ Benchmark details: VM based setup CPU: Intel(R) Xeon(R) Platinum 8380 CPU, 24 cores NIC: ConnectX-7 100GbE iperf3 and irq running on same CPU over a single receive queue ==================== Link: https://lore.kernel.org/r/20240603212219.1037656-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 14ae2fd12be8c5089e43fee8a21cd8631699b97a Author: Dragos Tatulea Date: Tue Jun 4 00:22:19 2024 +0300 net/mlx5e: SHAMPO, Coalesce skb fragments to page size When doing hardware GRO (SHAMPO), the driver puts each data payload of a packet from the wire into one skb fragment. TCP Zero-Copy expects page sized skb fragments to be able to do it's page-flipping magic. With the current way of arranging fragments by the driver, only specific MTUs (page sized multiple + header size) will yield such page sized fragments in a high percentage. This change improves payload arrangement in the skb for hardware GRO by coalescing payloads into a single skb fragment when possible. To demonstrate the fix, running tcp_mmap with a MTU of 1500 yields: - Before: 0 % bytes mmap'ed - After : 81 % bytes mmap'ed More importantly, coalescing considerably improves the HW GRO performance. Here are the results for a iperf3 bandwidth benchmark: +---------+--------+--------+------------------------+-----------+ | streams | SW GRO | HW GRO | HW GRO with coalescing | Unit | |---------+--------+--------+------------------------+-----------| | 1 | 36 | 42 | 57 | Gbits/sec | | 4 | 34 | 39 | 50 | Gbits/sec | | 8 | 31 | 35 | 43 | Gbits/sec | +---------+--------+--------+------------------------+-----------+ Benchmark details: VM based setup CPU: Intel(R) Xeon(R) Platinum 8380 CPU, 24 cores NIC: ConnectX-7 100GbE iperf3 and irq running on same CPU over a single receive queue Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-15-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 99be56171fa9ffea494dfe3d4a7f6e7e51630c2e Author: Yoray Zack Date: Tue Jun 4 00:22:18 2024 +0300 net/mlx5e: SHAMPO, Re-enable HW-GRO Add back HW-GRO to the reported features. As the current implementation of HW-GRO uses KSMs with a specific fixed buffer size (256B) to map its headers buffer, we reported the feature only if the NIC is supporting KSM and the minimum value for buffer size is below the requested one. iperf3 bandwidth comparison: +---------+--------+--------+-----------+ | streams | SW GRO | HW GRO | Unit | |---------+--------+--------+-----------| | 1 | 36 | 42 | Gbits/sec | | 4 | 34 | 39 | Gbits/sec | | 8 | 31 | 35 | Gbits/sec | +---------+--------+--------+-----------+ A downstream patch will add skb fragment coalescing which will improve performance considerably. Benchmark details: VM based setup CPU: Intel(R) Xeon(R) Platinum 8380 CPU, 24 cores NIC: ConnectX-7 100GbE iperf3 and irq running on same CPU over a single receive queue Signed-off-by: Yoray Zack Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-14-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 758191c9ea7bcc45dd99398a538ae4ab27c4029e Author: Yoray Zack Date: Tue Jun 4 00:22:17 2024 +0300 net/mlx5e: SHAMPO, Use KSMs instead of KLMs KSM Mkey is KLM Mkey with a fixed buffer size. Due to this fact, it is a faster mechanism than KLM. SHAMPO feature used KLMs Mkeys for memory mappings of its headers buffer. As it used KLMs with the same buffer size for each entry, we can use KSMs instead. This commit changes the Mkeys that map the SHAMPO headers buffer from KLMs to KSMs. Signed-off-by: Yoray Zack Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-13-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit e95c5b9e89126703de8212ed8e50b185a1f970bb Author: Tariq Toukan Date: Tue Jun 4 00:22:16 2024 +0300 net/mlx5e: SHAMPO, Add header-only ethtool counters for header data split Count the number of header-only packets and bytes from SHAMPO. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-12-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 16f448d47a86825a421fc1211336454c42c5254f Author: Dragos Tatulea Date: Tue Jun 4 00:22:15 2024 +0300 net/mlx5e: SHAMPO, Drop rx_gro_match_packets counter After modifying rx_gro_packets to be more accurate, the rx_gro_match_packets counter is redundant. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-11-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 8f9eb8bb5c5af846a8b1729bd7778d08ca852379 Author: Dragos Tatulea Date: Tue Jun 4 00:22:14 2024 +0300 net/mlx5e: SHAMPO, Make GRO counters more precise Don't count non GRO packets. A non GRO packet is a packet with a GRO cb count of 1. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-10-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit f5a699e00f045856b55a60ebf57e367fca389910 Author: Yoray Zack Date: Tue Jun 4 00:22:13 2024 +0300 net/mlx5e: SHAMPO, Skipping on duplicate flush of the same SHAMPO SKB SHAMPO SKB can be flushed in mlx5e_shampo_complete_rx_cqe(). If the SKB was flushed, rq->hw_gro_data->skb was also set to NULL. We can skip on flushing the SKB in mlx5e_shampo_flush_skb if rq->hw_gro_data->skb == NULL. Signed-off-by: Yoray Zack Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d34d7d1973c4d1125c430a9612d97bfc10cf6382 Author: Dragos Tatulea Date: Tue Jun 4 00:22:12 2024 +0300 net/mlx5e: SHAMPO, Specialize mlx5e_fill_skb_data() mlx5e_fill_skb_data() used to have multiple callers. But after the XDP multibuf refactoring from commit 2cb0e27d43b4 ("net/mlx5e: RX, Prepare non-linear striding RQ for XDP multi-buffer support") the SHAMPO code path is the only caller. Take advantage of this and specialize the function: - Drop the redundant check. - Assume that data_bcnt is > 0. This is needed in a downstream patch. Rename the function as well to make things clear. Signed-off-by: Dragos Tatulea Suggested-by: Tariq Toukan Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-8-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit e839ac9a89cb3bf1aa1652676fa3d6c79810e55d Author: Dragos Tatulea Date: Tue Jun 4 00:22:11 2024 +0300 net/mlx5e: SHAMPO, Simplify header page release in teardown The function that releases SHAMPO header pages (mlx5e_shampo_dealloc_hd) has some complicated logic that comes from the fact that it is called twice during teardown: 1) To release the posted header pages that didn't get any completions. 2) To release all remaining header pages. This flow is not necessary: all header pages can be released from the driver side in one go. Furthermore, the above flow is buggy. Taking the 8 headers per page example: 1) Release fragments 5-7. Page will be released. 2) Release remaining fragments 0-4. The bits in the header will indicate that the page needs releasing. But this is incorrect: page was released in step 1. This patch releases all header pages in one go. This simplifies the header page cleanup function. For consistency, the datapath header page release API (mlx5e_free_rx_shampo_hd_entry()) is used. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 083dbb54c4809bcd56c5c09360ee8c7760a55d71 Author: Dragos Tatulea Date: Tue Jun 4 00:22:10 2024 +0300 net/mlx5e: SHAMPO, Disable gso_size for non GRO packets When HW GRO is enabled, forwarding of packets is broken due to gso_size being set incorrectly on non GRO packets. Non GRO packets have a skb GRO count of 1. mlx5 always sets gso_size on the skb, even for non GRO packets. It leans on the fact that gso_size is normally reset in napi_gro_complete(). But this happens only for packets from GRO'able protocols (TCP/UDP) that have a gro_receive() handler. The problematic scenarios are: 1) Non GRO protocol packets are received, validate_xmit_skb() will drop them (see EPROTONOSUPPORT in skb_mac_gso_segment()). The fix for this case would be to not set gso_size at all for SHAMPO packets with header size 0. 2) Packets from a GRO'ed protocol (TCP) are received but immediately flushed because they are not GRO'able (TCP SYN for example). mlx5e_shampo_update_hdr(), which updates the remaining GRO state on the skb, is not called because skb GRO count is 1. The fix here would be to always call mlx5e_shampo_update_hdr(), regardless of skb GRO count. But this call is expensive The unified fix for both cases is to reset gso_size before calling napi_gro_receive(). It is a change that is more effective (no call to mlx5e_shampo_update_hdr() necessary) and simple (smallest code footprint). Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit a64bbd8c286fa67319df73ce842e3f6c7b08b6f6 Author: Dragos Tatulea Date: Tue Jun 4 00:22:09 2024 +0300 net/mlx5e: SHAMPO, Fix FCS config when HW GRO on For the following scenario: ethtool --features eth3 rx-gro-hw on ethtool --features eth3 rx-fcs on ethtool --features eth3 rx-fcs off ... there is a firmware error because the driver enables HW GRO first while FCS is still enabled. This patch fixes this by swapping the order of HW GRO and FCS for this specific case. Take LRO into consideration as well for consistency. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit fba8334721e266f92079632598e46e5f89082f30 Author: Dragos Tatulea Date: Tue Jun 4 00:22:08 2024 +0300 net/mlx5e: SHAMPO, Fix invalid WQ linked list unlink When all the strides in a WQE have been consumed, the WQE is unlinked from the WQ linked list (mlx5_wq_ll_pop()). For SHAMPO, it is possible to receive CQEs with 0 consumed strides for the same WQE even after the WQE is fully consumed and unlinked. This triggers an additional unlink for the same wqe which corrupts the linked list. Fix this scenario by accepting 0 sized consumed strides without unlinking the WQE again. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 70bd03b89f20b9bbe51a7f73c4950565a17a45f7 Author: Dragos Tatulea Date: Tue Jun 4 00:22:07 2024 +0300 net/mlx5e: SHAMPO, Fix incorrect page release Under the following conditions: 1) No skb created yet 2) header_size == 0 (no SHAMPO header) 3) header_index + 1 % MLX5E_SHAMPO_WQ_HEADER_PER_PAGE == 0 (this is the last page fragment of a SHAMPO header page) a new skb is formed with a page that is NOT a SHAMPO header page (it is a regular data page). Further down in the same function (mlx5e_handle_rx_cqe_mpwrq_shampo()), a SHAMPO header page from header_index is released. This is wrong and it leads to SHAMPO header pages being released more than once. Signed-off-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 4e92d247418c36ed35e9d98b153637828f9882a3 Author: Tariq Toukan Date: Tue Jun 4 00:22:06 2024 +0300 net/mlx5e: SHAMPO, Use net_prefetch API Let the SHAMPO functions use the net-specific prefetch API, similar to all other usages. Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20240603212219.1037656-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 04ca0a51f1e63bd553fd4af8e9af0fe094fa4f0a Author: Ben Walsh Date: Wed Jun 5 07:33:51 2024 +0100 platform/chrome: cros_ec_lpc: Add quirks for Framework Laptop For Framework Laptops with Microchip EC (MEC), use the ACPI id "PNP0C09" to find the ACPI device, and AML mutex "ECMT" to protect EC memory access. Tested-by: Dustin L. Howett Signed-off-by: Ben Walsh Link: https://lore.kernel.org/r/20240605063351.14836-6-ben@jubnut.com Signed-off-by: Tzung-Bi Shih commit 38c31b1d737ba4cab571dbf9090a1cabf164bea2 Author: Ben Walsh Date: Wed Jun 5 07:33:50 2024 +0100 platform/chrome: cros_ec_lpc: Add a new quirk for AML mutex Add a new quirk "CROS_EC_LPC_QUIRK_AML_MUTEX" which provides the name of an AML mutex to protect MEC memory access. Tested-by: Dustin L. Howett Signed-off-by: Ben Walsh Link: https://lore.kernel.org/r/20240605063351.14836-5-ben@jubnut.com Signed-off-by: Tzung-Bi Shih commit 040159e0912c31fe959d8671f9700bda105ab63a Author: Ben Walsh Date: Wed Jun 5 07:33:49 2024 +0100 platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id Framework Laptops' ACPI exposes the EC with id "PNP0C09". But "PNP0C09" is part of the ACPI standard; there are lots of computers with EC chips with this id, and most of them don't support the cros_ec protocol. The driver could find the ACPI device by having "PNP0C09" in the acpi_match_table, but this would match devices which don't support the cros_ec protocol. Instead, add a new quirk "CROS_EC_LPC_QUIRK_ACPI_ID" which allows the id to be specified. This quirk is applied after the DMI check shows that the device is supported. Tested-by: Dustin L. Howett Signed-off-by: Ben Walsh Link: https://lore.kernel.org/r/20240605063351.14836-4-ben@jubnut.com Signed-off-by: Tzung-Bi Shih commit 60c7df66450e3a7821a8d68496c20c95de6a15c5 Author: Ben Walsh Date: Wed Jun 5 07:33:48 2024 +0100 platform/chrome: cros_ec_lpc: MEC access can use an AML mutex Framework Laptops have ACPI code which accesses the MEC memory. It uses an AML mutex to prevent concurrent access. But the cros_ec_lpc driver was not aware of this mutex. The ACPI code and LPC driver both attempted to talk to the EC at the same time, messing up communication with the EC. Allow the LPC driver MEC code to find and use the AML mutex. Tested-by: Dustin L. Howett Signed-off-by: Ben Walsh Link: https://lore.kernel.org/r/20240605063351.14836-3-ben@jubnut.com Signed-off-by: Tzung-Bi Shih commit 68dbac0a58ef7d82bc78dcb7e5ab5db2c6dfb489 Author: Ben Walsh Date: Wed Jun 5 07:33:47 2024 +0100 platform/chrome: cros_ec_lpc: MEC access can return error code cros_ec_lpc_io_bytes_mec was returning a u8 checksum of all bytes read/written, which didn't leave room to indicate errors. Change this u8 to an int where negative values indicate an error, and non-negative values are the checksum as before. Tested-by: Dustin L. Howett Signed-off-by: Ben Walsh Link: https://lore.kernel.org/r/20240605063351.14836-2-ben@jubnut.com Signed-off-by: Tzung-Bi Shih commit ca4afdfdbbbd64cc08eee834bee97596bb649413 Author: Raymond Hackley Date: Sat Jun 1 11:54:32 2024 +0000 arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add PMIC and charger The phones listed below have Richtek RT5033 PMIC and charger. Add them to the device trees. - Samsung Galaxy Core Prime LTE - Samsung Galaxy Grand Prime Cc: Jakob Hauser Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240601115321.25314-4-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 834cfba67835ff2440ef7402e1448a40d3c61250 Author: Raymond Hackley Date: Sat Jun 1 11:54:14 2024 +0000 arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add S3FWRN5 NFC Some variants of Samsung Galaxy Core Prime LTE / Grand Prime LTE have a Samsung S3FWRN5 NFC chip that works quite well with the s3fwrn5 driver in the Linux NFC subsystem. The clock setup for the NFC chip is a bit special (although this seems to be a common approach used for Qualcomm devices with NFC): The NFC chip has an output GPIO that is asserted whenever the clock is needed to function properly. On the A3/A5 this is wired up to PM8916 GPIO2, which is then configured with a special function (NFC_CLK_REQ or BB_CLK2_REQ). Enabling the rpmcc RPM_SMD_BB_CLK2_PIN clock will then instruct PM8916 to automatically enable the clock whenever the NFC chip requests it. The advantage is that the clock is only enabled when needed and we don't need to manage it ourselves from the NFC driver. Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240601115321.25314-3-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 62ae64ceb9a55333f3b259fef8acd0bf1598638a Author: Joe Mason Date: Sat Jun 1 11:53:57 2024 +0000 arm64: dts: qcom: msm8916-samsung-gprimeltecan: Add NFC The Samsung Galaxy Grand Prime CAN has a Samsung S3FWRN5 NFC chip that works quite well with the s3fwrn5 driver in the Linux NFC subsystem. The clock setup for the NFC chip is a bit special (although this seems to be a common approach used for Qualcomm devices with NFC): The NFC chip has an output GPIO that is asserted whenever the clock is needed to function properly. On the A3/A5 this is wired up to PM8916 GPIO2, which is then configured with a special function (NFC_CLK_REQ or BB_CLK2_REQ). Enabling the rpmcc RPM_SMD_BB_CLK2_PIN clock will then instruct PM8916 to automatically enable the clock whenever the NFC chip requests it. The advantage is that the clock is only enabled when needed and we don't need to manage it ourselves from the NFC driver. Signed-off-by: Joe Mason [Stephan: Put NFC pinctrl into common dtsi to share it with other variants] Signed-off-by: Stephan Gerhold [Raymond: Use interrupts-extended. Keep &blsp_i2c6 enabled by default] Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240601115321.25314-2-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 336e26f80d79d0d686220b4ff062fb9a0db025ab Author: Alexandre Messier Date: Mon Jun 3 02:28:56 2024 -0400 dt-bindings: arm: qcom: add HTC One (M8) Add a compatible for the HTC One (M8), which is based on the MSM8974Pro SoC. Signed-off-by: Alexandre Messier Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240603-m8-support-v1-1-c7b6a1941ed2@me.ssier.org Signed-off-by: Bjorn Andersson commit 0e500122d0e9932f985ba13b9f66e191ff604ffd Author: Abel Vesa Date: Mon Jun 3 11:17:17 2024 +0300 arm64: dts: qcom: x1e80100: Disable the SMB2360 4th instance by default The CRD board doesn't have the 4th SMB2360 PMIC populated while the QCP does. So enable it on QCP only. This fixes the warning for the missing PMIC on CRD as well. Fixes: 2559e61e7ef4 ("arm64: dts: qcom: x1e80100-pmics: Add the missing PMICs") Reviewed-by: Johan Hovold Tested-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240603-x1e80100-dts-pmics-drop-4th-smb2360-from-crd-v2-1-fb63973cc07d@linaro.org Signed-off-by: Bjorn Andersson commit 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Author: Krishna Kurapati Date: Tue Jun 4 11:36:59 2024 +0530 arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode On SC7280, in host mode, it is observed that stressing out controller results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instances in park mode for SC7280 to mitigate this issue. Reported-by: Doug Anderson Cc: stable@vger.kernel.org Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 5b8baed4b88132c12010ce6ca1b56f00d122e376 Author: Krishna Kurapati Date: Tue Jun 4 11:36:58 2024 +0530 arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode On SC7180, in host mode, it is observed that stressing out controller results in HC died error: xhci-hcd.12.auto: xHCI host not responding to stop endpoint command xhci-hcd.12.auto: xHCI host controller not responding, assume dead xhci-hcd.12.auto: HC died; cleaning up And at this instant only restarting the host mode fixes it. Disable SuperSpeed instances in park mode for SC7180 to mitigate this issue. Reported-by: Doug Anderson Cc: stable@vger.kernel.org Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes") Signed-off-by: Krishna Kurapati Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240604060659.1449278-2-quic_kriskura@quicinc.com Signed-off-by: Bjorn Andersson commit 1b503fa221d144fbb11e2591378429566564a6b8 Author: Jeff Johnson Date: Mon Jun 3 17:09:34 2024 -0700 soc: qcom: spm: add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 warns: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/qcom/spm.o Add the missing MODULE_DESCRIPTION(), using the same description as the underlying QCOM_SPM Kconfig item. Signed-off-by: Jeff Johnson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240603-md-soc-qcom-spm-v1-1-617730f08d22@quicinc.com Signed-off-by: Bjorn Andersson commit 0e8a41e511c98f5f5796c0dca8ff983d1c967b93 Author: Alexandre Messier Date: Mon Jun 3 02:28:57 2024 -0400 ARM: dts: qcom: Add initial support for HTC One (M8) Add initial device tree for the HTC One (M8) smartphone. Initial support includes: - eMMC - Power button - USB - Vibrator - Volume buttons (GPIO) - Wi-Fi Signed-off-by: Alexandre Messier Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240603-m8-support-v1-2-c7b6a1941ed2@me.ssier.org Signed-off-by: Bjorn Andersson commit 6eee808134ecf1c1093ff1ddfc056dc5e469d0c3 Author: Dmitry Baryshkov Date: Mon Jun 3 15:51:49 2024 +0300 arm64: defconfig: enable several Qualcomm interconnects Enable drivers for interconnects on Qualcomm MSM8996 (Dragonboard 820c) and SM8150 (SM8150 HDK) to be built-in. Otherwise boot time issues are observed on these platforms. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20240603-icc-msm8996-builtin-v1-1-3e3d1b0a78ee@linaro.org Signed-off-by: Bjorn Andersson commit d6c6b85bf5582bbe2efefa9a083178b5f7eef439 Author: Dmitry Baryshkov Date: Wed Jun 5 12:00:49 2024 +0300 arm64: dts: qcom: qrb4210-rb2: make L9A always-on The L9A regulator is used to further control voltage regulators on the board. It can be used to disable VBAT_mains, 1.8V, 3.3V, 5V rails). Make sure that is stays always on to prevent undervolting of these volage rails. Fixes: 8d58a8c0d930 ("arm64: dts: qcom: Add base qrb4210-rb2 board dts") Reviewed-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605-rb2-l9a-aon-v2-1-0d493d0d107c@linaro.org Signed-off-by: Bjorn Andersson commit f77e7bd40c3c2d79685e9cc80de874b69a976f55 Author: Dmitry Baryshkov Date: Wed Jun 5 11:55:57 2024 +0300 arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio On the Qualcomm RB2 platform the I2C bus connected to the LT9611UXC bridge under some circumstances can go into a state when all transfers timeout. This causes both issues with fetching of EDID and with updating of the bridge's firmware. While we are debugging the issue, switch corresponding I2C bus to use i2c-gpio driver. While using i2c-gpio no communication issues are observed. This patch is asusmed to be a temporary fix, so it is implemented in a non-intrusive manner to simply reverting it later. Fixes: f7b01e07e89c ("arm64: dts: qcom: qrb4210-rb2: Enable display out") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20240605-rb12-i2c2g-pio-v2-2-946f5d6b6948@linaro.org Signed-off-by: Bjorn Andersson commit b7b545ccc08873e107aa24c461b1fdb123dd3761 Author: Dmitry Baryshkov Date: Wed Jun 5 11:55:56 2024 +0300 arm64: dts: qcom: qrb2210-rb1: switch I2C2 to i2c-gpio On the Qualcomm RB1 platform the I2C bus connected to the LT9611UXC bridge under some circumstances can go into a state when all transfers timeout. This causes both issues with fetching of EDID and with updating of the bridge's firmware. While we are debugging the issue, switch corresponding I2C bus to use i2c-gpio driver. While using i2c-gpio no communication issues are observed. This patch is asusmed to be a temporary fix, so it is implemented in a non-intrusive manner to simply reverting it later. Fixes: 616eda24edd4 ("arm64: dts: qcom: qrb2210-rb1: Set up HDMI") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Baryshkov Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20240605-rb12-i2c2g-pio-v2-1-946f5d6b6948@linaro.org Signed-off-by: Bjorn Andersson commit 3c61c786d2f058636a92c5b648873fdd45444085 Author: Neil Armstrong Date: Wed Jun 5 13:43:30 2024 +0200 arm64: dts: qcom: sm8650-hdk: allow more IOMMU SID for the first QUP instance When triggering I2S SE DMA transfers on the 6th Serial Element, we get some timeouts and finally a fatal SMMU crash because the I2C6 lines are shared with the secure firmware in order to handle the SMB1396 charger from the secure side. In order to make thing work flawlessly we need to allow more SIDs while running our SE DMA transfers, thus add the 0x3 mark to allow the 0xa0 SID to trigger while we trigger an 0xa3 SID from Linux. This crash doesn't happen on the QRD platform since the SE6 is configured differently, with FIFO mode disabled, thus GPI DMA is used and we cannot exercise SE DMA on this interface. The crash only happens when large tranfers occurs (>32 bytes) since the driver is designed to use the SE DMA in this case, and there's no way to mark the SE DMA as disabled or mark the GPI DMA as preferred since the FIFO/SE DMA will be used is FIFO is not disabled. Signed-off-by: Neil Armstrong Fixes: 01061441029e ("arm64: dts: qcom: sm8650: add support for the SM8650-HDK board") Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605-topic-sm8650-upstream-hdk-iommu-fix-v1-1-9fd7233725fa@linaro.org Signed-off-by: Bjorn Andersson commit ed20142ed68c2b8819120508bc029e84d13cfe63 Author: Lukasz Majewski Date: Mon Jun 3 11:33:21 2024 +0200 selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses Fixed MAC addresses help with debugging as last four bytes identify the network namespace. Signed-off-by: Lukasz Majewski Link: https://lore.kernel.org/r/20240603093322.3150030-1-lukma@denx.de Signed-off-by: Jakub Kicinski commit 955edd872baf29740b714ffa093886918fc9a47b Author: Lukasz Majewski Date: Mon Jun 3 11:33:22 2024 +0200 selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses Fixed MAC addresses help with debugging as last four bytes identify the network namespace. Moreover, it allows to mimic the real life setup with for example bridge having the same MAC address on each port. Signed-off-by: Lukasz Majewski Link: https://lore.kernel.org/r/20240603093322.3150030-2-lukma@denx.de Signed-off-by: Jakub Kicinski commit e502de5d40f70eb3f2066d0231df0f40ff48742c Author: Krzysztof Kozlowski Date: Wed Jun 5 17:46:05 2024 +0200 arm64: dts: qcom: use defines for interrupts Replace hard-coded interrupt parts (GIC, flags) with standard defines for readability. No changes in resulting DTBs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240605154605.149051-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 5efe9688f9488e8e95177d03be2678021233e877 Author: Steven Rostedt (Google) Date: Tue Jun 4 15:25:50 2024 -0400 ftrace/selftests: Fix pid test with function graph not showing pids The pid filtering test will set the pid filters and make sure that both function and function_graph tracing honors the filters. But the function_graph tracer test was failing because the PID was not being filtered properly. That's because the funcgraph-proc option wasn't getting set. Without that option the PID is not shown. Instead we get: + cat trace # tracer: function_graph # # CPU DURATION FUNCTION CALLS # | | | | | | | 3) ! 143.685 us | kernel_clone(); 3) ! 127.055 us | kernel_clone(); 1) ! 127.170 us | kernel_clone(); 3) ! 126.840 us | kernel_clone(); When we should be getting: + cat trace # tracer: function_graph # # CPU TASK/PID DURATION FUNCTION CALLS # | | | | | | | | | 4) bash-939 | # 1070.009 us | kernel_clone(); 4) bash-939 | # 1116.903 us | kernel_clone(); 5) bash-939 | ! 976.133 us | kernel_clone(); 5) bash-939 | ! 954.012 us | kernel_clone(); The test looks for the pids it is filtering and will fail if it can not find them. Without fungraph-proc option set, it will not be displayed and the test will fail. Link: https://lore.kernel.org/all/Zl9JFnzKGuUM10X2@J2N7QTR9R3/ Link: https://lore.kernel.org/linux-trace-kernel/20240604152550.0c01d7cd@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Fixes: 35b944a997e2 ("selftests/ftrace: Add function_graph tracer to func-filter-pid test") Reported-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) Tested-by: Mark Rutland commit ca1a453361cd1cc73752998d1acd8616582c2a64 Author: Niemiec, Krzysztof Date: Mon Jun 3 18:20:22 2024 +0200 drm/i915/gt: Delete the live_hearbeat_fast selftest The test is trying to push the heartbeat frequency to the limit, which might sometimes fail. Such a failure does not provide valuable information, because it does not indicate that there is something necessarily wrong with either the driver or the hardware. Remove the test to prevent random, unnecessary failures from appearing in CI. Suggested-by: Chris Wilson Signed-off-by: Niemiec, Krzysztof Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/fe2vu5h7v7ooxbhwpbfsypxg5mjrnt56gc3cgrqpnhgrgce334@qfrv2skxrp47 commit 24311962484385fa3a06c4fc1f2864b613df5af6 Author: Steven Rostedt (Google) Date: Wed Jun 5 20:53:37 2024 -0400 ftrace: Add back ftrace_update_trampoline() to ftrace_update_pid_func() The update to the ops trampoline done by the function ftrace_update_trampoline() was accidentally removed from ftrace_update_pid_func(). Add it back. Link: https://lore.kernel.org/linux-trace-kernel/20240605205337.6115e9a5@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Fixes: df3ec5da6a1e ("function_graph: Add pid tracing back to function graph tracer") Signed-off-by: Steven Rostedt (Google) commit c5d86c19086fa752f0ef7ff8bca5df2dfc2fb00f Author: Andi Shyti Date: Fri May 24 01:58:53 2024 +0200 drm/i915: Increase FLR timeout from 3s to 9s Following the guidelines it takes 3 seconds to perform an FLR reset. Let's give it a bit more slack because this time can change depending on the platform and on the firmware Signed-off-by: Andi Shyti Reviewed-by: Rodrigo Vivi Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240523235853.171796-1-andi.shyti@linux.intel.com commit d223d1947dadec37d2bb5efbda9fc34c03b9a784 Merge: 1467713eb2244 63587234d42ad Author: Jakub Kicinski Date: Wed Jun 5 15:56:52 2024 -0700 Merge branch 'vmxnet3-upgrade-to-version-9' Ronak Doshi says: ==================== vmxnet3: upgrade to version 9 vmxnet3 emulation has recently added timestamping feature which allows the hypervisor (ESXi) to calculate latency from guest virtual NIC driver to all the way up to the physical NIC. This patch series extends vmxnet3 driver to leverage these new feature. Compatibility is maintained using existing vmxnet3 versioning mechanism as follows: - new features added to vmxnet3 emulation are associated with new vmxnet3 version viz. vmxnet3 version 9. - emulation advertises all the versions it supports to the driver. - during initialization, vmxnet3 driver picks the highest version number supported by both the emulation and the driver and configures emulation to run at that version. In particular, following changes are introduced: Patch 1: This patch introduces utility macros for vmxnet3 version 9 comparison and updates Copyright information. Patch 2: This patch adds support to timestamp the packets so as to allow latency measurement in the ESXi. Patch 3: This patch adds support to disable certain offloads on the device based on the request specified by the user in the VM configuration. Patch 4: With all vmxnet3 version 9 changes incorporated in the vmxnet3 driver, with this patch, the driver can configure emulation to run at vmxnet3 version 9. ==================== Link: https://lore.kernel.org/r/20240531193050.4132-1-ronak.doshi@broadcom.com Signed-off-by: Jakub Kicinski commit 63587234d42ad59391cac3619bbb3c9a78c5afaa Author: Ronak Doshi Date: Fri May 31 12:30:49 2024 -0700 vmxnet3: update to version 9 With all vmxnet3 version 9 changes incorporated in the vmxnet3 driver, the driver can configure emulation to run at vmxnet3 version 9, provided the emulation advertises support for version 9. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240531193050.4132-5-ronak.doshi@broadcom.com Signed-off-by: Jakub Kicinski commit 2e5010fd0c43cb09310bd68efff3d534729a1022 Author: Ronak Doshi Date: Fri May 31 12:30:48 2024 -0700 vmxnet3: add command to allow disabling of offloads This patch adds a new command to disable certain offloads. This allows user to specify, using VM configuration, if certain offloads need to be disabled. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240531193050.4132-4-ronak.doshi@broadcom.com Signed-off-by: Jakub Kicinski commit 4c22fad70256245202f33d6f166bfb47bb634bc3 Author: Ronak Doshi Date: Fri May 31 12:30:47 2024 -0700 vmxnet3: add latency measurement support in vmxnet3 This patch enhances vmxnet3 to support latency measurement. This support will help to track the latency in packet processing between guest virtual nic driver and host. For this purpose, we introduce a new timestamp ring in vmxnet3 which will be per Tx/Rx queue. This ring will be used to carry timestamp of the packets which will be used to calculate the latency. User can enable latency measurement using realtime knob in vnic setting in VCenter. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240531193050.4132-3-ronak.doshi@broadcom.com Signed-off-by: Jakub Kicinski commit 4978478a688861207503f3baabcc9c1a5ff43cce Author: Ronak Doshi Date: Fri May 31 12:30:46 2024 -0700 vmxnet3: prepare for version 9 changes vmxnet3 is currently at version 7 and this patch initiates the preparation to accommodate changes for up to version 9. Introduced utility macros for vmxnet3 version 9 comparison and update Copyright information. Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240531193050.4132-2-ronak.doshi@broadcom.com Signed-off-by: Jakub Kicinski commit aeacc39e2088a15ee31c8af4f68c84981fa08eb7 Author: Dmitry Baryshkov Date: Tue Feb 27 00:34:45 2024 +0200 drm/msm/dp: fix runtime_pm handling in dp_wait_hpd_asserted The function dp_wait_hpd_asserted() uses pm_runtime_get_sync() and doesn't care about the return value. Potentially this can lead to unclocked access if for some reason resuming of the DP controller fails. Change the function to use pm_runtime_resume_and_get() and return an error if resume fails. Fixes: e2969ee30252 ("drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Patchwork: https://patchwork.freedesktop.org/patch/580137/ Link: https://lore.kernel.org/r/20240226223446.4194079-1-dmitry.baryshkov@linaro.org [quic_abhinavk@quicinc.com: resolved trivial conflict while rebase] Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 6ed817592638348e83facfe6a4deedb8d5e83357 Author: Junhao Xie Date: Fri May 24 23:01:12 2024 +0800 drm/msm/dpu: drop duplicate drm formats from wb2_formats arrays There are duplicate items in wb2_formats_rgb and wb2_formats_rgb_yuv, which cause weston assertions failed. weston: libweston/drm-formats.c:131: weston_drm_format_array_add_format: Assertion `!weston_drm_format_array_find_format(formats, format)' failed. Signed-off-by: Junhao Xie Reviewed-by: Konrad Dybcio Fixes: 8c16b988ba2d ("drm/msm/dpu: introduce separate wb2_format arrays for rgb and yuv") Fixes: 53324b99bd7b ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog") Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/596847/ Link: https://lore.kernel.org/r/20240524150128.1878297-2-bigfoot@classfun.cn Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 35322c39a653c775670f0713fb96ccc2cd91a747 Author: Dmitry Baryshkov Date: Wed May 22 13:24:28 2024 +0300 Revert "drm/msm/dpu: drop dpu_encoder_phys_ops.atomic_mode_set" In the DPU driver blank IRQ handling is called from a vblank worker and can happen outside of the irq_enable / irq_disable pair. Using the worker makes that completely asynchronous with the rest of the code. Revert commit d13f638c9b88 ("drm/msm/dpu: drop dpu_encoder_phys_ops.atomic_mode_set") to fix vblank IRQ assignment for CMD DSI panels. Call trace: dpu_encoder_phys_cmd_control_vblank_irq+0x218/0x294 dpu_encoder_toggle_vblank_for_crtc+0x160/0x194 dpu_crtc_vblank+0xbc/0x228 dpu_kms_enable_vblank+0x18/0x24 vblank_ctrl_worker+0x34/0x6c process_one_work+0x218/0x620 worker_thread+0x1ac/0x37c kthread+0x114/0x118 ret_from_fork+0x10/0x20 Fixes: d13f638c9b88 ("drm/msm/dpu: drop dpu_encoder_phys_ops.atomic_mode_set") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/595065/ Link: https://lore.kernel.org/r/20240522-dpu-revert-ams-v2-1-b37825d708e1@linaro.org Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit e42d518511871ae625b5ff699853a05af1ccccf7 Author: Barnabás Czémán Date: Thu May 9 21:40:41 2024 +0200 drm/msm/dpu: fix encoder irq wait skip The irq_idx is unsigned so it cannot be lower than zero, better to change the condition to check if it is equal with zero. It could not cause any issue because a valid irq index starts from one. Fixes: 5a9d50150c2c ("drm/msm/dpu: shift IRQ indices by 1") Signed-off-by: Barnabás Czémán Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/596853/ Link: https://lore.kernel.org/r/20240509-irq_wait-v2-1-b8b687b22cc4@gmail.com Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 1467713eb2244a54c99028a2eacd44f2d1badaf7 Author: David Christensen Date: Mon Jun 3 17:27:41 2024 -0400 ionic: advertise 52-bit addressing limitation for MSI-X Current ionic devices only support 52 internal physical address lines. This is sufficient for x86_64 systems which have similar limitations but does not apply to all other architectures, notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are not set outside the physical address limits of the NIC, set the no_64bit_msi value of the pci_dev structure during device probe. Signed-off-by: David Christensen Reviewed-by: Shannon Nelson Link: https://lore.kernel.org/r/20240603212747.1079134-1-drc@linux.ibm.com Signed-off-by: Jakub Kicinski commit 2fe209d0ad2e2729f7e22b9b31a86cc3ff0db550 Author: Casey Schaufler Date: Wed Jun 5 15:41:50 2024 -0700 smack: tcp: ipv4, fix incorrect labeling Currently, Smack mirrors the label of incoming tcp/ipv4 connections: when a label 'foo' connects to a label 'bar' with tcp/ipv4, 'foo' always gets 'foo' in returned ipv4 packets. So, 1) returned packets are incorrectly labeled ('foo' instead of 'bar') 2) 'bar' can write to 'foo' without being authorized to write. Here is a scenario how to see this: * Take two machines, let's call them C and S, with active Smack in the default state (no settings, no rules, no labeled hosts, only builtin labels) * At S, add Smack rule 'foo bar w' (labels 'foo' and 'bar' are instantiated at S at this moment) * At S, at label 'bar', launch a program that listens for incoming tcp/ipv4 connections * From C, at label 'foo', connect to the listener at S. (label 'foo' is instantiated at C at this moment) Connection succeedes and works. * Send some data in both directions. * Collect network traffic of this connection. All packets in both directions are labeled with the CIPSO of the label 'foo'. Hence, label 'bar' writes to 'foo' without being authorized, and even without ever being known at C. If anybody cares: exactly the same happens with DCCP. This behavior 1st manifested in release 2.6.29.4 (see Fixes below) and it looks unintentional. At least, no explanation was provided. I changed returned packes label into the 'bar', to bring it into line with the Smack documentation claims. Signed-off-by: Konstantin Andreev Signed-off-by: Casey Schaufler commit d3911f1639e67fc7b12aae0efa5a540976d7443b Author: Nikita Travkin Date: Wed Jun 5 18:53:27 2024 +0500 power: supply: rt5033: Bring back i2c_set_clientdata Commit 3a93da231c12 ("power: supply: rt5033: Use devm_power_supply_register() helper") reworked the driver to use devm. While at it, the i2c_set_clientdata was dropped along with the remove callback. Unfortunately other parts of the driver also rely on i2c clientdata so this causes kernel oops. Bring the call back to fix the driver. Fixes: 3a93da231c12 ("power: supply: rt5033: Use devm_power_supply_register() helper") Tested-by: Raymond Hackley Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20240605-rt5033-null-clientdata-v1-1-558d710eeb4d@trvn.ru Signed-off-by: Sebastian Reichel commit d4ea1d504d2701ba04412f98dc00d45a104c52ab Author: Andy Shevchenko Date: Wed Jun 5 23:53:15 2024 +0300 regmap: spi: Fix potential off-by-one when calculating reserved size If we ever meet a hardware that uses weird register bits and padding, we may end up in off-by-one error since x/8 + y/8 might not be equal to (x + y)/8 in some cases. bits pad x/8+y/8 (x+y)/8 4..7 0..3 0 0 // x + y from 4 up to 7 4..7 4..7 0 1 // x + y from 8 up to 11 4..7 8..11 1 1 // x + y from 12 up to 15 8..15 0..7 1 1 // x + y from 8 up to 15 8..15 8..15 2 2 // x + y from 16 up to 23 Fix this by using (x+y)/8. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240605205315.19132-1-andy.shevchenko@gmail.com Signed-off-by: Mark Brown commit c790275b5edf5d8280ae520bda7c1f37da460c00 Author: Vadim Fedorenko Date: Tue Jun 4 02:19:39 2024 -0700 bnxt_en: fix atomic counter for ptp packets atomic_dec_if_positive returns new value regardless if it is updated or not. The commit in fixes changed the behavior of the condition to one that differs from original code. Restore original condition to properly maintain atomic counter. Fixes: 165f87691a89 ("bnxt_en: add timestamping statistics support") Reviewed-by: Michael Chan Signed-off-by: Vadim Fedorenko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240604091939.785535-1-vadfed@meta.com Signed-off-by: Jakub Kicinski commit 6d3581edffea0b3a64b0d3094d3f09222e0024f7 Author: Matthew Brost Date: Mon Jun 3 11:18:24 2024 -0700 drm/xe: Don't overmap identity VRAM mapping Overmapping the identity VRAM mapping is triggering hardware bugs on certain platforms. Use 2M pages for the last unaligned (to 1G) VRAM chunk. v2: - Always use 2M pages for last chunk (Fei Yang) - break loop when 2M pages are used - Add assert for usable_size being 2M aligned v3: - Fix checkpatch Cc: Maarten Lankhorst Cc: Fei Yang Signed-off-by: Matthew Brost Reviewed-by: Fei Yang Link: https://patchwork.freedesktop.org/patch/msgid/20240603181824.1927675-1-matthew.brost@intel.com commit d930eb4fdfee32e0a3e9a5c9c2af8d65857ac4de Author: Conor Dooley Date: Wed Apr 10 12:58:08 2024 +0100 firmware: microchip: use scope-based cleanup where possible There's a bunch of structs created and freed every time the mailbox is used. Move them to use the scope-based cleanup infrastructure to avoid manually tearing them down. mpfs_auto_update_available() didn't free the memory that it used (albeit it allocated exactly once during probe) so that gets moved over too. Signed-off-by: Conor Dooley commit e277026b5e2dc30323115ffca0916f1b7d217906 Author: Conor Dooley Date: Wed Apr 10 12:58:07 2024 +0100 firmware: microchip: move buffer allocation into mpfs_auto_update_set_image_address() This buffer is used exclusively by mpfs_auto_update_set_image_address(), so move the management of it there, employing the recently added cleanup infrastructure to avoid littering the function with gotos. Signed-off-by: Conor Dooley commit a2bf9dfe00905c2426893229b593487fe5abf152 Author: Conor Dooley Date: Wed Apr 10 12:58:04 2024 +0100 firmware: microchip: support writing bitstream info to flash Updating the FPGA image might bring with it changes visible to Linux, so it is helpful to also co-locate dt-overlays that describe the new image contents. If these are packaged in a specific format [1] (detected by first 4 bytes being MCHP, since FPGA images have no magic), load the file to the reserved 1 MiB region immediately after the directory in flash. The Beagle-V Fire's "gateware" already creates these files and puts them in flash [2]. Link: https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/how-to/re-programming-the-fpga-from-linux.md#main-header-format Link: https://openbeagle.org/beaglev-fire/gateware/-/blob/main/gateware_scripts/generate_gateware_overlays.py?ref_type=heads [2] Signed-off-by: Conor Dooley commit a46300b1b09ba260c2c2b00f06f6e34482a8ec01 Merge: f29dcae96ec83 22767241e6442 Author: Kalle Valo Date: Wed Jun 5 21:29:56 2024 +0300 Merge tag 'ath-next-20240605' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath ath.git patches for v6.11 ath12k * remove unsupported tx monitor handling * channel 2 in 6 GHz band support * Spatial Multiplexing Power Save (SMPS) in 6 GHz band support * multiple BSSID (MBSSID) and Enhanced Multi-BSSID Advertisements (EMA) support * dynamic VLAN support * add panic handler for resetting the firmware state ath10k * add qcom,no-msa-ready-indicator Device Tree property * LED support for various chipsets commit 3ad7d18c5dad75ed38098c7cc3bc9594b4701399 Author: Andrzej Hajda Date: Wed Jun 5 09:29:48 2024 +0200 drm/xe: flush engine buffers before signalling user fence on all engines Tests show that user fence signalling requires kind of write barrier, otherwise not all writes performed by the workload will be available to userspace. It is already done for render and compute, we need it also for the rest: video, gsc, copy. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Andrzej Hajda Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240605-fix_user_fence_posted-v3-2-06e7932f784a@intel.com commit 3494f5f5f675d84385b0f6bfcca1e10c739bf9bb Author: Andrzej Hajda Date: Wed Jun 5 09:29:47 2024 +0200 Revert "drm/xe: flush gtt before signalling user fence on all engines" This reverts commit 38007fa96419a9db9719f170b9e8a7877821cdd1. Signaling user-fence after seqno write does not seem to be good solution. Instead of changing order separate barrier should be put before user-fence, this will be done in separate patch. v2: added fixes tag in case reverted patch gets backported to stable Fixes: 38007fa96419 ("drm/xe: flush gtt before signalling user fence on all engines") Signed-off-by: Andrzej Hajda Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240605-fix_user_fence_posted-v3-1-06e7932f784a@intel.com commit f29dcae96ec83d134040433b72ee7d9ce76ba3dc Merge: 5bcd9a0a59953 9373ed280651a Author: Kalle Valo Date: Wed Jun 5 21:23:16 2024 +0300 Merge tag 'rtw-next-2024-06-04' of https://github.com/pkshih/rtw rtw-next patches for v6.11 Some fixes and refactors of rtlwifi, rtw88 and rtw89. Only one major change listed below: rtlwifi: - add new chip support of RTL8192DU commit 3b0d6a32115c88618794406123ef8466f0327898 Author: Neil Armstrong Date: Wed Jun 5 11:37:45 2024 +0200 dt-bindings: spi: amlogic,a1-spifc: add missing power-domains On the Amlogic A1, the SPI FC controller can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong Acked-by: Conor Dooley Link: https://msgid.link/r/20240605-topic-amlogic-upstream-bindings-fixes-power-domains-spifc-v1-1-380f29ba4a16@linaro.org Signed-off-by: Mark Brown commit d011c022efe275791897668aa421e2db9f2e6450 Author: Lad Prabhakar Date: Tue Jun 4 18:37:10 2024 +0100 irqchip/renesas-rzg2l: Add support for RZ/Five SoC The IX45 block has additional mask registers (NMSK/IMSK/TMSK) compared to the RZ/G2L (family) SoC. A new rzfive_irqc_chip irq_chip is introduced for RZ/Five, where function pointers for irq_[un]mask() and irq_[dis|en]able() handle the ([un]masking of the interrupts. The irq_chip pointer is now passed as an init callback and stored in the priv pointer to differentiate between RZ/G2L and RZ/Five. Signed-off-by: Lad Prabhakar Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240604173710.534132-3-prabhakar.mahadev-lad.rj@bp.renesas.com commit 372487b295557b6c0c7ba3583fb34a65c574ff9f Author: Lad Prabhakar Date: Tue Jun 4 18:37:09 2024 +0100 dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/Five SoC Document RZ/Five (R9A07G043F) IRQC bindings. The IRQC block on the RZ/Five SoC is almost identical to the one found on the RZ/G2L SoC, with the only difference being that it has additional mask control registers for NMI/IRQ/TINT. Hence new compatible string "renesas,r9a07g043f-irqc" is added for RZ/Five SoC. Signed-off-by: Lad Prabhakar Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240604173710.534132-2-prabhakar.mahadev-lad.rj@bp.renesas.com commit b3181f433206a1432bc7093d1896fe36026f7fff Author: Thorsten Blum Date: Mon Jun 3 20:00:07 2024 +0200 drm/xe/vm: Simplify if condition The if condition !A || A && B can be simplified to !A || B. Fixes the following Coccinelle/coccicheck warning reported by excluded_middle.cocci: WARNING !A || A && B is equivalent to !A || B Compile-tested only. Signed-off-by: Thorsten Blum Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240603180005.191578-1-thorsten.blum@toblux.com commit b4dc049ea3ea98df58820f988c7c9578aa076f72 Author: Herve Codina Date: Mon May 27 18:14:36 2024 +0200 irqdomain: Add missing parameter descriptions in kernel-doc comments During compilation, several warning of the following form were raised: Function parameter or struct member 'x' not described in 'yyy' Add the missing function parameter descriptions. Signed-off-by: Herve Codina Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240527161450.326615-10-herve.codina@bootlin.com commit b95fa494d6b74c30eeb4a50481aa1041c631754e Author: Tao Zhou Date: Thu May 23 11:23:20 2024 +0800 drm/amdgpu: add RAS is_rma flag Set the flag to true if bad page number reaches threshold. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 15c2990e0f0108b9c3752d7072a97d45d4283aea Author: Srinivasan Shanmugam Date: Mon May 27 20:15:21 2024 +0530 drm/amd/display: Add null checks for 'stream' and 'plane' before dereferencing This commit adds null checks for the 'stream' and 'plane' variables in the dcn30_apply_idle_power_optimizations function. These variables were previously assumed to be null at line 922, but they were used later in the code without checking if they were null. This could potentially lead to a null pointer dereference, which would cause a crash. The null checks ensure that 'stream' and 'plane' are not null before they are used, preventing potential crashes. Fixes the below static smatch checker: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn30/dcn30_hwseq.c:938 dcn30_apply_idle_power_optimizations() error: we previously assumed 'stream' could be null (see line 922) drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn30/dcn30_hwseq.c:940 dcn30_apply_idle_power_optimizations() error: we previously assumed 'plane' could be null (see line 922) Cc: Tom Chung Cc: Nicholas Kazlauskas Cc: Bhawanpreet Lakha Cc: Rodrigo Siqueira Cc: Roman Li Cc: Hersen Wu Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 17035a45f1ae40b974920a4d097aeca5e9f92fda Author: Jesse Zhang Date: Wed Jun 5 15:16:57 2024 +0800 drm/amd/pm: remove dead code in si_convert_power_level_to_smc Since gmc_pg is false, setting mcFlags with SISLANDS_SMC_MC_PG_EN cannot be reach. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 1ff6631baeb1f5d69be192732d0157a06b43f20a Author: Fangzhi Zuo Date: Fri May 10 15:23:02 2024 -0400 drm/amd/display: Prevent IPX From Link Detect and Set Mode IPX involvment proven to affect LT, causing link loss. Need to prevent IPX enabled in LT process in which link detect and set mode are main procedures that have LT taken place. Reviewed-by: Roman Li Acked-by: Zaeem Mohamed Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7f7f43f28eb325c4ed8ed3f0534cdb00c9831e0d Author: Jesse Zhang Date: Thu May 30 14:07:30 2024 +0800 drm/amdkfd: remove logically dead code idr_for_each_entry can ensure that mem is not empty during the loop. So don't need check mem again. Signed-off-by: Jesse Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c8ad1bbbc2751063c7a5825911e58996ef849628 Author: Lin.Cao Date: Fri May 31 14:02:39 2024 +0800 drm/amdgpu: fix failure mapping legacy queue when FLR Flag "mes.ring.shced.ready" will be set as true after mes hw init and set as false when mes hw fini to avoid duplicate initialization. But hw fini will not be called when function level reset, which will cause mes hw init be skipped during FLR, which will leads to mapping legacy queue fail. Set this flag as false when post reset will fix this issue. Signed-off-by: Lin.Cao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2874129903600907bb29b5df15258b95630548f3 Author: Daniel Sa Date: Thu May 16 12:03:34 2024 -0400 drm/amd/display: Fetch Mall caps from DC [Why] When performing P-State switching with Subvp on 8k (downscaled to 4k). corruption can be seen on the screen. MALL data was not being fetched from DC, and the system things there is more MALL space then what is actually available. [How] Read MALL size from dc caps. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Daniel Sa Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5d74be8c3a941993299c78f7d3d70c27f826af0b Author: Samson Tam Date: Wed May 15 17:32:29 2024 -0400 drm/amd/display: fix YUV video color corruption in DCN401 [Why] Missing check causes sequence error which results in chroma filter coefficients not being updated in certain modes when we display YUV video in fullscreen. This results in color corruption in video [How] Add back chroma_coef_mode check in dscl_set_scl_filter so that filter coefficients are calculated and updated when we have YUV surface Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dbe2c4c8ab92211a57ca4d23bf8eaf6f23e31a54 Author: Eric Huang Date: Mon Jun 3 12:04:59 2024 -0400 drm/amdkfd: add reset cause in gpu pre-reset smi event reset cause is requested by customer as additional info for gpu reset smi event. v2: integerate reset sources suggested by Lijo Lazar Signed-off-by: Eric Huang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3c7758beb269667373421fe7c7c44adcc7129d02 Author: Frank Min Date: Mon May 27 13:22:16 2024 +0800 drm/amdgpu: Update soc24_enum.h and soc21_enum.h Update to latest changes. Signed-off-by: Frank Min Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 978f5428c938f2837ac9442c3e1bfb4910e5b0bc Author: Frank Min Date: Mon Jun 3 09:53:58 2024 +0800 drm/amdgpu: Set PTE_IS_PTE bit for gfx12 Set PTE_IS_PTE bit while PRT is enabled on gfx12. Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 239612c3762d280338169880aa180c4d43249fa0 Author: Relja Vojvodic Date: Wed May 15 14:15:48 2024 -0400 drm/amd/display: Updated optc401_set_drr to use dcn401 functions why: optc_401_set_drr was using an old optc3 function to update vtotal min and max, causing crashes when disabling FAMS2 how: Updated dcn401 to point to opt401 function for vtotal updates. This version of the function has FAMS2 logic that allows for FAMS2 to be disabled. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Relja Vojvodic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2656e1ce783a90fa1aa0e11f2915d7c0442bf06f Author: Eric Huang Date: Mon Jun 3 11:56:03 2024 -0400 drm/amdgpu: add reset sources in gpu reset context reset source or reset cause is very useful info for reset context, it will be used by events API. Suggested-by: Lijo Lazar Signed-off-by: Eric Huang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3e538e43222c37de60cefa6e662beb8b30297300 Author: Dillon Varone Date: Tue May 14 16:21:02 2024 -0400 drm/amd/display: Add UCLK p-state support message to dcn401 [WHY&HOW] Improves on the SMU interface to explicitly declare P-State support. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5e211d2cf2d3b1a65b64dde4f4a9387510390692 Author: Alvin Lee Date: Tue May 14 16:22:01 2024 -0400 drm/amd/display: Use current_state when checking old_pipe subvp type [Description] When checking the subvp type of the previous state we must pass in current_state to the interface instead of context otherwise we will get the wrong result. Reviewed-by: Samson Tam Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8332f1aaf571bec1c023a3b13ba35c86aaa2524d Author: Bob Zhou Date: Fri May 31 16:21:45 2024 +0800 drm/amd/pm: add missing error handling in function smu_v13_0_6_allocate_dpm_context Check return value to avoid null pointer dereference. Signed-off-by: Bob Zhou Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 50151b7f1c79a09117837eb95b76c2de76841dab Author: Bob Zhou Date: Fri May 31 15:01:22 2024 +0800 drm/amd/pm: Fix the null pointer dereference for vega10_hwmgr Check return value and conduct null pointer handling to avoid null pointer dereference. Signed-off-by: Bob Zhou Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 45bd39fb3bf677b2bde8d7b36d85b3524dde0014 Author: Shane Xiao Date: Wed May 29 18:12:39 2024 +0800 drm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_VG10 This patch changes the implementation of AMDGPU_PTE_MTYPE_VG10, clear the bits before setting the new one. Suggested-by: Alex Deucher Signed-off-by: longlyao Signed-off-by: Shane Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b5b561621d5d6bc0ddd6cc442893f6768d151c27 Author: Jesse Zhang Date: Thu May 30 11:27:28 2024 +0800 drm/amdkfd: remove dead code in kfd_create_vcrat_image_gpu kfd_create_vcrat_image_gpu itself checks the avail_size at the start. So the value of avail_size is at least VCRAT_SIZE_FOR_GPU(16384), minus struct crat_header(40UL) and struct crat_subtype_compute(40UL) it cannot be less than 0. Signed-off-by: Jesse Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8178cfb0b48b122dd72ba6ffc2251926f62a0002 Author: Jesse Zhang Date: Fri May 31 09:56:40 2024 +0800 drm/amdkfd: fix the kdf debugger issue The expression caps | HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED and caps | HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED are always 1/true regardless of the values of its operand. Fixes: 9243240bed38 ("drm/amdkfd: enable single alu ops for gfx12") Signed-off-by: Jesse Zhang Suggested-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1433b36e3ab67772a37db624fc1f8e66d443690d Author: David Hildenbrand Date: Wed May 8 20:29:55 2024 +0200 s390/hugetlb: Convert PG_arch_1 code to work on folio->flags Let's make it clearer that we are always working on folio flags and never page flags of tail pages by converting remaining PG_arch_1 users that modify page->flags to modify folio->flags instead. No functional change intended, because we would always have worked with the head page (where page->flags corresponds to folio->flags) and never with tail pages. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-11-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 99b3f8f76f7a9eb2816d2af5b0b9de4a11dbc721 Author: David Hildenbrand Date: Wed May 8 20:29:54 2024 +0200 s390/uv: Implement HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE Let's also implement HAVE_ARCH_MAKE_FOLIO_ACCESSIBLE, so we can convert arch_make_page_accessible() to be a simple wrapper around arch_make_folio_accessible(). Unfortunately, we cannot do that in the header. There are only two arch_make_page_accessible() calls remaining in gup.c. We can now drop HAVE_ARCH_MAKE_PAGE_ACCESSIBLE completely form core-MM. We'll handle that separately, once the s390x part landed. Suggested-by: Matthew Wilcox Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-10-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 7d17143469879409692dc6279794e71be4bb1196 Author: David Hildenbrand Date: Wed May 8 20:29:53 2024 +0200 s390/uv: Convert uv_convert_owned_from_secure() to uv_convert_from_secure_(folio|pte)() Let's do the same as we did for uv_destroy_(folio|pte)() and have the following variants: (1) uv_convert_from_secure(): "low level" helper that operates on paddr and does not mess with folios. (2) uv_convert_from_secure_folio(): Consumes a folio to which we hold a reference. (3) uv_convert_from_secure_pte(): Consumes a PTE that holds a reference through the mapping. Unfortunately we need uv_convert_from_secure_pte(), because pfn_folio() and friends are not available in pgtable.h. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-9-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 7063150650d828ad3ca77b06531b37bb1aed82b6 Author: David Hildenbrand Date: Wed May 8 20:29:52 2024 +0200 s390/uv: Convert uv_destroy_owned_page() to uv_destroy_(folio|pte)() Let's have the following variants for destroying pages: (1) uv_destroy(): Like uv_pin_shared() and uv_convert_from_secure(), "low level" helper that operates on paddr and doesn't mess with folios. (2) uv_destroy_folio(): Consumes a folio to which we hold a reference. (3) uv_destroy_pte(): Consumes a PTE that holds a reference through the mapping. Unfortunately we need uv_destroy_pte(), because pfn_folio() and friends are not available in pgtable.h. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-8-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit e58623fbc178d6c074074c0107103c5d3c8041b1 Author: David Hildenbrand Date: Wed May 8 20:29:51 2024 +0200 s390/uv: Make uv_convert_from_secure() a static function It's not used outside of uv.c, so let's make it a static function. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-7-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 80cf817949264eff32642aa90da00f03e84e3c0f Author: David Hildenbrand Date: Wed May 8 20:29:50 2024 +0200 s390/uv: Update PG_arch_1 comment We removed the usage of PG_arch_1 for page tables in commit a51324c430db ("s390/cmma: rework no-dat handling"). Let's update the comment in UV to reflect that. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-6-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 036c0e104bd2cf45304a3795fd8ec985ea01bfe8 Author: David Hildenbrand Date: Wed May 8 20:29:49 2024 +0200 s390/uv: Convert PG_arch_1 users to only work on small folios Now that make_folio_secure() may only set PG_arch_1 for small folios, let's convert relevant remaining UV code to only work on (small) folios and simply reject large folios early. This way, we'll never end up touching PG_arch_1 on tail pages of a large folio in UV code. The folio_get()/folio_put() for functions that are documented to already hold a folio reference look weird; likely they are required to make concurrent gmap_make_secure() back off because the caller might only hold an implicit reference due to the page mapping. So leave that alone for now. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-5-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit eef88fe45ac9783e0dd108b033c1e933c38cab34 Author: David Hildenbrand Date: Wed May 8 20:29:48 2024 +0200 s390/uv: Split large folios in gmap_make_secure() While s390x makes sure to never have PMD-mapped THP in processes that use KVM -- by remapping them using PTEs in thp_split_walk_pmd_entry()->split_huge_pmd() -- there is still the possibility of having PTE-mapped THPs (large folios) mapped into guest memory. This would happen if user space allocates memory before calling KVM_CREATE_VM (which would call s390_enable_sie()). With upstream QEMU, this currently doesn't happen, because guest memory is setup and conditionally preallocated after KVM_CREATE_VM. Could it happen with shmem/file-backed memory when another process allocated memory in the pagecache? Likely, although currently not a common setup. Trying to split any PTE-mapped large folios sounds like the right and future-proof thing to do here. So let's call split_folio() and handle the return values accordingly. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-4-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 68ad4743beaa7187eb026f1f9bec8848ecf5ed43 Author: David Hildenbrand Date: Wed May 8 20:29:47 2024 +0200 s390/uv: gmap_make_secure() cleanups for further changes Let's factor out handling of LRU cache draining and convert the if-else chain to a switch-case. Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-3-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 3f29f6537f54d74e64bac0a390fb2e26da25800d Author: David Hildenbrand Date: Wed May 8 20:29:46 2024 +0200 s390/uv: Don't call folio_wait_writeback() without a folio reference folio_wait_writeback() requires that no spinlocks are held and that a folio reference is held, as documented. After we dropped the PTL, the folio could get freed concurrently. So grab a temporary reference. Fixes: 214d9bbcd3a6 ("s390/mm: provide memory management functions for protected KVM guests") Reviewed-by: Claudio Imbrenda Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240508182955.358628-2-david@redhat.com Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit e5af06b7cfb3c7541bcbd52a4b090b7e976f9270 Author: Bjorn Andersson Date: Sat May 25 10:58:52 2024 -0700 dt-bindings: arm-smmu: Fix Qualcomm SC8180X binding Update the Qualcomm SC8180X SMMU binding to allow describing the Adreno SMMU, with its three clocks. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240525-sc8180x-adreno-smmu-binding-fix-v1-1-e3c00aa9b9d4@quicinc.com Signed-off-by: Will Deacon commit e1548088ff544e4a4ae2c960bccf0eeff3a46297 Author: Sean Christopherson Date: Fri Mar 8 17:09:26 2024 -0800 KVM: VMX: Drop support for forcing UC memory when guest CR0.CD=1 Drop KVM's emulation of CR0.CD=1 on Intel CPUs now that KVM no longer honors guest MTRR memtypes, as forcing UC memory for VMs with non-coherent DMA only makes sense if the guest is using something other than PAT to configure the memtype for the DMA region. Furthermore, KVM has forced WB memory for CR0.CD=1 since commit fb279950ba02 ("KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED"), and no known VMM in existence disables KVM_X86_QUIRK_CD_NW_CLEARED, let alone does so with non-coherent DMA. Lastly, commit fb279950ba02 ("KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED") was from the same author as commit b18d5431acc7 ("KVM: x86: fix CR0.CD virtualization"), and followed by a mere month. I.e. forcing UC memory was likely the result of code inspection or perhaps misdiagnosed failures, and not the necessitate by a concrete use case. Update KVM's documentation to note that KVM_X86_QUIRK_CD_NW_CLEARED is now AMD-only, and to take an erratum for lack of CR0.CD virtualization on Intel. Tested-by: Xiangfei Ma Tested-by: Yongwei Ma Link: https://lore.kernel.org/r/20240309010929.1403984-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 0a7b73559b39497fae1b7b3d4bab69895097c37e Author: Sean Christopherson Date: Fri Mar 8 17:09:25 2024 -0800 KVM: x86: Remove VMX support for virtualizing guest MTRR memtypes Remove KVM's support for virtualizing guest MTRR memtypes, as full MTRR adds no value, negatively impacts guest performance, and is a maintenance burden due to it's complexity and oddities. KVM's approach to virtualizating MTRRs make no sense, at all. KVM *only* honors guest MTRR memtypes if EPT is enabled *and* the guest has a device that may perform non-coherent DMA access. From a hardware virtualization perspective of guest MTRRs, there is _nothing_ special about EPT. Legacy shadowing paging doesn't magically account for guest MTRRs, nor does NPT. Unwinding and deciphering KVM's murky history, the MTRR virtualization code appears to be the result of misdiagnosed issues when EPT + VT-d with passthrough devices was enabled years and years ago. And importantly, the underlying bugs that were fudged around by honoring guest MTRR memtypes have since been fixed (though rather poorly in some cases). The zapping GFNs logic in the MTRR virtualization code came from: commit efdfe536d8c643391e19d5726b072f82964bfbdb Author: Xiao Guangrong Date: Wed May 13 14:42:27 2015 +0800 KVM: MMU: fix MTRR update Currently, whenever guest MTRR registers are changed kvm_mmu_reset_context is called to switch to the new root shadow page table, however, it's useless since: 1) the cache type is not cached into shadow page's attribute so that the original root shadow page will be reused 2) the cache type is set on the last spte, that means we should sync the last sptes when MTRR is changed This patch fixs this issue by drop all the spte in the gfn range which is being updated by MTRR which was a fix for: commit 0bed3b568b68e5835ef5da888a372b9beabf7544 Author: Sheng Yang AuthorDate: Thu Oct 9 16:01:54 2008 +0800 Commit: Avi Kivity CommitDate: Wed Dec 31 16:51:44 2008 +0200 KVM: Improve MTRR structure As well as reset mmu context when set MTRR. which was part of a "MTRR/PAT support for EPT" series that also added: + if (mt_mask) { + mt_mask = get_memory_type(vcpu, gfn) << + kvm_x86_ops->get_mt_mask_shift(); + spte |= mt_mask; + } where get_memory_type() was a truly gnarly helper to retrieve the guest MTRR memtype for a given memtype. And *very* subtly, at the time of that change, KVM *always* set VMX_EPT_IGMT_BIT, kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK | VMX_EPT_WRITABLE_MASK | VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT | VMX_EPT_IGMT_BIT); which came in via: commit 928d4bf747e9c290b690ff515d8f81e8ee226d97 Author: Sheng Yang AuthorDate: Thu Nov 6 14:55:45 2008 +0800 Commit: Avi Kivity CommitDate: Tue Nov 11 21:00:37 2008 +0200 KVM: VMX: Set IGMT bit in EPT entry There is a potential issue that, when guest using pagetable without vmexit when EPT enabled, guest would use PAT/PCD/PWT bits to index PAT msr for it's memory, which would be inconsistent with host side and would cause host MCE due to inconsistent cache attribute. The patch set IGMT bit in EPT entry to ignore guest PAT and use WB as default memory type to protect host (notice that all memory mapped by KVM should be WB). Note the CommitDates! The AuthorDates strongly suggests Sheng Yang added the whole "ignoreIGMT things as a bug fix for issues that were detected during EPT + VT-d + passthrough enabling, but it was applied earlier because it was a generic fix. Jumping back to 0bed3b568b68 ("KVM: Improve MTRR structure"), the other relevant code, or rather lack thereof, is the handling of *host* MMIO. That fix came in a bit later, but given the author and timing, it's safe to say it was all part of the same EPT+VT-d enabling mess. commit 2aaf69dcee864f4fb6402638dd2f263324ac839f Author: Sheng Yang AuthorDate: Wed Jan 21 16:52:16 2009 +0800 Commit: Avi Kivity CommitDate: Sun Feb 15 02:47:37 2009 +0200 KVM: MMU: Map device MMIO as UC in EPT Software are not allow to access device MMIO using cacheable memory type, the patch limit MMIO region with UC and WC(guest can select WC using PAT and PCD/PWT). In addition to the host MMIO and IGMT issues, KVM's MTRR virtualization was obviously never tested on NPT until much later, which lends further credence to the theory/argument that this was all the result of misdiagnosed issues. Discussion from the EPT+MTRR enabling thread[*] more or less confirms that Sheng Yang was trying to resolve issues with passthrough MMIO. * Sheng Yang : Do you mean host(qemu) would access this memory and if we set it to guest : MTRR, host access would be broken? We would cover this in our shadow MTRR : patch, for we encountered this in video ram when doing some experiment with : VGA assignment. And in the same thread, there's also what appears to be confirmation of Intel running into issues with Windows XP related to a guest device driver mapping DMA with WC in the PAT. * Avi Kavity : Sheng Yang wrote: : > Yes... But it's easy to do with assigned devices' mmio, but what if guest : > specific some non-mmio memory's memory type? E.g. we have met one issue in : > Xen, that a assigned-device's XP driver specific one memory region as buffer, : > and modify the memory type then do DMA. : > : > Only map MMIO space can be first step, but I guess we can modify assigned : > memory region memory type follow guest's? : > : : With ept/npt, we can't, since the memory type is in the guest's : pagetable entries, and these are not accessible. [*] https://lore.kernel.org/all/1223539317-32379-1-git-send-email-sheng@linux.intel.com So, for the most part, what likely happened is that 15 years ago, a few engineers (a) fixed a #MC problem by ignoring guest PAT and (b) initially "fixed" passthrough device MMIO by emulating *guest* MTRRs. Except for the below case, everything since then has been a result of those two intertwined changes. The one exception, which is actually yet more confirmation of all of the above, is the revert of Paolo's attempt at "full" virtualization of guest MTRRs: commit 606decd67049217684e3cb5a54104d51ddd4ef35 Author: Paolo Bonzini Date: Thu Oct 1 13:12:47 2015 +0200 Revert "KVM: x86: apply guest MTRR virtualization on host reserved pages" This reverts commit fd717f11015f673487ffc826e59b2bad69d20fe5. It was reported to cause Machine Check Exceptions (bug 104091). ... commit fd717f11015f673487ffc826e59b2bad69d20fe5 Author: Paolo Bonzini Date: Tue Jul 7 14:38:13 2015 +0200 KVM: x86: apply guest MTRR virtualization on host reserved pages Currently guest MTRR is avoided if kvm_is_reserved_pfn returns true. However, the guest could prefer a different page type than UC for such pages. A good example is that pass-throughed VGA frame buffer is not always UC as host expected. This patch enables full use of virtual guest MTRRs. I.e. Paolo tried to add back KVM's behavior before "Map device MMIO as UC in EPT" and got the same result: machine checks, likely due to the guest MTRRs not being trustworthy/sane at all times. Note, Paolo also tried to enable MTRR virtualization on SVM+NPT, but that too got reverted. Unfortunately, it doesn't appear that anyone ever found a smoking gun, i.e. exactly why emulating guest MTRRs via NPT PAT caused extremely slow boot times doesn't appear to have a definitive root cause. commit fc07e76ac7ffa3afd621a1c3858a503386a14281 Author: Paolo Bonzini Date: Thu Oct 1 13:20:22 2015 +0200 Revert "KVM: SVM: use NPT page attributes" This reverts commit 3c2e7f7de3240216042b61073803b61b9b3cfb22. Initializing the mapping from MTRR to PAT values was reported to fail nondeterministically, and it also caused extremely slow boot (due to caching getting disabled---bug 103321) with assigned devices. ... commit 3c2e7f7de3240216042b61073803b61b9b3cfb22 Author: Paolo Bonzini Date: Tue Jul 7 14:32:17 2015 +0200 KVM: SVM: use NPT page attributes Right now, NPT page attributes are not used, and the final page attribute depends solely on gPAT (which however is not synced correctly), the guest MTRRs and the guest page attributes. However, we can do better by mimicking what is done for VMX. In the absence of PCI passthrough, the guest PAT can be ignored and the page attributes can be just WB. If passthrough is being used, instead, keep respecting the guest PAT, and emulate the guest MTRRs through the PAT field of the nested page tables. The only snag is that WP memory cannot be emulated correctly, because Linux's default PAT setting only includes the other types. In short, honoring guest MTRRs for VMX was initially a workaround of sorts for KVM ignoring guest PAT *and* for KVM not forcing UC for host MMIO. And while there *are* known cases where honoring guest MTRRs is desirable, e.g. passthrough VGA frame buffers, the desired behavior in that case is to get WC instead of UC, i.e. at this point it's for performance, not correctness. Furthermore, the complete absence of MTRR virtualization on NPT and shadow paging proves that, while KVM theoretically can do better, it's by no means necessary for correctnesss. Lastly, since kernels mostly rely on firmware to do MTRR setup, and the host typically provides guest firmware, honoring guest MTRRs is effectively honoring *host* userspace memtypes, which is also backwards. I.e. it would be far better for host userspace to communicate its desired memtype directly to KVM (or perhaps indirectly via VMAs in the host kernel), not through guest MTRRs. Tested-by: Xiangfei Ma Tested-by: Yongwei Ma Link: https://lore.kernel.org/r/20240309010929.1403984-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 46eb63ec8a98f9ec88f0a34d5a209968b8fc1ac9 Author: Jesse Zhang Date: Fri May 31 10:30:28 2024 +0800 drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9 To fix the warning about unused value, remove the use_static and use the parameter is_static directly. Signed-off-by: Jesse Zhang Suggested-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e69d43356ffdfb968c0c515bd42a8ad9a7399fcb Author: Alvin Lee Date: Fri Apr 26 17:28:46 2024 -0400 drm/amd/display: Move fpo_in_use to stream_status [Description] Refactor code and move fpo_in_use into stream_status to avoid unexpected changes to previous dc_state (i.e., current_state). Since stream pointers are shared between current and new dc_states, updating parameters of one stream will update the other as well which causes unexpected behaviors (i.e., checking that fpo_in_use isn't set in previous state and set in the new state is invalid). To avoid incorrect updates to current_state, move the fpo_in_use flag into dc_stream_status since stream_status is owned by dc and are not shared between different dc_states. Reviewed-by: Samson Tam Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4621e10e0158941d44223fd5f7451312473f73da Author: Alvin Lee Date: Fri Apr 26 17:14:19 2024 -0400 drm/amd/display: Only program P-State force if pipe config changed [Description] Today for MED update type we do not call update clocks. However, for FPO the assumption is that update clocks should be called to disable P-State switch before any HW programming since FPO in FW and driver are not synchronized. This causes an issue where on a MED update, an FPO P-State switch could be taking place, then driver forces P-State disallow in the below code and prevents FPO from completing the sequence. In this case we add a check to avoid re-programming (and thus re-setting) the P-State force register by only reprogramming if the pipe was not previously Subvp or FPO. The assumption is that the P-State force register should be programmed correctly the first time SubVP / FPO was enabled, so there's no need to update / reset it if the pipe config has never exited SubVP / FPO. Reviewed-by: Samson Tam Acked-by: Zaeem Mohamed Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2770b91588c2786809fdbdba589d9742dfc7af4f Author: Joan Lee Date: Wed May 15 10:23:01 2024 +0800 drm/amd/display: Add retires when read DPCD [why & how] Sometimes read DPCD return fail while result not retrieved yet. Add retries mechanism in Replay handle hpd irq to get real result. Reviewed-by: Jerry Zuo Acked-by: Zaeem Mohamed Signed-off-by: Joan Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cc4d6ea0f21e782d8f1c8feeb6bb3133579570dd Author: Nicholas Susanto Date: Tue May 14 11:38:39 2024 -0400 drm/amd/display: Fix DML2 logic to set clk state to min [Why] When an eDP with high clock states is going into s0i3, stream_count is 0. This causes DML to not update the clks to the lowest state and blocking us to enter s0i3 since eDP is out of vmin. [How] When stream_count is 0, set all the clocks to the lowest state. Reviewed-by: Jun Lei Acked-by: Zaeem Mohamed Signed-off-by: Nicholas Susanto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c5afb313e7e623a06cd3428f0a651b2235211430 Author: Jay Cornwall Date: Tue May 28 15:55:56 2024 -0500 drm/amdkfd: Handle deallocated VPGRs in gfx11+ trap handler A wavefront may deallocate its VGPRs at the end of a program while waiting for memory transactions to complete. If it subsequently receives a context save exception it will be unable to save, since this requires VGPRs. In this case the trap handler should terminate the wavefront. Fixes intermittent VM faults under context switching load. V2: Use S_ENDPGM instead of S_ENDPGM_SAVED for performance counters Signed-off-by: Jay Cornwall Reviewed-by: Lancelot Six Signed-off-by: Alex Deucher commit 4002a6c55e99046b4a09ae255d38d3620b31fb1d Author: Chris Park Date: Tue May 14 13:55:18 2024 -0400 drm/amd/display: Support new VA page table block size [Why] Page table definition increased up to 2MB. [How] Define new use case of page table for VA. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e902dd7f3e3b93a401e1d3c0322cce933e75e809 Author: Joshua Aberback Date: Mon May 13 18:14:59 2024 -0400 drm/amd/display: workaround for oled eDP not lighting up on DCN401 [Why] Currently there's an issue on DCN401 that prevents oled eDP panels from being lit up that is still under investigation. To unblock dev work while investigating, we can work around the issue by skipping toggling the enablement of the backlight. [How] - new debug bit that will skip touching backlight enable DPCD for oled Reviewed-by: Alvin Lee Reviewed-by: Wenjing Liu Acked-by: Zaeem Mohamed Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1349db1581545a9e7253f74ccd9eabbcdf99b294 Author: Chun-LiangChang Date: Fri May 10 02:00:18 2024 -0500 drm/amd/display: Add params of set_abm_event for VB Scaling [Why] Add parameters for set_abm_event to enable varibright scaling. VariBright Scaling is a feature to refer to system states like 1. Power mode 2. Battery Life percent 3. FullScreen video 4. Backlight slider to adjust variBright strength to get low power or user experience. [How] Add parameters of set_abm_event for VB Scaling Reviewed-by: Jun Lei Acked-by: Zaeem Mohamed Signed-off-by: Chun-LiangChang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e86e8798d3655d17ff6adf63191613d4b96bd294 Author: Joshua Aberback Date: Mon May 13 14:05:58 2024 -0400 drm/amd/display: Fix swapped dimension calculations [Why] The values calculated in optc1_get_otg_active_size are assigned to the wrong output parameters, vertical blank is being used for horizontal size and vice versa. This results in DPG test pattern looking wrong during hardware init, as the DPG dimensions get assigned from this output, and potentially other issues. Reviewed-by: Aric Cyr Acked-by: Zaeem Mohamed Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 57c4982169dfca65ed35081228857312dfa04c4c Author: Dillon Varone Date: Mon May 13 14:24:14 2024 -0400 drm/amd/display: Wait for hardmins to complete on dcn401 [WHY&HOW] When updating clocks via SMU, DAL needs to wait for requests to be fulfilled before proceeding. Reviewed-by: Alvin Lee Acked-by: Zaeem Mohamed Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7069484dbebc293f3696553ba1e38c67dba438f6 Author: Wenjing Liu Date: Fri May 10 12:43:53 2024 -0400 drm/amd/display: turn on symclk for dio virtual stream in dpms sequence [why] In order to support glitchless display clock ramping for virtual stream, we must turn on symclk for stream encoder. The code will power on phy and enable symclk for dio encoder during virtual stream dpms sequence. Reviewed-by: Dillon Varone Acked-by: Zaeem Mohamed Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 975507d73c44e9382478d6fd2d49c5e660cca4f4 Author: yi-lchen Date: Mon Apr 29 14:28:36 2024 +0800 drm/amd/display: Keep VBios pixel rate div setting until next mode set [why] Vbios & Driver have difference pixel rate div policy. When enabling fast boot & performing blank & unblank w/o timing setting, pixel clock & pixel rate dividor are not match. It would cause too high pixel reate and eDP would be black screen. [How] We would keep pixel rate div setting by Vbios until next timing setting. Reviewed-by: Jun Lei Acked-by: Zaeem Mohamed Signed-off-by: yi-lchen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dff60734fc7606fabde668ab6a26feacec8787cc Author: Mateusz Guzik Date: Tue Jun 4 17:52:56 2024 +0200 vfs: retire user_path_at_empty and drop empty arg from getname_flags No users after do_readlinkat started doing the job on its own. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240604155257.109500-3-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 969ce92da3112e05d1a70c344f8740a85e933f2e Author: Mateusz Guzik Date: Tue Jun 4 17:52:55 2024 +0200 vfs: stop using user_path_at_empty in do_readlinkat It is the only consumer and it saddles getname_flags with an argument set to NULL by everyone else. Instead the routine can do the empty check on its own. Then user_path_at_empty can get retired and getname_flags can lose the argument. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240604155257.109500-2-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit a9ebd10482d302831af3790da22954801ebdd525 Author: Alex Deucher Date: Fri May 31 13:40:03 2024 -0400 Revert "drm/amdgpu/gfx11: enable gfx pipe1 hardware support" This reverts commit 6670142d25f3cc3166f2a6c8454acd310bf2776a. Pierre-Eric reported problems with this on his navi33. Revert for now until we understand what is going wrong. Acked-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher Cc: Pierre-eric.Pelloux-prayer@amd.com commit b592d01df6efa2a4a93e360358b1f45057c80dda Author: Alex Deucher Date: Fri May 31 11:57:00 2024 -0400 drm/amdgpu: update gc_12_0_0 headers Add some additional registers. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 73e1d104ef7f5c9843abf4686513b3706538572a Author: Marek Olšák Date: Sat Apr 29 07:49:07 2023 -0400 drm/amdgpu: define new gfx12 uapi flags define new gfx12 uapi flags Signed-off-by: Marek Olšák Acked-by: Hawking Zhang Signed-off-by: Alex Deucher commit dfe190aff8814227314744d8ca5e946d0ca72e24 Author: Jesse Zhang Date: Thu May 30 10:41:03 2024 +0800 drm/amdkfd: remove dead code in the function svm_range_get_pte_flags The varible uncached set false, the condition uncached cannot be true. So remove the dead code, mapping flags will set the flag AMDGPU_VM_MTYPE_UC in else. Signed-off-by: Jesse Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 392829010238319689ee7aab5f9acffc23a53899 Author: Shane Xiao Date: Wed May 29 17:57:31 2024 +0800 drm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_NV10 This patch changes the implementation of AMDGPU_PTE_MTYPE_NV10, clear the bits before setting the new one. Suggested-by: Alex Deucher Signed-off-by: longlyao Signed-off-by: Shane Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 301dfbfc84e81f2ee80a84574432df52125d2b4a Author: Yifan Zhang Date: Thu May 23 14:10:30 2024 +0800 drm/amdgpu: disable lane0 L1TLB and enable lane1 L1TLB This patch to disable lane0 L1TLB and enable lane1 L1TLB. Signed-off-by: Yifan Zhang Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit b7e2170b87938f8a4664018111de3ba8c1ed2db3 Author: Yifan Zhang Date: Mon May 6 15:48:54 2024 +0800 drm/amdgpu: init SAW registers for mmhub v3.3 This patch to configure mmhub3.3 SAW registers Signed-off-by: Yifan Zhang Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 98f9e5ea474d834eed2e1fb163ef3ab956ef8205 Author: Tasos Sahanidis Date: Fri May 31 19:23:30 2024 +0300 drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds Flexible arrays used [1] instead of []. Replace the former with the latter to resolve multiple UBSAN warnings observed on boot with a BONAIRE card. In addition, use the __counted_by attribute where possible to hint the length of the arrays to the compiler and any sanitizers. Signed-off-by: Tasos Sahanidis Signed-off-by: Alex Deucher commit 34a6aa4e12dfa7a9cac031193bfc586bc015adf3 Author: Colin Ian King Date: Fri May 31 10:32:11 2024 +0100 drm/amd/display: Fix a handful of spelling mistakes There are a few spelling mistakes in dml2_printf messages. Fix them. Reviewed-by: Randy Dunlap Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit a1a049bd59b3a4b91619383a41b64a5b4e5a444d Author: Sunil Khatri Date: Fri May 31 12:37:39 2024 +0530 drm/amdgpu: fix comments and error message for ipdump Fix comments and error messages to rightly represent the information. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 33837d62a4cb5ef316dec4fada5c1012ddbc0239 Author: Sunil Khatri Date: Fri May 31 12:22:20 2024 +0530 drm/amdgpu: rename ip_dump_cp_queues to compute queues Rename the variable ip_dump_cp_queues to ip_dump_compute_queue as it represent compute queues. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 34b8d94b6ce478528467ece25191c69ba97c8180 Author: Sunil Khatri Date: Wed May 29 11:47:55 2024 +0530 drm/amdgpu: add cp queue registers for gfx9 ipdump Add gfx9 support of CP queue registers for all queues to be used by devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 173ef9182ae7242c3d2a8e3c59d6d51b88c70a0d Author: Sunil Khatri Date: Wed May 29 11:31:08 2024 +0530 drm/amdgpu: add print support for gfx9 ipdump Add support of gfx9 ipdump print so devcoredump could trigger it to dump the captured registers in devcoredump. Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 514dc965b26affc5f6c56d2fe367438932a286ae Author: Sunil Khatri Date: Wed May 29 11:20:20 2024 +0530 drm/amdgpu: add gfx9 register support in ipdump Add general registers of gfx9 in ipdump for devcoredump support. Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 745f7170db4ffd2f2e9751a2c719a97c9a5fc438 Author: Srinivasan Shanmugam Date: Sat May 25 07:39:01 2024 +0530 drm/amdgpu: Fix type mismatch in amdgpu_gfx_kiq_init_ring This commit fixes a type mismatch in the amdgpu_gfx_kiq_init_ring function triggered by the snprintf function expecting unsigned char arguments due to the '%hhu' format specifier, but receiving int and u32 arguments. The issue occurred because the arguments xcc_id, ring->me, ring->pipe, and ring->queue were of type int and u32, not unsigned char. This led to a type mismatch when these arguments were passed to snprintf. To resolve this, the snprintf line was modified to cast these arguments to unsigned char. This ensures that the arguments are of the correct type for the '%hhu' format specifier and resolves the warning. Fixes the below: >> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:4: warning: format >> specifies type 'unsigned char' but the argument has type 'int' >> [-Wformat] xcc_id, ring->me, ring->pipe, ring->queue); ^~~~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:12: warning: format >> specifies type 'unsigned char' but the argument has type 'u32' (aka >> 'unsigned int') [-Wformat] xcc_id, ring->me, ring->pipe, ring->queue); ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:22: warning: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Wformat] xcc_id, ring->me, ring->pipe, ring->queue); ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:333:34: warning: format specifies type 'unsigned char' but the argument has type 'u32' (aka 'unsigned int') [-Wformat] xcc_id, ring->me, ring->pipe, ring->queue); ^~~~~~~~~~~ 4 warnings generated. Fixes: 0ea554455542 ("drm/amdgpu: Fix snprintf usage in amdgpu_gfx_kiq_init_ring") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405250446.XeaWe66u-lkp@intel.com/ Cc: Lijo Lazar Cc: Alex Deucher Cc: Christian König Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c09d2eff81a997c169e0cacacd6b60c5e3aa33f2 Author: Jesse Zhang Date: Wed May 29 17:29:01 2024 +0800 drm/amdgu: fix Unintentional integer overflow for mall size Potentially overflowing expression mall_size_per_umc * adev->gmc.num_umc with type unsigned int (32 bits, unsigned) is evaluated using 32-bit arithmetic,and then used in a context that expects an expression of type u64 (64 bits, unsigned). Signed-off-by: Jesse Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a474161e84fc0b15534a80f8dfcbaf5e48fd8249 Author: Hawking Zhang Date: Thu May 30 16:02:12 2024 +0800 drm/amdgpu: Update programming for boot error reporting AMDGPU_RAS_GPU_ERR_BOOT_STATUS field is no longer valid. The polling sequence is also simplifed according to the latest firmware change. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 2bac084468847cfe5bbc7166082b2a208514bb1c Author: Bill Wendling Date: Wed May 29 14:54:44 2024 -0700 drm/radeon: Remove __counted_by from StateArray.states[] Work for __counted_by on generic pointers in structures (not just flexible array members) has started landing in Clang 19 (current tip of tree). During the development of this feature, a restriction was added to __counted_by to prevent the flexible array member's element type from including a flexible array member itself such as: struct foo { int count; char buf[]; }; struct bar { int count; struct foo data[] __counted_by(count); }; because the size of data cannot be calculated with the standard array size formula: sizeof(struct foo) * count This restriction was downgraded to a warning but due to CONFIG_WERROR, it can still break the build. The application of __counted_by on the states member of 'struct _StateArray' triggers this restriction, resulting in: drivers/gpu/drm/radeon/pptable.h:442:5: error: 'counted_by' should not be applied to an array with element of unknown size because 'ATOM_PPLIB_STATE_V2' (aka 'struct _ATOM_PPLIB_STATE_V2') is a struct type with a flexible array member. This will be an error in a future compiler version [-Werror,-Wbounds-safety-counted-by-elt-type-unknown-size] 442 | ATOM_PPLIB_STATE_V2 states[] __counted_by(ucNumEntries); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Remove this use of __counted_by to fix the warning/error. However, rather than remove it altogether, leave it commented, as it may be possible to support this in future compiler releases. Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/2028 Fixes: efade6fe50e7 ("drm/radeon: silence UBSAN warning (v3)") Signed-off-by: Bill Wendling Co-developed-by: Nathan Chancellor Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit 7d3b9668e668506bfee97806756b5945bbc45d78 Author: Alex Deucher Date: Wed May 8 15:22:59 2024 -0400 drm/amdgpu/soc24: use common nbio callback to set remap offset This fixes HDP flushes on systems with non-4K pages. Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 730ac573868b03ea668d368d5d279c5434ae205c Author: Tvrtko Ursulin Date: Tue May 28 13:57:11 2024 +0100 drm/amd/display: Convert some legacy DRM debug macros into appropriate categories Currently when one enables driver debugging dmesg gets spammed, at I suspect vblank rate, with messages like: [drm:amdgpu_dm_atomic_check [amdgpu]] MPO enablement requested on crtc:[00000000f073c3bb] Fix if by converting some logging from deprecated and incorrect DRM_DEBUG_DRIVER to drm_dbg_atomic. Plus some localized drive-by changes to drm_dbg_kms. By no means an exhaustive conversion but at least it allows turning on driver debug selectively. Signed-off-by: Tvrtko Ursulin Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 473af28d3e63b9b679c7878df33616c7ca6ea947 Author: Hawking Zhang Date: Tue May 28 13:52:46 2024 +0800 drm/amdgpu: Estimate RAS reservation when report capacity v2 Add estimate of how much vram we need to reserve for RAS when caculating the total available vram. v2: apply the change to MP0 v13_0_2 and v13_0_14 Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 76bec2a031630124002260c0ddc613b761819e2b Author: Tao Zhou Date: Mon May 20 16:47:32 2024 +0800 drm/amdgpu: use u32 for buf size in __amdgpu_eeprom_xfer And also make sure the value of msg[1].len should be in the range of u16. Signed-off-by: Tao Zhou Reviewed-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fda812ebe3d95ed9c7c894b9a2d4bfc2926d46ec Author: Jay Cornwall Date: Thu May 23 09:00:28 2024 -0500 drm/amdkfd: gfx12 context save/restore trap handler fixes Fix LDS size interpretation: 512 bytes (>= gfx12) vs 256 (< gfx12). Ensure STATE_PRIV.BARRIER_COMPLETE cannot change after reading or before writing. Other waves in the threadgroup may cause this field to assert if they complete the barrier. Do not overwrite EXCP_FLAG_PRIV.{SAVE_CONTEXT,HOST_TRAP} when restoring this register. Both of these fields can assert while the wavefront is running the trap handler. Signed-off-by: Jay Cornwall Reviewed-by: Lancelot Six Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 813e7d4cd05e16fa578563e4c4e62f3de4ee34fc Author: David (Ming Qiang) Wu Date: Thu May 23 10:50:18 2024 -0400 drm/amdgpu: drop some kernel messages in VCN code We have messages when the VCN fails to initialize and there is no need to report on success. Also PSP loading FWs is the default for production. Acked-by: Christian König Reviewed-by: Sonny Jiang Signed-off-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher commit eba791dc17547c78727778426962f855b52b266b Author: Shane Xiao Date: Wed May 29 17:53:11 2024 +0800 drm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_GFX12 This patch changes the implementation of AMDGPU_PTE_MTYPE_GFX12, clear the bits before setting the new one. This fixed the potential issue that GFX12 setting memory to NC. v2: Clear mtype field before setting the new one (Alex) v3: Fix typo (Felix) Suggested-by: Alex Deucher Signed-off-by: longlyao Signed-off-by: Shane Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 072088704433f75dacf9e33179dd7a81f0a238d4 Author: Andrii Nakryiko Date: Tue Jun 4 17:16:29 2024 -0700 libbpf: Remove callback-based type/string BTF field visitor helpers Now that all libbpf/bpftool code switched to btf_field_iter, remove btf_type_visit_type_ids() and btf_type_visit_str_offs() callback-based helpers as not needed anymore. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire Acked-by: Eduard Zingerman Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240605001629.4061937-6-andrii@kernel.org commit e1a8630291fde2a0edac2955e3df48587dac9906 Author: Andrii Nakryiko Date: Tue Jun 4 17:16:28 2024 -0700 bpftool: Use BTF field iterator in btfgen Switch bpftool's code which is using libbpf-internal btf_type_visit_type_ids() helper to new btf_field_iter functionality. This makes bpftool code simpler, but also unblocks removing libbpf's btf_type_visit_type_ids() helper completely. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire Reviewed-by: Quentin Monnet Acked-by: Eduard Zingerman Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240605001629.4061937-5-andrii@kernel.org commit c2641123696b572a3b059e1b45777317ba9f9086 Author: Andrii Nakryiko Date: Tue Jun 4 17:16:27 2024 -0700 libbpf: Make use of BTF field iterator in BTF handling code Use new BTF field iterator logic to replace all the callback-based visitor calls. There is still a .BTF.ext callback-based visitor APIs that should be converted, which will happens as a follow up. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire Acked-by: Eduard Zingerman Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240605001629.4061937-4-andrii@kernel.org commit 2bce2c1cb2f0acbf619737a10575f99df0c43984 Author: Andrii Nakryiko Date: Tue Jun 4 17:16:26 2024 -0700 libbpf: Make use of BTF field iterator in BPF linker code Switch all BPF linker code dealing with iterating BTF type ID and string offset fields to new btf_field_iter facilities. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire Acked-by: Eduard Zingerman Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240605001629.4061937-3-andrii@kernel.org commit 68153bb2fffbe59804370e514482f95c4b2053ff Author: Andrii Nakryiko Date: Tue Jun 4 17:16:25 2024 -0700 libbpf: Add BTF field iterator Implement iterator-based type ID and string offset BTF field iterator. This is used extensively in BTF-handling code and BPF linker code for various sanity checks, rewriting IDs/offsets, etc. Currently this is implemented as visitor pattern calling custom callbacks, which makes the logic (especially in simple cases) unnecessarily obscure and harder to follow. Having equivalent functionality using iterator pattern makes for simpler to understand and maintain code. As we add more code for BTF processing logic in libbpf, it's best to switch to iterator pattern before adding more callback-based code. The idea for iterator-based implementation is to record offsets of necessary fields within fixed btf_type parts (which should be iterated just once), and, for kinds that have multiple members (based on vlen field), record where in each member necessary fields are located. Generic iteration code then just keeps track of last offset that was returned and handles N members correctly. Return type is just u32 pointer, where NULL is returned when all relevant fields were already iterated. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire Acked-by: Eduard Zingerman Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20240605001629.4061937-2-andrii@kernel.org commit c793a62823d1ce8f70d9cfc7803e3ea436277cda Author: Sean Christopherson Date: Mon May 27 17:34:48 2024 -0700 sched/core: Drop spinlocks on contention iff kernel is preemptible Use preempt_model_preemptible() to detect a preemptible kernel when deciding whether or not to reschedule in order to drop a contended spinlock or rwlock. Because PREEMPT_DYNAMIC selects PREEMPTION, kernels built with PREEMPT_DYNAMIC=y will yield contended locks even if the live preemption model is "none" or "voluntary". In short, make kernels with dynamically selected models behave the same as kernels with statically selected models. Somewhat counter-intuitively, NOT yielding a lock can provide better latency for the relevant tasks/processes. E.g. KVM x86's mmu_lock, a rwlock, is often contended between an invalidation event (takes mmu_lock for write) and a vCPU servicing a guest page fault (takes mmu_lock for read). For _some_ setups, letting the invalidation task complete even if there is mmu_lock contention provides lower latency for *all* tasks, i.e. the invalidation completes sooner *and* the vCPU services the guest page fault sooner. But even KVM's mmu_lock behavior isn't uniform, e.g. the "best" behavior can vary depending on the host VMM, the guest workload, the number of vCPUs, the number of pCPUs in the host, why there is lock contention, etc. In other words, simply deleting the CONFIG_PREEMPTION guard (or doing the opposite and removing contention yielding entirely) needs to come with a big pile of data proving that changing the status quo is a net positive. Opportunistically document this side effect of preempt=full, as yielding contended spinlocks can have significant, user-visible impact. Fixes: c597bfddc9e9 ("sched: Provide Kconfig support for default dynamic preempt mode") Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ankur Arora Reviewed-by: Chen Yu Link: https://lore.kernel.org/kvm/ef81ff36-64bb-4cfe-ae9b-e3acf47bff24@proxmox.com commit f0dc887f21d18791037c0166f652c67da761f16f Author: Sean Christopherson Date: Mon May 27 17:34:47 2024 -0700 sched/core: Move preempt_model_*() helpers from sched.h to preempt.h Move the declarations and inlined implementations of the preempt_model_*() helpers to preempt.h so that they can be referenced in spinlock.h without creating a potential circular dependency between spinlock.h and sched.h. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ankur Arora Link: https://lkml.kernel.org/r/20240528003521.979836-2-ankur.a.arora@oracle.com commit f90cc919f9e5cbfcd0b952290c57ef1317f4e91e Author: Tim Chen Date: Fri May 31 13:54:52 2024 -0700 sched/balance: Skip unnecessary updates to idle load balancer's flags We observed that the overhead on trigger_load_balance(), now renamed sched_balance_trigger(), has risen with a system's core counts. For an OLTP workload running 6.8 kernel on a 2 socket x86 systems having 96 cores/socket, we saw that 0.7% cpu cycles are spent in trigger_load_balance(). On older systems with fewer cores/socket, this function's overhead was less than 0.1%. The cause of this overhead was that there are multiple cpus calling kick_ilb(flags), updating the balancing work needed to a common idle load balancer cpu. The ilb_cpu's flags field got updated unconditionally with atomic_fetch_or(). The atomic read and writes to ilb_cpu's flags causes much cache bouncing and cpu cycles overhead. This is seen in the annotated profile below. kick_ilb(): if (ilb_cpu < 0) test %r14d,%r14d ↑ js 6c flags = atomic_fetch_or(flags, nohz_flags(ilb_cpu)); mov $0x2d600,%rdi movslq %r14d,%r8 mov %rdi,%rdx add -0x7dd0c3e0(,%r8,8),%rdx arch_atomic_read(): 0.01 mov 0x64(%rdx),%esi 35.58 add $0x64,%rdx arch_atomic_fetch_or(): static __always_inline int arch_atomic_fetch_or(int i, atomic_t *v) { int val = arch_atomic_read(v); do { } while (!arch_atomic_try_cmpxchg(v, &val, val | i)); 0.03 157: mov %r12d,%ecx arch_atomic_try_cmpxchg(): return arch_try_cmpxchg(&v->counter, old, new); 0.00 mov %esi,%eax arch_atomic_fetch_or(): do { } while (!arch_atomic_try_cmpxchg(v, &val, val | i)); or %esi,%ecx arch_atomic_try_cmpxchg(): return arch_try_cmpxchg(&v->counter, old, new); 0.01 lock cmpxchg %ecx,(%rdx) 42.96 ↓ jne 2d2 kick_ilb(): With instrumentation, we found that 81% of the updates do not result in any change in the ilb_cpu's flags. That is, multiple cpus are asking the ilb_cpu to do the same things over and over again, before the ilb_cpu has a chance to run NOHZ load balance. Skip updates to ilb_cpu's flags if no new work needs to be done. Such updates do not change ilb_cpu's NOHZ flags. This requires an extra atomic read but it is less expensive than frequent unnecessary atomic updates that generate cache bounces. We saw that on the OLTP workload, cpu cycles from trigger_load_balance() (or sched_balance_trigger()) got reduced from 0.7% to 0.2%. Signed-off-by: Tim Chen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chen Yu Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20240531205452.65781-1-tim.c.chen@linux.intel.com commit 764d5fcc2a58d789629f6800451975fc93f25822 Author: Christian Loehle Date: Mon Jun 3 16:30:39 2024 +0100 idle: Remove stale RCU comment The call of rcu_idle_enter() from within cpuidle_idle_call() was removed in commit 1098582a0f6c ("sched,idle,rcu: Push rcu_idle deeper into the idle path") which makes the comment out of place. Signed-off-by: Christian Loehle Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/5b936388-47df-4050-9229-6617a6c2bba5@arm.com commit 168ed1e8d0893cc4ad5963d5920dcfd24e0d7591 Author: Bartosz Golaszewski Date: Wed Jun 5 14:14:49 2024 +0200 regulator: dt-bindings: describe the PMU module of the WCN7850 package The WCN7850 package contains discrete modules for WLAN and Bluetooth. They are powered by the Power Management Unit (PMU) that takes inputs from the host and provides LDO outputs. Extend the bindings for QCA6390 to also document this model. Acked-by: Mark Brown Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Link: https://msgid.link/r/20240605121450.23697-3-brgl@bgdev.pl Signed-off-by: Mark Brown commit b5cb34c93bd4e5559e64f57de9e67e926237535b Author: Bartosz Golaszewski Date: Wed Jun 5 14:14:48 2024 +0200 regulator: dt-bindings: describe the PMU module of the QCA6390 package The QCA6390 package contains discrete modules for WLAN and Bluetooth. They are powered by the Power Management Unit (PMU) that takes inputs from the host and provides LDO outputs. This document describes this module. Acked-by: Mark Brown Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski Link: https://msgid.link/r/20240605121450.23697-2-brgl@bgdev.pl Signed-off-by: Mark Brown commit f992572120fbec26c29f93fa2675ac34a0df369e Author: Alejandro Jimenez Date: Mon May 6 22:53:21 2024 +0000 KVM: x86: Keep consistent naming for APICv/AVIC inhibit reasons Keep kvm_apicv_inhibit enum naming consistent with the current pattern by renaming the reason/enumerator defined as APICV_INHIBIT_REASON_DISABLE to APICV_INHIBIT_REASON_DISABLED. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Alejandro Jimenez Link: https://lore.kernel.org/r/20240506225321.3440701-3-alejandro.j.jimenez@oracle.com Signed-off-by: Sean Christopherson commit 69148ccec679195f37c10af405eb5016eaf03992 Author: Alejandro Jimenez Date: Mon May 6 22:53:20 2024 +0000 KVM: x86: Print names of apicv inhibit reasons in traces Use the tracing infrastructure helper __print_flags() for printing flag bitfields, to enhance the trace output by displaying a string describing each of the inhibit reasons set. The kvm_apicv_inhibit_changed tracepoint currently shows the raw bitmap value, requiring the user to consult the source file where the inhibit reasons are defined to decode the trace output. Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20240506225321.3440701-2-alejandro.j.jimenez@oracle.com Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 6fef518594bcb7e374f809717281bd02894929f8 Author: Isaku Yamahata Date: Thu Apr 25 15:07:01 2024 -0700 KVM: x86: Add a capability to configure bus frequency for APIC timer Add KVM_CAP_X86_APIC_BUS_CYCLES_NS capability to configure the APIC bus clock frequency for APIC timer emulation. Allow KVM_ENABLE_CAPABILITY(KVM_CAP_X86_APIC_BUS_CYCLES_NS) to set the frequency in nanoseconds. When using this capability, the user space VMM should configure CPUID leaf 0x15 to advertise the frequency. Vishal reported that the TDX guest kernel expects a 25MHz APIC bus frequency but ends up getting interrupts at a significantly higher rate. The TDX architecture hard-codes the core crystal clock frequency to 25MHz and mandates exposing it via CPUID leaf 0x15. The TDX architecture does not allow the VMM to override the value. In addition, per Intel SDM: "The APIC timer frequency will be the processor’s bus clock or core crystal clock frequency (when TSC/core crystal clock ratio is enumerated in CPUID leaf 0x15) divided by the value specified in the divide configuration register." The resulting 25MHz APIC bus frequency conflicts with the KVM hardcoded APIC bus frequency of 1GHz. The KVM doesn't enumerate CPUID leaf 0x15 to the guest unless the user space VMM sets it using KVM_SET_CPUID. If the CPUID leaf 0x15 is enumerated, the guest kernel uses it as the APIC bus frequency. If not, the guest kernel measures the frequency based on other known timers like the ACPI timer or the legacy PIT. As reported by Vishal the TDX guest kernel expects a 25MHz timer frequency but gets timer interrupt more frequently due to the 1GHz frequency used by KVM. To ensure that the guest doesn't have a conflicting view of the APIC bus frequency, allow the userspace to tell KVM to use the same frequency that TDX mandates instead of the default 1Ghz. Reported-by: Vishal Annapurve Closes: https://lore.kernel.org/lkml/20231006011255.4163884-1-vannapurve@google.com Signed-off-by: Isaku Yamahata Reviewed-by: Rick Edgecombe Co-developed-by: Reinette Chatre Signed-off-by: Reinette Chatre Reviewed-by: Xiaoyao Li Reviewed-by: Yuan Yao Link: https://lore.kernel.org/r/6748a4c12269e756f0c48680da8ccc5367c31ce7.1714081726.git.reinette.chatre@intel.com Signed-off-by: Sean Christopherson commit b460256b162da3c3886df5b9c8f93126927df905 Author: Isaku Yamahata Date: Thu Apr 25 15:07:00 2024 -0700 KVM: x86: Make nanoseconds per APIC bus cycle a VM variable Introduce the VM variable "nanoseconds per APIC bus cycle" in preparation to make the APIC bus frequency configurable. The TDX architecture hard-codes the core crystal clock frequency to 25MHz and mandates exposing it via CPUID leaf 0x15. The TDX architecture does not allow the VMM to override the value. In addition, per Intel SDM: "The APIC timer frequency will be the processor’s bus clock or core crystal clock frequency (when TSC/core crystal clock ratio is enumerated in CPUID leaf 0x15) divided by the value specified in the divide configuration register." The resulting 25MHz APIC bus frequency conflicts with the KVM hardcoded APIC bus frequency of 1GHz. Introduce the VM variable "nanoseconds per APIC bus cycle" to prepare for allowing userspace to tell KVM to use the frequency that TDX mandates instead of the default 1Ghz. Doing so ensures that the guest doesn't have a conflicting view of the APIC bus frequency. Signed-off-by: Isaku Yamahata Reviewed-by: Maxim Levitsky Reviewed-by: Rick Edgecombe [reinette: rework changelog] Signed-off-by: Reinette Chatre Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/ae75ce37c6c38bb4efd10a0a41932984c40b24ac.1714081726.git.reinette.chatre@intel.com Signed-off-by: Sean Christopherson commit f9e1cbf1805e14688f6175b688c0a8216bf67a11 Author: Isaku Yamahata Date: Thu Apr 25 15:06:59 2024 -0700 KVM: x86: hyper-v: Calculate APIC bus frequency for Hyper-V Remove APIC_BUS_FREQUENCY and calculate it based on nanoseconds per APIC bus cycle. APIC_BUS_FREQUENCY is used only for HV_X64_MSR_APIC_FREQUENCY. The MSR is not frequently read, calculate it every time. There are two constants related to the APIC bus frequency: APIC_BUS_FREQUENCY and APIC_BUS_CYCLE_NS. Only one value is required because one can be calculated from the other: APIC_BUS_CYCLES_NS = 1000 * 1000 * 1000 / APIC_BUS_FREQUENCY. Remove APIC_BUS_FREQUENCY and instead calculate it when needed. This prepares for support of configurable APIC bus frequency by requiring to change only a single variable. Suggested-by: Maxim Levitsky Signed-off-by: Isaku Yamahata Reviewed-by: Maxim Levitsky Reviewed-by: Xiaoyao Li Reviewed-by: Rick Edgecombe [reinette: rework changelog] Signed-off-by: Reinette Chatre Link: https://lore.kernel.org/r/76a659d0898e87ebd73ee7c922f984a87a6ab370.1714081726.git.reinette.chatre@intel.com Signed-off-by: Sean Christopherson commit 16c0bad7ae04e4a1e7361fbb91573248de06a008 Author: Andy Shevchenko Date: Wed May 8 18:15:55 2024 +0300 iommu/arm-smmu-v3: Use *-y instead of *-objs in Makefile *-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Andy Shevchenko Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240508151611.1444352-1-andriy.shevchenko@linux.intel.com Signed-off-by: Will Deacon commit d3867e7148318e12b5d69b64950622f5ed06fe86 Author: Mostafa Saleh Date: Tue Jun 4 18:52:18 2024 +0000 iommu/arm-smmu-v3: Avoid uninitialized asid in case of error Static checker is complaining about the ASID possibly set uninitialized. This only happens in case of error and this value would be ignored anyway. A simple fix would be just to initialize the local variable to zero, this path will only be reached on the first attach to a domain where the CD is already initialized to zero. This avoids having to bloat the function with an error path. Closes: https://lore.kernel.org/linux-iommu/849e3d77-0a3c-43c4-878d-a0e061c8cd61@moroto.mountain/T/#u Reported-by: Dan Carpenter Signed-off-by: Mostafa Saleh Fixes: 04905c17f648 ("iommu/arm-smmu-v3: Build the whole CD in arm_smmu_make_s1_cd()") Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20240604185218.2602058-1-smostafa@google.com Signed-off-by: Will Deacon commit 54751f4d5406760f46305725cc61fb72260971b6 Merge: 69e0b33a7fce4 f086edef71be7 Author: David S. Miller Date: Wed Jun 5 13:42:55 2024 +0100 Merge branch 'tcp-rto-min-us' Kevin Yang says: ==================== tcp: add sysctl_tcp_rto_min_us Adding a sysctl knob to allow user to specify a default rto_min at socket init time. After this patch series, the rto_min will has multiple sources: route option has the highest precedence, followed by the TCP_BPF_RTO_MIN socket option, followed by this new tcp_rto_min_us sysctl. v3: fix typo, simplify min/max_t to min/max v2: fit line width to 80 column. v2: https://lore.kernel.org/netdev/20240530153436.2202800-1-yyd@google.com/ v1: https://lore.kernel.org/netdev/20240528171320.1332292-1-yyd@google.com/ ==================== Signed-off-by: David S. Miller commit f086edef71be7174a16c1ed67ac65a085cda28b1 Author: Kevin Yang Date: Mon Jun 3 21:30:54 2024 +0000 tcp: add sysctl_tcp_rto_min_us Adding a sysctl knob to allow user to specify a default rto_min at socket init time, other than using the hard coded 200ms default rto_min. Note that the rto_min route option has the highest precedence for configuring this setting, followed by the TCP_BPF_RTO_MIN socket option, followed by the tcp_rto_min_us sysctl. Signed-off-by: Kevin Yang Reviewed-by: Neal Cardwell Reviewed-by: Yuchung Cheng Reviewed-by: Eric Dumazet Reviewed-by: Tony Lu Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 512bd0f9f926a05c724a9fd72bc4e14213845e01 Author: Kevin Yang Date: Mon Jun 3 21:30:53 2024 +0000 tcp: derive delack_max with tcp_rto_min helper Rto_min now has multiple sources, ordered by preprecedence high to low: ip route option rto_min, icsk->icsk_rto_min. When derive delack_max from rto_min, we should not only use ip route option, but should use tcp_rto_min helper to get the correct rto_min. Signed-off-by: Kevin Yang Reviewed-by: Neal Cardwell Reviewed-by: Yuchung Cheng Reviewed-by: Eric Dumazet Reviewed-by: Tony Lu Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit f6c823f9b9d40f6811a6da4bcf6005a52f28c6d6 Author: Jani Nikula Date: Thu May 23 16:37:06 2024 +0300 drm/xe: drop redundant W=1 warnings from Makefile Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across the subsystem"), most of the extra warnings in the driver Makefile are redundant. Remove them. Note that -Wmissing-declarations and -Wmissing-prototypes are always enabled by default in scripts/Makefile.extrawarn. Acked-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/958a67adcbb64d3a387d2a07d83b05d71176e938.1716471145.git.jani.nikula@intel.com commit 3cd7271987ffd89c2d5eaeea85d3e9a16aec6894 Author: Ingo Molnar Date: Wed Jun 5 13:44:28 2024 +0200 sched/headers: Move struct pre-declarations to the beginning of the header There's a random number of structure pre-declaration lines in kernel/sched/sched.h, some of which are unnecessary duplicates. Move them to the head & order them a bit for readability. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org commit 127f6bf1618868920c1f77e0a427d1f4570e450b Author: Ingo Molnar Date: Wed Jun 5 13:39:31 2024 +0200 sched/core: Clean up kernel/sched/sched.h a bit - Fix whitespace noise - Fix col80 linebreak damage where possible - Apply CodingStyle consistently - Use consistent #else and #endif comments - Use consistent vertical alignment - Use 'extern' consistently Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org commit f99b052256f16224687e5947772f0942bff73fc1 Author: Ravi Bangoria Date: Wed Jun 5 11:48:10 2024 +0000 KVM: SNP: Fix LBR Virtualization for SNP guest SEV-ES and thus SNP guest mandates LBR Virtualization to be _always_ ON. Although commit b7e4be0a224f ("KVM: SEV-ES: Delegate LBR virtualization to the processor") did the correct change for SEV-ES guests, it missed the SNP. Fix it. Reported-by: Srikanth Aithal Fixes: b7e4be0a224f ("KVM: SEV-ES: Delegate LBR virtualization to the processor") Signed-off-by: Ravi Bangoria Message-ID: <20240605114810.1304-1-ravi.bangoria@amd.com> Signed-off-by: Paolo Bonzini commit 69e0b33a7fce4d96649b9fa32e56b696921aa48e Author: Eric Dumazet Date: Mon Jun 3 15:51:06 2024 +0000 tcp: annotate data-races around tw->tw_ts_recent and tw->tw_ts_recent_stamp These fields can be read and written locklessly, add annotations around these minor races. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b907194a5d5bcd3b01d28d095f6a4d9fcd9c5354 Author: Anshumali Gaur Date: Mon Jun 3 16:52:48 2024 +0530 octeontx2-af: Add debugfs support to dump NIX TM topology This patch adds support to dump NIX transmit queue topology. There are multiple levels of scheduling/shaping supported by NIX and a packet traverses through multiple levels before sending the packet out. At each level, there are set of scheduling/shaping rules applied to a packet flow. Each packet traverses through multiple levels SQ->SMQ->TL4->TL3->TL2->TL1 and these levels are mapped in a parent-child relationship. This patch dumps the debug information related to all TM Levels in the following way. Example: $ echo > /sys/kernel/debug/octeontx2/nix/tm_tree $ cat /sys/kernel/debug/octeontx2/nix/tm_tree A more desriptive set of registers at each level can be dumped in the following way. Example: $ echo > /sys/kernel/debug/octeontx2/nix/tm_topo $ cat /sys/kernel/debug/octeontx2/nix/tm_topo Signed-off-by: Anshumali Gaur Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dd3cac0ac7ec4921dc93af884997a44c4e59b4e8 Author: Jani Nikula Date: Thu May 23 16:37:05 2024 +0300 drm/i915: drop redundant W=1 warnings from Makefile Since commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across the subsystem"), most of the extra warnings in the driver Makefile are redundant. Remove them. Note that -Wmissing-declarations and -Wmissing-prototypes are always enabled by default in scripts/Makefile.extrawarn. Acked-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/490931748fa9a1dbac2bceda0c4b778240b10b58.1716471145.git.jani.nikula@intel.com commit 85c9a8f4531c6c0862ecda50cac662b0b78d1974 Author: Ingo Molnar Date: Wed Jun 5 13:01:44 2024 +0200 sched/core: Simplify prefetch_curr_exec_start() Remove unnecessary use of the address operator. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org commit e5cddc34067acf7848f63c014761ed232172f027 Author: Peng Fan Date: Tue May 14 21:18:33 2024 +0800 pmdomain: arm: scmi_pm_domain: set flag GENPD_FLAG_ACTIVE_WAKEUP Set flag GENPD_FLAG_ACTIVE_WAKEUP to scmi genpd, then when a device is set as wakeup source using device_set_wakeup_enable, the power domain could be kept on to make sure the device could wakeup the system. Signed-off-by: Peng Fan Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20240514131833.911703-1-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit 196e9f5bf2c566682f52fb6a25276794dded2fe9 Author: Geert Uytterhoeven Date: Wed May 29 11:20:20 2024 +0200 pmdomain: renesas: rmobile-sysc: Use for_each_child_of_node_scoped() Use the scoped variant of for_each_child_of_node() to simplify cleanup handling. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/5e684d7b236904e5f79324a5e5357c2930f7402d.1716974368.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit 0ddaf2c1a2c6c3a7bdc275581cd3b6098e0e5353 Author: Geert Uytterhoeven Date: Wed May 29 11:19:12 2024 +0200 pmdomain: core: Use genpd_is_irq_safe() helper Use the genpd_is_irq_safe() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3cd8131b4f1284bdffa23a2b6a9a1e92fd17973e.1716973951.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit ee4f8b74ecec3d9b338175fe2733c6188b69ff09 Author: Xianwei Zhao Date: Wed May 29 11:10:34 2024 +0800 pmdomain: amlogic: Add support for A4 power domains controller Add support for A4 power controller. A4 power control registers are in secure domain, and should be accessed by SMC. Reviewed-by: Neil Armstrong Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240529-a4_secpowerdomain-v2-2-47502fc0eaf3@amlogic.com Signed-off-by: Ulf Hansson commit 5bbe5872fed4497a192556426d75fd9223c5bfeb Author: Xianwei Zhao Date: Wed May 29 11:10:33 2024 +0800 dt-bindings: power: add Amlogic A4 power domains Add devicetree binding document and related header file for Amlogic A4 secure power domains. Acked-by: Krzysztof Kozlowski Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240529-a4_secpowerdomain-v2-1-47502fc0eaf3@amlogic.com Signed-off-by: Ulf Hansson commit 17419f5c6d409bcce5d094279a6fed5d5dbdba12 Author: Ville Syrjälä Date: Fri May 31 14:53:42 2024 +0300 drm/i915: Protect CRC reg macro arguments for consistency It's probably a good idea to start protecting all macro arguments to avoid any cargo-cult mistakes when people go looking for examples of how to define these things. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit fddb9fa961a1ba5ddf0e076df3374137906ca48a Author: Ville Syrjälä Date: Fri May 31 14:53:41 2024 +0300 drm/i915: Define the PIPE_CRC_EXP registers I need a scratch register which fill the following requirements: - can be accessed via DSB - all the bits can be read/written - no serious side effects So far the only thing I could think of is the "expected CRC" register. Add the definition so I can use it. While I only need the hsw+ variant currently, let's define the older variants as well for completeness. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-7-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 31951bbe3e9f9399bf903cc68a2c0c7eedbb26b7 Author: Ville Syrjälä Date: Fri May 31 14:53:40 2024 +0300 drm/i915: Document which platforms have which CRC registers Sprinkle some comments around to indicate which CRC registers are valid for which platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7bd7cfa83359d7204b5c479f91f03bc153d69832 Author: Ville Syrjälä Date: Fri May 31 14:53:39 2024 +0300 drm/i915: Add a separate definition for PIPE_CRC_RES_HSW On hsw+ we only have one CRC result register, instead of the five we have on ivb, and some of the others have been repurposed to serve other CRC related purposes. Since the hsw+ vs. pre-hsw register operate quite differently let's add a separate definition for the hsw+ variant to make the situation a bit more clear. Also since we only use this from a hsw+ codepath there is no real benefit to be had with reusing the ivb register definition. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1ec6defe71ee8ecab72399a29f258c12f826c8df Author: Ville Syrjälä Date: Fri May 31 14:53:38 2024 +0300 drm/i915: Regroup pipe CRC regs Put all the definitions related to a single pipe CRC register in one place, instead of the current approach where things are spread all over the place. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1c1bfd8b0b7ccf1d82b531875f13e35d7f96e086 Author: Ville Syrjälä Date: Fri May 31 14:53:37 2024 +0300 drm/i915: Switch PIPE_CRC_RES_*_IVB to _MMIO_PIPE() PIPE_CRC_RES_*_IVB are proper pipe registers, and only valid for IVB+ where pipe register blocks are equally spaced, so we can switch from _MMIO_TRANS2() to the simpler _MMIO_PIPE() for these. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ccb6ba9eba6f267e4ca3689152ddedb6351f673b Author: Ville Syrjälä Date: Fri May 31 14:53:36 2024 +0300 drm/i915: Extract intel_pipe_crc_regs.h The CRC registers are a pretty self contained bunch. Extract them to a separate header to declutter i915_reg.h. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8b329d74fb6dbc920c17185a36089b3b7f4f64e1 Author: Ville Syrjälä Date: Fri May 31 14:41:01 2024 +0300 drm/i915/dsb: Use intel_color_uses_dsb() Use intel_color_uses_dsb() instead of open coding it in intel_vblank_evade_init(). Make the logic around DSB a bit more isolated from the rest of the code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-5-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 81d604f44b1880a278197a4d076bddc83e763af5 Author: Ville Syrjälä Date: Fri May 31 14:41:00 2024 +0300 drm/i915/dsb: Pass DSB engine ID to intel_dsb_prepare() Allow the caller of intel_dsb_prepare() to determine which DSB engine (out of the three possible per pipe) to use. This will let us utilize multiple DSB engines during the same commit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-4-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 738f3d86182ed5f6d09205db6f0ba3c498c20d69 Author: Ville Syrjälä Date: Fri May 31 14:40:59 2024 +0300 drm/i915/dsb: Move DSB ID definition to the header We're going to need to make the DSB ID visible outside the DSB code, so that we eg. can use multiple DSB engines in parallel. to that end move the definition to intel_dsb.h. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-3-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 7f57f21510de2c76596af7a51804e6f1abc0be00 Author: Ville Syrjälä Date: Fri May 31 14:40:58 2024 +0300 drm/i915/dsb: Polish the DSB ID enum Namespace the DSB ID enum properly, and make the naming match other such enums in general. Also make the names 0 based as that's what Bspec uses for DSB (unlike eg. planes where it uses 1 based indexing). We'll throw out INVALID_DSB while at it since we have no use for it at the moment. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240531114101.19994-2-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit dadc295cbd03955cc1ba55af55e23a06713d1a5f Author: Jeff Johnson Date: Tue Jun 4 19:21:59 2024 -0700 RAS/AMD/ATL: Add a missing module description Add a missing module description. [ bp: Massage commit message. ] Signed-off-by: Jeff Johnson Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240604-md-ras-amd-atl-v1-1-d4eb3cf3abe4@quicinc.com commit fd70f0443e24c3888bf4b7f198df6d705c9b8ab2 Merge: 61578f6793788 b072aa7899189 Author: David S. Miller Date: Wed Jun 5 10:24:58 2024 +0100 Merge branch 'devlink-const' Christophe JAILLET says: ==================== devlink: Constify struct devlink_dpipe_table_ops Patch 1 updates devl_dpipe_table_register() and struct devlink_dpipe_table to accept "const struct devlink_dpipe_table_ops". Then patch 2 updates the only user of this function. This is compile tested only. ==================== Signed-off-by: David S. Miller commit b072aa7899189127e26b2daf8c38933c994f97d3 Author: Christophe JAILLET Date: Sun Jun 2 16:18:53 2024 +0200 mlxsw: spectrum_router: Constify struct devlink_dpipe_table_ops 'struct devlink_dpipe_table_ops' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 15557 712 0 16269 3f8d drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.o After: ===== text data bss dec hex filename 15789 488 0 16277 3f95 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.o Signed-off-by: Christophe JAILLET Reviewed-by: Wojciech Drewek Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 82dc29b9737edf2d13561ebcf6212c0b88c41129 Author: Christophe JAILLET Date: Sun Jun 2 16:18:52 2024 +0200 devlink: Constify the 'table_ops' parameter of devl_dpipe_table_register() "struct devlink_dpipe_table_ops" only contains some function pointers. Update "struct devlink_dpipe_table" and the 'table_ops' parameter of devl_dpipe_table_register() so that structures in drivers can be constified. Constifying these structures will move some data to a read-only section, so increase overall security. Signed-off-by: Christophe JAILLET Reviewed-by: Wojciech Drewek Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 310ec03841a36e3f45fb528f0dfdfe5b9e84b037 Author: Barry Song Date: Wed Jun 5 13:26:05 2024 +1200 dma-buf: align fd_flags and heap_flags with dma_heap_allocation_data dma_heap_allocation_data defines the UAPI as follows: struct dma_heap_allocation_data { __u64 len; __u32 fd; __u32 fd_flags; __u64 heap_flags; }; However, dma_heap_buffer_alloc() casts both fd_flags and heap_flags into unsigned int. We're inconsistent with types in the non UAPI arguments. This patch fixes it. Signed-off-by: Barry Song Acked-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20240605012605.5341-1-21cnbao@gmail.com commit 61578f67937881abf54c8bd258eb913312dbe4c1 Author: Daniel Golle Date: Sat Jun 1 01:35:03 2024 +0200 net: phy: aquantia: add support for PHY LEDs Aquantia Ethernet PHYs got 3 LED output pins which are typically used to indicate link status and activity. Add a minimal LED controller driver supporting the most common uses with the 'netdev' trigger as well as software-driven forced control of the LEDs. Signed-off-by: Daniel Golle [ rework indentation, fix checkpatch error and improve some functions ] Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c11d5dbbe73fa7b450aaa77bb18df86a9714b422 Author: Christian Marangi Date: Sat Jun 1 01:35:02 2024 +0200 net: phy: aquantia: move priv and hw stat to header In preparation for LEDs support, move priv and hw stat to header to reference priv struct also in other .c outside aquantia.main Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a23b0034e93453cecf435637dfdb14560eeda6c8 Author: Dr. David Alan Gilbert Date: Sat Jun 1 00:30:06 2024 +0100 net: ethtool: remove unused struct 'cable_test_tdr_req_info' 'cable_test_tdr_req_info' is unused since the original commit f2bc8ad31a7f ("net: ethtool: Allow PHY cable test TDR data to configured"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f97e8c040e2c1130a8cc91861590510d5d40a878 Author: Marek Vasut Date: Sun Apr 28 00:10:10 2024 +0200 dt-bindings: arm: stm32: Add compatible string for DH electronics STM32MP13xx DHCOR DHSBC board Add DT compatible string for DH electronics STM32MP13xx DHCOR SoM and DHSBC carrier board. This stm32mp135f-dhcor-dhsbc board is a stack of DHCOR SoM based on STM32MP135F SoC (900MHz / crypto capabilities) populated on DHSBC carrier board. The SoM contains the following peripherals: - STPMIC (power delivery) - 512MB DDR3L memory - eMMC and SDIO WiFi module The DHSBC carrier board contains the following peripherals: - Two RGMII Ethernet ports - USB-A Host port, USB-C peripheral port, USB-C power supply plug - Expansion connector Signed-off-by: Marek Vasut Acked-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue commit 6f49c3fb563c0a95a838216eaf7d9b02ece44bf5 Author: Dr. David Alan Gilbert Date: Sat Jun 1 00:29:17 2024 +0100 net: caif: remove unused structs 'cfpktq' has been unused since commit 73d6ac633c6c ("caif: code cleanup"). 'caif_packet_funcs' is declared but never defined. Remove both of them. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 61e2bbafb00e4b9a5de45e6448a7b6b818658576 Author: Jason Xing Date: Fri May 31 23:46:34 2024 +0800 net: remove NULL-pointer net parameter in ip_metrics_convert When I was doing some experiments, I found that when using the first parameter, namely, struct net, in ip_metrics_convert() always triggers NULL pointer crash. Then I digged into this part, realizing that we can remove this one due to its uselessness. Signed-off-by: Jason Xing Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit cdbdb3c62af5bc13e6e8a9310470c71c33340d26 Author: Chen Hanxiao Date: Fri May 31 16:54:02 2024 +0800 net: bridge: fix an inconsistent indentation Smatch complains: net/bridge/br_netlink_tunnel.c: 318 br_process_vlan_tunnel_info() warn: inconsistent indenting Fix it with a proper indenting Signed-off-by: Chen Hanxiao Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 3374136f3137ecdb34be228c715db6d6e0b97476 Author: Linus Walleij Date: Thu May 30 23:53:07 2024 +0200 dt-bindings: dsa: Rewrite Vitesse VSC73xx in schema This rewrites the Vitesse VSC73xx DSA switches DT binding in schema. It was a bit tricky since I needed to come up with some way of applying the SPI properties only on SPI devices and not platform devices, but I figured something out that works. Signed-off-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Signed-off-by: David S. Miller commit f37c8d3ba5262dc4aee83c58958817c8360f1455 Author: Sean Nyekjaer Date: Wed May 22 10:23:30 2024 +0200 ARM: dts: stm32: osd32: move pwr_regulators to common According to the OSD32MP1 Power System overview[1] pwr_regulators; vdd-supply and vdd_3v3_usbfs-supply are hard-wired internally in the SIP module to vdd and ldo4. [1]: https://octavosystems.com/app_notes/osd32mp1-power-system-overview/#connections Signed-off-by: Sean Nyekjaer Signed-off-by: Alexandre Torgue commit 7010a17fb12a0febd6002d5bae8c4bf14039ae8c Author: Sean Nyekjaer Date: Wed May 22 10:23:29 2024 +0200 ARM: dts: stm32: osd32: move usb phy power to common According to the OSD32MP1 Power System overview[1] usb phy power is hard-wired internally in the SIP module to ldo4. [1]: https://octavosystems.com/app_notes/osd32mp1-power-system-overview/#connections Signed-off-by: Sean Nyekjaer Signed-off-by: Alexandre Torgue commit 9c3951ec27b947ea419b48294ff7342fd15005dc Author: Tvrtko Ursulin Date: Tue Jun 4 17:02:10 2024 +0100 drm/v3d: Fix perfmon build error/warning Move static const array into the source file to fix the "defined but not used" errors. The fix is perhaps not the prettiest due hand crafting the array sizes in v3d_performance_counters.h, but I did add some build time asserts to validate the counts look sensible, so hopefully it is good enough for a quick fix. Signed-off-by: Tvrtko Ursulin Fixes: 3cbcbe016c31 ("drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405211137.hueFkLKG-lkp@intel.com/Cc: Maíra Canal Cc: Iago Toral Quiroga Cc: Jani Nikula Cc: Ashutosh Dixit Reviewed-by: Iago Toral Quiroga Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240604160210.24073-1-tursulin@igalia.com commit 4306c047415a227bc72f0e7ba9bde1ccdac10435 Author: Marek Vasut Date: Mon May 13 23:58:15 2024 +0200 ARM: dts: stm32: Add arm,no-tick-in-suspend to STM32MP15xx STGEN timer STM32MP15xx RM0436 Rev 6 section 46.3 System timer generator (STGEN) states " Arm recommends that the system counter is in an always-on power domain. This is not supported in the current implementation, therefore STGEN should be saved and restored before Standby mode entry, and restored at Standby exit by secure software. ... " Instead of piling up workarounds in the firmware which is difficult to update, add "arm,no-tick-in-suspend" DT property into the timer node to indicate the timer is stopped in suspend, and let the kernel fix the timer up. Fixes: 8471a20253eb ("ARM: dts: stm32: add stm32mp157c initial support") Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue commit 8832fc1e502687869606bb0a7b79848ed3bf036f Author: Jan Kara Date: Mon May 20 15:23:37 2024 +0200 udf: Fix lock ordering in udf_evict_inode() udf_evict_inode() calls udf_setsize() to truncate deleted inode. However inode deletion through udf_evict_inode() can happen from inode reclaim context and udf_setsize() grabs mapping->invalidate_lock which isn't generally safe to acquire from fs reclaim context since we allocate pages under mapping->invalidate_lock for example in a page fault path. This is however not a real deadlock possibility as by the time udf_evict_inode() is called, nobody can be accessing the inode, even less work with its page cache. So this is just a lockdep triggering false positive. Fix the problem by moving mapping->invalidate_lock locking outsize of udf_setsize() into udf_setattr() as grabbing mapping->invalidate_lock from udf_evict_inode() is pointless. Reported-by: syzbot+0333a6f4b88bcd68a62f@syzkaller.appspotmail.com Fixes: b9a861fd527a ("udf: Protect truncate and file type conversion with invalidate_lock") Signed-off-by: Jan Kara commit c1f1b25a6089eb93a11a147e8de766c0d6ad29ac Author: Jan Kara Date: Mon May 20 15:18:44 2024 +0200 udf: Drop pointless IS_IMMUTABLE and IS_APPEND check udf_setsize() checks for IS_IMMUTABLE and IS_APPEND flags. This is however pointless as UDF does not have capability to store these flags and never allows to set them. Furthermore this is the only place in UDF code that was actually checking these flags. Remove the pointless check. Signed-off-by: Jan Kara commit 03fceb8dbd09923f271271a438da049f75eb9c10 Author: Jeff Johnson Date: Sun May 26 12:05:23 2024 -0700 isofs: add missing MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/isofs/isofs.o Signed-off-by: Jeff Johnson Signed-off-by: Jan Kara Message-Id: <20240526-md-fs-isofs-v1-1-60e2e36a3d46@quicinc.com> commit 96544a93eda44ec177760ae6b511188dfc6b047e Author: Jeff Johnson Date: Sun May 26 11:53:49 2024 -0700 jbd2: add missing MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/jbd2/jbd2.o Signed-off-by: Jeff Johnson Signed-off-by: Jan Kara Message-Id: <20240526-md-fs-jbd2-v1-1-7bba6665327d@quicinc.com> commit 3d058df954ebdb592fd421e0005f6d0c25da21ed Author: Yannick Fertre Date: Mon May 6 16:49:45 2024 +0200 ARM: dts: stm32: add goodix touchscreen on stm32mp135f-dk Touchscreen reset needs to be configured via the pinctrl not the driver (a pull-down resistor has been soldered onto the reset line which forces the touchscreen to reset state). Interrupt line must have a pull-down resistor in order to freeze the i2c address at 0x5D. Signed-off-by: Yannick Fertre Signed-off-by: Alexandre Torgue commit 26c7b370eba6127431c82d1cbf5081f6b5674db6 Author: Alain Volmat Date: Fri Apr 26 17:05:25 2024 +0200 ARM: dts: stm32: enable camera support on stm32mp135f-dk board On STM32MP135F-DK board the camera support is made of the CSI based GC2145 sensor, connected to the ST-MIPID02 CSI to parallel bridge, connected to the DCMIPP parallel input. Signed-off-by: Alain Volmat Signed-off-by: Alexandre Torgue commit 0948424cd5e77c1f16ec64837dc1d51f71db7dd5 Author: Alain Volmat Date: Fri Apr 26 17:05:24 2024 +0200 ARM: dts: stm32: add DCMIPP pinctrl on STM32MP13x SoC family Adds DCMIPP pinctrl support and assigns dedicated GPIO pins. Signed-off-by: Alain Volmat Signed-off-by: Alexandre Torgue commit 9c8d852dabbd49f4894d5d998ede8b98eb091921 Author: Patrick Delaunay Date: Thu Apr 25 17:45:55 2024 +0200 arm64: dts: st: add power domain on stm32mp25 Add power domains on STM32MP25x SoC for supported low power modes: - CPU_PD0/1: domain for idle of each core Cortex A35 (CStop) - CLUSTER_PD: D1 domain with Stop1 and LP-Stop1 modes support when the Cortex A35 cluster and each device assigned to CPU1=CA35 are deactivated - RET_PD: D1 domain retention (VDDCore is reduced) to support the LPLV-Stop1 mode Signed-off-by: Patrick Delaunay Signed-off-by: Alexandre Torgue commit 172e422ffea20a89bfdc672741c1aad6fbb5044e Author: Amir Goldstein Date: Sun May 12 13:30:07 2024 +0200 fsnotify: clear PARENT_WATCHED flags lazily In some setups directories can have many (usually negative) dentries. Hence __fsnotify_update_child_dentry_flags() function can take a significant amount of time. Since the bulk of this function happens under inode->i_lock this causes a significant contention on the lock when we remove the watch from the directory as the __fsnotify_update_child_dentry_flags() call from fsnotify_recalc_mask() races with __fsnotify_update_child_dentry_flags() calls from __fsnotify_parent() happening on children. This can lead upto softlockup reports reported by users. Fix the problem by calling fsnotify_update_children_dentry_flags() to set PARENT_WATCHED flags only when parent starts watching children. When parent stops watching children, clear false positive PARENT_WATCHED flags lazily in __fsnotify_parent() for each accessed child. Suggested-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Stephen Brennan Signed-off-by: Jan Kara commit 8b01f970ee890574b3607c85781354a765c849bd Author: Nirmoy Das Date: Mon Jun 3 10:17:23 2024 +0200 drm/xe: Use missing lock in relay_needs_worker Add missing lock that is protecting relay->incoming_actions. Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240603081723.18775-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit 624aa659afbc902cd279ae719a2f58a22dca88c0 Author: Valentin Caron Date: Mon May 20 16:00:24 2024 +0200 arm64: dts: st: add usart6 on stm32mp257f-ev1 board Add node for USART6 on stm32mp257f-ev1 board. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit 066cfdcd75a6844c6a09751637261c9f1d5baad7 Author: Valentin Caron Date: Mon May 20 16:00:23 2024 +0200 arm64: dts: st: add usart6 pinctrl used on stm32mp257f-ev1 board Add pins for USART6 on GPIO connector on stm32mp257f-ev1 board. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit c3aa0dccf0ccbdd2c2ad556382bbae95344e4992 Author: Valentin Caron Date: Mon May 20 16:00:22 2024 +0200 arm64: dts: st: add usart nodes on stm32mp25 Update device-tree stm32mp251.dtsi to add some USART features. Add u(s)art 1, 3, 4, 5, 6, 7, 8, 9 nodes and compatible, interrupts, clocks, access-controllers properties. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit 922306a253e20ad5d0c4b8479d2dc5df9f325a04 Author: Wei Yang Date: Sat May 25 02:30:40 2024 +0000 mm/mm_init.c: move nr_initialised reset down a bit We don't need to count nr_initialised in two cases: * for low zones that are always populated * after first_deferred_pfn is detected Let's move the nr_initialised reset down a bit to reduce some comparison of prev_end_pfn and end_pfn. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240525023040.13509-3-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 93bbbcb1e762a49fc18ee1272545b77371595f1e Author: Wei Yang Date: Sat May 25 02:30:39 2024 +0000 mm/memblock: fix a typo in description of for_each_mem_region() No functional change. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240525023040.13509-2-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 3be381d11f872de066774317031ba8edd2d8797e Author: Wei Yang Date: Sat May 25 02:30:38 2024 +0000 mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn Just like what it does in "if (mirrored_kernelcore)", we should use memblock_region_memory_base_pfn() to get the startpfn. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240525023040.13509-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit b73f6b98bbd0b4c1fdcebc0c5b926349455035bf Author: Wei Yang Date: Tue May 7 07:58:32 2024 +0000 mm/memblock: use PAGE_ALIGN_DOWN to get pgend in free_memmap Leverage the macro PAGE_ALIGN_DOWN to get pgend. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240507075833.6346-7-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 1eb0a28d039a479bb4adec0320592caf5bd5175b Author: Wei Yang Date: Tue May 7 07:58:31 2024 +0000 mm/memblock: return true directly on finding overlap region Not necessary to break and check i against type->cnt again. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240507075833.6346-6-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 1a879671bdfd14698a839f30de8e6d76e1e858fd Author: Wei Yang Date: Tue May 7 07:58:30 2024 +0000 memblock tests: add memblock_overlaps_region_checks Add a test case for memblock_overlaps_region(). Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240507075833.6346-5-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 3aca2cea907c647ee7720b7ba22734f9e8e7cfa3 Author: Wei Yang Date: Tue May 7 07:58:29 2024 +0000 mm/memblock: fix comment for memblock_isolate_range() The isolated range is [*@start_rgn, *@end_rgn - 1], while the comment says "the end region inside the range" is *@end_rgn. Let's correct it. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240507075833.6346-4-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit f6df89c3582a337090ae1f37c3648bdb35da29f7 Author: Wei Yang Date: Tue May 7 07:58:28 2024 +0000 memblock tests: add memblock_reserve_many_may_conflict_check() This may trigger the case fixed by commit 48c3b583bbdd ("mm/memblock: fix overlapping allocation when doubling reserved array"). This is done by adding the 129th reserve region into memblock.memory. If memblock_double_array() use this reserve region as new array, it fails. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240507075833.6346-3-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 3d3165193776ddacf59f101f0fa05cfab9f1a9ba Author: Wei Yang Date: Tue May 7 07:58:27 2024 +0000 memblock tests: add memblock_reserve_all_locations_check() Instead of adding 129th memory block at the last position, let's try all possible position. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20240507075833.6346-2-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 721f4a6526daafca15634f30c9865e880da3e1d1 Author: Wei Yang Date: Fri Apr 5 01:58:21 2024 +0000 mm/memblock: remove empty dummy entry The dummy entry is introduced in the initial implementation of lmb in commit 7c8c6b9776fb ("powerpc: Merge lmb.c and make MM initialization use it."). As the comment says the empty dummy entry is to simplify the code. /* Create a dummy zero size LMB which will get coalesced away later. * This simplifies the lmb_add() code below... */ While current code is reimplemented by Tejun in commit 784656f9c680 ("memblock: Reimplement memblock_add_region()"). This empty dummy entry seems not benefit the code any more. Let's remove it. Signed-off-by: Wei Yang CC: Paul Mackerras CC: Tejun Heo CC: Mike Rapoport Link: https://lore.kernel.org/r/20240405015821.13411-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) commit 6e043ff6350267bb39de01499a8ad0035c729393 Author: Gabriel Fernandez Date: Wed May 29 15:13:10 2024 +0200 arm64: dts: st: enable STM32 access controller for RCC Use an STM32 access controller to filter the registration of clocks. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre Torgue commit 4fbf92d51cbc8c5d2d4ea1fcfad4cd8365047f4d Author: Etienne Carriere Date: Tue May 21 10:01:31 2024 +0200 arm64: dts: st: OP-TEE async notif on PPI 15 for stm32mp25 Define GIC PPI 15 (aka GIC interrupt line 31) for OP-TEE asynchronous notification. Signed-off-by: Etienne Carriere Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit c393538e01a1b92a63899023857b8140100ca7f3 Author: Tejas Upadhyay Date: Mon Jun 3 16:19:51 2024 +0530 drm/xe/xe2lpg: Add permanent wa_14020756599 For xe2_lpg render Wa_14020756599 is applied to all steppings. Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240603104951.705603-3-tejas.upadhyay@intel.com commit 131328aa5699c35ad0db0a4da75b38fae2379d23 Author: Tejas Upadhyay Date: Mon Jun 3 16:19:50 2024 +0530 drm/xe/xe2lpm: Add permanent Wa_14020756599 For xe2_lpm Wa_14020756599 is applied to all steppings and when RCS is present on graphics GT. V5(MattR): - Add more comments about new API V4: - Make it part of lrc wa - Check for RCS as rtp rule V3(MattR): - Rename rtp api name - Use MEDIA_VERx100 V2: - Remove engine filter video decode - Fix typo GRAPHICS/MEDIA/s - Himal Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240603104951.705603-2-tejas.upadhyay@intel.com commit 106d6739823369c734a8fc3b13634274eee4f60e Author: Daisuke Nojiri Date: Tue Jun 4 16:08:25 2024 -0700 platform/chrome: cros_ec_proto: Upgrade get_next_event to v3 Upgrade EC_CMD_GET_NEXT_EVENT to version 3. The max supported version will be v3. So, we speak v3 even if the EC says it supports v4+. Signed-off-by: Daisuke Nojiri Link: https://lore.kernel.org/r/20240604230837.2878737-1-dnojiri@chromium.org [tzungbi: uint32_t -> u32 per suggested by checkpatch.pl] Signed-off-by: Tzung-Bi Shih commit ba098ed9829c5de4d65e5708d08d3508f2e70a7d Author: Daisuke Nojiri Date: Tue Jun 4 10:01:48 2024 -0700 platform/chrome: Add struct ec_response_get_next_event_v3 Add struct ec_response_get_next_event_v3 to upgrade EC_CMD_GET_NEXT_EVENT to version 3. Signed-off-by: Daisuke Nojiri Link: https://lore.kernel.org/r/20240604170552.2517189-1-dnojiri@chromium.org Signed-off-by: Tzung-Bi Shih commit f51b2db9b9794e822bebec8c7f3d1115ed778a56 Merge: 5074f488d4e6b daf613331c938 Author: Martin K. Petersen Date: Tue Jun 4 22:22:11 2024 -0400 Merge patch series "Declare local functions static" Bart Van Assche says: Hi Martin, There are several 32-bit ARM SCSI drivers that trigger compiler warnings about missing function declarations. This patch series fixes these compiler warnings by declaring local functions static. Please consider this patch series for the next merge window. Thanks, Bart. Link: https://lore.kernel.org/r/20240603172311.1587589-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit daf613331c9388dec1b8c56565583afcdf87a053 Author: Bart Van Assche Date: Mon Jun 3 10:23:11 2024 -0700 scsi: powertec: Declare local function static Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240603172311.1587589-5-bvanassche@acm.org Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 1dc98be418149feb79779af45abe0fe6243243e9 Author: Bart Van Assche Date: Mon Jun 3 10:23:10 2024 -0700 scsi: eesox: Declare local function static Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240603172311.1587589-4-bvanassche@acm.org Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 1414045725a00f40d52ffb4c866d6efeab02c37a Author: Bart Van Assche Date: Mon Jun 3 10:23:09 2024 -0700 scsi: cumana: Declare local function static Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240603172311.1587589-3-bvanassche@acm.org Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit f5a954bbf2f4309a222f56162f2cd576b7b27f48 Author: Bart Van Assche Date: Mon Jun 3 10:23:08 2024 -0700 scsi: acornscsi: Declare local functions static Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240603172311.1587589-2-bvanassche@acm.org Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 5074f488d4e6bde3a94538a7e847e70eed0db993 Merge: e8a1d87b7983b a420a8ed0a924 Author: Martin K. Petersen Date: Tue Jun 4 22:16:22 2024 -0400 Merge patch series "ufs: pci: Add support UFSHCI 4.0 MCQ" Minwoo Im says: This patchset introduces add support for MCQ introduced in UFSHCI 4.0. The first patch adds a simple helper to get the address of MCQ queue config registers. The second one enables MCQ feature by adding mandatory vops callback functions required at MCQ initialization phase. The last one is to prevent a case where number of MCQ is given 1 since driver allocates poll_queues first rather than I/O queues to handle device commands. Instead of causing exception handlers due to no I/O queue, failfast during the initialization time. Link: https://lore.kernel.org/r/20240531212244.1593535-1-minwoo.im@samsung.com Signed-off-by: Martin K. Petersen commit a420a8ed0a92488a04b34dfc262101c87940c800 Author: Minwoo Im Date: Sat Jun 1 06:22:44 2024 +0900 scsi: ufs: mcq: Prevent no I/O queue case for MCQ If hba_maxq equals poll_queues, which means there are no I/O queues (HCTX_TYPE_DEFAULT, HCTX_TYPE_READ), the very first hw queue will be allocated as HCTX_TYPE_POLL and it will be used as the dev_cmd_queue. In this case, device commands such as QUERY cannot be properly handled. This patch prevents the initialization of MCQ when the number of I/O queues is not set and only the number of POLL queues is set. Signed-off-by: Minwoo Im Link: https://lore.kernel.org/r/20240531212244.1593535-3-minwoo.im@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 175d1825ca4d2288fee734ada0955a1e36dd50e6 Author: Minwoo Im Date: Sat Jun 1 06:22:43 2024 +0900 scsi: ufs: pci: Add support MCQ for QEMU-based UFS Recently, ufs-mcq feature has been introduced to QEMU hw/ufs device [1]. This patch adds MCQ support for upstream QEMU UFS PCI controller. This patch provides mandatory vops callbacks to make UFS controller work properly on MCQ mode. Operation and Runtime Config register stride is fixed to 48bytes which is implemented by qemu. [1] https://lore.kernel.org/qemu-devel/cover.1716876237.git.jeuk20.kim@samsung.com/ Signed-off-by: Minwoo Im Link: https://lore.kernel.org/r/20240531212244.1593535-2-minwoo.im@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 0770ceaff2f6a084d4d020295cfba6c5ef278cf4 Author: Dr. David Alan Gilbert Date: Sun Jun 2 01:07:09 2024 +0100 perf hisi-ptt: remove unused struct 'hisi_ptt_queue' 'hisi_ptt_queue' has been unused since the original commit 5e91e57e6809 ("perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jonathan Cameron Reviewed-by: Ian Rogers Cc: yangyicong@hisilicon.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240602000709.213116-1-linux@treblig.org commit ba5d9a91f8c3caf6867b3b87dce080d056222561 Author: Luca Weiss Date: Wed Apr 24 18:24:00 2024 +0200 arm64: dts: qcom: msm8994: Use mboxes properties for APCS Instead of passing the syscon to the various nodes, use the mbox interface using the mboxes property. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-7-6556c47cb501@z3ntu.xyz Signed-off-by: Bjorn Andersson commit a3d5570d8c8c6efc3d15d015b517f4e8bd11898f Author: Luca Weiss Date: Wed Apr 24 18:23:59 2024 +0200 arm64: dts: qcom: msm8976: Use mboxes properties for APCS Instead of passing the syscon to the various nodes, use the mbox interface using the mboxes property. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-6-6556c47cb501@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 11dff973ebe21950c7c5221919141fb0cb16354e Author: Luca Weiss Date: Wed Apr 24 18:23:58 2024 +0200 arm64: dts: qcom: msm8953: Use mboxes properties for APCS Instead of passing the syscon to the various nodes, use the mbox interface using the mboxes property. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-5-6556c47cb501@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 22e4e43484c4dd1f29a72cc62411072758e0681a Author: Luca Weiss Date: Wed Apr 24 18:23:57 2024 +0200 arm64: dts: qcom: msm8939: Use mboxes properties for APCS Instead of passing the syscon to the various nodes, use the mbox interface using the mboxes property. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-4-6556c47cb501@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 3e971470619d80dd343e3abd80cb997bcb48f200 Author: Luca Weiss Date: Wed Apr 24 18:23:56 2024 +0200 arm64: dts: qcom: msm8916: Use mboxes properties for APCS Instead of passing the syscon to the various nodes, use the mbox interface using the mboxes property. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-3-6556c47cb501@z3ntu.xyz Signed-off-by: Bjorn Andersson commit d904c09b73fe9b0503e94f1c013d962e87a08123 Author: Luca Weiss Date: Wed Apr 24 18:23:55 2024 +0200 ARM: dts: qcom: msm8974: Use mboxes properties for APCS Instead of passing the syscon to the various nodes, use the mbox interface using the mboxes property. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424-apcs-mboxes-v1-2-6556c47cb501@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 898ac74c5b5f8b551a377d6a60ca4e30023ac9d2 Author: Yonghong Song Date: Tue Jun 4 11:00:34 2024 -0700 selftests/bpf: Ignore .llvm. suffix in kallsyms_find() I hit the following failure when running selftests with internal backported upstream kernel: test_ksyms:PASS:kallsyms_fopen 0 nsec test_ksyms:FAIL:ksym_find symbol 'bpf_link_fops' not found #123 ksyms:FAIL In /proc/kallsyms, we have $ cat /proc/kallsyms | grep bpf_link_fops ffffffff829f0cb0 d bpf_link_fops.llvm.12608678492448798416 The CONFIG_LTO_CLANG_THIN is enabled in the kernel which is responsible for bpf_link_fops.llvm.12608678492448798416 symbol name. In prog_tests/ksyms.c we have kallsyms_find("bpf_link_fops", &link_fops_addr) and kallsyms_find() compares "bpf_link_fops" with symbols in /proc/kallsyms in order to find the entry. With bpf_link_fops.llvm. in /proc/kallsyms, the kallsyms_find() failed. To fix the issue, in kallsyms_find(), if a symbol has suffix .llvm., that suffix will be ignored for comparison. This fixed the test failure. Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240604180034.1356016-1-yonghong.song@linux.dev commit 522f88da1b984a03a1b99d60eee6d8f42be8fc15 Merge: 9d52d7ea64cc9 c4cfe1136d6ed Author: Mark Brown Date: Tue Jun 4 20:23:45 2024 +0100 ASoC: simple-card: sync support Merge series from Kuninori Morimoto : We have simple-card / audio-graph / audio-graph2, basically these supports same feature but is using different DT style. Because we are using 3 drivers, some feature was added to one driver, but other drivers doesn't have it. This patch set try to sync it on these 3 drivers. commit 9d52d7ea64cc936ed2b3bb2c9056d7c661fbade2 Merge: f7a7fe2c2cf13 f13b349e3c703 Author: Mark Brown Date: Tue Jun 4 20:23:38 2024 +0100 ASoC: fsl_xcvr: Support i.MX95 platform Merge series from Shengjiu Wang : On i.MX95 wakeup domain, there is one instance of Audio XCVR supporting SPDIF mode with a connection to the Audio XCVR physical interface. commit f7a7fe2c2cf134b9eec105f787ebb0f479d26c33 Merge: 39d762edd1f35 8080dde80a2d3 Author: Mark Brown Date: Tue Jun 4 20:23:30 2024 +0100 Dead structs in sound/soc/codecs Merge series from linux@treblig.org: Clean out a bunch of old structs in sound/soc/codecs. Build tested only. commit 9bc8b4d27c410f62742bad6a05639ee3e13f49eb Author: Ramona Gradinariu Date: Tue May 28 17:24:08 2024 +0300 docs: iio: add documentation for interfacing tools Add documentation for IIO interfacing tools describing the available tools which can be used to retrieve data from IIO sysfs. Reference this documentation in adis16475.rst Signed-off-by: Ramona Gradinariu Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240528142409.239187-6-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 85b2aeaa2f4cb495a688292d175f09b8010990fe Author: Ramona Gradinariu Date: Tue May 28 17:24:07 2024 +0300 iio: adis16480: add support for adis16545/7 families The ADIS16545 and ADIS16547 are a complete inertial system that includes a triaxis gyroscope and a triaxis accelerometer. The serial peripheral interface (SPI) and register structure provide a simple interface for data collection and configuration control. These devices are similar to the ones already supported in the driver, with changes in the scales, timings and the max spi speed in burst mode. Also, they support delta angle and delta velocity readings in burst mode, for which support was added in the trigger handler. Co-developed-by: Nuno Sá Signed-off-by: Ramona Gradinariu Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240528142409.239187-5-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 1c083963fccd84ff9375d6383f9c97557750e94d Author: Ramona Gradinariu Date: Tue May 28 17:24:06 2024 +0300 dt-bindings: iio: imu: Add ADIS16545/47 compatibles Add ADIS16545/47 compatibles. Each newly added device has a different angular velocity/linear acceleration scale combination, as follows: Accel dynamic range: - 8g: ADIS16545 - 40g: ADIS16547 Gyro dynamic range: - 125 deg/sec: ADIS1545-1, ADIS16547-1 - 450 deg/sec: ADIS1545-2, ADIS16547-2 - 2000 deg/sec: ADIS1545-3, ADIS16547-3 Signed-off-by: Ramona Gradinariu Reviewed-by: Conor Dooley Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240528142409.239187-4-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 196f5406baa55c05746c4b3733c7d80a91ecdeeb Author: Ramona Gradinariu Date: Tue May 28 17:24:05 2024 +0300 iio: imu: adis16480.c: Add delta angle and delta velocity channels Add support for delta angle and delta velocity raw readings to adis16480 driver. The following devices do not support delta readings in burst mode: ADIS16375, ADIS16480, ADIS16485, ADIS16488, ADIS16490, ADIS16495-1, ADIS16495-2, ADIS16495-3, ADIS16497-1, ADIS16497-2, ADIS16497-3, thus they cannot be retrieved via the buffer interface. For these devices, the delta measurements are retrieved by performing normal register readings and are made available through the raw attributes of the specific channels. Signed-off-by: Ramona Gradinariu Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240528142409.239187-3-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 8c0a438fa037fde88eeeb415e1ac77e133ee6930 Author: Ramona Gradinariu Date: Tue May 28 17:24:04 2024 +0300 iio: adis16480: make the burst_max_speed configurable With this, we can pass the maxixum spi burst speed to the 'ADIS16480_DATA()' macro. This is in preparation to support new devices that have a different speed than the one used so far. Co-developed-by: Nuno Sá Signed-off-by: Ramona Gradinariu Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240528142409.239187-2-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit f95920baa0666758ca87977ab6d853e8bc24961c Author: Ramona Gradinariu Date: Mon May 27 17:26:18 2024 +0300 drivers: iio: imu: Add support for adis1657x family Add support for ADIS1657X family devices in already exiting ADIS16475 driver. Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-10-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit 647a2c81fe7bcb7ac2fdbbc085d00456e027b32b Author: Ramona Gradinariu Date: Mon May 27 17:26:17 2024 +0300 dt-bindings: iio: imu: Add ADIS1657X family devices compatibles Add ADIS1657X family devices compatibles and specify the according maximum SPI baudrate. Similarly to other ADIS1650X devices, ADIS1657X supports sync-mode values [0,2]. Each newly added device has a different angular velocity/linear acceleration/ delta velocity scale combination, as follows: Accel dynamic range sensitivity: - 262144000 LSB/g: ADIS16575 - 52428800 LSB/g: ADIS16576, ADIS16577 Gyro dynamic range sensitivity: - 2621440 LSB/deg/sec: ADIS1575-2, ADIS1576-2, ADIS1577-2 - 655360 LSB/deg/sec: ADIS1575-3, ADIS1576-3, ADIS1577-3 Delta velocity sensitivity: - 2^15/100 LSB/m/sec: ADIS16575 - 2^15/125 LSB/m/sec: ADIS16576 - 2^15/400 LSB/m/sec: ADIS16577 Each ADIS1657X device supports FIFO usage and a sample-rate of 4.1KHz, meanwhile the already existing devices do not support FIFO usage and have a maximum sample-rate of 2.1KHz. Reviewed-by: Conor Dooley Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-9-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit c6900c9a931852952e4e316e82a92657a93c0dbd Author: Ramona Gradinariu Date: Mon May 27 17:26:16 2024 +0300 iio: imu: adis16475: Re-define ADIS16475_DATA Re-define ADIS16475_DATA such that it takes _burst_max_len, _burst_max_speed_hz and _has_fifo as parameters. Also, do a preparatory rename operation for ADIS16475_BURST32_MAX_DATA to ADIS16475_BURST32_MAX_DATA_NO_TS32 to be able to differentiate in the future between devices which are using 16-bit or 32-bit timestamp size in burst mode. Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-8-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit 01724ce2d9405b2246bbb69701c74880eb56a34b Author: Ramona Gradinariu Date: Mon May 27 17:26:15 2024 +0300 iio: imu: adis_trigger: Allow level interrupts for FIFO readings Currently, adis library allows configuration only for edge interrupts, needed for data ready sampling. This patch removes the restriction for level interrupts for devices which have FIFO support. Furthermore, in case of devices which have FIFO support, devm_request_threaded_irq is used for interrupt allocation, to avoid flooding the processor with the FIFO watermark level interrupt, which is active until enough data has been read from the FIFO. Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-7-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit f5657c7751d73db8d88c6eee556dce6534620a1f Author: Ramona Gradinariu Date: Mon May 27 17:26:14 2024 +0300 drivers: iio: imu: adis16475: generic computation for sample rate Currently adis16475 supports a sample rate between 1900 and 2100 Hz. This patch changes the setting of sample rate from hardcoded values to a generic computation based on the internal clock frequency. This is a preparatory patch for adding support for adis1657x family devices which allow sample rates between 3900 and 4100 Hz. Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-6-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit 880b1b1fbef5e6dc6bbcdb25311b9a030adf5a4e Author: Ramona Gradinariu Date: Mon May 27 17:26:13 2024 +0300 iio: imu: adis16475: Create push single sample API Create push single sample API reposnsible for pushing a single sample into the buffer. This is a preparation patch for FIFO support where more than one sample has to be pushed in the trigger handler. Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-5-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit b6e6aca6c2b1b53fb4db4b672eaa2722a75aa6a2 Author: Ramona Gradinariu Date: Mon May 27 17:26:12 2024 +0300 iio: imu: adis_buffer: Add buffer setup API with buffer attributes Add new API called devm_adis_setup_buffer_and_trigger_with_attrs() which also takes buffer attributes as a parameter. Rewrite devm_adis_setup_buffer_and_trigger() implementation such that it calls devm_adis_setup_buffer_and_trigger_with_attrs() with buffer attributes parameter NULL Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-4-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit 64c65fac71b09d4d0edc24af4cfbb5123dad6f6b Author: Ramona Gradinariu Date: Mon May 27 17:26:11 2024 +0300 drivers: iio: imu: Add support for ADIS16501 Add support for ADIS16501 device in already existing ADIS16475 driver. Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-3-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit 6859fba8c1481df1a0daae1405ee14f04f5952d3 Author: Ramona Gradinariu Date: Mon May 27 17:26:10 2024 +0300 dt-bindings: iio: imu: Add ADIS16501 compatibles Add ADIS16501 compatible. Similarly to other ADIS1650X devices, ADIS16501 supports sync-mode values [0,2]. There are two differences between ADIS16501 and ADIS16477-2: - ADIS16501 does not support pulse sync mode - the delta velocity scale value is different Acked-by: Conor Dooley Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20240527142618.275897-2-ramona.bolboaca13@gmail.com Signed-off-by: Jonathan Cameron commit 15b08012852f40ce89c3237a557b68397916685e Author: Julien Stephan Date: Thu May 30 10:14:12 2024 -0500 iio: adc: ad7380: add oversampling support ad7380x(-4) parts are able to do oversampling to increase accuracy. This chips supports a normal oversampling mode and a rolling mode and also allows enabling and disabling extra resolution bits when oversampling is enabled. We have intentionally left out the rolling mode for now as there is not a compelling use case for it. User can process a captured data buffer to get the same effect. We are also currently not supporting changing the oversampling mode independently of the resolution bits. The resolution boost feature can only be enabled when oversampling is enabled and oversampling is not as useful without the resolution boost. So for now we consider the features tightly coupled. When oversampling is enabled, the resolution boost is enabled and when oversampling is disabled, the resolution boost is disabled. Since the resolution boost feature causes 16-bit chips to now have 18-bit data which means the storagebits has to change from 16 to 32 bits, we use the new ext_scan_type feature to allow changing the scan_type at runtime based on if the resolution boost is enabled or not. SPI message optimization has to be moved since now some of the xfer parameters change based on the resolution boost mode. A few neighboring comments are also fixed up while we are touching this code. Signed-off-by: Julien Stephan Co-developed-by: David Lechner Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240530-iio-add-support-for-multiple-scan-types-v3-5-cbc4acea2cfa@baylibre.com Signed-off-by: Jonathan Cameron commit 99d46eecf98fe9af4573363fcb5c8d8d36ce875e Author: David Lechner Date: Thu May 30 10:14:11 2024 -0500 iio: adc: ad7380: use spi_optimize_message() This changes the AD7380 to use spi_optimize_message() to optimize buffered reads. This changes both direct reads and buffered reads to use the same spi_message. This has some (welcome) side effects. The first is that in buffered reads, the timestamp will now correspond to the same sample rather than the previous sample. The second is that direct reads now use the same SPI bus speed as buffered reads. This reduces CPU usage of the IRQ thread from around 25% to around 20% when sampling at 10 kHz on a ZedBoard. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240530-iio-add-support-for-multiple-scan-types-v3-4-cbc4acea2cfa@baylibre.com Signed-off-by: Jonathan Cameron commit d8f2bb50845f2797f594ffe3cac9417abff4d7b0 Author: David Lechner Date: Thu May 30 10:14:10 2024 -0500 iio: add support for multiple scan types per channel This adds new fields to the iio_channel structure to support multiple scan types per channel. This is useful for devices that support multiple resolution modes or other modes that require different data formats of the raw data. To make use of this, drivers need to implement the new callback get_current_scan_type() to resolve the scan type for a given channel based on the current state of the driver. There is a new scan_type_ext field in the iio_channel structure that should be used to store the scan types for any channel that has more than one. There is also a new flag has_ext_scan_type that acts as a type discriminator for the scan_type/ext_scan_type union. A union is used so that we don't grow the size of the iio_channel structure and also makes it clear that scan_type and ext_scan_type are mutually exclusive. The buffer code is the only code in the IIO core code that is using the scan_type field. This patch updates the buffer code to use the new iio_channel_validate_scan_type() function to ensure it is returning the correct scan type for the current state of the device when reading the sysfs attributes. The buffer validation code is also update to validate any additional scan types that are set in the scan_type_ext field. Part of that code is refactored to a new function to avoid duplication. Some userspace tools may need to be updated to re-read the scan type after writing any other attribute. During testing, we noticed that we had to restart iiod to get it to re-read the scan type after enabling oversampling on the ad7380 driver. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240530-iio-add-support-for-multiple-scan-types-v3-3-cbc4acea2cfa@baylibre.com Signed-off-by: Jonathan Cameron commit 7758562898033a3bd98a24d2a541c930b0fc98e6 Author: David Lechner Date: Thu May 30 10:14:09 2024 -0500 iio: buffer: use struct iio_scan_type to simplify code By using struct iio_scan_type, we can simplify the code by removing lots of duplicate pointer dereferences. This make the code a bit easier to read. This also prepares for a future where channels may have more than one scan_type. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240530-iio-add-support-for-multiple-scan-types-v3-2-cbc4acea2cfa@baylibre.com Signed-off-by: Jonathan Cameron commit fd7179ece035417f44f7ecff086d6df674d8a5bd Author: David Lechner Date: Thu May 30 10:14:08 2024 -0500 iio: introduce struct iio_scan_type This gives the channel scan_type a named type so that it can be used to simplify code in later commits. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240530-iio-add-support-for-multiple-scan-types-v3-1-cbc4acea2cfa@baylibre.com Signed-off-by: Jonathan Cameron commit 737413da870452c38fccd88108d4418d9cc94a9b Author: Julien Stephan Date: Tue May 28 16:20:34 2024 +0200 iio: adc: ad7380: add support for ad738x-4 4 channels variants Add support for ad7380/1/2/3-4 parts which are 4 channels variants from ad7380/1/2/3 Signed-off-by: Julien Stephan Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-7-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit 1a291cc8ee17d1473a8ebf2ce2a5b49b0461b8fb Author: Julien Stephan Date: Tue May 28 16:20:33 2024 +0200 dt-bindings: iio: adc: ad7380: add support for ad738x-4 4 channels variants Add compatible support for ad7380/1/3/4-4 parts which are 4 channels variants from ad7380/1/3/4 Signed-off-by: Julien Stephan Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-6-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit baa781e1d84f2165c480c28d2c286e465d3fb2e1 Author: Julien Stephan Date: Tue May 28 16:20:32 2024 +0200 iio: adc: ad7380: prepare for parts with more channels The current driver supports only parts with 2 channels. In order to prepare the support of new compatible ADCs with more channels, this commit: - defines MAX_NUM_CHANNEL to specify the maximum number of channels currently supported by the driver - adds available_scan_mask member in ad7380_chip_info structure - fixes spi xfer struct len depending on number of channels - fixes scan_data.raw buffer size to handle more channels - adds a timing specifications structure in ad7380_chip_info structure Signed-off-by: Julien Stephan Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-5-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit 2920b6ee6d69ed874b8cc60e5a0b930aca102e18 Author: David Lechner Date: Tue May 28 16:20:31 2024 +0200 iio: adc: ad7380: add support for pseudo-differential parts Add support for AD7383, AD7384 pseudo-differential compatible parts. Pseudo differential parts require common mode voltage supplies so add the support for them and add the support of IIO_CHAN_INFO_OFFSET to retrieve the offset Signed-off-by: David Lechner Signed-off-by: Julien Stephan Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-4-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit 6b2c80194e151d8ce41849f97a6ca13c8ca30a32 Author: David Lechner Date: Tue May 28 16:20:30 2024 +0200 dt-bindings: iio: adc: ad7380: add pseudo-differential parts Adding AD7383 and AD7384 compatible parts that are pseudo-differential. Pseudo-differential require common mode voltage supplies, so add them conditionally Signed-off-by: David Lechner Signed-off-by: Julien Stephan Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-3-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit b095217c104bca87d5e24c147b3e37cae921c441 Author: David Lechner Date: Tue May 28 16:20:29 2024 +0200 iio: adc: ad7380: new driver for AD7380 ADCs This adds a new driver for the AD7380 family ADCs. The driver currently implements basic support for the AD7380, AD7381, 2-channel differential ADCs. Support for additional single-ended, pseudo-differential and 4-channel chips that use the same register map as well as additional features of the chip will be added in future patches. [Julien Stephan: fix rx/tx buffer for regmap access] [Julien Stephan: fix scale issue] [Julien Stephan: use the new iio_device_claim_direct_scoped instead of iio_device_claim_direct_mode] Co-developed-by: Stefan Popa Signed-off-by: Stefan Popa Reviewed-by: Nuno Sa Signed-off-by: David Lechner [Julien Stephan: add datasheet links of supported parts] Signed-off-by: Julien Stephan Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-2-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit c4ea781c20e2d10a2de5005dbf6e24f1cc676b09 Author: David Lechner Date: Tue May 28 16:20:28 2024 +0200 dt-bindings: iio: adc: Add binding for AD7380 ADCs This adds a binding specification for the Analog Devices Inc. AD7380 family of ADCs. Signed-off-by: David Lechner Signed-off-by: Julien Stephan Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240528-adding-new-ad738x-driver-v7-1-4cd70a4c12c8@baylibre.com Signed-off-by: Jonathan Cameron commit 70a0e10f8ab62ba82b080347ca0a119e14e964c9 Author: Nuno Sa Date: Fri May 31 11:41:55 2024 +0200 iio: adc: adi-axi-adc: make sure DRP is locked on enable When enabling the core, make sure DRP (Dynamic Reconfiguration Port) is locked. Most of the designs don't really use it but we still get the lock bit set. So let's do it all the time so the code is generic. While at it reduce the timeout time to 1 microsecond as it seems to be enough and goes in line with what we have on the similar DAC core (adi-axi-dac). Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240531-dev-axi-adc-drp-v3-2-e3fa79447c67@analog.com Signed-off-by: Jonathan Cameron commit 202b89f4b778d86a940f693785600acaccca6a2b Author: Nuno Sa Date: Fri May 31 11:41:54 2024 +0200 iio: adc: adi-axi-adc: don't allow concurrent enable/disable calls Add proper mutex guards as we should not be able to disable the core in the middle of enabling it. Note there's no need to rush in backporting this as the only user of the backend does not do anything crazy.. Fixes: 794ef0e57854 ("iio: adc: adi-axi-adc: move to backend framework") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240531-dev-axi-adc-drp-v3-1-e3fa79447c67@analog.com Signed-off-by: Jonathan Cameron commit 9be46ec5606e6e1aa4b9c6086762ed82f34ceaae Author: Dr. David Alan Gilbert Date: Wed May 29 17:00:55 2024 +0100 staging: iio: adt7316: remove unused struct 'adt7316_limit_regs' 'adt7316_limit_regs' has never been used since the original commit 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver"). The comment above it is a copy-and-paste from a different struct. Remove both the struct and the comment. Reviewed-by: Nuno Sa Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240529160055.28489-1-linux@treblig.org Signed-off-by: Jonathan Cameron commit e2261b4a4de2804698935eb44f98dc897e1c44c3 Author: Antoniu Miclaus Date: Thu May 30 12:28:34 2024 +0300 iio: frequency: adrf6780: rm clk provider include The driver has no clock provider implementation, therefore remove the include. Fixes: 63aaf6d06d87 ("iio: frequency: adrf6780: add support for ADRF6780") Signed-off-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20240530092835.36892-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit 5c3266385e4f27c69c03bcbfa68339b49be91c56 Author: Denis Benato Date: Thu May 23 19:47:36 2024 +0200 iio: imu: bmi323: Use iio read_acpi_mount_matrix() helper bmi150-accel and bmi323-imu are declared in an almost identical way in the ACPI and in some devices such as the Asus RC71L the "ROTM" property can be found: parse and use the ACPI-defined mount-matrix. Co-developed-by: Luke D. Jones Co-developed-by: Jonathan LoBue Signed-off-by: Denis Benato Link: https://lore.kernel.org/r/20240523174736.16692-2-benato.denis96@gmail.com Signed-off-by: Jonathan Cameron commit 33c33a961ba659b2001d461395e4a95d6d30673f Author: David Lechner Date: Fri May 24 15:38:04 2024 -0500 iio: adc: ad7944: remove unused parameter In the ad7944 driver, the ad7944_convert_and_acquire() had an unused `chan` parameter. This patch removes the parameter. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20240524-iio-ad7944-remove-unused-parameter-v1-1-fd824d7122a0@baylibre.com Signed-off-by: Jonathan Cameron commit 28cf9cbe68298c64857974bca394f150b9e57b60 Author: David Lechner Date: Thu May 23 14:24:10 2024 -0500 iio: adc: sort Makefile The Makefile for IIO ADC drivers is intended to be sorted alphabetically. I can be tricky to keep it sorted when adding new drivers when not all of the existing drivers are sorted. So let's sort everything now to make it easier to keep it sorted in the future. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20240523192412.3220547-1-dlechner@baylibre.com Signed-off-by: Jonathan Cameron commit c1db755b6a229d1a5d7d3cb5371e82855874398c Author: Angelo Dureghello Date: Wed May 22 17:01:41 2024 +0200 iio: dac: ad3552r: uniform structure names Use same driver file name (ad3552r) for structure names used for all variants. Signed-off-by: Angelo Dureghello Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240522150141.1776196-7-adureghello@baylibre.org Signed-off-by: Jonathan Cameron commit d421302a910c63e541ebc9755b38956d135a6603 Author: Angelo Dureghello Date: Wed May 22 17:01:40 2024 +0200 iio: dac: ad3552r: change AD3552R_NUM_CH define name After model data and num_hw_channles introduction, we have: ad3552r_desc, num_ch: used to keep channel number set in fdt, ad35xxr_model_data, num_hw_channels: for max channel checks, AD3552R_NUM_CH: just actually used to define the max array size on allocated arrays. Renaming AD3552R_NUM_CH to a more consistent name, as AD3552R_MAX_CH. Signed-off-by: Angelo Dureghello Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240522150141.1776196-6-adureghello@baylibre.org Signed-off-by: Jonathan Cameron commit ea1c94d785b180ddf0c5933ed1c1b483a06b33b5 Author: Angelo Dureghello Date: Wed May 22 17:01:39 2024 +0200 iio: dac: ad3552r: add support for ad3541r and ad3551r Add support for single-output DAC variants. Signed-off-by: Angelo Dureghello Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240522150141.1776196-5-adureghello@baylibre.org Signed-off-by: Jonathan Cameron commit 2334d5e0b7af8912f140e1df16bd94fb3ab98578 Author: Angelo Dureghello Date: Wed May 22 17:01:38 2024 +0200 iio: dac: ad3552r: add model data structure Add a "model data" structure to keep useful hardware-related information as from datasheet, avoiding id-based conditional choices later on. Removed id-based checks and filled model-specific structures with device specific features, In particular, num_hw_channels is introduced to keep the number of hardware implemented channels, since 1-channel versions of the DACs are added in this same patchset. Signed-off-by: Angelo Dureghello Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240522150141.1776196-4-adureghello@baylibre.org Signed-off-by: Jonathan Cameron commit 80ea2007638017b18b0a900e605d7804aaf8d1ae Author: Angelo Dureghello Date: Wed May 22 17:01:37 2024 +0200 dt-bindings: iio: dac: add ad35xxr single output variants Add support for ad3541r and ad3551r single output variants. Signed-off-by: Angelo Dureghello Reviewed-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240522150141.1776196-3-adureghello@baylibre.org Signed-off-by: Jonathan Cameron commit 0fbce5d171e489cd21a67773331716c9cc752890 Author: Angelo Dureghello Date: Wed May 22 17:01:36 2024 +0200 dt-bindings: iio: dac: fix ad3552r gain parameter names The adi,gain-scaling-p/n values are an inverted log2, so initial naming was set correctly, but the driver uses just adi,gain-scaling-p/n, and if fdt is created accordingly with the fdt bindings documentation, driver fails the probe. Observing that: - the Linux driver is the only consumer, - there are no upstreamed dts nodes related to ad3552r, the fix to the documentation side is preferred and less-risk. Fixes: b0a96c5f599e ("dt-bindings: iio: dac: Add adi,ad3552r.yaml") Signed-off-by: Angelo Dureghello Reviewed-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240522150141.1776196-2-adureghello@baylibre.org Signed-off-by: Jonathan Cameron commit fefbc4a5d60da4b5367313d5d8ac1f777f2fb2a8 Author: Nuno Sa Date: Wed May 22 14:54:06 2024 +0200 iio: adc: ad9467: change struct members padding Using tabs and maintaining the start of the variables aligned is a pain and may lead to lot's of unrelated changes when adding new members. Hence, let's change things now and just have a simple space. Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240522-dev-ad9467-dma-v2-2-a37bec463632@analog.com Signed-off-by: Jonathan Cameron commit 7a8e7f13f99b31c85b77b362cb7b7a23fead11d3 Author: Nuno Sa Date: Wed May 22 14:54:05 2024 +0200 iio: adc: ad9467: use DMA safe buffer for spi Make sure we use a DMA safe buffer (IIO_DMA_MINALIGN) for all the spi transfers. Only relevant for writes since for reads spi_write_then_read() is used which does not require DMA safe buffers. Also note that for consistency, ad9467_spi_read() is also taking struct ad9467_state as a parameter (even if not really needed). Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240522-dev-ad9467-dma-v2-1-a37bec463632@analog.com Signed-off-by: Jonathan Cameron commit cba37c2e532dc234cc8ea1894f130ca39948d4a9 Author: Barnabás Czémán Date: Tue May 21 17:34:53 2024 +0200 iio: light: stk3310: support more stk3311 variants Add support for more stk3311 variants like stk3311-a and stk3311-s34, they are register compatible but they have different chip ids. Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240521-stk3311-v1-3-07a4966b355a@gmail.com Signed-off-by: Jonathan Cameron commit 745712c7bb1f8eaf00cf3b5a49c3c13bd7805597 Author: Barnabás Czémán Date: Tue May 21 17:34:52 2024 +0200 iio: light: stk3310: make chip id check expandable Modify chip id check for support easier additions for compatible variants. Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240521-stk3311-v1-2-07a4966b355a@gmail.com Signed-off-by: Jonathan Cameron commit 709aeedcc7cfadb2f9c3ac29b0cda337c6b57b7d Author: Barnabás Czémán Date: Tue May 21 17:34:51 2024 +0200 iio: light: stk3310: relax failure to match id Relax failure to match ID to a warning rather than probe fail. This add abilty to use other compatible variants when chip id is not defined in the driver. Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240521-stk3311-v1-1-07a4966b355a@gmail.com Signed-off-by: Jonathan Cameron commit 4d8c7da08be5ef48ef0c3d4ea1a25733b03d626a Author: Dr. David Alan Gilbert Date: Thu May 23 00:04:57 2024 +0100 iio: light: rohm-bu27034: remove unused struct 'bu27034_result' 'bu27034_result' is unused since the original commit e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor"). Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20240522230457.478156-4-linux@treblig.org Signed-off-by: Jonathan Cameron commit 64741cb5acfb8a1cf1c4a61ec0d8cd1310ceca90 Author: Dr. David Alan Gilbert Date: Thu May 23 00:04:56 2024 +0100 iio: adc: pac1934: remove unused struct 'samp_rate_mapping' 'samp_rate_mapping' has been unused since the original commit 0fb528c8255b ("iio: adc: adding support for PAC193x"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240522230457.478156-3-linux@treblig.org Signed-off-by: Jonathan Cameron commit 1568f94f29dd6b0e33a9123c432214b5756ad708 Author: Dr. David Alan Gilbert Date: Thu May 23 00:04:55 2024 +0100 iio: accel: bmi088: remove unused struct 'bmi088_scale_info' 'bmi088_scale_info' has been unused since the original commit c19ae6be7555 ("iio: accel: Add support for the Bosch-Sensortec BMI088"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240522230457.478156-2-linux@treblig.org Signed-off-by: Jonathan Cameron commit a4c514e5f0da862d7897c2316895b2fff12bddfd Author: Alisa-Dariana Roman Date: Tue May 14 15:02:22 2024 +0300 iio: adc: ad7192: Add AD7194 support Unlike the other AD719Xs, AD7194 has configurable channels. The user can dynamically configure them in the devicetree. Add sigma_delta_info member to chip_info structure. Since AD7194 is the only chip that has no channel sequencer, num_slots should remain undefined. Also modify config AD7192 description for better scaling. Signed-off-by: Alisa-Dariana Roman Link: https://lore.kernel.org/r/20240514120222.56488-7-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit caf7b7632b8d83d410d162221dcc5d2d16db478f Author: Alisa-Dariana Roman Date: Tue May 14 15:02:21 2024 +0300 dt-bindings: iio: adc: ad7192: Add AD7194 support Unlike the other AD719Xs, AD7194 has configurable channels. The user can dynamically configure them in the devicetree. Also add an example for AD7194 devicetree. Signed-off-by: Alisa-Dariana Roman Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240514120222.56488-6-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit dd471a2b7759daf6bbb2fbfec4258f60e0243183 Author: Alisa-Dariana Roman Date: Tue May 14 15:02:20 2024 +0300 dt-bindings: iio: adc: Add single-channel property Devices that have both single-ended channels and differential channels cause a bit of confusion when the channels are configured in the devicetree. Clarify difference between these two types of channels for such devices by adding single-channel property alongside diff-channels. They should be mutually exclusive. Devices that have only single-ended channels can still use reg property to reference a channel like before. Suggested-by: Jonathan Cameron Signed-off-by: Alisa-Dariana Roman Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240514120222.56488-5-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit 2b12a52b298f41ec581efc3047792c0535dd615c Author: Alisa-Dariana Roman Date: Tue May 14 15:02:19 2024 +0300 iio: adc: ad7192: Add aincom supply AINCOM should actually be a supply. AINx inputs are referenced to AINCOM in pseudo-differential operation mode. AINCOM voltage represents the offset of corresponding channels. Signed-off-by: Alisa-Dariana Roman Link: https://lore.kernel.org/r/20240514120222.56488-4-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit ecec83a236db6b0966d790fd582884b510ee11a3 Author: Alisa-Dariana Roman Date: Tue May 14 15:02:18 2024 +0300 dt-bindings: iio: adc: ad7192: Add aincom supply AINCOM should actually be a supply. AINx inputs are referenced to AINCOM in pseudo-differential operation mode. AINCOM voltage represents the offset of corresponding channels. Reviewed-by: Rob Herring (Arm) Signed-off-by: Alisa-Dariana Roman Link: https://lore.kernel.org/r/20240514120222.56488-3-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit f311151600dc104e6eeb0d0437582e0cf37d6962 Author: Alisa-Dariana Roman Date: Tue May 14 15:02:17 2024 +0300 iio: adc: ad7192: Use standard attribute Replace custom attribute filter_low_pass_3db_frequency_available with standard attribute. Store the available values in ad7192_state struct. The function that used to compute those values replaced by ad7192_update_filter_freq_avail(). Function ad7192_show_filter_avail() is no longer needed. Note that the initial available values are hardcoded. Also moved the mutex lock and unlock in order to protect the whole switch statement since each branch modifies the state of the device. Reviewed-by: David Lechner Signed-off-by: Alisa-Dariana Roman Link: https://lore.kernel.org/r/20240514120222.56488-2-alisa.roman@analog.com Signed-off-by: Jonathan Cameron commit 6ea810cfb80c054eff72f1a55b6dcd22486baa33 Author: Krzysztof Kozlowski Date: Tue Jun 4 15:05:31 2024 +0200 clk: sifive: prci: fix module autoloading Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Clocks are considered core components, so usually they are built-in, however these can be built and used as modules on some generic kernel. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Samuel Holland Link: https://lore.kernel.org/r/20240604130531.170371-1-krzysztof.kozlowski@linaro.org Signed-off-by: Stephen Boyd commit 61ce0ea7591fef2eb6e89ce40ffcc24fda4dbbc5 Author: Song Liu Date: Tue Jun 4 00:07:00 2024 -0700 selftests/bpf: Fix bpf_cookie and find_vma in nested VM bpf_cookie and find_vma are flaky in nested VMs, which is used by some CI systems. It turns out these failures are caused by unreliable perf event in nested VM. Fix these by: 1. Use PERF_COUNT_SW_CPU_CLOCK in find_vma; 2. Increase sample_freq in bpf_cookie. Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240604070700.3032142-1-song@kernel.org commit a6ba5125f10bd7307e775e585ad21a8f7eda1b59 Author: Jakub Kicinski Date: Tue Jun 4 10:54:57 2024 -0700 Revert "ethernet: octeontx2: avoid linking objects into multiple modules" This reverts commit 727c94c9539aa8865cdbf6a783da6a6585f1fec2. Stephen reports that this commit causes a circular module dependency for him. Revert, and we'll try to address the problem, again. Reported-by: Stephen Rothwell Link: https://lore.kernel.org/all/20240531152223.25591c8e@canb.auug.org.au Signed-off-by: Jakub Kicinski commit 3a94fa4cb86e96103657ba3550ee68b424269613 Author: Krzysztof Kozlowski Date: Tue Jun 4 13:49:49 2024 +0200 arm64: dts: microchip: sparx5_pcb135: move non-MMIO nodes out of axi simple-bus nodes, so the "axi" node, should not have non-MMIO children as pointed out by simple-bus schema dtbs_check: sparx5_pcb135_emmc.dtb: axi@600000000: sfp-eth60: {'compatible': ... should not be valid under {'type': 'object'} from schema $id: http://devicetree.org/schemas/simple-bus.yaml# Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_Jsq+PtL3HTKkA_gwTjb_i1mFZ+wW+qwin34HMYmwW7oNDFw@mail.gmail.com/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit fe7c551ea03e0df729966e33c58f9955f7408208 Author: Krzysztof Kozlowski Date: Tue Jun 4 13:49:48 2024 +0200 arm64: dts: microchip: sparx5_pcb134: move non-MMIO nodes out of axi simple-bus nodes, so the "axi" node, should not have non-MMIO children as pointed out by simple-bus schema dtbs_check: sparx5_pcb134.dtb: axi@600000000: i2c-mux-0: {'compatible': ... should not be valid under {'type': 'object'} from schema $id: http://devicetree.org/schemas/simple-bus.yaml# Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_Jsq+PtL3HTKkA_gwTjb_i1mFZ+wW+qwin34HMYmwW7oNDFw@mail.gmail.com/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit 920f6468924f8dc7e0e6e1510d000888592ef861 Author: Dan Williams Date: Thu May 30 18:04:29 2024 -0700 PCI: Warn on missing cfg_access_lock during secondary bus reset The recent adventure with adding lockdep tracking for cfg_access_lock, while it yielded many false positives [1], did catch a true positive in the pci_reset_bus() path [2]. So, while lockdep is difficult to deploy, open coding a check that cfg_access_lock is held during the reset is feasible. While this does not offer a full backtrace, it should be sufficient to implicate the caller of pci_bridge_secondary_bus_reset() as a path that needs investigation. Link: https://lore.kernel.org/r/171711746953.1628941.4692125082286867825.stgit@dwillia2-xfh.jf.intel.com Link: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134186v1/shard-dg2-1/igt@device_reset@unbind-reset-rebind.html [1] Link: http://lore.kernel.org/r/cfb50601-5d2a-4676-a958-1bd3f1b06654@intel.com [2] Signed-off-by: Dan Williams Signed-off-by: Bjorn Helgaas Tested-by: Hans de Goede Tested-by: Kalle Valo Reviewed-by: Dave Jiang commit 6ce402327a6fb714a9f40a0bb59bcbfe383839a5 Author: Christian Marangi Date: Tue Jun 4 18:43:43 2024 +0200 hwmon: g672: add support for g761 Add support for g761 PWM Fan Controller. The g761 is a copy of the g763 with the only difference of supporting and internal clock. The internal clock is used if no clocks property is defined in device node and in such case the required bit is enabled and clock handling is skipped. The internal clock oscillator runs at 31KHz. Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20240604164348.542-3-ansuelsmth@gmail.com Signed-off-by: Guenter Roeck commit 302fdb1688e33a33495d5e1f294da5b72a46e263 Author: Christian Marangi Date: Tue Jun 4 18:43:42 2024 +0200 dt-bindings: hwmon: g76x: Add support for g761 Add support for g761 PWM Fan controller. This is an exact copy of g763 with the difference that it does also support an internal clock oscillator. With clocks property not defined, the internal clock oscillator is used. Signed-off-by: Christian Marangi Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240604164348.542-2-ansuelsmth@gmail.com Signed-off-by: Guenter Roeck commit 3d8e253724170ae9c8948c36801204fc2aa53682 Author: Christian Marangi Date: Tue Jun 4 18:43:41 2024 +0200 dt-bindings: hwmon: g762: Convert to yaml schema Convert g762 Documentation to yaml schema and port all the custom properties and info. Add the vendor prefix to name to follow naming standard. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240604164348.542-1-ansuelsmth@gmail.com Signed-off-by: Guenter Roeck commit 30ca6365bb4200f55e59bf1ab2a24e65406e9eac Author: Imre Deak Date: Thu May 30 13:53:12 2024 +0300 drm/i915: Fix assert on pending async-put power domain work when it requeues itself Commit dd839aa857eb ("drm/i915: Fix incorrect assert about pending power domain async-put work") fixed the assert about a pending work dropping a display power reference asynchronously, leading to the drm_WARN_ON(!queue_delayed_work(&power_domains->async_put_work)); warn next time around a power reference was put asynchronously, due to a stale instance of the work still being pending. However the fix didn't consider the case where multiple power reference was acquired and put, requiring the work to requeue itself. Extend the fix for this case as well canceling the pending instance of the work before it requeues itself. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10915 Signed-off-by: Imre Deak Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240530105312.1016485-1-imre.deak@intel.com commit 1968845d358e108cfbfba45538d64b3cbdf04ac2 Author: Andy Shevchenko Date: Fri May 31 17:51:29 2024 +0300 driver core: device.h: Group of_node handling declarations and definitions There are a few of_node related APIs defined in the driver core. Group the respective declarations and definitions in the header. There is no functional change. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531145129.1506733-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 161364bdcfc4386652f26857c357982a6f517fd2 Author: Jeff Johnson Date: Sat Jun 1 18:18:48 2024 -0700 samples/kobject: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kobject-example.o WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kset-example.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240601-md-samples-kobject-v1-1-f63b215d50cb@quicinc.com Signed-off-by: Greg Kroah-Hartman commit a774c5d1f9c4ad43411ee4010d8eb8e60b8e60a0 Author: Sanjuán García, Jorge Date: Thu May 23 10:35:03 2024 +0000 mcb: mcb-pci: detect IO mapped devices before requesting resources If the memory region is requested with devm_request_mem_region() for an IO mapped device it will return an error and mcb-pci will incorrectly report it with EBUSY code. Make sure we identify if the reosure is IO mapped and fail early with a correct ENOTSUPP code. Reviewed-by: Jose Javier Rodriguez Barbarin Signed-off-by: Jorge Sanjuan Garcia Link: https://lore.kernel.org/r/20240523103430.423340-1-jorge.sanjuangarcia@duagon.com Signed-off-by: Greg Kroah-Hartman commit 10724d5d477f8baadeaa183e288d6bd872bcade2 Author: Uwe Kleine-König Date: Fri May 10 23:14:54 2024 +0200 eeprom: 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 Link: https://lore.kernel.org/r/20240510211454.2274614-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 83f939f4d4b91c245ff4e58422c014969f3772a6 Author: Andy Shevchenko Date: Wed May 8 21:47:03 2024 +0300 misc: eeprom_93xx46: Convert to DEVICE_ATTR_WO() Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-11-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b73602bf552b6422327c453772f30e64fcb4178d Author: Andy Shevchenko Date: Wed May 8 21:47:02 2024 +0300 misc: eeprom_93xx46: Use string_choices API instead of ternary operator Use modern string_choices API instead of manually determining the output using ternary operator. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-10-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f5efcdfe92b0032587d1a79db45ac657798d5d44 Author: Andy Shevchenko Date: Wed May 8 21:47:01 2024 +0300 misc: eeprom_93xx46: Replace explicit castings with proper specifiers There is no need to have an explicit casting when we can simply use the correct printf() specifier. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-9-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 761b4cf31741b2d0beda5de4c36253b553939263 Author: Andy Shevchenko Date: Wed May 8 21:47:00 2024 +0300 misc: eeprom_93xx46: Convert to use kstrtox() sscanf() is a heavy one and moreover requires additional boundary checks. Convert driver to use kstrtobool() in eeprom_93xx46_store_erase(). Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-8-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 163898508f96efaafaa87000c7c4bbf711a34bd9 Author: Andy Shevchenko Date: Wed May 8 21:46:59 2024 +0300 misc: eeprom_93xx46: Use spi_message_init_with_transfers() Replace open coded spi_message_init_with_transfers(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240508184905.2102633-7-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 195b979955dea396e6c21bf196af06f6e5ef8c91 Author: Andy Shevchenko Date: Wed May 8 21:46:58 2024 +0300 misc: eeprom_93xx46: Remove ->prepare() and ->finish() customisation Currently there is only one way how chip is prepared and unprepared for an operation. Drop unnecessary customisation. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3aee48a8e01f98d3285a0064285b0152cdbb8a9e Author: Andy Shevchenko Date: Wed May 8 21:46:57 2024 +0300 misc: eeprom_93xx46: Hide legacy platform data in the driver First of all, there is no user for the platform data in the kernel. Second, it needs a lot of updates to follow the modern standards of the kernel, including proper Device Tree bindings and device property handling. For now, just hide the legacy platform data in the driver's code. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c8ed97d8c3984492942ac6c63bb47794caffd4af Author: Andy Shevchenko Date: Wed May 8 21:46:56 2024 +0300 eeprom: digsy_mtc: Convert to use GPIO descriptors This converts the driver to use GPIO descriptors exclusively to retrieve GPIO lines. Drop the old GPIO handling in favor of the core managing it exclusively. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2b82641ad0620b2d71dc05024b20f82db7e1c0b6 Author: Andy Shevchenko Date: Wed May 8 21:46:55 2024 +0300 eeprom: digsy_mtc: Fix 93xx46 driver probe failure The update to support other (bigger) types of EEPROMs broke the driver loading due to removal of the default size. Fix this by adding the respective (new) flag to the platform data. Fixes: 14374fbb3f06 ("misc: eeprom_93xx46: Add new 93c56 and 93c66 compatible strings") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240508184905.2102633-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c01b08a7538581d13a90d38d259673ad64bff647 Author: Andy Shevchenko Date: Wed May 8 21:46:54 2024 +0300 misc: eeprom_93xx46: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Include mod_devicetable.h explicitly to replace the dropped of.h which included mod_devicetable.h indirectly. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240508184905.2102633-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c41cc3c28730c549b78ddc9533d589c289242e63 Author: Jeff Johnson Date: Thu May 30 21:25:37 2024 -0700 siox: bus-gpio: add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/siox/siox-bus-gpio.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Acked-by: Thorsten Scherer Link: https://lore.kernel.org/r/20240530-md-siox-bus-gpio-v1-1-6a2f943ac8ad@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 312eee8f0c9927f440cf134e34db625a2976d80e Author: Jeff Johnson Date: Mon Jun 3 13:32:29 2024 -0700 misc: open-dice: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/misc/open-dice.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240603-md-misc-open-dice-v1-1-ee7972ae0d39@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 91f34fc54ee7d008d80607cfaafe50f416fdf160 Author: Jeff Johnson Date: Mon Jun 3 12:08:32 2024 -0700 char: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/ttyprintk.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/lp.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/nvram.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240603-md-char-misc-v1-1-25d43d6f331d@quicinc.com Signed-off-by: Greg Kroah-Hartman commit a464822872f5e0e6a541c0b4971bea10421db5fa Author: Jeff Johnson Date: Mon Jun 3 11:33:05 2024 -0700 tlclk: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/tlclk.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240603-md-char-tlclk-v1-1-d395aa93da86@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 45be81fa3b55b9da33be36f5d3d69689dc046942 Author: Jeff Johnson Date: Mon Jun 3 11:10:00 2024 -0700 ppdev: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/ppdev.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240603-md-char-ppdev-v1-1-b169cb17c844@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 0d618e39763e0e2b88586cd7d40ce8419735412f Author: Jeff Johnson Date: Fri May 31 22:21:38 2024 -0700 lib/math: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/math/prime_numbers.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/math/rational-test.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240531-md-lib-math-v1-1-11a3bec51ebb@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 5a71c0d1180e76d223a8266799d1ee4ba3a8e697 Author: Jeff Johnson Date: Fri May 31 15:01:14 2024 -0700 dyndbg: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_dynamic_debug.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240531-md-test_dynamic_debug-v1-1-2194b477f55e@quicinc.com Signed-off-by: Greg Kroah-Hartman commit ea5542c5bbfc87f572dab9fbdf932e7aeb2b7d62 Author: Jeff Johnson Date: Thu May 30 20:48:01 2024 -0700 parport: add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/parport/parport.o Add the missing MODULE_DESCRIPTION() macro invocation. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240530-parport-v1-1-09bee2ca3123@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 6392194470575de1ac0cb7223ff3bf30da94bbea Author: Jeff Johnson Date: Thu May 23 18:30:35 2024 -0700 uio: add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_cif.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_aec.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_netx.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_mf624.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240523-md-drivers-uio-v2-1-5173b2ae9563@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 35e7a72a67190a3846cfe2f87add4ed1229b2248 Author: Lucas Stach Date: Mon Mar 18 21:39:25 2024 +0100 drm/bridge: analogix_dp: don't adjust further when clock recovery succeeded Take a early return from the clock recovery training when the sink reports CR_DONE for all lanes. There is no point in trying to adjust the link parameters further. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240318203925.2837689-3-l.stach@pengutronix.de commit 3747c9818954368020c6de7602e7a8869213f053 Author: Wyon Bi Date: Mon Mar 18 21:39:24 2024 +0100 drm/bridge: analogix_dp: simplify analogix_dp_{set/get}_lane_link_training helpers There is no need for separate functions for each lane, as we can deduct the register offset to read/write from the lane index. Signed-off-by: Wyon Bi Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240318203925.2837689-2-l.stach@pengutronix.de commit e82290a2e0e8ec5e836ecad1ca025021b3855c2d Author: Lucas Stach Date: Mon Mar 18 21:39:23 2024 +0100 drm/bridge: analogix_dp: properly handle zero sized AUX transactions Address only transactions without any data are valid and should not be flagged as short transactions. Simply return the message size when no transaction errors occured. CC: stable@vger.kernel.org Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240318203925.2837689-1-l.stach@pengutronix.de commit 8d4e21bd4cca8013d2c6f55d42df85838d4ebce6 Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:31 2024 -0400 selftests/ftrace: Add fgraph-multi.tc test Add a test that creates 3 instances and enables function_graph tracer in each as well as the top instance, where each will enable a filter (but one that traces all functions) and check that they are filtering properly. Link: https://lore.kernel.org/linux-trace-kernel/20240603190825.252845939@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 35b944a997e25962122c3dea68b020e7fbb06cbd Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:30 2024 -0400 selftests/ftrace: Add function_graph tracer to func-filter-pid test The function tracer is tested to see if pid filtering works. Add a test to test function_graph tracer as well, but only if the function_graph tracer is enabled for the top level or instance. Link: https://lore.kernel.org/linux-trace-kernel/20240603190825.083048115@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit fe835e3ca40e172aa8ad12f4ed2898c181fafab0 Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:29 2024 -0400 function_graph: Use static_call and branch to optimize return function In most cases function graph is used by a single user. Instead of calling a loop to call function graph callbacks in this case, call the function return callback directly. Use the static_key that is set when the function graph tracer has less than 2 callbacks registered. It will do the direct call in that case, and will do the loop over all callers when there are 2 or more callbacks registered. Link: https://lore.kernel.org/linux-trace-kernel/20240603190824.921460797@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit cc60ee813b50334b32343861057dc9e981e9c7f0 Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:28 2024 -0400 function_graph: Use static_call and branch to optimize entry function In most cases function graph is used by a single user. Instead of calling a loop to call function graph callbacks in this case, call the function entry callback directly. Add a static_key that will be used to set the function graph logic to either do the loop (when more than one callback is registered) or to call the callback directly if there is only one registered callback. Link: https://lore.kernel.org/linux-trace-kernel/20240603190824.766858241@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit a5b6d4da0218a0539c36ad6794c624c2c6ca7b32 Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:27 2024 -0400 function_graph: Use bitmask to loop on fgraph entry Instead of looping through all the elements of fgraph_array[] to see if there's an gops attached to one and then calling its gops->func(). Create a fgraph_array_bitmask that sets bits when an index in the array is reserved (via the simple lru algorithm). Then only the bits set in this bitmask needs to be looked at where only elements in the array that have ops registered need to be looked at. Note, we do not care about races. If a bit is set before the gops is assigned, it only wastes time looking at the element and ignoring it (as it did before this bitmask is added). Link: https://lore.kernel.org/linux-trace-kernel/20240603190824.604448781@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 420e1354bcb6f006f183a1b6fe5dd21f60a457ef Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:26 2024 -0400 function_graph: Use for_each_set_bit() in __ftrace_return_to_handler() Instead of iterating through the entire fgraph_array[] and seeing if one of the bitmap bits are set to know to call the array's retfunc() function, use for_each_set_bit() on the bitmap itself. This will only iterate for the number of set bits. Link: https://lore.kernel.org/linux-trace-kernel/20240603190824.447448026@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit dd120af2d5f8f3d2d742a64cefc4a529d382ab06 Author: Masami Hiramatsu (Google) Date: Mon Jun 3 15:07:25 2024 -0400 ftrace: Add multiple fgraph storage selftest Add a selftest for multiple function graph tracer with storage on a same function. In this case, the shadow stack entry will be shared among those fgraph with different data storage. So this will ensure the fgraph will not mixed those storage data. Link: https://lore.kernel.org/linux-trace-kernel/171509111465.162236.3795819216426570800.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190824.284049716@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) Suggested-by: Steven Rostedt (Google) Signed-off-by: Steven Rostedt (Google) commit 47c3c70aa36971c90e32e91f9254110195d67a02 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:24 2024 -0400 function_graph: Add selftest for passing local variables Add boot up selftest that passes variables from a function entry to a function exit, and make sure that they do get passed around. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509110271.162236.11047551496319744627.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190824.122952310@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 91c46b0aa917546432b5b219494859cda0edc39e Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:23 2024 -0400 function_graph: Implement fgraph_reserve_data() and fgraph_retrieve_data() Added functions that can be called by a fgraph_ops entryfunc and retfunc to store state between the entry of the function being traced to the exit of the same function. The fgraph_ops entryfunc() may call fgraph_reserve_data() to store up to 32 words onto the task's shadow ret_stack and this then can be retrieved by fgraph_retrieve_data() called by the corresponding retfunc(). Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509109089.162236.11372474169781184034.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.959703050@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit b84214890a9bc56f0fe4ec4fc72f2307ed05096d Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:22 2024 -0400 function_graph: Move graph notrace bit to shadow stack global var The use of the task->trace_recursion for the logic used for the function graph no-trace was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Link: https://lore.kernel.org/linux-trace-kernel/171509107907.162236.6564679266777519065.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.796709456@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 068da098eb504469dc195137ae35eeacfe0c8de9 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:21 2024 -0400 function_graph: Move graph depth stored data to shadow stack global var The use of the task->trace_recursion for the logic used for the function graph depth was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Link: https://lore.kernel.org/linux-trace-kernel/171509106728.162236.2398372644430125344.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.634870264@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 12117f3307b63f287756d7ec8cc4f11b94e1206a Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:20 2024 -0400 function_graph: Move set_graph_function tests to shadow stack global var The use of the task->trace_recursion for the logic used for the set_graph_function was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Link: https://lore.kernel.org/linux-trace-kernel/171509105520.162236.10339831553995971290.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.472955399@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 4497412a1f7b5d9e0849f125652f2cc58cdba562 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:19 2024 -0400 function_graph: Add "task variables" per task for fgraph_ops Add a "task variables" array on the tasks shadow ret_stack that is the size of longs for each possible registered fgraph_ops. That's a total of 16, taking up 8 * 16 = 128 bytes (out of a page size 4k). This will allow for fgraph_ops to do specific features on a per task basis having a way to maintain state for each task. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509104383.162236.12239656156685718550.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.308806126@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 6d4786592ac88aa31f45fde6bfaad3162e3a92a4 Author: Masami Hiramatsu (Google) Date: Mon Jun 3 15:07:18 2024 -0400 function_graph: Use a simple LRU for fgraph_array index number Since the fgraph_array index is used for the bitmap on the shadow stack, it may leave some entries after a function_graph instance is removed. Thus if another instance reuses the fgraph_array index soon after releasing it, the fgraph may confuse to call the newer callback for the entries which are pushed by the older instance. To avoid reusing the fgraph_array index soon after releasing, introduce a simple LRU table for managing the index number. This will reduce the possibility of this confusion. Link: https://lore.kernel.org/linux-trace-kernel/171509103267.162236.6885097397289135378.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190823.147421545@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit df3ec5da6a1e7f6e142680d7c5266d3af187170b Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:17 2024 -0400 function_graph: Add pid tracing back to function graph tracer Now that the function_graph has a main callback that handles the function graph subops tracing, it no longer honors the pid filtering of ftrace. Add back this logic in the function_graph code to update the gops callback for the entry function to test if it should trace the current task or not. Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.991720703@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit c132be2c4fcc1150ad0791c2a85dd4c9ad0bd0c8 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:16 2024 -0400 function_graph: Have the instances use their own ftrace_ops for filtering Allow for instances to have their own ftrace_ops part of the fgraph_ops that makes the funtion_graph tracer filter on the set_ftrace_filter file of the instance and not the top instance. This uses the new ftrace_startup_subops(), by using graph_ops as the "manager ops" that defines the callback function and adds the functions defined by the filters of the ops for each trace instance. The callback defined by the manager ops will call the registered fgraph ops that were added to the fgraph_array. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509102088.162236.15758883237657317789.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.832946261@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit d9bbfbd14f58d2955cc7a3efa8ae6d4e09ee5995 Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:15 2024 -0400 ftrace: Allow subops filtering to be modified The subops filters use a "manager" ops to enable and disable its filters. The manager ops can handle more than one subops, and its filter is what controls what functions get set. Add a ftrace_hash_move_and_update_subops() function that will update the manager ops when the subops filters change. Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.673932251@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 5fccc7552ccbc521bad61653ee739b1196b1bc53 Author: Steven Rostedt (Google) Date: Mon Jun 3 15:07:14 2024 -0400 ftrace: Add subops logic to allow one ops to manage many There are cases where a single system will use a single function callback to handle multiple users. For example, to allow function_graph tracer to have multiple users where each can trace their own set of functions, it is useful to only have one ftrace_ops registered to ftrace that will call a function by the function_graph tracer to handle the multiplexing with the different registered function_graph tracers. Add a "subop_list" to the ftrace_ops that will hold a list of other ftrace_ops that the top ftrace_ops will manage. The function ftrace_startup_subops() that takes the manager ftrace_ops and a subop ftrace_ops it will manage. If there are no subops with the ftrace_ops yet, it will copy the ftrace_ops subop filters to the manager ftrace_ops and register that with ftrace_startup(), and adds the subop to its subop_list. If the manager ops already has something registered, it will then merge the new subop filters with what it has and enable the new functions that covers all the subops it has. To remove a subop, ftrace_shutdown_subops() is called which will use the subop_list of the manager ops to rebuild all the functions it needs to trace, and update the ftrace records to only call the functions it now has registered. If there are no more functions registered, it will then call ftrace_shutdown() to disable itself completely. Note, it is up to the manager ops callback to always make sure that the subops callbacks are called if its filter matches, as there are times in the update where the callback could be calling more functions than those that are currently registered. This could be updated to handle other systems other than function_graph, for example, fprobes could use this (but will need an interface to call ftrace_startup_subops()). Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.508431129@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit ab6b84630382914ffcbab59f4913c9a60971d034 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:13 2024 -0400 ftrace: Allow ftrace startup flags to exist without dynamic ftrace Some of the flags for ftrace_startup() may be exposed even when CONFIG_DYNAMIC_FTRACE is not configured in. This is fine as the difference between dynamic ftrace and static ftrace is done within the internals of ftrace itself. No need to have use cases fail to compile because dynamic ftrace is disabled. This change is needed to move some of the logic of what is passed to ftrace_startup() out of the parameters of ftrace_startup(). Link: https://lore.kernel.org/linux-trace-kernel/171509100890.162236.4362350342549122222.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.350654104@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 26dda5631d1bb2f254f4c94aa87ee6c92a89cfdb Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:12 2024 -0400 ftrace: Allow function_graph tracer to be enabled in instances Now that function graph tracing can handle more than one user, allow it to be enabled in the ftrace instances. Note, the filtering of the functions is still joined by the top level set_ftrace_filter and friends, as well as the graph and nograph files. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509099743.162236.1699959255446248163.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.190630762@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 37238abe3cb47b8daaa8706c9949f67b2a705cf1 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:11 2024 -0400 ftrace/function_graph: Pass fgraph_ops to function graph callbacks Pass the fgraph_ops structure to the function graph callbacks. This will allow callbacks to add a descriptor to a fgraph_ops private field that wil be added in the future and use it for the callbacks. This will be useful when more than one callback can be registered to the function graph tracer. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509098588.162236.4787930115997357578.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.035147698@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 2fbb549983763b2cc32a1ab840fe59cc1822e06d Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:10 2024 -0400 function_graph: Remove logic around ftrace_graph_entry and return The function pointers ftrace_graph_entry and ftrace_graph_return are no longer called via the function_graph tracer. Instead, an array structure is now used that will allow for multiple users of the function_graph infrastructure. The variables are still used by the architecture code for non dynamic ftrace configs, where a test is made against them to see if they point to the default stub function or not. This is how the static function tracing knows to call into the function graph tracer infrastructure or not. Two new stub functions are made. entry_run() and return_run(). The ftrace_graph_entry and ftrace_graph_return are set to them respectively when the function graph tracer is enabled, and this will trigger the architecture specific function graph code to be executed. This also requires checking the global_ops hash for all calls into the function_graph tracer. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509097408.162236.17387844142114638932.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190821.872127216@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 375bb57292f49fa0956cc2739c81749b88e69510 Author: Masami Hiramatsu (Google) Date: Mon Jun 3 15:07:09 2024 -0400 function_graph: Handle tail calls for stack unwinding For the tail-call, there would be 2 or more ftrace_ret_stacks on the ret_stack, which records "return_to_handler" as the return address except for the last one. But on the real stack, there should be 1 entry because tail-call reuses the return address on the stack and jump to the next function. In ftrace_graph_ret_addr() that is used for stack unwinding, skip tail calls as a real stack unwinder would do. Link: https://lore.kernel.org/linux-trace-kernel/171509096221.162236.8806372072523195752.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190821.717065217@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 7aa1eaef9f4282c9acd39588b1fdc9dda7e73f34 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:08 2024 -0400 function_graph: Allow multiple users to attach to function graph Allow for multiple users to attach to function graph tracer at the same time. Only 16 simultaneous users can attach to the tracer. This is because there's an array that stores the pointers to the attached fgraph_ops. When a function being traced is entered, each of the ftrace_ops entryfunc is called and if it returns non zero, its index into the array will be added to the shadow stack. On exit of the function being traced, the shadow stack will contain the indexes of the ftrace_ops on the array that want their retfunc to be called. Because a function may sleep for a long time (if a task sleeps itself), the return of the function may be literally days later. If the ftrace_ops is removed, its place on the array is replaced with a ftrace_ops that contains the stub functions and that will be called when the function finally returns. If another ftrace_ops is added that happens to get the same index into the array, its return function may be called. But that's actually the way things current work with the old function graph tracer. If one tracer is removed and another is added, the new one will get the return calls of the function traced by the previous one, thus this is not a regression. This can be fixed by adding a counter to each time the array item is updated and save that on the shadow stack as well, such that it won't be called if the index saved does not match the index on the array. Note, being able to filter functions when both are called is not completely handled yet, but that shouldn't be too hard to manage. Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509096221.162236.8806372072523195752.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190821.555493396@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 518d6804a865772735588c5b2203d6c0c0bf98a9 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:07 2024 -0400 function_graph: Add an array structure that will allow multiple callbacks Add an array structure that will eventually allow the function graph tracer to have up to 16 simultaneous callbacks attached. It's an array of 16 fgraph_ops pointers, that is assigned when one is registered. On entry of a function the entry of the first item in the array is called, and if it returns zero, then the callback returns non zero if it wants the return callback to be called on exit of the function. The array will simplify the process of having more than one callback attached to the same function, as its index into the array can be stored on the shadow stack. We need to only save the index, because this will allow the fgraph_ops to be freed before the function returns (which may happen if the function call schedule for a long time). Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509095075.162236.8272148192748284581.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190821.392113213@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 59e5f04e4184181227889663618e01dce676e671 Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:06 2024 -0400 fgraph: Use BUILD_BUG_ON() to make sure we have structures divisible by long Instead of using "ALIGN()", use BUILD_BUG_ON() as the structures should always be divisible by sizeof(long). Co-developed with Masami Hiramatsu: Link: https://lore.kernel.org/linux-trace-kernel/171509093949.162236.14518699447151894536.stgit@devnote2 Link: http://lkml.kernel.org/r/20190524111144.GI2589@hirez.programming.kicks-ass.net Link: https://lore.kernel.org/linux-trace-kernel/20240603190821.232168933@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Suggested-by: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 42675b723b4842bca7bfb0f209aa9a493a10324a Author: Steven Rostedt (VMware) Date: Mon Jun 3 15:07:05 2024 -0400 function_graph: Convert ret_stack to a series of longs In order to make it possible to have multiple callbacks registered with the function_graph tracer, the retstack needs to be converted from an array of ftrace_ret_stack structures to an array of longs. This will allow to store the list of callbacks on the stack for the return side of the functions. Link: https://lore.kernel.org/linux-trace-kernel/171509092742.162236.4427737821399314856.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190821.073111754@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 1aea3d1d4a21e3e7895663b848ffae79ee82e065 Author: Stefan Herdler Date: Tue May 7 02:25:00 2024 +0200 media: av7110: coding style fixes: avoid_externs This patch fixes the following checkpatch warnings: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files Removing unnecessary 'extern' declaration of function prototypes in header files. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit f6ed8943fb061e3cb6d658555940f83bf236a81e Author: Stefan Herdler Date: Tue May 7 02:24:59 2024 +0200 media: av7110: coding style fixes: logging This patch fixes the following checkpatch warnings: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'level' may be better as '(level)' to avoid precedence issues WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_bootarm', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_diseqc_send', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_fw_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_fw_query', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_fw_request', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_osd_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_send_ci_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'av7110_send_fw_cmd', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'gpioirq', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'load_dram', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'ReleaseBitmap', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'vpeirq', this function's name, in a string WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'WriteText', this function's name, in a string WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ facility level WARNING:TRACING_LOGGING: Unnecessary ftrace-like logging - prefer using ftrace There where different logging styles in this drivers. Convert everything to the recommend pr_* macros. Log messages should mostly be unchanged by this patch. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 908b202653cde20c4245f27a91308ce905b952a5 Author: Stefan Herdler Date: Tue May 7 02:24:58 2024 +0200 media: av7110: coding style fixes: deep_indentation This patch fixes most the following checkpatch warnings: WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring Invert "if" statement to reduce indention level by 1. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 64b84024314e69b9c588e8fa38e565ac4dc3c1f8 Author: Stefan Herdler Date: Tue May 7 02:24:57 2024 +0200 media: av7110: coding style fixes: miscellaneous This patch fixes the following checkpatch warnings: WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fe_func' - possible side-effects? The MACRO_ARG_REUSE isn't really fixed but marked as intentional. The comment is visible in the checkpatch warning. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit a6257cc79aed1de04a6e84c789a1e8609411346b Author: Stefan Herdler Date: Tue May 7 02:24:56 2024 +0200 media: av7110: coding style fixes: variable types This patch fixes the following checkpatch warnings: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 's32' over 'int32_t' CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u64' over 'uint64_t' WARNING:UNNECESSARY_INT: Prefer 'long' over 'long int' as the int is unnecessary WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit e7b9b556aa799fd7a917801a6afc86f4317532fc Author: Stefan Herdler Date: Tue May 7 02:24:55 2024 +0200 media: av7110: coding style fixes: sizeof This patch fixes the following checkpatch warnings: WARNING:SIZEOF_PARENTHESIS: sizeof d should be sizeof(d) WARNING:SIZEOF_PARENTHESIS: sizeof f->fmt.sliced should be sizeof(f->fmt.sliced) WARNING:CONST_STRUCT: struct dvb_frontend_ops should normally be const CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*av7110)...) over kzalloc(sizeof(struct av7110)...) Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 3c08dc38e3cf018a74c64e75cebcc803d973196c Author: Stefan Herdler Date: Tue May 7 02:24:54 2024 +0200 media: av7110: coding style fixes: comparsations This patch fixes the following checkpatch warnings: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written ... Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit e198cabc5d49f18f17c5cc2e9e4c7203e58e2dc6 Author: Stefan Herdler Date: Tue May 7 02:24:53 2024 +0200 media: av7110: coding style fixes: assignments This patch fixes the following checkpatch errors: ERROR:ASSIGN_IN_IF: do not use assignment in if condition CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 28ada7d1f9fbf82d17665a68730b17af59874862 Author: Stefan Herdler Date: Tue May 7 02:24:52 2024 +0200 media: av7110: coding style fixes: braces This patch fixes the following checkpatch warnings and errors: WARNING:BRACES: braces {} are not necessary for any arm of this statement WARNING:BRACES: braces {} are not necessary for single statement blocks CHECK:BRACES: braces {} should be used on all arms of this statement CHECK:BRACES: Unbalanced braces around else statement Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 043dc67f27d64fb4764d24ec9f5686b00aa9a1cd Author: Stefan Herdler Date: Tue May 7 02:24:51 2024 +0200 media: av7110: coding style fixes: comments This patch fixes the following checkpatch warnings: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 WARNING:EMBEDDED_FILENAME: It's generally not useful to have the filename in the file Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 8e016209e2c28d58dfaf760527502fede44e6993 Author: Stefan Herdler Date: Tue May 7 02:24:50 2024 +0200 media: av7110: coding style fixes: whitespace (strict) This patch fixes the following checkpatch warnings: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis CHECK:SPACING: No space is necessary after a cast CHECK:SPACING: space preferred before that '|' (ctx:VxE) CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) CHECK:SPACING: spaces preferred around that '|' (ctx:VxV) Additional whitespace fixes found by "checkpatch.pl --strict". Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 2ee76a601ec3246424483ccfd88d7bd0ddeea2ef Author: Stefan Herdler Date: Tue May 7 02:24:49 2024 +0200 media: av7110: coding style fixes: newline This patch fixes the following checkpatch warnings: ERROR:ELSE_AFTER_BRACE: else should follow close brace '}' ERROR:OPEN_BRACE: open brace '{' following enum go on the same line ERROR:OPEN_BRACE: open brace '{' following struct go on the same line ERROR:OPEN_BRACE: that open brace { should be on the previous line ERROR:TRAILING_STATEMENTS: trailing statements should be on next line CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line Newline and whitespace changes only. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 83ab91364917b379c66ff1068239e1017992cf57 Author: Stefan Herdler Date: Tue May 7 02:24:48 2024 +0200 media: av7110: coding style fixes: whitespace This patch fixes the following checkpatch warnings: ERROR:SPACING: need consistent spacing around '&' (ctx:WxO) ERROR:SPACING: need consistent spacing around '&' (ctx:WxV) ERROR:SPACING: need consistent spacing around '-' (ctx:WxV) ERROR:SPACING: space prohibited after that '~' (ctx:OxW) ERROR:SPACING: space prohibited after that open parenthesis '(' ERROR:SPACING: space prohibited before that close parenthesis ')' ERROR:SPACING: space prohibited before that ':' (ctx:WxE) ERROR:SPACING: space prohibited before that ',' (ctx:WxW) ERROR:SPACING: space required after that ',' (ctx:VxV) ERROR:SPACING: space required before that '-' (ctx:OxV) ERROR:SPACING: space required before that '~' (ctx:OxV) ERROR:SPACING: space required before the open brace '{' ERROR:SPACING: space required before the open parenthesis '(' ERROR:SPACING: spaces required around that '&&' (ctx:ExV) ERROR:SPACING: spaces required around that '!=' (ctx:VxO) ERROR:SPACING: spaces required around that '&=' (ctx:VxO) ERROR:SPACING: spaces required around that '==' (ctx:VxO) ERROR:SPACING: spaces required around that '!=' (ctx:VxV) ERROR:SPACING: spaces required around that '+=' (ctx:VxV) ERROR:SPACING: spaces required around that '-=' (ctx:VxV) ERROR:SPACING: spaces required around that '<' (ctx:VxV) ERROR:SPACING: spaces required around that '<=' (ctx:VxV) ERROR:SPACING: spaces required around that '=' (ctx:VxV) ERROR:SPACING: spaces required around that '>' (ctx:VxV) ERROR:SPACING: spaces required around that '>=' (ctx:VxV) ERROR:SPACING: spaces required around that '|=' (ctx:VxV) WARNING:LEADING_SPACE: please, no spaces at the start of a line WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline WARNING:SPACING: space prohibited before semicolon WARNING:SPACING: space prohibited between function name and open parenthesis '(' WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 23) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 32) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (32, 39) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (39, 47) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (47, 55) WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 18) WARNING:TABSTOP: Statements should start on a tabstop CHECK:SPACING: No space is necessary after a cast CHECK:SPACING: space preferred before that '|' (ctx:VxE) CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) CHECK:SPACING: spaces preferred around that '|' (ctx:VxV) Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit a0706503158556555fdb6e13b86116ac3da4467a Author: Stefan Herdler Date: Tue May 7 02:24:47 2024 +0200 media: av7110: coding style fixes: blank lines This patch fixes the following checkpatch warnings: CHECK:LINE_SPACING: Please don't use multiple blank lines CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations CHECK:BRACES: Blank lines aren't necessary after an open brace '{' CHECK:BRACES: Blank lines aren't necessary before a close brace '}' WARNING:LINE_SPACING: Missing a blank line after declarations Added or removed blank lines only. "git diff --ignore-blank-lines" shows no changes. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 3b013d82145a433cd101096e9d1cec67eefb7fa1 Author: Stefan Herdler Date: Tue May 7 02:24:46 2024 +0200 media: av7110: coding style fixes: pointer_location This patch fixes the following checkpatch warnings: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 47da4d15c93aaf055225106b382423453f5eecc8 Author: Stefan Herdler Date: Tue May 7 02:24:45 2024 +0200 media: sp8870: coding style fixes: logging This patch fixes the following checkpatch warnings: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ facility level WARNING:TRACING_LOGGING: Unnecessary ftrace-like logging - prefer using ftrace ERROR:TRAILING_STATEMENTS: trailing statements should be on next line Convert logging to the recommend pr_* macros. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 72707bdc22e2586232585935fa088bedb9a8940d Author: Stefan Herdler Date: Tue May 7 02:24:44 2024 +0200 media: sp8870: coding style fixes: miscellaneous This patch fixes the following checkpatch: ERROR:ASSIGN_IN_IF: do not use assignment in if condition WARNING:BRACES: braces {} are not necessary for any arm of this statement WARNING:CONST_STRUCT: struct dvb_frontend_ops should normally be const WARNING:EXPORT_SYMBOL: EXPORT_SYMBOL(foo); should immediately follow its function/variable CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*state)...) over kzalloc(sizeof(struct sp8870_state)...) CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written ... CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 5f0edb7a8ba01f9328b6899282ac577c15d2a6af Author: Stefan Herdler Date: Tue May 7 02:24:43 2024 +0200 media: sp8870: coding style fixes: newline, comments and braces This patch fixes the following checkpatch warnings: ERROR:OPEN_BRACE: open brace '{' following struct go on the same line ERROR:TRAILING_STATEMENTS: trailing statements should be on next line [*] WARNING:LINE_SPACING: Missing a blank line after declarations WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines CHECK:BRACES: Blank lines aren't necessary after an open brace '{' CHECK:LINE_SPACING: Please don't use multiple blank lines CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations Except the 2 comment-blocks, newline changes only. [* The remaining trailing statement will be fixed in the logging patch.] Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 5a053c05a81eb18b2393f4dd1634a3887831f037 Author: Stefan Herdler Date: Tue May 7 02:24:42 2024 +0200 media: sp8870: coding style fixes: whitespace This patch fixes the following checkpatch warnings: ERROR:BRACKET_SPACE: space prohibited before open square bracket '[' ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" ERROR:SPACING: space prohibited before that ',' (ctx:WxW) ERROR:SPACING: space required before the open brace '{' WARNING:SPACING: space prohibited between function name and open parenthesis '(' CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 95ccc5b604415cbdef6bd228340088ac4ceb8055 Author: Stefan Herdler Date: Tue May 7 02:24:41 2024 +0200 media: av7110: remove budget-patch driver This patch removes the budget-patch stand alone driver only. This patch does *not* remove the budget-patch support from the av7110 (= dvb-ttpci) driver. This patch does also *not* remove the support for the full-ts mod. The budget-patch is an obsolete, experimental hardware modification, which aimed to receive the whole transport stream of a transponder by bypassing the av7110. This modification never worked reliably enough to be used in a productive environment. "almost no packet loss" [budget-patch.c #522] is still a packet loss. The successor of the budget-patch is the full-ts mod, which is reliable. The full-ts mod circuit is found on the never rev. 2.2 and 2.3 DVB-S cards ex factory. The full-ts mod support is (only) in the av7110 (= dvb-ttpci) driver. The budget-patch driver is a stand alone driver, which turns the card into a budget card. It doesn't appear to be ever intended for the average user. "Card is required to have loaded firmware to tune properly. Firmware can be loaded by insertion and removal of standard av7110 driver prior to loading this driver." [Kconfig] There is support for the budget-patch in the av7110 (= dvb-ttpci) driver too, which isn't affected by this patch. The budget-patch is obsolete and replaced by the full-ts mod quiet a while now. Remove the budget-patch driver left over from development. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit aad113c02bcf166d9d10ba3fcd6520a606607410 Author: Stefan Herdler Date: Tue May 7 02:24:40 2024 +0200 media: av7110: remove old documentation files The documentation has been update and is now at: linux/Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst linux/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst linux/Documentation/userspace-api/media/dvb/legacy_dvb_video.rst The .rst files of the old documentation aren't necessary any more, remove them. Signed-off-by: Stefan Herdler Signed-off-by: Hans Verkuil commit 2b438c5774cc491a4aa8bb1ec4f49c1a0760a173 Author: Breno Leitao Date: Fri May 31 04:15:50 2024 -0700 openvswitch: Remove generic .ndo_get_stats64 Commit 3e2f544dd8a33 ("net: get stats64 if device if driver is configured") moved the callback to dev_get_tstats64() to net core, so, unless the driver is doing some custom stats collection, it does not need to set .ndo_get_stats64. Since this driver is now relying in NETDEV_PCPU_STAT_TSTATS, then, it doesn't need to set the dev_get_tstats64() generic .ndo_get_stats64 function pointer. Signed-off-by: Breno Leitao Reviewed-by: Subbaraya Sundeep Link: https://lore.kernel.org/r/20240531111552.3209198-2-leitao@debian.org Signed-off-by: Paolo Abeni commit 8c3fdff2171c834df5fa5ff353b94ada2e5376ca Author: Breno Leitao Date: Fri May 31 04:15:49 2024 -0700 openvswitch: Move stats allocation to core With commit 34d21de99cea9 ("net: Move {l,t,d}stats allocation to core and convert veth & vrf"), stats allocation could be done on net core instead of this driver. With this new approach, the driver doesn't have to bother with error handling (allocation failure checking, making sure free happens in the right spot, etc). This is core responsibility now. Move openvswitch driver to leverage the core allocation. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240531111552.3209198-1-leitao@debian.org Signed-off-by: Paolo Abeni commit 51316523d1f233c1cea182d4cccbc3b22ef75d87 Author: Andreas Gruenbacher Date: Sat Jun 1 21:49:54 2024 +0200 gfs2: Minor gfs2_quota_init error path cleanup Add a fail_brelse label and use it where useful. Move variable bh out of the loop to extend its visibility to the new label. No functional change. Signed-off-by: Andreas Gruenbacher commit 5821bf2dffbe18fe1f097dbb027415fa15a38e9a Author: Diogo Ivo Date: Fri May 24 11:58:21 2024 +0100 usb: typec: ucsi: Enable UCSI v2.0 notifications UCSI version 2.0 and above define new PPM notifications. Update the logic to determine which notifications to enable taking into account these changes. Signed-off-by: Diogo Ivo Reviewed-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240524105837.15342-3-diogo.ivo@tecnico.ulisboa.pt Signed-off-by: Greg Kroah-Hartman commit 4207df37dd744f0cb09b7c09b9c5338ea65c44e7 Author: Diogo Ivo Date: Fri May 24 11:58:20 2024 +0100 usb: typec: ucsi: Add new capability bits Newer UCSI versions defined additional optional capability bits. Add their definitions. Signed-off-by: Diogo Ivo Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240524105837.15342-2-diogo.ivo@tecnico.ulisboa.pt Signed-off-by: Greg Kroah-Hartman commit df1c5d55abc118f083854ff7e5048a16c98be714 Author: Francesco Dolcini Date: Mon Jun 3 10:35:58 2024 +0200 usb: typec: mux: gpio-sbu: Make enable gpio optional The enable gpio is not required when the SBU mux is used only for orientation, make it optional. Signed-off-by: Francesco Dolcini Reviewed-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240603083558.9629-3-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit f12e04c39e45b38d60263c41775b0a76b3f8dd0e Author: Francesco Dolcini Date: Mon Jun 3 10:35:57 2024 +0200 dt-bindings: usb: gpio-sbu-mux: Make 'enable-gpios' optional The enable gpio is not required when the SBU mux is used only for orientation, make enable-gpios required only for alternate mode switch use case. Acked-by: Conor Dooley Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20240603083558.9629-2-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit c313a44ac9cda60431bdc7dcdb4b135eaef31785 Author: Jameson Thies Date: Fri May 10 20:12:44 2024 +0000 usb: typec: ucsi: Always set number of alternate modes Providing the number of known alternate modes allows user space to determine when device registration has completed. Always register a number of known alternate modes for the partner and cable plug, even when the number of supported alternate modes is 0. Reviewed-by: Heikki Krogerus Reviewed-by: Benson Leung Signed-off-by: Jameson Thies Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240510201244.2968152-5-jthies@google.com Signed-off-by: Greg Kroah-Hartman commit 4ea9d86d0a6fab9f8fabf9a62894da4d2e590f05 Author: Jameson Thies Date: Fri May 10 20:12:43 2024 +0000 usb: typec: ucsi: Delay alternate mode discovery Delay the ucsi_check_altmodes task to be inline with surrounding partner tasks. This allows partner, cable and identity discovery to complete before alternate mode registration. With that order, alternate mode discovery can be used to indicate the ucsi driver has completed discovery. Reviewed-by: Heikki Krogerus Reviewed-by: Benson Leung Signed-off-by: Jameson Thies Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240510201244.2968152-4-jthies@google.com Signed-off-by: Greg Kroah-Hartman commit fe8db0bbe04d31ab17dc60e205c4a3365c92e67c Author: Abhishek Pandit-Subedi Date: Fri May 10 20:12:42 2024 +0000 usb: typec: Update sysfs when setting ops When adding altmode ops, update the sysfs group so that visibility is also recalculated. Reviewed-by: Heikki Krogerus Reviewed-by: Benson Leung Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Jameson Thies Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240510201244.2968152-3-jthies@google.com Signed-off-by: Greg Kroah-Hartman commit 99516f76db48e1a9d54cdfed63c1babcee4e71a5 Author: Abhishek Pandit-Subedi Date: Fri May 10 20:12:41 2024 +0000 usb: typec: ucsi: Fix null pointer dereference in trace ucsi_register_altmode checks IS_ERR for the alt pointer and treats NULL as valid. When CONFIG_TYPEC_DP_ALTMODE is not enabled, ucsi_register_displayport returns NULL which causes a NULL pointer dereference in trace. Rather than return NULL, call typec_port_register_altmode to register DisplayPort alternate mode as a non-controllable mode when CONFIG_TYPEC_DP_ALTMODE is not enabled. Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Jameson Thies Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240510201244.2968152-2-jthies@google.com Signed-off-by: Greg Kroah-Hartman commit 4cb9f2c5a2df12355d0cbfdfaecc9221779d2eff Author: Bastien Curutchet Date: Tue May 28 12:20:26 2024 +0200 usb: musb: da8xx: Implement BABBLE recovery There is no specific behaviour implemented to recover from a babble error. When a BABBLE error happens, recovery fails as connected sticks are no longer detected by the USB controller. Implement the recover callback of the MUSB operation to reset the USB controller when a BABBLE happens. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240528102026.40136-5-bastien.curutchet@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 608662dd6081f6d3149ecd250b1054d3eb2b7d2d Author: Bastien Curutchet Date: Tue May 28 12:20:25 2024 +0200 usb: musb: da8xx: Remove try_idle implementation from host-only mode The idle_state is not meant for host-only mode. When the device acts as a host, it fails to exit the idle state once entered. This prevents new USB gadgets from being detected once plugged in. Commit 032ec49f5351 ("usb: musb: drop useless board_mode usage") removed a is_otg_enabled() check in the try_idle() that prevented from entering idle_state. This was removed because at that time it was not possible to select host-only mode with CONFIG_USB_MUSB_HOST so dual role was always set. Add #ifndef CONFIG_USB_MUSB_HOST around try_idle() callback to prevent from entering idle_state when host-only mode has been selected. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240528102026.40136-4-bastien.curutchet@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 6ecd7749c9a2930917d43935e14b7f33e54691a7 Author: Bastien Curutchet Date: Tue May 28 12:20:24 2024 +0200 Revert "usb: musb: da8xx: Set phy in OTG mode by default" This reverts commit 7ccf62941a38701ec9a42b4a0fa2868af456e96a. da8xx_musb_set_mode() forces OTG mode regardless the selected mode even if the property 'dr_mode = "host"' is present in device-tree. This causes an unrecoverable error when VBUS supply is shut down : plugged gadgets are no longer detected once VBUS supply is back. Reverting it allows to have a selected mode coherent with device-tree's description. IMO, this shouldn't cause regression because OTG mode is the default selection when 'dr_mode' property is not set. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240528102026.40136-3-bastien.curutchet@bootlin.com Signed-off-by: Greg Kroah-Hartman commit ee8e41b5044f637d9f2dc160f9099a308ec65533 Author: Bastien Curutchet Date: Tue May 28 12:20:23 2024 +0200 phy: ti: phy-da8xx-usb: Add runtime PM support Runtime PM is not supported while USB PHY can be turned off from register accesses. Add runtime PM for the USB2.0 PHY. The PHY is entirely shut down to save as much power as possible. This means that gadgets will not be discovered once suspend state is entered, and suspend state can not be left without an explicit user intervention (through sysfs). That's why runtime PM is disabled by default. Signed-off-by: Bastien Curutchet Link: https://lore.kernel.org/r/20240528102026.40136-2-bastien.curutchet@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 876483a5a5bde7011cf10b1a3a559afd819fd14f Author: Sebastian Reichel Date: Thu May 23 19:12:29 2024 +0200 usb: typec: tcpm: print error on hard reset A USB-C hard reset involves removing the voltage from VBUS for some time. So basically it has the same effect as removing the USB-C plug for a short moment. If the machine is powered from the USB-C port and does not have a fallback supply (e.g. a battery), this will result in a full machine reset due to power loss. Ideally we want to avoid triggering a hard reset on these boards. A non-working USB-C port is probably better than unplanned reboots. But boards with a backup supply should do the hard reset to get everything working again. In theory it would be enough to check the self_powered property, but it seems the property might not be configured consistently enough in system firmwares. So let's start with just printing an error message when a hard reset is triggered on systems we expect to be affected. This at least makes debugging issues on affected systems easier without impacting unaffected systems too much. Signed-off-by: Sebastian Reichel Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240523171645.223225-1-sebastian.reichel@collabora.com Signed-off-by: Greg Kroah-Hartman commit 122968f8dda8205c5735d7e1b1ccb041a54906d1 Author: Sebastian Reichel Date: Thu May 23 19:17:52 2024 +0200 usb: typec: tcpm: avoid resets for missing source capability messages When the Linux Type-C controller drivers probe, they requests a soft reset, which should result in the source restarting to send Source Capability messages again independently of the previous state. Unfortunately some USB PD sources do not follow the specification and do not send them after a soft reset when they already negotiated a specific contract before. The current way (and what is described in the specificiation) to resolve this problem is triggering a hard reset. But a hard reset is fatal on batteryless platforms powered via USB-C PD, since that removes VBUS for some time. Since this is triggered at boot time, the system will be stuck in a boot loop. Examples for platforms affected by this are the Radxa Rock 5B or the Libre Computer Renegade Elite ROC-RK3399-PC. Instead of directly trying a hard reset when no Source Capability message is send by the USB-PD source automatically, this changes the state machine to try explicitly asking for the capabilities by sending a Get Source Capability control message. For me this solves issues with 2 different USB-PD sources - a RAVPower powerbank and a Lemorele USB-C dock. Every other PD source I own follows the specification and automatically sends the Source Capability message after a soft reset, which works with or without this change. I decided against making this extra step limited to devices not having the self_powered flag set, since I don't see any huge drawbacks in this approach and it keeps the logic simpler. The worst case scenario would be a power source, which is really stuck. In that case the hard reset is delayed by another 310ms. Signed-off-by: Sebastian Reichel Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240523171806.223727-1-sebastian.reichel@collabora.com Signed-off-by: Greg Kroah-Hartman commit 2bc33d79fcadb440f76e379da046957bdf50b2e0 Author: Conor Dooley Date: Fri May 31 08:04:32 2024 +0100 usb: musb: mpfs: detect UPLI external vbus control requirement from DT The musb driver core already supports external vbus control for ULPI PHYs, but none of the drivers actually enable it. A customer reported needing this for their device, and now that a DT property for detecting this configuration exists, read the property to enable the feature. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20240531-spilt-garage-ed2113d628e8@wendy Signed-off-by: Greg Kroah-Hartman commit fb67c6c7bc5850e3159a03ca530d2d74484516f3 Author: Conor Dooley Date: Fri May 31 08:04:31 2024 +0100 dt-bindings: musb: mpfs: add ULPI external vbus support Add a property to allow configuring the musb controller on PolarFire SoC to use an external vbus for ULPI PHYs. Signed-off-by: Conor Dooley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240531-fountain-plating-1d3739422a26@wendy Signed-off-by: Greg Kroah-Hartman commit e44f31e2b98361423ed52e79a4e6126da4706b20 Author: Dr. David Alan Gilbert Date: Wed May 29 22:00:02 2024 +0100 usb: host: oxu210hp: remove unused struct 'ehci_dbg_port' 'ehci_dbg_port' is unused in oxu210hp-hcd.c since it's original commit b92a78e582b1 ("usb host: Oxford OXU210HP HCD driver.") when it was in a separate header. Remove it. Note, that this structure, and some others in the driver are mostly clones of include/linux/usb/ehci_def.h. Someone with the hardware to be able to test it might be able to remove a lot more structs as well and just use that header. Signed-off-by: "Dr. David Alan Gilbert" Link: https://lore.kernel.org/r/20240529210002.106369-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit 1fb2d2d25c9a4fd6951afdb48d18d9c24bf0db03 Author: Diogo Ivo Date: Wed May 8 16:43:40 2024 +0100 usb: typec: ucsi: Add new notification bits Newer UCSI versions defined additional notification bits that can be enabled by the PPM. Add their definitions and convert all definitions to BIT_ULL() as we now cross the 32-bit boundary. Signed-off-by: Diogo Ivo Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/3filrg6mbh6m3galir7ew5juakd25uvksimr7mqd7uc5td3xza@fdvxcewozqeh Signed-off-by: Greg Kroah-Hartman commit 1134289b6b93d73721340b66c310fd985385e8fa Author: Peng Hongchi Date: Thu May 23 18:03:15 2024 +0800 usb: dwc2: gadget: Don't write invalid mapped sg entries into dma_desc with iommu enabled When using dma_map_sg() to map the scatterlist with iommu enabled, the entries in the scatterlist can be mergerd into less but longer entries in the function __finalise_sg(). So that the number of valid mapped entries is actually smaller than ureq->num_reqs,and there are still some invalid entries in the scatterlist with dma_addr=0xffffffff and len=0. Writing these invalid sg entries into the dma_desc can cause a data transmission error. The function dma_map_sg() returns the number of valid map entries and the return value is assigned to usb_request::num_mapped_sgs in function usb_gadget_map_request_by_dev(). So that just write valid mapped entries into dma_desc according to the usb_request::num_mapped_sgs, and set the IOC bit if it's the last valid mapped entry. This patch poses no risk to no-iommu situation, cause ureq->num_mapped_sgs equals ureq->num_sgs while using dma_direct_map_sg() to map the scatterlist whith iommu disabled. Signed-off-by: Peng Hongchi Link: https://lore.kernel.org/r/20240523100315.7226-1-hongchi.peng@siengine.com Signed-off-by: Greg Kroah-Hartman commit b50a2da03bd95784541b3f9058e452cc38f9ba05 Author: Roger Quadros Date: Thu May 16 10:15:37 2024 +0530 usb: cdns3-ti: Add workaround for Errata i2409 TI USB2 PHY is known to have a lockup issue on very short suspend intervals. Enable the Suspend Residency quirk flag to workaround this as described in Errata i2409 [1]. [1] - https://www.ti.com/lit/er/sprz457h/sprz457h.pdf Signed-off-by: Roger Quadros Signed-off-by: Ravi Gunasekaran Acked-by: Peter Chen Link: https://lore.kernel.org/r/20240516044537.16801-3-r-gunasekaran@ti.com Signed-off-by: Greg Kroah-Hartman commit 0aca19e4037a4143273e90f1b44666b78b4dde9b Author: Roger Quadros Date: Thu May 16 10:15:36 2024 +0530 usb: cdns3: Add quirk flag to enable suspend residency Some platforms (e.g. ti,j721e-usb, ti,am64-usb) require this bit to be set to workaround a lockup issue with PHY short suspend intervals [1]. Add a platform quirk flag to indicate if Suspend Residency should be enabled. [1] - https://www.ti.com/lit/er/sprz457h/sprz457h.pdf i2409 - USB: USB2 PHY locks up due to short suspend Signed-off-by: Roger Quadros Signed-off-by: Ravi Gunasekaran Acked-by: Peter Chen Link: https://lore.kernel.org/r/20240516044537.16801-2-r-gunasekaran@ti.com Signed-off-by: Greg Kroah-Hartman commit 8b6b386f9aa936ed0c190446c71cf59d4a507690 Author: Simon Holesch Date: Sun May 19 16:15:38 2024 +0200 usbip: Don't submit special requests twice Skip submitting URBs, when identical requests were already sent in tweak_special_requests(). Instead call the completion handler directly to return the result of the URB. Even though submitting those requests twice should be harmless, there are USB devices that react poorly to some duplicated requests. One example is the ChipIdea controller implementation in U-Boot: The second SET_CONFIGURATION request makes U-Boot disable and re-enable all endpoints. Re-enabling an endpoint in the ChipIdea controller, however, was broken until U-Boot commit b272c8792502 ("usb: ci: Fix gadget reinit"). Signed-off-by: Simon Holesch Acked-by: Shuah Khan Reviewed-by: Hongren Zheng Tested-by: Hongren Zheng Link: https://lore.kernel.org/r/20240519141922.171460-1-simon@holesch.de Signed-off-by: Greg Kroah-Hartman commit 804da867ad016d53bf33373cfeaae041775455f1 Author: Norihiko Hama Date: Wed May 15 09:43:39 2024 +0900 usb-storage: Optimize scan delay more precisely Current storage scan delay is reduced by the following old commit. a4a47bc03fe5 ("Lower USB storage settling delay to something more reasonable") It means that delay is at least 'one second', or zero with delay_use=0. 'one second' is still long delay especially for embedded system but when delay_use is set to 0 (no delay), still error observed on some USB drives. So delay_use should not be set to 0 but 'one second' is quite long. Especially for embedded system, it's important for end user how quickly access to USB drive when it's connected. That's why we have a chance to minimize such a constant long delay. This patch optimizes scan delay more precisely to minimize delay time but not to have any problems on USB drives by extending module parameter 'delay_use' in milliseconds internally. The parameter 'delay_use' optionally supports in milliseconds if it ends with 'ms'. It makes the range of value to 1 / 1000 in internal 32-bit value but it's still enough to set the delay time. By default, delay time is 'one second' for backward compatibility. For example, it seems to be good by changing delay_use=100ms, that is 100 millisecond delay without issues for most USB pen drives. Signed-off-by: Norihiko Hama Link: https://lore.kernel.org/r/20240515004339.29892-1-Norihiko.Hama@alpsalpine.com Signed-off-by: Greg Kroah-Hartman commit 0a01aec24e777a03c97fc4ed96425de981a1a1f7 Author: R Sundar Date: Mon May 6 21:58:29 2024 +0530 usb: typec: nb7vpq904m: Remove unneeded indentation In function nb7vpq904m_parse_data_lanes_mapping(), the "if (ep)" condition is basically the entire function. Making the code a bit more readable by inverting the condition so that the function returns immediately if there is no "ep". Signed-off-by: R Sundar Link: https://lore.kernel.org/r/20240506162829.5223-1-prosunofficial@gmail.com Signed-off-by: Greg Kroah-Hartman commit 95fd34a8595cfbaa5d0678092f7be3260e1c4908 Author: Dr. David Alan Gilbert Date: Fri May 10 00:05:16 2024 +0100 clk: sunxi: Remove unused struct 'gates_data' 'gates_data' (and it's associated define) are unused since commit ee38b2698ae2 ("clk: sunxi: Add a simple gates driver"). Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20240509230516.86023-1-linux@treblig.org Signed-off-by: Chen-Yu Tsai commit fbce12d2899c4f19632d85df06c6d9377a565534 Author: Sean Anderson Date: Fri May 3 11:34:22 2024 -0400 arm64: zynqmp: Add coresight cpu debug support Add coresight debug support to the device tree. This can be useful when panicking, especially when a core is hung in EL3. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240503153422.1958812-1-sean.anderson@linux.dev Signed-off-by: Michal Simek commit 4e7134faf306d570784a9346f0e8398e949a51aa Author: Jeff Johnson Date: Mon Jun 3 20:36:28 2024 -0700 clk: sunxi-ng: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sunxi-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/suniv-f1c100s-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun20i-d1-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun20i-d1-r-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun50i-a64-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun50i-a100-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun50i-a100-r-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun50i-h6-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun50i-h6-r-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun50i-h616-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun4i-a10-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun6i-a31-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun6i-rtc-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-a23-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-a33-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-a83t-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-h3-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-r40-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-v3s-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-de2-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun8i-r-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun9i-a80-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun9i-a80-de-ccu.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sunxi-ng/sun9i-a80-usb-ccu.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240603-md-drivers-clk-sunxi-ng-v1-1-c44a4c22d544@quicinc.com Signed-off-by: Chen-Yu Tsai commit ffd8e8bd26e945a957e827427e8cbe8fa8e23d0d Author: Andy Shevchenko Date: Mon May 6 17:00:59 2024 +0300 serial: 8250: Extract platform driver Extract platform driver to a separate module for better maintenance and to reduce churn on 8250_core part changes when it's solely related to the former. No functional changes intended. Signed-off-by: Andy Shevchenko Acked-by: Sunil V L Tested-by: Sunil V L Link: https://lore.kernel.org/r/20240506140308.4040735-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c0e1aa60d6bd8c29096f86f311283a6a9b63aae9 Author: Andy Shevchenko Date: Mon May 6 17:00:58 2024 +0300 serial: 8250: Extract RSA bits Extract RSA bits to a separate module for better maintenance and to reduce a churn on 8250_core part changes when it's solely related to the former. No functional changes intended. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240506140308.4040735-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3093f180bc6e3b5442391e6d58a3cb08d88c9769 Author: Rasmus Villemoes Date: Tue May 28 11:40:21 2024 +0200 serial: imx: stop casting struct uart_port to struct imx_port struct imx_port does have a struct uart_port as its first member, so the current code works, but it is not how kernel code is usually written. Similar to many other serial drivers, introduce and use a to_imx_port() helper based on container_of(). No functional change. Signed-off-by: Rasmus Villemoes Reviewed-by: Ilpo Järvinen Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20240528094022.2161066-1-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 80c4d3d4890563632d7bcc8d048dbd4e1c519f17 Author: Hans de Goede Date: Sat May 11 17:20:30 2024 +0200 vt: keyboard: Use led_set_brightness() in LED trigger activate() callback A LED trigger's activate() callback gets called when the LED trigger gets activated for a specific LED, so that the trigger code can ensure the LED state matches the current state of the trigger condition. led_trigger_event() is intended for trigger condition state changes and iterates over _all_ LEDs which are controlled by this trigger changing the brightness of each of them. In the activate() case only the brightness of the LED which is being activated needs to change and that LED is passed as an argument to activate(), switch to led_set_brightness() to only change the brightness of the LED being activated. Signed-off-by: Hans de Goede Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20240511152030.4848-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 0bb17fdc6735517c2127ba058126dd104cb3ee30 Author: Shresth Prasad Date: Sat May 18 17:10:53 2024 +0530 tty: sunsu: Simplify device_node cleanup by using __free Add `__free` function attribute to `ap` and `match` pointer initialisations which ensure that the pointers are freed as soon as they go out of scope, thus removing the need to manually free them using `of_node_put`. This also removes the need for the `goto` statement and the `rc` variable. Suggested-by: Julia Lawall Signed-off-by: Shresth Prasad Link: https://lore.kernel.org/r/20240518114051.18125-3-shresthprasad7@gmail.com Signed-off-by: Greg Kroah-Hartman commit 39d762edd1f353c4446dbce83a18da4e491cc48e Author: Ricard Wanderlof Date: Tue May 28 17:40:04 2024 +0200 ASoC: dt-bindings: tlv320adc3xxx: Fix incorrect GPIO description Fix the description for the ti,dmdin-gpio1 and ti,dmclk-gpio2 properties to correctly describe that when configured as general purpose outputs (ADC3XXX_GPIO_GPO), the pins are available via the GPIO framework. Signed-off-by: Ricard Wanderlof Reviewed-by: Rob Herring (Arm) Link: https://msgid.link/r/20240528-tlv320adc3xxx-dt-gpio-fix-v1-1-209fb2c2f86f@axis.com Signed-off-by: Mark Brown commit 240a3a167468b839363a0bf636c6ae77daca0be1 Author: Yang Li Date: Sat May 11 17:36:00 2024 +0800 staging: vc04_services: Fix kernel-doc param for vchiq_register_chrdev To adhere to the kernel-doc specification, use a colon to separate the parameter name and its description. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20240511093600.59180-1-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 1669137eb0acc472216bad6b3fe195f3112b90b2 Author: Dr. David Alan Gilbert Date: Wed May 29 01:18:07 2024 +0100 staging: greybus: audio: remove unused struct gb_mixer_control 'gb_mixer_control' is unused since the original commit 6339d2322c47 ("greybus: audio: Add topology parser for GB codec"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240529001807.262955-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit ac7e01f401a5573f72bbe48d32eb8d9f2af8cbce Author: Dr. David Alan Gilbert Date: Sat Jun 1 14:16:11 2024 +0100 staging: r8712u: remove unused struct 'zero_bulkout_context' Remove struct zero_bulkout_context as it is unused. Signed-off-by: Dr. David Alan Gilbert Tested-by: Philipp Hortmann AW-NU120 Link: https://lore.kernel.org/r/20240601131611.52441-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman commit eac2c7d84bf2de7b25c94dc10bcf13070adf7d49 Author: Roshan Khatri Date: Sat Jun 1 14:16:53 2024 +0545 staging: rtl8723bs: hal: Fix spelling mistakes in odm.h This patch fixes misspelled words to increase code readability and searching. Signed-off-by: Roshan Khatri Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240601083153.96242-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit d514eaf4f4a043800573bc666ace20065c665acf Author: Michael Straube Date: Mon May 27 11:45:27 2024 +0200 staging: rtl8192e: remove unnecessary line breaks Remove some unnecessary line breaks after '=' and '==' to improve readability. Signed-off-by: Michael Straube Reviewed-by: Nam Cao Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240527094527.2046-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf22697653a9f61b116b9ba0ad9182cc0e9b43e3 Author: Michael Straube Date: Mon May 27 11:45:26 2024 +0200 staging: rtl8192e: reduce indentation level Reduce indentation level in _rtl92e_dm_rx_path_sel_byrssi() by negating if statements and use continue in for loops. This way the indentation level of the code that is covered by the if checks can be reduced. This improves readability and clears two checkpatch warnings. WARNING: Too many leading tabs - consider code refactoring Signed-off-by: Michael Straube Reviewed-by: Nam Cao Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240527094527.2046-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit d1700a1bd23c629fb7b294eb748384b9f44f02c3 Author: Roshan Khatri Date: Mon May 27 10:43:56 2024 +0545 staging: rtl8723bs: hal: Fix spelling mistakes in rtl8723b_cmd.c This patch fixes misspelled words to increase code readability and searching. Signed-off-by: Roshan Khatri Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240527045856.72996-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit ea032c8d87dfd1da41a84bf179d9513dd17b51d0 Author: Roshan Khatri Date: Sat May 25 21:47:29 2024 +0545 staging: rtl8712: Fix spelling mistake in rtl871x_io.h This patch corrects misspelled word to increase code readability and searching. Signed-off-by: Roshan Khatri Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240525160230.66365-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ed3e0a0e1b1e1336f3b3979aa478e1f5312da4d Author: Nam Cao Date: Sat May 25 09:32:29 2024 +0200 staging: rtl8712: remove unnecessary alignment of pxmitpriv->pxmitbuf This driver wants pxmitpriv->pxmitbuf to be 4-byte aligned. This is ensured by allocating 4 more bytes than required with kmalloc(), then do the p = p + 4 - (p & 3) trick to make sure the pointer is 4-byte aligned. This is unnecessary. Pointers from kmalloc() are already at least 8-byte-aligned. Remove this alignment trick to simplify the code, and also to stop wasting 4 extra bytes of dynamic memory allocator. This also gets rid of a (false) warning from kmemleak. This 4-byte-aligned buffer is used to store pointers from kmalloc(). For 64-bit platforms, pointer size is 8 bytes and kmemleak only scans for pointers in 8-byte blocks, thus it misses the pointers stored in this 4-byte-aligned buffer and thinks that these pointers have been leaked. This is just a false warning, not a real problem. But still, it would be nice to get rid of these warnings. Reported-and-tested-by: syzbot+83763e624cfec6b462cb@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-staging/000000000000809328060a8a4c1c@google.com Signed-off-by: Nam Cao Link: https://lore.kernel.org/r/20240525073229.4144612-1-namcao@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 8bcb9afc5de366d7c3e572582ff0da8b155e7e01 Author: Roshan Khatri Date: Fri May 24 21:25:01 2024 +0545 staging: rtl8712: Fix spelling mistake in rtl871x_mlme.c This patch corrects misspelled word to increase code readability and searching. Signed-off-by: Roshan Khatri Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240524154001.63946-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit 90bf0a8c0bbf15c253b4a03c9513ed76b7dbf07b Author: Roshan Khatri Date: Fri May 24 09:57:35 2024 +0545 staging: rtl8192e: Fix spelling mistakes in rtllib_softmac.c This patch corrects some misspellings to increase code readability and searching. Signed-off-by: Roshan Khatri Reviewed-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240524041235.61184-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit a174df4434785447238f4d15127f9ae0834ac79a Author: Roshan Khatri Date: Tue May 21 20:21:17 2024 +0545 staging: rtl8712: Fix spelling mistake in rtl8712_xmit.c codespell reported misspelled aggregation in rtl8712_xmit.c. This patch corrects the spelling to increase code readability and searching. Signed-off-by: Roshan Khatri Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240521143617.53139-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c0c6271338da4c9a7d4e9d6be47d70badcc4d8a Author: Roshan Khatri Date: Tue May 21 15:41:33 2024 +0545 staging: rtl8712: Fix spelling mistake in rtl871x_event.h codespell reported misspelled joining in rtl871x_event.h. Correcting the misspelled word improves readability and helps in searching. Signed-off-by: Roshan Khatri Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20240521095633.50753-1-topofeverest8848@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0ac430e5d9c11a037efa911ca77233a51907158 Author: Ashok Kumar Date: Thu May 9 10:19:23 2024 -0700 staging: vme_user: Add blank line after struct decl Added blank line after struct declarions for improving readability indicated by checkpatch.pl Signed-off-by: Ashok Kumar Link: https://lore.kernel.org/r/Zj0Fm+vBdzPHlZKS@c Signed-off-by: Greg Kroah-Hartman commit c8c96293a599c6291fa2622830fcbfc1ce0f5a7d Author: Marc Dietrich Date: Sun May 26 21:39:32 2024 +0200 staging: nvec: make i2c controller register writes robust The i2c controller needs to read back the data written to its registers. This way we can avoid the long delay in the interrupt handler. Signed-off-by: Marc Dietrich Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20240526193932.57277-1-marvin24@gmx.de Signed-off-by: Greg Kroah-Hartman commit 331fd192b515d7426802593329ce6c77df88c177 Author: Chen shuo <1289151713@qq.com> Date: Wed May 8 23:13:52 2024 +0800 staging: rtl8192e: remove the r8192E_dev.c's unnecessary brace There is a unnecessary brace in r8192E_dev.c.Remove it to shorten code and improve readability. Signed-off-by: Chen shuo <1289151713@qq.com> Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/tencent_1992979C468AF087A1909000C6D0D5E61207@qq.com Signed-off-by: Greg Kroah-Hartman commit cd0057ad75116bacf16fea82e48c1db642971136 Merge: 2589d668e1a6e 99b8add01f98a Author: Paolo Abeni Date: Tue Jun 4 13:23:32 2024 +0200 Merge branch 'tcp-refactor-skb_cmp_decrypted-checks' Jakub Kicinski says: ==================== tcp: refactor skb_cmp_decrypted() checks Refactor the input patch coalescing checks and wrap "EOR forcing" logic into a helper. This will hopefully make the code easier to follow. While at it throw some DEBUG_NET checks into skb_shift(). ==================== Link: https://lore.kernel.org/r/20240530233616.85897-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 99b8add01f98a8ecf498de1467e8bf13dbf02daa Author: Jakub Kicinski Date: Thu May 30 16:36:16 2024 -0700 net: skb: add compatibility warnings to skb_shift() According to current semantics we should never try to shift data between skbs which differ on decrypted or pp_recycle status. Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni commit 1be68a87ab333af37b02ad928a724a722a5a8203 Author: Jakub Kicinski Date: Thu May 30 16:36:15 2024 -0700 tcp: add a helper for setting EOR on tail skb TLS (and hopefully soon PSP will) use EOR to prevent skbs with different decrypted state from getting merged, without adding new tests to the skb handling. In both cases once the connection switches to an "encrypted" state, all subsequent skbs will be encrypted, so a single "EOR fence" is sufficient to prevent mixing. Add a helper for setting the EOR bit, to make this arrangement more explicit. Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni commit 071115301838c6c265065dd5d6bf43a9a987a550 Author: Jakub Kicinski Date: Thu May 30 16:36:14 2024 -0700 tcp: wrap mptcp and decrypted checks into tcp_skb_can_collapse_rx() tcp_skb_can_collapse() checks for conditions which don't make sense on input. Because of this we ended up sprinkling a few pairs of mptcp_skb_can_collapse() and skb_cmp_decrypted() calls on the input path. Group them in a new helper. This should make it less likely that someone will check mptcp and not decrypted or vice versa when adding new code. This implicitly adds a decrypted check early in tcp_collapse(). AFAIU this will very slightly increase our ability to collapse packets under memory pressure, not a real bug. Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Reviewed-by: Matthieu Baerts (NGI0) Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni commit 324586a820c95f7b4b67efc2dd2afba398631f8b Author: Tree Davies Date: Mon May 20 20:17:18 2024 -0700 Staging: rtl8192e: Rename variable bPktInBuf Rename variable bPktInBuf to pkt_in_buf to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-32-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 1631cf6575bc9cf0624d1af84dc42b4f5878f513 Author: Tree Davies Date: Mon May 20 20:17:17 2024 -0700 Staging: rtl8192e: Rename variable prxbIndicateArray Rename variable prxbIndicateArray to prxb_indicate_array to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-31-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 60d98bd24b268d0394bf5216924ea40c5f215a1f Author: Tree Davies Date: Mon May 20 20:17:16 2024 -0700 Staging: rtl8192e: Rename variable RfdCnt Rename variable RfdCnt to rfd_cnt to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-30-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 9ab0d0e99f092ecd79a1c72e29a36aa0504bc1f8 Author: Tree Davies Date: Mon May 20 20:17:15 2024 -0700 Staging: rtl8192e: Rename variable IsQoSDataFrame Rename variable IsQoSDataFrame to is_qos_data_frame to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-29-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 63afc2d9226d7adf8806ab7ae90acf6e9cfef774 Author: Tree Davies Date: Mon May 20 20:17:14 2024 -0700 Staging: rtl8192e: Rename variable CcxRmState Rename variable CcxRmState to ccx_rm_state to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-28-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4d98ca874d54b102dd78ca5486743d2c4b36581c Author: Tree Davies Date: Mon May 20 20:17:13 2024 -0700 Staging: rtl8192e: Rename variable Frame_QoSTID Rename variable Frame_QoSTID to frame_qos_tid to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-27-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 318343d3379f2da45d98fba4512fa1fa10770872 Author: Tree Davies Date: Mon May 20 20:17:12 2024 -0700 Staging: rtl8192e: Rename variable bWithCcxVerNum Rename variable bWithCcxVerNum to with_ccx_ver_num to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-26-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 514218ab2d737f14cd40a177788821790877fb63 Author: Tree Davies Date: Mon May 20 20:17:11 2024 -0700 Staging: rtl8192e: Rename variable bMBssidValid Rename variable bMBssidValid to mb_ssid_valid to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-25-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit c29e197cfb9f3e5325dc9fa78b124222168f621e Author: Tree Davies Date: Mon May 20 20:17:10 2024 -0700 Staging: rtl8192e: Rename variable bMatchWinStart Rename variable bMatchWinStart to match_win_start to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-24-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 30fd4752b7fcb5bba6c75ba32b2ac8b5faaf9810 Author: Tree Davies Date: Mon May 20 20:17:09 2024 -0700 Staging: rtl8192e: Rename variable IsDataFrame Rename variable IsDataFrame to is_data_frame to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-23-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit b0e595347505f0f9effa983c8d2f08eed27f8637 Author: Tree Davies Date: Mon May 20 20:17:08 2024 -0700 Staging: rtl8192e: Rename variable WinSize Rename variable WinSize to win_size to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-22-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4081bb9c53892d575006f01febe996de845dd81c Author: Tree Davies Date: Mon May 20 20:17:07 2024 -0700 Staging: rtl8192e: Rename variable WinEnd Rename variable WinEnd to win_end to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-21-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 318405a657f056345e34908b217084d45644867a Author: Tree Davies Date: Mon May 20 20:17:06 2024 -0700 Staging: rtl8192e: Remove variable ChkLength Remove variable ChkLength which fixes warning Avoid CamelCase, and use llc_offset in its place. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-20-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit b1e8829c75905a0e7df5fead383a1738af3406bb Author: Tree Davies Date: Mon May 20 20:17:05 2024 -0700 Staging: rtl8192e: Rename variable LLCOffset Rename variable LLCOffset to llc_offset to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-19-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 8272a4879847cd2f7f607a1c7083e2b0510f9894 Author: Tree Davies Date: Mon May 20 20:17:04 2024 -0700 Staging: rtl8192e: Rename variable nPadding_Length Rename variable nPadding_Length to pad_len to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-18-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit ef40d4a14639f8edee13e3bc65c74a2bf278e30d Author: Tree Davies Date: Mon May 20 20:17:03 2024 -0700 Staging: rtl8192e: Rename variable pList Rename variable pList to list to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-17-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit be5bd4ca524242ab963235d04314dbd9472cc007 Author: Tree Davies Date: Mon May 20 20:17:02 2024 -0700 Staging: rtl8192e: Rename variable AddReorderEntry Rename variable AddReorderEntry to add_reorder_entry to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-16-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit a4b2c5fa04b94dbc02e63c8d6ce7b19d5998da86 Author: Tree Davies Date: Mon May 20 20:17:01 2024 -0700 Staging: rtl8192e: Rename variable Decrypted Rename variable Decrypted to decrypted to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-15-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 3a76226264314b744f64ec49205f3ea236bb82fd Author: Tree Davies Date: Mon May 20 20:17:00 2024 -0700 Staging: rtl8192e: Rename variable RfdArray Rename variable RfdArray to rfd_array to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-14-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 54e3fbf63880b6164d8fe2ceab449275f62fbd09 Author: Tree Davies Date: Mon May 20 20:16:59 2024 -0700 Staging: rtl8192e: Rename variable RxReorderIndicatePacket Rename variable RxReorderIndicatePacket to rx_reorder_indicate_packet to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-13-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4d06509c17bc3c6e7c49782c8c7385662e29c5e0 Author: Tree Davies Date: Mon May 20 20:16:58 2024 -0700 Staging: rtl8192e: Rename variable IsLegacyDataFrame Rename variable IsLegacyDataFrame to is_legacy_data_frame to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-12-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 3acc3173e13baf15acd3465a676d3f570558e622 Author: Tree Davies Date: Mon May 20 20:16:57 2024 -0700 Staging: rtl8192e: Rename variable rtllib_rx_InfraAdhoc Rename variable rtllib_rx_InfraAdhoc to rtllib_rx_infra_adhoc to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit e1ec5c944f983fefb08d0e89baacea2d6c8e62a5 Author: Tree Davies Date: Mon May 20 20:16:56 2024 -0700 Staging: rtl8192e: Rename variable rtllib_rx_Monitor Rename variable rtllib_rx_Monitor to rtllib_rx_monit to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit ff98863720787d89d50998250f313217ad930e11 Author: Tree Davies Date: Mon May 20 20:16:55 2024 -0700 Staging: rtl8192e: Rename variable elementID Rename variable elementID to element_id to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit a919bc7d28ae923281f933d6d7596cd27ad6a0c2 Author: Tree Davies Date: Mon May 20 20:16:54 2024 -0700 Staging: rtl8192e: Rename variable MBssidMask Rename variable MBssidMask to mb_ssid_mask to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit bb003eab39eee4bd370abc4797b382876c8b80f7 Author: Tree Davies Date: Mon May 20 20:16:53 2024 -0700 Staging: rtl8192e: Rename variable MBssid Rename variable MBssid to mb_ssid to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 5a24883f6266ee35631739d3650f655f9003630f Author: Tree Davies Date: Mon May 20 20:16:52 2024 -0700 Staging: rtl8192e: Rename variable bContainHTC Rename variable bContainHTC to contain_htc to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit aff215402378fea463d357d72710440aca5a4237 Author: Tree Davies Date: Mon May 20 20:16:51 2024 -0700 Staging: rtl8192e: Rename variable bWithAironetIE Rename variable bWithAironetIE to with_aironet_ie to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 6db705b27b77ad595a4f8963d9fdb0e963574f78 Author: Tree Davies Date: Mon May 20 20:16:50 2024 -0700 Staging: rtl8192e: Rename variable CountryIeLen Rename variable CountryIeLen to country_ie_len to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 7b66b9d83a352fc6220bfcee4973fa0a0a411a28 Author: Tree Davies Date: Mon May 20 20:16:49 2024 -0700 Staging: rtl8192e: Rename variable CountryIeBuf Rename variable CountryIeBuf to country_ie_buf to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 63b109b1f575c4b1c4f51c58c7b54c39179e0626 Author: Tree Davies Date: Mon May 20 20:16:48 2024 -0700 Staging: rtl8192e: Rename variable IsPassiveChannel Rename variable IsPassiveChannel to is_passive_channel to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240521031718.17852-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 2589d668e1a6ebe85329f1054cdad13647deac06 Merge: 4fdb6b6063f07 1d17568e74ded Author: Paolo Abeni Date: Tue Jun 4 11:16:45 2024 +0200 Merge branch 'net-allow-dissecting-matching-tunnel-control-flags' Davide Caratti says: ==================== net: allow dissecting/matching tunnel control flags Ilya says: "for correct matching on decapsulated packets, we should match on not only tunnel id and headers, but also on tunnel configuration flags like TUNNEL_NO_CSUM and TUNNEL_DONT_FRAGMENT. This is done to distinguish similar tunnels with slightly different configs. And it is important since tunnel configuration is flow based, i.e. can be different for every packet, even though the main tunnel port is the same." - patch 1 extends the kernel's flow dissector to extract these flags from the packet's tunnel metadata. - patch 2 extends TC flower to match on any combination of TUNNEL_NO_CSUM, TUNNEL_DONT_FRAGMENT, TUNNEL_OAM, TUNNEL_CRIT_OPT v4: - fix kernel-doc warning in flow_dissector.h (thanks Jakub) v3: - rebase on top of new uAPI bits and internals after commit 5832c4a77d69 ("ip_tunnel: convert __be16 tunnel flags to bitmaps"). Use of network byte order is no more needed, since these bits match on metadata: convert netlink attributes to be u32. - also include TUNNEL_CRIT_OPT v2: - use NL_REQ_ATTR_CHECK() where possible (thanks Jamal) - don't overwrite 'ret' in the error path of fl_set_key_flags() ==================== Link: https://lore.kernel.org/r/cover.1717088241.git.dcaratti@redhat.com Signed-off-by: Paolo Abeni commit 1d17568e74dedbcb54d36af0662a15128297d681 Author: Davide Caratti Date: Thu May 30 19:08:35 2024 +0200 net/sched: cls_flower: add support for matching tunnel control flags extend cls_flower to match TUNNEL_FLAGS_PRESENT bits in tunnel metadata. Suggested-by: Ilya Maximets Acked-by: Jamal Hadi Salim Signed-off-by: Davide Caratti Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 668b6a2ef832a878494cc1b12a881c8ec0494b25 Author: Davide Caratti Date: Thu May 30 19:08:34 2024 +0200 flow_dissector: add support for tunnel control flags Dissect [no]csum, [no]dontfrag, [no]oam, [no]crit flags from skb metadata. This is a prerequisite for matching these control flags using TC flower. Suggested-by: Ilya Maximets Signed-off-by: Davide Caratti Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 09bae5876dde05410e62145f7e4c3be39011efff Author: Jiapeng Chong Date: Fri May 31 16:55:59 2024 +0800 HID: nintendo: Remove some unused functions These functions are defined in the hid-nintendo.c file, but not called elsewhere, so delete these unused functions. drivers/hid/hid-nintendo.c:672:20: warning: unused function 'joycon_device_is_procon'. drivers/hid/hid-nintendo.c:682:20: warning: unused function 'joycon_device_is_snescon'. drivers/hid/hid-nintendo.c:687:20: warning: unused function 'joycon_device_is_gencon'. drivers/hid/hid-nintendo.c:692:20: warning: unused function 'joycon_device_is_n64con'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9265 Signed-off-by: Jiapeng Chong Signed-off-by: Jiri Kosina commit 4fdb6b6063f07d959a1c52a2ee580afc4da34e2d Author: Jakub Kicinski Date: Wed May 29 09:25:27 2024 -0700 net: count drops due to missing qdisc as dev->tx_drops Catching and debugging missing qdiscs is pretty tricky. When qdisc is deleted we replace it with a noop qdisc, which silently drops all the packets. Since the noop qdisc has a single static instance we can't count drops at the qdisc level. Count them as dev->tx_drops. ip netns add red ip link add type veth peer netns red ip link set dev veth0 up ip -netns red link set dev veth0 up ip a a dev veth0 10.0.0.1/24 ip -netns red a a dev veth0 10.0.0.2/24 ping -c 2 10.0.0.2 # 2 packets transmitted, 2 received, 0% packet loss, time 1031ms ip -s link show dev veth0 # TX: bytes packets errors dropped carrier collsns # 1314 17 0 0 0 0 tc qdisc replace dev veth0 root handle 1234: mq tc qdisc replace dev veth0 parent 1234:1 pfifo tc qdisc del dev veth0 parent 1234:1 ping -c 2 10.0.0.2 # 2 packets transmitted, 0 received, 100% packet loss, time 1034ms ip -s link show dev veth0 # TX: bytes packets errors dropped carrier collsns # 1314 17 0 3 0 0 Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240529162527.3688979-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit f06ac3ed04e877cc424f150700b582d0b2ee5b44 Author: Xianwei Zhao Date: Wed May 22 16:27:27 2024 +0800 clk: meson: c3: add c3 clock peripherals controller driver Add the C3 peripherals clock controller driver in the C3 SoC family. [jbrunet: fix Kconfig select order and probe function name] Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240522082727.3029656-6-xianwei.zhao@amlogic.com Signed-off-by: Jerome Brunet commit 8a9a129dc565599a877ceac059ddd96ec81104eb Author: Xianwei Zhao Date: Wed May 22 16:27:26 2024 +0800 clk: meson: c3: add support for the C3 SoC PLL clock Add the C3 PLL clock controller driver for the Amlogic C3 SoC family. [jbrunet: fixed probe function name] Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240522082727.3029656-5-xianwei.zhao@amlogic.com Signed-off-by: Jerome Brunet commit d7583cde8c754cb4bd4262f26315407e21e42b3d Merge: b9c6dd7aab614 fc1c7f941c714 Author: Jerome Brunet Date: Tue Jun 4 10:28:21 2024 +0200 Merge branch 'v6.11/bindings' into v6.11/drivers * v6.11/bindings: dt-bindings: clock: add Amlogic C3 peripherals clock controller dt-bindings: clock: add Amlogic C3 SCMI clock controller support dt-bindings: clock: add Amlogic C3 PLL clock controller commit fc1c7f941c71460a730a449f76764d883e270cba Author: Xianwei Zhao Date: Wed May 22 16:27:25 2024 +0800 dt-bindings: clock: add Amlogic C3 peripherals clock controller Add the peripherals clock controller dt-bindings for Amlogic C3 SoC family Reviewed-by: Rob Herring (Arm) Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240522082727.3029656-4-xianwei.zhao@amlogic.com Signed-off-by: Jerome Brunet commit d309989a0a0aff3b8ad5259aa11f119b15336c1a Author: Xianwei Zhao Date: Wed May 22 16:27:24 2024 +0800 dt-bindings: clock: add Amlogic C3 SCMI clock controller support Add the SCMI clock controller dt-bindings for Amlogic C3 SoC family Acked-by: Rob Herring (Arm) Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240522082727.3029656-3-xianwei.zhao@amlogic.com Signed-off-by: Jerome Brunet commit 0e6be855a96dd44effce97b6b8d0cf0d0d0b7303 Author: Xianwei Zhao Date: Wed May 22 16:27:23 2024 +0800 dt-bindings: clock: add Amlogic C3 PLL clock controller Add the PLL clock controller dt-bindings for Amlogic C3 SoC family. Reviewed-by: Krzysztof Kozlowski Co-developed-by: Chuan Liu Signed-off-by: Chuan Liu Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240522082727.3029656-2-xianwei.zhao@amlogic.com Signed-off-by: Jerome Brunet commit 8bb9f9fa59ef9034d081e89978c5c1031fc850bd Author: Jeff Johnson Date: Sat May 25 08:17:42 2024 -0700 HID: intel-ish-hid: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/intel-ish-hid/intel-ishtp.o Signed-off-by: Jeff Johnson Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 9ee76cd60025b61f12d8a0a21861c763c2b7674e Author: Jeff Johnson Date: Sat May 25 08:17:41 2024 -0700 HID: intel-ish-hid: fix ishtp_wait_resume() kernel-doc Fix the 'make W=1' kernel-doc warning: drivers/hid/intel-ish-hid/ishtp/bus.c:853: warning: Function parameter or struct member 'dev' not described in 'ishtp_wait_resume' Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311060843.dXENYlGc-lkp@intel.com/ Signed-off-by: Jeff Johnson Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 54a687cd49e3625819f24e17655346c85f498cbc Author: Andy Shevchenko Date: Thu May 30 22:12:30 2024 +0300 gpiolib: Show more info for interrupt only lines in debugfs Show more info for interrupt only lines in debugfs. It's useful to monitor the lines that have been never requested as GPIOs, but IRQs. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530191418.1138003-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 5a646e03e956f45e74c0a606f51e1ebc13880309 Author: Andy Shevchenko Date: Thu May 30 22:12:29 2024 +0300 gpiolib: Return label, if set, for IRQ only line If line has been locked as IRQ without requesting, still check its label and return it, if not NULL. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240530191418.1138003-2-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 06483d251df678907b1d627d67b5464beb5358b3 Author: José Expósito Date: Fri May 24 13:21:36 2024 +0200 HID: uclogic: Use Rx and Ry for touch strips Currently, HUION devices use ABS_WHEEL as the usage for touch strips. There are 2 main issues with this approach: The first one is that the descriptor for touch rings (uclogic_rdesc_v2_frame_touch_ring_arr) also uses ABS_WHEEL. >From user-space it is impossible to know which device sends the events. The second one is that Wacom uses ABS_RX/ABS_RY to notify events from touch strips and user-space was designed to handle those axes. Change the usage of touch strips to Rx/Ry to fix both issues. Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/989 Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit 48144e83daba5619adaf0baf4fcea98082dce818 Author: José Expósito Date: Fri May 24 13:21:35 2024 +0200 HID: uclogic: Support HUION devices with up to 20 buttons The HID descriptor for HUION tablets was limited to 13 buttons. However, there are devices with more buttons in their frames. So far, the device with more buttons released by HUION is the Huion Kamvas Pro 24 (GT-240, QHD) [1], with 20 buttons. Tweak the HID descriptor to support it. Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/989 [1] Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit 748fe4399f9194285a91ec8c09141e49a6b470b4 Author: Hailong.Liu Date: Wed May 22 16:03:28 2024 +0800 HID: Use kvzalloc instead of kzalloc in hid_register_field() The function hid_register_field() might allocate more than 32k, which would use order-4 contiguous memory if the parameter usage exceeds 1024. However, after the system runs for a while, the memory can become heavily fragmented. This increases the likelihood of order-4 page allocation failure. Here’s the relevant log. [71553.093623]kworker/1: 0: page allocation failure: order:4, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [71553.093669]Workqueue: events uhid_device_add_worker [71553.093683]Call trace: [71553.093687]: dump_backtrace+0xf4/0x118 [71553.093696]: show_stack+0x18/0x24 [71553.093702]: dump_stack_lvl+0x60/0x7c [71553.093710]: dump_stack+0x18/0x3c [71553.093717]: warn_alloc+0xf4/0x174 [71553.093725]: __alloc_pages_slowpath+0x1ba0/0x1cac [71553.093732]: __alloc_pages+0x460/0x560 [71553.093738]: __kmalloc_large_node+0xbc/0x1f8 [71553.093746]: __kmalloc+0x144/0x254 [71553.093752]: hid_add_field+0x13c/0x308 [71553.093758]: hid_parser_main+0x250/0x298 [71553.093765]: hid_open_report+0x214/0x30c [71553.093771]: mt_probe+0x130/0x258 [71553.093778]: hid_device_probe+0x11c/0x1e4 [71553.093784]: really_probe+0xe4/0x388 [71553.093791]: __driver_probe_device+0xa0/0x12c [71553.093798]: driver_probe_device+0x44/0x214 [71553.093804]: __device_attach_driver+0xdc/0x124 [71553.093812]: bus_for_each_drv+0x88/0xec [71553.093818]: __device_attach+0x84/0x170 [71553.093824]: device_initial_probe+0x14/0x20 [71553.093831]: bus_probe_device+0x48/0xd0 [71553.093836]: device_add+0x248/0x928 [71553.093844]: hid_add_device+0xf8/0x1a4 [71553.093850]: uhid_device_add_worker+0x24/0x144 [71553.093857]: process_one_work+0x158/0x804 [71553.093865]: worker_thread+0x15c/0x494 [71553.093872]: kthread+0xf4/0x1e4 [71553.093880]: ret_from_fork+0x10/0x20 To fix the allocation failure, use kvzalloc() instead of kzalloc(). Signed-off-by: Hailong.Liu Acked-by: Barry Song Signed-off-by: Jiri Kosina commit 632691ad83197227adc902793a2a3e10c04fe9b8 Author: Erick Archer Date: Sun Jun 2 10:49:22 2024 +0200 auxdisplay: Use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko commit c56a45064e989998a616aadf88023cc9611416b7 Author: Jeff Johnson Date: Sun Jun 2 19:50:15 2024 -0700 auxdisplay: hd44780: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/hd44780_common.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko commit 4adbf7086dfdd6101508fd070cb1c0e0adc9513e Author: Jeff Johnson Date: Sun Jun 2 20:02:01 2024 -0700 auxdisplay: linedisp: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/line-display.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko commit c8ffef985af564c1b4fc09fdb5a5b336bfc0c33c Author: Chris Packham Date: Fri May 31 11:20:54 2024 +1200 auxdisplay: linedisp: Support configuring the boot message Like we do for charlcd, allow the configuration of the initial message on line-display devices. Signed-off-by: Chris Packham Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko commit 11e6e6d8bf8f908468bac0447727e3f3923c8512 Author: Nathan Lynch Date: Mon Jun 3 14:31:32 2024 -0500 powerpc/mm/drmem: Silence drmem_init() early return It's not an error or noteworthy condition if the "ibm,dynamic-reconfiguration-memory" node isn't present. Drop the needless message. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20240603-silence-drmem_init-v1-1-e9d71646bc3d@linux.ibm.com commit 43ac9f5cd457bb01930f87448ddaaae455f8a8cf Author: Haren Myneni Date: Mon Jan 15 21:59:10 2024 -0800 powerpc/pseries/vas: Use usleep_range() to support HCALL delay VAS allocate, modify and deallocate HCALLs returns H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy delay and expects OS to reissue HCALL after that delay. But using msleep() will often sleep at least 20 msecs even though the hypervisor suggests OS reissue these HCALLs after 1 or 10msecs. The open and close VAS window functions hold mutex and then issue these HCALLs. So these operations can take longer than the necessary when multiple threads issue open or close window APIs simultaneously, especially might affect the performance in the case of repeat open/close APIs for each compression request. Multiple tasks can open / close VAS windows at the same time which depends on the available VAS credits. For example, 240 cores system provides 4800 VAS credits. It means 4800 tasks can execute open VAS windows HCALLs with the mutex. Since each msleep() will often sleep more than 20 msecs, some tasks are waiting more than 120 secs to acquire mutex. It can cause hung traces for these tasks in dmesg due to mutex contention around open/close HCALLs. Instead of msleep(), use usleep_range() to ensure sleep with the expected value before issuing HCALL again. So since each task sleep 10 msecs maximum, this patch allow more tasks can issue open/close VAS calls without any hung traces in the dmesg. Signed-off-by: Haren Myneni Suggested-by: Nathan Lynch Reviewed-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20240116055910.421605-1-haren@linux.ibm.com commit 11981816e3614156a1fe14a1e8e77094ea46c7d5 Author: Nilay Shroff Date: Fri May 17 19:55:23 2024 +0530 powerpc/numa: Online a node if PHB is attached. In the current design, a numa-node is made online only if that node is attached to cpu/memory. With this design, if any PCI/IO device is found to be attached to a numa-node which is not online then the numa-node id of the corresponding PCI/IO device is set to NUMA_NO_NODE(-1). This design may negatively impact the performance of PCIe device if the numa-node assigned to PCIe device is -1 because in such case we may not be able to accurately calculate the distance between two nodes. The multi-controller NVMe PCIe disk has an issue with calculating the node distance if the PCIe NVMe controller is attached to a PCI host bridge which has numa-node id value set to NUMA_NO_NODE. This patch helps fix this ensuring that a cpu/memory less numa node is made online if it's attached to PCI host bridge. Signed-off-by: Nilay Shroff Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20240517142531.3273464-3-nilay@linux.ibm.com commit ff5163bb7000a0254ffdd7b50cb6df43add94f33 Author: Gaurav Batra Date: Mon May 13 20:46:08 2024 -0500 powerpc/pseries/iommu: Split Dynamic DMA Window to be used in Hybrid mode Dynamic DMA Window (DDW) supports TCEs that are backed by 2MB page size. In most configurations, DDW is big enough to pre-map all of LPAR memory for IO. Pre-mapping of memory for DMA results in improvements in IO performance. Persistent memory, vPMEM, can be assigned to an LPAR as well. vPMEM is not contiguous with LPAR memory and usually is assigned at high memory addresses. This makes is not possible to pre-map both vPMEM and LPAR memory in the same DDW. For a dedicated adapter this limitation is not an issue. Dedicated adapters can have both Default DMA window, which is backed by 4K page size and a DDW backed by 2MB page size TCEs. In this scenario, LPAR memory is pre-mapped in the DDW. Any DMA going to the vPMEM is routed via dynamically allocated TCEs in the default window. The issue arises with SR-IOV adapters. There is only one DMA window - either Default or DDW. If an LPAR has vPMEM assigned, memory is not pre-mapped in the DDW since TCEs needs to be allocated for vPMEM as well. In this case, DDW is created and TCEs are dynamically allocated for both vPMEM and LPAR memory. Today, DDW is only used in single mode - direct mapped TCEs or dynamically mapped TCEs. This enhancement breaks a single DDW in 2 regions - 1. First region to pre-map LPAR memory 2. Second region to dynamically allocate TCEs for IO to vPMEM The DDW is split only if it is big enough to pre-map complete LPAR memory and still have some space left to dynamically map vPMEM. Maximum size possible DDW is created as permitted by the Hypervisor. Signed-off-by: Gaurav Batra Reviewed-by: Brian King Signed-off-by: Michael Ellerman Link: https://msgid.link/20240514014608.35537-1-gbatra@linux.ibm.com commit 1d8491d3e726984343dd8c3cdbe2f2b47cfdd928 Author: Paolo Pisati Date: Sat Jun 1 17:32:54 2024 +0200 m68k: amiga: Turn off Warp1260 interrupts during boot On an Amiga 1200 equipped with a Warp1260 accelerator, an interrupt storm coming from the accelerator board causes the machine to crash in local_irq_enable() or auto_irq_enable(). Disabling interrupts for the Warp1260 in amiga_parse_bootinfo() fixes the problem. Link: https://lore.kernel.org/r/ZkjwzVwYeQtyAPrL@amaterasu.local Cc: stable Signed-off-by: Paolo Pisati Reviewed-by: Michael Schmitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240601153254.186225-1-p.pisati@gmail.com Signed-off-by: Geert Uytterhoeven commit cd4a34e02b9064c0e2b55ac9b6ee47ae422d5c73 Author: Hans de Goede Date: Sat Jun 1 19:39:37 2024 +0200 media: ov5693: Drop privacy-LED GPIO control Drop privacy-LED GPIO control, after the privacy-LED GPIO control was added to the ov5693 driver it was decided to model privacy-LEDs as LED class devices and have them be controlled by the v4l2-core. So this is dead code since on devices with privacy LEDs the led is not a GPIO on the ov5693 fwnode, but rather is a LED class devices controlled by the v4l2-core. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 64a9e1fb1d6ff67d52d546732e11aea1e43b01e8 Author: Julien Massot Date: Tue Apr 30 15:19:31 2024 +0200 drivers: media: max96717: stop the csi receiver before the source Stopping the CSI source before stopping the serializer CSI port may make the serializer not respond. Then all the next writes to the device will fail. max96717 1-0040: Error writing reg 0x0308: -121 max96717 1-0040: Error writing reg 0x0006: -121 Fix that by stopping the CSI receiver first and then CSI source. Seen on max96717f revision 4. Signed-off-by: Julien Massot Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 37a638e9bf998581655d012a36ee36ed4b4bfc94 Author: Julien Massot Date: Tue Apr 30 15:19:30 2024 +0200 media: i2c: add MAX96714 driver This driver handles the MAX96714 deserializer in tunnel mode. The CSI output will replicate all the CSI traffic forwarded by the remote serializer. The MAX96714 driver can handle MAX96714 and MAX96714F variants with the same "maxim,max96714f" compatible. Signed-off-by: Julien Massot [Sakari Ailus: Adapt to changed i2c_mux_add_adapter arguments.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 50f222455793c2769bdde1152f930f0b1cc05634 Author: Julien Massot Date: Tue Apr 30 15:19:29 2024 +0200 media: i2c: add MAX96717 driver This driver handles the MAX96717 serializer in tunnel mode. All incoming CSI traffic will be tunneled through the GMSL2 link. The MAX96717 driver can handle MAX96717 and MAX96717F variants with the same "maxim,max96717f" compatible. Signed-off-by: Julien Massot [Sakari Ailus: Adapt to changed i2c_mux_add_adapter arguments.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 331a1c0407dd86af83ee0f2fc16e6a6a85f9f885 Author: Julien Massot Date: Tue Apr 30 15:19:28 2024 +0200 dt-bindings: media: add Maxim MAX96714 GMSL2 Deserializer Add DT bindings for Maxim MAX96714 GMSL2 Deserializer. Reviewed-by: Conor Dooley Signed-off-by: Julien Massot Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1bcbc00878083cddc13787a5961aadb8c62a5065 Author: Julien Massot Date: Tue Apr 30 15:19:27 2024 +0200 dt-bindings: media: add Maxim MAX96717 GMSL2 Serializer Add DT bindings for Maxim MAX96717 GMSL2 Serializer. Reviewed-by: Conor Dooley Signed-off-by: Julien Massot Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 91eef099f88e17ad7ac2bc1cb7484796d8595642 Author: Laurent Pinchart Date: Thu May 9 00:40:45 2024 +0300 media: rkisp1: Mark subdev state pointers as const Several subdev state pointers are used to access the state read-only. Mark them as const. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Nicolas Dufresne Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 85af84852f115d3c9d4b45b0500315e630baa82c Author: Laurent Pinchart Date: Thu May 9 00:40:43 2024 +0300 media: v4l2-subdev: Provide const-aware subdev state accessors It would be useful to mark instances of v4l2_subdev_state structures as const when code needs to access them read-only. This isn't currently possible, as the v4l2_subdev_state_get_*() accessor functions take a non-const pointer to the state. Use _Generic() to provide two different versions of the accessors, for const and non-const states respectively. The former returns a const pointer to the requested format, rectangle or interval, implementing const-correctness. The latter returns a non-const pointer, preserving the current behaviour for drivers. Signed-off-by: Laurent Pinchart Reviewed-by: Sakari Ailus Reviewed-by: Tomi Valkeinen [Sakari Ailus: Drop the word "below" from the text.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e73412fdeb541e777b3fd50b665781c1856422b5 Author: Laurent Pinchart Date: Thu May 9 00:40:43 2024 +0300 media: v4l2-subdev: Fix v4l2_subdev_state_get_format() documentation The documentation of the v4l2_subdev_state_get_format() macro incorrectly references __v4l2_subdev_state_get_format() instead of __v4l2_subdev_state_gen_call(). Fix it, and also update the list of similar macros to add the missing v4l2_subdev_state_get_interval(). Suggested-by: Sakari Ailus Signed-off-by: Laurent Pinchart Reviewed-by: Sakari Ailus Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7417b1b1f36cc214dc458e717278a27a912d3b51 Author: Sakari Ailus Date: Tue May 28 14:00:51 2024 +0300 media: v4l2-cci: Always assign *val Always assign *val to 0 in cci_read(). This has the benefit of not requiring initialisation of the variables data is read to using cci_read(). Once smatch is fixed, it could catch the use of uninitialised reads. Signed-off-by: Sakari Ailus Tested-by: Benjamin Mugnier Reviewed-by: Hans de Goede Signed-off-by: Hans Verkuil commit da1d582aa7e349dd46351f2168911d2f0e058e9f Author: Sakari Ailus Date: Thu May 23 13:07:14 2024 +0300 media: ipu6: Print CSR messages using debug level It's entirely normal CSR will return non-indicative values after its reset (0). There's no need to warn the user about that. Suggested-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6062bf32ff3fb89361bba93eda9377ad18d45a25 Author: Dr. David Alan Gilbert Date: Fri May 24 17:48:51 2024 +0100 media: i2c: adv7511: remove unused struct 'i2c_reg_value' 'i2c_reg_value' is unused since the original commit 5a544cce2177 ("[media] adv7511: add new video encoder"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 12e14941c169c5b81e20eecedd43694c313b449e Author: Dr. David Alan Gilbert Date: Fri May 24 17:48:50 2024 +0100 media: i2c: tw9910: remove unused strust 'regval_list' 'regval_list' has been unused since commit 398994c1e104 ("V4L/DVB (13666): tw9910: modify V/H outpit pin setting to use VALID"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1fb40556bd61eb35f71258afabc5bd2bc7fc4f3c Author: Dr. David Alan Gilbert Date: Fri May 24 17:48:49 2024 +0100 media: i2c: ks0127: remove unused struct 'adjust' 'adjust' has been unused since original commit fbe60daac4c3 ("V4L/DVB (3916): AverMedia 6 Eyes AVS6EYES support"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3b11a323b6082542430637140cd75c7d119b9a22 Author: Dr. David Alan Gilbert Date: Fri May 24 17:48:48 2024 +0100 media: i2c: dw9768: remove unused struct 'regval_list' 'regval_list' is unused since the original commit 859891228e56 ("media: i2c: dw9768: Add DW9768 VCM driver") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ccb4eb4496fa94a9131c63ad0c412ebfe7f9ac35 Author: Kieran Bingham Date: Tue Apr 2 15:37:51 2024 +0530 media: i2c: Add imx283 camera sensor driver Add a v4l2 subdevice driver for the Sony IMX283 image sensor. The IMX283 is a 20MP Diagonal 15.86 mm (Type 1) CMOS Image Sensor with Square Pixel for Color Cameras. The following features are supported: - Manual exposure an gain control support - vblank/hblank/link freq control support - Test pattern support control - Arbitrary horizontal and vertical cropping - Supported resolution: - 5472x3648 @ 20fps (SRGGB12) - 5472x3648 @ 25fps (SRGGB10) - 2736x1824 @ 50fps (SRGGB12) Signed-off-by: Kieran Bingham Signed-off-by: Umang Jain [Sakari Ailus: Take upstream runtime PM API changes into account.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f7374d07432d983fcd60fa281897df9a615f7895 Author: Umang Jain Date: Tue Apr 2 15:37:50 2024 +0530 media: dt-bindings: media: Add bindings for IMX283 - Add dt-bindings documentation for Sony IMX283 sensor driver - Add MAINTAINERS entry for Sony IMX283 binding documentation Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Umang Jain Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f8e9662e4da6d4e394a3d9cf0d335863650d712d Author: Tomi Valkeinen Date: Wed Apr 24 18:39:14 2024 +0300 media: subdev: Improve s_stream documentation Now that enable/disable_streams operations are available for single-stream subdevices too, there's no reason to use the old s_stream operation on new drivers. Extend the documentation reflecting this. Signed-off-by: Tomi Valkeinen Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 93c726f41afb8407d43e0bea66d716f6446c9e46 Author: Tomi Valkeinen Date: Wed Apr 24 18:39:13 2024 +0300 media: subdev: Support non-routing subdevs in v4l2_subdev_s_stream_helper() At the moment v4l2_subdev_s_stream_helper() only works for subdevices that support routing. As enable/disable_streams now also works for subdevices without routing, improve v4l2_subdev_s_stream_helper() to do the same. Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b62949ddaa52e7612d3bbd90095079f97946c821 Author: Tomi Valkeinen Date: Wed Apr 24 18:39:12 2024 +0300 media: subdev: Support single-stream case in v4l2_subdev_enable/disable_streams() At the moment the v4l2_subdev_enable/disable_streams() functions call fallback helpers to handle the case where the subdev only implements .s_stream(), and the main function handles the case where the subdev implements streams (V4L2_SUBDEV_FL_STREAMS, which implies .enable/disable_streams()). What is missing is support for subdevs which do not implement streams support, but do implement .enable/disable_streams(). Example cases of these subdevices are single-stream cameras, where using .enable/disable_streams() is not required but helps us remove the users of the legacy .s_stream(), and subdevices with multiple source pads (but single stream per pad), where .enable/disable_streams() allows the subdevice to control the enable/disable state per pad. The two single-streams cases (.s_stream() and .enable/disable_streams()) are very similar, and with small changes we can change the v4l2_subdev_enable/disable_streams() functions to support all three cases, without needing separate fallback functions. A few potentially problematic details, though: - For the single-streams cases we use sd->enabled_pads field, which limits the number of pads for the subdevice to 64. For simplicity I added the check for this limitation to the beginning of the function, and it also applies to the streams case. - The fallback functions only allowed the target pad to be a source pad. It is not very clear to me why this check was needed, but it was not needed in the streams case. However, I doubt the v4l2_subdev_enable/disable_streams() code has ever been tested with sink pads, so to be on the safe side, I added the same check to the v4l2_subdev_enable/disable_streams() functions. Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 86862307606b9f07d36097f7c9f018ad04f36ce0 Author: Tomi Valkeinen Date: Wed Apr 24 18:39:11 2024 +0300 media: subdev: Refactor v4l2_subdev_enable/disable_streams() Add two internal helper functions, v4l2_subdev_collect_streams() and v4l2_subdev_set_streams_enabled(), which allows us to refactor v4l2_subdev_enable/disable_streams() functions. This (I think) makes the code a bit easier to read, and lets us more easily add new functionality in the helper functions in the following patch. Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 585d8fd5ebb9a946dc5c4931e77f6f6cefbdd501 Author: Tomi Valkeinen Date: Wed Apr 24 18:39:10 2024 +0300 media: subdev: Support privacy led in v4l2_subdev_enable/disable_streams() We support camera privacy leds with the .s_stream() operation, in call_s_stream(), but we don't have that support when the subdevice implements .enable/disable_streams() operations. Add the support by enabling the led when the first stream for a subdevice is enabled, and disabling the led then the last stream is disabled. Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5f3ce14fae742d1d23061c3122d93edb879ebf53 Author: Tomi Valkeinen Date: Wed Apr 24 18:39:09 2024 +0300 media: subdev: Add v4l2_subdev_is_streaming() Add a helper function which returns whether the subdevice is streaming, i.e. if .s_stream or .enable_streams has been called successfully. Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 61d6c8c896c1ccde350c281817847a32b0c6b83b Author: Tomi Valkeinen Date: Wed Apr 24 18:39:08 2024 +0300 media: subdev: Improve v4l2_subdev_enable/disable_streams_fallback v4l2_subdev_enable/disable_streams_fallback() supports falling back to .s_stream() for subdevs with a single source pad. It also tracks the enabled streams for that one pad in the sd->enabled_streams field. Tracking the enabled streams with sd->enabled_streams does not make sense, as with .s_stream() there can only be a single stream per pad. Thus, as the v4l2_subdev_enable/disable_streams_fallback() only supports a single source pad, all we really need is a boolean which tells whether streaming has been enabled on this pad or not. However, as we only need a true/false state for a pad (instead of tracking which streams have been enabled for a pad), we can easily extend the fallback mechanism to support multiple source pads as we only need to keep track of which pads have been enabled. Change the sd->enabled_streams field to sd->enabled_pads, which is a 64-bit bitmask tracking the enabled source pads. With this change we can remove the restriction that v4l2_subdev_enable/disable_streams_fallback() only supports a single source pad. Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1d7804281df3f09f0a109d00406e859a00bae7ae Author: Tomi Valkeinen Date: Wed Apr 24 18:39:07 2024 +0300 media: subdev: Fix use of sd->enabled_streams in call_s_stream() call_s_stream() uses sd->enabled_streams to track whether streaming has already been enabled. However, v4l2_subdev_enable/disable_streams_fallback(), which was the original user of this field, already uses it, and v4l2_subdev_enable/disable_streams_fallback() will call call_s_stream(). This leads to a conflict as both functions set the field. Afaics, both functions set the field to the same value, so it won't cause a runtime bug, but it's still wrong and if we, e.g., change how v4l2_subdev_enable/disable_streams_fallback() operates we might easily cause bugs. Fix this by adding a new field, 's_stream_enabled', for call_s_stream(). Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e003fd9c1e3883a96451d24174dc5bad2c248341 Author: Tomi Valkeinen Date: Wed Apr 24 18:39:06 2024 +0300 media: subdev: Add checks for subdev features Add some checks to verify that the subdev driver implements required features. A subdevice that supports streams (V4L2_SUBDEV_FL_STREAMS) must do one of the following: - Implement neither .enable/disable_streams() nor .s_stream(), if the subdev is part of a video driver that uses an internal method to enable the subdev. - Implement only .enable/disable_streams(), if support for legacy sink-side subdevices is not needed. - Implement .enable/disable_streams() and .s_stream(), if support for legacy sink-side subdevices is needed. At the moment the framework doesn't check this requirement. Add the check. Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 68e36241b74683e36533b0089966881d0b7d866b Author: Tomi Valkeinen Date: Wed Apr 24 18:39:05 2024 +0300 media: subdev: Use v4l2_subdev_has_op() in v4l2_subdev_enable/disable_streams() Use v4l2_subdev_has_op() in v4l2_subdev_enable/disable_streams() instead of open coding the same. Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4e628f95e743c8fd37b5daef87b05681d724137e Author: Tomi Valkeinen Date: Wed Apr 24 18:39:04 2024 +0300 media: subdev: Add privacy led helpers Add helper functions to enable and disable the privacy led. This moves the #if from the call site to the privacy led functions, and makes adding privacy led support to v4l2_subdev_enable/disable_streams() cleaner. Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart Tested-by: Umang Jain Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3a5c59ad926b8944f7ef0fd4bda5b90ca325ede5 Author: Sakari Ailus Date: Thu May 30 13:38:07 2024 +0300 media: ipu6: Rework CSI-2 sub-device streaming control CSI-2 sub-device streaming control should use {enable,disable}_streams pad ops and not s_stream video ops as the sub-device supports streams. Fix this by removing driver-implemented stream management and moving sensor streaming control to the CSI-2 sub-device sub-driver. Fixes: a11a5570a09d ("media: intel/ipu6: add IPU6 CSI2 receiver v4l2 sub-device") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ce44dc1feab5f038edb39dc443b32eae3ac1234d Author: Niklas Söderlund Date: Fri May 10 17:56:06 2024 +0200 media: staging: max96712: Store format in subdev active state Create and store the subdevice format in the subdevices active state. This change do not have a huge effect on the driver as it do not yet support changing the format. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7d30b8efae814bc73541720ca188dc205cd7d2b8 Author: Sakari Ailus Date: Mon May 20 10:28:20 2024 +0300 media: async: Warn on attept to create an ancillary link to a non-subdev Warn if a lens or a flash async sub-device is bound to a non-sub-device notifier. This isn't meaningful and unlikely to happen in practice but print a warning as we nevertheless won't consider this an error. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 40431ff5a0fcd3e42a8c9c921f221944fcaba1db Author: Luis Garcia Date: Wed May 1 09:24:42 2024 -0600 media: i2c: imx258: Convert to new CCI register access helpers Use the new comon CCI register access helpers to replace the private register access helpers in the imx258 driver. Signed-off-by: Luis Garcia Reviewed-by: Tommaso Merciai Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit fdf63603cee6c51609d9f2d987c5107106abf7ca Author: Luis Garcia Date: Wed May 1 09:24:41 2024 -0600 media: i2c: imx258: Use v4l2_link_freq_to_bitmap helper Use the v4l2_link_freq_to_bitmap() helper to figure out which driver-supported link freq can be used on a given system. Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Reviewed-by: Tommaso Merciai Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4c05213aeed73ef055430e619bd7b40f6839de0e Author: Dave Stevenson Date: Wed May 1 09:24:37 2024 -0600 media: i2c: imx258: Make HFLIP and VFLIP controls writable The sensor supports H & V flips, but the controls were READ_ONLY. Note that the Bayer order changes with these flips, therefore they set the V4L2_CTRL_FLAG_MODIFY_LAYOUT property. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 799c46e849b1b051fcf33547231aec6888fe5003 Author: Dave Stevenson Date: Wed May 1 09:24:36 2024 -0600 media: i2c: imx258: Change register settings for variants of the sensor Sony have advised that there are variants of the IMX258 sensor which require slightly different register configuration to the mainline imx258 driver defaults. There is no available run-time detection for the variant, so add configuration via the DT compatible string. The Vision Components imx258 module supports PDAF, so add the register differences for that variant Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8bae5ecb11970fc3ff4d7017b557f548e4e4f784 Author: Dave Stevenson Date: Wed May 1 09:24:35 2024 -0600 dt-bindings: media: imx258: Add alternate compatible strings There are a number of variants of the imx258 modules that can not be differentiated at runtime, so add compatible strings for the PDAF variant. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Acked-by: Conor Dooley Reviewed-by: Pavel Machek Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3ec02d3a2a9b46b91122a74ff49daa4694ee3471 Author: Dave Stevenson Date: Wed May 1 09:24:34 2024 -0600 dt-bindings: media: imx258: Rename to include vendor prefix imx258.yaml doesn't include the vendor prefix of sony, so rename to add it. Update the id entry and MAINTAINERS to match. Signed-off-by: Dave Stevenson Acked-by: Conor Dooley Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 01e0e4c34d08e340806826bf847b114b839d572f Author: Dave Stevenson Date: Wed May 1 09:24:33 2024 -0600 media: i2c: imx258: Support faster pixel rate on binned modes With the binned modes, there is little point in faithfully reproducing the horizontal line length of 5352 pixels on the CSI2 bus, and the FIFO between the pixel array and MIPI serialiser allows us to remove that dependency. Allow the pixel array to run with the normal settings, with the MIPI serialiser at half the rate. This requires some additional information for the link frequency to pixel rate function that needs to be added to the configuration tables. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b2482f8f722a25bba531ff444438f4149e22974e Author: Dave Stevenson Date: Wed May 1 09:24:32 2024 -0600 media: i2c: imx258: Set pixel_rate range to the same as the value With a read only control there is limited point in advertising a minimum and maximum for the control, so change to set the value, min, and max all to the selected pixel rate. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 185025977c3e7ba37d26af24c3648f3b52f62580 Author: Dave Stevenson Date: Wed May 1 09:24:31 2024 -0600 media: i2c: imx258: Issue reset before starting streaming Whilst not documented, register 0x0103 bit 0 is the soft reset for the sensor, so send it before trying to configure the sensor. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c546429a60c8802723f36171e13cb53ca14ebae0 Author: Dave Stevenson Date: Wed May 1 09:24:30 2024 -0600 media: i2c: imx258: Correct max FRM_LENGTH_LINES value The data sheet states that the maximum value for registers 0x0340/0x0341 FRM_LENGTH_LINES is 65525(decimal), not the 0xFFFF defined in this driver. Correct this limit. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a7db195d67354899efb66f44df39cec66f69fc9c Author: Dave Stevenson Date: Wed May 1 09:24:29 2024 -0600 media: i2c: imx258: Allow configuration of clock lane behaviour The sensor supports the clock lane either remaining in HS mode during frame blanking, or dropping to LP11. Add configuration of the mode via V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 29e7d3fbc8b946a9c80579e5d16dc89012c80556 Author: Dave Stevenson Date: Wed May 1 09:24:28 2024 -0600 media: i2c: imx258: Add get_selection for pixel array information Libcamera requires the cropping information for each mode, so add this information to the driver. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8eaf1994a40fdbd9e65c9b9f1e075fb47da6bc89 Author: Dave Stevenson Date: Wed May 1 09:24:27 2024 -0600 media: i2c: imx258: Follow normal V4L2 behaviours for clipping exposure V4L2 sensor drivers are expected to clip the supported exposure range based on the VBLANK configured. IMX258 wasn't doing that as register 0x350 (FRM_LENGTH_CTL) switches it to a mode where frame length tracks coarse exposure time. Disable this mode and clip the range for V4L2_CID_EXPOSURE appropriately based on V4L2_CID_VBLANK. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c699953f61d42b121d755872048178a0b074efae Author: Dave Stevenson Date: Wed May 1 09:24:26 2024 -0600 media: i2c: imx258: Add support for running on 2 CSI data lanes Extends the driver to also support 2 data lanes. Frame rates are obviously more restricted on 2 lanes, but some hardware simply hasn't wired more up. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d708d58b577c4cb2436e05f955fe2966aa33e851 Author: Dave Stevenson Date: Wed May 1 09:24:25 2024 -0600 media: i2c: imx258: Add support for 24MHz clock There's no reason why only a clock of 19.2MHz is supported. Indeed this isn't even a frequency listed in the datasheet. Add support for 24MHz as well. The PLL settings result in slightly different link frequencies, so parameterise those. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 186f4056ac66995f09eda63a221d1acd89bbb9e4 Author: Dave Stevenson Date: Wed May 1 09:24:24 2024 -0600 media: i2c: imx258: Split out common registers from the mode based ones Out of all the registers that are defined for each mode, only around 10 differ between the modes. Split the table into common and mode specific ones. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 67b5a3606d050413656bfbb12578c7b9cee0d411 Author: Dave Stevenson Date: Wed May 1 09:24:23 2024 -0600 media: i2c: imx258: Make V4L2_CID_VBLANK configurable. The values and ranges of V4L2_CID_VBLANK are all computed, so there is no reason for it to be a read only control. Remove the register values from the mode lists, add the handler, and remove the read only flag. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 850b8acde0b50d9bb894d26ed8cae0f85b89511b Author: Dave Stevenson Date: Wed May 1 09:24:22 2024 -0600 media: i2c: imx258: Add regulator control The device tree bindings define the relevant regulators for the sensor, so update the driver to request the regulators and control them at the appropriate times. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 04392d73ae360a4fc502243c1b408464963d5d98 Author: Dave Stevenson Date: Wed May 1 09:24:21 2024 -0600 media: i2c: imx258: Remove redundant I2C writes. Registers 0x0202 and 0x0203 are written via the control handler for V4L2_CID_EXPOSURE, so are not needed from the mode lists. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit dc081787a8c30c28676f7aa5aaed650e6f480c59 Author: Dave Stevenson Date: Wed May 1 09:24:20 2024 -0600 media: i2c: imx258: Disable digital cropping on binned modes The binned modes set DIG_CROP_X_OFFSET and DIG_CROP_IMAGE_WIDTH to less than the full image, even though the image being captured is meant to be a scaled version of the full array size. Reduce X_OFFSET to 0, and increase IMAGE_WIDTH to the full array. Signed-off-by: Dave Stevenson Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5b9ee0401600d908ed7dd6582815a80957287683 Author: Dave Stevenson Date: Wed May 1 09:24:19 2024 -0600 media: i2c: imx258: Make image geometry meet sensor requirements The output image is defined as being 4208x3118 pixels in size. Y_ADD_STA register was set to 0, and Y_ADD_END to 3118, giving 3119 lines total. The datasheet lists a requirement for Y_ADD_STA to be a multiple of a power of 2 depending on binning/scaling mode (2 for full pixel, 4 for x2-bin/scale, 8 for (x2-bin)+(x2-subsample) or x4-bin, or 16 for (x4-bin)+(x2-subsample)). (Y_ADD_END – Y_ADD_STA + 1) also has to be a similar power of 2. The current configuration for the full res modes breaks that second requirement, and we can't increase Y_ADD_STA to 1 to retain exactly the same field of view as that then breaks the first requirement. For the binned modes, they are worse off as 3118 is not a multiple of 4. Increase the main mode to 4208x3120 so that it is the same FOV as the binned modes, with Y_ADD_STA at 0. Fix Y_ADD_STA and Y_ADD_END for the binned modes so that they meet the sensor requirements. This does change the Bayer order as the default configuration is for H&V flips to be enabled, so readout is from Y_STA_END to Y_ADD_STA, and this patch has changed Y_STA_END. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e2adf52ee59101c6d2415511a72c836ecdada671 Author: Dave Stevenson Date: Wed May 1 09:24:18 2024 -0600 media: i2c: imx258: Remove unused defines The IMX258_FLL_* defines are unused. Remove them. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9b4667ea67854f0b116fe22ad11ef5628c5b5b5f Author: ChiYuan Huang Date: Wed May 8 10:51:49 2024 +0800 media: v4l: async: Fix NULL pointer dereference in adding ancillary links In v4l2_async_create_ancillary_links(), ancillary links are created for lens and flash sub-devices. These are sub-device to sub-device links and if the async notifier is related to a V4L2 device, the source sub-device of the ancillary link is NULL, leading to a NULL pointer dereference. Check the notifier's sd field is non-NULL in v4l2_async_create_ancillary_links(). Fixes: aa4faf6eb271 ("media: v4l2-async: Create links during v4l2_async_match_notify()") Signed-off-by: ChiYuan Huang [Sakari Ailus: Reword the subject and commit messages slightly.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 984abe0b5794a2aca359bb61555351d2ec520d2a Author: Ricardo Ribalda Date: Thu May 9 17:05:55 2024 +0000 media: i2c: hi846: Fix V4L2_SUBDEV_FORMAT_TRY get_selection() The current code does not return anything to the user. Although the code looks a bit dangerous (using a pointer without checking if it is valid), it should be fine. The core validates that sel->pad has a valid value. Fix the following smatch error: drivers/media/i2c/hi846.c:1854 hi846_get_selection() warn: statement has no effect 31 Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera") Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart [Sakari Ailus: code -> core.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a1956bf53a2774014ee1768b484af2c38c633a25 Author: Bryan O'Donoghue Date: Thu May 9 13:53:07 2024 +0100 media: i2c: Fix imx412 exposure control Currently we have the following algorithm to calculate what value should be written to the exposure control of imx412. lpfr = imx412->vblank + imx412->cur_mode->height; shutter = lpfr - exposure; The 'shutter' value is given to IMX412_REG_EXPOSURE_CIT however, the above algorithm will result in the value given to IMX412_REG_EXPOSURE_CIT decreasing as the requested exposure value from user-space goes up. e.g. [ 2255.713989] imx412 20-001a: Received exp 1608, analog gain 0 [ 2255.714002] imx412 20-001a: Set exp 1608, analog gain 0, shutter 1938, lpfr 3546 [ 2256.302770] imx412 20-001a: Received exp 2586, analog gain 100 [ 2256.302800] imx412 20-001a: Set exp 2586, analog gain 100, shutter 960, lpfr 3546 [ 2256.753755] imx412 20-001a: Received exp 3524, analog gain 110 [ 2256.753772] imx412 20-001a: Set exp 3524, analog gain 110, shutter 22, lpfr 3546 This behaviour results in the image having less exposure as the requested exposure value from user-space increases. Other sensor drivers such as ov5675, imx218, hid556 and others take the requested exposure value and use the value directly. Take the example of the above cited sensor drivers and directly apply the requested exposure value from user-space. The 'lpfr' variable still functions as before but the 'shutter' variable can be dispensed with as a result. Once done a similar run of the test application requesting higher exposure looks like this, with 'exp' written directly to the sensor. [ 133.207884] imx412 20-001a: Received exp 1608, analog gain 0 [ 133.207899] imx412 20-001a: Set exp 1608, analog gain 0, lpfr 3546 [ 133.905309] imx412 20-001a: Received exp 2844, analog gain 100 [ 133.905344] imx412 20-001a: Set exp 2844, analog gain 100, lpfr 3546 [ 134.241705] imx412 20-001a: Received exp 3524, analog gain 110 [ 134.241775] imx412 20-001a: Set exp 3524, analog gain 110, lpfr 3546 The result is then setting the sensor exposure to lower values results in darker, less exposure images and vice versa with higher exposure values. Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver") Tested-by: Bryan O'Donoghue # qrb5165-rb5/imx577 Reviewed-by: Jacopo Mondi Reviewed-by: Gjorgji Rosikopulos Signed-off-by: Bryan O'Donoghue Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d0edc54455398248154062664f7d1b35e6ec6e01 Author: Bingbu Cao Date: Fri May 10 14:27:47 2024 +0800 media: ipu-bridge: add mod_devicetable.h header inclusion ACPI_ID_LEN is defined in mod_devicetable.h, so the header should be guaranteed to included in ipu-bridge.h instead of the source files which include ipu-bridge.h. Signed-off-by: Bingbu Cao Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f7abc0cfa8be0aa872842569583a69e6bdec0e76 Author: Dr. David Alan Gilbert Date: Sun Jun 2 01:05:05 2024 +0100 perf genelf: remove unused struct 'options' 'options' has been unused since commit fa7f7e735495 ("perf jit: Move test functionality in to a test"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240602000505.213032-1-linux@treblig.org commit f7d4485fcedcb4978148bad5fcde570f63790323 Author: Nick Forrington Date: Mon May 13 09:14:12 2024 +0000 perf lock info: Display both map and thread by default Change "perf lock info" argument handling to: Display both map and thread info (rather than an error) when neither are specified. Display both map and thread info (rather than just thread info) when both are requested. Signed-off-by: Nick Forrington Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240513091413.738537-2-nick.forrington@arm.com commit 49df0019f36798d414e6b913bec30a3a0cd47c70 Merge: 49784c7979321 43d50ffb1f7e3 Author: Alexei Starovoitov Date: Mon Jun 3 20:52:43 2024 -0700 Merge branch 'enable-bpf-programs-to-declare-arrays-of-kptr-bpf_rb_root-and-bpf_list_head' Kui-Feng Lee says: ==================== Enable BPF programs to declare arrays of kptr, bpf_rb_root, and bpf_list_head. Some types, such as type kptr, bpf_rb_root, and bpf_list_head, are treated in a special way. Previously, these types could not be the type of a field in a struct type that is used as the type of a global variable. They could not be the type of a field in a struct type that is used as the type of a field in the value type of a map either. They could not even be the type of array elements. This means that they can only be the type of global variables or of direct fields in the value type of a map. The patch set aims to enable the use of these specific types in arrays and struct fields, providing flexibility. It examines the types of global variables or the value types of maps, such as arrays and struct types, recursively to identify these special types and generate field information for them. For example, ... struct task_struct __kptr *ptr[3]; ... it will create 3 instances of "struct btf_field" in the "btf_record" of the data section. [..., btf_field(offset=0x100, type=BPF_KPTR_REF), btf_field(offset=0x108, type=BPF_KPTR_REF), btf_field(offset=0x110, type=BPF_KPTR_REF), ... ] It creates a record of each of three elements. These three records are almost identical except their offsets. Another example is ... struct A { ... struct task_struct __kptr *task; struct bpf_rb_root root; ... } struct A foo[2]; it will create 4 records. [..., btf_field(offset=0x7100, type=BPF_KPTR_REF), btf_field(offset=0x7108, type=BPF_RB_ROOT:), btf_field(offset=0x7200, type=BPF_KPTR_REF), btf_field(offset=0x7208, type=BPF_RB_ROOT:), ... ] Assuming that the size of an element/struct A is 0x100 and "foo" starts at 0x7000, it includes two kptr records at 0x7100 and 0x7200, and two rbtree root records at 0x7108 and 0x7208. All these field information will be flatten, for struct types, and repeated, for arrays. --- Changes from v6: - Return BPF_KPTR_REF from btf_get_field_type() only if var_type is a struct type. - Pass btf and type to btf_get_field_type(). Changes from v5: - Ensure field->offset values of kptrs are advanced correctly from one nested struct/or array to another. Changes from v4: - Return -E2BIG for i == MAX_RESOLVE_DEPTH. Changes from v3: - Refactor the common code of btf_find_struct_field() and btf_find_datasec_var(). - Limit the number of levels looking into a struct types. Changes from v2: - Support fields in nested struct type. - Remove nelems and duplicate field information with offset adjustments for arrays. Changes from v1: - Move the check of element alignment out of btf_field_cmp() to btf_record_find(). - Change the order of the previous patch 4 "bpf: check_map_kptr_access() compute the offset from the reg state" as the patch 7 now. - Reject BPF_RB_NODE and BPF_LIST_NODE with nelems > 1. - Rephrase the commit log of the patch "bpf: check_map_access() with the knowledge of arrays" to clarify the alignment on elements. v6: https://lore.kernel.org/all/20240520204018.884515-1-thinker.li@gmail.com/ v5: https://lore.kernel.org/all/20240510011312.1488046-1-thinker.li@gmail.com/ v4: https://lore.kernel.org/all/20240508063218.2806447-1-thinker.li@gmail.com/ v3: https://lore.kernel.org/all/20240501204729.484085-1-thinker.li@gmail.com/ v2: https://lore.kernel.org/all/20240412210814.603377-1-thinker.li@gmail.com/ v1: https://lore.kernel.org/bpf/20240410004150.2917641-1-thinker.li@gmail.com/ Kui-Feng Lee (9): bpf: Remove unnecessary checks on the offset of btf_field. bpf: Remove unnecessary call to btf_field_type_size(). bpf: refactor btf_find_struct_field() and btf_find_datasec_var(). bpf: create repeated fields for arrays. bpf: look into the types of the fields of a struct type recursively. bpf: limit the number of levels of a nested struct type. selftests/bpf: Test kptr arrays and kptrs in nested struct fields. selftests/bpf: Test global bpf_rb_root arrays and fields in nested struct types. selftests/bpf: Test global bpf_list_head arrays. kernel/bpf/btf.c | 310 ++++++++++++------ kernel/bpf/verifier.c | 4 +- .../selftests/bpf/prog_tests/cpumask.c | 5 + .../selftests/bpf/prog_tests/linked_list.c | 12 + .../testing/selftests/bpf/prog_tests/rbtree.c | 47 +++ .../selftests/bpf/progs/cpumask_success.c | 171 ++++++++++ .../testing/selftests/bpf/progs/linked_list.c | 42 +++ tools/testing/selftests/bpf/progs/rbtree.c | 77 +++++ 8 files changed, 558 insertions(+), 110 deletions(-) ==================== Link: https://lore.kernel.org/r/20240523174202.461236-1-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit 43d50ffb1f7e32865cdd343224659614d8b558b9 Author: Kui-Feng Lee Date: Thu May 23 10:42:02 2024 -0700 selftests/bpf: Test global bpf_list_head arrays. Make sure global arrays of bpf_list_heads and fields of bpf_list_heads in nested struct types work correctly. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-10-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit d55c765a9b2d54b53ef86a62d6209e2e5eb62585 Author: Kui-Feng Lee Date: Thu May 23 10:42:01 2024 -0700 selftests/bpf: Test global bpf_rb_root arrays and fields in nested struct types. Make sure global arrays of bpf_rb_root and fields of bpf_rb_root in nested struct types work correctly. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-9-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit c4c6c3b785a0b1426add15d078da61f899abeaac Author: Kui-Feng Lee Date: Thu May 23 10:42:00 2024 -0700 selftests/bpf: Test kptr arrays and kptrs in nested struct fields. Make sure that BPF programs can declare global kptr arrays and kptr fields in struct types that is the type of a global variable or the type of a nested descendant field in a global variable. An array with only one element is special case, that it treats the element like a non-array kptr field. Nested arrays are also tested to ensure they are handled properly. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-8-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit f19caf57d80f4432acea61d858d45ce194444389 Author: Kui-Feng Lee Date: Thu May 23 10:41:59 2024 -0700 bpf: limit the number of levels of a nested struct type. Limit the number of levels looking into struct types to avoid running out of stack space. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-7-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit 64e8ee814819f21beeeda00d4119221443d77992 Author: Kui-Feng Lee Date: Thu May 23 10:41:58 2024 -0700 bpf: look into the types of the fields of a struct type recursively. The verifier has field information for specific special types, such as kptr, rbtree root, and list head. These types are handled differently. However, we did not previously examine the types of fields of a struct type variable. Field information records were not generated for the kptrs, rbtree roots, and linked_list heads that are not located at the outermost struct type of a variable. For example, struct A { struct task_struct __kptr * task; }; struct B { struct A mem_a; } struct B var_b; It did not examine "struct A" so as not to generate field information for the kptr in "struct A" for "var_b". This patch enables BPF programs to define fields of these special types in a struct type other than the direct type of a variable or in a struct type that is the type of a field in the value type of a map. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-6-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit 994796c0256c4001633488fd24c3d54691949f8d Author: Kui-Feng Lee Date: Thu May 23 10:41:57 2024 -0700 bpf: create repeated fields for arrays. The verifier uses field information for certain special types, such as kptr, rbtree root, and list head. These types are treated differently. However, we did not previously support these types in arrays. This update examines arrays and duplicates field information the same number of times as the length of the array if the element type is one of the special types. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-5-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit a7db0d4f872a869feb7c0201c0fa736c309192d5 Author: Kui-Feng Lee Date: Thu May 23 10:41:56 2024 -0700 bpf: refactor btf_find_struct_field() and btf_find_datasec_var(). Move common code of the two functions to btf_find_field_one(). Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-4-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit 482f7133791e894b94a57ab3251e03d4c98ea42b Author: Kui-Feng Lee Date: Thu May 23 10:41:55 2024 -0700 bpf: Remove unnecessary call to btf_field_type_size(). field->size has been initialized by bpf_parse_fields() with the value returned by btf_field_type_size(). Use it instead of calling btf_field_type_size() again. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-3-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit c95a3be45ad22ee8925d6d1ab531d5ba98216311 Author: Kui-Feng Lee Date: Thu May 23 10:41:54 2024 -0700 bpf: Remove unnecessary checks on the offset of btf_field. reg_find_field_offset() always return a btf_field with a matching offset value. Checking the offset of the returned btf_field is unnecessary. Acked-by: Eduard Zingerman Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240523174202.461236-2-thinker.li@gmail.com Signed-off-by: Alexei Starovoitov commit 5124d9acf3af50bcc6d0958db4fecb3c2f13f8ed Author: Radu Sabau Date: Fri May 31 11:46:44 2024 +0300 hwmon: (max31827) Add PEC support Add PEC support using the hwmon core infrastructure. Signed-off-by: Radu Sabau Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240531084645.12935-2-radu.sabau@analog.com [groeck: Adjusted subject; simplified description] Signed-off-by: Guenter Roeck commit fcbb583f33af99e260aca2b5893b21ccf1021285 Author: Guenter Roeck Date: Tue May 28 13:42:42 2024 -0700 hwmon: (lm90) Convert to use PEC support from hwmon core Replace driver specific PEC handling code with hardware monitoring core functionality. Cc: Radu Sabau Acked-by: Nuno Sa Signed-off-by: Guenter Roeck commit 4ce6e8a859f0503d97aac6869bc3b1a24b15601d Author: Guenter Roeck Date: Tue May 28 13:33:29 2024 -0700 hwmon: Add PEC attribute support to hardware monitoring core Several hardware monitoring chips optionally support Packet Error Checking (PEC). For some chips, PEC support can be enabled simply by setting I2C_CLIENT_PEC in the i2c client data structure. Others require chip specific code to enable or disable PEC support. Introduce hwmon_chip_pec and HWMON_C_PEC to simplify adding configurable PEC support for hardware monitoring drivers. A driver can set HWMON_C_PEC in its chip information data to indicate PEC support. If a chip requires chip specific code to enable or disable PEC support, the driver only needs to implement support for the hwmon_chip_pec attribute to its write function. Packet Error Checking is only supported for SMBus devices. HWMON_C_PEC must therefore only be set by a driver if the parent device is an I2C device. Attempts to set HWMON_C_PEC on any other device type is not supported and rejected. The code calls i2c_check_functionality() to check if PEC is supported by the I2C/SMBus controller. This function is only available if CONFIG_I2C is enabled and reachable. For this reason, the added code needs to depend on reachability of CONFIG_I2C. Cc: Radu Sabau Acked-by: Nuno Sa Signed-off-by: Guenter Roeck commit 8c1d92a740c002f36a919a55689d0ef83b61fd1c Author: Douglas Anderson Date: Thu May 30 16:43:09 2024 -0700 r8152: Wake up the system if the we need a reset If we get to the end of the r8152's suspend() routine and we find that the USB device is INACCESSIBLE then it means that some of our preparation for suspend didn't take place. We need a USB reset to get ourselves back in a consistent state so we can try again and that can't happen during system suspend. Call pm_wakeup_event() to wake the system up in this case. Signed-off-by: Douglas Anderson Acked-by: Hayes Wang Link: https://lore.kernel.org/r/66590f25.170a0220.8b5ad.1752@mx.google.com Signed-off-by: Jakub Kicinski commit 4933b066fefbee4f1d2d708de53c4ab7f09026ad Author: Douglas Anderson Date: Thu May 30 16:43:08 2024 -0700 r8152: If inaccessible at resume time, issue a reset If we happened to get a USB transfer error during the transition to suspend then the usb_queue_reset_device() that r8152_control_msg() calls will get dropped on the floor. This is because usb_lock_device_for_reset() (which usb_queue_reset_device() uses) silently fails if it's called when a device is suspended or if too much time passes. Let's resolve this by resetting the device ourselves in r8152's resume() function. NOTE: due to timing, it's _possible_ that we could end up with two USB resets: the one queued previously and the one called from the resume() patch. This didn't happen in test cases I ran, though it's conceivably possible. We can't easily know if this happened since usb_queue_reset_device() can just silently drop the reset request. In any case, it's not expected that this is a problem since the two resets can't run at the same time (because of the device lock) and it should be OK to reset the device twice. If somehow the double-reset causes problems we could prevent resets from being queued up while suspend is running. Signed-off-by: Douglas Anderson Acked-by: Hayes Wang Link: https://lore.kernel.org/r/66590f22.170a0220.8b5ad.1750@mx.google.com Signed-off-by: Jakub Kicinski commit 43b39cafbaf66cbbdace321c01701154a1c05fdc Author: Zqiang Date: Sun Apr 7 19:27:14 2024 +0800 rcutorture: Make rcutorture support srcu double call test This commit allows rcutorture to test double-call_srcu() when the CONFIG_DEBUG_OBJECTS_RCU_HEAD Kconfig option is enabled. The non-raw sdp structure's ->spinlock will be acquired in call_srcu(), hence this commit also removes the current IRQ and preemption disabling so as to avoid lockdep complaints. Link: https://lore.kernel.org/all/20240407112714.24460-1-qiang.zhang1211@gmail.com/ Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 9855c37edf0009cc276cecfee09f7e76e2380212 Author: Frederic Weisbecker Date: Thu Apr 25 16:24:04 2024 +0200 Revert "rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()" This reverts commit 28319d6dc5e2ffefa452c2377dd0f71621b5bff0. The race it fixed was subject to conditions that don't exist anymore since: 1612160b9127 ("rcu-tasks: Eliminate deadlocks involving do_exit() and RCU tasks") This latter commit removes the use of SRCU that used to cover the RCU-tasks blind spot on exit between the tasklist's removal and the final preemption disabling. The task is now placed instead into a temporary list inside which voluntary sleeps are accounted as RCU-tasks quiescent states. This would disarm the deadlock initially reported against PID namespace exit. Signed-off-by: Frederic Weisbecker Reviewed-by: Oleg Nesterov Signed-off-by: Paul E. McKenney commit e4f78057291608f6968a6789c5ebb3bde7d95504 Author: Frederic Weisbecker Date: Thu Apr 25 16:18:35 2024 +0200 rcu/nocb: Remove buggy bypass lock contention mitigation The bypass lock contention mitigation assumes there can be at most 2 contenders on the bypass lock, following this scheme: 1) One kthread takes the bypass lock 2) Another one spins on it and increment the contended counter 3) A third one (a bypass enqueuer) sees the contended counter on and busy loops waiting on it to decrement. However this assumption is wrong. There can be only one CPU to find the lock contended because call_rcu() (the bypass enqueuer) is the only bypass lock acquire site that may not already hold the NOCB lock beforehand, all the other sites must first contend on the NOCB lock. Therefore step 2) is impossible. The other problem is that the mitigation assumes that contenders all belong to the same rdp CPU, which is also impossible for a raw spinlock. In theory the warning could trigger if the enqueuer holds the bypass lock and another CPU flushes the bypass queue concurrently but this is prevented from all flush users: 1) NOCB kthreads only flush if they successfully _tried_ to lock the bypass lock. So no contention management here. 2) Flush on callbacks migration happen remotely when the CPU is offline. No concurrency against bypass enqueue. 3) Flush on deoffloading happen either locally with IRQs disabled or remotely when the CPU is not yet online. No concurrency against bypass enqueue. 4) Flush on barrier entrain happen either locally with IRQs disabled or remotely when the CPU is offline. No concurrency against bypass enqueue. For those reasons, the bypass lock contention mitigation isn't needed and is even wrong. Remove it but keep the warning reporting a contended bypass lock on a remote CPU, to keep unexpected contention awareness. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 483d5bf23125a9127ffcb3f7a3b3539b34df67d4 Author: Frederic Weisbecker Date: Thu Apr 25 16:18:34 2024 +0200 rcu/nocb: Use kthread parking instead of ad-hoc implementation Upon NOCB deoffloading, the rcuo kthread must be forced to sleep until the corresponding rdp is ever offloaded again. The deoffloader clears the SEGCBLIST_OFFLOADED flag, wakes up the rcuo kthread which then notices that change and clears in turn its SEGCBLIST_KTHREAD_CB flag before going to sleep, until it ever sees the SEGCBLIST_OFFLOADED flag again, should a re-offloading happen. Upon NOCB offloading, the rcuo kthread must be forced to wake up and handle callbacks until the corresponding rdp is ever deoffloaded again. The offloader sets the SEGCBLIST_OFFLOADED flag, wakes up the rcuo kthread which then notices that change and sets in turn its SEGCBLIST_KTHREAD_CB flag before going to check callbacks, until it ever sees the SEGCBLIST_OFFLOADED flag cleared again, should a de-offloading happen again. This is all a crude ad-hoc and error-prone kthread (un-)parking re-implementation. Consolidate the behaviour with the appropriate API instead. [ paulmck: Apply Qiang Zhang feedback provided in Link: below. ] Link: https://lore.kernel.org/all/20240509074046.15629-1-qiang.zhang1211@gmail.com/ Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit aa97b9a56906f5965a7c5752790d174cadc8b820 Author: Frederic Weisbecker Date: Thu Apr 25 16:18:33 2024 +0200 rcu/nocb: Fix segcblist state machine stale comments about timers The (de-)offloading process used to take care about the NOCB timer when it depended on the per-rdp NOCB locking. However this isn't the case anymore for a long while. It can now safely be armed and run during the (de-)offloading process, which doesn't care about it anymore. Update the comments accordingly. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit ce418966a83320837f59f04a646fa4716e132dc8 Author: Frederic Weisbecker Date: Thu Apr 25 16:18:32 2024 +0200 rcu/nocb: Fix segcblist state machine comments about bypass The parts explaining the bypass lifecycle in (de-)offloading are out of date and/or wrong. Bypass is simply enabled whenever SEGCBLIST_RCU_CORE flag is off. Fix the comments accordingly. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 32d99593bdc91442fe6183d97b060210cc9c8193 Author: Paul E. McKenney Date: Sat Mar 16 00:10:15 2024 -0700 rcu: Add lockdep_assert_in_rcu_read_lock() and friends There is no direct RCU counterpart to lockdep_assert_irqs_disabled() and friends. Although it is possible to construct them, it would be more convenient to have the following lockdep assertions: lockdep_assert_in_rcu_read_lock() lockdep_assert_in_rcu_read_lock_bh() lockdep_assert_in_rcu_read_lock_sched() lockdep_assert_in_rcu_reader() This commit therefore creates them. Reported-by: Jens Axboe Signed-off-by: Paul E. McKenney commit 45b2fb09384c645489f7b359c49ca879852e5cec Author: Rob Herring (Arm) Date: Mon May 20 17:26:45 2024 -0500 dt-bindings: clock: milbeaut: Drop providers and consumers from example Convention for examples is to only show what's covered by the binding, so drop the consumer "socionext,milbeaut-usio-uart" and input clock provider "fixed-clock" from the example. "socionext,milbeaut-usio-uart" is also not documented by a schema which caused a warning. Signed-off-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240520222646.1741958-1-robh@kernel.org Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit f5100c415c86eec86361d136dc4f3bcae998d116 Author: AngeloGioacchino Del Regno Date: Tue May 28 14:13:13 2024 +0200 clk: mediatek: Add a module description where missing Add a MODULE_DESCRIPTION() on all drivers that miss it to avoid modpost warnings. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240528121320.160685-1-angelogioacchino.delregno@collabora.com Tested-by: Jeff Johnson Reviewed-by: Alexandre Mergnat Signed-off-by: Stephen Boyd commit 99a49093ce92d6116a1635802f9c16d0db6e805a Author: Li RongQing Date: Mon May 20 20:08:58 2024 +0800 KVM: SVM: Consider NUMA affinity when allocating per-CPU save_area save_area of per-CPU svm_data are dominantly accessed from their own local CPUs, so allocate them node-local for performance reason so rename __snp_safe_alloc_page as snp_safe_alloc_page_node which accepts numa node id as input parameter, svm_cpu_init call it with node id switched from cpu id Signed-off-by: Li RongQing Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20240520120858.13117-4-lirongqing@baidu.com Signed-off-by: Sean Christopherson commit 9f44286d77ac72a15692c56d0fcbf7d2534e1f1e Author: Li RongQing Date: Mon May 20 20:08:57 2024 +0800 KVM: SVM: not account memory allocation for per-CPU svm_data The allocation for the per-CPU save area in svm_cpu_init shouldn't be accounted, So introduce __snp_safe_alloc_page helper, which has gfp flag as input, svm_cpu_init calls __snp_safe_alloc_page with GFP_KERNEL, snp_safe_alloc_page calls __snp_safe_alloc_page with GFP_KERNEL_ACCOUNT as input Suggested-by: Sean Christopherson Signed-off-by: Li RongQing Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20240520120858.13117-3-lirongqing@baidu.com Signed-off-by: Sean Christopherson commit f51af34686885059968b87494b11825b57803331 Author: Li RongQing Date: Mon May 20 20:08:56 2024 +0800 KVM: SVM: remove useless input parameter in snp_safe_alloc_page The input parameter 'vcpu' in snp_safe_alloc_page is not used. Therefore, remove it. Suggested-by: Sean Christopherson Signed-off-by: Li RongQing Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20240520120858.13117-2-lirongqing@baidu.com Signed-off-by: Sean Christopherson commit 06abd441c0c100aa0b52ce403862e5ae958bf94b Author: Jeff Johnson Date: Sun Jun 2 08:38:33 2024 -0700 clk: test: add missing MODULE_DESCRIPTION() macros make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/clk_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/clk-gate_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/clk-fractional-divider_test.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-clk-test-v1-1-a6afd4793337@quicinc.com [sboyd@kernel.org: Reword header and description] Signed-off-by: Stephen Boyd commit 578ba5d37de7e7b6fa160280ff1d14266b23537e Author: Jeff Johnson Date: Sun Jun 2 08:26:47 2024 -0700 clk: sprd: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sprd/clk-sprd.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240602-md-clk-sprd-v1-1-de0884ea6fc7@quicinc.com Signed-off-by: Stephen Boyd commit 6aaa95d2a58e5513912c05f249e8c0ec50753378 Author: Jeff Johnson Date: Sat Jun 1 21:44:22 2024 -0700 clk: sophgo: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/sophgo/clk-sophgo-cv1800.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240601-md-drivers-clk-sophgo-clk-sophgo-cv1800-v1-1-8e00d8c3a87b@quicinc.com Signed-off-by: Stephen Boyd commit 61df7b82820494368bd46071ca97e43a3dfc3b11 Author: Paul Moore Date: Thu May 2 17:57:51 2024 -0400 lsm: fixup the inode xattr capability handling The current security_inode_setxattr() and security_inode_removexattr() hooks rely on individual LSMs to either call into the associated capability hooks (cap_inode_setxattr() or cap_inode_removexattr()), or return a magic value of 1 to indicate that the LSM layer itself should perform the capability checks. Unfortunately, with the default return value for these LSM hooks being 0, an individual LSM hook returning a 1 will cause the LSM hook processing to exit early, potentially skipping a LSM. Thankfully, with the exception of the BPF LSM, none of the LSMs which currently register inode xattr hooks should end up returning a value of 1, and in the BPF LSM case, with the BPF LSM hooks executing last there should be no real harm in stopping processing of the LSM hooks. However, the reliance on the individual LSMs to either call the capability hooks themselves, or signal the LSM with a return value of 1, is fragile and relies on a specific set of LSMs being enabled. This patch is an effort to resolve, or minimize, these issues. Before we discuss the solution, there are a few observations and considerations that we need to take into account: * BPF LSM registers an implementation for every LSM hook, and that implementation simply returns the hook's default return value, a 0 in this case. We want to ensure that the default BPF LSM behavior results in the capability checks being called. * SELinux and Smack do not expect the traditional capability checks to be applied to the xattrs that they "own". * SELinux and Smack are currently written in such a way that the xattr capability checks happen before any additional LSM specific access control checks. SELinux does apply SELinux specific access controls to all xattrs, even those not "owned" by SELinux. * IMA and EVM also register xattr hooks but assume that the LSM layer and specific LSMs have already authorized the basic xattr operation. In order to ensure we perform the capability based access controls before the individual LSM access controls, perform only one capability access control check for each operation, and clarify the logic around applying the capability controls, we need a mechanism to determine if any of the enabled LSMs "own" a particular xattr and want to take responsibility for controlling access to that xattr. The solution in this patch is to create a new LSM hook, 'inode_xattr_skipcap', that is not exported to the rest of the kernel via a security_XXX() function, but is used by the LSM layer to determine if a LSM wants to control access to a given xattr and avoid the traditional capability controls. Registering an inode_xattr_skipcap hook is optional, if a LSM declines to register an implementation, or uses an implementation that simply returns the default value (0), there is no effect as the LSM continues to enforce the capability based controls (unless another LSM takes ownership of the xattr). If none of the LSMs signal that the capability checks should be skipped, the capability check is performed and if access is granted the individual LSM xattr access control hooks are executed, keeping with the DAC-before-LSM convention. Cc: stable@vger.kernel.org Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 75430c412a3139c29404459ab1216a07d1280428 Author: Dapeng Mi Date: Tue Apr 30 08:52:39 2024 +0800 KVM: x86/pmu: Manipulate FIXED_CTR_CTRL MSR with macros Magic numbers are used to manipulate the bit fields of FIXED_CTR_CTRL MSR. This makes reading code become difficult, so use pre-defined macros to replace these magic numbers. Signed-off-by: Dapeng Mi Link: https://lore.kernel.org/r/20240430005239.13527-3-dapeng1.mi@linux.intel.com [sean: drop unnecessary curly braces] Signed-off-by: Sean Christopherson commit 0e102ce3d4133194a26060fe987315133736c37b Author: Dapeng Mi Date: Tue Apr 30 08:52:38 2024 +0800 KVM: x86/pmu: Change ambiguous _mask suffix to _rsvd in kvm_pmu Several '_mask' suffixed variables such as, global_ctrl_mask, are defined in kvm_pmu structure. However the _mask suffix is ambiguous and misleading since it's not a real mask with positive logic. On the contrary it represents the reserved bits of corresponding MSRs and these bits should not be accessed. Suggested-by: Sean Christopherson Signed-off-by: Dapeng Mi Link: https://lore.kernel.org/r/20240430005239.13527-2-dapeng1.mi@linux.intel.com Signed-off-by: Sean Christopherson commit 7246a4520b4bf1494d7d030166a11b5226f6d508 Author: Vidya Sagar Date: Wed May 8 23:11:38 2024 +0530 PCI: Use preserve_config in place of pci_flags Use preserve_config in place of checking for PCI_PROBE_ONLY flag to enable support for "linux,pci-probe-only" on a per host bridge basis. This also obviates the use of adding PCI_REASSIGN_ALL_BUS flag if !PCI_PROBE_ONLY, as pci_assign_unassigned_root_bus_resources() takes care of reassigning the resources that are not already claimed. Link: https://lore.kernel.org/r/20240508174138.3630283-5-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit 1e6922482cd429e568537f8f6cf159765b5d176f Author: Vidya Sagar Date: Wed May 8 23:11:37 2024 +0530 PCI: Unify ACPI and DT 'preserve config' support Unify the 'preserve config' support across ACPI and device-tree boot flows. Link: https://lore.kernel.org/r/20240508174138.3630283-4-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit 407abde9caee0d8f757fc8bed43fa5efc6fe509a Author: Vidya Sagar Date: Wed May 8 23:11:36 2024 +0530 PCI: of: Add of_pci_preserve_config() for per-host bridge support Add of_pci_preserve_config() to look for the "linux,pci-probe-only" property under a specified node. If it's not found there, look under "of_chosen" in addition. If the caller didn't specify a node, look under "of_chosen". With a future patch, this will support "linux,pci-probe-only" on a per host bridge basis based on the presence of the property in the respective PCI host bridge DT node. Implement of_pci_check_probe_only() using of_pci_preserve_config(). Link: https://lore.kernel.org/r/20240508174138.3630283-3-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit 9d7d5db8e78ef1b67690bbffa5af60016d8e279d Author: Vidya Sagar Date: Wed May 8 23:11:35 2024 +0530 PCI: Move PRESERVE_BOOT_CONFIG _DSM evaluation to pci_register_host_bridge() Move the PRESERVE_BOOT_CONFIG _DSM evaluation from acpi_pci_root_create() to pci_register_host_bridge(). This will help unify the ACPI _DSM path and the DT-based "linux,pci-probe-only" paths. This should be safe because it happens earlier than it used to: acpi_pci_root_create pci_create_root_bus pci_register_host_bridge + bridge->preserve_config = pci_preserve_config(bridge) pci_acpi_preserve_config + acpi_evaluate_dsm_typed(DSM_PCI_PRESERVE_BOOT_CONFIG) - acpi_evaluate_dsm_typed(DSM_PCI_PRESERVE_BOOT_CONFIG) No functional change intended. Link: https://lore.kernel.org/r/20240508174138.3630283-2-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit a542e9d70cb1a292e5dc65f8603310b65236f059 Author: Gabriel Fernandez Date: Wed May 29 15:13:09 2024 +0200 clk: stm32mp25: add security clocks Add ck_icn_p_iwdg1, ck_icn_p_pka, ck_icn_p_rng, ck_icn_p_saes, ck_icn_p_serc clocks. They could be configured for non secured world. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20240529131310.260954-3-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 60f81bfc9889770c6fcc5722b376d0d7ca5d68d1 Author: Gabriel Fernandez Date: Wed May 29 15:13:08 2024 +0200 clk: stm32mp2: use of STM32 access controller Use an STM32 access controller to filter the registration of clocks. If a clock is used by the security world, then it must not registered. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20240529131310.260954-2-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 9ecc1c119b28d28869135a3745541c03965d52be Author: Hou Wenlong Date: Sat May 11 11:46:37 2024 +0800 KVM: x86/mmu: Only allocate shadowed translation cache for sp->role.level <= KVM_MAX_HUGEPAGE_LEVEL Only the indirect SP with sp->role.level <= KVM_MAX_HUGEPAGE_LEVEL might have leaf gptes, so allocation of shadowed translation cache is needed only for it. Then, it can use sp->shadowed_translation to determine whether to use the information in the shadowed translation cache or not. Also, extend the WARN in FNAME(sync_spte)() to ensure that this won't break shadow_mmu_get_sp_for_split(). Suggested-by: Lai Jiangshan Signed-off-by: Hou Wenlong Link: https://lore.kernel.org/r/5b0cda8a7456cda476b14fca36414a56f921dd52.1715398655.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit 1805c1729f52edaa021288473b09f9c7f74fb1ca Author: Waiman Long Date: Mon Jun 3 15:38:22 2024 -0400 cgroup/cpuset: Optimize isolated partition only generate_sched_domains() calls If only isolated partitions are being created underneath the cgroup root, there will only be one sched domain with top_cpuset.effective_cpus. We can skip the unnecessary sched domains scanning code and save some cycles. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 4f8973e65fcd362b85942c80362cc9a7231b09fa Author: Liang Chen Date: Thu May 9 12:47:10 2024 +0800 KVM: x86: invalid_list not used anymore in mmu_shrink_scan 'invalid_list' is now gathered in KVM_MMU_ZAP_OLDEST_MMU_PAGES. Signed-off-by: Liang Chen Link: https://lore.kernel.org/r/20240509044710.18788-1-liangchen.linux@gmail.com Signed-off-by: Sean Christopherson commit 49784c7979321c49a8055f5c588d24c34a8c55fc Author: Geliang Tang Date: Thu May 23 14:50:04 2024 +0800 selftests/bpf: Drop duplicate bpf_map_lookup_elem in test_sockmap bpf_map_lookup_elem is invoked in bpf_prog3() already, no need to invoke it again. This patch drops it. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/ea8458462b876ee445173e3effb535fd126137ed.1716446893.git.tanggeliang@kylinos.cn commit de1b5ea789dc28066cc8dc634b6825bd6148f38b Author: Geliang Tang Date: Thu May 23 14:50:03 2024 +0800 selftests/bpf: Check length of recv in test_sockmap The value of recv in msg_loop may be negative, like EWOULDBLOCK, so it's necessary to check if it is positive before accumulating it to bytes_recvd. Fixes: 16962b2404ac ("bpf: sockmap, add selftests") Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/5172563f7c7b2a2e953cef02e89fc34664a7b190.1716446893.git.tanggeliang@kylinos.cn commit dcb681b659f2a0a546752730c9daa92dc6120d52 Author: Geliang Tang Date: Thu May 23 14:50:02 2024 +0800 selftests/bpf: Fix size of map_fd in test_sockmap The array size of map_fd[] is 9, not 8. This patch changes it as a more general form: ARRAY_SIZE(map_fd). Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/0972529ee01ebf8a8fd2b310bdec90831c94be77.1716446893.git.tanggeliang@kylinos.cn commit 467a0c79b5514d7301ae679770380679a8e32668 Author: Geliang Tang Date: Thu May 23 14:50:01 2024 +0800 selftests/bpf: Drop prog_fd array in test_sockmap The program fds can be got by using bpf_program__fd(progs[]), then prog_fd becomes useless. This patch drops it. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/9a6335e4d8dbab23c0d8906074457ceddd61e74b.1716446893.git.tanggeliang@kylinos.cn commit 24bb90a42633ea47256d4f13289dd3181236e028 Author: Geliang Tang Date: Thu May 23 14:50:00 2024 +0800 selftests/bpf: Replace tx_prog_fd with tx_prog in test_sockmap bpf_program__attach_sockmap() needs to take a parameter of type bpf_program instead of an fd, so tx_prog_fd becomes useless. This patch uses a pointer tx_prog to point to an item in progs[] array. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/23b37f932c547dd1ebfe154bbc0b0e957be21ee6.1716446893.git.tanggeliang@kylinos.cn commit 3f32a115f61d31049e3e91d469bca849f712a979 Author: Geliang Tang Date: Thu May 23 14:49:59 2024 +0800 selftests/bpf: Use bpf_link attachments in test_sockmap Switch attachments to bpf_link using bpf_program__attach_sockmap() instead of bpf_prog_attach(). This patch adds a new array progs[] to replace prog_fd[] array, set in populate_progs() for each program in bpf object. And another new array links[] to save the attached bpf_link. It is initalized as NULL in populate_progs, set as the return valuses of bpf_program__attach_sockmap(), and detached by bpf_link__detach(). Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/32cf8376a810e2e9c719f8e4cfb97132ed2d1f9c.1716446893.git.tanggeliang@kylinos.cn commit a9f0ea175948c21640ae1cc145e679db7fc45fa6 Author: Geliang Tang Date: Thu May 23 14:49:58 2024 +0800 selftests/bpf: Drop duplicate definition of i in test_sockmap There's already a definition of i in run_options() at the beginning, no need to define a new one in "if (tx_prog_fd > 0)" block. Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/8d690682330a59361562bca75d6903253d16f312.1716446893.git.tanggeliang@kylinos.cn commit d95ba15b97847f4ae520db83bd98b61d50fb3068 Author: Geliang Tang Date: Thu May 23 14:49:57 2024 +0800 selftests/bpf: Fix tx_prog_fd values in test_sockmap The values of tx_prog_fd in run_options() should not be 0, so set it as -1 in else branch, and test it using "if (tx_prog_fd > 0)" condition, not "if (tx_prog_fd)" or "if (tx_prog_fd >= 0)". Signed-off-by: Geliang Tang Signed-off-by: Daniel Borkmann Tested-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/08b20ffc544324d40939efeae93800772a91a58e.1716446893.git.tanggeliang@kylinos.cn commit ab978c62e72d6b2d41842210e0cc435d9ed0dadb Merge: f9d1b541d057b b2ec042347fde Author: Paolo Bonzini Date: Mon Jun 3 13:19:46 2024 -0400 Merge branch 'kvm-6.11-sev-snp' into HEAD Pull base x86 KVM support for running SEV-SNP guests from Michael Roth: * add some basic infrastructure and introduces a new KVM_X86_SNP_VM vm_type to handle differences versus the existing KVM_X86_SEV_VM and KVM_X86_SEV_ES_VM types. * implement the KVM API to handle the creation of a cryptographic launch context, encrypt/measure the initial image into guest memory, and finalize it before launching it. * implement handling for various guest-generated events such as page state changes, onlining of additional vCPUs, etc. * implement the gmem/mmu hooks needed to prepare gmem-allocated pages before mapping them into guest private memory ranges as well as cleaning them up prior to returning them to the host for use as normal memory. Because those cleanup hooks supplant certain activities like issuing WBINVDs during KVM MMU invalidations, avoid duplicating that work to avoid unecessary overhead. This merge leaves out support support for attestation guest requests and for loading the signing keys to be used for attestation requests. commit 8031042cc531cc855926f76b0ea20db2da48f804 Author: Dr. David Alan Gilbert Date: Fri May 31 16:18:01 2024 +0100 list: test: remove unused struct 'klist_test_struct' 'klist_test_struct' has been unused since the original commit 57b4f760f94d ("list: test: Test the klist structure"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gow Signed-off-by: Shuah Khan commit f9d1b541d057bf94453201d77ffbbfba659c9ad3 Merge: c3f38fa61af77 89a58812c47f1 Author: Paolo Bonzini Date: Mon Jun 3 13:09:55 2024 -0400 Merge branch 'kvm-fixes-6.10-1' into HEAD * Fixes and debugging help for the #VE sanity check. Also disable it by default, even for CONFIG_DEBUG_KERNEL, because it was found to trigger spuriously (most likely a processor erratum as the exact symptoms vary by generation). * Avoid WARN() when two NMIs arrive simultaneously during an NMI-disabled situation (GIF=0 or interrupt shadow) when the processor supports virtual NMI. While generally KVM will not request an NMI window when virtual NMIs are supported, in this case it *does* have to single-step over the interrupt shadow or enable the STGI intercept, in order to deliver the latched second NMI. * Drop support for hand tuning APIC timer advancement from userspace. Since we have adaptive tuning, and it has proved to work well, drop the module parameter for manual configuration and with it a few stupid bugs that it had. commit b2ec042347fde5df1239d228b4d86ca642944870 Author: Tom Lendacky Date: Wed May 22 13:31:58 2024 -0500 KVM: SVM: Remove the need to trigger an UNBLOCK event on AP creation All SNP APs are initially started using the APIC INIT/SIPI sequence in the guest. This sequence moves the AP MP state from KVM_MP_STATE_UNINITIALIZED to KVM_MP_STATE_RUNNABLE, so there is no need to attempt the UNBLOCK. As it is, the UNBLOCK support in SVM is only enabled when AVIC is enabled. When AVIC is disabled, AP creation is still successful. Remove the KVM_REQ_UNBLOCK request from the AP creation code and revert the changes to the vcpu_unblocking() kvm_x86_ops path. Signed-off-by: Tom Lendacky Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini commit 73137f59246da530c29674a506f83a18fe327946 Author: Paolo Bonzini Date: Mon Jun 3 12:37:26 2024 -0400 KVM: SEV: Don't WARN() if RMP lookup fails when invalidating gmem pages The hook only handles cleanup work specific to SNP, e.g. RMP table entries and flushing caches for encrypted guest memory. When run on a non-SNP-enabled host (currently only possible using KVM_X86_SW_PROTECTED_VM, e.g. via KVM selftests), the callback is a noop and will WARN due to the RMP table not being present. It's actually expected in this case that the RMP table wouldn't be present and that the hook should be a noop, so drop the WARN_ONCE(). Reported-by: Sean Christopherson Closes: https://lore.kernel.org/kvm/ZkU3_y0UoPk5yAeK@google.com/ Fixes: 8eb01900b018 ("KVM: SEV: Implement gmem hook for invalidating private pages") Suggested-by: Paolo Bonzini Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini commit febff040b1a6781c46b3670e73fbcb707e731e7e Author: Michael Roth Date: Tue May 28 15:58:09 2024 -0500 KVM: SEV: Automatically switch reclaimed pages to shared Currently there's a consistent pattern of always calling host_rmp_make_shared() immediately after snp_page_reclaim(), so go ahead and handle it automatically as part of snp_page_reclaim(). Also rename it to kvm_rmp_make_shared() to more easily distinguish it as a KVM-specific variant of the more generic rmp_make_shared() helper. Suggested-by: Sean Christopherson Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini commit 0c468a6a020cc7d848af053ef13254005e289dd9 Author: Tony Luck Date: Mon May 20 15:45:40 2024 -0700 KVM: VMX: Switch to new Intel CPU model infrastructure Use x86_vfm (vendor, family, module) to detect CPUs that are affected by PERF_GLOBAL_CTRL bugs instead of manually checking the family and model. The new VFM infrastructure encodes all information in one handy location. No functional change intended. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240520224620.9480-10-tony.luck@intel.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 8387435bebacc33d01ca467fdef4b8aaf534b3db Author: Tony Luck Date: Mon May 20 15:45:39 2024 -0700 KVM: x86/pmu: Switch to new Intel CPU model defines Use X86_MATCH_VFM(), which does Vendor checking in addition to Family and Model checking, to do FMS-based detection of PEBS features. No functional change intended. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240520224620.9480-9-tony.luck@intel.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit f13b349e3c70320ef5a86edfc888a6feb612abb0 Author: Shengjiu Wang Date: Wed May 29 16:40:02 2024 +0800 ASoC: fsl_xcvr: Add support for i.MX95 platform On i.MX95, the XCVR uses a new PLL in the PHY, which is General Purpose (GP) PLL. Add GP PLL configuration support in the driver and add the 'pll_ver' flag to distinguish different PLL on different platforms. The XCVR also use PHY but limited for SPDIF only case Add 'use_phy' flag to distinguish these platforms. When there are 'pll8k' and 'pll11k' clock existing, the clock source of 'phy_clk' can be changed for different sample rate requirement. Signed-off-by: Shengjiu Wang Reviewed-by: Chancel Liu Link: https://msgid.link/r/1716972002-2315-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit fc1277335ffa0d180c76ddccf5fe27fc75674e67 Author: Shengjiu Wang Date: Wed May 29 16:40:01 2024 +0800 ASoC: dt-bindings: fsl,xcvr: Add compatible string for i.MX95 Add compatible string "fsl,imx95-xcvr" for i.MX95 platform. The difference between each platform is in below table. +---------+--------+----------+--------+ | SOC | PHY | eARC/ARC | SPDIF | +---------+--------+----------+--------+ | i.MX8MP | V1 | Yes | Yes | +---------+--------+----------+--------+ | i.MX93 | N/A | N/A | Yes | +---------+--------+----------+--------+ | i.MX95 | V2 | N/A | Yes | +---------+--------+----------+--------+ On i.MX95, there are two PLL clock sources, they are the parent clocks of the XCVR root clock. one is for 8kHz series rates, named as 'pll8k', another one is for 11kHz series rates, named as 'pll11k'. They are optional clocks, if there are such clocks, then the driver can switch between them to support more accurate sample rates. As 'pll8k' and 'pll11k' are optional, then add 'minItems: 4' for clocks and clock-names properties. On i.MX95, the 'interrupts' configuration has the same constraint as i.MX93. Only on i.MX8MP, the 'resets' is required, but for i.MX95 and i.MX93 there is no such hardware setting. Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring (Arm) Link: https://msgid.link/r/1716972002-2315-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit ea19f7d0bf46c70085a2c8a96e3b3ceae1e7ddb8 Author: Jim Mattson Date: Mon Nov 13 10:48:54 2023 -0800 KVM: x86: Remove IA32_PERF_GLOBAL_OVF_CTRL from KVM_GET_MSR_INDEX_LIST This MSR reads as 0, and any host-initiated writes are ignored, so there's no reason to enumerate it in KVM_GET_MSR_INDEX_LIST. Signed-off-by: Jim Mattson Link: https://lore.kernel.org/r/20231113184854.2344416-1-jmattson@google.com Signed-off-by: Sean Christopherson commit 82897db91215d57caefdfacfc2f5e3ef9cf31fe3 Author: Sean Christopherson Date: Tue Apr 23 15:15:21 2024 -0700 KVM: x86: Move shadow_phys_bits into "kvm_host", as "maxphyaddr" Move shadow_phys_bits into "struct kvm_host_values", i.e. into KVM's global "kvm_host" variable, so that it is automatically exported for use in vendor modules. Rename the variable/field to maxphyaddr to more clearly capture what value it holds, now that it's used outside of the MMU (and because the "shadow" part is more than a bit misleading as the variable is not at all unique to shadow paging). Recomputing the raw/true host.MAXPHYADDR on every use can be subtly expensive, e.g. it will incur a VM-Exit on the CPUID if KVM is running as a nested hypervisor. Vendor code already has access to the information, e.g. by directly doing CPUID or by invoking kvm_get_shadow_phys_bits(), so there's no tangible benefit to making it MMU-only. Link: https://lore.kernel.org/r/20240423221521.2923759-5-seanjc@google.com Signed-off-by: Sean Christopherson commit c043eaaa6be0858a9eb04a168cba84422369e026 Author: Sean Christopherson Date: Tue Apr 23 15:15:20 2024 -0700 KVM: x86/mmu: Snapshot shadow_phys_bits when kvm.ko is loaded Snapshot shadow_phys_bits when kvm.ko is loaded, not when a vendor module is loaded, to guard against usage of shadow_phys_bits before it is initialized. The computation isn't vendor specific in any way, i.e. there there is no reason to wait to snapshot the value until a vendor module is loaded, nor is there any reason to recompute the value every time a vendor module is loaded. Opportunistically convert it from "read mostly" to "read-only after init". Link: https://lore.kernel.org/r/20240423221521.2923759-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 52c47f5897b69cdde0d23e5102b44eb161fa70a8 Author: Sean Christopherson Date: Tue Apr 23 15:15:19 2024 -0700 KVM: SVM: Use KVM's snapshot of the host's XCR0 for SEV-ES host state Use KVM's snapshot of the host's XCR0 when stuffing SEV-ES host state instead of reading XCR0 from hardware. XCR0 is only written during boot, i.e. won't change while KVM is running (and KVM at large is hosed if that doesn't hold true). Link: https://lore.kernel.org/r/20240423221521.2923759-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 7974c0643ee3b493d5a3f2a1ee25e9ddb53283c3 Author: Sean Christopherson Date: Tue Apr 23 15:15:18 2024 -0700 KVM: x86: Add a struct to consolidate host values, e.g. EFER, XCR0, etc... Add "struct kvm_host_values kvm_host" to hold the various host values that KVM snapshots during initialization. Bundling the host values into a single struct simplifies adding new MSRs and other features with host state/values that KVM cares about, and provides a one-stop shop. E.g. adding a new value requires one line, whereas tracking each value individual often requires three: declaration, definition, and export. No functional change intended. Link: https://lore.kernel.org/r/20240423221521.2923759-2-seanjc@google.com Signed-off-by: Sean Christopherson commit f626279dea33ba551839f2321511ad127e5a58e8 Author: Dr. David Alan Gilbert Date: Mon Jun 3 00:55:29 2024 +0100 KVM: selftests: remove unused struct 'memslot_antagonist_args' 'memslot_antagonist_args' is unused since the original commit f73a3446252e ("KVM: selftests: Add memslot modification stress test"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20240602235529.228204-1-linux@treblig.org Signed-off-by: Sean Christopherson commit f2362c04752ca23ee65d476795f4e2ea444f1809 Author: Julian Stecklina Date: Mon May 20 16:32:18 2024 +0200 KVM: fix documentation rendering for KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM The documentation for KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM doesn't use the correct keyword formatting, which breaks rendering on https://www.kernel.org/doc/html/latest/virt/kvm/api.html. Signed-off-by: Julian Stecklina Link: https://lore.kernel.org/r/20240520143220.340737-1-julian.stecklina@cyberus-technology.de Signed-off-by: Sean Christopherson commit 778c350eb580a497c9da2a01e314fe12674cb66a Author: Sean Christopherson Date: Tue Apr 23 12:16:49 2024 -0700 Revert "KVM: async_pf: avoid recursive flushing of work items" Now that KVM does NOT gift async #PF workers a "struct kvm" reference, don't bother skipping "done" workers when flushing/canceling queued workers, as the deadlock that was being fudged around can no longer occur. When workers, i.e. async_pf_execute(), were gifted a referenced, it was possible for a worker to put the last reference and trigger VM destruction, i.e. trigger flushing of a workqueue from a worker in said workqueue. Note, there is no actual lock, the deadlock was that a worker will be stuck waiting for itself (the workqueue code simulates a lock/unlock via lock_map_{acquire,release}()). Skipping "done" workers isn't problematic per se, but using work->vcpu as a "done" flag is confusing, e.g. it's not clear that async_pf.lock is acquired to protect the work->vcpu, NOT the processing of async_pf.queue (which is protected by vcpu->mutex). This reverts commit 22583f0d9c85e60c9860bc8a0ebff59fe08be6d7. Suggested-by: Xu Yilun Link: https://lore.kernel.org/r/20240423191649.2885257-1-seanjc@google.com Signed-off-by: Sean Christopherson commit f8aadead19713c610c175a8d416bca6175e5840e Author: Parshuram Sangle Date: Thu Nov 2 21:16:28 2023 +0530 KVM: Update halt polling documentation to note that KVM has 4 module params Update KVM's halt-polling documentation to correclty reflect that KVM has 4 relevant module params, not 3 params. Co-developed-by: Rajendran Jaishankar Signed-off-by: Rajendran Jaishankar Signed-off-by: Parshuram Sangle Link: https://lore.kernel.org/r/20231102154628.2120-3-parshuram.sangle@intel.com [sean: drop unrelated and misleading doc update] Signed-off-by: Sean Christopherson commit aeb1b22a3ac8e94c791f06f16e921384794771fa Author: Parshuram Sangle Date: Thu Nov 2 21:16:27 2023 +0530 KVM: Enable halt polling shrink parameter by default Default halt_poll_ns_shrink value of 0 always resets polling interval to 0 on an un-successful poll where vcpu wakeup is not received. This is mostly to avoid pointless polling for more number of shorter intervals. But disabled shrink assumes vcpu wakeup is less likely to be received in subsequent shorter polling intervals. Another side effect of 0 shrink value is that, even on a successful poll if total block time was greater than current polling interval, the polling interval starts over from 0 instead of shrinking by a factor. Enabling shrink with value of 2 allows the polling interval to gradually decrement in case of un-successful poll events as well. This gives a fair chance for successful polling events in subsequent polling intervals rather than resetting it to 0 and starting over from grow_start. Below kvm stat log snippet shows interleaved growth and shrinking of polling interval: 87162647182125: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 10000 (grow 0) 87162647637763: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (grow 10000) 87162649627943: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 40000 (grow 20000) 87162650892407: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (shrink 40000) 87162651540378: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 40000 (grow 20000) 87162652276768: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (shrink 40000) 87162652515037: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 40000 (grow 20000) 87162653383787: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (shrink 40000) 87162653627670: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 10000 (shrink 20000) 87162653796321: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 20000 (grow 10000) 87162656171645: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 10000 (shrink 20000) 87162661607487: kvm_halt_poll_ns: vcpu 0: halt_poll_ns 0 (shrink 10000) Having both grow and shrink enabled creates a balance in polling interval growth and shrink behavior. Tests show improved successful polling attempt ratio which contribute to VM performance. Power penalty is quite negligible as shrunk polling intervals create bursts of very short durations. Performance assessment results show 3-6% improvements in CPU+GPU, Memory and Storage Android VM workloads whereas 5-9% improvement in average FPS of gaming VM workloads. Power penalty is below 1% where host OS is either idle or running a native workload having 2 VMs enabled. CPU/GPU intensive gaming workloads as well do not show any increased power overhead with shrink enabled. Co-developed-by: Rajendran Jaishankar Signed-off-by: Rajendran Jaishankar Signed-off-by: Parshuram Sangle Link: https://lore.kernel.org/r/20231102154628.2120-2-parshuram.sangle@intel.com Signed-off-by: Sean Christopherson commit 96a02b9fa95108269cd0cd012f091f86bd6f41a4 Author: Borislav Petkov Date: Wed May 15 17:08:04 2024 +0200 KVM: Unexport kvm_debugfs_dir After faf01aef0570 ("KVM: PPC: Merge powerpc's debugfs entry content into generic entry") kvm_debugfs_dir is not used anywhere else outside of kvm_main.c Unexport it and make it static. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240515150804.9354-1-bp@kernel.org Signed-off-by: Sean Christopherson commit 3d9a0a25336433d48ddca1e1f4fea25fd4a3b1d8 Author: Sreenath Vijayan Date: Thu May 30 13:15:47 2024 +0530 printk: Rename console_replay_all() and update context Rename console_replay_all() to console_try_replay_all() to make clear that the implementation is best effort. Also, the function should not be called in NMI context as it takes locks, so update the comment in code. Fixes: 693f75b91a91 ("printk: Add function to replay kernel log on consoles") Fixes: 1b743485e27f ("tty/sysrq: Replay kernel log messages on consoles via sysrq") Suggested-by: Petr Mladek Signed-off-by: Shimoyashiki Taichi Signed-off-by: Sreenath Vijayan Link: https://lore.kernel.org/r/Zlguq/wU21Z8MqI4@sreenath.vijayan@sony.com Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit ec1249d3278183d419276b9a7fe73591cd3dd505 Author: Jeff Johnson Date: Fri May 31 09:28:43 2024 -0700 test_bpf: Add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bpf.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240531-md-lib-test_bpf-v1-1-868e4bd2f9ed@quicinc.com commit cc160697a576150975280a4b5394fe9c70700503 Author: Andy Shevchenko Date: Thu May 30 18:10:07 2024 +0300 spi: pxa2xx: Convert PCI driver to use spi-pxa2xx code directly PCI driver has an additional device layer for enumeration. Remove that layer and use spi-pxa2xx code directly. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-12-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 3d8f037fbcab53e03ab2ef18a66f202be3653d50 Author: Andy Shevchenko Date: Thu May 30 18:10:06 2024 +0300 spi: pxa2xx: Move platform driver to a separate file The spi-pxa2xx.c is bloated with a platform driver code while pretending to provide a core functionality. Make it real core library by splitting out the platform driver to a separate file. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-11-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 20ade9b9771c80eb58eb42ccd0a48ba24bdc3c4f Author: Andy Shevchenko Date: Thu May 30 18:10:05 2024 +0300 spi: pxa2xx: Extract pxa2xx_spi_platform_*() callbacks In preparation of the extracting platform driver from spi-pxa2xx.c split the probe and remove functions so we have bus independent and platform device ones. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-10-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 75bfdccaecf96189318b29100b880c416d89ed46 Author: Andy Shevchenko Date: Thu May 30 18:10:04 2024 +0300 spi: pxa2xx: Remove superflous check for Intel Atom SoCs pxa2xx_spi_fw_translate_cs() checks for the ACPI companion device presence along with the SSP type. But the SSP type is uniquely determines the case. Hence remove the superflous check. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-9-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 560fb06df2fd250004a1cac079717dbe7f863ff2 Author: Andy Shevchenko Date: Thu May 30 18:10:03 2024 +0300 spi: pxa2xx: Remove duplicate check The mmio_base can't be NULL at this point. It's either checked in both pxa_ssp_probe() and pxa2xx_spi_init_ssp() or correctly provided by PCI core. Hence, remove duplicate check which is a dead code. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-8-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9b328f5f5c921ec83e1765075b82e6cc05e576b9 Author: Andy Shevchenko Date: Thu May 30 18:10:02 2024 +0300 spi: pxa2xx: Print DMA burst size only when DMA is enabled Print DMA burst size only when DMA is enabled to avoid making a false impression that DMA is enabled when it may be not. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-7-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit c65174fdb2f7fe83ee515966c08de9a990e722f9 Author: Andy Shevchenko Date: Thu May 30 18:10:01 2024 +0300 spi: pxa2xx: Utilise temporary variable for struct device We have a temporary variable to keep a pointer to struct device. Utilise it where it makes sense. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit c1b93986dfb2a31b0528fe929d574843801089f5 Author: Andy Shevchenko Date: Thu May 30 18:10:00 2024 +0300 spi: pxa2xx: Remove hard coded number of chip select pins Remove hard coded number of chip select pins for Intel Braswell. This comes via property. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 7b0f2c1050643c4793e6eae0246a8de3b22c950a Author: Andy Shevchenko Date: Thu May 30 18:09:59 2024 +0300 spi: pxa2xx: Remove no more needed driver data Since the ACPI enumerated devices provide a property with SSP type, there is no more necessity to bear the copy of them in the ID table. Drop the driver data in ACPI ID table. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 8aa5062e26054b8c081d5bba930baac4faadd1b0 Author: Andy Shevchenko Date: Thu May 30 18:09:58 2024 +0300 spi: pxa2xx: Reorganize the SSP type retrieval The old Intel platforms, such as Intel Braswell, also provide the property of SSP type. Reorganize the pxa2xx_spi_init_pdata() to take that into account. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit a2fca8f2e242b3cdfed2a15084e733348ef68509 Author: Andy Shevchenko Date: Thu May 30 18:09:57 2024 +0300 spi: pxa2xx: Wrap pxa_ssp_request() to be device managed resource In the error path or remove path the reference counter in PXA SSP driver may be dropped before the other resources, that were allocated after bumbing the reference counter. This breaks reversed order of freeing and might have an undesired side effects. Prevent this from happening by wrapping pxa_ssp_request() to be device managed resource. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240530151117.1130792-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit ccdc13ab26ca248fdc53179a0c7f588ab2e1c8d8 Author: Peter Ujfalusi Date: Mon Jun 3 10:25:44 2024 +0300 ASoC: SOF: Intel: pci-tgl: Align ADL-N sof_dev_desc struct name to convention Follow the convention already in use by other platforms on naming the sof_dev_desc struct by dropping the underscore between adl and n Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240603072544.5215-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit d8e5fa784867c4cd400afecc43aec57c51c10dc7 Author: Krzysztof Kozlowski Date: Thu May 23 14:48:08 2024 +0200 ASoC: codecs: wcd938x: Drop no-op ADC2_BCS Disable Switch The "ADC2_BCS Disable Switch" control does basically nothing: sets field in driver's private data structure which is never read again to configure hardware. Drop the control as it has no effect. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240523124808.42923-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit fe243a546bcbc405abb7cc5cf26852609cf4e2cc Author: Krzysztof Kozlowski Date: Thu May 23 14:50:49 2024 +0200 ASoC: codecs: wcd939x: Unify define used for MIC bias VOUT registers All four microphone bias registers have similar layout: VOUT control mask is exactly the same. Use one define, just like older driver wcd938x is doing, to make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240523125049.43713-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c4cfe1136d6edf8970ccdd944b7f86f7aa3edb77 Author: Kuninori Morimoto Date: Tue May 28 05:05:55 2024 +0000 ASoC: simple-audio-card: merge simple_parse_mclk_fs() into simple_link_init() Now graph_link_init() is parsing dai_link related property. Let's handle mclk_fs on it, too. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87v82yfrv0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 42d37e8de8f2d121481a65e6a3e10f6387c0ad4c Author: Kuninori Morimoto Date: Tue May 28 05:05:51 2024 +0000 ASoC: simple-audio-card: enable playback/capture_only property Audio Graph Card2 is supporting playback/capture_only property, let's follow Simple Audio Card, too. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87wmnefrv4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a0174c88386b48bea7c35bc5a927f7057cb45d38 Author: Kuninori Morimoto Date: Tue May 28 05:05:48 2024 +0000 ASoC: audio-graph-card: merge graph_parse_mclk_fs() into graph_link_init() Now graph_link_init() is parsing dai_link related property. Let's handle mclk_fs on it, too. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87y17ufrv8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f23bac6e6913eed9eb831b4893255ea862d40ea5 Author: Kuninori Morimoto Date: Tue May 28 05:05:44 2024 +0000 ASoC: audio-graph-card: enable playback/capture_only property Audio Graph Card2 is supporting playback/capture_only property, let's follow Audio Graph Card, too. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87zfsafrvb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 84c9601a92b755f869ac811607402e5b2162c225 Author: Kuninori Morimoto Date: Tue May 28 05:05:40 2024 +0000 ASoC: audio-graph-card: remove ports node name check Current audio-graph-card is checking if the node name was "ports" or not when parsing the property. if (of_node_name_eq(ports, "ports")) of_xxx(ports, ...); Now, it is using new port_to_ports() which will be NULL if the node doesn't have "ports", and each of_xxx functions will do nothing if node was NULL. Now we don't need to check ports node name. Let's remove and cleanup it. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/871q5mh6fv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit df23fcd56bb75ab522350bd8cb52bde9067aea45 Author: Kuninori Morimoto Date: Tue May 28 05:05:36 2024 +0000 ASoC: audio-graph-card: add ep_to_port() / port_to_ports() Current audio-graph-card is using of_get_parent() to get "port" from "ep", or get "ports" from "port". But it is difficlut to understand, and "ports" might not exist. This patch adds ep_to_port() to get "port" from "ep", and port_to_ports() to get "ports" from "port". "ports" will be NULL if not exist. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/8734q2h6fz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f2d7e85962baf410b1bbbb4cf23a1ca59261ef76 Author: Kuninori Morimoto Date: Tue May 28 05:05:32 2024 +0000 ASoC: audio-graph-card2: merge graph_parse_mclk_fs() into graph_link_init() Now graph_link_init() is parsing dai_link related property. Let's handle mclk_fs on it, too. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/874jaih6g3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 844de7eebe97a1c277f8a408457712086c957195 Author: Kuninori Morimoto Date: Tue May 28 05:05:28 2024 +0000 ASoC: audio-graph-card2: expand dai_link property part Current dai_link related property are parsed and enabled only on CPU port node (A)(b)(c). OTOH, Audio Graph Card2 supports many connections like Multi-CPU, DPCM, Codec2Codec today. For example in Multi-CPU case, it will be checked via (X) -> (B) -> (b) process, but (X) / (B) part property is not parsed. >From dai_link related settings point of view, (B) (C) part and Codec port also enabled is more viscerally understandable, and useful. card2 { (X) links = <&snd-cpu (A) &snd-multi (B) &snd-dpcm (C) ...> multi { ports { (B) snd-multi: port { ... }; ... }; }; dpcm { ports { (C) snd-dpcm: port { ... }; ... }; }; codec2codec { ... }; }; cpu_device { ports { (A) snd-cpu: port { ... }; (b) mcpu: port { ... }; (c) dcpu: port { ... }; } }; One note here is that if it was Multi-CPU/Codec case, 1st port only enabled to have property it. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/875xuyh6g7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 33ae57277ce08b83c65c18a09bf09499de613c01 Author: Kuninori Morimoto Date: Tue May 28 05:05:24 2024 +0000 ASoC: audio-graph-card2: remove ports node name check Current audio-graph-card2 is checking if the node name was "ports" or not when parsing the property. if (of_node_name_eq(ports, "ports")) of_xxx(ports, ...); Now, it is using new port_to_ports() which will be NULL if the node doesn't have "ports", and each of_xxx functions will do nothing if node was NULL. Now we don't need to check ports node name. Let's remove and cleanup it. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/877cfeh6gb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 72999a1b6663f1ff604e79aea54f168f78e2441a Author: Kuninori Morimoto Date: Tue May 28 05:05:20 2024 +0000 ASoC: audio-graph-card2: add ep_to_port() / port_to_ports() Current audio-graph-card2 is using of_get_parent() to get "port" from "ep", or get "ports" from "port". But it is difficlut to understand, and "ports" might not exist. This patch adds ep_to_port() to get "port" from "ep", and port_to_ports() to get "ports" from "port". "ports" will be NULL if not exist. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/878qzuh6gf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 45919c28134519080a85a5fb66d0f65955ef7572 Author: Kuninori Morimoto Date: Tue May 28 05:05:14 2024 +0000 ASoC: simple-card-utils: remove both playback/capture_only check soc-pcm.c :: soc_get_playback_capture() will indicate error if both playback_only / capture_only were true. Thus, graph_util_parse_link_direction() which setup playback_only / capture_only don't need to check it. And, its return value is not used on existing driver. Let's remove it. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87a5kah6gm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8080dde80a2d3657529c2172471c06cfcd9a228e Author: Dr. David Alan Gilbert Date: Sat Jun 1 23:54:46 2024 +0100 ASoC: codecs: cx2072x: remove unused struct 'cx2072x_eq_ctrl' 'cx2072x_eq_ctrl' has been unused since the original commit a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://msgid.link/r/20240601225446.183505-4-linux@treblig.org Signed-off-by: Mark Brown commit 62ccbe8cbe2a1b6911ec47bea8b1510dc1f82dd5 Author: Dr. David Alan Gilbert Date: Sat Jun 1 23:54:45 2024 +0100 ASoC: codecs: wm0010: remove unused struct 'wm0010_spi_msg' 'wm0010_spi_msg' has been unused since the original commit e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Charles Keepax Link: https://msgid.link/r/20240601225446.183505-3-linux@treblig.org Signed-off-by: Mark Brown commit 44e55f9de9950dba091401898a931fc1a3a99146 Author: Dr. David Alan Gilbert Date: Sat Jun 1 23:54:44 2024 +0100 ASoC: codecs: lpass-rx-macro: remove unused struct 'rx_macro_reg_mask_val' 'rx_macro_reg_mask_val' is unused since the original commit af3d54b99764 ("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://msgid.link/r/20240601225446.183505-2-linux@treblig.org Signed-off-by: Mark Brown commit ce5249b91e34d81255c00950d415ebd4c3cae8d4 Author: Swan Beaujard Date: Mon Jun 3 00:58:12 2024 +0200 bpftool: Fix typo in MAX_NUM_METRICS macro name Correct typo in bpftool profiler and change all instances of 'MATRICS' to 'METRICS' in the profiler.bpf.c file. Signed-off-by: Swan Beaujard Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240602225812.81171-1-beaujardswan@gmail.com commit a450d36b05fa225b071ce9fbf522544caea06594 Author: Dr. David Alan Gilbert Date: Mon Jun 3 00:41:12 2024 +0100 selftests/bpf: Remove unused struct 'libcap' 'libcap' is unused since commit b1c2768a82b9 ("bpf: selftests: Remove libcap usage from test_verifier"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240602234112.225107-4-linux@treblig.org commit 3f67639d8e582c89c79549c619b22a00dd330e4e Author: Dr. David Alan Gilbert Date: Mon Jun 3 00:41:11 2024 +0100 selftests/bpf: Remove unused 'key_t' structs 'key_t' is unused in a couple of files since the original commit 60dd49ea6539 ("selftests/bpf: Add test for bpf array map iterators"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240602234112.225107-3-linux@treblig.org commit dfa7c9ffa607235119e029b70ced72f29059f8f3 Author: Dr. David Alan Gilbert Date: Mon Jun 3 00:41:10 2024 +0100 selftests/bpf: Remove unused struct 'scale_test_def' 'scale_test_def' is unused since commit 3762a39ce85f ("selftests/bpf: Split out bpf_verif_scale selftests into multiple tests"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240602234112.225107-2-linux@treblig.org commit 96a27ee76f0e95b56f94b6902da7a5ebef372612 Author: Xiao Wang Date: Fri May 24 15:55:43 2024 +0800 riscv, bpf: Introduce shift add helper with Zba optimization Zba extension is very useful for generating addresses that index into array of basic data types. This patch introduces sh2add and sh3add helpers for RV32 and RV64 respectively, to accelerate addressing for array of unsigned long data. Signed-off-by: Xiao Wang Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20240524075543.4050464-3-xiao.w.wang@intel.com commit d694e46afb4be5332877af2989e4d0b80b7df235 Author: Jeff Johnson Date: Thu May 16 09:50:55 2024 -0700 fs: nls: add missing MODULE_DESCRIPTION() macros Fix the following allmodconfig "make W=1" issues: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-celtic.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-centeuro.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-croatian.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-cyrillic.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-gaelic.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-greek.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-iceland.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-inuit.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-romanian.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-roman.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/mac-turkish.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_ascii.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp1250.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp1251.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp1255.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp437.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp737.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp775.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp850.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp852.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp855.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp857.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp860.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp861.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp862.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp863.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp864.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp865.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp866.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp869.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp874.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp932.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp936.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp949.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_cp950.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_euc-jp.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-13.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-14.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-15.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-1.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-2.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-3.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-4.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-5.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-6.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-7.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_iso8859-9.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_koi8-r.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_koi8-ru.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_koi8-u.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_ucs2_utils.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/nls/nls_utf8.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240516-md-fs-nls-v1-1-ed540d8239bf@quicinc.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit ca86a5d2f9feed16e11023891c8c70aa57ced24e Author: Mikulas Patocka Date: Thu May 16 00:10:44 2024 +0200 tmpfs: don't interrupt fallocate with EINTR I have a program that sets up a periodic timer with 10ms interval. When the program attempts to call fallocate(2) on tmpfs, it goes into an infinite loop. fallocate(2) takes longer than 10ms, so it gets interrupted by a signal and it returns EINTR. On EINTR, the fallocate call is restarted, going into the same loop again. Let's change the signal_pending() check in shmem_fallocate() loop to fatal_signal_pending(). This solves the problem of shmem_fallocate() constantly restarting. Since most other filesystem's fallocate methods don't react to signals, it is unlikely userspace really relies on timely delivery of non-fatal signals while fallocate is running. Also the comment before the signal check: /* * Good, the fallocate(2) manpage permits EINTR: we may have * been interrupted because we are using up too much memory. */ indicates that the check was mainly added for OOM situations in which case the process will be sent a fatal signal so this change preserves the behavior in OOM situations. [JK: Update changelog and comment based on upstream discussion] Signed-off-by: Mikulas Patocka Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20240515221044.590-1-jack@suse.cz Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Christian Brauner commit cd140ce9f611a5e9d2a5989a282b75e55c71dab3 Author: Hongbo Li Date: Thu May 30 20:01:11 2024 +0800 hostfs: convert hostfs to use the new mount API Convert the hostfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: Hongbo Li Link: https://lore.kernel.org/r/20240530120111.3794664-1-lihongbo22@huawei.com Signed-off-by: Christian Brauner commit ea95bd851068803eb37693b2e32111b88077c901 Author: Bartosz Golaszewski Date: Mon May 27 21:46:13 2024 +0200 gpiolib: make gpiochip_set_desc_names() return void gpiochip_set_desc_names() cannot fail so drop its return value. Link: https://lore.kernel.org/r/20240527194613.197810-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski commit 2f2f5c13cc5ea87f1dd2debfd06fe5f624e5c0fd Author: devi priya Date: Thu May 16 08:54:36 2024 +0530 phy: qcom-qmp-pcie: Add support for IPQ9574 g3x1 and g3x2 PCIEs Add support for a single-lane and two-lane PCIe PHYs found on Qualcomm IPQ9574 platform. Reviewed-by: Abel Vesa Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Signed-off-by: devi priya Link: https://lore.kernel.org/r/20240516032436.2681828-5-quic_devipriy@quicinc.com Signed-off-by: Vinod Koul commit 71ae2acf1d7542ecd21c6933cae8fe65d550074b Author: devi priya Date: Thu May 16 08:54:35 2024 +0530 phy: qcom-qmp: Add missing register definitions for PCS V5 Add missing register offsets for PCS V5 registers. Reviewed-by: Abel Vesa Signed-off-by: devi priya Link: https://lore.kernel.org/r/20240516032436.2681828-4-quic_devipriy@quicinc.com Signed-off-by: Vinod Koul commit f1aaa788b997ba8a7810da0696e89fd3f79ecce3 Author: devi priya Date: Thu May 16 08:54:34 2024 +0530 phy: qcom-qmp: Add missing offsets for Qserdes PLL registers. Add missing register offsets for Qserdes PLL. Reviewed-by: Abel Vesa Signed-off-by: devi priya Link: https://lore.kernel.org/r/20240516032436.2681828-3-quic_devipriy@quicinc.com Signed-off-by: Vinod Koul commit 29f09daab910c797f5468afda91a51e3e29de7ee Author: devi priya Date: Thu May 16 08:54:33 2024 +0530 dt-bindings: phy: qcom,ipq8074-qmp-pcie: Document the IPQ9574 QMP PCIe PHYs Document the QMP PCIe PHYs on IPQ9574 platform. Acked-by: Krzysztof Kozlowski Signed-off-by: devi priya Link: https://lore.kernel.org/r/20240516032436.2681828-2-quic_devipriy@quicinc.com Signed-off-by: Vinod Koul commit 3f8bb7a7b4e016df586f464279936a5767c2a36a Author: Dr. David Alan Gilbert Date: Mon May 27 21:58:44 2024 +0100 phy: miphy28lp: remove unused struct 'miphy_initval' 'miphy_initval' is unused since the original commit 2c14e9be0c60 ("phy: miphy28lp: Provide support for the MiPHY28lp Generic PHY"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240527205844.165279-1-linux@treblig.org Signed-off-by: Vinod Koul commit 9d3799c3e807ab5777cda6ae48ebc127b83bc8b0 Author: Dr. David Alan Gilbert Date: Mon May 27 21:59:37 2024 +0100 phy: starfive: remove unused struct 'regval' 'regval' is unused since the original commit f8aa660841bc ("phy: starfive: Add mipi dphy rx support"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Changhuang Liang Link: https://lore.kernel.org/r/20240527205937.165325-1-linux@treblig.org Signed-off-by: Vinod Koul commit b279a835192834565db5025205394e3ef943fbd2 Author: Bjorn Andersson Date: Sat May 25 11:03:55 2024 -0700 phy: qcom-qmp-usb: Add sc8180x USB UNIPHY The SC8180X platform has two UNIPHY blocks, add support for these in the QMP driver. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240525-sc8180x-usb-mp-v1-2-60a904392438@quicinc.com Signed-off-by: Vinod Koul commit 4dc7e51a9e40f07dc0da7eea05577633984ea9f2 Author: Bjorn Andersson Date: Sat May 25 11:03:54 2024 -0700 dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: Add sc8180x USB3 compatible The SC8180X has two USB3 UNIPHY QMP blocks, add a compatible for these. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240525-sc8180x-usb-mp-v1-1-60a904392438@quicinc.com Signed-off-by: Vinod Koul commit 2a010c41285345da60cece35575b4e0af7e7bf44 Author: Christian Brauner Date: Fri May 31 15:01:43 2024 +0200 fs: don't block i_writecount during exec Back in 2021 we already discussed removing deny_write_access() for executables. Back then I was hesistant because I thought that this might cause issues in userspace. But even back then I had started taking some notes on what could potentially depend on this and I didn't come up with a lot so I've changed my mind and I would like to try this. Here are some of the notes that I took: (1) The deny_write_access() mechanism is causing really pointless issues such as [1]. If a thread in a thread-group opens a file writable, then writes some stuff, then closing the file descriptor and then calling execve() they can fail the execve() with ETXTBUSY because another thread in the thread-group could have concurrently called fork(). Multi-threaded libraries such as go suffer from this. (2) There are userspace attacks that rely on overwriting the binary of a running process. These attacks are _mitigated_ but _not at all prevented_ from ocurring by the deny_write_access() mechanism. I'll go over some details. The clearest example of such attacks was the attack against runC in CVE-2019-5736 (cf. [3]). An attack could compromise the runC host binary from inside a _privileged_ runC container. The malicious binary could then be used to take over the host. (It is crucial to note that this attack is _not_ possible with unprivileged containers. IOW, the setup here is already insecure.) The attack can be made when attaching to a running container or when starting a container running a specially crafted image. For example, when runC attaches to a container the attacker can trick it into executing itself. This could be done by replacing the target binary inside the container with a custom binary pointing back at the runC binary itself. As an example, if the target binary was /bin/bash, this could be replaced with an executable script specifying the interpreter path #!/proc/self/exe. As such when /bin/bash is executed inside the container, instead the target of /proc/self/exe will be executed. That magic link will point to the runc binary on the host. The attacker can then proceed to write to the target of /proc/self/exe to try and overwrite the runC binary on the host. However, this will not succeed because of deny_write_access(). Now, one might think that this would prevent the attack but it doesn't. To overcome this, the attacker has multiple ways: * Open a file descriptor to /proc/self/exe using the O_PATH flag and then proceed to reopen the binary as O_WRONLY through /proc/self/fd/ and try to write to it in a busy loop from a separate process. Ultimately it will succeed when the runC binary exits. After this the runC binary is compromised and can be used to attack other containers or the host itself. * Use a malicious shared library annotating a function in there with the constructor attribute making the malicious function run as an initializor. The malicious library will then open /proc/self/exe for creating a new entry under /proc/self/fd/. It'll then call exec to a) force runC to exit and b) hand the file descriptor off to a program that then reopens /proc/self/fd/ for writing (which is now possible because runC has exited) and overwriting that binary. To sum up: the deny_write_access() mechanism doesn't prevent such attacks in insecure setups. It just makes them minimally harder. That's all. The only way back then to prevent this is to create a temporary copy of the calling binary itself when it starts or attaches to containers. So what I did back then for LXC (and Aleksa for runC) was to create an anonymous, in-memory file using the memfd_create() system call and to copy itself into the temporary in-memory file, which is then sealed to prevent further modifications. This sealed, in-memory file copy is then executed instead of the original on-disk binary. Any compromising write operations from a privileged container to the host binary will then write to the temporary in-memory binary and not to the host binary on-disk, preserving the integrity of the host binary. Also as the temporary, in-memory binary is sealed, writes to this will also fail. The point is that deny_write_access() is uselss to prevent these attacks. (3) Denying write access to an inode because it's currently used in an exec path could easily be done on an LSM level. It might need an additional hook but that should be about it. (4) The MAP_DENYWRITE flag for mmap() has been deprecated a long time ago so while we do protect the main executable the bigger portion of the things you'd think need protecting such as the shared libraries aren't. IOW, we let anyone happily overwrite shared libraries. (5) We removed all remaining uses of VM_DENYWRITE in [2]. That means: (5.1) We removed the legacy uselib() protection for preventing overwriting of shared libraries. Nobody cared in 3 years. (5.2) We allow write access to the elf interpreter after exec completed treating it on a par with shared libraries. Yes, someone in userspace could potentially be relying on this. It's not completely out of the realm of possibility but let's find out if that's actually the case and not guess. Link: https://github.com/golang/go/issues/22315 [1] Link: 49624efa65ac ("Merge tag 'denywrite-for-5.15' of git://github.com/davidhildenbrand/linux") [2] Link: https://unit42.paloaltonetworks.com/breaking-docker-via-runc-explaining-cve-2019-5736 [3] Link: https://lwn.net/Articles/866493 Link: https://github.com/golang/go/issues/22220 Link: https://github.com/golang/go/blob/5bf8c0cf09ee5c7e5a37ab90afcce154ab716a97/src/cmd/go/internal/work/buildid.go#L724 Link: https://github.com/golang/go/blob/5bf8c0cf09ee5c7e5a37ab90afcce154ab716a97/src/cmd/go/internal/work/exec.go#L1493 Link: https://github.com/golang/go/blob/5bf8c0cf09ee5c7e5a37ab90afcce154ab716a97/src/cmd/go/internal/script/cmds.go#L457 Link: https://github.com/golang/go/blob/5bf8c0cf09ee5c7e5a37ab90afcce154ab716a97/src/cmd/go/internal/test/test.go#L1557 Link: https://github.com/golang/go/blob/5bf8c0cf09ee5c7e5a37ab90afcce154ab716a97/src/os/exec/lp_linux_test.go#L61 Link: https://github.com/buildkite/agent/pull/2736 Link: https://github.com/rust-lang/rust/issues/114554 Link: https://bugs.openjdk.org/browse/JDK-8068370 Link: https://github.com/dotnet/runtime/issues/58964 Link: https://lore.kernel.org/r/20240531-vfs-i_writecount-v1-1-a17bea7ee36b@kernel.org Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 0da27ed080b2c25680fb42105f3d85c0ebe38b0c Author: Thomas Richard Date: Tue Apr 16 14:52:37 2024 +0200 phy: cadence-torrent: add suspend and resume support Add suspend and resume support. The already_configured flag is cleared during the suspend stage to force the PHY initialization during the resume stage. Co-developed-by: Théo Lebrun Signed-off-by: Théo Lebrun Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-8-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit 992f03ff8661bb0427f1db59c283f3fa63182b09 Author: Thorsten Blum Date: Sun Jun 2 02:47:30 2024 +0200 readdir: Add missing quote in macro comment Add a missing double quote in the unsafe_copy_dirent_name() macro comment. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240602004729.229634-2-thorsten.blum@toblux.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit c12c0bb031cbaccf4f7d375db466b6457453bfa8 Author: Thorsten Blum Date: Sun Jun 2 12:15:35 2024 +0200 readdir: Remove unused header include Since commit c512c6918719 ("uaccess: implement a proper unsafe_copy_to_user() and switch filldir over to it") the header file is no longer needed. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240602101534.348159-2-thorsten.blum@toblux.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 81472a55edce473cfc22b340c1026c6d5219ccfe Author: Thomas Richard Date: Tue Apr 16 14:52:36 2024 +0200 phy: cadence-torrent: remove noop_ops phy operations Even if a PHY is already configured, the PHY operations are needed during resume stage, as the PHY is in reset state. The noop_ops PHY operations is removed to always have PHY operations. The already_configured flag is checked at the begening of init, configure and poweron operations to keep the already_configured behaviour. Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-7-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit d4f24d14f311b9a1af57c9726d5a3acbfa8282db Author: Thomas Richard Date: Tue Apr 16 14:52:35 2024 +0200 phy: cadence-torrent: add already_configured to struct cdns_torrent_phy Add already_configured to struct cdns_torrent_phy, so it can be used at differents stages. Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-6-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit 8512b6873461c4d31f89c3260a2d5043b3f9dbb2 Author: Thomas Richard Date: Tue Apr 16 14:52:34 2024 +0200 phy: cadence-torrent: register resets even if the phy is already configured Resets are needed during suspend and resume stages. So they shall be registered during the probe even the phy is already initialized. The function cdns_torrent_reset is renamed cdns_torrent_of_get_reset() to make it clear. Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-5-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit c2286092424bf5f889f302669580fd6862967a49 Author: Thomas Richard Date: Tue Apr 16 14:52:33 2024 +0200 phy: cadence-torrent: extract calls to clk_get from cdns_torrent_clk Extract calls to clk_get from cdns_torrent_clk into a separate function. It needs to call cdns_torrent_clk at resume without looking up the clock. Co-developed-by: Théo Lebrun Signed-off-by: Théo Lebrun Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-4-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit b5539abdd013fd3f77633413848c93f8ec84b51d Author: Thomas Richard Date: Tue Apr 16 14:52:32 2024 +0200 phy: ti: phy-j721e-wiz: add resume support Add resume support. It has been tested on J7200 SR1.0 and SR2.0. Co-developed-by: Théo Lebrun Signed-off-by: Théo Lebrun Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-3-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit 3c4e13cf9ead79fac3b217e228c1c7d3db3e132f Author: Thomas Richard Date: Tue Apr 16 14:52:31 2024 +0200 phy: ti: phy-j721e-wiz: split wiz_clock_init() function The wiz_clock_init() function mixes probe and hardware configuration. Rename the wiz_clock_init() to wiz_clock_probe() and move the hardware configuration part in a new function named wiz_clock_init(). This hardware configuration sequence must be called during the resume stage of the driver. Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-2-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit 5aa4733b1b9324e224ebe59e3672887a57d51083 Author: Thomas Richard Date: Tue Apr 16 14:52:30 2024 +0200 phy: ti: phy-j721e-wiz: use dev_err_probe() instead of dev_err() Use dev_err_probe() instead of dev_err() in wiz_clock_init() to simplify the code and standardize the error output. Signed-off-by: Thomas Richard Link: https://lore.kernel.org/r/20240412-j7200-phy-s2r-v1-1-f15815833974@bootlin.com Signed-off-by: Vinod Koul commit bba474656dd85b13e4c5d5bdb73ca08d9136df21 Author: Pavel Löbl Date: Wed Mar 20 07:10:19 2024 +0100 ARM: dts: sunxi: remove duplicated entries in makefile During introduction of DTS vendor subdirectories in 724ba6751532, sun8i section of the makefile got duplicated. Clean that up. Fixes: 724ba6751532 ("ARM: dts: Move .dts files to vendor sub-directories") Signed-off-by: Pavel Löbl Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20240320061027.4078852-1-pavel@loebl.cz Signed-off-by: Chen-Yu Tsai commit 54018131e663a1df05021fcb22a18d6c5ebef734 Author: Mateusz Guzik Date: Sun Jun 2 14:37:19 2024 +0200 vfs: replace WARN(down_read_trylock, ...) abuse with proper asserts Note the macro used here works regardless of LOCKDEP. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20240602123720.775702-1-mjguzik@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 7d5ebb62d72b5ea8a21fc62c8985dacae6a71ca8 Author: Swapnil Jakhade Date: Sun Jun 2 07:46:29 2024 +0530 phy: cadence-torrent: Add SGMII + QSGMII multilink configuration for 100MHz refclk Add register sequences for SGMII + QSGMII multilink configuration for 100MHz refclk. Signed-off-by: Swapnil Jakhade Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240602021629.3027660-1-s-vadapalli@ti.com Signed-off-by: Vinod Koul commit c819e252c2874479b27f6a356b44f8aa73cf5a81 Author: Jeff Johnson Date: Wed May 29 14:25:41 2024 -0700 sysctl: Add module description to sysctl-testing Added a module description to sysctl Kunit self test module to fix the 'make W=1' warning (" WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/sysctl-test.o") Signed-off-by: Jeff Johnson Signed-off-by: Joel Granados commit b9c6dd7aab6143f78078481a537365dd519c9aa4 Merge: c591745831e75 23dc5f7e181a3 Author: Jerome Brunet Date: Mon Jun 3 15:17:53 2024 +0200 Merge branch 'v6.11/bindings' into v6.11/drivers * v6.11/bindings: dt-bindings: clock: meson: Convert axg-audio-clkc to YAML format commit 32fe91524e1651b9a0e11ddfbc63de9aa485cf48 Author: Thomas Weißschuh Date: Mon May 13 11:25:18 2024 +0200 sysctl: constify ctl_table arguments of utility function In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh Reviewed-by: Kees Cook Signed-off-by: Joel Granados commit 22767241e64427bbcffea2e2d51531ab467bc4ef Author: Karthikeyan Periyasamy Date: Thu May 30 18:56:52 2024 +0300 wifi: ath12k: add hw_link_id in ath12k_pdev Currently, hw_link_id is sent in WMI service ready event but it is not parsed anywhere. But, in future, for multi-link operation, this parameter would be needed by many WMI commands such as WMI beacon template (WMI_BCN_TMPL_CMDID), WMI vdev start for Multi-link virtual AP interfaces (WMI_VDEV_START_REQUEST_CMDID), WMI peer assoc command (WMI_PEER_ASSOC_CMDID) for Multi-link peer and so on. Hence, add changes to parse and store the hw_link_id received in WMI service ready event in ath12k_pdev structure. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Harshitha Prem Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529054955.4105240-1-quic_hprem@quicinc.com commit 4154342bf153a6c2a2820e3d517188d7c76f7055 Author: Thomas Weißschuh Date: Sat May 18 15:53:40 2024 +0200 utsname: constify ctl_table arguments of utility function The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Reviewed-by: Joel Granados Signed-off-by: Joel Granados commit b5ffbd1396885f76bf87e67d590a3ef063e6d831 Author: Wen Yang Date: Fri Apr 19 11:36:39 2024 +0800 sysctl: move the extra1/2 boundary check of u8 to sysctl_check_table_array Move boundary checking for proc_dou8ved_minmax into module loading, thereby reporting errors in advance. And add a kunit test case ensuring the boundary check is done correctly. The boundary check in proc_dou8vec_minmax done to the extra elements in the ctl_table struct is currently performed at runtime. This allows buggy kernel modules to be loaded normally without any errors only to fail when used. This is a buggy example module: #include #include #include static struct ctl_table_header *_table_header = NULL; static unsigned char _data = 0; struct ctl_table table[] = { { .procname = "foo", .data = &_data, .maxlen = sizeof(u8), .mode = 0644, .proc_handler = proc_dou8vec_minmax, .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE_THOUSAND, }, }; static int init_demo(void) { _table_header = register_sysctl("kernel", table); if (!_table_header) return -ENOMEM; return 0; } module_init(init_demo); MODULE_LICENSE("GPL"); And this is the result: # insmod test.ko # cat /proc/sys/kernel/foo cat: /proc/sys/kernel/foo: Invalid argument Suggested-by: Joel Granados Signed-off-by: Wen Yang Cc: Luis Chamberlain Cc: Kees Cook Cc: Joel Granados Cc: Eric W. Biederman Cc: Christian Brauner Cc: linux-kernel@vger.kernel.org Reviewed-by: Joel Granados Signed-off-by: Joel Granados commit 98ca62ba9e2be5863c7d069f84f7166b45a5b2f4 Author: Thomas Weißschuh Date: Tue Apr 2 23:10:34 2024 +0200 sysctl: always initialize i_uid/i_gid Always initialize i_uid/i_gid inside the sysfs core so set_ownership() can safely skip setting them. Commit 5ec27ec735ba ("fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes.") added defaults for i_uid/i_gid when set_ownership() was not implemented. It also missed adjusting net_ctl_set_ownership() to use the same default values in case the computation of a better value failed. Fixes: 5ec27ec735ba ("fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes.") Cc: stable@vger.kernel.org Signed-off-by: Thomas Weißschuh Signed-off-by: Joel Granados commit 809055628bce824b7fe18331abb65e44d02b0ecf Author: Baochen Qiang Date: Thu May 30 18:56:52 2024 +0300 wifi: ath12k: add panic handler Currently for ath12k PCI devices, firmware could be running in one of several execution environments, e.g., PBL, SBL and mission mode etc. Among which PBL is the only stage where PCIe link negotiation could happen. So normally firmware runs in PBL in order to be enumerated during system reboot. However it might not work in kernel crash scenario: ath12k target is not found after warm reboot from kernel crash. This is because when kernel crashes, ath12k host does nothing to firmware. And during warm reboot, WLAN power is sustained. So firmware is likely to keep running in mission mode throughout the bootup process. As a result PCIe link is not established and thus target not enumerated. So add a handler in panic notification list for ath12k. When kernel crashes, this handler gets called and tries to reset target to PBL state. Then PCIe link negotiation could happen and target gets enumerated. This change applies to all PCI devices including WCN7850 and QCN9274. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529021533.10861-1-quic_bqiang@quicinc.com commit 9b5fd115e7d5a98b82054cff5c96f6768ee06845 Author: Pierre-Louis Bossart Date: Mon Jun 3 15:02:40 2024 +0800 soundwire: intel_ace2.x: add AC timing extensions for PantherLake The ACE3 IP used in PantherLake exposes new bitfields in the ACTMCTL register to better control clocks/delays. These bitfields were reserved/zero in the ACE2.x IP, to simplify the integration the new bifields are added unconditionally. The behavior will only be impacted when the firmware exposes DSD properties to set non-zero values. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20240603070240.5165-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a5b7365f28c191df6b93f60942d2b9a9fe71746c Author: Pierre-Louis Bossart Date: Mon Jun 3 14:58:41 2024 +0800 soundwire: bus: add stream refcount The notion of stream is by construction based on a multi-bus capability, to allow for aggregation of Peripheral devices or functions located on different segments. We currently count how many master_rt contexts are used by a stream, but we don't have the dual refcount of how many streams are allocated on a given bus. This refcount will be useful to check if BTP/BRA streams can be allocated. Note that the stream_refcount is modified in sdw_master_rt_alloc() and sdw_master_rt_free() which are both called with the bus_lock mutex held, so there's no need for refcount_ primitives for additional protection. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20240603065841.4860-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit fe46d2a4301de1299fb32c0317ec316706ceaad6 Author: Pierre-Louis Bossart Date: Mon Jun 3 14:58:40 2024 +0800 soundwire: debugfs: add interface to read/write commands We have an existing debugfs files to read standard registers (DP0/SCP/DPn). This patch provides a more generic interface to ANY set of read/write contiguous registers in a peripheral device. In follow-up patches, this interface will be extended to use BRA transfers. The sequence is to use the following files added under the existing debugsfs directory for each peripheral device: command (write 0, read 1) num_bytes start_address firmware_file (only for writes) read_buffer (only for reads) Example for a read command - this checks the 6 bytes used for enumeration. cd /sys/kernel/debug/soundwire/master-0-0/sdw\:0\:025d\:0711\:01/ echo 1 > command echo 6 > num_bytes echo 0x50 > start_address echo 1 > go cat read_buffer address 0x50 val 0x30 address 0x51 val 0x02 address 0x52 val 0x5d address 0x53 val 0x07 address 0x54 val 0x11 address 0x55 val 0x01 Example with a 2-byte firmware file written in DP0 address 0x22 od -x /lib/firmware/test_firmware 0000000 0a37 0000002 cd /sys/kernel/debug/soundwire/master-0-0/sdw\:0\:025d\:0711\:01/ echo 0 > command echo 2 > num_bytes echo 0x22 > start_address echo "test_firmware" > firmware_file echo 1 > go cd /sys/kernel/debug/soundwire/master-0-0/sdw\:0\:025d\:0711\:01/ echo 1 > command echo 2 > num_bytes echo 0x22 > start_address echo 1 > go cat read_buffer address 0x22 val 0x37 address 0x23 val 0x0a Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20240603065841.4860-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e1f288d2f9c69bb8965db9fb99a19b58231a00dd Author: Gautam Menghani Date: Mon May 20 23:27:40 2024 +0530 KVM: PPC: Book3S HV nestedv2: Add support for reading VPA counters for pseries guests PAPR hypervisor has introduced three new counters in the VPA area of LPAR CPUs for KVM L2 guest (see [1] for terminology) observability - two for context switches from host to guest and vice versa, and one counter for getting the total time spent inside the KVM guest. Add a tracepoint that enables reading the counters for use by ftrace/perf. Note that this tracepoint is only available for nestedv2 API (i.e, KVM on PowerVM). [1] Terminology: a. L1 refers to the VM (LPAR) booted on top of PAPR hypervisor b. L2 refers to the KVM guest booted on top of L1. Reviewed-by: Nicholas Piggin Acked-by: Naveen N Rao Signed-off-by: Vaibhav Jain Signed-off-by: Gautam Menghani Signed-off-by: Michael Ellerman Link: https://msgid.link/20240520175742.196329-1-gautam@linux.ibm.com commit 83042ce9b7c39b0e64094d86a70d62392ac21a06 Merge: 93e30878f7ecd a4303941c6f39 Author: David S. Miller Date: Mon Jun 3 13:06:16 2024 +0100 Merge branch 'Felix-DSA-probing-cleanup' Vladimir Oltean says: ==================== Probing cleanup for the Felix DSA driver This is a follow-up to Russell King's request for code consolidation among felix_vsc9959, seville_vsc9953 and ocelot_ext, stated here: https://lore.kernel.org/all/Zh1GvcOTXqb7CpQt@shell.armlinux.org.uk/ Details are in individual patches. Testing was done on NXP LS1028A (felix_vsc9959). ==================== Signed-off-by: David S. Miller commit a4303941c6f399816eac0a56c627008a41c9336d Author: Vladimir Oltean Date: Thu May 30 19:33:33 2024 +0300 net: dsa: ocelot: unexport felix_phylink_mac_ops and felix_switch_ops Now that the common felix_register_switch() from the umbrella driver is the only entity that accesses these data structures, we can remove them from the list of the exported symbols. Signed-off-by: Vladimir Oltean Reviewed-by: Sai Krishna Signed-off-by: David S. Miller commit efdbee7d07916d994bc0ff0235d00d46fa991b61 Author: Vladimir Oltean Date: Thu May 30 19:33:32 2024 +0300 net: dsa: ocelot: common probing code Russell King suggested that felix_vsc9959, seville_vsc9953 and ocelot_ext have a large portion of duplicated init code, which could be made common [1]. [1]: https://lore.kernel.org/all/Zh1GvcOTXqb7CpQt@shell.armlinux.org.uk/ Here, we take the following common steps: - "felix" and "ds" structure allocation - "felix", "ocelot" and "ds" basic structure initialization - dsa_register_switch() call and we make a common function out of them. For every driver except felix_vsc9959, this is also the entire probing procedure. For felix_vsc9959, we also need to do some PCI-specific stuff, which can easily be reordered to be done before, and unwound on failure. We also have to convert the bus-specific platform_set_drvdata() and pci_set_drvdata() calls into dev_set_drvdata(). But this should have no impact on the behavior. Suggested-by: "Russell King (Oracle)" Signed-off-by: Vladimir Oltean Tested-by: Colin Foster Signed-off-by: David S. Miller commit 4ca54dd96eca57adea961c0e6cca28bf76168429 Author: Vladimir Oltean Date: Thu May 30 19:33:31 2024 +0300 net: dsa: ocelot: use ds->num_tx_queues = OCELOT_NUM_TC for all models Russell King points out that seville_vsc9953 populates felix->info->num_tx_queues = 8, but this doesn't make it all the way into ds->num_tx_queues (which is how the user interface netdev queues get allocated) [1]. [1]: https://lore.kernel.org/all/20240415160150.yejcazpjqvn7vhxu@skbuf/ When num_tx_queues=0 for seville, this is implicitly converted to 1 by dsa_user_create(), and this is good enough for basic operation for a switch port. The tc qdisc offload layer works with netdev TX queues, so for QoS offload we need to pretend we have multiple TX queues. The VSC9953, like ocelot_ext, doesn't export QoS offload, so it doesn't really matter. But we can definitely set num_tx_queues=8 for all switches. The felix->info->num_tx_queues construct itself seems unnecessary. It was introduced by commit de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload") at a time when vsc9959 (LS1028A) was the only switch supported by the driver. 8 traffic classes, and 1 queue per traffic class, is a common architectural feature of all switches in the family. So they could all just set OCELOT_NUM_TC and be fine. Signed-off-by: Vladimir Oltean Reviewed-by: Colin Foster Tested-by: Colin Foster Signed-off-by: David S. Miller commit 0367a1775933aab80a99ebc91a14efbcaaa45a00 Author: Vladimir Oltean Date: Thu May 30 19:33:30 2024 +0300 net: dsa: ocelot: move devm_request_threaded_irq() to felix_setup() The current placement of devm_request_threaded_irq() is inconvenient. It is between the allocation of the "felix" structure and dsa_register_switch(), both of which we'd like to refactor into a function that's common for all switches. But the IRQ is specific to felix_vsc9959. A closer inspection of the felix_irq_handler() code suggests that it does things that depend on the data structures having been fully initialized. For example, ocelot_get_txtstamp() takes &port->tx_skbs.lock, which has only been initialized in ocelot_init_port() which has not run yet. It is not one of those IRQF_SHARED IRQs, so CONFIG_DEBUG_SHIRQ_FIXME shouldn't apply here, and thus, it doesn't really matter, because in practice, the IRQ will not be triggered so early. Nonetheless, it is a good practice for the driver to be prepared for it to fire as soon as it is requested. Create a new felix->info method for running custom code for vsc9959 from within felix_setup(), and move the request_irq() call there. The ocelot_ext should have an IRQ as well, so this should be a step in the right direction for that model (VSC7512) as well. Some minor changes are made while moving the code. Casts from void * aren't necessary, so drop them, and rename felix_irq_handler() to the more specific vsc9959_irq_handler(). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4510bbd38cbef7e6fc1a786f3e0213ba07fe0a00 Author: Vladimir Oltean Date: Thu May 30 19:33:29 2024 +0300 net: dsa: ocelot: consistently use devres in felix_pci_probe() Russell King suggested that felix_vsc9959, seville_vsc9953 and ocelot_ext have a large portion of duplicated init and teardown code, which could be made common [1]. The teardown code could even be simplified away if we made use of devres, something which is used here and there in the felix driver, just not very consistently. [1] https://lore.kernel.org/all/Zh1GvcOTXqb7CpQt@shell.armlinux.org.uk/ Prepare the ground in the felix_vsc9959 driver, by allocating the data structures using devres and deleting the kfree() calls. This also deletes the "Failed to allocate ..." message, since memory allocation errors are extremely loud anyway, and it's hard to miss them. Suggested-by: "Russell King (Oracle)" Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cc711c523da7280c3bb01ec726596154f5af9798 Author: Vladimir Oltean Date: Thu May 30 19:33:28 2024 +0300 net: dsa: ocelot: delete open coded status = "disabled" parsing Since commit 6fffbc7ae137 ("PCI: Honor firmware's device disabled status"), PCI device drivers with OF bindings no longer need this check. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 90ee9a5b49cea302b666217068e52e0bb325304d Author: Vladimir Oltean Date: Thu May 30 19:33:27 2024 +0300 net: dsa: ocelot: use devres in seville_probe() Russell King suggested that felix_vsc9959, seville_vsc9953 and ocelot_ext have a large portion of duplicated init and teardown code, which could be made common [1]. The teardown code could even be simplified away if we made use of devres, something which is used here and there in the felix driver, just not very consistently. [1] https://lore.kernel.org/all/Zh1GvcOTXqb7CpQt@shell.armlinux.org.uk/ Prepare the ground in the seville_vsc9953 driver, by allocating the data structures using devres and deleting the kfree() calls. This also deletes the "Failed to allocate ..." message, since memory allocation errors are extremely loud anyway, and it's hard to miss them. Suggested-by: "Russell King (Oracle)" Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 454cfffe8dc112f1ed3966923f5dccdafa3bebf2 Author: Vladimir Oltean Date: Thu May 30 19:33:26 2024 +0300 net: dsa: ocelot: use devres in ocelot_ext_probe() Russell King suggested that felix_vsc9959, seville_vsc9953 and ocelot_ext have a large portion of duplicated init and teardown code, which could be made common [1]. The teardown code could even be simplified away if we made use of devres, something which is used here and there in the felix driver, just not very consistently. [1] https://lore.kernel.org/all/Zh1GvcOTXqb7CpQt@shell.armlinux.org.uk/ Prepare the ground in the ocelot_ext driver, by allocating the data structures using devres and deleting the kfree() calls. This also deletes the "Failed to allocate ..." message, since memory allocation errors are extremely loud anyway, and it's hard to miss them. Suggested-by: "Russell King (Oracle)" Signed-off-by: Vladimir Oltean Reviewed-by: Colin Foster Tested-by: Colin Foster Signed-off-by: David S. Miller commit 22aaae482044b8bfa11f2c2d5725f4cd1b3064f9 Merge: 4ccaf60062c36 c3f38fa61af77 Author: Mark Brown Date: Mon Jun 3 12:59:34 2024 +0100 spi: Merge up fixes We need these to get the i.MX8 boards working in CI again. commit 0ae747759930186fbc3ab470ac4e40899c52438c Merge: a8bd778958efa c3f38fa61af77 Author: Mark Brown Date: Mon Jun 3 12:59:25 2024 +0100 regmap: Merge up fixes We need these to get the i.MX8 boards working in CI again. commit 23dc5f7e181a3a2e87dde5f31937560be012baea Author: Alexander Stein Date: Tue May 14 01:45:52 2024 +0300 dt-bindings: clock: meson: Convert axg-audio-clkc to YAML format Convert Amlogic AXG Audio Clock Controller binding to yaml. Signed-off-by: Alexander Stein Signed-off-by: Jan Dakinevich Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240513224552.800153-1-jan.dakinevich@salutedevices.com Signed-off-by: Jerome Brunet commit 4894c364d502d44d7979d272aa49e3ffaf12f05c Author: Andy Shevchenko Date: Sun Jun 2 11:57:59 2024 +0300 platform/x86: thinkpad_acpi: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240602090244.1666360-7-andy.shevchenko@gmail.com Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 31edc07e4fa5d443e19c7912de91eb9c0555b231 Author: Andy Shevchenko Date: Sun Jun 2 11:57:58 2024 +0300 platform/x86: think-lmi: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240602090244.1666360-6-andy.shevchenko@gmail.com Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 9a3291e930b0dba1efcdc2d0bd03626e97d7cc56 Author: Andy Shevchenko Date: Sun Jun 2 11:57:57 2024 +0300 platform/x86: serial-multi-instantiate: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240602090244.1666360-5-andy.shevchenko@gmail.com Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 914d906aec96fc1881060b20f0d017a0f0f5ce5d Author: Andy Shevchenko Date: Sun Jun 2 11:57:56 2024 +0300 platform/x86: intel: chtwc_int33fe: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240602090244.1666360-4-andy.shevchenko@gmail.com Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit c5288cda69ee2d8607f5026bd599a5cebf0ee783 Author: Andy Shevchenko Date: Sun Jun 2 11:57:55 2024 +0300 platform/x86: hp: hp-bioscfg: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240602090244.1666360-3-andy.shevchenko@gmail.com Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 057e025a4f1c6f8612ddf19e621cf1b7c2e53c61 Author: Andy Shevchenko Date: Sun Jun 2 11:57:54 2024 +0300 platform/x86: asus-tf103c-dock: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240602090244.1666360-2-andy.shevchenko@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 8832266dae4f4b401fedce537448bf0cda233b1a Merge: f31f012d799cb c3f38fa61af77 Author: Mark Brown Date: Mon Jun 3 12:45:28 2024 +0100 regulator: Merge up fixes We need these to get the i.MX8 boards working in CI again. commit 4ac0f06ca044e3ca938681a0eeb7d52a68b0b30f Merge: 34864c05a54d1 c3f38fa61af77 Author: Mark Brown Date: Mon Jun 3 12:45:04 2024 +0100 ASoC: Merge up fixes We need this to get the i.MX platforms working in CI again. commit 93e30878f7ecd775cb6e1e5aeed30d947a6cebad Merge: b5c089880723b 2f4b101c542e1 Author: David S. Miller Date: Mon Jun 3 12:12:42 2024 +0100 Merge branch 'net-smc-snd_buf-rcv_buf' Guangguan Wang says: ==================== net/smc: Change the upper boundary of SMC-R's snd_buf and rcv_buf to 512MB SMCR_RMBE_SIZES is the upper boundary of SMC-R's snd_buf and rcv_buf. The maximum bytes of snd_buf and rcv_buf can be calculated by 2^SMCR_ RMBE_SIZES * 16KB. SMCR_RMBE_SIZES = 5 means the upper boundary is 512KB. TCP's snd_buf and rcv_buf max size is configured by net.ipv4.tcp_w/rmem[2] whose default value is 4MB or 6MB, is much larger than SMC-R's upper boundary. In some scenarios, such as Recommendation System, the communication pattern is mainly large size send/recv, where the size of snd_buf and rcv_buf greatly affects performance. Due to the upper boundary disadvantage, SMC-R performs poor than TCP in those scenarios. So it is time to enlarge the upper boundary size of SMC-R's snd_buf and rcv_buf, so that the SMC-R's snd_buf and rcv_buf can be configured to larger size for performance gain in such scenarios. The SMC-R rcv_buf's size will be transferred to peer by the field rmbe_size in clc accept and confirm message. The length of the field rmbe_size is four bits, which means the maximum value of SMCR_RMBE_SIZES is 15. In case of frequently adjusting the value of SMCR_RMBE_SIZES in different scenarios, set the value of SMCR_RMBE_SIZES to the maximum value 15, which means the upper boundary of SMC-R's snd_buf and rcv_buf is 512MB. As the real memory usage is determined by the value of net.smc.w/rmem, not by the upper boundary, set the value of SMCR_RMBE_SIZES to the maximum value has no side affects. ==================== Signed-off-by: David S. Miller commit 2f4b101c542e102c680d136fc6dca081e3fbda4a Author: Guangguan Wang Date: Mon Jun 3 11:00:19 2024 +0800 net/smc: change SMCR_RMBE_SIZES from 5 to 15 SMCR_RMBE_SIZES is the upper boundary of SMC-R's snd_buf and rcv_buf. The maximum bytes of snd_buf and rcv_buf can be calculated by 2^SMCR_ RMBE_SIZES * 16KB. SMCR_RMBE_SIZES = 5 means the upper boundary is 512KB. TCP's snd_buf and rcv_buf max size is configured by net.ipv4.tcp_w/rmem[2] whose default value is 4MB or 6MB, is much larger than SMC-R's upper boundary. In some scenarios, such as Recommendation System, the communication pattern is mainly large size send/recv, where the size of snd_buf and rcv_buf greatly affects performance. Due to the upper boundary disadvantage, SMC-R performs poor than TCP in those scenarios. So it is time to enlarge the upper boundary size of SMC-R's snd_buf and rcv_buf, so that the SMC-R's snd_buf and rcv_buf can be configured to larger size for performance gain in such scenarios. The SMC-R rcv_buf's size will be transferred to peer by the field rmbe_size in clc accept and confirm message. The length of the field rmbe_size is four bits, which means the maximum value of SMCR_RMBE_SIZES is 15. In case of frequently adjusting the value of SMCR_RMBE_SIZES in different scenarios, set the value of SMCR_RMBE_SIZES to the maximum value 15, which means the upper boundary of SMC-R's snd_buf and rcv_buf is 512MB. As the real memory usage is determined by the value of net.smc.w/rmem, not by the upper boundary, set the value of SMCR_RMBE_SIZES to the maximum value has no side affects. Signed-off-by: Guangguan Wang Co-developed-by: Wen Gu Signed-off-by: Wen Gu Signed-off-by: David S. Miller commit 3ac14b9dfbd345e891d48d89f6c2fa519848f0f4 Author: Guangguan Wang Date: Mon Jun 3 11:00:18 2024 +0800 net/smc: set rmb's SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined SG_MAX_SINGLE_ALLOC is used to limit maximum number of entries that will be allocated in one piece of scatterlist. When the entries of scatterlist exceeds SG_MAX_SINGLE_ALLOC, sg chain will be used. From commit 7c703e54cc71 ("arch: switch the default on ARCH_HAS_SG_CHAIN"), we can know that the macro CONFIG_ARCH_NO_SG_CHAIN is used to identify whether sg chain is supported. So, SMC-R's rmb buffer should be limited by SG_MAX_SINGLE_ALLOC only when the macro CONFIG_ARCH_NO_SG_CHAIN is defined. Fixes: a3fe3d01bd0d ("net/smc: introduce sg-logic for RMBs") Signed-off-by: Guangguan Wang Co-developed-by: Wen Gu Signed-off-by: Wen Gu Signed-off-by: David S. Miller commit 9b003e14801cf85a8cebeddc87bc9fc77100fdce Author: Jay Buddhabhatti Date: Wed May 15 04:23:45 2024 -0700 drivers: soc: xilinx: check return status of get_api_version() Currently return status is not getting checked for get_api_version and because of that for x86 arch we are getting below smatch error. CC drivers/soc/xilinx/zynqmp_power.o drivers/soc/xilinx/zynqmp_power.c: In function 'zynqmp_pm_probe': drivers/soc/xilinx/zynqmp_power.c:295:12: warning: 'pm_api_version' is used uninitialized [-Wuninitialized] 295 | if (pm_api_version < ZYNQMP_PM_VERSION) | ^ CHECK drivers/soc/xilinx/zynqmp_power.c drivers/soc/xilinx/zynqmp_power.c:295 zynqmp_pm_probe() error: uninitialized symbol 'pm_api_version'. So, check return status of pm_get_api_version and return error in case of failure to avoid checking uninitialized pm_api_version variable. Fixes: b9b3a8be28b3 ("firmware: xilinx: Remove eemi ops for get_api_version") Signed-off-by: Jay Buddhabhatti Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240515112345.24673-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek commit 494c55a1ec0ab40198cf43f5a41c7c5e0b70e7fc Author: Ronak Jain Date: Thu Apr 25 02:59:13 2024 -0700 firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h Move FIRMWARE_VERSION_MASK macro to xlnx-zynqmp.h so that other drivers can use it for verifying the supported firmware version. Signed-off-by: Ronak Jain Signed-off-by: Anand Ashok Dumbre Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/20240425095913.919390-1-ronak.jain@amd.com Signed-off-by: Michal Simek commit fcf544ac64397776a18246eba5a8ca72a47c4405 Author: Jay Buddhabhatti Date: Wed Apr 24 05:49:00 2024 -0700 soc: xilinx: Add cb event for subsystem restart Add support to register subsystem restart events from firmware for Versal and Versal NET platforms. This event is received when firmware requests for subsystem restart. After receiving this event, the kernel needs to be restarted. Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20240424124900.29287-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek commit 4a95449dd975e2ea6629a034f3e74b46c9634916 Author: Jay Buddhabhatti Date: Mon Apr 8 04:06:10 2024 -0700 soc: xilinx: rename cpu_number1 to dummy_cpu_number The per cpu variable cpu_number1 is passed to xlnx_event_handler as argument "dev_id", but it is not used in this function. So drop the initialization of this variable and rename it to dummy_cpu_number. This patch is to fix the following call trace when the kernel option CONFIG_DEBUG_ATOMIC_SLEEP is enabled: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 preempt_count: 1, expected: 0 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0 #53 Hardware name: Xilinx Versal vmk180 Eval board rev1.1 (QSPI) (DT) Call trace: dump_backtrace+0xd0/0xe0 show_stack+0x18/0x40 dump_stack_lvl+0x7c/0xa0 dump_stack+0x18/0x34 __might_resched+0x10c/0x140 __might_sleep+0x4c/0xa0 __kmem_cache_alloc_node+0xf4/0x168 kmalloc_trace+0x28/0x38 __request_percpu_irq+0x74/0x138 xlnx_event_manager_probe+0xf8/0x298 platform_probe+0x68/0xd8 Fixes: daed80ed0758 ("soc: xilinx: Fix for call trace due to the usage of smp_processor_id()") Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20240408110610.15676-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek commit 56f45266df67aa0f5b2a6881c8c4d16dbfff6b7d Author: Ken Sloat Date: Thu Dec 15 16:07:15 2022 +0000 pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode. This timer HW supports 8, 16 and 32-bit timer widths. This driver currently uses a u32 to store the max possible value of the timer. However, statements perform addition of 2 in xilinx_pwm_apply() when calculating the period_cycles and duty_cycles values. Since priv->max is a u32, this will result in an overflow to 1 which will not only be incorrect but fail on range comparison. This results in making it impossible to set the PWM in this timer mode. There are two obvious solutions to the current problem: 1. Cast each instance where overflow occurs to u64. 2. Change priv->max from a u32 to a u64. Solution #1 requires more code modifications, and leaves opportunity to introduce similar overflows if other math statements are added in the future. These may also go undetected if running in non 32-bit timer modes. Solution #2 is the much smaller and cleaner approach and thus the chosen method in this patch. This was tested on a Zynq UltraScale+ with multiple instances of the PWM IP. Signed-off-by: Ken Sloat Reviewed-by: Michal Simek Reviewed-by: Sean Anderson Link: https://lore.kernel.org/r/SJ0P222MB0107490C5371B848EF04351CA1E19@SJ0P222MB0107.NAMP222.PROD.OUTLOOK.COM Signed-off-by: Michal Simek commit c591745831e75b11ef19fb33c5c5a16e4d3f7fbf Author: Xianwei Zhao Date: Thu May 16 15:16:12 2024 +0800 clk: meson: s4: fix pwm_j_div parent clock Update peripherals pwm_j_div's parent clock to pwm_j_mux Fixes: 57b55c76aaf1 ("clk: meson: S4: add support for Amlogic S4 SoC peripheral clock controller") Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240516071612.2978201-1-xianwei.zhao@amlogic.com Signed-off-by: Jerome Brunet commit c1380adf2e8680a00dedaf1b25c19beadbbe5bbd Author: Xianwei Zhao Date: Mon Jun 3 18:04:33 2024 +0800 clk: meson: s4: fix fixed_pll_dco clock The fixed_pll_dco output frequency is not accurate, add frac factor for fixed_pll_dco clk to fix it. Fixes: 57b55c76aaf1 ("clk: meson: S4: add support for Amlogic S4 SoC peripheral clock controller") Signed-off-by: Xianwei Zhao Link: https://lore.kernel.org/r/20240603-s4_fixedpll-v1-1-2b2a98630841@amlogic.com Signed-off-by: Jerome Brunet commit cb06c9826991c746039d076df10d40819f88a6bc Author: Jinjie Ruan Date: Wed May 29 09:16:28 2024 +0000 genirq/debugfs: Print irqdomain flags as human-readable strings Improve the readability of irqdomain debugging information in debugfs by printing the flags field of domain files as human-readable strings instead of a raw bitmask, which aligned with the existing style used for irqchip flags in the irq debug files. Before: #cat :cpus:cpu@0:interrupt-controller name: :cpus:cpu@0:interrupt-controller size: 0 mapped: 2 flags: 0x00000003 After: #cat :cpus:cpu@0:interrupt-controller name: :cpus:cpu@0:interrupt-controller size: 0 mapped: 3 flags: 0x00000003 IRQ_DOMAIN_FLAG_HIERARCHY IRQ_DOMAIN_NAME_ALLOCATED Signed-off-by: Jinjie Ruan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240529091628.3666379-1-ruanjinjie@huawei.com commit 540588772ed0b191969c7902bf90d561ab0035be Author: Adrian Huang Date: Wed May 15 18:06:32 2024 +0800 genirq/proc: Simplify irqdesc::kstat_irqs handling further Interrupts which have no action and chained interrupts can be ignored due to the following reasons (as per tglx's comment): 1) Interrupts which have no action are completely uninteresting as there is no real information attached. 2) Chained interrupts do not have a count at all. So there is no point to evaluate the number of accounted interrupts before checking for non-requested or chained interrupts. Remove the any_count logic and simply check whether the interrupt descriptor has the kstat_irqs member populated. [ tglx: Adapted to upstream changes ] Suggested-by: Thomas Gleixner Signed-off-by: Adrian Huang Signed-off-by: Thomas Gleixner Tested-by: Jiwei Sun Link: https://lore.kernel.org/r/20240515100632.1419-1-ahuang12@lenovo.com Link: https://lore.kernel.org/lkml/87h6f0knau.ffs@tglx/ commit 02ecee07ca30f76f2a0f1381661a688b8e501ab0 Author: Lakshmi Sowjanya D Date: Mon May 13 16:08:10 2024 +0530 timekeeping: Add function to convert realtime to base clock PPS (Pulse Per Second) generates a hardware pulse every second based on CLOCK_REALTIME. This works fine when the pulse is generated in software from a hrtimer callback function. For hardware which generates the pulse by programming a timer it is required to convert CLOCK_REALTIME to the underlying hardware clock. The X86 Timed IO device is based on the Always Running Timer (ART), which is the base clock of the TSC, which is usually the system clocksource on X86. The core code already has functionality to convert base clock timestamps to system clocksource timestamps, but there is no support for converting the other way around. Provide the required functionality to support such devices in a generic way to avoid code duplication in drivers: 1) ktime_real_to_base_clock() to convert a CLOCK_REALTIME timestamp to a base clock timestamp 2) timekeeping_clocksource_has_base() to allow drivers to validate that the system clocksource is based on a particular clocksource ID. [ tglx: Simplify timekeeping_clocksource_has_base() and add missing READ_ONCE() ] Co-developed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner Co-developed-by: Christopher S. Hall Signed-off-by: Christopher S. Hall Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-10-lakshmi.sowjanya.d@intel.com commit 0f532a789f1b24258043d0f856409d2ab974fb64 Author: Lakshmi Sowjanya D Date: Mon May 13 16:08:09 2024 +0530 x86/tsc: Remove obsolete ART to TSC conversion functions convert_art_to_tsc() and convert_art_ns_to_tsc() interfaces are no longer required. The conversion is now handled by the core code. Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-9-lakshmi.sowjanya.d@intel.com commit d4bea547ebb577a4b4c545a4a81d495cec7eefe1 Author: Thomas Gleixner Date: Mon May 13 16:08:08 2024 +0530 ice/ptp: Remove convert_art_to_tsc() The core code now provides a mechanism to convert the ART base clock to the corresponding TSC value without requiring an architecture specific function. Replace the direct conversion by filling in the required data. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-8-lakshmi.sowjanya.d@intel.com commit b3266ed85f77047a9674100f0da8058750e5bc62 Author: Thomas Gleixner Date: Mon May 13 16:08:07 2024 +0530 ALSA: hda: Remove convert_art_to_tsc() The core code now provides a mechanism to convert the ART base clock to the corresponding TSC value without requiring an architecture specific function. Replace the direct conversion by filling in the required data. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-7-lakshmi.sowjanya.d@intel.com commit f5e1d0db3f02b11a0d1ef433da1fa2c869176c82 Author: Thomas Gleixner Date: Mon May 13 16:08:06 2024 +0530 stmmac: intel: Remove convert_art_to_tsc() The core code now provides a mechanism to convert the ART base clock to the corresponding TSC value without requiring an architecture specific function. Replace the direct conversion by filling in the required data. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-6-lakshmi.sowjanya.d@intel.com commit fcb05911e5832364c5f154b519a471225b34855e Author: Thomas Gleixner Date: Mon May 13 16:08:05 2024 +0530 igc: Remove convert_art_ns_to_tsc() The core code now provides a mechanism to convert the ART base clock to the corresponding TSC value without requiring an architecture specific function. Replace the direct conversion by filling in the required data. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-5-lakshmi.sowjanya.d@intel.com commit bd48b50be50ac5678a7e26c39f6779d7fadf128b Author: Thomas Gleixner Date: Mon May 13 16:08:04 2024 +0530 e1000e: Replace convert_art_to_tsc() The core code now provides a mechanism to convert the ART base clock to the corresponding TSC value without requiring an architecture specific function. Replace the direct conversion by filling in the required data. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-4-lakshmi.sowjanya.d@intel.com commit 3a52886c8f972c3a5b70bfec330c71817cd7fc63 Author: Lakshmi Sowjanya D Date: Mon May 13 16:08:03 2024 +0530 x86/tsc: Provide ART base clock information for TSC The core code provides a new mechanism to allow conversion between ART and TSC. This allows to replace the x86 specific ART/TSC conversion functions. Prepare for removal by filling in the base clock conversion information for ART and associating the base clock to the TSC clocksource. The existing conversion functions will be removed once the usage sites are converted over to the new model. [ tglx: Massaged change log ] Co-developed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner Co-developed-by: Christopher S. Hall Signed-off-by: Christopher S. Hall Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-3-lakshmi.sowjanya.d@intel.com commit 6b2e29977518ec13ef3022f234ff8f3014c243da Author: Lakshmi Sowjanya D Date: Mon May 13 16:08:02 2024 +0530 timekeeping: Provide infrastructure for converting to/from a base clock Hardware time stamps like provided by PTP clock implementations are based on a clock which feeds both the PCIe device and the system clock. For further processing the underlying hardwarre clock timestamp must be converted to the system clock. Right now this requires drivers to invoke an architecture specific conversion function, e.g. to convert the ART (Always Running Timer) timestamp to a TSC timestamp. As the system clock is aware of the underlying base clock, this can be moved to the core code by providing a base clock property for the system clock which contains the conversion factors and assigning a clocksource ID to the base clock. Add the required data structures and the conversion infrastructure in the core code to prepare for converting X86 and the related PTP drivers over. [ tglx: Added a missing READ_ONCE(). Massaged change log ] Co-developed-by: Thomas Gleixner Signed-off-by: Thomas Gleixner Co-developed-by: Christopher S. Hall Signed-off-by: Christopher S. Hall Signed-off-by: Lakshmi Sowjanya D Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240513103813.5666-2-lakshmi.sowjanya.d@intel.com commit 7cbf3b13f00c8341afff1c48ad83d11995842c40 Author: Jeff Johnson Date: Fri May 10 17:24:25 2024 -0700 time: Add MODULE_DESCRIPTION() to time test modules Fix the make W=1 warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/time/clocksource-wdtest.o WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/time/test_udelay.o WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/time/time_test.o Signed-off-by: Jeff Johnson Signed-off-by: Thomas Gleixner Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20240510-time-md-v1-1-44a8a36ac4b0@quicinc.com commit 62ea2eeba7bf11f4b04e080475de93c2f8ee0f92 Author: Ryan Walklin Date: Fri May 31 09:12:15 2024 +1200 drm: panel: nv3052c: Add WL-355608-A8 panel The WL-355608-A8 is a 3.5" 640x480@60Hz RGB LCD display from an unknown OEM used in a number of handheld gaming devices made by Anbernic. Limited information is available online however the panel timing values (below) have been obtained from the vendor BSP. The panel appears to integrate a NV3052C LCD driver (or clone). Available devices address it in SPI/RGB mode, with the timing signals generated from the device SoC (Allwinner H700) and passed through. Add a panel definition and display mode to the existing NV3502C driver. It was assumed during bringup that the initialisation sequence was the same as the existing Fascontek FS035VG158 panel, proved working during experimentation, however subsequent dumping of the init sequence with a logic analyser confirms one small change to VCOM_ADJ3 from 0x4a to 0x44, therefore a separate set of registers is also added. Timings: | Active | FP | Sync | BP | Total -----------|--------|------|------|------|------- Horizontal | 640 | 64 | 20 | 46 | 770 Vertical | 480 | 21 | 4 | 15 | 520 Signed-off-by: Ryan Walklin Co-developed-by: Hironori KIKUCHI Signed-off-by: Hironori KIKUCHI Reviewed-by: John Watts Reviewed-by: Neil Armstrong Acked-by: Jessica Zhang Link: https://lore.kernel.org/r/20240530211415.44201-4-ryan@testtoast.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240530211415.44201-4-ryan@testtoast.com commit 45b888a8980ae9a09fbf2f50b0ffb7505a834533 Author: Ryan Walklin Date: Fri May 31 09:12:14 2024 +1200 dt-bindings: display: panel: Add WL-355608-A8 panel The WL-355608-A8 is a 3.5" 640x480@60Hz RGB LCD display used in a number of handheld gaming devices made by Anbernic. By consensus a vendor prefix is not provided as the panel OEM is unknown. Add a device tree binding for the panel. Signed-off-by: Ryan Walklin Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240530211415.44201-3-ryan@testtoast.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240530211415.44201-3-ryan@testtoast.com commit 4a534428ef8df2e3ca91a8341702f6127fb42867 Author: Sam Ravnborg Date: Thu May 30 23:14:02 2024 +0200 MAINTAINERS: drm: Drop sam as panel reviewer Drop myself as reviewer of panel patches, to reflect the reality. Signed-off-by: Sam Ravnborg Cc: Neil Armstrong Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240530211402.GA1660596@ravnborg.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240530211402.GA1660596@ravnborg.org commit 3a40985960bcab918da23f8945ab0cd3be12d716 Author: Andrew Jeffery Date: Thu May 30 11:09:49 2024 +0930 dt-bindings: gpio: aspeed,sgpio: Specify #interrupt-cells Squash warnings such as: arch/arm/boot/dts/aspeed/aspeed-ast2500-evb.dtb: sgpio@1e780200: '#interrupt-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Also, mark #interrupt-cells as required. The kernel devicetrees already specified it where compatible nodes were defined, and u-boot pulls in the kernel devicetrees, so this should have minimal practical impact. Signed-off-by: Andrew Jeffery Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240530-dt-warnings-gpio-sgpio-interrupt-cells-v2-2-912cd16e641f@codeconstruct.com.au Signed-off-by: Bartosz Golaszewski commit a31517b11bd188527b2f8a4b8fd3e91a10f44d04 Author: Andrew Jeffery Date: Thu May 30 11:09:48 2024 +0930 dt-bindings: gpio: aspeed,sgpio: Specify gpio-line-names Some devicetrees specify gpio-line-names in the sgpio node despite it not being defined by the binding. It's a reasonable thing to do, so define the property to squash warnings such as: arch/arm/boot/dts/aspeed/aspeed-bmc-vegman-rx20.dtb: sgpio@1e780200: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Krzysztof Kozlowski Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20240530-dt-warnings-gpio-sgpio-interrupt-cells-v2-1-912cd16e641f@codeconstruct.com.au Signed-off-by: Bartosz Golaszewski commit 77e1ea9e9913df8c23ac102c9c2b7c49a5d224da Author: Frank Li Date: Fri May 31 12:43:57 2024 -0400 dt-bindings: gpio: mpc8xxx: Convert to yaml format Convert binding doc from txt to yaml. Remove redundated "gpio1: gpio@2300000" example. Add gpio-controller at example "gpio@1100". Reviewed-by: Krzysztof Kozlowski Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240531164357.1419858-1-Frank.Li@nxp.com Signed-off-by: Bartosz Golaszewski commit 8fce7727a70e037002800eb5b70995a7cd337c7a Author: Fabio Estevam Date: Fri May 31 09:18:01 2024 -0300 dt-bindings: gpio: pca95xx: Document the TI TCA9535 variant The TI TCA9535 variant has the same programming model as the NXP PCA9535. Document the "ti,tca9535" compatible string. Signed-off-by: Fabio Estevam Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240531121801.2161154-2-festevam@gmail.com Signed-off-by: Bartosz Golaszewski commit 82466bb622e921fb1a3dc552c9e3d20b3c1da8ad Author: Fabio Estevam Date: Fri May 31 09:18:00 2024 -0300 gpio: pca953x: Add support for TI TCA9535 variant Add support for the TI TCA9535 variant. The NXP PCA9535 is already supported by the driver. TCA9535 supports lower voltage operation (down to 1.65V VCC) compared to PCA (down to 2.3V VCC). >From a software perspective, these models are equivalent as they have the same register map. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20240531121801.2161154-1-festevam@gmail.com Signed-off-by: Bartosz Golaszewski commit b330568f0c51b0b80e463841b0062206011a4746 Author: Jouni Högander Date: Wed May 29 12:38:49 2024 +0300 drm/i915/psr: Add Early Transport into psr debugfs interface We want to have sink Early Transport capability and usage in our psr debugfs status interface. v4: use su_region_et_enabled instead of psr2_su_region_et_valid v3: remove extra space from "PSR mode: disabled" v2: printout "Selective Update enabled (Early Transport)" instead of "Selective Update Early Transport enabled" Reviewed-by: Animesh Manna Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-7-jouni.hogander@intel.com commit 04d0aed08206a235470ca82c08f46aa7b73e97fc Author: Jouni Högander Date: Wed May 29 12:38:48 2024 +0300 drm/i915/psr: Allow setting I915_PSR_DEBUG_SU_REGION_ET_DISABLE via debugfs Currently setting I915_PSR_DEBUG_SU_REGION_ET_DISABLE (0x20) via psr_debug debugfs interface is not allowed. This patch allows it. v3: - ensure psr is disabled/enabled if enable_psr2_su_region_et changes - remove extra space v2: ensure that fastset is performed when the bit changes Reviewed-by: Animesh Manna Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-6-jouni.hogander@intel.com commit 16b65af8b746ca6af74fd45156e755f2c8fa2379 Author: Jouni Högander Date: Wed May 29 12:38:47 2024 +0300 drm/i915/display: Selective fetch Y position on Region Early Transport Selective fetch Y position differs when Region Early Transport is used. Use formula from Bspec for this. Bspec: 68927 Reviewed-by: Animesh Manna Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-5-jouni.hogander@intel.com commit 0a8c581ce01c84214b8221fcc5d52b45c09d0007 Author: Jouni Högander Date: Wed May 29 12:38:46 2024 +0300 drm/i915/psr: Use enable boolean from intel_crtc_state for Early Transport When enabling Early Transport use intel_crtc_state->enable_psr2_su_region_et instead of psr2_su_region_et_valid. Reviewed-by: Animesh Manna Fixes: 467e4e061c44 ("drm/i915/psr: Enable psr2 early transport as possible") Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-4-jouni.hogander@intel.com commit 13d1359d67485c220832594fa044436992597823 Author: Jouni Högander Date: Wed May 29 12:38:45 2024 +0300 drm/i915/psr: Get Early Transport status in intel_psr_pipe_get_config We are currently not getting Early Transport status information in intel_psr_pipe_get_config. Fix this. Reviewed-by: Animesh Manna Fixes: 467e4e061c44 ("drm/i915/psr: Enable psr2 early transport as possible") Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-3-jouni.hogander@intel.com commit e7ba9d11e9fd97fbfb4ebbade04d09c23f90e3d2 Author: Peter Robinson Date: Thu May 30 19:17:31 2024 +0100 gpio: brcmstb: Allow building driver for ARCH_BCM2835 The GPIO_BRCMSTB hardware IP is also included in the bcm2712 SoC so enable the driver to also be built for ARCH_BCM2835. Signed-off-by: Peter Robinson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240530181737.1261450-1-pbrobinson@gmail.com Signed-off-by: Bartosz Golaszewski commit 0e3771f459ad84a286802ee22896f7a64a744f21 Author: Jouni Högander Date: Wed May 29 12:38:44 2024 +0300 drm/i915/psr: Add Early Transport status boolean into intel_psr Currently we are purely relying on psr2_su_region_et_valid. Add new boolean value into intel_psr struct indicating whether Early Transport is enabled or not and use it instead of psr2_su_region_et_valid for getting Early Transport status information. Reviewed-by: Animesh Manna Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240529093849.1016172-2-jouni.hogander@intel.com commit f6e32aa9693e7f0748087e49484d97808f1bbc98 Author: Lad Prabhakar Date: Mon Apr 22 22:30:06 2024 +0100 arm64: dts: renesas: r9a08g045: Update fallback string for SDHI nodes Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where hs400_disabled and fixed_addr_mode quirks are applied. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240422213006.505576-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 046084b5e1426efbf08913830bdb101dcbb06be5 Author: Lad Prabhakar Date: Mon Apr 22 22:30:05 2024 +0100 arm64: dts: renesas: rzg2l: Update fallback string for SDHI nodes Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where hs400_disabled and fixed_addr_mode quirks are applied. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240422213006.505576-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a509981a2e985ac2b97c447546e463c3f96ac1c5 Author: Lad Prabhakar Date: Mon Apr 22 22:30:04 2024 +0100 arm64: dts: renesas: r9a09g011: Update fallback string for SDHI nodes Use 'renesas,rzg2l-sdhi' as a fallback string for SDHI nodes, where hs400_disabled and fixed_addr_mode quirks are applied. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240422213006.505576-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7c8730df594e32d46d6728c07f89ea75c5e6a71d Author: Niklas Söderlund Date: Mon May 27 15:15:41 2024 +0200 clk: renesas: r8a779h0: Add CSI-2 clocks Add the CSI40 and CSI41 module clocks, which are used by the CSI-2 interfaces on the Renesas R-Car V4M (R8A779H0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240527131541.1676525-4-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit babc0ea4e6813819ba55cefad8f68598a847e7e6 Author: Niklas Söderlund Date: Mon May 27 15:15:40 2024 +0200 clk: renesas: r8a779h0: Add ISPCS clocks Add the ISPCS0 and ISPCS1 module clocks, which are used by the ISPCS modules on the Renesas R-Car V4M (R8A779H0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240527131541.1676525-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 4b45a978b25da1d4de051ed8e91e669e3701d780 Author: Geert Uytterhoeven Date: Wed May 29 18:02:16 2024 +0200 arm64: defconfig: Enable Marvell 88Q2XXX PHY support Enable support for Marvell 88Q2XXX 100/1000BASE-T1 Automotive Ethernet PHYs, as found on the Spider, S4 Starter Kit, and White-Hawk development boards. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/c5dcf03facd05e8b9c5ac89b2b81b005b141f086.1716998320.git.geert+renesas@glider.be commit d30f57b7413fc02d9899effd4084512603c134a7 Author: Tony Luck Date: Fri May 31 13:37:05 2024 -0700 platform/x86: intel_scu_wdt: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-10-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit a42f41466f986d0f607fa727242b6e0f871993ca Author: Tony Luck Date: Fri May 31 13:37:04 2024 -0700 platform/x86: intel_speed_select_if: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Srinivas Pandruvada Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-9-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 568e639a617f0a571bf7ee75488637a10d3d02af Author: Tony Luck Date: Fri May 31 13:37:03 2024 -0700 platform/x86: intel-uncore-freq: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Srinivas Pandruvada Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-8-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 12929ac3ef8d24f8931020135786e0b8a773e7c9 Author: Tony Luck Date: Fri May 31 13:37:02 2024 -0700 platform/x86: intel_ips: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-7-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 70a4fa3f4fc14599aae7af22d649420ab0ac7d23 Author: Tony Luck Date: Fri May 31 13:37:01 2024 -0700 platform/x86: intel_turbo_max_3: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-6-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit fad21268dc3141bbe63a8556fe5f771af4e11ecc Author: Tony Luck Date: Fri May 31 13:37:00 2024 -0700 platform/x86: p2sb: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-5-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 5b3eaf10e2e0a3df5c8dfd6aabc6aec435383ba0 Author: Tony Luck Date: Fri May 31 13:36:59 2024 -0700 x86/platform/atom: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240531203706.233365-4-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 0ff9c76fda20fbd5af079f38581db64b55832929 Author: Tony Luck Date: Fri May 31 13:36:58 2024 -0700 platform/x86: intel_telemetry: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-3-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 33af65ad67495e61e5008beb1f7fbede22f85318 Author: Tony Luck Date: Fri May 31 13:36:57 2024 -0700 platform/x86/intel/pmc: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20240531203706.233365-2-tony.luck@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 64e018d7a8990c11734704a0767c47fd8efd5388 Author: Jeff Johnson Date: Sun Jun 2 15:14:00 2024 -0700 cpufreq: dt-platdev: add missing MODULE_DESCRIPTION() macro make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpufreq/cpufreq-dt-platdev.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Signed-off-by: Viresh Kumar commit 2960d4c8e77aba365df80b69e72f88b29011b111 Author: Erick Archer Date: Sun Jun 2 21:30:48 2024 -0700 Input: tablet - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237B05083487507CFAF96B08BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit dc2f1423f056f26144f60b089430e193a4dfc672 Author: Erick Archer Date: Sun Jun 2 21:30:36 2024 -0700 Input: mouse - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237FB736DBF67A58798FDF38BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit a0bd7adadb50471331f0ca28caf068f7fab37b64 Author: Erick Archer Date: Sun Jun 2 21:26:14 2024 -0700 Input: misc - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit bb8706a41946d161222cdddd6b3de3025877c204 Author: Erick Archer Date: Sun Jun 2 21:29:43 2024 -0700 Input: keyboard - use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer Link: https://lore.kernel.org/r/AS8PR02MB7237277464F23CA168BFB3B18BF52@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov commit bc3e45258096f2ea2116302abefde4b1cb9bc3c1 Author: Thomas Weißschuh Date: Wed May 29 08:27:12 2024 +0200 hwmon: add ChromeOS EC driver The ChromeOS Embedded Controller exposes fan speed and temperature readings. Expose this data through the hwmon subsystem. The driver is designed to be probed via the cros_ec mfd device. Signed-off-by: Thomas Weißschuh Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-2-5cdf0c5db50a@weissschuh.net [tzungbi: Fixed typo in MAINTAINERS: "chros_ec_hwmon" -> "cros_ec_hwmon"] Signed-off-by: Tzung-Bi Shih commit 41f93a496af2696d970cbcb3814261a9b32dbaa2 Author: Liu Ying Date: Wed May 8 18:00:13 2024 +0800 arm64: dts: imx8mp-evk: Add MX8-DLVDS-LCD1 display module support MX8-DLVDS-LCD1 display module integrates a KOE TX26D202VM0BWA LCD panel and a touch IC. Add an overlay to support the LCD panel on i.MX8MP EVK. Specify 148.5MHz clock frequency in panel-timing node to accommodate 3.5-fold 519.75MHz media_ldb clock which is derived from 1.0395GHz video_pll1 clock. Signed-off-by: Liu Ying Signed-off-by: Shawn Guo commit 9f3d2c79d34bc729c7ae36be7dc9851fc8d891db Author: Christian Gmeiner Date: Fri May 3 23:22:48 2024 +0200 arm64: dts: imx8qm: Add GPU nodes Add the DT node for the GPU core found on the i.MX8QM. etnaviv-gpu 53100000.gpu: model: GC7000, revision: 6009 [drm] Initialized etnaviv 1.4.0 20151214 for etnaviv on minor 0 Signed-off-by: Christian Gmeiner Signed-off-by: Shawn Guo commit 214f33fcf656bf1be3f9f03d58fda067cdf7eecc Author: Gautam Menghani Date: Tue May 14 18:54:55 2024 +0530 powerpc/pseries: Remove unused cede related functions Remove extended_cede_processor() and its helpers as extended_cede_processor() has no callers since commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") Signed-off-by: Gautam Menghani Acked-by: Naveen N Rao Signed-off-by: Michael Ellerman Link: https://msgid.link/20240514132457.292865-1-gautam@linux.ibm.com commit e2106e6ad20e495ce59e552748330d2749070ee6 Author: Baruch Siach Date: Thu May 2 22:43:07 2024 +0300 arm64: layerscape: remove redundant EDAC_SUPPORT selection CONFIG_ARM64 selects CONFIG_EDAC_SUPPORT already. Signed-off-by: Baruch Siach Reviewed-by: Anshuman Khandual Signed-off-by: Shawn Guo commit 9373ed280651af79e0adfc29797c26ab47bb9f34 Author: Jiapeng Chong Date: Wed May 29 10:02:44 2024 +0800 wifi: rtw89: chan: Use swap() in rtw89_swap_sub_entity() Use existing swap() function instead of keeping duplicate source code. ./drivers/net/wireless/realtek/rtw89/chan.c:2336:32-33: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9174 Signed-off-by: Jiapeng Chong Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240529020244.129027-1-jiapeng.chong@linux.alibaba.com commit 0468df461ca787338051e8963cc196ba6858cde7 Author: Frank Li Date: Thu Apr 25 16:24:46 2024 -0400 arm64: dts: imx8qm-mek: add fec2 support Add fec2 support. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 6e7e34a2466486a5b6dd5caa2da55d5c25878be5 Author: Frank Li Date: Thu Apr 25 16:24:45 2024 -0400 arm64: dts: imx8qm: add ocopt and fec_mac[0,1] add ocotp ad fec_mac[0,1] for imx8qm. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit bb96cd010673d923571385169a7a2bcdf9372a17 Author: Frank Li Date: Thu Apr 25 16:24:44 2024 -0400 arm64: dts: imx8qm-mek: add lsio mu5 and mu6 Add lsio mu5 and mu6. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit eb57eb2357b92bd4a1e3baa1395cc0bd9b2519fc Author: Frank Li Date: Thu Apr 25 16:24:43 2024 -0400 arm64: dts: imx8qm-mek: add flexcan support Add flexcan[1,2,3] support for imx8qm-mek board. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 082784d652e4287a45e3eff003eabb0b00720395 Author: Frank Li Date: Thu Apr 25 16:24:42 2024 -0400 arm64: dts: imx8qm-mek: add cm41_i2c and children devices Add cm41_i2c and devices under it for imx8qm-mek board. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 9918092cbb0e0cc33de6a85f43173f456612d391 Author: Frank Li Date: Thu Apr 25 16:24:41 2024 -0400 arm64: dts: imx8qm-mek: add i2c0 and children devices Add i2c0 and all devices under it for imx8qm-mek board. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit e3f79bdb53257977f97208413911df7113291179 Author: Frank Li Date: Thu Apr 25 16:24:40 2024 -0400 arm64: dts: imx8x: add cm41 subsystem dtsi Add cm41 subsystem dtsi for iMX8X chips. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit d032d7fcc4f55c6b57daffde204d5e431ceaa5f7 Author: Frank Li Date: Thu Apr 25 16:24:39 2024 -0400 arm64: dts: imx8qm-mek: add sai and wm8960 support Add sai[0,1,6,7], wm8960 and asrc0 support. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 5ac99cb9ef17e08ee73805ca750932aa17573496 Author: Frank Li Date: Thu Apr 25 16:24:38 2024 -0400 arm64: dts: imx8qm-ss-audio: add audio nodes Add i.MX8QM audio related nodes and update eDMA[0,1]'s information. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 72674309f89600f886a0016d3e11690540c7254a Author: Frank Li Date: Thu Apr 25 16:24:37 2024 -0400 arm64: dts: imx8-ss-audio: remove memory-region = <&dsp_reserved>; Different boards have different DDR memory sizes and layouts for reserved memory. This change reduces future dependencies to add 'imx8qm-ss-audio'. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit a14a569a9918a0c7e340257a17dbc088bb27db72 Author: Thomas Weißschuh Date: Wed May 29 08:27:11 2024 +0200 platform/chrome: cros_ec_proto: Introduce cros_ec_cmd_readmem() To read from the EC memory different mechanism are possible. ECs connected via LPC expose their memory via a ->cmd_readmem operation. Other protocols require the usage of EC_CMD_READ_MEMMAP, which on the other hand is not implemented by LPC ECs. Provide a helper that automatically selects the correct mechanism. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-1-5cdf0c5db50a@weissschuh.net Signed-off-by: Tzung-Bi Shih commit b41c45eb990a9e35434c7f26466a9d10f5363d4f Author: Frank Li Date: Thu Apr 25 11:34:43 2024 -0400 arm64: dts: imx8dxl-evk: add audio nodes Add audio nodes for imx8dxl-evk boards. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 3c9622455e253e096c12fc8475eb547a984a8ff4 Author: Frank Li Date: Thu Apr 25 11:34:42 2024 -0400 arm64: dts: imx8dxl-ss-adma: update audio node power domains and IRQ number The power domains of i.MX8DXL's acm is difference i.MX8QXP. IRQ number of sai[0..3] and spdif0 are also difference. Update power domains information for i.MX8DXL. Update sai[0..3] and spdif0's IRQ number for i.MX8DXL. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 0bfafa074608490e032e7df30243d9b43a4a9a09 Author: Frank Li Date: Thu Apr 25 11:34:41 2024 -0400 arm64: dts: imx8dxl-ss-adma: delete unused node Delete unused node in adma subsystem. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 9536dfd70e05ab7d622f19dcdd9fd35368e2ba2f Author: Alexander Stein Date: Tue Apr 23 13:31:51 2024 +0200 arm64: dts: freescale: tqma8xx: Add partitions subnode to spi-nor The bootloader adds MTD partitions in this subnode if present, or in the spi-nor node itself otherwise. Setting #size-cells in MTD nodes itself is deprecated by mtd.yaml. Fix all this by adding an empty partitions node which the bootloader will fill with configured MTD partitions. Remove the deprecated properties as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 60153af6b517116b9d9a468dace522d09c0537ad Author: Alexander Stein Date: Tue Apr 23 13:31:50 2024 +0200 arm64: dts: freescale: tqma8mq: Add partitions subnode to spi-nor The bootloader adds MTD partitions in this subnode if present, or in the spi-nor node itself otherwise. Setting #size-cells in MTD nodes itself is deprecated by mtd.yaml. Fix all this by adding an empty partitions node which the bootloader will fill with configured MTD partitions. Remove the deprecated properties as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 618fc629f20417c30ba244dfc23884fa0bb25e94 Author: Alexander Stein Date: Tue Apr 23 13:31:49 2024 +0200 arm64: dts: freescale: tqma8mpql: Add partitions subnode to spi-nor The bootloader adds MTD partitions in this subnode if present, or in the spi-nor node itself otherwise. Setting #size-cells in MTD nodes itself is deprecated by mtd.yaml. Fix all this by adding an empty partitions node which the bootloader will fill with configured MTD partitions. Remove the deprecated properties as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 7de82949255c02cd534e35477cc158e0ffcaa7e5 Author: Alexander Stein Date: Tue Apr 23 13:31:48 2024 +0200 arm64: dts: freescale: tqma8mqnl: Add partitions subnode to spi-nor The bootloader adds MTD partitions in this subnode if present, or in the spi-nor node itself otherwise. Setting #size-cells in MTD nodes itself is deprecated by mtd.yaml. Fix all this by adding an empty partitions node which the bootloader will fill with configured MTD partitions. Remove the deprecated properties as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 23929910e1383134c19ff0d845cb5ff2321515f3 Author: Alexander Stein Date: Tue Apr 23 13:31:47 2024 +0200 arm64: dts: freescale: tqma8mqml: Add partitions subnode to spi-nor The bootloader adds MTD partitions in this subnode if present, or in the spi-nor node itself otherwise. Setting #size-cells in MTD nodes itself is deprecated by mtd.yaml. Fix all this by adding an empty partitions node which the bootloader will fill with configured MTD partitions. Remove the deprecated properties as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 0cd7587c6ca012aa237c33c462582f942f6243e8 Author: Alexander Stein Date: Tue Apr 23 13:31:46 2024 +0200 arm64: dts: freescale: tqma9352: Add partitions subnode to spi-nor The bootloader adds MTD partitions in this subnode if present, or in the spi-nor node itself otherwise. Direct children cause warnings like: 425e0000.spi: ofpart partition /soc@0/bus@42000000/spi@425e0000/flash@0/ partition@600000 (/soc@0/bus@42000000/spi@425e0000/flash@0) #size-cells is wrongly set to <0>, assuming <1> for parsing partitions. This is due flexspi node having #size-cells = <0>. Setting #size-cells in MTD nodes itself is deprecated by mtd.yaml. Fix all this by adding an empty partitions node which the bootloader will fill with configured MTD partitions. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit ede231f3507219d09330aabf7fba965311be4fe6 Author: Alexander Stein Date: Tue Apr 23 11:33:41 2024 +0200 arm64: dts: mba93xxca: Add USB support This adds support for both USB host and USB Type-C ports. This includes the on-board USB hub. Remove the gpio-hog for USB_RESET# as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit ba9943f47dca126fb0abd3f735e55ebed5e1eeed Author: Alexander Stein Date: Tue Apr 23 11:33:40 2024 +0200 arm64: dts: mba93xxla: Add USB support This adds support for both USB host and USB Type-C ports. This includes the on-board USB hub. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 7fa676e166d8a70d74441929c88d50bd286fd366 Author: Adam Ford Date: Mon Mar 4 18:48:58 2024 -0600 arm64: dts: imx8mp-beacon-kit: Enable HDMI bridge HPD The DSI to HDMI bridge supports hot-plut-detect, but the driver didn't previously support a shared IRQ GPIO. With the driver updated, the interrupt can be added to the bridge. Signed-off-by: Adam Ford Reviewed-by: Laurent Pinchart Signed-off-by: Shawn Guo commit ad175de1f8da6043553dec4402fc1ff28494ac7b Author: Armin Wolf Date: Wed May 29 00:21:15 2024 +0200 power: supply: hwmon: Add support for power sensors Currently, more than seven power supply drivers are supporting POWER_SUPPLY_PROP_POWER_NOW, but their power readings are not being reported through the hwmon subsystem. Fix this by adding support for power sensors to the power supply hwmon integration. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20240528222115.791511-1-W_Armin@gmx.de Signed-off-by: Sebastian Reichel commit a5dd84f3bde0252cb39a3ecebbe71d7c2b405194 Author: Dr. David Alan Gilbert Date: Tue May 28 01:06:34 2024 +0100 power: supply: ab8500: remove unused struct 'inst_curr_result_list' 'inst_curr_result_list' is unused since the original commit 13151631b5bd ("ab8500-fg: A8500 fuel gauge driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240528000634.196707-3-linux@treblig.org Signed-off-by: Sebastian Reichel commit ef1f6783fe03bee6acc15ef7084ab8b64c38d769 Author: Dr. David Alan Gilbert Date: Tue May 28 01:06:33 2024 +0100 power: supply: bd99954: remove unused struct 'battery_data' 'battery_data' is unused since the original commit 0902f8366491 ("power: supply: Support ROHM bd99954 charger"). Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20240528000634.196707-2-linux@treblig.org Signed-off-by: Sebastian Reichel commit 8179b068d5cb182a2c61f2f8365837a37f140feb Author: Hans de Goede Date: Fri May 31 15:47:02 2024 +0200 power: supply: leds: Add activate() callback to triggers Add an activate() callback to the power-supply LED triggers so that the LED being activated will properly reflect the current power-supply state for power-supply devices which are already fully registered when the trigger gets activated. This fixes e.g. wrong LED state (1) when the LED gets registered after the power-supply device. 1) Until the psy driver has a reason to call power_supply_changed() which may take quite a while Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531134702.166145-4-hdegoede@redhat.com Signed-off-by: Sebastian Reichel commit 6c951a84dab9c0e051aec54d7497f25e910a4953 Author: Hans de Goede Date: Fri May 31 15:47:01 2024 +0200 power: supply: leds: Share trig pointer for online and charging_full Either 5 different LED triggers are registered for battery power-supply devices or a single online LED trigger is used for non battery power-supply devices. These 5 / 1 LED trigger(s) are never used at the same time. So there is no need for a separate LED trigger pointer for the online trigger. Rename the first battery trigger from charging_full_trig to just trig and use this for the online trigger too. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531134702.166145-3-hdegoede@redhat.com Signed-off-by: Sebastian Reichel commit 964a504b1261b641797d93cdbf79b68ff7d85720 Author: Hans de Goede Date: Fri May 31 15:47:00 2024 +0200 power: supply: leds: Add power_supply_[un]register_led_trigger() Add power_supply_[un]register_led_trigger() helper functions. The primary goal of this is as a preparation patch for adding an activate callback to the power-supply LED triggers to ensure that power-supply LEDs get the correct initial value when the LED gets registered after the power_supply has been registered (this will use the psy back pointer). There also is quite a lot of code duplication in the existing LED trigger registration in the form of the kasprintf() for the name-template for each trigger + related error handling. This duplication is removed by these new helpers. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531134702.166145-2-hdegoede@redhat.com Signed-off-by: Sebastian Reichel commit 447bbf76e6b08c6399462946c2b98d7c5eaed507 Merge: ebacfa1f09c14 9af12f57f1f97 Author: Sebastian Reichel Date: Mon Jun 3 00:49:44 2024 +0200 Merge tag 'ib-leds-platform-power-v6.11' Immutable branch between LEDs, Power and RGB due for the v6.11 merge window. Merge it to provide functionality required by power-supply specific LED handler cleanups depending on the newly added (multi-colour) LED features. Signed-off-by: Sebastian Reichel commit c8683b995d8aba9d5b4e2368fedad83508882d84 Author: Konstantin Taranov Date: Thu May 30 04:55:17 2024 -0700 RDMA/mana_ib: extend query device Fill in properties of the ib device. Order the assignment in the order of fields in the struct ib_device_attr. Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1717070117-1234-3-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit 65357e2c164a08bf20849dd55f46aa71e00334fa Author: Konstantin Taranov Date: Thu May 30 04:55:16 2024 -0700 RDMA/mana_ib: set node_guid Use the mac address for the node_guid of the IB device. Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1717070117-1234-2-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Signed-off-by: Leon Romanovsky commit eb9d3c0bb065e55af6ec88e82a94b57fa1bb6e5d Author: Jeff Johnson Date: Thu May 30 17:20:20 2024 -0700 x86/mce/inject: Add missing MODULE_DESCRIPTION() line make W=1 C=1 warns: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/x86/kernel/cpu/mce/mce-inject.o Add the missing MODULE_DESCRIPTION(). Signed-off-by: Jeff Johnson Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20240530-md-x86-mce-inject-v1-1-2a9dc998f709@quicinc.com commit b5c089880723b2c18531c40e445235bd646a51d1 Author: Kuniyuki Iwashima Date: Wed May 29 07:46:48 2024 -0700 af_unix: Remove dead code in unix_stream_read_generic(). When splice() support was added in commit 2b514574f7e8 ("net: af_unix: implement splice for stream af_unix sockets"), we had to release unix_sk(sk)->readlock (current iolock) before calling splice_to_pipe(). Due to the unlock, commit 73ed5d25dce0 ("af-unix: fix use-after-free with concurrent readers while splicing") added a safeguard in unix_stream_read_generic(); we had to bump the skb refcount before calling ->recv_actor() and then check if the skb was consumed by a concurrent reader. However, the pipe side locking was refactored, and since commit 25869262ef7a ("skb_splice_bits(): get rid of callback"), we can call splice_to_pipe() without releasing unix_sk(sk)->iolock. Now, the skb is always alive after the ->recv_actor() callback, so let's remove the unnecessary drop_skb logic. This is mostly the revert of commit 73ed5d25dce0 ("af-unix: fix use-after-free with concurrent readers while splicing"). Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20240529144648.68591-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 750ed239bfd61562d8ef7e5619d8c0035f4ecfa1 Merge: e58b43f28d8a5 799f532de1360 Author: Jakub Kicinski Date: Sat Jun 1 16:24:36 2024 -0700 Merge branch 'lan78xx-enable-125-mhz-clk-and-auto-speed-configuration-for-lan7801-if-no-eeprom-is-detected' Rengarajan says: ==================== lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected This patch series adds the support for 125 MHz clock, Auto speed and auto duplex configuration for LAN7801 in the absence of EEPROM. ==================== Link: https://lore.kernel.org/r/20240529140256.1849764-1-rengarajan.s@microchip.com Signed-off-by: Jakub Kicinski commit 799f532de13601f91ecb9cc6169d45d6e6933b0f Author: Rengarajan S Date: Wed May 29 19:32:56 2024 +0530 lan78xx: Enable Auto Speed and Auto Duplex configuration for LAN7801 if NO EEPROM is detected Enabled ASD/ADD configuration for LAN7801 in the absence of EEPROM. After the lite reset these contents go back to defaults where ASD/ ADD is disabled. The check is already available for LAN7800. Reviewed-by: Simon Horman Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20240529140256.1849764-3-rengarajan.s@microchip.com Signed-off-by: Jakub Kicinski commit 5160b129f65fc6e1a4aa282d44f824e12aa800ee Author: Rengarajan S Date: Wed May 29 19:32:55 2024 +0530 lan78xx: Enable 125 MHz CLK configuration for LAN7801 if NO EEPROM is detected The 125MHz and 25MHz clock configurations are enabled in the initialization regardless of EEPROM (125MHz is needed for RGMII 1000Mbps operation). After a lite reset (lan78xx_reset), these contents go back to defaults(all 0, so no 125MHz or 25MHz clock). Reviewed-by: Simon Horman Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20240529140256.1849764-2-rengarajan.s@microchip.com Signed-off-by: Jakub Kicinski commit e58b43f28d8a55219f7a03af91f404f2d709364d Merge: 5086e1b7831a3 dbdb0918da671 Author: Jakub Kicinski Date: Sat Jun 1 16:07:31 2024 -0700 Merge branch 'net-ethernet-cortina-use-phylib-for-rx-and-tx-pause' Linus Walleij says: ==================== net: ethernet: cortina: Use phylib for RX and TX pause This patch series switches the Cortina Gemini ethernet driver to use phylib to set up RX and TX pause for the PHY. v3: https://lore.kernel.org/r/20240513-gemini-ethernet-fix-tso-v3-0-b442540cc140@linaro.org v2: https://lore.kernel.org/r/20240511-gemini-ethernet-fix-tso-v2-0-2ed841574624@linaro.org v1: https://lore.kernel.org/r/20240509-gemini-ethernet-fix-tso-v1-0-10cd07b54d1c@linaro.org ==================== Link: https://lore.kernel.org/r/20240529-gemini-phylib-fixes-v4-0-16487ca4c2fe@linaro.org Signed-off-by: Jakub Kicinski commit dbdb0918da671bde4e9c4c3e974a5e15358dfa5c Author: Linus Walleij Date: Wed May 29 16:00:02 2024 +0200 net: ethernet: cortina: Implement .set_pauseparam() The Cortina Gemini ethernet can very well set up TX or RX pausing, so add this functionality to the driver in a .set_pauseparam() callback. Essentially just call down to phylib and let phylib deal with this, .adjust_link() will respect the setting from phylib. Signed-off-by: Linus Walleij Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240529-gemini-phylib-fixes-v4-3-16487ca4c2fe@linaro.org Signed-off-by: Jakub Kicinski commit 15c22101db71369c022e25001a339f91cd3f8ddc Author: Linus Walleij Date: Wed May 29 16:00:01 2024 +0200 net: ethernet: cortina: Use negotiated TX/RX pause Instead of directly poking into registers of the PHY, use the existing function to query phylib about this directly. Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20240529-gemini-phylib-fixes-v4-2-16487ca4c2fe@linaro.org Signed-off-by: Jakub Kicinski commit a967d3cee86e8e8eb15c9e12f818c59b36416001 Author: Linus Walleij Date: Wed May 29 16:00:00 2024 +0200 net: ethernet: cortina: Rename adjust link callback The callback passed to of_phy_get_and_connect() in the Cortina Gemini driver is called "gmac_speed_set" which is archaic, rename it to "gmac_adjust_link" following the pattern of most other drivers. Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20240529-gemini-phylib-fixes-v4-1-16487ca4c2fe@linaro.org Signed-off-by: Jakub Kicinski commit 5086e1b7831a37fe3ba8fdea9a7bf3fb823cc618 Merge: 165f87691a898 5b5233fb81bfe Author: Jakub Kicinski Date: Sat Jun 1 16:03:23 2024 -0700 Merge branch 'net-visibility-of-memory-limits-in-netns' Matteo Croce says: ==================== net: visibility of memory limits in netns Some programs need to know the size of the network buffers to operate correctly, export the following sysctls read-only in network namespaces: - net.core.rmem_default - net.core.rmem_max - net.core.wmem_default - net.core.wmem_max ==================== Link: https://lore.kernel.org/r/20240530232722.45255-1-technoboy85@gmail.com Signed-off-by: Jakub Kicinski commit 5b5233fb81bfecbfb7502178a9cf6790dde04a2c Author: Matteo Croce Date: Fri May 31 01:27:22 2024 +0200 selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns Add a selftest which checks that the sysctl is present in a netns, that the value is read from the init one, and that it's readonly. Signed-off-by: Matteo Croce Link: https://lore.kernel.org/r/20240530232722.45255-3-technoboy85@gmail.com Signed-off-by: Jakub Kicinski commit 19249c0724f2048ab68179eac69004947b07d431 Author: Matteo Croce Date: Fri May 31 01:27:21 2024 +0200 net: make net.core.{r,w}mem_{default,max} namespaced The following sysctl are global and can't be read from a netns: net.core.rmem_default net.core.rmem_max net.core.wmem_default net.core.wmem_max Make the following sysctl parameters available readonly from within a network namespace, allowing a container to read them. Signed-off-by: Matteo Croce Reviewed-by: Eric Dumazet Reviewed-by: Shakeel Butt Link: https://lore.kernel.org/r/20240530232722.45255-2-technoboy85@gmail.com Signed-off-by: Jakub Kicinski commit 165f87691a898aea113923224c269bae14749ebc Author: Vadim Fedorenko Date: Thu May 30 13:47:51 2024 -0700 bnxt_en: add timestamping statistics support The ethtool_ts_stats structure was introduced earlier this year. Now it's time to support this group of counters in more drivers. This patch adds support to bnxt driver. Signed-off-by: Vadim Fedorenko Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/20240530204751.99636-1-vadfed@meta.com Signed-off-by: Jakub Kicinski commit a884986eb2f79b71a4d50fa1b8e205f1f00d9514 Author: Dmitry Baryshkov Date: Wed May 29 17:47:12 2024 +0300 arm64: dts: qcom: ipq8074: fix GCC node name Device nodes should have generic names. Use 'clock-controller@' as a GCC node name instead of a non-generic 'gcc@'. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-14-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit 6c2e3ca212dd57678fbd38d66d63a0dcab45e81a Author: Dmitry Baryshkov Date: Wed May 29 17:47:11 2024 +0300 arm64: dts: qcom: ipq6018: fix GCC node name Device nodes should have generic names. Use 'clock-controller@' as a GCC node name instead of a non-generic 'gcc@'. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-13-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit ef3308cf52553522d619a858a72a68f82432865b Author: Dmitry Baryshkov Date: Wed May 29 17:47:10 2024 +0300 arm64: dts: qcom: ipq9574: drop #power-domain-cells property of GCC On IPQ9574 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-12-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit 2ad7dd5479c04026f8421f12baf7a2b482cf0bff Author: Dmitry Baryshkov Date: Wed May 29 17:47:09 2024 +0300 arm64: dts: qcom: ipq5332: drop #power-domain-cells property of GCC On IPQ5332 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-11-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit d1caecddf9f4bb17db10c8a46083a70688d0f46d Author: Dmitry Baryshkov Date: Wed May 29 17:47:08 2024 +0300 arm64: dts: qcom: ipq5018: drop #power-domain-cells property of GCC On IPQ5018 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-10-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit cf2a08e149b28b4c8d9c63f84348f8d7fff0b5a7 Author: Dmitry Baryshkov Date: Thu May 30 11:31:56 2024 +0300 arm64: dts: qcom: sm8650-hdk: remove redundant properties The commit 65931e59e039 ("arm64: dts: qcom: sm8650: move USB graph to the SoC dtsi") and commit fbb22a182267 ("arm64: dts: qcom: sm8650: move PHY's orientation-switch to SoC dtsi") have moved some of the properties from the board DT files to the sm8650.dtsi. As the patch for sm8650 HDK predates those commits, it still had those properties inside. Drop these duplicate proerties from the sm8650-hdk.dts. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240530-sm8650-hdk-redundant-v1-1-c39c2ae65f3b@linaro.org Signed-off-by: Bjorn Andersson commit 6814d454c26b552f0009c803ffc0ce3434eaed7e Author: Luca Weiss Date: Thu May 30 17:05:49 2024 +0200 arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB role switching Configure the Type-C and VBUS regulator on PM7250B and wire it up to the USB PHY, so that USB role and orientation switching works. For now USB Power Delivery properties are skipped / disabled, so that the (presumably) bootloader-configured charger doesn't get messed with and we can charge the phone with at least some amount of power. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240530-fp4-tcpm-v3-3-612d4bbd5e09@fairphone.com Signed-off-by: Bjorn Andersson commit 6b5b15a1d785d5fb484d3a662b01776066d33137 Author: Luca Weiss Date: Thu May 30 17:05:48 2024 +0200 arm64: dts: qcom: pm7250b: Add a TCPM description Type-C port management functionality lives inside of the PMIC block on pm7250b. The Type-C port management logic controls orientation detection, vbus/vconn sense and to send/receive Type-C Power Domain messages. Reviewed-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240530-fp4-tcpm-v3-2-612d4bbd5e09@fairphone.com Signed-off-by: Bjorn Andersson commit 37ff5d0d75fece536cc493d0979e09f33edb75c4 Author: Luca Weiss Date: Thu May 30 17:05:47 2024 +0200 arm64: dts: qcom: pm7250b: Add node for PMIC VBUS booster Add the required DTS node for the USB VBUS output regulator, which is available on PM7250B. This will provide the VBUS source to connected peripherals. Reviewed-by: Bryan O'Donoghue Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240530-fp4-tcpm-v3-1-612d4bbd5e09@fairphone.com Signed-off-by: Bjorn Andersson commit eb57cbe730d10ec8c6505492a9f3252b160e0f1e Author: Abel Vesa Date: Thu May 30 18:43:41 2024 +0300 arm64: dts: qcom: x1e80100: Describe the PCIe 6a resources On both the CRD and QCP, on PCIe 6a sits the NVMe. Add the 3.3V gpio-controlled regulator and the clkreq, perst and wake gpios as resources for the PCIe 6a. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240530-x1e80100-dts-pcie6a-v1-3-ee17a9939ba5@linaro.org Signed-off-by: Bjorn Andersson commit 87042003f6ea7d075784db98da6903738a38f3cf Author: Abel Vesa Date: Thu May 30 18:43:40 2024 +0300 arm64: dts: qcom: x1e80100-qcp: Fix the PHY regulator for PCIe 6a The actual PHY regulator is L1d instead of L3j, so fix it accordingly. Fixes: f9a9c11471da ("arm64: dts: qcom: x1e80100-qcp: Enable more support") Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Cc: stable@vger.kernel.org # 6.9 Link: https://lore.kernel.org/r/20240530-x1e80100-dts-pcie6a-v1-2-ee17a9939ba5@linaro.org Signed-off-by: Bjorn Andersson commit cf7d2157aa87dca6f078a2d4867fd0a9dbc357aa Author: Abel Vesa Date: Thu May 30 18:43:39 2024 +0300 arm64: dts: qcom: x1e80100-crd: Fix the PHY regulator for PCIe 6a The actual PHY regulator is L1d instead of L3j, so fix it accordingly. Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Cc: stable@vger.kernel.org # 6.9 Link: https://lore.kernel.org/r/20240530-x1e80100-dts-pcie6a-v1-1-ee17a9939ba5@linaro.org Signed-off-by: Bjorn Andersson commit 20676f7819d7364b7e8bd437b212106faa893b49 Author: Abel Vesa Date: Thu May 30 19:35:46 2024 +0300 arm64: dts: qcom: x1e80100-qcp: Fix USB PHYs regulators The 1.2v HS PHY shared regulator is actually LDO2 from PM8550ve id J. Also add the missing supplies to QMP PHYs. Fixes: f9a9c11471da ("arm64: dts: qcom: x1e80100-qcp: Enable more support") Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Cc: stable@vger.kernel.org # 6.9 Link: https://lore.kernel.org/r/20240530-x1e80100-dts-fix-usb-phy-supplies-v1-2-6eb72a546227@linaro.org Signed-off-by: Bjorn Andersson commit fc5570e0bd56bb5acf271e809324a5ac79bb4b79 Merge: 73451e9aaa24e 4409ea1726cb9 Author: Jakub Kicinski Date: Sat Jun 1 15:51:53 2024 -0700 Merge branch 'ice-introduce-eth56g-phy-model-for-e825c-products' Jacob Keller says: ==================== ice: Introduce ETH56G PHY model for E825C products E825C products have a different PHY model than E822, E823 and E810 products. This PHY is ETH56G and its support is necessary to have functional PTP stack for E825C products. This series refactors the ice driver to add support for the new PHY model. Karol introduces the ice_ptp_hw structure. This is used to replace some hard-coded values relating to the PHY quad and port numbers, as well as to hold the phy_model type. Jacob refactors the driver code that converts between the ice_ptp_tmr_cmd enumeration and hardware register values to better re-use logic and reduce duplication when introducing another PHY type. Sergey introduces functions to help enable and disable the Tx timestamp interrupts. This makes the ice_ptp.c code more generic and encapsulates the PHY specifics into ice_ptp_hw.c Karol introduces helper functions to clear the valid bits for Tx and Rx timestamps. This enables informing hardware to discard stale timestamps after performing clock operations. Sergey moves the Clock Generation Unit (CGU) logic out of the E822 specific area of the ice_ptp_hw.c file as it will be re-used for other device PHY models. Jacob introduces a helper function for obtaining the base increment values, moving this logic out of ice_ptp.c and into the ice_ptp_hw.c file to better encapsulate hardware differences. Sergey builds on these refactors to introduce the new ETH56G PHY model used by the E825C products. This includes introducing the required helpers, constants, and PHY model checks. Karol simplifies the CGU logic by using anonymous structures, dropping an unnecessary ".field" name for accessing the CGU data. Michal Michalik updates the CGU logic to support the E825C hardware, ensuring that the clock generation is configured properly. Grzegorz Nitka adds support to read the NAC topology data from the device. This is in preparation for supporting devices which combine two NACs together, connecting all ports to the same clock source. This enables the driver to determine if its operating on such a device, or if its operating on the standard 1-NAC configuration. Grzsecgorz Nitka adjusts the PTP initialization to prepare for the 2x50G E825C devices, introducing special mapping for the PHY ports to prepare for support of the 2-NAC devices. With this, the ice driver is capable of handling PTP for the single-NAC E825C devices. Complete support for the 2-NAC devices requirs some work on how the ports connect to the clock owner. During review of this work, it was pointed out that our existing use of auxiliary bus is disliked, and Jiri requested that we change it. We are currently working on developing a replacement solution for the auxiliary bus implementation and have dropped the relevant changes out of this series. A future series will refactor the port to clock connection, at which time we will finish the support for 2-NAC E825C devices. Signed-off-by: Jacob Keller ==================== Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-0-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 4409ea1726cb9ce2769808873f8fbe33378c201b Author: Grzegorz Nitka Date: Tue May 28 16:04:01 2024 -0700 ice: Adjust PTP init for 2x50G E825C devices >From FW/HW perspective, 2 port topology in E825C devices requires merging of 2 port mapping internally and breakout mapping externally. As a consequence, it requires different port numbering from PTP code perspective. For that topology, pf_id can not be used to index PTP ports. Even if the 2nd port is identified as port with pf_id = 1, all PHY operations need to be performed as it was port 2. Thus, special mapping is needed for the 2nd port. This change adds detection of 2x50G topology and applies 'custom' mapping on the 2nd port. Signed-off-by: Grzegorz Nitka Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-11-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 5f847eede63889cbada9a23ea7c8f68659e3e918 Author: Grzegorz Nitka Date: Tue May 28 16:04:00 2024 -0700 ice: Add NAC Topology device capability parser Add new device capability ICE_AQC_CAPS_NAC_TOPOLOGY which allows to determine the mode of operation (1 or 2 NAC). Define a new structure to store data from new capability and corresponding parser code. Co-developed-by: Prathisna Padmasanan Signed-off-by: Prathisna Padmasanan Signed-off-by: Grzegorz Nitka Reviewed-by: Pawel Kaminski Reviewed-by: Mateusz Polchlopek Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-10-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 713dcad2a8c74de23d593a73bec4c22365ebc83f Author: Michal Michalik Date: Tue May 28 16:03:59 2024 -0700 ice: Add support for E825-C TS PLL handling The CGU layout of E825-C is a little different than E822/E823. Add support the new hardware adding relevant functions. Signed-off-by: Michal Michalik Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-9-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit b390ecc2e375f8973c512a5041a69555069f502a Author: Karol Kolacinski Date: Tue May 28 16:03:58 2024 -0700 ice: Change CGU regs struct to anonymous Simplify the code by using anonymous struct in CGU registers instead of naming each structure 'field'. Suggested-by: Przemek Kitszel Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-8-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 7cab44f1c35f5fb01930e592aee9cc460f17903d Author: Sergey Temerkhanov Date: Tue May 28 16:03:57 2024 -0700 ice: Introduce ETH56G PHY model for E825C products E825C products feature a new PHY model - ETH56G. Introduces all necessary PHY definitions, functions etc. for ETH56G PHY, analogous to E82X and E810 ones with addition of a few HW-specific functionalities for ETH56G like one-step timestamping. It ensures correct PTP initialization and operation for E825C products. Co-developed-by: Jacob Keller Signed-off-by: Jacob Keller Co-developed-by: Michal Michalik Signed-off-by: Michal Michalik Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-7-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 1f374d57c39386520586539641cafc999d0f3ef5 Author: Jacob Keller Date: Tue May 28 16:03:56 2024 -0700 ice: Introduce ice_get_base_incval() helper Add a new helper for getting base clock increment value for specific HW. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-6-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 39ecb29df855ce46f70456996c518789445f2a46 Author: Sergey Temerkhanov Date: Tue May 28 16:03:55 2024 -0700 ice: Move CGU block Move CGU block to the beginning of ice_ptp_hw.c Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-5-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit c199b31a043c4fe6500b13c486fd06430f464b40 Author: Karol Kolacinski Date: Tue May 28 16:03:54 2024 -0700 ice: Add PHY OFFSET_READY register clearing Add a possibility to mark all transmitted/received timestamps as invalid by clearing PHY OFFSET_READY registers. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-4-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 0d80bbe254198ab20982d5c508c55518d32c033b Author: Sergey Temerkhanov Date: Tue May 28 16:03:53 2024 -0700 ice: Implement Tx interrupt enablement functions Introduce functions enabling/disabling Tx TS interrupts for the E822 and ETH56G PHYs Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-3-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 579a2302bd16277918f862a1dd9f3f904264fa1a Author: Jacob Keller Date: Tue May 28 16:03:52 2024 -0700 ice: Introduce helper to get tmr_cmd_reg values Multiple places in the driver code need to convert enum ice_ptp_tmr_cmd values into register bits for both the main timer and the PHY port timers. The main MAC register has one bit scheme for timer commands, while the PHY commands use a different scheme. The E810 and E830 devices use the same scheme for port commands as used for the main timer. However, E822 and ETH56G hardware has a separate scheme used by the PHY. Introduce helper functions to convert the timer command enumeration into the register values, reducing some code duplication, and making it easier to later refactor the individual port write commands. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-2-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit d551d075b043821880b8afc0010ef70d050716d0 Author: Karol Kolacinski Date: Tue May 28 16:03:51 2024 -0700 ice: Introduce ice_ptp_hw struct Create new ice_ptp_hw struct and use it for all HW and PTP-related fields from struct ice_hw. Replace definitions with struct fields, which values are set accordingly to a specific device. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-1-c082739bb6f6@intel.com Signed-off-by: Jakub Kicinski commit 73451e9aaa24e8e44cb91e5fd6b59bf53e069c1f Author: Abhishek Chauhan Date: Wed May 29 11:31:30 2024 -0700 net: validate SO_TXTIME clockid coming from userspace Currently there are no strict checks while setting SO_TXTIME from userspace. With the recent development in skb->tstamp_type clockid with unsupported clocks results in warn_on_once, which causes unnecessary aborts in some systems which enables panic on warns. Add validation in setsockopt to support only CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_TAI to be set from userspace. Link: https://lore.kernel.org/netdev/bc037db4-58bb-4861-ac31-a361a93841d3@linux.dev/ Link: https://lore.kernel.org/lkml/6bdba7b6-fd22-4ea5-a356-12268674def1@quicinc.com/ Fixes: 1693c5db6ab8 ("net: Add additional bit to support clockid_t timestamp type") Reported-by: syzbot+d7b227731ec589e7f4f0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d7b227731ec589e7f4f0 Reported-by: syzbot+30a35a2e9c5067cc43fa@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=30a35a2e9c5067cc43fa Signed-off-by: Abhishek Chauhan Acked-by: Martin KaFai Lau Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20240529183130.1717083-1-quic_abchauha@quicinc.com Signed-off-by: Jakub Kicinski commit d1f9e6513e4e64215c7a2a31476032c0c9107a23 Merge: 6d9e9c36e1a64 c049275f24de7 Author: Jakub Kicinski Date: Sat Jun 1 15:18:03 2024 -0700 Merge branch 'doc-mptcp-new-general-doc-and-fixes' Matthieu Baerts says: ==================== doc: mptcp: new general doc and fixes A general documentation about MPTCP was missing since its introduction in v5.6. The last patch adds a new 'mptcp' page in the 'networking' documentation. The first patch is a fix for a missing sysctl entry introduced in v6.10 rc0, and the second one reorder the sysctl entries. Signed-off-by: Matthieu Baerts (NGI0) ==================== v2: https://lore.kernel.org/r/20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org v1: https://lore.kernel.org/r/20240520-upstream-net-20240520-mptcp-doc-v1-0-e3ad294382cb@kernel.org Link: https://lore.kernel.org/r/20240530-upstream-net-20240520-mptcp-doc-v3-0-e94cdd9f2673@kernel.org Signed-off-by: Jakub Kicinski commit c049275f24de70edd43e521f5a549c9e63165906 Author: Matthieu Baerts (NGI0) Date: Thu May 30 16:07:32 2024 +0200 doc: new 'mptcp' page in 'networking' A general documentation about MPTCP was missing since its introduction in v5.6. Most of what is there comes from our recently updated mptcp.dev website, with additional links to resources from the kernel documentation. This is a first version, mainly targeting app developers and users. Link: https://www.mptcp.dev Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240530-upstream-net-20240520-mptcp-doc-v3-3-e94cdd9f2673@kernel.org Signed-off-by: Jakub Kicinski commit a32c6966b23d987520f7c5ac12d153eaff425553 Author: Matthieu Baerts (NGI0) Date: Thu May 30 16:07:31 2024 +0200 doc: mptcp: alphabetical order Similar to what is done in other 'sysctl' pages: it looks clearer from a readability perspective. This might cause troubles in the short/mid-term with the backports, but by not putting new entries at the end, this can help to reduce conflicts in case of backports in the long term. We don't change the information here too often, so it looks OK to do that. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240530-upstream-net-20240520-mptcp-doc-v3-2-e94cdd9f2673@kernel.org Signed-off-by: Jakub Kicinski commit ccf45c92d746e8eac2cb1e60243d38a479e8dc0a Author: Matthieu Baerts (NGI0) Date: Thu May 30 16:07:30 2024 +0200 doc: mptcp: add missing 'available_schedulers' entry This sysctl knob has been added recently, but the documentation has not been updated. This knob is used to show the available schedulers choices that are registered, similar to 'net.ipv4.tcp_available_congestion_control'. Fixes: 73c900aa3660 ("mptcp: add net.mptcp.available_schedulers") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240530-upstream-net-20240520-mptcp-doc-v3-1-e94cdd9f2673@kernel.org Signed-off-by: Jakub Kicinski commit 6d9e9c36e1a6407818ec8ef9785ae47150d7ddc3 Author: Thorsten Blum Date: Wed May 29 16:39:02 2024 +0200 net: smc91x: Fix pointer types Use void __iomem pointers as parameters for mcf_insw() and mcf_outsw() to align with the parameter types of readw() and writew() to fix the following warnings reported by kernel test robot: drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] __iomem * drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] __iomem * drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] __iomem * drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: expected void *a drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: got void [noderef] __iomem * Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405160853.3qyaSj8w-lkp@intel.com/ Acked-by: Nicolas Pitre Reviewed-by: Andrew Lunn Signed-off-by: Thorsten Blum Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240529143859.108201-4-thorsten.blum@toblux.com Signed-off-by: Jakub Kicinski commit 69c8b998717c03adeada070882512ebeae11d71f Author: Jakub Kicinski Date: Wed May 29 09:29:22 2024 -0700 net: qstat: extend kdoc about get_base_stats mlx5 has a dedicated queue for PTP packets. Clarify that this sort of queues can also be accounted towards the base. Reviewed-by: Joe Damato Link: https://lore.kernel.org/r/20240529162922.3690698-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 018ee567def3b43f810aebf15221eef3858177b2 Author: Xiu Jianfeng Date: Sat May 25 09:46:48 2024 +0000 cgroup/cpuset: Reduce the lock protecting CS_SCHED_LOAD_BALANCE In the cpuset_css_online(), clearing the CS_SCHED_LOAD_BALANCE bit of cs->flags is guarded by callback_lock and cpuset_mutex. There is no problem with itself, because it is consistent with the description of there two global lock at the beginning of this file. However, since the operation of checking, setting and clearing the flag bit is atomic, protection of callback_lock is unnecessary here, see CS_SPREAD_*. so to make it more consistent with the other code, move the operation outside the critical section of callback_lock. No functional changes intended. Signed-off-by: Xiu Jianfeng Acked-by: Waiman Long Signed-off-by: Tejun Heo commit 5bcd9a0a59953b5ff55ac226f903397319bf7f40 Author: Dr. David Alan Gilbert Date: Mon May 27 00:45:53 2024 +0100 wifi: brcm80211: remove unused structs 'brcmf_pcie_core_info' was added in commit 9e37f045d5e7 ("brcmfmac: Adding PCIe bus layer support.") but never used. 'brcms_c_bit_desc' last use was removed in commit cdf4352f5c59 ("brcmsmac: Improve tx trace and debug support"). Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://msgid.link/20240526234553.286773-1-linux@treblig.org commit dcb77f854ae086bf32596fae02c88665393a13e8 Author: Erick Archer Date: Mon May 27 19:34:25 2024 +0200 wifi: brcm80211: use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. At the same time remove some redundant NULL initializations. Acked-by: Arend van Spriel Signed-off-by: Erick Archer Signed-off-by: Kalle Valo Link: https://msgid.link/AS8PR02MB7237FF1C2E880D1231684D708BF02@AS8PR02MB7237.eurprd02.prod.outlook.com commit 531876c80004ecff7bfdbd8ba6c6b48835ef5e22 Author: Andrii Nakryiko Date: Wed May 29 15:32:39 2024 -0700 libbpf: keep FD_CLOEXEC flag when dup()'ing FD Make sure to preserve and/or enforce FD_CLOEXEC flag on duped FDs. Use dup3() with O_CLOEXEC flag for that. Without this fix libbpf effectively clears FD_CLOEXEC flag on each of BPF map/prog FD, which is definitely not the right or expected behavior. Reported-by: Lennart Poettering Fixes: bc308d011ab8 ("libbpf: call dup2() syscall directly") Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20240529223239.504241-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 03df403dd7f495ce5e2324e4e6b4065b330acdc7 Author: Dmitry Baryshkov Date: Wed May 29 17:47:07 2024 +0300 ARM: dts: qcom: mdm9615: drop #power-domain-cells property of GCC On MDM9615 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-9-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit c39ce4b0a556408128fe11c25d22b7ba1d4a1c94 Author: Dmitry Baryshkov Date: Wed May 29 17:47:06 2024 +0300 ARM: dts: qcom: ipq8064: drop #power-domain-cells property of GCC On IPQ8064 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-8-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit c514f760b504fcb5bb34ea8daeb26f13c3561d95 Author: Dmitry Baryshkov Date: Wed May 29 17:47:05 2024 +0300 ARM: dts: qcom: ipq4019: drop #power-domain-cells property of GCC On IPQ4019 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-7-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit 660f6194693ede9c61cd9f01c36a7e56eff13dfd Author: Dmitry Baryshkov Date: Wed May 29 17:47:04 2024 +0300 ARM: dts: qcom: msm8960: drop #power-domain-cells property of GCC On MSM8960 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-6-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit 69eca4bd4c110eb748f68dc511b4dddec9fcd777 Author: Dmitry Baryshkov Date: Wed May 29 17:47:03 2024 +0300 ARM: dts: qcom: msm8660: drop #power-domain-cells property of GCC On MSM8660 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-5-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit 79abbcb13a9818bbc1701a1d2475a265a8275296 Author: Dmitry Baryshkov Date: Wed May 29 17:47:02 2024 +0300 ARM: dts: qcom: apq8064: drop #power-domain-cells property of GCC On APQ8064 the Global Clock Controller (GCC) doesn't provide power domains. Drop the #power-domain-cells property from the controller device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-4-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit e81e9a845bab76461f952b6d81cf599ab957a33a Author: Dmitry Baryshkov Date: Wed May 29 17:47:01 2024 +0300 dt-bindings: clock: add schema for qcom,gcc-mdm9615 Add schema for the Global Clock Controller (GCC) present on the Qualcomm MDM9615 platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-3-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit b0ef3434da07e7516a89a80206af53ea81954a80 Author: Dmitry Baryshkov Date: Wed May 29 17:47:00 2024 +0300 dt-bindings: clock: qcom,gcc: sort out power-domains support On some of Qualcomm platforms the Global Clock Controller (GCC) doesn't provide power domains. Move requirement for the '#power-domain-cells' out of the common qcom,gcc.yaml into individual schema files. For the platforms that do not provide power-domains, explicitly forbid having the '#power-domain-cells' property. Suggested-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-2-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit d99c899d2c42a37d331b8ac6f38c025884df15b2 Author: Dmitry Baryshkov Date: Wed May 29 17:46:59 2024 +0300 dt-bindings: clock: qcom,gcc-other: rename to qcom,mdm-mdm9607 The only platform remaining in qcom,gcc-other.yaml is MDM9607. Drop the stale mentioning of gcc-msm8953.h include and rename the schema file accordingly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240529-qcom-gdscs-v2-1-69c63d0ae1e7@linaro.org Signed-off-by: Bjorn Andersson commit ae5cee8e7349d7e5deff4cf90a08cbd738287155 Author: Abel Vesa Date: Thu May 30 19:35:45 2024 +0300 arm64: dts: qcom: x1e80100-crd: Fix USB PHYs regulators The 1.2v HS PHY shared regulator is actually LDO2 from PM8550ve id J. Also add the missing supplies to QMP PHYs. Fixes: d7e03cce0400 ("arm64: dts: qcom: x1e80100-crd: Enable more support") Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Cc: stable@vger.kernel.org # 6.9 Link: https://lore.kernel.org/r/20240530-x1e80100-dts-fix-usb-phy-supplies-v1-1-6eb72a546227@linaro.org Signed-off-by: Bjorn Andersson commit 54bbf0a8ef45734531b12cc50528568e4220d1be Author: Tengfei Fan Date: Fri May 31 17:04:22 2024 +0800 arm64: dts: qcom: sm8550: Remove usb default dr_mode OTG is default usb dr_mode, so this property can be removed. Reviewed-by: Dmitry Baryshkov Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240531090422.158813-3-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 32a7b1d7c72bc846f417c457476efcfc4d283c6b Author: Tengfei Fan Date: Fri May 31 17:04:21 2024 +0800 arm64: dts: qcom: sm8550: Move usb-role-switch to SoC dtsi The usb-role-switch is SM8550 SoC property, so move it from board dts to SM8550 SoC dtsi. Signed-off-by: Tengfei Fan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240531090422.158813-2-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 93f340084d05e7c109c0de20cca429492a377c37 Author: Tengfei Fan Date: Fri May 31 17:35:31 2024 +0800 arm64: dts: qcom: sa8775p: Add IMEM and PIL info region Add a simple-mfd representing IMEM on SA8775p and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Signed-off-by: Tengfei Fan Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20240531093531.238075-3-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 9ca6eaf1337693e4e626359b76016912921dc557 Author: Tengfei Fan Date: Fri May 31 17:35:30 2024 +0800 dt-bindings: soc: qcom: add qcom,sa8775p-imem compatible Add qcom,sa8775p-imem compatible name support. Signed-off-by: Tengfei Fan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240531093531.238075-2-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 63aec3e4d987fd43237f557460345bca3b51e530 Author: Taniya Das Date: Fri May 31 15:21:42 2024 +0530 clk: qcom: camcc-sc7280: Add parent dependency to all camera GDSCs Camera titan top GDSC is a parent supply to all other camera GDSCs. Titan top GDSC is required to be enabled before enabling any other camera GDSCs and it should be disabled only after all other camera GDSCs are disabled. Ensure this behavior by marking titan top GDSC as parent of all other camera GDSCs. Fixes: 1daec8cfebc2 ("clk: qcom: camcc: Add camera clock controller driver for SC7280") Signed-off-by: Taniya Das Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240531095142.9688-4-quic_tdas@quicinc.com Signed-off-by: Bjorn Andersson commit f38467b5a920be1473710428a93c4e54b6f8a0c1 Author: Taniya Das Date: Fri May 31 15:21:41 2024 +0530 clk: qcom: gcc-sc7280: Update force mem core bit for UFS ICE clock Update the force mem core bit for UFS ICE clock to force the core on signal to remain active during halt state of the clk. When retention bit of the clock is set the memories of the subsystem will retain the logic across power states. Fixes: a3cc092196ef ("clk: qcom: Add Global Clock controller (GCC) driver for SC7280") Signed-off-by: Taniya Das Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240531095142.9688-3-quic_tdas@quicinc.com Signed-off-by: Bjorn Andersson commit 7f10197853006c45e51f17e5f6b2da8d98b60784 Author: Taniya Das Date: Fri May 31 15:21:40 2024 +0530 clk: qcom: sc7280: Update the transition delay for GDSC Add support to update the GDSC transition delay values to avoid the GDSC FSM state stuck issues without which it could lead to GDSC power on/off failures. Signed-off-by: Taniya Das Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240531095142.9688-2-quic_tdas@quicinc.com Signed-off-by: Bjorn Andersson commit a5c84d2dde8089ece5e13f264359c6117ea3186b Author: David Wronek Date: Fri May 31 14:05:59 2024 +0200 arm64: dts: qcom: sm8550-samsung-q5q: fix typo It looks like "cdsp_mem" was pasted in the license header by accident. Fix the typo by removing it. Signed-off-by: David Wronek Fixes: ba2c082a401f ("arm64: dts: qcom: sm8550: Add support for Samsung Galaxy Z Fold5") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240531-fix-typo-q5q-v1-1-95f10a8eff9b@mainlining.org Signed-off-by: Bjorn Andersson commit a7823576f7f7b1cb0a595332ab6b0b38e15f45a7 Author: Unnathi Chalicheemala Date: Fri May 31 09:45:28 2024 -0700 arm64: dts: qcom: sm8650: Add Broadcast_AND register in LLCC block Chipsets before SM8450 have only one broadcast register (Broadcast_OR) which is used to broadcast writes and check for status bit 0 only in all channels. >From SM8450 onwards, a new Broadcast_AND region was added which checks for status bit 1. This hasn't been updated and Broadcast_OR region was wrongly being used to check for status bit 1 all along. Hence mapping Broadcast_AND region's address space to LLCC in SM8650. Signed-off-by: Unnathi Chalicheemala Link: https://lore.kernel.org/r/3a8804b35f44485637398faa9c0bda76813fe4d7.1717014052.git.quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit 2a71a2eb1f5ec438f0ac1c7e294cd7ed32119af3 Author: Unnathi Chalicheemala Date: Fri May 31 09:45:27 2024 -0700 arm64: dts: qcom: sm8550: Add Broadcast_AND register in LLCC block Chipsets before SM8450 have only one broadcast register (Broadcast_OR) which is used to broadcast writes and check for status bit 0 only in all channels. >From SM8450 onwards, a new Broadcast_AND region was added which checks for status bit 1. This hasn't been updated and Broadcast_OR region was wrongly being used to check for status bit 1 all along. Hence mapping Broadcast_AND region's address space to LLCC in SM8550. Signed-off-by: Unnathi Chalicheemala Link: https://lore.kernel.org/r/9bb6e086adec4d3b2134462d504822fb79b009e7.1717014052.git.quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit c566143137aaacfed1af09d8710edab1971c312d Author: Unnathi Chalicheemala Date: Fri May 31 09:45:26 2024 -0700 arm64: dts: qcom: sm8450: Add Broadcast_AND register in LLCC block Chipsets before SM8450 have only one broadcast register (Broadcast_OR) which is used to broadcast writes and check for status bit 0 only in all channels. >From SM8450 onwards, a new Broadcast_AND region was added which checks for status bit 1. This hasn't been updated and Broadcast_OR region was wrongly being used to check for status bit 1 all along. Hence mapping Broadcast_AND region's address space to LLCC in SM8450. Signed-off-by: Unnathi Chalicheemala Link: https://lore.kernel.org/r/bfc817da4188abdf5b543bedafb9cb0eb82806c2.1717014052.git.quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit 055afc34fd219c8e2290d736ad186edd58870a9e Author: Unnathi Chalicheemala Date: Fri May 31 09:45:25 2024 -0700 soc: qcom: llcc: Add regmap for Broadcast_AND region Until SM8450, there was only one broadcast region (Broadcast_OR) used to broadcast write and check for status bit 0. >From SM8450 onwards another broadcast region (Broadcast_AND) has been added which checks for status bit 1. This hasn't been updated and Broadcast_OR region was wrongly being used to check for status bit 1 all along. Hence define new regmap structure for Broadcast_AND region and initialize this regmap when HW block version is greater than 4.1, otherwise initialize as a NULL pointer for backwards compatibility. Switch from broadcast_OR to broadcast_AND region (when defined in DT) for checking status bit 1 as Broadcast_OR region checks only for bit 0. Signed-off-by: Unnathi Chalicheemala Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/9cf19928a67eaa577ae0f02de5bf86276be34ea2.1717014052.git.quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit c190f390a852a2b892dbc8a70fed08118ef056ff Author: Unnathi Chalicheemala Date: Fri May 31 09:45:24 2024 -0700 dt-bindings: arm: msm: Add llcc Broadcast_AND register The LLCC block in SM8450, SM8550 and SM8650 have a new register space for Broadcast_AND region. This is used to check that all channels have bit set to "1", mainly in SCID activation/deactivation. Previously we were mapping only the Broadcast_OR region assuming there was only one broadcast register region. Now we also map Broadcast_AND region. Signed-off-by: Unnathi Chalicheemala Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/3306bf3026f38b0486e00307d26827d71c99915d.1717014052.git.quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit 1536dc8edc653e0e4a333035a73ff146d0517749 Author: Beniamin Sandu Date: Wed May 15 19:12:49 2024 +0100 arm64: dts: socfpga: stratix10: add L2 cache info This removes cacheinfo warnings at boot, e.g.: cacheinfo: Unable to detect cache hierarchy for CPU 0 Signed-off-by: Beniamin Sandu Signed-off-by: Dinh Nguyen commit e19de2064fdf6f1f2488e36cf3927c3f1d01803c Merge: ccf23c916ca35 d8ec19857b095 Author: Jakub Kicinski Date: Fri May 31 14:09:20 2024 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/ti/icssg/icssg_classifier.c abd5576b9c57 ("net: ti: icssg-prueth: Add support for ICSSG switch firmware") 56a5cf538c3f ("net: ti: icssg-prueth: Fix start counter for ft1 filter") https://lore.kernel.org/all/20240531123822.3bb7eadf@canb.auug.org.au/ No other adjacent changes. Signed-off-by: Jakub Kicinski commit 877517f2dcba58867b64e3e0c616f26c62d4a8db Author: Niranjana Vishwanathapura Date: Fri May 31 09:12:30 2024 -0700 drm/xe: Add kernel-doc to some xe_lrc interfaces Add kernel-doc to xe_lrc_create/destroy and xe_lrc_get/put interfaces. v2: Fix kernel-doc for xe_lrc_create(), drop Fixes tag. (Matt Brost, Michal Wajdeczko) Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240531161230.32317-1-niranjana.vishwanathapura@intel.com Signed-off-by: Rodrigo Vivi commit f2bf9e95989c0163650dbeaede658d0fcf929063 Author: Matthew Brost Date: Thu May 30 13:33:41 2024 -0700 drm/xe: Fix NULL ptr dereference in devcoredump Kernel VM do not have an Xe file. Include a check for Xe file in the VM before trying to get pid from VM's Xe file when taking a devcoredump. Fixes: b10d0c5e9df7 ("drm/xe: Add process name to devcoredump") Cc: Rodrigo Vivi Cc: José Roberto de Souza Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240530203341.1795181-1-matthew.brost@intel.com commit fa0b54f17afe5c7449b1f0de3eb8a372f637ed30 Author: Alexander Aring Date: Tue May 28 17:12:39 2024 -0400 dlm: move recover idr to xarray datastructure According to kdoc idr is deprecated and xarrays should be used nowadays. This patch is moving the recover idr implementation to xarray datastructure. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f455eb8490acab680ddee79613e511e18a59c8b1 Author: Alexander Aring Date: Tue May 28 17:12:38 2024 -0400 dlm: move lkb idr to xarray datastructure According to kernel doc idr is deprecated and xarrays should be used nowadays. This patch is moving the lkb idr implementation to xarrays. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 1ffefc19c4ac7c61e5acb29c7a915ce494fe448c Author: Alexander Aring Date: Tue May 28 17:12:36 2024 -0400 dlm: drop own rsb pre allocation mechanism This patch drops the own written rsb pre allocation mechanism as this is already done by using kmem caches, we don't need another layer on top of that to running some pre allocation scheme. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 4db41bf4f04f75d5bcf52c500cbec11a2e159a06 Author: Alexander Aring Date: Tue May 28 17:12:34 2024 -0400 dlm: remove ls_local_handle from struct dlm_ls This patch removes ls_local_handle from struct dlm_ls as it stores the ls pointer of the top level structure itesef and this isn't necessary. There is a lookup functionality to lookup the lockspace in dlm_find_lockspace_local() but the given input parameter is the pointer already. This might be more safe to lookup a lockspace but given a wrong lockspace pointer is a bug in the code and we save the additional lookup here. The dlm_ls structure can be still hidden by using dlm_lockspace_t handle pointer. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f49da8c09f93ad2b220ee44091123aa9693eefde Author: Alexander Aring Date: Tue May 28 17:12:33 2024 -0400 dlm: remove unused parameter in dlm_midcomms_addr This patch removes an parameter which is currently not used by dlm_midcomms_addr(). Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a2155402bf0e03a3cd2ba21a6a0d82426379d8e0 Author: Alexander Aring Date: Tue May 28 17:12:32 2024 -0400 dlm: don't kref_init rsbs created for toss list This patch removes a kref_init() that isn't necessary because the rsb is created for toss list. Under toss list the rsb should not have any reference counting logic. If in theory the rsb gets to into keep list then a kref_init() for res_ref will be initiated. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit b88b249ba708a36b976bc1635b0b8a3556f1691d Author: Alexander Aring Date: Tue May 28 17:12:31 2024 -0400 dlm: remove scand leftovers This patch removes some leftover related code from dlm_scand that was dropped in commit b1f2381c1a8d ("dlm: drop dlm_scand kthread and use timers"). Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit b72755f5b577357cac661cbf9048cad704eb4ad8 Author: Patrick Gansterer Date: Sun May 26 12:51:30 2024 +0200 backlight: Add new lm3509 backlight driver This is a general driver for LM3509 backlight chip of TI. LM3509 is High Efficiency Boost for White LEDs and/or OLED Displays with Dual Current Sinks. This driver supports OLED/White LED select, brightness control and sub/main control. The datasheet can be found at http://www.ti.com/product/lm3509. Signed-off-by: Patrick Gansterer Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240526105136.721529-3-paroga@paroga.com Signed-off-by: Lee Jones commit 0aaee23d49a614b573ca51ab7758e77fcc3d7d14 Author: Patrick Gansterer Date: Sun May 26 12:51:29 2024 +0200 dt-bindings: backlight: Add Texas Instruments LM3509 Add Device Tree bindings for Texas Instruments LM3509 - a High Efficiency Boost for White LED's and/or OLED Displays Signed-off-by: Patrick Gansterer Reviewed-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240526105136.721529-2-paroga@paroga.com Signed-off-by: Lee Jones commit 4d2bcefa965b06a1f2be6912456bcfa86a34f184 Author: Matthew Wilcox (Oracle) Date: Fri May 31 13:29:02 2024 +0100 mm: Reduce the number of slab->folio casts Mark a few more folio functions as taking a const folio pointer, which allows us to remove a few places in slab which cast away the const. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Vlastimil Babka commit 596c29f3c8dea8b6ea74b930a03a693ad47819e3 Author: Rob Herring Date: Thu Aug 30 11:20:20 2018 -0500 of/fdt: avoid re-parsing '#{address,size}-cells' in of_fdt_limit_memory Now that we initialize dt_root_addr_cells and dt_root_size_cells earlier, use them and simplify of_fdt_limit_memory. Link: https://lore.kernel.org/all/20180830190523.31474-3-robh@kernel.org/ Signed-off-by: Rob Herring commit 554b66233623efd7a029135d355aeb2b7c8eb527 Author: Rob Herring Date: Wed Aug 29 17:20:46 2018 -0500 of/fdt: Scan the root node properties earlier Scan the root node properties (#{size,address}-cells) earlier, so that the dt_root_addr_cells and dt_root_size_cells variables are initialized and can be used. Link: https://lore.kernel.org/all/20180830190523.31474-2-robh@kernel.org/ Signed-off-by: Rob Herring commit 0da7a954480cc99978e3570c991e3779e56fc736 Author: Tero Kristo Date: Mon May 27 16:29:38 2024 +0300 doc: TPMI: Add entry for Performance Limit Reasons Describe the new 'plr' (Performance Limit Reasons) directory contents under the main TPMI debugfs folder. Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20240527133400.483634-7-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit 9e9397a41b7b1db10603edcb13913034bd41cce0 Author: Tero Kristo Date: Mon May 27 16:29:37 2024 +0300 platform/x86/intel/tpmi/plr: Add support for the plr mailbox Add support for reading fine grained power limit reasons via the PLR mailbox. Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20240527133400.483634-6-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit 811f67c51636d43791995bf483c5c1904900b531 Author: Tero Kristo Date: Mon May 27 16:29:36 2024 +0300 platform/x86/intel/tpmi: Add new auxiliary driver for performance limits Add new auxiliary driver that exposes the SoC performance limit reasons via debugfs interface. Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20240527133400.483634-5-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit 17ca2780458cdb0afc623e3432b1977847da3d15 Author: Srinivas Pandruvada Date: Tue May 28 10:34:57 2024 +0300 platform/x86/intel: TPMI domain id and CPU mapping Each TPMI power domain includes a group of CPUs. Several power management settings in this case applicable to a group of CPUs. There can be several power domains in a CPU package. So, provide interfaces for: - Get power domain id for a Linux CPU - Get mask of Linux CPUs in a power domain Hardware Punit uses different CPU numbering, which is not based on APIC (Advanced Programmable Interrupt Controller) CPU numbering. The Linux CPU numbering is based on APIC CPU numbering. Some PM features like Intel Speed Select, the CPU core mask provided by the hardware is based on the Punit CPU numbering. To use the core mask, this mask needs to be converted to a Linux CPUs mask. So, provide interfaces for: - Convert to a Linux CPU number from a Punit CPU number - Convert to a Punit CPU number from a Linux CPU number On each CPU online, MSR 0x54 is used to read the mapping and stores in a per cpu array. Create a hash for faster searching of a Linux CPU number from a Punit CPU number. Signed-off-by: Srinivas Pandruvada [tero.kristo: minor updates] Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20240528073457.497816-1-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit d36842bacf8e3491f555059f27de57b3436cc3ff Author: Tero Kristo Date: Mon May 27 16:29:34 2024 +0300 platform/x86/intel/tpmi: Add API to get debugfs root Add new API to get the debugfs root directory for TPMI. This allows any TPMI devices to add their own debugfs items under the same directory structure. Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20240527133400.483634-3-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit b44d79d6bad16c30978c2cee3421133d3f181494 Author: Tero Kristo Date: Mon May 27 16:29:33 2024 +0300 platform/x86/intel/tpmi: Add support for performance limit reasons Add TPMI ID 0x0C (Perf Limit Reasons) to the list of supported TPMI IDs. Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20240527133400.483634-2-tero.kristo@linux.intel.com Signed-off-by: Ilpo Järvinen commit 2f9514f005530502452c34295e77bdfb395b5bc6 Author: Srinivas Pandruvada Date: Fri May 31 01:35:48 2024 -0700 platform/x86: ISST: Use only TPMI interface when present When the TPMI interface is present, use this interface instead of legacy. On some systems legacy IO device is also present. Using both interfaces together is confusing and may set the hardware in inconsistent state. When TPMI interface is present, don't load legacy drivers. Signed-off-by: Srinivas Pandruvada Reviewed-by: Andy Shevchenko Reviewed-by: Zhang Rui Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240531083554.1313110-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen commit 3ea025fb4b5f1a0b66df25eba50b2a1071f01080 Author: Srinivas Pandruvada Date: Fri May 31 01:35:47 2024 -0700 platform/x86: ISST: Avoid some SkyLake server models Some SkyLake server variants don't support any SST functionality. No use of providing any SST related interfaces on them. All supported SkyLake servers provide mailbox interface via MSR. So check for the presence of MSR 0xB0 and 0xB1. If not present don't load common module. Move defines for MSR_OS_MAILBOX_INTERFACE and MSR_OS_MAILBOX_DATA to common header file to avoid duplicating them. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240531083554.1313110-3-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 1630dc626c87b300627fe7591f4f63f8f136f935 Author: Srinivas Pandruvada Date: Fri May 31 01:35:46 2024 -0700 platform/x86: ISST: Add model specific loading for common module SST common module is loaded when model specific or TPMI SST driver registers for services. There are model specific features used in SST common modules which are checked with a CPU model list. So, this module is model specific. There are some use cases where loading the common module independently only on the supported CPU models helps. The first use case is for preventing SST TPMI module loading if the model specific features are not implemented. The second use case for presenting information to user space when SST is used in OOB (Out of Band) mode. 1. With TPMI, SST interface is architectural. This means that no need to add new PCI device IDs for new CPU models. This means that there can be lag in adding CPU models for the model specific features in the common module. For example, before adding CPU model to GRANITERAPIDS_D to hpm_cpu_ids[], SST is still functional for some features and but will get/set wrong data for features like SST-CP. This is because IOCTL ISST_IF_GET_PHY_ID, will not give correct mapping for newer CPU models. So adding explicit model check during load time will prevent such cases. For unsupported CPU models, common driver will fail to load and hence dependent modules will not be loaded. 2. When the SST TPMI features are controlled by some OOB agent (not from OS interface), even if the CPU model is supported, there will be no user space interface available for tools as SST TPMI modules will not be loaded. User space interface is registered when TPMI modules call isst_if_cdev_register(). Even in this case user space orchestrator software needs to get power domain information to schedule workload and get/set turbo ratio limits. This information is exposed by the common module using IOCTLs ISST_IF_GET_PHY_ID and ISST_IF_MSR_COMMAND respectively. Since the user space MSR access can be locked, direct MSR access from the user space is not an option using /dev/cpu/*/msr. Converge all the existing model checks to one common place and use driver data to differentiate. On successful model check call isst_misc_reg(). Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Link: https://lore.kernel.org/r/20240531083554.1313110-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit cef26c248110f034650a83b2c92700cec70a5f4d Author: Jani Nikula Date: Thu May 30 16:19:11 2024 +0300 MAINTAINERS: update i915 and xe entries for include/drm/intel With all the Intel specific drm files under include/drm/intel, update the i915, xe, and the shared display entries. Do not discriminate based on file name pattern, just add the entire directory for all three entries. Cc: Joonas Lahtinen Cc: Lucas De Marchi Cc: Oded Gabbay Cc: Rodrigo Vivi Cc: Thomas Hellström Cc: Tvrtko Ursulin Reviewed-by: Andi Shyti Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e0fdf28307bb3e457d8c67966c09c44cf7ff5783.1717075103.git.jani.nikula@intel.com commit 3acbde3e9ef941fe6c847a007f72aefee0746226 Author: Jani Nikula Date: Thu May 30 16:19:10 2024 +0300 drm: move i915_hdcp_interface.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Tomas Winkler Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5f53384118e33123d3c87b94cc8835360237698b.1717075103.git.jani.nikula@intel.com commit e051d64b0a8f5fba923ffbe2003d691ef03f0607 Author: Jani Nikula Date: Thu May 30 16:19:09 2024 +0300 drm: move xe_pciids.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e19543f2ae978678c2ff814454f07c96ccd02175.1717075103.git.jani.nikula@intel.com commit aef8dc4398c6c6fde0d4c746e8343a33c683cc33 Author: Jani Nikula Date: Thu May 30 16:19:08 2024 +0300 drm: move i915_pciids.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Bjorn Helgaas Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a19cebc0f03588b9627dcaaebe69a9fef28c27f0.1717075103.git.jani.nikula@intel.com commit cce3819a5f5a55e08e5a3c9dcd1f46a3c5276ea8 Author: Jani Nikula Date: Thu May 30 16:19:07 2024 +0300 drm: move i915_pxp_tee_interface.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Tomas Winkler Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5c1626978d2552ef5732dcf9427c903046afb9c1.1717075103.git.jani.nikula@intel.com commit 03c7918d0d52378d215712ff66c06a980a2119ab Author: Jani Nikula Date: Thu May 30 16:19:06 2024 +0300 drm: move i915_drm.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. v2: Also fix comment in intel_pci_config.h (Ilpo) Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Bjorn Helgaas Cc: Hans de Goede Cc: Ilpo Järvinen Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0e344a72e9be596ac2b8b55a26fd674a96f03cdc.1717075103.git.jani.nikula@intel.com commit a1ed6865df70d0b022f510691059219d0b715d84 Author: Jani Nikula Date: Thu May 30 16:19:05 2024 +0300 drm: move intel_lpe_audio.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Jaroslav Kysela Cc: Takashi Iwai Reviewed-by: Andi Shyti Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2d645970a65cfd13e01fd8195b35bf9483ae9c2f.1717075103.git.jani.nikula@intel.com commit 1bb01bdab03f43e324dcc3a4f0cfc15c5a2e215e Author: Jani Nikula Date: Thu May 30 16:19:04 2024 +0300 drm: move i915_component.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. v2: Also change Documentation/gpu/i915.rst (Andi) Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Tomas Winkler Cc: Jaroslav Kysela Cc: Takashi Iwai Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a8c07233a8234858eb6711140482ef8db4c91cf4.1717075103.git.jani.nikula@intel.com commit 0706d57100fd0b2b34d50855726f648b8bfa7d2b Author: Jani Nikula Date: Thu May 30 16:19:03 2024 +0300 drm: move i915_gsc_proxy_mei_interface.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Cc: Tomas Winkler Reviewed-by: Andi Shyti Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/461662d528c3f327c81b764b7c883cd4519d8729.1717075103.git.jani.nikula@intel.com commit 05255ccbf172cb3e4c18200e077b46cc109698f5 Author: Jani Nikula Date: Thu May 30 16:19:02 2024 +0300 drm: move intel-gtt.h under include/drm/intel Clean up the top level include/drm directory by grouping all the Intel specific files under a common subdirectory. Cc: Daniel Vetter Cc: Dave Airlie Cc: Lucas De Marchi Reviewed-by: Andi Shyti Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ae224504d99cc6428da6dced9dcde2b7953624ef.1717075103.git.jani.nikula@intel.com commit b95702e275a78d0b65b4877fa83ab817a18df855 Author: Jani Nikula Date: Thu May 30 13:07:47 2024 +0300 drm/i915: reduce includes in intel_clock_gating.c With the refactoring in the file, some excessive includes were left behind and are now unnecessary. Remove. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240530100747.328631-2-jani.nikula@intel.com Signed-off-by: Jani Nikula commit b156a3e9bf4fdb6bc3bf4152f70b56573ff1350d Author: Jani Nikula Date: Thu May 30 13:07:46 2024 +0300 drm/i915: drop unnecessary i915_reg.h includes With the register header refactoring, some of the includes of i915_reg.h have become unnecessary. Remove. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240530100747.328631-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit c063cce7df3a765539e2a2d75ab943f334446cce Author: Michal Wajdeczko Date: Mon May 27 13:54:08 2024 +0200 drm/xe/pf: Update the LMTT when freeing VF GT config The LMTT must be updated whenever we change the VF LMEM configuration. We missed that step when freeing the whole VF GT config, which could result in stale PTE in LMTT or LMTT PT object leaks. Fix that. Fixes: ac6598aed1b3 ("drm/xe/pf: Add support to configure SR-IOV VFs") Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240527115408.1064-1-michal.wajdeczko@intel.com commit a8bd778958eface44a4931b30f1db5c98c9e6f40 Author: Jeff Johnson Date: Thu May 30 22:42:09 2024 -0700 regmap: kunit: add missing MODULE_DESCRIPTION() make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/base/regmap/regmap-kunit.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://msgid.link/r/20240530-md-regmap-kunit-v1-1-976c0f616751@quicinc.com Signed-off-by: Mark Brown commit f8e1c8f5b05fd2f11e8c611bede20cb738bc34cf Author: Jani Nikula Date: Tue May 28 14:15:42 2024 +0300 drm/i915: remove intermediate _PCH_DP_* macros The intermediate macros are unused. Remove them. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/0145043ff9767de93cc3dc5119f0e7152965ebe6.1716894910.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 4adb24f7341a972ac013fc523d33482e34dcbe71 Author: Jani Nikula Date: Tue May 28 14:15:41 2024 +0300 drm/i915: move PCH DP AUX CH regs to intel_dp_aux_regs.h Move the macros where they belong. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/9bc3a7bb34edc5dc17ffcb2a9e64edcef8c7a7b8.1716894910.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit dd7d72c9a45c8d0a6544970846378aecbec4d35e Author: Jani Nikula Date: Tue May 28 14:15:40 2024 +0300 drm/i915: rearrange DP AUX register macros Follow the recommended style for grouping register macros. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8ace710d8a1edac7e1af1ed12122fb6bc68114e9.1716894910.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit eccd1dbc49946e7621ec6545c4b31dd557375ee6 Author: Jani Nikula Date: Tue May 28 14:15:39 2024 +0300 drm/i915: remove unused DP AUX CH register macros The intermediate macros are no longer needed. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c97134b22d802ae82b19c299b79807ee60d9fae5.1716894909.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 68cc33f6137071cf634bfb3869f69accfa13eaef Author: Jani Nikula Date: Tue May 28 14:15:38 2024 +0300 drm/i915/gvt: use proper macros for DP AUX CH CTL registers Use the proper helpers for DP AUX CH CTL registers, instead of reinventing the wheels. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f30d35f28ef106d6fb2faf100fe1c5e3a42dfa20.1716894909.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 24147897507cd3a7d63745d1518a638bf4132238 Author: Ricardo Ribalda Date: Mon May 6 21:10:27 2024 +0000 media: imon: Fix race getting ictx->lock Lets fix a race between mutex_is_lock() and mutex_lock(). <-mutex is not locked if (!mutex_is_locked(&ictx->lock)) { unlock = true; <- mutex is locked externaly mutex_lock(&ictx->lock); } Let's use mutex_trylock() that does mutex_is_lock() and mutex_lock() atomically. Fix the following cocci warning: drivers/media/rc/imon.c:1167:1-7: preceding lock on line 1153 Fixes: 23ef710e1a6c ("[media] imon: add conditional locking in change_protocol") Signed-off-by: Ricardo Ribalda Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 2052138b7da52ad5ccaf74f736d00f39a1c9198c Author: Zheng Yejian Date: Thu May 9 20:44:14 2024 +0800 media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control() Infinite log printing occurs during fuzz test: rc rc1: DViCO FusionHDTV DVB-T USB (LGZ201) as ... ... dvb-usb: schedule remote query interval to 100 msecs. dvb-usb: DViCO FusionHDTV DVB-T USB (LGZ201) successfully initialized ... dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) dvb-usb: bulk message failed: -22 (1/0) ... dvb-usb: bulk message failed: -22 (1/0) Looking into the codes, there is a loop in dvb_usb_read_remote_control(), that is in rc_core_dvb_usb_remote_init() create a work that will call dvb_usb_read_remote_control(), and this work will reschedule itself at 'rc_interval' intervals to recursively call dvb_usb_read_remote_control(), see following code snippet: rc_core_dvb_usb_remote_init() { ... INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); ... } dvb_usb_read_remote_control() { ... err = d->props.rc.core.rc_query(d); if (err) err(...) // Did not return even if query failed schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(rc_interval)); } When the infinite log printing occurs, the query callback 'd->props.rc.core.rc_query' is cxusb_rc_query(). And the log is due to the failure of finding a valid 'generic_bulk_ctrl_endpoint' in usb_bulk_msg(), see following code snippet: cxusb_rc_query() { cxusb_ctrl_msg() { dvb_usb_generic_rw() { ret = usb_bulk_msg(d->udev, usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint),...); if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); ... } ... } By analyzing the corresponding USB descriptor, it shows that the bNumEndpoints is 0 in its interface descriptor, but the 'generic_bulk_ctrl_endpoint' is 1, that means user don't configure a valid endpoint for 'generic_bulk_ctrl_endpoint', therefore this 'invalid' USB device should be rejected before it calls into dvb_usb_read_remote_control(). To fix it, we need to add endpoint check for 'generic_bulk_ctrl_endpoint'. And as Sean suggested, the same check and clear halts should be done for 'generic_bulk_ctrl_endpoint_response'. So introduce dvb_usb_check_bulk_endpoint() to do it for both of them. Fixes: 4d43e13f723e ("V4L/DVB (4643): Multi-input patch for DVB-USB device") Signed-off-by: Zheng Yejian Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 51f1f787c7c9c9a241794315d02ad82dec77d8e2 Author: Sean Young Date: Mon Apr 29 14:04:36 2024 +0100 media: mceusb: No need for vendor/product ID in name This is available in other places and doesn't belong in the name of the rc device. Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 9af12f57f1f9785f231d31a7365ad244c656b7ff Author: Kate Hsuan Date: Fri May 31 13:41:24 2024 +0200 power: supply: power-supply-leds: Add charging_orange_full_green trigger for RGB LED Add a charging_orange_full_green LED trigger and the trigger is based on led_mc_trigger_event() which can set an RGB LED when the trigger is triggered. The LED will show orange when the battery status is charging. The LED will show green when the battery status is full. Link: https://lore.kernel.org/linux-leds/f40a0b1a-ceac-e269-c2dd-0158c5b4a1ad@gmail.com/ Signed-off-by: Kate Hsuan Acked-by: Sebastian Reichel Reviewed-by: Andy Shevchenko [hdegoede@redhat.com change color order to RGB] Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240531114124.45346-7-hdegoede@redhat.com Signed-off-by: Lee Jones commit 0921a57c91648b08857b47a2f26fa7942f06120f Author: Hans de Goede Date: Fri May 31 13:41:23 2024 +0200 leds: trigger: Add led_mc_trigger_event() function Add a new led_mc_trigger_event() function for triggers which want to change the color of a multi-color LED based on their trigger conditions. Signed-off-by: Hans de Goede Reviewed-by: Jacek Anaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531114124.45346-6-hdegoede@redhat.com Signed-off-by: Lee Jones commit 5607ca92e6274dfb85d0ff7c4e91e6c4ddb6d25c Author: Hans de Goede Date: Fri May 31 13:41:22 2024 +0200 leds: core: Add led_mc_set_brightness() function Add a new led_mc_set_brightness() function for in kernel color/brightness changing of multi-color LEDs. led-class-multicolor can be build as a module and led_mc_set_brightness() will have the builtin callers, so put led_mc_set_brightness() inside led-core instead, just like how led_set_brightness() is part of the core and not of the led-class object. This also adds a new LED_MULTI_COLOR led_classdev flag to allow led_mc_set_brightness() to verify that it is operating on a multi-color LED classdev, avoiding casting the passed in LED classdev to a multi-color LED classdev, when it actually is not a multi-color LED. Signed-off-by: Hans de Goede Reviewed-by: Jacek Anaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531114124.45346-5-hdegoede@redhat.com Signed-off-by: Lee Jones commit e1b08c6f5b92d408a9fcc1030a340caeb9852250 Author: Hans de Goede Date: Fri May 31 13:41:21 2024 +0200 leds: rgb: leds-ktd202x: Initialize mutex earlier The mutex must be initialized before the LED class device is registered otherwise there is a race where it may get used before it is initialized: DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 2 PID: 2045 at kernel/locking/mutex.c:587 __mutex_lock ... RIP: 0010:__mutex_lock+0x7db/0xc10 ... set_brightness_delayed_set_brightness.part.0+0x17/0x60 set_brightness_delayed+0xf1/0x100 process_one_work+0x222/0x5a0 Move the mutex_init() call earlier to avoid this race condition and switch to devm_mutex_init() to avoid the need to add error-exit cleanup to probe() if probe() fails later on. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240531114124.45346-4-hdegoede@redhat.com Signed-off-by: Lee Jones commit 75bd07aef47e1a984229e6ec702e8b9aee0226e4 Author: Kate Hsuan Date: Fri May 31 13:41:20 2024 +0200 leds: rgb: leds-ktd202x: I2C ID tables for KTD2026 and 2027 Add an i2c_device_id id_table to match manually instantiated (non device-tree / ACPI instantiated) KTD202x controllers as found on some x86 boards. This table shows the maximum support LED channel for KTD2026 (three LEDs) and KTD-2027 (4 LEDs). Link: https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf Signed-off-by: Kate Hsuan Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240531114124.45346-3-hdegoede@redhat.com Signed-off-by: Lee Jones commit f14aa5ea415b8add245e976bfab96a12986c6843 Author: Kate Hsuan Date: Fri May 31 13:41:19 2024 +0200 leds: rgb: leds-ktd202x: Get device properties through fwnode to support ACPI This LED controller is installed on a Xiaomi pad2 and it is an x86 platform. The original driver is based on the device tree and can't be used for this ACPI based system. This patch migrated the driver to use fwnode to access the properties. Moreover, the fwnode API supports the device tree so this work won't affect the original implementations. Signed-off-by: Kate Hsuan Tested-by: André Apitzsch # on BQ Aquaris M5 Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240531114124.45346-2-hdegoede@redhat.com Signed-off-by: Lee Jones commit 6c173766a547fb086c60da44fcb50e0542de78f9 Author: Dr. David Alan Gilbert Date: Thu May 30 14:26:19 2024 +0100 media: tegra-vde: remove unused struct 'tegra_vde_h264_frame' 'tegra_vde_h264_frame' has been unused since commit 313db7d235a0 ("media: staging: tegra-vde: Remove legacy UAPI support"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 4f72947c694ce486af074b076f2e08dfaad9aeca Author: Dr. David Alan Gilbert Date: Thu May 30 14:26:18 2024 +0100 media: m2m-deinterlace: remove unused struct 'vb2_dc_conf' 'vb2_dc_conf' has been unused since the original commit 8f0755c06b90 ("[media] media: Add mem2mem deinterlacing driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 327f961f77ea56ec3fbc0b3d66452dfe9f0f4d2e Author: Dr. David Alan Gilbert Date: Thu May 30 14:26:17 2024 +0100 media: amphion: remove unused struct 'vpu_malone_frame_buffer' 'vpu_malone_frame_buffer' has been unused since the original commit 145e936380ed ("media: amphion: implement malone decoder rpc interface"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 96646f3a5a5dd32232c337cf468830113be4e48c Author: Fritz Koenig Date: Wed May 29 15:22:24 2024 -0700 Documentation: media: Fix v4l2_ctrl_vp8_frame struct Description and control were out of sync. Signed-off-by: Fritz Koenig Signed-off-by: Hans Verkuil commit 58154dbda4345299bff30eb78cbce6bc6dafcf84 Author: Michael Tretter Date: Tue May 28 16:05:14 2024 +0200 media: rockchip: rga: fix sequence number handling The RGA driver didn't set the sequence numbers of the returned buffers. Keep track of the CAPTURE and OUTPUT sequence numbers, and set the sequence numbers in the source and destination buffers. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit b8b2b1a5d26d5ecf545d77384db1174a42cd89f6 Author: Ricardo Ribalda Date: Mon May 27 22:14:47 2024 +0000 media: pci/ivtv: Use managed version of pci_enable_device If there is any error during probing, we should probably leave the device in its previous state. pcim_ will take care of this. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 1c11a4cf06cd7ea8443144bba6f9ce43f037bf89 Author: Ricardo Ribalda Date: Mon May 27 22:14:46 2024 +0000 media: pci/ivtv: Replace request_mem_region with devm_ variant The managed device resource version of the function greatly simplifies the error handling. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 7de8cf94b58f779b92124da26fc68ecda473e41c Author: Ricardo Ribalda Date: Mon May 27 22:14:45 2024 +0000 media: pci/ivtv: Replace ioremap with devm_ variants With Managed Device Resources the error handling is simpler. The following smatch warning is silenced: drivers/media/pci/ivtv/ivtv-driver.c: drivers/media/pci/ivtv/ivtv-driver.c:1296 ivtv_probe() warn: 'itv->dec_mem' from ioremap() not released on lines: 1296. drivers/media/pci/ivtv/ivtv-driver.c: drivers/media/pci/ivtv/ivtv-driver.c:1296 ivtv_probe() warn: 'itv->enc_mem' from ioremap() not released on lines: 1296. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 364ae46413f67f97e4611b050d7d53079dbb9dba Author: Ricardo Ribalda Date: Mon May 27 21:08:58 2024 +0000 media: siano: Use flex arrays for sms_firmware Replace old style single array member, with flex array. The struct is allocated, but it seems like there was an over allocation error: fw_buf = kmalloc(ALIGN(fw->size + sizeof(struct sms_firmware), SMS_ALLOC_ALIGNMENT), GFP_KERNEL | coredev->gfp_buf_flags); This change fixes this cocci warning: drivers/media/common/siano/smscoreapi.h:669:6-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit b657179a11d9834df16b3bc2015f2931d20de528 Author: Ricardo Ribalda Date: Mon May 27 21:08:57 2024 +0000 media: siano: Remove unused structures These structs are not used in the code, remove them. This fixes the following cocci warning: drivers/media/common/siano/smscoreapi.h:1049:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/common/siano/smscoreapi.h:1055:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 6c69a73adf506080765d5dace6f4fcce8c6cda15 Author: Ricardo Ribalda Date: Mon May 27 21:08:56 2024 +0000 media: siano: Refactor struct sms_msg_data Replace a single element array with a single element field. The endianness conversion code seems to support multiple elements. To avoid changing behavior a pointer to the single element has been used. This is safer than moving to a flex array, because in that case the structure size changes. This fixes the following cocci warning: drivers/media/common/siano/smscoreapi.h:619:5-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 63916c3dec9b07f0a69a3c4a9722d7ec3ba9da23 Author: Ricardo Ribalda Date: Mon May 27 21:08:55 2024 +0000 media: pci: cx18: Use flex arrays for struct cx18_scb Replace the old-style single element array with a flexible array. This structure does not seem to be allocated in the code, so there is no need to change anything else. The following cocci warning is fixed: drivers/media/pci/cx18/cx18-scb.h:261:22-29: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit a93506f670de9fe57e40e18e32c84e73121bca55 Author: Ricardo Ribalda Date: Mon May 27 21:08:52 2024 +0000 media: xilinx: Refactor struct xvip_dma Replace a single element array with a single field. The following cocci warning is fixed: drivers/media/platform/xilinx/xilinx-dma.h:100:19-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 669d51f8f45db35a5e44101b90fcc7173088ad28 Author: Ricardo Ribalda Date: Mon May 27 21:08:51 2024 +0000 media: allegro: nal-hevc: Replace array[1] with array[N] Structures that have a single element array as the last field can be mistaken as a "flex array". We could replace all the single element arrays in the structure with single element fields, but this driver prefers to follow the ITU-T H.265 specification, which defines it as an array. If we introduce a new define N_HRD_PARAMS, we make clear our intentions. This fixes this cocci warning: drivers/media/platform/allegro-dvt/nal-hevc.h:102:14-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda Reviewed-by: Michael Tretter Signed-off-by: Hans Verkuil [hverkuil: fix typo in subject and commit log] commit 6a4e6e34ceac24f4a17fb24fdca0e04c16ecfba5 Author: Dr. David Alan Gilbert Date: Sat May 25 18:52:29 2024 +0100 media: pvrusb2: remove unused struct 'debugifc_mask_item' 'debugifc_mask_item' is unused since commit 681c73994401 ("V4L/DVB (6691): pvrusb2: Rework pipeline state control"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit f5ecfb982998b518d50bd861f46b73758710f138 Author: Dr. David Alan Gilbert Date: Sat May 25 18:52:28 2024 +0100 media: opera1: remove unused struct 'rc_map_opera_table' 'rc_map_opera_table' has been unused since commit 2f4f58d689dd ("[media] rc: Name RC keymap tables as rc_map_table"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 30376e2052bc87f6dfc13cddb85f8857a03a153a Author: Dr. David Alan Gilbert Date: Sat May 25 18:52:27 2024 +0100 media: gs1662: remove unused struct 'gs_reg_fmt_custom' 'gs_reg_fmt_custom' is unused since the original commit 7aae6e2df127 ("[media] Add GS1662 driver, a video serializer"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit c9230ee9251ecece02c4813d3c8b34e1501dc1bb Author: Dr. David Alan Gilbert Date: Fri May 24 01:29:16 2024 +0100 media: dvb-frontends: dib7000p: remove unused struct 'i2c_device' 'i2c_device' was added by the original commit 713d54a8bd81 ("[media] DiB7090: add support for the dib7090 based") but is unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 46be626a214b3a3ac06bf515e1fb46193e11fd4d Author: Dr. David Alan Gilbert Date: Fri May 24 01:29:15 2024 +0100 media: dvb-frontends: stv0910: remove unused struct 'sinit_table' 'sinit_table' has been unused since the original commit cd21b3349437 ("media: dvb-frontends: add ST STV0910 DVB-S/S2 demodulator frontend driver"). Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 715b1d31ef7d4609e03a9cb6a875949e3c80fe63 Author: Dr. David Alan Gilbert Date: Fri May 24 01:29:14 2024 +0100 media: dvb-frontends: drx39xyj: remove unused struct 'drxjeq_stat' 'drxjeq_stat' is unused since the original commit 38b2df95c53b ("[media] drx-j: add a driver for Trident drx-j frontend"). The name was changed by commit 57afe2f0bb0c ("[media] drx-j: Don't use CamelCase") and it was originally DRXJEQStat_t. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Hans Verkuil commit 68879806a567a50ba5fd25b16d2f923e88715e7f Author: Ricardo Ribalda Date: Mon May 6 21:10:29 2024 +0000 media: go7007: Refactor Adlink PCI-MPG24 i2c mutex Move the lock/unlock to its own function. It makes the code cleaner and cocci happier. Fix the following cocci warning: drivers/media/usb/go7007/go7007-i2c.c:125:1-7: preceding lock on line 61 Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 0b9a0cd686f6e17e3b33953b9cd0746978fcaa7c Author: Ricardo Ribalda Date: Mon May 6 21:10:28 2024 +0000 media: dvb-frontends/stv090x: Refactor tuner_i2c_lock Move the lock logic to it's own function. There is less code duplication and cocci is much happier. Fix the following cocci warning: drivers/media/dvb-frontends/stv090x.c:799:1-7: preceding lock on line 768 Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit f56d1edbb7c4d9d20e1fea25adbaa76bb8b28021 Author: Ricardo Ribalda Date: Mon May 6 21:10:26 2024 +0000 media: ivtv: Factor out schedule functions Cocci is very confused by unlock-lock a mutex in the middle of a function. Factor the schedules out, avoid code duplication and make cocci a bit happier. Fix the following cocci warnings: drivers/media/pci/ivtv/ivtv-fileops.c:223:4-10: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:230:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:236:4-10: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:245:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:251:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:257:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:272:3-9: preceding lock on line 267 drivers/media/pci/ivtv/ivtv-fileops.c:598:4-10: preceding lock on line 627 drivers/media/pci/ivtv/ivtv-fileops.c:598:4-10: preceding lock on line 689 drivers/media/pci/ivtv/ivtv-fileops.c:606:3-9: preceding lock on line 627 drivers/media/pci/ivtv/ivtv-fileops.c:606:3-9: preceding lock on line 689 drivers/media/pci/ivtv/ivtv-fileops.c:648:3-9: preceding lock on line 627 drivers/media/pci/ivtv/ivtv-fileops.c:648:3-9: preceding lock on line 689 drivers/media/pci/ivtv/ivtv-fileops.c:692:4-10: preceding lock on line 689 Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil commit 629913d6d79508b166c66e07e4857e20233d85a9 Author: Mikhail Kobuk Date: Thu Mar 28 02:32:23 2024 +0300 media: pci: ivtv: Add check for DMA map result In case DMA fails, 'dma->SG_length' is 0. This value is later used to access 'dma->SGarray[dma->SG_length - 1]', which will cause out of bounds access. Add check to return early on invalid value. Adjust warnings accordingly. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1932dc2f4cf6 ("media: pci/ivtv: switch from 'pci_' to 'dma_' API") Signed-off-by: Mikhail Kobuk Signed-off-by: Hans Verkuil commit dd40472dc6d7078746680e71ed2f4cc9c4e15b0a Author: Jianfeng Liu Date: Fri Mar 22 13:29:14 2024 +0800 dt-bindings: media: rockchip-rga: add rockchip,rk3588-rga Add a new compatible for the rk3588 Rockchip SoC, which also features an RGA, which is called RGA2 in the TRM Part2. It is the same core as used on the rk3288 and rk3568, which documents the same RGA2. Signed-off-by: Jianfeng Liu Acked-by: Conor Dooley Signed-off-by: Hans Verkuil commit d3e80f2dcf8c2aae09eca6b394eb253505e37dda Author: Ville Syrjälä Date: Tue May 28 21:56:46 2024 +0300 drm/i915: Switch intel_usecs_to_scanlines() to 64bit maths Dotclocks can reach ~1GHz these days, so intel_usecs_to_scanlines(), with its 32bit maths, is currently limited to a few milliseconds. I want bigger numbers in DSB selftests, so switch over to 64bit maths. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 5b7f65acf1b083868e0fa9bf0617168794c201ff Author: Ville Syrjälä Date: Tue May 28 21:56:45 2024 +0300 drm/i915: Move intel_crtc_scanline_offset() I want to use intel_crtc_scanline_offset() in intel_crtc_scanline_to_hw(). Relocate intel_crtc_scanline_offset() a bit to avoid a forward declaration. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 5316dd0d617bb98956f75cb33982efe1b26d8f19 Author: Ville Syrjälä Date: Tue May 28 21:56:44 2024 +0300 drm/i915: Simplify scanline_offset handling for gen2 Currently intel_crtc_scanline_offset() is careful to always return a positive offset. That is not actually necessary as long as we take care of negative values when applying the offset in __intel_get_crtc_scanline(). This simplifies intel_crtc_scanline_offset(), and makes the scanline_offfset arithmetic more symmetric between the forward (__intel_get_crtc_scanline()) and reverse (intel_crtc_scanline_to_hw()) directions. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9677dd01ca1ada359f22cd129ccaeab9cd383567 Author: Ville Syrjälä Date: Tue May 28 21:56:43 2024 +0300 drm/i915: Extract intel_mode_vtotal() We have several copies of code calculating the hardware's idea of vtotal. Pull that to a helper, similar to intel_mode_vblank_{start,end}(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1fea297844413e3e775332faa61229be8ff3679e Author: Ville Syrjälä Date: Tue May 28 21:56:42 2024 +0300 drm/i915: Extract intel_mode_vblank_end() Extract intel_mode_vblank_end() in the same vein as intel_mode_vblank_start(). While we have only one use of this it seems nicer to unify the approach. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit edd27f8ee89d66a42dbd691567ca01909f33138d Author: Ville Syrjälä Date: Tue May 28 21:56:41 2024 +0300 drm/i915: Reuse intel_mode_vblank_start() Replace a few hand rolled copies of intel_mode_vblank_start() with the real thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7ad635ea82704a64c40aba67a7d04293d4780f0f Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:08 2024 +0100 buffer: Remove calls to set and clear the folio error flag The folio error flag is not tested anywhere, so we can stop setting and clearing it. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-17-willy@infradead.org Signed-off-by: Christian Brauner commit 1f56eedf7ff76b71f88f80d8b539f254ecbce561 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:07 2024 +0100 iomap: Remove calls to set and clear folio error flag The folio error flag is not checked anywhere, so we can remove the calls to set and clear it. Cc: Christian Brauner Cc: linux-xfs@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-16-willy@infradead.org Reviewed-by: Darrick J. Wong Signed-off-by: Christian Brauner commit 55050b6873c62d7a7a6921acb992cc587fad0327 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:06 2024 +0100 vboxsf: Convert vboxsf_read_folio() to use a folio Remove conversion to a page and use folio APIs throughout. This includes a removal of setting the error flag as nobody checks the error flag on vboxsf folios. This does not include large folio support as we would have to map each page individually. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-15-willy@infradead.org Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Christian Brauner commit ca7d585639b597e838882faa3c7a959d13aaa533 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:05 2024 +0100 ufs: Remove call to set the folio error flag Nobody checks the error flag on ufs folios, so stop setting it. Cc: Evgeniy Dushistov Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-14-willy@infradead.org Signed-off-by: Christian Brauner commit d86f2de026c57e1503259f39abdfa1659c51d900 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:04 2024 +0100 romfs: Convert romfs_read_folio() to use a folio Remove the conversion back to struct page and use the folio APIs instead of the page APIs. It's probably more trouble than it's worth to support large folios in romfs, so there are still PAGE_SIZE assumptions in this function. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-13-willy@infradead.org Signed-off-by: Christian Brauner commit f4c51473d22a9c2847f5dde401cd15f29cee6708 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:03 2024 +0100 reiserfs: Remove call to folio_set_error() The error flag is never tested for reiserfs folios, so stop setting it. Cc: reiserfs-devel@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-12-willy@infradead.org Signed-off-by: Christian Brauner commit 86b3d5f6df0e60e87702a3991b09e56dfe6b0484 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:02 2024 +0100 orangefs: Remove calls to set/clear the error flag Nobody checks the error flag on orangefs folios, so stop setting and clearing it. We can also use folio_end_read() to simplify orangefs_read_folio(). Cc: Martin Brandenburg Cc: devel@lists.orangefs.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-11-willy@infradead.org Tested-by: Mike Marshall Signed-off-by: Christian Brauner commit 8f3ab6e4bebe789f23690cf57fb1a648c4422b9d Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:01 2024 +0100 nfs: Remove calls to folio_set_error Common code doesn't test the error flag, so we don't need to set it in nfs. We can use folio_end_read() to combine the setting (or not) of the uptodate flag and clearing the lock flag. Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-10-willy@infradead.org Signed-off-by: Christian Brauner commit d15b00b1e588ea88a747bd70f6e360870088f5d2 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:21:00 2024 +0100 jffs2: Remove calls to set/clear the folio error flag Nobody checks the error flag on jffs2 folios, so stop setting and clearing it. We can also remove the call to clear the uptodate flag; it will already be clear. Convert one of these into a call to mapping_set_error() which will actually be checked by other parts of the kernel. Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-9-willy@infradead.org Tested-by: Zhihao Cheng Acked-by: Richard Weinberger Reviewed-by: Zhihao Cheng Signed-off-by: Christian Brauner commit e3ec0fe944d243968c6f33305e5d195efb501c0b Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:59 2024 +0100 hostfs: Convert hostfs_read_folio() to use a folio Remove the use of page APIs, including setting/clearing the error flag which is never checked on hostfs folios. This does not include support for large folios as kmap_local_folio() maps only one page at a time. Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-8-willy@infradead.org Signed-off-by: Christian Brauner commit 4df37c5f0882b211694598ff1fa1c69ccd0c1320 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:58 2024 +0100 isofs: Convert rock_ridge_symlink_read_folio to use a folio Remove the conversion back into a page and use the folio APIs throughout. Remove the setting of PG_error instead of converting it; it is unused by core code or by the rest of isofs, so it serves no purpose here. Use folio_end_read() to save an atomic operation and unify the two exit paths. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-7-willy@infradead.org Signed-off-by: Christian Brauner commit 4c59e914ef1a39d7a20d58723ceeff31e50e7292 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:57 2024 +0100 hpfs: Convert hpfs_symlink_read_folio to use a folio Remove the conversion back into a page and use the folio APIs throughout. Remove the setting of PG_error instead of converting it; it is unused by core code or by the rest of HPFS, so it serves no purpose here. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-6-willy@infradead.org Signed-off-by: Christian Brauner commit 09da047e554d46885c5ab038373473c19ff2fd12 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:56 2024 +0100 efs: Convert efs_symlink_read_folio to use a folio Remove the conversion back into a page and use the folio APIs throughout. Remove the setting of PG_error instead of converting it; it is unused by core code or by the rest of EFS, so it serves no purpose here. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-5-willy@infradead.org Signed-off-by: Christian Brauner commit def27a20542044b9322d65ffc206722c159f7c7d Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:55 2024 +0100 cramfs: Convert cramfs_read_folio to use a folio Remove the conversion back into a page and use the folio APIs throughout. Remove the setting of PG_error instead of converting it; it is unused by core code or by the rest of cramfs, so it serves no purpose here. Use folio_end_read() to save an atomic operation and unify the two exit paths. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-4-willy@infradead.org Signed-off-by: Christian Brauner commit 8c30a7344abedf25002baed6196cf41b6fb75c0e Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:54 2024 +0100 coda: Convert coda_symlink_filler() to use folio_end_read() This is slightly more efficient than separate calls to folio_mark_uptodate() and folio_unlock(), and it's easier to read. Get rid of the call to folio_set_error() as nobody will check this flag. Cc: Jan Harkes Cc: coda@cs.cmu.edu Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-3-willy@infradead.org Signed-off-by: Christian Brauner commit 263cf578049708a115b3ca58e46b7e5d20763866 Author: Matthew Wilcox (Oracle) Date: Thu May 30 21:20:53 2024 +0100 befs: Convert befs_symlink_read_folio() to use folio_end_read() This is slightly more efficient than separate calls to folio_mark_uptodate() and folio_unlock(), and it's easier to read. Get rid of the call to folio_set_error() as nobody will check this flag. Cc: Luis de Bethencourt Cc: Salah Triki Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240530202110.2653630-2-willy@infradead.org Signed-off-by: Christian Brauner commit b84641c0a1742b79084ddc4124e2010f3f09888a Author: Ville Syrjälä Date: Tue May 28 21:49:45 2024 +0300 drm/i915: Plumb the full atomic state into skl_ddb_add_affected_planes() skl_ddb_add_affected_planes() needs the full atomic state. Instead of digging that out from dubious sources plumb it in explicitly. The wm counterpart (skl_wm_add_affected_planes()) already does things in the proper way. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 5010375afab51fe80867ac15900f49bdb2908b9e Author: Ville Syrjälä Date: Tue May 28 21:49:44 2024 +0300 drm/i915: Plumb the full atomic state into icl_check_nv12_planes() icl_check_nv12_planes() needs the full atomic state. Instead of digging that out from dubious sources plumb it in explicitly. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4fab6b8b3033c02f11837a26d24297cce9a5b6ae Author: Ville Syrjälä Date: Tue May 28 21:49:43 2024 +0300 drm/i915/cdclk: Plumb the full atomic state deeper Various parts of the cdclk code need access the full atomic state. Currently it's being dug out via the cdclk_state->base.state pointer, which is not great as that pointer isn't always valid. Instead plumb the full atomic state from the top so that it's clear that it is in fact valid. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit aabbf2135f9a9526991f17cb0c78cf1ec878f1c2 Author: Lothar Rubusch Date: Sun May 26 10:31:28 2024 +0000 crypto: atmel-sha204a - fix negated return value Fix negated variable return value. Fixes: e05ce444e9e5 ("crypto: atmel-sha204a - add reading from otp zone") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-crypto/34cd4179-090e-479d-b459-8d0d35dd327d@moroto.mountain/ Signed-off-by: Lothar Rubusch Reviewed-by: Dan Carpenter Signed-off-by: Herbert Xu commit 8d7c52cb4184d3dc26dde62b4f5acd48de0768ae Author: Christophe JAILLET Date: Sat May 25 17:14:35 2024 +0200 crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove() The only iommu function call in this driver is a tegra_dev_iommu_get_stream_id() which does not allocate anything and does not take any reference. So there is no point in calling iommu_fwspec_free() in the remove function. Remove this incorrect function call. Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver") Signed-off-by: Christophe JAILLET Tested-by: Akhil R Acked-by: Akhil R Signed-off-by: Herbert Xu commit 7c699fe9a5740a228b2974325e817de28f7b6afd Author: Jeff Johnson Date: Thu May 23 12:47:39 2024 -0700 crypto: Add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/cast_common.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/af_alg.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/algif_hash.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/algif_skcipher.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/ecc.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/curve25519-generic.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/xor.o WARNING: modpost: missing MODULE_DESCRIPTION() in crypto/crypto_simd.o Signed-off-by: Jeff Johnson Signed-off-by: Herbert Xu commit a720de9fba164552d920632c2d7531dc8203f063 Author: Mark Brown Date: Tue May 21 21:22:49 2024 +0100 crypto: arm64/crc10dif - Raise priority of NEON crct10dif implementation The NEON implementation of crctd10dif is registered with a priority of 100 which is identical to that used by the generic C implementation. Raise the priority to 150, half way between the PMULL based implementation and the NEON one, so that it will be preferred over the generic implementation. Signed-off-by: Mark Brown Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit f9110822fca5b92daefc2bfae4cfcda7dcfb03c9 Author: Herbert Xu Date: Tue May 21 10:54:50 2024 +0800 crypto: api - Disable boot-test-finished if algapi is a module The boot-test-finished toggle is only necessary if algapi is built into the kernel. Do not include this code if it is a module. Signed-off-by: Herbert Xu commit b42519dbba838c928e82b55f32712fbe3eed2c45 Author: Danny Tsen Date: Thu May 16 11:19:57 2024 -0400 crypto: ppc/curve25519 - Update Kconfig and Makefile for ppc64le Defined CRYPTO_CURVE25519_PPC64 to support X25519 for ppc64le. Added new module curve25519-ppc64le for X25519. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit a1bfed35d081112582f688947141763e75e090ee Author: Danny Tsen Date: Thu May 16 11:19:56 2024 -0400 crypto: ppc/curve25519 - Core functions for ppc64le X25519 core functions to handle scalar multiplication for ppc64le. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit bbb66f218d9e12c5bd5a6208e96e5117449c7c88 Author: Danny Tsen Date: Thu May 16 11:19:55 2024 -0400 crypto: ppc/curve25519 - Low-level primitives for ppc64le Use the perl output of x25519-ppc64.pl from CRYPTOGAMs (see https://github.com/dot-asm/cryptogams/) and added four supporting functions, x25519_fe51_sqr_times, x25519_fe51_frombytes, x25519_fe51_tobytes and x25519_cswap. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit 6684f97981c528965d7458dd4f89cfbc8fa980b2 Author: Deming Wang Date: Mon May 13 02:07:42 2024 -0400 crypto: qat - Fix typo The mapings should be replaced by mappings. Signed-off-by: Deming Wang Signed-off-by: Herbert Xu commit 198faf0301ce1a51b9c859510ab884020dcb6f19 Author: Dr. David Alan Gilbert Date: Sat May 11 15:56:20 2024 +0100 crypto: n2 - Remove unused struct 'n2_skcipher_request_context' 'n2_skcipher_request_context' was added in commit 23a6564a6b51 ("crypto: niagara2 - switch to skcipher API") but never used. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Herbert Xu commit eaa857782fdbba36544c74006d8037f4d101b90a Author: Dr. David Alan Gilbert Date: Sat May 11 15:54:26 2024 +0100 crypto: hifn_795x - Remove unused hifn_*_command structs Remove 'hifn_mac_command' and 'hifn_comp_command' which are unused. They're the same structure as 'hifn_crypt_command' which is used. (I was tempted to remove hifn_base_result hifn_comp_result hifn_mac_result and hifn_crypt_result which are also unused, but they vary, and perhaps they're telling someone in the future what to look at.) Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Herbert Xu commit e793f6c4dabe56cb8b93db26bbfcfba2a65f7215 Author: Dr. David Alan Gilbert Date: Sat May 11 15:52:00 2024 +0100 crypto: ccree - Remove unused struct 'tdes_keys' 'tdes_keys' appears unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 2dcdf3be65e968b4a67209a825a69b098e73cb25 Author: Dr. David Alan Gilbert Date: Sat May 11 15:50:17 2024 +0100 crypto: axis - Remove unused struct 'dbgfs_u32' 'dbgfs_u32' appears unused. Remove it. (pdma_stat_descr is also unused, but I'm assuming it's some useful layout description of firmware/hardware so best left in) Signed-off-by: Dr. David Alan Gilbert Acked-by: Jesper Nilsson Signed-off-by: Herbert Xu commit adc5167be5553ff2f68cd6a36de0106f1f73c1ea Author: Tony Luck Date: Wed Apr 24 11:14:58 2024 -0700 crypto: x86/poly1305 - Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Herbert Xu commit b2d3d79780fa8e579aecfab6bb99c6693f3ef9ee Author: Tony Luck Date: Wed Apr 24 11:14:58 2024 -0700 crypto: x86/twofish - Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Herbert Xu commit c9402efe492bb46ccbf94fedc4783eb8f8747567 Author: Christian König Date: Wed May 29 10:43:22 2024 +0200 dma-buf: add a warning when drv try to reserve 0 fence slots When dma_resv_reserve_fences() is called with num_fences=0 it usually means that a driver or other component messed up its calculation how many fences are needed. Warn in that situation. When no fence are needed the function shouldn't be called in the first place. Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20240529084322.2284-1-christian.koenig@amd.com Reviewed-by: Matthew Auld commit 53d916d9a425fb10e974318991b9748a05efaaea Author: Jani Nikula Date: Wed May 22 20:33:47 2024 +0300 drm/i915/display: add probe message Add an info message about which display device was probed. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/f9a4d015a2981ace2ef5b40b189efeaf6b18fb29.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 16b79b3397a314bfc7f08d8e5d52e9b09c6a0481 Author: Jani Nikula Date: Wed May 22 20:33:46 2024 +0300 drm/i915/display: add support for subplatforms Add support for subplatforms. This is similar to what the xe driver is doing. The subplatform is an enum and it's exclusive, i.e. only one subplatform can match, and it completely identifies the platform and subplatform. This is different from i915 core, and is notable in the handling of ULT/ULX and RPL/RPL-U. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/8c04e32648395c0b745bc31a1edd4ef6f574bb70.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b27259626a4f7f83ef0addf84e068e298ef7a231 Author: Jani Nikula Date: Wed May 22 20:33:45 2024 +0300 drm/i915/display: identify platforms with enum and name Add enum intel_display_platform and add that and name to all platform descriptors. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/5dec70931217cd93e3ef34f7a57f949f6683f048.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 54836ee194f9be651d5efde0037d51b700e6b3e9 Author: Jani Nikula Date: Wed May 22 20:33:44 2024 +0300 drm/i915/display: change display probe to identify GMD ID based platforms We'll need to identify all platforms, including the ones that have display defined by GMD ID. Add MTL and LNL. Their display info will still be probed via GMD ID. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/e26f6a1a0aa2b051f49d76242194f819be3d83fd.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit f498d28977ab76ede14d4a78047e54a215c0a9d9 Author: Jani Nikula Date: Wed May 22 20:33:43 2024 +0300 drm/i915: add LNL PCI IDs Although not supported by i915 core, the display code needs to know the LNL PCI IDs. Long term, xe and i915 should probably share the file defining PCI IDs. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/d2baf7f89ed4df63674dac3d59982de69a7b14d4.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 785778ce21cf50cbd3ce6cad0bf4e6c0ba3a3b41 Author: Jani Nikula Date: Wed May 22 20:33:42 2024 +0300 drm/i915/display: add platform descriptors We'll need to start identifying the platforms independently in display code in order to break free from the i915 and xe IS_() macros. This is fairly straightforward, as we already identify most platforms by PCI ID in display probe anyway. As the first step, add platform descriptors with pointers to display info. We'll have more platforms than display info, so minimize duplication: - Add separate skl/kbl/cfl/cml descriptors while they share the display info. - Add separate jsl/ehl descriptors while they share the display info. Identify ADL-P (and derivatives) and DG2 descriptors by their names even though their display info is Xe LPD or HPD. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/45425c155608403efc149d4a022c0b443aa71200.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit fdf531b80345aa0ffb15dd6b3c3db52f1f194abe Author: Jani Nikula Date: Wed May 22 20:33:41 2024 +0300 drm/i915/display: change GMD ID display ip ver propagation at probe Add a name to the display ip version structure, and pass that around instead of a triplet of u16's. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1610e9f5675b4d0d4f16ecd10a86486ce309a283.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit cb9d05b9c2696431db1501160dab9f81a23ab0e3 Author: Jani Nikula Date: Wed May 22 20:33:40 2024 +0300 drm/i915/display: check platforms without display one level higher The main change here is that the check for platforms without display is now also done for GMD ID based platforms. However, without matches, the end result is the same. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/78d5d326c4c89f1942f120655c279c9274e96bfb.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ae6daede02d2a31171fd20887363e59f4aec3768 Author: Jani Nikula Date: Wed May 22 20:33:39 2024 +0300 drm/i915/display: change probe for no display case Return NULL for errors, and handle the no display case in one location. This will make subsequent changes easier. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/8dfac3532a72ca6494c9955987166d9c6e0919bd.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 54698865addac97faa8dea4e07be838219128186 Author: Jani Nikula Date: Wed May 22 20:33:38 2024 +0300 drm/i915/display: move params copy at probe earlier Copy the parameters earlier to make subsequent changes easier. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/a0c3e74d824d8a7c02fa1461c3d5518a71171256.1716399081.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 42493f7cb2c96ef96cce5809878ee2fa0ce63b1f Author: Animesh Manna Date: Thu May 30 01:37:42 2024 +0530 drm/i915/alpm: Add debugfs for LOBF For validation purpose add debugfs for LOBF. v1: Initial version. v2: Add aux-wake/less info along with lobf status. [Jouni] Reviewed-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-7-animesh.manna@intel.com commit 5a9b255fdb2b235502bcfc0951d71c0c3f6d030e Author: Animesh Manna Date: Thu May 30 01:37:41 2024 +0530 drm/i915/alpm: Enable lobf from source in ALPM_CTL Set the Link Off Between Frames Enable bit in ALPM_CTL register. Note: Lobf need to be enabled adaptive sync fixed refresh mode where vmin = vmax = flipline, which will arise after cmmr feature enablement. Will add enabling sequence in a separate patch. v1: Initial version. v2: Condition check modified in alpm_configure(). [Jouni] Reviewed-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-6-animesh.manna@intel.com commit 15438b32598744cf207398dc3e02bf88db42cf9a Author: Animesh Manna Date: Thu May 30 01:37:40 2024 +0530 drm/i915/alpm: Add compute config for lobf Link Off Between Active Frames, is a new feature for eDP that allows the panel to go to lower power state after transmission of data. This is a feature on top of ALPM, AS SDP. Add compute config during atomic-check phase. v1: RFC version. v2: Add separate flag for auxless-alpm. [Jani] v3: - intel_dp->lobf_supported replaced with crtc_state->has_lobf. [Jouni] - Add DISPLAY_VER() check. [Jouni] - Modify function name of get_aux_less_status. [Jani] v4: Add enum alpm_mode to hold the aux-wake/less capability. v5: Add alpm_dpcd to intel_dp and use aux_wake_supported()/ aux_less_wake_supported() instead of enum alpm_mode. [Jouni] Reviewed-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-5-animesh.manna@intel.com commit b09469817812ed30c2fda685831a1779437c9c11 Author: Jouni Högander Date: Thu May 30 01:37:39 2024 +0530 drm/display: Add missing aux less alpm wake related bits eDP1.5 adds some more bits into DP_RECEIVER_ALPM_CAP and DP_RECEIVER_ALPM_CONFIG registers. Add definitions for these. Acked-by: Maxime Ripard Reviewed-by: Ankit Nautiyal Signed-off-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-4-animesh.manna@intel.com commit 8bdbde7c4c84286aff55c0af37bcf0a72828d98f Author: Animesh Manna Date: Thu May 30 01:37:38 2024 +0530 drm/i915/alpm: Move alpm related code to a new file Move ALPM feature related code as it will be used for non-psr panel also thorugh LOBF feature. v1: Initial version. v2: Correct ordering in makefile. [Jani] Reviewed-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-3-animesh.manna@intel.com commit dd73925e3b84bcf2b29c20d6276843e7ed7cd771 Author: Animesh Manna Date: Thu May 30 01:37:37 2024 +0530 drm/i915/alpm: Move alpm parameters from intel_psr ALPM can be enabled for non psr panel and currenly aplm-params are encapsulated under intel_psr struct, so moving out to intel_dp struct. Reviewed-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240529200742.1694401-2-animesh.manna@intel.com commit bba1f6758a9ec90c1adac5dcf78f8a15f1bad65b Author: Al Viro Date: Thu May 30 23:58:26 2024 -0400 lirc: rc_dev_get_from_fd(): fix file leak missing fdput() on a failure exit Fixes: 6a9d552483d50 "media: rc: bpf attach/detach requires write permission" # v6.9 Signed-off-by: Al Viro commit b4cf5fc01ce83e5c0bcf3dbb9f929428646b9098 Author: Al Viro Date: Thu May 30 23:54:55 2024 -0400 powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() missing fdput() on one of the failure exits Fixes: eacc56bb9de3e # v5.2 Signed-off-by: Al Viro commit ccf23c916ca35239a924ec8649cc88b1ef25d3d9 Author: Jakub Kicinski Date: Wed May 29 12:20:31 2024 -0700 tools: ynl: make the attr and msg helpers more C++ friendly Folks working on a C++ codegen would like to reuse the attribute helpers directly. Add the few necessary casts, it's not too ugly. Reviewed-by: Donald Hunter Reviewed-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20240529192031.3785761-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0abccaf0f9bd2a87aa6512da69f0e3630f3048ee Merge: 2f19a795e1f9c ab77c7aa9388c Author: Jakub Kicinski Date: Thu May 30 18:32:21 2024 -0700 Merge branch 'net-phylink-rearrange-ovr_an_inband-support' Russell King says: ==================== net: phylink: rearrange ovr_an_inband support This series addresses the use of the ovr_an_inband flag, which is used by two drivers to indicate to phylink that they wish to use inband mode without firmware specifying inband mode. The issue with ovr_an_inband is that it overrides not only PHY mode, but also fixed-link mode. Both of the drivers that set this flag contain code to detect when fixed-link mode will be used, and then either avoid setting it or explicitly clear the flag. This is wasteful when phylink already knows this. Therefore, the approach taken in this patch set is to replace the ovr_an_inband flag with a default_an_inband flag which means that phylink defaults to MLO_AN_INBAND instead of MLO_AN_PHY, and will allow that default to be overriden if firmware specifies a fixed-link. This allows users of ovr_an_inband to be simplified. What's more is this requires minimal changes in phylink to allow this new mode of operation. This series changes phylink, and also updates the two drivers (fman_memac and stmmac), and then removes the unnecessary complexity from the drivers. This series may depend on the stmmac cleanup series I've posted earlier - this is something I have not checked, but I currently have these patches on top of that series. ==================== Link: https://lore.kernel.org/r/ZlctinnTT8Xhemsm@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit ab77c7aa9388ccc82102c9e448112ab478bba80c Author: Russell King (Oracle) Date: Wed May 29 14:29:45 2024 +0100 net: stmmac: dwmac-intel: remove checking for fixed link With the new default_an_inband functionality in phylink, there is no need to check for a fixed link when this flag is set, since a fixed link will now override default_an_inband. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/E1sCJNB-00EcrJ-7L@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 83f55b01dd903040d6ab64f4f9d78a27391a5916 Author: Russell King (Oracle) Date: Wed May 29 14:29:40 2024 +0100 net: stmmac: rename xpcs_an_inband to default_an_inband Rename xpcs_an_inband to default_an_inband to reflect the change in phylink and its changed functionality. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/E1sCJN6-00EcrD-43@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 5e332954e7609acc9a265fcd9df53a3102206c8d Author: Russell King (Oracle) Date: Wed May 29 14:29:35 2024 +0100 net: fman_memac: remove the now unnecessary checking for fixed-link Since default_an_inband can be overriden by a fixed-link specification, there is no need for memac to be checking for this before setting default_an_inband. Remove this code and update the comment. Signed-off-by: Russell King (Oracle) Reviewed-by: Sean Anderson Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/E1sCJN1-00Ecr7-02@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 02d00dc73d8d0613f82063ed53d67912a422c21e Author: Russell King (Oracle) Date: Wed May 29 14:29:29 2024 +0100 net: phylink: rename ovr_an_inband to default_an_inband Since ovr_an_inband no longer overrides every MLO_AN_xxx mode, rename it to reflect what it now does - it changes the default mode from MLO_AN_PHY to MLO_AN_INBAND. Fix up the two users of this. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/E1sCJMv-00Ecr1-Sk@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit fea49f065c1cff71a86e7629094f912531edf035 Author: Russell King (Oracle) Date: Wed May 29 14:29:24 2024 +0100 net: phylink: move test for ovr_an_inband Of the two users of phylink_config->ovr_an_inband, both manually check for a fixed link before setting this flag (or clearing it if they find a fixed link.) This is unnecessary complication. Test ovr_an_inband before checking for the fixed-link properties, which will allow ovr_an_inband to be overriden by a fixed link specification. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/E1sCJMq-00Ecqv-P8@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 75518b0dc9d602bdd0e0ee4e04806dff53cb761a Author: Russell King (Oracle) Date: Wed May 29 14:29:19 2024 +0100 net: phylink: rearrange phylink_parse_mode() Of the two users of phylink_config->ovr_an_inband, both manually check for a fixed link before setting this flag (or clearing it if they find a fixed link.) This is unnecessary complication. Rearrange phylink_parse_mode() a little so we can change how phylink_config->ovr_an_inband works. This will allow the flag to be tested before checking for the fixed link properties in the next patch. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/E1sCJMl-00Ecqp-K0@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 2f19a795e1f9c722b182f9a3d3dedd80f90a0715 Author: MD Danish Anwar Date: Wed May 29 17:22:25 2024 +0530 dt-bindings: net: ti: icssg_prueth: Add documentation for PA_STATS support Add documentation for ti,pa-stats property which is syscon regmap for PA_STATS registers. This will be used to dump statistics maintained by ICSSG firmware. Signed-off-by: MD Danish Anwar Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240529115225.630535-1-danishanwar@ti.com Signed-off-by: Jakub Kicinski commit aedf2dc432484ab534a9ad24477da5bb59abdca3 Merge: a79d8fe2ff8e7 7efc706577046 Author: Jakub Kicinski Date: Thu May 30 18:30:12 2024 -0700 Merge branch 'net-stmmac-cleanups' Russell King says: ==================== net: stmmac: cleanups This series removes various redundant items in the stmmac driver: - the unused TBI and RTBI PCS flags - the NULL pointer initialisations for PCS methods in dwxgmac2 - the stmmac_pcs_rane() method which is never called, and it's associated implementations - the redundant netif_carrier_off()s Finally, it replaces asm/io.h with the preferred linux/io.h. ==================== Link: https://lore.kernel.org/r/Zlbp7xdUZAXblOZJ@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 7efc706577046a8dd2a11ba7942e3a52a30c8b68 Author: Russell King (Oracle) Date: Wed May 29 09:40:59 2024 +0100 net: stmmac: ethqos: clean up setting serdes speed There are four repititions of the same sequence of code, three of which are identical. Pull these out into a separate function to improve readability. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Halaney Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/E1sCErj-00EOQ9-Vh@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit cd56ff75ccfc37aab4b35b17b84d3ba08f33b933 Author: Russell King (Oracle) Date: Wed May 29 09:40:54 2024 +0100 net: stmmac: include linux/io.h rather than asm/io.h Include linux/io.h instead of asm/io.h since linux/ includes are preferred. Reviewed-by: Andrew Halaney Signed-off-by: Russell King (Oracle) Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/E1sCEre-00EOQ3-SR@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit aee04f4bb44d47205f4db9e84384116bb213160e Author: Russell King (Oracle) Date: Wed May 29 09:40:49 2024 +0100 net: stmmac: remove unnecessary netif_carrier_off() It is incorrect to call netif_carrier_off(), or in fact any driver teardown, before unregister_netdev() has been called. unregister_netdev() unpublishes the network device from userspace, and takes the interface down if it was up prior to returning. Therefore, once the call has returned, we are guaranteed that .ndo_stop() will have been called for an interface that was up. Phylink will take the carrier down via phylink_stop(), making any manipulation of the carrier in the remove path unnecessary. In the stmmac_release() path, the netif_carrier_off() call follows the call to phylink_stop(), so this call is redundant. Reviewed-by: Andrew Halaney Signed-off-by: Russell King (Oracle) Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/E1sCErZ-00EOPx-PF@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 3277407e5e8217cb7550453fe3184d0de511f377 Author: Russell King (Oracle) Date: Wed May 29 09:40:44 2024 +0100 net: stmmac: remove pcs_rane() method The pcs_rane() method is not called, so lets just remove this redundant code. Reviewed-by: Andrew Halaney Signed-off-by: Russell King (Oracle) Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/E1sCErU-00EOPr-MC@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 4af90c0f484491a1bdccc7c3bfe9b7411868b139 Author: Russell King (Oracle) Date: Wed May 29 09:40:39 2024 +0100 net: stmmac: dwxgmac2: remove useless NULL pointer initialisations Remove useless NULL pointer initialisations for "PCS" methods from the dwxgmac2 code. Reviewed-by: Andrew Halaney Signed-off-by: Russell King (Oracle) Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/E1sCErP-00EOPl-IT@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 482b3c3ba757f8fb7368f208b411d2bad3004702 Author: Serge Semin Date: Wed May 29 09:40:34 2024 +0100 net: stmmac: Drop TBI/RTBI PCS flags First of all the flags are never set by any of the driver parts. If nobody have them set then the respective statements will always have the same result. Thus the statements can be simplified or even dropped with no risk to break things. Secondly shall any of the TBI or RTBI flag is set the MDIO-bus registration will be bypassed. Why? It really seems weird. It's perfectly fine to have a TBI/RTBI-capable PHY configured over the MDIO bus interface. Based on the notes above the TBI/RTBI PCS flags can be freely dropped thus simplifying the driver code. Reviewed-by: Andrew Halaney Signed-off-by: Serge Semin Signed-off-by: Russell King (Oracle) Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/E1sCErK-00EOPf-EP@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit a79d8fe2ff8e78e549dc86cc853a61b029404871 Author: Hangbin Liu Date: Wed May 29 12:09:08 2024 +0800 ipv6: sr: restruct ifdefines There are too many ifdef in IPv6 segment routing code that may cause logic problems. like commit 160e9d275218 ("ipv6: sr: fix invalid unregister error path"). To avoid this, the init functions are redefined for both cases. The code could be more clear after all fidefs are removed. Suggested-by: Simon Horman Suggested-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Sabrina Dubroca Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240529040908.3472952-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 57e3c5af2befaf54cbae326fe800c148852e67a1 Author: Jakub Kicinski Date: Tue May 28 19:33:22 2024 -0700 net: fjes: correct TRACE_INCLUDE_PATH A comment in define_trace.h clearly states: TRACE_INCLUDE_PATH if the path is something other than core kernel vvvvvvvvvvvvvv include/trace then this macro can define the path to use. Note, the path is relative to define_trace.h, not the file including it. Full path names ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for out of tree modules must be used. fjes uses path relative to itself. Which (somehow) works most of the time. Except when the kernel tree is "nested" in another kernel tree, and ../drivers/net/fjes actually exists. In which case build will use the header file from the wrong directory. I've been trying to figure out why net NIPA builder is constantly failing for the last 5 days, with: include/trace/../../../drivers/net/fjes/fjes_trace.h:88:17: error: ‘__assign_str’ undeclared (first use in this function) 88 | __assign_str(err, err); | ^~~~~~~~~~~~ when the line in the tree clearly has only one "err". NIPA does indeed have "nested" trees, because it uses git work-trees and the tree on the "outside" is not very up to date. Link: https://lore.kernel.org/r/20240529023322.3467755-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 15a229507db3d43e0738ac2ac540bf3505c7de47 Merge: e3bbb994a7e0e a54e2a36b68c3 Author: Jakub Kicinski Date: Thu May 30 18:10:38 2024 -0700 Merge branch 'ionic-updates-for-v6-11' Shannon Nelson says: ==================== ionic: updates for v6.11 These are a few minor fixes for the ionic driver to clean up a some little things that have been waiting for attention. These were originally sent for net, but now respun for net-next. v1: https://lore.kernel.org/netdev/20240521013715.12098-1-shannon.nelson@amd.com/ ==================== Link: https://lore.kernel.org/r/20240529000259.25775-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit a54e2a36b68c30822d3571b969e24aa429b3d1a5 Author: Shannon Nelson Date: Tue May 28 17:02:59 2024 -0700 ionic: fix up ionic_if.h kernel-doc issues All the changes here are whitespace and comments, no code or definitions changed. Not all issues were addressed, but it is much better than it was. Mostly fixed was a lot of "Excess union member" and ''rsvd' not described' warnings. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240529000259.25775-8-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 488da00479d50ec5970b3f84e9fad2c5fda2d78c Author: Shannon Nelson Date: Tue May 28 17:02:58 2024 -0700 ionic: only sync frag_len in first buffer of xdp We don't want to try to sync more length than might be in the first frag of an Rx skb, so make sure to use the frag_len rather than the full len. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240529000259.25775-7-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit fc53d46524480a732a233bc9d6cdf6155205d9eb Author: Brett Creeley Date: Tue May 28 17:02:57 2024 -0700 ionic: Use netdev_name() function instead of netdev->name There is no reason not to use netdev_name() in these places, so do just as the title states. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Kalesh AP Link: https://lore.kernel.org/r/20240529000259.25775-6-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit d9c04209990be6c03a354b124e012293273e05d5 Author: Brett Creeley Date: Tue May 28 17:02:56 2024 -0700 ionic: Mark error paths in the data path as unlikely As the title states, mark unlikely error paths in the data path as unlikely. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240529000259.25775-5-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 4dde9588c54d1d86a415a5ed7dc6d8a605fe11ce Author: Brett Creeley Date: Tue May 28 17:02:55 2024 -0700 ionic: Pass ionic_txq_desc to ionic_tx_tso_post Pass the ionic_txq_desc instead of re-referencing it from the q->txq array since the caller to ionic_tx_tso_post will always have the current ionic_txq_desc pointer already. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240529000259.25775-4-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 8097a2f3d21a672c772ca1919f253e611f2f0bad Author: Shannon Nelson Date: Tue May 28 17:02:54 2024 -0700 ionic: Reset LIF device while restarting LIF Recovery from broken states can be hard. If the LIF reset in the fw_down path didn't work because the PCI link was broken, the FW won't be in the right state for proper restart. We can fire another LIF reset in the fw_up path to be sure things are clean on restart. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240529000259.25775-3-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 3eb76e71b16e8ba5277bf97617aef51f5e64dbe4 Author: Shannon Nelson Date: Tue May 28 17:02:53 2024 -0700 ionic: fix potential irq name truncation Address a warning about potential string truncation based on the string buffer sizes. We can add some hints to the string format specifier to set limits on the resulting possible string to squelch the complaints. Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240529000259.25775-2-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit e8a1d87b7983b461d1d625e2973cdaadc0bd8ff5 Author: Minwoo Im Date: Mon May 20 07:14:57 2024 +0900 scsi: ufs: mcq: Convert MCQ_CFG_n to an inline function Inline functions are preferred over macros. Convert the MCQ_CFG_n macro to an inline function. Signed-off-by: Minwoo Im Link: https://lore.kernel.org/r/20240519221457.772346-3-minwoo.im@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2fc39848952dfb91a9233563cc1444669b8e79c3 Author: Minwoo Im Date: Mon May 20 07:14:56 2024 +0900 scsi: ufs: mcq: Fix missing argument 'hba' in MCQ_OPR_OFFSET_n The MCQ_OPR_OFFSET_n macro takes 'hba' in the caller context without receiving 'hba' instance as an argument. To prevent potential bugs in future use cases, add an argument 'hba'. Fixes: 2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface") Cc: Asutosh Das Signed-off-by: Minwoo Im Link: https://lore.kernel.org/r/20240519221457.772346-2-minwoo.im@samsung.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e3bbb994a7e0ead1e028c5a8ec5f8526b4a9c5c9 Author: Arnd Bergmann Date: Tue May 28 18:15:25 2024 +0200 hns3: avoid linking objects into multiple modules Each object file contains information about which module it gets linked into, so linking the same file into multiple modules now causes a warning: scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_cmd.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_rss.o is added to multiple modules: hclge hclgevf scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_tqp_stats.o is added to multiple modules: hclge hclgevf Change the way that hns3 is built by moving the three common files into a separate module with exported symbols instead. Fixes: 5f20be4e90e6 ("net: hns3: refactor hns3 makefile to support hns3_common module") Signed-off-by: Arnd Bergmann Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20240528161603.2443125-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 727c94c9539aa8865cdbf6a783da6a6585f1fec2 Author: Arnd Bergmann Date: Tue May 28 17:25:05 2024 +0200 ethernet: octeontx2: avoid linking objects into multiple modules Each object file contains information about which module it gets linked into, so linking the same file into multiple modules now causes a warning: scripts/Makefile.build:254: drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_devlink.o is added to multiple modules: rvu_nicpf rvu_nicvf Change the way that octeontx2 ethernet is built by moving the common file into a separate module with exported symbols instead. Signed-off-by: Arnd Bergmann Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20240528152527.2148092-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 23646f013404a69e2cc5b1be51eef67e720d7021 Merge: 96281dfa266d3 600edc6620a43 Author: Martin K. Petersen Date: Thu May 30 20:36:08 2024 -0400 Merge patch series "scsi: ufs: Allow RTT negotiation" Avri Altman says: The rtt-upiu packets precede any data-out upiu packets, thus synchronizing the data input to the device: this mostly applies to write operations, but there are other operations that requires rtt as well. There are several rules binding this rtt - data-out dialog, specifically There can be at most outstanding bMaxNumOfRTT such packets. This might have an effect on write performance (sequential write in particular), as each data-out upiu must wait for its rtt sibling. UFSHCI expects bMaxNumOfRTT to be min(bDeviceRTTCap, NORTT). However, as of today, there does not appear to be no-one who sets it: not the host controller nor the driver. It wasn't an issue up to now: bMaxNumOfRTT is set to 2 after manufacturing, and wasn't limiting the write performance. UFS4.0, and specifically gear 5 changes this, and requires the device to be more attentive. This doesn't come free - the device has to allocate more resources to that end, but the sequential write performance improvement is significant. Early measurements shows 25% gain when moving from rtt 2 to 9. Therefore, set bMaxNumOfRTT to be min(bDeviceRTTCap, NORTT) as UFSHCI expects. Link: https://lore.kernel.org/r/20240530142510.734-1-avri.altman@wdc.com Signed-off-by: Martin K. Petersen commit 600edc6620a4380b9f6027f293dac09eb0f22048 Author: Avri Altman Date: Thu May 30 17:25:09 2024 +0300 scsi: ufs: sysfs: Make max_number_of_rtt read-write Given the importance of the RTT parameter, we want to be able to configure it via sysfs. This is because UFS users should be discouraged from change UFS device parameters without the UFSHCI driver being aware of these changes. Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20240530142510.734-4-avri.altman@wdc.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e75ff63300c5e8fac31649f438ebad6af88e0032 Author: Avri Altman Date: Thu May 30 17:25:08 2024 +0300 scsi: ufs: core: Maximum RTT supported by the host driver Allow platform vendors to take precedence having their own max rtt support. This makes sense because the host controller's nortt characteristic may vary among vendors. while at it, set this value for Mediatek, as requested by Peter - https://lore.kernel.org/all/0a57d6bab739d6a10584f2baba115d00dfc9c94c.camel@mediatek.com/ Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20240530142510.734-3-avri.altman@wdc.com Reviewed-by: Peter Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 9ec54934ce857065e38523a2010e20182e76f515 Author: Avri Altman Date: Thu May 30 17:25:07 2024 +0300 scsi: ufs: core: Allow RTT negotiation The rtt-upiu packets precede any data-out upiu packets, thus synchronizing the data input to the device: this mostly applies to write operations, but there are other operations that requires rtt as well. There are several rules binding this rtt - data-out dialog, specifically There can be at most outstanding bMaxNumOfRTT such packets. This might have an effect on write performance (sequential write in particular), as each data-out upiu must wait for its rtt sibling. UFSHCI expects bMaxNumOfRTT to be min(bDeviceRTTCap, NORTT). However, as of today, there does not appears to be no-one who sets it: not the host controller nor the driver. It wasn't an issue up to now: bMaxNumOfRTT is set to 2 after manufacturing, and wasn't limiting the write performance. UFS4.0, and specifically gear 5 changes this, and requires the device to be more attentive. This doesn't come free - the device has to allocate more resources to that end, but the sequential write performance improvement is significant. Early measurements shows 25% gain when moving from rtt 2 to 9. Therefore, set bMaxNumOfRTT to be min(bDeviceRTTCap, NORTT) as UFSHCI expects. Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20240530142510.734-2-avri.altman@wdc.com Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 96281dfa266d333522c004205acc5ff1e9e3a337 Author: Dr. David Alan Gilbert Date: Tue May 28 22:56:40 2024 +0100 scsi: qla2xxx: Remove unused struct 'scsi_dif_tuple' 'scsi_dif_tuple' is unused since commit 8cb2049c7448 ("[SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors."). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240528215640.91771-1-linux@treblig.org Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 41b757425203a73ba5aa401cf00feeccc1555f0c Author: John Garry Date: Fri May 24 08:48:29 2024 +0000 scsi: bsg: Pass dev to blk_mq_alloc_queue() When calling bsg_setup_queue() -> blk_mq_alloc_queue(), we don't pass the dev as the queuedata, but rather manually set it afterwards. Just pass dev to blk_mq_alloc_queue() to have automatically set. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240524084829.2132555-3-john.g.garry@oracle.com Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Tested-by: Himanshu Madhani Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e7c09df178f740b74a077bbc16ed0bd872ad0581 Author: John Garry Date: Fri May 24 08:48:28 2024 +0000 scsi: core: Pass sdev to blk_mq_alloc_queue() When calling scsi_alloc_sdev() -> blk_mq_alloc_queue(), we don't pass the sdev as the queuedata, but rather manually set it afterwards. Just pass to blk_mq_alloc_queue() to have automatically set. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20240524084829.2132555-2-john.g.garry@oracle.com Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Tested-by: Himanshu Madhani Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 030fae30f0596ae1502cc7fc2557721617adaa7c Merge: 95cd03f32a168 a5602c6edf7cb Author: Jakub Kicinski Date: Thu May 30 17:14:47 2024 -0700 Merge branch 'mlx4-add-support-for-netdev-genl-api' Joe Damato says: ==================== mlx4: Add support for netdev-genl API There are no functional changes from v5, which I mistakenly sent right after net-next was closed (oops). This revision, however, includes Tariq's Reviewed-by tags of the v5 in each commit message. See the changelog below. This series adds support to mlx4 for the netdev-genl API which makes it much easier for users and user programs to map NAPI IDs back to ifindexes, queues, and IRQs. This is extremely useful for a number of use cases, including epoll-based busy poll. In addition, this series includes a patch to generate per-queue statistics using the netlink API, as well. To facilitate the stats, patch 1/3 adds a field "alloc_fail" to the ring structure. This is incremented by the driver in an appropriate place and used in patch 3/3 as alloc_fail. Please note: I do not have access to mlx4 hardware, but I've been working closely with Martin Karsten from University of Waterloo (CC'd) who has very graciously tested my patches on their mlx4 hardware (hence his Tested-by attribution in each commit). His latest research work is particularly interesting [1] and this series helps to support that (and future) work. Martin re-test v4 using Jakub's suggested tool [2] and the stats.pkt_byte_sum and stats.qstat_by_ifindex tests passed. He also adjusted the queue count and re-ran test to confirm it still passed even if the queue count was modified. [1]: https://dl.acm.org/doi/pdf/10.1145/3626780 [2]: https://lore.kernel.org/lkml/20240423175718.4ad4dc5a@kernel.org/ ==================== Link: https://lore.kernel.org/r/20240528181139.515070-1-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit a5602c6edf7cbf5d69a32f089fb3938f42a3ff03 Author: Joe Damato Date: Tue May 28 18:11:38 2024 +0000 net/mlx4: support per-queue statistics via netlink Make mlx4 compatible with the newly added netlink queue stats API. Signed-off-by: Joe Damato Tested-by: Martin Karsten Reviewed-by: Tariq Toukan Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20240528181139.515070-4-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit 64b62146ba9ee78c67e079b2ff09b106d8d6fd57 Author: Joe Damato Date: Tue May 28 18:11:37 2024 +0000 net/mlx4: link NAPI instances to queues and IRQs Make mlx4 compatible with the newly added netlink queue GET APIs. Signed-off-by: Joe Damato Tested-by: Martin Karsten Acked-by: Jakub Kicinski Reviewed-by: Tariq Toukan Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20240528181139.515070-3-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit 6166bb0cacb62c388e4ed06167511a70591cc59a Author: Joe Damato Date: Tue May 28 18:11:36 2024 +0000 net/mlx4: Track RX allocation failures in a stat mlx4_en_alloc_frags currently returns -ENOMEM when mlx4_alloc_page fails but does not increment a stat field when this occurs. A new field called alloc_fail has been added to struct mlx4_en_rx_ring which is now incremented in mlx4_en_rx_ring when -ENOMEM occurs. Signed-off-by: Joe Damato Tested-by: Martin Karsten Reviewed-by: Tariq Toukan Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20240528181139.515070-2-jdamato@fastly.com Signed-off-by: Jakub Kicinski commit c4e3267868e1debb3d87d21a36efc8a2255298e2 Author: Dmitry Baryshkov Date: Fri May 3 21:15:04 2024 +0300 drm/ci: validate drm/msm XML register files against schema In order to validate drm/msm register definition files against schema, reuse the nodebugfs build step. The validation entry is guarded by the EXPERT Kconfig option and we don't want to enable that option for all the builds. Reviewed-by: Abhinav Kumar Acked-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240503-fd-fix-lxml-v2-2-f80a60ce21a1@linaro.org Signed-off-by: Dmitry Baryshkov commit 3f8fde319524411b96badee3c96f35831300388a Merge: 46253c4ae9616 d14c1fac0c972 Author: Martin KaFai Lau Date: Thu May 30 10:34:53 2024 -0700 Merge branch 'Notify user space when a struct_ops object is detached/unregistered' Kui-Feng Lee says: ==================== The subsystems managing struct_ops objects may need to detach a struct_ops object due to errors or other reasons. It would be useful to notify user space programs so that error recovery or logging can be carried out. This patch set enables the detach feature for struct_ops links and send an event to epoll when a link is detached. Subsystems could call link->ops->detach() to detach a link and notify user space programs through epoll. The signatures of callback functions in "struct bpf_struct_ops" have been changed as well to pass an extra link argument to subsystems. Subsystems could detach the links received from reg() and update() callbacks if there is. This also provides a way that subsystems can distinguish registrations for an object that has been registered multiple times for several links. However, bpf struct_ops maps without BPF_F_LINK have no any link. Subsystems will receive NULL link pointer for this case. --- Changes from v6: - Fix the missing header at patch 5. - Move RCU_INIT_POINTER() back to its original position. Changes from v5: - Change the commit title of the patch for bpftool. Changes from v4: - Change error code for bpf_struct_ops_map_link_update() - Always return 0 for bpf_struct_ops_map_link_detach() - Hold update_mutex in bpf_struct_ops_link_create() - Add a separated instance of file_operations for links supporting poll. - Fix bpftool for bpf_link_fops_poll. Changes from v3: - Add a comment to explain why holding update_mutex is not necessary in bpf_struct_ops_link_create() - Use rcu_access_pointer() in bpf_struct_ops_map_link_poll(). Changes from v2: - Rephrased commit logs and comments. - Addressed some mistakes from patch splitting. - Replace mutex with spinlock in bpf_testmod.c to address lockdep Splat and simplify the implementation. - Fix an argument passing to rcu_dereference_protected(). Changes from v1: - Pass a link to reg, unreg, and update callbacks. - Provide a function to detach a link from underlying subsystems. - Add a kfunc to mimic detachments from subsystems, and provide a flexible way to control when to do detachments. - Add two tests to detach a link from the subsystem after the refcount of the link drops to zero. v6: https://lore.kernel.org/bpf/20240524223036.318800-1-thinker.li@gmail.com/ v5: https://lore.kernel.org/all/20240523230848.2022072-1-thinker.li@gmail.com/ v4: https://lore.kernel.org/all/20240521225121.770930-1-thinker.li@gmail.com/ v3: https://lore.kernel.org/all/20240510002942.1253354-1-thinker.li@gmail.com/ v2: https://lore.kernel.org/all/20240507055600.2382627-1-thinker.li@gmail.com/ v1: https://lore.kernel.org/all/20240429213609.487820-1-thinker.li@gmail.com/ ==================== Signed-off-by: Martin KaFai Lau commit d14c1fac0c9722c4ec79589921c9e798601ca9d5 Author: Kui-Feng Lee Date: Wed May 29 23:59:46 2024 -0700 bpftool: Change pid_iter.bpf.c to comply with the change of bpf_link_fops. To support epoll, a new instance of file_operations, bpf_link_fops_poll, has been added for links that support epoll. The pid_iter.bpf.c checks f_ops for links and other BPF objects. The check should fail for struct_ops links without this patch. Acked-by: Quentin Monnet Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240530065946.979330-9-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau commit 1a4b858b6a045828de1b536cfab7819c50864ed6 Author: Kui-Feng Lee Date: Wed May 29 23:59:43 2024 -0700 selftests/bpf: test struct_ops with epoll Verify whether a user space program is informed through epoll with EPOLLHUP when a struct_ops object is detached. The BPF code in selftests/bpf/progs/struct_ops_module.c has become complex. Therefore, struct_ops_detach.c has been added to segregate the BPF code for detachment tests from the BPF code for other tests based on the recommendation of Andrii Nakryiko. Suggested-by: Andrii Nakryiko Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240530065946.979330-6-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau commit 67c3e8353f45c27800eecc46e00e8272f063f7d1 Author: Kui-Feng Lee Date: Wed May 29 23:59:42 2024 -0700 bpf: export bpf_link_inc_not_zero. bpf_link_inc_not_zero() will be used by kernel modules. We will use it in bpf_testmod.c later. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240530065946.979330-5-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau commit 1adddc97aa44c8783f9f0276ea70854d56f9f6df Author: Kui-Feng Lee Date: Wed May 29 23:59:41 2024 -0700 bpf: support epoll from bpf struct_ops links. Add epoll support to bpf struct_ops links to trigger EPOLLHUP event upon detachment. This patch implements the "poll" of the "struct file_operations" for BPF links and introduces a new "poll" operator in the "struct bpf_link_ops". By implementing "poll" of "struct bpf_link_ops" for the links of struct_ops, the file descriptor of a struct_ops link can be added to an epoll file descriptor to receive EPOLLHUP events. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240530065946.979330-4-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau commit 6fb2544ea1493f52e50b753604791c01bd2cf897 Author: Kui-Feng Lee Date: Wed May 29 23:59:40 2024 -0700 bpf: enable detaching links of struct_ops objects. Implement the detach callback in bpf_link_ops for struct_ops so that user programs can detach a struct_ops link. The subsystems that struct_ops objects are registered to can also use this callback to detach the links being passed to them. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240530065946.979330-3-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau commit 73287fe228721b05690e671adbcccc6cf5435be6 Author: Kui-Feng Lee Date: Wed May 29 23:59:39 2024 -0700 bpf: pass bpf_struct_ops_link to callbacks in bpf_struct_ops. Pass an additional pointer of bpf_struct_ops_link to callback function reg, unreg, and update provided by subsystems defined in bpf_struct_ops. A bpf_struct_ops_map can be registered for multiple links. Passing a pointer of bpf_struct_ops_link helps subsystems to distinguish them. This pointer will be used in the later patches to let the subsystem initiate a detachment on a link that was registered to it previously. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20240530065946.979330-2-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau commit d4641fa67d3dcc24d108cbfc4e47d0312ef49947 Author: Jeff Johnson Date: Wed May 29 13:45:40 2024 -0700 scftorture: Make torture_type static Fix the 'make C=1' warning: kernel/scftorture.c:71:6: warning: symbol 'torture_type' was not declared. Should it be static? Signed-off-by: Jeff Johnson Signed-off-by: Paul E. McKenney commit d68dc77372ba220f25b11d8e09a34558883fbbfb Author: Jeff Johnson Date: Wed May 29 13:32:46 2024 -0700 scftorture: Add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/scftorture.o Signed-off-by: Jeff Johnson Signed-off-by: Paul E. McKenney commit 6a081bac38a8a6811fd459ab475fe77efebaf009 Author: Jeff Johnson Date: Fri May 24 17:17:24 2024 -0700 locktorture: Add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/locking/locktorture.o Signed-off-by: Jeff Johnson Signed-off-by: Paul E. McKenney commit a8469dc6917d9c40c77e1669394b13166314ac5c Author: Jeff Johnson Date: Sat May 18 16:18:39 2024 -0700 torture: Add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in kernel/torture.o Signed-off-by: Jeff Johnson Signed-off-by: Paul E. McKenney commit 020e6c22bd6e67592f38b47d0f1926a831482560 Author: Paul E. McKenney Date: Fri May 10 15:36:57 2024 -0700 kcsan: Add example to data_race() kerneldoc header Although the data_race() kerneldoc header accurately states what it does, some of the implications and usage patterns are non-obvious. Therefore, add a brief locking example and also state how to have KCSAN ignore accesses while also preventing the compiler from folding, spindling, or otherwise mutilating the access. [ paulmck: Apply Bart Van Assche feedback. ] [ paulmck: Apply feedback from Marco Elver. ] Reported-by: Bart Van Assche Signed-off-by: Paul E. McKenney Cc: Marco Elver Cc: Breno Leitao Cc: Jens Axboe commit 2d3789e325e6aa91d228aa461c152d8e8f107bc4 Author: Michal Wajdeczko Date: Thu May 30 13:58:14 2024 +0200 drm/xe: Split MCR initialization The initialization order of GT topology, MCR, PAT and GuC HWconfig as done today by native/PF driver, can't be followed as-is by the VF driver, since fuse registers used in GT topology discovery will be obtained by the VF driver from the GuC in HWconfig step. While native/PF drivers need to program the HW PAT table prior to loading the GuC, this requires only multicast writes support from the MCR code, which could be initialized separately from the full MCR support that requires the GT topology to setup steering data. Split MCR initialization into two steps to avoid introducing VF specific code paths. This also fixes duplicated spin_lock inits. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Cc: Michał Winiarski Cc: Zhanjun Dong Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240530115814.1284-1-michal.wajdeczko@intel.com commit 9d85821a58f4ff2839d7d3290e0256c1b42dd9da Author: Michal Wajdeczko Date: Thu May 30 15:35:27 2024 +0200 drm/xe/vf: Setup VRAM based on received config data VF drivers will obtain VRAM configuration from the GuC as part of the VF self config. Use that configuration instead of trying to read inaccessible registers. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240530133527.1328-6-michal.wajdeczko@intel.com commit 638d1c79cbf15c14f1bcf98fd8135ea83a04dc50 Author: Michal Wajdeczko Date: Thu May 30 15:35:26 2024 +0200 drm/xe: Promote VRAM initialization function to own file There is no point in mixing register access and VRAM code in the same file. Move and rename the VRAM probe function to a new file (there are no other changes other then new simple kernel-doc). Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240530133527.1328-5-michal.wajdeczko@intel.com commit 8c52ca22b15b5b3ce62b3e2a9ec9f3fbb6302783 Author: Michal Wajdeczko Date: Thu May 30 15:35:25 2024 +0200 drm/xe: Drop xe_ prefix from static functions in xe_mmio.c Rename static functions to align with our typical coding style. While at it, downgrade the existing kernel-doc for internal function to normal comment. Suggested-by: Matt Roper Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240530133527.1328-4-michal.wajdeczko@intel.com commit 2d8865b27724117022a67984e4a6ef94c9555ec7 Author: Michal Wajdeczko Date: Thu May 30 15:35:24 2024 +0200 drm/xe: Move BAR definitions to dedicated file We should keep all hardware definitions separated from the driver code. Move LMEM_BAR definition to new regs/xe_bars.h file and also add there GTTMMADR_BAR definition to avoid using magic 0 resource. Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240530133527.1328-3-michal.wajdeczko@intel.com commit 2adfc4e022f397913a23756a08fbfca3c4ee9c8b Author: Michal Wajdeczko Date: Thu May 30 15:35:23 2024 +0200 drm/xe: Move XEHP_MTCFG_ADDR register definition to xe_regs.h We should not define registers directly in the code while we have dedicated files for all register definitions. Move XEHP_MTCFG_ADDR to regs/xe_regs.h Signed-off-by: Michal Wajdeczko Cc: Matt Roper Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240530133527.1328-2-michal.wajdeczko@intel.com commit 46253c4ae96162a840ad65c1394de63796d7798a Author: Jakub Sitnicki Date: Wed May 22 10:09:36 2024 +0200 selftests/bpf: use section names understood by libbpf in test_sockmap libbpf can deduce program type and attach type from the ELF section name. We don't need to pass it out-of-band if we switch to libbpf convention [1]. [1] https://docs.kernel.org/bpf/libbpf/program_types.html Signed-off-by: Jakub Sitnicki Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240522080936.2475833-1-jakub@cloudflare.com commit 6d8e604c950260627ba374956e56c3814fa824f9 Merge: 1613e604df0cd edc96a2b4c793 Author: Palmer Dabbelt Date: Thu May 30 14:31:08 2024 -0700 Merge patch series "Support Zve32[xf] and Zve64[xfd] Vector subextensions" Andy Chiu says: The series composes of two parts. The first part Specifically, patch 1 adds a comment at a callsite of riscv_setup_vsize to clarify how vlenb is observed by the system. Patch 2 fixes the issue by failing the boot process of a secondary core if vlenb mismatches. Here is the organization of the series: - Patch 1, 2 provide a fix for mismatching vlen problem [1]. The solution is to fail secondary cores if their vlenb is not the same as the boot core. - Patch 3 is a cleanup for introducing ZVE* Vector subextensions. It gives the obsolete ISA parser the ability to expand ISA extensions for sigle letter extensions. - Patch 4, 5, 6 introduce Zve32x, Zve32f, Zve64x, Zve64f, Zve64d for isa parsing and hwprobe, and document about it. - Patch 7 makes has_vector() check against ZVE32X instead of V, so most userspace Vector supports will be available for bare ZVE32X. - Patch 8 updates the prctl test so that it runs on ZVE32X. The series is tested on a QEMU and verified that booting, Vector programs context-switch, signal, ptrace, prctl interfaces works when we only report partial V from the ISA. * b4-shazam-lts: selftest: run vector prctl test for ZVE32X riscv: vector: adjust minimum Vector requirement to ZVE32X riscv: hwprobe: add zve Vector subextensions into hwprobe interface riscv: cpufeature: add zve32[xf] and zve64[xfd] isa detection dt-bindings: riscv: add Zve32[xf] Zve64[xfd] ISA extension description riscv: cpufeature: call match_isa_ext() for single-letter extensions riscv: vector: add a comment when calling riscv_setup_vsize() riscv: smp: fail booting up smp if inconsistent vlen is detected [Palmer: reorder the first two patches so I can merge the fix, and rebase this on v6.10-rc1 so it's a little easier to manage.] Link: https://lore.kernel.org/r/20240510-zve-detection-v5-0-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit edc96a2b4c793c21ffae285d3122b6a67a63da60 Author: Andy Chiu Date: Fri May 10 00:26:58 2024 +0800 selftest: run vector prctl test for ZVE32X The minimal requirement for running Vector subextension on Linux is ZVE32X. So change the test accordingly to run prctl as long as it find it. Signed-off-by: Andy Chiu Link: https://lore.kernel.org/r/20240510-zve-detection-v5-8-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit ac295b67422d1a6627866453543b4880ab144572 Author: Andy Chiu Date: Fri May 10 00:26:57 2024 +0800 riscv: vector: adjust minimum Vector requirement to ZVE32X Make has_vector() to check for ZVE32X. Every in-kernel usage of V that requires a more complicate version of V must then call out explicitly. Also, change riscv_v_first_use_handler(), and boot code that calls riscv_v_setup_vsize() to accept ZVE32X. Most kernel/user interfaces requires minimum of ZVE32X. Thus, programs compiled and run with ZVE32X should be supported by the kernel on most aspects. This includes context-switch, signal, ptrace, prctl, and hwprobe. One exception is that ELF_HWCAP returns 'V' only if full V is supported on the platform. This means that the system without a full V must not rely on ELF_HWCAP to tell whether it is allowable to execute Vector without first invoking a prctl() check. Signed-off-by: Andy Chiu Acked-by: Joel Granados Link: https://lore.kernel.org/r/20240510-zve-detection-v5-7-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit de8f8282a969d0b7342702f355886aab3b14043d Author: Andy Chiu Date: Fri May 10 00:26:56 2024 +0800 riscv: hwprobe: add zve Vector subextensions into hwprobe interface The following Vector subextensions for "embedded" platforms are added into RISCV_HWPROBE_KEY_IMA_EXT_0: - ZVE32X - ZVE32F - ZVE64X - ZVE64F - ZVE64D Extensions ending with an X indicates that the platform doesn't have a vector FPU. Extensions ending with F/D mean that whether single (F) or double (D) precision vector operation is supported. The number 32 or 64 follows from ZVE tells the maximum element length. Signed-off-by: Andy Chiu Reviewed-by: Clément Léger Link: https://lore.kernel.org/r/20240510-zve-detection-v5-6-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit 1e7483542bf8d6c1fc9f220dfe8a12eeffdc72d5 Author: Andy Chiu Date: Fri May 10 00:26:55 2024 +0800 riscv: cpufeature: add zve32[xf] and zve64[xfd] isa detection Multiple Vector subextensions are added. Also, the patch takes care of the dependencies of Vector subextensions by macro expansions. So, if some "embedded" platform only reports "zve64f" on the ISA string, the parser is able to expand it to zve32x zve32f zve64x and zve64f. Signed-off-by: Andy Chiu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240510-zve-detection-v5-5-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit 037df2966afc8dfaa06788245cffca345dcf9a26 Author: Andy Chiu Date: Fri May 10 00:26:54 2024 +0800 dt-bindings: riscv: add Zve32[xf] Zve64[xfd] ISA extension description Add description for Zve32x Zve32f Zve64x Zve64f Zve64d ISA extensions. Signed-off-by: Andy Chiu Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240510-zve-detection-v5-4-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit 98a5700dfaec1043c8b69eb25f44896be557dd4c Author: Andy Chiu Date: Fri May 10 00:26:53 2024 +0800 riscv: cpufeature: call match_isa_ext() for single-letter extensions Single-letter extensions may also imply multiple subextensions. For example, Vector extension implies zve64d, and zve64d implies zve64f. Extension parsing for "riscv,isa-extensions" has the ability to resolve the dependency by calling match_isa_ext(). This patch makes deprecated parser call the same function for single letter extensions. Signed-off-by: Andy Chiu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240510-zve-detection-v5-3-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit 38a94c46660f5612c6ef37ec9754ec1543b038cd Author: Andy Chiu Date: Fri May 10 00:26:52 2024 +0800 riscv: smp: fail booting up smp if inconsistent vlen is detected Currently we only support Vector for SMP platforms, that is, all SMP cores have the same vlenb. If we happen to detect a mismatching vlen, it is better to just fail bootting it up to prevent further race/scheduling issues. Also, move .Lsecondary_park forward and chage `tail smp_callin` into a regular call in the early assembly. So a core would be parked right after a return from smp_callin. Note that a successful smp_callin does not return. Fixes: 7017858eb2d7 ("riscv: Introduce riscv_v_vsize to record size of Vector context") Reported-by: Conor Dooley Closes: https://lore.kernel.org/linux-riscv/20240228-vicinity-cornstalk-4b8eb5fe5730@spud/ Signed-off-by: Andy Chiu Reviewed-by: Conor Dooley Reviewed-by: Yunhui Cui Link: https://lore.kernel.org/r/20240510-zve-detection-v5-2-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit 77afe3e514b89a12143c89d263cfe2365672cfc3 Author: Andy Chiu Date: Fri May 10 00:26:51 2024 +0800 riscv: vector: add a comment when calling riscv_setup_vsize() The function would fail when it detects the calling hart's vlen doesn't match the first one's. The boot hart is the first hart calling this function during riscv_fill_hwcap, so it is impossible to fail here. Add a comment about this behavior. Signed-off-by: Andy Chiu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240510-zve-detection-v5-1-0711bdd26c12@sifive.com Signed-off-by: Palmer Dabbelt commit 6c7cc1a29d1e679be4a98b01141f1ba491e5775e Author: Jason Gerecke Date: Thu May 30 13:51:32 2024 -0700 Input: wacom_w8001 - simplify device name generation Replace pairs of strscpy/strlcat calls with snprintf. Signed-off-by: Jason Gerecke Link: https://lore.kernel.org/r/CANRwn3SuTjdCCK4YH1ObvsC_gZuythAQ7kSHJP-CiAFw9h5Qcw@mail.gmail.com Signed-off-by: Dmitry Torokhov commit 1c4324793e9bfb5a29c02844023c8ad412fa0467 Author: Daniele Ceraolo Spurio Date: Tue May 28 11:23:54 2024 -0700 Revert "drm/xe: make gt_remove use devm" This reverts commit cd506a33b0d9759e0a58556799b1b38650fa3698. The gt_remove function was explicitly added as part of the remove flow instead of using drmm/devm automatic cleanup due to it being illegal to remove a component after the driver has been detached from the pci device; the GSC proxy component is removed as part of gt_remove, so we need to do it in the pci cleanup flow. The function already has a comment above it to explain this. Note that the change to use the devm also caused an invalid pointer deref in the gsc_proxy unbind function, but I didn't bother to debug which pointer was bad since we shouldn't be calling the unbind that late anyway and this revert fixes it. Both issue were not seen in CI because the GSC loading is temporarily disabled due to a critical bug, which means we're not binding the component. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240528182354.1200424-1-daniele.ceraolospurio@intel.com commit 627395716cc36eff127aa81997b535818ab003fa Author: Dmitry Baryshkov Date: Thu May 9 16:31:05 2024 +0300 docs: document python version used for compilation The drm/msm driver had adopted using Python3 script to generate register header files instead of shipping pre-generated header files. Document the minimal Python version supported by the script. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240509-python-version-v1-1-a7dda3a95b5f@linaro.org commit b80103a2dfe6a9fcc2ea037e9f26c72eae24252c Author: Karel Balej Date: Mon May 13 10:41:10 2024 +0200 docs: handling-regressions.rst: recommend using "Closes:" tags Update the handling-regressions guide to recommend using "Closes:" tags rather than "Link:" when referencing fixed reports. The latter was used originally but now is only recommended when the given patch only fixes part of the issue, as described in submitting-patches. Briefly mention that and also note that regzbot currently doesn't make a distinction. Also fix a typo. Acked-by: Thorsten Leemhuis Signed-off-by: Karel Balej Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240513084145.2460-1-balejk@matfyz.cz commit 1a0e2cd9c4243871e534f02459ecca0ddd6ff6d5 Author: Federico Vaga Date: Mon May 13 23:05:10 2024 +0200 doc:it_IT: align Italian documentation This commit translats in Italian the following changes: commit 5db34f5bfd78 ("docs: stable-kernel-rules: remove code-labels tags and a indention level") commit 2263c40e6525 ("docs: stable-kernel-rules: call mainline by its name and change example") commit db483303b58f ("docs: stable-kernel-rules: reduce redundancy") commit af3e4a5ab9a0 ("docs: stable-kernel-rules: create special tag to flag 'no backporting'"") commit 91a3d6be99e6 ("doc-guide: kernel-doc: tell about object-like macros") commit b104dbedbe61 ("Documentation: RISC-V: patch-acceptance: mention patchwork's role") commit ed843ae947f8 ("docs: move riscv under arch") commit b45d8f387157 ("docs: remove the tips on how to submit patches from MAINTAINERS") commit 0d828200ad56 ("docs: process: allow Closes tags with links") commit c23f28975abc ("Merge tag 'docs-6.4' of git://git.lwn.net/linux") commit 329ac9af902e ("docs: submitting-patches: Discuss interleaved replies") commit 02f9998754b0 ("docs: submitting-patches: Suggest a longer expected time for responses") commit 1fae02e7eb99 ("docs: submitting-patches: encourage direct notifications to commenters") commit d254d263f6c8 ("docs: submitting-patches: improve the base commit explanation") commit 0d828200ad56 ("docs: process: allow Closes tags with links") commit 9c1b86f8ce04 ("kbuild: raise the minimum supported version of LLVM to 13.0.1") commit 768409cff6cc ("rust: upgrade to Rust 1.76.0") commit 23bfb947eb0a ("doc: fix spelling about ReStructured Text") commit d0bde9ca0ecf ("docs: stable-kernel-rules: mention other usages for stable tag comments") commit 33568553b3fc ("docs: stable-kernel-rules: make rule section more straight forward") commit 3feb21bb0bb4 ("docs: stable-kernel-rules: move text around to improve flow") commit 0f11447d9fcc ("docs: stable-kernel-rules: improve structure by changing headlines") commit 189057a1b61b ("docs: stable-kernel-rules: make the examples for option 1 a proper list") commit 6e160d29f654 ("docs: stable-kernel-rules: fine-tune various details") commit bbaee49cce7c ("docs: stable-kernel-rules: mention that regressions must be prevented") commit 4f01342464a8 ("Documentation: stable: clarify patch series prerequisites") Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240513210510.10929-1-federico.vaga@vaga.pv.it commit 9c03bc90c0651647a6f17d532533fad9ac1d5d9e Author: Conor Dooley Date: Thu May 16 16:35:23 2024 +0100 Documentation: process: Revert "Document suitability of Proton Mail for kernel development" Revert commit 1d2ed9234c85 ("Documentation: process: Document suitability of Proton Mail for kernel development") as Proton disabled WKD for kernel.org addresses as a result of some interaction with Konstantin on social.kernel.org Signed-off-by: Conor Dooley Reviewed-by: Kanak Shilledar Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240516-groin-slingshot-c3c3734d2f10@spud commit 23a0bc28515934ed081169257f5b76167f07df4a Author: Randy Dunlap Date: Wed May 22 15:47:26 2024 -0700 doc-guide: kernel-doc: document Returns: spelling scripts/kernel-doc accepts "Return:" or "Returns:" for describing the return value of a function or function-like macro, so document this alternative spelling and use it in an example. Signed-off-by: Randy Dunlap Suggested-by: Dmitry Baryshkov Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240522224726.10498-1-rdunlap@infradead.org commit 2c7afc2a880cd4899f9dd6bfa62f10f84773148b Author: Ivan Orlov Date: Thu May 16 22:17:31 2024 +0100 kunit: Cover 'assert.c' with tests There are multiple assertion formatting functions in the `assert.c` file, which are not covered with tests yet. Implement the KUnit test for these functions. The test consists of 11 test cases for the following functions: 1) 'is_literal' 2) 'is_str_literal' 3) 'kunit_assert_prologue', test case for multiple assert types 4) 'kunit_assert_print_msg' 5) 'kunit_unary_assert_format' 6) 'kunit_ptr_not_err_assert_format' 7) 'kunit_binary_assert_format' 8) 'kunit_binary_ptr_assert_format' 9) 'kunit_binary_str_assert_format' 10) 'kunit_assert_hexdump' 11) 'kunit_mem_assert_format' The test aims at maximizing the branch coverage for the assertion formatting functions. As you can see, it covers some of the static helper functions as well, so mark the static functions in `assert.c` as 'VISIBLE_IF_KUNIT' and conditionally export them with EXPORT_SYMBOL_IF_KUNIT. Add the corresponding definitions to `assert.h`. Build the assert test when CONFIG_KUNIT_TEST is enabled, similar to how it is done for the string stream test. Signed-off-by: Ivan Orlov Reviewed-by: Rae Moar Acked-by: David Gow Signed-off-by: Shuah Khan commit 9d573d19547b3fae0c1d4e5fce52bdad3fda3664 Author: Lukas Wunner Date: Wed May 29 16:32:09 2024 +0200 PCI: pciehp: Detect device replacement during system sleep Ricky reports that replacing a device in a hotplug slot during ACPI sleep state S3 does not cause re-enumeration on resume, as one would expect. Instead, the new device is treated as if it was the old one. There is no bulletproof way to detect device replacement, but as a heuristic, check whether the device identity in config space matches cached data in struct pci_dev (Vendor ID, Device ID, Class Code, Revision ID, Subsystem Vendor ID, Subsystem ID). Additionally, cache and compare the Device Serial Number (PCIe r6.2 sec 7.9.3). If a mismatch is detected, mark the old device disconnected (to prevent its driver from accessing the new device) and synthesize a Presence Detect Changed event. The device identity in config space which is compared here is the same as the one included in the signed Subject Alternative Name per PCIe r6.1 sec 6.31.3. Thus, the present commit prevents attacks where a valid device is replaced with a malicious device during system sleep and the valid device's driver obliviously accesses the malicious device. This is about as much as can be done at the PCI layer. Drivers may have additional ways to identify devices (such as reading a WWID from some register) and may trigger re-enumeration when detecting an identity change on resume. Link: https://lore.kernel.org/r/a1afaa12f341d146ecbea27c1743661c71683833.1716992815.git.lukas@wunner.de Reported-by: Ricky Wu Closes: https://lore.kernel.org/r/a608b5930d0a48f092f717c0e137454b@realtek.com Tested-by: Ricky Wu Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas commit af752016340021d433a962063067e819dba889b1 Author: Ian Rogers Date: Fri May 24 13:52:27 2024 -0700 perf top: Allow filters on events Allow filters to be added to perf top events. One use is to workaround issues with: ``` $ perf top --uid="$(id -u)" ``` which tries to scan /proc find processes belonging to the uid and can fail in such a pid terminates between the scan and the perf_event_open reporting: ``` Error: The sys_perf_event_open() syscall returned with 3 (No such process) for event (cycles:P). /bin/dmesg | grep -i perf may provide additional information. ``` A similar filter: ``` $ perf top -e cycles:P --filter "uid == $(id -u)" ``` doesn't fail this way. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: John Fastabend Cc: Changbin Du Cc: Yang Jihong Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240524205227.244375-4-irogers@google.com commit d92aa899fe0a66350303a1986d6dc7ec4b3a1ea7 Author: Ian Rogers Date: Fri May 24 13:52:26 2024 -0700 perf bpf filter: Add uid and gid terms Allow the BPF filter to use the uid and gid terms determined by the bpf_get_current_uid_gid BPF helper. For example, the following will record the cpu-clock event system wide discarding samples that don't belong to the current user. $ perf record -e cpu-clock --filter "uid == $(id -u)" -a sleep 0.1 Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: John Fastabend Cc: Changbin Du Cc: Yang Jihong Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240524205227.244375-3-irogers@google.com commit 63b9cbd7941aa9ec5cb61567042176c4ce04b020 Author: Ian Rogers Date: Fri May 24 13:52:25 2024 -0700 perf bpf filter: Give terms their own enum Give the term types their own enum so that additional terms can be added that don't correspond to a PERF_SAMPLE_xx flag. The term values are numerically ascending rather than bit field positions, this means they need translating to a PERF_SAMPLE_xx bit field in certain places using a shift. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: John Fastabend Cc: Changbin Du Cc: Yang Jihong Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240524205227.244375-2-irogers@google.com commit d163d60258c755845cbc9cfe0e45fca71e649488 Author: Ian Rogers Date: Sun May 19 11:17:16 2024 -0700 tools api io: Move filling the io buffer to its own function In general a read fills 4kb so filling the buffer is a 1 in 4096 operation, move it out of the io__get_char function to avoid some checking overhead and to better hint the function is good to inline. For perf's IO intensive internal (non-rigorous) benchmarks there's a small improvement to kallsyms-parsing with a default build. Before: ``` $ perf bench internals all Computing performance of single threaded perf event synthesis by synthesizing events on the perf process itself: Average synthesis took: 146.322 usec (+- 0.305 usec) Average num. events: 61.000 (+- 0.000) Average time per event 2.399 usec Average data synthesis took: 145.056 usec (+- 0.155 usec) Average num. events: 329.000 (+- 0.000) Average time per event 0.441 usec Average kallsyms__parse took: 162.313 ms (+- 0.599 ms) ... Computing performance of sysfs PMU event scan for 100 times Average core PMU scanning took: 53.720 usec (+- 7.823 usec) Average PMU scanning took: 375.145 usec (+- 23.974 usec) ``` After: ``` $ perf bench internals all Computing performance of single threaded perf event synthesis by synthesizing events on the perf process itself: Average synthesis took: 127.829 usec (+- 0.079 usec) Average num. events: 61.000 (+- 0.000) Average time per event 2.096 usec Average data synthesis took: 133.652 usec (+- 0.101 usec) Average num. events: 327.000 (+- 0.000) Average time per event 0.409 usec Average kallsyms__parse took: 150.415 ms (+- 0.313 ms) ... Computing performance of sysfs PMU event scan for 100 times Average core PMU scanning took: 47.790 usec (+- 1.178 usec) Average PMU scanning took: 376.945 usec (+- 23.683 usec) ``` Signed-off-by: Ian Rogers Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240519181716.4088459-1-irogers@google.com commit 9bbfab1c7cf7801e50b131ccf04af8d32b01dcec Author: Arnd Bergmann Date: Tue May 28 15:32:36 2024 +0200 drm/xe: replace format-less snprintf() with strscpy() Using snprintf() with a format string from task->comm is a bit dangerous since the string may be controlled by unprivileged userspace: drivers/gpu/drm/xe/xe_devcoredump.c: In function 'devcoredump_snapshot': drivers/gpu/drm/xe/xe_devcoredump.c:184:9: error: format not a string literal and no format arguments [-Werror=format-security] 184 | snprintf(ss->process_name, sizeof(ss->process_name), process_name); | ^~~~~~~~ In this case there is no reason for an snprintf(), so use a simpler string copy. Fixes: b10d0c5e9df7 ("drm/xe: Add process name to devcoredump") Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Hellström Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240528133251.2310868-1-arnd@kernel.org commit 32cdf4c75fdd135e66e11383aa84687873b77b89 Author: Krzysztof Kozlowski Date: Mon Apr 1 16:10:25 2024 +0200 arm64: dts: n5x: socdk: drop unneeded flash address/size-cells Flash node uses single "partition" node to describe partitions, so remove deprecated address/size-cells properties to also fix dtc W=1 warnings: socfpga_n5x_socdk.dts:85.10-114.4: Warning (avoid_unnecessary_addr_size): /soc@0/spi@ff8d2000/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 41f7adb676f6c4aef439d78b15c7e1119216bc2b Author: Krzysztof Kozlowski Date: Mon Apr 1 16:10:24 2024 +0200 arm64: dts: agilex: socdk: drop unneeded flash address/size-cells Flash node uses single "partition" node to describe partitions, so remove deprecated address/size-cells properties to also fix dtc W=1 warnings: socfpga_agilex_socdk.dts:108.10-137.4: Warning (avoid_unnecessary_addr_size): /soc@0/spi@ff8d2000/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 7f787253bca4fedfa97bfa087b8d3ae0105559de Author: Krzysztof Kozlowski Date: Mon Apr 1 16:10:23 2024 +0200 arm64: dts: stratix10: socdk_nand: drop unneeded flash address/size-cells Flash node uses single "partition" node to describe partitions, so remove deprecated address/size-cells properties to also fix dtc W=1 warnings: socfpga_stratix10_socdk_nand.dts:171.10-200.4: Warning (avoid_unnecessary_addr_size): /soc@0/spi@ff8d2000/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 718a2bb5fe7b2d67d887313f16f93cab5c43ab55 Author: Krzysztof Kozlowski Date: Mon Apr 1 16:10:22 2024 +0200 arm64: dts: stratix10: socdk: drop unneeded flash address/size-cells Flash node uses single "partition" node to describe partitions, so remove deprecated address/size-cells properties to also fix dtc W=1 warnings: socfpga_stratix10_socdk.dts:182.10-211.4: Warning (avoid_unnecessary_addr_size): /soc@0/spi@ff8d2000/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 8233d2716570b66ab45b6d24e577ee6612002dc4 Author: Baochen Qiang Date: Wed May 29 09:53:57 2024 +0800 wifi: ath12k: do not process consecutive RDDM event Currently we do reset for each RDDM event from MHI, however there are cases, see below log, that we get two or more consecutive events, and it is pointless to do reset for the subsequent ones. What's more, it makes reset process more likely to fail. [ 103.289864] mhi mhi0: System error detected [ 103.289871] ath12k_pci 0000:03:00.0: mhi notify status reason MHI_CB_EE_RDDM [ 103.293144] mhi mhi0: System error detected [ 103.293150] ath12k_pci 0000:03:00.0: mhi notify status reason MHI_CB_EE_RDDM Add a check to avoid reset again and again. This is done by tracking previous MHI status: if we receive a new RDDM event while the previous event is also the same, we treat it as duplicate and ignore it, because normally we should at least receive a MHI_CB_EE_MISSION_MODE event between them. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240529015357.9846-1-quic_bqiang@quicinc.com commit 43e934360d1d8fd3230d0c1ffa40f0d49deb4cf2 Author: Rob Herring (Arm) Date: Tue May 28 08:46:09 2024 -0500 dt-bindings: net: wireless: ath11k: Drop "qcom,ipq8074-wcss-pil" from example Convention for examples is to only show what's covered by the binding, so drop the provider "qcom,ipq8074-wcss-pil". It is also not documented by a schema which caused a warning. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kalle Valo Link: https://msgid.link/20240528134610.4075204-1-robh@kernel.org commit 3d60041543189438cd1b03a1fa40ff6681c77970 Author: Baochen Qiang Date: Sun May 26 20:42:26 2024 +0800 wifi: ath12k: fix memory leak in ath12k_dp_rx_peer_frag_setup() Currently the resource allocated by crypto_alloc_shash() is not freed in case ath12k_peer_find() fails, resulting in memory leak. Add crypto_free_shash() to fix it. This is found during code review, compile tested only. Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240526124226.24661-1-quic_bqiang@quicinc.com commit 86266829ea755f737762ebda614c59b136c8feac Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:51 2024 +0530 drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Add the LCD controller layer definition and descriptor structure for sam9x75 for the following layers: - Base Layer - Overlay1 Layer - Overlay2 Layer - High End Overlay Signed-off-by: Manikandan Muralidharan Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-9-manikandan.m@microchip.com commit d0e78f535cbcda9a4574e8d329d099cebda64df4 Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:50 2024 +0530 drm: atmel-hlcdc: add support for DSI output formats Add support for the following DPI mode if the encoder type is DSI as per the XLCDC IP datasheet: - 16BPPCFG1 - 16BPPCFG2 - 16BPPCFG3 - 18BPPCFG1 - 18BPPCFG2 - 24BPP Signed-off-by: Manikandan Muralidharan [durai.manickamkr@microchip.com: update output format using is_xlcdc flag] Signed-off-by: Durai Manickam KR Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-8-manikandan.m@microchip.com commit 391acbc6899791a963716e7be4ffe5e682bd7acf Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:49 2024 +0530 drm: atmel-hlcdc: add vertical and horizontal scaling support for XLCDC Update the vertical and horizontal scaler registers of XLCDC IP with Bilinear and Bicubic co-efficients taps for Chroma and Luma componenets of the Pixel. Signed-off-by: Manikandan Muralidharan Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-7-manikandan.m@microchip.com commit 0af86604e34188e1a7263dac739f2b8faa6e892c Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:48 2024 +0530 drm: atmel-hlcdc: add DPI mode support for XLCDC Add support for Display Pixel Interface (DPI) Compatible Mode support in atmel-hlcdc driver for XLCDC IP along with legacy pixel mapping. DPI mode BIT is configured in LCDC_CFG5 register. Signed-off-by: Manikandan Muralidharan [durai.manickamkr@microchip.com: update DPI mode bit using is_xlcdc flag] Signed-off-by: Durai Manickam KR Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-6-manikandan.m@microchip.com commit d498771b0b830140a70cb8118ee0ee522be94f39 Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:47 2024 +0530 drm: atmel_hlcdc: Add support for XLCDC using IP specific driver ops Add XLCDC specific driver ops and is_xlcdc flag to separate the functionality and to access the controller registers. HEO scaling, window resampling, Alpha blending, YUV-to-RGB conversion in XLCDC is derived and handled using additional configuration bits and registers. Writing one to the Enable fields of each layer in LCD_ATTRE is required to reflect the values set in Configuration, FBA, Enable registers of each layer. Signed-off-by: Manikandan Muralidharan Co-developed-by: Hari Prasath Gujulan Elango Signed-off-by: Hari Prasath Gujulan Elango Co-developed-by: Durai Manickam KR Signed-off-by: Durai Manickam KR Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-5-manikandan.m@microchip.com commit f5a5f04b6019b9b61a1d744ea80376c1365218af Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:46 2024 +0530 drm: atmel_hlcdc: replace regmap_read with regmap_read_poll_timeout Replace regmap_read with regmap_read_poll_timeout to neatly handle retries Signed-off-by: Manikandan Muralidharan Acked-by: Dharma Balasubiramani Reviewed-by: Hari Prasath Gujulan Elango Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-4-manikandan.m@microchip.com commit 73fc975318e0ab3385c5b3372c7b296ae58c8d6b Author: Durai Manickam KR Date: Wed Apr 24 11:03:45 2024 +0530 drm: atmel-hlcdc: Define XLCDC specific registers The register address of the XLCDC IP used in SAM9X7 SoC family are different from the previous HLCDC. Defining those address space with valid macros. Signed-off-by: Durai Manickam KR [manikandan.m@microchip.com: Remove unused macro definitions] Signed-off-by: Manikandan Muralidharan Acked-by: Lee Jones Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-3-manikandan.m@microchip.com commit aa71584b323acf62f42844e4f1b4d472b7958a0b Author: Manikandan Muralidharan Date: Wed Apr 24 11:03:44 2024 +0530 drm: atmel-hlcdc: add driver ops to differentiate HLCDC and XLCDC IP Add LCD IP specific ops in driver data to differentiate HLCDC and XLCDC code within the atmel-hlcdc driver files. XLCDC in SAM9X7 has different sets of registers and additional configuration bits when compared to previous HLCDC IP. Read/write operation on the controller register and functionality is now separated using the LCD IP specific ops. Signed-off-by: Manikandan Muralidharan Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-2-manikandan.m@microchip.com commit 95cd03f32a1680f693b291da920ab5d3f9d8c5c1 Merge: c53a46b16ce26 abd5576b9c57f Author: Paolo Abeni Date: Thu May 30 15:37:29 2024 +0200 Merge branch 'introduce-switch-mode-support-for-icssg-driver' MD Danish Anwar says: ==================== Introduce switch mode support for ICSSG driver This series adds support for switch-mode for ICSSG driver. This series also introduces helper APIs to configure firmware maintained FDB (Forwarding Database) and VLAN tables. These APIs are later used by ICSSG driver in switch mode. Now the driver will boot by default in dual EMAC mode. When first ICSSG interface is added to bridge driver will still be in EMAC mode. As soon as second ICSSG interface is added to same bridge, switch-mode will be enabled and switch firmwares will be loaded to PRU cores. The driver will remain in dual EMAC mode if ICSSG interfaces are added to two different bridges or if two different interfaces (One ICSSG, one other) is added to the same bridge. We'll only enable is_switch_mode flag when two ICSSG interfaces are added to same bridge. We start in dual MAC mode. Let's say lan0 and lan1 are ICSSG interfaces ip link add name br0 type bridge ip link set lan0 master br0 At this point, we get a CHANGEUPPER event. Only one port is a member of the bridge, so we will still be in dual MAC mode. ip link set lan1 master br0 We get a second CHANGEUPPER event, the second interface lan1 is also ICSSG interface so we will set the is_switch_mode flag and when interfaces are brought up again, ICSSG switch firmwares will be loaded to PRU Cores. There are some other cases to consider as well. ip link add name br0 type bridge ip link add name br1 type bridge ip link set lan0 master br0 ip link set ppp0 master br0 Here we are adding lan0 (ICSSG) and ppp0 (non ICSSG) to same bridge, as they both are not ICSSG, we will still be running in dual EMAC mode. ip link set lan1 master br1 ip link set vpn0 master br1 Here we are adding lan1 (ICSSG) and vpn0 (non ICSSG) to same bridge, as they both are not ICSSG, we will still be running in dual EMAC mode. This is v6 of the series. Changes from v5 to v6: *) Removed __packed from structures in icssg_config.h file. *) Added RB tags of Andrew Lunn to patch 2/3 and patch 3/3 of this series. Changes from v4 to v5: *) Rebased on 6.10-rc1. *) Dropped the RFC tag. Changes from v3 to v4: *) Added RFC tag as net-next is closed now. *) Modified the driver to remove the need of bringing interfaces up / down for enabling / disabling switch mode. Now switch mode can be enabled without bringig interfaces up / down as requested by Andrew Lunn *) Modified commit message of patch 3/3. Changes from v2 to v3: *) Dropped RFC tag. *) Used ether_addr_copy() instead of manually copying mac address using for loop in patch 1/3 as suggested by Andrew Lunn *) Added helper API icssg_fdb_setup() in patch 1/3 to reduce code duplication as suggested by Andrew Lunn *) In prueth_switchdev_stp_state_set() removed BR_STATE_LEARNING as learning without forwarding is not supported by ICSSG firmware. *) Used ether_addr_equal() wherever possible in patch 2/3 as suggested by Andrew Lunn *) Fixed typo "nit: s/prueth_switchdevice_nb/prueth_switchdev_nb/" in patch 2/3 as suggested by Simon Horman *) Squashed "#include "icssg_mii_rt.h" to patch 2/3 from patch 3/3 as suggested by Simon Horman *) Rebased on latest net-next/main. Changes from v1 to v2: *) Removed TAPRIO support patch from this series. *) Stopped using devlink for enabling switch-mode as suggested by Andrew L *) Added read_poll_timeout() in patch 1 / 3 as suggested by Andrew L. v1 https://lore.kernel.org/all/20230830110847.1219515-4-danishanwar@ti.com/ v2 https://lore.kernel.org/all/20240118071005.1514498-1-danishanwar@ti.com/ v3 https://lore.kernel.org/all/20240327114054.1907278-1-danishanwar@ti.com/ v4 https://lore.kernel.org/all/20240515060320.2783244-1-danishanwar@ti.com/ v5 https://lore.kernel.org/all/20240527052738.152821-1-danishanwar@ti.com/ Thanks and Regards, Md Danish Anwar ==================== Link: https://lore.kernel.org/r/20240528113734.379422-1-danishanwar@ti.com Signed-off-by: Paolo Abeni commit abd5576b9c57fbf1ac2421463900061f4d67d96f Author: MD Danish Anwar Date: Tue May 28 17:07:34 2024 +0530 net: ti: icssg-prueth: Add support for ICSSG switch firmware Add support for ICSSG switch firmware using existing Dual EMAC driver with switchdev. Limitations: VLAN offloading is limited to 0-256 IDs. MDB/FDB static entries are limited to 511 entries and different FDBs can hash to same bucket and thus may not completely offloaded Example assuming ETH1 and ETH2 as ICSSG2 interfaces: Switch to ICSSG Switch mode: ip link add name br0 type bridge ip link set dev eth1 master br0 ip link set dev eth2 master br0 ip link set dev br0 up bridge vlan add dev br0 vid 1 pvid untagged self Going back to Dual EMAC mode: ip link set dev br0 down ip link set dev eth1 nomaster ip link set dev eth2 nomaster ip link del name br0 type bridge By default, Dual EMAC firmware is loaded, and can be changed to switch mode by above steps Reviewed-by: Andrew Lunn Signed-off-by: MD Danish Anwar Signed-off-by: Paolo Abeni commit 972383aecf43c3664750496d5395e669c35ba06e Author: MD Danish Anwar Date: Tue May 28 17:07:33 2024 +0530 net: ti: icssg-switch: Add switchdev based driver for ethernet switch support ICSSG can operating in switch mode with 2 ext port and 1 host port with VLAN/FDB/MDB and STP offloading. Add switchdev based driver to support the same. Driver itself will be integrated with icssg_prueth in future commits Reviewed-by: Andrew Lunn Signed-off-by: MD Danish Anwar Signed-off-by: Paolo Abeni commit 487f7323f39a9d45a31c59e909de4a626f02d34f Author: MD Danish Anwar Date: Tue May 28 17:07:32 2024 +0530 net: ti: icssg-prueth: Add helper functions to configure FDB Introduce helper functions to configure firmware FDB tables, VLAN tables and Port VLAN ID settings to aid adding Switch mode support. Signed-off-by: MD Danish Anwar Reviewed-by: Andrew Lunn Signed-off-by: Paolo Abeni commit 2d0e7ba468eae365f3c4bc9266679e1f8dd405f0 Author: Michael Margolin Date: Mon May 13 06:46:30 2024 +0000 RDMA/efa: Properly handle unexpected AQ completions Do not try to handle admin command completion if it has an unexpected command id and print a relevant error message. Reviewed-by: Firas Jahjah Reviewed-by: Yehuda Yitschak Signed-off-by: Michael Margolin Link: https://lore.kernel.org/r/20240513064630.6247-1-mrgolin@amazon.com Reviewed-by: Gal Pressman Signed-off-by: Leon Romanovsky commit e095405b45bbbdcf521c63b4207071e5b32df671 Author: Konstantin Taranov Date: Wed May 22 01:24:02 2024 -0700 RDMA/mana_ib: Modify QP state Implement modify QP state for RC QPs. Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1716366242-558-4-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit fdefb918496235a11d6c5477c34c81aab2c1343b Author: Konstantin Taranov Date: Wed May 22 01:24:01 2024 -0700 RDMA/mana_ib: Implement uapi to create and destroy RC QP Implement user requests to create and destroy an RC QP. As the user does not have an FMR queue, it is skipped and NO_FMR flag is used. Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1716366242-558-3-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit 53657a0419ef443f9d17ee035ca9980572736d0a Author: Konstantin Taranov Date: Wed May 22 01:24:00 2024 -0700 RDMA/mana_ib: Create and destroy RC QP Implement HW requests to create and destroy an RC QP. An RC QP may have 5 queues. Signed-off-by: Konstantin Taranov Link: https://lore.kernel.org/r/1716366242-558-2-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit 38c02d813aa321c0e79b9887da6a2e2b57a75698 Author: Christophe JAILLET Date: Sun May 19 09:02:15 2024 +0200 RDMA/irdma: Annotate flexible array with __counted_by() in struct irdma_qvlist_info 'num_vectors' is used to count the number of elements in the 'qv_info' flexible array in "struct irdma_qvlist_info". So annotate it with __counted_by() to make it explicit and enable some additional checks. This allocation is done in irdma_save_msix_info(). Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/2ca8b14adf79c4795d7aa95bbfc79253a6bfed82.1716102112.git.christophe.jaillet@wanadoo.fr Acked-by: Shiraz Saleem Signed-off-by: Leon Romanovsky commit 435cdbe9f7a879209807a7519512f94f0b4367c3 Author: Michael Margolin Date: Mon May 13 08:10:19 2024 +0000 RDMA/efa: Fail probe on missing BARs In case any of PCI BARs is missing during device probe we would like to fail as early as possible. Fail if any of the required BARs isn't listed as a memory BAR. Reviewed-by: Daniel Kranzdorf Reviewed-by: Firas Jahjah Signed-off-by: Michael Margolin Link: https://lore.kernel.org/r/20240513081019.26998-1-mrgolin@amazon.com Reviewed-by: Gal Pressman Signed-off-by: Leon Romanovsky commit ed43c40e1f10e0ee1d49b841ee35b23a3a7113ee Author: Luca Coelho Date: Tue May 28 14:29:01 2024 +0300 drm/i915: move uapi.event outside spinlock in intel_crtc_vblank_work In intel_crtc_vblank_work(), we access uapi.event before grabbing the event_lock spinlock, but modify it inside the spinlock block. This causes some static analyzers to get confused and issue a warning. The uapi.event value is not protected by the event_lock, so we can safely move it out of the protected block to prevent false positives. Signed-off-by: Luca Coelho Reviewed-by: Rodrigo Vivi Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240528112901.476068-3-luciano.coelho@intel.com commit b2c2f2df6f01174eefc1ea2aa9aef8b1a6c69575 Author: Luca Coelho Date: Tue May 28 14:29:00 2024 +0300 drm/i915/bios: double check array-boundary in parse_sdvo_lvds_data During static analysis, a concern was raised that we may access the dtd->dtd[] array out of bounds, because we are not checking whether the index we use is larger than the array. This should not be a problem as is, because the enumeration that is used for this index comes from "panel_type", which uses an enumeration with 4 items. But if this enumeration is ever changed, it can lead to hard-to-detect bugs, so better double-check it before using it as an index to the array. Signed-off-by: Luca Coelho Reviewed-by: Rodrigo Vivi Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240528112901.476068-2-luciano.coelho@intel.com commit 6f6bfbc595fbae95f4c1ff80c87d089604e5e6a1 Author: Selvin Xavier Date: Mon May 27 23:11:37 2024 -0700 RDMA/bnxt_re: Expose the MSN table capability for user library BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED was introduced to share the HW retransmit capability between driver and lib. The main difference in implementation for HW Retransmit support is the usage of MSN table or PSN table . When HW retrans is enabled, HW expects MSN table to be allocated by driver/lib, else PSN table (for older adapters). FW expose a new field which gives MSN capability. Drivers and libs can depend on the new field instead of HW Retrasns capability. For adapters which support HW_RETX feature, MSN table capability will be set. For older adapters, this value will be 0(to maintain backward compatibility with older FW). Rename UAPI just to capture the correct name of the HW capability that driver/library is interested in. No functional impact even if older rdma-core is used. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1716876697-25970-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 8d310ba845827a38fcd463d86bfe3b730ce7ab8f Author: Selvin Xavier Date: Mon May 27 23:11:36 2024 -0700 RDMA/bnxt_re: Allow MSN table capability check FW reports the HW capability to use PSN table or MSN table and driver/library need to select it based on this capability. Use the new capability instead of the older capability check for HW retransmission while handling the MSN/PSN table. FW report zero (PSN table) for older adapters to maintain backward compatibility. Also, Updated the FW interface structures to handle the new fields. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1716876697-25970-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 2ba4746b418dcffadb3b135657fea8d3e62b4c30 Author: Kent Gibson Date: Wed May 29 21:19:53 2024 +0800 gpiolib: cdev: Cleanup kfifo_out() error handling The handling of kfifo_out() errors in read functions obscures any error. The error condition should never occur but, while a ret is set to -EIO, it is subsequently ignored and the read functions instead return the number of bytes copied to that point, potentially masking the fact that any error occurred. Log a warning and return -EIO in the case of a kfifo_out() error to make it clear something very odd is going on here. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240529131953.195777-4-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit 4ce5ca654a761462a222164e96b8ab953b8cacab Author: Kent Gibson Date: Wed May 29 21:19:52 2024 +0800 gpiolib: cdev: Refactor allocation of linereq events kfifo The allocation of the linereq events kfifo is performed in two separate places. Add a helper function to remove the duplication. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240529131953.195777-3-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit 35d848e7a1cbba2649ed98cf58e0cdc7ee560c7a Author: Kent Gibson Date: Wed May 29 21:19:51 2024 +0800 gpiolib: cdev: Add INIT_KFIFO() for linereq events The initialisation of the linereq events kfifo relies on the struct being zeroed and a subsequent call to kfifo_alloc(). The call to kfifo_alloc() is deferred until edge detection is first enabled for the linereq. If the kfifo is inadvertently accessed before the call to kfifo_alloc(), as was the case in a recently discovered bug, it behaves as a FIFO of size 1 with an element size of 0, so writes and reads to the kfifo appear successful but copy no actual data. As a defensive measure, initialise the kfifo with INIT_KFIFO() when the events kfifo is constructed. This initialises the kfifo element size and zeroes its data pointer, so any inadvertant access prior to the kfifo_alloc() call will trigger an oops. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20240529131953.195777-2-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski commit 9a73e037f4b5eb45c9ecccb191d39c280abe7cbd Author: Ilpo Järvinen Date: Mon May 27 16:23:45 2024 +0300 gpio: rdc321x: Convert PCIBIOS_* return codes to errnos rdc_gpio_config() uses pci_{read,write}_config_dword() that return PCIBIOS_* codes. rdc_gpio_config() is used for direction_{input,output}() in the struct gpio_chip which both require normal errnos to be returned. Similarly, rdc321x_gpio_probe() that is probe function returns PCIBIOS_* codes without converting them first into normal errnos. Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning them to fix both issues. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240527132345.13956-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Bartosz Golaszewski commit d4cde6e42f2eb56436cab6d1931738ec09e64f74 Author: Ilpo Järvinen Date: Mon May 27 16:23:44 2024 +0300 gpio: amd8111: Convert PCIBIOS_* return codes to errnos amd_gpio_init() uses pci_read_config_dword() that returns PCIBIOS_* codes. The return code is then returned as is but amd_gpio_init() is a module init function that should return normal errnos. Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning it from amd_gpio_init(). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240527132345.13956-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Bartosz Golaszewski commit 996ad412981024a9bb90991ab195685d37187bbd Author: Lyndon Sanche Date: Wed May 29 11:47:46 2024 -0600 platform/x86: dell-pc: Implement platform_profile Some Dell laptops support configuration of preset fan modes through smbios tables. If the platform supports these fan modes, set up platform_profile to change these modes. If not supported, skip enabling platform_profile. Signed-off-by: Lyndon Sanche Link: https://lore.kernel.org/r/20240529174843.13226-4-lsanche@lyndeno.ca [ij: Adjust #includes into alphabetical order] Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 33245680ae565aaa114d726bf407c8ff38e75e71 Author: Lyndon Sanche Date: Wed May 29 11:47:45 2024 -0600 platform/x86: dell-smbios: Move request functions for reuse Move the dell_send_request and dell_fill_request symbols into smbios-base so that they can be used in multiple modules. Signed-off-by: Lyndon Sanche Link: https://lore.kernel.org/r/20240529174843.13226-3-lsanche@lyndeno.ca Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 586d7e4b240ab34ce6df0e48c17e957e7303e181 Author: Lyndon Sanche Date: Wed May 29 11:47:44 2024 -0600 platform/x86: dell-smbios: Add helper for checking supported class Add helper that returns true if smbios command class is supported. Signed-off-by: Lyndon Sanche Link: https://lore.kernel.org/r/20240529174843.13226-2-lsanche@lyndeno.ca Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit 45fe957ae769b9122f4a40f2528c516132fe7e3d Author: Mika Kahola Date: Thu May 23 16:46:49 2024 +0300 drm/i915/display: Add compare config for MTL+ platforms Currently, we may bump into pll mismatch errors during the state verification stage. This happens when we try to use fastset instead of full modeset. Hence, we would need to add a check for pipe configuration to ensure that the sw and the hw configuration will match. In case of hw and sw mismatch, we would need to disable fastset and use full modeset instead. v2: Fix C10 error on PLL comparison (BAT) Use memcmp instead of fixed loops for pll config comparison (Jani) Clean up and use intel_cx0pll_dump_hw_state() to dump pll information (Jani) Reviewed-by: Jani Nikula Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20240523134649.31452-3-mika.kahola@intel.com commit 5575d7b661887760f385e8c68913da5cf202a8cf Author: Mika Kahola Date: Thu May 23 16:46:48 2024 +0300 drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset" This reverts commit a1d91c6e989d0e66b89aa911f2cd459d7bdebbe5. Reviewed-by: Jani Nikula Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20240523134649.31452-2-mika.kahola@intel.com commit 14ca6401d8703725c7297dcc4bf8de73323411ac Author: Gavin Liu Date: Tue May 7 10:00:37 2024 +0800 optee: add timeout value to optee_notif_wait() to support timeout Add timeout value to support self waking when timeout to avoid waiting indefinitely. Signed-off-by: Gavin Liu Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 264eecdba211bbeb8c0ed313ffe03e9dd1e20262 Author: Niranjana Vishwanathapura Date: Wed May 29 20:22:10 2024 -0700 drm/xe: Decouple xe_exec_queue and xe_lrc Decouple xe_lrc from xe_exec_queue and reference count xe_lrc. Removing hard coupling between xe_exec_queue and xe_lrc allows flexible design where the user interface xe_exec_queue can be destroyed independent of the hardware/firmware interface xe_lrc. v2: Fix lrc indexing in wq_item_append() Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240530032211.29299-1-niranjana.vishwanathapura@intel.com commit 0568a4086a6c7386885eb2ac2dae3f7186eb503f Author: Niranjana Vishwanathapura Date: Wed May 29 15:16:39 2024 -0700 drm/xe: Remove unwanted mutex locking Do not hold xef->exec_queue.lock mutex while parsing the xarray xef->exec_queue.xa in xe_file_close() as it is not needed and will cause an unwanted dependency between this lock and the vm->lock. This lock protects the exec queue lookup and reference taking which doesn't apply to this code path. When FD is closing, IOCTLs presumably can't be modifying the xarray. v2: Update commit text (Matt Brost) v3: Add more code comment (Rodrigo Vivi) v4: Further expand code comment (Rodirgo Vivi) Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Reviewed-by: Jagmeet Randhawa Acked-by: Rodrigo Vivi Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240529221639.23117-1-niranjana.vishwanathapura@intel.com commit f975c13d2a34a335fc559aeff76dcaba456cced0 Author: Changbin Du Date: Wed May 22 11:35:42 2024 +0800 perf trace beauty: Always show mmap prot even though PROT_NONE PROT_NONE is also useful information, so do not omit the mmap prot even though it is 0. syscall_arg__scnprintf_mmap_prot() could print PROT_NONE for prot 0. Before: PROT_NONE is not shown. $ sudo perf trace -e syscalls:sys_enter_mmap --filter prot==0 -- ls 0.000 ls/2979231 syscalls:sys_enter_mmap(len: 4220888, flags: PRIVATE|ANONYMOUS) After: PROT_NONE is displayed. $ sudo perf trace -e syscalls:sys_enter_mmap --filter prot==0 -- ls 0.000 ls/2975708 syscalls:sys_enter_mmap(len: 4220888, prot: NONE, flags: PRIVATE|ANONYMOUS) Signed-off-by: Changbin Du Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240522033542.1359421-3-changbin.du@huawei.com commit 92968dcc037fed045dab5c8e52b51255d77f5432 Author: Changbin Du Date: Wed May 22 11:35:41 2024 +0800 perf trace beauty: Always show param if show_zero is set For some parameters, it is best to also display them when they are 0, e.g. flags. Here we only check the show_zero property and let arg printer handle special cases. Signed-off-by: Changbin Du Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240522033542.1359421-2-changbin.du@huawei.com commit 809c20b1ffc80200bfcbbeceb0d946a3e0eed3a4 Author: Tengfei Fan Date: Wed May 29 18:15:34 2024 +0800 arm64: dts: qcom: sa8775p: Add llcc support for the SA8775p platform Add llcc support for the SA8775p platform. Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240529101534.3166507-4-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 249666e34c24aba3f12a201c79d19ab2a3ca3e17 Author: Caleb Connolly Date: Thu May 30 01:39:17 2024 +0200 arm64: dts: qcom: add QCM6490 SHIFTphone 8 The SHIFTphone 8 is an upcoming QCM6490 smartphone, it has the following features: * 12GB of RAM, 512GB UFS storage * 1080p display. * Hardware kill switches for cameras and microphones * UART access via type-c SBU pins (enabled by an internal switch) Initial support includes: * Framebuffer display * UFS and sdcard storage * Battery monitoring and USB role switching via pmic glink * Bluetooth * Thermals * Wifi Signed-off-by: Caleb Connolly Reviewed-by: Luca Weiss Link: https://lore.kernel.org/r/20240530-otter-bringup-v3-2-79e7a28c1b08@linaro.org [bjorn: Fixed indent of block comments] Signed-off-by: Bjorn Andersson commit 9c4fde42cce05719120cf892a44b76ff61d908c7 Author: Ping-Ke Shih Date: Fri May 24 08:32:48 2024 +0800 wifi: rtlwifi: handle return value of usb init TX/RX Handle error code to cause failed to USB probe result from unexpected USB EP number, otherwise when USB disconnect skb_dequeue() an uninitialized skb list and cause warnings below. usb 2-1: USB disconnect, device number 76 INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 0 PID: 54060 Comm: kworker/0:1 Not tainted 6.9.0-rc7 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1b0 lib/dump_stack.c:114 assign_lock_key kernel/locking/lockdep.c:976 [inline] register_lock_class+0xc18/0xfa0 kernel/locking/lockdep.c:1289 __lock_acquire+0x108/0x3bc0 kernel/locking/lockdep.c:5014 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b0/0x550 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 skb_dequeue+0x20/0x180 net/core/skbuff.c:3846 rtl_usb_cleanup drivers/net/wireless/realtek/rtlwifi/usb.c:706 [inline] rtl_usb_deinit drivers/net/wireless/realtek/rtlwifi/usb.c:721 [inline] rtl_usb_disconnect+0x4a4/0x850 drivers/net/wireless/realtek/rtlwifi/usb.c:1051 usb_unbind_interface+0x1e8/0x980 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:568 [inline] device_remove+0x122/0x170 drivers/base/dd.c:560 __device_release_driver drivers/base/dd.c:1270 [inline] device_release_driver_internal+0x443/0x620 drivers/base/dd.c:1293 bus_remove_device+0x22f/0x420 drivers/base/bus.c:574 device_del+0x395/0x9f0 drivers/base/core.c:3909 usb_disable_device+0x360/0x7b0 drivers/usb/core/message.c:1418 usb_disconnect+0x2db/0x930 drivers/usb/core/hub.c:2305 hub_port_connect drivers/usb/core/hub.c:5362 [inline] hub_port_connect_change drivers/usb/core/hub.c:5662 [inline] port_event drivers/usb/core/hub.c:5822 [inline] hub_event+0x1e39/0x4ce0 drivers/usb/core/hub.c:5904 process_one_work+0x97b/0x1a90 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3348 [inline] worker_thread+0x680/0xf00 kernel/workqueue.c:3429 kthread+0x2c7/0x3b0 kernel/kthread.c:388 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: Shichao Lai Closes: https://lore.kernel.org/linux-wireless/CAEk6kZuuezkH1dVRJf3EAVZK-83=OpTz62qCugkpTkswj8JF6w@mail.gmail.com/T/#u Tested-by: Shichao Lai Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240524003248.5952-1-pkshih@realtek.com commit 59ea089dcba3b51769280522fd62696d4d436cbc Author: Bitterblue Smith Date: Thu May 23 17:49:00 2024 +0300 wifi: rtlwifi: Enable the new rtl8192du driver The RTL8192DU is an older Wifi 4 dual band chip. It comes in two flavours: single MAC single PHY (like most Realtek Wifi 4 USB devices), and dual MAC dual PHY. The single MAC single PHY version is 2T2R and can work either in the 2.4 GHz band or the 5 GHz band. The dual MAC dual PHY version has two USB interfaces and appears to the system as two separate 1T1R Wifi devices, one working in the 2.4 GHz band, the other in the 5 GHz band. This was tested only with a single MAC single PHY device, mostly in station mode. The speeds in the 2.4 GHz band with 20 MHz channel width are similar to the out-of-tree driver: 85/51 megabits/second. Stefan Lippers-Hollmann tested the speed in the 5 GHz band with 40 MHz channel width: 173/99 megabits/second. It was also tested briefly in AP mode. It's emitting beacons and my phone can connect to it. Signed-off-by: Bitterblue Smith Tested-by: Stefan Lippers-Hollmann Signed-off-by: Ping-Ke Shih Link: https://msgid.link/5f2da7ee-876a-42fc-8fec-ec5386fa8c26@gmail.com commit b5dc8873b6ffebd331e46814e537179eac8b6aa4 Author: Bitterblue Smith Date: Thu May 23 17:48:32 2024 +0300 wifi: rtlwifi: Add rtl8192du/sw.c This contains the new module's entry point. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/1fdc83ac-4a6f-4645-8837-6e38683b6c84@gmail.com commit 1d8b5003a55ccab64e865d2f34ab1fd7a4cfe3bb Author: Bitterblue Smith Date: Thu May 23 17:48:02 2024 +0300 wifi: rtlwifi: Constify rtl_hal_cfg.{ops,usb_interface_cfg} and rtl_priv.cfg This allows the drivers to declare the structs rtl_hal_cfg, rtl_hal_ops, and rtl_hal_usbint_cfg as const. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/1b29994f-3d07-4297-875d-57c3a87a1ec6@gmail.com commit 3f8b94dbff7ed9cbf07b397b08387da459085c6c Author: Bitterblue Smith Date: Thu May 23 17:47:40 2024 +0300 wifi: rtlwifi: Add rtl8192du/dm.{c,h} These contain functions related to the dynamic mechanism, which runs every two seconds to adjust to changes in the environment. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/a010ed6d-efb0-456d-bd4a-dfc6da23e7aa@gmail.com commit 91f43aee0b1a5e8ba0ea7573e7473546b5cc7292 Author: Bitterblue Smith Date: Thu May 23 17:47:19 2024 +0300 wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h} fw.c contains a function for loading the firmware. led.c contains a function for controlling the LED. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/a52b8907-267c-4811-90ca-5eb852a2aa09@gmail.com commit c0e4ae46ffa20fa12f1748fffcd4c95590da80d4 Author: Bitterblue Smith Date: Thu May 23 17:46:51 2024 +0300 wifi: rtlwifi: Add rtl8192du/rf.{c,h} These contain one RF configuration function and some functions related to dual MAC operation. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/36258d72-11fd-4f70-84c6-782972f706ed@gmail.com commit 8321424134a400a5e3eb39f9acca6bc6946ff447 Author: Bitterblue Smith Date: Thu May 23 17:46:26 2024 +0300 wifi: rtlwifi: Add rtl8192du/trx.{c,h} These contain routines related to sending frames to the chip. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/bd2c24a0-a1fe-493a-8079-d83fda81a0d5@gmail.com commit af46caf0515281a30e119b53afb3083fcc5110a9 Author: Bitterblue Smith Date: Thu May 23 17:46:02 2024 +0300 wifi: rtlwifi: Add rtl8192du/phy.{c,h} These contain mostly the calibration and channel switching routines for RTL8192DU. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/299a5ab7-46bf-410b-bbeb-e252eeeeb34c@gmail.com commit e769c67105d35da254a62892111e7dcad93ff3a6 Author: Bitterblue Smith Date: Thu May 23 17:45:31 2024 +0300 wifi: rtlwifi: Add rtl8192du/hw.{c,h} These contain mostly hardware init/deinit routines for RTL8192DU. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/282afe18-f37d-45f7-9275-68c39d1fde09@gmail.com commit dc71f4e142df928747dc5b493faa2c841a400d88 Author: Bitterblue Smith Date: Thu May 23 17:44:39 2024 +0300 wifi: rtlwifi: Add new members to struct rtl_priv for RTL8192DU These are needed for the dual MAC version of RTL8192DU. The two mutexes are used to avoid concurrent access to the hardware from the two USB interfaces. The two arrays are filled by one interface during LC calibration and accessed by the other interface during channel switching. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/d1bf581b-de41-4d09-bf56-768c2fc29dd3@gmail.com commit ed4117567419a9f7e9bfc32855525ce56b98899a Author: Bitterblue Smith Date: Thu May 23 17:44:09 2024 +0300 wifi: rtlwifi: Add rtl8192du/table.{c,h} These contain the MAC, BB, RF, and AGC initialisation tables for RTL8192DU. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/5ea548b9-5ec6-4358-aa5d-94071f2341cb@gmail.com commit b21faf0edefc26df604fb783c53992e61503df33 Author: Bitterblue Smith Date: Thu May 23 17:43:37 2024 +0300 wifi: rtlwifi: rtl8192d: Use "rtl92d" prefix Some functions moved from rtl8192de still use the "rtl92de" prefix. Rename them. Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/abe3624d-f986-4a24-966c-67defa962e3f@gmail.com commit fed15196223785630527320da05edf0b09900706 Author: Tengfei Fan Date: Wed May 29 18:15:33 2024 +0800 soc: qcom: llcc: Add llcc configuration support for the SA8775p platform Add llcc configuration support for the SA8775p platform. Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20240529101534.3166507-3-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit f5dbad394335d738ad73bcc17232e89c11bfc4e9 Author: Tengfei Fan Date: Wed May 29 18:15:32 2024 +0800 dt-bindings: cache: qcom,llcc: Add SA8775p description Add the cache controller compatible and register region descriptions for SA8775p platform. Signed-off-by: Tengfei Fan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240529101534.3166507-2-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 26bd1c26991c69af6ab020289308cc5ea80cfb08 Author: Dmitry Baryshkov Date: Thu May 30 03:51:14 2024 +0300 arm64: defconfig: make CONFIG_INTERCONNECT_QCOM_SM8350 built-in Building interconnect driver for Qualcomm SM8350 platform can easily result in a device hang / reboot because of the resource starvation. Move this driver to be built-in to prevent such issues during the boot. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240530-8350-config-v1-2-d6e871236ed4@linaro.org Signed-off-by: Bjorn Andersson commit 3833d5787e774cda0f8ee19929a573924ba046b0 Author: Dmitry Baryshkov Date: Thu May 30 03:51:13 2024 +0300 arm64: defconfig: enable CONFIG_SM_GPUCC_8350 Enable support for the GPU Clock Controller for the Qualcomm SM8350 platform. This enables the GPU on Qualcomm SM8350 HDK and other devices using this SoC. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240530-8350-config-v1-1-d6e871236ed4@linaro.org Signed-off-by: Bjorn Andersson commit f51df82d984838b960592ec83d9ec92de8d8c094 Author: Caleb Connolly Date: Thu May 30 01:39:16 2024 +0200 dt-bindings: arm: qcom: Add QCM6490 SHIFTphone 8 The SHIFTphone 8 (codename otter) is a smartphone based on the QCM6490 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Caleb Connolly Link: https://lore.kernel.org/r/20240530-otter-bringup-v3-1-79e7a28c1b08@linaro.org Signed-off-by: Bjorn Andersson commit c53a46b16ce2605181688ea6af5f6c8d7fb3c9c1 Author: Thorsten Blum Date: Tue May 28 18:00:37 2024 +0200 net: smc91x: Remove commented out code Remove commented out code Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240528160036.404946-2-thorsten.blum@toblux.com Signed-off-by: Jakub Kicinski commit ef0e51dccdc43fd849720589c3214d97b2fd453f Author: Russell King (Oracle) Date: Tue May 28 16:15:42 2024 +0100 net: dsa: felix: provide own phylink MAC operations Convert felix to provide its own phylink MAC operations, thus avoiding the shim layer in DSA's port.c. Signed-off-by: Russell King (Oracle) Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Link: https://lore.kernel.org/r/E1sByYA-00EM0y-Jn@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit bbb31b7ae14594aa2a7e74923ee38f312404ad66 Author: Russell King (Oracle) Date: Tue May 28 16:05:09 2024 +0100 net: dsa: remove mac_prepare()/mac_finish() shims No DSA driver makes use of the mac_prepare()/mac_finish() shimmed operations anymore, so we can remove these. Signed-off-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/E1sByNx-00ELW1-Vp@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit eebe71db8eb7c97382a0aeef3c2aef25518889f1 Merge: 1e37449fe3aa3 9104feed4c645 Author: Jakub Kicinski Date: Wed May 29 18:10:27 2024 -0700 Merge branch 'doc-netlink-fixes-for-ynl-doc-generator' Donald Hunter says: ==================== doc: netlink: Fixes for ynl doc generator Several fixes to ynl-gen-rst to resolve issues that can be seen in: https://docs.kernel.org/6.10-rc1/networking/netlink_spec/dpll.html#device-id-get https://docs.kernel.org/6.10-rc1/networking/netlink_spec/dpll.html#lock-status In patch 2, by not using 'sanitize' for op docs, any formatting in the .yaml gets passed straight through to the generated .rst which means that basic rst (also markdown compatible) list formatting can be used in the .yaml ==================== Link: https://lore.kernel.org/r/20240528140652.9445-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 9104feed4c6454b9a720e7e11047be7e5cd83487 Author: Donald Hunter Date: Tue May 28 15:06:52 2024 +0100 doc: netlink: Fix op pre and post fields in generated .rst The generated .rst has pre and post headings without any values, e.g. here: https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#device-id-get Emit keys and values in the generated .rst Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20240528140652.9445-5-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit cb7351ac17862cf8d4e00831ce4aa27f53bda01c Author: Donald Hunter Date: Tue May 28 15:06:51 2024 +0100 doc: netlink: Fix formatting of op flags in generated .rst Generate op flags as an inline list instead of a stringified python value. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20240528140652.9445-4-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit ebf9004136c76b7b62fe628a4bc88b3e894b4b95 Author: Donald Hunter Date: Tue May 28 15:06:50 2024 +0100 doc: netlink: Don't 'sanitize' op docstrings in generated .rst The doc strings for do/dump ops are emitted as toplevel .rst constructs so they can be multi-line. Pass multi-line text straight through to the .rst to retain any simple formatting from the .yaml This fixes e.g. list formatting for the pin-get docs in dpll.yaml: https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#pin-get Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20240528140652.9445-3-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit c697f515b6390b17e4a54a6f93aedf27133929c5 Author: Donald Hunter Date: Tue May 28 15:06:49 2024 +0100 doc: netlink: Fix generated .rst for multi-line docs Fix the newline replacement in ynl-gen-rst.py to put spaces between concatenated lines. This fixes the broken doc string formatting. See the dpll docs for an example of broken concatenation: https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#lock-status Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20240528140652.9445-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 1e37449fe3aa32e453eadaaba6e75b66c365efc4 Merge: 0f4b437b5fbf5 29c71bf2a05a1 Author: Jakub Kicinski Date: Wed May 29 17:32:51 2024 -0700 Merge branch 'net-ethernet-ti-am65-cpsw-nuss-support-stacked-switches' Alexander Sverdlin says: ==================== net: ethernet: ti: am65-cpsw-nuss: support stacked switches Currently an external Ethernet switch connected to a am65-cpsw-nuss CPU port will not be probed successfully because of_find_net_device_by_node() will not be able to find the netdev of the CPU port. It's necessary to populate of_node of the struct device for the am65-cpsw-nuss ports. DT nodes of the ports are already stored in per-port private data, but because of some legacy reasons the naming ("phy_node") was misleading. ==================== Link: https://lore.kernel.org/r/20240528075954.3608118-1-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski commit 29c71bf2a05a11f0d139590d37d92547477d5eb2 Author: Alexander Sverdlin Date: Tue May 28 09:59:50 2024 +0200 net: ethernet: ti: am65-cpsw-nuss: populate netdev of_node So that of_find_net_device_by_node() can find cpsw-nuss ports and other DSA switches can be stacked downstream. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20240528075954.3608118-3-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski commit 78269025e192ec8122ddd87a1ec2805598d8a1ab Author: Alexander Sverdlin Date: Tue May 28 09:59:49 2024 +0200 net: ethernet: ti: am65-cpsw-nuss: rename phy_node -> port_np Rename phy_node to port_np to better reflect what it actually is, because the new phylink API takes netdev node (or DSA port node), and resolves the phandle internally. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20240528075954.3608118-2-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski commit 0f4b437b5fbf5141ff886bb47581123eb222c543 Merge: c3390677f6258 fde6f897f2a18 Author: Jakub Kicinski Date: Wed May 29 17:21:37 2024 -0700 Merge branch 'tcp-fix-tcp_poll-races' Eric Dumazet says: ==================== tcp: fix tcp_poll() races Flakes in packetdrill tests stressing epoll_wait() were root caused to bad ordering in tcp_write_err() Precisely, we have to call sk_error_report() after tcp_done(). When fixing this issue, we discovered tcp_abort(), tcp_v4_err() and tcp_v6_err() had similar issues. Since tcp_reset() has the correct ordering, first patch takes part of it and creates tcp_done_with_error() helper. ==================== Link: https://lore.kernel.org/r/20240528125253.1966136-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit fde6f897f2a184546bf5516ac736523ef24dc6a7 Author: Eric Dumazet Date: Tue May 28 12:52:53 2024 +0000 tcp: fix races in tcp_v[46]_err() These functions have races when they: 1) Write sk->sk_err 2) call sk_error_report(sk) 3) call tcp_done(sk) As described in prior patches in this series: An smp_wmb() is missing. We should call tcp_done() before sk_error_report(sk) to have consistent tcp_poll() results on SMP hosts. Use tcp_done_with_error() where we centralized the correct sequence. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Link: https://lore.kernel.org/r/20240528125253.1966136-5-edumazet@google.com Signed-off-by: Jakub Kicinski commit 5ce4645c23cf5f048eb8e9ce49e514bababdee85 Author: Eric Dumazet Date: Tue May 28 12:52:52 2024 +0000 tcp: fix races in tcp_abort() tcp_abort() has the same issue than the one fixed in the prior patch in tcp_write_err(). In order to get consistent results from tcp_poll(), we must call sk_error_report() after tcp_done(). We can use tcp_done_with_error() to centralize this logic. Fixes: c1e64e298b8c ("net: diag: Support destroying TCP sockets.") Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Link: https://lore.kernel.org/r/20240528125253.1966136-4-edumazet@google.com Signed-off-by: Jakub Kicinski commit 853c3bd7b7917670224c9fe5245bd045cac411dd Author: Eric Dumazet Date: Tue May 28 12:52:51 2024 +0000 tcp: fix race in tcp_write_err() I noticed flakes in a packetdrill test, expecting an epoll_wait() to return EPOLLERR | EPOLLHUP on a failed connect() attempt, after multiple SYN retransmits. It sometimes return EPOLLERR only. The issue is that tcp_write_err(): 1) writes an error in sk->sk_err, 2) calls sk_error_report(), 3) then calls tcp_done(). tcp_done() is writing SHUTDOWN_MASK into sk->sk_shutdown, among other things. Problem is that the awaken user thread (from 2) sk_error_report()) might call tcp_poll() before tcp_done() has written sk->sk_shutdown. tcp_poll() only sees a non zero sk->sk_err and returns EPOLLERR. This patch fixes the issue by making sure to call sk_error_report() after tcp_done(). tcp_write_err() also lacks an smp_wmb(). We can reuse tcp_done_with_error() to factor out the details, as Neal suggested. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Link: https://lore.kernel.org/r/20240528125253.1966136-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit 5e514f1cba090e1c8fff03e92a175eccfe46305f Author: Eric Dumazet Date: Tue May 28 12:52:50 2024 +0000 tcp: add tcp_done_with_error() helper tcp_reset() ends with a sequence that is carefuly ordered. We need to fix [e]poll bugs in the following patches, it makes sense to use a common helper. Suggested-by: Neal Cardwell Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Link: https://lore.kernel.org/r/20240528125253.1966136-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit c3390677f6258748a91bf37b9bb21eab89f63b42 Author: Breno Leitao Date: Tue May 28 01:42:24 2024 -0700 netconsole: Do not shutdown dynamic configuration if cmdline is invalid If a user provides an invalid netconsole configuration during boot time (e.g., specifying an invalid ethX interface), netconsole will be entirely disabled. Consequently, the user won't be able to create new entries in /sys/kernel/config/netconsole/ as that directory does not exist. Apart from misconfiguration, another issue arises when ethX is loaded as a module and the netconsole= line in the command line points to ethX, resulting in an obvious failure. This renders netconsole unusable, as /sys/kernel/config/netconsole/ will never appear. This is more annoying since users reconfigure (or just toggle) the configuratin later (see commit 5fbd6cdbe304b ("netconsole: Attach cmdline target to dynamic target")) Create /sys/kernel/config/netconsole/ even if the command line arguments are invalid, so, users can create dynamic entries in netconsole. Reported-by: Aijay Adams Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240528084225.3215853-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 544a74c32bcc2eff5f93b9f638f687170e7274e9 Author: Jonas Karlman Date: Tue May 28 09:37:48 2024 +0000 dt-bindings: net: rockchip-dwmac: Fix rockchip,rk3308-gmac compatible Schema validation using rockchip,rk3308-gmac compatible fails with: ethernet@ff4e0000: compatible: ['rockchip,rk3308-gmac'] does not contain items matching the given schema from schema $id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml# ethernet@ff4e0000: Unevaluated properties are not allowed ('interrupt-names', 'interrupts', 'phy-mode', 'reg', 'reset-names', 'resets', 'snps,reset-active-low', 'snps,reset-delays-us', 'snps,reset-gpio' were unexpected) from schema $id: http://devicetree.org/schemas/net/rockchip-dwmac.yaml# Add rockchip,rk3308-gmac to snps,dwmac.yaml to fix DT schema validation. Fixes: 2cc8c910f515 ("dt-bindings: net: rockchip-dwmac: add rk3308 gmac compatible") Signed-off-by: Jonas Karlman Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240528093751.3690231-1-jonas@kwiboo.se Signed-off-by: Jakub Kicinski commit 126913479e88e7e0114efe380d2437cc70d9dc05 Author: Alexander Sverdlin Date: Tue May 28 09:31:13 2024 +0200 net: dsa: lan9303: imply SMSC_PHY Both LAN9303 and LAN9354 have internal PHYs on both external ports. Therefore a configuration without SMSC PHY support is non-practical at least and leads to: LAN9303_MDIO 8000f00.mdio:00: Found LAN9303 rev. 1 mdio_bus 8000f00.mdio:00: deferred probe pending: (reason unknown) Signed-off-by: Alexander Sverdlin Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240528073147.3604083-1-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski commit f088cabffcb646b559055464bb5fa79206752f07 Merge: fbe3e8473f391 6ba7acdb93b4e Author: Andrii Nakryiko Date: Wed May 29 16:01:48 2024 -0700 Merge branch 'bpf-add-a-generic-bits-iterator' Yafang Shao says: ==================== bpf: Add a generic bits iterator Three new kfuncs, namely bpf_iter_bits_{new,next,destroy}, have been added for the new bpf_iter_bits functionality. These kfuncs enable the iteration of the bits from a given address and a given number of bits. - bpf_iter_bits_new Initialize a new bits iterator for a given memory area. Due to the limitation of bpf memalloc, the max number of bits to be iterated over is (4096 * 8). - bpf_iter_bits_next Get the next bit in a bpf_iter_bits - bpf_iter_bits_destroy Destroy a bpf_iter_bits The bits iterator can be used in any context and on any address. Changes: - v7->v8: Refine the interface to avoid dealing with endianness (Andrii) - v6->v7: Fix endianness error for non-long-aligned data (Andrii) - v5->v6: Add positive tests (Andrii) - v4->v5: Simplify test cases (Andrii) - v3->v4: - Fix endianness error on s390x (Andrii) - zero-initialize kit->bits_copy and zero out nr_bits (Andrii) - v2->v3: Optimization for u64/u32 mask (Andrii) - v1->v2: Simplify the CPU number verification code to avoid the failure on s390x (Eduard) - bpf: Add bpf_iter_cpumask https://lwn.net/Articles/961104/ - bpf: Add new bpf helper bpf_for_each_cpu https://lwn.net/Articles/939939/ ==================== Link: https://lore.kernel.org/r/20240517023034.48138-1-laoar.shao@gmail.com Signed-off-by: Andrii Nakryiko commit 6ba7acdb93b4ecb554d5838fca3f5f0fcf9fff14 Author: Yafang Shao Date: Fri May 17 10:30:34 2024 +0800 selftests/bpf: Add selftest for bits iter Add test cases for the bits iter: - Positive cases - Bit mask representing a single word (8-byte unit) - Bit mask representing data spanning more than one word - The index of the set bit - Nagative cases - bpf_iter_bits_destroy() is required after calling bpf_iter_bits_new() - bpf_iter_bits_destroy() can only destroy an initialized iter - bpf_iter_bits_next() must use an initialized iter - Bit mask representing zero words - Bit mask representing fewer words than expected - Case for ENOMEM - Case for NULL pointer Signed-off-by: Yafang Shao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240517023034.48138-3-laoar.shao@gmail.com commit 4665415975b0827e9646cab91c61d02a6b364d59 Author: Yafang Shao Date: Fri May 17 10:30:33 2024 +0800 bpf: Add bits iterator Add three new kfuncs for the bits iterator: - bpf_iter_bits_new Initialize a new bits iterator for a given memory area. Due to the limitation of bpf memalloc, the max number of words (8-byte units) that can be iterated over is limited to (4096 / 8). - bpf_iter_bits_next Get the next bit in a bpf_iter_bits - bpf_iter_bits_destroy Destroy a bpf_iter_bits The bits iterator facilitates the iteration of the bits of a memory area, such as cpumask. It can be used in any context and on any address. Signed-off-by: Yafang Shao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240517023034.48138-2-laoar.shao@gmail.com commit 246e6426a87ee4dbb8cd08c9b43323263b5ab76f Author: Aleksandr Mezin Date: Fri May 24 03:39:58 2024 +0300 hwmon: (nzxt-smart2) Add support for another version of NZXT RGB & Fan Controller Add support for NZXT RGB & Fan Controller with USB ID 1e71:2020. Fan speed control reported to be working with existing userspace (hidraw) software, so it should be compatible. Fan channel count is the same. No known differences from already supported devices, at least regarding fan speed control and initialization. Signed-off-by: Aleksandr Mezin Link: https://lore.kernel.org/r/20240524004040.121044-1-mezin.alexander@gmail.com [groeck: Adjusted subject and description] Signed-off-by: Guenter Roeck commit b9c15c96ccb47ad860af2e075c5f3c90c4cd1730 Author: Wilken Gottwalt Date: Fri May 24 04:38:11 2024 +0000 hwmon: corsair-psu: add USB id of HX1200i Series 2023 psu Add the usb id of the HX1200i Series 2023. Update the documentation accordingly. Also fix the version comments, there are no Series 2022 products. That are legacy or first version products going back many many years. Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/ZlAZs4u0dU7JxtDf@monster.localdomain Signed-off-by: Guenter Roeck commit d3b2cfb42e2bfcda3e4a0e7ac0fca68b7de5e508 Author: Naresh Solanki Date: Tue May 28 18:21:21 2024 +0530 dt-bindings: hwmon: Add max6639 Add Devicetree binding documentation for Maxim MAX6639 temperature monitor with PWM fan-speed controller. Signed-off-by: Naresh Solanki Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240528125122.1129986-1-naresh.solanki@9elements.com [groeck: Dropped unnecessary '|' after description:] Signed-off-by: Guenter Roeck commit 32b0cf0379b6e8ce0e3078f60a5d421085529f60 Author: Rob Herring (Arm) Date: Fri May 10 07:32:36 2024 -0500 dt-bindings: arm: Remove obsolete RTSM DCSCB binding The Arm VExpress DCSCB binding is unused and was only ever used on a s/w model over 10 years ago. Remove it. Signed-off-by: Rob Herring (Arm) Acked-by: Conor Dooley Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240510123238.3904779-2-robh@kernel.org Signed-off-by: Sudeep Holla commit eb3f614ae48202ca5879eef7995e2cdf11f15662 Author: Rob Herring (Arm) Date: Fri May 10 07:32:35 2024 -0500 arm: vexpress: Remove obsolete RTSM DCSCB support The Arm Versatile DCSCB support is unused as the compatible "arm,rtsm,dcscb" is unused in any .dts file. It was only ever implemented on a s/w model (RTSM). Signed-off-by: Rob Herring (Arm) Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240510123238.3904779-1-robh@kernel.org Signed-off-by: Sudeep Holla commit be7d9294a411aa116d9f5874bd0ad982bb3eb7cc Author: Guenter Roeck Date: Fri May 24 15:38:16 2024 -0700 hwmon: (nct6683) Display warning when enabling driver for unknown customer Enabling the driver for devices with unknown customer ID is at least somewhat risky, so add a warning to the kernel log. Signed-off-by: Guenter Roeck commit 5997eb60f896830126bc1783465b678b110e2fdd Author: Marius Zachmann Date: Mon May 13 21:47:34 2024 +0200 hwmon: (corsair-cpro) Add firmware and bootloader information Add support for reporting firmware and bootloader version using debugfs. Update documentation accordingly. Signed-off-by: Marius Zachmann Link: https://lore.kernel.org/r/20240513194734.43040-2-mail@mariuszachmann.de Signed-off-by: Guenter Roeck commit 18c250bd7ed0fc6917bad13560851ef0f519778d Author: Sudeep Holla Date: Wed May 15 10:40:28 2024 +0100 firmware: arm_ffa: Split bus and driver into distinct modules Make the FF-A bus on its own as a distinct module initialized at subsys_initcall level when builtin. Keep the FF-A driver core stack, together with any configured transport, in a different module initialized as module_init level. FF-A drivers initialization is now changed to module_init level. Acked-by: Sebastian Ene Link: https://lore.kernel.org/r/20240515094028.1947976-2-sudeep.holla@arm.com Signed-off-by: Sudeep Holla commit 9dd15934f60d1298ad1c427711f338a194294a78 Author: Sudeep Holla Date: Wed May 15 10:40:27 2024 +0100 firmware: arm_ffa: Move the FF-A v1.0 NULL UUID workaround to bus notifier Currently FF-A bus ffa_device_match() handles the workaround for the FF-A v1.0 devices which are not populated with UUID to match. The FF-A bus layer calls into FF-A driver and populates the device UUID if it matches with the driver attempting to match. But this forces to have both FF-A bus and core driver to be bundled into a single module. However, keep it as a single module adds problems for the FF-A driver registrations and their initcall levels. In preparation to split the FF-A bus and the core driver into distinct modules, we need to move the workaround away from the FF-A bus layer. We can add it into the FF-A core driver as a bus notifier. In order to do so, we need to always match any driver with the device if the UUID is NULL and then during the driver binding phase, we can populate the UUID if it matches with the driver UUID table using the bus notifiers. We also need to add a check for NULL UUID before calling the device/driver probe as devices with NULL UUID is possible since we match all for that case. Acked-by: Sebastian Ene Link: https://lore.kernel.org/r/20240515094028.1947976-1-sudeep.holla@arm.com Signed-off-by: Sudeep Holla commit 123b158635505c89ed0d3ef45c5845ff9030a466 Author: Arnd Bergmann Date: Wed May 29 11:51:11 2024 +0200 EDAC, i10nm: make skx_common.o a separate module Commit 598afa050403 ("kbuild: warn objects shared among multiple modules") was added to track down cases where the same object is linked into multiple modules. This can cause serious problems if some modules are builtin while others are not. That test triggers this warning: scripts/Makefile.build:236: drivers/edac/Makefile: skx_common.o is added to multiple modules: i10nm_edac skx_edac Make this a separate module instead. [Tony: Added more background details to commit message] Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors") Signed-off-by: Arnd Bergmann Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20240529095132.1929397-1-arnd@kernel.org/ commit 568b13b65078e2b557ccf47674a354cecd1db641 Author: Richard Maina Date: Wed May 29 11:09:58 2024 -0700 remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop When remoteproc goes down unexpectedly this results in a state where any acquired hwspinlocks will remain locked possibly resulting in deadlock. In order to ensure all locks are freed we include a call to qcom_smem_bust_hwspin_lock_by_host() during remoteproc shutdown. For qcom_q6v5_pas remoteprocs, each remoteproc has an assigned smem host_id. Remoteproc can pass this id to smem to try and bust the lock on remoteproc stop. This edge case only occurs with q6v5_pas watchdog crashes. The error fatal case has handling to clear the hwspinlock before the error fatal interrupt is triggered. Signed-off-by: Richard Maina Reviewed-by: Bjorn Andersson Signed-off-by: Chris Lew Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-4-c8b924ffa5a2@quicinc.com Signed-off-by: Bjorn Andersson commit 2e3f0d693875db698891ffe89a18121bda5b95b8 Author: Chris Lew Date: Wed May 29 11:09:57 2024 -0700 soc: qcom: smem: Add qcom_smem_bust_hwspin_lock_by_host() Add qcom_smem_bust_hwspin_lock_by_host to enable remoteproc to bust the hwspin_lock owned by smem. In the event the remoteproc crashes unexpectedly, the remoteproc driver can invoke this API to try and bust the hwspin_lock and release the lock if still held by the remoteproc device. Signed-off-by: Chris Lew Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-3-c8b924ffa5a2@quicinc.com Signed-off-by: Bjorn Andersson commit 855cf5651790807c01f2ae35ee11b04c20b6ced4 Merge: 9dbd9962cfe56 73100deb59c38 Author: Bjorn Andersson Date: Wed May 29 12:54:29 2024 -0700 Merge branch '20240529-hwspinlock-bust-v3-2-c8b924ffa5a2@quicinc.com' into rproc-next Merge the topic branch introducing hwspin_lock_bust(), to allow invoking this from the Qualcomm remoteproc drivers. commit 718a7ad700b1ea86ae5a3ee636a275f98ba8ef86 Merge: 1613e604df0cd 73100deb59c38 Author: Bjorn Andersson Date: Wed May 29 12:52:37 2024 -0700 Merge branch '20240529-hwspinlock-bust-v3-2-c8b924ffa5a2@quicinc.com' into hwspinlock-next Merge the introduction of hwspin_lock_bust() through a topic branch, so that it can also be merged into the rproc-next branch. This to avoid any potential conflicts between the two trees. commit 73100deb59c3892e280234fcc0171a5376c71788 Author: Richard Maina Date: Wed May 29 11:09:56 2024 -0700 hwspinlock: qcom: implement bust operation Implement a new operation qcom_hwspinlock_bust() which can be invoked to bust any locks that are in use when a remoteproc is stopped or crashed. Signed-off-by: Richard Maina Reviewed-by: Bjorn Andersson Signed-off-by: Chris Lew Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-2-c8b924ffa5a2@quicinc.com Signed-off-by: Bjorn Andersson commit 7c327d56597d8de1680cf24e956b704270d3d84a Author: Richard Maina Date: Wed May 29 11:09:55 2024 -0700 hwspinlock: Introduce hwspin_lock_bust() When a remoteproc crashes or goes down unexpectedly this can result in a state where locks held by the remoteproc will remain locked possibly resulting in deadlock. This new API hwspin_lock_bust() allows hwspinlock implementers to define a bust operation for freeing previously acquired hwspinlocks after verifying ownership of the acquired lock. Signed-off-by: Richard Maina Reviewed-by: Bjorn Andersson Signed-off-by: Chris Lew Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-1-c8b924ffa5a2@quicinc.com Signed-off-by: Bjorn Andersson commit 34864c05a54d1bc544c8c3939aababbc481d99e3 Author: Tony Luck Date: Wed May 29 12:14:50 2024 -0700 ASoC: Intel: avs: es8336: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Reviewed-by: Amadeusz Sławiński Acked-by: Mark Brown Link: https://msgid.link/r/20240529191450.63414-1-tony.luck@intel.com Signed-off-by: Mark Brown commit f8718c482572181ca364ffca3c27365cc83cfe9e Author: Arnd Bergmann Date: Tue May 28 13:51:21 2024 +0200 drm/amd/display: Move 'struct scaler_data' off stack The scaler_data structure is implicitly copied onto the stack twice by being returned from a function. This is usually a bad idea, but it was not flagged by the compiler until a recent addition that pushed it over the 1024 byte function stack limit: drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_translation_helper.c: In function 'populate_dml_plane_cfg_from_plane_state': drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_translation_helper.c:1075:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Use an explicit kzalloc() and memcpy() instead here to keep it off the stack. Fixes: 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401") Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 669d6b078ed8991266da4c68c46ce7d2e942c474 Author: Arnd Bergmann Date: Tue May 28 13:51:20 2024 +0200 drm/amd/display: avoid large on-stack structures Putting excessively large objects on a function stack causes a warning about possibly overflowing the 8KiB of kernel stack: drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c: In function 'dcn401_update_bw_bounding_box': drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c:1599:1: error: the frame size of 1196 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] 1599 | } | ^ drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c: In function 'dc_state_create': drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:221:1: error: the frame size of 1196 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] 221 | } | ^ Use dynamic allocation instead. Fixes: e779f4587f61 ("drm/amd/display: Add handling for DC power mode") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 6d438caaeaa1a7fae7b523e7bc4cee262b9f101a Author: Arnd Bergmann Date: Tue May 28 13:51:19 2024 +0200 drm/amd/display: fix graphics_object_id size The graphics_object_id structure is meant to fit into 32 bits, as it's passed by value in and out of functions. A recent change increased the size to 128 bits, so it's now always passed by reference, which is clearly not intended and ends up producing a compile-time warning: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c: In function 'construct_phy': drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:743:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Add back the bitfields to revert to the original size, while keeping the 'enum' type change. Fixes: fec85f995a4b ("drm/amd/display: Fix compiler redefinition warnings for certain configs") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 88c61827cedc14cd305d4266dc18ff0fdb3f8d4c Author: Arnd Bergmann Date: Tue May 28 13:51:18 2024 +0200 drm/amd/display: dynamically allocate dml2_configuration_options structures This structure is too large to fit on a stack, as shown by the newly introduced warnings from a recent code change: drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c: In function 'dcn32_update_bw_bounding_box': drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c:2019:1: error: the frame size of 1180 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn321/dcn321_resource.c: In function 'dcn321_update_bw_bounding_box': drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn321/dcn321_resource.c:1597:1: error: the frame size of 1180 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c: In function 'dc_state_create': drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:219:1: error: the frame size of 1184 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Instead of open-coding the assignment of a large structure to a stack variable, use an explicit kmemdup() in each case to move it off the stack. Fixes: e779f4587f61 ("drm/amd/display: Add handling for DC power mode") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 3027ce13e04eee76539ca65c2cb1028a01c8c508 Author: Bruno Rocha Levi Date: Tue May 28 10:08:04 2024 -0300 drivers/gpu: Fix misalignment in comment block This patch fixes a warning from checkpatch by ensuring the trailing */ is aligned with the rest of the *, improving readability. Co-developed-by: Lucas Antonio Signed-off-by: Lucas Antonio Signed-off-by: Bruno Rocha Levi Signed-off-by: Alex Deucher commit c5e358913d92bf32ce0d199c133b2c5ffd1e980d Author: Jay Cornwall Date: Thu May 23 08:58:11 2024 -0500 drm/amdkfd: Replace deprecated gfx12 trap handler instructions Newer assemblers reject S_WAITCNT. All instances of S_WAITCNT can be replaced by S_WAITCNT 0 (< gfx12) or S_WAIT_IDLE (>= gfx12) since there is no concurrency of different memory instruction classes. Signed-off-by: Jay Cornwall Reviewed-by: Lancelot Six Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit dec4f2d224ed7cae488189013a238432b383bfeb Author: Jay Cornwall Date: Thu May 23 08:55:44 2024 -0500 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 Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ff4e49f446ed24772182c724e0ef1a5be23c622a Author: Mario Limonciello Date: Sun May 26 07:59:08 2024 -0500 drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms commit cd94d1b182d2 ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") attempted to fix shutdown issues that were reported since commit 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") but caused issues for some people. Adjust the workaround flow to properly only apply in the S4 case: -> For shutdown go through SMU_MSG_PrepareMp1ForUnload -> For S4 go through SMU_MSG_GfxDeviceDriverReset and SMU_MSG_PrepareMp1ForUnload Reported-and-tested-by: lectrode Closes: https://github.com/void-linux/void-packages/issues/50417 Cc: stable@vger.kernel.org Fixes: cd94d1b182d2 ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") Reviewed-by: Tim Huang Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 6670142d25f3cc3166f2a6c8454acd310bf2776a Author: Alex Deucher Date: Thu Apr 11 17:16:09 2024 -0400 drm/amdgpu/gfx11: enable gfx pipe1 hardware support Enable gfx pipe1 hardware support. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ef5c0f897ec91e43b1d719dec170279e4c68382c Author: Rajneesh Bhardwaj Date: Wed May 22 15:04:29 2024 -0400 drm/amdgpu: Make CPX mode auto default in NPS4 On GFXIP9.4.3, make CPX mode as the default compute mode if the node is setup in NPS4 memory partition mode. This change is only applicable for dGPU, for APU, continue to use TPX mode. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 2e216b1e6ba218afc873f4cdaf383e8d18403d74 Author: Alex Deucher Date: Thu May 2 17:04:01 2024 -0400 drm/amdgpu/gfx11: handle priority setup for gfx pipe1 Set up pipe1 as a high priority queue. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit eab57bf22f07a9242171bcc6909b30f4c737ee5f Author: Alex Deucher Date: Thu Apr 11 17:13:13 2024 -0400 drm/amdgpu/gfx11: select HDP ref/mask according to gfx ring pipe Use correct ref/mask for differnent gfx ring pipe. Ported from ZhenGuo's patch for gfx10. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e864180ee49b4d30e640fd1e1d852b86411420c9 Author: Victor Skvortsov Date: Mon May 27 16:10:43 2024 -0400 drm/amdgpu: Add lock around VF RLCG interface flush_gpu_tlb may be called from another thread while device_gpu_recover is running. Both of these threads access registers through the VF RLCG interface during VF Full Access. Add a lock around this interface to prevent race conditions between these threads. Signed-off-by: Victor Skvortsov Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 7978c4d41496becda1c1cbd5b783c60e9b64d618 Author: Alex Deucher Date: Wed May 22 15:26:50 2024 -0400 drm/amdkfd: simplify APU VRAM handling With commit 89773b85599a ("drm/amdkfd: Let VRAM allocations go to GTT domain on small APUs") big and small APU "VRAM" handling in KFD was unified. Since AMD_IS_APU is set for both big and small APUs, we can simplify the checks in the code. v2: clean up a few more places (Lang) Acked-by: Felix Kuehling Reviewed-by: Lang Yu Signed-off-by: Alex Deucher commit d4ab6c409b16954d977959e1b9848910f58f32bc Author: Alex Deucher Date: Mon May 20 14:41:31 2024 -0400 Revert "drm/amdkfd: fix gfx_target_version for certain 11.0.3 devices" This reverts commit 28ebbb4981cb1fad12e0b1227dbecc88810b1ee8. Revert this commit as apparently the LLVM code to take advantage of this never landed. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher Cc: Feifei Xu commit 234e94555800d644ae970ff8da50f1f03dbc6ff9 Author: Aurabindo Pillai Date: Tue May 21 19:46:31 2024 +0000 drm/amd/display: Enable copying of bounding box data from VBIOS DMUB Allocate some memory, send the address in chunks to dmub, and finally ask it to copy the bounding box data into the newly allocated memory. Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit c75bfd1567fec225b53574f5b7f392c4951de729 Author: Aurabindo Pillai Date: Thu May 16 10:30:53 2024 -0400 drm/amd/display: Add new GPINT command definitions New commands for enabling copy of DC bounding box values from VBIOS DMUB Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 7920af262ad1ffa60de091794aeac9531a9d4226 Author: Aurabindo Pillai Date: Thu May 16 10:23:19 2024 -0400 drm/amd/display: Move some init routines to dm_sw_init() Move creation of CGS device node and the DAL allocation list from amdgpu_dm_init() to dm_sw_init() which runs before dmub's sw init hook. This is required for communicating with the VBIOS DMUB image from the VBIOS that was loaded for early pre-os boot. Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit d0a6d85072b02c02697bc60f2115756aa1bf89d8 Author: Rodrigo Siqueira Date: Fri May 17 13:10:20 2024 -0600 drm/amd/display: Add missing registers for DCN401 Add some additional registers. Signed-off-by: Rodrigo Siqueira Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 00ee2e58c144f425345be65ce71f3b37119a673b Author: Aurabindo Pillai Date: Tue May 14 00:17:00 2024 +0000 drm/amd/display: Fix null pointer dereference for dcn401 When ODM slice happens on DCN401, there is a null pointer exception caused by that. This commit address this issue by checking if the required data structures are initialized. Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 7da55c27e76749b98401fe307d3e243fe6ceb53d Author: Aurabindo Pillai Date: Mon May 13 20:08:58 2024 -0400 drm/amd/display: Remove incorrect FP context start All the DC_FP_START/END should be used before call anything from DML2, for this reason, the use of those guards inside DML it is not correct. This commit removes two unnecessary DC_FP_START/END from a dml2 function. Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit e7595e3740e64b824cb8adda1dd5c3b7e1057f5c Author: Aurabindo Pillai Date: Mon May 13 19:31:10 2024 -0400 drm/amd/display: Use DCN 410 includes for DCN401 DCN401 is using DCN 320 headers, which does not have all the right registers for DCN401. This commit just replace DCN320 includes with the one from DCN410. Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit b7a08552e11fb5f1b9544e251f56660fcfee3dc2 Author: Aurabindo Pillai Date: Mon May 13 17:06:12 2024 -0400 drm/amd/display: Remove unnecessary HPD entry for DCN401 Drop the extra HPD irq entry for DCN401. Reviewed-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit a00e85713c372f19a81432e44f0bd5cb5102c644 Author: Rodrigo Siqueira Date: Mon Apr 29 14:07:50 2024 -0400 drm/amd/display: Update DML2.1 generated code Most of the DML code is generated, and it is necessary to update some parts of it from time to time. This commit brings the latest generated code for DML 2.1. Signed-off-by: Rodrigo Siqueira Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 91b586cc05fdcddf3c63109dee5c7960cfb2e852 Author: Pinninti Date: Thu Apr 25 17:03:59 2024 +0530 drm/amd/display: Refactor HUBP into component folder. [why] cleaning up the code refactor requires hubp to be in its own component. [how] move all files under newly created hubp folder and fixing the makefiles. Reviewed-by: Rodrigo Siqueira Signed-off-by: Pinninti Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit ddef2cfbb8927f7236f1e0d12ffd35b5d576e300 Author: Rodrigo Siqueira Date: Tue May 14 11:22:00 2024 -0600 drm/amd/display: Remove unused code This commit removes some unused code with the required adjustments. Signed-off-by: Rodrigo Siqueira Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 2998bccfa4197ff49bf70cbe14563d1417fe3ccf Author: Samson Tam Date: Fri Apr 26 12:17:26 2024 -0400 drm/amd/display: Enable ISHARP support for DCN401 [Why] Enable sharpener support for DCN401 [How] - Removed memcmp check that was preventing ISHARP from being enabled. - Add missing ISHARP register defines, masks, and writes. - Add programming of Blur and Scale coefficients. - Program FMT_MODE and NLDELTA registers based on LLS_PREF and pixel - format - Only enable ISHARP for YUV420 - Add disabling of ISHARP - Add debug flags and registry keys for debugging ISHARP. - Set default to medium level Acked-by: Rodrigo Siqueira Signed-off-by: Samson Tam Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit c2edec1676ca40abf40d1d895765a6cf801decba Author: Sridevi Date: Fri Apr 26 18:06:26 2024 -0400 drm/amd/display: Fix incorrect cursor position for dcn401 [Why] Incorrect cursor position calculation in some scenarios. Also for mirror and rotation cases. [How] Fix for incorrect cursor position. Added new test scenarios for diags cursor test. Updated CRC for few of the diags cursor test scenarios. Reviewed-by: Rodrigo Siqueira Signed-off-by: Sridevi Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 3c603b1fa8b44de94c97dd0baf9b40a74586b55d Author: Yang Wang Date: Mon May 27 15:40:38 2024 +0800 drm/amdgpu: fix typo in amdgpu_ras_aca_sysfs_read() function fix typo "info.ue_count" in amdgpu_ras_aca_sysfs_read() function. Fixes: 865d3397630b ("drm/amdgpu: add aca deferred error type support") Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 511a623fb46a6cf578c61d4f2755783c48807c77 Author: Jesse Zhang Date: Thu May 23 17:14:45 2024 +0800 drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent The pointer parent may be NULLed by the function amdgpu_vm_pt_parent. To make the code more robust, check the pointer parent. Signed-off-by: Jesse Zhang Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ab47fa8358f73c25543e6bcfe98fa952c151666e Author: David (Ming Qiang) Wu Date: Thu May 23 14:14:35 2024 -0400 drm/amd/amdgpu: add AMD_PG_SUPPORT_VCN_DPG flag AMD_PG_SUPPORT_VCN_DPG is needed for secure parts and should/can be enabled by now. Signed-off-by: David (Ming Qiang) Wu Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit f2a1fbdd1f193f3d9b5b28349d924ca45046f541 Author: Alex Deucher Date: Thu May 2 16:50:39 2024 -0400 drm/amdgpu: drop MES 10.1 support v3 It was an enablement vehicle for MES 11 and was never productized. Remove it. v2: drop additional checks in the GFX10 code. v3: drop mes_api_def.h Acked-by: Christian König Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 04c1ea9d6482a012c050720e13fcb858884af75d Author: Jiapeng Chong Date: Fri May 24 10:19:20 2024 +0800 drm/amd/display: clean up some inconsistent indenting No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:5200 dc_power_down_on_boot() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9166 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit ca0bfaad4fb1c70c494953791780d52c513ee324 Author: Alex Deucher Date: Thu May 16 09:51:26 2024 -0400 drm/amdgpu: silence UBSAN warning Convert a variable sized array from [1] to []. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 87dfeb47a5f48e0831071f5b69eb4ec3147fd56b Author: Alex Deucher Date: Wed May 15 11:25:49 2024 -0400 drm/amdgpu: Adjust logic in amdgpu_device_partner_bandwidth() Use current speed/width on devices which don't support dynamic PCIe switching. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3289 Acked-by: Christian König Signed-off-by: Alex Deucher commit f31f012d799cb3a1ab0e99db3694dd5616e59947 Merge: c1ca3e2fa8916 334874910c8e8 Author: Mark Brown Date: Wed May 29 18:11:37 2024 +0100 Fix issue when using devm_of_regulator_put_matches and Merge series from Alina Yu : There are two types of LDO VOUT: fixed voltage mode and adjustable voltage mode. As the fixed voltage for the LDO is outside the range of the adjustable voltage mode, the constraints for this scenario are not suitable to represent both modes. Therefore, A property is added to specify the fixed LDO VOUT. In this version, a software bug has been fixed. rtq2208_ldo_match is no longer a local variable. It prevents invalid memory access when devm_of_regulator_put_matches is called. commit 37ea1aee18e7418ad5a3aa5f14c87c8e0736fad1 Author: Michal Wajdeczko Date: Tue May 21 16:22:56 2024 +0200 drm/xe: Drop undesired prefix from the platform name We don't have to use exact names of the enumerators as the potentially user-facing platform names. When constructing platform descriptor fields, use the unique platform tag and add the XE_ prefix only to the generated enum field. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240521142257.756-3-michal.wajdeczko@intel.com Signed-off-by: Lucas De Marchi commit 52100401c17b8827c185c8b44fe473a3d9421836 Merge: e80613d6a6d52 255009d22c185 Author: Mark Brown Date: Wed May 29 16:32:22 2024 +0100 ASoC: samsung: midas-audio: Add GPIO-based headset Merge series from Artur Weber : Many of Samsung's Exynos 4 devices share the same midas-audio driver to handle the codec setup. While most of these devices, including the Midas itself, use the jack detection provided by the WM8994 driver, other devices such as the Samsung Galaxy Tab 3 8.0 (lt01) use two GPIOs and an ADC channel to determine jack insertion, the jack's type, and button presses (for headsets with volume up/down/play buttons). In the downstream kernel, this behavior is implemented in the sec-jack driver[1], and the per-device settings are configured in *-jack.c files in the mach folder (see e.g. the Tab 3's implementation[2]). This patchset implements this mechanism in the midas_wm1811.c driver, and adds new DTS options to allow for its configuration. It also enables jack detection for the Samsung Galaxy Tab 3 8.0. A very similar mechanism was already present in the aries_wm8994.c driver[3]; this implementation heavily borrows from it, though there are a few extra cleanups as well. commit d4ec229eaeb8453ad7244fc1d919ac51ac5ba394 Author: Dragan Simic Date: Tue May 28 18:45:16 2024 +0200 arm64: dts: allwinner: Add cache information to the SoC dtsi for H616 Add missing cache information to the Allwinner H616 SoC dtsi, to allow the userspace, which includes lscpu(1) that uses the virtual files provided by the kernel under the /sys/devices/system/cpu directory, to display the proper H616 cache information. Adding the cache information to the H616 SoC dtsi also makes the following warning message in the kernel log go away: cacheinfo: Unable to detect cache hierarchy for CPU 0 Rather conspicuously, almost no cache-related information is available in the publicly available Allwinner H616 datasheet (version 1.0) and H616 user manual (version 1.0). Thus, the cache parameters for the H616 SoC dtsi were obtained and derived by hand from the cache size and layout specifications found in the following technical reference manual, and from the cache size and die revision hints available from the following community-provided data and memory subsystem benchmarks: - ARM Cortex-A53 revision r0p4 TRM, version J - Summary of the two available H616 die revisions and their differences in cache sizes observed from the CSSIDR_EL1 register readouts, provided by Andre Przywara [1][2] - Tinymembench benchmark results of the H616-based OrangePi Zero 2 SBC, provided by Thomas Kaiser [3] For future reference, here's a brief summary of the available documentation and the community-provided data and memory subsystem benchmarks: - All caches employ the 64-byte cache line length - Each Cortex-A53 core has 32 KB of L1 2-way, set-associative instruction cache and 32 KB of L1 4-way, set-associative data cache - The size of the L2 cache depends on the actual H616 die revision (there are two die revisions), so the entire SoC can have either 256 KB or 1 MB of unified L2 16-way, set-associative cache [1] Also for future reference, here's the relevant excerpt from the community- provided H616 memory subsystem benchmark, [3] which confirms that 32 KB and 256 KB are the L1 data and L2 cache sizes, respectively: block size : single random read / dual random read 1024 : 0.0 ns / 0.0 ns 2048 : 0.0 ns / 0.0 ns 4096 : 0.0 ns / 0.0 ns 8192 : 0.0 ns / 0.0 ns 16384 : 0.0 ns / 0.0 ns 32768 : 0.0 ns / 0.0 ns 65536 : 4.3 ns / 7.3 ns 131072 : 6.6 ns / 10.5 ns 262144 : 9.8 ns / 15.2 ns 524288 : 91.8 ns / 142.9 ns 1048576 : 138.6 ns / 188.3 ns 2097152 : 163.0 ns / 204.8 ns 4194304 : 178.8 ns / 213.5 ns 8388608 : 187.1 ns / 217.9 ns 16777216 : 192.2 ns / 220.9 ns 33554432 : 196.5 ns / 224.0 ns 67108864 : 215.7 ns / 259.5 ns The changes introduced to the H616 SoC dtsi by this patch specify 256 KB as the L2 cache size. As outlined by Andre Przywara, [2] a follow-up TF-A patch will perform runtime adjustment of the device tree data, making the correct L2 cache size of 1 MB present in the device tree for the boards based on the revision of H616 that actually provides 1 MB of L2 cache. [1] https://lore.kernel.org/linux-sunxi/20240430114627.0cfcd14a@donnerap.manchester.arm.com/ [2] https://lore.kernel.org/linux-sunxi/20240501103059.10a8f7de@donnerap.manchester.arm.com/ [3] https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/master/results/4knM.txt Suggested-by: Andre Przywara Helped-by: Andre Przywara Reviewed-by: Andre Przywara Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/e4b9cc3e3d366a571e552c31dafa5de847bc1c12.1716914537.git.dsimic@manjaro.org Signed-off-by: Chen-Yu Tsai commit e80613d6a6d528a265411556b0a84596fdc39959 Merge: d029ca6322aae baf9899122b0e Author: Mark Brown Date: Wed May 29 15:00:07 2024 +0100 ASoC: codecs: add support for everest-semi es8311 Merge series from Matteo Martelli : This patch set adds support for the Everest-semi ES8311 codec. Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control. Implemented and tested most of the codec features, with few limitations listed in the driver commit message. The test setup was composed of a ESP32-LyraT-Mini board, which embeds the codec, connected via I2C and I2S to a Raspberry Pi Zero W host board. Some tests were also performed on a Pine64 A64 host board (e.g. to test the suspend/resume not supported by the rpi). The codec driver was bound with the simple-card driver running on kernel v6.9-rc7. commit d029ca6322aaefd5d4b35f4937f1719a160ac41b Merge: 8a8554e6468ee 401a1f021bbc5 Author: Mark Brown Date: Wed May 29 14:59:59 2024 +0100 ASoC: fsl_mqs: Add i.MX95 platform support Merge series from Shengjiu Wang : There are two MQS instances on the i.MX95 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 8a8554e6468ee41534eb776c788ca9e5d82eb2cd Merge: 2ea176304d3ec cf03e271fdca8 Author: Mark Brown Date: Wed May 29 14:59:51 2024 +0100 ASoC: qcom: x1e80100: Correct channel mapping Merge series from Krzysztof Kozlowski : X1E80100 CRD is the first board, which comes with four speakers, so we still keep fixing and adding missing pieces. The board has speaker arranged as left front+back and then right front+back. Using default channel mapping causes front right speaker to play left back stream. Adjust the channel maps for frontend DAIs to fix stereo and four-channel playback. commit 2ea176304d3ec381a370ba89ffc28453bb137f3c Merge: d8b3a77bead11 1085350387056 Author: Mark Brown Date: Wed May 29 14:59:44 2024 +0100 ASoC: Intel: boards: updates for 6.11 Merge series from Pierre-Louis Bossart : More simplifications from Brent Lu for Chromebooks, Bard Liao for SoundWire, and support for new Dell SKUs w/ Cirrus Logic codecs added by Charles Keepax. commit d8b3a77bead11711a66d54554e20e8c7d549cd08 Merge: e46e55b8142c2 2502f8dd8c30e Author: Mark Brown Date: Wed May 29 14:59:36 2024 +0100 Support Tegra I2S client format conversion Merge series from Sameer Pujar : The AHUB HW modules are interconnected with CIF which are capable of supporting Channel and Sample bit format conversion. Due to this, the I2S Client can have different Channel and Sample bit from the hw_params() and this config is passed from CIF port of I2S DT node which can help to perform this conversion. - First change to split simple_fixup_sample_fmt to support returning sample format value - Second patch to support Tegra I2S client channel and sample format programming based on CIF port from DT node. commit 334874910c8e88a728e60e1db332739a5a8ae89e Author: Alina Yu Date: Tue May 28 14:01:16 2024 +0800 regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property As the fixed voltage for the LDO is outside the range of the adjustable voltage mode, the constraints for this scenario are not suitable to represent both modes. Therefore, A property is added to specify the fixed LDO VOUT. Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version. Signed-off-by: Alina Yu Acked-by: Krzysztof Kozlowski Link: https://msgid.link/r/c6cb218f6338291525a29ed89a88a42c175127ad.1716870419.git.alina_yu@richtek.com Signed-off-by: Mark Brown commit af1296d15d8907a5aeeeb4ecd3e5878c9a349048 Author: Alina Yu Date: Tue May 28 14:01:15 2024 +0800 regulator: rtq2208: Add fixed LDO VOUT property and check that matches the constraints A fixed LDO VOUT property has been added to specify the fixed_uV of the regulator_desc. Additionally, a check has been included in this version to ensure that the fixed_uV matches the constraints. Signed-off-by: Alina Yu Link: https://msgid.link/r/39357ff9e6e5f3dec5a6f7f833a3591c0defc63a.1716870419.git.alina_yu@richtek.com Signed-off-by: Mark Brown commit 74259990b5938dc55fbe2f9b0431d5f370d34b85 Author: Alina Yu Date: Tue May 28 14:01:14 2024 +0800 regulator: rtq2208: Fix LDO to be compatible with both fixed and adjustable vout In this patch, LDO's adjustable and fixed Vout settings are compatible. The LDO Vout ability depends on "richtek,fixed-microvolt". If adjustable, the Vout can be set to either 1800mV or 3300mV. Signed-off-by: Alina Yu Link: https://msgid.link/r/5ad4c7728c7fa7f6286db36b99d31c9d0f5d16c7.1716870419.git.alina_yu@richtek.com Signed-off-by: Mark Brown commit c1ca3e2fa89164c01dfb78eca344c12a511d1762 Merge: 4236b12c8731e bb064c866d84d Author: Mark Brown Date: Wed May 29 14:37:49 2024 +0100 ARM: st: add new compatible for PWR regulators on Merge series from Patrick Delaunay : This patchset adds the new PWR regulators compatible for STM32MP13: "st,stm32mp13-pwr-reg". As this node is just introduced by [1] and it is is not used by any board in Linux, it is the good time to introduced this compatible and update the STM32MP13 SoC dtsi without ABI break. A new compatible is needed as the content of the PWR_CR3 register, used by this driver change with new bits on STM32MP13 for SD IO domain: - bit 23: VDDSD2VALID - bit 22: VDDSD1VALID - bit 16: VDDSD2RDY - bit 15: VDDSD2EN - bit 14: VDDSD1RDY - bit 13: VDDSD1EN I will push a update on STM32MP13 SoC dtsi if this new compatible is accepted to preserve the bisectability. [1] commit f798f7079233 ("ARM: dts: stm32: add PWR regulators support on stm32mp131") https://lore.kernel.org/linux-arm-kernel/b89d0531-067f-4356-91b0-ed7434cee3d7@foss.st.com/ commit 7e4333567db8f7d82929cb95458ceb6eb43bb4e4 Author: Karthik Poosa Date: Wed May 29 10:37:58 2024 +0530 drm/xe/hwmon: Expose card power and energy attributes of BMG In BMG there are separate registers for card/platform power and energy. These are exposed through channel 0 i.e power_1/energy1_xxx. Signed-off-by: Karthik Poosa Reviewed-by: Badal Nilawar Link: https://lore.kernel.org/r/20240523144351.4040131-3-balasubramani.vivekanandan@intel.com Signed-off-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20240529050758.442056-3-balasubramani.vivekanandan@intel.com Signed-off-by: Rodrigo Vivi commit 713f8834389f4b34bc8b449412202543c8b32214 Author: Andreas Gruenbacher Date: Thu Mar 28 20:46:25 2024 +0100 gfs2: Get rid of demote_ok checks The demote_ok glock operation is only still used to prevent the inode glocks of the "jindex" and "rindex" directories from getting recycled while they are still referenced by sdp->sd_jindex and sdp->sd_rindex. However, the LRU walking code will no longer recycle glocks which are referenced, so the demote_ok glock operation is obsolete and can be removed. Each of a glock's holders in the gl_holders list is holding a reference on the glock, so when the list of holders isn't empty in demote_ok(), the existing reference count check will already prevent the glock from getting released. This means that demote_ok() is obsolete as well. Signed-off-by: Andreas Gruenbacher commit 3f4475bf24de31cce4a0c7d1372d4ab02b1f1407 Author: Andreas Gruenbacher Date: Sat Mar 30 05:08:32 2024 +0100 Revert "GFS2: Don't add all glocks to the lru" This reverts commit e7ccaf5fe1590667b3fa2f8df5c5ec9ba0dc5b85. Before commit e7ccaf5fe159, every time a resource group glock was dequeued by gfs2_glock_dq(), it was added to the glock LRU list even though the glock was still referenced by the resource group and could never be evicted, anyway. Commit e7ccaf5fe159 added a GLOF_LRU hack to avoid that overhead for resource group glocks, and that hack was since adopted for some other types of glocks as well. We now no longer add glocks to the glock LRU list while they are still referenced. This solves the underlying problem, and obsoletes the GLOF_LRU hack. Signed-off-by: Andreas Gruenbacher (cherry picked from commit 3e5257c810cba91e274d07f3db5cf013c7c830be) commit 767fd5a0160774178a597b7a7b6e07915fe00efa Author: Andreas Gruenbacher Date: Wed Apr 10 06:58:00 2024 +0200 gfs2: Revise glock reference counting model In the current glock reference counting model, a bias of one is added to a glock's refcount when it is locked (gl->gl_state != LM_ST_UNLOCKED). A glock is removed from the lru_list when it is enqueued, and added back when it is dequeued. This isn't a very appropriate model because most glocks are held for long periods of time (for example, the inode "owns" references to its inode and iopen glocks as long as the inode is cached even when the glock state changes to LM_ST_UNLOCKED), and they can only be freed when they are no longer referenced, anyway. Fix this by getting rid of the refcount bias for locked glocks. That way, we can use lockref_put_or_lock() to efficiently drop all but the last glock reference, and put the glock onto the lru_list when the last reference is dropped. When find_insert_glock() returns a reference to a cached glock, it removes the glock from the lru_list. Dumping the "glocks" and "glstats" debugfs files also takes glock references, but instead of removing the glocks from the lru_list in that case as well, we leave them on the list. This ensures that dumping those files won't perturb the order of the glocks on the lru_list. In addition, when the last reference to an *unlocked* glock is dropped, we immediately free it; this preserves the preexisting behavior. If it later turns out that caching unlocked glocks is useful in some situations, we can change the caching strategy. It is currently unclear if a glock that has no active references can have the GLF_LFLUSH flag set. To make sure that such a glock won't accidentally be evicted due to memory pressure, we add a GLF_LFLUSH check to gfs2_dispose_glock_lru(). Signed-off-by: Andreas Gruenbacher commit 30e388d573673474cbd089dec83688331c117add Author: Andreas Gruenbacher Date: Thu Apr 11 14:13:30 2024 +0200 gfs2: Switch to a per-filesystem glock workqueue Switch to a per-filesystem glock workqueue. Additional workqueues are cheap nowadays, and keeping separate workqueues allows to flush the work of each filesystem without affecting the others. Signed-off-by: Andreas Gruenbacher commit 51568ac2e9d49b66f456dacd376af308f8695497 Author: Andreas Gruenbacher Date: Tue Apr 9 09:24:27 2024 +0200 gfs2: Report when glocks cannot be freed for a long time When glocks cannot be freed for a long time, avoid the "task blocked for more than N seconds" messages and report how many glocks are still outstanding, instead. Signed-off-by: Andreas Gruenbacher commit 8f6b8f142bdab2ed8c8fcd00def947c372382401 Author: Andreas Gruenbacher Date: Mon Apr 8 09:36:48 2024 +0200 gfs2: gfs2_glock_get cleanup Clean up the messy code in gfs2_glock_get(). No change in functionality. Signed-off-by: Andreas Gruenbacher commit c8758ad005c98b15cd8b7a559dc51f8ddbc56d0a Author: Andreas Gruenbacher Date: Wed Apr 3 07:09:30 2024 +0200 gfs2: Invert the GLF_INITIAL flag Invert the meaning of the GLF_INITIAL flag: right now, when GLF_INITIAL is set, a DLM lock exists and we have a valid identifier for it; when GLF_INITIAL is cleared, no DLM lock exists (yet). This is confusing. In addition, it makes more sense to highlight the exceptional case (i.e., no DLM lock exists yet) in glock dumps and trace points than to highlight the common case. To avoid confusion between the "old" and the "new" meaning of the flag, use 'a' instead of 'I' to represent the flag. For improved code consistency, check if the GLF_INITIAL flag is cleared to determine whether a DLM lock exists instead of checking if the lock identifier is non-zero. Document what the flag is used for. Signed-off-by: Andreas Gruenbacher commit c8cf2d9f189bf53beefd53b90cc65c556d16dd5a Author: Andreas Gruenbacher Date: Sat Mar 30 06:51:41 2024 +0100 gfs2: Remove outdated comment in glock_work_func Signed-off-by: Andreas Gruenbacher commit 97d6fdcd79752af8686ab58a0b9389ba80ae0fae Author: Andreas Gruenbacher Date: Mon Mar 25 16:59:40 2024 +0100 gfs2: Update glocks documentation Rearrange the table of locking modes and associated caching capability to be in order of increasing caching capability. Update the description of the glock operations. Signed-off-by: Andreas Gruenbacher commit e90f7a58e659a30656b3a83173d4bdee1e2b853d Author: Karthik Poosa Date: Wed May 29 10:37:57 2024 +0530 drm/xe/hwmon: Add HWMON support for BMG Add HWMON support for BMG. Exposing the pkg power, current, energy info. Signed-off-by: Karthik Poosa Reviewed-by: Badal Nilawar Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20240523144351.4040131-2-balasubramani.vivekanandan@intel.com Signed-off-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20240529050758.442056-2-balasubramani.vivekanandan@intel.com Signed-off-by: Rodrigo Vivi commit 2559e61e7ef4efe546f081d8bee917e410e8e6a9 Author: Konrad Dybcio Date: Wed May 29 13:17:18 2024 +0200 arm64: dts: qcom: x1e80100-pmics: Add the missing PMICs During the initial bringup, all of the peripherals on non-SMB PMICs were either not used, or were not necessary to accomplish certain goals. This however, left a hole in the hardware description. Add the missing ones. Note that the PM8010 errors out on reads on the CRD (works fine on the QCP) for reasons unknown, but that shall be ironed out in the future.. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240529-topic-x1e_pmic-v1-2-9de0506179eb@linaro.org Signed-off-by: Bjorn Andersson commit 255009d22c185623140de600a5fb54f0fd541bb8 Author: Artur Weber Date: Sat May 25 15:28:10 2024 +0200 ASoC: samsung: midas_wm1811: Use dev_err_probe where appropriate Since we're already using it in the newly-added GPIO requests for jack detection, extend it to the previous checks as well. Signed-off-by: Artur Weber Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-6-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown commit c91d0c2e198d4453e634fe43a72ccbc59811af17 Author: Artur Weber Date: Sat May 25 15:28:09 2024 +0200 ASoC: samsung: midas_wm1811: Add GPIO-based headset jack detection Some Samsung devices that use the midas_wm1811 driver use a GPIO-based method for detecting whether the headset jack is plugged in, as well as detecting which headset buttons are pressed. There are two GPIOs: a "headset detect" GPIO responsible for detecting jack insertion, and a "headset key" GPIO which triggers when a button on the headset is pressed. The plug type and the button pressed are determined based on information from an ADC channel. The headset mic is enabled by a headset mic bias regulator. Add support for the GPIO-based headset jack detection mechanism, and make it configurable from the device tree. This implementation borrows somewhat from the aries_wm8994.c driver, though there are a few changes to make the code cleaner, and to add support for DT-based configuration. Notably, a dependency on IIO is introduced, to accommodate the ADC reading requirement. Signed-off-by: Artur Weber Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-5-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown commit 9da93d4932aa17d5a1342af75872fbba776a3a8d Author: Artur Weber Date: Sat May 25 15:28:08 2024 +0200 ASoC: samsung: midas_wm1811: Add headset mic bias supply support Some devices use a headset mic bias supply (sometimes referred to as "ear mic bias") to enable/disable the headset mic. Add a REGULATOR_SUPPLY widget for this supply which gets the headset- mic-bias supply and is routed to the Headset Mic switch similar to how it's done for the other mic bias regulators. Signed-off-by: Artur Weber Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-4-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown commit c6aa3ade499d8ee3374be70c137bd4411fbfdbdd Author: Artur Weber Date: Sat May 25 15:28:07 2024 +0200 ASoC: samsung: midas_wm1811: Use SND_SOC_DAPM_REGULATOR_SUPPLY for bias regulators Instead of using a custom function with the SND_SOC_DAPM_MIC widget, split out the main mic/sub mic bias regulators into a separate widget using SND_SOC_DAPM_REGULATOR_SUPPLY, and connect them via a routing. Signed-off-by: Artur Weber Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-3-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown commit 0a590ecc672ae3de56384bbed05a4de532034b8f Author: Artur Weber Date: Sat May 25 15:28:06 2024 +0200 ASoC: dt-bindings: samsung,midas-audio: Add GPIO-based headset jack detection Some Samsung devices that share the midas-audio driver use a GPIO-based approach to headset jack detection, as opposed to using the built-in jack detection provided by the wm8994 driver. This setup uses two GPIOs (one for jack detection and another for key detection) and an ADC channel for determining the jack type or button pressed. Add DT configuration values that allow for describing these setups. Signed-off-by: Artur Weber Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-2-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown commit 278343bba366d23f8afc99f2d1eb0ab959c32001 Author: Artur Weber Date: Sat May 25 15:28:05 2024 +0200 ASoC: dt-bindings: samsung,midas-audio: Add headset mic bias supply Some devices use a separate mic bias supply (also referred to as "ear mic bias") to enable/disable the headset mic. Add the DT property headset-mic-bias-supply to allow for specifying this supply. Signed-off-by: Artur Weber Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-1-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown commit 782471db6c72de5b69b15450f787fd64e8a0e23a Merge: 2942dfab63044 daab0ac53e774 Author: David S. Miller Date: Wed May 29 13:10:57 2024 +0100 Merge branch 'xilinx-clock-support' Vineeth Karumanchi says: ==================== net: xilinx_gmii2rgmii: Add clock support Add input clock support to gmii_to_rgmii IP. Add "clocks" bindings for the input clock. Changes in v3: - Added items constraints. Changes in v2: - removed "clkin" clock name property. v2 link : https://lore.kernel.org/netdev/20240517054745.4111922-1-vineeth.karumanchi@amd.com/ v1 link : https://lore.kernel.org/netdev/20240515094645.3691877-1-vineeth.karumanchi@amd.com/ ==================== Signed-off-by: David S. Miller commit daab0ac53e774f14ea78a1849358dbefb0d3efd2 Author: Vineeth Karumanchi Date: Tue May 28 11:50:08 2024 +0530 net: phy: xilinx-gmii2rgmii: Adopt clock support Add clock support to the gmii_to_rgmii IP. Make clk optional to keep DTB backward compatibility. Signed-off-by: Vineeth Karumanchi Reviewed-by: Wojciech Drewek Signed-off-by: David S. Miller commit c1d96671088f03e7a685ce1fd3d745af85193141 Author: Vineeth Karumanchi Date: Tue May 28 11:50:07 2024 +0530 dt-bindings: net: xilinx_gmii2rgmii: Add clock support Add "clocks" bindings for the input clock. Signed-off-by: Vineeth Karumanchi Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit ca09ce254a65fa0c09f3369724ee0477a7246247 Author: Etienne Buira Date: Mon May 20 17:47:03 2024 +0200 gpio: syscon: do not report bogus error Do not issue "can't read the data register offset!" when gpio,syscon-dev is not set albeit unneeded. gpio-syscon is used with rk3328 chip, but this iomem region is documented in Documentation/devicetree/bindings/gpio/rockchip,rk3328-grf-gpio.yaml and does not require gpio,syscon-dev setting. Signed-off-by: Etienne Buira Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/Zktwd4Y8zu6XSGaE@Z926fQmE5jqhFMgp6 Signed-off-by: Bartosz Golaszewski commit 4ccaf60062c3682cf4f1438b143c29648edadfda Merge: d879675bc09a1 9c84429324ea2 Author: Mark Brown Date: Wed May 29 11:24:37 2024 +0100 Add support for GPIO based CS Merge series from Prajna Rajendra Kumar : The Microchip PolarFire SoC SPI "hard" controller supports eight chip selects. However, only one chip select is physically wired. Therefore, use GPIO descriptors to configure additional chip select lines. commit d879675bc09a18e2f32c1261cb9e1a15662bc08d Merge: dd2b6374543b4 196bf3e7fe226 Author: Mark Brown Date: Wed May 29 11:24:28 2024 +0100 spi: gpio: Convert to be used outside of OF Merge series from Andy Shevchenko : Convert the driver to be used outside of OF and a couple of cleanups. commit 4236b12c8731e97ab9336590a9bd4a6cb72c7dd4 Author: Dr. David Alan Gilbert Date: Tue May 28 18:46:59 2024 +0100 regulator: max77503: remove unused struct 'max77503_dev' 'max77503_dev' is unused since the original commit a0c543bdf4ba ("regulator: max77503: Add ADI MAX77503 support"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://msgid.link/r/20240528174659.53022-1-linux@treblig.org Signed-off-by: Mark Brown commit e46e55b8142c2b02972e4a73753fa330a4541315 Author: Pierre-Louis Bossart Date: Mon May 27 14:39:36 2024 -0500 ASoC: SOF: Intel: hda: print PCI class info only once With the deferred probe mechanism used by the gfx/display subsystem, we see this message repeated for no good reason. Print the information only once. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://msgid.link/r/20240527193936.165702-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1085350387056812d19abaf20c59674ce36f0b8c Author: Brent Lu Date: Mon May 27 14:35:52 2024 -0500 ASoC: Intel: sof_da7219: disable max98373 speaker pins in late_probe Commit 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") disables speaker pins in late_probe to allow DSP to enter low power state. Add same code to sof_da7219 driver. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 660f029afe9bc4217e600f5616c66b855615b666 Author: Brent Lu Date: Mon May 27 14:35:51 2024 -0500 ASoC: Intel: sof_da7219: remove local max98373 ops Since maxim-module could detect tdm slot number in runtime, we could remove local ops and use maxim-module to handle max98373. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 459d71f14771211ee19d10a97675f4f08871f58a Author: Brent Lu Date: Mon May 27 14:35:50 2024 -0500 ASoC: Intel: maxim-common: rewrite max_98373_hw_params function Rewrite max_98373_hw_params() function to get tdm slot number from topology in runtime because earlier platforms use 4-slot setting instead of 8. Also check if the interface is configured in TDM mode before calling snd_soc_dai_set_tdm_slot() function. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 97a9e9915cbb43d0feedbe2c9cf117f3dabf1286 Author: Brent Lu Date: Mon May 27 14:35:49 2024 -0500 ASoC: SOF: ipc4-topology: support tdm slot number query Support the new parameter type SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS in sof_ipc4_dai_get_param() function to get the tdm slot number of specific SSP port. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e495f3ebe967fcc487d84f80ef236e4c0e92c2b6 Author: Brent Lu Date: Mon May 27 14:35:48 2024 -0500 ASoC: SOF: ipc3-topology: support tdm slot number query Support the new parameter type SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS in sof_ipc3_dai_get_param() function to get the tdm slot number of specific SSP port. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1deba6e24c221c61c6eab8656a53f8c17035932b Author: Brent Lu Date: Mon May 27 14:35:47 2024 -0500 ASoC: SOF: sof-audio: add sof_dai_get_tdm_slots function An new interface, sof_dai_get_tdm_slots(), is added for machine driver to get tdm slot number from topology. The dai_get_param() callback needs to support new parameter type SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS by returning the tdm slot number of specific SSP port. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6073c477d11c1ea4b3f13d9f6e15ca54041af9a3 Author: Brent Lu Date: Mon May 27 14:35:46 2024 -0500 ASoC: SOF: sof-audio: rename dai clock setting query function We are going to extend the dai_get_clk() callback function to retrieve other dai-specific settings like tdm slot number, not just mclk/bclk frequencies. Revisit functions and macros related to the callback and replace the string 'clk' with 'param' to reflect the ongoing change. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 91cdecaba791c74df6da0650e797fe1192cf2700 Author: Charles Keepax Date: Mon May 27 14:35:44 2024 -0500 ASoC: Intel: sof_sdw: Add quirks for some new Dell laptops Add quirks for some new Dell laptops using Cirrus amplifiers in a bridge configuration. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 65ab45b90656e9b7ed51bce27ab7d83618167e76 Author: Charles Keepax Date: Mon May 27 14:35:43 2024 -0500 ASoC: Intel: soc-acpi: Add match entries for some cs42l43 laptops Add some new match table entries on Arrowlake and Raptorlake for some coming cs42l43 laptops. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8a7f876a692c4c7dc7ae845ae400b94df5a6a7c4 Author: Charles Keepax Date: Mon May 27 14:35:42 2024 -0500 ASoC: Intel: sof_sdw: Add missing controls for cs42l43/cs35l56 No reason for cs42l43 and cs35l56 not to offer pin switch controls for the headphones and speakers, add these controls. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a9a7e865b187eadac8f5c253f7f9befca80699f4 Author: Bard Liao Date: Mon May 27 14:35:41 2024 -0500 ASoC: Intel: sof_sdw: remove get_codec_dai_by_name get_codec_dai_by_name() is not used anymore. Remove it. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3c3e35cec005467f4091907f5ff8c8cbfecc1bf1 Author: Bard Liao Date: Mon May 27 14:35:40 2024 -0500 ASoC: Intel: sof_sdw_rt_sdca_jack_common: use dai parameter The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 06868a46301f4bcb1c9dcd71a291775ff3627a7a Author: Bard Liao Date: Mon May 27 14:35:39 2024 -0500 ASoC: Intel: sof_sdw_rt_dmic: use from dai parameter The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b237afe50151e5041d0734c759d5f8dac5c1b694 Author: Bard Liao Date: Mon May 27 14:35:38 2024 -0500 ASoC: Intel: sof_sdw_rt700: use dai parameter The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 044413afbcca5da3ac61f2fb829a1fbb0df8ac81 Author: Bard Liao Date: Mon May 27 14:35:37 2024 -0500 ASoC: Intel: sof_sdw_rt5682: use dai parameter The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1bf95876e6e1a3c77637d951cf59fb5c02bd02fa Author: Bard Liao Date: Mon May 27 14:35:36 2024 -0500 ASoC: Intel: sof_sdw_rt711: use dai parameter The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 10b6ad2b2d8ed07637bd4930f91548c9668ec7df Author: Bard Liao Date: Mon May 27 14:35:35 2024 -0500 ASoC: Intel: sof_sdw_cs42l42: use dai parameter The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240527193552.165567-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit dd2b6374543b462eae3d5673db3644888d3e2b80 Merge: b0d8c563f0fb1 b90cc232e2ce8 Author: Mark Brown Date: Wed May 29 11:08:20 2024 +0100 spi: bitbang: Clean up the driver Merge series from Andy Shevchenko : A few cleanups to the driver. No functional change intended. commit b0d8c563f0fb1dba8b10edc2553783f6ad058303 Merge: ab0b5a99d371d 41b86b1455079 Author: Mark Brown Date: Wed May 29 11:08:05 2024 +0100 spi: differentiate between unsupported and invalid Merge series from Miquel Raynal : I am working on spi-nand continuous read support, which lead me to check what spi controllers were capable of. >From a caller (and reviewer) point of view, distinguishing between error cases has been proven useful, especially between two conditions: - the request is totally unsupported and will never work - the request is typically out of range somehow but a subsequent call with corrected parameters might work So while I was statically reading the various drivers, I attempted to clarify these situations and thought it might be nice to have this upstream as well. As ENOTSUPP is not a SUSV4 code and previous series have already been merged to reduce its use, I also converted these few cases to EOPNOTSUP instead, but if anybody doesn't like these changes, it can be dropped. commit ab0b5a99d371da201e65640a94d68c5322d9d6bd Merge: 060bbd65dd4b4 837e53f766fe9 Author: Mark Brown Date: Wed May 29 11:07:55 2024 +0100 Add optional reset control for Cadence SPI Merge series from Ji Sheng Teoh : The first patch adds optional reset control to support assertion and deassertion of reset signal to properly bring the SPI device into an operating condition. The second patch documents the optional reset control into dt-bindings. commit 2942dfab630444d46aaa37fb7d629b620abbf6ba Author: Linus Walleij Date: Mon May 27 21:26:44 2024 +0200 net: ethernet: cortina: Restore TSO support An earlier commit deleted the TSO support in the Cortina Gemini driver because the driver was confusing gso_size and MTU, probably because what the Linux kernel calls "gso_size" was called "MTU" in the datasheet. Restore the functionality properly reading the gso_size from the skbuff. Tested with iperf3, running a server on a different machine and client on the device with the cortina gemini ethernet: Connecting to host 192.168.1.2, port 5201 60008000.ethernet-port eth0: segment offloading mss = 05ea len=1c8a 60008000.ethernet-port eth0: segment offloading mss = 05ea len=1c8a 60008000.ethernet-port eth0: segment offloading mss = 05ea len=27da 60008000.ethernet-port eth0: segment offloading mss = 05ea len=0b92 60008000.ethernet-port eth0: segment offloading mss = 05ea len=2bda (...) (The hardware MSS 0x05ea here includes the ethernet headers.) If I disable all segment offloading on the receiving host and dump packets using tcpdump -xx like this: ethtool -K enp2s0 gro off gso off tso off tcpdump -xx -i enp2s0 host 192.168.1.136 I get segmented packages such as this when running iperf3: 23:16:54.024139 IP OpenWrt.lan.59168 > Fecusia.targus-getdata1: Flags [.], seq 1486:2934, ack 1, win 4198, options [nop,nop,TS val 3886192908 ecr 3601341877], length 1448 0x0000: fc34 9701 a0c6 14d6 4da8 3c4f 0800 4500 0x0010: 05dc 16a0 4000 4006 9aa1 c0a8 0188 c0a8 0x0020: 0102 e720 1451 ff25 9822 4c52 29cf 8010 0x0030: 1066 ac8c 0000 0101 080a e7a2 990c d6a8 (...) 0x05c0: 5e49 e109 fe8c 4617 5e18 7a82 7eae d647 0x05d0: e8ee ae64 dc88 c897 3f8a 07a4 3a33 6b1b 0x05e0: 3501 a30f 2758 cc44 4b4a Several such packets often follow after each other verifying the segmentation into 0x05a8 (1448) byte packages also on the reveiving end. As can be seen, the ethernet frames are 0x05ea (1514) in size. Performance with iperf3 before this patch: ~15.5 Mbit/s Performance with iperf3 after this patch: ~175 Mbit/s This was running a 60 second test (twice) the best measurement was 179 Mbit/s. For comparison if I run iperf3 with UDP I get around 1.05 Mbit/s both before and after this patch. While this is a gigabit ethernet interface, the CPU is a cheap D-Link DIR-685 router (based on the ARMv5 Faraday FA526 at ~50 MHz), and the software is not supposed to drive traffic, as the device has a DSA chip, so this kind of numbers can be expected. Fixes: ac631873c9e7 ("net: ethernet: cortina: Drop TSO support") Reviewed-by: Eric Dumazet Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit 0c02cebc7fe943f92dae0e61628a7723fe1739b7 Author: Maxime Ripard Date: Wed May 29 10:00:13 2024 +0200 drm/display: Fix HDMI state helper dependency During the life of the series that introduced the DRM_DISPLAY_HDMI_STATE_HELPER option, we reworked the Kconfig option dependency setup to rely on depends on with commit f6d2dc03fa85 ("drm: Switch DRM_DISPLAY_HDMI_HELPER to depends on") which got reverted later on because it was creating too many issues by commit d7c128cb775e ("Revert "drm: Switch DRM_DISPLAY_HDMI_HELPER to depends on""). However, since the series was out of tree at that time, DRM_DISPLAY_HDMI_STATE_HELPER wasn't properly updated to take the revert into account and is now creating build issues. Let's switch the depends on to a select to fix this. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405290332.Sqtt0ix0-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405290438.TOYhXMIn-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405290803.c3178DYT-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405291109.PQdqc46g-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405291221.a0NStxHE-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405291636.8GgBtK8u-lkp@intel.com/ Fixes: 54cb39e2293b ("drm/connector: hdmi: Create an HDMI sub-state") Reviewed-by: Javier Martinez Canillas Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240529080013.2325748-1-mripard@kernel.org Signed-off-by: Maxime Ripard commit dac81a9adbf0d57a77d566fea65e8153003e5bc2 Author: Nirmoy Das Date: Tue May 28 12:14:45 2024 +0200 drm/xe: Add engine name to the engine reset and cat-err log Add engine name to the engine reset and cat error log which should be useful while debugging. v2: Add logical mask and engine class(Matt) Use xe_gt_{info|dbg} (Michal) Cc: Matthew Brost Cc: Michal Wajdeczko Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240528101445.27688-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit a17aceb34e2f0ef36ffab0a96c51240e88a1c5fa Author: Nirmoy Das Date: Tue May 28 13:54:08 2024 +0200 drm/xe: Check empty pinned BO list with lock held. Use lock that is meant to use for accessing the BO pin list. Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240528115408.22094-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit 8526f8c877baf3f9e678b31fd7d1066b776775cc Author: Johannes Berg Date: Thu May 23 12:02:13 2024 +0200 wifi: nl80211: clean up coalescing rule handling There's no need to allocate a tiny struct and then an array again, just allocate the two together and use __counted_by(). Also unify the freeing. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240523120213.48a40cfb96f9.Ia02bf8f8fefbf533c64c5fa26175848d4a3a7899@changeid Signed-off-by: Johannes Berg commit 6322e0e75a01d30b914fa87470ad00d8db844f72 Author: Johannes Berg Date: Thu May 23 12:03:52 2024 +0200 wifi: mac80211: handle HW restart during ROC If we have a HW restart in the middle of a ROC period, then there are two cases: - if it's a software ROC, we really don't need to do anything, since the ROC work will still be queued and will run later, albeit with the interruption due to the restart; - if it's a hardware ROC, then it may have begun or not, if it did begin already we can only remove it and tell userspace about that. In both cases, this fixes the warning that would appear in ieee80211_start_next_roc() in this case. In the case of some drivers such as iwlwifi, the part of restarting is never going to happen since the driver will cancel the ROC, but flushing the work to ensure nothing is pending here will also result in no longer being able to trigger the warning in this case. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240523120352.f1924b5411ea.Ifc02a45a5ce23868dc7e428bad8d0e6996dd10f4@changeid Signed-off-by: Johannes Berg commit a0ca76e5b7d550fcd74753d5fdaaf23f1a9bfdb4 Author: Johannes Berg Date: Thu May 23 12:11:40 2024 +0200 wifi: mac80211: check ieee80211_bss_info_change_notify() against MLD It's not valid to call ieee80211_bss_info_change_notify() with an sdata that's an MLD, remove the FIXME comment (it's not true) and add a warning. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240523121140.97a589b13d24.I61988788d81fb3cf97a490dfd3167f67a141d1fd@changeid Signed-off-by: Johannes Berg commit fca7018d4b47504b9b23e847fd54b1f85f2371c6 Author: Miri Korenblit Date: Mon May 27 19:06:15 2024 +0300 wifi: iwlwifi: move Bz and Gl iwl_dev_info entries The iwl_dev_info entries for these devices were incorrectly positioned within the array, out of chronological order. Move them arround. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Link: https://msgid.link/20240527190228.a75e9a1eb86c.I003980f8ca60a96019657e396e848a07df6b92a4@changeid Signed-off-by: Johannes Berg commit 5860c6f59220a15bf7b6cfc674a6cbb6dc861df8 Author: Miri Korenblit Date: Mon May 27 19:06:14 2024 +0300 wifi: iwlwifi: move amsdu_size parsing to iwlwifi The code that is parsing the amsdu_size module parameter and mapping it to the corresponding Rx buffer size is common to all opmodes. Move it into a function in iwlwifi, as preparation to a new op mode we are working on. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240527190228.a3430d32923d.Iab3c22ef0df685f72f22dafc47021f0dc7bd6fa5@changeid Signed-off-by: Johannes Berg commit e506f8e755158560c151b1768a954e3c6c28bb34 Author: Miri Korenblit Date: Mon May 27 19:06:13 2024 +0300 wifi: iwlwifi: remove redundant prints Upon start, the different opmodes are currently printing: 1. HW rev, which is already print by iwlwifi 2. The HW name (e.g. "Intel(R) Wi-Fi 7 BE201 320MHz") cleanup things such as the hw rev won't be printed again, the HW name will be printed by iwlwifi instead of each opmode. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Link: https://msgid.link/20240527190228.5c589c7abed0.I3590c4ee0ee99d1b207852c32d25d326afb327dd@changeid Signed-off-by: Johannes Berg commit db680c60a89ccb36e11fa561be2583764fc8a21e Author: Miri Korenblit Date: Mon May 27 19:06:12 2024 +0300 wifi: iwlwifi: mvm: fix a wrong comment Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240527190228.2105ffcf747d.Ic838959b812b6cb4cbb856e8c0bcaad2f46ac71b@changeid Signed-off-by: Johannes Berg commit 05ce6e9b059d8a45b97848bceccd495a98509e4a Author: Miri Korenblit Date: Mon May 27 19:06:11 2024 +0300 wifi: iwlwifi: mvm: declare band variable in the scope band is not used outside of the for loop, declare it inside it. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240527190228.b634d184980a.I9d9e71125f9a77ba4f9a33a7a2ff1e8e78e17767@changeid Signed-off-by: Johannes Berg commit d9196023b2c2528af96eeae9aee28f25ea112b43 Author: Johannes Berg Date: Mon May 27 19:06:10 2024 +0300 wifi: iwlwifi: mvm: show full firmware ID in debugfs The firmware prefix is unused today, but it might still be useful to have some information. Since the prefix will get the intel/ directory in some cases, replace the prefix by the full FW id which has all the information. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.527a1c72996d.If7588b854149d51605031fc9a70a650534351ef4@changeid Signed-off-by: Johannes Berg commit 6958c4becdf89c2877edd901458ae18ecd06169f Author: Miri Korenblit Date: Mon May 27 19:06:09 2024 +0300 wifi: iwlwifi: mvm: add debug data for MPDU counting It is hard to debug issues of EMLSR entry/exit due to low throughput. Add debug data. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240527190228.77ef3c2654dc.I1796a3995da2a49dd5102d33766af1ad416dd60b@changeid Signed-off-by: Johannes Berg commit d9b7531fe98a0c2a0387270557cf0a514c28dd28 Author: Johannes Berg Date: Mon May 27 19:06:08 2024 +0300 wifi: iwlwifi: mvm: use only beacon BSS load for active links For active links, don't take information that may have been received in probe responses, as those are not protected. For inactive links, there may not be a choice. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.6947dc462fa9.I2076961211d6785c8a15b4308e0e87a413148222@changeid Signed-off-by: Johannes Berg commit f1c9ba4403dd5b0abe7a9c4bbb55e09f1ee98bd0 Author: Avraham Stern Date: Mon May 27 19:06:07 2024 +0300 wifi: iwlwifi: mvm: add support for version 10 of the responder config command This version adds the band to the responder config command. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.af09129ebd74.I9356e2504a4c19961d4856494416ae49b36bfe62@changeid Signed-off-by: Johannes Berg commit d29fc6af1ab845fd0e9ab1e2e6060ba6146bacbb Author: Avraham Stern Date: Mon May 27 19:06:06 2024 +0300 wifi: iwlwifi: mvm: add support for version 14 of the range request command This version adds a testing option to send an incorrect SAC in the first NDPA. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.8f36ccb1cc74.I9b76461634f308e75dc3cd016d0b0bce812c6e9d@changeid Signed-off-by: Johannes Berg commit 626be4bf99f6250cd66da5d311a72ad7455c5a64 Author: Avraham Stern Date: Mon May 27 19:06:05 2024 +0300 wifi: iwlwifi: mvm: modify iwl_mvm_ftm_set_secured_ranging() parameters Modify iwl_mvm_ftm_set_secured_ranging() parameters to support multiple versions of the target struct. This is done as preparation for moving to the new range request version. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.56d6aee320b3.I5a52fa93cd791d0229b392a20f076b7cebb110cd@changeid Signed-off-by: Johannes Berg commit 16ec82d3473c10ea7435432a0ed01bf9125b9ca5 Author: Avraham Stern Date: Mon May 27 19:06:04 2024 +0300 wifi: iwlwifi: mvm: initiator: move setting the sta_id into a function Move setting the target's sta_id (and related flags) into a function to support different versions of the target struct. This is done as preparation for moving to the new range request version. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.18e3a6a6f1cb.I85e3ee607b3947448532bc16730f8898a11c92b8@changeid Signed-off-by: Johannes Berg commit 94df6cbd4c4aea633a9b4bbfab835dcfee21578b Author: Miri Korenblit Date: Mon May 27 19:06:03 2024 +0300 wifi: iwlwifi: mvm: Remove debug related code This code is intended for internal testing. Remove it. Fixes: 30ce039094b5 ("wifi: iwlwifi: mvm: Don't allow EMLSR when the RSSI is low") Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.c3b89828efb2.I7ded6348d2fb0cb7e103c4eee033451924c3461d@changeid Signed-off-by: Johannes Berg commit 8a039ef63170860ddcccd615543ea000c10b444f Author: Avraham Stern Date: Mon May 27 19:06:02 2024 +0300 wifi: iwlwifi: mvm: initiator: move setting target flags into a function Move setting the target flags into a dedicated function to support different versions of the target struct. This is done as preparation for moving to the new range request version. Signed-off-by: Avraham Stern Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.9d22b61ce589.I7dbe596b4f677638d9a48c3f39b0826a9e35bea4@changeid Signed-off-by: Johannes Berg commit 6b82f4e119d1e27632cb350a6165c02a8ec9db07 Author: Johannes Berg Date: Mon May 27 19:06:01 2024 +0300 wifi: iwlwifi: mvm: handle TPE advertised by AP 6 GHz BSS SP client shall respect TX power limits advertised by the AP in TPE elements, send the data to the firmware using the AP_TX_POWER_CONSTRAINTS_CMD command, so do that. Co-developed-by: Mukesh Sisodiya Signed-off-by: Mukesh Sisodiya Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.32f1e2e1447c.I58ac91c38585362aa42bb4a8a59c7d88e67bc40b@changeid Signed-off-by: Johannes Berg commit fb82e76a3b3b23c4a51fe254fa78497bfa42007c Author: Miri Korenblit Date: Mon May 27 19:06:00 2024 +0300 wifi: iwlwifi: mvm: move a constant to constants.h Move IWL_MVM_MIN_BEACON_INTERVAL_TU to constants.h Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.395f5b24ff82.Id78a5a404c3ae15cbbc950b1f1d7e500a8b92a43@changeid Signed-off-by: Johannes Berg commit a423e37ecc3ede97621815da4923fbca5497c4a1 Author: Miri Korenblit Date: Mon May 27 19:05:59 2024 +0300 wifi: iwlwifi: mvm: remove IWL_MVM_USE_NSSN_SYNC This is not used and not needed anymore. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.c5edfb967e35.I34a3d54a1dc90d9b2937b0bcbbc508fe3cd41773@changeid Signed-off-by: Johannes Berg commit e1b44c8f7ba40801365dc8689f0cd88acd2ee901 Author: Avri Altman Date: Mon May 27 19:05:58 2024 +0300 wifi: iwlwifi: mvm: Enable p2p low latency Enable p2p low latency by default. Signed-off-by: Avri Altman Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.21b431bdfc26.I018e330d1e6a76e967b25e9542c2260f0f6ed2a8@changeid Signed-off-by: Johannes Berg commit 94854648b5b0774447dace5e8802c641b24da4af Author: Johannes Berg Date: Mon May 27 19:05:57 2024 +0300 wifi: iwlwifi: mvm: report 64-bit radiotap timestamp Use the new RX_FLAG_MACTIME_IS_RTAP_TS64 in mac80211 to report a 64-bit timestamp in the mactime for radiotap only, in case we report the synchronized PTP clock timestamp (otherwise we really only have 32 bits anyway). Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.4fc44356e7df.Ic8642d35f1090a415e09299a1bd409f51dfb6351@changeid Signed-off-by: Johannes Berg commit 0e49e940d1bc47e5f8937aa981337debaae69bd8 Author: Avraham Stern Date: Mon May 27 19:05:56 2024 +0300 wifi: iwlwifi: mvm: add an option to use ptp clock for rx timestamp Add a debugfs option to use the ptp clock time for rx device timestamps. This can be useful to e.g. synchronize multiple NICs or reporting the timestamp in the system clock instead of gp2. Signed-off-by: Avraham Stern Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20240527190228.b197b4f3f9ed.I578ee916d5f517a2e3a89e890a8ea24065946427@changeid Signed-off-by: Johannes Berg commit 822f89a409192006ee701afeb6d724cfd94d324b Author: Maxime Ripard Date: Tue May 28 17:10:56 2024 +0200 drm/sun4i: Fix compilation error Commit ea64761a54a2 ("drm/sun4i: hdmi: Switch to HDMI connector") introduced a dependency that got renamed in a previous version, but wasn't properly updated in that driver. Fix the name of the function. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405282205.EU7NUoeQ-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405282248.U2lhPvCK-lkp@intel.com/ Fixes: ea64761a54a2 ("drm/sun4i: hdmi: Switch to HDMI connector") Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240528151056.2104153-1-mripard@kernel.org Signed-off-by: Maxime Ripard commit a93c83eca48a4ffb8e57cb0c7cc2e3935744d2c6 Author: Ian Rogers Date: Tue May 21 15:35:55 2024 -0700 perf docs: Fix typos Assorted typo fixes. Signed-off-by: Ian Rogers Reviewed-by: James Clark Cc: Changbin Du Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240521223555.858859-1-irogers@google.com commit f008baf08d3eb778c19890bff81869d6d3481bd1 Author: Suraj Kandpal Date: Mon May 27 10:51:19 2024 +0530 drm/i915/hdcp: Fix IS_METEORLAKE usage for HDCP line rekeying Replace IS_METEORLAKE usage with a more appropriate macro. While we are at it also add the stepping restrictions for other platforms. Fixes: 6a3691ca4799 ("drm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI") Signed-off-by: Suraj Kandpal Reviewed-by: Dnyaneshwar Bhadane Link: https://patchwork.freedesktop.org/patch/msgid/20240527052118.1624216-2-suraj.kandpal@intel.com commit fec7efe7bf2d7fd7824a5d0420e13d4a03bbfb47 Author: Jouni Högander Date: Tue May 28 14:44:55 2024 +0300 drm/i915/psr: modify psr status debugfs to support eDP Panel Replay Some PSR2_CTL bits are applicable for eDP panel replay as well. Dump this register for eDP Panel Replay as well. Bspec: 68920 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240528114455.175961-6-jouni.hogander@intel.com commit f0faeb2e701ca51115ff4f025152dfc685f9ca07 Author: Jouni Högander Date: Tue May 28 14:44:54 2024 +0300 drm/i915/psr: Move printing PSR mode to own function intel_psr_status has grown and is about to grow even. Let's split it a bit and move printing PSR mode to an own function. v2: s/intel_psr_psr_mode/intel_psr_print_mode/ Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240528114455.175961-5-jouni.hogander@intel.com commit 1566b50a439cb8f5b50c7f1e6543e38d1e1848f6 Author: Jouni Högander Date: Tue May 28 14:44:53 2024 +0300 drm/i915/psr: Move printing sink PSR support to own function intel_psr_status has grown and is about to grow even. Let's split it a bit and move printing sink psr support to an own function. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240528114455.175961-4-jouni.hogander@intel.com commit 2f602531db4c5b522073aff1b09d2d5408352a1c Author: Jouni Högander Date: Tue May 28 14:44:52 2024 +0300 drm/panel replay: Add edp1.5 Panel Replay bits and register Add PANEL_REPLAY_CONFIGURATION_2 register and some missing Panel Replay bits. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Acked-by: Maxime Ripard Acked-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240528114455.175961-3-jouni.hogander@intel.com commit 73baf72eb193c6a30d883a380f2f8d26fd6d5ff9 Author: Jouni Högander Date: Tue May 28 14:44:51 2024 +0300 drm/i915/psr: Store pr_dpcd in intel_dp We need pr_dpcd contents for early transport validity check on eDP Panel Replay and in debugfs interface to dump out panel early transport capability. Also remove unnecessarily printing out "Panel replay is not supported by panel" v2: commit message modified Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240528114455.175961-2-jouni.hogander@intel.com commit fbe3e8473f391adbf67eb0f317305fe62c66096c Merge: eb4e7726279a3 ed61271af5230 Author: Martin KaFai Lau Date: Tue May 28 17:53:04 2024 -0700 Merge branch 'use network helpers, part 5' Geliang Tang says: ==================== This patchset uses post_socket_cb callbacks of struct network_helper_opts to refactor do_test() in bpf_tcp_ca.c. v5: - address Martin's comments in v4 (thanks) - add patch 4, use start_server_str in test_dctcp_fallback too - ASSERT_* is already used in settcpca, use this helper in cc_cb (patch 3). v4: - address Martin's comments in v3 (thanks). - drop 2 patches, keep "type" as the individual arg to start_server_addr, connect_to_addr and start_server_str. v3: - Add 4 new patches, 1-3 are cleanups. 4 adds a new helper. - address Martin's comments in v2. v2: - rebased on commit "selftests/bpf: Add test for the use of new args in cong_control" ==================== Signed-off-by: Martin KaFai Lau commit 7b44d5381e541de3da3cee2e948456b250f41f25 Author: Rob Barnes Date: Tue May 7 15:58:09 2024 +0000 platform/chrome: cros_ec_debugfs: Make log polling period a parameter Make EC log polling period a module parameter. This allows the polling period to be set via the kernel command line. Keeping the default at the current 10 second period. The optimal polling period will differ by board. Signed-off-by: Rob Barnes Link: https://lore.kernel.org/r/20240507155809.525701-1-robbarnes@google.com Signed-off-by: Tzung-Bi Shih commit 93bda33046e7ad8ec96645b63432fdb789fefce6 Merge: 982300c115d22 0a9f788fdde4a Author: Jakub Kicinski Date: Tue May 28 19:49:51 2024 -0700 Merge branch 'net-constify-ctl_table-arguments-of-utility-functions' Thomas Weißschuh says: ==================== net: constify ctl_table arguments of utility functions The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. This patch(set) is meant to be applied through your subsystem tree. Or at your preference through the sysctl tree. Motivation ========== Moving structures containing function pointers into unmodifiable .rodata prevents attackers or bugs from corrupting and diverting those pointers. Also the "struct ctl_table" exposed by the sysctl core were never meant to be mutated by users. For this goal changes to both the sysctl core and "const" qualifiers for various sysctl APIs are necessary. ==================== Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net Signed-off-by: Jakub Kicinski commit 0a9f788fdde4af08547455fcdc21e21b822218f2 Author: Thomas Weißschuh Date: Mon May 27 19:04:23 2024 +0200 ipvs: constify ctl_table arguments of utility functions The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-5-16523767d0b2@weissschuh.net Signed-off-by: Jakub Kicinski commit 7a20cd1e71d87907dbba8887cd434a2195699c85 Author: Thomas Weißschuh Date: Mon May 27 19:04:22 2024 +0200 net/ipv6/ndisc: constify ctl_table arguments of utility function The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-4-16523767d0b2@weissschuh.net Signed-off-by: Jakub Kicinski commit c55eb03765f413d43ee96e2c4eeac27fde8e63d8 Author: Thomas Weißschuh Date: Mon May 27 19:04:21 2024 +0200 net/ipv6/addrconf: constify ctl_table arguments of utility functions The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-3-16523767d0b2@weissschuh.net Signed-off-by: Jakub Kicinski commit 551814313f113206800b025d89d4af99b2db13a2 Author: Thomas Weißschuh Date: Mon May 27 19:04:20 2024 +0200 net/ipv4/sysctl: constify ctl_table arguments of utility functions The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-2-16523767d0b2@weissschuh.net Signed-off-by: Jakub Kicinski commit 874aa96d78c791565781bb38570971f614d800ff Author: Thomas Weißschuh Date: Mon May 27 19:04:19 2024 +0200 net/neighbour: constify ctl_table arguments of utility function The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240527-sysctl-const-handler-net-v1-1-16523767d0b2@weissschuh.net Signed-off-by: Jakub Kicinski commit 982300c115d229565d7af8e8b38aa1ee7bb1f5bd Author: Heiner Kallweit Date: Mon May 27 21:20:16 2024 +0200 r8169: remove detection of chip version 11 (early RTL8168b) This early RTL8168b version was the first PCIe chip version, and it's quite quirky. Last sign of life is from more than 15 yrs ago. Let's remove detection of this chip version, we'll see whether anybody complains. If not, support for this chip version can be removed a few kernel versions later. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/875cdcf4-843c-420a-ad5d-417447b68572@gmail.com Signed-off-by: Jakub Kicinski commit 6994520a332887f1688464f250c9ec8002a89a8e Author: Heiner Kallweit Date: Mon May 27 21:16:56 2024 +0200 r8169: disable interrupt source RxOverflow Vendor driver calls this bit RxDescUnavail. All we do in the interrupt handler in this case is scheduling NAPI. If we should be out of RX descriptors, then NAPI is scheduled anyway. Therefore remove this interrupt source. Tested on RTL8168h. Signed-off-by: Heiner Kallweit Reviewed-by: Sunil Goutham Link: https://lore.kernel.org/r/9b2054b2-0548-4f48-bf91-b646572093b4@gmail.com Signed-off-by: Jakub Kicinski commit ed61271af5230cef9b9329bb1eacc1b1a9800d07 Author: Geliang Tang Date: Sat May 25 20:08:19 2024 +0800 selftests/bpf: Use start_server_str in do_test in bpf_tcp_ca This patch uses new helper start_server_str() in do_test() in bpf_tcp_ca.c to accept a struct network_helper_opts argument instead of using start_server() and settcpca(). Then change the type of the first paramenter of do_test() into a struct network_helper_opts one. Define its own cb_opts and opts for each test, set its own cc name into cb_opts.cc, and cc_cb() into post_socket_cb callback, then pass it to do_test(). Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/6e1b6555e3284e77c8aa60668c61a66c5f99aa37.1716638248.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit 79b330c57debe6b15f441e999bb62042afd5b08e Author: Geliang Tang Date: Sat May 25 20:08:18 2024 +0800 selftests/bpf: Use post_socket_cb in start_server_str This patch uses start_server_str() helper in test_dctcp_fallback() in bpf_tcp_ca.c, instead of using start_server() and settcpca(). For support opts in start_server_str() helper, opts->cb_opts needs to be passed to post_socket_cb() in __start_server(). Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/414c749321fa150435f7fe8e12c80fec8b447c78.1716638248.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit e078255abd53ac44c9133fd98d51645dbd196123 Author: Geliang Tang Date: Sat May 25 20:08:17 2024 +0800 selftests/bpf: Use post_socket_cb in connect_to_fd_opts Since the post_socket_cb() callback is added in struct network_helper_opts, it's make sense to use it not only in __start_server(), but also in connect_to_fd_opts(). Then it can be used to set TCP_CONGESTION sockopt. Add a "void *" type member cb_opts into struct network_helper_opts, and add a new struct named cb_opts in prog_tests/bpf_tcp_ca.c, then cc can be moved into struct cb_opts from network_helper_opts. Define a new callback cc_cb() to set TCP_CONGESTION sockopt, and set it to post_socket_cb pointer of opts. Define a new cb_opts cubic, set it to cb_opts of opts. Pass this opts to connect_to_fd_opts() in test_dctcp_fallback(). Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/b512bb8d8f6854c9ea5c409b69d1bf37c6f272c6.1716638248.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit 6f802cb8988e8e41f2fdb74ac949d3a0ef9a9594 Author: Geliang Tang Date: Sat May 25 20:08:16 2024 +0800 selftests/bpf: Add start_server_str helper It's a tech debt that start_server() does not take the "opts" argument. It's pretty handy to have start_server() as a helper that takes string address. So this patch creates a new helper start_server_str(). Then start_server() can be a wrapper of it. Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/606e6cfd7e1aff8bc51ede49862eed0802e52170.1716638248.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit ed31adf6874db172e3212ac1ebaf701ed6190650 Author: Geliang Tang Date: Sat May 25 20:08:15 2024 +0800 selftests/bpf: Drop struct post_socket_opts It's not possible to have one generic/common "struct post_socket_opts" for all tests. It's better to have the individual test define its own callback opts struct. So this patch drops struct post_socket_opts, and changes the second parameter of post_socket_cb as "void *" type. Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/f8bda41c7cb9cb6979b2779f89fb3a684234304f.1716638248.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau commit eb4e7726279a344c82e3c23be396bcfd0a4d5669 Author: Mykyta Yatsenko Date: Fri May 24 14:18:40 2024 +0100 libbpf: Configure log verbosity with env variable Configure logging verbosity by setting LIBBPF_LOG_LEVEL environment variable, which is applied only to default logger. Once user set their custom logging callback, it is up to them to handle filtering. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240524131840.114289-1-yatsenko@meta.com commit c2c887e9f967aab2b0ff94c25de64c5a97ef94fe Author: Tony Luck Date: Mon May 20 15:46:09 2024 -0700 EDAC/skx: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240520224620.9480-39-tony.luck@intel.com commit 9593189cf061f7b872843784399d5fabd0053bd9 Author: Tony Luck Date: Mon May 20 15:46:08 2024 -0700 EDAC/sb_edac: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240520224620.9480-38-tony.luck@intel.com commit e09d576c862e88eceb8183784e93603da17a1638 Author: Tony Luck Date: Mon May 20 15:46:07 2024 -0700 EDAC, pnd2: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240520224620.9480-37-tony.luck@intel.com commit bc39bfbaa2c8792efadb29f433d12b3b2f3fe7b1 Author: Tony Luck Date: Mon May 20 15:46:06 2024 -0700 EDAC/i10nm: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20240520224620.9480-36-tony.luck@intel.com commit ba2c082a401ff6ea0f3460cd80174b4c8273445d Author: Alexandru Marc Serdeliuc Date: Thu Apr 11 18:51:31 2024 +0200 arm64: dts: qcom: sm8550: Add support for Samsung Galaxy Z Fold5 Add support for Samsung Galaxy Z Fold5 (q5q) foldable phone based on sm8550 Currently working features: - Framebuffer - UFS - i2c - Buttons Signed-off-by: Alexandru Marc Serdeliuc Link: https://lore.kernel.org/r/20240411-samsung-galaxy-zfold5-q5q-v6-2-8142297515aa@yahoo.com Signed-off-by: Bjorn Andersson commit d328da7f07563c1a4a21eae4b28b7b69d9ba3df9 Author: Alexandru Marc Serdeliuc Date: Thu Apr 11 18:51:30 2024 +0200 dt-bindings: arm: qcom: Add Samsung Galaxy Z Fold5 This documents Samsung Galaxy Z Fold5 (samsung,q5q) which is a foldable phone by Samsung based on the sm8550 SoC. Acked-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Alexandru Marc Serdeliuc Link: https://lore.kernel.org/r/20240411-samsung-galaxy-zfold5-q5q-v6-1-8142297515aa@yahoo.com Signed-off-by: Bjorn Andersson commit d1f2b41e96f5d1c2241ef3740a5829d2f9979273 Author: Georgi Djakov Date: Wed Apr 17 06:37:31 2024 -0700 arm64: dts: qcom: sc7280: Add DT nodes for the TBUs Add the device-tree nodes for the TBUs (translation buffer units) that are present on the sc7280 platforms. The TBUs can be used debug the kernel and provide additional information when a context faults occur. Describe all the registers, clocks, interconnects and power-domain resources that are needed for each of the TBUs. Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20240417133731.2055383-8-quic_c_gdjako@quicinc.com Signed-off-by: Bjorn Andersson commit 7bb38c20f2b64a65423e64e6765bd70a5eadee81 Author: Georgi Djakov Date: Wed Apr 17 06:37:29 2024 -0700 arm64: dts: qcom: sdm845: Add DT nodes for the TBUs Add the device-tree nodes for the TBUs (translation buffer units) that are present on the sdm845 platforms. The TBUs can be used debug the kernel and provide additional information when a context faults occur. Describe the all registers, clocks, interconnects and power-domain resources that are needed for each of the TBUs. Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20240417133731.2055383-6-quic_c_gdjako@quicinc.com Signed-off-by: Bjorn Andersson commit fa171d49e49af89dfece89ade803a5d471d919a8 Author: John Harrison Date: Fri May 24 13:26:03 2024 -0700 drm/xe/guc: Fix uninitialised count in GuC load debug prints The debug prints about how long the GuC load takes have a loop counter. However that was neither initialised nor incremented! Plus, counting loops is no longer meaningful given the wait function returns early for any change in the status value. So fix it to only count loops due to actual timeouts. Signed-off-by: John Harrison Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405250151.IbH0l8FG-lkp@intel.com/ Fixes: b0ac1b42dbdc ("drm/xe/guc: Port over the slow GuC loading support from i915") Cc: John Harrison Cc: Lucas De Marchi Cc: Oded Gabbay Cc: "Thomas Hellström" Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Matt Roper Cc: Michal Wajdeczko Cc: Fei Yang Cc: intel-xe@lists.freedesktop.org Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240524202603.4011656-1-John.C.Harrison@Intel.com commit 628388982c1303283b220a47e69906f0924e4031 Author: Krishna chaitanya chundru Date: Sat May 18 19:01:45 2024 +0530 arm64: dts: qcom: sm8450: Add OPP table support to PCIe PCIe host controller driver needs to choose the appropriate performance state of RPMh power domain and interconnect bandwidth based on the PCIe data rate. Hence, add the OPP table support to specify RPMh performance states and interconnect peak bandwidth. It should be noted that the different link configurations may share the same aggregate bandwidth, e.g., a 2.5 GT/s x2 link and a 5.0 GT/s x1 link have the same bandwidth and share the same OPP entry. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Krishna chaitanya chundru Link: https://lore.kernel.org/r/20240518-opp_support-v13-4-78c73edf50de@quicinc.com Signed-off-by: Bjorn Andersson commit 42870599f9441fc96f99050637d2dce6f8b52597 Author: Krishna chaitanya chundru Date: Sat May 18 19:01:42 2024 +0530 arm64: dts: qcom: sm8450: Add interconnect path to PCIe node Add PCIe-MEM & CPU-PCIe interconnect path to the PCIe nodes. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Krishna chaitanya chundru Link: https://lore.kernel.org/r/20240518-opp_support-v13-1-78c73edf50de@quicinc.com Signed-off-by: Bjorn Andersson commit 49cc31f8ab44e60d8109da7e18c0983a917d4d74 Author: Sagar Cheluvegowda Date: Tue May 14 17:06:51 2024 -0700 arm64: dts: qcom: sa8775p: mark ethernet devices as DMA-coherent Ethernet devices are cache coherent, mark it as such in the dtsi. Fixes: ff499a0fbb23 ("arm64: dts: qcom: sa8775p: add the first 1Gb ethernet interface") Fixes: e952348a7cc7 ("arm64: dts: qcom: sa8775p: add a node for EMAC1") Signed-off-by: Sagar Cheluvegowda Link: https://lore.kernel.org/r/20240514-mark_ethernet_devices_dma_coherent-v4-1-04e1198858c5@quicinc.com Signed-off-by: Bjorn Andersson commit a8fe85d40ffe5ec0fd2f557932ffee902be35b38 Author: Alexandru Gagniuc Date: Tue Apr 30 23:07:44 2024 -0500 clk: qcom: gcc-ipq9574: Add PCIe pipe clocks The IPQ9574 has four PCIe "pipe" clocks. These clocks are required by PCIe PHYs. Port the pipe clocks from the downstream 5.4 kernel. Signed-off-by: Alexandru Gagniuc Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240501040800.1542805-3-mr.nuke.me@gmail.com Signed-off-by: Bjorn Andersson commit 475beea0b9f631656b5cc39429a39696876af613 Author: Alexandru Gagniuc Date: Tue Apr 30 23:07:43 2024 -0500 dt-bindings: clock: Add PCIe pipe related clocks for IPQ9574 Add defines for the missing PCIe PIPE clocks. Signed-off-by: Alexandru Gagniuc Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240501040800.1542805-2-mr.nuke.me@gmail.com Signed-off-by: Bjorn Andersson commit 737abcabe97bb37e38be2504acd28ad779dbaf3d Author: Marc Gonzalez Date: Mon Apr 29 16:07:27 2024 +0200 arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable. cf. ath10k_qmi_driver_event_work() Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE. Jeff Johnson wrote: The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it. However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior. cf. also https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_835_(MSM8998)#WLAN Signed-off-by: Marc Gonzalez Acked-by: Jeff Johnson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/0914f96e-fcfd-4088-924a-fc1991bce75f@freebox.fr Signed-off-by: Bjorn Andersson commit 7ce966eb6f1288eb92bc2eb5df8933acee1ae6ed Author: Luca Weiss Date: Thu Apr 25 21:14:31 2024 +0200 dt-bindings: soc: qcom,smp2p: Mark qcom,ipc as deprecated Deprecate the qcom,ipc way of accessing the mailbox in favor of the 'mboxes' property. Update the example to use mboxes. Signed-off-by: Luca Weiss Reviewed-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20240425-qcom-ipc-deprecate-v1-2-a8d8034253ea@z3ntu.xyz Signed-off-by: Bjorn Andersson commit ffaa4b5d5d07aed600d82929d8862263ce341a71 Author: Luca Weiss Date: Thu Apr 18 08:36:55 2024 +0200 arm64: dts: qcom: sdm632-fairphone-fp3: Enable vibrator Enable the vibrator on the PMI632 which is used on this phone. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240418-fp3-vibra-v1-2-b636b8b3ff32@fairphone.com Signed-off-by: Bjorn Andersson commit bbb1dd6402f9c67ea00bc6bf0e2a01d71db4c7fd Author: Luca Weiss Date: Thu Apr 18 08:36:54 2024 +0200 arm64: dts: qcom: pmi632: Add vibrator Add a node for the vibrator module found inside the PMI632. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240418-fp3-vibra-v1-1-b636b8b3ff32@fairphone.com Signed-off-by: Bjorn Andersson commit c8a346e408cb2e516472658ff191f13626d8571e Author: Rob Herring (Arm) Date: Wed Apr 17 15:42:46 2024 -0500 arm64: dts: qcom: Split PMU nodes for heterogeneous CPUs Arm heterogeneous configurations should have separate PMU nodes for each CPU uarch as the uarch specific events can be different. The "arm,armv8-pmuv3" compatible is also intended for s/w models rather than specific uarch implementations. All the kryo CPUs are missing PMU compatibles, so they can't be fixed. Signed-off-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20240417204247.3216703-1-robh@kernel.org Signed-off-by: Bjorn Andersson commit 336dca397dcefc5d7436be1fee3c814ed6512996 Author: Pin-yen Lin Date: Mon May 27 17:54:50 2024 +0800 drm/panel-edp: Add more panels with conservative timings Same as commit 7c8690d8fc80 ("drm/panel-edp: Add some panels with conservative timings"), the 3 panels added in this patch are used by Mediatek MT8173 Chromebooks and they used to work with the downstream v4.19 kernel without any specified delay. These panel IDs were found from in-field reports, but their datahseets are not available. For BOE 0x0623 and SHP 0x153a, their product names are retrieved from the EDIDs. The EDID of AUO 0x1999 does not contain such information, so list as "Unknown" in this patch. Update these entries with less-conservative timings from other panels of the same vendor. Signed-off-by: Pin-yen Lin Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240527095511.719825-3-treapking@chromium.org commit e4f9fd9edbc22faceb4c9c57242440bb9e17924b Author: Pin-yen Lin Date: Mon May 27 17:54:49 2024 +0800 drm/panel-edp: Add support for several panels Add support for the following models: AUO B140HTN02.0 BOE NT116WHM-N21 V4.1 BOE NT116WHM-N21 Signed-off-by: Pin-yen Lin Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240527095511.719825-2-treapking@chromium.org commit 8de6625dafd202da733188f632701e9109188035 Author: Oded Gabbay Date: Wed May 15 19:22:22 2024 +0300 MAINTAINERS: update Xe driver maintainers Because I left Intel, I'm removing myself from the list of Xe driver maintainers. Signed-off-by: Oded Gabbay Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240515162222.12958-3-ogabbay@kernel.org Signed-off-by: Lucas De Marchi commit 6afebd850d1ab5518c273b32532f0b2086cc633a Author: Douglas Anderson Date: Fri May 3 14:33:28 2024 -0700 drm/panel: sony-acx565akm: Don't call disable at remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by TI OMAP boards. The TI OMAP driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Laurent Pinchart Cc: Sebastian Reichel Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.47.I2513fd6824929a17c1ccd18a797b98a1a1063559@changeid commit e28df86aeeff0b84c13e676f641ea879abbdb809 Author: Douglas Anderson Date: Fri May 3 14:33:27 2024 -0700 drm/panel: sony-acx565akm: Don't double-check enabled state in disable As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. The acx565akm seems to do some unique stuff with the "enabled" state. Specifically: 1. It seems to detect the enabled state based on how the bootloader left the panel. 2. It uses the enabled state to prevent certain sysfs files from accessing a disabled panel. We'll leave the "enabled" state tracking for this. However, we can at least get rid of the double-check when trying to disable. Cc: Laurent Pinchart Cc: Sebastian Reichel Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.46.I6a51b36831a5c7b2b82bccf8c550cf0d076aa541@changeid commit 718bd8a1a5ee873778a72523c06da054a89108b4 Author: Douglas Anderson Date: Fri May 3 14:33:24 2024 -0700 drm/panel: sitronix-st7703: Don't call disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. The compatible strings used by this driver seem to show up across boards using a variety of DRM drivers. It appears that the relevant drivers have been converted, but at least one compatible string doesn't seem to be found in any mainline dts files so we can't be 100% sure. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Guido Günther Cc: Ondřej Jirman Cc: Chris Morgan Cc: Frank Oltmanns Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.43.I08ba0d4e2d534c06ab0ede9c148bb14cc7c1a9d7@changeid commit 3004d2e9cca5d59d25dff670a03a005d40601ded Author: Douglas Anderson Date: Fri May 3 14:33:23 2024 -0700 drm/panel: sitronix-st7703: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. One thing to note for st7703 is that it has a special "allpixelson" debugfs file. When this file is written the driver hacks a disable/unprepare and then a prepare/enable to try to reset the panel. Potentially that might have been relying on the old booleans we removed. It'll still "work" because of the checks in the core but it deserves a comment. This debugfs file didn't appear to be particularly safe to use even before this patch since it would cause a disabled/unprepared panel to become prepared/enabled. Cc: Guido Günther Cc: Ondřej Jirman Cc: Chris Morgan Cc: Frank Oltmanns Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.42.Ifc436b262d72f1a33ddef10adfd7578d4acb60d8@changeid commit ac9e1786271f771ff1f774742602330be2d57a12 Author: Douglas Anderson Date: Fri May 3 14:33:12 2024 -0700 drm/panel: xinpeng-xpp055c272: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Rockchip boards. The Rockchip driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.31.Ib97e67a9877070698afbec4f8ede091b2bf89a1f@changeid commit 4e5e6fa77a9d40cdf85ade7f86d07dc8929941c9 Author: Douglas Anderson Date: Fri May 3 14:33:11 2024 -0700 drm/panel: xinpeng-xpp055c272: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.30.I2145be78ce28327f4588c2c21370f22fd79d28b8@changeid commit bc62654df3c888dec735343f5db9907ac93aea60 Author: Douglas Anderson Date: Fri May 3 14:33:08 2024 -0700 drm/panel: simple: Add a comment about unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, it's very difficult to know exactly which DRM modeset drivers are using panel-simple due to the sheer number of panels it handles. For now, we'll leave the calls and just add a comment to keep people from copying this code. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.27.I639183ac987e139092491a94e22d46a5d857580c@changeid commit 2a1c99d7159b798288bfb20a76c1e665e2344126 Author: Douglas Anderson Date: Fri May 3 14:33:07 2024 -0700 drm/panel: simple: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Acked-by: Sui Jingfeng Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.26.I865be97dd393d6ae3c3a3cd1358c95fdbca0fe83@changeid commit 49869668ff0e3f380858b4c20b8d0cb02b933f48 Author: Douglas Anderson Date: Fri May 3 14:33:06 2024 -0700 drm/panel: samsung-atna33xc20: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Qualcomm boards. The Qualcomm driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.25.Iaeacccf98e6cb729b8fc3a782725769cd66812ad@changeid commit 5a847750aac8454a1604070ab99d689c0a6e4290 Author: Douglas Anderson Date: Fri May 3 14:33:05 2024 -0700 drm/panel: samsung-atna33xc20: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.24.Ibb4f923363a27167c480a432e52884b117221974@changeid commit 2a9487b5aa55753993fde80e4841128c8da4df71 Author: Douglas Anderson Date: Fri May 3 14:33:00 2024 -0700 drm/panel: novatek-nt36672a: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Qualcomm boards. The Qualcomm driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Sumit Semwal Cc: Benni Steini Cc: Marijn Suijten Acked-by: Linus Walleij Acked-by: Maxime Ripard Tested-by: Joel Selvaraj Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.19.I67819ba5513d4ef85f254a68b22a3402b4cdf30f@changeid commit b605f257f386b7f4b6fc9c0f82b86b75d0579287 Author: Douglas Anderson Date: Fri May 3 14:32:59 2024 -0700 drm/panel: novatek-nt36672a: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Sumit Semwal Cc: Benni Steini Cc: Marijn Suijten Acked-by: Linus Walleij Acked-by: Maxime Ripard Tested-by: Joel Selvaraj Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.18.I13a06b9e6f5920659b1e5d12543b3cd9066383b8@changeid commit 3357f6f465e62c0bc5e906365063734740c9f6d4 Author: Douglas Anderson Date: Fri May 3 14:32:58 2024 -0700 drm/panel: ltk500hd1829: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.17.If3edcf846f754b425959980039372a9fd1599ecc@changeid commit 2b8c19b9d7bc9d03e8c44bd391d21e95c07a2c83 Author: Douglas Anderson Date: Fri May 3 14:32:57 2024 -0700 drm/panel: ltk500hd1829: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.16.I4f574b87fe24765ddd4424437159b37a6481aa1a@changeid commit b7ca446ecb53205944968617b158f073bcacaedc Author: Douglas Anderson Date: Fri May 3 14:32:56 2024 -0700 drm/panel: ltk050h3146w: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, grepping mainline for this panel's compatible string shows no hits, so we can't be 100% sure if the DRM modeset driver used with this panel has been fixed. If it is found that the DRM modeset driver hasn't been fixed then this patch could be temporarily reverted until it is. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Quentin Schulz Tested-by: Quentin Schulz # RK3399 Puma with Haikou Video Demo Tested-by: Quentin Schulz # PX30 Ringneck with Haikou Video Demo Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.15.Ibeb2e5692e34b136afe4cf55532f0696ab3f5eed@changeid commit f124478dd18c519544489caddce78e7c5796a758 Author: Douglas Anderson Date: Fri May 3 14:32:55 2024 -0700 drm/panel: ltk050h3146w: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Quentin Schulz Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.14.I264417152e65b4a2e374666010666fa1c2d973fc@changeid commit 68c205ef3c39edce4a3346b8a53fd2b700394a0c Author: Douglas Anderson Date: Fri May 3 14:32:54 2024 -0700 drm/panel: kingdisplay-kd097d04: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Rockchip boards. The Rockchip driver appear to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Brian Norris Cc: Chris Zhong Cc: Nickey Yang Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.13.I6c7c84b1560dd374f6e7e8dc50f419a870d31d31@changeid commit 157c1381780a453e06430f8b35bb8c5d439eb8c6 Author: Douglas Anderson Date: Fri May 3 14:32:53 2024 -0700 drm/panel: kingdisplay-kd097d04: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Brian Norris Cc: Chris Zhong Cc: Nickey Yang Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.12.I711d07c4f4738df199697fd534c452cdfa46a21f@changeid commit eeb133ff78476eb1e6e88154dfb75a741e8a034a Author: Douglas Anderson Date: Fri May 3 14:32:50 2024 -0700 drm/panel: innolux-p079zca: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Rockchip boards. The Rockchip driver appears to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Chris Zhong Cc: Lin Huang Cc: Brian Norris Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.9.Iaddb8e0cab570e2f8066a4baf1d49239a820b799@changeid commit f9055051292442d52092f17e191cf0a58d23d4ed Author: Douglas Anderson Date: Fri May 3 14:32:49 2024 -0700 drm/panel: innolux-p079zca: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Chris Zhong Cc: Lin Huang Cc: Brian Norris Acked-by: Linus Walleij Acked-by: Maxime Ripard Reviewed-by: Heiko Stuebner Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.8.I99c73621fe3fba067a5e7ee6a1f6293c23371e1e@changeid commit ec7629859331fb67dbfb6bcd47f887a402e390ff Author: Douglas Anderson Date: Fri May 3 14:32:48 2024 -0700 drm/panel: edp: Add a comment about unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. Unfortunately, it's very difficult to know exactly which DRM modeset drivers are using panel-edp due to the sheer number of panels it handles. For now, we'll leave the calls and just add a comment to keep people from copying this code. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.7.Icff7f7005d997773d585e36aba9ed41a9865201f@changeid commit 3904f317fd977533f6d7d3c4bfd75e0ac6169bb7 Author: Douglas Anderson Date: Fri May 3 14:32:47 2024 -0700 drm/panel: edp: Stop tracking prepared/enabled As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.6.I4d1bf08781593c08127e506422687ab19fd3c824@changeid commit 1985e3512b5a3777f6a18c36e40f3926037120bb Author: Douglas Anderson Date: Fri May 3 14:32:46 2024 -0700 drm/panel: boe-tv101wum-nl6: Don't call unprepare+disable at shutdown/remove It's the responsibility of a correctly written DRM modeset driver to call drm_atomic_helper_shutdown() at shutdown time and that should be disabling / unpreparing the panel if needed. Panel drivers shouldn't be calling these functions themselves. A recent effort was made to fix as many DRM modeset drivers as possible [1] [2] [3] and most drivers are fixed now. A grep through mainline for compatible strings used by this driver indicates that it is used by Mediatek and Qualcomm boards. Both of those drivers appear to be correctly calling drm_atomic_helper_shutdown() so we can remove the calls. [1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org [2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org [3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org Cc: Jitao Shi Cc: Cong Yang Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.5.I5bd120aa0b7d17a1149ea43cc4852492834058c0@changeid commit 3c24e31c908eb12e99420ff33b74c01f045253fe Author: Douglas Anderson Date: Fri May 3 14:32:45 2024 -0700 drm/panel: boe-tv101wum-nl6: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Jitao Shi Cc: Cong Yang Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.4.Ib501f2eceb62016e09cfb17bca29bde0f605a567@changeid commit 598dc42f25cc3060fd350db0f52af1075af3f500 Author: Douglas Anderson Date: Fri May 3 14:32:42 2024 -0700 drm/panel: raydium-rm692e5: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Konrad Dybcio Acked-by: Linus Walleij Acked-by: Maxime Ripard Tested-by: Luca Weiss Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.1.I784238de4810658212a5786b219f128460562a37@changeid commit c3281abea67c9c0dc6219bbc41d1feae05a16da3 Author: Gwenael Treuveur Date: Tue May 21 18:23:16 2024 +0200 remoteproc: stm32_rproc: Fix mailbox interrupts queuing Manage interrupt coming from coprocessor also when state is ATTACHED. Fixes: 35bdafda40cc ("remoteproc: stm32_rproc: Add mutex protection for workqueue") Cc: stable@vger.kernel.org Signed-off-by: Gwenael Treuveur Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20240521162316.156259-1-gwenael.treuveur@foss.st.com Signed-off-by: Mathieu Poirier commit f720fa010d03bbb336cf8dcb949e939b5cfba610 Author: Arnaud Pouliquen Date: Fri May 17 18:56:54 2024 +0200 rpmsg: char: Fix rpmsg_eptdev structure documentation Add missing @ tags for some rpmsg_eptdev structure parameters. This fixes warning messages on build: drivers/rpmsg/rpmsg_char.c:75: warning: Function parameter or struct member 'remote_flow_restricted' not described in 'rpmsg_eptdev' drivers/rpmsg/rpmsg_char.c:75: warning: Function parameter or struct member 'remote_flow_updated' not described in 'rpmsg_eptdev' Fixes: 5550201c0fe2 ("rpmsg: char: Add RPMSG GET/SET FLOWCONTROL IOCTL support") Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20240517165654.427746-1-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier commit 9dbd9962cfe56d210be5232349851420b5f9c8f6 Author: AngeloGioacchino Del Regno Date: Mon May 20 13:27:24 2024 +0200 remoteproc: mediatek: Zero out only remaining bytes of IPI buffer In scp_ipi_handler(), instead of zeroing out the entire shared buffer, which may be as large as 600 bytes, overwrite it with the received data, then zero out only the remaining bytes. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20240520112724.139945-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mathieu Poirier commit 74bde7581df3e18061119e1b27b63d0a9ea57b7a Author: Ville Syrjälä Date: Mon Apr 8 20:04:12 2024 +0300 drm/sti: Allow build with COMPILE_TEST=y Allow sti to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Alain Volmat Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-8-ville.syrjala@linux.intel.com Acked-by: Alain Volmat commit 9b48124cc1188844fdc08e8ca22db9595847d632 Author: Ville Syrjälä Date: Mon Apr 8 20:04:11 2024 +0300 drm/sti: Include linux/io.h for devm_ioremap() Include linux/io.h for devm_ioremap(). When built on x86_64 w/ COMPILE_TEST=y: ../drivers/gpu/drm/sti/sti_dvo.c:531:21: error: implicit declaration of function ‘devm_ioremap’ [-Werror=implicit-function-declaration] 531 | dvo->regs = devm_ioremap(dev, res->start, | ^~~~~~~~~~~~ ../drivers/gpu/drm/sti/sti_dvo.c:531:19: error: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] 531 | dvo->regs = devm_ioremap(dev, res->start, | ^ Cc: Alain Volmat Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-7-ville.syrjala@linux.intel.com Acked-by: Alain Volmat commit 265b71153e1ac270546f1d0d2a59a565947f2ed3 Author: Breno Leitao Date: Fri May 17 07:14:26 2024 -0700 perf list: Fix the --no-desc option Currently, the --no-desc option in perf list isn't functioning as intended. This issue arises from the overwriting of struct option->desc with the opposite value of struct option->long_desc. Consequently, whatever parse_options() returns at struct option->desc gets overridden later, rendering the --desc or --no-desc arguments ineffective. To resolve this, set ->desc as true by default and allow parse_options() to adjust it accordingly. This adjustment will fix the --no-desc option while preserving the functionality of the other parameters. Signed-off-by: Breno Leitao Reviewed-by: Ian Rogers Cc: leit@meta.com Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240517141427.1905691-1-leitao@debian.org commit cbd446b4db7efce27311f3186f81c2a2d906dd60 Author: Ian Rogers Date: Mon May 13 22:24:02 2024 -0700 perf arm-spe: Unaligned pointer work around Use get_unaligned_leXX instead of leXX_to_cpu to handle unaligned pointers. Such pointers occur with libFuzzer testing. A similar change for intel-pt was done in: https://lore.kernel.org/r/20231005190451.175568-6-adrian.hunter@intel.com Signed-off-by: Ian Rogers Reviewed-by: James Clark Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240514052402.3031871-1-irogers@google.com commit 678be1ca30cc939e0180c85b4cc9150b3d5ef0c8 Author: Ian Rogers Date: Tue May 14 23:01:14 2024 -0700 perf tests: Add some pmu core functionality tests Test behavior of PMU names and comparisons wrt suffixes using Intel uncore_cha, marvell mrvl_ddr_pmu and S390's cpum_cf as examples. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Ravi Bangoria Cc: James Clark Cc: Robin Murphy Cc: Stephane Eranian Cc: Will Deacon Cc: Thomas Richter Cc: Bharat Bhushan Cc: Bhaskara Budiredla Cc: Tuan Phan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240515060114.3268149-3-irogers@google.com commit 3241d46f5f5450ddff255a136f2ebf3282065435 Author: Ian Rogers Date: Tue May 14 23:01:13 2024 -0700 perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu The mrvl_ddr_pmu is uncore and has a hexadecimal address suffix while the previous PMU sorting/merging code assumes uncore PMU names start with uncore_ and have a decimal suffix. Because of the previous assumption it isn't possible to wildcard the mrvl_ddr_pmu. Modify pmu_name_len_no_suffix but also remove the suffix number out argument, this is because we don't know if a suffix number of say 100 is in hexadecimal or decimal. As the only use of the suffix number is in comparisons, it is safe there to compare the values as hexadecimal. Modify perf_pmu__match_ignoring_suffix so that hexadecimal suffixes are ignored. Only allow hexadecimal suffixes to be greater than length 2 (ie 3 or more) so that S390's cpum_cf PMU doesn't lose its suffix. Change the return type of pmu_name_len_no_suffix to size_t to workaround GCC incorrectly determining the result could be negative. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Ravi Bangoria Cc: James Clark Cc: Robin Murphy Cc: Stephane Eranian Cc: Will Deacon Cc: Thomas Richter Cc: Bharat Bhushan Cc: Bhaskara Budiredla Cc: Tuan Phan Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20240515060114.3268149-2-irogers@google.com commit 8e887536b896c3156bcdd0e1e0cf1eb1fe8d3029 Author: Tony Luck Date: Mon May 20 15:46:14 2024 -0700 perf/x86/rapl: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-44-tony.luck%40intel.com commit 6fd5e8855e60a94f6f4b78a1314afac56fce7427 Author: Tony Luck Date: Mon May 20 15:46:05 2024 -0700 x86/boot: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model but boot code doesn't have all the infrastructure to use them. Hard code the one CPU model number used here. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-35-tony.luck%40intel.com commit 744866f5c0e2e13dccde754ade8c89924a29e04d Author: Tony Luck Date: Mon May 20 15:46:04 2024 -0700 x86/cpu: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Update INTEL_CPU_DESC() to work with vendor/family/model. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-34-tony.luck%40intel.com commit d142df13f3574237688c7a20e0019cccc7ae39eb Author: Tony Luck Date: Mon May 20 15:46:02 2024 -0700 perf/x86/intel: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-32-tony.luck%40intel.com commit 189e8d4b98495a9145301a3594f4fb56118211e8 Author: Tony Luck Date: Mon May 20 15:46:01 2024 -0700 x86/virt/tdx: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-31-tony.luck%40intel.com commit ac6bee4bf73cdfbd2234125d387b1db3a5bbfc19 Author: Tony Luck Date: Mon May 20 15:46:00 2024 -0700 x86/PCI: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-30-tony.luck%40intel.com commit 6568fc18c2f62b4f35092e9680fe39f3500f4767 Author: Tony Luck Date: Mon May 20 15:45:59 2024 -0700 x86/cpu/intel: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240520224620.9480-29-tony.luck%40intel.com commit 2cf615a4519b29a3ad283883d7638279ec1e6b44 Author: Tony Luck Date: Tue May 21 09:10:01 2024 -0700 x86/platform/intel-mid: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. N.B. Drop Haswell. CPU model 0x3C was included by mistake in upstream code. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Acked-by: Andy Shevchenko Link: https://lore.kernel.org/all/20240521161002.12866-1-tony.luck%40intel.com commit 0ae570703754858a77cc42b3c9fff42e9f084608 Author: Baochen Qiang Date: Fri May 24 10:40:21 2024 +0800 wifi: ath12k: fix wrong definition of CE ring's base address Base address of CE ring is defined as u32, currently this works because DMA mask configured as 32 bit: #define ATH12K_PCI_DMA_MASK 32 However this mask could be changed once firmware bugs are fixed to fully support 36 bit DMA addressing. So to protect against any future changes to the DMA mask, change the type of the fields that are dependent upon it. This is found during code review. Compile tested only. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240524024021.37711-1-quic_bqiang@quicinc.com commit 0a993772e0f0934d730c0d451622c80e03a40ab1 Author: Baochen Qiang Date: Fri May 24 10:36:42 2024 +0800 wifi: ath12k: fix race due to setting ATH12K_FLAG_EXT_IRQ_ENABLED too early Commit 5082b3e3027e ("wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too early") fixes a race in ath11k driver. Since ath12k shares the same logic as ath11k, currently the race also exists in ath12k: in ath12k_pci_ext_irq_enable(), ATH12K_FLAG_EXT_IRQ_ENABLED is set before NAPI is enabled. In cases where only one MSI vector is allocated, this results in a race condition: after ATH12K_FLAG_EXT_IRQ_ENABLED is set but before NAPI enabled, CE interrupt breaks in. Since IRQ is shared by CE and data path, ath12k_pci_ext_interrupt_handler() is also called where we call disable_irq_nosync() to disable IRQ. Then napi_schedule() is called but it does nothing because NAPI is not enabled at that time, meaning that ath12k_pci_ext_grp_napi_poll() will never run, so we have no chance to call enable_irq() to enable IRQ back. Since IRQ is shared, all interrupts are disabled and we would finally get no response from target. So port ath11k fix here, this is done by setting ATH12K_FLAG_EXT_IRQ_ENABLED after all NAPI and IRQ work are done. With the fix, we are sure that by the time ATH12K_FLAG_EXT_IRQ_ENABLED is set, NAPI is enabled. Note that the fix above also introduce some side effects: if ath12k_pci_ext_interrupt_handler() breaks in after NAPI enabled but before ATH12K_FLAG_EXT_IRQ_ENABLED set, nothing will be done by the handler this time, the work will be postponed till the next time the IRQ fires. This is found during code review. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240524023642.37030-1-quic_bqiang@quicinc.com commit 5714e25f1d1875b300fb337dadfaa75324c1161a Author: Baochen Qiang Date: Fri May 24 10:15:58 2024 +0800 wifi: ath11k: fix wrong definition of CE ring's base address Base address of CE ring is defined as u32, currently this works because coherent DMA mask configured as 32 bit: #define ATH11K_PCI_COHERENT_DMA_MASK 32 However this mask could be changed once firmware bugs are fixed to fully support 36 bit DMA addressing. So to protect against any future changes to the DMA mask, change the type of the fields that are dependent upon it. This is found during code review. Compile tested only. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240524021558.34452-1-quic_bqiang@quicinc.com commit af69d862a8baa600b018f66aca8174b23c166a5f Author: Jeff Johnson Date: Thu May 23 08:18:05 2024 -0700 wifi: ath12k: Fix devmem address prefix when logging Currently when ath12k QMI logging is enabled, messages such as the following can be logged: ath12k_pci 0000:03:00.0: devmem [0] start ox113000 size 20480 Replace ox% with 0x% to get a proper hex address prefix: ath12k_pci 0000:03:00.0: devmem [0] start 0x113000 size 20480 Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240523-ox-v1-1-112ae7350059@quicinc.com commit 401a1f021bbc5a81eb63742f62005629c4f8d747 Author: Shengjiu Wang Date: Wed May 22 11:08:25 2024 +0800 ASoC: fsl_mqs: Add i.MX95 platform support There are two MQS instances on the i.MX95 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. Define different soc data according to compatible strings On i.MX95 one instance in nect-mix is supported by this commit, another instance in always-on-mix is not supported, which depends on System Manager function readiness. Signed-off-by: Shengjiu Wang Link: https://msgid.link/r/1716347305-18457-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 4c7d2dc698dfdb16db180c142cd681c42e23b419 Author: Shengjiu Wang Date: Wed May 22 11:08:24 2024 +0800 ASoC: dt-bindings: fsl,mqs: Add i.MX95 platform support There are two MQS instances on the i.MX95 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 net controller domain, so the compatible strings are "fsl,imx95-aonmix-mqs", "fsl,imx95-netcmix-mqs". Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring (Arm) Link: https://msgid.link/r/1716347305-18457-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit cfc2d4c5151bb8449fd28b2591877a514214ad4a Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:51 2024 +0530 PCI: endpoint: pci-epf-test: Handle Link Down event Per PCIe r6.0, sec 5.2, a Link Down event can happen under any of the following circumstances: 1. Fundamental/Hot reset 2. Link disable transmission by upstream component 3. Moving from L2/L3 to L0 When the event happens, the EPC driver capable of detecting it may pass the notification to the EPF driver through link_down() callback in 'struct pci_epc_event_ops'. While the PCIe spec has not defined the actual behavior of the endpoint when the Link Down event happens, we may assume that at least the ongoing transactions need to be stopped as the link won't be active, so cancel the command handler work in the callback implementation pci_epf_test_link_down(). The work will be started again in pci_epf_test_link_up() once the link comes back again. Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-10-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński [bhelgaas: update spec citation] Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 38e8c4184ea0eebe478a9e6fc8d1062561223429 Author: Riana Tauro Date: Fri May 24 12:39:16 2024 +0530 drm/xe: Enable Coarse Power Gating Enable power gating for all units and sub-pipes that are disabled by default. v2: change the init function name use symmetric calls for enable/disable pg re-pharase commit message (Rodrigo) modify the sub-pipe power gating condition v3: set hysteresis value for render and media when GuC PC is disabled skip CPG for PVC (Vinay) v4: rebase Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi #v2 Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240524070916.143022-3-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi commit 9276bcc22f52ab52ae77b7b19133943d88b9a3f8 Author: Riana Tauro Date: Fri May 24 12:39:15 2024 +0530 drm/xe: Standardize power gate registers Standardize power gate registers No functional changes v2: change commit message (Rodrigo) Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240524070916.143022-2-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi commit c7ce956bb6d0f32ab921b6ffba1a6a834df96f21 Author: MarileneGarcia Date: Sun May 19 00:10:27 2024 -0300 drm/dp: Fix documentation warning It fixes the following warnings when the kernel documentation is generated: ./include/drm/display/drm_dp_helper.h:126: warning: Function parameter or struct member 'mode' not described in 'drm_dp_as_sdp' ./include/drm/display/drm_dp_helper.h:126: warning: Excess struct member 'operation_mode' description in 'drm_dp_as_sdp' Signed-off-by: MarileneGarcia Fixes: 0bbb8f594e33 ("drm/dp: Add Adaptive Sync SDP logging") Reviewed-by: Dmitry Baryshkov Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20240405141640.09b0bdbf@canb.auug.org.au Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240519031027.433751-1-marilene.agarcia@gmail.com commit d19a86d584e04191cdab7ced24d7ed791075697a Author: Jon Hunter Date: Wed May 8 10:22:07 2024 +0100 PCI: tegra194: Set EP alignment restriction for inbound ATU Tegra194 and Tegra234 PCIe EP controllers have 64K alignment restriction for the inbound ATU. Set the endpoint inbound ATU alignment to 64kB in the Tegra194 PCIe driver. Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Suggested-by: Manikanta Maddireddy Link: https://lore.kernel.org/linux-pci/20240508092207.337063-1-jonathanh@nvidia.com Signed-off-by: Jon Hunter Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit c93637e6a4c4e1d0e85ef7efac78d066bbb24d96 Author: Marek Vasut Date: Sun May 12 01:54:50 2024 +0200 PCI: rcar: Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup() Avoid large backtrace, it is sufficient to warn the user that there has been a link problem. Either the link has failed and the system is in need of maintenance, or the link continues to work and user has been informed. The message from the warning can be looked up in the sources. This makes an actual link issue less verbose. First of all, this controller has a limitation in that the controller driver has to assist the hardware with transition to L1 link state by writing L1IATN to PMCTRL register, the L1 and L0 link state switching is not fully automatic on this controller. In case of an ASMedia ASM1062 PCIe SATA controller which does not support ASPM, on entry to suspend or during platform pm_test, the SATA controller enters D3hot state and the link enters L1 state. If the SATA controller wakes up before rcar_pcie_wakeup() was called and returns to D0, the link returns to L0 before the controller driver even started its transition to L1 link state. At this point, the SATA controller did send an PM_ENTER_L1 DLLP to the PCIe controller and the PCIe controller received it, and the PCIe controller did set PMSR PMEL1RX bit. Once rcar_pcie_wakeup() is called, if the link is already back in L0 state and PMEL1RX bit is set, the controller driver has no way to determine if it should perform the link transition to L1 state, or treat the link as if it is in L0 state. Currently the driver attempts to perform the transition to L1 link state unconditionally, which in this specific case fails with a PMSR L1FAEG poll timeout, however the link still works as it is already back in L0 state. Reduce this warning verbosity. In case the link is really broken, the rcar_pcie_config_access() would fail, otherwise it will succeed and any system with this controller and ASM1062 can suspend without generating a backtrace. Fixes: 84b576146294 ("PCI: rcar: Finish transition to L1 state in rcar_pcie_config_access()") Link: https://lore.kernel.org/linux-pci/20240511235513.77301-1-marek.vasut+renesas@mailbox.org Signed-off-by: Marek Vasut Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 39b91eb40c6aa3063a36d189a7c04a1467447425 Author: Minda Chen Date: Thu Mar 28 17:18:34 2024 +0800 PCI: starfive: Add JH7110 PCIe controller Add StarFive JH7110 SoC PCIe controller platform driver code, JH7110 with PLDA host PCIe core. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-22-minda.chen@starfivetech.com Co-developed-by: Kevin Xie Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Mason Huo commit 22fe3223977020fb5164cf08f6145c34b05d58f8 Author: Minda Chen Date: Thu Mar 28 17:18:32 2024 +0800 dt-bindings: PCI: Add StarFive JH7110 PCIe controller Add StarFive JH7110 SoC PCIe controller dt-bindings. JH7110 uses PLDA XpressRICH PCIe host controller IP. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-20-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley Reviewed-by: Hal Feng Reviewed-by: Rob Herring Acked-by: Kevin Xie commit d5ceb9496c565eb5763c127c6eb2d2b3068ab1df Author: Kevin Xie Date: Thu Mar 28 17:18:33 2024 +0800 PCI: Add PCIE_RESET_CONFIG_DEVICE_WAIT_MS waiting time value Add the PCIE_RESET_CONFIG_DEVICE_WAIT_MS macro to define the minimum waiting time between exit from a conventional reset and sending the first configuration request to the device. As described in PCIe r6.0, sec 6.6.1 , there are two different use cases of the value: - "With a Downstream Port that does not support Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms following exit from a Conventional Reset before sending a Configuration Request to the device immediately below that Port." - "With a Downstream Port that supports Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms after Link training completes before sending a Configuration Request to the device immediately below that Port." [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-21-minda.chen@starfivetech.com Signed-off-by: Kevin Xie Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Mason Huo commit d76ef0531c0794d22eacfb1f0f887590e92fbf8e Author: Minda Chen Date: Thu Mar 28 17:18:21 2024 +0800 PCI: plda: Pass pci_host_bridge to plda_pcie_setup_iomems() plda_pcie_setup_iomems() needs the bridge->windows list from struct pci_host_bridge and is currently used only by pcie-microchip-host.c. This driver uses pci_host_common_probe(), which sets a pci_host_bridge as the drvdata, so plda_pcie_setup_iomems() used platform_get_drvdata() to find the pci_host_bridge. But we also want to use plda_pcie_setup_iomems() in the new pcie-starfive.c driver, which does not use pci_host_common_probe() and will have struct starfive_jh7110_pcie as its drvdata, so pass the pci_host_bridge directly to plda_pcie_setup_iomems() so it doesn't need platform_get_drvdata() to find it. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-9-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log, reorder to where this is needed] Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit 76c9113968079140cb2f885631db422170f32105 Author: Minda Chen Date: Thu Mar 28 17:18:31 2024 +0800 PCI: plda: Add host init/deinit and map bus functions Add PLDA host plda_pcie_host_init()/plda_pcie_host_deinit() and map bus function so vendors can use it to init PLDA PCIe host core. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-19-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Mason Huo commit a576fff39eecb89befbb0bf567a5b5d889199d56 Author: Minda Chen Date: Thu Mar 28 17:18:30 2024 +0800 PCI: plda: Add event bitmap field to struct plda_pcie_rp PLDA DMA interrupts are not all implemented, and the non-implemented interrupts should be masked. Add a bitmap field to mask the non-implemented interrupts. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-18-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 4602c370bdf6946b4e954a3db0ef5958aac2b7b4 Author: Minda Chen Date: Thu Mar 28 17:18:29 2024 +0800 PCI: microchip: Move IRQ functions to pcie-plda-host.c Move IRQ related functions to common file pcie-plda-host.c The re-use code including MSI, INTx, event interrupts and IRQ init functions. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-17-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley commit 5037ec713a8465536ab8fc1bdd8cfbc1712ea681 Author: Minda Chen Date: Thu Mar 28 17:18:28 2024 +0800 PCI: microchip: Add event irqchip field to host port and add PLDA irqchip As the PLDA DT binding doc (Documentation/devicetree/bindings/pci/ plda,xpressrich3-axi-common.yaml) shows, PLDA PCIe contains an interrupt controller. Microchip PolarFire PCIe event IRQs include PLDA interrupts and PolarFire additional interrupts. The interrupt irqchip ops includes ack/mask/unmask interrupt ops, which will write correct registers. Microchip PolarFire PCIe additional interrupts require to write PolarFire SoC self-defined registers. So Microchip PCIe event irqchip ops can not be re-used. Microchip PolarFire PCIe additional interrupts (defined in drivers/pci/controller/plda/pcie-microchip-host.c): EVENT_PCIE_L2_EXIT EVENT_PCIE_HOTRST_EXIT EVENT_PCIE_DLUP_EXIT EVENT_SEC_TX_RAM_SEC_ERR EVENT_SEC_RX_RAM_SEC_ERR ... To support PLDA its own event IRQ process, implements PLDA irqchip ops and add event irqchip field to struct pcie_plda_rp. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-16-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley commit c7f6c72ae167a428fa1b9150b9fee7c740dac5bc Author: Minda Chen Date: Thu Mar 28 17:18:27 2024 +0800 PCI: microchip: Add get_events() callback and PLDA get_event() As PLDA DT binding doc (Documentation/devicetree/bindings/pci/ plda,xpressrich3-axi-common.yaml) showed, PLDA PCIe contains an interrupt controller. PolarFire implements its own PCIe interrupts, additional to the regular PCIe interrupts, due to lack of an MSI controller, so the interrupt to event number mapping is different to the PLDA regular interrupts, necessitating a custom get_events() implementation. Microchip PolarFire PCIe additional interrupts (defined in drivers/pci/controller/plda/pcie-microchip-host.c): EVENT_PCIE_L2_EXIT EVENT_PCIE_HOTRST_EXIT EVENT_PCIE_DLUP_EXIT EVENT_SEC_TX_RAM_SEC_ERR EVENT_SEC_RX_RAM_SEC_ERR ... plda_get_events() adds interrupt register to PLDA event num mapping codes. All the PLDA interrupts can be seen in new added graph. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-15-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley commit 62df57b9f0c6891b3b57c0f1ad5714500f942d5e Author: Minda Chen Date: Thu Mar 28 17:18:26 2024 +0800 PCI: microchip: Add INTx and MSI event num to struct plda_event The INTx and MSI interrupt event num is different across platforms, so add two event num fields in struct plda_event. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-14-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley commit 647690479660e6eb7e5974979c24e219a0637790 Author: Minda Chen Date: Thu Mar 28 17:18:25 2024 +0800 PCI: microchip: Add request_event_irq() callback function As the PLDA DT binding doc (Documentation/devicetree/bindings/pci/ plda,xpressrich3-axi-common.yaml) shows, the PLDA IP contains an interrupt controller. Microchip PolarFire add some interrupts based on PLDA interrupt controller. The Microchip PolarFire PCIe additional interrupts (defined in drivers/pci/controller/plda/pcie-microchip-host.c): EVENT_PCIE_L2_EXIT EVENT_PCIE_HOTRST_EXIT EVENT_PCIE_DLUP_EXIT EVENT_SEC_TX_RAM_SEC_ERR EVENT_SEC_RX_RAM_SEC_ERR ... Both event_cause[] and mc_event_handler() contain additional interrupt symbol names; these can not be re-used. Add a new plda_event_handler() function, which implements PLDA interrupt defalt handler, and add a request_event_irq() callback function for Microchip PolarFire additional interrupts. [kwilczynski, bhelgaas: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-13-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley commit d4078c87a530094839e4ba82c75f20262545c5ae Author: Minda Chen Date: Thu Mar 28 17:18:24 2024 +0800 PCI: microchip: Add num_events field to struct plda_pcie_rp The number of events is different across platforms. In order to share interrupt processing code, add a variable that defines the number of events so that it can be set per-platform instead of hardcoding it. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-12-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit f966c028cfae218871e0ab5bd1674c42fe042e96 Author: Minda Chen Date: Thu Mar 28 17:18:23 2024 +0800 PCI: microchip: Rename interrupt related functions Rename mc_* to plda_* for IRQ functions and related IRQ domain ops data instances. MSI, INTx interrupt code and IRQ init code can all be re-used. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-11-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Conor Dooley commit 39bd5f8225d5fea9d5a14f21bd4dc4e6fc310e4a Author: Minda Chen Date: Thu Mar 28 17:18:22 2024 +0800 PCI: microchip: Move PLDA functions to pcie-plda-host.c Move plda_pcie_setup_window() and plda_pcie_setup_iomems() to pcie-plda-host.c so they can be shared by all PLDA-based drivers. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-10-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit ed18db138c0a31592d8e26b4e8b4ce9769ef09b2 Author: Minda Chen Date: Thu Mar 28 17:18:20 2024 +0800 PCI: microchip: Rename PLDA functions to be generic Rename mc_pcie_setup_window() to plda_pcie_setup_window() and mc_pcie_setup_windows() to plda_pcie_setup_iomems() so they can be shared by all PLDA-based drivers. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-8-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit 41ceca8c616313159b6eab19c8ecc9cceba2c4d0 Author: Minda Chen Date: Thu Mar 28 17:18:19 2024 +0800 PCI: microchip: Move PLDA structures to plda-pcie.h Move the PLDA generic data structures to a header file so they can be re-used by all PLDA-based drivers. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-7-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit e9b7007a94db954b687ad6b6ce782bc1c8a46876 Author: Minda Chen Date: Thu Mar 28 17:18:18 2024 +0800 PCI: microchip: Rename PLDA structures to be generic Rename struct mc_msi to plda_msi and move most of struct mc_pcie to a new struct plda_pcie_rp so they can be shared by all PLDA-based drivers. The axi_base_addr field remains in struct mc_pcie since it's Microchip-specific data. The event interrupt code is still using struct mc_pcie because the event interrupt code can not be re-used. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-6-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit 55ba2532b33cd89270fede9eb02b249f4ae71668 Author: Minda Chen Date: Thu Mar 28 17:18:17 2024 +0800 PCI: microchip: Add bridge_addr field to struct mc_pcie Bridge address base is common PLDA field, add this to struct mc_pcie first. INTx and MSI interrupt code will be changed to common code, so get the bridge base address from port->bridge_addr instead of axi_base_addr. The axi_base_addr is Microchip-specific data. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-5-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit 692c9b0a64bc82556abda89c04c0d9ffe033036d Author: Minda Chen Date: Thu Mar 28 17:18:16 2024 +0800 PCI: microchip: Move PLDA IP register macros to pcie-plda.h Move PLDA PCIe host controller IP registers macros to pcie-plda.h, including bridge registers and PLDA IRQ event number. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-4-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit 24934ee8978d8f847d9a47579981018b9fe5cde4 Author: Minda Chen Date: Thu Mar 28 17:18:15 2024 +0800 PCI: microchip: Move pcie-microchip-host.c to PLDA directory Since Microchip PolarFire PCIe host is PLDA XpressRich IP, move to PLDA directory. Prepare for refactoring the codes. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240328091835.14797-3-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Conor Dooley commit 6873aaa5f9a47c0358d07f967e49f1774d322a04 Author: Minda Chen Date: Thu Mar 28 17:18:14 2024 +0800 dt-bindings: PCI: Add PLDA XpressRICH PCIe host common properties Add PLDA XpressRICH PCIe host common properties dt-binding doc. The PolarFire PCIe host uses PLDA IP. Move common properties from Microchip PolarFire PCIe host to PLDA files. Link: https://lore.kernel.org/linux-pci/20240328091835.14797-2-minda.chen@starfivetech.com Signed-off-by: Minda Chen Signed-off-by: Krzysztof Wilczyński [bhelgaas: adapt for 5db62b7d3c37 ("dt-bindings: PCI: host-bridges: Switch from deprecated pci-bus.yaml")] Signed-off-by: Bjorn Helgaas Reviewed-by: Hal Feng Reviewed-by: Conor Dooley Reviewed-by: Rob Herring Tested-by: John Clark commit a231707a91f323af1e5d9f1722055ec2fc1c7775 Author: Aleksandr Mishin Date: Sun May 5 09:15:17 2024 +0300 PCI: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs() If IORESOURCE_MEM is not provided in Device Tree due to any error, resource_list_first_type() will return NULL and pci_parse_request_of_pci_ranges() will just emit a warning. This will cause a NULL pointer dereference. Fix this bug by adding NULL return check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0f71c60ffd26 ("PCI: dwc: Remove storing of PCI resources") Link: https://lore.kernel.org/linux-pci/20240505061517.11527-1-amishin@t-argos.ru Suggested-by: Bjorn Helgaas Suggested-by: Manivannan Sadhasivam Signed-off-by: Aleksandr Mishin Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 9ffa0e70b2daf9b0271e4960b7c8a2350e2cda08 Author: Siddharth Vadapalli Date: Thu Mar 28 14:20:41 2024 +0530 PCI: keystone: Don't enable BAR 0 for AM654x After 6ab15b5e7057 ("PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus"), ks_pcie_v3_65_add_bus() enabled BAR 0 for both v3.65a and v4.90a devices. On the AM654x SoC, which uses v4.90a, enabling BAR 0 causes Completion Timeouts when setting up MSI-X. These timeouts delay boot of the AM654x by about 45 seconds. Move the BAR 0 initialization to ks_pcie_msi_host_init(), which is only used for v3.65a devices, and remove ks_pcie_v3_65_add_bus(). [bhelgaas: commit log] Fixes: 6ab15b5e7057 ("PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus") Link: https://lore.kernel.org/linux-pci/20240328085041.2916899-3-s-vadapalli@ti.com Suggested-by: Bjorn Helgaas Suggested-by: Niklas Cassel Suggested-by: Serge Semin Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 5125fdc3292eea20870d4e6cefa62dc1245ce7ec Author: Siddharth Vadapalli Date: Thu Mar 28 14:20:40 2024 +0530 PCI: keystone: Relocate ks_pcie_set/clear_dbi_mode() Relocate ks_pcie_set_dbi_mode() and ks_pcie_clear_dbi_mode() to avoid forward declaration in a subsequent patch. No functional change intended. Link: https://lore.kernel.org/linux-pci/20240328085041.2916899-2-s-vadapalli@ti.com Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 2e81122d681c6cf3a89e3a20934226909a0f6dd6 Author: Andy Shevchenko Date: Mon May 6 17:20:40 2024 +0300 PCI: imx6: Convert to use agnostic GPIO API The of_gpio.h legacy API is going to be removed. In preparation for that, convert the driver to the agnostic API. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240506142142.4042810-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Linus Walleij Reviewed-by: Manivannan Sadhasivam commit 050a5e4b863213953e28a6bff483f14e643ecc1e Author: Andy Shevchenko Date: Mon May 6 17:20:39 2024 +0300 PCI: dwc: Remove unused of_gpio.h inclusion The of_gpio.h API is deprecated and subject to removal. The driver doesn't use it, so simply remove the unused header. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240506142142.4042810-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij Reviewed-by: Manivannan Sadhasivam commit 9a14b2976d4900f3d8dac11fa5856572faeb6055 Author: Andy Shevchenko Date: Mon May 6 17:20:38 2024 +0300 PCI: aardvark: Remove unused of_gpio.h inclusion The of_gpio.h API is deprecated and subject to removal. The driver doesn't use it, so simply remove the unused header. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240506142142.4042810-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij Reviewed-by: Manivannan Sadhasivam commit 7726ed06f5ae71351c52bffc2719b9c8d8443484 Author: Andy Shevchenko Date: Mon May 6 17:20:37 2024 +0300 PCI: dra7xx: Add missing chained IRQ header inclusion Driver is using chained_irq_*() APIs, add the respective inclusion. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240506142142.4042810-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij Reviewed-by: Manivannan Sadhasivam commit 6b11143f9344ddfb6f27559743db36b85e8e6a89 Author: Shradha Todi Date: Tue Feb 20 14:10:46 2024 +0530 PCI: exynos: Adapt to use bulk clock APIs There is no need to hardcode the clock info in the driver as driver can rely on the devicetree to supply the clocks required for the functioning of the peripheral. Thus, remove the static clock info and obtain the platform supplied clocks. All the clocks supplied are obtained and enabled using the devm_clk_bulk_get_all_enable() API. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240220084046.23786-3-shradha.t@samsung.com Signed-off-by: Shradha Todi Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Alim Akhtar Reviewed-by: Manivannan Sadhasivam commit 045fda253511681d73c6f7d3e793655a816fe219 Author: Niklas Cassel Date: Tue Apr 30 09:10:55 2024 +0200 PCI: dra7xx: Fix dra7xx_pcie_cpu_addr_fixup() parameter name The function pointer declaration for the cpu_addr_fixup() callback uses "cpu_addr" as parameter name. Likewise, the argument that is supplied to the function pointer when the function is actually called is "cpu_addr". Rename the dra7xx_pcie_cpu_addr_fixup() function parameter name to match reality. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240430071054.248008-3-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 7360e752165496617e8fec4bbeb7aebf630ca775 Author: Dragan Simic Date: Sun Apr 28 13:40:35 2024 +0200 arm64: dts: allwinner: Add cache information to the SoC dtsi for A64 Add missing cache information to the Allwinner A64 SoC dtsi, to allow the userspace, which includes lscpu(1) that uses the virtual files provided by the kernel under the /sys/devices/system/cpu directory, to display the proper A64 cache information. While there, use a more self-descriptive label for the L2 cache node, which also makes it more consistent with other SoC dtsi files. The cache parameters for the A64 dtsi were obtained and partially derived by hand from the cache size and layout specifications found in the following datasheets and technical reference manuals: - Allwinner A64 datasheet, version 1.1 - ARM Cortex-A53 revision r0p3 TRM, version E For future reference, here's a brief summary of the documentation: - All caches employ the 64-byte cache line length - Each Cortex-A53 core has 32 KB of L1 2-way, set-associative instruction cache and 32 KB of L1 4-way, set-associative data cache - The entire SoC has 512 KB of unified L2 16-way, set-associative cache Signed-off-by: Dragan Simic Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/6a772756c2c677dbdaaab4a2c71a358d8e4b27e9.1714304058.git.dsimic@manjaro.org Signed-off-by: Chen-Yu Tsai commit 523bfa3069eca7498e2ebb56206ac70c5ab6a74b Author: Dragan Simic Date: Mon May 27 02:08:18 2024 +0200 arm64: dts: allwinner: Correct the model names for Pine64 boards Correct the model names of a few Pine64 boards and devices, according to their official names used in the Pine64 wiki and on the official Pine64 website. [1][2][3] This ensures consistency between the officially used names and the names in the source code. [1] https://wiki.pine64.org/wiki/PINE_A64 [2] https://wiki.pine64.org/wiki/PINE_H64 [3] https://pine64.org/devices/ Acked-by: Jernej Skrabec Cc: Marek Kraus Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/4a988518e0dba5de3ecfc172a0fa2b0653c00d8b.1716768092.git.dsimic@manjaro.org Signed-off-by: Chen-Yu Tsai commit c452e215f8745912853a9d98ae23ddbdaa1f6104 Author: Dragan Simic Date: Mon May 27 02:08:17 2024 +0200 dt-bindings: arm: sunxi: Correct the descriptions for Pine64 boards Correct the descriptions of a few Pine64 boards and devices, according to their official names used in the Pine64 wiki and on the official Pine64 website. [1][2][3] This ensures consistency between the officially used names and the names in the source code. [1] https://wiki.pine64.org/wiki/PINE_A64 [2] https://wiki.pine64.org/wiki/PINE_H64 [3] https://pine64.org/devices/ Reviewed-by: Rob Herring (Arm) Cc: Marek Kraus Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/84cd1c70863704e950ca4cadffc7d5367434e06b.1716768092.git.dsimic@manjaro.org Signed-off-by: Chen-Yu Tsai commit 97babdce61f84f0344f91ca1b5bb702a375ccf03 Author: Dragan Simic Date: Sun Apr 28 13:40:36 2024 +0200 arm64: dts: allwinner: Add cache information to the SoC dtsi for H6 Add missing cache information to the Allwinner H6 SoC dtsi, to allow the userspace, which includes lscpu(1) that uses the virtual files provided by the kernel under the /sys/devices/system/cpu directory, to display the proper H6 cache information. Adding the cache information to the H6 SoC dtsi also makes the following warning message in the kernel log go away: cacheinfo: Unable to detect cache hierarchy for CPU 0 The cache parameters for the H6 dtsi were obtained and partially derived by hand from the cache size and layout specifications found in the following datasheets and technical reference manuals: - Allwinner H6 V200 datasheet, version 1.1 - ARM Cortex-A53 revision r0p3 TRM, version E For future reference, here's a brief summary of the documentation: - All caches employ the 64-byte cache line length - Each Cortex-A53 core has 32 KB of L1 2-way, set-associative instruction cache and 32 KB of L1 4-way, set-associative data cache - The entire SoC has 512 KB of unified L2 16-way, set-associative cache Signed-off-by: Dragan Simic Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/49abb93000078c692c48c0a65ff677893909361a.1714304071.git.dsimic@manjaro.org Signed-off-by: Chen-Yu Tsai commit 048ed5efbc4eec85c114d915ee0739341499d4b9 Author: James McGregor Date: Fri Apr 26 09:29:48 2024 +0000 ARM: dts: sun50i: Add LRADC node Add a DT node for the Allwinner H616 LRADC describing the base address, interrupt, reset and clock gates. Signed-off-by: James McGregor Reviewed-by: Andre Przywara Reviewed-by: Jernej Škrabec Link: https://lore.kernel.org/r/20240426092924.15489-3-jamcgregor@protonmail.com Signed-off-by: Chen-Yu Tsai commit 7903ffa44056b2f1d76548248807a78c111c9381 Author: Niklas Cassel Date: Tue Apr 30 09:10:56 2024 +0200 PCI: artpec6: Fix artpec6_pcie_cpu_addr_fixup() parameter name The function pointer declaration for the cpu_addr_fixup() callback uses "cpu_addr" as parameter name. Likewise, the argument that is supplied to the function pointer when the function is actually called is "cpu_addr". Rename the artpec6_pcie_cpu_addr_fixup() parameter name to match reality. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240430071054.248008-4-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Acked-by: Jesper Nilsson commit 574b9e8d078f16cc55967b16f10e610b5d374cff Author: James McGregor Date: Fri Apr 26 09:29:41 2024 +0000 dt-bindings: input: sun4i-lradc-keys: Add H616 compatible The Allwinner H616 SoC has an LRADC which is compatible with the versions in existing SoCs. Add a compatible string for H616, with the R329 fallback. This is the same as the D1, so put them into an enum. Signed-off-by: James McGregor Reviewed-by: Andre Przywara Acked-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240426092924.15489-2-jamcgregor@protonmail.com Signed-off-by: Chen-Yu Tsai commit a9927c2cac6e9831361e43a14d91277818154e6a Author: Aleksandr Mishin Date: Fri May 3 15:57:05 2024 +0300 PCI: al: Check IORESOURCE_BUS existence during probe If IORESOURCE_BUS is not provided in Device Tree it will be fabricated in of_pci_parse_bus_range(), so NULL pointer dereference should not happen here. But that's hard to verify, so check for NULL anyway. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lore.kernel.org/linux-pci/20240503125705.46055-1-amishin@t-argos.ru Suggested-by: Bjorn Helgaas Signed-off-by: Aleksandr Mishin Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas commit 903534fa7d30214d8ba840ab1cd9e917e0c88e41 Author: Ilpo Järvinen Date: Tue May 7 13:25:16 2024 +0300 PCI: Fix resource double counting on remove & rescan pbus_size_mem() keeps the size of the optional resources in children_add_size. When calculating the PCI bridge window size, calculate_memsize() lower bounds size by old_size before adding children_add_size and performing the window size alignment. This results in double counting for the resources in children_add_size because old_size may be based on the previous size of the bridge window after it has already included children_add_size (that is, size1 in pbus_size_mem() from an earlier invocation of that function). As a result, on repeated remove of the bus & rescan cycles the resource size keeps increasing when children_add_size is non-zero as can be seen from this extract: iomem0: 23fffd00000-23fffdfffff : PCI Bus 0000:03 # 1MiB iomem1: 20000000000-200001fffff : PCI Bus 0000:03 # 2MiB iomem2: 20000000000-200002fffff : PCI Bus 0000:03 # 3MiB iomem3: 20000000000-200003fffff : PCI Bus 0000:03 # 4MiB iomem4: 20000000000-200004fffff : PCI Bus 0000:03 # 5MiB Solve the double counting by moving old_size check later in calculate_memsize() so that children_add_size is already accounted for. After the patch, the bridge window retains its size as expected: iomem0: 23fffd00000-23fffdfffff : PCI Bus 0000:03 # 1MiB iomem1: 20000000000-200000fffff : PCI Bus 0000:03 # 1MiB iomem2: 20000000000-200000fffff : PCI Bus 0000:03 # 1MiB Fixes: a4ac9fea016f ("PCI : Calculate right add_size") Link: https://lore.kernel.org/r/20240507102523.57320-2-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 2700225304e8e4f0f29f2bbb8ad0c112c9666d90 Author: Ilpo Järvinen Date: Tue May 7 13:25:21 2024 +0300 resource: Export find_resource_space() PCI bridge window logic needs to find out in advance to the actual allocation if there is an empty space big enough to fit the window. Export find_resource_space() for the purpose. Also move the struct resource_constraint into generic header to be able to use the new interface. Link: https://lore.kernel.org/r/20240507102523.57320-7-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit 094c0ce5451dd6232938e307d6f259e76571a778 Author: Ilpo Järvinen Date: Tue May 7 13:25:20 2024 +0300 resource: Handle simple alignment inside __find_resource_space() allocate_resource() accepts ->alignf() callback to perform custom alignment beyond constraint->align. If alignf is NULL, simple_align_resource() is used which only returns avail->start (no change). Using avail->start directly is natural and can be done with a conditional in __find_resource_space() instead which avoids unnecessarily using callback. It makes the code inside __find_resource_space() more obvious and removes the need for the caller to provide constraint->alignf unnecessarily. This is preparation for exporting find_resource_space(). Link: https://lore.kernel.org/r/20240507102523.57320-6-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit 4eed3dd7116814c82630b0f1b0f73fa96707134f Author: Ilpo Järvinen Date: Tue May 7 13:25:19 2024 +0300 resource: Use typedef for alignf callback To make it simpler to declare resource constraint alignf callbacks, add typedef for it and document it. Suggested-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240507102523.57320-5-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit f958625cb4d73556415747de14c6e8076e31254c Author: Ilpo Järvinen Date: Tue May 7 13:25:18 2024 +0300 resource: Document find_resource_space() and resource_constraint Document find_resource_space() and the struct resource_constraint as they are going to be exposed outside of resource.c. Link: https://lore.kernel.org/r/20240507102523.57320-4-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit 8559125bf7a1d2035f7d3a4e84607e8aad33b160 Author: Ilpo Järvinen Date: Tue May 7 13:25:17 2024 +0300 resource: Rename find_resource() to find_resource_space() Rename find_resource() to find_resource_space() to better describe what the function does. This is a preparation for exposing it beyond resource.c, which is needed by PCI core. Also rename the __ variant to match the names. Link: https://lore.kernel.org/r/20240507102523.57320-3-ilpo.jarvinen@linux.intel.com Tested-by: Lidong Wang Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit 60bd3e039aa257790e925f7ff22d776756f3b123 Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:47 2024 +0530 PCI: endpoint: pci-epf-{mhi/test}: Move DMA initialization to EPC init callback To maintain uniformity across EPF drivers, move DMA initialization to EPC init callback. This will also allow us to deinit DMA during PERST# assert in the further commits. For EPC drivers without PERST#, DMA deinit will only happen during driver unbind. Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-6-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 942ceba0e4fcc935dc22dd40f5510325e1e96d47 Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:46 2024 +0530 PCI: endpoint: pci-epf-test: Refactor pci_epf_test_unbind() function Move the pci_epc_clear_bar() and pci_epf_free_space() code to respective helper functions. This allows reusing the helpers in future commits. This also requires moving the pci_epf_test_unbind() definition below pci_epf_test_bind() to avoid forward declaration of the above helpers. No functional change. Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-5-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit f58838d7feb04809257f54a8b256786d2f9dfe01 Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:44 2024 +0530 PCI: endpoint: Rename BME to Bus Master Enable BME which stands for 'Bus Master Enable' is not defined in the PCIe base spec even though it is commonly referred in many places (vendor docs). To align with the spec, rename it to its expansion 'Bus Master Enable'. Suggested-by: Damien Le Moal Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-3-22832d0d456f@linaro.org Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-4-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński [bhelgaas: squash removal of irrelevant 'Link is enabled'] Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 4edd7dc82bd6be6989c034ccbbbccdc61034e33b Author: Manivannan Sadhasivam Date: Tue Apr 30 11:43:43 2024 +0530 PCI: endpoint: Rename core_init() callback in 'struct pci_epc_event_ops' to epc_init() core_init() callback is used to notify the EPC initialization event to the EPF drivers. The 'core' prefix was used indicate that the controller IP core has completed initialization. But it serves no purpose as the EPF driver will only care about the EPC initialization as a whole and there is no real benefit to distinguish the IP core part. Rename the core_init() callback in 'struct pci_epc_event_ops' to epc_init() to make it more clear. Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-2-22832d0d456f@linaro.org Tested-by: Niklas Cassel Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel commit 6859e4f22af359de2fe49c92c3323f20e53e9031 Author: Manivannan Sadhasivam Date: Thu Apr 18 13:29:59 2024 +0530 PCI: endpoint: pci-epf-test: Use 'msix_capable' flag directly in pci_epf_test_alloc_space() Instead of using a local variable to cache the 'msix_capable' flag, use it directly to simplify the code. Suggested-by: Niklas Cassel Link: https://lore.kernel.org/linux-pci/20240418-pci-epf-test-fix-v2-2-eacd54831444@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Niklas Cassel commit 5a5095a8bd1bd349cce1c879e5e44407a34dda8a Author: Manivannan Sadhasivam Date: Thu Apr 18 13:29:58 2024 +0530 PCI: endpoint: pci-epf-test: Make use of cached 'epc_features' in pci_epf_test_core_init() Instead of getting the epc_features from pci_epc_get_features() API, use the cached pci_epf_test::epc_features value to avoid the NULL check. Since the NULL check is already performed in pci_epf_test_bind(), having one more check in pci_epf_test_core_init() is redundant and it is not possible to hit the NULL pointer dereference. Also with commit a01e7214bef9 ("PCI: endpoint: Remove "core_init_notifier" flag"), 'epc_features' got dereferenced without the NULL check, leading to the following false positive Smatch warning: drivers/pci/endpoint/functions/pci-epf-test.c:784 pci_epf_test_core_init() error: we previously assumed 'epc_features' could be null (see line 747) Thus, remove the redundant NULL check and also use the epc_features:: {msix_capable/msi_capable} flags directly to avoid local variables. [kwilczynski: commit log] Fixes: 5e50ee27d4a5 ("PCI: pci-epf-test: Add support to defer core initialization") Closes: https://lore.kernel.org/linux-pci/024b5826-7180-4076-ae08-57d2584cca3f@moroto.mountain Link: https://lore.kernel.org/linux-pci/20240418-pci-epf-test-fix-v2-1-eacd54831444@linaro.org Reported-by: Dan Carpenter Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Niklas Cassel commit 328e4dffbeecc0f2cc5a149dee6c11a0577c9671 Author: Christophe JAILLET Date: Fri Apr 5 20:16:59 2024 +0200 PCI: endpoint: Remove unused field in struct pci_epf_group In "struct pci_epf_group", the 'type_group' field is unused. This was added, but already unused, by commit 70b3740f2c19 ("PCI: endpoint: Automatically create a function specific attributes group"). Thus, remove it. Found with cppcheck, unusedStructMember. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/6507d44b6c60a19af35a605e2d58050be8872ab6.1712341008.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 Author: Ajit Khaparde Date: Fri May 10 13:42:28 2024 -0700 PCI: Add ACS quirk for Broadcom BCM5760X NIC The Broadcom BCM5760X NIC may be a multi-function device. While it does not advertise an ACS capability, peer-to-peer transactions are not possible between the individual functions. So it is ok to treat them as fully isolated. Add an ACS quirk for this device so the functions can be in independent IOMMU groups and attached individually to userspace applications using VFIO. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broadcom.com Signed-off-by: Ajit Khaparde Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Gospodarek commit c133cfc12cd717b72ce534477415446e1c33de47 Author: Luca Weiss Date: Mon Apr 8 21:32:04 2024 +0200 ARM: dts: qcom: msm8974: Use proper compatible for APCS syscon Use the apcs-kpss-global compatible for the APCS global mailbox block found on this SoC. This also resolves a dt-binding checker warning: arch/arm/boot/dts/qcom/qcom-msm8974pro-fairphone-fp2.dtb: syscon@f9011000: compatible: 'anyOf' conditional failed, one must be fixed: ['syscon'] is too short 'syscon' is not one of ['allwinner,sun8i-a83t-system-controller', 'allwinner,sun8i-h3-system-controller', 'allwinner,sun8i-v3s-system-controller', 'allwinner,sun50i-a64-system-controller', 'amd,pensando-elba-syscon', 'brcm,cru-clkset', 'freecom,fsg-cs2-system-controller', 'fsl,imx93-aonmix-ns-syscfg', 'fsl,imx93-wakeupmix-syscfg', 'hisilicon,dsa-subctrl', 'hisilicon,hi6220-sramctrl', 'hisilicon,pcie-sas-subctrl', 'hisilicon,peri-subctrl', 'hpe,gxp-sysreg', 'intel,lgm-syscon', 'loongson,ls1b-syscon', 'loongson,ls1c-syscon', 'marvell,armada-3700-usb2-host-misc', 'mediatek,mt8135-pctl-a-syscfg', 'mediatek,mt8135-pctl-b-syscfg', 'mediatek,mt8365-syscfg', 'microchip,lan966x-cpu-syscon', 'microchip,sparx5-cpu-syscon', 'mstar,msc313-pmsleep', 'nuvoton,ma35d1-sys', 'nuvoton,wpcm450-shm', 'rockchip,px30-qos', 'rockchip,rk3036-qos', 'rockchip,rk3066-qos', 'rockchip,rk3128-qos', 'rockchip,rk3228-qos', 'rockchip,rk3288-qos', 'rockchip,rk3368-qos', 'rockchip,rk3399-qos', 'rockchip,rk356 8-qos', 'rockchip,rk3588-qos', 'rockchip,rv1126-qos', 'starfive,jh7100-sysmain', 'ti,am62-usb-phy-ctrl', 'ti,am654-dss-oldi-io-ctrl', 'ti,am654-serdes-ctrl', 'ti,j784s4-pcie-ctrl'] from schema $id: http://devicetree.org/schemas/mfd/syscon.yaml# Signed-off-by: Luca Weiss Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240408-msm8974-apcs-v1-2-90cb7368836e@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 079544ec60fcba3f32e4b513442cc131211c8e22 Author: Alison Schofield Date: Mon May 6 21:24:22 2024 -0700 x86/pconfig: Remove unused MKTME pconfig code Code supporting Intel PCONFIG targets was an early piece of enabling for MKTME (Multi-Key Total Memory Encryption). Since MKTME feature enablement did not follow into the kernel, remove the unused PCONFIG code. Signed-off-by: Alison Schofield Signed-off-by: Dave Hansen Acked-by: Kirill A. Shutemov Acked-by: Kai Huang Link: https://lore.kernel.org/all/4ddff30d466785b4adb1400f0518783012835141.1715054189.git.alison.schofield%40intel.com commit 98b83cf0c1e22390ebfeb96b3c1b40f7189c558a Author: Alison Schofield Date: Mon May 6 21:24:21 2024 -0700 x86/cpu: Remove useless work in detect_tme_early() TME (Total Memory Encryption) and MKTME (Multi-Key Total Memory Encryption) BIOS detection were introduced together here [1] and are loosely coupled in the Intel CPU init code. TME is a hardware only feature and its BIOS status is all that needs to be shared with the kernel user: enabled or disabled. The TME algorithm the BIOS is using and whether or not the kernel recognizes that algorithm is useless to the kernel user. MKTME is a hardware feature that requires kernel support. MKTME detection code was added in advance of broader kernel support for MKTME that never followed. So, rather than continuing to spew needless and confusing messages about BIOS MKTME status, remove most of the MKTME pieces from detect_tme_early(). Keep one useful message: alert the user when BIOS enabled MKTME reduces the available physical address bits. Recovery of the MKTME consumed bits requires a reboot with MKTME disabled in BIOS. There is no functional change for the user, only a change in boot messages. Below is one example when both TME and MKTME are enabled in BIOS with AES_XTS_256 which is unknown to the detect tme code. Before: [] x86/tme: enabled by BIOS [] x86/tme: Unknown policy is active: 0x2 [] x86/mktme: No known encryption algorithm is supported: 0x4 [] x86/mktme: enabled by BIOS [] x86/mktme: 127 KeyIDs available After: [] x86/tme: enabled by BIOS [] x86/mktme: BIOS enable: x86_phys_bits reduced by 8 [1] commit cb06d8e3d020 ("x86/tme: Detect if TME and MKTME is activated by BIOS") Signed-off-by: Alison Schofield Signed-off-by: Dave Hansen Acked-by: Kirill A. Shutemov Link: https://lore.kernel.org/all/86dfdf6ced8c9b790f9376bf6c7e22b5608f47c2.1715054189.git.alison.schofield%40intel.com commit 26bf5fc86033162dbd2d5759094cbd724313d55b Author: Thorsten Blum Date: Mon May 27 15:49:47 2024 +0200 w1: Drop allocation error message Drop the custom error message because kzalloc() already prints allocation failures. Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240527134946.338398-2-thorsten.blum@toblux.com Signed-off-by: Krzysztof Kozlowski commit 839936d9676bdc2e4dde63631131feb8870fa4d2 Author: Luca Weiss Date: Sun Feb 18 21:57:27 2024 +0100 arm64: dts: qcom: qcs404: Use qcs404-hfpll compatible for hfpll Follow the updated bindings and use a QCS404-specific compatible for the HFPLL on this SoC. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240218-hfpll-yaml-v2-3-31543e0d6261@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 92b9ce5b11d7ba281f5bf0029185d5c891b29344 Author: Luca Weiss Date: Tue Apr 9 20:36:37 2024 +0200 ARM: dts: qcom: msm8974-hammerhead: Update gpio hog node name Follow the gpio-hog bindings and use otg-hog as node name. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240409-qcom-pmic-gpio-hog-v2-2-5ff812d2baed@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 83086701167434c444ecde8479f1b9d3e0804a65 Author: Martijn Braam Date: Fri Apr 5 19:06:13 2024 +0500 arm64: dts: qcom: Add Motorola Moto G 2015 (osprey) Motorola Moto G 2015 is an msm8916 based smartphone. Supported features: - eMMC and SD; - Buttons; - Touchscreen; - USB; - Fuel Gauge; - Sound. Signed-off-by: Martijn Braam Signed-off-by: Stephan Gerhold [Nikita: Use common dtsi] Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240405-msm8916-moto-init-v1-4-502b58176d34@trvn.ru Signed-off-by: Bjorn Andersson commit 24773481ae5e54f041a24b99037ba80775ec9fc5 Author: Wiktor Strzębała Date: Fri Apr 5 19:06:12 2024 +0500 arm64: dts: qcom: Add Motorola Moto E 2015 LTE (surnia) Motorola Moto E 2015 LTE is an msm8916 based smartphone. Supported features: - eMMC and SD; - Buttons; - Touchscreen; - USB; - Fuel Gauge; - Sound. Signed-off-by: Wiktor Strzębała [Valérie: Sound and modem] Co-developed-by: Valérie Roux Signed-off-by: Valérie Roux Signed-off-by: Stephan Gerhold [Nikita: Use common dtsi] Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240405-msm8916-moto-init-v1-3-502b58176d34@trvn.ru Signed-off-by: Bjorn Andersson commit 65321d09e38bfbebd0e66975e021b748844cf478 Author: Ruby Iris Juric Date: Fri Apr 5 19:06:11 2024 +0500 arm64: dts: qcom: Add device tree for Motorola Moto G4 Play (harpia) Motorola Moto G4 Play is an msm8916 based smartphone. Supported features: - eMMC and SD; - Buttons; - Touchscreen; - USB; - Fuel Gauge; - Sound; - Accelerometer. msm8916 Moto devices share significant portion of the design so the common parts are separated into a common dtsi. Signed-off-by: Ruby Iris Juric Signed-off-by: Stephan Gerhold [Nikita: Split up to common dtsi] Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240405-msm8916-moto-init-v1-2-502b58176d34@trvn.ru Signed-off-by: Bjorn Andersson commit e4558fcfbeb01c8bdb1163bc3c4f7c6227a22843 Author: Raymond Hackley Date: Sat Apr 6 11:15:00 2024 +0000 arm64: dts: qcom: msm8916-samsung-rossa: Add LIS2HH12 accelerometer Core Prime LTE uses ST LIS2HH12 accelerometer. Add support for it. [Stephen: Use common &st_accel definition from common dtsi] Signed-off-by: Stephan Gerhold Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240406111348.14358-4-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 7f433e1e3c224b90d536109d7a37e116b98086fb Author: Siddharth Manthan Date: Sat Apr 6 11:14:45 2024 +0000 arm64: dts: qcom: msm8916-samsung-fortuna: Add LSM303C accelerometer/magnetometer Some Grand Prime use a ST LSM303C accelerometer/magnetometer combo. Add support for it. Signed-off-by: Siddharth Manthan [Stephan: Move sensors to common dtsi (disabled by default)] Signed-off-by: Stephan Gerhold [Raymond: Use interrupts-extended] Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240406111348.14358-3-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit a204bf3fb7bd436787f715dddca2cb7c1c86c12f Author: Joe Mason Date: Sat Apr 6 11:14:28 2024 +0000 arm64: dts: qcom: msm8916-samsung-fortuna: Add BMC150 accelerometer/magnetometer Some Grand Prime use a Bosch BMC150 accelerometer/magnetometer combo. The chip provides two separate I2C devices for the accelerometer and magnetometer that are already supported by the bmc150-accel and bmc150-magn driver. Signed-off-by: Joe Mason [Stephan: Move sensors to common dtsi, disabled by default] Signed-off-by: Stephan Gerhold [Raymond: Add it to grandprimelte. Use interrupts-extended] Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240406111348.14358-2-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 0ae1bf2e097354b4c85491d9cc165a0f8f972e7b Author: Nikita Travkin Date: Fri Apr 5 19:06:10 2024 +0500 dt-bindings: arm: qcom: Add msm8916 based Motorola devices Add compatible values for the msm8916 based Motorola smartphones. Signed-off-by: Nikita Travkin Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240405-msm8916-moto-init-v1-1-502b58176d34@trvn.ru Signed-off-by: Bjorn Andersson commit 62aad66b57466287925d17e7ed0f6f14fd6c5459 Author: Gianluca Boiano Date: Tue Apr 2 14:35:43 2024 +0200 arm64: dts: qcom: pmi8950: add pwm node This node is actually found on some msm8953 devices (xiaomi-mido) and allows irled enablement Signed-off-by: Gianluca Boiano Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240402-pmi8950-pwm-support-v1-2-1a66899eeeb3@gmail.com Signed-off-by: Bjorn Andersson commit 1d3ac84d6a960baa50da4163160ae82f8dc74af6 Author: Alexey Charkov Date: Fri May 17 16:25:08 2024 +0400 arm64: dts: rockchip: add rfkill node for M.2 Key E Bluetooth on Rock 5B By default the BT WAKE signal inside the M.2 key E connector on Radxa Rock 5B is driven low, which results in the Bluetooth function being disabled even if the inserted M.2 card supports it. Expose this signal as an RFKILL device so that it can be enabled by the userspace. Tested with an Intel AX210 card, which connects a Bluetooth device over the USB 2.0 bus. Signed-off-by: Alexey Charkov Link: https://lore.kernel.org/r/20240517122509.4626-1-alchark@gmail.com Signed-off-by: Heiko Stuebner commit 5c9464e2c7a74ce7b0288a7d3c8b96b1321fce55 Author: Matt Roper Date: Fri May 24 16:04:45 2024 -0700 drm/xe: Don't refer to general LRC initialization as a "wa" During engine LRC initialization a number of registers need to be programmed as general setup. This programming is not a "workaround" so naming the RTP table as "lrc_was" is misleading; switch to the name "lrc_setup" to more accurately describe what the table is actually for. Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20240524230444.1447797-2-matthew.d.roper@intel.com commit edeb180f1c8cfe2e789109766b636430adb5a0a3 Author: Andreas Gruenbacher Date: Sat Mar 30 04:41:48 2024 +0100 gfs2: Rename handle_callback to request_demote Function handle_callback() is used to request a glock demote. This often happens in response to a conflicting remote locking request and subsequent bast callback from DLM, but there are other reasons for triggering a demote request as well, such as when trying to release a glock in response to memory pressure. To clarify that, rename the function to request_demote(). Signed-off-by: Andreas Gruenbacher commit 1fb5f67e21805333daca4b0c96416254de96400e Author: Andreas Gruenbacher Date: Thu Mar 28 06:15:08 2024 +0100 gfs2: Rename GLF_FROZEN to GLF_HAVE_FROZEN_REPLY The GLF_FROZEN flag indicates that a reply to a DLM locking request has been received, but should not be processed at this time. To clarify that meaning, rename the flag to GLF_HAVE_FROZEN_REPLY. Signed-off-by: Andreas Gruenbacher commit 0a0383a93e5d28f2873a72b8378c2b36404e431e Author: Andreas Gruenbacher Date: Tue Mar 19 01:01:28 2024 +0100 gfs2: Rename GLF_REPLY_PENDING to GLF_HAVE_REPLY The GLF_REPLY_PENDING flag indicates to glock_work_func() that in response to a locking request, DLM has sent a reply that needs to be processed. A flag with that name could as well indicate that we are waiting on a reply from DLM, however. To disambiguate these two cases, rename the flag to GLF_HAVE_REPLY. Signed-off-by: Andreas Gruenbacher commit 121e730112788ab9aceedfb38d59dae2dee83301 Author: Andreas Gruenbacher Date: Mon Mar 18 20:43:17 2024 +0100 gfs2: Rename GLF_FREEING to GLF_UNLOCKED Rename the GLF_FREEING flag to GLF_UNLOCKED, and the ->go_free glock operation to ->go_unlocked. This mechanism is used to wait for the underlying DLM lock to be unlocked; being able to free the glock is a consequence of the DLM lock being unlocked. Signed-off-by: Andreas Gruenbacher commit 932a9052dc731d99865d478043e84b52937b8d54 Author: Andreas Gruenbacher Date: Thu Apr 11 09:23:15 2024 +0200 gfs2: Remove useless return statement in run_queue The return statement at the end of run_queue() is useless. Signed-off-by: Andreas Gruenbacher commit 99b8520c00711556d62a9261eec9acfac94ecc9b Author: Andreas Gruenbacher Date: Mon Mar 18 22:22:32 2024 +0100 gfs2: Remove unnecessary function prototype Function __gfs2_glock_dq() gets defined before it is used, so there is no need for a separate function declaration. Signed-off-by: Andreas Gruenbacher commit 3c6c8443d45072b43c939eba9e891159a37ed282 Author: Mrinmay Sarkar Date: Mon Mar 18 11:34:29 2024 +0530 PCI: epf-mhi: Enable HDMA for SA8775P SoC SA8775P SoC supports Hyper DMA (HDMA) DMA Engine present in the DWC IP. So, enable it in the EPF driver so that the DMA Engine APIs can be used for data transfer. [mani: reworded commit message] Link: https://lore.kernel.org/linux-pci/20240318-dw-hdma-v5-5-f04c5cdde760@linaro.org Signed-off-by: Mrinmay Sarkar Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Siddharth Vadapalli commit c94391ba52b9efa8797ad75a95c40c40df833c61 Author: Mrinmay Sarkar Date: Mon Mar 18 11:34:28 2024 +0530 PCI: qcom-ep: Add HDMA support for SA8775P SoC SA8775P SoC supports the new Hyper DMA (HDMA) DMA Engine inside the DWC IP, so add support for it by passing the mapping format and the number of read/write channels count. The PCIe EP controller used on this SoC is of version 1.34.0, so a separate config struct is introduced for the sake of enabling HDMA conditionally. It should be noted that for the eDMA support (predecessor of HDMA), there are no mapping format and channels count specified. That is because eDMA supports auto detection of both parameters, whereas HDMA doesn't. [mani: reworded commit message, added kdoc, and minor cleanups] Link: https://lore.kernel.org/linux-pci/20240318-dw-hdma-v5-4-f04c5cdde760@linaro.org Signed-off-by: Mrinmay Sarkar Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Siddharth Vadapalli commit 0551abf2192dc944337516033678488cb08caa37 Author: Manivannan Sadhasivam Date: Mon Mar 18 11:34:27 2024 +0530 PCI: dwc: Pass the eDMA mapping format flag directly from glue drivers Instead of maintaining a separate capability for glue drivers that cannot support auto detection of the eDMA mapping format, pass the mapping format directly from them. This will simplify the code and also allow adding HDMA support that also doesn't support auto detection of mapping format. Suggested-by: Serge Semin Link: https://lore.kernel.org/linux-pci/20240318-dw-hdma-v5-3-f04c5cdde760@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin Reviewed-by: Siddharth Vadapalli Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda commit 0d278fbdb432e4c8406b75487fe36e3a6b50a680 Author: Manivannan Sadhasivam Date: Mon Mar 18 11:34:26 2024 +0530 PCI: dwc: Skip finding eDMA channels count for HDMA platforms In the case of Hyper DMA (HDMA) present in DWC controllers, there is no way the drivers can auto detect the number of read/write channels as like its predecessor embedded DMA (eDMA). So the glue drivers making use of HDMA have to pass the channels count during probe. To accommodate that, skip the existing auto detection of channels count procedure for HDMA based platforms. If the channels count passed by the glue drivers were wrong in any form, then the existing sanity check will catch it. Suggested-by: Serge Semin Link: https://lore.kernel.org/linux-pci/20240318-dw-hdma-v5-2-f04c5cdde760@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Serge Semin Reviewed-by: Siddharth Vadapalli Reviewed-by: Yoshihiro Shimoda commit 0b45127a1b85ed84bc78ebcd569968849df265a9 Author: Manivannan Sadhasivam Date: Mon Mar 18 11:34:25 2024 +0530 PCI: dwc: Refactor dw_pcie_edma_find_chip() API In order to add support for Hyper DMA (HDMA), refactor the existing dw_pcie_edma_find_chip() API by moving the common code to separate functions. No functional change. Suggested-by: Serge Semin Link: https://lore.kernel.org/linux-pci/20240318-dw-hdma-v5-1-f04c5cdde760@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Frank Li Reviewed-by: Serge Semin Reviewed-by: Siddharth Vadapalli Reviewed-by: Yoshihiro Shimoda commit 58d0d3e032b3679023afd0062d9ddfb7823c6e5d Author: Mrinmay Sarkar Date: Tue Apr 30 21:25:38 2024 +0530 PCI: qcom-ep: Add support for SA8775P SOC Add support for SA8775P SoC to the Qualcomm PCIe Endpoint Controller driver. Adding new compatible string as it has different set of clocks compared to other SoCs. Link: https://lore.kernel.org/linux-pci/1714492540-15419-3-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Mrinmay Sarkar Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 9d3d5e75f31ca43d038a63cf701b5af4eae4623b Author: Mrinmay Sarkar Date: Tue Apr 30 21:25:37 2024 +0530 dt-bindings: PCI: qcom-ep: Add support for SA8775P SoC Add devicetree bindings support for SA8775P SoC. It has DMA register space and dma interrupt to support HDMA. Link: https://lore.kernel.org/linux-pci/1714492540-15419-2-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Mrinmay Sarkar Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam commit 652935ba05860eadaa19ac9efe7aea61fb7a3aef Author: Manivannan Sadhasivam Date: Wed Apr 17 12:32:53 2024 +0530 PCI: qcom: Use devm_clk_bulk_get_all() API There is no need for the device drivers to validate the clocks defined in Devicetree. The validation should be performed by the DT schema and the drivers should just get all the clocks from DT. Right now the driver hardcodes the clock info and validates them against DT which is redundant. So use devm_clk_bulk_get_all() that just gets all the clocks defined in DT and get rid of all static clocks info from the driver. This simplifies the driver. Link: https://lore.kernel.org/linux-pci/20240417-pci-qcom-clk-bulk-v1-1-52ca19b3d6b2@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit e745698209837a952d4515bc02cddd5a31a644b9 Author: Alex Bee Date: Thu May 9 16:06:50 2024 +0200 clk: rockchip: rk3128: Add hclk_vio_h2p to critical clocks The DSI controller needs this clock to be enabled in order to be able to access the registers. Make it critical for that purpose. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240509140653.168591-5-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 577c04fbf255f81f26507a7ffb2477fce50c214d Author: Alex Bee Date: Thu May 9 16:06:49 2024 +0200 clk: rockchip: rk3128: Export PCLK_MIPIPHY Export the D-DHY's APB clock for usage in the DT. Also drop the CLK_IGNORE_UNUSED-flag, as the clock will be enabled on demand. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20240509140653.168591-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit d8eb1c94e051452869cdb18cf48956e7e8ddc90b Merge: 1613e604df0cd 14a1d1dc35d34 Author: Heiko Stuebner Date: Tue May 28 16:38:10 2024 +0200 Merge branch 'v6.11-shared/clkids' into v6.11-clk/next Signed-off-by: Heiko Stuebner commit 4b3529edbb8ff069d762c6947e055e10c1748170 Merge: c30ff5f3aec3f d9cbd8343b010 Author: Jakub Kicinski Date: Tue May 28 07:27:28 2024 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2024-05-28 We've added 23 non-merge commits during the last 11 day(s) which contain a total of 45 files changed, 696 insertions(+), 277 deletions(-). The main changes are: 1) Rename skb's mono_delivery_time to tstamp_type for extensibility and add SKB_CLOCK_TAI type support to bpf_skb_set_tstamp(), from Abhishek Chauhan. 2) Add netfilter CT zone ID and direction to bpf_ct_opts so that arbitrary CT zones can be used from XDP/tc BPF netfilter CT helper functions, from Brad Cowie. 3) Several tweaks to the instruction-set.rst IETF doc to address the Last Call review comments, from Dave Thaler. 4) Small batch of riscv64 BPF JIT optimizations in order to emit more compressed instructions to the JITed image for better icache efficiency, from Xiao Wang. 5) Sort bpftool C dump output from BTF, aiming to simplify vmlinux.h diffing and forcing more natural type definitions ordering, from Mykyta Yatsenko. 6) Use DEV_STATS_INC() macro in BPF redirect helpers to silence a syzbot/KCSAN race report for the tx_errors counter, from Jiang Yunshui. 7) Un-constify bpf_func_info in bpftool to fix compilation with LLVM 17+ which started treating const structs as constants and thus breaking full BTF program name resolution, from Ivan Babrou. 8) Fix up BPF program numbers in test_sockmap selftest in order to reduce some of the test-internal array sizes, from Geliang Tang. 9) Small cleanup in Makefile.btf script to use test-ge check for v1.25-only pahole, from Alan Maguire. 10) Fix bpftool's make dependencies for vmlinux.h in order to avoid needless rebuilds in some corner cases, from Artem Savkov. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (23 commits) bpf, net: Use DEV_STAT_INC() bpf, docs: Fix instruction.rst indentation bpf, docs: Clarify call local offset bpf, docs: Add table captions bpf, docs: clarify sign extension of 64-bit use of 32-bit imm bpf, docs: Use RFC 2119 language for ISA requirements bpf, docs: Move sentence about returning R0 to abi.rst bpf: constify member bpf_sysctl_kern:: Table riscv, bpf: Try RVC for reg move within BPF_CMPXCHG JIT riscv, bpf: Use STACK_ALIGN macro for size rounding up riscv, bpf: Optimize zextw insn with Zba extension selftests/bpf: Handle forwarding of UDP CLOCK_TAI packets net: Add additional bit to support clockid_t timestamp type net: Rename mono_delivery_time to tstamp_type for scalabilty selftests/bpf: Update tests for new ct zone opts for nf_conntrack kfuncs net: netfilter: Make ct zone opts configurable for bpf ct helpers selftests/bpf: Fix prog numbers in test_sockmap bpf: Remove unused variable "prev_state" bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer bpf: Fix order of args in call to bpf_map_kvcalloc ... ==================== Link: https://lore.kernel.org/r/20240528105924.30905-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 14a1d1dc35d346a1523f38f6517c349dfa447a58 Author: Alex Bee Date: Thu May 9 16:06:48 2024 +0200 dt-bindings: clock: rk3128: Add PCLK_MIPIPHY The DPHY's APB clock is required to be exposed in order to be able to enable it and access the phy's registers. Signed-off-by: Alex Bee Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240509140653.168591-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit e6f53274c06dc841d677ccaf35587b8dd3fb7a47 Author: Vasyl Gomonovych Date: Fri May 17 13:48:46 2024 -0700 EDAC/ghes: Add missing newline to pr_info() statement Add a missing newline character even if printk() adds newlines to non-\n-terminated strings because in the unlikely case a KERN_CONT print statement is added after the unterminated statement, the two will get glued together which is not the expected behavior. [ bp: Rewrite commit message. ] Signed-off-by: Vasyl Gomonovych Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240517204951.2019031-1-gomonovych@gmail.com commit 595e819d9bbdfa1c000dc7ea50430ebb5f9db09a Author: Vasyl Gomonovych Date: Fri May 17 14:54:37 2024 -0700 RAS/AMD/ATL: Add missing newline to pr_info() statement Add a missing newline character even if printk() adds newlines to non-\n-terminated strings because in the unlikely case a KERN_CONT print statement is added after the unterminated statement, the two will get glued together which is not the expected behavior. [ bp: Rewrite commit message. ] Signed-off-by: Vasyl Gomonovych Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240517215452.2020680-1-gomonovych@gmail.com commit 0aa256252dbe74f48300824b9e65d5e93fe631ff Author: Michal Wajdeczko Date: Tue May 21 16:22:57 2024 +0200 drm/xe: Use platform name in xe_assert() We can now use more user-friendly platform name instead of previosly used magic platform enumerator value: [ ] xe 0000:00:02.0: [drm] Assertion `false` failed! platform: ALDERLAKE_S ... [ ] xe 0000:03:00.0: [drm] Assertion `false` failed! platform: DG2 ... vs [ ] xe 0000:00:02.0: [drm] Assertion `false` failed! platform: 3 ... [ ] xe 0000:03:00.0: [drm] Assertion `false` failed! platform: 7 ... Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240521142257.756-4-michal.wajdeczko@intel.com commit 6ca728975654a7247b2e4aa2e9eb61043c833570 Author: Michal Wajdeczko Date: Tue May 21 16:22:55 2024 +0200 drm/xe: Store platform name in xe_device.info We already maintain the platform name as part of the device descriptor, but in xe_device.info we only store platform enum, which is not the best for use in any user-facing messages. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240521142257.756-2-michal.wajdeczko@intel.com commit 48e4da7919bea2f5c0e20b218385ffe8d5492ab2 Author: Richard Acayan Date: Thu May 23 21:20:26 2024 -0400 soc: qcom: socinfo: Add SDM670 SoC ID table entry There is support for SDM670 already, but not recognized by the socinfo driver. Add the table entry so SDM670 can be found in sysfs. Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240524012023.318965-7-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit 1866407831deb945a16c60c38246f28c2475b28a Author: Richard Acayan Date: Thu May 23 21:20:25 2024 -0400 dt-bindings: arm: qcom,ids: Add SoC ID for SDM670 The socinfo driver uses SoC IDs from the device tree bindings. Add the SoC ID for SDM670. Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240524012023.318965-6-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit 5f2fd4aefac8ac376d1e4979d5237f5e7c53174d Author: Neil Armstrong Date: Thu May 23 09:59:33 2024 +0200 dt-bindings: arm: qcom: Add Lenovo Smart Tab M10 (WiFi) This documents Lenovo Smart Tab M10 (WiFi) (model tbx605f) which is a 10.1" tablet by Lenovo based on the SDM450 SoC. Signed-off-by: Neil Armstrong Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240523-topic-sdm450-upstream-tbx605f-v1-1-e52b89133226@linaro.org Signed-off-by: Bjorn Andersson commit 620c266f394932e5decc4b34683a75dfc59dc2f4 Author: Christian Brauner Date: Fri May 24 12:19:39 2024 +0200 fhandle: relax open_by_handle_at() permission checks A current limitation of open_by_handle_at() is that it's currently not possible to use it from within containers at all because we require CAP_DAC_READ_SEARCH in the initial namespace. That's unfortunate because there are scenarios where using open_by_handle_at() from within containers. Two examples: (1) cgroupfs allows to encode cgroups to file handles and reopen them with open_by_handle_at(). (2) Fanotify allows placing filesystem watches they currently aren't usable in containers because the returned file handles cannot be used. Here's a proposal for relaxing the permission check for open_by_handle_at(). (1) Opening file handles when the caller has privileges over the filesystem (1.1) The caller has an unobstructed view of the filesystem. (1.2) The caller has permissions to follow a path to the file handle. This doesn't address the problem of opening a file handle when only a portion of a filesystem is exposed as is common in containers by e.g., bind-mounting a subtree. The proposal to solve this use-case is: (2) Opening file handles when the caller has privileges over a subtree (2.1) The caller is able to reach the file from the provided mount fd. (2.2) The caller has permissions to construct an unobstructed path to the file handle. (2.3) The caller has permissions to follow a path to the file handle. The relaxed permission checks are currently restricted to directory file handles which are what both cgroupfs and fanotify need. Handling disconnected non-directory file handles would lead to a potentially non-deterministic api. If a disconnected non-directory file handle is provided we may fail to decode a valid path that we could use for permission checking. That in itself isn't a problem as we would just return EACCES in that case. However, confusion may arise if a non-disconnected dentry ends up in the cache later and those opening the file handle would suddenly succeed. * It's potentially possible to use timing information (side-channel) to infer whether a given inode exists. I don't think that's particularly problematic. Thanks to Jann for bringing this to my attention. * An unrelated note (IOW, these are thoughts that apply to open_by_handle_at() generically and are unrelated to the changes here): Jann pointed out that we should verify whether deleted files could potentially be reopened through open_by_handle_at(). I don't think that's possible though. Another potential thing to check is whether open_by_handle_at() could be abused to open internal stuff like memfds or gpu stuff. I don't think so but I haven't had the time to completely verify this. This dates back to discussions Amir and I had quite some time ago and thanks to him for providing a lot of details around the export code and related patches! Link: https://lore.kernel.org/r/20240524-vfs-open_by_handle_at-v1-1-3d4b7d22736b@kernel.org Reviewed-by: Amir Goldstein Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit cceb16d201bb129dc019bb7df6ec746bf12b398d Author: Sumit Garg Date: Mon May 27 11:08:26 2024 +0530 arm64: dts: qcom: apq8016: Add Schneider HMIBSC board DTS Add Schneider Electric HMIBSC board DTS. The HMIBSC board is an IIoT Edge Box Core board based on the Qualcomm APQ8016E SoC. Support for Schneider Electric HMIBSC. Features: - Qualcomm Snapdragon 410C SoC - APQ8016 (4xCortex A53, Adreno 306) - 1GiB RAM - 8GiB eMMC, SD slot - WiFi and Bluetooth - 2x Host, 1x Device USB port - HDMI - Discrete TPM2 chip over SPI - USB ethernet adaptors (soldered) Co-developed-by: Jagdish Gediya Signed-off-by: Jagdish Gediya Reviewed-by: Caleb Connolly Reviewed-by: Stephan Gerhold Signed-off-by: Sumit Garg Link: https://lore.kernel.org/r/20240527053826.294526-4-sumit.garg@linaro.org Signed-off-by: Bjorn Andersson commit 6cf67a2b51edfcef998b545f8aec18b9e8cefc80 Author: Sumit Garg Date: Mon May 27 11:08:25 2024 +0530 dt-bindings: arm: qcom: Add Schneider Electric HMIBSC board Document the compatible for the Schneider Electric HMIBSC IIoT edge box core board based on the Qualcomm APQ8016E SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Sumit Garg Link: https://lore.kernel.org/r/20240527053826.294526-3-sumit.garg@linaro.org Signed-off-by: Bjorn Andersson commit 1fabbb0888c3d74366133de848228a899477aa34 Author: Sumit Garg Date: Mon May 27 11:08:24 2024 +0530 dt-bindings: vendor-prefixes: Add Schneider Electric Add vendor prefix for Schneider Electric (https://www.se.com/). Acked-by: Krzysztof Kozlowski Signed-off-by: Sumit Garg Link: https://lore.kernel.org/r/20240527053826.294526-2-sumit.garg@linaro.org Signed-off-by: Bjorn Andersson commit a40cf069ac613c0f441b9a9f42b84aa65aada8f7 Author: Dr. David Alan Gilbert Date: Sat May 4 21:44:01 2024 +0100 soc: sunxi: sram: Remove unused list 'claimed_sram' The list 'claimed_sram' seems unused, as far as I can tell it always has been. I think the 'list' member of sunxi_sram_data was intended to be used when it was on that list. Remove them. Build tested only. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240504204401.198913-1-linux@treblig.org Signed-off-by: Chen-Yu Tsai commit d3d8b80845eb51266407aa39310dab0a42b7c6ad Author: Dmitry Baryshkov Date: Mon Apr 8 03:04:34 2024 +0300 arm64: dts: qcom: msm8996: drop source clock entries from the UFS node There is no need to mention and/or to touch in any way the intermediate (source) clocks. Drop them from MSM8996 UFSHCD schema, making it follow the example lead by all other platforms. Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240408-msm8996-fix-ufs-v4-4-ee1a28bf8579@linaro.org Signed-off-by: Bjorn Andersson commit 7e35767cb7876a8109d155086bc38974467dbb67 Author: Dmitry Baryshkov Date: Mon Apr 8 03:04:32 2024 +0300 arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly Instead of setting the frequency of the interim UFS_ICE_CORE_CLK_SRC clock, set the frequency of the leaf GCC_UFS_ICE_CORE_CLK clock directly. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240408-msm8996-fix-ufs-v4-2-ee1a28bf8579@linaro.org Signed-off-by: Bjorn Andersson commit 02f838b7f8cdfb7a96b7f08e7f6716f230bdecba Author: Dmitry Baryshkov Date: Mon Apr 8 03:04:31 2024 +0300 arm64: dts: qcom: msm8996: specify UFS core_clk frequencies Follow the example of other platforms and specify core_clk frequencies in the frequency table in addition to the core_clk_src frequencies. The driver should be setting the leaf frequency instead of some interim clock freq. Suggested-by: Nitin Rawat Fixes: 57fc67ef0d35 ("arm64: dts: qcom: msm8996: Add ufs related nodes") Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240408-msm8996-fix-ufs-v4-1-ee1a28bf8579@linaro.org Signed-off-by: Bjorn Andersson commit 1b80b83f893dd69efe3c3bf84cd9f661218ccfc0 Author: Srinivas Kandagatla Date: Thu Apr 18 09:44:22 2024 +0300 arm64: dts: qcom: msm8996: add fastrpc nodes The ADSP provides fastrpc/compute capabilities. Enable support for the fastrpc on this DSP. Signed-off-by: Srinivas Kandagatla Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240418-msm8996-remoteproc-v2-3-b9ae852bf6bc@linaro.org Signed-off-by: Bjorn Andersson commit c30ff5f3aec3f77e13cfd7373390639bfdcffba7 Author: Dr. David Alan Gilbert Date: Sun May 26 21:59:22 2024 +0100 net: usb: remove unused structs 'usb_context' Both lan78xx and smsc75xx have a 'usb_context' struct which is unused, since their original commits. Remove them. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240526205922.176578-1-linux@treblig.org Signed-off-by: Paolo Abeni commit 18ae4c093cd23b741607fd35ba449f80fbd9f322 Author: Dr. David Alan Gilbert Date: Sun May 26 18:24:28 2024 +0100 net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card' 'ne2k_pci_card' is unused since 2.3.99-pre3 in March 2000. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Paolo Abeni commit ef7f9febb33d22e687226211c67aa50158a0205b Author: Dr. David Alan Gilbert Date: Sun May 26 18:24:27 2024 +0100 net: ethernet: mlx4: remove unused struct 'mlx4_port_config' 'mlx4_port_config was added by commit ab9c17a009ee ("mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet") but remained unused. Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Tariq Toukan Signed-off-by: Paolo Abeni commit a09892f6e281397fc8c4ffd512c8a0fd0a81dd32 Author: Dr. David Alan Gilbert Date: Sun May 26 18:24:26 2024 +0100 net: ethernet: liquidio: remove unused structs 'niclist' and 'oct_link_status_resp' are unused since the original commit f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters"). Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Paolo Abeni commit b2ff2698508ffc31c2dcbce58785d8b9dc847e1b Author: Dr. David Alan Gilbert Date: Sun May 26 18:24:25 2024 +0100 net: ethernet: starfire: remove unused structs 'short_rx_done_desc' and 'basic_rx_done_desc' are unused since commit fdecea66687d (" [netdrvr starfire] Add GPL'd firmware, remove compat code"). Remove them. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Paolo Abeni commit 56ae780a4387d71dd709895acd95112d01f37fb4 Author: Dmitry Baryshkov Date: Thu Apr 18 09:44:21 2024 +0300 arm64: dts: qcom: msm8996: add glink-edge nodes MSM8996 provides limited glink support, so add corresponding device tree nodes. For example the following interfaces are provided on db820c: modem: 2080000.remoteproc:glink-edge.LOOPBACK_CTL_MPSS.-1.-1 2080000.remoteproc:glink-edge.glink_ssr.-1.-1 2080000.remoteproc:glink-edge.rpmsg_chrdev.0.0 adsp: 9300000.remoteproc:glink-edge.LOOPBACK_CTL_LPASS.-1.-1 9300000.remoteproc:glink-edge.glink_ssr.-1.-1 9300000.remoteproc:glink-edge.rpmsg_chrdev.0.0 Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240418-msm8996-remoteproc-v2-2-b9ae852bf6bc@linaro.org Signed-off-by: Bjorn Andersson commit 82e0b1299a3ef81a672398c547d8e7f553be793e Author: Andrzej Hajda Date: Thu Apr 18 16:03:37 2024 +0200 drm/xe: allow unaligned start and size xe_res_cursor parameters xe_res_cursor code does not depend on the alignment. On the other side unaligned accesses are useful from pread/pwrite point of view. Signed-off-by: Andrzej Hajda Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240418-xe_res_cursor-no-align-v1-1-8df7834266c9@intel.com Signed-off-by: Nirmoy Das commit 38007fa96419a9db9719f170b9e8a7877821cdd1 Author: Andrzej Hajda Date: Wed May 22 09:27:27 2024 +0200 drm/xe: flush gtt before signalling user fence on all engines Tests show that user fence signalling requires kind of write barrier, otherwise not all writes performed by the workload will be available to userspace. It is already done for render and compute, we need it also for the rest: video, gsc, copy. v2: added gsc and copy engines, added fixes and r-b tags Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1488 Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Andrzej Hajda Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240522-xu_flush_vcs_before_ufence-v2-1-9ac3e9af0323@intel.com Signed-off-by: Nirmoy Das commit cabff60ca77da6cb460988e2af40bde95776d92b Author: Joshua Yeong Date: Wed May 15 13:02:52 2024 +0800 cache: Add StarFive StarLink cache management Add StarFive Starlink cache management driver. The driver enables RISC-V non-standard cache operation on SoC that does not support Zicbom extension instructions. Signed-off-by: Joshua Yeong Signed-off-by: Conor Dooley commit c6005d4dd216a5eb0837432511cc87c9a19c5c9e Author: Joshua Yeong Date: Wed May 15 13:02:53 2024 +0800 dt-bindings: cache: Add docs for StarFive Starlink cache controller Add DT binding documentation used by StarFive's Starlink cache controller. Signed-off-by: Joshua Yeong Reviewed-by: Rob Herring (Arm) Signed-off-by: Conor Dooley commit de31e96cf423848a1d541142446801430c12da3c Author: Gou Hao Date: Sun May 26 22:57:18 2024 +0800 net/core: move the lockdep-init of sk_callback_lock to sk_init_common() In commit cdfbabfb2f0c ("net: Work around lockdep limitation in sockets that use sockets"), it introduces 'af_kern_callback_keys' to lockdep-init of sk_callback_lock according to 'sk_kern_sock', it modifies sock_init_data() only, and sk_clone_lock() calls sk_init_common() to initialize sk_callback_lock too, so the lockdep-init of sk_callback_lock should be moved to sk_init_common(). Signed-off-by: Gou Hao Link: https://lore.kernel.org/r/20240526145718.9542-2-gouhao@uniontech.com Signed-off-by: Paolo Abeni commit c65b6521115ed478471bf8c4a3687059fcea01aa Author: Gou Hao Date: Sun May 26 22:57:17 2024 +0800 net/core: remove redundant sk_callback_lock initialization sk_callback_lock has already been initialized in sk_init_common(). Signed-off-by: Gou Hao Reviewed-by: Breno Leitao Link: https://lore.kernel.org/r/20240526145718.9542-1-gouhao@uniontech.com Signed-off-by: Paolo Abeni commit c8f0b69ca1a9117f173d014ff1eb8e708aaae6e9 Author: Jeff Johnson Date: Mon May 27 12:22:16 2024 -0700 fs: autofs: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/autofs/autofs4.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240527-md-fs-autofs-v1-1-e06db1951bd1@quicinc.com Acked-by: Al Viro Acked-by: Ian Kent Signed-off-by: Christian Brauner commit c8e0f1ec1f7c0369b404c656b0cca737a7a3bf47 Author: Jeff Johnson Date: Mon May 27 11:00:40 2024 -0700 fs: fat: add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/fat/fat.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/fat/fat_test.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240527-md-fs-fat-v1-1-b6ba7cfcb8aa@quicinc.com Acked-by: OGAWA Hirofumi Acked-by: Al Viro Signed-off-by: Christian Brauner commit 2c2a3f622e400a58cb53eac633b8102da0600102 Author: Jeff Johnson Date: Mon May 27 11:57:52 2024 -0700 fs: binfmt: add missing MODULE_DESCRIPTION() macros Fix the 'make W=1' warnings: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/binfmt_misc.o WARNING: modpost: missing MODULE_DESCRIPTION() in fs/binfmt_script.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240527-md-fs-binfmt-v1-1-f9dc1745cb67@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit 883fb1edcd8e579c1bb14eba70f63a521d0a2673 Author: Jeff Johnson Date: Mon May 27 10:55:02 2024 -0700 fs: cramfs: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/cramfs/cramfs.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240527-md-fs-cramfs-v1-1-fa697441c8c5@quicinc.com Reviewed-by: Nicolas Pitre Acked-by: Al Viro Signed-off-by: Christian Brauner commit 64656602e961fbb5f63d60f5b1e25ac832572ab4 Author: Jeff Johnson Date: Mon May 27 10:53:08 2024 -0700 fs: hfs: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/hfs/hfs.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240527-md-fs-hfs-v1-1-4be79ef7e187@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit 7cd99cea40030ac6189f6467ff3c23846dcedd3f Author: Jeff Johnson Date: Mon May 27 10:50:29 2024 -0700 fs: hpfs: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/hpfs/hpfs.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240527-md-fs-hpfs-v1-1-e0f3d8fa8385@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit d9cbd8343b010016fcaabc361c37720dcafddcbe Author: yunshui Date: Thu May 23 11:35:20 2024 +0800 bpf, net: Use DEV_STAT_INC() syzbot/KCSAN reported that races happen when multiple CPUs updating dev->stats.tx_error concurrently. Adopt SMP safe DEV_STATS_INC() to update the dev->stats fields. Reported-by: syzbot Signed-off-by: yunshui Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240523033520.4029314-1-jiangyunshui@kylinos.cn commit f7a2f03b42b742ac69058256fa8a9ffeeaaf66f7 Author: Wolfram Sang Date: Thu May 23 22:34:31 2024 +0200 arm64: defconfig: Enable Renesas R-Car Gen4 PCIe controller Enable both modes, host and endpoint. Also, enable EDMA for performance gain for the endpoint mode. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240523203431.6423-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 62545c719e26ec9f62efab7e9582deb73265b6d0 Author: Alex Bee Date: Thu May 9 16:06:51 2024 +0200 drm/rockchip: dsi: Add support for RK3128 The DesignWare MIPI DSI controller found RK3128 SoCs supports up to 4 DSI data lanes. Similar to PX30/RK356x/RV1126 it uses an external D-PHY. Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240509140653.168591-6-knaerzche@gmail.com commit 9bb3d9ad3e19f16efc34f427a58e480424c56a16 Author: Alex Bee Date: Thu May 9 16:06:47 2024 +0200 dt-bindings: display: rockchip,dw-mipi-dsi: Document RK3128 DSI Document the MIPI DSI controller for Rockchip RK3128. The integration is similar to PX30 so it's bindings-constraints can be re-used. Signed-off-by: Alex Bee Acked-by: Conor Dooley Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240509140653.168591-2-knaerzche@gmail.com commit 35c50d853adc0808996b269ec0d3bd9bcc042770 Author: Armin Wolf Date: Fri May 10 22:12:42 2024 +0200 ACPI: fan: Add hwmon support Currently, the driver does only support a custom sysfs interface to allow userspace to read the fan speed. Add support for the standard hwmon interface so users can read the fan speed with standard tools like "sensors". Reviewed-by: Andy Shevchenko Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit d8fa38997a16f6eb47d9a4413342593633de7050 Author: Jeff Johnson Date: Fri May 24 13:51:46 2024 -0700 qnx4: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/qnx4/qnx4.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240524-md-qnx4-v1-1-5ae060082e5f@quicinc.com Acked-by: Al Viro Acked-by: Anders Larsen Signed-off-by: Christian Brauner commit 495569b239762df6bebb5b292ad23d40dde3884f Author: Jeff Johnson Date: Fri May 24 13:52:52 2024 -0700 qnx6: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/qnx6/qnx6.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240524-qnx6-v1-1-cf3b9de68347@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit b5c4a798cdcae6d858d02535e4df0204e59f972d Author: Jeff Johnson Date: Fri May 24 14:11:04 2024 -0700 fs: sysv: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/sysv/sysv.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240524-md-fs-sysv-v1-1-9ebcd4f61aa5@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit de3f3951bb8e955998a01463263989b32ebd75ba Author: Jeff Johnson Date: Fri May 24 16:45:00 2024 -0700 fs: efs: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/efs/efs.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240524-md-fs-efs-v1-1-1729726e494f@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit f3c4115c12beeb075af4539f70399a35444e2493 Author: Jeff Johnson Date: Sat May 25 08:25:56 2024 -0700 fs: minix: add MODULE_DESCRIPTION() Fix the 'make W=1' warning: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/minix/minix.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240525-md-fs-minix-v1-1-824800f78f7d@quicinc.com Acked-by: Al Viro Signed-off-by: Christian Brauner commit fefa929e898cc472ca2b225552659cabfa90d4e2 Author: Wolfram Sang Date: Thu May 23 22:50:40 2024 +0200 arm64: dts: renesas: s4sk: Add aliases for I2C buses They are numbered like this in the schematics, so keep the names in Linux the same. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240523205041.7356-4-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 15a11ba906bd0156ee1fe31a871b2204d8175d63 Author: Wolfram Sang Date: Thu May 23 22:50:39 2024 +0200 arm64: dts: renesas: spider-cpu: Add aliases for I2C buses They are numbered like this in the schematics, so keep the names in Linux the same. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240523205041.7356-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit e9e6ed5a220f59a298db39b861500a6aea66e528 Author: Wolfram Sang Date: Thu May 23 22:50:38 2024 +0200 arm64: dts: renesas: white-hawk-cpu: Add aliases for I2C buses They are numbered like this in the schematics, so keep the names in Linux the same. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240523205041.7356-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 4406d43d82cd2f29dbd581833fd4aa6d467b23aa Author: Geert Uytterhoeven Date: Thu May 23 11:18:45 2024 +0200 arm64: dts: renesas: condor-i: Add I2C EEPROM The I2C EEPROM U197 on Condor is also present on Condor-I, but it was moved to the other side of the bi-directional voltage-level translator on I2C bus zero, and relabeled to U230. Move it to condor-common.dtsi to make it available on Condor-I, too. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/33a1ec9ee8fff7708f699c668d7399fde2b46553.1716455483.git.geert+renesas@glider.be commit 200cba84b6a9e6b16f5c2a61ef231b199222028b Author: Wolfram Sang Date: Wed May 15 11:18:51 2024 +0200 arm64: dts: renesas: gray-hawk-single: Add aliases for I2C buses They are numbered like this in the schematics, so keep the names in Linux the same. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240515091925.24353-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit f50e5ddc3ff66434d011b031af3cdbac3d80bd82 Author: Clément Léger Date: Mon May 13 09:25:18 2024 +0200 ARM: dts: renesas: r9a06g032: Describe GMAC1 The r9a06g032 SoC of the RZ/N1 family features two GMAC devices named GMAC1/2, that are based on Synopsys cores. GMAC1 is connected to a RGMII/RMII converter that is already described in this device tree. Signed-off-by: Clément Léger [rgantois: commit log] Reviewed-by: Geert Uytterhoeven Signed-off-by: Romain Gantois Link: https://lore.kernel.org/r/20240513-rzn1-gmac1-v7-7-6acf58b5440d@bootlin.com Signed-off-by: Geert Uytterhoeven commit b4944dc7b7935a022be7f777d5cf47e0c1becc96 Author: Niklas Söderlund Date: Sat Apr 13 16:18:06 2024 +0200 arm64: dts: renesas: white-hawk: ethernet: Describe AVB1 and AVB2 Describe the two Marvell 88Q2110/QFN40 PHYs available on the R-Car V4H White Hawk RAVB/Ethernet(1000Base-T1) sub-board. The two PHYs are wired up on the board by default, there is no need to move any resistors which are needed to access other PHYs available on this sub-board. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240413141806.300989-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit ea64761a54a25fa2c27bae99b3c72dadfaa74d3e Author: Maxime Ripard Date: Mon May 27 15:58:18 2024 +0200 drm/sun4i: hdmi: Switch to HDMI connector The new HDMI connector infrastructure allows to remove some boilerplate, especially to generate infoframes. Let's switch to it. Reviewed-by: Jernej Skrabec Acked-by: Sui Jingfeng Reviewed-by: Andy Yan Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-29-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 65548c8ff0abdf2db4dce69659eca0ab68cf08da Author: Maxime Ripard Date: Mon May 27 15:58:17 2024 +0200 drm/rockchip: inno_hdmi: Switch to HDMI connector The new HDMI connector infrastructure allows to remove some boilerplate, especially to generate infoframes. Let's switch to it. Reviewed-by: Heiko Stuebner Acked-by: Heiko Stuebner Acked-by: Andy Yan Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-28-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit b3bf19552ea3e700db4826d45aa64abc66bbefa6 Author: Maxime Ripard Date: Mon May 27 15:58:16 2024 +0200 drm/vc4: tests: Convert to plane creation helper Now that we have a plane create helper for kunit mocked drivers, let's convert to it in vc4. Reviewed-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-27-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 27e0a194a2566c376fb600e8195bdafef7519211 Author: Maxime Ripard Date: Mon May 27 15:58:15 2024 +0200 drm/vc4: tests: Remove vc4_dummy_plane structure The vc4_dummy_plane structure was introduced as a mean to add mock-specific fields. However, we never really used it and it's still strictly equivalent to vc4_plane (which is in the same situation vs drm_plane), so we can simply remove the vc4_dummy_plane structure and make the mock code cleaner. Reviewed-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-26-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit b47a72f30768ffe76e105b3e91ad7022003e8504 Author: Maxime Ripard Date: Mon May 27 15:58:14 2024 +0200 drm/vc4: hdmi: Switch to HDMI connector The new HDMI connector infrastructure allows us to remove a lot of boilerplate, so let's switch to it. Acked-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-25-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit c602e4959a0c356b3dfa9e0b8b4ad4c501df3eb4 Author: Maxime Ripard Date: Mon May 27 15:58:13 2024 +0200 drm/connector: hdmi: Create Infoframe DebugFS entries There has been some discussions recently about the infoframes sent by drivers and if they were properly generated. In parallel, there's been some interest in creating an infoframe-decode tool similar to edid-decode. Both would be much easier if we were to expose the infoframes programmed in the hardware. It won't be perfect since we have no guarantee that it's actually what goes through the wire, but it's the best we can do. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-24-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 4fa04f4cccc4d81fd6272ca94b879b4d7630ed53 Author: Maxime Ripard Date: Mon May 27 15:58:12 2024 +0200 drm/tests: Add infoframes test The previous patch added the generation of the infoframes matching an HDMI connector state. Let's add a few tests to make sure it works as expected. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-23-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit f378b77227bc4732922c57f92be89438bb1018a1 Author: Maxime Ripard Date: Mon May 27 15:58:11 2024 +0200 drm/connector: hdmi: Add Infoframes generation Infoframes in KMS is usually handled by a bunch of low-level helpers that require quite some boilerplate for drivers. This leads to discrepancies with how drivers generate them, and which are actually sent. Now that we have everything needed to generate them in the HDMI connector state, we can generate them in our common logic so that drivers can simply reuse what we precomputed. Cc: Ville Syrjälä Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-22-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 4af70f19e55904147c0515ff874204a5306ac807 Author: Maxime Ripard Date: Mon May 27 15:58:10 2024 +0200 drm/tests: Add RGB Quantization tests The previous commit added the infrastructure to the connector state to track what RGB Quantization should be used in a given state for an HDMI connector. Let's add some kunit tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-21-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 027d435906490812d4568ff371a8b63c24a36bcd Author: Maxime Ripard Date: Mon May 27 15:58:09 2024 +0200 drm/connector: hdmi: Add RGB Quantization Range to the connector state HDMI controller drivers will need to figure out the RGB range they need to configure based on a mode and property values. Let's expose that in the HDMI connector state so drivers can just use that value. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-20-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 73af58c1b441701a740b9157123b2ffd14aa3e0d Author: Maxime Ripard Date: Mon May 27 15:58:08 2024 +0200 drm/tests: Add tests for Broadcast RGB property This had a bunch of kunit tests to make sure our code to handle the Broadcast RGB property behaves properly. This requires bringing a bit of infrastructure to create mock HDMI connectors, with custom EDIDs. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-19-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit ab52af4ba7c7dc2e226ede5935a0587743b747d3 Author: Maxime Ripard Date: Mon May 27 15:58:07 2024 +0200 drm/connector: hdmi: Add Broadcast RGB property The i915 driver has a property to force the RGB range of an HDMI output. The vc4 driver then implemented the same property with the same semantics. KWin has support for it, and a PR for mutter is also there to support it. Both drivers implementing the same property with the same semantics, plus the userspace having support for it, is proof enough that it's pretty much a de-facto standard now and we can provide helpers for it. Let's plumb it into the newly created HDMI connector. Reviewed-by: Dave Stevenson Acked-by: Pekka Paalanen Reviewed-by: Sebastian Wick Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-18-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 10af38d9e7d2537aa08a4d04ca3a903b16a300c3 Author: Maxime Ripard Date: Mon May 27 15:58:06 2024 +0200 drm/doc: Remove unused Broadcast RGB Property The Broadcast RGB property has been documented as three separate entries so far, each with a different set of values. The first one is pretty much the generic one: it's used by i915 and vc4, and is the one used by all the compositors. The second one is used by the gma500 driver, and is a subset of the first one: it can have the values "Full" or "Limited 16:235", but lack the "Automatic" value. The third one however isn't used by any driver and documents the values "off", "auto" and "on". It's unclear where the last one comes from. It was first documented in commit 6c6a3996f2c5 ("Documentation: drm: describing drm properties exposed by various drivers") which adds a number of properties used by drivers, but without mentioning which driver was using what property. Grepping at the 6c6a3996f2c5 commit however, it looks like no driver is actually using it, and a quick look at the entire kernel history doesn't show any match either. At the time though, gma500 had an "audio" property used right next to Broadcast RGB that did have the "off", "auto" and "on" values in the same order. As such, it was probably a copy/paste or scripting error back then, and there's never been such property used in the kernel. Either way, it certainly hasn't been used in a decade or two so we can just get rid of it. Suggested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-17-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 945f516ed3468bef72f0da7c84a64a95c0ad28eb Author: Maxime Ripard Date: Mon May 27 15:58:05 2024 +0200 drm/tests: Add HDMI connector bpc and format tests The previous patch added the bpc and format an HDMI connector needs to be set up with for a given connector state. Let's add a few tests to make sure it works as expected. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-16-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 26ff1c38fc29ec5eb51c84cfeda1bc3e27de3c13 Author: Maxime Ripard Date: Mon May 27 15:58:04 2024 +0200 drm/connector: hdmi: Compute bpc and format automatically Now that we have all the infrastructure needed, we can add some code that will, for a given connector state and mode, compute the best output format and bpc. The algorithm is equivalent to the one already found in i915 and vc4. Cc: Ville Syrjälä Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-15-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit a6cb58a2c13b931743d83404b6ad798c32280586 Author: Maxime Ripard Date: Mon May 27 15:58:03 2024 +0200 drm/tests: Add HDMI connector rate filter hook tests The previous patch adds a new hook for HDMI connectors to filter out configurations based on the TMDS character rate. Let's add some tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-14-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit e5030a74f976b4e808e28e78805c87203ac1a48d Author: Maxime Ripard Date: Mon May 27 15:58:02 2024 +0200 drm/connector: hdmi: Add custom hook to filter TMDS character rate Most of the HDMI controllers have an upper TMDS character rate limit they can't exceed. On "embedded"-grade display controllers, it will typically be lower than what high-grade monitors can provide these days, so drivers will filter the TMDS character rate based on the controller capabilities. To make that easier to handle for drivers, let's provide an optional hook to be implemented by drivers so they can tell the HDMI controller helpers if a given TMDS character rate is reachable for them or not. This will then be useful to figure out the best format and bpc count for a given mode. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-13-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 62eea520755e867aac35e087634ac40ad54d3201 Author: Maxime Ripard Date: Mon May 27 15:58:01 2024 +0200 drm/tests: Add TDMS character rate connector state tests The previous patch stores in the connector state the expected TMDS character rate matching the configuration of the HDMI connector. Let's add a few tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-12-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit f035f4097f1e0a35a457b72427bb0c06ca0c81c4 Author: Maxime Ripard Date: Mon May 27 15:58:00 2024 +0200 drm/connector: hdmi: Calculate TMDS character rate Most HDMI drivers have some code to calculate the TMDS character rate, usually to adjust an internal clock to match what the mode requires. Since the TMDS character rates mostly depends on the resolution, whether we need to repeat pixels or not, the bpc count and the format, we can now derive it from the HDMI connector state that stores all those infos and remove the duplication from drivers. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-11-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit abb6f74973e20956d42e8227dde6fb4e92502c14 Author: Maxime Ripard Date: Mon May 27 15:57:59 2024 +0200 drm/tests: Add HDMI TDMS character rate tests The previous patch added an helper to compute the TMDS character rate on an HDMI connector. Let's add a few tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-10-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 40167bcbd19c241fc30a912fa8a8276b9ed1a12e Author: Maxime Ripard Date: Mon May 27 15:57:58 2024 +0200 drm/display: hdmi: Add HDMI compute clock helper A lot of HDMI drivers have some variation of the formula to calculate the TMDS character rate from a mode, but few of them actually take all parameters into account. Let's create a helper to provide that rate taking all parameters into account. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-9-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 08eeaa134e1d801e2d935c16b9200535bd580b8a Author: Maxime Ripard Date: Mon May 27 15:57:57 2024 +0200 drm/tests: Add output formats tests Now that we track the HDMI output format as part of the connector state, let's add a few tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-8-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 948f01d5e5595023c2e7cfc0184a322be00ef214 Author: Maxime Ripard Date: Mon May 27 15:57:56 2024 +0200 drm/connector: hdmi: Add support for output format Just like BPC, we'll add support for automatic selection of the output format for HDMI connectors. Let's add the needed defaults and fields for now. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-7-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit eb66d34d793ed48494820ce908c8c821b8e6cae5 Author: Maxime Ripard Date: Mon May 27 15:57:55 2024 +0200 drm/tests: Add output bpc tests Now that we're tracking the output bpc count in the connector state, let's add a few tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-6-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit c34474b48cf12ee806132c269ccba1395b10f724 Author: Jani Nikula Date: Mon May 27 14:10:53 2024 +0300 drm/i915: pass dev_priv explicitly to ADL_TVIDEO_DIP_AS_SDP_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the ADL_TVIDEO_DIP_AS_SDP_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/75a4f817f7c73277b2b8021275ccb9a4f3716953.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit b31a97af9f6c37fda9aceebeaf2ddb486479c6bb Author: Jani Nikula Date: Mon May 27 14:10:52 2024 +0300 drm/i915: pass dev_priv explicitly to ICL_VIDEO_DIP_PPS_ECC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the ICL_VIDEO_DIP_PPS_ECC register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/620fd2da6eea334bf9a5d1b93717ca1176c4203e.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a154f9ae877751f4ba2c81a5fd0fa1dea500ba31 Author: Jani Nikula Date: Mon May 27 14:10:51 2024 +0300 drm/i915: pass dev_priv explicitly to ICL_VIDEO_DIP_PPS_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the ICL_VIDEO_DIP_PPS_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/fb7c308dd655d1bc4af44ab9c88b5f5245d8a5d6.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit cf8361def4f6c09063061da945ddf560c54ac693 Author: Jani Nikula Date: Mon May 27 14:10:50 2024 +0300 drm/i915: pass dev_priv explicitly to GLK_TVIDEO_DIP_DRM_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the GLK_TVIDEO_DIP_DRM_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/bab2d0385b748c34bec262afaf491be881990033.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5159e72a930ee647d5addd709d4a1592b74cf535 Author: Jani Nikula Date: Mon May 27 14:10:49 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_VSC_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_VSC_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/2f0ed82eb9c759feb3978e38f3b2835f359d6d1f.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5c99db622a12ad915a0e4ce201de8aaac06ac3eb Author: Jani Nikula Date: Mon May 27 14:10:48 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_GMP_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_GMP_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/fff766dca0e790a801fb7d1ad78980da69d3b9f7.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 16645d59b9074bed42cd9d2eef5e17e687258762 Author: Jani Nikula Date: Mon May 27 14:10:47 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_SPD_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_SPD_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/97412857f7580994ea9c9c0c8f5f778261f7e71b.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0f1fe26137f12f9208bf2e0bed6b84def1f9c82a Author: Jani Nikula Date: Mon May 27 14:10:46 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_VS_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_VS_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/6f676d9b2bce0d4911e888c5efeacaddef98579c.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7e6e5519bb998acdf8bc755718ff4980a8e3be6d Author: Jani Nikula Date: Mon May 27 14:10:45 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_AVI_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_AVI_DATA register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/113e40bf4d42a38c1be09a7ce0159dc828356ebc.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 093acd131600ebf3d581a55ec0f20269abc8f588 Author: Jani Nikula Date: Mon May 27 14:10:44 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_GCP Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_GCP register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/36f0b90f07c7aa78e88fadb375359df39ecd0a77.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit cc13f2937725cf0c5fb67008959125d42da3fb80 Author: Jani Nikula Date: Mon May 27 14:10:43 2024 +0300 drm/i915: pass dev_priv explicitly to HSW_TVIDEO_DIP_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the HSW_TVIDEO_DIP_CTL register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/7261777d02eeb94093ed3510989c6809c66d50da.1716808214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c6d219fb0335e6a37a4a2a29fb4a537329823c83 Author: Maxime Ripard Date: Mon May 27 15:57:54 2024 +0200 drm/mode_object: Export drm_mode_obj_find_prop_id for tests We'll need to use drm_mode_obj_find_prop_id() for kunit tests to make sure a given property has been properly created. Let's export it for tests only. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-5-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit aadb3e16b8f30cc1c1efdfe162f400e026385bfb Author: Maxime Ripard Date: Mon May 27 15:57:53 2024 +0200 drm/connector: hdmi: Add output BPC to the connector state We'll add automatic selection of the output BPC in a following patch, but let's add it to the HDMI connector state already. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-4-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 54cb39e2293b1e221708d3ac157ecc59086e1b46 Author: Maxime Ripard Date: Mon May 27 15:57:52 2024 +0200 drm/connector: hdmi: Create an HDMI sub-state The next features we will need to share across drivers will need to store some parameters for drivers to use, such as the selected output format. Let's create a new connector sub-state dedicated to HDMI controllers, that will eventually store everything we need. Reviewed-by: Dave Stevenson Reviewed-by: Sui Jingfeng Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-3-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 68aaa74da5b44dbc742742057964cf25b2b6add0 Author: Maxime Ripard Date: Mon May 27 15:57:51 2024 +0200 drm/tests: connector: Add tests for drmm_connector_hdmi_init We just introduced a new initialization function for our connectors, so let's build a kunit test suite for it as well. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-2-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 582d79f34330db4ccee85620cf95ee7ccb9a0d01 Author: Maxime Ripard Date: Mon May 27 15:57:50 2024 +0200 drm/connector: Introduce an HDMI connector initialization function A lot of the various HDMI drivers duplicate some logic that depends on the HDMI spec itself and not really a particular hardware implementation. Output BPC or format selection, infoframe generation are good examples of such areas. This creates a lot of boilerplate, with a lot of variations, which makes it hard for userspace to rely on, and makes it difficult to get it right for drivers. In the next patches, we'll add a lot of infrastructure around the drm_connector and drm_connector_state structures, which will allow to abstract away the duplicated logic. This infrastructure comes with a few requirements though, and thus we need a new initialization function. Hopefully, this will make drivers simpler to handle, and their behaviour more consistent. Reviewed-by: Dave Stevenson Reviewed-by: Sui Jingfeng Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-1-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard commit 54bf0c27380b95a220b94ea835b5e8bf58baded9 Author: Niklas Söderlund Date: Sat Apr 13 16:18:05 2024 +0200 arm64: dts: renesas: r8a779g0: Use MDIO node for all AVB devices Switch from defining the PHY inside the AVB node itself and create a dedicated MDIO node for AVB0, the only AVB describing a PHY. This is needed as adding PHYs to AVB1 and AVB2 will require setting MDIO bus parameters and thus requires a dedicated node. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240413141806.300989-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit c45c3f5f9593915da78cda923e7163a8d00db60c Author: Peng Fan Date: Sat May 4 21:20:05 2024 +0800 pinctrl: renesas: Use scope based of_node_put() cleanups Use scope based of_node_put() cleanup to simplify code. Signed-off-by: Peng Fan Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240504-pinctrl-cleanup-v2-7-26c5f2dc1181@nxp.com Signed-off-by: Geert Uytterhoeven commit b758cd8057e9f982498efd73b3176987e996e5de Author: Jani Nikula Date: Mon May 27 13:42:02 2024 +0300 drm/i915: pass dev_priv explicitly to PP_DIVISOR Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PP_DIVISOR register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/28e9f7e3570c15ac5c229048ec0def2e4a667ffc.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 07776fb3c8b37a45a106cc501423ff9e8521ace5 Author: Jani Nikula Date: Mon May 27 13:42:01 2024 +0300 drm/i915: pass dev_priv explicitly to PP_OFF_DELAYS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PP_OFF_DELAYS register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/122e143ff6a1c1016534dae0ba28fde0b15e3e76.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit dc368a87457abf53178af774852b5a839efabf4a Author: Jani Nikula Date: Mon May 27 13:42:00 2024 +0300 drm/i915: pass dev_priv explicitly to PP_ON_DELAYS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PP_ON_DELAYS register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/0fc707fde15bc11893b6e1d5038162368e3a2b8d.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit de49b912d2adfe5447c978036aeed1ccb6fe1db0 Author: Jani Nikula Date: Mon May 27 13:41:59 2024 +0300 drm/i915: pass dev_priv explicitly to PP_CONTROL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PP_CONTROL register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/01024887af682d4c9ddfb440af98284c44422df7.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit fdc97fdc0469583e7960a5b6acc4de9ed1f595e6 Author: Jani Nikula Date: Mon May 27 13:41:58 2024 +0300 drm/i915: pass dev_priv explicitly to PP_STATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PP_STATUS register macro. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/7b76be10723f36d6e1b45be76d112a4b178ef493.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 92cd5d046a96870abb0e9ad9922891066b5e5fb9 Author: Jani Nikula Date: Mon May 27 13:41:57 2024 +0300 drm/i915: pass dev_priv explicitly to _MMIO_PPS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the _MMIO_PPS register macro. While at it, use __to_intel_display() to allow passing in struct intel_display at a later time. Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/1e9f3ef7eee65946c0e6bf06cc2547a38e8dab78.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 26771100519af263e3b04b635bc917f8dfbdb77c Author: Lad Prabhakar Date: Tue Apr 23 18:58:48 2024 +0100 dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Remove the check from the object Drop the bogus check from object as this didn't really add restriction check. Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240423175900.702640-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a0a44d9175b349df2462089140fb7f292100bd7c Author: Vlastimil Babka Date: Mon May 27 11:01:28 2024 +0200 mm, slab: don't wrap internal functions with alloc_hooks() The functions __kmalloc_noprof(), kmalloc_large_noprof(), kmalloc_trace_noprof() and their _node variants are all internal to the implementations of kmalloc_noprof() and kmalloc_node_noprof() and are only declared in the "public" slab.h and exported so that those implementations can be static inline and distinguish the build-time constant size variants. The only other users for some of the internal functions are slub_kunit and fortify_kunit tests which make very short-lived allocations. Therefore we can stop wrapping them with the alloc_hooks() macro. Instead add a __ prefix to all of them and a comment documenting these as internal. Also rename __kmalloc_trace() to __kmalloc_cache() which is more descriptive - it is a variant of __kmalloc() where the exact kmalloc cache has been already determined. The usage in fortify_kunit can be removed completely, as the internal functions should be tested already through kmalloc() tests in the test variant that passes non-constant allocation size. Reported-by: Kent Overstreet Cc: Suren Baghdasaryan Cc: Kees Cook Reviewed-by: Kent Overstreet Acked-by: David Rientjes Signed-off-by: Vlastimil Babka commit 10e0a8f83294ab997c4af0af4b80908cd52ca4b5 Author: Yang Li Date: Fri May 24 17:20:37 2024 +0800 cpufreq: longhaul: Fix kernel-doc param for longhaul_setstate The patch updates the function documentation comment for longhaul_setstate to adhere to the kernel-doc specification. Signed-off-by: Yang Li Signed-off-by: Viresh Kumar commit d86a2f0800683652004490c590b4b96a63e7fc04 Author: Viresh Kumar Date: Tue May 28 10:58:37 2024 +0530 OPP: Fix missing cleanup on error in _opp_attach_genpd() A recent commit updated the code mistakenly to return directly on errors, without doing the required cleanups. Fix it. Fixes: 2a56c462fe5a ("OPP: Fix required_opp_tables for multiple genpds using same table") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202405180016.4fbn86bm-lkp@intel.com/ Signed-off-by: Viresh Kumar commit 9e697efe5f99ed793ec1d23a1c3467d7dc5863db Author: Javier Carrasco Date: Thu May 23 23:25:00 2024 +0200 cpufreq: qcom-nvmem: eliminate uses of of_node_put() Make use of the __free() macro to automate memory deallocation when the existing device nodes get out of scope, removing the need for of_node_put() and therefore increasing code safety if more error paths are added to the driver, which could miss the required of_node_put() as it already occurred with commit '57f2f8b4aa0c ("cpufreq: qcom: Refactor the driver to make it easier to extend")'. Signed-off-by: Javier Carrasco Signed-off-by: Viresh Kumar commit d01c84b97f19f1137211e90b0a910289a560019e Author: Javier Carrasco Date: Thu May 23 23:24:59 2024 +0200 cpufreq: qcom-nvmem: fix memory leaks in probe error paths The code refactoring added new error paths between the np device node allocation and the call to of_node_put(), which leads to memory leaks if any of those errors occur. Add the missing of_node_put() in the error paths that require it. Cc: stable@vger.kernel.org Fixes: 57f2f8b4aa0c ("cpufreq: qcom: Refactor the driver to make it easier to extend") Signed-off-by: Javier Carrasco Signed-off-by: Viresh Kumar commit 6f47c7ae8c7afaf9ad291d39f0d3974f191a7946 Merge: 832f54c9ccd3a a38297e3fb012 Author: Dmitry Torokhov Date: Mon May 27 21:37:18 2024 -0700 Merge tag 'v6.9' into next Sync up with the mainline to bring in the new cleanup API. commit 074cffb5020ddcaa5fafcc55655e5da6ebe8c831 Author: Jagadeesh Kona Date: Mon May 20 12:07:32 2024 +0530 cpufreq: scmi: Avoid overflow of target_freq in fast switch Conversion of target_freq to HZ in scmi_cpufreq_fast_switch() can lead to overflow if the multiplied result is greater than UINT_MAX, since type of target_freq is unsigned int. Avoid this overflow by assigning target_freq to unsigned long variable for converting it to HZ. Signed-off-by: Jagadeesh Kona Signed-off-by: Viresh Kumar commit fa8036e5fed21d871aef23092990bfbaddc521d5 Author: Javier Carrasco Date: Fri May 3 19:52:33 2024 +0200 cpufreq: sun50i: replace of_node_put() with automatic cleanup handler Make use of the __free() cleanup handler to automatically free nodes when they get out of scope. Signed-off-by: Javier Carrasco Reviewed-by: Andre Przywara Signed-off-by: Viresh Kumar commit 6282fba6abd7c3c8896c239cc8aa9ec45edcb97b Author: Javier Carrasco Date: Fri May 3 19:52:32 2024 +0200 cpufreq: sun50i: fix memory leak in dt_has_supported_hw() The for_each_child_of_node() loop does not decrement the child node refcount before the break instruction, even though the node is no longer required. This can be avoided with the new for_each_child_of_node_scoped() macro that removes the need for any of_node_put(). Fixes: fa5aec9561cf ("cpufreq: sun50i: Add support for opp_supported_hw") Signed-off-by: Javier Carrasco Reviewed-by: Andre Przywara Signed-off-by: Viresh Kumar commit ee6817e72d4e690b65ce0f77f406ed1a1ac5b5c2 Author: Matthew Wilcox (Oracle) Date: Sat Apr 20 03:50:00 2024 +0100 jfs: Remove use of folio error flag Store the blk_status per folio (if we can have multiple metapages per folio) instead of setting the folio error flag. This will allow us to reclaim a precious folio flag shortly. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 3fefd9b594aa6be9f120733f5bb57b07d47871a9 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:57 2024 +0100 fs: Remove i_blocks_per_page The last caller has been converted to i_blocks_per_folio() so we can remove this wrapper. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit ad6c19e5f9323a2e6c6d1316e53f71f305a6a60f Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:56 2024 +0100 jfs: Change metapage->page to metapage->folio Convert all the users to operate on a folio. Saves sixteen calls to compound_head(). We still use sizeof(struct page) in print_hex_dump, otherwise it will go into the second and third pages of the folio which won't exist for jfs folios (since they are not large). This needs a better solution, but finding it can be postponed. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 1252ad136e1680284c6313156d81d39bc38354c6 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:55 2024 +0100 jfs: Convert force_metapage to use a folio Convert the mp->page to a folio and operate on it. That lets us convert metapage_write_one() to take a folio. Replaces five calls to compound_head() with one. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit d9c36002d015e49df77cc5dc733f09beaa32765e Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:54 2024 +0100 jfs: Convert inc_io to take a folio All their callers now have a folio, so pass it in. Remove mp_anchor() as inc_io() was the last user. No savings here, just cleaning up some remnants. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 501bb988774b38cfe41783aed53d8890c87f1b1e Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:53 2024 +0100 jfs: Convert page_to_mp to folio_to_mp Access folio->private directly instead of testing the page private flag. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit f86a3a182483f2c3ec4d83b8d972da8f74882a42 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:52 2024 +0100 jfs; Convert __invalidate_metapages to use a folio Retrieve a folio from the page cache instead of a page. Saves a couple of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 1f0dc610da985673dd5fc4243f20751eb2df66a7 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:51 2024 +0100 jfs: Convert dec_io to take a folio This means also converting the two handlers to take a folio. Saves four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 5233a55a5254ea38dcdd8d836a0f9ee886c3df51 Author: Dr. David Alan Gilbert Date: Thu May 23 16:59:22 2024 +0100 mISDN: remove unused struct 'bf_ctx' 'bf_ctx' appears unused since the original commit 960366cf8dbb ("Add mISDN DSP"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20240523155922.67329-1-linux@treblig.org Signed-off-by: Jakub Kicinski commit adeb5d2a4ba47910238b3c4f5fd960cc0c26a98b Author: Jonas Karlman Date: Tue May 21 21:22:43 2024 +0000 arm64: dts: rockchip: Add Radxa ROCK S0 Radxa ROCK S0 is a single-board computer based on the Rockchip RK3308B SoC in an ultra-compact form factor. Add initial support for eMMC, SD-card, Ethernet, WiFi/BT and USB. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521212247.1240226-3-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 768dfd7b49a24b02f1422bf8e2270bcdccea16b9 Author: Jonas Karlman Date: Tue May 21 21:22:42 2024 +0000 dt-bindings: arm: rockchip: Add Radxa ROCK S0 Add devicetree binding for the Radxa ROCK S0 board. Radxa ROCK S0 is a single-board computer based on the Rockchip RK3308B SoC in an ultra-compact form factor. Signed-off-by: Jonas Karlman Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240521212247.1240226-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 12c3ec878cbe3709782e85b88124abecc3bb8617 Author: Jonas Karlman Date: Tue May 21 21:10:16 2024 +0000 arm64: dts: rockchip: Update WIFi/BT related nodes on rk3308-rock-pi-s Update WiFi SDIO and BT UART related props to better reflect details about the optional onboard RTL8723DS WiFi/BT module. Also correct the compatible used for bluetooth to match the WiFi/BT module used on the board. Fixes: bc3753aed81f ("arm64: dts: rockchip: rock-pi-s add more peripherals") Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-14-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 100b3bdee6035192f6d4a1847970fe004bb505fb Author: Jonas Karlman Date: Tue May 21 21:10:15 2024 +0000 arm64: dts: rockchip: Add io-domains to rk3308-rock-pi-s The VCCIO4 io-domain used for WiFi/BT is using 1v8 IO signal voltage. Add io-domains node with the VCCIO supplies connected on the board. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-13-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit d1829ba469d5743734e37d59fece73e3668ab084 Author: Jonas Karlman Date: Tue May 21 21:10:14 2024 +0000 arm64: dts: rockchip: Add rk3308 IO voltage domains Add a disabled RK3308 IO voltage domains node to SoC DT. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-12-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 36d3bbc8cdbef2f83391f7708888265ac4c37a99 Author: Jonas Karlman Date: Tue May 21 21:10:11 2024 +0000 arm64: dts: rockchip: Add OTP device node for RK3308 The RK3308 SoC contains a controller for one-time-programmable memory, add a device node for it. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-9-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 4b64ed510ed946a4e4ca6d51d6512bf5361f6a04 Author: Jonas Karlman Date: Tue May 21 21:10:10 2024 +0000 arm64: dts: rockchip: Add mdio and ethernet-phy nodes to rk3308-rock-pi-s Be explicit about the Ethernet port and define mdio and ethernet-phy nodes in the device tree for ROCK Pi S. Fixes: bc3753aed81f ("arm64: dts: rockchip: rock-pi-s add more peripherals") Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-8-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 7affb86ef62581e3475ce3e0a7640da1f2ee29f8 Author: Jonas Karlman Date: Tue May 21 21:10:08 2024 +0000 arm64: dts: rockchip: Add pinctrl for UART0 to rk3308-rock-pi-s UAR0 CTS/RTS is not wired to any pin and is not used for the default serial console use of UART0 on ROCK Pi S. Override the SoC defined pinctrl props to limit configuration of the two xfer pins wired to one of the GPIO pin headers. Fixes: 2e04c25b1320 ("arm64: dts: rockchip: add ROCK Pi S DTS support") Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-6-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit fc0daeccc384233eadfa9d5ddbd00159653c6bdc Author: Jonas Karlman Date: Tue May 21 21:10:07 2024 +0000 arm64: dts: rockchip: Add sdmmc related properties on rk3308-rock-pi-s Add cap-mmc-highspeed to allow use of high speed MMC mode using an eMMC to uSD board. Use disable-wp to signal that no physical write-protect line is present. Also add vcc_io used for card and IO line power as vmmc-supply. Fixes: 2e04c25b1320 ("arm64: dts: rockchip: add ROCK Pi S DTS support") Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521211029.1236094-5-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 1a5c8d307c83c808a32686ed51afb4bac2092d39 Author: Jonas Karlman Date: Tue May 21 20:28:05 2024 +0000 arm64: dts: rockchip: Add Radxa ZERO 3W/3E The Radxa ZERO 3W/3E is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor and rich interfaces. The ZERO 3W and ZERO 3E are basically the same size and model, but differ only in storage and network interfaces. - eMMC (3W) - SD-card (both) - Ethernet (3E) - WiFi/BT (3W) Add initial support for eMMC, SD-card, Ethernet, HDMI and USB. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20240521202810.1225636-3-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit ad986e45ada999d67bb47ec8a0316fc931927c21 Author: Jonas Karlman Date: Tue May 21 20:28:04 2024 +0000 dt-bindings: arm: rockchip: Add Radxa ZERO 3W/3E Add devicetree binding documentation for Radxa ZERO 3W/3E boards. The Radxa ZERO 3W/3E is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor and rich interfaces. Signed-off-by: Jonas Karlman Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240521202810.1225636-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 1bbf5a2156fa246ab54a15412116458006462038 Author: Andy Shevchenko Date: Tue Apr 9 19:03:14 2024 +0300 auxdisplay: charlcd: Provide a forward declaration While there is no compilation error, strictly speaking the compiler should know about used types beforehand. Provide a forward declaration for struct charlcd_ops before using it in struct charlcd. Signed-off-by: Andy Shevchenko commit ce62827bc294ba5f8b3909bfa5d7dbf9de8aab6b Author: Umesh Nerlige Ramappa Date: Fri May 24 16:47:44 2024 -0700 drm/xe: Do not access xe file when updating exec queue run_ticks The current code is running into a use after free case where xe file is closed before the exec queue run_ticks can be updated. This is occurring in the xe_file_close path. To fix that, do not access xe file when updating the exec queue run_ticks. Instead store the exec queue run_ticks locally in the exec queue object and accumulate it when the user dumps the drm client stats. We know that the xe file is valid when user is dumping the run_ticks for the drm client, so this effectively removes the dependency on xe file object in xe_exec_queue_update_run_ticks(). v2: - Fix the accumulation of q->run_ticks delta into xe file run_ticks - s/runtime/run_ticks/ (Rodrigo) Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1908 Fixes: 6109f24f87d7 ("drm/xe: Add helper to accumulate exec queue runtime") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240524234744.1352543-2-umesh.nerlige.ramappa@intel.com commit 45bb564de0a6f87e9f502ceb4ff4d9f936365c85 Author: Umesh Nerlige Ramappa Date: Fri May 24 16:47:43 2024 -0700 drm/xe: Use run_ticks instead of runtime for client stats Note that runtime is also used in the pm context, so it is confusing to use the same name to denote run time of the drm client. Use a more appropriate name for the client utilization. While at it, drop the incorrect multi-lrc comment in the helper description v2: s/show_runtime/show_run_ticks/ (Rodrigo) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240524234744.1352543-1-umesh.nerlige.ramappa@intel.com commit 50e52592fbe791d96ec2cb431d158cc6bc495be5 Author: Thomas Hellström Date: Mon May 27 15:59:12 2024 +0200 drm/xe: Move job creation out of the struct xe_migrate::job_mutex In order to be able to run gpu jobs from reclaim context, move job creation (where allocation takes place) out of the struct xe_migrate::job_mutex, and prime that mutex as reclaim tainted. Jobs that may need to run from reclaim context include CCS metadata extraction at shrinking time. Signed-off-by: Thomas Hellström Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240527135912.152156-6-thomas.hellstrom@linux.intel.com commit 577b83b0f45f7b36d734708f5cad8b35e21ffb7d Author: Thomas Hellström Date: Mon May 27 15:59:11 2024 +0200 drm/xe: Remove xe_lrc_create_seqno_fence() It's not used anymore. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240527135912.152156-5-thomas.hellstrom@linux.intel.com commit 0ac7a2c745e8a42803378b944fa0f4455b7240f6 Author: Thomas Hellström Date: Mon May 27 15:59:10 2024 +0200 drm/xe: Don't initialize fences at xe_sched_job_create() Pre-allocate but don't initialize fences at xe_sched_job_create(), and initialize / arm them instead at xe_sched_job_arm(). This makes it possible to move xe_sched_job_create() with its memory allocation out of any lock that is required for fence initialization, and that may not allow memory allocation under it. Replaces the struct dma_fence_array for parallell jobs with a struct dma_fence_chain, since the former doesn't allow a split-up between allocation and initialization. v2: - Rebase. - Don't always use the first lrc when initializing parallel lrc fences. - Use dma_fence_chain_contained() to access the lrc fences. v4: - Add an assert that job->lrc_seqno == fence->seqno. (Matthew Brost) Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20240527135912.152156-4-thomas.hellstrom@linux.intel.com commit e183910ae4015214475b3248ce0b4c70f104f254 Author: Thomas Hellström Date: Mon May 27 15:59:09 2024 +0200 drm/xe: Split lrc seqno fence creation up Since sometimes a lock is required to initialize a seqno fence, and it might be desirable not to hold that lock while performing memory allocations, split the lrc seqno fence creation up into an allocation phase and an initialization phase. Since lrc seqno fences under the hood are hw_fences, do the same for these and remove the xe_hw_fence_create() function since it is not used anymore. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240527135912.152156-3-thomas.hellstrom@linux.intel.com commit 08f7200899ca72dec550af092ae424b7db099abd Author: Matthew Brost Date: Mon May 27 15:59:08 2024 +0200 drm/xe: Decouple job seqno and lrc seqno Tightly coupling these seqno presents problems if alternative fences for jobs are used. Decouple these for correctness. v2: - Slightly reword commit message (Thomas) - Make sure the lrc fence ops are used in comparison (Thomas) - Assume seqno is unsigned rather than signed in format string (Thomas) Cc: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240527135912.152156-2-thomas.hellstrom@linux.intel.com commit e6d33c8b2f8063e1f195cfc0e7f1c9e21066d13b Author: Gabor Juhos Date: Tue Mar 26 15:52:28 2024 +0100 arm64: dts: qcom: add TP-Link Archer AX55 v1 Add device tree source for the TP-Link Archer AX55 v1 [1] which is a dual-band WiFi router based on the IPQ5018 SoC. At the moment, only the UART, the GPIO LEDs and buttons are usable, but it makes it possible to boot an initramfs image on the device. The device tree can be extended in the future, once support for other periherals will be available for the platform. 1. https://www.tp-link.com/en/home-networking/wifi-router/archer-ax55/v1/ Signed-off-by: Gabor Juhos Link: https://lore.kernel.org/r/20240326-archer-ax55-v1-v4-2-dc5b54a4bb00@gmail.com Signed-off-by: Bjorn Andersson commit 5c59666c443d730991ddbe46b098dc473cf56a55 Author: Gabor Juhos Date: Tue Mar 26 15:52:27 2024 +0100 dt-bindings: arm: qcom: add TP-Link Archer AX55 v1 Document the TP-Link Archer AX55 v1 which is a dual-band WiFi router based on the IPQ5018 SoC. Signed-off-by: Gabor Juhos Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240326-archer-ax55-v1-v4-1-dc5b54a4bb00@gmail.com Signed-off-by: Bjorn Andersson commit 14ef045bbd27430dc92c8b4613caaf41e82f47e0 Author: Kathiravan Thirumoorthy Date: Mon Mar 25 21:19:50 2024 +0530 cpufreq: qcom-nvmem: add support for IPQ5321 Like all other SoCs in IPQ5332 family, cpufreq for IPQ5321 is also determined by the eFuse, with the maximum limit of 1.1GHz. Add support for the same. Acked-by: Viresh Kumar Reviewed-by: Mukesh Ojha Signed-off-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20240325-ipq5321-sku-support-v2-3-f30ce244732f@quicinc.com Signed-off-by: Bjorn Andersson commit 8ddfb4a8e093689859184abf52fe15cd2523c6b9 Author: Kathiravan Thirumoorthy Date: Mon Mar 25 21:19:49 2024 +0530 soc: qcom: socinfo: Add SoC ID for IPQ5321 Add the SoC ID for IPQ5321, which belong to the family of IPQ5332 SoC. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Mukesh Ojha Signed-off-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20240325-ipq5321-sku-support-v2-2-f30ce244732f@quicinc.com Signed-off-by: Bjorn Andersson commit 27c42e925323b975a64429e313b0cf5c0c02a411 Author: Kathiravan Thirumoorthy Date: Mon Mar 25 21:19:48 2024 +0530 dt-bindings: arm: qcom,ids: Add SoC ID for IPQ5321 Add the ID for the Qualcomm IPQ5321 SoC. Acked-by: Krzysztof Kozlowski Reviewed-by: Mukesh Ojha Signed-off-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20240325-ipq5321-sku-support-v2-1-f30ce244732f@quicinc.com Signed-off-by: Bjorn Andersson commit b4f6c63bf34d8da1b769483bb1f4a603c53896ce Author: Adam Honse Date: Thu Mar 14 20:00:15 2024 +0100 ARM: dts: qcom: msm8974: Add Samsung Galaxy Note 3 Add the devicetree for this "phablet" using the Snapdragon 800 SoC. Signed-off-by: Adam Honse [luca@z3ntu.xyz: clean up, prepare for upstream] Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240314-samsung-hlte-v2-2-84094b41c033@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 16babb0567e4c1c1eea0c1e5c86d5e2904b569c9 Author: Luca Weiss Date: Thu Mar 14 20:00:14 2024 +0100 dt-bindings: arm: qcom: Add Samsung Galaxy Note 3 Add the compatible for this Samsung smartphone ("phablet" as it was named in that era). Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240314-samsung-hlte-v2-1-84094b41c033@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 4b220c6fa9f379cb8803dbca73ae1f4128dfa5c8 Author: Mrinmay Sarkar Date: Mon Mar 11 19:41:37 2024 +0530 arm64: dts: qcom: sa8775p: Mark PCIe EP controller as cache coherent The PCIe EP controller on SA8775P supports cache coherency, hence add the "dma-coherent" property to mark it as such. Signed-off-by: Mrinmay Sarkar Reviewed-by: Manivannan Sadhasivam Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1710166298-27144-4-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Bjorn Andersson commit e23dfb4ee30a120a947abb94a718ccc1eb5f87ff Author: Luca Weiss Date: Tue Feb 20 00:11:22 2024 +0100 ARM: dts: qcom: msm8974-hammerhead: Hook up backlight Connect the panel with the backlight nodes so that the backlight can be turned off when the display is blanked. Signed-off-by: Luca Weiss Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20240220-lm3630a-fixups-v1-4-9ca62f7e4a33@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 49b9981a0ecae2bbb298d8b0c2b8058220038691 Author: Bryant Mairs Date: Mon Feb 19 22:43:17 2024 +0100 ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 8.0 Wi-Fi Add support for this tablet based on the MSM8226 SoC, codenamed "milletwifi". Acked-by: Linus Walleij Reviewed-by: Luca Weiss Signed-off-by: Bryant Mairs Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240219214643.197116-3-bryant@mai.rs Signed-off-by: Bjorn Andersson commit bfc10ebd76d56e3bf8899891e5730604eea46db4 Author: Bryant Mairs Date: Mon Feb 19 22:43:16 2024 +0100 dt-bindings: arm: qcom: Document samsung,milletwifi device Add binding documentation for Samsung Galaxy Tab 4 8.0 Wi-Fi tablet which is based on Snapdragon 400 (apq8026) SoC. Acked-by: Linus Walleij Acked-by: Conor Dooley Signed-off-by: Bryant Mairs Link: https://lore.kernel.org/r/20240219214643.197116-2-bryant@mai.rs Signed-off-by: Bjorn Andersson commit aa9fc5c90814fcb9ecabbb505e097ff05abf962e Author: Danila Tikhonov Date: Sun May 5 23:10:38 2024 +0300 clk: qcom: Add Video Clock Controller driver for SM7150 Add support for the video clock controller found on SM7150. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20240505201038.276047-9-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit a4be1860b9319e9e55eaa9e28e35e7b19128060c Author: Danila Tikhonov Date: Sun May 5 23:10:37 2024 +0300 dt-bindings: clock: qcom: Add SM7150 VIDEOCC clocks Add device tree bindings for the video clock controller on Qualcomm SM7150 platform. Signed-off-by: Danila Tikhonov Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20240505201038.276047-8-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 9f0532da42261476561c0a683097f6de82e7c3ed Author: Danila Tikhonov Date: Sun May 5 23:10:36 2024 +0300 clk: qcom: Add Camera Clock Controller driver for SM7150 Add support for the camera clock controller found on SM7150. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20240505201038.276047-7-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 0fd2a048368ea99feccd7dfd6a5f42f6d011f10f Author: Danila Tikhonov Date: Sun May 5 23:10:35 2024 +0300 dt-bindings: clock: qcom: Add SM7150 CAMCC clocks Add device tree bindings for the camera clock controller on Qualcomm SM7150 platform. Signed-off-by: Danila Tikhonov Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20240505201038.276047-6-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 3829c412197e14b8cac445d0e3a76c7cd5fff064 Author: Danila Tikhonov Date: Sun May 5 23:10:34 2024 +0300 clk: qcom: Add Display Clock Controller driver for SM7150 Add support for the display clock controller found on SM7150. Co-developed-by: David Wronek Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20240505201038.276047-5-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit ca3a91063acc3abc0fb233591d8cda4b37dc39ac Author: Danila Tikhonov Date: Sun May 5 23:10:33 2024 +0300 dt-bindings: clock: qcom: Add SM7150 DISPCC clocks Add device tree bindings for the display clock controller on Qualcomm SM7150 platform. Co-developed-by: David Wronek Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20240505201038.276047-4-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 734b6e7a3b947c045ba9e5f853f6ea33bd78d097 Author: Danila Tikhonov Date: Sun May 5 23:10:32 2024 +0300 clk: qcom: gcc-sm7150: constify clk_init_data structures The clk_init_data structures are never modified, make them const. No functional changes. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20240505201038.276047-3-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit 97cf92963aeff328829007dd1f5ba51e815438d0 Author: Danila Tikhonov Date: Sun May 5 23:10:31 2024 +0300 clk: qcom: Fix SM_GCC_7150 dependencies Add dependencies on "ARM64 or COMPILE_TEST" for SM_GCC_7150. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20240505201038.276047-2-danila@jiaxyga.com Signed-off-by: Bjorn Andersson commit e60ac570137b42ef61a01a6b26133a8e2d7e8d4b Author: Alexandru Gagniuc Date: Mon May 6 21:47:58 2024 -0500 arm64: dts: qcom: ipq9574: add MDIO bus The IPQ95xx uses an IPQ4019 compatible MDIO controller that is already supported. Add a DT node to expose it. Signed-off-by: Alexandru Gagniuc Link: https://lore.kernel.org/r/20240507024758.2810514-2-mr.nuke.me@gmail.com Signed-off-by: Bjorn Andersson commit 0c40b1c7a897bd9733e72aca2396fd3a62f1db17 Author: Borislav Petkov (AMD) Date: Mon Apr 8 19:46:03 2024 +0200 x86/setup: Warn when option parsing is done too early Commit 4faa0e5d6d79 ("x86/boot: Move kernel cmdline setup earlier in the boot process (again)") fixed and issue where cmdline parsing would happen before the final boot_command_line string has been built from the builtin and boot cmdlines and thus cmdline arguments would get lost. Add a check to catch any future wrong use ordering so that such issues can be caught in time. Signed-off-by: Borislav Petkov (AMD) Acked-by: Ingo Molnar Link: https://lore.kernel.org/r/20240409152541.GCZhVd9XIPXyTNd9vc@fat_crate.local commit 45878973229a93f0f42aa048ac8c6223af010082 Author: Adam Skladowski Date: Wed May 8 18:34:37 2024 +0200 arm64: dts: qcom: msm8976: Add WCNSS node Add node describing wireless connectivity subsystem. Signed-off-by: Adam Skladowski Link: https://lore.kernel.org/r/20240508163455.8757-5-a39.skl@gmail.com Signed-off-by: Bjorn Andersson commit 00e67d8e80f06bb848a3dd516d06e2f040b7d8f2 Author: Adam Skladowski Date: Wed May 8 18:34:36 2024 +0200 arm64: dts: qcom: msm8976: Add Adreno GPU Add Adreno GPU node. Signed-off-by: Adam Skladowski Link: https://lore.kernel.org/r/20240508163455.8757-4-a39.skl@gmail.com Signed-off-by: Bjorn Andersson commit b0516dbf8e218dede2fd2837ca82dccd9cdcdafc Author: Adam Skladowski Date: Wed May 8 18:34:35 2024 +0200 arm64: dts: qcom: msm8976: Add MDSS nodes Add MDSS nodes to support displays on MSM8976 SoC. Signed-off-by: Adam Skladowski Link: https://lore.kernel.org/r/20240508163455.8757-3-a39.skl@gmail.com Signed-off-by: Bjorn Andersson commit 418c2ffd7df9bfc25c21172bd881b78d7569fb4d Author: Adam Skladowski Date: Wed May 8 18:34:34 2024 +0200 arm64: dts: qcom: msm8976: Add IOMMU nodes Add the nodes describing the apps and gpu iommu and its context banks that are found on msm8976 SoCs. Signed-off-by: Adam Skladowski Link: https://lore.kernel.org/r/20240508163455.8757-2-a39.skl@gmail.com Signed-off-by: Bjorn Andersson commit e43111f52b9ec5c2d700f89a1d61c8d10dc2d9e9 Author: Stephen Boyd Date: Thu May 9 11:41:28 2024 -0700 soc: qcom: rpmh-rsc: Ensure irqs aren't disabled by rpmh_rsc_send_data() callers Dan pointed out that Smatch is concerned about this code because it uses spin_lock_irqsave() and then calls wait_event_lock_irq() which enables irqs before going to sleep. The comment above the function says it should be called with interrupts enabled, but we simply hope that's true without really confirming that. Let's add a might_sleep() here to confirm that interrupts and preemption aren't disabled. Once we do that, we can change the lock to be non-saving, spin_lock_irq(), to clarify that we don't expect irqs to be disabled. If irqs are disabled by callers they're going to be enabled anyway in the wait_event_lock_irq() call which would be bad. This should make Smatch happier and find bad callers faster with the might_sleep(). We can drop the WARN_ON() in the caller because we have the might_sleep() now, simplifying the code. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/911181ed-c430-4592-ad26-4dc948834e08@moroto.mountain Fixes: 2bc20f3c8487 ("soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free") Cc: Douglas Anderson Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240509184129.3924422-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 0780c836673b25f5aad306630afcb1172d694cb4 Author: Chen Ni Date: Fri May 10 16:31:56 2024 +0800 soc: qcom: pmic_glink: Handle the return value of pmic_glink_init As platform_driver_register() and register_rpmsg_driver() can return error numbers, it should be better to check the return value and deal with the exception. Signed-off-by: Chen Ni Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20240510083156.1996783-1-nichen@iscas.ac.cn Signed-off-by: Bjorn Andersson commit f44da5d8722de348ff2eb8b206c69b52809c1772 Author: Luca Weiss Date: Fri May 10 14:27:08 2024 +0200 arm64: dts: qcom: sc7280: Add APR nodes for sound Add the different services found on APR on some devices with SC7280 SoC. Additionally add an empty sound node in the root node as is seen on other SoC dtsi files so device dt's can easily use that. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20240510-sc7280-apr-v1-1-e9eabda05f85@fairphone.com Signed-off-by: Bjorn Andersson commit ebacfa1f09c14b2bc5cb02c1a518e29edea1f476 Author: Uwe Kleine-König Date: Wed May 22 18:48:31 2024 +0200 power: supply: 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240522164830.61646-2-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit d79e8cab32371b0f08ae0ed6f1b2b9bd8b7a2873 Author: Michal Wajdeczko Date: Mon May 27 13:20:15 2024 +0200 drm/xe/vf: Use only assigned GGTT region Each VF is assigned a limited range of the GGTT address space. To ensure that the VF driver does not use GGTT allocations outside of the assigned region, explicitly reserve GGTT space below and above this region when initializing GGTT. Signed-off-by: Michal Wajdeczko Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20240527112015.1020-1-michal.wajdeczko@intel.com commit ea797cf4b7f8470f1b23cd084096cb93fb93e6c3 Author: Michal Wajdeczko Date: Fri May 24 13:37:13 2024 +0200 drm/xe/vf: Read VF configuration prior to GGTT initialization Each VF will be assigned with only a limited range of the GGTT address space. Make sure that VF driver will read its own GGTT configuration before starting any GGTT initialization. Signed-off-by: Michal Wajdeczko Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20240524113714.932-2-michal.wajdeczko@intel.com commit fcd9354ceb7ae52b11a93e8ac990ad4a8c3a0da7 Author: Christophe JAILLET Date: Fri May 10 18:50:00 2024 +0200 clk: qcom: Constify struct pll_vco pll_vco structure are never modified. They are used as .vco_table in "struct clk_alpha_pll". And in this structure, we have: const struct pll_vco *vco_table; Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 9905 47576 0 57481 e089 drivers/clk/qcom/mmcc-msm8994.o After: text data bss dec hex filename 10033 47440 0 57473 e081 drivers/clk/qcom/mmcc-msm8994.o Signed-off-by: Christophe JAILLET Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/c3c9a75ed77a5ef2e9b72081e88225d84bba91cd.1715359776.git.christophe.jaillet@wanadoo.fr Signed-off-by: Bjorn Andersson commit 42214cbd945871b48d1ca1a6bd17f02e1a5f823e Author: Dmitry Baryshkov Date: Sun May 12 01:04:15 2024 +0300 arm64: dts: qcom: sm8150-hdk: rename Type-C HS endpoints Follow other Qualcomm platforms and rename pm8150b_role_switch_in to pm8150_hs_in. Corresponding port is described as HS port rather than role switching. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-9-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit b73ed308f9f69499fde654d63ed6c1fd44870793 Author: Dmitry Baryshkov Date: Sun May 12 01:04:14 2024 +0300 arm64: dts: qcom: x1e80100: describe USB signals properly Follow example of other platforms. Rename HS graph nodes to contain 'dwc3_hs' and link SS lanes from DWC3 controllers to QMP PHYs. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-8-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit 93830ef7bbcdfd440fd6d93adfb59f20560950a5 Author: Dmitry Baryshkov Date: Sun May 12 01:04:13 2024 +0300 arm64: dts: qcom: sc8280xp: describe USB signals properly Follow example of other platforms. Rename HS graph nodes to contain 'dwc3_hs' and link SS lanes from DWC3 controllers to QMP PHYs. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-7-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit 757688ad094cb520378e6665215a1b79aa46a8ff Author: Dmitry Baryshkov Date: Sun May 12 01:04:12 2024 +0300 arm64: dts: qcom: sc8180x: describe USB signals properly Follow example of other platforms. Rename HS graph nodes to contain 'dwc3_hs' and link SS lanes from DWC3 controllers to QMP PHYs. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-6-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit 35e3a9c1afce0aa72a4f71f43cae9784f01825fc Author: Dmitry Baryshkov Date: Sun May 12 01:04:11 2024 +0300 arm64: dts: qcom: sc8180x: switch USB+DP QMP PHYs to new bindings To follow other Qualcomm platforms, update QMP USB+DP PHYs to use newer bindings rather than old bindings which had PHYs as subdevices. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-5-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit 88347987574b435b23fced20982dc15115ff81b8 Author: Dmitry Baryshkov Date: Sun May 12 01:04:10 2024 +0300 arm64: dts: qcom: sm8250: add a link between DWC3 and QMP PHY The SuperSpeed signals originate from the DWC3 host controller and then are routed through the Combo QMP PHY, where they are multiplexed with the DisplayPort signals. Add corresponding OF graph link. Reported-by: Luca Weiss Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-4-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit db67e95835d0d79a1c1dd53a016c951706e0af10 Author: Dmitry Baryshkov Date: Sun May 12 01:04:09 2024 +0300 arm64: dts: qcom: sm8250: describe HS signals properly The OF graph should describe physical signals. There is no 'role switch' signal between Type-C connector and the DWC3 USB controller. Rename endpoints to mention USB HS signal instead (this follows the example lead by other plaforms, including QRB2210 RB1, QRB4210 RB2 and all PMIC GLINK platforms). Reviewed-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-3-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit 17944fd55b8d03457ffaf4fd37ed7bef679bc4a4 Author: Dmitry Baryshkov Date: Sun May 12 01:04:08 2024 +0300 arm64: dts: qcom: sc8180x: correct dispcc clocks Correct the clocks being used by the display clock controller on the SC8180X platform (to match the schema): - Drop the sleep clock - Add DSI clocks - Reorder eDP / DP clocks This changes the order of clocks, however it should be noted that the clock list was neither correct nor followed the schema beforehand. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-2-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit d85dc696ca60d04b499d8c3d44040ac54599a0d3 Author: Dmitry Baryshkov Date: Sun May 12 01:04:07 2024 +0300 dt-bindings: clk: qcom,dispcc-sm8x50: describe additional DP clocks On the affected Qualcomm platforms the display clock controller has additional DP input clocks, describe them in DT schema. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240512-typec-fix-sm8250-v4-1-ad153c747a97@linaro.org Signed-off-by: Bjorn Andersson commit f63f815fc2a5ca9d57beba0286aaa82bc3277353 Author: Unnathi Chalicheemala Date: Tue May 14 11:00:46 2024 -0700 firmware: qcom-scm: Remove QCOM_SMC_WAITQ_FLAG_WAKE_ALL This flag was never supported by firmware, so remove it. Signed-off-by: Unnathi Chalicheemala Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240514180046.543763-1-quic_uchalich@quicinc.com Signed-off-by: Bjorn Andersson commit 98a0c4f2278b4d6c1c7722735c20b2247de6293f Author: Marc Gonzalez Date: Wed May 15 16:27:44 2024 +0200 arm64: dts: qcom: msm8998: enable adreno_smmu by default 15 qcom platform DTSI files define an adreno_smmu node. msm8998 is the only one with adreno_smmu disabled by default. There's no reason why this SMMU should be disabled by default, it doesn't need any further configuration. Bring msm8998 in line with the 14 other platforms. This fixes GPU init failing with ENODEV: msm_dpu c901000.display-controller: failed to load adreno gpu msm_dpu c901000.display-controller: failed to bind 5000000.gpu (ops a3xx_ops): -19 Fixes: 87cd46d68aeac8 ("Configure Adreno GPU and related IOMMU") Signed-off-by: Marc Gonzalez Reviewed-by: Bryan O'Donoghue Reviewed-by: Marijn Suijten Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/be51d1a4-e8fc-48d1-9afb-a42b1d6ca478@freebox.fr Signed-off-by: Bjorn Andersson commit e07c4a702eb0abbb200c07593cfc429338ec42bf Author: Rohit Agarwal Date: Fri May 17 15:34:23 2024 +0530 arm64: dts: qcom: sdx75: Support for I2C and SPI Add devicetree node for I2C and SPI busses in SDX75. Signed-off-by: Rohit Agarwal Link: https://lore.kernel.org/r/20240517100423.2006022-3-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 6596118ccdcdb3ec5e417293e43bf6b122363a37 Author: Jie Gan Date: Tue May 21 09:19:46 2024 +0800 arm64: dts: qcom: Add coresight nodes for SA8775p Add following coresight components on SA8775p, TMC/ETF, TPDM, dynamic Funnel, TPDA and ETM. Signed-off-by: Jie Gan Link: https://lore.kernel.org/r/20240521011946.3148712-2-quic_jiegan@quicinc.com Signed-off-by: Bjorn Andersson commit 7ddab80e115086c0f2f37fa5a95466d0885d66d2 Author: Neil Armstrong Date: Thu May 23 09:59:35 2024 +0200 arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS This add initial support for the Lenovo Smart Tab M10 (WiFi) (model tbx605f) which is a 10.1" tablet by Lenovo based on the SDM450 SoC. It has a 10.1" LCP touch panel, SDCard slot, Volume+Power buttons, USB-C port amd front-facing camera (not supported). The proper LCP Panel support will be added later, for now using the simeple-framebuffer with the bootloader-initialized video memory. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240523-topic-sdm450-upstream-tbx605f-v1-3-e52b89133226@linaro.org Signed-off-by: Bjorn Andersson commit a1b05c448e74a092c59a84b16e9d4a673c764f1f Author: Naina Mehta Date: Thu May 23 17:33:37 2024 +0530 arm64: dts: qcom: sdx75-idp: add SDHCI for SD Card Enable SDHCI on sdx75-idp to support SD card. Also add the required regulators. Signed-off-by: Naina Mehta Link: https://lore.kernel.org/r/20240523120337.9530-4-quic_nainmeht@quicinc.com Signed-off-by: Bjorn Andersson commit 37f5169f5c83c5de469d666aea7b9eca4c30e6b9 Author: Naina Mehta Date: Thu May 23 17:33:36 2024 +0530 arm64: dts: qcom: sdx75: Add SDHCI node Add sdhc node for SDX75 SoC to support SD card. Also add pins required for SDHCI. Signed-off-by: Naina Mehta Link: https://lore.kernel.org/r/20240523120337.9530-3-quic_nainmeht@quicinc.com Signed-off-by: Bjorn Andersson commit 265d9989df5012adc5bec8e894dff0572c195a0c Author: Richard Acayan Date: Thu May 23 21:20:27 2024 -0400 arm64: dts: qcom: sdm670: add smem region The shared memory region is used for information about the SoC and communication with remote processors. Add the smem region for SDM670. Signed-off-by: Richard Acayan Link: https://lore.kernel.org/r/20240524012023.318965-8-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit ceb39b051b779339749ef0ce30b8d79165e733aa Author: Dmitry Baryshkov Date: Mon May 27 07:01:11 2024 +0300 arm64: dts: qcom: sdm850-lenovo-yoga-c630: add WiFi calibration variant Add calibration variant that is used by the board data for the laptop: bus=snoc,qmi-board-id=ff,qmi-chip-id=30214,variant=Lenovo_C630 Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240527-yoga-wifi-calib-v1-1-af9dc33880e8@linaro.org Signed-off-by: Bjorn Andersson commit cae4c862d8b2d7debb07e6d831e079520163ac4f Author: Dmitry Baryshkov Date: Mon May 27 07:00:22 2024 +0300 arm64: dts: qcom: sdm850-lenovo-yoga-c630: fix IPA firmware path Specify firmware path for the IPA network controller on the Lenovo Yoga C630 laptop. Without this property IPA tries to load firmware from the default location, which likely will fail. Fixes: 2e01e0c21459 ("arm64: dts: qcom: sdm850-yoga: Enable IPA") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240527-yoga-ipa-fw-v1-1-99ac1f5db283@linaro.org Signed-off-by: Bjorn Andersson commit a8a313c298b8becc7e2c0bab174df736d1f99450 Author: Abel Vesa Date: Mon May 27 11:16:01 2024 +0300 soc: qcom: pmic_glink: Increase max ports to 3 Up until now, all Qualcomm platforms only had maximum 2 ports. The X Elite (x1e80100) adds a third one. Increase the maximum allowed to 3. Signed-off-by: Abel Vesa Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240527-x1e80100-soc-qcom-pmic-glink-v1-1-e5c4cda2f745@linaro.org Signed-off-by: Bjorn Andersson commit 2d95d13248446355fec961ef96703e552b75fe52 Author: Michael Walle Date: Fri Apr 19 16:12:47 2024 +0200 mtd: spi-nor: get rid of SPI_NOR_NO_FR The Everspin FRAM devices are the only user of the NO_FR flag. Drop the global flag and instead use a manufacturer fixup for the Everspin flashes to drop the fast read support. Signed-off-by: Michael Walle Reviewed-by: Tudor Ambarus Reviewed-by: Pratyush Yadav [pratyush@kernel.org: s/evervision/everspin/g in code and commit message] Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20240419141249.609534-5-mwalle@kernel.org commit d323a41884a9ec062f07c47436a1fbaf50918d68 Author: Michael Walle Date: Fri Apr 19 16:12:46 2024 +0200 mtd: spi-nor: remove .setup() callback With the removal of the Xilinx flashes, there is no more flash driver using that hook. The original intention was to let the driver configure special requirements like page size an opcodes. This is already possible by other means and it is unlikely a flash will overwrite the (more or less complex) setup function. Signed-off-by: Michael Walle Reviewed-by: Pratyush Yadav Acked-by: Tudor Ambarus Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20240419141249.609534-4-mwalle@kernel.org commit 402de7fc880fef055bc984957454b532987e9ad0 Author: Ingo Molnar Date: Mon May 27 16:54:52 2024 +0200 sched: Fix spelling in comments Do a spell-checking pass. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 9539d12d9f5242133ed614d72c82041ab71842a9 Author: Michael Walle Date: Fri Apr 19 16:12:45 2024 +0200 mtd: spi-nor: get rid of non-power-of-2 page size handling The Xilinx flashes were the only users of page sizes that were not power of 2. Support for them has been dropped, thus we can also get rid of the special page size handling for it. Signed-off-by: Michael Walle Acked-by: Tudor Ambarus Reviewed-by: Pratyush Yadav [pratyush@kernel.org: fixup minor typos and grammar in commit message] Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20240419141249.609534-3-mwalle@kernel.org commit e4608bbccf2b9331a4a43385ab15d06eab7761ac Author: Pratik Farkase Date: Wed May 22 17:16:13 2024 +0200 dt-bindings: gpio: lsi,zevio-gpio: convert to dtschema Convert Zevio GPIO Controller from text to dtschema. Adding `interrupts` property fixes the following warning: linux/out/arch/arm/boot/dts/nspire/nspire-tp.dtb: gpio@90000000: 'interrupts' does not match any of the regexes: 'pinctrl-[0-9]+'` while executing `make dtbs_check` on Texas Instruments nspire boards. Signed-off-by: Pratik Farkase Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240522151616.27397-1-pratik.farkase@wsisweden.com Signed-off-by: Bartosz Golaszewski commit d795848ecce24a75dfd46481aee066ae6fe39775 Author: Hagar Hemdan Date: Thu May 23 08:53:32 2024 +0000 gpio: prevent potential speculation leaks in gpio_device_get_desc() Userspace may trigger a speculative read of an address outside the gpio descriptor array. Users can do that by calling gpio_ioctl() with an offset out of range. Offset is copied from user and then used as an array index to get the gpio descriptor without sanitization in gpio_device_get_desc(). This change ensures that the offset is sanitized by using array_index_nospec() to mitigate any possibility of speculative information leaks. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc. Signed-off-by: Hagar Hemdan Link: https://lore.kernel.org/r/20240523085332.1801-1-hagarhem@amazon.com Signed-off-by: Bartosz Golaszewski commit 447e140e66fd226350b3ce86cffc965eaae4c856 Author: Andy Shevchenko Date: Wed May 8 13:17:01 2024 +0300 gpio: Remove legacy API documentation In order to discourage people to use old and legacy GPIO APIs remove the respective documentation completely. It also helps further cleanups of the legacy GPIO API leftovers, which is ongoing task. Signed-off-by: Andy Shevchenko Reviewed-by: Hu Haowen <2023002089@link.tyut.edu.cn> Link: https://lore.kernel.org/r/20240508101703.830066-1-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski commit be1d1a76570c6e82fb51e77e7d0ad2d6e8157fea Author: Michael Walle Date: Fri Apr 19 16:12:44 2024 +0200 mtd: spi-nor: Remove support for Xilinx S3AN flashes These flashes are kind of an oddball for the very old Xilinx Spartan 3 FPGAs to store their bitstream. More importantly, they reuse the Atmel JEDEC manufacturer ID and in fact the at45db081d already blocks the use of the 3S700AN flash chip. It's time to sunset support for these flashes. Signed-off-by: Michael Walle Acked-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Cc: Ricardo Ribalda Acked-by: Ricardo Ribalda Signed-off-by: Pratyush Yadav Link: https://lore.kernel.org/r/20240419141249.609534-2-mwalle@kernel.org commit 40f98db5c06081ce583a24fb8950367f1058d2a3 Author: Jani Nikula Date: Tue May 14 15:55:17 2024 +0300 drm/imx/ldb: convert to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/c1f1143b5aea14aea968cda6508b275b2f7246ea.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d814fbfc10274dd4779cb67022fc44fb63583398 Author: Jani Nikula Date: Tue May 14 15:55:16 2024 +0300 drm/imx/tve: convert to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/2f59a7ad10c29c21f08223ef19221cef48623cc8.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ef44c8ab06b300a5b9b30e5b630f491ac7bc4d3e Author: Hongbo Li Date: Wed May 22 11:04:22 2024 +0800 fs: fsconfig: intercept non-new mount API in advance for FSCONFIG_CMD_CREATE_EXCL command fsconfig with FSCONFIG_CMD_CREATE_EXCL command requires the new mount api, here we should return -EOPNOTSUPP in advance to avoid extra procedure. Signed-off-by: Hongbo Li Link: https://lore.kernel.org/r/20240522030422.315892-1-lihongbo22@huawei.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 3aa63a569c64e708df547a8913c84e64a06e7853 Author: Jeff Layton Date: Fri May 17 20:08:40 2024 -0400 fs: switch timespec64 fields in inode to discrete integers Adjacent struct timespec64's pack poorly. Switch them to discrete integer fields for the seconds and nanoseconds. This shaves 8 bytes off struct inode with a garden-variety Fedora Kconfig on x86_64, but that also moves the i_lock into the previous cacheline, away from the fields it protects. To remedy that, move i_generation above the i_lock, which moves the new 4-byte hole to just after the i_fsnotify_mask in my setup. Amir has plans to use that to expand the i_fsnotify_mask, so add a comment to that effect as well. Cc: Amir Goldstein Suggested-by: Linus Torvalds Signed-off-by: Jeff Layton Link: https://lore.kernel.org/r/20240517-amtime-v1-1-7b804ca4be8f@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe Author: Justin Stitt Date: Mon May 13 17:50:30 2024 +0000 fs: remove accidental overflow during wraparound check Running syzkaller with the newly enabled signed integer overflow sanitizer produces this report: [ 195.401651] ------------[ cut here ]------------ [ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15 [ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long') [ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11 [ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 195.425804] Call Trace: [ 195.427360] [ 195.428791] dump_stack_lvl+0x93/0xd0 [ 195.431150] handle_overflow+0x171/0x1b0 [ 195.433640] vfs_fallocate+0x459/0x4f0 ... [ 195.490053] ------------[ cut here ]------------ [ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61 [ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long) [ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11 [ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 195.514075] Call Trace: [ 195.515636] [ 195.517000] dump_stack_lvl+0x93/0xd0 [ 195.519255] handle_overflow+0x171/0x1b0 [ 195.521677] vfs_fallocate+0x4cb/0x4f0 [ 195.524033] __x64_sys_fallocate+0xb2/0xf0 Historically, the signed integer overflow sanitizer did not work in the kernel due to its interaction with `-fwrapv` but this has since been changed [1] in the newest version of Clang. It was re-enabled in the kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow sanitizer"). Let's use the check_add_overflow helper to first verify the addition stays within the bounds of its type (long long); then we can use that sum for the following check. Link: https://github.com/llvm/llvm-project/pull/82432 [1] Closes: https://github.com/KSPP/linux/issues/356 Cc: linux-hardening@vger.kernel.org Reviewed-by: Kees Cook Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@google.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 593ab951232be4779e77f5b1bee0bef4e6fc1022 Author: Dmitry Rokosov Date: Thu Mar 28 22:26:37 2024 +0300 arm64: dts: amlogic: ad402: setup thermal-zones There is one thermal zone with 3 trip points: soc_passive, soc_hot, and soc_critical, as well as two cooling maps. Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20240328192645.20914-4-ddrokosov@salutedevices.com Signed-off-by: Neil Armstrong commit 049d141161903e656d9475950bb976240802c01c Author: Dmitry Rokosov Date: Thu Mar 28 22:26:36 2024 +0300 arm64: dts: amlogic: a1: introduce cpu temperature sensor The A1 SoC family has only one thermal sensor for CPU temperature measurement. It is required to set the TS clock rate to 500kHz to make it workable. Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20240328192645.20914-3-ddrokosov@salutedevices.com Signed-off-by: Neil Armstrong commit 947bde9069c8241afe401433a6eff276595bb073 Author: Dmitry Rokosov Date: Thu Mar 28 22:26:35 2024 +0300 arm64: dts: amlogic: a1: add cooling-cells for DVFS feature It's used for CPU with DVFS feature to specify minimum and maximum cooling state used in the reference. Without these values DVFS will not work and dtbs_check will raise the error. Signed-off-by: Dmitry Rokosov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240328192645.20914-2-ddrokosov@salutedevices.com Signed-off-by: Neil Armstrong commit 2502f8dd8c30edbca9253d5999294f58211039b1 Author: Mohan Kumar Date: Mon May 27 12:56:07 2024 +0000 ASoC: tegra: I2S client convert formats handling The AHUB HW modules are interconnected with CIF which are capable of supporting Channel and Sample bit format conversion. Due to this, the I2S Client can have different Channel and Sample bit from the hw_params() and this config is passed from CIF port of I2S DT node which can help to perform this conversion. For e.g. HFP usecase consists of BT SCO with 1ch and 8k audio data which needs to be converted and mixed with external codec playback and capture path which is of 2ch and 48k format. For HFP Playback: The path includes mono to stereo and 8k to 48k conversion _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |1ch | | 1ch | |2ch | SFC | 2ch | | |BT SCO |---->| I2Sx |------>| CIF |----->| 8k->48k |---->| Codec I2Sy| |_ _ _ _| |_ _ __|client |_ _ _|audio |_ _ _ _ _| |_ _ _ _ _ _| For HFP Capture: The path includes stereo to mono and 48k to 8k conversion _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | 2ch | SFC | 2ch | | 1ch | | 1ch | | | codec I2Sy|---->| 48k->8k |----->| CIF |------>| I2Sx |---->| BT SCO| |_ _ _ _ _ _| |_ _ _ _ _| audio|_ _ _|client |_ _ _ _| |_ _ _ _| For above two path, I2S client channel uses existing DT binding to pass channels and format conversion in I2Sx CIF Port. Signed-off-by: Mohan Kumar Signed-off-by: Sameer Pujar Link: https://msgid.link/r/20240527125608.2461300-3-spujar@nvidia.com Signed-off-by: Mark Brown commit 8cb3aeebcb86088e30232277c9bee9054837442b Author: Mohan Kumar Date: Mon May 27 12:56:06 2024 +0000 ASoC: simple-card-utils: Split simple_fixup_sample_fmt func Split the simple_fixup_sample_fmt() into two functions by adding one more function named simple_util_get_sample_fmt() to return the sample format value. This is useful for drivers that wish to simply get the sample format without setting the mask. Signed-off-by: Mohan Kumar Signed-off-by: Sameer Pujar Link: https://msgid.link/r/20240527125608.2461300-2-spujar@nvidia.com Signed-off-by: Mark Brown commit 9aa31612d992506b60be68aebf2a4e130eb6b783 Author: Dr. David Alan Gilbert Date: Thu May 16 14:34:04 2024 +0100 EDAC/thunderx: Remove unused struct error_syndrome struct error_syndrome appears never to have been used. Remove it, together with the MAX_SYNDROME_REGS it used. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240516133404.251397-1-linux@treblig.org commit 9a7f6aeac2948e4212e100b3f939a0cc8d0126be Author: Jani Nikula Date: Tue May 14 15:55:13 2024 +0300 drm/loongson/7a2000: convert to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/b8c477279a6ae1b44df72bee230180e277087fae.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 56056ef643fcda3343a2318091d27ea3addd4be5 Author: Jani Nikula Date: Tue May 14 15:55:12 2024 +0300 drm/loongson/7a1000: convert to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/22c66af62cd5ae1998bbaf6801cda3cc689f9e3f.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ff2a391349afcf62e99897de9bfd854ecf9d21b8 Author: Jani Nikula Date: Tue May 14 15:55:11 2024 +0300 drm/hisilicon/hibmc: convert to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/386e3a64efbdd61c3eaed3f49ea9c3ebd4fcd41d.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3c5426740ee84f2d03c5bdc831c52c89334bbf69 Author: Jani Nikula Date: Tue May 14 15:55:09 2024 +0300 drm/bridge: analogix_dp: convert to struct drm_edid Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/6f3bd1233a0922551761666f0c96c3766e3c5f96.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 04746ed80bcf3130951ed4d5c1bc5b0bcabdde22 Author: Ingo Molnar Date: Sun Apr 7 10:43:15 2024 +0200 sched/syscalls: Split out kernel/sched/syscalls.c from kernel/sched/core.c core.c has become rather large, move most scheduler syscall related functionality into a separate file, syscalls.c. This is about ~15% of core.c's raw linecount. Move the alloc_user_cpus_ptr(), __rt_effective_prio(), rt_effective_prio(), uclamp_none(), uclamp_se_set() and uclamp_bucket_id() inlines to kernel/sched/sched.h. Internally export the __sched_setscheduler(), __sched_setaffinity(), __setscheduler_prio(), set_load_weight(), enqueue_task(), dequeue_task(), check_class_changed(), splice_balance_callbacks() and balance_callbacks() methods to better facilitate this. Move the new file's build to sched_policy.c, because it fits there semantically, but also because it's the smallest of the 4 build units under an allmodconfig build: -rw-rw-r-- 1 mingo mingo 7.3M May 27 12:35 kernel/sched/core.i -rw-rw-r-- 1 mingo mingo 6.4M May 27 12:36 kernel/sched/build_utility.i -rw-rw-r-- 1 mingo mingo 6.3M May 27 12:36 kernel/sched/fair.i -rw-rw-r-- 1 mingo mingo 5.8M May 27 12:36 kernel/sched/build_policy.i This better balances build time for scheduler subsystem rebuilds. I build-tested this new file as a standalone syscalls.o file for a bit, to make sure all the encapsulations & abstractions are robust. Also update/add my copyright notices to these files. Build time measurements: # -Before/+After: kepler:~/tip> perf stat -e 'cycles,instructions,duration_time' --sync --repeat 5 --pre 'rm -f kernel/sched/*.o' m kernel/sched/built-in.a >/dev/null Performance counter stats for 'm kernel/sched/built-in.a' (5 runs): - 71,938,508,607 cycles ( +- 0.17% ) + 71,992,916,493 cycles ( +- 0.22% ) - 106,214,780,964 instructions # 1.48 insn per cycle ( +- 0.01% ) + 105,450,231,154 instructions # 1.46 insn per cycle ( +- 0.01% ) - 5,878,232,620 ns duration_time ( +- 0.38% ) + 5,290,085,069 ns duration_time ( +- 0.21% ) - 5.8782 +- 0.0221 seconds time elapsed ( +- 0.38% ) + 5.2901 +- 0.0111 seconds time elapsed ( +- 0.21% ) Build time improvement of -11.1% (duration_time) is expected: the parallel build time of the scheduler subsystem is determined by the largest, slowest to build object file, which is kernel/sched/core.o. By moving ~15% of its complexity into another build unit, we reduced build time by -11%. Measured cycles spent on building is within its ~0.2% stddev noise envelope. The -0.7% reduction in instructions spent on building the scheduler is statistically reliable and somewhat surprising - I can only speculate: maybe compilers aren't that efficient at building & optimizing 10+ KLOC files (core.c), and it's an overall win to balance the linecount a bit. Anyway, this might be a data point that suggests that reducing the linecount of our largest files will improve not just code readability and maintainability, but might also improve build times a bit. Code generation got a bit worse, by 0.5kb text on an x86 defconfig build: # -Before/+After: kepler:~/tip> size vmlinux text data bss dec hex filename -26475475 10439178 1740804 38655457 24dd5e1 vmlinux +26476003 10439178 1740804 38655985 24dd7f1 vmlinux kepler:~/tip> size kernel/sched/built-in.a text data bss dec hex filename - 76056 30025 489 106570 1a04a kernel/sched/core.o (ex kernel/sched/built-in.a) + 63452 29453 489 93394 16cd2 kernel/sched/core.o (ex kernel/sched/built-in.a) 44299 2181 104 46584 b5f8 kernel/sched/fair.o (ex kernel/sched/built-in.a) - 42764 3424 120 46308 b4e4 kernel/sched/build_policy.o (ex kernel/sched/built-in.a) + 55651 4044 120 59815 e9a7 kernel/sched/build_policy.o (ex kernel/sched/built-in.a) 44866 12655 2192 59713 e941 kernel/sched/build_utility.o (ex kernel/sched/built-in.a) 44866 12655 2192 59713 e941 kernel/sched/build_utility.o (ex kernel/sched/built-in.a) This is primarily due to the extra functions exported, and the size gets exaggerated somewhat by __pfx CFI function padding: ffffffff810cc710 <__pfx_enqueue_task>: ffffffff810cc710: 90 nop ffffffff810cc711: 90 nop ffffffff810cc712: 90 nop ffffffff810cc713: 90 nop ffffffff810cc714: 90 nop ffffffff810cc715: 90 nop ffffffff810cc716: 90 nop ffffffff810cc717: 90 nop ffffffff810cc718: 90 nop ffffffff810cc719: 90 nop ffffffff810cc71a: 90 nop ffffffff810cc71b: 90 nop ffffffff810cc71c: 90 nop ffffffff810cc71d: 90 nop ffffffff810cc71e: 90 nop ffffffff810cc71f: 90 nop AFAICS the cost is primarily not to core.o and fair.o though (which contain most performance sensitive scheduler functions), only to syscalls.o that get called with much lower frequency - so I think this is an acceptable trade-off for better code separation. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Mel Gorman Link: https://lore.kernel.org/r/20240407084319.1462211-2-mingo@kernel.org commit 04a81b4f9ba1a473af7715168306c23ca4e15a25 Author: Arseniy Krasnov Date: Wed May 8 02:09:03 2024 +0300 mtd: rawnand: meson: read/write access for boot ROM pages Boot ROM on Meson needs some pages to be read/written in a special mode: 384 byte ECC mode (so called "short" by Amlogic) and with scrambling enabled. Such pages are located on the chip in the following way (for example): [ p0 ][ p1 ][ p2 ][ p3 ][ p4 ][ p5 ][ p6 ][ p7 ] ... [ pN ] ^ ^ ^ ^ pX is page number "X". "^" means "special" page used by boot ROM - e.g. every 2nd page in the range of [0, 7]. Step (2 here) and last page in range is read from the device tree. Signed-off-by: Arseniy Krasnov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240507230903.3399594-4-avkrasnov@salutedevices.com commit 2234585f5c12f2a633fff715cca32ce0b40cfa29 Author: Arseniy Krasnov Date: Wed May 8 02:09:02 2024 +0300 mtd: rawnand: meson: refactor use of 'meson_nfc_cmd_access()' Move call 'meson_nfc_cmd_seed()' and check for 'NAND_NEED_SCRAMBLING' to 'meson_nfc_cmd_access()', thus removing code duplication. Signed-off-by: Arseniy Krasnov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240507230903.3399594-3-avkrasnov@salutedevices.com commit 4e976b1521ca5e19fc2c0ba2bae0b97877ad0ef4 Author: Arseniy Krasnov Date: Wed May 8 02:09:01 2024 +0300 dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code Boot ROM code on Meson requires that some pages on NAND must be written in special mode: "short" ECC mode where each block is 384 bytes and scrambling mode is on. Such pages are located on the chip in the following way (for example): [ p0 ][ p1 ][ p2 ][ p3 ][ p4 ][ p5 ][ p6 ][ p7 ] ... [ pN ] ^ ^ ^ ^ pX is page number "X". "^" means "special" page used by boot ROM - e.g. every 2nd page in the range of [0, 7]. Step (2 in example is set by 'amlogic,boot-page-step' field. Last page in range (7 in example) is set by 'amlogic,boot-pages' field. Signed-off-by: Arseniy Krasnov Reviewed-by: Rob Herring (Arm) Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240507230903.3399594-2-avkrasnov@salutedevices.com commit 56813b244e5f2ace887f04c4a69a2a0041992297 Author: Thorsten Blum Date: Mon May 27 11:27:47 2024 +0200 w1: Add missing newline and fix typos in w1_bus_master comment - Add missing newline before @return - s/bytes/byte/ - s/handles/handle/ - s/exists/exist/ in dev_info() message Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240527092746.263038-2-thorsten.blum@toblux.com [krzysztof: squash "w1: Fix typo in dev_info() message"] Signed-off-by: Krzysztof Kozlowski commit cf4ccd1c029e60bae787a9c8f75623b37ec2a558 Author: Andy Shevchenko Date: Wed May 8 18:11:53 2024 +0300 mtd: physmap: Use *-y instead of *-objs in Makefile *-objs suffix is reserved rather for (user-space) host programs while usually *-y suffix is used for kernel drivers (although *-objs works for that purpose for now). Let's correct the old usages of *-objs in Makefiles. Signed-off-by: Andy Shevchenko Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240508151222.1443491-1-andriy.shevchenko@linux.intel.com commit 5350f6ec55df381cd99db2a6bde283328fb3f75a Author: Andy Shevchenko Date: Fri May 3 21:42:30 2024 +0300 mtd: cfi: Get rid of redundant 'else' In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Signed-off-by: Andy Shevchenko Reviewed-by: Jeff Johnson Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240503184230.2927283-1-andriy.shevchenko@linux.intel.com commit 454772c7f7ecf6c51fadb7f35bc3ee430bd86885 Author: Ville Syrjälä Date: Thu May 23 21:28:18 2024 +0300 drm/i915: Bury c8_planes_changed() in intel_color_check() The c8_planes_changed() check in the high level atomic code is a bit of an eyesore. Push it inside intel_color_check() so the high level code doesn't have to care about this stuff. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240523182818.15382-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 325257f2e9cb753a1581f8ca50e84012010d2718 Author: Ville Syrjälä Date: Thu May 23 21:28:17 2024 +0300 drm/i915: Hide the intel_crtc_needs_color_update() inside intel_color_check() Move the intel_crtc_needs_color_update() into intel_color_check() so that the caller doesn't have to care about this. This will also enable us to hide the c8_planes_changed() thing better. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240523182818.15382-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 5f128aa1052e7d28074ac9b5279d0a09232b699a Author: Ville Syrjälä Date: Thu May 23 21:28:16 2024 +0300 drm/i915: Plumb the entire atomic state into intel_color_check() Bunch of stuff in intel_color_check() needs to look at both the old and new crtc states. Currently we do that by digging the full atomic state via the crtc_state->state pointer. That thing is a total footgun if I ever saw one, as it's only valid during specific parts of the atomic flow. A lot of people have been bitten by this thing in the past when trying to use it after it's no longer valid. Take a small step towards elimination of the footgun by not using it in the inte_color_check(). Instead we plumb in the entire atomic state all the way from the top. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240523182818.15382-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 709407de64d971e7f1e6c26b8b845df5c98b56be Author: Yangyu Chen Date: Mon Apr 8 00:28:30 2024 +0800 dt-bindings: riscv: Add T-HEAD C908 compatible The thead,c908 is a RISC-V CPU core from T-HEAD Semiconductor which used in Canaan Kendryte K230 SoC. Signed-off-by: Yangyu Chen Acked-by: Conor Dooley Reviewed-by: Guo Ren Link: https://lore.kernel.org/linux-riscv/tencent_22BA0425B4DF1CA1713B62E4423C1BFBF809@qq.com/ Acked-by: Palmer Dabbelt Signed-off-by: Conor Dooley commit fabdb275e5ed13271d8fa218a22616ba7ae5aeea Author: Ville Syrjälä Date: Fri May 24 18:50:00 2024 +0300 drm/i915: Fix SEL_FETCH_{SIZE,OFFSET} registers Fix up the SEL_FETCH_{SIZE,OFFSET} registers. A classic copy-paste fail on my part. I even had a small test to confirm that the old and new register offsets match, but somehow I must have screwed things up when running it, and likely just ended up comparing the old defines against themselves :/ Cc: Jani Nikula Fixes: 4bfa8a140db3 ("drm/i915: Define SEL_FETCH_PLANE registers via PICK_EVEN_2RANGES()") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240524155000.13358-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c80c4490c280a1678e47d34d2a335a58f1318615 Author: Ingo Molnar Date: Sat May 25 12:45:31 2024 +0000 cleanup: Standardize the header guard define's name At some point during early development, the header must have been named , as evidenced by the header guard name: #ifndef __LINUX_GUARDS_H #define __LINUX_GUARDS_H It ended up being , but the old guard name for a file name that was never upstream never changed. Do that now - and while at it, also use the canonical _LINUX prefix, instead of the less common __LINUX prefix. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/171664113181.10875.8784434350512348496.tip-bot2@tip-bot2 commit f02cfe6950479b04fb75cf8424a852af7c50d3ad Author: Andy Shevchenko Date: Wed May 8 14:41:49 2024 +0300 HSI: ssi_protocol: Remove unused linux/gpio.h linux/gpio.h is deprecated and subject to remove. The driver doesn't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240508114150.958025-1-andriy.shevchenko@linux.intel.com Signed-off-by: Sebastian Reichel commit 46de513068f956b76d68d241a7ad6bc5576d2948 Author: Thorsten Blum Date: Mon May 27 10:36:29 2024 +0200 platform/x86/amd/pmf: Use memdup_user() Switch to memdup_user() to overwrite the allocated memory only once instead of initializing the allocated memory to zero with kzalloc() and then immediately overwriting it with copy_from_user(). Fixes the following Coccinelle/coccicheck warning reported by memdup_user.cocci: WARNING opportunity for memdup_user Signed-off-by: Thorsten Blum Link: https://lore.kernel.org/r/20240527083628.210491-2-thorsten.blum@toblux.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen commit e31de4ed955566c5e6bd7ec3d1d4c9d22e723e8a Author: Tanmay Shah Date: Fri Apr 12 11:37:07 2024 -0700 dts: zynqmp: add properties for TCM in remoteproc Add properties as per new bindings in zynqmp remoteproc node to represent TCM address and size. This patch also adds alternative remoteproc node to represent remoteproc cluster in split mode. By default lockstep mode is enabled and users should disable it before using split mode dts. Both device-tree nodes can't be used simultaneously one of them must be disabled. For zcu102-1.0 and zcu102-1.1 board remoteproc split mode dts node is enabled and lockstep mode dts is disabled. Signed-off-by: Tanmay Shah Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20240412183708.4036007-4-tanmay.shah@amd.com Signed-off-by: Michal Simek commit 5433f0e7427ae4f5b128d89ec16ccaafc9fef5ee Author: Mario Limonciello Date: Thu May 2 11:26:53 2024 +0200 ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well. Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata: ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included). Reviewed-by: Damien Le Moal Signed-off-by: Mario Limonciello [cassel: rebased and reworded commit message] Signed-off-by: Niklas Cassel commit b363a45913d211990b9a42123690518dd3f499c4 Author: Marek Szyprowski Date: Fri May 10 09:06:53 2024 +0200 clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE Since commit 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to module driver") this driver is instantiated as MFD-cell (matched by platform device name) not as a real platform device created by OF code. Remove then of_match_table and change related MODULE_DEVICE_TABLE to simple MODULE_ALIAS to avoid further confusion. Signed-off-by: Marek Szyprowski Reviewed-by: Sam Protsenko Reviewed-by: Will McVicker Link: https://lore.kernel.org/r/20240510070653.537089-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 375c4d1583948cf2439833e4a85d5a0aee853895 Merge: 983095eaf6c16 1613e604df0cd Author: Maxime Ripard Date: Mon May 27 11:08:31 2024 +0200 Merge drm/drm-next into drm-misc-next Let's start the new release cycle. Signed-off-by: Maxime Ripard commit e88c1714b2c7b230c799a00973bdeb374c765c06 Author: Po-Hao Huang Date: Wed May 22 10:45:31 2024 +0800 wifi: rtw89: Fix P2P behavior for WiFi 7 chips Previously we used CCK rate when scanning for P2P on WiFi 7 chips. Fix this by explicitly setting the rate to OFDM 6Mbps. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240522024531.11401-1-pkshih@realtek.com commit 85e02a0aee586d031c3804de488e67daf8e16f9f Author: Ping-Ke Shih Date: Wed May 22 10:38:30 2024 +0800 wifi: rtw89: add LDPC and STBC to rx_status and radiotap known fields for monitor mode Add LDPC and STBC to rx_status by hardware PPDU status, and set them as known fields of radiotap, so we can check these capabilities in monitor mode. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240522023830.9798-2-pkshih@realtek.com commit f12fc2065647f8032fef2b43ad17843fc82ef456 Author: Ping-Ke Shih Date: Wed May 22 10:38:29 2024 +0800 wifi: rtw89: fill STBC and LDPC capabilities to TX descriptor Fill STBC and LDPC fields to get better performance when transmitting under noisy environment. Old chips like 8852AE use firmware command to enable these two capabilities, but newer chips must use TX descriptor. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240522023830.9798-1-pkshih@realtek.com commit 5b9d292ea87c836ec47483f98344cb0e7add82fe Author: Yazen Ghannam Date: Thu May 23 10:56:34 2024 -0500 x86/mce: Remove unused variable and return value in machine_check_poll() The recent CMCI storm handling rework removed the last case that checks the return value of machine_check_poll(). Therefore the "error_seen" variable is no longer used, so remove it. Fixes: 3ed57b41a412 ("x86/mce: Remove old CMCI storm mitigation code") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240523155641.2805411-3-yazen.ghannam@amd.com Signed-off-by: Borislav Petkov (AMD) commit d174ebd41280fdd3fd3b1d10c46b48d29a14c56f Author: Vasileios Amoiridis Date: Mon May 13 01:05:21 2024 +0200 iio: pressure: bmp280: Introduce new cleanup routines Introduce new linux/cleanup.h with the guard(mutex) functionality. Suggested-by: Andy Shevchenko Suggested-by: Jonathan Cameron Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240512230524.53990-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 5d6e6c6ec45d1bf077d42ccb759bbdb7c26778e2 Author: Vasileios Amoiridis Date: Mon May 13 01:05:20 2024 +0200 iio: pressure: bmp280: Refactorize reading functions For BMP18x, BMP28x, BME280, BMP38x the reading of the pressure value requires an update of the t_fine variable which happens through reading the temperature value. So all the bmpxxx_read_press() functions of the above sensors are internally calling the equivalent bmpxxx_read_temp() function in order to update the t_fine value. By just looking at the code this functionality is a bit hidden and is not easy to understand why those channels are not independent. This commit tries to clear these things a bit by splitting the bmpxxx_{read/compensate}_{temp/press/humid}() to the following: i. bmpxxx_read_{temp/press/humid}_adc(): read the raw value from the sensor. ii. bmpxx_calc_t_fine(): calculate the t_fine variable. iii. bmpxxx_get_t_fine(): get the t_fine variable. iv. bmpxxx_compensate_{temp/press/humid}(): compensate the adc values and return the calculated value. v. bmpxxx_read_{temp/press/humid}(): combine calls of the aforementioned functions to return the requested value. Suggested-by: Jonathan Cameron Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240512230524.53990-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit f0fcd87e74295150ec2f811801ef52835d30d3bf Author: Vasileios Amoiridis Date: Wed May 8 18:52:02 2024 +0200 iio: pressure: bmp280: Use unsigned data types for raw sensor data The raw sensor data that have not been compensated yet cannot be signed values, so use unsigned ones. Also, compensated pressure values cannot be negative so use unsigned also there. Also, drop redundant cast of data->t_fine variable from s32 to s32. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240508165207.145554-5-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 3b3b0cf4fdd5a6dd46a6a5f4fa44528ead63a044 Author: Vasileios Amoiridis Date: Wed May 8 18:52:01 2024 +0200 iio: pressure: bmp280: Make error checks consistent The form 'if (ret)' is used in this driver in order to check for returned error values. There are also some places that 'if (ret < 0)' is used but for no specific reason. Change them to 'if (ret)' to make the driver more consistent. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240508165207.145554-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 6047c11e4ae260f3cb5c6d5be0d8c30a467be081 Author: Vasileios Amoiridis Date: Wed May 8 18:52:00 2024 +0200 iio: pressure: bmp280: Remove, add and update error messages Remove duplicate error messages, add missing error messages and update redundant ones. Add one missing error check. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240508165207.145554-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 081cea88a61a33c17d86270390a88b2e71c25475 Author: Vasileios Amoiridis Date: Wed May 8 18:51:59 2024 +0200 iio: pressure: bmp280: Remove dead error checks The ret value is being checked already in all the previous paths which exit in case of error, so this path can never become true. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240508165207.145554-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 4391affa107d68b6c3e5222264e91bbc21793cf0 Author: Uwe Kleine-König Date: Wed May 8 09:29:27 2024 +0200 iio: 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. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240508072928.2135858-2-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron commit 1b5a2466b72e1afe550c8568e072f6b2af1698d5 Author: Vasileios Amoiridis Date: Mon Apr 29 21:00:40 2024 +0200 iio: pressure: bmp280: Add more intuitive name for bmp180_measure() The bmp180_measure() function essentially waits for the end of the current conversion in order to read the values from the sensors. The name bmp180_measure() could be misinterpreted because it could be translated as "measure sensor values" even though it was probably trying to say "measure time for eoc". Give a more intuitive name to this function to be less confusing. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240429190046.24252-5-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 990570dab056e9467fa73d41dd75ddb3150eb636 Author: Vasileios Amoiridis Date: Mon Apr 29 21:00:39 2024 +0200 iio: pressure: bmp280: Add identifier names in function definitions checkpatch.pl complained about missing identifier names in the input variables for some function definitions. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240429190046.24252-4-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit b23be4cd99a6f1f46963b87952632268174e62c1 Author: Vasileios Amoiridis Date: Mon Apr 29 21:00:38 2024 +0200 iio: pressure: bmp280: Use BME prefix for BME280 specifics Change the rest of the defines and function names that are used specifically by the BME280 humidity sensor to BME280 as it is done for the rest of the BMP{0,1,3,5}80 sensors. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240429190046.24252-3-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 439ce8961bdd2e925c1f6adc82ce9fe3931e2c08 Author: Vasileios Amoiridis Date: Mon Apr 29 21:00:37 2024 +0200 iio: pressure: bmp280: Improve indentation and line wrapping Fix indentations that are not following the standards, remove extra white lines and add missing white lines. Signed-off-by: Vasileios Amoiridis Link: https://lore.kernel.org/r/20240429190046.24252-2-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron commit 6de2f3a1f4bb6abb01c0922c753544ec7f349dd4 Author: Matti Vaittinen Date: Tue Apr 30 15:45:21 2024 +0300 iio: test: gts: test available times and gains sorting The iio_gts helpers build available times and scales tables based on the times and gains arrays given from the driver. The driver should be able to list all valid register values so that conversion from register valu to correct gain/time works for all supported register values. It might be more convenient for drivers to list these times and gains in the order where they're listed in the data-sheet than ascending order. However, for user who requests the supported scales / times it is more convenient to get the results in asscending order. Also, listing duplicated values is not meaning for the user. Hence the GTS heler should do sorting and deduplication of the scales and times when it builds the tables listing the available times/scales. Note, currently duplicated gain values aren't handled by GTS-helpers. Unsort the gain and time arrays in the test code, and add duplicates to time array in order to test the sorting and deduplicating works. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/365cc6de3c17a457db738f5fdf8dd3bd6f50d5f2.1714480171.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 5acc3f971a01be48d5ff4252d8f9cdb87998cdfb Author: Chenyuan Yang Date: Tue Apr 30 15:44:53 2024 +0300 iio: Fix the sorting functionality in iio_gts_build_avail_time_table The sorting in iio_gts_build_avail_time_table is not working as intended. It could result in an out-of-bounds access when the time is zero. Here are more details: 1. When the gts->itime_table[i].time_us is zero, e.g., the time sequence is `3, 0, 1`, the inner for-loop will not terminate and do out-of-bound writes. This is because once `times[j] > new`, the value `new` will be added in the current position and the `times[j]` will be moved to `j+1` position, which makes the if-condition always hold. Meanwhile, idx will be added one, making the loop keep running without termination and out-of-bound write. 2. If none of the gts->itime_table[i].time_us is zero, the elements will just be copied without being sorted as described in the comment "Sort times from all tables to one and remove duplicates". For more details, please refer to https://lore.kernel.org/all/6dd0d822-046c-4dd2-9532-79d7ab96ec05@gmail.com. Reported-by: Chenyuan Yang Suggested-by: Matti Vaittinen Fixes: 38416c28e168 ("iio: light: Add gain-time-scale helpers") Signed-off-by: Chenyuan Yang Co-developed-by: Matti Vaittinen Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/d501ade8c1f7b202d34c6404eda423489cab1df5.1714480171.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit e5073e9ccfc648c6ec4bead45b6f5d8bc3b115bf Author: Danila Tikhonov Date: Sun May 5 07:36:55 2024 +0200 dt-bindings: iio: imu: bmi160: add bmi120 Document bosch,bmi120 compatible. Signed-off-by: Danila Tikhonov Signed-off-by: Barnbás Czémán Acked-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240505-bmi120-v3-2-15cee3d0b2ef@gmail.com Signed-off-by: Jonathan Cameron commit cedb9bd816694736dc27a02b123b62395205181d Author: Danila Tikhonov Date: Sun May 5 07:36:54 2024 +0200 iio: imu: bmi160: add support for bmi120 Add support for bmi120 low power variant of bmi160. Relax failure to match ID to a warning rather than probe fail. This allows for fallback compatibles, whilst retaining a useful debugging message if they turn out not to be so compatible due to badly behaved firmware. Signed-off-by: Danila Tikhonov Co-developed-by: Barnabás Czémán Signed-off-by: Barnabás Czémán Link: https://lore.kernel.org/r/20240505-bmi120-v3-1-15cee3d0b2ef@gmail.com Signed-off-by: Jonathan Cameron commit eef3681983e583bec87a114f4c53ed0dc8c77f1e Author: Christophe JAILLET Date: Wed May 1 14:55:17 2024 +0200 iio: light: gp2ap020a00f: Remove some unused field in struct gp2ap020a00f_data In "struct gp2ap020a00f_data", the 'pdata' field is unused. Moreover the "struct gp2ap020a00f_platform_data" is defined nowhere. Neither in this file, nor in a global .h file, so it is completely pointless. So, remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/57e9f29c7062d1bb846064bf6dbd7a8385a855e7.1714568099.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron commit e1c313e04741ac045b1350e83d42cfc08db5e58f Author: Christophe JAILLET Date: Wed May 1 13:28:50 2024 +0200 iio: tmag5273: Remove some unused field in struct tmag5273_data In "struct tmag5273_data", the 'scale' and 'vcc' fields are unused. Remove them. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET Reviewed-by: Gerald Loacker Link: https://lore.kernel.org/r/7bd16d7fea12c64b6b3dc3cd32839cfce145bcf3.1714562912.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron commit 2625b8eaccae72d4f9b4992f92aaf2b7b5b89f73 Author: Christophe JAILLET Date: Wed May 1 11:41:54 2024 +0200 iio: multiplexer: Remove an unused field in struct mux In "struct mux", the 'indio_dev' field is unused. Remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/7bb04abdc2815caf090a6c9ecab2a51d837792a7.1714556499.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron commit f8107cd6f9b9279544f6ee917919b15d95c6385c Author: Christophe JAILLET Date: Wed May 1 11:19:41 2024 +0200 iio: temperature: max30208: Remove an unused field in struct max30208_data In "struct max30208_data", the 'indio_dev' field is unused. Remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/73f9f540ecdc7c10e833e6fc782324ae7d34ba9c.1714555144.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron commit f26cc90a463646a2246c4c90eeaef5f5f624ea74 Author: Jorge Harrisonn Date: Wed May 1 18:57:23 2024 -0300 iio: adc: ad7606: using claim_direct_scoped for code simplification Using iio_device_claim_direct_scoped instead of calling `iio_device _claim_direct_modeand later callingiio_device_release_direct_mode` This should make code cleaner and error handling easier Co-authored-by: Lais Nuto Signed-off-by: Lais Nuto Signed-off-by: Jorge Harrisonn Link: https://lore.kernel.org/r/20240501215724.26655-2-jorge.harrisonn@usp.br Signed-off-by: Jonathan Cameron commit 9e305a6f01ad539dc134b8017521495378d8e00e Author: Ping-Ke Shih Date: Tue May 21 12:01:39 2024 +0800 wifi: rtw89: 8852c: correct logic and restore PCI PHY EQ after device resume PCI PHY EQ value is missing after card off/on, so update the value after device resume. The original commit only updates once at probe stage, which could lead problem after suspend/resume. The logic should be read a value from one register and write to another register with a mask to avoid affecting unrelated bits. Fixes: a78d33a1286c ("wifi: rtw89: 8852c: disable PCI PHY EQ to improve compatibility") Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240521040139.20311-1-pkshih@realtek.com commit ede18982f19942c7333530cf4fbf271e318df1b2 Author: Yazen Ghannam Date: Thu May 23 10:56:33 2024 -0500 x86/mce/inject: Only write MCA_MISC when a value has been supplied The MCA_MISC register is used to control the MCA thresholding feature on AMD systems. Therefore, it is not generally part of the error state that a user would adjust when testing non-thresholding cases. However, MCA_MISC is unconditionally written even if a user does not supply a value. The default value of '0' will be used and clobber the register. Write the MCA_MISC register only if the user has given a value for it. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240523155641.2805411-2-yazen.ghannam@amd.com commit 0edb555a65d1ef047a9805051c36922b52a38a9d Author: Uwe Kleine-König Date: Mon Oct 9 12:37:26 2023 +0200 platform: Make platform_driver::remove() return void struct platform_driver::remove returning an integer made driver authors expect that returning an error code was proper error handling. However the driver core ignores the error and continues to remove the device because there is nothing the core could do anyhow and reentering the remove callback again is only calling for trouble. To prevent such wrong assumptions, change the return type of the remove callback to void. This was prepared by introducing an alternative remove callback returning void and converting all drivers to that. So .remove() can be changed without further changes in drivers. This corresponds to step b) of the plan outlined in commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value"). Signed-off-by: Uwe Kleine-König commit 45e7d78ef5e93520e574c05d27bcb3b69234486c Author: Uwe Kleine-König Date: Fri Mar 8 09:51:21 2024 +0100 samples: qmi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/d30beb557e0e97ea194028f62d3c4c10841d3e7c.1709886922.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 4998f389c981f092d2aceab5b47163c5ef7f4d0f Author: Uwe Kleine-König Date: Wed Apr 10 15:47:34 2024 +0200 nvdimm/of_pmem: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/8de0900f8c9f40648295fd9e2f445c85b2593d26.1712756722.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 521558275731c040136ebdd6dfc84864ce9d9a96 Author: Uwe Kleine-König Date: Wed Apr 10 15:47:33 2024 +0200 nvdimm/e820: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/fcb5545d45cf31caee31e0c66ed3521ead12c9b4.1712756722.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 4402a5aa9732d870753ba7b945c812d9bd64f1c9 Author: Uwe Kleine-König Date: Tue Apr 9 19:02:51 2024 +0200 gpu: ipu-v3: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert the ipu-v3 platform drivers from always returning zero in the remove callback to the void returning variant. Reviewed-by: Philipp Zabel Reviewed-by: Thomas Zimmermann Link: https://lore.kernel.org/r/dee3c0e1c8c6bd1027a91c65be55ac1d6ba9e099.1712681770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 17e1b2db37df9b06f586b960e2a30379d6bc1c1c Author: Uwe Kleine-König Date: Tue Apr 9 19:02:50 2024 +0200 gpu: host1x: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Thierry Reding Reviewed-by: Thomas Zimmermann Link: https://lore.kernel.org/r/7e31909b1e536f0ddbb060b1aaa0a9e943687c8a.1712681770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 573a39d05053cb234a9ac3c7b0b359fb3258bd76 Author: Uwe Kleine-König Date: Tue Apr 9 19:02:49 2024 +0200 drm/mediatek: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Link: https://lore.kernel.org/r/4a64dfbfbcfdf9b7cd46bc8026223e69a4b453b4.1712681770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit bf9ca9f36975efc8306622d29e521cb5459bd168 Author: Uwe Kleine-König Date: Tue Apr 9 19:02:48 2024 +0200 drm/imagination: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Matt Coster Acked-by: Matt Coster Reviewed-by: Thomas Zimmermann Link: https://lore.kernel.org/r/4cf10e420863f40a268f26b9bdb0c4b53dbf3406.1712681770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 1cb394e644a000aa6dbe92d1278c712ddc5bbcf0 Author: Uwe Kleine-König Date: Tue Apr 9 18:50:43 2024 +0200 gpu: host1x: mipi: Benefit from devm_clk_get_prepared() When using devm_clk_get_prepared() instead of devm_clk_get() the clock is already returned prepared. So probe doesn't need to call clk_prepare() and at remove time the call to clk_unprepare() can be dropped. The latter makes the remove callback empty, so it can be dropped, too. Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20240409165043.105137-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 49fc3ffe9f7c239319f009ce3f5dd0cc5bfc64fa Author: Uwe Kleine-König Date: Fri Mar 8 09:51:15 2024 +0100 pps: clients: gpio: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Rodolfo Giometti Link: https://lore.kernel.org/r/f4b9402af72e5f285c8b0f068076a76418f653f5.1709886922.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 29f102dbb11fe1b2f4ea68e3a5721255f37f8bc6 Author: Uwe Kleine-König Date: Tue Mar 5 22:21:00 2024 +0100 fsi: occ: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lists.ozlabs.org/pipermail/linux-fsi/2024-March/000613.html Acked-by: Jeremy Kerr Signed-off-by: Uwe Kleine-König commit 826788bbad497a65687ac32bb8468c4e25b7f702 Author: Uwe Kleine-König Date: Tue Mar 5 22:20:59 2024 +0100 fsi: master-gpio: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Jeremy Kerr Link: https://lists.ozlabs.org/pipermail/linux-fsi/2024-March/000612.html Signed-off-by: Uwe Kleine-König commit d1c9c5a03b6507e8dc8fe9656d5ab4b9582c3d1c Author: Uwe Kleine-König Date: Tue Mar 5 22:20:58 2024 +0100 fsi: master-ast-cf: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Jeremy Kerr Link: https://lists.ozlabs.org/pipermail/linux-fsi/2024-March/000614.html Signed-off-by: Uwe Kleine-König commit 41929cce09f991992f16608fb5adfd3c2f809adb Author: Uwe Kleine-König Date: Tue Mar 5 22:20:57 2024 +0100 fsi: master-aspeed: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Jeremy Kerr Link: https://lore.kernel.org/r/de0f2d4cb529a433d4620ca0e8fda0dfb1e950db.1709673414.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit eef3811433a53b7db2ea7d2be809e23a70ff42bc Merge: 1613e604df0cd 6d89df61650d1 Author: Uwe Kleine-König Date: Sat May 25 13:07:49 2024 +0200 Merge branch 'reset/next' of git://git.pengutronix.de/pza/linux Philipp didn't come around to send a pull request in the last development cycle. His next branch only contains patches converting three platform drivers to stop using .remove(). They are merged with his consent to be able to change the prototype of .remove() in the upcoming development cycle. Link: https://lore.kernel.org/all/9b7e1a88a812f5c86ada75b094c95b9cf65891c3.camel@pengutronix.de/ commit 983095eaf6c161ef73d96152bfc1a99ca051cd57 Author: Christophe JAILLET Date: Sat May 25 18:00:31 2024 +0200 dma-buf/fence-array: Add flex array to struct dma_fence_array This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1][2]. The "struct dma_fence_array" can be refactored to add a flex array in order to have the "callback structures allocated behind the array" be more explicit. Do so: - makes the code more readable and safer. - allows using __counted_by() for additional checks - avoids some pointer arithmetic in dma_fence_array_enable_signaling() Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/160 [2] Signed-off-by: Christophe JAILLET Reviewed-by: Kees Cook Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/8b4e556e07b5dd78bb8a39b67ea0a43b199083c8.1716652811.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christian König commit 49e950487b3e55cbc8bf9f7062e7094f052d11bf Author: Mukesh Ojha Date: Fri May 17 01:05:33 2024 +0530 arm64: dts: qcom: sm8650: Enable download mode register write Enable download mode setting for sm8650 which can help collect ramdump for this SoC. Signed-off-by: Mukesh Ojha Reviewed-by: Elliot Berman Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/1715888133-2810-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Bjorn Andersson commit 65424b99a1c24ef668b3c0ab0ca98e415b3e0f06 Author: Jeff Johnson Date: Thu May 16 17:19:10 2024 -0700 clk: qcom: add missing MODULE_DESCRIPTION() macros Fix the following from 'make W=1' with allmodconfig: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/qcom/clk-qcom.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/qcom/gcc-msm8976.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/qcom/lpass-gfm-sm8250.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/clk/qcom/videocc-sdm845.o Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240516-qcom-clk-md-v1-1-baca27dd2fb2@quicinc.com Signed-off-by: Bjorn Andersson commit 47ef58cdbd7fae42f1adcb6015fdc05ce2b2471e Author: Tzung-Bi Shih Date: Tue Apr 30 10:09:24 2024 +0800 platform/chrome: cros_ec: let cros_ec_suspend() call cros_ec_suspend_* After commit 2fbe479c0024 ("platform/chrome: cros_ec: Handle events during suspend after resume completion"), cros_ec_resume() starts to call cros_ec_resume_early() and cros_ec_resume_complete(). To be neat, let cros_ec_suspend() call cros_ec_suspend_prepare() and cros_ec_suspend_late(). Reviewed-by: Prashant Malani Link: https://lore.kernel.org/r/20240430020924.610724-1-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih commit c48a71a8877241e44cdc84f479ed57a9c1c62c15 Author: Thomas Weißschuh Date: Fri May 24 10:33:34 2024 +0200 platform/chrome: cros_ec_proto: Fix cros_ec_get_host_command_version_mask kdoc Mark the documentation block as kernel doc and drop the documentation of the non-existing parameter "@msg". Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240524-cros_ec-cmd_versions-v1-2-8a148647d051@weissschuh.net Signed-off-by: Tzung-Bi Shih commit d1019a74e0f562c3c60d1bdcf73048bea0f1cb24 Author: Thomas Weißschuh Date: Fri May 24 10:33:33 2024 +0200 platform/chrome: cros_ec_proto: Fix cros_ec_get_host_event_wake_mask kdoc Mark the documentation block as kernel doc and drop the documentation of the non-existing parameter "@msg". Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20240524-cros_ec-cmd_versions-v1-1-8a148647d051@weissschuh.net Signed-off-by: Tzung-Bi Shih commit 4d3fadbcd63372e9a1cd15701f882ece252437f4 Author: Komal Bajaj Date: Thu May 2 14:33:26 2024 +0530 arm64: dts: qcom: qru1000-idp: enable USB nodes Enable both USB controllers and associated hsphy and qmp phy nodes on QRU1000 IDP. Co-developed-by: Amrit Anand Signed-off-by: Amrit Anand Signed-off-by: Komal Bajaj Link: https://lore.kernel.org/r/20240502090326.21489-4-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit 00ea07cd1c884efe4b02a5a61794673054547488 Author: Komal Bajaj Date: Thu May 2 14:33:25 2024 +0530 arm64: dts: qcom: qdu1000-idp: enable USB nodes Enable both USB controllers and associated hsphy and qmp phy nodes on QDU1000 IDP. Co-developed-by: Amrit Anand Signed-off-by: Amrit Anand Signed-off-by: Komal Bajaj Link: https://lore.kernel.org/r/20240502090326.21489-3-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit dd1bd5bf7420497aace9521d314f6c7e22f22118 Author: Komal Bajaj Date: Thu May 2 14:33:24 2024 +0530 arm64: dts: qcom: qdu1000: Add USB3 and PHY support Add devicetree nodes for enabling USB3 controller, Qcom QMP PHY and SNPS HS PHY on QDU1000/QRU1000 SoCs. Also add required pins for USB, so that the interface can work reliably. Co-developed-by: Amrit Anand Signed-off-by: Amrit Anand Signed-off-by: Komal Bajaj Link: https://lore.kernel.org/r/20240502090326.21489-2-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit c1aefeae8cb7b71c1bb6d33b1bda7fc322094e16 Author: Dmitry Baryshkov Date: Wed May 1 19:19:39 2024 +0300 arm64: dts: qcom: msm8996-xiaomi-common: drop excton from the USB PHY The USB PHYs don't use extcon connectors, drop the extcon property from the hsusb_phy1 node. Fixes: 46680fe9ba61 ("arm64: dts: qcom: msm8996: Add support for the Xiaomi MSM8996 platform") Cc: Yassine Oudjana Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-13-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 4edbcf264fe2c0167e0b0b0af060bc767e01f9f3 Author: Dmitry Baryshkov Date: Wed May 1 19:19:38 2024 +0300 arm64: dts: qcom: sda660-ifc6560: document missing USB PHY supplies On the IFC6560 one of the USB PHY supplies is the L10A power supply. However this regulator also supplies VDDA_APC1_CS, VDD_PLL2 and VDD_P11 consumers. Touching the supply causes the board to be reset. Document the supply as a fixed always-on regulator. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-12-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 27d3f57cf5a71484ea38770d4bfd10f6ef035cf4 Author: Dmitry Baryshkov Date: Wed May 1 19:19:37 2024 +0300 arm64: dts: qcom: sm8450: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-11-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 634acc8cea1584b507801315831a330443f819b4 Author: Dmitry Baryshkov Date: Wed May 1 19:19:36 2024 +0300 arm64: dts: qcom: sm8350: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: 59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-10-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 154ed5ea328d8a97a4ef5d1447e6f06d11fe2bbe Author: Dmitry Baryshkov Date: Wed May 1 19:19:35 2024 +0300 arm64: dts: qcom: sm8250: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: b7e2fba06622 ("arm64: dts: qcom: sm8250: Add UFS controller and PHY") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-9-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 18c2727282c5264ff5502daac26c43000e8eb202 Author: Dmitry Baryshkov Date: Wed May 1 19:19:34 2024 +0300 arm64: dts: qcom: sm6350: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: 5a814af5fc22 ("arm64: dts: qcom: sm6350: Add UFS nodes") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-8-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit a9eb454873a813ddc4578e5c3b37778de6fda472 Author: Dmitry Baryshkov Date: Wed May 1 19:19:33 2024 +0300 arm64: dts: qcom: sm6115: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-7-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit fd39ae8b9bc10419b1e4b849cdbc6755a967ade1 Author: Dmitry Baryshkov Date: Wed May 1 19:19:32 2024 +0300 arm64: dts: qcom: sdm845: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: cc16687fbd74 ("arm64: dts: qcom: sdm845: add UFS controller") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-6-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 9a80ecce60bd4919019a3cdb64604c9b183a8518 Author: Dmitry Baryshkov Date: Wed May 1 19:19:31 2024 +0300 arm64: dts: qcom: sc8180x: add power-domain to UFS PHY The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node. Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-5-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit 48299f604d27dad1168cc90b89f33853162c6e33 Author: Dmitry Baryshkov Date: Wed May 1 19:19:30 2024 +0300 arm64: dts: qcom: sc7180: drop extra UFS PHY compat The DT schema doesn't have a fallback compatible for qcom,sc7180-qmp-ufs-phy. Drop it from the dtsi too. Fixes: 858536d9dc94 ("arm64: dts: qcom: sc7180: Add UFS nodes") Signed-off-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20240501-qcom-phy-fixes-v1-4-f1fd15c33fb3@linaro.org Signed-off-by: Bjorn Andersson commit c5f5de8434ec35d8ccd5b3a746df3afb37bfefeb Author: Mrinmay Sarkar Date: Tue Apr 30 21:51:27 2024 +0530 arm64: dts: qcom: sa8775p: Add ep pcie1 controller node Add ep pcie dtsi node for pcie1 controller found on sa8775p platform. It supports gen4 and x4 link width. Limiting the speed to Gen3 due to stability issue with Gen4. Signed-off-by: Mrinmay Sarkar Link: https://lore.kernel.org/r/1714494089-7917-3-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Bjorn Andersson commit 1924f55182243a762c6926962054e338dbbef40d Author: Mrinmay Sarkar Date: Tue Apr 30 21:25:39 2024 +0530 arm64: dts: qcom: sa8775p: Add ep pcie0 controller node Add ep pcie dtsi node for pcie0 controller found on sa8775p platform. It supports gen4 and x2 link width. Limiting the speed to Gen3 due to stability issues. Signed-off-by: Mrinmay Sarkar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1714492540-15419-4-git-send-email-quic_msarkar@quicinc.com Signed-off-by: Bjorn Andersson commit bfb751d9221361185bd2331dbf6e751e351a6c5d Author: Krzysztof Kozlowski Date: Fri Apr 26 14:31:01 2024 +0200 arm64: dts: qocm: sdx75: align smem node name with coding style Node names should not have vendor prefixes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240426123101.500676-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 355e5d72a4e52c6b7e56913036cb0daa36317b29 Author: Kaushal Kumar Date: Fri Apr 26 16:58:37 2024 +0530 arm64: dts: qcom: sdx75: Add modem SMP2P node Add SMP2P node for the SDX75 platform to communicate with the modem. Signed-off-by: Kaushal Kumar Link: https://lore.kernel.org/r/20240426112837.17478-1-quic_kaushalk@quicinc.com Signed-off-by: Bjorn Andersson commit 91f767eb693881c0424e05866fde3c033c86c2d3 Author: Rohit Agarwal Date: Fri Apr 26 11:23:26 2024 +0530 arm64: dts: qcom: sdx75: Add AOSS node Add AOSS channel devicetree node for Qcom's SDX75 SoC. Signed-off-by: Rohit Agarwal Link: https://lore.kernel.org/r/20240426055326.3141727-7-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 85ab1969865b78dc14af930d0819d52ab9cd6dee Author: Rohit Agarwal Date: Fri Apr 26 11:23:25 2024 +0530 arm64: dts: qcom: sdx75: Add TCSR register space Add TCSR register space devicetree node for accessing different status registers. Signed-off-by: Rohit Agarwal Link: https://lore.kernel.org/r/20240426055326.3141727-6-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 220be0f04eb1c753fdfe8ff95942fbcdc5ed650a Author: Rohit Agarwal Date: Fri Apr 26 11:23:24 2024 +0530 arm64: dts: qcom: sdx75: Add IPCC node Add IPCC devicetree node to Qcom's SDX75 platform. Signed-off-by: Rohit Agarwal Link: https://lore.kernel.org/r/20240426055326.3141727-5-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 7981cf16010257655fe27547bbd1d76be813af1e Author: Rohit Agarwal Date: Fri Apr 26 11:23:23 2024 +0530 dt-bindings: soc: qcom,aoss-qmp: Document the SDX75 AOSS channel Document the Always-On Subsystem side channel on the SDX75 Platform. Signed-off-by: Rohit Agarwal Acked-by: "Rob Herring (Arm)" Link: https://lore.kernel.org/r/20240426055326.3141727-4-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 060bbd65dd4b4bcd519f6c470ec71fc58f9a6190 Author: Eddie James Date: Tue May 14 14:26:30 2024 -0500 spi: dt-bindings: Document the IBM FSI-attached SPI controller IBM Power processors have a SPI controller that can be accessed over FSI from a service processor. Document it. Signed-off-by: Eddie James Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240514192630.152747-1-eajames@linux.ibm.com Signed-off-by: Mark Brown commit a71b7845c0e417f2787a8e2ac77e571fce7dc72c Author: Andy Shevchenko Date: Fri May 10 23:49:45 2024 +0300 spi: Refactor spi_stop_queue() The refactoring makes code less verbose and easier to read. Besides that the binary size is also reduced, which sounds like a win-win case: add/remove: 0/1 grow/shrink: 2/2 up/down: 210/-226 (-16) Function old new delta spi_destroy_queue 42 156 +114 spi_controller_suspend 101 197 +96 spi_unregister_controller 346 319 -27 spi_register_controller 1834 1794 -40 spi_stop_queue 159 - -159 Total: Before=49230, After=49214, chg -0.03% Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240510204945.2581944-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 85ce0dc28ffd4861d91b96f488d31878d8901e49 Author: Kanak Shilledar Date: Tue May 14 12:30:47 2024 +0530 spi: dt-bindings: brcm,bcm2835-spi: convert to dtschema Convert the Broadcom BCM2835 SPI0 controller to newer DT schema. Created DT schema based on the .txt file which had `comaptible`, `reg`, `interrupts`, `clocks` as required properties. Added GPL-2.0 OR BSD-2-Clause License Signed-off-by: Kanak Shilledar Reviewed-by: Conor Dooley Link: https://msgid.link/r/20240514070051.2959-1-kanakshilledar111@protonmail.com Signed-off-by: Mark Brown commit 2d19ea9e8840a1a77b1d464b06e62dd9b0f21e0d Author: Andy Shevchenko Date: Fri May 10 23:49:52 2024 +0300 spi: Replace custom code with device_match_acpi_handle() Since driver core provides a generic device_match_acpi_handle() we may replace the custom code with it. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240510204952.2582093-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit ef901b38d3a4610c4067cd306c1a209f32e7ca31 Author: Chen Ni Date: Wed May 15 16:40:28 2024 +0800 spi: atmel-quadspi: Add missing check for clk_prepare Add check for the return value of clk_prepare() and return the error if it fails in order to catch the error. Fixes: 4a2f83b7f780 ("spi: atmel-quadspi: add runtime pm support") Signed-off-by: Chen Ni Link: https://msgid.link/r/20240515084028.3210406-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown commit 61cabbd5ef7625fe5ece4aa16ccc21c91bc2fc8f Author: Martin Kaiser Date: Mon May 20 18:59:06 2024 +0200 spi: imx: remove empty cleanup function Remove the empty spi_imx_cleanup function. It's ok if a driver does not set the controller->cleanup pointer, the caller does a NULL check. Signed-off-by: Martin Kaiser Link: https://msgid.link/r/20240520165906.164906-1-martin@kaiser.cx Signed-off-by: Mark Brown commit 5bcbbaf0747cfe510814f40f36bbda49b851c956 Author: Rob Herring (Arm) Date: Wed May 22 08:28:58 2024 -0500 spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema The Marvell PXA SSP block is the same or similiar to the MMP2 variant. The only difference in the binding is the PXA version supports DMA (and that's probably a binding difference rather than an actual h/w difference). The old binding didn't belong under 'serial' as it is not a UART. The SSP block also supports audio devices, so 'spi' is not a perfect fit either. As the existing schema for MMP2 is there, just leave things as-is. The examples in the old text binding were pretty out of sync with reality. 'clock-names' and 'ssp-id' aren't documented nor used. Cc: Andy Shevchenko Signed-off-by: Rob Herring (Arm) Link: https://msgid.link/r/20240522132859.3146335-1-robh@kernel.org Signed-off-by: Mark Brown commit 6ecdb0aa4dca62d236a659426e11e6cf302e8f18 Author: David Lechner Date: Wed May 8 11:06:53 2024 -0500 spi: axi-spi-engine: Add SPI_CS_HIGH support The AXI SPI Engine IP core v1.2 added support for SPI_CS_HIGH. This provides the driver implementation to make use of this feature when supported hardware is detected. Signed-off-by: David Lechner Link: https://msgid.link/r/20240508-spi-axi-spi-engine-add-spi_cs_high-support-v1-1-695dd8e45f00@baylibre.com Signed-off-by: Mark Brown commit 196bf3e7fe2267ed7c1a193338d0aacecb9f9ff8 Author: Andy Shevchenko Date: Fri May 17 22:42:02 2024 +0300 spi: gpio: Use traditional pattern when checking error codes Instead of 'if (!ret)' switch to "check for the error first" rule. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240517194246.747427-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 04518cd88776721960aff724049138a8bd929c59 Author: Andy Shevchenko Date: Fri May 17 22:42:01 2024 +0300 spi: gpio: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Include mod_devicetable.h explicitly to replace the dropped of.h which included mod_devicetable.h indirectly. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240517194246.747427-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit b90cc232e2ce8c959b19dc4b183e23e7aec137ab Author: Andy Shevchenko Date: Fri May 17 22:40:22 2024 +0300 spi: bitbang: Replace hard coded number of SPI modes Instead of using hard coded number of modes, replace it with SPI_MODE_X_MASK + 1 to show relation to the SPI modes. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240517194104.747328-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit c3358a746e078d0f9048732c90fdab4f37c00e0d Author: Andy Shevchenko Date: Fri May 17 22:40:21 2024 +0300 spi: bitbang: Convert unsigned to unsigned int Simple type conversion with no functional change implied. While at it, adjust indentation where it makes sense. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240517194104.747328-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f261172d39f358dcecce13c310690d3937e0cca6 Author: Andy Shevchenko Date: Fri May 17 22:40:20 2024 +0300 spi: bitbang: Use typedef for txrx_*() callbacks With a typedef for the txrx_*() callbacks the code looks neater. Note that typedef for a function is okay to have. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20240517194104.747328-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9c84429324ea2b5bc537ef8ec7d3727579d37116 Author: Prajna Rajendra Kumar Date: Tue May 14 11:45:08 2024 +0100 spi: spi-microchip-core: Add support for GPIO based CS The SPI "hard" controller within the PolarFire SoC is capable of handling eight CS lines, but only one CS line is wired. Therefore, use GPIO descriptors to configure additional CS lines. Signed-off-by: Prajna Rajendra Kumar Link: https://msgid.link/r/20240514104508.938448-4-prajna.rajendrakumar@microchip.com Acked-by: Conor Dooley Signed-off-by: Mark Brown commit a7ed3a11202d90939a3d00ffcc8cf50703cb7b35 Author: Prajna Rajendra Kumar Date: Tue May 14 11:45:07 2024 +0100 spi: spi-microchip-core: Fix the number of chip selects supported The SPI "hard" controller in PolarFire SoC has eight CS lines, but only one CS line is wired. When the 'num-cs' property is not specified in the device tree, the driver defaults to the MAX_CS value, which has been fixed to 1 to match the hardware configuration; however, when the 'num-cs' property is explicitly defined in the device tree, it overrides the default value. Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers") Signed-off-by: Prajna Rajendra Kumar Reviewed-by: Conor Dooley Link: https://msgid.link/r/20240514104508.938448-3-prajna.rajendrakumar@microchip.com Signed-off-by: Mark Brown commit 3b4c0fbc19930af0904fb5995ed4e7b6ffe0b237 Author: Prajna Rajendra Kumar Date: Tue May 14 11:45:06 2024 +0100 spi: dt-bindings: Add num-cs property for mpfs-spi The PolarFire SoC SPI "hard" controller supports eight CS lines, out of which only one CS line is physically wired. The default value of 'num-cs' was never set and it did not didn't impose a maximum value. To reflect this hardware limitation in the device tree, the binding enforces that the 'num-cs' property cannot exceed 1 unless additional CS lines are explicitly defined using GPIO descriptors. Fixes: 2da187304e55 ("spi: add bindings for microchip mpfs spi") Signed-off-by: Prajna Rajendra Kumar Link: https://msgid.link/r/20240514104508.938448-2-prajna.rajendrakumar@microchip.com Reviewed-by: Conor Dooley Signed-off-by: Mark Brown commit 41b86b1455079600fa2b13e59f7c6f256d1d3131 Author: Miquel Raynal Date: Wed May 22 16:52:55 2024 +0200 spi: wpcm-fiu: differentiate between unsupported and invalid requests When the requested dirmap accesses are outside of the window, it is probably more sensible to return -EINVAL rather than an "unsupported" error code. If however the operation in itself is not supported, then -EOPNOTSUP is likely going to be preferred as it is a standard error code. >From a caller (and reviewer) point of view, distinguising between the two may be helpful because somehow one can be "fixed" while the other will always be refused no matter how hard we try. As part of a wider work to bring spi-nand continuous reads, it was useful to easily catch the upper limit direct mapping boundaries for each controller, with the idea of enlarging this area from a page to an eraseblock, without risking too many regressions. Signed-off-by: Miquel Raynal Link: https://msgid.link/r/20240522145255.995778-5-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 615725a9a8c8aa0976a1469b88a1e5d696e25eb0 Author: Miquel Raynal Date: Wed May 22 16:52:54 2024 +0200 spi: rpc-if: differentiate between unsupported and invalid requests If the request is out of range, returning -EINVAL seems a better pick than -ENOTSUPP. >From a caller (and reviewer) point of view, distinguising between the two may be helpful because somehow one can be "fixed" while the other will always be refused no matter how hard we try. As part of a wider work to bring spi-nand continuous reads, it was useful to easily catch the upper limit direct mapping boundaries for each controller, with the idea of enlarging this area from a page to an eraseblock, without risking too many regressions. In all other cases, as part of a wider work towards using -EOPNOTSUP rather than -ENOTSUPP (which is not a SUSV4 code), let's change the error code to be uniform across spi-mem controller drivers. Finally, reword a little bit the conditions to clarify what is intended (ie. checking for the presence of a direct mapping, and also ensuring we create a dirmap only on DATA_IN flows). Signed-off-by: Miquel Raynal Link: https://msgid.link/r/20240522145255.995778-4-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 5e657a8e660c0fcafa83527d3a7f4f447f4a9364 Author: Miquel Raynal Date: Wed May 22 16:52:53 2024 +0200 spi: mxic: differentiate between unsupported and invalid requests If the request is out of range, returning -EINVAL seems sensible. However if there is no direct mapping available (which is a possible case), no direct mapping will ever be allowed, hence -EOPNOTSUP is probably more relevant in this case. >From a caller (and reviewer) point of view, distinguising between the two may be helpful because somehow one can be "fixed" while the other will always be refused no matter how hard we try. As part of a wider work to bring spi-nand continuous reads, it was useful to easily catch the upper limit direct mapping boundaries for each controller, with the idea of enlarging this area from a page to an eraseblock, without risking too many regressions. Signed-off-by: Miquel Raynal Link: https://msgid.link/r/20240522145255.995778-3-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 19a9aa9302276d49a4c4890f656359808d3a0151 Author: Miquel Raynal Date: Wed May 22 16:52:52 2024 +0200 spi: dw: differentiate between unsupported and invalid requests The driver does not support dirmap write operations, return -EOPTNOTSUPP in this case. Most controllers have a maximum linear mapping area. Requests beyond this limit can be considered invalid, rather than unsupported. >From a caller (and reviewer) point of view, distinguising between the two may be helpful because somehow one can be "fixed" while the other will always be refused no matter how hard we try. As part of a wider work to bring spi-nand continuous reads, it was useful to easily catch the upper limit direct mapping boundaries for each controller, with the idea of enlarging this area from a page to an eraseblock, without risking too many regressions. Signed-off-by: Miquel Raynal Link: https://msgid.link/r/20240522145255.995778-2-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 837e53f766fe9423fcb4e0eacbb3b7ff0e33103c Author: Ji Sheng Teoh Date: Wed May 8 13:47:28 2024 +0800 spi: dt-bindings: spi-cadence: Add optional reset control Document the optional reset control to SPI. Co-developed-by: Eng Lee Teh Signed-off-by: Eng Lee Teh Co-developed-by: Ley Foon Tan Signed-off-by: Ley Foon Tan Signed-off-by: Ji Sheng Teoh Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240508054728.1751162-3-jisheng.teoh@starfivetech.com Signed-off-by: Mark Brown commit 6cf3c0f84d40847843f86e8ead58c92602b2d80d Author: Ji Sheng Teoh Date: Wed May 8 13:47:27 2024 +0800 spi: spi-cadence: Add optional reset control support Add optional reset control support for spi-cadence to properly bring the SPI device into an operating condition. Co-developed-by: Eng Lee Teh Signed-off-by: Eng Lee Teh Co-developed-by: Ley Foon Tan Signed-off-by: Ley Foon Tan Signed-off-by: Ji Sheng Teoh Link: https://msgid.link/r/20240508054728.1751162-2-jisheng.teoh@starfivetech.com Signed-off-by: Mark Brown commit 7a147670035ddec35f3fb2ace538ad56ad82c861 Author: Christophe JAILLET Date: Sun May 12 13:11:21 2024 +0200 regulator: consumer: Reorder fields in 'struct regulator_bulk_data' Based on pahole, 2 holes can be combined in 'struct regulator_bulk_data'. On x86_64 and allmodconfig, this shrinks the size of the structure from 32 to 24 bytes. This is usually a win, because this structure is often used for static global variables. As an example: Before: text data bss dec hex filename 3557 162 0 3719 e87 drivers/gpu/drm/msm/dsi/dsi_cfg.o After: text data bss dec hex filename 3477 162 0 3639 e37 drivers/gpu/drm/msm/dsi/dsi_cfg.o Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/35c4edf2dbc6d4f24fb771341ded2989ae32f779.1715512259.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit aea07a986c2f9d456fcdad21ad14cfc49b3114ab Author: Uwe Kleine-König Date: Mon May 13 10:05:26 2024 +0200 regulator: 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. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/20240513080525.2353168-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit bb064c866d84d2a2147d069a103b5b13c5a5719b Author: Patrick Delaunay Date: Thu May 23 20:04:33 2024 +0200 regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13 Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family. Signed-off-by: Patrick Delaunay Acked-by: Conor Dooley Link: https://msgid.link/r/20240523200353.v4.1.Ia0a99d90acb512aa020a6e7a8cca8cc1b71f1759@changeid Signed-off-by: Mark Brown commit 3267a17bbae1706499b214ec3a7f35a6debcfb40 Author: Patrick Delaunay Date: Thu May 23 20:04:34 2024 +0200 regulator: stm32-pwr: add support of STM32MP13 Add support of the new compatible "st,stm32mp13-pwr-reg" for STM32MP13. Signed-off-by: Patrick Delaunay Link: https://msgid.link/r/20240523200353.v4.2.I04ec53442753147c35efad1307b6ec133f53b471@changeid Signed-off-by: Mark Brown commit c3820641da87442251e0c00b6874ef1022da8f58 Author: Richard Fitzgerald Date: Thu Apr 11 11:37:24 2024 +0100 regmap: kunit: Fix memory leaks in gen_regmap() and gen_raw_regmap() - Use kunit_kcalloc() to allocate the defaults table so that it will be freed when the test case ends. - kfree() the buf and *data buffers on the error paths. - Use kunit_add_action_or_reset() instead of kunit_add_action() so that if it fails it will call regmap_exit(). Signed-off-by: Richard Fitzgerald Link: https://msgid.link/r/20240411103724.54063-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit ed2581305360725381190bc442918e4e5b2b8545 Author: Christophe JAILLET Date: Mon May 13 19:57:16 2024 +0200 ASoC: intel: Constify struct snd_soc_ops Constifying "struct snd_soc_ops" moves some data to a read-only section, so increase overall security. This structure is also part of scripts/const_structs.checkpatch. As an example, on a x86_64, with allmodconfig: Before: text data bss dec hex filename 6315 3696 0 10011 271b sound/soc/intel/boards/ehl_rt5660.o After: text data bss dec hex filename 6379 3648 0 10027 272b sound/soc/intel/boards/ehl_rt5660.o Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/2f0613bf4c6018569cdaac876d0589e49cf38a80.1715622793.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 5dfd8f78b57641530bb674791b66b4ae8a8417f5 Author: Fabio Estevam Date: Tue May 7 14:37:35 2024 -0300 ASoC: fsl: fsl_xcvr: Switch to RUNTIME_PM_OPS() Replace SET_RUNTIME_PM_OPS() with its modern alternative RUNTIME_PM_OPS(). The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://msgid.link/r/20240507173735.3456334-3-festevam@gmail.com Signed-off-by: Mark Brown commit fa14065d71cb0cfe8eb445b23fd313922693a1fa Author: Fabio Estevam Date: Tue May 7 14:37:34 2024 -0300 ASoC: fsl: fsl_easrc: Switch to RUNTIME_PM_OPS() Replace SET_RUNTIME_PM_OPS() with its modern alternative RUNTIME_PM_OPS(). The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://msgid.link/r/20240507173735.3456334-2-festevam@gmail.com Signed-off-by: Mark Brown commit 560495c04d053b98f1349249a8d0545fb25d84ec Author: Fabio Estevam Date: Tue May 7 14:37:33 2024 -0300 ASoC: fsl: fsl_aud2htx: Switch to RUNTIME_PM_OPS() Replace SET_RUNTIME_PM_OPS() with its modern alternative RUNTIME_PM_OPS(). The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam Link: https://msgid.link/r/20240507173735.3456334-1-festevam@gmail.com Signed-off-by: Mark Brown commit 8951ae0b2e096387154fa05887259b405cc05383 Author: Christophe JAILLET Date: Mon May 13 19:37:25 2024 +0200 const_structs.checkpatch: add snd_soc_tplg_ops Now that the soc-topology can handle "const struct snd_soc_tplg_ops" make sure that new usages of the struct already enter the tree as const. Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/6936369a414077265c11115c98364ae21e3cbdda.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit e9c33917932e940348833bf4a1ad3c5ffceb211e Author: Christophe JAILLET Date: Mon May 13 19:37:24 2024 +0200 ASoC: SOF: topology: Constify struct snd_soc_tplg_ops Constifying "struct snd_soc_tplg_ops" moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 44519 2888 48 47455 b95f sound/soc/sof/topology.o After: text data bss dec hex filename 44839 2552 48 47439 b94f sound/soc/sof/topology.o Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/2d9f5b75e979eb38b6f3baf85dfa1f0fdb3447ef.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 9ff6aaf0f7e99798afeda974c83e410e9e2c3026 Author: Christophe JAILLET Date: Mon May 13 19:37:23 2024 +0200 ASoC: Intel: Skylake: Constify struct snd_soc_tplg_ops Constifying "struct snd_soc_tplg_ops" moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 58844 5282 56 64182 fab6 sound/soc/intel/skylake/skl-topology.o After: text data bss dec hex filename 59004 5122 56 64182 fab6 sound/soc/intel/skylake/skl-topology.o Signed-off-by: Christophe JAILLET Reviewed-by: Amadeusz Sławiński Link: https://msgid.link/r/48f096b6dc617ecf3ca53211c2a696a4df33b21a.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 4a341101337fc158b993417a9d2085815b0201da Author: Christophe JAILLET Date: Mon May 13 19:37:22 2024 +0200 ASoC: qdsp6: audioreach: Constify struct snd_soc_tplg_ops Constifying "struct snd_soc_tplg_ops" moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 19942 832 0 20774 5126 sound/soc/qcom/qdsp6/topology.o After: text data bss dec hex filename 20102 652 0 20754 5112 sound/soc/qcom/qdsp6/topology.o Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/a5ae843dd8aaacbc1148aea7a3b1d03f11495872.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit e51c001faa59fd751ef16bac6cf373fb7fc91e9c Author: Christophe JAILLET Date: Mon May 13 19:37:21 2024 +0200 ASoC: Intel: avs: Constify struct snd_soc_tplg_ops Constifying "struct snd_soc_tplg_ops" moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 28046 794 0 28840 70a8 sound/soc/intel/avs/topology.o After: text data bss dec hex filename 28206 614 0 28820 7094 sound/soc/intel/avs/topology.o Signed-off-by: Christophe JAILLET Reviewed-by: Amadeusz Sławiński Link: https://msgid.link/r/01de0157088de0475970c79738284d6c86d702fe.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 734447685ecc7c6328e40cb1bd4aaeeac03c1413 Author: Christophe JAILLET Date: Mon May 13 19:37:20 2024 +0200 ASoC: topology: Constify an argument of snd_soc_tplg_component_load() snd_soc_tplg_component_load() does not modify its "*ops" argument. It only read some values and stores it in "soc_tplg.ops". This argument and the ops field in "struct soc_tplg" can be made const. Signed-off-by: Christophe JAILLET Reviewed-by: Amadeusz Sławiński Link: https://msgid.link/r/f2f983e791d7f941a95556bb147f426a345d84d4.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit d556f807bda0b260b392069b3c8ac9e6491f0025 Author: Peter Ujfalusi Date: Thu May 16 10:56:11 2024 +0300 ASoC: SOF: ipc4-topology: Add support for NHLT with 16-bit only DMIC blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f9209644ae76 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: https://github.com/thesofproject/linux/issues/4973 Signed-off-by: Peter Ujfalusi Reviewed-by: Seppo Ingalsuo Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://msgid.link/r/20240516075611.18018-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6f80324bc1317f50f1c25c6d65a8dbef417aeba4 Author: Krzysztof Kozlowski Date: Thu May 23 12:42:28 2024 +0200 ASoC: codecs: wcd939x: Minor white-space and define cleanup Correct white-space issues and drop unused WCD939X_MBHC_IS_SECOND_RAMP_REQUIRED() define. No functional impact. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240523104228.36263-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 42cef39b76ee705118b27b23a0117e382d4d4a35 Author: Krzysztof Kozlowski Date: Thu May 23 12:42:27 2024 +0200 ASoC: codecs: wcd939x: Unify define used for MIC bias registers All four microphone bias registers have similar layout: enable mask is exactly the same. Use one define, just like older driver wcd938x is doing, to make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240523104228.36263-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 40b2ffaf594cdf9e4a86d4f28b392e58b9dafafd Author: Krzysztof Kozlowski Date: Thu May 23 12:42:26 2024 +0200 ASoC: codecs: wcd938x: Unify define used for MIC2 bias register There is a define for MIC bias registers enable mask called WCD938X_MICB_EN_MASK, which is already used to handle all four MIC1-4 biases in wcd938x_mbhc_micb_adjust_voltage(). Use the same define also in wcd938x_mbhc_micb_en_status() for MIC2 to have unified, simpler approach. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240523104228.36263-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit f20847d92caa51c31556a64f0849903c55ed38c1 Author: Krzysztof Kozlowski Date: Thu May 23 12:42:25 2024 +0200 ASoC: codecs: wcd938x: Drop unused duplicated MIC2 bias register defines All MIC1-4 bias registers are the same and the header already defines register fields for them. Drop unused, duplicated defines for MIC2 bias enable register. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240523104228.36263-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ad72a1e7c0534b9d533ac967a880b8f8d0b83bc0 Author: Xiaxi Shen Date: Thu May 16 22:13:17 2024 -0700 ASoC: dt-bindings: ak4104: convert to dt schema Convert ak4104 binding to DT schema Signed-off-by: Xiaxi Shen Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240517051317.466764-1-shenxiaxi26@gmail.com Signed-off-by: Mark Brown commit bad0a07a7e61a54969cdbb188b143e39040acf43 Author: Shuming Fan Date: Tue May 21 16:46:25 2024 +0800 ASoC: rt1320: Add RT1320 SDCA vendor-specific driver This is the initial amplifier driver for rt1320. -- add class id 1 Signed-off-by: Shuming Fan v2: add Capture DAI for AEC feedback v3: add some comments for blind writes/patch_code/calling sdw_slave_read_prop v4: add comments for different class id Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240521084625.453554-1-shumingf@realtek.com Signed-off-by: Mark Brown commit cf03e271fdca8059090622ef27c20576341f1a75 Author: Krzysztof Kozlowski Date: Mon May 20 16:19:59 2024 +0200 ASoC: qcom: x1e80100: Correct channel mapping X1E80100 CRD board comes with four speakers arranged as left front+back and then right front+back. Using default channel mapping causes front right speaker to play left back stream. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240520-asoc-x1e80100-4-channel-mapping-v4-4-f657159b4aad@linaro.org Signed-off-by: Mark Brown commit 5d5dd9bb227a1bdbef5ec7d167ac65775d1b99dc Author: Krzysztof Kozlowski Date: Mon May 20 16:19:58 2024 +0200 ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults When constructing packets to DSP, the Audioreach code uses 'struct audioreach_module_config' to configure parameters like number of channels, bitrate, sample rate etc, but uses defaults for the channel mapping. Rework this code to copy the channel mapping from 'struct audioreach_module_config', instead of using the default. This requires all callers to fill that structure: add missing initialization of channel mapping. Entire patch makes code more logical and easier to follow: 1. q6apm-dai and q6apm-lpass-dais code which allocates 'struct audioreach_module_config' initializes it fully, so fills both the number of channels and the channel mapping. 2. Audioreach code, which uses 'struct audioreach_module_config' when constructing packets, copies entire contents of passed config, not only pieces of it. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240520-asoc-x1e80100-4-channel-mapping-v4-3-f657159b4aad@linaro.org Signed-off-by: Mark Brown commit 22ad2e3c21281802cd519454544009da7e7a8ea4 Author: Krzysztof Kozlowski Date: Mon May 20 16:19:57 2024 +0200 ASoC: qcom: q6apm-lpass-dais: Implement proper channel mapping The set_channel_map() implementation in q6apm-lpass-dais driver was copying older pre-Audioreach code from q6afe-dai driver, but not really using it. The code sets active channel mask based on passed channel mapping, but Audioreach code does not use that mask ever. Audioreach module configuration does have on the other hand proper channel mapping field, which should supersed that active channel mask. Drop the unused active channel mask and implement proper mapping of channels in q6apm-lpass-dais driver. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240520-asoc-x1e80100-4-channel-mapping-v4-2-f657159b4aad@linaro.org Signed-off-by: Mark Brown commit 965cc040bf0698e81b0c0aef359ae650b42b428e Author: Krzysztof Kozlowski Date: Mon May 20 16:19:56 2024 +0200 ASoC: Constify channel mapping array arguments in set_channel_map() There is no need for implementations of DAI set_channel_map() to modify contents of passed arrays with actual channel mapping. Additionally, the caller keeps full ownership of the array. Constify these pointer arguments so the code will be safer and easier to read (documenting the caller's ownership). Acked-by: Charles Keepax Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240520-asoc-x1e80100-4-channel-mapping-v4-1-f657159b4aad@linaro.org Signed-off-by: Mark Brown commit baf9899122b0e585a340e2edc685c56c60b9c23e Author: Matteo Martelli Date: Wed May 22 18:46:56 2024 +0200 ASoC: codecs: es8311: add everest es8311 codec support Add support for the Everest-semi ES8311 codec. Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control. Supported features: * Both master and slave mode. Master clock is optional in slave mode. * Sample rates from 8KHz to 96KHz. * Sample formats: S16_LE, S18_3LE, S20_3LE, S24_3LE, S24_LE and S32_LE. * I2S formats: I2S, LEFT_J, DSP_A, DSP_B. * BCLK and FSYNC clocks inversion. * Component suspend/resume. * ADC, PGA, DAC controls. * ADC DSP controls: volume, fade (ramp rate), ALC, automute, HPF, EQ. * DAC DSP controls: volume, fade (ramp rate), DRC, EQ. * DAPM routes: capture path with input source selection (differential MIC/DMIC) and AIF channel source selection; playback path with DAC channel source selection. Limitations: * Support only for master clocks with a ratio of ADC (or DAC) clock to LRCLK equal to 256. This to keep the default ADC and DAC oversampling and ADC scale settings. Anyway all 8-96KHz sample rates are supported when the ratio of MCLK to sample rate is 32, 64, 128, 256, 384 or 512 (upper limit due to max MCLK freq of 49.2MHz). * Coefficients for ADC HPF and ADC/DAC EQ not supported. * Digital mic supported but not tested. * S18_3LE, S20_3LE and S24_3LE formats supported but not tested. Signed-off-by: Matteo Martelli Link: https://msgid.link/r/20240522164722.954656-3-matteomartelli3@gmail.com Signed-off-by: Mark Brown commit 21d35e335a51bd0b961a4ec07f827712b781e386 Author: Matteo Martelli Date: Wed May 22 18:46:55 2024 +0200 ASoC: es8311: dt-bindings: add everest es8311 codec Add DT bindings documentation for the Everest-semi ES8311 codec. Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control. Signed-off-by: Matteo Martelli Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240522164722.954656-2-matteomartelli3@gmail.com Signed-off-by: Mark Brown commit f44b3730b038363475a3f84bee2038d8b6448ed8 Merge: 1613e604df0cd 3aac9f4885922 Author: Mark Brown Date: Mon May 27 01:19:40 2024 +0100 Merge existing fixes from spi/for-6.10 into new branch commit 404a89438abc0b89ec9adaf35c26743c17e448ce Author: Neil Armstrong Date: Thu Apr 25 10:07:16 2024 +0200 arm64: dts: qcom: sm8650-hdk: enable GPU Add path of the GPU firmware for the SM8650-HDK board Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240425-topic-sm8650-upstream-hdk-gpu-v1-1-465a11af7441@linaro.org Signed-off-by: Bjorn Andersson commit 81a0a21b6159c6a9ed1e39c23e755cd05a102ce3 Author: Rayyan Ansari Date: Wed Apr 24 18:42:06 2024 +0100 ARM: dts: qcom: msm8226-microsoft-common: Enable smbb explicitly Enable the smbb node explicitly for MSM8x26 Lumia devices. These devices rely on the smbb driver in order to detect USB state. It seems that this was accidentally missed in the commit that this fixes. Fixes: c9c8179d0ccd ("ARM: dts: qcom: Disable pm8941 & pm8226 smbb charger by default") Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424174206.4220-1-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit d81348c71028c6049e536799244f2518658b63c0 Author: Raymond Hackley Date: Wed Apr 24 14:49:32 2024 +0000 arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add connector for MUIC Add subnode usb_con: extcon for SM5502 / SM5504 MUIC, which will be used for RT5033 charger. Signed-off-by: Raymond Hackley Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240424144922.28189-1-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 6986a75d06a370b57811c79d269f1c014cbc7199 Author: Raymond Hackley Date: Wed Apr 24 14:32:10 2024 +0000 arm64: dts: qcom: msm8916/39-samsung-a2015: Add PMIC and charger The phones listed below have Richtek RT5033 PMIC and charger. Add them to the device trees. - Samsung Galaxy A3/A5/A7 2015 - Samsung Galaxy E5/E7 - Samsung Galaxy Grand Max Signed-off-by: Raymond Hackley Link: https://lore.kernel.org/r/20240424143158.24358-1-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 15476ccd3dc6cea04048d159115c86a3d5042501 Author: Tengfei Fan Date: Wed Apr 24 18:15:02 2024 +0800 arm64: dts: qcom: sm4450: Add cpufreq support Add a description of a SM4450 cpufreq-epss controller,add references to it from CPU nodes and make EPSS a supplyer of clocks for the CPUs. Signed-off-by: Tengfei Fan Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240424101503.635364-3-quic_tengfan@quicinc.com Link: https://lore.kernel.org/r/20240424101503.635364-4-quic_tengfan@quicinc.com [bjorn: Squashed the two changes, and updated commit message] Signed-off-by: Bjorn Andersson commit 2b96407b8f10f1d71b58cb35704eb91b8ea78db1 Author: Viken Dadhaniya Date: Wed Apr 24 13:28:53 2024 +0530 arm64: dts: qcom: sc7280: Remove CTS/RTS configuration For IDP variant, GPIO 20/21 is used by camera use case and camera driver is not able acquire these GPIOs as it is acquired by UART5 driver as RTS/CTS pin. UART5 is designed for debug UART for all the board variants of the sc7280 chipset and RTS/CTS configuration is not required for debug uart usecase. Remove CTS/RTS configuration for UART5 instance and change compatible string to debug UART. Remove overwriting compatible property from individual target specific file as it is not required. Fixes: 38cd93f413fd ("arm64: dts: qcom: sc7280: Update QUPv3 UART5 DT node") Signed-off-by: Viken Dadhaniya Link: https://lore.kernel.org/r/20240424075853.11445-1-quic_vdadhani@quicinc.com Signed-off-by: Bjorn Andersson commit fbc7a70b2c1b03eab1ba4a0d611867a2de23d142 Author: Viken Dadhaniya Date: Wed Apr 24 11:16:02 2024 +0530 arm64: dts: qcom: qcm6490-rb3: Enable gpi-dma and qup node Enable gpi-dma0, gpi-dma1 and qupv3_id_1 nodes for buses usecase on RB3gen2. Signed-off-by: Viken Dadhaniya Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240424054602.5731-1-quic_vdadhani@quicinc.com Signed-off-by: Bjorn Andersson commit 01061441029e7fdedcd5d573ae6bd7c4e025018a Author: Neil Armstrong Date: Mon Apr 22 10:48:13 2024 +0200 arm64: dts: qcom: sm8650: add support for the SM8650-HDK board The SM8650-HDK is an embedded development platforms for the Snapdragon 8 Gen 3 SoC aka SM8650, with the following features: - Qualcomm SM8650 SoC - 16GiB On-board LPDDR5 - On-board WiFi 7 + Bluetooth 5.3/BLE - On-board UFS4.0 - M.2 Key B+M Gen3x2 PCIe Slot - HDMI Output - USB-C Connector with DP Almode & Audio Accessory mode - Micro-SDCard Slot - Audio Jack with Playback and Microphone - 2 On-board Analog microphones - 2 On-board Speakers - 96Boards Compatible Low-Speed and High-Speed connectors [1] - For Camera, Sensors and external Display cards - Compatible with the Linaro Debug board [2] - SIM Slot for Modem - Debug connectors - 6x On-Board LEDs Product Page: [3] [1] https://www.96boards.org/specifications/ [2] https://git.codelinaro.org/linaro/qcomlt/debugboard [3] https://www.lantronix.com/products/snapdragon-8-gen-3-mobile-hardware-development-kit/ Reviewed-by: Konrad Dybcio Reviewed-by: Vladimir Zapolskiy Tested-by: Vladimir Zapolskiy Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240422-topic-sm8650-upstream-hdk-v4-2-b33993eaa2e8@linaro.org Signed-off-by: Bjorn Andersson commit 329dce8aad3efba47ad968c1cedf2d028c5643f6 Author: Neil Armstrong Date: Mon Apr 22 10:48:12 2024 +0200 dt-bindings: arm: qcom: Document the HDK8650 board Document the Qualcomm SM8650 based HDK (Hardware Development Kit) embedded development platform designed by Qualcomm and sold by Lantronix [1]. [1] https://www.lantronix.com/products/snapdragon-8-gen-3-mobile-hardware-development-kit/ Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240422-topic-sm8650-upstream-hdk-v4-1-b33993eaa2e8@linaro.org Signed-off-by: Bjorn Andersson commit 2f2120a15251097f9afcab5b4db7894ce03b2933 Author: Manivannan Sadhasivam Date: Thu Mar 21 16:46:41 2024 +0530 arm64: dts: qcom: sm8650: Use "pcie" as the node name instead of "pci" Qcom SoCs doesn't support legacy PCI, but only PCIe. So use the correct node name for the controller instances. Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240321-pcie-qcom-bridge-dts-v2-21-1eb790c53e43@linaro.org Signed-off-by: Bjorn Andersson commit d00b42f170dfa4d5ffbd616aec36de8159168bba Author: Neil Armstrong Date: Thu May 2 10:00:38 2024 +0200 arm64: dts: qcom: sm8650: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk The PCIe Gen4x2 PHY found in the SM8650 SoCs have a second clock named "PHY_AUX_CLK" which is an input of the Global Clock Controller (GCC) which is muxed & gated then returned to the PHY as an input. Remove the dummy pcie-1-phy-aux-clk clock and now the pcie1_phy exposes 2 clocks, properly add the pcie1_phy provided clocks to the Global Clock Controller (GCC) node clocks inputs. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240502-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v5-3-10c650cfeade@linaro.org Signed-off-by: Bjorn Andersson commit 0cc97d9e3fdf9a7b71b4edfd020a44c54c40df52 Author: Neil Armstrong Date: Thu May 2 10:00:37 2024 +0200 arm64: dts: qcom: sm8550: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk The PCIe Gen4x2 PHY found in the SM8550 SoCs have a second clock named "PHY_AUX_CLK" which is an input of the Global Clock Controller (GCC) which is muxed & gated then returned to the PHY as an input. Remove the dummy pcie-1-phy-aux-clk clock and now the pcie1_phy exposes 2 clocks, properly add the pcie1_phy provided clocks to the Global Clock Controller (GCC) node clocks inputs. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240502-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v5-2-10c650cfeade@linaro.org Signed-off-by: Bjorn Andersson commit e7686284066073e3f39b02df0f71db96d7538f48 Author: Neil Armstrong Date: Thu May 2 10:00:36 2024 +0200 arm64: dts: qcom: sm8450: correct pcie1 phy clocks inputs to gcc The PCIe Gen4x2 PHY found in the SM8450 SoCs have a second clock named "PHY_AUX_CLK" which is an input of the Global Clock Controller (GCC) which is muxed & gated then returned to the PHY as an input. Now the pcie1_phy exposes 2 clocks, properly add the pcie1_phy provided clocks to the Global Clock Controller (GCC) node clocks inputs. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20240502-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v5-1-10c650cfeade@linaro.org Signed-off-by: Bjorn Andersson commit 7c0922fc894ffff393ba57c4c20fc034e3a4917f Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:49 2024 +0300 arm64: dts: qcom: x1e80100: drop wrong usb-role-switch properties The usb-role-switch property doesn't make sense for the USB hosts which are fixed to the host USB data mode. Delete usb-role-switch property from these hosts. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-12-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit dad66630a083263b513448426523a3b52a959c79 Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:48 2024 +0300 arm64: dts: qcom: delete wrong usb-role-switch properties The usb-role-switch property doesn't make sense for the USB hosts which are fixed to either host or peripheral USB data mode. Delete usb-role-switch property being present in SoC dtsi. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-11-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit c2f1d0c08fc11ad45d5980ffb1ba3a0a78cc8318 Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:47 2024 +0300 arm64: dts: qcom: sm8650-mtp: connect USB-C SS port to QMP PHY The lanes from the USB-C SS port are connected to the combo USB+DP QMP PHY rather than the SS port of the USB controller. Move the connection endpoint to the QMP PHY out port. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-10-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit fbb22a182267c8de4056bd531caae1d5a32bb40c Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:46 2024 +0300 arm64: dts: qcom: sm8650: move PHY's orientation-switch to SoC dtsi The orientation-switch of the USB+DP QMP PHY is not a property of the board, it is a design property of the QMP PHY itself. Move the property from board DTS to SoC DTSI. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-9-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit d02c0027ea20f67a8dcf023786eb993abee2179e Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:45 2024 +0300 arm64: dts: qcom: sm8550: move PHY's orientation-switch to SoC dtsi The orientation-switch of the USB+DP QMP PHY is not a property of the board, it is a design property of the QMP PHY itself. Move the property from board DTS to SoC DTSI. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-8-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit 1a1322c8a698c8ccafed5379ae8c97dbf8480698 Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:44 2024 +0300 arm64: dts: qcom: sm8450: move PHY's orientation-switch to SoC dtsi The orientation-switch of the USB+DP QMP PHY is not a property of the board, it is a design property of the QMP PHY itself. Move the property from board DTS to SoC DTSI. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-7-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit 4f35b0fe2673655148d528982386d9ba5113d537 Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:43 2024 +0300 arm64: dts: qcom: sm8350: move PHY's orientation-switch to SoC dtsi The orientation-switch of the USB+DP QMP PHY is not a property of the board, it is a design property of the QMP PHY itself. Move the property from board DTS to SoC DTSI. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-6-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit 65931e59e0399129d845452c945b8017ad0570df Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:42 2024 +0300 arm64: dts: qcom: sm8650: move USB graph to the SoC dtsi Move the graph connection between USB host, USB SS PHY and DP port to the SoC dtsi file. They are linked in hardware in this way. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-5-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit 2f212acedbbfe7119219935c8c670c3323f07186 Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:41 2024 +0300 arm64: dts: qcom: sm8550: move USB graph to the SoC dtsi Move the graph connection between USB host, USB SS PHY and DP port to the SoC dtsi file. They are linked in hardware in this way. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-4-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit a84f3627f9d9765853b244f0cf50d3cafd1f0957 Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:40 2024 +0300 arm64: dts: qcom: sm8450: move USB graph to the SoC dtsi Move the graph connection between USB host, USB SS PHY and DP port to the SoC dtsi file. They are linked in hardware in this way. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-3-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit 18eac39beb32cec920aaa29aaa15084cde6e366b Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:39 2024 +0300 arm64: dts: qcom: sm8350: move USB graph to the SoC dtsi Move the graph connection between USB host, USB SS PHY and DP port to the SoC dtsi file. They are linked in hardware in this way. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-2-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit 4b699d2d569483760a18eeec1d80f691d635550e Author: Dmitry Baryshkov Date: Mon Apr 29 15:43:38 2024 +0300 arm64: dts: qcom: sm8150: move USB graph to the SoC dtsi Move the graph connection between USB host, USB SS PHY and DP port to the SoC dtsi file. They are linked in hardware in this way. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240429-usb-link-dtsi-v1-1-87c341b55cdf@linaro.org Signed-off-by: Bjorn Andersson commit b3f8cdef8a5c0bc89ceb1095856f64ba7445c6b9 Author: Barnabás Czémán Date: Sat May 25 16:08:57 2024 +0200 arm64: dts: qcom: msm8996: add reset for display subsystem Add reset for display subsystem, make sure it gets properly reset. Signed-off-by: Barnabás Czémán Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240525-mdss-reset-v1-1-c0489e8be0d0@gmail.com Signed-off-by: Bjorn Andersson commit dc402e084a9e0cc714ffd6008dce3c63281b8142 Author: Bjorn Andersson Date: Sat May 25 10:56:20 2024 -0700 arm64: dts: qcom: sc8180x: Correct PCIe slave ports The interconnects property was clearly copy-pasted between the 4 PCIe controllers, giving all four the cpu-pcie path destination of SLAVE_0. The four ports are all associated with CN0, but update the property for correctness sake. Fixes: d20b6c84f56a ("arm64: dts: qcom: sc8180x: Add PCIe instances") Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240525-sc8180x-pcie-interconnect-port-fix-v1-1-f86affa02392@quicinc.com Signed-off-by: Bjorn Andersson commit 8ed45f79142caeefa42e98eb243df35746123c09 Author: Bjorn Andersson Date: Sat May 25 10:54:07 2024 -0700 arm64: dts: qcom: sc8180x: Fix aoss_qmp node The #power-domains property is no longer accepted according to the AOSS QMP binding, drop it from the node. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240525-sc8180x-aop-validation-fix-v1-1-66cfa3c9ccf6@quicinc.com Signed-off-by: Bjorn Andersson commit 6314184be3910c956def78c6899f58c70100372b Author: Bjorn Andersson Date: Sat May 25 11:07:05 2024 -0700 arm64: dts: qcom: sc8180x: Drop ipa-virt interconnect The IPA BCM is already exposed by clk-rpmh, remove the interconnect node for the same. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240525-sc8180x-drop-ipa-icc-v1-1-84ac4cf08fe3@quicinc.com Signed-off-by: Bjorn Andersson commit 85f5656a4f3f188cb950cf8dc88f3f0e4e656bae Author: Konrad Dybcio Date: Wed May 22 13:33:43 2024 +0200 soc: qcom: socinfo: Update X1E PMICs Assign the correct name to ID 82 and fix the ID of SMB2360. Fixes: e025171d1ab1 ("soc: qcom: socinfo: Add SMB2360 PMIC") Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240522-topic-x1e_pmics_socinfo-v1-1-da8a097e5134@linaro.org Signed-off-by: Bjorn Andersson commit a55361454c210ae4fd840cde3913f320663c405a Author: Umang Chheda Date: Thu May 23 18:45:28 2024 +0530 arm64: dts: qcom: qcs6490-rb3gen2: Enable PMK8350 RTC module Enable PMK8350 RTC module that is found on qcs6490-rb3gen2. Signed-off-by: Umang Chheda Link: https://lore.kernel.org/r/20240523131528.3454431-1-quic_uchheda@quicinc.com Signed-off-by: Bjorn Andersson commit 9e7b5b4f5ec4e8f677ea17f72355ca1f1fd4e5a0 Author: Bjorn Andersson Date: Thu May 23 20:28:41 2024 -0700 firmware: qcom: uefisecapp: Allow on X1E devices As with previous platforms, qseecom and the uefisecapp provides access to EFI variables. Add X1E CRD and QCP devices to the allowlist. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240523-x1e-efivarfs-v1-1-5d986265b8e4@quicinc.com Signed-off-by: Bjorn Andersson commit a8d55ff5f3acf52e6380976fb5d0a9172032dcb0 Author: David Wang <00107082@163.com> Date: Fri May 17 14:24:05 2024 +0800 kernel/cgroup: cleanup cgroup_base_files when fail to add cgroup_psi_files Even though css_clear_dir would be called to cleanup all existing cgroup files when css_populate_dir failed, reclaiming newly created cgroup files before css_populate_dir returns with failure makes code more consistent. Signed-off-by: David Wang <00107082@163.com> Signed-off-by: Tejun Heo commit 9f34c566027b623854dabc86fde052b44e5240be Author: Michal Koutný Date: Tue May 21 11:21:30 2024 +0200 selftests: cgroup: Add basic tests for pids controller This commit adds (and wires in) new test program for checking basic pids controller functionality -- restricting tasks in a cgroup and correct event counting. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 7055968559a84e4ccbff8eeb621017eaff1b20aa Author: Michal Koutný Date: Tue May 21 11:21:29 2024 +0200 selftests: cgroup: Lexicographic order in Makefile This will reduce number of conflicts when modifying the lists. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 3f26a885a06805d456fc8a5f36fc3560ad831bf6 Author: Michal Koutný Date: Tue May 21 11:21:28 2024 +0200 cgroup/pids: Add pids.events.local Hierarchical counting of events is not practical for watching when a particular pids.max is being hit. Therefore introduce .local flavor of events file (akin to memory controller) that collects only events relevant to given cgroup. The file is only added to the default hierarchy. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 385a635cacfe0d96d3b56633640a1ba65b3fddc3 Author: Michal Koutný Date: Tue May 21 11:21:27 2024 +0200 cgroup/pids: Make event counters hierarchical The pids.events file should honor the hierarchy, so make the events propagate from their origin up to the root on the unified hierarchy. The legacy behavior remains non-hierarchical. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 73e75e6fc352bdca08f7e0893d5b6bb37171bdd2 Author: Michal Koutný Date: Tue May 21 11:21:26 2024 +0200 cgroup/pids: Separate semantics of pids.events related to pids.max Currently, when pids.max limit is breached in the hierarchy, the event is counted and reported in the cgroup where the forking task resides. This decouples the limit and the notification caused by the limit making it hard to detect when the actual limit was effected. Redefine the pids.events:max as: the number of times the limit of the cgroup was hit. (Implementation differentiates also "forkfail" event but this is currently not exposed as it would better fit into pids.stat. It also differs from pids.events:max only when pids.max is configured on non-leaf cgroups.) Since it changes semantics of the original "max" event, introduce this change only in the v2 API of the controller and add a cgroup2 mount option to revert to the legacy behavior. Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 0ac380020cd469a7cd23f517ff2753d0f6ac48c9 Author: Xiu Jianfeng Date: Sat May 25 09:45:02 2024 +0000 cgroup/cpuset: Update comment on callback_lock Since commit 51ffe41178c4 ("cpuset: convert away from cftype->read()"), cpuset_common_file_read() has been renamed. Signed-off-by: Xiu Jianfeng Signed-off-by: Tejun Heo commit d9fc6b422062a1f026a09f210e012a27f808fb11 Author: Xiu Jianfeng Date: Sat May 25 09:44:03 2024 +0000 cgroup/cpuset: Remove unnecessary zeroing The struct cpuset is kzalloc'd, all the members are zeroed already, so don't need nodes_clear() here. No functional changes intended. Signed-off-by: Xiu Jianfeng Signed-off-by: Tejun Heo commit e245ef8a0b06fa5a18ca3bdcf82430166419283e Author: Dave Thaler Date: Sat May 25 23:18:15 2024 -0700 bpf, docs: Fix instruction.rst indentation The table captions patch corrected indented most tables to work with the table directive for adding a caption but missed two of them. Signed-off-by: Dave Thaler Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240526061815.22497-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit f980f13e4eb299abba6692365315196e1ba6fd2c Author: Dave Thaler Date: Sat May 25 08:33:32 2024 -0700 bpf, docs: Clarify call local offset In the Jump instructions section it explains that the offset is "relative to the instruction following the jump instruction". But the program-local section confusingly said "referenced by offset from the call instruction, similar to JA". This patch updates that sentence with consistent wording, saying it's relative to the instruction following the call instruction. Signed-off-by: Dave Thaler Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20240525153332.21355-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit 6a6d8b6f00ade597e0030669fae3fdf57cfba33b Author: Dave Thaler Date: Fri May 24 09:46:18 2024 -0700 bpf, docs: Add table captions As suggested by Ines Robles in his IETF GENART review at https://datatracker.ietf.org/doc/review-ietf-bpf-isa-02-genart-lc-robles-2024-05-16/ Signed-off-by: Dave Thaler Link: https://lore.kernel.org/r/20240524164618.18894-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit 4e1215d9a1903fc9e976aa8903674d050c7af5ff Author: Dave Thaler Date: Mon May 20 14:52:55 2024 -0700 bpf, docs: clarify sign extension of 64-bit use of 32-bit imm imm is defined as a 32-bit signed integer. {MOV, K, ALU64} says it does "dst = src" (where src is 'imm') and it does do dst = (s64)imm, which in that sense does sign extend imm. The MOVSX instruction is explained as sign extending, so added the example of {MOV, K, ALU64} to make this more clear. {JLE, K, JMP} says it does "PC += offset if dst <= src" (where src is 'imm', and the comparison is unsigned). This was apparently ambiguous to some readers as to whether the comparison was "dst <= (u64)(u32)imm" or "dst <= (u64)(s64)imm" so added an example to make this more clear. v1 -> v2: Address comments from Yonghong Signed-off-by: Dave Thaler Acked-by: Yonghong Song Acked-by: David Vernet Link: https://lore.kernel.org/r/20240520215255.10595-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit a985fdca5e7e665d58dc40c92a67c8b67b6291db Author: Dave Thaler Date: Fri May 17 09:58:55 2024 -0700 bpf, docs: Use RFC 2119 language for ISA requirements Per IETF convention and discussion at LSF/MM/BPF, use MUST etc. keywords as requested by IETF Area Director review. Also as requested, indicate that documenting BTF is out of scope of this document and will be covered by a separate IETF specification. Added paragraph about the terminology that is required IETF boilerplate and must be worded exactly as such. Signed-off-by: Dave Thaler Acked-by: David Vernet Link: https://lore.kernel.org/r/20240517165855.4688-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit 4652072e7b9d643edc9ebb04e3e2c021461b7af0 Author: Dave Thaler Date: Fri May 17 08:34:45 2024 -0700 bpf, docs: Move sentence about returning R0 to abi.rst As discussed at LSF/MM/BPF, the sentence about using R0 for returning values from calls is part of the calling convention and belongs in abi.rst. Any further additions or clarifications to this text are left for future patches on abi.rst. The current patch is simply to unblock progression of instruction-set.rst to a standard. In contrast, the restriction of register numbers to the range 0-10 is untouched, left in the instruction-set.rst definition of the src_reg and dst_reg fields. Signed-off-by: Dave Thaler Link: https://lore.kernel.org/r/20240517153445.3914-1-dthaler1968@gmail.com Signed-off-by: Alexei Starovoitov commit a57ab7cced454f69b8ee8aa5f5019ea8de4674da Author: P Praneesh Date: Mon May 20 12:30:45 2024 +0530 wifi: ath12k: fix firmware crash during reo reinject When handling fragmented packets, the ath12k driver reassembles each fragment into a normal packet and then reinjects it into the HW ring. However, a firmware crash occurs during this reinjection process. The issue arises because the driver populates peer metadata in reo_ent_ring->queue_addr_lo, while the firmware expects the physical address obtained from the corresponding peer’s queue descriptor. Fix it by filling peer's queue descriptor's physical address in queue_addr_lo. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240520070045.631029-4-quic_ppranees@quicinc.com commit 073f9f249eecd64ab9d59c91c4a23cfdcc02afe4 Author: P Praneesh Date: Mon May 20 12:30:44 2024 +0530 wifi: ath12k: fix invalid memory access while processing fragmented packets The monitor ring and the reo reinject ring share the same ring mask index. When the driver receives an interrupt for the reo reinject ring, the monitor ring is also processed, leading to invalid memory access. Since monitor support is not yet enabled in ath12k, the ring mask for the monitor ring should be removed. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: P Praneesh Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240520070045.631029-3-quic_ppranees@quicinc.com commit 33322e3ef07409278a18c6919c448e369d66a18e Author: P Praneesh Date: Mon May 20 12:30:43 2024 +0530 wifi: ath12k: change DMA direction while mapping reinjected packets For fragmented packets, ath12k reassembles each fragment as a normal packet and then reinjects it into HW ring. In this case, the DMA direction should be DMA_TO_DEVICE, not DMA_FROM_DEVICE. Otherwise, an invalid payload may be reinjected into the HW and subsequently delivered to the host. Given that arbitrary memory can be allocated to the skb buffer, knowledge about the data contained in the reinjected buffer is lacking. Consequently, there’s a risk of private information being leaked. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Co-developed-by: Baochen Qiang Signed-off-by: Baochen Qiang Signed-off-by: P Praneesh Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240520070045.631029-2-quic_ppranees@quicinc.com commit 7f0343b7b8710436c1e6355c71782d32ada47e0c Author: Baochen Qiang Date: Tue May 21 11:08:11 2024 +0300 wifi: ath11k: restore country code during resume We got report that regdomain is not correct after return from hibernation: Before hibernation: % iw reg get [...] phy#0 (self-managed) country CH: DFS-ETSI (2402 - 2482 @ 40), (N/A, 20), (N/A) (5170 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW (5250 - 5330 @ 80), (N/A, 23), (0 ms), NO-OUTDOOR, DFS, AUTO-BW (5490 - 5590 @ 80), (N/A, 30), (0 ms), DFS, AUTO-BW (5590 - 5650 @ 40), (N/A, 30), (600000 ms), DFS, AUTO-BW (5650 - 5730 @ 80), (N/A, 30), (0 ms), DFS, AUTO-BW (5735 - 5875 @ 80), (N/A, 14), (N/A), AUTO-BW After hibernation: % iw reg get [...] phy#0 (self-managed) country na: DFS-UNSET (2402 - 2472 @ 40), (N/A, 20), (N/A) (2457 - 2482 @ 20), (N/A, 20), (N/A), PASSIVE-SCAN (5170 - 5330 @ 160), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN (5490 - 5730 @ 160), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN (5735 - 5895 @ 160), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN (5945 - 7125 @ 160), (N/A, 30), (N/A), AUTO-BW, PASSIVE-SCAN The reason is, during resume, firmware is reinitialized but host does not send current country code to firmware. So default reg rules with country code set to 'na' is uploaded to host, as shown above. Fix it by restoring country code to firmware during resume. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Fixes: 166a490f59ac ("wifi: ath11k: support hibernation") Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://msgid.link/20240520024148.5472-3-quic_bqiang@quicinc.com commit b363614c0c80f9e2f3ffe8e77270e783a0fb8ab5 Author: Baochen Qiang Date: Tue May 21 11:08:10 2024 +0300 wifi: ath11k: refactor setting country code logic ath11k_wmi_send_set_current_country_cmd() is called in several places and all of them are just simply repeating the same logic. Refactor to make code clean. Compile tested only. Signed-off-by: Baochen Qiang Signed-off-by: Kalle Valo Link: https://msgid.link/20240520024148.5472-2-quic_bqiang@quicinc.com commit 35864b62fa129196af4641b8bef50ac4226a22ed Author: Karthikeyan Periyasamy Date: Tue May 21 11:08:10 2024 +0300 wifi: ath12k: improve the rx descriptor error information The ath12k_dp_get_rx_desc() failure log currently contains the same information across multiple Rx data paths and lacks sufficient detail for debugging purposes. To address this, change the ath12k_dp_get_rx_desc() failure log to include cookie information along with Rx path details. This will provide more specific data for debugging purposes. 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: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240516000807.1704913-3-quic_periyasa@quicinc.com commit 4f82a8d5c27748a3b4318af99627f4df248133e8 Author: Karthikeyan Periyasamy Date: Tue May 21 11:08:10 2024 +0300 wifi: ath12k: refactor rx descriptor CMEM configuration Currently, data path Rx descriptor placed in the CMEM memory respective to the Rx offset. This Rx descriptor CMEM placement is not meeting the requirements to support inter device MLO. In inter device MLO, multiple devices participate in a group. The device specific Rx descriptor buffers transmit to multiple device REO rings. To distinguish between device specific Rx descriptor buffers, the CMEM setup configuration need to choose a different placement based on the unique identifier (device index). Below are the CMEM configuration placement representation: Intra-Device MLO scenario: Device 0 Device 1 +-------------+ +-------------+ | | | | | Tx | | Tx | | | | | +-------------+ +-------------+ | | | | | Rx | | Rx | | | | | +-------------+ +-------------+ Inter-Device MLO scenario: Device 0 Device 1 +-------------+ +-------------+ | | | | | Tx | | Tx | | | | | +-------------+ +-------------+ | | | | | Rx | | Reserved | | Device 0 | | | | | | | +-------------+ +-------------+ | | | Rx | | Reserved | | Device 1 | | | | | +-------------+ +-------------+ 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: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240516000807.1704913-2-quic_periyasa@quicinc.com commit 2c1713a8f1c94033a6e00aae4693ab03e8a3b9f1 Author: Thomas Weißschuh Date: Sat May 18 16:58:47 2024 +0200 bpf: constify member bpf_sysctl_kern:: Table The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers, for which bpf_sysctl_kern::table is also used. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch this utility type which is not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh Signed-off-by: Daniel Borkmann Reviewed-by: Joel Granados Link: https://lore.kernel.org/bpf/20240518-sysctl-const-handler-bpf-v1-1-f0d7186743c1@weissschuh.net commit 99fa63d9ca60c4c1cc843fde205e4bc6e86b218f Author: Xiao Wang Date: Sun May 19 13:05:07 2024 +0800 riscv, bpf: Try RVC for reg move within BPF_CMPXCHG JIT We could try to emit compressed insn for reg move operation during CMPXCHG JIT, the instruction compression has no impact on the jump offsets of following forward and backward jump instructions. Signed-off-by: Xiao Wang Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20240519050507.2217791-1-xiao.w.wang@intel.com commit dd23bf310384d8b48985b41640e3f0bc2b5226f9 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:50 2024 +0100 jfs: Convert drop_metapage and remove_metapage to take a folio All callers now have a folio, so pass it in instead of the page. Removes a couple of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 40e1bd195b0ee3880699bb0ae1897e9f9116aa29 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:49 2024 +0100 jfs; Convert release_metapage to use a folio Convert mp->page to a folio and remove 7 hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 9346476d211611f3c0d512cb6e942ab76f5376d8 Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:48 2024 +0100 jfs: Convert insert_metapage() to take a folio Both of its callers now have a folio, so convert this function. Use folio_attach_private() instead of manually setting folio->private. This also gets the expected refcount of the folio correct. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 2dcd9630d988509aa87de2ce7826a697f8ce58ea Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:47 2024 +0100 jfs: Convert __get_metapage to use a folio Remove four hidden calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 35474d52c6056976e675e9130d755cdb749ded5a Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:46 2024 +0100 jfs: Convert metapage_writepage to metapage_write_folio Implement writepages rather than writepage by using write_cache_pages() to call metapage_write_folio(). Use bio_add_folio_nofail() as we know we just allocated the bio. Replace the call to SetPageError (which is never checked) with a call to mapping_set_error (which ... might be checked somewhere?) Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit 9b4b3f8441004eccf45a412370840188ae3a44ff Author: Matthew Wilcox (Oracle) Date: Wed Apr 17 18:56:45 2024 +0100 jfs: Convert metapage_read_folio to use folio APIs Use bio_add_folio_nofail() as we just allocated the bio and know it cannot fail. Other than that, this is a 1:1 conversion from page APIs to folio APIs. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dave Kleikamp commit e944fc8152744a41dc62e720995538e48b053bb9 Author: Xiao Wang Date: Thu May 23 11:18:35 2024 +0800 riscv, bpf: Use STACK_ALIGN macro for size rounding up Use the macro STACK_ALIGN that is defined in asm/processor.h for stack size rounding up, just like bpf_jit_comp32.c does. Signed-off-by: Xiao Wang Signed-off-by: Daniel Borkmann Reviewed-by: Pu Lehui Link: https://lore.kernel.org/bpf/20240523031835.3977713-1-xiao.w.wang@intel.com commit c12603e76ef666ce5c51a9d6faf155c9e3de7601 Author: Xiao Wang Date: Thu May 16 17:04:30 2024 +0800 riscv, bpf: Optimize zextw insn with Zba extension The Zba extension provides add.uw insn which can be used to implement zext.w with rs2 set as ZERO. Signed-off-by: Xiao Wang Signed-off-by: Daniel Borkmann Tested-by: Pu Lehui Reviewed-by: Andrew Jones Reviewed-by: Pu Lehui Link: https://lore.kernel.org/bpf/20240516090430.493122-1-xiao.w.wang@intel.com commit fdd0b80172758ce284f19fa8a26d90c61e4371d2 Author: Imre Deak Date: Tue May 21 17:30:22 2024 +0300 drm/i915: Fix audio component initialization After registering the audio component in i915_audio_component_init() the audio driver may call i915_audio_component_get_power() via the component ops. This could program AUD_FREQ_CNTRL with an uninitialized value if the latter function is called before display.audio.freq_cntrl gets initialized. The get_power() function also does a modeset which in the above case happens too early before the initialization step and triggers the "Reject display access from task" error message added by the Fixes: commit below. Fix the above issue by registering the audio component only after the initialization step. Fixes: 87c1694533c9 ("drm/i915: save AUD_FREQ_CNTRL state at audio domain suspend") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10291 Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240521143022.3784539-1-imre.deak@intel.com commit 5cef84939723f96352d7087b0ea596a65fb972c6 Author: Michal Wajdeczko Date: Thu May 23 21:22:40 2024 +0200 drm/xe/vf: Treat GMDID as another runtime register While the GMDID registers are not part of the runtime register list shared by the PF driver, we may still return cached values from our VF specific read32() helper function. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240523192240.844-7-michal.wajdeczko@intel.com commit 9081f8ca2713356650c6db7e1e989ce7c68267dd Author: Michal Wajdeczko Date: Thu May 23 21:22:39 2024 +0200 drm/xe/vf: Cache value of the GMDID register Read and cache value of the GMDID register as part of the config query that VF driver is doing over MMIO. While the VF driver likely already obtained the value of the GMDID register once during the early driver probe, we couldn't cache it then as the GT structures were not ready yet. Cache it now, in case the driver needs it later when the GuC MMIO communication, required to query GMDID from GuC, could be no longer desired as it will be replaced by the CTB communication. While around, assert that we will query GMDID only when applicable. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240523192240.844-6-michal.wajdeczko@intel.com commit fcc6b719ae8576a00ddd3e261b18443594250189 Author: Michal Wajdeczko Date: Fri May 24 00:30:42 2024 +0200 drm/xe/vf: Provide early access to GMDID register VFs do not have direct access to the GMDID register and must obtain its value from the GuC. Since we need GMDID value very early in the driver probe flow, before we even start the full setup of GT and GuC data structures, we must do some early initializations ourselves. Additionally, since we also need GMDID for the media GT, which isn't created yet, temporarly tweak the root GT type into MEDIA to allow communication with the correct GuC, as only it can provide the value of the media GMDID register. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240523223042.888-1-michal.wajdeczko@intel.com commit 2948b24233cfe3c8f2c071b6c83efc3e05881023 Author: Michal Wajdeczko Date: Thu May 23 21:22:37 2024 +0200 drm/xe/vf: Obtain value of GMDID register from GuC VFs don't have access to the GMDID register and must obtain it value using GuC VF ABI KLV query. Add function for doing that. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240523192240.844-4-michal.wajdeczko@intel.com commit e70aa1016e5b54762e922318d0e20bc646993c13 Author: Michal Wajdeczko Date: Thu May 23 21:22:36 2024 +0200 drm/xe/guc: Add GLOBAL_CFG_GMD_ID KLV definition VF drivers can't access GMD_ID register over MMIO. The value of the GMD_ID register must be queried from GuC. It is available as GLOBAL_CFG_GMD_ID KLV. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240523192240.844-3-michal.wajdeczko@intel.com commit 4edadc41a3a444566cbf1f5204867a9c8f44b255 Author: Michal Wajdeczko Date: Thu May 23 21:22:35 2024 +0200 drm/xe/vf: Use register values obtained from the PF As part of the its initialization, the VF driver has already obtained a list of the runtime (fuse) register values from the PF driver. When VF driver is attempting to read register that is inaccessible to the VF, use the values from this list instead. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240523192240.844-2-michal.wajdeczko@intel.com commit eff70dac16d1f87c262049783b3281b706448593 Author: Jani Nikula Date: Thu May 23 15:59:44 2024 +0300 drm/i915: pass dev_priv explicitly to PIPEGCMAX Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPEGCMAX register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/5fdc8562fe7b8d26e1ec1bb8f9a221348246bbe1.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1572fc3162de89f484d544beac6ae1204440f3c7 Author: Jani Nikula Date: Thu May 23 15:59:43 2024 +0300 drm/i915: pass dev_priv explicitly to PRIMCNSTALPHA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PRIMCNSTALPHA register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/783477b86f4d53849775cbf690bb8b9042792a66.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 491097568a55238017356dba341cf6726a35b6bc Author: Jani Nikula Date: Thu May 23 15:59:42 2024 +0300 drm/i915: pass dev_priv explicitly to PRIMSIZE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PRIMSIZE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/b672f17b4c3d5ba7ac606798bb3799408c26f075.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 90fa6a4210b78b39091627f4bd10f28835c4c5c2 Author: Jani Nikula Date: Thu May 23 15:59:41 2024 +0300 drm/i915: pass dev_priv explicitly to PRIMPOS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PRIMPOS register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/4bbb3218ac25b292bea46dcba3df8ec474d578e2.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 17c99a03b7768f6ae8fa128e72c6a5d95b184eda Author: Jani Nikula Date: Thu May 23 15:59:40 2024 +0300 drm/i915: pass dev_priv explicitly to DSPGAMC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPGAMC register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/542455204f62182a46fa2cb16ad6b0648c72f612.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 89b85751b4fda1918cf314318d61a184218d3df3 Author: Jani Nikula Date: Thu May 23 15:59:39 2024 +0300 drm/i915: pass dev_priv explicitly to DSPSURFLIVE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPSURFLIVE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/bc252dee67718f729883da7d542c6435384683ae.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 495d6f77dfa79b26bfa95eca3215179659c2cf8e Author: Jani Nikula Date: Thu May 23 15:59:38 2024 +0300 drm/i915: pass dev_priv explicitly to DSPOFFSET Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPOFFSET register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c1d487d2c753221144e8fb8f17e5eb2826dba5f2.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d434ac6252768a5aecf7004fddb939a1d945085f Author: Jani Nikula Date: Thu May 23 15:59:37 2024 +0300 drm/i915: pass dev_priv explicitly to DSPTILEOFF Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPTILEOFF register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/4736b2d65ca3be3e9eb5a835ddac801ba99e1e6b.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9e93147f121e9c333316c87ee6be29507c817186 Author: Jani Nikula Date: Thu May 23 15:59:36 2024 +0300 drm/i915: pass dev_priv explicitly to DSPSURF Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPSURF register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/fc2d7753aa6e8e25303a111bf4b120da6ce8c458.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a99b1e7f6395ec17266d790a5e9d6cab6cb33ba2 Author: Jani Nikula Date: Thu May 23 15:59:35 2024 +0300 drm/i915: pass dev_priv explicitly to DSPSIZE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPSIZE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d24ee614cac29ccc3917f9cba1ce03ce54fb7d8b.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3ebfafa75c1e1250bd1f735e4f48f3b20ece5b99 Author: Jani Nikula Date: Thu May 23 15:59:34 2024 +0300 drm/i915: pass dev_priv explicitly to DSPPOS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPPOS register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/fbe6b94f03926175611b51c5054466dd27656d2a.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit cd962cdb33a799a37d4ade1af023a9edf2a44a94 Author: Jani Nikula Date: Thu May 23 15:59:33 2024 +0300 drm/i915: pass dev_priv explicitly to DSPSTRIDE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPSTRIDE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/4067b3009076492d05e80ae994f9a7bd29b56b2e.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 26d0ecc758accce04baa844723be8935f9d516ee Author: Jani Nikula Date: Thu May 23 15:59:32 2024 +0300 drm/i915: pass dev_priv explicitly to DSPLINOFF Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPLINOFF register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/922b6b0795787b335bd3d5b0541bd30dc2c19dd5.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c09b5ddb6e21e839f27daac6ca45f27bb5f2f45d Author: Jani Nikula Date: Thu May 23 15:59:31 2024 +0300 drm/i915: pass dev_priv explicitly to DSPADDR Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPADDR register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/777d4189c18c16392015dd2770f5c56d94bb88a9.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit be30c827e16e5527644f3126ceb050cb60301a0f Author: Jani Nikula Date: Thu May 23 15:59:30 2024 +0300 drm/i915: pass dev_priv explicitly to DSPCNTR Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPCNTR register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d9434a718658d7dc6dba1e8a54f80cd1503d0b33.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2468c0dd01d1b911b9d8ae6c13b8ba28d1e01bb6 Author: Jani Nikula Date: Thu May 23 15:59:29 2024 +0300 drm/i915: pass dev_priv explicitly to DSPADDR_VLV Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the DSPADDR_VLV register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1d9be6b1eedd9240468a89cd3a10e8513caa33b1.1716469091.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ecec1887e24f11a3fcc391aa0f33fe0802be0804 Merge: a87f34e742d27 c34e3ab2a76e6 Author: Martin KaFai Lau Date: Thu May 23 14:13:57 2024 -0700 Merge branch 'Replace mono_delivery_time with tstamp_type' Abhishek Chauhan says: ==================== Patch 1 :- This patch takes care of only renaming the mono delivery timestamp to tstamp_type with no change in functionality of existing available code in kernel also Starts assigning tstamp_type with either mono or real and introduces a new enum in the skbuff.h, again no change in functionality of the existing available code in kernel , just making the code scalable. Patch 2 :- Additional bit was added to support tai timestamp type to avoid tstamp drops in the forwarding path when testing TC-ETF. Patch is also updating bpf filter.c Some updates to bpf header files with introduction to BPF_SKB_CLOCK_TAI and documentation updates stating deprecation of BPF_SKB_TSTAMP_UNSPEC and BPF_SKB_TSTAMP_DELIVERY_MONO Patch 3:- Handles forwarding of UDP packets with TAI clock id tstamp_type type with supported changes for tc_redirect/tc_redirect_dtime to handle forwarding of UDP packets with TAI tstamp_type ==================== Signed-off-by: Martin KaFai Lau commit c34e3ab2a76e6a55a64e0d56acc5607062c2bad9 Author: Abhishek Chauhan Date: Thu May 9 14:18:34 2024 -0700 selftests/bpf: Handle forwarding of UDP CLOCK_TAI packets With changes in the design to forward CLOCK_TAI in the skbuff framework, existing selftest framework needs modification to handle forwarding of UDP packets with CLOCK_TAI as clockid. Signed-off-by: Abhishek Chauhan Reviewed-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20240509211834.3235191-4-quic_abchauha@quicinc.com Signed-off-by: Martin KaFai Lau commit 1693c5db6ab8262e6f5263f9d211855959aa5acd Author: Abhishek Chauhan Date: Thu May 9 14:18:33 2024 -0700 net: Add additional bit to support clockid_t timestamp type tstamp_type is now set based on actual clockid_t compressed into 2 bits. To make the design scalable for future needs this commit bring in the change to extend the tstamp_type:1 to tstamp_type:2 to support other clockid_t timestamp. We now support CLOCK_TAI as part of tstamp_type as part of this commit with existing support CLOCK_MONOTONIC and CLOCK_REALTIME. Signed-off-by: Abhishek Chauhan Reviewed-by: Willem de Bruijn Reviewed-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20240509211834.3235191-3-quic_abchauha@quicinc.com Signed-off-by: Martin KaFai Lau commit 4d25ca2d6801cfcf26f7f39c561611ba5be99bf8 Author: Abhishek Chauhan Date: Thu May 9 14:18:32 2024 -0700 net: Rename mono_delivery_time to tstamp_type for scalabilty mono_delivery_time was added to check if skb->tstamp has delivery time in mono clock base (i.e. EDT) otherwise skb->tstamp has timestamp in ingress and delivery_time at egress. Renaming the bitfield from mono_delivery_time to tstamp_type is for extensibilty for other timestamps such as userspace timestamp (i.e. SO_TXTIME) set via sock opts. As we are renaming the mono_delivery_time to tstamp_type, it makes sense to start assigning tstamp_type based on enum defined in this commit. Earlier we used bool arg flag to check if the tstamp is mono in function skb_set_delivery_time, Now the signature of the functions accepts tstamp_type to distinguish between mono and real time. Also skb_set_delivery_type_by_clockid is a new function which accepts clockid to determine the tstamp_type. In future tstamp_type:1 can be extended to support userspace timestamp by increasing the bitfield. Signed-off-by: Abhishek Chauhan Reviewed-by: Willem de Bruijn Reviewed-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20240509211834.3235191-2-quic_abchauha@quicinc.com Signed-off-by: Martin KaFai Lau commit cfe34d6a4c0f2754ab9b0fb0cd23d4c9f50a3859 Author: Mario Limonciello Date: Wed May 8 16:45:35 2024 -0500 drm/amd/display: Enable colorspace property for MST connectors MST colorspace property support was disabled due to a series of warnings that came up when the device was plugged in since the properties weren't made at device creation. Create the properties in advance instead. Suggested-by: Ville Syrjälä Fixes: 69a959610229 ("drm/amd/display: Temporary Disable MST DP Colorspace Property"). Reported-and-tested-by: Tyler Schneider Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3353 Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit fa4c500ce93f4f933c38e6d6388970e121e27b21 Author: Srinivasan Shanmugam Date: Wed May 22 20:54:50 2024 +0530 drm/amdgpu/display: Fix null pointer dereference in dc_stream_program_cursor_position The fix involves adding a null check for 'stream' at the beginning of the function. If 'stream' is NULL, the function immediately returns false. This ensures that 'stream' is not NULL when we dereference it to access 'ctx' in 'dc = stream->ctx->dc;' the function. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:398 dc_stream_program_cursor_position() error: we previously assumed 'stream' could be null (see line 397) drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c 389 bool dc_stream_program_cursor_position( 390 struct dc_stream_state *stream, 391 const struct dc_cursor_position *position) 392 { 393 struct dc *dc; 394 bool reset_idle_optimizations = false; 395 const struct dc_cursor_position *old_position; 396 397 old_position = stream ? &stream->cursor_position : NULL; ^^^^^^^^ The patch adds a NULL check --> 398 dc = stream->ctx->dc; ^^^^^^^^ The old code didn't check 399 400 if (dc_stream_set_cursor_position(stream, position)) { 401 dc_z10_restore(dc); 402 403 /* disable idle optimizations if enabling cursor */ 404 if (dc->idle_optimizations_allowed && 405 (!old_position->enable || dc->debug.exit_idle_opt_for_cursor_updates) && 406 position->enable) { 407 dc_allow_idle_optimizations(dc, false); Fixes: f63f86b5affc ("drm/amd/display: Separate setting and programming of cursor") Reported-by: Dan Carpenter Cc: Harry Wentland Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 498906d3761070f8c0e54d3a486e01a0c26b4ff4 Author: Sunil Khatri Date: Wed May 22 11:58:28 2024 +0530 drm/amdgpu: add gfx queue support for gfx11 ipdump Add support of all the CP GFX queues for gfx11 ipdump to be used by devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 368c33ac8ab984616b862a3f20e57cef5f8417e0 Author: Sunil Khatri Date: Wed May 22 11:14:26 2024 +0530 drm/amdgpu: add cp queue registers for gfx11 ipdump Add gfx11 support of CP queue registers for all queues to be used by devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 400c49e27d28ebe4651e19d29b3009698e309a67 Author: Mario Limonciello Date: Sun May 19 08:02:23 2024 -0500 drm/amd/display: Pass errors from amdgpu_dm_init() up Errors in amdgpu_dm_init() are silently ignored and dm_hw_init() will succeed. However often these are fatal errors and it would be better to pass them up. Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 015a04a59e3f9ff4a8f8a8e70c2da645a2e4b82f Author: Sunil Khatri Date: Wed May 15 13:51:50 2024 +0530 drm/amdgpu: add print support for gfx11 ipdump Add support of gfx11 ipdump print so devcoredump could trigger it to dump the captured registers in devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit b5812822d9c9829187efe1ef99141b5edcfc8c7c Author: Sunil Khatri Date: Wed May 15 13:34:40 2024 +0530 drm/amdgpu: add gfx11 registers support in ipdump Add general registers of gfx11 in ipdump for devcoredump support. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit eb14b8f50516b543b3483a14b1f30001940e6305 Author: Sunil Khatri Date: Tue May 21 19:13:44 2024 +0530 drm/amdgpu: Add missing offsets in gc_11_0_0_offset.h IB1 registers: regCP_IB1_CMD_BUFSZ regCP_IB1_BASE_LO regCP_IB1_BASE_HI regCP_IB1_BUFSZ regCP_MES_DEBUG_INTERRUPT_INSTR_PNTR Above registers are part of the asic but not of the offset file for gc_11_0_0_offset.h and hence adding them. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 836bc350a59bf151e99919ba10bca95dc2b1bd70 Author: Sunil Khatri Date: Tue May 14 14:22:59 2024 +0530 drm/amdgpu: add more device info to the devcoredump Adding more device information: a. PCI info b. VRAM and GTT info c. GDC config Also correct the print layout and section information for in devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 29b1fc665cc9290335dab7014fd8c9e7386dc7ad Author: Sunil Khatri Date: Thu May 9 16:38:38 2024 +0530 drm/amdgpu: add prints in IP State dump add prints before and after ip state is dumped. It avoids user to think of system being stuck/hung as dump could take some time after a gpu hang. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 8444453dced3e5d81a1ca0368fc6227834b9eb8f Author: Sunil Khatri Date: Wed May 22 10:54:17 2024 +0530 drm/amdgpu: add gfx queue support of gfx10 in ipdump Add gfx queue register for all instances in devcoredump for gfx10. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 0f83227bc8f09da9a11cbbdfdaa9d724f83086f4 Author: Sunil Khatri Date: Wed May 22 10:43:22 2024 +0530 drm/amdgpu: Add cp queues support fro gfx10 in ipdump Add support to dump registers of all instances of cp queue registers of gfx10 to devcoredump. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 74feef5667ef326122054d11257b2a2e1098dac0 Author: Sunil Khatri Date: Tue May 7 11:08:34 2024 +0530 drm/amdgpu: rename the ip_dump to ip_dump_core Rename the memory pointer from ip_dump to ip_dump_core to make it specific to core registers and rest other registers to be dumped in their respective memories. Reviewed-by: Alex Deucher Signed-off-by: Sunil Khatri Signed-off-by: Alex Deucher commit 621a4e9efb18078d5426b3628d52a629eafe4bc2 Author: Lijo Lazar Date: Tue May 21 12:33:23 2024 +0530 drm/amdgpu: Add CRC16 selection in config KFD uses crc16 for gpu_id generation. Fixes: 3ed181b8ff43 ("drm/amdkfd: Ensure gpu_id is unique") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405211405.TidTWIBX-lkp@intel.com/ Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 6b18376ef37c3dd2bbf34ed4b42fefaa1f348a3d Author: Kenneth Feng Date: Fri Apr 26 09:30:25 2024 +0800 drm/amd/pm: workaround to pass jpeg unit test this is a workaround to pass jpeg unit test on vcn 5.0 now. will be removed later. Signed-off-by: Kenneth Feng Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit e21e0b782430c7731b0f12ebb7a5e2ff7c20d86b Author: Victor Zhao Date: Mon May 13 13:10:51 2024 +0800 drm/amd/amdgpu: fix the inst passed to amdgpu_virt_rlcg_reg_rw the inst passed to amdgpu_virt_rlcg_reg_rw should be physical instance. Fix the miss matched code. Signed-off-by: Victor Zhao Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f889f9c68bcc2da0286ee22a566ed07d16b509d9 Author: Jane Jian Date: Sat May 11 14:39:34 2024 +0800 drm/amdgpu - optimize rlc spm cntl v1 - driver MMIO read the register to check whether write is required - if write is required, sriov full time to use rlcg, otherwise use KIQ v2 - include gfx v11 sriov runtime case Signed-off-by: Jane Jian Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b6dc64b4e2254a8aa6318116f684ffb440a6e4c Author: Srinivasan Shanmugam Date: Fri May 10 15:25:47 2024 +0530 drm/amd/display: Refactor construct_phy function in dc/link/link_factory.c This commit modifies the construct_phy function to handle the case where `bios->integrated_info` is NULL and to address a compiler warning about a large stack allocation. Upon examination, it was found that the local `integrated_info` structure was just used to copy values which is large and was being declared directly on the stack which could potentially lead to performance issues. This commit changes the code to use `bios->integrated_info` directly, which avoids the need for a large stack allocation. The function now checks if `bios->integrated_info` is NULL before entering a for loop that uses it. If `bios->integrated_info` is NULL, the function skips the for loop and continues executing the rest of the code. This ensures that the function behaves correctly when `bios->integrated_info` is NULL and improves compatibility with dGPUs. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c: In function ‘construct_phy’: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:743:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Wenjing Liu Cc: Jerry Zuo Cc: Qingqing Zhuo Cc: Tom Chung Cc: Alvin Lee Cc: Rodrigo Siqueira Cc: Roman Li Cc: Hersen Wu Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Signed-off-by: Srinivasan Shanmugam Suggested-by: Wenjing Liu Reviewed-by: Wenjing Liu Signed-off-by: Alex Deucher commit cf85764e2bf1acbefb45e09919a8e9fafc58e119 Author: Hawking Zhang Date: Tue May 21 15:03:02 2024 +0800 drm/amdgpu: correct hbm field in boot status hbm filed takes bit 13 and bit 14 in boot status. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8d7b1496754dcbc7a7155c85d919ad435979a887 Author: Frank Min Date: Tue May 21 13:08:09 2024 +0800 drm/amdgpu: program device_cntl2 through pci cfg space device_cntl2 is accessible from pci config space, so program it through pci cfg space instead of mmio. Signed-off-by: Frank Min Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 19f0edd897f73c4eebb3b5825d8910f0edfa894e Author: Li Ma Date: Mon May 20 18:43:55 2024 +0800 drm/amdgpu/atomfirmware: add intergrated info v2.3 table [Why] The vram width value is 0. Because the integratedsysteminfo table in VBIOS has updated to 2.3. [How] Driver needs a new intergrated info v2.3 table too. Then the vram width value will be correct. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0ea55445554209913a72eab86b60f5788776c4d6 Author: Srinivasan Shanmugam Date: Tue May 21 10:03:37 2024 +0530 drm/amdgpu: Fix snprintf usage in amdgpu_gfx_kiq_init_ring This commit fixes a format truncation issue arosed by the snprintf function potentially writing more characters into the ring->name buffer than it can hold, in the amdgpu_gfx_kiq_init_ring function The issue occurred because the '%d' format specifier could write between 1 and 10 bytes into a region of size between 0 and 8, depending on the values of xcc_id, ring->me, ring->pipe, and ring->queue. The snprintf function could output between 12 and 41 bytes into a destination of size 16, leading to potential truncation. To resolve this, the snprintf line was modified to use the '%hhu' format specifier for xcc_id, ring->me, ring->pipe, and ring->queue. The '%hhu' specifier is used for unsigned char variables and ensures that these values are printed as unsigned decimal integers. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c: In function ‘amdgpu_gfx_kiq_init_ring’: drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:332:61: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 0 and 8 [-Wformat-truncation=] 332 | snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d.%d", | ^~ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:332:50: note: directive argument in the range [0, 2147483647] 332 | snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d.%d", | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:332:9: note: ‘snprintf’ output between 12 and 41 bytes into a destination of size 16 332 | snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d.%d", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 333 | xcc_id, ring->me, ring->pipe, ring->queue); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 345a36c4f1ba ("drm/amdgpu: prefer snprintf over sprintf") Cc: Alex Deucher Cc: Christian König Signed-off-by: Srinivasan Shanmugam Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 806e8c5579405a1920902ae58bd7907341a37f7d Author: Jesse Zhang Date: Tue May 21 15:02:54 2024 +0800 drm/amdgpu: fix invadate operation for pg_flags Since the type of pg_flags is u32, adev->pg_flags >> 16 >> 16 is 0 regardless of the values of its operands. So removing the operations upper_32_bits and lower_32_bits. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit fa1040811678afc0fad043d7be1de252de74a035 Author: Jack Xiao Date: Tue May 21 15:28:17 2024 +0800 drm/amdgpu/mes12: mes hw_fini fix for mode1 reset Port mes11 hw_fini to mes12, fix for mode1 reset. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 64da71ea76418550aafd85740dfde074c99a3a6c Author: Jesse Zhang Date: Tue May 21 14:48:57 2024 +0800 drm/amdgpu: fix invadate operation for umsch Since the type of data_size is uint32_t, adev->umsch_mm.data_size - 1 >> 16 >> 16 is 0 regardless of the values of its operands So removing the operations upper_32_bits and lower_32_bits. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 030ffd4d43b433bc6671d9ec34fc12c59220b95d Author: Jesse Zhang Date: Thu May 9 10:57:04 2024 +0800 drm/admgpu: fix dereferencing null pointer context When user space sets an invalid ta type, the pointer context will be empty. So it need to check the pointer context before using it Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 29c03edecd090de105b9353d8eb4e430132218a8 Author: Jesse Zhang Date: Tue May 21 14:56:25 2024 +0800 drm/amd/pm: fix unsigned value asic_type compared against Enum asic_type always greater than or equal CHIP_TAHITI. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 9262f411dc2e765d8a1d52d33c84d2ebb0580cec Author: Yang Wang Date: Wed Apr 24 10:47:35 2024 +0800 drm/amdgpu: skip to create ras xxx_err_count node when ACA is enabled skip to create 'xxx_err_count' node when ACA is enabled. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit b0ac1b42dbdcc990ad32d6f8107a1d5214c33e67 Author: John Harrison Date: Fri May 17 21:36:59 2024 -0700 drm/xe/guc: Port over the slow GuC loading support from i915 GuC loading can take longer than it is supposed to for various reasons. So add in the code to cope with that and to report it when it happens. There are also many different reasons why GuC loading can fail, so add in the code for checking for those and for reporting issues in a meaningful manner rather than just hitting a timeout and saying 'fail: status = %x'. Also, remove the 'FIXME' comment about an i915 bug that has never been applicable to Xe! v2: Actually report the requested and granted frequencies rather than showing granted twice (review feedback from Badal). v3: Locally code all the timeout and end condition handling because a helper function is not allowed (review feedback from Lucas/Rodrigo). v4: Add more documentation comments and rename a define to add units (review feedback from Lucas). v5: Fix copy/paste error in xe_mmio_wait32_not (review feedback from Lucas) and rebase (no more return value from guc_wait_ucode). Signed-off-by: John Harrison Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240518043700.3264362-3-John.C.Harrison@Intel.com commit fcc8f80517ff71fab24f63dcb4bdb43e63b52fbd Author: John Harrison Date: Fri May 17 21:36:58 2024 -0700 drm/xe: Make read_perf_limit_reasons globally accessible Other driver code beyond the sysfs interface wants to know about throttling. So make the query function globally accessible. v2: Revert include order change (review feedback from Lucas) v3: Remove '_sysfs' from throttle file names and keep limit query in the same file rather than moving elsewhere (review feedback from Rodrigo). v4: Correct #include while renaming header file (review feedback from Lucas). Signed-off-by: John Harrison Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240518043700.3264362-2-John.C.Harrison@Intel.com commit 83ee002df0ccdd7429d6355f65af3845af016ffe Author: José Roberto de Souza Date: Wed May 22 13:34:31 2024 -0700 drm/xe: Nuke simple error capture This error capture prints into dmesg HW state when a gpu hang happens. It was useful when we did not had devcoredump, now it is a incompleted version of devcoredump that has potential to flood dmesg. Cc: Rodrigo Vivi Cc: John Harrison Signed-off-by: José Roberto de Souza Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20240522203431.191594-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit b10d0c5e9df7059be5bbfe2c6b293d8e4883f975 Author: José Roberto de Souza Date: Wed May 22 13:12:03 2024 -0700 drm/xe: Add process name to devcoredump Process name help us track what application caused the gpug hang, this is crucial when running several applications at the same time. v2: - handle Xe KMD exec_queues without VM v3: - use get_pid_task() (suggested by Nirmoy) Cc: Rodrigo Vivi Cc: Nirmoy Das Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240522201203.145403-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit e8ac8048a759ab59042019fd84e6db98c7dc32f8 Author: Dr. David Alan Gilbert Date: Wed May 22 18:58:40 2024 +0100 drm/xe: remove unused struct 'xe_gt_desc' 'xe_gt_desc' is unused since commit 1e6c20be6c83 ("drm/xe: Drop extra_gts[] declarations and XE_GT_TYPE_REMOTE"). Remove it. Signed-off-by: Dr. David Alan Gilbert Link: https://patchwork.freedesktop.org/patch/msgid/20240522175840.382107-1-linux@treblig.org Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit f91806033fb7ed1eb7e110849dd48f41c4fe4d4a Author: Rodrigo Vivi Date: Wed May 22 13:01:05 2024 -0400 drm/xe: Enable D3Cold on 'low' VRAM utilization Now that we eliminated all the mem_access get/put with its locking issues from the inner calls of migration, we can allow D3Cold. Enable it when VRAM utilization is lower then 300Mb. On higher utilization we only allow D3hot so we don't increase so much the latency on runtime resume due to the memory restoration. Reviewed-by: Matthew Brost Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-7-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 8d490e019b3b8da9cd9986d75b493ac3aa8d3269 Author: Rodrigo Vivi Date: Wed May 22 13:01:04 2024 -0400 drm/xe: Stop checking for power_lost on D3Cold GuC reset status is not reliable for this purpose and it is once in a while ending up in a situation of D3Cold, where power_reset is false and without the proper memory restoration the GuC reload and Display will fail to come back from D3Cold. So, let's do a full restoration of everything if we have a risk of losing power, without further optimizations. v2: also remove the gut_in_reset function (Anshuman) Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Reviewed-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-6-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit e7b180b22022f52e3f5fca695cc75d63bddc5a1c Author: Rodrigo Vivi Date: Wed May 22 13:01:03 2024 -0400 drm/xe: Prepare display for D3Cold Prepare power-well and DC handling for a full power lost during D3Cold, then sanitize it upon D3->D0. Otherwise we get a bunch of state mismatch. Ideally we could leave DC9 enabled and wouldn't need to move DC9->DC0 on every runtime resume, however, the disable_DC is part of the power-well checks and intrinsic to the dc_off power well. In the future that can be detangled so we can have even bigger power savings. But for now, let's focus on getting a D3Cold, which saves much more power by itself. v2: create new functions to avoid full-suspend-resume path, which would result in a deadlock between xe_gem_fault and the modeset-ioctl. v3: Only avoid the full modeset to avoid the race, for a more robust suspend-resume. Cc: Anshuman Gupta Cc: Uma Shankar Tested-by: Francois Dugast Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-5-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 73ba282e7faf625faf26a09861e91a9fd20ea9a8 Author: Rodrigo Vivi Date: Wed May 22 13:01:02 2024 -0400 drm/xe: Relax runtime pm protection around VM In the regular use case scenario, user space will create a VM, and keep it alive for the entire duration of its workload. For the regular desktop cases, it means that the VM is alive even on idle scenarios where display goes off. This is unacceptable since this would entirely block runtime PM indefinitely, blocking deeper Package-C state. This would be a waste drainage of power. Limit the VM protection solely for long-running workloads that are not protected by the scheduler references. By design, run_job for long-running workloads returns NULL and the scheduler drops all the references of it, hence protecting the VM for this case is necessary. v2: Update commit message to a more imperative language and to reflect why the VM protection is really needed. Also add a comment in the code to let the reason visbible. v3: Remove vma_access case and the mentions to mmap. Mmap cases are already protected by the gem page fault. Cc: Thomas Hellström Cc: Lucas De Marchi Cc: Matthew Brost Tested-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-4-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit ad1e331fc451a2cffc72ae193b843682ce237e24 Author: Rodrigo Vivi Date: Wed May 22 13:01:01 2024 -0400 drm/xe: Relax runtime pm protection during execution Limit the protection only during moments of actual job execution, and introduce protection for guc submit fini, which is currently unprotected due to the absence of exec_queue life protection. In the regular use case scenario, user space will create an exec queue, and keep it alive to reuse that until it is done with that kind of workload. For the regular desktop cases, it means that the exec_queue is alive even on idle scenarios where display goes off. This is unacceptable since this would entirely block runtime PM indefinitely, blocking deeper Package-C state. This would be a waste drainage of power. Cc: Matthew Brost Tested-by: Francois Dugast Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-3-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 967c5d7c64e207c9cb1b99ff3d2aec95e3316af7 Author: Rodrigo Vivi Date: Wed May 22 13:01:00 2024 -0400 drm/xe: Fix xe_pm_runtime_get_if_in_use documentation Let's be clear on what it is actually doing and align with xe_pm_runtime_get_if_active doc style. Tested-by: Francois Dugast Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-2-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 46edb0a3eb16cebc2db6f9b6f7c19813d52bfcc9 Author: Rodrigo Vivi Date: Wed May 22 13:00:59 2024 -0400 drm/xe: Fix xe_pm_runtime_get_if_active return Current callers of this function are already taking the result to a boolean and using in an if. It might be a problem because current function might return negative error codes on failure, without increasing the reference counter. In this scenario we could end up with extra 'put' call ending in unbalanced scenarios. Let's fix it, while aligning with the current xe_pm_get_if_in_use style. Tested-by: Francois Dugast Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit ee6af5de1cf438cbf4f82d6d7c453daa47dcaff9 Author: José Roberto de Souza Date: Wed May 22 13:12:03 2024 -0700 drm/xe: Add process name to devcoredump Process name help us track what application caused the gpug hang, this is crucial when running several applications at the same time. v2: - handle Xe KMD exec_queues without VM v3: - use get_pid_task() (suggested by Nirmoy) Cc: Rodrigo Vivi Cc: Nirmoy Das Reviewed-by: Nirmoy Das Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240522201203.145403-1-jose.souza@intel.com commit 4bfa8a140db33599e666400fe4007d27fbacc96f Author: Ville Syrjälä Date: Thu May 16 16:56:15 2024 +0300 drm/i915: Define SEL_FETCH_PLANE registers via PICK_EVEN_2RANGES() Instead of that huge _PICK() let's use PICK_EVEN_2RANGES() for the SEL_FETCH_PLANE registers. A bit more tedious to have to define 8 raw register offsets for everything, but perhaps a bit easier to understand since we use a standard mechanism now instead of hand rolling the arithmetic. Also bloat-o-meter says: add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-326 (-326) Function old new delta icl_plane_update_arm 510 446 -64 icl_plane_disable_sel_fetch_arm.isra 158 54 -104 icl_plane_update_noarm 1898 1740 -158 Total: Before=2574502, After=2574176, chg -0.01% v2: s/mtl+/tgl+/ comments to reflect actual reality Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3d9d313d518c5bc9e5ab6aeab86c9fa4bece095c Author: Jani Nikula Date: Fri May 10 18:08:13 2024 +0300 drm/connector: update edid_blob_ptr documentation Accessing the EDID via edid_blob_ptr causes chicken-and-egg problems. Keep edid_blob_ptr as the userspace interface that should be accessed via dedicated functions. Reviewed-by: Chaitanya Kumar Borah Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/b6aa1ea30ae85ef9e9814315d3437e82f0ba6754.1715353572.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit adcea136b4e865b11cf414321e397d872558e767 Author: Jani Nikula Date: Fri May 10 18:08:12 2024 +0300 drm/edid: add a helper for EDID sysfs property show Add a helper to get the EDID property for sysfs property show. This hides all the edid_blob_ptr usage within drm_edid.c. Reviewed-by: Chaitanya Kumar Borah Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/902c8e09d25b99391fd9c92d95af07c01d7b7cbd.1715353572.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 42505ab1201918585b2627b171b064193a815c0d Author: Jani Nikula Date: Fri May 10 18:08:11 2024 +0300 drm/amdgpu: remove amdgpu_connector_edid() and stop using edid_blob_ptr amdgpu_connector_edid() copies the EDID from edid_blob_ptr as a side effect if amdgpu_connector->edid isn't initialized. However, everywhere that the returned EDID is used, the EDID should have been set beforehands. Only the drm EDID code should look at the EDID property, anyway, so stop using it. Cc: Alex Deucher Cc: Christian König Cc: Pan Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Robert Foss Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1463862965d76e9458551598fd4d287a08d3d264.1715353572.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8032e67f79497e4cad26d3d229905b349a2a1c76 Author: Jani Nikula Date: Fri May 10 18:08:10 2024 +0300 drm/radeon: remove radeon_connector_edid() and stop using edid_blob_ptr radeon_connector_edid() copies the EDID from edid_blob_ptr as a side effect if radeon_connector->edid isn't initialized. However, everywhere that the returned EDID is used, the EDID should have been set beforehands. Only the drm EDID code should look at the EDID property, anyway, so stop using it. Cc: Alex Deucher Cc: Christian König Cc: Pan Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Robert Foss Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/b2bdec9161ddcbf79c8516aeea508a9903bd0074.1715353572.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 242136edda0f405ebdd93ea788f2ed9a907ce897 Author: Jani Nikula Date: Fri May 10 18:08:09 2024 +0300 drm/radeon: convert to using is_hdmi and has_audio from display info Prefer the parsed results for is_hdmi and has_audio in display info over calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(), respectively. Cc: Alex Deucher Cc: Christian König Cc: Pan Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Robert Foss Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/c4dfde81b98a4e938ef1e253b05550cad96e49be.1715353572.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 444f396c62420a010270de9a7963c72473928dc3 Author: Jani Nikula Date: Fri May 10 18:08:08 2024 +0300 drm/nouveau: convert to using is_hdmi and has_audio from display info Prefer the parsed results for is_hdmi and has_audio in display info over calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(), respectively. Conveniently, this also removes the need to use edid_blob_ptr. v2: Reverse a backwards if condition (Ilia) Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouveau@lists.freedesktop.org Reviewed-by: Lyude Paul Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/aa45875200705205ae101c409fc2bba03b631a5e.1715353572.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a92fd2d9327ba877f29753eec15b93072ac300b0 Author: Johannes Berg Date: Fri May 10 11:26:02 2024 +0200 wifi: mac80211: send DelBA with correct BSSID In MLO, the deflink BSSID is clearly invalid. Since we fill the addresses as MLD addresses and translate later, use the AP address here instead. This fixes an issue that happens with HW restart, where the DelBA frame is transmitted, but not processed correctly due to the wrong BSSID (or even just discarded entirely). As a result, the BA sessions are kept alive; however, as other state is reset during HW restart, this then fails (reorder, etc.) and data doesn't go through until new BA sessions are established. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240510112601.f4e1effdea29.I98e81f22166b68d4b6211191bcaaf8531b324a77@changeid Signed-off-by: Johannes Berg commit 609c12a2af046c3674af2d5c7978b025718de5e8 Author: Johannes Berg Date: Mon May 6 21:18:59 2024 +0200 wifi: mac80211: reset negotiated TTLM on disconnect The negotiated TTLM data must be reset on disconnect, otherwise it may end up getting reused on another connection. Fix that. Fixes: 8f500fbc6c65 ("wifi: mac80211: process and save negotiated TID to Link mapping request") Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211858.04142e8fe01c.Ia144457e086ebd8ddcfa31bdf5ff210b4b351c22@changeid Signed-off-by: Johannes Berg commit 0d22026f3287ef5af80d983db150ff260e7117e8 Author: Johannes Berg Date: Mon May 6 21:10:35 2024 +0200 wifi: mac80211: don't stop TTLM works again There's no need to stop works that have already been stopped during disconnect, so don't. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211034.f8434be19f56.I021afadc538508da3bc8f95c89f424ca62b94bef@changeid Signed-off-by: Johannes Berg commit 3567bd6dcd1467d2ad0f597be94114c6f9c62680 Author: Johannes Berg Date: Mon May 6 21:10:34 2024 +0200 wifi: mac80211: cancel TTLM teardown work earlier It shouldn't be possible to run this after disconnecting, so cancel the work earlier. Fixes: a17a58ad2ff2 ("wifi: mac80211: add support for tearing down negotiated TTLM") Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211034.096a10ccebec.I5584a21c27eb9b3e87b9e26380b627114b32ccba@changeid Signed-off-by: Johannes Berg commit 53b739fd46462dc40fd18390d76f2ee05c18ea3a Author: Johannes Berg Date: Mon May 6 21:10:33 2024 +0200 wifi: mac80211: cancel multi-link reconf work on disconnect This work shouldn't run after we're disconnecting. Cancel it earlier (and then don't cancel it in stop later.) Fixes: 8eb8dd2ffbbb ("wifi: mac80211: Support link removal using Reconfiguration ML element") Reviewed-by: Ilan Peer Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid Signed-off-by: Johannes Berg commit 2fe0a605d083b884490ee4de02be071b5b4291b1 Author: Johannes Berg Date: Mon May 6 21:18:52 2024 +0200 wifi: mac80211: fix TTLM teardown work The worker calculates the wrong sdata pointer, so if it ever runs, it'll crash. Fix that. Fixes: a17a58ad2ff2 ("wifi: mac80211: add support for tearing down negotiated TTLM") Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211853.e6471800c76d.I8b7c2d6984c89a11cd33d1a610e9645fa965f6e1@changeid Signed-off-by: Johannes Berg commit aa4ec06c455d0200eea0a4361cc58eb5b8bf68c4 Author: Dmitry Antipov Date: Fri May 17 18:33:31 2024 +0300 wifi: cfg80211: use __counted_by where appropriate Annotate 'sub_specs' of 'struct cfg80211_sar_specs', 'channels' of 'struct cfg80211_sched_scan_request', 'channels' of 'struct cfg80211_wowlan_nd_match', and 'matches' of 'struct cfg80211_wowlan_nd_info' with '__counted_by' attribute. Briefly tested with clang 18.1.1 and CONFIG_UBSAN_BOUNDS running iwlwifi. Signed-off-by: Dmitry Antipov Link: https://msgid.link/20240517153332.18271-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit f9a0757a4b2f5df4376963c25a3d7d7aeba78444 Author: Pradeep Kumar Chitrapu Date: Wed May 15 11:13:18 2024 -0700 wifi: mac80211: Add EHT UL MU-MIMO flag in ieee80211_bss_conf Add flag for Full Bandwidth UL MU-MIMO for EHT. This is utilized to pass EHT MU-MIMO configurations from user space to driver in AP mode. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Link: https://msgid.link/20240515181327.12855-2-quic_pradeepc@quicinc.com Signed-off-by: Johannes Berg commit 9f472520f6f7b8ed3cf82d800b75c91c4c3d4ef1 Author: Johannes Berg Date: Mon May 6 21:54:52 2024 +0200 wifi: mac80211: refactor chanreq.ap setting There are now three places setting up chanreq.ap which always depends on the mode (EHT being used or not) and override flag. Refactor that code into a common function with a comment, to make that clearer. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506215543.5cd6a209e58a.I3be318959d9e2df5dccd2d0938c3d2fcc6688030@changeid Signed-off-by: Johannes Berg commit 4540568136fefe0fcc366ded125cc56b0d9e1724 Author: Johannes Berg Date: Mon May 6 21:54:51 2024 +0200 wifi: mac80211: handle TPE element during CSA Handle the transmit power envelope (TPE) element during channel switch, applying it when the channel switch is done. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506215543.486c33157d18.Idf971ad801b6961c177bdf42cc323fd1a4ca8165@changeid Signed-off-by: Johannes Berg commit f81747a9ad2e773ee72d881717e859a9f7a01c76 Author: Johannes Berg Date: Mon May 6 21:54:50 2024 +0200 wifi: mac80211: handle wider bandwidth OFDMA during CSA During channel switch, track the AP configuration in the chanreq, so that wider bandwidth OFDMA is taken into account correctly, since multiple channel contexts may be needed due to sharing not being possible due to wider bandwidth OFDMA. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506215543.b2c5a72dac1b.I69f65cb2e75d4a49a174b1aede68bf8ff0a3cab3@changeid Signed-off-by: Johannes Berg commit 344d18cec23142b3921e068a90f58e8fc5f7637a Author: Johannes Berg Date: Mon May 6 21:54:49 2024 +0200 wifi: mac80211: collect some CSA data into sub-structs Collect the CSA data in ieee80211_link_data_managed and ieee80211_link_data into a csa sub-struct to clean up a bit and make adding new things more obvious. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506215543.29f954b1f576.I9a683a9647c33d4dd3011aade6677982428c1082@changeid Signed-off-by: Johannes Berg commit 7ef8f6821d16623a3f6ea279542f9f47ece9ff1e Author: Johannes Berg Date: Mon Apr 15 11:27:11 2024 +0300 wifi: mac80211: mlme: handle cross-link CSA If we see a channel switch announcement on one link for another, handle that case and start the CSA. The driver can react to this in whatever way it needs. The stack will have the ability to track it via the RNR/MLE in the reporting link's beacon if it sees it for inactive links and adjust everything accordingly. Note that currently the timings for the CSA aren't set, the values are only used by the Intel drivers, and they don't need this for newer devices that support MLO, so I've left it out for now. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240415112355.4d34b6a31be7.Ie8453979f5805873a8411c99346bcc3810cd6476@changeid Signed-off-by: Johannes Berg commit 2d33ecf5d0148671c74e68e18755b9411a7ba923 Author: Johannes Berg Date: Mon May 6 21:11:59 2024 +0200 wifi: cfg80211: restrict operation during radar detection Just like it's not currently possible to start radar detection while already operating, it shouldn't be possible to start operating while radar detection is running. Fix that. Also, improve the check whether operating (carrier might not be up if e.g. attempting to join IBSS). Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211158.ae8dca3d0d6c.I7c70a66a5fbdbc63a78fee8a34f31d1995491bc3@changeid Signed-off-by: Johannes Berg commit ce9e660ef32e87441bf59b04f67a24113e82546a Author: Johannes Berg Date: Mon May 6 21:13:12 2024 +0200 wifi: mac80211: move radar detect work to sdata At some point we thought perhaps this could be per link, but really that didn't happen, and it's confusing. Radar detection still uses the deflink to allocate the channel, but the work need not be there. Move it back. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211311.43bd82c6da04.Ib39bec3aa198d137385f081e7e1910dcbde3aa1b@changeid Signed-off-by: Johannes Berg commit 48443a4a1c97dd8b6614833af928bc15aeff2e47 Author: Anjaneyulu Date: Sun May 12 15:25:05 2024 +0300 wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v11 Add support for enable/disable 11be for china and South Korea by reading DSM function 12 from UEFI or ACPI and sending it to the FW. Signed-off-by: Anjaneyulu Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512152312.037613d03c87.I4e5ee63c0dbdd4bd6c48daee7b0c88462b702423@changeid Signed-off-by: Johannes Berg commit 6584b9d0aa3234bd8af419e46de1a9648cd34116 Author: Emmanuel Grumbach Date: Sun May 12 15:25:03 2024 +0300 wifi: iwlwifi: move code from iwl-eeprom-parse to dvm Move code that is DVM only to dvm. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512152312.9a1b6ef116e0.I217a513f544d5288a7760d265f51419e81abfd9d@changeid Signed-off-by: Johannes Berg commit b476564b90668ea957db2411fc946753cdc36d8d Author: Emmanuel Grumbach Date: Sun May 12 15:25:02 2024 +0300 wifi: iwlwifi: kill iwl-eeprom-read This is used by dvm only, move to dvm. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512152312.72f4bf256c8d.I7433bda9b0fc9eece5210db2cb90c2f03973f5ec@changeid Signed-off-by: Johannes Berg commit 46144103ace2863e26f4e911aa45200753b7dbca Author: Miri Korenblit Date: Sun May 12 15:24:59 2024 +0300 wifi: iwlwifi: mvm: don't skip link selection If we exit EMLSR due to a IWL_MVM_ESR_EXIT*, a MLO scan followed by a link selection is scheduled with a delay of 30 seconds. If during that 30 seconds EMLSR was blocked and unblocked (IWL_MVM_ESR_BLOCKED*), we would still want to get the needed data from the MLO scan and select link accordingly, and not return immediately to EMLSR. Fixes: 2f33561ea8f9 ("wifi: iwlwifi: mvm: trigger link selection after exiting EMLSR") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240512152312.caab27a8dd8f.I63f67e213d5e05416f71513a8d914917d59aa44f@changeid Signed-off-by: Johannes Berg commit 3f3126515fbee0e364f8218f6171c091d8e2555e Author: Johannes Berg Date: Sun May 12 15:24:58 2024 +0300 wifi: iwlwifi: mvm: add mvm-specific guard Add and use an mvm-specific guard for the mvm mutex. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512152312.7391425b3af2.I1b109f56753dd3f35602dd2c5cf6e1e35aee313d@changeid Signed-off-by: Johannes Berg commit 9d42be9b181b825d7401a8dd10a198b087783e0b Author: Johannes Berg Date: Sun May 12 15:24:57 2024 +0300 wifi: iwlwifi: simplify TX tracing There's no need to calculate again whether data should be included or be handled externally, just check if any space for it was already reserved. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512152312.a3d3b4796460.I85bd3029baee24ebf0be04db7d6bf01834090869@changeid Signed-off-by: Johannes Berg commit bdaae563e097a40e942d66a15cb3a5537f156dd5 Author: Johannes Berg Date: Sun May 12 15:24:56 2024 +0300 wifi: iwlwifi: tracing: fix condition to allocate buf1 There's no need to allocate buf1 if we're not going to write anything to it, and the condition for writing is (correctly) "hdr_len > 0 && !iwl_trace_data()". Also allocate the event space only under the same condition. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512152312.a11e6490d053.Ie090beea70d2f271bb22c9b0e287dbd342fb2a96@changeid Signed-off-by: Johannes Berg commit f79968eb417574f84a06c22510cbeb414e89a809 Author: Emmanuel Grumbach Date: Sun May 12 07:58:57 2024 +0300 wifi: iwlwifi: mvm: leave a print in the logs when we call fw_nmi() When we crash the firmware, we need to know why we decided to do so. Almost all the callsites of iwl_force_nmi() print something in the logs that explain why the driver decided to crash the firmware. Debugfs doesn't print anything and it is then hard to understand why the firmware has crashed. Add a simple print in the debugfs hook to ease the debug. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512075822.e2558de222dc.Idd81777c47264e6f557b086625895c1dc2f667f3@changeid Signed-off-by: Johannes Berg commit 9574c7592c5080a3e1f3fdfe658bd13083a04cb5 Author: Miri Korenblit Date: Sun May 12 07:31:10 2024 +0300 wifi: iwlwifi: mvm: disable dynamic EMLSR when AUTO_EML is false When AUTO_EML is set to false, this change ignores the exit criteria, for testing purposes. Currently, if AUTO_EML is disabled, the driver will not select a link or enter EMLSR, but will still exit if one of the criteria is not fulfilled. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240512072733.10a0b5da6ec2.I46fd578a3ef6cdbf14fdc4dfa97b4be008fe68e3@changeid Signed-off-by: Johannes Berg commit 157c8a448354518f9a1e8d758094fc80afeb8568 Author: Benjamin Berg Date: Sun May 12 07:31:08 2024 +0300 wifi: iwlwifi: mvm: use vif P2P type helper Use ieee80211_vif_type_p2p instead of checking for IFTYPE_AP in combination with vif->p2p. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.15a00a812c1b.I5ffee795d960c9beda46a934f5b4c70acde112f9@changeid Signed-off-by: Johannes Berg commit ed93faf01797d83b3347168adae93e6eb5fc1d9c Author: Johannes Berg Date: Sun May 12 07:31:07 2024 +0300 wifi: iwlwifi: mvm: don't track used links separately We track which link is using which FW link ID, so there really isn't a need to separately track which link IDs are in use. Remove that code and check the table when looking for a new link ID to use. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.1a67d8af815f.Ie642c12dce3ab55c688abd9a25918569e83e558a@changeid Signed-off-by: Johannes Berg commit 45eeee1f300d2b0b1ad8570b4ef6e2a23932f1a5 Author: Emmanuel Grumbach Date: Sun May 12 07:31:05 2024 +0300 wifi: iwlwifi: always print the firmware version in hex All our firmware versions should now be printed in hex. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.cae4c562b2c3.I5043383bd0e81f872c55046afd2c6560f482c8e0@changeid Signed-off-by: Johannes Berg commit 6ccfc7c49b6d99e3b857afb064e56a004b0a5e03 Author: Johannes Berg Date: Sun May 12 07:31:03 2024 +0300 wifi: iwlwifi: fw: avoid bad FW config on RXQ DMA failure In practice, iwl_trans_get_rxq_dma_data() will not fail, it only can do that if called with the wrong arguments. But it does have an error value and doesn't initialize the argument when it fails, so don't use the value then. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.faf3a1b87589.I77c950173cb914676fbd28483e5ef420bb9f1bc9@changeid Signed-off-by: Johannes Berg commit 8d59995067d9a6024fc63afa1434e0f5196727de Author: Mukesh Sisodiya Date: Sun May 12 07:31:01 2024 +0300 wifi: iwlwifi: fw: api: Add new timepoint for scan failure Add new time point to get the details of scan failure While on it added other missing enum to match with FW. Signed-off-by: Mukesh Sisodiya Reviewed-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.6781e76990c4.Iadfb3f6dd63a98fc35019772266b5ebddc5b5270@changeid Signed-off-by: Johannes Berg commit 9c93c0b44be36fd5267fb79ae33453f989fbe909 Author: Johannes Berg Date: Sun May 12 07:31:00 2024 +0300 wifi: iwlwifi: mei: unify iwl_mei_set_power_limit() prototype The two versions of iwl_mei_set_power_limit() are a bit different, and while really the const isn't all that necessary on the inline, it's still better to have it be the same. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.854427753c92.I557716085cb1f6a35d1f97640388fa421f42a56a@changeid Signed-off-by: Johannes Berg commit 472a15d319b8560da94c7c6e94ead2fea491dd1c Author: Johannes Berg Date: Sun May 12 07:30:59 2024 +0300 wifi: iwlwifi: mvm: mark bad no-data RX as having bad PLCP Just like with any other frame, mac80211 will do sanity checks on no-data RX (representing e.g. sounding PPDUs), and if e.g. the NSS is wrong, it will warn. This isn't a good idea if we already know the frame wasn't received well, e.g. has bad PLCP. Unless the firmware reports "no error", set the bad PLCP flag to skip checks in mac80211. Also, since we're now extracting two different values from the info field, use le32_get_bits() for both. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.e6adcb9a6ece.Ic14c2e8ed5e80d48af78b2f04e9f08beeb62d68e@changeid Signed-off-by: Johannes Berg commit e213eb95a49724a8168e6ef48a62fa06a785fa41 Author: Miri Korenblit Date: Sun May 12 07:30:58 2024 +0300 wifi: iwlwifi: bump FW API to 91 for BZ/SC devices Start supporting API version 91 for new devices. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.27c00099e8b7.I99b4f24bba073414dd04a6e04a359c7fbba52990@changeid Signed-off-by: Johannes Berg commit bc4867aabfead3d8eb64827208f59bc1d517e213 Author: Miri Korenblit Date: Sun May 12 07:30:57 2024 +0300 wifi: iwlwifi: mvm: add a of print of a few commands This is needed for debugging. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.65fc46e2ffbc.I19d4ef2cc06bfee7d9644a376d39399f0f6eaa15@changeid Signed-off-by: Johannes Berg commit ca88709d10b1c21aca2bf58fa528723a81322b03 Author: Miri Korenblit Date: Sun May 12 07:30:56 2024 +0300 wifi: iwlwifi: mvm: Use the SMPS cfg of the correct link The exiting code is checking the SMPS mode of deflink. Use the SMPS mode of the link_sta function parameter. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.f3e2834e78f5.Ie24b431a6ad0dbf977afbbd4d2116bfe2426a0d5@changeid Signed-off-by: Johannes Berg commit 6a32ebd534ff31e93d6ef3ee5640b97efff8185d Author: Miri Korenblit Date: Sun May 12 07:30:55 2024 +0300 wifi: iwlwifi: mvm: don't always set antenna in beacon template cmd This needs to be set only if the FW is not capable of selecting an antenna on its own. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240512072733.73d790911268.I158dc1dbc9c2e199c69d8213e5496d2de72da28b@changeid Signed-off-by: Johannes Berg commit 797af7ac20283d10818e9fc21b405dcaf6902b69 Author: Chaya Rachel Ivgi Date: Fri May 10 17:06:41 2024 +0300 wifi: iwlwifi: remove redundant reading from NVM file The driver reads xtal_calib from NVM file, but actually never uses it. This is only used in dvm driver. Signed-off-by: Chaya Rachel Ivgi Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.c4d1a4571049.I7d7b73dccb793e220f023e0d049b082b043ca95e@changeid Signed-off-by: Johannes Berg commit 37733bffda3285d18bd1d72c14b3a1cf39c56a5e Author: Shahar S Matityahu Date: Fri May 10 17:06:40 2024 +0300 wifi: iwlwifi: remove fw_running op fw_running assumes that memory can be retrieved only after alive. This assumption is no longer true as we support dump before alive. To avoid invalid access to the NIC, check that STATUS_DEVICE_ENABLED bit in trans status is set before dumping instead of the prior check. Signed-off-by: Shahar S Matityahu Reviewed-by: Luciano Coelho Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.ca07138cedeb.I090e31d3eaeb4ba19f5f84aba997ccd36927e9ac@changeid Signed-off-by: Johannes Berg commit d49c5be9f7fe4864f698c15bf332524f2be3ee69 Author: Andrei Otcheretianski Date: Fri May 10 17:06:38 2024 +0300 wifi: iwlwifi: mvm: Don't set NO_HT40+/- flags on 6 GHz band These flags are not needed on 6 GHz channels, and anyway they were set incorrectly. This in turn resulted in alternating channel flags, preventing reg domain rules to be merged together, so cfg80211 couldn't even send them to the user space, as the regulatory domain was too large. Fix it. Signed-off-by: Andrei Otcheretianski Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.b0d51b2229f8.I092e21cde43320ffc2eff17f5748ff9c87c87fcf@changeid Signed-off-by: Johannes Berg commit b79b56091d2456491f4471bea202453f9755a42d Author: Miri Korenblit Date: Fri May 10 17:06:37 2024 +0300 wifi: iwlwifi: mvm: call ieee80211_sta_recalc_aggregates on A-MSDU size update The driver needs to call this function when the A-MSDU size changes. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.632ee6612a79.Ice3a536a4cbfe60d0edfa231fcb79ee7ab9495dd@changeid Signed-off-by: Johannes Berg commit bb3261943fd8b4b0d21c9f609eb42b6c948e4578 Author: Miri Korenblit Date: Fri May 10 17:06:36 2024 +0300 wifi: iwlwifi: mvm: set A-MSDU size on the correct link The existing code sets the max A-MSDU size to the deflink, set it on the given link instead. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.4de5c1a031ca.I063bc1508e5068b32e321b0f268bc51dba0c0747@changeid Signed-off-by: Johannes Berg commit 7c789b91f538b3a31b1512b46873174fd3960fc3 Author: Miri Korenblit Date: Fri May 10 17:06:34 2024 +0300 wifi: iwlwifi: mvm: define link_sta in the relevant scope The link_sta pointer is now only used inside this if, so define it inside its scope. Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.e0a1dd285d9a.Id5ff16fb98af0c5f533aed6b5ec3cc856401e488@changeid Signed-off-by: Johannes Berg commit 8a29b006dc39484624f841c1e1c30a64a523bbc8 Author: Avraham Stern Date: Fri May 10 17:06:32 2024 +0300 wifi: iwlwifi: mvm: debugfs: add entry for setting maximum TXOP time Add an entry for setting the maximum TXOP time in microseconds. The configured value can be read from the same entry. Signed-off-by: Avraham Stern Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.b8d17a9c1731.I57c33574a61edd68bd0ec1aa7009f31111fd7efe@changeid Signed-off-by: Johannes Berg commit 42884d2c2f512d7123962ab0425c782316f3805f Author: Avraham Stern Date: Fri May 10 17:06:31 2024 +0300 wifi: iwlwifi: mvm: allow UAPSD when in SCM Allow UAPSD when P2P and BSS interfaces share the same channel. Signed-off-by: Avraham Stern Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.1ec19d432497.Id6de5337c878fa70e85bfcf6f4e0e34ce60756fb@changeid Signed-off-by: Johannes Berg commit 7aea71803777cddf17bbb1d4e7cd1c45df0dd47a Author: Emmanuel Grumbach Date: Fri May 10 17:06:30 2024 +0300 wifi: iwlwifi: mvm: simplify the uAPSD coexistence limitation code uAPSD can't be enabled on BSS or P2P Client if there is another active interface (e.g. associated client). Allow the code that apply those limitations to run on BSS as well. Also forbid uAPSD if we have an IBSS or NAN interface in the system. Since we are now forbidding uAPSD in any concurrency scenario, we don't need to check the number of PHY contexts. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240510170500.4ac26534adf7.Ib892020177e86603b2be3a105f8717b9a15951d3@changeid Signed-off-by: Johannes Berg commit 32fca7e3820cc915d1d47e33b13da8124208b04c Author: Johannes Berg Date: Fri May 10 17:06:28 2024 +0300 wifi: iwlwifi: dvm: clean up rs_get_rate() logic The logic here is rather convoluted - we cannot get here with lq_sta being NULL as mac80211 will (no longer) call us like that, and since I removed the rate_control_send_low() call in this function there's no longer any point in setting priv_sta to NULL either. So the only thing that remains to check is if we have actually initialized our lq_sta->drv pointer, and exit if we didn't in which case we'll use the data mac80211 already set up for the low rate usage. Reviewed-by: Luciano Coelho Link: https://msgid.link/20240510170500.a4cdb41825eb.Id202bcc967c32829f70ab1412f8893b6eb7f78e2@changeid Signed-off-by: Johannes Berg commit 5a009b42e0418d30b3ffaff2f46c534cd79b3f23 Author: Johannes Berg Date: Mon May 6 21:37:57 2024 +0200 wifi: mac80211: track changes in AP's TPE If the TPE (transmit power envelope) is changed, detect and report that to the driver. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506214536.103dda923f45.I990877e409ab8eade9ed7c172272e0cae57256cf@changeid Signed-off-by: Johannes Berg commit 39dc8b8ea387ce7f4fe2d2d6d550ed52aa9aa040 Author: Johannes Berg Date: Mon May 6 21:37:56 2024 +0200 wifi: mac80211: pass parsed TPE data to drivers Instead of passing the full TPE elements, in all their glory and mixed up data formats for HE backward compatibility, parse them fully into the right values, and pass that to the drivers. Also introduce proper validation already in mac80211, so that drivers don't need to do it, and parse the EHT portions. The code now passes the values in the right order according to the channel used by an interface, which could also be a subset of the data advertised by the AP, if we couldn't connect with the full bandwidth (for whatever reason.) Also add kunit tests for the more complicated bits of it. Reviewed-by: Miriam Rachel Korenblit Acked-by: Kalle Valo Link: https://msgid.link/20240506214536.2aa839969b60.I265b28209e0b29772b2f125f7f83de44a4da877b@changeid Signed-off-by: Johannes Berg commit caa12b3dd44996f63b8dd0d842c68866d4ead307 Author: Johannes Berg Date: Mon May 6 21:37:55 2024 +0200 wifi: ath11k: fix TPE power levels The chanctx can be shared, but it seems like the TPE values for this vif should only reflect the channel that the vif uses, which is captured in bss_conf->chanreq.oper rather than the chanctx. Use that when calculating defaults, a similar issue is where the data from the AP is processed, but I'm moving that to mac80211. Acked-by: Kalle Valo Link: https://msgid.link/20240506214536.d99fcf5856b9.I359bb401ea74bf82dc981a86a7ca3fa44d169d2e@changeid Signed-off-by: Johannes Berg commit 8592fd7ccc95a7cf222985e6297041463e8b4e9d Author: Johannes Berg Date: Mon May 6 21:37:54 2024 +0200 wifi: ieee80211/ath11k: remove IEEE80211_MAX_NUM_PWR_LEVEL The define IEEE80211_MAX_NUM_PWR_LEVEL doesn't make much sense. Yes, that table has a maximum value of 8, and the table will actually remain that way, but EHT introduced a way to encode more levels for 320 MHz channels. Remove IEEE80211_MAX_NUM_PWR_LEVEL and, for ath11k being the only user, add ATH11K_NUM_PWR_LEVELS, where it makes sense since it cannot support 320 MHz channels. Acked-by: Kalle Valo Link: https://msgid.link/20240506214536.9818e5471055.Icece7e47e963d6b68e0d97ba13c102b37fbaa689@changeid Signed-off-by: Johannes Berg commit e3bae9b22873338d1a7989a2568c5aca2c44bde7 Author: Mukesh Sisodiya Date: Mon May 6 21:37:53 2024 +0200 wifi: mac80211: update 6 GHz AP power type before association 6 GHz AP power type details are required to set proper tx power used to send frames. Update AP power type received in beacon while preparing for connection instead of after association so the frames before association can use the correct tx power. Reviewed-by: Miriam Rachel Korenblit Reviewed-by: Johannes Berg Signed-off-by: Mukesh Sisodiya Link: https://msgid.link/20240506214536.310434f55f76.I6aca291ee06265e3f63e0f9024ba19a850b53a33@changeid Signed-off-by: Johannes Berg commit 5c24e83f6895a01a8d79a79d3ec567bd0ec13b56 Author: Johannes Berg Date: Mon May 6 21:19:34 2024 +0200 wifi: mac80211: remove extra link STA functions There's no need to have a lockdep assert and then call another function, just move everything into one place. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211934.9759564a25f4.I88d43aa459d15c1d6230152e76b7757c2cdd6085@changeid Signed-off-by: Johannes Berg commit 7aa5c8b4f9de463abc0407da38c9ffccdbc757d1 Author: Johannes Berg Date: Mon May 6 21:14:22 2024 +0200 wifi: mac80211: remove outdated comments These comments are no longer correct, it's a wiphy work now so it will go away immediately when canceled. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506211422.68bc10efbd8a.If80f43f4c8b9db1f5266f70d93a805f8c7463fe2@changeid Signed-off-by: Johannes Berg commit eb745c7c854e200d7fd6ba0944691a1aaf882d4d Author: Johannes Berg Date: Mon May 6 21:00:03 2024 +0200 wifi: cfg80211: add tracing for wiphy work Add trace events to trace when wiphy works are queued (or delayed ones scheduled), and other APIs are called. Also add an event when the worker starts, before acquiring the mutex, to be able to see potential delays due to locking. Reviewed-by: Miriam Rachel Korenblit Reviewed-by: Benjamin Berg Link: https://msgid.link/20240506210002.bf1840a1d22d.I4abba048c1c4017345640219cf1384a0b2288dd3@changeid Signed-off-by: Johannes Berg commit 2449db1f2186e6cd8410631d0ee9e951289fe5ae Author: Johannes Berg Date: Mon May 6 21:00:02 2024 +0200 wifi: cfg80211: sort trace events again They were meant to be split into ops and APIs, but some ops were added in the wrong place. Fix that. Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240506210002.0b3a86a5d8d7.I5591c03223bdb95597e181de63a2eded424de34c@changeid Signed-off-by: Johannes Berg commit 23daf1b4c91db9b26f8425cc7039cf96d22ccbfe Author: Johannes Berg Date: Wed May 15 14:16:00 2024 +0200 wifi: nl80211: disallow setting special AP channel widths Setting the AP channel width is meant for use with the normal 20/40/... MHz channel width progression, and switching around in S1G or narrow channels isn't supported. Disallow that. Reported-by: syzbot+bc0f5b92cc7091f45fb6@syzkaller.appspotmail.com Link: https://msgid.link/20240515141600.d4a9590bfe32.I19a32d60097e81b527eafe6b0924f6c5fbb2dc45@changeid Signed-off-by: Johannes Berg commit 9d222c12834d80849afbad7b42822b8ffbbc025f Author: Johannes Berg Date: Wed May 15 09:38:40 2024 +0200 wifi: ieee80211: document two FTM related functions Add some documentation to ieee80211_is_timing_measurement() and ieee80211_is_ftm(). Link: https://msgid.link/20240515093852.229aa69e972c.Ifae6762a698e79cd5a49a055fe4c32330e826200@changeid Signed-off-by: Johannes Berg commit 3c75e99c7036a87f159dbd526060554afb3482f5 Author: Johannes Berg Date: Wed May 15 09:38:39 2024 +0200 wifi: ieee80211: document function return values These are all missing, as pointed out when running kernel-doc. Add return value documentation and fix some small things while at it. Link: https://msgid.link/20240515093852.1cd5ad8f354d.Idc16e9767fa42de80b659c32efc58aea38c26996@changeid Signed-off-by: Johannes Berg commit 54856871298c9a8717450351699a8e6fe706101c Author: Johannes Berg Date: Wed May 15 09:38:38 2024 +0200 wifi: ieee80211: remove ieee80211_next_tbtt_present() This is actually completely equivalent to the other function ieee80211_is_s1g_short_beacon(), but open-codes the logic. Implement the necessary logic in ieee80211_is_s1g_short_beacon() and remove ieee80211_next_tbtt_present(). Link: https://msgid.link/20240515093852.774ced74dea8.I152525b4cff6e6a25be6c48fe6a4b89f17bab8a9@changeid Signed-off-by: Johannes Berg commit 1c26f09b20bafc92e0de80e84942be77d4d3c61e Author: Johannes Berg Date: Wed May 15 09:38:37 2024 +0200 wifi: radiotap: document ieee80211_get_radiotap_len() return value Document the return value of ieee80211_get_radiotap_len() in the proper kernel-doc format. Link: https://msgid.link/20240515093852.143aadfdb094.I8795ec1e8cfd7106d58325fb514bae92625fb45c@changeid Signed-off-by: Johannes Berg commit 3bb8dce41c023e39ec4d79a83742403b5064a276 Author: Johannes Berg Date: Wed May 15 09:38:36 2024 +0200 wifi: ieee80211: add missing doc short descriptions Some structures erroneously don't have a short description, add the missing descriptions. Link: https://msgid.link/20240515093852.16f4355e918e.I940276a4fb006ada68ab1a3e6077e3229fff0f14@changeid Signed-off-by: Johannes Berg commit 5716146295183651cfd89ae2ea46c5ef0d31faa8 Author: Johannes Berg Date: Wed May 15 09:38:35 2024 +0200 wifi: regulatory: remove extra documentation The struct member country_ie_checksum doesn't exist, so don't document it. Link: https://msgid.link/20240515093852.ebcc9673558b.Ie0b58c1249c6375c60859fa6474d7cdd8862b065@changeid Signed-off-by: Johannes Berg commit bd0fc87d5adc8e3a0d6fb84c9ed3c77da1f1242d Author: Douglas Anderson Date: Mon May 20 15:38:17 2024 -0700 dt-bindings: display: Reorganize legacy eDP panel bindings Back in the day, we used to need to list the exact panel in dts for eDP panels. This led to all sorts of problems including a large number of cases where people listed a bogus panel in their device tree because of the needs of second sourcing (and third sourcing, and fourth sourcing, ...). Back when we needed to add eDP panels to dts files we used to list them in "panel-simple.yaml". These days we have the new way of doing things as documented in "panel-edp.yaml". We can just list the compatible "edp-panel", add some timing info to the source code, and we're good to go. There's not really good reasons not to use this new method. To try to make it obvious that we shouldn't add new compatible strings for eDP panels, let's move them all out of the old "panel-simple.yaml" file to their own file: "panel-edp-legacy.yaml". This new file will have a description that makes it obvious that we shouldn't use it for new panels. While we're doing this: - We can remove eDP-specific properties from panel-simple.yaml since there are no more panels there. - We don't need to copy non-eDP properties to the "panel-edp-legacy.yaml". - We'll fork off a separate yaml file for "samsung,atna33xc20.yaml". This is an eDP panel which isn't _quite_ handled by the generic "edp-panel" compatible since it's not allowed to have an external backlight (it has one builtin) and it absolutely requires an "enable" GPIO. - We'll un-fork the "sharp,ld-d5116z01b.yaml" and put it in "panel-edp-legacy.yaml" since there doesn't appear to be any reason for it to be separate. Suggested-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Reviewed-by: Rob Herring (Arm) Link: https://lore.kernel.org/r/20240520153813.1.Iefaa5b93ca2faada269af77deecdd139261da7ec@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240520153813.1.Iefaa5b93ca2faada269af77deecdd139261da7ec@changeid commit 96f887a612e4cda89efc3f54bc10c1997e3ab0e9 Author: Hagar Hemdan Date: Sat May 18 13:04:39 2024 +0000 net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP xmit() functions should consume skb or return error codes in error paths. When the configuration "CONFIG_INET_ESPINTCP" is not set, the implementation of the function "esp_output_tail_tcp" violates this rule. The function frees the skb and returns the error code. This change removes the kfree_skb from both functions, for both esp4 and esp6. WARN_ON is added because esp_output_tail_tcp() should never be called if CONFIG_INET_ESPINTCP is not set. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc. Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)") Signed-off-by: Hagar Hemdan Signed-off-by: Steffen Klassert commit d5b96a4a31593a609acd564cfa54f269461a33f0 Author: Ping-Ke Shih Date: Fri May 17 09:36:39 2024 +0800 wifi: rtw89: correct hardware value of nominal packet padding for WiFi 7 chips The hardware value of 3 for WiFi 7 chips is padding 16 or 20us selected by hardware automatically. Correct the value to resolve interoperability problem. Also define enum to be more readable. Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240517013639.11643-1-pkshih@realtek.com commit 2c1fc7c24cd47396580c5a7b238673da618aeedd Author: Ping-Ke Shih Date: Fri May 17 09:35:43 2024 +0800 wifi: rtw89: 8852b: restore setting for RFE type 5 after device resume The RFE type 5 set SPS analog parameters only once at probe stage, but the setting is missing after suspend/resume, so remove restriction and set the value when card power on/off. Fixes: 3ef60f44830a ("wifi: rtw89: 8852b: update hardware parameters for RFE type 5") Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240517013543.11533-1-pkshih@realtek.com commit 669b692247d4516e252c898c0e7366a09d84d1be Author: Po-Hao Huang Date: Fri May 17 09:33:50 2024 +0800 wifi: rtw89: fix HW scan not aborting properly There is a length limit on the commands we send to firmware, so dividing to two commands is sometimes required when scanning. When aborting scan, we should not send second scan command to firmware after the first one is finished. This could cause some unexpected errors when we cannot receive firmware events (e.g. in suspend). Another case is scan happens before suspending, ieee80211_do_stop() is called to abort scan and driver indicate scan completion by ieee80211_scan_completed(), which queues event to scan work. But scan work might be late to execute after ieee80211_do_stop(). To correct this, driver indicates ieee80211_scan_completed() before returning, so that ieee80211_do_stop() can flush scan work properly. Fixes: bcbefbd032df ("wifi: rtw89: add wait/completion for abort scan") Cc: stable@vger.kernel.org Co-developed-by: Chih-Kang Chang Signed-off-by: Chih-Kang Chang Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240517013350.11278-1-pkshih@realtek.com commit a87f34e742d279d54d529e4bc4763fdaab32a466 Author: Brad Cowie Date: Wed May 22 17:07:12 2024 +1200 selftests/bpf: Update tests for new ct zone opts for nf_conntrack kfuncs Add test for allocating and looking up ct entry in a non-default ct zone with kfuncs bpf_{xdp,skb}_ct_alloc and bpf_{xdp,skb}_ct_lookup. Add negative tests for looking up ct entry in a different ct zone to where it was allocated and with a different direction. Update reserved test for old struct definition to test for ct_zone_id being set when opts size isn't NF_BPF_CT_OPTS_SZ (16). Signed-off-by: Brad Cowie Link: https://lore.kernel.org/r/20240522050712.732558-2-brad@faucet.nz Signed-off-by: Martin KaFai Lau commit ece4b296904167336d0aaab26bd7122018835202 Author: Brad Cowie Date: Wed May 22 17:07:11 2024 +1200 net: netfilter: Make ct zone opts configurable for bpf ct helpers Add ct zone id and direction to bpf_ct_opts so that arbitrary ct zones can be used for xdp/tc bpf ct helper functions bpf_{xdp,skb}_ct_alloc and bpf_{xdp,skb}_ct_lookup. Signed-off-by: Brad Cowie Link: https://lore.kernel.org/r/20240522050712.732558-1-brad@faucet.nz Signed-off-by: Martin KaFai Lau commit 40672b792a36894aff3a337b695f6136ee6ac5d4 Author: Niranjana Vishwanathapura Date: Tue May 21 13:17:11 2024 -0700 drm/xe: Properly handle alloc_guc_id() failure Release the submission_state lock if alloc_guc_id() fails. v2: Add Fixes tag and CC stable kernel Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: # v6.8+ Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Nirmoy Das Reviewed-by: Matthew Brost Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240521201711.4934-1-niranjana.vishwanathapura@intel.com commit 3ec3b42752a29af22369e72d2935f36cf4c77713 Author: Michal Wajdeczko Date: Tue May 21 13:48:57 2024 +0200 drm/xe/uc: Don't emit false error if running in execlist mode When running in execlist mode (using force_execlist=1 modparam) we incorrectly select the error path in xe_uc_init(), leading to an unwanted error message like this: [ ] xe 0000:00:00.0: [drm] *ERROR* GT0: Failed to initialize uC (0000000000000000) Fix that by doing early return like we do in other similar cases. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20240521114857.712-1-michal.wajdeczko@intel.com commit 7acacca1b157fcb258cfd781603425f73bc7370b Author: Haikun Zhou Date: Wed May 22 19:39:24 2024 +0800 drm/panel-edp: Add CMN N116BCJ-EAK Add support for the CMN N116BCJ-EAK, place the raw EDID here for subsequent reference. 00 ff ff ff ff ff ff 00 0d ae 60 11 00 00 00 00 04 22 01 04 95 1a 0e 78 02 67 75 98 59 53 90 27 1c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 da 1d 56 e2 50 00 20 30 30 20 a6 00 00 90 10 00 00 18 00 00 00 fe 00 4e 31 31 36 42 43 4a 2d 45 41 4b 0a 20 00 00 00 fe 00 43 4d 4e 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe 00 4e 31 31 36 42 43 4a 2d 45 41 4b 0a 20 00 98 Signed-off-by: Haikun Zhou Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240522113924.1261683-1-zhouhaikun5@huaqin.corp-partner.google.com commit a9940ce97d1dc5fe8e6b2f607e9da62073d5bca2 Author: Ville Syrjälä Date: Thu May 16 16:56:22 2024 +0300 drm/i915: Document which platforms use which sprite registers Note which sprite registers are valid for which platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-14-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit ddb904d6d08730bd54bc842a2d85fcfcfa27aff5 Author: Ville Syrjälä Date: Thu May 16 16:56:21 2024 +0300 drm/i915: Polish sprite plane register definitions Group the sprite plane register definitions such that everything to do with the same register is in one place. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 48dd4a5e81005d26fdd88fbff439cc91f9992830 Author: Ville Syrjälä Date: Thu May 16 16:56:20 2024 +0300 drm/i915: Document a few pre-skl primary plane platform dependencies Add some notes indicating which plane registers/bits are valid for which platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-12-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit c0086b71441d8af3f65a065f582b5e73891c9910 Author: Ville Syrjälä Date: Thu May 16 16:56:19 2024 +0300 drm/i915: Polish pre-skl primary plane registers Group the pre-skl primary plane register definitions sensible, and toss in a few comments to indicate which platforms have what. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 514ca6dffb2b76c1593b558527e2c84bd7faa249 Author: Ville Syrjälä Date: Thu May 16 16:56:18 2024 +0300 drm/i915: Extract i9xx_plane_regs.h Relocate all pre-skl primary plane register definitions into their own declutter i915_reg.h. Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 561608610bca0353b567298ce0e683b517fa872f Author: Ville Syrjälä Date: Thu May 16 16:56:17 2024 +0300 drm/i915: Move PIPEGCMAX to intel_color_regs.h PIPEGCMAX was left behind when all other gamma registers moved into intel_color_regs.h. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9871927034d177aacc7054e30c74e11fcddf8ee1 Author: Ville Syrjälä Date: Thu May 16 16:56:16 2024 +0300 drm/i915: Add separate defines for cursor WM/DDB register bits Make a more thorough split between universal planes vs. cursors by defining the contents of the cursor WM/DDB registers separately. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 0ff7639bb1a6299930b7d66214bc6b0a293d8833 Author: Ville Syrjälä Date: Thu May 16 16:56:14 2024 +0300 drm/i915: Rename selective fetch plane registers Rename the selective fetch plane registers to match the spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 04c09e4b879b225f3747606bcfc97d00d82d800f Author: Ville Syrjälä Date: Thu May 16 16:56:13 2024 +0300 drm/i915: Simplify PIPESRC_ERLY_TPT definition PIPESRC_ERLY_TPT is a pipe register, and it lives in the 0x70000 range. so using _MMIO_TRANS2() for it is not really correct. Also since this is a pipe register, and not present on CHV, the registers will be equally spaced out, so we can use the simpler _MMIO_PIPE() instead of _MMIO_PIPE2(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 199bc8c175d712be1610dcad7f7240ad5c864281 Author: Ville Syrjälä Date: Mon May 20 20:14:59 2024 +0300 drm/i915: Add separate define for SEL_FETCH_CUR_CTL() Split the cursor stuff from the rest of the selective fetch plane registers so that we can collect all cursor registers in intel_cursor_regs.h. Also take the opportunity to rename the registers to match the spec. v2: Pass the correct register offset fpr pipe B (Jani) s/mtl+/tgl+/ as that's where this was introduced Drop the bogus SEL_FETCH_CUR_CTL_ENABLE bit, the contents actually match the normal CUR_CTL register Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240520171459.9661-1-ville.syrjala@linux.intel.com commit 9cad70a9401f4d962e1baa9d607a291bfdc8f010 Author: Ville Syrjälä Date: Thu May 16 16:56:11 2024 +0300 drm/i915: Clean up the cursor register defines Group the cursor register defines such that everything to do with one register is in one place. Also, while we are touching these protect all the macro arguments for good measure. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516135622.3498-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit df798d43b35521f004c2f209dbb264c47488218f Author: Ville Syrjälä Date: Fri May 17 20:12:08 2024 +0300 drm/i915: Add skl+ plane name aliases to enum plane_id Using PLANE_PRIMARY + PLANE_SPRITE? on skl+ results in a bunch of unnecessary head scratching. Add aliases using the skl+ plane names. And for pre-skl we only need to keep PRIMARY,SPRITE0,SPRITE1 as we only ever have 0-2 sprites per pipe on those platforms. v2: Don't break icl_nv12_y_plane_mask() (Jani) Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240517171208.21313-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 51064d471c53dcc8eddd2333c3f1c1d9131ba36c Author: Vidya Srinivas Date: Mon May 20 22:26:34 2024 +0530 drm/i915/dpt: Make DPT object unshrinkable In some scenarios, the DPT object gets shrunk but the actual framebuffer did not and thus its still there on the DPT's vm->bound_list. Then it tries to rewrite the PTEs via a stale CPU mapping. This causes panic. Cc: stable@vger.kernel.org Reported-by: Shawn Lee Fixes: 0dc987b699ce ("drm/i915/display: Add smem fallback allocation for dpt") Signed-off-by: Vidya Srinivas [vsyrjala: Add TODO comment] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240520165634.1162470-1-vidya.srinivas@intel.com commit 2689390b4ecc27d6f0a97f24544d75bd168a21b8 Author: Ville Syrjälä Date: Mon May 20 19:47:32 2024 +0300 drm/i915: Bump max TMDS bitrate to 6 Gbps on ADL-S/ADL-P/DG2+ Bspec lists the mas TMDS bitrate as 6 Gbps on ADL-S/ADL-P/DG2. Bump our limit to match. v2: Bump for ADL-S as well (Jani) Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240520164732.3682-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit dc51c682ddb0104851c8ccbe1d644163ae38262b Author: Matthew Auld Date: Wed May 22 11:22:01 2024 +0100 drm/xe/display: move device_remove over to drmm i915 display calls this when releasing the drm_device, match this also in xe by using drmm. intel_display_device_remove() is freeing purely software state for the drm_device. v2: fix build error Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-36-matthew.auld@intel.com commit 48d74a0a45201de4efa016fb2f556889db37ed28 Author: Matthew Auld Date: Wed May 22 11:22:00 2024 +0100 drm/xe/display: stop calling domains_driver_remove twice Unclear why we call this twice. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-35-matthew.auld@intel.com commit 5b6937b65e45e31af56a5bba47f69acc550acf26 Author: Matthew Auld Date: Wed May 22 11:21:59 2024 +0100 drm/xe/display: move display fini stuff to devm Match the i915 display handling here with calling both no_irq and noaccel when removing the device. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-34-matthew.auld@intel.com commit c7117419784f612d59ee565145f722e8b5541fe6 Author: Matthew Auld Date: Wed May 22 11:21:58 2024 +0100 drm/xe: reset mmio mappings with devm Set our various mmio mappings to NULL. This should make it easier to catch something rogue trying to mess with mmio after device removal. For example, we might unmap everything and then start hitting some mmio address which has already been unmamped by us and then remapped by something else, causing all kinds of carnage. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-33-matthew.auld@intel.com commit a0b834c8957a7d2848face008a12382a0ad11ffc Author: Matthew Auld Date: Wed May 22 11:21:57 2024 +0100 drm/xe/mmio: move mmio_fini over to devm Not valid to touch mmio once the device is removed, so make sure we unmap on removal and not just when driver instance goes away. Also set the mmio pointers to NULL to hopefully catch such issues more easily. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-32-matthew.auld@intel.com commit cd506a33b0d9759e0a58556799b1b38650fa3698 Author: Matthew Auld Date: Wed May 22 11:21:56 2024 +0100 drm/xe: make gt_remove use devm No need to hand roll the onion unwind here, just move gt_remove over to devm which will already have the correct ordering. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-31-matthew.auld@intel.com commit 1bd985ff9fc463a72e4ceb65ae6bcb735ce93c25 Author: Matthew Auld Date: Wed May 22 11:21:55 2024 +0100 drm/xe/gt: break out gt_fini into sw vs hw state Have a cleaner separation between hw vs sw. v2: Fix missing return Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-30-matthew.auld@intel.com commit cf13ae6b81d5402ba93c46635dd46eb19ab49c4c Author: Matthew Auld Date: Wed May 22 11:21:54 2024 +0100 drm/xe/coredump: move over to devm Here we are using drmm to ensure we release the coredump when unloading the module, however the coredump is very much tied to the struct device underneath. We can see this when we hotunplug the device, for which we have already got a coredump attached. In such a case the coredump still remains and adding another is not possible. However we still register the release action via xe_driver_devcoredump_fini(), so in effect two or more releases for one dump. The other consideration is that the coredump state is embedded in the xe_driver instance, so technically once the drmm release action fires we might free the coredumpe state from a different driver instance, assuming we have two release actions and they can race. Rather use devm here to remove the coredump when the device is released. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1679 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-29-matthew.auld@intel.com commit cee70645a7499e3a2731953db80124c9d5405d5f Author: Matthew Auld Date: Wed May 22 11:21:53 2024 +0100 drm/xe/device: move xe_device_sanitize over to devm Disable GuC submission when removing the device. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-28-matthew.auld@intel.com commit bc54f42c0efaa81b42b53ce5f2423f7778d82516 Author: Matthew Auld Date: Wed May 22 11:21:52 2024 +0100 drm/xe/device: move flr to devm Should be called when driver is removed, not when this particular driver instance is destroyed. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-27-matthew.auld@intel.com commit bbc9651fe9f4c081e9931e2b3f6a6c5b2d05a942 Author: Matthew Auld Date: Wed May 22 11:21:51 2024 +0100 drm/xe/irq: move irq_uninstall over to devm Makes sense to trigger this when the device is removed. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-26-matthew.auld@intel.com commit 6d95155ae71963ebf43a8df60f39704294f09dae Author: Matthew Auld Date: Wed May 22 11:21:50 2024 +0100 drm/xe/guc_pc: s/pc_fini/pc_fini_hw/ Make it clear that is about cleaning up the HW/FW side, and not software state. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-25-matthew.auld@intel.com commit c9f422de07b1c62ab6da0a240802ac24efe26dc4 Author: Matthew Auld Date: Wed May 22 11:21:49 2024 +0100 drm/xe/guc_pc: move pc_fini to devm Here we are touching the HW/GuC and presumably this should happen when the device is removed. Currently if you hotunplug the device this is skipped if there is already open driver instance. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-24-matthew.auld@intel.com commit 19fa7aa4d235cd21b1c62977b2e8d6331976286f Author: Matthew Auld Date: Wed May 22 11:21:48 2024 +0100 drm/xe/guc: s/guc_fini/guc_fini_hw/ Make it clear that is about cleaning up the HW/FW side, and not software state. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-23-matthew.auld@intel.com commit 241f5d25ff198f86bbd812a655ddc86834dedb94 Author: Matthew Auld Date: Wed May 22 11:21:47 2024 +0100 drm/xe/guc: move guc_fini over to devm Make sure to actually call this when the device is removed. Currently we only trigger it when the driver instance goes away, but that doesn't work too well with hotunplug, since device can be removed and re-probed with a new driver instance, where the guc_fini() is called too late. Move the fini over to devm to ensure this is called when device is removed. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1717 Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-22-matthew.auld@intel.com commit 3a1c27cd0122409a9fc425106fff79655ceeaa20 Author: Matthew Auld Date: Wed May 22 11:21:46 2024 +0100 drm/xe/ggtt: use drm_dev_enter to mark device section Device can be hotunplugged before we start destroying gem objects. In such a case don't touch the GGTT entries, trigger any invalidations or mess around with rpm. This should already be taken care of when removing the device, we just need to take care of dealing with the software state, like removing the mm node. v2: (Andrzej) - Avoid some duplication by tracking the bound status and checking that instead. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1717 Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Reviewed-by: Jagmeet Randhawa Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-21-matthew.auld@intel.com commit c60f91bbc4bcd91f9c7f3de36c541951b12d165a Author: Matthew Auld Date: Wed May 22 11:21:45 2024 +0100 drm/xe: covert sysfs over to devm Hotunplugging the device seems to result in stuff like: kobject_add_internal failed for tile0 with -EEXIST, don't try to register things with the same name in the same directory. We only remove the sysfs as part of drmm, however that is tied to the lifetime of the driver instance and not the device underneath. Attempt to fix by using devm for all of the remaining sysfs stuff related to the device. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1667 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1432 Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-20-matthew.auld@intel.com commit 4465b8c6d3539811ce576f163cb3bf3890e5c883 Author: Matthew Auld Date: Wed May 22 11:21:44 2024 +0100 drm/xe/pci: remove broken driver_release This is quite broken since we are nuking the pdev link to the private driver struct, but note here that driver_release is called when the drm_device is released (poor mans drmm), which can be long after the device has been removed. So here what we are actually doing is nuking the pdev link for what is potentially bound to a different drm_device. If that happens before our pci remove callback is triggered (for the new drm_device) we silently exit and skip some important cleanup steps, resulting in hilarity. There should be no reason to implement driver_release, when we already have nicer stuff like drmm, so just remove completely. The actual pdev link is already nuked when removing the device. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Rodrigo Vivi Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-19-matthew.auld@intel.com commit bb3c3e79d9a1331eb03696e9a4274293767af594 Author: Gustavo Sousa Date: Fri May 10 11:05:33 2024 -0300 drm/i915/bmg: Load DMC Load Battlemage's DMC. We re-use XELPDP_DMC_MAX_FW_SIZE since BMG's display is a derivative of Xe_LPD+ and has the same MMIO offset limits. Reviewed-by: Dnyaneshwar Bhadane Link: https://patchwork.freedesktop.org/patch/msgid/20240510140532.112352-2-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa commit d8a417c4bd510e7ed8ccd30045bf2bf307c00c57 Author: Michal Wajdeczko Date: Tue May 21 11:25:18 2024 +0200 drm/xe/vf: Custom GuC initialization if VF The GuC firmware is loaded and initialized by the PF driver. Make sure VF drivers only perform permitted operations. For submission initialization, use number of GuC context IDs from self config. Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240521092518.624-3-michal.wajdeczko@intel.com commit 7065b19bd542e5dfdcfc421aed4ab9e4fefa19cc Author: Michal Wajdeczko Date: Tue May 21 11:25:17 2024 +0200 drm/xe/guc: Allow to initialize submission with limited set of IDs While PF and native drivers may initialize submission code to use all available GuC contexts IDs, the VF driver may only use limited number of IDs. Update init function to accept number of context IDs available for use. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Cc: Himal Prasad Ghimiray Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240521092518.624-2-michal.wajdeczko@intel.com commit f7e20cfb59c9f6dad45539286a1c804b24fd86c7 Author: Michal Wajdeczko Date: Mon May 20 20:18:14 2024 +0200 drm/xe: Cleanup xe_mmio.h We don't need include since commit 5c09bd6ccd41 ("drm/xe/mmio: Move xe_mmio_wait32() to xe_mmio.c"). We don't need include since commit 54c659660d63 ("drm/xe: Make xe_mmio_read|write() functions non-inline"). And since commit 924e6a9789a0 ("drm/xe/uapi: Remove MMIO ioctl") we don't need forward declarations of drm_device and drm_file. Signed-off-by: Michal Wajdeczko Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240520181814.2392-4-michal.wajdeczko@intel.com commit 26a22952c8551763f3ecc3251e3d8d213dc08aa4 Author: Michal Wajdeczko Date: Mon May 20 20:18:13 2024 +0200 drm/xe: Don't rely on indirect includes from xe_mmio.h These compilation units use udelay() or some GT oriented printk functions without explicitly including proper header files, and relying on #includes from the xe_mmio.h instead. Fix that. Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240520181814.2392-3-michal.wajdeczko@intel.com commit 31a278b5a11e6785db7f4976419d2b284591720e Author: Michal Wajdeczko Date: Mon May 20 20:18:12 2024 +0200 drm/i915/display: Add missing include to intel_vga.c This compilation unit uses udelay() function without including it's header file. Fix that to break dependency on other code. Signed-off-by: Michal Wajdeczko Cc: Jani Nikula Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240520181814.2392-2-michal.wajdeczko@intel.com commit a6bc7cda37d1ad52cdc59a8d4c4d654836f8c238 Author: Michal Wajdeczko Date: Tue May 21 12:28:28 2024 +0200 drm/xe: Fix xe_guc_pc.h Prefer forward declaration over #include xe_guc_pc_types.h Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240521102828.668-5-michal.wajdeczko@intel.com commit de1429a99fd37f706e6bdbf5e9ad318e1523442c Author: Michal Wajdeczko Date: Tue May 21 12:28:27 2024 +0200 drm/xe: Fix xe_huc.h Prefer forward declaration over #include xe_huc_types.h Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240521102828.668-4-michal.wajdeczko@intel.com commit 2291c091107d0635f10269098152900c0a12fd00 Author: Michal Wajdeczko Date: Tue May 21 12:28:26 2024 +0200 drm/xe: Fix xe_gsc.h Prefer forward declaration over #include xe_gsc_types.h Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240521102828.668-3-michal.wajdeczko@intel.com commit bdc9abed51b52965557f9c46d541b5ca3fc66da3 Author: Michal Wajdeczko Date: Tue May 21 12:28:25 2024 +0200 drm/xe: Fix xe_uc.h Prefer forward declaration over #include xe_uc_types.h Signed-off-by: Michal Wajdeczko Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240521102828.668-2-michal.wajdeczko@intel.com commit 76e220d4d88266a1b9f44b409959079292e409ad Author: Suraj Kandpal Date: Tue May 21 13:44:57 2024 +0530 drm/i915/hdcp: Check mst_port to determine connector type Check mst_port field in intel_connector to check connector type rather than rely on encoder as it may not be attached to connector at times. --v2 -Add closes tag [Imre] Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10898 Signed-off-by: Suraj Kandpal Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240521081458.1500327-3-suraj.kandpal@intel.com commit 1155de965e6a4987e2897f78ea56f07c7140764e Author: Suraj Kandpal Date: Tue May 21 13:44:56 2024 +0530 drm/i915/hdcp: Move aux assignment after connector type check Move assignment of aux after connector type check as port may not exist if connector is not DPMST. --v2 -Fix unwanted change in intel_encoder check [Jani] Signed-off-by: Suraj Kandpal Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240521081458.1500327-2-suraj.kandpal@intel.com commit 484436ec5c2bffe8f346a09ae1cbc4cbf5e50005 Author: Kuro Chung Date: Wed May 22 14:55:28 2024 +0800 drm/bridge: it6505: fix hibernate to resume no display issue When the system power resumes, the TTL input of IT6505 may experience some noise before the video signal stabilizes, necessitating a video reset. This patch is implemented to prevent a loop of video error interrupts, which can occur when a video reset in the video FIFO error interrupt triggers another such interrupt. The patch processes the SCDT and FIFO error interrupts simultaneously and ignores any video FIFO error interrupts caused by a video reset. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Kuro Chung Signed-off-by: Hermes Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240522065528.1053439-1-kuro.chung@ite.com.tw commit 3c7bbd4c9dc42e05218d489bd487580336d42fc7 Author: Jani Nikula Date: Wed May 15 19:56:51 2024 +0300 drm/i915: stop redefining INTEL_VGA_DEVICE Now that the PCI ID macros allow us to pass in the macro to use, stop redefining INTEL_VGA_DEVICE. Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240515165651.1230465-2-jani.nikula@intel.com Signed-off-by: Jani Nikula commit cfa7772880f845f5d6dbee69c441c6efbffa425b Author: Jani Nikula Date: Wed May 15 19:56:50 2024 +0300 drm/i915/pciids: switch to xe driver style PCI ID macros The PCI ID macros in xe_pciids.h allow passing in the macro to operate on each PCI ID, making it more flexible. Convert i915_pciids.h to the same pattern. INTEL_IVB_Q_IDS() for Quanta transcode remains a special case, and unconditionally uses INTEL_QUANTA_VGA_DEVICE(). Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240515165651.1230465-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 52cccc64cf7c90696d09d54a383793804ba872ba Author: Ingo Molnar Date: Tue May 21 13:42:17 2024 +0200 x86/boot: Clean up the arch/x86/boot/main.c code a bit - Don't line break user-visible strings - Use consistent comment style - Remove unnecessary col80 line breaks Signed-off-by: Ingo Molnar Cc: Uros Bizjak Cc: linux-kernel@vger.kernel.org commit a09d2327a9ba8e3f5be238bc1b7ca2809255b464 Author: Andi Shyti Date: Fri May 17 11:06:16 2024 +0200 drm/i915/gt: Fix CCS id's calculation for CCS mode setting The whole point of the previous fixes has been to change the CCS hardware configuration to generate only one stream available to the compute users. We did this by changing the info.engine_mask that is set during device probe, reset during the detection of the fused engines, and finally reset again when choosing the CCS mode. We can't use the engine_mask variable anymore, as with the current configuration, it imposes only one CCS no matter what the hardware configuration is. Before changing the engine_mask for the third time, save it and use it for calculating the CCS mode. After the previous changes, the user reported a performance drop to around 1/4. We have tested that the compute operations, with the current patch, have improved by the same factor. Fixes: 6db31251bb26 ("drm/i915/gt: Enable only one CCS for compute workload") Signed-off-by: Andi Shyti Cc: Chris Wilson Cc: Gnattu OC Cc: Joonas Lahtinen Cc: Matt Roper Tested-by: Jian Ye Reviewed-by: Umesh Nerlige Ramappa Tested-by: Gnattu OC Link: https://patchwork.freedesktop.org/patch/msgid/20240517090616.242529-1-andi.shyti@linux.intel.com commit 01d71dff61c7e1efae1d7f11b71dfa4549c172bb Author: Nirmoy Das Date: Tue May 21 12:27:15 2024 +0200 drm/xe/tests: Use uninterruptible VM lock Interruptible lock can return error and needed a return value check. This test should finish quick enough so use a uninterruptible lock instead. Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240521102715.22700-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit 735940f99966a5d510c43d05c932da536b33715a Author: Nirmoy Das Date: Tue May 21 12:36:23 2024 +0200 drm/xe: Add warn when level can not be zero. At xe_pt_zap_ptes_entry() and xe_pt_stage_unbind_entry, the level cannot be 0. Therefore, add an independent check for the level. Since the level cannot be zero at this point, there is no need to check for `is_compact`, so remove that instead. Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240521103623.11645-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit a856a53de93ef25e44b315fc1aedce609ba2d453 Author: Ville Syrjälä Date: Thu May 16 20:33:24 2024 +0300 drm/probe-helper: Call drm_mode_validate_ycbcr420() before connector->mode_valid() Make life easier for drivers by filtering out unwanted YCbCr 4:2:0 only modes prior to calling the connector->mode_valid() hook. Currently drivers will still see YCbCr 4:2:0 only modes in said hook, which will likely come as a suprise when the driver has declared no support for such modes (via setting connector->ycbcr_420_allowed to false). Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10992 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240516173324.18149-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 6c8d7598dfed759bf1d9d0322b4c2b42eb7252d8 Author: Geliang Tang Date: Fri May 17 14:21:46 2024 +0800 selftests/bpf: Fix prog numbers in test_sockmap bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests"), now there are only 9 progs in it, not 11: SEC("sk_skb1") int bpf_prog1(struct __sk_buff *skb) SEC("sk_skb2") int bpf_prog2(struct __sk_buff *skb) SEC("sk_skb3") int bpf_prog3(struct __sk_buff *skb) SEC("sockops") int bpf_sockmap(struct bpf_sock_ops *skops) SEC("sk_msg1") int bpf_prog4(struct sk_msg_md *msg) SEC("sk_msg2") int bpf_prog6(struct sk_msg_md *msg) SEC("sk_msg3") int bpf_prog8(struct sk_msg_md *msg) SEC("sk_msg4") int bpf_prog9(struct sk_msg_md *msg) SEC("sk_msg5") int bpf_prog10(struct sk_msg_md *msg) This patch updates the array sizes of prog_fd[], prog_attach_type[] and prog_type[] from 11 to 9 accordingly. Fixes: d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests") Signed-off-by: Geliang Tang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/9c10d9f974f07fcb354a43a8eca67acb2fafc587.1715926605.git.tanggeliang@kylinos.cn commit 1b0215a3633a4c54ed7ec3af93e7a782dda8d965 Author: Ying Zhang Date: Tue May 21 16:17:02 2024 +0000 bpf: Remove unused variable "prev_state" The variable "prev_state" is not used for any actual operations v2: Fix commit message and description. Signed-off-by: Ying Zhang Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20240521161702.4339-1-yingzhang098@163.com commit f4aba3471cfb9ccf69b476463f19b4c50fef6b14 Author: Ivan Babrou Date: Mon May 20 15:51:49 2024 -0700 bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer LLVM 17 started treating const structs as constants: * https://github.com/llvm/llvm-project/commit/0b2d5b967d98 Combined with pointer laundering via ptr_to_u64, which takes a const ptr, but in reality treats the underlying memory as mutable, this makes clang always pass zero to btf__type_by_id, which breaks full name resolution. Disassembly before (LLVM 16) and after (LLVM 17): - 8b 75 cc mov -0x34(%rbp),%esi - e8 47 8d 02 00 call 3f5b0 + 31 f6 xor %esi,%esi + e8 a9 8c 02 00 call 3f510 It's a bigger project to fix this properly (and a question whether LLVM itself should detect this), but for right now let's just fix bpftool. For more information, see this thread in bpf mailing list: * https://lore.kernel.org/bpf/CABWYdi0ymezpYsQsPv7qzpx2fWuTkoD1-wG1eT-9x-TSREFrQg@mail.gmail.com/T/ Fixes: b662000aff84 ("bpftool: Adding support for BTF program names") Signed-off-by: Ivan Babrou Signed-off-by: Andrii Nakryiko Acked-by: Nick Desaulniers Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20240520225149.5517-1-ivan@cloudflare.com commit 8a0a7b98d4b6eeeab337ec25daa4bc0a5e710a15 Author: Wayne Lin Date: Thu Mar 7 14:29:57 2024 +0800 drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2 [Why] Commit: - commit 5aa1dfcdf0a4 ("drm/mst: Refactor the flow for payload allocation/removement") accidently overwrite the commit - commit 54d217406afe ("drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2") which cause regression. [How] Recover the original NULL fix and remove the unnecessary input parameter 'state' for drm_dp_add_payload_part2(). Fixes: 5aa1dfcdf0a4 ("drm/mst: Refactor the flow for payload allocation/removement") Reported-by: Leon Weiß Link: https://lore.kernel.org/r/38c253ea42072cc825dc969ac4e6b9b600371cc8.camel@ruhr-uni-bochum.de/ Cc: lyude@redhat.com Cc: imre.deak@intel.com Cc: stable@vger.kernel.org Cc: regressions@lists.linux.dev Reviewed-by: Harry Wentland Acked-by: Jani Nikula Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240307062957.2323620-1-Wayne.Lin@amd.com commit 995f7dafd110eecbeef1e02846d897d64839d838 Author: Francois Dugast Date: Tue Apr 16 14:50:37 2024 +0000 drm/xe/uapi: Expose the L3 bank mask The L3 bank mask is already generated and stored internally with the rest of the GT topology. In user space, the compute runtime now needs this information to be added to the device properties therefore the topology mask query is extended to provide a new mask which represents the L3 banks enabled on the GT. The changes in the compute runtime are ready and approved, see link below. v2: Rewrite commit message and add a link to the compute runtime PR (Francois Dugast) Cc: Matt Roper Cc: Robert Krzemien Cc: Mateusz Jablonski Link: https://github.com/intel/compute-runtime/pull/722 Signed-off-by: Francois Dugast Acked-by: Mateusz Jablonski Reviewed-by: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240416145037.7-2-francois.dugast@intel.com commit a568ff8cd0feb9202d8bd7d572b170931b57248c Author: Ryszard Knop Date: Wed Apr 24 13:41:59 2024 +0200 MAINTAINERS: Move the drm-intel repo location to fd.o GitLab The drm-intel repo is moving from the classic fd.o git host to GitLab. Update its location with a URL matching other fd.o GitLab kernel trees. Signed-off-by: Ryszard Knop Acked-by: Jani Nikula Acked-by: Tvrtko Ursulin Acked-by: Lucas De Marchi Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240424114159.38719-1-ryszard.knop@intel.com Signed-off-by: Lucas De Marchi commit 188ced1e0ff892f0948f20480e2e0122380ae46d Author: Lucas De Marchi Date: Fri May 17 13:43:10 2024 -0700 drm/xe/client: Print runtime to fdinfo Print the accumulated runtime for client when printing fdinfo. Each time a query is done it first does 2 things: 1) loop through all the exec queues for the current client and accumulate the runtime, per engine class. CTX_TIMESTAMP is used for that, being read from the context image. 2) Read a "GPU timestamp" that can be used for considering "how much GPU time has passed" and that has the same unit/refclock as the one recording the runtime. RING_TIMESTAMP is used for that via MMIO. Since for all current platforms RING_TIMESTAMP follows the same refclock, just read it once, using any first engine available. This is exported to userspace as 2 numbers in fdinfo: drm-cycles-: drm-total-cycles-: Userspace is expected to collect at least 2 samples, which allows to know the client engine busyness as per: RUNTIME1 - RUNTIME0 busyness = --------------------- T1 - T0 Since drm-cycles- always starts at 0, it's also possible to know if and engine was ever used by a client. It's expected that userspace will read any 2 samples every few seconds. Given the update frequency of the counters involved and that CTX_TIMESTAMP is 32-bits, the counter for each exec_queue can wrap around (assuming 100% utilization) after ~200s. The wraparound is not perceived by userspace since it's just accumulated for all the exec_queues in a 64-bit counter) but the measurement will not be accurate if the samples are too far apart. This could be mitigated by adding a workqueue to accumulate the counters every so often, but it's additional complexity for something that is done already by userspace every few seconds in tools like gputop (from igt), htop, nvtop, etc, with none of them really defaulting to 1 sample per minute or more. Reviewed-by: Umesh Nerlige Ramappa Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-9-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 6aa18d7436b0c11f7e62fd6cdb707eaeab1dc473 Author: Lucas De Marchi Date: Fri May 17 13:43:09 2024 -0700 drm/xe: Add helper to return any available hw engine Get the first available engine from a gt, which helps in the case any engine serves as a context, like when reading RING_TIMESTAMP. Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-8-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit baa14865529bf1f3c12dc6145bd9109ef289e038 Author: Lucas De Marchi Date: Fri May 17 13:43:08 2024 -0700 drm/xe: Cache data about user-visible engines gt->info.engine_mask used to indicate the available engines, but that is not always true anymore: some engines are reserved to kernel and some may be exposed as a single engine (e.g. with ccs_mode). Runtime changes only happen when no clients exist, so it's safe to cache the list of engines in the gt and update that when it's needed. This will help implementing per client engine utilization so this (mostly constant) information doesn't need to be re-calculated on every query. Reviewed-by: Jonathan Cavitt Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-7-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 6109f24f87d75122cf6de50901115cbee4285ce2 Author: Umesh Nerlige Ramappa Date: Fri May 17 13:43:07 2024 -0700 drm/xe: Add helper to accumulate exec queue runtime Add a helper to accumulate per-client runtime of all its exec queues. This is called every time a sched job is finished. v2: - Use guc_exec_queue_free_job() and execlist_job_free() to accumulate runtime when job is finished since xe_sched_job_completed() is not a notification that job finished. - Stop trying to update runtime from xe_exec_queue_fini() - that is redundant and may happen after xef is closed, leading to a use-after-free - Do not special case the first timestamp read: the default LRC sets CTX_TIMESTAMP to zero, so even the first sample should be a valid one. - Handle the parallel submission case by multiplying the runtime by width. v3: Update comments Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit f2f6b667c67daee6fe2c51b5cec3bb0f1b4c1ce0 Author: Lucas De Marchi Date: Fri May 17 13:43:06 2024 -0700 drm/xe: Add helper to capture engine timestamp Just like CTX_TIMESTAMP is used to calculate runtime, add a helper to get the timestamp for the engine so it can be used to calculate the "engine time" with the same unit as the runtime is recorded. Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 9b090d57746d965684f53a1aefcb363bab653ad3 Author: Umesh Nerlige Ramappa Date: Fri May 17 13:43:05 2024 -0700 drm/xe/lrc: Add helper to capture context timestamp Add a helper to capture CTX_TIMESTAMP from the context image so it can be used to calculate the runtime. v2: Add kernel-doc to clarify expectation from caller Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit bd49e50d81b543e678965118a86958d87c045c73 Author: Lucas De Marchi Date: Fri May 17 13:43:04 2024 -0700 drm/xe: Add XE_ENGINE_CLASS_OTHER to str conversion XE_ENGINE_CLASS_OTHER was missing from the str conversion. Add it and remove the default handling so it's protected by -Wswitch. Currently the only user is xe_hw_engine_class_sysfs_init(), which already skips XE_ENGINE_CLASS_OTHER, so there's no change in behavior. Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit ab689514b6ac518ef6e88afa245b834b0dae15a5 Author: Lucas De Marchi Date: Fri May 17 13:43:03 2024 -0700 drm/xe: Promote xe_hw_engine_class_to_str() Move it out of the sysfs compilation unit so it can be re-used in other places. Reviewed-by: Nirmoy Das Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240517204310.88854-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit d9ca4b760ef6d93766b9d87df8cf5a33c807ea51 Author: Marek Vasut Date: Mon May 13 04:16:04 2024 +0200 drm/bridge: tc358767: Enable FRMSYNC timing generator TC9595 datasheet Video Path0 Control (VPCTRL0) Register bit FRMSYNC description says "This bit should be disabled only in video mode transmission where Host transmits video timing together with video data and where pixel clock source is from DSI clock." . This driver always sources pixel clock from external xtal, therefore the FRMSYNC bit must always be enabled, enable it. This fixes an actual issue with DSI-to-DPI mode, where the display would randomly show subtle pixel flickering, or wobble, or shimmering. This is visible on solid gray color, but the degree of the shimmering differs between boots, which makes it hard to debug. There is a caveat to the FRMSYNC and this bridge pixel PLL, which can only generate pixel clock with limited accuracy, it may therefore be necessary to reduce the HFP to fit into line length of input pixel data, to avoid any possible overflows, which make the output video look striped horizontally. Signed-off-by: Marek Vasut Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513021607.129111-1-marex@denx.de commit b855cc58fc93c175fd5bb868d5e3a45cb3e1a42b Author: Uros Bizjak Date: Mon May 20 10:29:55 2024 +0200 x86/boot: Use current_stack_pointer to avoid asm() in init_heap() Use current_stack_pointer to avoid asm() in the calculation of stack_end in init_heap(). The new code is more readable and results in exactly the same object file. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20240520083011.135342-1-ubizjak@gmail.com commit 47ff30cc1be7bf426c03ecc84371452109b416e4 Author: Uros Bizjak Date: Mon May 20 10:21:14 2024 +0200 x86/percpu: Enable named address spaces for all capable GCC versions Enable named address spaces also for GCC 6, GCC 7 and GCC 8 releases. These compilers all produce kernel images that boot without problems. Use compile-time test to detect compiler support for named address spaces. The test passes with GCC 6 as the earliest compiler version where the support for named address spaces was introduced. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20240520082134.121320-1-ubizjak@gmail.com commit 33370412eced2dc7f81f4324e109d69319cafd82 Author: Baochen Qiang Date: Mon May 20 14:58:28 2024 +0300 wifi: ath12k: fix Smatch warnings on ath12k_core_suspend() Smatch is throwing below warning: Commit 692921ead832 ("wifi: ath12k: flush all packets before suspend") leads to the following Smatch static checker warning: drivers/net/wireless/ath/ath12k/core.c:58 ath12k_core_suspend() warn: sleeping in atomic context and also gives the reason: drivers/net/wireless/ath/ath12k/core.c 48 int ret, i; 49 50 if (!ab->hw_params->supports_suspend) 51 return -EOPNOTSUPP; 52 53 rcu_read_lock(); ^^^^^^^^^^^^^^^ Disables preemption. 54 for (i = 0; i < ab->num_radios; i++) { 55 ar = ath12k_mac_get_ar_by_pdev_id(ab, i); 56 if (!ar) 57 continue; --> 58 ret = ath12k_mac_wait_tx_complete(ar); ^^^^^^^ Sleeping in atomic context. 59 if (ret) { 60 ath12k_warn(ab, "failed to wait tx complete: %d\n", ret); 61 rcu_read_unlock(); 62 return ret; 63 } 64 } 65 rcu_read_unlock(); But it is weird that no warning on this in run time even with CONFIG_DEBUG_ATOMIC_SLEEP=y. With some debug it is found that this is because: when system goes to suspend, ath12k_mac_op_stop() gets called where then in ath12k_mac_stop() ab->pdevs_active[ar->pdev_idx] is cleared. This results in ath12k_mac_get_ar_by_pdev_id() always returning a NULL ar, and thereby ath12k_mac_wait_tx_complete() never gets a chance to run. Fix it by retrieving ar directly from ab->pdevs[].ar instead of using ath12k_mac_get_ar_by_pdev_id(). Since ab->pdevs[].ar is set at boot time and won't get cleared when suspend, ath12k_mac_wait_tx_complete() won't be skipped. In addition, with ath12k_mac_get_ar_by_pdev_id() removed, rcu_read_lock()/unlock() are not needed any more, so remove them. This also fixes the warning above. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Fixes: 692921ead832 ("wifi: ath12k: flush all packets before suspend") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/ath12k/7a96ca11-80b5-4751-8cfc-fa637f3aa63a@moroto.mountain/ Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240511095045.9623-1-quic_bqiang@quicinc.com commit a2ab7cb169da38757323929f7b3b4cf396ec53b5 Author: Douglas Anderson Date: Fri May 17 14:36:43 2024 -0700 drm/panel: himax-hx83102: use wrapped MIPI DCS functions Take advantage of some of the new wrapped routines introduced by commit f79d6d28d8fe ("drm/mipi-dsi: wrap more functions for streamline handling") to simplify the himax-hx83102 driver a bit more. This gets rid of some extra error prints (since the _multi functions all print errors for you) and simplifies the code a bit. One thing here that isn't just refactoring is that in a few places we now check with errors with "if (err)" instead of "if (err < 0)". All errors are expected to be negative so this is not expected to have any impact. The _multi code internally considers anything non-zero to be an error so this just makes things consistent. It can also be noted that hx83102_prepare() has a mix of things that can take advantage of _multi calls and things that can't. The cleanest seemed to be to use the multi_ctx still but consistently use the "accum_err" variable for error returns, though that's definitely a style decision with pros and cons. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.8.If761d37b5d511867ac8207fe8220ae48d444a04f@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.8.If761d37b5d511867ac8207fe8220ae48d444a04f@changeid commit 676a079fb3be66aed12cf40f236c77b8e7c189c3 Author: Douglas Anderson Date: Fri May 17 14:36:42 2024 -0700 drm/panel: himax-hx83102: Check for errors on the NOP in prepare() The mipi_dsi_dcs_nop() function returns an error but we weren't checking it in hx83102_prepare(). Add a check. This is highly unlikely to matter in practice. If the NOP failed then likely later MIPI commands would fail too. Found by code inspection. Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.7.I3fae28745bf2cacd8dac04d7a06daea50e233f46@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.7.I3fae28745bf2cacd8dac04d7a06daea50e233f46@changeid commit 509eaa8aeee64bd7a41ca53d8728e497a9991074 Author: Douglas Anderson Date: Fri May 17 14:36:41 2024 -0700 drm/panel: himax-hx83102: If prepare fails, disable GPIO before regulators The enable GPIO should clearly be set low before turning off regulators. That matches both the inverse order that things were enabled and also the order in unprepare(). Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.6.Id0659a80147cf51e0ebb8fe7fee18db86851960d@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.6.Id0659a80147cf51e0ebb8fe7fee18db86851960d@changeid commit 6a7bd6cde73f0fb7e5faa964dbdeb45b55c64698 Author: Douglas Anderson Date: Fri May 17 14:36:40 2024 -0700 drm/panel: ilitek-ili9882t: Check for errors on the NOP in prepare() The mipi_dsi_dcs_nop() function returns an error but we weren't checking it in ili9882t_prepare(). Add a check. This is highly unlikely to matter in practice. If the NOP failed then likely later MIPI commands would fail too. Found by code inspection. Fixes: e2450d32e5fb ("drm/panel: ili9882t: Break out as separate driver") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.5.I323476ba9fa8cc7a5adee4c1ec95202785cc5686@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.5.I323476ba9fa8cc7a5adee4c1ec95202785cc5686@changeid commit 554c00181968d43426bfe68c86541b89265075de Author: Douglas Anderson Date: Fri May 17 14:36:39 2024 -0700 drm/panel: ilitek-ili9882t: If prepare fails, disable GPIO before regulators The enable GPIO should clearly be set low before turning off regulators. That matches both the inverse order that things were enabled and also the order in unprepare(). Fixes: e2450d32e5fb ("drm/panel: ili9882t: Break out as separate driver") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@changeid commit 6320b9199dd99622668649c234d4e8a99e44a9c8 Author: Douglas Anderson Date: Fri May 17 14:36:38 2024 -0700 drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare() The mipi_dsi_dcs_nop() function returns an error but we weren't checking it in boe_panel_prepare(). Add a check. This is highly unlikely to matter in practice. If the NOP failed then likely later MIPI commands would fail too. Found by code inspection. Fixes: 812562b8d881 ("drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequence") Signed-off-by: Douglas Anderson Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.3.Ibffbaa5b4999ac0e55f43bf353144433b099d727@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.3.Ibffbaa5b4999ac0e55f43bf353144433b099d727@changeid commit 587c48f622374e5d47b1d515c6006a4df4dee882 Author: Douglas Anderson Date: Fri May 17 14:36:37 2024 -0700 drm/panel: boe-tv101wum-nl6: If prepare fails, disable GPIO before regulators The enable GPIO should clearly be set low before turning off regulators. That matches both the inverse order that things were enabled and also the order in unprepare(). Fixes: a869b9db7adf ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.2.Ieac346cd0f1606948ba39ceea06b55359fe972b6@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.2.Ieac346cd0f1606948ba39ceea06b55359fe972b6@changeid commit cc2db2ef8d9eebc0df03808ac0dadbdb96733499 Author: Douglas Anderson Date: Fri May 17 14:36:36 2024 -0700 drm/panel: himax-hx8394: Handle errors from mipi_dsi_dcs_set_display_on() better If mipi_dsi_dcs_set_display_on() returned an error then we'd store that in the "ret" variable and jump to error handling. We'd then attempt an orderly poweroff. Unfortunately we then blew away the value stored in "ret". That means that if the orderly poweroff actually worked then we're return 0 (no error) from hx8394_enable() even though the panel wasn't enabled. Fix this by not blowing away "ret". Found by code inspection. Fixes: 65dc9360f741 ("drm: panel: Add Himax HX8394 panel controller driver") Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240517143643.1.I0a6836fffd8d7620f353becb3df2370d2898f803@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.1.I0a6836fffd8d7620f353becb3df2370d2898f803@changeid commit b593ea9406237739d2da42e6f245c390d8a69f43 Author: Jocelyn Falempe Date: Fri May 17 17:09:58 2024 +0200 drm/mgag200: Add an option to disable Write-Combine Unfortunately, the G200 ioburst workaround doesn't work on some servers like Dell poweredge XR11, XR5610, or HPE XL260. In this case completely disabling WC is the only option to achieve low-latency. So this adds a new Kconfig option to disable WC mapping of the G200. Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240517151050.624797-3-jfalempe@redhat.com commit e7f67d0388e77e3863f2f2e9ae4a5f8bce2a718a Author: Jocelyn Falempe Date: Fri May 17 17:09:57 2024 +0200 Revert "drm/mgag200: Add a workaround for low-latency" This reverts commit bfa4437fd3938ae2e186e7664b2db65bb8775670. This workaround doesn't work reliably on all servers. I'll replace it with an option to disable Write-Combine, which has more impact on performance, but fix the latency issue on all hardware. Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240517151050.624797-2-jfalempe@redhat.com commit 8a1a667a34f6696c47fb23fe391ca5281960c07f Author: Abhinav Kumar Date: Tue May 7 16:04:40 2024 -0700 drm/msm: remove python 3.9 dependency for compiling msm Since commit 5acf49119630 ("drm/msm: import gen_header.py script from Mesa"), compilation is broken on machines having python versions older than 3.9 due to dependency on argparse.BooleanOptionalAction. Switch to use simple bool for the validate flag to remove the dependency. Fixes: 5acf49119630 ("drm/msm: import gen_header.py script from Mesa") Closes: https://lore.kernel.org/all/CA+G9fYs1ZN2K=UHOjrwRR2JNE-M0nf9iW_Q-YPzVgmW+9daU4Q@mail.gmail.com/ Tested-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/593057/ Link: https://lore.kernel.org/r/20240507230440.3384949-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar commit 9c1a429217d294ade1a88eddde987a183d4d3ae4 Author: Tvrtko Ursulin Date: Mon May 20 09:18:14 2024 +0100 drm/amdgpu: Fix amdgpu_vm_is_bo_always_valid kerneldoc Align kerneldoc with the function argument name. Signed-off-by: Tvrtko Ursulin Reported-by: Stephen Rothwell Fixes: 26e20235ce00 ("drm/amdgpu: Add amdgpu_bo_is_vm_bo helper") Cc: Christian König Cc: Alex Deucher Signed-off-by: Alex Deucher commit fb63d6fdcd3cbca829ddfba5f35b8b5e5674cfe5 Author: Dr. David Alan Gilbert Date: Sat May 18 00:35:48 2024 +0100 drm/amd/display: remove unused struct 'dc_reg_sequence' 'dc_reg_sequence' was added in commit 44788bbc309b ("drm/amd/display: refactor reg_update") but isn't actually used. Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 1cd04b5c44a2c2e3e0751d543c9097d218182673 Author: Dr. David Alan Gilbert Date: Sat May 18 00:35:47 2024 +0100 drm/amd/display: remove unused struct 'aux_payloads' 'aux_payloads' is unused since commit eae5ffa9bd7b ("drm/amd/display: Switch ddc to new aux interface") Remove it. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 191ef65b4ecb27a7e1fefd71c78e8d0aba9fc3aa Author: Dr. David Alan Gilbert Date: Sat May 18 00:35:46 2024 +0100 drm/amdgpu: remove unused struct 'hqd_registers' 'hqd_registers' used to be used in a member of the 'bonaire_mqd' struct. 'bonaire_mqd' was removed by commit 486d807cd9a9 ("drm/amdgpu: remove duplicate definition of cik_mqd") It's now unused. Remove 'hqd_registers' as well. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Alex Deucher commit 90bc75b08f30ac2ed98bdff60ced0e6d97eb813d Author: Kenneth Feng Date: Thu May 16 09:08:52 2024 +0800 drm/amd/pm: enable thermal alert on smu 14.0.2/3 enable thermal alert on smu 14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit e7d1f1162bb1de369be3a51ca6346bd862b6cc1c Author: Kenneth Feng Date: Thu May 16 09:05:17 2024 +0800 drm/amd/amdgpu: add thm 14.0.2 header file add thm 14.0.2 header file v2: add license, update to latest changes (Alex) Signed-off-by: Kenneth Feng Signed-off-by: Alex Deucher Reviewed-by: Likun Gao commit 64af3d3d66c741c5cf6a62606ae37834973a2428 Author: Asad Kamal Date: Mon May 20 12:53:07 2024 +0800 Revert "drm/amd/pm: Add gpu_metrics_v1_6" Remove gpu_metrics_v1_6 temporarily until tool support is ready This reverts commit 00dedab07b52ca16107e82ce5ca7caaaedf6a417. Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f88e570d4b1fb97dc4d1b27235757cedec7707d3 Author: Lijo Lazar Date: Mon May 13 12:04:50 2024 +0530 Documentation/amdgpu: Add PM policy documentation Add documentation about the newly added pm_policy node in sysfs. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 04806c1a21d7669b0d05130cf62f5b983b165801 Author: Asad Kamal Date: Mon May 20 12:48:56 2024 +0800 Revert "drm/amd/pm: Use gpu_metrics_v1_6 for SMUv13.0.6" Remove gpu_metrics_v1_6 usage for SMUv13.0.6 temporarily and use gpu_metrics_v1_5 until tool support is ready for it. This reverts commit 74ab6253dc077263a61bebfbdd3766b5c11e94be. Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 9488d7affe01641eb3639fd8eeddd22451f1eaf8 Author: Lijo Lazar Date: Mon Mar 4 19:06:07 2024 +0530 drm/amd/pm: Remove unused interface to set plpd Remove unused callback to set PLPD policy and its implementation from arcturus, aldebaran and SMUv13.0.6 SOCs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2aadb520bfacec12527effce3566f8df55e5d08e Author: Tao Zhou Date: Fri May 17 18:04:26 2024 +0800 drm/amdgpu: update type of buf size to u32 for eeprom functions Avoid overflow issue. Signed-off-by: Tao Zhou Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 28e782b2c7137f68569730ec4205e729cc21152d Author: Li Ma Date: Fri May 17 15:51:52 2024 +0800 drm/amd/swsmu: update Dpmclocks_t for smu v14.0.1 MinGfxClk in Dpmclocks_t is wrong. According to pmfw, dropping an uint8_t spare in Dpmclocks_t. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 5434bc03f52de2ec57d6ce684b1853928f508cbc Author: Victor Skvortsov Date: Sun May 19 10:39:43 2024 -0400 drm/amdgpu: Queue KFD reset workitem in VF FED The guest recovery sequence is buggy in Fatal Error when both FLR & KFD reset workitems are queued at the same time. In addition, FLR guest recovery sequence is out of order when PF/VF communication breaks due to a GPU fatal error As a temporary work around, perform a KFD style reset (Initiate reset request from the guest) inside the pf2vf thread on FED. Signed-off-by: Victor Skvortsov Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 3a19a8af64eaff8a8b230796741a1a8277205344 Author: Victor Skvortsov Date: Sun May 19 10:34:18 2024 -0400 drm/amdgpu: Extend KIQ reg polling wait for VF Runtime KIQ interface to read/write registers in VF may take longer than expected for BM environment. Extend the timeout. Signed-off-by: Victor Skvortsov Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 6e3726419bfc8ab52e7a54b376b4c73282203807 Author: Aric Cyr Date: Sun May 12 20:21:53 2024 -0400 drm/amd/display: 3.2.286 This version pairs with DMUB FW Release 0.0.218.0 for dcn314/315/316, dcn35/351, dcn401 and brings along the following: - Fix powerpc compilation - Fix TBT+TypeC Daisy-chain lightup - Fix ODM combine setup - Fix OTC underflow on dcn35 - Fix DVI config for dcn401 - Add ips status info to debugfs - Add 3DLUT DMA load trigger - Modify clock programming to support DPM - Disable dcn401 idle optimizations Acked-by: Roman Li Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5f56be33f33dd1d50b9433f842c879a20dc00f5b Author: Roman Li Date: Tue May 14 12:27:08 2024 -0400 drm/amd/display: Fix POWERPC_64 compilation [Why] Compilation errors while compiling without CONFIG_DRM_AMD_DC_FP: "undefined reference to `dc_bandwidth_in_kbps_from_timing'" [How] Fix Makefile to move dsc files out of DC_FP guard. Fixes: 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401") Reviewed-by: Aurabindo Pillai Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fa3c5a8edc0447ddcca8e3ab4647d05ddaff38fa Author: Cruise Date: Sat May 11 14:42:14 2024 +0800 drm/amd/display: Not fallback if link BW is smaller than req BW [Why] When the link BW is smaller than the request BW, the DP LT just kept running and fallback to lower link config. DP LT just aborted if is_hpd_pending bit is high. But is_hpd_pending bit indicates a new HPD event received. It doesn't mean the HPD is low. [How] Abort the DP LT if the link BW is smaller than the request BW. Remove checking is_hpd_pending bit in DP LT. Reviewed-by: Wenjing Liu Acked-by: Roman Li Signed-off-by: Cruise Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 79d92dbaf60c30fe4da7a047c523ec752828678d Author: Dillon Varone Date: Tue May 7 13:29:41 2024 -0400 drm/amd/display: Correct display clocks update block sequence [WHY&HOW] At the time of block sequence construction, the exact reference DPP/DISP clock is not yet known, so the clock should be passed by reference to the DTO programming function. Reviewed-by: Alvin Lee Acked-by: Roman Li Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9716bae1eaaf35e308cdb97b631211495cbb44d9 Author: Dillon Varone Date: Fri May 10 18:05:22 2024 -0400 drm/amd/display: Disable DCN401 idle optimizations [WHY&HOW] Disable to improve stability for now. Reviewed-by: Alvin Lee Acked-by: Roman Li Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 44b9a7cfc035166f23b9fddecac3219133a8a15f Author: Alvin Lee Date: Fri May 10 15:44:57 2024 -0400 drm/amd/display: Fix ODM + underscan case with cursor [Description] There is a corner case where we're in an ODM config that has recout.x != 0. In these scenarios we have to take into account the extra offset in the ODM adjustment for cursor. Reviewed-by: Aric Cyr Acked-by: Roman Li Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6b7fd8306efbd406fca9e8d27b2c103f951760c8 Author: Wenjing Liu Date: Fri May 10 11:25:55 2024 -0400 drm/amd/display: fix a typo which causes an incorrect ODM combine setup [why] A recent change for ODM combine refactor contains a typo which causes ODM combine mode programmed incorrectly. Reviewed-by: George Shen Acked-by: Roman Li Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5745cb2da6fe08899420d695ce436df0166e7807 Author: Roman Li Date: Tue May 7 16:26:08 2024 -0400 drm/amd/display: Remove redundant idle optimization check [Why] Disable idle optimization for each atomic commit is unnecessary, and can lead to a potential race condition. [How] Remove idle optimization check from amdgpu_dm_atomic_commit_tail() Fixes: 196107eb1e15 ("drm/amd/display: Add IPS checks before dcn register access") Cc: stable@vger.kernel.org Reviewed-by: Hamza Mahfooz Acked-by: Roman Li Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3aec7a5af4d6248b7462b7d1eb597f06d35f5ee0 Author: Nicholas Susanto Date: Tue May 7 14:01:39 2024 -0400 drm/amd/display: Fix pipe addition logic in calc_blocks_to_ungate DCN35 [Why] Missing check for when there is new pipe configuration but both cur_pipe and new_pipe are both populated causing update_state of DSC for that instance not being updated correctly. This causes some display mode changes to cause underflow since DSCCLK is still gated when the display requires DSC. [How] Added another condition in the new pipe addition branch that checks if there is a new pipe configuration and if it is not the same as cur_pipe. cur_pipe does not necessarily have to be NULL to go in this branch. Reviewed-by: Nicholas Kazlauskas Acked-by: Roman Li Signed-off-by: Nicholas Susanto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ecfd1bc18a5b8c5b679513f75c75ad2b8deafa13 Author: Roman Li Date: Tue May 7 16:04:50 2024 -0400 drm/amd/display: Add ips status info to debugfs [Why] For debugging and testing purposes. [How] If IPS is supported create ips_status debugfs entry. Usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_ips_status Reviewed-by: Jerry Zuo Acked-by: Roman Li Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a329598e9eab8cb0f33ec0ede1f7a4e290b1be1c Author: Roman Li Date: Mon May 6 15:34:55 2024 -0400 drm/amd/display: Clear shared dmub firmware state on init [Why] Reset the shared dmub firmware region on dmub hw init to start with known state. [How] Memset the shared region to 0 in dmub_hw_init(). Suggested-by: Nicholas Kazlauskas Reviewed-by: Nicholas Kazlauskas Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit afa91e2d1e58a1896067c55873a962704d5840e9 Author: Ilya Bakoulin Date: Fri May 3 19:08:04 2024 -0400 drm/amd/display: Add 3DLUT DMA load trigger [Why/How] Need to be able to trigger a DMA load to update 3DLUT contents in MPC. Adding a HWSS function to serve as the trigger. Reviewed-by: Krunoslav Kovac Acked-by: Roman Li Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ccb167104a8fea3cca08d1d1d451858436a4b9c8 Author: Chris Park Date: Wed Apr 17 15:27:01 2024 -0400 drm/amd/display: Deallocate DML 2.1 Memory Allocation [Why] DML 2.1 allocates two types of memory in its ctx structure but does not destroy them, causing memory leak whenever DML 2.1 instance is created and destroyed. [How] Deallocate two instances of allocated memory whenever DML 2.1 is destroyed. Reviewed-by: Rodrigo Siqueira Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c6bce984b8917b4a2fba17b5f19f1b44cf69d736 Author: Hersen Wu Date: Fri Apr 26 11:24:21 2024 -0400 drm/amd/display: Add NULL check within get_target_mpc_factor [Why] Coverity reports NULL_RETURN warning. [How] Add pointer NULL check. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 67a4888dc38c1d90d22b051cdb68c9144a6bc317 Author: Kenneth Feng Date: Wed Apr 24 11:41:02 2024 +0800 drm/amd/pm: update driver-if interface update driver-if interface for smu 14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit c801cf3d25a622b96057f5cb9110785c56c43510 Author: Rodrigo Siqueira Date: Mon May 13 08:54:54 2024 -0600 drm/amd/display: Add missing DML2 var helpers Acked-by: Roman Li Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7991585b7743fb9b88e8cd2317ce7a87c4f86450 Author: Dillon Varone Date: Thu Mar 14 16:21:32 2024 -0400 drm/amd/display: Modify HPO pixel clock programming to support DPM Need to select DTBCLK and DPREFCLK as DTBCLK_p source according to hardware guidance. Reviewed-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bea00fab2b0e5359ee88a2b127f15a35cd48872b Author: Harikrishna Revalla Date: Thu Apr 18 18:16:40 2024 +0530 drm/amd/display: Refactor HUBBUB into component folder for DCN401 [why] Cleaning up the code refactor requires hubbub to be in its own component. [how] Move all DCN401 files under newly created hubbub folder and fixing the makefiles. Reviewed-by: Rodrigo Siqueira Signed-off-by: Harikrishna Revalla Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7a1dd866c5ac7d25bd1795e1cd507cabe29958ea Author: Samson Tam Date: Wed Apr 24 08:37:04 2024 -0400 drm/amd/display: enable EASF support for DCN40 [Why] Enable adaptive scaler support for DCN401 [How] - Enable build flag for SPL - Set prefer_easf flag to true - Apply light linear scaling policy based on transfer function and pixel format. Choose between linear or non-linear scaling - Set matrix_mode based on pixel format - Disable ring estimator - Add missing EASF register defines, masks, and writes - Disable EASF if scale ratio or number of taps is unsupported and when bypassing the scaler - Add debug flags and registry keys for debugging SPL and EASF - Add support for Visual Confirm with EASF Reviewed-by: Rodrigo Siqueira Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 70bb97d95fe149607f8e148087ee7e48cc3e94d6 Author: Alex Hung Date: Tue May 7 18:02:49 2024 -0600 drm/amd/display: Adjust incorrect indentations and spaces This fixes indentations and adjust spaces for better readability and code styles. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7f46daca139985cbfb79f1c3a41f4df065d45b1e Author: Chris Park Date: Tue Apr 2 02:06:00 2024 -0400 drm/amd/display: Use the correct TMDS function to avoid DVI issues [Why] DVI is TMDS signal like HDMI but without audio. Current signal check does not correctly reflect DVI clock programming. [How] Define a new signal check for TMDS that includes DVI to HDMI TMDS programming. Reviewed-by: Rodrigo Siqueira Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 290c0462e0bb68b0878e25c15e7096626dd5bc15 Author: Alex Hung Date: Wed May 8 13:48:12 2024 -0600 drm/amd/display: Fix incorrect DCN401 comparison The comparisons intend to be DCN401 inclusive, and fix it by adding equal signs. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 872c0de315d2ebad16d0ff574f8c9ce26dd5c6f2 Author: Wenjing Liu Date: Wed Apr 17 17:18:55 2024 -0400 drm/amd/display: Add missing enable and disable symclk_se functions for dcn401 The functions are missing. These two functions are required to support MST. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9eb5c2a29afafc39505216e577292f0faa255295 Author: Rodrigo Siqueira Date: Wed May 8 09:46:02 2024 -0600 drm/amd/display: Remove duplicate configuration The function that commits planes calls the same set of functions twice, and in the case of the FAMs utilization, it is not desired to call the dmub, hwss_build and hwss_execute. This commit just removes the unnecessary calls to those functions. Acked-by: Roman Li Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 964cf2c28da7d525c40e126006511629575fe3e9 Author: Wenjing Liu Date: Mon Apr 10 20:00:46 2023 -0400 drm/amd/display: Move DSC functions from dc.c to dc_dsc.c Move dsc functions from dc.c to dc_dsc.c. Co-developed-by: George Shen Signed-off-by: George Shen Signed-off-by: Wenjing Liu Reviewed-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 673087d8b023faf34b84e8faf63bbeea3da87bab Author: Maíra Canal Date: Sun May 12 19:23:29 2024 -0300 drm/v3d: Deprecate the use of the Performance Counters enum The Performance Counters enum used to identify the index of each performance counter and provide the total number of performance counters (V3D_PERFCNT_NUM). But, this enum is only valid for V3D 4.2, not for V3D 7.1. As we implemented a new flexible structure to retrieve performance counters information, we can deprecate this enum. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-7-mcanal@igalia.com commit f5b798bdc9179b88269e13bb9b13db4a1527f4e2 Author: Maíra Canal Date: Sun May 12 19:23:28 2024 -0300 drm/v3d: Use V3D_MAX_COUNTERS instead of V3D_PERFCNT_NUM V3D_PERFCNT_NUM represents the maximum number of performance counters for V3D 4.2, but not for V3D 7.1. This means that, if we use V3D_PERFCNT_NUM, we might go out-of-bounds on V3D 7.1. Therefore, use the number of performance counters on V3D 7.1 as the maximum number of counters. This will allow us to create arrays on the stack with reasonable size. Note that userspace must use the value provided by DRM_V3D_PARAM_MAX_PERF_COUNTERS. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-6-mcanal@igalia.com commit f33fe58298e686e7cc2d24f747c980457812b566 Author: Maíra Canal Date: Sun May 12 19:23:27 2024 -0300 drm/v3d: Create new IOCTL to expose performance counters information Userspace usually needs some information about the performance counters available. Although we could replicate this information in the kernel and user-space, let's use the kernel as the "single source of truth" to avoid issues in the future (e.g. list of performance counters is updated in user-space, but not in the kernel, generating invalid requests). Therefore, create a new IOCTL to expose the performance counters information, that is name, category, and description. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-5-mcanal@igalia.com commit 36b75080e68b4a27ae1c40beffb3d6131f8eeeff Author: Maíra Canal Date: Sun May 12 19:23:26 2024 -0300 drm/v3d: Create a new V3D parameter for the maximum number of perfcnt The maximum number of performance counters can change from version to version and it's important for userspace to know this value, as it needs to use the counters for performance queries. Therefore, expose the maximum number of performance counters to userspace as a parameter. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-4-mcanal@igalia.com commit c606043ddbf0eb52cac057565ab379e18932a8bf Author: Maíra Canal Date: Sun May 12 19:23:25 2024 -0300 drm/v3d: Different V3D versions can have different number of perfcnt Currently, even though V3D 7.1 has 93 performance counters, it is not possible to create counters bigger than 87, as `v3d_perfmon_create_ioctl()` understands that counters bigger than 87 are invalid. Therefore, create a device variable to expose the maximum number of counters for a given V3D version and make `v3d_perfmon_create_ioctl()` check this variable. This commit fixes CTS failures in the performance queries tests `dEQP-VK.query_pool.performance_query.*` [1] Link: https://gitlab.freedesktop.org/mesa/mesa/-/commit/ea1f09a5f21839f4f3b93610b58507c4bd9b9b81 [1] Fixes: 6fd9487147c4 ("drm/v3d: add brcm,2712-v3d as a compatible V3D device") Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-3-mcanal@igalia.com commit 3cbcbe016c31ad4fe1b7a53b325c1a36be6191f4 Author: Maíra Canal Date: Sun May 12 19:23:24 2024 -0300 drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1 Add name, category and description for each one of the 93 performance counters available on V3D. Note that V3D 4.2 has 87 performance counters, while V3D 7.1 has 93. Therefore, there are two performance counters arrays. The index of the performance counter for each V3D version is represented by its position on the array. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-2-mcanal@igalia.com commit 26dd8ccdba4d492d00e35c410bc4314e043bdf73 Author: Muna Sinada Date: Fri May 17 10:00:30 2024 +0300 wifi: ath12k: dynamic VLAN support Add support for dynamic VLAN. VLAN group traffic is encapsulated and encrypted in mac80211 and driver needs to set flags for the VLAN group traffic to skip hardware encapsulation and encryption. VLAN group traffic utilizes ext MSDU and HTT Metadata to set encapsulation type to RAW and encryption type to OPEN in order to inform firmware to skip hardware encapsulation and encryption. 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: Muna Sinada Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240515192830.995013-1-quic_msinada@quicinc.com commit 9130ea06163fc229665b9ec4666de9f4ef68284d Author: Ingo Molnar Date: Mon May 20 10:45:06 2024 +0200 x86/percpu: Clean up vertical alignment details - Fix/unify misc vertical alignment inconsistencies - Make CPP macros look a bit more like C code by adding an empty line after local variable declaration blocks, and before final rvalue statements. No change in code. Signed-off-by: Ingo Molnar Cc: Uros Bizjak Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org commit 61d73e4f7d538f3907d954a531169e8164aef56b Author: Ingo Molnar Date: Mon May 20 10:22:39 2024 +0200 x86/percpu: Clean up a bit - Fix misc typos - There's 4 variants of the same spelling right now: 'per-CPU', 'per CPU', 'percpu' and 'per-cpu' Standardize on 'per-CPU' only. - s/makes gcc load /makes the compiler load - Instead of: #ifdef CONFIG_XXXX #define YYYY FOO #else #define YYYY BAR #endif Use the slightly more readable form of: #ifdef CONFIG_XXXX # define YYYY FOO #else # define YYYY BAR #endif - Standardize & expand '#else' and '#endif' comments - Fix comment style - Capitalize x86 instruction names in comments No change in code. Signed-off-by: Ingo Molnar Cc: Uros Bizjak Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org commit 47c9dbd2fb5f98453840e18ebced9138ec8b4cc5 Author: Uros Bizjak Date: Mon May 20 10:09:25 2024 +0200 x86/percpu: Move some percpu accessors around to reduce ifdeffery Move some percpu accessors around, mainly to reduce ifdeffery and improve readabilty by following dependencies between accessors. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240520080951.121049-2-ubizjak@gmail.com commit 48908919c9062bf9472def7389dd7cd9c6a45b70 Author: Uros Bizjak Date: Mon May 20 10:09:24 2024 +0200 x86/percpu: Rename percpu_stable_op() to __raw_cpu_read_stable() Rename percpu_stable_op() to __raw_cpu_read_stable() to be in line with other read/write percpu accessors. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Uros Bizjak Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240520080951.121049-1-ubizjak@gmail.com commit 2785ea9673a7305abeea87111849a4e04b0f4626 Author: Dmitry Antipov Date: Wed May 15 18:28:24 2024 +0300 wifi: rt2x00: remove unused delayed work data from link description Remove unused 'agc_work' and 'vco_work' members of 'struct link'. This follows commit d96324703ffa ("rt2x00: merge agc and vco works with link tuner") where AGC and VCO calibration code was completely redesigned. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://msgid.link/20240515152824.143537-1-dmantipov@yandex.ru commit d370a9dba5c4a9bc1b6bc0643037700a03fceae1 Author: Jouni Högander Date: Fri May 17 10:30:05 2024 +0300 drm/i915/psr: PSR2_CTL[Block Count Number] not needed for LunarLake PSR2_CTL[Block Count Number] is not used by LunarLake do not configure it. Bspec: 69885 Signed-off-by: Jouni Högander Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240517073005.2414293-4-jouni.hogander@intel.com commit 30dee753ca0a1b565da5eec8d0686315f595d171 Author: Jouni Högander Date: Fri May 17 10:30:04 2024 +0300 drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide On LunarLake PSR2_CTL[IO Wake Lines] contains now bit 13:18. Take this into account when enabling PSR2_CTL. Bspec: 69885 Signed-off-by: Jouni Högander Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240517073005.2414293-3-jouni.hogander@intel.com commit 45430e7b7c8de9ed910d99cc8906db3db5a1334d Author: Jouni Högander Date: Fri May 17 10:30:03 2024 +0300 drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 68 On LunarLake maximum for IO and Fast Wake time line counts are 68: 6 bits + 5 lines added by the HW. Take this into account in calculation and when writing the IO Wake lines. v2: maximum line count is 68 (6 bits + 5 lines added by HW) Signed-off-by: Jouni Högander Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240517073005.2414293-2-jouni.hogander@intel.com commit 6f130e4d4a5f7174f98300376f3994817ad7e21c Author: Mohammad Shehar Yaar Tausif Date: Thu May 16 12:54:11 2024 +0530 bpf: Fix order of args in call to bpf_map_kvcalloc The original function call passed size of smap->bucket before the number of buckets which raises the error 'calloc-transposed-args' on compilation. Signed-off-by: Mohammad Shehar Yaar Tausif Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240516072411.42016-1-sheharyaar48@gmail.com Signed-off-by: Alexei Starovoitov commit 34021caef79f76e70ac31247d321ecd0683c4939 Author: Alan Maguire Date: Tue May 14 17:27:16 2024 +0100 kbuild, bpf: Use test-ge check for v1.25-only pahole There is no need to set the pahole v1.25-only flags in an "ifeq" version clause; we are already in a <= v1.25 branch of "ifeq", so that combined with a "test-ge" v1.25 ensures the flags will be applied for v1.25 only. Suggested-by: Masahiro Yamada Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240514162716.2448265-1-alan.maguire@oracle.com Signed-off-by: Alexei Starovoitov commit e7b64f9d3f5b10186038201e0b91f734cbd7fc3d Author: Artem Savkov Date: Mon May 13 13:26:58 2024 +0200 bpftool: Fix make dependencies for vmlinux.h With pre-generated vmlinux.h there is no dependency on neither vmlinux nor bootstrap bpftool. Define dependencies separately for both modes. This avoids needless rebuilds in some corner cases. Suggested-by: Jan Stancek Signed-off-by: Artem Savkov Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240513112658.43691-1-asavkov@redhat.com Signed-off-by: Alexei Starovoitov commit 94133cf24bb33889aac267a7f0e3e6a08b8a8e5a Author: Mykyta Yatsenko Date: Tue May 14 14:12:21 2024 +0100 bpftool: Introduce btf c dump sorting Sort bpftool c dump output; aiming to simplify vmlinux.h diffing and forcing more natural type definitions ordering. Definitions are sorted first by their BTF kind ranks, then by their base type name and by their own name. Type ranks Assign ranks to btf kinds (defined in function btf_type_rank) to set next order: 1. Anonymous enums/enums64 2. Named enums/enums64 3. Trivial types typedefs (ints, then floats) 4. Structs/Unions 5. Function prototypes 6. Forward declarations Type rank is set to maximum for unnamed reference types, structs and unions to avoid emitting those types early. They will be emitted as part of the type chain starting with named type. Lexicographical ordering Each type is assigned a sort_name and own_name. sort_name is the resolved name of the final base type for reference types (typedef, pointer, array etc). Sorting by sort_name allows to group typedefs of the same base type. sort_name for non-reference type is the same as own_name. own_name is a direct name of particular type, is used as final sorting step. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Tested-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240514131221.20585-1-yatsenko@meta.com Signed-off-by: Alexei Starovoitov commit 1fe67aee8ab3fdab4357afc983a9e9ff3892d694 Author: Uros Bizjak Date: Tue Apr 30 11:17:24 2024 +0200 x86/percpu: Fix operand constraint modifier in __raw_cpu_write() __raw_cpu_write() with !USE_X86_SEG_SUPPORT config uses read/write operand constraint modifier "+" for its memory location. This signals the compiler that the location is both read and written by the asm. This is not true, because MOV insn only writes to the output. Correct the modifier to "=" to inform the compiler that the memory location is only written to. This also prevents the compiler from value tracking the undefined value from the uninitialized memory. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240430091833.196482-5-ubizjak@gmail.com commit 539615de7004a46778020183622856f4ca14e4ac Author: Uros Bizjak Date: Tue Apr 30 11:17:23 2024 +0200 x86/percpu: Introduce the __raw_cpu_read_const() macro Introduce the __raw_cpu_read_const() macro to further reduce ifdeffery and differences between configs w/ and w/o USE_X86_SEG_SUPPORT. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240430091833.196482-4-ubizjak@gmail.com commit a50ea641296699af1947336c2e75f6234f53548a Author: Uros Bizjak Date: Tue Apr 30 11:17:22 2024 +0200 x86/percpu: Unify percpu read-write accessors Redefine percpu_from_op() and percpu_to_op() as __raw_cpu_read() and __raw_cpu_write(). Unify __raw_cpu_{read,write}() macros between configs w/ and w/o USE_X86_SEG_SUPPORT in order to unify {raw,this}_cpu{read_write}_N() accessors between configs. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240430091833.196482-3-ubizjak@gmail.com commit 08d564ad699ef32ceaf99d238b3d9c1f4ce5c998 Author: Uros Bizjak Date: Tue Apr 30 11:17:21 2024 +0200 x86/percpu: Move some percpu macros around for readability Move some percpu macros around to make a follow-up patch more readable. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240430091833.196482-2-ubizjak@gmail.com commit 455ca134a7b2121dd739d425d3be313fb52f0651 Author: Uros Bizjak Date: Tue Apr 30 11:17:20 2024 +0200 x86/percpu: Introduce the pcpu_binary_op() macro Introduce the pcpu_binary_op() macro, a copy of the percpu_to_op() macro. Update percpu binary operators to use the new macro, since percpu_to_op() will be re-purposed as a raw percpu write accessor in a follow-up patch. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Linus Torvalds Link: https://lore.kernel.org/r/20240430091833.196482-1-ubizjak@gmail.com commit cd84351c8c1baec86342d784feb884ace007d51c Author: Uros Bizjak Date: Thu Apr 25 12:16:14 2024 +0200 perf/x86/amd: Use try_cmpxchg() in events/amd/{un,}core.c Replace this pattern in events/amd/{un,}core.c: cmpxchg(*ptr, old, new) == old ... with the simpler and faster: try_cmpxchg(*ptr, &old, new) The x86 CMPXCHG instruction returns success in the ZF flag, so this change saves a compare after the CMPXCHG. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20240425101708.5025-1-ubizjak@gmail.com commit 062a7ce676e092faf03daa6c579224bb3d904ae1 Author: Yang Wang Date: Fri May 17 09:18:38 2024 +0800 drm/amdgpu: fix ACA no query result after gpu reset fix ACA no query result after gpu reset. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 546e6309d14cfdc584b92eb6f2274618e629b3f5 Author: Lijo Lazar Date: Mon Mar 4 18:55:27 2024 +0530 drm/amd/pm: Remove legacy interface for xgmi plpd Replace the legacy interface with amdgpu_dpm_set_pm_policy to set XGMI PLPD mode. Also, xgmi_plpd_policy sysfs node is not used by any client. Remove that as well. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5d6f66b542a6a6f8b0c5b4698fefe0f7fd5e065a Author: Lijo Lazar Date: Mon Mar 4 12:26:58 2024 +0530 drm/amd/pm: Add xgmi plpd to arcturus pm_policy On arcturus, allow changing xgmi plpd policy through 'pm_policy/xgmi_plpd' sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 258ed689bc3163f86204f75df6c23f92b59b3fad Author: Yang Wang Date: Fri May 17 07:56:24 2024 +0800 drm/amdgpu: change bank cache lock type to spinlock modify the lock type to 'spinlock' to avoid schedule issue in interrupt context. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 7794e99848de19e37b45a17a23115e973021b7ae Author: Lijo Lazar Date: Mon Mar 4 12:03:08 2024 +0530 drm/amd/pm: Add xgmi plpd to aldebaran pm_policy On aldebaran, allow changing xgmi plpd policy through 'pm_policy/xgmi_plpd' sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 20897c6e711595b4bbd8da45fe9fec3905e19fea Author: Lijo Lazar Date: Mon Mar 4 11:49:08 2024 +0530 drm/amd/pm: Add xgmi plpd to SMU v13.0.6 pm_policy On SOCs with SMU v13.0.6, allow changing xgmi plpd policy through 'pm_policy/xgmi_plpd' sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 83b90b138bc291769d212008d7b6952225a1eba0 Author: Lijo Lazar Date: Thu May 16 13:49:11 2024 +0530 drm/amd/pm: Add xgmi plpd policy to pm_policy Add support to set XGMI PLPD policy levels through 'pm_policy/xgmi_plpd' sysfs node. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit e07c5a35d178d5f86f7c3ee7125d7b22b7e6d166 Author: Lijo Lazar Date: Wed Feb 21 15:55:50 2024 +0530 drm/amd/pm: Add support to select pstate policy Add support to select pstate policy in SOCs with SMUv13.0.6 Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ec41bdd82e9b043a53e8cd80746e406cb1ed72b9 Author: Lijo Lazar Date: Wed Feb 21 15:50:26 2024 +0530 drm/amd/pm: Update PMFW messages for SMUv13.0.6 Add PMF message to select a Pstate policy in SOCs with SMU v13.0.6. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d154b1ca580fd724f384a7042a5f24611809476 Author: Lijo Lazar Date: Wed Feb 21 14:54:49 2024 +0530 drm/amd/pm: Add support for DPM policies Add support to set/get information about different DPM policies. The support is only available on SOCs which use swsmu architecture. A DPM policy type may be defined with different levels. For example, a policy may be defined to select Pstate preference and then later a pstate preference may be chosen. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit f6bce954f432c556659a57be9e18fecdc575affb Author: Yang Wang Date: Thu May 16 19:57:24 2024 +0800 drm/amdgpu: change aca bank error lock type to spinlock modify the lock type to 'spinlock' to avoid schedule issue in interrupt context. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 50bff04d0250d6606eb5fa3907bee43b4a6c5742 Author: Tvrtko Ursulin Date: Mon May 6 17:59:57 2024 +0100 drm/amdgpu: Describe all object placements in debugfs Accurately show all placements when describing objects in debugfs, instead of bunching them up under the 'CPU' placement. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8fb0efb10184c8121719247e5d59e68e7f5617de Author: Tvrtko Ursulin Date: Mon May 6 17:59:56 2024 +0100 drm/amdgpu: Reduce mem_type to domain double indirection All apart from AMDGPU_GEM_DOMAIN_GTT memory domains map 1:1 to TTM placements. And the former be either AMDGPU_PL_PREEMPT or TTM_PL_TT, depending on AMDGPU_GEM_CREATE_PREEMPTIBLE. Simplify a few places in the code which convert the TTM placement into a domain by checking against the current placement directly. In the conversion AMDGPU_PL_PREEMPT either does not have to be handled because amdgpu_mem_type_to_domain() cannot return that value anyway. v2: * Remove AMDGPU_PL_PREEMPT handling. v3: * Rebase. Signed-off-by: Tvrtko Ursulin Reviewed-by: Christian König # v1 Reviewed-by: Felix Kuehling # v2 Signed-off-by: Alex Deucher commit 26e20235ce00219a1ca2fb617d82fa24607190ae Author: Tvrtko Ursulin Date: Mon May 6 17:59:55 2024 +0100 drm/amdgpu: Add amdgpu_bo_is_vm_bo helper Help code readability by replacing a bunch of: bo->tbo.base.resv == vm->root.bo->tbo.base.resv With: amdgpu_vm_is_bo_always_valid(vm, bo) No functional changes. v2: * Rename helper and move to amdgpu_vm. (Christian) v3: * Use Christian's kerneldoc. v4: * Fixed logic inversion in amdgpu_vm_bo_get_memory. Signed-off-by: Tvrtko Ursulin Cc: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e060c7ba7e335e2e0b76972a1efa0715915bcb7a Author: Srinivasan Shanmugam Date: Fri May 17 08:50:16 2024 +0530 drm/amdgpu: Remove duplicate check for *is_queue_unmap in sdma_v7_0_ring_set_wptr This commit removes a duplicate check for *is_queue_unmap in the sdma_v7_0_ring_set_wptr function. The check at line 171 was considered dead code because at this point in the code, we already know that *is_queue_unmap is false due to the check at line 161. By removing this unnecessary check, improves the readability of the code Fixes the below: drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c:171 sdma_v7_0_ring_set_wptr() warn: duplicate check '*is_queue_unmap' (previous on line 161) drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c 140 static void sdma_v7_0_ring_set_wptr(struct amdgpu_ring *ring) 141 { 142 struct amdgpu_device *adev = ring->adev; 143 uint32_t *wptr_saved; 144 uint32_t *is_queue_unmap; 145 uint64_t aggregated_db_index; 146 uint32_t mqd_size = adev->mqds[AMDGPU_HW_IP_DMA].mqd_size; 147 148 DRM_DEBUG("Setting write pointer\n"); 149 150 if (ring->is_mes_queue) { 151 wptr_saved = (uint32_t *)(ring->mqd_ptr + mqd_size); 152 is_queue_unmap = (uint32_t *)(ring->mqd_ptr + mqd_size + ^^^^^^^^^^^^^^^^ Set here 153 sizeof(uint32_t)); 154 aggregated_db_index = 155 amdgpu_mes_get_aggregated_doorbell_index(adev, 156 ring->hw_prio); 157 158 atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 159 ring->wptr << 2); 160 *wptr_saved = ring->wptr << 2; 161 if (*is_queue_unmap) { ^^^^^^^^^^^^^^^ Checked here 162 WDOORBELL64(aggregated_db_index, ring->wptr << 2); 163 DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n", 164 ring->doorbell_index, ring->wptr << 2); 165 WDOORBELL64(ring->doorbell_index, ring->wptr << 2); 166 } else { 167 DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n", 168 ring->doorbell_index, ring->wptr << 2); 169 WDOORBELL64(ring->doorbell_index, ring->wptr << 2); 170 --> 171 if (*is_queue_unmap) ^^^^^^^^^^^^^^^ This is dead code. We know it's false. 172 WDOORBELL64(aggregated_db_index, 173 ring->wptr << 2); 174 } 175 } else { 176 if (ring->use_doorbell) { 177 DRM_DEBUG("Using doorbell -- " 178 "wptr_offs == 0x%08x " Fixes: b412351e91bd ("drm/amdgpu: Add sdma v7_0 ip block support (v7)") Cc: Likun Gao Cc: Hawking Zhang Cc: Christian König Cc: Alex Deucher Reported-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Reviewed-by: Likun Gao Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 1446226d32a45bb7c4f63195a59be8c08defe658 Author: Tim Van Patten Date: Thu May 16 11:57:25 2024 -0600 drm/amdgpu: Remove GC HW IP 9.3.0 from noretry=1 The following commit updated gmc->noretry from 0 to 1 for GC HW IP 9.3.0: commit 5f3854f1f4e2 ("drm/amdgpu: add more cases to noretry=1") This causes the device to hang when a page fault occurs, until the device is rebooted. Instead, revert back to gmc->noretry=0 so the device is still responsive. Fixes: 5f3854f1f4e2 ("drm/amdgpu: add more cases to noretry=1") Signed-off-by: Tim Van Patten Signed-off-by: Alex Deucher commit a1a9143c96ba185cda6ed193e7b13c77fc90dafc Author: Ruijing Dong Date: Wed May 15 15:13:56 2024 -0400 drm/amdgpu/vcn: update vcn5 enc/dec capabilities Update the capabilities for supporting 8k encoding. Reviewed-by: David (Ming Qiang) Wu Acked-by: Alex Deucher Signed-off-by: Ruijing Dong Signed-off-by: Alex Deucher commit 985f7758529083f35941d49f38a6f23a4430f59c Author: Kenneth Feng Date: Wed Apr 10 08:49:58 2024 +0800 drm/amd/pm: support mode1 reset on smu v14.0.3 Align with new port same as smu 13.x. Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 72e6ea95c41d4b61b509037cdaec09194f577d81 Author: Jiapeng Chong Date: Thu May 16 16:22:00 2024 +0800 drm/amdgpu: Remove duplicate amdgpu_umsch_mm.h header ./drivers/gpu/drm/amd/amdgpu/amdgpu.h: amdgpu_umsch_mm.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9063 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 48fdcadb2c404c4156a45dcff8d5760aa0e8ae44 Author: Srinivasan Shanmugam Date: Wed May 15 20:49:47 2024 +0530 drm/amdgpu/display: Update kdoc for 'optc35_set_odm_combine' The parameters segment_width and last_segment_width are used to control the configuration of the Output Plane Processor (OPP), specifically the width of each segment that the display is divided into and the width of the last segment Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn35/dcn35_optc.c:59: warning: Function parameter or struct member 'segment_width' not described in 'optc35_set_odm_combine' drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn35/dcn35_optc.c:59: warning: Function parameter or struct member 'last_segment_width' not described in 'optc35_set_odm_combine' drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn35/dcn35_optc.c:59: warning: Excess function parameter 'timing' description in 'optc35_set_odm_combine' Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Tom Chung Signed-off-by: Alex Deucher commit 347eccc4053f0a34e564dd98b029808f365ee479 Author: Kendall Smith Date: Wed May 15 15:20:09 2024 -0400 drm/radeon: initialize backlight for iMac12,2 with Radeon 6750M If a Radeon 6750M GPU from an iMac12,1 is installed into an iMac 12,2, there is no backlight device initialized during boot. Everything else is functional, but the display brightness cannot be controlled. There are no directories present in /sys/class/backlight after booting. A simple one line modification to an if statement fixes this issue by initializing the radeon backlight device for an iMac12,2 as well if it has a 6750M. After the patch, brightness can be controlled and radeon_bl0 is present in /sys/class/backlight. This was tested by compiling the latest kernel with and without the patch. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3378 Signed-off-by: Kendall Smith Signed-off-by: Alex Deucher commit 512b322b9a16c2465b9926b98ab067421e5669f9 Author: Kenneth Feng Date: Sat May 11 15:35:23 2024 +0800 drm/amd/pm: support pp_dpm_pcie on smu v14.0.2/3 support pp_dpm_pcie on smu v14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit d3620eeae82cccf8316e6754f8ddb52473e2e5ea Author: Kenneth Feng Date: Fri Apr 26 09:28:24 2024 +0800 drm/amd/amdgpu: add module parameter for jpeg add module parameter for jpeg. this is a temporary workaround for jpeg unit test fail on vcn 5.0 now. will be removed later. Signed-off-by: Kenneth Feng Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit 5d32b7e77b892c1eada532f37841f504175e4b64 Author: Sreekant Somasekharan Date: Fri May 10 10:07:58 2024 -0400 drm/amdkfd: Add GFX1201 to svm_range_get_pte_flags function GFX1201 was missed in the commit below. Adding it in. Fixes: 628e1ace2379 ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC") Signed-off-by: Sreekant Somasekharan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 736f911204ec30707c24817781de5f990a5f545d Author: Alex Deucher Date: Tue May 14 12:43:30 2024 -0400 drm/amdgpu: fix documentation errors in gmc v12.0 Fix up parameter descriptions. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0cce5f285d9ae81c33993f3270fe77f5e74a69ab Author: Sreekant Somasekharan Date: Fri May 10 00:09:32 2024 -0400 drm/amdkfd: Check correct memory types for is_system variable To catch GPU mapping of system memory, TTM_PL_TT and AMDGPU_PL_PREEMPT must be checked. Fixes: 628e1ace2379 ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC") Signed-off-by: Sreekant Somasekharan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b72fa761fc6be316bbf3ef9af4b7f145a208b1f3 Author: Alex Deucher Date: Tue May 14 12:38:33 2024 -0400 drm/amdgpu: fix documentation errors in sdma v7.0 Fix up parameter descriptions. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3ed181b8ff43fc03c85d43a726e578bd131d39e4 Author: Harish Kasiviswanathan Date: Wed May 1 17:07:59 2024 -0400 drm/amdkfd: Ensure gpu_id is unique gpu_id needs to be unique for user space to identify GPUs via KFD interface. In the current implementation there is a very small probability of having non unique gpu_ids. v2: Add check to confirm if gpu_id is unique. If not unique, find one Changed commit header to reflect the above v3: Use crc16 as suggested-by: Lijo Lazar Ensure that gpu_id != 0 Signed-off-by: Harish Kasiviswanathan Reviewed-by: Lijo Lazar Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b712d7c20133b67f13aa134e7534369f19e1214f Author: Yang Wang Date: Tue May 14 07:48:19 2024 +0800 drm/amdgpu: fix compiler 'side-effect' check issue for RAS_EVENT_LOG() create a new helper function to avoid compiler 'side-effect' check about RAS_EVENT_LOG() macro. Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d430e856ed009f9a98f12b6d6812d7ee1d7f3e1c Author: Kenneth Feng Date: Mon Mar 11 14:14:16 2024 +0800 drm/amd/pm: disable gpo temporarily disable gpo temprarily since it is not ready in fw Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 9a55c77978308695cded564d6b17390f7bb879f4 Author: Frank Min Date: Fri May 10 15:51:41 2024 +0800 drm/amdgpu: fix getting vram info for gfx12 gfx12 query video mem channel/type/width from umc_info of atom list, so fix it accordingly. Signed-off-by: Frank Min Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b80160a53a4aad05987ead30125cdca3991bac09 Author: Frank Min Date: Tue May 14 15:47:13 2024 +0800 drm/amdgpu/mes: use mc address for wptr in add queue packet use mc address for wptr in add queue packet Signed-off-by: Frank Min Reviewed-by: Jack Xiao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2581f22fd849d7c8a5fedb8b1531d20d2dcd59aa Author: Kenneth Feng Date: Tue May 7 17:53:18 2024 +0800 drm/amd/pm: add pp_dpm_dcefclk for smu 14.0.2/3 add pp_dpm_dcefclk for smu 14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit c14d5b5095cc805b0f3f04182b5e18e618258b86 Author: Likun Gao Date: Wed Apr 24 17:20:39 2024 +0800 drm/amdgpu: enable gfxoff for gc v12.0.0 Enable GFXOFF for GC v12.0.0. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d8cd2d617a264734e94c29bcee5e5b5d6b7f3e92 Author: Likun Gao Date: Mon Apr 8 04:32:25 2024 +0800 drm/amd/amdgpu: enable mmhub and athub cg on gc 12.0.0 Enable mmhub and athub cg on gc 12.0.0 Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7be73af53b57c98cf48e37b66da4dc00c63bd6e2 Author: Likun Gao Date: Tue May 14 16:19:38 2024 +0800 drm/amdgpu: switch default mes to uni mes Switch the default mes to uni mes for gfx v12. V2: remove uni_mes set for gfx v11. Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit d19fb10085a49b77578314f69fff21562f7cd054 Author: Ma Jun Date: Thu May 9 15:51:35 2024 +0800 drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules Check the pointer value to fix potential null pointer dereference Acked-by: Yang Wang Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit b2aa3d4b3048598e665230e2da46a62ad1f48d52 Author: Yang Wang Date: Tue May 14 15:56:34 2024 +0800 drm/amdgpu: add debug flag to enable RAS ACA Use debug_mask=0x10 (BIT.4) param to help enable RAS ACA. (RAS ACA is disabled by default.) Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2ac72cbc7e61ef24e8ee2f39d02b3b8b59c14a41 Author: Likun Gao Date: Mon Apr 8 03:38:10 2024 +0800 drm/amdgpu: enable some cg feature for gc 12.0.0 Enable 3D cgcg, 3D cgls, sram fgcg, perfcounter mgcg, repeater fgcg for gc v12.0.0. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4c11d30c95576937c6c35e6f29884761f2dddb43 Author: Ma Jun Date: Sat May 11 15:48:02 2024 +0800 drm/amdgpu: Fix the null pointer dereference to ras_manager Check ras_manager before using it Signed-off-by: Ma Jun Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 599142f948cf65ec054c84fb4bc170fe2838411a Author: Ma Jun Date: Mon May 13 16:22:55 2024 +0800 drm/amdgpu/pm: Drop hard-code value of usTMax Drop hard-code value of nsTmax because we read this value from pptable. Signed-off-by: Ma Jun Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f326d7cc745683f53052b84382bd10567b45cd5d Author: Xiaogang Chen Date: Mon May 13 23:54:25 2024 -0500 drm/kfd: Correct pinned buffer handling at kfd restore and validate process This reverts commit 8a774fe912ff ("drm/amdgpu: avoid restore process run into dead loop") since buffer got pinned is not related whether it needs mapping And skip buffer validation at kfd driver if the buffer has been pinned. Signed-off-by: Xiaogang Chen Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b194d21b9bcc15b50df1bc3ff7428e51c2918a6f Author: Lijo Lazar Date: Thu May 9 17:02:33 2024 +0530 drm/amdgpu: Use NPS ranges from discovery table Add GMC API to fetch NPS range information from discovery table. Use NPS range information in GMC 9.4.3 SOCs when available, otherwise fallback to software method. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8ce97959ecc23a49c8a24975f5566287e5b15944 Author: Lijo Lazar Date: Mon Mar 11 10:32:01 2024 +0530 drm/amdgpu: Add nps info table to IP discovery Add support to fetch NPS info table in IP discovery table. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0cdb3f9740844b9d95ca413e3fcff11f81223ecf Author: Friedrich Vock Date: Tue May 14 09:06:38 2024 +0200 drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit The special case for VM passthrough doesn't check adev->nbio.funcs before dereferencing it. If GPUs that don't have an NBIO block are passed through, this leads to a NULL pointer dereference on startup. Signed-off-by: Friedrich Vock Fixes: 1bece222eabe ("drm/amdgpu: Clear doorbell interrupt status for Sienna Cichlid") Cc: Alex Deucher Cc: Christian König Acked-by: Christian König Signed-off-by: Alex Deucher commit ce798376ef6764de51d8f4684ae525b55df295fa Author: Lijo Lazar Date: Fri May 10 13:30:34 2024 +0530 drm/amdgpu: Fix memory range calculation Consider the 16M reserved region also before range calculation for GMC 9.4.3 SOCs. Fixes: a433f1f59484 ("drm/amdgpu: Initialize memory ranges for GC 9.4.3") Signed-off-by: Lijo Lazar Acked-by: Christian König Reviewed-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b6420021e17e262c57bb289d0556ee181b014f9c Author: Lijo Lazar Date: Thu May 9 14:14:10 2024 +0530 drm/amd/pm: Fix aldebaran pcie speed reporting Fix the field definitions for LC_CURRENT_DATA_RATE. Fixes: c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 73fbc3e00003fb8d84eb41f708f4b74ca9930237 Author: Likun Gao Date: Sun Apr 7 06:08:25 2024 +0800 drm/amdgpu: enable gfx cgcg&cgls for gfx v12_0_0 Enable GFX CGCG and CGLS for gfx version 12.0.0. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 75125e6b4c204129ab73e95d7fbfcd5a26c5b92c Author: Sonny Jiang Date: Mon Oct 16 16:49:53 2023 -0400 drm/amdgpu/jpeg5: enable power gating Enable PG on JPEG5 Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 2531e5dced848e60dbe9597f8a87dabf5a947687 Author: Mario Limonciello Date: Wed May 8 20:55:27 2024 -0500 drm/amd/display: Drop pixel_clock_mhz The pixel_clock_mhz property is populated in amdgpu_dm when Freesync is setup, but it is not used anywhere in amdgpu_dm. Remove the dead code. Cc: chiahsuan.chung@amd.com Signed-off-by: Mario Limonciello Reviewed-by: Tom Chung Signed-off-by: Alex Deucher commit ef5715846283e9ea6031d773e3c772034f4879f4 Author: Likun Gao Date: Mon Apr 1 16:57:33 2024 +0800 drm/amdgpu: support imu for gc 12_0_0 Support IMU for ASIC with GC 12.0.0 Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 74ab6253dc077263a61bebfbdd3766b5c11e94be Author: Asad Kamal Date: Mon May 13 19:37:21 2024 +0800 drm/amd/pm: Use gpu_metrics_v1_6 for SMUv13.0.6 Use gpu_metrics_v1_6 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 00dedab07b52ca16107e82ce5ca7caaaedf6a417 Author: Asad Kamal Date: Mon May 13 19:18:00 2024 +0800 drm/amd/pm: Add gpu_metrics_v1_6 Add new gpu_metrics_v1_6 to acquire accumulated throttler residencies Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c02c1960c93eede587576625a1221205a68a904f Author: Ma Jun Date: Fri May 10 15:01:59 2024 +0800 drm/amdgpu/pm: Fix the null pointer dereference for smu7 optimize the code to avoid pass a null pointer (hwmgr->backend) to function smu7_update_edc_leakage_table. Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 01b32973367bbcd12ef38f7a9fbed3a0f1603b6e Author: Ma Jun Date: Mon May 13 13:42:20 2024 +0800 drm/amdgpu: Remove dead code in amdgpu_ras_add_mca_err_addr Remove dead code in amdgpu_ras_add_mca_err_addr Signed-off-by: Ma Jun Reviewed-by: YiPeng Chai Signed-off-by: Alex Deucher commit d1a6bfff94010ecdda469bd9d6580982491aedca Author: Ma Jun Date: Sat May 11 16:08:06 2024 +0800 drm/amdgpu: Fix null pointer dereference to bo Check bo before using it Signed-off-by: Ma Jun Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ff422eb7a91ae2ce313e207015c10284eca8e107 Author: Marcelo Mendes Spessoto Junior Date: Fri May 10 21:02:02 2024 -0300 drm/amd/display: fix documentation warnings for mpc.h Fix most of the display documentation compile warnings by documenting struct mpc_funcs functions in dc/inc/hw/mpc.h file. Remove the following warnings: ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'read_mpcc_state' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'mpc_init_single_inst' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_mpcc_for_dpp_from_secondary' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_mpcc_for_dpp' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'wait_for_idle' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'assert_mpcc_idle_before_connect' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'init_mpcc_list_from_hw' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_denorm' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_denorm_clamp' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_output_csc' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_ocsc_default' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_output_gamma' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'power_on_mpc_mem_pwr' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_dwb_mux' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'disable_dwb_mux' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'is_dwb_idle' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_out_rate_control' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_gamut_remap' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_1dlut' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_shaper' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'acquire_rmu' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_3dlut' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'release_rmu' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_mpc_out_mux' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_bg_color' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_mpc_mem_lp_mode' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'set_movable_cm_location' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'update_3dlut_fast_load_select' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'get_3dlut_fast_load_status' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'populate_lut' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_lut_read_write_control' not described in 'mpc_funcs' ./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:579: warning: Function parameter or struct member 'program_lut_mode' not described in 'mpc_funcs' Fixes: b8c1c3a82e75 ("Documentation/gpu: Add kernel doc entry for MPC") Closes: https://lore.kernel.org/linux-next/20240130134954.04fcf763@canb.auug.org.au/ Reported-by: Stephen Rothwell Tested-by: Stephen Rothwell Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit 4488cd671c77d155bed3341925e16c5f1cbc2b22 Author: shaoyunl Date: Wed May 8 21:32:58 2024 -0400 drm/amdgpu: enable unmapped doorbell handling basic mode on mes 12 This reverts commit fcc5df722dbc47c3a84386a1c70647cfe153e65d. Signed-off-by: shaoyunl Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 85cb9d603953d77de5cb311d229a79c439ff6bfb Author: Dmitry Baryshkov Date: Sun May 12 02:00:24 2024 +0300 drm/panel: lg-sw43408: use new streamlined MIPI DSI API Use newer mipi_dsi_*_multi() functions in order to simplify and cleanup panel's prepare() and unprepare() functions. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-7-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-7-e31ca14d102e@linaro.org commit 67ba7a82d99a8a8b4bcc1b8124b5640c63dd51bf Author: Dmitry Baryshkov Date: Sun May 12 02:00:23 2024 +0300 drm/panel: novatek-nt36672e: use wrapped MIPI DCS functions Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to simplify driver's init/exit code. This also includes passing context to the init_sequence() function instead of passing the DSI device. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-6-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-6-e31ca14d102e@linaro.org commit 0f43988fb9c1c0a0c2f5ccf2d1bdb914f6e4e79b Author: Dmitry Baryshkov Date: Sun May 12 02:00:22 2024 +0300 drm/panel: innolux-p079zca: use mipi_dsi_dcs_nop_multi() Remove conditional code and use mipi_dsi_dcs_nop_multi() wrapper to simplify driver code. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-5-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-5-e31ca14d102e@linaro.org commit 510ba36e86eeb3ca89326dd51da32806e1ede693 Author: Dmitry Baryshkov Date: Sun May 12 02:00:21 2024 +0300 drm/panel: ilitek-ili9882t: use wrapped MIPI DCS functions Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to simplify driver's init/exit code. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-4-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-4-e31ca14d102e@linaro.org commit 91329f921283b995ac125a0c6e61be0c1399f66f Author: Dmitry Baryshkov Date: Sun May 12 02:00:20 2024 +0300 drm/panel: boe-tv101wum-nl6: use wrapped MIPI DCS functions Remove conditional code and always use mipi_dsi_dcs_*multi() wrappers to simplify driver's init/exit code. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-3-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-3-e31ca14d102e@linaro.org commit f79d6d28d8fe77b14beeaebe5393d9f294f8d09d Author: Dmitry Baryshkov Date: Sun May 12 02:00:19 2024 +0300 drm/mipi-dsi: wrap more functions for streamline handling Follow the pattern of mipi_dsi_dcs_*_multi() and wrap several existing MIPI DSI functions to use the context for processing. This simplifies and streamlines driver code to use simpler code pattern. Note, msleep function is also wrapped in this way as it is frequently called inbetween other mipi_dsi_dcs_*() functions. Signed-off-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-2-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-2-e31ca14d102e@linaro.org commit 51f9183e4af8c7f00e81180cbb9ee4a98a0f0aa1 Author: Dmitry Baryshkov Date: Sun May 12 02:00:18 2024 +0300 drm/panel: lg-sw43408: add missing error handling Add missing error handling for the mipi_dsi_ functions that actually return error code instead of silently ignoring it. Fixes: 069a6c0e94f9 ("drm: panel: Add LG sw43408 panel driver") Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240512-dsi-panels-upd-api-v2-1-e31ca14d102e@linaro.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240512-dsi-panels-upd-api-v2-1-e31ca14d102e@linaro.org commit 844f3228d225d25af8a21a7e1554d78c20823a37 Author: José Roberto de Souza Date: Fri May 10 08:01:08 2024 -0700 drm/xe: Replace RING_START_UDW by u64 RING_START Other u64 registers are printed in a single line so RING_START needs to follow that too. As there is no upstream decoder tool parsing RING_START this will not break any decoder application. Cc: Niranjana Vishwanathapura Cc: Matt Roper Signed-off-by: José Roberto de Souza Reviewed-by: Niranjana Vishwanathapura Link: https://patchwork.freedesktop.org/patch/msgid/20240510150108.80679-1-jose.souza@intel.com commit 46c131986030d48c64a1df43b8512db168a8d8b0 Author: Thomas Zimmermann Date: Mon May 13 14:51:15 2024 +0200 drm/mgag200: Use drm_connector_helper_get_modes() Mgag200's .get_modes() function is identical to the common helper. Use the latter. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-11-tzimmermann@suse.de commit 66d58ec0bc659fafcda962a5678dbb3f061d7359 Author: Thomas Zimmermann Date: Mon May 13 14:51:14 2024 +0200 drm/mgag200: Acquire I/O-register lock in DDC code The modeset lock protects the DDC code from concurrent modeset operations, which use the same registers. Move that code from the connector helpers into the DDC helpers .pre_xfer() and .post_xfer(). Both, .pre_xfer() and .post_xfer(), enclose the transfer of data blocks over the I2C channel in the internal I2C function bit_xfer(). Both calls are executed unconditionally if present. Invoking DDC transfers from any where within the driver now takes the lock. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-10-tzimmermann@suse.de commit b7e04af37edc5b6fd9a5aa206ca4dc73346c688b Author: Thomas Zimmermann Date: Mon May 13 14:51:13 2024 +0200 drm/mgag200: Rename struct i2c_algo_bit_data callbacks Align the names of the algo-bit helpers with mgag200's convention of using an mgag200 prefix plus the struct's name plus the callback's name for such function symbols. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-9-tzimmermann@suse.de commit ddadc87f14986886d0d9934219644a07409ac313 Author: Thomas Zimmermann Date: Mon May 13 14:51:12 2024 +0200 drm/mgag200: Rename mgag200_i2c.c to mgag200_ddc.c Rename the source file according to its content. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-8-tzimmermann@suse.de commit 814ebf50bb284c72ae10bedf36b81ceb680030eb Author: Thomas Zimmermann Date: Mon May 13 14:51:11 2024 +0200 drm/mgag200: Replace struct mga_i2c_chan with struct mgag200_ddc Rename struct mga_i2c_chan to struct mgag200_ddc, define it in the source file mgag200_i2c.c, and reorder its fields. Rename all related variables from i2c to ddc. Also rename the i2c adapter accordingly. Using the term 'ddc' documents the purpose of the code clearly. The old term 'i2c' could refer to any functionality on an i2c bus. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-7-tzimmermann@suse.de commit 21cd078519ed10ad32d603982e80a3830e5d9236 Author: Thomas Zimmermann Date: Mon May 13 14:51:10 2024 +0200 drm/mgag200: Inline mgag200_i2c_init() The function mgag200_i2c_init() is an internal helper that sets up the i2c data structure. Inline its code into the only caller. Rearrange the individual steps to separate among i2c algorithm, adapter and fields in struct mga_i2c_chan. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-6-tzimmermann@suse.de commit f2e9952449c07ed324b39c7b86a6369c16eb3d18 Author: Thomas Zimmermann Date: Mon May 13 14:51:09 2024 +0200 drm/mgag200: Allocate instance of struct mga_i2c_chan dynamically Allocate instances of struct mga_i2c_chan in mgag200_ddc_create() and return a pointer to the contained i2c adapter. The callers of the function are now independent from struct mga_i2c_chan. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-5-tzimmermann@suse.de commit 23368d7b9c1a7d7f0b1435f69a3bee12d836b2ec Author: Thomas Zimmermann Date: Mon May 13 14:51:08 2024 +0200 drm/mgag200: Store pointer to struct mga_device in struct mga_i2c_chan Avoid upcasting to struct mga_device in i2c code by storing the pointer directly. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-4-tzimmermann@suse.de commit eb1ae34e48a09b7a1179c579aed042b032e408f4 Author: Thomas Zimmermann Date: Mon May 13 14:51:07 2024 +0200 drm/mgag200: Bind I2C lifetime to DRM device Managed cleanup with devm_add_action_or_reset() will release the I2C adapter when the underlying Linux device goes away. But the connector still refers to it, so this cleanup leaves behind a stale pointer in struct drm_connector.ddc. Bind the lifetime of the I2C adapter to the connector's lifetime by using DRM's managed release. When the DRM device goes away (after the Linux device) DRM will first clean up the connector and then clean up the I2C adapter. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Fixes: b279df242972 ("drm/mgag200: Switch I2C code to managed cleanup") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v6.0+ Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-3-tzimmermann@suse.de commit ecde5db1598aecab54cc392282c15114f526f05f Author: Thomas Zimmermann Date: Mon May 13 14:51:06 2024 +0200 drm/mgag200: Set DDC timeout in milliseconds Compute the i2c timeout in jiffies from a value in milliseconds. The original values of 2 jiffies equals 2 milliseconds if HZ has been configured to a value of 1000. This corresponds to 2.2 milliseconds used by most other DRM drivers. Update mgag200 accordingly. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Fixes: 414c45310625 ("mgag200: initial g200se driver (v2)") Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: dri-devel@lists.freedesktop.org Cc: # v3.5+ Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-2-tzimmermann@suse.de commit 007ed70831426d4cc108d879d688de6b8e3e6d45 Author: Nirmoy Das Date: Thu May 16 17:14:03 2024 +0200 drm/i915/selftests: Set always_coherent to false when reading from CPU Commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.") was not complete as for non LLC sharing platforms cpu read can happen from LLC which probably doesn't have the latest changes made by GPU. Cc: Andi Shyti Cc: Janusz Krzysztofik Cc: Jonathan Cavitt Fixes: 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.") Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240516151403.2875-1-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit a17b9f590f6ec2b9f1b12b1db3bf1d181de6b272 Author: Rafael Beims Date: Fri May 10 13:04:58 2024 +0200 wifi: mwifiex: Fix interface type change When changing the interface type we also need to update the bss_num, the driver private data is searched based on a unique (bss_type, bss_num) tuple, therefore every time bss_type changes, bss_num must also change. This fixes for example an issue in which, after the mode changed, a wireless scan on the changed interface would not finish, leading to repeated -EBUSY messages to userspace when other scan requests were sent. Fixes: c606008b7062 ("mwifiex: Properly initialize private structure on interface type changes") Cc: stable@vger.kernel.org Signed-off-by: Rafael Beims Signed-off-by: Francesco Dolcini Signed-off-by: Kalle Valo Link: https://msgid.link/20240510110458.15475-1-francesco@dolcini.it commit 83d9b54ee5d4c12d00f2cbf71d827e31994c5a6c Author: Ajay Singh Date: Tue May 14 17:51:24 2024 +0200 wifi: wilc1000: read MAC address from fuse at probe The default netdev interface exposed by WILC1000 is registered at probe, but the chip mac address is not known until ndo_open, which will load and start chip firmware and then retrieve stored MAC address from it. As a consequence, the interface has uninitialized value (00:00:00:00:00) until a user brings up the interface. Fix MAC address at probe by setting the following steps: - at probe, read MAC address directly from fuse - whenever a new netdevice is created, apply saved mac address (which can be a user-provided address, or the eFuse Mac address if no address has been passed by user) - whenever an interface is brought up for the first time (and so the firmware is loaded and started), enforce netdevice mac address to the chip (in case user has changed it) Reported-by: Heiko Thiery Closes: https://lore.kernel.org/netdev/CAEyMn7aV-B4OEhHR4Ad0LM3sKCz1-nDqSb9uZNmRWR-hMZ=z+A@mail.gmail.com/T/ Signed-off-by: Ajay Singh Co-developed-by: Alexis Lothoré Signed-off-by: Alexis Lothoré Tested-by: Heiko Thiery Signed-off-by: Kalle Valo Link: https://msgid.link/20240514-mac_addr_at_probe-v2-6-afef09f1cd10@bootlin.com commit a5d6b1d453a149e70452d5e69320db04afb520e2 Author: Alexis Lothoré Date: Tue May 14 17:51:23 2024 +0200 wifi: wilc1000: make sdio deinit function really deinit the sdio card In order to be able to read raw registers (eg the nv mac address) in wilc1000 during probe before the firmware is loaded and running, we need to run the basic sdio functions initialization, but then we also need to properly deinitialize those right after, to preserve the current driver behavior (keeping the chip idle/unconfigured until the corresponding interface is brought up). Calling wilc_sdio_deinit in its current form is not enough because it merely resets an internal flag. Implement a deinit sequence which symmetrically reset all steps performed in wilc_sdio_init (only for parts activating/deactivating features, for the sake of simplicity, let's ignore blocks size configuration reset) Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240514-mac_addr_at_probe-v2-5-afef09f1cd10@bootlin.com commit 59cf9277c1fe6f8a72af83bf4a1d9b3f22124750 Author: Alexis Lothoré Date: Tue May 14 17:51:22 2024 +0200 wifi: wilc1000: add function to read mac address from eFuse wilc driver currently reads and sets mac address by firmware calls. It means that we can not access mac address if no interface has been brought up (so firmware is up and running). Another way to get mac address is to read it directly from eFUSE. Add a function helper to read the mac address written in eFuse, without firmware assistance Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240514-mac_addr_at_probe-v2-4-afef09f1cd10@bootlin.com commit 5f1191ed386cf5d21eb82195d252b9ff9549db09 Author: Alexis Lothoré Date: Tue May 14 17:51:21 2024 +0200 wifi: wilc1000: set wilc_set_mac_address parameter as const Any attempt to provide a const mac address to wilc_set_mac_address results in the following warning: warning: passing argument 2 of 'wilc_set_mac_address' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] [...] drivers/net/wireless/microchip/wilc1000/hif.h:170:52: note: expected 'u8 *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'a int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr); Instead of using an explicit cast each time we need provide a MAC address, set the function parameter as const Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240514-mac_addr_at_probe-v2-3-afef09f1cd10@bootlin.com commit ec99908906e9e322b3d0a34822be44a4659452de Author: Alexis Lothoré Date: Tue May 14 17:51:20 2024 +0200 wifi: wilc1000: register net device only after bus being fully initialized SDIO/SPI probes functions automatically add a default wlan interface on top of registered wiphy, through wilc_cfg80211_init which in turn calls wilc_netdev_ifc_init. However, bus is still not fully initialized when we register corresponding net device (for example we still miss some private driver data pointers), which for example makes it impossible to retrieve MAC address from chip (which is supposed to be set on net device before its registration) before registering net device. More generally, net device registration should not be done until driver has fully initialized everything and is ready to handle any operation on the net device. Prevent net device from being registered so early by doing it at the end of probe functions. Apply this logic to both sdio and spi buses. Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240514-mac_addr_at_probe-v2-2-afef09f1cd10@bootlin.com commit 6fe46d5c0a84471e06fa5b22d7f4253ebf98b071 Author: Alexis Lothoré Date: Tue May 14 17:51:19 2024 +0200 wifi: wilc1000: set net device registration as last step during interface creation net device registration is currently done in wilc_netdev_ifc_init but other initialization operations are still done after this registration. Since net device is assumed to be usable right after registration, it should be the very last step of initialization. Move netdev registration at the very end of wilc_netdev_ifc_init to let this function completely initialize netdevice before registering it. Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240514-mac_addr_at_probe-v2-1-afef09f1cd10@bootlin.com commit 3179338750d83877bbc491493032bdf192266ad9 Author: Cong Yang Date: Thu May 16 15:20:39 2024 +0800 drm/panel: himax-hx83102: Support for IVO t109nw41 MIPI-DSI panel The IVO t109nw41 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller which fits in nicely with the existing panel-himax-hx83102 driver. Hence, we add a new compatible with panel specific config. Signed-off-by: Cong Yang Reviewed-by: Douglas Anderson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240516072039.1287065-7-yangcong5@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-7-yangcong5@huaqin.corp-partner.google.com commit 4020c15c0fcac8d66818dceae7f39736cf9f16b0 Author: Cong Yang Date: Thu May 16 15:20:38 2024 +0800 dt-bindings: display: panel: Add compatible for IVO t109nw41 The IVO t109nw41 is a 11.0" WUXGA TFT LCD panel with himax-hx83102 controller. Hence, we add a new compatible with panel specific config. Signed-off-by: Cong Yang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240516072039.1287065-6-yangcong5@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-6-yangcong5@huaqin.corp-partner.google.com commit 1173db117634b42383cf5d397ddfd4d4860ae20b Author: Cong Yang Date: Thu May 16 15:20:37 2024 +0800 drm/panel: himax-hx83102: Support for BOE nv110wum-l60 MIPI-DSI panel The BOE nv110wum-l60 is a 11.0" WUXGA TFT LCD panel, use hx83102 controller which fits in nicely with the existing panel-himax-hx83102 driver. Hence, we add a new compatible with panel specific config. Signed-off-by: Cong Yang Reviewed-by: Douglas Anderson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240516072039.1287065-5-yangcong5@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-5-yangcong5@huaqin.corp-partner.google.com commit 4fd07f679bebc432c72fc2c5cea23e39098e00c2 Author: Cong Yang Date: Thu May 16 15:20:36 2024 +0800 dt-bindings: display: panel: Add compatible for BOE nv110wum-l60 The BOE nv110wum-l60 is a 11.0" WUXGA TFT LCD panel with himax-hx83102 controller. Hence, we add a new compatible with panel specific config. Signed-off-by: Cong Yang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20240516072039.1287065-4-yangcong5@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-4-yangcong5@huaqin.corp-partner.google.com commit 0ef94554dc40fbdb7e57ff90cd1e7fa71e1e89fd Author: Cong Yang Date: Thu May 16 15:20:35 2024 +0800 drm/panel: himax-hx83102: Break out as separate driver The Starry HX83102 based mipi panel should never have been part of the boe tv101wum-n16 driver. Discussion with Doug and Linus in V1 [1], we need a separate driver to enable the hx83102 controller. In hx83102 driver, add DSI commands as macros. So it can add some panels with same control model in the future. In the old boe-tv101wum-nl6 driver inital cmds was invoked at the end of prepare() function , and call 0x11 and 0x29 at end of inital. For himax-hx83102 driver, we move 0x11 and 0x29 cmds invoked at prepare() function. Note:0x11 is mipi_dsi_dcs_exit_sleep_mode 0x29 is mipi_dsi_dcs_set_display_on [1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=zBQJUC4CB2wj4s1h6n6aSAZQvdMV95r3zRUw@mail.gmail.com Signed-off-by: Cong Yang Reviewed-by: Douglas Anderson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240516072039.1287065-3-yangcong5@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-3-yangcong5@huaqin.corp-partner.google.com commit eba54e9c4483b585f6e2b9dd2472eb110417331b Author: Cong Yang Date: Thu May 16 15:20:34 2024 +0800 dt-bindings: display: panel: Add himax hx83102 panel bindings In V1, discussed with Doug and Linus [1], we need break out as separate driver for the himax83102-j02 controller. Beacuse "starry,himax83102-j02" and in this series "BOE nv110wum-l60" "IVO t109nw41" panels use same controller, they have some common CMDS. So add new documentation for this panels. For himax83102-j02 controller, no need 3v3 supply, so remove it. [1]: https://lore.kernel.org/all/CACRpkdbzYZAS0=zBQJUC4CB2wj4s1h6n6aSAZQvdMV95r3zRUw@mail.gmail.com Signed-off-by: Cong Yang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240516072039.1287065-2-yangcong5@huaqin.corp-partner.google.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240516072039.1287065-2-yangcong5@huaqin.corp-partner.google.com commit ed61863debb2df0856524b5c61d2a7f7731c2e83 Author: Lingbo Kong Date: Thu May 16 11:30:44 2024 +0300 wifi: ath12k: fix ack signal strength calculation Currently, the calculation of ack signal strength is incorrect. This is because before calculating the ack signal strength, ath12k need to determine whether the hardware and firmware support db2dbm. If the hardware and firmware support db2dbm, do not need to add noise floor, otherwise, need to add noise floor. Besides, the value of ack_rssi passed by firmware to ath12k should be a signed number, so change its type to s8. This patch affects QCN9274 and WCN7850 because they have the same issue. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Lingbo Kong Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240511030917.65811-1-quic_lingbok@quicinc.com commit 2f7ffb06d6c671e6a7379230f9de685f0663aa10 Author: Jacek Lawrynowicz Date: Wed May 15 13:30:06 2024 +0200 accel/ivpu: Replace wake_thread with kfifo Use kfifo to pass IRQ sources to IRQ thread so it will be possible to use IRQ thread by multiple IRQ types. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240515113006.457472-4-jacek.lawrynowicz@linux.intel.com commit 8a27ad81f7d3a4bc30e00e334a369b69c5f8da90 Author: Wachowski, Karol Date: Wed May 15 13:30:05 2024 +0200 accel/ivpu: Split IP and buttress code The NPU device consists of two parts: NPU buttress and NPU IP. Buttress is a platform specific part that integrates the NPU IP with the CPU. NPU IP is the platform agnostic part that does the inference. This separation enables support for multiple platforms using a single NPU IP, so for example NPU IP 37XX could be integrated into MTL and LNL platforms. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240515113006.457472-3-jacek.lawrynowicz@linux.intel.com commit 302d583211e22bb49c4f8c1fa1c3c5e809c0b077 Author: Wachowski, Karol Date: Wed May 15 13:30:04 2024 +0200 accel/ivpu: Split IP and buttress headers Move buttress registers to ivpu_hw_btrs_*_reg.h headers. This is an intermediate step before HW layer refactor. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240515113006.457472-2-jacek.lawrynowicz@linux.intel.com commit 63d8cb8fe3ddf74627003f99ad085887baf91e60 Author: Michal Wajdeczko Date: Thu May 16 13:05:46 2024 +0200 drm/xe/vf: Expose SR-IOV VF attributes to GT debugfs For debug purposes we might want to view actual VF configuration (including GGTT range, LMEM size, number of GuC contexts IDs or doorbells) and the negotiated ABI versions (with GuC and PF). Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-7-michal.wajdeczko@intel.com commit 25275c8a4f1be38494caae25cfbac116280a5351 Author: Michal Wajdeczko Date: Thu May 16 13:05:45 2024 +0200 drm/xe/vf: Custom hardware config load step if VF The VF drivers may immediately communicate with the GuC to obtain the hardware config since the firmware shall already be running. With the GuC communication established, VFs can also obtain the values of the runtime registers (fuses) from the PF driver. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-6-michal.wajdeczko@intel.com commit f2345ed5374ef964ff97e13e82f53b07c827b373 Author: Michal Wajdeczko Date: Thu May 16 13:05:44 2024 +0200 drm/xe/vf: Add support for VF to query its configuration The VF driver doesn't know which GuC firmware was loaded by the PF driver and must perform GuC ABI version handshake prior to sending any other H2G actions to the GuC to submit workloads. The VF driver also doesn't have access to the fuse registers and must rely on the runtime info, which includes values of the fuse registers, that the PF driver is exposing to the VFs. Add functions to cover that functionality. We will use these functions in upcoming patches. Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-5-michal.wajdeczko@intel.com commit c454f1a6b994e44e338ac837981441a298c941b8 Author: Michal Wajdeczko Date: Thu May 16 13:05:43 2024 +0200 drm/xe/guc: Add VF2GUC_QUERY_SINGLE_KLV to ABI In upcoming patches we will add support to the VF driver to read its configuration from the GuC using special H2G actions. Add necessary definitions to our GuC firmware ABI header. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-4-michal.wajdeczko@intel.com commit 769551c45c2b66b4d0bbe5a78aab4156f85c6331 Author: Michal Wajdeczko Date: Thu May 16 13:05:42 2024 +0200 drm/xe/guc: Add VF2GUC_VF_RESET to ABI The version negotiation between the VF driver and the GuC firmware must start with explicit soft reset of the GuC state initiated by the VF driver. Add VF2GUC action definitions to the ABI header. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-3-michal.wajdeczko@intel.com commit e158cf936114661044dface6da794437a91b53c4 Author: Michal Wajdeczko Date: Thu May 16 13:05:41 2024 +0200 drm/xe/guc: Add VF2GUC_MATCH_VERSION to ABI In upcoming patches we will add a version negotiation between the VF driver and the GuC firmware. Add necessary definitions to our GuC firmware ABI header. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240516110546.2216-2-michal.wajdeczko@intel.com commit e843e87abb909a042813497ab32f85a8eb03bcc8 Author: Philipp Zabel Date: Thu Jan 25 12:07:08 2024 +0100 drm/etnaviv: Disable SH_EU clock gating on VIPNano-Si+ Disable SH_EU clock gating for the VIPNano-Si+ NPU on i.MX8MP and for other affected core revisions. Taken from linux-imx lf-6.1.36-2.1.0, specifically [1]. [1] https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c#L2747-L2761 Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach commit 37d5927a856602c50fbbc3211e44dae2496fc816 Author: Philipp Zabel Date: Thu Jan 25 12:07:07 2024 +0100 drm/etnaviv: Turn etnaviv_is_model_rev() into a function Turn the etnaviv_is_model_rev() macro into a static inline function. Use the raw model number as a parameter instead of the chipModel_GCxxxx defines. This reduces synchronization requirements for the generated headers. For newer hardware, the GCxxxx names are not the correct model names anyway. For example, model 0x8000 NPUs are called VIPNano-QI/SI(+) by VeriSilicon. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach commit 608ff8e90b6ee4a9f2ef1c157ecf0e72d0a6e7fd Author: Philipp Zabel Date: Thu Jan 25 12:07:06 2024 +0100 drm/etnaviv: Update hardware headers from rnndb Update the state HI header from the rnndb commit 8d7ee714cfe2 ("Merge pull request #24 from pH5/unknown-3950"). Signed-off-by: Philipp Zabel Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach commit fda1a71a490bdc39b3a2ff75cf52fcd83ac122c2 Author: Krzysztof Kozlowski Date: Sat Mar 30 21:52:41 2024 +0100 drm/etnaviv: drop driver owner assignment Core in platform_driver_register() already sets the .owner, so driver does not need to. Whatever is set here will be anyway overwritten by main driver calling platform_driver_register(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach commit 364e039827ef628c650c21c1afe1c54d9c3296d9 Author: Arnd Bergmann Date: Tue Apr 30 09:48:09 2024 -0700 drm/i915/guc: avoid FIELD_PREP warning With gcc-7 and earlier, there are lots of warnings like In file included from :0:0: In function '__guc_context_policy_add_priority.isra.66', inlined from '__guc_context_set_prio.isra.67' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3292:3, inlined from 'guc_context_set_prio' at drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:3320:2: include/linux/compiler_types.h:399:38: error: call to '__compiletime_assert_631' declared with attribute error: FIELD_PREP: mask is not constant _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ ... drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2422:3: note: in expansion of macro 'FIELD_PREP' FIELD_PREP(GUC_KLV_0_KEY, GUC_CONTEXT_POLICIES_KLV_ID_##id) | \ ^~~~~~~~~~ Make sure that GUC_KLV_0_KEY is an unsigned value to avoid the warning. Fixes: 77b6f79df66e ("drm/i915/guc: Update to GuC version 69.0.3") Signed-off-by: Arnd Bergmann Reviewed-by: Michal Wajdeczko Signed-off-by: Julia Filipchuk Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20240430164809.482131-1-julia.filipchuk@intel.com commit 1c99d3d3edab25617afbb1592564d3ecc233bc5d Author: Michal Wajdeczko Date: Tue May 14 21:00:15 2024 +0200 drm/xe/pf: Expose PF monitor details via debugfs For debug purposes we might want to view statistics maintained by the PF driver about VFs activity. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-9-michal.wajdeczko@intel.com commit 335d62ade5feaa46082f8da755ffdc569ae51768 Author: Michal Wajdeczko Date: Tue May 14 21:00:14 2024 +0200 drm/xe/pf: Track adverse events notifications from GuC When thresholds used to monitor VFs activities are configured, then GuC may send GUC2PF_ADVERSE_EVENT messages informing the PF driver about exceeded thresholds. Start handling such messages. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-8-michal.wajdeczko@intel.com commit d5e12fffcc01b3a22157a9cd4a7474ee6355182e Author: Michal Wajdeczko Date: Tue May 14 21:00:13 2024 +0200 drm/xe/guc: Add GUC2PF_ADVERSE_EVENT to ABI When thresholds used to monitor VFs activities are configured, then GuC may send GUC2PF_ADVERSE_EVENT messages informing the PF driver about exceeded thresholds. Add necessary definitions to our GuC firmware ABI header. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-7-michal.wajdeczko@intel.com commit c4f5ded082bb9433b180dbfbb8352f92e319149b Author: Michal Wajdeczko Date: Tue May 14 21:00:12 2024 +0200 drm/xe/pf: Allow configuration of VF thresholds over debugfs Initial values of all thresholds used by the GuC to monitor VF's activity is zero (disabled) and we need to explicitly configure them per each VF. Expose additional attributes over debugfs. Definitions of all attributes are generated so we will not need to make any changes if new thresholds would be added to the set. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-6-michal.wajdeczko@intel.com commit 629df234bfe73dacb4bb0daa4bc2c14824dba159 Author: Michal Wajdeczko Date: Tue May 14 21:00:11 2024 +0200 drm/xe/pf: Introduce functions to configure VF thresholds The GuC firmware monitors VF's activity and notifies the PF driver once any configured threshold related to such activity is exceeded. Add functions to allow configuration of these thresholds per VF. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-5-michal.wajdeczko@intel.com commit 7aefee83fcdfe5a6a443b87650f3b6cb5721d3ad Author: Michal Wajdeczko Date: Tue May 14 21:00:10 2024 +0200 drm/xe/guc: Add support for threshold KLVs in to_string() helper Use MAKE_XE_GUC_KLV_THRESHOLDS_SET to generate missing conversion of threshold KLV keys to string. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-4-michal.wajdeczko@intel.com commit b1ce52fbf6ebfc3815773045856c695ce86ca679 Author: Michal Wajdeczko Date: Tue May 14 21:00:09 2024 +0200 drm/xe/guc: Introduce GuC KLV thresholds set The GuC firmware monitors VF's activity and notifies the PF driver once any configured threshold related to such activity is exceeded. The available thresholds are defined in the GuC ABI as part of the GuC VF Configuration KLVs. Threshold configurations performed by the PF driver and notifications sent by the GuC rely on the KLV keys, which are not zero-based and might not guarantee continuity. To simplify the driver code and eliminate the need to repeat very similar code for each threshold, introduce the threshold set macro that allows to generate required code based on unique threshold tag. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-3-michal.wajdeczko@intel.com commit e6946ea8fcb5625c46754435fef5523f12659c11 Author: Michal Wajdeczko Date: Tue May 14 21:00:08 2024 +0200 drm/xe/guc: Add more KLV helper macros In upcoming patches we will want to generate some of the KLV keys from other macros. Add MAKE_GUC_KLV_{KEY|LEN} macros for that and make sure they will correctly expand provided TAG parameter. Also fix PREP_GUC_KLV_TAG to also work correctly within other macros. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240514190015.2172-2-michal.wajdeczko@intel.com commit 7678f8bfd74c324bd10499cf1d05e5720d9449b2 Author: Karthikeyan Periyasamy Date: Tue May 14 12:04:12 2024 +0530 wifi: ath12k: use correct MAX_RADIOS The current value of the MAX_RADIOS definition is 3. This is incorrect because no device supports more than 2 radios. An incorrect MAX_RADIOS value can lead to: - unnecessary memory allocation for pdev related entities. - invalid pdev id validation. - Misconceptions for code readers. Therefore, modify the MAX_RADIOS definition as 2. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240514063412.3483723-3-quic_periyasa@quicinc.com commit 28bfc1c9c9d0e2165ee9e3b50793b8b463e52e01 Author: Karthikeyan Periyasamy Date: Tue May 14 12:04:11 2024 +0530 wifi: ath12k: remove duplicate definition of MAX_RADIOS Remove the duplicate definition of MAX_RADIOS from the core header file. No functional changes, compile tested only. Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240514063412.3483723-2-quic_periyasa@quicinc.com commit 3a29442a17413e9e64f00db3b98dbf911324cb86 Author: Kang Yang Date: Fri May 10 19:12:38 2024 +0800 wifi: ath12k: remove redundant peer delete for WCN7850 ath12k_mac_op_unassign_vif_chanctx() will do peer delete for WCN7850's monitor interface. But for host no need to do peer create/delete for monitor interface because firmware doesn't require it, QCN9274 is the same. Also, the first judgement is true only for WCN7850, so this logic won't affect QCN9274 at any time. So remove this peer delete. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240510111238.1113-1-quic_kangyang@quicinc.com commit 0ce9ab2785e4e9ca0752390d8e5ab65bd08f0e78 Author: Nithyanantham Paramasivam Date: Fri May 10 12:34:27 2024 +0530 wifi: ath12k: Fix tx completion ring (WBM2SW) setup failure We observe intermittent ping failures from the access point (AP) to station (STA) in any mode (AP-STA or Mesh) configured. Specifically, the transmission completion status is not received at tx completion ring id 4 (WBM2SW ring4) for the packets transmitted via TCL DATA ring id 3. This prevents freeing up tx descriptors and leads to buffer exhaustion. Currently, during initialization of the WBM2SW ring, we are directly mapping the ring number to the ring mask to obtain the ring mask group index. This approach is causing setup failures for WBM2SW ring 4. Similarly, during runtime, when receiving incoming transmission completion status, the validation of the ring number by mapping the interrupted ring mask. This is resulting in validation failure. Thereby preventing entry into the completion handler ath12k_dp_tx_completion_handler(). The existing design assumed that the ring numbers would always be sequential and could be directly mapped with the ring mask. However, this assumption does not hold true for WBM2SW ring 4. Therefore, modify the design such that, instead of mapping the ring number, the ring ID is mapped with the ring mask. According to this design: 1. During initialization of the WBM2SW ring, mapping the ring ID to the ring mask will ensure obtaining the correct ring mask group ID. 2. During runtime, validating the interrupted ring mask group ID within the transmission completion group is sufficient. This approach allows the ring ID to be derived from the interrupted ring mask and enables entry into the completion handler. 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 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Nithyanantham Paramasivam Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240510070427.206152-1-quic_nithp@quicinc.com commit 11abdbc22b1ad8fd0d41ca0742c79a153b2ade97 Author: Jani Nikula Date: Wed May 15 14:56:48 2024 +0300 drm/i915: pass dev_priv explicitly to CURSURFLIVE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CURSURFLIVE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/86aa98ad9f883681f5c2e3aba839d02d8591bfbf.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 79a0bcadb4ca1bd9af126faecf22999bef859b2d Author: Jani Nikula Date: Wed May 15 14:56:47 2024 +0300 drm/i915: pass dev_priv explicitly to CUR_CHICKEN Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CUR_CHICKEN register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/0bd1fa8ab346ba2bb40f435136b975b472ad2bc8.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3de9076e9f823ec8418c053c734d6e0fff30a635 Author: Jani Nikula Date: Wed May 15 14:56:46 2024 +0300 drm/i915: pass dev_priv explicitly to CUR_FBC_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CUR_FBC_CTL register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/f5e76f916ccf02aaf6016ffd476e9544817ac179.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2f757b4c401fbeffcd6d92e4a8b4b9b25f0070c7 Author: Jani Nikula Date: Wed May 15 14:56:45 2024 +0300 drm/i915: pass dev_priv explicitly to CURSIZE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CURSIZE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/521ca44416eb95dcfcf4bfbc32ac7f9371aeaf5d.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 224689e14a2223320aeeabea273fe5207b2e196a Author: Jani Nikula Date: Wed May 15 14:56:44 2024 +0300 drm/i915: pass dev_priv explicitly to CURPOS_ERLY_TPT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CURPOS_ERLY_TPT register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/2263b6412e983026990f7f6730b0b1141be4fd0f.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 99ab1a29dafe1a091ed57e82b74581b4bbad0c96 Author: Jani Nikula Date: Wed May 15 14:56:43 2024 +0300 drm/i915: pass dev_priv explicitly to CURPOS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CURPOS register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/ca229a123cb8a5d6a2970649a47236b3da1b02ad.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0edd2d251b7bdbf33f45924bb3c3cace38a00c42 Author: Jani Nikula Date: Wed May 15 14:56:42 2024 +0300 drm/i915: pass dev_priv explicitly to CURBASE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CURBASE register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/e552df69a4e6a3dbd562ba8c442d0219cda3bfd0.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 93160b2d1747500b5610569b549c8d7b7e9d0f21 Author: Jani Nikula Date: Wed May 15 14:56:41 2024 +0300 drm/i915: pass dev_priv explicitly to CURCNTR Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the CURCNTR register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/06bc681558c86f351ae596e9600133bb10ae4bdd.1715774156.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c740a18f62f5bbf2c88c3160d189704cbe001255 Author: Aloka Dixit Date: Wed May 8 13:29:12 2024 -0700 wifi: ath12k: skip sending vdev down for channel switch Remove the unnecessary WMI vdev down operation as firmware internally does so already as part of WMI vdev restart. Repeated vdev down results in a firmware crash during channel switch operation when multiple BSSID advertisements are enabled: ath12k_pci 0000:06:00.0: firmware crashed: MHI_CB_SYS_ERROR ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID ath12k_pci 0000:06:00.0: failed to set vdev 5 HE MU mode: -108 param_value 7b ath12k_pci 0000:06:00.0: failed to set he mode vdev 5 ath12k_pci 0000:06:00.0: failed to restart vdev 5: -108 ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID ath12k_pci 0000:06:00.0: failed to set vdev 4 HE MU mode: -108 param_value 7b ath12k_pci 0000:06:00.0: failed to set he mode vdev 4 ath12k_pci 0000:06:00.0: failed to restart vdev 4: -108 ath12k_pci 0000:06:00.0: failed to send WMI_VDEV_SET_PARAM_CMDID Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-10-quic_alokad@quicinc.com commit f27fbd76a98feca81688175985fbfa31bad8cd75 Author: Aloka Dixit Date: Wed May 8 13:29:11 2024 -0700 wifi: ath12k: add EMA beacon support Add new function ath12k_mac_setup_bcn_tmpl_ema() which retrieves a list of EMA (Enhanced Multi-BSSID Advertisements) beacon templates from mac80211 and sends all to firmware. Add support to send EMA configurations to firmware by adding a new parameter 'ema_params' in struct wmi_bcn_tmpl_cmd. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-9-quic_alokad@quicinc.com commit 8c6faa56bfb245a165820f46b8ea90e6ae1f24f5 Author: Aloka Dixit Date: Wed May 8 13:29:10 2024 -0700 wifi: ath12k: add MBSSID beacon support - A single beacon template is used for one multiple BSSID group as only one interface from group transmits the beacons. But firmware requires the host to send this template each time a nontransmitted interface is brought up. Hence, modify existing logic to retrieve the template from vif context of the transmitting interface. Also, firmware crashes if host sends a template for a nontransmitted interface which is already up, add a check to avoid this. - Set rsnie_present and wpaie_present fields for nontransmitted VAPs. - Send offset to the multiple BSSID element in the beacon template firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-8-quic_alokad@quicinc.com commit 9fd28936b641ab05ab244a85991e95c5be31e1a2 Author: Aloka Dixit Date: Wed May 8 13:29:09 2024 -0700 wifi: ath12k: refactor arvif security parameter configuration Configure security parameters in a separate function to make it easier to support setting the same for nontransmitted profiles. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-7-quic_alokad@quicinc.com commit 84edf47bcb31746a4070bc4783546132d855ed4b Author: Aloka Dixit Date: Wed May 8 13:29:08 2024 -0700 wifi: ath12k: configure MBSSID parameters in AP mode Include MBSSID parameters in WMI vdev up operation. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-6-quic_alokad@quicinc.com commit 51c47463543ef4f1f0cf2354527baa297a754995 Author: Aloka Dixit Date: Wed May 8 13:29:07 2024 -0700 wifi: ath12k: create a structure for WMI vdev up parameters Host needs to send multiple BSSID configurations to firmware for each vdev in ath12k_wmi_vdev_up() for AP mode. This function accepts individual input parameters hence any new argument will require changes to all callers. Most of these will use default value (0 or NULL). Create a structure for the function arguments and include objects with all members initialized to zero to minimize future changes. Tested-on : QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-5-quic_alokad@quicinc.com commit 5fbd97f25c4c62eba921b8bc13a45f0210437787 Author: Aloka Dixit Date: Wed May 8 13:29:06 2024 -0700 wifi: ath12k: rename MBSSID fields in wmi_vdev_up_cmd Rename trans_bssid to tx_vdev_bssid to make it similar to vdev_bssid. Rename profile_num to nontx_profile_cnt, and profile_idx to nontx_profile_idx which make it clear that these configurations correspond to nontransmitted MBSSID profiles. These members are currently unused in the driver. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-4-quic_alokad@quicinc.com commit ea68f1bba61632652f722e5979a8a853cfa55eff Author: Aloka Dixit Date: Wed May 8 13:29:05 2024 -0700 wifi: ath12k: configure MBSSID params in vdev create/start Configure multiple BSSID flags and vdev_id of the transmited profile in vdev create/start commands depending on the service bit WMI_TLV_SERVICE_MBSS_PARAM_IN_VDEV_START_SUPPORT. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-3-quic_alokad@quicinc.com commit 519a545cfee790024c623c7aacd165f7431773d5 Author: Aloka Dixit Date: Wed May 8 13:29:04 2024 -0700 wifi: ath12k: advertise driver capabilities for MBSSID and EMA Advertise the driver support for multiple BSSID (MBSSID) and enhanced multi-BSSID advertisements (EMA) by setting extended capabilities. Configure mbssid_max_interfaces and ema_max_profile_periodicity fields in structure wiphy which are used to advertise maximum number of interfaces and profile periodicity supported by the driver. Add new WMI fields to configure maximum vdev count supported for MBSSID and profile periodicity in case of EMA. Set WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET flag to allow firmware to track and update the DTIM counts for each nontransmitted profile. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aloka Dixit Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508202912.11902-2-quic_alokad@quicinc.com commit 97b7cbb7a3cbeee87ed82af67bca881ec8881d83 Author: Pradeep Kumar Chitrapu Date: Wed May 8 10:36:55 2024 -0700 wifi: ath12k: support SMPS configuration for 6 GHz Parse SMPS configuration from IEs and configure. Without this, SMPS is not enabled for 6 GHz band. This is disabled for WCN7850 as hardware does not support it. 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: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508173655.22191-7-quic_pradeepc@quicinc.com commit f0e61dc7ecf9a709d22265a17d553fd314e3f986 Author: Pradeep Kumar Chitrapu Date: Wed May 8 10:36:54 2024 -0700 wifi: ath12k: refactor SMPS configuration Move fetching SMPS value to a new function and use u16_get_bits to extract it from capabilities. This will help in extending the functionality when SMPS support in 6 GHz band gets added in subsequent patches. 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: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508173655.22191-6-quic_pradeepc@quicinc.com commit 112dbc6af807021ac65f46300d564163ec4710a9 Author: Pradeep Kumar Chitrapu Date: Wed May 8 10:36:53 2024 -0700 wifi: ath12k: add 6 GHz params in peer assoc command Currently A-MPDU aggregation parameters are not being configured during peer association for 6 GHz band. Hence, extract these parameters from station's capabilities received in association request and send to firmware. Without this, A-MPDU aggregation is not happening in 6 GHz band. 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 Co-developed-by: Avula Sri Charan Signed-off-by: Avula Sri Charan Signed-off-by: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508173655.22191-5-quic_pradeepc@quicinc.com commit 70e3be54bbddc39123b8785408fb9aeb8f822ab6 Author: Pradeep Kumar Chitrapu Date: Wed May 8 10:36:52 2024 -0700 wifi: ath12k: fix survey dump collection in 6 GHz When ath12k receives survey request, choose the 6 GHz band when enabled. Without this, survey requests do not include any 6 GHz band results, leading to failures in auto channel selection. 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: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508173655.22191-4-quic_pradeepc@quicinc.com commit c3c84a74bd797f76d7da036c9fef947d674bbc18 Author: Pradeep Kumar Chitrapu Date: Wed May 8 10:36:51 2024 -0700 wifi: ath12k: Correct 6 GHz frequency value in rx status The frequency in the rx status is currently being filled incorrectly for the 6 GHz band. The channel number received is invalid in this case, resulting in packet drops. Fix this issue by correcting the frequency calculation. 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 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508173655.22191-3-quic_pradeepc@quicinc.com commit 3745d7963cc34c08ee4dda4f3c81981e277f0d96 Author: Pradeep Kumar Chitrapu Date: Wed May 8 10:36:50 2024 -0700 wifi: ath12k: add channel 2 into 6 GHz channel list Add support for the 6 GHz channel 2 with center frequency 5935 MHz and operating class 136 per IEEE Std 802.11ax-2021, Table E-4. 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: Pradeep Kumar Chitrapu Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240508173655.22191-2-quic_pradeepc@quicinc.com commit 0f1bb41bf39695c84c83ce6f69e125b562d1d7ab Author: Tvrtko Ursulin Date: Tue May 14 15:59:39 2024 +0100 drm/i915: Support replaying GPU hangs with captured context image When debugging GPU hangs Mesa developers are finding it useful to replay the captured error state against the simulator. But due various simulator limitations which prevent replicating all hangs, one step further is being able to replay against a real GPU. This is almost doable today with the missing part being able to upload the captured context image into the driver state prior to executing the uploaded hanging batch and all the buffers. To enable this last part we add a new context parameter called I915_CONTEXT_PARAM_CONTEXT_IMAGE. It follows the existing SSEU configuration pattern of being able to select which context to apply against, paired with the actual image and its size. Since this is adding a new concept of debug only uapi, we hide it behind a new kconfig option and also require activation with a module parameter. Together with a warning banner printed at driver load, all those combined should be sufficient to guard against inadvertently enabling the feature. In terms of implementation we allow the legacy context set param to be used since that removes the need to record the per context data in the proto context, while still allowing flexibility of specifying context images for any context. Mesa MR using the uapi can be seen at: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27594 v2: * Fix whitespace alignment as per checkpatch. * Added warning on userspace misuse. * Rebase for extracting ce->default_state shadowing. v3: * Rebase for I915_CONTEXT_PARAM_LOW_LATENCY. Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin Cc: Carlos Santa Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Tested-by: Carlos Santa Signed-off-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20240514145939.87427-2-tursulin@igalia.com commit e1eb97c211859ed4a86f63be24c6723316450bcf Author: Tvrtko Ursulin Date: Tue May 14 15:59:38 2024 +0100 drm/i915: Shadow default engine context image in the context To enable adding override of the default engine context image let us start shadowing the per engine state in the context. Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin Cc: Carlos Santa Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20240514145939.87427-1-tursulin@igalia.com commit 60a2f25de7b8b785baee2932db932ae9a5b8c86d Merge: fbad43eccae5c 431c590c3ab04 Author: Tvrtko Ursulin Date: Thu May 16 07:33:01 2024 +0000 Merge drm/drm-next into drm-intel-gt-next Some display refactoring patches are needed in order to allow conflict- less merging. Signed-off-by: Tvrtko Ursulin commit 9aa8586063a465da986a39ef55e3e5c12140cde5 Author: Michal Wajdeczko Date: Mon May 6 20:41:21 2024 +0200 drm/xe/pf: Implement pci_driver.sriov_configure callback The PCI subsystem already exposes the "sriov_numvfs" attribute that users can use to enable or disable SR-IOV VFs. Add custom implementation of the .sriov_configure callback defined by the pci_driver to perform additional steps, including fair VFs provisioning with the resources, as required by our platforms. Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Cc: Badal Nilawar Cc: Rodrigo Vivi Reviewed-by: Piotr Piórkowski #v2 Reviewed-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20240506184121.2615-1-michal.wajdeczko@intel.com commit 2c3d1bd284c5141a85188f48e7f42112e81ffcd8 Author: Aradhya Bhatia Date: Wed May 15 15:21:33 2024 +0530 drm/panel: simple: Add Microtips Technology MF-103HIEB0GA0 panel Add support for Microtips Technology USA MF-103HIEB0GA0 10.25"[0], 1920x720, 8-bit TFT LCD with LVDS interface. Its a Dual-LVDS Panel and does not support touch. [0]: Panel Datasheet https://simplespec.microtipsusa.com/uploads/spec/datasheetFile/2660/13-103HIEB0GA0-S_V1.0_20211206.pdf Signed-off-by: Aradhya Bhatia Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240515095133.745492-7-a-bhatia1@ti.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240515095133.745492-7-a-bhatia1@ti.com commit f558d676cfbc388f2c3175c3c1f99c57902ea3c1 Author: Aradhya Bhatia Date: Wed May 15 15:21:32 2024 +0530 drm/panel: simple: Add Microtips Technology 13-101HIEBCAF0-C panel Add support for Microtips Technology USA 13-101HIECAF0-C 10.1", 1920x1200, 8-bit TFT LCD with LVDS interface, LED backlight and touch support (ILITEK 2511). [0]: Panel Datasheet https://simplespec.microtipsusa.com/uploads/spec/datasheetFile/2588/13-101HIEBCAF0-S_V1.1_20221104.pdf Signed-off-by: Aradhya Bhatia Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240515095133.745492-6-a-bhatia1@ti.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240515095133.745492-6-a-bhatia1@ti.com commit ac9b8b7fee6578015483c5f130bad78d368c00cd Author: Aradhya Bhatia Date: Wed May 15 15:21:31 2024 +0530 drm/panel: simple: Add Lincoln Tech Sol LCD185-101CT panel Add support for Lincoln Technology Solutions LCD185-101CT, 10.1", 1920x1200, 8-bit TFT LCD with LVDS interface, LED backlight and PCAP touch support (Goodix GT928). [0]: Panel Datasheet https://lincolntechsolutions.com/wp-content/uploads/2023/04/LCD185-101CTL1ARNTT_DS_R1.3.pdf Signed-off-by: Aradhya Bhatia Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240515095133.745492-5-a-bhatia1@ti.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240515095133.745492-5-a-bhatia1@ti.com commit 43f092d2540f7869ab5dc5a53ae1f76d44fc6293 Author: Aradhya Bhatia Date: Wed May 15 15:21:30 2024 +0530 dt-bindings: display: simple: Add Microtips & Lincolntech Dual-LVDS Panels Add the Microtips Technology USA's MF-101HIEBCAF0 10.1"[0] panel, MF-103HIEB0GA0 10.25"[1] panel, and Lincoln Technology Solutions' LCD185-101CT 10.1"[2] panel. Thes are all dual-lvds panels. Panel Links: [0]: https://simplespec.microtipsusa.com/uploads/spec/datasheetFile/2588/13-101HIEBCAF0-S_V1.1_20221104.pdf [1]: https://simplespec.microtipsusa.com/uploads/spec/datasheetFile/2660/13-103HIEB0GA0-S_V1.0_20211206.pdf [2]: https://lincolntechsolutions.com/wp-content/uploads/2023/04/LCD185-101CTL1ARNTT_DS_R1.3.pdf Signed-off-by: Aradhya Bhatia Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240515095133.745492-4-a-bhatia1@ti.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240515095133.745492-4-a-bhatia1@ti.com commit 37dbca37f3b53cb698798462f197db2637f6ab34 Author: Aradhya Bhatia Date: Wed May 15 15:21:29 2024 +0530 dt-bindings: vendor-prefixes: Add lincolntech Add document vendor prefix for Lincoln Technology Solutions (lincolntech). Signed-off-by: Aradhya Bhatia Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240515095133.745492-3-a-bhatia1@ti.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240515095133.745492-3-a-bhatia1@ti.com commit 71465a86296ab963bc120b5e32b9a19f69090e6f Author: Aradhya Bhatia Date: Wed May 15 15:21:28 2024 +0530 dt-bindings: vendor-prefixes: Add microtips Add document vendor prefix for Microtips Technology USA (microtips). Signed-off-by: Aradhya Bhatia Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20240515095133.745492-2-a-bhatia1@ti.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240515095133.745492-2-a-bhatia1@ti.com commit 6f6fd690de1aef476e631ac03779e7d1de3fe451 Author: Douglas Anderson Date: Tue May 14 10:20:59 2024 -0700 drm/panel: innolux-p079zca: Don't use a table for initting panels Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. We'll use the same concepts as the recently introduced mipi_dsi_generic_write_seq_multi() to make this clean/easy and also not bloat the driver too much. Measuring before/after this change: $ scripts/bloat-o-meter \ .../before/panel-innolux-p079zca.ko \ .../after/panel-innolux-p079zca.ko add/remove: 3/2 grow/shrink: 0/1 up/down: 2356/-1944 (412) Function old new delta innolux_p097pfg_init - 1772 +1772 innolux_p097pfg_init.d - 480 +480 innolux_panel_write_multi - 104 +104 innolux_panel_prepare 412 308 -104 .compoundliteral 480 - -480 innolux_p097pfg_init_cmds 1360 - -1360 Total: Before=5802, After=6214, chg +7.10% Note that, unlike some other drivers, we actually make this panel driver _bigger_ by using the new functions. This is because the innolux-p079zca panel driver didn't have as complex of a table and thus the old table was more efficient than the code. The bloat is still not giant (only 412 bytes). Also note that we can't direclty use mipi_dsi_generic_write_seq_multi() here because we need to deal with the crazy "nop" that this driver sends after all commands. This means that we have to write code that is "inspired" by the new macros. Since we're touching all the tables, let's also convert hex numbers to lower case as per kernel conventions. Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.9.I947e28c81f9ef7dcd3add6e193be72d6f8ea086f@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.9.I947e28c81f9ef7dcd3add6e193be72d6f8ea086f@changeid commit 95951654ca57786c658942a7c6f4471ef3f0d47e Author: Douglas Anderson Date: Tue May 14 10:20:58 2024 -0700 drm/panel: ili9882t: Don't use a table for initting panels Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. With the recently introduced mipi_dsi_dcs_write_seq_multi() this is not only clean/easy but also saves space. Measuring before/after this change: $ scripts/bloat-o-meter \ .../before/panel-ilitek-ili9882t.ko \ .../after/panel-ilitek-ili9882t.ko add/remove: 3/2 grow/shrink: 0/2 up/down: 6834/-8177 (-1343) Function old new delta starry_ili9882t_init - 6152 +6152 starry_ili9882t_init.d - 678 +678 ili9882t_disable.d - 4 +4 ili9882t_disable 260 228 -32 ili9882t_prepare 540 396 -144 .compoundliteral 681 - -681 starry_ili9882t_init_cmd 7320 - -7320 Total: Before=11928, After=10585, chg -11.26% Let's do the conversion. Since we're touching all the tables, let's also convert hex numbers to lower case as per kernel conventions. Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.8.I407b977f9508573103491df549dfaffc3688db13@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.8.I407b977f9508573103491df549dfaffc3688db13@changeid commit d6ddb6624a7fc4fc3d7750bccaf43c66b55beab9 Author: Douglas Anderson Date: Tue May 14 10:20:57 2024 -0700 drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. With the recently introduced mipi_dsi_dcs_write_seq_multi() this is not only clean/easy but also saves space. Measuring before/after this change: $ scripts/bloat-o-meter \ .../before/panel-boe-tv101wum-nl6.ko \ .../after/panel-boe-tv101wum-nl6.ko add/remove: 14/8 grow/shrink: 0/1 up/down: 27062/-31433 (-4371) Function old new delta inx_hj110iz_init - 7040 +7040 boe_tv110c9m_init - 6440 +6440 boe_init - 5916 +5916 starry_qfh032011_53g_init - 1944 +1944 starry_himax83102_j02_init - 1228 +1228 inx_hj110iz_init.d - 1040 +1040 boe_tv110c9m_init.d - 982 +982 auo_b101uan08_3_init - 944 +944 boe_init.d - 580 +580 starry_himax83102_j02_init.d - 512 +512 starry_qfh032011_53g_init.d - 180 +180 auo_kd101n80_45na_init - 172 +172 auo_b101uan08_3_init.d - 82 +82 auo_kd101n80_45na_init.d - 2 +2 auo_kd101n80_45na_init_cmd 144 - -144 boe_panel_prepare 592 440 -152 auo_b101uan08_3_init_cmd 1056 - -1056 starry_himax83102_j02_init_cmd 1392 - -1392 starry_qfh032011_53g_init_cmd 2256 - -2256 .compoundliteral 3393 - -3393 boe_init_cmd 7008 - -7008 boe_tv110c9m_init_cmd 7656 - -7656 inx_hj110iz_init_cmd 8376 - -8376 Total: Before=37297, After=32926, chg -11.72% Let's do the conversion. Since we're touching all the tables, let's also convert hex numbers to lower case as per kernel conventions. Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.7.Ib5030ab5cd41b4e08b1958bd7e51571725723008@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.7.Ib5030ab5cd41b4e08b1958bd7e51571725723008@changeid commit d6fcbec281a2ed16794fabea49d4ac93db2d2944 Author: Douglas Anderson Date: Tue May 14 10:20:56 2024 -0700 drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi() This is a mechanical conversion of the novatek-nt36672e driver to use the new mipi_dsi_dcs_write_seq_multi(). The new function is easier for clients to understand and using it also causes smaller code to be generated. Specifically: $ scripts/bloat-o-meter \ ...after/panel-novatek-nt36672e.ko \ ...ctx/panel-novatek-nt36672e.ko add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-988 (-988) Function old new delta nt36672e_1080x2408_60hz_init 6236 5248 -988 Total: Before=10651, After=9663, chg -9.28% Cc: Ritesh Kumar Reviewed-by: Dmitry Baryshkov Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.6.I3c08a7d02c467d2bc88da14e513ea4c8649fce45@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.6.I3c08a7d02c467d2bc88da14e513ea4c8649fce45@changeid commit 966e397e4f6032b73438f8d775756541513e7daf Author: Douglas Anderson Date: Tue May 14 10:20:55 2024 -0700 drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() The current mipi_dsi_*_write_seq() macros are non-intutitive because they contain a hidden "return" statement that will return out of the _caller_ of the macro. Let's mark them as deprecated and instead introduce some new macros that are more intuitive. These new macros are less optimal when an error occurs but should behave more optimally when there is no error. Specifically these new macros cause smaller code to get generated and the code size savings (less to fetch from RAM, less cache space used, less RAM used) are important. Since the error case isn't something we need to optimize for and these new macros are easier to understand and more flexible, they should be used. After converting to use these new functions, one example shows some nice savings while also being easier to understand. $ scripts/bloat-o-meter \ ...after/panel-novatek-nt36672e.ko \ ...ctx/panel-novatek-nt36672e.ko add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-988 (-988) Function old new delta nt36672e_1080x2408_60hz_init 6236 5248 -988 Total: Before=10651, After=9663, chg -9.28% Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.5.Ie94246c30fe95101e0e26dd5f96e976dbeb8f242@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.5.Ie94246c30fe95101e0e26dd5f96e976dbeb8f242@changeid commit 3b724909a380fddb44dfa0072fc459c698a52658 Author: Douglas Anderson Date: Tue May 14 10:20:54 2024 -0700 drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq() Through a cooperative effort between Hsin-Yi Wang and Dmitry Baryshkov, we have realized the dev_err() in the mipi_dsi_*_write_seq() macros was causing quite a bit of bloat to the kernel. Let's hoist this call into drm_mipi_dsi.c by adding a "chatty" version of the functions that includes the print. While doing this, add a bit more comments to these macros making it clear that they print errors and also that they return out of _the caller's_ function. Without any changes to clients this gives a nice savings. Specifically the macro was inlined and thus the error report call was inlined into every call to mipi_dsi_dcs_write_seq() and mipi_dsi_generic_write_seq(). By using a call to a "chatty" function, the usage is reduced to one call in the chatty function and a function call at the invoking site. Building with my build system shows one example: $ scripts/bloat-o-meter \ .../before/panel-novatek-nt36672e.ko \ .../after/panel-novatek-nt36672e.ko add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-4404 (-4404) Function old new delta nt36672e_1080x2408_60hz_init 10640 6236 -4404 Total: Before=15055, After=10651, chg -29.25% Note that given the change in location of the print it's harder to include the "cmd" in the printout for mipi_dsi_dcs_write_seq() since, theoretically, someone could call the new chatty function with a zero-size array and it would be illegal to dereference data[0]. There's a printk format to print the whole buffer and this is probably more useful for debugging anyway. Given that we're doing this for mipi_dsi_dcs_write_seq(), let's also print the buffer for mipi_dsi_generic_write_seq() in the error case. It should be noted that the current consensus of DRM folks is that the mipi_dsi_*_write_seq() should be deprecated due to the non-intuitive return behavior. A future patch will formally mark them as deprecated and provide an alternative. Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.4.Id15fae80582bc74a0d4f1338987fa375738f45b9@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.4.Id15fae80582bc74a0d4f1338987fa375738f45b9@changeid commit 7d3f6acaf87c7db6dcd868694a2f65e7040478dc Author: Douglas Anderson Date: Tue May 14 10:20:53 2024 -0700 drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints We really don't expect these errors to be printed over and over again. When a driver hits the error it should bail out. Just use a normal error print. This gives a nice space savings for users of these functions: $ scripts/bloat-o-meter \ .../before/panel-novatek-nt36672e.ko \ .../after/panel-novatek-nt36672e.ko add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-16760 (-16760) Function old new delta nt36672e_1080x2408_60hz_init 17080 10640 -6440 nt36672e_1080x2408_60hz_init._rs 10320 - -10320 Total: Before=31815, After=15055, chg -52.68% Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.3.I9982cd5d8014de7a4513f5619f66f88da49ce4ec@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.3.I9982cd5d8014de7a4513f5619f66f88da49ce4ec@changeid commit 24acbcce5cc673886c2f4f9b3f6f89a9c6a53b7e Author: Douglas Anderson Date: Tue May 14 10:20:52 2024 -0700 drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq() The mipi_dsi_generic_write_seq() macro makes a call to mipi_dsi_generic_write() which returns a type ssize_t. The macro then stores it in an int and checks to see if it's negative. This could theoretically be a problem if "ssize_t" is larger than "int". To see the issue, imagine that "ssize_t" is 32-bits and "int" is 16-bits, you could see a problem if there was some code out there that looked like: mipi_dsi_generic_write_seq(dsi, <32768 bytes as arguments>); ...since we'd get back that 32768 bytes were transferred and 32768 stored in a 16-bit int would look negative. Though there are no callsites where we'd actually hit this (even if "int" was only 16-bit), it's cleaner to make the types match so let's fix it. Fixes: a9015ce59320 ("drm/mipi-dsi: Add a mipi_dsi_dcs_write_seq() macro") Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.2.Iadb65b8add19ed3ae3ed6425011beb97e380a912@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.2.Iadb65b8add19ed3ae3ed6425011beb97e380a912@changeid commit 0b03829fdece47beba9ecb7dbcbde4585ee3663e Author: Douglas Anderson Date: Tue May 14 10:20:51 2024 -0700 drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() The mipi_dsi_dcs_write_seq() macro makes a call to mipi_dsi_dcs_write_buffer() which returns a type ssize_t. The macro then stores it in an int and checks to see if it's negative. This could theoretically be a problem if "ssize_t" is larger than "int". To see the issue, imagine that "ssize_t" is 32-bits and "int" is 16-bits, you could see a problem if there was some code out there that looked like: mipi_dsi_dcs_write_seq(dsi, cmd, <32767 bytes as arguments>); ...since we'd get back that 32768 bytes were transferred and 32768 stored in a 16-bit int would look negative. Though there are no callsites where we'd actually hit this (even if "int" was only 16-bit), it's cleaner to make the types match so let's fix it. Fixes: 2a9e9daf7523 ("drm/mipi-dsi: Introduce mipi_dsi_dcs_write_seq macro") Reviewed-by: Neil Armstrong Reviewed-by: Linus Walleij Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20240514102056.v5.1.I30fa4c8348ea316c886ef8a522a52fed617f930d@changeid Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240514102056.v5.1.I30fa4c8348ea316c886ef8a522a52fed617f930d@changeid commit 75fe5f347167aceb8b78b9f6ad0ba01a38a34e16 Author: Michal Wajdeczko Date: Tue May 7 18:57:57 2024 +0200 drm/xe/pf: Don't advertise support to enable VFs if not ready Even if we have not enabled SR-IOV support using the platform specific has_sriov flag, the hardware may still report SR-IOV capability and the PCI layer may wrongly advertise driver support to enable VFs. Explicitly reset the number of supported VFs to zero to avoid confusion. Applications may read the /sys/bus/pci/devices/.../sriov_totalvfs prior to enabling VFs using the sriov_numvfs to check if such an operation is possible. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240507165757.2835-1-michal.wajdeczko@intel.com commit d2c4b1db1c4f9e59ccb2d65aa1840420a059bf46 Author: Jani Nikula Date: Fri May 10 14:22:21 2024 +0300 drm/i915/pciids: don't include RPL-U PCI IDs in RPL-P It's confusing for INTEL_RPLP_IDS() to include INTEL_RPLU_IDS(). Even if we treat them the same elsewhere, the lists of PCI IDs should not. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/28fe0910efb93a28c400728af14beff015667f42.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7858cc0b55e3d44cb0a5a033207c78fc2d5f4df9 Author: Jani Nikula Date: Fri May 10 14:22:20 2024 +0300 drm/i915/pciids: remove 12 from INTEL_TGL_IDS() Most other PCI ID macros do not encode the gen in the name. Follow suit for TGL. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/044a5c553dc4564431bbef197d5e2dd085624fc2.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit bfbda472276704d7b7f065a646a67b30b7a89730 Author: Jani Nikula Date: Fri May 10 14:22:19 2024 +0300 drm/i915/pciids: remove 11 from INTEL_ICL_IDS() Most other PCI ID macros do not encode the gen in the name. Follow suit for ICL. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/36973674bf333dfdd7cd32ae656754bfa150022b.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit aa3d586e16242ada8e865f79249e4b6ac0c7704c Author: Jani Nikula Date: Fri May 10 14:22:18 2024 +0300 drm/i915/pciids: don't include WHL/CML PCI IDs in CFL It's confusing for INTEL_CFL_IDS() to include all WHL and CML PCI IDs. Even if we treat them the same in a lot of places, CML is a platform of its own, and the lists of PCI IDs should not conflate them. Largely go by the idea that if a platform has a name, group its PCI IDs together. That said, AML is special, having both KBL and CFL variants. Leave that alone. v2: Also split out WHL not just CML (Rodrigo) Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/7cca91dc78ed2b5982f14e400f03a1704645e475.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5c8c22adc802b2abe6fc7933087d5a029545fdff Author: Jani Nikula Date: Fri May 10 14:22:17 2024 +0300 drm/i915/pciids: add INTEL_IVB_IDS() Add INTEL_IVB_IDS() to identify all IVBs except IVB Q transcode. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/ed89a25b2c6bce318fe59e883d18b62d9453196b.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7b43a37348b7a3f07d2d7996539eb85f89e8acac Author: Jani Nikula Date: Fri May 10 14:22:16 2024 +0300 drm/i915/pciids: add INTEL_SNB_IDS() Add INTEL_SNB_IDS() to identify all SNBs. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/ffcb2d954ad9bca78ccd39836dc0a3dc7c6c0253.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 41c0f8a36f15fab58cbbcf64f641250230725da8 Author: Jani Nikula Date: Fri May 10 14:22:15 2024 +0300 drm/i915/pciids: add INTEL_ILK_IDS(), use acronym Most other PCI ID macros use platform acronyms. Follow suit for ILK. Add INTEL_ILK_IDS() to identify all ILKs. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/27ada56363cfa6a5b093cb31908a4b89aa912621.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 432ed92bfb5576865cd1fcc4cfed8a84d731b54a Author: Jani Nikula Date: Fri May 10 14:22:14 2024 +0300 drm/i915/pciids: add INTEL_PNV_IDS(), use acronym Most other PCI ID macros use platform acronyms. Follow suit for PNV. Add INTEL_PNV_IDS() to identify all PNVs. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Rodrigo Vivi Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/5f9b34a2cd388244be03263a5147776bfe64d5ac.1715340032.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit c8ff26b82c5b0f589516edcf7628704e3a6bc426 Author: Matthew Brost Date: Tue May 14 16:23:25 2024 -0700 drm/xe: Only zap PTEs as needed If PTEs are already invalidated no need to invalidate again. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240514232325.84508-1-matthew.brost@intel.com commit 216afc2c11b7e920c81e356c7bc1221d81b8436b Author: Thomas Zimmermann Date: Tue May 7 17:23:22 2024 +0200 drm/fbdev-shmem: Clean up deferred I/O Call fb_deferred_io_cleanup() upon destroying the framebuffer device. Releases the internal memory. Signed-off-by: Thomas Zimmermann Fixes: 150f431a0831 ("drm/fbdev: Add fbdev-shmem") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240507152329.3085-1-tzimmermann@suse.de commit d831e62aa276977f05af6a6730bb6e1172e9d2c3 Author: Thomas Zimmermann Date: Tue May 7 16:55:17 2024 +0200 drm/fbdev-dma: Clean up deferred I/O Call fb_deferred_io_cleanup() upon destroying the framebuffer device. Releases the internal memory. Signed-off-by: Thomas Zimmermann Fixes: 808a40b69468 ("drm/fbdev-dma: Implement damage handling and deferred I/O") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240507145529.31368-1-tzimmermann@suse.de commit 19be15dcc0f6bcb4be9109faf2d50771fc9a80e1 Author: Ville Syrjälä Date: Fri May 10 18:23:29 2024 +0300 drm/i915: Handle SKL+ WM/DDB registers next to all other plane registers Having the plane WM/DDB regitster write functions in skl_watermarks.c is rather annoying when trying to implement DSB based plane updates. Move them into the respective files that handle all other plane register writes. Less places where I need to worry about the DSB vs. MMIO decisions. The downside is that we spread the wm struct details a bit further afield. But if that becomes too annoying we can probably abstract things a bit more with a few extra functions. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-17-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 09fc93141d4c6ba3f6e78ce3c995c9dedac4a37c Author: Ville Syrjälä Date: Fri May 10 18:23:28 2024 +0300 drm/i915: Nuke skl_write_wm_level() and skl_ddb_entry_write() Get rid of skl_ddb_entry_write() and skl_write_wm_level() and just call intel_de_write_fw() directly. This is prep work towards DSB based plane updates where these wrappers are more of a hinderance. Done with cocci mostly: @@ expression D, R, L; @@ - skl_write_wm_level(D, R, L) + intel_de_write_fw(D, R, skl_plane_wm_reg_val(L)) @@ expression D, R, B; @@ - skl_ddb_entry_write(D, R, B) + intel_de_write_fw(D, R, skl_plane_ddb_reg_val(B)) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-16-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1b455361d57016e820803b9c61eb68cd1db48a88 Author: Ville Syrjälä Date: Fri May 10 18:23:27 2024 +0300 drm/i915: Extract skl_plane_{wm,ddb}_reg_val() Extract helpers to calculate the final wm/ddb register values for skl+. Will allow me to more cleanly remove the register write wrappers for these registers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-15-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 6f320c6a00ce4c7d917021b64bab1571b860915c Author: Ville Syrjälä Date: Mon May 13 20:00:40 2024 +0300 drm/i915: Refactor skl+ plane register offset calculations Currently every skl+ plane register defines some intermediate macros to calculate the final register offset. Pull all of that into common macros, simplifying the final register offset stuff into just five defines: - raw register offsets for the planes 1 and 2 on pipes A and B - the final parametrized macro v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240513170040.15393-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b7d4e9074ac06ea507f1927192ddf6c9cae8e085 Author: Ville Syrjälä Date: Mon May 13 20:00:08 2024 +0300 drm/i915: Drop a few unwanted tabs from skl+ plane reg defines A few extra tabs have snuck into the skl+ plane register bit definitions. Remove them. v2: Rebase Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240513170008.15338-1-ville.syrjala@linux.intel.com commit 7deb50baf87a026a20c6e89f19f9e31dae329bc3 Author: Ville Syrjälä Date: Mon May 13 19:59:45 2024 +0300 drm/i915: Use REG_BIT for PLANE_WM bits A couple of PLANE_WM bits were still using the hand rolled (1< Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240513165945.15285-1-ville.syrjala@linux.intel.com commit 14947416b1e412123ecb6cb7e819ebb4c74b1f81 Author: Ville Syrjälä Date: Mon May 13 19:59:09 2024 +0300 drm/i915: Shuffle the skl+ plane register definitions Rearrange the plane skl+ universal plane register definitions: - keep everything related to the same register in one place - sort based on register offset - unify the whitespace/etc a bit v2: Define register contents after all offsets (Jani) Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240513165909.15234-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 86a30fb1224d407cb03e178d4cbebc94e1c38463 Author: Ville Syrjälä Date: Mon May 13 19:58:42 2024 +0300 drm/i915: Drop useless PLANE_FOO_3 register defines We only need register defines for the first two planes on the first two pipes. Nuke everything else. v2: Drop a few more that snuck through Reviewed-by: Jani Nikula #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240513165842.15199-1-ville.syrjala@linux.intel.com commit 94b110106b48bd84be6c7fca3bc36a77f974a9a1 Author: Ville Syrjälä Date: Fri May 10 18:23:21 2024 +0300 drm/i915/gvt: Use PLANE_CTL and PLANE_SURF defines Stop hand rolling PLANE_CTL and PLANE_SURF for the third plane and just use the real thing. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 72d2031070e26f1de192cbcbbb45ba774183ab30 Author: Ville Syrjälä Date: Fri May 10 18:23:20 2024 +0300 drm/i915/gvt: Use the full PLANE_KEY*() defines Stop hand rolling PLANE_KEY*() register defines and just use the real thing. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9d7d1e8b1c13322982da169176cbdd94f66f371d Author: Ville Syrjälä Date: Fri May 10 18:23:19 2024 +0300 drm/i915/gvt: Use the proper PLANE_AUX_OFFSET() define Stop hand rolling PLANE_AUX_OFFSET() and just use the real thing. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b86f87af3460747a829508d26a0fdf42daf807bd Author: Ville Syrjälä Date: Fri May 10 18:23:18 2024 +0300 drm/i915/gvt: Use the proper PLANE_AUX_DIST() define Stop hand rolling PLANE_AUX_DIST() and just use the real thing. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 88b2f5fbcc4c42e0cc5349577d750dc2a66cb58a Author: Ville Syrjälä Date: Fri May 10 18:23:17 2024 +0300 drm/i915: Move skl+ wm/ddb registers to proper headers On SKL+ the watermark/DDB registers are proper per-plane registers. Move the definitons to their respective files. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8cecf4aec31397f2cd7f9a1d277bef374dfea5c6 Author: Ville Syrjälä Date: Fri May 10 18:23:16 2024 +0300 drm/i915: Extract intel_cursor_regs.h Move most cursor register definitions into their own file. Declutters i915_reg.h a bit more. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8c8667682e8414fd766c376219487a085f03e823 Author: Ville Syrjälä Date: Fri May 10 18:23:15 2024 +0300 drm/i915: Extract skl_universal_plane_regs.h Move most of the SKL+ universal plane register definitions into their own file. Declutters i915_reg.h a bit more. Cc: Zhenyu Wang CC: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit af52e168fd5a7b579c349cb67b5d253433b12212 Author: Ville Syrjälä Date: Fri May 10 18:23:14 2024 +0300 drm/i915: Nuke _MMIO_PLANE_GAMC() _MMIO_PLANE_GAMC() is some leftover macro that is never used. Get rid of it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510152329.24098-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8e1debd82466a3fe711784ab37e6b54e56011267 Author: Sebastian Gottschall Date: Mon May 13 17:22:25 2024 +0300 wifi: ath10k: add LED and GPIO controlling support for various chipsets Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984 based chipsets with on chipset connected led's using WMI Firmware API. The LED device will get available named as "ath10k-phyX" at sysfs and can be controlled with various triggers. Adds also debugfs interface for gpio control. Signed-off-by: Sebastian Gottschall Reviewed-by: Steve deRosier [kvalo: major reorg and cleanup] Signed-off-by: Kalle Valo [ansuel: rebase and small cleanup] Signed-off-by: Christian Marangi Tested-by: Stefan Lippers-Hollmann Signed-off-by: Kalle Valo Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com commit 3425b2205d30c9d639217a32368422e4ab95e999 Author: Jouni Högander Date: Fri May 10 12:38:23 2024 +0300 drm/i915/psr: Add panel replay sel update support to debugfs interface Add panel replay selective update support to debugfs status interface. In case of sink supporting panel replay we will print out: Sink support: PSR = no, Panel Replay = yes, Panel Replay Selective Update = yes and PSR mode will look like this if printing out enabled panel replay selective update: PSR mode: Panel Replay Selective Update Enabled Current PSR and panel replay printouts remain same. Cc: Kunal Joshi Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-13-jouni.hogander@intel.com commit c66c670ded611ba4528898a2520996e5f55cb03e Author: Jouni Högander Date: Fri May 10 12:38:22 2024 +0300 drm/i915/psr: Split intel_psr2_config_valid for panel replay Part of intel_psr2_config_valid is valid for panel replay. rename it as intel_sel_update_config_valid. Split psr2 specific part and name it as intel_psr2_config_valid. v3: - move early transport check to psr2 specific check - check intel_psr2_config_valid only for non-Panel Replay case v2: - use psr2_global_enabled for panel replay as well - goto unsupported instead of return when global enabled check fails Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-12-jouni.hogander@intel.com commit 328add8892c261f28dbf2ef060e8a0707f795c43 Author: Jouni Högander Date: Fri May 10 12:38:21 2024 +0300 drm/i915/psr: Update PSR module parameter descriptions We are re-using PSR module parameters for panel replay. Update module parameter descriptions with panel replay information: enable_psr: -1 (default) == follow what is in VBT 0 == disable PSR/PR 1 == Allow PSR1 and PR full frame update 2 == allow PSR1/PSR2 and PR Selective Update enable_psr2_sel_fetch 0 == disable selective fetch for PSR and PR 1 (default) == allow selective fetch for PSR PR Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-11-jouni.hogander@intel.com commit 54599011b7569f6bb027b17248015c622705d741 Author: Jouni Högander Date: Fri May 10 12:38:20 2024 +0300 drm/i915/psr: Do not apply workarounds in case of panel replay There are some workarounds that are not applicable for panel replay. Do not apply these if panel replay is used. Bspec: 66624, 50422 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-10-jouni.hogander@intel.com commit 29fb595d48758a6804f6f5ad29df9508eeba242b Author: Jouni Högander Date: Fri May 10 12:38:19 2024 +0300 drm/i915/psr: Panel replay uses SRD_STATUS to track it's status DP Panel replay uses SRD_STATUS to track it's status despite selective update mode. Bspec: 53370, 68920 v4: - use PSR2_STATUS for eDP Panel Replay - handle intel_psr_wait_exit_locked as well v3: - do not use PSR2_STATUS for PSR1 v2: - use intel_dp_is_edp to differentiate - modify debugfs status as well Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-9-jouni.hogander@intel.com commit d210d8c0df2f05a081758f3b0b9dc2f4f247b661 Author: Jouni Högander Date: Fri May 10 12:38:18 2024 +0300 drm/i915/psr: Modify intel_dp_get_su_granularity to support panel replay Currently intel_dp_get_su_granularity doesn't support panel replay. This fix modifies it to support panel replay as well. v4: - use drm_dp_dpcd_readb instead of drm_dp_dpcd_read - ensure return value is 0 if drm_dp_dpcd_readb fails v3: use correct offset for DP_PANEL_PANEL_REPLAY_CAPABILITY v2: rely on PSR definitions on common bits Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-8-jouni.hogander@intel.com commit 3a745dfc715c50d57e52be744c05c66d65853e94 Author: Jouni Högander Date: Fri May 10 12:38:17 2024 +0300 drm/i915/psr: Detect panel replay selective update support Add new boolean to store panel replay selective update support of sink into intel_psr struct. Detect panel replay selective update support and store it into this new boolean. v3: Clear sink_panel_replay_su_support in intel_dp_detect v2: Merge adding new boolean into this patch Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-7-jouni.hogander@intel.com commit 4b526132cce81cd2430d6548ea031b364538c5c0 Author: Jouni Högander Date: Fri May 10 12:38:16 2024 +0300 drm/panelreplay: dpcd register definition for panelreplay SU Add definitions for panel replay selective update v2: Remove unnecessary Cc from commit message Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Acked-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-6-jouni.hogander@intel.com commit ba7cf33f233efcd7e0a20ae8a73ffe75bf7337dc Author: Jouni Högander Date: Fri May 10 12:38:15 2024 +0300 drm/i915/psr: Rename psr2_enabled as sel_update_enabled We are about to reuse psr2_enabled for panel replay as well. Rename it as sel_update_enabled to avoid confusion. v3: Rebase v2: Rebase Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-5-jouni.hogander@intel.com commit 56e65164b832d777c1f0a8af47af8cc26e6506d5 Author: Jouni Högander Date: Fri May 10 12:38:14 2024 +0300 drm/i915/dp: Use always vsc revision 0x6 for Panel Replay We are about to enable Panel Replay Selective update mode. Vsc revision 0x6 for Panel Replay no matter if it is selective update or full frame update mode. Take this into account when preparing VSC SDP package. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-4-jouni.hogander@intel.com commit d07a578703dbf839ea39bffc425fba2321f45543 Author: Jouni Högander Date: Fri May 10 12:38:13 2024 +0300 drm/i915/display: Do not print "psr: enabled" for on Panel Replay After setting has_psr for panel replay as well crtc state dump is improperly printing "psr: enabled" for Panel Replay as well. Fix this by checking also has_panel_replay. Fixes: 5afa6e496098 ("drm/i915/psr: Set intel_crtc_state->has_psr on panel replay as well") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-3-jouni.hogander@intel.com commit 1e52db8a439b147f314681129f9ee33f16900767 Author: Jouni Högander Date: Fri May 10 12:38:12 2024 +0300 drm/i915/psr: Rename has_psr2 as has_sel_update We are going to reuse has_psr2 for panel_replay as well. Rename it as has_sel_update to avoid confusion. v3: do not add has_psr check into psr2 case in intel_dp_compute_vsc_sdp v2: Rebase Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240510093823.3146455-2-jouni.hogander@intel.com commit 0adff3b0ef12483a79dc8415b94547853d26d1f3 Author: Tomasz Rusinowicz Date: Mon May 13 14:04:31 2024 +0200 accel/ivpu: Share NPU busy time in sysfs The driver tracks the time spent by NPU executing jobs and shares it through sysfs `npu_busy_time_us` file. It can be then used by user space applications to monitor device utilization. NPU is considered 'busy' starting with a first job submitted to firmware and ending when there is no more jobs pending/executing. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-13-jacek.lawrynowicz@linux.intel.com commit cb323de31a0cbff3de5fc8608c2e2d6e2517f027 Author: Jacek Lawrynowicz Date: Mon May 13 14:04:30 2024 +0200 accel/ivpu: Increase reset counter when warm boot fails Failed warm boot causes a cold boot that looses FW state and is equivalent to a recovery or reset, so reset_counter should be incremented in order for this failure to be detected by tests. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-12-jacek.lawrynowicz@linux.intel.com commit 8f2eb89159933001738443717e14c7a90ede0f43 Author: Tomasz Rusinowicz Date: Mon May 13 14:04:29 2024 +0200 accel/ivpu: Configure fw logging using debugfs Add fw_dyndbg file that can be used to control FW logging. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-11-jacek.lawrynowicz@linux.intel.com commit 2c3801b17459da806f44d3f63f89e999f23e9e60 Author: Wachowski, Karol Date: Mon May 13 14:04:28 2024 +0200 accel/ivpu: Add force snoop module parameter Add module parameter that enforces snooping for all NPU accesses, both through MMU PTEs mappings and through TCU page table walk override register bits for MMU page walks / configuration access. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-10-jacek.lawrynowicz@linux.intel.com commit cdfad4db7756563db7d458216d9e3c2651dddc7d Author: Tomasz Rusinowicz Date: Mon May 13 14:04:27 2024 +0200 accel/ivpu: Add NPU profiling support Implement time based Metric Streamer profiling UAPI. This is a generic mechanism allowing user mode tools to sample NPU metrics. These metrics are defined by the FW and transparent to the driver. The user space can check for this feature by checking DRM_IVPU_CAP_METRIC_STREAMER driver capability. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-9-jacek.lawrynowicz@linux.intel.com commit 68ca7b06b5b06626a0cf41170c5d1b91aa7d5281 Author: Wachowski, Karol Date: Mon May 13 14:04:26 2024 +0200 accel/ivpu: Add resume engine support Create debugfs interface that triggers sending resume engine IPC command to VPU. It is used to test engine resume functionality in driver user space tests. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-8-jacek.lawrynowicz@linux.intel.com commit 2a18ceff948221ab565b2afe4b7e5c4df129625f Author: Wachowski, Karol Date: Mon May 13 14:04:25 2024 +0200 accel/ivpu: Implement support for hardware scheduler Add support for HWS (hardware scheduler). It is disabled by default. The sched_mode module param can be used to enable it. Each context has multiple command queues with different priorities and HWS enables priority based execution on the HW/FW side. The driver in HWS mode has to send a couple additional messages to initialize HWS and describe command queue priorities. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-7-jacek.lawrynowicz@linux.intel.com commit cf40fbaf70884ae8e84652eb589057034685f87c Author: Wachowski, Karol Date: Mon May 13 14:04:24 2024 +0200 accel/ivpu: Add HWS JSM messages Add JSM messages that will be used to implement hardware scheduler. Most of these messages are used to create and manage HWS specific command queues. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-6-jacek.lawrynowicz@linux.intel.com commit eb756b4c2c15ce0429c42b2d0538e18b33f208de Author: Wachowski, Karol Date: Mon May 13 14:04:23 2024 +0200 accel/ivpu: Implement support for preemption buffers Allocate per-context preemption buffers that are required by HWS. There are two preemption buffers: * primary - allocated in user memory range (PIOVA accessible) * secondary - allocated in shave memory range Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-5-jacek.lawrynowicz@linux.intel.com commit 8fa5514c22b9662c98010eb43e55ad2caa8f0fcc Author: Wachowski, Karol Date: Mon May 13 14:04:22 2024 +0200 accel/ivpu: Create priority based command queues Create multiple command queues per engine with different priorities. The cmdqs are created on-demand and they support 4 priority levels. These priorities will later be used by the HWS (hardware scheduler). Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-4-jacek.lawrynowicz@linux.intel.com commit 41ca33d8d356d4814683a50b6ea1087d7aeea6bb Author: Wachowski, Karol Date: Mon May 13 14:04:21 2024 +0200 accel/ivpu: Add sched_mode module param This param will be used to enable/disable HWS (hardware scheduler). The HWS is a FW side feature and may not be available on all HW generations and FW versions. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-3-jacek.lawrynowicz@linux.intel.com commit 9fbfe9817ae556424fe8cf3e19d289edeee7fe22 Author: Jacek Lawrynowicz Date: Mon May 13 14:04:20 2024 +0200 accel/ivpu: Update VPU FW API headers Update JSM API to 3.16.0. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240513120431.3187212-2-jacek.lawrynowicz@linux.intel.com commit b31cfb47b27ae02ea7fb3f956b99c79356730e2a Author: Jonathan Cavitt Date: Fri May 10 12:45:40 2024 -0700 drm/xe/xe_guc_submit: Declare reset if banned or killed or wedged Add an additional condition to the reset_status guc_exec_queue_op that returns true if the exec queue has been banned or killed or wedged. The reset_status op is only used for exiting any xe_wait_user_fence_ioctl that waits on an exec queue without timing out, so doing this will exit the ioctl early in cases where the exec queue can no longer function, such as after a GuC stop during a reset. Suggested-by: Matthew Brost Signed-off-by: Jonathan Cavitt Reviewed-by: Stuart Summers Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240510194540.3246991-3-jonathan.cavitt@intel.com commit abdea2847acfe41313620a5359940522990018e3 Author: Jonathan Cavitt Date: Fri May 10 12:45:39 2024 -0700 drm/xe/xe_guc_submit: Allow lr exec queues to be banned LR queues currently don't get banned during a GT/GuC reset because they lack a job. Though they don't have a job to detect the reset status of, it's still possible to tell when they should be banned by looking at the LRC: if the LRC head and tail don't match, then the exec queue should be banned and cleaned up. This also requires swapping the usage of xe_sched_tdr_queue_imm with xe_guc_exec_queue_trigger_cleanup, as the former is specific to non-lr exec queues. Suggested-by: Matthew Brost Signed-off-by: Jonathan Cavitt Reviewed-by: Matthew Brost Reviewed-by: Stuart Summers Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240510194540.3246991-2-jonathan.cavitt@intel.com commit 1564d411e17f51e2f64655b4e4da015be1ba7eaa Author: Jonathan Cavitt Date: Fri May 10 12:45:38 2024 -0700 drm/xe/xe_guc_submit: Fix exec queue stop race condition Reorder the xe_sched_tdr_queue_imm and set_exec_queue_banned calls in guc_exec_queue_stop. This prevents a possible race condition between the two events in which it's possible for xe_sched_tdr_queue_imm to wake the ufence waiter before the exec queue is banned, causing the ufence waiter to miss the banned state. Suggested-by: Matthew Brost Signed-off-by: Jonathan Cavitt Reviewed-by: Matthew Brost Reviewed-by: Stuart Summers Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240510194540.3246991-1-jonathan.cavitt@intel.com commit 4071e0872fcad846381f86f5164236827f7e91c8 Author: Michal Wajdeczko Date: Fri May 10 22:38:10 2024 +0200 drm/xe/uc: Move GuC submission init to post hwconfig step We shouldn't need anything from the GuC submission code until we finish GuC initialization in post hwconfig step. While around add diagnostic message if we fail uC init. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240510203810.1952-3-michal.wajdeczko@intel.com commit 3df01f5c72b0b4ecdca2b3da88a4b6fac809986b Author: Michal Wajdeczko Date: Fri May 10 22:38:09 2024 +0200 drm/xe/uc: Reorder post hwconfig uC initialization step We want to move the GuC submission initialization to the post hwconfig step, but now this step is done too late as migration initialization uses exec_queue that would crash due to a unset exec_queue_ops. We can easily fix that by small function reorder. Signed-off-by: Michal Wajdeczko Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240510203810.1952-2-michal.wajdeczko@intel.com commit 04f4a70a183a688a60fe3882d6e4236ea02cfc67 Author: Matthew Brost Date: Mon Apr 15 12:04:53 2024 -0700 drm/xe: Only use reserved BCS instances for usm migrate exec queue The GuC context scheduling queue is 2 entires deep, thus it is possible for a migration job to be stuck behind a fault if migration exec queue shares engines with user jobs. This can deadlock as the migrate exec queue is required to service page faults. Avoid deadlock by only using reserved BCS instances for usm migrate exec queue. Fixes: a043fbab7af5 ("drm/xe/pvc: Use fast copy engines as migrate engine on PVC") Cc: Matt Roper Cc: Niranjana Vishwanathapura Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240415190453.696553-2-matthew.brost@intel.com Reviewed-by: Brian Welty commit 4c0be90e6874b8af30541c37689780fc7c8276c9 Author: Himal Prasad Ghimiray Date: Wed May 8 20:52:16 2024 +0530 drm/xe: Fix the warning conditions The maximum timeout display uses in xe_pcode_request is 3 msec, add the warning in cases the function is misused with higher timeouts. Add a warning if pcode_try_request is not passed the timeout parameter greater than 0. Cc: Lucas De Marchi Cc: Rodrigo Vivi Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240508152216.3263109-3-himal.prasad.ghimiray@intel.com Signed-off-by: Rodrigo Vivi commit c81858eb52266b3d6ba28ca4f62a198231a10cdc Author: Himal Prasad Ghimiray Date: Wed May 8 20:52:15 2024 +0530 drm/xe: Change pcode timeout to 50msec while polling again Polling is initially attempted with timeout_base_ms enabled for preemption, and if it exceeds this timeframe, another attempt is made without preemption, allowing an additional 50 ms before timing out. v2 - Rebase v3 - Move warnings to separate patch (Lucas) Cc: Lucas De Marchi Cc: Rodrigo Vivi Signed-off-by: Himal Prasad Ghimiray Fixes: 7dc9b92dcfef ("drm/xe: Remove i915_utils dependency from xe_pcode.") Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240508152216.3263109-2-himal.prasad.ghimiray@intel.com Signed-off-by: Rodrigo Vivi commit c636fa85feb450ca414a10010ed05361a73c93a6 Author: Samasth Norway Ananda Date: Thu May 9 16:10:37 2024 -0700 wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device The band_idx variable in the function wlc_lcnphy_tx_iqlo_cal() will never be set to 1 as BCM4313 is the only device for which the LCN PHY code is used. This is a 2G-only device. Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers") Signed-off-by: Samasth Norway Ananda Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://msgid.link/20240509231037.2014109-1-samasth.norway.ananda@oracle.com commit 02b682d54598f61cbb7dbb14d98ec1801112b878 Author: Andrii Batyiev Date: Thu May 9 13:11:25 2024 +0300 wifi: iwlegacy: do not skip frames with bad FCS Monitor/sniffer mode benefits from all types of frames, even if FCS check fails. But we must mark frames as such. Tested on iwl3945 only. Signed-off-by: Andrii Batyiev Signed-off-by: Kalle Valo Link: https://msgid.link/20240509101140.32664-1-batyiev@gmail.com commit ce698dcf10d5d85c712b8cf3140d125e3112daf9 Author: Luca Coelho Date: Fri May 10 12:05:02 2024 +0300 Documentation/i915: remove kernel-doc for DMC wakelocks The function descriptions are optional and have not yet been added to the DMC wakelock code, so we shouldn't try to use it. Since this is a regression, remove the kernel-doc entry for DMC wakelocks for now. The proper documentation will be added in a future patch. Fixes: 765425f598c2 ("drm/i915/display: add support for DMC wakelocks") Signed-off-by: Luca Coelho Reviewed-by: Jani Nikula Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20240510090502.667556-1-luciano.coelho@intel.com commit fbad43eccae5cb14594195c20113369aabaa22b5 Author: Chris Wilson Date: Tue Apr 23 18:23:10 2024 +0200 drm/i915/gt: Disarm breadcrumbs if engines are already idle The breadcrumbs use a GT wakeref for guarding the interrupt, but are disarmed during release of the engine wakeref. This leaves a hole where we may attach a breadcrumb just as the engine is parking (after it has parked its breadcrumbs), execute the irq worker with some signalers still attached, but never be woken again. That issue manifests itself in CI with IGT runner timeouts while tests are waiting indefinitely for release of all GT wakerefs. <6> [209.151778] i915: Running live_engine_pm_selftests/live_engine_busy_stats <7> [209.231628] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling PW_5 <7> [209.231816] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling PW_4 <7> [209.231944] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling PW_3 <7> [209.232056] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling PW_2 <7> [209.232166] i915 0000:00:02.0: [drm:intel_power_well_disable [i915]] disabling DC_off <7> [209.232270] i915 0000:00:02.0: [drm:skl_enable_dc6 [i915]] Enabling DC6 <7> [209.232368] i915 0000:00:02.0: [drm:gen9_set_dc_state.part.0 [i915]] Setting DC state from 00 to 02 <4> [299.356116] [IGT] Inactivity timeout exceeded. Killing the current test with SIGQUIT. ... <6> [299.356526] sysrq: Show State ... <6> [299.373964] task:i915_selftest state:D stack:11784 pid:5578 tgid:5578 ppid:873 flags:0x00004002 <6> [299.373967] Call Trace: <6> [299.373968] <6> [299.373970] __schedule+0x3bb/0xda0 <6> [299.373974] schedule+0x41/0x110 <6> [299.373976] intel_wakeref_wait_for_idle+0x82/0x100 [i915] <6> [299.374083] ? __pfx_var_wake_function+0x10/0x10 <6> [299.374087] live_engine_busy_stats+0x9b/0x500 [i915] <6> [299.374173] __i915_subtests+0xbe/0x240 [i915] <6> [299.374277] ? __pfx___intel_gt_live_setup+0x10/0x10 [i915] <6> [299.374369] ? __pfx___intel_gt_live_teardown+0x10/0x10 [i915] <6> [299.374456] intel_engine_live_selftests+0x1c/0x30 [i915] <6> [299.374547] __run_selftests+0xbb/0x190 [i915] <6> [299.374635] i915_live_selftests+0x4b/0x90 [i915] <6> [299.374717] i915_pci_probe+0x10d/0x210 [i915] At the end of the interrupt worker, if there are no more engines awake, disarm the breadcrumb and go to sleep. Fixes: 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission") Closes: https://gitlab.freedesktop.org/drm/intel/issues/10026 Signed-off-by: Chris Wilson Cc: Andrzej Hajda Cc: # v5.12+ Signed-off-by: Janusz Krzysztofik Acked-by: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240423165505.465734-2-janusz.krzysztofik@linux.intel.com commit 3dbfbd101a5844f851da9ae6e90f59753c10ff42 Author: Jani Nikula Date: Mon May 13 23:27:23 2024 +0300 drm/edid: remove drm_do_get_edid() All users of drm_do_get_edid() have been converted to drm_edid_read_custom(). Remove the unused function to prevent new users from creeping in. Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240513202723.261440-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit d1855d284e9f6580c0eaba66bfa04722f4d4dc9b Author: Lucas De Marchi Date: Mon May 13 14:37:51 2024 -0700 drm/xe: Move sw-only pcode initialization Move it to xe_gt_init_early() that initializes the sw-only part for each gt. Reviewed-by: Rodrigo Vivi Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20240513213751.1017791-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 45b9066ec351518657cd09599872f737ceb25f09 Author: Lucas De Marchi Date: Mon May 13 14:37:50 2024 -0700 drm/xe: Move xe_force_wake_init_gt() inside gt initialization xe_force_wake_init_gt() is a software-only initialization and doesn't need to be called from xe_device_probe(). Move it to initialize together with the gt. Reviewed-by: Michał Winiarski Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240513213751.1017791-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 65c4de2a9148385114b3ff1121143ef1af805a1a Author: Lucas De Marchi Date: Mon May 13 14:37:49 2024 -0700 drm/xe: Move xe_gt_init_early() where it belongs Early shall be early enough, stop doing other things with gt before it. Now that xe_gt_init_early() doesn't need forcewake and doesn't depend on the fake engine_mask initialization, move it where it belongs: it doesn't need to be after hwconfig config anymore. Reviewed-by: Michał Winiarski Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20240513213751.1017791-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 402c014cbcc7c9ada6d62ee646b2b359d4793ce2 Author: Lucas De Marchi Date: Mon May 13 14:37:48 2024 -0700 drm/xe: Drop useless forcewake get/put Forcewake used to be needed in xe_gt_init_early() since it was calling xe_gt_topology_init(). That call was dropped in commit 4c47049d93b7 ("drm/xe/guc: Fix missing topology init"), but the forcewake calls were left behind. Remove them. Cc: Zhanjun Dong Reviewed-by: Michał Winiarski Reviewed-by: Zhanjun Dong Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240513213751.1017791-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 61549a2ee5940af4d49ba227d7e7798ccf6f04a5 Author: Lucas De Marchi Date: Mon May 13 14:37:47 2024 -0700 drm/xe: Drop __engine_mask Not really used, it's just a copy of engine_mask, which already reads the fuses to mark engines as available/not-available. Reviewed-by: Michał Winiarski Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240513213751.1017791-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 578bdd984f4562a47ec8d57742affd688688a0a3 Author: Zong-Zhe Yang Date: Thu May 9 17:06:46 2024 +0800 wifi: rtw89: support mac_id number according to chip On 802.11be chips, to consider MLO, HW doesn't design number of support mac_id as large as before. And, it might be various according to chip. For example, old chips support mac_id up to 128, but RTL8922a only supports mac_id up to 32. Besides, the mac_id acquiring function will be extended when impending MLO support. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240509090646.35304-5-pkshih@realtek.com commit e9f1a901c9cc67ffb610ada8c2f4a6382ceb045a Author: Zong-Zhe Yang Date: Thu May 9 17:06:45 2024 +0800 wifi: rtw89: switch to register vif_cfg_changed and link_info_changed For impending MLO support, we drop bss_info_changed callback ahead and switch to register new callbacks, vif_cfg_changed and link_info_changed, which are introduced by mac80211 for multi-link point of view. Besides, there is a place where we called ieee80211_find_sta() under station mode. To work on both non-MLD and MLD connection, we should call ieee80211_find_sta() with vif->cfg.ap_addr. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240509090646.35304-4-pkshih@realtek.com commit 0448c65af9219ee296f844748d60448f7418180f Author: Zong-Zhe Yang Date: Thu May 9 17:06:44 2024 +0800 wifi: rtw89: cam: tweak relation between sec CAM and addr CAM In original code architecture, sec CAM is a component of addr CAM. Hence, sec CAM could not be shared. After MLO, each link has its own addr CAM. However, one MLD PTK takes only one sec CAM but it needs to work on multiple links' addr CAMs. So, we now manage sec CAMs in global pool, and each of them is not bound to a single addr CAM now. before: +-----------------+ +--------------------+ | rtw89_{vif/sta} | ... | ieee80211_key_conf | +-----------------+ +--------------------+ ^ | V | hw_key_idx | | | V | +-- +----------+ addr_cam::key_idx | \ +---------+ | addr_cam |<>---------------------| |-------| sec_cam | +----------+ | / +---------+ +-- after: +----------------------+ +--------------------+ | rtw89_{vif/sta}_link | ... | ieee80211_key_conf | +----------------------+ +--------------------+ ^ | V | hw_key_idx | | | V | --+ +---------+ | +---------+ / | sec_cam_idx | global | | | sec_cam |-------| |----------------<>| sec_cam | | +---------+ \ | | pool | | ^ --+ +---------+ | | | (*) | +----------+ | | addr_cam |-------------+ +----------+ Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240509090646.35304-3-pkshih@realtek.com commit cea4066588308fa932b6b03486c608efff1d761c Author: Zong-Zhe Yang Date: Thu May 9 17:06:43 2024 +0800 wifi: rtw89: ser: avoid multiple deinit on same CAM We did deinit CAM in STA iteration in VIF loop. But, the STA iteration missed to restrict the target VIF. So, if there are multiple VIFs, we would deinit a CAM multiple times. Now, fix it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240509090646.35304-2-pkshih@realtek.com commit 8e8c68f4c90d80ba9a3b52fe832917f6878a15fa Author: Harish Kasiviswanathan Date: Wed May 1 14:09:04 2024 -0400 drm/amdkfd: Use dev_error intead of pr_error No functional change. This will help in moving gpu_id creation to next step while still being able to identify the correct GPU Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b61467778e69c8e7e43dff9d1e2e8940c5df42fa Author: Frank Min Date: Tue Apr 30 21:37:45 2024 +0800 drm/amdgpu: fix mqd corruption for gfx12 1. restore mqd from backup while resuming 2. use copy_toio and copy_fromio while mqd in vram Signed-off-by: Frank Min Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ef168e6de96531a2aa1b0ba77f07c7c56791d418 Author: Frank Min Date: Mon May 13 16:36:14 2024 +0800 drm/amdgpu: add initial value for gfx12 AGP aperture add initial value for gfx12 AGP aperture Signed-off-by: Frank Min Reviewed-by: Alex Deucher Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit f76059fe14395b37ba8d997eb0381b1b9e80a939 Author: Jesse Zhang Date: Mon May 13 16:01:23 2024 +0800 drm/amd/pm: check negtive return for table entries Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 76cb763e6ea62e838ccc8f7a1ea4246d690fccc9 Author: Mario Limonciello Date: Thu May 9 12:05:24 2024 -0500 drm/amd/display: Don't register panel_power_savings on OLED panels OLED panels don't support the ABM, they shouldn't offer the panel_power_savings attribute to the user. Check whether aux BL control support was enabled to decide whether to offer it. Reported-by: Gergo Koteles Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3359 Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Tested-by: Gergo Koteles Signed-off-by: Alex Deucher commit e6ae021adb79e5f4c4bc4362dd651d7b8b646340 Author: Jesse Zhang Date: Thu May 9 13:17:47 2024 +0800 drm/amdgpu: fix the warning bad bit shift operation for aca_error_type type Filter invalid aca error types before performing a shift operation. Signed-off-by: Jesse Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit d190b459b2a4304307c3468ed97477b808381011 Author: Jesse Zhang Date: Mon May 13 15:22:42 2024 +0800 drm/amdgpu: the warning dereferencing obj for nbio_v7_4 if ras_manager obj null, don't print NBIO err data Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 3b7d552ea1a03ae007783ef934cfa32a45c28258 Author: Jesse Zhang Date: Wed May 8 18:34:59 2024 +0800 drm/amd/pm: remove logically dead code Execution cannot reach this statement: case POWER_STATE_TYPE_BALAN. Signed-off-by: Jesse Zhang Acked-by: Yang Wang Signed-off-by: Alex Deucher commit 68de5d31b15b4c923da4c8b7df7d4046139f9f80 Author: Jesse Zhang Date: Wed May 8 18:14:13 2024 +0800 drm/amdgpu: remove structurally dead code This code cannot be reached: return "UNKNOWN";. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 1a296827feef4dbad1e2863b0e2d7d7d8afc781a Author: Jesse Zhang Date: Thu May 9 11:09:37 2024 +0800 drm/amd/pm: fix enum feature compared against 0 This less-than-zero comparison of an unsigned value is never true. feature < 0U Signed-off-by: Jesse Zhang Reviewed-by: Yang Wang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 67024471616e090c994a46630bd23c42d6962a34 Author: Jesse Zhang Date: Thu May 9 11:20:57 2024 +0800 drm/amd/pm: fix enum type compared against 0 This less-than-zero comparison of an unsigned value is never true. type < 0U Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 269435aef45da369a345d23c28bf1b34134ec7da Author: Jesse Zhang Date: Wed May 8 18:54:25 2024 +0800 drm/amdgu: remove unused code The same code is executed when the condition err is true or false, because the code in the if-then branch and after the if statement is identical Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 1b016f87a8f5387b9b66b05e3e2cfde8b8876bd4 Author: Jesse Zhang Date: Wed May 8 18:49:30 2024 +0800 drm/amd/pm: remove logically dead code for renoir The switch governing value clk_type cannot be SMU_GFXCLK and SMU_SCLK. Fixes: ca55f459f5ad ("drm/amd/pm: add the fine grain tuning function for Renoir") Signed-off-by: Jesse Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit e2bff63ba6f875cb879c90758662f193f040d033 Author: Jesse Zhang Date: Wed May 8 18:17:43 2024 +0800 drm/amdgpu: remove structurally dead code for amd_gmc This code cannot be reached: return sysfs_emit(buf, "UNK....) Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 9f436a0075cbcc6bf7cbc6e4b60cb8babc889eb8 Author: Jesse Zhang Date: Wed May 8 17:46:40 2024 +0800 drm/amd/pm: check the return of send smc msg for smu_v13 Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit a3ac9d1c9751f00026c2d98b802ec8a98626c3ed Author: Jesse Zhang Date: Wed May 8 17:50:21 2024 +0800 drm/amd/pm: check specific index for smu13 Check for specific indexes that may be invalid values. Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit ff284ecac32a98f8b052e271e173e80df456793e Author: Jesse Zhang Date: Wed May 8 17:41:17 2024 +0800 drm/amd/pm: check the return of send smc msg for navi10 Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 7f684a67f80adaf98fa9b0b1363f518e65c02289 Author: Jesse Zhang Date: Wed May 8 17:32:32 2024 +0800 drm/amd/pm: check the return of send smc msg for sienna_cichild Set smu work laod mask may fail, so check return. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 0ce8ef2639c112ae203c985b758389e378630aac Author: Jesse Zhang Date: Wed May 8 17:13:28 2024 +0800 drm/amd/pm: check specific index for aldebaran Check for specific indexes that may be invalid values. Signed-off-by: Jesse Zhang Reviewed-by: Yang Wang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit f0574a56fb1ea9afdfbe1b9563a9feaa12241001 Author: Jesse Zhang Date: Wed May 8 17:09:38 2024 +0800 drm/amd: fix the warning unchecking return vaule for sdma_v7 check ring allocate success before emit preempt ib Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit b55bf19eb95e0ee3f97281d67dcaea9c8f5271d9 Author: Jesse Zhang Date: Thu May 9 17:49:54 2024 +0800 drm/amdgpu: clear the warning unsigned compared against 0 for xcp_id This greater-than-or-equal-to-zero comparison of an unsigned value is always true. fpriv->xcp_id >= 0U Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 1940708ccf5aff76de4e0b399f99267c93a89193 Author: Jesse Zhang Date: Wed May 8 16:20:49 2024 +0800 drm/amdgpu: fix the waring dereferencing hive Check the amdgpu_hive_info *hive that maybe is NULL. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit b1f7810b05d1950350ac2e06992982974343e441 Author: Jesse Zhang Date: Wed May 8 14:51:35 2024 +0800 drm/amdgpu: fix dereference after null check check the pointer hive before use. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit d1dd0802b3fc975c2277558d686d3519e3ccf952 Author: Jesse Zhang Date: Thu May 9 17:33:20 2024 +0800 drm/amd/pm: fix get dpm level count for yello carp For invalid clk types, return -EINVAL to check the return. Signed-off-by: Jesse Zhang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 7cda0a90426e0d6448789d97760555ee9ed1750b Author: Ma Jun Date: Thu May 9 13:50:56 2024 +0800 drm/amdgpu/pm: Drop redundant setting code for pcie lanes Drop redundant setting code for pcie.lanes. It overwrites the value get from pptable Signed-off-by: Ma Jun Acked-by: Yang Wang Signed-off-by: Alex Deucher commit 948e209475a7b447ddde3b11a9b40b69265f02e7 Author: Ma Jun Date: Thu May 9 10:38:41 2024 +0800 drm/amdgpu/pm: Fix code alignment issue Fix code alignment issue Signed-off-by: Ma Jun Reported-by: Yang Wang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 7fc7db824cd4785c91ed5ca14711ae55d12e9610 Author: Jesse Zhang Date: Thu May 9 17:20:24 2024 +0800 drm/amd/pm: fix get dpm level count for smu13 For invalid clk types, return -EINVAL to check the return. Signed-off-by: Jesse Zhang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 1a00f2ac82d6bc6689388c7edcd2a4bd82664f3c Author: Jesse Zhang Date: Fri May 10 17:32:53 2024 +0800 drm/amdgpu: Fix the warning division or modulo by zero Checks the partition mode and returns an error for an invalid mode. Signed-off-by: Jesse Zhang Suggested-by: Lijo Lazar Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 56116dc7a9fdd2ce2b0e01d16f772a766a0219e0 Author: Alex Hung Date: Fri May 10 15:19:05 2024 -0600 Revert "drm/amd/display: Enable SYMCLK gating in DCCG" This reverts commit c49e44ede5cdfe650c2f769d8bd58cbe289e87cd. This causes regression on DP link layer test. Reported-by: Mark Broadworth Acked-by: Rodrigo Siqueira Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 85cf43c554e438e2e12b0fe109688c9533e4d93f Author: Mukul Joshi Date: Thu May 9 17:29:25 2024 -0400 drm/amdkfd: Fix CU Masking for GFX 9.4.3 We are incorrectly passing the first XCC's MQD when updating CU masks for other XCCs in the partition. Fix this by passing the MQD for the XCC currently being updated with CU mask to update_cu_mask function. Fixes: fc6efed2c728 ("drm/amdkfd: Update CU masking for GFX 9.4.3") Signed-off-by: Mukul Joshi Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit f45957432351b58a77fab63989ca842c314847b4 Author: Aric Cyr Date: Sun May 5 22:28:31 2024 -0400 drm/amd/display: 3.2.285 This version brings along following fixes: - Read default boot options - Find max flickerless instant vtotal delta - Refactor dcn401_update_clocks - Reduce I2C speed to 95kHz in DCN401 - Allow higher DSC slice support for small timings on dcn401 - Don't offload flip if not only address update - Check UHBR13.5 cap when determining max link cap - Enable SYMCLK gating in DCCG - Expand to higher link rates - Add left edge pixel for YCbCr422/420 + ODM pipe split - Add resource interfaces for get ODM slice rect - Add COEF filter types for DCN401 - Refactor DCN401 DCCG into component directory - Fix 3dlut size for Fastloading on DCN401 - Fix write to non-existent reg on DCN401 - Remove USBC check for DCN32 - Remove unused code for some dc files - Disable AC/DC codepath when unnecessary - Create dcn401_clk_mgr struct Acked-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fa73ec95c969c7af292caf622ef499e7af7cb062 Author: Duncan Ma Date: Mon Apr 22 10:17:11 2024 -0400 drm/amd/display: Read default boot options [WHY] DPIA boot option is set by VBIOS. It gets overwritten when driver loads DMU. [HOW] Read PreOS boot options and determine if dpia is enabled. Reviewed-by: Ovidiu Bunea Acked-by: Alex Hung Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bd051aa2fcfb803b94708429970f71596a4748e4 Author: Ethan Bitnun Date: Mon Apr 1 13:50:10 2024 -0400 drm/amd/display: Find max flickerless instant vtotal delta [WHAT & HOW] - Populate dml 2 callback with get_max_flickerless_instant_vtotal_increase - Use long long when necessary to prevent overflow - Add asic specific default values, currently disabled by default for every asic - Use the pre-existing debug option to protect the call to get_max_flickerless_instant_vtotal_increase Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Ethan Bitnun Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2eb7d4b98700fe7612521e5226437fb9e7a65af5 Author: Dillon Varone Date: Tue Mar 26 18:44:34 2024 -0400 drm/amd/display: Refactor dcn401_update_clocks [WHY & HOW] Refactor complex code into manageable functions. This also cleans up some updating logics. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 61f880039eea17a181fb3286881704c2c4287335 Author: Chris Park Date: Tue Apr 30 23:06:12 2024 -0400 drm/amd/display: Reduce I2C speed to 95kHz in DCN401 [WHY] HW for DCN401 is presented with a small I2C speed fluctuation that exceeds the hard cap limitation of 100kHz occasionally. This violates compliance requirement and will result in failure in compliance. [HOW] After various measurements and traceback to previous generation HW, DCN IP, SI and SW driver agrees that we can reduce I2C speed to 95kHz to address the I2C spped fluctuation in DCN401. Reviewed-by: Dillon Varone Acked-by: Alex Hung Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6ac05ae5fff84866a56358740681869c3bc62af3 Author: Wenjing Liu Date: Mon Apr 29 12:11:05 2024 -0400 drm/amd/display: Allow higher DSC slice support for small timings on dcn401 [WHY] DML2.1 has added the support to determine ODM combine based on DSC slice count limitation. This support would allow us to support DSC slice higher than 4 on small timings. The change will allow higher DSC slice support independent from pixel clock in use. [HOW] Add a DCN401 get_enc_caps function to allow the support for DSC slice count higher than 4. Reviewed-by: Dillon Varone Acked-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1dd50e634cb46880f3364ce629b09a37a5b3f888 Author: Alvin Lee Date: Mon Apr 29 17:39:35 2024 -0400 drm/amd/display: Don't offload flip if not only address update [WHAT & HOW] Fast updates can consist of some stream updates as well (i.e., out_csc). In these cases we should not offload the flip to FW as we can only offload address only updates to FW. Reviewed-by: Chris Park Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4eaf110f97ae55d18a3b0cb727eb6d8c0e8ce7db Author: George Shen Date: Tue Apr 23 16:59:43 2024 -0400 drm/amd/display: Check UHBR13.5 cap when determining max link cap [WHY] UHBR13.5 support is optional, even if UHBR20 is supported by the device. If source supports max UHBR13.5 while sink, cable and LTTPR support UHBR20 but not UHBR13.5, UHBR10 should be used as the max link cap. Reviewed-by: Wenjing Liu Acked-by: Alex Hung Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c49e44ede5cdfe650c2f769d8bd58cbe289e87cd Author: Daniel Miess Date: Tue Apr 23 15:45:59 2024 -0400 drm/amd/display: Enable SYMCLK gating in DCCG [WHY & HOW] Enable root clock optimization for SYMCLK and only disable it when it's actively used. Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4655b4d953067c176ecdbee4167cc85fc0058be1 Author: Sung Joon Kim Date: Fri Apr 26 15:08:06 2024 -0400 drm/amd/display: Expand to higher link rates [WHY & HOW] To support higher link rates that sink allows, we need to make sure driver is ready and perform correct link-training sequence. Reviewed-by: Wenjing Liu Acked-by: Alex Hung Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f9d48a88eba547d87d8ea7bfd25abd1836cdf06a Author: Wenjing Liu Date: Thu Apr 25 12:13:24 2024 -0400 drm/amd/display: Add left edge pixel for YCbCr422/420 + ODM pipe split [WHY] Currently 3-tap chroma subsampling is used for YCbCr422/420. When ODM pipesplit is used, pixels on the left edge of ODM slices need one extra pixel from the right edge of the previous slice to calculate the correct chroma value. Without this change, the chroma value is slightly different than expected. This is usually imperceptible visually, but it impacts test pattern CRCs for compliance test automation. [HOW] Update logic to use the register for adding extra left edge pixel for YCbCr422/420 ODM cases. Reviewed-by: George Shen Acked-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d5192c15fa6a8bb594e9ea23561019f77565a227 Author: Wenjing Liu Date: Thu Apr 25 10:36:44 2024 -0400 drm/amd/display: Add resource interfaces for get ODM slice rect [WHY] We need an unified location to perform ODM slice rect calculation. [HOW] Add three interfaces for ODM slice rect/width calucaltion in resource.h Reviewed-by: George Shen Acked-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6690d949df04dac7997080e51ce4759919957fab Author: Samson Tam Date: Fri Apr 26 12:17:26 2024 -0400 drm/amd/display: Add COEF filter types for DCN401 Add VERTICAL_BLUR_SCALE & HORIZONTAL_BLUR_SCALE types. Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 30c646afea03d848a38366e998351fa879e9acae Author: Revalla Hari Krishna Date: Mon Apr 22 15:34:02 2024 +0530 drm/amd/display: Refactor DCN401 DCCG into component directory [WHY] Clean up the code that requires dccg to be in its own component. [HOW] Move all files under newly created dccg dir and fix the makefiles. Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Revalla Hari Krishna Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9de99fa8c1eab5d7d1f363dcba0786a9b9cc51f4 Author: Adam Nelson Date: Tue Apr 9 17:38:44 2024 -0400 drm/amd/display: Fix 3dlut size for Fastloading on DCN401 [WHY] After a non-3dlut test the MPCC_MCM_3DLUT_MODE::MPCC_MCM_3DLUT_SIZE is incorrect. [HOW] Add register write to make valid. Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Adam Nelson Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3ecb039847dcc3d8d683c8aec94e0901dfff518a Author: Ilya Bakoulin Date: Tue Apr 9 14:04:19 2024 -0400 drm/amd/display: Fix write to non-existent reg on DCN401 DP_DSC_CNTL no longer exists on DCN401. Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ab1278123d85b43a1cde56fd19f1a698c99fdfa Author: Rodrigo Siqueira Date: Thu May 2 17:39:19 2024 -0600 drm/amd/display: Remove USBC check for DCN32 The CONNECTOR_ID_USBC check was removed to fix a regression, but it was re-introduced by accident. This commit drops the USBC that causes the regressions. Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9bf115ac6613279730cae3b60f63db47cce8083f Author: Rodrigo Siqueira Date: Thu May 2 17:33:22 2024 -0600 drm/amd/display: Remove unused code for some dc files Cleanup unused code in DC. Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7662bc61c030edae9346dc56daa6109ce353f5b4 Author: Joshua Aberback Date: Thu Mar 28 13:43:36 2024 -0400 drm/amd/display: Disable AC/DC codepath when unnecessary [WHY] If there are no DC clock limits present, or if the DC limits are the same as the AC limits, we can disable the AC/DC codepath as there won't be any validation differences between the two modes. [HOW] When all DC power mode clock limits are the same as the max clock values, there won't be any difference between AC mode and DC mode. Zero out DC limits that equal max and provide a new cap to indicate the presence of any non-zero DC mode limit. In summary: - zero out DC limits that are the same as max clock value - new dc cap to indicate the presence of DC mode limits - set limits present if any clock has distinct AC and DC values from SMU Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 78d18b6655fea3d9d8b30fd2b78b11749b4b981f Author: Dillon Varone Date: Mon Apr 22 22:08:58 2024 -0400 drm/amd/display: Create dcn401_clk_mgr struct Create dcn401 specific structure to encapsulate version specific variables. Acked-by: Alex Hung Reviewed-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 98a2e3a0d155f25b15f523a794a75e9f4818c612 Author: Saleemkhan Jamadar Date: Thu Apr 25 18:26:43 2024 +0530 drm/amdgpu/umsch: add support to capture fw debug log Added support to capture unsch fw debug logs in debugfs. To enable set amdgpu_umschfw_log =1 in boot args. v1 - rename variable to umsch_mm_fwlog (Veera) Signed-off-by: Saleemkhan Jamadar Reviewed-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher commit 4b0497d25dc0f01ead2d38b54900063620f0a97c Author: David (Ming Qiang) Wu Date: Thu May 9 16:57:56 2024 -0400 drm/amd/amdgpu: update jpeg 5 capability Based on the documentation the maximum resolustion should be 16384x16384. Signed-off-by: David (Ming Qiang) Wu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a166ec28dbc0d13cd6f3d84818cdce778055f2e4 Author: David (Ming Qiang) Wu Date: Thu May 9 15:44:04 2024 -0400 drm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend On suspend, we need to set power gating state to GATE when VCN5 is busy, otherwise we will get following error on resume: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vcn_unified_0 test failed (-110) [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block failed -110 amdgpu: amdgpu_device_ip_resume failed (-110). PM: dpm_run_callback(): pci_pm_resume+0x0/0x100 returns -110 PM: failed to resume async: error -110 Signed-off-by: David (Ming Qiang) Wu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 10fe1a79cd1bff3048e13120e93c02f8ecd05e9d Author: David (Ming Qiang) Wu Date: Thu May 9 13:40:10 2024 -0400 drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend We do not directly enable/disable VCN IRQ in vcn 5.0.0. And we do not handle the IRQ state as well. So the calls to disable IRQ and set state are removed. This effectively gets rid of the warining of "WARN_ON(!amdgpu_irq_enabled(adev, src, type))" in amdgpu_irq_put(). Signed-off-by: David (Ming Qiang) Wu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit adb9de4dd207fb1264ea70b9eacab9f70ee4707a Author: Ma Jun Date: Wed May 8 16:39:29 2024 +0800 drm/amdgpu/pm: Check input value for power profile setting on smu11, smu13 and smu14 Check the input value for CUSTOM profile mode setting on smu 11, smu13 and smu14. Otherwise we use uninitialized value of input[] Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit df0a9bd92fbbd3fcafcb2bce6463c9228a3e6868 Author: Ma Jun Date: Fri May 10 10:05:21 2024 +0800 drm/amdgpu/pm: Check input value for CUSTOM profile mode setting on legacy SOCs Check the input value for CUSTOM profile mode setting on legacy SOCs. Otherwise we may use uninitalized value of input[] Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit e22e0e483b2c76728ccd119fdcfea81eb176b3a5 Author: Heiner Kallweit Date: Thu May 9 13:37:27 2024 +0200 drm/amd/pm: remove deprecated I2C_CLASS_SPD support from newly added SMU_14_0_2 Support for I2C_CLASS_SPD is currently being removed from the kernel. Only remaining step is to remove the definition of I2C_CLASS_SPD. Setting I2C_CLASS_SPD in a driver is a no-op meanwhile, so remove it here. Reviewed-by: Alex Deucher Signed-off-by: Heiner Kallweit Signed-off-by: Alex Deucher commit 949658cb9b69ab9d22a42a662b2fdc7085689ed8 Author: Shixiong Ou Date: Thu May 9 16:57:58 2024 +0800 drm/radeon: Delay Connector detecting when HPD singals is unstable In some causes, HPD signals will jitter when plugging in or unplugging HDMI. Rescheduling the hotplug work for a second when EDID may still be readable but HDP is disconnected, and fixes this issue. Signed-off-by: Shixiong Ou Signed-off-by: Alex Deucher commit d2d3a44008fea01ec7d5a9d9ca527286be2e0257 Author: Ramesh Errabolu Date: Tue Apr 30 15:24:46 2024 -0500 drm/amd/amdkfd: Fix a resource leak in svm_range_validate_and_map() Analysis of code by Coverity, a static code analyser, has identified a resource leak in the symbol hmm_range. This leak occurs when one of the prior steps before it is released encounters an error. Signed-off-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 745e0a90be2eebe6aae9735b80de05c060d6cb9a Author: Jack Xiao Date: Thu May 9 14:41:03 2024 +0800 drm/amdgpu/mes: fix mes12 to map legacy queue Adjust mes12 initialization sequence to fix mapping legacy queue. v2: use dev_err. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9095e5544061b16d1b331aca3f32c76cbd656d72 Author: Philip Yang Date: Tue Apr 30 13:51:51 2024 -0400 drm/amdkfd: Remove arbitrary timeout for hmm_range_fault On system with khugepaged enabled and user cases with THP buffer, the hmm_range_fault may takes > 15 seconds to return -EBUSY, the arbitrary timeout value is not accurate, cause memory allocation failure. Remove the arbitrary timeout value, return EAGAIN to application if hmm_range_fault return EBUSY, then userspace libdrm and Thunk will call ioctl again. Change EAGAIN to debug message as this is not error. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8a5fc5f0031edcc9fef547866547b748c2bdb039 Author: Jani Nikula Date: Fri May 10 12:43:13 2024 +0300 drm/xe/display: remove unused xe->sb_lock Nothing in xe needs xe->sb_lock. None of the i915 display code using ->sb_lock gets built with xe, and in any case that would be wrong as xe uses gt->pcode.lock for this. Acked-by: Lucas De Marchi Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240510094313.3422982-2-jani.nikula@intel.com Signed-off-by: Jani Nikula commit bd7247e6df124dc9dfe048e319f364e0613d54c3 Author: Jani Nikula Date: Fri May 10 12:43:12 2024 +0300 drm/xe/display: remove unused xe->enabled_irq_mask The xe->enabled_irq_mask member has never been used for anything. Acked-by: Lucas De Marchi Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240510094313.3422982-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 664de50cbfae048d08e9f3c1c0da377d1269e6d1 Author: Michal Wajdeczko Date: Mon May 13 10:42:18 2024 +0200 drm/xe: Fix xe_reg_sr.h Prefer forward declarations over #include xe_reg_sr_types.h Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240513084218.2084-5-michal.wajdeczko@intel.com commit 38830bfe287f9ad97be87a844237beb8e7e64f4a Author: Michal Wajdeczko Date: Mon May 13 10:42:17 2024 +0200 drm/xe: Fix xe_lrc.h Prefer forward declarations over #include xe_lrc_types.h Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240513084218.2084-4-michal.wajdeczko@intel.com commit c5d9c6690ed4cefe9390f8d73ad690332dbc7142 Author: Michal Wajdeczko Date: Mon May 13 10:42:16 2024 +0200 drm/xe: Fix xe_guc_ads.h We don't need to include xe_guc_ads_types.h here. Use forward declaration instead. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240513084218.2084-3-michal.wajdeczko@intel.com commit 304aa805ee8e82adc30159ff43038cd96eb69eb9 Author: Michal Wajdeczko Date: Mon May 13 10:42:15 2024 +0200 drm/xe: Fix xe_gt_throttle_sysfs.h We don't need to include drm/drm_managed.h here. We don't need to comment final #endif. Also remove empty line at the end. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240513084218.2084-2-michal.wajdeczko@intel.com commit ac15c653fb0926f18fef080bbb653a52b3562fcb Author: Jani Nikula Date: Fri May 10 16:26:09 2024 +0300 drm/virtio: switch to struct drm_edid Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/ed6e76a9e94816789ca9caf8775d6a6156877496.1715347488.git.jani.nikula@intel.com commit 5c465601d4232e5d7b71454c13445bab5a5fdaa2 Author: Jani Nikula Date: Fri May 10 16:26:08 2024 +0300 drm/bochs: switch to struct drm_edid Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/24536f4a1a12af7b43ba86e9761dfeef179b72df.1715347488.git.jani.nikula@intel.com commit 78e90e003b96efaa822a6c29d7caabf2481f8c83 Author: Jani Nikula Date: Fri May 10 16:26:07 2024 +0300 drm/i2c: tda998x: switch to struct drm_edid Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/485a33bc4eba9daae109d3f4795bc695e026ba0c.1715347488.git.jani.nikula@intel.com commit 7c585f9a71aa036eb36532a1c29a0304c429441b Author: Jani Nikula Date: Fri May 10 16:26:06 2024 +0300 drm/bridge: anx7625: use struct drm_edid more Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1d1290829fa463237b560c43e77170a986186031.1715347488.git.jani.nikula@intel.com commit 8aa8781ba3c1de4da2775a16049d0a216222cf26 Author: Jani Nikula Date: Fri May 10 16:26:05 2024 +0300 drm/bridge/analogix/anx78xx: switch to struct drm_edid Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/035c7c31a3e096625a69eb4657c1727da4021a62.1715347488.git.jani.nikula@intel.com commit 37f3821c7cc86dfce7836f6018d2ea365c560946 Author: Jani Nikula Date: Fri May 10 16:26:04 2024 +0300 drm/bridge/analogix/anx6345: switch to struct drm_edid Prefer struct drm_edid based functions over struct edid. Signed-off-by: Jani Nikula Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/74b2f00e17b2614b44955cf0cbae270f3c31d91a.1715347488.git.jani.nikula@intel.com commit 591255853a37b1c02afb046588b64e2a4cda484e Author: Sui Jingfeng Date: Mon May 13 23:31:09 2024 +0800 drm/bridge: analogix: Remove redundant checks on existence of bridge->encoder The checks on the existence of bridge->encoder in the implementation of drm_bridge_funcs::attach() is not necessary, as it has already been checked in the drm_bridge_attach() function call by previous bridge or KMS driver. The drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons, hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when various bridge attach functions are called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-13-sui.jingfeng@linux.dev commit ec74951a75070ab969943e438ead202beeec5134 Author: Sui Jingfeng Date: Mon May 13 23:31:08 2024 +0800 drm/bridge: imx: Remove redundant checks on existence of bridge->encoder The checks on the existence of bridge->encoder in the implementation of drm_bridge_funcs::attach() is not necessary, as it has already been checked in the drm_bridge_attach() function call by previous bridge or KMS driver. The drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons, hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when various i.MX specific bridge attach functions are called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-12-sui.jingfeng@linux.dev commit 91942a37ebba1b810fa2e0ac20926f0c45f38023 Author: Sui Jingfeng Date: Mon May 13 23:31:07 2024 +0800 drm/bridge: lt9611uxc: Remove a redundant check on existence of bridge->encoder In the lt9611uxc_connector_init() function, the check on the existence of bridge->encoder is not necessary, as it has already been checked in the drm_bridge_attach() function. And the check on the drm bridge core happens before check in the implementation. Hence, it is guaranteed that the .encoder member of the struct drm_bridge is not NULL when lt9611uxc_connector_init() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-11-sui.jingfeng@linux.dev commit 80221a89ff95ede55be4bdf2c272eb35b6d410c0 Author: Sui Jingfeng Date: Mon May 13 23:31:06 2024 +0800 drm/bridge: synopsys: dw-mipi-dsi: Remove a redundant check on existence of bridge->encoder In the dw_mipi_dsi_bridge_attach() function, the check on the existence of bridge->encoder is not necessary, as it has already been checked in the drm_bridge_attach() function invocked by previous bridge or KMS driver. The previous drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons, hence, it is guaranteed that the .encoder member of the struct drm_bridge is not NULL when dw_mipi_dsi_bridge_attach() function gets called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-10-sui.jingfeng@linux.dev commit 0a59deb2fedb8b6d9299327c4a9a5f4e77002e3b Author: Sui Jingfeng Date: Mon May 13 23:31:05 2024 +0800 drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: Remove a redundant check on existence of bridge->encoder In the ge_b850v3_lvds_create_connector function, the check on the existence of bridge->encoder is not necessary, as it has already been checked in the drm_bridge_attach() function called by upstream bridge or driver. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when cdns_mhdp_connector_init() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-9-sui.jingfeng@linux.dev commit b24fd6e9eb66ff8695526c9e5d4409c1def13c0a Author: Sui Jingfeng Date: Mon May 13 23:31:04 2024 +0800 drm/bridge: cdns-mhdp8546: Remove a redundant check on existence of bridge->encoder In the cdns_mhdp_connector_init() function, the check on the existence of bridge->encoder is not necessary, as it has already been checked in the drm_bridge_attach() function. As the cdns_mhdp_connector_init() is only called by cdns_mhdp_attach(), it is guaranteed that the .encoder member of the struct drm_bridge is not NULL when cdns_mhdp_attach() gets called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-8-sui.jingfeng@linux.dev commit 41e6ed85e4575bba9d62fd03e9b555f9eaa2c241 Author: Sui Jingfeng Date: Mon May 13 23:31:03 2024 +0800 drm/bridge: adv7511: Remove a redundant check on existence of bridge->encoder In the adv7511_connector_init() function, the check on the existence of bridge->encoder is not necessary. As it has already been checked in the drm_bridge_attach() which happens prior to the adv7511_bridge_attach() get called. Also note that the adv7511_connector_init() is only called by adv7511_bridge_attach(). Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when adv7511_connector_init() get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-7-sui.jingfeng@linux.dev commit 8761a39e3f9d9f41a593af2fce1ba41537c35b83 Author: Sui Jingfeng Date: Mon May 13 23:31:02 2024 +0800 drm/bridge: it6505: Remove a redundant check on existence of bridge->encoder In it6505_bridge_attach(), the check on the existence of 'bridge->encoder' is not necessary, as it has already been checked in the drm_bridge_attach() which happens prior to it6505_bridge_attach() get called. Note that the it6505_bridge_attach() will only be called by .attach() of the previous bridge or KMS driver. The previous drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when it6505_bridge_attach() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-6-sui.jingfeng@linux.dev commit a8f856bf054aeba9bb9c1a8b296c61711e9d76fb Author: Sui Jingfeng Date: Mon May 13 23:31:01 2024 +0800 drm/bridge: panel: Remove a redundant check on existence of bridge->encoder Because the existence of 'bridge->encoder' has already been checked before the panel_bridge_attach() function get called, and the drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when panel_bridge_attach() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-5-sui.jingfeng@linux.dev commit 0f4bca4e1be3d1a725ac12a632950d7bb3d51e59 Author: Sui Jingfeng Date: Mon May 13 23:31:00 2024 +0800 drm/bridge: nxp-ptn3460: Remove a redundant check on existence of bridge->encoder Because the existence of 'bridge->encoder' has already been checked before the ptn3460_bridge_attach() function get called, and drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when the ptn3460_bridge_attach() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-4-sui.jingfeng@linux.dev commit 482ade3ec1c5528811c878bd4329e0e1cbc6c59c Author: Sui Jingfeng Date: Mon May 13 23:30:59 2024 +0800 drm/bridge: tfp410: Remove a redundant check on existence of bridge->encoder Because the existence of bridge->encoder has already been checked before the simple_bridge_attach() function get called, And drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when the tfp410_attach() function get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-3-sui.jingfeng@linux.dev commit f0a83a2cf9eb99be74b81ff655b01b5a9710525d Author: Sui Jingfeng Date: Mon May 13 23:30:58 2024 +0800 drm/bridge: simple-bridge: Remove a redundant check on existence of bridge->encoder Because the existence of 'bridge->encoder' has already been checked before the simple_bridge_attach() function get called, and drm_bridge_attach() will quit with a negative error code returned if it fails for some reasons. Hence, it is guaranteed that the .encoder member of the drm_bridge instance is not NULL when the simple_bridge_attach() get called. Remove the redundant checking codes "if (!bridge->encoder) { ... }". Reviewed-by: Laurent Pinchart Signed-off-by: Sui Jingfeng Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-2-sui.jingfeng@linux.dev commit c7df997b260919e4d18b2dee21cae6bcf765babc Author: Ville Syrjälä Date: Mon May 6 15:57:18 2024 +0300 drm/i915: Rename the fb pinning functions to indicate the address space Rename the fb pinning functions such that their name directly informs us what gets pinned into which address space. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Lucas De Marchi commit 9e9402b64a9bb217be5a713758082808425b64ae Author: Ville Syrjälä Date: Fri May 10 13:22:57 2024 +0300 drm/i915: Cleanup fbdev fb setup We use a mix of 'intel_fb' vs. 'ifbdev->fb' in the same function. Both should be pointing at the same thing. Make things less confusing by just getting existing fb from 'ifbdev->fb' at the start and then sticking with the local 'fb' (renamed from the 'intel_fb') until the very end. v2: rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510102257.25096-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 6eca4dbe499890ce4340f49d309029e131e1e3e7 Author: Ville Syrjälä Date: Fri May 10 13:22:33 2024 +0300 drm/i915: Change intel_fbdev_fb_alloc() return type Change intel_fbdev_fb_alloc() to return struct intel_fb instead of struct drm_framebuffer. Let's us eliminate some annoying aliasing variables in the fbdev setup code. v2: Assing the results to the correct variable (Jani) Fix xe's copy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510102233.25057-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Lucas De Marchi commit 67f5728a895454108383d46e14ccecf8db117ea3 Author: Ville Syrjälä Date: Mon May 6 15:57:15 2024 +0300 drm/i915: Constify 'fb' in during pinning Make the 'fb' pointers const in the pinning code. We never want to mutate these. Also nuke a few aliasing fb vs. intel_fb cases by just using the more specific type everywhere in the same function. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Lucas De Marchi commit a3598d7d9ae9b4c9ded0f052d96ca5800758d949 Author: Deming Wang Date: Mon May 13 02:14:51 2024 -0400 drm/i915/gem/i915_gem_ttm_move: Fix typo The mapings should be replaced by mappings. Reviewed-by: Rodrigo Vivi Signed-off-by: Deming Wang Link: https://patchwork.freedesktop.org/patch/msgid/20240513061451.1627-1-wangdeming@inspur.com Signed-off-by: Rodrigo Vivi commit 56c12ec72ae8bd90cce1ea59dba2b93f986606be Author: Uma Shankar Date: Thu May 9 11:05:08 2024 +0530 drm/i915: Implement Audio WA_14020863754 WA_14020863754: Corner case with Min Hblank Fix can cause audio hang Issue: Previously a fix was made to avoid issues with extremely small hblanks, called the "Min Hblank Fix". However, this can potentially cause an audio hang. Workaround : During "Audio Programming Sequence" Audio Enabling - When DP mode is enabled Set mmio offset 0x65F1C bit 18 = 1b, before step #1 "Enable audio Presence Detect" During "Audio Programming Sequence" Audio Disabling - When DP mode is enabled Clear mmio offset 0x65F1C bit 18 = 0b, after step #6 "Disable Audio PD (Presence Detect)" If not clearing PD bit, must also not clear 0x65F1C bit 18 (leave = 1b) v2: Update the platform checks (Jani Nikula) v3: Limited the WA to LNL and BMG, added a helper (Matt Roper) v4: Updated the bit naming, fixed redundant if statement Signed-off-by: Uma Shankar Reviewed-by: Chaitanya Kumar Borah Link: https://patchwork.freedesktop.org/patch/msgid/20240509053508.2807834-1-uma.shankar@intel.com commit 4f9206e8c2c15a3770e3eb0b9755a05d559fecea Author: Breno Leitao Date: Wed May 8 02:54:09 2024 -0700 wifi: ath12k: allocate dummy net_device dynamically Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_device from struct ath12k_ext_irq_grp by converting it into a pointer. Then use the leverage alloc_netdev_dummy() to allocate the net_device object at ath12k_pci_ext_irq_config(). The free of the device occurs at ath12k_pci_free_ext_irq(). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240508095410.1923198-1-leitao@debian.org commit 6d67d18014a8130defbca1972d7f0e0a8f8f259e Author: Marc Gonzalez Date: Mon Apr 29 16:06:29 2024 +0200 wifi: ath10k: do not always wait for MSA_READY indicator The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable. Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE. fw_version 0x100204b2 fw_build_timestamp 2019-09-04 03:01 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2 Jeff Johnson wrote: The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it. However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior. Signed-off-by: Marc Gonzalez Reviewed-by: Bjorn Andersson Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/23540303-5816-45d5-a1af-5f09d645a73b@freebox.fr commit 71b6e321e30271beb08772871c4f76777f49e402 Author: Marc Gonzalez Date: Mon Apr 29 16:04:51 2024 +0200 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable. cf. ath10k_qmi_driver_event_work() Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE. Jeff Johnson wrote: The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it. However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior. Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property. Signed-off-by: Marc Gonzalez Reviewed-by: Bjorn Andersson Acked-by: Jeff Johnson Acked-by: Rob Herring (Arm) Signed-off-by: Kalle Valo Link: https://msgid.link/54ac2295-36b4-49fc-9583-a10db8d9d5d6@freebox.fr commit 3b9344740843d965e9e37fba30620b3b1c0afa4f Author: Jeff Johnson Date: Tue May 7 13:45:03 2024 +0300 wifi: ath12k: initialize 'ret' in ath12k_dp_rxdma_ring_sel_config_wcn7850() smatch flagged the following issue: drivers/net/wireless/ath/ath12k/dp_rx.c:4065 ath12k_dp_rxdma_ring_sel_config_wcn7850() error: uninitialized symbol 'ret'. In ath12k_dp_rxdma_ring_sel_config_wcn7850() if it were ever the case that ab->hw_params->num_rxdma_per_pdev was 0 then 'ret' would be uninitialized when it is returned. This should never be the case, but to be safe and to quiet smatch, add an initializer to the declaration of 'ret'. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240504-ath12k_dp_rxdma_ring_sel_config_wcn7850-ret-v1-2-44d2843a2857@quicinc.com commit ff5fa958d2fd45de7282a8bd3968426c947591d5 Author: Jeff Johnson Date: Sat May 4 14:45:17 2024 -0700 wifi: ath12k: fix misspelling of "dma" in num_rxmda_per_pdev The ath12k_hw_params member num_rxmda_per_pdev contains a misspelling of "dma" so fix it. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240504-ath12k_dp_rxdma_ring_sel_config_wcn7850-ret-v1-1-44d2843a2857@quicinc.com commit a6efa4ea06138d04b50ed5a7954a307a91a33478 Author: Jeff Johnson Date: Sat May 4 14:36:35 2024 -0700 wifi: ath11k: fix misspelling of "dma" in num_rxmda_per_pdev The ath11k_hw_params member num_rxmda_per_pdev contains a misspelling of "dma" so fix it. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240504-ath11k-num_rxmda_per_pdev-v1-1-7f97bced8495@quicinc.com commit 2db7a82fd150193849d04592e205b3d178207840 Author: Karthikeyan Periyasamy Date: Mon May 6 23:00:17 2024 +0530 wifi: ath12k: avoid double SW2HW_MACID conversion Currently, ath12k_wmi_pdev_dma_ring_cfg() fails due to an invalid pdev_id parameter passed to the WMI_PDEV_DMA_RING_CFG_REQ_CMDID WMI command. This invalid pdev_id is caused by a double conversion of the MAC ID. Since the the caller of ath12k_wmi_pdev_dma_ring_cfg() already performs the MAC ID conversion, it is unnecessary to do it again within the function. To fix this, remove the software (SW) to hardware (HW) MAC ID conversion from ath12k_wmi_pdev_dma_ring_cfg() to avoid this redundant conversion. Found in code review. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240506173017.597715-1-quic_periyasa@quicinc.com commit 199f149e97dc7be80e5eed4b232529c1d1aa8055 Author: Jeff Johnson Date: Sat May 4 11:52:09 2024 -0700 wifi: ath11k: initialize 'ret' in ath11k_qmi_load_file_target_mem() smatch flagged the following issue: drivers/net/wireless/ath/ath11k/qmi.c:2401 ath11k_qmi_load_file_target_mem() error: uninitialized symbol 'ret'. The reality is that 'ret' is initialized in every path through ath11k_qmi_load_file_target_mem() except one, the case where the input 'len' is 0, and hence the "while (remaining)" loop is never entered. But to make sure this case is also handled, add an initializer to the declaration of 'ret'. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240504-qmi_load_file_target_mem-v1-2-069fc44c45eb@quicinc.com commit bb0b0a6b96e6de854cb1e349e17bd0e8bf421a59 Author: Jeff Johnson Date: Sat May 4 11:52:08 2024 -0700 wifi: ath12k: initialize 'ret' in ath12k_qmi_load_file_target_mem() smatch flagged the following issue: drivers/net/wireless/ath/ath12k/qmi.c:2619 ath12k_qmi_load_file_target_mem() error: uninitialized symbol 'ret'. The reality is that 'ret' is initialized in every path through ath12k_qmi_load_file_target_mem() except one, the case where the input 'len' is 0, and hence the "while (remaining)" loop is never entered. But to make sure this case is also handled, add an initializer to the declaration of 'ret'. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240504-qmi_load_file_target_mem-v1-1-069fc44c45eb@quicinc.com commit 2262e917b3da5c129086b035677291b2e3e4bab9 Author: Thomas Zimmermann Date: Fri May 10 17:47:12 2024 +0200 drm/udl: Remove struct udl_connector Udl's struct udl_connector is an empty wrapper around struct drm_connector. Remove it. Allocate the connector as part of struct udl_device and inline the init function into its only caller. v2: - fix return value in udl_modeset_init() (Dan) Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240510154841.11370-6-tzimmermann@suse.de commit 90e0fd1e6c85469a6ff4ebd4352d2187be30c559 Author: Thomas Zimmermann Date: Fri May 10 17:47:11 2024 +0200 drm/udl: Untangle .get_modes() and .detect_ctx() Provide separate implementations of .get_modes() and .detect_ctx() from struct drm_connector. Switch to struct drm_edid. Udl's .detect() helper used to fetch the EDID from the adapter and the .get_modes() helper provided display modes from the data. But this relied on the DRM helpers to call the functions in the correct order. When no EDID could be retrieved, .detect() regularly printed a warning to the kernel log. Switching to the new helpers around struct drm_edid separates both from each other. The .get_modes() helper now fetches the EDID by itself and the .detect_ctx() helper only tests for its presence. The patch does a number of things to implement this. - Move udl_get_edid_block() to udl_edid.c and rename it to udl_read_edid_block(). Then use the helper to implement probing in udl_probe_edid() and reading in udl_edid_read(). The latter helper is build on top of DRM helpers. - Replace the existing code in .get_modes() and .detect() with udl's new EDID helpers. The new code behaves like DRM's similar DDC-based helpers. Instead of .detect(), udl now implements .detect_ctx(). - Remove the edid data from struct udl_connector. The field cached the EDID data between calls to .detect() and .get_modes(), but is now unused. v3: - implement udl_probe_edid() with memchr_inv() (Jani) v2: - implement udl_probe_edid() within udl - reword commit description Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240510154841.11370-5-tzimmermann@suse.de commit 9f2b334bd280dd18965f57f93108e71bc57e4992 Author: Thomas Zimmermann Date: Fri May 10 17:47:10 2024 +0200 drm/udl: Clean up Makefile Clean up Makefile before listing new object files. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240510154841.11370-4-tzimmermann@suse.de commit bf1754789386e2f3ffc06aa77818ff80fe27475f Author: Thomas Zimmermann Date: Fri May 10 17:47:09 2024 +0200 drm/udl: Move drm_dev_{enter, exit}() into udl_get_edid_block() Protect the code in udl_get_edid_block() with drm_dev_enter() and drm_dev_exit(), so that all callers automatically invoke it. The function uses hardware resources, which can be hot-unplugged at any time. The other code in udl_connector_detect() does not use the resources of the hardware device and therefore does not require protection. This change will allow to use udl_get_edid_block() in various contexts easily. Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240510154841.11370-3-tzimmermann@suse.de commit 5aed213c7c6c4f5dcb1a3ef146f493f18fe703dc Author: Thomas Zimmermann Date: Fri May 10 17:47:08 2024 +0200 drm/udl: Remove DRM_CONNECTOR_POLL_HPD DisplayLink devices do not generate hotplug events. Remove the poll flag DRM_CONNECTOR_POLL_HPD, as it may not be specified together with DRM_CONNECTOR_POLL_CONNECT or DRM_CONNECTOR_POLL_DISCONNECT. Signed-off-by: Thomas Zimmermann Fixes: afdfc4c6f55f ("drm/udl: Fixed problem with UDL adpater reconnection") Reviewed-by: Jani Nikula Cc: Robert Tarasov Cc: Alex Deucher Cc: Dave Airlie Cc: Sean Paul Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: # v4.15+ Link: https://patchwork.freedesktop.org/patch/msgid/20240510154841.11370-2-tzimmermann@suse.de commit 84ceb14076592abd08d06d403ebe18aa60d5d505 Author: Suraj Kandpal Date: Tue May 7 09:34:07 2024 +0530 drm/i915/dp: Write panel override luminance values Write panel override luminance values which helps the TCON decide if tone mapping needs to be enabled or not. Signed-off-by: Suraj Kandpal Reviewed-by: Sebastian Wick Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-8-suraj.kandpal@intel.com commit b0944c983d274ac485f44f1b0d3a31a52fc3f6e2 Author: Suraj Kandpal Date: Tue May 7 09:34:06 2024 +0530 drm/i915/dp: Enable AUX based backlight for HDR As of now whenerver HDR is switched on we use the PWM to change the backlight as opposed to AUX based backlight changes in terms of nits. This patch writes to the appropriate DPCD registers to enable aux based backlight using values in nits. --v2 -Fix max_cll and max_fall assignment [Jani] -Fix the size sent in drm_dpcd_write [Jani] --v3 -Content Luminance needs to be sent only for pre-ICL after that it is directly picked up from hdr metadata [Ville] --v4 -Add checks for HDR TCON cap bits [Ville] -Check eotf of hdr_output_data and sets bits base of that value. --v5 -Fix capability check bits. -Check colorspace before setting BT2020 --v6 -Use intel_dp_has_gamut_dip to check if we have capability to send sdp [Ville] -Seprate filling of all hdr tcon related bits into it's own function. -Check eotf data to make sure we are in HDR mode [Sebastian] --v7 -Fix confusion function name for hdr mode check [Jani] -Fix the condition which tells us if we are in HDR mode or not [Sebastian] --v8 -Call fill_hdr_tcon_param unconditionally as some parameters may not be dependent on the fact if we are in hdr mode or not [Sebastian] -Fix some conditions after change in hdr mode check [Sebastian] Signed-off-by: Suraj Kandpal Reviewed-by: Sebastian Wick Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-7-suraj.kandpal@intel.com commit f60ce4bd058cdc54bd7a2eb6067cbbf054cda1a2 Author: Suraj Kandpal Date: Tue May 7 09:34:05 2024 +0530 drm/i915/dp: Drop comments on EDP HDR DPCD registers Drop comments for EDP HDR DPCD registers as the code and conditions will tell us what can be written where. --v2 -Drop the comments altogether instead of just renaming them [Sebastian] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-6-suraj.kandpal@intel.com commit 7ac0331344168414cea48ea377b93d78fea8644f Author: Suraj Kandpal Date: Tue May 7 09:34:04 2024 +0530 drm/i915/dp: Fix Register bit naming Change INTEL_EDP_HDR_TCON_SDP_COLORIMETRY enable to INTEL_EDP_HDR_TCON_SDP_OVERRIDE_AUX as this bit tells TCON to ignore DPCD colorimetry values and take the one's sent through SDP. --v2 -Fix typo in commit message [Arun] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-5-suraj.kandpal@intel.com commit 7d24900c8460e6eef1bbfa5db1d5bbed7bfa45ef Author: Suraj Kandpal Date: Tue May 7 09:34:03 2024 +0530 drm/i915/dp: Add TCON HDR capability checks Add checks to see the HDR capability of TCON panel. Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-4-suraj.kandpal@intel.com commit dabe0f9f2b17088c51a9c50b990fba19e9a7e1d4 Author: Suraj Kandpal Date: Tue May 7 09:34:02 2024 +0530 drm/i915/dp: Rename intel struct inside intel_panel Rename intel to intel cap which is present inside panel.edp struct to make it more sensible to tell us what it contains. Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-3-suraj.kandpal@intel.com commit 79c520bc0fbb4e763316659d03d54196fbbb5f4a Author: Suraj Kandpal Date: Tue May 7 09:34:01 2024 +0530 drm/i915/dp: Make has_gamut_metadata_dip() non static Make has_gamut_metadata_dip() non static so it can also be used to at other places eg in intel_dp_aux_backlight. So that we can check if HW is capable of sending SDP which helps us decide if we use AUX based HDR control or via SDP. --v2 -State reason the function is needed [Arun] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-2-suraj.kandpal@intel.com commit 6f627b425378915b6eda30908bedefc21b70b8c4 Author: Brijesh Singh Date: Wed May 1 03:52:07 2024 -0500 KVM: SVM: Add module parameter to enable SEV-SNP Add a module parameter than can be used to enable or disable the SEV-SNP feature. Now that KVM contains the support for the SNP set the GHCB hypervisor feature flag to indicate that SNP is supported. Signed-off-by: Brijesh Singh Reviewed-by: Paolo Bonzini Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-18-michael.roth@amd.com> Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini commit ea262f8a7c360e71f3cb6c2151fd9bfcefd090e9 Author: Ashish Kalra Date: Wed May 1 03:52:06 2024 -0500 KVM: SEV: Avoid WBINVD for HVA-based MMU notifications for SNP With SNP/guest_memfd, private/encrypted memory should not be mappable, and MMU notifications for HVA-mapped memory will only be relevant to unencrypted guest memory. Therefore, the rationale behind issuing a wbinvd_on_all_cpus() in sev_guest_memory_reclaimed() should not apply for SNP guests and can be ignored. Signed-off-by: Ashish Kalra Reviewed-by: Paolo Bonzini [mdr: Add some clarifications in commit] Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-17-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit b2104024f40cadd7d357981c51c6437a41d86f63 Author: Michael Roth Date: Wed May 1 03:52:05 2024 -0500 KVM: x86: Implement hook for determining max NPT mapping level In the case of SEV-SNP, whether or not a 2MB page can be mapped via a 2MB mapping in the guest's nested page table depends on whether or not any subpages within the range have already been initialized as private in the RMP table. The existing mixed-attribute tracking in KVM is insufficient here, for instance: - gmem allocates 2MB page - guest issues PVALIDATE on 2MB page - guest later converts a subpage to shared - SNP host code issues PSMASH to split 2MB RMP mapping to 4K - KVM MMU splits NPT mapping to 4K - guest later converts that shared page back to private At this point there are no mixed attributes, and KVM would normally allow for 2MB NPT mappings again, but this is actually not allowed because the RMP table mappings are 4K and cannot be promoted on the hypervisor side, so the NPT mappings must still be limited to 4K to match this. Implement a kvm_x86_ops.private_max_mapping_level() hook for SEV that checks for this condition and adjusts the mapping level accordingly. Reviewed-by: Paolo Bonzini Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-16-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 8eb01900b018b1bf20ce695758f30be71bd1b9ac Author: Michael Roth Date: Wed May 1 03:52:04 2024 -0500 KVM: SEV: Implement gmem hook for invalidating private pages Implement a platform hook to do the work of restoring the direct map entries of gmem-managed pages and transitioning the corresponding RMP table entries back to the default shared/hypervisor-owned state. Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-15-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 4f2e7aa1cfdf4374a4c876c9358e0d7035647eb1 Author: Michael Roth Date: Wed May 1 03:52:03 2024 -0500 KVM: SEV: Implement gmem hook for initializing private pages This will handle the RMP table updates needed to put a page into a private state before mapping it into an SEV-SNP guest. Reviewed-by: Paolo Bonzini Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-14-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit e366f92ea99e1961fbad5e2110900e9f4fcb249b Author: Tom Lendacky Date: Wed May 1 03:52:02 2024 -0500 KVM: SEV: Support SEV-SNP AP Creation NAE event Add support for the SEV-SNP AP Creation NAE event. This allows SEV-SNP guests to alter the register state of the APs on their own. This allows the guest a way of simulating INIT-SIPI. A new event, KVM_REQ_UPDATE_PROTECTED_GUEST_STATE, is created and used so as to avoid updating the VMSA pointer while the vCPU is running. For CREATE The guest supplies the GPA of the VMSA to be used for the vCPU with the specified APIC ID. The GPA is saved in the svm struct of the target vCPU, the KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event is added to the vCPU and then the vCPU is kicked. For CREATE_ON_INIT: The guest supplies the GPA of the VMSA to be used for the vCPU with the specified APIC ID the next time an INIT is performed. The GPA is saved in the svm struct of the target vCPU. For DESTROY: The guest indicates it wishes to stop the vCPU. The GPA is cleared from the svm struct, the KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event is added to vCPU and then the vCPU is kicked. The KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event handler will be invoked as a result of the event or as a result of an INIT. If a new VMSA is to be installed, the VMSA guest page is set as the VMSA in the vCPU VMCB and the vCPU state is set to KVM_MP_STATE_RUNNABLE. If a new VMSA is not to be installed, the VMSA is cleared in the vCPU VMCB and the vCPU state is set to KVM_MP_STATE_HALTED to prevent it from being run. Signed-off-by: Tom Lendacky Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-13-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit c63cf135cc996fc88be95a9ba8b80e3cff8d275b Author: Brijesh Singh Date: Wed May 1 03:52:01 2024 -0500 KVM: SEV: Add support to handle RMP nested page faults When SEV-SNP is enabled in the guest, the hardware places restrictions on all memory accesses based on the contents of the RMP table. When hardware encounters RMP check failure caused by the guest memory access it raises the #NPF. The error code contains additional information on the access type. See the APM volume 2 for additional information. When using gmem, RMP faults resulting from mismatches between the state in the RMP table vs. what the guest expects via its page table result in KVM_EXIT_MEMORY_FAULTs being forwarded to userspace to handle. This means the only expected case that needs to be handled in the kernel is when the page size of the entry in the RMP table is larger than the mapping in the nested page table, in which case a PSMASH instruction needs to be issued to split the large RMP entry into individual 4K entries so that subsequent accesses can succeed. Signed-off-by: Brijesh Singh Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-12-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 9b54e248d2644be71cb394eb85f31ad99e023a05 Author: Michael Roth Date: Wed May 1 03:52:00 2024 -0500 KVM: SEV: Add support to handle Page State Change VMGEXIT SEV-SNP VMs can ask the hypervisor to change the page state in the RMP table to be private or shared using the Page State Change NAE event as defined in the GHCB specification version 2. Forward these requests to userspace as KVM_EXIT_VMGEXITs, similar to how it is done for requests that don't use a GHCB page. As with the MSR-based page-state changes, use the existing KVM_HC_MAP_GPA_RANGE hypercall format to deliver these requests to userspace via KVM_EXIT_HYPERCALL. Signed-off-by: Michael Roth Co-developed-by: Brijesh Singh Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-11-michael.roth@amd.com> Co-developed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini commit d46b7b6a5f9ec652a9e3ac6344f679235c9b67da Author: Michael Roth Date: Wed May 1 03:51:59 2024 -0500 KVM: SEV: Add support to handle MSR based Page State Change VMGEXIT SEV-SNP VMs can ask the hypervisor to change the page state in the RMP table to be private or shared using the Page State Change MSR protocol as defined in the GHCB specification. When using gmem, private/shared memory is allocated through separate pools, and KVM relies on userspace issuing a KVM_SET_MEMORY_ATTRIBUTES KVM ioctl to tell the KVM MMU whether or not a particular GFN should be backed by private memory or not. Forward these page state change requests to userspace so that it can issue the expected KVM ioctls. The KVM MMU will handle updating the RMP entries when it is ready to map a private page into a guest. Use the existing KVM_HC_MAP_GPA_RANGE hypercall format to deliver these requests to userspace via KVM_EXIT_HYPERCALL. Signed-off-by: Michael Roth Co-developed-by: Brijesh Singh Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-10-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 0c76b1d08280649f789e1b537b397cefc43da7a0 Author: Brijesh Singh Date: Wed May 1 03:51:58 2024 -0500 KVM: SEV: Add support to handle GHCB GPA register VMGEXIT SEV-SNP guests are required to perform a GHCB GPA registration. Before using a GHCB GPA for a vCPU the first time, a guest must register the vCPU GHCB GPA. If hypervisor can work with the guest requested GPA then it must respond back with the same GPA otherwise return -1. On VMEXIT, verify that the GHCB GPA matches with the registered value. If a mismatch is detected, then abort the guest. Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-9-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit ad27ce155566f2b4400fa865859834592bd18777 Author: Brijesh Singh Date: Wed May 1 03:51:57 2024 -0500 KVM: SEV: Add KVM_SEV_SNP_LAUNCH_FINISH command Add a KVM_SEV_SNP_LAUNCH_FINISH command to finalize the cryptographic launch digest which stores the measurement of the guest at launch time. Also extend the existing SNP firmware data structures to support disabling the use of Versioned Chip Endorsement Keys (VCEK) by guests as part of this command. While finalizing the launch flow, the code also issues the LAUNCH_UPDATE SNP firmware commands to encrypt/measure the initial VMSA pages for each configured vCPU, which requires setting the RMP entries for those pages to private, so also add handling to clean up the RMP entries for these pages whening freeing vCPUs during shutdown. Signed-off-by: Brijesh Singh Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Harald Hoyer Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-8-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit dee5a47cc7a45287ec1137edb745bb4dffbe85f6 Author: Brijesh Singh Date: Wed May 1 03:51:56 2024 -0500 KVM: SEV: Add KVM_SEV_SNP_LAUNCH_UPDATE command A key aspect of a launching an SNP guest is initializing it with a known/measured payload which is then encrypted into guest memory as pre-validated private pages and then measured into the cryptographic launch context created with KVM_SEV_SNP_LAUNCH_START so that the guest can attest itself after booting. Since all private pages are provided by guest_memfd, make use of the kvm_gmem_populate() interface to handle this. The general flow is that guest_memfd will handle allocating the pages associated with the GPA ranges being initialized by each particular call of KVM_SEV_SNP_LAUNCH_UPDATE, copying data from userspace into those pages, and then the post_populate callback will do the work of setting the RMP entries for these pages to private and issuing the SNP firmware calls to encrypt/measure them. For more information see the SEV-SNP specification. Signed-off-by: Brijesh Singh Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-7-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 136d8bc931c84fbe4c70c2d6e0a4d20a2aa90505 Author: Brijesh Singh Date: Wed May 1 03:51:55 2024 -0500 KVM: SEV: Add KVM_SEV_SNP_LAUNCH_START command KVM_SEV_SNP_LAUNCH_START begins the launch process for an SEV-SNP guest. The command initializes a cryptographic digest context used to construct the measurement of the guest. Other commands can then at that point be used to load/encrypt data into the guest's initial launch image. For more information see the SEV-SNP specification. Signed-off-by: Brijesh Singh Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Ashish Kalra Message-ID: <20240501085210.2213060-6-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 1dfe571c12cf99244b933208fb77f29471ded677 Author: Brijesh Singh Date: Wed May 1 03:51:54 2024 -0500 KVM: SEV: Add initial SEV-SNP support SEV-SNP builds upon existing SEV and SEV-ES functionality while adding new hardware-based security protection. SEV-SNP adds strong memory encryption and integrity protection to help prevent malicious hypervisor-based attacks such as data replay, memory re-mapping, and more, to create an isolated execution environment. Define a new KVM_X86_SNP_VM type which makes use of these capabilities and extend the KVM_SEV_INIT2 ioctl to support it. Also add a basic helper to check whether SNP is enabled and set PFERR_PRIVATE_ACCESS for private #NPFs so they are handled appropriately by KVM MMU. Signed-off-by: Brijesh Singh Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Ashish Kalra Reviewed-by: Paolo Bonzini Message-ID: <20240501085210.2213060-5-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit a8e31983335554193c2cb373161d08880230abfd Author: Michael Roth Date: Wed May 1 03:51:53 2024 -0500 KVM: SEV: Select KVM_GENERIC_PRIVATE_MEM when CONFIG_KVM_AMD_SEV=y SEV-SNP relies on private memory support to run guests, so make sure to enable that support via the CONFIG_KVM_GENERIC_PRIVATE_MEM config option. Signed-off-by: Michael Roth Message-ID: <20240501085210.2213060-4-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit b74d002d3d587c38d01853580fd257db30edd1d0 Author: Michael Roth Date: Thu May 9 18:05:29 2024 -0500 KVM: MMU: Disable fast path if KVM_EXIT_MEMORY_FAULT is needed For hardware-protected VMs like SEV-SNP guests, certain conditions like attempting to perform a write to a page which is not in the state that the guest expects it to be in can result in a nested/extended #PF which can only be satisfied by the host performing an implicit page state change to transition the page into the expected shared/private state. This is generally handled by generating a KVM_EXIT_MEMORY_FAULT event that gets forwarded to userspace to handle via KVM_SET_MEMORY_ATTRIBUTES. However, the fast_page_fault() code might misconstrue this situation as being the result of a write-protected access, and treat it as a spurious case when it sees that writes are already allowed for the sPTE. This results in the KVM MMU trying to resume the guest rather than taking any action to satisfy the real source of the #PF such as generating a KVM_EXIT_MEMORY_FAULT, resulting in the guest spinning on nested #PFs. Check for this condition and bail out of the fast path if it is detected. Suggested-by: Paolo Bonzini Suggested-by: Sean Christopherson Cc: Isaku Yamahata Reviewed-by: Isaku Yamahata Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini commit 7323260373499857e07f879cb041f048652e724f Merge: 7d41e24da29a8 f32fb32820b11 Author: Paolo Bonzini Date: Fri May 10 13:12:41 2024 -0400 Merge branch 'kvm-coco-hooks' into HEAD Common patches for the target-independent functionality and hooks that are needed by SEV-SNP and TDX. commit 11cdc8f2bde4bc548da6f995556c4b7183431088 Author: Jani Nikula Date: Fri May 10 12:09:51 2024 +0300 drm: use "0" instead of "" for deprecated driver date libdrm does not like the empty string for driver date. Use "0" instead, which has been used by virtio previously. Reported-by: Steven Price Closes: https://lore.kernel.org/r/9d0cff47-308e-4b11-a9f3-4157dc26b6fa@arm.com Fixes: 7fb8af6798e8 ("drm: deprecate driver date") Signed-off-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240510090951.3398882-1-jani.nikula@intel.com Reviewed-by: Javier Martinez Canillas Tested-by: Steven Price Reviewed-by: Simon Ser commit f32fb32820b1139b29300733f339adbe0f10652d Author: Michael Roth Date: Wed May 1 03:51:52 2024 -0500 KVM: x86: Add hook for determining max NPT mapping level In the case of SEV-SNP, whether or not a 2MB page can be mapped via a 2MB mapping in the guest's nested page table depends on whether or not any subpages within the range have already been initialized as private in the RMP table. The existing mixed-attribute tracking in KVM is insufficient here, for instance: - gmem allocates 2MB page - guest issues PVALIDATE on 2MB page - guest later converts a subpage to shared - SNP host code issues PSMASH to split 2MB RMP mapping to 4K - KVM MMU splits NPT mapping to 4K - guest later converts that shared page back to private At this point there are no mixed attributes, and KVM would normally allow for 2MB NPT mappings again, but this is actually not allowed because the RMP table mappings are 4K and cannot be promoted on the hypervisor side, so the NPT mappings must still be limited to 4K to match this. Add a hook to determine the max NPT mapping size in situations like this. Suggested-by: Sean Christopherson Signed-off-by: Michael Roth Reviewed-by: Isaku Yamahata Message-ID: <20240501085210.2213060-3-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit a90764f0e4ed5350cc9caeb384e0fb356c032587 Author: Michael Roth Date: Sat Dec 30 11:23:21 2023 -0600 KVM: guest_memfd: Add hook for invalidating memory In some cases, like with SEV-SNP, guest memory needs to be updated in a platform-specific manner before it can be safely freed back to the host. Wire up arch-defined hooks to the .free_folio kvm_gmem_aops callback to allow for special handling of this sort when freeing memory in response to FALLOC_FL_PUNCH_HOLE operations and when releasing the inode, and go ahead and define an arch-specific hook for x86 since it will be needed for handling memory used for SEV-SNP guests. Signed-off-by: Michael Roth Message-Id: <20231230172351.574091-6-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit 1f6c06b177513e8a47c43e95d1985dbd9cff3ddd Author: Paolo Bonzini Date: Wed Feb 14 12:09:06 2024 -0500 KVM: guest_memfd: Add interface for populating gmem pages with user data During guest run-time, kvm_arch_gmem_prepare() is issued as needed to prepare newly-allocated gmem pages prior to mapping them into the guest. In the case of SEV-SNP, this mainly involves setting the pages to private in the RMP table. However, for the GPA ranges comprising the initial guest payload, which are encrypted/measured prior to starting the guest, the gmem pages need to be accessed prior to setting them to private in the RMP table so they can be initialized with the userspace-provided data. Additionally, an SNP firmware call is needed afterward to encrypt them in-place and measure the contents into the guest's launch digest. While it is possible to bypass the kvm_arch_gmem_prepare() hooks so that this handling can be done in an open-coded/vendor-specific manner, this may expose more gmem-internal state/dependencies to external callers than necessary. Try to avoid this by implementing an interface that tries to handle as much of the common functionality inside gmem as possible, while also making it generic enough to potentially be usable/extensible for TDX as well. Suggested-by: Sean Christopherson Signed-off-by: Michael Roth Co-developed-by: Michael Roth Signed-off-by: Paolo Bonzini commit 17573fd971f9e31ddee420eca8359ceff87e9e51 Author: Paolo Bonzini Date: Thu Apr 4 13:27:46 2024 -0400 KVM: guest_memfd: extract __kvm_gmem_get_pfn() In preparation for adding a function that walks a set of pages provided by userspace and populates them in a guest_memfd, add a version of kvm_gmem_get_pfn() that has a "bool prepare" argument and passes it down to kvm_gmem_get_folio(). Populating guest memory has to call repeatedly __kvm_gmem_get_pfn() on the same file, so make the new function take struct file*. Signed-off-by: Paolo Bonzini commit 3bb2531e20bff99f9cd8719ee7aea8bd82687173 Author: Paolo Bonzini Date: Tue May 7 12:54:03 2024 -0400 KVM: guest_memfd: Add hook for initializing memory guest_memfd pages are generally expected to be in some arch-defined initial state prior to using them for guest memory. For SEV-SNP this initial state is 'private', or 'guest-owned', and requires additional operations to move these pages into a 'private' state by updating the corresponding entries the RMP table. Allow for an arch-defined hook to handle updates of this sort, and go ahead and implement one for x86 so KVM implementations like AMD SVM can register a kvm_x86_ops callback to handle these updates for SEV-SNP guests. The preparation callback is always called when allocating/grabbing folios via gmem, and it is up to the architecture to keep track of whether or not the pages are already in the expected state (e.g. the RMP table in the case of SEV-SNP). In some cases, it is necessary to defer the preparation of the pages to handle things like in-place encryption of initial guest memory payloads before marking these pages as 'private'/'guest-owned'. Add an argument (always true for now) to kvm_gmem_get_folio() that allows for the preparation callback to be bypassed. To detect possible issues in the way userspace initializes memory, it is only possible to add an unprepared page if it is not already included in the filemap. Link: https://lore.kernel.org/lkml/ZLqVdvsF11Ddo7Dq@google.com/ Co-developed-by: Michael Roth Signed-off-by: Michael Roth Message-Id: <20231230172351.574091-5-michael.roth@amd.com> Signed-off-by: Paolo Bonzini commit fa30b0dc91c815b9579d6f758437c35db059f5ae Author: Paolo Bonzini Date: Thu Apr 4 13:25:19 2024 -0400 KVM: guest_memfd: limit overzealous WARN Because kvm_gmem_get_pfn() is called from the page fault path without any of the slots_lock, filemap lock or mmu_lock taken, it is possible for it to race with kvm_gmem_unbind(). This is not a problem, as any PTE that is installed temporarily will be zapped before the guest has the occasion to run. However, it is not possible to have a complete unbind+bind racing with the page fault, because deleting the memslot will call synchronize_srcu_expedited() and wait for the page fault to be resolved. Thus, we can still warn if the file is there and is not the one we expect. Signed-off-by: Paolo Bonzini commit 70623723778a5156a03bc6e601be5df8c1fddb75 Author: Paolo Bonzini Date: Wed Feb 14 11:31:43 2024 -0500 KVM: guest_memfd: pass error up from filemap_grab_folio Some SNP ioctls will require the page not to be in the pagecache, and as such they will want to return EEXIST to userspace. Start by passing the error up from filemap_grab_folio. Signed-off-by: Paolo Bonzini commit 1d23040caa8bef867572ae814b5f8b5fa44eccd3 Author: Michael Roth Date: Fri Mar 29 16:24:43 2024 -0500 KVM: guest_memfd: Use AS_INACCESSIBLE when creating guest_memfd inode truncate_inode_pages_range() may attempt to zero pages before truncating them, and this will occur before arch-specific invalidations can be triggered via .invalidate_folio/.free_folio hooks via kvm_gmem_aops. For AMD SEV-SNP this would result in an RMP #PF being generated by the hardware, which is currently treated as fatal (and even if specifically allowed for, would not result in anything other than garbage being written to guest pages due to encryption). On Intel TDX this would also result in undesirable behavior. Set the AS_INACCESSIBLE flag to prevent the MM from attempting unexpected accesses of this sort during operations like truncation. This may also in some cases yield a decent performance improvement for guest_memfd userspace implementations that hole-punch ranges immediately after private->shared conversions via KVM_SET_MEMORY_ATTRIBUTES, since the current implementation of truncate_inode_pages_range() always ends up zero'ing an entire 4K range if it is backing by a 2M folio. Link: https://lore.kernel.org/lkml/ZR9LYhpxTaTk6PJX@google.com/ Suggested-by: Sean Christopherson Signed-off-by: Michael Roth Message-ID: <20240329212444.395559-6-michael.roth@amd.com> Acked-by: Vlastimil Babka Signed-off-by: Paolo Bonzini commit c72ceafbd12cf95e088681ae5e535ef1a78bf0ed Author: Michael Roth Date: Fri Mar 29 16:24:42 2024 -0500 mm: Introduce AS_INACCESSIBLE for encrypted/confidential memory filemap users like guest_memfd may use page cache pages to allocate/manage memory that is only intended to be accessed by guests via hardware protections like encryption. Writes to memory of this sort in common paths like truncation may cause unexpected behavior such as writing garbage instead of zeros when attempting to zero pages, or worse, triggering hardware protections that are considered fatal as far as the kernel is concerned. Introduce a new address_space flag, AS_INACCESSIBLE, and use this initially to prevent zero'ing of pages during truncation, with the understanding that it is up to the owner of the mapping to handle this specially if needed. This is admittedly a rather blunt solution, but it seems like there are no other places that should take into account the flag to keep its promise. Link: https://lore.kernel.org/lkml/ZR9LYhpxTaTk6PJX@google.com/ Cc: Matthew Wilcox Suggested-by: Sean Christopherson Signed-off-by: Michael Roth Message-ID: <20240329212444.395559-5-michael.roth@amd.com> Acked-by: Vlastimil Babka Signed-off-by: Paolo Bonzini commit 56ac367dbf8d72274b0a77b817e583b6d6171191 Author: Ville Syrjälä Date: Mon May 6 15:57:14 2024 +0300 drm/i915: Polish types in fb calculations Be a bit more consistent in our use of integer types in the fb related calculatiosn. u32 we generally only use for ggtt offsets and such, and everything else can be regular (unsigned) ints. There's also an overabundance of consts for local variables in skl_check_main_surface() which is not something we generally do. So get rid of those while at it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e5f827c5796f1da029fdc36bb64df0f01c49d2d7 Author: Ville Syrjälä Date: Mon May 6 15:57:13 2024 +0300 drm/i915: Extract intel_plane_needs_physical() Pull the "does this plane need a physical address?" check into a small helper. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c22a814bc2176f73fdf563e2cc2c4044c5d4a044 Author: Ville Syrjälä Date: Mon May 6 15:57:12 2024 +0300 drm/i915: Drop 'uses_fence' parameter from intel_pin_fb_obj_dpt() Fence regions are only relevant for GGTT, not DPT. Drop the pointless 'uses_fence' argument from intel_pin_fb_obj_dpt(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1301ce346aae3236e9956a2f4b618bf559335819 Author: Ville Syrjälä Date: Mon May 6 15:57:11 2024 +0300 drm/i915: Clean up skl+ plane stride limits skl_plane_max_stride() is pretty messy. Streamline it and split it into clear skl+ vs. adl+ variants. TODO: Deal with icl and tgl strude limits properly Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7050ef3554190769843009661b48abca2d1e33b9 Author: Ville Syrjälä Date: Mon May 6 15:57:10 2024 +0300 drm/i915: Split gen2 vs. gen3 .max_stride() Plane .max_stride() is already a vfunc so having one made up of two branches based on the display version is silly. Split i9xx_plane_max_stride() into gen2 vs. gen3 variants so that we get rid of said check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506125718.26001-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3dd384108d53834002be5630132ad5c3f32166ad Author: Leesoo Ahn Date: Wed May 8 01:12:29 2024 +0900 apparmor: fix possible NULL pointer dereference profile->parent->dents[AAFS_PROF_DIR] could be NULL only if its parent is made from __create_missing_ancestors(..) and 'ent->old' is NULL in aa_replace_profiles(..). In that case, it must return an error code and the code, -ENOENT represents its state that the path of its parent is not existed yet. BUG: kernel NULL pointer dereference, address: 0000000000000030 PGD 0 P4D 0 PREEMPT SMP PTI CPU: 4 PID: 3362 Comm: apparmor_parser Not tainted 6.8.0-24-generic #24 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 RIP: 0010:aafs_create.constprop.0+0x7f/0x130 Code: 4c 63 e0 48 83 c4 18 4c 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 c9 45 31 d2 c3 cc cc cc cc <4d> 8b 55 30 4d 8d ba a0 00 00 00 4c 89 55 c0 4c 89 ff e8 7a 6a ae RSP: 0018:ffffc9000b2c7c98 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000041ed RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000b2c7cd8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82baac10 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007be9f22cf740(0000) GS:ffff88817bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000030 CR3: 0000000134b08000 CR4: 00000000000006f0 Call Trace: ? show_regs+0x6d/0x80 ? __die+0x24/0x80 ? page_fault_oops+0x99/0x1b0 ? kernelmode_fixup_or_oops+0xb2/0x140 ? __bad_area_nosemaphore+0x1a5/0x2c0 ? find_vma+0x34/0x60 ? bad_area_nosemaphore+0x16/0x30 ? do_user_addr_fault+0x2a2/0x6b0 ? exc_page_fault+0x83/0x1b0 ? asm_exc_page_fault+0x27/0x30 ? aafs_create.constprop.0+0x7f/0x130 ? aafs_create.constprop.0+0x51/0x130 __aafs_profile_mkdir+0x3d6/0x480 aa_replace_profiles+0x83f/0x1270 policy_update+0xe3/0x180 profile_load+0xbc/0x150 ? rw_verify_area+0x47/0x140 vfs_write+0x100/0x480 ? __x64_sys_openat+0x55/0xa0 ? syscall_exit_to_user_mode+0x86/0x260 ksys_write+0x73/0x100 __x64_sys_write+0x19/0x30 x64_sys_call+0x7e/0x25c0 do_syscall_64+0x7f/0x180 entry_SYSCALL_64_after_hwframe+0x78/0x80 RIP: 0033:0x7be9f211c574 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 RSP: 002b:00007ffd26f2b8c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00005d504415e200 RCX: 00007be9f211c574 RDX: 0000000000001fc1 RSI: 00005d504418bc80 RDI: 0000000000000004 RBP: 0000000000001fc1 R08: 0000000000001fc1 R09: 0000000080000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00005d504418bc80 R13: 0000000000000004 R14: 00007ffd26f2b9b0 R15: 00007ffd26f2ba30 Modules linked in: snd_seq_dummy snd_hrtimer qrtr snd_hda_codec_generic snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device i2c_i801 snd_timer i2c_smbus qxl snd soundcore drm_ttm_helper lpc_ich ttm joydev input_leds serio_raw mac_hid binfmt_misc msr parport_pc ppdev lp parport efi_pstore nfnetlink dmi_sysfs qemu_fw_cfg ip_tables x_tables autofs4 hid_generic usbhid hid ahci libahci psmouse virtio_rng xhci_pci xhci_pci_renesas CR2: 0000000000000030 ---[ end trace 0000000000000000 ]--- RIP: 0010:aafs_create.constprop.0+0x7f/0x130 Code: 4c 63 e0 48 83 c4 18 4c 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 c9 45 31 d2 c3 cc cc cc cc <4d> 8b 55 30 4d 8d ba a0 00 00 00 4c 89 55 c0 4c 89 ff e8 7a 6a ae RSP: 0018:ffffc9000b2c7c98 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000041ed RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000b2c7cd8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82baac10 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007be9f22cf740(0000) GS:ffff88817bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000030 CR3: 0000000134b08000 CR4: 00000000000006f0 Signed-off-by: Leesoo Ahn Signed-off-by: John Johansen commit b2c858148acf96290b9a9af259a04e080a169f51 Author: Christian Göttsche Date: Fri Mar 15 13:54:09 2024 +0100 apparmor: fix typo in kernel doc Fix the typo in the function documentation to please kernel doc warnings. Signed-off-by: Christian Göttsche Reviewed-by: Kees Cook Signed-off-by: John Johansen commit 4a8db3678403e34c31df6b99a26414d5e183538c Author: Colin Ian King Date: Mon Mar 4 16:36:55 2024 +0000 apparmor: remove useless static inline function is_deleted The inlined function is_deleted is redundant, it is not called at all from any function in security/apparmor/file.c and so it can be removed. Cleans up clang scan build warning: security/apparmor/file.c:153:20: warning: unused function 'is_deleted' [-Wunused-function] Signed-off-by: Colin Ian King Signed-off-by: John Johansen commit 2bc73505a5cd2a18a7a542022722f136c19e3b87 Author: Fedor Pchelkin Date: Thu Feb 1 17:24:48 2024 +0300 apparmor: use kvfree_sensitive to free data->data Inside unpack_profile() data->data is allocated using kvmemdup() so it should be freed with the corresponding kvfree_sensitive(). Also add missing data->data release for rhashtable insertion failure path in unpack_profile(). Found by Linux Verification Center (linuxtesting.org). Fixes: e025be0f26d5 ("apparmor: support querying extended trusted helper extra data") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Signed-off-by: John Johansen commit fce09ea314505a52f2436397608fa0a5d0934fb1 Author: Xiao Liang Date: Sat Sep 2 08:48:38 2023 +0800 apparmor: Fix null pointer deref when receiving skb during sock creation The panic below is observed when receiving ICMP packets with secmark set while an ICMP raw socket is being created. SK_CTX(sk)->label is updated in apparmor_socket_post_create(), but the packet is delivered to the socket before that, causing the null pointer dereference. Drop the packet if label context is not set. BUG: kernel NULL pointer dereference, address: 000000000000004c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 407 Comm: a.out Not tainted 6.4.12-arch1-1 #1 3e6fa2753a2d75925c34ecb78e22e85a65d083df Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/28/2020 RIP: 0010:aa_label_next_confined+0xb/0x40 Code: 00 00 48 89 ef e8 d5 25 0c 00 e9 66 ff ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 0f 1f 44 00 00 89 f0 <8b> 77 4c 39 c6 7e 1f 48 63 d0 48 8d 14 d7 eb 0b 83 c0 01 48 83 c2 RSP: 0018:ffffa92940003b08 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000000e RDX: ffffa92940003be8 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8b57471e7800 R08: ffff8b574c642400 R09: 0000000000000002 R10: ffffffffbd820eeb R11: ffffffffbeb7ff00 R12: ffff8b574c642400 R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000 FS: 00007fb092ea7640(0000) GS:ffff8b577bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000004c CR3: 00000001020f2005 CR4: 00000000007706f0 PKRU: 55555554 Call Trace: ? __die+0x23/0x70 ? page_fault_oops+0x171/0x4e0 ? exc_page_fault+0x7f/0x180 ? asm_exc_page_fault+0x26/0x30 ? aa_label_next_confined+0xb/0x40 apparmor_secmark_check+0xec/0x330 security_sock_rcv_skb+0x35/0x50 sk_filter_trim_cap+0x47/0x250 sock_queue_rcv_skb_reason+0x20/0x60 raw_rcv+0x13c/0x210 raw_local_deliver+0x1f3/0x250 ip_protocol_deliver_rcu+0x4f/0x2f0 ip_local_deliver_finish+0x76/0xa0 __netif_receive_skb_one_core+0x89/0xa0 netif_receive_skb+0x119/0x170 ? __netdev_alloc_skb+0x3d/0x140 vmxnet3_rq_rx_complete+0xb23/0x1010 [vmxnet3 56a84f9c97178c57a43a24ec073b45a9d6f01f3a] vmxnet3_poll_rx_only+0x36/0xb0 [vmxnet3 56a84f9c97178c57a43a24ec073b45a9d6f01f3a] __napi_poll+0x28/0x1b0 net_rx_action+0x2a4/0x380 __do_softirq+0xd1/0x2c8 __irq_exit_rcu+0xbb/0xf0 common_interrupt+0x86/0xa0 asm_common_interrupt+0x26/0x40 RIP: 0010:apparmor_socket_post_create+0xb/0x200 Code: 08 48 85 ff 75 a1 eb b1 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 54 <55> 48 89 fd 53 45 85 c0 0f 84 b2 00 00 00 48 8b 1d 80 56 3f 02 48 RSP: 0018:ffffa92940ce7e50 EFLAGS: 00000286 RAX: ffffffffbc756440 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000003 RSI: 0000000000000002 RDI: ffff8b574eaab740 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: ffff8b57444cec70 R11: 0000000000000000 R12: 0000000000000003 R13: 0000000000000002 R14: ffff8b574eaab740 R15: ffffffffbd8e4748 ? __pfx_apparmor_socket_post_create+0x10/0x10 security_socket_post_create+0x4b/0x80 __sock_create+0x176/0x1f0 __sys_socket+0x89/0x100 __x64_sys_socket+0x17/0x20 do_syscall_64+0x5d/0x90 ? do_syscall_64+0x6c/0x90 ? do_syscall_64+0x6c/0x90 ? do_syscall_64+0x6c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Fixes: ab9f2115081a ("apparmor: Allow filtering based on secmark policy") Signed-off-by: Xiao Liang Signed-off-by: John Johansen commit a918dcfecc36f87521eaf183812ec3496602f717 Author: Amjad Ouled-Ameur Date: Mon Feb 19 15:39:15 2024 +0530 drm/arm/komeda: update DMA mask to 40 bits Each layer in the DPU has a 40-bit base address register, which indicates start of frame buffer data for that layer. Komeda driver does not set its DMA mask, which makes it 32-bit by default which does not use the entire available possible supported by the DPU. Update the DMA mask to align with DPU Architecture v1.0 spec. Signed-off-by: Amjad Ouled-Ameur Signed-off-by: Faiz Abbas Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240219100915.192475-4-faiz.abbas@arm.com Acked-by: Liviu Dudau commit 71b03802fe3b6e45e7b53db9e9c908fec714297c Author: Faiz Abbas Date: Mon Feb 19 15:39:14 2024 +0530 drm/arm/komeda: Move pipeline prints to after the entire pipeline has been enabled The komeda driver prints a pretty verbose log in komeda_pipeline_dump() detailing the components of each of the two pipelines. This gets printed multiple times during boot as komeda EPROBE_DEFERs waiting for the remote bridge drivers to come up. Move this log to after this has happened indicating that the printed pipeline is actually completely up. Signed-off-by: Faiz Abbas Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240219100915.192475-3-faiz.abbas@arm.com Acked-by: Liviu Dudau commit 9054c46d479b55768adae31031a1afa1b7d62228 Author: Faiz Abbas Date: Mon Feb 19 15:39:13 2024 +0530 drm/arm/komeda: Fix komeda probe failing if there are no links in the secondary pipeline Since commit 4cfe5cc02e3f ("drm/arm/komeda: Remove component framework and add a simple encoder"), the devm_drm_of_get_bridge() call happens regardless of whether any remote nodes are available on the pipeline. Fix this by moving the bridge attach to its own function and calling it conditional on there being an output link. Fixes: 4cfe5cc02e3f ("drm/arm/komeda: Remove component framework and add a simple encoder") Signed-off-by: Faiz Abbas [Corrected Commit-id of the fixed patch to match mainline] Signed-off-by: Liviu Dudau Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240219100915.192475-2-faiz.abbas@arm.com commit deac76110108a362cf791780258a0c1474e5cb0e Author: Jani Nikula Date: Wed May 8 18:47:56 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_VSYNC Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_VSYNC register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/61b464bedfd75a97ca214e066be5417d790ccb26.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 0f5b235f87604ab745d918aaeca678fac42bfd7a Author: Jani Nikula Date: Wed May 8 18:47:55 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_PUSH Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_PUSH register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/5b2a4eea42cf76830a829d8a543d877cad0fc52d.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 48d47a40835376b9a8365d089ed626b7d79f3795 Author: Jani Nikula Date: Wed May 8 18:47:54 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_STATUS2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_STATUS2 register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/a8e095f1ac3b3d41343f7e6d8dd191e9e2a6d76a.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e050e2acedcfd82b472cb40e9a2e7b762f7997ed Author: Jani Nikula Date: Wed May 8 18:47:53 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_FLIPLINE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_FLIPLINE register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/fd8b6a7c71ba908a55a7b40dc54a1d4cf920056c.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 2e6cb8775f5cf4867917d00d4293bc5537afbd46 Author: Jani Nikula Date: Wed May 8 18:47:52 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_VTOTAL_PREV Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_VTOTAL_PREV register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/de2c305ffef3df1112234baeae944b8dc84d0707.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 8ae4afceed9e582bba0a27e4a2e69c2daf5b466b Author: Jani Nikula Date: Wed May 8 18:47:51 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_STATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_STATUS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/57285c891b10d4827423c20563f2b4a2632e65c1.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3043b74f2ebd5809e0cc8aae3621f1e2c37711d3 Author: Jani Nikula Date: Wed May 8 18:47:50 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_VMAXSHIFT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_VMAXSHIFT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/6117aa8936a8e91c58a7a0bada21f266c79a0e5f.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit d9d2f4419554b0ff1478d35c97740f00af0b05b0 Author: Jani Nikula Date: Wed May 8 18:47:49 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_VMIN Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_VMIN register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ac1c6545a80e4cbdc98f54f8d67e69fd46cdcc91.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit eadb8f40e1ed3c5cc36169d4ad9b7c49af98d950 Author: Jani Nikula Date: Wed May 8 18:47:48 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_VMAX Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_VMAX register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/6256642f1943b87650fdf600ef08f6d3b8617a87.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 975a0f68f0d532d98ed3a8e385f82a46eea3d91a Author: Jani Nikula Date: Wed May 8 18:47:47 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_VRR_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_VRR_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/d86be64197d547085e857b09dacd21f4ee6b1517.1715183162.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6a3691ca4799997b90da50883c170edb67bd6c49 Author: Suraj Kandpal Date: Tue May 7 11:52:44 2024 +0530 drm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI Disable HDCP Line Rekeying when HDCP ver > 1.4 and when we are on HDMI TMDS operation for DISPLAY_VER >= 14. --v2 -Wa to be mentioned in comments not in commit message [Jani] -Remove blankline [Jani] --v3 -No need to write what is being done in comments when code is self explanatory [Jani] --v4 -Add comment regarding need of this WA when in TMDS mode [Chaitanya] -Write in chicken register for MTL [CHaitanya] --v5 -Fix comment [Chaitanya] -Use correct set and clear value in intel_de_rmw [Chaitanya] --v6 -No need to define C, D chicken bits it gets calculated [Animesh] Bspec: 49273 Bspec: 69964 Signed-off-by: Suraj Kandpal Reviewed-by: Chaitanya Kumar Borah Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240507062243.1076047-2-suraj.kandpal@intel.com commit ed325ac38e0c0e371f128db0978357453a0c362c Author: Wolfram Sang Date: Tue May 7 11:02:01 2024 +0200 drm/arm/komeda: don't use confusing 'timeout' variable name There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Check the return value directly to drop 'timeout' which also fixes its wrong type. Signed-off-by: Wolfram Sang Link: https://patchwork.freedesktop.org/patch/msgid/20240507090200.7936-2-wsa+renesas@sang-engineering.com [changed commit title to match driver name] Signed-off-by: Liviu Dudau Acked-by: Liviu Dudau commit 6907d4fa5ecac7b08fb5ee5536e48b0a3895be31 Author: Ville Syrjälä Date: Mon May 6 21:33:31 2024 +0300 drm/xe: Nuke xe's copy of intel_fbdev_fb.h For some reason xe and i915 each have an identical (fortunately) copy of intel_fbdev_fb.h. The xe copy actually only gets included by xe's intel_fbdev_fb.c, and the i915 copy by everyone else, include intel_fbdev.c which is the actual caller of the functions declared in the header. This means the xe and i915 headers are free to define/declare completely incompatible things and the build would still succeed as long as the symbol names match. That is not a good thing, so let's nuke xe's copy of the header so that everyone will use the same header, and be forced to agree on the same API/ABI. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240506183331.7720-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Lucas De Marchi commit c3203ca3b8a6aab7c5a5dc3f5e165a53410461f6 Author: Michal Wajdeczko Date: Wed May 8 19:10:00 2024 +0200 drm/xe: Rename few xe_args.h macros To minimize the risk of future name collisions, rename macros to always include the ARG or ARGS tag: DROP_FIRST to DROP_FIRST_ARG PICK_FIRST to FIRST_ARG PICK_LAST to LAST_ARG Suggested-by: Andy Shevchenko Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Andy Shevchenko #v2 Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240508171000.1864-1-michal.wajdeczko@intel.com commit 62010b3cd6030ff743930c9ae898d8e4e943100d Author: Michal Wajdeczko Date: Wed May 8 19:48:56 2024 +0200 drm/xe: Move xe_gpu_commands.h file to instructions/ All other files with commands definitions are in instructions/ folder. Move xe_gpu_commands.h also there. Signed-off-by: Michal Wajdeczko Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240508174856.1908-1-michal.wajdeczko@intel.com commit 515f08972355e160f896f612347121fbb685e740 Author: Karthik Poosa Date: Fri Apr 19 18:29:45 2024 +0530 drm/xe/hwmon: Remove unwanted write permission for currN_label Change umode of currN_label from 0644 to 0444 as write permission not needed for label. Signed-off-by: Karthik Poosa Reviewed-by: Riana Tauro Link: https://patchwork.freedesktop.org/patch/msgid/20240419125945.4085629-1-karthik.poosa@intel.com Signed-off-by: Rodrigo Vivi commit 28818b4d871bc93cc4f5c7c7d7c526a6a096c09c Author: Bitterblue Smith Date: Mon Apr 29 20:57:52 2024 +0300 wifi: rtw88: usb: Fix disconnection after beacon loss When there is beacon loss, for example due to unrelated Bluetooth devices transmitting music nearby, the wifi connection dies soon after the first beacon loss message: Apr 28 20:47:14 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: CTRL-EVENT-BEACON-LOSS Apr 28 20:47:15 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1 Apr 28 20:47:24 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: CTRL-EVENT-BEACON-LOSS Apr 28 20:47:25 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1 Apr 28 20:47:34 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: CTRL-EVENT-BEACON-LOSS Apr 28 20:47:35 ideapad2 wpa_supplicant[1161]: wlp3s0f3u4: CTRL-EVENT-DISCONNECTED bssid=... reason=4 locally_generated=1 When the beacon loss happens, mac80211 makes rtw88 transmit a QOS NULL frame and asks to confirm the ACK status. Even though rtw88 confirms to mac80211 that the QOS NULL was transmitted successfully, the connection still dies. This is because rtw88 is handing the QOS NULL back to mac80211 with skb->data pointing to the headroom (the TX descriptor) instead of ieee80211_hdr. Fix the disconnection by moving skb->data to the correct position before ieee80211_tx_status_irqsafe(). The problem was observed with RTL8811AU (TP-Link Archer T2U Nano) and the potential future rtw88_8821au driver. Also tested with RTL8811CU (Tenda U9). Cc: stable@vger.kernel.org Signed-off-by: Bitterblue Smith Signed-off-by: Ping-Ke Shih Link: https://msgid.link/ecbf0601-810d-4609-b8fc-8b0e38d2948d@gmail.com commit a892f6ffbec7a1a25c639534bee62200418242f9 Author: Bitterblue Smith Date: Fri May 3 13:53:28 2024 +0300 wifi: rtw88: usb: Simplify rtw_usb_write_data The skb created in this function always has the same headroom, the chip's TX descriptor size. (pkt_info->offset is set by rtw_usb_write_data_rsvd_page() to chip->tx_pkt_desc_sz.) Use chip->tx_pkt_desc_sz directly. Signed-off-by: Bitterblue Smith Tested-by: Larry Finger Signed-off-by: Ping-Ke Shih Link: https://msgid.link/2479507e-3946-492f-857e-83e54969aad2@gmail.com commit d0bcb10e7b94861c714ab1e62c98bf8abaa37527 Author: Breno Leitao Date: Thu Apr 25 01:29:09 2024 -0700 wifi: rtw88: Un-embed dummy device Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_device from the private struct by converting it into a pointer. Then use the leverage the new alloc_netdev_dummy() helper to allocate and initialize dummy devices. [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ Tested with RTL8723DE and RTL8822CE. Signed-off-by: Breno Leitao Acked-by: Ping-Ke Shih Tested-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240425082910.2824393-1-leitao@debian.org commit 4c9aa94a39e6ef1a1381b1e6d841105fee5b7c96 Author: Breno Leitao Date: Wed Apr 24 11:23:49 2024 -0700 wifi: rtw89: Un-embed dummy device Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_device from the private struct by converting it into a pointer. Then use the leverage the new alloc_netdev_dummy() helper to allocate and initialize dummy devices. [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ Tested with RTL8852BE, RTL8852C and RTL8922AE. Signed-off-by: Breno Leitao Acked-by: Ping-Ke Shih Tested-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://msgid.link/20240424182351.3936556-1-leitao@debian.org commit 205e5c4b20c3c2e2033338a935f6a59843dc69de Author: Shuicheng Lin Date: Tue May 7 13:04:11 2024 +0000 drm/xe: Fix UBSAN shift-out-of-bounds failure Here is the failure stack: [ 12.988209] ------------[ cut here ]------------ [ 12.988216] UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 [ 12.988232] shift exponent 64 is too large for 64-bit type 'long unsigned int' [ 12.988235] CPU: 4 PID: 1310 Comm: gnome-shell Tainted: G U 6.9.0-rc6+prerelease1158+ #19 [ 12.988237] Hardware name: Intel Corporation Raptor Lake Client Platform/RPL-S ADP-S DDR5 UDIMM CRB, BIOS RPLSFWI1.R00.3301.A02.2208050712 08/05/2022 [ 12.988239] Call Trace: [ 12.988240] [ 12.988242] dump_stack_lvl+0xd7/0xf0 [ 12.988248] dump_stack+0x10/0x20 [ 12.988250] ubsan_epilogue+0x9/0x40 [ 12.988253] __ubsan_handle_shift_out_of_bounds+0x10e/0x170 [ 12.988260] dma_resv_reserve_fences.cold+0x2b/0x48 [ 12.988262] ? ww_mutex_lock_interruptible+0x3c/0x110 [ 12.988267] drm_exec_prepare_obj+0x45/0x60 [drm_exec] [ 12.988271] ? vm_bind_ioctl_ops_execute+0x5b/0x740 [xe] [ 12.988345] vm_bind_ioctl_ops_execute+0x78/0x740 [xe] It is caused by the value 0 of parameter num_fences in function drm_exec_prepare_obj. And lead to in function __rounddown_pow_of_two, "0 - 1" causes the shift-out-of-bounds. By design drm_exec_prepare_obj() should be called only when there are fences to be reserved. If num_fences is 0, calling drm_exec_lock_obj() is sufficient as was done in commit 9377de4cb3e8 ("drm/xe/vm: Avoid reserving zero fences") Cc: Nirmoy Das Cc: Matthew Brost Signed-off-by: Shuicheng Lin Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/all/24d4a9a9-c622-4f56-8672-21f4c6785476@amd.com Link: https://patchwork.freedesktop.org/patch/msgid/20240507130411.630361-1-shuicheng.lin@intel.com Signed-off-by: Lucas De Marchi commit 10f624ef239bd136cdcc5bbc626157a57b938a31 Author: Michael Chen Date: Fri May 3 15:31:08 2024 -0400 drm/amdkfd: Reconcile the definition and use of oem_id in struct kfd_topology_device Currently oem_id is defined as uint8_t[6] and casted to uint64_t* in some use case. This would lead code scanner to complain about access beyond. Re-define it in union to enforce 8-byte size and alignment to avoid potential issue. Signed-off-by: Michael Chen Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c4dcb47d46144d8f5b1ace1d8d2fcddeb5dacd8e Author: Michel Dänzer Date: Wed May 8 15:19:16 2024 +0200 drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible It incorrectly claimed a resource isn't CPU visible if it's located at the very end of CPU visible VRAM. Fixes: a6ff969fe9cb ("drm/amdgpu: fix visible VRAM handling during faults") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3343 Reviewed-by: Christian König Reviewed-by: Alex Deucher Reported-and-Tested-by: Jeremy Day Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher CC: stable@vger.kernel.org commit fe0154cf8222d9e38c60ccc124adb2f9b5272371 Author: Niranjana Vishwanathapura Date: Tue May 7 15:42:53 2024 -0700 drm/xe/xe2: Enable Indirect Ring State support for Xe2 Indirect Ring State is the recommended mode for Xe2 platforms, enable it by default. v2: Set has_indirect_ring_state to '1' instead of 'true' Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Stuart Summers Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240507224255.5059-5-niranjana.vishwanathapura@intel.com commit 7578c2f811fffd7178de3075a19bddcbb7e0b2e7 Author: Niranjana Vishwanathapura Date: Tue May 7 15:42:52 2024 -0700 drm/xe: Dump Indirect Ring State registers Dump INDIRECT_RING_STATE and RING_START_UDW registers. v2: Add bspec reference Bspec: 67137, 67138 Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Stuart Summers Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240507224255.5059-4-niranjana.vishwanathapura@intel.com commit d6219e1cd5e321351954e317b362db2c1d34402a Author: Niranjana Vishwanathapura Date: Tue May 7 15:42:51 2024 -0700 drm/xe: Add Indirect Ring State support When Indirect Ring State is enabled, the Ring Buffer state and Batch Buffer state are context save/restored to/from Indirect Ring State instead of the LRC. The Indirect Ring State is a 4K page mapped in global GTT at a 4K aligned address. This address is programmed in the INDIRECT_RING_STATE register of the corresponding context's LRC. v2: Fix kernel-doc, add bspec reference v3: Fix typo in commit text Bspec: 67296, 67139 Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240507224255.5059-3-niranjana.vishwanathapura@intel.com commit 85cfc412579c041f1aaebba71427acec75ceca39 Author: Niranjana Vishwanathapura Date: Tue May 7 15:42:50 2024 -0700 drm/xe: Minor cleanup in LRC handling Properly define register fields and remove redundant lower_32_bits(). Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Stuart Summers Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240507224255.5059-2-niranjana.vishwanathapura@intel.com commit 598dc939edf8d7bb1d69e84513c31451812128fc Author: Bommu Krishnaiah Date: Thu Apr 18 16:45:34 2024 +0530 drm/xe/xe2: Add workaround 14021402888 This workaround applies to Graphics 20.01 as RCS engine workaround Signed-off-by: Bommu Krishnaiah Cc: Tejas Upadhyay Cc: Matt Roper Cc: Himal Prasad Ghimiray Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240418111534.481568-1-krishnaiah.bommu@intel.com Signed-off-by: Lucas De Marchi commit e35ba81bb308aabf7194fe49e2533d9c4732afcd Author: Srinivasan Shanmugam Date: Tue May 7 22:07:18 2024 +0530 drm/amdgpu: Fix buffer size to prevent truncation in gfx_v12_0_init_microcode This commit fixes multiple potential truncations when writing the strings _pfp.bin, _me.bin, _rlc.bin, and _mec.bin into the fw_name buffer in the gfx_v12_0_init_microcode function in the gfx_v12_0.c file The ucode_prefix size was reduced from 30 to 15 to ensure the snprintf function does not exceed the size of the fw_name buffer. Thus fixing the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c: In function ‘gfx_v12_0_early_init’: drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:421:54: warning: ‘_pfp.bin’ directive output may be truncated writing 8 bytes into a region of size between 4 and 33 [-Wformat-truncation=] 421 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_pfp.bin", ucode_prefix); | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:421:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 40 421 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_pfp.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:428:54: warning: ‘_me.bin’ directive output may be truncated writing 7 bytes into a region of size between 4 and 33 [-Wformat-truncation=] 428 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me.bin", ucode_prefix); | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:428:9: note: ‘snprintf’ output between 15 and 44 bytes into a destination of size 40 428 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:436:62: warning: ‘_rlc.bin’ directive output may be truncated writing 8 bytes into a region of size between 4 and 33 [-Wformat-truncation=] 436 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", ucode_prefix); | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:436:17: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 40 436 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:448:54: warning: ‘_mec.bin’ directive output may be truncated writing 8 bytes into a region of size between 4 and 33 [-Wformat-truncation=] 448 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", ucode_prefix); | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c:448:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 40 448 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit ffd574459df43bbb31a0ee67ce9c5b2f4d88eddb Author: Srinivasan Shanmugam Date: Tue May 7 21:56:07 2024 +0530 drm/amdgpu: Fix truncation by resizing ucode_prefix in imu_v12_0_init_microcode This commit fixes potential truncation when writing the string _imu.bin into the fw_name buffer in the imu_v12_0_init_microcode function in the imu_v12_0.c file The ucode_prefix size was reduced from 30 to 15 to ensure the snprintf function does not exceed the size of the fw_name buffer. Thus fixing the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/imu_v12_0.c: In function ‘imu_v12_0_init_microcode’: drivers/gpu/drm/amd/amdgpu/imu_v12_0.c:51:54: warning: ‘_imu.bin’ directive output may be truncated writing 8 bytes into a region of size between 4 and 33 [-Wformat-truncation=] 51 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_imu.bin", ucode_prefix); | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/imu_v12_0.c:51:9: note: ‘snprintf’ output between 16 and 45 bytes into a destination of size 40 51 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_imu.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 51dfc0a4d609fe700750a62f41447f01b8c9ea50 Author: Tim Huang Date: Mon May 6 16:30:01 2024 +0800 drm/amdgpu: fix mc_data out-of-bounds read warning Clear warning that read mc_data[i-1] may out-of-bounds. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8944acd0f9db33e17f387fdc75d33bb473d7936f Author: Tim Huang Date: Mon May 6 16:21:00 2024 +0800 drm/amdgpu: fix ucode out-of-bounds read warning Clear warning that read ucode[] may out-of-bounds. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f683f24093dd94a831085fe0ea8e9dc4c6c1a2d1 Author: Ma Jun Date: Sun Apr 28 15:58:10 2024 +0800 drm/amdgpu/pm: Fix the param type of set_power_profile_mode Function .set_power_profile_mode need an array as input parameter. So define variable workload as an array to fix the below coverity warning. "Passing &workload to function hwmgr->hwmgr_func->set_power_profile_mode which uses it as an array. This might corrupt or misinterpret adjacent memory locations" Signed-off-by: Ma Jun Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0991e49d2b73bb4189f83a49eb41cdf16976bbf6 Author: Ma Jun Date: Mon May 6 14:01:33 2024 +0800 drm/amdgpu: Fix uninitialized variable warning in amdgpu_info_ioctl Check the return value of amdgpu_xcp_get_inst_details, otherwise we may use an uninitialized variable inst_mask Signed-off-by: Ma Jun Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d768394fa99467bcf2703bde74ddc96eeb0b71fa Author: Ma Jun Date: Tue May 7 09:29:33 2024 +0800 drm/amdgpu: Fix out-of-bounds read of df_v1_7_channel_number Check the fb_channel_number range to avoid the array out-of-bounds read error Signed-off-by: Ma Jun Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit cdca89bce4984f1bb6e53cd4084820d4ff54f977 Author: Alex Deucher Date: Sun Apr 14 22:37:12 2024 -0400 drm/amdgpu/soc21: use common nbio callback to set remap offset This fixes HDP flushes on systems with non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1dd8b24acc0f951d9fea1b03d0c9ac4630a82e44 Author: Alex Deucher Date: Sun Apr 14 22:34:03 2024 -0400 drm/amdgpu/nv: use common nbio callback to set remap offset This fixes HDP flushes on systems with non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c866201cdc2a05a7fe94009eda2644ceb54e8303 Author: Alex Deucher Date: Sun Apr 14 22:25:50 2024 -0400 drm/amdgpu/soc15: use common nbio callback to set remap offset This fixes HDP flushes on systems with non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 30f45a8ea46beba74710a75b3e1c4c54c22932b9 Author: Alex Deucher Date: Sun Apr 14 14:05:42 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIF 6.3.1 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3345f7ec0d852880b176b07abe8e8c4201a346ca Author: Alex Deucher Date: Sun Apr 14 13:58:54 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 7.7 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ffd3d6e780a525a74b61b6932f440ca5a8fcb4bf Author: Alex Deucher Date: Sun Apr 14 13:56:42 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 4.3 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 454847c9f41f5b3c9a26498d92ef8917b9a5174d Author: Alex Deucher Date: Sun Apr 14 13:54:48 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 2.3 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit cacbbfbd24422c0b7bdb2a689dce4b822001bc84 Author: Alex Deucher Date: Sun Apr 14 13:51:37 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 7.2 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 42ad8ac6bd3722a04abd1feb630f69ead6b24433 Author: Alex Deucher Date: Sun Apr 14 13:48:55 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 7.11 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f9a2274b33cfbc34c00b91a8de8b4369118a1f76 Author: Alex Deucher Date: Sun Apr 14 13:37:08 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 7.9 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9d0e2915c4c6815b222545a526fa599f58f498c7 Author: Alex Deucher Date: Sun Apr 14 13:33:56 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 7.4 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b2648640b924c575ce72b87576df7d91c887914c Author: Alex Deucher Date: Sun Apr 14 13:31:29 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 7.0 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit cab62e4839d50bba1f0b15e6c4358e962985fb02 Author: Alex Deucher Date: Sun Apr 14 13:16:03 2024 -0400 drm/amdgpu: add set_reg_remap callback for NBIO 6.1 This will be used to consolidate the register remap offset configuration and fix HDP flushes on systems non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0617cdde84621ba3309a985492136fb0c36e9303 Author: Alex Deucher Date: Sun Apr 14 12:56:03 2024 -0400 drm/amdgpu: add nbio set_reg_remap helper Will be used to consolidate reg remap settings and fix HDP flushes on systems with non-4K pages. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 24e82654e98e96cece5d8b919c522054456eeec6 Author: Alex Deucher Date: Sun Apr 14 13:06:39 2024 -0400 drm/amdkfd: don't allow mapping the MMIO HDP page with large pages We don't get the right offset in that case. The GPU has an unused 4K area of the register BAR space into which you can remap registers. We remap the HDP flush registers into this space to allow userspace (CPU or GPU) to flush the HDP when it updates VRAM. However, on systems with >4K pages, we end up exposing PAGE_SIZE of MMIO space. Fixes: d8e408a82704 ("drm/amdkfd: Expose HDP registers to user space") Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2b3b9d2150c02c340f2ad50bae1a20f6913587ce Author: YiPeng Chai Date: Tue May 7 16:19:09 2024 +0800 drm/amdgpu: change log level Change log level. Signed-off-by: YiPeng Chai Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 29292b0c82e8177cdc7a27af665da62d98c95104 Author: Jesse Zhang Date: Tue May 7 16:01:10 2024 +0800 drm/amd/pm: enable UMD Pstate profile level for renoir This patch enable UMD Pstates profile level for the renoir_set_performance_level interface. -profile_min_sclk -profile_min_fclk Signed-off-by: Jesse Zhang Suggested-by: Tim Huang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit a735b4a4ad9b61f87944b77527f626cae8b4e3c8 Author: Likun Gao Date: Tue May 7 12:31:25 2024 +0800 drm/amdgpu: fix spl component for psp v14 Fix the coding error when load spl component for psp v14. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9e5da942594034ec377ba8c0caa9c15e1d26ba08 Author: Tim Huang Date: Mon May 6 13:57:03 2024 +0800 drm/amdgpu: fix uninitialized variable warning for jpeg_v4 Clear warning that using uninitialized variable r. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 329cec8f18fc8bed7570b68b18936724af2f5593 Author: Yang Wang Date: Tue May 7 10:28:04 2024 +0800 drm/amdgpu: fix RAS unload driver issue in SRIOV Fix null pointer issue when unload driver in SRIOV mode. Adjust the function position to ensure that the amdgpu_mca/aca_xxx_init() related functions can be initialized properly. Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 85a24a3ea09e93c05ff59609fde6c3d825a014c2 Author: Yang Wang Date: Mon May 6 10:41:28 2024 +0800 drm/amdgpu: ignoring unsupported ras blocks when MCA bank dispatches This patch is used to solve the problem of incorrect parsing of error counts. When the UE trigger gpu is reset, the driver will attempt to parse all possible ras blocks. For ras blocks that are not supported by the current ASIC, the driver should ignore this error. Signed-off-by: Yang Wang Reviewed-by: Candice Li Signed-off-by: Alex Deucher commit 8f184f8e7a07fddc33ee4e6a38b717c770c3aedd Author: Tim Huang Date: Mon May 6 13:48:57 2024 +0800 drm/amdgpu: fix uninitialized variable warning for amdgpu_xgmi Clear warning that using uninitialized variable current_node. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3aa6b72045b1edaba44ea5d5a77d8e0150d1c9ff Author: Tim Huang Date: Mon May 6 11:01:15 2024 +0800 drm/amdgpu: fix uninitialized variable warning for sdma_v7 Clear warning that using uninitialized variable index. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 547033b593063eb85bfdf9b25a5f1b8fd1911be2 Author: Lin.Cao Date: Wed Apr 24 11:27:16 2024 +0800 drm/amdkfd: Check debug trap enable before write dbg_ev_file In interrupt context, write dbg_ev_file will be run by work queue. It will cause write dbg_ev_file execution after debug_trap_disable, which will cause NULL pointer access. v2: cancel work "debug_event_workarea" before set dbg_ev_file as NULL. Signed-off-by: Lin.Cao Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit be1684930f5262a622d40ce7a6f1423530d87f89 Author: Ma Jun Date: Thu Apr 25 14:00:17 2024 +0800 drm/amdgpu: Fix out-of-bounds write warning Check the ring type value to fix the out-of-bounds write warning Signed-off-by: Ma Jun Suggested-by: Christian König Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit a641c25fa45c95b4eaa036beba4624956a8fd461 Author: Lijo Lazar Date: Fri May 3 19:25:48 2024 +0530 drm/amd/amdxcp: Fix warnings Range of possible values of pdev_num is 0-63. Use int8_t as data type. That also fixes below warnings: >> drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:58: warning: '%d' >> directive output may be truncated writing between 1 and 11 bytes into >> a region of size 9 [-Wformat-truncation=] 59 | snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); | ^~ drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:46: note: directive argument in the range [-2147483648, 63] 59 | snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); | ^~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdxcp/amdgpu_xcp_drv.c:59:9: note: 'snprintf' output between 13 and 23 bytes into a destination of size 20 59 | snprintf(dev_name, sizeof(dev_name), "amdgpu_xcp_%d", pdev_num); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 97d814fe4f69 ("drm/amd/amdxcp: Use unique name for partition dev") Signed-off-by: Lijo Lazar Reported-by: kernel test robot Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 421226e5c9982573016aa4cdc02883c3d43a21af Author: Lijo Lazar Date: Tue Apr 23 16:52:40 2024 +0530 Revert "drm/amdkfd: Add partition id field to location_id" This reverts commit c37ce764cd492f044dcdbb39616298f02b0dbc7f. RCCL library is currently not treating spatial partitions differently, hence this change is causing issues. Revert temporarily till RCCL implementation is ready for spatial partitions. Signed-off-by: Lijo Lazar Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 7e39d7ec35883a168343ea02f40e260e176c6c63 Author: Ma Jun Date: Wed Apr 24 15:44:56 2024 +0800 drm/amdgpu: Fix the uninitialized variable warning Check the user input and phy_id value range to fix "Using uninitialized value phy_id" Signed-off-by: Ma Jun Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit df4409d8a04dd39d7f2aa0c5f528a56b99eaaa13 Author: Ma Jun Date: Sun Apr 28 14:41:38 2024 +0800 drm/amdgpu/pm: Fix uninitialized variable agc_btc_response Assign an default value to agc_btc_response in failed case Signed-off-by: Ma Jun Acked-by: Alex Deucher Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 336c8f558d596699d3d9814a45600139b2f23f27 Author: Ma Jun Date: Fri Apr 26 17:46:08 2024 +0800 drm/amdgpu/pm: Fix uninitialized variable warning for smu10 Check return value of smum_send_msg_to_smc to fix uninitialized variable varning Signed-off-by: Ma Jun Acked-by: Alex Deucher Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit b2871de6961d24d421839fbfa4aa3008ec9170d5 Author: Tim Huang Date: Sun Apr 28 15:42:03 2024 +0800 drm/amd/pm: fix uninitialized variable warnings for vangogh_ppt 1. Fix a issue that using uninitialized mask to get the ultimate frequency. 2. Check return of smu_cmn_send_smc_msg_with_param to avoid using uninitialized variable residency. Signed-off-by: Tim Huang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 56fd1f8868d8042aeb801a27a33c1ea3e05af33a Author: Jack Xiao Date: Tue Apr 30 13:58:28 2024 +0800 drm/amdgpu/mes11: fix kiq ring ready flag kiq ring test has overwitten ready flag, need disable after gfx hw init. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 89773b85599affe89dfc030aa1cb70d6ca7de4d3 Author: Lang Yu Date: Fri Apr 26 14:56:35 2024 +0800 drm/amdkfd: Let VRAM allocations go to GTT domain on small APUs Small APUs(i.e., consumer, embedded products) usually have a small carveout device memory which can't satisfy most compute workloads memory allocation requirements. We can't even run a Basic MNIST Example with a default 512MB carveout. https://github.com/pytorch/examples/tree/main/mnist. Error Log: "torch.cuda.OutOfMemoryError: HIP out of memory. Tried to allocate 84.00 MiB. GPU 0 has a total capacity of 512.00 MiB of which 0 bytes is free. Of the allocated memory 103.83 MiB is allocated by PyTorch, and 22.17 MiB is reserved by PyTorch but unallocated" Though we can change BIOS settings to enlarge carveout size, which is inflexible and may bring complaint. On the other hand, the memory resource can't be effectively used between host and device. The solution is MI300A approach, i.e., let VRAM allocations go to GTT. Then device and host can flexibly and effectively share memory resource. v2: Report local_mem_size_private as 0. (Felix) Signed-off-by: Lang Yu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3b3c9e865e1d7c1c926ea768a03d01997c991ede Author: Sunil Khatri Date: Fri May 3 12:28:01 2024 +0530 drm/amdgpu: add se registers to ip dump for gfx10 add the registers of SE block of gfx for ip dump for gfx10 IP. Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b4e394e843a1fcbbc040928dcc73254fdc855080 Author: Sunil Khatri Date: Fri May 3 12:19:37 2024 +0530 drm/amdgpu: add CP headers registers to gfx10 dump add registers in the ip dump for CP headers in gfx10 Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b911505e6ba45be6ad161793d7f272d52054c69f Author: Mario Limonciello Date: Thu May 2 13:32:17 2024 -0500 dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users Limit the workaround introduced by commit 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") to only run in the s4 path. Cc: Tim Huang Fixes: 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3351 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ede045c091b19f8ac702f717f1fc1279b62bdd97 Author: Aric Cyr Date: Sun Apr 28 20:22:18 2024 -0400 drm/amd/display: 3.2.284 This version brings along following fixes: - Fix some problems reported by Coverity - Fix idle optimization checks for multi-display and dual eDP - Fix incorrect size calculation for loop - Fix DSC-re-computing - Add Replay capability and state in debugfs - Refactor DCCG into component folder - Refactor input mode programming for DIG FIFO - Reset DSC clock in post unlock update - Clean-up recout calculation for visual confirm - Enable urgent latency adjustments for DCN35 Acked-by: Tom Chung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 36d1861725b2139b2d2e1b63fbe56222bc6a256e Author: Anthony Koo Date: Sat Apr 27 14:07:47 2024 -0400 drm/amd/display: [FW Promotion] Release 0.0.216.0 - Implement command interface to query ABM SW algorithm and HW caps. This is primarily intended as a debugging interface - Add new definitions for max number of histogram bins and ABM curve segments available in hardware - Add structures to retrieve caps to describe ABM HW caps since not all ASICs have the same number of cure segments and bins Acked-by: Tom Chung Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 176278d8bff2c2be000b9c9509a7fc8120b5278d Author: Wenjing Liu Date: Mon Apr 8 13:32:53 2024 -0400 drm/amd/display: reset DSC clock in post unlock update [why] Switching between DSC clock or disable DSC block are not double buffered update. Corruption is observed if these updates happen before DSC double buffered disconnection. [how] Move DSC disable and refclk reset to post unlock update. Wait for DSC double buffered disconnection and all mpccs are disconnected before reset DSC clock. Reviewed-by: Samson Tam Acked-by: Tom Chung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3706bf2eba8d90887bdb7e05f9227686848e1342 Author: Alvin Lee Date: Fri Apr 26 16:23:37 2024 -0400 Revert "drm/amd/display: Only program P-State force if pipe config changed" This reverts commit 3351c608f373 ("drm/amd/display: Only program P-State force if pipe config changed") Which causes regression. Reviewed-by: Samson Tam Acked-by: Tom Chung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b33f1d128cffa99f08631b22c8fb982db465985b Author: Agustin Gutierrez Date: Thu Apr 25 10:37:36 2024 -0400 drm/amd/display: MST DSC check for older devices [Why] Some older MST hubs do not report DPCD registers according to specification. [How] This change re-applies commit c53655545141 ("drm/amd/display: dsc mst re-compute pbn for changes on hub"). With an additional check for these older MST devices. Reviewed-by: Swapnil Patel Acked-by: Tom Chung Signed-off-by: Agustin Gutierrez Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5922deae69beabae98644f3cd902df45da932297 Author: Nicholas Kazlauskas Date: Thu Apr 25 11:26:59 2024 -0400 drm/amd/display: Fix idle optimization checks for multi-display and dual eDP [Why] Idle optimizations are blocked if there's more than one eDP connector on the board - blocking S0i3 and IPS2 for static screen. [How] Fix the checks to correctly detect number of active eDP. Also restrict the eDP support to panels that have correct feature support. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5b600c1f49962c1dbc62719916bf47c791ac0777 Author: Dillon Varone Date: Wed Apr 24 16:39:49 2024 -0400 drm/amd/display: Reset input mode for DIG on encoder reset [WHY & HOW] Make enable and disable sequences symmetric. Reviewed-by: Wenjing Liu Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0cfdfebedc5b48aeee63bc808bcac85d5ab63176 Author: Bhuvana Chandra Pinninti Date: Thu Apr 25 17:03:59 2024 +0530 drm/amd/display: Refactor HUBP into component folder. [why] cleaning up the code refactor requires hubp to be in its own component. [how] move all files under newly created hubp folder and fixing the makefiles. Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Bhuvana Chandra Pinninti Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d1ae412d74a63615f89f195afb950223174e6e43 Author: Samson Tam Date: Wed Apr 24 08:37:04 2024 -0400 drm/amd/display: Clean-up recout calculation for visual confirm [Why & How] Split into a separate adjust and calculate call so we can let the caller adjust recout Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b9b5a82c532109a09f4340ef5cabdfdbb0691a9d Author: Agustin Gutierrez Date: Fri Apr 19 13:53:52 2024 -0400 drm/amd/display: Fix DSC-re-computing [Why] This fixes a bug introduced by commit c53655545141 ("drm/amd/display: dsc mst re-compute pbn for changes on hub"). The change caused light-up issues with a second display that required DSC on some MST docks. [How] Use Virtual DPCD for DSC caps in MST case. [Limitations] This change only affects MST DSC devices that follow specifications additional changes are required to check for old MST DSC devices such as ones which do not check for Virtual DPCD registers. Reviewed-by: Swapnil Patel Reviewed-by: Hersen Wu Acked-by: Tom Chung Signed-off-by: Agustin Gutierrez Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6597efcfc53585d5fb177b901a41b4ac2f282b99 Author: Ville Syrjälä Date: Mon Apr 8 20:04:26 2024 +0300 drm/stm: Allow build with COMPILE_TEST=y Allow stm to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Yannick Fertre Cc: Raphael Gallais-Pou Cc: Philippe Cornu Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-22-ville.syrjala@linux.intel.com Acked-by: Raphaël Gallais-Pou commit f0edd66e3428a4e1bb98923ec1bfdedf4f418d55 Author: Ville Syrjälä Date: Mon Apr 8 20:04:25 2024 +0300 drm/rcar-du: Allow build with COMPILE_TEST=y Allow rcar-du to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Laurent Pinchart Cc: Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-21-ville.syrjala@linux.intel.com Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart commit 1cfce526351f8aa959dcfa3f0d743b070f623d93 Author: Ville Syrjälä Date: Mon Apr 8 20:04:21 2024 +0300 drm/atmel-hlcdc: Allow build with COMPILE_TEST=y Allow atmel-hlcdc to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Sam Ravnborg Cc: Boris Brezillon Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-17-ville.syrjala@linux.intel.com Acked-by: Sam Ravnborg commit dc6fcaaba5a5411237d042a26c4d46689f3346bb Author: Ville Syrjälä Date: Mon Apr 8 20:04:20 2024 +0300 drm/omap: Allow build with COMPILE_TEST=y Allow omapdrm to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Tomi Valkeinen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-16-ville.syrjala@linux.intel.com Reviewed-by: Tomi Valkeinen commit 5bbad9e008a811ae19da038de35aab9fe2f4e036 Author: Ville Syrjälä Date: Mon Apr 8 20:04:19 2024 +0300 drm/omap: Open code phys_to_page() phys_to_page() is not available on most architectures. Just open code it like msm does. Allows COMPILE_TEST=y builds of omapdrm on other architectures. Cc: Tomi Valkeinen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-15-ville.syrjala@linux.intel.com Reviewed-by: Tomi Valkeinen commit 8c59c8709e3039e31174ee4941d5ac69d81ffbb0 Author: Ville Syrjälä Date: Mon Apr 8 20:04:16 2024 +0300 drm/hisilicon/kirin: Allow build with COMPILE_TEST=y Allow kirin to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least. Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-12-ville.syrjala@linux.intel.com Acked-by: John Stultz commit 6d46a50934c84f9db9502a8265617ffc621c407b Author: Ville Syrjälä Date: Mon Apr 8 20:04:15 2024 +0300 drm/hisilicon/kirin: Fix MASK(32) on 32bit architectures BIT(32) is illegal when sizeof(long)==4. Use BIT_ULL(32) instead. Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-11-ville.syrjala@linux.intel.com Acked-by: John Stultz commit e34a7238bd530941ea96da74343541db7b1568d8 Author: Ville Syrjälä Date: Mon Apr 8 20:04:14 2024 +0300 drm/hisilicon/kirin: Fix 64bit divisions Use the appropriate 64bit division helpers to make the code build on 32bit architectures. Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-10-ville.syrjala@linux.intel.com Acked-by: John Stultz commit 4a7fe0576e936b7ef8220698132c183410fb1ede Author: Ville Syrjälä Date: Mon Apr 8 20:04:13 2024 +0300 drm/hisilicon/kirin: Include linux/io.h for readl()/writel() Include linux/io.h for readl()/writel(). When built on x86_64 w/ COMPILE_TEST=y: ../drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h:93:16: error: implicit declaration of function ‘readl’ [-Werror=implicit-function-declaration] 93 | orig = readl(addr); | ^~~~~ ../drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h:96:9: error: implicit declaration of function ‘writel’ [-Werror=implicit-function-declaration] 96 | writel(tmp, addr); | ^~~~~~ Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408170426.9285-9-ville.syrjala@linux.intel.com Acked-by: John Stultz commit d2f751722ac6be34856a7f69595deed6216724af Author: Nicholas Susanto Date: Wed Apr 24 13:34:11 2024 -0400 drm/amd/display: Enable urgent latency adjustments for DCN35 [Why] Underflow occurs when running Netflix in a 4k144 eDP + 4k60 HDMI FRL setup. It is caused by latency varying based on the DCFCLK/FCLK state. [How] Enable urgent latency adjustment and match the reference to existing ASIC that also see increased latency at low FCLK. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Nicholas Susanto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0127f0445f7c1f3338186d8c59ddcadf46a7036f Author: Dillon Varone Date: Mon Apr 15 13:13:56 2024 -0400 drm/amd/display: Refactor input mode programming for DIG FIFO [WHY] Input mode for the DIG FIFO should be programmed as part of stream encoder setup. [HOW] Pre-calculate the pixels per cycle as part of the pixel clock params, and program as part of stream encoder setup. Reviewed-by: Wenjing Liu Acked-by: Tom Chung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4482b4f6c2cce51a3e28eb814ea61ac5a1690412 Author: Sreeja Golui Date: Thu Apr 18 15:54:13 2024 -0400 drm/amd/display: Providing a mechanism to have a custom pwm frequency [Why] Providing a mechanism to manipulate the pwm frequency on the individual GPUs and monitor the transition during the switch. [How] Added a variable in dc_debug_options data structure. Using this variable to call the newly added command on the firmware. Reviewed-by: Harry Vanzylldejong Acked-by: Tom Chung Signed-off-by: Sreeja Golui Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 504a336a57df8e5c7e136b1a594ffc4a1875dae8 Author: Tom Chung Date: Wed Apr 17 17:29:42 2024 +0800 drm/amd/display: Add Replay capability and state in debugfs [Why & How] User can get the panel replay capability and state for debug. sudo cat /sys/kernel/debug/dri/0/eDP-1/replay_capability "Sink support: no" - if panel doesn't support Replay "Sink support: yes" - if panel supports Replay "Driver support: no\n" - if driver doesn't support Replay "Driver support: yes\n" - if driver supports Replay sudo cat /sys/kernel/debug/dri/0/eDP-1/replay_state It will return current panel replay state Reviewed-by: Sun peng Li Acked-by: Tom Chung Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 23554c3ec85a7d7300f896e5a75bbb1e6a06f5c6 Author: Xi Liu Date: Mon Apr 22 10:21:04 2024 -0400 drm/amd/display: add support for force ODM override [Why and how] Current 420 ODM combine will override debug settings. Add support if debug settings is set for 420 ODM combine. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Xi Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d26238c6806d56d04488ec28e2c94468ddcc33cf Author: Ville Syrjälä Date: Mon Apr 8 22:06:08 2024 +0300 drm/amdgpu: Use drm_crtc_vblank_crtc() Replace the open coded drm_crtc_vblank_crtc() with the real thing. Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408190611.24914-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Reviewed-by: Alex Deucher commit 0097ecd06d9dcf671da4bc643d215a4696f1c130 Author: Ville Syrjälä Date: Mon Apr 8 22:06:09 2024 +0300 drm/i915: Use drm_crtc_vblank_crtc() Replace the open coded drm_crtc_vblank_crtc() with the real thing. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240408190611.24914-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit cd6891f8e3714172cb2ff374d07cb6884b44b530 Author: Ville Syrjälä Date: Fri May 3 15:24:49 2024 +0300 drm/i915/bios: Define VBT block 253 (PRD Table) contents Define the contents of VBT block 253 (PRD Table). Unfortunately the block has two definitions, with the cutoff supposedly happening on ICL vs. TGL. Also according to some notes it might be that the VBIOS (if that's still a thing) still uses the old definition even on TGL+. Quite the mess. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-36-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c23e1dc1d508f8a5209f11f54b5d6ec8e8ae4ace Author: Ville Syrjälä Date: Fri May 3 15:24:48 2024 +0300 drm/i915/bios: Define VBT block 252 (int15 Hook) Declare that VBT block 252 is the "int15 hook". This is some VBIOS only juju so don't bother with a full definition. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-35-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 62b695b8c92ecfd26f486615f4075fe0862dbf7a Author: Ville Syrjälä Date: Fri May 3 15:24:47 2024 +0300 drm/i915/bios: Define VBT block 55 (Compression Parameters) Define the contents of the obsolete VBT block 55 (Compression Parameters). This was some early attempt at defining the compression parameters. However the spec says: "This block is obsolete and should not be consumed for any compression programming." Block 56 is the replacement that should actually be used. So let's just name the obsolete old block but not even bother defining the contents. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-34-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit d9a6dfdbe7d4daa8db017ad690144d3116db1d1d Author: Ville Syrjälä Date: Fri May 3 15:24:46 2024 +0300 drm/i915/bios: Define VBT block 50 (MIPI) contents Define the contents of VBT block 50 (MIPI). This was some easly attempt at a MIPI DSI stuff. I'm not sure this was ever actually used (I certainly don't have any VBTs with this block), but here's some kind of definition for it anyway. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-33-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2b22b1b88c739348b79284ad3a216b7f3cb141c7 Author: Ville Syrjälä Date: Fri May 3 15:24:45 2024 +0300 drm/i915/bios: Define VBT block 57 (Vswing PreEmphasis Table) contents Define the contents of VBT block 57 (Vswing PreEmphasis Table). The contents is highly platform specific. The columns of the table corresponding to some set of PHY/etc registers. The rows corresponding to all legal vswing+pre-emphasis combinations (ie. should be 10 rows in each table). And each table corresponds to a platform specific (mostly undocumented) mapping based on link rate/eDP low-vswing/etc. parameters. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-32-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a7566ba47ba6c97df369fe7acf820d07ff3a9191 Author: Ville Syrjälä Date: Fri May 3 15:24:44 2024 +0300 drm/i915/bios: Define VBT block 55 (RGB Palette Table) contents Define the contents of VBT block 55 (RGB Palette Table). Note that I've not actually seen any real world VBTs with this block. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-31-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4baedbe2c38f05d2e7121e0f78fc3469011b0dfd Author: Ville Syrjälä Date: Fri May 3 15:24:43 2024 +0300 drm/i915/bios: Define VBT block 51 (Fixed Set Mode Table) contents Define the contents of VBT block 51 (Fixed Set Mode Table). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-30-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit cb094188f5ca64f5fcc6e1bbcb0f3950766e5027 Author: Ville Syrjälä Date: Fri May 3 15:24:42 2024 +0300 drm/i915/bios: Define VBT block 46 (Chromaticity For Narrow Gamut Panel) contents Define the contents of VBT block 46 (Chromaticity For Narrow Gamut Panel). One entry per panel. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-29-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit bc2dcfb6b68c91a658c5fd5e0d78392846980da4 Author: Ville Syrjälä Date: Fri May 3 15:24:41 2024 +0300 drm/i915/bios: Define VBT block 45 (eDP BFI) contents Define the contents of VBT block 45 (eDP BFI). Note that I've not actually seen any real world VBTs with this block. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-28-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 9f15bc83822b988b61be1179ae43d5d765071962 Author: Ville Syrjälä Date: Fri May 3 15:24:40 2024 +0300 drm/i915/bios: Define VBT block 28 (EFP DTD) contents Define the contents of VBT block 28 (EFP DTD). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-27-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ad3323a6ccb7d43bbeeaa46d5311c43d5d361fc7 Author: Sui Jingfeng Date: Wed May 8 02:00:00 2024 +0800 drm/drm-bridge: Drop conditionals around of_node pointers Having conditional around the of_node pointer of the drm_bridge structure is not necessary, since drm_bridge structure always has the of_node as its member. Let's drop the conditional to get a better looks, please also note that this is following the already accepted commitments. see commit d8dfccde2709 ("drm/bridge: Drop conditionals around of_node pointers") for reference. Signed-off-by: Sui Jingfeng Reviewed-by: Laurent Pinchart Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240507180001.1358816-1-sui.jingfeng@linux.dev commit 9bda347a7d5c669be2184a6b6d35bbf1144e04d3 Author: Ville Syrjälä Date: Fri May 3 15:24:39 2024 +0300 drm/i915/bios: Define VBT block 26 (TV Options) contents Define the contents of VBT block 26 (TV Options). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-26-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 76f1cf76ef4197663593b85b8b911ac6cf809489 Author: Ville Syrjälä Date: Fri May 3 15:24:38 2024 +0300 drm/i915/bios: Define VBT block 25 (SDVO LVDS PPS) contents Define the contents of VBT block 25 (SDVO LVDS PPS). Not 100% sure about the order of the fields as this is not documented in the VBT spec anymore, but this order matches what is included as part of the power sequencing SDVO commands (struct sdvo_panel_power_sequencing). Also the real world VBT data I have looks OK with this definition. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-25-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit fdbebda16c29e0d5c456e8012801ebbcb4f78b30 Author: Ville Syrjälä Date: Fri May 3 15:24:37 2024 +0300 drm/i915/bios: Define VBT block 24 (SDVO LVDS PnP ID) contents Define the contents of VBT block 24 (SDVO LVDS PnP ID). The descriotion is not part of the VBT spec anymore, but the layout is rather obsvious. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-24-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 9bc6b35635318f36adf5b526ae85302605646a57 Author: Ville Syrjälä Date: Fri May 3 15:24:36 2024 +0300 drm/i915/bios: Define VBT block 21 (EFP List) contents Define the contents of VBT block 21 (EFP List). Specs are nowhere to be found, but real world data suggests that each entry is just the first four bytes of the EDID PnP ID structure. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-23-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit afa1bf2d5df261e3e0dbecce1204106f11a8d351 Author: Ville Syrjälä Date: Fri May 3 15:24:35 2024 +0300 drm/i915/bios: Define VBT block 20 (OEM Customizable Modes) contents Define the contents of VBT block 20 (OEM Customizable Modes). Each entry is either 26 or 28 bytes, depending on the BDB version. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-22-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e225161e2aff5dffd1ff754d86c17c7f9b6457f5 Author: Ville Syrjälä Date: Fri May 3 15:24:34 2024 +0300 drm/i915/bios: Define VBT blocks 19,30,32 (Display Configuration Removal Table) contents Define the contenst is VBT blocks 19,30,32 (Display Configuration Removal Table) contents. There are three variants of this block: pre-IVB, IVB, HSW+, with each having slightly different entries. Curiously many HSW/BDW machines seem to have both the IVB and HSW+ variants in their VBTs simultanously. No idea why. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-21-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit e547b97e9d79c1b8a8f935a398a41bb3d9bf4c48 Author: Ville Syrjälä Date: Fri May 3 15:24:33 2024 +0300 drm/i915/bios: Define VBT blocks 16,29,31 (Toggle List) contents Define the contenst is VBT blocks 16,19,31 (Toggle List). There are three variants of this block: pre-IVB, IVB, HSW+, with each having slightly different entries. Curiously many HSW/BDW machines seem to have both the IVB and HSW+ variants in their VBTs simultanously. No idea why. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-20-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 95f4cbc8fb323b5174dcdde87da0b04161796a63 Author: Ville Syrjälä Date: Fri May 3 15:24:32 2024 +0300 drm/i915/bios: Define VBT block 18 (Driver Rotation) contents Define the contents of block 18 (Driver Rotation). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-19-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8e94221f78018338e1a5791cec0394b13dd0b13d Author: Ville Syrjälä Date: Fri May 3 15:24:31 2024 +0300 drm/i915/bios: Define VBT block 17 (SV Test Functions) contents Define the contents of VBT block 17 (SV Test Functions). Nothing real here for us, but might as well define it for completeness. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-18-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 55c6b98676ed667f8900d46257b96eff47abef55 Author: Ville Syrjälä Date: Fri May 3 15:24:30 2024 +0300 drm/i915/bios: Define ALM only VBT block 9 contents For some reason ALM VBT has two dot clock override tables. One as the normal block 15 and a second one as block 9. The table in block 9 has no row_size/num_rows information. On my Fujitsu Lifebook S6010 only the block 9 table has actual data in it. Block 15 is present but all zeroes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-17-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit f7d5b5ff088fc85baa563182f5ff2cd501ed56d5 Author: Ville Syrjälä Date: Fri May 3 15:24:29 2024 +0300 drm/i915/bios: Define VBT block 15 (Dot Clock Override Table) contents Define the contents of VBT block 15 (Dot Clock Override Table) The contents were reverse engineered by intuition. The gen2 stuff seems solid as I can verify that against real world VBT data. The gen3 stuff less so as all the gen3+ VBTs I have just filla the entire block with zeroes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-16-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 2f1aa210fefa08dc998ccffbf5a67d5be11edf3e Author: Ville Syrjälä Date: Fri May 3 15:24:28 2024 +0300 drm/i915/bios: Define VBT block 12 (Driver Persistent Algorithm) contents Define the contents of VBT block 12 (Driver Persistent Algorithm). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-15-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 98fe6aed8ae8590065eca04b6f0be98ae64c066a Author: Ville Syrjälä Date: Fri May 3 15:24:27 2024 +0300 drm/i915/bios: Define VBT block 10 (Mode Removal Table) contents Define the contents of VBT block 10 (Mode Removal Table). There seem to be two variants: - 8 byte entries for desktop systems - 10 byte entries for mobile systems, with the extra panel_flags being a bitmask of LFPs It seems starting from HSW only the mobile variant is used anymore. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-14-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2318da471a8af705083836967ad3acd13ee59d3c Author: Ville Syrjälä Date: Fri May 3 15:24:26 2024 +0300 drm/i915/bios: Define VBT blocks 6,7,8 (register tables) contents Define the contents for VBT blocks: - Block 6 (Extended MMIO Register Table) - Block 7 (IO Software Flag Table) - Block 8 (MMIO SWF Register Table) All of these use the same basic layout, with two known variants: - data_access_size==0xce -> offset,value tuples are u8,u8 - data_access_size==0x02 -> offset,value tuples are u32,u32 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2e8b8073178a898f56e6d1512de016f644306fb5 Author: Ville Syrjälä Date: Fri May 3 15:24:25 2024 +0300 drm/i915/bios: Define VBT block 5 (Generic Mode Table) Define the contents of VBT block 5 (Generic Mode Table). Details were mostly gleaned from some VBIOS sources. There are apparently two variants of the block: ALM only vs. MGM, defined here as bdb_generic_mode_table_alm and bdb_generic_mode_table_mgm. And those are the only two platforms where I've seen this block. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-12-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 22794e6cee284c154a464ef6c58219e35739a3fe Author: Ville Syrjälä Date: Fri May 3 15:24:24 2024 +0300 drm/i915/bios: Define VBT block 4 (Mode Support List) contents Define the contents of VBT block 4 (Mode Support List). Slightly crazy layout with a variable length list at the start, followed by the length of said list. No real idea what these "Intel mode numbers" really are. What I see in real world VBTs seems to be always the same list of 26 numbers, ranging between 0x30 and 0x84. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c58f254be3bd6276133735c8b7762c51589b4d03 Author: Ville Syrjälä Date: Fri May 3 15:24:23 2024 +0300 drm/i915/bios: Define VBT block 3 (Display Toggle Option) contents Define the contents of VBT block 3 (Display Toggle Option). On modern VBTs this is just a single byte, but on ALM there is also some extra to do with toggle lists or something. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-10-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit a17b317c11fa1d66e2a0bfcf680e3eb6a14a5c57 Author: Ville Syrjälä Date: Fri May 3 15:24:22 2024 +0300 drm/i915/bios: Add version notes for some blocks Document which VBT blocks were defined in which BDB version, for the cases where the spec actually states this accurately. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e760a7dade4ba88d417e355ca7a109571abe2ac3 Author: Ville Syrjälä Date: Fri May 3 15:24:21 2024 +0300 drm/i915/bios: Flag "VBIOS only" VBT data blocks Several data blocks are mean to be consumbed by VBIOS only. Flag them as such. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-8-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 10632fcbf057af326e8b7d9b18120f939f4f1aa0 Author: Ville Syrjälä Date: Fri May 3 15:24:20 2024 +0300 drm/i915/bios: Define "TV" child device handle Child device 0x2 used to be "TV" until redefined to mean EFP5 in version 215. Add a define for the old meaning as well. Technically it was probably deprecated a lot before version 215 since native TV encoders were last seen on CTG, and SDVO was fully gone by HSW. So something like "???-164" might also be a reasonable way to document this, but no real harm in saying "???-214" since nothing else presumably occupied that bit in the meantime. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-7-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 8e26690851f9b49551dc6c48c720700f44c8986a Author: Ville Syrjälä Date: Fri May 3 15:24:19 2024 +0300 drm/i915/bios: Rename SDVO DTD blocks a bit The SDVO LVDS blocks are specifically about LVDS, so stick to naming that reflects that. This also makes the names match the spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-6-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 6ac67ccf4c898ff29ffba4cb4b6213deae05c8fb Author: Ville Syrjälä Date: Fri May 3 15:24:18 2024 +0300 drm/i915/bios: Get rid of "LVDS" from all LFP data stuff The LFP data applies to all kinds of display interfaces, so stop calling things by the "LVDS" name. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7234f948b58b04b11ec7d32c1d358887f9e700e6 Author: Ville Syrjälä Date: Fri May 3 15:24:17 2024 +0300 drm/i915/bios: Indicate which VBT structures are based on EDID VBT reuses a bunch of EDID data structures. Flag those as such for clarity. I chose "bdb_edid_" as the namespace for these. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d9981f36e4f372bbf03af7a9c1f3bfdd79440589 Author: Ville Syrjälä Date: Fri May 3 15:24:16 2024 +0300 drm/i915/bios: Remove version number comment from DEVICE_HANDLE_EFP4 DEVICE_HANDLE_EFP4 has actually been in use since the very beginning, or at least something has been occupying that bit because old VBTs actually use it, and it definitely looks to be about external displays given how its used. So let's ignore what the current spec claims and remove the misleading version number comment. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-3-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 7043141fbbbecfa1d26c538d502649079fe6e095 Author: Ville Syrjälä Date: Fri May 3 15:24:15 2024 +0300 drm/i915/bios: Define eDP DSC disable bit There's a new "DSC disable" bit in the eDP VBT block. Define it. TODO: actually use it? Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7fb8af6798e8d013017e4607505f58d9942fd671 Author: Jani Nikula Date: Mon Apr 29 19:43:36 2024 +0300 drm: deprecate driver date The driver date serves no useful purpose, because it's hardly ever updated. The information is misleading at best. As described in Documentation/gpu/drm-internals.rst: The driver date, formatted as YYYYMMDD, is meant to identify the date of the latest modification to the driver. However, as most drivers fail to update it, its value is mostly useless. The DRM core prints it to the kernel log at initialization time and passes it to userspace through the DRM_IOCTL_VERSION ioctl. Stop printing the driver date at init, and start returning the empty string "" as driver date through the DRM_IOCTL_VERSION ioctl. The driver date initialization in drivers and the struct drm_driver date member can be removed in follow-up. Reviewed-by: Hamza Mahfooz Acked-by: Simon Ser Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240429164336.1406480-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit 3797783b1c966885e8bae4a7e6b99ca2f0fae4f0 Author: Ville Syrjälä Date: Thu May 2 15:14:23 2024 +0300 drm/i915: Remove counter productive REGION_* wrappers This extra macro level between the region IDs and their bitmasks just makes it harder to see what is used where. Get rid of the wrappers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240502121423.1002-3-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit d082c05a635e59764c5337a5da7f4287b8a80476 Author: Ville Syrjälä Date: Thu May 2 15:14:22 2024 +0300 drm/i915: Pass the region ID rather than a bitmask to HAS_REGION() The name 'HAS_REGION()' suggests we are checking for a single region, so seem more sensible to pass in the region ID rather than a bitmask. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240502121423.1002-2-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 8b69ac66d68907deb473b310b4f2c2a6b26ef191 Author: Ville Syrjälä Date: Thu May 2 15:14:21 2024 +0300 drm/i915: Fix HAS_REGION() usage in intel_gt_probe_lmem() HAS_REGION() takes a bitmask, not the region ID. This causes the GEM_BUG_ON() to assert that the SMEM region is available rather than the intended LMEM region. No real harm since SMEM is always available, but also not checking what was intended. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240502121423.1002-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit c06387ab4472fc5af857d02323fc1073ff7923e0 Author: Jani Nikula Date: Mon May 6 13:09:04 2024 +0300 drm/i915: pass dev_priv explicitly to PORT_DFT2_G4X Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PORT_DFT2_G4X register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/0db8ee7b66b9660fc9fd80598257c6d36f0f506b.1714990089.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 19e74ba7f894f5e95c1c56ebcdbe1fdfcf20b9c4 Author: Jani Nikula Date: Mon May 6 13:09:03 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_CRC_* Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_CRC_RES_* register macros. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/849315d4417a2ce60e867648d9a040c5e96bc22d.1714990089.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 6dd2bd94d2ef82a356c6580e3f59d93208ac4755 Author: Jani Nikula Date: Mon May 6 13:09:02 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_CRC_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_CRC_CTL register macro. Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/2ac4438aa885be9d0fcf5c697beee99a4cd2c23f.1714990089.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ee7284230644e21fef0e38fc5bf8f907b6bb7f7c Author: Lucas De Marchi Date: Mon May 6 07:19:17 2024 -0700 drm/xe/ads: Use flexible-array Zero-length arrays are deprecated and flexible arrays should be used instead: https://www.kernel.org/doc/html/v6.9-rc7/process/deprecated.html#zero-length-and-one-element-arrays Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202405051824.AmjAI5Pg-lkp@intel.com/ Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240506141917.205714-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit b7f6318a9c3d9c79b724b20ff5382775a9c58346 Author: Michal Wajdeczko Date: Tue May 7 13:09:59 2024 +0200 drm/xe: Fix xe_device.h Some explicit includes are needed only from the xe_device.c. And there is no need for redundant forward declarations. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240507110959.2747-4-michal.wajdeczko@intel.com commit 93dd6ad89c7d436da988cb5917daf406a3941893 Author: Michal Wajdeczko Date: Tue May 7 13:09:58 2024 +0200 drm/xe: Don't rely on xe_force_wake.h to be included elsewhere While xe_force_wake.h is now included from the xe_device.h, we want to drop that include as we don't need it there. Explicitly include xe_force_wake.h where needed. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240507110959.2747-3-michal.wajdeczko@intel.com commit 7348a9a1122884ccfc414166daaf3977100d1c30 Author: Michal Wajdeczko Date: Tue May 7 13:09:57 2024 +0200 drm/xe: Don't rely on xe_assert.h to be included elsewhere While xe_assert.h is now included and used by the xe_force_wake.h, we want to stop include xe_force_wake.h from xe_device.h as it's not needed there. Explicitly include xe_assert.h where needed. Signed-off-by: Michal Wajdeczko Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240507110959.2747-2-michal.wajdeczko@intel.com commit c18a5e3e61650110b5d8523292abaf6ae19ebdd2 Author: Tejas Upadhyay Date: Tue Apr 30 18:42:29 2024 +0530 drm/xe: skip error capture when exec queue is killed When user closes exec queue soon after job submission, we are generating error coredump. Instead check if exec queue is killed during job timeout then skip error coredump capture. V2: - Just skip error capture - MattB Signed-off-by: Tejas Upadhyay Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240430131229.2228809-1-tejas.upadhyay@intel.com commit 749670a58d935303ad1ce529acc73f12de25832e Author: Janusz Krzysztofik Date: Mon May 6 20:02:50 2024 +0200 Revert "drm/i915: Remove extra multi-gt pm-references" This reverts commit 1f33dc0c1189efb9ae19c6fc22b64dd3e26261fb. There was a patch supposed to fix an issue of illegal attempts to free a still active i915 VMA object when parking a GT believed to be idle, reported by CI on 2-GT Meteor Lake. As a solution, an extra wakeref for a Primary GT was acquired from i915_gem_do_execbuffer() -- see commit f56fe3e91787 ("drm/i915: Fix a VMA UAF for multi-gt platform"). However, that fix occurred insufficient -- the issue was still reported by CI. That wakeref was released on exit from i915_gem_do_execbuffer(), then potentially before completion of the request and deactivation of its associated VMAs. Moreover, CI reports indicated that single-GT platforms also suffered sporadically from the same race. Since that issue was fixed by another commit f3c71b2ded5c ("drm/i915/vma: Fix UAF on destroy against retire race"), the changes introduced by that insufficient fix were dropped as no longer useful. However, that series resulted in another VMA UAF scenario now being triggered in CI. <4> [260.290809] ------------[ cut here ]------------ <4> [260.290988] list_del corruption. prev->next should be ffff888118c5d990, but was ffff888118c5a510. (prev=ffff888118c5a510) <4> [260.291004] WARNING: CPU: 2 PID: 1143 at lib/list_debug.c:62 __list_del_entry_valid_or_report+0xb7/0xe0 .. <4> [260.291055] CPU: 2 PID: 1143 Comm: kms_plane Not tainted 6.9.0-rc2-CI_DRM_14524-ga25d180c6853+ #1 <4> [260.291058] Hardware name: Intel Corporation Meteor Lake Client Platform/MTL-P LP5x T3 RVP, BIOS MTLPFWI1.R00.3471.D91.2401310918 01/31/2024 <4> [260.291060] RIP: 0010:__list_del_entry_valid_or_report+0xb7/0xe0 ... <4> [260.291087] Call Trace: <4> [260.291089] <4> [260.291124] i915_vma_reopen+0x43/0x80 [i915] <4> [260.291298] eb_lookup_vmas+0x9cb/0xcc0 [i915] <4> [260.291579] i915_gem_do_execbuffer+0xc9a/0x26d0 [i915] <4> [260.291883] i915_gem_execbuffer2_ioctl+0x123/0x2a0 [i915] ... <4> [260.292301] ... <4> [260.292506] ---[ end trace 0000000000000000 ]--- <4> [260.292782] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6ca3: 0000 [#1] PREEMPT SMP NOPTI <4> [260.303575] CPU: 2 PID: 1143 Comm: kms_plane Tainted: G W 6.9.0-rc2-CI_DRM_14524-ga25d180c6853+ #1 <4> [260.313851] Hardware name: Intel Corporation Meteor Lake Client Platform/MTL-P LP5x T3 RVP, BIOS MTLPFWI1.R00.3471.D91.2401310918 01/31/2024 <4> [260.326359] RIP: 0010:eb_validate_vmas+0x114/0xd80 [i915] ... <4> [260.428756] Call Trace: <4> [260.431192] <4> [639.283393] i915_gem_do_execbuffer+0xd05/0x26d0 [i915] <4> [639.305245] i915_gem_execbuffer2_ioctl+0x123/0x2a0 [i915] ... <4> [639.411134] ... <4> [639.449979] ---[ end trace 0000000000000000 ]--- We defer actually closing, unbinding and destroying a VMA until next idle point, or until the object is freed in the meantime. By postponing the unbind, we allow for the VMA to be reopened by the client, avoiding the work required to rebind the VMA. Starting from commit b0647a5e79b1 ("drm/i915: Avoid live-lock with i915_vma_parked()"), we assume that as long as a GT is held idle, no VMA would be reopened while we destroy them. That assumption is no longer true in multi-GT configurations, where a VMA we reopen may be handled by a GT different from the one that we already keep active via its engine while we set up an execbuf request. Restoring the extra GT0 PM wakeref removed from i915_gem_do_execbuffer() processing path seems to fix this issue. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10608 Signed-off-by: Janusz Krzysztofik Cc: Rodrigo Vivi Cc: Nirmoy Das Reviewed-by: Nirmoy Das Fixes: 1f33dc0c1189 ("drm/i915: Remove extra multi-gt pm-references") Link: https://patchwork.freedesktop.org/patch/msgid/20240506180253.96858-2-janusz.krzysztofik@linux.intel.com Signed-off-by: Rodrigo Vivi commit a4cb575d910a5c65c5f8b764e2b5f56b66019522 Author: Francois Dugast Date: Mon May 6 22:29:50 2024 +0200 drm/xe/vm_doc: Fix some typos Fix some typos and add / remove / change a few words to improve readability and prevent some ambiguities. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240506202950.109750-1-francois.dugast@intel.com Signed-off-by: Rodrigo Vivi commit ef283674a17e000bb6b2ff05dd2ac5cbf2e3ae0d Author: Ville Syrjälä Date: Mon Apr 22 11:58:57 2024 +0300 drm/uapi: Move drm_color_ctm_3x4 out from drm_mode.h drm_color_ctm_3x4 is some undocumented amgdpu private uapi and thus has no business being in drm_mode.h. At least move it to some amdgpu specific header, albeit with the wrong namespace as maybe something somewhere is using this already? Cc: Harry Wentland Cc: Joshua Ashton Cc: Alex Deucher Fixes: 6872a189be50 ("drm/amd/display: Add 3x4 CTM support for plane CTM") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240422085857.17651-1-ville.syrjala@linux.intel.com Reviewed-by: Harry Wentland commit c286f6a973c66c0d993ecab9f7162c790e7064c8 Author: Karthikeyan Ramasubramanian Date: Wed Feb 21 18:06:24 2024 -0700 drm/i915/bios: Fix parsing backlight BDB data Starting BDB version 239, hdr_dpcd_refresh_timeout is introduced to backlight BDB data. Commit 700034566d68 ("drm/i915/bios: Define more BDB contents") updated the backlight BDB data accordingly. This broke the parsing of backlight BDB data in VBT for versions 236 - 238 (both inclusive) and hence the backlight controls are not responding on units with the concerned BDB version. backlight_control information has been present in backlight BDB data from at least BDB version 191 onwards, if not before. Hence this patch extracts the backlight_control information for BDB version 191 or newer. Tested on Chromebooks using Jasperlake SoC (reports bdb->version = 236). Tested on Chromebooks using Raptorlake SoC (reports bdb->version = 251). v2: removed checking the block size of the backlight BDB data [vsyrjala: this is completely safe thanks to commit e163cfb4c96d ("drm/i915/bios: Make copies of VBT data blocks")] Fixes: 700034566d68 ("drm/i915/bios: Define more BDB contents") Cc: stable@vger.kernel.org Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Karthikeyan Ramasubramanian Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240221180622.v2.1.I0690aa3e96a83a43b3fc33f50395d334b2981826@changeid Signed-off-by: Ville Syrjälä commit efd920f48d1f9c41368579d1a278e88c082cc233 Author: Kang Yang Date: Mon Apr 29 16:15:25 2024 +0800 wifi: ath12k: remove invalid peer create logic In ath12k_mac_op_assign_vif_chanctx(), there is a logic to create peer using ar->mac_addr for a STA vdev. This is invalid because a STA vdev should have a peer created using AP's MAC address. Besides, if we run into that logic, it means a peer has already been created earlier, we should not create it again. So remove it. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240429081525.983-6-quic_kangyang@quicinc.com commit f40aaca07bf7b52e82ca8e5ddb29190466b5dcbd Author: Kang Yang Date: Mon Apr 29 16:15:23 2024 +0800 wifi: ath12k: avoid duplicated vdev down ath12k_mac_op_unassign_vif_chanctx() will do vdev down in function ath12k_mac_monitor_stop(). So no need to do vdev down again. remove the duplicated one. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240429081525.983-4-quic_kangyang@quicinc.com commit 3b0989e925f38df733a03ff5a320d6841006b3f9 Author: Kang Yang Date: Mon Apr 29 16:15:22 2024 +0800 wifi: ath12k: avoid duplicated vdev stop ath12k_mac_op_unassign_vif_chanctx() will do vdev stop in ath12k_mac_monitor_stop(). This ath12k_mac_vdev_stop() will do vdev stop again, then might trigger firmware crash. So add judgement to avoid duplicated vdev stop. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: c9e4e41e71ff ("wifi: ath12k: move peer delete after vdev stop of station for WCN7850") Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240429081525.983-3-quic_kangyang@quicinc.com commit 782615f280ce8ad4e3effb42d70304f4dd2d487f Author: Kang Yang Date: Mon Apr 29 16:15:21 2024 +0800 wifi: ath12k: remove unused variable monitor_flags monitor_flags is defined in struct ath12k. Although it is changed in some places, but it is not actually used. So remove related code. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240429081525.983-2-quic_kangyang@quicinc.com commit 582e94ebe230afa35baef06833006b24b601ab11 Author: Tamizh Chelvam Raja Date: Tue Apr 30 14:44:14 2024 +0530 wifi: ath12k: Remove unused tcl_*_ring configuration Currently memory allocation for multiple hardware rings done in host as these memory will be used by firmware/hardware. But in case of tcl_cmd_ring and tcl_status_ring neither firmware nor hardware uses host allocated memory and it uses memory allocated by firmware itself. So avoid tcl_cmd_ring and tcl_status_ring setup in host. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Tamizh Chelvam Raja Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430091414.2486196-4-quic_tamizhr@quicinc.com commit ed07ff6745092f36cd996658bd64d74e4331d331 Author: Tamizh Chelvam Raja Date: Tue Apr 30 14:44:13 2024 +0530 wifi: ath12k: Remove unsupported tx monitor handling Currently tx monitor is not supported in driver. So remove the tx monitor ring configuration, allocation and handling. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Tamizh Chelvam Raja Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430091414.2486196-3-quic_tamizhr@quicinc.com commit 9f74e7b306dcd7a163822ecb3b1587e9bd3f9c62 Author: Tamizh Chelvam Raja Date: Tue Apr 30 14:44:12 2024 +0530 wifi: ath12k: fix calling correct function for rx monitor mode Currently in ath12k_dp_tx_htt_monitor_mode_ring_config() ath12k_dp_tx_htt_tx_monitor_mode_ring_config() function wrongly called twice. Fix that by calling ath12k_dp_tx_htt_rx_monitor_mode_ring_config(). Currently monitor mode is disabled in driver so the change is compile tested and boot sequence verified. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Tamizh Chelvam Raja Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430091414.2486196-2-quic_tamizhr@quicinc.com commit 10d2b4f4aa0b9a1ac55d2313d2c682add25e31c6 Author: Breno Leitao Date: Fri May 3 03:32:56 2024 -0700 wifi: wil6210: Do not use embedded netdev in wil6210_priv Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_device from struct wil6210_priv by converting it into a pointer. Then use the leverage alloc_netdev_dummy() to allocate the net_device object at wil_if_add(). The free of the device occurs at wil_if_remove(). Link: https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ [1] Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240503103304.339489-1-leitao@debian.org commit 5b882c1e5a355d034c0e08fba2402b4451765ab2 Author: Michal Wajdeczko Date: Mon May 6 22:52:54 2024 +0200 drm/xe: Fix xe_mocs.h We don't need to include . We don't use struct xe_exec_queue here. We should sort forward declarations. Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240506205254.2659-1-michal.wajdeczko@intel.com commit 4c2b796be3a12a11ab611917fafdabc9d3862a1d Author: Venkateswara Naralasetty Date: Fri May 3 16:24:16 2024 +0300 wifi: ath11k: skip status ring entry processing If STATUS_BUFFER_DONE is not set for a monitor status ring entry, we don't process the status ring until STATUS_BUFFER_DONE set for that status ring entry. During LMAC reset it may happen that hardware will not write STATUS_BUFFER_DONE tlv in status buffer, in that case we end up waiting for STATUS_BUFFER_DONE leading to backpressure on monitor status ring. To fix the issue, when HP (Head Pointer) + 1 entry is peeked and if DMA is not done and if HP + 2 entry's DMA done is set, replenish HP + 1 entry and start processing in next interrupt. If HP + 2 entry's DMA done is not set, poll onto HP + 1 entry DMA done to be set. Also, during monitor attach HP points to the end of the ring and TP (Tail Pointer) points to the start of the ring. Using ath11k_hal_srng_src_peek() may result in processing invalid buffer for the very first interrupt. Since, HW starts writing buffer from TP. To avoid this issue call ath11k_hal_srng_src_next_peek() instead of calling ath11k_hal_srng_src_peek(). Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Venkateswara Naralasetty Co-developed-by: Tamizh Chelvam Raja Signed-off-by: Tamizh Chelvam Raja Signed-off-by: Kalle Valo Link: https://msgid.link/20240429073624.736147-1-quic_tamizhr@quicinc.com commit 50aec9665e0babd62b9eee4e613d9a1ef8d2b7de Author: Matthew Brost Date: Sun May 5 20:47:58 2024 -0700 drm/xe: Use ordered WQ for G2H handler System work queues are shared, use a dedicated work queue for G2H processing to avoid G2H processing getting block behind system tasks. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Signed-off-by: Matthew Brost Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240506034758.3697397-1-matthew.brost@intel.com commit 9fbd0adbcbe81e207eb030d9ad59953905625dd1 Author: Janga Rahul Kumar Date: Sat May 4 01:09:02 2024 +0530 drm/xe/mocs: Add debugfs node to dump mocs This is useful to check mocs configuration. Tests/Tools can use this debugfs entry to get mocs info. v2: Address review comments. Change debugfs output style similar to pat debugfs. (Lucas De Marchi) v3: rebase. v4: Address review comments. Use function pointer inside ops struct. Update Test-with links. Remove usage of flags wherever not required. (Lucas De Marchi) v5: Address review comments. Move register defines. Modify mocs info struct to avoid holes. (Luca De Marchi) Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Janga Rahul Kumar Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240503193902.2056202-3-janga.rahul.kumar@intel.com Signed-off-by: Lucas De Marchi commit 72c7163f27483c333a1f27916505459efa1a373a Author: Janga Rahul Kumar Date: Sat May 4 01:09:01 2024 +0530 drm/xe: Relocate regs_are_mcr function Relocate regs_are_mcr funciton to a higher position in the file for improved visibility. Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Janga Rahul Kumar Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240503193902.2056202-2-janga.rahul.kumar@intel.com Signed-off-by: Lucas De Marchi commit a0862cf2febcc37188ab47441b69960c8c8f3fa3 Author: Nirmoy Das Date: Tue Apr 30 18:25:29 2024 +0200 drm/xe: Refactor default device atomic settings The default behavior of device atomics depends on the VM type and buffer allocation types. Device atomics are expected to function with all types of allocations for traditional applications/APIs. Additionally, in compute/SVM API scenarios with fault mode or LR mode VMs, device atomics must work with single-region allocations. In all other cases device atomics should be disabled by default also on platforms where we know device atomics doesn't on work on particular allocations types. v3: fault mode requires LR mode so only check for LR mode to determine compute API(Jose). Handle SMEM+LMEM BO's migration to LMEM where device atomics is expected to work. (Brian). v2: Fix platform checks to correct atomics behaviour on PVC. Acked-by: Michal Mrozek Reviewed-by: Oak Zeng Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20240430162529.21588-6-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit a4b725767d93e3564019906ad43908b8bf3d4d9e Author: Nirmoy Das Date: Tue Apr 30 18:25:28 2024 +0200 drm/xe: Add function to check if BO has single placement A new helper function xe_bo_has_single_placement() to check if a BO has single placement. Reviewed-by: José Roberto de Souza Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20240430162529.21588-5-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit 06e69a424930154bf030a56f8ddf781aee71f0e3 Author: Nirmoy Das Date: Tue Apr 30 18:25:27 2024 +0200 drm/xe: Introduce has_device_atomics_on_smem device info Add has_device_atomics_on_smem to specify that a device supports device atomics on system memory. Currently XE2 supports this so set this for XE2. v2: Set has_device_atomics_on_smem for all platform but PVC. Reviewed-by: Oak Zeng Reviewed-by: José Roberto de Souza Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20240430162529.21588-4-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit e7192f0162a069bc80a519c087bd2a2f18597d52 Author: Nirmoy Das Date: Tue Apr 30 18:25:26 2024 +0200 drm/xe: Move vm bind bo validation to a helper function Move vm bind bo validation to a helper function to make the xe_vm_bind_ioctl() more readable. v2: Capture ret value of xe_vm_bind_ioctl_validate_bo(Matt B). Remove redundant coh_mode param. Reviewed-by: Matthew Brost Reviewed-by: Oak Zeng Reviewed-by: José Roberto de Souza Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20240430162529.21588-3-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit c462f81b695a7cfde5ba3b0ea1a52c6abaa52a0b Author: Nirmoy Das Date: Tue Apr 30 18:25:25 2024 +0200 drm/xe: Introduce has_atomic_enable_pte_bit device info Add has_atomic_enable_pte_bit to specify that a device has PTE_AE bit in its PTE feild. Currently XE2 and PVC supports this so set this for those two. This will help consolidate setting atomic access bit in PTE logic which is spread between multiple files. Reviewed-by: Oak Zeng Reviewed-by: José Roberto de Souza Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20240430162529.21588-2-nirmoy.das@intel.com Signed-off-by: Nirmoy Das commit a6cd27d92a96e13473006d43ad03edac609ec493 Author: Douglas Anderson Date: Thu May 2 16:47:47 2024 -0700 drm/panel-edp: Add ID for KD KD116N09-30NH-A016 As evidenced by in-field reports, this panel shipped on pompom but we never added the ID and thus we're stuck w/ conservative timings. The panel was part of early patches but somehow got left off in the end. :( Add it in now. For future reference, EDID from this panel is: 00ffffffffffff002c82121200000000 321e0104951a0e780ae511965e55932c 19505400000001010101010101010101 010101010101a41f5686500084302820 55000090100000180000000000000000 00000000000000000000000000000000 000000000000000000000000000000fe 004b443131364e3039333041313600f6 We use the ASCII string from decoding the EDID ("KD116N0930A16") as the panel name. Reviewed-by: Hsin-Yi Wang Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240502164746.1.Ia32fc630e5ba41b3fdd3666d9e343568e03c4f3a@changeid commit accd3e041e8fe510e957513b419bac1cada04e21 Author: Jani Nikula Date: Tue Apr 30 13:10:13 2024 +0300 drm/i915: pass dev_priv explicitly to PORT_ALPM_LFPS_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PORT_ALPM_LFPS_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/f8a3bbade94258852b8129c5f5918fb06ceab54b.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7f4eae0a9439225837c1a5d96439abfcaf1db54f Author: Jani Nikula Date: Tue Apr 30 13:10:12 2024 +0300 drm/i915: pass dev_priv explicitly to PORT_ALPM_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PORT_ALPM_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/86e8f5649c822ff6fa0502ad88964bfcb269c6c5.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 94e760584a277d4fe683937a737ca2bec6e42f17 Author: Jani Nikula Date: Tue Apr 30 13:10:11 2024 +0300 FIXME drm/i915: pass dev_priv explicitly to ALPM_CTL2 Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the ALPM_CTL2 register macro. Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/09acf2751cfd2f524e6ba97c3ac285495eae5c86.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 13b77ac5dc91a8aaac23d8be3a9a9d4c9a2dd4cf Author: Jani Nikula Date: Tue Apr 30 13:10:10 2024 +0300 drm/i915: pass dev_priv explicitly to ALPM_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the ALPM_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/96da9be36dc93fa9a7c329f25ff963e4998998c1.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit db92d423dc360ba957314e3c87ae67108216a6da Author: Jani Nikula Date: Tue Apr 30 13:10:09 2024 +0300 drm/i915: pass dev_priv explicitly to PIPE_SRCSZ_ERLY_TPT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PIPE_SRCSZ_ERLY_TPT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/b37217f55702fc10190c2c5aded7d845a36766f6.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit dd17285e94c2462848aa6e60f0e8edc880e9c19f Author: Jani Nikula Date: Tue Apr 30 13:10:08 2024 +0300 drm/i915: pass dev_priv explicitly to PSR2_MAN_TRK_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PSR2_MAN_TRK_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/72934c8ac3a923ca0c12fc6cdeec1e0b87ecc4a4.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit a0d1cfa86cc9e4421e459d471bdd7faa61ee15d9 Author: Jani Nikula Date: Thu May 2 13:39:25 2024 +0300 drm/i915: pass dev_priv explicitly to PSR2_SU_STATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PSR2_SU_STATUS register macro. v2: Expand from _PSR2_SU_STATUS to PSR2_SU_STATUS (Rodrigo) Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240502103925.1829104-1-jani.nikula@intel.com Signed-off-by: Jani Nikula commit d82d1a6be60de19486c96777d3322550976bed7d Author: Jani Nikula Date: Tue Apr 30 13:10:06 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR2_STATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR2_STATUS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/5d86a48f51ae6fa4c5a3abf098440a94d07de870.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit ccd5bc537b0842a089d158253911cff2c77608c0 Author: Jani Nikula Date: Tue Apr 30 13:10:05 2024 +0300 drm/i915: pass dev_priv explicitly to PSR_EVENT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PSR_EVENT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/9bc5819afa46416eb8f12ac050ed4d3bcde34b63.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 9b0dddd50e6810ec9c3c6792c084fdff4c76fd41 Author: Jani Nikula Date: Tue Apr 30 13:10:04 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR2_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR2_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/e7df99445716ce404bbfe733dd962288a529cf0d.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 83f4ccb3f3f941b23c064f3ae898d7a34d2bbb5d Author: Jani Nikula Date: Tue Apr 30 13:10:03 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR_DEBUG Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR_DEBUG register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/187dd49632d46e67705bd258ed7f9eabdeb108b2.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 5aa0cb6b1e74830c0e354ae9fdadd7d674c3ba6b Author: Jani Nikula Date: Tue Apr 30 13:10:02 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR_PERF_CNT Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR_PERF_CNT register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/21805960967ab88c1418037b98fe3e051eb00608.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 218f3d28d113d5143f938052f77c5c1458794c56 Author: Jani Nikula Date: Tue Apr 30 13:10:01 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR_STATUS Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR_STATUS register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/4aaa0187b16d2b96b5b4b1d775d7349c9fc28c7c.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 4c3cbdb12d4d9b5581e3e6d8497747bc71c64bed Author: Jani Nikula Date: Tue Apr 30 13:10:00 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_DATA Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR_AUX_DATA register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/4e3dc15b170c2b64168e46ebf1802d63df34b4a2.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit cf3d5f89a669dc29d2145d5e75d5ee5efc97ddea Author: Jani Nikula Date: Tue Apr 30 13:09:59 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR_AUX_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/66ec1f81be49c87cd9613ba052ce6fd50362d0e0.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 7a7a4c4eeba4a546f3be6d33b6d9f37a0c3e4a3d Author: Jani Nikula Date: Tue Apr 30 13:09:58 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_PSR_IIR Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_PSR_IIR register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/3a03109d11e7f55a456c3e5ef28d3ffa69582d3d.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit f9f8f8471785e1f312db59d1d14304fa333754f6 Author: Jani Nikula Date: Tue Apr 30 13:09:57 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_PSR_IMR Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_PSR_IMR register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/09e9c11ffb669dac901c2416462a8f3dabc86020.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 676a6a1c99182a193b7515faebbe3cafc653e706 Author: Jani Nikula Date: Tue Apr 30 13:09:56 2024 +0300 drm/i915: pass dev_priv explicitly to EDP_PSR_CTL Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the EDP_PSR_CTL register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/198858bc3925c02c0975670e3ebb5ce2084ac658.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit 1d231cd89841d1538d984a872041e5579b403bca Author: Jani Nikula Date: Tue Apr 30 13:09:55 2024 +0300 drm/i915: pass dev_priv explicitly to TRANS_EXITLINE Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the TRANS_EXITLINE register macro. Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/eb1e5fe155daf2d271af76e683a1f3f33e34403a.1714471597.git.jani.nikula@intel.com Signed-off-by: Jani Nikula commit e9c190b9b8e7e07bc0ef0ba9b87321fa37b456c5 Author: Rodrigo Vivi Date: Fri May 3 15:03:31 2024 -0400 drm/xe: Demote CCS_MODE info to debug only This information is printed in any gt_reset, which actually occurs in any runtime resume, what can be so verbose in production build. Let's demote it to debug only. Cc: Niranjana Vishwanathapura Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240503190331.6690-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit ca5d5ecbb90df41b125876796e1bc85db9514da4 Author: Balasubramani Vivekanandan Date: Tue Apr 30 10:28:50 2024 -0700 drm/xe/bmg: Enable the display support Enable the display support for Battlemage Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Shekhar Chauhan Signed-off-by: Radhakrishna Sripada Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-20-radhakrishna.sripada@intel.com commit 4071ada7ae313da2e6bb2c1ebc097bd12f9da761 Author: Matthew Auld Date: Tue Apr 30 10:28:49 2024 -0700 drm/i915/display: perform transient flush Perform manual transient cache flush prior to flip and at the end of frontbuffer_flush. This is needed to ensure display engine doesn't see garbage if the surface is L3:XD dirty. Testcase: igt@xe-pat@display-vs-wb-transient Signed-off-by: Matthew Auld Signed-off-by: Balasubramani Vivekanandan Acked-by: Nirmoy Das Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-19-radhakrishna.sripada@intel.com commit c01c6066e6fa6f13888f06a210f9a1d600590f42 Author: Nirmoy Das Date: Tue Apr 30 10:28:48 2024 -0700 drm/xe/device: implement transient flush Display surfaces can be tagged as transient by mapping it using one of the various L3:XD PAT index modes on Xe2. The expectation is that KMD needs to request transient data flush at the start of flip sequence to ensure all transient data in L3 cache is flushed to memory. Add a routine for this which we can then call from the display code. v2: rebase(RK) Signed-off-by: Nirmoy Das Co-developed-by: Matthew Auld Signed-off-by: Matthew Auld Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-18-radhakrishna.sripada@intel.com commit 1372708168e50c08bbbe092e00036701c7adf547 Author: Matthew Auld Date: Tue Apr 30 10:28:47 2024 -0700 drm/xe/gt_print: add xe_gt_err_once() Needed in an upcoming patch, where we want GT level print, but only which to trigger once to avoid flooding dmesg. Signed-off-by: Matthew Auld Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Nirmoy Das Signed-off-by: Radhakrishna Sripada Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-17-radhakrishna.sripada@intel.com commit 98b1c87a5e51b86d1fad390ad4756cc2bc03cd05 Author: Balasubramani Vivekanandan Date: Tue Apr 30 10:28:46 2024 -0700 drm/i915/xe2hpd: Set maximum DP rate to UHBR13.5 Max supported speed by xe2hpd is UHBR13.5. Limit the max DP source rate to it. Bspec: 67066 Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Shekhar Chauhan Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-16-radhakrishna.sripada@intel.com commit c528aaa36db031591bfa9d4cb86f23dda4f413b9 Author: Ankit Nautiyal Date: Tue Apr 30 10:28:45 2024 -0700 Revert "drm/i915/dgfx: DGFX uses direct VBT pin mapping" This reverts commit 562f33836f519a235e5c5e71bcc723ab1faccd2f. For BMG it seems that the VBT to DDI mapping does not follow DG1, and DG2, but follows ADLP mapping given in Bspec:20124. Signed-off-by: Ankit Nautiyal Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-15-radhakrishna.sripada@intel.com commit a8c026d0e67119af490b8c284a4a4b4d180fb688 Author: Matt Roper Date: Tue Apr 30 10:28:44 2024 -0700 drm/i915/bmg: BMG should re-use MTL's south display logic Battlemage's south display is the same as Meteor Lake's, including the need to invert the HPD pins, which Lunar Lake does not need. Signed-off-by: Matt Roper Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Dnyaneshwar Bhadane Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-14-radhakrishna.sripada@intel.com commit 0f6a95582de3065d27b52bb75195d666a40ab575 Author: José Roberto de Souza Date: Tue Apr 30 10:28:43 2024 -0700 drm/i915/xe2hpd: Do not program MBUS_DBOX BW credits No display IP beyond Xe_LPD+ has "BW credits" bits in MBUS_DBOX_CTL register. Restrict the programming only to Xe_LPD+. BSpec: 49213 CC: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-13-radhakrishna.sripada@intel.com commit 772933b3ab3a8157bb718154883c248c5693d81e Author: Matt Roper Date: Tue Apr 30 10:28:42 2024 -0700 drm/i915/xe2hpd: Add max memory bandwidth algorithm Unlike DG2, Xe2_HPD does support multiple GV points with different maximum memory bandwidths, but uses a much simpler algorithm than igpu platforms use. Bspec: 64631 CC: Jani Nikula Signed-off-by: Matt Roper Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Radhakrishna Sripada Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-12-radhakrishna.sripada@intel.com commit 0dffea1e2d762178b76c7840edd4edfa763048f0 Author: Anusha Srivatsa Date: Tue Apr 30 10:28:41 2024 -0700 drm/i915/xe2hpd: Configure CHICKEN_MISC_2 before enabling planes Add step 9 from initialize display sequence. v2: Commit subject improved Bpsec: 49189 Signed-off-by: Anusha Srivatsa Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-11-radhakrishna.sripada@intel.com commit 2de02cb17f90df9115ae46a5d7915d8c436c9878 Author: Lucas De Marchi Date: Tue Apr 30 10:28:40 2024 -0700 drm/i915/xe2hpd: Add display info Add initial display info for xe2hpd. It is similar to xelpdp, but with no PORT_B. v2: Inherit from XE_LPDP_FEATURES instead of XE_LPD_FEATURES Bspec: 67066 CC: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-10-radhakrishna.sripada@intel.com commit 59c27724b24aa54f0dc2600f71b50e620874a050 Author: Ravi Kumar Vodapalli Date: Tue Apr 30 10:28:39 2024 -0700 drm/i915/xe2hpd: update pll values in sync with Bspec DP/eDP and HDMI pll values are updated for Xe2_HPD platform v2: Removed the unsupported mtl_c20_dp_uhbr20 from xehpd_c20_dp_tables Bspec: 74165 Signed-off-by: Ravi Kumar Vodapalli Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-9-radhakrishna.sripada@intel.com commit 75b87e9f3dab7304982e90627c7ceec108ea83c7 Author: Balasubramani Vivekanandan Date: Tue Apr 30 10:28:38 2024 -0700 drm/i915/xe2hpd: Add support for eDP PLL configuration Tables for eDP PHY PLL configuration for different link rates added for Xe2_HPD. Previous platforms were using C10 PHY for eDP port whereas Xe2_HPD has C20 PHY. v2: Updated with a more appropriate Bspec number. Bspec: 74165 CC: Clint Taylor Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-8-radhakrishna.sripada@intel.com commit 96b0ffecc0b3cca0437166668c6ab6bee606ae82 Author: Balasubramani Vivekanandan Date: Tue Apr 30 10:28:37 2024 -0700 drm/i915/xe2hpd: Add new C20 PHY SRAM address Xe2_HPD has different offsets for C20 PHY SRAM configuration context location. Use the display version to select the right address. Note that Xe2_LPD uses the same C20 SRAM offsets used by Xe_LPDP (i.e. MTL's display). According to the BSpec, currently, only Xe2_HPD has different offsets, so make sure it is the only display using them in the driver. v2: * Redesigned how the right offsets are selected for different display IP versions. v3: Fix white space error(RK) Bspec: 67610 Cc: Clint Taylor Cc: Gustavo Sousa Cc: Jani Nikula Signed-off-by: Balasubramani Vivekanandan Signed-off-by: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-7-radhakrishna.sripada@intel.com commit 32e73fef7ea2b4728d2580d043613cfeabd90b6c Author: José Roberto de Souza Date: Tue Apr 30 10:28:36 2024 -0700 drm/i915/xe2hpd: Properly disable power in port A Xe2_HPD has a different value to power down port A. BSpec: 65450 Signed-off-by: José Roberto de Souza Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-6-radhakrishna.sripada@intel.com commit 68cd73716216f04ef12433a6486821a291736ce3 Author: Radhakrishna Sripada Date: Tue Apr 30 10:28:35 2024 -0700 drm/i915/bmg: Extend DG2 tc check to future Discrete cards use the Port numbers TC1-4 for the offsets. The regular flow for type-c subsystem port initialization can be skipped. This check is present in DG2. Extend this to future discrete products. Signed-off-by: Radhakrishna Sripada Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-5-radhakrishna.sripada@intel.com commit 080b76d8111711a726f368361e0bc9ae339fed7d Author: Clint Taylor Date: Tue Apr 30 10:28:34 2024 -0700 drm/i915/xe2hpd: Initial cdclk table Add Xe2_HPD specific CDCLK table and use MTL Funcs. Bspec: 65243 CC: Lucas De Marchi Signed-off-by: Clint Taylor Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-4-radhakrishna.sripada@intel.com commit 37153b0ad3d3c26fd4b6091b124245a4401da6fd Author: Balasubramani Vivekanandan Date: Tue Apr 30 10:28:33 2024 -0700 drm/i915/bmg: Define IS_BATTLEMAGE macro Display code uses IS_BATTLEMAGE macro but the platform support doesn't exist in i915. So fake IS_BATTLEMAGE macro defined to enable building i915 code. We should make sure the macro parameter is used in the always-false expression so that we don't run into "unused variable" warnings from i915 builds if the IS_BATTLEMAGE() check is the only place the i915 pointer gets used in a function. While we're at it, also update the IS_LUNARLAKE macro to include the parameter in the false expression for consistency. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-3-radhakrishna.sripada@intel.com commit 7f071dde0bc97d40d8e80a374e155b6c0cd72174 Author: Clint Taylor Date: Tue Apr 30 10:28:32 2024 -0700 drm/i915/bmg: Lane reversal requires writes to both context lanes Write both CX0 Lanes for Context Toggle for all except TC pin assignment D. v2: Update title(RK) Bspec: 64539 CC: Jani Nikula Signed-off-by: Clint Taylor Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20240430172850.1881525-2-radhakrishna.sripada@intel.com commit aa66c93d5f69d48809468c4e2124e408e31fa931 Merge: 4b31961a1c638 f03eee5fc9221 Author: Rodrigo Vivi Date: Fri May 3 13:16:07 2024 -0400 Merge drm/drm-next into drm-intel-next A backmerge to sync xe and i915 and allow us to merge "Enable display support for Battlemage" series through drm-intel Link: https://patchwork.freedesktop.org/series/132429/ Signed-off-by: Rodrigo Vivi commit 50971dc6694c0845fcddfe337ea39c5b723d5a92 Author: Karthikeyan Kathirvel Date: Fri May 3 13:34:39 2024 +0300 wifi: ath12k: drop failed transmitted frames from metric calculation. In mesh node traffic, internal firmware-transmitted failures are reported as transmitted failures in mesh metric calculation, leading to the breakage of the mesh link. Fix the issue by dropping the internal firmware-transmitted failures before updating the TX completion status to mac80211, in order to prevent false failure averaging in mesh metric calculation. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Karthikeyan Kathirvel Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430074313.885807-3-quic_kathirve@quicinc.com commit 5453bbd6fef4ca2fea3b4b338fc715d7135afc6f Author: Sven Eckelmann Date: Fri May 3 13:34:39 2024 +0300 wifi: ath12k: Don't drop tx_status in failure case When a station idles for a long time, hostapd will try to send a QoS Null frame to the station as "poll". NL80211_CMD_PROBE_CLIENT is used for this purpose. And the skb will be added to ack_status_frame - waiting for a completion via ieee80211_report_ack_skb(). But when the peer was already removed before the tx_complete arrives, the peer will be missing. And when using dev_kfree_skb_any (instead of going through mac80211), the entry will stay inside ack_status_frames thus not clean up related information in its internal data structures. This IDR will therefore run full after 8K request were generated for such clients. At this point, the access point will then just stall and not allow any new clients because idr_alloc() for ack_status_frame will fail. ieee80211_free_txskb() on the other hand will (when required) call ieee80211_report_ack_skb() and make sure that (when required) remove the entry from the ack_status_frame and clean up related information in its internal data structures. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Sven Eckelmann Signed-off-by: Sarika Sharma Signed-off-by: Karthikeyan Kathirvel Link: https://lore.kernel.org/r/20230802-ath11k-ack_status_leak-v2-1-c0af729d6229@narfation.org Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430074313.885807-2-quic_kathirve@quicinc.com commit 53bf4a14f8c55e84d200f8328fde39ab6bdf1bf5 Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:39 2024 +0300 wifi: ath12k: add multi device support for WBM idle ring buffer setup Currently, inter device MLO is not supported. Therefore, the WBM idle ring buffers choose the implicit return buffer manager (DEV0_IDLE_DESC_LIST). However, this implicit return buffer manager design is not meeting the requirements to support inter device MLO. In inter device MLO, multiple devices participate. The device specific WBM idle ring buffers transmit to multiple device REO rings. To distinguish between device specific WBM idle buffers, the setup configuration need to choose a different return buffer manager based on the unique identifier (device index). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430165811.1377182-5-quic_periyasa@quicinc.com commit b2d54ca73a5a177490f3f1ee2d23ff6ab6045b25 Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:38 2024 +0300 wifi: ath12k: Introduce device index Introduce a device index parameter in the ath12k_base structure. This value is used as unique identifier for devices involved in Inter-device MLO. It is also used to configure the MLO parameter within the QMI host capability send request. While currently set to zero, future logic will be added for inter device support to populate this parameter with non-zero values. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430165811.1377182-4-quic_periyasa@quicinc.com commit acc6afb31c3f999076d998f2d1678c0899f0bfb1 Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:38 2024 +0300 wifi: ath12k: Refactor idle ring descriptor setup Currently, the WBM idle ring descriptor setup uses implicit value HAL_RX_BUF_RBM_WBM_DEV0_IDLE_DESC_LIST for the return buffer manager parameter. To support inter-device MLO (Multi-link operation), this parameter needs to be configure dynamically based on the device identifier within the MLO group. Therefore, introduce a new argument to the helper function ath12k_hal_set_link_desc_addr(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430165811.1377182-3-quic_periyasa@quicinc.com commit 5f6c3a418b401187c36536dae235beaf322dc7fc Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:38 2024 +0300 wifi: ath12k: Replace "chip" with "device" in hal Rx return buffer manager Prefer the term "device" over "chip". Therefore, modify the relevant terms in hal Rx return buffer manager to use "device" instead. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430165811.1377182-2-quic_periyasa@quicinc.com commit c57d00a4d3d80a6af376bf37527c93654afadc02 Author: Jeff Johnson Date: Fri May 3 13:34:38 2024 +0300 wifi: ath11k: unmap the CE in ath11k_ahb_probe() error path Currently, in ath11k_ahb_probe(), if a failure occurs after ath11k_ahb_ce_remap() is called, and if hw_params->ce_remap is enabled, the CE register memory is not unmapped. So add a call to ath11k_ahb_ce_unmap() in the error path. This issue was identified by smatch/smatch_scripts/kchecker: drivers/net/wireless/ath/ath11k/ahb.c:1218 ath11k_ahb_probe() warn: 'ab->mem_ce' from ioremap() not released on lines: 1218. Since this is a rare error path with no simple way to test, and since the change is trivial to review, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430-ce-unmap-v1-2-e468328f95d9@quicinc.com commit 8b9ea752a9d67b0b668b38e7efa34fffba8b5331 Author: Jeff Johnson Date: Fri May 3 13:34:37 2024 +0300 wifi: ath11k: refactor CE remap & unmap Currently the logic that handles hw_params->ce_remap is inline code, both for doing the remap and the unmap. An upcoming change needs to do the unmap in a second place, so refactor the unmap logic into a separate function. And although it is only called from one place, refactor the remap logic as well to have functional symmetry. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240430-ce-unmap-v1-1-e468328f95d9@quicinc.com commit acaa84009fade2ae80922861aa9464e89c9d3ef0 Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:37 2024 +0300 wifi: ath12k: Add lock to protect the hardware state Currently, hardware state is not protected across the reconfigure operations. However, in single wiphy models, multiple radio/links is exposed as a MAC hardware (ieee80211_hw) through the driver hardware abstraction (ath12k_hw) layer. In such scenario, we need to protect hardware state across the multiple radio/link at the driver hardware abstraction (ath12k_hw) layer. Therefore, introduce a new mutex in the ath12k_hw layer. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240425090307.3233434-4-quic_periyasa@quicinc.com commit 9b4e5caaf5905edb7c184e8d14a9fab09f2f865b Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:37 2024 +0300 wifi: ath12k: Refactor the hardware state Currently, in multi wiphy models, the mac80211 hardware state is maintained within the radio/link structure. However, in single wiphy models, the mac80211 hardware state is needed at the hardware abstraction layer (ath12k_hw). Therefore, move the hardware state from the radio/link structure to the hardware abstraction layer (ath12k_hw). Additionally, update the naming convention of the state enums to enhance clarity and consistency. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240425090307.3233434-3-quic_periyasa@quicinc.com commit ecd509b6f263e4f0d86876320c36260dc28bb53b Author: Karthikeyan Periyasamy Date: Fri May 3 13:34:36 2024 +0300 wifi: ath12k: Refactor the hardware recovery procedure Currently, in multi-wiphy models, the recovery handler access mac80211 HW from the radio/link structure. This will be incorrect for single wiphy model, as they will hold multiple link/radio structures. To fix this, access mac80211 HW based on the number of hardware in the SoC/chip. This approach makes the recovery handler compatible with both multi wiphy and single wiphy models. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240425090307.3233434-2-quic_periyasa@quicinc.com commit b0923d5d80facb205cc2b7f82994ab5c3eef3181 Author: Sunil Khatri Date: Thu May 2 14:18:08 2024 +0530 drm/amdgpu: remove ip dump reg_count variable reg_count is not used and the register count is directly derived from the array size and hence removed. Signed-off-by: Sunil Khatri Acked-by: Christian König Signed-off-by: Alex Deucher commit 9243e0e206bbf8799add08cc66f807cbe085c9d2 Author: Alex Hung Date: Thu Apr 25 14:39:11 2024 -0600 drm/amd/display: Fix uninitialized variables in dcn401 and dml21 This fixes 12 UNINIT issues reported by Coverity. Reviewed-by: Hersen Wu Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit b3f4ee8e4a168b78a3ca8341e18a50c620ed7344 Author: Alex Hung Date: Thu May 2 10:30:12 2024 -0600 drm/amd/display: Assign disp_cfg_index_max when dml21 [WHY & HOW] The assignment of disp_cfg_index_max is missed and should be assigned to __DML2_WRAPPER_MAX_STREAMS_PLANES__. Fixes: 55ec7679e6a5 ("drm/amd/display: Limit array index according to architecture") Reviewed-by: Hersen Wu Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit f41c7cab8727d99a2376450d233f128f23060b98 Author: Kalle Valo Date: Fri May 3 13:34:36 2024 +0300 wifi: ath11k: ath11k_mac_op_ipv6_changed(): use list_for_each_entry() Simplify the loop by using list_for_each_entry(). No functional changes. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Signed-off-by: Kalle Valo Acked-by: Jeff Johnson Link: https://msgid.link/20240411165516.4070649-3-kvalo@kernel.org commit 786754124189e3f67fc52e8fe08703e3f50b1894 Author: Francois Dugast Date: Fri May 3 10:24:50 2024 +0200 drm/xe/debugfs: Get a runtime_pm reference when setting wedged mode This function is another entry point where it must be ensured that the device resumes before operating on the GuC, so grab a runtime_pm reference. This fixes inner xe_pm_runtime_get_noresume calls which were previously failing. Cc: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240503082450.268335-1-francois.dugast@intel.com Signed-off-by: Rodrigo Vivi commit 4b31961a1c6388ec67c05ce4033088d9bdf00f95 Author: Mika Kahola Date: Thu May 2 16:17:16 2024 +0300 drm/i915/display: Calculate crtc clock rate based on PLL parameters With HDMI monitors we bumped up a case where the crtc clock rate caused a mismatch on state verification. This was due to assumption that the SW clock rate from PLL structure would match the calculated counterpart from HW. This is not necessarily always the case and therefore we would actually need to recalculate the clock rate from SW PLL parameters. Then these SW and HW crtc clock rates can be compared with each other. The patch recalculates the crtc clock rate for SW state based on SW PLL parameters and compares the crtc clock rate calculated from the parameters found from the HW. Signed-off-by: Mika Kahola Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240502131716.504616-1-mika.kahola@intel.com commit 2081c6aec0a4f34e1414a6172b88ef3aaebb6120 Author: Ville Syrjälä Date: Tue Apr 30 12:56:39 2024 +0300 drm/i915: s/need_async_flip_disable_wa/need_async_flip_toggle_wa/ Rename need_async_flip_disable_wa to need_async_flip_toggle_wa to better reflect the fact that we need to deal with the bad PLANE_CTL_ASYNC_FLIP double buffering behaviour going both ways. Reviewed-by: Arun R Murthy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240430095639.26390-6-ville.syrjala@linux.intel.com commit b24d361420c46c3b1a0594f63f88b52e1afc6792 Author: Ville Syrjälä Date: Tue Apr 30 12:56:38 2024 +0300 drm/i915: Eliminate extra frame from skl-glk sync->async flip change On bdw-glk the sync->async flip change takes an extra frame due to the double buffering behaviour of the async flip plane control bit. Since on skl+ we are now explicitly converting the first async flip to a sync flip (in order to allow changing the modifier and/or ddb/watermarks) we are now taking two extra frames until async flips are actually active. We can drop that back down to one frame by setting the async flip bit already during the sync flip. Note that on bdw we don't currently do the extra sync flip (see intel_plane_do_async_flip()) so technically we wouldn't have to deal with this in i9xx_plane_update_arm(). But I added the relevant snippet of code there as well, just in case we ever decide to go for the extra sync flip on pre-skl platforms as well (we might, for example, want to change the fb stride). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240430095639.26390-5-ville.syrjala@linux.intel.com Reviewed-by: Arun R Murthy commit 7c800d957173298a5c80576db7384ebfe6efc10c Author: Ville Syrjälä Date: Tue Apr 30 12:56:37 2024 +0300 drm/i915: Allow the initial async flip to change modifier With Xorg+modesetting on skl+ we see the following behaviour: 1. root pixmap is X-tiled 2. client submitted buffers can be Y-tiled (w/ 'Option "dmabuf_capable"') 3. we try to switch from the X-tiled buffer to the Y-tiled buffer using an async flip (when vsync is disabled). 4. the async flip will be rejected by i915 due to the modifier change Relax the rules a bit by turning the first async flip into a sync flip so that we can change the modifier if necessary. Note that we already convert the first async flip into a sync flip on adl+ in order to reprogram the watermarks. Reviewed-by: Vandita Kulkarni Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240430095639.26390-4-ville.syrjala@linux.intel.com commit 4df0f2ed25735e7da5a9015befda5199fe6fec73 Author: Ville Syrjälä Date: Tue Apr 30 12:56:36 2024 +0300 drm/i915: Reject async flips if we need to change DDB/watermarks DDB/watermarks are always double buffered on the vblank, so we can't safely change them during async flips. Currently this never happens, but we'll be making changing between sync and async flips a bit more flexible, in which case we can actually end up here. Reviewed-by: Vandita Kulkarni Reviewed-by: Arun R Murthy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240430095639.26390-3-ville.syrjala@linux.intel.com commit c8bafa0d9898f37cb3618f5883656cc382831533 Author: Ville Syrjälä Date: Tue Apr 30 12:56:35 2024 +0300 drm/i915: Align PLANE_SURF to 16k on ADL for async flips On ADL async flips apparently generate DMAR and GGTT faults (with accompanying visual glitches) unless PLANE_SURF is aligned to at least 16k. Bump up the alignment to 16k. TODO: analyze things better to figure out what is really going on here Reviewed-by: Arun R Murthy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240430095639.26390-2-ville.syrjala@linux.intel.com commit 233e8d1de827b58ec92c60b86a3b0f5bdf7c3892 Author: Michal Wajdeczko Date: Fri May 3 00:33:13 2024 +0200 drm/xe/rtp: Prefer helper macros from xe_args.h Some custom implementation can be replaced with generic macros from the linux/args.h or xe_args.h. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240502223313.2527-4-michal.wajdeczko@intel.com commit 9f79e24485494f35740fd85ffb2c67fefb8c67b2 Author: Michal Wajdeczko Date: Fri May 3 00:33:12 2024 +0200 drm/xe/kunit: Add simple tests for new xe_args macros We want to make sure that helper macros are working as expected. Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240502223313.2527-3-michal.wajdeczko@intel.com commit 87ea92a19216a454a6eb5710501a470dcdb8577d Author: Michal Wajdeczko Date: Fri May 3 00:33:11 2024 +0200 drm/xe: Add helpers for manipulating macro arguments Define generic helpers that will replace private definitions used by the RTP code and will allow reuse by the new code. Put them in new xe_args.h file (instead of infamous xe_macros.h) as once we find more potential users outside of the Xe driver we may want to move all of these macros as-is to linux/args.h. Signed-off-by: Michal Wajdeczko Cc: Andy Shevchenko Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240502223313.2527-2-michal.wajdeczko@intel.com commit 75521e8b56e8f9dc673b782df7bc3660f51f329a Author: Thomas Hellström Date: Thu May 2 20:32:51 2024 +0200 drm/xe: Perform dma_map when moving system buffer objects to TT Currently we dma_map on ttm_tt population and dma_unmap when the pages are released in ttm_tt unpopulate. Strictly, the dma_map is not needed until the bo is moved to the XE_PL_TT placement, so perform the dma_mapping on such moves instead, and remove the dma_mappig when moving to XE_PL_SYSTEM. This is desired for the upcoming shrinker series where shrinking of a ttm_tt might fail. That would lead to an odd construct where we first dma_unmap, then shrink and if shrinking fails dma_map again. If dma_mapping instead is performed on move like this, shrinking does not need to care at all about dma mapping. Finally, where a ttm_tt is destroyed while bound to a different memory type than XE_PL_SYSTEM, we keep the dma_unmap in unpopulate(). v2: - Don't accidently unmap the dma-buf's sgtable. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240502183251.10170-1-thomas.hellstrom@linux.intel.com commit 0fe113ad47589b2c6ea59e8c5ff346e57432b28f Author: Colin Ian King Date: Thu Mar 14 16:35:11 2024 +0000 drm/gma500: Fix spelling mistake "patter" -> "pattern" There is a spelling mistake in a DRM_DEBUG_KMS message. Fix it. Reviewed-by: Sui Jingfeng Signed-off-by: Colin Ian King Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20240314163511.2372458-1-colin.i.king@gmail.com commit 6cd2b872643bb29bba01a8ac739138db7bd79007 Author: Asad Kamal Date: Fri Apr 26 02:26:55 2024 +0800 drm/amd/amdgpu: Check tbo resource pointer Validate tbo resource pointer, skip if NULL Signed-off-by: Asad Kamal Reviewed-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 188fd1616ec43033cedbe343b6579e9921e2d898 Author: Hersen Wu Date: Thu Apr 25 09:24:44 2024 -0400 drm/amd/display: Fix index may exceed array range within fpu_update_bw_bounding_box [Why] Coverity reports OVERRUN warning. soc.num_states could be 40. But array range of bw_params->clk_table.entries is 8. [How] Assert if soc.num_states greater than 8. Reviewed-by: Alex Hung Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 922c2877827dcc474f3079e464773ab31ac13b79 Author: Hersen Wu Date: Tue Apr 30 14:24:17 2024 -0400 drm/amd/display: Fix writeback job lock evasion within dm_crtc_high_irq [Why] Coverity report LOCK_EVASION warning. Access acrtc->wb_pending without lock wb_conn->job_lock. [How] Lock wb_conn->job_lock before accessing acrtc->wb_pending. Reviewed-by: Alex Hung Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a54f7e866cc73a4cb71b8b24bb568ba35c8969df Author: Hersen Wu Date: Fri Apr 26 16:39:37 2024 -0400 drm/amd/display: Skip inactive planes within ModeSupportAndSystemConfiguration [Why] Coverity reports Memory - illegal accesses. [How] Skip inactive planes. Reviewed-by: Alex Hung Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8e2734bf444767fed787305ccdcb36a2be5301a2 Author: Alex Hung Date: Wed Apr 24 17:08:04 2024 -0600 drm/amd/display: Ensure index calculation will not overflow [WHY & HOW] Make sure vmid0p72_idx, vnom0p8_idx and vmax0p9_idx calculation will never overflow and exceess array size. This fixes 3 OVERRUN and 1 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ecda00059b14b95a5b84f3efc1c1f341e1fd7dbc Author: Alex Hung Date: Fri Apr 26 10:02:55 2024 -0600 drm/amd/display: Skip plane when not found by stream id [Why & How] dml_stream_idx will be -1 when it is not found. Check and skip in such a case as -1 is not a valid array index. This fixes a NEGATIVE_RETURNS issue reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9d25ac51f5bc952a4454bad9c0d0ca09c3827003 Author: Alex Hung Date: Thu Apr 25 17:45:37 2024 -0600 drm/amd/display: Avoid overflow dc_clk_table->entries by limit to MAX_NUM_DPM_LVL [Why] dc_clk_table->entries has size of MAX_NUM_DPM_LVL(=8), but the loop counter i can go up to DML_MAX_CLK_TABLE_SIZE(=20) - 1. [How] The loop should be min(DML_MAX_CLK_TABLE_SIZE, MAX_NUM_DPM_LVL) - 1 instead. This fixes 21 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 83c0c8361347cf43937348e8ca0a487679c003ae Author: Hersen Wu Date: Fri Apr 26 12:13:59 2024 -0400 drm/amd/display: Fix Coverity INTEGER_OVERFLOW within decide_fallback_link_setting_max_bw_policy [Why] For addtion (uint8_t) variable + constant 1, coverity generates message below: Truncation due to cast operation on "cur_idx + 1" from 32 to 8 bits. Then Coverity assume result is 32 bits value be saved into 8 bits variable. When result is used as index to access array, Coverity suspects index invalid. [How] Change varaible type to uint32_t. Reviewed-by: Alex Hung Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 55ec7679e6a5f67d2831b87a24fe2d5066311fdd Author: Alex Hung Date: Thu Apr 25 18:37:58 2024 -0600 drm/amd/display: Limit array index according to architecture [WHY & HOW] ctx->architecture determine array sizes of ODMMode and DPPPerSurface arrays to __DML2_WRAPPER_MAX_STREAMS_PLANES__ or __DML_NUM_PLANES__, and these array index should be checked before used This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ae13c8a5cff92015b9a3eb7cee65ebc75859487f Author: Alex Hung Date: Fri Apr 26 10:33:47 2024 -0600 drm/amd/display: Spinlock before reading event [WHY & HOW] A read of acrtc_attach->base.state->event was not locked so moving it inside the spinlock. This fixes a LOCK_EVASION issue reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1cbb91cb29a71f0a22f6909bf9c0ad43bd315bae Author: Alex Hung Date: Fri Apr 26 11:25:50 2024 -0600 drm/amd/display: Limit clock assignments by size of clk tables [WHAT & HOW] Check clk table's array size to avoid out-of-bound memory accesses. This fixes two OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 674704a5dabe4a434645fdd11e35437f4e06dfc4 Author: Hersen Wu Date: Wed Apr 24 20:18:30 2024 -0400 drm/amd/display: Release clck_src memory if clk_src_construct fails [Why] Coverity reports RESOURCE_LEAK for some implemenations of clock_source_create. Do not release memory of clk_src if contructor fails. [How] Free clk_src if contructor fails. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ca46da75cab99381b8c9f181de50a8022c2862c8 Author: Hersen Wu Date: Fri Apr 26 19:44:44 2024 -0400 drm/amd/display: Fix wrong array size dummy_boolean of dml2_core_calcs_mode_support_locals [Why] Coverity reports OVERRUN warning for CalculateSwathAndDETConfiguration_params->hw_debug5 = &s->dummy_boolean[2]. bool dummy_boolean[2] is defined within struct dml2_core_calcs_mode_support_locals. [How] Change array size from 2 to 3. Reviewed-by: Aurabindo Pillai Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3d49b60030bf888a6244aaf3e98965cf8e78a965 Author: Hersen Wu Date: Mon Apr 29 14:12:21 2024 -0600 drm/amd/display: Add NULL pointer check for kzalloc [Why & How] Check return pointer of kzalloc before using it. Reviewed-by: Alex Hung Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c6077aa66fa230d12f37fef01161ef080d13b726 Author: Hersen Wu Date: Fri Apr 26 11:58:11 2024 -0400 drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create [Why] For subtraction, coverity reports integer overflow warning message when variable type is uint32_t. [How] Change variable type to int32_t. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 176abbcc71952e23009a6ed194fd203b99646884 Author: Hersen Wu Date: Fri Apr 26 10:46:41 2024 -0400 drm/amd/display: Fix Coverity INTERGER_OVERFLOW within construct_integrated_info [Why] For substrcation, coverity reports integer overflow warning message when variable type is uint32_t. [How] Change varaible type to int32_t. Reviewed-by: Alex Hung Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 871cd9d881fa791d3f82885000713de07041c0ae Author: Hersen Wu Date: Fri Apr 26 11:13:47 2024 -0400 drm/amd/display: Add otg_master NULL check within resource_log_pipe_topology_update [Why] Coverity reports NULL_RETURN warning. [How] Add otg_master NULL check. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8aa2864044b9d13e95fe224f32e808afbf79ecdf Author: Alex Hung Date: Tue Apr 16 16:30:17 2024 -0600 drm/amd/display: Check link_index before accessing dc->links[] [WHY & HOW] dc->links[] has max size of MAX_LINKS and NULL is return when trying to access with out-of-bound index. This fixes 3 OVERRUN and 1 RESOURCE_LEAK issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 52cbcf980509e6190740dd1e2a1a437e8fb8101b Author: Hersen Wu Date: Wed Apr 24 20:32:53 2024 -0400 drm/amd/display: Release state memory if amdgpu_dm_create_color_properties fail [Why] Coverity reports RESOURCE_LEAK warning. State memory is not released if dm_create_color_properties fail. [How] Call kfree(state) before return. Reviewed-by: Alex Hung Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fa71face755e27dc44bc296416ebdf2c67163316 Author: Alex Hung Date: Tue Apr 16 16:47:42 2024 -0600 drm/amd/display: Check msg_id before processing transcation [WHY & HOW] HDCP_MESSAGE_ID_INVALID (-1) is not a valid msg_id nor is it a valid array index, and it needs checking before used. This fixes 4 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit efabdce3db9f3d306084c8946983f3d895810a6b Author: Alex Hung Date: Mon Apr 22 10:34:17 2024 -0600 drm/amd/display: Skip updating link encoder for unknown eng_id This prevents accessing to negative index of link_encoders array. This fixes an OVERRUN issue reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b38a4815f79b87efb196cd5121579fc51e29a7fb Author: Alex Hung Date: Tue Apr 16 16:22:35 2024 -0600 drm/amd/display: Check num_valid_sets before accessing reader_wm_sets[] [WHY & HOW] num_valid_sets needs to be checked to avoid a negative index when accessing reader_wm_sets[num_valid_sets - 1]. This fixes an OVERRUN issue reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4e70c0f5251c25885c31ee84a31f99a01f7cf50e Author: Hersen Wu Date: Wed Apr 24 10:09:31 2024 -0400 drm/amd/display: Add array index check for hdcp ddc access [Why] Coverity reports OVERRUN warning. Do not check if array index valid. [How] Check msg_id valid and valid array index. Reviewed-by: Alex Hung Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5524fa301ba649f8cf00848f91468e0ba7e4f24c Author: Hersen Wu Date: Mon Apr 22 16:22:44 2024 -0400 drm/amd/display: Add missing NULL pointer check within dpcd_extend_address_range [Why & How] ASSERT if return NULL from kcalloc. Reviewed-by: Alex Hung Reviewed-by: Rodrigo Siqueira Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ba2ea6337b4f159aecb177555a6a81da92d302e Author: Alex Hung Date: Thu Apr 18 18:22:43 2024 -0600 drm/amd/display: Check index for aux_rd_interval before using aux_rd_interval has size of 7 and should be checked. This fixes 3 OVERRUN and 1 INTEGER_OVERFLOW issues reported by Coverity. Reviewed-by: Rodrigo Siqueira Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3941a3aa4b653b69876d894d08f3fff1cc965267 Author: Alex Hung Date: Fri Apr 19 20:23:36 2024 -0600 drm/amd/display: Fix incorrect size calculation for loop [WHY] fe_clk_en has size of 5 but sizeof(fe_clk_en) has byte size 20 which is lager than the array size. [HOW] Divide byte size 20 by its element size. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cf8b16857db702ceb8d52f9219a4613363e2b1cf Author: Hersen Wu Date: Wed Apr 24 16:15:15 2024 -0400 drm/amd/display: Stop amdgpu_dm initialize when link nums greater than max_links [Why] Coverity report OVERRUN warning. There are only max_links elements within dc->links. link count could up to AMDGPU_DM_MAX_DISPLAY_INDEX 31. [How] Make sure link count less than max_links. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 84723eb6068c50610c5c0893980d230d7afa2105 Author: Hersen Wu Date: Wed Apr 24 16:00:19 2024 -0400 drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6 [Why] Coverity reports OVERRUN warning. Should abort amdgpu_dm initialize. [How] Return failure to amdgpu_dm_init. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6e41709eb1d9207d88e46026baf9cc850206b374 Author: Hersen Wu Date: Tue Apr 23 19:14:16 2024 -0400 drm/amd/display: Add NULL pointer and OVERRUN check within amdgpu_dm irq register [WHY] Coverity reports OVERRUN issues within amdgpu_dm interrupt registers. Do not check index value before access array. Do not check NULL pointer. [HOW] Add index value check for array. Add check for pointer from amdgpu_dm_irq_register_interrupt. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2a5626eeb3b5eec7a36886f9556113dd93ec8ed6 Author: Alex Hung Date: Tue Apr 16 16:40:00 2024 -0600 drm/amd/display: Check gpio_id before used as array index [WHY & HOW] GPIO_ID_UNKNOWN (-1) is not a valid value for array index and therefore should be checked in advance. This fixes 5 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 687fe329f18ab0ab0496b20ed2cb003d4879d931 Author: Alex Hung Date: Tue Apr 16 16:44:17 2024 -0600 drm/amd/display: Ensure array index tg_inst won't be -1 [WHY & HOW] tg_inst will be a negative if timing_generator_count equals 0, which should be checked before used. This fixes 2 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9419da172221eb1dd672bcbaa2e27bb5f8ca807a Author: Alex Hung Date: Tue Apr 23 15:37:03 2024 -0600 drm/amd/display: Skip accessing array for unknown eng_id [WHY] ENGINE_ID_UNKNOWN (-1) is not a valid eng_id and not a valid array index. [HOW] Check whether eng_id is unknown to avoid access array with negative array index. This fixes 4 OVERRUN issues reported by Coverity. Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0a8d25285feb68608acdf778983ee5f4d72707e8 Author: Revalla Hari Krishna Date: Mon Apr 22 15:34:02 2024 +0530 drm/amd/display: Refactor DCCG into component folder [why] cleaning up the code refactor requires dccg to be in its own component. [how] move all files under newly created dccg folder and fixing the makefiles. Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Revalla Hari Krishna Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f5d75327d30af49acf2e4b55f35ce2e6c45d1287 Author: Leo Ma Date: Mon Apr 22 10:17:17 2024 -0400 drm/amd/display: Fix invalid Copyright notice [Why && How] Copyright notice failed in the Palamida scan and make changes to align with our guidelines. Acked-by: Tom Chung Signed-off-by: Leo Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8172fa66332c442c381d642cb543da4915fbd629 Author: Gui Chengming Date: Mon Apr 29 09:53:00 2024 +0800 drm/amd/pm: add pstate support for SMU_14_0_2 Populate pstate clock. Signed-off-by: Gui Chengming Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ee7c6979f17e79ec675398b9d465810ab94c899a Author: Kenneth Feng Date: Fri Apr 26 16:02:16 2024 +0800 drm/amd/pm: add tool log support on smu v14.0.2/3 add tool log support on smu v14.0.2/3 Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 01a0bae9fbdcf1489b1a2df3f085008b8e6c8483 Author: Kenneth Feng Date: Mon Feb 5 16:49:29 2024 +0800 drm/amd/pm: enable mode1 reset on smu v14.0.2/v14.0.3 enable mode1 reset on smu v14.0.2/v14.0.3 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 3474e02ed5b30c625c1739f10375ef940bb23382 Author: Kenneth Feng Date: Wed Jan 31 15:36:12 2024 +0800 drm/amd/pm: support mode1 reset on smu_v14_0_3 support mode1 reset on smu_v14_0_3 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit ade887c63394f81de7f363c1fe72fc7e631f1afa Author: Alex Deucher Date: Mon Apr 29 11:53:02 2024 -0400 drm/amdgpu/mes12: Use a separate fence per transaction We can't use a shared fence location because each transaction should be considered independently. Signed-off-by: Alex Deucher commit 94b51a3d01ed498c753fe474157ca62f0b8a4bc2 Author: Alex Deucher Date: Mon Apr 29 11:40:26 2024 -0400 drm/amdgpu/mes12: increase mes submission timeout MES internally has a timeout allowance of 2 seconds. Increase driver timeout to 3 seconds to be safe. Signed-off-by: Alex Deucher commit b1d852920b316181cc3e622a0fe0483d2db6a5d1 Author: Alex Deucher Date: Mon Apr 29 11:38:47 2024 -0400 drm/amdgpu/mes12: print MES opcodes rather than numbers Makes it easier to review the logs when there are MES errors. Signed-off-by: Alex Deucher commit 174fdc07c05e33353040b5a5d05f219ecd4550b5 Author: Kenneth Feng Date: Wed Apr 3 13:29:31 2024 +0800 drm/amd/amdgpu: enable mmhub and athub cg on gc 12.0.1 enable mmhub and athub cg on gc 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit dd8707295d55bfe044b5c145f7060cc1a91b7157 Author: Kenneth Feng Date: Mon Mar 11 14:11:39 2024 +0800 drm/amd/amdgpu: enable gfxoff on gc 12.0.1 Enable gfxoff on gc 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit b9f5d0f9788968739fad3404dc0dad45716d67f7 Author: Likun Gao Date: Sun Apr 7 05:44:54 2024 +0800 drm/amdgpu: support cg state get for gfx v12 Support to get clockgating state for gfx v12. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 598a3b753af1947adbc542d1ebcc1863877589b0 Author: Kenneth Feng Date: Fri Mar 1 17:36:42 2024 +0800 drm/amd/amdgpu: enable sram fgcg on gc 12.0.1 enable sram fgcg on gc 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 6f6bb3909cf7c45a7d36963368d718d1d2f31a97 Author: Kenneth Feng Date: Fri Mar 1 16:21:08 2024 +0800 drm/amd/amdgpu: enable perfcounter mgcg and repeater fgcg enable perfcounter mgcg and repeater fgcg on gc 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 0b6662eb2a039b76777850bf718b6c5944b50e17 Author: Kenneth Feng Date: Fri Mar 1 14:48:51 2024 +0800 drm/amd/amdgpu: enable 3D cgcg and 3D cgls enable 3D cgcg and 3D cgls on gc 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit af472f68c731baffd12f5a44bc1afcd7332b444e Author: Kenneth Feng Date: Fri Mar 1 14:14:43 2024 +0800 drm/amd/amdgpu: enable mgcg on gfx 12.0.1 enable mgcg on gfx 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 81b09cedb37bc7aa80712361a60f1396c8c3d0a0 Author: Kenneth Feng Date: Fri Mar 1 11:09:22 2024 +0800 drm/amd/amdgpu: enable cgcg and cgls enable cgcg and cgls on gc 12.0.1 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 856d1ed4b2c3583afe5daebc5bf4b3c94ca26e8d Author: David (Ming Qiang) Wu Date: Mon Jan 8 11:37:08 2024 -0500 drm/amdgpu/vcn5: Add VCN5 capabilities Add VCN5 encode and decode capabilities support Signed-off-by: David (Ming Qiang) Wu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 117f85139382c5a9699eae96edc781c9d9c6e86f Author: Sonny Jiang Date: Tue Oct 31 11:21:24 2023 -0400 drm/amdgpu/vcn5: enable DPG mode support Enable DPG mode Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit f19cfce87d9416d050399ae56a00f2060eab85f4 Author: Sonny Jiang Date: Mon Oct 16 16:49:53 2023 -0400 drm/amdgpu/jpeg5: enable power gating Enable PG on JPEG5 Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit f8f8e95c5f1b115f117977ff837c1440407cf7b5 Author: David (Ming Qiang) Wu Date: Wed Oct 11 17:03:03 2023 -0400 amdgpu/vcn: enable AMD_PG_SUPPORT_VCN turn on AMD_PG_SUPPORT_VCN flag for power saving Signed-off-by: David (Ming Qiang) Wu Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit da43e93d1becce2d757ae217baa09a9b9bae3171 Author: David Belanger Date: Fri Apr 19 10:28:02 2024 -0400 drm/amdgpu: Fix physical address mask Mask should be 44-bit. Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0a75dc9831af72f1b85f80f0b8e8a711e5ebfe75 Author: Likun Gao Date: Thu Mar 9 15:18:51 2023 +0800 drm/amdgpu/discovery: add mes v12_0 ip block Add mes v12_0 ip block. v2: squash in update (Alex) v3: rebase on unified mes changes (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5e676d7180c0cc01184d9860fd9004092c0a7efc Author: Likun Gao Date: Thu Mar 9 14:57:18 2023 +0800 drm/amdgpu/discovery: add gfx v12_0 ip block Add gfx v12_0 ip block. v2: Squash in update (Alex) v3: add exp flag (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 03f4b8c3ca7ad34d812d5760f0712e5c126c64c6 Author: Jack Xiao Date: Fri Apr 12 14:26:18 2024 +0800 drm/amdgpu/mes12: disable logging output Random page fault was oberserved, temporarily disable mes log buffer output. Signed-off-by: Jack Xiao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 3dc434ad2635f067b67f2d167f78a31e6124fe2e Author: Jack Xiao Date: Fri Mar 1 18:01:39 2024 +0800 drm/amdgpu: add module parameter 'amdgpu_uni_mes' Add module parameter 'amdgpu_uni_mes' to enable/disable unified mes fw support. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ad5c0a79dfca06ee7f1d5a9cf4f6b4a2113f5d04 Author: Jack Xiao Date: Wed Apr 10 14:00:41 2024 +0800 drm/amdgpu/mes12: add legacy setting hw resource interface For unified mes fw, add the legacy interface to set hardware resources. v2: remove warning (Alex) Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fcc5df722dbc47c3a84386a1c70647cfe153e65d Author: shaoyunl Date: Mon Mar 25 12:02:58 2024 -0400 drm/amdgpu: Disable unmapped doorbell handling basic mode on mes 12 The new mechanism for unmapped doorbell handling requires both driver side and MES fw side change. The FW side changes are still not released. Signed-off-by: shaoyunl Reviewed-by: Harish Kasiviswanthan Signed-off-by: Alex Deucher commit 663bbfaf68971fa09d69a6ef8a6c4ef8bff9274d Author: Jack Xiao Date: Fri Mar 1 17:40:30 2024 +0800 drm/amdgpu/gfx: enable mes to map legacy queue support Enable mes to map legacy queue support. v2: drop unused gfx_v12_0_kiq_enable_kgq() (Alex) Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4c2439f908e70efe4ec9f4ba4c5780c97bd0996e Author: Jack Xiao Date: Fri Mar 1 17:33:30 2024 +0800 drm/amdgpu/mes12: add mes mapping legacy queue support Add mes12 map legacy queue packet submission. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6ce03bd3a4a80268a6c5eecea4498d0db0a09b86 Author: Jack Xiao Date: Fri Mar 1 17:04:47 2024 +0800 drm/amdgpu/mes12: enable uni_mes fw on mes pipe0 Enable the unified mes firmware on mes pipe0. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d2e2c9be78d089a95464ee01d7210c636773cd81 Author: Jack Xiao Date: Fri Mar 1 16:52:05 2024 +0800 drm/amdgpu/mes12: add uni_mes fw loading support Add the unified mes firmware loading support. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 15ddc4e6931b747b5d241a4e61dbd4d4b95c8360 Author: Jack Xiao Date: Fri Mar 1 16:51:40 2024 +0800 drm/amdgpu/mes: add uni_mes fw loading support Add the unified mes firmware loading support. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 628e1ace23796d74a34d85833a60dd0d20ecbdb7 Author: Sreekant Somasekharan Date: Tue Mar 26 16:19:28 2024 -0400 drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC Due to a HW bug, the system memory mappings and peer GPU mappings on GFX12 need to be marked as MTYPE_NC. Cc: Joe Greathouse Cc: David Belanger Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Sreekant Somasekharan Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit a8a4615ba0fa3ee1248ae2184e7e848d7b644e70 Author: Sreekant Somasekharan Date: Fri Feb 23 12:44:43 2024 -0500 drm/amd/amdkfd: Add GFX12 PTE flag to SVM get PTE function Add new GFX12 PTE flag AMDGPU_PTE_IS_PTE to svm_range_get_pte_flags function. This resolves the issues related to SVM enablement in GFX12. Signed-off-by: Sreekant Somasekharan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c5faf18bbe00862429a73afdcd4b95e78285395d Author: David Belanger Date: Fri Mar 1 18:24:30 2024 -0500 drm/amdkfd: Enable atomic support for GFX12 Enable flag in KFD and set the atomic support bit in MQD. Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit a921c35ae5f81089ce98442694d5b11d0bd0d715 Author: Eric Huang Date: Fri Nov 24 13:57:02 2023 -0500 drm/amdkfd: fix NULL ptr for debugfs mqds on GFX v12 mqd_stride function in gfx v12 is not implemented, that causes NULL ptr error. Add the generic func to fix it. Signed-off-by: Eric Huang Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 9243240bed3859fba2d15c016902a4c73a186249 Author: Jonathan Kim Date: Mon Aug 21 11:47:47 2023 -0400 drm/amdkfd: enable single alu ops for gfx12 GFX12 debugging requires setting up precise ALU operation for catching ALU exceptions. Signed-off-by: Jonathan Kim Tested-by: Lancelot Six Reviewed-by: Eric Huang Signed-off-by: Alex Deucher commit 984b265ff604aa608aefc571a2db173b38fe88ce Author: Jonathan Kim Date: Wed Oct 25 09:04:49 2023 -0400 drm/amdkfd: fix support for trap on wave start and end for gfx12 Similar to GFX11, GFX12 supports trapping on wave start and end. Signed-off-by: Jonathan Kim Signed-off-by: Alex Deucher commit fda3f378c4c4607b942f2e3c1a18c1156174b440 Author: Jonathan Kim Date: Wed Oct 25 09:04:48 2023 -0400 drm/amdkfd: always enable ttmp setup for gfx12 Similar to GFX11, always enable the setup of trap temporaries on GFX12. Signed-off-by: Jonathan Kim Signed-off-by: Alex Deucher commit 782b93436afff4105c725163b26fd7dd99198baa Author: David Belanger Date: Thu Aug 17 17:28:38 2023 -0400 drm/amdkfd: Enable GFX12 trap handler Updated switch statement to use GFX12 trap handler. Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit cf338b5dfe9d3a00f3c9d56fda05d70f78719af4 Author: Laurent Morichetti Date: Tue Jan 30 11:25:00 2024 -0800 drm/amdkfd: enable missed single-step workaround for gfx12 When trap_ctrl.trap_after_inst is set, it is possible for a wave to enter the trap handler, after single-stepping an instruction and a save_context is raised, with only save_context set in excp_flag_priv. Because excp_flag_priv.trap_after_inst is not reliably set, we need to use the missed single-step workaround for gfx12 as well. Also add wave_start and wave_end as exceptions that should be handled by the 2nd level trap handler. Signed-off-by: Laurent Morichetti Tested-by: Lancelot Six Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 450abfe4330a4131a02bd0682b1f742c424c30f3 Author: Lancelot SIX Date: Wed Jan 3 12:50:19 2024 +0000 drm/amdkfd: save and restore barrier state for gfx12 Add support to save and restore the work group barrier state in gfx12 CWSR trap handler. There is no support to directly restore the signal count of a barrier state, so instead this patch repeatedly calls s_barrier_signal to increment the signal count to the desired value. In this patch, I have implemented the logic to restore the barrier at the end of the block restoring the HWREGs. This process needs to be done by exactly 1 wave per work group. To achieve this, the initial value of s_restore_spi_init_hi (containing a FIRST_WAVE bit) needs to be saved up until that point. An alternative could be restore the barrier earlier in the process (around when LDS is restored, as the same wave does both). Doing this would break the pattern that the restore procedure follows the CWSR area layout. Before restoring the barrier, this patch checks if the barrier was whose state was saved has the "valid" bit set, even if I don't think this barrier can be in an invalid state during context save. I expect this test to always be true. Signed-off-by: Lancelot SIX Reviewed-by: Jay Cornwall Signed-off-by: Alex Deucher commit f2810033360503989dee81c5a04cd4c4904ad231 Author: Jay Cornwall Date: Mon Aug 7 14:02:01 2023 -0500 drm/amdkfd: Add gfx12 trap handler support - HWREG changes since gfx11 - Save/restore barrier state - get_wave_size is now reserved by assembler v2: rebase (Alex) Signed-off-by: Jay Cornwall Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 385093fde8a1d874d1ad22e7fe2577293f18c35e Author: Jay Cornwall Date: Thu Aug 3 16:43:06 2023 -0500 drm/amdkfd: Move trap handler coherence flags to preprocessor No functional change. Preparation for gfx12 support. v2: drop unrelated change (Alex) Signed-off-by: Jay Cornwall Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 90e4fc8369e9ae10f5cf5bbd2e5f26e9359a50b7 Author: David Belanger Date: Mon May 29 13:23:08 2023 -0400 drm/amdkfd: Added gfx_v12_kfd2kgd interface for GFX12. Initial implementation, based on GFX11. v2: Removed functions not needed by cp scheduler. v3: Fixed typos. v4: squash in warning fix (Alex) Signed-off-by: David Belanger Acked-by: Jonathan Kim Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 47fa09b7889c53a8a9bbdf9092ee03596fd7de65 Author: David Belanger Date: Tue May 16 12:27:14 2023 -0400 drm/amdkfd: Added device queue manager files for GFX12. Initial implementation, based on GFX11. v2: squash in include fix from David (Alex) Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 48f0bdf4e38e42b8285622cfcfc7e6e490b1a719 Author: David Belanger Date: Tue May 16 12:25:02 2023 -0400 drm/amdkfd: Added MQD manager files for GFX12. Initial implementation, based on GFX11. v2: Removed dbg_wa code as not needed on GFX12. v3: squash in SDMA queue fixes (Alex) v4: rebase (Alex) Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 8aa89b69d6b3d4d847535fac1b6f81e29f193b3a Author: David Belanger Date: Wed May 10 13:16:26 2023 -0400 drm/amdkfd: Added temporary changes for GFX12. Added cases for GFX12 in switch statement, code relying on GFX11 implementation until GFX12 implementation is complete. Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 592a5d7de454049455157e2f347908cb2fb5c45d Author: David Belanger Date: Tue May 9 14:57:17 2023 -0400 drm/amdkfd: Basic SDMA and cache info changes for GFX12. Added GFX12 support to a few switch statements. Signed-off-by: David Belanger Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 2f983d3ca5bf2e917662634c6b9e325f87ceeb8b Author: shaoyunl Date: Mon Mar 18 11:19:33 2024 -0400 drm/amdgpu: Enable event log on MES 12 Enable event log through the HW specific FW API Signed-off-by: shaoyunl Reviewed-by: Harish Kasiviswanthan Signed-off-by: Alex Deucher commit 19e69a5d2872ac185333c3a314fb3aa0c6032182 Author: shaoyunl Date: Wed Nov 22 14:34:11 2023 -0500 drm/amdgpu: Enable unmapped doorbell handling basic mode on mes 12 Enable basic mode handling for doorbell ring on unmapped CP queue. In this mode, MES can start schedule the queue mapping based on HW interrupt instead of timer. Signed-off-by: shaoyunl Reviewed-by: Harish Kasiviswanthan Signed-off-by: Alex Deucher commit a2211e475cc0641cd49d019f9c70b1f69fd30e1c Author: Hawking Zhang Date: Sun Mar 17 19:26:07 2024 +0800 drm/amdgpu: Switch to smuio func to get gpu clk counter Switch to smuio callback to query gpu clock counter Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit e781af666341ccbc099bd3154f920eca6f74fb16 Author: Likun Gao Date: Thu Mar 7 17:20:03 2024 +0800 drm/amdgpu: init gfxhub setting to align with mmhub Align gfxhub settings with mmhub when program rlc ram. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b32edc2340c6ed9164093aaf43f8fe8eb04e20e7 Author: Likun Gao Date: Thu Feb 29 21:20:51 2024 +0800 drm/amdgpu: skip dpm check to init imu fw Skip dpm check to init imu firmware for imu v12. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 044feb8e2aff101362d7afffa3444c771140728d Author: Likun Gao Date: Mon Jan 8 13:46:40 2024 +0800 drm/amdgpu: fix active rb and cu number for gfx12 Correct the algorithm of active CU and RB to bypass the disabled SA for gfx12. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 56159fffaab5c42a8897eac0824c58af3b369914 Author: Likun Gao Date: Sun Dec 17 17:54:35 2023 +0800 drm/amdgpu: use new method to program rlc ram Program rlc ram with golden setting data instead. The old method (program_imu_rlc_ram_old) should be retired in the future. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 043869be5a1e312383473c09172123402c1cd565 Author: Kenneth Feng Date: Wed Sep 6 11:15:10 2023 +0800 drm/amd/amdgpu: add cgcg&cgls interface for gfx 12.0 add cgcg&cgls interface for gfx 12.0 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 60917ce8f88980ed26ddeb7577ae3bcc0e30311c Author: Tom St Denis Date: Thu Aug 24 09:23:04 2023 -0400 drm/amd/amdgpu: update GFX12 wave data registers Update the registers for gfx12. Signed-off-by: Tom St Denis Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 53efeba35d71db3ef5fd4c483748945c1e765adc Author: Likun Gao Date: Wed Nov 1 14:28:40 2023 +0800 drm/amdgpu: set different fw data addr for mec pipe For MEC fw data, different pipe should programed into different address. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1e740df77f5d4dfa75e1ca21b7ca3ebc1a907421 Author: Kenneth Feng Date: Wed Sep 6 14:07:58 2023 +0800 drm/amd/amdgpu: workaround for the imu fw loading workaournd for the imu fw loading on gfx 12.0 without psp Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit f5b4c3236f491889c86f557e21438fbe6ec160af Author: Likun Gao Date: Tue Nov 14 15:02:44 2023 +0800 drm/amd: Move fw init from sw_init to early_init for imu v12 Move microcode loading from sw_init to early_init to align with the perious version of imu init sequence. Signed-off-by: Likun Gao Signed-off-by: Alex Deucher commit 2502af906b75a2e73735c3f4350c56c41d0363a4 Author: Likun Gao Date: Thu Aug 31 16:28:33 2023 +0800 drm/amdgpu: support S&R fw load for gfx v12 Support Save & Restore related fw load with backdoor RLC autoload type on gfx v12. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 36b2ce477528964dd0fd7b8ae735d4dc185a1bb2 Author: Jack Xiao Date: Mon Aug 7 15:55:25 2023 +0800 drm/amdgpu/gfx12: recalculate available compute rings to use Recalculate the number of compute rings to use based on the gfx hardware configuration. As needed reserve half of compute rings for mes, kgd can't use up all compute rings. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 29d36a9cfdb648fb15017e6f104fd1b4a1296b90 Author: Likun Gao Date: Fri Jun 30 17:02:43 2023 +0800 drm/amdgpu: skip imu related function if dpm=0 Only execute IMU related functions if dpm>0. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 32d1637689893971b65658a359d03ef4fa30e049 Author: Kenneth Feng Date: Tue Jun 20 15:07:25 2023 +0800 drm/amd/amdgpu: imu fw loading support support imu related function for gfx v12. Signed-off-by: Kenneth Feng Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit af204b76a7cab18a54c6fcf78b57c1dff7bbc0b5 Author: Likun Gao Date: Wed Jun 28 15:39:19 2023 +0800 drm/amdgpu: set cp fw address set for gfx v12 Split PFF/ME/MEC firmware address setting function from related load microcode funtion, as it's also needed for rlc autolad. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 52cb80c12e8a647aa9c903903d58916e6c1c4d38 Author: Likun Gao Date: Tue Jul 4 22:13:42 2023 +0800 drm/amdgpu: Add gfx v12_0 ip block support (v6) Initial support for GFX 12. v1: Add gfx v12_0 ip block support. (Likun) v2: Switch to gfx.kiq array. Move the vmhub from ring callback to ring. (Hawking) v3: Update various callback function impl. (Hawking) v4: Warning fixes (Alex) v5: squash in imu fix, csb, rlc autoload implementations (Alex) v6: Rebase (Alex) Signed-off-by: Likun Gao Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4632bec9fa682a231e4548dc793da2f1e209c798 Author: Jack Xiao Date: Thu Nov 30 18:22:34 2023 +0800 drm/amdgpu/mes12: update data cache boundary Enlarge the data cache boundary. v2: use the fix data cache boundary. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 46c47666106942389b022d05ea370bbf24c4494b Author: Jonathan Kim Date: Wed Oct 25 09:04:47 2023 -0400 drm/amdgpu: fix trap enablement for gfx12 Fix request to MES to set SQ_SHADER_TBA_HI.trap_en for GFX12. Signed-off-by: Jonathan Kim Signed-off-by: Alex Deucher commit d817c470cb2207539ef3e34ce70f755489de088e Author: shaoyunl Date: Thu Nov 2 19:26:39 2023 -0400 drm/amdgpu: Enable MES to handle doorbell ring on unmapped queue On MES12, HW can monitor up to 2048 doorbells that not be mapped currently and trigger the interrupt to MES when these unmapped doorbell been ringed. Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 745f46b6a99fa4a9da1b9aa8cbdce0b9e7ed09e5 Author: Jack Xiao Date: Mon Aug 7 15:54:44 2023 +0800 drm/amdgpu: enable mes v12 self test 1. fix available compute queue to use 2. enable mes v12 self test Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6628f7762b8e23e7524d61c7ed126662348fd6b4 Author: Likun Gao Date: Wed Jun 28 15:37:37 2023 +0800 drm/amdgpu: set mes fw address for mes v12 Split the function of mes fimrware address setting from mes firmware load for mes v12, as it's also needed for rlc autoload. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 785f0f9fe74202e64a7af94a8efc92d4bed742b0 Author: Jack Xiao Date: Tue Jul 4 22:23:34 2023 +0800 drm/amdgpu: Add mes v12_0 ip block support (v4) v1: Add mes v12_0 ip block support. (Jack) v2: Switch to gfx.kiq array. (Hawking) v3: Switch to AMDGPU_GFXHUB(0). (Hawking) v4: Rebase (Alex) Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher commit 69d4c44e5184f2dd0808f669e6e3ef1bee9b8d97 Author: Likun Gao Date: Sun Apr 23 14:38:53 2023 +0800 drm/amdgpu: init mes ucode name for gfx v12 Keep gfx v12 mes fw name to gc_12_x_x_mes.bin and gc_12_x_x_mes1.bin. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 415fcb8c50882d78f6de9fff730e94a286bf1605 Author: Harish Kasiviswanathan Date: Tue Oct 24 11:25:12 2023 -0400 drm/amdgpu: Add mes_v12_api_def.h for gfx12 Add MES_v12 header definition for gfx12 v2: Modify SET_SHADER_DEBUGGER to match mes_v11 definition. This doesn't change the structure layout v3: Removed unncessary comment and spaces Signed-off-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 00c903563314669af40eddfd68c23e21e40fe8c8 Author: Likun Gao Date: Wed Jun 28 12:23:58 2023 +0800 drm/amdgpu: add rlc TOC header file for soc24 Add RLC autoload TOC header file for soc24 ASIC. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e3a911bb3823f010087048af2c933525391627ee Author: Likun Gao Date: Wed Jun 28 12:07:40 2023 +0800 drm/amdgpu: add new TOC structure Add new RLC_TABLE_OF_CONTENT structure definition. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d8fd91f9055222a5b49dd385477edad2712852c8 Author: Likun Gao Date: Tue Apr 4 14:45:45 2023 +0800 drm/amdgpu: add gfx12 clearstate header Add gfx12 clearstate register arrays. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5638b1cfa72a79f7d76394a7cb6127dab294716e Author: Likun Gao Date: Mon Feb 13 18:35:48 2023 +0800 drm/amdgpu/discovery: Set GC family for GC 12.0 IP Set GC family for GC 12.0 IPs. v2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 226e4ca5d4f683b3013947e495c6b433b35718b7 Author: Likun Gao Date: Mon Feb 13 18:19:27 2023 +0800 drm/amdgpu: Add gfx v12_0_0 family id Add gfx v12_0_0 family id Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e56b042118ecacf5787cae6881e82fca8dd05fe3 Author: Sonny Jiang Date: Sat Apr 13 12:12:02 2024 -0400 drm/amdgpu: IB test encode test package change for VCN5 VCN5 session info package interface changed Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 5f571c61b90f905e881c3bd591de65d9d0e1722c Author: Hawking Zhang Date: Wed Apr 17 05:32:46 2024 +0800 drm/amdgpu: Add gfx v9_4_4 ip block Add gfx v9_4_4 ip block support Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit a6bcffa596770b0c54b3ddccbc115bdab4df08e9 Author: Hawking Zhang Date: Wed May 1 00:12:34 2024 +0800 drm/amdgpu: Add smu v13_0_14 ip block Add smu v13_0_14 ip block support Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 1dbd59f3f4d3fd75287aa16ff0976f25213e4c03 Author: Hawking Zhang Date: Wed Apr 17 03:00:18 2024 +0800 drm/amdgpu: Add psp v13_0_14 ip block Add psp v13_0_14 ip block support. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 3d1bb1a2e0f5f3fbbd1a4051e4e771095259fb15 Author: Hawking Zhang Date: Wed Apr 17 02:36:44 2024 +0800 drm/amdgpu: Add sdma v4_4_5 ip block Add sdma v4_4_5 ip block support Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit c45211adfa3d82c3862f7aa8d6b1c6cfa09ffdd4 Author: Aurabindo Pillai Date: Tue Apr 30 15:35:36 2024 -0400 drm/amd: Override DCN410 IP version Override DCN IP version to 4.0.1 from 4.1.0 temporarily until change is made in DC codebase to use 4.1.0 Signed-off-by: Aurabindo Pillai Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 2d6f49ee849b58f115e36c4c5615d22a830f8030 Author: Lang Yu Date: Thu Apr 11 17:14:17 2024 +0800 drm/amdkfd: handle duplicate BOs in reserve_bo_and_cond_vms Observed on gfx8 ASIC where KFD_IOC_ALLOC_MEM_FLAGS_AQL_QUEUE_MEM is used. Two attachments use the same VM, root PD would be locked twice. [ 57.910418] Call Trace: [ 57.793726] ? reserve_bo_and_cond_vms+0x111/0x1c0 [amdgpu] [ 57.793820] amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu+0x6c/0x1c0 [amdgpu] [ 57.793923] ? idr_get_next_ul+0xbe/0x100 [ 57.793933] kfd_process_device_free_bos+0x7e/0xf0 [amdgpu] [ 57.794041] kfd_process_wq_release+0x2ae/0x3c0 [amdgpu] [ 57.794141] ? process_scheduled_works+0x29c/0x580 [ 57.794147] process_scheduled_works+0x303/0x580 [ 57.794157] ? __pfx_worker_thread+0x10/0x10 [ 57.794160] worker_thread+0x1a2/0x370 [ 57.794165] ? __pfx_worker_thread+0x10/0x10 [ 57.794167] kthread+0x11b/0x150 [ 57.794172] ? __pfx_kthread+0x10/0x10 [ 57.794177] ret_from_fork+0x3d/0x60 [ 57.794181] ? __pfx_kthread+0x10/0x10 [ 57.794184] ret_from_fork_asm+0x1b/0x30 Signed-off-by: Lang Yu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4752cac300fec50530aab69788f48b62c35aa627 Author: Yunxiang Li Date: Thu Apr 25 23:15:28 2024 -0400 drm/amdgpu: Move ras resume into SRIOV function This is part of the reset, move it into the reset function. Signed-off-by: Yunxiang Li Reviewed-by: Emily Deng Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit 97d814fe4f697791abfbe27e035f0b943c483243 Author: Lijo Lazar Date: Tue Apr 30 16:53:16 2024 +0530 drm/amd/amdxcp: Use unique name for partition dev amdxcp is a platform driver for creating partition devices. libdrm library identifies a platform device based on 'OF_FULLNAME' or 'MODALIAS'. If two or more devices have the same platform name, drm library only picks the first device. Platform driver core uses name of the device to populate 'MODALIAS'. When 'amdgpu_xcp' is used as the base name, only first partition device gets identified. Assign unique name so that drm library identifies partition devices separately. amdxcp doesn't support probe of partitions, it doesn't bother about modaliases. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Acked-by: Christian König Acked-by: James Zhu Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 3f19cffde93585b25a007b108cc4b5bd149226c1 Author: Peyton Lee Date: Tue Apr 30 22:09:09 2024 +0800 drm/amdgpu/vpe: fix vpe dpm clk ratio setup failed Some version of BIOS does not enable all clock levels, resulting in high level clock frequency of 0. The number of valid CLKs must be confirmed in advance. Signed-off-by: Peyton Lee Reviewed-by: Lang Yu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c6f79832b8bf6a0ff40d36d3cb22e27419ec8aef Author: Srinivasan Shanmugam Date: Tue Apr 23 21:37:21 2024 +0530 drm/amd/display: Remove redundant NULL check in dcn10_set_input_transfer_func This commit removes an unnecessary NULL check in the `dcn10_set_input_transfer_func` function in the `dcn10_hwseq.c` file. The variable `tf` is assigned the address of `plane_state->in_transfer_func` unconditionally, so it can never be `NULL`. Therefore, the check `if (tf == NULL)` is unnecessary and has been removed. Fixes the below smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn10/dcn10_hwseq.c:1839 dcn10_set_input_transfer_func() warn: address of 'plane_state->in_transfer_func' is non-NULL Fixes: 285a7054bf81 ("drm/amd/display: Remove plane and stream pointers from dc scratch") Cc: Wenjing Liu Cc: Tom Chung Cc: Alvin Lee Cc: Rodrigo Siqueira Cc: Roman Li Cc: Hersen Wu Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Suggested-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ff75caceb93d8793bd81f69863c7644423ed09dd Author: Srinivasan Shanmugam Date: Tue Apr 23 21:49:51 2024 +0530 drm/amd/display: Remove redundant NULL check in dce110_set_input_transfer_func This commit removes a redundant NULL check in the `dce110_set_input_transfer_func` function in the `dce110_hwseq.c` file. The variable `tf` is assigned the address of `plane_state->in_transfer_func` unconditionally, so it can never be `NULL`. Therefore, the check `if (tf == NULL)` is unnecessary and has been removed. Fixes the below smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c:301 dce110_set_input_transfer_func() warn: address of 'plane_state->in_transfer_func' is non-NULL Fixes: 285a7054bf81 ("drm/amd/display: Remove plane and stream pointers from dc scratch") Cc: Wenjing Liu Cc: Tom Chung Cc: Alvin Lee Cc: Rodrigo Siqueira Cc: Roman Li Cc: Hersen Wu Cc: Alex Hung Cc: Aurabindo Pillai Cc: Harry Wentland Suggested-by: Dan Carpenter Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6e4aa08fa9c6c0c027fc86f242517c925d159393 Author: Yunxiang Li Date: Mon Apr 22 15:04:52 2024 -0400 drm/amdgpu: Fix amdgpu_device_reset_sriov retry logic The retry loop for SRIOV reset have refcount and memory leak issue. Depending on which function call fails it can potentially call amdgpu_amdkfd_pre/post_reset different number of times and causes kfd_locked count to be wrong. This will block all future attempts at opening /dev/kfd. The retry loop also leakes resources by calling amdgpu_virt_init_data_exchange multiple times without calling the corresponding fini function. Align with the bare-metal reset path which doesn't have these issues. This means taking the amdgpu_amdkfd_pre/post_reset functions out of the reset loop and calling amdgpu_device_pre_asic_reset each retry which properly free the resources from previous try by calling amdgpu_virt_fini_data_exchange. Signed-off-by: Yunxiang Li Reviewed-by: Emily Deng Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit a5b843269a8f664df85948ec41db1dbcbc2a2d8b Author: Aurabindo Pillai Date: Tue Apr 30 09:40:22 2024 -0400 drm/amd: Enable DCN410 init Enable initializing Display Manager for DCN410 IP Signed-off-by: Aurabindo Pillai Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 25c01191c2555351922e5515b6b6d31357975031 Author: Yunxiang Li Date: Mon Apr 22 14:44:38 2024 -0400 drm/amdgpu: Add reset_context flag for host FLR There are other reset sources that pass NULL as the job pointer, such as amdgpu_amdkfd_reset_work. Therefore, using the job pointer to check if the FLR comes from the host does not work. Add a flag in reset_context to explicitly mark host triggered reset, and set this flag when we receive host reset notification. Signed-off-by: Yunxiang Li Reviewed-by: Emily Deng Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher commit f4322b9f8ad5f9f62add288c785d2e10bb6a5efe Author: Yunxiang Li Date: Mon Apr 22 14:59:02 2024 -0400 drm/amdgpu: Fix two reset triggered in a row Some times a hang GPU causes multiple reset sources to schedule resets. The second source will be able to trigger an unnecessary reset if they schedule after we call amdgpu_device_stop_pending_resets. Move amdgpu_device_stop_pending_resets to after the reset is done. Since at this point the GPU is supposedly in a good state, any reset scheduled after this point would be a legitimate reset. Remove unnecessary and incorrect checks for amdgpu_in_reset that was kinda serving this purpose. Signed-off-by: Yunxiang Li Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f5007c67fc77ec555cf824fb8c2038a834201b38 Author: Zhigang Luo Date: Thu Apr 11 12:21:31 2024 -0400 drm/amdgpu: update vf to pf message retry from 2 to 5 increase retry times to wait host has enough time to complete reset. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3bcc0ee14768d886cedff65da72d83d375a31a56 Author: Zhigang Luo Date: Tue Apr 16 16:35:14 2024 -0400 drm/amdgpu: avoid reading vf2pf info size from FB VF can't access FB when host is doing mode1 reset. Using sizeof to get vf2pf info size, instead of reading it from vf2pf header stored in FB. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 45ebfaa44c2b5471e5c2bcb2d80350469808b12b Author: Dan Carpenter Date: Thu Apr 25 14:21:22 2024 +0300 drm/amd/display: re-indent dc_power_down_on_boot() These lines are indented too far. Clean the whitespace. Reviewed-by: Harry Wentland Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit bc19b490c00f17aaf4de2e56480506fdaac929fd Author: Colin Ian King Date: Wed Apr 24 17:28:09 2024 +0100 drm/amd/display: Fix spelling various spelling mistakes There are various spelling mistakes in dml2_printf messages, fix them. Reviewed-by: Harry Wentland Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 2fde4fdddc1f1a7dbdbf4faa27a3fb05e1b2cc85 Author: Nathan Chancellor Date: Wed Apr 24 09:14:02 2024 -0700 drm/amd/display: Avoid -Wenum-float-conversion in add_margin_and_round_to_dfs_grainularity() When building with clang 19 or newer (which strengthened some of the enum conversion warnings for C), there is a warning (or error with CONFIG_WERROR=y) around doing arithmetic with an enumerated type and a floating point expression. drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c:181:58: error: arithmetic between enumeration type 'enum dentist_divider_range' and floating-point type 'double' [-Werror,-Wenum-float-conversion] 181 | divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * (vco_freq_khz / clock_khz)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. This conversion is expected due to the nature of the enumerated value and definition, so silence the warning by casting the enumeration to an integer explicitly to make it clear to the compiler. Fixes: 70839da63605 ("drm/amd/display: Add new DCN401 sources") Reviewed-by: Harry Wentland Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit d17846a096b3127e6b3d4164874385cbc39367c4 Author: Mario Limonciello Date: Tue Apr 30 09:53:23 2024 -0500 drm/amd/display: Disable panel replay by default for now Panel replay was enabled by default in commit 5950efe25ee0 ("drm/amd/display: Enable Panel Replay for static screen use case"), but it isn't working properly at least on some BOE and AUO panels. Instead of being static the screen is solid black when active. As it's a new feature that was just introduced that regressed VRR disable it for now so that problem can be properly root caused. Cc: Tom Chung Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3344 Fixes: 5950efe25ee0 ("drm/amd/display: Enable Panel Replay for static screen use case") Signed-off-by: Mario Limonciello Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 8ad0e1810bf23f22cedb8a2664548b15646570c7 Author: Francois Dugast Date: Thu May 2 14:43:10 2024 +0200 drm/xe/gt: Fix assert in L3 bank mask generation What needs to be asserted is that the pattern fits in the number of bits provided by the user in patternbits, otherwise it would be truncated when replicated according to the mask, which is likely not the intended use of this function. The pattern argument is a bitmap so use find_last_bit() instead of fls(). The bit position starts at index 0 so remove "or equal" from the comparison. XE_MAX_L3_BANK_MASK_BITS would be the returned value if the pattern is 0, which can be the case on some platforms. v2: Check the result does not overflow the array (Lucas De Marchi) v3: Use __fls() for long and handle mask == 0 (Lucas De Marchi) Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240502124311.159695-1-francois.dugast@intel.com Signed-off-by: Lucas De Marchi commit 8e056b50d92ae7f4d6895d1c97a69a2a953cf97b Author: Chaitanya Kumar Borah Date: Tue Apr 30 14:48:25 2024 +0530 drm/i915/audio: Fix audio time stamp programming for DP Intel hardware is capable of programming the Maud/Naud SDPs on its own based on real-time clocks. While doing so, it takes care of any deviations from the theoretical values. Programming the registers explicitly with static values can interfere with this logic. Therefore, let the HW decide the Maud and Naud SDPs on it's own. Cc: stable@vger.kernel.org # v5.17 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8097 Co-developed-by: Kai Vehmanen Signed-off-by: Kai Vehmanen Signed-off-by: Chaitanya Kumar Borah Reviewed-by: Uma Shankar Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20240430091825.733499-1-chaitanya.kumar.borah@intel.com commit 18bc074c226bfecd205bf031678f5e35ee55c3da Author: Thomas Zimmermann Date: Fri Apr 19 10:29:36 2024 +0200 drm/fbdev: Clean up fbdev documentation Rewrite some docs that are not up-to-date any longer. Remove the TODO item for fbdev-generic conversion, as the helper has been replaced. Make documentation for DMA, SHMEM and TTM emulation available. Signed-off-by: Thomas Zimmermann Cc: Jonathan Corbet Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-44-tzimmermann@suse.de commit aae4682e5d66c1e1dc181fa341652e037237f144 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:35 2024 +0200 drm/fbdev-generic: Convert to fbdev-ttm Only TTM-based drivers use fbdev-generic. Rename it to fbdev-ttm and change the symbol infix from _generic_ to _ttm_. Link the source file into TTM helpers, so that it is only build if TTM-based drivers have been selected. Select DRM_TTM_HELPER for loongson. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-43-tzimmermann@suse.de commit c32705b5915fbc737710e95a6f4e8eddf3f2ab4f Author: Thomas Zimmermann Date: Fri Apr 19 10:29:34 2024 +0200 drm/tiny/st7735r: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by st7735r. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-42-tzimmermann@suse.de commit 85c8e3ec806b043b449d5646bae4eb8f40acb45d Author: Thomas Zimmermann Date: Fri Apr 19 10:29:33 2024 +0200 drm/tiny/st7586: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by st7586. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-41-tzimmermann@suse.de commit 01849b42e7a7a2b7394511881238b0995a02da39 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:32 2024 +0200 drm/tiny/repaper: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by repaper. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-40-tzimmermann@suse.de commit 9317ff69170d334545603b689585d5b54e41bdef Author: Thomas Zimmermann Date: Fri Apr 19 10:29:31 2024 +0200 drm/tiny/panel-mipi-dbi: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by panel-mipi-dbi. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-39-tzimmermann@suse.de commit 6a09ecfe2867031bd50324e9fc1bb37bda64e5bb Author: Thomas Zimmermann Date: Fri Apr 19 10:29:30 2024 +0200 drm/tiny/mi0283qt: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by mi0283qt. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-38-tzimmermann@suse.de commit 4f229b50b2de73e8867250226125c35620e2be33 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:29 2024 +0200 drm/tiny/ili9486: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9486. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-37-tzimmermann@suse.de commit 18c6e51f16f0512750b9aabf5d0a5509f445537e Author: Thomas Zimmermann Date: Fri Apr 19 10:29:28 2024 +0200 drm/tiny/ili9341: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9341. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Kamlesh Gurudasani Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-36-tzimmermann@suse.de commit 5ab91447aa13b8b98bc11f5326f33500b0ee2c48 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:27 2024 +0200 drm/tiny/ili9225: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9225. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Lechner Acked-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-35-tzimmermann@suse.de commit 6447acb8b3530e3d32452ca3fe524efa44ceaec5 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:26 2024 +0200 drm/tiny/ili9163: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ili9163. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-34-tzimmermann@suse.de commit a9a0f08df54a41c0c1621fd73e640070d621c43c Author: Thomas Zimmermann Date: Fri Apr 19 10:29:25 2024 +0200 drm/tiny/hx8357d: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by hx8357d. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-33-tzimmermann@suse.de commit b4c3fe533cd1afeac057ef1e79358d3b36f184f8 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:24 2024 +0200 drm/rockchip: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by rockchip. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan Reviewed-by: Javier Martinez Canillas Acked-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-32-tzimmermann@suse.de commit 90d0799af3c25d36f89e60cdb785bea00cea5b6d Author: Thomas Zimmermann Date: Fri Apr 19 10:29:23 2024 +0200 drm/renesas/shmobile: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by shmobile. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-31-tzimmermann@suse.de commit ff5cea0f03a607e6988169a50678c4d995a266d5 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:22 2024 +0200 drm/renesas/rz-du: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by rz-du. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Biju Das Tested-by: Biju Das Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-30-tzimmermann@suse.de commit b3fdbd60d35ce340062b5232076df2d3613b44cd Author: Thomas Zimmermann Date: Fri Apr 19 10:29:21 2024 +0200 drm/renesas/rcar-du: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by rcar-du. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-29-tzimmermann@suse.de commit 70c82ee1acac5c8ccf09466f6e36c659bd23c551 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:20 2024 +0200 drm/panel/panel-ilitek-9341: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by panel-ilitek-9341. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Neil Armstrong Cc: Jessica Zhang Cc: Sam Ravnborg Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-28-tzimmermann@suse.de commit 0992284b4fe443ffc76448d431b62760dc0fe7bf Author: Thomas Zimmermann Date: Fri Apr 19 10:29:19 2024 +0200 drm/mediatek: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ingenic. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Chun-Kuang Hu Cc: Philipp Zabel Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-27-tzimmermann@suse.de commit c1eef5ae06432bd67f1dd319baff86320c406903 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:18 2024 +0200 drm/ingenic: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by ingenic. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Paul Cercueil Acked-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-26-tzimmermann@suse.de commit 931af444041ae8f09f50feedd483c7e14ee699d1 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:17 2024 +0200 drm/imx/lcdc: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by lcdc. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-25-tzimmermann@suse.de commit f3796250799c74db9b8c76c4d7d874ca925b2a44 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:16 2024 +0200 drm/hisilicon/kirin: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by kirin. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-24-tzimmermann@suse.de commit 386030e519cec7be426918b9c4220275c8240f19 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:15 2024 +0200 drm/arm/komeda: Use fbdev-dma Implement fbdev emulation with fbdev-dma. Fbdev-dma now supports damage handling, which is required by komeda. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Liviu Dudau Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-23-tzimmermann@suse.de commit 808a40b6946804ec04dad84ff17797ee1b92f0bb Author: Thomas Zimmermann Date: Fri Apr 19 10:29:14 2024 +0200 drm/fbdev-dma: Implement damage handling and deferred I/O Add support for damage handling and deferred I/O to fbdev-dma. This enables fbdev-dma to support all DMA-memory-based DRM drivers, even such with a dirty callback in their framebuffers. The patch adds the code for deferred I/O and also sets a dedicated helper for struct fb_ops.fb_mmap that support coherent mappings. v3: - init fb_ops with FB_GEN_DEFAULT_DEFERRED_DMAMEM_OPS() (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-22-tzimmermann@suse.de commit d2b42634fd41be2abc5ca82fb941e22c573cc426 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:13 2024 +0200 drm/vkms: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: "Maíra Canal" Cc: Haneen Mohammed Cc: Daniel Vetter Reviewed-by: Javier Martinez Canillas Acked-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-21-tzimmermann@suse.de commit 8b1bb818b234c69f32853d1ba8a4c9ecef570a2e Author: Thomas Zimmermann Date: Fri Apr 19 10:29:12 2024 +0200 drm/virtio: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: David Airlie Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu Tested-by: Dmitry Osipenko Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-20-tzimmermann@suse.de commit 0f8c7314772fb28e481d49ce4e0d96ff4dec2bb2 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:11 2024 +0200 drm/udl: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Sean Paul Cc: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-19-tzimmermann@suse.de commit 5134fa750e7110cca3076b0f0f2ad835bf3fc16e Author: Thomas Zimmermann Date: Fri Apr 19 10:29:10 2024 +0200 drm/tiny/simpledrm: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-18-tzimmermann@suse.de commit 049f75bd0b0d6464a41ddaf482f0055a45ac055e Author: Thomas Zimmermann Date: Fri Apr 19 10:29:09 2024 +0200 drm/tiny/ofdrm: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-17-tzimmermann@suse.de commit 5bd79b70a29304eb8935957170b79e2346b1ebf9 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:08 2024 +0200 drm/tiny/gm12u320: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Hans de Goede Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-16-tzimmermann@suse.de commit eb9479a98c61982720f81bf20f4674bc27217321 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:07 2024 +0200 drm/tiny/cirrus: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-15-tzimmermann@suse.de commit 92e7a368917be73a83d83b7197e4495158e8295a Author: Thomas Zimmermann Date: Fri Apr 19 10:29:06 2024 +0200 drm/solomon: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-14-tzimmermann@suse.de commit b1fd6da2438d65ff05bce1b1e62a4a218845fe4b Author: Thomas Zimmermann Date: Fri Apr 19 10:29:05 2024 +0200 drm/mgag200: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Jocelyn Falempe Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-13-tzimmermann@suse.de commit b3e328dcedc11f1a17dfbc9baedebf6938b5c878 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:04 2024 +0200 drm/hyperv: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Deepak Rawat Reviewed-by: Deepak Rawat Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-12-tzimmermann@suse.de commit 994c6277e68dc889bf73baf72987848f8fd96b98 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:03 2024 +0200 drm/gud: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "Noralf Trønnes" Acked-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-11-tzimmermann@suse.de commit fcb3694af57128cef06970ed979d01a6298303cb Author: Thomas Zimmermann Date: Fri Apr 19 10:29:02 2024 +0200 drm/ast: Use fbdev-shmem Implement fbdev emulation with fbdev-shmem. Avoids the overhead of fbdev-generic's additional shadow buffering. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Jocelyn Falempe Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-10-tzimmermann@suse.de commit 150f431a08317e0e0363a7f9147b6246d3b40ba6 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:01 2024 +0200 drm/fbdev: Add fbdev-shmem Add an fbdev emulation for SHMEM-based memory managers. The code is similar to fbdev-generic, but does not require an additional shadow buffer for mmap(). Fbdev-shmem operates directly on the buffer object's SHMEM pages. Fbdev's deferred-I/O mechanism updates the hardware state on write operations. The memory pages of GEM SHMEM cannot be detected by fbdefio. Therefore fbdev-shmem implements the .get_page() hook in struct fb_deferred_io. The fbdefio helpers call this hook to retrieve the page directly from fbdev-shmem instead of trying to detect it internally. v3: - clarify on get_page mechanism in commit description (Javier) v2: - use drm_driver_legacy_fb_format() (Geert) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-9-tzimmermann@suse.de commit 747bda7bb5b1644a06734900326847a5d353c448 Author: Thomas Zimmermann Date: Fri Apr 19 10:29:00 2024 +0200 fbdev/deferred-io: Provide get_page hook in struct fb_deferred_io Add a callback for drivers to provide framebuffer pages to fbdev's deferred-I/O helpers. Implementations need to acquire a reference on the page before returning it. Returning NULL generates a SIGBUS signal. This will be useful for DRM's fbdev emulation with GEM-shmem buffer objects. v2: - fix typo in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-8-tzimmermann@suse.de commit 1ecbc7dd29020d335e1f6f789c23b36a84cd5214 Author: Thomas Zimmermann Date: Fri Apr 19 10:28:59 2024 +0200 fbdev/deferred-io: Always call get_page() for framebuffer pages Unconditionally call get_page() after looking up a page from the framebuffer memory. Guarantees that we always hold a reference. This change also refactors the code such that it can support a driver-supplied get_page helper. This will be useful for DRM's fbdev emulation. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-7-tzimmermann@suse.de commit dcaefc82395841fa15aa70a2c8841cda4f87125f Author: Thomas Zimmermann Date: Fri Apr 19 10:28:58 2024 +0200 fbdev/deferred-io: Test smem_start for I/O memory Test smem_start before looking up pages from its value. Return NULL if it is unset. This will result in a SIGBUS signal. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-6-tzimmermann@suse.de commit abc79a0e0a3e8e900db76e0f7b1c34c6f6c4c282 Author: Thomas Zimmermann Date: Fri Apr 19 10:28:57 2024 +0200 fbdev/deferred-io: Test screen_buffer for vmalloc'ed memory Framebuffers in virtual memory are available via screen_buffer. Use it instead of screen_base and avoid the type casting. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-5-tzimmermann@suse.de commit 28aea43c705af174b98d01d299bb189c2ccbe085 Author: Thomas Zimmermann Date: Fri Apr 19 10:28:56 2024 +0200 fbdev/deferred-io: Clean up pageref on lastclose Clean up the pageref state as part of the lastclose helper. This only requires to clear the page's mapping field. The pageref and page can stay in place for the next opened instance of the frame- buffer file. With the change in the clean-up logic, there's no further need to look up pages during the lastclose cleanup. The code instead uses the existing pagerefs in its look-up table. It also avoids using smem_len, which some driver might not set correctly. v2: - fix typos in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-4-tzimmermann@suse.de commit 757a2713761fa90bb8f57cba231a3e7259944463 Author: Thomas Zimmermann Date: Fri Apr 19 10:28:55 2024 +0200 fbdev/deferred-io: Move pageref setup into separate helper Set up struct fb_deferred_io_pageref in the new helper function fb_deferred_io_pageref_lookup(), which runs when the pageref is first taken. Remove the setup code from the rest of the code. At first, the code allocates the memory of all pageref structs. The setup of the various fields happens when the pageref is required. v2: - fix typo in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-3-tzimmermann@suse.de commit 73ef0aecba78aa9ebd309b10b6cd17d94e632892 Author: Thomas Zimmermann Date: Fri Apr 19 10:28:54 2024 +0200 drm/fbdev-generic: Do not set physical framebuffer address Framebuffer memory is allocated via vzalloc() from non-contiguous physical pages. The physical framebuffer start address is therefore meaningless. Do not set it. The value is not used within the kernel and only exported to userspace on dedicated ARM configs. No functional change is expected. v2: - refer to vzalloc() in commit message (Javier) Signed-off-by: Thomas Zimmermann Fixes: a5b44c4adb16 ("drm/fbdev-generic: Always use shadow buffering") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Zack Rusin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: # v6.4+ Reviewed-by: Javier Martinez Canillas Reviewed-by: Zack Rusin Reviewed-by: Sui Jingfeng Tested-by: Sui Jingfeng Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-2-tzimmermann@suse.de commit b0a835db17434473dfb84f7646de1cedc4ecdb94 Merge: e91a36b472862 4a56c0ed5aa0b Author: Thomas Zimmermann Date: Thu May 2 11:25:27 2024 +0200 Merge drm/drm-next into drm-misc-next Backmerging to get DRM fixes from v6.9-rc6. Signed-off-by: Thomas Zimmermann commit ae22b2f1c8ccd9a3e5f19e3ebb4ef6ec1e8655e0 Merge: a1ea30b69e02e 4a56c0ed5aa0b Author: Thomas Hellström Date: Thu May 2 09:46:12 2024 +0200 Merge drm/drm-next into drm-xe-next Avoid falling too far behind drm-next. Signed-off-by: Thomas Hellström commit e91a36b472862a1d199ea8d1b1ca192a347bf33e Author: Sui Jingfeng Date: Wed May 1 13:24:02 2024 +0800 drm/panel: ili9341: Remove a superfluous else after return Because the else clause after the return clause is not useful, remove it to get a better look. Reviewed-by: Jessica Zhang Signed-off-by: Sui Jingfeng Link: https://lore.kernel.org/r/20240501052402.806006-1-sui.jingfeng@linux.dev Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240501052402.806006-1-sui.jingfeng@linux.dev commit b94605a3889b9084d88f1fe06b043e082bc6b075 Author: Jocelyn Falempe Date: Fri Apr 19 15:20:19 2024 +0200 lib/fonts: Allow to select fonts for drm_panic drm_panic has been introduced recently, and uses the same fonts as FRAMEBUFFER_CONSOLE. Signed-off-by: Jocelyn Falempe Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20240419132243.154466-1-jfalempe@redhat.com commit a1ea30b69e02eb02043b0d6d7c42abcfafe99bd0 Author: Daniele Ceraolo Spurio Date: Fri Apr 19 11:34:12 2024 -0700 drm/xe/gsc: define GSCCS for LNL LNL has 1 GSCCS, same as MTL. Note that the GSCCS will be disabled until we have a GSC FW defined, but having it in the list of engine is a requirement to add such definition. v2: rebase Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Shekhar Chauhan Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240419183412.1605782-2-daniele.ceraolospurio@intel.com commit d457519c942d4885d92f6367e42ca67f4c7471ad Author: Daniele Ceraolo Spurio Date: Fri Apr 19 11:34:11 2024 -0700 drm/xe/gsc: Turn off GSCCS interrupts when disabling the engine Starting on LNL, there is a new GSCCS interrupt that is triggered when the GSC engine reset fails. If the HW is in a bad state, this interrupt might end up being triggered even if we're not using the engine, which will lead to a warning because we'll see it as unexpected. Since there is no point in handling the interrupt in this scenario, we can just make sure the interrupts are off when we disable the engine. Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Tested-by: Matt Roper Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240419183412.1605782-1-daniele.ceraolospurio@intel.com commit 235e60653f8dbe4441d9ddca9fbeeb3e8083faa9 Author: Sui Jingfeng Date: Wed May 1 13:13:23 2024 +0800 drm/debugfs: Drop conditionals around of_node pointers Having conditional around the of_node pointer of the drm_bridge structure is not necessary anymore, since drm_bridge structure always has the of_node member since the commit d8dfccde2709 ("drm/bridge: Drop conditionals around of_node pointers"). So drop the conditional, please also note that this patch is following the convention used by driver core, see commit c9e358dfc4a8 ("driver-core: remove conditionals around devicetree pointers"). Reviewed-by: Dmitry Baryshkov Signed-off-by: Sui Jingfeng Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240501051323.805076-1-sui.jingfeng@linux.dev commit 13d56abef172e8ef793fbab58268b60687698f15 Author: Jiapeng Chong Date: Wed Apr 17 09:29:17 2024 +0800 drm/vmwgfx: Remove duplicate vmwgfx_vkms.h header ./drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c: vmwgfx_vkms.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8772 Signed-off-by: Jiapeng Chong Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20240417012917.66046-1-jiapeng.chong@linux.alibaba.com commit 986c12d8c9a677c094c37bd6aa636b4d4c5ccd46 Author: Jocelyn Falempe Date: Fri Apr 26 14:10:50 2024 +0200 drm/fb_dma: Add checks in drm_fb_dma_get_scanout_buffer() plane->state and plane->state->fb can be NULL, so add a check before dereferencing them. Found by testing with the imx driver. Fixes: 879b3b6511fe ("drm/fb_dma: Add generic get_scanout_buffer() for drm_panic") Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240426121121.241366-1-jfalempe@redhat.com commit 4a9a567ab101e659a4fafb7a691ff6b84531a10a Author: Chaitanya Kumar Borah Date: Tue Apr 30 18:48:40 2024 +0530 nouveau: Add missing break statement Add the missing break statement that causes the following build error CC [M] drivers/gpu/drm/i915/display/intel_display_device.o ../drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c: In function ‘build_registry’: ../drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1266:3: error: label at end of compound statement 1266 | default: | ^~~~~~~ CC [M] drivers/gpu/drm/amd/amdgpu/gfx_v10_0.o HDRTEST drivers/gpu/drm/xe/compat-i915-headers/i915_reg.h CC [M] drivers/gpu/drm/amd/amdgpu/imu_v11_0.o make[7]: *** [../scripts/Makefile.build:244: drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.o] Error 1 make[7]: *** Waiting for unfinished jobs.... Fixes: b58a0bc904ff ("nouveau: add command-line GSP-RM registry support") Closes: https://lore.kernel.org/all/913052ca6c0988db1bab293cfae38529251b4594.camel@nvidia.com/T/#m3c9acebac754f2e74a85b76c858c093bb1aacaf0 Closes: https://lore.kernel.org/all/CA+G9fYu7Ug0K8h9QJT0WbtWh_LL9Juc+VC0WMU_Z_vSSPDNymg@mail.gmail.com/ Tested-by: Nícolas F. R. A. Prado Reviewed-by: Lucas De Marchi Signed-off-by: Chaitanya Kumar Borah Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240430131840.742924-1-chaitanya.kumar.borah@intel.com commit 5fa7d540d95d97ddc021a74583f6b3da4df9c93a Author: Tim Huang Date: Sun Apr 28 12:41:42 2024 +0800 drm/amd/pm: fix uninitialized variable warnings for vega10_hwmgr Clear warnings that using uninitialized variable when fails to get the valid value from SMU. Signed-off-by: Tim Huang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 0fa4c25db8b791f79bc0d5a0cd58aff9ad85186b Author: Tim Huang Date: Fri Apr 26 08:43:30 2024 +0800 drm/amdgpu: fix uninitialized scalar variable warning Clear warning that field bp is uninitialized when calling amdgpu_virt_ras_add_bps. Signed-off-by: Tim Huang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 12c6967428a099bbba9dfd247bb4322a984fcc0b Author: Jesse Zhang Date: Tue Apr 30 10:29:08 2024 +0800 drm/amd/pm: fix the Out-of-bounds read warning using index i - 1U may beyond element index for mc_data[] when i = 0. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 6e46b89f40e39e2054f2e179e8e8c3132e7a9d57 Author: Tim Huang Date: Mon Apr 29 11:17:54 2024 +0800 drm/amd/pm: fix uninitialized variable warning for smu_v13 Clear warning that using uninitialized variable when the dpm is not enabled and reuse the code for SMU13 to get the boot frequency. Signed-off-by: Tim Huang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c8c19ebf7c0b202a6a2d37a52ca112432723db5f Author: Jesse Zhang Date: Tue Apr 30 10:23:48 2024 +0800 drm/amd/pm: Fix negative array index read Avoid using the negative values for clk_idex as an index into an array pptable->DpmDescriptor. V2: fix clk_index return check (Tim Huang) Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit f45ed399d7ef464b25c21b7a76c83d3ee11e8d79 Author: Likun Gao Date: Thu Mar 9 15:00:45 2023 +0800 drm/amdgpu/discovery: add sdma v7_0 ip block Add sdma v7_0 ip block. v2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4badb9999bd1dd3fb018c2ce497698407113d18d Author: Likun Gao Date: Mon Oct 23 11:07:18 2023 +0800 drm/amdgpu: provide more ucode name shown via id Provide some lost ucode name shown via firmware ID. v2: fix whitespace (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 807d90b5ef1dafd484330b3e1a3c3c43abfbd8e9 Author: Likun Gao Date: Wed Aug 16 13:30:30 2023 +0800 drm/amdgpu: support SDMA v3 struct fw front door load Add support for new SDMA firmware struct (V3) with PSP front door load type. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5251b56e3850cd9187f019b785fc4d9bf1dedec3 Author: Jack Xiao Date: Tue Apr 9 17:31:11 2024 +0800 drm/amdgpu/sdma7: set sdma hang watchdog Set SDMAx_WATCHDOG_CNTL.QUEUE_HANG_COUNT registers to improve SDMA reliability. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b412351e91bde3a6ec546b598087bdc3fcc458ee Author: Likun Gao Date: Tue Jul 4 22:33:37 2023 +0800 drm/amdgpu: Add sdma v7_0 ip block support (v7) v1: Add sdma v7_0 ip block support. (Likun) v2: Move vmhub from ring_funcs to ring. (Hawking) v3: Switch to AMDGPU_GFXHUB(0). (Hawking) v4: Move microcode init into early_init. (Likun) v5: Fix warnings (Alex) v6: Squash in various fixes (Alex) v7: Rebase (Alex) v8: Rebase (Alex) Signed-off-by: Likun Gao Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7c0ac603383a03b8725fb6e254b8a883129af188 Author: Tobias Jakobi Date: Sat Mar 9 02:47:32 2024 +0100 drm/amd/display: Add MSF panel to DPCD 0x317 patch list This 8.4 inch panel is integrated in the Ayaneo Kun handheld device. The panel resolution is 2560×1600, i.e. it has portrait dimensions. Decoding the EDID shows: Manufacturer: MSF Model: 4099 Display Product Name: 'TV080WUM-NL0 ' Judging from the product name this might be a clone of a BOE panel, but with larger dimensions. Panel frequently shows non-functional backlight control. Adding some debug prints to update_connector_ext_caps() shows that something the OLED bit of ext_caps is set, and then the driver assumes that backlight is controlled via AUX. Forcing backlight control to PWM via amdgpu.backlight=0 restores backlight operation. Signed-off-by: Tobias Jakobi Signed-off-by: Alex Deucher commit b96033424d4c6a97dc01bc80c506baa035b9e50c Author: Jiapeng Chong Date: Thu Apr 25 11:23:30 2024 +0800 drm/amd/display: Remove duplicate dcn401/dcn401_clk_mgr.h header ./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c: dcn401/dcn401_clk_mgr.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8885 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 9989a924aa89e54ca8e1ab34175798559b986714 Author: Likun Gao Date: Mon Feb 6 15:13:43 2023 +0800 drm/amdgpu: Add sdma fw v3 structure Add sdma firmware struct version 3 to support sdma v7_0 firmware. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9d0532c86fde034ef8b04172cbcd93451af8ca14 Author: Jiapeng Chong Date: Thu Apr 25 09:35:53 2024 +0800 drm/amd/display: Remove duplicate spl/dc_spl_types.h header ./drivers/gpu/drm/amd/display/dc/inc/hw/transform.h: spl/dc_spl_types.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8884 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 6769a23697f17f9bf9365ca8ed62fe37e361a05a Author: Dan Carpenter Date: Sun Apr 28 15:57:00 2024 +0300 drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq() The "instance" variable needs to be signed for the error handling to work. Fixes: 8b2faf1a4f3b ("drm/amdgpu: add error handle to avoid out-of-bounds") Reviewed-by: Bob Zhou Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit e8a31b4e811a04e5d83dc036fa9542210867b7ca Author: Likun Gao Date: Tue Jan 10 15:34:32 2023 +0800 drm/amdgpu: Add new members for sdma v7_0 fw Add new members in sdma instance structure for sdma v7_0 firmware. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d34420f20303f9715e6f2a3ee791af87e27ca821 Author: Likun Gao Date: Thu Mar 9 11:50:10 2023 +0800 drm/amdgpu: add gfx12 mqd structures memory queue descriptors for gfx12. v2: squash in sdma updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1b838189edea95ad65a4fc7061894e0d0a355f4b Author: Likun Gao Date: Thu Mar 9 14:38:32 2023 +0800 drm/amdgpu/discovery: Add gmc v12_0 ip block Add gmc v12_0 ip block. v2: Squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 04790139c59ab9dc02337c5ee0d878b213fe45c2 Author: Shashank Sharma Date: Mon Apr 29 14:29:47 2024 +0200 drm/amdgpu: fix doorbell regression This patch adds a missed handling of PL domain doorbell while handling VRAM faults. Cc: Christian Koenig Cc: Alex Deucher Fixes: a6ff969fe9cb ("drm/amdgpu: fix visible VRAM handling during faults") Reviewed-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 980a0a9452e1a74cb1384378989d0c5237ad8cd2 Author: Hawking Zhang Date: Wed Mar 8 22:56:43 2023 +0800 drm/amdgpu: support gfx v12 specific pte/pde fields Add gfx v12 pte/pde support to gmc common helper. v2: squash in fixes (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit f3c3dd120723907787e59e0bd610e0ef5b6d1fca Author: Hawking Zhang Date: Tue Mar 14 16:53:28 2023 +0800 drm/amdgpu: Set pte_is_pte flag in gmc v12 gart pte_is_pte is new flag introduced in gmc v12 that needs to be set by default for pte. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 52666d8cc7f9c7810d25d5ef41f1a0b62153f368 Author: Philip Yang Date: Mon Apr 8 09:26:56 2024 -0400 drm/amdkfd: Bump kfd version for contiguous VRAM allocation Bump the kfd ioctl minor version to delcare the contiguous VRAM allocation flag support. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 075b44aa210bd8be1c2c23ba742218fc4fc2bfa8 Author: Hawking Zhang Date: Tue Jul 4 22:03:55 2023 +0800 drm/amdgpu: Add gmc v12_0 ip block support (v7) Add initial support for GMC v12. v1: Add gmc v12_0 ip block support. v2: Switch to gfx.kiq array. v3: Switch to vmhubs_mask. v4: Switch to AMDGPU_MMHUB0(0) and AMDGPU_GFXHUB(0) v5: Rebase (Alex) v6: Squash in fixes for AGP handling, gfxhub init order, vmhub index (Alex) v7: Rebase (Alex) v8: squash in ecc fix (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 2d1d8756565f0dedf6abf2446d0e63ba20f8c80b Author: Hawking Zhang Date: Wed Mar 8 11:00:16 2023 +0800 drm/amdgpu: Add gfx v12 pte/pde format change Add gfx v12 pte/pde format change. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 47677629f64a41490881472c5ea8316be5633017 Author: Likun Gao Date: Tue Jul 4 21:52:36 2023 +0800 drm/amdgpu: Add gfxhub v12_0 ip block support (v3) Add initial gfxhub v12 support. v1: Add gfxhub v12_0 ip block support (Likun) v2: Switch to AMDGPU_GFXHUB(0) (Hawking) v3: Squash in keep default error response mode (Hawking) Signed-off-by: Likun Gao Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 27694eace58fcd9c35c4b458cd6e693b88a95b7a Author: Jack Xiao Date: Mon Apr 29 16:34:42 2024 +0800 drm/amdgpu/mes11: increase waiting time for engine ready mes schq engine require more waiting time for engine ready before packet submission. Signed-off-by: Jack Xiao Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit a89a05e3ca3e6426b92cd0719410ad255693fac6 Author: Lancelot SIX Date: Wed Apr 10 14:14:13 2024 +0100 drm/amdkfd: Flush the process wq before creating a kfd_process There is a race condition when re-creating a kfd_process for a process. This has been observed when a process under the debugger executes exec(3). In this scenario: - The process executes exec. - This will eventually release the process's mm, which will cause the kfd_process object associated with the process to be freed (kfd_process_free_notifier decrements the reference count to the kfd_process to 0). This causes kfd_process_ref_release to enqueue kfd_process_wq_release to the kfd_process_wq. - The debugger receives the PTRACE_EVENT_EXEC notification, and tries to re-enable AMDGPU traps (KFD_IOC_DBG_TRAP_ENABLE). - When handling this request, KFD tries to re-create a kfd_process. This eventually calls kfd_create_process and kobject_init_and_add. At this point the call to kobject_init_and_add can fail because the old kfd_process.kobj has not been freed yet by kfd_process_wq_release. This patch proposes to avoid this race by making sure to drain kfd_process_wq before creating a new kfd_process object. This way, we know that any cleanup task is done executing when we reach kobject_init_and_add. Signed-off-by: Lancelot SIX Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 17e3bea65cdc453695b2fe4ff26d25d17f5339e9 Author: Jesse Zhang Date: Mon Apr 29 15:26:25 2024 +0800 drm/amd/pm: fix warning using uninitialized value of max_vid_step Check the return of pp_atomfwctrl_get_Voltage_table_v4 as it may fail to initialize max_vid_step V2: change the check condition (Tim Huang) Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit f9d8c5c7855d8f3e4c3e678777d02a49046eafb0 Author: Jack Xiao Date: Thu Apr 25 15:28:48 2024 +0800 drm/amdgpu/gfx: enable mes to map legacy queue support Enable mes to map legacy queue support. v2: kiq_set_resources is required. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d53ce02352058639cacccc88cdbdbf48f1ee3b5a Author: Philip Yang Date: Fri Apr 5 16:02:50 2024 -0400 drm/amdkfd: Evict BO itself for contiguous allocation If the BO pages pinned for RDMA is not contiguous on VRAM, evict it to system memory first to free the VRAM space, then allocate contiguous VRAM space, and then move it from system memory back to VRAM. v6: user context should use interruptible call (Felix) Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 01d6606beca0b7e84ce9d7a8d5cd4a9a850a00d0 Author: Dan Carpenter Date: Sun Apr 28 15:42:44 2024 +0300 drm/amd/display: re-indent dpp401_dscl_program_isharp() Smatch complains because some lines are indented more than they should be. I went a bit crazy re-indenting this. ;) The comments were not useful except as a marker of things which are left to implement so I deleted most of them except for the TODO. I introduced a "data" pointer so that I could replace "scl_data->dscl_prog_data." with just "data->" and shorten the lines a bit. It's more readable without the line breaks. I also tried to align it so you can see what is changing on each line. Signed-off-by: Dan Carpenter Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 86df36b934640866eb249a4488abb148b985a0d9 Author: Tim Huang Date: Fri Apr 26 12:52:45 2024 +0800 drm/amd/pm: fix uninitialized variable warning for smu8_hwmgr Clear warnings that using uninitialized value level when fails to get the value from SMU. Signed-off-by: Tim Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cfec96c16890db08fa5c62b548c652cb37fee93e Author: Jesse Zhang Date: Sun Apr 28 16:26:00 2024 +0800 drm/amd/pm: fix uninitialized variable warning Check the return of function smum_send_msg_to_smc as it may fail to initialize the variable. Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 7c836905520703dbc8b938993b6d4d718bc739f3 Author: Jesse Zhang Date: Sun Apr 28 15:36:26 2024 +0800 drm/amd/pm: fix uninitialized variable warning Check the return of function smum_send_msg_to_smc as it may fail to initialize the variable. Signed-off-by: Jesse Zhang Reviewed-by: Yang Wang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 579f0c21baec9e7506b6bb3f60f0a9b6d07693b4 Author: Ma Jun Date: Fri Apr 26 14:38:04 2024 +0800 drm/amdgpu/pm: Check the return value of smum_send_msg_to_smc Check the return value of smum_send_msg_to_smc, otherwise we might use an uninitialized variable "now" Signed-off-by: Ma Jun Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 3ca73073f46a74dd53c3c1222c2486a593052e72 Author: YiPeng Chai Date: Thu Apr 25 15:53:03 2024 +0800 drm/amdgpu: Remove redundant function call Remove redundant function call. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2c0410fbee4e119ea250032d97239fbac752627e Author: YiPeng Chai Date: Sun Apr 28 11:51:04 2024 +0800 rm/amdgpu: Remove unused code Remove unused code. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ebbc2ada5c636a6a63d8316a3408753768f5aa9f Author: Tim Huang Date: Thu Apr 25 13:15:27 2024 +0800 drm/amdgpu: fix overflowed array index read warning Clear overflowed array index read warning by cast operation. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 22a5daaec0660dd19740c4c6608b78f38760d1e6 Author: Tim Huang Date: Thu Apr 25 11:09:00 2024 +0800 drm/amdgpu: fix potential resource leak warning Clear resource leak warning that when the prepare fails, the allocated amdgpu job object will never be released. Signed-off-by: Tim Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5eccab32c15f1e5cf9651d865fb20012d3563c96 Author: Yang Wang Date: Tue Apr 23 10:14:47 2024 +0800 drm/amdgpu: avoid dump mca bank log muti times during ras ISR because the ue valid mca count will only be cleared after gpu reset, so only dump mca log on the first time to get mca bank after receive RAS interrupt. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 76ad30f51aa0d1bd99f12658d4775a86df6e4282 Author: Yang Wang Date: Thu Apr 18 15:46:00 2024 +0800 drm/amdgpu: add MCA smu cache support v1: because SMU CE valid mca bank will be cleared after reading, this patch adds mca cache at the driver level to ensure that the mca bank is not lost. v2: refine amdgpu_mca_init/fini/reset() function name. v3: add mca_cache.lock support only add CE bank to mca bank cache. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8fb20d9551368f0b1ef5b31fa0b4634f4be37157 Author: Yang Wang Date: Thu Apr 18 13:12:36 2024 +0800 drm/amdgpu: add amdgpu MCA bank dispatch function support - Refine mca driver code. - Centralize mca bank dispatch code logic. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8e9f1575d188f8d8c36b55164a672ad6a7b0ec04 Author: Hawking Zhang Date: Tue Jul 4 21:58:48 2023 +0800 drm/amdgpu: Add mmhub v4_1_0 ip block support (v4) Add initial support for MMHUB 4.1.0. v1: Add mmhub v4_1_0 ip block support. v2: Switch to AMDGPU_MMHUB0(0). v3: squash in fix for ip version check (Alex) v4: squash in vm_contexts_disable fix (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 7005b169da89eeb3ecbd00347e601e63977c0f3c Author: Philip Yang Date: Fri Apr 5 15:56:41 2024 -0400 drm/amdgpu: Evict BOs from same process for contiguous allocation When TTM failed to alloc VRAM, TTM try evict BOs from VRAM to system memory then retry the allocation, this skips the KFD BOs from the same process because KFD require all BOs are resident for user queues. If TTM with TTM_PL_FLAG_CONTIGUOUS flag to alloc contiguous VRAM, allow TTM evict KFD BOs from the same process, this will evict the user queues first, and restore the queues later after contiguous VRAM allocation. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b2dba064c9bdd18c7dd39066d25453af28451dbf Author: Philip Yang Date: Fri Apr 19 16:27:00 2024 -0400 drm/amdgpu: Handle sg size limit for contiguous allocation Define macro AMDGPU_MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so every segment of sg table is limited to size 2GB maximum. For contiguous VRAM allocation, don't limit the max buddy block size in order to get contiguous VRAM memory. To workaround the sg table segment size limit, allocate multiple segments if contiguous size is bigger than AMDGPU_MAX_SG_SEGMENT_SIZE. Signed-off-by: Philip Yang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit fbbbf6fb3f7c29c0d18cdb8e6217570cdc97961f Author: Sunil Khatri Date: Fri Apr 26 12:45:14 2024 +0530 drm/amdgpu: add function descripion of new functions Add function description of the new functions added in amd_ip_funcs. new functions added are: a. dump_ip_state b. print_ip_state Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cb696a88fa582e0c236dffefd2fe6b5840f4e742 Author: Aric Cyr Date: Sun Apr 21 20:20:01 2024 -0400 drm/amd/display: 3.2.283 This version brings along following fixes: - Disable seamless boot on 128b/132b encoding - Have cursor and surface updates together - Change ASSR disable sequence to avoid corruption - Fix few IPS problems - Enable Replay for DCN315 - Fix few ODM problems - Fix FEC_READY write timing - Fix few FPO problems - Adjust DML21 gpuvm_enable assignment - Fix divide by 0 error in VM environment - Fix few DCN35 problems - Fix flickering on DCN321 - Fix mst resume problem - Fix multi-disp FAMS problem - Refactor Replay - Update some of the dcn303 parameters - Enable legacy fast update for dcn301 - Add VCO parameter for DCN31 FPU - Fix problems reported by Coverity Acked-by: Wayne Lin Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 35df442d813d9a6c766b116d3799eff4757eb59c Author: Sung Joon Kim Date: Thu Apr 18 16:59:36 2024 -0400 drm/amd/display: Disable seamless boot on 128b/132b encoding [why] preOS will not support display mode programming and link training for UHBR rates. [how] If we detect a sink that's UHBR capable, disable seamless boot Reviewed-by: Anthony Koo Acked-by: Wayne Lin Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2d696cc837eaf5394d79bfd2b0b0483c4778aa83 Author: Swapnil Patel Date: Thu Apr 18 14:30:39 2024 -0400 drm/amd/display: Change ASSR disable sequence [Why] Currently disabling ASSR before stream is disabled causes visible display corruption. [How] Move disable ASSR command to after stream has been disabled. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Signed-off-by: Swapnil Patel Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit afca033f10d346b6be794e468ed614a6fdc68a14 Author: Roman Li Date: Wed Apr 3 12:13:56 2024 -0400 drm/amd/display: Add periodic detection for IPS [Why] HPD interrupt cannot be handled in IPS2 state. So if there's a display topology change while system in IPS2 it can be missed. [How] Implement worker to check each 5 sec in IPS for HPD. Reviewed-by: Hamza Mahfooz Acked-by: Wayne Lin Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5419a2076de1dd9b0b4a191d0dd07de7c4fa7040 Author: Nicholas Kazlauskas Date: Thu Apr 18 09:51:36 2024 -0400 drm/amd/display: Notify idle link detection through shared state [Why] We can hang in IPS2 checking DMCUB_SCRATCH0 for link detection state. [How] Replace the HW access with a check on the shared state bit. This will work the same way as the SCRATCH0 but won't require a wake in the case where link detection isn't required. Reviewed-by: Duncan Ma Acked-by: Wayne Lin Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d2c5cb0c3561d7aaa5d1cbe30ec4dd50c09291be Author: Joan Lee Date: Mon Apr 15 17:47:42 2024 +0800 drm/amd/display: Enable Replay for DCN315 [why & how] Enable Replay for DCN315. Reviewed-by: Robin Chen Acked-by: Wayne Lin Signed-off-by: Joan Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e6a901a00822659181c93c86d8bbc2a17779fddc Author: Wenjing Liu Date: Wed Apr 17 15:23:08 2024 -0400 drm/amd/display: use even ODM slice width for two pixels per container [why] When optc uses two pixel per container, each ODM slice width must be an even number. [how] If ODM slice width is odd number increase it by 1. Reviewed-by: Dillon Varone Acked-by: Wayne Lin Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a8baec4623aedf36d50767627f6eae5ebf07c6fb Author: Ilya Bakoulin Date: Wed Apr 17 14:21:28 2024 -0400 drm/amd/display: Fix FEC_READY write on DP LT [Why/How] We can miss writing FEC_READY in some cases before LT start, which violates DP spec. Remove the condition guarding the DPCD write so that the write happens unconditionally. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 523ee6f4419bbeccbe43399d999f37381b5958c7 Author: Alvin Lee Date: Thu Apr 18 11:53:34 2024 -0400 drm/amd/display: For FPO + Vactive check that all pipes support VA [Description] For FPO + Vactive scenarios we must check that all non-FPO pipes have VACTIVE margin to allow it. The previous check only confirmed that there is at least one pipe that has vactive margin, but this is incorrect as the vactive display could be using two pipes (MPO) where the desktop plane has vactive margin, and the video plane does not. Reviewed-by: Samson Tam Reviewed-by: Chaitanya Dhere Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 05c5ffaac770bbf815def6a18f93d54fcf47cc5b Author: Nevenko Stupar Date: Tue Apr 16 10:29:54 2024 -0400 drm/amd/display: gpuvm handling in DML21 [Why & How] Currently in DML2.1 gpuvm_enable was hardcoded. Use passed info from DC for DML21 to be in sync with what is used in DC. Reviewed-by: Chaitanya Dhere Acked-by: Wayne Lin Signed-off-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 984debc133efa05e62f5aa1a7a1dd8ca0ef041f4 Author: Alvin Lee Date: Tue Apr 16 14:42:18 2024 -0400 drm/amd/display: Assign linear_pitch_alignment even for VM [Description] Assign linear_pitch_alignment so we don't cause a divide by 0 error in VM environments Reviewed-by: Sohaib Nadeem Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f9c7818c9d653e40dbd3c7e9c857e5b00dfca622 Author: Revalla Hari Krishna Date: Thu Apr 18 18:16:40 2024 +0530 drm/amd/display: Refactor HUBBUB into component folder [why] cleaning up the code refactor requires hubbub to be in its own component. [how] Move all files under newly created hubbub folder and fix the makefiles. Reviewed-by: Martin Leung Acked-by: Wayne Lin Signed-off-by: Revalla Hari Krishna Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3351c608f373bc76dcfa773723c2d1f7c5b5c55e Author: Alvin Lee Date: Wed Apr 17 18:44:16 2024 -0400 drm/amd/display: Only program P-State force if pipe config changed [Description] Today for MED update type we do not call update clocks. However, for FPO the assumption is that update clocks should be called to disable P-State switch before any HW programming since FPO in FW and driver are not synchronized. This causes an issue where on a MED update, an FPO P-State switch could be taking place, then driver forces P-State disallow in the below code and prevents FPO from completing the sequence. In this case we add a check to avoid re-programming (and thus re-setting) the P-State force register by only reprogramming if the pipe was not previously Subvp or FPO. The assumption is that the P-State force register should be programmed correctly the first time SubVP / FPO was enabled, so there's no need to update / reset it if the pipe config has never exited SubVP / FPO. Reviewed-by: Samson Tam Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 532a0d2ad2920bc18e73566a112feccfd55ff4de Author: Webb Chen Date: Tue Feb 27 10:01:25 2024 +0800 drm/amd/display: Revert "dc: Keep VBios pixel rate div setting util next mode set" This reverts commit 4d4d3ff16db2 ("drm/amd/display: Keep VBios pixel rate div setting util next mode set") which causes issue. Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Webb Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f2303026a5b6327247ba61152d00199b2d1be294 Author: Daniel Miess Date: Wed Apr 24 16:49:13 2024 +0800 drm/amd/display: Enable RCO for PHYSYMCLK in DCN35 [Why & How] Enable root clock optimization for PHYSYMCLK and only disable it when it's actively being used v2: Fix array-index-out-of-bounds in dcn35_calc_blocks_to_gate Reviewed-by: Roman Li Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 47745acc5e8dd9b92dc877d3436801106c5e6864 Author: Nicholas Kazlauskas Date: Tue Apr 16 11:24:05 2024 -0400 drm/amd/display: Add trigger FIFO resync path for DCN35 [Why] FIFO error can occur if we don't trigger a DISPCLK change after touching K1/K2 dividers. For 4k144 eDP + hotplug of USB-C DP display we see FIFO underflow. [How] We have the path to trigger the resync as the workaround in DCN314/DCN32, it just needs to be ported over to DCN35. Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ba971b25316b7e3a11b63b770a3a48bf3b69904 Author: Roman Li Date: Fri Apr 12 14:34:30 2024 -0400 drm/amd/display: Re-enable IPS2 for static screen [Why] IPS stability was fixed in bios. [How] Set disable_ips init flag to DMUB_IPS_ENABLE. Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3d1967ec9b990219c960b6da107231bf101e2255 Author: Wenjing Liu Date: Fri Apr 12 15:58:05 2024 -0400 drm/amd/display: take ODM slice count into account when deciding DSC slice [why] DSC slice must be divisible by ODM slice count. [how] If DSC slice count is not a multiple of ODM slice count, increase DSC slice until it is. Otherwise fail to compute DSC configuration. Reviewed-by: Chaitanya Dhere Acked-by: Wayne Lin Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6aa96aa8ffbed1efab4c6f3b0d6106e6bbadfc68 Author: Leo Ma Date: Thu Apr 11 17:17:04 2024 -0400 drm/amd/display: Fix DC mode screen flickering on DCN321 [Why && How] Screen flickering saw on 4K@60 eDP with high refresh rate external monitor when booting up in DC mode. DC Mode Capping is disabled which caused wrong UCLK being used. Reviewed-by: Alvin Lee Acked-by: Wayne Lin Signed-off-by: Leo Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 202dc359addab29451d3d18243c3d957da5392c8 Author: Wayne Lin Date: Mon Apr 15 14:04:00 2024 +0800 drm/amd/display: Defer handling mst up request in resume [Why] Like commit ec5fa9fcdeca ("drm/amd/display: Adjust the MST resume flow"), we want to avoid handling mst topology changes before restoring the old state. If we enable DP_UP_REQ_EN before calling drm_atomic_helper_resume(), have changce to handle CSN event first and fire hotplug event before restoring the cached state. [How] Disable mst branch sending up request event before we restoring the cached state. DP_UP_REQ_EN will be set later when we call drm_dp_mst_topology_mgr_resume(). Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Hersen Wu Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ae308e93db35e8e7652d3ff1696adfc240bc1749 Author: Iswara Nagulendran Date: Thu Apr 11 14:39:50 2024 -0400 drm/amd/display: Restrict multi-disp support for in-game FAMS [HOW&WHY] In multi-monitor cases the VBLANK stretch that is required to align both monitors may be so large that it may create issues for gaming performance. Use debug value to restrict in-game FAMS support for multi-disp use case. Reviewed-by: Harry Vanzylldejong Acked-by: Wayne Lin Signed-off-by: Iswara Nagulendran Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 69925c00368887676c64eaf7f80e0d268a163cc1 Author: Dennis Chan Date: Tue Apr 9 14:25:39 2024 +0800 drm/amd/display: Refactor for Replay Link off frame count [why] To refine for link off frame count in diagnose tool, the driver show the link off frame count number instead of showing link off frame count level. Reviewed-by: ChunTao Tso Reviewed-by: Robin Chen Acked-by: Wayne Lin Signed-off-by: Dennis Chan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 02fb803db110dbdac9f0d446180f0f7b545e15ff Author: Rodrigo Siqueira Date: Thu Apr 18 17:39:39 2024 -0600 drm/amd/display: Handle the case which quad_part is equal 0 Add code to handle case when quad_part is 0 in gpu_addr_to_uma(). Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 97da9c7d8f3516cbc633b6a017ca616997f16edb Author: Rodrigo Siqueira Date: Thu Apr 18 16:11:41 2024 -0600 drm/amd/display: Add log_color_state callback to multiple DCNs Set up to enable log color state for multiple DCNs. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 90a7f0ddfece79d360fc7a5334dea250372a61d5 Author: Rodrigo Siqueira Date: Thu Apr 18 16:07:55 2024 -0600 drm/amd/display: Remove legacy code in DC This commit just remove some trivial legacy code in some of the DC files. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a82a632c1b6cef2cf54fdbde92ea0907873de552 Author: Rodrigo Siqueira Date: Thu Apr 18 16:05:33 2024 -0600 drm/amd/display: Update some of the dcn303 parameters Adjust to update some of the dcn303 parameters. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c5a45ee19cc610e0af7e1affc58b91e4c39a590d Author: Rodrigo Siqueira Date: Thu Apr 18 14:07:01 2024 -0600 drm/amd/display: Enable legacy fast update for dcn301 Set up to enable legacy fast update. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 033656afabaceaec31c99248a2aca88b5ada606f Author: Rodrigo Siqueira Date: Thu Apr 18 14:06:45 2024 -0600 drm/amd/display: Adjust functions prefix for some of the dcn301 fpu functions Add dcn301_fpu prefix to some of the FPU function with the required adjustments. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b9f5fcef7280b76a959291a19dc2bce4085ad5ad Author: Rodrigo Siqueira Date: Thu Apr 18 11:19:03 2024 -0600 drm/amd/display: Add VCO speed parameter for DCN31 FPU Add VCO speed parameters in the bounding box array. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9e9ad05631b6cf7957a981bef324794b4e6fdd44 Author: Wayne Lin Date: Tue Apr 23 09:50:27 2024 +0800 drm/amd/display: Remove unnecessary files [Why & How] We accidentally upstream unnecessary files. Remove them. Reviewed-by: Tom Chung Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f1bf3bc6cb932b2094c71d5b45cf4e56b8450852 Author: Rodrigo Siqueira Date: Thu Apr 18 11:15:11 2024 -0600 drm/amd/display: Adjust codestyle for dcn31 and hdcp_msg This commit just update the code style in two if conditions and in an static array. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6b042da49c45aab31638e22672ac2af91eb6a08d Author: Rodrigo Siqueira Date: Wed Apr 17 11:04:42 2024 -0600 drm/amd/display: Add missing SMU version This commit add PP_SMU_VER_VG to the pp_smu_ver list. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dff0360a49b3dd4d9de4d7719137712b15d33690 Author: Rodrigo Siqueira Date: Wed Apr 17 10:59:56 2024 -0600 drm/amd/display: Improve registers write Add REG_SEQ_SUBMIT and REG_SEQ_WAIT_DONE to optimize the burst write for the regama lut. Acked-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e582c097d3d1baf5d721ea9c4bad77713c300d43 Author: Harry Wentland Date: Fri Apr 19 14:29:46 2024 -0400 drm/amd/display: Always use legacy way of setting cursor on DCE Some IGT tests fail with the new atomic cursor updates when running on older DCE-based ASICs. To work around these issues keep calling the amdgpu_dm_commit_cursors for each cursor update on DCE, even if those cursor updates coincide with other plane updates. Reviewed-by: Agustin Gutierrez Reviewed-by: Sun peng Li Acked-by: Wayne Lin Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7e0357bef402875425de0296800c34c41842ba82 Author: Yang Wang Date: Thu Apr 18 12:07:27 2024 +0800 drm/amdgpu: remove unused MCA driver codes - remove unused callback functions. - make part of mca functions static and refine the function order. Signed-off-by: Yang Wang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 66eba12a5482b79ed8cc45ae6f370b117b8e0507 Author: Harry Wentland Date: Fri Mar 15 13:02:00 2024 -0400 drm/amd/display: Do cursor programming with rest of pipe Cursors are always programmed independently of updates on other planes. When atomic commits program cursor and surface updates together the cursor update might be locked out by the surface update and not take effect. To combat this program cursor and surface updates together via dc_update_planes_and_stream to ensure they can be applied atomically. When cursor updates come on their own use the old method to program the cursor as dc_update_planes_and_stream isn't handling this case correctly (yet), leading to a flickering screen. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2186 Reviewed-by: Agustin Gutierrez Acked-by: Wayne Lin Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3a99045c56d0b98f91d092044b04a2321b5e2f8f Author: Hawking Zhang Date: Tue Dec 19 19:07:28 2023 +0800 drm/amdgpu: Add mmhub v4_1_0 ip headers (v4) v1: Add mmhub v4_1_0 register offset and shift masks header files. (Hawking) v2: Update mmhub v4_1_0 register offset and shift masks header files to RE2. (Likun) v3: Update mmhub v4_1_0 register offset and shift masks header files to RE2.5 (Likun) v4: Clean up mmhub v4_1_0 ip headers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Likun Gao Reviewed-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 84d3c6b05c8cf4e015ba7b79201783ea6f3e39e2 Author: Aric Cyr Date: Sun Apr 14 14:28:32 2024 -0400 drm/amd/display: 3.2.282 Summary: * Changes across DSC, MST, DMCUB, Panel Replay and misc fixes. * Fixes to cursor programming sequence * Add some missing register defs * Formatting/Sytle fixes Acked-by: Aurabindo Pillai Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b0ce597bbf223cfe07524b86eba4f9a057aa1ac6 Author: Anthony Koo Date: Sat Apr 13 23:50:03 2024 -0400 drm/amd/display: [FW Promotion] Release 0.0.214.0 - Adjust the dmub_fw_boot_options reserved bits to be correct Acked-by: Aurabindo Pillai Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d22c0756768f30025061803ecb64597c4b9847f3 Author: Likun Gao Date: Thu Mar 9 14:35:58 2023 +0800 drm/amdgpu/discovery: Add common soc24 ip block Add common soc24 ip block. v2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e76207bfa072f66e72cb483f4ceeba0f45dbe229 Author: Rodrigo Siqueira Date: Fri Apr 12 12:09:45 2024 -0600 drm/amd/display: Replace uint8_t with u8 for dp_hdmi_dongle_signature_str The string dp_hdmi_dongle_signature_str already uses u8 but the string dp_hdmi_dongle_signature_str does not. Just replace uint8_t with u8 for dp_hdmi_dongle_signature_str. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ff518e13eb5b7efd4740bcb4a25ea1fdfb76be90 Author: Jack Xiao Date: Thu Apr 25 15:31:31 2024 +0800 drm/amdgpu/mes11: adjust mes initialization sequence Adjust mes queue initialization before kgq/kcq initialization to enable mes mapping legacy queue. Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 486eb6b5a86cf2d935d27937b3da840e17a2f8b1 Author: Jack Xiao Date: Fri Mar 1 19:02:22 2024 +0800 drm/amdgpu/mes11: add mes mapping legacy queue support Add mes11 map legacy queue packet submission. Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 337b0a3d494151dc32dde1e0cbbf6fb216009ecc Author: Sung Joon Kim Date: Fri Apr 12 11:19:50 2024 -0400 drm/amd/display: Update dcn351 debug flags and function pointers [why & how] There are potential issues with Z8 and IPS that need to be addressed and need to add in missing function pointers. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ffda7081489b2c14650798b3b46fb76292f163a3 Author: Christian König Date: Thu Mar 21 11:32:02 2024 +0100 drm/amdgpu: once more fix the call oder in amdgpu_ttm_move() v2 This reverts drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap. The basic problem here is that after the move the old location is simply not available any more. Some fixes were suggested, but essentially we should call the move notification before actually moving things because only this way we have the correct order for DMA-buf and VM move notifications as well. Also rework the statistic handling so that we don't update the eviction counter before the move. v2: add missing NULL check Signed-off-by: Christian König Fixes: 94aeb4117343 ("drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3171 Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher CC: stable@vger.kernel.org commit 4d4d3ff16db2642ade8b2fd64cb1abd65bddcf49 Author: Webb Chen Date: Tue Feb 27 10:01:25 2024 +0800 drm/amd/display: Keep VBios pixel rate div setting util next mode set [why] VBios & Driver may have differnet pixel rate div policy. If the policy is not same and fast boot is enabled, it would cause the pixel rate is too high after driver only performs stream blank & unblank. [how] We would keep pixel rate div setting by VBios until next mode set. Reviewed-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Webb Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a8ac994cf0693a1ce59410995594e56124a1c79f Author: Cruise Date: Fri Apr 12 09:51:29 2024 +0800 drm/amd/display: Disable error correction if it's not supported [Why] Error correction was enabled in a monitor which doesn't support. [How] Disable error correction if it's not supported Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Cruise Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2862b1637ea2bdaaf13d9b5e3635c096297a0f1d Author: Sung Joon Kim Date: Thu Apr 11 15:28:08 2024 -0400 drm/amd/display: Fix recout calculation for stereo side-by-side [why & how] The recout x offset was incorrect which led to wrong viewport calculation. For stereo side-by-side case, the slice index should be 0 for both split pipes. Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e7f5f9d6222ec9264b160b622544cd7e1091e4b4 Author: Harry Wentland Date: Thu Apr 4 11:54:40 2024 -0400 drm/amd/display: Set cursor attributes before position HWSS set_cursor_attributes copies the stream's cursor attributes to the hubp cursor attributes. set_cursor_position might attempt to program the cursor attributes but will program them wrong if they're not set correctly. We need to call HWSS set_cursor_attributes first to ensure hubp has the right attributes to be programmed. Reviewed-by: Agustin Gutierrez Acked-by: Aurabindo Pillai Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f63f86b5affcc2abd1162f11824b9386fc06ac94 Author: Harry Wentland Date: Fri Mar 15 11:19:15 2024 -0400 drm/amd/display: Separate setting and programming of cursor We're seeing issues when user-space tries to do an atomic update of the primary surface, as well as the cursor. These two updates are separate calls into DC and don't currently act as an atomic update. This might lead to cursor updates being locked out and cursors stuttering. In order to solve this problem we want to separate the setting and programming of cursor attributes and position. That's what we're doing in this patch. The subsequent patch will then be able to use the cursor setters in independent cursor updates, as well as in atomic commits. Reviewed-by: Agustin Gutierrez Acked-by: Aurabindo Pillai Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0c9c0674f81add3edb2bb992b3e89be8a44f03db Author: Joshua Aberback Date: Wed Apr 10 16:25:41 2024 -0400 Revert "drm/amd/display: Fix incorrect pointer assignment" This reverts commit 0a571e8657c40047e6602466abfcb6514a391041. [Why] The change being reverted incorrectly assumes that a pointer type was intended, however copying to a new structure is correct. As well, there is no compiler error, it was instead an error in the testing framework being used. Reviewed-by: Chaitanya Dhere Acked-by: Aurabindo Pillai Signed-off-by: Joshua Aberback Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dacb68ca947921e8ce533231d21cb50a3c878179 Author: Ilya Bakoulin Date: Tue Apr 9 14:04:19 2024 -0400 drm/amd/display: Add condition for dp_set_dsc_config call Not every ASIC implements dp_set_dsc_config. Add condition to prevent calls to unimplemented function. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 771c75ad0bd2bad9bff45cb4b26618f4358fc72b Author: Meenakshikumar Somasundaram Date: Wed Apr 10 10:46:35 2024 -0400 drm/amd/display: Allocate zero bw after bw alloc enable [Why] During DP tunnel creation, CM preallocates BW and reduces estimated BW of other DPIA. CM release preallocation only when allocation is complete. Display mode validation logic validates timings based on bw available per host router. In multi display setup, this causes bw allocation failure when allocation greater than estimated bw. [How] Do zero alloc to make the CM to release preallocation and update estimated BW correctly for all DPIAs per host router. Reviewed-by: PeiChen Huang Acked-by: Aurabindo Pillai Signed-off-by: Meenakshikumar Somasundaram Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 81f3d3c9a03705328f5368d19e23796ed077610a Author: Hersen Wu Date: Tue Feb 13 14:26:06 2024 -0500 drm/amd/display: Fix incorrect DSC instance for MST [Why] DSC debugfs, such as dp_dsc_clock_en_read, use aconnector->dc_link to find pipe_ctx for display. Displays connected to MST hub share the same dc_link. DSC instance is from pipe_ctx. This causes incorrect DSC instance for display connected to MST hub. [How] Add aconnector->sink check to find pipe_ctx. CC: stable@vger.kernel.org Reviewed-by: Aurabindo Pillai Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 98b912c50e449b921d71456312289229c4a5661c Author: Hawking Zhang Date: Tue Jul 4 21:46:50 2023 +0800 drm/amdgpu: Add soc24 common ip block (v2) Add initial soc24 support. v1: Add soc24 common ip block. v2: Switch to new select_se_sh/enter_safe_mode interface. v3: squash in correct ext rev id, etc. (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit ef4af63e1009a5215f970203fd87bd16122f1462 Author: Nicholas Kazlauskas Date: Mon Apr 8 10:45:04 2024 -0400 drm/amd/display: Force flush after write to IPS driver signals [Why] It's possible that the write hasn't fully completed by the time we send (and flush) a command to DMCUB to notify idle to request IPS2 exit. [How] Perform a readback of the volatile structure into dc_dmub_srv state. Reviewed-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dc2be9c68ffb2d2b960e6b1835327438b929b814 Author: Ethan Bitnun Date: Wed Apr 10 17:16:35 2024 -0400 drm/amd/display: Block FPO According to Luminance Delta [Description] - Block FPO if the max stretch refresh rate is low enough to cause a flicker by storing the maximum safe refresh decrease from nominal in stream. - Brought over various Freesync Luminance functions to dc. Use these new functions to block fpo if we will flicker. - Generalized increase/reduce dependent functions to reduce code clutter and allow for easier use. - Added a debug option to enable the feature. Disabled by default. Co-authored-by: Ethan Bitnun Reviewed-by: Dillon Varone Acked-by: Aurabindo Pillai Signed-off-by: Ethan Bitnun Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ec426766a45201f14f8ac974855a9a47a39286ab Author: Hawking Zhang Date: Wed Mar 8 20:48:00 2023 +0800 drm/amdgpu: Add soc24 chip enum definitions (v4) Add enum definitions for soc24. v2: Updates (Alex) v3: Updates (Alex) v4: Fix clash with display code (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit db4f0d544edf941941a96a2dd92ef65a418b6b73 Author: Hawking Zhang Date: Tue Jul 4 22:43:43 2023 +0800 drm/amdgpu: Add gc v12_0_0 ip headers (v4) v1: Add gc v12_0_0 register offset and shift masks header files. (Hawking) v2: Update gc v12_0_0 register offset and shift masks header files to LSD version. (Likun) v3: Update gc v12_0_0 register offset and shift masks header files to RE3 version. (Likun) v4: Updates (Alex) v5: updates (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit b01d98caba5dabf94721ff1c807ce2470bd1354c Author: George Shen Date: Mon Mar 18 20:31:26 2024 -0400 drm/amd/display: Skip SST ACT polling when sink_count is 0 [Why] Upon disconnecting a UHBR SST display, the disconnection and the SetTimings to disable the display can occur such that link_set_dpms_off occurs after the disconnection has already processed (link->type is dc_connection_none). Thus, the AUX related operations should be skipped when clearing the payload allocation table. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8acb83689258a606a43940191156ed1b24733a94 Author: Gabe Teeger Date: Tue Apr 9 10:38:58 2024 -0400 drm/amd/display: Atom Integrated System Info v2_2 for DCN35 New request from KMD/VBIOS in order to support new UMA carveout model. This fixes a null dereference from accessing Ctx->dc_bios->integrated_info while it was NULL. DAL parses through the BIOS and extracts the necessary integrated_info but was missing a case for the new BIOS version 2.3. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Gabe Teeger Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 10839ee6a977ed1f7d0f4deb29f2d7e5d1f2a9dd Author: Michael Strauss Date: Tue Apr 9 12:00:34 2024 -0400 drm/amd/display: Add delay to improve LTTPR UHBR interop [WHY] Avoid race condition which puts LTTPR into bad state during UHBR LT. [HOW] Delay 30ms between starting UHBR TPS1 PHY output and sending TPS1 via DPCD. Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 239b31bd5c3fef3698440bf6436b2068c6bb08a3 Author: Sung-huai Wang Date: Wed Apr 10 14:40:32 2024 +0800 drm/amd/display: Handle HPD_IRQ for internal link [Why] TCON data is corrupted after electro static discharge test. Once the TCON data get corrupted, they will get themselves reset and send HPD_IRQ to source side. [How] Support HPD_IRQ for internal link, and restore the PSR/Replay setup. Reviewed-by: Robin Chen Acked-by: Aurabindo Pillai Signed-off-by: Sung-huai Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d0f2181d6529d94b7df15c3afb266ac3fb51188e Author: Sung Joon Kim Date: Mon Apr 8 10:11:57 2024 -0400 drm/amd/display: Reuse the modified power sequence [why & how] Need to update the function pointers that perform the power up and down sequence to reuse the modified sequence as a requirement. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c83ad4c3f943f1e3354cd52e69bfafae6bc660e1 Author: Swapnil Patel Date: Tue Apr 2 21:07:46 2024 -0400 drm/amd/display: Add dtbclk access to dcn315 [Why & How] Currently DCN315 clk manager is missing code to enable/disable dtbclk. Because of this, "optimized_required" flag is constantly set and this prevents FreeSync from engaging for certain high bandwidth display Modes which require DTBCLK. Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Swapnil Patel Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 899d92fd26fe780aad711322aa671f68058207a6 Author: Natanel Roizenman Date: Wed Apr 3 16:52:48 2024 -0400 drm/amd/display: Add null check in resource_log_pipe_topology_update [WHY] When switching from "Extend" to "Second Display Only" we sometimes call resource_get_otg_master_for_stream on a stream for the eDP, which is disconnected. This leads to a null pointer dereference. [HOW] Added a null check in dc_resource.c/resource_log_pipe_topology_update. CC: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Natanel Roizenman Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cbc7d7d4469faa490ff535fbcc6fa9f5a97788fe Author: Dennis Chan Date: Tue Apr 2 10:58:01 2024 +0800 drm/amd/display: Fix Replay Desync Error Test When PHY power off, the DP_SEC_CNTL cannot be configured and cause disable Adaptive sync SDP failed. Regarding the issue, the driver will disabled AS-SDP in replay state machine. Reviewed-by: ChunTao Tso Acked-by: Aurabindo Pillai Signed-off-by: Dennis Chan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a4a755c422242c27cb0f7900ac00cf33ac17b1ce Author: Rodrigo Siqueira Date: Mon Apr 8 08:27:36 2024 -0600 drm/amd/display: Drop unnecessary semicolon Drop unnecessary semicolon that can create a problem of double semicolon in some compilers. Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c1d35284e68482fc74beb92e57813e8eb0701813 Author: Rodrigo Siqueira Date: Thu Apr 11 17:53:07 2024 -0600 drm/amd/display: Add missing IRQ types This commit add some DPCX IRQ types. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2b6c4a4b7ae5a4dc80138a2e7c0419417088e164 Author: Rodrigo Siqueira Date: Thu Apr 11 17:38:08 2024 -0600 drm/amd/display: Ensure that dmcub support flag is set for DCN20 In the DCN20 resource initialization, ensure that DMCUB support starts configured as true. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4754cbc77e2a8e4a2681c1911147456b8efa0bdb Author: Rodrigo Siqueira Date: Wed Apr 10 13:01:12 2024 -0600 drm/amd/display: Update comments in DC This commit adds, updates, and removes some of the comments used in the DC code. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 155ce502e9adf9001d6fa35ca85843b7f0e538c7 Author: Philip Yang Date: Fri Apr 5 15:46:50 2024 -0400 drm/amdgpu: Support contiguous VRAM allocation RDMA device with limited scatter-gather ability requires contiguous VRAM buffer allocation for RDMA peer direct support. Add a new KFD alloc memory flag and store as bo alloc flag AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS. When pin this bo to export for RDMA peerdirect access, this will set TTM_PL_FLAG_CONTIFUOUS flag, and ask VRAM buddy allocator to get contiguous VRAM. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c0d6bd3cd209419cc46ac49562bef1db65d90e70 Author: Ma Jun Date: Wed Apr 24 10:50:54 2024 +0800 drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr Assign value to clock to fix the warning below: "Using uninitialized value res. Field res.clock is uninitialized" Signed-off-by: Ma Jun Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e29a7a34c3cf140ceb2f994a8eae0b68d21e357e Author: Nirmoy Das Date: Mon Apr 29 22:30:39 2024 +0200 drm/xe: Remove uninitialized end var from xe_gt_tlb_invalidation_range() This fixes commit c4f18703629d ("drm/xe: Add xe_gt_tlb_invalidation_range and convert PT layer to use this") which added the end variable as part of the function param. v2: Add fixes tag(Matt) Fixes: c4f18703629d ("drm/xe: Add xe_gt_tlb_invalidation_range and convert PT layer to use this") Cc: Matthew Brost Signed-off-by: Nirmoy Das Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240429203039.26918-1-nirmoy.das@intel.com Signed-off-by: Lucas De Marchi commit 4cfca03f76413db115c3cc18f4370debb1b81b2b Author: Andi Shyti Date: Fri Apr 26 02:07:23 2024 +0200 drm/i915/gt: Automate CCS Mode setting during engine resets We missed setting the CCS mode during resume and engine resets. Create a workaround to be added in the engine's workaround list. This workaround sets the XEHP_CCS_MODE value at every reset. The issue can be reproduced by running: $ clpeak --kernel-latency Without resetting the CCS mode, we encounter a fence timeout: Fence expiration time out i915-0000:03:00.0:clpeak[2387]:2! Fixes: 2bebae0112b1 ("drm/i915/gt: Enable only one CCS for compute workload") Reported-by: Gnattu OC Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10895 Signed-off-by: Andi Shyti Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Matt Roper Cc: # v6.2+ Tested-by: Gnattu OC Reviewed-by: Rodrigo Vivi Tested-by: Krzysztof Gibala Link: https://patchwork.freedesktop.org/patch/msgid/20240426000723.229296-1-andi.shyti@linux.intel.com commit 4caf410766add8cf376a3afc910b17dd0961dd75 Author: Lucas De Marchi Date: Sat Apr 27 06:53:39 2024 -0700 drm/xe: Merge 16021540221 and 18034896535 WAs In order to detect duplicate implementations for the same workaround, early in the implementation of RTP it was decided to error out even if the values set are exactly the same. With the introduction of 18034896535 in commit 74671d23ca18 ("drm/xe/xe2: Add workaround 18034896535"), LNL stepping with graphics stepping A1 now gives the following error on module load: xe 0000:00:02.0: [drm] *ERROR* GT0: [GT OTHER] \ discarding save-restore reg e48c (clear: 00000200, set: 00000200,\ masked: yes, mcr: yes): ret=-22 RTP may be improved in the future, but for now simply join the entries like done with e.g. "1607297627, 1607030317, 1607186500". Fixes: 74671d23ca18 ("drm/xe/xe2: Add workaround 18034896535") Cc: Bommu Krishnaiah Cc: Tejas Upadhyay Cc: Matt Roper Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240427135339.3485559-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit bb442bfb9b3d1bc6ebd9fc64fa566e12d64627ce Author: Shekhar Chauhan Date: Wed Apr 24 09:12:47 2024 +0530 drm/xe/xe2hpg: Add Wa_14021490052 Add Wa_14021490052 for Xe2HPG 20.01. Signed-off-by: Shekhar Chauhan Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20240424034247.1352755-1-shekhar.chauhan@intel.com Signed-off-by: Lucas De Marchi commit 75b68f22e39aafb22f3d8e3071e1aba73560788c Author: Abhinav Kumar Date: Mon Apr 1 13:48:58 2024 -0700 drm: ci: fix the xfails for apq8016 After IGT migrating to dynamic sub-tests, the pipe prefixes in the expected fails list are incorrect. Lets drop those to accurately match the expected fails. In addition, update the xfails list to match the current passing list. This should have ideally failed in the CI run because some tests were marked as fail even though they passed but due to the mismatch in test names, the matching didn't correctly work and was resulting in those failures not being seen. Here is the passing pipeline for apq8016 with this change: https://gitlab.freedesktop.org/drm/msm/-/jobs/57050562 Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Acked-by: Helen Koike Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20240401204859.24223-1-quic_abhinavk@quicinc.com commit 2940ee03b23281071620dda1d790cd644dabd394 Author: Luca Ceresoli Date: Fri Apr 26 14:22:59 2024 +0200 Revert "drm/bridge: ti-sn65dsi83: Fix enable error path" This reverts commit 8a91b29f1f50ce7742cdbe5cf11d17f128511f3f. The regulator_disable() added by the original commit solves one kind of regulator imbalance but adds another one as it allows the regulator to be disabled one more time than it is enabled in the following scenario: 1. Start video pipeline -> sn65dsi83_atomic_pre_enable -> regulator_enable 2. PLL lock fails -> regulator_disable 3. Stop video pipeline -> sn65dsi83_atomic_disable -> regulator_disable The reason is clear from the code flow, which looks like this (after removing unrelated code): static void sn65dsi83_atomic_pre_enable() { regulator_enable(ctx->vcc); if (PLL failed locking) { regulator_disable(ctx->vcc); <---- added by patch being reverted return; } } static void sn65dsi83_atomic_disable() { regulator_disable(ctx->vcc); } The use case for introducing the additional regulator_disable() was removing the module for debugging (see link below for the discussion). If the module is removed after a .atomic_pre_enable, i.e. with an active pipeline from the DRM point of view, .atomic_disable is not called and thus the regulator would not be disabled. According to the discussion however there is no actual use case for removing the module with an active pipeline, except for debugging/development. On the other hand, the occurrence of a PLL lock failure is possible due to any physical reason (e.g. a temporary hardware failure for electrical reasons) so handling it gracefully should be supported. As there is no way for .atomic[_pre]_enable to report an error to the core, the only clean way to support it is calling regulator_disabled() only in .atomic_disable, unconditionally, as it was before. Link: https://lore.kernel.org/all/15244220.uLZWGnKmhe@steina-w/ Fixes: 8a91b29f1f50 ("drm/bridge: ti-sn65dsi83: Fix enable error path") Reviewed-by: Alexander Stein Signed-off-by: Luca Ceresoli Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240426122259.46808-1-luca.ceresoli@bootlin.com commit c72211751870ffa2cff5d91834059456cfa7cbd5 Author: Anatoliy Klymenko Date: Fri Apr 26 12:27:57 2024 -0700 drm: xlnx: zynqmp_dpsub: Fix compilation error Fix W=1 clang 19 compilation error in zynqmp_disp_layer_drm_formats(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404260946.4oZXvHD2-lkp@intel.com/ Signed-off-by: Anatoliy Klymenko Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240426-dp-live-fmt-fix-v3-2-e904b5ae51d7@amd.com commit 87f36e03c0f1d69245ad295309418e982c88fbe7 Author: Anatoliy Klymenko Date: Fri Apr 26 12:27:56 2024 -0700 drm: xlnx: zynqmp_dpsub: Fix few function comments Fix arguments description for zynqmp_disp_layer_find_live_format() and zynqmp_disp_layer_set_live_format(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404260616.KFGDpCDN-lkp@intel.com/ Signed-off-by: Anatoliy Klymenko Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240426-dp-live-fmt-fix-v3-1-e904b5ae51d7@amd.com commit aa463cc850c464091cb749317372b70415d3e7d9 Author: Nathan Chancellor Date: Wed Apr 24 11:19:27 2024 -0700 drm/amd/display: Fix CFLAGS for dml2_core_dcn4_calcs.o -Wframe-larger-than=2048 is a part of both CFLAGS and CFLAGS_REMOVE for dml2_core_dcn4_calcs.o, which means that it ultimately gets removed altogether for 64-bit targets, as 2048 is the default FRAME_WARN value for 64-bit platforms, resulting in no -Wframe-larger-than coverage for this file. Remove -Wframe-larger-than from CFLAGS_REMOVE_dml2_core_dcn4_calcs.o and move to $(frame_warn_flag) for CFLAGS_dml2_core_dcn4_calcs.o, as that accounts for the fact that -Wframe-larger-than may need to be larger than 2048 in certain situations, such as when the sanitizers are enabled. Fixes: 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401") Signed-off-by: Nathan Chancellor Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9f4c6256d0cf887ef64fe87a48a34d50b4bde493 Author: Nathan Chancellor Date: Wed Apr 24 11:19:26 2024 -0700 drm/amd/display: Add frame_warn_flag to dml2_core_shared.o When building with tip of tree Clang, there are some new instances of -Wframe-larger-than from the new display code (which become fatal with CONFIG_WERROR=y): drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:754:6: error: stack frame size (2488) exceeds limit (2048) in 'dml2_core_shared_mode_support' [-Werror,-Wframe-larger-than] 754 | bool dml2_core_shared_mode_support(struct dml2_core_calcs_mode_support_ex *in_out_params) | ^ drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c:9834:6: error: stack frame size (2152) exceeds limit (2048) in 'dml2_core_shared_mode_programming' [-Werror,-Wframe-larger-than] 9834 | bool dml2_core_shared_mode_programming(struct dml2_core_calcs_mode_programming_ex *in_out_params) | ^ 2 errors generated. These warnings do not occur when CONFIG_K{A,C,M}SAN are disabled, so add $(frame_warn_flag) to dml2_core_shared.o's CFLAGS, which was added in commit 6740ec97bcdb ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2") to account for this situation. Fixes: 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401") Signed-off-by: Nathan Chancellor Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 0c28ba60f4c2abfa9424251ab4ace273f1d0b15a Author: Srinivasan Shanmugam Date: Tue Apr 23 07:27:36 2024 +0530 drm/amd/display: Address kdoc for 'Enable CRTC' in optc401_enable_crtc This commit fixes the kdoc for 'Enable CRTC' in `optc401_enable_crtc` function. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/optc/dcn401/dcn401_optc.c:177: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Enable CRTC Fixes: 70839da63605 ("drm/amd/display: Add new DCN401 sources") Cc: Rodrigo Siqueira Cc: Roman Li Cc: Qingqing Zhuo Cc: Aurabindo Pillai Cc: Tom Chung Signed-off-by: Srinivasan Shanmugam Reviewed-by: Tom Chung Signed-off-by: Alex Deucher commit 00c391102abc13763e2bfc90e05503109b19f074 Author: Aurabindo Pillai Date: Wed Mar 20 13:56:16 2024 -0400 drm/amd/display: Add misc DC changes for DCN401 Add miscellaneous changes to enable DCN401 init Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit da87132f641ed33fb65e2638d0545f55c863c5b3 Author: Aurabindo Pillai Date: Wed Mar 20 13:47:50 2024 -0400 drm/amd/display: Add some DCN401 reg name to macro definitions Update macros to cover DCN 4.0.1. Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 08502cebee7c54d58fee0a54a98064dade4cc4de Author: Aurabindo Pillai Date: Wed Mar 20 13:11:15 2024 -0400 drm/amd/display: Add DCN401 dependant changes for DMCUB Update for DCN 4.0.1. Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a64a521231a4643e2e2db3ea5d40253bf887e615 Author: Aurabindo Pillai Date: Fri Feb 2 13:53:16 2024 -0500 drm/amd/display: Add gfx12 modifiers Expose linear modifier definitions for use with DCN401 Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5bdf199db700706cdbd61a0bb8204a900ce9b5cb Author: Aurabindo Pillai Date: Fri Apr 19 13:28:17 2024 -0400 drm/amd/display: Fix SPL related enum definition used in DCN401 Remove a duplicate definition of an SPL related enum transform.h Since its used in SPL, it has been moved to its own header. Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 70839da6360500a82e4d5f78499284474cbed7c1 Author: Aurabindo Pillai Date: Fri Apr 19 12:02:53 2024 -0400 drm/amd/display: Add new DCN401 sources Add initial support for DCN 4.0.1. Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 59a0c03a50e7f058e599c313e6a129562147016d Author: Aurabindo Pillai Date: Tue Mar 26 14:41:52 2024 -0400 drm/amd: Add DCN401 related register definitions Update register headers. Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 96557f785a7701c7e0c327bd25b701d0eb5dcee0 Author: Aurabindo Pillai Date: Tue Mar 5 14:38:31 2024 -0500 drm/amd: GFX12 changes for converting tiling flags to modifiers GFX12 swizzle mode and GCC formats changed and is much simpler. Use a seperate function for the same. Changes: * Swizzle mode is now 3 bits only * DCC enablement doesn't come from tiling_flags, it is always set in modifiers * DCC max compressed block size of 128B Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 7d09d80b93ab15c1ff969facb8f6111fb9c084ce Author: Aurabindo Pillai Date: Fri Apr 19 12:17:56 2024 -0400 drm/amd: define new gfx12 uapi flags define new gfx12 uapi flags Signed-off-by: Marek Olšák Signed-off-by: Aurabindo Pillai Acked-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7ceb94e87bffff7c12b61eb29749e1d8ac976896 Author: Aurabindo Pillai Date: Fri Feb 2 14:00:27 2024 -0500 drm/amd: Add gfx12 swizzle mode defs Add GFX12 swizzle mode definitions for use with DCN401 Signed-off-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 98ad158e543426561fa5df5c4387d4368601866f Author: Matthew Brost Date: Wed Apr 24 21:55:13 2024 -0700 drm/xe: Delete PT update selftest IGTs (e.g. xe_vm) can provide the exact same coverage as the PT update selftest. The PT update selftest is dependent on internal functions which can change thus maintaining this test is costly and provide no extra coverage. Delete this test. Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-14-matthew.brost@intel.com commit c4f18703629dd0112641d6974eb295a53c4a4615 Author: Matthew Brost Date: Wed Apr 24 21:55:12 2024 -0700 drm/xe: Add xe_gt_tlb_invalidation_range and convert PT layer to use this xe_gt_tlb_invalidation_range accepts a start and end address rather than a VMA. This will enable multiple VMAs to be invalidated in a single invalidation. Update the PT layer to use this new function. Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-13-matthew.brost@intel.com commit 5aa5eea09af08ad446f78f3de10388c98f52f19c Author: Matthew Brost Date: Wed Apr 24 21:55:11 2024 -0700 drm/xe: Move ufence add to vm_bind_ioctl_ops_fini Rather than adding a ufence to a VMA in the bind function, add the ufence to all VMAs in the IOCTL that require binds in vm_bind_ioctl_ops_fini. This help withs the transition to job 1 per VM bind IOCTL. v2: - Rebase v3: - Fix typo in commit (Oak) Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-12-matthew.brost@intel.com commit fda75ef80bddf2f08b0e597d59da69a3d8eb5be2 Author: Matthew Brost Date: Wed Apr 24 21:55:10 2024 -0700 drm/xe: Move ufence check to op_lock_and_prep Rather than checking for an unsignaled ufence ay unbind time, check for this during the op_lock_and_prep function. This helps with the transition to job 1 per VM bind IOCTL. v2: - Rebase v3: - Fix typo in commit message (Oak) Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-11-matthew.brost@intel.com commit 61e3270ef9610ab40b1b56aa62e2b8471c32f1f7 Author: Matthew Brost Date: Wed Apr 24 21:55:09 2024 -0700 drm/xe: Add vm_bind_ioctl_ops_fini helper Simplify VM bind code by signaling out-fences / destroying VMAs in a single location. Will help with transition single job for many bind ops. v2: - s/vm_bind_ioctl_ops_install_fences/vm_bind_ioctl_ops_fini (Oak) - Set last fence in vm_bind_ioctl_ops_fini (Oak) Cc: Oak Zeng Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-10-matthew.brost@intel.com commit 22cfdd286572decf5225cc219205ca3348cfc4af Author: Matthew Brost Date: Wed Apr 24 21:55:08 2024 -0700 drm/xe: Add some members to xe_vma_ops This will help with moving to single jobs for many bind operations. v2: - Rebase Cc: Oak Zeng Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-9-matthew.brost@intel.com commit bf69918b7199ffa5bb6213f2b0a2c0b1be8f87dd Author: Matthew Brost Date: Wed Apr 24 21:55:07 2024 -0700 drm/xe: Use xe_vma_ops to implement page fault rebinds In effort to make multiple VMA binds operations atomic (1 job), all device page tables updates will be implemented via a xe_vma_ops (atomic unit) interface, Add xe_vma_rebind function which is implemented using xe_vma_ops interface. Use xe_vma_rebind in GPU page faults for rebinds rather than directly called deprecated function in PT layer. v3: - Update commit message (Oak) v4: - Fix tile_mask argument (CI) Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-8-matthew.brost@intel.com commit 4dbbe4579490b4dbc89bf9c79ef3b9f1d94366c3 Author: Matthew Brost Date: Wed Apr 24 21:55:06 2024 -0700 drm/xe: Simplify VM bind IOCTL error handling and cleanup Clean up everything in VM bind IOCTL in 1 path for both errors and non-errors. Also move VM bind IOCTL cleanup from ops (also used by non-IOCTL binds) to the VM bind IOCTL. v2: - Break ops_execute on error (Oak) Cc: Oak Zeng Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-7-matthew.brost@intel.com commit 5f677a9b6537dbfe061ec9ab1c5b34b21e4855a3 Author: Matthew Brost Date: Wed Apr 24 21:55:05 2024 -0700 drm/xe: Use xe_vma_ops to implement xe_vm_rebind All page tables updates are moving to a xe_vma_ops interface to implement 1 job per VM bind IOCTL. Convert xe_vm_rebind to use a xe_vma_ops based interface. Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-6-matthew.brost@intel.com commit 701109f2e3a45b9748f0f98849fde9a35d391efb Author: Matthew Brost Date: Wed Apr 24 21:55:04 2024 -0700 drm/xe: Add struct xe_vma_ops abstraction Having a structure which encapsulates a list of VMA operations will help enable 1 job for the entire list. v2: - Rebase Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-5-matthew.brost@intel.com commit 0a34c12449de4b09f74808c6f6c39205ee5071f0 Author: Matthew Brost Date: Wed Apr 24 21:55:03 2024 -0700 drm/xe: Move migrate to prefetch to op_lock_and_prep function All non-binding operations in VM bind IOCTL should be in the lock and prepare step rather than the execution step. Move prefetch to conform to this pattern. v2: - Rebase - New function names (Oak) - Update stale comment (Oak) Cc: Oak Zeng Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-4-matthew.brost@intel.com commit 75192758d640227b68e4e21de811891219f3d0e2 Author: Matthew Brost Date: Wed Apr 24 21:55:02 2024 -0700 drm/xe: Add ops_execute function which returns a fence Add ops_execute function which returns a fence. This will be helpful to initiate all binds (VM bind IOCTL, rebinds in exec IOCTL, rebinds in preempt rebind worker, and rebinds in pagefaults) via a gpuva ops list. Returning a fence is needed in various paths. v2: - Rebase Cc: Oak Zeng Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-3-matthew.brost@intel.com commit 77f2ef3f16f511c8a8444061d59c8eadc634d33b Author: Matthew Brost Date: Wed Apr 24 21:55:01 2024 -0700 drm/xe: Lock all gpuva ops during VM bind IOCTL Lock all BOs used in gpuva ops and validate all BOs in a single step during the VM bind IOCTL. This help with the transition to making all gpuva ops in a VM bind IOCTL a single atomic job which is required for proper error handling. v2: - Better commit message (Oak) - s/op_lock/op_lock_and_prep, few other renames too (Oak) - Use DRM_EXEC_IGNORE_DUPLICATES flag in drm_exec_init (local testing) - Do not reserve slots in locking step (direction based on series from Thomas) v3: - Validate BO if is immediate set (Oak) Cc: Oak Zeng Signed-off-by: Matthew Brost Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20240425045513.1913039-2-matthew.brost@intel.com commit 61ba791c4a7a09a370c45b70a81b8c7d4cf6b2ae Author: Sean Anderson Date: Fri Mar 8 15:47:41 2024 -0500 drm: zynqmp_dpsub: Always register bridge We must always register the DRM bridge, since zynqmp_dp_hpd_work_func calls drm_bridge_hpd_notify, which in turn expects hpd_mutex to be initialized. We do this before zynqmp_dpsub_drm_init since that calls drm_bridge_attach. This fixes the following lockdep warning: [ 19.217084] ------------[ cut here ]------------ [ 19.227530] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 19.227768] WARNING: CPU: 0 PID: 140 at kernel/locking/mutex.c:582 __mutex_lock+0x4bc/0x550 [ 19.241696] Modules linked in: [ 19.244937] CPU: 0 PID: 140 Comm: kworker/0:4 Not tainted 6.6.20+ #96 [ 19.252046] Hardware name: xlnx,zynqmp (DT) [ 19.256421] Workqueue: events zynqmp_dp_hpd_work_func [ 19.261795] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 19.269104] pc : __mutex_lock+0x4bc/0x550 [ 19.273364] lr : __mutex_lock+0x4bc/0x550 [ 19.277592] sp : ffffffc085c5bbe0 [ 19.281066] x29: ffffffc085c5bbe0 x28: 0000000000000000 x27: ffffff88009417f8 [ 19.288624] x26: ffffff8800941788 x25: ffffff8800020008 x24: ffffffc082aa3000 [ 19.296227] x23: ffffffc080d90e3c x22: 0000000000000002 x21: 0000000000000000 [ 19.303744] x20: 0000000000000000 x19: ffffff88002f5210 x18: 0000000000000000 [ 19.311295] x17: 6c707369642e3030 x16: 3030613464662072 x15: 0720072007200720 [ 19.318922] x14: 0000000000000000 x13: 284e4f5f4e524157 x12: 0000000000000001 [ 19.326442] x11: 0001ffc085c5b940 x10: 0001ff88003f388b x9 : 0001ff88003f3888 [ 19.334003] x8 : 0001ff88003f3888 x7 : 0000000000000000 x6 : 0000000000000000 [ 19.341537] x5 : 0000000000000000 x4 : 0000000000001668 x3 : 0000000000000000 [ 19.349054] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff88003f3880 [ 19.356581] Call trace: [ 19.359160] __mutex_lock+0x4bc/0x550 [ 19.363032] mutex_lock_nested+0x24/0x30 [ 19.367187] drm_bridge_hpd_notify+0x2c/0x6c [ 19.371698] zynqmp_dp_hpd_work_func+0x44/0x54 [ 19.376364] process_one_work+0x3ac/0x988 [ 19.380660] worker_thread+0x398/0x694 [ 19.384736] kthread+0x1bc/0x1c0 [ 19.388241] ret_from_fork+0x10/0x20 [ 19.392031] irq event stamp: 183 [ 19.395450] hardirqs last enabled at (183): [] finish_task_switch.isra.0+0xa8/0x2d4 [ 19.405140] hardirqs last disabled at (182): [] __schedule+0x714/0xd04 [ 19.413612] softirqs last enabled at (114): [] srcu_invoke_callbacks+0x158/0x23c [ 19.423128] softirqs last disabled at (110): [] srcu_invoke_callbacks+0x158/0x23c [ 19.432614] ---[ end trace 0000000000000000 ]--- Fixes: eb2d64bfcc17 ("drm: xlnx: zynqmp_dpsub: Report HPD through the bridge") Signed-off-by: Sean Anderson Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240308204741.3631919-1-sean.anderson@linux.dev commit c032d84694129c290a0958f2aac4df901c45d4a6 Author: Sean Anderson Date: Tue Apr 23 13:18:50 2024 -0400 drm: zynqmp_dp: Adjust training values per-lane The feedback we get from the DPRX is per-lane. Make changes using this information, instead of picking the maximum values from all lanes. This results in more-consistent training on marginal links. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240423171859.3953024-5-sean.anderson@linux.dev commit 25af9c1ab3327405e94ecbcf4f952c3a2f145708 Author: Sean Anderson Date: Tue Apr 23 13:18:49 2024 -0400 drm: zynqmp_dp: Downgrade log level for aux retries message Enable this message for verbose debugging only as it is otherwise printed after every AUX message, quickly filling the log buffer. Signed-off-by: Sean Anderson Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240423171859.3953024-4-sean.anderson@linux.dev commit 1b9e7cad1b5921c19ae503524c2efff5e309bdd7 Author: Sean Anderson Date: Tue Apr 23 13:18:48 2024 -0400 drm: xlnx: Fix kerneldoc Fix a few errors in the kerneldoc. Mostly this addresses missing/renamed members. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240423171859.3953024-3-sean.anderson@linux.dev commit e0db0269155eb7270f21eb9e8a7d962dc1e0a8af Author: Sean Anderson Date: Tue Apr 23 13:18:47 2024 -0400 drm: xlnx: Store base pointers in zynqmp_disp directly The blend, avbuf, and audio members of zynqmp_disp are anonymous structs with only one member each. This is rather pointless, so move the members up a level. Signed-off-by: Sean Anderson Reviewed-by: Tomi Valkeinen Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20240423171859.3953024-2-sean.anderson@linux.dev commit b58a0bc904ffa091fc020f7fd00e91808fec820e Author: Timur Tabi Date: Wed Apr 17 16:53:17 2024 -0500 nouveau: add command-line GSP-RM registry support Add the NVreg_RegistryDwords command line parameter, which allows specifying additional registry keys to be sent to GSP-RM. This allows additional configuration, debugging, and experimentation with GSP-RM, which uses these keys to alter its behavior. Note that these keys are passed as-is to GSP-RM, and Nouveau does not parse them. This is in contrast to the Nvidia driver, which may parse some of the keys to configure some functionality in concert with GSP-RM. Therefore, any keys which also require action by the driver may not function correctly when passed by Nouveau. Caveat emptor. The name and format of NVreg_RegistryDwords is the same as used by the Nvidia driver, to maintain compatibility. Signed-off-by: Timur Tabi Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240417215317.3490856-1-ttabi@nvidia.com commit 6a2a90cba12b42eb96c2af3426b77ceb4be31df2 Author: Lucas De Marchi Date: Thu Apr 25 11:16:09 2024 -0700 drm/xe/display: Fix ADL-N detection Contrary to i915, in xe ADL-N is kept as a different platform, not a subplatform of ADL-P. Since the display side doesn't need to differentiate between P and N, i.e. IS_ALDERLAKE_P_N() is never called, just fixup the compat header to check for both P and N. Moving ADL-N to be a subplatform would be more complex as the firmware loading in xe only handles platforms, not subplatforms, as going forward the direction is to check on IP version rather than platforms/subplatforms. Fix warning when initializing display: xe 0000:00:02.0: [drm:intel_pch_type [xe]] Found Alder Lake PCH ------------[ cut here ]------------ xe 0000:00:02.0: drm_WARN_ON(!((dev_priv)->info.platform == XE_ALDERLAKE_S) && !((dev_priv)->info.platform == XE_ALDERLAKE_P)) And wrong paths being taken on the display side. Reviewed-by: Matt Roper Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240425181610.2704633-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 5284e4202aa0dc68bc9e903dd666a36e14704791 Author: Krzysztof Kozlowski Date: Wed Mar 27 18:48:42 2024 +0100 drm/tiny: st7586: drop driver owner assignment Core in spi_register_driver() already sets the .owner, so driver does not need to. Signed-off-by: Krzysztof Kozlowski Acked-by: David Lechner Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240327174842.519758-4-krzysztof.kozlowski@linaro.org commit 9745097ca730478e242e7c46538b3e37cc62f38e Author: Krzysztof Kozlowski Date: Wed Mar 27 18:48:41 2024 +0100 drm/tiny: panel-mipi-dbi: drop driver owner assignment Core in spi_register_driver() already sets the .owner, so driver does not need to. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240327174842.519758-3-krzysztof.kozlowski@linaro.org commit 3ab28b7d8d99c574fd35c0b4618f5d6575f9d7c3 Author: Krzysztof Kozlowski Date: Wed Mar 27 18:48:40 2024 +0100 drm/tiny: mi0283qt: drop driver owner assignment Core in spi_register_driver() already sets the .owner, so driver does not need to. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240327174842.519758-2-krzysztof.kozlowski@linaro.org commit 6898837d43355c182ab5613bf2d2981d345d30db Author: Krzysztof Kozlowski Date: Wed Mar 27 18:48:39 2024 +0100 drm/tiny: ili9225: drop driver owner assignment Core in spi_register_driver() already sets the .owner, so driver does not need to. Signed-off-by: Krzysztof Kozlowski Acked-by: David Lechner Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20240327174842.519758-1-krzysztof.kozlowski@linaro.org commit 445237d67a818c18a748602f8eaa4b52f8c6b39c Author: Colin Ian King Date: Fri Apr 26 10:49:04 2024 +0100 drm/xe: Fix spelling mistake "forcebly" -> "forcibly" There is a spelling mistake in a drm_dbg message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240426094904.816033-1-colin.i.king@gmail.com Signed-off-by: Lucas De Marchi commit e77dff51baf565c2a6b8c77b979c42e814ed0c73 Author: Michal Wajdeczko Date: Thu Apr 25 16:39:27 2024 +0200 drm/xe/pf: Initialize and update PF services on driver init The xe_gt_sriov_pf_init_early() and xe_gt_sriov_pf_init_hw() are ideal places to call per-GT PF service init and update functions. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240425143927.2265-2-michal.wajdeczko@intel.com commit d6c5bac8e3638de85190ff381f75b8120feafb9c Author: Michal Wajdeczko Date: Thu Apr 25 16:39:26 2024 +0200 drm/xe/pf: Re-initialize SR-IOV specific HW settings On older platforms (12.00) the PF driver must explicitly unblock VF's modifications to the GGTT. On newer platforms this capability is enabled by default. Bspec: 49908, 53204 Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240425143927.2265-1-michal.wajdeczko@intel.com commit c832541ca8d5b04cbf957ffce5f4a2a4ee6b396e Author: Himal Prasad Ghimiray Date: Wed Apr 24 09:49:11 2024 +0530 drm/xe: Change xe_guc_submit_stop return to void The function xe_guc_submit_stop consistently returns 0 without an error state, prompting the caller to verify it, which is redundant. Cc: Matthew Brost Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240424041911.2184868-1-himal.prasad.ghimiray@intel.com commit c79828e0c7795cccc92abcd24107aa478168628c Author: Himal Prasad Ghimiray Date: Wed Apr 24 10:09:10 2024 +0530 drm/xe: Use xe_bo_lock()/xe_bo_unlock() helpers There is no change in functionality. Using the helper function defined within the driver for locking/unlocking the reservation object. Cc: Matthew Brost Cc: Ashutosh Dixit Suggested-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240424043910.2190376-3-himal.prasad.ghimiray@intel.com commit a1adb3d250925ddccd5270106d39aa09493d6edf Author: Himal Prasad Ghimiray Date: Wed Apr 24 10:09:09 2024 +0530 drm/xe/vm: Use xe_vm_lock()/xe_vm_unlock() helpers There is no change in functionality. Using the helper function defined within the driver. -v2 Use xe_vm_unlock() (Ashutosh/Matt) -v3 Use xe_vm_unlock() for error label too (Matt) Reviewed-by: Badal Nilawar Cc: Matthew Brost Cc: Ashutosh Dixit Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240424043910.2190376-2-himal.prasad.ghimiray@intel.com commit 2e3f08a1ac99cb9a19a5cb151593d4f9df5cc6a7 Author: Jani Nikula Date: Thu Apr 25 14:03:52 2024 +0300 MAINTAINERS: fix LG sw43408 panel driver drm-misc git URL The drm-misc git repo has moved to Gitlab. Fix the URL. Cc: Sumit Semwal Cc: Caleb Connolly Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240425110352.1374729-1-jani.nikula@intel.com Signed-off-by: Dmitry Baryshkov commit edc9f11af3adab20ede4a0289a1335f0d8125998 Author: Matthew Brost Date: Thu Apr 25 16:25:44 2024 -0700 drm/xe: Replace engine references with exec queue in xe_guc_submit.c Exec queue has replaced engine nomenclature. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425232544.1935578-6-matthew.brost@intel.com commit 3713a383f5402c57007d341703ce447fb6df1083 Author: Matthew Brost Date: Thu Apr 25 16:25:43 2024 -0700 drm/xe: Fix alignment in GuC exec queue state defines Normalize the alignment for readability. v3: - Fix typo in commit (Himal) - Fix EXEC_QUEUE_STATE_WEDGED too (Himal) Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425232544.1935578-5-matthew.brost@intel.com commit 1a1563e3245d96a30b62c30c4e6861ec9518699f Author: Matthew Brost Date: Thu Apr 25 16:25:42 2024 -0700 drm/xe: s/ENGINE_STATE_KILLED/EXEC_QUEUE_STATE_KILLED Exec queue has replaced engine nomenclature. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425232544.1935578-4-matthew.brost@intel.com commit 03b3517630ce2ad079d1863c408d5d4df7d80388 Author: Matthew Brost Date: Thu Apr 25 16:25:41 2024 -0700 drm/xe: s/ENGINE_STATE_SUSPENDED/EXEC_QUEUE_STATE_SUSPENDED Exec queue has replaced engine nomenclature. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425232544.1935578-3-matthew.brost@intel.com commit f85ada84f60cdcccb0ce897d7e54bac8c6f0722e Author: Matthew Brost Date: Thu Apr 25 16:25:40 2024 -0700 drm/xe: s/ENGINE_STATE_ENABLED/EXEC_QUEUE_STATE_ENABLED Exec queue has replaced engine nomenclature. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425232544.1935578-2-matthew.brost@intel.com commit 3f371a98deada9aee53d908c9aa53f6cdcb1300b Author: Matthew Brost Date: Wed Apr 24 22:47:47 2024 -0700 drm/xe: Delete unused GuC submission_state.suspend GuC submission_state.suspend is unused, delete it. Signed-off-by: Matthew Brost Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240425054747.1918811-1-matthew.brost@intel.com commit 3d44d67c441a9fe6f81a1d705f7de009a32a5b35 Author: Matthew Auld Date: Tue Apr 23 08:47:23 2024 +0100 drm/xe/vm: prevent UAF in rebind_work_func() We flush the rebind worker during the vm close phase, however in places like preempt_fence_work_func() we seem to queue the rebind worker without first checking if the vm has already been closed. The concern here is the vm being closed with the worker flushed, but then being rearmed later, which looks like potential uaf, since there is no actual refcounting to track the queued worker. We can't take the vm->lock here in preempt_rebind_work_func() to first check if the vm is closed since that will deadlock, so instead flush the worker again when the vm refcount reaches zero. v2: - Grabbing vm->lock in the preempt worker creates a deadlock, so checking the closed state is tricky. Instead flush the worker when the refcount reaches zero. It should be impossible to queue the preempt worker without already holding vm ref. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1676 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1591 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1364 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1304 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1249 Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: # v6.8+ Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240423074721.119633-4-matthew.auld@intel.com commit 6e78e0719d0ed5ec230e8e28bd59e47acb3dbc04 Author: Matthew Auld Date: Tue Apr 23 08:47:22 2024 +0100 Revert "drm/xe/vm: drop vm->destroy_work" This reverts commit 5b259c0d1d3caa6efc66c2b856840e68993f814e. Cleanup here is good, however we need to able to flush a worker during vm destruction which might involve sleeping, so bring back the worker. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240423074721.119633-3-matthew.auld@intel.com commit 3cd1585e57908b6efcd967465ef7685f40b2a294 Author: Matthew Auld Date: Thu Apr 18 15:46:31 2024 +0100 drm/xe/preempt_fence: enlarge the fence critical section It is really easy to introduce subtle deadlocks in preempt_fence_work_func() since we operate on single global ordered-wq for signalling our preempt fences behind the scenes, so even though we signal a particular fence, everything in the callback should be in the fence critical section, since blocking in the callback will prevent other published fences from signalling. If we enlarge the fence critical section to cover the entire callback, then lockdep should be able to understand this better, and complain if we grab a sensitive lock like vm->lock, which is also held when waiting on preempt fences. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240418144630.299531-2-matthew.auld@intel.com commit 7547a23cae4145836dbb94522453af4e7d0ccc92 Author: Michal Wajdeczko Date: Wed Apr 24 16:05:06 2024 +0200 drm/xe/guc: Fix typos in VF CFG KLVs descriptions Apart from the obvious spelling typo, use the correct values for infinity quantum/timeout settings (it's 0x0 instead of 0xFFFFFFFF). Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240424140506.2133-1-michal.wajdeczko@intel.com commit 2bdb481bf7a93c22b9fea8daefa2834aab23a70f Author: Andy Yan Date: Mon Apr 22 18:19:05 2024 +0800 drm/rockchip: vop2: Fix the port mux of VP2 The port mux of VP2 should be RK3568_OVL_PORT_SET__PORT2_MUX. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Andy Yan Acked-by: Sascha Hauer Tested-by: Heiko Stuebner Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240422101905.32703-2-andyshrk@163.com commit 4befb17e83ed8747049c91f5009e786bb858e446 Author: Michal Wajdeczko Date: Wed Apr 24 19:10:30 2024 +0200 drm/xe/pf: Expose PF service details via debugfs For debug purposes we might want to verify which registers values PF is sharing with VFs and to view which VF/PF ABI versions were negotiated by the VFs. Plug the 'print' functions already provided by the PF service code into our debugfs. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240424171030.2177-1-michal.wajdeczko@intel.com commit cbf7579304c234208569d767355cc39c0665bd5b Author: Michal Wajdeczko Date: Tue Apr 9 17:31:32 2024 +0200 drm/xe: Check result of drmm_mutex_init() Although it's unlikely that drmm_mutex_init() will fail during driver initialization, however we shouldn't ignore this case. Signed-off-by: Michal Wajdeczko Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240409153132.1111-1-michal.wajdeczko@intel.com Signed-off-by: Lucas De Marchi commit b5ef80879dfec1c8e2a992dc186196687293e1fe Author: Tejas Upadhyay Date: Wed Apr 10 12:16:40 2024 +0530 drm/xe/xe2: Add workaround 14021567978 Workaround 14021567978 applies to RenderCS xe2 V3: - Cover xe2_hpg as its landed upstream now V2(MattR): - Move tuning to wa and apply to xe2 Signed-off-by: Tejas Upadhyay Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240410064640.1010098-1-tejas.upadhyay@intel.com Signed-off-by: Lucas De Marchi commit ad4ca914de384681ce8984785f4ee2078945a759 Author: Michal Wajdeczko Date: Fri Apr 19 17:34:07 2024 +0200 drm/xe/guc: Improve GuC doorbell/context ID manager intro message We can use recently added str_plural() helper. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240419153407.402-1-michal.wajdeczko@intel.com commit 6b8ef44cc0a952549a6773a0233cee853f807a79 Author: Rodrigo Vivi Date: Tue Apr 23 18:18:17 2024 -0400 drm/xe: Introduce the wedged_mode debugfs So, the wedged mode can be selected per device at runtime, before the tests or before reproducing the issue. v2: - s/busted/wedged - some locking consistency v3: - remove mutex - toggle guc reset policy on any mode change Cc: Lucas De Marchi Cc: Alan Previn Cc: Himal Prasad Ghimiray Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240423221817.1285081-4-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 8ed9aaae39f39130b7a3eb2726be05d7f64b344c Author: Rodrigo Vivi Date: Tue Apr 23 18:18:16 2024 -0400 drm/xe: Force wedged state and block GT reset upon any GPU hang In many validation situations when debugging GPU Hangs, it is useful to preserve the GT situation from the moment that the timeout occurred. This patch introduces a module parameter that could be used on situations like this. If xe.wedged module parameter is set to 2, Xe will be declared wedged on every single execution timeout (a.k.a. GPU hang) right after devcoredump snapshot capture and without attempting any kind of GT reset and blocking entirely any kind of execution. v2: Really block gt_reset from guc side. (Lucas) s/wedged/busted (Lucas) v3: - s/busted/wedged - Really use global_flags (Dafna) - More robust timeout handling when wedging it. v4: A really robust clean exit done by Matt Brost. No more kernel warns on unbind. v5: Simplify error message (Lucas) Cc: Matthew Brost Cc: Dafna Hirschfeld Cc: Lucas De Marchi Cc: Alan Previn Cc: Himanshu Somaiya Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240423221817.1285081-3-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 692818678e80e5999ee1975953f7c6f82cb4a2be Author: Rodrigo Vivi Date: Tue Apr 23 18:18:15 2024 -0400 drm/xe: declare wedged upon GuC load failure Let's block the device upon any GuC load failure. But let's continue with the probe so guc logs can be read from the debugfs. v2: - s/wedged/busted - do not block probe or we lose guc_logs in debugfs (Matt) v3: - s/busted/wedged v4: Do not change __xe_guc_upload return. (Himal) Cc: Matthew Brost Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20240423221817.1285081-2-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit fb74b205cdd26357469cab8957f5935f10b810e2 Author: Rodrigo Vivi Date: Tue Apr 23 18:18:14 2024 -0400 drm/xe: Introduce a simple wedged state Introduce a very simple 'wedged' state where any attempt to access the GPU is entirely blocked. On some critical cases, like on gt_reset failure, we need to block any other attempt to use the GPU. Otherwise we are at a risk of reaching cases that would force us to reboot the machine. So, when this cases are identified we corner and block any GPU access. No IOCTL and not even another GT reset should be attempted. The 'wedged' state in Xe is an end state with no way back. Only a device "re-probe" (unbind + bind) can restore the GPU access. v2: - s/wedged/busted (Lucas) - use unbind+bind instead of module reload (Lucas) - added more info on unbind operations and instruction on bug report - only print the message once. v3: - s/busted/wedged (Ashutosh, Tvrtko, Thomas) - don't assume user has sudo and tee available (Lucas) v4: - remove unnecessary cases around ct communication or migration. Cc: Ashutosh Dixit Cc: Tvrtko Ursulin Cc: Thomas Hellström Cc: Lucas De Marchi Cc: Anshuman Gupta Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Lucas De Marchi #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20240423221817.1285081-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit c8d4524ecc79f8b5a3bf58c6bd4438127c54a4cd Author: José Roberto de Souza Date: Wed Apr 24 07:03:03 2024 -0700 drm/xe: Add INSTDONE registers to devcoredump This registers contains important information that can help with debug of GPU hangs. While at it also fixing the double line jump at the end of engine registers for CCS engines. v2: - print other INSTDONE registers v3: - add for_each_geometry/compute_dss() v4: - print one slice_common_instdone per glice in DG2+ v5: - rename registers prefix from DG2 to XEHPG (Zhanjun) Cc: Rodrigo Vivi Cc: Matt Roper Cc: Zhanjun Dong Cc: Himal Prasad Ghimiray Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240424140319.61651-3-jose.souza@intel.com commit 082a634f608200d569412114fc0ee4d8c9f0f2aa Author: José Roberto de Souza Date: Wed Apr 24 07:03:02 2024 -0700 drm/xe: Add helpers to loop over geometry and compute DSS Some DSS can only be available for geometry while others can only be available for compute. So here adding helpers to loop only available DSS for given usage. User of this helper will come in the next patch. v2: - drop has_dss() Cc: Rodrigo Vivi Cc: Matt Roper Cc: Zhanjun Dong Cc: Himal Prasad Ghimiray Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240424140319.61651-2-jose.souza@intel.com commit f332625733b967afca3ccbc32553e3003d847b44 Author: José Roberto de Souza Date: Wed Apr 24 07:03:01 2024 -0700 drm/xe: Store xe_hw_engine in xe_hw_engine_snapshot A future patch will require gt and xe device structs, so here replacing class by hwe. Cc: Rodrigo Vivi Cc: Matt Roper Cc: Zhanjun Dong Cc: Himal Prasad Ghimiray Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240424140319.61651-1-jose.souza@intel.com commit 49f853c78e688780cacb9712be4136869f3e34fe Author: Michal Wajdeczko Date: Fri Apr 19 14:35:43 2024 +0200 drm/xe/pf: Clamp maximum execution quantum to 100s GuC is silently clamping values of the execution quantum and preemption timeout KLVs to 100s. Perform explicit clamping on the driver side as later there is no way to read back values used by the firmware and we shouldn't mislead the user about actual values being used when we print them in dmesg or debugfs. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240419123543.270-3-michal.wajdeczko@intel.com commit 5a8c292f74c2b0dc84653c7b59323368a849a3ad Author: Michal Wajdeczko Date: Fri Apr 19 14:35:42 2024 +0200 drm/xe/guc: Update VF configuration KLVs definitions GuC firmware specification says that maximum value for the execution quantum KLV is 100s and anything exceeding that will be clamped. The same limitation applies to the preemption timeout KLV. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240419123543.270-2-michal.wajdeczko@intel.com commit 2cab6319b41023e4ad7b1c4604b9aa994fa2d4d0 Author: Michal Wajdeczko Date: Tue Apr 23 15:12:44 2024 +0200 drm/xe/pf: Expose SR-IOV policy settings over debugfs We already have functions to configure SR-IOV policies. Allow to tweak those policy settings over debugfs. Reviewed-by: Piotr Piórkowski Acked-by: Rodrigo Vivi Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240423131244.2045-4-michal.wajdeczko@intel.com commit b00240b6a28a36986c4021daabaecc81c708c01c Author: Michal Wajdeczko Date: Tue Apr 23 15:12:43 2024 +0200 drm/xe/pf: Expose SR-IOV VF control commands over debugfs We already have functions to control the VF. Allow to control the VF using debugfs. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240423131244.2045-3-michal.wajdeczko@intel.com commit e42a51fb9c0f386d3ebb115d081896d41eb844af Author: Michal Wajdeczko Date: Tue Apr 23 15:12:42 2024 +0200 drm/xe/pf: Expose SR-IOV VFs configuration over debugfs We already have functions to configure VF resources and to print actual provisioning details. Expose this functionality in debugfs to allow experiment with different settings or inspect details in case of unexpected issues with the provisioning. As debugfs attributes are per-VF, we use parent d_inode->i_private to store VFID, similarly how we did for per-GT attributes. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240423131244.2045-2-michal.wajdeczko@intel.com commit 11294bf38fa2f71619ebb5c7baa3bbe380cbcf0c Author: Michal Wajdeczko Date: Tue Apr 23 20:04:36 2024 +0200 drm/xe/kunit: Add PF service tests Start with basic tests for VF/PF ABI version negotiation. As we treat all platforms in the same way, we can run the tests on one platform. More tests will likely come later. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240423180436.2089-6-michal.wajdeczko@intel.com commit 98e62805921cebcd2fcac3692037ca2ebef63b4a Author: Michal Wajdeczko Date: Tue Apr 23 20:04:35 2024 +0200 drm/xe/pf: Add SR-IOV GuC Relay PF services We already have mechanism that allows a VF driver to communicate with the PF driver, now add PF side handlers for VF2PF requests defined in version 1.0 of VF/PF GuC Relay ABI specification. The VF2PF_HANDSHAKE request must be used by the VF driver to negotiate the ABI version prior to sending any other request. We will reset any negotiated version later during FLR. The outcome of the VF2PF_QUERY_RUNTIME requests depends on actual platform, for legacy platforms used as SDV is provided as-is, for latest platforms it is preliminary, and might be changed. Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240423180436.2089-5-michal.wajdeczko@intel.com commit dec793860d5137c58c633712554abfed71642a88 Author: Michal Wajdeczko Date: Tue Apr 23 20:04:34 2024 +0200 drm/xe: Add few more GT register definitions While we are not using these registers right now, they are part of some runtime register lists that PF driver share with VFs on some legacy platforms that we might want to support as SDV. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240423180436.2089-4-michal.wajdeczko@intel.com commit 1cb4db30cf685709584743d8bf8a0db2eac620c9 Author: Michal Wajdeczko Date: Tue Apr 23 20:04:33 2024 +0200 drm/xe: Add helper to calculate adjusted register offset Our MMIO accessing functions automatically adjust addresses for the media registers based on mmio.adj_limit and mmio.adj_offset logic. Move it to the separate helper to avoid code duplication and to allow using it by the upcoming changes to PF driver code. Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski Reviewed-by: Piotr Piórkowski Link: https://patchwork.freedesktop.org/patch/msgid/20240423180436.2089-3-michal.wajdeczko@intel.com commit 8f21f82d8b7652e11e6800612e34547bffdc7fd2 Author: Michal Wajdeczko Date: Tue Apr 23 20:04:32 2024 +0200 drm/xe/guc: Add GuC Relay ABI version 1.0 definitions This initial GuC Relay ABI specification includes messages for ABI version negotiation and to query values of runtime/fuse registers. We will start handling those messages on the PF driver soon. Reviewed-by: Piotr Piórkowski Signed-off-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20240423180436.2089-2-michal.wajdeczko@intel.com commit 06e7139a034f26804904368fe4af2ceb70724756 Author: Thomas Hellström Date: Tue Apr 23 14:11:14 2024 +0200 drm/xe: Fix unexpected backmerge results The recent backmerge from drm-next to drm-xe-next brought with it some silent unexpected results. One code snippet was added twice and a partial revert had merge errors. Fix that up to reinstate the affected code as it was before the backmerge. v2: - Commit log message rewording (Lucas DeMarchi) Fixes: 79790b6818e9 ("Merge drm/drm-next into drm-xe-next") Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240423121114.39325-1-thomas.hellstrom@linux.intel.com commit 869e54d4d54b1b0ee16c98c2149f5785eea08c02 Author: Rodrigo Vivi Date: Mon Apr 22 16:14:54 2024 -0400 drm/xe: make xe_pm_runtime_lockdep_map a static struct Fix the new sparse warning: >> drivers/gpu/drm/xe/xe_pm.c:72:20: sparse: sparse: symbol 'xe_pm_runtime_lockdep_map' was not declared. Should it be static? Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404191329.EZzOTzwK-lkp@intel.com/ Reviewed-by: Gustavo Sousa Reviewed-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20240422201454.699089-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi commit 9dd12ed95c2d06a29a5d289c6e65589c577ef8ca Author: Justin Stitt Date: Thu Mar 28 20:54:16 2024 +0000 pstore/blk: replace deprecated strncpy with strscpy strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We know that info-device should be NUL-terminated based on its use with strlen(): | static int __init mtdpstore_init(void) | { | int ret; | struct mtdpstore_context *cxt = &oops_cxt; | struct pstore_blk_config *info = &cxt->info; | | ret = pstore_blk_get_config(info); | if (unlikely(ret)) | return ret; | | if (strlen(info->device) == 0) { | pr_err("mtd device must be supplied (device name is empty)\n"); ... Considering the above, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer. Note that this patch relies on the _new_ 2-argument version of strscpy() introduced in Commit e6584c3964f2f ("string: Allow 2-argument strscpy()"). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20240328-strncpy-fs-pstore-blk-c-v1-1-5748cdc22a53@google.com Signed-off-by: Kees Cook commit 6d89df61650d155b9033d9f507f3580f9177e623 Author: Uwe Kleine-König Date: Tue Mar 5 22:32:05 2024 +0100 reset: ti-sci: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Nishanth Menon Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/ab374da386cafd6748aac5bdf66e6be3e1860509.1709674157.git.u.kleine-koenig@pengutronix.de Signed-off-by: Philipp Zabel commit 7f5aa02ad0c80fc841968cf9bbff36d845266683 Author: Uwe Kleine-König Date: Tue Mar 5 22:32:04 2024 +0100 reset: rzg2l-usbphy-ctrl: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/e75fb1af5c7df5fc4073a26a99ba88633503910d.1709674157.git.u.kleine-koenig@pengutronix.de Signed-off-by: Philipp Zabel commit b99e9c096148fb8b0915da7506240aade4e863bc Author: Uwe Kleine-König Date: Tue Mar 5 22:32:03 2024 +0100 reset: meson-audio-arb: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/dbca07bad345abe7ca421515004987acf1cb41c2.1709674157.git.u.kleine-koenig@pengutronix.de Signed-off-by: Philipp Zabel